diff --git a/CHANGELOG.md b/CHANGELOG.md index dbf035a021e..f791f9c1b6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,259 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/). +## 2.79.0 - 2024-12-10 +### Added +- Support for Bring Your Own Key (BYOK) in the Database service +- Support for refreshing disaster recovery plans in the Disaster Recovery service +- Support for private access to service instances in the Visual Builder service +- Support for exadata fleet update and rollback maintenance cycle in the Fleet Application Management service +- Support for Bring Your Own License (BYOL) for windows virtual machines in the Compute service +- Support for cascading deletion of applications and runs in the Data Flow service +- Support for on-demand translation and auto language detection during file translation in the AI Language service +- Support for alias for endpoints in custom model flow and custom anonymization in the AI Language service +- Removed fallback to the deprecated Instance Metadata service (IMDS) V1 endpoint + +### Breaking Changes +- Method `public java.util.List getAttachments()` has been removed from model `com.oracle.bmc.visualbuilder.model.VbInstance` in the the Visual Builder service +- Method `public com.oracle.bmc.visualbuilder.model.IdcsInfoDetails getIdcsInfo()` has been removed from `com.oracle.bmc.visualbuilder.model.VbInstance` in the the Visual Builder service +- Class `com.oracle.bmc.visualbuilder.model.AttachmentDetails` has been removed in the the Visual Builder service +- Class `com.oracle.bmc.visualbuilder.model.IdcsInfoDetails` has been removed in the the Visual Builder service + +## 2.78.0 - 2024-11-19 +### Added +- Support for calling Oracle Cloud Infrastructure services in the `me-alain-1` region +- Support for connection refresh in the GoldenGate service +- Support for secret compartment id in import and export operations of deployment wallet in the GoldenGate service +- Support for creating metadata only backups in the GoldenGate service +- Support for Llama 3.2 unit shape in Generative AI service +- Support for Llama 3.2 vision in Generative AI Inference service +- Support for Cohere CommandR response format in Generative AI Inference service +- Support for optional parameters for unified auditing in the Database service +- Support for user groups for creating technical requests in the Support Management service +- Support for additional checksum algorithms (SHA-256, SHA-384, CRC32C) in the Object Storage service +- Support for single Read Only (RO) endpoint for the read replicas in the PostgreSQL service +- Support for exascale database vaults in the Database service +- Support for virtual machine clusters with database vaults in the Database service +- Support for N3-Gi version in the Database service +### Breaking Changes +- Method `public com.oracle.bmc.cims.model.CreateLimitItemDetails$LimitStatus getLimitStatus()` has been removed from the model `com.oracle.bmc.cims.model.CreateLimitItemDetails` in the Customer Incident Management Service +- Class `com.oracle.bmc.cims.model.CreateLimitItemDetails$LimitStatus` has been removed from the Customer Incident Management Service +- Class `com.oracle.bmc.cims.model.ServiceCategories` removed has been removed from the Customer Incident Management Service +- Method `public java.util.List getSubComponents()` has been removed from model `com.oracle.bmc.cims.model.SubCategories` in the Customer Incident Management Service + +## 2.77.0 - 2024-11-05 +### Added +- Support for calling Oracle Cloud Infrastructure services in the `us-somerset-1` region +- Support for calling Oracle Cloud Infrastructure services in the `us-thames-1` region +- Support for calling Oracle Cloud Infrastructure services in the `ap-seoul-2` region +- Support for calling Oracle Cloud Infrastructure services in the `ap-suwon-1` region +- Support for calling Oracle Cloud Infrastructure services in the `ap-chuncheon-2` region +- Support for Generative AI Agent service +- Support for undeleting autonomous databases in the Database service +- Support for assigning key versions for the pluggable databases in the Database service +- Support for lifecycle states on list autonomous database operation in the Database service +- Support for data masking parameter on list refresh activity operation in the Fusion Application as a Service +- Support for configuring custom endpoints on an instance in the Integration Cloud service +- Support for updating channel schedules on instance create operation in the Analytics service +- Support for ExaCC via management agents in the Operations Insights service +- Support for appending and deleting allowed SQLs from SQL firewall policies in the Data Safe service +- Support for alarm suppressions with compartment targets and recurring schedules in the Monitoring service +- Support for Security Attribute service +- Support for Zero Trust Packet Routing service +- Support for zero trust packet routing security attributes in the Database service +- Support for zero trust packet routing security attributes in the Networking service +- Support for zero trust packet routing security attributes in the Network Load Balancer service +- Support for disaster recovery failover in the Integration Cloud service +- Support for OCI Secure Desktops service +- Support for window preferences on cloud automation tooling updates on ExaCC and ExaCS VM clusters in the Database service +- Support for maintenance windows in the Stack Monitoring service +- Renamed service OCI Container Engine to OCI Kubernetes Engine +- Support for password as an optional parameter on creating admin users in the Fusion Apps as a Service +- Support for IAM credentials for autonomous databases in the Operations Insights service +- Support for open id connect discovery in the Oracle Kubernetes Engine service +- Support for DNS security extensions (DNSSEC) in the DNS service +- Support for restoring delta between backups to a new volume in the Block Volume service +- Support for cross region backup copy and replication for volumes encrypted with customer keys in the Block Volume service +- Support for list operation on deployment environments in the GoldenGate service +- Support for defining environment types for deployments in the GoldenGate service +- Support for resource locking in the File storage service +- Support for customer managed keys via Azure key vault and Amazon Web Services key vault in the Database service +- Support for generated tokens on create secret operations in the Identity Domains service +- Support for creating and updating Amazon Web Services asset-sources, EC2 and EBS assets in the Cloud Bridge service +- Support for listing Amazon Web Services regions which are available for discovery and migration in the Cloud Bridge service +- Support for model backup retention and restore in the Data Science service +- Support for host capacity planning for host IO metrics in the Operations Insight service +- Support for FastConnect redundancy in the Compute service +- Support for create, publish, clone and delete operations on runbooks in the Fleet Application Management service +- Support for platform configurations and metadata management in the Fleet Application Management service +- Support for management of compliance policy rules in the Fleet Application Management service +- Support for compliance report details based on compliance policy in the Fleet Application Management service +- Support for administrative settings like auto discovery frequency in the Fleet Application Management service +- Support for L3IP (Layer 3 IP) listeners in the Network Load Balancing service +- Support for overriding an existing add-on installation in the Kubernetes Engine service +- Support for MFA Enablement v2 in the Identity Domains service +- Support for starting, stopping and updating min/max executor count for SQL Endpoints in the Data Flow service +- Support for customer message in the Customer Incident Management Service +- Support for REJECTED limitStatus in the Customer Incident Management Service + +### Breaking Changes +- Field `Standby` has been removed from the model `com.oracle.bmc.integration.model.IntegrationInstance$LifecycleState` in the Integration Cloud service +- Field `Standby` has been removed from the model `com.oracle.bmc.integration.model.IntegrationInstanceSummary$LifecycleState` in the model Integration Cloud service +- Field `Standby` has been removed from the request `com.oracle.bmc.integration.requests.ListIntegrationInstancesRequest$LifecycleState` in the Integration Cloud service +- Return type of method `public com.oracle.bmc.goldengate.model.DeploymentTypeSummary$Category getCategory()` has been changed to `com.oracle.bmc.goldengate.model.DeploymentCategory` in the model `com.oracle.bmc.goldengate.model.DeploymentTypeSummary` in the GoldenGate service +- Enum `com.oracle.bmc.goldengate.model.DeploymentTypeSummary$Category` has been removed in the GoldenGate service +- Model `com.oracle.bmc.opsi.model.HostPerformanceMetricGroup` has been removed from the list of superclasses from `com.oracle.bmc.opsi.model.HostContainers` in the Operations Insight service +- Field `HostContainers` has been removed from the model `com.oracle.bmc.opsi.model.HostPerformanceMetricGroup$MetricName` in the Operations Insight service +- Method `public com.oracle.bmc.cloudbridge.responses.UpdatePluginResponse updatePlugin(com.oracle.bmc.cloudbridge.requests.UpdatePluginRequest)` has been removed from `com.oracle.bmc.cloudbridge.OcbAgentSvc` in the Cloud Bridge service +- Class `com.oracle.bmc.cloudbridge.model.UpdatePluginDetails` has been removed from the model `com.oracle.bmc.cloudbridge.model.UpdatePluginDetails` in the Cloud Bridge service +- Class `com.oracle.bmc.cloudbridge.requests.UpdatePluginRequest` has been removed from `com.oracle.bmc.cloudbridge.requests.UpdatePluginRequest` in the Cloud Bridge service +- Class `com.oracle.bmc.cloudbridge.responses.UpdatePluginResponse` has been removed from `com.oracle.bmc.cloudbridge.responses.UpdatePluginResponse` in the Cloud Bridge service +- The retry strategy for getting the X509 token from Identity service was modified and is now protected via circuit breaker +- Method `public com.oracle.bmc.cims.responses.GetCsiNumberResponse getCsiNumber(com.oracle.bmc.cims.requests.GetCsiNumberRequest)` has been removed from model `com.oracle.bmc.cims.Incident` in the Customer Incident Management Service +- Method `public com.oracle.bmc.cims.responses.GetStatusResponse getStatus(com.oracle.bmc.cims.requests.GetStatusRequest)` has been removed from model `com.oracle.bmc.cims.Incident` in the Customer Incident Management Service +- Method `public java.util.List getServiceCategories()` has been removed from model `com.oracle.bmc.cims.model.IncidentResourceType` in the Customer Incident Management Service +- Method `public java.util.Map getIssueType()` has been removed from model `com.oracle.bmc.cims.model.ServiceCategories` in the Customer Incident Management Service +- Method `public java.util.Map getServiceCategory()` has been removed from model `com.oracle.bmc.cims.model.ServiceCategories` in the Customer Incident Management Service +- Class `com.oracle.bmc.cims.requests.GetCsiNumberRequest` has been removed from the the Customer Incident Management Service +- Class `com.oracle.bmc.cims.requests.GetStatusRequest` has been removed from the Customer Incident Management Service +- Class `com.oracle.bmc.cims.responses.GetCsiNumberResponse` has been removed from the Customer Incident Management Service +- Class `com.oracle.bmc.cims.responses.GetStatusResponse` has been removed from the Customer Incident Management Service + +## 2.76.0 - 2024-09-17 +### Added +- Support for calling Oracle Cloud Infrastructure services in the eu-crissier-1 region +- Support for dedicated AI cluster unit shapes in the Generative AI service +- Support for ticket numbers when creating access requests in the Managed Access service +- Support for 23ai database, cloud VM clusters and VM cluster patching in the Exadata Fleet Update service +- Support for text to speech feature in the AI Speech service +- Support for notifications and transfer of capacity requests in the OCI Control Center service +- Support for Delegate Access Control service +- Support for upgrade and downgrade of shapes of high performance mount targets in the File Storage service +- Support for private endpoints in the Object Storage service +- Support for create, update, list and delete operations on scheduling policies and scheduling windows in the Database service +- Support for specifying domains while creating data guard associations in the Database service +- Support for provision of developer autonomous databases in the Database service +- Support for upgrade of developer autonomous databases to paid autonomous databases in the Database service +- Support for scheduling plans, actions, execution windows and execution actions for maintenance scheduling in the Database service +- Support for cross-region replication of virtual vaults in the Key Management service +- Support for listing all active service summaries in the Announcements service +- Support for VMware major and minor version upgrades in VMware Solution service +- Support for updating protected database subscriptions in the Autonomous Recovery service +- Support for health insurance id as an allowed document type in the Document Understanding service +- Support for advanced database management features for autonomous databases in the Database Management service +- Support for propagating request ids to load balancer servers in the Load balancer service +- Support for automatic update orders in Fusion Application as a Service + +### Breaking Changes +- The field `occCustomerGroupId` was made mandatory for the `ListOccAvailabilityCatalogsInternalRequest` call in the OCI Control Center service +- Method `public java.lang.String getDocumentId()` has been removed from the model `com.oracle.bmc.aidocument.model.DetectedDocumentType` in the Document Understanding service +- Method `public java.lang.String getTenancyId()` has been removed from the model `com.oracle.bmc.aidocument.model.DocumentClassificationFeature` in the Document Understanding service +- Method `public java.lang.String getTenancyId()` has been removed from the model `com.oracle.bmc.aidocument.model.DocumentKeyValueExtractionFeature` in the Document Understanding service +- Field `InsuranceClaim` has been removed from the model `com.oracle.bmc.aidocument.model.DocumentType` in the Document Understanding service + +## 2.75.1 - 2024-09-05 +### Added +- Support for calling Oracle Cloud Infrastructure services in the `eu-crissier-1` region + +### Fixed +- Fixed a bug in `com.oracle.bmc.auth.AbstractFederationClientAuthenticationDetailsProviderBuilder` that could cause `java.lang.IllegalStateException: Client instance has been closed.` if `executeInstanceFallback` failed, rendering `autoDetectEndpointUsingMetadataUrl` unable to auto-detect the authentication endpoint. + +## 2.75.0 - 2024-08-28 +### Added +- Support for Fleet Application Management service +- Support for creating maintenance runs using autonomous database software images in the Database service +- Support for Object Storage buckets, Oracle databases, Oracle databases on exascale Infrastructure, autonomous container databases, and autonomous container databases on Cloud at Customer in the Disaster Recovery service +- Support for multiple sharing modes in the OCI Cache service +- Support for extended data retention periods for instances in the Integration Cloud service +- Support for SQL watch and lifecycle management in the Database management service +- Support for identity domains and feature sets in the Analytics Cloud service +- Support for automatically extending the storage space for MySQL DB systems in pre-defined increments in the MySQL Database service +- Support for Delegate Access Control service +- Support for upgrade and downgrade of shapes of high performance mount targets in the File Storage service +- Support for private endpoints in the Object Storage service +- Support for create, update, list and delete operations on scheduling policies and scheduling windows in the Database service +- Support for specifying domains while creating data guard associations in the Database service +- Support for provision of developer autonomous databases in the Database service +- Support for upgrade of developer autonomous databases to paid autonomous databases in the Database service +- Support for scheduling plans, actions, execution windows and execution actions for maintenance scheduling in the Database service +- Support for cross-region replication of virtual vaults in the Key Management service +- Support for listing all active service summaries in the Announcements service +- Support for VMware major and minor version upgrades in VMware Solution service +- Support for updating protected database subscriptions in the Autonomous Recovery service +- Support for health insurance id as an allowed document type in the Document Understanding service +- Support for advanced database management features for autonomous databases in the Database Management service +- Support for propagating request ids to load balancer servers in the Load balancer service +- Support for automatic update orders in Fusion Application as a Service + +### Breaking Changes +- Method `public com.oracle.bmc.disasterrecovery.model.DrPlanExecutionType getDrPlanExecutionType()` has been removed from `com.oracle.bmc.disasterrecovery.requests.ListDrPlanExecutionsRequest` in the Disaster Recovery service +- Method `public java.lang.String getDocumentId()` has been removed from the model `com.oracle.bmc.aidocument.model.DetectedDocumentType` in the Document Understanding service +- Method `public java.lang.String getTenancyId()` has been removed from the model `com.oracle.bmc.aidocument.model.DocumentClassificationFeature` in the Document Understanding service +- Method `public java.lang.String getTenancyId()` has been removed from the model `com.oracle.bmc.aidocument.model.DocumentKeyValueExtractionFeature` in the Document Understanding service +- Field `InsuranceClaim` has been removed from the model `com.oracle.bmc.aidocument.model.DocumentType` in the Document Understanding service + +## 2.74.0 - 2024-08-13 +### Added +- Support for cluster placement groups on get operations in the Database service +- Support for baseline metric for imported resources and metric extensions in the Stack Monitoring service +- Support for implicit JIT and group membership provisioning during OpenID connect flow in the Identity Domains service +- Support for realtime speech and customizations in the AI Speech service +- Support for self-service instance maintenance API in the Compute service +- Support for GoldenGate suspend phase in the Database Migration service +- Support for creating custom alert policies in the Data Safe service +- Support for tunnel inspection in the Network firewall service +- Support for diagnostics collection preferences and custom GI images in the Exadata Fleet Update service +- Support for calling Oracle Cloud Infrastructure services in the `me-riyadh-1` region +- Support for vertically scaling a Database system in the PostgreSQL service +- Support for flex shapes in the PostgreSQL service +- Support for new fork repository feature in the Source Code Management service +- Support for Developer Charts in the Source Code Management service +- Support for pull requests and merge in Source Code Management service +- Support for limiting custom and versioned custom software source content to the latest package versions in the OS Management service +- Support for Open Data Hub (ODH) patching in a staged manner in the Big Data service +- Support for Autoscale Memory Utilization in the Big Data service +- Support for Resource Principal configuration feature in the Big Data service +- Support for a new optional parameter compartment ID in the Java Management service +- Support for Agent Installer in the Java Management service +- Support for Java migration analysis request of deployed applications in the Java Management service +- Support for JmsPlugin in the Java Management service +- Support for improved cryptographic analysis result listing in the Java Management service +- Support for improved fleet agent configuration setting in the Java Management service +- Support for improved Java migration analysis result listing in the Java Management service +- Support for improved library usage summary in the Java Management service +- Support for improved performance tuning analysis result listing in the Java Management service +- Support for improved work request listing in the Java Management service +- Support for calling Oracle Cloud Infrastructure services in the `me-abudhabi-4` region +- Support for viewing subscription limits in the Limits service +- Support for TCP idle timeout on network load balancer create and update operations in the Network Load Balancing service +- Support for creating integration instances of type Healthcare in the Integration Cloud service + +### Breaking Changes +- Method `public java.util.List getServicePrincipals()` has been removed from the model `com.oracle.bmc.identitydomains.model.IdentityPropagationTrust` in the Identity Domains service +- The property `credentials` was made required in the model `CreateDbSystemDetails` in the PostgreSQL service + + +## 2.73.2 - 2024-07-23 +### Added +- Support for subscription id attribute in Cloud Exadata Infrastructure and Cloud VM Clusters in the Database service +- Support for SQL and FTP monitors on create and update operations in the Application Performance Monitoring service +- Support for MySQL Heatwave database systems in the Operations Insights service +- Support for creating and updating schedules for user assessments and security assessments in the Data Safe service +- Support for creating and updating sensitive data models of the tables for discovery in the Data Safe service +- Support for additional optional parameters on autonomous database create and update operations in the Database service + +## 2.73.1 - 2024-07-16 +### Added +- Support for calling Oracle Cloud Infrastructure services in the `ap-singapore-2` and `me-abudhabi-2` regions +- Support for additional parameters in list and delete operations in the File Storage service +- Support for host capacity planning to analyze disabled and deleted resources in the Operations Insights service +- Support for title and description updates in the Capacity Management service +- Support for listing parameters for migrations in the Database Migration service +- Support for Oracle exadata database service on exascale Infrastructure (ExaDB-XS) in the Database service + +### Fixed +Fixed endpoint templates for multiple service parameters + ## 2.73.0 - 2024-06-25 ### Added - Support for Demand Signal service diff --git a/THIRD_PARTY_LICENSES.txt b/THIRD_PARTY_LICENSES.txt index 8a40ca718c4..4041ae2f7e2 100644 --- a/THIRD_PARTY_LICENSES.txt +++ b/THIRD_PARTY_LICENSES.txt @@ -4,7 +4,6 @@ ------------------------------- Licenses ------------------------------- - Apache License 2.0 - BSD 3-Clause -- BSD 2-Clause - Common Development and Distribution License (CDDL) - Eclipse Distribution License 1.0 - Eclipse Public License 2.0 @@ -577,35 +576,6 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------- - ------------------------------ BSD 2-Clause ----------------------------- - -Redistribution and use in source and binary forms, with or without -modification,are permitted provided that the following conditions are -met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ------------------------------------------------------------------------ ---------- Common Development and Distribution License (CDDL) ---------- @@ -2317,90 +2287,7 @@ http://www.w3.org/Consortium/Legal/ ========================= Fourth Party Notices ========================= ------------------------------------------------------------------------- - --- FastDoubleParser - -This is a Java port of Daniel Lemire's fast_float project. -This project provides parsers for double, float, BigDecimal and BigInteger values. - -## Copyright - -Copyright © 2023 Werner Randelshofer, Switzerland. - -## Licensing - -This code is licensed under MIT License. - -Some portions of the code have been derived from other projects. -All these projects require that we include a copyright notice, and -some require that we also include some text of their license file. - -fast_double_parser, Copyright (c) 2022 Daniel Lemire. BSL License. - -fast_float, Copyright (c) 2021 The fast_float authors. MIT License. - -bigint, Copyright 2020 Tim Buktu. 2-clause BSD License. - -https://github.com/lemire/fast_double_parser - -Copyright (c) Daniel Lemire - -Copyright 2022 Tim Buktu - ---- -Boost Software License - Version 1.0 - August 17th, 2003 - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. ---- - -https://github.com/tbuktu/bigint/tree/floatfft - -The following files are licensed under a 2-clause BSD license: - - https://github.com/tbuktu/bigint/tree/floatfft/src/main/java/java/math/BigInteger.java.diff - https://github.com/tbuktu/bigint/tree/floatfft/src/main/java/java/math/MutableBigInteger.java.diff - https://github.com/tbuktu/bigint/tree/floatfft/src/main/java/java/math/BigDecimal.java.diff - https://github.com/tbuktu/bigint/tree/floatfft/src/main/java/MultBenchmark.java - https://github.com/tbuktu/bigint/tree/floatfft/src/main/java/DivBenchmark.java - https://github.com/tbuktu/bigint/tree/floatfft/src/test/java/BigIntegerTest.java.diff - https://github.com/tbuktu/bigint/tree/floatfft/src/test/java/BigIntegerTestOld.java - -The following files are licensed under the General Public License 2.0 (GPL v2): - - https://github.com/tbuktu/bigint/tree/floatfft/src/main/java/java/math/BigInteger.java - https://github.com/tbuktu/bigint/tree/floatfft/src/main/java/java/math/BigDecimal.java - https://github.com/tbuktu/bigint/tree/floatfft/src/main/java/java/math/MutableBigInteger.java - https://github.com/tbuktu/bigint/tree/floatfft/src/test/java/BigIntegerTest.java - -(We only use those portions of the bigint project that can be licensed -under 2-clause BSD License.) (The file 'thirdparty-LICENSE' is -included in the sources and classes Jar files that are released by -this project - as is required by that license.) - ------------------------------------------------------------------------- - --- commons-logging +commons-logging Apache Commons Logging Copyright 2003-2016 The Apache Software Foundation @@ -2410,7 +2297,7 @@ The Apache Software Foundation (http://www.apache.org/). ------------------------------------------------------------------------ --- jakarta.validation-api +jakarta.validation-api Notices for Eclipse Jakarta Bean Validation diff --git a/bmc-accessgovernancecp/pom.xml b/bmc-accessgovernancecp/pom.xml index 9ae4de6fd44..63bd0ac45f6 100644 --- a/bmc-accessgovernancecp/pom.xml +++ b/bmc-accessgovernancecp/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-accessgovernancecp @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-addons/bmc-apache-connector-provider/pom.xml b/bmc-addons/bmc-apache-connector-provider/pom.xml index 5d0745f661e..2ff007ff169 100644 --- a/bmc-addons/bmc-apache-connector-provider/pom.xml +++ b/bmc-addons/bmc-apache-connector-provider/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk-addons - 2.73.0 + 2.79.0 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-addons/bmc-graalvm-addon/pom.xml b/bmc-addons/bmc-graalvm-addon/pom.xml index ca0b7143776..87125dd478e 100644 --- a/bmc-addons/bmc-graalvm-addon/pom.xml +++ b/bmc-addons/bmc-graalvm-addon/pom.xml @@ -4,7 +4,7 @@ oci-java-sdk-addons com.oracle.oci.sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-addons-graalvm @@ -132,30 +132,24 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 com.oracle.oci.sdk oci-java-sdk-objectstorage-extensions - 2.73.0 + 2.79.0 test com.oracle.oci.sdk oci-java-sdk-identity - 2.73.0 - test - - - com.oracle.oci.sdk - oci-java-sdk-objectstorage-extensions - 2.73.0 + 2.79.0 test com.oracle.oci.sdk oci-java-sdk-core - 2.73.0 + 2.79.0 test diff --git a/bmc-addons/bmc-graalvm-addon/src/main/java/com/oracle/bmc/graalvm/SdkAutomaticFeatureMetadata.java b/bmc-addons/bmc-graalvm-addon/src/main/java/com/oracle/bmc/graalvm/SdkAutomaticFeatureMetadata.java index 6d8ee976db3..51ef3080865 100644 --- a/bmc-addons/bmc-graalvm-addon/src/main/java/com/oracle/bmc/graalvm/SdkAutomaticFeatureMetadata.java +++ b/bmc-addons/bmc-graalvm-addon/src/main/java/com/oracle/bmc/graalvm/SdkAutomaticFeatureMetadata.java @@ -51,6 +51,7 @@ "com.oracle.bmc.datalabelingservicedataplane.SdkClientsMetadata", "com.oracle.bmc.datasafe.SdkClientsMetadata", "com.oracle.bmc.datascience.SdkClientsMetadata", + "com.oracle.bmc.delegateaccesscontrol.SdkClientsMetadata", "com.oracle.bmc.demandsignal.SdkClientsMetadata", "com.oracle.bmc.desktops.SdkClientsMetadata", "com.oracle.bmc.devops.SdkClientsMetadata", @@ -62,10 +63,13 @@ "com.oracle.bmc.emwarehouse.SdkClientsMetadata", "com.oracle.bmc.events.SdkClientsMetadata", "com.oracle.bmc.filestorage.SdkClientsMetadata", + "com.oracle.bmc.fleetappsmanagement.SdkClientsMetadata", "com.oracle.bmc.fleetsoftwareupdate.SdkClientsMetadata", "com.oracle.bmc.functions.SdkClientsMetadata", "com.oracle.bmc.fusionapps.SdkClientsMetadata", "com.oracle.bmc.generativeai.SdkClientsMetadata", + "com.oracle.bmc.generativeaiagent.SdkClientsMetadata", + "com.oracle.bmc.generativeaiagentruntime.SdkClientsMetadata", "com.oracle.bmc.generativeaiinference.SdkClientsMetadata", "com.oracle.bmc.genericartifactscontent.SdkClientsMetadata", "com.oracle.bmc.globallydistributeddatabase.SdkClientsMetadata", @@ -126,6 +130,7 @@ "com.oracle.bmc.rover.SdkClientsMetadata", "com.oracle.bmc.sch.SdkClientsMetadata", "com.oracle.bmc.secrets.SdkClientsMetadata", + "com.oracle.bmc.securityattribute.SdkClientsMetadata", "com.oracle.bmc.servicecatalog.SdkClientsMetadata", "com.oracle.bmc.servicemanagerproxy.SdkClientsMetadata", "com.oracle.bmc.servicemesh.SdkClientsMetadata", @@ -143,6 +148,7 @@ "com.oracle.bmc.waa.SdkClientsMetadata", "com.oracle.bmc.waas.SdkClientsMetadata", "com.oracle.bmc.waf.SdkClientsMetadata", - "com.oracle.bmc.workrequests.SdkClientsMetadata" + "com.oracle.bmc.workrequests.SdkClientsMetadata", + "com.oracle.bmc.zpr.SdkClientsMetadata" }) final class SdkAutomaticFeatureMetadata {} diff --git a/bmc-addons/bmc-oke-workload-identity/pom.xml b/bmc-addons/bmc-oke-workload-identity/pom.xml index dc6d40013d8..5f09c73fc9e 100644 --- a/bmc-addons/bmc-oke-workload-identity/pom.xml +++ b/bmc-addons/bmc-oke-workload-identity/pom.xml @@ -4,7 +4,7 @@ oci-java-sdk-addons com.oracle.oci.sdk - 2.73.0 + 2.79.0 4.0.0 @@ -38,31 +38,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 - - - com.oracle.oci.sdk - oci-java-sdk-core - 2.73.0 - test - - - com.oracle.oci.sdk - oci-java-sdk-identity - 2.73.0 - test - - - com.oracle.oci.sdk - oci-java-sdk-keymanagement - 2.73.0 - test - - - io.specto - hoverfly-java - 0.11.1 - test + 2.79.0 diff --git a/bmc-addons/bmc-resteasy-client-configurator/pom.xml b/bmc-addons/bmc-resteasy-client-configurator/pom.xml index d11d2e2b795..09c9e3f3c9b 100644 --- a/bmc-addons/bmc-resteasy-client-configurator/pom.xml +++ b/bmc-addons/bmc-resteasy-client-configurator/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-addons - 2.73.0 + 2.79.0 ../pom.xml @@ -25,7 +25,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-addons/bmc-sasl/pom.xml b/bmc-addons/bmc-sasl/pom.xml index 29c5f3c4347..cf8e7ace579 100644 --- a/bmc-addons/bmc-sasl/pom.xml +++ b/bmc-addons/bmc-sasl/pom.xml @@ -7,7 +7,7 @@ oci-java-sdk-addons com.oracle.oci.sdk - 2.73.0 + 2.79.0 ../pom.xml @@ -57,12 +57,12 @@ com.google.protobuf protobuf-java - 3.19.6 + 3.25.5 com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-addons/pom.xml b/bmc-addons/pom.xml index 58915bbb406..d4dfda6dba7 100644 --- a/bmc-addons/pom.xml +++ b/bmc-addons/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml diff --git a/bmc-adm/pom.xml b/bmc-adm/pom.xml index 17c57b638a5..1262d802260 100644 --- a/bmc-adm/pom.xml +++ b/bmc-adm/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-adm @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-aianomalydetection/pom.xml b/bmc-aianomalydetection/pom.xml index b72ec9b837f..865e98ee4c3 100644 --- a/bmc-aianomalydetection/pom.xml +++ b/bmc-aianomalydetection/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-aianomalydetection @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-aidocument/pom.xml b/bmc-aidocument/pom.xml index 487c8dc0977..9b2ad628ec3 100644 --- a/bmc-aidocument/pom.xml +++ b/bmc-aidocument/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-aidocument @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/AIServiceDocument.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/AIServiceDocument.java index cce57b2abb9..c1fc1b44213 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/AIServiceDocument.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/AIServiceDocument.java @@ -59,6 +59,30 @@ public interface AIServiceDocument extends AutoCloseable { */ void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + /** + * Adds a lock to a resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use AddModelLock API. + */ + AddModelLockResponse addModelLock(AddModelLockRequest request); + + /** + * Adds a lock to a resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use AddProjectLock API. + */ + AddProjectLockResponse addProjectLock(AddProjectLockRequest request); + /** * Perform different types of document analysis. * @@ -311,6 +335,30 @@ ChangeProjectCompartmentResponse changeProjectCompartment( */ PatchModelResponse patchModel(PatchModelRequest request); + /** + * Remove a lock from a resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RemoveModelLock API. + */ + RemoveModelLockResponse removeModelLock(RemoveModelLockRequest request); + + /** + * Remove a lock from a resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RemoveProjectLock API. + */ + RemoveProjectLockResponse removeProjectLock(RemoveProjectLockRequest request); + /** * Updates the model metadata. * @param request The request object containing the details to send diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/AIServiceDocumentAsync.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/AIServiceDocumentAsync.java index a4d05508d83..e55439d760e 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/AIServiceDocumentAsync.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/AIServiceDocumentAsync.java @@ -58,6 +58,36 @@ public interface AIServiceDocumentAsync extends AutoCloseable { */ void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + /** + * Adds a lock to a resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future addModelLock( + AddModelLockRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Adds a lock to a resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future addProjectLock( + AddProjectLockRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Perform different types of document analysis. * @@ -370,6 +400,37 @@ java.util.concurrent.Future patchModel( PatchModelRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Remove a lock from a resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future removeModelLock( + RemoveModelLockRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Remove a lock from a resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future removeProjectLock( + RemoveProjectLockRequest request, + com.oracle.bmc.responses.AsyncHandler< + RemoveProjectLockRequest, RemoveProjectLockResponse> + handler); + /** * Updates the model metadata. * diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/AIServiceDocumentAsyncClient.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/AIServiceDocumentAsyncClient.java index f795e24fa82..b2e65393801 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/AIServiceDocumentAsyncClient.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/AIServiceDocumentAsyncClient.java @@ -459,6 +459,107 @@ public void close() { client.close(); } + @Override + public java.util.concurrent.Future addModelLock( + AddModelLockRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async addModelLock"); + final AddModelLockRequest interceptedRequest = + AddModelLockConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + AddModelLockConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceDocument", + "AddModelLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/document-understanding/20221109/Model/AddModelLock"); + final java.util.function.Function + transformer = + AddModelLockConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + AddModelLockRequest, AddModelLockResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getAddModelLockDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + AddModelLockRequest, AddModelLockResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future addProjectLock( + AddProjectLockRequest request, + final com.oracle.bmc.responses.AsyncHandler< + AddProjectLockRequest, AddProjectLockResponse> + handler) { + LOG.trace("Called async addProjectLock"); + final AddProjectLockRequest interceptedRequest = + AddProjectLockConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + AddProjectLockConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceDocument", + "AddProjectLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/document-understanding/20221109/Project/AddProjectLock"); + final java.util.function.Function + transformer = + AddProjectLockConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + AddProjectLockRequest, AddProjectLockResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getAddProjectLockDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + AddProjectLockRequest, AddProjectLockResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future analyzeDocument( AnalyzeDocumentRequest request, @@ -1391,6 +1492,110 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future removeModelLock( + RemoveModelLockRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RemoveModelLockRequest, RemoveModelLockResponse> + handler) { + LOG.trace("Called async removeModelLock"); + final RemoveModelLockRequest interceptedRequest = + RemoveModelLockConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RemoveModelLockConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceDocument", + "RemoveModelLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/document-understanding/20221109/Model/RemoveModelLock"); + final java.util.function.Function + transformer = + RemoveModelLockConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RemoveModelLockRequest, RemoveModelLockResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRemoveModelLockDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RemoveModelLockRequest, RemoveModelLockResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future removeProjectLock( + RemoveProjectLockRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RemoveProjectLockRequest, RemoveProjectLockResponse> + handler) { + LOG.trace("Called async removeProjectLock"); + final RemoveProjectLockRequest interceptedRequest = + RemoveProjectLockConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RemoveProjectLockConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceDocument", + "RemoveProjectLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/document-understanding/20221109/Project/RemoveProjectLock"); + final java.util.function.Function + transformer = + RemoveProjectLockConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RemoveProjectLockRequest, RemoveProjectLockResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRemoveProjectLockDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RemoveProjectLockRequest, RemoveProjectLockResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateModel( UpdateModelRequest request, diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/AIServiceDocumentClient.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/AIServiceDocumentClient.java index 4f4a8c6a56a..278306c65c4 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/AIServiceDocumentClient.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/AIServiceDocumentClient.java @@ -548,6 +548,86 @@ public void close() { client.close(); } + @Override + public AddModelLockResponse addModelLock(AddModelLockRequest request) { + LOG.trace("Called addModelLock"); + final AddModelLockRequest interceptedRequest = + AddModelLockConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + AddModelLockConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceDocument", + "AddModelLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/document-understanding/20221109/Model/AddModelLock"); + java.util.function.Function transformer = + AddModelLockConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getAddModelLockDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public AddProjectLockResponse addProjectLock(AddProjectLockRequest request) { + LOG.trace("Called addProjectLock"); + final AddProjectLockRequest interceptedRequest = + AddProjectLockConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + AddProjectLockConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceDocument", + "AddProjectLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/document-understanding/20221109/Project/AddProjectLock"); + java.util.function.Function transformer = + AddProjectLockConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getAddProjectLockDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public AnalyzeDocumentResponse analyzeDocument(AnalyzeDocumentRequest request) { LOG.trace("Called analyzeDocument"); @@ -1296,6 +1376,90 @@ public PatchModelResponse patchModel(PatchModelRequest request) { }); } + @Override + public RemoveModelLockResponse removeModelLock(RemoveModelLockRequest request) { + LOG.trace("Called removeModelLock"); + final RemoveModelLockRequest interceptedRequest = + RemoveModelLockConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RemoveModelLockConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceDocument", + "RemoveModelLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/document-understanding/20221109/Model/RemoveModelLock"); + java.util.function.Function + transformer = + RemoveModelLockConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getRemoveModelLockDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public RemoveProjectLockResponse removeProjectLock(RemoveProjectLockRequest request) { + LOG.trace("Called removeProjectLock"); + final RemoveProjectLockRequest interceptedRequest = + RemoveProjectLockConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RemoveProjectLockConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceDocument", + "RemoveProjectLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/document-understanding/20221109/Project/RemoveProjectLock"); + java.util.function.Function + transformer = + RemoveProjectLockConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getRemoveProjectLockDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateModelResponse updateModel(UpdateModelRequest request) { LOG.trace("Called updateModel"); diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/AddModelLockConverter.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/AddModelLockConverter.java new file mode 100644 index 00000000000..72342a42d2a --- /dev/null +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/AddModelLockConverter.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aidocument.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.aidocument.model.*; +import com.oracle.bmc.aidocument.requests.*; +import com.oracle.bmc.aidocument.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20221109") +public class AddModelLockConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(AddModelLockConverter.class); + + public static com.oracle.bmc.aidocument.requests.AddModelLockRequest interceptRequest( + com.oracle.bmc.aidocument.requests.AddModelLockRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.aidocument.requests.AddModelLockRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getModelId(), "modelId must not be blank"); + Validate.notNull(request.getAddModelLockDetails(), "addModelLockDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20221109") + .path("models") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getModelId())) + .path("actions") + .path("addLock"); + + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aidocument.responses.AddModelLockResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aidocument.responses.AddModelLockResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aidocument.responses.AddModelLockResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aidocument.responses.AddModelLockResponse>() { + @Override + public com.oracle.bmc.aidocument.responses.AddModelLockResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.aidocument.responses.AddModelLockResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.aidocument.model.Model>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.aidocument.model.Model.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.aidocument.model.Model.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.aidocument.model.Model> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.aidocument.responses.AddModelLockResponse.Builder + builder = + com.oracle.bmc.aidocument.responses + .AddModelLockResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.model(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.aidocument.responses.AddModelLockResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/AddProjectLockConverter.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/AddProjectLockConverter.java new file mode 100644 index 00000000000..09f7c60df52 --- /dev/null +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/AddProjectLockConverter.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aidocument.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.aidocument.model.*; +import com.oracle.bmc.aidocument.requests.*; +import com.oracle.bmc.aidocument.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20221109") +public class AddProjectLockConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(AddProjectLockConverter.class); + + public static com.oracle.bmc.aidocument.requests.AddProjectLockRequest interceptRequest( + com.oracle.bmc.aidocument.requests.AddProjectLockRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.aidocument.requests.AddProjectLockRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getProjectId(), "projectId must not be blank"); + Validate.notNull(request.getAddProjectLockDetails(), "addProjectLockDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20221109") + .path("projects") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getProjectId())) + .path("actions") + .path("addLock"); + + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aidocument.responses.AddProjectLockResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aidocument.responses.AddProjectLockResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aidocument.responses.AddProjectLockResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aidocument.responses.AddProjectLockResponse>() { + @Override + public com.oracle.bmc.aidocument.responses.AddProjectLockResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.aidocument.responses.AddProjectLockResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.aidocument.model.Project>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.aidocument.model.Project.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.aidocument.model.Project.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.aidocument.model.Project> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.aidocument.responses.AddProjectLockResponse.Builder + builder = + com.oracle.bmc.aidocument.responses + .AddProjectLockResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.project(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.aidocument.responses.AddProjectLockResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/ChangeModelCompartmentConverter.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/ChangeModelCompartmentConverter.java index 384f432557b..a31fa7d6b31 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/ChangeModelCompartmentConverter.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/ChangeModelCompartmentConverter.java @@ -44,6 +44,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( .path("actions") .path("changeCompartment"); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/ChangeProjectCompartmentConverter.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/ChangeProjectCompartmentConverter.java index d38c9a79d6b..2f6ff6a3698 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/ChangeProjectCompartmentConverter.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/ChangeProjectCompartmentConverter.java @@ -45,6 +45,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( .path("actions") .path("changeCompartment"); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/DeleteModelConverter.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/DeleteModelConverter.java index 8122b611f60..e5e6904047b 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/DeleteModelConverter.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/DeleteModelConverter.java @@ -39,6 +39,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getModelId())); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/DeleteProjectConverter.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/DeleteProjectConverter.java index 54c6ae64d5c..0573bd3f950 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/DeleteProjectConverter.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/DeleteProjectConverter.java @@ -39,6 +39,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getProjectId())); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/RemoveModelLockConverter.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/RemoveModelLockConverter.java new file mode 100644 index 00000000000..5f8e24b0b78 --- /dev/null +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/RemoveModelLockConverter.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aidocument.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.aidocument.model.*; +import com.oracle.bmc.aidocument.requests.*; +import com.oracle.bmc.aidocument.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20221109") +public class RemoveModelLockConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RemoveModelLockConverter.class); + + public static com.oracle.bmc.aidocument.requests.RemoveModelLockRequest interceptRequest( + com.oracle.bmc.aidocument.requests.RemoveModelLockRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.aidocument.requests.RemoveModelLockRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getModelId(), "modelId must not be blank"); + Validate.notNull(request.getRemoveModelLockDetails(), "removeModelLockDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20221109") + .path("models") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getModelId())) + .path("actions") + .path("removeLock"); + + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aidocument.responses.RemoveModelLockResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aidocument.responses.RemoveModelLockResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aidocument.responses.RemoveModelLockResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aidocument.responses.RemoveModelLockResponse>() { + @Override + public com.oracle.bmc.aidocument.responses.RemoveModelLockResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.aidocument.responses.RemoveModelLockResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.aidocument.model.Model>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.aidocument.model.Model.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.aidocument.model.Model.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.aidocument.model.Model> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.aidocument.responses.RemoveModelLockResponse.Builder + builder = + com.oracle.bmc.aidocument.responses + .RemoveModelLockResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.model(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.aidocument.responses.RemoveModelLockResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/RemoveProjectLockConverter.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/RemoveProjectLockConverter.java new file mode 100644 index 00000000000..d4eb090ca0b --- /dev/null +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/RemoveProjectLockConverter.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aidocument.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.aidocument.model.*; +import com.oracle.bmc.aidocument.requests.*; +import com.oracle.bmc.aidocument.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20221109") +public class RemoveProjectLockConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RemoveProjectLockConverter.class); + + public static com.oracle.bmc.aidocument.requests.RemoveProjectLockRequest interceptRequest( + com.oracle.bmc.aidocument.requests.RemoveProjectLockRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.aidocument.requests.RemoveProjectLockRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getProjectId(), "projectId must not be blank"); + Validate.notNull( + request.getRemoveProjectLockDetails(), "removeProjectLockDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20221109") + .path("projects") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getProjectId())) + .path("actions") + .path("removeLock"); + + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aidocument.responses.RemoveProjectLockResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aidocument.responses.RemoveProjectLockResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aidocument.responses.RemoveProjectLockResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aidocument.responses.RemoveProjectLockResponse>() { + @Override + public com.oracle.bmc.aidocument.responses.RemoveProjectLockResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.aidocument.responses.RemoveProjectLockResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.aidocument.model.Project>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.aidocument.model.Project.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.aidocument.model.Project.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.aidocument.model.Project> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.aidocument.responses.RemoveProjectLockResponse + .Builder + builder = + com.oracle.bmc.aidocument.responses + .RemoveProjectLockResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.project(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.aidocument.responses.RemoveProjectLockResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/UpdateModelConverter.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/UpdateModelConverter.java index c902fa1da64..ffeb77c20c7 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/UpdateModelConverter.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/UpdateModelConverter.java @@ -40,6 +40,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getModelId())); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/UpdateProjectConverter.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/UpdateProjectConverter.java index e1c8f7add09..ca8966fc9c2 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/UpdateProjectConverter.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/internal/http/UpdateProjectConverter.java @@ -40,6 +40,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getProjectId())); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/AddModelLockDetails.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/AddModelLockDetails.java new file mode 100644 index 00000000000..934939d2f7e --- /dev/null +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/AddModelLockDetails.java @@ -0,0 +1,247 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aidocument.model; + +/** + * Request payload to add lock to the resource. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20221109") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AddModelLockDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AddModelLockDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"type", "relatedResourceId", "message"}) + public AddModelLockDetails(Type type, String relatedResourceId, String message) { + super(); + this.type = type; + this.relatedResourceId = relatedResourceId; + this.message = message; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Type of the lock. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * Type of the lock. + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("relatedResourceId") + private String relatedResourceId; + + /** + * The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * @param relatedResourceId the value to set + * @return this builder + **/ + public Builder relatedResourceId(String relatedResourceId) { + this.relatedResourceId = relatedResourceId; + this.__explicitlySet__.add("relatedResourceId"); + return this; + } + /** + * A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * @param message the value to set + * @return this builder + **/ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AddModelLockDetails build() { + AddModelLockDetails model = + new AddModelLockDetails(this.type, this.relatedResourceId, this.message); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AddModelLockDetails model) { + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("relatedResourceId")) { + this.relatedResourceId(model.getRelatedResourceId()); + } + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Type of the lock. + **/ + public enum Type { + Full("FULL"), + Delete("DELETE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + map.put(v.getValue(), v); + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Type: " + key); + } + }; + /** + * Type of the lock. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * Type of the lock. + * @return the value + **/ + public Type getType() { + return type; + } + + /** + * The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("relatedResourceId") + private final String relatedResourceId; + + /** + * The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * @return the value + **/ + public String getRelatedResourceId() { + return relatedResourceId; + } + + /** + * A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * @return the value + **/ + public String getMessage() { + return message; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AddModelLockDetails("); + sb.append("super=").append(super.toString()); + sb.append("type=").append(String.valueOf(this.type)); + sb.append(", relatedResourceId=").append(String.valueOf(this.relatedResourceId)); + sb.append(", message=").append(String.valueOf(this.message)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddModelLockDetails)) { + return false; + } + + AddModelLockDetails other = (AddModelLockDetails) o; + return java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.relatedResourceId, other.relatedResourceId) + && java.util.Objects.equals(this.message, other.message) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.relatedResourceId == null ? 43 : this.relatedResourceId.hashCode()); + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/AddProjectLockDetails.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/AddProjectLockDetails.java new file mode 100644 index 00000000000..0c4a53e2385 --- /dev/null +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/AddProjectLockDetails.java @@ -0,0 +1,248 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aidocument.model; + +/** + * Request payload to add lock to the resource. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20221109") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AddProjectLockDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AddProjectLockDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"type", "relatedResourceId", "message"}) + public AddProjectLockDetails(Type type, String relatedResourceId, String message) { + super(); + this.type = type; + this.relatedResourceId = relatedResourceId; + this.message = message; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Type of the lock. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * Type of the lock. + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("relatedResourceId") + private String relatedResourceId; + + /** + * The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * @param relatedResourceId the value to set + * @return this builder + **/ + public Builder relatedResourceId(String relatedResourceId) { + this.relatedResourceId = relatedResourceId; + this.__explicitlySet__.add("relatedResourceId"); + return this; + } + /** + * A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * @param message the value to set + * @return this builder + **/ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AddProjectLockDetails build() { + AddProjectLockDetails model = + new AddProjectLockDetails(this.type, this.relatedResourceId, this.message); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AddProjectLockDetails model) { + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("relatedResourceId")) { + this.relatedResourceId(model.getRelatedResourceId()); + } + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Type of the lock. + **/ + public enum Type { + Full("FULL"), + Delete("DELETE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + map.put(v.getValue(), v); + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Type: " + key); + } + }; + /** + * Type of the lock. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * Type of the lock. + * @return the value + **/ + public Type getType() { + return type; + } + + /** + * The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("relatedResourceId") + private final String relatedResourceId; + + /** + * The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * @return the value + **/ + public String getRelatedResourceId() { + return relatedResourceId; + } + + /** + * A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * @return the value + **/ + public String getMessage() { + return message; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AddProjectLockDetails("); + sb.append("super=").append(super.toString()); + sb.append("type=").append(String.valueOf(this.type)); + sb.append(", relatedResourceId=").append(String.valueOf(this.relatedResourceId)); + sb.append(", message=").append(String.valueOf(this.message)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddProjectLockDetails)) { + return false; + } + + AddProjectLockDetails other = (AddProjectLockDetails) o; + return java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.relatedResourceId, other.relatedResourceId) + && java.util.Objects.equals(this.message, other.message) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.relatedResourceId == null ? 43 : this.relatedResourceId.hashCode()); + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/DetectedDocumentType.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/DetectedDocumentType.java index 4e5f106df0d..feed0bba18e 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/DetectedDocumentType.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/DetectedDocumentType.java @@ -21,11 +21,10 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class DetectedDocumentType extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"documentType", "documentId", "confidence"}) - public DetectedDocumentType(String documentType, String documentId, Float confidence) { + @java.beans.ConstructorProperties({"documentType", "confidence"}) + public DetectedDocumentType(String documentType, Float confidence) { super(); this.documentType = documentType; - this.documentId = documentId; this.confidence = confidence; } @@ -47,22 +46,6 @@ public Builder documentType(String documentType) { this.__explicitlySet__.add("documentType"); return this; } - /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Key-Value Extraction model that was used to extract the key-value pairs. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("documentId") - private String documentId; - - /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Key-Value Extraction model that was used to extract the key-value pairs. - * @param documentId the value to set - * @return this builder - **/ - public Builder documentId(String documentId) { - this.documentId = documentId; - this.__explicitlySet__.add("documentId"); - return this; - } /** * The confidence score between 0 and 1. **/ @@ -85,7 +68,7 @@ public Builder confidence(Float confidence) { public DetectedDocumentType build() { DetectedDocumentType model = - new DetectedDocumentType(this.documentType, this.documentId, this.confidence); + new DetectedDocumentType(this.documentType, this.confidence); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -97,9 +80,6 @@ public Builder copy(DetectedDocumentType model) { if (model.wasPropertyExplicitlySet("documentType")) { this.documentType(model.getDocumentType()); } - if (model.wasPropertyExplicitlySet("documentId")) { - this.documentId(model.getDocumentId()); - } if (model.wasPropertyExplicitlySet("confidence")) { this.confidence(model.getConfidence()); } @@ -132,20 +112,6 @@ public String getDocumentType() { return documentType; } - /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Key-Value Extraction model that was used to extract the key-value pairs. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("documentId") - private final String documentId; - - /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Key-Value Extraction model that was used to extract the key-value pairs. - * @return the value - **/ - public String getDocumentId() { - return documentId; - } - /** * The confidence score between 0 and 1. **/ @@ -175,7 +141,6 @@ public String toString(boolean includeByteArrayContents) { sb.append("DetectedDocumentType("); sb.append("super=").append(super.toString()); sb.append("documentType=").append(String.valueOf(this.documentType)); - sb.append(", documentId=").append(String.valueOf(this.documentId)); sb.append(", confidence=").append(String.valueOf(this.confidence)); sb.append(")"); return sb.toString(); @@ -192,7 +157,6 @@ public boolean equals(Object o) { DetectedDocumentType other = (DetectedDocumentType) o; return java.util.Objects.equals(this.documentType, other.documentType) - && java.util.Objects.equals(this.documentId, other.documentId) && java.util.Objects.equals(this.confidence, other.confidence) && super.equals(other); } @@ -202,7 +166,6 @@ public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.documentType == null ? 43 : this.documentType.hashCode()); - result = (result * PRIME) + (this.documentId == null ? 43 : this.documentId.hashCode()); result = (result * PRIME) + (this.confidence == null ? 43 : this.confidence.hashCode()); result = (result * PRIME) + super.hashCode(); return result; diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/DocumentClassificationFeature.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/DocumentClassificationFeature.java index db6ff2856a8..d7e932be601 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/DocumentClassificationFeature.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/DocumentClassificationFeature.java @@ -59,30 +59,13 @@ public Builder modelId(String modelId) { this.__explicitlySet__.add("modelId"); return this; } - /** - * The custom model tenancy ID when modelId represents aliasName. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") - private String tenancyId; - - /** - * The custom model tenancy ID when modelId represents aliasName. - * @param tenancyId the value to set - * @return this builder - **/ - public Builder tenancyId(String tenancyId) { - this.tenancyId = tenancyId; - this.__explicitlySet__.add("tenancyId"); - return this; - } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public DocumentClassificationFeature build() { DocumentClassificationFeature model = - new DocumentClassificationFeature( - this.maxResults, this.modelId, this.tenancyId); + new DocumentClassificationFeature(this.maxResults, this.modelId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -97,9 +80,6 @@ public Builder copy(DocumentClassificationFeature model) { if (model.wasPropertyExplicitlySet("modelId")) { this.modelId(model.getModelId()); } - if (model.wasPropertyExplicitlySet("tenancyId")) { - this.tenancyId(model.getTenancyId()); - } return this; } } @@ -116,11 +96,10 @@ public Builder toBuilder() { } @Deprecated - public DocumentClassificationFeature(Integer maxResults, String modelId, String tenancyId) { + public DocumentClassificationFeature(Integer maxResults, String modelId) { super(); this.maxResults = maxResults; this.modelId = modelId; - this.tenancyId = tenancyId; } /** @@ -151,20 +130,6 @@ public String getModelId() { return modelId; } - /** - * The custom model tenancy ID when modelId represents aliasName. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") - private final String tenancyId; - - /** - * The custom model tenancy ID when modelId represents aliasName. - * @return the value - **/ - public String getTenancyId() { - return tenancyId; - } - @Override public String toString() { return this.toString(true); @@ -181,7 +146,6 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", maxResults=").append(String.valueOf(this.maxResults)); sb.append(", modelId=").append(String.valueOf(this.modelId)); - sb.append(", tenancyId=").append(String.valueOf(this.tenancyId)); sb.append(")"); return sb.toString(); } @@ -198,7 +162,6 @@ public boolean equals(Object o) { DocumentClassificationFeature other = (DocumentClassificationFeature) o; return java.util.Objects.equals(this.maxResults, other.maxResults) && java.util.Objects.equals(this.modelId, other.modelId) - && java.util.Objects.equals(this.tenancyId, other.tenancyId) && super.equals(other); } @@ -208,7 +171,6 @@ public int hashCode() { int result = super.hashCode(); result = (result * PRIME) + (this.maxResults == null ? 43 : this.maxResults.hashCode()); result = (result * PRIME) + (this.modelId == null ? 43 : this.modelId.hashCode()); - result = (result * PRIME) + (this.tenancyId == null ? 43 : this.tenancyId.hashCode()); return result; } } diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/DocumentKeyValueExtractionFeature.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/DocumentKeyValueExtractionFeature.java index 31ec6024ca6..0bd4ef90fb3 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/DocumentKeyValueExtractionFeature.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/DocumentKeyValueExtractionFeature.java @@ -43,29 +43,13 @@ public Builder modelId(String modelId) { this.__explicitlySet__.add("modelId"); return this; } - /** - * The custom model tenancy ID when modelId represents aliasName. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") - private String tenancyId; - - /** - * The custom model tenancy ID when modelId represents aliasName. - * @param tenancyId the value to set - * @return this builder - **/ - public Builder tenancyId(String tenancyId) { - this.tenancyId = tenancyId; - this.__explicitlySet__.add("tenancyId"); - return this; - } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public DocumentKeyValueExtractionFeature build() { DocumentKeyValueExtractionFeature model = - new DocumentKeyValueExtractionFeature(this.modelId, this.tenancyId); + new DocumentKeyValueExtractionFeature(this.modelId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -77,9 +61,6 @@ public Builder copy(DocumentKeyValueExtractionFeature model) { if (model.wasPropertyExplicitlySet("modelId")) { this.modelId(model.getModelId()); } - if (model.wasPropertyExplicitlySet("tenancyId")) { - this.tenancyId(model.getTenancyId()); - } return this; } } @@ -96,10 +77,9 @@ public Builder toBuilder() { } @Deprecated - public DocumentKeyValueExtractionFeature(String modelId, String tenancyId) { + public DocumentKeyValueExtractionFeature(String modelId) { super(); this.modelId = modelId; - this.tenancyId = tenancyId; } /** @@ -116,20 +96,6 @@ public String getModelId() { return modelId; } - /** - * The custom model tenancy ID when modelId represents aliasName. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") - private final String tenancyId; - - /** - * The custom model tenancy ID when modelId represents aliasName. - * @return the value - **/ - public String getTenancyId() { - return tenancyId; - } - @Override public String toString() { return this.toString(true); @@ -145,7 +111,6 @@ public String toString(boolean includeByteArrayContents) { sb.append("DocumentKeyValueExtractionFeature("); sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", modelId=").append(String.valueOf(this.modelId)); - sb.append(", tenancyId=").append(String.valueOf(this.tenancyId)); sb.append(")"); return sb.toString(); } @@ -160,9 +125,7 @@ public boolean equals(Object o) { } DocumentKeyValueExtractionFeature other = (DocumentKeyValueExtractionFeature) o; - return java.util.Objects.equals(this.modelId, other.modelId) - && java.util.Objects.equals(this.tenancyId, other.tenancyId) - && super.equals(other); + return java.util.Objects.equals(this.modelId, other.modelId) && super.equals(other); } @Override @@ -170,7 +133,6 @@ public int hashCode() { final int PRIME = 59; int result = super.hashCode(); result = (result * PRIME) + (this.modelId == null ? 43 : this.modelId.hashCode()); - result = (result * PRIME) + (this.tenancyId == null ? 43 : this.tenancyId.hashCode()); return result; } } diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/DocumentType.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/DocumentType.java index 0db817f4b03..f98c3d24af2 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/DocumentType.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/DocumentType.java @@ -19,7 +19,7 @@ public enum DocumentType { Check("CHECK"), Payslip("PAYSLIP"), Others("OTHERS"), - InsuranceClaim("INSURANCE_CLAIM"), + HealthInsuranceId("HEALTH_INSURANCE_ID"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/Model.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/Model.java index b1b9d101223..a094482b0fe 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/Model.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/Model.java @@ -45,7 +45,8 @@ public final class Model extends com.oracle.bmc.http.internal.ExplicitlySetBmcMo "metrics", "freeformTags", "definedTags", - "systemTags" + "systemTags", + "locks" }) public Model( String id, @@ -73,7 +74,8 @@ public Model( ModelMetrics metrics, java.util.Map freeformTags, java.util.Map> definedTags, - java.util.Map> systemTags) { + java.util.Map> systemTags, + java.util.List locks) { super(); this.id = id; this.displayName = displayName; @@ -101,6 +103,7 @@ public Model( this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; + this.locks = locks; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -506,6 +509,22 @@ public Builder systemTags(java.util.Map> s this.__explicitlySet__.add("systemTags"); return this; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -538,7 +557,8 @@ public Model build() { this.metrics, this.freeformTags, this.definedTags, - this.systemTags); + this.systemTags, + this.locks); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -625,6 +645,9 @@ public Builder copy(Model model) { if (model.wasPropertyExplicitlySet("systemTags")) { this.systemTags(model.getSystemTags()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } return this; } } @@ -1088,6 +1111,20 @@ public java.util.Map> getSystemTags() { return systemTags; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + @Override public String toString() { return this.toString(true); @@ -1128,6 +1165,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(")"); return sb.toString(); } @@ -1169,6 +1207,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.locks, other.locks) && super.equals(other); } @@ -1226,6 +1265,7 @@ public int hashCode() { result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/ModelSummary.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/ModelSummary.java index 0c7e02249d2..a6fd772de3a 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/ModelSummary.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/ModelSummary.java @@ -41,7 +41,8 @@ public final class ModelSummary extends com.oracle.bmc.http.internal.ExplicitlyS "isComposedModel", "freeformTags", "definedTags", - "systemTags" + "systemTags", + "locks" }) public ModelSummary( String id, @@ -65,7 +66,8 @@ public ModelSummary( Boolean isComposedModel, java.util.Map freeformTags, java.util.Map> definedTags, - java.util.Map> systemTags) { + java.util.Map> systemTags, + java.util.List locks) { super(); this.id = id; this.displayName = displayName; @@ -89,6 +91,7 @@ public ModelSummary( this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; + this.locks = locks; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -437,6 +440,22 @@ public Builder systemTags(java.util.Map> s this.__explicitlySet__.add("systemTags"); return this; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -465,7 +484,8 @@ public ModelSummary build() { this.isComposedModel, this.freeformTags, this.definedTags, - this.systemTags); + this.systemTags, + this.locks); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -540,6 +560,9 @@ public Builder copy(ModelSummary model) { if (model.wasPropertyExplicitlySet("systemTags")) { this.systemTags(model.getSystemTags()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } return this; } } @@ -854,6 +877,20 @@ public java.util.Map> getSystemTags() { return systemTags; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + @Override public String toString() { return this.toString(true); @@ -890,6 +927,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(")"); return sb.toString(); } @@ -926,6 +964,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.locks, other.locks) && super.equals(other); } @@ -971,6 +1010,7 @@ public int hashCode() { result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/OutputLocation.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/OutputLocation.java index 00506173f14..9b269f26a10 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/OutputLocation.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/OutputLocation.java @@ -5,7 +5,7 @@ package com.oracle.bmc.aidocument.model; /** - * The object storage location where to store analysis results. + * The Object Storage Location. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/Project.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/Project.java index b1e59a4f25b..1bc03ee3ecd 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/Project.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/Project.java @@ -30,7 +30,8 @@ public final class Project extends com.oracle.bmc.http.internal.ExplicitlySetBmc "lifecycleDetails", "freeformTags", "definedTags", - "systemTags" + "systemTags", + "locks" }) public Project( String id, @@ -43,7 +44,8 @@ public Project( String lifecycleDetails, java.util.Map freeformTags, java.util.Map> definedTags, - java.util.Map> systemTags) { + java.util.Map> systemTags, + java.util.List locks) { super(); this.id = id; this.displayName = displayName; @@ -56,6 +58,7 @@ public Project( this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; + this.locks = locks; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -249,6 +252,22 @@ public Builder systemTags(java.util.Map> s this.__explicitlySet__.add("systemTags"); return this; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -266,7 +285,8 @@ public Project build() { this.lifecycleDetails, this.freeformTags, this.definedTags, - this.systemTags); + this.systemTags, + this.locks); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -308,6 +328,9 @@ public Builder copy(Project model) { if (model.wasPropertyExplicitlySet("systemTags")) { this.systemTags(model.getSystemTags()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } return this; } } @@ -541,6 +564,20 @@ public java.util.Map> getSystemTags() { return systemTags; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + @Override public String toString() { return this.toString(true); @@ -566,6 +603,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(")"); return sb.toString(); } @@ -591,6 +629,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.locks, other.locks) && super.equals(other); } @@ -615,6 +654,7 @@ public int hashCode() { result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/RemoveModelLockDetails.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/RemoveModelLockDetails.java new file mode 100644 index 00000000000..7e68fd320c4 --- /dev/null +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/RemoveModelLockDetails.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aidocument.model; + +/** + * Request payload to remove lock to the resource. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20221109") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RemoveModelLockDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RemoveModelLockDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"type"}) + public RemoveModelLockDetails(Type type) { + super(); + this.type = type; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Type of the lock. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * Type of the lock. + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RemoveModelLockDetails build() { + RemoveModelLockDetails model = new RemoveModelLockDetails(this.type); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RemoveModelLockDetails model) { + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Type of the lock. + **/ + public enum Type { + Full("FULL"), + Delete("DELETE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + map.put(v.getValue(), v); + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Type: " + key); + } + }; + /** + * Type of the lock. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * Type of the lock. + * @return the value + **/ + public Type getType() { + return type; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RemoveModelLockDetails("); + sb.append("super=").append(super.toString()); + sb.append("type=").append(String.valueOf(this.type)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveModelLockDetails)) { + return false; + } + + RemoveModelLockDetails other = (RemoveModelLockDetails) o; + return java.util.Objects.equals(this.type, other.type) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/RemoveProjectLockDetails.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/RemoveProjectLockDetails.java new file mode 100644 index 00000000000..bc5c5a0e40f --- /dev/null +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/RemoveProjectLockDetails.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aidocument.model; + +/** + * Request payload to remove lock to the resource. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20221109") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RemoveProjectLockDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RemoveProjectLockDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"type"}) + public RemoveProjectLockDetails(Type type) { + super(); + this.type = type; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Type of the lock. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * Type of the lock. + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RemoveProjectLockDetails build() { + RemoveProjectLockDetails model = new RemoveProjectLockDetails(this.type); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RemoveProjectLockDetails model) { + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Type of the lock. + **/ + public enum Type { + Full("FULL"), + Delete("DELETE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + map.put(v.getValue(), v); + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Type: " + key); + } + }; + /** + * Type of the lock. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * Type of the lock. + * @return the value + **/ + public Type getType() { + return type; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RemoveProjectLockDetails("); + sb.append("super=").append(super.toString()); + sb.append("type=").append(String.valueOf(this.type)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveProjectLockDetails)) { + return false; + } + + RemoveProjectLockDetails other = (RemoveProjectLockDetails) o; + return java.util.Objects.equals(this.type, other.type) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/ResourceLock.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/ResourceLock.java new file mode 100644 index 00000000000..f6a94b5952e --- /dev/null +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/model/ResourceLock.java @@ -0,0 +1,363 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aidocument.model; + +/** + * Resource locks prevent certain APIs from being called for the resource. + * A full lock prevents both updating and deleting the resource. A lock delete + * prevents deleting the resource. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20221109") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ResourceLock.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ResourceLock extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "type", + "compartmentId", + "relatedResourceId", + "message", + "timeCreated" + }) + public ResourceLock( + Type type, + String compartmentId, + String relatedResourceId, + String message, + java.util.Date timeCreated) { + super(); + this.type = type; + this.compartmentId = compartmentId; + this.relatedResourceId = relatedResourceId; + this.message = message; + this.timeCreated = timeCreated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Lock type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * Lock type. + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * The lock compartment ID. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The lock compartment ID. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The resource ID that is locking this resource. Indicates that deleting this resource removes the lock. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("relatedResourceId") + private String relatedResourceId; + + /** + * The resource ID that is locking this resource. Indicates that deleting this resource removes the lock. + * + * @param relatedResourceId the value to set + * @return this builder + **/ + public Builder relatedResourceId(String relatedResourceId) { + this.relatedResourceId = relatedResourceId; + this.__explicitlySet__.add("relatedResourceId"); + return this; + } + /** + * A message added by the lock creator. The message typically gives an + * indication of why the resource is locked. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * A message added by the lock creator. The message typically gives an + * indication of why the resource is locked. + * + * @param message the value to set + * @return this builder + **/ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + /** + * Indicates when the lock was created, in the format defined by RFC 3339. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Indicates when the lock was created, in the format defined by RFC 3339. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ResourceLock build() { + ResourceLock model = + new ResourceLock( + this.type, + this.compartmentId, + this.relatedResourceId, + this.message, + this.timeCreated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ResourceLock model) { + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("relatedResourceId")) { + this.relatedResourceId(model.getRelatedResourceId()); + } + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Lock type. + **/ + public enum Type { + Full("FULL"), + Delete("DELETE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * Lock type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * Lock type. + * @return the value + **/ + public Type getType() { + return type; + } + + /** + * The lock compartment ID. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The lock compartment ID. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The resource ID that is locking this resource. Indicates that deleting this resource removes the lock. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("relatedResourceId") + private final String relatedResourceId; + + /** + * The resource ID that is locking this resource. Indicates that deleting this resource removes the lock. + * + * @return the value + **/ + public String getRelatedResourceId() { + return relatedResourceId; + } + + /** + * A message added by the lock creator. The message typically gives an + * indication of why the resource is locked. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * A message added by the lock creator. The message typically gives an + * indication of why the resource is locked. + * + * @return the value + **/ + public String getMessage() { + return message; + } + + /** + * Indicates when the lock was created, in the format defined by RFC 3339. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Indicates when the lock was created, in the format defined by RFC 3339. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ResourceLock("); + sb.append("super=").append(super.toString()); + sb.append("type=").append(String.valueOf(this.type)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", relatedResourceId=").append(String.valueOf(this.relatedResourceId)); + sb.append(", message=").append(String.valueOf(this.message)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ResourceLock)) { + return false; + } + + ResourceLock other = (ResourceLock) o; + return java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.relatedResourceId, other.relatedResourceId) + && java.util.Objects.equals(this.message, other.message) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.relatedResourceId == null ? 43 : this.relatedResourceId.hashCode()); + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/AddModelLockRequest.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/AddModelLockRequest.java new file mode 100644 index 00000000000..9a0c8893017 --- /dev/null +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/AddModelLockRequest.java @@ -0,0 +1,399 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aidocument.requests; + +import com.oracle.bmc.aidocument.model.*; +/** + * Example: Click here to see how to use AddModelLockRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20221109") +public class AddModelLockRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.aidocument.model.AddModelLockDetails> { + + /** + * A unique model identifier. + */ + private String modelId; + + /** + * A unique model identifier. + */ + public String getModelId() { + return modelId; + } + /** + * Request payload to add lock to the resource. + * + */ + private com.oracle.bmc.aidocument.model.AddModelLockDetails addModelLockDetails; + + /** + * Request payload to add lock to the resource. + * + */ + public com.oracle.bmc.aidocument.model.AddModelLockDetails getAddModelLockDetails() { + return addModelLockDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without the risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without the risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.aidocument.model.AddModelLockDetails getBody$() { + return addModelLockDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + AddModelLockRequest, com.oracle.bmc.aidocument.model.AddModelLockDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * A unique model identifier. + */ + private String modelId = null; + + /** + * A unique model identifier. + * @param modelId the value to set + * @return this builder instance + */ + public Builder modelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * Request payload to add lock to the resource. + * + */ + private com.oracle.bmc.aidocument.model.AddModelLockDetails addModelLockDetails = null; + + /** + * Request payload to add lock to the resource. + * + * @param addModelLockDetails the value to set + * @return this builder instance + */ + public Builder addModelLockDetails( + com.oracle.bmc.aidocument.model.AddModelLockDetails addModelLockDetails) { + this.addModelLockDetails = addModelLockDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without the risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without the risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddModelLockRequest o) { + modelId(o.getModelId()); + addModelLockDetails(o.getAddModelLockDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + isLockOverride(o.getIsLockOverride()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of AddModelLockRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of AddModelLockRequest + */ + public AddModelLockRequest build() { + AddModelLockRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.aidocument.model.AddModelLockDetails body) { + addModelLockDetails(body); + return this; + } + + /** + * Build the instance of AddModelLockRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of AddModelLockRequest + */ + public AddModelLockRequest buildWithoutInvocationCallback() { + AddModelLockRequest request = new AddModelLockRequest(); + request.modelId = modelId; + request.addModelLockDetails = addModelLockDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.isLockOverride = isLockOverride; + return request; + // new AddModelLockRequest(modelId, addModelLockDetails, opcRetryToken, opcRequestId, ifMatch, isLockOverride); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .modelId(modelId) + .addModelLockDetails(addModelLockDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .isLockOverride(isLockOverride); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",modelId=").append(String.valueOf(this.modelId)); + sb.append(",addModelLockDetails=").append(String.valueOf(this.addModelLockDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddModelLockRequest)) { + return false; + } + + AddModelLockRequest other = (AddModelLockRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.modelId, other.modelId) + && java.util.Objects.equals(this.addModelLockDetails, other.addModelLockDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.modelId == null ? 43 : this.modelId.hashCode()); + result = + (result * PRIME) + + (this.addModelLockDetails == null + ? 43 + : this.addModelLockDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); + return result; + } +} diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/AddProjectLockRequest.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/AddProjectLockRequest.java new file mode 100644 index 00000000000..cd1be819f80 --- /dev/null +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/AddProjectLockRequest.java @@ -0,0 +1,399 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aidocument.requests; + +import com.oracle.bmc.aidocument.model.*; +/** + * Example: Click here to see how to use AddProjectLockRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20221109") +public class AddProjectLockRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.aidocument.model.AddProjectLockDetails> { + + /** + * A unique project identifier. + */ + private String projectId; + + /** + * A unique project identifier. + */ + public String getProjectId() { + return projectId; + } + /** + * Request payload to add lock to the resource. + * + */ + private com.oracle.bmc.aidocument.model.AddProjectLockDetails addProjectLockDetails; + + /** + * Request payload to add lock to the resource. + * + */ + public com.oracle.bmc.aidocument.model.AddProjectLockDetails getAddProjectLockDetails() { + return addProjectLockDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without the risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without the risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.aidocument.model.AddProjectLockDetails getBody$() { + return addProjectLockDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + AddProjectLockRequest, com.oracle.bmc.aidocument.model.AddProjectLockDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * A unique project identifier. + */ + private String projectId = null; + + /** + * A unique project identifier. + * @param projectId the value to set + * @return this builder instance + */ + public Builder projectId(String projectId) { + this.projectId = projectId; + return this; + } + + /** + * Request payload to add lock to the resource. + * + */ + private com.oracle.bmc.aidocument.model.AddProjectLockDetails addProjectLockDetails = null; + + /** + * Request payload to add lock to the resource. + * + * @param addProjectLockDetails the value to set + * @return this builder instance + */ + public Builder addProjectLockDetails( + com.oracle.bmc.aidocument.model.AddProjectLockDetails addProjectLockDetails) { + this.addProjectLockDetails = addProjectLockDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without the risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without the risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddProjectLockRequest o) { + projectId(o.getProjectId()); + addProjectLockDetails(o.getAddProjectLockDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + isLockOverride(o.getIsLockOverride()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of AddProjectLockRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of AddProjectLockRequest + */ + public AddProjectLockRequest build() { + AddProjectLockRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.aidocument.model.AddProjectLockDetails body) { + addProjectLockDetails(body); + return this; + } + + /** + * Build the instance of AddProjectLockRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of AddProjectLockRequest + */ + public AddProjectLockRequest buildWithoutInvocationCallback() { + AddProjectLockRequest request = new AddProjectLockRequest(); + request.projectId = projectId; + request.addProjectLockDetails = addProjectLockDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.isLockOverride = isLockOverride; + return request; + // new AddProjectLockRequest(projectId, addProjectLockDetails, opcRetryToken, opcRequestId, ifMatch, isLockOverride); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .projectId(projectId) + .addProjectLockDetails(addProjectLockDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .isLockOverride(isLockOverride); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",projectId=").append(String.valueOf(this.projectId)); + sb.append(",addProjectLockDetails=").append(String.valueOf(this.addProjectLockDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddProjectLockRequest)) { + return false; + } + + AddProjectLockRequest other = (AddProjectLockRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.projectId, other.projectId) + && java.util.Objects.equals(this.addProjectLockDetails, other.addProjectLockDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.projectId == null ? 43 : this.projectId.hashCode()); + result = + (result * PRIME) + + (this.addProjectLockDetails == null + ? 43 + : this.addProjectLockDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); + return result; + } +} diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/ChangeModelCompartmentRequest.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/ChangeModelCompartmentRequest.java index 1d7b39b4670..9e3c04e8edb 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/ChangeModelCompartmentRequest.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/ChangeModelCompartmentRequest.java @@ -69,6 +69,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } /** * Alternative accessor for the body parameter. @@ -161,6 +172,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -193,6 +219,7 @@ public Builder copy(ChangeModelCompartmentRequest o) { changeModelCompartmentDetails(o.getChangeModelCompartmentDetails()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -240,8 +267,9 @@ public ChangeModelCompartmentRequest buildWithoutInvocationCallback() { request.changeModelCompartmentDetails = changeModelCompartmentDetails; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new ChangeModelCompartmentRequest(modelId, changeModelCompartmentDetails, ifMatch, opcRequestId); + // new ChangeModelCompartmentRequest(modelId, changeModelCompartmentDetails, ifMatch, opcRequestId, isLockOverride); } } @@ -254,7 +282,8 @@ public Builder toBuilder() { .modelId(modelId) .changeModelCompartmentDetails(changeModelCompartmentDetails) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -275,6 +304,7 @@ public String toString() { .append(String.valueOf(this.changeModelCompartmentDetails)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -294,7 +324,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.changeModelCompartmentDetails, other.changeModelCompartmentDetails) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -309,6 +340,9 @@ public int hashCode() { : this.changeModelCompartmentDetails.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/ChangeProjectCompartmentRequest.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/ChangeProjectCompartmentRequest.java index 1f8903d910b..c01d2ff796c 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/ChangeProjectCompartmentRequest.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/ChangeProjectCompartmentRequest.java @@ -69,6 +69,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } /** * Alternative accessor for the body parameter. @@ -161,6 +172,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -193,6 +219,7 @@ public Builder copy(ChangeProjectCompartmentRequest o) { changeProjectCompartmentDetails(o.getChangeProjectCompartmentDetails()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -240,8 +267,9 @@ public ChangeProjectCompartmentRequest buildWithoutInvocationCallback() { request.changeProjectCompartmentDetails = changeProjectCompartmentDetails; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new ChangeProjectCompartmentRequest(projectId, changeProjectCompartmentDetails, ifMatch, opcRequestId); + // new ChangeProjectCompartmentRequest(projectId, changeProjectCompartmentDetails, ifMatch, opcRequestId, isLockOverride); } } @@ -254,7 +282,8 @@ public Builder toBuilder() { .projectId(projectId) .changeProjectCompartmentDetails(changeProjectCompartmentDetails) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -275,6 +304,7 @@ public String toString() { .append(String.valueOf(this.changeProjectCompartmentDetails)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -294,7 +324,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.changeProjectCompartmentDetails, other.changeProjectCompartmentDetails) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -309,6 +340,9 @@ public int hashCode() { : this.changeProjectCompartmentDetails.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/DeleteModelRequest.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/DeleteModelRequest.java index ce3910d020a..7c2da7a5a10 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/DeleteModelRequest.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/DeleteModelRequest.java @@ -54,6 +54,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -117,6 +128,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -148,6 +174,7 @@ public Builder copy(DeleteModelRequest o) { modelId(o.getModelId()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -183,8 +210,9 @@ public DeleteModelRequest buildWithoutInvocationCallback() { request.modelId = modelId; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new DeleteModelRequest(modelId, ifMatch, opcRequestId); + // new DeleteModelRequest(modelId, ifMatch, opcRequestId, isLockOverride); } } @@ -193,7 +221,11 @@ public DeleteModelRequest buildWithoutInvocationCallback() { * @return instance of {@link Builder} that allows you to modify request properties. */ public Builder toBuilder() { - return new Builder().modelId(modelId).ifMatch(ifMatch).opcRequestId(opcRequestId); + return new Builder() + .modelId(modelId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -212,6 +244,7 @@ public String toString() { sb.append(",modelId=").append(String.valueOf(this.modelId)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -229,7 +262,8 @@ public boolean equals(Object o) { return super.equals(o) && java.util.Objects.equals(this.modelId, other.modelId) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -239,6 +273,9 @@ public int hashCode() { result = (result * PRIME) + (this.modelId == null ? 43 : this.modelId.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/DeleteProjectRequest.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/DeleteProjectRequest.java index 0db5d7c9d0d..de0fcdffd4a 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/DeleteProjectRequest.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/DeleteProjectRequest.java @@ -54,6 +54,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -117,6 +128,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -148,6 +174,7 @@ public Builder copy(DeleteProjectRequest o) { projectId(o.getProjectId()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -183,8 +210,9 @@ public DeleteProjectRequest buildWithoutInvocationCallback() { request.projectId = projectId; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new DeleteProjectRequest(projectId, ifMatch, opcRequestId); + // new DeleteProjectRequest(projectId, ifMatch, opcRequestId, isLockOverride); } } @@ -193,7 +221,11 @@ public DeleteProjectRequest buildWithoutInvocationCallback() { * @return instance of {@link Builder} that allows you to modify request properties. */ public Builder toBuilder() { - return new Builder().projectId(projectId).ifMatch(ifMatch).opcRequestId(opcRequestId); + return new Builder() + .projectId(projectId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -212,6 +244,7 @@ public String toString() { sb.append(",projectId=").append(String.valueOf(this.projectId)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -229,7 +262,8 @@ public boolean equals(Object o) { return super.equals(o) && java.util.Objects.equals(this.projectId, other.projectId) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -239,6 +273,9 @@ public int hashCode() { result = (result * PRIME) + (this.projectId == null ? 43 : this.projectId.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/RemoveModelLockRequest.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/RemoveModelLockRequest.java new file mode 100644 index 00000000000..f6689fddd00 --- /dev/null +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/RemoveModelLockRequest.java @@ -0,0 +1,402 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aidocument.requests; + +import com.oracle.bmc.aidocument.model.*; +/** + * Example: Click here to see how to use RemoveModelLockRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20221109") +public class RemoveModelLockRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.aidocument.model.RemoveModelLockDetails> { + + /** + * A unique model identifier. + */ + private String modelId; + + /** + * A unique model identifier. + */ + public String getModelId() { + return modelId; + } + /** + * Request payload to remove lock to the resource. + * + */ + private com.oracle.bmc.aidocument.model.RemoveModelLockDetails removeModelLockDetails; + + /** + * Request payload to remove lock to the resource. + * + */ + public com.oracle.bmc.aidocument.model.RemoveModelLockDetails getRemoveModelLockDetails() { + return removeModelLockDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without the risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without the risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.aidocument.model.RemoveModelLockDetails getBody$() { + return removeModelLockDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RemoveModelLockRequest, + com.oracle.bmc.aidocument.model.RemoveModelLockDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * A unique model identifier. + */ + private String modelId = null; + + /** + * A unique model identifier. + * @param modelId the value to set + * @return this builder instance + */ + public Builder modelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * Request payload to remove lock to the resource. + * + */ + private com.oracle.bmc.aidocument.model.RemoveModelLockDetails removeModelLockDetails = + null; + + /** + * Request payload to remove lock to the resource. + * + * @param removeModelLockDetails the value to set + * @return this builder instance + */ + public Builder removeModelLockDetails( + com.oracle.bmc.aidocument.model.RemoveModelLockDetails removeModelLockDetails) { + this.removeModelLockDetails = removeModelLockDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without the risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without the risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveModelLockRequest o) { + modelId(o.getModelId()); + removeModelLockDetails(o.getRemoveModelLockDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + isLockOverride(o.getIsLockOverride()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RemoveModelLockRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RemoveModelLockRequest + */ + public RemoveModelLockRequest build() { + RemoveModelLockRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.aidocument.model.RemoveModelLockDetails body) { + removeModelLockDetails(body); + return this; + } + + /** + * Build the instance of RemoveModelLockRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RemoveModelLockRequest + */ + public RemoveModelLockRequest buildWithoutInvocationCallback() { + RemoveModelLockRequest request = new RemoveModelLockRequest(); + request.modelId = modelId; + request.removeModelLockDetails = removeModelLockDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.isLockOverride = isLockOverride; + return request; + // new RemoveModelLockRequest(modelId, removeModelLockDetails, opcRetryToken, opcRequestId, ifMatch, isLockOverride); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .modelId(modelId) + .removeModelLockDetails(removeModelLockDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .isLockOverride(isLockOverride); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",modelId=").append(String.valueOf(this.modelId)); + sb.append(",removeModelLockDetails=").append(String.valueOf(this.removeModelLockDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveModelLockRequest)) { + return false; + } + + RemoveModelLockRequest other = (RemoveModelLockRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.modelId, other.modelId) + && java.util.Objects.equals( + this.removeModelLockDetails, other.removeModelLockDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.modelId == null ? 43 : this.modelId.hashCode()); + result = + (result * PRIME) + + (this.removeModelLockDetails == null + ? 43 + : this.removeModelLockDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); + return result; + } +} diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/RemoveProjectLockRequest.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/RemoveProjectLockRequest.java new file mode 100644 index 00000000000..75afe23ed10 --- /dev/null +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/RemoveProjectLockRequest.java @@ -0,0 +1,403 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aidocument.requests; + +import com.oracle.bmc.aidocument.model.*; +/** + * Example: Click here to see how to use RemoveProjectLockRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20221109") +public class RemoveProjectLockRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.aidocument.model.RemoveProjectLockDetails> { + + /** + * A unique project identifier. + */ + private String projectId; + + /** + * A unique project identifier. + */ + public String getProjectId() { + return projectId; + } + /** + * Request payload to remove lock to the resource. + * + */ + private com.oracle.bmc.aidocument.model.RemoveProjectLockDetails removeProjectLockDetails; + + /** + * Request payload to remove lock to the resource. + * + */ + public com.oracle.bmc.aidocument.model.RemoveProjectLockDetails getRemoveProjectLockDetails() { + return removeProjectLockDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without the risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without the risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.aidocument.model.RemoveProjectLockDetails getBody$() { + return removeProjectLockDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RemoveProjectLockRequest, + com.oracle.bmc.aidocument.model.RemoveProjectLockDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * A unique project identifier. + */ + private String projectId = null; + + /** + * A unique project identifier. + * @param projectId the value to set + * @return this builder instance + */ + public Builder projectId(String projectId) { + this.projectId = projectId; + return this; + } + + /** + * Request payload to remove lock to the resource. + * + */ + private com.oracle.bmc.aidocument.model.RemoveProjectLockDetails removeProjectLockDetails = + null; + + /** + * Request payload to remove lock to the resource. + * + * @param removeProjectLockDetails the value to set + * @return this builder instance + */ + public Builder removeProjectLockDetails( + com.oracle.bmc.aidocument.model.RemoveProjectLockDetails removeProjectLockDetails) { + this.removeProjectLockDetails = removeProjectLockDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without the risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without the risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveProjectLockRequest o) { + projectId(o.getProjectId()); + removeProjectLockDetails(o.getRemoveProjectLockDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + isLockOverride(o.getIsLockOverride()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RemoveProjectLockRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RemoveProjectLockRequest + */ + public RemoveProjectLockRequest build() { + RemoveProjectLockRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.aidocument.model.RemoveProjectLockDetails body) { + removeProjectLockDetails(body); + return this; + } + + /** + * Build the instance of RemoveProjectLockRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RemoveProjectLockRequest + */ + public RemoveProjectLockRequest buildWithoutInvocationCallback() { + RemoveProjectLockRequest request = new RemoveProjectLockRequest(); + request.projectId = projectId; + request.removeProjectLockDetails = removeProjectLockDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.isLockOverride = isLockOverride; + return request; + // new RemoveProjectLockRequest(projectId, removeProjectLockDetails, opcRetryToken, opcRequestId, ifMatch, isLockOverride); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .projectId(projectId) + .removeProjectLockDetails(removeProjectLockDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .isLockOverride(isLockOverride); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",projectId=").append(String.valueOf(this.projectId)); + sb.append(",removeProjectLockDetails=") + .append(String.valueOf(this.removeProjectLockDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveProjectLockRequest)) { + return false; + } + + RemoveProjectLockRequest other = (RemoveProjectLockRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.projectId, other.projectId) + && java.util.Objects.equals( + this.removeProjectLockDetails, other.removeProjectLockDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.projectId == null ? 43 : this.projectId.hashCode()); + result = + (result * PRIME) + + (this.removeProjectLockDetails == null + ? 43 + : this.removeProjectLockDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); + return result; + } +} diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/UpdateModelRequest.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/UpdateModelRequest.java index cfe2a6fa3d9..846351f55d0 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/UpdateModelRequest.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/UpdateModelRequest.java @@ -67,6 +67,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } /** * Alternative accessor for the body parameter. @@ -156,6 +167,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -188,6 +214,7 @@ public Builder copy(UpdateModelRequest o) { updateModelDetails(o.getUpdateModelDetails()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -235,8 +262,9 @@ public UpdateModelRequest buildWithoutInvocationCallback() { request.updateModelDetails = updateModelDetails; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new UpdateModelRequest(modelId, updateModelDetails, ifMatch, opcRequestId); + // new UpdateModelRequest(modelId, updateModelDetails, ifMatch, opcRequestId, isLockOverride); } } @@ -249,7 +277,8 @@ public Builder toBuilder() { .modelId(modelId) .updateModelDetails(updateModelDetails) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -269,6 +298,7 @@ public String toString() { sb.append(",updateModelDetails=").append(String.valueOf(this.updateModelDetails)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -287,7 +317,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.modelId, other.modelId) && java.util.Objects.equals(this.updateModelDetails, other.updateModelDetails) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -302,6 +333,9 @@ public int hashCode() { : this.updateModelDetails.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/UpdateProjectRequest.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/UpdateProjectRequest.java index da7f9077e7b..e922cedff75 100644 --- a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/UpdateProjectRequest.java +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/requests/UpdateProjectRequest.java @@ -67,6 +67,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } /** * Alternative accessor for the body parameter. @@ -156,6 +167,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -188,6 +214,7 @@ public Builder copy(UpdateProjectRequest o) { updateProjectDetails(o.getUpdateProjectDetails()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -235,8 +262,9 @@ public UpdateProjectRequest buildWithoutInvocationCallback() { request.updateProjectDetails = updateProjectDetails; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new UpdateProjectRequest(projectId, updateProjectDetails, ifMatch, opcRequestId); + // new UpdateProjectRequest(projectId, updateProjectDetails, ifMatch, opcRequestId, isLockOverride); } } @@ -249,7 +277,8 @@ public Builder toBuilder() { .projectId(projectId) .updateProjectDetails(updateProjectDetails) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -269,6 +298,7 @@ public String toString() { sb.append(",updateProjectDetails=").append(String.valueOf(this.updateProjectDetails)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -287,7 +317,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.projectId, other.projectId) && java.util.Objects.equals(this.updateProjectDetails, other.updateProjectDetails) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -302,6 +333,9 @@ public int hashCode() { : this.updateProjectDetails.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/responses/AddModelLockResponse.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/responses/AddModelLockResponse.java new file mode 100644 index 00000000000..7f81bf1fc21 --- /dev/null +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/responses/AddModelLockResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aidocument.responses; + +import com.oracle.bmc.aidocument.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20221109") +public class AddModelLockResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Model instance. + */ + private com.oracle.bmc.aidocument.model.Model model; + + /** + * The returned Model instance. + * @return the value + */ + public com.oracle.bmc.aidocument.model.Model getModel() { + return model; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "model" + }) + private AddModelLockResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.aidocument.model.Model model) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.model = model; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Model instance. + */ + private com.oracle.bmc.aidocument.model.Model model; + + /** + * The returned Model instance. + * @param model the value to set + * @return this builder + */ + public Builder model(com.oracle.bmc.aidocument.model.Model model) { + this.model = model; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddModelLockResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + model(o.getModel()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public AddModelLockResponse build() { + return new AddModelLockResponse(__httpStatusCode__, headers, etag, opcRequestId, model); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",model=").append(String.valueOf(model)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddModelLockResponse)) { + return false; + } + + AddModelLockResponse other = (AddModelLockResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.model, other.model); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.model == null ? 43 : this.model.hashCode()); + return result; + } +} diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/responses/AddProjectLockResponse.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/responses/AddProjectLockResponse.java new file mode 100644 index 00000000000..b366ac99a2b --- /dev/null +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/responses/AddProjectLockResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aidocument.responses; + +import com.oracle.bmc.aidocument.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20221109") +public class AddProjectLockResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Project instance. + */ + private com.oracle.bmc.aidocument.model.Project project; + + /** + * The returned Project instance. + * @return the value + */ + public com.oracle.bmc.aidocument.model.Project getProject() { + return project; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "project" + }) + private AddProjectLockResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.aidocument.model.Project project) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.project = project; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Project instance. + */ + private com.oracle.bmc.aidocument.model.Project project; + + /** + * The returned Project instance. + * @param project the value to set + * @return this builder + */ + public Builder project(com.oracle.bmc.aidocument.model.Project project) { + this.project = project; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddProjectLockResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + project(o.getProject()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public AddProjectLockResponse build() { + return new AddProjectLockResponse( + __httpStatusCode__, headers, etag, opcRequestId, project); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",project=").append(String.valueOf(project)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddProjectLockResponse)) { + return false; + } + + AddProjectLockResponse other = (AddProjectLockResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.project, other.project); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.project == null ? 43 : this.project.hashCode()); + return result; + } +} diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/responses/RemoveModelLockResponse.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/responses/RemoveModelLockResponse.java new file mode 100644 index 00000000000..8fdf6df3606 --- /dev/null +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/responses/RemoveModelLockResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aidocument.responses; + +import com.oracle.bmc.aidocument.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20221109") +public class RemoveModelLockResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Model instance. + */ + private com.oracle.bmc.aidocument.model.Model model; + + /** + * The returned Model instance. + * @return the value + */ + public com.oracle.bmc.aidocument.model.Model getModel() { + return model; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "model" + }) + private RemoveModelLockResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.aidocument.model.Model model) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.model = model; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Model instance. + */ + private com.oracle.bmc.aidocument.model.Model model; + + /** + * The returned Model instance. + * @param model the value to set + * @return this builder + */ + public Builder model(com.oracle.bmc.aidocument.model.Model model) { + this.model = model; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveModelLockResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + model(o.getModel()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RemoveModelLockResponse build() { + return new RemoveModelLockResponse( + __httpStatusCode__, headers, etag, opcRequestId, model); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",model=").append(String.valueOf(model)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveModelLockResponse)) { + return false; + } + + RemoveModelLockResponse other = (RemoveModelLockResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.model, other.model); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.model == null ? 43 : this.model.hashCode()); + return result; + } +} diff --git a/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/responses/RemoveProjectLockResponse.java b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/responses/RemoveProjectLockResponse.java new file mode 100644 index 00000000000..1412948a8b1 --- /dev/null +++ b/bmc-aidocument/src/main/java/com/oracle/bmc/aidocument/responses/RemoveProjectLockResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aidocument.responses; + +import com.oracle.bmc.aidocument.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20221109") +public class RemoveProjectLockResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Project instance. + */ + private com.oracle.bmc.aidocument.model.Project project; + + /** + * The returned Project instance. + * @return the value + */ + public com.oracle.bmc.aidocument.model.Project getProject() { + return project; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "project" + }) + private RemoveProjectLockResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.aidocument.model.Project project) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.project = project; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Project instance. + */ + private com.oracle.bmc.aidocument.model.Project project; + + /** + * The returned Project instance. + * @param project the value to set + * @return this builder + */ + public Builder project(com.oracle.bmc.aidocument.model.Project project) { + this.project = project; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveProjectLockResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + project(o.getProject()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RemoveProjectLockResponse build() { + return new RemoveProjectLockResponse( + __httpStatusCode__, headers, etag, opcRequestId, project); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",project=").append(String.valueOf(project)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveProjectLockResponse)) { + return false; + } + + RemoveProjectLockResponse other = (RemoveProjectLockResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.project, other.project); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.project == null ? 43 : this.project.hashCode()); + return result; + } +} diff --git a/bmc-ailanguage/pom.xml b/bmc-ailanguage/pom.xml index f5a706c00e0..67b840046cf 100644 --- a/bmc-ailanguage/pom.xml +++ b/bmc-ailanguage/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-ailanguage @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectDominantLanguageDetails.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectDominantLanguageDetails.java index 8d1866a64d1..4d425fa3de1 100644 --- a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectDominantLanguageDetails.java +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectDominantLanguageDetails.java @@ -23,6 +23,7 @@ public final class BatchDetectDominantLanguageDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated @java.beans.ConstructorProperties({ + "alias", "shouldIgnoreTransliteration", "charsToConsider", "endpointId", @@ -30,12 +31,14 @@ public final class BatchDetectDominantLanguageDetails "documents" }) public BatchDetectDominantLanguageDetails( + String alias, Boolean shouldIgnoreTransliteration, Integer charsToConsider, String endpointId, String compartmentId, java.util.List documents) { super(); + this.alias = alias; this.shouldIgnoreTransliteration = shouldIgnoreTransliteration; this.charsToConsider = charsToConsider; this.endpointId = endpointId; @@ -45,6 +48,22 @@ public BatchDetectDominantLanguageDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @param alias the value to set + * @return this builder + **/ + public Builder alias(String alias) { + this.alias = alias; + this.__explicitlySet__.add("alias"); + return this; + } /** * Specifies whether to consider or ignore transliteration. For example "hi, aap kaise ho? sab kuch teek hai? I will call you tomorrow." would be detected as English when ignore transliteration=true, Hindi when ignoreTransliteration=false. **/ @@ -142,6 +161,7 @@ public Builder documents(java.util.List documents) { public BatchDetectDominantLanguageDetails build() { BatchDetectDominantLanguageDetails model = new BatchDetectDominantLanguageDetails( + this.alias, this.shouldIgnoreTransliteration, this.charsToConsider, this.endpointId, @@ -155,6 +175,9 @@ public BatchDetectDominantLanguageDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(BatchDetectDominantLanguageDetails model) { + if (model.wasPropertyExplicitlySet("alias")) { + this.alias(model.getAlias()); + } if (model.wasPropertyExplicitlySet("shouldIgnoreTransliteration")) { this.shouldIgnoreTransliteration(model.getShouldIgnoreTransliteration()); } @@ -185,6 +208,20 @@ public Builder toBuilder() { return new Builder().copy(this); } + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private final String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @return the value + **/ + public String getAlias() { + return alias; + } + /** * Specifies whether to consider or ignore transliteration. For example "hi, aap kaise ho? sab kuch teek hai? I will call you tomorrow." would be detected as English when ignore transliteration=true, Hindi when ignoreTransliteration=false. **/ @@ -279,7 +316,8 @@ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("BatchDetectDominantLanguageDetails("); sb.append("super=").append(super.toString()); - sb.append("shouldIgnoreTransliteration=") + sb.append("alias=").append(String.valueOf(this.alias)); + sb.append(", shouldIgnoreTransliteration=") .append(String.valueOf(this.shouldIgnoreTransliteration)); sb.append(", charsToConsider=").append(String.valueOf(this.charsToConsider)); sb.append(", endpointId=").append(String.valueOf(this.endpointId)); @@ -299,7 +337,8 @@ public boolean equals(Object o) { } BatchDetectDominantLanguageDetails other = (BatchDetectDominantLanguageDetails) o; - return java.util.Objects.equals( + return java.util.Objects.equals(this.alias, other.alias) + && java.util.Objects.equals( this.shouldIgnoreTransliteration, other.shouldIgnoreTransliteration) && java.util.Objects.equals(this.charsToConsider, other.charsToConsider) && java.util.Objects.equals(this.endpointId, other.endpointId) @@ -312,6 +351,7 @@ public boolean equals(Object o) { public int hashCode() { final int PRIME = 59; int result = 1; + result = (result * PRIME) + (this.alias == null ? 43 : this.alias.hashCode()); result = (result * PRIME) + (this.shouldIgnoreTransliteration == null diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectHealthEntityDetails.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectHealthEntityDetails.java index 07399f91e4d..12a59f2ec0f 100644 --- a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectHealthEntityDetails.java +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectHealthEntityDetails.java @@ -23,6 +23,7 @@ public final class BatchDetectHealthEntityDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated @java.beans.ConstructorProperties({ + "alias", "endpointId", "documents", "linkOntologies", @@ -31,6 +32,7 @@ public final class BatchDetectHealthEntityDetails "profile" }) public BatchDetectHealthEntityDetails( + String alias, String endpointId, java.util.List documents, java.util.List linkOntologies, @@ -38,6 +40,7 @@ public BatchDetectHealthEntityDetails( Boolean isDetectRelationships, Profile profile) { super(); + this.alias = alias; this.endpointId = endpointId; this.documents = documents; this.linkOntologies = linkOntologies; @@ -48,6 +51,22 @@ public BatchDetectHealthEntityDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @param alias the value to set + * @return this builder + **/ + public Builder alias(String alias) { + this.alias = alias; + this.__explicitlySet__.add("alias"); + return this; + } /** * The endpoint which have to be used for inferencing. **/ @@ -144,6 +163,7 @@ public Builder profile(Profile profile) { public BatchDetectHealthEntityDetails build() { BatchDetectHealthEntityDetails model = new BatchDetectHealthEntityDetails( + this.alias, this.endpointId, this.documents, this.linkOntologies, @@ -158,6 +178,9 @@ public BatchDetectHealthEntityDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(BatchDetectHealthEntityDetails model) { + if (model.wasPropertyExplicitlySet("alias")) { + this.alias(model.getAlias()); + } if (model.wasPropertyExplicitlySet("endpointId")) { this.endpointId(model.getEndpointId()); } @@ -191,6 +214,20 @@ public Builder toBuilder() { return new Builder().copy(this); } + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private final String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @return the value + **/ + public String getAlias() { + return alias; + } + /** * The endpoint which have to be used for inferencing. **/ @@ -282,7 +319,8 @@ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("BatchDetectHealthEntityDetails("); sb.append("super=").append(super.toString()); - sb.append("endpointId=").append(String.valueOf(this.endpointId)); + sb.append("alias=").append(String.valueOf(this.alias)); + sb.append(", endpointId=").append(String.valueOf(this.endpointId)); sb.append(", documents=").append(String.valueOf(this.documents)); sb.append(", linkOntologies=").append(String.valueOf(this.linkOntologies)); sb.append(", isDetectAssertions=").append(String.valueOf(this.isDetectAssertions)); @@ -302,7 +340,8 @@ public boolean equals(Object o) { } BatchDetectHealthEntityDetails other = (BatchDetectHealthEntityDetails) o; - return java.util.Objects.equals(this.endpointId, other.endpointId) + return java.util.Objects.equals(this.alias, other.alias) + && java.util.Objects.equals(this.endpointId, other.endpointId) && java.util.Objects.equals(this.documents, other.documents) && java.util.Objects.equals(this.linkOntologies, other.linkOntologies) && java.util.Objects.equals(this.isDetectAssertions, other.isDetectAssertions) @@ -315,6 +354,7 @@ public boolean equals(Object o) { public int hashCode() { final int PRIME = 59; int result = 1; + result = (result * PRIME) + (this.alias == null ? 43 : this.alias.hashCode()); result = (result * PRIME) + (this.endpointId == null ? 43 : this.endpointId.hashCode()); result = (result * PRIME) + (this.documents == null ? 43 : this.documents.hashCode()); result = diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectLanguageEntitiesDetails.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectLanguageEntitiesDetails.java index 59edaa0fc60..2869bef80ea 100644 --- a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectLanguageEntitiesDetails.java +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectLanguageEntitiesDetails.java @@ -22,10 +22,14 @@ public final class BatchDetectLanguageEntitiesDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"compartmentId", "endpointId", "documents"}) + @java.beans.ConstructorProperties({"alias", "compartmentId", "endpointId", "documents"}) public BatchDetectLanguageEntitiesDetails( - String compartmentId, String endpointId, java.util.List documents) { + String alias, + String compartmentId, + String endpointId, + java.util.List documents) { super(); + this.alias = alias; this.compartmentId = compartmentId; this.endpointId = endpointId; this.documents = documents; @@ -33,6 +37,22 @@ public BatchDetectLanguageEntitiesDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @param alias the value to set + * @return this builder + **/ + public Builder alias(String alias) { + this.alias = alias; + this.__explicitlySet__.add("alias"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that calls the API, inference will be served from pre trained model **/ @@ -88,7 +108,7 @@ public Builder documents(java.util.List documents) { public BatchDetectLanguageEntitiesDetails build() { BatchDetectLanguageEntitiesDetails model = new BatchDetectLanguageEntitiesDetails( - this.compartmentId, this.endpointId, this.documents); + this.alias, this.compartmentId, this.endpointId, this.documents); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -97,6 +117,9 @@ public BatchDetectLanguageEntitiesDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(BatchDetectLanguageEntitiesDetails model) { + if (model.wasPropertyExplicitlySet("alias")) { + this.alias(model.getAlias()); + } if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } @@ -121,6 +144,20 @@ public Builder toBuilder() { return new Builder().copy(this); } + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private final String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @return the value + **/ + public String getAlias() { + return alias; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that calls the API, inference will be served from pre trained model **/ @@ -177,7 +214,8 @@ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("BatchDetectLanguageEntitiesDetails("); sb.append("super=").append(super.toString()); - sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append("alias=").append(String.valueOf(this.alias)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", endpointId=").append(String.valueOf(this.endpointId)); sb.append(", documents=").append(String.valueOf(this.documents)); sb.append(")"); @@ -194,7 +232,8 @@ public boolean equals(Object o) { } BatchDetectLanguageEntitiesDetails other = (BatchDetectLanguageEntitiesDetails) o; - return java.util.Objects.equals(this.compartmentId, other.compartmentId) + return java.util.Objects.equals(this.alias, other.alias) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.endpointId, other.endpointId) && java.util.Objects.equals(this.documents, other.documents) && super.equals(other); @@ -204,6 +243,7 @@ public boolean equals(Object o) { public int hashCode() { final int PRIME = 59; int result = 1; + result = (result * PRIME) + (this.alias == null ? 43 : this.alias.hashCode()); result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectLanguageKeyPhrasesDetails.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectLanguageKeyPhrasesDetails.java index a55b8a2dc1c..84f74273231 100644 --- a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectLanguageKeyPhrasesDetails.java +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectLanguageKeyPhrasesDetails.java @@ -22,10 +22,14 @@ public final class BatchDetectLanguageKeyPhrasesDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"endpointId", "compartmentId", "documents"}) + @java.beans.ConstructorProperties({"alias", "endpointId", "compartmentId", "documents"}) public BatchDetectLanguageKeyPhrasesDetails( - String endpointId, String compartmentId, java.util.List documents) { + String alias, + String endpointId, + String compartmentId, + java.util.List documents) { super(); + this.alias = alias; this.endpointId = endpointId; this.compartmentId = compartmentId; this.documents = documents; @@ -33,6 +37,22 @@ public BatchDetectLanguageKeyPhrasesDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @param alias the value to set + * @return this builder + **/ + public Builder alias(String alias) { + this.alias = alias; + this.__explicitlySet__.add("alias"); + return this; + } /** * The endpoint which have to be used for inferencing. If endpointId and compartmentId is provided, then inference will be served from custom model which is mapped to this Endpoint. **/ @@ -88,7 +108,7 @@ public Builder documents(java.util.List documents) { public BatchDetectLanguageKeyPhrasesDetails build() { BatchDetectLanguageKeyPhrasesDetails model = new BatchDetectLanguageKeyPhrasesDetails( - this.endpointId, this.compartmentId, this.documents); + this.alias, this.endpointId, this.compartmentId, this.documents); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -97,6 +117,9 @@ public BatchDetectLanguageKeyPhrasesDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(BatchDetectLanguageKeyPhrasesDetails model) { + if (model.wasPropertyExplicitlySet("alias")) { + this.alias(model.getAlias()); + } if (model.wasPropertyExplicitlySet("endpointId")) { this.endpointId(model.getEndpointId()); } @@ -121,6 +144,20 @@ public Builder toBuilder() { return new Builder().copy(this); } + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private final String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @return the value + **/ + public String getAlias() { + return alias; + } + /** * The endpoint which have to be used for inferencing. If endpointId and compartmentId is provided, then inference will be served from custom model which is mapped to this Endpoint. **/ @@ -177,7 +214,8 @@ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("BatchDetectLanguageKeyPhrasesDetails("); sb.append("super=").append(super.toString()); - sb.append("endpointId=").append(String.valueOf(this.endpointId)); + sb.append("alias=").append(String.valueOf(this.alias)); + sb.append(", endpointId=").append(String.valueOf(this.endpointId)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", documents=").append(String.valueOf(this.documents)); sb.append(")"); @@ -194,7 +232,8 @@ public boolean equals(Object o) { } BatchDetectLanguageKeyPhrasesDetails other = (BatchDetectLanguageKeyPhrasesDetails) o; - return java.util.Objects.equals(this.endpointId, other.endpointId) + return java.util.Objects.equals(this.alias, other.alias) + && java.util.Objects.equals(this.endpointId, other.endpointId) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.documents, other.documents) && super.equals(other); @@ -204,6 +243,7 @@ public boolean equals(Object o) { public int hashCode() { final int PRIME = 59; int result = 1; + result = (result * PRIME) + (this.alias == null ? 43 : this.alias.hashCode()); result = (result * PRIME) + (this.endpointId == null ? 43 : this.endpointId.hashCode()); result = (result * PRIME) diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectLanguagePiiEntitiesDetails.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectLanguagePiiEntitiesDetails.java index e7e0e30b9ff..56fbeac6a1a 100644 --- a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectLanguagePiiEntitiesDetails.java +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectLanguagePiiEntitiesDetails.java @@ -23,6 +23,7 @@ public final class BatchDetectLanguagePiiEntitiesDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated @java.beans.ConstructorProperties({ + "alias", "endpointId", "compartmentId", "documents", @@ -30,12 +31,14 @@ public final class BatchDetectLanguagePiiEntitiesDetails "profile" }) public BatchDetectLanguagePiiEntitiesDetails( + String alias, String endpointId, String compartmentId, java.util.List documents, java.util.Map masking, Profile profile) { super(); + this.alias = alias; this.endpointId = endpointId; this.compartmentId = compartmentId; this.documents = documents; @@ -45,6 +48,22 @@ public BatchDetectLanguagePiiEntitiesDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @param alias the value to set + * @return this builder + **/ + public Builder alias(String alias) { + this.alias = alias; + this.__explicitlySet__.add("alias"); + return this; + } /** * The endpoint which have to be used for inferencing. If endpointId and compartmentId is provided, then inference will be served from custom model which is mapped to this Endpoint. **/ @@ -125,6 +144,7 @@ public Builder profile(Profile profile) { public BatchDetectLanguagePiiEntitiesDetails build() { BatchDetectLanguagePiiEntitiesDetails model = new BatchDetectLanguagePiiEntitiesDetails( + this.alias, this.endpointId, this.compartmentId, this.documents, @@ -138,6 +158,9 @@ public BatchDetectLanguagePiiEntitiesDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(BatchDetectLanguagePiiEntitiesDetails model) { + if (model.wasPropertyExplicitlySet("alias")) { + this.alias(model.getAlias()); + } if (model.wasPropertyExplicitlySet("endpointId")) { this.endpointId(model.getEndpointId()); } @@ -168,6 +191,20 @@ public Builder toBuilder() { return new Builder().copy(this); } + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private final String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @return the value + **/ + public String getAlias() { + return alias; + } + /** * The endpoint which have to be used for inferencing. If endpointId and compartmentId is provided, then inference will be served from custom model which is mapped to this Endpoint. **/ @@ -245,7 +282,8 @@ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("BatchDetectLanguagePiiEntitiesDetails("); sb.append("super=").append(super.toString()); - sb.append("endpointId=").append(String.valueOf(this.endpointId)); + sb.append("alias=").append(String.valueOf(this.alias)); + sb.append(", endpointId=").append(String.valueOf(this.endpointId)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", documents=").append(String.valueOf(this.documents)); sb.append(", masking=").append(String.valueOf(this.masking)); @@ -264,7 +302,8 @@ public boolean equals(Object o) { } BatchDetectLanguagePiiEntitiesDetails other = (BatchDetectLanguagePiiEntitiesDetails) o; - return java.util.Objects.equals(this.endpointId, other.endpointId) + return java.util.Objects.equals(this.alias, other.alias) + && java.util.Objects.equals(this.endpointId, other.endpointId) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.documents, other.documents) && java.util.Objects.equals(this.masking, other.masking) @@ -276,6 +315,7 @@ public boolean equals(Object o) { public int hashCode() { final int PRIME = 59; int result = 1; + result = (result * PRIME) + (this.alias == null ? 43 : this.alias.hashCode()); result = (result * PRIME) + (this.endpointId == null ? 43 : this.endpointId.hashCode()); result = (result * PRIME) diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectLanguageSentimentsDetails.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectLanguageSentimentsDetails.java index 75abf07a3f5..09f6650b8b8 100644 --- a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectLanguageSentimentsDetails.java +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectLanguageSentimentsDetails.java @@ -22,10 +22,14 @@ public final class BatchDetectLanguageSentimentsDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"endpointId", "compartmentId", "documents"}) + @java.beans.ConstructorProperties({"alias", "endpointId", "compartmentId", "documents"}) public BatchDetectLanguageSentimentsDetails( - String endpointId, String compartmentId, java.util.List documents) { + String alias, + String endpointId, + String compartmentId, + java.util.List documents) { super(); + this.alias = alias; this.endpointId = endpointId; this.compartmentId = compartmentId; this.documents = documents; @@ -33,6 +37,22 @@ public BatchDetectLanguageSentimentsDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @param alias the value to set + * @return this builder + **/ + public Builder alias(String alias) { + this.alias = alias; + this.__explicitlySet__.add("alias"); + return this; + } /** * The endpoint which have to be used for inferencing. If endpointId and compartmentId is provided, then inference will be served from custom model which is mapped to this Endpoint. **/ @@ -88,7 +108,7 @@ public Builder documents(java.util.List documents) { public BatchDetectLanguageSentimentsDetails build() { BatchDetectLanguageSentimentsDetails model = new BatchDetectLanguageSentimentsDetails( - this.endpointId, this.compartmentId, this.documents); + this.alias, this.endpointId, this.compartmentId, this.documents); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -97,6 +117,9 @@ public BatchDetectLanguageSentimentsDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(BatchDetectLanguageSentimentsDetails model) { + if (model.wasPropertyExplicitlySet("alias")) { + this.alias(model.getAlias()); + } if (model.wasPropertyExplicitlySet("endpointId")) { this.endpointId(model.getEndpointId()); } @@ -121,6 +144,20 @@ public Builder toBuilder() { return new Builder().copy(this); } + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private final String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @return the value + **/ + public String getAlias() { + return alias; + } + /** * The endpoint which have to be used for inferencing. If endpointId and compartmentId is provided, then inference will be served from custom model which is mapped to this Endpoint. **/ @@ -177,7 +214,8 @@ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("BatchDetectLanguageSentimentsDetails("); sb.append("super=").append(super.toString()); - sb.append("endpointId=").append(String.valueOf(this.endpointId)); + sb.append("alias=").append(String.valueOf(this.alias)); + sb.append(", endpointId=").append(String.valueOf(this.endpointId)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", documents=").append(String.valueOf(this.documents)); sb.append(")"); @@ -194,7 +232,8 @@ public boolean equals(Object o) { } BatchDetectLanguageSentimentsDetails other = (BatchDetectLanguageSentimentsDetails) o; - return java.util.Objects.equals(this.endpointId, other.endpointId) + return java.util.Objects.equals(this.alias, other.alias) + && java.util.Objects.equals(this.endpointId, other.endpointId) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.documents, other.documents) && super.equals(other); @@ -204,6 +243,7 @@ public boolean equals(Object o) { public int hashCode() { final int PRIME = 59; int result = 1; + result = (result * PRIME) + (this.alias == null ? 43 : this.alias.hashCode()); result = (result * PRIME) + (this.endpointId == null ? 43 : this.endpointId.hashCode()); result = (result * PRIME) diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectLanguageTextClassificationDetails.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectLanguageTextClassificationDetails.java index 4bc2be8b689..2ff63a9bd21 100644 --- a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectLanguageTextClassificationDetails.java +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchDetectLanguageTextClassificationDetails.java @@ -22,10 +22,14 @@ public final class BatchDetectLanguageTextClassificationDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"compartmentId", "endpointId", "documents"}) + @java.beans.ConstructorProperties({"alias", "compartmentId", "endpointId", "documents"}) public BatchDetectLanguageTextClassificationDetails( - String compartmentId, String endpointId, java.util.List documents) { + String alias, + String compartmentId, + String endpointId, + java.util.List documents) { super(); + this.alias = alias; this.compartmentId = compartmentId; this.endpointId = endpointId; this.documents = documents; @@ -33,6 +37,22 @@ public BatchDetectLanguageTextClassificationDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @param alias the value to set + * @return this builder + **/ + public Builder alias(String alias) { + this.alias = alias; + this.__explicitlySet__.add("alias"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that calls the API, inference will be served from pre trained model **/ @@ -88,7 +108,7 @@ public Builder documents(java.util.List documents) { public BatchDetectLanguageTextClassificationDetails build() { BatchDetectLanguageTextClassificationDetails model = new BatchDetectLanguageTextClassificationDetails( - this.compartmentId, this.endpointId, this.documents); + this.alias, this.compartmentId, this.endpointId, this.documents); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -97,6 +117,9 @@ public BatchDetectLanguageTextClassificationDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(BatchDetectLanguageTextClassificationDetails model) { + if (model.wasPropertyExplicitlySet("alias")) { + this.alias(model.getAlias()); + } if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } @@ -121,6 +144,20 @@ public Builder toBuilder() { return new Builder().copy(this); } + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private final String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @return the value + **/ + public String getAlias() { + return alias; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that calls the API, inference will be served from pre trained model **/ @@ -177,7 +214,8 @@ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("BatchDetectLanguageTextClassificationDetails("); sb.append("super=").append(super.toString()); - sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append("alias=").append(String.valueOf(this.alias)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", endpointId=").append(String.valueOf(this.endpointId)); sb.append(", documents=").append(String.valueOf(this.documents)); sb.append(")"); @@ -195,7 +233,8 @@ public boolean equals(Object o) { BatchDetectLanguageTextClassificationDetails other = (BatchDetectLanguageTextClassificationDetails) o; - return java.util.Objects.equals(this.compartmentId, other.compartmentId) + return java.util.Objects.equals(this.alias, other.alias) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.endpointId, other.endpointId) && java.util.Objects.equals(this.documents, other.documents) && super.equals(other); @@ -205,6 +244,7 @@ public boolean equals(Object o) { public int hashCode() { final int PRIME = 59; int result = 1; + result = (result * PRIME) + (this.alias == null ? 43 : this.alias.hashCode()); result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchLanguageTranslationDetails.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchLanguageTranslationDetails.java index 6b5c8a76efa..4975ed57112 100644 --- a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchLanguageTranslationDetails.java +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/BatchLanguageTranslationDetails.java @@ -22,12 +22,25 @@ public final class BatchLanguageTranslationDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"compartmentId", "targetLanguageCode", "documents"}) + @java.beans.ConstructorProperties({ + "alias", + "endpointId", + "noTranslate", + "compartmentId", + "targetLanguageCode", + "documents" + }) public BatchLanguageTranslationDetails( + String alias, + String endpointId, + java.util.List noTranslate, String compartmentId, String targetLanguageCode, java.util.List documents) { super(); + this.alias = alias; + this.endpointId = endpointId; + this.noTranslate = noTranslate; this.compartmentId = compartmentId; this.targetLanguageCode = targetLanguageCode; this.documents = documents; @@ -35,6 +48,54 @@ public BatchLanguageTranslationDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + /** + * Unique name to identify an endpoint to be used for inferencing + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private String alias; + + /** + * Unique name to identify an endpoint to be used for inferencing + * @param alias the value to set + * @return this builder + **/ + public Builder alias(String alias) { + this.alias = alias; + this.__explicitlySet__.add("alias"); + return this; + } + /** + * The endpoint that has to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("endpointId") + private String endpointId; + + /** + * The endpoint that has to be used for inferencing. + * @param endpointId the value to set + * @return this builder + **/ + public Builder endpointId(String endpointId) { + this.endpointId = endpointId; + this.__explicitlySet__.add("endpointId"); + return this; + } + /** + * List of words not to be translated + **/ + @com.fasterxml.jackson.annotation.JsonProperty("noTranslate") + private java.util.List noTranslate; + + /** + * List of words not to be translated + * @param noTranslate the value to set + * @return this builder + **/ + public Builder noTranslate(java.util.List noTranslate) { + this.noTranslate = noTranslate; + this.__explicitlySet__.add("noTranslate"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that calls the API, inference will be served from pre trained model **/ @@ -154,7 +215,12 @@ public Builder documents(java.util.List documents) { public BatchLanguageTranslationDetails build() { BatchLanguageTranslationDetails model = new BatchLanguageTranslationDetails( - this.compartmentId, this.targetLanguageCode, this.documents); + this.alias, + this.endpointId, + this.noTranslate, + this.compartmentId, + this.targetLanguageCode, + this.documents); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -163,6 +229,15 @@ public BatchLanguageTranslationDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(BatchLanguageTranslationDetails model) { + if (model.wasPropertyExplicitlySet("alias")) { + this.alias(model.getAlias()); + } + if (model.wasPropertyExplicitlySet("endpointId")) { + this.endpointId(model.getEndpointId()); + } + if (model.wasPropertyExplicitlySet("noTranslate")) { + this.noTranslate(model.getNoTranslate()); + } if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } @@ -187,6 +262,48 @@ public Builder toBuilder() { return new Builder().copy(this); } + /** + * Unique name to identify an endpoint to be used for inferencing + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private final String alias; + + /** + * Unique name to identify an endpoint to be used for inferencing + * @return the value + **/ + public String getAlias() { + return alias; + } + + /** + * The endpoint that has to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("endpointId") + private final String endpointId; + + /** + * The endpoint that has to be used for inferencing. + * @return the value + **/ + public String getEndpointId() { + return endpointId; + } + + /** + * List of words not to be translated + **/ + @com.fasterxml.jackson.annotation.JsonProperty("noTranslate") + private final java.util.List noTranslate; + + /** + * List of words not to be translated + * @return the value + **/ + public java.util.List getNoTranslate() { + return noTranslate; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that calls the API, inference will be served from pre trained model **/ @@ -307,7 +424,10 @@ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("BatchLanguageTranslationDetails("); sb.append("super=").append(super.toString()); - sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append("alias=").append(String.valueOf(this.alias)); + sb.append(", endpointId=").append(String.valueOf(this.endpointId)); + sb.append(", noTranslate=").append(String.valueOf(this.noTranslate)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", targetLanguageCode=").append(String.valueOf(this.targetLanguageCode)); sb.append(", documents=").append(String.valueOf(this.documents)); sb.append(")"); @@ -324,7 +444,10 @@ public boolean equals(Object o) { } BatchLanguageTranslationDetails other = (BatchLanguageTranslationDetails) o; - return java.util.Objects.equals(this.compartmentId, other.compartmentId) + return java.util.Objects.equals(this.alias, other.alias) + && java.util.Objects.equals(this.endpointId, other.endpointId) + && java.util.Objects.equals(this.noTranslate, other.noTranslate) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.targetLanguageCode, other.targetLanguageCode) && java.util.Objects.equals(this.documents, other.documents) && super.equals(other); @@ -334,6 +457,9 @@ public boolean equals(Object o) { public int hashCode() { final int PRIME = 59; int result = 1; + result = (result * PRIME) + (this.alias == null ? 43 : this.alias.hashCode()); + result = (result * PRIME) + (this.endpointId == null ? 43 : this.endpointId.hashCode()); + result = (result * PRIME) + (this.noTranslate == null ? 43 : this.noTranslate.hashCode()); result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/CreateEndpointDetails.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/CreateEndpointDetails.java index 16aef34e5b4..a62c31cc2d8 100644 --- a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/CreateEndpointDetails.java +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/CreateEndpointDetails.java @@ -24,6 +24,8 @@ public final class CreateEndpointDetails @Deprecated @java.beans.ConstructorProperties({ "displayName", + "computeType", + "alias", "description", "compartmentId", "modelId", @@ -33,6 +35,8 @@ public final class CreateEndpointDetails }) public CreateEndpointDetails( String displayName, + ComputeType computeType, + String alias, String description, String compartmentId, String modelId, @@ -41,6 +45,8 @@ public CreateEndpointDetails( java.util.Map> definedTags) { super(); this.displayName = displayName; + this.computeType = computeType; + this.alias = alias; this.description = description; this.compartmentId = compartmentId; this.modelId = modelId; @@ -67,6 +73,38 @@ public Builder displayName(String displayName) { this.__explicitlySet__.add("displayName"); return this; } + /** + * Compute infra type for endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeType") + private ComputeType computeType; + + /** + * Compute infra type for endpoint. + * @param computeType the value to set + * @return this builder + **/ + public Builder computeType(ComputeType computeType) { + this.computeType = computeType; + this.__explicitlySet__.add("computeType"); + return this; + } + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @param alias the value to set + * @return this builder + **/ + public Builder alias(String alias) { + this.alias = alias; + this.__explicitlySet__.add("alias"); + return this; + } /** * A short description of the an endpoint. **/ @@ -180,6 +218,8 @@ public CreateEndpointDetails build() { CreateEndpointDetails model = new CreateEndpointDetails( this.displayName, + this.computeType, + this.alias, this.description, this.compartmentId, this.modelId, @@ -197,6 +237,12 @@ public Builder copy(CreateEndpointDetails model) { if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } + if (model.wasPropertyExplicitlySet("computeType")) { + this.computeType(model.getComputeType()); + } + if (model.wasPropertyExplicitlySet("alias")) { + this.alias(model.getAlias()); + } if (model.wasPropertyExplicitlySet("description")) { this.description(model.getDescription()); } @@ -244,6 +290,69 @@ public String getDisplayName() { return displayName; } + /** + * Compute infra type for endpoint. + **/ + public enum ComputeType { + Cpu("CPU"), + Gpu("GPU"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ComputeType v : ComputeType.values()) { + map.put(v.getValue(), v); + } + } + + ComputeType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ComputeType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ComputeType: " + key); + } + }; + /** + * Compute infra type for endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeType") + private final ComputeType computeType; + + /** + * Compute infra type for endpoint. + * @return the value + **/ + public ComputeType getComputeType() { + return computeType; + } + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private final String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @return the value + **/ + public String getAlias() { + return alias; + } + /** * A short description of the an endpoint. **/ @@ -351,6 +460,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("CreateEndpointDetails("); sb.append("super=").append(super.toString()); sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", computeType=").append(String.valueOf(this.computeType)); + sb.append(", alias=").append(String.valueOf(this.alias)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", modelId=").append(String.valueOf(this.modelId)); @@ -372,6 +483,8 @@ public boolean equals(Object o) { CreateEndpointDetails other = (CreateEndpointDetails) o; return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.computeType, other.computeType) + && java.util.Objects.equals(this.alias, other.alias) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.modelId, other.modelId) @@ -386,6 +499,8 @@ public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.computeType == null ? 43 : this.computeType.hashCode()); + result = (result * PRIME) + (this.alias == null ? 43 : this.alias.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); result = (result * PRIME) diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/Endpoint.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/Endpoint.java index c1586efaef9..ff80a3f57e6 100644 --- a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/Endpoint.java +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/Endpoint.java @@ -21,6 +21,8 @@ public final class Endpoint extends com.oracle.bmc.http.internal.ExplicitlySetBm @Deprecated @java.beans.ConstructorProperties({ "id", + "alias", + "computeType", "displayName", "compartmentId", "projectId", @@ -37,6 +39,8 @@ public final class Endpoint extends com.oracle.bmc.http.internal.ExplicitlySetBm }) public Endpoint( String id, + String alias, + ComputeType computeType, String displayName, String compartmentId, String projectId, @@ -52,6 +56,8 @@ public Endpoint( java.util.Map> systemTags) { super(); this.id = id; + this.alias = alias; + this.computeType = computeType; this.displayName = displayName; this.compartmentId = compartmentId; this.projectId = projectId; @@ -85,6 +91,38 @@ public Builder id(String id) { this.__explicitlySet__.add("id"); return this; } + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @param alias the value to set + * @return this builder + **/ + public Builder alias(String alias) { + this.alias = alias; + this.__explicitlySet__.add("alias"); + return this; + } + /** + * Compute infra type for endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeType") + private ComputeType computeType; + + /** + * Compute infra type for endpoint. + * @param computeType the value to set + * @return this builder + **/ + public Builder computeType(ComputeType computeType) { + this.computeType = computeType; + this.__explicitlySet__.add("computeType"); + return this; + } /** * A user-friendly display name for the resource. It should be unique and can be modified. Avoid entering confidential information. **/ @@ -314,6 +352,8 @@ public Endpoint build() { Endpoint model = new Endpoint( this.id, + this.alias, + this.computeType, this.displayName, this.compartmentId, this.projectId, @@ -338,6 +378,12 @@ public Builder copy(Endpoint model) { if (model.wasPropertyExplicitlySet("id")) { this.id(model.getId()); } + if (model.wasPropertyExplicitlySet("alias")) { + this.alias(model.getAlias()); + } + if (model.wasPropertyExplicitlySet("computeType")) { + this.computeType(model.getComputeType()); + } if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } @@ -406,6 +452,82 @@ public String getId() { return id; } + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private final String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @return the value + **/ + public String getAlias() { + return alias; + } + + /** + * Compute infra type for endpoint. + **/ + public enum ComputeType { + Cpu("CPU"), + Gpu("GPU"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ComputeType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ComputeType v : ComputeType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ComputeType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ComputeType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ComputeType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Compute infra type for endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeType") + private final ComputeType computeType; + + /** + * Compute infra type for endpoint. + * @return the value + **/ + public ComputeType getComputeType() { + return computeType; + } + /** * A user-friendly display name for the resource. It should be unique and can be modified. Avoid entering confidential information. **/ @@ -667,6 +789,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("Endpoint("); sb.append("super=").append(super.toString()); sb.append("id=").append(String.valueOf(this.id)); + sb.append(", alias=").append(String.valueOf(this.alias)); + sb.append(", computeType=").append(String.valueOf(this.computeType)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", projectId=").append(String.valueOf(this.projectId)); @@ -695,6 +819,8 @@ public boolean equals(Object o) { Endpoint other = (Endpoint) o; return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.alias, other.alias) + && java.util.Objects.equals(this.computeType, other.computeType) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.projectId, other.projectId) @@ -716,6 +842,8 @@ public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.alias == null ? 43 : this.alias.hashCode()); + result = (result * PRIME) + (this.computeType == null ? 43 : this.computeType.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/EndpointSummary.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/EndpointSummary.java index aefc0eae2eb..c7a11c750b2 100644 --- a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/EndpointSummary.java +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/EndpointSummary.java @@ -21,6 +21,8 @@ public final class EndpointSummary extends com.oracle.bmc.http.internal.Explicit @Deprecated @java.beans.ConstructorProperties({ "id", + "alias", + "computeType", "displayName", "compartmentId", "projectId", @@ -36,6 +38,8 @@ public final class EndpointSummary extends com.oracle.bmc.http.internal.Explicit }) public EndpointSummary( String id, + String alias, + ComputeType computeType, String displayName, String compartmentId, String projectId, @@ -50,6 +54,8 @@ public EndpointSummary( java.util.Map> systemTags) { super(); this.id = id; + this.alias = alias; + this.computeType = computeType; this.displayName = displayName; this.compartmentId = compartmentId; this.projectId = projectId; @@ -82,6 +88,38 @@ public Builder id(String id) { this.__explicitlySet__.add("id"); return this; } + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @param alias the value to set + * @return this builder + **/ + public Builder alias(String alias) { + this.alias = alias; + this.__explicitlySet__.add("alias"); + return this; + } + /** + * Compute infra type for endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeType") + private ComputeType computeType; + + /** + * Compute infra type for endpoint. + * @param computeType the value to set + * @return this builder + **/ + public Builder computeType(ComputeType computeType) { + this.computeType = computeType; + this.__explicitlySet__.add("computeType"); + return this; + } /** * A user-friendly display name for the resource. It should be unique and can be modified. Avoid entering confidential information. **/ @@ -295,6 +333,8 @@ public EndpointSummary build() { EndpointSummary model = new EndpointSummary( this.id, + this.alias, + this.computeType, this.displayName, this.compartmentId, this.projectId, @@ -318,6 +358,12 @@ public Builder copy(EndpointSummary model) { if (model.wasPropertyExplicitlySet("id")) { this.id(model.getId()); } + if (model.wasPropertyExplicitlySet("alias")) { + this.alias(model.getAlias()); + } + if (model.wasPropertyExplicitlySet("computeType")) { + this.computeType(model.getComputeType()); + } if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } @@ -383,6 +429,82 @@ public String getId() { return id; } + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private final String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @return the value + **/ + public String getAlias() { + return alias; + } + + /** + * Compute infra type for endpoint. + **/ + public enum ComputeType { + Cpu("CPU"), + Gpu("GPU"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ComputeType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ComputeType v : ComputeType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ComputeType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ComputeType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ComputeType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Compute infra type for endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("computeType") + private final ComputeType computeType; + + /** + * Compute infra type for endpoint. + * @return the value + **/ + public ComputeType getComputeType() { + return computeType; + } + /** * A user-friendly display name for the resource. It should be unique and can be modified. Avoid entering confidential information. **/ @@ -578,6 +700,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("EndpointSummary("); sb.append("super=").append(super.toString()); sb.append("id=").append(String.valueOf(this.id)); + sb.append(", alias=").append(String.valueOf(this.alias)); + sb.append(", computeType=").append(String.valueOf(this.computeType)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", projectId=").append(String.valueOf(this.projectId)); @@ -605,6 +729,8 @@ public boolean equals(Object o) { EndpointSummary other = (EndpointSummary) o; return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.alias, other.alias) + && java.util.Objects.equals(this.computeType, other.computeType) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.projectId, other.projectId) @@ -625,6 +751,8 @@ public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.alias == null ? 43 : this.alias.hashCode()); + result = (result * PRIME) + (this.computeType == null ? 43 : this.computeType.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/HealthNluModelDetails.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/HealthNluModelDetails.java new file mode 100644 index 00000000000..9a08b53f0db --- /dev/null +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/HealthNluModelDetails.java @@ -0,0 +1,157 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.ailanguage.model; + +/** + * Possible health NLU model information. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20221001") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = HealthNluModelDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "modelType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class HealthNluModelDetails extends ModelDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("languageCode") + private String languageCode; + + public Builder languageCode(String languageCode) { + this.languageCode = languageCode; + this.__explicitlySet__.add("languageCode"); + return this; + } + /** + * Optional pre trained model version. If nothing specified latest pre trained model will be used. + * Supported versions can be found at /modelTypes/{modelType} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * Optional pre trained model version. If nothing specified latest pre trained model will be used. + * Supported versions can be found at /modelTypes/{modelType} + * + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public HealthNluModelDetails build() { + HealthNluModelDetails model = + new HealthNluModelDetails(this.languageCode, this.version); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(HealthNluModelDetails model) { + if (model.wasPropertyExplicitlySet("languageCode")) { + this.languageCode(model.getLanguageCode()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public HealthNluModelDetails(String languageCode, String version) { + super(languageCode); + this.version = version; + } + + /** + * Optional pre trained model version. If nothing specified latest pre trained model will be used. + * Supported versions can be found at /modelTypes/{modelType} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * Optional pre trained model version. If nothing specified latest pre trained model will be used. + * Supported versions can be found at /modelTypes/{modelType} + * + * @return the value + **/ + public String getVersion() { + return version; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("HealthNluModelDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof HealthNluModelDetails)) { + return false; + } + + HealthNluModelDetails other = (HealthNluModelDetails) o; + return java.util.Objects.equals(this.version, other.version) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + return result; + } +} diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/HierarchicalEntity.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/HierarchicalEntity.java index 03ecfd21257..e7f75e2cbb8 100644 --- a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/HierarchicalEntity.java +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/HierarchicalEntity.java @@ -21,8 +21,17 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class HierarchicalEntity extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"offset", "length", "text", "type", "subType", "score"}) + @java.beans.ConstructorProperties({ + "metaInfo", + "offset", + "length", + "text", + "type", + "subType", + "score" + }) public HierarchicalEntity( + MetaInfo metaInfo, Integer offset, Integer length, String text, @@ -30,6 +39,7 @@ public HierarchicalEntity( String subType, Double score) { super(); + this.metaInfo = metaInfo; this.offset = offset; this.length = length; this.text = text; @@ -40,6 +50,15 @@ public HierarchicalEntity( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("metaInfo") + private MetaInfo metaInfo; + + public Builder metaInfo(MetaInfo metaInfo) { + this.metaInfo = metaInfo; + this.__explicitlySet__.add("metaInfo"); + return this; + } /** * The number of Unicode code points preceding this entity in the submitted text. **/ @@ -143,6 +162,7 @@ public Builder score(Double score) { public HierarchicalEntity build() { HierarchicalEntity model = new HierarchicalEntity( + this.metaInfo, this.offset, this.length, this.text, @@ -157,6 +177,9 @@ public HierarchicalEntity build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(HierarchicalEntity model) { + if (model.wasPropertyExplicitlySet("metaInfo")) { + this.metaInfo(model.getMetaInfo()); + } if (model.wasPropertyExplicitlySet("offset")) { this.offset(model.getOffset()); } @@ -190,6 +213,13 @@ public Builder toBuilder() { return new Builder().copy(this); } + @com.fasterxml.jackson.annotation.JsonProperty("metaInfo") + private final MetaInfo metaInfo; + + public MetaInfo getMetaInfo() { + return metaInfo; + } + /** * The number of Unicode code points preceding this entity in the submitted text. **/ @@ -288,7 +318,8 @@ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("HierarchicalEntity("); sb.append("super=").append(super.toString()); - sb.append("offset=").append(String.valueOf(this.offset)); + sb.append("metaInfo=").append(String.valueOf(this.metaInfo)); + sb.append(", offset=").append(String.valueOf(this.offset)); sb.append(", length=").append(String.valueOf(this.length)); sb.append(", text=").append(String.valueOf(this.text)); sb.append(", type=").append(String.valueOf(this.type)); @@ -308,7 +339,8 @@ public boolean equals(Object o) { } HierarchicalEntity other = (HierarchicalEntity) o; - return java.util.Objects.equals(this.offset, other.offset) + return java.util.Objects.equals(this.metaInfo, other.metaInfo) + && java.util.Objects.equals(this.offset, other.offset) && java.util.Objects.equals(this.length, other.length) && java.util.Objects.equals(this.text, other.text) && java.util.Objects.equals(this.type, other.type) @@ -321,6 +353,7 @@ public boolean equals(Object o) { public int hashCode() { final int PRIME = 59; int result = 1; + result = (result * PRIME) + (this.metaInfo == null ? 43 : this.metaInfo.hashCode()); result = (result * PRIME) + (this.offset == null ? 43 : this.offset.hashCode()); result = (result * PRIME) + (this.length == null ? 43 : this.length.hashCode()); result = (result * PRIME) + (this.text == null ? 43 : this.text.hashCode()); diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/MetaInfo.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/MetaInfo.java new file mode 100644 index 00000000000..b7ba8855c9f --- /dev/null +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/MetaInfo.java @@ -0,0 +1,282 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.ailanguage.model; + +/** + * MetaInfo of entity detected. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20221001") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = MetaInfo.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MetaInfo extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"offset", "length", "text", "subType", "score"}) + public MetaInfo(Integer offset, Integer length, String text, String subType, Double score) { + super(); + this.offset = offset; + this.length = length; + this.text = text; + this.subType = subType; + this.score = score; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The number of Unicode code points preceding this entity in the submitted text. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offset") + private Integer offset; + + /** + * The number of Unicode code points preceding this entity in the submitted text. + * @param offset the value to set + * @return this builder + **/ + public Builder offset(Integer offset) { + this.offset = offset; + this.__explicitlySet__.add("offset"); + return this; + } + /** + * Length of entity text. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("length") + private Integer length; + + /** + * Length of entity text. + * @param length the value to set + * @return this builder + **/ + public Builder length(Integer length) { + this.length = length; + this.__explicitlySet__.add("length"); + return this; + } + /** + * Entity text like name of person, location, and so on. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("text") + private String text; + + /** + * Entity text like name of person, location, and so on. + * @param text the value to set + * @return this builder + **/ + public Builder text(String text) { + this.text = text; + this.__explicitlySet__.add("text"); + return this; + } + /** + * Sub-type of entity text like GPE for LOCATION type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subType") + private String subType; + + /** + * Sub-type of entity text like GPE for LOCATION type. + * @param subType the value to set + * @return this builder + **/ + public Builder subType(String subType) { + this.subType = subType; + this.__explicitlySet__.add("subType"); + return this; + } + /** + * Score or confidence for detected entity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("score") + private Double score; + + /** + * Score or confidence for detected entity. + * @param score the value to set + * @return this builder + **/ + public Builder score(Double score) { + this.score = score; + this.__explicitlySet__.add("score"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MetaInfo build() { + MetaInfo model = + new MetaInfo(this.offset, this.length, this.text, this.subType, this.score); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MetaInfo model) { + if (model.wasPropertyExplicitlySet("offset")) { + this.offset(model.getOffset()); + } + if (model.wasPropertyExplicitlySet("length")) { + this.length(model.getLength()); + } + if (model.wasPropertyExplicitlySet("text")) { + this.text(model.getText()); + } + if (model.wasPropertyExplicitlySet("subType")) { + this.subType(model.getSubType()); + } + if (model.wasPropertyExplicitlySet("score")) { + this.score(model.getScore()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The number of Unicode code points preceding this entity in the submitted text. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offset") + private final Integer offset; + + /** + * The number of Unicode code points preceding this entity in the submitted text. + * @return the value + **/ + public Integer getOffset() { + return offset; + } + + /** + * Length of entity text. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("length") + private final Integer length; + + /** + * Length of entity text. + * @return the value + **/ + public Integer getLength() { + return length; + } + + /** + * Entity text like name of person, location, and so on. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("text") + private final String text; + + /** + * Entity text like name of person, location, and so on. + * @return the value + **/ + public String getText() { + return text; + } + + /** + * Sub-type of entity text like GPE for LOCATION type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subType") + private final String subType; + + /** + * Sub-type of entity text like GPE for LOCATION type. + * @return the value + **/ + public String getSubType() { + return subType; + } + + /** + * Score or confidence for detected entity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("score") + private final Double score; + + /** + * Score or confidence for detected entity. + * @return the value + **/ + public Double getScore() { + return score; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MetaInfo("); + sb.append("super=").append(super.toString()); + sb.append("offset=").append(String.valueOf(this.offset)); + sb.append(", length=").append(String.valueOf(this.length)); + sb.append(", text=").append(String.valueOf(this.text)); + sb.append(", subType=").append(String.valueOf(this.subType)); + sb.append(", score=").append(String.valueOf(this.score)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MetaInfo)) { + return false; + } + + MetaInfo other = (MetaInfo) o; + return java.util.Objects.equals(this.offset, other.offset) + && java.util.Objects.equals(this.length, other.length) + && java.util.Objects.equals(this.text, other.text) + && java.util.Objects.equals(this.subType, other.subType) + && java.util.Objects.equals(this.score, other.score) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.offset == null ? 43 : this.offset.hashCode()); + result = (result * PRIME) + (this.length == null ? 43 : this.length.hashCode()); + result = (result * PRIME) + (this.text == null ? 43 : this.text.hashCode()); + result = (result * PRIME) + (this.subType == null ? 43 : this.subType.hashCode()); + result = (result * PRIME) + (this.score == null ? 43 : this.score.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/ModelDetails.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/ModelDetails.java index db1bbf8949c..5af9cbdc65c 100644 --- a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/ModelDetails.java +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/ModelDetails.java @@ -26,6 +26,10 @@ value = PreTrainedKeyPhraseExtractionModelDetails.class, name = "PRE_TRAINED_KEYPHRASE_EXTRACTION" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PreTrainedTranslationModelDetails.class, + name = "PRE_TRAINED_TRANSLATION" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = PreTrainedHealthNluModelDetails.class, name = "PRE_TRAINED_HEALTH_NLU" @@ -34,38 +38,42 @@ value = PreTrainedUniversalModel.class, name = "PRE_TRAINED_UNIVERSAL" ), - @com.fasterxml.jackson.annotation.JsonSubTypes.Type( - value = NamedEntityRecognitionModelDetails.class, - name = "NAMED_ENTITY_RECOGNITION" - ), - @com.fasterxml.jackson.annotation.JsonSubTypes.Type( - value = PiiModelDetails.class, - name = "PII" - ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = PreTrainedLanguageDetectionModelDetails.class, name = "PRE_TRAINED_LANGUAGE_DETECTION" ), - @com.fasterxml.jackson.annotation.JsonSubTypes.Type( - value = PreTrainedNamedEntityRecognitionModelDetails.class, - name = "PRE_TRAINED_NAMED_ENTITY_RECOGNITION" - ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = PreTrainedSentimentAnalysisModelDetails.class, name = "PRE_TRAINED_SENTIMENT_ANALYSIS" ), - @com.fasterxml.jackson.annotation.JsonSubTypes.Type( - value = PreTrainedTextClassificationModelDetails.class, - name = "PRE_TRAINED_TEXT_CLASSIFICATION" - ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = TextClassificationModelDetails.class, name = "TEXT_CLASSIFICATION" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = HealthNluModelDetails.class, + name = "HEALTH_NLU" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = PreTrainedSummarization.class, name = "PRE_TRAINED_SUMMARIZATION" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = NamedEntityRecognitionModelDetails.class, + name = "NAMED_ENTITY_RECOGNITION" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PiiModelDetails.class, + name = "PII" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PreTrainedNamedEntityRecognitionModelDetails.class, + name = "PRE_TRAINED_NAMED_ENTITY_RECOGNITION" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PreTrainedTextClassificationModelDetails.class, + name = "PRE_TRAINED_TEXT_CLASSIFICATION" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = PreTrainedPiiModelDetails.class, name = "PRE_TRAINED_PII" @@ -148,11 +156,12 @@ public enum ModelType { PreTrainedKeyphraseExtraction("PRE_TRAINED_KEYPHRASE_EXTRACTION"), PreTrainedLanguageDetection("PRE_TRAINED_LANGUAGE_DETECTION"), PreTrainedPii("PRE_TRAINED_PII"), - PreTrainedTranslation("PRE_TRAINED_TRANSLATION"), PreTrainedHealthNlu("PRE_TRAINED_HEALTH_NLU"), PreTrainedSummarization("PRE_TRAINED_SUMMARIZATION"), PreTrainedUniversal("PRE_TRAINED_UNIVERSAL"), Pii("PII"), + PreTrainedTranslation("PRE_TRAINED_TRANSLATION"), + HealthNlu("HEALTH_NLU"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/PiiEntityMask.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/PiiEntityMask.java index 5201e0a1b09..65b4ef896d8 100644 --- a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/PiiEntityMask.java +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/PiiEntityMask.java @@ -25,6 +25,23 @@ public final class PiiEntityMask extends PiiEntityMasking { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("exclude") + private java.util.List exclude; + + public Builder exclude(java.util.List exclude) { + this.exclude = exclude; + this.__explicitlySet__.add("exclude"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("shouldDetect") + private Boolean shouldDetect; + + public Builder shouldDetect(Boolean shouldDetect) { + this.shouldDetect = shouldDetect; + this.__explicitlySet__.add("shouldDetect"); + return this; + } /** * Masking character. By default, the character is an asterisk (*) **/ @@ -86,6 +103,8 @@ public Builder isUnmaskedFromEnd(Boolean isUnmaskedFromEnd) { public PiiEntityMask build() { PiiEntityMask model = new PiiEntityMask( + this.exclude, + this.shouldDetect, this.maskingCharacter, this.leaveCharactersUnmasked, this.isUnmaskedFromEnd); @@ -97,6 +116,12 @@ public PiiEntityMask build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(PiiEntityMask model) { + if (model.wasPropertyExplicitlySet("exclude")) { + this.exclude(model.getExclude()); + } + if (model.wasPropertyExplicitlySet("shouldDetect")) { + this.shouldDetect(model.getShouldDetect()); + } if (model.wasPropertyExplicitlySet("maskingCharacter")) { this.maskingCharacter(model.getMaskingCharacter()); } @@ -123,8 +148,12 @@ public Builder toBuilder() { @Deprecated public PiiEntityMask( - String maskingCharacter, Integer leaveCharactersUnmasked, Boolean isUnmaskedFromEnd) { - super(); + java.util.List exclude, + Boolean shouldDetect, + String maskingCharacter, + Integer leaveCharactersUnmasked, + Boolean isUnmaskedFromEnd) { + super(exclude, shouldDetect); this.maskingCharacter = maskingCharacter; this.leaveCharactersUnmasked = leaveCharactersUnmasked; this.isUnmaskedFromEnd = isUnmaskedFromEnd; diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/PiiEntityMasking.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/PiiEntityMasking.java index c3b56ac7b3f..009efd30a19 100644 --- a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/PiiEntityMasking.java +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/PiiEntityMasking.java @@ -35,9 +35,39 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public class PiiEntityMasking extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({}) - protected PiiEntityMasking() { + @java.beans.ConstructorProperties({"exclude", "shouldDetect"}) + protected PiiEntityMasking(java.util.List exclude, Boolean shouldDetect) { super(); + this.exclude = exclude; + this.shouldDetect = shouldDetect; + } + + /** + * List of offsets/entities to be removed from anonymization. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exclude") + private final java.util.List exclude; + + /** + * List of offsets/entities to be removed from anonymization. + * @return the value + **/ + public java.util.List getExclude() { + return exclude; + } + + /** + * To include excluded entities from masking in detected entities or not. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldDetect") + private final Boolean shouldDetect; + + /** + * To include excluded entities from masking in detected entities or not. + * @return the value + **/ + public Boolean getShouldDetect() { + return shouldDetect; } @Override @@ -54,6 +84,8 @@ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("PiiEntityMasking("); sb.append("super=").append(super.toString()); + sb.append("exclude=").append(String.valueOf(this.exclude)); + sb.append(", shouldDetect=").append(String.valueOf(this.shouldDetect)); sb.append(")"); return sb.toString(); } @@ -68,13 +100,17 @@ public boolean equals(Object o) { } PiiEntityMasking other = (PiiEntityMasking) o; - return super.equals(other); + return java.util.Objects.equals(this.exclude, other.exclude) + && java.util.Objects.equals(this.shouldDetect, other.shouldDetect) + && super.equals(other); } @Override public int hashCode() { final int PRIME = 59; int result = 1; + result = (result * PRIME) + (this.exclude == null ? 43 : this.exclude.hashCode()); + result = (result * PRIME) + (this.shouldDetect == null ? 43 : this.shouldDetect.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/PiiEntityRemove.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/PiiEntityRemove.java index d7d47b1f49d..4ab5e5c108d 100644 --- a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/PiiEntityRemove.java +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/PiiEntityRemove.java @@ -25,12 +25,29 @@ public final class PiiEntityRemove extends PiiEntityMasking { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("exclude") + private java.util.List exclude; + + public Builder exclude(java.util.List exclude) { + this.exclude = exclude; + this.__explicitlySet__.add("exclude"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("shouldDetect") + private Boolean shouldDetect; + + public Builder shouldDetect(Boolean shouldDetect) { + this.shouldDetect = shouldDetect; + this.__explicitlySet__.add("shouldDetect"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public PiiEntityRemove build() { - PiiEntityRemove model = new PiiEntityRemove(); + PiiEntityRemove model = new PiiEntityRemove(this.exclude, this.shouldDetect); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -39,6 +56,12 @@ public PiiEntityRemove build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(PiiEntityRemove model) { + if (model.wasPropertyExplicitlySet("exclude")) { + this.exclude(model.getExclude()); + } + if (model.wasPropertyExplicitlySet("shouldDetect")) { + this.shouldDetect(model.getShouldDetect()); + } return this; } } @@ -55,8 +78,8 @@ public Builder toBuilder() { } @Deprecated - public PiiEntityRemove() { - super(); + public PiiEntityRemove(java.util.List exclude, Boolean shouldDetect) { + super(exclude, shouldDetect); } @Override diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/PiiEntityReplace.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/PiiEntityReplace.java index e1dbc9ef43c..14405431161 100644 --- a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/PiiEntityReplace.java +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/PiiEntityReplace.java @@ -25,6 +25,23 @@ public final class PiiEntityReplace extends PiiEntityMasking { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("exclude") + private java.util.List exclude; + + public Builder exclude(java.util.List exclude) { + this.exclude = exclude; + this.__explicitlySet__.add("exclude"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("shouldDetect") + private Boolean shouldDetect; + + public Builder shouldDetect(Boolean shouldDetect) { + this.shouldDetect = shouldDetect; + this.__explicitlySet__.add("shouldDetect"); + return this; + } /** * Replace entities with given sequence of characters. By default PII entity will be replaced with . **/ @@ -46,7 +63,8 @@ public Builder replaceWith(String replaceWith) { private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public PiiEntityReplace build() { - PiiEntityReplace model = new PiiEntityReplace(this.replaceWith); + PiiEntityReplace model = + new PiiEntityReplace(this.exclude, this.shouldDetect, this.replaceWith); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -55,6 +73,12 @@ public PiiEntityReplace build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(PiiEntityReplace model) { + if (model.wasPropertyExplicitlySet("exclude")) { + this.exclude(model.getExclude()); + } + if (model.wasPropertyExplicitlySet("shouldDetect")) { + this.shouldDetect(model.getShouldDetect()); + } if (model.wasPropertyExplicitlySet("replaceWith")) { this.replaceWith(model.getReplaceWith()); } @@ -74,8 +98,9 @@ public Builder toBuilder() { } @Deprecated - public PiiEntityReplace(String replaceWith) { - super(); + public PiiEntityReplace( + java.util.List exclude, Boolean shouldDetect, String replaceWith) { + super(exclude, shouldDetect); this.replaceWith = replaceWith; } diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/PreTrainedTranslationModelDetails.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/PreTrainedTranslationModelDetails.java new file mode 100644 index 00000000000..143702a2557 --- /dev/null +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/PreTrainedTranslationModelDetails.java @@ -0,0 +1,157 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.ailanguage.model; + +/** + * Possible pre trained translation model information. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20221001") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PreTrainedTranslationModelDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "modelType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PreTrainedTranslationModelDetails extends ModelDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("languageCode") + private String languageCode; + + public Builder languageCode(String languageCode) { + this.languageCode = languageCode; + this.__explicitlySet__.add("languageCode"); + return this; + } + /** + * Optional pre trained model version. If nothing specified latest pre trained model will be used. + * Supported versions can be found at /modelTypes/{modelType} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * Optional pre trained model version. If nothing specified latest pre trained model will be used. + * Supported versions can be found at /modelTypes/{modelType} + * + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PreTrainedTranslationModelDetails build() { + PreTrainedTranslationModelDetails model = + new PreTrainedTranslationModelDetails(this.languageCode, this.version); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PreTrainedTranslationModelDetails model) { + if (model.wasPropertyExplicitlySet("languageCode")) { + this.languageCode(model.getLanguageCode()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PreTrainedTranslationModelDetails(String languageCode, String version) { + super(languageCode); + this.version = version; + } + + /** + * Optional pre trained model version. If nothing specified latest pre trained model will be used. + * Supported versions can be found at /modelTypes/{modelType} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * Optional pre trained model version. If nothing specified latest pre trained model will be used. + * Supported versions can be found at /modelTypes/{modelType} + * + * @return the value + **/ + public String getVersion() { + return version; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PreTrainedTranslationModelDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PreTrainedTranslationModelDetails)) { + return false; + } + + PreTrainedTranslationModelDetails other = (PreTrainedTranslationModelDetails) o; + return java.util.Objects.equals(this.version, other.version) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + return result; + } +} diff --git a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/UpdateEndpointDetails.java b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/UpdateEndpointDetails.java index 0f11da312ca..5a0938b30d7 100644 --- a/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/UpdateEndpointDetails.java +++ b/bmc-ailanguage/src/main/java/com/oracle/bmc/ailanguage/model/UpdateEndpointDetails.java @@ -24,6 +24,7 @@ public final class UpdateEndpointDetails @Deprecated @java.beans.ConstructorProperties({ "displayName", + "alias", "description", "modelId", "inferenceUnits", @@ -32,6 +33,7 @@ public final class UpdateEndpointDetails }) public UpdateEndpointDetails( String displayName, + String alias, String description, String modelId, Integer inferenceUnits, @@ -39,6 +41,7 @@ public UpdateEndpointDetails( java.util.Map> definedTags) { super(); this.displayName = displayName; + this.alias = alias; this.description = description; this.modelId = modelId; this.inferenceUnits = inferenceUnits; @@ -64,6 +67,22 @@ public Builder displayName(String displayName) { this.__explicitlySet__.add("displayName"); return this; } + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @param alias the value to set + * @return this builder + **/ + public Builder alias(String alias) { + this.alias = alias; + this.__explicitlySet__.add("alias"); + return this; + } /** * A short description of the endpoint. **/ @@ -161,6 +180,7 @@ public UpdateEndpointDetails build() { UpdateEndpointDetails model = new UpdateEndpointDetails( this.displayName, + this.alias, this.description, this.modelId, this.inferenceUnits, @@ -177,6 +197,9 @@ public Builder copy(UpdateEndpointDetails model) { if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } + if (model.wasPropertyExplicitlySet("alias")) { + this.alias(model.getAlias()); + } if (model.wasPropertyExplicitlySet("description")) { this.description(model.getDescription()); } @@ -221,6 +244,20 @@ public String getDisplayName() { return displayName; } + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private final String alias; + + /** + * Unique name across user tenancy in a region to identify an endpoint to be used for inferencing. + * @return the value + **/ + public String getAlias() { + return alias; + } + /** * A short description of the endpoint. **/ @@ -314,6 +351,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("UpdateEndpointDetails("); sb.append("super=").append(super.toString()); sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", alias=").append(String.valueOf(this.alias)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", modelId=").append(String.valueOf(this.modelId)); sb.append(", inferenceUnits=").append(String.valueOf(this.inferenceUnits)); @@ -334,6 +372,7 @@ public boolean equals(Object o) { UpdateEndpointDetails other = (UpdateEndpointDetails) o; return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.alias, other.alias) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.modelId, other.modelId) && java.util.Objects.equals(this.inferenceUnits, other.inferenceUnits) @@ -347,6 +386,7 @@ public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.alias == null ? 43 : this.alias.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); result = (result * PRIME) + (this.modelId == null ? 43 : this.modelId.hashCode()); result = diff --git a/bmc-aispeech/pom.xml b/bmc-aispeech/pom.xml index d15d5b48747..81a86cee246 100644 --- a/bmc-aispeech/pom.xml +++ b/bmc-aispeech/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-aispeech @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeech.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeech.java index 7f919e4b110..7851d6949eb 100644 --- a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeech.java +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeech.java @@ -83,6 +83,19 @@ public interface AIServiceSpeech extends AutoCloseable { */ CancelTranscriptionTaskResponse cancelTranscriptionTask(CancelTranscriptionTaskRequest request); + /** + * Moves a Customization resource into a different compartment. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ChangeCustomizationCompartment API. + */ + ChangeCustomizationCompartmentResponse changeCustomizationCompartment( + ChangeCustomizationCompartmentRequest request); + /** * Moves a transcription Job resource into a different compartment. * @param request The request object containing the details to send @@ -96,6 +109,33 @@ public interface AIServiceSpeech extends AutoCloseable { ChangeTranscriptionJobCompartmentResponse changeTranscriptionJobCompartment( ChangeTranscriptionJobCompartmentRequest request); + /** + * Creates a new Customization. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateCustomization API. + */ + CreateCustomizationResponse createCustomization(CreateCustomizationRequest request); + + /** + * Returns an authentication token to the user. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateRealtimeSessionToken API. + */ + CreateRealtimeSessionTokenResponse createRealtimeSessionToken( + CreateRealtimeSessionTokenRequest request); + /** * Creates a new Transcription Job. * @@ -109,6 +149,18 @@ ChangeTranscriptionJobCompartmentResponse changeTranscriptionJobCompartment( */ CreateTranscriptionJobResponse createTranscriptionJob(CreateTranscriptionJobRequest request); + /** + * Delete Customization and its metadata from tenancy. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteCustomization API. + */ + DeleteCustomizationResponse deleteCustomization(DeleteCustomizationRequest request); + /** * Delete API cleans job, tasks and the related metadata. However the generated transcriptions in customer tenancy will not be deleted. * @param request The request object containing the details to send @@ -121,6 +173,18 @@ ChangeTranscriptionJobCompartmentResponse changeTranscriptionJobCompartment( */ DeleteTranscriptionJobResponse deleteTranscriptionJob(DeleteTranscriptionJobRequest request); + /** + * Gets a Customization by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetCustomization API. + */ + GetCustomizationResponse getCustomization(GetCustomizationRequest request); + /** * Gets a Transcription Job by identifier * @param request The request object containing the details to send @@ -145,6 +209,19 @@ ChangeTranscriptionJobCompartmentResponse changeTranscriptionJobCompartment( */ GetTranscriptionTaskResponse getTranscriptionTask(GetTranscriptionTaskRequest request); + /** + * Returns a list of Customizations. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListCustomizations API. + */ + ListCustomizationsResponse listCustomizations(ListCustomizationsRequest request); + /** * Returns a list of Transcription Jobs. * @@ -171,6 +248,44 @@ ChangeTranscriptionJobCompartmentResponse changeTranscriptionJobCompartment( */ ListTranscriptionTasksResponse listTranscriptionTasks(ListTranscriptionTasksRequest request); + /** + * Returns a list of speakers available to the user to choose from based on language code and voice type provided. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListVoices API. + */ + ListVoicesResponse listVoices(ListVoicesRequest request); + + /** + * Creates an audio for the given input text based on other input parameters like language, voice type, etc. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use SynthesizeSpeech API. + */ + SynthesizeSpeechResponse synthesizeSpeech(SynthesizeSpeechRequest request); + + /** + * Updates a Customization by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateCustomization API. + */ + UpdateCustomizationResponse updateCustomization(UpdateCustomizationRequest request); + /** * Updates the Transcription Job * @param request The request object containing the details to send diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeechAsync.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeechAsync.java index 787380e44f2..35a4dab9af6 100644 --- a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeechAsync.java +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeechAsync.java @@ -90,6 +90,24 @@ java.util.concurrent.Future cancelTranscription CancelTranscriptionTaskRequest, CancelTranscriptionTaskResponse> handler); + /** + * Moves a Customization resource into a different compartment. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + changeCustomizationCompartment( + ChangeCustomizationCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeCustomizationCompartmentRequest, + ChangeCustomizationCompartmentResponse> + handler); + /** * Moves a transcription Job resource into a different compartment. * @@ -108,6 +126,40 @@ java.util.concurrent.Future cancelTranscription ChangeTranscriptionJobCompartmentResponse> handler); + /** + * Creates a new Customization. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createCustomization( + CreateCustomizationRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateCustomizationRequest, CreateCustomizationResponse> + handler); + + /** + * Returns an authentication token to the user. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createRealtimeSessionToken( + CreateRealtimeSessionTokenRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateRealtimeSessionTokenRequest, CreateRealtimeSessionTokenResponse> + handler); + /** * Creates a new Transcription Job. * @@ -125,6 +177,22 @@ java.util.concurrent.Future createTranscriptionJ CreateTranscriptionJobRequest, CreateTranscriptionJobResponse> handler); + /** + * Delete Customization and its metadata from tenancy. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteCustomization( + DeleteCustomizationRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteCustomizationRequest, DeleteCustomizationResponse> + handler); + /** * Delete API cleans job, tasks and the related metadata. However the generated transcriptions in customer tenancy will not be deleted. * @@ -141,6 +209,21 @@ java.util.concurrent.Future deleteTranscriptionJ DeleteTranscriptionJobRequest, DeleteTranscriptionJobResponse> handler); + /** + * Gets a Customization by identifier + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getCustomization( + GetCustomizationRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Gets a Transcription Job by identifier * @@ -173,6 +256,23 @@ java.util.concurrent.Future getTranscriptionTask( GetTranscriptionTaskRequest, GetTranscriptionTaskResponse> handler); + /** + * Returns a list of Customizations. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listCustomizations( + ListCustomizationsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListCustomizationsRequest, ListCustomizationsResponse> + handler); + /** * Returns a list of Transcription Jobs. * @@ -207,6 +307,53 @@ java.util.concurrent.Future listTranscriptionTas ListTranscriptionTasksRequest, ListTranscriptionTasksResponse> handler); + /** + * Returns a list of speakers available to the user to choose from based on language code and voice type provided. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listVoices( + ListVoicesRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Creates an audio for the given input text based on other input parameters like language, voice type, etc. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future synthesizeSpeech( + SynthesizeSpeechRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Updates a Customization by identifier + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateCustomization( + UpdateCustomizationRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateCustomizationRequest, UpdateCustomizationResponse> + handler); + /** * Updates the Transcription Job * diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeechAsyncClient.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeechAsyncClient.java index e36735b6645..be7c0987026 100644 --- a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeechAsyncClient.java +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeechAsyncClient.java @@ -297,6 +297,11 @@ public AIServiceSpeechAsyncClient( if (endpoint != null) { setEndpoint(endpoint); } + if (com.oracle.bmc.http.ApacheUtils.isExtraStreamLogsEnabled()) { + LOG.warn( + com.oracle.bmc.http.ApacheUtils.getStreamWarningMessage( + "AIServiceSpeechAsyncClient", "synthesizeSpeech")); + } } /** @@ -556,6 +561,64 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + changeCustomizationCompartment( + ChangeCustomizationCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeCustomizationCompartmentRequest, + ChangeCustomizationCompartmentResponse> + handler) { + LOG.trace("Called async changeCustomizationCompartment"); + final ChangeCustomizationCompartmentRequest interceptedRequest = + ChangeCustomizationCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeCustomizationCompartmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceSpeech", + "ChangeCustomizationCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/speech/20220101/Customization/ChangeCustomizationCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeCustomizationCompartmentResponse> + transformer = + ChangeCustomizationCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeCustomizationCompartmentRequest, + ChangeCustomizationCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeCustomizationCompartmentRequest, + ChangeCustomizationCompartmentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeCustomizationCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeCustomizationCompartmentRequest, ChangeCustomizationCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future changeTranscriptionJobCompartment( @@ -615,6 +678,116 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future createCustomization( + CreateCustomizationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateCustomizationRequest, CreateCustomizationResponse> + handler) { + LOG.trace("Called async createCustomization"); + final CreateCustomizationRequest interceptedRequest = + CreateCustomizationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateCustomizationConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceSpeech", + "CreateCustomization", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/speech/20220101/Customization/CreateCustomization"); + final java.util.function.Function + transformer = + CreateCustomizationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateCustomizationRequest, CreateCustomizationResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateCustomizationRequest, CreateCustomizationResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateCustomizationDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateCustomizationRequest, CreateCustomizationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + createRealtimeSessionToken( + CreateRealtimeSessionTokenRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateRealtimeSessionTokenRequest, + CreateRealtimeSessionTokenResponse> + handler) { + LOG.trace("Called async createRealtimeSessionToken"); + final CreateRealtimeSessionTokenRequest interceptedRequest = + CreateRealtimeSessionTokenConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateRealtimeSessionTokenConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceSpeech", + "CreateRealtimeSessionToken", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/speech/20220101/RealtimeSessionToken/CreateRealtimeSessionToken"); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateRealtimeSessionTokenResponse> + transformer = + CreateRealtimeSessionTokenConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateRealtimeSessionTokenRequest, CreateRealtimeSessionTokenResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateRealtimeSessionTokenRequest, + CreateRealtimeSessionTokenResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateRealtimeSessionTokenDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateRealtimeSessionTokenRequest, CreateRealtimeSessionTokenResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future createTranscriptionJob( CreateTranscriptionJobRequest request, @@ -668,6 +841,54 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future deleteCustomization( + DeleteCustomizationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteCustomizationRequest, DeleteCustomizationResponse> + handler) { + LOG.trace("Called async deleteCustomization"); + final DeleteCustomizationRequest interceptedRequest = + DeleteCustomizationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteCustomizationConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceSpeech", + "DeleteCustomization", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/speech/20220101/Customization/DeleteCustomization"); + final java.util.function.Function + transformer = + DeleteCustomizationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteCustomizationRequest, DeleteCustomizationResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteCustomizationRequest, DeleteCustomizationResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteCustomizationRequest, DeleteCustomizationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteTranscriptionJob( DeleteTranscriptionJobRequest request, @@ -716,6 +937,52 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future getCustomization( + GetCustomizationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetCustomizationRequest, GetCustomizationResponse> + handler) { + LOG.trace("Called async getCustomization"); + final GetCustomizationRequest interceptedRequest = + GetCustomizationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetCustomizationConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceSpeech", + "GetCustomization", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/speech/20220101/Customization/GetCustomization"); + final java.util.function.Function + transformer = + GetCustomizationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetCustomizationRequest, GetCustomizationResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetCustomizationRequest, GetCustomizationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getTranscriptionJob( GetTranscriptionJobRequest request, @@ -810,6 +1077,52 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future listCustomizations( + ListCustomizationsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListCustomizationsRequest, ListCustomizationsResponse> + handler) { + LOG.trace("Called async listCustomizations"); + final ListCustomizationsRequest interceptedRequest = + ListCustomizationsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListCustomizationsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceSpeech", + "ListCustomizations", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/speech/20220101/Customization/ListCustomizations"); + final java.util.function.Function + transformer = + ListCustomizationsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListCustomizationsRequest, ListCustomizationsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListCustomizationsRequest, ListCustomizationsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listTranscriptionJobs( ListTranscriptionJobsRequest request, @@ -904,6 +1217,152 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future listVoices( + ListVoicesRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listVoices"); + final ListVoicesRequest interceptedRequest = ListVoicesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListVoicesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceSpeech", + "ListVoices", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/speech/20220101/Voice/ListVoices"); + final java.util.function.Function + transformer = + ListVoicesConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListVoicesRequest, ListVoicesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListVoicesRequest, ListVoicesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future synthesizeSpeech( + SynthesizeSpeechRequest request, + final com.oracle.bmc.responses.AsyncHandler< + SynthesizeSpeechRequest, SynthesizeSpeechResponse> + handler) { + LOG.trace("Called async synthesizeSpeech"); + final SynthesizeSpeechRequest interceptedRequest = + SynthesizeSpeechConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SynthesizeSpeechConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceSpeech", + "SynthesizeSpeech", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/speech/20220101/SynthesizeSpeech/SynthesizeSpeech"); + final java.util.function.Function + transformer = + SynthesizeSpeechConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + SynthesizeSpeechRequest, SynthesizeSpeechResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getSynthesizeSpeechDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + SynthesizeSpeechRequest, SynthesizeSpeechResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateCustomization( + UpdateCustomizationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateCustomizationRequest, UpdateCustomizationResponse> + handler) { + LOG.trace("Called async updateCustomization"); + final UpdateCustomizationRequest interceptedRequest = + UpdateCustomizationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateCustomizationConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceSpeech", + "UpdateCustomization", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/speech/20220101/Customization/UpdateCustomization"); + final java.util.function.Function + transformer = + UpdateCustomizationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateCustomizationRequest, UpdateCustomizationResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateCustomizationRequest, UpdateCustomizationResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateCustomizationDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateCustomizationRequest, UpdateCustomizationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateTranscriptionJob( UpdateTranscriptionJobRequest request, diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeechClient.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeechClient.java index e93c429d8a0..611cc3397de 100644 --- a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeechClient.java +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeechClient.java @@ -375,6 +375,11 @@ protected AIServiceSpeechClient( if (endpoint != null) { setEndpoint(endpoint); } + if (com.oracle.bmc.http.ApacheUtils.isExtraStreamLogsEnabled()) { + LOG.warn( + com.oracle.bmc.http.ApacheUtils.getStreamWarningMessage( + "AIServiceSpeechClient", "synthesizeSpeech")); + } } /** @@ -628,6 +633,51 @@ public CancelTranscriptionTaskResponse cancelTranscriptionTask( }); } + @Override + public ChangeCustomizationCompartmentResponse changeCustomizationCompartment( + ChangeCustomizationCompartmentRequest request) { + LOG.trace("Called changeCustomizationCompartment"); + final ChangeCustomizationCompartmentRequest interceptedRequest = + ChangeCustomizationCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeCustomizationCompartmentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceSpeech", + "ChangeCustomizationCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/speech/20220101/Customization/ChangeCustomizationCompartment"); + java.util.function.Function< + javax.ws.rs.core.Response, ChangeCustomizationCompartmentResponse> + transformer = + ChangeCustomizationCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeCustomizationCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeTranscriptionJobCompartmentResponse changeTranscriptionJobCompartment( ChangeTranscriptionJobCompartmentRequest request) { @@ -673,6 +723,92 @@ public ChangeTranscriptionJobCompartmentResponse changeTranscriptionJobCompartme }); } + @Override + public CreateCustomizationResponse createCustomization(CreateCustomizationRequest request) { + LOG.trace("Called createCustomization"); + final CreateCustomizationRequest interceptedRequest = + CreateCustomizationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateCustomizationConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceSpeech", + "CreateCustomization", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/speech/20220101/Customization/CreateCustomization"); + java.util.function.Function + transformer = + CreateCustomizationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateCustomizationDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateRealtimeSessionTokenResponse createRealtimeSessionToken( + CreateRealtimeSessionTokenRequest request) { + LOG.trace("Called createRealtimeSessionToken"); + final CreateRealtimeSessionTokenRequest interceptedRequest = + CreateRealtimeSessionTokenConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateRealtimeSessionTokenConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceSpeech", + "CreateRealtimeSessionToken", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/speech/20220101/RealtimeSessionToken/CreateRealtimeSessionToken"); + java.util.function.Function + transformer = + CreateRealtimeSessionTokenConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getCreateRealtimeSessionTokenDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public CreateTranscriptionJobResponse createTranscriptionJob( CreateTranscriptionJobRequest request) { @@ -716,6 +852,45 @@ public CreateTranscriptionJobResponse createTranscriptionJob( }); } + @Override + public DeleteCustomizationResponse deleteCustomization(DeleteCustomizationRequest request) { + LOG.trace("Called deleteCustomization"); + final DeleteCustomizationRequest interceptedRequest = + DeleteCustomizationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteCustomizationConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceSpeech", + "DeleteCustomization", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/speech/20220101/Customization/DeleteCustomization"); + java.util.function.Function + transformer = + DeleteCustomizationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DeleteTranscriptionJobResponse deleteTranscriptionJob( DeleteTranscriptionJobRequest request) { @@ -756,6 +931,43 @@ public DeleteTranscriptionJobResponse deleteTranscriptionJob( }); } + @Override + public GetCustomizationResponse getCustomization(GetCustomizationRequest request) { + LOG.trace("Called getCustomization"); + final GetCustomizationRequest interceptedRequest = + GetCustomizationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetCustomizationConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceSpeech", + "GetCustomization", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/speech/20220101/Customization/GetCustomization"); + java.util.function.Function + transformer = + GetCustomizationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetTranscriptionJobResponse getTranscriptionJob(GetTranscriptionJobRequest request) { LOG.trace("Called getTranscriptionJob"); @@ -830,6 +1042,43 @@ public GetTranscriptionTaskResponse getTranscriptionTask(GetTranscriptionTaskReq }); } + @Override + public ListCustomizationsResponse listCustomizations(ListCustomizationsRequest request) { + LOG.trace("Called listCustomizations"); + final ListCustomizationsRequest interceptedRequest = + ListCustomizationsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListCustomizationsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceSpeech", + "ListCustomizations", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/speech/20220101/Customization/ListCustomizations"); + java.util.function.Function + transformer = + ListCustomizationsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListTranscriptionJobsResponse listTranscriptionJobs( ListTranscriptionJobsRequest request) { @@ -906,6 +1155,122 @@ public ListTranscriptionTasksResponse listTranscriptionTasks( }); } + @Override + public ListVoicesResponse listVoices(ListVoicesRequest request) { + LOG.trace("Called listVoices"); + final ListVoicesRequest interceptedRequest = ListVoicesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListVoicesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceSpeech", + "ListVoices", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/speech/20220101/Voice/ListVoices"); + java.util.function.Function transformer = + ListVoicesConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public SynthesizeSpeechResponse synthesizeSpeech(SynthesizeSpeechRequest request) { + LOG.trace("Called synthesizeSpeech"); + final SynthesizeSpeechRequest interceptedRequest = + SynthesizeSpeechConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SynthesizeSpeechConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceSpeech", + "SynthesizeSpeech", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/speech/20220101/SynthesizeSpeech/SynthesizeSpeech"); + java.util.function.Function + transformer = + SynthesizeSpeechConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getSynthesizeSpeechDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateCustomizationResponse updateCustomization(UpdateCustomizationRequest request) { + LOG.trace("Called updateCustomization"); + final UpdateCustomizationRequest interceptedRequest = + UpdateCustomizationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateCustomizationConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "AIServiceSpeech", + "UpdateCustomization", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/speech/20220101/Customization/UpdateCustomization"); + java.util.function.Function + transformer = + UpdateCustomizationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateCustomizationDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateTranscriptionJobResponse updateTranscriptionJob( UpdateTranscriptionJobRequest request) { diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeechPaginators.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeechPaginators.java index 091e6814d54..7adc88ea0df 100644 --- a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeechPaginators.java +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeechPaginators.java @@ -33,6 +33,119 @@ public AIServiceSpeechPaginators(AIServiceSpeech client) { this.client = client; } + /** + * Creates a new iterable which will iterate over the responses received from the listCustomizations operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listCustomizationsResponseIterator( + final ListCustomizationsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListCustomizationsRequest.Builder, ListCustomizationsRequest, + ListCustomizationsResponse>( + new java.util.function.Supplier() { + @Override + public ListCustomizationsRequest.Builder get() { + return ListCustomizationsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListCustomizationsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListCustomizationsRequest.Builder>, + ListCustomizationsRequest>() { + @Override + public ListCustomizationsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListCustomizationsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListCustomizationsRequest, ListCustomizationsResponse>() { + @Override + public ListCustomizationsResponse apply(ListCustomizationsRequest request) { + return client.listCustomizations(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.aispeech.model.CustomizationSummary} objects + * contained in responses from the listCustomizations operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.aispeech.model.CustomizationSummary} objects + * contained in responses received from the service. + */ + public Iterable + listCustomizationsRecordIterator(final ListCustomizationsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListCustomizationsRequest.Builder, ListCustomizationsRequest, + ListCustomizationsResponse, com.oracle.bmc.aispeech.model.CustomizationSummary>( + new java.util.function.Supplier() { + @Override + public ListCustomizationsRequest.Builder get() { + return ListCustomizationsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListCustomizationsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListCustomizationsRequest.Builder>, + ListCustomizationsRequest>() { + @Override + public ListCustomizationsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListCustomizationsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListCustomizationsRequest, ListCustomizationsResponse>() { + @Override + public ListCustomizationsResponse apply(ListCustomizationsRequest request) { + return client.listCustomizations(request); + } + }, + new java.util.function.Function< + ListCustomizationsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListCustomizationsResponse response) { + return response.getCustomizationCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listTranscriptionJobs operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeechWaiters.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeechWaiters.java index 2e270a1a6fb..d39b1af50e1 100644 --- a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeechWaiters.java +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/AIServiceSpeechWaiters.java @@ -24,6 +24,110 @@ public AIServiceSpeechWaiters( this.client = client; } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forCustomization( + GetCustomizationRequest request, + com.oracle.bmc.aispeech.model.Customization.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forCustomization( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forCustomization( + GetCustomizationRequest request, + com.oracle.bmc.aispeech.model.Customization.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forCustomization( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forCustomization( + GetCustomizationRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.aispeech.model.Customization.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forCustomization( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for Customization. + private com.oracle.bmc.waiter.Waiter + forCustomization( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetCustomizationRequest request, + final com.oracle.bmc.aispeech.model.Customization.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetCustomizationRequest, GetCustomizationResponse>() { + @Override + public GetCustomizationResponse apply(GetCustomizationRequest request) { + return client.getCustomization(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetCustomizationResponse response) { + return targetStatesSet.contains( + response.getCustomization().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.aispeech.model.Customization.LifecycleState + .Deleted)), + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/ChangeCustomizationCompartmentConverter.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/ChangeCustomizationCompartmentConverter.java new file mode 100644 index 00000000000..dbe4fdbed91 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/ChangeCustomizationCompartmentConverter.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.aispeech.model.*; +import com.oracle.bmc.aispeech.requests.*; +import com.oracle.bmc.aispeech.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class ChangeCustomizationCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ChangeCustomizationCompartmentConverter.class); + + public static com.oracle.bmc.aispeech.requests.ChangeCustomizationCompartmentRequest + interceptRequest( + com.oracle.bmc.aispeech.requests.ChangeCustomizationCompartmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.aispeech.requests.ChangeCustomizationCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getCustomizationId(), "customizationId must not be blank"); + Validate.notNull( + request.getChangeCustomizationCompartmentDetails(), + "changeCustomizationCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220101") + .path("customizations") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCustomizationId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.ChangeCustomizationCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.ChangeCustomizationCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.ChangeCustomizationCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses + .ChangeCustomizationCompartmentResponse>() { + @Override + public com.oracle.bmc.aispeech.responses + .ChangeCustomizationCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.aispeech.responses.ChangeCustomizationCompartmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.aispeech.responses + .ChangeCustomizationCompartmentResponse.Builder + builder = + com.oracle.bmc.aispeech.responses + .ChangeCustomizationCompartmentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.aispeech.responses + .ChangeCustomizationCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/CreateCustomizationConverter.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/CreateCustomizationConverter.java new file mode 100644 index 00000000000..cbdfeb3f3aa --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/CreateCustomizationConverter.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.aispeech.model.*; +import com.oracle.bmc.aispeech.requests.*; +import com.oracle.bmc.aispeech.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class CreateCustomizationConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateCustomizationConverter.class); + + public static com.oracle.bmc.aispeech.requests.CreateCustomizationRequest interceptRequest( + com.oracle.bmc.aispeech.requests.CreateCustomizationRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.aispeech.requests.CreateCustomizationRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateCustomizationDetails(), "createCustomizationDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20220101").path("customizations"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.CreateCustomizationResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.CreateCustomizationResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.CreateCustomizationResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.CreateCustomizationResponse>() { + @Override + public com.oracle.bmc.aispeech.responses.CreateCustomizationResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.aispeech.responses.CreateCustomizationResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.aispeech.model + .Customization>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.aispeech.model.Customization + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.aispeech.model.Customization + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.aispeech.model.Customization> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.aispeech.responses.CreateCustomizationResponse + .Builder + builder = + com.oracle.bmc.aispeech.responses + .CreateCustomizationResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.customization(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.aispeech.responses.CreateCustomizationResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/CreateRealtimeSessionTokenConverter.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/CreateRealtimeSessionTokenConverter.java new file mode 100644 index 00000000000..b7b42a0ac3a --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/CreateRealtimeSessionTokenConverter.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.aispeech.model.*; +import com.oracle.bmc.aispeech.requests.*; +import com.oracle.bmc.aispeech.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class CreateRealtimeSessionTokenConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateRealtimeSessionTokenConverter.class); + + public static com.oracle.bmc.aispeech.requests.CreateRealtimeSessionTokenRequest + interceptRequest( + com.oracle.bmc.aispeech.requests.CreateRealtimeSessionTokenRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.aispeech.requests.CreateRealtimeSessionTokenRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateRealtimeSessionTokenDetails(), + "createRealtimeSessionTokenDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220101") + .path("actions") + .path("realtimeSessionToken"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.CreateRealtimeSessionTokenResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.CreateRealtimeSessionTokenResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.CreateRealtimeSessionTokenResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses + .CreateRealtimeSessionTokenResponse>() { + @Override + public com.oracle.bmc.aispeech.responses + .CreateRealtimeSessionTokenResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.aispeech.responses.CreateRealtimeSessionTokenResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.aispeech.model + .RealtimeSessionToken>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.aispeech.model + .RealtimeSessionToken + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.aispeech.model + .RealtimeSessionToken + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.aispeech.model.RealtimeSessionToken> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.aispeech.responses.CreateRealtimeSessionTokenResponse + .Builder + builder = + com.oracle.bmc.aispeech.responses + .CreateRealtimeSessionTokenResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.realtimeSessionToken(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.aispeech.responses.CreateRealtimeSessionTokenResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/DeleteCustomizationConverter.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/DeleteCustomizationConverter.java new file mode 100644 index 00000000000..43d34aa30fb --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/DeleteCustomizationConverter.java @@ -0,0 +1,132 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.aispeech.model.*; +import com.oracle.bmc.aispeech.requests.*; +import com.oracle.bmc.aispeech.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class DeleteCustomizationConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteCustomizationConverter.class); + + public static com.oracle.bmc.aispeech.requests.DeleteCustomizationRequest interceptRequest( + com.oracle.bmc.aispeech.requests.DeleteCustomizationRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.aispeech.requests.DeleteCustomizationRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getCustomizationId(), "customizationId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220101") + .path("customizations") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCustomizationId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.DeleteCustomizationResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.DeleteCustomizationResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.DeleteCustomizationResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.DeleteCustomizationResponse>() { + @Override + public com.oracle.bmc.aispeech.responses.DeleteCustomizationResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.aispeech.responses.DeleteCustomizationResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.aispeech.responses.DeleteCustomizationResponse + .Builder + builder = + com.oracle.bmc.aispeech.responses + .DeleteCustomizationResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.aispeech.responses.DeleteCustomizationResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/GetCustomizationConverter.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/GetCustomizationConverter.java new file mode 100644 index 00000000000..18827b03a70 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/GetCustomizationConverter.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.aispeech.model.*; +import com.oracle.bmc.aispeech.requests.*; +import com.oracle.bmc.aispeech.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class GetCustomizationConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetCustomizationConverter.class); + + public static com.oracle.bmc.aispeech.requests.GetCustomizationRequest interceptRequest( + com.oracle.bmc.aispeech.requests.GetCustomizationRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.aispeech.requests.GetCustomizationRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getCustomizationId(), "customizationId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220101") + .path("customizations") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCustomizationId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.GetCustomizationResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.GetCustomizationResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.GetCustomizationResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.GetCustomizationResponse>() { + @Override + public com.oracle.bmc.aispeech.responses.GetCustomizationResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.aispeech.responses.GetCustomizationResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.aispeech.model + .Customization>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.aispeech.model.Customization + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.aispeech.model.Customization + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.aispeech.model.Customization> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.aispeech.responses.GetCustomizationResponse.Builder + builder = + com.oracle.bmc.aispeech.responses + .GetCustomizationResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.customization(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.aispeech.responses.GetCustomizationResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/ListCustomizationsConverter.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/ListCustomizationsConverter.java new file mode 100644 index 00000000000..19b12b16310 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/ListCustomizationsConverter.java @@ -0,0 +1,216 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.aispeech.model.*; +import com.oracle.bmc.aispeech.requests.*; +import com.oracle.bmc.aispeech.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class ListCustomizationsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListCustomizationsConverter.class); + + public static com.oracle.bmc.aispeech.requests.ListCustomizationsRequest interceptRequest( + com.oracle.bmc.aispeech.requests.ListCustomizationsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.aispeech.requests.ListCustomizationsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20220101").path("customizations"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.ListCustomizationsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.ListCustomizationsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.ListCustomizationsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.ListCustomizationsResponse>() { + @Override + public com.oracle.bmc.aispeech.responses.ListCustomizationsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.aispeech.responses.ListCustomizationsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.aispeech.model + .CustomizationCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.aispeech.model + .CustomizationCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.aispeech.model + .CustomizationCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.aispeech.model + .CustomizationCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.aispeech.responses.ListCustomizationsResponse.Builder + builder = + com.oracle.bmc.aispeech.responses + .ListCustomizationsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.customizationCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcPrevPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-prev-page"); + if (opcPrevPageHeader.isPresent()) { + builder.opcPrevPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-prev-page", + opcPrevPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.aispeech.responses.ListCustomizationsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/ListVoicesConverter.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/ListVoicesConverter.java new file mode 100644 index 00000000000..c9d7a0f246b --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/ListVoicesConverter.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.aispeech.model.*; +import com.oracle.bmc.aispeech.requests.*; +import com.oracle.bmc.aispeech.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class ListVoicesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListVoicesConverter.class); + + public static com.oracle.bmc.aispeech.requests.ListVoicesRequest interceptRequest( + com.oracle.bmc.aispeech.requests.ListVoicesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.aispeech.requests.ListVoicesRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20220101").path("voices"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getModelName() != null) { + target = + target.queryParam( + "modelName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getModelName().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.aispeech.responses.ListVoicesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.aispeech.responses.ListVoicesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.ListVoicesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.ListVoicesResponse>() { + @Override + public com.oracle.bmc.aispeech.responses.ListVoicesResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.aispeech.responses.ListVoicesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.aispeech.model + .VoiceCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.aispeech.model.VoiceCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.aispeech.model.VoiceCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.aispeech.model.VoiceCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.aispeech.responses.ListVoicesResponse.Builder + builder = + com.oracle.bmc.aispeech.responses.ListVoicesResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.voiceCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.aispeech.responses.ListVoicesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/SynthesizeSpeechConverter.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/SynthesizeSpeechConverter.java new file mode 100644 index 00000000000..63db48b38df --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/SynthesizeSpeechConverter.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.internal.http; + +import com.oracle.bmc.aispeech.model.*; +import com.oracle.bmc.aispeech.requests.*; +import com.oracle.bmc.aispeech.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class SynthesizeSpeechConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SynthesizeSpeechConverter.class); + + public static com.oracle.bmc.aispeech.requests.SynthesizeSpeechRequest interceptRequest( + com.oracle.bmc.aispeech.requests.SynthesizeSpeechRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.aispeech.requests.SynthesizeSpeechRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getSynthesizeSpeechDetails(), "synthesizeSpeechDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20220101").path("actions").path("synthesizeSpeech"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept("audio/mpeg", "audio/ogg", "audio/pcm", "audio/json"); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.SynthesizeSpeechResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.SynthesizeSpeechResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.SynthesizeSpeechResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.SynthesizeSpeechResponse>() { + @Override + public com.oracle.bmc.aispeech.responses.SynthesizeSpeechResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.aispeech.responses.SynthesizeSpeechResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.io.InputStream>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + java.io.InputStream.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + java.io.InputStream.class); + } + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.aispeech.responses.SynthesizeSpeechResponse.Builder + builder = + com.oracle.bmc.aispeech.responses + .SynthesizeSpeechResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.inputStream(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.aispeech.responses.SynthesizeSpeechResponse + responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/UpdateCustomizationConverter.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/UpdateCustomizationConverter.java new file mode 100644 index 00000000000..0e1c4117137 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/internal/http/UpdateCustomizationConverter.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.aispeech.model.*; +import com.oracle.bmc.aispeech.requests.*; +import com.oracle.bmc.aispeech.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class UpdateCustomizationConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateCustomizationConverter.class); + + public static com.oracle.bmc.aispeech.requests.UpdateCustomizationRequest interceptRequest( + com.oracle.bmc.aispeech.requests.UpdateCustomizationRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.aispeech.requests.UpdateCustomizationRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getCustomizationId(), "customizationId must not be blank"); + Validate.notNull( + request.getUpdateCustomizationDetails(), "updateCustomizationDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220101") + .path("customizations") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCustomizationId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.UpdateCustomizationResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.UpdateCustomizationResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.UpdateCustomizationResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.aispeech.responses.UpdateCustomizationResponse>() { + @Override + public com.oracle.bmc.aispeech.responses.UpdateCustomizationResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.aispeech.responses.UpdateCustomizationResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.aispeech.model + .Customization>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.aispeech.model.Customization + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.aispeech.model.Customization + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.aispeech.model.Customization> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.aispeech.responses.UpdateCustomizationResponse + .Builder + builder = + com.oracle.bmc.aispeech.responses + .UpdateCustomizationResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.customization(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.aispeech.responses.UpdateCustomizationResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/ChangeCustomizationCompartmentDetails.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/ChangeCustomizationCompartmentDetails.java new file mode 100644 index 00000000000..de3b431da22 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/ChangeCustomizationCompartmentDetails.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Details for changing the compartment of a Customization. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeCustomizationCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeCustomizationCompartmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeCustomizationCompartmentDetails(String compartmentId) { + super(); + this.compartmentId = compartmentId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment + * where the resource should be moved. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment + * where the resource should be moved. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeCustomizationCompartmentDetails build() { + ChangeCustomizationCompartmentDetails model = + new ChangeCustomizationCompartmentDetails(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeCustomizationCompartmentDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment + * where the resource should be moved. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment + * where the resource should be moved. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ChangeCustomizationCompartmentDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeCustomizationCompartmentDetails)) { + return false; + } + + ChangeCustomizationCompartmentDetails other = (ChangeCustomizationCompartmentDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CreateCustomizationDetails.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CreateCustomizationDetails.java new file mode 100644 index 00000000000..5d4c8c5eca5 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CreateCustomizationDetails.java @@ -0,0 +1,414 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * The information about the new Customization. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateCustomizationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateCustomizationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "alias", + "displayName", + "description", + "modelDetails", + "trainingDataset", + "freeformTags", + "definedTags" + }) + public CreateCustomizationDetails( + String compartmentId, + String alias, + String displayName, + String description, + CustomizationModelDetails modelDetails, + CustomizationDatasetDetails trainingDataset, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.compartmentId = compartmentId; + this.alias = alias; + this.displayName = displayName; + this.description = description; + this.modelDetails = modelDetails; + this.trainingDataset = trainingDataset; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Customization Details Alias + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private String alias; + + /** + * Customization Details Alias + * @param alias the value to set + * @return this builder + **/ + public Builder alias(String alias) { + this.alias = alias; + this.__explicitlySet__.add("alias"); + return this; + } + /** + * A user-friendly display name for the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly display name for the job. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A short description of the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A short description of the job. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("modelDetails") + private CustomizationModelDetails modelDetails; + + public Builder modelDetails(CustomizationModelDetails modelDetails) { + this.modelDetails = modelDetails; + this.__explicitlySet__.add("modelDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("trainingDataset") + private CustomizationDatasetDetails trainingDataset; + + public Builder trainingDataset(CustomizationDatasetDetails trainingDataset) { + this.trainingDataset = trainingDataset; + this.__explicitlySet__.add("trainingDataset"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateCustomizationDetails build() { + CreateCustomizationDetails model = + new CreateCustomizationDetails( + this.compartmentId, + this.alias, + this.displayName, + this.description, + this.modelDetails, + this.trainingDataset, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateCustomizationDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("alias")) { + this.alias(model.getAlias()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("modelDetails")) { + this.modelDetails(model.getModelDetails()); + } + if (model.wasPropertyExplicitlySet("trainingDataset")) { + this.trainingDataset(model.getTrainingDataset()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Customization Details Alias + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private final String alias; + + /** + * Customization Details Alias + * @return the value + **/ + public String getAlias() { + return alias; + } + + /** + * A user-friendly display name for the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly display name for the job. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A short description of the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A short description of the job. + * @return the value + **/ + public String getDescription() { + return description; + } + + @com.fasterxml.jackson.annotation.JsonProperty("modelDetails") + private final CustomizationModelDetails modelDetails; + + public CustomizationModelDetails getModelDetails() { + return modelDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("trainingDataset") + private final CustomizationDatasetDetails trainingDataset; + + public CustomizationDatasetDetails getTrainingDataset() { + return trainingDataset; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateCustomizationDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", alias=").append(String.valueOf(this.alias)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", modelDetails=").append(String.valueOf(this.modelDetails)); + sb.append(", trainingDataset=").append(String.valueOf(this.trainingDataset)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateCustomizationDetails)) { + return false; + } + + CreateCustomizationDetails other = (CreateCustomizationDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.alias, other.alias) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.modelDetails, other.modelDetails) + && java.util.Objects.equals(this.trainingDataset, other.trainingDataset) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.alias == null ? 43 : this.alias.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.modelDetails == null ? 43 : this.modelDetails.hashCode()); + result = + (result * PRIME) + + (this.trainingDataset == null ? 43 : this.trainingDataset.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CreateRealtimeSessionTokenDetails.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CreateRealtimeSessionTokenDetails.java new file mode 100644 index 00000000000..a660d34ca13 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CreateRealtimeSessionTokenDetails.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Request sent to the realtime authentication endpoint in order to obtain the auth token. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateRealtimeSessionTokenDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateRealtimeSessionTokenDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId", "freeformTags", "definedTags"}) + public CreateRealtimeSessionTokenDetails( + String compartmentId, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.compartmentId = compartmentId; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateRealtimeSessionTokenDetails build() { + CreateRealtimeSessionTokenDetails model = + new CreateRealtimeSessionTokenDetails( + this.compartmentId, this.freeformTags, this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateRealtimeSessionTokenDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateRealtimeSessionTokenDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateRealtimeSessionTokenDetails)) { + return false; + } + + CreateRealtimeSessionTokenDetails other = (CreateRealtimeSessionTokenDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/Customization.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/Customization.java new file mode 100644 index 00000000000..f2d0a136afa --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/Customization.java @@ -0,0 +1,755 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Description of a Customization. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Customization.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Customization extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "compartmentId", + "alias", + "description", + "modelDetails", + "lifecycleState", + "lifecycleDetails", + "timeCreated", + "timeUpdated", + "trainingDataset", + "entities", + "freeformTags", + "definedTags", + "systemTags" + }) + public Customization( + String id, + String displayName, + String compartmentId, + String alias, + String description, + CustomizationModelDetails modelDetails, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated, + CustomizationDatasetDetails trainingDataset, + java.util.List entities, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.compartmentId = compartmentId; + this.alias = alias; + this.description = description; + this.modelDetails = modelDetails; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.trainingDataset = trainingDataset; + this.entities = entities; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly display name for the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly display name for the job. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Customization Details Alias + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private String alias; + + /** + * Customization Details Alias + * @param alias the value to set + * @return this builder + **/ + public Builder alias(String alias) { + this.alias = alias; + this.__explicitlySet__.add("alias"); + return this; + } + /** + * A short description of the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A short description of the job. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("modelDetails") + private CustomizationModelDetails modelDetails; + + public Builder modelDetails(CustomizationModelDetails modelDetails) { + this.modelDetails = modelDetails; + this.__explicitlySet__.add("modelDetails"); + return this; + } + /** + * The current state of the Job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Job. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Customization Created time. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Customization Created time. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * Customization Updated time. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * Customization Updated time. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("trainingDataset") + private CustomizationDatasetDetails trainingDataset; + + public Builder trainingDataset(CustomizationDatasetDetails trainingDataset) { + this.trainingDataset = trainingDataset; + this.__explicitlySet__.add("trainingDataset"); + return this; + } + /** + * array of referenced entities + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entities") + private java.util.List entities; + + /** + * array of referenced entities + * @param entities the value to set + * @return this builder + **/ + public Builder entities(java.util.List entities) { + this.entities = entities; + this.__explicitlySet__.add("entities"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}}. + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Customization build() { + Customization model = + new Customization( + this.id, + this.displayName, + this.compartmentId, + this.alias, + this.description, + this.modelDetails, + this.lifecycleState, + this.lifecycleDetails, + this.timeCreated, + this.timeUpdated, + this.trainingDataset, + this.entities, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Customization model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("alias")) { + this.alias(model.getAlias()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("modelDetails")) { + this.modelDetails(model.getModelDetails()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("trainingDataset")) { + this.trainingDataset(model.getTrainingDataset()); + } + if (model.wasPropertyExplicitlySet("entities")) { + this.entities(model.getEntities()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly display name for the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly display name for the job. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Customization Details Alias + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private final String alias; + + /** + * Customization Details Alias + * @return the value + **/ + public String getAlias() { + return alias; + } + + /** + * A short description of the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A short description of the job. + * @return the value + **/ + public String getDescription() { + return description; + } + + @com.fasterxml.jackson.annotation.JsonProperty("modelDetails") + private final CustomizationModelDetails modelDetails; + + public CustomizationModelDetails getModelDetails() { + return modelDetails; + } + + /** + * The current state of the Job. + **/ + public enum LifecycleState { + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + Updating("UPDATING"), + Active("ACTIVE"), + Creating("CREATING"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the Job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Job. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Customization Created time. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Customization Created time. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * Customization Updated time. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * Customization Updated time. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("trainingDataset") + private final CustomizationDatasetDetails trainingDataset; + + public CustomizationDatasetDetails getTrainingDataset() { + return trainingDataset; + } + + /** + * array of referenced entities + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entities") + private final java.util.List entities; + + /** + * array of referenced entities + * @return the value + **/ + public java.util.List getEntities() { + return entities; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}}. + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Customization("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", alias=").append(String.valueOf(this.alias)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", modelDetails=").append(String.valueOf(this.modelDetails)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", trainingDataset=").append(String.valueOf(this.trainingDataset)); + sb.append(", entities=").append(String.valueOf(this.entities)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Customization)) { + return false; + } + + Customization other = (Customization) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.alias, other.alias) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.modelDetails, other.modelDetails) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.trainingDataset, other.trainingDataset) + && java.util.Objects.equals(this.entities, other.entities) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.alias == null ? 43 : this.alias.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.modelDetails == null ? 43 : this.modelDetails.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.trainingDataset == null ? 43 : this.trainingDataset.hashCode()); + result = (result * PRIME) + (this.entities == null ? 43 : this.entities.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationCollection.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationCollection.java new file mode 100644 index 00000000000..dbc4df909cf --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Results of a Customization search. Contains both CustomizationSummary items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CustomizationCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CustomizationCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public CustomizationCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of Customization training jobs. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of Customization training jobs. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CustomizationCollection build() { + CustomizationCollection model = new CustomizationCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CustomizationCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of Customization training jobs. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of Customization training jobs. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CustomizationCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CustomizationCollection)) { + return false; + } + + CustomizationCollection other = (CustomizationCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationDatasetDetails.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationDatasetDetails.java new file mode 100644 index 00000000000..a831f4ccb09 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationDatasetDetails.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Customization Training Dataset + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "datasetType", + defaultImpl = CustomizationDatasetDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ObjectStorageDataset.class, + name = "OBJECT_STORAGE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = EntityListDataset.class, + name = "ENTITY_LIST" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CustomizationDatasetDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected CustomizationDatasetDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CustomizationDatasetDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CustomizationDatasetDetails)) { + return false; + } + + CustomizationDatasetDetails other = (CustomizationDatasetDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Possible data sets + **/ + public enum DatasetType { + ObjectStorage("OBJECT_STORAGE"), + EntityList("ENTITY_LIST"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DatasetType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DatasetType v : DatasetType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DatasetType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DatasetType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DatasetType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationInference.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationInference.java new file mode 100644 index 00000000000..24d94e912a2 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationInference.java @@ -0,0 +1,269 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Inference payload for using Customization in Realtime Speech or Async Speech + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CustomizationInference.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CustomizationInference + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "customizationId", + "customizationAlias", + "compartmentId", + "entities" + }) + public CustomizationInference( + String customizationId, + String customizationAlias, + String compartmentId, + java.util.List entities) { + super(); + this.customizationId = customizationId; + this.customizationAlias = customizationAlias; + this.compartmentId = compartmentId; + this.entities = entities; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the customization to use. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customizationId") + private String customizationId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the customization to use. + * @param customizationId the value to set + * @return this builder + **/ + public Builder customizationId(String customizationId) { + this.customizationId = customizationId; + this.__explicitlySet__.add("customizationId"); + return this; + } + /** + * Alias of the customization + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customizationAlias") + private String customizationAlias; + + /** + * Alias of the customization + * @param customizationAlias the value to set + * @return this builder + **/ + public Builder customizationAlias(String customizationAlias) { + this.customizationAlias = customizationAlias; + this.__explicitlySet__.add("customizationAlias"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where customization is present + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where customization is present + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Entities present in the customization + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entities") + private java.util.List entities; + + /** + * Entities present in the customization + * @param entities the value to set + * @return this builder + **/ + public Builder entities(java.util.List entities) { + this.entities = entities; + this.__explicitlySet__.add("entities"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CustomizationInference build() { + CustomizationInference model = + new CustomizationInference( + this.customizationId, + this.customizationAlias, + this.compartmentId, + this.entities); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CustomizationInference model) { + if (model.wasPropertyExplicitlySet("customizationId")) { + this.customizationId(model.getCustomizationId()); + } + if (model.wasPropertyExplicitlySet("customizationAlias")) { + this.customizationAlias(model.getCustomizationAlias()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("entities")) { + this.entities(model.getEntities()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the customization to use. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customizationId") + private final String customizationId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the customization to use. + * @return the value + **/ + public String getCustomizationId() { + return customizationId; + } + + /** + * Alias of the customization + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customizationAlias") + private final String customizationAlias; + + /** + * Alias of the customization + * @return the value + **/ + public String getCustomizationAlias() { + return customizationAlias; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where customization is present + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where customization is present + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Entities present in the customization + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entities") + private final java.util.List entities; + + /** + * Entities present in the customization + * @return the value + **/ + public java.util.List getEntities() { + return entities; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CustomizationInference("); + sb.append("super=").append(super.toString()); + sb.append("customizationId=").append(String.valueOf(this.customizationId)); + sb.append(", customizationAlias=").append(String.valueOf(this.customizationAlias)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", entities=").append(String.valueOf(this.entities)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CustomizationInference)) { + return false; + } + + CustomizationInference other = (CustomizationInference) o; + return java.util.Objects.equals(this.customizationId, other.customizationId) + && java.util.Objects.equals(this.customizationAlias, other.customizationAlias) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.entities, other.entities) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.customizationId == null ? 43 : this.customizationId.hashCode()); + result = + (result * PRIME) + + (this.customizationAlias == null + ? 43 + : this.customizationAlias.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.entities == null ? 43 : this.entities.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationInferenceEntity.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationInferenceEntity.java new file mode 100644 index 00000000000..7415cce9dc0 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationInferenceEntity.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Entity Object for customization inference payload + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CustomizationInferenceEntity.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CustomizationInferenceEntity + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"entityType", "customizationId", "customizationAlias"}) + public CustomizationInferenceEntity( + String entityType, String customizationId, String customizationAlias) { + super(); + this.entityType = entityType; + this.customizationId = customizationId; + this.customizationAlias = customizationAlias; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Entity type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private String entityType; + + /** + * Entity type + * @param entityType the value to set + * @return this builder + **/ + public Builder entityType(String entityType) { + this.entityType = entityType; + this.__explicitlySet__.add("entityType"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the customization to use. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customizationId") + private String customizationId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the customization to use. + * @param customizationId the value to set + * @return this builder + **/ + public Builder customizationId(String customizationId) { + this.customizationId = customizationId; + this.__explicitlySet__.add("customizationId"); + return this; + } + /** + * Alias of the customization + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customizationAlias") + private String customizationAlias; + + /** + * Alias of the customization + * @param customizationAlias the value to set + * @return this builder + **/ + public Builder customizationAlias(String customizationAlias) { + this.customizationAlias = customizationAlias; + this.__explicitlySet__.add("customizationAlias"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CustomizationInferenceEntity build() { + CustomizationInferenceEntity model = + new CustomizationInferenceEntity( + this.entityType, this.customizationId, this.customizationAlias); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CustomizationInferenceEntity model) { + if (model.wasPropertyExplicitlySet("entityType")) { + this.entityType(model.getEntityType()); + } + if (model.wasPropertyExplicitlySet("customizationId")) { + this.customizationId(model.getCustomizationId()); + } + if (model.wasPropertyExplicitlySet("customizationAlias")) { + this.customizationAlias(model.getCustomizationAlias()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Entity type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private final String entityType; + + /** + * Entity type + * @return the value + **/ + public String getEntityType() { + return entityType; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the customization to use. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customizationId") + private final String customizationId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the customization to use. + * @return the value + **/ + public String getCustomizationId() { + return customizationId; + } + + /** + * Alias of the customization + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customizationAlias") + private final String customizationAlias; + + /** + * Alias of the customization + * @return the value + **/ + public String getCustomizationAlias() { + return customizationAlias; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CustomizationInferenceEntity("); + sb.append("super=").append(super.toString()); + sb.append("entityType=").append(String.valueOf(this.entityType)); + sb.append(", customizationId=").append(String.valueOf(this.customizationId)); + sb.append(", customizationAlias=").append(String.valueOf(this.customizationAlias)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CustomizationInferenceEntity)) { + return false; + } + + CustomizationInferenceEntity other = (CustomizationInferenceEntity) o; + return java.util.Objects.equals(this.entityType, other.entityType) + && java.util.Objects.equals(this.customizationId, other.customizationId) + && java.util.Objects.equals(this.customizationAlias, other.customizationAlias) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.entityType == null ? 43 : this.entityType.hashCode()); + result = + (result * PRIME) + + (this.customizationId == null ? 43 : this.customizationId.hashCode()); + result = + (result * PRIME) + + (this.customizationAlias == null + ? 43 + : this.customizationAlias.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationModelDetails.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationModelDetails.java new file mode 100644 index 00000000000..f16ac82992b --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationModelDetails.java @@ -0,0 +1,265 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Customization details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CustomizationModelDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CustomizationModelDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"domain", "languageCode"}) + public CustomizationModelDetails(Domain domain, String languageCode) { + super(); + this.domain = domain; + this.languageCode = languageCode; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Customization Domain + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domain") + private Domain domain; + + /** + * Customization Domain + * @param domain the value to set + * @return this builder + **/ + public Builder domain(Domain domain) { + this.domain = domain; + this.__explicitlySet__.add("domain"); + return this; + } + /** + * Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. + * - en-US: English - United States + * - es-ES: Spanish - Spain + * - pt-BR: Portuguese - Brazil + * - en-GB: English - Great Britain + * - en-AU: English - Australia + * - en-IN: English - India + * - hi-IN: Hindi - India + * - fr-FR: French - France + * - de-DE: German - Germany + * - it-IT: Italian - Italy + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("languageCode") + private String languageCode; + + /** + * Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. + * - en-US: English - United States + * - es-ES: Spanish - Spain + * - pt-BR: Portuguese - Brazil + * - en-GB: English - Great Britain + * - en-AU: English - Australia + * - en-IN: English - India + * - hi-IN: Hindi - India + * - fr-FR: French - France + * - de-DE: German - Germany + * - it-IT: Italian - Italy + * + * @param languageCode the value to set + * @return this builder + **/ + public Builder languageCode(String languageCode) { + this.languageCode = languageCode; + this.__explicitlySet__.add("languageCode"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CustomizationModelDetails build() { + CustomizationModelDetails model = + new CustomizationModelDetails(this.domain, this.languageCode); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CustomizationModelDetails model) { + if (model.wasPropertyExplicitlySet("domain")) { + this.domain(model.getDomain()); + } + if (model.wasPropertyExplicitlySet("languageCode")) { + this.languageCode(model.getLanguageCode()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Customization Domain + **/ + public enum Domain { + Generic("GENERIC"), + Medical("MEDICAL"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Domain.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Domain v : Domain.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Domain(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Domain create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Domain', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Customization Domain + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domain") + private final Domain domain; + + /** + * Customization Domain + * @return the value + **/ + public Domain getDomain() { + return domain; + } + + /** + * Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. + * - en-US: English - United States + * - es-ES: Spanish - Spain + * - pt-BR: Portuguese - Brazil + * - en-GB: English - Great Britain + * - en-AU: English - Australia + * - en-IN: English - India + * - hi-IN: Hindi - India + * - fr-FR: French - France + * - de-DE: German - Germany + * - it-IT: Italian - Italy + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("languageCode") + private final String languageCode; + + /** + * Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. + * - en-US: English - United States + * - es-ES: Spanish - Spain + * - pt-BR: Portuguese - Brazil + * - en-GB: English - Great Britain + * - en-AU: English - Australia + * - en-IN: English - India + * - hi-IN: Hindi - India + * - fr-FR: French - France + * - de-DE: German - Germany + * - it-IT: Italian - Italy + * + * @return the value + **/ + public String getLanguageCode() { + return languageCode; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CustomizationModelDetails("); + sb.append("super=").append(super.toString()); + sb.append("domain=").append(String.valueOf(this.domain)); + sb.append(", languageCode=").append(String.valueOf(this.languageCode)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CustomizationModelDetails)) { + return false; + } + + CustomizationModelDetails other = (CustomizationModelDetails) o; + return java.util.Objects.equals(this.domain, other.domain) + && java.util.Objects.equals(this.languageCode, other.languageCode) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.domain == null ? 43 : this.domain.hashCode()); + result = (result * PRIME) + (this.languageCode == null ? 43 : this.languageCode.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationReferencedEntities.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationReferencedEntities.java new file mode 100644 index 00000000000..605c2183e6e --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationReferencedEntities.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Entities referenced by top level customization. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CustomizationReferencedEntities.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CustomizationReferencedEntities + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"alias", "id", "entityType"}) + public CustomizationReferencedEntities(String alias, String id, String entityType) { + super(); + this.alias = alias; + this.id = id; + this.entityType = entityType; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Alias of default referenced Customization for given entityType + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private String alias; + + /** + * Alias of default referenced Customization for given entityType + * @param alias the value to set + * @return this builder + **/ + public Builder alias(String alias) { + this.alias = alias; + this.__explicitlySet__.add("alias"); + return this; + } + /** + * Customization Id of default referenced Customization for given entityType + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Customization Id of default referenced Customization for given entityType + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Customization Entity Type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private String entityType; + + /** + * Customization Entity Type + * @param entityType the value to set + * @return this builder + **/ + public Builder entityType(String entityType) { + this.entityType = entityType; + this.__explicitlySet__.add("entityType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CustomizationReferencedEntities build() { + CustomizationReferencedEntities model = + new CustomizationReferencedEntities(this.alias, this.id, this.entityType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CustomizationReferencedEntities model) { + if (model.wasPropertyExplicitlySet("alias")) { + this.alias(model.getAlias()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("entityType")) { + this.entityType(model.getEntityType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Alias of default referenced Customization for given entityType + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private final String alias; + + /** + * Alias of default referenced Customization for given entityType + * @return the value + **/ + public String getAlias() { + return alias; + } + + /** + * Customization Id of default referenced Customization for given entityType + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Customization Id of default referenced Customization for given entityType + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Customization Entity Type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private final String entityType; + + /** + * Customization Entity Type + * @return the value + **/ + public String getEntityType() { + return entityType; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CustomizationReferencedEntities("); + sb.append("super=").append(super.toString()); + sb.append("alias=").append(String.valueOf(this.alias)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", entityType=").append(String.valueOf(this.entityType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CustomizationReferencedEntities)) { + return false; + } + + CustomizationReferencedEntities other = (CustomizationReferencedEntities) o; + return java.util.Objects.equals(this.alias, other.alias) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.entityType, other.entityType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.alias == null ? 43 : this.alias.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.entityType == null ? 43 : this.entityType.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationSummary.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationSummary.java new file mode 100644 index 00000000000..51828355e38 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/CustomizationSummary.java @@ -0,0 +1,571 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Summary of the Customization. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CustomizationSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CustomizationSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "compartmentId", + "alias", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public CustomizationSummary( + String id, + String displayName, + String compartmentId, + String alias, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Customization.LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.compartmentId = compartmentId; + this.alias = alias; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly display name for the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly display name for the job. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Customization Summary Alias + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private String alias; + + /** + * Customization Summary Alias + * @param alias the value to set + * @return this builder + **/ + public Builder alias(String alias) { + this.alias = alias; + this.__explicitlySet__.add("alias"); + return this; + } + /** + * Customization Created time. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Customization Created time. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * Customization Updated time. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * Customization Updated time. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of the Speech Job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private Customization.LifecycleState lifecycleState; + + /** + * The current state of the Speech Job. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(Customization.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}}. + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CustomizationSummary build() { + CustomizationSummary model = + new CustomizationSummary( + this.id, + this.displayName, + this.compartmentId, + this.alias, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CustomizationSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("alias")) { + this.alias(model.getAlias()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly display name for the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly display name for the job. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Customization Summary Alias + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private final String alias; + + /** + * Customization Summary Alias + * @return the value + **/ + public String getAlias() { + return alias; + } + + /** + * Customization Created time. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Customization Created time. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * Customization Updated time. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * Customization Updated time. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the Speech Job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final Customization.LifecycleState lifecycleState; + + /** + * The current state of the Speech Job. + * @return the value + **/ + public Customization.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}}. + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CustomizationSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", alias=").append(String.valueOf(this.alias)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CustomizationSummary)) { + return false; + } + + CustomizationSummary other = (CustomizationSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.alias, other.alias) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.alias == null ? 43 : this.alias.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/Entity.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/Entity.java new file mode 100644 index 00000000000..c8ec9afc913 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/Entity.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Entity Object Reference + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Entity.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Entity extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"entityValue", "pronunciations", "weight"}) + public Entity(String entityValue, java.util.List pronunciations, Float weight) { + super(); + this.entityValue = entityValue; + this.pronunciations = pronunciations; + this.weight = weight; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Entity value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityValue") + private String entityValue; + + /** + * Entity value + * @param entityValue the value to set + * @return this builder + **/ + public Builder entityValue(String entityValue) { + this.entityValue = entityValue; + this.__explicitlySet__.add("entityValue"); + return this; + } + /** + * List of pronunciations (minimum 1, maximum 255) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pronunciations") + private java.util.List pronunciations; + + /** + * List of pronunciations (minimum 1, maximum 255) + * @param pronunciations the value to set + * @return this builder + **/ + public Builder pronunciations(java.util.List pronunciations) { + this.pronunciations = pronunciations; + this.__explicitlySet__.add("pronunciations"); + return this; + } + /** + * Entity weight + **/ + @com.fasterxml.jackson.annotation.JsonProperty("weight") + private Float weight; + + /** + * Entity weight + * @param weight the value to set + * @return this builder + **/ + public Builder weight(Float weight) { + this.weight = weight; + this.__explicitlySet__.add("weight"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Entity build() { + Entity model = new Entity(this.entityValue, this.pronunciations, this.weight); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Entity model) { + if (model.wasPropertyExplicitlySet("entityValue")) { + this.entityValue(model.getEntityValue()); + } + if (model.wasPropertyExplicitlySet("pronunciations")) { + this.pronunciations(model.getPronunciations()); + } + if (model.wasPropertyExplicitlySet("weight")) { + this.weight(model.getWeight()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Entity value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityValue") + private final String entityValue; + + /** + * Entity value + * @return the value + **/ + public String getEntityValue() { + return entityValue; + } + + /** + * List of pronunciations (minimum 1, maximum 255) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pronunciations") + private final java.util.List pronunciations; + + /** + * List of pronunciations (minimum 1, maximum 255) + * @return the value + **/ + public java.util.List getPronunciations() { + return pronunciations; + } + + /** + * Entity weight + **/ + @com.fasterxml.jackson.annotation.JsonProperty("weight") + private final Float weight; + + /** + * Entity weight + * @return the value + **/ + public Float getWeight() { + return weight; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Entity("); + sb.append("super=").append(super.toString()); + sb.append("entityValue=").append(String.valueOf(this.entityValue)); + sb.append(", pronunciations=").append(String.valueOf(this.pronunciations)); + sb.append(", weight=").append(String.valueOf(this.weight)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Entity)) { + return false; + } + + Entity other = (Entity) o; + return java.util.Objects.equals(this.entityValue, other.entityValue) + && java.util.Objects.equals(this.pronunciations, other.pronunciations) + && java.util.Objects.equals(this.weight, other.weight) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.entityValue == null ? 43 : this.entityValue.hashCode()); + result = + (result * PRIME) + + (this.pronunciations == null ? 43 : this.pronunciations.hashCode()); + result = (result * PRIME) + (this.weight == null ? 43 : this.weight.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/EntityList.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/EntityList.java new file mode 100644 index 00000000000..ae500fa78b4 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/EntityList.java @@ -0,0 +1,246 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * List of entities of a given type, to be used to train a customization. + * Note: If multiple EntityLists are provided, a separate Customization resource will be created for each EntityList. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = EntityList.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class EntityList extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"alias", "id", "entityType", "entities"}) + public EntityList(String alias, String id, String entityType, java.util.List entities) { + super(); + this.alias = alias; + this.id = id; + this.entityType = entityType; + this.entities = entities; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Alias of existing customization or to associate with new customization created from entityList. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private String alias; + + /** + * Alias of existing customization or to associate with new customization created from entityList. + * @param alias the value to set + * @return this builder + **/ + public Builder alias(String alias) { + this.alias = alias; + this.__explicitlySet__.add("alias"); + return this; + } + /** + * Entity type OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Entity type OCID + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Entity Type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private String entityType; + + /** + * Entity Type + * @param entityType the value to set + * @return this builder + **/ + public Builder entityType(String entityType) { + this.entityType = entityType; + this.__explicitlySet__.add("entityType"); + return this; + } + /** + * List of entities such as names, words or phrases matching the given entityType to add recognition support for + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entities") + private java.util.List entities; + + /** + * List of entities such as names, words or phrases matching the given entityType to add recognition support for + * @param entities the value to set + * @return this builder + **/ + public Builder entities(java.util.List entities) { + this.entities = entities; + this.__explicitlySet__.add("entities"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public EntityList build() { + EntityList model = new EntityList(this.alias, this.id, this.entityType, this.entities); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(EntityList model) { + if (model.wasPropertyExplicitlySet("alias")) { + this.alias(model.getAlias()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("entityType")) { + this.entityType(model.getEntityType()); + } + if (model.wasPropertyExplicitlySet("entities")) { + this.entities(model.getEntities()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Alias of existing customization or to associate with new customization created from entityList. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private final String alias; + + /** + * Alias of existing customization or to associate with new customization created from entityList. + * @return the value + **/ + public String getAlias() { + return alias; + } + + /** + * Entity type OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Entity type OCID + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Entity Type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private final String entityType; + + /** + * Entity Type + * @return the value + **/ + public String getEntityType() { + return entityType; + } + + /** + * List of entities such as names, words or phrases matching the given entityType to add recognition support for + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entities") + private final java.util.List entities; + + /** + * List of entities such as names, words or phrases matching the given entityType to add recognition support for + * @return the value + **/ + public java.util.List getEntities() { + return entities; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("EntityList("); + sb.append("super=").append(super.toString()); + sb.append("alias=").append(String.valueOf(this.alias)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", entityType=").append(String.valueOf(this.entityType)); + sb.append(", entities=").append(String.valueOf(this.entities)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof EntityList)) { + return false; + } + + EntityList other = (EntityList) o; + return java.util.Objects.equals(this.alias, other.alias) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.entityType, other.entityType) + && java.util.Objects.equals(this.entities, other.entities) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.alias == null ? 43 : this.alias.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.entityType == null ? 43 : this.entityType.hashCode()); + result = (result * PRIME) + (this.entities == null ? 43 : this.entities.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/EntityListDataset.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/EntityListDataset.java new file mode 100644 index 00000000000..11832d55c55 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/EntityListDataset.java @@ -0,0 +1,187 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Entity List Dataset + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = EntityListDataset.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "datasetType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class EntityListDataset extends CustomizationDatasetDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of sentences referencing 1 or more entityType matching those defined in the linked entityLists, used to improve accuracy by providing model training context of where/how an entity may appear in a sentence. + * EntityTypes referenced in sentences should be written in all caps surrounded by angled braces (i.e "" if entityType=patient) + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("referenceExamples") + private java.util.List referenceExamples; + + /** + * List of sentences referencing 1 or more entityType matching those defined in the linked entityLists, used to improve accuracy by providing model training context of where/how an entity may appear in a sentence. + * EntityTypes referenced in sentences should be written in all caps surrounded by angled braces (i.e "" if entityType=patient) + * + * @param referenceExamples the value to set + * @return this builder + **/ + public Builder referenceExamples(java.util.List referenceExamples) { + this.referenceExamples = referenceExamples; + this.__explicitlySet__.add("referenceExamples"); + return this; + } + /** + * Array of entityLists + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityList") + private java.util.List entityList; + + /** + * Array of entityLists + * @param entityList the value to set + * @return this builder + **/ + public Builder entityList(java.util.List entityList) { + this.entityList = entityList; + this.__explicitlySet__.add("entityList"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public EntityListDataset build() { + EntityListDataset model = + new EntityListDataset(this.referenceExamples, this.entityList); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(EntityListDataset model) { + if (model.wasPropertyExplicitlySet("referenceExamples")) { + this.referenceExamples(model.getReferenceExamples()); + } + if (model.wasPropertyExplicitlySet("entityList")) { + this.entityList(model.getEntityList()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public EntityListDataset( + java.util.List referenceExamples, java.util.List entityList) { + super(); + this.referenceExamples = referenceExamples; + this.entityList = entityList; + } + + /** + * List of sentences referencing 1 or more entityType matching those defined in the linked entityLists, used to improve accuracy by providing model training context of where/how an entity may appear in a sentence. + * EntityTypes referenced in sentences should be written in all caps surrounded by angled braces (i.e "" if entityType=patient) + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("referenceExamples") + private final java.util.List referenceExamples; + + /** + * List of sentences referencing 1 or more entityType matching those defined in the linked entityLists, used to improve accuracy by providing model training context of where/how an entity may appear in a sentence. + * EntityTypes referenced in sentences should be written in all caps surrounded by angled braces (i.e "" if entityType=patient) + * + * @return the value + **/ + public java.util.List getReferenceExamples() { + return referenceExamples; + } + + /** + * Array of entityLists + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityList") + private final java.util.List entityList; + + /** + * Array of entityLists + * @return the value + **/ + public java.util.List getEntityList() { + return entityList; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("EntityListDataset("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", referenceExamples=").append(String.valueOf(this.referenceExamples)); + sb.append(", entityList=").append(String.valueOf(this.entityList)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof EntityListDataset)) { + return false; + } + + EntityListDataset other = (EntityListDataset) o; + return java.util.Objects.equals(this.referenceExamples, other.referenceExamples) + && java.util.Objects.equals(this.entityList, other.entityList) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.referenceExamples == null ? 43 : this.referenceExamples.hashCode()); + result = (result * PRIME) + (this.entityList == null ? 43 : this.entityList.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/LocationDetails.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/LocationDetails.java new file mode 100644 index 00000000000..d878b3e2415 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/LocationDetails.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Possible object storage location types + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "locationType", + defaultImpl = LocationDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ObjectListDataset.class, + name = "OBJECT_LIST" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class LocationDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected LocationDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("LocationDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof LocationDetails)) { + return false; + } + + LocationDetails other = (LocationDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Possible object storage location types + **/ + public enum LocationType { + ObjectList("OBJECT_LIST"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LocationType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LocationType v : LocationType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LocationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LocationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LocationType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/ObjectListDataset.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/ObjectListDataset.java new file mode 100644 index 00000000000..950307f3734 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/ObjectListDataset.java @@ -0,0 +1,216 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Data source details for object storage + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ObjectListDataset.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "locationType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ObjectListDataset extends LocationDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Object storage bucket name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private String bucketName; + + /** + * Object storage bucket name + * @param bucketName the value to set + * @return this builder + **/ + public Builder bucketName(String bucketName) { + this.bucketName = bucketName; + this.__explicitlySet__.add("bucketName"); + return this; + } + /** + * Object storage namespace + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private String namespaceName; + + /** + * Object storage namespace + * @param namespaceName the value to set + * @return this builder + **/ + public Builder namespaceName(String namespaceName) { + this.namespaceName = namespaceName; + this.__explicitlySet__.add("namespaceName"); + return this; + } + /** + * Array of files (minimum 1, maximum 1024) which need to be processed in the bucket + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectNames") + private java.util.List objectNames; + + /** + * Array of files (minimum 1, maximum 1024) which need to be processed in the bucket + * @param objectNames the value to set + * @return this builder + **/ + public Builder objectNames(java.util.List objectNames) { + this.objectNames = objectNames; + this.__explicitlySet__.add("objectNames"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ObjectListDataset build() { + ObjectListDataset model = + new ObjectListDataset(this.bucketName, this.namespaceName, this.objectNames); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ObjectListDataset model) { + if (model.wasPropertyExplicitlySet("bucketName")) { + this.bucketName(model.getBucketName()); + } + if (model.wasPropertyExplicitlySet("namespaceName")) { + this.namespaceName(model.getNamespaceName()); + } + if (model.wasPropertyExplicitlySet("objectNames")) { + this.objectNames(model.getObjectNames()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ObjectListDataset( + String bucketName, String namespaceName, java.util.List objectNames) { + super(); + this.bucketName = bucketName; + this.namespaceName = namespaceName; + this.objectNames = objectNames; + } + + /** + * Object storage bucket name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private final String bucketName; + + /** + * Object storage bucket name + * @return the value + **/ + public String getBucketName() { + return bucketName; + } + + /** + * Object storage namespace + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private final String namespaceName; + + /** + * Object storage namespace + * @return the value + **/ + public String getNamespaceName() { + return namespaceName; + } + + /** + * Array of files (minimum 1, maximum 1024) which need to be processed in the bucket + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectNames") + private final java.util.List objectNames; + + /** + * Array of files (minimum 1, maximum 1024) which need to be processed in the bucket + * @return the value + **/ + public java.util.List getObjectNames() { + return objectNames; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ObjectListDataset("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", bucketName=").append(String.valueOf(this.bucketName)); + sb.append(", namespaceName=").append(String.valueOf(this.namespaceName)); + sb.append(", objectNames=").append(String.valueOf(this.objectNames)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ObjectListDataset)) { + return false; + } + + ObjectListDataset other = (ObjectListDataset) o; + return java.util.Objects.equals(this.bucketName, other.bucketName) + && java.util.Objects.equals(this.namespaceName, other.namespaceName) + && java.util.Objects.equals(this.objectNames, other.objectNames) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.bucketName == null ? 43 : this.bucketName.hashCode()); + result = + (result * PRIME) + + (this.namespaceName == null ? 43 : this.namespaceName.hashCode()); + result = (result * PRIME) + (this.objectNames == null ? 43 : this.objectNames.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/ObjectStorageDataset.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/ObjectStorageDataset.java new file mode 100644 index 00000000000..a5f6043a531 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/ObjectStorageDataset.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Object Storage Dataset + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ObjectStorageDataset.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "datasetType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ObjectStorageDataset extends CustomizationDatasetDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Entity Type categorizing the following list of words. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private String entityType; + + /** + * Entity Type categorizing the following list of words. + * @param entityType the value to set + * @return this builder + **/ + public Builder entityType(String entityType) { + this.entityType = entityType; + this.__explicitlySet__.add("entityType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("locationDetails") + private LocationDetails locationDetails; + + public Builder locationDetails(LocationDetails locationDetails) { + this.locationDetails = locationDetails; + this.__explicitlySet__.add("locationDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ObjectStorageDataset build() { + ObjectStorageDataset model = + new ObjectStorageDataset(this.entityType, this.locationDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ObjectStorageDataset model) { + if (model.wasPropertyExplicitlySet("entityType")) { + this.entityType(model.getEntityType()); + } + if (model.wasPropertyExplicitlySet("locationDetails")) { + this.locationDetails(model.getLocationDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ObjectStorageDataset(String entityType, LocationDetails locationDetails) { + super(); + this.entityType = entityType; + this.locationDetails = locationDetails; + } + + /** + * Entity Type categorizing the following list of words. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private final String entityType; + + /** + * Entity Type categorizing the following list of words. + * @return the value + **/ + public String getEntityType() { + return entityType; + } + + @com.fasterxml.jackson.annotation.JsonProperty("locationDetails") + private final LocationDetails locationDetails; + + public LocationDetails getLocationDetails() { + return locationDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ObjectStorageDataset("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", entityType=").append(String.valueOf(this.entityType)); + sb.append(", locationDetails=").append(String.valueOf(this.locationDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ObjectStorageDataset)) { + return false; + } + + ObjectStorageDataset other = (ObjectStorageDataset) o; + return java.util.Objects.equals(this.entityType, other.entityType) + && java.util.Objects.equals(this.locationDetails, other.locationDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.entityType == null ? 43 : this.entityType.hashCode()); + result = + (result * PRIME) + + (this.locationDetails == null ? 43 : this.locationDetails.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/Pronunciation.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/Pronunciation.java new file mode 100644 index 00000000000..671d4511be9 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/Pronunciation.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Pronunciation Object Reference + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Pronunciation.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Pronunciation extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"soundsLike", "audio"}) + public Pronunciation(String soundsLike, LocationDetails audio) { + super(); + this.soundsLike = soundsLike; + this.audio = audio; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Written phonetic representation of entity value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("soundsLike") + private String soundsLike; + + /** + * Written phonetic representation of entity value + * @param soundsLike the value to set + * @return this builder + **/ + public Builder soundsLike(String soundsLike) { + this.soundsLike = soundsLike; + this.__explicitlySet__.add("soundsLike"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("audio") + private LocationDetails audio; + + public Builder audio(LocationDetails audio) { + this.audio = audio; + this.__explicitlySet__.add("audio"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Pronunciation build() { + Pronunciation model = new Pronunciation(this.soundsLike, this.audio); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Pronunciation model) { + if (model.wasPropertyExplicitlySet("soundsLike")) { + this.soundsLike(model.getSoundsLike()); + } + if (model.wasPropertyExplicitlySet("audio")) { + this.audio(model.getAudio()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Written phonetic representation of entity value + **/ + @com.fasterxml.jackson.annotation.JsonProperty("soundsLike") + private final String soundsLike; + + /** + * Written phonetic representation of entity value + * @return the value + **/ + public String getSoundsLike() { + return soundsLike; + } + + @com.fasterxml.jackson.annotation.JsonProperty("audio") + private final LocationDetails audio; + + public LocationDetails getAudio() { + return audio; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Pronunciation("); + sb.append("super=").append(super.toString()); + sb.append("soundsLike=").append(String.valueOf(this.soundsLike)); + sb.append(", audio=").append(String.valueOf(this.audio)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Pronunciation)) { + return false; + } + + Pronunciation other = (Pronunciation) o; + return java.util.Objects.equals(this.soundsLike, other.soundsLike) + && java.util.Objects.equals(this.audio, other.audio) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.soundsLike == null ? 43 : this.soundsLike.hashCode()); + result = (result * PRIME) + (this.audio == null ? 43 : this.audio.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessage.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessage.java new file mode 100644 index 00000000000..162bec0ce8a --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessage.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Websocket messages sent between client and service. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "event", + defaultImpl = RealtimeMessage.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = RealtimeMessageError.class, + name = "ERROR" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = RealtimeMessageAckAudio.class, + name = "ACKAUDIO" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = RealtimeMessageConnect.class, + name = "CONNECT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = RealtimeMessageResult.class, + name = "RESULT" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class RealtimeMessage extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"sessionId"}) + protected RealtimeMessage(String sessionId) { + super(); + this.sessionId = sessionId; + } + + /** + * Session ID for the connected session. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sessionId") + private final String sessionId; + + /** + * Session ID for the connected session. + * @return the value + **/ + public String getSessionId() { + return sessionId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RealtimeMessage("); + sb.append("super=").append(super.toString()); + sb.append("sessionId=").append(String.valueOf(this.sessionId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RealtimeMessage)) { + return false; + } + + RealtimeMessage other = (RealtimeMessage) o; + return java.util.Objects.equals(this.sessionId, other.sessionId) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.sessionId == null ? 43 : this.sessionId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Incoming Types of message event sent from Service -> Client + * - RESULT - result + * - ACKAUDIO - ackAudio + * - ERROR - error + * - CONNECT - connect + * Outgoing Types of message event sent from Client -> Service + * - SEND_FINAL_RESULT - sendFinalResult + * + **/ + public enum Event { + Result("RESULT"), + Ackaudio("ACKAUDIO"), + Error("ERROR"), + Connect("CONNECT"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Event v : Event.values()) { + map.put(v.getValue(), v); + } + } + + Event(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Event create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Event: " + key); + } + }; +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageAckAudio.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageAckAudio.java new file mode 100644 index 00000000000..5ade4a87664 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageAckAudio.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * The websocket ack message received from service. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RealtimeMessageAckAudio.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "event" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RealtimeMessageAckAudio extends RealtimeMessage { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("sessionId") + private String sessionId; + + public Builder sessionId(String sessionId) { + this.sessionId = sessionId; + this.__explicitlySet__.add("sessionId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("details") + private RealtimeMessageAckAudioDetails details; + + public Builder details(RealtimeMessageAckAudioDetails details) { + this.details = details; + this.__explicitlySet__.add("details"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RealtimeMessageAckAudio build() { + RealtimeMessageAckAudio model = + new RealtimeMessageAckAudio(this.sessionId, this.details); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RealtimeMessageAckAudio model) { + if (model.wasPropertyExplicitlySet("sessionId")) { + this.sessionId(model.getSessionId()); + } + if (model.wasPropertyExplicitlySet("details")) { + this.details(model.getDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public RealtimeMessageAckAudio(String sessionId, RealtimeMessageAckAudioDetails details) { + super(sessionId); + this.details = details; + } + + @com.fasterxml.jackson.annotation.JsonProperty("details") + private final RealtimeMessageAckAudioDetails details; + + public RealtimeMessageAckAudioDetails getDetails() { + return details; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RealtimeMessageAckAudio("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", details=").append(String.valueOf(this.details)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RealtimeMessageAckAudio)) { + return false; + } + + RealtimeMessageAckAudio other = (RealtimeMessageAckAudio) o; + return java.util.Objects.equals(this.details, other.details) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.details == null ? 43 : this.details.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageAckAudioDetails.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageAckAudioDetails.java new file mode 100644 index 00000000000..50379ad2591 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageAckAudioDetails.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Details object for the websocket ack message received from service. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RealtimeMessageAckAudioDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RealtimeMessageAckAudioDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"number", "offset", "length"}) + public RealtimeMessageAckAudioDetails(Integer number, Integer offset, Integer length) { + super(); + this.number = number; + this.offset = offset; + this.length = length; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Sequence number of the acknowledged packet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("number") + private Integer number; + + /** + * Sequence number of the acknowledged packet. + * @param number the value to set + * @return this builder + **/ + public Builder number(Integer number) { + this.number = number; + this.__explicitlySet__.add("number"); + return this; + } + /** + * Offset of the acknowledged packet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offset") + private Integer offset; + + /** + * Offset of the acknowledged packet. + * @param offset the value to set + * @return this builder + **/ + public Builder offset(Integer offset) { + this.offset = offset; + this.__explicitlySet__.add("offset"); + return this; + } + /** + * Length in bytes of the acknowledged packet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("length") + private Integer length; + + /** + * Length in bytes of the acknowledged packet. + * @param length the value to set + * @return this builder + **/ + public Builder length(Integer length) { + this.length = length; + this.__explicitlySet__.add("length"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RealtimeMessageAckAudioDetails build() { + RealtimeMessageAckAudioDetails model = + new RealtimeMessageAckAudioDetails(this.number, this.offset, this.length); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RealtimeMessageAckAudioDetails model) { + if (model.wasPropertyExplicitlySet("number")) { + this.number(model.getNumber()); + } + if (model.wasPropertyExplicitlySet("offset")) { + this.offset(model.getOffset()); + } + if (model.wasPropertyExplicitlySet("length")) { + this.length(model.getLength()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Sequence number of the acknowledged packet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("number") + private final Integer number; + + /** + * Sequence number of the acknowledged packet. + * @return the value + **/ + public Integer getNumber() { + return number; + } + + /** + * Offset of the acknowledged packet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("offset") + private final Integer offset; + + /** + * Offset of the acknowledged packet. + * @return the value + **/ + public Integer getOffset() { + return offset; + } + + /** + * Length in bytes of the acknowledged packet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("length") + private final Integer length; + + /** + * Length in bytes of the acknowledged packet. + * @return the value + **/ + public Integer getLength() { + return length; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RealtimeMessageAckAudioDetails("); + sb.append("super=").append(super.toString()); + sb.append("number=").append(String.valueOf(this.number)); + sb.append(", offset=").append(String.valueOf(this.offset)); + sb.append(", length=").append(String.valueOf(this.length)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RealtimeMessageAckAudioDetails)) { + return false; + } + + RealtimeMessageAckAudioDetails other = (RealtimeMessageAckAudioDetails) o; + return java.util.Objects.equals(this.number, other.number) + && java.util.Objects.equals(this.offset, other.offset) + && java.util.Objects.equals(this.length, other.length) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.number == null ? 43 : this.number.hashCode()); + result = (result * PRIME) + (this.offset == null ? 43 : this.offset.hashCode()); + result = (result * PRIME) + (this.length == null ? 43 : this.length.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageAuthentication.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageAuthentication.java new file mode 100644 index 00000000000..c7f91d6bfd4 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageAuthentication.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * The payload for authentication. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "authenticationType", + defaultImpl = RealtimeMessageAuthentication.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = RealtimeMessageAuthenticationToken.class, + name = "TOKEN" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = RealtimeMessageAuthenticationCredentials.class, + name = "CREDENTIALS" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class RealtimeMessageAuthentication + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + protected RealtimeMessageAuthentication(String compartmentId) { + super(); + this.compartmentId = compartmentId; + } + + /** + * Compartment ID to be used for authentication/authorization. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Compartment ID to be used for authentication/authorization. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RealtimeMessageAuthentication("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RealtimeMessageAuthentication)) { + return false; + } + + RealtimeMessageAuthentication other = (RealtimeMessageAuthentication) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Type of authentication method to be used. + **/ + public enum AuthenticationType { + Credentials("CREDENTIALS"), + Token("TOKEN"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (AuthenticationType v : AuthenticationType.values()) { + map.put(v.getValue(), v); + } + } + + AuthenticationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AuthenticationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid AuthenticationType: " + key); + } + }; +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageAuthenticationCredentials.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageAuthenticationCredentials.java new file mode 100644 index 00000000000..59f780221cd --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageAuthenticationCredentials.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * The payload for credential-based authentication. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RealtimeMessageAuthenticationCredentials.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "authenticationType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RealtimeMessageAuthenticationCredentials extends RealtimeMessageAuthentication { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The signed request header object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("headers") + private java.util.Map headers; + + /** + * The signed request header object. + * @param headers the value to set + * @return this builder + **/ + public Builder headers(java.util.Map headers) { + this.headers = headers; + this.__explicitlySet__.add("headers"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RealtimeMessageAuthenticationCredentials build() { + RealtimeMessageAuthenticationCredentials model = + new RealtimeMessageAuthenticationCredentials(this.compartmentId, this.headers); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RealtimeMessageAuthenticationCredentials model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("headers")) { + this.headers(model.getHeaders()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public RealtimeMessageAuthenticationCredentials( + String compartmentId, java.util.Map headers) { + super(compartmentId); + this.headers = headers; + } + + /** + * The signed request header object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("headers") + private final java.util.Map headers; + + /** + * The signed request header object. + * @return the value + **/ + public java.util.Map getHeaders() { + return headers; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RealtimeMessageAuthenticationCredentials("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", headers=").append(String.valueOf(this.headers)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RealtimeMessageAuthenticationCredentials)) { + return false; + } + + RealtimeMessageAuthenticationCredentials other = + (RealtimeMessageAuthenticationCredentials) o; + return java.util.Objects.equals(this.headers, other.headers) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.headers == null ? 43 : this.headers.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageAuthenticationToken.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageAuthenticationToken.java new file mode 100644 index 00000000000..7ea7cc645b9 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageAuthenticationToken.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * The payload for JWT based authentication. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RealtimeMessageAuthenticationToken.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "authenticationType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RealtimeMessageAuthenticationToken extends RealtimeMessageAuthentication { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The token (JWT) obtained from the realtime transcription session endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("token") + private String token; + + /** + * The token (JWT) obtained from the realtime transcription session endpoint. + * @param token the value to set + * @return this builder + **/ + public Builder token(String token) { + this.token = token; + this.__explicitlySet__.add("token"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RealtimeMessageAuthenticationToken build() { + RealtimeMessageAuthenticationToken model = + new RealtimeMessageAuthenticationToken(this.compartmentId, this.token); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RealtimeMessageAuthenticationToken model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("token")) { + this.token(model.getToken()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public RealtimeMessageAuthenticationToken(String compartmentId, String token) { + super(compartmentId); + this.token = token; + } + + /** + * The token (JWT) obtained from the realtime transcription session endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("token") + private final String token; + + /** + * The token (JWT) obtained from the realtime transcription session endpoint. + * @return the value + **/ + public String getToken() { + return token; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RealtimeMessageAuthenticationToken("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", token=").append(String.valueOf(this.token)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RealtimeMessageAuthenticationToken)) { + return false; + } + + RealtimeMessageAuthenticationToken other = (RealtimeMessageAuthenticationToken) o; + return java.util.Objects.equals(this.token, other.token) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.token == null ? 43 : this.token.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageConnect.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageConnect.java new file mode 100644 index 00000000000..30cc4ea9126 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageConnect.java @@ -0,0 +1,112 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * The websocket connection message received from service. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RealtimeMessageConnect.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "event" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RealtimeMessageConnect extends RealtimeMessage { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("sessionId") + private String sessionId; + + public Builder sessionId(String sessionId) { + this.sessionId = sessionId; + this.__explicitlySet__.add("sessionId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RealtimeMessageConnect build() { + RealtimeMessageConnect model = new RealtimeMessageConnect(this.sessionId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RealtimeMessageConnect model) { + if (model.wasPropertyExplicitlySet("sessionId")) { + this.sessionId(model.getSessionId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public RealtimeMessageConnect(String sessionId) { + super(sessionId); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RealtimeMessageConnect("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RealtimeMessageConnect)) { + return false; + } + + RealtimeMessageConnect other = (RealtimeMessageConnect) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageError.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageError.java new file mode 100644 index 00000000000..5d4871b2edd --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageError.java @@ -0,0 +1,187 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * The websocket error message received from service. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RealtimeMessageError.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "event" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RealtimeMessageError extends RealtimeMessage { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("sessionId") + private String sessionId; + + public Builder sessionId(String sessionId) { + this.sessionId = sessionId; + this.__explicitlySet__.add("sessionId"); + return this; + } + /** + * Error code. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("code") + private Integer code; + + /** + * Error code. + * @param code the value to set + * @return this builder + **/ + public Builder code(Integer code) { + this.code = code; + this.__explicitlySet__.add("code"); + return this; + } + /** + * Error message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * Error message. + * @param message the value to set + * @return this builder + **/ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RealtimeMessageError build() { + RealtimeMessageError model = + new RealtimeMessageError(this.sessionId, this.code, this.message); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RealtimeMessageError model) { + if (model.wasPropertyExplicitlySet("sessionId")) { + this.sessionId(model.getSessionId()); + } + if (model.wasPropertyExplicitlySet("code")) { + this.code(model.getCode()); + } + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public RealtimeMessageError(String sessionId, Integer code, String message) { + super(sessionId); + this.code = code; + this.message = message; + } + + /** + * Error code. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("code") + private final Integer code; + + /** + * Error code. + * @return the value + **/ + public Integer getCode() { + return code; + } + + /** + * Error message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * Error message. + * @return the value + **/ + public String getMessage() { + return message; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RealtimeMessageError("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", code=").append(String.valueOf(this.code)); + sb.append(", message=").append(String.valueOf(this.message)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RealtimeMessageError)) { + return false; + } + + RealtimeMessageError other = (RealtimeMessageError) o; + return java.util.Objects.equals(this.code, other.code) + && java.util.Objects.equals(this.message, other.message) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.code == null ? 43 : this.code.hashCode()); + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageOut.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageOut.java new file mode 100644 index 00000000000..03a35dc2da0 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageOut.java @@ -0,0 +1,113 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Websocket messages sent by client to the service. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "event", + defaultImpl = RealtimeMessageOut.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = RealtimeMessageSendFinalResult.class, + name = "SEND_FINAL_RESULT" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class RealtimeMessageOut extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected RealtimeMessageOut() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RealtimeMessageOut("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RealtimeMessageOut)) { + return false; + } + + RealtimeMessageOut other = (RealtimeMessageOut) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Outgoing Types of message event sent from Client -> Service + * - SEND_FINAL_RESULT - sendFinalResult + * + **/ + public enum Event { + SendFinalResult("SEND_FINAL_RESULT"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Event v : Event.values()) { + map.put(v.getValue(), v); + } + } + + Event(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Event create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Event: " + key); + } + }; +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageResult.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageResult.java new file mode 100644 index 00000000000..5a9156b17af --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageResult.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * The websocket result message received from service. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RealtimeMessageResult.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "event" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RealtimeMessageResult extends RealtimeMessage { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("sessionId") + private String sessionId; + + public Builder sessionId(String sessionId) { + this.sessionId = sessionId; + this.__explicitlySet__.add("sessionId"); + return this; + } + /** + * List of transcription objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transcriptions") + private java.util.List transcriptions; + + /** + * List of transcription objects. + * @param transcriptions the value to set + * @return this builder + **/ + public Builder transcriptions( + java.util.List transcriptions) { + this.transcriptions = transcriptions; + this.__explicitlySet__.add("transcriptions"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RealtimeMessageResult build() { + RealtimeMessageResult model = + new RealtimeMessageResult(this.sessionId, this.transcriptions); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RealtimeMessageResult model) { + if (model.wasPropertyExplicitlySet("sessionId")) { + this.sessionId(model.getSessionId()); + } + if (model.wasPropertyExplicitlySet("transcriptions")) { + this.transcriptions(model.getTranscriptions()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public RealtimeMessageResult( + String sessionId, java.util.List transcriptions) { + super(sessionId); + this.transcriptions = transcriptions; + } + + /** + * List of transcription objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transcriptions") + private final java.util.List transcriptions; + + /** + * List of transcription objects. + * @return the value + **/ + public java.util.List getTranscriptions() { + return transcriptions; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RealtimeMessageResult("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", transcriptions=").append(String.valueOf(this.transcriptions)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RealtimeMessageResult)) { + return false; + } + + RealtimeMessageResult other = (RealtimeMessageResult) o; + return java.util.Objects.equals(this.transcriptions, other.transcriptions) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.transcriptions == null ? 43 : this.transcriptions.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageResultTranscription.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageResultTranscription.java new file mode 100644 index 00000000000..ae2627af078 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageResultTranscription.java @@ -0,0 +1,387 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Transcription object. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RealtimeMessageResultTranscription.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RealtimeMessageResultTranscription + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "transcription", + "isFinal", + "startTimeInMs", + "endTimeInMs", + "confidence", + "trailingSilence", + "tokens" + }) + public RealtimeMessageResultTranscription( + String transcription, + Boolean isFinal, + Integer startTimeInMs, + Integer endTimeInMs, + Float confidence, + Integer trailingSilence, + java.util.List tokens) { + super(); + this.transcription = transcription; + this.isFinal = isFinal; + this.startTimeInMs = startTimeInMs; + this.endTimeInMs = endTimeInMs; + this.confidence = confidence; + this.trailingSilence = trailingSilence; + this.tokens = tokens; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Transcription text. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transcription") + private String transcription; + + /** + * Transcription text. + * @param transcription the value to set + * @return this builder + **/ + public Builder transcription(String transcription) { + this.transcription = transcription; + this.__explicitlySet__.add("transcription"); + return this; + } + /** + * Whether the transcription is final or partial. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFinal") + private Boolean isFinal; + + /** + * Whether the transcription is final or partial. + * @param isFinal the value to set + * @return this builder + **/ + public Builder isFinal(Boolean isFinal) { + this.isFinal = isFinal; + this.__explicitlySet__.add("isFinal"); + return this; + } + /** + * Start time in milliseconds for the transcription text. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startTimeInMs") + private Integer startTimeInMs; + + /** + * Start time in milliseconds for the transcription text. + * @param startTimeInMs the value to set + * @return this builder + **/ + public Builder startTimeInMs(Integer startTimeInMs) { + this.startTimeInMs = startTimeInMs; + this.__explicitlySet__.add("startTimeInMs"); + return this; + } + /** + * End time in milliseconds for the transcription text. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("endTimeInMs") + private Integer endTimeInMs; + + /** + * End time in milliseconds for the transcription text. + * @param endTimeInMs the value to set + * @return this builder + **/ + public Builder endTimeInMs(Integer endTimeInMs) { + this.endTimeInMs = endTimeInMs; + this.__explicitlySet__.add("endTimeInMs"); + return this; + } + /** + * Confidence for the transcription text. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("confidence") + private Float confidence; + + /** + * Confidence for the transcription text. + * @param confidence the value to set + * @return this builder + **/ + public Builder confidence(Float confidence) { + this.confidence = confidence; + this.__explicitlySet__.add("confidence"); + return this; + } + /** + * Trailing silence after the transcription text. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trailingSilence") + private Integer trailingSilence; + + /** + * Trailing silence after the transcription text. + * @param trailingSilence the value to set + * @return this builder + **/ + public Builder trailingSilence(Integer trailingSilence) { + this.trailingSilence = trailingSilence; + this.__explicitlySet__.add("trailingSilence"); + return this; + } + /** + * Array of individual transcription tokens. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tokens") + private java.util.List tokens; + + /** + * Array of individual transcription tokens. + * @param tokens the value to set + * @return this builder + **/ + public Builder tokens(java.util.List tokens) { + this.tokens = tokens; + this.__explicitlySet__.add("tokens"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RealtimeMessageResultTranscription build() { + RealtimeMessageResultTranscription model = + new RealtimeMessageResultTranscription( + this.transcription, + this.isFinal, + this.startTimeInMs, + this.endTimeInMs, + this.confidence, + this.trailingSilence, + this.tokens); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RealtimeMessageResultTranscription model) { + if (model.wasPropertyExplicitlySet("transcription")) { + this.transcription(model.getTranscription()); + } + if (model.wasPropertyExplicitlySet("isFinal")) { + this.isFinal(model.getIsFinal()); + } + if (model.wasPropertyExplicitlySet("startTimeInMs")) { + this.startTimeInMs(model.getStartTimeInMs()); + } + if (model.wasPropertyExplicitlySet("endTimeInMs")) { + this.endTimeInMs(model.getEndTimeInMs()); + } + if (model.wasPropertyExplicitlySet("confidence")) { + this.confidence(model.getConfidence()); + } + if (model.wasPropertyExplicitlySet("trailingSilence")) { + this.trailingSilence(model.getTrailingSilence()); + } + if (model.wasPropertyExplicitlySet("tokens")) { + this.tokens(model.getTokens()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Transcription text. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("transcription") + private final String transcription; + + /** + * Transcription text. + * @return the value + **/ + public String getTranscription() { + return transcription; + } + + /** + * Whether the transcription is final or partial. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFinal") + private final Boolean isFinal; + + /** + * Whether the transcription is final or partial. + * @return the value + **/ + public Boolean getIsFinal() { + return isFinal; + } + + /** + * Start time in milliseconds for the transcription text. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startTimeInMs") + private final Integer startTimeInMs; + + /** + * Start time in milliseconds for the transcription text. + * @return the value + **/ + public Integer getStartTimeInMs() { + return startTimeInMs; + } + + /** + * End time in milliseconds for the transcription text. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("endTimeInMs") + private final Integer endTimeInMs; + + /** + * End time in milliseconds for the transcription text. + * @return the value + **/ + public Integer getEndTimeInMs() { + return endTimeInMs; + } + + /** + * Confidence for the transcription text. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("confidence") + private final Float confidence; + + /** + * Confidence for the transcription text. + * @return the value + **/ + public Float getConfidence() { + return confidence; + } + + /** + * Trailing silence after the transcription text. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trailingSilence") + private final Integer trailingSilence; + + /** + * Trailing silence after the transcription text. + * @return the value + **/ + public Integer getTrailingSilence() { + return trailingSilence; + } + + /** + * Array of individual transcription tokens. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tokens") + private final java.util.List tokens; + + /** + * Array of individual transcription tokens. + * @return the value + **/ + public java.util.List getTokens() { + return tokens; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RealtimeMessageResultTranscription("); + sb.append("super=").append(super.toString()); + sb.append("transcription=").append(String.valueOf(this.transcription)); + sb.append(", isFinal=").append(String.valueOf(this.isFinal)); + sb.append(", startTimeInMs=").append(String.valueOf(this.startTimeInMs)); + sb.append(", endTimeInMs=").append(String.valueOf(this.endTimeInMs)); + sb.append(", confidence=").append(String.valueOf(this.confidence)); + sb.append(", trailingSilence=").append(String.valueOf(this.trailingSilence)); + sb.append(", tokens=").append(String.valueOf(this.tokens)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RealtimeMessageResultTranscription)) { + return false; + } + + RealtimeMessageResultTranscription other = (RealtimeMessageResultTranscription) o; + return java.util.Objects.equals(this.transcription, other.transcription) + && java.util.Objects.equals(this.isFinal, other.isFinal) + && java.util.Objects.equals(this.startTimeInMs, other.startTimeInMs) + && java.util.Objects.equals(this.endTimeInMs, other.endTimeInMs) + && java.util.Objects.equals(this.confidence, other.confidence) + && java.util.Objects.equals(this.trailingSilence, other.trailingSilence) + && java.util.Objects.equals(this.tokens, other.tokens) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.transcription == null ? 43 : this.transcription.hashCode()); + result = (result * PRIME) + (this.isFinal == null ? 43 : this.isFinal.hashCode()); + result = + (result * PRIME) + + (this.startTimeInMs == null ? 43 : this.startTimeInMs.hashCode()); + result = (result * PRIME) + (this.endTimeInMs == null ? 43 : this.endTimeInMs.hashCode()); + result = (result * PRIME) + (this.confidence == null ? 43 : this.confidence.hashCode()); + result = + (result * PRIME) + + (this.trailingSilence == null ? 43 : this.trailingSilence.hashCode()); + result = (result * PRIME) + (this.tokens == null ? 43 : this.tokens.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageResultTranscriptionToken.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageResultTranscriptionToken.java new file mode 100644 index 00000000000..9ed1b8ef67a --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageResultTranscriptionToken.java @@ -0,0 +1,334 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Individual transcription tokens. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RealtimeMessageResultTranscriptionToken.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RealtimeMessageResultTranscriptionToken + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "token", + "startTimeInMs", + "endTimeInMs", + "confidence", + "type" + }) + public RealtimeMessageResultTranscriptionToken( + String token, Integer startTimeInMs, Integer endTimeInMs, Float confidence, Type type) { + super(); + this.token = token; + this.startTimeInMs = startTimeInMs; + this.endTimeInMs = endTimeInMs; + this.confidence = confidence; + this.type = type; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Transcription token. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("token") + private String token; + + /** + * Transcription token. + * @param token the value to set + * @return this builder + **/ + public Builder token(String token) { + this.token = token; + this.__explicitlySet__.add("token"); + return this; + } + /** + * Start time in milliseconds for the transcription token. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startTimeInMs") + private Integer startTimeInMs; + + /** + * Start time in milliseconds for the transcription token. + * @param startTimeInMs the value to set + * @return this builder + **/ + public Builder startTimeInMs(Integer startTimeInMs) { + this.startTimeInMs = startTimeInMs; + this.__explicitlySet__.add("startTimeInMs"); + return this; + } + /** + * End time in milliseconds for the transcription token. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("endTimeInMs") + private Integer endTimeInMs; + + /** + * End time in milliseconds for the transcription token. + * @param endTimeInMs the value to set + * @return this builder + **/ + public Builder endTimeInMs(Integer endTimeInMs) { + this.endTimeInMs = endTimeInMs; + this.__explicitlySet__.add("endTimeInMs"); + return this; + } + /** + * Confidence score for the transcription token. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("confidence") + private Float confidence; + + /** + * Confidence score for the transcription token. + * @param confidence the value to set + * @return this builder + **/ + public Builder confidence(Float confidence) { + this.confidence = confidence; + this.__explicitlySet__.add("confidence"); + return this; + } + /** + * Type of the transcription token. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * Type of the transcription token. + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RealtimeMessageResultTranscriptionToken build() { + RealtimeMessageResultTranscriptionToken model = + new RealtimeMessageResultTranscriptionToken( + this.token, + this.startTimeInMs, + this.endTimeInMs, + this.confidence, + this.type); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RealtimeMessageResultTranscriptionToken model) { + if (model.wasPropertyExplicitlySet("token")) { + this.token(model.getToken()); + } + if (model.wasPropertyExplicitlySet("startTimeInMs")) { + this.startTimeInMs(model.getStartTimeInMs()); + } + if (model.wasPropertyExplicitlySet("endTimeInMs")) { + this.endTimeInMs(model.getEndTimeInMs()); + } + if (model.wasPropertyExplicitlySet("confidence")) { + this.confidence(model.getConfidence()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Transcription token. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("token") + private final String token; + + /** + * Transcription token. + * @return the value + **/ + public String getToken() { + return token; + } + + /** + * Start time in milliseconds for the transcription token. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startTimeInMs") + private final Integer startTimeInMs; + + /** + * Start time in milliseconds for the transcription token. + * @return the value + **/ + public Integer getStartTimeInMs() { + return startTimeInMs; + } + + /** + * End time in milliseconds for the transcription token. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("endTimeInMs") + private final Integer endTimeInMs; + + /** + * End time in milliseconds for the transcription token. + * @return the value + **/ + public Integer getEndTimeInMs() { + return endTimeInMs; + } + + /** + * Confidence score for the transcription token. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("confidence") + private final Float confidence; + + /** + * Confidence score for the transcription token. + * @return the value + **/ + public Float getConfidence() { + return confidence; + } + + /** + * Type of the transcription token. + **/ + public enum Type { + Word("WORD"), + Punctuation("PUNCTUATION"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + map.put(v.getValue(), v); + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Type: " + key); + } + }; + /** + * Type of the transcription token. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * Type of the transcription token. + * @return the value + **/ + public Type getType() { + return type; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RealtimeMessageResultTranscriptionToken("); + sb.append("super=").append(super.toString()); + sb.append("token=").append(String.valueOf(this.token)); + sb.append(", startTimeInMs=").append(String.valueOf(this.startTimeInMs)); + sb.append(", endTimeInMs=").append(String.valueOf(this.endTimeInMs)); + sb.append(", confidence=").append(String.valueOf(this.confidence)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RealtimeMessageResultTranscriptionToken)) { + return false; + } + + RealtimeMessageResultTranscriptionToken other = (RealtimeMessageResultTranscriptionToken) o; + return java.util.Objects.equals(this.token, other.token) + && java.util.Objects.equals(this.startTimeInMs, other.startTimeInMs) + && java.util.Objects.equals(this.endTimeInMs, other.endTimeInMs) + && java.util.Objects.equals(this.confidence, other.confidence) + && java.util.Objects.equals(this.type, other.type) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.token == null ? 43 : this.token.hashCode()); + result = + (result * PRIME) + + (this.startTimeInMs == null ? 43 : this.startTimeInMs.hashCode()); + result = (result * PRIME) + (this.endTimeInMs == null ? 43 : this.endTimeInMs.hashCode()); + result = (result * PRIME) + (this.confidence == null ? 43 : this.confidence.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageSendFinalResult.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageSendFinalResult.java new file mode 100644 index 00000000000..537c5b36603 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeMessageSendFinalResult.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Tell service to send final result + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RealtimeMessageSendFinalResult.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "event" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RealtimeMessageSendFinalResult extends RealtimeMessageOut { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RealtimeMessageSendFinalResult build() { + RealtimeMessageSendFinalResult model = new RealtimeMessageSendFinalResult(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RealtimeMessageSendFinalResult model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public RealtimeMessageSendFinalResult() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RealtimeMessageSendFinalResult("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RealtimeMessageSendFinalResult)) { + return false; + } + + RealtimeMessageSendFinalResult other = (RealtimeMessageSendFinalResult) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeModelDetails.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeModelDetails.java new file mode 100644 index 00000000000..02657e7e70c --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeModelDetails.java @@ -0,0 +1,251 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Details of the ASR model used by the realtime speech service. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RealtimeModelDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RealtimeModelDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"domain", "languageCode"}) + public RealtimeModelDetails(Domain domain, String languageCode) { + super(); + this.domain = domain; + this.languageCode = languageCode; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Model Domain. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domain") + private Domain domain; + + /** + * Model Domain. + * @param domain the value to set + * @return this builder + **/ + public Builder domain(Domain domain) { + this.domain = domain; + this.__explicitlySet__.add("domain"); + return this; + } + /** + * Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. + * - en-US: English - United States + * - es-ES: Spanish - Spain + * - pt-BR: Portuguese - Brazil + * - en-GB: English - Great Britain + * - en-AU: English - Australia + * - en-IN: English - India + * - hi-IN: Hindi - India + * - fr-FR: French - France + * - de-DE: German - Germany + * - it-IT: Italian - Italy + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("languageCode") + private String languageCode; + + /** + * Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. + * - en-US: English - United States + * - es-ES: Spanish - Spain + * - pt-BR: Portuguese - Brazil + * - en-GB: English - Great Britain + * - en-AU: English - Australia + * - en-IN: English - India + * - hi-IN: Hindi - India + * - fr-FR: French - France + * - de-DE: German - Germany + * - it-IT: Italian - Italy + * + * @param languageCode the value to set + * @return this builder + **/ + public Builder languageCode(String languageCode) { + this.languageCode = languageCode; + this.__explicitlySet__.add("languageCode"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RealtimeModelDetails build() { + RealtimeModelDetails model = new RealtimeModelDetails(this.domain, this.languageCode); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RealtimeModelDetails model) { + if (model.wasPropertyExplicitlySet("domain")) { + this.domain(model.getDomain()); + } + if (model.wasPropertyExplicitlySet("languageCode")) { + this.languageCode(model.getLanguageCode()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Model Domain. + **/ + public enum Domain { + Generic("GENERIC"), + Medical("MEDICAL"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Domain v : Domain.values()) { + map.put(v.getValue(), v); + } + } + + Domain(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Domain create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Domain: " + key); + } + }; + /** + * Model Domain. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domain") + private final Domain domain; + + /** + * Model Domain. + * @return the value + **/ + public Domain getDomain() { + return domain; + } + + /** + * Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. + * - en-US: English - United States + * - es-ES: Spanish - Spain + * - pt-BR: Portuguese - Brazil + * - en-GB: English - Great Britain + * - en-AU: English - Australia + * - en-IN: English - India + * - hi-IN: Hindi - India + * - fr-FR: French - France + * - de-DE: German - Germany + * - it-IT: Italian - Italy + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("languageCode") + private final String languageCode; + + /** + * Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. + * - en-US: English - United States + * - es-ES: Spanish - Spain + * - pt-BR: Portuguese - Brazil + * - en-GB: English - Great Britain + * - en-AU: English - Australia + * - en-IN: English - India + * - hi-IN: Hindi - India + * - fr-FR: French - France + * - de-DE: German - Germany + * - it-IT: Italian - Italy + * + * @return the value + **/ + public String getLanguageCode() { + return languageCode; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RealtimeModelDetails("); + sb.append("super=").append(super.toString()); + sb.append("domain=").append(String.valueOf(this.domain)); + sb.append(", languageCode=").append(String.valueOf(this.languageCode)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RealtimeModelDetails)) { + return false; + } + + RealtimeModelDetails other = (RealtimeModelDetails) o; + return java.util.Objects.equals(this.domain, other.domain) + && java.util.Objects.equals(this.languageCode, other.languageCode) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.domain == null ? 43 : this.domain.hashCode()); + result = (result * PRIME) + (this.languageCode == null ? 43 : this.languageCode.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeParameters.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeParameters.java new file mode 100644 index 00000000000..343e09f7ed5 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeParameters.java @@ -0,0 +1,633 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Parameters to be sent to the realtime speech service over a websocket connection. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RealtimeParameters.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RealtimeParameters extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "encoding", + "isAckEnabled", + "partialSilenceThresholdInMs", + "finalSilenceThresholdInMs", + "stabilizePartialResults", + "modelDomain", + "languageCode", + "shouldIgnoreInvalidCustomizations", + "customizations" + }) + public RealtimeParameters( + String encoding, + Boolean isAckEnabled, + Integer partialSilenceThresholdInMs, + Integer finalSilenceThresholdInMs, + StabilizePartialResults stabilizePartialResults, + ModelDomain modelDomain, + String languageCode, + Boolean shouldIgnoreInvalidCustomizations, + java.util.List customizations) { + super(); + this.encoding = encoding; + this.isAckEnabled = isAckEnabled; + this.partialSilenceThresholdInMs = partialSilenceThresholdInMs; + this.finalSilenceThresholdInMs = finalSilenceThresholdInMs; + this.stabilizePartialResults = stabilizePartialResults; + this.modelDomain = modelDomain; + this.languageCode = languageCode; + this.shouldIgnoreInvalidCustomizations = shouldIgnoreInvalidCustomizations; + this.customizations = customizations; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Audio encoding to use + * - audio/raw;rate=16000 + * - audio/raw;rate=8000 + * - audio/raw;rate=8000;codec=mulaw + * - audio/raw;rate=8000;codec=alaw + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("encoding") + private String encoding; + + /** + * Audio encoding to use + * - audio/raw;rate=16000 + * - audio/raw;rate=8000 + * - audio/raw;rate=8000;codec=mulaw + * - audio/raw;rate=8000;codec=alaw + * + * @param encoding the value to set + * @return this builder + **/ + public Builder encoding(String encoding) { + this.encoding = encoding; + this.__explicitlySet__.add("encoding"); + return this; + } + /** + * Toggle for ack messages. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAckEnabled") + private Boolean isAckEnabled; + + /** + * Toggle for ack messages. + * @param isAckEnabled the value to set + * @return this builder + **/ + public Builder isAckEnabled(Boolean isAckEnabled) { + this.isAckEnabled = isAckEnabled; + this.__explicitlySet__.add("isAckEnabled"); + return this; + } + /** + * Silence threshold for Realtime Speech partial results in milliseconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("partialSilenceThresholdInMs") + private Integer partialSilenceThresholdInMs; + + /** + * Silence threshold for Realtime Speech partial results in milliseconds. + * @param partialSilenceThresholdInMs the value to set + * @return this builder + **/ + public Builder partialSilenceThresholdInMs(Integer partialSilenceThresholdInMs) { + this.partialSilenceThresholdInMs = partialSilenceThresholdInMs; + this.__explicitlySet__.add("partialSilenceThresholdInMs"); + return this; + } + /** + * Silence threshold for Realtime Speech final results in milliseconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("finalSilenceThresholdInMs") + private Integer finalSilenceThresholdInMs; + + /** + * Silence threshold for Realtime Speech final results in milliseconds. + * @param finalSilenceThresholdInMs the value to set + * @return this builder + **/ + public Builder finalSilenceThresholdInMs(Integer finalSilenceThresholdInMs) { + this.finalSilenceThresholdInMs = finalSilenceThresholdInMs; + this.__explicitlySet__.add("finalSilenceThresholdInMs"); + return this; + } + /** + * When enabled sets the amount of confidence required for latest tokens before returning them as part of a new partial result + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stabilizePartialResults") + private StabilizePartialResults stabilizePartialResults; + + /** + * When enabled sets the amount of confidence required for latest tokens before returning them as part of a new partial result + * @param stabilizePartialResults the value to set + * @return this builder + **/ + public Builder stabilizePartialResults(StabilizePartialResults stabilizePartialResults) { + this.stabilizePartialResults = stabilizePartialResults; + this.__explicitlySet__.add("stabilizePartialResults"); + return this; + } + /** + * Model Domain. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("modelDomain") + private ModelDomain modelDomain; + + /** + * Model Domain. + * @param modelDomain the value to set + * @return this builder + **/ + public Builder modelDomain(ModelDomain modelDomain) { + this.modelDomain = modelDomain; + this.__explicitlySet__.add("modelDomain"); + return this; + } + /** + * Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. + * - en-US: English - United States + * - es-ES: Spanish - Spain + * - pt-BR: Portuguese - Brazil + * - en-GB: English - Great Britain + * - en-AU: English - Australia + * - en-IN: English - India + * - hi-IN: Hindi - India + * - fr-FR: French - France + * - de-DE: German - Germany + * - it-IT: Italian - Italy + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("languageCode") + private String languageCode; + + /** + * Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. + * - en-US: English - United States + * - es-ES: Spanish - Spain + * - pt-BR: Portuguese - Brazil + * - en-GB: English - Great Britain + * - en-AU: English - Australia + * - en-IN: English - India + * - hi-IN: Hindi - India + * - fr-FR: French - France + * - de-DE: German - Germany + * - it-IT: Italian - Italy + * + * @param languageCode the value to set + * @return this builder + **/ + public Builder languageCode(String languageCode) { + this.languageCode = languageCode; + this.__explicitlySet__.add("languageCode"); + return this; + } + /** + * If set to true, the service will not fail connection attempt if it encounters any issues that prevent the loading of all specified user customizations. Any invalid customizations will simply be ignored and connection will continue being established with the default base model and any remaining valid customizations. + * If set to false, if the service is unable to load any of the specified customizations, an error detailing why will be returned and the session will end. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldIgnoreInvalidCustomizations") + private Boolean shouldIgnoreInvalidCustomizations; + + /** + * If set to true, the service will not fail connection attempt if it encounters any issues that prevent the loading of all specified user customizations. Any invalid customizations will simply be ignored and connection will continue being established with the default base model and any remaining valid customizations. + * If set to false, if the service is unable to load any of the specified customizations, an error detailing why will be returned and the session will end. + * + * @param shouldIgnoreInvalidCustomizations the value to set + * @return this builder + **/ + public Builder shouldIgnoreInvalidCustomizations( + Boolean shouldIgnoreInvalidCustomizations) { + this.shouldIgnoreInvalidCustomizations = shouldIgnoreInvalidCustomizations; + this.__explicitlySet__.add("shouldIgnoreInvalidCustomizations"); + return this; + } + /** + * Array of customization objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customizations") + private java.util.List customizations; + + /** + * Array of customization objects. + * @param customizations the value to set + * @return this builder + **/ + public Builder customizations(java.util.List customizations) { + this.customizations = customizations; + this.__explicitlySet__.add("customizations"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RealtimeParameters build() { + RealtimeParameters model = + new RealtimeParameters( + this.encoding, + this.isAckEnabled, + this.partialSilenceThresholdInMs, + this.finalSilenceThresholdInMs, + this.stabilizePartialResults, + this.modelDomain, + this.languageCode, + this.shouldIgnoreInvalidCustomizations, + this.customizations); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RealtimeParameters model) { + if (model.wasPropertyExplicitlySet("encoding")) { + this.encoding(model.getEncoding()); + } + if (model.wasPropertyExplicitlySet("isAckEnabled")) { + this.isAckEnabled(model.getIsAckEnabled()); + } + if (model.wasPropertyExplicitlySet("partialSilenceThresholdInMs")) { + this.partialSilenceThresholdInMs(model.getPartialSilenceThresholdInMs()); + } + if (model.wasPropertyExplicitlySet("finalSilenceThresholdInMs")) { + this.finalSilenceThresholdInMs(model.getFinalSilenceThresholdInMs()); + } + if (model.wasPropertyExplicitlySet("stabilizePartialResults")) { + this.stabilizePartialResults(model.getStabilizePartialResults()); + } + if (model.wasPropertyExplicitlySet("modelDomain")) { + this.modelDomain(model.getModelDomain()); + } + if (model.wasPropertyExplicitlySet("languageCode")) { + this.languageCode(model.getLanguageCode()); + } + if (model.wasPropertyExplicitlySet("shouldIgnoreInvalidCustomizations")) { + this.shouldIgnoreInvalidCustomizations( + model.getShouldIgnoreInvalidCustomizations()); + } + if (model.wasPropertyExplicitlySet("customizations")) { + this.customizations(model.getCustomizations()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Audio encoding to use + * - audio/raw;rate=16000 + * - audio/raw;rate=8000 + * - audio/raw;rate=8000;codec=mulaw + * - audio/raw;rate=8000;codec=alaw + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("encoding") + private final String encoding; + + /** + * Audio encoding to use + * - audio/raw;rate=16000 + * - audio/raw;rate=8000 + * - audio/raw;rate=8000;codec=mulaw + * - audio/raw;rate=8000;codec=alaw + * + * @return the value + **/ + public String getEncoding() { + return encoding; + } + + /** + * Toggle for ack messages. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAckEnabled") + private final Boolean isAckEnabled; + + /** + * Toggle for ack messages. + * @return the value + **/ + public Boolean getIsAckEnabled() { + return isAckEnabled; + } + + /** + * Silence threshold for Realtime Speech partial results in milliseconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("partialSilenceThresholdInMs") + private final Integer partialSilenceThresholdInMs; + + /** + * Silence threshold for Realtime Speech partial results in milliseconds. + * @return the value + **/ + public Integer getPartialSilenceThresholdInMs() { + return partialSilenceThresholdInMs; + } + + /** + * Silence threshold for Realtime Speech final results in milliseconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("finalSilenceThresholdInMs") + private final Integer finalSilenceThresholdInMs; + + /** + * Silence threshold for Realtime Speech final results in milliseconds. + * @return the value + **/ + public Integer getFinalSilenceThresholdInMs() { + return finalSilenceThresholdInMs; + } + + /** + * When enabled sets the amount of confidence required for latest tokens before returning them as part of a new partial result + **/ + public enum StabilizePartialResults { + None("NONE"), + Low("LOW"), + Medium("MEDIUM"), + High("HIGH"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (StabilizePartialResults v : StabilizePartialResults.values()) { + map.put(v.getValue(), v); + } + } + + StabilizePartialResults(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static StabilizePartialResults create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid StabilizePartialResults: " + key); + } + }; + /** + * When enabled sets the amount of confidence required for latest tokens before returning them as part of a new partial result + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stabilizePartialResults") + private final StabilizePartialResults stabilizePartialResults; + + /** + * When enabled sets the amount of confidence required for latest tokens before returning them as part of a new partial result + * @return the value + **/ + public StabilizePartialResults getStabilizePartialResults() { + return stabilizePartialResults; + } + + /** + * Model Domain. + **/ + public enum ModelDomain { + Generic("GENERIC"), + Medical("MEDICAL"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ModelDomain v : ModelDomain.values()) { + map.put(v.getValue(), v); + } + } + + ModelDomain(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ModelDomain create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ModelDomain: " + key); + } + }; + /** + * Model Domain. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("modelDomain") + private final ModelDomain modelDomain; + + /** + * Model Domain. + * @return the value + **/ + public ModelDomain getModelDomain() { + return modelDomain; + } + + /** + * Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. + * - en-US: English - United States + * - es-ES: Spanish - Spain + * - pt-BR: Portuguese - Brazil + * - en-GB: English - Great Britain + * - en-AU: English - Australia + * - en-IN: English - India + * - hi-IN: Hindi - India + * - fr-FR: French - France + * - de-DE: German - Germany + * - it-IT: Italian - Italy + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("languageCode") + private final String languageCode; + + /** + * Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. + * - en-US: English - United States + * - es-ES: Spanish - Spain + * - pt-BR: Portuguese - Brazil + * - en-GB: English - Great Britain + * - en-AU: English - Australia + * - en-IN: English - India + * - hi-IN: Hindi - India + * - fr-FR: French - France + * - de-DE: German - Germany + * - it-IT: Italian - Italy + * + * @return the value + **/ + public String getLanguageCode() { + return languageCode; + } + + /** + * If set to true, the service will not fail connection attempt if it encounters any issues that prevent the loading of all specified user customizations. Any invalid customizations will simply be ignored and connection will continue being established with the default base model and any remaining valid customizations. + * If set to false, if the service is unable to load any of the specified customizations, an error detailing why will be returned and the session will end. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldIgnoreInvalidCustomizations") + private final Boolean shouldIgnoreInvalidCustomizations; + + /** + * If set to true, the service will not fail connection attempt if it encounters any issues that prevent the loading of all specified user customizations. Any invalid customizations will simply be ignored and connection will continue being established with the default base model and any remaining valid customizations. + * If set to false, if the service is unable to load any of the specified customizations, an error detailing why will be returned and the session will end. + * + * @return the value + **/ + public Boolean getShouldIgnoreInvalidCustomizations() { + return shouldIgnoreInvalidCustomizations; + } + + /** + * Array of customization objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customizations") + private final java.util.List customizations; + + /** + * Array of customization objects. + * @return the value + **/ + public java.util.List getCustomizations() { + return customizations; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RealtimeParameters("); + sb.append("super=").append(super.toString()); + sb.append("encoding=").append(String.valueOf(this.encoding)); + sb.append(", isAckEnabled=").append(String.valueOf(this.isAckEnabled)); + sb.append(", partialSilenceThresholdInMs=") + .append(String.valueOf(this.partialSilenceThresholdInMs)); + sb.append(", finalSilenceThresholdInMs=") + .append(String.valueOf(this.finalSilenceThresholdInMs)); + sb.append(", stabilizePartialResults=") + .append(String.valueOf(this.stabilizePartialResults)); + sb.append(", modelDomain=").append(String.valueOf(this.modelDomain)); + sb.append(", languageCode=").append(String.valueOf(this.languageCode)); + sb.append(", shouldIgnoreInvalidCustomizations=") + .append(String.valueOf(this.shouldIgnoreInvalidCustomizations)); + sb.append(", customizations=").append(String.valueOf(this.customizations)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RealtimeParameters)) { + return false; + } + + RealtimeParameters other = (RealtimeParameters) o; + return java.util.Objects.equals(this.encoding, other.encoding) + && java.util.Objects.equals(this.isAckEnabled, other.isAckEnabled) + && java.util.Objects.equals( + this.partialSilenceThresholdInMs, other.partialSilenceThresholdInMs) + && java.util.Objects.equals( + this.finalSilenceThresholdInMs, other.finalSilenceThresholdInMs) + && java.util.Objects.equals( + this.stabilizePartialResults, other.stabilizePartialResults) + && java.util.Objects.equals(this.modelDomain, other.modelDomain) + && java.util.Objects.equals(this.languageCode, other.languageCode) + && java.util.Objects.equals( + this.shouldIgnoreInvalidCustomizations, + other.shouldIgnoreInvalidCustomizations) + && java.util.Objects.equals(this.customizations, other.customizations) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.encoding == null ? 43 : this.encoding.hashCode()); + result = (result * PRIME) + (this.isAckEnabled == null ? 43 : this.isAckEnabled.hashCode()); + result = + (result * PRIME) + + (this.partialSilenceThresholdInMs == null + ? 43 + : this.partialSilenceThresholdInMs.hashCode()); + result = + (result * PRIME) + + (this.finalSilenceThresholdInMs == null + ? 43 + : this.finalSilenceThresholdInMs.hashCode()); + result = + (result * PRIME) + + (this.stabilizePartialResults == null + ? 43 + : this.stabilizePartialResults.hashCode()); + result = (result * PRIME) + (this.modelDomain == null ? 43 : this.modelDomain.hashCode()); + result = (result * PRIME) + (this.languageCode == null ? 43 : this.languageCode.hashCode()); + result = + (result * PRIME) + + (this.shouldIgnoreInvalidCustomizations == null + ? 43 + : this.shouldIgnoreInvalidCustomizations.hashCode()); + result = + (result * PRIME) + + (this.customizations == null ? 43 : this.customizations.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeSessionToken.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeSessionToken.java new file mode 100644 index 00000000000..a27a996701e --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/RealtimeSessionToken.java @@ -0,0 +1,319 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * The response from the realtime session token endpoint that creates the auth token to be used with the realtime speech service. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RealtimeSessionToken.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RealtimeSessionToken extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "token", + "sessionId", + "compartmentId", + "freeformTags", + "definedTags" + }) + public RealtimeSessionToken( + String token, + String sessionId, + String compartmentId, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.token = token; + this.sessionId = sessionId; + this.compartmentId = compartmentId; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The session token (JWT) to be consumed by the websocket server. The token contains the session/tenant ID, as well as the expiry time. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("token") + private String token; + + /** + * The session token (JWT) to be consumed by the websocket server. The token contains the session/tenant ID, as well as the expiry time. + * @param token the value to set + * @return this builder + **/ + public Builder token(String token) { + this.token = token; + this.__explicitlySet__.add("token"); + return this; + } + /** + * The session ID this token corresponds to. Provided for convenience, the session ID is already present in the JWT token. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sessionId") + private String sessionId; + + /** + * The session ID this token corresponds to. Provided for convenience, the session ID is already present in the JWT token. + * @param sessionId the value to set + * @return this builder + **/ + public Builder sessionId(String sessionId) { + this.sessionId = sessionId; + this.__explicitlySet__.add("sessionId"); + return this; + } + /** + * Compartment ID that was used to create the token. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Compartment ID that was used to create the token. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RealtimeSessionToken build() { + RealtimeSessionToken model = + new RealtimeSessionToken( + this.token, + this.sessionId, + this.compartmentId, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RealtimeSessionToken model) { + if (model.wasPropertyExplicitlySet("token")) { + this.token(model.getToken()); + } + if (model.wasPropertyExplicitlySet("sessionId")) { + this.sessionId(model.getSessionId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The session token (JWT) to be consumed by the websocket server. The token contains the session/tenant ID, as well as the expiry time. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("token") + private final String token; + + /** + * The session token (JWT) to be consumed by the websocket server. The token contains the session/tenant ID, as well as the expiry time. + * @return the value + **/ + public String getToken() { + return token; + } + + /** + * The session ID this token corresponds to. Provided for convenience, the session ID is already present in the JWT token. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sessionId") + private final String sessionId; + + /** + * The session ID this token corresponds to. Provided for convenience, the session ID is already present in the JWT token. + * @return the value + **/ + public String getSessionId() { + return sessionId; + } + + /** + * Compartment ID that was used to create the token. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Compartment ID that was used to create the token. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RealtimeSessionToken("); + sb.append("super=").append(super.toString()); + sb.append("token=").append(String.valueOf(this.token)); + sb.append(", sessionId=").append(String.valueOf(this.sessionId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RealtimeSessionToken)) { + return false; + } + + RealtimeSessionToken other = (RealtimeSessionToken) o; + return java.util.Objects.equals(this.token, other.token) + && java.util.Objects.equals(this.sessionId, other.sessionId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.token == null ? 43 : this.token.hashCode()); + result = (result * PRIME) + (this.sessionId == null ? 43 : this.sessionId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/SynthesizeSpeechDetails.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/SynthesizeSpeechDetails.java new file mode 100644 index 00000000000..1f90decc45d --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/SynthesizeSpeechDetails.java @@ -0,0 +1,291 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Input JSON to get audio inference from TTS Service. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SynthesizeSpeechDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SynthesizeSpeechDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "text", + "isStreamEnabled", + "compartmentId", + "configuration", + "audioConfig" + }) + public SynthesizeSpeechDetails( + String text, + Boolean isStreamEnabled, + String compartmentId, + TtsConfiguration configuration, + TtsAudioConfig audioConfig) { + super(); + this.text = text; + this.isStreamEnabled = isStreamEnabled; + this.compartmentId = compartmentId; + this.configuration = configuration; + this.audioConfig = audioConfig; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The text input to get the inference audio from TTS Service. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("text") + private String text; + + /** + * The text input to get the inference audio from TTS Service. + * @param text the value to set + * @return this builder + **/ + public Builder text(String text) { + this.text = text; + this.__explicitlySet__.add("text"); + return this; + } + /** + * If set to true, response will be sent in the chunked transfer-encoding and audio chunks + * are sent back as and when they are ready. If set to false, response will be sent only once + * the entire audio is generated. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isStreamEnabled") + private Boolean isStreamEnabled; + + /** + * If set to true, response will be sent in the chunked transfer-encoding and audio chunks + * are sent back as and when they are ready. If set to false, response will be sent only once + * the entire audio is generated. + * + * @param isStreamEnabled the value to set + * @return this builder + **/ + public Builder isStreamEnabled(Boolean isStreamEnabled) { + this.isStreamEnabled = isStreamEnabled; + this.__explicitlySet__.add("isStreamEnabled"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where the user has access to call {@code SpeechSynthesize} api. But default user access will be checked at tenancy level. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where the user has access to call {@code SpeechSynthesize} api. But default user access will be checked at tenancy level. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("configuration") + private TtsConfiguration configuration; + + public Builder configuration(TtsConfiguration configuration) { + this.configuration = configuration; + this.__explicitlySet__.add("configuration"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("audioConfig") + private TtsAudioConfig audioConfig; + + public Builder audioConfig(TtsAudioConfig audioConfig) { + this.audioConfig = audioConfig; + this.__explicitlySet__.add("audioConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SynthesizeSpeechDetails build() { + SynthesizeSpeechDetails model = + new SynthesizeSpeechDetails( + this.text, + this.isStreamEnabled, + this.compartmentId, + this.configuration, + this.audioConfig); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SynthesizeSpeechDetails model) { + if (model.wasPropertyExplicitlySet("text")) { + this.text(model.getText()); + } + if (model.wasPropertyExplicitlySet("isStreamEnabled")) { + this.isStreamEnabled(model.getIsStreamEnabled()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("configuration")) { + this.configuration(model.getConfiguration()); + } + if (model.wasPropertyExplicitlySet("audioConfig")) { + this.audioConfig(model.getAudioConfig()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The text input to get the inference audio from TTS Service. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("text") + private final String text; + + /** + * The text input to get the inference audio from TTS Service. + * @return the value + **/ + public String getText() { + return text; + } + + /** + * If set to true, response will be sent in the chunked transfer-encoding and audio chunks + * are sent back as and when they are ready. If set to false, response will be sent only once + * the entire audio is generated. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isStreamEnabled") + private final Boolean isStreamEnabled; + + /** + * If set to true, response will be sent in the chunked transfer-encoding and audio chunks + * are sent back as and when they are ready. If set to false, response will be sent only once + * the entire audio is generated. + * + * @return the value + **/ + public Boolean getIsStreamEnabled() { + return isStreamEnabled; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where the user has access to call {@code SpeechSynthesize} api. But default user access will be checked at tenancy level. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where the user has access to call {@code SpeechSynthesize} api. But default user access will be checked at tenancy level. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("configuration") + private final TtsConfiguration configuration; + + public TtsConfiguration getConfiguration() { + return configuration; + } + + @com.fasterxml.jackson.annotation.JsonProperty("audioConfig") + private final TtsAudioConfig audioConfig; + + public TtsAudioConfig getAudioConfig() { + return audioConfig; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SynthesizeSpeechDetails("); + sb.append("super=").append(super.toString()); + sb.append("text=").append(String.valueOf(this.text)); + sb.append(", isStreamEnabled=").append(String.valueOf(this.isStreamEnabled)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", configuration=").append(String.valueOf(this.configuration)); + sb.append(", audioConfig=").append(String.valueOf(this.audioConfig)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SynthesizeSpeechDetails)) { + return false; + } + + SynthesizeSpeechDetails other = (SynthesizeSpeechDetails) o; + return java.util.Objects.equals(this.text, other.text) + && java.util.Objects.equals(this.isStreamEnabled, other.isStreamEnabled) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.configuration, other.configuration) + && java.util.Objects.equals(this.audioConfig, other.audioConfig) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.text == null ? 43 : this.text.hashCode()); + result = + (result * PRIME) + + (this.isStreamEnabled == null ? 43 : this.isStreamEnabled.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.configuration == null ? 43 : this.configuration.hashCode()); + result = (result * PRIME) + (this.audioConfig == null ? 43 : this.audioConfig.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsAudioConfig.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsAudioConfig.java new file mode 100644 index 00000000000..86b0eeaa016 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsAudioConfig.java @@ -0,0 +1,116 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Use this schema to specify handling of audio response. + * If audioConfig is not provided, raw response is handed over for the user to handle. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "configType", + defaultImpl = TtsAudioConfig.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = TtsBaseAudioConfig.class, + name = "BASE_AUDIO_CONFIG" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class TtsAudioConfig extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected TtsAudioConfig() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TtsAudioConfig("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TtsAudioConfig)) { + return false; + } + + TtsAudioConfig other = (TtsAudioConfig) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The audio config type to use for handling the audio output. + * Supported config types are: + * - BASE_AUDIO_CONFIG + * + **/ + public enum ConfigType { + BaseAudioConfig("BASE_AUDIO_CONFIG"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ConfigType v : ConfigType.values()) { + map.put(v.getValue(), v); + } + } + + ConfigType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ConfigType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ConfigType: " + key); + } + }; +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsBaseAudioConfig.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsBaseAudioConfig.java new file mode 100644 index 00000000000..8def590ce91 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsBaseAudioConfig.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Use this audio config for saving the audio response at specified path. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = TtsBaseAudioConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "configType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class TtsBaseAudioConfig extends TtsAudioConfig { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Specify the path where you want to save the audio response. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("savePath") + private String savePath; + + /** + * Specify the path where you want to save the audio response. + * @param savePath the value to set + * @return this builder + **/ + public Builder savePath(String savePath) { + this.savePath = savePath; + this.__explicitlySet__.add("savePath"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public TtsBaseAudioConfig build() { + TtsBaseAudioConfig model = new TtsBaseAudioConfig(this.savePath); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(TtsBaseAudioConfig model) { + if (model.wasPropertyExplicitlySet("savePath")) { + this.savePath(model.getSavePath()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public TtsBaseAudioConfig(String savePath) { + super(); + this.savePath = savePath; + } + + /** + * Specify the path where you want to save the audio response. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("savePath") + private final String savePath; + + /** + * Specify the path where you want to save the audio response. + * @return the value + **/ + public String getSavePath() { + return savePath; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TtsBaseAudioConfig("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", savePath=").append(String.valueOf(this.savePath)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TtsBaseAudioConfig)) { + return false; + } + + TtsBaseAudioConfig other = (TtsBaseAudioConfig) o; + return java.util.Objects.equals(this.savePath, other.savePath) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.savePath == null ? 43 : this.savePath.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsConfiguration.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsConfiguration.java new file mode 100644 index 00000000000..57d56ee4444 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsConfiguration.java @@ -0,0 +1,113 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Speech configuration for TTS API. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "modelFamily", + defaultImpl = TtsConfiguration.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = TtsOracleConfiguration.class, + name = "ORACLE" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class TtsConfiguration extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected TtsConfiguration() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TtsConfiguration("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TtsConfiguration)) { + return false; + } + + TtsConfiguration other = (TtsConfiguration) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The class of models to use for speech generation. The available model families are: + * - ORACLE + * + **/ + public enum ModelFamily { + Oracle("ORACLE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ModelFamily v : ModelFamily.values()) { + map.put(v.getValue(), v); + } + } + + ModelFamily(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ModelFamily create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ModelFamily: " + key); + } + }; +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsOracleConfiguration.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsOracleConfiguration.java new file mode 100644 index 00000000000..be77cb7c6b5 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsOracleConfiguration.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Use this configuration for selecting a model from Oracle model family. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = TtsOracleConfiguration.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "modelFamily" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class TtsOracleConfiguration extends TtsConfiguration { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("modelDetails") + private TtsOracleModelDetails modelDetails; + + public Builder modelDetails(TtsOracleModelDetails modelDetails) { + this.modelDetails = modelDetails; + this.__explicitlySet__.add("modelDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("speechSettings") + private TtsOracleSpeechSettings speechSettings; + + public Builder speechSettings(TtsOracleSpeechSettings speechSettings) { + this.speechSettings = speechSettings; + this.__explicitlySet__.add("speechSettings"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public TtsOracleConfiguration build() { + TtsOracleConfiguration model = + new TtsOracleConfiguration(this.modelDetails, this.speechSettings); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(TtsOracleConfiguration model) { + if (model.wasPropertyExplicitlySet("modelDetails")) { + this.modelDetails(model.getModelDetails()); + } + if (model.wasPropertyExplicitlySet("speechSettings")) { + this.speechSettings(model.getSpeechSettings()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public TtsOracleConfiguration( + TtsOracleModelDetails modelDetails, TtsOracleSpeechSettings speechSettings) { + super(); + this.modelDetails = modelDetails; + this.speechSettings = speechSettings; + } + + @com.fasterxml.jackson.annotation.JsonProperty("modelDetails") + private final TtsOracleModelDetails modelDetails; + + public TtsOracleModelDetails getModelDetails() { + return modelDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("speechSettings") + private final TtsOracleSpeechSettings speechSettings; + + public TtsOracleSpeechSettings getSpeechSettings() { + return speechSettings; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TtsOracleConfiguration("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", modelDetails=").append(String.valueOf(this.modelDetails)); + sb.append(", speechSettings=").append(String.valueOf(this.speechSettings)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TtsOracleConfiguration)) { + return false; + } + + TtsOracleConfiguration other = (TtsOracleConfiguration) o; + return java.util.Objects.equals(this.modelDetails, other.modelDetails) + && java.util.Objects.equals(this.speechSettings, other.speechSettings) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.modelDetails == null ? 43 : this.modelDetails.hashCode()); + result = + (result * PRIME) + + (this.speechSettings == null ? 43 : this.speechSettings.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsOracleModelDetails.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsOracleModelDetails.java new file mode 100644 index 00000000000..e11b00e1d9f --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsOracleModelDetails.java @@ -0,0 +1,119 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Model specific properties to use with Oracle model for TTS. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "modelName", + defaultImpl = TtsOracleModelDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = TtsOracleTts2NaturalModelDetails.class, + name = "TTS_2_NATURAL" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = TtsOracleTts1StandardModelDetails.class, + name = "TTS_1_STANDARD" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class TtsOracleModelDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected TtsOracleModelDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TtsOracleModelDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TtsOracleModelDetails)) { + return false; + } + + TtsOracleModelDetails other = (TtsOracleModelDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The fully qualified name of model to use for speech generation. The available models are: + * - TTS_1_STANDARD + * - TTS_2_NATURAL + * + **/ + public enum ModelName { + Tts1Standard("TTS_1_STANDARD"), + Tts2Natural("TTS_2_NATURAL"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ModelName v : ModelName.values()) { + map.put(v.getValue(), v); + } + } + + ModelName(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ModelName create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ModelName: " + key); + } + }; +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsOracleSpeechSettings.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsOracleSpeechSettings.java new file mode 100644 index 00000000000..8169ee04997 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsOracleSpeechSettings.java @@ -0,0 +1,439 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Settings to use for generating speech with a model from ORACLE family. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = TtsOracleSpeechSettings.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class TtsOracleSpeechSettings + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "textType", + "sampleRateInHz", + "outputFormat", + "speechMarkTypes" + }) + public TtsOracleSpeechSettings( + TextType textType, + Integer sampleRateInHz, + OutputFormat outputFormat, + java.util.List speechMarkTypes) { + super(); + this.textType = textType; + this.sampleRateInHz = sampleRateInHz; + this.outputFormat = outputFormat; + this.speechMarkTypes = speechMarkTypes; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The format in which the input text has been supplied i.e., Text or SSML. The supported text types are: + * - TEXT + * - SSML + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("textType") + private TextType textType; + + /** + * The format in which the input text has been supplied i.e., Text or SSML. The supported text types are: + * - TEXT + * - SSML + * + * @param textType the value to set + * @return this builder + **/ + public Builder textType(TextType textType) { + this.textType = textType; + this.__explicitlySet__.add("textType"); + return this; + } + /** + * The sample rate of the generated audio. By default, the audio will be generated with speaker voice sample rate. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sampleRateInHz") + private Integer sampleRateInHz; + + /** + * The sample rate of the generated audio. By default, the audio will be generated with speaker voice sample rate. + * + * @param sampleRateInHz the value to set + * @return this builder + **/ + public Builder sampleRateInHz(Integer sampleRateInHz) { + this.sampleRateInHz = sampleRateInHz; + this.__explicitlySet__.add("sampleRateInHz"); + return this; + } + /** + * The format of audio in which the user wants the audio to be in. The supported output formats are: + * - MP3 + * - OGG + * - PCM + * - JSON + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("outputFormat") + private OutputFormat outputFormat; + + /** + * The format of audio in which the user wants the audio to be in. The supported output formats are: + * - MP3 + * - OGG + * - PCM + * - JSON + * + * @param outputFormat the value to set + * @return this builder + **/ + public Builder outputFormat(OutputFormat outputFormat) { + this.outputFormat = outputFormat; + this.__explicitlySet__.add("outputFormat"); + return this; + } + /** + * The kind of time stamp markings the user wants for the audio. + * This property should be provided if outputFormat is json, otherwise it will be ignored. + * null value (i.e. no value is not specified) indicates no speech marking. + * The supported speech mark types are: + * - SENTENCE + * - WORD + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("speechMarkTypes") + private java.util.List speechMarkTypes; + + /** + * The kind of time stamp markings the user wants for the audio. + * This property should be provided if outputFormat is json, otherwise it will be ignored. + * null value (i.e. no value is not specified) indicates no speech marking. + * The supported speech mark types are: + * - SENTENCE + * - WORD + * + * @param speechMarkTypes the value to set + * @return this builder + **/ + public Builder speechMarkTypes(java.util.List speechMarkTypes) { + this.speechMarkTypes = speechMarkTypes; + this.__explicitlySet__.add("speechMarkTypes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public TtsOracleSpeechSettings build() { + TtsOracleSpeechSettings model = + new TtsOracleSpeechSettings( + this.textType, + this.sampleRateInHz, + this.outputFormat, + this.speechMarkTypes); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(TtsOracleSpeechSettings model) { + if (model.wasPropertyExplicitlySet("textType")) { + this.textType(model.getTextType()); + } + if (model.wasPropertyExplicitlySet("sampleRateInHz")) { + this.sampleRateInHz(model.getSampleRateInHz()); + } + if (model.wasPropertyExplicitlySet("outputFormat")) { + this.outputFormat(model.getOutputFormat()); + } + if (model.wasPropertyExplicitlySet("speechMarkTypes")) { + this.speechMarkTypes(model.getSpeechMarkTypes()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The format in which the input text has been supplied i.e., Text or SSML. The supported text types are: + * - TEXT + * - SSML + * + **/ + public enum TextType { + Text("TEXT"), + Ssml("SSML"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (TextType v : TextType.values()) { + map.put(v.getValue(), v); + } + } + + TextType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static TextType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid TextType: " + key); + } + }; + /** + * The format in which the input text has been supplied i.e., Text or SSML. The supported text types are: + * - TEXT + * - SSML + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("textType") + private final TextType textType; + + /** + * The format in which the input text has been supplied i.e., Text or SSML. The supported text types are: + * - TEXT + * - SSML + * + * @return the value + **/ + public TextType getTextType() { + return textType; + } + + /** + * The sample rate of the generated audio. By default, the audio will be generated with speaker voice sample rate. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sampleRateInHz") + private final Integer sampleRateInHz; + + /** + * The sample rate of the generated audio. By default, the audio will be generated with speaker voice sample rate. + * + * @return the value + **/ + public Integer getSampleRateInHz() { + return sampleRateInHz; + } + + /** + * The format of audio in which the user wants the audio to be in. The supported output formats are: + * - MP3 + * - OGG + * - PCM + * - JSON + * + **/ + public enum OutputFormat { + Mp3("MP3"), + Ogg("OGG"), + Pcm("PCM"), + Json("JSON"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OutputFormat v : OutputFormat.values()) { + map.put(v.getValue(), v); + } + } + + OutputFormat(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OutputFormat create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid OutputFormat: " + key); + } + }; + /** + * The format of audio in which the user wants the audio to be in. The supported output formats are: + * - MP3 + * - OGG + * - PCM + * - JSON + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("outputFormat") + private final OutputFormat outputFormat; + + /** + * The format of audio in which the user wants the audio to be in. The supported output formats are: + * - MP3 + * - OGG + * - PCM + * - JSON + * + * @return the value + **/ + public OutputFormat getOutputFormat() { + return outputFormat; + } + + /** + **/ + public enum SpeechMarkTypes { + Sentence("SENTENCE"), + Word("WORD"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SpeechMarkTypes v : SpeechMarkTypes.values()) { + map.put(v.getValue(), v); + } + } + + SpeechMarkTypes(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SpeechMarkTypes create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SpeechMarkTypes: " + key); + } + }; + /** + * The kind of time stamp markings the user wants for the audio. + * This property should be provided if outputFormat is json, otherwise it will be ignored. + * null value (i.e. no value is not specified) indicates no speech marking. + * The supported speech mark types are: + * - SENTENCE + * - WORD + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("speechMarkTypes") + private final java.util.List speechMarkTypes; + + /** + * The kind of time stamp markings the user wants for the audio. + * This property should be provided if outputFormat is json, otherwise it will be ignored. + * null value (i.e. no value is not specified) indicates no speech marking. + * The supported speech mark types are: + * - SENTENCE + * - WORD + * + * @return the value + **/ + public java.util.List getSpeechMarkTypes() { + return speechMarkTypes; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TtsOracleSpeechSettings("); + sb.append("super=").append(super.toString()); + sb.append("textType=").append(String.valueOf(this.textType)); + sb.append(", sampleRateInHz=").append(String.valueOf(this.sampleRateInHz)); + sb.append(", outputFormat=").append(String.valueOf(this.outputFormat)); + sb.append(", speechMarkTypes=").append(String.valueOf(this.speechMarkTypes)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TtsOracleSpeechSettings)) { + return false; + } + + TtsOracleSpeechSettings other = (TtsOracleSpeechSettings) o; + return java.util.Objects.equals(this.textType, other.textType) + && java.util.Objects.equals(this.sampleRateInHz, other.sampleRateInHz) + && java.util.Objects.equals(this.outputFormat, other.outputFormat) + && java.util.Objects.equals(this.speechMarkTypes, other.speechMarkTypes) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.textType == null ? 43 : this.textType.hashCode()); + result = + (result * PRIME) + + (this.sampleRateInHz == null ? 43 : this.sampleRateInHz.hashCode()); + result = (result * PRIME) + (this.outputFormat == null ? 43 : this.outputFormat.hashCode()); + result = + (result * PRIME) + + (this.speechMarkTypes == null ? 43 : this.speechMarkTypes.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsOracleTts1StandardModelDetails.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsOracleTts1StandardModelDetails.java new file mode 100644 index 00000000000..766eb00557b --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsOracleTts1StandardModelDetails.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Use this schema for specifying properties of TTS_1_STANDARD model from Oracle model family. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = TtsOracleTts1StandardModelDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "modelName" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class TtsOracleTts1StandardModelDetails extends TtsOracleModelDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Speaker in whose voice the user wants the output speech to be in. + * The possible values for {@code voiceId} can be obtained by calling {@link #listVoices(ListVoicesRequest) listVoices} api. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("voiceId") + private String voiceId; + + /** + * Speaker in whose voice the user wants the output speech to be in. + * The possible values for {@code voiceId} can be obtained by calling {@link #listVoices(ListVoicesRequest) listVoices} api. + * + * @param voiceId the value to set + * @return this builder + **/ + public Builder voiceId(String voiceId) { + this.voiceId = voiceId; + this.__explicitlySet__.add("voiceId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public TtsOracleTts1StandardModelDetails build() { + TtsOracleTts1StandardModelDetails model = + new TtsOracleTts1StandardModelDetails(this.voiceId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(TtsOracleTts1StandardModelDetails model) { + if (model.wasPropertyExplicitlySet("voiceId")) { + this.voiceId(model.getVoiceId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public TtsOracleTts1StandardModelDetails(String voiceId) { + super(); + this.voiceId = voiceId; + } + + /** + * Speaker in whose voice the user wants the output speech to be in. + * The possible values for {@code voiceId} can be obtained by calling {@link #listVoices(ListVoicesRequest) listVoices} api. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("voiceId") + private final String voiceId; + + /** + * Speaker in whose voice the user wants the output speech to be in. + * The possible values for {@code voiceId} can be obtained by calling {@link #listVoices(ListVoicesRequest) listVoices} api. + * + * @return the value + **/ + public String getVoiceId() { + return voiceId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TtsOracleTts1StandardModelDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", voiceId=").append(String.valueOf(this.voiceId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TtsOracleTts1StandardModelDetails)) { + return false; + } + + TtsOracleTts1StandardModelDetails other = (TtsOracleTts1StandardModelDetails) o; + return java.util.Objects.equals(this.voiceId, other.voiceId) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.voiceId == null ? 43 : this.voiceId.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsOracleTts2NaturalModelDetails.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsOracleTts2NaturalModelDetails.java new file mode 100644 index 00000000000..dab9cbc63c1 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/TtsOracleTts2NaturalModelDetails.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Use this schema for specifying properties of TTS_2_NATURAL model from Oracle model family. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = TtsOracleTts2NaturalModelDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "modelName" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class TtsOracleTts2NaturalModelDetails extends TtsOracleModelDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Speaker in whose voice the user wants the output speech to be in. + * The possible values for {@code voiceId} can be obtained by calling {@link #listVoices(ListVoicesRequest) listVoices} api. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("voiceId") + private String voiceId; + + /** + * Speaker in whose voice the user wants the output speech to be in. + * The possible values for {@code voiceId} can be obtained by calling {@link #listVoices(ListVoicesRequest) listVoices} api. + * + * @param voiceId the value to set + * @return this builder + **/ + public Builder voiceId(String voiceId) { + this.voiceId = voiceId; + this.__explicitlySet__.add("voiceId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public TtsOracleTts2NaturalModelDetails build() { + TtsOracleTts2NaturalModelDetails model = + new TtsOracleTts2NaturalModelDetails(this.voiceId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(TtsOracleTts2NaturalModelDetails model) { + if (model.wasPropertyExplicitlySet("voiceId")) { + this.voiceId(model.getVoiceId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public TtsOracleTts2NaturalModelDetails(String voiceId) { + super(); + this.voiceId = voiceId; + } + + /** + * Speaker in whose voice the user wants the output speech to be in. + * The possible values for {@code voiceId} can be obtained by calling {@link #listVoices(ListVoicesRequest) listVoices} api. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("voiceId") + private final String voiceId; + + /** + * Speaker in whose voice the user wants the output speech to be in. + * The possible values for {@code voiceId} can be obtained by calling {@link #listVoices(ListVoicesRequest) listVoices} api. + * + * @return the value + **/ + public String getVoiceId() { + return voiceId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TtsOracleTts2NaturalModelDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", voiceId=").append(String.valueOf(this.voiceId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TtsOracleTts2NaturalModelDetails)) { + return false; + } + + TtsOracleTts2NaturalModelDetails other = (TtsOracleTts2NaturalModelDetails) o; + return java.util.Objects.equals(this.voiceId, other.voiceId) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.voiceId == null ? 43 : this.voiceId.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/UpdateCustomizationDetails.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/UpdateCustomizationDetails.java new file mode 100644 index 00000000000..64cd70f8905 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/UpdateCustomizationDetails.java @@ -0,0 +1,372 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * The information to be updated. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateCustomizationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateCustomizationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "alias", + "displayName", + "description", + "modelDetails", + "trainingDataset", + "freeformTags", + "definedTags" + }) + public UpdateCustomizationDetails( + String alias, + String displayName, + String description, + CustomizationModelDetails modelDetails, + CustomizationDatasetDetails trainingDataset, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.alias = alias; + this.displayName = displayName; + this.description = description; + this.modelDetails = modelDetails; + this.trainingDataset = trainingDataset; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Customization Details Alias + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private String alias; + + /** + * Customization Details Alias + * @param alias the value to set + * @return this builder + **/ + public Builder alias(String alias) { + this.alias = alias; + this.__explicitlySet__.add("alias"); + return this; + } + /** + * A user-friendly display name for the customization. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly display name for the customization. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A short description of the customization. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A short description of the customization. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("modelDetails") + private CustomizationModelDetails modelDetails; + + public Builder modelDetails(CustomizationModelDetails modelDetails) { + this.modelDetails = modelDetails; + this.__explicitlySet__.add("modelDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("trainingDataset") + private CustomizationDatasetDetails trainingDataset; + + public Builder trainingDataset(CustomizationDatasetDetails trainingDataset) { + this.trainingDataset = trainingDataset; + this.__explicitlySet__.add("trainingDataset"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateCustomizationDetails build() { + UpdateCustomizationDetails model = + new UpdateCustomizationDetails( + this.alias, + this.displayName, + this.description, + this.modelDetails, + this.trainingDataset, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateCustomizationDetails model) { + if (model.wasPropertyExplicitlySet("alias")) { + this.alias(model.getAlias()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("modelDetails")) { + this.modelDetails(model.getModelDetails()); + } + if (model.wasPropertyExplicitlySet("trainingDataset")) { + this.trainingDataset(model.getTrainingDataset()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Customization Details Alias + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alias") + private final String alias; + + /** + * Customization Details Alias + * @return the value + **/ + public String getAlias() { + return alias; + } + + /** + * A user-friendly display name for the customization. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly display name for the customization. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A short description of the customization. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A short description of the customization. + * @return the value + **/ + public String getDescription() { + return description; + } + + @com.fasterxml.jackson.annotation.JsonProperty("modelDetails") + private final CustomizationModelDetails modelDetails; + + public CustomizationModelDetails getModelDetails() { + return modelDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("trainingDataset") + private final CustomizationDatasetDetails trainingDataset; + + public CustomizationDatasetDetails getTrainingDataset() { + return trainingDataset; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}}. + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateCustomizationDetails("); + sb.append("super=").append(super.toString()); + sb.append("alias=").append(String.valueOf(this.alias)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", modelDetails=").append(String.valueOf(this.modelDetails)); + sb.append(", trainingDataset=").append(String.valueOf(this.trainingDataset)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateCustomizationDetails)) { + return false; + } + + UpdateCustomizationDetails other = (UpdateCustomizationDetails) o; + return java.util.Objects.equals(this.alias, other.alias) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.modelDetails, other.modelDetails) + && java.util.Objects.equals(this.trainingDataset, other.trainingDataset) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.alias == null ? 43 : this.alias.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.modelDetails == null ? 43 : this.modelDetails.hashCode()); + result = + (result * PRIME) + + (this.trainingDataset == null ? 43 : this.trainingDataset.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/VoiceCollection.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/VoiceCollection.java new file mode 100644 index 00000000000..949d8ef2887 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/VoiceCollection.java @@ -0,0 +1,132 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Results of the voices available as speaker Ids for given language code and voice type combination. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = VoiceCollection.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class VoiceCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public VoiceCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of Voices available for user to select from. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of Voices available for user to select from. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public VoiceCollection build() { + VoiceCollection model = new VoiceCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(VoiceCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of Voices available for user to select from. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of Voices available for user to select from. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("VoiceCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof VoiceCollection)) { + return false; + } + + VoiceCollection other = (VoiceCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/VoiceSummary.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/VoiceSummary.java new file mode 100644 index 00000000000..da32a759c2f --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/model/VoiceSummary.java @@ -0,0 +1,604 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.model; + +/** + * Details related to the voice available for the given language code and voice type. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = VoiceSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class VoiceSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "voiceId", + "displayName", + "description", + "gender", + "supportedModels", + "languageCode", + "languageDescription", + "sampleRateInHertz", + "wordsPerMinute", + "isDefaultVoice" + }) + public VoiceSummary( + String voiceId, + String displayName, + String description, + Gender gender, + java.util.List supportedModels, + LanguageCode languageCode, + String languageDescription, + Integer sampleRateInHertz, + Integer wordsPerMinute, + Boolean isDefaultVoice) { + super(); + this.voiceId = voiceId; + this.displayName = displayName; + this.description = description; + this.gender = gender; + this.supportedModels = supportedModels; + this.languageCode = languageCode; + this.languageDescription = languageDescription; + this.sampleRateInHertz = sampleRateInHertz; + this.wordsPerMinute = wordsPerMinute; + this.isDefaultVoice = isDefaultVoice; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique Id of the voice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("voiceId") + private String voiceId; + + /** + * Unique Id of the voice. + * @param voiceId the value to set + * @return this builder + **/ + public Builder voiceId(String voiceId) { + this.voiceId = voiceId; + this.__explicitlySet__.add("voiceId"); + return this; + } + /** + * A user-friendly display name of the language for the user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly display name of the language for the user. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A small description of the voice like its language and voice type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A small description of the voice like its language and voice type. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Gender of the speaker. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gender") + private Gender gender; + + /** + * Gender of the speaker. + * @param gender the value to set + * @return this builder + **/ + public Builder gender(Gender gender) { + this.gender = gender; + this.__explicitlySet__.add("gender"); + return this; + } + /** + * Models the particular speaker is aligned to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportedModels") + private java.util.List supportedModels; + + /** + * Models the particular speaker is aligned to. + * @param supportedModels the value to set + * @return this builder + **/ + public Builder supportedModels(java.util.List supportedModels) { + this.supportedModels = supportedModels; + this.__explicitlySet__.add("supportedModels"); + return this; + } + /** + * An abbreviated notation of region to which the language and accent of the speaker belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("languageCode") + private LanguageCode languageCode; + + /** + * An abbreviated notation of region to which the language and accent of the speaker belongs to. + * @param languageCode the value to set + * @return this builder + **/ + public Builder languageCode(LanguageCode languageCode) { + this.languageCode = languageCode; + this.__explicitlySet__.add("languageCode"); + return this; + } + /** + * A description of region to which the language and accent of the speaker belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("languageDescription") + private String languageDescription; + + /** + * A description of region to which the language and accent of the speaker belongs to. + * @param languageDescription the value to set + * @return this builder + **/ + public Builder languageDescription(String languageDescription) { + this.languageDescription = languageDescription; + this.__explicitlySet__.add("languageDescription"); + return this; + } + /** + * The sample rate of the speaker in Hertz. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sampleRateInHertz") + private Integer sampleRateInHertz; + + /** + * The sample rate of the speaker in Hertz. + * @param sampleRateInHertz the value to set + * @return this builder + **/ + public Builder sampleRateInHertz(Integer sampleRateInHertz) { + this.sampleRateInHertz = sampleRateInHertz; + this.__explicitlySet__.add("sampleRateInHertz"); + return this; + } + /** + * The number of words the speaker can narrate per minute. It signifies the speed of the speech produced by the speaker. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("wordsPerMinute") + private Integer wordsPerMinute; + + /** + * The number of words the speaker can narrate per minute. It signifies the speed of the speech produced by the speaker. + * @param wordsPerMinute the value to set + * @return this builder + **/ + public Builder wordsPerMinute(Integer wordsPerMinute) { + this.wordsPerMinute = wordsPerMinute; + this.__explicitlySet__.add("wordsPerMinute"); + return this; + } + /** + * Whether this voice id is default voice used for inference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefaultVoice") + private Boolean isDefaultVoice; + + /** + * Whether this voice id is default voice used for inference. + * @param isDefaultVoice the value to set + * @return this builder + **/ + public Builder isDefaultVoice(Boolean isDefaultVoice) { + this.isDefaultVoice = isDefaultVoice; + this.__explicitlySet__.add("isDefaultVoice"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public VoiceSummary build() { + VoiceSummary model = + new VoiceSummary( + this.voiceId, + this.displayName, + this.description, + this.gender, + this.supportedModels, + this.languageCode, + this.languageDescription, + this.sampleRateInHertz, + this.wordsPerMinute, + this.isDefaultVoice); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(VoiceSummary model) { + if (model.wasPropertyExplicitlySet("voiceId")) { + this.voiceId(model.getVoiceId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("gender")) { + this.gender(model.getGender()); + } + if (model.wasPropertyExplicitlySet("supportedModels")) { + this.supportedModels(model.getSupportedModels()); + } + if (model.wasPropertyExplicitlySet("languageCode")) { + this.languageCode(model.getLanguageCode()); + } + if (model.wasPropertyExplicitlySet("languageDescription")) { + this.languageDescription(model.getLanguageDescription()); + } + if (model.wasPropertyExplicitlySet("sampleRateInHertz")) { + this.sampleRateInHertz(model.getSampleRateInHertz()); + } + if (model.wasPropertyExplicitlySet("wordsPerMinute")) { + this.wordsPerMinute(model.getWordsPerMinute()); + } + if (model.wasPropertyExplicitlySet("isDefaultVoice")) { + this.isDefaultVoice(model.getIsDefaultVoice()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique Id of the voice. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("voiceId") + private final String voiceId; + + /** + * Unique Id of the voice. + * @return the value + **/ + public String getVoiceId() { + return voiceId; + } + + /** + * A user-friendly display name of the language for the user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly display name of the language for the user. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A small description of the voice like its language and voice type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A small description of the voice like its language and voice type. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Gender of the speaker. + **/ + public enum Gender { + Male("MALE"), + Female("FEMALE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Gender.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Gender v : Gender.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Gender(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Gender create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Gender', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Gender of the speaker. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gender") + private final Gender gender; + + /** + * Gender of the speaker. + * @return the value + **/ + public Gender getGender() { + return gender; + } + + /** + * Models the particular speaker is aligned to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportedModels") + private final java.util.List supportedModels; + + /** + * Models the particular speaker is aligned to. + * @return the value + **/ + public java.util.List getSupportedModels() { + return supportedModels; + } + + /** + * An abbreviated notation of region to which the language and accent of the speaker belongs to. + **/ + public enum LanguageCode { + EnUs("en-US"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LanguageCode.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LanguageCode v : LanguageCode.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LanguageCode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LanguageCode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LanguageCode', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * An abbreviated notation of region to which the language and accent of the speaker belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("languageCode") + private final LanguageCode languageCode; + + /** + * An abbreviated notation of region to which the language and accent of the speaker belongs to. + * @return the value + **/ + public LanguageCode getLanguageCode() { + return languageCode; + } + + /** + * A description of region to which the language and accent of the speaker belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("languageDescription") + private final String languageDescription; + + /** + * A description of region to which the language and accent of the speaker belongs to. + * @return the value + **/ + public String getLanguageDescription() { + return languageDescription; + } + + /** + * The sample rate of the speaker in Hertz. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sampleRateInHertz") + private final Integer sampleRateInHertz; + + /** + * The sample rate of the speaker in Hertz. + * @return the value + **/ + public Integer getSampleRateInHertz() { + return sampleRateInHertz; + } + + /** + * The number of words the speaker can narrate per minute. It signifies the speed of the speech produced by the speaker. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("wordsPerMinute") + private final Integer wordsPerMinute; + + /** + * The number of words the speaker can narrate per minute. It signifies the speed of the speech produced by the speaker. + * @return the value + **/ + public Integer getWordsPerMinute() { + return wordsPerMinute; + } + + /** + * Whether this voice id is default voice used for inference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefaultVoice") + private final Boolean isDefaultVoice; + + /** + * Whether this voice id is default voice used for inference. + * @return the value + **/ + public Boolean getIsDefaultVoice() { + return isDefaultVoice; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("VoiceSummary("); + sb.append("super=").append(super.toString()); + sb.append("voiceId=").append(String.valueOf(this.voiceId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", gender=").append(String.valueOf(this.gender)); + sb.append(", supportedModels=").append(String.valueOf(this.supportedModels)); + sb.append(", languageCode=").append(String.valueOf(this.languageCode)); + sb.append(", languageDescription=").append(String.valueOf(this.languageDescription)); + sb.append(", sampleRateInHertz=").append(String.valueOf(this.sampleRateInHertz)); + sb.append(", wordsPerMinute=").append(String.valueOf(this.wordsPerMinute)); + sb.append(", isDefaultVoice=").append(String.valueOf(this.isDefaultVoice)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof VoiceSummary)) { + return false; + } + + VoiceSummary other = (VoiceSummary) o; + return java.util.Objects.equals(this.voiceId, other.voiceId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.gender, other.gender) + && java.util.Objects.equals(this.supportedModels, other.supportedModels) + && java.util.Objects.equals(this.languageCode, other.languageCode) + && java.util.Objects.equals(this.languageDescription, other.languageDescription) + && java.util.Objects.equals(this.sampleRateInHertz, other.sampleRateInHertz) + && java.util.Objects.equals(this.wordsPerMinute, other.wordsPerMinute) + && java.util.Objects.equals(this.isDefaultVoice, other.isDefaultVoice) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.voiceId == null ? 43 : this.voiceId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.gender == null ? 43 : this.gender.hashCode()); + result = + (result * PRIME) + + (this.supportedModels == null ? 43 : this.supportedModels.hashCode()); + result = (result * PRIME) + (this.languageCode == null ? 43 : this.languageCode.hashCode()); + result = + (result * PRIME) + + (this.languageDescription == null + ? 43 + : this.languageDescription.hashCode()); + result = + (result * PRIME) + + (this.sampleRateInHertz == null ? 43 : this.sampleRateInHertz.hashCode()); + result = + (result * PRIME) + + (this.wordsPerMinute == null ? 43 : this.wordsPerMinute.hashCode()); + result = + (result * PRIME) + + (this.isDefaultVoice == null ? 43 : this.isDefaultVoice.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/ChangeCustomizationCompartmentRequest.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/ChangeCustomizationCompartmentRequest.java new file mode 100644 index 00000000000..af46a438bc4 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/ChangeCustomizationCompartmentRequest.java @@ -0,0 +1,373 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.requests; + +import com.oracle.bmc.aispeech.model.*; +/** + * Example: Click here to see how to use ChangeCustomizationCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class ChangeCustomizationCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.aispeech.model.ChangeCustomizationCompartmentDetails> { + + /** + * Unique Customization training Job identifier. + */ + private String customizationId; + + /** + * Unique Customization training Job identifier. + */ + public String getCustomizationId() { + return customizationId; + } + /** + * Details for changing the compartment of a Customization. + */ + private com.oracle.bmc.aispeech.model.ChangeCustomizationCompartmentDetails + changeCustomizationCompartmentDetails; + + /** + * Details for changing the compartment of a Customization. + */ + public com.oracle.bmc.aispeech.model.ChangeCustomizationCompartmentDetails + getChangeCustomizationCompartmentDetails() { + return changeCustomizationCompartmentDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.aispeech.model.ChangeCustomizationCompartmentDetails getBody$() { + return changeCustomizationCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeCustomizationCompartmentRequest, + com.oracle.bmc.aispeech.model.ChangeCustomizationCompartmentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Customization training Job identifier. + */ + private String customizationId = null; + + /** + * Unique Customization training Job identifier. + * @param customizationId the value to set + * @return this builder instance + */ + public Builder customizationId(String customizationId) { + this.customizationId = customizationId; + return this; + } + + /** + * Details for changing the compartment of a Customization. + */ + private com.oracle.bmc.aispeech.model.ChangeCustomizationCompartmentDetails + changeCustomizationCompartmentDetails = null; + + /** + * Details for changing the compartment of a Customization. + * @param changeCustomizationCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeCustomizationCompartmentDetails( + com.oracle.bmc.aispeech.model.ChangeCustomizationCompartmentDetails + changeCustomizationCompartmentDetails) { + this.changeCustomizationCompartmentDetails = changeCustomizationCompartmentDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeCustomizationCompartmentRequest o) { + customizationId(o.getCustomizationId()); + changeCustomizationCompartmentDetails(o.getChangeCustomizationCompartmentDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeCustomizationCompartmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeCustomizationCompartmentRequest + */ + public ChangeCustomizationCompartmentRequest build() { + ChangeCustomizationCompartmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.aispeech.model.ChangeCustomizationCompartmentDetails body) { + changeCustomizationCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeCustomizationCompartmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeCustomizationCompartmentRequest + */ + public ChangeCustomizationCompartmentRequest buildWithoutInvocationCallback() { + ChangeCustomizationCompartmentRequest request = + new ChangeCustomizationCompartmentRequest(); + request.customizationId = customizationId; + request.changeCustomizationCompartmentDetails = changeCustomizationCompartmentDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new ChangeCustomizationCompartmentRequest(customizationId, changeCustomizationCompartmentDetails, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .customizationId(customizationId) + .changeCustomizationCompartmentDetails(changeCustomizationCompartmentDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",customizationId=").append(String.valueOf(this.customizationId)); + sb.append(",changeCustomizationCompartmentDetails=") + .append(String.valueOf(this.changeCustomizationCompartmentDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeCustomizationCompartmentRequest)) { + return false; + } + + ChangeCustomizationCompartmentRequest other = (ChangeCustomizationCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.customizationId, other.customizationId) + && java.util.Objects.equals( + this.changeCustomizationCompartmentDetails, + other.changeCustomizationCompartmentDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.customizationId == null ? 43 : this.customizationId.hashCode()); + result = + (result * PRIME) + + (this.changeCustomizationCompartmentDetails == null + ? 43 + : this.changeCustomizationCompartmentDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/CreateCustomizationRequest.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/CreateCustomizationRequest.java new file mode 100644 index 00000000000..ec3c14ebfe3 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/CreateCustomizationRequest.java @@ -0,0 +1,283 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.requests; + +import com.oracle.bmc.aispeech.model.*; +/** + * Example: Click here to see how to use CreateCustomizationRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class CreateCustomizationRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.aispeech.model.CreateCustomizationDetails> { + + /** + * Details for the new Customization. + */ + private com.oracle.bmc.aispeech.model.CreateCustomizationDetails createCustomizationDetails; + + /** + * Details for the new Customization. + */ + public com.oracle.bmc.aispeech.model.CreateCustomizationDetails + getCreateCustomizationDetails() { + return createCustomizationDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.aispeech.model.CreateCustomizationDetails getBody$() { + return createCustomizationDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateCustomizationRequest, + com.oracle.bmc.aispeech.model.CreateCustomizationDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new Customization. + */ + private com.oracle.bmc.aispeech.model.CreateCustomizationDetails + createCustomizationDetails = null; + + /** + * Details for the new Customization. + * @param createCustomizationDetails the value to set + * @return this builder instance + */ + public Builder createCustomizationDetails( + com.oracle.bmc.aispeech.model.CreateCustomizationDetails + createCustomizationDetails) { + this.createCustomizationDetails = createCustomizationDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateCustomizationRequest o) { + createCustomizationDetails(o.getCreateCustomizationDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateCustomizationRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateCustomizationRequest + */ + public CreateCustomizationRequest build() { + CreateCustomizationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.aispeech.model.CreateCustomizationDetails body) { + createCustomizationDetails(body); + return this; + } + + /** + * Build the instance of CreateCustomizationRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateCustomizationRequest + */ + public CreateCustomizationRequest buildWithoutInvocationCallback() { + CreateCustomizationRequest request = new CreateCustomizationRequest(); + request.createCustomizationDetails = createCustomizationDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateCustomizationRequest(createCustomizationDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createCustomizationDetails(createCustomizationDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createCustomizationDetails=") + .append(String.valueOf(this.createCustomizationDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateCustomizationRequest)) { + return false; + } + + CreateCustomizationRequest other = (CreateCustomizationRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createCustomizationDetails, other.createCustomizationDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createCustomizationDetails == null + ? 43 + : this.createCustomizationDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/CreateRealtimeSessionTokenRequest.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/CreateRealtimeSessionTokenRequest.java new file mode 100644 index 00000000000..4129e6c1c97 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/CreateRealtimeSessionTokenRequest.java @@ -0,0 +1,285 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.requests; + +import com.oracle.bmc.aispeech.model.*; +/** + * Example: Click here to see how to use CreateRealtimeSessionTokenRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class CreateRealtimeSessionTokenRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.aispeech.model.CreateRealtimeSessionTokenDetails> { + + /** + * An object containing the compartment ID for authorization purposes. + */ + private com.oracle.bmc.aispeech.model.CreateRealtimeSessionTokenDetails + createRealtimeSessionTokenDetails; + + /** + * An object containing the compartment ID for authorization purposes. + */ + public com.oracle.bmc.aispeech.model.CreateRealtimeSessionTokenDetails + getCreateRealtimeSessionTokenDetails() { + return createRealtimeSessionTokenDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.aispeech.model.CreateRealtimeSessionTokenDetails getBody$() { + return createRealtimeSessionTokenDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateRealtimeSessionTokenRequest, + com.oracle.bmc.aispeech.model.CreateRealtimeSessionTokenDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * An object containing the compartment ID for authorization purposes. + */ + private com.oracle.bmc.aispeech.model.CreateRealtimeSessionTokenDetails + createRealtimeSessionTokenDetails = null; + + /** + * An object containing the compartment ID for authorization purposes. + * @param createRealtimeSessionTokenDetails the value to set + * @return this builder instance + */ + public Builder createRealtimeSessionTokenDetails( + com.oracle.bmc.aispeech.model.CreateRealtimeSessionTokenDetails + createRealtimeSessionTokenDetails) { + this.createRealtimeSessionTokenDetails = createRealtimeSessionTokenDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateRealtimeSessionTokenRequest o) { + createRealtimeSessionTokenDetails(o.getCreateRealtimeSessionTokenDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateRealtimeSessionTokenRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateRealtimeSessionTokenRequest + */ + public CreateRealtimeSessionTokenRequest build() { + CreateRealtimeSessionTokenRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.aispeech.model.CreateRealtimeSessionTokenDetails body) { + createRealtimeSessionTokenDetails(body); + return this; + } + + /** + * Build the instance of CreateRealtimeSessionTokenRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateRealtimeSessionTokenRequest + */ + public CreateRealtimeSessionTokenRequest buildWithoutInvocationCallback() { + CreateRealtimeSessionTokenRequest request = new CreateRealtimeSessionTokenRequest(); + request.createRealtimeSessionTokenDetails = createRealtimeSessionTokenDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateRealtimeSessionTokenRequest(createRealtimeSessionTokenDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createRealtimeSessionTokenDetails(createRealtimeSessionTokenDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createRealtimeSessionTokenDetails=") + .append(String.valueOf(this.createRealtimeSessionTokenDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateRealtimeSessionTokenRequest)) { + return false; + } + + CreateRealtimeSessionTokenRequest other = (CreateRealtimeSessionTokenRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createRealtimeSessionTokenDetails, + other.createRealtimeSessionTokenDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createRealtimeSessionTokenDetails == null + ? 43 + : this.createRealtimeSessionTokenDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/DeleteCustomizationRequest.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/DeleteCustomizationRequest.java new file mode 100644 index 00000000000..6d003fdfc3a --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/DeleteCustomizationRequest.java @@ -0,0 +1,303 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.requests; + +import com.oracle.bmc.aispeech.model.*; +/** + * Example: Click here to see how to use DeleteCustomizationRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class DeleteCustomizationRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Customization training Job identifier. + */ + private String customizationId; + + /** + * Unique Customization training Job identifier. + */ + public String getCustomizationId() { + return customizationId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteCustomizationRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Customization training Job identifier. + */ + private String customizationId = null; + + /** + * Unique Customization training Job identifier. + * @param customizationId the value to set + * @return this builder instance + */ + public Builder customizationId(String customizationId) { + this.customizationId = customizationId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteCustomizationRequest o) { + customizationId(o.getCustomizationId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteCustomizationRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteCustomizationRequest + */ + public DeleteCustomizationRequest build() { + DeleteCustomizationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteCustomizationRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteCustomizationRequest + */ + public DeleteCustomizationRequest buildWithoutInvocationCallback() { + DeleteCustomizationRequest request = new DeleteCustomizationRequest(); + request.customizationId = customizationId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new DeleteCustomizationRequest(customizationId, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .customizationId(customizationId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",customizationId=").append(String.valueOf(this.customizationId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteCustomizationRequest)) { + return false; + } + + DeleteCustomizationRequest other = (DeleteCustomizationRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.customizationId, other.customizationId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.customizationId == null ? 43 : this.customizationId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/GetCustomizationRequest.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/GetCustomizationRequest.java new file mode 100644 index 00000000000..e9a5d3903f1 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/GetCustomizationRequest.java @@ -0,0 +1,195 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.requests; + +import com.oracle.bmc.aispeech.model.*; +/** + * Example: Click here to see how to use GetCustomizationRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class GetCustomizationRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Customization training Job identifier. + */ + private String customizationId; + + /** + * Unique Customization training Job identifier. + */ + public String getCustomizationId() { + return customizationId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetCustomizationRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Customization training Job identifier. + */ + private String customizationId = null; + + /** + * Unique Customization training Job identifier. + * @param customizationId the value to set + * @return this builder instance + */ + public Builder customizationId(String customizationId) { + this.customizationId = customizationId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetCustomizationRequest o) { + customizationId(o.getCustomizationId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetCustomizationRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetCustomizationRequest + */ + public GetCustomizationRequest build() { + GetCustomizationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetCustomizationRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetCustomizationRequest + */ + public GetCustomizationRequest buildWithoutInvocationCallback() { + GetCustomizationRequest request = new GetCustomizationRequest(); + request.customizationId = customizationId; + request.opcRequestId = opcRequestId; + return request; + // new GetCustomizationRequest(customizationId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().customizationId(customizationId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",customizationId=").append(String.valueOf(this.customizationId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetCustomizationRequest)) { + return false; + } + + GetCustomizationRequest other = (GetCustomizationRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.customizationId, other.customizationId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.customizationId == null ? 43 : this.customizationId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/ListCustomizationsRequest.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/ListCustomizationsRequest.java new file mode 100644 index 00000000000..61aa56627ac --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/ListCustomizationsRequest.java @@ -0,0 +1,465 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.requests; + +import com.oracle.bmc.aispeech.model.*; +/** + * Example: Click here to see how to use ListCustomizationsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class ListCustomizationsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.aispeech.model.Customization.LifecycleState lifecycleState; + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + public com.oracle.bmc.aispeech.model.Customization.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * Unique identifier(OCID). + */ + private String id; + + /** + * Unique identifier(OCID). + */ + public String getId() { + return id; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.aispeech.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.aispeech.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListCustomizationsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.aispeech.model.Customization.LifecycleState lifecycleState = null; + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.aispeech.model.Customization.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Unique identifier(OCID). + */ + private String id = null; + + /** + * Unique identifier(OCID). + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.aispeech.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.aispeech.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListCustomizationsRequest o) { + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + id(o.getId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListCustomizationsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListCustomizationsRequest + */ + public ListCustomizationsRequest build() { + ListCustomizationsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListCustomizationsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListCustomizationsRequest + */ + public ListCustomizationsRequest buildWithoutInvocationCallback() { + ListCustomizationsRequest request = new ListCustomizationsRequest(); + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.id = id; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListCustomizationsRequest(compartmentId, lifecycleState, displayName, id, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .lifecycleState(lifecycleState) + .displayName(displayName) + .id(id) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListCustomizationsRequest)) { + return false; + } + + ListCustomizationsRequest other = (ListCustomizationsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/ListVoicesRequest.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/ListVoicesRequest.java new file mode 100644 index 00000000000..f894707abe2 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/ListVoicesRequest.java @@ -0,0 +1,262 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.requests; + +import com.oracle.bmc.aispeech.model.*; +/** + * Example: Click here to see how to use ListVoicesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class ListVoicesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The model the user wants to run the inference on. + */ + private com.oracle.bmc.aispeech.model.TtsOracleModelDetails.ModelName modelName; + + /** + * The model the user wants to run the inference on. + */ + public com.oracle.bmc.aispeech.model.TtsOracleModelDetails.ModelName getModelName() { + return modelName; + } + /** + * The name of the speaker voice in which the user wants tts inference to be. + */ + private String displayName; + + /** + * The name of the speaker voice in which the user wants tts inference to be. + */ + public String getDisplayName() { + return displayName; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListVoicesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The model the user wants to run the inference on. + */ + private com.oracle.bmc.aispeech.model.TtsOracleModelDetails.ModelName modelName = null; + + /** + * The model the user wants to run the inference on. + * @param modelName the value to set + * @return this builder instance + */ + public Builder modelName( + com.oracle.bmc.aispeech.model.TtsOracleModelDetails.ModelName modelName) { + this.modelName = modelName; + return this; + } + + /** + * The name of the speaker voice in which the user wants tts inference to be. + */ + private String displayName = null; + + /** + * The name of the speaker voice in which the user wants tts inference to be. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListVoicesRequest o) { + compartmentId(o.getCompartmentId()); + modelName(o.getModelName()); + displayName(o.getDisplayName()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListVoicesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListVoicesRequest + */ + public ListVoicesRequest build() { + ListVoicesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListVoicesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListVoicesRequest + */ + public ListVoicesRequest buildWithoutInvocationCallback() { + ListVoicesRequest request = new ListVoicesRequest(); + request.compartmentId = compartmentId; + request.modelName = modelName; + request.displayName = displayName; + request.opcRequestId = opcRequestId; + return request; + // new ListVoicesRequest(compartmentId, modelName, displayName, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .modelName(modelName) + .displayName(displayName) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",modelName=").append(String.valueOf(this.modelName)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListVoicesRequest)) { + return false; + } + + ListVoicesRequest other = (ListVoicesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.modelName, other.modelName) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.modelName == null ? 43 : this.modelName.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/SynthesizeSpeechRequest.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/SynthesizeSpeechRequest.java new file mode 100644 index 00000000000..0f52c835f66 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/SynthesizeSpeechRequest.java @@ -0,0 +1,226 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.requests; + +import com.oracle.bmc.aispeech.model.*; +/** + * Example: Click here to see how to use SynthesizeSpeechRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class SynthesizeSpeechRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.aispeech.model.SynthesizeSpeechDetails> { + + /** + * The request to be sent to the TTS service to get required inference audio. + */ + private com.oracle.bmc.aispeech.model.SynthesizeSpeechDetails synthesizeSpeechDetails; + + /** + * The request to be sent to the TTS service to get required inference audio. + */ + public com.oracle.bmc.aispeech.model.SynthesizeSpeechDetails getSynthesizeSpeechDetails() { + return synthesizeSpeechDetails; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.aispeech.model.SynthesizeSpeechDetails getBody$() { + return synthesizeSpeechDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + SynthesizeSpeechRequest, + com.oracle.bmc.aispeech.model.SynthesizeSpeechDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The request to be sent to the TTS service to get required inference audio. + */ + private com.oracle.bmc.aispeech.model.SynthesizeSpeechDetails synthesizeSpeechDetails = + null; + + /** + * The request to be sent to the TTS service to get required inference audio. + * @param synthesizeSpeechDetails the value to set + * @return this builder instance + */ + public Builder synthesizeSpeechDetails( + com.oracle.bmc.aispeech.model.SynthesizeSpeechDetails synthesizeSpeechDetails) { + this.synthesizeSpeechDetails = synthesizeSpeechDetails; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SynthesizeSpeechRequest o) { + synthesizeSpeechDetails(o.getSynthesizeSpeechDetails()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of SynthesizeSpeechRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of SynthesizeSpeechRequest + */ + public SynthesizeSpeechRequest build() { + SynthesizeSpeechRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.aispeech.model.SynthesizeSpeechDetails body) { + synthesizeSpeechDetails(body); + return this; + } + + /** + * Build the instance of SynthesizeSpeechRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of SynthesizeSpeechRequest + */ + public SynthesizeSpeechRequest buildWithoutInvocationCallback() { + SynthesizeSpeechRequest request = new SynthesizeSpeechRequest(); + request.synthesizeSpeechDetails = synthesizeSpeechDetails; + request.opcRequestId = opcRequestId; + return request; + // new SynthesizeSpeechRequest(synthesizeSpeechDetails, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .synthesizeSpeechDetails(synthesizeSpeechDetails) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",synthesizeSpeechDetails=").append(String.valueOf(this.synthesizeSpeechDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SynthesizeSpeechRequest)) { + return false; + } + + SynthesizeSpeechRequest other = (SynthesizeSpeechRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.synthesizeSpeechDetails, other.synthesizeSpeechDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.synthesizeSpeechDetails == null + ? 43 + : this.synthesizeSpeechDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/UpdateCustomizationRequest.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/UpdateCustomizationRequest.java new file mode 100644 index 00000000000..ea5f54496b0 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/requests/UpdateCustomizationRequest.java @@ -0,0 +1,315 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.requests; + +import com.oracle.bmc.aispeech.model.*; +/** + * Example: Click here to see how to use UpdateCustomizationRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class UpdateCustomizationRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.aispeech.model.UpdateCustomizationDetails> { + + /** + * Unique Customization training Job identifier. + */ + private String customizationId; + + /** + * Unique Customization training Job identifier. + */ + public String getCustomizationId() { + return customizationId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.aispeech.model.UpdateCustomizationDetails updateCustomizationDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.aispeech.model.UpdateCustomizationDetails + getUpdateCustomizationDetails() { + return updateCustomizationDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.aispeech.model.UpdateCustomizationDetails getBody$() { + return updateCustomizationDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateCustomizationRequest, + com.oracle.bmc.aispeech.model.UpdateCustomizationDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Customization training Job identifier. + */ + private String customizationId = null; + + /** + * Unique Customization training Job identifier. + * @param customizationId the value to set + * @return this builder instance + */ + public Builder customizationId(String customizationId) { + this.customizationId = customizationId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.aispeech.model.UpdateCustomizationDetails + updateCustomizationDetails = null; + + /** + * The information to be updated. + * @param updateCustomizationDetails the value to set + * @return this builder instance + */ + public Builder updateCustomizationDetails( + com.oracle.bmc.aispeech.model.UpdateCustomizationDetails + updateCustomizationDetails) { + this.updateCustomizationDetails = updateCustomizationDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateCustomizationRequest o) { + customizationId(o.getCustomizationId()); + updateCustomizationDetails(o.getUpdateCustomizationDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateCustomizationRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateCustomizationRequest + */ + public UpdateCustomizationRequest build() { + UpdateCustomizationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.aispeech.model.UpdateCustomizationDetails body) { + updateCustomizationDetails(body); + return this; + } + + /** + * Build the instance of UpdateCustomizationRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateCustomizationRequest + */ + public UpdateCustomizationRequest buildWithoutInvocationCallback() { + UpdateCustomizationRequest request = new UpdateCustomizationRequest(); + request.customizationId = customizationId; + request.updateCustomizationDetails = updateCustomizationDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateCustomizationRequest(customizationId, updateCustomizationDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .customizationId(customizationId) + .updateCustomizationDetails(updateCustomizationDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",customizationId=").append(String.valueOf(this.customizationId)); + sb.append(",updateCustomizationDetails=") + .append(String.valueOf(this.updateCustomizationDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateCustomizationRequest)) { + return false; + } + + UpdateCustomizationRequest other = (UpdateCustomizationRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.customizationId, other.customizationId) + && java.util.Objects.equals( + this.updateCustomizationDetails, other.updateCustomizationDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.customizationId == null ? 43 : this.customizationId.hashCode()); + result = + (result * PRIME) + + (this.updateCustomizationDetails == null + ? 43 + : this.updateCustomizationDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/ChangeCustomizationCompartmentResponse.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/ChangeCustomizationCompartmentResponse.java new file mode 100644 index 00000000000..705eb2c70d4 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/ChangeCustomizationCompartmentResponse.java @@ -0,0 +1,131 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.responses; + +import com.oracle.bmc.aispeech.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class ChangeCustomizationCompartmentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private ChangeCustomizationCompartmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeCustomizationCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeCustomizationCompartmentResponse build() { + return new ChangeCustomizationCompartmentResponse( + __httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeCustomizationCompartmentResponse)) { + return false; + } + + ChangeCustomizationCompartmentResponse other = (ChangeCustomizationCompartmentResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/CreateCustomizationResponse.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/CreateCustomizationResponse.java new file mode 100644 index 00000000000..91580817d81 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/CreateCustomizationResponse.java @@ -0,0 +1,212 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.responses; + +import com.oracle.bmc.aispeech.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class CreateCustomizationResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned Customization instance. + */ + private com.oracle.bmc.aispeech.model.Customization customization; + + /** + * The returned Customization instance. + * @return the value + */ + public com.oracle.bmc.aispeech.model.Customization getCustomization() { + return customization; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "customization" + }) + private CreateCustomizationResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.aispeech.model.Customization customization) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.customization = customization; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned Customization instance. + */ + private com.oracle.bmc.aispeech.model.Customization customization; + + /** + * The returned Customization instance. + * @param customization the value to set + * @return this builder + */ + public Builder customization(com.oracle.bmc.aispeech.model.Customization customization) { + this.customization = customization; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateCustomizationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + customization(o.getCustomization()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateCustomizationResponse build() { + return new CreateCustomizationResponse( + __httpStatusCode__, headers, opcRequestId, etag, customization); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",customization=").append(String.valueOf(customization)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateCustomizationResponse)) { + return false; + } + + CreateCustomizationResponse other = (CreateCustomizationResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.customization, other.customization); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.customization == null ? 43 : this.customization.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/CreateRealtimeSessionTokenResponse.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/CreateRealtimeSessionTokenResponse.java new file mode 100644 index 00000000000..6384da62ba0 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/CreateRealtimeSessionTokenResponse.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.responses; + +import com.oracle.bmc.aispeech.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class CreateRealtimeSessionTokenResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned RealtimeSessionToken instance. + */ + private com.oracle.bmc.aispeech.model.RealtimeSessionToken realtimeSessionToken; + + /** + * The returned RealtimeSessionToken instance. + * @return the value + */ + public com.oracle.bmc.aispeech.model.RealtimeSessionToken getRealtimeSessionToken() { + return realtimeSessionToken; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "realtimeSessionToken" + }) + private CreateRealtimeSessionTokenResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.aispeech.model.RealtimeSessionToken realtimeSessionToken) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.realtimeSessionToken = realtimeSessionToken; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned RealtimeSessionToken instance. + */ + private com.oracle.bmc.aispeech.model.RealtimeSessionToken realtimeSessionToken; + + /** + * The returned RealtimeSessionToken instance. + * @param realtimeSessionToken the value to set + * @return this builder + */ + public Builder realtimeSessionToken( + com.oracle.bmc.aispeech.model.RealtimeSessionToken realtimeSessionToken) { + this.realtimeSessionToken = realtimeSessionToken; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateRealtimeSessionTokenResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + realtimeSessionToken(o.getRealtimeSessionToken()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateRealtimeSessionTokenResponse build() { + return new CreateRealtimeSessionTokenResponse( + __httpStatusCode__, headers, opcRequestId, etag, realtimeSessionToken); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",realtimeSessionToken=").append(String.valueOf(realtimeSessionToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateRealtimeSessionTokenResponse)) { + return false; + } + + CreateRealtimeSessionTokenResponse other = (CreateRealtimeSessionTokenResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.realtimeSessionToken, other.realtimeSessionToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.realtimeSessionToken == null + ? 43 + : this.realtimeSessionToken.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/DeleteCustomizationResponse.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/DeleteCustomizationResponse.java new file mode 100644 index 00000000000..de95388de7f --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/DeleteCustomizationResponse.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.responses; + +import com.oracle.bmc.aispeech.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class DeleteCustomizationResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeleteCustomizationResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteCustomizationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteCustomizationResponse build() { + return new DeleteCustomizationResponse(__httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteCustomizationResponse)) { + return false; + } + + DeleteCustomizationResponse other = (DeleteCustomizationResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/GetCustomizationResponse.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/GetCustomizationResponse.java new file mode 100644 index 00000000000..cacdb8f60fe --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/GetCustomizationResponse.java @@ -0,0 +1,212 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.responses; + +import com.oracle.bmc.aispeech.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class GetCustomizationResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Customization instance. + */ + private com.oracle.bmc.aispeech.model.Customization customization; + + /** + * The returned Customization instance. + * @return the value + */ + public com.oracle.bmc.aispeech.model.Customization getCustomization() { + return customization; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "customization" + }) + private GetCustomizationResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.aispeech.model.Customization customization) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.customization = customization; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Customization instance. + */ + private com.oracle.bmc.aispeech.model.Customization customization; + + /** + * The returned Customization instance. + * @param customization the value to set + * @return this builder + */ + public Builder customization(com.oracle.bmc.aispeech.model.Customization customization) { + this.customization = customization; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetCustomizationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + customization(o.getCustomization()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetCustomizationResponse build() { + return new GetCustomizationResponse( + __httpStatusCode__, headers, etag, opcRequestId, customization); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",customization=").append(String.valueOf(customization)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetCustomizationResponse)) { + return false; + } + + GetCustomizationResponse other = (GetCustomizationResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.customization, other.customization); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.customization == null ? 43 : this.customization.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/ListCustomizationsResponse.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/ListCustomizationsResponse.java new file mode 100644 index 00000000000..9172f831580 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/ListCustomizationsResponse.java @@ -0,0 +1,268 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.responses; + +import com.oracle.bmc.aispeech.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class ListCustomizationsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * Retrieves the previous page of results. When this header appears in the response, previous pages of results exist. See [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcPrevPage; + + /** + * Retrieves the previous page of results. When this header appears in the response, previous pages of results exist. See [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcPrevPage() { + return opcPrevPage; + } + + /** + * The returned CustomizationCollection instance. + */ + private com.oracle.bmc.aispeech.model.CustomizationCollection customizationCollection; + + /** + * The returned CustomizationCollection instance. + * @return the value + */ + public com.oracle.bmc.aispeech.model.CustomizationCollection getCustomizationCollection() { + return customizationCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "opcPrevPage", + "customizationCollection" + }) + private ListCustomizationsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + String opcPrevPage, + com.oracle.bmc.aispeech.model.CustomizationCollection customizationCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.opcPrevPage = opcPrevPage; + this.customizationCollection = customizationCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * Retrieves the previous page of results. When this header appears in the response, previous pages of results exist. See [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcPrevPage; + + /** + * Retrieves the previous page of results. When this header appears in the response, previous pages of results exist. See [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcPrevPage the value to set + * @return this builder + */ + public Builder opcPrevPage(String opcPrevPage) { + this.opcPrevPage = opcPrevPage; + return this; + } + + /** + * The returned CustomizationCollection instance. + */ + private com.oracle.bmc.aispeech.model.CustomizationCollection customizationCollection; + + /** + * The returned CustomizationCollection instance. + * @param customizationCollection the value to set + * @return this builder + */ + public Builder customizationCollection( + com.oracle.bmc.aispeech.model.CustomizationCollection customizationCollection) { + this.customizationCollection = customizationCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListCustomizationsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + opcPrevPage(o.getOpcPrevPage()); + customizationCollection(o.getCustomizationCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListCustomizationsResponse build() { + return new ListCustomizationsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + opcPrevPage, + customizationCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcPrevPage=").append(String.valueOf(opcPrevPage)); + sb.append(",customizationCollection=").append(String.valueOf(customizationCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListCustomizationsResponse)) { + return false; + } + + ListCustomizationsResponse other = (ListCustomizationsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcPrevPage, other.opcPrevPage) + && java.util.Objects.equals( + this.customizationCollection, other.customizationCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcPrevPage == null ? 43 : this.opcPrevPage.hashCode()); + result = + (result * PRIME) + + (this.customizationCollection == null + ? 43 + : this.customizationCollection.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/ListVoicesResponse.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/ListVoicesResponse.java new file mode 100644 index 00000000000..d2d92a67268 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/ListVoicesResponse.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.responses; + +import com.oracle.bmc.aispeech.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class ListVoicesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned VoiceCollection instance. + */ + private com.oracle.bmc.aispeech.model.VoiceCollection voiceCollection; + + /** + * The returned VoiceCollection instance. + * @return the value + */ + public com.oracle.bmc.aispeech.model.VoiceCollection getVoiceCollection() { + return voiceCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "voiceCollection" + }) + private ListVoicesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + com.oracle.bmc.aispeech.model.VoiceCollection voiceCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.voiceCollection = voiceCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned VoiceCollection instance. + */ + private com.oracle.bmc.aispeech.model.VoiceCollection voiceCollection; + + /** + * The returned VoiceCollection instance. + * @param voiceCollection the value to set + * @return this builder + */ + public Builder voiceCollection( + com.oracle.bmc.aispeech.model.VoiceCollection voiceCollection) { + this.voiceCollection = voiceCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListVoicesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + voiceCollection(o.getVoiceCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListVoicesResponse build() { + return new ListVoicesResponse( + __httpStatusCode__, headers, opcRequestId, voiceCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",voiceCollection=").append(String.valueOf(voiceCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListVoicesResponse)) { + return false; + } + + ListVoicesResponse other = (ListVoicesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.voiceCollection, other.voiceCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.voiceCollection == null ? 43 : this.voiceCollection.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/SynthesizeSpeechResponse.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/SynthesizeSpeechResponse.java new file mode 100644 index 00000000000..4d6a7a5886d --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/SynthesizeSpeechResponse.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.responses; + +import com.oracle.bmc.aispeech.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class SynthesizeSpeechResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned java.io.InputStream instance. + */ + private java.io.InputStream inputStream; + + /** + * The returned java.io.InputStream instance. + * @return the value + */ + public java.io.InputStream getInputStream() { + return inputStream; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "inputStream" + }) + private SynthesizeSpeechResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + java.io.InputStream inputStream) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.inputStream = inputStream; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned java.io.InputStream instance. + */ + private java.io.InputStream inputStream; + + /** + * The returned java.io.InputStream instance. + * @param inputStream the value to set + * @return this builder + */ + public Builder inputStream(java.io.InputStream inputStream) { + this.inputStream = inputStream; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SynthesizeSpeechResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + inputStream(o.getInputStream()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public SynthesizeSpeechResponse build() { + return new SynthesizeSpeechResponse( + __httpStatusCode__, headers, opcRequestId, inputStream); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",inputStream=").append(String.valueOf(inputStream)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SynthesizeSpeechResponse)) { + return false; + } + + SynthesizeSpeechResponse other = (SynthesizeSpeechResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.inputStream, other.inputStream); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.inputStream == null ? 43 : this.inputStream.hashCode()); + return result; + } +} diff --git a/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/UpdateCustomizationResponse.java b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/UpdateCustomizationResponse.java new file mode 100644 index 00000000000..c9993d40136 --- /dev/null +++ b/bmc-aispeech/src/main/java/com/oracle/bmc/aispeech/responses/UpdateCustomizationResponse.java @@ -0,0 +1,212 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.aispeech.responses; + +import com.oracle.bmc.aispeech.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220101") +public class UpdateCustomizationResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Customization instance. + */ + private com.oracle.bmc.aispeech.model.Customization customization; + + /** + * The returned Customization instance. + * @return the value + */ + public com.oracle.bmc.aispeech.model.Customization getCustomization() { + return customization; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "customization" + }) + private UpdateCustomizationResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.aispeech.model.Customization customization) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.customization = customization; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Customization instance. + */ + private com.oracle.bmc.aispeech.model.Customization customization; + + /** + * The returned Customization instance. + * @param customization the value to set + * @return this builder + */ + public Builder customization(com.oracle.bmc.aispeech.model.Customization customization) { + this.customization = customization; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateCustomizationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + customization(o.getCustomization()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateCustomizationResponse build() { + return new UpdateCustomizationResponse( + __httpStatusCode__, headers, etag, opcRequestId, customization); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",customization=").append(String.valueOf(customization)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateCustomizationResponse)) { + return false; + } + + UpdateCustomizationResponse other = (UpdateCustomizationResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.customization, other.customization); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.customization == null ? 43 : this.customization.hashCode()); + return result; + } +} diff --git a/bmc-aivision/pom.xml b/bmc-aivision/pom.xml index ca079ec1e47..c0cdf379bf6 100644 --- a/bmc-aivision/pom.xml +++ b/bmc-aivision/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-aivision @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-analytics/pom.xml b/bmc-analytics/pom.xml index ae6be2a877d..142788bbd0a 100644 --- a/bmc-analytics/pom.xml +++ b/bmc-analytics/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-analytics @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/Analytics.java b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/Analytics.java index 9310c9d5dd7..752739f783f 100644 --- a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/Analytics.java +++ b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/Analytics.java @@ -292,6 +292,19 @@ DeletePrivateAccessChannelResponse deletePrivateAccessChannel( */ ScaleAnalyticsInstanceResponse scaleAnalyticsInstance(ScaleAnalyticsInstanceRequest request); + /** + * Set the external service properties of an Analytics instance. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use SetFeatureBundle API. + */ + SetFeatureBundleResponse setFeatureBundle(SetFeatureBundleRequest request); + /** * Encrypts the customer data of this Analytics instance using either a customer OCI Vault Key or Oracle managed default key. * diff --git a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/AnalyticsAsync.java b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/AnalyticsAsync.java index 26db5900377..9498efdd9a3 100644 --- a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/AnalyticsAsync.java +++ b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/AnalyticsAsync.java @@ -355,6 +355,22 @@ java.util.concurrent.Future scaleAnalyticsInstan ScaleAnalyticsInstanceRequest, ScaleAnalyticsInstanceResponse> handler); + /** + * Set the external service properties of an Analytics instance. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future setFeatureBundle( + SetFeatureBundleRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Encrypts the customer data of this Analytics instance using either a customer OCI Vault Key or Oracle managed default key. * diff --git a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/AnalyticsAsyncClient.java b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/AnalyticsAsyncClient.java index 0033a2a9beb..8a227111006 100644 --- a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/AnalyticsAsyncClient.java +++ b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/AnalyticsAsyncClient.java @@ -1311,6 +1311,58 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future setFeatureBundle( + SetFeatureBundleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + SetFeatureBundleRequest, SetFeatureBundleResponse> + handler) { + LOG.trace("Called async setFeatureBundle"); + final SetFeatureBundleRequest interceptedRequest = + SetFeatureBundleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SetFeatureBundleConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Analytics", + "SetFeatureBundle", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/analytics/20190331/AnalyticsInstance/SetFeatureBundle"); + final java.util.function.Function + transformer = + SetFeatureBundleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + SetFeatureBundleRequest, SetFeatureBundleResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getSetFeatureBundleDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + SetFeatureBundleRequest, SetFeatureBundleResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future setKmsKey( SetKmsKeyRequest request, diff --git a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/AnalyticsClient.java b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/AnalyticsClient.java index 159ae67728a..926dfdf82fe 100644 --- a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/AnalyticsClient.java +++ b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/AnalyticsClient.java @@ -1223,6 +1223,48 @@ public ScaleAnalyticsInstanceResponse scaleAnalyticsInstance( }); } + @Override + public SetFeatureBundleResponse setFeatureBundle(SetFeatureBundleRequest request) { + LOG.trace("Called setFeatureBundle"); + final SetFeatureBundleRequest interceptedRequest = + SetFeatureBundleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SetFeatureBundleConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Analytics", + "SetFeatureBundle", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/analytics/20190331/AnalyticsInstance/SetFeatureBundle"); + java.util.function.Function + transformer = + SetFeatureBundleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getSetFeatureBundleDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public SetKmsKeyResponse setKmsKey(SetKmsKeyRequest request) { LOG.trace("Called setKmsKey"); diff --git a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/internal/http/SetFeatureBundleConverter.java b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/internal/http/SetFeatureBundleConverter.java new file mode 100644 index 00000000000..f518b837061 --- /dev/null +++ b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/internal/http/SetFeatureBundleConverter.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.analytics.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.analytics.model.*; +import com.oracle.bmc.analytics.requests.*; +import com.oracle.bmc.analytics.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190331") +public class SetFeatureBundleConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SetFeatureBundleConverter.class); + + public static com.oracle.bmc.analytics.requests.SetFeatureBundleRequest interceptRequest( + com.oracle.bmc.analytics.requests.SetFeatureBundleRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.analytics.requests.SetFeatureBundleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAnalyticsInstanceId(), "analyticsInstanceId must not be blank"); + Validate.notNull( + request.getSetFeatureBundleDetails(), "setFeatureBundleDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190331") + .path("analyticsInstances") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAnalyticsInstanceId())) + .path("actions") + .path("setFeatureBundle"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.analytics.responses.SetFeatureBundleResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.analytics.responses.SetFeatureBundleResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.analytics.responses.SetFeatureBundleResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.analytics.responses.SetFeatureBundleResponse>() { + @Override + public com.oracle.bmc.analytics.responses.SetFeatureBundleResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.analytics.responses.SetFeatureBundleResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.analytics.responses.SetFeatureBundleResponse.Builder + builder = + com.oracle.bmc.analytics.responses + .SetFeatureBundleResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.analytics.responses.SetFeatureBundleResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/AnalyticsInstance.java b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/AnalyticsInstance.java index bbdb1958592..5d997ca76bb 100644 --- a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/AnalyticsInstance.java +++ b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/AnalyticsInstance.java @@ -32,15 +32,19 @@ public final class AnalyticsInstance extends com.oracle.bmc.http.internal.Explic "capacity", "licenseType", "emailNotification", + "updateChannel", "networkEndpointDetails", "privateAccessChannels", "vanityUrlDetails", "serviceUrl", "definedTags", "freeformTags", + "systemTags", "kmsKeyId", "timeCreated", - "timeUpdated" + "timeUpdated", + "featureBundle", + "domainId" }) public AnalyticsInstance( String id, @@ -52,15 +56,19 @@ public AnalyticsInstance( Capacity capacity, LicenseType licenseType, String emailNotification, + UpdateChannel updateChannel, NetworkEndpointDetails networkEndpointDetails, java.util.Map privateAccessChannels, java.util.Map vanityUrlDetails, String serviceUrl, java.util.Map> definedTags, java.util.Map freeformTags, + java.util.Map> systemTags, String kmsKeyId, java.util.Date timeCreated, - java.util.Date timeUpdated) { + java.util.Date timeUpdated, + FeatureBundle featureBundle, + String domainId) { super(); this.id = id; this.name = name; @@ -71,15 +79,19 @@ public AnalyticsInstance( this.capacity = capacity; this.licenseType = licenseType; this.emailNotification = emailNotification; + this.updateChannel = updateChannel; this.networkEndpointDetails = networkEndpointDetails; this.privateAccessChannels = privateAccessChannels; this.vanityUrlDetails = vanityUrlDetails; this.serviceUrl = serviceUrl; this.definedTags = definedTags; this.freeformTags = freeformTags; + this.systemTags = systemTags; this.kmsKeyId = kmsKeyId; this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; + this.featureBundle = featureBundle; + this.domainId = domainId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -237,6 +249,24 @@ public Builder emailNotification(String emailNotification) { this.__explicitlySet__.add("emailNotification"); return this; } + /** + * Analytics instance update channel. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateChannel") + private UpdateChannel updateChannel; + + /** + * Analytics instance update channel. + * + * @param updateChannel the value to set + * @return this builder + **/ + public Builder updateChannel(UpdateChannel updateChannel) { + this.updateChannel = updateChannel; + this.__explicitlySet__.add("updateChannel"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("networkEndpointDetails") private NetworkEndpointDetails networkEndpointDetails; @@ -351,14 +381,34 @@ public Builder freeformTags(java.util.Map freeformTags) { return this; } /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the OCI Vault Key encrypting the customer data stored in this Analytics instance. A null value indicates Oracle managed default encryption. + * System tags for this resource. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"key": "value"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * OCID of the OCI Vault Key encrypting the customer data stored in this Analytics instance. A null value indicates Oracle managed default encryption. * **/ @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") private String kmsKeyId; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the OCI Vault Key encrypting the customer data stored in this Analytics instance. A null value indicates Oracle managed default encryption. + * OCID of the OCI Vault Key encrypting the customer data stored in this Analytics instance. A null value indicates Oracle managed default encryption. * * @param kmsKeyId the value to set * @return this builder @@ -412,6 +462,42 @@ public Builder timeUpdated(java.util.Date timeUpdated) { this.__explicitlySet__.add("timeUpdated"); return this; } + /** + * The feature set of an Analytics instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("featureBundle") + private FeatureBundle featureBundle; + + /** + * The feature set of an Analytics instance. + * + * @param featureBundle the value to set + * @return this builder + **/ + public Builder featureBundle(FeatureBundle featureBundle) { + this.featureBundle = featureBundle; + this.__explicitlySet__.add("featureBundle"); + return this; + } + /** + * Identity domain OCID. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domainId") + private String domainId; + + /** + * Identity domain OCID. + * + * @param domainId the value to set + * @return this builder + **/ + public Builder domainId(String domainId) { + this.domainId = domainId; + this.__explicitlySet__.add("domainId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -428,15 +514,19 @@ public AnalyticsInstance build() { this.capacity, this.licenseType, this.emailNotification, + this.updateChannel, this.networkEndpointDetails, this.privateAccessChannels, this.vanityUrlDetails, this.serviceUrl, this.definedTags, this.freeformTags, + this.systemTags, this.kmsKeyId, this.timeCreated, - this.timeUpdated); + this.timeUpdated, + this.featureBundle, + this.domainId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -472,6 +562,9 @@ public Builder copy(AnalyticsInstance model) { if (model.wasPropertyExplicitlySet("emailNotification")) { this.emailNotification(model.getEmailNotification()); } + if (model.wasPropertyExplicitlySet("updateChannel")) { + this.updateChannel(model.getUpdateChannel()); + } if (model.wasPropertyExplicitlySet("networkEndpointDetails")) { this.networkEndpointDetails(model.getNetworkEndpointDetails()); } @@ -490,6 +583,9 @@ public Builder copy(AnalyticsInstance model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } if (model.wasPropertyExplicitlySet("kmsKeyId")) { this.kmsKeyId(model.getKmsKeyId()); } @@ -499,6 +595,12 @@ public Builder copy(AnalyticsInstance model) { if (model.wasPropertyExplicitlySet("timeUpdated")) { this.timeUpdated(model.getTimeUpdated()); } + if (model.wasPropertyExplicitlySet("featureBundle")) { + this.featureBundle(model.getFeatureBundle()); + } + if (model.wasPropertyExplicitlySet("domainId")) { + this.domainId(model.getDomainId()); + } return this; } } @@ -649,6 +751,22 @@ public String getEmailNotification() { return emailNotification; } + /** + * Analytics instance update channel. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateChannel") + private final UpdateChannel updateChannel; + + /** + * Analytics instance update channel. + * + * @return the value + **/ + public UpdateChannel getUpdateChannel() { + return updateChannel; + } + @com.fasterxml.jackson.annotation.JsonProperty("networkEndpointDetails") private final NetworkEndpointDetails networkEndpointDetails; @@ -749,14 +867,32 @@ public java.util.Map getFreeformTags() { } /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the OCI Vault Key encrypting the customer data stored in this Analytics instance. A null value indicates Oracle managed default encryption. + * System tags for this resource. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + /** + * OCID of the OCI Vault Key encrypting the customer data stored in this Analytics instance. A null value indicates Oracle managed default encryption. * **/ @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") private final String kmsKeyId; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the OCI Vault Key encrypting the customer data stored in this Analytics instance. A null value indicates Oracle managed default encryption. + * OCID of the OCI Vault Key encrypting the customer data stored in this Analytics instance. A null value indicates Oracle managed default encryption. * * @return the value **/ @@ -804,6 +940,38 @@ public java.util.Date getTimeUpdated() { return timeUpdated; } + /** + * The feature set of an Analytics instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("featureBundle") + private final FeatureBundle featureBundle; + + /** + * The feature set of an Analytics instance. + * + * @return the value + **/ + public FeatureBundle getFeatureBundle() { + return featureBundle; + } + + /** + * Identity domain OCID. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domainId") + private final String domainId; + + /** + * Identity domain OCID. + * + * @return the value + **/ + public String getDomainId() { + return domainId; + } + @Override public String toString() { return this.toString(true); @@ -827,15 +995,19 @@ public String toString(boolean includeByteArrayContents) { sb.append(", capacity=").append(String.valueOf(this.capacity)); sb.append(", licenseType=").append(String.valueOf(this.licenseType)); sb.append(", emailNotification=").append(String.valueOf(this.emailNotification)); + sb.append(", updateChannel=").append(String.valueOf(this.updateChannel)); sb.append(", networkEndpointDetails=").append(String.valueOf(this.networkEndpointDetails)); sb.append(", privateAccessChannels=").append(String.valueOf(this.privateAccessChannels)); sb.append(", vanityUrlDetails=").append(String.valueOf(this.vanityUrlDetails)); sb.append(", serviceUrl=").append(String.valueOf(this.serviceUrl)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", featureBundle=").append(String.valueOf(this.featureBundle)); + sb.append(", domainId=").append(String.valueOf(this.domainId)); sb.append(")"); return sb.toString(); } @@ -859,6 +1031,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.capacity, other.capacity) && java.util.Objects.equals(this.licenseType, other.licenseType) && java.util.Objects.equals(this.emailNotification, other.emailNotification) + && java.util.Objects.equals(this.updateChannel, other.updateChannel) && java.util.Objects.equals( this.networkEndpointDetails, other.networkEndpointDetails) && java.util.Objects.equals(this.privateAccessChannels, other.privateAccessChannels) @@ -866,9 +1039,12 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.serviceUrl, other.serviceUrl) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.featureBundle, other.featureBundle) + && java.util.Objects.equals(this.domainId, other.domainId) && super.equals(other); } @@ -891,6 +1067,9 @@ public int hashCode() { result = (result * PRIME) + (this.emailNotification == null ? 43 : this.emailNotification.hashCode()); + result = + (result * PRIME) + + (this.updateChannel == null ? 43 : this.updateChannel.hashCode()); result = (result * PRIME) + (this.networkEndpointDetails == null @@ -907,9 +1086,14 @@ public int hashCode() { result = (result * PRIME) + (this.serviceUrl == null ? 43 : this.serviceUrl.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.featureBundle == null ? 43 : this.featureBundle.hashCode()); + result = (result * PRIME) + (this.domainId == null ? 43 : this.domainId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/AnalyticsInstanceSummary.java b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/AnalyticsInstanceSummary.java index d231dd9512c..e7b5c8ece4f 100644 --- a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/AnalyticsInstanceSummary.java +++ b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/AnalyticsInstanceSummary.java @@ -35,6 +35,9 @@ public final class AnalyticsInstanceSummary "emailNotification", "networkEndpointDetails", "serviceUrl", + "definedTags", + "freeformTags", + "systemTags", "timeCreated", "timeUpdated" }) @@ -50,6 +53,9 @@ public AnalyticsInstanceSummary( String emailNotification, NetworkEndpointDetails networkEndpointDetails, String serviceUrl, + java.util.Map> definedTags, + java.util.Map freeformTags, + java.util.Map> systemTags, java.util.Date timeCreated, java.util.Date timeUpdated) { super(); @@ -64,6 +70,9 @@ public AnalyticsInstanceSummary( this.emailNotification = emailNotification; this.networkEndpointDetails = networkEndpointDetails; this.serviceUrl = serviceUrl; + this.definedTags = definedTags; + this.freeformTags = freeformTags; + this.systemTags = systemTags; this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; } @@ -250,6 +259,75 @@ public Builder serviceUrl(String serviceUrl) { this.__explicitlySet__.add("serviceUrl"); return this; } + /** + * Defined tags for this resource. Each key is predefined and scoped to a + * namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a + * namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * System tags for this resource. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"key": "value"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } /** * The date and time the instance was created, in the format defined by RFC3339. *

@@ -312,6 +390,9 @@ public AnalyticsInstanceSummary build() { this.emailNotification, this.networkEndpointDetails, this.serviceUrl, + this.definedTags, + this.freeformTags, + this.systemTags, this.timeCreated, this.timeUpdated); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -355,6 +436,15 @@ public Builder copy(AnalyticsInstanceSummary model) { if (model.wasPropertyExplicitlySet("serviceUrl")) { this.serviceUrl(model.getServiceUrl()); } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -534,6 +624,68 @@ public String getServiceUrl() { return serviceUrl; } + /** + * Defined tags for this resource. Each key is predefined and scoped to a + * namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a + * namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * System tags for this resource. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + /** * The date and time the instance was created, in the format defined by RFC3339. *

@@ -599,6 +751,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", emailNotification=").append(String.valueOf(this.emailNotification)); sb.append(", networkEndpointDetails=").append(String.valueOf(this.networkEndpointDetails)); sb.append(", serviceUrl=").append(String.valueOf(this.serviceUrl)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(")"); @@ -627,6 +782,9 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.networkEndpointDetails, other.networkEndpointDetails) && java.util.Objects.equals(this.serviceUrl, other.serviceUrl) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && super.equals(other); @@ -657,6 +815,9 @@ public int hashCode() { ? 43 : this.networkEndpointDetails.hashCode()); result = (result * PRIME) + (this.serviceUrl == null ? 43 : this.serviceUrl.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/Capacity.java b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/Capacity.java index 3541c614ce4..f8bf3a509c3 100644 --- a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/Capacity.java +++ b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/Capacity.java @@ -31,6 +31,8 @@ public Capacity(CapacityType capacityType, Integer capacityValue) { public static class Builder { /** * The capacity model to use. + * Accepted values are: + * OLPU_COUNT, USER_COUNT * **/ @com.fasterxml.jackson.annotation.JsonProperty("capacityType") @@ -38,6 +40,8 @@ public static class Builder { /** * The capacity model to use. + * Accepted values are: + * OLPU_COUNT, USER_COUNT * * @param capacityType the value to set * @return this builder @@ -48,16 +52,16 @@ public Builder capacityType(CapacityType capacityType) { return this; } /** - * The capacity value selected (OLPU count, number of users, ...etc...). This parameter affects the - * number of CPUs, amount of memory or other resources allocated to the instance. + * The capacity value selected, either the number of OCPUs (OLPU_COUNT) or the number of users (USER_COUNT). + * This parameter affects the number of OCPUs, amount of memory, and other resources allocated to the instance. * **/ @com.fasterxml.jackson.annotation.JsonProperty("capacityValue") private Integer capacityValue; /** - * The capacity value selected (OLPU count, number of users, ...etc...). This parameter affects the - * number of CPUs, amount of memory or other resources allocated to the instance. + * The capacity value selected, either the number of OCPUs (OLPU_COUNT) or the number of users (USER_COUNT). + * This parameter affects the number of OCPUs, amount of memory, and other resources allocated to the instance. * * @param capacityValue the value to set * @return this builder @@ -104,6 +108,8 @@ public Builder toBuilder() { /** * The capacity model to use. + * Accepted values are: + * OLPU_COUNT, USER_COUNT * **/ @com.fasterxml.jackson.annotation.JsonProperty("capacityType") @@ -111,6 +117,8 @@ public Builder toBuilder() { /** * The capacity model to use. + * Accepted values are: + * OLPU_COUNT, USER_COUNT * * @return the value **/ @@ -119,16 +127,16 @@ public CapacityType getCapacityType() { } /** - * The capacity value selected (OLPU count, number of users, ...etc...). This parameter affects the - * number of CPUs, amount of memory or other resources allocated to the instance. + * The capacity value selected, either the number of OCPUs (OLPU_COUNT) or the number of users (USER_COUNT). + * This parameter affects the number of OCPUs, amount of memory, and other resources allocated to the instance. * **/ @com.fasterxml.jackson.annotation.JsonProperty("capacityValue") private final Integer capacityValue; /** - * The capacity value selected (OLPU count, number of users, ...etc...). This parameter affects the - * number of CPUs, amount of memory or other resources allocated to the instance. + * The capacity value selected, either the number of OCPUs (OLPU_COUNT) or the number of users (USER_COUNT). + * This parameter affects the number of OCPUs, amount of memory, and other resources allocated to the instance. * * @return the value **/ diff --git a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/CreateAnalyticsInstanceDetails.java b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/CreateAnalyticsInstanceDetails.java index e00848b8c56..085ffbce112 100644 --- a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/CreateAnalyticsInstanceDetails.java +++ b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/CreateAnalyticsInstanceDetails.java @@ -35,7 +35,11 @@ public final class CreateAnalyticsInstanceDetails "idcsAccessToken", "definedTags", "freeformTags", - "kmsKeyId" + "updateChannel", + "kmsKeyId", + "domainId", + "adminUser", + "featureBundle" }) public CreateAnalyticsInstanceDetails( String name, @@ -49,7 +53,11 @@ public CreateAnalyticsInstanceDetails( String idcsAccessToken, java.util.Map> definedTags, java.util.Map freeformTags, - String kmsKeyId) { + UpdateChannel updateChannel, + String kmsKeyId, + String domainId, + String adminUser, + FeatureBundle featureBundle) { super(); this.name = name; this.description = description; @@ -62,7 +70,11 @@ public CreateAnalyticsInstanceDetails( this.idcsAccessToken = idcsAccessToken; this.definedTags = definedTags; this.freeformTags = freeformTags; + this.updateChannel = updateChannel; this.kmsKeyId = kmsKeyId; + this.domainId = domainId; + this.adminUser = adminUser; + this.featureBundle = featureBundle; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -261,14 +273,32 @@ public Builder freeformTags(java.util.Map freeformTags) { return this; } /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the OCI Vault Key encrypting the customer data stored in this Analytics instance. A null value indicates Oracle managed default encryption. + * Analytics instance update channel. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateChannel") + private UpdateChannel updateChannel; + + /** + * Analytics instance update channel. + * + * @param updateChannel the value to set + * @return this builder + **/ + public Builder updateChannel(UpdateChannel updateChannel) { + this.updateChannel = updateChannel; + this.__explicitlySet__.add("updateChannel"); + return this; + } + /** + * OCID of the OCI Vault Key encrypting the customer data stored in this Analytics instance. A null value indicates Oracle managed default encryption. * **/ @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") private String kmsKeyId; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the OCI Vault Key encrypting the customer data stored in this Analytics instance. A null value indicates Oracle managed default encryption. + * OCID of the OCI Vault Key encrypting the customer data stored in this Analytics instance. A null value indicates Oracle managed default encryption. * * @param kmsKeyId the value to set * @return this builder @@ -278,6 +308,60 @@ public Builder kmsKeyId(String kmsKeyId) { this.__explicitlySet__.add("kmsKeyId"); return this; } + /** + * domain id for which the user is authorized. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domainId") + private String domainId; + + /** + * domain id for which the user is authorized. + * + * @param domainId the value to set + * @return this builder + **/ + public Builder domainId(String domainId) { + this.domainId = domainId; + this.__explicitlySet__.add("domainId"); + return this; + } + /** + * user name of the authorized user. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminUser") + private String adminUser; + + /** + * user name of the authorized user. + * + * @param adminUser the value to set + * @return this builder + **/ + public Builder adminUser(String adminUser) { + this.adminUser = adminUser; + this.__explicitlySet__.add("adminUser"); + return this; + } + /** + * The feature set of an Analytics instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("featureBundle") + private FeatureBundle featureBundle; + + /** + * The feature set of an Analytics instance. + * + * @param featureBundle the value to set + * @return this builder + **/ + public Builder featureBundle(FeatureBundle featureBundle) { + this.featureBundle = featureBundle; + this.__explicitlySet__.add("featureBundle"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -296,7 +380,11 @@ public CreateAnalyticsInstanceDetails build() { this.idcsAccessToken, this.definedTags, this.freeformTags, - this.kmsKeyId); + this.updateChannel, + this.kmsKeyId, + this.domainId, + this.adminUser, + this.featureBundle); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -338,9 +426,21 @@ public Builder copy(CreateAnalyticsInstanceDetails model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } + if (model.wasPropertyExplicitlySet("updateChannel")) { + this.updateChannel(model.getUpdateChannel()); + } if (model.wasPropertyExplicitlySet("kmsKeyId")) { this.kmsKeyId(model.getKmsKeyId()); } + if (model.wasPropertyExplicitlySet("domainId")) { + this.domainId(model.getDomainId()); + } + if (model.wasPropertyExplicitlySet("adminUser")) { + this.adminUser(model.getAdminUser()); + } + if (model.wasPropertyExplicitlySet("featureBundle")) { + this.featureBundle(model.getFeatureBundle()); + } return this; } } @@ -527,14 +627,30 @@ public java.util.Map getFreeformTags() { } /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the OCI Vault Key encrypting the customer data stored in this Analytics instance. A null value indicates Oracle managed default encryption. + * Analytics instance update channel. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateChannel") + private final UpdateChannel updateChannel; + + /** + * Analytics instance update channel. + * + * @return the value + **/ + public UpdateChannel getUpdateChannel() { + return updateChannel; + } + + /** + * OCID of the OCI Vault Key encrypting the customer data stored in this Analytics instance. A null value indicates Oracle managed default encryption. * **/ @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") private final String kmsKeyId; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the OCI Vault Key encrypting the customer data stored in this Analytics instance. A null value indicates Oracle managed default encryption. + * OCID of the OCI Vault Key encrypting the customer data stored in this Analytics instance. A null value indicates Oracle managed default encryption. * * @return the value **/ @@ -542,6 +658,54 @@ public String getKmsKeyId() { return kmsKeyId; } + /** + * domain id for which the user is authorized. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domainId") + private final String domainId; + + /** + * domain id for which the user is authorized. + * + * @return the value + **/ + public String getDomainId() { + return domainId; + } + + /** + * user name of the authorized user. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminUser") + private final String adminUser; + + /** + * user name of the authorized user. + * + * @return the value + **/ + public String getAdminUser() { + return adminUser; + } + + /** + * The feature set of an Analytics instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("featureBundle") + private final FeatureBundle featureBundle; + + /** + * The feature set of an Analytics instance. + * + * @return the value + **/ + public FeatureBundle getFeatureBundle() { + return featureBundle; + } + @Override public String toString() { return this.toString(true); @@ -567,7 +731,11 @@ public String toString(boolean includeByteArrayContents) { sb.append(", idcsAccessToken=").append(String.valueOf(this.idcsAccessToken)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", updateChannel=").append(String.valueOf(this.updateChannel)); sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", domainId=").append(String.valueOf(this.domainId)); + sb.append(", adminUser=").append(String.valueOf(this.adminUser)); + sb.append(", featureBundle=").append(String.valueOf(this.featureBundle)); sb.append(")"); return sb.toString(); } @@ -594,7 +762,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.idcsAccessToken, other.idcsAccessToken) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.updateChannel, other.updateChannel) && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.domainId, other.domainId) + && java.util.Objects.equals(this.adminUser, other.adminUser) + && java.util.Objects.equals(this.featureBundle, other.featureBundle) && super.equals(other); } @@ -623,7 +795,15 @@ public int hashCode() { + (this.idcsAccessToken == null ? 43 : this.idcsAccessToken.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = + (result * PRIME) + + (this.updateChannel == null ? 43 : this.updateChannel.hashCode()); result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = (result * PRIME) + (this.domainId == null ? 43 : this.domainId.hashCode()); + result = (result * PRIME) + (this.adminUser == null ? 43 : this.adminUser.hashCode()); + result = + (result * PRIME) + + (this.featureBundle == null ? 43 : this.featureBundle.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/FeatureBundle.java b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/FeatureBundle.java new file mode 100644 index 00000000000..fc41453ff4c --- /dev/null +++ b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/FeatureBundle.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.analytics.model; + +/** + * Feature Bundle Enum. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190331") +public enum FeatureBundle { + FawPaid("FAW_PAID"), + FawFree("FAW_FREE"), + EeEmbedded("EE_EMBEDDED"), + SeEmbedded("SE_EMBEDDED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(FeatureBundle.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (FeatureBundle v : FeatureBundle.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + FeatureBundle(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static FeatureBundle create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'FeatureBundle', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/SetFeatureBundleDetails.java b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/SetFeatureBundleDetails.java new file mode 100644 index 00000000000..0cdeadf2f9f --- /dev/null +++ b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/SetFeatureBundleDetails.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.analytics.model; + +/** + * Input payload for the feature set of an Analytics instance. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190331") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SetFeatureBundleDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SetFeatureBundleDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"featureBundle"}) + public SetFeatureBundleDetails(FeatureBundle featureBundle) { + super(); + this.featureBundle = featureBundle; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The feature set of an Analytics instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("featureBundle") + private FeatureBundle featureBundle; + + /** + * The feature set of an Analytics instance. + * + * @param featureBundle the value to set + * @return this builder + **/ + public Builder featureBundle(FeatureBundle featureBundle) { + this.featureBundle = featureBundle; + this.__explicitlySet__.add("featureBundle"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SetFeatureBundleDetails build() { + SetFeatureBundleDetails model = new SetFeatureBundleDetails(this.featureBundle); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SetFeatureBundleDetails model) { + if (model.wasPropertyExplicitlySet("featureBundle")) { + this.featureBundle(model.getFeatureBundle()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The feature set of an Analytics instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("featureBundle") + private final FeatureBundle featureBundle; + + /** + * The feature set of an Analytics instance. + * + * @return the value + **/ + public FeatureBundle getFeatureBundle() { + return featureBundle; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SetFeatureBundleDetails("); + sb.append("super=").append(super.toString()); + sb.append("featureBundle=").append(String.valueOf(this.featureBundle)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SetFeatureBundleDetails)) { + return false; + } + + SetFeatureBundleDetails other = (SetFeatureBundleDetails) o; + return java.util.Objects.equals(this.featureBundle, other.featureBundle) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.featureBundle == null ? 43 : this.featureBundle.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/UpdateAnalyticsInstanceDetails.java b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/UpdateAnalyticsInstanceDetails.java index cbde85d3a0a..778595f4f86 100644 --- a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/UpdateAnalyticsInstanceDetails.java +++ b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/UpdateAnalyticsInstanceDetails.java @@ -29,20 +29,23 @@ public final class UpdateAnalyticsInstanceDetails "emailNotification", "licenseType", "definedTags", - "freeformTags" + "freeformTags", + "updateChannel" }) public UpdateAnalyticsInstanceDetails( String description, String emailNotification, LicenseType licenseType, java.util.Map> definedTags, - java.util.Map freeformTags) { + java.util.Map freeformTags, + UpdateChannel updateChannel) { super(); this.description = description; this.emailNotification = emailNotification; this.licenseType = licenseType; this.definedTags = definedTags; this.freeformTags = freeformTags; + this.updateChannel = updateChannel; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -150,6 +153,24 @@ public Builder freeformTags(java.util.Map freeformTags) { this.__explicitlySet__.add("freeformTags"); return this; } + /** + * Analytics instance update channel. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateChannel") + private UpdateChannel updateChannel; + + /** + * Analytics instance update channel. + * + * @param updateChannel the value to set + * @return this builder + **/ + public Builder updateChannel(UpdateChannel updateChannel) { + this.updateChannel = updateChannel; + this.__explicitlySet__.add("updateChannel"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -161,7 +182,8 @@ public UpdateAnalyticsInstanceDetails build() { this.emailNotification, this.licenseType, this.definedTags, - this.freeformTags); + this.freeformTags, + this.updateChannel); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -185,6 +207,9 @@ public Builder copy(UpdateAnalyticsInstanceDetails model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } + if (model.wasPropertyExplicitlySet("updateChannel")) { + this.updateChannel(model.getUpdateChannel()); + } return this; } } @@ -292,6 +317,22 @@ public java.util.Map getFreeformTags() { return freeformTags; } + /** + * Analytics instance update channel. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateChannel") + private final UpdateChannel updateChannel; + + /** + * Analytics instance update channel. + * + * @return the value + **/ + public UpdateChannel getUpdateChannel() { + return updateChannel; + } + @Override public String toString() { return this.toString(true); @@ -311,6 +352,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", licenseType=").append(String.valueOf(this.licenseType)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", updateChannel=").append(String.valueOf(this.updateChannel)); sb.append(")"); return sb.toString(); } @@ -330,6 +372,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.licenseType, other.licenseType) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.updateChannel, other.updateChannel) && super.equals(other); } @@ -344,6 +387,9 @@ public int hashCode() { result = (result * PRIME) + (this.licenseType == null ? 43 : this.licenseType.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = + (result * PRIME) + + (this.updateChannel == null ? 43 : this.updateChannel.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/UpdateChannel.java b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/UpdateChannel.java new file mode 100644 index 00000000000..b80e5d6d735 --- /dev/null +++ b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/model/UpdateChannel.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.analytics.model; + +/** + * EARLY - Early update channel recommended for pre-production use. + * REGULAR - Regular update channel recommended for production use. + * PHASE_1 - Reserved for future use. + * PHASE_2 - Reserved for future use. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190331") +public enum UpdateChannel { + Regular("REGULAR"), + Early("EARLY"), + Phase2("PHASE_2"), + Phase1("PHASE_1"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateChannel.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (UpdateChannel v : UpdateChannel.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + UpdateChannel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static UpdateChannel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'UpdateChannel', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/requests/SetFeatureBundleRequest.java b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/requests/SetFeatureBundleRequest.java new file mode 100644 index 00000000000..74b31cb3e98 --- /dev/null +++ b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/requests/SetFeatureBundleRequest.java @@ -0,0 +1,376 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.analytics.requests; + +import com.oracle.bmc.analytics.model.*; +/** + * Example: Click here to see how to use SetFeatureBundleRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190331") +public class SetFeatureBundleRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.analytics.model.SetFeatureBundleDetails> { + + /** + * The OCID of the AnalyticsInstance. + * + */ + private String analyticsInstanceId; + + /** + * The OCID of the AnalyticsInstance. + * + */ + public String getAnalyticsInstanceId() { + return analyticsInstanceId; + } + /** + * Input payload for the feature set of an Analytics instance. + * + */ + private com.oracle.bmc.analytics.model.SetFeatureBundleDetails setFeatureBundleDetails; + + /** + * Input payload for the feature set of an Analytics instance. + * + */ + public com.oracle.bmc.analytics.model.SetFeatureBundleDetails getSetFeatureBundleDetails() { + return setFeatureBundleDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.analytics.model.SetFeatureBundleDetails getBody$() { + return setFeatureBundleDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + SetFeatureBundleRequest, + com.oracle.bmc.analytics.model.SetFeatureBundleDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the AnalyticsInstance. + * + */ + private String analyticsInstanceId = null; + + /** + * The OCID of the AnalyticsInstance. + * + * @param analyticsInstanceId the value to set + * @return this builder instance + */ + public Builder analyticsInstanceId(String analyticsInstanceId) { + this.analyticsInstanceId = analyticsInstanceId; + return this; + } + + /** + * Input payload for the feature set of an Analytics instance. + * + */ + private com.oracle.bmc.analytics.model.SetFeatureBundleDetails setFeatureBundleDetails = + null; + + /** + * Input payload for the feature set of an Analytics instance. + * + * @param setFeatureBundleDetails the value to set + * @return this builder instance + */ + public Builder setFeatureBundleDetails( + com.oracle.bmc.analytics.model.SetFeatureBundleDetails setFeatureBundleDetails) { + this.setFeatureBundleDetails = setFeatureBundleDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SetFeatureBundleRequest o) { + analyticsInstanceId(o.getAnalyticsInstanceId()); + setFeatureBundleDetails(o.getSetFeatureBundleDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of SetFeatureBundleRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of SetFeatureBundleRequest + */ + public SetFeatureBundleRequest build() { + SetFeatureBundleRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.analytics.model.SetFeatureBundleDetails body) { + setFeatureBundleDetails(body); + return this; + } + + /** + * Build the instance of SetFeatureBundleRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of SetFeatureBundleRequest + */ + public SetFeatureBundleRequest buildWithoutInvocationCallback() { + SetFeatureBundleRequest request = new SetFeatureBundleRequest(); + request.analyticsInstanceId = analyticsInstanceId; + request.setFeatureBundleDetails = setFeatureBundleDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new SetFeatureBundleRequest(analyticsInstanceId, setFeatureBundleDetails, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .analyticsInstanceId(analyticsInstanceId) + .setFeatureBundleDetails(setFeatureBundleDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",analyticsInstanceId=").append(String.valueOf(this.analyticsInstanceId)); + sb.append(",setFeatureBundleDetails=").append(String.valueOf(this.setFeatureBundleDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SetFeatureBundleRequest)) { + return false; + } + + SetFeatureBundleRequest other = (SetFeatureBundleRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.analyticsInstanceId, other.analyticsInstanceId) + && java.util.Objects.equals( + this.setFeatureBundleDetails, other.setFeatureBundleDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.analyticsInstanceId == null + ? 43 + : this.analyticsInstanceId.hashCode()); + result = + (result * PRIME) + + (this.setFeatureBundleDetails == null + ? 43 + : this.setFeatureBundleDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-analytics/src/main/java/com/oracle/bmc/analytics/responses/SetFeatureBundleResponse.java b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/responses/SetFeatureBundleResponse.java new file mode 100644 index 00000000000..a9879b15f6d --- /dev/null +++ b/bmc-analytics/src/main/java/com/oracle/bmc/analytics/responses/SetFeatureBundleResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.analytics.responses; + +import com.oracle.bmc.analytics.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190331") +public class SetFeatureBundleResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this ID to track the status + * of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this ID to track the status + * of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private SetFeatureBundleResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this ID to track the status + * of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this ID to track the status + * of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SetFeatureBundleResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public SetFeatureBundleResponse build() { + return new SetFeatureBundleResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SetFeatureBundleResponse)) { + return false; + } + + SetFeatureBundleResponse other = (SetFeatureBundleResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-announcementsservice/pom.xml b/bmc-announcementsservice/pom.xml index effd9a49d0e..23e7ece871b 100644 --- a/bmc-announcementsservice/pom.xml +++ b/bmc-announcementsservice/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-announcementsservice @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/Announcement.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/Announcement.java index c8cc81fc1b6..b82b5dcc2d9 100644 --- a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/Announcement.java +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/Announcement.java @@ -74,6 +74,20 @@ public interface Announcement extends AutoCloseable { */ GetAnnouncementResponse getAnnouncement(GetAnnouncementRequest request); + /** + * Gets the compartment details of an announcement. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetAnnouncementCompartment API. + */ + GetAnnouncementCompartmentResponse getAnnouncementCompartment( + GetAnnouncementCompartmentRequest request); + /** * Gets information about whether a specific announcement was acknowledged by a user. *

diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/AnnouncementAsync.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/AnnouncementAsync.java index 056e1470484..cfd6e331430 100644 --- a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/AnnouncementAsync.java +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/AnnouncementAsync.java @@ -76,6 +76,23 @@ java.util.concurrent.Future getAnnouncement( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets the compartment details of an announcement. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getAnnouncementCompartment( + GetAnnouncementCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetAnnouncementCompartmentRequest, GetAnnouncementCompartmentResponse> + handler); + /** * Gets information about whether a specific announcement was acknowledged by a user. *

diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/AnnouncementAsyncClient.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/AnnouncementAsyncClient.java index c2ace987439..aaf3dbd37a7 100644 --- a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/AnnouncementAsyncClient.java +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/AnnouncementAsyncClient.java @@ -503,6 +503,57 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + getAnnouncementCompartment( + GetAnnouncementCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetAnnouncementCompartmentRequest, + GetAnnouncementCompartmentResponse> + handler) { + LOG.trace("Called async getAnnouncementCompartment"); + final GetAnnouncementCompartmentRequest interceptedRequest = + GetAnnouncementCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAnnouncementCompartmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Announcement", + "GetAnnouncementCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/announcements/0.0.1/AnnouncementCompartment/GetAnnouncementCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetAnnouncementCompartmentResponse> + transformer = + GetAnnouncementCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetAnnouncementCompartmentRequest, GetAnnouncementCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetAnnouncementCompartmentRequest, + GetAnnouncementCompartmentResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetAnnouncementCompartmentRequest, GetAnnouncementCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getAnnouncementUserStatus( GetAnnouncementUserStatusRequest request, diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/AnnouncementClient.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/AnnouncementClient.java index 117966edbb2..9a68c00481b 100644 --- a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/AnnouncementClient.java +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/AnnouncementClient.java @@ -510,6 +510,44 @@ public GetAnnouncementResponse getAnnouncement(GetAnnouncementRequest request) { }); } + @Override + public GetAnnouncementCompartmentResponse getAnnouncementCompartment( + GetAnnouncementCompartmentRequest request) { + LOG.trace("Called getAnnouncementCompartment"); + final GetAnnouncementCompartmentRequest interceptedRequest = + GetAnnouncementCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAnnouncementCompartmentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Announcement", + "GetAnnouncementCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/announcements/0.0.1/AnnouncementCompartment/GetAnnouncementCompartment"); + java.util.function.Function + transformer = + GetAnnouncementCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetAnnouncementUserStatusResponse getAnnouncementUserStatus( GetAnnouncementUserStatusRequest request) { diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/SdkClientsMetadata.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/SdkClientsMetadata.java index be6cb1a1457..3be6b0c2048 100644 --- a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/SdkClientsMetadata.java +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/SdkClientsMetadata.java @@ -13,6 +13,8 @@ AnnouncementSubscriptionAsyncClient.class, AnnouncementSubscriptionClient.class, AnnouncementsPreferencesAsyncClient.class, - AnnouncementsPreferencesClient.class + AnnouncementsPreferencesClient.class, + ServiceAsyncClient.class, + ServiceClient.class }) public final class SdkClientsMetadata {} diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/Service.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/Service.java new file mode 100644 index 00000000000..7561959a32b --- /dev/null +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/Service.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.announcementsservice; + +import com.oracle.bmc.announcementsservice.requests.*; +import com.oracle.bmc.announcementsservice.responses.*; + +/** + * Manage Oracle Cloud Infrastructure console announcements. + * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 0.0.1") +public interface Service extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the service. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this Region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * List all active services + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListServices API. + */ + ListServicesResponse listServices(ListServicesRequest request); + + /** + * Gets the pre-configured paginators available for list operations in this service which may return multiple + * pages of data. These paginators provide an {@link java.lang.Iterable} interface so that service responses, or + * resources/records, can be iterated through without having to manually deal with pagination and page tokens. + * + * @return The service paginators. + */ + ServicePaginators getPaginators(); +} diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/ServiceAsync.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/ServiceAsync.java new file mode 100644 index 00000000000..478b9644c3a --- /dev/null +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/ServiceAsync.java @@ -0,0 +1,76 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.announcementsservice; + +import com.oracle.bmc.announcementsservice.requests.*; +import com.oracle.bmc.announcementsservice.responses.*; + +/** + * Manage Oracle Cloud Infrastructure console announcements. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 0.0.1") +public interface ServiceAsync extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the serice. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * List all active services + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listServices( + ListServicesRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); +} diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/ServiceAsyncClient.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/ServiceAsyncClient.java new file mode 100644 index 00000000000..2e37116240b --- /dev/null +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/ServiceAsyncClient.java @@ -0,0 +1,503 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.announcementsservice; + +import com.oracle.bmc.announcementsservice.internal.http.*; +import com.oracle.bmc.announcementsservice.requests.*; +import com.oracle.bmc.announcementsservice.responses.*; + +/** + * Async client implementation for Service service.
+ * There are two ways to use async client: + * 1. Use AsyncHandler: using AsyncHandler, if the response to the call is an {@link java.io.InputStream}, like + * getObject Api in object storage service, developers need to process the stream in AsyncHandler, and not anywhere else, + * because the stream will be closed right after the AsyncHandler is invoked.
+ * 2. Use Java Future: using Java Future, developers need to close the stream after they are done with the Java Future.
+ * Accessing the result should be done in a mutually exclusive manner, either through the Future or the AsyncHandler, + * but not both. If the Future is used, the caller should pass in null as the AsyncHandler. If the AsyncHandler + * is used, it is still safe to use the Future to determine whether or not the request was completed via + * Future.isDone/isCancelled.
+ * Please refer to https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 0.0.1") +public class ServiceAsyncClient implements ServiceAsync { + /** + * Service instance for Service. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("SERVICE") + .serviceEndpointPrefix("announcements") + .serviceEndpointTemplate("https://announcements.{region}.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ServiceAsyncClient.class); + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public ServiceAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public ServiceAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public ServiceAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public ServiceAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public ServiceAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public ServiceAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public ServiceAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + public ServiceAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.clientConfigurationToUse = configuration; + + this.refreshClient(); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder { + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public ServiceAsyncClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new ServiceAsyncClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint); + } + } + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public java.util.concurrent.Future listServices( + ListServicesRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listServices"); + final ListServicesRequest interceptedRequest = + ListServicesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListServicesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Service", + "ListServices", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/announcements/0.0.1/Service/ListServices"); + final java.util.function.Function + transformer = + ListServicesConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListServicesRequest, ListServicesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListServicesRequest, ListServicesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/ServiceClient.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/ServiceClient.java new file mode 100644 index 00000000000..602e09cabbd --- /dev/null +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/ServiceClient.java @@ -0,0 +1,515 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.announcementsservice; + +import com.oracle.bmc.announcementsservice.internal.http.*; +import com.oracle.bmc.announcementsservice.requests.*; +import com.oracle.bmc.announcementsservice.responses.*; +import com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration; +import com.oracle.bmc.util.CircuitBreakerUtils; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 0.0.1") +public class ServiceClient implements Service { + /** + * Service instance for Service. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("SERVICE") + .serviceEndpointPrefix("announcements") + .serviceEndpointTemplate("https://announcements.{region}.{secondLevelDomain}") + .build(); + // attempt twice if it's instance principals, immediately failures will try to refresh the token + private static final int MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS = 2; + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ServiceClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final ServicePaginators paginators; + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + circuitBreakerConfiguration; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public ServiceClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public ServiceClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public ServiceClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public ServiceClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public ServiceClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public ServiceClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public ServiceClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * Use the {@link Builder} to get access to all these parameters. + * + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + protected ServiceClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + this.restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + + this.clientConfigurationToUse = + (configuration != null) + ? configuration + : com.oracle.bmc.ClientConfiguration.builder().build(); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.retryConfiguration = clientConfigurationToUse.getRetryConfiguration(); + final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + userCircuitBreakerConfiguration = + CircuitBreakerUtils.getUserDefinedCircuitBreakerConfiguration( + configuration); + if (userCircuitBreakerConfiguration == null) { + this.circuitBreakerConfiguration = + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION; + } else { + this.circuitBreakerConfiguration = userCircuitBreakerConfiguration; + } + + this.refreshClient(); + + this.paginators = new ServicePaginators(this); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder { + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public ServiceClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new ServiceClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + restClientFactoryBuilder); + } + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, this.authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient, + null, + this.circuitBreakerConfiguration); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public ListServicesResponse listServices(ListServicesRequest request) { + LOG.trace("Called listServices"); + final ListServicesRequest interceptedRequest = + ListServicesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListServicesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Service", + "ListServices", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/announcements/0.0.1/Service/ListServices"); + java.util.function.Function transformer = + ListServicesConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ServicePaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/ServicePaginators.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/ServicePaginators.java new file mode 100644 index 00000000000..d72e3e2d37d --- /dev/null +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/ServicePaginators.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.announcementsservice; + +import com.oracle.bmc.announcementsservice.requests.*; +import com.oracle.bmc.announcementsservice.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of Service where multiple pages of data may be fetched. + * Two styles of iteration are supported: + * + *

    + *
  • Iterating over the Response objects returned by the list operation. These are referred to as ResponseIterators, and the methods are suffixed with ResponseIterator. For example: listUsersResponseIterator
  • + *
  • Iterating over the resources/records being listed. These are referred to as RecordIterators, and the methods are suffixed with RecordIterator. For example: listUsersRecordIterator
  • + *
+ * + * These iterables abstract away the need to write code to manually handle pagination via looping and using the page tokens. + * They will automatically fetch more data from the service when required. + * + * As an example, if we were using the ListUsers operation in IdentityService, then the {@link java.lang.Iterable} returned by calling a + * ResponseIterator method would iterate over the ListUsersResponse objects returned by each ListUsers call, whereas the {@link java.lang.Iterable} + * returned by calling a RecordIterator method would iterate over the User records and we don't have to deal with ListUsersResponse objects at all. + * In either case, pagination will be automatically handled so we can iterate until there are no more responses or no more resources/records available. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 0.0.1") +public class ServicePaginators { + private final Service client; + + public ServicePaginators(Service client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listServices operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listServicesResponseIterator( + final ListServicesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListServicesRequest.Builder, ListServicesRequest, ListServicesResponse>( + new java.util.function.Supplier() { + @Override + public ListServicesRequest.Builder get() { + return ListServicesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListServicesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListServicesRequest.Builder>, + ListServicesRequest>() { + @Override + public ListServicesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListServicesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListServicesResponse apply(ListServicesRequest request) { + return client.listServices(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.announcementsservice.model.ServiceSummary} objects + * contained in responses from the listServices operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.announcementsservice.model.ServiceSummary} objects + * contained in responses received from the service. + */ + public Iterable + listServicesRecordIterator(final ListServicesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListServicesRequest.Builder, ListServicesRequest, ListServicesResponse, + com.oracle.bmc.announcementsservice.model.ServiceSummary>( + new java.util.function.Supplier() { + @Override + public ListServicesRequest.Builder get() { + return ListServicesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListServicesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListServicesRequest.Builder>, + ListServicesRequest>() { + @Override + public ListServicesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListServicesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListServicesResponse apply(ListServicesRequest request) { + return client.listServices(request); + } + }, + new java.util.function.Function< + ListServicesResponse, + java.util.List< + com.oracle.bmc.announcementsservice.model.ServiceSummary>>() { + @Override + public java.util.List + apply(ListServicesResponse response) { + return response.getServicesCollection().getItems(); + } + }); + } +} diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/internal/http/GetAnnouncementCompartmentConverter.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/internal/http/GetAnnouncementCompartmentConverter.java new file mode 100644 index 00000000000..0d5da4ec0b2 --- /dev/null +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/internal/http/GetAnnouncementCompartmentConverter.java @@ -0,0 +1,157 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.announcementsservice.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.announcementsservice.model.*; +import com.oracle.bmc.announcementsservice.requests.*; +import com.oracle.bmc.announcementsservice.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 0.0.1") +public class GetAnnouncementCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetAnnouncementCompartmentConverter.class); + + public static com.oracle.bmc.announcementsservice.requests.GetAnnouncementCompartmentRequest + interceptRequest( + com.oracle.bmc.announcementsservice.requests.GetAnnouncementCompartmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.announcementsservice.requests.GetAnnouncementCompartmentRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAnnouncementId(), "announcementId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180904") + .path("announcements") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAnnouncementId())) + .path("compartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.announcementsservice.responses + .GetAnnouncementCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.announcementsservice.responses + .GetAnnouncementCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.announcementsservice.responses + .GetAnnouncementCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.announcementsservice.responses + .GetAnnouncementCompartmentResponse>() { + @Override + public com.oracle.bmc.announcementsservice.responses + .GetAnnouncementCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.announcementsservice.responses.GetAnnouncementCompartmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.announcementsservice.model + .AnnouncementCompartment>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.announcementsservice.model + .AnnouncementCompartment + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.announcementsservice.model + .AnnouncementCompartment + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.announcementsservice.model + .AnnouncementCompartment> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.announcementsservice.responses + .GetAnnouncementCompartmentResponse.Builder + builder = + com.oracle.bmc.announcementsservice.responses + .GetAnnouncementCompartmentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.announcementCompartment(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.announcementsservice.responses + .GetAnnouncementCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/internal/http/ListServicesConverter.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/internal/http/ListServicesConverter.java new file mode 100644 index 00000000000..002573bc748 --- /dev/null +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/internal/http/ListServicesConverter.java @@ -0,0 +1,199 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.announcementsservice.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.announcementsservice.model.*; +import com.oracle.bmc.announcementsservice.requests.*; +import com.oracle.bmc.announcementsservice.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 0.0.1") +public class ListServicesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListServicesConverter.class); + + public static com.oracle.bmc.announcementsservice.requests.ListServicesRequest interceptRequest( + com.oracle.bmc.announcementsservice.requests.ListServicesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.announcementsservice.requests.ListServicesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20180904").path("services"); + + if (request.getPlatformType() != null) { + target = + target.queryParam( + "platformType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPlatformType().getValue())); + } + + if (request.getCommsManagerName() != null) { + target = + target.queryParam( + "commsManagerName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCommsManagerName().getValue())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.announcementsservice.responses.ListServicesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.announcementsservice.responses.ListServicesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.announcementsservice.responses.ListServicesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.announcementsservice.responses + .ListServicesResponse>() { + @Override + public com.oracle.bmc.announcementsservice.responses + .ListServicesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.announcementsservice.responses.ListServicesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.announcementsservice.model + .ServicesCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.announcementsservice.model + .ServicesCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.announcementsservice.model + .ServicesCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.announcementsservice.model + .ServicesCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.announcementsservice.responses.ListServicesResponse + .Builder + builder = + com.oracle.bmc.announcementsservice.responses + .ListServicesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.servicesCollection(response.getItem()); + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.announcementsservice.responses.ListServicesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/AnnouncementCompartment.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/AnnouncementCompartment.java new file mode 100644 index 00000000000..f3b798faaaf --- /dev/null +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/AnnouncementCompartment.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.announcementsservice.model; + +/** + * Compartment details of an announcement. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 0.0.1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AnnouncementCompartment.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AnnouncementCompartment + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public AnnouncementCompartment(String compartmentId) { + super(); + this.compartmentId = compartmentId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the compartment to which the announcement belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment to which the announcement belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AnnouncementCompartment build() { + AnnouncementCompartment model = new AnnouncementCompartment(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AnnouncementCompartment model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the compartment to which the announcement belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment to which the announcement belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AnnouncementCompartment("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AnnouncementCompartment)) { + return false; + } + + AnnouncementCompartment other = (AnnouncementCompartment) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/BaseAnnouncement.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/BaseAnnouncement.java index caaf7ac8014..fb0f85b1799 100644 --- a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/BaseAnnouncement.java +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/BaseAnnouncement.java @@ -541,6 +541,7 @@ public String getEnvironmentName() { public enum PlatformType { Iaas("IAAS"), Saas("SAAS"), + Paas("PAAS"), ; private final String value; diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/BaseService.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/BaseService.java new file mode 100644 index 00000000000..7ec73b10049 --- /dev/null +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/BaseService.java @@ -0,0 +1,347 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.announcementsservice.model; + +/** + * Object representing a single service. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 0.0.1") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type", + defaultImpl = BaseService.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = Service.class, name = "Service"), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ServiceSummary.class, + name = "ServiceSummary" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = NotificationsSummary.class, + name = "NotificationsSummary" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class BaseService extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "serviceName", + "shortName", + "teamName", + "platformType", + "commsManagerName", + "excludedRealms", + "previousServiceNames", + "timeCreated", + "timeUpdated", + "lifecycleState" + }) + protected BaseService( + String id, + String serviceName, + String shortName, + String teamName, + PlatformType platformType, + CommsManagerName commsManagerName, + java.util.List excludedRealms, + java.util.List previousServiceNames, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState) { + super(); + this.id = id; + this.serviceName = serviceName; + this.shortName = shortName; + this.teamName = teamName; + this.platformType = platformType; + this.commsManagerName = commsManagerName; + this.excludedRealms = excludedRealms; + this.previousServiceNames = previousServiceNames; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + } + + /** + * ID of the service object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * ID of the service object. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Name of the service represented by this object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceName") + private final String serviceName; + + /** + * Name of the service represented by this object. + * @return the value + **/ + public String getServiceName() { + return serviceName; + } + + /** + * Short name of the team to whom this service object is related. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shortName") + private final String shortName; + + /** + * Short name of the team to whom this service object is related. + * @return the value + **/ + public String getShortName() { + return shortName; + } + + /** + * Team name to which this service object is related. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("teamName") + private final String teamName; + + /** + * Team name to which this service object is related. + * @return the value + **/ + public String getTeamName() { + return teamName; + } + + /** + * The platform type this service object is related to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platformType") + private final PlatformType platformType; + + /** + * The platform type this service object is related to. + * @return the value + **/ + public PlatformType getPlatformType() { + return platformType; + } + + /** + * Name of the comms manager team that manages Notifications to this service. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commsManagerName") + private final CommsManagerName commsManagerName; + + /** + * Name of the comms manager team that manages Notifications to this service. + * @return the value + **/ + public CommsManagerName getCommsManagerName() { + return commsManagerName; + } + + /** + * The list of realms where this service is not available to be used. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("excludedRealms") + private final java.util.List excludedRealms; + + /** + * The list of realms where this service is not available to be used. + * @return the value + **/ + public java.util.List getExcludedRealms() { + return excludedRealms; + } + + /** + * The list of previously used names for this service object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("previousServiceNames") + private final java.util.List previousServiceNames; + + /** + * The list of previously used names for this service object. + * @return the value + **/ + public java.util.List getPreviousServiceNames() { + return previousServiceNames; + } + + /** + * The date and time when the service object was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time when the service object was created. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time when the service object was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time when the service object was updated. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Current state of the service object. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Deleted("DELETED"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + map.put(v.getValue(), v); + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid LifecycleState: " + key); + } + }; + /** + * Current state of the service object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * Current state of the service object. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BaseService("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", serviceName=").append(String.valueOf(this.serviceName)); + sb.append(", shortName=").append(String.valueOf(this.shortName)); + sb.append(", teamName=").append(String.valueOf(this.teamName)); + sb.append(", platformType=").append(String.valueOf(this.platformType)); + sb.append(", commsManagerName=").append(String.valueOf(this.commsManagerName)); + sb.append(", excludedRealms=").append(String.valueOf(this.excludedRealms)); + sb.append(", previousServiceNames=").append(String.valueOf(this.previousServiceNames)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BaseService)) { + return false; + } + + BaseService other = (BaseService) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.serviceName, other.serviceName) + && java.util.Objects.equals(this.shortName, other.shortName) + && java.util.Objects.equals(this.teamName, other.teamName) + && java.util.Objects.equals(this.platformType, other.platformType) + && java.util.Objects.equals(this.commsManagerName, other.commsManagerName) + && java.util.Objects.equals(this.excludedRealms, other.excludedRealms) + && java.util.Objects.equals(this.previousServiceNames, other.previousServiceNames) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.serviceName == null ? 43 : this.serviceName.hashCode()); + result = (result * PRIME) + (this.shortName == null ? 43 : this.shortName.hashCode()); + result = (result * PRIME) + (this.teamName == null ? 43 : this.teamName.hashCode()); + result = (result * PRIME) + (this.platformType == null ? 43 : this.platformType.hashCode()); + result = + (result * PRIME) + + (this.commsManagerName == null ? 43 : this.commsManagerName.hashCode()); + result = + (result * PRIME) + + (this.excludedRealms == null ? 43 : this.excludedRealms.hashCode()); + result = + (result * PRIME) + + (this.previousServiceNames == null + ? 43 + : this.previousServiceNames.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/CommsManagerName.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/CommsManagerName.java new file mode 100644 index 00000000000..78d2504e503 --- /dev/null +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/CommsManagerName.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.announcementsservice.model; + +/** + * Name of the comms manager team that manages Notifications to this service. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 0.0.1") +public enum CommsManagerName { + Cn("CN"), + Fusion("FUSION"), + As("AS"), + Erf("ERF"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CommsManagerName.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (CommsManagerName v : CommsManagerName.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + CommsManagerName(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static CommsManagerName create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'CommsManagerName', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/NotificationsSummary.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/NotificationsSummary.java new file mode 100644 index 00000000000..e7209ffef08 --- /dev/null +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/NotificationsSummary.java @@ -0,0 +1,266 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.announcementsservice.model; + +/** + * Summary of notification object, return by List API + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 0.0.1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = NotificationsSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class NotificationsSummary extends BaseService { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("serviceName") + private String serviceName; + + public Builder serviceName(String serviceName) { + this.serviceName = serviceName; + this.__explicitlySet__.add("serviceName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("shortName") + private String shortName; + + public Builder shortName(String shortName) { + this.shortName = shortName; + this.__explicitlySet__.add("shortName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("teamName") + private String teamName; + + public Builder teamName(String teamName) { + this.teamName = teamName; + this.__explicitlySet__.add("teamName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("platformType") + private PlatformType platformType; + + public Builder platformType(PlatformType platformType) { + this.platformType = platformType; + this.__explicitlySet__.add("platformType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("commsManagerName") + private CommsManagerName commsManagerName; + + public Builder commsManagerName(CommsManagerName commsManagerName) { + this.commsManagerName = commsManagerName; + this.__explicitlySet__.add("commsManagerName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("excludedRealms") + private java.util.List excludedRealms; + + public Builder excludedRealms(java.util.List excludedRealms) { + this.excludedRealms = excludedRealms; + this.__explicitlySet__.add("excludedRealms"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("previousServiceNames") + private java.util.List previousServiceNames; + + public Builder previousServiceNames(java.util.List previousServiceNames) { + this.previousServiceNames = previousServiceNames; + this.__explicitlySet__.add("previousServiceNames"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public NotificationsSummary build() { + NotificationsSummary model = + new NotificationsSummary( + this.id, + this.serviceName, + this.shortName, + this.teamName, + this.platformType, + this.commsManagerName, + this.excludedRealms, + this.previousServiceNames, + this.timeCreated, + this.timeUpdated, + this.lifecycleState); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(NotificationsSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("serviceName")) { + this.serviceName(model.getServiceName()); + } + if (model.wasPropertyExplicitlySet("shortName")) { + this.shortName(model.getShortName()); + } + if (model.wasPropertyExplicitlySet("teamName")) { + this.teamName(model.getTeamName()); + } + if (model.wasPropertyExplicitlySet("platformType")) { + this.platformType(model.getPlatformType()); + } + if (model.wasPropertyExplicitlySet("commsManagerName")) { + this.commsManagerName(model.getCommsManagerName()); + } + if (model.wasPropertyExplicitlySet("excludedRealms")) { + this.excludedRealms(model.getExcludedRealms()); + } + if (model.wasPropertyExplicitlySet("previousServiceNames")) { + this.previousServiceNames(model.getPreviousServiceNames()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public NotificationsSummary( + String id, + String serviceName, + String shortName, + String teamName, + PlatformType platformType, + CommsManagerName commsManagerName, + java.util.List excludedRealms, + java.util.List previousServiceNames, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState) { + super( + id, + serviceName, + shortName, + teamName, + platformType, + commsManagerName, + excludedRealms, + previousServiceNames, + timeCreated, + timeUpdated, + lifecycleState); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("NotificationsSummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof NotificationsSummary)) { + return false; + } + + NotificationsSummary other = (NotificationsSummary) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/PlatformType.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/PlatformType.java new file mode 100644 index 00000000000..40049e05f52 --- /dev/null +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/PlatformType.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.announcementsservice.model; + +/** + * Platform type this announcement is related to + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 0.0.1") +public enum PlatformType { + Iaas("IAAS"), + Saas("SAAS"), + Paas("PAAS"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PlatformType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PlatformType v : PlatformType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + PlatformType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PlatformType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'PlatformType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/Service.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/Service.java new file mode 100644 index 00000000000..b8b2bb59d62 --- /dev/null +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/Service.java @@ -0,0 +1,264 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.announcementsservice.model; + +/** + * Summary of the service object. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 0.0.1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Service.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Service extends BaseService { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("serviceName") + private String serviceName; + + public Builder serviceName(String serviceName) { + this.serviceName = serviceName; + this.__explicitlySet__.add("serviceName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("shortName") + private String shortName; + + public Builder shortName(String shortName) { + this.shortName = shortName; + this.__explicitlySet__.add("shortName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("teamName") + private String teamName; + + public Builder teamName(String teamName) { + this.teamName = teamName; + this.__explicitlySet__.add("teamName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("platformType") + private PlatformType platformType; + + public Builder platformType(PlatformType platformType) { + this.platformType = platformType; + this.__explicitlySet__.add("platformType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("commsManagerName") + private CommsManagerName commsManagerName; + + public Builder commsManagerName(CommsManagerName commsManagerName) { + this.commsManagerName = commsManagerName; + this.__explicitlySet__.add("commsManagerName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("excludedRealms") + private java.util.List excludedRealms; + + public Builder excludedRealms(java.util.List excludedRealms) { + this.excludedRealms = excludedRealms; + this.__explicitlySet__.add("excludedRealms"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("previousServiceNames") + private java.util.List previousServiceNames; + + public Builder previousServiceNames(java.util.List previousServiceNames) { + this.previousServiceNames = previousServiceNames; + this.__explicitlySet__.add("previousServiceNames"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Service build() { + Service model = + new Service( + this.id, + this.serviceName, + this.shortName, + this.teamName, + this.platformType, + this.commsManagerName, + this.excludedRealms, + this.previousServiceNames, + this.timeCreated, + this.timeUpdated, + this.lifecycleState); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Service model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("serviceName")) { + this.serviceName(model.getServiceName()); + } + if (model.wasPropertyExplicitlySet("shortName")) { + this.shortName(model.getShortName()); + } + if (model.wasPropertyExplicitlySet("teamName")) { + this.teamName(model.getTeamName()); + } + if (model.wasPropertyExplicitlySet("platformType")) { + this.platformType(model.getPlatformType()); + } + if (model.wasPropertyExplicitlySet("commsManagerName")) { + this.commsManagerName(model.getCommsManagerName()); + } + if (model.wasPropertyExplicitlySet("excludedRealms")) { + this.excludedRealms(model.getExcludedRealms()); + } + if (model.wasPropertyExplicitlySet("previousServiceNames")) { + this.previousServiceNames(model.getPreviousServiceNames()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public Service( + String id, + String serviceName, + String shortName, + String teamName, + PlatformType platformType, + CommsManagerName commsManagerName, + java.util.List excludedRealms, + java.util.List previousServiceNames, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState) { + super( + id, + serviceName, + shortName, + teamName, + platformType, + commsManagerName, + excludedRealms, + previousServiceNames, + timeCreated, + timeUpdated, + lifecycleState); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Service("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Service)) { + return false; + } + + Service other = (Service) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/ServiceSummary.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/ServiceSummary.java new file mode 100644 index 00000000000..ab9b3502eb8 --- /dev/null +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/ServiceSummary.java @@ -0,0 +1,264 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.announcementsservice.model; + +/** + * Summary of the service object. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 0.0.1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ServiceSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ServiceSummary extends BaseService { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("serviceName") + private String serviceName; + + public Builder serviceName(String serviceName) { + this.serviceName = serviceName; + this.__explicitlySet__.add("serviceName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("shortName") + private String shortName; + + public Builder shortName(String shortName) { + this.shortName = shortName; + this.__explicitlySet__.add("shortName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("teamName") + private String teamName; + + public Builder teamName(String teamName) { + this.teamName = teamName; + this.__explicitlySet__.add("teamName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("platformType") + private PlatformType platformType; + + public Builder platformType(PlatformType platformType) { + this.platformType = platformType; + this.__explicitlySet__.add("platformType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("commsManagerName") + private CommsManagerName commsManagerName; + + public Builder commsManagerName(CommsManagerName commsManagerName) { + this.commsManagerName = commsManagerName; + this.__explicitlySet__.add("commsManagerName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("excludedRealms") + private java.util.List excludedRealms; + + public Builder excludedRealms(java.util.List excludedRealms) { + this.excludedRealms = excludedRealms; + this.__explicitlySet__.add("excludedRealms"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("previousServiceNames") + private java.util.List previousServiceNames; + + public Builder previousServiceNames(java.util.List previousServiceNames) { + this.previousServiceNames = previousServiceNames; + this.__explicitlySet__.add("previousServiceNames"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ServiceSummary build() { + ServiceSummary model = + new ServiceSummary( + this.id, + this.serviceName, + this.shortName, + this.teamName, + this.platformType, + this.commsManagerName, + this.excludedRealms, + this.previousServiceNames, + this.timeCreated, + this.timeUpdated, + this.lifecycleState); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ServiceSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("serviceName")) { + this.serviceName(model.getServiceName()); + } + if (model.wasPropertyExplicitlySet("shortName")) { + this.shortName(model.getShortName()); + } + if (model.wasPropertyExplicitlySet("teamName")) { + this.teamName(model.getTeamName()); + } + if (model.wasPropertyExplicitlySet("platformType")) { + this.platformType(model.getPlatformType()); + } + if (model.wasPropertyExplicitlySet("commsManagerName")) { + this.commsManagerName(model.getCommsManagerName()); + } + if (model.wasPropertyExplicitlySet("excludedRealms")) { + this.excludedRealms(model.getExcludedRealms()); + } + if (model.wasPropertyExplicitlySet("previousServiceNames")) { + this.previousServiceNames(model.getPreviousServiceNames()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ServiceSummary( + String id, + String serviceName, + String shortName, + String teamName, + PlatformType platformType, + CommsManagerName commsManagerName, + java.util.List excludedRealms, + java.util.List previousServiceNames, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState) { + super( + id, + serviceName, + shortName, + teamName, + platformType, + commsManagerName, + excludedRealms, + previousServiceNames, + timeCreated, + timeUpdated, + lifecycleState); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ServiceSummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ServiceSummary)) { + return false; + } + + ServiceSummary other = (ServiceSummary) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/ServicesCollection.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/ServicesCollection.java new file mode 100644 index 00000000000..277fe3fb241 --- /dev/null +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/model/ServicesCollection.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.announcementsservice.model; + +/** + * Collection of all services. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 0.0.1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ServicesCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ServicesCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ServicesCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of all services. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of all services. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ServicesCollection build() { + ServicesCollection model = new ServicesCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ServicesCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of all services. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of all services. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ServicesCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ServicesCollection)) { + return false; + } + + ServicesCollection other = (ServicesCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/requests/GetAnnouncementCompartmentRequest.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/requests/GetAnnouncementCompartmentRequest.java new file mode 100644 index 00000000000..a25cfb60933 --- /dev/null +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/requests/GetAnnouncementCompartmentRequest.java @@ -0,0 +1,204 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.announcementsservice.requests; + +import com.oracle.bmc.announcementsservice.model.*; +/** + * Example: Click here to see how to use GetAnnouncementCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 0.0.1") +public class GetAnnouncementCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the announcement. + */ + private String announcementId; + + /** + * The OCID of the announcement. + */ + public String getAnnouncementId() { + return announcementId; + } + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the complete request ID. + * + */ + private String opcRequestId; + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the complete request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetAnnouncementCompartmentRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the announcement. + */ + private String announcementId = null; + + /** + * The OCID of the announcement. + * @param announcementId the value to set + * @return this builder instance + */ + public Builder announcementId(String announcementId) { + this.announcementId = announcementId; + return this; + } + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the complete request ID. + * + */ + private String opcRequestId = null; + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the complete request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAnnouncementCompartmentRequest o) { + announcementId(o.getAnnouncementId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetAnnouncementCompartmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetAnnouncementCompartmentRequest + */ + public GetAnnouncementCompartmentRequest build() { + GetAnnouncementCompartmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetAnnouncementCompartmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetAnnouncementCompartmentRequest + */ + public GetAnnouncementCompartmentRequest buildWithoutInvocationCallback() { + GetAnnouncementCompartmentRequest request = new GetAnnouncementCompartmentRequest(); + request.announcementId = announcementId; + request.opcRequestId = opcRequestId; + return request; + // new GetAnnouncementCompartmentRequest(announcementId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().announcementId(announcementId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",announcementId=").append(String.valueOf(this.announcementId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetAnnouncementCompartmentRequest)) { + return false; + } + + GetAnnouncementCompartmentRequest other = (GetAnnouncementCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.announcementId, other.announcementId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.announcementId == null ? 43 : this.announcementId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/requests/ListAnnouncementsRequest.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/requests/ListAnnouncementsRequest.java index 364f5eade42..19bf5797cce 100644 --- a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/requests/ListAnnouncementsRequest.java +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/requests/ListAnnouncementsRequest.java @@ -274,6 +274,7 @@ public String getService() { public enum PlatformType { Iaas("IAAS"), Saas("SAAS"), + Paas("PAAS"), ; private final String value; diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/requests/ListServicesRequest.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/requests/ListServicesRequest.java new file mode 100644 index 00000000000..13a8e3dbdb2 --- /dev/null +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/requests/ListServicesRequest.java @@ -0,0 +1,476 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.announcementsservice.requests; + +import com.oracle.bmc.announcementsservice.model.*; +/** + * Example: Click here to see how to use ListServicesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 0.0.1") +public class ListServicesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the compartment. + * + */ + private String compartmentId; + + /** + * The OCID of the compartment. + * + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only announcements affecting a specific platform. + */ + private PlatformType platformType; + + /** + * A filter to return only announcements affecting a specific platform. + **/ + public enum PlatformType { + Iaas("IAAS"), + Saas("SAAS"), + Paas("PAAS"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PlatformType v : PlatformType.values()) { + map.put(v.getValue(), v); + } + } + + PlatformType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PlatformType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid PlatformType: " + key); + } + }; + + /** + * A filter to return only announcements affecting a specific platform. + */ + public PlatformType getPlatformType() { + return platformType; + } + /** + * Filter by comms manager name + */ + private com.oracle.bmc.announcementsservice.model.CommsManagerName commsManagerName; + + /** + * Filter by comms manager name + */ + public com.oracle.bmc.announcementsservice.model.CommsManagerName getCommsManagerName() { + return commsManagerName; + } + /** + * The maximum number of items to return in a paginated "List" call. + */ + private Integer limit; + + /** + * The maximum number of items to return in a paginated "List" call. + */ + public Integer getLimit() { + return limit; + } + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + */ + private String page; + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + */ + public String getPage() { + return page; + } + /** + * Sort by service name parameter + */ + private SortBy sortBy; + + /** + * Sort by service name parameter + **/ + public enum SortBy { + ServiceName("serviceName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * Sort by service name parameter + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, whether ascending ('ASC') or descending ('DESC'). + */ + private com.oracle.bmc.announcementsservice.model.SortOrder sortOrder; + + /** + * The sort order to use, whether ascending ('ASC') or descending ('DESC'). + */ + public com.oracle.bmc.announcementsservice.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the complete request ID. + * + */ + private String opcRequestId; + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the complete request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListServicesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the compartment. + * + */ + private String compartmentId = null; + + /** + * The OCID of the compartment. + * + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only announcements affecting a specific platform. + */ + private PlatformType platformType = null; + + /** + * A filter to return only announcements affecting a specific platform. + * @param platformType the value to set + * @return this builder instance + */ + public Builder platformType(PlatformType platformType) { + this.platformType = platformType; + return this; + } + + /** + * Filter by comms manager name + */ + private com.oracle.bmc.announcementsservice.model.CommsManagerName commsManagerName = null; + + /** + * Filter by comms manager name + * @param commsManagerName the value to set + * @return this builder instance + */ + public Builder commsManagerName( + com.oracle.bmc.announcementsservice.model.CommsManagerName commsManagerName) { + this.commsManagerName = commsManagerName; + return this; + } + + /** + * The maximum number of items to return in a paginated "List" call. + */ + private Integer limit = null; + + /** + * The maximum number of items to return in a paginated "List" call. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + */ + private String page = null; + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Sort by service name parameter + */ + private SortBy sortBy = null; + + /** + * Sort by service name parameter + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, whether ascending ('ASC') or descending ('DESC'). + */ + private com.oracle.bmc.announcementsservice.model.SortOrder sortOrder = null; + + /** + * The sort order to use, whether ascending ('ASC') or descending ('DESC'). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.announcementsservice.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the complete request ID. + * + */ + private String opcRequestId = null; + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the complete request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListServicesRequest o) { + compartmentId(o.getCompartmentId()); + platformType(o.getPlatformType()); + commsManagerName(o.getCommsManagerName()); + limit(o.getLimit()); + page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListServicesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListServicesRequest + */ + public ListServicesRequest build() { + ListServicesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListServicesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListServicesRequest + */ + public ListServicesRequest buildWithoutInvocationCallback() { + ListServicesRequest request = new ListServicesRequest(); + request.compartmentId = compartmentId; + request.platformType = platformType; + request.commsManagerName = commsManagerName; + request.limit = limit; + request.page = page; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.opcRequestId = opcRequestId; + return request; + // new ListServicesRequest(compartmentId, platformType, commsManagerName, limit, page, sortBy, sortOrder, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .platformType(platformType) + .commsManagerName(commsManagerName) + .limit(limit) + .page(page) + .sortBy(sortBy) + .sortOrder(sortOrder) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",platformType=").append(String.valueOf(this.platformType)); + sb.append(",commsManagerName=").append(String.valueOf(this.commsManagerName)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListServicesRequest)) { + return false; + } + + ListServicesRequest other = (ListServicesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.platformType, other.platformType) + && java.util.Objects.equals(this.commsManagerName, other.commsManagerName) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.platformType == null ? 43 : this.platformType.hashCode()); + result = + (result * PRIME) + + (this.commsManagerName == null ? 43 : this.commsManagerName.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/responses/GetAnnouncementCompartmentResponse.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/responses/GetAnnouncementCompartmentResponse.java new file mode 100644 index 00000000000..b04aaf610c4 --- /dev/null +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/responses/GetAnnouncementCompartmentResponse.java @@ -0,0 +1,221 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.announcementsservice.responses; + +import com.oracle.bmc.announcementsservice.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 0.0.1") +public class GetAnnouncementCompartmentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned AnnouncementCompartment instance. + */ + private com.oracle.bmc.announcementsservice.model.AnnouncementCompartment + announcementCompartment; + + /** + * The returned AnnouncementCompartment instance. + * @return the value + */ + public com.oracle.bmc.announcementsservice.model.AnnouncementCompartment + getAnnouncementCompartment() { + return announcementCompartment; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "announcementCompartment" + }) + private GetAnnouncementCompartmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.announcementsservice.model.AnnouncementCompartment + announcementCompartment) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.announcementCompartment = announcementCompartment; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned AnnouncementCompartment instance. + */ + private com.oracle.bmc.announcementsservice.model.AnnouncementCompartment + announcementCompartment; + + /** + * The returned AnnouncementCompartment instance. + * @param announcementCompartment the value to set + * @return this builder + */ + public Builder announcementCompartment( + com.oracle.bmc.announcementsservice.model.AnnouncementCompartment + announcementCompartment) { + this.announcementCompartment = announcementCompartment; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAnnouncementCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + announcementCompartment(o.getAnnouncementCompartment()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetAnnouncementCompartmentResponse build() { + return new GetAnnouncementCompartmentResponse( + __httpStatusCode__, headers, opcRequestId, etag, announcementCompartment); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",announcementCompartment=").append(String.valueOf(announcementCompartment)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetAnnouncementCompartmentResponse)) { + return false; + } + + GetAnnouncementCompartmentResponse other = (GetAnnouncementCompartmentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals( + this.announcementCompartment, other.announcementCompartment); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.announcementCompartment == null + ? 43 + : this.announcementCompartment.hashCode()); + return result; + } +} diff --git a/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/responses/ListServicesResponse.java b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/responses/ListServicesResponse.java new file mode 100644 index 00000000000..9c924f7f5c8 --- /dev/null +++ b/bmc-announcementsservice/src/main/java/com/oracle/bmc/announcementsservice/responses/ListServicesResponse.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.announcementsservice.responses; + +import com.oracle.bmc.announcementsservice.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 0.0.1") +public class ListServicesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ServicesCollection instance. + */ + private com.oracle.bmc.announcementsservice.model.ServicesCollection servicesCollection; + + /** + * The returned ServicesCollection instance. + * @return the value + */ + public com.oracle.bmc.announcementsservice.model.ServicesCollection getServicesCollection() { + return servicesCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "servicesCollection" + }) + private ListServicesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.announcementsservice.model.ServicesCollection servicesCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.servicesCollection = servicesCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ServicesCollection instance. + */ + private com.oracle.bmc.announcementsservice.model.ServicesCollection servicesCollection; + + /** + * The returned ServicesCollection instance. + * @param servicesCollection the value to set + * @return this builder + */ + public Builder servicesCollection( + com.oracle.bmc.announcementsservice.model.ServicesCollection servicesCollection) { + this.servicesCollection = servicesCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListServicesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + servicesCollection(o.getServicesCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListServicesResponse build() { + return new ListServicesResponse( + __httpStatusCode__, headers, opcNextPage, opcRequestId, servicesCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",servicesCollection=").append(String.valueOf(servicesCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListServicesResponse)) { + return false; + } + + ListServicesResponse other = (ListServicesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.servicesCollection, other.servicesCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.servicesCollection == null + ? 43 + : this.servicesCollection.hashCode()); + return result; + } +} diff --git a/bmc-apigateway/pom.xml b/bmc-apigateway/pom.xml index 751e7e53ad3..35c0ad21b09 100644 --- a/bmc-apigateway/pom.xml +++ b/bmc-apigateway/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-apigateway @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-apmconfig/pom.xml b/bmc-apmconfig/pom.xml index 6e3d8f8edf6..4730864a088 100644 --- a/bmc-apmconfig/pom.xml +++ b/bmc-apmconfig/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-apmconfig @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-apmcontrolplane/pom.xml b/bmc-apmcontrolplane/pom.xml index 88988ade13a..f1daeb91f31 100644 --- a/bmc-apmcontrolplane/pom.xml +++ b/bmc-apmcontrolplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-apmcontrolplane @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-apmsynthetics/pom.xml b/bmc-apmsynthetics/pom.xml index cb59bd71e5f..1c86c748a23 100644 --- a/bmc-apmsynthetics/pom.xml +++ b/bmc-apmsynthetics/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-apmsynthetics @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/BasicAuthenticationDetails.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/BasicAuthenticationDetails.java new file mode 100644 index 00000000000..c34f5a1c9cf --- /dev/null +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/BasicAuthenticationDetails.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.apmsynthetics.model; + +/** + * Details for basic authentication. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = BasicAuthenticationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class BasicAuthenticationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"username", "password"}) + public BasicAuthenticationDetails(String username, Password password) { + super(); + this.username = username; + this.password = password; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Username for authentication. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("username") + private String username; + + /** + * Username for authentication. + * @param username the value to set + * @return this builder + **/ + public Builder username(String username) { + this.username = username; + this.__explicitlySet__.add("username"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("password") + private Password password; + + public Builder password(Password password) { + this.password = password; + this.__explicitlySet__.add("password"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BasicAuthenticationDetails build() { + BasicAuthenticationDetails model = + new BasicAuthenticationDetails(this.username, this.password); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BasicAuthenticationDetails model) { + if (model.wasPropertyExplicitlySet("username")) { + this.username(model.getUsername()); + } + if (model.wasPropertyExplicitlySet("password")) { + this.password(model.getPassword()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Username for authentication. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("username") + private final String username; + + /** + * Username for authentication. + * @return the value + **/ + public String getUsername() { + return username; + } + + @com.fasterxml.jackson.annotation.JsonProperty("password") + private final Password password; + + public Password getPassword() { + return password; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BasicAuthenticationDetails("); + sb.append("super=").append(super.toString()); + sb.append("username=").append(String.valueOf(this.username)); + sb.append(", password=").append(String.valueOf(this.password)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BasicAuthenticationDetails)) { + return false; + } + + BasicAuthenticationDetails other = (BasicAuthenticationDetails) o; + return java.util.Objects.equals(this.username, other.username) + && java.util.Objects.equals(this.password, other.password) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); + result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/CreateMonitorDetails.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/CreateMonitorDetails.java index e3d8f4da562..2e6169b43e8 100644 --- a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/CreateMonitorDetails.java +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/CreateMonitorDetails.java @@ -39,7 +39,8 @@ public final class CreateMonitorDetails extends com.oracle.bmc.http.internal.Exp "definedTags", "isRunNow", "schedulingPolicy", - "batchIntervalInSeconds" + "batchIntervalInSeconds", + "isIPv6" }) public CreateMonitorDetails( String displayName, @@ -59,7 +60,8 @@ public CreateMonitorDetails( java.util.Map> definedTags, Boolean isRunNow, SchedulingPolicy schedulingPolicy, - Integer batchIntervalInSeconds) { + Integer batchIntervalInSeconds, + Boolean isIPv6) { super(); this.displayName = displayName; this.monitorType = monitorType; @@ -79,6 +81,7 @@ public CreateMonitorDetails( this.isRunNow = isRunNow; this.schedulingPolicy = schedulingPolicy; this.batchIntervalInSeconds = batchIntervalInSeconds; + this.isIPv6 = isIPv6; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -233,10 +236,10 @@ public Builder timeoutInSeconds(Integer timeoutInSeconds) { } /** * Specify the endpoint on which to run the monitor. - * For BROWSER, REST and NETWORK monitor types, target is mandatory. + * For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. * If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. * If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. - * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 + * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. * **/ @com.fasterxml.jackson.annotation.JsonProperty("target") @@ -244,10 +247,10 @@ public Builder timeoutInSeconds(Integer timeoutInSeconds) { /** * Specify the endpoint on which to run the monitor. - * For BROWSER, REST and NETWORK monitor types, target is mandatory. + * For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. * If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. * If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. - * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 + * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. * * @param target the value to set * @return this builder @@ -397,6 +400,22 @@ public Builder batchIntervalInSeconds(Integer batchIntervalInSeconds) { this.__explicitlySet__.add("batchIntervalInSeconds"); return this; } + /** + * If enabled, domain name will resolve to an IPv6 address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isIPv6") + private Boolean isIPv6; + + /** + * If enabled, domain name will resolve to an IPv6 address. + * @param isIPv6 the value to set + * @return this builder + **/ + public Builder isIPv6(Boolean isIPv6) { + this.isIPv6 = isIPv6; + this.__explicitlySet__.add("isIPv6"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -421,7 +440,8 @@ public CreateMonitorDetails build() { this.definedTags, this.isRunNow, this.schedulingPolicy, - this.batchIntervalInSeconds); + this.batchIntervalInSeconds, + this.isIPv6); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -484,6 +504,9 @@ public Builder copy(CreateMonitorDetails model) { if (model.wasPropertyExplicitlySet("batchIntervalInSeconds")) { this.batchIntervalInSeconds(model.getBatchIntervalInSeconds()); } + if (model.wasPropertyExplicitlySet("isIPv6")) { + this.isIPv6(model.getIsIPv6()); + } return this; } } @@ -633,10 +656,10 @@ public Integer getTimeoutInSeconds() { /** * Specify the endpoint on which to run the monitor. - * For BROWSER, REST and NETWORK monitor types, target is mandatory. + * For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. * If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. * If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. - * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 + * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. * **/ @com.fasterxml.jackson.annotation.JsonProperty("target") @@ -644,10 +667,10 @@ public Integer getTimeoutInSeconds() { /** * Specify the endpoint on which to run the monitor. - * For BROWSER, REST and NETWORK monitor types, target is mandatory. + * For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. * If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. * If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. - * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 + * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. * * @return the value **/ @@ -774,6 +797,20 @@ public Integer getBatchIntervalInSeconds() { return batchIntervalInSeconds; } + /** + * If enabled, domain name will resolve to an IPv6 address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isIPv6") + private final Boolean isIPv6; + + /** + * If enabled, domain name will resolve to an IPv6 address. + * @return the value + **/ + public Boolean getIsIPv6() { + return isIPv6; + } + @Override public String toString() { return this.toString(true); @@ -809,6 +846,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isRunNow=").append(String.valueOf(this.isRunNow)); sb.append(", schedulingPolicy=").append(String.valueOf(this.schedulingPolicy)); sb.append(", batchIntervalInSeconds=").append(String.valueOf(this.batchIntervalInSeconds)); + sb.append(", isIPv6=").append(String.valueOf(this.isIPv6)); sb.append(")"); return sb.toString(); } @@ -845,6 +883,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.schedulingPolicy, other.schedulingPolicy) && java.util.Objects.equals( this.batchIntervalInSeconds, other.batchIntervalInSeconds) + && java.util.Objects.equals(this.isIPv6, other.isIPv6) && super.equals(other); } @@ -896,6 +935,7 @@ public int hashCode() { + (this.batchIntervalInSeconds == null ? 43 : this.batchIntervalInSeconds.hashCode()); + result = (result * PRIME) + (this.isIPv6 == null ? 43 : this.isIPv6.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/DatabaseConnectionType.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/DatabaseConnectionType.java new file mode 100644 index 00000000000..f0963262c6b --- /dev/null +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/DatabaseConnectionType.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.apmsynthetics.model; + +/** + * Type of database connection. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +public enum DatabaseConnectionType { + CloudWallet("CLOUD_WALLET"), + CustomJdbc("CUSTOM_JDBC"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DatabaseConnectionType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DatabaseConnectionType v : DatabaseConnectionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DatabaseConnectionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DatabaseConnectionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DatabaseConnectionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/DatabaseType.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/DatabaseType.java new file mode 100644 index 00000000000..4941fdc3523 --- /dev/null +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/DatabaseType.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.apmsynthetics.model; + +/** + * Type of database. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +public enum DatabaseType { + Oracle("ORACLE"), + Mysql("MYSQL"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DatabaseType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DatabaseType v : DatabaseType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DatabaseType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DatabaseType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DatabaseType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/DatabaseWalletDetails.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/DatabaseWalletDetails.java new file mode 100644 index 00000000000..b12da24b75a --- /dev/null +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/DatabaseWalletDetails.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.apmsynthetics.model; + +/** + * Details for database wallet. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DatabaseWalletDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DatabaseWalletDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"databaseWallet", "serviceName"}) + public DatabaseWalletDetails(String databaseWallet, String serviceName) { + super(); + this.databaseWallet = databaseWallet; + this.serviceName = serviceName; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The database wallet configuration zip file. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseWallet") + private String databaseWallet; + + /** + * The database wallet configuration zip file. + * @param databaseWallet the value to set + * @return this builder + **/ + public Builder databaseWallet(String databaseWallet) { + this.databaseWallet = databaseWallet; + this.__explicitlySet__.add("databaseWallet"); + return this; + } + /** + * Service name of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceName") + private String serviceName; + + /** + * Service name of the database. + * @param serviceName the value to set + * @return this builder + **/ + public Builder serviceName(String serviceName) { + this.serviceName = serviceName; + this.__explicitlySet__.add("serviceName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DatabaseWalletDetails build() { + DatabaseWalletDetails model = + new DatabaseWalletDetails(this.databaseWallet, this.serviceName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DatabaseWalletDetails model) { + if (model.wasPropertyExplicitlySet("databaseWallet")) { + this.databaseWallet(model.getDatabaseWallet()); + } + if (model.wasPropertyExplicitlySet("serviceName")) { + this.serviceName(model.getServiceName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The database wallet configuration zip file. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseWallet") + private final String databaseWallet; + + /** + * The database wallet configuration zip file. + * @return the value + **/ + public String getDatabaseWallet() { + return databaseWallet; + } + + /** + * Service name of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceName") + private final String serviceName; + + /** + * Service name of the database. + * @return the value + **/ + public String getServiceName() { + return serviceName; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DatabaseWalletDetails("); + sb.append("super=").append(super.toString()); + sb.append("databaseWallet=").append(String.valueOf(this.databaseWallet)); + sb.append(", serviceName=").append(String.valueOf(this.serviceName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DatabaseWalletDetails)) { + return false; + } + + DatabaseWalletDetails other = (DatabaseWalletDetails) o; + return java.util.Objects.equals(this.databaseWallet, other.databaseWallet) + && java.util.Objects.equals(this.serviceName, other.serviceName) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.databaseWallet == null ? 43 : this.databaseWallet.hashCode()); + result = (result * PRIME) + (this.serviceName == null ? 43 : this.serviceName.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/FtpMonitorConfiguration.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/FtpMonitorConfiguration.java new file mode 100644 index 00000000000..a62c237373b --- /dev/null +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/FtpMonitorConfiguration.java @@ -0,0 +1,491 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.apmsynthetics.model; + +/** + * Request configuration details for the FTP monitor type. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = FtpMonitorConfiguration.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "configType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FtpMonitorConfiguration extends MonitorConfiguration { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("isFailureRetried") + private Boolean isFailureRetried; + + public Builder isFailureRetried(Boolean isFailureRetried) { + this.isFailureRetried = isFailureRetried; + this.__explicitlySet__.add("isFailureRetried"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dnsConfiguration") + private DnsConfiguration dnsConfiguration; + + public Builder dnsConfiguration(DnsConfiguration dnsConfiguration) { + this.dnsConfiguration = dnsConfiguration; + this.__explicitlySet__.add("dnsConfiguration"); + return this; + } + /** + * FTP protocol type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ftpProtocol") + private FtpProtocol ftpProtocol; + + /** + * FTP protocol type. + * @param ftpProtocol the value to set + * @return this builder + **/ + public Builder ftpProtocol(FtpProtocol ftpProtocol) { + this.ftpProtocol = ftpProtocol; + this.__explicitlySet__.add("ftpProtocol"); + return this; + } + /** + * FTP monitor request type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ftpRequestType") + private FtpRequestType ftpRequestType; + + /** + * FTP monitor request type. + * @param ftpRequestType the value to set + * @return this builder + **/ + public Builder ftpRequestType(FtpRequestType ftpRequestType) { + this.ftpRequestType = ftpRequestType; + this.__explicitlySet__.add("ftpRequestType"); + return this; + } + /** + * If enabled, Active mode will be used for the FTP connection. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isActiveMode") + private Boolean isActiveMode; + + /** + * If enabled, Active mode will be used for the FTP connection. + * @param isActiveMode the value to set + * @return this builder + **/ + public Builder isActiveMode(Boolean isActiveMode) { + this.isActiveMode = isActiveMode; + this.__explicitlySet__.add("isActiveMode"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("ftpBasicAuthenticationDetails") + private BasicAuthenticationDetails ftpBasicAuthenticationDetails; + + public Builder ftpBasicAuthenticationDetails( + BasicAuthenticationDetails ftpBasicAuthenticationDetails) { + this.ftpBasicAuthenticationDetails = ftpBasicAuthenticationDetails; + this.__explicitlySet__.add("ftpBasicAuthenticationDetails"); + return this; + } + /** + * Download size limit in Bytes, at which to stop the transfer. Maximum download size limit is 5 MiB. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("downloadSizeLimitInBytes") + private Integer downloadSizeLimitInBytes; + + /** + * Download size limit in Bytes, at which to stop the transfer. Maximum download size limit is 5 MiB. + * @param downloadSizeLimitInBytes the value to set + * @return this builder + **/ + public Builder downloadSizeLimitInBytes(Integer downloadSizeLimitInBytes) { + this.downloadSizeLimitInBytes = downloadSizeLimitInBytes; + this.__explicitlySet__.add("downloadSizeLimitInBytes"); + return this; + } + /** + * File upload size in Bytes, at which to stop the transfer. Maximum upload size is 5 MiB. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("uploadFileSizeInBytes") + private Integer uploadFileSizeInBytes; + + /** + * File upload size in Bytes, at which to stop the transfer. Maximum upload size is 5 MiB. + * @param uploadFileSizeInBytes the value to set + * @return this builder + **/ + public Builder uploadFileSizeInBytes(Integer uploadFileSizeInBytes) { + this.uploadFileSizeInBytes = uploadFileSizeInBytes; + this.__explicitlySet__.add("uploadFileSizeInBytes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("networkConfiguration") + private NetworkConfiguration networkConfiguration; + + public Builder networkConfiguration(NetworkConfiguration networkConfiguration) { + this.networkConfiguration = networkConfiguration; + this.__explicitlySet__.add("networkConfiguration"); + return this; + } + /** + * Expected FTP response codes. For status code range, set values such as 2xx, 3xx. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("verifyResponseCodes") + private java.util.List verifyResponseCodes; + + /** + * Expected FTP response codes. For status code range, set values such as 2xx, 3xx. + * @param verifyResponseCodes the value to set + * @return this builder + **/ + public Builder verifyResponseCodes(java.util.List verifyResponseCodes) { + this.verifyResponseCodes = verifyResponseCodes; + this.__explicitlySet__.add("verifyResponseCodes"); + return this; + } + /** + * Verify response content against regular expression based string. + * If response content does not match the verifyResponseContent value, then it will be considered a failure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("verifyResponseContent") + private String verifyResponseContent; + + /** + * Verify response content against regular expression based string. + * If response content does not match the verifyResponseContent value, then it will be considered a failure. + * + * @param verifyResponseContent the value to set + * @return this builder + **/ + public Builder verifyResponseContent(String verifyResponseContent) { + this.verifyResponseContent = verifyResponseContent; + this.__explicitlySet__.add("verifyResponseContent"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FtpMonitorConfiguration build() { + FtpMonitorConfiguration model = + new FtpMonitorConfiguration( + this.isFailureRetried, + this.dnsConfiguration, + this.ftpProtocol, + this.ftpRequestType, + this.isActiveMode, + this.ftpBasicAuthenticationDetails, + this.downloadSizeLimitInBytes, + this.uploadFileSizeInBytes, + this.networkConfiguration, + this.verifyResponseCodes, + this.verifyResponseContent); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FtpMonitorConfiguration model) { + if (model.wasPropertyExplicitlySet("isFailureRetried")) { + this.isFailureRetried(model.getIsFailureRetried()); + } + if (model.wasPropertyExplicitlySet("dnsConfiguration")) { + this.dnsConfiguration(model.getDnsConfiguration()); + } + if (model.wasPropertyExplicitlySet("ftpProtocol")) { + this.ftpProtocol(model.getFtpProtocol()); + } + if (model.wasPropertyExplicitlySet("ftpRequestType")) { + this.ftpRequestType(model.getFtpRequestType()); + } + if (model.wasPropertyExplicitlySet("isActiveMode")) { + this.isActiveMode(model.getIsActiveMode()); + } + if (model.wasPropertyExplicitlySet("ftpBasicAuthenticationDetails")) { + this.ftpBasicAuthenticationDetails(model.getFtpBasicAuthenticationDetails()); + } + if (model.wasPropertyExplicitlySet("downloadSizeLimitInBytes")) { + this.downloadSizeLimitInBytes(model.getDownloadSizeLimitInBytes()); + } + if (model.wasPropertyExplicitlySet("uploadFileSizeInBytes")) { + this.uploadFileSizeInBytes(model.getUploadFileSizeInBytes()); + } + if (model.wasPropertyExplicitlySet("networkConfiguration")) { + this.networkConfiguration(model.getNetworkConfiguration()); + } + if (model.wasPropertyExplicitlySet("verifyResponseCodes")) { + this.verifyResponseCodes(model.getVerifyResponseCodes()); + } + if (model.wasPropertyExplicitlySet("verifyResponseContent")) { + this.verifyResponseContent(model.getVerifyResponseContent()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public FtpMonitorConfiguration( + Boolean isFailureRetried, + DnsConfiguration dnsConfiguration, + FtpProtocol ftpProtocol, + FtpRequestType ftpRequestType, + Boolean isActiveMode, + BasicAuthenticationDetails ftpBasicAuthenticationDetails, + Integer downloadSizeLimitInBytes, + Integer uploadFileSizeInBytes, + NetworkConfiguration networkConfiguration, + java.util.List verifyResponseCodes, + String verifyResponseContent) { + super(isFailureRetried, dnsConfiguration); + this.ftpProtocol = ftpProtocol; + this.ftpRequestType = ftpRequestType; + this.isActiveMode = isActiveMode; + this.ftpBasicAuthenticationDetails = ftpBasicAuthenticationDetails; + this.downloadSizeLimitInBytes = downloadSizeLimitInBytes; + this.uploadFileSizeInBytes = uploadFileSizeInBytes; + this.networkConfiguration = networkConfiguration; + this.verifyResponseCodes = verifyResponseCodes; + this.verifyResponseContent = verifyResponseContent; + } + + /** + * FTP protocol type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ftpProtocol") + private final FtpProtocol ftpProtocol; + + /** + * FTP protocol type. + * @return the value + **/ + public FtpProtocol getFtpProtocol() { + return ftpProtocol; + } + + /** + * FTP monitor request type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ftpRequestType") + private final FtpRequestType ftpRequestType; + + /** + * FTP monitor request type. + * @return the value + **/ + public FtpRequestType getFtpRequestType() { + return ftpRequestType; + } + + /** + * If enabled, Active mode will be used for the FTP connection. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isActiveMode") + private final Boolean isActiveMode; + + /** + * If enabled, Active mode will be used for the FTP connection. + * @return the value + **/ + public Boolean getIsActiveMode() { + return isActiveMode; + } + + @com.fasterxml.jackson.annotation.JsonProperty("ftpBasicAuthenticationDetails") + private final BasicAuthenticationDetails ftpBasicAuthenticationDetails; + + public BasicAuthenticationDetails getFtpBasicAuthenticationDetails() { + return ftpBasicAuthenticationDetails; + } + + /** + * Download size limit in Bytes, at which to stop the transfer. Maximum download size limit is 5 MiB. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("downloadSizeLimitInBytes") + private final Integer downloadSizeLimitInBytes; + + /** + * Download size limit in Bytes, at which to stop the transfer. Maximum download size limit is 5 MiB. + * @return the value + **/ + public Integer getDownloadSizeLimitInBytes() { + return downloadSizeLimitInBytes; + } + + /** + * File upload size in Bytes, at which to stop the transfer. Maximum upload size is 5 MiB. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("uploadFileSizeInBytes") + private final Integer uploadFileSizeInBytes; + + /** + * File upload size in Bytes, at which to stop the transfer. Maximum upload size is 5 MiB. + * @return the value + **/ + public Integer getUploadFileSizeInBytes() { + return uploadFileSizeInBytes; + } + + @com.fasterxml.jackson.annotation.JsonProperty("networkConfiguration") + private final NetworkConfiguration networkConfiguration; + + public NetworkConfiguration getNetworkConfiguration() { + return networkConfiguration; + } + + /** + * Expected FTP response codes. For status code range, set values such as 2xx, 3xx. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("verifyResponseCodes") + private final java.util.List verifyResponseCodes; + + /** + * Expected FTP response codes. For status code range, set values such as 2xx, 3xx. + * @return the value + **/ + public java.util.List getVerifyResponseCodes() { + return verifyResponseCodes; + } + + /** + * Verify response content against regular expression based string. + * If response content does not match the verifyResponseContent value, then it will be considered a failure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("verifyResponseContent") + private final String verifyResponseContent; + + /** + * Verify response content against regular expression based string. + * If response content does not match the verifyResponseContent value, then it will be considered a failure. + * + * @return the value + **/ + public String getVerifyResponseContent() { + return verifyResponseContent; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("FtpMonitorConfiguration("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", ftpProtocol=").append(String.valueOf(this.ftpProtocol)); + sb.append(", ftpRequestType=").append(String.valueOf(this.ftpRequestType)); + sb.append(", isActiveMode=").append(String.valueOf(this.isActiveMode)); + sb.append(", ftpBasicAuthenticationDetails=") + .append(String.valueOf(this.ftpBasicAuthenticationDetails)); + sb.append(", downloadSizeLimitInBytes=") + .append(String.valueOf(this.downloadSizeLimitInBytes)); + sb.append(", uploadFileSizeInBytes=").append(String.valueOf(this.uploadFileSizeInBytes)); + sb.append(", networkConfiguration=").append(String.valueOf(this.networkConfiguration)); + sb.append(", verifyResponseCodes=").append(String.valueOf(this.verifyResponseCodes)); + sb.append(", verifyResponseContent=").append(String.valueOf(this.verifyResponseContent)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FtpMonitorConfiguration)) { + return false; + } + + FtpMonitorConfiguration other = (FtpMonitorConfiguration) o; + return java.util.Objects.equals(this.ftpProtocol, other.ftpProtocol) + && java.util.Objects.equals(this.ftpRequestType, other.ftpRequestType) + && java.util.Objects.equals(this.isActiveMode, other.isActiveMode) + && java.util.Objects.equals( + this.ftpBasicAuthenticationDetails, other.ftpBasicAuthenticationDetails) + && java.util.Objects.equals( + this.downloadSizeLimitInBytes, other.downloadSizeLimitInBytes) + && java.util.Objects.equals(this.uploadFileSizeInBytes, other.uploadFileSizeInBytes) + && java.util.Objects.equals(this.networkConfiguration, other.networkConfiguration) + && java.util.Objects.equals(this.verifyResponseCodes, other.verifyResponseCodes) + && java.util.Objects.equals(this.verifyResponseContent, other.verifyResponseContent) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.ftpProtocol == null ? 43 : this.ftpProtocol.hashCode()); + result = + (result * PRIME) + + (this.ftpRequestType == null ? 43 : this.ftpRequestType.hashCode()); + result = (result * PRIME) + (this.isActiveMode == null ? 43 : this.isActiveMode.hashCode()); + result = + (result * PRIME) + + (this.ftpBasicAuthenticationDetails == null + ? 43 + : this.ftpBasicAuthenticationDetails.hashCode()); + result = + (result * PRIME) + + (this.downloadSizeLimitInBytes == null + ? 43 + : this.downloadSizeLimitInBytes.hashCode()); + result = + (result * PRIME) + + (this.uploadFileSizeInBytes == null + ? 43 + : this.uploadFileSizeInBytes.hashCode()); + result = + (result * PRIME) + + (this.networkConfiguration == null + ? 43 + : this.networkConfiguration.hashCode()); + result = + (result * PRIME) + + (this.verifyResponseCodes == null + ? 43 + : this.verifyResponseCodes.hashCode()); + result = + (result * PRIME) + + (this.verifyResponseContent == null + ? 43 + : this.verifyResponseContent.hashCode()); + return result; + } +} diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/FtpProtocol.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/FtpProtocol.java new file mode 100644 index 00000000000..b762d72ed42 --- /dev/null +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/FtpProtocol.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.apmsynthetics.model; + +/** + * Type of FTP protocol. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +public enum FtpProtocol { + Ftp("FTP"), + Ftps("FTPS"), + Sftp("SFTP"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(FtpProtocol.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (FtpProtocol v : FtpProtocol.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + FtpProtocol(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static FtpProtocol create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'FtpProtocol', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/FtpRequestType.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/FtpRequestType.java new file mode 100644 index 00000000000..054b1ff97ff --- /dev/null +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/FtpRequestType.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.apmsynthetics.model; + +/** + * Type of request for FTP monitor. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +public enum FtpRequestType { + List("LIST"), + Upload("UPLOAD"), + Download("DOWNLOAD"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(FtpRequestType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (FtpRequestType v : FtpRequestType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + FtpRequestType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static FtpRequestType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'FtpRequestType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/Monitor.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/Monitor.java index 7376f389d1a..24b21ef328a 100644 --- a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/Monitor.java +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/Monitor.java @@ -42,7 +42,10 @@ public final class Monitor extends com.oracle.bmc.http.internal.ExplicitlySetBmc "definedTags", "isRunNow", "schedulingPolicy", - "batchIntervalInSeconds" + "batchIntervalInSeconds", + "isIPv6", + "createdBy", + "lastUpdatedBy" }) public Monitor( String id, @@ -67,7 +70,10 @@ public Monitor( java.util.Map> definedTags, Boolean isRunNow, SchedulingPolicy schedulingPolicy, - Integer batchIntervalInSeconds) { + Integer batchIntervalInSeconds, + Boolean isIPv6, + String createdBy, + String lastUpdatedBy) { super(); this.id = id; this.displayName = displayName; @@ -92,6 +98,9 @@ public Monitor( this.isRunNow = isRunNow; this.schedulingPolicy = schedulingPolicy; this.batchIntervalInSeconds = batchIntervalInSeconds; + this.isIPv6 = isIPv6; + this.createdBy = createdBy; + this.lastUpdatedBy = lastUpdatedBy; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -145,13 +154,13 @@ public Builder monitorType(MonitorTypes monitorType) { return this; } /** - * List of public and dedicated vantage points where the monitor is running. + * List of public, dedicated and onPremise vantage points where the monitor is running. **/ @com.fasterxml.jackson.annotation.JsonProperty("vantagePoints") private java.util.List vantagePoints; /** - * List of public and dedicated vantage points where the monitor is running. + * List of public, dedicated and onPremise vantage points where the monitor is running. * @param vantagePoints the value to set * @return this builder **/ @@ -290,10 +299,10 @@ public Builder timeoutInSeconds(Integer timeoutInSeconds) { } /** * Specify the endpoint on which to run the monitor. - * For BROWSER, REST and NETWORK monitor types, target is mandatory. + * For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. * If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. * If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. - * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 + * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. * **/ @com.fasterxml.jackson.annotation.JsonProperty("target") @@ -301,10 +310,10 @@ public Builder timeoutInSeconds(Integer timeoutInSeconds) { /** * Specify the endpoint on which to run the monitor. - * For BROWSER, REST and NETWORK monitor types, target is mandatory. + * For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. * If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. * If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. - * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 + * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. * * @param target the value to set * @return this builder @@ -495,6 +504,54 @@ public Builder batchIntervalInSeconds(Integer batchIntervalInSeconds) { this.__explicitlySet__.add("batchIntervalInSeconds"); return this; } + /** + * If enabled, domain name will resolve to an IPv6 address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isIPv6") + private Boolean isIPv6; + + /** + * If enabled, domain name will resolve to an IPv6 address. + * @param isIPv6 the value to set + * @return this builder + **/ + public Builder isIPv6(Boolean isIPv6) { + this.isIPv6 = isIPv6; + this.__explicitlySet__.add("isIPv6"); + return this; + } + /** + * Name of the user that created the monitor. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private String createdBy; + + /** + * Name of the user that created the monitor. + * @param createdBy the value to set + * @return this builder + **/ + public Builder createdBy(String createdBy) { + this.createdBy = createdBy; + this.__explicitlySet__.add("createdBy"); + return this; + } + /** + * Name of the user that recently updated the monitor. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastUpdatedBy") + private String lastUpdatedBy; + + /** + * Name of the user that recently updated the monitor. + * @param lastUpdatedBy the value to set + * @return this builder + **/ + public Builder lastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + this.__explicitlySet__.add("lastUpdatedBy"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -524,7 +581,10 @@ public Monitor build() { this.definedTags, this.isRunNow, this.schedulingPolicy, - this.batchIntervalInSeconds); + this.batchIntervalInSeconds, + this.isIPv6, + this.createdBy, + this.lastUpdatedBy); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -602,6 +662,15 @@ public Builder copy(Monitor model) { if (model.wasPropertyExplicitlySet("batchIntervalInSeconds")) { this.batchIntervalInSeconds(model.getBatchIntervalInSeconds()); } + if (model.wasPropertyExplicitlySet("isIPv6")) { + this.isIPv6(model.getIsIPv6()); + } + if (model.wasPropertyExplicitlySet("createdBy")) { + this.createdBy(model.getCreatedBy()); + } + if (model.wasPropertyExplicitlySet("lastUpdatedBy")) { + this.lastUpdatedBy(model.getLastUpdatedBy()); + } return this; } } @@ -660,13 +729,13 @@ public MonitorTypes getMonitorType() { } /** - * List of public and dedicated vantage points where the monitor is running. + * List of public, dedicated and onPremise vantage points where the monitor is running. **/ @com.fasterxml.jackson.annotation.JsonProperty("vantagePoints") private final java.util.List vantagePoints; /** - * List of public and dedicated vantage points where the monitor is running. + * List of public, dedicated and onPremise vantage points where the monitor is running. * @return the value **/ public java.util.List getVantagePoints() { @@ -789,10 +858,10 @@ public Integer getTimeoutInSeconds() { /** * Specify the endpoint on which to run the monitor. - * For BROWSER, REST and NETWORK monitor types, target is mandatory. + * For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. * If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. * If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. - * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 + * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. * **/ @com.fasterxml.jackson.annotation.JsonProperty("target") @@ -800,10 +869,10 @@ public Integer getTimeoutInSeconds() { /** * Specify the endpoint on which to run the monitor. - * For BROWSER, REST and NETWORK monitor types, target is mandatory. + * For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. * If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. * If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. - * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 + * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. * * @return the value **/ @@ -966,6 +1035,48 @@ public Integer getBatchIntervalInSeconds() { return batchIntervalInSeconds; } + /** + * If enabled, domain name will resolve to an IPv6 address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isIPv6") + private final Boolean isIPv6; + + /** + * If enabled, domain name will resolve to an IPv6 address. + * @return the value + **/ + public Boolean getIsIPv6() { + return isIPv6; + } + + /** + * Name of the user that created the monitor. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private final String createdBy; + + /** + * Name of the user that created the monitor. + * @return the value + **/ + public String getCreatedBy() { + return createdBy; + } + + /** + * Name of the user that recently updated the monitor. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastUpdatedBy") + private final String lastUpdatedBy; + + /** + * Name of the user that recently updated the monitor. + * @return the value + **/ + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + @Override public String toString() { return this.toString(true); @@ -1006,6 +1117,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isRunNow=").append(String.valueOf(this.isRunNow)); sb.append(", schedulingPolicy=").append(String.valueOf(this.schedulingPolicy)); sb.append(", batchIntervalInSeconds=").append(String.valueOf(this.batchIntervalInSeconds)); + sb.append(", isIPv6=").append(String.valueOf(this.isIPv6)); + sb.append(", createdBy=").append(String.valueOf(this.createdBy)); + sb.append(", lastUpdatedBy=").append(String.valueOf(this.lastUpdatedBy)); sb.append(")"); return sb.toString(); } @@ -1047,6 +1161,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.schedulingPolicy, other.schedulingPolicy) && java.util.Objects.equals( this.batchIntervalInSeconds, other.batchIntervalInSeconds) + && java.util.Objects.equals(this.isIPv6, other.isIPv6) + && java.util.Objects.equals(this.createdBy, other.createdBy) + && java.util.Objects.equals(this.lastUpdatedBy, other.lastUpdatedBy) && super.equals(other); } @@ -1105,6 +1222,11 @@ public int hashCode() { + (this.batchIntervalInSeconds == null ? 43 : this.batchIntervalInSeconds.hashCode()); + result = (result * PRIME) + (this.isIPv6 == null ? 43 : this.isIPv6.hashCode()); + result = (result * PRIME) + (this.createdBy == null ? 43 : this.createdBy.hashCode()); + result = + (result * PRIME) + + (this.lastUpdatedBy == null ? 43 : this.lastUpdatedBy.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/MonitorConfiguration.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/MonitorConfiguration.java index 36fea1eb8e2..7d2efa2f915 100644 --- a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/MonitorConfiguration.java +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/MonitorConfiguration.java @@ -22,6 +22,10 @@ defaultImpl = MonitorConfiguration.class ) @com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = FtpMonitorConfiguration.class, + name = "FTP_CONFIG" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = DnsSecMonitorConfiguration.class, name = "DNSSEC_CONFIG" @@ -30,6 +34,10 @@ value = DnsTraceMonitorConfiguration.class, name = "DNS_TRACE_CONFIG" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = SqlMonitorConfiguration.class, + name = "SQL_CONFIG" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = ScriptedRestMonitorConfiguration.class, name = "SCRIPTED_REST_CONFIG" @@ -147,6 +155,8 @@ public enum ConfigType { DnsServerConfig("DNS_SERVER_CONFIG"), DnsTraceConfig("DNS_TRACE_CONFIG"), DnssecConfig("DNSSEC_CONFIG"), + FtpConfig("FTP_CONFIG"), + SqlConfig("SQL_CONFIG"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/MonitorSummary.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/MonitorSummary.java index 178928135d8..2544dcb4a1c 100644 --- a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/MonitorSummary.java +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/MonitorSummary.java @@ -40,7 +40,10 @@ public final class MonitorSummary extends com.oracle.bmc.http.internal.Explicitl "definedTags", "isRunNow", "schedulingPolicy", - "batchIntervalInSeconds" + "batchIntervalInSeconds", + "isIPv6", + "createdBy", + "lastUpdatedBy" }) public MonitorSummary( String id, @@ -63,7 +66,10 @@ public MonitorSummary( java.util.Map> definedTags, Boolean isRunNow, SchedulingPolicy schedulingPolicy, - Integer batchIntervalInSeconds) { + Integer batchIntervalInSeconds, + Boolean isIPv6, + String createdBy, + String lastUpdatedBy) { super(); this.id = id; this.displayName = displayName; @@ -86,6 +92,9 @@ public MonitorSummary( this.isRunNow = isRunNow; this.schedulingPolicy = schedulingPolicy; this.batchIntervalInSeconds = batchIntervalInSeconds; + this.isIPv6 = isIPv6; + this.createdBy = createdBy; + this.lastUpdatedBy = lastUpdatedBy; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -139,13 +148,13 @@ public Builder monitorType(MonitorTypes monitorType) { return this; } /** - * List of public and dedicated vantage points where the monitor is running. + * List of public, dedicated and onPremise vantage points where the monitor is running. **/ @com.fasterxml.jackson.annotation.JsonProperty("vantagePoints") private java.util.List vantagePoints; /** - * List of public and dedicated vantage points where the monitor is running. + * List of public, dedicated and onPremise vantage points where the monitor is running. * @param vantagePoints the value to set * @return this builder **/ @@ -284,10 +293,10 @@ public Builder timeoutInSeconds(Integer timeoutInSeconds) { } /** * Specify the endpoint on which to run the monitor. - * For BROWSER, REST and NETWORK monitor types, target is mandatory. + * For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. * If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. * If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. - * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 + * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. * **/ @com.fasterxml.jackson.annotation.JsonProperty("target") @@ -295,10 +304,10 @@ public Builder timeoutInSeconds(Integer timeoutInSeconds) { /** * Specify the endpoint on which to run the monitor. - * For BROWSER, REST and NETWORK monitor types, target is mandatory. + * For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. * If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. * If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. - * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 + * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. * * @param target the value to set * @return this builder @@ -460,6 +469,54 @@ public Builder batchIntervalInSeconds(Integer batchIntervalInSeconds) { this.__explicitlySet__.add("batchIntervalInSeconds"); return this; } + /** + * If enabled, domain name will resolve to an IPv6 address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isIPv6") + private Boolean isIPv6; + + /** + * If enabled, domain name will resolve to an IPv6 address. + * @param isIPv6 the value to set + * @return this builder + **/ + public Builder isIPv6(Boolean isIPv6) { + this.isIPv6 = isIPv6; + this.__explicitlySet__.add("isIPv6"); + return this; + } + /** + * Name of the user that created the monitor. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private String createdBy; + + /** + * Name of the user that created the monitor. + * @param createdBy the value to set + * @return this builder + **/ + public Builder createdBy(String createdBy) { + this.createdBy = createdBy; + this.__explicitlySet__.add("createdBy"); + return this; + } + /** + * Name of the user that recently updated the monitor. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastUpdatedBy") + private String lastUpdatedBy; + + /** + * Name of the user that recently updated the monitor. + * @param lastUpdatedBy the value to set + * @return this builder + **/ + public Builder lastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + this.__explicitlySet__.add("lastUpdatedBy"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -487,7 +544,10 @@ public MonitorSummary build() { this.definedTags, this.isRunNow, this.schedulingPolicy, - this.batchIntervalInSeconds); + this.batchIntervalInSeconds, + this.isIPv6, + this.createdBy, + this.lastUpdatedBy); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -559,6 +619,15 @@ public Builder copy(MonitorSummary model) { if (model.wasPropertyExplicitlySet("batchIntervalInSeconds")) { this.batchIntervalInSeconds(model.getBatchIntervalInSeconds()); } + if (model.wasPropertyExplicitlySet("isIPv6")) { + this.isIPv6(model.getIsIPv6()); + } + if (model.wasPropertyExplicitlySet("createdBy")) { + this.createdBy(model.getCreatedBy()); + } + if (model.wasPropertyExplicitlySet("lastUpdatedBy")) { + this.lastUpdatedBy(model.getLastUpdatedBy()); + } return this; } } @@ -617,13 +686,13 @@ public MonitorTypes getMonitorType() { } /** - * List of public and dedicated vantage points where the monitor is running. + * List of public, dedicated and onPremise vantage points where the monitor is running. **/ @com.fasterxml.jackson.annotation.JsonProperty("vantagePoints") private final java.util.List vantagePoints; /** - * List of public and dedicated vantage points where the monitor is running. + * List of public, dedicated and onPremise vantage points where the monitor is running. * @return the value **/ public java.util.List getVantagePoints() { @@ -746,10 +815,10 @@ public Integer getTimeoutInSeconds() { /** * Specify the endpoint on which to run the monitor. - * For BROWSER, REST and NETWORK monitor types, target is mandatory. + * For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. * If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. * If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. - * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 + * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. * **/ @com.fasterxml.jackson.annotation.JsonProperty("target") @@ -757,10 +826,10 @@ public Integer getTimeoutInSeconds() { /** * Specify the endpoint on which to run the monitor. - * For BROWSER, REST and NETWORK monitor types, target is mandatory. + * For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. * If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. * If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. - * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 + * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. * * @return the value **/ @@ -900,6 +969,48 @@ public Integer getBatchIntervalInSeconds() { return batchIntervalInSeconds; } + /** + * If enabled, domain name will resolve to an IPv6 address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isIPv6") + private final Boolean isIPv6; + + /** + * If enabled, domain name will resolve to an IPv6 address. + * @return the value + **/ + public Boolean getIsIPv6() { + return isIPv6; + } + + /** + * Name of the user that created the monitor. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private final String createdBy; + + /** + * Name of the user that created the monitor. + * @return the value + **/ + public String getCreatedBy() { + return createdBy; + } + + /** + * Name of the user that recently updated the monitor. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastUpdatedBy") + private final String lastUpdatedBy; + + /** + * Name of the user that recently updated the monitor. + * @return the value + **/ + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + @Override public String toString() { return this.toString(true); @@ -937,6 +1048,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isRunNow=").append(String.valueOf(this.isRunNow)); sb.append(", schedulingPolicy=").append(String.valueOf(this.schedulingPolicy)); sb.append(", batchIntervalInSeconds=").append(String.valueOf(this.batchIntervalInSeconds)); + sb.append(", isIPv6=").append(String.valueOf(this.isIPv6)); + sb.append(", createdBy=").append(String.valueOf(this.createdBy)); + sb.append(", lastUpdatedBy=").append(String.valueOf(this.lastUpdatedBy)); sb.append(")"); return sb.toString(); } @@ -975,6 +1089,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.schedulingPolicy, other.schedulingPolicy) && java.util.Objects.equals( this.batchIntervalInSeconds, other.batchIntervalInSeconds) + && java.util.Objects.equals(this.isIPv6, other.isIPv6) + && java.util.Objects.equals(this.createdBy, other.createdBy) + && java.util.Objects.equals(this.lastUpdatedBy, other.lastUpdatedBy) && super.equals(other); } @@ -1025,6 +1142,11 @@ public int hashCode() { + (this.batchIntervalInSeconds == null ? 43 : this.batchIntervalInSeconds.hashCode()); + result = (result * PRIME) + (this.isIPv6 == null ? 43 : this.isIPv6.hashCode()); + result = (result * PRIME) + (this.createdBy == null ? 43 : this.createdBy.hashCode()); + result = + (result * PRIME) + + (this.lastUpdatedBy == null ? 43 : this.lastUpdatedBy.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/MonitorTypes.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/MonitorTypes.java index 0602b65cb14..b0559611fed 100644 --- a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/MonitorTypes.java +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/MonitorTypes.java @@ -15,6 +15,8 @@ public enum MonitorTypes { Rest("REST"), Network("NETWORK"), Dns("DNS"), + Ftp("FTP"), + Sql("SQL"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/Password.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/Password.java new file mode 100644 index 00000000000..11edd326ca4 --- /dev/null +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/Password.java @@ -0,0 +1,129 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.apmsynthetics.model; + +/** + * Password. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "passwordType", + defaultImpl = Password.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PasswordInText.class, + name = "IN_TEXT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PasswordInVault.class, + name = "VAULT_SECRET_ID" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class Password extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected Password() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Password("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Password)) { + return false; + } + + Password other = (Password) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Type of method to pass password. + **/ + public enum PasswordType { + InText("IN_TEXT"), + VaultSecretId("VAULT_SECRET_ID"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PasswordType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PasswordType v : PasswordType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + PasswordType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PasswordType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'PasswordType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/PasswordInText.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/PasswordInText.java new file mode 100644 index 00000000000..22d04672cd6 --- /dev/null +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/PasswordInText.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.apmsynthetics.model; + +/** + * Password. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = PasswordInText.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "passwordType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PasswordInText extends Password { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Password. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("password") + private String password; + + /** + * Password. + * @param password the value to set + * @return this builder + **/ + public Builder password(String password) { + this.password = password; + this.__explicitlySet__.add("password"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PasswordInText build() { + PasswordInText model = new PasswordInText(this.password); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PasswordInText model) { + if (model.wasPropertyExplicitlySet("password")) { + this.password(model.getPassword()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PasswordInText(String password) { + super(); + this.password = password; + } + + /** + * Password. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("password") + private final String password; + + /** + * Password. + * @return the value + **/ + public String getPassword() { + return password; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PasswordInText("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", password=").append(""); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PasswordInText)) { + return false; + } + + PasswordInText other = (PasswordInText) o; + return java.util.Objects.equals(this.password, other.password) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + return result; + } +} diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/PasswordInVault.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/PasswordInVault.java new file mode 100644 index 00000000000..1332a533a01 --- /dev/null +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/PasswordInVault.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.apmsynthetics.model; + +/** + * Vault secret OCID for password that can be used with monitor Resource Principal. + * Example, ocid1.vaultsecret.oc1.iad.amaaaaaagpihjxqadwyc4kjhpeis2bylhzmp5r2si6mz2h4eujevnmf3zoca. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = PasswordInVault.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "passwordType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PasswordInVault extends Password { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Vault secret OCID. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultSecretId") + private String vaultSecretId; + + /** + * Vault secret OCID. + * @param vaultSecretId the value to set + * @return this builder + **/ + public Builder vaultSecretId(String vaultSecretId) { + this.vaultSecretId = vaultSecretId; + this.__explicitlySet__.add("vaultSecretId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PasswordInVault build() { + PasswordInVault model = new PasswordInVault(this.vaultSecretId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PasswordInVault model) { + if (model.wasPropertyExplicitlySet("vaultSecretId")) { + this.vaultSecretId(model.getVaultSecretId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PasswordInVault(String vaultSecretId) { + super(); + this.vaultSecretId = vaultSecretId; + } + + /** + * Vault secret OCID. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultSecretId") + private final String vaultSecretId; + + /** + * Vault secret OCID. + * @return the value + **/ + public String getVaultSecretId() { + return vaultSecretId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PasswordInVault("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", vaultSecretId=").append(String.valueOf(this.vaultSecretId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PasswordInVault)) { + return false; + } + + PasswordInVault other = (PasswordInVault) o; + return java.util.Objects.equals(this.vaultSecretId, other.vaultSecretId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.vaultSecretId == null ? 43 : this.vaultSecretId.hashCode()); + return result; + } +} diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/SqlMonitorConfiguration.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/SqlMonitorConfiguration.java new file mode 100644 index 00000000000..18e34d068eb --- /dev/null +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/SqlMonitorConfiguration.java @@ -0,0 +1,392 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.apmsynthetics.model; + +/** + * Request configuration details for the SQL monitor type. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SqlMonitorConfiguration.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "configType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SqlMonitorConfiguration extends MonitorConfiguration { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("isFailureRetried") + private Boolean isFailureRetried; + + public Builder isFailureRetried(Boolean isFailureRetried) { + this.isFailureRetried = isFailureRetried; + this.__explicitlySet__.add("isFailureRetried"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dnsConfiguration") + private DnsConfiguration dnsConfiguration; + + public Builder dnsConfiguration(DnsConfiguration dnsConfiguration) { + this.dnsConfiguration = dnsConfiguration; + this.__explicitlySet__.add("dnsConfiguration"); + return this; + } + /** + * Database type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseType") + private DatabaseType databaseType; + + /** + * Database type. + * @param databaseType the value to set + * @return this builder + **/ + public Builder databaseType(DatabaseType databaseType) { + this.databaseType = databaseType; + this.__explicitlySet__.add("databaseType"); + return this; + } + /** + * SQL query to be executed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("query") + private String query; + + /** + * SQL query to be executed. + * @param query the value to set + * @return this builder + **/ + public Builder query(String query) { + this.query = query; + this.__explicitlySet__.add("query"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseAuthenticationDetails") + private BasicAuthenticationDetails databaseAuthenticationDetails; + + public Builder databaseAuthenticationDetails( + BasicAuthenticationDetails databaseAuthenticationDetails) { + this.databaseAuthenticationDetails = databaseAuthenticationDetails; + this.__explicitlySet__.add("databaseAuthenticationDetails"); + return this; + } + /** + * Database role. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseRole") + private String databaseRole; + + /** + * Database role. + * @param databaseRole the value to set + * @return this builder + **/ + public Builder databaseRole(String databaseRole) { + this.databaseRole = databaseRole; + this.__explicitlySet__.add("databaseRole"); + return this; + } + /** + * Database connection type. Only CUSTOM_JDBC is supported for MYSQL database type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseConnectionType") + private DatabaseConnectionType databaseConnectionType; + + /** + * Database connection type. Only CUSTOM_JDBC is supported for MYSQL database type. + * @param databaseConnectionType the value to set + * @return this builder + **/ + public Builder databaseConnectionType(DatabaseConnectionType databaseConnectionType) { + this.databaseConnectionType = databaseConnectionType; + this.__explicitlySet__.add("databaseConnectionType"); + return this; + } + /** + * Database connection string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("connectionString") + private String connectionString; + + /** + * Database connection string. + * @param connectionString the value to set + * @return this builder + **/ + public Builder connectionString(String connectionString) { + this.connectionString = connectionString; + this.__explicitlySet__.add("connectionString"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseWalletDetails") + private DatabaseWalletDetails databaseWalletDetails; + + public Builder databaseWalletDetails(DatabaseWalletDetails databaseWalletDetails) { + this.databaseWalletDetails = databaseWalletDetails; + this.__explicitlySet__.add("databaseWalletDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SqlMonitorConfiguration build() { + SqlMonitorConfiguration model = + new SqlMonitorConfiguration( + this.isFailureRetried, + this.dnsConfiguration, + this.databaseType, + this.query, + this.databaseAuthenticationDetails, + this.databaseRole, + this.databaseConnectionType, + this.connectionString, + this.databaseWalletDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SqlMonitorConfiguration model) { + if (model.wasPropertyExplicitlySet("isFailureRetried")) { + this.isFailureRetried(model.getIsFailureRetried()); + } + if (model.wasPropertyExplicitlySet("dnsConfiguration")) { + this.dnsConfiguration(model.getDnsConfiguration()); + } + if (model.wasPropertyExplicitlySet("databaseType")) { + this.databaseType(model.getDatabaseType()); + } + if (model.wasPropertyExplicitlySet("query")) { + this.query(model.getQuery()); + } + if (model.wasPropertyExplicitlySet("databaseAuthenticationDetails")) { + this.databaseAuthenticationDetails(model.getDatabaseAuthenticationDetails()); + } + if (model.wasPropertyExplicitlySet("databaseRole")) { + this.databaseRole(model.getDatabaseRole()); + } + if (model.wasPropertyExplicitlySet("databaseConnectionType")) { + this.databaseConnectionType(model.getDatabaseConnectionType()); + } + if (model.wasPropertyExplicitlySet("connectionString")) { + this.connectionString(model.getConnectionString()); + } + if (model.wasPropertyExplicitlySet("databaseWalletDetails")) { + this.databaseWalletDetails(model.getDatabaseWalletDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public SqlMonitorConfiguration( + Boolean isFailureRetried, + DnsConfiguration dnsConfiguration, + DatabaseType databaseType, + String query, + BasicAuthenticationDetails databaseAuthenticationDetails, + String databaseRole, + DatabaseConnectionType databaseConnectionType, + String connectionString, + DatabaseWalletDetails databaseWalletDetails) { + super(isFailureRetried, dnsConfiguration); + this.databaseType = databaseType; + this.query = query; + this.databaseAuthenticationDetails = databaseAuthenticationDetails; + this.databaseRole = databaseRole; + this.databaseConnectionType = databaseConnectionType; + this.connectionString = connectionString; + this.databaseWalletDetails = databaseWalletDetails; + } + + /** + * Database type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseType") + private final DatabaseType databaseType; + + /** + * Database type. + * @return the value + **/ + public DatabaseType getDatabaseType() { + return databaseType; + } + + /** + * SQL query to be executed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("query") + private final String query; + + /** + * SQL query to be executed. + * @return the value + **/ + public String getQuery() { + return query; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseAuthenticationDetails") + private final BasicAuthenticationDetails databaseAuthenticationDetails; + + public BasicAuthenticationDetails getDatabaseAuthenticationDetails() { + return databaseAuthenticationDetails; + } + + /** + * Database role. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseRole") + private final String databaseRole; + + /** + * Database role. + * @return the value + **/ + public String getDatabaseRole() { + return databaseRole; + } + + /** + * Database connection type. Only CUSTOM_JDBC is supported for MYSQL database type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseConnectionType") + private final DatabaseConnectionType databaseConnectionType; + + /** + * Database connection type. Only CUSTOM_JDBC is supported for MYSQL database type. + * @return the value + **/ + public DatabaseConnectionType getDatabaseConnectionType() { + return databaseConnectionType; + } + + /** + * Database connection string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("connectionString") + private final String connectionString; + + /** + * Database connection string. + * @return the value + **/ + public String getConnectionString() { + return connectionString; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseWalletDetails") + private final DatabaseWalletDetails databaseWalletDetails; + + public DatabaseWalletDetails getDatabaseWalletDetails() { + return databaseWalletDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SqlMonitorConfiguration("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", databaseType=").append(String.valueOf(this.databaseType)); + sb.append(", query=").append(String.valueOf(this.query)); + sb.append(", databaseAuthenticationDetails=") + .append(String.valueOf(this.databaseAuthenticationDetails)); + sb.append(", databaseRole=").append(String.valueOf(this.databaseRole)); + sb.append(", databaseConnectionType=").append(String.valueOf(this.databaseConnectionType)); + sb.append(", connectionString=").append(String.valueOf(this.connectionString)); + sb.append(", databaseWalletDetails=").append(String.valueOf(this.databaseWalletDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SqlMonitorConfiguration)) { + return false; + } + + SqlMonitorConfiguration other = (SqlMonitorConfiguration) o; + return java.util.Objects.equals(this.databaseType, other.databaseType) + && java.util.Objects.equals(this.query, other.query) + && java.util.Objects.equals( + this.databaseAuthenticationDetails, other.databaseAuthenticationDetails) + && java.util.Objects.equals(this.databaseRole, other.databaseRole) + && java.util.Objects.equals( + this.databaseConnectionType, other.databaseConnectionType) + && java.util.Objects.equals(this.connectionString, other.connectionString) + && java.util.Objects.equals(this.databaseWalletDetails, other.databaseWalletDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.databaseType == null ? 43 : this.databaseType.hashCode()); + result = (result * PRIME) + (this.query == null ? 43 : this.query.hashCode()); + result = + (result * PRIME) + + (this.databaseAuthenticationDetails == null + ? 43 + : this.databaseAuthenticationDetails.hashCode()); + result = (result * PRIME) + (this.databaseRole == null ? 43 : this.databaseRole.hashCode()); + result = + (result * PRIME) + + (this.databaseConnectionType == null + ? 43 + : this.databaseConnectionType.hashCode()); + result = + (result * PRIME) + + (this.connectionString == null ? 43 : this.connectionString.hashCode()); + result = + (result * PRIME) + + (this.databaseWalletDetails == null + ? 43 + : this.databaseWalletDetails.hashCode()); + return result; + } +} diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/UpdateMonitorDetails.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/UpdateMonitorDetails.java index 16173fcd066..bcff369002e 100644 --- a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/UpdateMonitorDetails.java +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/UpdateMonitorDetails.java @@ -38,7 +38,8 @@ public final class UpdateMonitorDetails extends com.oracle.bmc.http.internal.Exp "definedTags", "isRunNow", "schedulingPolicy", - "batchIntervalInSeconds" + "batchIntervalInSeconds", + "isIPv6" }) public UpdateMonitorDetails( String displayName, @@ -57,7 +58,8 @@ public UpdateMonitorDetails( java.util.Map> definedTags, Boolean isRunNow, SchedulingPolicy schedulingPolicy, - Integer batchIntervalInSeconds) { + Integer batchIntervalInSeconds, + Boolean isIPv6) { super(); this.displayName = displayName; this.vantagePoints = vantagePoints; @@ -76,6 +78,7 @@ public UpdateMonitorDetails( this.isRunNow = isRunNow; this.schedulingPolicy = schedulingPolicy; this.batchIntervalInSeconds = batchIntervalInSeconds; + this.isIPv6 = isIPv6; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -214,10 +217,10 @@ public Builder timeoutInSeconds(Integer timeoutInSeconds) { } /** * Specify the endpoint on which to run the monitor. - * For BROWSER, REST and NETWORK monitor types, target is mandatory. + * For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. * If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. * If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. - * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 + * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. * **/ @com.fasterxml.jackson.annotation.JsonProperty("target") @@ -225,10 +228,10 @@ public Builder timeoutInSeconds(Integer timeoutInSeconds) { /** * Specify the endpoint on which to run the monitor. - * For BROWSER, REST and NETWORK monitor types, target is mandatory. + * For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. * If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. * If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. - * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 + * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. * * @param target the value to set * @return this builder @@ -378,6 +381,22 @@ public Builder batchIntervalInSeconds(Integer batchIntervalInSeconds) { this.__explicitlySet__.add("batchIntervalInSeconds"); return this; } + /** + * If enabled, domain name will resolve to an IPv6 address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isIPv6") + private Boolean isIPv6; + + /** + * If enabled, domain name will resolve to an IPv6 address. + * @param isIPv6 the value to set + * @return this builder + **/ + public Builder isIPv6(Boolean isIPv6) { + this.isIPv6 = isIPv6; + this.__explicitlySet__.add("isIPv6"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -401,7 +420,8 @@ public UpdateMonitorDetails build() { this.definedTags, this.isRunNow, this.schedulingPolicy, - this.batchIntervalInSeconds); + this.batchIntervalInSeconds, + this.isIPv6); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -461,6 +481,9 @@ public Builder copy(UpdateMonitorDetails model) { if (model.wasPropertyExplicitlySet("batchIntervalInSeconds")) { this.batchIntervalInSeconds(model.getBatchIntervalInSeconds()); } + if (model.wasPropertyExplicitlySet("isIPv6")) { + this.isIPv6(model.getIsIPv6()); + } return this; } } @@ -596,10 +619,10 @@ public Integer getTimeoutInSeconds() { /** * Specify the endpoint on which to run the monitor. - * For BROWSER, REST and NETWORK monitor types, target is mandatory. + * For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. * If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. * If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. - * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 + * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. * **/ @com.fasterxml.jackson.annotation.JsonProperty("target") @@ -607,10 +630,10 @@ public Integer getTimeoutInSeconds() { /** * Specify the endpoint on which to run the monitor. - * For BROWSER, REST and NETWORK monitor types, target is mandatory. + * For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. * If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. * If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. - * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 + * For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. * * @return the value **/ @@ -737,6 +760,20 @@ public Integer getBatchIntervalInSeconds() { return batchIntervalInSeconds; } + /** + * If enabled, domain name will resolve to an IPv6 address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isIPv6") + private final Boolean isIPv6; + + /** + * If enabled, domain name will resolve to an IPv6 address. + * @return the value + **/ + public Boolean getIsIPv6() { + return isIPv6; + } + @Override public String toString() { return this.toString(true); @@ -771,6 +808,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isRunNow=").append(String.valueOf(this.isRunNow)); sb.append(", schedulingPolicy=").append(String.valueOf(this.schedulingPolicy)); sb.append(", batchIntervalInSeconds=").append(String.valueOf(this.batchIntervalInSeconds)); + sb.append(", isIPv6=").append(String.valueOf(this.isIPv6)); sb.append(")"); return sb.toString(); } @@ -806,6 +844,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.schedulingPolicy, other.schedulingPolicy) && java.util.Objects.equals( this.batchIntervalInSeconds, other.batchIntervalInSeconds) + && java.util.Objects.equals(this.isIPv6, other.isIPv6) && super.equals(other); } @@ -856,6 +895,7 @@ public int hashCode() { + (this.batchIntervalInSeconds == null ? 43 : this.batchIntervalInSeconds.hashCode()); + result = (result * PRIME) + (this.isIPv6 == null ? 43 : this.isIPv6.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/VantagePointInfo.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/VantagePointInfo.java index fe1695275a3..903bc9aa5a7 100644 --- a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/VantagePointInfo.java +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/model/VantagePointInfo.java @@ -19,11 +19,12 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class VantagePointInfo extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"name", "displayName"}) - public VantagePointInfo(String name, String displayName) { + @java.beans.ConstructorProperties({"name", "displayName", "workerList"}) + public VantagePointInfo(String name, String displayName, java.util.List workerList) { super(); this.name = name; this.displayName = displayName; + this.workerList = workerList; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -60,12 +61,29 @@ public Builder displayName(String displayName) { this.__explicitlySet__.add("displayName"); return this; } + /** + * List of workers running the assigned monitor. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("workerList") + private java.util.List workerList; + + /** + * List of workers running the assigned monitor. + * @param workerList the value to set + * @return this builder + **/ + public Builder workerList(java.util.List workerList) { + this.workerList = workerList; + this.__explicitlySet__.add("workerList"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public VantagePointInfo build() { - VantagePointInfo model = new VantagePointInfo(this.name, this.displayName); + VantagePointInfo model = + new VantagePointInfo(this.name, this.displayName, this.workerList); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -80,6 +98,9 @@ public Builder copy(VantagePointInfo model) { if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } + if (model.wasPropertyExplicitlySet("workerList")) { + this.workerList(model.getWorkerList()); + } return this; } } @@ -123,6 +144,20 @@ public String getDisplayName() { return displayName; } + /** + * List of workers running the assigned monitor. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("workerList") + private final java.util.List workerList; + + /** + * List of workers running the assigned monitor. + * @return the value + **/ + public java.util.List getWorkerList() { + return workerList; + } + @Override public String toString() { return this.toString(true); @@ -139,6 +174,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("name=").append(String.valueOf(this.name)); sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", workerList=").append(String.valueOf(this.workerList)); sb.append(")"); return sb.toString(); } @@ -155,6 +191,7 @@ public boolean equals(Object o) { VantagePointInfo other = (VantagePointInfo) o; return java.util.Objects.equals(this.name, other.name) && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.workerList, other.workerList) && super.equals(other); } @@ -164,6 +201,7 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.workerList == null ? 43 : this.workerList.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/requests/ListMonitorsRequest.java b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/requests/ListMonitorsRequest.java index f870215318a..18eb618924a 100644 --- a/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/requests/ListMonitorsRequest.java +++ b/bmc-apmsynthetics/src/main/java/com/oracle/bmc/apmsynthetics/requests/ListMonitorsRequest.java @@ -61,14 +61,14 @@ public String getVantagePoint() { } /** * A filter to return only monitors that match the given monitor type. - * Supported values are SCRIPTED_BROWSER, BROWSER, SCRIPTED_REST, REST and NETWORK. + * Supported values are SCRIPTED_BROWSER, BROWSER, SCRIPTED_REST, REST, NETWORK, DNS, FTP and SQL. * */ private String monitorType; /** * A filter to return only monitors that match the given monitor type. - * Supported values are SCRIPTED_BROWSER, BROWSER, SCRIPTED_REST, REST and NETWORK. + * Supported values are SCRIPTED_BROWSER, BROWSER, SCRIPTED_REST, REST, NETWORK, DNS, FTP and SQL. * */ public String getMonitorType() { @@ -304,14 +304,14 @@ public Builder vantagePoint(String vantagePoint) { /** * A filter to return only monitors that match the given monitor type. - * Supported values are SCRIPTED_BROWSER, BROWSER, SCRIPTED_REST, REST and NETWORK. + * Supported values are SCRIPTED_BROWSER, BROWSER, SCRIPTED_REST, REST, NETWORK, DNS, FTP and SQL. * */ private String monitorType = null; /** * A filter to return only monitors that match the given monitor type. - * Supported values are SCRIPTED_BROWSER, BROWSER, SCRIPTED_REST, REST and NETWORK. + * Supported values are SCRIPTED_BROWSER, BROWSER, SCRIPTED_REST, REST, NETWORK, DNS, FTP and SQL. * * @param monitorType the value to set * @return this builder instance diff --git a/bmc-apmtraces/pom.xml b/bmc-apmtraces/pom.xml index 47b5e5b0436..a429e8af8b0 100644 --- a/bmc-apmtraces/pom.xml +++ b/bmc-apmtraces/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-apmtraces @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-appmgmtcontrol/pom.xml b/bmc-appmgmtcontrol/pom.xml index 3b261850b16..dedc48033f2 100644 --- a/bmc-appmgmtcontrol/pom.xml +++ b/bmc-appmgmtcontrol/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-appmgmtcontrol @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-artifacts/pom.xml b/bmc-artifacts/pom.xml index 3e76813fd44..982eff895d9 100644 --- a/bmc-artifacts/pom.xml +++ b/bmc-artifacts/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-artifacts @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-audit/pom.xml b/bmc-audit/pom.xml index ba9687d87fd..cf4bedfe463 100644 --- a/bmc-audit/pom.xml +++ b/bmc-audit/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-autoscaling/pom.xml b/bmc-autoscaling/pom.xml index e253ba10f2d..d4da3225b3c 100644 --- a/bmc-autoscaling/pom.xml +++ b/bmc-autoscaling/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-autoscaling @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-bastion/pom.xml b/bmc-bastion/pom.xml index 1c90d34c25b..17ccc071870 100644 --- a/bmc-bastion/pom.xml +++ b/bmc-bastion/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-bastion @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-bds/pom.xml b/bmc-bds/pom.xml index 0d9dccf11bd..56ffb673528 100644 --- a/bmc-bds/pom.xml +++ b/bmc-bds/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-bds @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/Bds.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/Bds.java index 2ab865c0f56..7d654c8d245 100644 --- a/bmc-bds/src/main/java/com/oracle/bmc/bds/Bds.java +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/Bds.java @@ -287,6 +287,20 @@ CreateNodeBackupConfigurationResponse createNodeBackupConfiguration( CreateNodeReplaceConfigurationResponse createNodeReplaceConfiguration( CreateNodeReplaceConfigurationRequest request); + /** + * Create a resource principal session token configuration. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateResourcePrincipalConfiguration API. + */ + CreateResourcePrincipalConfigurationResponse createResourcePrincipalConfiguration( + CreateResourcePrincipalConfigurationRequest request); + /** * Deletes the user's API key represented by the provided ID. * @param request The request object containing the details to send @@ -388,6 +402,20 @@ DeleteNodeBackupConfigurationResponse deleteNodeBackupConfiguration( */ ExecuteBootstrapScriptResponse executeBootstrapScript(ExecuteBootstrapScriptRequest request); + /** + * Force Refresh Resource Principal for the cluster. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ForceRefreshResourcePrincipal API. + */ + ForceRefreshResourcePrincipalResponse forceRefreshResourcePrincipal( + ForceRefreshResourcePrincipalRequest request); + /** * Returns details of the autoscale configuration identified by the given ID. * @@ -492,6 +520,20 @@ GetNodeReplaceConfigurationResponse getNodeReplaceConfiguration( */ GetOsPatchDetailsResponse getOsPatchDetails(GetOsPatchDetailsRequest request); + /** + * Returns details of the resourcePrincipalConfiguration identified by the given ID. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetResourcePrincipalConfiguration API. + */ + GetResourcePrincipalConfigurationResponse getResourcePrincipalConfiguration( + GetResourcePrincipalConfigurationRequest request); + /** * Returns the status of the work request identified by the given ID. * @param request The request object containing the details to send @@ -663,6 +705,20 @@ ListNodeReplaceConfigurationsResponse listNodeReplaceConfigurations( */ ListPatchesResponse listPatches(ListPatchesRequest request); + /** + * Returns information about the ResourcePrincipalConfiguration. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListResourcePrincipalConfigurations API. + */ + ListResourcePrincipalConfigurationsResponse listResourcePrincipalConfigurations( + ListResourcePrincipalConfigurationsRequest request); + /** * Returns a paginated list of errors for a work request identified by the given ID. * @@ -769,6 +825,20 @@ RemoveAutoScalingConfigurationResponse removeAutoScalingConfiguration( RemoveNodeReplaceConfigurationResponse removeNodeReplaceConfiguration( RemoveNodeReplaceConfigurationRequest request); + /** + * Delete the resource principal configuration for the cluster. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RemoveResourcePrincipalConfiguration API. + */ + RemoveResourcePrincipalConfigurationResponse removeResourcePrincipalConfiguration( + RemoveResourcePrincipalConfigurationRequest request); + /** * Renewing TLS/SSL for various ODH services running on the BDS cluster. * @@ -928,6 +998,20 @@ UpdateNodeBackupConfigurationResponse updateNodeBackupConfiguration( UpdateNodeReplaceConfigurationResponse updateNodeReplaceConfiguration( UpdateNodeReplaceConfigurationRequest request); + /** + * Updates fields on resourcePrincipalConfiguration, including the name, the lifeSpanInHours of the token. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateResourcePrincipalConfiguration API. + */ + UpdateResourcePrincipalConfigurationResponse updateResourcePrincipalConfiguration( + UpdateResourcePrincipalConfigurationRequest request); + /** * Gets the pre-configured waiters available for resources for this service. * diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/BdsAsync.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/BdsAsync.java index 5207e6c0436..180f7b9317d 100644 --- a/bmc-bds/src/main/java/com/oracle/bmc/bds/BdsAsync.java +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/BdsAsync.java @@ -344,6 +344,25 @@ java.util.concurrent.Future createBdsInstance( CreateNodeReplaceConfigurationResponse> handler); + /** + * Create a resource principal session token configuration. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + createResourcePrincipalConfiguration( + CreateResourcePrincipalConfigurationRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateResourcePrincipalConfigurationRequest, + CreateResourcePrincipalConfigurationResponse> + handler); + /** * Deletes the user's API key represented by the provided ID. * @@ -477,6 +496,25 @@ java.util.concurrent.Future executeBootstrapScri ExecuteBootstrapScriptRequest, ExecuteBootstrapScriptResponse> handler); + /** + * Force Refresh Resource Principal for the cluster. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + forceRefreshResourcePrincipal( + ForceRefreshResourcePrincipalRequest request, + com.oracle.bmc.responses.AsyncHandler< + ForceRefreshResourcePrincipalRequest, + ForceRefreshResourcePrincipalResponse> + handler); + /** * Returns details of the autoscale configuration identified by the given ID. * @@ -607,6 +645,25 @@ java.util.concurrent.Future getOsPatchDetails( GetOsPatchDetailsRequest, GetOsPatchDetailsResponse> handler); + /** + * Returns details of the resourcePrincipalConfiguration identified by the given ID. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + getResourcePrincipalConfiguration( + GetResourcePrincipalConfigurationRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetResourcePrincipalConfigurationRequest, + GetResourcePrincipalConfigurationResponse> + handler); + /** * Returns the status of the work request identified by the given ID. * @@ -824,6 +881,25 @@ java.util.concurrent.Future listPatches( ListPatchesRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Returns information about the ResourcePrincipalConfiguration. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listResourcePrincipalConfigurations( + ListResourcePrincipalConfigurationsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListResourcePrincipalConfigurationsRequest, + ListResourcePrincipalConfigurationsResponse> + handler); + /** * Returns a paginated list of errors for a work request identified by the given ID. * @@ -958,6 +1034,25 @@ java.util.concurrent.Future removeNode( RemoveNodeReplaceConfigurationResponse> handler); + /** + * Delete the resource principal configuration for the cluster. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + removeResourcePrincipalConfiguration( + RemoveResourcePrincipalConfigurationRequest request, + com.oracle.bmc.responses.AsyncHandler< + RemoveResourcePrincipalConfigurationRequest, + RemoveResourcePrincipalConfigurationResponse> + handler); + /** * Renewing TLS/SSL for various ODH services running on the BDS cluster. * @@ -1163,4 +1258,23 @@ java.util.concurrent.Future updateBdsInstance( UpdateNodeReplaceConfigurationRequest, UpdateNodeReplaceConfigurationResponse> handler); + + /** + * Updates fields on resourcePrincipalConfiguration, including the name, the lifeSpanInHours of the token. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + updateResourcePrincipalConfiguration( + UpdateResourcePrincipalConfigurationRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateResourcePrincipalConfigurationRequest, + UpdateResourcePrincipalConfigurationResponse> + handler); } diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/BdsAsyncClient.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/BdsAsyncClient.java index a4a5e2c5f3c..24dfd31243f 100644 --- a/bmc-bds/src/main/java/com/oracle/bmc/bds/BdsAsyncClient.java +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/BdsAsyncClient.java @@ -1364,6 +1364,66 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + createResourcePrincipalConfiguration( + CreateResourcePrincipalConfigurationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateResourcePrincipalConfigurationRequest, + CreateResourcePrincipalConfigurationResponse> + handler) { + LOG.trace("Called async createResourcePrincipalConfiguration"); + final CreateResourcePrincipalConfigurationRequest interceptedRequest = + CreateResourcePrincipalConfigurationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateResourcePrincipalConfigurationConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Bds", + "CreateResourcePrincipalConfiguration", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/CreateResourcePrincipalConfiguration"); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateResourcePrincipalConfigurationResponse> + transformer = + CreateResourcePrincipalConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateResourcePrincipalConfigurationRequest, + CreateResourcePrincipalConfigurationResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateResourcePrincipalConfigurationRequest, + CreateResourcePrincipalConfigurationResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateResourcePrincipalConfigurationDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateResourcePrincipalConfigurationRequest, + CreateResourcePrincipalConfigurationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteBdsApiKey( DeleteBdsApiKeyRequest request, @@ -1763,6 +1823,63 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + forceRefreshResourcePrincipal( + ForceRefreshResourcePrincipalRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ForceRefreshResourcePrincipalRequest, + ForceRefreshResourcePrincipalResponse> + handler) { + LOG.trace("Called async forceRefreshResourcePrincipal"); + final ForceRefreshResourcePrincipalRequest interceptedRequest = + ForceRefreshResourcePrincipalConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ForceRefreshResourcePrincipalConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Bds", + "ForceRefreshResourcePrincipal", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/ForceRefreshResourcePrincipal"); + final java.util.function.Function< + javax.ws.rs.core.Response, ForceRefreshResourcePrincipalResponse> + transformer = + ForceRefreshResourcePrincipalConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ForceRefreshResourcePrincipalRequest, ForceRefreshResourcePrincipalResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ForceRefreshResourcePrincipalRequest, + ForceRefreshResourcePrincipalResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getForceRefreshResourcePrincipalDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ForceRefreshResourcePrincipalRequest, ForceRefreshResourcePrincipalResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getAutoScalingConfiguration( @@ -2147,6 +2264,59 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + getResourcePrincipalConfiguration( + GetResourcePrincipalConfigurationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetResourcePrincipalConfigurationRequest, + GetResourcePrincipalConfigurationResponse> + handler) { + LOG.trace("Called async getResourcePrincipalConfiguration"); + final GetResourcePrincipalConfigurationRequest interceptedRequest = + GetResourcePrincipalConfigurationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetResourcePrincipalConfigurationConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Bds", + "GetResourcePrincipalConfiguration", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/GetResourcePrincipalConfiguration"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetResourcePrincipalConfigurationResponse> + transformer = + GetResourcePrincipalConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetResourcePrincipalConfigurationRequest, + GetResourcePrincipalConfigurationResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetResourcePrincipalConfigurationRequest, + GetResourcePrincipalConfigurationResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetResourcePrincipalConfigurationRequest, + GetResourcePrincipalConfigurationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getWorkRequest( GetWorkRequestRequest request, @@ -2770,6 +2940,60 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + listResourcePrincipalConfigurations( + ListResourcePrincipalConfigurationsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListResourcePrincipalConfigurationsRequest, + ListResourcePrincipalConfigurationsResponse> + handler) { + LOG.trace("Called async listResourcePrincipalConfigurations"); + final ListResourcePrincipalConfigurationsRequest interceptedRequest = + ListResourcePrincipalConfigurationsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListResourcePrincipalConfigurationsConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Bds", + "ListResourcePrincipalConfigurations", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/ListResourcePrincipalConfigurations"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListResourcePrincipalConfigurationsResponse> + transformer = + ListResourcePrincipalConfigurationsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListResourcePrincipalConfigurationsRequest, + ListResourcePrincipalConfigurationsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListResourcePrincipalConfigurationsRequest, + ListResourcePrincipalConfigurationsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListResourcePrincipalConfigurationsRequest, + ListResourcePrincipalConfigurationsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listWorkRequestErrors( ListWorkRequestErrorsRequest request, @@ -3175,6 +3399,65 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + removeResourcePrincipalConfiguration( + RemoveResourcePrincipalConfigurationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RemoveResourcePrincipalConfigurationRequest, + RemoveResourcePrincipalConfigurationResponse> + handler) { + LOG.trace("Called async removeResourcePrincipalConfiguration"); + final RemoveResourcePrincipalConfigurationRequest interceptedRequest = + RemoveResourcePrincipalConfigurationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RemoveResourcePrincipalConfigurationConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Bds", + "RemoveResourcePrincipalConfiguration", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/ResourcePrincipalConfiguration/RemoveResourcePrincipalConfiguration"); + final java.util.function.Function< + javax.ws.rs.core.Response, RemoveResourcePrincipalConfigurationResponse> + transformer = + RemoveResourcePrincipalConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + RemoveResourcePrincipalConfigurationRequest, + RemoveResourcePrincipalConfigurationResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RemoveResourcePrincipalConfigurationRequest, + RemoveResourcePrincipalConfigurationResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRemoveResourcePrincipalConfigurationDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RemoveResourcePrincipalConfigurationRequest, + RemoveResourcePrincipalConfigurationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future renewCertificate( RenewCertificateRequest request, @@ -3823,4 +4106,64 @@ protected void beforeRetryAction() {} return futureSupplier.apply(handlerToUse); } } + + @Override + public java.util.concurrent.Future + updateResourcePrincipalConfiguration( + UpdateResourcePrincipalConfigurationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateResourcePrincipalConfigurationRequest, + UpdateResourcePrincipalConfigurationResponse> + handler) { + LOG.trace("Called async updateResourcePrincipalConfiguration"); + final UpdateResourcePrincipalConfigurationRequest interceptedRequest = + UpdateResourcePrincipalConfigurationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateResourcePrincipalConfigurationConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Bds", + "UpdateResourcePrincipalConfiguration", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/UpdateResourcePrincipalConfiguration"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateResourcePrincipalConfigurationResponse> + transformer = + UpdateResourcePrincipalConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateResourcePrincipalConfigurationRequest, + UpdateResourcePrincipalConfigurationResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateResourcePrincipalConfigurationRequest, + UpdateResourcePrincipalConfigurationResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateResourcePrincipalConfigurationDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateResourcePrincipalConfigurationRequest, + UpdateResourcePrincipalConfigurationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } } diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/BdsClient.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/BdsClient.java index 2d8461e223b..9cf2356c1ef 100644 --- a/bmc-bds/src/main/java/com/oracle/bmc/bds/BdsClient.java +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/BdsClient.java @@ -1264,6 +1264,52 @@ public CreateNodeReplaceConfigurationResponse createNodeReplaceConfiguration( }); } + @Override + public CreateResourcePrincipalConfigurationResponse createResourcePrincipalConfiguration( + CreateResourcePrincipalConfigurationRequest request) { + LOG.trace("Called createResourcePrincipalConfiguration"); + final CreateResourcePrincipalConfigurationRequest interceptedRequest = + CreateResourcePrincipalConfigurationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateResourcePrincipalConfigurationConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Bds", + "CreateResourcePrincipalConfiguration", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/CreateResourcePrincipalConfiguration"); + java.util.function.Function< + javax.ws.rs.core.Response, CreateResourcePrincipalConfigurationResponse> + transformer = + CreateResourcePrincipalConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getCreateResourcePrincipalConfigurationDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DeleteBdsApiKeyResponse deleteBdsApiKey(DeleteBdsApiKeyRequest request) { LOG.trace("Called deleteBdsApiKey"); @@ -1585,6 +1631,51 @@ public ExecuteBootstrapScriptResponse executeBootstrapScript( }); } + @Override + public ForceRefreshResourcePrincipalResponse forceRefreshResourcePrincipal( + ForceRefreshResourcePrincipalRequest request) { + LOG.trace("Called forceRefreshResourcePrincipal"); + final ForceRefreshResourcePrincipalRequest interceptedRequest = + ForceRefreshResourcePrincipalConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ForceRefreshResourcePrincipalConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Bds", + "ForceRefreshResourcePrincipal", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/ForceRefreshResourcePrincipal"); + java.util.function.Function< + javax.ws.rs.core.Response, ForceRefreshResourcePrincipalResponse> + transformer = + ForceRefreshResourcePrincipalConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getForceRefreshResourcePrincipalDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetAutoScalingConfigurationResponse getAutoScalingConfiguration( GetAutoScalingConfigurationRequest request) { @@ -1881,6 +1972,45 @@ public GetOsPatchDetailsResponse getOsPatchDetails(GetOsPatchDetailsRequest requ }); } + @Override + public GetResourcePrincipalConfigurationResponse getResourcePrincipalConfiguration( + GetResourcePrincipalConfigurationRequest request) { + LOG.trace("Called getResourcePrincipalConfiguration"); + final GetResourcePrincipalConfigurationRequest interceptedRequest = + GetResourcePrincipalConfigurationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetResourcePrincipalConfigurationConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Bds", + "GetResourcePrincipalConfiguration", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/GetResourcePrincipalConfiguration"); + java.util.function.Function< + javax.ws.rs.core.Response, GetResourcePrincipalConfigurationResponse> + transformer = + GetResourcePrincipalConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) { LOG.trace("Called getWorkRequest"); @@ -2369,6 +2499,46 @@ public ListPatchesResponse listPatches(ListPatchesRequest request) { }); } + @Override + public ListResourcePrincipalConfigurationsResponse listResourcePrincipalConfigurations( + ListResourcePrincipalConfigurationsRequest request) { + LOG.trace("Called listResourcePrincipalConfigurations"); + final ListResourcePrincipalConfigurationsRequest interceptedRequest = + ListResourcePrincipalConfigurationsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListResourcePrincipalConfigurationsConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Bds", + "ListResourcePrincipalConfigurations", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/ListResourcePrincipalConfigurations"); + java.util.function.Function< + javax.ws.rs.core.Response, ListResourcePrincipalConfigurationsResponse> + transformer = + ListResourcePrincipalConfigurationsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListWorkRequestErrorsResponse listWorkRequestErrors( ListWorkRequestErrorsRequest request) { @@ -2689,6 +2859,51 @@ public RemoveNodeReplaceConfigurationResponse removeNodeReplaceConfiguration( }); } + @Override + public RemoveResourcePrincipalConfigurationResponse removeResourcePrincipalConfiguration( + RemoveResourcePrincipalConfigurationRequest request) { + LOG.trace("Called removeResourcePrincipalConfiguration"); + final RemoveResourcePrincipalConfigurationRequest interceptedRequest = + RemoveResourcePrincipalConfigurationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RemoveResourcePrincipalConfigurationConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Bds", + "RemoveResourcePrincipalConfiguration", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/ResourcePrincipalConfiguration/RemoveResourcePrincipalConfiguration"); + java.util.function.Function< + javax.ws.rs.core.Response, RemoveResourcePrincipalConfigurationResponse> + transformer = + RemoveResourcePrincipalConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getRemoveResourcePrincipalConfigurationDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public RenewCertificateResponse renewCertificate(RenewCertificateRequest request) { LOG.trace("Called renewCertificate"); @@ -3201,6 +3416,52 @@ public UpdateNodeReplaceConfigurationResponse updateNodeReplaceConfiguration( }); } + @Override + public UpdateResourcePrincipalConfigurationResponse updateResourcePrincipalConfiguration( + UpdateResourcePrincipalConfigurationRequest request) { + LOG.trace("Called updateResourcePrincipalConfiguration"); + final UpdateResourcePrincipalConfigurationRequest interceptedRequest = + UpdateResourcePrincipalConfigurationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateResourcePrincipalConfigurationConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Bds", + "UpdateResourcePrincipalConfiguration", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/UpdateResourcePrincipalConfiguration"); + java.util.function.Function< + javax.ws.rs.core.Response, UpdateResourcePrincipalConfigurationResponse> + transformer = + UpdateResourcePrincipalConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest + .getUpdateResourcePrincipalConfigurationDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public BdsWaiters getWaiters() { return waiters; diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/BdsPaginators.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/BdsPaginators.java index 377b0b9da56..9175e679194 100644 --- a/bmc-bds/src/main/java/com/oracle/bmc/bds/BdsPaginators.java +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/BdsPaginators.java @@ -1181,6 +1181,134 @@ public java.util.List apply( }); } + /** + * Creates a new iterable which will iterate over the responses received from the listResourcePrincipalConfigurations operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listResourcePrincipalConfigurationsResponseIterator( + final ListResourcePrincipalConfigurationsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListResourcePrincipalConfigurationsRequest.Builder, + ListResourcePrincipalConfigurationsRequest, + ListResourcePrincipalConfigurationsResponse>( + new java.util.function.Supplier< + ListResourcePrincipalConfigurationsRequest.Builder>() { + @Override + public ListResourcePrincipalConfigurationsRequest.Builder get() { + return ListResourcePrincipalConfigurationsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListResourcePrincipalConfigurationsResponse, String>() { + @Override + public String apply(ListResourcePrincipalConfigurationsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListResourcePrincipalConfigurationsRequest.Builder>, + ListResourcePrincipalConfigurationsRequest>() { + @Override + public ListResourcePrincipalConfigurationsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListResourcePrincipalConfigurationsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListResourcePrincipalConfigurationsRequest, + ListResourcePrincipalConfigurationsResponse>() { + @Override + public ListResourcePrincipalConfigurationsResponse apply( + ListResourcePrincipalConfigurationsRequest request) { + return client.listResourcePrincipalConfigurations(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.bds.model.ResourcePrincipalConfigurationSummary} objects + * contained in responses from the listResourcePrincipalConfigurations operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.bds.model.ResourcePrincipalConfigurationSummary} objects + * contained in responses received from the service. + */ + public Iterable + listResourcePrincipalConfigurationsRecordIterator( + final ListResourcePrincipalConfigurationsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListResourcePrincipalConfigurationsRequest.Builder, + ListResourcePrincipalConfigurationsRequest, + ListResourcePrincipalConfigurationsResponse, + com.oracle.bmc.bds.model.ResourcePrincipalConfigurationSummary>( + new java.util.function.Supplier< + ListResourcePrincipalConfigurationsRequest.Builder>() { + @Override + public ListResourcePrincipalConfigurationsRequest.Builder get() { + return ListResourcePrincipalConfigurationsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListResourcePrincipalConfigurationsResponse, String>() { + @Override + public String apply(ListResourcePrincipalConfigurationsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListResourcePrincipalConfigurationsRequest.Builder>, + ListResourcePrincipalConfigurationsRequest>() { + @Override + public ListResourcePrincipalConfigurationsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListResourcePrincipalConfigurationsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListResourcePrincipalConfigurationsRequest, + ListResourcePrincipalConfigurationsResponse>() { + @Override + public ListResourcePrincipalConfigurationsResponse apply( + ListResourcePrincipalConfigurationsRequest request) { + return client.listResourcePrincipalConfigurations(request); + } + }, + new java.util.function.Function< + ListResourcePrincipalConfigurationsResponse, + java.util.List< + com.oracle.bmc.bds.model.ResourcePrincipalConfigurationSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.bds.model.ResourcePrincipalConfigurationSummary> + apply(ListResourcePrincipalConfigurationsResponse response) { + return response.getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listWorkRequestErrors operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/BdsWaiters.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/BdsWaiters.java index 7ab3a3b0ca8..e153e78e6d8 100644 --- a/bmc-bds/src/main/java/com/oracle/bmc/bds/BdsWaiters.java +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/BdsWaiters.java @@ -770,6 +770,126 @@ public boolean test(GetNodeReplaceConfigurationResponse response) { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetResourcePrincipalConfigurationRequest, + GetResourcePrincipalConfigurationResponse> + forResourcePrincipalConfiguration( + GetResourcePrincipalConfigurationRequest request, + com.oracle.bmc.bds.model.ResourcePrincipalConfiguration.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forResourcePrincipalConfiguration( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetResourcePrincipalConfigurationRequest, + GetResourcePrincipalConfigurationResponse> + forResourcePrincipalConfiguration( + GetResourcePrincipalConfigurationRequest request, + com.oracle.bmc.bds.model.ResourcePrincipalConfiguration.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forResourcePrincipalConfiguration( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetResourcePrincipalConfigurationRequest, + GetResourcePrincipalConfigurationResponse> + forResourcePrincipalConfiguration( + GetResourcePrincipalConfigurationRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.bds.model.ResourcePrincipalConfiguration.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forResourcePrincipalConfiguration( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for ResourcePrincipalConfiguration. + private com.oracle.bmc.waiter.Waiter< + GetResourcePrincipalConfigurationRequest, + GetResourcePrincipalConfigurationResponse> + forResourcePrincipalConfiguration( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetResourcePrincipalConfigurationRequest request, + final com.oracle.bmc.bds.model.ResourcePrincipalConfiguration.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetResourcePrincipalConfigurationRequest, + GetResourcePrincipalConfigurationResponse>() { + @Override + public GetResourcePrincipalConfigurationResponse apply( + GetResourcePrincipalConfigurationRequest request) { + return client.getResourcePrincipalConfiguration(request); + } + }, + new java.util.function.Predicate< + GetResourcePrincipalConfigurationResponse>() { + @Override + public boolean test( + GetResourcePrincipalConfigurationResponse response) { + return targetStatesSet.contains( + response.getResourcePrincipalConfiguration() + .getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.bds.model.ResourcePrincipalConfiguration + .LifecycleState.Deleted)), + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using default configuration. * diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/internal/http/CreateResourcePrincipalConfigurationConverter.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/internal/http/CreateResourcePrincipalConfigurationConverter.java new file mode 100644 index 00000000000..7ec0b2039d5 --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/internal/http/CreateResourcePrincipalConfigurationConverter.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.bds.model.*; +import com.oracle.bmc.bds.requests.*; +import com.oracle.bmc.bds.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +public class CreateResourcePrincipalConfigurationConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateResourcePrincipalConfigurationConverter.class); + + public static com.oracle.bmc.bds.requests.CreateResourcePrincipalConfigurationRequest + interceptRequest( + com.oracle.bmc.bds.requests.CreateResourcePrincipalConfigurationRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.bds.requests.CreateResourcePrincipalConfigurationRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getBdsInstanceId(), "bdsInstanceId must not be blank"); + Validate.notNull( + request.getCreateResourcePrincipalConfigurationDetails(), + "createResourcePrincipalConfigurationDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190531") + .path("bdsInstances") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getBdsInstanceId())) + .path("resourcePrincipalConfigurations"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses.CreateResourcePrincipalConfigurationResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses.CreateResourcePrincipalConfigurationResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses.CreateResourcePrincipalConfigurationResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses + .CreateResourcePrincipalConfigurationResponse>() { + @Override + public com.oracle.bmc.bds.responses + .CreateResourcePrincipalConfigurationResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.bds.responses.CreateResourcePrincipalConfigurationResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.bds.responses + .CreateResourcePrincipalConfigurationResponse + .Builder + builder = + com.oracle.bmc.bds.responses + .CreateResourcePrincipalConfigurationResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.bds.responses + .CreateResourcePrincipalConfigurationResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/internal/http/ForceRefreshResourcePrincipalConverter.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/internal/http/ForceRefreshResourcePrincipalConverter.java new file mode 100644 index 00000000000..402ea23bed1 --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/internal/http/ForceRefreshResourcePrincipalConverter.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.bds.model.*; +import com.oracle.bmc.bds.requests.*; +import com.oracle.bmc.bds.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +public class ForceRefreshResourcePrincipalConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ForceRefreshResourcePrincipalConverter.class); + + public static com.oracle.bmc.bds.requests.ForceRefreshResourcePrincipalRequest interceptRequest( + com.oracle.bmc.bds.requests.ForceRefreshResourcePrincipalRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.bds.requests.ForceRefreshResourcePrincipalRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getBdsInstanceId(), "bdsInstanceId must not be blank"); + Validate.notBlank( + request.getResourcePrincipalConfigurationId(), + "resourcePrincipalConfigurationId must not be blank"); + Validate.notNull( + request.getForceRefreshResourcePrincipalDetails(), + "forceRefreshResourcePrincipalDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190531") + .path("bdsInstances") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getBdsInstanceId())) + .path("resourcePrincipalConfigurations") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getResourcePrincipalConfigurationId())) + .path("actions") + .path("forceRefreshResourcePrincipal"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses.ForceRefreshResourcePrincipalResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses.ForceRefreshResourcePrincipalResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses.ForceRefreshResourcePrincipalResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses + .ForceRefreshResourcePrincipalResponse>() { + @Override + public com.oracle.bmc.bds.responses + .ForceRefreshResourcePrincipalResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.bds.responses.ForceRefreshResourcePrincipalResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.bds.responses.ForceRefreshResourcePrincipalResponse + .Builder + builder = + com.oracle.bmc.bds.responses + .ForceRefreshResourcePrincipalResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.bds.responses.ForceRefreshResourcePrincipalResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/internal/http/GetResourcePrincipalConfigurationConverter.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/internal/http/GetResourcePrincipalConfigurationConverter.java new file mode 100644 index 00000000000..e34a255ee39 --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/internal/http/GetResourcePrincipalConfigurationConverter.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.bds.model.*; +import com.oracle.bmc.bds.requests.*; +import com.oracle.bmc.bds.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +public class GetResourcePrincipalConfigurationConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetResourcePrincipalConfigurationConverter.class); + + public static com.oracle.bmc.bds.requests.GetResourcePrincipalConfigurationRequest + interceptRequest( + com.oracle.bmc.bds.requests.GetResourcePrincipalConfigurationRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.bds.requests.GetResourcePrincipalConfigurationRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getBdsInstanceId(), "bdsInstanceId must not be blank"); + Validate.notBlank( + request.getResourcePrincipalConfigurationId(), + "resourcePrincipalConfigurationId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190531") + .path("bdsInstances") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getBdsInstanceId())) + .path("resourcePrincipalConfigurations") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getResourcePrincipalConfigurationId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses.GetResourcePrincipalConfigurationResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses.GetResourcePrincipalConfigurationResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses.GetResourcePrincipalConfigurationResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses + .GetResourcePrincipalConfigurationResponse>() { + @Override + public com.oracle.bmc.bds.responses + .GetResourcePrincipalConfigurationResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.bds.responses.GetResourcePrincipalConfigurationResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.bds.model + .ResourcePrincipalConfiguration>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.bds.model + .ResourcePrincipalConfiguration + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.bds.model + .ResourcePrincipalConfiguration + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.bds.model + .ResourcePrincipalConfiguration> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.bds.responses + .GetResourcePrincipalConfigurationResponse.Builder + builder = + com.oracle.bmc.bds.responses + .GetResourcePrincipalConfigurationResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.resourcePrincipalConfiguration(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.bds.responses + .GetResourcePrincipalConfigurationResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/internal/http/ListResourcePrincipalConfigurationsConverter.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/internal/http/ListResourcePrincipalConfigurationsConverter.java new file mode 100644 index 00000000000..62224561aaa --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/internal/http/ListResourcePrincipalConfigurationsConverter.java @@ -0,0 +1,207 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.bds.model.*; +import com.oracle.bmc.bds.requests.*; +import com.oracle.bmc.bds.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +public class ListResourcePrincipalConfigurationsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListResourcePrincipalConfigurationsConverter.class); + + public static com.oracle.bmc.bds.requests.ListResourcePrincipalConfigurationsRequest + interceptRequest( + com.oracle.bmc.bds.requests.ListResourcePrincipalConfigurationsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.bds.requests.ListResourcePrincipalConfigurationsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getBdsInstanceId(), "bdsInstanceId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190531") + .path("bdsInstances") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getBdsInstanceId())) + .path("resourcePrincipalConfigurations"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses.ListResourcePrincipalConfigurationsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses.ListResourcePrincipalConfigurationsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses.ListResourcePrincipalConfigurationsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses + .ListResourcePrincipalConfigurationsResponse>() { + @Override + public com.oracle.bmc.bds.responses + .ListResourcePrincipalConfigurationsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.bds.responses.ListResourcePrincipalConfigurationsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.bds.model + .ResourcePrincipalConfigurationSummary>>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.bds.model + .ResourcePrincipalConfigurationSummary>>() {}, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.bds.model + .ResourcePrincipalConfigurationSummary>>() {}); + } + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.bds.model + .ResourcePrincipalConfigurationSummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.bds.responses + .ListResourcePrincipalConfigurationsResponse.Builder + builder = + com.oracle.bmc.bds.responses + .ListResourcePrincipalConfigurationsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.items(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.bds.responses + .ListResourcePrincipalConfigurationsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/internal/http/RemoveResourcePrincipalConfigurationConverter.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/internal/http/RemoveResourcePrincipalConfigurationConverter.java new file mode 100644 index 00000000000..4cc60a158f7 --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/internal/http/RemoveResourcePrincipalConfigurationConverter.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.bds.model.*; +import com.oracle.bmc.bds.requests.*; +import com.oracle.bmc.bds.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +public class RemoveResourcePrincipalConfigurationConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RemoveResourcePrincipalConfigurationConverter.class); + + public static com.oracle.bmc.bds.requests.RemoveResourcePrincipalConfigurationRequest + interceptRequest( + com.oracle.bmc.bds.requests.RemoveResourcePrincipalConfigurationRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.bds.requests.RemoveResourcePrincipalConfigurationRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getBdsInstanceId(), "bdsInstanceId must not be blank"); + Validate.notBlank( + request.getResourcePrincipalConfigurationId(), + "resourcePrincipalConfigurationId must not be blank"); + Validate.notNull( + request.getRemoveResourcePrincipalConfigurationDetails(), + "removeResourcePrincipalConfigurationDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190531") + .path("bdsInstances") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getBdsInstanceId())) + .path("resourcePrincipalConfigurations") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getResourcePrincipalConfigurationId())) + .path("actions") + .path("remove"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses.RemoveResourcePrincipalConfigurationResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses.RemoveResourcePrincipalConfigurationResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses.RemoveResourcePrincipalConfigurationResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses + .RemoveResourcePrincipalConfigurationResponse>() { + @Override + public com.oracle.bmc.bds.responses + .RemoveResourcePrincipalConfigurationResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.bds.responses.RemoveResourcePrincipalConfigurationResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.bds.responses + .RemoveResourcePrincipalConfigurationResponse + .Builder + builder = + com.oracle.bmc.bds.responses + .RemoveResourcePrincipalConfigurationResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.bds.responses + .RemoveResourcePrincipalConfigurationResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/internal/http/UpdateResourcePrincipalConfigurationConverter.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/internal/http/UpdateResourcePrincipalConfigurationConverter.java new file mode 100644 index 00000000000..e188ba926bb --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/internal/http/UpdateResourcePrincipalConfigurationConverter.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.bds.model.*; +import com.oracle.bmc.bds.requests.*; +import com.oracle.bmc.bds.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +public class UpdateResourcePrincipalConfigurationConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateResourcePrincipalConfigurationConverter.class); + + public static com.oracle.bmc.bds.requests.UpdateResourcePrincipalConfigurationRequest + interceptRequest( + com.oracle.bmc.bds.requests.UpdateResourcePrincipalConfigurationRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.bds.requests.UpdateResourcePrincipalConfigurationRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getBdsInstanceId(), "bdsInstanceId must not be blank"); + Validate.notBlank( + request.getResourcePrincipalConfigurationId(), + "resourcePrincipalConfigurationId must not be blank"); + Validate.notNull( + request.getUpdateResourcePrincipalConfigurationDetails(), + "updateResourcePrincipalConfigurationDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190531") + .path("bdsInstances") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getBdsInstanceId())) + .path("resourcePrincipalConfigurations") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getResourcePrincipalConfigurationId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses.UpdateResourcePrincipalConfigurationResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses.UpdateResourcePrincipalConfigurationResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses.UpdateResourcePrincipalConfigurationResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.bds.responses + .UpdateResourcePrincipalConfigurationResponse>() { + @Override + public com.oracle.bmc.bds.responses + .UpdateResourcePrincipalConfigurationResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.bds.responses.UpdateResourcePrincipalConfigurationResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.bds.responses + .UpdateResourcePrincipalConfigurationResponse + .Builder + builder = + com.oracle.bmc.bds.responses + .UpdateResourcePrincipalConfigurationResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.bds.responses + .UpdateResourcePrincipalConfigurationResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/AutoScalePolicyMetricRule.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/AutoScalePolicyMetricRule.java index 8b20bdac336..948eaf29dd1 100644 --- a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/AutoScalePolicyMetricRule.java +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/AutoScalePolicyMetricRule.java @@ -32,13 +32,13 @@ public AutoScalePolicyMetricRule(MetricType metricType, MetricThresholdRule thre @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * Allowed value is CPU_UTILIZATION. + * Allowed values are CPU_UTILIZATION and MEMORY_UTILIZATION. **/ @com.fasterxml.jackson.annotation.JsonProperty("metricType") private MetricType metricType; /** - * Allowed value is CPU_UTILIZATION. + * Allowed values are CPU_UTILIZATION and MEMORY_UTILIZATION. * @param metricType the value to set * @return this builder **/ @@ -93,10 +93,11 @@ public Builder toBuilder() { } /** - * Allowed value is CPU_UTILIZATION. + * Allowed values are CPU_UTILIZATION and MEMORY_UTILIZATION. **/ public enum MetricType { CpuUtilization("CPU_UTILIZATION"), + MemoryUtilization("MEMORY_UTILIZATION"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -140,13 +141,13 @@ public static MetricType create(String key) { } }; /** - * Allowed value is CPU_UTILIZATION. + * Allowed values are CPU_UTILIZATION and MEMORY_UTILIZATION. **/ @com.fasterxml.jackson.annotation.JsonProperty("metricType") private final MetricType metricType; /** - * Allowed value is CPU_UTILIZATION. + * Allowed values are CPU_UTILIZATION and MEMORY_UTILIZATION. * @return the value **/ public MetricType getMetricType() { diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/BatchingBasedOdhPatchingConfig.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/BatchingBasedOdhPatchingConfig.java new file mode 100644 index 00000000000..5f58ac5b735 --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/BatchingBasedOdhPatchingConfig.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.model; + +/** + * Patching configurations which allows patch the nodes batch by batch. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = BatchingBasedOdhPatchingConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "patchingConfigStrategy" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class BatchingBasedOdhPatchingConfig extends OdhPatchingConfig { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * How many nodes to be patched in each iteration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("batchSize") + private Integer batchSize; + + /** + * How many nodes to be patched in each iteration. + * @param batchSize the value to set + * @return this builder + **/ + public Builder batchSize(Integer batchSize) { + this.batchSize = batchSize; + this.__explicitlySet__.add("batchSize"); + return this; + } + /** + * The wait time between batches in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("waitTimeBetweenBatchInSeconds") + private Integer waitTimeBetweenBatchInSeconds; + + /** + * The wait time between batches in seconds. + * @param waitTimeBetweenBatchInSeconds the value to set + * @return this builder + **/ + public Builder waitTimeBetweenBatchInSeconds(Integer waitTimeBetweenBatchInSeconds) { + this.waitTimeBetweenBatchInSeconds = waitTimeBetweenBatchInSeconds; + this.__explicitlySet__.add("waitTimeBetweenBatchInSeconds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BatchingBasedOdhPatchingConfig build() { + BatchingBasedOdhPatchingConfig model = + new BatchingBasedOdhPatchingConfig( + this.batchSize, this.waitTimeBetweenBatchInSeconds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BatchingBasedOdhPatchingConfig model) { + if (model.wasPropertyExplicitlySet("batchSize")) { + this.batchSize(model.getBatchSize()); + } + if (model.wasPropertyExplicitlySet("waitTimeBetweenBatchInSeconds")) { + this.waitTimeBetweenBatchInSeconds(model.getWaitTimeBetweenBatchInSeconds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public BatchingBasedOdhPatchingConfig( + Integer batchSize, Integer waitTimeBetweenBatchInSeconds) { + super(); + this.batchSize = batchSize; + this.waitTimeBetweenBatchInSeconds = waitTimeBetweenBatchInSeconds; + } + + /** + * How many nodes to be patched in each iteration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("batchSize") + private final Integer batchSize; + + /** + * How many nodes to be patched in each iteration. + * @return the value + **/ + public Integer getBatchSize() { + return batchSize; + } + + /** + * The wait time between batches in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("waitTimeBetweenBatchInSeconds") + private final Integer waitTimeBetweenBatchInSeconds; + + /** + * The wait time between batches in seconds. + * @return the value + **/ + public Integer getWaitTimeBetweenBatchInSeconds() { + return waitTimeBetweenBatchInSeconds; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BatchingBasedOdhPatchingConfig("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", batchSize=").append(String.valueOf(this.batchSize)); + sb.append(", waitTimeBetweenBatchInSeconds=") + .append(String.valueOf(this.waitTimeBetweenBatchInSeconds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BatchingBasedOdhPatchingConfig)) { + return false; + } + + BatchingBasedOdhPatchingConfig other = (BatchingBasedOdhPatchingConfig) o; + return java.util.Objects.equals(this.batchSize, other.batchSize) + && java.util.Objects.equals( + this.waitTimeBetweenBatchInSeconds, other.waitTimeBetweenBatchInSeconds) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.batchSize == null ? 43 : this.batchSize.hashCode()); + result = + (result * PRIME) + + (this.waitTimeBetweenBatchInSeconds == null + ? 43 + : this.waitTimeBetweenBatchInSeconds.hashCode()); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/BatchingBasedPatchingConfigs.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/BatchingBasedPatchingConfigs.java index c5053d65f8d..ba81e73e18b 100644 --- a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/BatchingBasedPatchingConfigs.java +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/BatchingBasedPatchingConfigs.java @@ -5,7 +5,7 @@ package com.oracle.bmc.bds.model; /** - * Patching configurations which allows patch the nodes batch by batch. + * Configuration that applies the patch in batches, the batch size is a user defined parameter. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/CreateResourcePrincipalConfigurationDetails.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/CreateResourcePrincipalConfigurationDetails.java new file mode 100644 index 00000000000..bdbcb59bed0 --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/CreateResourcePrincipalConfigurationDetails.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.model; + +/** + * Details of creating a resource principal configuration for the cluster. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateResourcePrincipalConfigurationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateResourcePrincipalConfigurationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "clusterAdminPassword", + "sessionTokenLifeSpanDurationInHours" + }) + public CreateResourcePrincipalConfigurationDetails( + String displayName, + String clusterAdminPassword, + Integer sessionTokenLifeSpanDurationInHours) { + super(); + this.displayName = displayName; + this.clusterAdminPassword = clusterAdminPassword; + this.sessionTokenLifeSpanDurationInHours = sessionTokenLifeSpanDurationInHours; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Base-64 encoded Cluster Admin Password for cluster admin user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterAdminPassword") + private String clusterAdminPassword; + + /** + * Base-64 encoded Cluster Admin Password for cluster admin user. + * @param clusterAdminPassword the value to set + * @return this builder + **/ + public Builder clusterAdminPassword(String clusterAdminPassword) { + this.clusterAdminPassword = clusterAdminPassword; + this.__explicitlySet__.add("clusterAdminPassword"); + return this; + } + /** + * Life span in hours for the resource principal session token. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sessionTokenLifeSpanDurationInHours") + private Integer sessionTokenLifeSpanDurationInHours; + + /** + * Life span in hours for the resource principal session token. + * @param sessionTokenLifeSpanDurationInHours the value to set + * @return this builder + **/ + public Builder sessionTokenLifeSpanDurationInHours( + Integer sessionTokenLifeSpanDurationInHours) { + this.sessionTokenLifeSpanDurationInHours = sessionTokenLifeSpanDurationInHours; + this.__explicitlySet__.add("sessionTokenLifeSpanDurationInHours"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateResourcePrincipalConfigurationDetails build() { + CreateResourcePrincipalConfigurationDetails model = + new CreateResourcePrincipalConfigurationDetails( + this.displayName, + this.clusterAdminPassword, + this.sessionTokenLifeSpanDurationInHours); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateResourcePrincipalConfigurationDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("clusterAdminPassword")) { + this.clusterAdminPassword(model.getClusterAdminPassword()); + } + if (model.wasPropertyExplicitlySet("sessionTokenLifeSpanDurationInHours")) { + this.sessionTokenLifeSpanDurationInHours( + model.getSessionTokenLifeSpanDurationInHours()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Base-64 encoded Cluster Admin Password for cluster admin user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterAdminPassword") + private final String clusterAdminPassword; + + /** + * Base-64 encoded Cluster Admin Password for cluster admin user. + * @return the value + **/ + public String getClusterAdminPassword() { + return clusterAdminPassword; + } + + /** + * Life span in hours for the resource principal session token. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sessionTokenLifeSpanDurationInHours") + private final Integer sessionTokenLifeSpanDurationInHours; + + /** + * Life span in hours for the resource principal session token. + * @return the value + **/ + public Integer getSessionTokenLifeSpanDurationInHours() { + return sessionTokenLifeSpanDurationInHours; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateResourcePrincipalConfigurationDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", clusterAdminPassword=").append(""); + sb.append(", sessionTokenLifeSpanDurationInHours=") + .append(String.valueOf(this.sessionTokenLifeSpanDurationInHours)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateResourcePrincipalConfigurationDetails)) { + return false; + } + + CreateResourcePrincipalConfigurationDetails other = + (CreateResourcePrincipalConfigurationDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.clusterAdminPassword, other.clusterAdminPassword) + && java.util.Objects.equals( + this.sessionTokenLifeSpanDurationInHours, + other.sessionTokenLifeSpanDurationInHours) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.clusterAdminPassword == null + ? 43 + : this.clusterAdminPassword.hashCode()); + result = + (result * PRIME) + + (this.sessionTokenLifeSpanDurationInHours == null + ? 43 + : this.sessionTokenLifeSpanDurationInHours.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/DomainBasedOdhPatchingConfig.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/DomainBasedOdhPatchingConfig.java new file mode 100644 index 00000000000..0ba3cd89975 --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/DomainBasedOdhPatchingConfig.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.model; + +/** + * This patching config will patch all nodes in one AD/FD at a time. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DomainBasedOdhPatchingConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "patchingConfigStrategy" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DomainBasedOdhPatchingConfig extends OdhPatchingConfig { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The wait time between AD/FD in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("waitTimeBetweenDomainInSeconds") + private Integer waitTimeBetweenDomainInSeconds; + + /** + * The wait time between AD/FD in seconds. + * @param waitTimeBetweenDomainInSeconds the value to set + * @return this builder + **/ + public Builder waitTimeBetweenDomainInSeconds(Integer waitTimeBetweenDomainInSeconds) { + this.waitTimeBetweenDomainInSeconds = waitTimeBetweenDomainInSeconds; + this.__explicitlySet__.add("waitTimeBetweenDomainInSeconds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DomainBasedOdhPatchingConfig build() { + DomainBasedOdhPatchingConfig model = + new DomainBasedOdhPatchingConfig(this.waitTimeBetweenDomainInSeconds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DomainBasedOdhPatchingConfig model) { + if (model.wasPropertyExplicitlySet("waitTimeBetweenDomainInSeconds")) { + this.waitTimeBetweenDomainInSeconds(model.getWaitTimeBetweenDomainInSeconds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DomainBasedOdhPatchingConfig(Integer waitTimeBetweenDomainInSeconds) { + super(); + this.waitTimeBetweenDomainInSeconds = waitTimeBetweenDomainInSeconds; + } + + /** + * The wait time between AD/FD in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("waitTimeBetweenDomainInSeconds") + private final Integer waitTimeBetweenDomainInSeconds; + + /** + * The wait time between AD/FD in seconds. + * @return the value + **/ + public Integer getWaitTimeBetweenDomainInSeconds() { + return waitTimeBetweenDomainInSeconds; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DomainBasedOdhPatchingConfig("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", waitTimeBetweenDomainInSeconds=") + .append(String.valueOf(this.waitTimeBetweenDomainInSeconds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DomainBasedOdhPatchingConfig)) { + return false; + } + + DomainBasedOdhPatchingConfig other = (DomainBasedOdhPatchingConfig) o; + return java.util.Objects.equals( + this.waitTimeBetweenDomainInSeconds, other.waitTimeBetweenDomainInSeconds) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.waitTimeBetweenDomainInSeconds == null + ? 43 + : this.waitTimeBetweenDomainInSeconds.hashCode()); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/DomainBasedPatchingConfigs.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/DomainBasedPatchingConfigs.java new file mode 100644 index 00000000000..d28307b01b5 --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/DomainBasedPatchingConfigs.java @@ -0,0 +1,190 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.model; + +/** + * This patching config will patch all nodes in one AD/FD at a time. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DomainBasedPatchingConfigs.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "patchingConfigStrategy" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DomainBasedPatchingConfigs extends PatchingConfigs { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The wait time between AD/FD in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("waitTimeBetweenDomainInSeconds") + private Integer waitTimeBetweenDomainInSeconds; + + /** + * The wait time between AD/FD in seconds. + * @param waitTimeBetweenDomainInSeconds the value to set + * @return this builder + **/ + public Builder waitTimeBetweenDomainInSeconds(Integer waitTimeBetweenDomainInSeconds) { + this.waitTimeBetweenDomainInSeconds = waitTimeBetweenDomainInSeconds; + this.__explicitlySet__.add("waitTimeBetweenDomainInSeconds"); + return this; + } + /** + * Acceptable number of failed-to-be-patched nodes in each domain. The maximum number of failed-to-patch nodes cannot exceed 20% of the number of nodes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("toleranceThresholdPerDomain") + private Integer toleranceThresholdPerDomain; + + /** + * Acceptable number of failed-to-be-patched nodes in each domain. The maximum number of failed-to-patch nodes cannot exceed 20% of the number of nodes. + * @param toleranceThresholdPerDomain the value to set + * @return this builder + **/ + public Builder toleranceThresholdPerDomain(Integer toleranceThresholdPerDomain) { + this.toleranceThresholdPerDomain = toleranceThresholdPerDomain; + this.__explicitlySet__.add("toleranceThresholdPerDomain"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DomainBasedPatchingConfigs build() { + DomainBasedPatchingConfigs model = + new DomainBasedPatchingConfigs( + this.waitTimeBetweenDomainInSeconds, this.toleranceThresholdPerDomain); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DomainBasedPatchingConfigs model) { + if (model.wasPropertyExplicitlySet("waitTimeBetweenDomainInSeconds")) { + this.waitTimeBetweenDomainInSeconds(model.getWaitTimeBetweenDomainInSeconds()); + } + if (model.wasPropertyExplicitlySet("toleranceThresholdPerDomain")) { + this.toleranceThresholdPerDomain(model.getToleranceThresholdPerDomain()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DomainBasedPatchingConfigs( + Integer waitTimeBetweenDomainInSeconds, Integer toleranceThresholdPerDomain) { + super(); + this.waitTimeBetweenDomainInSeconds = waitTimeBetweenDomainInSeconds; + this.toleranceThresholdPerDomain = toleranceThresholdPerDomain; + } + + /** + * The wait time between AD/FD in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("waitTimeBetweenDomainInSeconds") + private final Integer waitTimeBetweenDomainInSeconds; + + /** + * The wait time between AD/FD in seconds. + * @return the value + **/ + public Integer getWaitTimeBetweenDomainInSeconds() { + return waitTimeBetweenDomainInSeconds; + } + + /** + * Acceptable number of failed-to-be-patched nodes in each domain. The maximum number of failed-to-patch nodes cannot exceed 20% of the number of nodes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("toleranceThresholdPerDomain") + private final Integer toleranceThresholdPerDomain; + + /** + * Acceptable number of failed-to-be-patched nodes in each domain. The maximum number of failed-to-patch nodes cannot exceed 20% of the number of nodes. + * @return the value + **/ + public Integer getToleranceThresholdPerDomain() { + return toleranceThresholdPerDomain; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DomainBasedPatchingConfigs("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", waitTimeBetweenDomainInSeconds=") + .append(String.valueOf(this.waitTimeBetweenDomainInSeconds)); + sb.append(", toleranceThresholdPerDomain=") + .append(String.valueOf(this.toleranceThresholdPerDomain)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DomainBasedPatchingConfigs)) { + return false; + } + + DomainBasedPatchingConfigs other = (DomainBasedPatchingConfigs) o; + return java.util.Objects.equals( + this.waitTimeBetweenDomainInSeconds, other.waitTimeBetweenDomainInSeconds) + && java.util.Objects.equals( + this.toleranceThresholdPerDomain, other.toleranceThresholdPerDomain) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.waitTimeBetweenDomainInSeconds == null + ? 43 + : this.waitTimeBetweenDomainInSeconds.hashCode()); + result = + (result * PRIME) + + (this.toleranceThresholdPerDomain == null + ? 43 + : this.toleranceThresholdPerDomain.hashCode()); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/DowntimeBasedOdhPatchingConfig.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/DowntimeBasedOdhPatchingConfig.java new file mode 100644 index 00000000000..7f3a74e0d8a --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/DowntimeBasedOdhPatchingConfig.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.model; + +/** + * Patching configurations which allows downtime. This patching config will patch all the nodes in parallel. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DowntimeBasedOdhPatchingConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "patchingConfigStrategy" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DowntimeBasedOdhPatchingConfig extends OdhPatchingConfig { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DowntimeBasedOdhPatchingConfig build() { + DowntimeBasedOdhPatchingConfig model = new DowntimeBasedOdhPatchingConfig(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DowntimeBasedOdhPatchingConfig model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DowntimeBasedOdhPatchingConfig() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DowntimeBasedOdhPatchingConfig("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DowntimeBasedOdhPatchingConfig)) { + return false; + } + + DowntimeBasedOdhPatchingConfig other = (DowntimeBasedOdhPatchingConfig) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/ForceRefreshResourcePrincipalDetails.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/ForceRefreshResourcePrincipalDetails.java new file mode 100644 index 00000000000..56a7638a6bc --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/ForceRefreshResourcePrincipalDetails.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.model; + +/** + * Force Refresh Resource Principal Session Token Details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ForceRefreshResourcePrincipalDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ForceRefreshResourcePrincipalDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"clusterAdminPassword"}) + public ForceRefreshResourcePrincipalDetails(String clusterAdminPassword) { + super(); + this.clusterAdminPassword = clusterAdminPassword; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Base-64 encoded Cluster Admin Password for cluster admin user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterAdminPassword") + private String clusterAdminPassword; + + /** + * Base-64 encoded Cluster Admin Password for cluster admin user. + * @param clusterAdminPassword the value to set + * @return this builder + **/ + public Builder clusterAdminPassword(String clusterAdminPassword) { + this.clusterAdminPassword = clusterAdminPassword; + this.__explicitlySet__.add("clusterAdminPassword"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ForceRefreshResourcePrincipalDetails build() { + ForceRefreshResourcePrincipalDetails model = + new ForceRefreshResourcePrincipalDetails(this.clusterAdminPassword); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ForceRefreshResourcePrincipalDetails model) { + if (model.wasPropertyExplicitlySet("clusterAdminPassword")) { + this.clusterAdminPassword(model.getClusterAdminPassword()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Base-64 encoded Cluster Admin Password for cluster admin user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterAdminPassword") + private final String clusterAdminPassword; + + /** + * Base-64 encoded Cluster Admin Password for cluster admin user. + * @return the value + **/ + public String getClusterAdminPassword() { + return clusterAdminPassword; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ForceRefreshResourcePrincipalDetails("); + sb.append("super=").append(super.toString()); + sb.append("clusterAdminPassword=").append(""); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ForceRefreshResourcePrincipalDetails)) { + return false; + } + + ForceRefreshResourcePrincipalDetails other = (ForceRefreshResourcePrincipalDetails) o; + return java.util.Objects.equals(this.clusterAdminPassword, other.clusterAdminPassword) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.clusterAdminPassword == null + ? 43 + : this.clusterAdminPassword.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/InstallPatchDetails.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/InstallPatchDetails.java index dc1e15826c5..46f40dd11e3 100644 --- a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/InstallPatchDetails.java +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/InstallPatchDetails.java @@ -21,11 +21,13 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class InstallPatchDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"version", "clusterAdminPassword"}) - public InstallPatchDetails(String version, String clusterAdminPassword) { + @java.beans.ConstructorProperties({"version", "clusterAdminPassword", "patchingConfig"}) + public InstallPatchDetails( + String version, String clusterAdminPassword, OdhPatchingConfig patchingConfig) { super(); this.version = version; this.clusterAdminPassword = clusterAdminPassword; + this.patchingConfig = patchingConfig; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -63,12 +65,22 @@ public Builder clusterAdminPassword(String clusterAdminPassword) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("patchingConfig") + private OdhPatchingConfig patchingConfig; + + public Builder patchingConfig(OdhPatchingConfig patchingConfig) { + this.patchingConfig = patchingConfig; + this.__explicitlySet__.add("patchingConfig"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public InstallPatchDetails build() { InstallPatchDetails model = - new InstallPatchDetails(this.version, this.clusterAdminPassword); + new InstallPatchDetails( + this.version, this.clusterAdminPassword, this.patchingConfig); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -83,6 +95,9 @@ public Builder copy(InstallPatchDetails model) { if (model.wasPropertyExplicitlySet("clusterAdminPassword")) { this.clusterAdminPassword(model.getClusterAdminPassword()); } + if (model.wasPropertyExplicitlySet("patchingConfig")) { + this.patchingConfig(model.getPatchingConfig()); + } return this; } } @@ -126,6 +141,13 @@ public String getClusterAdminPassword() { return clusterAdminPassword; } + @com.fasterxml.jackson.annotation.JsonProperty("patchingConfig") + private final OdhPatchingConfig patchingConfig; + + public OdhPatchingConfig getPatchingConfig() { + return patchingConfig; + } + @Override public String toString() { return this.toString(true); @@ -142,6 +164,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("version=").append(String.valueOf(this.version)); sb.append(", clusterAdminPassword=").append(""); + sb.append(", patchingConfig=").append(String.valueOf(this.patchingConfig)); sb.append(")"); return sb.toString(); } @@ -158,6 +181,7 @@ public boolean equals(Object o) { InstallPatchDetails other = (InstallPatchDetails) o; return java.util.Objects.equals(this.version, other.version) && java.util.Objects.equals(this.clusterAdminPassword, other.clusterAdminPassword) + && java.util.Objects.equals(this.patchingConfig, other.patchingConfig) && super.equals(other); } @@ -171,6 +195,9 @@ public int hashCode() { + (this.clusterAdminPassword == null ? 43 : this.clusterAdminPassword.hashCode()); + result = + (result * PRIME) + + (this.patchingConfig == null ? 43 : this.patchingConfig.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/Node.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/Node.java index 9249f785565..f13aa92daa9 100644 --- a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/Node.java +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/Node.java @@ -42,6 +42,7 @@ public final class Node extends com.oracle.bmc.http.internal.ExplicitlySetBmcMod "timeMaintenanceRebootDue", "osVersion", "isRebootRequired", + "odhVersion", "timeReplaced", "nodeBackupId" }) @@ -68,6 +69,7 @@ public Node( java.util.Date timeMaintenanceRebootDue, String osVersion, Boolean isRebootRequired, + String odhVersion, java.util.Date timeReplaced, String nodeBackupId) { super(); @@ -93,6 +95,7 @@ public Node( this.timeMaintenanceRebootDue = timeMaintenanceRebootDue; this.osVersion = osVersion; this.isRebootRequired = isRebootRequired; + this.odhVersion = odhVersion; this.timeReplaced = timeReplaced; this.nodeBackupId = nodeBackupId; } @@ -452,6 +455,22 @@ public Builder isRebootRequired(Boolean isRebootRequired) { this.__explicitlySet__.add("isRebootRequired"); return this; } + /** + * Version of the ODH (Oracle Distribution including Apache Hadoop) for the node. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("odhVersion") + private String odhVersion; + + /** + * Version of the ODH (Oracle Distribution including Apache Hadoop) for the node. + * @param odhVersion the value to set + * @return this builder + **/ + public Builder odhVersion(String odhVersion) { + this.odhVersion = odhVersion; + this.__explicitlySet__.add("odhVersion"); + return this; + } /** * The date and time the instance was replaced by a new vm with a node backup. **/ @@ -513,6 +532,7 @@ public Node build() { this.timeMaintenanceRebootDue, this.osVersion, this.isRebootRequired, + this.odhVersion, this.timeReplaced, this.nodeBackupId); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -589,6 +609,9 @@ public Builder copy(Node model) { if (model.wasPropertyExplicitlySet("isRebootRequired")) { this.isRebootRequired(model.getIsRebootRequired()); } + if (model.wasPropertyExplicitlySet("odhVersion")) { + this.odhVersion(model.getOdhVersion()); + } if (model.wasPropertyExplicitlySet("timeReplaced")) { this.timeReplaced(model.getTimeReplaced()); } @@ -1028,6 +1051,20 @@ public Boolean getIsRebootRequired() { return isRebootRequired; } + /** + * Version of the ODH (Oracle Distribution including Apache Hadoop) for the node. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("odhVersion") + private final String odhVersion; + + /** + * Version of the ODH (Oracle Distribution including Apache Hadoop) for the node. + * @return the value + **/ + public String getOdhVersion() { + return odhVersion; + } + /** * The date and time the instance was replaced by a new vm with a node backup. **/ @@ -1094,6 +1131,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.timeMaintenanceRebootDue)); sb.append(", osVersion=").append(String.valueOf(this.osVersion)); sb.append(", isRebootRequired=").append(String.valueOf(this.isRebootRequired)); + sb.append(", odhVersion=").append(String.valueOf(this.odhVersion)); sb.append(", timeReplaced=").append(String.valueOf(this.timeReplaced)); sb.append(", nodeBackupId=").append(String.valueOf(this.nodeBackupId)); sb.append(")"); @@ -1134,6 +1172,7 @@ public boolean equals(Object o) { this.timeMaintenanceRebootDue, other.timeMaintenanceRebootDue) && java.util.Objects.equals(this.osVersion, other.osVersion) && java.util.Objects.equals(this.isRebootRequired, other.isRebootRequired) + && java.util.Objects.equals(this.odhVersion, other.odhVersion) && java.util.Objects.equals(this.timeReplaced, other.timeReplaced) && java.util.Objects.equals(this.nodeBackupId, other.nodeBackupId) && super.equals(other); @@ -1187,6 +1226,7 @@ public int hashCode() { result = (result * PRIME) + (this.isRebootRequired == null ? 43 : this.isRebootRequired.hashCode()); + result = (result * PRIME) + (this.odhVersion == null ? 43 : this.odhVersion.hashCode()); result = (result * PRIME) + (this.timeReplaced == null ? 43 : this.timeReplaced.hashCode()); result = (result * PRIME) + (this.nodeBackupId == null ? 43 : this.nodeBackupId.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/OdhPatchingConfig.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/OdhPatchingConfig.java new file mode 100644 index 00000000000..4b4f1e0f95d --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/OdhPatchingConfig.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.model; + +/** + * Detailed configurations for defining the behavior when installing ODH patches. If not provided, nodes will be patched with down time. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "patchingConfigStrategy", + defaultImpl = OdhPatchingConfig.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DowntimeBasedOdhPatchingConfig.class, + name = "DOWNTIME_BASED" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DomainBasedOdhPatchingConfig.class, + name = "DOMAIN_BASED" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = BatchingBasedOdhPatchingConfig.class, + name = "BATCHING_BASED" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class OdhPatchingConfig extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected OdhPatchingConfig() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OdhPatchingConfig("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OdhPatchingConfig)) { + return false; + } + + OdhPatchingConfig other = (OdhPatchingConfig) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Type of strategy used for detailed patching configuration + **/ + public enum PatchingConfigStrategy { + DowntimeBased("DOWNTIME_BASED"), + BatchingBased("BATCHING_BASED"), + DomainBased("DOMAIN_BASED"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PatchingConfigStrategy v : PatchingConfigStrategy.values()) { + map.put(v.getValue(), v); + } + } + + PatchingConfigStrategy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PatchingConfigStrategy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid PatchingConfigStrategy: " + key); + } + }; +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/OperationTypes.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/OperationTypes.java index cd58cd9cb3d..70e3cff0627 100644 --- a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/OperationTypes.java +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/OperationTypes.java @@ -54,6 +54,10 @@ public enum OperationTypes { BackupNodes("BACKUP_NODES"), DeleteNodeBackup("DELETE_NODE_BACKUP"), ReplaceNode("REPLACE_NODE"), + CreateResourcePrincipalConfiguration("CREATE_RESOURCE_PRINCIPAL_CONFIGURATION"), + DeleteResourcePrincipalConfiguration("DELETE_RESOURCE_PRINCIPAL_CONFIGURATION"), + UpdateResourcePrincipalConfiguration("UPDATE_RESOURCE_PRINCIPAL_CONFIGURATION"), + RefreshResourcePrincipal("REFRESH_RESOURCE_PRINCIPAL"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/PatchingConfigs.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/PatchingConfigs.java index 82233cc96c2..7ea66b8c061 100644 --- a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/PatchingConfigs.java +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/PatchingConfigs.java @@ -5,7 +5,7 @@ package com.oracle.bmc.bds.model; /** - * Detailed configurations for defining the behavior when installing os patches. If not provided, nodes will be patched and rebooted AD/FD by AD/FD. + * Detailed configurations for defining the behavior when installing os patches. If not provided, nodes will be patched and rebooted AD/FD by AD/FD for regular patches or will be patched with down time if the patch is an emergent patch. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -29,6 +29,10 @@ @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = DowntimeBasedPatchingConfigs.class, name = "DOWNTIME_BASED" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DomainBasedPatchingConfigs.class, + name = "DOMAIN_BASED" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) @@ -84,6 +88,7 @@ public int hashCode() { public enum PatchingConfigStrategy { DowntimeBased("DOWNTIME_BASED"), BatchingBased("BATCHING_BASED"), + DomainBased("DOMAIN_BASED"), ; private final String value; diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/RemoveResourcePrincipalConfigurationDetails.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/RemoveResourcePrincipalConfigurationDetails.java new file mode 100644 index 00000000000..4d8e708417e --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/RemoveResourcePrincipalConfigurationDetails.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.model; + +/** + * Details of removing a resource principal configuration for the cluster. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RemoveResourcePrincipalConfigurationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RemoveResourcePrincipalConfigurationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"clusterAdminPassword"}) + public RemoveResourcePrincipalConfigurationDetails(String clusterAdminPassword) { + super(); + this.clusterAdminPassword = clusterAdminPassword; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Base-64 encoded Cluster Admin Password for cluster admin user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterAdminPassword") + private String clusterAdminPassword; + + /** + * Base-64 encoded Cluster Admin Password for cluster admin user. + * @param clusterAdminPassword the value to set + * @return this builder + **/ + public Builder clusterAdminPassword(String clusterAdminPassword) { + this.clusterAdminPassword = clusterAdminPassword; + this.__explicitlySet__.add("clusterAdminPassword"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RemoveResourcePrincipalConfigurationDetails build() { + RemoveResourcePrincipalConfigurationDetails model = + new RemoveResourcePrincipalConfigurationDetails(this.clusterAdminPassword); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RemoveResourcePrincipalConfigurationDetails model) { + if (model.wasPropertyExplicitlySet("clusterAdminPassword")) { + this.clusterAdminPassword(model.getClusterAdminPassword()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Base-64 encoded Cluster Admin Password for cluster admin user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterAdminPassword") + private final String clusterAdminPassword; + + /** + * Base-64 encoded Cluster Admin Password for cluster admin user. + * @return the value + **/ + public String getClusterAdminPassword() { + return clusterAdminPassword; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RemoveResourcePrincipalConfigurationDetails("); + sb.append("super=").append(super.toString()); + sb.append("clusterAdminPassword=").append(""); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveResourcePrincipalConfigurationDetails)) { + return false; + } + + RemoveResourcePrincipalConfigurationDetails other = + (RemoveResourcePrincipalConfigurationDetails) o; + return java.util.Objects.equals(this.clusterAdminPassword, other.clusterAdminPassword) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.clusterAdminPassword == null + ? 43 + : this.clusterAdminPassword.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/ResourcePrincipalConfiguration.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/ResourcePrincipalConfiguration.java new file mode 100644 index 00000000000..832e929ebf3 --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/ResourcePrincipalConfiguration.java @@ -0,0 +1,536 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.model; + +/** + * Resource Principal Session Token Details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ResourcePrincipalConfiguration.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ResourcePrincipalConfiguration + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "bdsInstanceId", + "displayName", + "sessionTokenLifeSpanDurationInHours", + "lifecycleState", + "timeTokenRefreshed", + "timeTokenExpiry", + "timeCreated", + "timeUpdated" + }) + public ResourcePrincipalConfiguration( + String id, + String bdsInstanceId, + String displayName, + Integer sessionTokenLifeSpanDurationInHours, + LifecycleState lifecycleState, + java.util.Date timeTokenRefreshed, + java.util.Date timeTokenExpiry, + java.util.Date timeCreated, + java.util.Date timeUpdated) { + super(); + this.id = id; + this.bdsInstanceId = bdsInstanceId; + this.displayName = displayName; + this.sessionTokenLifeSpanDurationInHours = sessionTokenLifeSpanDurationInHours; + this.lifecycleState = lifecycleState; + this.timeTokenRefreshed = timeTokenRefreshed; + this.timeTokenExpiry = timeTokenExpiry; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The id of the ResourcePrincipalConfiguration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The id of the ResourcePrincipalConfiguration. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The OCID of the bdsInstance which is the parent resource id. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bdsInstanceId") + private String bdsInstanceId; + + /** + * The OCID of the bdsInstance which is the parent resource id. + * @param bdsInstanceId the value to set + * @return this builder + **/ + public Builder bdsInstanceId(String bdsInstanceId) { + this.bdsInstanceId = bdsInstanceId; + this.__explicitlySet__.add("bdsInstanceId"); + return this; + } + /** + * A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Life span in hours of each resource principal session token. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sessionTokenLifeSpanDurationInHours") + private Integer sessionTokenLifeSpanDurationInHours; + + /** + * Life span in hours of each resource principal session token. + * @param sessionTokenLifeSpanDurationInHours the value to set + * @return this builder + **/ + public Builder sessionTokenLifeSpanDurationInHours( + Integer sessionTokenLifeSpanDurationInHours) { + this.sessionTokenLifeSpanDurationInHours = sessionTokenLifeSpanDurationInHours; + this.__explicitlySet__.add("sessionTokenLifeSpanDurationInHours"); + return this; + } + /** + * The state of the ResourcePrincipalConfiguration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The state of the ResourcePrincipalConfiguration. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * the time the resource principal session token was refreshed, shown as an rfc 3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeTokenRefreshed") + private java.util.Date timeTokenRefreshed; + + /** + * the time the resource principal session token was refreshed, shown as an rfc 3339 formatted datetime string. + * @param timeTokenRefreshed the value to set + * @return this builder + **/ + public Builder timeTokenRefreshed(java.util.Date timeTokenRefreshed) { + this.timeTokenRefreshed = timeTokenRefreshed; + this.__explicitlySet__.add("timeTokenRefreshed"); + return this; + } + /** + * the time the resource principal session token will expired, shown as an rfc 3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeTokenExpiry") + private java.util.Date timeTokenExpiry; + + /** + * the time the resource principal session token will expired, shown as an rfc 3339 formatted datetime string. + * @param timeTokenExpiry the value to set + * @return this builder + **/ + public Builder timeTokenExpiry(java.util.Date timeTokenExpiry) { + this.timeTokenExpiry = timeTokenExpiry; + this.__explicitlySet__.add("timeTokenExpiry"); + return this; + } + /** + * The time the ResourcePrincipalConfiguration was created, shown as an RFC 3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time the ResourcePrincipalConfiguration was created, shown as an RFC 3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time the ResourcePrincipalConfiguration was updated, shown as an RFC 3339 formatted datetime string. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time the ResourcePrincipalConfiguration was updated, shown as an RFC 3339 formatted datetime string. + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ResourcePrincipalConfiguration build() { + ResourcePrincipalConfiguration model = + new ResourcePrincipalConfiguration( + this.id, + this.bdsInstanceId, + this.displayName, + this.sessionTokenLifeSpanDurationInHours, + this.lifecycleState, + this.timeTokenRefreshed, + this.timeTokenExpiry, + this.timeCreated, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ResourcePrincipalConfiguration model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("bdsInstanceId")) { + this.bdsInstanceId(model.getBdsInstanceId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("sessionTokenLifeSpanDurationInHours")) { + this.sessionTokenLifeSpanDurationInHours( + model.getSessionTokenLifeSpanDurationInHours()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeTokenRefreshed")) { + this.timeTokenRefreshed(model.getTimeTokenRefreshed()); + } + if (model.wasPropertyExplicitlySet("timeTokenExpiry")) { + this.timeTokenExpiry(model.getTimeTokenExpiry()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The id of the ResourcePrincipalConfiguration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The id of the ResourcePrincipalConfiguration. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of the bdsInstance which is the parent resource id. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bdsInstanceId") + private final String bdsInstanceId; + + /** + * The OCID of the bdsInstance which is the parent resource id. + * @return the value + **/ + public String getBdsInstanceId() { + return bdsInstanceId; + } + + /** + * A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Life span in hours of each resource principal session token. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sessionTokenLifeSpanDurationInHours") + private final Integer sessionTokenLifeSpanDurationInHours; + + /** + * Life span in hours of each resource principal session token. + * @return the value + **/ + public Integer getSessionTokenLifeSpanDurationInHours() { + return sessionTokenLifeSpanDurationInHours; + } + + /** + * The state of the ResourcePrincipalConfiguration. + **/ + public enum LifecycleState { + Creating("CREATING"), + Active("ACTIVE"), + Updating("UPDATING"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The state of the ResourcePrincipalConfiguration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The state of the ResourcePrincipalConfiguration. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * the time the resource principal session token was refreshed, shown as an rfc 3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeTokenRefreshed") + private final java.util.Date timeTokenRefreshed; + + /** + * the time the resource principal session token was refreshed, shown as an rfc 3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeTokenRefreshed() { + return timeTokenRefreshed; + } + + /** + * the time the resource principal session token will expired, shown as an rfc 3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeTokenExpiry") + private final java.util.Date timeTokenExpiry; + + /** + * the time the resource principal session token will expired, shown as an rfc 3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeTokenExpiry() { + return timeTokenExpiry; + } + + /** + * The time the ResourcePrincipalConfiguration was created, shown as an RFC 3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the ResourcePrincipalConfiguration was created, shown as an RFC 3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the ResourcePrincipalConfiguration was updated, shown as an RFC 3339 formatted datetime string. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the ResourcePrincipalConfiguration was updated, shown as an RFC 3339 formatted datetime string. + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ResourcePrincipalConfiguration("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", bdsInstanceId=").append(String.valueOf(this.bdsInstanceId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", sessionTokenLifeSpanDurationInHours=") + .append(String.valueOf(this.sessionTokenLifeSpanDurationInHours)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeTokenRefreshed=").append(String.valueOf(this.timeTokenRefreshed)); + sb.append(", timeTokenExpiry=").append(String.valueOf(this.timeTokenExpiry)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ResourcePrincipalConfiguration)) { + return false; + } + + ResourcePrincipalConfiguration other = (ResourcePrincipalConfiguration) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.bdsInstanceId, other.bdsInstanceId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals( + this.sessionTokenLifeSpanDurationInHours, + other.sessionTokenLifeSpanDurationInHours) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeTokenRefreshed, other.timeTokenRefreshed) + && java.util.Objects.equals(this.timeTokenExpiry, other.timeTokenExpiry) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.bdsInstanceId == null ? 43 : this.bdsInstanceId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.sessionTokenLifeSpanDurationInHours == null + ? 43 + : this.sessionTokenLifeSpanDurationInHours.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.timeTokenRefreshed == null + ? 43 + : this.timeTokenRefreshed.hashCode()); + result = + (result * PRIME) + + (this.timeTokenExpiry == null ? 43 : this.timeTokenExpiry.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/ResourcePrincipalConfigurationSummary.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/ResourcePrincipalConfigurationSummary.java new file mode 100644 index 00000000000..af208516d05 --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/ResourcePrincipalConfigurationSummary.java @@ -0,0 +1,436 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.model; + +/** + * Resource Principal Session Token Details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ResourcePrincipalConfigurationSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ResourcePrincipalConfigurationSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "bdsInstanceId", + "displayName", + "lifecycleState", + "timeTokenRefreshed", + "timeTokenExpiry", + "timeCreated", + "timeUpdated" + }) + public ResourcePrincipalConfigurationSummary( + String id, + String bdsInstanceId, + String displayName, + ResourcePrincipalConfiguration.LifecycleState lifecycleState, + java.util.Date timeTokenRefreshed, + java.util.Date timeTokenExpiry, + java.util.Date timeCreated, + java.util.Date timeUpdated) { + super(); + this.id = id; + this.bdsInstanceId = bdsInstanceId; + this.displayName = displayName; + this.lifecycleState = lifecycleState; + this.timeTokenRefreshed = timeTokenRefreshed; + this.timeTokenExpiry = timeTokenExpiry; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * the ID of the ResourcePrincipalConfiguration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * the ID of the ResourcePrincipalConfiguration. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * the OCID of the bdsInstance which is the parent resource id. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bdsInstanceId") + private String bdsInstanceId; + + /** + * the OCID of the bdsInstance which is the parent resource id. + * @param bdsInstanceId the value to set + * @return this builder + **/ + public Builder bdsInstanceId(String bdsInstanceId) { + this.bdsInstanceId = bdsInstanceId; + this.__explicitlySet__.add("bdsInstanceId"); + return this; + } + /** + * a user-friendly name. only ascii alphanumeric characters with no spaces allowed. the name does not have to be unique, and it may be changed. avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * a user-friendly name. only ascii alphanumeric characters with no spaces allowed. the name does not have to be unique, and it may be changed. avoid entering confidential information. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * the state of the ResourcePrincipalConfiguration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private ResourcePrincipalConfiguration.LifecycleState lifecycleState; + + /** + * the state of the ResourcePrincipalConfiguration. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState( + ResourcePrincipalConfiguration.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * the time the resource principal session token was refreshed, shown as an rfc 3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeTokenRefreshed") + private java.util.Date timeTokenRefreshed; + + /** + * the time the resource principal session token was refreshed, shown as an rfc 3339 formatted datetime string. + * @param timeTokenRefreshed the value to set + * @return this builder + **/ + public Builder timeTokenRefreshed(java.util.Date timeTokenRefreshed) { + this.timeTokenRefreshed = timeTokenRefreshed; + this.__explicitlySet__.add("timeTokenRefreshed"); + return this; + } + /** + * the time the resource principal session token will expired, shown as an rfc 3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeTokenExpiry") + private java.util.Date timeTokenExpiry; + + /** + * the time the resource principal session token will expired, shown as an rfc 3339 formatted datetime string. + * @param timeTokenExpiry the value to set + * @return this builder + **/ + public Builder timeTokenExpiry(java.util.Date timeTokenExpiry) { + this.timeTokenExpiry = timeTokenExpiry; + this.__explicitlySet__.add("timeTokenExpiry"); + return this; + } + /** + * the time the ResourcePrincipalConfiguration was created, shown as an rfc 3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * the time the ResourcePrincipalConfiguration was created, shown as an rfc 3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * the time the ResourcePrincipalConfiguration was updated, shown as an rfc 3339 formatted datetime string. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * the time the ResourcePrincipalConfiguration was updated, shown as an rfc 3339 formatted datetime string. + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ResourcePrincipalConfigurationSummary build() { + ResourcePrincipalConfigurationSummary model = + new ResourcePrincipalConfigurationSummary( + this.id, + this.bdsInstanceId, + this.displayName, + this.lifecycleState, + this.timeTokenRefreshed, + this.timeTokenExpiry, + this.timeCreated, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ResourcePrincipalConfigurationSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("bdsInstanceId")) { + this.bdsInstanceId(model.getBdsInstanceId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeTokenRefreshed")) { + this.timeTokenRefreshed(model.getTimeTokenRefreshed()); + } + if (model.wasPropertyExplicitlySet("timeTokenExpiry")) { + this.timeTokenExpiry(model.getTimeTokenExpiry()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * the ID of the ResourcePrincipalConfiguration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * the ID of the ResourcePrincipalConfiguration. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * the OCID of the bdsInstance which is the parent resource id. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bdsInstanceId") + private final String bdsInstanceId; + + /** + * the OCID of the bdsInstance which is the parent resource id. + * @return the value + **/ + public String getBdsInstanceId() { + return bdsInstanceId; + } + + /** + * a user-friendly name. only ascii alphanumeric characters with no spaces allowed. the name does not have to be unique, and it may be changed. avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * a user-friendly name. only ascii alphanumeric characters with no spaces allowed. the name does not have to be unique, and it may be changed. avoid entering confidential information. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * the state of the ResourcePrincipalConfiguration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final ResourcePrincipalConfiguration.LifecycleState lifecycleState; + + /** + * the state of the ResourcePrincipalConfiguration. + * @return the value + **/ + public ResourcePrincipalConfiguration.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * the time the resource principal session token was refreshed, shown as an rfc 3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeTokenRefreshed") + private final java.util.Date timeTokenRefreshed; + + /** + * the time the resource principal session token was refreshed, shown as an rfc 3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeTokenRefreshed() { + return timeTokenRefreshed; + } + + /** + * the time the resource principal session token will expired, shown as an rfc 3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeTokenExpiry") + private final java.util.Date timeTokenExpiry; + + /** + * the time the resource principal session token will expired, shown as an rfc 3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeTokenExpiry() { + return timeTokenExpiry; + } + + /** + * the time the ResourcePrincipalConfiguration was created, shown as an rfc 3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * the time the ResourcePrincipalConfiguration was created, shown as an rfc 3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * the time the ResourcePrincipalConfiguration was updated, shown as an rfc 3339 formatted datetime string. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * the time the ResourcePrincipalConfiguration was updated, shown as an rfc 3339 formatted datetime string. + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ResourcePrincipalConfigurationSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", bdsInstanceId=").append(String.valueOf(this.bdsInstanceId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeTokenRefreshed=").append(String.valueOf(this.timeTokenRefreshed)); + sb.append(", timeTokenExpiry=").append(String.valueOf(this.timeTokenExpiry)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ResourcePrincipalConfigurationSummary)) { + return false; + } + + ResourcePrincipalConfigurationSummary other = (ResourcePrincipalConfigurationSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.bdsInstanceId, other.bdsInstanceId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeTokenRefreshed, other.timeTokenRefreshed) + && java.util.Objects.equals(this.timeTokenExpiry, other.timeTokenExpiry) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.bdsInstanceId == null ? 43 : this.bdsInstanceId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.timeTokenRefreshed == null + ? 43 + : this.timeTokenRefreshed.hashCode()); + result = + (result * PRIME) + + (this.timeTokenExpiry == null ? 43 : this.timeTokenExpiry.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/model/UpdateResourcePrincipalConfigurationDetails.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/UpdateResourcePrincipalConfigurationDetails.java new file mode 100644 index 00000000000..db003a4843a --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/model/UpdateResourcePrincipalConfigurationDetails.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.model; + +/** + * Details of updating the resource principal configuration for the cluster. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateResourcePrincipalConfigurationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateResourcePrincipalConfigurationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"displayName", "sessionTokenLifeSpanDurationInHours"}) + public UpdateResourcePrincipalConfigurationDetails( + String displayName, Integer sessionTokenLifeSpanDurationInHours) { + super(); + this.displayName = displayName; + this.sessionTokenLifeSpanDurationInHours = sessionTokenLifeSpanDurationInHours; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Life span in hours for the resource principal session token. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sessionTokenLifeSpanDurationInHours") + private Integer sessionTokenLifeSpanDurationInHours; + + /** + * Life span in hours for the resource principal session token. + * @param sessionTokenLifeSpanDurationInHours the value to set + * @return this builder + **/ + public Builder sessionTokenLifeSpanDurationInHours( + Integer sessionTokenLifeSpanDurationInHours) { + this.sessionTokenLifeSpanDurationInHours = sessionTokenLifeSpanDurationInHours; + this.__explicitlySet__.add("sessionTokenLifeSpanDurationInHours"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateResourcePrincipalConfigurationDetails build() { + UpdateResourcePrincipalConfigurationDetails model = + new UpdateResourcePrincipalConfigurationDetails( + this.displayName, this.sessionTokenLifeSpanDurationInHours); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateResourcePrincipalConfigurationDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("sessionTokenLifeSpanDurationInHours")) { + this.sessionTokenLifeSpanDurationInHours( + model.getSessionTokenLifeSpanDurationInHours()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Life span in hours for the resource principal session token. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sessionTokenLifeSpanDurationInHours") + private final Integer sessionTokenLifeSpanDurationInHours; + + /** + * Life span in hours for the resource principal session token. + * @return the value + **/ + public Integer getSessionTokenLifeSpanDurationInHours() { + return sessionTokenLifeSpanDurationInHours; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateResourcePrincipalConfigurationDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", sessionTokenLifeSpanDurationInHours=") + .append(String.valueOf(this.sessionTokenLifeSpanDurationInHours)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateResourcePrincipalConfigurationDetails)) { + return false; + } + + UpdateResourcePrincipalConfigurationDetails other = + (UpdateResourcePrincipalConfigurationDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals( + this.sessionTokenLifeSpanDurationInHours, + other.sessionTokenLifeSpanDurationInHours) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.sessionTokenLifeSpanDurationInHours == null + ? 43 + : this.sessionTokenLifeSpanDurationInHours.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/requests/CreateResourcePrincipalConfigurationRequest.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/requests/CreateResourcePrincipalConfigurationRequest.java new file mode 100644 index 00000000000..8041dd6176c --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/requests/CreateResourcePrincipalConfigurationRequest.java @@ -0,0 +1,326 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.requests; + +import com.oracle.bmc.bds.model.*; +/** + * Example: Click here to see how to use CreateResourcePrincipalConfigurationRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +public class CreateResourcePrincipalConfigurationRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.bds.model.CreateResourcePrincipalConfigurationDetails> { + + /** + * The OCID of the cluster. + */ + private String bdsInstanceId; + + /** + * The OCID of the cluster. + */ + public String getBdsInstanceId() { + return bdsInstanceId; + } + /** + * Details of creating resource principal session token for the bds cluster. + */ + private com.oracle.bmc.bds.model.CreateResourcePrincipalConfigurationDetails + createResourcePrincipalConfigurationDetails; + + /** + * Details of creating resource principal session token for the bds cluster. + */ + public com.oracle.bmc.bds.model.CreateResourcePrincipalConfigurationDetails + getCreateResourcePrincipalConfigurationDetails() { + return createResourcePrincipalConfigurationDetails; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error, without risk of executing that same action again. Retry tokens expire after 24 + * hours but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error, without risk of executing that same action again. Retry tokens expire after 24 + * hours but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.bds.model.CreateResourcePrincipalConfigurationDetails getBody$() { + return createResourcePrincipalConfigurationDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateResourcePrincipalConfigurationRequest, + com.oracle.bmc.bds.model.CreateResourcePrincipalConfigurationDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the cluster. + */ + private String bdsInstanceId = null; + + /** + * The OCID of the cluster. + * @param bdsInstanceId the value to set + * @return this builder instance + */ + public Builder bdsInstanceId(String bdsInstanceId) { + this.bdsInstanceId = bdsInstanceId; + return this; + } + + /** + * Details of creating resource principal session token for the bds cluster. + */ + private com.oracle.bmc.bds.model.CreateResourcePrincipalConfigurationDetails + createResourcePrincipalConfigurationDetails = null; + + /** + * Details of creating resource principal session token for the bds cluster. + * @param createResourcePrincipalConfigurationDetails the value to set + * @return this builder instance + */ + public Builder createResourcePrincipalConfigurationDetails( + com.oracle.bmc.bds.model.CreateResourcePrincipalConfigurationDetails + createResourcePrincipalConfigurationDetails) { + this.createResourcePrincipalConfigurationDetails = + createResourcePrincipalConfigurationDetails; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error, without risk of executing that same action again. Retry tokens expire after 24 + * hours but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error, without risk of executing that same action again. Retry tokens expire after 24 + * hours but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateResourcePrincipalConfigurationRequest o) { + bdsInstanceId(o.getBdsInstanceId()); + createResourcePrincipalConfigurationDetails( + o.getCreateResourcePrincipalConfigurationDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateResourcePrincipalConfigurationRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateResourcePrincipalConfigurationRequest + */ + public CreateResourcePrincipalConfigurationRequest build() { + CreateResourcePrincipalConfigurationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.bds.model.CreateResourcePrincipalConfigurationDetails body) { + createResourcePrincipalConfigurationDetails(body); + return this; + } + + /** + * Build the instance of CreateResourcePrincipalConfigurationRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateResourcePrincipalConfigurationRequest + */ + public CreateResourcePrincipalConfigurationRequest buildWithoutInvocationCallback() { + CreateResourcePrincipalConfigurationRequest request = + new CreateResourcePrincipalConfigurationRequest(); + request.bdsInstanceId = bdsInstanceId; + request.createResourcePrincipalConfigurationDetails = + createResourcePrincipalConfigurationDetails; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new CreateResourcePrincipalConfigurationRequest(bdsInstanceId, createResourcePrincipalConfigurationDetails, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .bdsInstanceId(bdsInstanceId) + .createResourcePrincipalConfigurationDetails( + createResourcePrincipalConfigurationDetails) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",bdsInstanceId=").append(String.valueOf(this.bdsInstanceId)); + sb.append(",createResourcePrincipalConfigurationDetails=") + .append(String.valueOf(this.createResourcePrincipalConfigurationDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateResourcePrincipalConfigurationRequest)) { + return false; + } + + CreateResourcePrincipalConfigurationRequest other = + (CreateResourcePrincipalConfigurationRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.bdsInstanceId, other.bdsInstanceId) + && java.util.Objects.equals( + this.createResourcePrincipalConfigurationDetails, + other.createResourcePrincipalConfigurationDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.bdsInstanceId == null ? 43 : this.bdsInstanceId.hashCode()); + result = + (result * PRIME) + + (this.createResourcePrincipalConfigurationDetails == null + ? 43 + : this.createResourcePrincipalConfigurationDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/requests/ForceRefreshResourcePrincipalRequest.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/requests/ForceRefreshResourcePrincipalRequest.java new file mode 100644 index 00000000000..cca9f939845 --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/requests/ForceRefreshResourcePrincipalRequest.java @@ -0,0 +1,411 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.requests; + +import com.oracle.bmc.bds.model.*; +/** + * Example: Click here to see how to use ForceRefreshResourcePrincipalRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +public class ForceRefreshResourcePrincipalRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.bds.model.ForceRefreshResourcePrincipalDetails> { + + /** + * The OCID of the cluster. + */ + private String bdsInstanceId; + + /** + * The OCID of the cluster. + */ + public String getBdsInstanceId() { + return bdsInstanceId; + } + /** + * Unique Oracle-assigned identifier of the ResourcePrincipalConfiguration. + */ + private String resourcePrincipalConfigurationId; + + /** + * Unique Oracle-assigned identifier of the ResourcePrincipalConfiguration. + */ + public String getResourcePrincipalConfigurationId() { + return resourcePrincipalConfigurationId; + } + /** + * Details of refreshing resource principal session token + */ + private com.oracle.bmc.bds.model.ForceRefreshResourcePrincipalDetails + forceRefreshResourcePrincipalDetails; + + /** + * Details of refreshing resource principal session token + */ + public com.oracle.bmc.bds.model.ForceRefreshResourcePrincipalDetails + getForceRefreshResourcePrincipalDetails() { + return forceRefreshResourcePrincipalDetails; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error, without risk of executing that same action again. Retry tokens expire after 24 + * hours but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error, without risk of executing that same action again. Retry tokens expire after 24 + * hours but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.bds.model.ForceRefreshResourcePrincipalDetails getBody$() { + return forceRefreshResourcePrincipalDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ForceRefreshResourcePrincipalRequest, + com.oracle.bmc.bds.model.ForceRefreshResourcePrincipalDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the cluster. + */ + private String bdsInstanceId = null; + + /** + * The OCID of the cluster. + * @param bdsInstanceId the value to set + * @return this builder instance + */ + public Builder bdsInstanceId(String bdsInstanceId) { + this.bdsInstanceId = bdsInstanceId; + return this; + } + + /** + * Unique Oracle-assigned identifier of the ResourcePrincipalConfiguration. + */ + private String resourcePrincipalConfigurationId = null; + + /** + * Unique Oracle-assigned identifier of the ResourcePrincipalConfiguration. + * @param resourcePrincipalConfigurationId the value to set + * @return this builder instance + */ + public Builder resourcePrincipalConfigurationId(String resourcePrincipalConfigurationId) { + this.resourcePrincipalConfigurationId = resourcePrincipalConfigurationId; + return this; + } + + /** + * Details of refreshing resource principal session token + */ + private com.oracle.bmc.bds.model.ForceRefreshResourcePrincipalDetails + forceRefreshResourcePrincipalDetails = null; + + /** + * Details of refreshing resource principal session token + * @param forceRefreshResourcePrincipalDetails the value to set + * @return this builder instance + */ + public Builder forceRefreshResourcePrincipalDetails( + com.oracle.bmc.bds.model.ForceRefreshResourcePrincipalDetails + forceRefreshResourcePrincipalDetails) { + this.forceRefreshResourcePrincipalDetails = forceRefreshResourcePrincipalDetails; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error, without risk of executing that same action again. Retry tokens expire after 24 + * hours but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error, without risk of executing that same action again. Retry tokens expire after 24 + * hours but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ForceRefreshResourcePrincipalRequest o) { + bdsInstanceId(o.getBdsInstanceId()); + resourcePrincipalConfigurationId(o.getResourcePrincipalConfigurationId()); + forceRefreshResourcePrincipalDetails(o.getForceRefreshResourcePrincipalDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ForceRefreshResourcePrincipalRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ForceRefreshResourcePrincipalRequest + */ + public ForceRefreshResourcePrincipalRequest build() { + ForceRefreshResourcePrincipalRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.bds.model.ForceRefreshResourcePrincipalDetails body) { + forceRefreshResourcePrincipalDetails(body); + return this; + } + + /** + * Build the instance of ForceRefreshResourcePrincipalRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ForceRefreshResourcePrincipalRequest + */ + public ForceRefreshResourcePrincipalRequest buildWithoutInvocationCallback() { + ForceRefreshResourcePrincipalRequest request = + new ForceRefreshResourcePrincipalRequest(); + request.bdsInstanceId = bdsInstanceId; + request.resourcePrincipalConfigurationId = resourcePrincipalConfigurationId; + request.forceRefreshResourcePrincipalDetails = forceRefreshResourcePrincipalDetails; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new ForceRefreshResourcePrincipalRequest(bdsInstanceId, resourcePrincipalConfigurationId, forceRefreshResourcePrincipalDetails, opcRequestId, ifMatch, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .bdsInstanceId(bdsInstanceId) + .resourcePrincipalConfigurationId(resourcePrincipalConfigurationId) + .forceRefreshResourcePrincipalDetails(forceRefreshResourcePrincipalDetails) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",bdsInstanceId=").append(String.valueOf(this.bdsInstanceId)); + sb.append(",resourcePrincipalConfigurationId=") + .append(String.valueOf(this.resourcePrincipalConfigurationId)); + sb.append(",forceRefreshResourcePrincipalDetails=") + .append(String.valueOf(this.forceRefreshResourcePrincipalDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ForceRefreshResourcePrincipalRequest)) { + return false; + } + + ForceRefreshResourcePrincipalRequest other = (ForceRefreshResourcePrincipalRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.bdsInstanceId, other.bdsInstanceId) + && java.util.Objects.equals( + this.resourcePrincipalConfigurationId, + other.resourcePrincipalConfigurationId) + && java.util.Objects.equals( + this.forceRefreshResourcePrincipalDetails, + other.forceRefreshResourcePrincipalDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.bdsInstanceId == null ? 43 : this.bdsInstanceId.hashCode()); + result = + (result * PRIME) + + (this.resourcePrincipalConfigurationId == null + ? 43 + : this.resourcePrincipalConfigurationId.hashCode()); + result = + (result * PRIME) + + (this.forceRefreshResourcePrincipalDetails == null + ? 43 + : this.forceRefreshResourcePrincipalDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/requests/GetResourcePrincipalConfigurationRequest.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/requests/GetResourcePrincipalConfigurationRequest.java new file mode 100644 index 00000000000..e1a1c73c187 --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/requests/GetResourcePrincipalConfigurationRequest.java @@ -0,0 +1,239 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.requests; + +import com.oracle.bmc.bds.model.*; +/** + * Example: Click here to see how to use GetResourcePrincipalConfigurationRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +public class GetResourcePrincipalConfigurationRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the cluster. + */ + private String bdsInstanceId; + + /** + * The OCID of the cluster. + */ + public String getBdsInstanceId() { + return bdsInstanceId; + } + /** + * Unique Oracle-assigned identifier of the ResourcePrincipalConfiguration. + */ + private String resourcePrincipalConfigurationId; + + /** + * Unique Oracle-assigned identifier of the ResourcePrincipalConfiguration. + */ + public String getResourcePrincipalConfigurationId() { + return resourcePrincipalConfigurationId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetResourcePrincipalConfigurationRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the cluster. + */ + private String bdsInstanceId = null; + + /** + * The OCID of the cluster. + * @param bdsInstanceId the value to set + * @return this builder instance + */ + public Builder bdsInstanceId(String bdsInstanceId) { + this.bdsInstanceId = bdsInstanceId; + return this; + } + + /** + * Unique Oracle-assigned identifier of the ResourcePrincipalConfiguration. + */ + private String resourcePrincipalConfigurationId = null; + + /** + * Unique Oracle-assigned identifier of the ResourcePrincipalConfiguration. + * @param resourcePrincipalConfigurationId the value to set + * @return this builder instance + */ + public Builder resourcePrincipalConfigurationId(String resourcePrincipalConfigurationId) { + this.resourcePrincipalConfigurationId = resourcePrincipalConfigurationId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetResourcePrincipalConfigurationRequest o) { + bdsInstanceId(o.getBdsInstanceId()); + resourcePrincipalConfigurationId(o.getResourcePrincipalConfigurationId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetResourcePrincipalConfigurationRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetResourcePrincipalConfigurationRequest + */ + public GetResourcePrincipalConfigurationRequest build() { + GetResourcePrincipalConfigurationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetResourcePrincipalConfigurationRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetResourcePrincipalConfigurationRequest + */ + public GetResourcePrincipalConfigurationRequest buildWithoutInvocationCallback() { + GetResourcePrincipalConfigurationRequest request = + new GetResourcePrincipalConfigurationRequest(); + request.bdsInstanceId = bdsInstanceId; + request.resourcePrincipalConfigurationId = resourcePrincipalConfigurationId; + request.opcRequestId = opcRequestId; + return request; + // new GetResourcePrincipalConfigurationRequest(bdsInstanceId, resourcePrincipalConfigurationId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .bdsInstanceId(bdsInstanceId) + .resourcePrincipalConfigurationId(resourcePrincipalConfigurationId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",bdsInstanceId=").append(String.valueOf(this.bdsInstanceId)); + sb.append(",resourcePrincipalConfigurationId=") + .append(String.valueOf(this.resourcePrincipalConfigurationId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetResourcePrincipalConfigurationRequest)) { + return false; + } + + GetResourcePrincipalConfigurationRequest other = + (GetResourcePrincipalConfigurationRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.bdsInstanceId, other.bdsInstanceId) + && java.util.Objects.equals( + this.resourcePrincipalConfigurationId, + other.resourcePrincipalConfigurationId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.bdsInstanceId == null ? 43 : this.bdsInstanceId.hashCode()); + result = + (result * PRIME) + + (this.resourcePrincipalConfigurationId == null + ? 43 + : this.resourcePrincipalConfigurationId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/requests/ListResourcePrincipalConfigurationsRequest.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/requests/ListResourcePrincipalConfigurationsRequest.java new file mode 100644 index 00000000000..7c249737160 --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/requests/ListResourcePrincipalConfigurationsRequest.java @@ -0,0 +1,439 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.requests; + +import com.oracle.bmc.bds.model.*; +/** + * Example: Click here to see how to use ListResourcePrincipalConfigurationsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +public class ListResourcePrincipalConfigurationsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the cluster. + */ + private String bdsInstanceId; + + /** + * The OCID of the cluster. + */ + public String getBdsInstanceId() { + return bdsInstanceId; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.bds.model.SortOrders sortOrder; + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + public com.oracle.bmc.bds.model.SortOrders getSortOrder() { + return sortOrder; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * The state of the ResourcePrincipalConfiguration. + */ + private com.oracle.bmc.bds.model.ResourcePrincipalConfiguration.LifecycleState lifecycleState; + + /** + * The state of the ResourcePrincipalConfiguration. + */ + public com.oracle.bmc.bds.model.ResourcePrincipalConfiguration.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListResourcePrincipalConfigurationsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the cluster. + */ + private String bdsInstanceId = null; + + /** + * The OCID of the cluster. + * @param bdsInstanceId the value to set + * @return this builder instance + */ + public Builder bdsInstanceId(String bdsInstanceId) { + this.bdsInstanceId = bdsInstanceId; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.bds.model.SortOrders sortOrder = null; + + /** + * The sort order to use, either 'asc' or 'desc'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.bds.model.SortOrders sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The state of the ResourcePrincipalConfiguration. + */ + private com.oracle.bmc.bds.model.ResourcePrincipalConfiguration.LifecycleState + lifecycleState = null; + + /** + * The state of the ResourcePrincipalConfiguration. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.bds.model.ResourcePrincipalConfiguration.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListResourcePrincipalConfigurationsRequest o) { + bdsInstanceId(o.getBdsInstanceId()); + page(o.getPage()); + limit(o.getLimit()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + displayName(o.getDisplayName()); + lifecycleState(o.getLifecycleState()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListResourcePrincipalConfigurationsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListResourcePrincipalConfigurationsRequest + */ + public ListResourcePrincipalConfigurationsRequest build() { + ListResourcePrincipalConfigurationsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListResourcePrincipalConfigurationsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListResourcePrincipalConfigurationsRequest + */ + public ListResourcePrincipalConfigurationsRequest buildWithoutInvocationCallback() { + ListResourcePrincipalConfigurationsRequest request = + new ListResourcePrincipalConfigurationsRequest(); + request.bdsInstanceId = bdsInstanceId; + request.page = page; + request.limit = limit; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.displayName = displayName; + request.lifecycleState = lifecycleState; + request.opcRequestId = opcRequestId; + return request; + // new ListResourcePrincipalConfigurationsRequest(bdsInstanceId, page, limit, sortBy, sortOrder, displayName, lifecycleState, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .bdsInstanceId(bdsInstanceId) + .page(page) + .limit(limit) + .sortBy(sortBy) + .sortOrder(sortOrder) + .displayName(displayName) + .lifecycleState(lifecycleState) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",bdsInstanceId=").append(String.valueOf(this.bdsInstanceId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListResourcePrincipalConfigurationsRequest)) { + return false; + } + + ListResourcePrincipalConfigurationsRequest other = + (ListResourcePrincipalConfigurationsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.bdsInstanceId, other.bdsInstanceId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.bdsInstanceId == null ? 43 : this.bdsInstanceId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/requests/RemoveResourcePrincipalConfigurationRequest.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/requests/RemoveResourcePrincipalConfigurationRequest.java new file mode 100644 index 00000000000..bc3344e6c93 --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/requests/RemoveResourcePrincipalConfigurationRequest.java @@ -0,0 +1,363 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.requests; + +import com.oracle.bmc.bds.model.*; +/** + * Example: Click here to see how to use RemoveResourcePrincipalConfigurationRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +public class RemoveResourcePrincipalConfigurationRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.bds.model.RemoveResourcePrincipalConfigurationDetails> { + + /** + * The OCID of the cluster. + */ + private String bdsInstanceId; + + /** + * The OCID of the cluster. + */ + public String getBdsInstanceId() { + return bdsInstanceId; + } + /** + * Unique Oracle-assigned identifier of the ResourcePrincipalConfiguration. + */ + private String resourcePrincipalConfigurationId; + + /** + * Unique Oracle-assigned identifier of the ResourcePrincipalConfiguration. + */ + public String getResourcePrincipalConfigurationId() { + return resourcePrincipalConfigurationId; + } + /** + * Details of removing a resource principal for the bds cluster. + */ + private com.oracle.bmc.bds.model.RemoveResourcePrincipalConfigurationDetails + removeResourcePrincipalConfigurationDetails; + + /** + * Details of removing a resource principal for the bds cluster. + */ + public com.oracle.bmc.bds.model.RemoveResourcePrincipalConfigurationDetails + getRemoveResourcePrincipalConfigurationDetails() { + return removeResourcePrincipalConfigurationDetails; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.bds.model.RemoveResourcePrincipalConfigurationDetails getBody$() { + return removeResourcePrincipalConfigurationDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RemoveResourcePrincipalConfigurationRequest, + com.oracle.bmc.bds.model.RemoveResourcePrincipalConfigurationDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the cluster. + */ + private String bdsInstanceId = null; + + /** + * The OCID of the cluster. + * @param bdsInstanceId the value to set + * @return this builder instance + */ + public Builder bdsInstanceId(String bdsInstanceId) { + this.bdsInstanceId = bdsInstanceId; + return this; + } + + /** + * Unique Oracle-assigned identifier of the ResourcePrincipalConfiguration. + */ + private String resourcePrincipalConfigurationId = null; + + /** + * Unique Oracle-assigned identifier of the ResourcePrincipalConfiguration. + * @param resourcePrincipalConfigurationId the value to set + * @return this builder instance + */ + public Builder resourcePrincipalConfigurationId(String resourcePrincipalConfigurationId) { + this.resourcePrincipalConfigurationId = resourcePrincipalConfigurationId; + return this; + } + + /** + * Details of removing a resource principal for the bds cluster. + */ + private com.oracle.bmc.bds.model.RemoveResourcePrincipalConfigurationDetails + removeResourcePrincipalConfigurationDetails = null; + + /** + * Details of removing a resource principal for the bds cluster. + * @param removeResourcePrincipalConfigurationDetails the value to set + * @return this builder instance + */ + public Builder removeResourcePrincipalConfigurationDetails( + com.oracle.bmc.bds.model.RemoveResourcePrincipalConfigurationDetails + removeResourcePrincipalConfigurationDetails) { + this.removeResourcePrincipalConfigurationDetails = + removeResourcePrincipalConfigurationDetails; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveResourcePrincipalConfigurationRequest o) { + bdsInstanceId(o.getBdsInstanceId()); + resourcePrincipalConfigurationId(o.getResourcePrincipalConfigurationId()); + removeResourcePrincipalConfigurationDetails( + o.getRemoveResourcePrincipalConfigurationDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RemoveResourcePrincipalConfigurationRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RemoveResourcePrincipalConfigurationRequest + */ + public RemoveResourcePrincipalConfigurationRequest build() { + RemoveResourcePrincipalConfigurationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.bds.model.RemoveResourcePrincipalConfigurationDetails body) { + removeResourcePrincipalConfigurationDetails(body); + return this; + } + + /** + * Build the instance of RemoveResourcePrincipalConfigurationRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RemoveResourcePrincipalConfigurationRequest + */ + public RemoveResourcePrincipalConfigurationRequest buildWithoutInvocationCallback() { + RemoveResourcePrincipalConfigurationRequest request = + new RemoveResourcePrincipalConfigurationRequest(); + request.bdsInstanceId = bdsInstanceId; + request.resourcePrincipalConfigurationId = resourcePrincipalConfigurationId; + request.removeResourcePrincipalConfigurationDetails = + removeResourcePrincipalConfigurationDetails; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new RemoveResourcePrincipalConfigurationRequest(bdsInstanceId, resourcePrincipalConfigurationId, removeResourcePrincipalConfigurationDetails, opcRequestId, ifMatch); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .bdsInstanceId(bdsInstanceId) + .resourcePrincipalConfigurationId(resourcePrincipalConfigurationId) + .removeResourcePrincipalConfigurationDetails( + removeResourcePrincipalConfigurationDetails) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",bdsInstanceId=").append(String.valueOf(this.bdsInstanceId)); + sb.append(",resourcePrincipalConfigurationId=") + .append(String.valueOf(this.resourcePrincipalConfigurationId)); + sb.append(",removeResourcePrincipalConfigurationDetails=") + .append(String.valueOf(this.removeResourcePrincipalConfigurationDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveResourcePrincipalConfigurationRequest)) { + return false; + } + + RemoveResourcePrincipalConfigurationRequest other = + (RemoveResourcePrincipalConfigurationRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.bdsInstanceId, other.bdsInstanceId) + && java.util.Objects.equals( + this.resourcePrincipalConfigurationId, + other.resourcePrincipalConfigurationId) + && java.util.Objects.equals( + this.removeResourcePrincipalConfigurationDetails, + other.removeResourcePrincipalConfigurationDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.bdsInstanceId == null ? 43 : this.bdsInstanceId.hashCode()); + result = + (result * PRIME) + + (this.resourcePrincipalConfigurationId == null + ? 43 + : this.resourcePrincipalConfigurationId.hashCode()); + result = + (result * PRIME) + + (this.removeResourcePrincipalConfigurationDetails == null + ? 43 + : this.removeResourcePrincipalConfigurationDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/requests/UpdateResourcePrincipalConfigurationRequest.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/requests/UpdateResourcePrincipalConfigurationRequest.java new file mode 100644 index 00000000000..1e73aed3349 --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/requests/UpdateResourcePrincipalConfigurationRequest.java @@ -0,0 +1,417 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.requests; + +import com.oracle.bmc.bds.model.*; +/** + * Example: Click here to see how to use UpdateResourcePrincipalConfigurationRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +public class UpdateResourcePrincipalConfigurationRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.bds.model.UpdateResourcePrincipalConfigurationDetails> { + + /** + * The OCID of the cluster. + */ + private String bdsInstanceId; + + /** + * The OCID of the cluster. + */ + public String getBdsInstanceId() { + return bdsInstanceId; + } + /** + * Unique Oracle-assigned identifier of the ResourcePrincipalConfiguration. + */ + private String resourcePrincipalConfigurationId; + + /** + * Unique Oracle-assigned identifier of the ResourcePrincipalConfiguration. + */ + public String getResourcePrincipalConfigurationId() { + return resourcePrincipalConfigurationId; + } + /** + * Details for updating the resourcePrincipalConfiguration. + */ + private com.oracle.bmc.bds.model.UpdateResourcePrincipalConfigurationDetails + updateResourcePrincipalConfigurationDetails; + + /** + * Details for updating the resourcePrincipalConfiguration. + */ + public com.oracle.bmc.bds.model.UpdateResourcePrincipalConfigurationDetails + getUpdateResourcePrincipalConfigurationDetails() { + return updateResourcePrincipalConfigurationDetails; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error, without risk of executing that same action again. Retry tokens expire after 24 + * hours but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error, without risk of executing that same action again. Retry tokens expire after 24 + * hours but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.bds.model.UpdateResourcePrincipalConfigurationDetails getBody$() { + return updateResourcePrincipalConfigurationDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateResourcePrincipalConfigurationRequest, + com.oracle.bmc.bds.model.UpdateResourcePrincipalConfigurationDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the cluster. + */ + private String bdsInstanceId = null; + + /** + * The OCID of the cluster. + * @param bdsInstanceId the value to set + * @return this builder instance + */ + public Builder bdsInstanceId(String bdsInstanceId) { + this.bdsInstanceId = bdsInstanceId; + return this; + } + + /** + * Unique Oracle-assigned identifier of the ResourcePrincipalConfiguration. + */ + private String resourcePrincipalConfigurationId = null; + + /** + * Unique Oracle-assigned identifier of the ResourcePrincipalConfiguration. + * @param resourcePrincipalConfigurationId the value to set + * @return this builder instance + */ + public Builder resourcePrincipalConfigurationId(String resourcePrincipalConfigurationId) { + this.resourcePrincipalConfigurationId = resourcePrincipalConfigurationId; + return this; + } + + /** + * Details for updating the resourcePrincipalConfiguration. + */ + private com.oracle.bmc.bds.model.UpdateResourcePrincipalConfigurationDetails + updateResourcePrincipalConfigurationDetails = null; + + /** + * Details for updating the resourcePrincipalConfiguration. + * @param updateResourcePrincipalConfigurationDetails the value to set + * @return this builder instance + */ + public Builder updateResourcePrincipalConfigurationDetails( + com.oracle.bmc.bds.model.UpdateResourcePrincipalConfigurationDetails + updateResourcePrincipalConfigurationDetails) { + this.updateResourcePrincipalConfigurationDetails = + updateResourcePrincipalConfigurationDetails; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error, without risk of executing that same action again. Retry tokens expire after 24 + * hours but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error, without risk of executing that same action again. Retry tokens expire after 24 + * hours but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateResourcePrincipalConfigurationRequest o) { + bdsInstanceId(o.getBdsInstanceId()); + resourcePrincipalConfigurationId(o.getResourcePrincipalConfigurationId()); + updateResourcePrincipalConfigurationDetails( + o.getUpdateResourcePrincipalConfigurationDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateResourcePrincipalConfigurationRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateResourcePrincipalConfigurationRequest + */ + public UpdateResourcePrincipalConfigurationRequest build() { + UpdateResourcePrincipalConfigurationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.bds.model.UpdateResourcePrincipalConfigurationDetails body) { + updateResourcePrincipalConfigurationDetails(body); + return this; + } + + /** + * Build the instance of UpdateResourcePrincipalConfigurationRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateResourcePrincipalConfigurationRequest + */ + public UpdateResourcePrincipalConfigurationRequest buildWithoutInvocationCallback() { + UpdateResourcePrincipalConfigurationRequest request = + new UpdateResourcePrincipalConfigurationRequest(); + request.bdsInstanceId = bdsInstanceId; + request.resourcePrincipalConfigurationId = resourcePrincipalConfigurationId; + request.updateResourcePrincipalConfigurationDetails = + updateResourcePrincipalConfigurationDetails; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new UpdateResourcePrincipalConfigurationRequest(bdsInstanceId, resourcePrincipalConfigurationId, updateResourcePrincipalConfigurationDetails, opcRequestId, ifMatch, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .bdsInstanceId(bdsInstanceId) + .resourcePrincipalConfigurationId(resourcePrincipalConfigurationId) + .updateResourcePrincipalConfigurationDetails( + updateResourcePrincipalConfigurationDetails) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",bdsInstanceId=").append(String.valueOf(this.bdsInstanceId)); + sb.append(",resourcePrincipalConfigurationId=") + .append(String.valueOf(this.resourcePrincipalConfigurationId)); + sb.append(",updateResourcePrincipalConfigurationDetails=") + .append(String.valueOf(this.updateResourcePrincipalConfigurationDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateResourcePrincipalConfigurationRequest)) { + return false; + } + + UpdateResourcePrincipalConfigurationRequest other = + (UpdateResourcePrincipalConfigurationRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.bdsInstanceId, other.bdsInstanceId) + && java.util.Objects.equals( + this.resourcePrincipalConfigurationId, + other.resourcePrincipalConfigurationId) + && java.util.Objects.equals( + this.updateResourcePrincipalConfigurationDetails, + other.updateResourcePrincipalConfigurationDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.bdsInstanceId == null ? 43 : this.bdsInstanceId.hashCode()); + result = + (result * PRIME) + + (this.resourcePrincipalConfigurationId == null + ? 43 + : this.resourcePrincipalConfigurationId.hashCode()); + result = + (result * PRIME) + + (this.updateResourcePrincipalConfigurationDetails == null + ? 43 + : this.updateResourcePrincipalConfigurationDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/responses/CreateResourcePrincipalConfigurationResponse.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/responses/CreateResourcePrincipalConfigurationResponse.java new file mode 100644 index 00000000000..13de94c52ba --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/responses/CreateResourcePrincipalConfigurationResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.responses; + +import com.oracle.bmc.bds.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +public class CreateResourcePrincipalConfigurationResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private CreateResourcePrincipalConfigurationResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateResourcePrincipalConfigurationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateResourcePrincipalConfigurationResponse build() { + return new CreateResourcePrincipalConfigurationResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateResourcePrincipalConfigurationResponse)) { + return false; + } + + CreateResourcePrincipalConfigurationResponse other = + (CreateResourcePrincipalConfigurationResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/responses/ForceRefreshResourcePrincipalResponse.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/responses/ForceRefreshResourcePrincipalResponse.java new file mode 100644 index 00000000000..0aa5fc5c892 --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/responses/ForceRefreshResourcePrincipalResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.responses; + +import com.oracle.bmc.bds.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +public class ForceRefreshResourcePrincipalResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private ForceRefreshResourcePrincipalResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ForceRefreshResourcePrincipalResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ForceRefreshResourcePrincipalResponse build() { + return new ForceRefreshResourcePrincipalResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ForceRefreshResourcePrincipalResponse)) { + return false; + } + + ForceRefreshResourcePrincipalResponse other = (ForceRefreshResourcePrincipalResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/responses/GetResourcePrincipalConfigurationResponse.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/responses/GetResourcePrincipalConfigurationResponse.java new file mode 100644 index 00000000000..2886dfacb66 --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/responses/GetResourcePrincipalConfigurationResponse.java @@ -0,0 +1,227 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.responses; + +import com.oracle.bmc.bds.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +public class GetResourcePrincipalConfigurationResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned ResourcePrincipalConfiguration instance. + */ + private com.oracle.bmc.bds.model.ResourcePrincipalConfiguration resourcePrincipalConfiguration; + + /** + * The returned ResourcePrincipalConfiguration instance. + * @return the value + */ + public com.oracle.bmc.bds.model.ResourcePrincipalConfiguration + getResourcePrincipalConfiguration() { + return resourcePrincipalConfiguration; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "resourcePrincipalConfiguration" + }) + private GetResourcePrincipalConfigurationResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.bds.model.ResourcePrincipalConfiguration + resourcePrincipalConfiguration) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.resourcePrincipalConfiguration = resourcePrincipalConfiguration; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned ResourcePrincipalConfiguration instance. + */ + private com.oracle.bmc.bds.model.ResourcePrincipalConfiguration + resourcePrincipalConfiguration; + + /** + * The returned ResourcePrincipalConfiguration instance. + * @param resourcePrincipalConfiguration the value to set + * @return this builder + */ + public Builder resourcePrincipalConfiguration( + com.oracle.bmc.bds.model.ResourcePrincipalConfiguration + resourcePrincipalConfiguration) { + this.resourcePrincipalConfiguration = resourcePrincipalConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetResourcePrincipalConfigurationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + resourcePrincipalConfiguration(o.getResourcePrincipalConfiguration()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetResourcePrincipalConfigurationResponse build() { + return new GetResourcePrincipalConfigurationResponse( + __httpStatusCode__, + headers, + opcRequestId, + etag, + resourcePrincipalConfiguration); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",resourcePrincipalConfiguration=") + .append(String.valueOf(resourcePrincipalConfiguration)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetResourcePrincipalConfigurationResponse)) { + return false; + } + + GetResourcePrincipalConfigurationResponse other = + (GetResourcePrincipalConfigurationResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals( + this.resourcePrincipalConfiguration, other.resourcePrincipalConfiguration); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.resourcePrincipalConfiguration == null + ? 43 + : this.resourcePrincipalConfiguration.hashCode()); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/responses/ListResourcePrincipalConfigurationsResponse.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/responses/ListResourcePrincipalConfigurationsResponse.java new file mode 100644 index 00000000000..090c306e8b6 --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/responses/ListResourcePrincipalConfigurationsResponse.java @@ -0,0 +1,224 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.responses; + +import com.oracle.bmc.bds.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +public class ListResourcePrincipalConfigurationsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of com.oracle.bmc.bds.model.ResourcePrincipalConfigurationSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.bds.model.ResourcePrincipalConfigurationSummary instances. + * @return the value + */ + public java.util.List + getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "items" + }) + private ListResourcePrincipalConfigurationsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + java.util.List items) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of com.oracle.bmc.bds.model.ResourcePrincipalConfigurationSummary instances. + */ + private java.util.List + items; + + /** + * A list of com.oracle.bmc.bds.model.ResourcePrincipalConfigurationSummary instances. + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List + items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListResourcePrincipalConfigurationsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListResourcePrincipalConfigurationsResponse build() { + return new ListResourcePrincipalConfigurationsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, items); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListResourcePrincipalConfigurationsResponse)) { + return false; + } + + ListResourcePrincipalConfigurationsResponse other = + (ListResourcePrincipalConfigurationsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/responses/RemoveResourcePrincipalConfigurationResponse.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/responses/RemoveResourcePrincipalConfigurationResponse.java new file mode 100644 index 00000000000..09d5c5a3c85 --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/responses/RemoveResourcePrincipalConfigurationResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.responses; + +import com.oracle.bmc.bds.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +public class RemoveResourcePrincipalConfigurationResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private RemoveResourcePrincipalConfigurationResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveResourcePrincipalConfigurationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RemoveResourcePrincipalConfigurationResponse build() { + return new RemoveResourcePrincipalConfigurationResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveResourcePrincipalConfigurationResponse)) { + return false; + } + + RemoveResourcePrincipalConfigurationResponse other = + (RemoveResourcePrincipalConfigurationResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-bds/src/main/java/com/oracle/bmc/bds/responses/UpdateResourcePrincipalConfigurationResponse.java b/bmc-bds/src/main/java/com/oracle/bmc/bds/responses/UpdateResourcePrincipalConfigurationResponse.java new file mode 100644 index 00000000000..64c0eaedbbc --- /dev/null +++ b/bmc-bds/src/main/java/com/oracle/bmc/bds/responses/UpdateResourcePrincipalConfigurationResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.bds.responses; + +import com.oracle.bmc.bds.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190531") +public class UpdateResourcePrincipalConfigurationResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private UpdateResourcePrincipalConfigurationResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a request, provide this request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateResourcePrincipalConfigurationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateResourcePrincipalConfigurationResponse build() { + return new UpdateResourcePrincipalConfigurationResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateResourcePrincipalConfigurationResponse)) { + return false; + } + + UpdateResourcePrincipalConfigurationResponse other = + (UpdateResourcePrincipalConfigurationResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-blockchain/pom.xml b/bmc-blockchain/pom.xml index a85549f48dc..72b802cbaf0 100644 --- a/bmc-blockchain/pom.xml +++ b/bmc-blockchain/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-blockchain @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-bom/pom.xml b/bmc-bom/pom.xml index 3e4c6aeb136..27a2b3c722d 100644 --- a/bmc-bom/pom.xml +++ b/bmc-bom/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-bom @@ -19,905 +19,941 @@ com.oracle.oci.sdk oci-java-sdk-circuitbreaker - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-enforcer-rules - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-shaded-full - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-audit - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-containerengine - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-core - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-database - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-dns - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-email - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-filestorage - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-identity - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-loadbalancer - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-objectstorage - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-addons-resteasy-client-configurator - 2.73.0 + 2.79.0 com.oracle.oci.sdk oci-java-sdk-addons-sasl - 2.73.0 + 2.79.0 com.oracle.oci.sdk oci-java-sdk-addons-oke-workload-identity - 2.73.0 + 2.79.0 com.oracle.oci.sdk oci-java-sdk-addons-graalvm - 2.73.0 + 2.79.0 com.oracle.oci.sdk oci-java-sdk-resourcesearch - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-addons-apache - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-keymanagement - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-announcementsservice - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-healthchecks - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-waas - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-streaming - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-resourcemanager - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-monitoring - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-ons - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-autoscaling - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-budget - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-workrequests - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-limits - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-functions - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-events - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-dts - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-oce - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-oda - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-analytics - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-integration - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-osmanagement - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-marketplace - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-apigateway - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-datacatalog - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-dataflow - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-datascience - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-nosql - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-secrets - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-vault - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-bds - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-encryption - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-cims - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-datasafe - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-mysql - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-dataintegration - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-ocvp - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-usageapi - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-blockchain - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-loggingingestion - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-logging - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-loganalytics - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-managementdashboard - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-sch - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-loggingsearch - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-managementagent - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-cloudguard - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-opsi - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-computeinstanceagent - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-optimizer - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-tenantmanagercontrolplane - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-rover - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-databasemanagement - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-artifacts - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-apmsynthetics - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-goldengate - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-apmcontrolplane - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-apmtraces - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-networkloadbalancer - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-vulnerabilityscanning - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-databasemigration - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-servicecatalog - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-ailanguage - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-operatoraccesscontrol - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-bastion - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-genericartifactscontent - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-jms - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-devops - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-aianomalydetection - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-datalabelingservice - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-datalabelingservicedataplane - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-apmconfig - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-waf - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-certificates - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-certificatesmanagement - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-usage - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-databasetools - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-servicemanagerproxy - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-appmgmtcontrol - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-ospgateway - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-identitydataplane - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-visualbuilder - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-osubusage - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-osubsubscription - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-osuborganizationsubscription - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-osubbillingschedule - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-dashboardservice - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-threatintelligence - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-aivision - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-aispeech - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-stackmonitoring - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-servicemesh - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-adm - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-licensemanager - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-onesubscription - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-governancerulescontrolplane - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-waa - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-networkfirewall - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-vnmonitoring - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-emwarehouse - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-lockbox - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-fusionapps - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-mediaservices - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-opa - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-opensearch - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-cloudmigrations - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-cloudbridge - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-disasterrecovery - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-containerinstances - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-aidocument - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-queue - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-recovery - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-vbsinst - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-identitydomains - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-accessgovernancecp - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-ocicontrolcenter - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-osmanagementhub - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-fleetsoftwareupdate - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-computecloudatcustomer - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-marketplacepublisher - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-redis - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-jmsjavadownloads - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-psql - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-generativeai - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-generativeaiinference - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-capacitymanagement - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-globallydistributeddatabase - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-desktops - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-emaildataplane - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-clusterplacementgroups - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-marketplaceprivateoffer - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-resourcescheduler - 2.73.0 + 2.79.0 false com.oracle.oci.sdk oci-java-sdk-demandsignal - 2.73.0 + 2.79.0 + false + + + com.oracle.oci.sdk + oci-java-sdk-fleetappsmanagement + 2.79.0 + false + + + com.oracle.oci.sdk + oci-java-sdk-delegateaccesscontrol + 2.79.0 + false + + + com.oracle.oci.sdk + oci-java-sdk-generativeaiagent + 2.79.0 + false + + + com.oracle.oci.sdk + oci-java-sdk-generativeaiagentruntime + 2.79.0 + false + + + com.oracle.oci.sdk + oci-java-sdk-securityattribute + 2.79.0 + false + + + com.oracle.oci.sdk + oci-java-sdk-zpr + 2.79.0 false diff --git a/bmc-budget/pom.xml b/bmc-budget/pom.xml index b9952b78baa..696ff40f544 100644 --- a/bmc-budget/pom.xml +++ b/bmc-budget/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-budget @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-capacitymanagement/pom.xml b/bmc-capacitymanagement/pom.xml index 4f7b96df20a..c4d92c9f0f4 100644 --- a/bmc-capacitymanagement/pom.xml +++ b/bmc-capacitymanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-capacitymanagement @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/CapacityManagement.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/CapacityManagement.java index 2b4d7569f35..cc474f37289 100644 --- a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/CapacityManagement.java +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/CapacityManagement.java @@ -8,7 +8,7 @@ import com.oracle.bmc.capacitymanagement.responses.*; /** - * A description of the OciControlCenterCp API + * OCI Control Center (OCC) Capacity Management enables you to manage capacity requests in realms where OCI Control Center Capacity Management is available. For more information, see [OCI Control Center](https://docs.cloud.oracle.com/iaas/Content/control-center/home.htm). * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. */ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") @@ -85,6 +85,30 @@ CreateOccAvailabilityCatalogResponse createOccAvailabilityCatalog( CreateOccCapacityRequestResponse createOccCapacityRequest( CreateOccCapacityRequestRequest request); + /** + * Create customer. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateOccCustomer API. + */ + CreateOccCustomerResponse createOccCustomer(CreateOccCustomerRequest request); + + /** + * Create customer group. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateOccCustomerGroup API. + */ + CreateOccCustomerGroupResponse createOccCustomerGroup(CreateOccCustomerGroupRequest request); + /** * Deletes the availability catalog resource. * @param request The request object containing the details to send @@ -111,6 +135,30 @@ DeleteOccAvailabilityCatalogResponse deleteOccAvailabilityCatalog( DeleteOccCapacityRequestResponse deleteOccCapacityRequest( DeleteOccCapacityRequestRequest request); + /** + * Deletes the customer resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteOccCustomer API. + */ + DeleteOccCustomerResponse deleteOccCustomer(DeleteOccCustomerRequest request); + + /** + * Deletes the customer group resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteOccCustomerGroup API. + */ + DeleteOccCustomerGroupResponse deleteOccCustomerGroup(DeleteOccCustomerGroupRequest request); + /** * Get details about availability catalog. * @param request The request object containing the details to send @@ -177,6 +225,34 @@ GetOccAvailabilityCatalogContentResponse getOccAvailabilityCatalogContent( ListInternalNamespaceOccOverviewsResponse listInternalNamespaceOccOverviews( ListInternalNamespaceOccOverviewsRequest request); + /** + * List details about a given occHandoverResourceBlock. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListInternalOccHandoverResourceBlockDetails API. + */ + ListInternalOccHandoverResourceBlockDetailsResponse listInternalOccHandoverResourceBlockDetails( + ListInternalOccHandoverResourceBlockDetailsRequest request); + + /** + * List Occ Handover Resource blocks. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListInternalOccHandoverResourceBlocks API. + */ + ListInternalOccHandoverResourceBlocksResponse listInternalOccHandoverResourceBlocks( + ListInternalOccHandoverResourceBlocksRequest request); + /** * Lists availabilities for a particular availability catalog. * @param request The request object containing the details to send @@ -253,6 +329,34 @@ ListOccCapacityRequestsInternalResponse listOccCapacityRequestsInternal( */ ListOccCustomerGroupsResponse listOccCustomerGroups(ListOccCustomerGroupsRequest request); + /** + * List details about a given occHandoverResourceBlock. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListOccHandoverResourceBlockDetails API. + */ + ListOccHandoverResourceBlockDetailsResponse listOccHandoverResourceBlockDetails( + ListOccHandoverResourceBlockDetailsRequest request); + + /** + * List Occ Handover Resource blocks. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListOccHandoverResourceBlocks API. + */ + ListOccHandoverResourceBlocksResponse listOccHandoverResourceBlocks( + ListOccHandoverResourceBlocksRequest request); + /** * Lists an overview of all resources in that namespace in a given time interval. * @@ -344,6 +448,30 @@ UpdateOccAvailabilityCatalogResponse updateOccAvailabilityCatalog( UpdateOccCapacityRequestResponse updateOccCapacityRequest( UpdateOccCapacityRequestRequest request); + /** + * The request to update the customer. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateOccCustomer API. + */ + UpdateOccCustomerResponse updateOccCustomer(UpdateOccCustomerRequest request); + + /** + * The request to update the customer group. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateOccCustomerGroup API. + */ + UpdateOccCustomerGroupResponse updateOccCustomerGroup(UpdateOccCustomerGroupRequest request); + /** * Gets the pre-configured waiters available for resources for this service. * diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/CapacityManagementAsync.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/CapacityManagementAsync.java index bac506f4f97..21bd7545e9a 100644 --- a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/CapacityManagementAsync.java +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/CapacityManagementAsync.java @@ -8,7 +8,7 @@ import com.oracle.bmc.capacitymanagement.responses.*; /** - * A description of the OciControlCenterCp API + * OCI Control Center (OCC) Capacity Management enables you to manage capacity requests in realms where OCI Control Center Capacity Management is available. For more information, see [OCI Control Center](https://docs.cloud.oracle.com/iaas/Content/control-center/home.htm). */ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") public interface CapacityManagementAsync extends AutoCloseable { @@ -91,6 +91,38 @@ java.util.concurrent.Future createOccCapacityR CreateOccCapacityRequestRequest, CreateOccCapacityRequestResponse> handler); + /** + * Create customer. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createOccCustomer( + CreateOccCustomerRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateOccCustomerRequest, CreateOccCustomerResponse> + handler); + + /** + * Create customer group. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createOccCustomerGroup( + CreateOccCustomerGroupRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateOccCustomerGroupRequest, CreateOccCustomerGroupResponse> + handler); + /** * Deletes the availability catalog resource. * @@ -124,6 +156,38 @@ java.util.concurrent.Future deleteOccCapacityR DeleteOccCapacityRequestRequest, DeleteOccCapacityRequestResponse> handler); + /** + * Deletes the customer resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteOccCustomer( + DeleteOccCustomerRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteOccCustomerRequest, DeleteOccCustomerResponse> + handler); + + /** + * Deletes the customer group resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteOccCustomerGroup( + DeleteOccCustomerGroupRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteOccCustomerGroupRequest, DeleteOccCustomerGroupResponse> + handler); + /** * Get details about availability catalog. * @@ -211,6 +275,44 @@ java.util.concurrent.Future getOccCustomerGroup( ListInternalNamespaceOccOverviewsResponse> handler); + /** + * List details about a given occHandoverResourceBlock. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listInternalOccHandoverResourceBlockDetails( + ListInternalOccHandoverResourceBlockDetailsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListInternalOccHandoverResourceBlockDetailsRequest, + ListInternalOccHandoverResourceBlockDetailsResponse> + handler); + + /** + * List Occ Handover Resource blocks. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listInternalOccHandoverResourceBlocks( + ListInternalOccHandoverResourceBlocksRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListInternalOccHandoverResourceBlocksRequest, + ListInternalOccHandoverResourceBlocksResponse> + handler); + /** * Lists availabilities for a particular availability catalog. * @@ -312,6 +414,44 @@ java.util.concurrent.Future listOccCustomerGroups ListOccCustomerGroupsRequest, ListOccCustomerGroupsResponse> handler); + /** + * List details about a given occHandoverResourceBlock. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listOccHandoverResourceBlockDetails( + ListOccHandoverResourceBlockDetailsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListOccHandoverResourceBlockDetailsRequest, + ListOccHandoverResourceBlockDetailsResponse> + handler); + + /** + * List Occ Handover Resource blocks. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listOccHandoverResourceBlocks( + ListOccHandoverResourceBlocksRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListOccHandoverResourceBlocksRequest, + ListOccHandoverResourceBlocksResponse> + handler); + /** * Lists an overview of all resources in that namespace in a given time interval. * @@ -431,4 +571,36 @@ java.util.concurrent.Future updateOccCapacityR com.oracle.bmc.responses.AsyncHandler< UpdateOccCapacityRequestRequest, UpdateOccCapacityRequestResponse> handler); + + /** + * The request to update the customer. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateOccCustomer( + UpdateOccCustomerRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateOccCustomerRequest, UpdateOccCustomerResponse> + handler); + + /** + * The request to update the customer group. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateOccCustomerGroup( + UpdateOccCustomerGroupRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateOccCustomerGroupRequest, UpdateOccCustomerGroupResponse> + handler); } diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/CapacityManagementAsyncClient.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/CapacityManagementAsyncClient.java index e1f4df3e6e9..cf08878b159 100644 --- a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/CapacityManagementAsyncClient.java +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/CapacityManagementAsyncClient.java @@ -484,7 +484,7 @@ public void close() { "CapacityManagement", "CreateOccAvailabilityCatalog", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccAvailabilityCatalog/CreateOccAvailabilityCatalog"); final java.util.function.Function< javax.ws.rs.core.Response, CreateOccAvailabilityCatalogResponse> transformer = @@ -539,7 +539,7 @@ public java.util.concurrent.Future createOccCa "CapacityManagement", "CreateOccCapacityRequest", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCapacityRequest/CreateOccCapacityRequest"); final java.util.function.Function< javax.ws.rs.core.Response, CreateOccCapacityRequestResponse> transformer = @@ -576,6 +576,111 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future createOccCustomer( + CreateOccCustomerRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateOccCustomerRequest, CreateOccCustomerResponse> + handler) { + LOG.trace("Called async createOccCustomer"); + final CreateOccCustomerRequest interceptedRequest = + CreateOccCustomerConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateOccCustomerConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "CapacityManagement", + "CreateOccCustomer", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCustomer/CreateOccCustomer"); + final java.util.function.Function + transformer = + CreateOccCustomerConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateOccCustomerRequest, CreateOccCustomerResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateOccCustomerDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateOccCustomerRequest, CreateOccCustomerResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createOccCustomerGroup( + CreateOccCustomerGroupRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateOccCustomerGroupRequest, CreateOccCustomerGroupResponse> + handler) { + LOG.trace("Called async createOccCustomerGroup"); + final CreateOccCustomerGroupRequest interceptedRequest = + CreateOccCustomerGroupConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateOccCustomerGroupConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "CapacityManagement", + "CreateOccCustomerGroup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCustomerGroup/CreateOccCustomerGroup"); + final java.util.function.Function + transformer = + CreateOccCustomerGroupConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateOccCustomerGroupRequest, CreateOccCustomerGroupResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateOccCustomerGroupRequest, CreateOccCustomerGroupResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateOccCustomerGroupDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateOccCustomerGroupRequest, CreateOccCustomerGroupResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteOccAvailabilityCatalog( @@ -594,7 +699,7 @@ protected void beforeRetryAction() {} "CapacityManagement", "DeleteOccAvailabilityCatalog", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccAvailabilityCatalog/DeleteOccAvailabilityCatalog"); final java.util.function.Function< javax.ws.rs.core.Response, DeleteOccAvailabilityCatalogResponse> transformer = @@ -643,7 +748,7 @@ public java.util.concurrent.Future deleteOccCa "CapacityManagement", "DeleteOccCapacityRequest", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCapacityRequest/DeleteOccCapacityRequest"); final java.util.function.Function< javax.ws.rs.core.Response, DeleteOccCapacityRequestResponse> transformer = @@ -675,6 +780,99 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future deleteOccCustomer( + DeleteOccCustomerRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteOccCustomerRequest, DeleteOccCustomerResponse> + handler) { + LOG.trace("Called async deleteOccCustomer"); + final DeleteOccCustomerRequest interceptedRequest = + DeleteOccCustomerConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteOccCustomerConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "CapacityManagement", + "DeleteOccCustomer", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCustomer/DeleteOccCustomer"); + final java.util.function.Function + transformer = + DeleteOccCustomerConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteOccCustomerRequest, DeleteOccCustomerResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteOccCustomerRequest, DeleteOccCustomerResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteOccCustomerGroup( + DeleteOccCustomerGroupRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteOccCustomerGroupRequest, DeleteOccCustomerGroupResponse> + handler) { + LOG.trace("Called async deleteOccCustomerGroup"); + final DeleteOccCustomerGroupRequest interceptedRequest = + DeleteOccCustomerGroupConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteOccCustomerGroupConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "CapacityManagement", + "DeleteOccCustomerGroup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCustomerGroup/DeleteOccCustomerGroup"); + final java.util.function.Function + transformer = + DeleteOccCustomerGroupConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteOccCustomerGroupRequest, DeleteOccCustomerGroupResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteOccCustomerGroupRequest, DeleteOccCustomerGroupResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteOccCustomerGroupRequest, DeleteOccCustomerGroupResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getOccAvailabilityCatalog( GetOccAvailabilityCatalogRequest request, @@ -691,7 +889,7 @@ public java.util.concurrent.Future getOccAvai "CapacityManagement", "GetOccAvailabilityCatalog", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccAvailabilityCatalog/GetOccAvailabilityCatalog"); final java.util.function.Function< javax.ws.rs.core.Response, GetOccAvailabilityCatalogResponse> transformer = @@ -743,7 +941,7 @@ protected void beforeRetryAction() {} "CapacityManagement", "GetOccAvailabilityCatalogContent", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccAvailabilityCatalog/GetOccAvailabilityCatalogContent"); final java.util.function.Function< javax.ws.rs.core.Response, GetOccAvailabilityCatalogContentResponse> transformer = @@ -794,7 +992,7 @@ public java.util.concurrent.Future getOccCapacity "CapacityManagement", "GetOccCapacityRequest", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCapacityRequest/GetOccCapacityRequest"); final java.util.function.Function transformer = GetOccCapacityRequestConverter.fromResponse( @@ -841,7 +1039,7 @@ public java.util.concurrent.Future getOccCustomerGr "CapacityManagement", "GetOccCustomerGroup", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCustomerGroup/GetOccCustomerGroup"); final java.util.function.Function transformer = GetOccCustomerGroupConverter.fromResponse( @@ -890,7 +1088,7 @@ protected void beforeRetryAction() {} "CapacityManagement", "ListInternalNamespaceOccOverviews", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccOverviewCollection/ListInternalNamespaceOccOverviews"); final java.util.function.Function< javax.ws.rs.core.Response, ListInternalNamespaceOccOverviewsResponse> transformer = @@ -925,6 +1123,116 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + listInternalOccHandoverResourceBlockDetails( + ListInternalOccHandoverResourceBlockDetailsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListInternalOccHandoverResourceBlockDetailsRequest, + ListInternalOccHandoverResourceBlockDetailsResponse> + handler) { + LOG.trace("Called async listInternalOccHandoverResourceBlockDetails"); + final ListInternalOccHandoverResourceBlockDetailsRequest interceptedRequest = + ListInternalOccHandoverResourceBlockDetailsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListInternalOccHandoverResourceBlockDetailsConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "CapacityManagement", + "ListInternalOccHandoverResourceBlockDetails", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccHandoverResourceBlockDetailCollection/ListInternalOccHandoverResourceBlockDetails"); + final java.util.function.Function< + javax.ws.rs.core.Response, + ListInternalOccHandoverResourceBlockDetailsResponse> + transformer = + ListInternalOccHandoverResourceBlockDetailsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListInternalOccHandoverResourceBlockDetailsRequest, + ListInternalOccHandoverResourceBlockDetailsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListInternalOccHandoverResourceBlockDetailsRequest, + ListInternalOccHandoverResourceBlockDetailsResponse>, + java.util.concurrent.Future< + ListInternalOccHandoverResourceBlockDetailsResponse>> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListInternalOccHandoverResourceBlockDetailsRequest, + ListInternalOccHandoverResourceBlockDetailsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listInternalOccHandoverResourceBlocks( + ListInternalOccHandoverResourceBlocksRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListInternalOccHandoverResourceBlocksRequest, + ListInternalOccHandoverResourceBlocksResponse> + handler) { + LOG.trace("Called async listInternalOccHandoverResourceBlocks"); + final ListInternalOccHandoverResourceBlocksRequest interceptedRequest = + ListInternalOccHandoverResourceBlocksConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListInternalOccHandoverResourceBlocksConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "CapacityManagement", + "ListInternalOccHandoverResourceBlocks", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccHandoverResourceBlockCollection/ListInternalOccHandoverResourceBlocks"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListInternalOccHandoverResourceBlocksResponse> + transformer = + ListInternalOccHandoverResourceBlocksConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListInternalOccHandoverResourceBlocksRequest, + ListInternalOccHandoverResourceBlocksResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListInternalOccHandoverResourceBlocksRequest, + ListInternalOccHandoverResourceBlocksResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListInternalOccHandoverResourceBlocksRequest, + ListInternalOccHandoverResourceBlocksResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listOccAvailabilities( ListOccAvailabilitiesRequest request, @@ -941,7 +1249,7 @@ public java.util.concurrent.Future listOccAvailab "CapacityManagement", "ListOccAvailabilities", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccAvailabilityCollection/ListOccAvailabilities"); final java.util.function.Function transformer = ListOccAvailabilitiesConverter.fromResponse( @@ -990,7 +1298,7 @@ protected void beforeRetryAction() {} "CapacityManagement", "ListOccAvailabilityCatalogs", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccAvailabilityCatalogCollection/ListOccAvailabilityCatalogs"); final java.util.function.Function< javax.ws.rs.core.Response, ListOccAvailabilityCatalogsResponse> transformer = @@ -1042,7 +1350,7 @@ protected void beforeRetryAction() {} "CapacityManagement", "ListOccAvailabilityCatalogsInternal", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccAvailabilityCatalogCollection/ListOccAvailabilityCatalogsInternal"); final java.util.function.Function< javax.ws.rs.core.Response, ListOccAvailabilityCatalogsInternalResponse> transformer = @@ -1093,7 +1401,7 @@ public java.util.concurrent.Future listOccCapac "CapacityManagement", "ListOccCapacityRequests", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCapacityRequestCollection/ListOccCapacityRequests"); final java.util.function.Function< javax.ws.rs.core.Response, ListOccCapacityRequestsResponse> transformer = @@ -1143,7 +1451,7 @@ protected void beforeRetryAction() {} "CapacityManagement", "ListOccCapacityRequestsInternal", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCapacityRequestCollection/ListOccCapacityRequestsInternal"); final java.util.function.Function< javax.ws.rs.core.Response, ListOccCapacityRequestsInternalResponse> transformer = @@ -1194,7 +1502,7 @@ public java.util.concurrent.Future listOccCustome "CapacityManagement", "ListOccCustomerGroups", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCustomerGroupCollection/ListOccCustomerGroups"); final java.util.function.Function transformer = ListOccCustomerGroupsConverter.fromResponse( @@ -1225,6 +1533,111 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + listOccHandoverResourceBlockDetails( + ListOccHandoverResourceBlockDetailsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListOccHandoverResourceBlockDetailsRequest, + ListOccHandoverResourceBlockDetailsResponse> + handler) { + LOG.trace("Called async listOccHandoverResourceBlockDetails"); + final ListOccHandoverResourceBlockDetailsRequest interceptedRequest = + ListOccHandoverResourceBlockDetailsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListOccHandoverResourceBlockDetailsConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "CapacityManagement", + "ListOccHandoverResourceBlockDetails", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccHandoverResourceBlockDetailCollection/ListOccHandoverResourceBlockDetails"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListOccHandoverResourceBlockDetailsResponse> + transformer = + ListOccHandoverResourceBlockDetailsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListOccHandoverResourceBlockDetailsRequest, + ListOccHandoverResourceBlockDetailsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListOccHandoverResourceBlockDetailsRequest, + ListOccHandoverResourceBlockDetailsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListOccHandoverResourceBlockDetailsRequest, + ListOccHandoverResourceBlockDetailsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listOccHandoverResourceBlocks( + ListOccHandoverResourceBlocksRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListOccHandoverResourceBlocksRequest, + ListOccHandoverResourceBlocksResponse> + handler) { + LOG.trace("Called async listOccHandoverResourceBlocks"); + final ListOccHandoverResourceBlocksRequest interceptedRequest = + ListOccHandoverResourceBlocksConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListOccHandoverResourceBlocksConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "CapacityManagement", + "ListOccHandoverResourceBlocks", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccHandoverResourceBlockCollection/ListOccHandoverResourceBlocks"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListOccHandoverResourceBlocksResponse> + transformer = + ListOccHandoverResourceBlocksConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListOccHandoverResourceBlocksRequest, ListOccHandoverResourceBlocksResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListOccHandoverResourceBlocksRequest, + ListOccHandoverResourceBlocksResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListOccHandoverResourceBlocksRequest, ListOccHandoverResourceBlocksResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listOccOverviews( ListOccOverviewsRequest request, @@ -1241,7 +1654,7 @@ public java.util.concurrent.Future listOccOverviews( "CapacityManagement", "ListOccOverviews", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccOverviewCollection/ListOccOverviews"); final java.util.function.Function transformer = ListOccOverviewsConverter.fromResponse( @@ -1289,7 +1702,7 @@ protected void beforeRetryAction() {} "CapacityManagement", "PatchInternalOccCapacityRequest", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCapacityRequest/PatchInternalOccCapacityRequest"); final java.util.function.Function< javax.ws.rs.core.Response, PatchInternalOccCapacityRequestResponse> transformer = @@ -1345,7 +1758,7 @@ public java.util.concurrent.Future patchOccCapa "CapacityManagement", "PatchOccCapacityRequest", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCapacityRequest/PatchOccCapacityRequest"); final java.util.function.Function< javax.ws.rs.core.Response, PatchOccCapacityRequestResponse> transformer = @@ -1401,7 +1814,7 @@ protected void beforeRetryAction() {} "CapacityManagement", "PublishOccAvailabilityCatalog", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccAvailabilityCatalog/PublishOccAvailabilityCatalog"); final java.util.function.Function< javax.ws.rs.core.Response, PublishOccAvailabilityCatalogResponse> transformer = @@ -1452,7 +1865,7 @@ protected void beforeRetryAction() {} "CapacityManagement", "UpdateInternalOccCapacityRequest", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCapacityRequest/UpdateInternalOccCapacityRequest"); final java.util.function.Function< javax.ws.rs.core.Response, UpdateInternalOccCapacityRequestResponse> transformer = @@ -1510,7 +1923,7 @@ protected void beforeRetryAction() {} "CapacityManagement", "UpdateOccAvailabilityCatalog", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccAvailabilityCatalog/UpdateOccAvailabilityCatalog"); final java.util.function.Function< javax.ws.rs.core.Response, UpdateOccAvailabilityCatalogResponse> transformer = @@ -1564,7 +1977,7 @@ public java.util.concurrent.Future updateOccCa "CapacityManagement", "UpdateOccCapacityRequest", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCapacityRequest/UpdateOccCapacityRequest"); final java.util.function.Function< javax.ws.rs.core.Response, UpdateOccCapacityRequestResponse> transformer = @@ -1600,4 +2013,107 @@ protected void beforeRetryAction() {} return futureSupplier.apply(handlerToUse); } } + + @Override + public java.util.concurrent.Future updateOccCustomer( + UpdateOccCustomerRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateOccCustomerRequest, UpdateOccCustomerResponse> + handler) { + LOG.trace("Called async updateOccCustomer"); + final UpdateOccCustomerRequest interceptedRequest = + UpdateOccCustomerConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateOccCustomerConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "CapacityManagement", + "UpdateOccCustomer", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCustomer/UpdateOccCustomer"); + final java.util.function.Function + transformer = + UpdateOccCustomerConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateOccCustomerRequest, UpdateOccCustomerResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateOccCustomerDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateOccCustomerRequest, UpdateOccCustomerResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateOccCustomerGroup( + UpdateOccCustomerGroupRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateOccCustomerGroupRequest, UpdateOccCustomerGroupResponse> + handler) { + LOG.trace("Called async updateOccCustomerGroup"); + final UpdateOccCustomerGroupRequest interceptedRequest = + UpdateOccCustomerGroupConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateOccCustomerGroupConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "CapacityManagement", + "UpdateOccCustomerGroup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCustomerGroup/UpdateOccCustomerGroup"); + final java.util.function.Function + transformer = + UpdateOccCustomerGroupConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateOccCustomerGroupRequest, UpdateOccCustomerGroupResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateOccCustomerGroupRequest, UpdateOccCustomerGroupResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateOccCustomerGroupDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateOccCustomerGroupRequest, UpdateOccCustomerGroupResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } } diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/CapacityManagementClient.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/CapacityManagementClient.java index b9da5aa69a1..ecf769b21a4 100644 --- a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/CapacityManagementClient.java +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/CapacityManagementClient.java @@ -573,7 +573,7 @@ public CreateOccAvailabilityCatalogResponse createOccAvailabilityCatalog( "CapacityManagement", "CreateOccAvailabilityCatalog", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccAvailabilityCatalog/CreateOccAvailabilityCatalog"); java.util.function.Function transformer = CreateOccAvailabilityCatalogConverter.fromResponse( @@ -617,7 +617,7 @@ public CreateOccCapacityRequestResponse createOccCapacityRequest( "CapacityManagement", "CreateOccCapacityRequest", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCapacityRequest/CreateOccCapacityRequest"); java.util.function.Function transformer = CreateOccCapacityRequestConverter.fromResponse( @@ -641,6 +641,91 @@ public CreateOccCapacityRequestResponse createOccCapacityRequest( }); } + @Override + public CreateOccCustomerResponse createOccCustomer(CreateOccCustomerRequest request) { + LOG.trace("Called createOccCustomer"); + final CreateOccCustomerRequest interceptedRequest = + CreateOccCustomerConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateOccCustomerConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "CapacityManagement", + "CreateOccCustomer", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCustomer/CreateOccCustomer"); + java.util.function.Function + transformer = + CreateOccCustomerConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateOccCustomerDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateOccCustomerGroupResponse createOccCustomerGroup( + CreateOccCustomerGroupRequest request) { + LOG.trace("Called createOccCustomerGroup"); + final CreateOccCustomerGroupRequest interceptedRequest = + CreateOccCustomerGroupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateOccCustomerGroupConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "CapacityManagement", + "CreateOccCustomerGroup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCustomerGroup/CreateOccCustomerGroup"); + java.util.function.Function + transformer = + CreateOccCustomerGroupConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateOccCustomerGroupDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DeleteOccAvailabilityCatalogResponse deleteOccAvailabilityCatalog( DeleteOccAvailabilityCatalogRequest request) { @@ -659,7 +744,7 @@ public DeleteOccAvailabilityCatalogResponse deleteOccAvailabilityCatalog( "CapacityManagement", "DeleteOccAvailabilityCatalog", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccAvailabilityCatalog/DeleteOccAvailabilityCatalog"); java.util.function.Function transformer = DeleteOccAvailabilityCatalogConverter.fromResponse( @@ -698,7 +783,7 @@ public DeleteOccCapacityRequestResponse deleteOccCapacityRequest( "CapacityManagement", "DeleteOccCapacityRequest", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCapacityRequest/DeleteOccCapacityRequest"); java.util.function.Function transformer = DeleteOccCapacityRequestConverter.fromResponse( @@ -719,6 +804,83 @@ public DeleteOccCapacityRequestResponse deleteOccCapacityRequest( }); } + @Override + public DeleteOccCustomerResponse deleteOccCustomer(DeleteOccCustomerRequest request) { + LOG.trace("Called deleteOccCustomer"); + final DeleteOccCustomerRequest interceptedRequest = + DeleteOccCustomerConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteOccCustomerConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "CapacityManagement", + "DeleteOccCustomer", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCustomer/DeleteOccCustomer"); + java.util.function.Function + transformer = + DeleteOccCustomerConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteOccCustomerGroupResponse deleteOccCustomerGroup( + DeleteOccCustomerGroupRequest request) { + LOG.trace("Called deleteOccCustomerGroup"); + final DeleteOccCustomerGroupRequest interceptedRequest = + DeleteOccCustomerGroupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteOccCustomerGroupConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "CapacityManagement", + "DeleteOccCustomerGroup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCustomerGroup/DeleteOccCustomerGroup"); + java.util.function.Function + transformer = + DeleteOccCustomerGroupConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetOccAvailabilityCatalogResponse getOccAvailabilityCatalog( GetOccAvailabilityCatalogRequest request) { @@ -737,7 +899,7 @@ public GetOccAvailabilityCatalogResponse getOccAvailabilityCatalog( "CapacityManagement", "GetOccAvailabilityCatalog", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccAvailabilityCatalog/GetOccAvailabilityCatalog"); java.util.function.Function transformer = GetOccAvailabilityCatalogConverter.fromResponse( @@ -776,7 +938,7 @@ public GetOccAvailabilityCatalogContentResponse getOccAvailabilityCatalogContent "CapacityManagement", "GetOccAvailabilityCatalogContent", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccAvailabilityCatalog/GetOccAvailabilityCatalogContent"); java.util.function.Function< javax.ws.rs.core.Response, GetOccAvailabilityCatalogContentResponse> transformer = @@ -815,7 +977,7 @@ public GetOccCapacityRequestResponse getOccCapacityRequest( "CapacityManagement", "GetOccCapacityRequest", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCapacityRequest/GetOccCapacityRequest"); java.util.function.Function transformer = GetOccCapacityRequestConverter.fromResponse( @@ -852,7 +1014,7 @@ public GetOccCustomerGroupResponse getOccCustomerGroup(GetOccCustomerGroupReques "CapacityManagement", "GetOccCustomerGroup", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCustomerGroup/GetOccCustomerGroup"); java.util.function.Function transformer = GetOccCustomerGroupConverter.fromResponse( @@ -890,7 +1052,7 @@ public ListInternalNamespaceOccOverviewsResponse listInternalNamespaceOccOvervie "CapacityManagement", "ListInternalNamespaceOccOverviews", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccOverviewCollection/ListInternalNamespaceOccOverviews"); java.util.function.Function< javax.ws.rs.core.Response, ListInternalNamespaceOccOverviewsResponse> transformer = @@ -911,6 +1073,88 @@ public ListInternalNamespaceOccOverviewsResponse listInternalNamespaceOccOvervie }); } + @Override + public ListInternalOccHandoverResourceBlockDetailsResponse + listInternalOccHandoverResourceBlockDetails( + ListInternalOccHandoverResourceBlockDetailsRequest request) { + LOG.trace("Called listInternalOccHandoverResourceBlockDetails"); + final ListInternalOccHandoverResourceBlockDetailsRequest interceptedRequest = + ListInternalOccHandoverResourceBlockDetailsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListInternalOccHandoverResourceBlockDetailsConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "CapacityManagement", + "ListInternalOccHandoverResourceBlockDetails", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccHandoverResourceBlockDetailCollection/ListInternalOccHandoverResourceBlockDetails"); + java.util.function.Function< + javax.ws.rs.core.Response, + ListInternalOccHandoverResourceBlockDetailsResponse> + transformer = + ListInternalOccHandoverResourceBlockDetailsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListInternalOccHandoverResourceBlocksResponse listInternalOccHandoverResourceBlocks( + ListInternalOccHandoverResourceBlocksRequest request) { + LOG.trace("Called listInternalOccHandoverResourceBlocks"); + final ListInternalOccHandoverResourceBlocksRequest interceptedRequest = + ListInternalOccHandoverResourceBlocksConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListInternalOccHandoverResourceBlocksConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "CapacityManagement", + "ListInternalOccHandoverResourceBlocks", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccHandoverResourceBlockCollection/ListInternalOccHandoverResourceBlocks"); + java.util.function.Function< + javax.ws.rs.core.Response, ListInternalOccHandoverResourceBlocksResponse> + transformer = + ListInternalOccHandoverResourceBlocksConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListOccAvailabilitiesResponse listOccAvailabilities( ListOccAvailabilitiesRequest request) { @@ -929,7 +1173,7 @@ public ListOccAvailabilitiesResponse listOccAvailabilities( "CapacityManagement", "ListOccAvailabilities", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccAvailabilityCollection/ListOccAvailabilities"); java.util.function.Function transformer = ListOccAvailabilitiesConverter.fromResponse( @@ -967,7 +1211,7 @@ public ListOccAvailabilityCatalogsResponse listOccAvailabilityCatalogs( "CapacityManagement", "ListOccAvailabilityCatalogs", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccAvailabilityCatalogCollection/ListOccAvailabilityCatalogs"); java.util.function.Function transformer = ListOccAvailabilityCatalogsConverter.fromResponse( @@ -1006,7 +1250,7 @@ public ListOccAvailabilityCatalogsInternalResponse listOccAvailabilityCatalogsIn "CapacityManagement", "ListOccAvailabilityCatalogsInternal", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccAvailabilityCatalogCollection/ListOccAvailabilityCatalogsInternal"); java.util.function.Function< javax.ws.rs.core.Response, ListOccAvailabilityCatalogsInternalResponse> transformer = @@ -1045,7 +1289,7 @@ public ListOccCapacityRequestsResponse listOccCapacityRequests( "CapacityManagement", "ListOccCapacityRequests", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCapacityRequestCollection/ListOccCapacityRequests"); java.util.function.Function transformer = ListOccCapacityRequestsConverter.fromResponse( @@ -1083,7 +1327,7 @@ public ListOccCapacityRequestsInternalResponse listOccCapacityRequestsInternal( "CapacityManagement", "ListOccCapacityRequestsInternal", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCapacityRequestCollection/ListOccCapacityRequestsInternal"); java.util.function.Function< javax.ws.rs.core.Response, ListOccCapacityRequestsInternalResponse> transformer = @@ -1122,7 +1366,7 @@ public ListOccCustomerGroupsResponse listOccCustomerGroups( "CapacityManagement", "ListOccCustomerGroups", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCustomerGroupCollection/ListOccCustomerGroups"); java.util.function.Function transformer = ListOccCustomerGroupsConverter.fromResponse( @@ -1142,6 +1386,85 @@ public ListOccCustomerGroupsResponse listOccCustomerGroups( }); } + @Override + public ListOccHandoverResourceBlockDetailsResponse listOccHandoverResourceBlockDetails( + ListOccHandoverResourceBlockDetailsRequest request) { + LOG.trace("Called listOccHandoverResourceBlockDetails"); + final ListOccHandoverResourceBlockDetailsRequest interceptedRequest = + ListOccHandoverResourceBlockDetailsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListOccHandoverResourceBlockDetailsConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "CapacityManagement", + "ListOccHandoverResourceBlockDetails", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccHandoverResourceBlockDetailCollection/ListOccHandoverResourceBlockDetails"); + java.util.function.Function< + javax.ws.rs.core.Response, ListOccHandoverResourceBlockDetailsResponse> + transformer = + ListOccHandoverResourceBlockDetailsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListOccHandoverResourceBlocksResponse listOccHandoverResourceBlocks( + ListOccHandoverResourceBlocksRequest request) { + LOG.trace("Called listOccHandoverResourceBlocks"); + final ListOccHandoverResourceBlocksRequest interceptedRequest = + ListOccHandoverResourceBlocksConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListOccHandoverResourceBlocksConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "CapacityManagement", + "ListOccHandoverResourceBlocks", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccHandoverResourceBlockCollection/ListOccHandoverResourceBlocks"); + java.util.function.Function< + javax.ws.rs.core.Response, ListOccHandoverResourceBlocksResponse> + transformer = + ListOccHandoverResourceBlocksConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListOccOverviewsResponse listOccOverviews(ListOccOverviewsRequest request) { LOG.trace("Called listOccOverviews"); @@ -1159,7 +1482,7 @@ public ListOccOverviewsResponse listOccOverviews(ListOccOverviewsRequest request "CapacityManagement", "ListOccOverviews", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccOverviewCollection/ListOccOverviews"); java.util.function.Function transformer = ListOccOverviewsConverter.fromResponse( @@ -1197,7 +1520,7 @@ public PatchInternalOccCapacityRequestResponse patchInternalOccCapacityRequest( "CapacityManagement", "PatchInternalOccCapacityRequest", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCapacityRequest/PatchInternalOccCapacityRequest"); java.util.function.Function< javax.ws.rs.core.Response, PatchInternalOccCapacityRequestResponse> transformer = @@ -1240,7 +1563,7 @@ public PatchOccCapacityRequestResponse patchOccCapacityRequest( "CapacityManagement", "PatchOccCapacityRequest", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCapacityRequest/PatchOccCapacityRequest"); java.util.function.Function transformer = PatchOccCapacityRequestConverter.fromResponse( @@ -1283,7 +1606,7 @@ public PublishOccAvailabilityCatalogResponse publishOccAvailabilityCatalog( "CapacityManagement", "PublishOccAvailabilityCatalog", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccAvailabilityCatalog/PublishOccAvailabilityCatalog"); java.util.function.Function< javax.ws.rs.core.Response, PublishOccAvailabilityCatalogResponse> transformer = @@ -1323,7 +1646,7 @@ public UpdateInternalOccCapacityRequestResponse updateInternalOccCapacityRequest "CapacityManagement", "UpdateInternalOccCapacityRequest", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCapacityRequest/UpdateInternalOccCapacityRequest"); java.util.function.Function< javax.ws.rs.core.Response, UpdateInternalOccCapacityRequestResponse> transformer = @@ -1367,7 +1690,7 @@ public UpdateOccAvailabilityCatalogResponse updateOccAvailabilityCatalog( "CapacityManagement", "UpdateOccAvailabilityCatalog", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccAvailabilityCatalog/UpdateOccAvailabilityCatalog"); java.util.function.Function transformer = UpdateOccAvailabilityCatalogConverter.fromResponse( @@ -1410,7 +1733,7 @@ public UpdateOccCapacityRequestResponse updateOccCapacityRequest( "CapacityManagement", "UpdateOccCapacityRequest", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCapacityRequest/UpdateOccCapacityRequest"); java.util.function.Function transformer = UpdateOccCapacityRequestConverter.fromResponse( @@ -1434,6 +1757,89 @@ public UpdateOccCapacityRequestResponse updateOccCapacityRequest( }); } + @Override + public UpdateOccCustomerResponse updateOccCustomer(UpdateOccCustomerRequest request) { + LOG.trace("Called updateOccCustomer"); + final UpdateOccCustomerRequest interceptedRequest = + UpdateOccCustomerConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateOccCustomerConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "CapacityManagement", + "UpdateOccCustomer", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCustomer/UpdateOccCustomer"); + java.util.function.Function + transformer = + UpdateOccCustomerConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateOccCustomerDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateOccCustomerGroupResponse updateOccCustomerGroup( + UpdateOccCustomerGroupRequest request) { + LOG.trace("Called updateOccCustomerGroup"); + final UpdateOccCustomerGroupRequest interceptedRequest = + UpdateOccCustomerGroupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateOccCustomerGroupConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "CapacityManagement", + "UpdateOccCustomerGroup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/occcm/20231107/OccCustomerGroup/UpdateOccCustomerGroup"); + java.util.function.Function + transformer = + UpdateOccCustomerGroupConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateOccCustomerGroupDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public CapacityManagementWaiters getWaiters() { return waiters; diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/CapacityManagementPaginators.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/CapacityManagementPaginators.java index 13394249211..3ccea91aadf 100644 --- a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/CapacityManagementPaginators.java +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/CapacityManagementPaginators.java @@ -160,6 +160,272 @@ public ListInternalNamespaceOccOverviewsResponse apply( }); } + /** + * Creates a new iterable which will iterate over the responses received from the listInternalOccHandoverResourceBlockDetails operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listInternalOccHandoverResourceBlockDetailsResponseIterator( + final ListInternalOccHandoverResourceBlockDetailsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListInternalOccHandoverResourceBlockDetailsRequest.Builder, + ListInternalOccHandoverResourceBlockDetailsRequest, + ListInternalOccHandoverResourceBlockDetailsResponse>( + new java.util.function.Supplier< + ListInternalOccHandoverResourceBlockDetailsRequest.Builder>() { + @Override + public ListInternalOccHandoverResourceBlockDetailsRequest.Builder get() { + return ListInternalOccHandoverResourceBlockDetailsRequest.builder() + .copy(request); + } + }, + new java.util.function.Function< + ListInternalOccHandoverResourceBlockDetailsResponse, String>() { + @Override + public String apply( + ListInternalOccHandoverResourceBlockDetailsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListInternalOccHandoverResourceBlockDetailsRequest.Builder>, + ListInternalOccHandoverResourceBlockDetailsRequest>() { + @Override + public ListInternalOccHandoverResourceBlockDetailsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListInternalOccHandoverResourceBlockDetailsRequest + .Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListInternalOccHandoverResourceBlockDetailsRequest, + ListInternalOccHandoverResourceBlockDetailsResponse>() { + @Override + public ListInternalOccHandoverResourceBlockDetailsResponse apply( + ListInternalOccHandoverResourceBlockDetailsRequest request) { + return client.listInternalOccHandoverResourceBlockDetails(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockDetailSummary} objects + * contained in responses from the listInternalOccHandoverResourceBlockDetails operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockDetailSummary} objects + * contained in responses received from the service. + */ + public Iterable + listInternalOccHandoverResourceBlockDetailsRecordIterator( + final ListInternalOccHandoverResourceBlockDetailsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListInternalOccHandoverResourceBlockDetailsRequest.Builder, + ListInternalOccHandoverResourceBlockDetailsRequest, + ListInternalOccHandoverResourceBlockDetailsResponse, + com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockDetailSummary>( + new java.util.function.Supplier< + ListInternalOccHandoverResourceBlockDetailsRequest.Builder>() { + @Override + public ListInternalOccHandoverResourceBlockDetailsRequest.Builder get() { + return ListInternalOccHandoverResourceBlockDetailsRequest.builder() + .copy(request); + } + }, + new java.util.function.Function< + ListInternalOccHandoverResourceBlockDetailsResponse, String>() { + @Override + public String apply( + ListInternalOccHandoverResourceBlockDetailsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListInternalOccHandoverResourceBlockDetailsRequest.Builder>, + ListInternalOccHandoverResourceBlockDetailsRequest>() { + @Override + public ListInternalOccHandoverResourceBlockDetailsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListInternalOccHandoverResourceBlockDetailsRequest + .Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListInternalOccHandoverResourceBlockDetailsRequest, + ListInternalOccHandoverResourceBlockDetailsResponse>() { + @Override + public ListInternalOccHandoverResourceBlockDetailsResponse apply( + ListInternalOccHandoverResourceBlockDetailsRequest request) { + return client.listInternalOccHandoverResourceBlockDetails(request); + } + }, + new java.util.function.Function< + ListInternalOccHandoverResourceBlockDetailsResponse, + java.util.List< + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockDetailSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockDetailSummary> + apply(ListInternalOccHandoverResourceBlockDetailsResponse response) { + return response.getOccHandoverResourceBlockDetailCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listInternalOccHandoverResourceBlocks operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listInternalOccHandoverResourceBlocksResponseIterator( + final ListInternalOccHandoverResourceBlocksRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListInternalOccHandoverResourceBlocksRequest.Builder, + ListInternalOccHandoverResourceBlocksRequest, + ListInternalOccHandoverResourceBlocksResponse>( + new java.util.function.Supplier< + ListInternalOccHandoverResourceBlocksRequest.Builder>() { + @Override + public ListInternalOccHandoverResourceBlocksRequest.Builder get() { + return ListInternalOccHandoverResourceBlocksRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListInternalOccHandoverResourceBlocksResponse, String>() { + @Override + public String apply(ListInternalOccHandoverResourceBlocksResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListInternalOccHandoverResourceBlocksRequest.Builder>, + ListInternalOccHandoverResourceBlocksRequest>() { + @Override + public ListInternalOccHandoverResourceBlocksRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListInternalOccHandoverResourceBlocksRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListInternalOccHandoverResourceBlocksRequest, + ListInternalOccHandoverResourceBlocksResponse>() { + @Override + public ListInternalOccHandoverResourceBlocksResponse apply( + ListInternalOccHandoverResourceBlocksRequest request) { + return client.listInternalOccHandoverResourceBlocks(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockSummary} objects + * contained in responses from the listInternalOccHandoverResourceBlocks operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockSummary} objects + * contained in responses received from the service. + */ + public Iterable + listInternalOccHandoverResourceBlocksRecordIterator( + final ListInternalOccHandoverResourceBlocksRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListInternalOccHandoverResourceBlocksRequest.Builder, + ListInternalOccHandoverResourceBlocksRequest, + ListInternalOccHandoverResourceBlocksResponse, + com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockSummary>( + new java.util.function.Supplier< + ListInternalOccHandoverResourceBlocksRequest.Builder>() { + @Override + public ListInternalOccHandoverResourceBlocksRequest.Builder get() { + return ListInternalOccHandoverResourceBlocksRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListInternalOccHandoverResourceBlocksResponse, String>() { + @Override + public String apply(ListInternalOccHandoverResourceBlocksResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListInternalOccHandoverResourceBlocksRequest.Builder>, + ListInternalOccHandoverResourceBlocksRequest>() { + @Override + public ListInternalOccHandoverResourceBlocksRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListInternalOccHandoverResourceBlocksRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListInternalOccHandoverResourceBlocksRequest, + ListInternalOccHandoverResourceBlocksResponse>() { + @Override + public ListInternalOccHandoverResourceBlocksResponse apply( + ListInternalOccHandoverResourceBlocksRequest request) { + return client.listInternalOccHandoverResourceBlocks(request); + } + }, + new java.util.function.Function< + ListInternalOccHandoverResourceBlocksResponse, + java.util.List< + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockSummary> + apply(ListInternalOccHandoverResourceBlocksResponse response) { + return response.getOccHandoverResourceBlockCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listOccAvailabilities operation. This iterable * will fetch more data from the server as needed. @@ -893,6 +1159,260 @@ public ListOccCustomerGroupsResponse apply( }); } + /** + * Creates a new iterable which will iterate over the responses received from the listOccHandoverResourceBlockDetails operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listOccHandoverResourceBlockDetailsResponseIterator( + final ListOccHandoverResourceBlockDetailsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListOccHandoverResourceBlockDetailsRequest.Builder, + ListOccHandoverResourceBlockDetailsRequest, + ListOccHandoverResourceBlockDetailsResponse>( + new java.util.function.Supplier< + ListOccHandoverResourceBlockDetailsRequest.Builder>() { + @Override + public ListOccHandoverResourceBlockDetailsRequest.Builder get() { + return ListOccHandoverResourceBlockDetailsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListOccHandoverResourceBlockDetailsResponse, String>() { + @Override + public String apply(ListOccHandoverResourceBlockDetailsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOccHandoverResourceBlockDetailsRequest.Builder>, + ListOccHandoverResourceBlockDetailsRequest>() { + @Override + public ListOccHandoverResourceBlockDetailsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOccHandoverResourceBlockDetailsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListOccHandoverResourceBlockDetailsRequest, + ListOccHandoverResourceBlockDetailsResponse>() { + @Override + public ListOccHandoverResourceBlockDetailsResponse apply( + ListOccHandoverResourceBlockDetailsRequest request) { + return client.listOccHandoverResourceBlockDetails(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockDetailSummary} objects + * contained in responses from the listOccHandoverResourceBlockDetails operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockDetailSummary} objects + * contained in responses received from the service. + */ + public Iterable + listOccHandoverResourceBlockDetailsRecordIterator( + final ListOccHandoverResourceBlockDetailsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListOccHandoverResourceBlockDetailsRequest.Builder, + ListOccHandoverResourceBlockDetailsRequest, + ListOccHandoverResourceBlockDetailsResponse, + com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockDetailSummary>( + new java.util.function.Supplier< + ListOccHandoverResourceBlockDetailsRequest.Builder>() { + @Override + public ListOccHandoverResourceBlockDetailsRequest.Builder get() { + return ListOccHandoverResourceBlockDetailsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListOccHandoverResourceBlockDetailsResponse, String>() { + @Override + public String apply(ListOccHandoverResourceBlockDetailsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOccHandoverResourceBlockDetailsRequest.Builder>, + ListOccHandoverResourceBlockDetailsRequest>() { + @Override + public ListOccHandoverResourceBlockDetailsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOccHandoverResourceBlockDetailsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListOccHandoverResourceBlockDetailsRequest, + ListOccHandoverResourceBlockDetailsResponse>() { + @Override + public ListOccHandoverResourceBlockDetailsResponse apply( + ListOccHandoverResourceBlockDetailsRequest request) { + return client.listOccHandoverResourceBlockDetails(request); + } + }, + new java.util.function.Function< + ListOccHandoverResourceBlockDetailsResponse, + java.util.List< + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockDetailSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockDetailSummary> + apply(ListOccHandoverResourceBlockDetailsResponse response) { + return response.getOccHandoverResourceBlockDetailCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listOccHandoverResourceBlocks operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listOccHandoverResourceBlocksResponseIterator( + final ListOccHandoverResourceBlocksRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListOccHandoverResourceBlocksRequest.Builder, ListOccHandoverResourceBlocksRequest, + ListOccHandoverResourceBlocksResponse>( + new java.util.function.Supplier() { + @Override + public ListOccHandoverResourceBlocksRequest.Builder get() { + return ListOccHandoverResourceBlocksRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListOccHandoverResourceBlocksResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOccHandoverResourceBlocksRequest.Builder>, + ListOccHandoverResourceBlocksRequest>() { + @Override + public ListOccHandoverResourceBlocksRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOccHandoverResourceBlocksRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListOccHandoverResourceBlocksRequest, + ListOccHandoverResourceBlocksResponse>() { + @Override + public ListOccHandoverResourceBlocksResponse apply( + ListOccHandoverResourceBlocksRequest request) { + return client.listOccHandoverResourceBlocks(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockSummary} objects + * contained in responses from the listOccHandoverResourceBlocks operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockSummary} objects + * contained in responses received from the service. + */ + public Iterable + listOccHandoverResourceBlocksRecordIterator( + final ListOccHandoverResourceBlocksRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListOccHandoverResourceBlocksRequest.Builder, ListOccHandoverResourceBlocksRequest, + ListOccHandoverResourceBlocksResponse, + com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockSummary>( + new java.util.function.Supplier() { + @Override + public ListOccHandoverResourceBlocksRequest.Builder get() { + return ListOccHandoverResourceBlocksRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListOccHandoverResourceBlocksResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOccHandoverResourceBlocksRequest.Builder>, + ListOccHandoverResourceBlocksRequest>() { + @Override + public ListOccHandoverResourceBlocksRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOccHandoverResourceBlocksRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListOccHandoverResourceBlocksRequest, + ListOccHandoverResourceBlocksResponse>() { + @Override + public ListOccHandoverResourceBlocksResponse apply( + ListOccHandoverResourceBlocksRequest request) { + return client.listOccHandoverResourceBlocks(request); + } + }, + new java.util.function.Function< + ListOccHandoverResourceBlocksResponse, + java.util.List< + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockSummary> + apply(ListOccHandoverResourceBlocksResponse response) { + return response.getOccHandoverResourceBlockCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listOccOverviews operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/CreateOccCustomerConverter.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/CreateOccCustomerConverter.java new file mode 100644 index 00000000000..5b536cef87a --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/CreateOccCustomerConverter.java @@ -0,0 +1,167 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.capacitymanagement.model.*; +import com.oracle.bmc.capacitymanagement.requests.*; +import com.oracle.bmc.capacitymanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class CreateOccCustomerConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateOccCustomerConverter.class); + + public static com.oracle.bmc.capacitymanagement.requests.CreateOccCustomerRequest + interceptRequest( + com.oracle.bmc.capacitymanagement.requests.CreateOccCustomerRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.capacitymanagement.requests.CreateOccCustomerRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateOccCustomerDetails(), "createOccCustomerDetails is required"); + Validate.notBlank(request.getOccCustomerGroupId(), "occCustomerGroupId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20231107") + .path("occCustomerGroups") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOccCustomerGroupId())) + .path("occCustomers"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses.CreateOccCustomerResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses.CreateOccCustomerResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses.CreateOccCustomerResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .CreateOccCustomerResponse>() { + @Override + public com.oracle.bmc.capacitymanagement.responses + .CreateOccCustomerResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.capacitymanagement.responses.CreateOccCustomerResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.capacitymanagement.model + .OccCustomer>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.capacitymanagement.model + .OccCustomer + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.capacitymanagement.model + .OccCustomer + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.capacitymanagement.model.OccCustomer> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.capacitymanagement.responses + .CreateOccCustomerResponse.Builder + builder = + com.oracle.bmc.capacitymanagement.responses + .CreateOccCustomerResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.occCustomer(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> retryAfterHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "retry-after"); + if (retryAfterHeader.isPresent()) { + builder.retryAfter( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "retry-after", + retryAfterHeader.get().get(0), + Integer.class)); + } + + com.oracle.bmc.capacitymanagement.responses + .CreateOccCustomerResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/CreateOccCustomerGroupConverter.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/CreateOccCustomerGroupConverter.java new file mode 100644 index 00000000000..3688fc97de8 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/CreateOccCustomerGroupConverter.java @@ -0,0 +1,163 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.capacitymanagement.model.*; +import com.oracle.bmc.capacitymanagement.requests.*; +import com.oracle.bmc.capacitymanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class CreateOccCustomerGroupConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateOccCustomerGroupConverter.class); + + public static com.oracle.bmc.capacitymanagement.requests.CreateOccCustomerGroupRequest + interceptRequest( + com.oracle.bmc.capacitymanagement.requests.CreateOccCustomerGroupRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.capacitymanagement.requests.CreateOccCustomerGroupRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateOccCustomerGroupDetails(), + "createOccCustomerGroupDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20231107").path("occCustomerGroups"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses.CreateOccCustomerGroupResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses.CreateOccCustomerGroupResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses.CreateOccCustomerGroupResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .CreateOccCustomerGroupResponse>() { + @Override + public com.oracle.bmc.capacitymanagement.responses + .CreateOccCustomerGroupResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.capacitymanagement.responses.CreateOccCustomerGroupResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.capacitymanagement.model + .OccCustomerGroup>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.capacitymanagement.model + .OccCustomerGroup + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.capacitymanagement.model + .OccCustomerGroup + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.capacitymanagement.model + .OccCustomerGroup> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.capacitymanagement.responses + .CreateOccCustomerGroupResponse.Builder + builder = + com.oracle.bmc.capacitymanagement.responses + .CreateOccCustomerGroupResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.occCustomerGroup(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> retryAfterHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "retry-after"); + if (retryAfterHeader.isPresent()) { + builder.retryAfter( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "retry-after", + retryAfterHeader.get().get(0), + Integer.class)); + } + + com.oracle.bmc.capacitymanagement.responses + .CreateOccCustomerGroupResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/DeleteOccCustomerConverter.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/DeleteOccCustomerConverter.java new file mode 100644 index 00000000000..03235e9fbbb --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/DeleteOccCustomerConverter.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.capacitymanagement.model.*; +import com.oracle.bmc.capacitymanagement.requests.*; +import com.oracle.bmc.capacitymanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class DeleteOccCustomerConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteOccCustomerConverter.class); + + public static com.oracle.bmc.capacitymanagement.requests.DeleteOccCustomerRequest + interceptRequest( + com.oracle.bmc.capacitymanagement.requests.DeleteOccCustomerRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.capacitymanagement.requests.DeleteOccCustomerRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOccCustomerGroupId(), "occCustomerGroupId must not be blank"); + Validate.notBlank(request.getOccCustomerId(), "occCustomerId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20231107") + .path("occCustomerGroups") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOccCustomerGroupId())) + .path("occCustomers") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOccCustomerId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses.DeleteOccCustomerResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses.DeleteOccCustomerResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses.DeleteOccCustomerResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .DeleteOccCustomerResponse>() { + @Override + public com.oracle.bmc.capacitymanagement.responses + .DeleteOccCustomerResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.capacitymanagement.responses.DeleteOccCustomerResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.capacitymanagement.responses + .DeleteOccCustomerResponse.Builder + builder = + com.oracle.bmc.capacitymanagement.responses + .DeleteOccCustomerResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> retryAfterHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "retry-after"); + if (retryAfterHeader.isPresent()) { + builder.retryAfter( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "retry-after", + retryAfterHeader.get().get(0), + Integer.class)); + } + + com.oracle.bmc.capacitymanagement.responses + .DeleteOccCustomerResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/DeleteOccCustomerGroupConverter.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/DeleteOccCustomerGroupConverter.java new file mode 100644 index 00000000000..18038f53ffb --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/DeleteOccCustomerGroupConverter.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.capacitymanagement.model.*; +import com.oracle.bmc.capacitymanagement.requests.*; +import com.oracle.bmc.capacitymanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class DeleteOccCustomerGroupConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteOccCustomerGroupConverter.class); + + public static com.oracle.bmc.capacitymanagement.requests.DeleteOccCustomerGroupRequest + interceptRequest( + com.oracle.bmc.capacitymanagement.requests.DeleteOccCustomerGroupRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.capacitymanagement.requests.DeleteOccCustomerGroupRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOccCustomerGroupId(), "occCustomerGroupId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20231107") + .path("occCustomerGroups") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOccCustomerGroupId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses.DeleteOccCustomerGroupResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses.DeleteOccCustomerGroupResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses.DeleteOccCustomerGroupResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .DeleteOccCustomerGroupResponse>() { + @Override + public com.oracle.bmc.capacitymanagement.responses + .DeleteOccCustomerGroupResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.capacitymanagement.responses.DeleteOccCustomerGroupResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.capacitymanagement.responses + .DeleteOccCustomerGroupResponse.Builder + builder = + com.oracle.bmc.capacitymanagement.responses + .DeleteOccCustomerGroupResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> retryAfterHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "retry-after"); + if (retryAfterHeader.isPresent()) { + builder.retryAfter( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "retry-after", + retryAfterHeader.get().get(0), + Integer.class)); + } + + com.oracle.bmc.capacitymanagement.responses + .DeleteOccCustomerGroupResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListInternalNamespaceOccOverviewsConverter.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListInternalNamespaceOccOverviewsConverter.java index ed1aeebfb87..78036cf6294 100644 --- a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListInternalNamespaceOccOverviewsConverter.java +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListInternalNamespaceOccOverviewsConverter.java @@ -36,6 +36,7 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( Validate.notNull(request, "request instance is required"); Validate.notBlank(request.getNamespace().getValue(), "namespace must not be blank"); Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + Validate.notNull(request.getOccCustomerGroupId(), "occCustomerGroupId is required"); com.oracle.bmc.http.internal.WrappedWebTarget target = client.getBaseTarget() @@ -53,13 +54,11 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( request.getCompartmentId())); - if (request.getOccCustomerGroupId() != null) { - target = - target.queryParam( - "occCustomerGroupId", - com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( - request.getOccCustomerGroupId())); - } + target = + target.queryParam( + "occCustomerGroupId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getOccCustomerGroupId())); if (request.getWorkloadType() != null) { target = diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListInternalOccHandoverResourceBlockDetailsConverter.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListInternalOccHandoverResourceBlockDetailsConverter.java new file mode 100644 index 00000000000..62b7c89af4e --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListInternalOccHandoverResourceBlockDetailsConverter.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.capacitymanagement.model.*; +import com.oracle.bmc.capacitymanagement.requests.*; +import com.oracle.bmc.capacitymanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class ListInternalOccHandoverResourceBlockDetailsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ListInternalOccHandoverResourceBlockDetailsConverter.class); + + public static com.oracle.bmc.capacitymanagement.requests + .ListInternalOccHandoverResourceBlockDetailsRequest + interceptRequest( + com.oracle.bmc.capacitymanagement.requests + .ListInternalOccHandoverResourceBlockDetailsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.capacitymanagement.requests + .ListInternalOccHandoverResourceBlockDetailsRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getOccHandoverResourceBlockId(), "occHandoverResourceBlockId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20231107") + .path("internal") + .path("occHandoverResourceBlockDetails"); + + target = + target.queryParam( + "occHandoverResourceBlockId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getOccHandoverResourceBlockId())); + + if (request.getHostId() != null) { + target = + target.queryParam( + "hostId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getHostId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .ListInternalOccHandoverResourceBlockDetailsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .ListInternalOccHandoverResourceBlockDetailsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .ListInternalOccHandoverResourceBlockDetailsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .ListInternalOccHandoverResourceBlockDetailsResponse>() { + @Override + public com.oracle.bmc.capacitymanagement.responses + .ListInternalOccHandoverResourceBlockDetailsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.capacitymanagement.responses.ListInternalOccHandoverResourceBlockDetailsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockDetailCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockDetailCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockDetailCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockDetailCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.capacitymanagement.responses + .ListInternalOccHandoverResourceBlockDetailsResponse + .Builder + builder = + com.oracle.bmc.capacitymanagement.responses + .ListInternalOccHandoverResourceBlockDetailsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.occHandoverResourceBlockDetailCollection( + response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.capacitymanagement.responses + .ListInternalOccHandoverResourceBlockDetailsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListInternalOccHandoverResourceBlocksConverter.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListInternalOccHandoverResourceBlocksConverter.java new file mode 100644 index 00000000000..9125abcba56 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListInternalOccHandoverResourceBlocksConverter.java @@ -0,0 +1,243 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.capacitymanagement.model.*; +import com.oracle.bmc.capacitymanagement.requests.*; +import com.oracle.bmc.capacitymanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class ListInternalOccHandoverResourceBlocksConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListInternalOccHandoverResourceBlocksConverter.class); + + public static com.oracle.bmc.capacitymanagement.requests + .ListInternalOccHandoverResourceBlocksRequest + interceptRequest( + com.oracle.bmc.capacitymanagement.requests + .ListInternalOccHandoverResourceBlocksRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.capacitymanagement.requests.ListInternalOccHandoverResourceBlocksRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getNamespace(), "namespace is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + Validate.notNull(request.getOccCustomerGroupId(), "occCustomerGroupId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20231107") + .path("internal") + .path("occHandoverResourceBlocks"); + + target = + target.queryParam( + "namespace", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getNamespace().getValue())); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + target = + target.queryParam( + "occCustomerGroupId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getOccCustomerGroupId())); + + if (request.getHandoverResourceName() != null) { + target = + target.queryParam( + "handoverResourceName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getHandoverResourceName())); + } + + if (request.getHandoverDateGreaterThanOrEqualTo() != null) { + target = + target.queryParam( + "handoverDateGreaterThanOrEqualTo", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getHandoverDateGreaterThanOrEqualTo())); + } + + if (request.getHandoverDateLessThanOrEqualTo() != null) { + target = + target.queryParam( + "handoverDateLessThanOrEqualTo", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getHandoverDateLessThanOrEqualTo())); + } + + if (request.getOccHandoverResourceBlockId() != null) { + target = + target.queryParam( + "occHandoverResourceBlockId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getOccHandoverResourceBlockId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .ListInternalOccHandoverResourceBlocksResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .ListInternalOccHandoverResourceBlocksResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .ListInternalOccHandoverResourceBlocksResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .ListInternalOccHandoverResourceBlocksResponse>() { + @Override + public com.oracle.bmc.capacitymanagement.responses + .ListInternalOccHandoverResourceBlocksResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.capacitymanagement.responses.ListInternalOccHandoverResourceBlocksResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.capacitymanagement.responses + .ListInternalOccHandoverResourceBlocksResponse + .Builder + builder = + com.oracle.bmc.capacitymanagement.responses + .ListInternalOccHandoverResourceBlocksResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.occHandoverResourceBlockCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.capacitymanagement.responses + .ListInternalOccHandoverResourceBlocksResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListOccAvailabilityCatalogsInternalConverter.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListOccAvailabilityCatalogsInternalConverter.java index 114be08c5e7..8aac6b26d32 100644 --- a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListOccAvailabilityCatalogsInternalConverter.java +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListOccAvailabilityCatalogsInternalConverter.java @@ -35,6 +35,7 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request) { Validate.notNull(request, "request instance is required"); Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + Validate.notNull(request.getOccCustomerGroupId(), "occCustomerGroupId is required"); com.oracle.bmc.http.internal.WrappedWebTarget target = client.getBaseTarget() @@ -80,13 +81,11 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getCatalogState().getValue())); } - if (request.getOccCustomerGroupId() != null) { - target = - target.queryParam( - "occCustomerGroupId", - com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( - request.getOccCustomerGroupId())); - } + target = + target.queryParam( + "occCustomerGroupId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getOccCustomerGroupId())); if (request.getLimit() != null) { target = diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListOccCapacityRequestsInternalConverter.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListOccCapacityRequestsInternalConverter.java index ce0471efc76..8b2a440822b 100644 --- a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListOccCapacityRequestsInternalConverter.java +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListOccCapacityRequestsInternalConverter.java @@ -34,6 +34,7 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request) { Validate.notNull(request, "request instance is required"); Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + Validate.notNull(request.getOccCustomerGroupId(), "occCustomerGroupId is required"); com.oracle.bmc.http.internal.WrappedWebTarget target = client.getBaseTarget() @@ -47,13 +48,11 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( request.getCompartmentId())); - if (request.getOccCustomerGroupId() != null) { - target = - target.queryParam( - "occCustomerGroupId", - com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( - request.getOccCustomerGroupId())); - } + target = + target.queryParam( + "occCustomerGroupId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getOccCustomerGroupId())); if (request.getOccAvailabilityCatalogId() != null) { target = diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListOccHandoverResourceBlockDetailsConverter.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListOccHandoverResourceBlockDetailsConverter.java new file mode 100644 index 00000000000..c8eb13da089 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListOccHandoverResourceBlockDetailsConverter.java @@ -0,0 +1,203 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.capacitymanagement.model.*; +import com.oracle.bmc.capacitymanagement.requests.*; +import com.oracle.bmc.capacitymanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class ListOccHandoverResourceBlockDetailsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListOccHandoverResourceBlockDetailsConverter.class); + + public static com.oracle.bmc.capacitymanagement.requests + .ListOccHandoverResourceBlockDetailsRequest + interceptRequest( + com.oracle.bmc.capacitymanagement.requests + .ListOccHandoverResourceBlockDetailsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.capacitymanagement.requests.ListOccHandoverResourceBlockDetailsRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getOccHandoverResourceBlockId(), "occHandoverResourceBlockId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20231107").path("occHandoverResourceBlockDetails"); + + target = + target.queryParam( + "occHandoverResourceBlockId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getOccHandoverResourceBlockId())); + + if (request.getHostId() != null) { + target = + target.queryParam( + "hostId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getHostId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .ListOccHandoverResourceBlockDetailsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .ListOccHandoverResourceBlockDetailsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .ListOccHandoverResourceBlockDetailsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .ListOccHandoverResourceBlockDetailsResponse>() { + @Override + public com.oracle.bmc.capacitymanagement.responses + .ListOccHandoverResourceBlockDetailsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.capacitymanagement.responses.ListOccHandoverResourceBlockDetailsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockDetailCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockDetailCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockDetailCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockDetailCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.capacitymanagement.responses + .ListOccHandoverResourceBlockDetailsResponse.Builder + builder = + com.oracle.bmc.capacitymanagement.responses + .ListOccHandoverResourceBlockDetailsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.occHandoverResourceBlockDetailCollection( + response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.capacitymanagement.responses + .ListOccHandoverResourceBlockDetailsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListOccHandoverResourceBlocksConverter.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListOccHandoverResourceBlocksConverter.java new file mode 100644 index 00000000000..a2601951b89 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/ListOccHandoverResourceBlocksConverter.java @@ -0,0 +1,232 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.capacitymanagement.model.*; +import com.oracle.bmc.capacitymanagement.requests.*; +import com.oracle.bmc.capacitymanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class ListOccHandoverResourceBlocksConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListOccHandoverResourceBlocksConverter.class); + + public static com.oracle.bmc.capacitymanagement.requests.ListOccHandoverResourceBlocksRequest + interceptRequest( + com.oracle.bmc.capacitymanagement.requests.ListOccHandoverResourceBlocksRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.capacitymanagement.requests.ListOccHandoverResourceBlocksRequest + request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20231107").path("occHandoverResourceBlocks"); + + if (request.getNamespace() != null) { + target = + target.queryParam( + "namespace", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getNamespace().getValue())); + } + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getHandoverResourceName() != null) { + target = + target.queryParam( + "handoverResourceName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getHandoverResourceName())); + } + + if (request.getHandoverDateGreaterThanOrEqualTo() != null) { + target = + target.queryParam( + "handoverDateGreaterThanOrEqualTo", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getHandoverDateGreaterThanOrEqualTo())); + } + + if (request.getHandoverDateLessThanOrEqualTo() != null) { + target = + target.queryParam( + "handoverDateLessThanOrEqualTo", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getHandoverDateLessThanOrEqualTo())); + } + + if (request.getOccHandoverResourceBlockId() != null) { + target = + target.queryParam( + "occHandoverResourceBlockId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getOccHandoverResourceBlockId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .ListOccHandoverResourceBlocksResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .ListOccHandoverResourceBlocksResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .ListOccHandoverResourceBlocksResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .ListOccHandoverResourceBlocksResponse>() { + @Override + public com.oracle.bmc.capacitymanagement.responses + .ListOccHandoverResourceBlocksResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.capacitymanagement.responses.ListOccHandoverResourceBlocksResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.capacitymanagement.model + .OccHandoverResourceBlockCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.capacitymanagement.responses + .ListOccHandoverResourceBlocksResponse.Builder + builder = + com.oracle.bmc.capacitymanagement.responses + .ListOccHandoverResourceBlocksResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.occHandoverResourceBlockCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.capacitymanagement.responses + .ListOccHandoverResourceBlocksResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/UpdateOccCustomerConverter.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/UpdateOccCustomerConverter.java new file mode 100644 index 00000000000..93f12415848 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/UpdateOccCustomerConverter.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.capacitymanagement.model.*; +import com.oracle.bmc.capacitymanagement.requests.*; +import com.oracle.bmc.capacitymanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class UpdateOccCustomerConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateOccCustomerConverter.class); + + public static com.oracle.bmc.capacitymanagement.requests.UpdateOccCustomerRequest + interceptRequest( + com.oracle.bmc.capacitymanagement.requests.UpdateOccCustomerRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.capacitymanagement.requests.UpdateOccCustomerRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getUpdateOccCustomerDetails(), "updateOccCustomerDetails is required"); + Validate.notBlank(request.getOccCustomerGroupId(), "occCustomerGroupId must not be blank"); + Validate.notBlank(request.getOccCustomerId(), "occCustomerId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20231107") + .path("occCustomerGroups") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOccCustomerGroupId())) + .path("occCustomers") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOccCustomerId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses.UpdateOccCustomerResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses.UpdateOccCustomerResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses.UpdateOccCustomerResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .UpdateOccCustomerResponse>() { + @Override + public com.oracle.bmc.capacitymanagement.responses + .UpdateOccCustomerResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.capacitymanagement.responses.UpdateOccCustomerResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.capacitymanagement.model + .OccCustomer>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.capacitymanagement.model + .OccCustomer + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.capacitymanagement.model + .OccCustomer + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.capacitymanagement.model.OccCustomer> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.capacitymanagement.responses + .UpdateOccCustomerResponse.Builder + builder = + com.oracle.bmc.capacitymanagement.responses + .UpdateOccCustomerResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.occCustomer(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> retryAfterHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "retry-after"); + if (retryAfterHeader.isPresent()) { + builder.retryAfter( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "retry-after", + retryAfterHeader.get().get(0), + Integer.class)); + } + + com.oracle.bmc.capacitymanagement.responses + .UpdateOccCustomerResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/UpdateOccCustomerGroupConverter.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/UpdateOccCustomerGroupConverter.java new file mode 100644 index 00000000000..28b8d3c6ce9 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/internal/http/UpdateOccCustomerGroupConverter.java @@ -0,0 +1,169 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.capacitymanagement.model.*; +import com.oracle.bmc.capacitymanagement.requests.*; +import com.oracle.bmc.capacitymanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class UpdateOccCustomerGroupConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateOccCustomerGroupConverter.class); + + public static com.oracle.bmc.capacitymanagement.requests.UpdateOccCustomerGroupRequest + interceptRequest( + com.oracle.bmc.capacitymanagement.requests.UpdateOccCustomerGroupRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.capacitymanagement.requests.UpdateOccCustomerGroupRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getUpdateOccCustomerGroupDetails(), + "updateOccCustomerGroupDetails is required"); + Validate.notBlank(request.getOccCustomerGroupId(), "occCustomerGroupId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20231107") + .path("occCustomerGroups") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOccCustomerGroupId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses.UpdateOccCustomerGroupResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses.UpdateOccCustomerGroupResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses.UpdateOccCustomerGroupResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.capacitymanagement.responses + .UpdateOccCustomerGroupResponse>() { + @Override + public com.oracle.bmc.capacitymanagement.responses + .UpdateOccCustomerGroupResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.capacitymanagement.responses.UpdateOccCustomerGroupResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.capacitymanagement.model + .OccCustomerGroup>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.capacitymanagement.model + .OccCustomerGroup + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.capacitymanagement.model + .OccCustomerGroup + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.capacitymanagement.model + .OccCustomerGroup> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.capacitymanagement.responses + .UpdateOccCustomerGroupResponse.Builder + builder = + com.oracle.bmc.capacitymanagement.responses + .UpdateOccCustomerGroupResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.occCustomerGroup(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> retryAfterHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "retry-after"); + if (retryAfterHeader.isPresent()) { + builder.retryAfter( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "retry-after", + retryAfterHeader.get().get(0), + Integer.class)); + } + + com.oracle.bmc.capacitymanagement.responses + .UpdateOccCustomerGroupResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/AssociatedCapacityRequestDetails.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/AssociatedCapacityRequestDetails.java new file mode 100644 index 00000000000..af682483afe --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/AssociatedCapacityRequestDetails.java @@ -0,0 +1,190 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.model; + +/** + * Details about the associated capacity requests against which the resources were provisioned by oracle. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AssociatedCapacityRequestDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AssociatedCapacityRequestDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"occCapacityRequestId", "handoverQuantity"}) + public AssociatedCapacityRequestDetails(String occCapacityRequestId, Long handoverQuantity) { + super(); + this.occCapacityRequestId = occCapacityRequestId; + this.handoverQuantity = handoverQuantity; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the capacity request against which the resources were provisioned. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("occCapacityRequestId") + private String occCapacityRequestId; + + /** + * The OCID of the capacity request against which the resources were provisioned. + * + * @param occCapacityRequestId the value to set + * @return this builder + **/ + public Builder occCapacityRequestId(String occCapacityRequestId) { + this.occCapacityRequestId = occCapacityRequestId; + this.__explicitlySet__.add("occCapacityRequestId"); + return this; + } + /** + * The total quantity of the bare metal hardware that was made available corresponding to the capacity request ocid. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("handoverQuantity") + private Long handoverQuantity; + + /** + * The total quantity of the bare metal hardware that was made available corresponding to the capacity request ocid. + * + * @param handoverQuantity the value to set + * @return this builder + **/ + public Builder handoverQuantity(Long handoverQuantity) { + this.handoverQuantity = handoverQuantity; + this.__explicitlySet__.add("handoverQuantity"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AssociatedCapacityRequestDetails build() { + AssociatedCapacityRequestDetails model = + new AssociatedCapacityRequestDetails( + this.occCapacityRequestId, this.handoverQuantity); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AssociatedCapacityRequestDetails model) { + if (model.wasPropertyExplicitlySet("occCapacityRequestId")) { + this.occCapacityRequestId(model.getOccCapacityRequestId()); + } + if (model.wasPropertyExplicitlySet("handoverQuantity")) { + this.handoverQuantity(model.getHandoverQuantity()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the capacity request against which the resources were provisioned. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("occCapacityRequestId") + private final String occCapacityRequestId; + + /** + * The OCID of the capacity request against which the resources were provisioned. + * + * @return the value + **/ + public String getOccCapacityRequestId() { + return occCapacityRequestId; + } + + /** + * The total quantity of the bare metal hardware that was made available corresponding to the capacity request ocid. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("handoverQuantity") + private final Long handoverQuantity; + + /** + * The total quantity of the bare metal hardware that was made available corresponding to the capacity request ocid. + * + * @return the value + **/ + public Long getHandoverQuantity() { + return handoverQuantity; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AssociatedCapacityRequestDetails("); + sb.append("super=").append(super.toString()); + sb.append("occCapacityRequestId=").append(String.valueOf(this.occCapacityRequestId)); + sb.append(", handoverQuantity=").append(String.valueOf(this.handoverQuantity)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AssociatedCapacityRequestDetails)) { + return false; + } + + AssociatedCapacityRequestDetails other = (AssociatedCapacityRequestDetails) o; + return java.util.Objects.equals(this.occCapacityRequestId, other.occCapacityRequestId) + && java.util.Objects.equals(this.handoverQuantity, other.handoverQuantity) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.occCapacityRequestId == null + ? 43 + : this.occCapacityRequestId.hashCode()); + result = + (result * PRIME) + + (this.handoverQuantity == null ? 43 : this.handoverQuantity.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/AssociatedOccHandoverResourceBlock.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/AssociatedOccHandoverResourceBlock.java new file mode 100644 index 00000000000..e5790ad56d2 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/AssociatedOccHandoverResourceBlock.java @@ -0,0 +1,193 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.model; + +/** + * Details about the resource block that was handed over. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AssociatedOccHandoverResourceBlock.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AssociatedOccHandoverResourceBlock + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"occHandoverResourceBlockId", "handoverQuantity"}) + public AssociatedOccHandoverResourceBlock( + String occHandoverResourceBlockId, Long handoverQuantity) { + super(); + this.occHandoverResourceBlockId = occHandoverResourceBlockId; + this.handoverQuantity = handoverQuantity; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the handed over resource block. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("occHandoverResourceBlockId") + private String occHandoverResourceBlockId; + + /** + * The OCID of the handed over resource block. + * + * @param occHandoverResourceBlockId the value to set + * @return this builder + **/ + public Builder occHandoverResourceBlockId(String occHandoverResourceBlockId) { + this.occHandoverResourceBlockId = occHandoverResourceBlockId; + this.__explicitlySet__.add("occHandoverResourceBlockId"); + return this; + } + /** + * The total quantity of the resource that was made available to the customer as part of this resource block + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("handoverQuantity") + private Long handoverQuantity; + + /** + * The total quantity of the resource that was made available to the customer as part of this resource block + * + * @param handoverQuantity the value to set + * @return this builder + **/ + public Builder handoverQuantity(Long handoverQuantity) { + this.handoverQuantity = handoverQuantity; + this.__explicitlySet__.add("handoverQuantity"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AssociatedOccHandoverResourceBlock build() { + AssociatedOccHandoverResourceBlock model = + new AssociatedOccHandoverResourceBlock( + this.occHandoverResourceBlockId, this.handoverQuantity); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AssociatedOccHandoverResourceBlock model) { + if (model.wasPropertyExplicitlySet("occHandoverResourceBlockId")) { + this.occHandoverResourceBlockId(model.getOccHandoverResourceBlockId()); + } + if (model.wasPropertyExplicitlySet("handoverQuantity")) { + this.handoverQuantity(model.getHandoverQuantity()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the handed over resource block. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("occHandoverResourceBlockId") + private final String occHandoverResourceBlockId; + + /** + * The OCID of the handed over resource block. + * + * @return the value + **/ + public String getOccHandoverResourceBlockId() { + return occHandoverResourceBlockId; + } + + /** + * The total quantity of the resource that was made available to the customer as part of this resource block + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("handoverQuantity") + private final Long handoverQuantity; + + /** + * The total quantity of the resource that was made available to the customer as part of this resource block + * + * @return the value + **/ + public Long getHandoverQuantity() { + return handoverQuantity; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AssociatedOccHandoverResourceBlock("); + sb.append("super=").append(super.toString()); + sb.append("occHandoverResourceBlockId=") + .append(String.valueOf(this.occHandoverResourceBlockId)); + sb.append(", handoverQuantity=").append(String.valueOf(this.handoverQuantity)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AssociatedOccHandoverResourceBlock)) { + return false; + } + + AssociatedOccHandoverResourceBlock other = (AssociatedOccHandoverResourceBlock) o; + return java.util.Objects.equals( + this.occHandoverResourceBlockId, other.occHandoverResourceBlockId) + && java.util.Objects.equals(this.handoverQuantity, other.handoverQuantity) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.occHandoverResourceBlockId == null + ? 43 + : this.occHandoverResourceBlockId.hashCode()); + result = + (result * PRIME) + + (this.handoverQuantity == null ? 43 : this.handoverQuantity.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/CreateOccCapacityRequestDetails.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/CreateOccCapacityRequestDetails.java index 5ad91cbc072..bffcfc74a85 100644 --- a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/CreateOccCapacityRequestDetails.java +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/CreateOccCapacityRequestDetails.java @@ -243,13 +243,13 @@ public Builder lifecycleDetails(String lifecycleDetails) { return this; } /** - * The availability domain (AD) for which the capacity request is made. If this is specified then the capacity will be validated and fulfilled within the scope of this AD. + * The availability domain (AD) in which the new resource is to be placed. If this is specified then the capacity will be validated and fulfilled within the scope of this AD. Note that this field is NOT required for Capacity request Transfer requests. **/ @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") private String availabilityDomain; /** - * The availability domain (AD) for which the capacity request is made. If this is specified then the capacity will be validated and fulfilled within the scope of this AD. + * The availability domain (AD) in which the new resource is to be placed. If this is specified then the capacity will be validated and fulfilled within the scope of this AD. Note that this field is NOT required for Capacity request Transfer requests. * @param availabilityDomain the value to set * @return this builder **/ @@ -541,13 +541,13 @@ public String getLifecycleDetails() { } /** - * The availability domain (AD) for which the capacity request is made. If this is specified then the capacity will be validated and fulfilled within the scope of this AD. + * The availability domain (AD) in which the new resource is to be placed. If this is specified then the capacity will be validated and fulfilled within the scope of this AD. Note that this field is NOT required for Capacity request Transfer requests. **/ @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") private final String availabilityDomain; /** - * The availability domain (AD) for which the capacity request is made. If this is specified then the capacity will be validated and fulfilled within the scope of this AD. + * The availability domain (AD) in which the new resource is to be placed. If this is specified then the capacity will be validated and fulfilled within the scope of this AD. Note that this field is NOT required for Capacity request Transfer requests. * @return the value **/ public String getAvailabilityDomain() { diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/CreateOccCustomerDetails.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/CreateOccCustomerDetails.java new file mode 100644 index 00000000000..7abc35dff94 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/CreateOccCustomerDetails.java @@ -0,0 +1,285 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.model; + +/** + * The details about the customer. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateOccCustomerDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateOccCustomerDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"tenancyId", "displayName", "description", "status"}) + public CreateOccCustomerDetails( + String tenancyId, String displayName, String description, Status status) { + super(); + this.tenancyId = tenancyId; + this.displayName = displayName; + this.description = description; + this.status = status; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the tenancy belonging to the customer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private String tenancyId; + + /** + * The OCID of the tenancy belonging to the customer. + * @param tenancyId the value to set + * @return this builder + **/ + public Builder tenancyId(String tenancyId) { + this.tenancyId = tenancyId; + this.__explicitlySet__.add("tenancyId"); + return this; + } + /** + * The display name for the customer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name for the customer. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The description about the customer group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description about the customer group. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * To determine whether the customer is enabled/disabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * To determine whether the customer is enabled/disabled. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateOccCustomerDetails build() { + CreateOccCustomerDetails model = + new CreateOccCustomerDetails( + this.tenancyId, this.displayName, this.description, this.status); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateOccCustomerDetails model) { + if (model.wasPropertyExplicitlySet("tenancyId")) { + this.tenancyId(model.getTenancyId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the tenancy belonging to the customer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private final String tenancyId; + + /** + * The OCID of the tenancy belonging to the customer. + * @return the value + **/ + public String getTenancyId() { + return tenancyId; + } + + /** + * The display name for the customer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name for the customer. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The description about the customer group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description about the customer group. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * To determine whether the customer is enabled/disabled. + **/ + public enum Status { + Enabled("ENABLED"), + Disabled("DISABLED"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + map.put(v.getValue(), v); + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Status: " + key); + } + }; + /** + * To determine whether the customer is enabled/disabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * To determine whether the customer is enabled/disabled. + * @return the value + **/ + public Status getStatus() { + return status; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateOccCustomerDetails("); + sb.append("super=").append(super.toString()); + sb.append("tenancyId=").append(String.valueOf(this.tenancyId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateOccCustomerDetails)) { + return false; + } + + CreateOccCustomerDetails other = (CreateOccCustomerDetails) o; + return java.util.Objects.equals(this.tenancyId, other.tenancyId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.status, other.status) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.tenancyId == null ? 43 : this.tenancyId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/CreateOccCustomerGroupDetails.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/CreateOccCustomerGroupDetails.java new file mode 100644 index 00000000000..321b0bbf1a1 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/CreateOccCustomerGroupDetails.java @@ -0,0 +1,480 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.model; + +/** + * Details about the create request for the customer group. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateOccCustomerGroupDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateOccCustomerGroupDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "displayName", + "description", + "freeformTags", + "definedTags", + "lifecycleDetails", + "status", + "customersList" + }) + public CreateOccCustomerGroupDetails( + String compartmentId, + String displayName, + String description, + java.util.Map freeformTags, + java.util.Map> definedTags, + String lifecycleDetails, + Status status, + java.util.List customersList) { + super(); + this.compartmentId = compartmentId; + this.displayName = displayName; + this.description = description; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.lifecycleDetails = lifecycleDetails; + this.status = status; + this.customersList = customersList; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Since all resources are at tenancy level hence this will be the ocid of the tenancy where operation is to be performed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Since all resources are at tenancy level hence this will be the ocid of the tenancy where operation is to be performed. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The name of the customer group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The name of the customer group. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A description about the customer group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A description about the customer group. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed State. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed State. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * To determine whether the customer group is enabled/disabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * To determine whether the customer group is enabled/disabled. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * A list containing all the customers that belong to this customer group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customersList") + private java.util.List customersList; + + /** + * A list containing all the customers that belong to this customer group. + * @param customersList the value to set + * @return this builder + **/ + public Builder customersList(java.util.List customersList) { + this.customersList = customersList; + this.__explicitlySet__.add("customersList"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateOccCustomerGroupDetails build() { + CreateOccCustomerGroupDetails model = + new CreateOccCustomerGroupDetails( + this.compartmentId, + this.displayName, + this.description, + this.freeformTags, + this.definedTags, + this.lifecycleDetails, + this.status, + this.customersList); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateOccCustomerGroupDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("customersList")) { + this.customersList(model.getCustomersList()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Since all resources are at tenancy level hence this will be the ocid of the tenancy where operation is to be performed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Since all resources are at tenancy level hence this will be the ocid of the tenancy where operation is to be performed. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The name of the customer group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The name of the customer group. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A description about the customer group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A description about the customer group. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed State. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed State. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * To determine whether the customer group is enabled/disabled. + **/ + public enum Status { + Enabled("ENABLED"), + Disabled("DISABLED"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + map.put(v.getValue(), v); + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Status: " + key); + } + }; + /** + * To determine whether the customer group is enabled/disabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * To determine whether the customer group is enabled/disabled. + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * A list containing all the customers that belong to this customer group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customersList") + private final java.util.List customersList; + + /** + * A list containing all the customers that belong to this customer group. + * @return the value + **/ + public java.util.List getCustomersList() { + return customersList; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateOccCustomerGroupDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", customersList=").append(String.valueOf(this.customersList)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateOccCustomerGroupDetails)) { + return false; + } + + CreateOccCustomerGroupDetails other = (CreateOccCustomerGroupDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.customersList, other.customersList) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = + (result * PRIME) + + (this.customersList == null ? 43 : this.customersList.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/OccCapacityRequestBaseDetails.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/OccCapacityRequestBaseDetails.java index c254be87fec..96bf56a5f51 100644 --- a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/OccCapacityRequestBaseDetails.java +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/OccCapacityRequestBaseDetails.java @@ -30,6 +30,8 @@ public final class OccCapacityRequestBaseDetails "dateExpectedHandover", "actualHandoverQuantity", "dateActualHandover", + "availabilityDomain", + "associatedOccHandoverResourceBlockList", "resourceName", "demandQuantity" }) @@ -41,6 +43,9 @@ public OccCapacityRequestBaseDetails( java.util.Date dateExpectedHandover, Long actualHandoverQuantity, java.util.Date dateActualHandover, + String availabilityDomain, + java.util.List + associatedOccHandoverResourceBlockList, String resourceName, Long demandQuantity) { super(); @@ -51,6 +56,8 @@ public OccCapacityRequestBaseDetails( this.dateExpectedHandover = dateExpectedHandover; this.actualHandoverQuantity = actualHandoverQuantity; this.dateActualHandover = dateActualHandover; + this.availabilityDomain = availabilityDomain; + this.associatedOccHandoverResourceBlockList = associatedOccHandoverResourceBlockList; this.resourceName = resourceName; this.demandQuantity = demandQuantity; } @@ -169,6 +176,43 @@ public Builder dateActualHandover(java.util.Date dateActualHandover) { this.__explicitlySet__.add("dateActualHandover"); return this; } + /** + * The availability domain of the resource which is to be transferred. Note that this is only required for Capacity Request Transfer requests. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The availability domain of the resource which is to be transferred. Note that this is only required for Capacity Request Transfer requests. + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + /** + * A list containing details about occHandoverResourceBlocks which were handed over for the corresponding resource name. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("associatedOccHandoverResourceBlockList") + private java.util.List + associatedOccHandoverResourceBlockList; + + /** + * A list containing details about occHandoverResourceBlocks which were handed over for the corresponding resource name. + * + * @param associatedOccHandoverResourceBlockList the value to set + * @return this builder + **/ + public Builder associatedOccHandoverResourceBlockList( + java.util.List + associatedOccHandoverResourceBlockList) { + this.associatedOccHandoverResourceBlockList = associatedOccHandoverResourceBlockList; + this.__explicitlySet__.add("associatedOccHandoverResourceBlockList"); + return this; + } /** * The name of the COMPUTE server shape for which the request is made. Do not use CAPACITY_CONSTRAINT as the resource name. **/ @@ -215,6 +259,8 @@ public OccCapacityRequestBaseDetails build() { this.dateExpectedHandover, this.actualHandoverQuantity, this.dateActualHandover, + this.availabilityDomain, + this.associatedOccHandoverResourceBlockList, this.resourceName, this.demandQuantity); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -246,6 +292,13 @@ public Builder copy(OccCapacityRequestBaseDetails model) { if (model.wasPropertyExplicitlySet("dateActualHandover")) { this.dateActualHandover(model.getDateActualHandover()); } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("associatedOccHandoverResourceBlockList")) { + this.associatedOccHandoverResourceBlockList( + model.getAssociatedOccHandoverResourceBlockList()); + } if (model.wasPropertyExplicitlySet("resourceName")) { this.resourceName(model.getResourceName()); } @@ -365,6 +418,38 @@ public java.util.Date getDateActualHandover() { return dateActualHandover; } + /** + * The availability domain of the resource which is to be transferred. Note that this is only required for Capacity Request Transfer requests. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The availability domain of the resource which is to be transferred. Note that this is only required for Capacity Request Transfer requests. + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * A list containing details about occHandoverResourceBlocks which were handed over for the corresponding resource name. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("associatedOccHandoverResourceBlockList") + private final java.util.List + associatedOccHandoverResourceBlockList; + + /** + * A list containing details about occHandoverResourceBlocks which were handed over for the corresponding resource name. + * + * @return the value + **/ + public java.util.List + getAssociatedOccHandoverResourceBlockList() { + return associatedOccHandoverResourceBlockList; + } + /** * The name of the COMPUTE server shape for which the request is made. Do not use CAPACITY_CONSTRAINT as the resource name. **/ @@ -415,6 +500,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", dateExpectedHandover=").append(String.valueOf(this.dateExpectedHandover)); sb.append(", actualHandoverQuantity=").append(String.valueOf(this.actualHandoverQuantity)); sb.append(", dateActualHandover=").append(String.valueOf(this.dateActualHandover)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", associatedOccHandoverResourceBlockList=") + .append(String.valueOf(this.associatedOccHandoverResourceBlockList)); sb.append(", resourceName=").append(String.valueOf(this.resourceName)); sb.append(", demandQuantity=").append(String.valueOf(this.demandQuantity)); sb.append(")"); @@ -440,6 +528,10 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.actualHandoverQuantity, other.actualHandoverQuantity) && java.util.Objects.equals(this.dateActualHandover, other.dateActualHandover) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals( + this.associatedOccHandoverResourceBlockList, + other.associatedOccHandoverResourceBlockList) && java.util.Objects.equals(this.resourceName, other.resourceName) && java.util.Objects.equals(this.demandQuantity, other.demandQuantity) && super.equals(other); @@ -476,6 +568,16 @@ public int hashCode() { + (this.dateActualHandover == null ? 43 : this.dateActualHandover.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = + (result * PRIME) + + (this.associatedOccHandoverResourceBlockList == null + ? 43 + : this.associatedOccHandoverResourceBlockList.hashCode()); result = (result * PRIME) + (this.resourceName == null ? 43 : this.resourceName.hashCode()); result = (result * PRIME) diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/OccHandoverResourceBlockCollection.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/OccHandoverResourceBlockCollection.java new file mode 100644 index 00000000000..e40d467568d --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/OccHandoverResourceBlockCollection.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.model; + +/** + * A list of occ handover resource blocks. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OccHandoverResourceBlockCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OccHandoverResourceBlockCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public OccHandoverResourceBlockCollection( + java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * An array of occ handover resource blocks. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * An array of occ handover resource blocks. + * + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OccHandoverResourceBlockCollection build() { + OccHandoverResourceBlockCollection model = + new OccHandoverResourceBlockCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OccHandoverResourceBlockCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * An array of occ handover resource blocks. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * An array of occ handover resource blocks. + * + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OccHandoverResourceBlockCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OccHandoverResourceBlockCollection)) { + return false; + } + + OccHandoverResourceBlockCollection other = (OccHandoverResourceBlockCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/OccHandoverResourceBlockDetailCollection.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/OccHandoverResourceBlockDetailCollection.java new file mode 100644 index 00000000000..2fcb9143fea --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/OccHandoverResourceBlockDetailCollection.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.model; + +/** + * A list of occResourceHandoverDetails. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OccHandoverResourceBlockDetailCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OccHandoverResourceBlockDetailCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public OccHandoverResourceBlockDetailCollection( + java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * An array of details about an occ handover resource block. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * An array of details about an occ handover resource block. + * + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OccHandoverResourceBlockDetailCollection build() { + OccHandoverResourceBlockDetailCollection model = + new OccHandoverResourceBlockDetailCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OccHandoverResourceBlockDetailCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * An array of details about an occ handover resource block. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * An array of details about an occ handover resource block. + * + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OccHandoverResourceBlockDetailCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OccHandoverResourceBlockDetailCollection)) { + return false; + } + + OccHandoverResourceBlockDetailCollection other = + (OccHandoverResourceBlockDetailCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/OccHandoverResourceBlockDetailSummary.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/OccHandoverResourceBlockDetailSummary.java new file mode 100644 index 00000000000..61f648c3f45 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/OccHandoverResourceBlockDetailSummary.java @@ -0,0 +1,192 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.model; + +/** + * Detailed information about a particular occHandoverResourceBlock. + * For compute namespace this information includes host serial, host ocid etc. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OccHandoverResourceBlockDetailSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OccHandoverResourceBlockDetailSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"occResourceHandoverBlockId", "details"}) + public OccHandoverResourceBlockDetailSummary( + String occResourceHandoverBlockId, java.util.Map details) { + super(); + this.occResourceHandoverBlockId = occResourceHandoverBlockId; + this.details = details; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the occResourceHandoverBlock. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("occResourceHandoverBlockId") + private String occResourceHandoverBlockId; + + /** + * The OCID of the occResourceHandoverBlock. + * + * @param occResourceHandoverBlockId the value to set + * @return this builder + **/ + public Builder occResourceHandoverBlockId(String occResourceHandoverBlockId) { + this.occResourceHandoverBlockId = occResourceHandoverBlockId; + this.__explicitlySet__.add("occResourceHandoverBlockId"); + return this; + } + /** + * A map that contains additional details for a given handover resource. For example for compute namespace this includes host ocid, host serial etc. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("details") + private java.util.Map details; + + /** + * A map that contains additional details for a given handover resource. For example for compute namespace this includes host ocid, host serial etc. + * + * @param details the value to set + * @return this builder + **/ + public Builder details(java.util.Map details) { + this.details = details; + this.__explicitlySet__.add("details"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OccHandoverResourceBlockDetailSummary build() { + OccHandoverResourceBlockDetailSummary model = + new OccHandoverResourceBlockDetailSummary( + this.occResourceHandoverBlockId, this.details); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OccHandoverResourceBlockDetailSummary model) { + if (model.wasPropertyExplicitlySet("occResourceHandoverBlockId")) { + this.occResourceHandoverBlockId(model.getOccResourceHandoverBlockId()); + } + if (model.wasPropertyExplicitlySet("details")) { + this.details(model.getDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the occResourceHandoverBlock. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("occResourceHandoverBlockId") + private final String occResourceHandoverBlockId; + + /** + * The OCID of the occResourceHandoverBlock. + * + * @return the value + **/ + public String getOccResourceHandoverBlockId() { + return occResourceHandoverBlockId; + } + + /** + * A map that contains additional details for a given handover resource. For example for compute namespace this includes host ocid, host serial etc. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("details") + private final java.util.Map details; + + /** + * A map that contains additional details for a given handover resource. For example for compute namespace this includes host ocid, host serial etc. + * + * @return the value + **/ + public java.util.Map getDetails() { + return details; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OccHandoverResourceBlockDetailSummary("); + sb.append("super=").append(super.toString()); + sb.append("occResourceHandoverBlockId=") + .append(String.valueOf(this.occResourceHandoverBlockId)); + sb.append(", details=").append(String.valueOf(this.details)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OccHandoverResourceBlockDetailSummary)) { + return false; + } + + OccHandoverResourceBlockDetailSummary other = (OccHandoverResourceBlockDetailSummary) o; + return java.util.Objects.equals( + this.occResourceHandoverBlockId, other.occResourceHandoverBlockId) + && java.util.Objects.equals(this.details, other.details) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.occResourceHandoverBlockId == null + ? 43 + : this.occResourceHandoverBlockId.hashCode()); + result = (result * PRIME) + (this.details == null ? 43 : this.details.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/OccHandoverResourceBlockSummary.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/OccHandoverResourceBlockSummary.java new file mode 100644 index 00000000000..613c746b324 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/OccHandoverResourceBlockSummary.java @@ -0,0 +1,511 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.model; + +/** + * Details about the association of capacity requests with the corresponding resources handed over by oracle. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OccHandoverResourceBlockSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OccHandoverResourceBlockSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "namespace", + "occCustomerGroupId", + "handoverDate", + "handoverResourceName", + "totalHandoverQuantity", + "associatedCapacityRequests", + "placementDetails" + }) + public OccHandoverResourceBlockSummary( + String id, + String compartmentId, + Namespace namespace, + String occCustomerGroupId, + java.util.Date handoverDate, + String handoverResourceName, + Long totalHandoverQuantity, + java.util.List associatedCapacityRequests, + PlacementDetails placementDetails) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.namespace = namespace; + this.occCustomerGroupId = occCustomerGroupId; + this.handoverDate = handoverDate; + this.handoverResourceName = handoverResourceName; + this.totalHandoverQuantity = totalHandoverQuantity; + this.associatedCapacityRequests = associatedCapacityRequests; + this.placementDetails = placementDetails; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource block. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource block. + * + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The OCID of the compartment where the resource block's are placed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment where the resource block's are placed. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The name of the OCI service in consideration. + * For example Compute, Exadata and so on. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespace") + private Namespace namespace; + + /** + * The name of the OCI service in consideration. + * For example Compute, Exadata and so on. + * + * @param namespace the value to set + * @return this builder + **/ + public Builder namespace(Namespace namespace) { + this.namespace = namespace; + this.__explicitlySet__.add("namespace"); + return this; + } + /** + * The OCID of the customer group for which the resources were provisioned. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("occCustomerGroupId") + private String occCustomerGroupId; + + /** + * The OCID of the customer group for which the resources were provisioned. + * + * @param occCustomerGroupId the value to set + * @return this builder + **/ + public Builder occCustomerGroupId(String occCustomerGroupId) { + this.occCustomerGroupId = occCustomerGroupId; + this.__explicitlySet__.add("occCustomerGroupId"); + return this; + } + /** + * The date on which the resource was handed over to the customer. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("handoverDate") + private java.util.Date handoverDate; + + /** + * The date on which the resource was handed over to the customer. + * + * @param handoverDate the value to set + * @return this builder + **/ + public Builder handoverDate(java.util.Date handoverDate) { + this.handoverDate = handoverDate; + this.__explicitlySet__.add("handoverDate"); + return this; + } + /** + * The name of the resource handed over by oracle. + * For instance for compute namespace this will be the name of the bare metal hardware resource. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("handoverResourceName") + private String handoverResourceName; + + /** + * The name of the resource handed over by oracle. + * For instance for compute namespace this will be the name of the bare metal hardware resource. + * + * @param handoverResourceName the value to set + * @return this builder + **/ + public Builder handoverResourceName(String handoverResourceName) { + this.handoverResourceName = handoverResourceName; + this.__explicitlySet__.add("handoverResourceName"); + return this; + } + /** + * The total quantity of the resource that was made available to the customer by Oracle. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalHandoverQuantity") + private Long totalHandoverQuantity; + + /** + * The total quantity of the resource that was made available to the customer by Oracle. + * + * @param totalHandoverQuantity the value to set + * @return this builder + **/ + public Builder totalHandoverQuantity(Long totalHandoverQuantity) { + this.totalHandoverQuantity = totalHandoverQuantity; + this.__explicitlySet__.add("totalHandoverQuantity"); + return this; + } + /** + * A list containing details about the capacity requests against which the resources were provisioned by oracle. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("associatedCapacityRequests") + private java.util.List associatedCapacityRequests; + + /** + * A list containing details about the capacity requests against which the resources were provisioned by oracle. + * + * @param associatedCapacityRequests the value to set + * @return this builder + **/ + public Builder associatedCapacityRequests( + java.util.List associatedCapacityRequests) { + this.associatedCapacityRequests = associatedCapacityRequests; + this.__explicitlySet__.add("associatedCapacityRequests"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("placementDetails") + private PlacementDetails placementDetails; + + public Builder placementDetails(PlacementDetails placementDetails) { + this.placementDetails = placementDetails; + this.__explicitlySet__.add("placementDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OccHandoverResourceBlockSummary build() { + OccHandoverResourceBlockSummary model = + new OccHandoverResourceBlockSummary( + this.id, + this.compartmentId, + this.namespace, + this.occCustomerGroupId, + this.handoverDate, + this.handoverResourceName, + this.totalHandoverQuantity, + this.associatedCapacityRequests, + this.placementDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OccHandoverResourceBlockSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("namespace")) { + this.namespace(model.getNamespace()); + } + if (model.wasPropertyExplicitlySet("occCustomerGroupId")) { + this.occCustomerGroupId(model.getOccCustomerGroupId()); + } + if (model.wasPropertyExplicitlySet("handoverDate")) { + this.handoverDate(model.getHandoverDate()); + } + if (model.wasPropertyExplicitlySet("handoverResourceName")) { + this.handoverResourceName(model.getHandoverResourceName()); + } + if (model.wasPropertyExplicitlySet("totalHandoverQuantity")) { + this.totalHandoverQuantity(model.getTotalHandoverQuantity()); + } + if (model.wasPropertyExplicitlySet("associatedCapacityRequests")) { + this.associatedCapacityRequests(model.getAssociatedCapacityRequests()); + } + if (model.wasPropertyExplicitlySet("placementDetails")) { + this.placementDetails(model.getPlacementDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource block. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource block. + * + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of the compartment where the resource block's are placed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment where the resource block's are placed. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The name of the OCI service in consideration. + * For example Compute, Exadata and so on. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespace") + private final Namespace namespace; + + /** + * The name of the OCI service in consideration. + * For example Compute, Exadata and so on. + * + * @return the value + **/ + public Namespace getNamespace() { + return namespace; + } + + /** + * The OCID of the customer group for which the resources were provisioned. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("occCustomerGroupId") + private final String occCustomerGroupId; + + /** + * The OCID of the customer group for which the resources were provisioned. + * + * @return the value + **/ + public String getOccCustomerGroupId() { + return occCustomerGroupId; + } + + /** + * The date on which the resource was handed over to the customer. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("handoverDate") + private final java.util.Date handoverDate; + + /** + * The date on which the resource was handed over to the customer. + * + * @return the value + **/ + public java.util.Date getHandoverDate() { + return handoverDate; + } + + /** + * The name of the resource handed over by oracle. + * For instance for compute namespace this will be the name of the bare metal hardware resource. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("handoverResourceName") + private final String handoverResourceName; + + /** + * The name of the resource handed over by oracle. + * For instance for compute namespace this will be the name of the bare metal hardware resource. + * + * @return the value + **/ + public String getHandoverResourceName() { + return handoverResourceName; + } + + /** + * The total quantity of the resource that was made available to the customer by Oracle. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalHandoverQuantity") + private final Long totalHandoverQuantity; + + /** + * The total quantity of the resource that was made available to the customer by Oracle. + * + * @return the value + **/ + public Long getTotalHandoverQuantity() { + return totalHandoverQuantity; + } + + /** + * A list containing details about the capacity requests against which the resources were provisioned by oracle. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("associatedCapacityRequests") + private final java.util.List associatedCapacityRequests; + + /** + * A list containing details about the capacity requests against which the resources were provisioned by oracle. + * + * @return the value + **/ + public java.util.List getAssociatedCapacityRequests() { + return associatedCapacityRequests; + } + + @com.fasterxml.jackson.annotation.JsonProperty("placementDetails") + private final PlacementDetails placementDetails; + + public PlacementDetails getPlacementDetails() { + return placementDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OccHandoverResourceBlockSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", namespace=").append(String.valueOf(this.namespace)); + sb.append(", occCustomerGroupId=").append(String.valueOf(this.occCustomerGroupId)); + sb.append(", handoverDate=").append(String.valueOf(this.handoverDate)); + sb.append(", handoverResourceName=").append(String.valueOf(this.handoverResourceName)); + sb.append(", totalHandoverQuantity=").append(String.valueOf(this.totalHandoverQuantity)); + sb.append(", associatedCapacityRequests=") + .append(String.valueOf(this.associatedCapacityRequests)); + sb.append(", placementDetails=").append(String.valueOf(this.placementDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OccHandoverResourceBlockSummary)) { + return false; + } + + OccHandoverResourceBlockSummary other = (OccHandoverResourceBlockSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.namespace, other.namespace) + && java.util.Objects.equals(this.occCustomerGroupId, other.occCustomerGroupId) + && java.util.Objects.equals(this.handoverDate, other.handoverDate) + && java.util.Objects.equals(this.handoverResourceName, other.handoverResourceName) + && java.util.Objects.equals(this.totalHandoverQuantity, other.totalHandoverQuantity) + && java.util.Objects.equals( + this.associatedCapacityRequests, other.associatedCapacityRequests) + && java.util.Objects.equals(this.placementDetails, other.placementDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.namespace == null ? 43 : this.namespace.hashCode()); + result = + (result * PRIME) + + (this.occCustomerGroupId == null + ? 43 + : this.occCustomerGroupId.hashCode()); + result = (result * PRIME) + (this.handoverDate == null ? 43 : this.handoverDate.hashCode()); + result = + (result * PRIME) + + (this.handoverResourceName == null + ? 43 + : this.handoverResourceName.hashCode()); + result = + (result * PRIME) + + (this.totalHandoverQuantity == null + ? 43 + : this.totalHandoverQuantity.hashCode()); + result = + (result * PRIME) + + (this.associatedCapacityRequests == null + ? 43 + : this.associatedCapacityRequests.hashCode()); + result = + (result * PRIME) + + (this.placementDetails == null ? 43 : this.placementDetails.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/PlacementDetails.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/PlacementDetails.java new file mode 100644 index 00000000000..96691cc7fd8 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/PlacementDetails.java @@ -0,0 +1,367 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.model; + +/** + * Details like building, room and block where the resource was placed after provisioning in the datacenter. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = PlacementDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PlacementDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "region", + "availabilityDomain", + "workloadType", + "building", + "room", + "block" + }) + public PlacementDetails( + String region, + String availabilityDomain, + String workloadType, + String building, + String room, + String block) { + super(); + this.region = region; + this.availabilityDomain = availabilityDomain; + this.workloadType = workloadType; + this.building = building; + this.room = room; + this.block = block; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the region for which the resources were provisioned. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("region") + private String region; + + /** + * The name of the region for which the resources were provisioned. + * + * @param region the value to set + * @return this builder + **/ + public Builder region(String region) { + this.region = region; + this.__explicitlySet__.add("region"); + return this; + } + /** + * The availability domain (AD) for which the resources were provisioned. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The availability domain (AD) for which the resources were provisioned. + * + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + /** + * The type of workload to which these resources were provisioned. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("workloadType") + private String workloadType; + + /** + * The type of workload to which these resources were provisioned. + * + * @param workloadType the value to set + * @return this builder + **/ + public Builder workloadType(String workloadType) { + this.workloadType = workloadType; + this.__explicitlySet__.add("workloadType"); + return this; + } + /** + * The datacenter building where the resource was placed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("building") + private String building; + + /** + * The datacenter building where the resource was placed. + * + * @param building the value to set + * @return this builder + **/ + public Builder building(String building) { + this.building = building; + this.__explicitlySet__.add("building"); + return this; + } + /** + * The name of the room in the dataacenter building where the resource was placed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("room") + private String room; + + /** + * The name of the room in the dataacenter building where the resource was placed. + * + * @param room the value to set + * @return this builder + **/ + public Builder room(String room) { + this.room = room; + this.__explicitlySet__.add("room"); + return this; + } + /** + * The block in the datacenter room where the resource was placed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("block") + private String block; + + /** + * The block in the datacenter room where the resource was placed. + * + * @param block the value to set + * @return this builder + **/ + public Builder block(String block) { + this.block = block; + this.__explicitlySet__.add("block"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PlacementDetails build() { + PlacementDetails model = + new PlacementDetails( + this.region, + this.availabilityDomain, + this.workloadType, + this.building, + this.room, + this.block); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PlacementDetails model) { + if (model.wasPropertyExplicitlySet("region")) { + this.region(model.getRegion()); + } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("workloadType")) { + this.workloadType(model.getWorkloadType()); + } + if (model.wasPropertyExplicitlySet("building")) { + this.building(model.getBuilding()); + } + if (model.wasPropertyExplicitlySet("room")) { + this.room(model.getRoom()); + } + if (model.wasPropertyExplicitlySet("block")) { + this.block(model.getBlock()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the region for which the resources were provisioned. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("region") + private final String region; + + /** + * The name of the region for which the resources were provisioned. + * + * @return the value + **/ + public String getRegion() { + return region; + } + + /** + * The availability domain (AD) for which the resources were provisioned. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The availability domain (AD) for which the resources were provisioned. + * + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The type of workload to which these resources were provisioned. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("workloadType") + private final String workloadType; + + /** + * The type of workload to which these resources were provisioned. + * + * @return the value + **/ + public String getWorkloadType() { + return workloadType; + } + + /** + * The datacenter building where the resource was placed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("building") + private final String building; + + /** + * The datacenter building where the resource was placed. + * + * @return the value + **/ + public String getBuilding() { + return building; + } + + /** + * The name of the room in the dataacenter building where the resource was placed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("room") + private final String room; + + /** + * The name of the room in the dataacenter building where the resource was placed. + * + * @return the value + **/ + public String getRoom() { + return room; + } + + /** + * The block in the datacenter room where the resource was placed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("block") + private final String block; + + /** + * The block in the datacenter room where the resource was placed. + * + * @return the value + **/ + public String getBlock() { + return block; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PlacementDetails("); + sb.append("super=").append(super.toString()); + sb.append("region=").append(String.valueOf(this.region)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", workloadType=").append(String.valueOf(this.workloadType)); + sb.append(", building=").append(String.valueOf(this.building)); + sb.append(", room=").append(String.valueOf(this.room)); + sb.append(", block=").append(String.valueOf(this.block)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PlacementDetails)) { + return false; + } + + PlacementDetails other = (PlacementDetails) o; + return java.util.Objects.equals(this.region, other.region) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.workloadType, other.workloadType) + && java.util.Objects.equals(this.building, other.building) + && java.util.Objects.equals(this.room, other.room) + && java.util.Objects.equals(this.block, other.block) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.region == null ? 43 : this.region.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = (result * PRIME) + (this.workloadType == null ? 43 : this.workloadType.hashCode()); + result = (result * PRIME) + (this.building == null ? 43 : this.building.hashCode()); + result = (result * PRIME) + (this.room == null ? 43 : this.room.hashCode()); + result = (result * PRIME) + (this.block == null ? 43 : this.block.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/UpdateOccCustomerDetails.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/UpdateOccCustomerDetails.java new file mode 100644 index 00000000000..92fe4bdc503 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/UpdateOccCustomerDetails.java @@ -0,0 +1,246 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.model; + +/** + * Details about the update request for updating the customer. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateOccCustomerDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateOccCustomerDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"displayName", "description", "status"}) + public UpdateOccCustomerDetails(String displayName, String description, Status status) { + super(); + this.displayName = displayName; + this.description = description; + this.status = status; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The display name of the customer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the customer. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Additional information about the customer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Additional information about the customer. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * To determine whether the customer group is enabled/disabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * To determine whether the customer group is enabled/disabled. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateOccCustomerDetails build() { + UpdateOccCustomerDetails model = + new UpdateOccCustomerDetails(this.displayName, this.description, this.status); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateOccCustomerDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The display name of the customer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the customer. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Additional information about the customer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Additional information about the customer. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * To determine whether the customer group is enabled/disabled. + **/ + public enum Status { + Enabled("ENABLED"), + Disabled("DISABLED"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + map.put(v.getValue(), v); + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Status: " + key); + } + }; + /** + * To determine whether the customer group is enabled/disabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * To determine whether the customer group is enabled/disabled. + * @return the value + **/ + public Status getStatus() { + return status; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateOccCustomerDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateOccCustomerDetails)) { + return false; + } + + UpdateOccCustomerDetails other = (UpdateOccCustomerDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.status, other.status) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/UpdateOccCustomerGroupDetails.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/UpdateOccCustomerGroupDetails.java new file mode 100644 index 00000000000..7641403e186 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/model/UpdateOccCustomerGroupDetails.java @@ -0,0 +1,353 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.model; + +/** + * Details about the update request for updating the customer group. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateOccCustomerGroupDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateOccCustomerGroupDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "freeformTags", + "definedTags", + "status" + }) + public UpdateOccCustomerGroupDetails( + String displayName, + String description, + java.util.Map freeformTags, + java.util.Map> definedTags, + Status status) { + super(); + this.displayName = displayName; + this.description = description; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.status = status; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The display name of the customer group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the customer group. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Additional information about the customer group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Additional information about the customer group. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * To determine whether the customer group is enabled/disabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * To determine whether the customer group is enabled/disabled. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateOccCustomerGroupDetails build() { + UpdateOccCustomerGroupDetails model = + new UpdateOccCustomerGroupDetails( + this.displayName, + this.description, + this.freeformTags, + this.definedTags, + this.status); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateOccCustomerGroupDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The display name of the customer group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the customer group. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Additional information about the customer group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Additional information about the customer group. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * To determine whether the customer group is enabled/disabled. + **/ + public enum Status { + Enabled("ENABLED"), + Disabled("DISABLED"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + map.put(v.getValue(), v); + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Status: " + key); + } + }; + /** + * To determine whether the customer group is enabled/disabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * To determine whether the customer group is enabled/disabled. + * @return the value + **/ + public Status getStatus() { + return status; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateOccCustomerGroupDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateOccCustomerGroupDetails)) { + return false; + } + + UpdateOccCustomerGroupDetails other = (UpdateOccCustomerGroupDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.status, other.status) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/CreateOccCustomerGroupRequest.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/CreateOccCustomerGroupRequest.java new file mode 100644 index 00000000000..ece7d228c7c --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/CreateOccCustomerGroupRequest.java @@ -0,0 +1,297 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.requests; + +import com.oracle.bmc.capacitymanagement.model.*; +/** + * Example: Click here to see how to use CreateOccCustomerGroupRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class CreateOccCustomerGroupRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.capacitymanagement.model.CreateOccCustomerGroupDetails> { + + /** + * The request details for creating a customer group. + * + */ + private com.oracle.bmc.capacitymanagement.model.CreateOccCustomerGroupDetails + createOccCustomerGroupDetails; + + /** + * The request details for creating a customer group. + * + */ + public com.oracle.bmc.capacitymanagement.model.CreateOccCustomerGroupDetails + getCreateOccCustomerGroupDetails() { + return createOccCustomerGroupDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.capacitymanagement.model.CreateOccCustomerGroupDetails getBody$() { + return createOccCustomerGroupDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateOccCustomerGroupRequest, + com.oracle.bmc.capacitymanagement.model.CreateOccCustomerGroupDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The request details for creating a customer group. + * + */ + private com.oracle.bmc.capacitymanagement.model.CreateOccCustomerGroupDetails + createOccCustomerGroupDetails = null; + + /** + * The request details for creating a customer group. + * + * @param createOccCustomerGroupDetails the value to set + * @return this builder instance + */ + public Builder createOccCustomerGroupDetails( + com.oracle.bmc.capacitymanagement.model.CreateOccCustomerGroupDetails + createOccCustomerGroupDetails) { + this.createOccCustomerGroupDetails = createOccCustomerGroupDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateOccCustomerGroupRequest o) { + createOccCustomerGroupDetails(o.getCreateOccCustomerGroupDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateOccCustomerGroupRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateOccCustomerGroupRequest + */ + public CreateOccCustomerGroupRequest build() { + CreateOccCustomerGroupRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.capacitymanagement.model.CreateOccCustomerGroupDetails body) { + createOccCustomerGroupDetails(body); + return this; + } + + /** + * Build the instance of CreateOccCustomerGroupRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateOccCustomerGroupRequest + */ + public CreateOccCustomerGroupRequest buildWithoutInvocationCallback() { + CreateOccCustomerGroupRequest request = new CreateOccCustomerGroupRequest(); + request.createOccCustomerGroupDetails = createOccCustomerGroupDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateOccCustomerGroupRequest(createOccCustomerGroupDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createOccCustomerGroupDetails(createOccCustomerGroupDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createOccCustomerGroupDetails=") + .append(String.valueOf(this.createOccCustomerGroupDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateOccCustomerGroupRequest)) { + return false; + } + + CreateOccCustomerGroupRequest other = (CreateOccCustomerGroupRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createOccCustomerGroupDetails, other.createOccCustomerGroupDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createOccCustomerGroupDetails == null + ? 43 + : this.createOccCustomerGroupDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/CreateOccCustomerRequest.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/CreateOccCustomerRequest.java new file mode 100644 index 00000000000..dded835eefb --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/CreateOccCustomerRequest.java @@ -0,0 +1,337 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.requests; + +import com.oracle.bmc.capacitymanagement.model.*; +/** + * Example: Click here to see how to use CreateOccCustomerRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class CreateOccCustomerRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.capacitymanagement.model.CreateOccCustomerDetails> { + + /** + * The request details for creating a customer. + * + */ + private com.oracle.bmc.capacitymanagement.model.CreateOccCustomerDetails + createOccCustomerDetails; + + /** + * The request details for creating a customer. + * + */ + public com.oracle.bmc.capacitymanagement.model.CreateOccCustomerDetails + getCreateOccCustomerDetails() { + return createOccCustomerDetails; + } + /** + * The OCID of the customer group. + * + */ + private String occCustomerGroupId; + + /** + * The OCID of the customer group. + * + */ + public String getOccCustomerGroupId() { + return occCustomerGroupId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.capacitymanagement.model.CreateOccCustomerDetails getBody$() { + return createOccCustomerDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateOccCustomerRequest, + com.oracle.bmc.capacitymanagement.model.CreateOccCustomerDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The request details for creating a customer. + * + */ + private com.oracle.bmc.capacitymanagement.model.CreateOccCustomerDetails + createOccCustomerDetails = null; + + /** + * The request details for creating a customer. + * + * @param createOccCustomerDetails the value to set + * @return this builder instance + */ + public Builder createOccCustomerDetails( + com.oracle.bmc.capacitymanagement.model.CreateOccCustomerDetails + createOccCustomerDetails) { + this.createOccCustomerDetails = createOccCustomerDetails; + return this; + } + + /** + * The OCID of the customer group. + * + */ + private String occCustomerGroupId = null; + + /** + * The OCID of the customer group. + * + * @param occCustomerGroupId the value to set + * @return this builder instance + */ + public Builder occCustomerGroupId(String occCustomerGroupId) { + this.occCustomerGroupId = occCustomerGroupId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateOccCustomerRequest o) { + createOccCustomerDetails(o.getCreateOccCustomerDetails()); + occCustomerGroupId(o.getOccCustomerGroupId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateOccCustomerRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateOccCustomerRequest + */ + public CreateOccCustomerRequest build() { + CreateOccCustomerRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.capacitymanagement.model.CreateOccCustomerDetails body) { + createOccCustomerDetails(body); + return this; + } + + /** + * Build the instance of CreateOccCustomerRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateOccCustomerRequest + */ + public CreateOccCustomerRequest buildWithoutInvocationCallback() { + CreateOccCustomerRequest request = new CreateOccCustomerRequest(); + request.createOccCustomerDetails = createOccCustomerDetails; + request.occCustomerGroupId = occCustomerGroupId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateOccCustomerRequest(createOccCustomerDetails, occCustomerGroupId, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createOccCustomerDetails(createOccCustomerDetails) + .occCustomerGroupId(occCustomerGroupId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createOccCustomerDetails=") + .append(String.valueOf(this.createOccCustomerDetails)); + sb.append(",occCustomerGroupId=").append(String.valueOf(this.occCustomerGroupId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateOccCustomerRequest)) { + return false; + } + + CreateOccCustomerRequest other = (CreateOccCustomerRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createOccCustomerDetails, other.createOccCustomerDetails) + && java.util.Objects.equals(this.occCustomerGroupId, other.occCustomerGroupId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createOccCustomerDetails == null + ? 43 + : this.createOccCustomerDetails.hashCode()); + result = + (result * PRIME) + + (this.occCustomerGroupId == null + ? 43 + : this.occCustomerGroupId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/DeleteOccCustomerGroupRequest.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/DeleteOccCustomerGroupRequest.java new file mode 100644 index 00000000000..8229330a910 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/DeleteOccCustomerGroupRequest.java @@ -0,0 +1,264 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.requests; + +import com.oracle.bmc.capacitymanagement.model.*; +/** + * Example: Click here to see how to use DeleteOccCustomerGroupRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class DeleteOccCustomerGroupRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the customer group. + * + */ + private String occCustomerGroupId; + + /** + * The OCID of the customer group. + * + */ + public String getOccCustomerGroupId() { + return occCustomerGroupId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteOccCustomerGroupRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the customer group. + * + */ + private String occCustomerGroupId = null; + + /** + * The OCID of the customer group. + * + * @param occCustomerGroupId the value to set + * @return this builder instance + */ + public Builder occCustomerGroupId(String occCustomerGroupId) { + this.occCustomerGroupId = occCustomerGroupId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteOccCustomerGroupRequest o) { + occCustomerGroupId(o.getOccCustomerGroupId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteOccCustomerGroupRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteOccCustomerGroupRequest + */ + public DeleteOccCustomerGroupRequest build() { + DeleteOccCustomerGroupRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteOccCustomerGroupRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteOccCustomerGroupRequest + */ + public DeleteOccCustomerGroupRequest buildWithoutInvocationCallback() { + DeleteOccCustomerGroupRequest request = new DeleteOccCustomerGroupRequest(); + request.occCustomerGroupId = occCustomerGroupId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteOccCustomerGroupRequest(occCustomerGroupId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .occCustomerGroupId(occCustomerGroupId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",occCustomerGroupId=").append(String.valueOf(this.occCustomerGroupId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteOccCustomerGroupRequest)) { + return false; + } + + DeleteOccCustomerGroupRequest other = (DeleteOccCustomerGroupRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.occCustomerGroupId, other.occCustomerGroupId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.occCustomerGroupId == null + ? 43 + : this.occCustomerGroupId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/DeleteOccCustomerRequest.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/DeleteOccCustomerRequest.java new file mode 100644 index 00000000000..a7a231a81ff --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/DeleteOccCustomerRequest.java @@ -0,0 +1,301 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.requests; + +import com.oracle.bmc.capacitymanagement.model.*; +/** + * Example: Click here to see how to use DeleteOccCustomerRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class DeleteOccCustomerRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the customer group. + * + */ + private String occCustomerGroupId; + + /** + * The OCID of the customer group. + * + */ + public String getOccCustomerGroupId() { + return occCustomerGroupId; + } + /** + * The tenancy id of the customer. + * + */ + private String occCustomerId; + + /** + * The tenancy id of the customer. + * + */ + public String getOccCustomerId() { + return occCustomerId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteOccCustomerRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the customer group. + * + */ + private String occCustomerGroupId = null; + + /** + * The OCID of the customer group. + * + * @param occCustomerGroupId the value to set + * @return this builder instance + */ + public Builder occCustomerGroupId(String occCustomerGroupId) { + this.occCustomerGroupId = occCustomerGroupId; + return this; + } + + /** + * The tenancy id of the customer. + * + */ + private String occCustomerId = null; + + /** + * The tenancy id of the customer. + * + * @param occCustomerId the value to set + * @return this builder instance + */ + public Builder occCustomerId(String occCustomerId) { + this.occCustomerId = occCustomerId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteOccCustomerRequest o) { + occCustomerGroupId(o.getOccCustomerGroupId()); + occCustomerId(o.getOccCustomerId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteOccCustomerRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteOccCustomerRequest + */ + public DeleteOccCustomerRequest build() { + DeleteOccCustomerRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteOccCustomerRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteOccCustomerRequest + */ + public DeleteOccCustomerRequest buildWithoutInvocationCallback() { + DeleteOccCustomerRequest request = new DeleteOccCustomerRequest(); + request.occCustomerGroupId = occCustomerGroupId; + request.occCustomerId = occCustomerId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteOccCustomerRequest(occCustomerGroupId, occCustomerId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .occCustomerGroupId(occCustomerGroupId) + .occCustomerId(occCustomerId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",occCustomerGroupId=").append(String.valueOf(this.occCustomerGroupId)); + sb.append(",occCustomerId=").append(String.valueOf(this.occCustomerId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteOccCustomerRequest)) { + return false; + } + + DeleteOccCustomerRequest other = (DeleteOccCustomerRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.occCustomerGroupId, other.occCustomerGroupId) + && java.util.Objects.equals(this.occCustomerId, other.occCustomerId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.occCustomerGroupId == null + ? 43 + : this.occCustomerGroupId.hashCode()); + result = + (result * PRIME) + + (this.occCustomerId == null ? 43 : this.occCustomerId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/ListInternalOccHandoverResourceBlockDetailsRequest.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/ListInternalOccHandoverResourceBlockDetailsRequest.java new file mode 100644 index 00000000000..981059c80fa --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/ListInternalOccHandoverResourceBlockDetailsRequest.java @@ -0,0 +1,426 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.requests; + +import com.oracle.bmc.capacitymanagement.model.*; +/** + * Example: Click here to see how to use ListInternalOccHandoverResourceBlockDetailsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class ListInternalOccHandoverResourceBlockDetailsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the OccHandoverResource which is a required query parameter for listing OccHandoverResourceDetails. + * + */ + private String occHandoverResourceBlockId; + + /** + * The OCID of the OccHandoverResource which is a required query parameter for listing OccHandoverResourceDetails. + * + */ + public String getOccHandoverResourceBlockId() { + return occHandoverResourceBlockId; + } + /** + * This fiter is applicable only for COMPUTE namespace. It helps in fetching of all resource block details for which the hostId is equal to the one provided in this query param. + * + */ + private String hostId; + + /** + * This fiter is applicable only for COMPUTE namespace. It helps in fetching of all resource block details for which the hostId is equal to the one provided in this query param. + * + */ + public String getHostId() { + return hostId; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.capacitymanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.capacitymanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. + * The default order for handoverDate is chronological order(latest date item at the end). + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. + * The default order for handoverDate is chronological order(latest date item at the end). + * + **/ + public enum SortBy { + HandoverDate("handoverDate"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. + * The default order for handoverDate is chronological order(latest date item at the end). + * + */ + public SortBy getSortBy() { + return sortBy; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListInternalOccHandoverResourceBlockDetailsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the OccHandoverResource which is a required query parameter for listing OccHandoverResourceDetails. + * + */ + private String occHandoverResourceBlockId = null; + + /** + * The OCID of the OccHandoverResource which is a required query parameter for listing OccHandoverResourceDetails. + * + * @param occHandoverResourceBlockId the value to set + * @return this builder instance + */ + public Builder occHandoverResourceBlockId(String occHandoverResourceBlockId) { + this.occHandoverResourceBlockId = occHandoverResourceBlockId; + return this; + } + + /** + * This fiter is applicable only for COMPUTE namespace. It helps in fetching of all resource block details for which the hostId is equal to the one provided in this query param. + * + */ + private String hostId = null; + + /** + * This fiter is applicable only for COMPUTE namespace. It helps in fetching of all resource block details for which the hostId is equal to the one provided in this query param. + * + * @param hostId the value to set + * @return this builder instance + */ + public Builder hostId(String hostId) { + this.hostId = hostId; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.capacitymanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.capacitymanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. + * The default order for handoverDate is chronological order(latest date item at the end). + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. + * The default order for handoverDate is chronological order(latest date item at the end). + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListInternalOccHandoverResourceBlockDetailsRequest o) { + occHandoverResourceBlockId(o.getOccHandoverResourceBlockId()); + hostId(o.getHostId()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListInternalOccHandoverResourceBlockDetailsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListInternalOccHandoverResourceBlockDetailsRequest + */ + public ListInternalOccHandoverResourceBlockDetailsRequest build() { + ListInternalOccHandoverResourceBlockDetailsRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListInternalOccHandoverResourceBlockDetailsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListInternalOccHandoverResourceBlockDetailsRequest + */ + public ListInternalOccHandoverResourceBlockDetailsRequest buildWithoutInvocationCallback() { + ListInternalOccHandoverResourceBlockDetailsRequest request = + new ListInternalOccHandoverResourceBlockDetailsRequest(); + request.occHandoverResourceBlockId = occHandoverResourceBlockId; + request.hostId = hostId; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + return request; + // new ListInternalOccHandoverResourceBlockDetailsRequest(occHandoverResourceBlockId, hostId, limit, page, opcRequestId, sortOrder, sortBy); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .occHandoverResourceBlockId(occHandoverResourceBlockId) + .hostId(hostId) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId) + .sortOrder(sortOrder) + .sortBy(sortBy); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",occHandoverResourceBlockId=") + .append(String.valueOf(this.occHandoverResourceBlockId)); + sb.append(",hostId=").append(String.valueOf(this.hostId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListInternalOccHandoverResourceBlockDetailsRequest)) { + return false; + } + + ListInternalOccHandoverResourceBlockDetailsRequest other = + (ListInternalOccHandoverResourceBlockDetailsRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.occHandoverResourceBlockId, other.occHandoverResourceBlockId) + && java.util.Objects.equals(this.hostId, other.hostId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.occHandoverResourceBlockId == null + ? 43 + : this.occHandoverResourceBlockId.hashCode()); + result = (result * PRIME) + (this.hostId == null ? 43 : this.hostId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/ListInternalOccHandoverResourceBlocksRequest.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/ListInternalOccHandoverResourceBlocksRequest.java new file mode 100644 index 00000000000..ebd45a0cc43 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/ListInternalOccHandoverResourceBlocksRequest.java @@ -0,0 +1,621 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.requests; + +import com.oracle.bmc.capacitymanagement.model.*; +/** + * Example: Click here to see how to use ListInternalOccHandoverResourceBlocksRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class ListInternalOccHandoverResourceBlocksRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The namespace enum value that needs to be passed as a required query parameter. + * + */ + private com.oracle.bmc.capacitymanagement.model.Namespace namespace; + + /** + * The namespace enum value that needs to be passed as a required query parameter. + * + */ + public com.oracle.bmc.capacitymanagement.model.Namespace getNamespace() { + return namespace; + } + /** + * The ocid of the compartment or tenancy in which resources are to be listed. This will also be used for authorization purposes. + */ + private String compartmentId; + + /** + * The ocid of the compartment or tenancy in which resources are to be listed. This will also be used for authorization purposes. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The customer group ocid by which we would filter the list. + */ + private String occCustomerGroupId; + + /** + * The customer group ocid by which we would filter the list. + */ + public String getOccCustomerGroupId() { + return occCustomerGroupId; + } + /** + * A filter to return only the list of resources that match the name provided in this filter. + * + */ + private String handoverResourceName; + + /** + * A filter to return only the list of resources that match the name provided in this filter. + * + */ + public String getHandoverResourceName() { + return handoverResourceName; + } + /** + * This filter helps in fetching all handed over resources for which the recordDate is greater than or equal to the startDate. + * + */ + private java.util.Date handoverDateGreaterThanOrEqualTo; + + /** + * This filter helps in fetching all handed over resources for which the recordDate is greater than or equal to the startDate. + * + */ + public java.util.Date getHandoverDateGreaterThanOrEqualTo() { + return handoverDateGreaterThanOrEqualTo; + } + /** + * This filter helps in fetching all handed over resources for which the recordDate is less than or equal to the endDate. + * + */ + private java.util.Date handoverDateLessThanOrEqualTo; + + /** + * This filter helps in fetching all handed over resources for which the recordDate is less than or equal to the endDate. + * + */ + public java.util.Date getHandoverDateLessThanOrEqualTo() { + return handoverDateLessThanOrEqualTo; + } + /** + * This filter helps in fetching the handed over resource for which the occHandoverResourceId is equal to the one provided here. + * + */ + private String occHandoverResourceBlockId; + + /** + * This filter helps in fetching the handed over resource for which the occHandoverResourceId is equal to the one provided here. + * + */ + public String getOccHandoverResourceBlockId() { + return occHandoverResourceBlockId; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.capacitymanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.capacitymanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. + * The default order for handoverDate is chronological order(latest date item at the end). + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. + * The default order for handoverDate is chronological order(latest date item at the end). + * + **/ + public enum SortBy { + HandoverDate("handoverDate"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. + * The default order for handoverDate is chronological order(latest date item at the end). + * + */ + public SortBy getSortBy() { + return sortBy; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListInternalOccHandoverResourceBlocksRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The namespace enum value that needs to be passed as a required query parameter. + * + */ + private com.oracle.bmc.capacitymanagement.model.Namespace namespace = null; + + /** + * The namespace enum value that needs to be passed as a required query parameter. + * + * @param namespace the value to set + * @return this builder instance + */ + public Builder namespace(com.oracle.bmc.capacitymanagement.model.Namespace namespace) { + this.namespace = namespace; + return this; + } + + /** + * The ocid of the compartment or tenancy in which resources are to be listed. This will also be used for authorization purposes. + */ + private String compartmentId = null; + + /** + * The ocid of the compartment or tenancy in which resources are to be listed. This will also be used for authorization purposes. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The customer group ocid by which we would filter the list. + */ + private String occCustomerGroupId = null; + + /** + * The customer group ocid by which we would filter the list. + * @param occCustomerGroupId the value to set + * @return this builder instance + */ + public Builder occCustomerGroupId(String occCustomerGroupId) { + this.occCustomerGroupId = occCustomerGroupId; + return this; + } + + /** + * A filter to return only the list of resources that match the name provided in this filter. + * + */ + private String handoverResourceName = null; + + /** + * A filter to return only the list of resources that match the name provided in this filter. + * + * @param handoverResourceName the value to set + * @return this builder instance + */ + public Builder handoverResourceName(String handoverResourceName) { + this.handoverResourceName = handoverResourceName; + return this; + } + + /** + * This filter helps in fetching all handed over resources for which the recordDate is greater than or equal to the startDate. + * + */ + private java.util.Date handoverDateGreaterThanOrEqualTo = null; + + /** + * This filter helps in fetching all handed over resources for which the recordDate is greater than or equal to the startDate. + * + * @param handoverDateGreaterThanOrEqualTo the value to set + * @return this builder instance + */ + public Builder handoverDateGreaterThanOrEqualTo( + java.util.Date handoverDateGreaterThanOrEqualTo) { + this.handoverDateGreaterThanOrEqualTo = handoverDateGreaterThanOrEqualTo; + return this; + } + + /** + * This filter helps in fetching all handed over resources for which the recordDate is less than or equal to the endDate. + * + */ + private java.util.Date handoverDateLessThanOrEqualTo = null; + + /** + * This filter helps in fetching all handed over resources for which the recordDate is less than or equal to the endDate. + * + * @param handoverDateLessThanOrEqualTo the value to set + * @return this builder instance + */ + public Builder handoverDateLessThanOrEqualTo(java.util.Date handoverDateLessThanOrEqualTo) { + this.handoverDateLessThanOrEqualTo = handoverDateLessThanOrEqualTo; + return this; + } + + /** + * This filter helps in fetching the handed over resource for which the occHandoverResourceId is equal to the one provided here. + * + */ + private String occHandoverResourceBlockId = null; + + /** + * This filter helps in fetching the handed over resource for which the occHandoverResourceId is equal to the one provided here. + * + * @param occHandoverResourceBlockId the value to set + * @return this builder instance + */ + public Builder occHandoverResourceBlockId(String occHandoverResourceBlockId) { + this.occHandoverResourceBlockId = occHandoverResourceBlockId; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.capacitymanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.capacitymanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. + * The default order for handoverDate is chronological order(latest date item at the end). + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. + * The default order for handoverDate is chronological order(latest date item at the end). + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListInternalOccHandoverResourceBlocksRequest o) { + namespace(o.getNamespace()); + compartmentId(o.getCompartmentId()); + occCustomerGroupId(o.getOccCustomerGroupId()); + handoverResourceName(o.getHandoverResourceName()); + handoverDateGreaterThanOrEqualTo(o.getHandoverDateGreaterThanOrEqualTo()); + handoverDateLessThanOrEqualTo(o.getHandoverDateLessThanOrEqualTo()); + occHandoverResourceBlockId(o.getOccHandoverResourceBlockId()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListInternalOccHandoverResourceBlocksRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListInternalOccHandoverResourceBlocksRequest + */ + public ListInternalOccHandoverResourceBlocksRequest build() { + ListInternalOccHandoverResourceBlocksRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListInternalOccHandoverResourceBlocksRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListInternalOccHandoverResourceBlocksRequest + */ + public ListInternalOccHandoverResourceBlocksRequest buildWithoutInvocationCallback() { + ListInternalOccHandoverResourceBlocksRequest request = + new ListInternalOccHandoverResourceBlocksRequest(); + request.namespace = namespace; + request.compartmentId = compartmentId; + request.occCustomerGroupId = occCustomerGroupId; + request.handoverResourceName = handoverResourceName; + request.handoverDateGreaterThanOrEqualTo = handoverDateGreaterThanOrEqualTo; + request.handoverDateLessThanOrEqualTo = handoverDateLessThanOrEqualTo; + request.occHandoverResourceBlockId = occHandoverResourceBlockId; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + return request; + // new ListInternalOccHandoverResourceBlocksRequest(namespace, compartmentId, occCustomerGroupId, handoverResourceName, handoverDateGreaterThanOrEqualTo, handoverDateLessThanOrEqualTo, occHandoverResourceBlockId, limit, page, opcRequestId, sortOrder, sortBy); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .namespace(namespace) + .compartmentId(compartmentId) + .occCustomerGroupId(occCustomerGroupId) + .handoverResourceName(handoverResourceName) + .handoverDateGreaterThanOrEqualTo(handoverDateGreaterThanOrEqualTo) + .handoverDateLessThanOrEqualTo(handoverDateLessThanOrEqualTo) + .occHandoverResourceBlockId(occHandoverResourceBlockId) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId) + .sortOrder(sortOrder) + .sortBy(sortBy); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",namespace=").append(String.valueOf(this.namespace)); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",occCustomerGroupId=").append(String.valueOf(this.occCustomerGroupId)); + sb.append(",handoverResourceName=").append(String.valueOf(this.handoverResourceName)); + sb.append(",handoverDateGreaterThanOrEqualTo=") + .append(String.valueOf(this.handoverDateGreaterThanOrEqualTo)); + sb.append(",handoverDateLessThanOrEqualTo=") + .append(String.valueOf(this.handoverDateLessThanOrEqualTo)); + sb.append(",occHandoverResourceBlockId=") + .append(String.valueOf(this.occHandoverResourceBlockId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListInternalOccHandoverResourceBlocksRequest)) { + return false; + } + + ListInternalOccHandoverResourceBlocksRequest other = + (ListInternalOccHandoverResourceBlocksRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.namespace, other.namespace) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.occCustomerGroupId, other.occCustomerGroupId) + && java.util.Objects.equals(this.handoverResourceName, other.handoverResourceName) + && java.util.Objects.equals( + this.handoverDateGreaterThanOrEqualTo, + other.handoverDateGreaterThanOrEqualTo) + && java.util.Objects.equals( + this.handoverDateLessThanOrEqualTo, other.handoverDateLessThanOrEqualTo) + && java.util.Objects.equals( + this.occHandoverResourceBlockId, other.occHandoverResourceBlockId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.namespace == null ? 43 : this.namespace.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.occCustomerGroupId == null + ? 43 + : this.occCustomerGroupId.hashCode()); + result = + (result * PRIME) + + (this.handoverResourceName == null + ? 43 + : this.handoverResourceName.hashCode()); + result = + (result * PRIME) + + (this.handoverDateGreaterThanOrEqualTo == null + ? 43 + : this.handoverDateGreaterThanOrEqualTo.hashCode()); + result = + (result * PRIME) + + (this.handoverDateLessThanOrEqualTo == null + ? 43 + : this.handoverDateLessThanOrEqualTo.hashCode()); + result = + (result * PRIME) + + (this.occHandoverResourceBlockId == null + ? 43 + : this.occHandoverResourceBlockId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/ListOccAvailabilityCatalogsInternalRequest.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/ListOccAvailabilityCatalogsInternalRequest.java index 5023caa0100..19ff0aa5692 100644 --- a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/ListOccAvailabilityCatalogsInternalRequest.java +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/ListOccAvailabilityCatalogsInternalRequest.java @@ -23,6 +23,17 @@ public class ListOccAvailabilityCatalogsInternalRequest public String getCompartmentId() { return compartmentId; } + /** + * The customer group ocid by which we would filter the list. + */ + private String occCustomerGroupId; + + /** + * The customer group ocid by which we would filter the list. + */ + public String getOccCustomerGroupId() { + return occCustomerGroupId; + } /** * The namespace by which we would filter the list. */ @@ -69,17 +80,6 @@ public String getDisplayName() { getCatalogState() { return catalogState; } - /** - * The customer group ocid by which we would filter the list. - */ - private String occCustomerGroupId; - - /** - * The customer group ocid by which we would filter the list. - */ - public String getOccCustomerGroupId() { - return occCustomerGroupId; - } /** * The maximum number of items to return. */ @@ -201,6 +201,21 @@ public Builder compartmentId(String compartmentId) { return this; } + /** + * The customer group ocid by which we would filter the list. + */ + private String occCustomerGroupId = null; + + /** + * The customer group ocid by which we would filter the list. + * @param occCustomerGroupId the value to set + * @return this builder instance + */ + public Builder occCustomerGroupId(String occCustomerGroupId) { + this.occCustomerGroupId = occCustomerGroupId; + return this; + } + /** * The namespace by which we would filter the list. */ @@ -264,21 +279,6 @@ public Builder catalogState( return this; } - /** - * The customer group ocid by which we would filter the list. - */ - private String occCustomerGroupId = null; - - /** - * The customer group ocid by which we would filter the list. - * @param occCustomerGroupId the value to set - * @return this builder instance - */ - public Builder occCustomerGroupId(String occCustomerGroupId) { - this.occCustomerGroupId = occCustomerGroupId; - return this; - } - /** * The maximum number of items to return. */ @@ -389,11 +389,11 @@ public Builder retryConfiguration( */ public Builder copy(ListOccAvailabilityCatalogsInternalRequest o) { compartmentId(o.getCompartmentId()); + occCustomerGroupId(o.getOccCustomerGroupId()); namespace(o.getNamespace()); id(o.getId()); displayName(o.getDisplayName()); catalogState(o.getCatalogState()); - occCustomerGroupId(o.getOccCustomerGroupId()); limit(o.getLimit()); page(o.getPage()); opcRequestId(o.getOpcRequestId()); @@ -433,18 +433,18 @@ public ListOccAvailabilityCatalogsInternalRequest buildWithoutInvocationCallback ListOccAvailabilityCatalogsInternalRequest request = new ListOccAvailabilityCatalogsInternalRequest(); request.compartmentId = compartmentId; + request.occCustomerGroupId = occCustomerGroupId; request.namespace = namespace; request.id = id; request.displayName = displayName; request.catalogState = catalogState; - request.occCustomerGroupId = occCustomerGroupId; request.limit = limit; request.page = page; request.opcRequestId = opcRequestId; request.sortOrder = sortOrder; request.sortBy = sortBy; return request; - // new ListOccAvailabilityCatalogsInternalRequest(compartmentId, namespace, id, displayName, catalogState, occCustomerGroupId, limit, page, opcRequestId, sortOrder, sortBy); + // new ListOccAvailabilityCatalogsInternalRequest(compartmentId, occCustomerGroupId, namespace, id, displayName, catalogState, limit, page, opcRequestId, sortOrder, sortBy); } } @@ -455,11 +455,11 @@ public ListOccAvailabilityCatalogsInternalRequest buildWithoutInvocationCallback public Builder toBuilder() { return new Builder() .compartmentId(compartmentId) + .occCustomerGroupId(occCustomerGroupId) .namespace(namespace) .id(id) .displayName(displayName) .catalogState(catalogState) - .occCustomerGroupId(occCustomerGroupId) .limit(limit) .page(page) .opcRequestId(opcRequestId) @@ -481,11 +481,11 @@ public String toString() { sb.append("("); sb.append("super=").append(super.toString()); sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",occCustomerGroupId=").append(String.valueOf(this.occCustomerGroupId)); sb.append(",namespace=").append(String.valueOf(this.namespace)); sb.append(",id=").append(String.valueOf(this.id)); sb.append(",displayName=").append(String.valueOf(this.displayName)); sb.append(",catalogState=").append(String.valueOf(this.catalogState)); - sb.append(",occCustomerGroupId=").append(String.valueOf(this.occCustomerGroupId)); sb.append(",limit=").append(String.valueOf(this.limit)); sb.append(",page=").append(String.valueOf(this.page)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); @@ -508,11 +508,11 @@ public boolean equals(Object o) { (ListOccAvailabilityCatalogsInternalRequest) o; return super.equals(o) && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.occCustomerGroupId, other.occCustomerGroupId) && java.util.Objects.equals(this.namespace, other.namespace) && java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.catalogState, other.catalogState) - && java.util.Objects.equals(this.occCustomerGroupId, other.occCustomerGroupId) && java.util.Objects.equals(this.limit, other.limit) && java.util.Objects.equals(this.page, other.page) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) @@ -527,15 +527,15 @@ public int hashCode() { result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); - result = (result * PRIME) + (this.namespace == null ? 43 : this.namespace.hashCode()); - result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); - result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); - result = (result * PRIME) + (this.catalogState == null ? 43 : this.catalogState.hashCode()); result = (result * PRIME) + (this.occCustomerGroupId == null ? 43 : this.occCustomerGroupId.hashCode()); + result = (result * PRIME) + (this.namespace == null ? 43 : this.namespace.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.catalogState == null ? 43 : this.catalogState.hashCode()); result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/ListOccHandoverResourceBlockDetailsRequest.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/ListOccHandoverResourceBlockDetailsRequest.java new file mode 100644 index 00000000000..e8c81ffe526 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/ListOccHandoverResourceBlockDetailsRequest.java @@ -0,0 +1,425 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.requests; + +import com.oracle.bmc.capacitymanagement.model.*; +/** + * Example: Click here to see how to use ListOccHandoverResourceBlockDetailsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class ListOccHandoverResourceBlockDetailsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the OccHandoverResource which is a required query parameter for listing OccHandoverResourceDetails. + * + */ + private String occHandoverResourceBlockId; + + /** + * The OCID of the OccHandoverResource which is a required query parameter for listing OccHandoverResourceDetails. + * + */ + public String getOccHandoverResourceBlockId() { + return occHandoverResourceBlockId; + } + /** + * This fiter is applicable only for COMPUTE namespace. It helps in fetching of all resource block details for which the hostId is equal to the one provided in this query param. + * + */ + private String hostId; + + /** + * This fiter is applicable only for COMPUTE namespace. It helps in fetching of all resource block details for which the hostId is equal to the one provided in this query param. + * + */ + public String getHostId() { + return hostId; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.capacitymanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.capacitymanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. + * The default order for handoverDate is chronological order(latest date item at the end). + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. + * The default order for handoverDate is chronological order(latest date item at the end). + * + **/ + public enum SortBy { + HandoverDate("handoverDate"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. + * The default order for handoverDate is chronological order(latest date item at the end). + * + */ + public SortBy getSortBy() { + return sortBy; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListOccHandoverResourceBlockDetailsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the OccHandoverResource which is a required query parameter for listing OccHandoverResourceDetails. + * + */ + private String occHandoverResourceBlockId = null; + + /** + * The OCID of the OccHandoverResource which is a required query parameter for listing OccHandoverResourceDetails. + * + * @param occHandoverResourceBlockId the value to set + * @return this builder instance + */ + public Builder occHandoverResourceBlockId(String occHandoverResourceBlockId) { + this.occHandoverResourceBlockId = occHandoverResourceBlockId; + return this; + } + + /** + * This fiter is applicable only for COMPUTE namespace. It helps in fetching of all resource block details for which the hostId is equal to the one provided in this query param. + * + */ + private String hostId = null; + + /** + * This fiter is applicable only for COMPUTE namespace. It helps in fetching of all resource block details for which the hostId is equal to the one provided in this query param. + * + * @param hostId the value to set + * @return this builder instance + */ + public Builder hostId(String hostId) { + this.hostId = hostId; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.capacitymanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.capacitymanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. + * The default order for handoverDate is chronological order(latest date item at the end). + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. + * The default order for handoverDate is chronological order(latest date item at the end). + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListOccHandoverResourceBlockDetailsRequest o) { + occHandoverResourceBlockId(o.getOccHandoverResourceBlockId()); + hostId(o.getHostId()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListOccHandoverResourceBlockDetailsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListOccHandoverResourceBlockDetailsRequest + */ + public ListOccHandoverResourceBlockDetailsRequest build() { + ListOccHandoverResourceBlockDetailsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListOccHandoverResourceBlockDetailsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListOccHandoverResourceBlockDetailsRequest + */ + public ListOccHandoverResourceBlockDetailsRequest buildWithoutInvocationCallback() { + ListOccHandoverResourceBlockDetailsRequest request = + new ListOccHandoverResourceBlockDetailsRequest(); + request.occHandoverResourceBlockId = occHandoverResourceBlockId; + request.hostId = hostId; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + return request; + // new ListOccHandoverResourceBlockDetailsRequest(occHandoverResourceBlockId, hostId, limit, page, opcRequestId, sortOrder, sortBy); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .occHandoverResourceBlockId(occHandoverResourceBlockId) + .hostId(hostId) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId) + .sortOrder(sortOrder) + .sortBy(sortBy); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",occHandoverResourceBlockId=") + .append(String.valueOf(this.occHandoverResourceBlockId)); + sb.append(",hostId=").append(String.valueOf(this.hostId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListOccHandoverResourceBlockDetailsRequest)) { + return false; + } + + ListOccHandoverResourceBlockDetailsRequest other = + (ListOccHandoverResourceBlockDetailsRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.occHandoverResourceBlockId, other.occHandoverResourceBlockId) + && java.util.Objects.equals(this.hostId, other.hostId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.occHandoverResourceBlockId == null + ? 43 + : this.occHandoverResourceBlockId.hashCode()); + result = (result * PRIME) + (this.hostId == null ? 43 : this.hostId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/ListOccHandoverResourceBlocksRequest.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/ListOccHandoverResourceBlocksRequest.java new file mode 100644 index 00000000000..bfd651459e4 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/ListOccHandoverResourceBlocksRequest.java @@ -0,0 +1,580 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.requests; + +import com.oracle.bmc.capacitymanagement.model.*; +/** + * Example: Click here to see how to use ListOccHandoverResourceBlocksRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class ListOccHandoverResourceBlocksRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The namespace by which we would filter the list. + */ + private com.oracle.bmc.capacitymanagement.model.Namespace namespace; + + /** + * The namespace by which we would filter the list. + */ + public com.oracle.bmc.capacitymanagement.model.Namespace getNamespace() { + return namespace; + } + /** + * The OCID of the compartment or tenancy in which resources are to be listed. + */ + private String compartmentId; + + /** + * The OCID of the compartment or tenancy in which resources are to be listed. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only the list of resources that match the name provided in this filter. + * + */ + private String handoverResourceName; + + /** + * A filter to return only the list of resources that match the name provided in this filter. + * + */ + public String getHandoverResourceName() { + return handoverResourceName; + } + /** + * This filter helps in fetching all handed over resources for which the recordDate is greater than or equal to the startDate. + * + */ + private java.util.Date handoverDateGreaterThanOrEqualTo; + + /** + * This filter helps in fetching all handed over resources for which the recordDate is greater than or equal to the startDate. + * + */ + public java.util.Date getHandoverDateGreaterThanOrEqualTo() { + return handoverDateGreaterThanOrEqualTo; + } + /** + * This filter helps in fetching all handed over resources for which the recordDate is less than or equal to the endDate. + * + */ + private java.util.Date handoverDateLessThanOrEqualTo; + + /** + * This filter helps in fetching all handed over resources for which the recordDate is less than or equal to the endDate. + * + */ + public java.util.Date getHandoverDateLessThanOrEqualTo() { + return handoverDateLessThanOrEqualTo; + } + /** + * This filter helps in fetching the handed over resource for which the occHandoverResourceId is equal to the one provided here. + * + */ + private String occHandoverResourceBlockId; + + /** + * This filter helps in fetching the handed over resource for which the occHandoverResourceId is equal to the one provided here. + * + */ + public String getOccHandoverResourceBlockId() { + return occHandoverResourceBlockId; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.capacitymanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.capacitymanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. + * The default order for handoverDate is chronological order(latest date item at the end). + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. + * The default order for handoverDate is chronological order(latest date item at the end). + * + **/ + public enum SortBy { + HandoverDate("handoverDate"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. + * The default order for handoverDate is chronological order(latest date item at the end). + * + */ + public SortBy getSortBy() { + return sortBy; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListOccHandoverResourceBlocksRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The namespace by which we would filter the list. + */ + private com.oracle.bmc.capacitymanagement.model.Namespace namespace = null; + + /** + * The namespace by which we would filter the list. + * @param namespace the value to set + * @return this builder instance + */ + public Builder namespace(com.oracle.bmc.capacitymanagement.model.Namespace namespace) { + this.namespace = namespace; + return this; + } + + /** + * The OCID of the compartment or tenancy in which resources are to be listed. + */ + private String compartmentId = null; + + /** + * The OCID of the compartment or tenancy in which resources are to be listed. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only the list of resources that match the name provided in this filter. + * + */ + private String handoverResourceName = null; + + /** + * A filter to return only the list of resources that match the name provided in this filter. + * + * @param handoverResourceName the value to set + * @return this builder instance + */ + public Builder handoverResourceName(String handoverResourceName) { + this.handoverResourceName = handoverResourceName; + return this; + } + + /** + * This filter helps in fetching all handed over resources for which the recordDate is greater than or equal to the startDate. + * + */ + private java.util.Date handoverDateGreaterThanOrEqualTo = null; + + /** + * This filter helps in fetching all handed over resources for which the recordDate is greater than or equal to the startDate. + * + * @param handoverDateGreaterThanOrEqualTo the value to set + * @return this builder instance + */ + public Builder handoverDateGreaterThanOrEqualTo( + java.util.Date handoverDateGreaterThanOrEqualTo) { + this.handoverDateGreaterThanOrEqualTo = handoverDateGreaterThanOrEqualTo; + return this; + } + + /** + * This filter helps in fetching all handed over resources for which the recordDate is less than or equal to the endDate. + * + */ + private java.util.Date handoverDateLessThanOrEqualTo = null; + + /** + * This filter helps in fetching all handed over resources for which the recordDate is less than or equal to the endDate. + * + * @param handoverDateLessThanOrEqualTo the value to set + * @return this builder instance + */ + public Builder handoverDateLessThanOrEqualTo(java.util.Date handoverDateLessThanOrEqualTo) { + this.handoverDateLessThanOrEqualTo = handoverDateLessThanOrEqualTo; + return this; + } + + /** + * This filter helps in fetching the handed over resource for which the occHandoverResourceId is equal to the one provided here. + * + */ + private String occHandoverResourceBlockId = null; + + /** + * This filter helps in fetching the handed over resource for which the occHandoverResourceId is equal to the one provided here. + * + * @param occHandoverResourceBlockId the value to set + * @return this builder instance + */ + public Builder occHandoverResourceBlockId(String occHandoverResourceBlockId) { + this.occHandoverResourceBlockId = occHandoverResourceBlockId; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.capacitymanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.capacitymanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. + * The default order for handoverDate is chronological order(latest date item at the end). + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. + * The default order for handoverDate is chronological order(latest date item at the end). + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListOccHandoverResourceBlocksRequest o) { + namespace(o.getNamespace()); + compartmentId(o.getCompartmentId()); + handoverResourceName(o.getHandoverResourceName()); + handoverDateGreaterThanOrEqualTo(o.getHandoverDateGreaterThanOrEqualTo()); + handoverDateLessThanOrEqualTo(o.getHandoverDateLessThanOrEqualTo()); + occHandoverResourceBlockId(o.getOccHandoverResourceBlockId()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListOccHandoverResourceBlocksRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListOccHandoverResourceBlocksRequest + */ + public ListOccHandoverResourceBlocksRequest build() { + ListOccHandoverResourceBlocksRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListOccHandoverResourceBlocksRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListOccHandoverResourceBlocksRequest + */ + public ListOccHandoverResourceBlocksRequest buildWithoutInvocationCallback() { + ListOccHandoverResourceBlocksRequest request = + new ListOccHandoverResourceBlocksRequest(); + request.namespace = namespace; + request.compartmentId = compartmentId; + request.handoverResourceName = handoverResourceName; + request.handoverDateGreaterThanOrEqualTo = handoverDateGreaterThanOrEqualTo; + request.handoverDateLessThanOrEqualTo = handoverDateLessThanOrEqualTo; + request.occHandoverResourceBlockId = occHandoverResourceBlockId; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + return request; + // new ListOccHandoverResourceBlocksRequest(namespace, compartmentId, handoverResourceName, handoverDateGreaterThanOrEqualTo, handoverDateLessThanOrEqualTo, occHandoverResourceBlockId, limit, page, opcRequestId, sortOrder, sortBy); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .namespace(namespace) + .compartmentId(compartmentId) + .handoverResourceName(handoverResourceName) + .handoverDateGreaterThanOrEqualTo(handoverDateGreaterThanOrEqualTo) + .handoverDateLessThanOrEqualTo(handoverDateLessThanOrEqualTo) + .occHandoverResourceBlockId(occHandoverResourceBlockId) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId) + .sortOrder(sortOrder) + .sortBy(sortBy); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",namespace=").append(String.valueOf(this.namespace)); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",handoverResourceName=").append(String.valueOf(this.handoverResourceName)); + sb.append(",handoverDateGreaterThanOrEqualTo=") + .append(String.valueOf(this.handoverDateGreaterThanOrEqualTo)); + sb.append(",handoverDateLessThanOrEqualTo=") + .append(String.valueOf(this.handoverDateLessThanOrEqualTo)); + sb.append(",occHandoverResourceBlockId=") + .append(String.valueOf(this.occHandoverResourceBlockId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListOccHandoverResourceBlocksRequest)) { + return false; + } + + ListOccHandoverResourceBlocksRequest other = (ListOccHandoverResourceBlocksRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.namespace, other.namespace) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.handoverResourceName, other.handoverResourceName) + && java.util.Objects.equals( + this.handoverDateGreaterThanOrEqualTo, + other.handoverDateGreaterThanOrEqualTo) + && java.util.Objects.equals( + this.handoverDateLessThanOrEqualTo, other.handoverDateLessThanOrEqualTo) + && java.util.Objects.equals( + this.occHandoverResourceBlockId, other.occHandoverResourceBlockId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.namespace == null ? 43 : this.namespace.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.handoverResourceName == null + ? 43 + : this.handoverResourceName.hashCode()); + result = + (result * PRIME) + + (this.handoverDateGreaterThanOrEqualTo == null + ? 43 + : this.handoverDateGreaterThanOrEqualTo.hashCode()); + result = + (result * PRIME) + + (this.handoverDateLessThanOrEqualTo == null + ? 43 + : this.handoverDateLessThanOrEqualTo.hashCode()); + result = + (result * PRIME) + + (this.occHandoverResourceBlockId == null + ? 43 + : this.occHandoverResourceBlockId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/UpdateOccCustomerGroupRequest.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/UpdateOccCustomerGroupRequest.java new file mode 100644 index 00000000000..c9af2bcc188 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/UpdateOccCustomerGroupRequest.java @@ -0,0 +1,331 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.requests; + +import com.oracle.bmc.capacitymanagement.model.*; +/** + * Example: Click here to see how to use UpdateOccCustomerGroupRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class UpdateOccCustomerGroupRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.capacitymanagement.model.UpdateOccCustomerGroupDetails> { + + /** + * Request to update the properties of the customer group. + */ + private com.oracle.bmc.capacitymanagement.model.UpdateOccCustomerGroupDetails + updateOccCustomerGroupDetails; + + /** + * Request to update the properties of the customer group. + */ + public com.oracle.bmc.capacitymanagement.model.UpdateOccCustomerGroupDetails + getUpdateOccCustomerGroupDetails() { + return updateOccCustomerGroupDetails; + } + /** + * The OCID of the customer group. + * + */ + private String occCustomerGroupId; + + /** + * The OCID of the customer group. + * + */ + public String getOccCustomerGroupId() { + return occCustomerGroupId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.capacitymanagement.model.UpdateOccCustomerGroupDetails getBody$() { + return updateOccCustomerGroupDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateOccCustomerGroupRequest, + com.oracle.bmc.capacitymanagement.model.UpdateOccCustomerGroupDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request to update the properties of the customer group. + */ + private com.oracle.bmc.capacitymanagement.model.UpdateOccCustomerGroupDetails + updateOccCustomerGroupDetails = null; + + /** + * Request to update the properties of the customer group. + * @param updateOccCustomerGroupDetails the value to set + * @return this builder instance + */ + public Builder updateOccCustomerGroupDetails( + com.oracle.bmc.capacitymanagement.model.UpdateOccCustomerGroupDetails + updateOccCustomerGroupDetails) { + this.updateOccCustomerGroupDetails = updateOccCustomerGroupDetails; + return this; + } + + /** + * The OCID of the customer group. + * + */ + private String occCustomerGroupId = null; + + /** + * The OCID of the customer group. + * + * @param occCustomerGroupId the value to set + * @return this builder instance + */ + public Builder occCustomerGroupId(String occCustomerGroupId) { + this.occCustomerGroupId = occCustomerGroupId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateOccCustomerGroupRequest o) { + updateOccCustomerGroupDetails(o.getUpdateOccCustomerGroupDetails()); + occCustomerGroupId(o.getOccCustomerGroupId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateOccCustomerGroupRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateOccCustomerGroupRequest + */ + public UpdateOccCustomerGroupRequest build() { + UpdateOccCustomerGroupRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.capacitymanagement.model.UpdateOccCustomerGroupDetails body) { + updateOccCustomerGroupDetails(body); + return this; + } + + /** + * Build the instance of UpdateOccCustomerGroupRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateOccCustomerGroupRequest + */ + public UpdateOccCustomerGroupRequest buildWithoutInvocationCallback() { + UpdateOccCustomerGroupRequest request = new UpdateOccCustomerGroupRequest(); + request.updateOccCustomerGroupDetails = updateOccCustomerGroupDetails; + request.occCustomerGroupId = occCustomerGroupId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateOccCustomerGroupRequest(updateOccCustomerGroupDetails, occCustomerGroupId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .updateOccCustomerGroupDetails(updateOccCustomerGroupDetails) + .occCustomerGroupId(occCustomerGroupId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",updateOccCustomerGroupDetails=") + .append(String.valueOf(this.updateOccCustomerGroupDetails)); + sb.append(",occCustomerGroupId=").append(String.valueOf(this.occCustomerGroupId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateOccCustomerGroupRequest)) { + return false; + } + + UpdateOccCustomerGroupRequest other = (UpdateOccCustomerGroupRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.updateOccCustomerGroupDetails, other.updateOccCustomerGroupDetails) + && java.util.Objects.equals(this.occCustomerGroupId, other.occCustomerGroupId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.updateOccCustomerGroupDetails == null + ? 43 + : this.updateOccCustomerGroupDetails.hashCode()); + result = + (result * PRIME) + + (this.occCustomerGroupId == null + ? 43 + : this.occCustomerGroupId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/UpdateOccCustomerRequest.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/UpdateOccCustomerRequest.java new file mode 100644 index 00000000000..3a92ab248c2 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/requests/UpdateOccCustomerRequest.java @@ -0,0 +1,369 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.requests; + +import com.oracle.bmc.capacitymanagement.model.*; +/** + * Example: Click here to see how to use UpdateOccCustomerRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class UpdateOccCustomerRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.capacitymanagement.model.UpdateOccCustomerDetails> { + + /** + * Request to update the properties of the customer group. + */ + private com.oracle.bmc.capacitymanagement.model.UpdateOccCustomerDetails + updateOccCustomerDetails; + + /** + * Request to update the properties of the customer group. + */ + public com.oracle.bmc.capacitymanagement.model.UpdateOccCustomerDetails + getUpdateOccCustomerDetails() { + return updateOccCustomerDetails; + } + /** + * The OCID of the customer group. + * + */ + private String occCustomerGroupId; + + /** + * The OCID of the customer group. + * + */ + public String getOccCustomerGroupId() { + return occCustomerGroupId; + } + /** + * The tenancy id of the customer. + * + */ + private String occCustomerId; + + /** + * The tenancy id of the customer. + * + */ + public String getOccCustomerId() { + return occCustomerId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.capacitymanagement.model.UpdateOccCustomerDetails getBody$() { + return updateOccCustomerDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateOccCustomerRequest, + com.oracle.bmc.capacitymanagement.model.UpdateOccCustomerDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request to update the properties of the customer group. + */ + private com.oracle.bmc.capacitymanagement.model.UpdateOccCustomerDetails + updateOccCustomerDetails = null; + + /** + * Request to update the properties of the customer group. + * @param updateOccCustomerDetails the value to set + * @return this builder instance + */ + public Builder updateOccCustomerDetails( + com.oracle.bmc.capacitymanagement.model.UpdateOccCustomerDetails + updateOccCustomerDetails) { + this.updateOccCustomerDetails = updateOccCustomerDetails; + return this; + } + + /** + * The OCID of the customer group. + * + */ + private String occCustomerGroupId = null; + + /** + * The OCID of the customer group. + * + * @param occCustomerGroupId the value to set + * @return this builder instance + */ + public Builder occCustomerGroupId(String occCustomerGroupId) { + this.occCustomerGroupId = occCustomerGroupId; + return this; + } + + /** + * The tenancy id of the customer. + * + */ + private String occCustomerId = null; + + /** + * The tenancy id of the customer. + * + * @param occCustomerId the value to set + * @return this builder instance + */ + public Builder occCustomerId(String occCustomerId) { + this.occCustomerId = occCustomerId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateOccCustomerRequest o) { + updateOccCustomerDetails(o.getUpdateOccCustomerDetails()); + occCustomerGroupId(o.getOccCustomerGroupId()); + occCustomerId(o.getOccCustomerId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateOccCustomerRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateOccCustomerRequest + */ + public UpdateOccCustomerRequest build() { + UpdateOccCustomerRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.capacitymanagement.model.UpdateOccCustomerDetails body) { + updateOccCustomerDetails(body); + return this; + } + + /** + * Build the instance of UpdateOccCustomerRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateOccCustomerRequest + */ + public UpdateOccCustomerRequest buildWithoutInvocationCallback() { + UpdateOccCustomerRequest request = new UpdateOccCustomerRequest(); + request.updateOccCustomerDetails = updateOccCustomerDetails; + request.occCustomerGroupId = occCustomerGroupId; + request.occCustomerId = occCustomerId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateOccCustomerRequest(updateOccCustomerDetails, occCustomerGroupId, occCustomerId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .updateOccCustomerDetails(updateOccCustomerDetails) + .occCustomerGroupId(occCustomerGroupId) + .occCustomerId(occCustomerId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",updateOccCustomerDetails=") + .append(String.valueOf(this.updateOccCustomerDetails)); + sb.append(",occCustomerGroupId=").append(String.valueOf(this.occCustomerGroupId)); + sb.append(",occCustomerId=").append(String.valueOf(this.occCustomerId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateOccCustomerRequest)) { + return false; + } + + UpdateOccCustomerRequest other = (UpdateOccCustomerRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.updateOccCustomerDetails, other.updateOccCustomerDetails) + && java.util.Objects.equals(this.occCustomerGroupId, other.occCustomerGroupId) + && java.util.Objects.equals(this.occCustomerId, other.occCustomerId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.updateOccCustomerDetails == null + ? 43 + : this.updateOccCustomerDetails.hashCode()); + result = + (result * PRIME) + + (this.occCustomerGroupId == null + ? 43 + : this.occCustomerGroupId.hashCode()); + result = + (result * PRIME) + + (this.occCustomerId == null ? 43 : this.occCustomerId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/CreateOccCustomerGroupResponse.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/CreateOccCustomerGroupResponse.java new file mode 100644 index 00000000000..09508bebce7 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/CreateOccCustomerGroupResponse.java @@ -0,0 +1,252 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.responses; + +import com.oracle.bmc.capacitymanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class CreateOccCustomerGroupResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcRequestId; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @return the value + */ + public Integer getRetryAfter() { + return retryAfter; + } + + /** + * The returned OccCustomerGroup instance. + */ + private com.oracle.bmc.capacitymanagement.model.OccCustomerGroup occCustomerGroup; + + /** + * The returned OccCustomerGroup instance. + * @return the value + */ + public com.oracle.bmc.capacitymanagement.model.OccCustomerGroup getOccCustomerGroup() { + return occCustomerGroup; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "retryAfter", + "occCustomerGroup" + }) + private CreateOccCustomerGroupResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + Integer retryAfter, + com.oracle.bmc.capacitymanagement.model.OccCustomerGroup occCustomerGroup) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + this.occCustomerGroup = occCustomerGroup; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcRequestId; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @param retryAfter the value to set + * @return this builder + */ + public Builder retryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * The returned OccCustomerGroup instance. + */ + private com.oracle.bmc.capacitymanagement.model.OccCustomerGroup occCustomerGroup; + + /** + * The returned OccCustomerGroup instance. + * @param occCustomerGroup the value to set + * @return this builder + */ + public Builder occCustomerGroup( + com.oracle.bmc.capacitymanagement.model.OccCustomerGroup occCustomerGroup) { + this.occCustomerGroup = occCustomerGroup; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateOccCustomerGroupResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + occCustomerGroup(o.getOccCustomerGroup()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateOccCustomerGroupResponse build() { + return new CreateOccCustomerGroupResponse( + __httpStatusCode__, headers, etag, opcRequestId, retryAfter, occCustomerGroup); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",retryAfter=").append(String.valueOf(retryAfter)); + sb.append(",occCustomerGroup=").append(String.valueOf(occCustomerGroup)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateOccCustomerGroupResponse)) { + return false; + } + + CreateOccCustomerGroupResponse other = (CreateOccCustomerGroupResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.retryAfter, other.retryAfter) + && java.util.Objects.equals(this.occCustomerGroup, other.occCustomerGroup); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.retryAfter == null ? 43 : this.retryAfter.hashCode()); + result = + (result * PRIME) + + (this.occCustomerGroup == null ? 43 : this.occCustomerGroup.hashCode()); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/CreateOccCustomerResponse.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/CreateOccCustomerResponse.java new file mode 100644 index 00000000000..185d975e9f3 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/CreateOccCustomerResponse.java @@ -0,0 +1,250 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.responses; + +import com.oracle.bmc.capacitymanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class CreateOccCustomerResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcRequestId; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @return the value + */ + public Integer getRetryAfter() { + return retryAfter; + } + + /** + * The returned OccCustomer instance. + */ + private com.oracle.bmc.capacitymanagement.model.OccCustomer occCustomer; + + /** + * The returned OccCustomer instance. + * @return the value + */ + public com.oracle.bmc.capacitymanagement.model.OccCustomer getOccCustomer() { + return occCustomer; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "retryAfter", + "occCustomer" + }) + private CreateOccCustomerResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + Integer retryAfter, + com.oracle.bmc.capacitymanagement.model.OccCustomer occCustomer) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + this.occCustomer = occCustomer; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcRequestId; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @param retryAfter the value to set + * @return this builder + */ + public Builder retryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * The returned OccCustomer instance. + */ + private com.oracle.bmc.capacitymanagement.model.OccCustomer occCustomer; + + /** + * The returned OccCustomer instance. + * @param occCustomer the value to set + * @return this builder + */ + public Builder occCustomer( + com.oracle.bmc.capacitymanagement.model.OccCustomer occCustomer) { + this.occCustomer = occCustomer; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateOccCustomerResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + occCustomer(o.getOccCustomer()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateOccCustomerResponse build() { + return new CreateOccCustomerResponse( + __httpStatusCode__, headers, etag, opcRequestId, retryAfter, occCustomer); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",retryAfter=").append(String.valueOf(retryAfter)); + sb.append(",occCustomer=").append(String.valueOf(occCustomer)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateOccCustomerResponse)) { + return false; + } + + CreateOccCustomerResponse other = (CreateOccCustomerResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.retryAfter, other.retryAfter) + && java.util.Objects.equals(this.occCustomer, other.occCustomer); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.retryAfter == null ? 43 : this.retryAfter.hashCode()); + result = (result * PRIME) + (this.occCustomer == null ? 43 : this.occCustomer.hashCode()); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/DeleteOccCustomerGroupResponse.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/DeleteOccCustomerGroupResponse.java new file mode 100644 index 00000000000..bdf910e4ee2 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/DeleteOccCustomerGroupResponse.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.responses; + +import com.oracle.bmc.capacitymanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class DeleteOccCustomerGroupResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @return the value + */ + public Integer getRetryAfter() { + return retryAfter; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "retryAfter" + }) + private DeleteOccCustomerGroupResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + Integer retryAfter) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @param retryAfter the value to set + * @return this builder + */ + public Builder retryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteOccCustomerGroupResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteOccCustomerGroupResponse build() { + return new DeleteOccCustomerGroupResponse( + __httpStatusCode__, headers, opcRequestId, retryAfter); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",retryAfter=").append(String.valueOf(retryAfter)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteOccCustomerGroupResponse)) { + return false; + } + + DeleteOccCustomerGroupResponse other = (DeleteOccCustomerGroupResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.retryAfter, other.retryAfter); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.retryAfter == null ? 43 : this.retryAfter.hashCode()); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/DeleteOccCustomerResponse.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/DeleteOccCustomerResponse.java new file mode 100644 index 00000000000..fe8ba0e9df0 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/DeleteOccCustomerResponse.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.responses; + +import com.oracle.bmc.capacitymanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class DeleteOccCustomerResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @return the value + */ + public Integer getRetryAfter() { + return retryAfter; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "retryAfter" + }) + private DeleteOccCustomerResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + Integer retryAfter) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @param retryAfter the value to set + * @return this builder + */ + public Builder retryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteOccCustomerResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteOccCustomerResponse build() { + return new DeleteOccCustomerResponse( + __httpStatusCode__, headers, opcRequestId, retryAfter); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",retryAfter=").append(String.valueOf(retryAfter)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteOccCustomerResponse)) { + return false; + } + + DeleteOccCustomerResponse other = (DeleteOccCustomerResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.retryAfter, other.retryAfter); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.retryAfter == null ? 43 : this.retryAfter.hashCode()); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/ListInternalOccHandoverResourceBlockDetailsResponse.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/ListInternalOccHandoverResourceBlockDetailsResponse.java new file mode 100644 index 00000000000..d72a2ddeee1 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/ListInternalOccHandoverResourceBlockDetailsResponse.java @@ -0,0 +1,239 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.responses; + +import com.oracle.bmc.capacitymanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class ListInternalOccHandoverResourceBlockDetailsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned OccHandoverResourceBlockDetailCollection instance. + */ + private com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockDetailCollection + occHandoverResourceBlockDetailCollection; + + /** + * The returned OccHandoverResourceBlockDetailCollection instance. + * @return the value + */ + public com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockDetailCollection + getOccHandoverResourceBlockDetailCollection() { + return occHandoverResourceBlockDetailCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "occHandoverResourceBlockDetailCollection" + }) + private ListInternalOccHandoverResourceBlockDetailsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockDetailCollection + occHandoverResourceBlockDetailCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.occHandoverResourceBlockDetailCollection = occHandoverResourceBlockDetailCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned OccHandoverResourceBlockDetailCollection instance. + */ + private com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockDetailCollection + occHandoverResourceBlockDetailCollection; + + /** + * The returned OccHandoverResourceBlockDetailCollection instance. + * @param occHandoverResourceBlockDetailCollection the value to set + * @return this builder + */ + public Builder occHandoverResourceBlockDetailCollection( + com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockDetailCollection + occHandoverResourceBlockDetailCollection) { + this.occHandoverResourceBlockDetailCollection = + occHandoverResourceBlockDetailCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListInternalOccHandoverResourceBlockDetailsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + occHandoverResourceBlockDetailCollection( + o.getOccHandoverResourceBlockDetailCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListInternalOccHandoverResourceBlockDetailsResponse build() { + return new ListInternalOccHandoverResourceBlockDetailsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + occHandoverResourceBlockDetailCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",occHandoverResourceBlockDetailCollection=") + .append(String.valueOf(occHandoverResourceBlockDetailCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListInternalOccHandoverResourceBlockDetailsResponse)) { + return false; + } + + ListInternalOccHandoverResourceBlockDetailsResponse other = + (ListInternalOccHandoverResourceBlockDetailsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.occHandoverResourceBlockDetailCollection, + other.occHandoverResourceBlockDetailCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.occHandoverResourceBlockDetailCollection == null + ? 43 + : this.occHandoverResourceBlockDetailCollection.hashCode()); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/ListInternalOccHandoverResourceBlocksResponse.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/ListInternalOccHandoverResourceBlocksResponse.java new file mode 100644 index 00000000000..e409229f858 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/ListInternalOccHandoverResourceBlocksResponse.java @@ -0,0 +1,237 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.responses; + +import com.oracle.bmc.capacitymanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class ListInternalOccHandoverResourceBlocksResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned OccHandoverResourceBlockCollection instance. + */ + private com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockCollection + occHandoverResourceBlockCollection; + + /** + * The returned OccHandoverResourceBlockCollection instance. + * @return the value + */ + public com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockCollection + getOccHandoverResourceBlockCollection() { + return occHandoverResourceBlockCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "occHandoverResourceBlockCollection" + }) + private ListInternalOccHandoverResourceBlocksResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockCollection + occHandoverResourceBlockCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.occHandoverResourceBlockCollection = occHandoverResourceBlockCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned OccHandoverResourceBlockCollection instance. + */ + private com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockCollection + occHandoverResourceBlockCollection; + + /** + * The returned OccHandoverResourceBlockCollection instance. + * @param occHandoverResourceBlockCollection the value to set + * @return this builder + */ + public Builder occHandoverResourceBlockCollection( + com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockCollection + occHandoverResourceBlockCollection) { + this.occHandoverResourceBlockCollection = occHandoverResourceBlockCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListInternalOccHandoverResourceBlocksResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + occHandoverResourceBlockCollection(o.getOccHandoverResourceBlockCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListInternalOccHandoverResourceBlocksResponse build() { + return new ListInternalOccHandoverResourceBlocksResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + occHandoverResourceBlockCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",occHandoverResourceBlockCollection=") + .append(String.valueOf(occHandoverResourceBlockCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListInternalOccHandoverResourceBlocksResponse)) { + return false; + } + + ListInternalOccHandoverResourceBlocksResponse other = + (ListInternalOccHandoverResourceBlocksResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.occHandoverResourceBlockCollection, + other.occHandoverResourceBlockCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.occHandoverResourceBlockCollection == null + ? 43 + : this.occHandoverResourceBlockCollection.hashCode()); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/ListOccHandoverResourceBlockDetailsResponse.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/ListOccHandoverResourceBlockDetailsResponse.java new file mode 100644 index 00000000000..96f0785cae9 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/ListOccHandoverResourceBlockDetailsResponse.java @@ -0,0 +1,239 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.responses; + +import com.oracle.bmc.capacitymanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class ListOccHandoverResourceBlockDetailsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned OccHandoverResourceBlockDetailCollection instance. + */ + private com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockDetailCollection + occHandoverResourceBlockDetailCollection; + + /** + * The returned OccHandoverResourceBlockDetailCollection instance. + * @return the value + */ + public com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockDetailCollection + getOccHandoverResourceBlockDetailCollection() { + return occHandoverResourceBlockDetailCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "occHandoverResourceBlockDetailCollection" + }) + private ListOccHandoverResourceBlockDetailsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockDetailCollection + occHandoverResourceBlockDetailCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.occHandoverResourceBlockDetailCollection = occHandoverResourceBlockDetailCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned OccHandoverResourceBlockDetailCollection instance. + */ + private com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockDetailCollection + occHandoverResourceBlockDetailCollection; + + /** + * The returned OccHandoverResourceBlockDetailCollection instance. + * @param occHandoverResourceBlockDetailCollection the value to set + * @return this builder + */ + public Builder occHandoverResourceBlockDetailCollection( + com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockDetailCollection + occHandoverResourceBlockDetailCollection) { + this.occHandoverResourceBlockDetailCollection = + occHandoverResourceBlockDetailCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListOccHandoverResourceBlockDetailsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + occHandoverResourceBlockDetailCollection( + o.getOccHandoverResourceBlockDetailCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListOccHandoverResourceBlockDetailsResponse build() { + return new ListOccHandoverResourceBlockDetailsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + occHandoverResourceBlockDetailCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",occHandoverResourceBlockDetailCollection=") + .append(String.valueOf(occHandoverResourceBlockDetailCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListOccHandoverResourceBlockDetailsResponse)) { + return false; + } + + ListOccHandoverResourceBlockDetailsResponse other = + (ListOccHandoverResourceBlockDetailsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.occHandoverResourceBlockDetailCollection, + other.occHandoverResourceBlockDetailCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.occHandoverResourceBlockDetailCollection == null + ? 43 + : this.occHandoverResourceBlockDetailCollection.hashCode()); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/ListOccHandoverResourceBlocksResponse.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/ListOccHandoverResourceBlocksResponse.java new file mode 100644 index 00000000000..b62fddc55a3 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/ListOccHandoverResourceBlocksResponse.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.responses; + +import com.oracle.bmc.capacitymanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class ListOccHandoverResourceBlocksResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned OccHandoverResourceBlockCollection instance. + */ + private com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockCollection + occHandoverResourceBlockCollection; + + /** + * The returned OccHandoverResourceBlockCollection instance. + * @return the value + */ + public com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockCollection + getOccHandoverResourceBlockCollection() { + return occHandoverResourceBlockCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "occHandoverResourceBlockCollection" + }) + private ListOccHandoverResourceBlocksResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockCollection + occHandoverResourceBlockCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.occHandoverResourceBlockCollection = occHandoverResourceBlockCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned OccHandoverResourceBlockCollection instance. + */ + private com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockCollection + occHandoverResourceBlockCollection; + + /** + * The returned OccHandoverResourceBlockCollection instance. + * @param occHandoverResourceBlockCollection the value to set + * @return this builder + */ + public Builder occHandoverResourceBlockCollection( + com.oracle.bmc.capacitymanagement.model.OccHandoverResourceBlockCollection + occHandoverResourceBlockCollection) { + this.occHandoverResourceBlockCollection = occHandoverResourceBlockCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListOccHandoverResourceBlocksResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + occHandoverResourceBlockCollection(o.getOccHandoverResourceBlockCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListOccHandoverResourceBlocksResponse build() { + return new ListOccHandoverResourceBlocksResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + occHandoverResourceBlockCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",occHandoverResourceBlockCollection=") + .append(String.valueOf(occHandoverResourceBlockCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListOccHandoverResourceBlocksResponse)) { + return false; + } + + ListOccHandoverResourceBlocksResponse other = (ListOccHandoverResourceBlocksResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.occHandoverResourceBlockCollection, + other.occHandoverResourceBlockCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.occHandoverResourceBlockCollection == null + ? 43 + : this.occHandoverResourceBlockCollection.hashCode()); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/UpdateOccCustomerGroupResponse.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/UpdateOccCustomerGroupResponse.java new file mode 100644 index 00000000000..0a772aa1607 --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/UpdateOccCustomerGroupResponse.java @@ -0,0 +1,248 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.responses; + +import com.oracle.bmc.capacitymanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class UpdateOccCustomerGroupResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @return the value + */ + public Integer getRetryAfter() { + return retryAfter; + } + + /** + * The returned OccCustomerGroup instance. + */ + private com.oracle.bmc.capacitymanagement.model.OccCustomerGroup occCustomerGroup; + + /** + * The returned OccCustomerGroup instance. + * @return the value + */ + public com.oracle.bmc.capacitymanagement.model.OccCustomerGroup getOccCustomerGroup() { + return occCustomerGroup; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "retryAfter", + "occCustomerGroup" + }) + private UpdateOccCustomerGroupResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + Integer retryAfter, + com.oracle.bmc.capacitymanagement.model.OccCustomerGroup occCustomerGroup) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + this.occCustomerGroup = occCustomerGroup; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @param retryAfter the value to set + * @return this builder + */ + public Builder retryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * The returned OccCustomerGroup instance. + */ + private com.oracle.bmc.capacitymanagement.model.OccCustomerGroup occCustomerGroup; + + /** + * The returned OccCustomerGroup instance. + * @param occCustomerGroup the value to set + * @return this builder + */ + public Builder occCustomerGroup( + com.oracle.bmc.capacitymanagement.model.OccCustomerGroup occCustomerGroup) { + this.occCustomerGroup = occCustomerGroup; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateOccCustomerGroupResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + occCustomerGroup(o.getOccCustomerGroup()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateOccCustomerGroupResponse build() { + return new UpdateOccCustomerGroupResponse( + __httpStatusCode__, headers, etag, opcRequestId, retryAfter, occCustomerGroup); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",retryAfter=").append(String.valueOf(retryAfter)); + sb.append(",occCustomerGroup=").append(String.valueOf(occCustomerGroup)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateOccCustomerGroupResponse)) { + return false; + } + + UpdateOccCustomerGroupResponse other = (UpdateOccCustomerGroupResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.retryAfter, other.retryAfter) + && java.util.Objects.equals(this.occCustomerGroup, other.occCustomerGroup); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.retryAfter == null ? 43 : this.retryAfter.hashCode()); + result = + (result * PRIME) + + (this.occCustomerGroup == null ? 43 : this.occCustomerGroup.hashCode()); + return result; + } +} diff --git a/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/UpdateOccCustomerResponse.java b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/UpdateOccCustomerResponse.java new file mode 100644 index 00000000000..29f9bb1614c --- /dev/null +++ b/bmc-capacitymanagement/src/main/java/com/oracle/bmc/capacitymanagement/responses/UpdateOccCustomerResponse.java @@ -0,0 +1,246 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.capacitymanagement.responses; + +import com.oracle.bmc.capacitymanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231107") +public class UpdateOccCustomerResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @return the value + */ + public Integer getRetryAfter() { + return retryAfter; + } + + /** + * The returned OccCustomer instance. + */ + private com.oracle.bmc.capacitymanagement.model.OccCustomer occCustomer; + + /** + * The returned OccCustomer instance. + * @return the value + */ + public com.oracle.bmc.capacitymanagement.model.OccCustomer getOccCustomer() { + return occCustomer; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "retryAfter", + "occCustomer" + }) + private UpdateOccCustomerResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + Integer retryAfter, + com.oracle.bmc.capacitymanagement.model.OccCustomer occCustomer) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + this.occCustomer = occCustomer; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @param retryAfter the value to set + * @return this builder + */ + public Builder retryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * The returned OccCustomer instance. + */ + private com.oracle.bmc.capacitymanagement.model.OccCustomer occCustomer; + + /** + * The returned OccCustomer instance. + * @param occCustomer the value to set + * @return this builder + */ + public Builder occCustomer( + com.oracle.bmc.capacitymanagement.model.OccCustomer occCustomer) { + this.occCustomer = occCustomer; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateOccCustomerResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + occCustomer(o.getOccCustomer()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateOccCustomerResponse build() { + return new UpdateOccCustomerResponse( + __httpStatusCode__, headers, etag, opcRequestId, retryAfter, occCustomer); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",retryAfter=").append(String.valueOf(retryAfter)); + sb.append(",occCustomer=").append(String.valueOf(occCustomer)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateOccCustomerResponse)) { + return false; + } + + UpdateOccCustomerResponse other = (UpdateOccCustomerResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.retryAfter, other.retryAfter) + && java.util.Objects.equals(this.occCustomer, other.occCustomer); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.retryAfter == null ? 43 : this.retryAfter.hashCode()); + result = (result * PRIME) + (this.occCustomer == null ? 43 : this.occCustomer.hashCode()); + return result; + } +} diff --git a/bmc-certificates/pom.xml b/bmc-certificates/pom.xml index 8a00949865e..6c8af1b8ca7 100644 --- a/bmc-certificates/pom.xml +++ b/bmc-certificates/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-certificates @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-certificatesmanagement/pom.xml b/bmc-certificatesmanagement/pom.xml index 15c4c035b71..be6c71e6c3e 100644 --- a/bmc-certificatesmanagement/pom.xml +++ b/bmc-certificatesmanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-certificatesmanagement @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-cims/pom.xml b/bmc-cims/pom.xml index c08c782ddf2..b3694616a40 100644 --- a/bmc-cims/pom.xml +++ b/bmc-cims/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-cims @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/Incident.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/Incident.java index af5e145e3cf..87012b055a7 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/Incident.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/Incident.java @@ -10,10 +10,9 @@ /** * Use the Support Management API to manage support requests. * For more information, see [Getting Help and Contacting Support](https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). - * **Note**: Before you can create service requests with this API, - * you need to have an Oracle Single Sign On (SSO) account, - * and you need to register your Customer Support Identifier (CSI) with My Oracle Support. + * complete user registration at My Oracle Cloud Support + * and then ask your tenancy administrator to provide you authorization for the related user groups. * * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. */ @@ -66,7 +65,9 @@ public interface Incident extends AutoCloseable { void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); /** - * Operation to create a support ticket. + * Creates a support ticket in the specified tenancy. + * For more information, see [Creating Support Requests](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident.htm). + * * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -78,19 +79,9 @@ public interface Incident extends AutoCloseable { CreateIncidentResponse createIncident(CreateIncidentRequest request); /** - * Fetches csi number of the user. - * @param request The request object containing the details to send - * @return A response object containing details about the completed operation - * @throws BmcException when an error occurs. - * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. - * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * Gets the specified support ticket. + * For more information, see [Getting Details for a Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/get-incident.htm). * - * Example: Click here to see how to use GetCsiNumber API. - */ - GetCsiNumberResponse getCsiNumber(GetCsiNumberRequest request); - - /** - * Gets details about the specified support ticket. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -102,19 +93,15 @@ public interface Incident extends AutoCloseable { GetIncidentResponse getIncident(GetIncidentRequest request); /** - * Gets the status of the service. - * @param request The request object containing the details to send - * @return A response object containing details about the completed operation - * @throws BmcException when an error occurs. - * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. - * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * Depending on the selected `productType`, either + * lists available products (service groups, services, service categories, and subcategories) for technical support tickets or + * lists limits and current usage for limit increase tickets. + * This operation is called during creation of technical support and limit increase tickets. + * For more information about listing products, see + * [Listing Products for Support Requests](https://docs.cloud.oracle.com/iaas/Content/GSG/support/list-incident-resource-types-taxonomy.htm). + * For more information about listing limits, see + * [Listing Limits for Service Limit Increase Requests](https://docs.cloud.oracle.com/iaas/Content/GSG/support/list-incident-resource-types-limit.htm). * - * Example: Click here to see how to use GetStatus API. - */ - GetStatusResponse getStatus(GetStatusRequest request); - - /** - * During support ticket creation, returns the list of all possible products that Oracle Cloud Infrastructure supports. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -127,7 +114,9 @@ ListIncidentResourceTypesResponse listIncidentResourceTypes( ListIncidentResourceTypesRequest request); /** - * Returns the list of support tickets raised by the tenancy. + * Lists support tickets for the specified tenancy. + * For more information, see [Listing Support Requests](https://docs.cloud.oracle.com/iaas/Content/GSG/support/list-incidents.htm). + * * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -139,7 +128,9 @@ ListIncidentResourceTypesResponse listIncidentResourceTypes( ListIncidentsResponse listIncidents(ListIncidentsRequest request); /** - * Updates the specified support ticket's information. + * Updates the specified support ticket. + * For more information, see [Updating Support Requests](https://docs.cloud.oracle.com/iaas/Content/GSG/support/update-incident.htm). + * * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -152,6 +143,8 @@ ListIncidentResourceTypesResponse listIncidentResourceTypes( /** * Checks whether the requested user is valid. + * For more information, see [Validating a User](https://docs.cloud.oracle.com/iaas/Content/GSG/support/validate-user.htm). + * * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/IncidentAsync.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/IncidentAsync.java index 96326b1b83c..b782fc6f3d3 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/IncidentAsync.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/IncidentAsync.java @@ -10,10 +10,9 @@ /** * Use the Support Management API to manage support requests. * For more information, see [Getting Help and Contacting Support](https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/contactingsupport.htm). - * **Note**: Before you can create service requests with this API, - * you need to have an Oracle Single Sign On (SSO) account, - * and you need to register your Customer Support Identifier (CSI) with My Oracle Support. + * complete user registration at My Oracle Cloud Support + * and then ask your tenancy administrator to provide you authorization for the related user groups. * */ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181231") @@ -65,7 +64,9 @@ public interface IncidentAsync extends AutoCloseable { void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); /** - * Operation to create a support ticket. + * Creates a support ticket in the specified tenancy. + * For more information, see [Creating Support Requests](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident.htm). + * * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -80,22 +81,9 @@ java.util.concurrent.Future createIncident( handler); /** - * Fetches csi number of the user. + * Gets the specified support ticket. + * For more information, see [Getting Details for a Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/get-incident.htm). * - * @param request The request object containing the details to send - * @param handler The request handler to invoke upon completion, may be null. - * @return A Future that can be used to get the response if no AsyncHandler was - * provided. Note, if you provide an AsyncHandler and use the Future, some - * types of responses (like java.io.InputStream) may not be able to be read in - * both places as the underlying stream may only be consumed once. - */ - java.util.concurrent.Future getCsiNumber( - GetCsiNumberRequest request, - com.oracle.bmc.responses.AsyncHandler - handler); - - /** - * Gets details about the specified support ticket. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -109,21 +97,15 @@ java.util.concurrent.Future getIncident( com.oracle.bmc.responses.AsyncHandler handler); /** - * Gets the status of the service. + * Depending on the selected `productType`, either + * lists available products (service groups, services, service categories, and subcategories) for technical support tickets or + * lists limits and current usage for limit increase tickets. + * This operation is called during creation of technical support and limit increase tickets. + * For more information about listing products, see + * [Listing Products for Support Requests](https://docs.cloud.oracle.com/iaas/Content/GSG/support/list-incident-resource-types-taxonomy.htm). + * For more information about listing limits, see + * [Listing Limits for Service Limit Increase Requests](https://docs.cloud.oracle.com/iaas/Content/GSG/support/list-incident-resource-types-limit.htm). * - * @param request The request object containing the details to send - * @param handler The request handler to invoke upon completion, may be null. - * @return A Future that can be used to get the response if no AsyncHandler was - * provided. Note, if you provide an AsyncHandler and use the Future, some - * types of responses (like java.io.InputStream) may not be able to be read in - * both places as the underlying stream may only be consumed once. - */ - java.util.concurrent.Future getStatus( - GetStatusRequest request, - com.oracle.bmc.responses.AsyncHandler handler); - - /** - * During support ticket creation, returns the list of all possible products that Oracle Cloud Infrastructure supports. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -139,7 +121,9 @@ java.util.concurrent.Future listIncidentResou handler); /** - * Returns the list of support tickets raised by the tenancy. + * Lists support tickets for the specified tenancy. + * For more information, see [Listing Support Requests](https://docs.cloud.oracle.com/iaas/Content/GSG/support/list-incidents.htm). + * * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -154,7 +138,9 @@ java.util.concurrent.Future listIncidents( handler); /** - * Updates the specified support ticket's information. + * Updates the specified support ticket. + * For more information, see [Updating Support Requests](https://docs.cloud.oracle.com/iaas/Content/GSG/support/update-incident.htm). + * * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -170,6 +156,8 @@ java.util.concurrent.Future updateIncident( /** * Checks whether the requested user is valid. + * For more information, see [Validating a User](https://docs.cloud.oracle.com/iaas/Content/GSG/support/validate-user.htm). + * * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/IncidentAsyncClient.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/IncidentAsyncClient.java index e13d54cef0a..72b01c5ae52 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/IncidentAsyncClient.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/IncidentAsyncClient.java @@ -508,47 +508,6 @@ protected void beforeRetryAction() {} } } - @Override - public java.util.concurrent.Future getCsiNumber( - GetCsiNumberRequest request, - final com.oracle.bmc.responses.AsyncHandler - handler) { - LOG.trace("Called async getCsiNumber"); - final GetCsiNumberRequest interceptedRequest = - GetCsiNumberConverter.interceptRequest(request); - final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetCsiNumberConverter.fromRequest(client, interceptedRequest); - com.oracle.bmc.ServiceDetails serviceDetails = - new com.oracle.bmc.ServiceDetails( - "Incident", "GetCsiNumber", ib.getRequestUri().toString(), ""); - final java.util.function.Function - transformer = - GetCsiNumberConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler - handlerToUse = handler; - - java.util.function.Function< - com.oracle.bmc.responses.AsyncHandler< - GetCsiNumberRequest, GetCsiNumberResponse>, - java.util.concurrent.Future> - futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); - - if (this.authenticationDetailsProvider - instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { - return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetCsiNumberRequest, GetCsiNumberResponse>( - (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) - this.authenticationDetailsProvider, - handlerToUse, - futureSupplier) { - @Override - protected void beforeRetryAction() {} - }; - } else { - return futureSupplier.apply(handlerToUse); - } - } - @Override public java.util.concurrent.Future getIncident( GetIncidentRequest request, @@ -593,48 +552,6 @@ protected void beforeRetryAction() {} } } - @Override - public java.util.concurrent.Future getStatus( - GetStatusRequest request, - final com.oracle.bmc.responses.AsyncHandler - handler) { - LOG.trace("Called async getStatus"); - final GetStatusRequest interceptedRequest = GetStatusConverter.interceptRequest(request); - final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetStatusConverter.fromRequest(client, interceptedRequest); - com.oracle.bmc.ServiceDetails serviceDetails = - new com.oracle.bmc.ServiceDetails( - "Incident", - "GetStatus", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/incidentmanagement/20181231/Status/GetStatus"); - final java.util.function.Function - transformer = - GetStatusConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler handlerToUse = - handler; - - java.util.function.Function< - com.oracle.bmc.responses.AsyncHandler, - java.util.concurrent.Future> - futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); - - if (this.authenticationDetailsProvider - instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { - return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetStatusRequest, GetStatusResponse>( - (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) - this.authenticationDetailsProvider, - handlerToUse, - futureSupplier) { - @Override - protected void beforeRetryAction() {} - }; - } else { - return futureSupplier.apply(handlerToUse); - } - } - @Override public java.util.concurrent.Future listIncidentResourceTypes( ListIncidentResourceTypesRequest request, diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/IncidentClient.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/IncidentClient.java index a8a33c7971f..59df12d5f38 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/IncidentClient.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/IncidentClient.java @@ -513,38 +513,6 @@ public CreateIncidentResponse createIncident(CreateIncidentRequest request) { }); } - @Override - public GetCsiNumberResponse getCsiNumber(GetCsiNumberRequest request) { - LOG.trace("Called getCsiNumber"); - final GetCsiNumberRequest interceptedRequest = - GetCsiNumberConverter.interceptRequest(request); - com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetCsiNumberConverter.fromRequest(client, interceptedRequest); - - final com.oracle.bmc.retrier.BmcGenericRetrier retrier = - com.oracle.bmc.retrier.Retriers.createPreferredRetrier( - interceptedRequest.getRetryConfiguration(), retryConfiguration, false); - com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); - com.oracle.bmc.ServiceDetails serviceDetails = - new com.oracle.bmc.ServiceDetails( - "Incident", "GetCsiNumber", ib.getRequestUri().toString(), ""); - java.util.function.Function transformer = - GetCsiNumberConverter.fromResponse(java.util.Optional.of(serviceDetails)); - return retrier.execute( - interceptedRequest, - retryRequest -> { - final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = - new com.oracle.bmc.retrier.TokenRefreshRetrier( - authenticationDetailsProvider); - return tokenRefreshRetrier.execute( - retryRequest, - retriedRequest -> { - javax.ws.rs.core.Response response = client.get(ib, retriedRequest); - return transformer.apply(response); - }); - }); - } - @Override public GetIncidentResponse getIncident(GetIncidentRequest request) { LOG.trace("Called getIncident"); @@ -580,40 +548,6 @@ public GetIncidentResponse getIncident(GetIncidentRequest request) { }); } - @Override - public GetStatusResponse getStatus(GetStatusRequest request) { - LOG.trace("Called getStatus"); - final GetStatusRequest interceptedRequest = GetStatusConverter.interceptRequest(request); - com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetStatusConverter.fromRequest(client, interceptedRequest); - - final com.oracle.bmc.retrier.BmcGenericRetrier retrier = - com.oracle.bmc.retrier.Retriers.createPreferredRetrier( - interceptedRequest.getRetryConfiguration(), retryConfiguration, false); - com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); - com.oracle.bmc.ServiceDetails serviceDetails = - new com.oracle.bmc.ServiceDetails( - "Incident", - "GetStatus", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/incidentmanagement/20181231/Status/GetStatus"); - java.util.function.Function transformer = - GetStatusConverter.fromResponse(java.util.Optional.of(serviceDetails)); - return retrier.execute( - interceptedRequest, - retryRequest -> { - final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = - new com.oracle.bmc.retrier.TokenRefreshRetrier( - authenticationDetailsProvider); - return tokenRefreshRetrier.execute( - retryRequest, - retriedRequest -> { - javax.ws.rs.core.Response response = client.get(ib, retriedRequest); - return transformer.apply(response); - }); - }); - } - @Override public ListIncidentResourceTypesResponse listIncidentResourceTypes( ListIncidentResourceTypesRequest request) { diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/internal/http/GetIncidentConverter.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/internal/http/GetIncidentConverter.java index 3eede6a4015..7dc34b699a7 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/internal/http/GetIncidentConverter.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/internal/http/GetIncidentConverter.java @@ -30,6 +30,7 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.cims.requests.GetIncidentRequest request) { Validate.notNull(request, "request instance is required"); Validate.notBlank(request.getIncidentKey(), "incidentKey must not be blank"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); com.oracle.bmc.http.internal.WrappedWebTarget target = client.getBaseTarget() @@ -40,13 +41,11 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getIncidentKey())); - if (request.getCompartmentId() != null) { - target = - target.queryParam( - "compartmentId", - com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( - request.getCompartmentId())); - } + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/internal/http/UpdateIncidentConverter.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/internal/http/UpdateIncidentConverter.java index 9e16ca46f63..835afb7cec6 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/internal/http/UpdateIncidentConverter.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/internal/http/UpdateIncidentConverter.java @@ -31,6 +31,7 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( Validate.notNull(request, "request instance is required"); Validate.notBlank(request.getIncidentKey(), "incidentKey must not be blank"); Validate.notNull(request.getUpdateIncidentDetails(), "updateIncidentDetails is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); com.oracle.bmc.http.internal.WrappedWebTarget target = client.getBaseTarget() @@ -41,13 +42,11 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getIncidentKey())); - if (request.getCompartmentId() != null) { - target = - target.queryParam( - "compartmentId", - com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( - request.getCompartmentId())); - } + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/ActivityItem.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/ActivityItem.java index d432218fc53..074b3435267 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/ActivityItem.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/ActivityItem.java @@ -86,13 +86,13 @@ public Builder comments(String comments) { return this; } /** - * The time when the activity was created, in milliseconds since epoch time. + * The time when the activity was created, in seconds since epoch time. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") private Integer timeCreated; /** - * The time when the activity was created, in milliseconds since epoch time. + * The time when the activity was created, in seconds since epoch time. * @param timeCreated the value to set * @return this builder **/ @@ -102,13 +102,13 @@ public Builder timeCreated(Integer timeCreated) { return this; } /** - * The time when the activity was updated, in milliseconds since epoch time. + * The time when the activity was updated, in seconds since epoch time. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") private Integer timeUpdated; /** - * The time when the activity was updated, in milliseconds since epoch time. + * The time when the activity was updated, in seconds since epoch time. * @param timeUpdated the value to set * @return this builder **/ @@ -167,6 +167,22 @@ public Builder itemStatus(ItemStatus itemStatus) { this.__explicitlySet__.add("itemStatus"); return this; } + /** + * attachmentID for the ItemType Attachments only for Alloy realm. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attachmentID") + private String attachmentID; + + /** + * attachmentID for the ItemType Attachments only for Alloy realm. + * @param attachmentID the value to set + * @return this builder + **/ + public Builder attachmentID(String attachmentID) { + this.attachmentID = attachmentID; + this.__explicitlySet__.add("attachmentID"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -185,7 +201,8 @@ public ActivityItem build() { this.activityType, this.activityAuthor, this.itemType, - this.itemStatus); + this.itemStatus, + this.attachmentID); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -230,6 +247,9 @@ public Builder copy(ActivityItem model) { if (model.wasPropertyExplicitlySet("itemStatus")) { this.itemStatus(model.getItemStatus()); } + if (model.wasPropertyExplicitlySet("attachmentID")) { + this.attachmentID(model.getAttachmentID()); + } return this; } } @@ -258,7 +278,8 @@ public ActivityItem( ActivityType activityType, ActivityAuthor activityAuthor, ItemType itemType, - ItemStatus itemStatus) { + ItemStatus itemStatus, + String attachmentID) { super(itemKey, name, category, subCategory, issueType); this.comments = comments; this.timeCreated = timeCreated; @@ -267,6 +288,7 @@ public ActivityItem( this.activityAuthor = activityAuthor; this.itemType = itemType; this.itemStatus = itemStatus; + this.attachmentID = attachmentID; } /** @@ -284,13 +306,13 @@ public String getComments() { } /** - * The time when the activity was created, in milliseconds since epoch time. + * The time when the activity was created, in seconds since epoch time. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") private final Integer timeCreated; /** - * The time when the activity was created, in milliseconds since epoch time. + * The time when the activity was created, in seconds since epoch time. * @return the value **/ public Integer getTimeCreated() { @@ -298,13 +320,13 @@ public Integer getTimeCreated() { } /** - * The time when the activity was updated, in milliseconds since epoch time. + * The time when the activity was updated, in seconds since epoch time. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") private final Integer timeUpdated; /** - * The time when the activity was updated, in milliseconds since epoch time. + * The time when the activity was updated, in seconds since epoch time. * @return the value **/ public Integer getTimeUpdated() { @@ -550,6 +572,20 @@ public ItemStatus getItemStatus() { return itemStatus; } + /** + * attachmentID for the ItemType Attachments only for Alloy realm. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attachmentID") + private final String attachmentID; + + /** + * attachmentID for the ItemType Attachments only for Alloy realm. + * @return the value + **/ + public String getAttachmentID() { + return attachmentID; + } + @Override public String toString() { return this.toString(true); @@ -571,6 +607,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", activityAuthor=").append(String.valueOf(this.activityAuthor)); sb.append(", itemType=").append(String.valueOf(this.itemType)); sb.append(", itemStatus=").append(String.valueOf(this.itemStatus)); + sb.append(", attachmentID=").append(String.valueOf(this.attachmentID)); sb.append(")"); return sb.toString(); } @@ -592,6 +629,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.activityAuthor, other.activityAuthor) && java.util.Objects.equals(this.itemType, other.itemType) && java.util.Objects.equals(this.itemStatus, other.itemStatus) + && java.util.Objects.equals(this.attachmentID, other.attachmentID) && super.equals(other); } @@ -608,6 +646,7 @@ public int hashCode() { + (this.activityAuthor == null ? 43 : this.activityAuthor.hashCode()); result = (result * PRIME) + (this.itemType == null ? 43 : this.itemType.hashCode()); result = (result * PRIME) + (this.itemStatus == null ? 43 : this.itemStatus.hashCode()); + result = (result * PRIME) + (this.attachmentID == null ? 43 : this.attachmentID.hashCode()); return result; } } diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CmosUserGroupInfo.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CmosUserGroupInfo.java new file mode 100644 index 00000000000..8f44addabac --- /dev/null +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CmosUserGroupInfo.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cims.model; + +/** + * Identifier and name of the technical support request's user group ({@code userGroupId} and {@code userGroupName}). + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181231") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CmosUserGroupInfo.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CmosUserGroupInfo extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"userGroupId", "userGroupName"}) + public CmosUserGroupInfo(String userGroupId, String userGroupName) { + super(); + this.userGroupId = userGroupId; + this.userGroupName = userGroupName; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Technical support type ({@code TECH}) only: The identifier of the support request's user group in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroupId") + private String userGroupId; + + /** + * Technical support type ({@code TECH}) only: The identifier of the support request's user group in My Oracle Cloud Support portal. + * + * @param userGroupId the value to set + * @return this builder + **/ + public Builder userGroupId(String userGroupId) { + this.userGroupId = userGroupId; + this.__explicitlySet__.add("userGroupId"); + return this; + } + /** + * Technical support type ({@code TECH}) only: Name of the support request's user group in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroupName") + private String userGroupName; + + /** + * Technical support type ({@code TECH}) only: Name of the support request's user group in My Oracle Cloud Support portal. + * + * @param userGroupName the value to set + * @return this builder + **/ + public Builder userGroupName(String userGroupName) { + this.userGroupName = userGroupName; + this.__explicitlySet__.add("userGroupName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CmosUserGroupInfo build() { + CmosUserGroupInfo model = new CmosUserGroupInfo(this.userGroupId, this.userGroupName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CmosUserGroupInfo model) { + if (model.wasPropertyExplicitlySet("userGroupId")) { + this.userGroupId(model.getUserGroupId()); + } + if (model.wasPropertyExplicitlySet("userGroupName")) { + this.userGroupName(model.getUserGroupName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Technical support type ({@code TECH}) only: The identifier of the support request's user group in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroupId") + private final String userGroupId; + + /** + * Technical support type ({@code TECH}) only: The identifier of the support request's user group in My Oracle Cloud Support portal. + * + * @return the value + **/ + public String getUserGroupId() { + return userGroupId; + } + + /** + * Technical support type ({@code TECH}) only: Name of the support request's user group in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroupName") + private final String userGroupName; + + /** + * Technical support type ({@code TECH}) only: Name of the support request's user group in My Oracle Cloud Support portal. + * + * @return the value + **/ + public String getUserGroupName() { + return userGroupName; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CmosUserGroupInfo("); + sb.append("super=").append(super.toString()); + sb.append("userGroupId=").append(String.valueOf(this.userGroupId)); + sb.append(", userGroupName=").append(String.valueOf(this.userGroupName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CmosUserGroupInfo)) { + return false; + } + + CmosUserGroupInfo other = (CmosUserGroupInfo) o; + return java.util.Objects.equals(this.userGroupId, other.userGroupId) + && java.util.Objects.equals(this.userGroupName, other.userGroupName) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.userGroupId == null ? 43 : this.userGroupId.hashCode()); + result = + (result * PRIME) + + (this.userGroupName == null ? 43 : this.userGroupName.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CreateAccountItemDetails.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CreateAccountItemDetails.java index e2188938584..ac231ba0e80 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CreateAccountItemDetails.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CreateAccountItemDetails.java @@ -6,6 +6,7 @@ /** * Details about the issue that the account support ticket relates to. Avoid entering confidential information. + * For information about {@code ACCOUNT} support tickets, see [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CreateIncident.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CreateIncident.java index 5fff93bbd5d..cf83cff9f5f 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CreateIncident.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CreateIncident.java @@ -24,6 +24,7 @@ public final class CreateIncident extends com.oracle.bmc.http.internal.Explicitl "compartmentId", "ticket", "csi", + "userGroupId", "problemType", "contacts", "referrer" @@ -32,6 +33,7 @@ public CreateIncident( String compartmentId, CreateTicketDetails ticket, String csi, + String userGroupId, ProblemType problemType, java.util.List contacts, String referrer) { @@ -39,6 +41,7 @@ public CreateIncident( this.compartmentId = compartmentId; this.ticket = ticket; this.csi = csi; + this.userGroupId = userGroupId; this.problemType = problemType; this.contacts = contacts; this.referrer = referrer; @@ -73,7 +76,7 @@ public Builder ticket(CreateTicketDetails ticket) { } /** * The Customer Support Identifier (CSI) number associated with the support account. - * The CSI is required for technical support tickets and optional for limits and billing tickets. + * The CSI is optional for all support request types. * **/ @com.fasterxml.jackson.annotation.JsonProperty("csi") @@ -81,7 +84,7 @@ public Builder ticket(CreateTicketDetails ticket) { /** * The Customer Support Identifier (CSI) number associated with the support account. - * The CSI is required for technical support tickets and optional for limits and billing tickets. + * The CSI is optional for all support request types. * * @param csi the value to set * @return this builder @@ -92,13 +95,45 @@ public Builder csi(String csi) { return this; } /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * Technical support type ({@code TECH}) only: The identifier of the support request's user group in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroupId") + private String userGroupId; + + /** + * Technical support type ({@code TECH}) only: The identifier of the support request's user group in My Oracle Cloud Support portal. + * + * @param userGroupId the value to set + * @return this builder + **/ + public Builder userGroupId(String userGroupId) { + this.userGroupId = userGroupId; + this.__explicitlySet__.add("userGroupId"); + return this; + } + /** + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * **/ @com.fasterxml.jackson.annotation.JsonProperty("problemType") private ProblemType problemType; /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * * @param problemType the value to set * @return this builder **/ @@ -149,6 +184,7 @@ public CreateIncident build() { this.compartmentId, this.ticket, this.csi, + this.userGroupId, this.problemType, this.contacts, this.referrer); @@ -169,6 +205,9 @@ public Builder copy(CreateIncident model) { if (model.wasPropertyExplicitlySet("csi")) { this.csi(model.getCsi()); } + if (model.wasPropertyExplicitlySet("userGroupId")) { + this.userGroupId(model.getUserGroupId()); + } if (model.wasPropertyExplicitlySet("problemType")) { this.problemType(model.getProblemType()); } @@ -216,7 +255,7 @@ public CreateTicketDetails getTicket() { /** * The Customer Support Identifier (CSI) number associated with the support account. - * The CSI is required for technical support tickets and optional for limits and billing tickets. + * The CSI is optional for all support request types. * **/ @com.fasterxml.jackson.annotation.JsonProperty("csi") @@ -224,7 +263,7 @@ public CreateTicketDetails getTicket() { /** * The Customer Support Identifier (CSI) number associated with the support account. - * The CSI is required for technical support tickets and optional for limits and billing tickets. + * The CSI is optional for all support request types. * * @return the value **/ @@ -233,13 +272,43 @@ public String getCsi() { } /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * Technical support type ({@code TECH}) only: The identifier of the support request's user group in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroupId") + private final String userGroupId; + + /** + * Technical support type ({@code TECH}) only: The identifier of the support request's user group in My Oracle Cloud Support portal. + * + * @return the value + **/ + public String getUserGroupId() { + return userGroupId; + } + + /** + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * **/ @com.fasterxml.jackson.annotation.JsonProperty("problemType") private final ProblemType problemType; /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * * @return the value **/ public ProblemType getProblemType() { @@ -291,6 +360,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", ticket=").append(String.valueOf(this.ticket)); sb.append(", csi=").append(String.valueOf(this.csi)); + sb.append(", userGroupId=").append(String.valueOf(this.userGroupId)); sb.append(", problemType=").append(String.valueOf(this.problemType)); sb.append(", contacts=").append(String.valueOf(this.contacts)); sb.append(", referrer=").append(String.valueOf(this.referrer)); @@ -311,6 +381,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.ticket, other.ticket) && java.util.Objects.equals(this.csi, other.csi) + && java.util.Objects.equals(this.userGroupId, other.userGroupId) && java.util.Objects.equals(this.problemType, other.problemType) && java.util.Objects.equals(this.contacts, other.contacts) && java.util.Objects.equals(this.referrer, other.referrer) @@ -326,6 +397,7 @@ public int hashCode() { + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.ticket == null ? 43 : this.ticket.hashCode()); result = (result * PRIME) + (this.csi == null ? 43 : this.csi.hashCode()); + result = (result * PRIME) + (this.userGroupId == null ? 43 : this.userGroupId.hashCode()); result = (result * PRIME) + (this.problemType == null ? 43 : this.problemType.hashCode()); result = (result * PRIME) + (this.contacts == null ? 43 : this.contacts.hashCode()); result = (result * PRIME) + (this.referrer == null ? 43 : this.referrer.hashCode()); diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CreateLimitItemDetails.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CreateLimitItemDetails.java index 986bbd68c5f..4051f110077 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CreateLimitItemDetails.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CreateLimitItemDetails.java @@ -6,6 +6,8 @@ /** * Details about the service limit increase request. Avoid entering confidential information. + * For information about {@code LIMIT} support tickets, see [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -110,22 +112,6 @@ public Builder requestedLimit(Integer requestedLimit) { this.__explicitlySet__.add("requestedLimit"); return this; } - /** - * The current status of the request. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("limitStatus") - private LimitStatus limitStatus; - - /** - * The current status of the request. - * @param limitStatus the value to set - * @return this builder - **/ - public Builder limitStatus(LimitStatus limitStatus) { - this.limitStatus = limitStatus; - this.__explicitlySet__.add("limitStatus"); - return this; - } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -139,8 +125,7 @@ public CreateLimitItemDetails build() { this.name, this.currentLimit, this.currentUsage, - this.requestedLimit, - this.limitStatus); + this.requestedLimit); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -170,9 +155,6 @@ public Builder copy(CreateLimitItemDetails model) { if (model.wasPropertyExplicitlySet("requestedLimit")) { this.requestedLimit(model.getRequestedLimit()); } - if (model.wasPropertyExplicitlySet("limitStatus")) { - this.limitStatus(model.getLimitStatus()); - } return this; } } @@ -196,13 +178,11 @@ public CreateLimitItemDetails( String name, Integer currentLimit, Integer currentUsage, - Integer requestedLimit, - LimitStatus limitStatus) { + Integer requestedLimit) { super(category, subCategory, issueType, name); this.currentLimit = currentLimit; this.currentUsage = currentUsage; this.requestedLimit = requestedLimit; - this.limitStatus = limitStatus; } /** @@ -247,56 +227,6 @@ public Integer getRequestedLimit() { return requestedLimit; } - /** - * The current status of the request. - **/ - public enum LimitStatus { - Approved("APPROVED"), - PartiallyApproved("PARTIALLY_APPROVED"), - NotApproved("NOT_APPROVED"), - ; - - private final String value; - private static java.util.Map map; - - static { - map = new java.util.HashMap<>(); - for (LimitStatus v : LimitStatus.values()) { - map.put(v.getValue(), v); - } - } - - LimitStatus(String value) { - this.value = value; - } - - @com.fasterxml.jackson.annotation.JsonValue - public String getValue() { - return value; - } - - @com.fasterxml.jackson.annotation.JsonCreator - public static LimitStatus create(String key) { - if (map.containsKey(key)) { - return map.get(key); - } - throw new IllegalArgumentException("Invalid LimitStatus: " + key); - } - }; - /** - * The current status of the request. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("limitStatus") - private final LimitStatus limitStatus; - - /** - * The current status of the request. - * @return the value - **/ - public LimitStatus getLimitStatus() { - return limitStatus; - } - @Override public String toString() { return this.toString(true); @@ -314,7 +244,6 @@ public String toString(boolean includeByteArrayContents) { sb.append(", currentLimit=").append(String.valueOf(this.currentLimit)); sb.append(", currentUsage=").append(String.valueOf(this.currentUsage)); sb.append(", requestedLimit=").append(String.valueOf(this.requestedLimit)); - sb.append(", limitStatus=").append(String.valueOf(this.limitStatus)); sb.append(")"); return sb.toString(); } @@ -332,7 +261,6 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.currentLimit, other.currentLimit) && java.util.Objects.equals(this.currentUsage, other.currentUsage) && java.util.Objects.equals(this.requestedLimit, other.requestedLimit) - && java.util.Objects.equals(this.limitStatus, other.limitStatus) && super.equals(other); } @@ -345,7 +273,6 @@ public int hashCode() { result = (result * PRIME) + (this.requestedLimit == null ? 43 : this.requestedLimit.hashCode()); - result = (result * PRIME) + (this.limitStatus == null ? 43 : this.limitStatus.hashCode()); return result; } } diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CreateTechSupportItemDetails.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CreateTechSupportItemDetails.java index eaf366eb643..0800597fb95 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CreateTechSupportItemDetails.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CreateTechSupportItemDetails.java @@ -6,6 +6,7 @@ /** * Details about the issue that the technical support ticket relates to. Avoid entering confidential information. + * For information about {@code TECH} support tickets, see [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CreateUserDetails.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CreateUserDetails.java index d6a53bf6e8f..f94ab60fbcd 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CreateUserDetails.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/CreateUserDetails.java @@ -166,13 +166,27 @@ public Builder organizationName(String organizationName) { return this; } /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * **/ @com.fasterxml.jackson.annotation.JsonProperty("problemType") private ProblemType problemType; /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * * @param problemType the value to set * @return this builder **/ @@ -342,13 +356,27 @@ public String getOrganizationName() { } /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * **/ @com.fasterxml.jackson.annotation.JsonProperty("problemType") private final ProblemType problemType; /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * * @return the value **/ public ProblemType getProblemType() { diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/Incident.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/Incident.java index a5dace22ce8..cfc2c9854e4 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/Incident.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/Incident.java @@ -26,6 +26,12 @@ public final class Incident extends com.oracle.bmc.http.internal.ExplicitlySetBm "tenancyInformation", "ticket", "incidentType", + "userGroupId", + "userGroupName", + "primaryContactPartyId", + "primaryContactPartyName", + "isWritePermitted", + "warnMessage", "problemType", "referrer" }) @@ -36,6 +42,12 @@ public Incident( TenancyInformation tenancyInformation, Ticket ticket, IncidentType incidentType, + String userGroupId, + String userGroupName, + String primaryContactPartyId, + String primaryContactPartyName, + Boolean isWritePermitted, + String warnMessage, ProblemType problemType, String referrer) { super(); @@ -45,6 +57,12 @@ public Incident( this.tenancyInformation = tenancyInformation; this.ticket = ticket; this.incidentType = incidentType; + this.userGroupId = userGroupId; + this.userGroupName = userGroupName; + this.primaryContactPartyId = primaryContactPartyId; + this.primaryContactPartyName = primaryContactPartyName; + this.isWritePermitted = isWritePermitted; + this.warnMessage = warnMessage; this.problemType = problemType; this.referrer = referrer; } @@ -120,13 +138,137 @@ public Builder incidentType(IncidentType incidentType) { return this; } /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * Technical support type ({@code TECH}) only: The identifier of the support request's user group in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroupId") + private String userGroupId; + + /** + * Technical support type ({@code TECH}) only: The identifier of the support request's user group in My Oracle Cloud Support portal. + * + * @param userGroupId the value to set + * @return this builder + **/ + public Builder userGroupId(String userGroupId) { + this.userGroupId = userGroupId; + this.__explicitlySet__.add("userGroupId"); + return this; + } + /** + * Technical support type ({@code TECH}) only: Name of the support request's user group in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroupName") + private String userGroupName; + + /** + * Technical support type ({@code TECH}) only: Name of the support request's user group in My Oracle Cloud Support portal. + * + * @param userGroupName the value to set + * @return this builder + **/ + public Builder userGroupName(String userGroupName) { + this.userGroupName = userGroupName; + this.__explicitlySet__.add("userGroupName"); + return this; + } + /** + * Technical support type ({@code TECH}) only: The identifier of the support request's primary contact ({@code primaryContactPartyName}) in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("primaryContactPartyId") + private String primaryContactPartyId; + + /** + * Technical support type ({@code TECH}) only: The identifier of the support request's primary contact ({@code primaryContactPartyName}) in My Oracle Cloud Support portal. + * + * @param primaryContactPartyId the value to set + * @return this builder + **/ + public Builder primaryContactPartyId(String primaryContactPartyId) { + this.primaryContactPartyId = primaryContactPartyId; + this.__explicitlySet__.add("primaryContactPartyId"); + return this; + } + /** + * Technical support type ({@code TECH}) only: The name of the support request's primary contact in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("primaryContactPartyName") + private String primaryContactPartyName; + + /** + * Technical support type ({@code TECH}) only: The name of the support request's primary contact in My Oracle Cloud Support portal. + * + * @param primaryContactPartyName the value to set + * @return this builder + **/ + public Builder primaryContactPartyName(String primaryContactPartyName) { + this.primaryContactPartyName = primaryContactPartyName; + this.__explicitlySet__.add("primaryContactPartyName"); + return this; + } + /** + * Technical support type ({@code TECH}) only: Allows update of the support request in My Oracle Cloud Support portal, + * when the user has write permission to the support request's user group. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isWritePermitted") + private Boolean isWritePermitted; + + /** + * Technical support type ({@code TECH}) only: Allows update of the support request in My Oracle Cloud Support portal, + * when the user has write permission to the support request's user group. + * + * @param isWritePermitted the value to set + * @return this builder + **/ + public Builder isWritePermitted(Boolean isWritePermitted) { + this.isWritePermitted = isWritePermitted; + this.__explicitlySet__.add("isWritePermitted"); + return this; + } + /** + * Technical support type ({@code TECH}) only: Message indicating the user group ({@code userGroupId}) that was auto-selected for a new support request. This message appears when no user group was specified in the create request for a new technical support request. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("warnMessage") + private String warnMessage; + + /** + * Technical support type ({@code TECH}) only: Message indicating the user group ({@code userGroupId}) that was auto-selected for a new support request. This message appears when no user group was specified in the create request for a new technical support request. + * + * @param warnMessage the value to set + * @return this builder + **/ + public Builder warnMessage(String warnMessage) { + this.warnMessage = warnMessage; + this.__explicitlySet__.add("warnMessage"); + return this; + } + /** + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * **/ @com.fasterxml.jackson.annotation.JsonProperty("problemType") private ProblemType problemType; /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * * @param problemType the value to set * @return this builder **/ @@ -164,6 +306,12 @@ public Incident build() { this.tenancyInformation, this.ticket, this.incidentType, + this.userGroupId, + this.userGroupName, + this.primaryContactPartyId, + this.primaryContactPartyName, + this.isWritePermitted, + this.warnMessage, this.problemType, this.referrer); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -192,6 +340,24 @@ public Builder copy(Incident model) { if (model.wasPropertyExplicitlySet("incidentType")) { this.incidentType(model.getIncidentType()); } + if (model.wasPropertyExplicitlySet("userGroupId")) { + this.userGroupId(model.getUserGroupId()); + } + if (model.wasPropertyExplicitlySet("userGroupName")) { + this.userGroupName(model.getUserGroupName()); + } + if (model.wasPropertyExplicitlySet("primaryContactPartyId")) { + this.primaryContactPartyId(model.getPrimaryContactPartyId()); + } + if (model.wasPropertyExplicitlySet("primaryContactPartyName")) { + this.primaryContactPartyName(model.getPrimaryContactPartyName()); + } + if (model.wasPropertyExplicitlySet("isWritePermitted")) { + this.isWritePermitted(model.getIsWritePermitted()); + } + if (model.wasPropertyExplicitlySet("warnMessage")) { + this.warnMessage(model.getWarnMessage()); + } if (model.wasPropertyExplicitlySet("problemType")) { this.problemType(model.getProblemType()); } @@ -270,13 +436,125 @@ public IncidentType getIncidentType() { } /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * Technical support type ({@code TECH}) only: The identifier of the support request's user group in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroupId") + private final String userGroupId; + + /** + * Technical support type ({@code TECH}) only: The identifier of the support request's user group in My Oracle Cloud Support portal. + * + * @return the value + **/ + public String getUserGroupId() { + return userGroupId; + } + + /** + * Technical support type ({@code TECH}) only: Name of the support request's user group in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroupName") + private final String userGroupName; + + /** + * Technical support type ({@code TECH}) only: Name of the support request's user group in My Oracle Cloud Support portal. + * + * @return the value + **/ + public String getUserGroupName() { + return userGroupName; + } + + /** + * Technical support type ({@code TECH}) only: The identifier of the support request's primary contact ({@code primaryContactPartyName}) in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("primaryContactPartyId") + private final String primaryContactPartyId; + + /** + * Technical support type ({@code TECH}) only: The identifier of the support request's primary contact ({@code primaryContactPartyName}) in My Oracle Cloud Support portal. + * + * @return the value + **/ + public String getPrimaryContactPartyId() { + return primaryContactPartyId; + } + + /** + * Technical support type ({@code TECH}) only: The name of the support request's primary contact in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("primaryContactPartyName") + private final String primaryContactPartyName; + + /** + * Technical support type ({@code TECH}) only: The name of the support request's primary contact in My Oracle Cloud Support portal. + * + * @return the value + **/ + public String getPrimaryContactPartyName() { + return primaryContactPartyName; + } + + /** + * Technical support type ({@code TECH}) only: Allows update of the support request in My Oracle Cloud Support portal, + * when the user has write permission to the support request's user group. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isWritePermitted") + private final Boolean isWritePermitted; + + /** + * Technical support type ({@code TECH}) only: Allows update of the support request in My Oracle Cloud Support portal, + * when the user has write permission to the support request's user group. + * + * @return the value + **/ + public Boolean getIsWritePermitted() { + return isWritePermitted; + } + + /** + * Technical support type ({@code TECH}) only: Message indicating the user group ({@code userGroupId}) that was auto-selected for a new support request. This message appears when no user group was specified in the create request for a new technical support request. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("warnMessage") + private final String warnMessage; + + /** + * Technical support type ({@code TECH}) only: Message indicating the user group ({@code userGroupId}) that was auto-selected for a new support request. This message appears when no user group was specified in the create request for a new technical support request. + * + * @return the value + **/ + public String getWarnMessage() { + return warnMessage; + } + + /** + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * **/ @com.fasterxml.jackson.annotation.JsonProperty("problemType") private final ProblemType problemType; /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * * @return the value **/ public ProblemType getProblemType() { @@ -317,6 +595,13 @@ public String toString(boolean includeByteArrayContents) { sb.append(", tenancyInformation=").append(String.valueOf(this.tenancyInformation)); sb.append(", ticket=").append(String.valueOf(this.ticket)); sb.append(", incidentType=").append(String.valueOf(this.incidentType)); + sb.append(", userGroupId=").append(String.valueOf(this.userGroupId)); + sb.append(", userGroupName=").append(String.valueOf(this.userGroupName)); + sb.append(", primaryContactPartyId=").append(String.valueOf(this.primaryContactPartyId)); + sb.append(", primaryContactPartyName=") + .append(String.valueOf(this.primaryContactPartyName)); + sb.append(", isWritePermitted=").append(String.valueOf(this.isWritePermitted)); + sb.append(", warnMessage=").append(String.valueOf(this.warnMessage)); sb.append(", problemType=").append(String.valueOf(this.problemType)); sb.append(", referrer=").append(String.valueOf(this.referrer)); sb.append(")"); @@ -339,6 +624,13 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.tenancyInformation, other.tenancyInformation) && java.util.Objects.equals(this.ticket, other.ticket) && java.util.Objects.equals(this.incidentType, other.incidentType) + && java.util.Objects.equals(this.userGroupId, other.userGroupId) + && java.util.Objects.equals(this.userGroupName, other.userGroupName) + && java.util.Objects.equals(this.primaryContactPartyId, other.primaryContactPartyId) + && java.util.Objects.equals( + this.primaryContactPartyName, other.primaryContactPartyName) + && java.util.Objects.equals(this.isWritePermitted, other.isWritePermitted) + && java.util.Objects.equals(this.warnMessage, other.warnMessage) && java.util.Objects.equals(this.problemType, other.problemType) && java.util.Objects.equals(this.referrer, other.referrer) && super.equals(other); @@ -360,6 +652,24 @@ public int hashCode() { : this.tenancyInformation.hashCode()); result = (result * PRIME) + (this.ticket == null ? 43 : this.ticket.hashCode()); result = (result * PRIME) + (this.incidentType == null ? 43 : this.incidentType.hashCode()); + result = (result * PRIME) + (this.userGroupId == null ? 43 : this.userGroupId.hashCode()); + result = + (result * PRIME) + + (this.userGroupName == null ? 43 : this.userGroupName.hashCode()); + result = + (result * PRIME) + + (this.primaryContactPartyId == null + ? 43 + : this.primaryContactPartyId.hashCode()); + result = + (result * PRIME) + + (this.primaryContactPartyName == null + ? 43 + : this.primaryContactPartyName.hashCode()); + result = + (result * PRIME) + + (this.isWritePermitted == null ? 43 : this.isWritePermitted.hashCode()); + result = (result * PRIME) + (this.warnMessage == null ? 43 : this.warnMessage.hashCode()); result = (result * PRIME) + (this.problemType == null ? 43 : this.problemType.hashCode()); result = (result * PRIME) + (this.referrer == null ? 43 : this.referrer.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/IncidentResourceType.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/IncidentResourceType.java index 3be3756a47c..b4c25c47e6f 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/IncidentResourceType.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/IncidentResourceType.java @@ -26,26 +26,29 @@ public final class IncidentResourceType extends com.oracle.bmc.http.internal.Exp "name", "label", "description", + "isSubscriptionsSupported", "serviceCategoryList", "service", - "serviceCategories" + "services" }) public IncidentResourceType( String resourceTypeKey, String name, String label, String description, + Boolean isSubscriptionsSupported, java.util.List serviceCategoryList, java.util.Map service, - java.util.List serviceCategories) { + java.util.List services) { super(); this.resourceTypeKey = resourceTypeKey; this.name = name; this.label = label; this.description = description; + this.isSubscriptionsSupported = isSubscriptionsSupported; this.serviceCategoryList = serviceCategoryList; this.service = service; - this.serviceCategories = serviceCategories; + this.services = services; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -114,6 +117,22 @@ public Builder description(String description) { this.__explicitlySet__.add("description"); return this; } + /** + * Indicates whether multi-subscription is supported + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSubscriptionsSupported") + private Boolean isSubscriptionsSupported; + + /** + * Indicates whether multi-subscription is supported + * @param isSubscriptionsSupported the value to set + * @return this builder + **/ + public Builder isSubscriptionsSupported(Boolean isSubscriptionsSupported) { + this.isSubscriptionsSupported = isSubscriptionsSupported; + this.__explicitlySet__.add("isSubscriptionsSupported"); + return this; + } /** * The service category list. **/ @@ -149,17 +168,17 @@ public Builder service(java.util.Map service) { /** * The service categories list for MOS Taxonomy. **/ - @com.fasterxml.jackson.annotation.JsonProperty("serviceCategories") - private java.util.List serviceCategories; + @com.fasterxml.jackson.annotation.JsonProperty("services") + private java.util.List services; /** * The service categories list for MOS Taxonomy. - * @param serviceCategories the value to set + * @param services the value to set * @return this builder **/ - public Builder serviceCategories(java.util.List serviceCategories) { - this.serviceCategories = serviceCategories; - this.__explicitlySet__.add("serviceCategories"); + public Builder services(java.util.List services) { + this.services = services; + this.__explicitlySet__.add("services"); return this; } @@ -173,9 +192,10 @@ public IncidentResourceType build() { this.name, this.label, this.description, + this.isSubscriptionsSupported, this.serviceCategoryList, this.service, - this.serviceCategories); + this.services); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -196,14 +216,17 @@ public Builder copy(IncidentResourceType model) { if (model.wasPropertyExplicitlySet("description")) { this.description(model.getDescription()); } + if (model.wasPropertyExplicitlySet("isSubscriptionsSupported")) { + this.isSubscriptionsSupported(model.getIsSubscriptionsSupported()); + } if (model.wasPropertyExplicitlySet("serviceCategoryList")) { this.serviceCategoryList(model.getServiceCategoryList()); } if (model.wasPropertyExplicitlySet("service")) { this.service(model.getService()); } - if (model.wasPropertyExplicitlySet("serviceCategories")) { - this.serviceCategories(model.getServiceCategories()); + if (model.wasPropertyExplicitlySet("services")) { + this.services(model.getServices()); } return this; } @@ -276,6 +299,20 @@ public String getDescription() { return description; } + /** + * Indicates whether multi-subscription is supported + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSubscriptionsSupported") + private final Boolean isSubscriptionsSupported; + + /** + * Indicates whether multi-subscription is supported + * @return the value + **/ + public Boolean getIsSubscriptionsSupported() { + return isSubscriptionsSupported; + } + /** * The service category list. **/ @@ -307,15 +344,15 @@ public java.util.Map getService() { /** * The service categories list for MOS Taxonomy. **/ - @com.fasterxml.jackson.annotation.JsonProperty("serviceCategories") - private final java.util.List serviceCategories; + @com.fasterxml.jackson.annotation.JsonProperty("services") + private final java.util.List services; /** * The service categories list for MOS Taxonomy. * @return the value **/ - public java.util.List getServiceCategories() { - return serviceCategories; + public java.util.List getServices() { + return services; } @Override @@ -336,9 +373,11 @@ public String toString(boolean includeByteArrayContents) { sb.append(", name=").append(String.valueOf(this.name)); sb.append(", label=").append(String.valueOf(this.label)); sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", isSubscriptionsSupported=") + .append(String.valueOf(this.isSubscriptionsSupported)); sb.append(", serviceCategoryList=").append(String.valueOf(this.serviceCategoryList)); sb.append(", service=").append(String.valueOf(this.service)); - sb.append(", serviceCategories=").append(String.valueOf(this.serviceCategories)); + sb.append(", services=").append(String.valueOf(this.services)); sb.append(")"); return sb.toString(); } @@ -357,9 +396,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.name, other.name) && java.util.Objects.equals(this.label, other.label) && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals( + this.isSubscriptionsSupported, other.isSubscriptionsSupported) && java.util.Objects.equals(this.serviceCategoryList, other.serviceCategoryList) && java.util.Objects.equals(this.service, other.service) - && java.util.Objects.equals(this.serviceCategories, other.serviceCategories) + && java.util.Objects.equals(this.services, other.services) && super.equals(other); } @@ -373,15 +414,18 @@ public int hashCode() { result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); result = (result * PRIME) + (this.label == null ? 43 : this.label.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.isSubscriptionsSupported == null + ? 43 + : this.isSubscriptionsSupported.hashCode()); result = (result * PRIME) + (this.serviceCategoryList == null ? 43 : this.serviceCategoryList.hashCode()); result = (result * PRIME) + (this.service == null ? 43 : this.service.hashCode()); - result = - (result * PRIME) - + (this.serviceCategories == null ? 43 : this.serviceCategories.hashCode()); + result = (result * PRIME) + (this.services == null ? 43 : this.services.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/IncidentSummary.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/IncidentSummary.java index a9dfc7ca0d1..95fce2ce506 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/IncidentSummary.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/IncidentSummary.java @@ -26,6 +26,12 @@ public final class IncidentSummary extends com.oracle.bmc.http.internal.Explicit "tenancyInformation", "ticket", "incidentType", + "userGroupId", + "userGroupName", + "primaryContactPartyId", + "primaryContactPartyName", + "isWritePermitted", + "warnMessage", "problemType" }) public IncidentSummary( @@ -35,6 +41,12 @@ public IncidentSummary( TenancyInformation tenancyInformation, Ticket ticket, IncidentResourceType incidentType, + String userGroupId, + String userGroupName, + String primaryContactPartyId, + String primaryContactPartyName, + Boolean isWritePermitted, + String warnMessage, ProblemType problemType) { super(); this.key = key; @@ -43,6 +55,12 @@ public IncidentSummary( this.tenancyInformation = tenancyInformation; this.ticket = ticket; this.incidentType = incidentType; + this.userGroupId = userGroupId; + this.userGroupName = userGroupName; + this.primaryContactPartyId = primaryContactPartyId; + this.primaryContactPartyName = primaryContactPartyName; + this.isWritePermitted = isWritePermitted; + this.warnMessage = warnMessage; this.problemType = problemType; } @@ -117,13 +135,137 @@ public Builder incidentType(IncidentResourceType incidentType) { return this; } /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * Technical support type ({@code TECH}) only: The identifier of the support request's user group in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroupId") + private String userGroupId; + + /** + * Technical support type ({@code TECH}) only: The identifier of the support request's user group in My Oracle Cloud Support portal. + * + * @param userGroupId the value to set + * @return this builder + **/ + public Builder userGroupId(String userGroupId) { + this.userGroupId = userGroupId; + this.__explicitlySet__.add("userGroupId"); + return this; + } + /** + * Technical support type ({@code TECH}) only: Name of the support request's user group in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroupName") + private String userGroupName; + + /** + * Technical support type ({@code TECH}) only: Name of the support request's user group in My Oracle Cloud Support portal. + * + * @param userGroupName the value to set + * @return this builder + **/ + public Builder userGroupName(String userGroupName) { + this.userGroupName = userGroupName; + this.__explicitlySet__.add("userGroupName"); + return this; + } + /** + * Technical support type ({@code TECH}) only: The identifier of the support request's primary contact ({@code primaryContactPartyName}) in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("primaryContactPartyId") + private String primaryContactPartyId; + + /** + * Technical support type ({@code TECH}) only: The identifier of the support request's primary contact ({@code primaryContactPartyName}) in My Oracle Cloud Support portal. + * + * @param primaryContactPartyId the value to set + * @return this builder + **/ + public Builder primaryContactPartyId(String primaryContactPartyId) { + this.primaryContactPartyId = primaryContactPartyId; + this.__explicitlySet__.add("primaryContactPartyId"); + return this; + } + /** + * Technical support type ({@code TECH}) only: The name of the support request's primary contact in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("primaryContactPartyName") + private String primaryContactPartyName; + + /** + * Technical support type ({@code TECH}) only: The name of the support request's primary contact in My Oracle Cloud Support portal. + * + * @param primaryContactPartyName the value to set + * @return this builder + **/ + public Builder primaryContactPartyName(String primaryContactPartyName) { + this.primaryContactPartyName = primaryContactPartyName; + this.__explicitlySet__.add("primaryContactPartyName"); + return this; + } + /** + * Technical support type ({@code TECH}) only: Allows update of the support request in My Oracle Cloud Support portal, + * when the user has write permission to the support request's user group. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isWritePermitted") + private Boolean isWritePermitted; + + /** + * Technical support type ({@code TECH}) only: Allows update of the support request in My Oracle Cloud Support portal, + * when the user has write permission to the support request's user group. + * + * @param isWritePermitted the value to set + * @return this builder + **/ + public Builder isWritePermitted(Boolean isWritePermitted) { + this.isWritePermitted = isWritePermitted; + this.__explicitlySet__.add("isWritePermitted"); + return this; + } + /** + * Technical support type ({@code TECH}) only: Message indicating the user group ({@code userGroupId}) that was auto-selected for a new support request. This message appears when no user group was specified in the create request for a new technical support request. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("warnMessage") + private String warnMessage; + + /** + * Technical support type ({@code TECH}) only: Message indicating the user group ({@code userGroupId}) that was auto-selected for a new support request. This message appears when no user group was specified in the create request for a new technical support request. + * + * @param warnMessage the value to set + * @return this builder + **/ + public Builder warnMessage(String warnMessage) { + this.warnMessage = warnMessage; + this.__explicitlySet__.add("warnMessage"); + return this; + } + /** + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * **/ @com.fasterxml.jackson.annotation.JsonProperty("problemType") private ProblemType problemType; /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * * @param problemType the value to set * @return this builder **/ @@ -145,6 +287,12 @@ public IncidentSummary build() { this.tenancyInformation, this.ticket, this.incidentType, + this.userGroupId, + this.userGroupName, + this.primaryContactPartyId, + this.primaryContactPartyName, + this.isWritePermitted, + this.warnMessage, this.problemType); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -172,6 +320,24 @@ public Builder copy(IncidentSummary model) { if (model.wasPropertyExplicitlySet("incidentType")) { this.incidentType(model.getIncidentType()); } + if (model.wasPropertyExplicitlySet("userGroupId")) { + this.userGroupId(model.getUserGroupId()); + } + if (model.wasPropertyExplicitlySet("userGroupName")) { + this.userGroupName(model.getUserGroupName()); + } + if (model.wasPropertyExplicitlySet("primaryContactPartyId")) { + this.primaryContactPartyId(model.getPrimaryContactPartyId()); + } + if (model.wasPropertyExplicitlySet("primaryContactPartyName")) { + this.primaryContactPartyName(model.getPrimaryContactPartyName()); + } + if (model.wasPropertyExplicitlySet("isWritePermitted")) { + this.isWritePermitted(model.getIsWritePermitted()); + } + if (model.wasPropertyExplicitlySet("warnMessage")) { + this.warnMessage(model.getWarnMessage()); + } if (model.wasPropertyExplicitlySet("problemType")) { this.problemType(model.getProblemType()); } @@ -247,13 +413,125 @@ public IncidentResourceType getIncidentType() { } /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * Technical support type ({@code TECH}) only: The identifier of the support request's user group in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroupId") + private final String userGroupId; + + /** + * Technical support type ({@code TECH}) only: The identifier of the support request's user group in My Oracle Cloud Support portal. + * + * @return the value + **/ + public String getUserGroupId() { + return userGroupId; + } + + /** + * Technical support type ({@code TECH}) only: Name of the support request's user group in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroupName") + private final String userGroupName; + + /** + * Technical support type ({@code TECH}) only: Name of the support request's user group in My Oracle Cloud Support portal. + * + * @return the value + **/ + public String getUserGroupName() { + return userGroupName; + } + + /** + * Technical support type ({@code TECH}) only: The identifier of the support request's primary contact ({@code primaryContactPartyName}) in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("primaryContactPartyId") + private final String primaryContactPartyId; + + /** + * Technical support type ({@code TECH}) only: The identifier of the support request's primary contact ({@code primaryContactPartyName}) in My Oracle Cloud Support portal. + * + * @return the value + **/ + public String getPrimaryContactPartyId() { + return primaryContactPartyId; + } + + /** + * Technical support type ({@code TECH}) only: The name of the support request's primary contact in My Oracle Cloud Support portal. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("primaryContactPartyName") + private final String primaryContactPartyName; + + /** + * Technical support type ({@code TECH}) only: The name of the support request's primary contact in My Oracle Cloud Support portal. + * + * @return the value + **/ + public String getPrimaryContactPartyName() { + return primaryContactPartyName; + } + + /** + * Technical support type ({@code TECH}) only: Allows update of the support request in My Oracle Cloud Support portal, + * when the user has write permission to the support request's user group. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isWritePermitted") + private final Boolean isWritePermitted; + + /** + * Technical support type ({@code TECH}) only: Allows update of the support request in My Oracle Cloud Support portal, + * when the user has write permission to the support request's user group. + * + * @return the value + **/ + public Boolean getIsWritePermitted() { + return isWritePermitted; + } + + /** + * Technical support type ({@code TECH}) only: Message indicating the user group ({@code userGroupId}) that was auto-selected for a new support request. This message appears when no user group was specified in the create request for a new technical support request. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("warnMessage") + private final String warnMessage; + + /** + * Technical support type ({@code TECH}) only: Message indicating the user group ({@code userGroupId}) that was auto-selected for a new support request. This message appears when no user group was specified in the create request for a new technical support request. + * + * @return the value + **/ + public String getWarnMessage() { + return warnMessage; + } + + /** + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * **/ @com.fasterxml.jackson.annotation.JsonProperty("problemType") private final ProblemType problemType; /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * * @return the value **/ public ProblemType getProblemType() { @@ -280,6 +558,13 @@ public String toString(boolean includeByteArrayContents) { sb.append(", tenancyInformation=").append(String.valueOf(this.tenancyInformation)); sb.append(", ticket=").append(String.valueOf(this.ticket)); sb.append(", incidentType=").append(String.valueOf(this.incidentType)); + sb.append(", userGroupId=").append(String.valueOf(this.userGroupId)); + sb.append(", userGroupName=").append(String.valueOf(this.userGroupName)); + sb.append(", primaryContactPartyId=").append(String.valueOf(this.primaryContactPartyId)); + sb.append(", primaryContactPartyName=") + .append(String.valueOf(this.primaryContactPartyName)); + sb.append(", isWritePermitted=").append(String.valueOf(this.isWritePermitted)); + sb.append(", warnMessage=").append(String.valueOf(this.warnMessage)); sb.append(", problemType=").append(String.valueOf(this.problemType)); sb.append(")"); return sb.toString(); @@ -301,6 +586,13 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.tenancyInformation, other.tenancyInformation) && java.util.Objects.equals(this.ticket, other.ticket) && java.util.Objects.equals(this.incidentType, other.incidentType) + && java.util.Objects.equals(this.userGroupId, other.userGroupId) + && java.util.Objects.equals(this.userGroupName, other.userGroupName) + && java.util.Objects.equals(this.primaryContactPartyId, other.primaryContactPartyId) + && java.util.Objects.equals( + this.primaryContactPartyName, other.primaryContactPartyName) + && java.util.Objects.equals(this.isWritePermitted, other.isWritePermitted) + && java.util.Objects.equals(this.warnMessage, other.warnMessage) && java.util.Objects.equals(this.problemType, other.problemType) && super.equals(other); } @@ -321,6 +613,24 @@ public int hashCode() { : this.tenancyInformation.hashCode()); result = (result * PRIME) + (this.ticket == null ? 43 : this.ticket.hashCode()); result = (result * PRIME) + (this.incidentType == null ? 43 : this.incidentType.hashCode()); + result = (result * PRIME) + (this.userGroupId == null ? 43 : this.userGroupId.hashCode()); + result = + (result * PRIME) + + (this.userGroupName == null ? 43 : this.userGroupName.hashCode()); + result = + (result * PRIME) + + (this.primaryContactPartyId == null + ? 43 + : this.primaryContactPartyId.hashCode()); + result = + (result * PRIME) + + (this.primaryContactPartyName == null + ? 43 + : this.primaryContactPartyName.hashCode()); + result = + (result * PRIME) + + (this.isWritePermitted == null ? 43 : this.isWritePermitted.hashCode()); + result = (result * PRIME) + (this.warnMessage == null ? 43 : this.warnMessage.hashCode()); result = (result * PRIME) + (this.problemType == null ? 43 : this.problemType.hashCode()); result = (result * PRIME) + super.hashCode(); return result; diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/LifecycleDetails.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/LifecycleDetails.java index 351a3bf504a..124256ece98 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/LifecycleDetails.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/LifecycleDetails.java @@ -11,6 +11,7 @@ public enum LifecycleDetails { PendingWithOracle("PENDING_WITH_ORACLE"), PendingWithCustomer("PENDING_WITH_CUSTOMER"), + PendingWithSupport("PENDING_WITH_SUPPORT"), CloseRequested("CLOSE_REQUESTED"), Closed("CLOSED"), diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/LimitItem.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/LimitItem.java index cd6a78b6071..9a05dfef4e2 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/LimitItem.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/LimitItem.java @@ -133,6 +133,22 @@ public Builder limitStatus(LimitStatus limitStatus) { this.__explicitlySet__.add("limitStatus"); return this; } + /** + * The message to customer for partially approved and rejected limit requests + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerMessage") + private String customerMessage; + + /** + * The message to customer for partially approved and rejected limit requests + * @param customerMessage the value to set + * @return this builder + **/ + public Builder customerMessage(String customerMessage) { + this.customerMessage = customerMessage; + this.__explicitlySet__.add("customerMessage"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -148,7 +164,8 @@ public LimitItem build() { this.currentLimit, this.currentUsage, this.requestedLimit, - this.limitStatus); + this.limitStatus, + this.customerMessage); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -184,6 +201,9 @@ public Builder copy(LimitItem model) { if (model.wasPropertyExplicitlySet("limitStatus")) { this.limitStatus(model.getLimitStatus()); } + if (model.wasPropertyExplicitlySet("customerMessage")) { + this.customerMessage(model.getCustomerMessage()); + } return this; } } @@ -209,12 +229,14 @@ public LimitItem( Integer currentLimit, Integer currentUsage, Integer requestedLimit, - LimitStatus limitStatus) { + LimitStatus limitStatus, + String customerMessage) { super(itemKey, name, category, subCategory, issueType); this.currentLimit = currentLimit; this.currentUsage = currentUsage; this.requestedLimit = requestedLimit; this.limitStatus = limitStatus; + this.customerMessage = customerMessage; } /** @@ -266,6 +288,7 @@ public enum LimitStatus { Approved("APPROVED"), PartiallyApproved("PARTIALLY_APPROVED"), NotApproved("NOT_APPROVED"), + Rejected("REJECTED"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -322,6 +345,20 @@ public LimitStatus getLimitStatus() { return limitStatus; } + /** + * The message to customer for partially approved and rejected limit requests + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerMessage") + private final String customerMessage; + + /** + * The message to customer for partially approved and rejected limit requests + * @return the value + **/ + public String getCustomerMessage() { + return customerMessage; + } + @Override public String toString() { return this.toString(true); @@ -340,6 +377,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", currentUsage=").append(String.valueOf(this.currentUsage)); sb.append(", requestedLimit=").append(String.valueOf(this.requestedLimit)); sb.append(", limitStatus=").append(String.valueOf(this.limitStatus)); + sb.append(", customerMessage=").append(String.valueOf(this.customerMessage)); sb.append(")"); return sb.toString(); } @@ -358,6 +396,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.currentUsage, other.currentUsage) && java.util.Objects.equals(this.requestedLimit, other.requestedLimit) && java.util.Objects.equals(this.limitStatus, other.limitStatus) + && java.util.Objects.equals(this.customerMessage, other.customerMessage) && super.equals(other); } @@ -371,6 +410,9 @@ public int hashCode() { (result * PRIME) + (this.requestedLimit == null ? 43 : this.requestedLimit.hashCode()); result = (result * PRIME) + (this.limitStatus == null ? 43 : this.limitStatus.hashCode()); + result = + (result * PRIME) + + (this.customerMessage == null ? 43 : this.customerMessage.hashCode()); return result; } } diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/ProblemType.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/ProblemType.java index e7c7ef50830..ff1dd9bcce5 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/ProblemType.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/ProblemType.java @@ -5,7 +5,14 @@ package com.oracle.bmc.cims.model; /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181231") public enum ProblemType { diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/ServiceCategory.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/ServiceCategory.java index a30be59bb4f..b66abad3f86 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/ServiceCategory.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/ServiceCategory.java @@ -25,6 +25,7 @@ public final class ServiceCategory extends com.oracle.bmc.http.internal.Explicit "label", "description", "issueTypeList", + "supportedSubscriptions", "scope", "unit", "limitId" @@ -35,6 +36,7 @@ public ServiceCategory( String label, String description, java.util.List issueTypeList, + java.util.List supportedSubscriptions, Scope scope, Unit unit, String limitId) { @@ -44,6 +46,7 @@ public ServiceCategory( this.label = label; this.description = description; this.issueTypeList = issueTypeList; + this.supportedSubscriptions = supportedSubscriptions; this.scope = scope; this.unit = unit; this.limitId = limitId; @@ -131,6 +134,22 @@ public Builder issueTypeList(java.util.List issueTypeList) { this.__explicitlySet__.add("issueTypeList"); return this; } + /** + * List of supported subscriptions + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportedSubscriptions") + private java.util.List supportedSubscriptions; + + /** + * List of supported subscriptions + * @param supportedSubscriptions the value to set + * @return this builder + **/ + public Builder supportedSubscriptions(java.util.List supportedSubscriptions) { + this.supportedSubscriptions = supportedSubscriptions; + this.__explicitlySet__.add("supportedSubscriptions"); + return this; + } /** * The scope of the incident. **/ @@ -191,6 +210,7 @@ public ServiceCategory build() { this.label, this.description, this.issueTypeList, + this.supportedSubscriptions, this.scope, this.unit, this.limitId); @@ -217,6 +237,9 @@ public Builder copy(ServiceCategory model) { if (model.wasPropertyExplicitlySet("issueTypeList")) { this.issueTypeList(model.getIssueTypeList()); } + if (model.wasPropertyExplicitlySet("supportedSubscriptions")) { + this.supportedSubscriptions(model.getSupportedSubscriptions()); + } if (model.wasPropertyExplicitlySet("scope")) { this.scope(model.getScope()); } @@ -311,6 +334,20 @@ public java.util.List getIssueTypeList() { return issueTypeList; } + /** + * List of supported subscriptions + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportedSubscriptions") + private final java.util.List supportedSubscriptions; + + /** + * List of supported subscriptions + * @return the value + **/ + public java.util.List getSupportedSubscriptions() { + return supportedSubscriptions; + } + /** * The scope of the incident. **/ @@ -372,6 +409,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", label=").append(String.valueOf(this.label)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", issueTypeList=").append(String.valueOf(this.issueTypeList)); + sb.append(", supportedSubscriptions=").append(String.valueOf(this.supportedSubscriptions)); sb.append(", scope=").append(String.valueOf(this.scope)); sb.append(", unit=").append(String.valueOf(this.unit)); sb.append(", limitId=").append(String.valueOf(this.limitId)); @@ -394,6 +432,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.label, other.label) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.issueTypeList, other.issueTypeList) + && java.util.Objects.equals( + this.supportedSubscriptions, other.supportedSubscriptions) && java.util.Objects.equals(this.scope, other.scope) && java.util.Objects.equals(this.unit, other.unit) && java.util.Objects.equals(this.limitId, other.limitId) @@ -411,6 +451,11 @@ public int hashCode() { result = (result * PRIME) + (this.issueTypeList == null ? 43 : this.issueTypeList.hashCode()); + result = + (result * PRIME) + + (this.supportedSubscriptions == null + ? 43 + : this.supportedSubscriptions.hashCode()); result = (result * PRIME) + (this.scope == null ? 43 : this.scope.hashCode()); result = (result * PRIME) + (this.unit == null ? 43 : this.unit.hashCode()); result = (result * PRIME) + (this.limitId == null ? 43 : this.limitId.hashCode()); diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/ServiceCategories.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/Services.java similarity index 63% rename from bmc-cims/src/main/java/com/oracle/bmc/cims/model/ServiceCategories.java rename to bmc-cims/src/main/java/com/oracle/bmc/cims/model/Services.java index ab59459556f..ab056fdccc3 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/ServiceCategories.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/Services.java @@ -15,21 +15,19 @@ * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181231") -@com.fasterxml.jackson.databind.annotation.JsonDeserialize( - builder = ServiceCategories.Builder.class -) +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Services.Builder.class) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) -public final class ServiceCategories extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { +public final class Services extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"serviceCategory", "schema", "issueType"}) - public ServiceCategories( - java.util.Map serviceCategory, + @java.beans.ConstructorProperties({"service", "schema", "serviceCategories"}) + public Services( + java.util.Map service, String schema, - java.util.Map issueType) { + java.util.List serviceCategories) { super(); - this.serviceCategory = serviceCategory; + this.service = service; this.schema = schema; - this.issueType = issueType; + this.serviceCategories = serviceCategories; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -37,17 +35,17 @@ public static class Builder { /** * Service Category list. **/ - @com.fasterxml.jackson.annotation.JsonProperty("serviceCategory") - private java.util.Map serviceCategory; + @com.fasterxml.jackson.annotation.JsonProperty("service") + private java.util.Map service; /** * Service Category list. - * @param serviceCategory the value to set + * @param service the value to set * @return this builder **/ - public Builder serviceCategory(java.util.Map serviceCategory) { - this.serviceCategory = serviceCategory; - this.__explicitlySet__.add("serviceCategory"); + public Builder service(java.util.Map service) { + this.service = service; + this.__explicitlySet__.add("service"); return this; } /** @@ -67,28 +65,27 @@ public Builder schema(String schema) { return this; } /** - * Issue type list. + * The service categories list for MOS Taxonomy. **/ - @com.fasterxml.jackson.annotation.JsonProperty("issueType") - private java.util.Map issueType; + @com.fasterxml.jackson.annotation.JsonProperty("serviceCategories") + private java.util.List serviceCategories; /** - * Issue type list. - * @param issueType the value to set + * The service categories list for MOS Taxonomy. + * @param serviceCategories the value to set * @return this builder **/ - public Builder issueType(java.util.Map issueType) { - this.issueType = issueType; - this.__explicitlySet__.add("issueType"); + public Builder serviceCategories(java.util.List serviceCategories) { + this.serviceCategories = serviceCategories; + this.__explicitlySet__.add("serviceCategories"); return this; } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); - public ServiceCategories build() { - ServiceCategories model = - new ServiceCategories(this.serviceCategory, this.schema, this.issueType); + public Services build() { + Services model = new Services(this.service, this.schema, this.serviceCategories); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -96,15 +93,15 @@ public ServiceCategories build() { } @com.fasterxml.jackson.annotation.JsonIgnore - public Builder copy(ServiceCategories model) { - if (model.wasPropertyExplicitlySet("serviceCategory")) { - this.serviceCategory(model.getServiceCategory()); + public Builder copy(Services model) { + if (model.wasPropertyExplicitlySet("service")) { + this.service(model.getService()); } if (model.wasPropertyExplicitlySet("schema")) { this.schema(model.getSchema()); } - if (model.wasPropertyExplicitlySet("issueType")) { - this.issueType(model.getIssueType()); + if (model.wasPropertyExplicitlySet("serviceCategories")) { + this.serviceCategories(model.getServiceCategories()); } return this; } @@ -124,15 +121,15 @@ public Builder toBuilder() { /** * Service Category list. **/ - @com.fasterxml.jackson.annotation.JsonProperty("serviceCategory") - private final java.util.Map serviceCategory; + @com.fasterxml.jackson.annotation.JsonProperty("service") + private final java.util.Map service; /** * Service Category list. * @return the value **/ - public java.util.Map getServiceCategory() { - return serviceCategory; + public java.util.Map getService() { + return service; } /** @@ -150,17 +147,17 @@ public String getSchema() { } /** - * Issue type list. + * The service categories list for MOS Taxonomy. **/ - @com.fasterxml.jackson.annotation.JsonProperty("issueType") - private final java.util.Map issueType; + @com.fasterxml.jackson.annotation.JsonProperty("serviceCategories") + private final java.util.List serviceCategories; /** - * Issue type list. + * The service categories list for MOS Taxonomy. * @return the value **/ - public java.util.Map getIssueType() { - return issueType; + public java.util.List getServiceCategories() { + return serviceCategories; } @Override @@ -175,11 +172,11 @@ public String toString() { */ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); - sb.append("ServiceCategories("); + sb.append("Services("); sb.append("super=").append(super.toString()); - sb.append("serviceCategory=").append(String.valueOf(this.serviceCategory)); + sb.append("service=").append(String.valueOf(this.service)); sb.append(", schema=").append(String.valueOf(this.schema)); - sb.append(", issueType=").append(String.valueOf(this.issueType)); + sb.append(", serviceCategories=").append(String.valueOf(this.serviceCategories)); sb.append(")"); return sb.toString(); } @@ -189,14 +186,14 @@ public boolean equals(Object o) { if (this == o) { return true; } - if (!(o instanceof ServiceCategories)) { + if (!(o instanceof Services)) { return false; } - ServiceCategories other = (ServiceCategories) o; - return java.util.Objects.equals(this.serviceCategory, other.serviceCategory) + Services other = (Services) o; + return java.util.Objects.equals(this.service, other.service) && java.util.Objects.equals(this.schema, other.schema) - && java.util.Objects.equals(this.issueType, other.issueType) + && java.util.Objects.equals(this.serviceCategories, other.serviceCategories) && super.equals(other); } @@ -204,11 +201,11 @@ public boolean equals(Object o) { public int hashCode() { final int PRIME = 59; int result = 1; + result = (result * PRIME) + (this.service == null ? 43 : this.service.hashCode()); + result = (result * PRIME) + (this.schema == null ? 43 : this.schema.hashCode()); result = (result * PRIME) - + (this.serviceCategory == null ? 43 : this.serviceCategory.hashCode()); - result = (result * PRIME) + (this.schema == null ? 43 : this.schema.hashCode()); - result = (result * PRIME) + (this.issueType == null ? 43 : this.issueType.hashCode()); + + (this.serviceCategories == null ? 43 : this.serviceCategories.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/SubCategories.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/SubCategories.java new file mode 100644 index 00000000000..b37b825607f --- /dev/null +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/SubCategories.java @@ -0,0 +1,264 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cims.model; + +/** + * List of subcategories under a service. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181231") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = SubCategories.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SubCategories extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "serviceCategory", + "schema", + "hasSubCategory", + "subCategories" + }) + public SubCategories( + java.util.Map serviceCategory, + String schema, + String hasSubCategory, + java.util.List subCategories) { + super(); + this.serviceCategory = serviceCategory; + this.schema = schema; + this.hasSubCategory = hasSubCategory; + this.subCategories = subCategories; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Subcategory list. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceCategory") + private java.util.Map serviceCategory; + + /** + * Subcategory list. + * @param serviceCategory the value to set + * @return this builder + **/ + public Builder serviceCategory(java.util.Map serviceCategory) { + this.serviceCategory = serviceCategory; + this.__explicitlySet__.add("serviceCategory"); + return this; + } + /** + * Schema of a subcategory. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schema") + private String schema; + + /** + * Schema of a subcategory. + * @param schema the value to set + * @return this builder + **/ + public Builder schema(String schema) { + this.schema = schema; + this.__explicitlySet__.add("schema"); + return this; + } + /** + * Flag to identify if subComponent is present + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hasSubCategory") + private String hasSubCategory; + + /** + * Flag to identify if subComponent is present + * @param hasSubCategory the value to set + * @return this builder + **/ + public Builder hasSubCategory(String hasSubCategory) { + this.hasSubCategory = hasSubCategory; + this.__explicitlySet__.add("hasSubCategory"); + return this; + } + /** + * The sub component list for MOS Taxonomy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subCategories") + private java.util.List subCategories; + + /** + * The sub component list for MOS Taxonomy. + * @param subCategories the value to set + * @return this builder + **/ + public Builder subCategories(java.util.List subCategories) { + this.subCategories = subCategories; + this.__explicitlySet__.add("subCategories"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SubCategories build() { + SubCategories model = + new SubCategories( + this.serviceCategory, + this.schema, + this.hasSubCategory, + this.subCategories); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SubCategories model) { + if (model.wasPropertyExplicitlySet("serviceCategory")) { + this.serviceCategory(model.getServiceCategory()); + } + if (model.wasPropertyExplicitlySet("schema")) { + this.schema(model.getSchema()); + } + if (model.wasPropertyExplicitlySet("hasSubCategory")) { + this.hasSubCategory(model.getHasSubCategory()); + } + if (model.wasPropertyExplicitlySet("subCategories")) { + this.subCategories(model.getSubCategories()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Subcategory list. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceCategory") + private final java.util.Map serviceCategory; + + /** + * Subcategory list. + * @return the value + **/ + public java.util.Map getServiceCategory() { + return serviceCategory; + } + + /** + * Schema of a subcategory. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schema") + private final String schema; + + /** + * Schema of a subcategory. + * @return the value + **/ + public String getSchema() { + return schema; + } + + /** + * Flag to identify if subComponent is present + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hasSubCategory") + private final String hasSubCategory; + + /** + * Flag to identify if subComponent is present + * @return the value + **/ + public String getHasSubCategory() { + return hasSubCategory; + } + + /** + * The sub component list for MOS Taxonomy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subCategories") + private final java.util.List subCategories; + + /** + * The sub component list for MOS Taxonomy. + * @return the value + **/ + public java.util.List getSubCategories() { + return subCategories; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SubCategories("); + sb.append("super=").append(super.toString()); + sb.append("serviceCategory=").append(String.valueOf(this.serviceCategory)); + sb.append(", schema=").append(String.valueOf(this.schema)); + sb.append(", hasSubCategory=").append(String.valueOf(this.hasSubCategory)); + sb.append(", subCategories=").append(String.valueOf(this.subCategories)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SubCategories)) { + return false; + } + + SubCategories other = (SubCategories) o; + return java.util.Objects.equals(this.serviceCategory, other.serviceCategory) + && java.util.Objects.equals(this.schema, other.schema) + && java.util.Objects.equals(this.hasSubCategory, other.hasSubCategory) + && java.util.Objects.equals(this.subCategories, other.subCategories) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.serviceCategory == null ? 43 : this.serviceCategory.hashCode()); + result = (result * PRIME) + (this.schema == null ? 43 : this.schema.hashCode()); + result = + (result * PRIME) + + (this.hasSubCategory == null ? 43 : this.hasSubCategory.hashCode()); + result = + (result * PRIME) + + (this.subCategories == null ? 43 : this.subCategories.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/SubComponents.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/SubComponents.java new file mode 100644 index 00000000000..dc38b94e81a --- /dev/null +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/SubComponents.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cims.model; + +/** + * List of subcomponents under a subcategory. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181231") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = SubComponents.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SubComponents extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"subCategory", "schema"}) + public SubComponents(java.util.Map subCategory, String schema) { + super(); + this.subCategory = subCategory; + this.schema = schema; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Subcategory list. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subCategory") + private java.util.Map subCategory; + + /** + * Subcategory list. + * @param subCategory the value to set + * @return this builder + **/ + public Builder subCategory(java.util.Map subCategory) { + this.subCategory = subCategory; + this.__explicitlySet__.add("subCategory"); + return this; + } + /** + * Schema of a subcategory. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schema") + private String schema; + + /** + * Schema of a subcategory. + * @param schema the value to set + * @return this builder + **/ + public Builder schema(String schema) { + this.schema = schema; + this.__explicitlySet__.add("schema"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SubComponents build() { + SubComponents model = new SubComponents(this.subCategory, this.schema); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SubComponents model) { + if (model.wasPropertyExplicitlySet("subCategory")) { + this.subCategory(model.getSubCategory()); + } + if (model.wasPropertyExplicitlySet("schema")) { + this.schema(model.getSchema()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Subcategory list. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subCategory") + private final java.util.Map subCategory; + + /** + * Subcategory list. + * @return the value + **/ + public java.util.Map getSubCategory() { + return subCategory; + } + + /** + * Schema of a subcategory. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schema") + private final String schema; + + /** + * Schema of a subcategory. + * @return the value + **/ + public String getSchema() { + return schema; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SubComponents("); + sb.append("super=").append(super.toString()); + sb.append("subCategory=").append(String.valueOf(this.subCategory)); + sb.append(", schema=").append(String.valueOf(this.schema)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SubComponents)) { + return false; + } + + SubComponents other = (SubComponents) o; + return java.util.Objects.equals(this.subCategory, other.subCategory) + && java.util.Objects.equals(this.schema, other.schema) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.subCategory == null ? 43 : this.subCategory.hashCode()); + result = (result * PRIME) + (this.schema == null ? 43 : this.schema.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/SubscriptionInfo.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/SubscriptionInfo.java new file mode 100644 index 00000000000..412b9e3dc95 --- /dev/null +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/SubscriptionInfo.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cims.model; + +/** + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181231") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = SubscriptionInfo.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SubscriptionInfo extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"csi", "subscriptionType"}) + public SubscriptionInfo(String csi, String subscriptionType) { + super(); + this.csi = csi; + this.subscriptionType = subscriptionType; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * customer support identifier issued for a subscription + **/ + @com.fasterxml.jackson.annotation.JsonProperty("csi") + private String csi; + + /** + * customer support identifier issued for a subscription + * @param csi the value to set + * @return this builder + **/ + public Builder csi(String csi) { + this.csi = csi; + this.__explicitlySet__.add("csi"); + return this; + } + /** + * subscription type of customer which determines payment profile + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionType") + private String subscriptionType; + + /** + * subscription type of customer which determines payment profile + * @param subscriptionType the value to set + * @return this builder + **/ + public Builder subscriptionType(String subscriptionType) { + this.subscriptionType = subscriptionType; + this.__explicitlySet__.add("subscriptionType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SubscriptionInfo build() { + SubscriptionInfo model = new SubscriptionInfo(this.csi, this.subscriptionType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SubscriptionInfo model) { + if (model.wasPropertyExplicitlySet("csi")) { + this.csi(model.getCsi()); + } + if (model.wasPropertyExplicitlySet("subscriptionType")) { + this.subscriptionType(model.getSubscriptionType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * customer support identifier issued for a subscription + **/ + @com.fasterxml.jackson.annotation.JsonProperty("csi") + private final String csi; + + /** + * customer support identifier issued for a subscription + * @return the value + **/ + public String getCsi() { + return csi; + } + + /** + * subscription type of customer which determines payment profile + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionType") + private final String subscriptionType; + + /** + * subscription type of customer which determines payment profile + * @return the value + **/ + public String getSubscriptionType() { + return subscriptionType; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SubscriptionInfo("); + sb.append("super=").append(super.toString()); + sb.append("csi=").append(String.valueOf(this.csi)); + sb.append(", subscriptionType=").append(String.valueOf(this.subscriptionType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SubscriptionInfo)) { + return false; + } + + SubscriptionInfo other = (SubscriptionInfo) o; + return java.util.Objects.equals(this.csi, other.csi) + && java.util.Objects.equals(this.subscriptionType, other.subscriptionType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.csi == null ? 43 : this.csi.hashCode()); + result = + (result * PRIME) + + (this.subscriptionType == null ? 43 : this.subscriptionType.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/Ticket.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/Ticket.java index 3a95a556870..8ec2ed0f8bd 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/Ticket.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/Ticket.java @@ -135,13 +135,13 @@ public Builder description(String description) { return this; } /** - * The time when the ticket was created, in milliseconds since epoch time. + * The time when the ticket was created, in seconds since epoch time. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") private Integer timeCreated; /** - * The time when the ticket was created, in milliseconds since epoch time. + * The time when the ticket was created, in seconds since epoch time. * @param timeCreated the value to set * @return this builder **/ @@ -151,13 +151,13 @@ public Builder timeCreated(Integer timeCreated) { return this; } /** - * The time when the ticket was updated, in milliseconds since epoch time. + * The time when the ticket was updated, in seconds since epoch time. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") private Integer timeUpdated; /** - * The time when the ticket was updated, in milliseconds since epoch time. + * The time when the ticket was updated, in seconds since epoch time. * @param timeUpdated the value to set * @return this builder **/ @@ -385,13 +385,13 @@ public String getDescription() { } /** - * The time when the ticket was created, in milliseconds since epoch time. + * The time when the ticket was created, in seconds since epoch time. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") private final Integer timeCreated; /** - * The time when the ticket was created, in milliseconds since epoch time. + * The time when the ticket was created, in seconds since epoch time. * @return the value **/ public Integer getTimeCreated() { @@ -399,13 +399,13 @@ public Integer getTimeCreated() { } /** - * The time when the ticket was updated, in milliseconds since epoch time. + * The time when the ticket was updated, in seconds since epoch time. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") private final Integer timeUpdated; /** - * The time when the ticket was updated, in milliseconds since epoch time. + * The time when the ticket was updated, in seconds since epoch time. * @return the value **/ public Integer getTimeUpdated() { diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/UpdateIncident.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/UpdateIncident.java index f680ce3c3b7..0d38a5d5d1e 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/UpdateIncident.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/UpdateIncident.java @@ -38,13 +38,27 @@ public Builder ticket(UpdateTicketDetails ticket) { return this; } /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * **/ @com.fasterxml.jackson.annotation.JsonProperty("problemType") private ProblemType problemType; /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * * @param problemType the value to set * @return this builder **/ @@ -96,13 +110,27 @@ public UpdateTicketDetails getTicket() { } /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * **/ @com.fasterxml.jackson.annotation.JsonProperty("problemType") private final ProblemType problemType; /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * * @return the value **/ public ProblemType getProblemType() { diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/User.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/User.java index 9ab28532d20..fe67d6c5298 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/User.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/User.java @@ -221,13 +221,27 @@ public Builder contactEmail(String contactEmail) { return this; } /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * **/ @com.fasterxml.jackson.annotation.JsonProperty("problemType") private ProblemType problemType; /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * * @param problemType the value to set * @return this builder **/ @@ -451,13 +465,27 @@ public String getContactEmail() { } /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * **/ @com.fasterxml.jackson.annotation.JsonProperty("problemType") private final ProblemType problemType; /** - * The kind of support ticket, such as a technical support request or a limit increase request. + * The kind of support ticket (type of support request). + * For information about {@code ACCOUNT} support tickets, see + * [Creating a Billing Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm). + * For information about {@code LIMIT} support tickets, see + * [Creating a Service Limit Increase Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm). + * For information about {@code TECH} support tickets, see + * [Creating a Technical Support Request](https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm). + * * @return the value **/ public ProblemType getProblemType() { diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/ValidationResponse.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/ValidationResponse.java index ba6174f94d6..01e1f21b18d 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/model/ValidationResponse.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/model/ValidationResponse.java @@ -6,6 +6,7 @@ /** * The validation response returned when checking whether the requested user is valid. + * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -21,10 +22,12 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class ValidationResponse extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"isValidUser"}) - public ValidationResponse(Boolean isValidUser) { + @java.beans.ConstructorProperties({"isValidUser", "writePermittedUserGroupInfos"}) + public ValidationResponse( + Boolean isValidUser, java.util.List writePermittedUserGroupInfos) { super(); this.isValidUser = isValidUser; + this.writePermittedUserGroupInfos = writePermittedUserGroupInfos; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -45,12 +48,32 @@ public Builder isValidUser(Boolean isValidUser) { this.__explicitlySet__.add("isValidUser"); return this; } + /** + * Technical support type ({@code TECH}) only: Identifier and name of the support request's user group ({@code userGroupId} and {@code userGroupName}). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("writePermittedUserGroupInfos") + private java.util.List writePermittedUserGroupInfos; + + /** + * Technical support type ({@code TECH}) only: Identifier and name of the support request's user group ({@code userGroupId} and {@code userGroupName}). + * + * @param writePermittedUserGroupInfos the value to set + * @return this builder + **/ + public Builder writePermittedUserGroupInfos( + java.util.List writePermittedUserGroupInfos) { + this.writePermittedUserGroupInfos = writePermittedUserGroupInfos; + this.__explicitlySet__.add("writePermittedUserGroupInfos"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public ValidationResponse build() { - ValidationResponse model = new ValidationResponse(this.isValidUser); + ValidationResponse model = + new ValidationResponse(this.isValidUser, this.writePermittedUserGroupInfos); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -62,6 +85,9 @@ public Builder copy(ValidationResponse model) { if (model.wasPropertyExplicitlySet("isValidUser")) { this.isValidUser(model.getIsValidUser()); } + if (model.wasPropertyExplicitlySet("writePermittedUserGroupInfos")) { + this.writePermittedUserGroupInfos(model.getWritePermittedUserGroupInfos()); + } return this; } } @@ -91,6 +117,22 @@ public Boolean getIsValidUser() { return isValidUser; } + /** + * Technical support type ({@code TECH}) only: Identifier and name of the support request's user group ({@code userGroupId} and {@code userGroupName}). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("writePermittedUserGroupInfos") + private final java.util.List writePermittedUserGroupInfos; + + /** + * Technical support type ({@code TECH}) only: Identifier and name of the support request's user group ({@code userGroupId} and {@code userGroupName}). + * + * @return the value + **/ + public java.util.List getWritePermittedUserGroupInfos() { + return writePermittedUserGroupInfos; + } + @Override public String toString() { return this.toString(true); @@ -106,6 +148,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("ValidationResponse("); sb.append("super=").append(super.toString()); sb.append("isValidUser=").append(String.valueOf(this.isValidUser)); + sb.append(", writePermittedUserGroupInfos=") + .append(String.valueOf(this.writePermittedUserGroupInfos)); sb.append(")"); return sb.toString(); } @@ -120,7 +164,10 @@ public boolean equals(Object o) { } ValidationResponse other = (ValidationResponse) o; - return java.util.Objects.equals(this.isValidUser, other.isValidUser) && super.equals(other); + return java.util.Objects.equals(this.isValidUser, other.isValidUser) + && java.util.Objects.equals( + this.writePermittedUserGroupInfos, other.writePermittedUserGroupInfos) + && super.equals(other); } @Override @@ -128,6 +175,11 @@ public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.isValidUser == null ? 43 : this.isValidUser.hashCode()); + result = + (result * PRIME) + + (this.writePermittedUserGroupInfos == null + ? 43 + : this.writePermittedUserGroupInfos.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/requests/CreateIncidentRequest.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/requests/CreateIncidentRequest.java index a9fb7ab07a0..9eb6f2677a3 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/requests/CreateIncidentRequest.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/requests/CreateIncidentRequest.java @@ -36,11 +36,15 @@ public String getOpcRequestId() { } /** * User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. + * User OCID is mandatory for OCI Users and optional for Multicloud users. + * */ private String ocid; /** * User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. + * User OCID is mandatory for OCI Users and optional for Multicloud users. + * */ public String getOcid() { return ocid; @@ -91,11 +95,15 @@ public String getIdtoken() { } /** * The OCID of identity domain. + * DomainID is mandatory if the user is part of Non Default Identity domain. + * */ private String domainid; /** * The OCID of identity domain. + * DomainID is mandatory if the user is part of Non Default Identity domain. + * */ public String getDomainid() { return domainid; @@ -151,11 +159,15 @@ public Builder opcRequestId(String opcRequestId) { /** * User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. + * User OCID is mandatory for OCI Users and optional for Multicloud users. + * */ private String ocid = null; /** * User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. + * User OCID is mandatory for OCI Users and optional for Multicloud users. + * * @param ocid the value to set * @return this builder instance */ @@ -226,11 +238,15 @@ public Builder idtoken(String idtoken) { /** * The OCID of identity domain. + * DomainID is mandatory if the user is part of Non Default Identity domain. + * */ private String domainid = null; /** * The OCID of identity domain. + * DomainID is mandatory if the user is part of Non Default Identity domain. + * * @param domainid the value to set * @return this builder instance */ diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/requests/GetCsiNumberRequest.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/requests/GetCsiNumberRequest.java deleted file mode 100644 index 96f06d21288..00000000000 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/requests/GetCsiNumberRequest.java +++ /dev/null @@ -1,421 +0,0 @@ -/** - * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. - * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. - */ -package com.oracle.bmc.cims.requests; - -import com.oracle.bmc.cims.model.*; -/** - * Example: Click here to see how to use GetCsiNumberRequest. - */ -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181231") -public class GetCsiNumberRequest extends com.oracle.bmc.requests.BmcRequest { - - /** - * Tenancy Ocid in oracle cloud Infrastructure - */ - private String tenantId; - - /** - * Tenancy Ocid in oracle cloud Infrastructure - */ - public String getTenantId() { - return tenantId; - } - /** - * Home region of the customer which is part of oracle cloud infrastructure regions - */ - private String region; - - /** - * Home region of the customer which is part of oracle cloud infrastructure regions - */ - public String getRegion() { - return region; - } - /** - * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - */ - private String opcRequestId; - - /** - * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - */ - public String getOpcRequestId() { - return opcRequestId; - } - /** - * User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. - */ - private String ocid; - - /** - * User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. - */ - public String getOcid() { - return ocid; - } - /** - * The region of the tenancy. - */ - private String homeregion; - - /** - * The region of the tenancy. - */ - public String getHomeregion() { - return homeregion; - } - /** - * Token type that determine which cloud provider the request come from. - */ - private String bearertokentype; - - /** - * Token type that determine which cloud provider the request come from. - */ - public String getBearertokentype() { - return bearertokentype; - } - /** - * Token that provided by multi cloud provider, which help to validate the email. - */ - private String bearertoken; - - /** - * Token that provided by multi cloud provider, which help to validate the email. - */ - public String getBearertoken() { - return bearertoken; - } - /** - * IdToken that provided by multi cloud provider, which help to validate the email. - */ - private String idtoken; - - /** - * IdToken that provided by multi cloud provider, which help to validate the email. - */ - public String getIdtoken() { - return idtoken; - } - /** - * The OCID of identity domain. - */ - private String domainid; - - /** - * The OCID of identity domain. - */ - public String getDomainid() { - return domainid; - } - - public static class Builder - implements com.oracle.bmc.requests.BmcRequest.Builder< - GetCsiNumberRequest, java.lang.Void> { - private com.oracle.bmc.util.internal.Consumer - invocationCallback = null; - private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; - - /** - * Tenancy Ocid in oracle cloud Infrastructure - */ - private String tenantId = null; - - /** - * Tenancy Ocid in oracle cloud Infrastructure - * @param tenantId the value to set - * @return this builder instance - */ - public Builder tenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Home region of the customer which is part of oracle cloud infrastructure regions - */ - private String region = null; - - /** - * Home region of the customer which is part of oracle cloud infrastructure regions - * @param region the value to set - * @return this builder instance - */ - public Builder region(String region) { - this.region = region; - return this; - } - - /** - * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - */ - private String opcRequestId = null; - - /** - * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - * @param opcRequestId the value to set - * @return this builder instance - */ - public Builder opcRequestId(String opcRequestId) { - this.opcRequestId = opcRequestId; - return this; - } - - /** - * User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. - */ - private String ocid = null; - - /** - * User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. - * @param ocid the value to set - * @return this builder instance - */ - public Builder ocid(String ocid) { - this.ocid = ocid; - return this; - } - - /** - * The region of the tenancy. - */ - private String homeregion = null; - - /** - * The region of the tenancy. - * @param homeregion the value to set - * @return this builder instance - */ - public Builder homeregion(String homeregion) { - this.homeregion = homeregion; - return this; - } - - /** - * Token type that determine which cloud provider the request come from. - */ - private String bearertokentype = null; - - /** - * Token type that determine which cloud provider the request come from. - * @param bearertokentype the value to set - * @return this builder instance - */ - public Builder bearertokentype(String bearertokentype) { - this.bearertokentype = bearertokentype; - return this; - } - - /** - * Token that provided by multi cloud provider, which help to validate the email. - */ - private String bearertoken = null; - - /** - * Token that provided by multi cloud provider, which help to validate the email. - * @param bearertoken the value to set - * @return this builder instance - */ - public Builder bearertoken(String bearertoken) { - this.bearertoken = bearertoken; - return this; - } - - /** - * IdToken that provided by multi cloud provider, which help to validate the email. - */ - private String idtoken = null; - - /** - * IdToken that provided by multi cloud provider, which help to validate the email. - * @param idtoken the value to set - * @return this builder instance - */ - public Builder idtoken(String idtoken) { - this.idtoken = idtoken; - return this; - } - - /** - * The OCID of identity domain. - */ - private String domainid = null; - - /** - * The OCID of identity domain. - * @param domainid the value to set - * @return this builder instance - */ - public Builder domainid(String domainid) { - this.domainid = domainid; - return this; - } - - /** - * Set the invocation callback for the request to be built. - * @param invocationCallback the invocation callback to be set for the request - * @return this builder instance - */ - public Builder invocationCallback( - com.oracle.bmc.util.internal.Consumer - invocationCallback) { - this.invocationCallback = invocationCallback; - return this; - } - - /** - * Set the retry configuration for the request to be built. - * @param retryConfiguration the retry configuration to be used for the request - * @return this builder instance - */ - public Builder retryConfiguration( - com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { - this.retryConfiguration = retryConfiguration; - return this; - } - - /** - * Copy method to populate the builder with values from the given instance. - * @return this builder instance - */ - public Builder copy(GetCsiNumberRequest o) { - tenantId(o.getTenantId()); - region(o.getRegion()); - opcRequestId(o.getOpcRequestId()); - ocid(o.getOcid()); - homeregion(o.getHomeregion()); - bearertokentype(o.getBearertokentype()); - bearertoken(o.getBearertoken()); - idtoken(o.getIdtoken()); - domainid(o.getDomainid()); - invocationCallback(o.getInvocationCallback()); - retryConfiguration(o.getRetryConfiguration()); - return this; - } - - /** - * Build the instance of GetCsiNumberRequest as configured by this builder - * - * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, - * while the method {@link Builder#buildWithoutInvocationCallback} does not. - * - * This is the preferred method to build an instance. - * - * @return instance of GetCsiNumberRequest - */ - public GetCsiNumberRequest build() { - GetCsiNumberRequest request = buildWithoutInvocationCallback(); - request.setInvocationCallback(invocationCallback); - request.setRetryConfiguration(retryConfiguration); - return request; - } - - /** - * Build the instance of GetCsiNumberRequest as configured by this builder - * - * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, - * while the method {@link Builder#build} does - * - * @return instance of GetCsiNumberRequest - */ - public GetCsiNumberRequest buildWithoutInvocationCallback() { - GetCsiNumberRequest request = new GetCsiNumberRequest(); - request.tenantId = tenantId; - request.region = region; - request.opcRequestId = opcRequestId; - request.ocid = ocid; - request.homeregion = homeregion; - request.bearertokentype = bearertokentype; - request.bearertoken = bearertoken; - request.idtoken = idtoken; - request.domainid = domainid; - return request; - // new GetCsiNumberRequest(tenantId, region, opcRequestId, ocid, homeregion, bearertokentype, bearertoken, idtoken, domainid); - } - } - - /** - * Return an instance of {@link Builder} that allows you to modify request properties. - * @return instance of {@link Builder} that allows you to modify request properties. - */ - public Builder toBuilder() { - return new Builder() - .tenantId(tenantId) - .region(region) - .opcRequestId(opcRequestId) - .ocid(ocid) - .homeregion(homeregion) - .bearertokentype(bearertokentype) - .bearertoken(bearertoken) - .idtoken(idtoken) - .domainid(domainid); - } - - /** - * Return a new builder for this request object. - * @return builder for the request object - */ - public static Builder builder() { - return new Builder(); - } - - @Override - public String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder(); - sb.append("("); - sb.append("super=").append(super.toString()); - sb.append(",tenantId=").append(String.valueOf(this.tenantId)); - sb.append(",region=").append(String.valueOf(this.region)); - sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); - sb.append(",ocid=").append(String.valueOf(this.ocid)); - sb.append(",homeregion=").append(String.valueOf(this.homeregion)); - sb.append(",bearertokentype=").append(String.valueOf(this.bearertokentype)); - sb.append(",bearertoken=").append(String.valueOf(this.bearertoken)); - sb.append(",idtoken=").append(String.valueOf(this.idtoken)); - sb.append(",domainid=").append(String.valueOf(this.domainid)); - sb.append(")"); - return sb.toString(); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (!(o instanceof GetCsiNumberRequest)) { - return false; - } - - GetCsiNumberRequest other = (GetCsiNumberRequest) o; - return super.equals(o) - && java.util.Objects.equals(this.tenantId, other.tenantId) - && java.util.Objects.equals(this.region, other.region) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) - && java.util.Objects.equals(this.ocid, other.ocid) - && java.util.Objects.equals(this.homeregion, other.homeregion) - && java.util.Objects.equals(this.bearertokentype, other.bearertokentype) - && java.util.Objects.equals(this.bearertoken, other.bearertoken) - && java.util.Objects.equals(this.idtoken, other.idtoken) - && java.util.Objects.equals(this.domainid, other.domainid); - } - - @Override - public int hashCode() { - final int PRIME = 59; - int result = super.hashCode(); - result = (result * PRIME) + (this.tenantId == null ? 43 : this.tenantId.hashCode()); - result = (result * PRIME) + (this.region == null ? 43 : this.region.hashCode()); - result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); - result = (result * PRIME) + (this.ocid == null ? 43 : this.ocid.hashCode()); - result = (result * PRIME) + (this.homeregion == null ? 43 : this.homeregion.hashCode()); - result = - (result * PRIME) - + (this.bearertokentype == null ? 43 : this.bearertokentype.hashCode()); - result = (result * PRIME) + (this.bearertoken == null ? 43 : this.bearertoken.hashCode()); - result = (result * PRIME) + (this.idtoken == null ? 43 : this.idtoken.hashCode()); - result = (result * PRIME) + (this.domainid == null ? 43 : this.domainid.hashCode()); - return result; - } -} diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/requests/GetIncidentRequest.java b/bmc-cims/src/main/java/com/oracle/bmc/cims/requests/GetIncidentRequest.java index 240a3519838..1892696b196 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/requests/GetIncidentRequest.java +++ b/bmc-cims/src/main/java/com/oracle/bmc/cims/requests/GetIncidentRequest.java @@ -22,6 +22,17 @@ public class GetIncidentRequest extends com.oracle.bmc.requests.BmcRequesthere to see how to use ListSupportedCloudRegions API. + */ + ListSupportedCloudRegionsResponse listSupportedCloudRegions( + ListSupportedCloudRegionsRequest request); + /** * Initiates the process of asset metadata synchronization with the related asset source. * @param request The request object containing the details to send diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/DiscoveryAsync.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/DiscoveryAsync.java index 5d5f9826355..46dd44849f8 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/DiscoveryAsync.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/DiscoveryAsync.java @@ -237,6 +237,23 @@ java.util.concurrent.Future listDiscoverySchedul ListDiscoverySchedulesRequest, ListDiscoverySchedulesResponse> handler); + /** + * Returns a list of supported cloud regions related to AssetSourceTypeParam. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listSupportedCloudRegions( + ListSupportedCloudRegionsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListSupportedCloudRegionsRequest, ListSupportedCloudRegionsResponse> + handler); + /** * Initiates the process of asset metadata synchronization with the related asset source. * diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/DiscoveryAsyncClient.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/DiscoveryAsyncClient.java index 2e23707af20..4ce1da06275 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/DiscoveryAsyncClient.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/DiscoveryAsyncClient.java @@ -1009,6 +1009,55 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future listSupportedCloudRegions( + ListSupportedCloudRegionsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListSupportedCloudRegionsRequest, ListSupportedCloudRegionsResponse> + handler) { + LOG.trace("Called async listSupportedCloudRegions"); + final ListSupportedCloudRegionsRequest interceptedRequest = + ListSupportedCloudRegionsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSupportedCloudRegionsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Discovery", + "ListSupportedCloudRegions", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/OCB/20220509/SupportedCloudRegionSummary/ListSupportedCloudRegions"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListSupportedCloudRegionsResponse> + transformer = + ListSupportedCloudRegionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListSupportedCloudRegionsRequest, ListSupportedCloudRegionsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListSupportedCloudRegionsRequest, + ListSupportedCloudRegionsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListSupportedCloudRegionsRequest, ListSupportedCloudRegionsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future refreshAssetSource( RefreshAssetSourceRequest request, diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/DiscoveryClient.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/DiscoveryClient.java index 8e737a4109b..681a94ed091 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/DiscoveryClient.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/DiscoveryClient.java @@ -984,6 +984,44 @@ public ListDiscoverySchedulesResponse listDiscoverySchedules( }); } + @Override + public ListSupportedCloudRegionsResponse listSupportedCloudRegions( + ListSupportedCloudRegionsRequest request) { + LOG.trace("Called listSupportedCloudRegions"); + final ListSupportedCloudRegionsRequest interceptedRequest = + ListSupportedCloudRegionsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSupportedCloudRegionsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Discovery", + "ListSupportedCloudRegions", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/OCB/20220509/SupportedCloudRegionSummary/ListSupportedCloudRegions"); + java.util.function.Function + transformer = + ListSupportedCloudRegionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public RefreshAssetSourceResponse refreshAssetSource(RefreshAssetSourceRequest request) { LOG.trace("Called refreshAssetSource"); diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/DiscoveryPaginators.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/DiscoveryPaginators.java index 05ac07dbda0..4f38eba5f16 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/DiscoveryPaginators.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/DiscoveryPaginators.java @@ -378,4 +378,123 @@ public ListDiscoverySchedulesResponse apply( } }); } + + /** + * Creates a new iterable which will iterate over the responses received from the listSupportedCloudRegions operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listSupportedCloudRegionsResponseIterator( + final ListSupportedCloudRegionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListSupportedCloudRegionsRequest.Builder, ListSupportedCloudRegionsRequest, + ListSupportedCloudRegionsResponse>( + new java.util.function.Supplier() { + @Override + public ListSupportedCloudRegionsRequest.Builder get() { + return ListSupportedCloudRegionsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListSupportedCloudRegionsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSupportedCloudRegionsRequest.Builder>, + ListSupportedCloudRegionsRequest>() { + @Override + public ListSupportedCloudRegionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSupportedCloudRegionsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSupportedCloudRegionsRequest, ListSupportedCloudRegionsResponse>() { + @Override + public ListSupportedCloudRegionsResponse apply( + ListSupportedCloudRegionsRequest request) { + return client.listSupportedCloudRegions(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.cloudbridge.model.SupportedCloudRegionSummary} objects + * contained in responses from the listSupportedCloudRegions operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.cloudbridge.model.SupportedCloudRegionSummary} objects + * contained in responses received from the service. + */ + public Iterable + listSupportedCloudRegionsRecordIterator( + final ListSupportedCloudRegionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListSupportedCloudRegionsRequest.Builder, ListSupportedCloudRegionsRequest, + ListSupportedCloudRegionsResponse, + com.oracle.bmc.cloudbridge.model.SupportedCloudRegionSummary>( + new java.util.function.Supplier() { + @Override + public ListSupportedCloudRegionsRequest.Builder get() { + return ListSupportedCloudRegionsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListSupportedCloudRegionsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSupportedCloudRegionsRequest.Builder>, + ListSupportedCloudRegionsRequest>() { + @Override + public ListSupportedCloudRegionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSupportedCloudRegionsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSupportedCloudRegionsRequest, ListSupportedCloudRegionsResponse>() { + @Override + public ListSupportedCloudRegionsResponse apply( + ListSupportedCloudRegionsRequest request) { + return client.listSupportedCloudRegions(request); + } + }, + new java.util.function.Function< + ListSupportedCloudRegionsResponse, + java.util.List< + com.oracle.bmc.cloudbridge.model.SupportedCloudRegionSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.cloudbridge.model.SupportedCloudRegionSummary> + apply(ListSupportedCloudRegionsResponse response) { + return response.getSupportedCloudRegionCollection().getItems(); + } + }); + } } diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/OcbAgentSvc.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/OcbAgentSvc.java index 2b315085f30..acb6094b990 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/OcbAgentSvc.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/OcbAgentSvc.java @@ -332,18 +332,6 @@ ChangeEnvironmentCompartmentResponse changeEnvironmentCompartment( */ UpdateEnvironmentResponse updateEnvironment(UpdateEnvironmentRequest request); - /** - * Updates the plugin. - * @param request The request object containing the details to send - * @return A response object containing details about the completed operation - * @throws BmcException when an error occurs. - * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. - * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries - * - * Example: Click here to see how to use UpdatePlugin API. - */ - UpdatePluginResponse updatePlugin(UpdatePluginRequest request); - /** * Gets the pre-configured waiters available for resources for this service. * diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/OcbAgentSvcAsync.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/OcbAgentSvcAsync.java index b9019aab76b..74fe40b3ebd 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/OcbAgentSvcAsync.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/OcbAgentSvcAsync.java @@ -405,19 +405,4 @@ java.util.concurrent.Future updateEnvironment( com.oracle.bmc.responses.AsyncHandler< UpdateEnvironmentRequest, UpdateEnvironmentResponse> handler); - - /** - * Updates the plugin. - * - * @param request The request object containing the details to send - * @param handler The request handler to invoke upon completion, may be null. - * @return A Future that can be used to get the response if no AsyncHandler was - * provided. Note, if you provide an AsyncHandler and use the Future, some - * types of responses (like java.io.InputStream) may not be able to be read in - * both places as the underlying stream may only be consumed once. - */ - java.util.concurrent.Future updatePlugin( - UpdatePluginRequest request, - com.oracle.bmc.responses.AsyncHandler - handler); } diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/OcbAgentSvcAsyncClient.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/OcbAgentSvcAsyncClient.java index df1d82178c0..5878f073f62 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/OcbAgentSvcAsyncClient.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/OcbAgentSvcAsyncClient.java @@ -1535,53 +1535,4 @@ protected void beforeRetryAction() {} return futureSupplier.apply(handlerToUse); } } - - @Override - public java.util.concurrent.Future updatePlugin( - UpdatePluginRequest request, - final com.oracle.bmc.responses.AsyncHandler - handler) { - LOG.trace("Called async updatePlugin"); - final UpdatePluginRequest interceptedRequest = - UpdatePluginConverter.interceptRequest(request); - final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - UpdatePluginConverter.fromRequest(client, interceptedRequest); - com.oracle.bmc.ServiceDetails serviceDetails = - new com.oracle.bmc.ServiceDetails( - "OcbAgentSvc", - "UpdatePlugin", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/OCB/20220509/Plugin/UpdatePlugin"); - final java.util.function.Function - transformer = - UpdatePluginConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler - handlerToUse = handler; - - java.util.function.Function< - com.oracle.bmc.responses.AsyncHandler< - UpdatePluginRequest, UpdatePluginResponse>, - java.util.concurrent.Future> - futureSupplier = - client.putFutureSupplier( - interceptedRequest, - interceptedRequest.getUpdatePluginDetails(), - ib, - transformer); - - if (this.authenticationDetailsProvider - instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { - return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - UpdatePluginRequest, UpdatePluginResponse>( - (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) - this.authenticationDetailsProvider, - handlerToUse, - futureSupplier) { - @Override - protected void beforeRetryAction() {} - }; - } else { - return futureSupplier.apply(handlerToUse); - } - } } diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/OcbAgentSvcClient.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/OcbAgentSvcClient.java index 283478dcc49..6650b762488 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/OcbAgentSvcClient.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/OcbAgentSvcClient.java @@ -1414,45 +1414,6 @@ public UpdateEnvironmentResponse updateEnvironment(UpdateEnvironmentRequest requ }); } - @Override - public UpdatePluginResponse updatePlugin(UpdatePluginRequest request) { - LOG.trace("Called updatePlugin"); - final UpdatePluginRequest interceptedRequest = - UpdatePluginConverter.interceptRequest(request); - com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - UpdatePluginConverter.fromRequest(client, interceptedRequest); - - final com.oracle.bmc.retrier.BmcGenericRetrier retrier = - com.oracle.bmc.retrier.Retriers.createPreferredRetrier( - interceptedRequest.getRetryConfiguration(), retryConfiguration, true); - com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); - com.oracle.bmc.ServiceDetails serviceDetails = - new com.oracle.bmc.ServiceDetails( - "OcbAgentSvc", - "UpdatePlugin", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/OCB/20220509/Plugin/UpdatePlugin"); - java.util.function.Function transformer = - UpdatePluginConverter.fromResponse(java.util.Optional.of(serviceDetails)); - return retrier.execute( - interceptedRequest, - retryRequest -> { - final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = - new com.oracle.bmc.retrier.TokenRefreshRetrier( - authenticationDetailsProvider); - return tokenRefreshRetrier.execute( - retryRequest, - retriedRequest -> { - javax.ws.rs.core.Response response = - client.put( - ib, - retriedRequest.getUpdatePluginDetails(), - retriedRequest); - return transformer.apply(response); - }); - }); - } - @Override public OcbAgentSvcWaiters getWaiters() { return waiters; diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/internal/http/ListSupportedCloudRegionsConverter.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/internal/http/ListSupportedCloudRegionsConverter.java new file mode 100644 index 00000000000..10338a53475 --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/internal/http/ListSupportedCloudRegionsConverter.java @@ -0,0 +1,194 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.cloudbridge.model.*; +import com.oracle.bmc.cloudbridge.requests.*; +import com.oracle.bmc.cloudbridge.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +public class ListSupportedCloudRegionsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListSupportedCloudRegionsConverter.class); + + public static com.oracle.bmc.cloudbridge.requests.ListSupportedCloudRegionsRequest + interceptRequest( + com.oracle.bmc.cloudbridge.requests.ListSupportedCloudRegionsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.cloudbridge.requests.ListSupportedCloudRegionsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20220509").path("supportedCloudRegions"); + + if (request.getAssetSourceType() != null) { + target = + target.queryParam( + "assetSourceType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAssetSourceType().getValue())); + } + + if (request.getNameContains() != null) { + target = + target.queryParam( + "nameContains", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getNameContains())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.cloudbridge.responses.ListSupportedCloudRegionsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.cloudbridge.responses.ListSupportedCloudRegionsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.cloudbridge.responses.ListSupportedCloudRegionsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.cloudbridge.responses + .ListSupportedCloudRegionsResponse>() { + @Override + public com.oracle.bmc.cloudbridge.responses + .ListSupportedCloudRegionsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.cloudbridge.responses.ListSupportedCloudRegionsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.cloudbridge.model + .SupportedCloudRegionCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.cloudbridge.model + .SupportedCloudRegionCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.cloudbridge.model + .SupportedCloudRegionCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.cloudbridge.model + .SupportedCloudRegionCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.cloudbridge.responses + .ListSupportedCloudRegionsResponse.Builder + builder = + com.oracle.bmc.cloudbridge.responses + .ListSupportedCloudRegionsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.supportedCloudRegionCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.cloudbridge.responses + .ListSupportedCloudRegionsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/Asset.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/Asset.java index 02c0c5faf3a..c029d94f5ab 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/Asset.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/Asset.java @@ -22,10 +22,18 @@ defaultImpl = Asset.class ) @com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = AwsEc2Asset.class, + name = "AWS_EC2" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = VmwareVmAsset.class, name = "VMWARE_VM" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = AwsEbsAsset.class, + name = "AWS_EBS" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = VmAsset.class, name = "VM") }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetSource.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetSource.java index 97811c6158d..2818b9c8b0d 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetSource.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetSource.java @@ -25,7 +25,8 @@ @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = VmWareAssetSource.class, name = "VMWARE" - ) + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = AwsAssetSource.class, name = "AWS") }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public class AssetSource extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetSourceCredentials.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetSourceCredentials.java index ef65478f504..3f5ddd8490a 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetSourceCredentials.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetSourceCredentials.java @@ -49,8 +49,11 @@ public Builder type(AssetSourceCredentialsType type) { } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the secret in a vault. - * If the the type of the credentials is BASIC{@code , the secret must contain the username and - * password in JSON format, which is in the form of }{ "username": "", "password": "" }. + * If the type of the credentials is {@code BASIC}, the secret must contain the username and + * password in JSON format, which is in the form of {@code { "username": "", "password": "" }}. + * If the type of the credentials is {@code API_KEY}, the secret must contain the accessKeyId and + * secretAccessKey in JSON format, + * which is in the form of {@code { "accessKeyId": "", "secretAccessKey": "" }}. * **/ @com.fasterxml.jackson.annotation.JsonProperty("secretId") @@ -58,8 +61,11 @@ public Builder type(AssetSourceCredentialsType type) { /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the secret in a vault. - * If the the type of the credentials is BASIC{@code , the secret must contain the username and - * password in JSON format, which is in the form of }{ "username": "", "password": "" }. + * If the type of the credentials is {@code BASIC}, the secret must contain the username and + * password in JSON format, which is in the form of {@code { "username": "", "password": "" }}. + * If the type of the credentials is {@code API_KEY}, the secret must contain the accessKeyId and + * secretAccessKey in JSON format, + * which is in the form of {@code { "accessKeyId": "", "secretAccessKey": "" }}. * * @param secretId the value to set * @return this builder @@ -120,8 +126,11 @@ public AssetSourceCredentialsType getType() { /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the secret in a vault. - * If the the type of the credentials is BASIC{@code , the secret must contain the username and - * password in JSON format, which is in the form of }{ "username": "", "password": "" }. + * If the type of the credentials is {@code BASIC}, the secret must contain the username and + * password in JSON format, which is in the form of {@code { "username": "", "password": "" }}. + * If the type of the credentials is {@code API_KEY}, the secret must contain the accessKeyId and + * secretAccessKey in JSON format, + * which is in the form of {@code { "accessKeyId": "", "secretAccessKey": "" }}. * **/ @com.fasterxml.jackson.annotation.JsonProperty("secretId") @@ -129,8 +138,11 @@ public AssetSourceCredentialsType getType() { /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the secret in a vault. - * If the the type of the credentials is BASIC{@code , the secret must contain the username and - * password in JSON format, which is in the form of }{ "username": "", "password": "" }. + * If the type of the credentials is {@code BASIC}, the secret must contain the username and + * password in JSON format, which is in the form of {@code { "username": "", "password": "" }}. + * If the type of the credentials is {@code API_KEY}, the secret must contain the accessKeyId and + * secretAccessKey in JSON format, + * which is in the form of {@code { "accessKeyId": "", "secretAccessKey": "" }}. * * @return the value **/ diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetSourceCredentialsType.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetSourceCredentialsType.java index a7d18fa7288..5d42ac7bd97 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetSourceCredentialsType.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetSourceCredentialsType.java @@ -10,6 +10,7 @@ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") public enum AssetSourceCredentialsType { Basic("BASIC"), + ApiKey("API_KEY"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetSourceSummary.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetSourceSummary.java index d67999caa0d..6250e3b9782 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetSourceSummary.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetSourceSummary.java @@ -25,6 +25,10 @@ @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = VmWareAssetSourceSummary.class, name = "VMWARE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = AwsAssetSourceSummary.class, + name = "AWS" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetSourceType.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetSourceType.java index 241530aaacf..fd5c9fbeb32 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetSourceType.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetSourceType.java @@ -10,6 +10,7 @@ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") public enum AssetSourceType { Vmware("VMWARE"), + Aws("AWS"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetType.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetType.java index 82d6df793f7..1e043cb7602 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetType.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AssetType.java @@ -11,6 +11,8 @@ public enum AssetType { VmwareVm("VMWARE_VM"), Vm("VM"), + AwsEc2("AWS_EC2"), + AwsEbs("AWS_EBS"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AwsAssetSource.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AwsAssetSource.java new file mode 100644 index 00000000000..14e5ae696b4 --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AwsAssetSource.java @@ -0,0 +1,585 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * AWS asset source. Used for discovery of EC2 instances and EBS volumes registered for the AWS account. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = AwsAssetSource.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AwsAssetSource extends AssetSource { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("environmentId") + private String environmentId; + + public Builder environmentId(String environmentId) { + this.environmentId = environmentId; + this.__explicitlySet__.add("environmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("inventoryId") + private String inventoryId; + + public Builder inventoryId(String inventoryId) { + this.inventoryId = inventoryId; + this.__explicitlySet__.add("inventoryId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("assetsCompartmentId") + private String assetsCompartmentId; + + public Builder assetsCompartmentId(String assetsCompartmentId) { + this.assetsCompartmentId = assetsCompartmentId; + this.__explicitlySet__.add("assetsCompartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("discoveryScheduleId") + private String discoveryScheduleId; + + public Builder discoveryScheduleId(String discoveryScheduleId) { + this.discoveryScheduleId = discoveryScheduleId; + this.__explicitlySet__.add("discoveryScheduleId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private AssetSourceLifecycleState lifecycleState; + + public Builder lifecycleState(AssetSourceLifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("discoveryCredentials") + private AssetSourceCredentials discoveryCredentials; + + public Builder discoveryCredentials(AssetSourceCredentials discoveryCredentials) { + this.discoveryCredentials = discoveryCredentials; + this.__explicitlySet__.add("discoveryCredentials"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("replicationCredentials") + private AssetSourceCredentials replicationCredentials; + + public Builder replicationCredentials(AssetSourceCredentials replicationCredentials) { + this.replicationCredentials = replicationCredentials; + this.__explicitlySet__.add("replicationCredentials"); + return this; + } + /** + * AWS region information, from where the resources are discovered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("awsRegion") + private String awsRegion; + + /** + * AWS region information, from where the resources are discovered. + * @param awsRegion the value to set + * @return this builder + **/ + public Builder awsRegion(String awsRegion) { + this.awsRegion = awsRegion; + this.__explicitlySet__.add("awsRegion"); + return this; + } + /** + * The key of customer's aws account to be discovered/migrated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("awsAccountKey") + private String awsAccountKey; + + /** + * The key of customer's aws account to be discovered/migrated. + * @param awsAccountKey the value to set + * @return this builder + **/ + public Builder awsAccountKey(String awsAccountKey) { + this.awsAccountKey = awsAccountKey; + this.__explicitlySet__.add("awsAccountKey"); + return this; + } + /** + * Flag indicating whether historical metrics are collected for assets, originating from this asset source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areHistoricalMetricsCollected") + private Boolean areHistoricalMetricsCollected; + + /** + * Flag indicating whether historical metrics are collected for assets, originating from this asset source. + * @param areHistoricalMetricsCollected the value to set + * @return this builder + **/ + public Builder areHistoricalMetricsCollected(Boolean areHistoricalMetricsCollected) { + this.areHistoricalMetricsCollected = areHistoricalMetricsCollected; + this.__explicitlySet__.add("areHistoricalMetricsCollected"); + return this; + } + /** + * Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areRealtimeMetricsCollected") + private Boolean areRealtimeMetricsCollected; + + /** + * Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + * @param areRealtimeMetricsCollected the value to set + * @return this builder + **/ + public Builder areRealtimeMetricsCollected(Boolean areRealtimeMetricsCollected) { + this.areRealtimeMetricsCollected = areRealtimeMetricsCollected; + this.__explicitlySet__.add("areRealtimeMetricsCollected"); + return this; + } + /** + * Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCostInformationCollected") + private Boolean isCostInformationCollected; + + /** + * Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + * @param isCostInformationCollected the value to set + * @return this builder + **/ + public Builder isCostInformationCollected(Boolean isCostInformationCollected) { + this.isCostInformationCollected = isCostInformationCollected; + this.__explicitlySet__.add("isCostInformationCollected"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AwsAssetSource build() { + AwsAssetSource model = + new AwsAssetSource( + this.id, + this.compartmentId, + this.displayName, + this.environmentId, + this.inventoryId, + this.assetsCompartmentId, + this.discoveryScheduleId, + this.lifecycleState, + this.lifecycleDetails, + this.timeCreated, + this.timeUpdated, + this.freeformTags, + this.definedTags, + this.systemTags, + this.discoveryCredentials, + this.replicationCredentials, + this.awsRegion, + this.awsAccountKey, + this.areHistoricalMetricsCollected, + this.areRealtimeMetricsCollected, + this.isCostInformationCollected); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AwsAssetSource model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("environmentId")) { + this.environmentId(model.getEnvironmentId()); + } + if (model.wasPropertyExplicitlySet("inventoryId")) { + this.inventoryId(model.getInventoryId()); + } + if (model.wasPropertyExplicitlySet("assetsCompartmentId")) { + this.assetsCompartmentId(model.getAssetsCompartmentId()); + } + if (model.wasPropertyExplicitlySet("discoveryScheduleId")) { + this.discoveryScheduleId(model.getDiscoveryScheduleId()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("discoveryCredentials")) { + this.discoveryCredentials(model.getDiscoveryCredentials()); + } + if (model.wasPropertyExplicitlySet("replicationCredentials")) { + this.replicationCredentials(model.getReplicationCredentials()); + } + if (model.wasPropertyExplicitlySet("awsRegion")) { + this.awsRegion(model.getAwsRegion()); + } + if (model.wasPropertyExplicitlySet("awsAccountKey")) { + this.awsAccountKey(model.getAwsAccountKey()); + } + if (model.wasPropertyExplicitlySet("areHistoricalMetricsCollected")) { + this.areHistoricalMetricsCollected(model.getAreHistoricalMetricsCollected()); + } + if (model.wasPropertyExplicitlySet("areRealtimeMetricsCollected")) { + this.areRealtimeMetricsCollected(model.getAreRealtimeMetricsCollected()); + } + if (model.wasPropertyExplicitlySet("isCostInformationCollected")) { + this.isCostInformationCollected(model.getIsCostInformationCollected()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public AwsAssetSource( + String id, + String compartmentId, + String displayName, + String environmentId, + String inventoryId, + String assetsCompartmentId, + String discoveryScheduleId, + AssetSourceLifecycleState lifecycleState, + String lifecycleDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + AssetSourceCredentials discoveryCredentials, + AssetSourceCredentials replicationCredentials, + String awsRegion, + String awsAccountKey, + Boolean areHistoricalMetricsCollected, + Boolean areRealtimeMetricsCollected, + Boolean isCostInformationCollected) { + super( + id, + compartmentId, + displayName, + environmentId, + inventoryId, + assetsCompartmentId, + discoveryScheduleId, + lifecycleState, + lifecycleDetails, + timeCreated, + timeUpdated, + freeformTags, + definedTags, + systemTags); + this.discoveryCredentials = discoveryCredentials; + this.replicationCredentials = replicationCredentials; + this.awsRegion = awsRegion; + this.awsAccountKey = awsAccountKey; + this.areHistoricalMetricsCollected = areHistoricalMetricsCollected; + this.areRealtimeMetricsCollected = areRealtimeMetricsCollected; + this.isCostInformationCollected = isCostInformationCollected; + } + + @com.fasterxml.jackson.annotation.JsonProperty("discoveryCredentials") + private final AssetSourceCredentials discoveryCredentials; + + public AssetSourceCredentials getDiscoveryCredentials() { + return discoveryCredentials; + } + + @com.fasterxml.jackson.annotation.JsonProperty("replicationCredentials") + private final AssetSourceCredentials replicationCredentials; + + public AssetSourceCredentials getReplicationCredentials() { + return replicationCredentials; + } + + /** + * AWS region information, from where the resources are discovered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("awsRegion") + private final String awsRegion; + + /** + * AWS region information, from where the resources are discovered. + * @return the value + **/ + public String getAwsRegion() { + return awsRegion; + } + + /** + * The key of customer's aws account to be discovered/migrated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("awsAccountKey") + private final String awsAccountKey; + + /** + * The key of customer's aws account to be discovered/migrated. + * @return the value + **/ + public String getAwsAccountKey() { + return awsAccountKey; + } + + /** + * Flag indicating whether historical metrics are collected for assets, originating from this asset source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areHistoricalMetricsCollected") + private final Boolean areHistoricalMetricsCollected; + + /** + * Flag indicating whether historical metrics are collected for assets, originating from this asset source. + * @return the value + **/ + public Boolean getAreHistoricalMetricsCollected() { + return areHistoricalMetricsCollected; + } + + /** + * Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areRealtimeMetricsCollected") + private final Boolean areRealtimeMetricsCollected; + + /** + * Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + * @return the value + **/ + public Boolean getAreRealtimeMetricsCollected() { + return areRealtimeMetricsCollected; + } + + /** + * Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCostInformationCollected") + private final Boolean isCostInformationCollected; + + /** + * Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + * @return the value + **/ + public Boolean getIsCostInformationCollected() { + return isCostInformationCollected; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AwsAssetSource("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", discoveryCredentials=").append(String.valueOf(this.discoveryCredentials)); + sb.append(", replicationCredentials=").append(String.valueOf(this.replicationCredentials)); + sb.append(", awsRegion=").append(String.valueOf(this.awsRegion)); + sb.append(", awsAccountKey=").append(String.valueOf(this.awsAccountKey)); + sb.append(", areHistoricalMetricsCollected=") + .append(String.valueOf(this.areHistoricalMetricsCollected)); + sb.append(", areRealtimeMetricsCollected=") + .append(String.valueOf(this.areRealtimeMetricsCollected)); + sb.append(", isCostInformationCollected=") + .append(String.valueOf(this.isCostInformationCollected)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AwsAssetSource)) { + return false; + } + + AwsAssetSource other = (AwsAssetSource) o; + return java.util.Objects.equals(this.discoveryCredentials, other.discoveryCredentials) + && java.util.Objects.equals( + this.replicationCredentials, other.replicationCredentials) + && java.util.Objects.equals(this.awsRegion, other.awsRegion) + && java.util.Objects.equals(this.awsAccountKey, other.awsAccountKey) + && java.util.Objects.equals( + this.areHistoricalMetricsCollected, other.areHistoricalMetricsCollected) + && java.util.Objects.equals( + this.areRealtimeMetricsCollected, other.areRealtimeMetricsCollected) + && java.util.Objects.equals( + this.isCostInformationCollected, other.isCostInformationCollected) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.discoveryCredentials == null + ? 43 + : this.discoveryCredentials.hashCode()); + result = + (result * PRIME) + + (this.replicationCredentials == null + ? 43 + : this.replicationCredentials.hashCode()); + result = (result * PRIME) + (this.awsRegion == null ? 43 : this.awsRegion.hashCode()); + result = + (result * PRIME) + + (this.awsAccountKey == null ? 43 : this.awsAccountKey.hashCode()); + result = + (result * PRIME) + + (this.areHistoricalMetricsCollected == null + ? 43 + : this.areHistoricalMetricsCollected.hashCode()); + result = + (result * PRIME) + + (this.areRealtimeMetricsCollected == null + ? 43 + : this.areRealtimeMetricsCollected.hashCode()); + result = + (result * PRIME) + + (this.isCostInformationCollected == null + ? 43 + : this.isCostInformationCollected.hashCode()); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AwsAssetSourceSummary.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AwsAssetSourceSummary.java new file mode 100644 index 00000000000..9fed6af59de --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AwsAssetSourceSummary.java @@ -0,0 +1,377 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * Summary of an AWS asset source provided in the list. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AwsAssetSourceSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AwsAssetSourceSummary extends AssetSourceSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("environmentId") + private String environmentId; + + public Builder environmentId(String environmentId) { + this.environmentId = environmentId; + this.__explicitlySet__.add("environmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private AssetSourceLifecycleState lifecycleState; + + public Builder lifecycleState(AssetSourceLifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("inventoryId") + private String inventoryId; + + public Builder inventoryId(String inventoryId) { + this.inventoryId = inventoryId; + this.__explicitlySet__.add("inventoryId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("assetsCompartmentId") + private String assetsCompartmentId; + + public Builder assetsCompartmentId(String assetsCompartmentId) { + this.assetsCompartmentId = assetsCompartmentId; + this.__explicitlySet__.add("assetsCompartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * AWS region information, from where the resources are discovered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("awsRegion") + private String awsRegion; + + /** + * AWS region information, from where the resources are discovered. + * @param awsRegion the value to set + * @return this builder + **/ + public Builder awsRegion(String awsRegion) { + this.awsRegion = awsRegion; + this.__explicitlySet__.add("awsRegion"); + return this; + } + /** + * The key of customer's aws account to be discovered/migrated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("awsAccountKey") + private String awsAccountKey; + + /** + * The key of customer's aws account to be discovered/migrated. + * @param awsAccountKey the value to set + * @return this builder + **/ + public Builder awsAccountKey(String awsAccountKey) { + this.awsAccountKey = awsAccountKey; + this.__explicitlySet__.add("awsAccountKey"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AwsAssetSourceSummary build() { + AwsAssetSourceSummary model = + new AwsAssetSourceSummary( + this.id, + this.compartmentId, + this.environmentId, + this.displayName, + this.lifecycleState, + this.lifecycleDetails, + this.inventoryId, + this.assetsCompartmentId, + this.timeCreated, + this.timeUpdated, + this.freeformTags, + this.definedTags, + this.systemTags, + this.awsRegion, + this.awsAccountKey); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AwsAssetSourceSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("environmentId")) { + this.environmentId(model.getEnvironmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("inventoryId")) { + this.inventoryId(model.getInventoryId()); + } + if (model.wasPropertyExplicitlySet("assetsCompartmentId")) { + this.assetsCompartmentId(model.getAssetsCompartmentId()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("awsRegion")) { + this.awsRegion(model.getAwsRegion()); + } + if (model.wasPropertyExplicitlySet("awsAccountKey")) { + this.awsAccountKey(model.getAwsAccountKey()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public AwsAssetSourceSummary( + String id, + String compartmentId, + String environmentId, + String displayName, + AssetSourceLifecycleState lifecycleState, + String lifecycleDetails, + String inventoryId, + String assetsCompartmentId, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + String awsRegion, + String awsAccountKey) { + super( + id, + compartmentId, + environmentId, + displayName, + lifecycleState, + lifecycleDetails, + inventoryId, + assetsCompartmentId, + timeCreated, + timeUpdated, + freeformTags, + definedTags, + systemTags); + this.awsRegion = awsRegion; + this.awsAccountKey = awsAccountKey; + } + + /** + * AWS region information, from where the resources are discovered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("awsRegion") + private final String awsRegion; + + /** + * AWS region information, from where the resources are discovered. + * @return the value + **/ + public String getAwsRegion() { + return awsRegion; + } + + /** + * The key of customer's aws account to be discovered/migrated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("awsAccountKey") + private final String awsAccountKey; + + /** + * The key of customer's aws account to be discovered/migrated. + * @return the value + **/ + public String getAwsAccountKey() { + return awsAccountKey; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AwsAssetSourceSummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", awsRegion=").append(String.valueOf(this.awsRegion)); + sb.append(", awsAccountKey=").append(String.valueOf(this.awsAccountKey)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AwsAssetSourceSummary)) { + return false; + } + + AwsAssetSourceSummary other = (AwsAssetSourceSummary) o; + return java.util.Objects.equals(this.awsRegion, other.awsRegion) + && java.util.Objects.equals(this.awsAccountKey, other.awsAccountKey) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.awsRegion == null ? 43 : this.awsRegion.hashCode()); + result = + (result * PRIME) + + (this.awsAccountKey == null ? 43 : this.awsAccountKey.hashCode()); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AwsEbsAsset.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AwsEbsAsset.java new file mode 100644 index 00000000000..71edd6a52bb --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AwsEbsAsset.java @@ -0,0 +1,319 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * AWS EBS type of asset. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = AwsEbsAsset.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "assetType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AwsEbsAsset extends Asset { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("inventoryId") + private String inventoryId; + + public Builder inventoryId(String inventoryId) { + this.inventoryId = inventoryId; + this.__explicitlySet__.add("inventoryId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("sourceKey") + private String sourceKey; + + public Builder sourceKey(String sourceKey) { + this.sourceKey = sourceKey; + this.__explicitlySet__.add("sourceKey"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("externalAssetKey") + private String externalAssetKey; + + public Builder externalAssetKey(String externalAssetKey) { + this.externalAssetKey = externalAssetKey; + this.__explicitlySet__.add("externalAssetKey"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("assetSourceIds") + private java.util.List assetSourceIds; + + public Builder assetSourceIds(java.util.List assetSourceIds) { + this.assetSourceIds = assetSourceIds; + this.__explicitlySet__.add("assetSourceIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("awsEbs") + private AwsEbsProperties awsEbs; + + public Builder awsEbs(AwsEbsProperties awsEbs) { + this.awsEbs = awsEbs; + this.__explicitlySet__.add("awsEbs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AwsEbsAsset build() { + AwsEbsAsset model = + new AwsEbsAsset( + this.displayName, + this.inventoryId, + this.id, + this.compartmentId, + this.sourceKey, + this.externalAssetKey, + this.timeCreated, + this.timeUpdated, + this.assetSourceIds, + this.lifecycleState, + this.freeformTags, + this.definedTags, + this.systemTags, + this.awsEbs); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AwsEbsAsset model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("inventoryId")) { + this.inventoryId(model.getInventoryId()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("sourceKey")) { + this.sourceKey(model.getSourceKey()); + } + if (model.wasPropertyExplicitlySet("externalAssetKey")) { + this.externalAssetKey(model.getExternalAssetKey()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("assetSourceIds")) { + this.assetSourceIds(model.getAssetSourceIds()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("awsEbs")) { + this.awsEbs(model.getAwsEbs()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public AwsEbsAsset( + String displayName, + String inventoryId, + String id, + String compartmentId, + String sourceKey, + String externalAssetKey, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.List assetSourceIds, + LifecycleState lifecycleState, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + AwsEbsProperties awsEbs) { + super( + displayName, + inventoryId, + id, + compartmentId, + sourceKey, + externalAssetKey, + timeCreated, + timeUpdated, + assetSourceIds, + lifecycleState, + freeformTags, + definedTags, + systemTags); + this.awsEbs = awsEbs; + } + + @com.fasterxml.jackson.annotation.JsonProperty("awsEbs") + private final AwsEbsProperties awsEbs; + + public AwsEbsProperties getAwsEbs() { + return awsEbs; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AwsEbsAsset("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", awsEbs=").append(String.valueOf(this.awsEbs)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AwsEbsAsset)) { + return false; + } + + AwsEbsAsset other = (AwsEbsAsset) o; + return java.util.Objects.equals(this.awsEbs, other.awsEbs) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.awsEbs == null ? 43 : this.awsEbs.hashCode()); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AwsEbsProperties.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AwsEbsProperties.java new file mode 100644 index 00000000000..6e7824b6567 --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AwsEbsProperties.java @@ -0,0 +1,544 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * AWS EBS volume related properties. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = AwsEbsProperties.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AwsEbsProperties extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "attachments", + "availabilityZone", + "isEncrypted", + "iops", + "isMultiAttachEnabled", + "sizeInGiBs", + "status", + "tags", + "throughput", + "volumeKey", + "volumeType" + }) + public AwsEbsProperties( + java.util.List attachments, + String availabilityZone, + Boolean isEncrypted, + Integer iops, + Boolean isMultiAttachEnabled, + Integer sizeInGiBs, + String status, + java.util.List tags, + Integer throughput, + String volumeKey, + String volumeType) { + super(); + this.attachments = attachments; + this.availabilityZone = availabilityZone; + this.isEncrypted = isEncrypted; + this.iops = iops; + this.isMultiAttachEnabled = isMultiAttachEnabled; + this.sizeInGiBs = sizeInGiBs; + this.status = status; + this.tags = tags; + this.throughput = throughput; + this.volumeKey = volumeKey; + this.volumeType = volumeType; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Information about the volume attachments. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attachments") + private java.util.List attachments; + + /** + * Information about the volume attachments. + * @param attachments the value to set + * @return this builder + **/ + public Builder attachments(java.util.List attachments) { + this.attachments = attachments; + this.__explicitlySet__.add("attachments"); + return this; + } + /** + * The Availability Zone for the volume. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityZone") + private String availabilityZone; + + /** + * The Availability Zone for the volume. + * @param availabilityZone the value to set + * @return this builder + **/ + public Builder availabilityZone(String availabilityZone) { + this.availabilityZone = availabilityZone; + this.__explicitlySet__.add("availabilityZone"); + return this; + } + /** + * Indicates whether the volume is encrypted. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEncrypted") + private Boolean isEncrypted; + + /** + * Indicates whether the volume is encrypted. + * @param isEncrypted the value to set + * @return this builder + **/ + public Builder isEncrypted(Boolean isEncrypted) { + this.isEncrypted = isEncrypted; + this.__explicitlySet__.add("isEncrypted"); + return this; + } + /** + * The number of I/O operations per second. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("iops") + private Integer iops; + + /** + * The number of I/O operations per second. + * @param iops the value to set + * @return this builder + **/ + public Builder iops(Integer iops) { + this.iops = iops; + this.__explicitlySet__.add("iops"); + return this; + } + /** + * Indicates whether Amazon EBS Multi-Attach is enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMultiAttachEnabled") + private Boolean isMultiAttachEnabled; + + /** + * Indicates whether Amazon EBS Multi-Attach is enabled. + * @param isMultiAttachEnabled the value to set + * @return this builder + **/ + public Builder isMultiAttachEnabled(Boolean isMultiAttachEnabled) { + this.isMultiAttachEnabled = isMultiAttachEnabled; + this.__explicitlySet__.add("isMultiAttachEnabled"); + return this; + } + /** + * The size of the volume, in GiBs. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sizeInGiBs") + private Integer sizeInGiBs; + + /** + * The size of the volume, in GiBs. + * @param sizeInGiBs the value to set + * @return this builder + **/ + public Builder sizeInGiBs(Integer sizeInGiBs) { + this.sizeInGiBs = sizeInGiBs; + this.__explicitlySet__.add("sizeInGiBs"); + return this; + } + /** + * The volume state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private String status; + + /** + * The volume state. + * @param status the value to set + * @return this builder + **/ + public Builder status(String status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * Any tags assigned to the volume. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tags") + private java.util.List tags; + + /** + * Any tags assigned to the volume. + * @param tags the value to set + * @return this builder + **/ + public Builder tags(java.util.List tags) { + this.tags = tags; + this.__explicitlySet__.add("tags"); + return this; + } + /** + * The throughput that the volume supports, in MiB/s. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("throughput") + private Integer throughput; + + /** + * The throughput that the volume supports, in MiB/s. + * @param throughput the value to set + * @return this builder + **/ + public Builder throughput(Integer throughput) { + this.throughput = throughput; + this.__explicitlySet__.add("throughput"); + return this; + } + /** + * The ID of the volume. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("volumeKey") + private String volumeKey; + + /** + * The ID of the volume. + * @param volumeKey the value to set + * @return this builder + **/ + public Builder volumeKey(String volumeKey) { + this.volumeKey = volumeKey; + this.__explicitlySet__.add("volumeKey"); + return this; + } + /** + * The volume type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("volumeType") + private String volumeType; + + /** + * The volume type. + * @param volumeType the value to set + * @return this builder + **/ + public Builder volumeType(String volumeType) { + this.volumeType = volumeType; + this.__explicitlySet__.add("volumeType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AwsEbsProperties build() { + AwsEbsProperties model = + new AwsEbsProperties( + this.attachments, + this.availabilityZone, + this.isEncrypted, + this.iops, + this.isMultiAttachEnabled, + this.sizeInGiBs, + this.status, + this.tags, + this.throughput, + this.volumeKey, + this.volumeType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AwsEbsProperties model) { + if (model.wasPropertyExplicitlySet("attachments")) { + this.attachments(model.getAttachments()); + } + if (model.wasPropertyExplicitlySet("availabilityZone")) { + this.availabilityZone(model.getAvailabilityZone()); + } + if (model.wasPropertyExplicitlySet("isEncrypted")) { + this.isEncrypted(model.getIsEncrypted()); + } + if (model.wasPropertyExplicitlySet("iops")) { + this.iops(model.getIops()); + } + if (model.wasPropertyExplicitlySet("isMultiAttachEnabled")) { + this.isMultiAttachEnabled(model.getIsMultiAttachEnabled()); + } + if (model.wasPropertyExplicitlySet("sizeInGiBs")) { + this.sizeInGiBs(model.getSizeInGiBs()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("tags")) { + this.tags(model.getTags()); + } + if (model.wasPropertyExplicitlySet("throughput")) { + this.throughput(model.getThroughput()); + } + if (model.wasPropertyExplicitlySet("volumeKey")) { + this.volumeKey(model.getVolumeKey()); + } + if (model.wasPropertyExplicitlySet("volumeType")) { + this.volumeType(model.getVolumeType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Information about the volume attachments. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attachments") + private final java.util.List attachments; + + /** + * Information about the volume attachments. + * @return the value + **/ + public java.util.List getAttachments() { + return attachments; + } + + /** + * The Availability Zone for the volume. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityZone") + private final String availabilityZone; + + /** + * The Availability Zone for the volume. + * @return the value + **/ + public String getAvailabilityZone() { + return availabilityZone; + } + + /** + * Indicates whether the volume is encrypted. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEncrypted") + private final Boolean isEncrypted; + + /** + * Indicates whether the volume is encrypted. + * @return the value + **/ + public Boolean getIsEncrypted() { + return isEncrypted; + } + + /** + * The number of I/O operations per second. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("iops") + private final Integer iops; + + /** + * The number of I/O operations per second. + * @return the value + **/ + public Integer getIops() { + return iops; + } + + /** + * Indicates whether Amazon EBS Multi-Attach is enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMultiAttachEnabled") + private final Boolean isMultiAttachEnabled; + + /** + * Indicates whether Amazon EBS Multi-Attach is enabled. + * @return the value + **/ + public Boolean getIsMultiAttachEnabled() { + return isMultiAttachEnabled; + } + + /** + * The size of the volume, in GiBs. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sizeInGiBs") + private final Integer sizeInGiBs; + + /** + * The size of the volume, in GiBs. + * @return the value + **/ + public Integer getSizeInGiBs() { + return sizeInGiBs; + } + + /** + * The volume state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final String status; + + /** + * The volume state. + * @return the value + **/ + public String getStatus() { + return status; + } + + /** + * Any tags assigned to the volume. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tags") + private final java.util.List tags; + + /** + * Any tags assigned to the volume. + * @return the value + **/ + public java.util.List getTags() { + return tags; + } + + /** + * The throughput that the volume supports, in MiB/s. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("throughput") + private final Integer throughput; + + /** + * The throughput that the volume supports, in MiB/s. + * @return the value + **/ + public Integer getThroughput() { + return throughput; + } + + /** + * The ID of the volume. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("volumeKey") + private final String volumeKey; + + /** + * The ID of the volume. + * @return the value + **/ + public String getVolumeKey() { + return volumeKey; + } + + /** + * The volume type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("volumeType") + private final String volumeType; + + /** + * The volume type. + * @return the value + **/ + public String getVolumeType() { + return volumeType; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AwsEbsProperties("); + sb.append("super=").append(super.toString()); + sb.append("attachments=").append(String.valueOf(this.attachments)); + sb.append(", availabilityZone=").append(String.valueOf(this.availabilityZone)); + sb.append(", isEncrypted=").append(String.valueOf(this.isEncrypted)); + sb.append(", iops=").append(String.valueOf(this.iops)); + sb.append(", isMultiAttachEnabled=").append(String.valueOf(this.isMultiAttachEnabled)); + sb.append(", sizeInGiBs=").append(String.valueOf(this.sizeInGiBs)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", tags=").append(String.valueOf(this.tags)); + sb.append(", throughput=").append(String.valueOf(this.throughput)); + sb.append(", volumeKey=").append(String.valueOf(this.volumeKey)); + sb.append(", volumeType=").append(String.valueOf(this.volumeType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AwsEbsProperties)) { + return false; + } + + AwsEbsProperties other = (AwsEbsProperties) o; + return java.util.Objects.equals(this.attachments, other.attachments) + && java.util.Objects.equals(this.availabilityZone, other.availabilityZone) + && java.util.Objects.equals(this.isEncrypted, other.isEncrypted) + && java.util.Objects.equals(this.iops, other.iops) + && java.util.Objects.equals(this.isMultiAttachEnabled, other.isMultiAttachEnabled) + && java.util.Objects.equals(this.sizeInGiBs, other.sizeInGiBs) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.tags, other.tags) + && java.util.Objects.equals(this.throughput, other.throughput) + && java.util.Objects.equals(this.volumeKey, other.volumeKey) + && java.util.Objects.equals(this.volumeType, other.volumeType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.attachments == null ? 43 : this.attachments.hashCode()); + result = + (result * PRIME) + + (this.availabilityZone == null ? 43 : this.availabilityZone.hashCode()); + result = (result * PRIME) + (this.isEncrypted == null ? 43 : this.isEncrypted.hashCode()); + result = (result * PRIME) + (this.iops == null ? 43 : this.iops.hashCode()); + result = + (result * PRIME) + + (this.isMultiAttachEnabled == null + ? 43 + : this.isMultiAttachEnabled.hashCode()); + result = (result * PRIME) + (this.sizeInGiBs == null ? 43 : this.sizeInGiBs.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.tags == null ? 43 : this.tags.hashCode()); + result = (result * PRIME) + (this.throughput == null ? 43 : this.throughput.hashCode()); + result = (result * PRIME) + (this.volumeKey == null ? 43 : this.volumeKey.hashCode()); + result = (result * PRIME) + (this.volumeType == null ? 43 : this.volumeType.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AwsEc2Asset.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AwsEc2Asset.java new file mode 100644 index 00000000000..bb163ef40dc --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AwsEc2Asset.java @@ -0,0 +1,425 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * AWS EC2 type of asset. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = AwsEc2Asset.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "assetType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AwsEc2Asset extends Asset { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("inventoryId") + private String inventoryId; + + public Builder inventoryId(String inventoryId) { + this.inventoryId = inventoryId; + this.__explicitlySet__.add("inventoryId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("sourceKey") + private String sourceKey; + + public Builder sourceKey(String sourceKey) { + this.sourceKey = sourceKey; + this.__explicitlySet__.add("sourceKey"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("externalAssetKey") + private String externalAssetKey; + + public Builder externalAssetKey(String externalAssetKey) { + this.externalAssetKey = externalAssetKey; + this.__explicitlySet__.add("externalAssetKey"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("assetSourceIds") + private java.util.List assetSourceIds; + + public Builder assetSourceIds(java.util.List assetSourceIds) { + this.assetSourceIds = assetSourceIds; + this.__explicitlySet__.add("assetSourceIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compute") + private ComputeProperties compute; + + public Builder compute(ComputeProperties compute) { + this.compute = compute; + this.__explicitlySet__.add("compute"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vm") + private VmProperties vm; + + public Builder vm(VmProperties vm) { + this.vm = vm; + this.__explicitlySet__.add("vm"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("awsEc2") + private AwsEc2Properties awsEc2; + + public Builder awsEc2(AwsEc2Properties awsEc2) { + this.awsEc2 = awsEc2; + this.__explicitlySet__.add("awsEc2"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("awsEc2Cost") + private MonthlyCostSummary awsEc2Cost; + + public Builder awsEc2Cost(MonthlyCostSummary awsEc2Cost) { + this.awsEc2Cost = awsEc2Cost; + this.__explicitlySet__.add("awsEc2Cost"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("attachedEbsVolumesCost") + private MonthlyCostSummary attachedEbsVolumesCost; + + public Builder attachedEbsVolumesCost(MonthlyCostSummary attachedEbsVolumesCost) { + this.attachedEbsVolumesCost = attachedEbsVolumesCost; + this.__explicitlySet__.add("attachedEbsVolumesCost"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AwsEc2Asset build() { + AwsEc2Asset model = + new AwsEc2Asset( + this.displayName, + this.inventoryId, + this.id, + this.compartmentId, + this.sourceKey, + this.externalAssetKey, + this.timeCreated, + this.timeUpdated, + this.assetSourceIds, + this.lifecycleState, + this.freeformTags, + this.definedTags, + this.systemTags, + this.compute, + this.vm, + this.awsEc2, + this.awsEc2Cost, + this.attachedEbsVolumesCost); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AwsEc2Asset model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("inventoryId")) { + this.inventoryId(model.getInventoryId()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("sourceKey")) { + this.sourceKey(model.getSourceKey()); + } + if (model.wasPropertyExplicitlySet("externalAssetKey")) { + this.externalAssetKey(model.getExternalAssetKey()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("assetSourceIds")) { + this.assetSourceIds(model.getAssetSourceIds()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("compute")) { + this.compute(model.getCompute()); + } + if (model.wasPropertyExplicitlySet("vm")) { + this.vm(model.getVm()); + } + if (model.wasPropertyExplicitlySet("awsEc2")) { + this.awsEc2(model.getAwsEc2()); + } + if (model.wasPropertyExplicitlySet("awsEc2Cost")) { + this.awsEc2Cost(model.getAwsEc2Cost()); + } + if (model.wasPropertyExplicitlySet("attachedEbsVolumesCost")) { + this.attachedEbsVolumesCost(model.getAttachedEbsVolumesCost()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public AwsEc2Asset( + String displayName, + String inventoryId, + String id, + String compartmentId, + String sourceKey, + String externalAssetKey, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.List assetSourceIds, + LifecycleState lifecycleState, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + ComputeProperties compute, + VmProperties vm, + AwsEc2Properties awsEc2, + MonthlyCostSummary awsEc2Cost, + MonthlyCostSummary attachedEbsVolumesCost) { + super( + displayName, + inventoryId, + id, + compartmentId, + sourceKey, + externalAssetKey, + timeCreated, + timeUpdated, + assetSourceIds, + lifecycleState, + freeformTags, + definedTags, + systemTags); + this.compute = compute; + this.vm = vm; + this.awsEc2 = awsEc2; + this.awsEc2Cost = awsEc2Cost; + this.attachedEbsVolumesCost = attachedEbsVolumesCost; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compute") + private final ComputeProperties compute; + + public ComputeProperties getCompute() { + return compute; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vm") + private final VmProperties vm; + + public VmProperties getVm() { + return vm; + } + + @com.fasterxml.jackson.annotation.JsonProperty("awsEc2") + private final AwsEc2Properties awsEc2; + + public AwsEc2Properties getAwsEc2() { + return awsEc2; + } + + @com.fasterxml.jackson.annotation.JsonProperty("awsEc2Cost") + private final MonthlyCostSummary awsEc2Cost; + + public MonthlyCostSummary getAwsEc2Cost() { + return awsEc2Cost; + } + + @com.fasterxml.jackson.annotation.JsonProperty("attachedEbsVolumesCost") + private final MonthlyCostSummary attachedEbsVolumesCost; + + public MonthlyCostSummary getAttachedEbsVolumesCost() { + return attachedEbsVolumesCost; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AwsEc2Asset("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", compute=").append(String.valueOf(this.compute)); + sb.append(", vm=").append(String.valueOf(this.vm)); + sb.append(", awsEc2=").append(String.valueOf(this.awsEc2)); + sb.append(", awsEc2Cost=").append(String.valueOf(this.awsEc2Cost)); + sb.append(", attachedEbsVolumesCost=").append(String.valueOf(this.attachedEbsVolumesCost)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AwsEc2Asset)) { + return false; + } + + AwsEc2Asset other = (AwsEc2Asset) o; + return java.util.Objects.equals(this.compute, other.compute) + && java.util.Objects.equals(this.vm, other.vm) + && java.util.Objects.equals(this.awsEc2, other.awsEc2) + && java.util.Objects.equals(this.awsEc2Cost, other.awsEc2Cost) + && java.util.Objects.equals( + this.attachedEbsVolumesCost, other.attachedEbsVolumesCost) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.compute == null ? 43 : this.compute.hashCode()); + result = (result * PRIME) + (this.vm == null ? 43 : this.vm.hashCode()); + result = (result * PRIME) + (this.awsEc2 == null ? 43 : this.awsEc2.hashCode()); + result = (result * PRIME) + (this.awsEc2Cost == null ? 43 : this.awsEc2Cost.hashCode()); + result = + (result * PRIME) + + (this.attachedEbsVolumesCost == null + ? 43 + : this.attachedEbsVolumesCost.hashCode()); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AwsEc2Properties.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AwsEc2Properties.java new file mode 100644 index 00000000000..b829eeaa74e --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/AwsEc2Properties.java @@ -0,0 +1,1439 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * AWS virtual machine related properties. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = AwsEc2Properties.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AwsEc2Properties extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "architecture", + "bootMode", + "capacityReservationKey", + "areElasticInferenceAcceleratorsPresent", + "isEnclaveOptions", + "isHibernationOptions", + "imageKey", + "instanceKey", + "instanceLifecycle", + "instanceType", + "ipAddress", + "ipv6Address", + "kernelKey", + "timeLaunch", + "licenses", + "maintenanceOptions", + "monitoring", + "networkInterfaces", + "placement", + "privateDnsName", + "privateIpAddress", + "rootDeviceName", + "rootDeviceType", + "securityGroups", + "isSourceDestCheck", + "isSpotInstance", + "sriovNetSupport", + "state", + "subnetKey", + "tags", + "tpmSupport", + "virtualizationType", + "vpcKey" + }) + public AwsEc2Properties( + String architecture, + String bootMode, + String capacityReservationKey, + Boolean areElasticInferenceAcceleratorsPresent, + Boolean isEnclaveOptions, + Boolean isHibernationOptions, + String imageKey, + String instanceKey, + String instanceLifecycle, + String instanceType, + String ipAddress, + String ipv6Address, + String kernelKey, + java.util.Date timeLaunch, + java.util.List licenses, + String maintenanceOptions, + String monitoring, + java.util.List networkInterfaces, + Placement placement, + String privateDnsName, + String privateIpAddress, + String rootDeviceName, + String rootDeviceType, + java.util.List securityGroups, + Boolean isSourceDestCheck, + Boolean isSpotInstance, + String sriovNetSupport, + InstanceState state, + String subnetKey, + java.util.List tags, + String tpmSupport, + String virtualizationType, + String vpcKey) { + super(); + this.architecture = architecture; + this.bootMode = bootMode; + this.capacityReservationKey = capacityReservationKey; + this.areElasticInferenceAcceleratorsPresent = areElasticInferenceAcceleratorsPresent; + this.isEnclaveOptions = isEnclaveOptions; + this.isHibernationOptions = isHibernationOptions; + this.imageKey = imageKey; + this.instanceKey = instanceKey; + this.instanceLifecycle = instanceLifecycle; + this.instanceType = instanceType; + this.ipAddress = ipAddress; + this.ipv6Address = ipv6Address; + this.kernelKey = kernelKey; + this.timeLaunch = timeLaunch; + this.licenses = licenses; + this.maintenanceOptions = maintenanceOptions; + this.monitoring = monitoring; + this.networkInterfaces = networkInterfaces; + this.placement = placement; + this.privateDnsName = privateDnsName; + this.privateIpAddress = privateIpAddress; + this.rootDeviceName = rootDeviceName; + this.rootDeviceType = rootDeviceType; + this.securityGroups = securityGroups; + this.isSourceDestCheck = isSourceDestCheck; + this.isSpotInstance = isSpotInstance; + this.sriovNetSupport = sriovNetSupport; + this.state = state; + this.subnetKey = subnetKey; + this.tags = tags; + this.tpmSupport = tpmSupport; + this.virtualizationType = virtualizationType; + this.vpcKey = vpcKey; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The architecture of the image. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("architecture") + private String architecture; + + /** + * The architecture of the image. + * @param architecture the value to set + * @return this builder + **/ + public Builder architecture(String architecture) { + this.architecture = architecture; + this.__explicitlySet__.add("architecture"); + return this; + } + /** + * The boot mode of the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bootMode") + private String bootMode; + + /** + * The boot mode of the instance. + * @param bootMode the value to set + * @return this builder + **/ + public Builder bootMode(String bootMode) { + this.bootMode = bootMode; + this.__explicitlySet__.add("bootMode"); + return this; + } + /** + * The ID of the Capacity Reservation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("capacityReservationKey") + private String capacityReservationKey; + + /** + * The ID of the Capacity Reservation. + * @param capacityReservationKey the value to set + * @return this builder + **/ + public Builder capacityReservationKey(String capacityReservationKey) { + this.capacityReservationKey = capacityReservationKey; + this.__explicitlySet__.add("capacityReservationKey"); + return this; + } + /** + * Indicates if the elastic inference accelerators attached to an instance + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areElasticInferenceAcceleratorsPresent") + private Boolean areElasticInferenceAcceleratorsPresent; + + /** + * Indicates if the elastic inference accelerators attached to an instance + * @param areElasticInferenceAcceleratorsPresent the value to set + * @return this builder + **/ + public Builder areElasticInferenceAcceleratorsPresent( + Boolean areElasticInferenceAcceleratorsPresent) { + this.areElasticInferenceAcceleratorsPresent = areElasticInferenceAcceleratorsPresent; + this.__explicitlySet__.add("areElasticInferenceAcceleratorsPresent"); + return this; + } + /** + * Indicates whether the instance is enabled for AWS Nitro Enclaves. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnclaveOptions") + private Boolean isEnclaveOptions; + + /** + * Indicates whether the instance is enabled for AWS Nitro Enclaves. + * @param isEnclaveOptions the value to set + * @return this builder + **/ + public Builder isEnclaveOptions(Boolean isEnclaveOptions) { + this.isEnclaveOptions = isEnclaveOptions; + this.__explicitlySet__.add("isEnclaveOptions"); + return this; + } + /** + * Indicates whether the instance is enabled for hibernation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHibernationOptions") + private Boolean isHibernationOptions; + + /** + * Indicates whether the instance is enabled for hibernation. + * @param isHibernationOptions the value to set + * @return this builder + **/ + public Builder isHibernationOptions(Boolean isHibernationOptions) { + this.isHibernationOptions = isHibernationOptions; + this.__explicitlySet__.add("isHibernationOptions"); + return this; + } + /** + * The ID of the AMI used to launch the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("imageKey") + private String imageKey; + + /** + * The ID of the AMI used to launch the instance. + * @param imageKey the value to set + * @return this builder + **/ + public Builder imageKey(String imageKey) { + this.imageKey = imageKey; + this.__explicitlySet__.add("imageKey"); + return this; + } + /** + * The ID of the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceKey") + private String instanceKey; + + /** + * The ID of the instance. + * @param instanceKey the value to set + * @return this builder + **/ + public Builder instanceKey(String instanceKey) { + this.instanceKey = instanceKey; + this.__explicitlySet__.add("instanceKey"); + return this; + } + /** + * Indicates whether this is a Spot Instance or a Scheduled Instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceLifecycle") + private String instanceLifecycle; + + /** + * Indicates whether this is a Spot Instance or a Scheduled Instance. + * @param instanceLifecycle the value to set + * @return this builder + **/ + public Builder instanceLifecycle(String instanceLifecycle) { + this.instanceLifecycle = instanceLifecycle; + this.__explicitlySet__.add("instanceLifecycle"); + return this; + } + /** + * The instance type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceType") + private String instanceType; + + /** + * The instance type. + * @param instanceType the value to set + * @return this builder + **/ + public Builder instanceType(String instanceType) { + this.instanceType = instanceType; + this.__explicitlySet__.add("instanceType"); + return this; + } + /** + * The public IPv4 address, or the Carrier IP address assigned to the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipAddress") + private String ipAddress; + + /** + * The public IPv4 address, or the Carrier IP address assigned to the instance. + * @param ipAddress the value to set + * @return this builder + **/ + public Builder ipAddress(String ipAddress) { + this.ipAddress = ipAddress; + this.__explicitlySet__.add("ipAddress"); + return this; + } + /** + * The IPv6 address assigned to the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipv6Address") + private String ipv6Address; + + /** + * The IPv6 address assigned to the instance. + * @param ipv6Address the value to set + * @return this builder + **/ + public Builder ipv6Address(String ipv6Address) { + this.ipv6Address = ipv6Address; + this.__explicitlySet__.add("ipv6Address"); + return this; + } + /** + * The kernel associated with this instance, if applicable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kernelKey") + private String kernelKey; + + /** + * The kernel associated with this instance, if applicable. + * @param kernelKey the value to set + * @return this builder + **/ + public Builder kernelKey(String kernelKey) { + this.kernelKey = kernelKey; + this.__explicitlySet__.add("kernelKey"); + return this; + } + /** + * The time the instance was launched. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLaunch") + private java.util.Date timeLaunch; + + /** + * The time the instance was launched. + * @param timeLaunch the value to set + * @return this builder + **/ + public Builder timeLaunch(java.util.Date timeLaunch) { + this.timeLaunch = timeLaunch; + this.__explicitlySet__.add("timeLaunch"); + return this; + } + /** + * The license configurations for the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenses") + private java.util.List licenses; + + /** + * The license configurations for the instance. + * @param licenses the value to set + * @return this builder + **/ + public Builder licenses(java.util.List licenses) { + this.licenses = licenses; + this.__explicitlySet__.add("licenses"); + return this; + } + /** + * Provides information on the recovery and maintenance options of your instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceOptions") + private String maintenanceOptions; + + /** + * Provides information on the recovery and maintenance options of your instance. + * @param maintenanceOptions the value to set + * @return this builder + **/ + public Builder maintenanceOptions(String maintenanceOptions) { + this.maintenanceOptions = maintenanceOptions; + this.__explicitlySet__.add("maintenanceOptions"); + return this; + } + /** + * The monitoring for the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("monitoring") + private String monitoring; + + /** + * The monitoring for the instance. + * @param monitoring the value to set + * @return this builder + **/ + public Builder monitoring(String monitoring) { + this.monitoring = monitoring; + this.__explicitlySet__.add("monitoring"); + return this; + } + /** + * The network interfaces for the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("networkInterfaces") + private java.util.List networkInterfaces; + + /** + * The network interfaces for the instance. + * @param networkInterfaces the value to set + * @return this builder + **/ + public Builder networkInterfaces( + java.util.List networkInterfaces) { + this.networkInterfaces = networkInterfaces; + this.__explicitlySet__.add("networkInterfaces"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("placement") + private Placement placement; + + public Builder placement(Placement placement) { + this.placement = placement; + this.__explicitlySet__.add("placement"); + return this; + } + /** + * (IPv4 only) The private DNS hostname name assigned to the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateDnsName") + private String privateDnsName; + + /** + * (IPv4 only) The private DNS hostname name assigned to the instance. + * @param privateDnsName the value to set + * @return this builder + **/ + public Builder privateDnsName(String privateDnsName) { + this.privateDnsName = privateDnsName; + this.__explicitlySet__.add("privateDnsName"); + return this; + } + /** + * The private IPv4 address assigned to the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateIpAddress") + private String privateIpAddress; + + /** + * The private IPv4 address assigned to the instance. + * @param privateIpAddress the value to set + * @return this builder + **/ + public Builder privateIpAddress(String privateIpAddress) { + this.privateIpAddress = privateIpAddress; + this.__explicitlySet__.add("privateIpAddress"); + return this; + } + /** + * The device name of the root device volume. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rootDeviceName") + private String rootDeviceName; + + /** + * The device name of the root device volume. + * @param rootDeviceName the value to set + * @return this builder + **/ + public Builder rootDeviceName(String rootDeviceName) { + this.rootDeviceName = rootDeviceName; + this.__explicitlySet__.add("rootDeviceName"); + return this; + } + /** + * The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rootDeviceType") + private String rootDeviceType; + + /** + * The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume. + * @param rootDeviceType the value to set + * @return this builder + **/ + public Builder rootDeviceType(String rootDeviceType) { + this.rootDeviceType = rootDeviceType; + this.__explicitlySet__.add("rootDeviceType"); + return this; + } + /** + * The security groups for the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityGroups") + private java.util.List securityGroups; + + /** + * The security groups for the instance. + * @param securityGroups the value to set + * @return this builder + **/ + public Builder securityGroups(java.util.List securityGroups) { + this.securityGroups = securityGroups; + this.__explicitlySet__.add("securityGroups"); + return this; + } + /** + * Indicates whether source/destination checking is enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSourceDestCheck") + private Boolean isSourceDestCheck; + + /** + * Indicates whether source/destination checking is enabled. + * @param isSourceDestCheck the value to set + * @return this builder + **/ + public Builder isSourceDestCheck(Boolean isSourceDestCheck) { + this.isSourceDestCheck = isSourceDestCheck; + this.__explicitlySet__.add("isSourceDestCheck"); + return this; + } + /** + * If the request is a Spot Instance request, this value will be true. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSpotInstance") + private Boolean isSpotInstance; + + /** + * If the request is a Spot Instance request, this value will be true. + * @param isSpotInstance the value to set + * @return this builder + **/ + public Builder isSpotInstance(Boolean isSpotInstance) { + this.isSpotInstance = isSpotInstance; + this.__explicitlySet__.add("isSpotInstance"); + return this; + } + /** + * Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sriovNetSupport") + private String sriovNetSupport; + + /** + * Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled. + * @param sriovNetSupport the value to set + * @return this builder + **/ + public Builder sriovNetSupport(String sriovNetSupport) { + this.sriovNetSupport = sriovNetSupport; + this.__explicitlySet__.add("sriovNetSupport"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("state") + private InstanceState state; + + public Builder state(InstanceState state) { + this.state = state; + this.__explicitlySet__.add("state"); + return this; + } + /** + * EC2-VPC The ID of the subnet in which the instance is running. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetKey") + private String subnetKey; + + /** + * EC2-VPC The ID of the subnet in which the instance is running. + * @param subnetKey the value to set + * @return this builder + **/ + public Builder subnetKey(String subnetKey) { + this.subnetKey = subnetKey; + this.__explicitlySet__.add("subnetKey"); + return this; + } + /** + * Any tags assigned to the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tags") + private java.util.List tags; + + /** + * Any tags assigned to the instance. + * @param tags the value to set + * @return this builder + **/ + public Builder tags(java.util.List tags) { + this.tags = tags; + this.__explicitlySet__.add("tags"); + return this; + } + /** + * If the instance is configured for NitroTPM support, the value is v2.0. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tpmSupport") + private String tpmSupport; + + /** + * If the instance is configured for NitroTPM support, the value is v2.0. + * @param tpmSupport the value to set + * @return this builder + **/ + public Builder tpmSupport(String tpmSupport) { + this.tpmSupport = tpmSupport; + this.__explicitlySet__.add("tpmSupport"); + return this; + } + /** + * The virtualization type of the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("virtualizationType") + private String virtualizationType; + + /** + * The virtualization type of the instance. + * @param virtualizationType the value to set + * @return this builder + **/ + public Builder virtualizationType(String virtualizationType) { + this.virtualizationType = virtualizationType; + this.__explicitlySet__.add("virtualizationType"); + return this; + } + /** + * EC2-VPC The ID of the VPC in which the instance is running. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vpcKey") + private String vpcKey; + + /** + * EC2-VPC The ID of the VPC in which the instance is running. + * @param vpcKey the value to set + * @return this builder + **/ + public Builder vpcKey(String vpcKey) { + this.vpcKey = vpcKey; + this.__explicitlySet__.add("vpcKey"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AwsEc2Properties build() { + AwsEc2Properties model = + new AwsEc2Properties( + this.architecture, + this.bootMode, + this.capacityReservationKey, + this.areElasticInferenceAcceleratorsPresent, + this.isEnclaveOptions, + this.isHibernationOptions, + this.imageKey, + this.instanceKey, + this.instanceLifecycle, + this.instanceType, + this.ipAddress, + this.ipv6Address, + this.kernelKey, + this.timeLaunch, + this.licenses, + this.maintenanceOptions, + this.monitoring, + this.networkInterfaces, + this.placement, + this.privateDnsName, + this.privateIpAddress, + this.rootDeviceName, + this.rootDeviceType, + this.securityGroups, + this.isSourceDestCheck, + this.isSpotInstance, + this.sriovNetSupport, + this.state, + this.subnetKey, + this.tags, + this.tpmSupport, + this.virtualizationType, + this.vpcKey); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AwsEc2Properties model) { + if (model.wasPropertyExplicitlySet("architecture")) { + this.architecture(model.getArchitecture()); + } + if (model.wasPropertyExplicitlySet("bootMode")) { + this.bootMode(model.getBootMode()); + } + if (model.wasPropertyExplicitlySet("capacityReservationKey")) { + this.capacityReservationKey(model.getCapacityReservationKey()); + } + if (model.wasPropertyExplicitlySet("areElasticInferenceAcceleratorsPresent")) { + this.areElasticInferenceAcceleratorsPresent( + model.getAreElasticInferenceAcceleratorsPresent()); + } + if (model.wasPropertyExplicitlySet("isEnclaveOptions")) { + this.isEnclaveOptions(model.getIsEnclaveOptions()); + } + if (model.wasPropertyExplicitlySet("isHibernationOptions")) { + this.isHibernationOptions(model.getIsHibernationOptions()); + } + if (model.wasPropertyExplicitlySet("imageKey")) { + this.imageKey(model.getImageKey()); + } + if (model.wasPropertyExplicitlySet("instanceKey")) { + this.instanceKey(model.getInstanceKey()); + } + if (model.wasPropertyExplicitlySet("instanceLifecycle")) { + this.instanceLifecycle(model.getInstanceLifecycle()); + } + if (model.wasPropertyExplicitlySet("instanceType")) { + this.instanceType(model.getInstanceType()); + } + if (model.wasPropertyExplicitlySet("ipAddress")) { + this.ipAddress(model.getIpAddress()); + } + if (model.wasPropertyExplicitlySet("ipv6Address")) { + this.ipv6Address(model.getIpv6Address()); + } + if (model.wasPropertyExplicitlySet("kernelKey")) { + this.kernelKey(model.getKernelKey()); + } + if (model.wasPropertyExplicitlySet("timeLaunch")) { + this.timeLaunch(model.getTimeLaunch()); + } + if (model.wasPropertyExplicitlySet("licenses")) { + this.licenses(model.getLicenses()); + } + if (model.wasPropertyExplicitlySet("maintenanceOptions")) { + this.maintenanceOptions(model.getMaintenanceOptions()); + } + if (model.wasPropertyExplicitlySet("monitoring")) { + this.monitoring(model.getMonitoring()); + } + if (model.wasPropertyExplicitlySet("networkInterfaces")) { + this.networkInterfaces(model.getNetworkInterfaces()); + } + if (model.wasPropertyExplicitlySet("placement")) { + this.placement(model.getPlacement()); + } + if (model.wasPropertyExplicitlySet("privateDnsName")) { + this.privateDnsName(model.getPrivateDnsName()); + } + if (model.wasPropertyExplicitlySet("privateIpAddress")) { + this.privateIpAddress(model.getPrivateIpAddress()); + } + if (model.wasPropertyExplicitlySet("rootDeviceName")) { + this.rootDeviceName(model.getRootDeviceName()); + } + if (model.wasPropertyExplicitlySet("rootDeviceType")) { + this.rootDeviceType(model.getRootDeviceType()); + } + if (model.wasPropertyExplicitlySet("securityGroups")) { + this.securityGroups(model.getSecurityGroups()); + } + if (model.wasPropertyExplicitlySet("isSourceDestCheck")) { + this.isSourceDestCheck(model.getIsSourceDestCheck()); + } + if (model.wasPropertyExplicitlySet("isSpotInstance")) { + this.isSpotInstance(model.getIsSpotInstance()); + } + if (model.wasPropertyExplicitlySet("sriovNetSupport")) { + this.sriovNetSupport(model.getSriovNetSupport()); + } + if (model.wasPropertyExplicitlySet("state")) { + this.state(model.getState()); + } + if (model.wasPropertyExplicitlySet("subnetKey")) { + this.subnetKey(model.getSubnetKey()); + } + if (model.wasPropertyExplicitlySet("tags")) { + this.tags(model.getTags()); + } + if (model.wasPropertyExplicitlySet("tpmSupport")) { + this.tpmSupport(model.getTpmSupport()); + } + if (model.wasPropertyExplicitlySet("virtualizationType")) { + this.virtualizationType(model.getVirtualizationType()); + } + if (model.wasPropertyExplicitlySet("vpcKey")) { + this.vpcKey(model.getVpcKey()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The architecture of the image. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("architecture") + private final String architecture; + + /** + * The architecture of the image. + * @return the value + **/ + public String getArchitecture() { + return architecture; + } + + /** + * The boot mode of the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bootMode") + private final String bootMode; + + /** + * The boot mode of the instance. + * @return the value + **/ + public String getBootMode() { + return bootMode; + } + + /** + * The ID of the Capacity Reservation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("capacityReservationKey") + private final String capacityReservationKey; + + /** + * The ID of the Capacity Reservation. + * @return the value + **/ + public String getCapacityReservationKey() { + return capacityReservationKey; + } + + /** + * Indicates if the elastic inference accelerators attached to an instance + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areElasticInferenceAcceleratorsPresent") + private final Boolean areElasticInferenceAcceleratorsPresent; + + /** + * Indicates if the elastic inference accelerators attached to an instance + * @return the value + **/ + public Boolean getAreElasticInferenceAcceleratorsPresent() { + return areElasticInferenceAcceleratorsPresent; + } + + /** + * Indicates whether the instance is enabled for AWS Nitro Enclaves. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnclaveOptions") + private final Boolean isEnclaveOptions; + + /** + * Indicates whether the instance is enabled for AWS Nitro Enclaves. + * @return the value + **/ + public Boolean getIsEnclaveOptions() { + return isEnclaveOptions; + } + + /** + * Indicates whether the instance is enabled for hibernation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHibernationOptions") + private final Boolean isHibernationOptions; + + /** + * Indicates whether the instance is enabled for hibernation. + * @return the value + **/ + public Boolean getIsHibernationOptions() { + return isHibernationOptions; + } + + /** + * The ID of the AMI used to launch the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("imageKey") + private final String imageKey; + + /** + * The ID of the AMI used to launch the instance. + * @return the value + **/ + public String getImageKey() { + return imageKey; + } + + /** + * The ID of the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceKey") + private final String instanceKey; + + /** + * The ID of the instance. + * @return the value + **/ + public String getInstanceKey() { + return instanceKey; + } + + /** + * Indicates whether this is a Spot Instance or a Scheduled Instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceLifecycle") + private final String instanceLifecycle; + + /** + * Indicates whether this is a Spot Instance or a Scheduled Instance. + * @return the value + **/ + public String getInstanceLifecycle() { + return instanceLifecycle; + } + + /** + * The instance type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceType") + private final String instanceType; + + /** + * The instance type. + * @return the value + **/ + public String getInstanceType() { + return instanceType; + } + + /** + * The public IPv4 address, or the Carrier IP address assigned to the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipAddress") + private final String ipAddress; + + /** + * The public IPv4 address, or the Carrier IP address assigned to the instance. + * @return the value + **/ + public String getIpAddress() { + return ipAddress; + } + + /** + * The IPv6 address assigned to the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipv6Address") + private final String ipv6Address; + + /** + * The IPv6 address assigned to the instance. + * @return the value + **/ + public String getIpv6Address() { + return ipv6Address; + } + + /** + * The kernel associated with this instance, if applicable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kernelKey") + private final String kernelKey; + + /** + * The kernel associated with this instance, if applicable. + * @return the value + **/ + public String getKernelKey() { + return kernelKey; + } + + /** + * The time the instance was launched. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLaunch") + private final java.util.Date timeLaunch; + + /** + * The time the instance was launched. + * @return the value + **/ + public java.util.Date getTimeLaunch() { + return timeLaunch; + } + + /** + * The license configurations for the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenses") + private final java.util.List licenses; + + /** + * The license configurations for the instance. + * @return the value + **/ + public java.util.List getLicenses() { + return licenses; + } + + /** + * Provides information on the recovery and maintenance options of your instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceOptions") + private final String maintenanceOptions; + + /** + * Provides information on the recovery and maintenance options of your instance. + * @return the value + **/ + public String getMaintenanceOptions() { + return maintenanceOptions; + } + + /** + * The monitoring for the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("monitoring") + private final String monitoring; + + /** + * The monitoring for the instance. + * @return the value + **/ + public String getMonitoring() { + return monitoring; + } + + /** + * The network interfaces for the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("networkInterfaces") + private final java.util.List networkInterfaces; + + /** + * The network interfaces for the instance. + * @return the value + **/ + public java.util.List getNetworkInterfaces() { + return networkInterfaces; + } + + @com.fasterxml.jackson.annotation.JsonProperty("placement") + private final Placement placement; + + public Placement getPlacement() { + return placement; + } + + /** + * (IPv4 only) The private DNS hostname name assigned to the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateDnsName") + private final String privateDnsName; + + /** + * (IPv4 only) The private DNS hostname name assigned to the instance. + * @return the value + **/ + public String getPrivateDnsName() { + return privateDnsName; + } + + /** + * The private IPv4 address assigned to the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateIpAddress") + private final String privateIpAddress; + + /** + * The private IPv4 address assigned to the instance. + * @return the value + **/ + public String getPrivateIpAddress() { + return privateIpAddress; + } + + /** + * The device name of the root device volume. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rootDeviceName") + private final String rootDeviceName; + + /** + * The device name of the root device volume. + * @return the value + **/ + public String getRootDeviceName() { + return rootDeviceName; + } + + /** + * The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rootDeviceType") + private final String rootDeviceType; + + /** + * The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume. + * @return the value + **/ + public String getRootDeviceType() { + return rootDeviceType; + } + + /** + * The security groups for the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityGroups") + private final java.util.List securityGroups; + + /** + * The security groups for the instance. + * @return the value + **/ + public java.util.List getSecurityGroups() { + return securityGroups; + } + + /** + * Indicates whether source/destination checking is enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSourceDestCheck") + private final Boolean isSourceDestCheck; + + /** + * Indicates whether source/destination checking is enabled. + * @return the value + **/ + public Boolean getIsSourceDestCheck() { + return isSourceDestCheck; + } + + /** + * If the request is a Spot Instance request, this value will be true. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSpotInstance") + private final Boolean isSpotInstance; + + /** + * If the request is a Spot Instance request, this value will be true. + * @return the value + **/ + public Boolean getIsSpotInstance() { + return isSpotInstance; + } + + /** + * Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sriovNetSupport") + private final String sriovNetSupport; + + /** + * Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled. + * @return the value + **/ + public String getSriovNetSupport() { + return sriovNetSupport; + } + + @com.fasterxml.jackson.annotation.JsonProperty("state") + private final InstanceState state; + + public InstanceState getState() { + return state; + } + + /** + * EC2-VPC The ID of the subnet in which the instance is running. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetKey") + private final String subnetKey; + + /** + * EC2-VPC The ID of the subnet in which the instance is running. + * @return the value + **/ + public String getSubnetKey() { + return subnetKey; + } + + /** + * Any tags assigned to the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tags") + private final java.util.List tags; + + /** + * Any tags assigned to the instance. + * @return the value + **/ + public java.util.List getTags() { + return tags; + } + + /** + * If the instance is configured for NitroTPM support, the value is v2.0. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tpmSupport") + private final String tpmSupport; + + /** + * If the instance is configured for NitroTPM support, the value is v2.0. + * @return the value + **/ + public String getTpmSupport() { + return tpmSupport; + } + + /** + * The virtualization type of the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("virtualizationType") + private final String virtualizationType; + + /** + * The virtualization type of the instance. + * @return the value + **/ + public String getVirtualizationType() { + return virtualizationType; + } + + /** + * EC2-VPC The ID of the VPC in which the instance is running. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vpcKey") + private final String vpcKey; + + /** + * EC2-VPC The ID of the VPC in which the instance is running. + * @return the value + **/ + public String getVpcKey() { + return vpcKey; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AwsEc2Properties("); + sb.append("super=").append(super.toString()); + sb.append("architecture=").append(String.valueOf(this.architecture)); + sb.append(", bootMode=").append(String.valueOf(this.bootMode)); + sb.append(", capacityReservationKey=").append(String.valueOf(this.capacityReservationKey)); + sb.append(", areElasticInferenceAcceleratorsPresent=") + .append(String.valueOf(this.areElasticInferenceAcceleratorsPresent)); + sb.append(", isEnclaveOptions=").append(String.valueOf(this.isEnclaveOptions)); + sb.append(", isHibernationOptions=").append(String.valueOf(this.isHibernationOptions)); + sb.append(", imageKey=").append(String.valueOf(this.imageKey)); + sb.append(", instanceKey=").append(String.valueOf(this.instanceKey)); + sb.append(", instanceLifecycle=").append(String.valueOf(this.instanceLifecycle)); + sb.append(", instanceType=").append(String.valueOf(this.instanceType)); + sb.append(", ipAddress=").append(String.valueOf(this.ipAddress)); + sb.append(", ipv6Address=").append(String.valueOf(this.ipv6Address)); + sb.append(", kernelKey=").append(String.valueOf(this.kernelKey)); + sb.append(", timeLaunch=").append(String.valueOf(this.timeLaunch)); + sb.append(", licenses=").append(String.valueOf(this.licenses)); + sb.append(", maintenanceOptions=").append(String.valueOf(this.maintenanceOptions)); + sb.append(", monitoring=").append(String.valueOf(this.monitoring)); + sb.append(", networkInterfaces=").append(String.valueOf(this.networkInterfaces)); + sb.append(", placement=").append(String.valueOf(this.placement)); + sb.append(", privateDnsName=").append(String.valueOf(this.privateDnsName)); + sb.append(", privateIpAddress=").append(String.valueOf(this.privateIpAddress)); + sb.append(", rootDeviceName=").append(String.valueOf(this.rootDeviceName)); + sb.append(", rootDeviceType=").append(String.valueOf(this.rootDeviceType)); + sb.append(", securityGroups=").append(String.valueOf(this.securityGroups)); + sb.append(", isSourceDestCheck=").append(String.valueOf(this.isSourceDestCheck)); + sb.append(", isSpotInstance=").append(String.valueOf(this.isSpotInstance)); + sb.append(", sriovNetSupport=").append(String.valueOf(this.sriovNetSupport)); + sb.append(", state=").append(String.valueOf(this.state)); + sb.append(", subnetKey=").append(String.valueOf(this.subnetKey)); + sb.append(", tags=").append(String.valueOf(this.tags)); + sb.append(", tpmSupport=").append(String.valueOf(this.tpmSupport)); + sb.append(", virtualizationType=").append(String.valueOf(this.virtualizationType)); + sb.append(", vpcKey=").append(String.valueOf(this.vpcKey)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AwsEc2Properties)) { + return false; + } + + AwsEc2Properties other = (AwsEc2Properties) o; + return java.util.Objects.equals(this.architecture, other.architecture) + && java.util.Objects.equals(this.bootMode, other.bootMode) + && java.util.Objects.equals( + this.capacityReservationKey, other.capacityReservationKey) + && java.util.Objects.equals( + this.areElasticInferenceAcceleratorsPresent, + other.areElasticInferenceAcceleratorsPresent) + && java.util.Objects.equals(this.isEnclaveOptions, other.isEnclaveOptions) + && java.util.Objects.equals(this.isHibernationOptions, other.isHibernationOptions) + && java.util.Objects.equals(this.imageKey, other.imageKey) + && java.util.Objects.equals(this.instanceKey, other.instanceKey) + && java.util.Objects.equals(this.instanceLifecycle, other.instanceLifecycle) + && java.util.Objects.equals(this.instanceType, other.instanceType) + && java.util.Objects.equals(this.ipAddress, other.ipAddress) + && java.util.Objects.equals(this.ipv6Address, other.ipv6Address) + && java.util.Objects.equals(this.kernelKey, other.kernelKey) + && java.util.Objects.equals(this.timeLaunch, other.timeLaunch) + && java.util.Objects.equals(this.licenses, other.licenses) + && java.util.Objects.equals(this.maintenanceOptions, other.maintenanceOptions) + && java.util.Objects.equals(this.monitoring, other.monitoring) + && java.util.Objects.equals(this.networkInterfaces, other.networkInterfaces) + && java.util.Objects.equals(this.placement, other.placement) + && java.util.Objects.equals(this.privateDnsName, other.privateDnsName) + && java.util.Objects.equals(this.privateIpAddress, other.privateIpAddress) + && java.util.Objects.equals(this.rootDeviceName, other.rootDeviceName) + && java.util.Objects.equals(this.rootDeviceType, other.rootDeviceType) + && java.util.Objects.equals(this.securityGroups, other.securityGroups) + && java.util.Objects.equals(this.isSourceDestCheck, other.isSourceDestCheck) + && java.util.Objects.equals(this.isSpotInstance, other.isSpotInstance) + && java.util.Objects.equals(this.sriovNetSupport, other.sriovNetSupport) + && java.util.Objects.equals(this.state, other.state) + && java.util.Objects.equals(this.subnetKey, other.subnetKey) + && java.util.Objects.equals(this.tags, other.tags) + && java.util.Objects.equals(this.tpmSupport, other.tpmSupport) + && java.util.Objects.equals(this.virtualizationType, other.virtualizationType) + && java.util.Objects.equals(this.vpcKey, other.vpcKey) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.architecture == null ? 43 : this.architecture.hashCode()); + result = (result * PRIME) + (this.bootMode == null ? 43 : this.bootMode.hashCode()); + result = + (result * PRIME) + + (this.capacityReservationKey == null + ? 43 + : this.capacityReservationKey.hashCode()); + result = + (result * PRIME) + + (this.areElasticInferenceAcceleratorsPresent == null + ? 43 + : this.areElasticInferenceAcceleratorsPresent.hashCode()); + result = + (result * PRIME) + + (this.isEnclaveOptions == null ? 43 : this.isEnclaveOptions.hashCode()); + result = + (result * PRIME) + + (this.isHibernationOptions == null + ? 43 + : this.isHibernationOptions.hashCode()); + result = (result * PRIME) + (this.imageKey == null ? 43 : this.imageKey.hashCode()); + result = (result * PRIME) + (this.instanceKey == null ? 43 : this.instanceKey.hashCode()); + result = + (result * PRIME) + + (this.instanceLifecycle == null ? 43 : this.instanceLifecycle.hashCode()); + result = (result * PRIME) + (this.instanceType == null ? 43 : this.instanceType.hashCode()); + result = (result * PRIME) + (this.ipAddress == null ? 43 : this.ipAddress.hashCode()); + result = (result * PRIME) + (this.ipv6Address == null ? 43 : this.ipv6Address.hashCode()); + result = (result * PRIME) + (this.kernelKey == null ? 43 : this.kernelKey.hashCode()); + result = (result * PRIME) + (this.timeLaunch == null ? 43 : this.timeLaunch.hashCode()); + result = (result * PRIME) + (this.licenses == null ? 43 : this.licenses.hashCode()); + result = + (result * PRIME) + + (this.maintenanceOptions == null + ? 43 + : this.maintenanceOptions.hashCode()); + result = (result * PRIME) + (this.monitoring == null ? 43 : this.monitoring.hashCode()); + result = + (result * PRIME) + + (this.networkInterfaces == null ? 43 : this.networkInterfaces.hashCode()); + result = (result * PRIME) + (this.placement == null ? 43 : this.placement.hashCode()); + result = + (result * PRIME) + + (this.privateDnsName == null ? 43 : this.privateDnsName.hashCode()); + result = + (result * PRIME) + + (this.privateIpAddress == null ? 43 : this.privateIpAddress.hashCode()); + result = + (result * PRIME) + + (this.rootDeviceName == null ? 43 : this.rootDeviceName.hashCode()); + result = + (result * PRIME) + + (this.rootDeviceType == null ? 43 : this.rootDeviceType.hashCode()); + result = + (result * PRIME) + + (this.securityGroups == null ? 43 : this.securityGroups.hashCode()); + result = + (result * PRIME) + + (this.isSourceDestCheck == null ? 43 : this.isSourceDestCheck.hashCode()); + result = + (result * PRIME) + + (this.isSpotInstance == null ? 43 : this.isSpotInstance.hashCode()); + result = + (result * PRIME) + + (this.sriovNetSupport == null ? 43 : this.sriovNetSupport.hashCode()); + result = (result * PRIME) + (this.state == null ? 43 : this.state.hashCode()); + result = (result * PRIME) + (this.subnetKey == null ? 43 : this.subnetKey.hashCode()); + result = (result * PRIME) + (this.tags == null ? 43 : this.tags.hashCode()); + result = (result * PRIME) + (this.tpmSupport == null ? 43 : this.tpmSupport.hashCode()); + result = + (result * PRIME) + + (this.virtualizationType == null + ? 43 + : this.virtualizationType.hashCode()); + result = (result * PRIME) + (this.vpcKey == null ? 43 : this.vpcKey.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateAssetDetails.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateAssetDetails.java index 1039a304653..eb8f36bcc10 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateAssetDetails.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateAssetDetails.java @@ -22,9 +22,17 @@ defaultImpl = CreateAssetDetails.class ) @com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateAwsEbsAssetDetails.class, + name = "AWS_EBS" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = CreateVmwareVmAssetDetails.class, name = "VMWARE_VM" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateAwsEc2AssetDetails.class, + name = "AWS_EC2" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateAssetSourceDetails.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateAssetSourceDetails.java index 4199dd285f1..7c994dfa13b 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateAssetSourceDetails.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateAssetSourceDetails.java @@ -25,6 +25,10 @@ @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = CreateVmWareAssetSourceDetails.class, name = "VMWARE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateAwsAssetSourceDetails.class, + name = "AWS" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateAwsAssetSourceDetails.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateAwsAssetSourceDetails.java new file mode 100644 index 00000000000..3a30ce8d110 --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateAwsAssetSourceDetails.java @@ -0,0 +1,511 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * AWS asset source creation request. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAwsAssetSourceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateAwsAssetSourceDetails extends CreateAssetSourceDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("environmentId") + private String environmentId; + + public Builder environmentId(String environmentId) { + this.environmentId = environmentId; + this.__explicitlySet__.add("environmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("inventoryId") + private String inventoryId; + + public Builder inventoryId(String inventoryId) { + this.inventoryId = inventoryId; + this.__explicitlySet__.add("inventoryId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("assetsCompartmentId") + private String assetsCompartmentId; + + public Builder assetsCompartmentId(String assetsCompartmentId) { + this.assetsCompartmentId = assetsCompartmentId; + this.__explicitlySet__.add("assetsCompartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("discoveryScheduleId") + private String discoveryScheduleId; + + public Builder discoveryScheduleId(String discoveryScheduleId) { + this.discoveryScheduleId = discoveryScheduleId; + this.__explicitlySet__.add("discoveryScheduleId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("discoveryCredentials") + private AssetSourceCredentials discoveryCredentials; + + public Builder discoveryCredentials(AssetSourceCredentials discoveryCredentials) { + this.discoveryCredentials = discoveryCredentials; + this.__explicitlySet__.add("discoveryCredentials"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("replicationCredentials") + private AssetSourceCredentials replicationCredentials; + + public Builder replicationCredentials(AssetSourceCredentials replicationCredentials) { + this.replicationCredentials = replicationCredentials; + this.__explicitlySet__.add("replicationCredentials"); + return this; + } + /** + * AWS region information, from where the resources are discovered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("awsRegion") + private String awsRegion; + + /** + * AWS region information, from where the resources are discovered. + * @param awsRegion the value to set + * @return this builder + **/ + public Builder awsRegion(String awsRegion) { + this.awsRegion = awsRegion; + this.__explicitlySet__.add("awsRegion"); + return this; + } + /** + * The key of customer's aws account to be discovered/migrated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("awsAccountKey") + private String awsAccountKey; + + /** + * The key of customer's aws account to be discovered/migrated. + * @param awsAccountKey the value to set + * @return this builder + **/ + public Builder awsAccountKey(String awsAccountKey) { + this.awsAccountKey = awsAccountKey; + this.__explicitlySet__.add("awsAccountKey"); + return this; + } + /** + * Flag indicating whether historical metrics are collected for assets, originating from this asset source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areHistoricalMetricsCollected") + private Boolean areHistoricalMetricsCollected; + + /** + * Flag indicating whether historical metrics are collected for assets, originating from this asset source. + * @param areHistoricalMetricsCollected the value to set + * @return this builder + **/ + public Builder areHistoricalMetricsCollected(Boolean areHistoricalMetricsCollected) { + this.areHistoricalMetricsCollected = areHistoricalMetricsCollected; + this.__explicitlySet__.add("areHistoricalMetricsCollected"); + return this; + } + /** + * Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areRealtimeMetricsCollected") + private Boolean areRealtimeMetricsCollected; + + /** + * Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + * @param areRealtimeMetricsCollected the value to set + * @return this builder + **/ + public Builder areRealtimeMetricsCollected(Boolean areRealtimeMetricsCollected) { + this.areRealtimeMetricsCollected = areRealtimeMetricsCollected; + this.__explicitlySet__.add("areRealtimeMetricsCollected"); + return this; + } + /** + * Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCostInformationCollected") + private Boolean isCostInformationCollected; + + /** + * Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + * @param isCostInformationCollected the value to set + * @return this builder + **/ + public Builder isCostInformationCollected(Boolean isCostInformationCollected) { + this.isCostInformationCollected = isCostInformationCollected; + this.__explicitlySet__.add("isCostInformationCollected"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAwsAssetSourceDetails build() { + CreateAwsAssetSourceDetails model = + new CreateAwsAssetSourceDetails( + this.displayName, + this.compartmentId, + this.environmentId, + this.inventoryId, + this.assetsCompartmentId, + this.discoveryScheduleId, + this.freeformTags, + this.definedTags, + this.systemTags, + this.discoveryCredentials, + this.replicationCredentials, + this.awsRegion, + this.awsAccountKey, + this.areHistoricalMetricsCollected, + this.areRealtimeMetricsCollected, + this.isCostInformationCollected); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAwsAssetSourceDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("environmentId")) { + this.environmentId(model.getEnvironmentId()); + } + if (model.wasPropertyExplicitlySet("inventoryId")) { + this.inventoryId(model.getInventoryId()); + } + if (model.wasPropertyExplicitlySet("assetsCompartmentId")) { + this.assetsCompartmentId(model.getAssetsCompartmentId()); + } + if (model.wasPropertyExplicitlySet("discoveryScheduleId")) { + this.discoveryScheduleId(model.getDiscoveryScheduleId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("discoveryCredentials")) { + this.discoveryCredentials(model.getDiscoveryCredentials()); + } + if (model.wasPropertyExplicitlySet("replicationCredentials")) { + this.replicationCredentials(model.getReplicationCredentials()); + } + if (model.wasPropertyExplicitlySet("awsRegion")) { + this.awsRegion(model.getAwsRegion()); + } + if (model.wasPropertyExplicitlySet("awsAccountKey")) { + this.awsAccountKey(model.getAwsAccountKey()); + } + if (model.wasPropertyExplicitlySet("areHistoricalMetricsCollected")) { + this.areHistoricalMetricsCollected(model.getAreHistoricalMetricsCollected()); + } + if (model.wasPropertyExplicitlySet("areRealtimeMetricsCollected")) { + this.areRealtimeMetricsCollected(model.getAreRealtimeMetricsCollected()); + } + if (model.wasPropertyExplicitlySet("isCostInformationCollected")) { + this.isCostInformationCollected(model.getIsCostInformationCollected()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateAwsAssetSourceDetails( + String displayName, + String compartmentId, + String environmentId, + String inventoryId, + String assetsCompartmentId, + String discoveryScheduleId, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + AssetSourceCredentials discoveryCredentials, + AssetSourceCredentials replicationCredentials, + String awsRegion, + String awsAccountKey, + Boolean areHistoricalMetricsCollected, + Boolean areRealtimeMetricsCollected, + Boolean isCostInformationCollected) { + super( + displayName, + compartmentId, + environmentId, + inventoryId, + assetsCompartmentId, + discoveryScheduleId, + freeformTags, + definedTags, + systemTags); + this.discoveryCredentials = discoveryCredentials; + this.replicationCredentials = replicationCredentials; + this.awsRegion = awsRegion; + this.awsAccountKey = awsAccountKey; + this.areHistoricalMetricsCollected = areHistoricalMetricsCollected; + this.areRealtimeMetricsCollected = areRealtimeMetricsCollected; + this.isCostInformationCollected = isCostInformationCollected; + } + + @com.fasterxml.jackson.annotation.JsonProperty("discoveryCredentials") + private final AssetSourceCredentials discoveryCredentials; + + public AssetSourceCredentials getDiscoveryCredentials() { + return discoveryCredentials; + } + + @com.fasterxml.jackson.annotation.JsonProperty("replicationCredentials") + private final AssetSourceCredentials replicationCredentials; + + public AssetSourceCredentials getReplicationCredentials() { + return replicationCredentials; + } + + /** + * AWS region information, from where the resources are discovered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("awsRegion") + private final String awsRegion; + + /** + * AWS region information, from where the resources are discovered. + * @return the value + **/ + public String getAwsRegion() { + return awsRegion; + } + + /** + * The key of customer's aws account to be discovered/migrated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("awsAccountKey") + private final String awsAccountKey; + + /** + * The key of customer's aws account to be discovered/migrated. + * @return the value + **/ + public String getAwsAccountKey() { + return awsAccountKey; + } + + /** + * Flag indicating whether historical metrics are collected for assets, originating from this asset source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areHistoricalMetricsCollected") + private final Boolean areHistoricalMetricsCollected; + + /** + * Flag indicating whether historical metrics are collected for assets, originating from this asset source. + * @return the value + **/ + public Boolean getAreHistoricalMetricsCollected() { + return areHistoricalMetricsCollected; + } + + /** + * Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areRealtimeMetricsCollected") + private final Boolean areRealtimeMetricsCollected; + + /** + * Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + * @return the value + **/ + public Boolean getAreRealtimeMetricsCollected() { + return areRealtimeMetricsCollected; + } + + /** + * Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCostInformationCollected") + private final Boolean isCostInformationCollected; + + /** + * Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + * @return the value + **/ + public Boolean getIsCostInformationCollected() { + return isCostInformationCollected; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateAwsAssetSourceDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", discoveryCredentials=").append(String.valueOf(this.discoveryCredentials)); + sb.append(", replicationCredentials=").append(String.valueOf(this.replicationCredentials)); + sb.append(", awsRegion=").append(String.valueOf(this.awsRegion)); + sb.append(", awsAccountKey=").append(String.valueOf(this.awsAccountKey)); + sb.append(", areHistoricalMetricsCollected=") + .append(String.valueOf(this.areHistoricalMetricsCollected)); + sb.append(", areRealtimeMetricsCollected=") + .append(String.valueOf(this.areRealtimeMetricsCollected)); + sb.append(", isCostInformationCollected=") + .append(String.valueOf(this.isCostInformationCollected)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAwsAssetSourceDetails)) { + return false; + } + + CreateAwsAssetSourceDetails other = (CreateAwsAssetSourceDetails) o; + return java.util.Objects.equals(this.discoveryCredentials, other.discoveryCredentials) + && java.util.Objects.equals( + this.replicationCredentials, other.replicationCredentials) + && java.util.Objects.equals(this.awsRegion, other.awsRegion) + && java.util.Objects.equals(this.awsAccountKey, other.awsAccountKey) + && java.util.Objects.equals( + this.areHistoricalMetricsCollected, other.areHistoricalMetricsCollected) + && java.util.Objects.equals( + this.areRealtimeMetricsCollected, other.areRealtimeMetricsCollected) + && java.util.Objects.equals( + this.isCostInformationCollected, other.isCostInformationCollected) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.discoveryCredentials == null + ? 43 + : this.discoveryCredentials.hashCode()); + result = + (result * PRIME) + + (this.replicationCredentials == null + ? 43 + : this.replicationCredentials.hashCode()); + result = (result * PRIME) + (this.awsRegion == null ? 43 : this.awsRegion.hashCode()); + result = + (result * PRIME) + + (this.awsAccountKey == null ? 43 : this.awsAccountKey.hashCode()); + result = + (result * PRIME) + + (this.areHistoricalMetricsCollected == null + ? 43 + : this.areHistoricalMetricsCollected.hashCode()); + result = + (result * PRIME) + + (this.areRealtimeMetricsCollected == null + ? 43 + : this.areRealtimeMetricsCollected.hashCode()); + result = + (result * PRIME) + + (this.isCostInformationCollected == null + ? 43 + : this.isCostInformationCollected.hashCode()); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateAwsEbsAssetDetails.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateAwsEbsAssetDetails.java new file mode 100644 index 00000000000..a518cdfb6f0 --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateAwsEbsAssetDetails.java @@ -0,0 +1,246 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * Create AWS EBS type of asset. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAwsEbsAssetDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "assetType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateAwsEbsAssetDetails extends CreateAssetDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("inventoryId") + private String inventoryId; + + public Builder inventoryId(String inventoryId) { + this.inventoryId = inventoryId; + this.__explicitlySet__.add("inventoryId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("sourceKey") + private String sourceKey; + + public Builder sourceKey(String sourceKey) { + this.sourceKey = sourceKey; + this.__explicitlySet__.add("sourceKey"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("externalAssetKey") + private String externalAssetKey; + + public Builder externalAssetKey(String externalAssetKey) { + this.externalAssetKey = externalAssetKey; + this.__explicitlySet__.add("externalAssetKey"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("assetSourceIds") + private java.util.List assetSourceIds; + + public Builder assetSourceIds(java.util.List assetSourceIds) { + this.assetSourceIds = assetSourceIds; + this.__explicitlySet__.add("assetSourceIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("awsEbs") + private AwsEbsProperties awsEbs; + + public Builder awsEbs(AwsEbsProperties awsEbs) { + this.awsEbs = awsEbs; + this.__explicitlySet__.add("awsEbs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAwsEbsAssetDetails build() { + CreateAwsEbsAssetDetails model = + new CreateAwsEbsAssetDetails( + this.displayName, + this.inventoryId, + this.compartmentId, + this.sourceKey, + this.externalAssetKey, + this.assetSourceIds, + this.freeformTags, + this.definedTags, + this.awsEbs); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAwsEbsAssetDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("inventoryId")) { + this.inventoryId(model.getInventoryId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("sourceKey")) { + this.sourceKey(model.getSourceKey()); + } + if (model.wasPropertyExplicitlySet("externalAssetKey")) { + this.externalAssetKey(model.getExternalAssetKey()); + } + if (model.wasPropertyExplicitlySet("assetSourceIds")) { + this.assetSourceIds(model.getAssetSourceIds()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("awsEbs")) { + this.awsEbs(model.getAwsEbs()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateAwsEbsAssetDetails( + String displayName, + String inventoryId, + String compartmentId, + String sourceKey, + String externalAssetKey, + java.util.List assetSourceIds, + java.util.Map freeformTags, + java.util.Map> definedTags, + AwsEbsProperties awsEbs) { + super( + displayName, + inventoryId, + compartmentId, + sourceKey, + externalAssetKey, + assetSourceIds, + freeformTags, + definedTags); + this.awsEbs = awsEbs; + } + + @com.fasterxml.jackson.annotation.JsonProperty("awsEbs") + private final AwsEbsProperties awsEbs; + + public AwsEbsProperties getAwsEbs() { + return awsEbs; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateAwsEbsAssetDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", awsEbs=").append(String.valueOf(this.awsEbs)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAwsEbsAssetDetails)) { + return false; + } + + CreateAwsEbsAssetDetails other = (CreateAwsEbsAssetDetails) o; + return java.util.Objects.equals(this.awsEbs, other.awsEbs) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.awsEbs == null ? 43 : this.awsEbs.hashCode()); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateAwsEc2AssetDetails.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateAwsEc2AssetDetails.java new file mode 100644 index 00000000000..59f3051276f --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateAwsEc2AssetDetails.java @@ -0,0 +1,352 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * Create AWS EC2 VM type of asset. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAwsEc2AssetDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "assetType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateAwsEc2AssetDetails extends CreateAssetDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("inventoryId") + private String inventoryId; + + public Builder inventoryId(String inventoryId) { + this.inventoryId = inventoryId; + this.__explicitlySet__.add("inventoryId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("sourceKey") + private String sourceKey; + + public Builder sourceKey(String sourceKey) { + this.sourceKey = sourceKey; + this.__explicitlySet__.add("sourceKey"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("externalAssetKey") + private String externalAssetKey; + + public Builder externalAssetKey(String externalAssetKey) { + this.externalAssetKey = externalAssetKey; + this.__explicitlySet__.add("externalAssetKey"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("assetSourceIds") + private java.util.List assetSourceIds; + + public Builder assetSourceIds(java.util.List assetSourceIds) { + this.assetSourceIds = assetSourceIds; + this.__explicitlySet__.add("assetSourceIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compute") + private ComputeProperties compute; + + public Builder compute(ComputeProperties compute) { + this.compute = compute; + this.__explicitlySet__.add("compute"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vm") + private VmProperties vm; + + public Builder vm(VmProperties vm) { + this.vm = vm; + this.__explicitlySet__.add("vm"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("awsEc2") + private AwsEc2Properties awsEc2; + + public Builder awsEc2(AwsEc2Properties awsEc2) { + this.awsEc2 = awsEc2; + this.__explicitlySet__.add("awsEc2"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("awsEc2Cost") + private MonthlyCostSummary awsEc2Cost; + + public Builder awsEc2Cost(MonthlyCostSummary awsEc2Cost) { + this.awsEc2Cost = awsEc2Cost; + this.__explicitlySet__.add("awsEc2Cost"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("attachedEbsVolumesCost") + private MonthlyCostSummary attachedEbsVolumesCost; + + public Builder attachedEbsVolumesCost(MonthlyCostSummary attachedEbsVolumesCost) { + this.attachedEbsVolumesCost = attachedEbsVolumesCost; + this.__explicitlySet__.add("attachedEbsVolumesCost"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAwsEc2AssetDetails build() { + CreateAwsEc2AssetDetails model = + new CreateAwsEc2AssetDetails( + this.displayName, + this.inventoryId, + this.compartmentId, + this.sourceKey, + this.externalAssetKey, + this.assetSourceIds, + this.freeformTags, + this.definedTags, + this.compute, + this.vm, + this.awsEc2, + this.awsEc2Cost, + this.attachedEbsVolumesCost); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAwsEc2AssetDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("inventoryId")) { + this.inventoryId(model.getInventoryId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("sourceKey")) { + this.sourceKey(model.getSourceKey()); + } + if (model.wasPropertyExplicitlySet("externalAssetKey")) { + this.externalAssetKey(model.getExternalAssetKey()); + } + if (model.wasPropertyExplicitlySet("assetSourceIds")) { + this.assetSourceIds(model.getAssetSourceIds()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("compute")) { + this.compute(model.getCompute()); + } + if (model.wasPropertyExplicitlySet("vm")) { + this.vm(model.getVm()); + } + if (model.wasPropertyExplicitlySet("awsEc2")) { + this.awsEc2(model.getAwsEc2()); + } + if (model.wasPropertyExplicitlySet("awsEc2Cost")) { + this.awsEc2Cost(model.getAwsEc2Cost()); + } + if (model.wasPropertyExplicitlySet("attachedEbsVolumesCost")) { + this.attachedEbsVolumesCost(model.getAttachedEbsVolumesCost()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateAwsEc2AssetDetails( + String displayName, + String inventoryId, + String compartmentId, + String sourceKey, + String externalAssetKey, + java.util.List assetSourceIds, + java.util.Map freeformTags, + java.util.Map> definedTags, + ComputeProperties compute, + VmProperties vm, + AwsEc2Properties awsEc2, + MonthlyCostSummary awsEc2Cost, + MonthlyCostSummary attachedEbsVolumesCost) { + super( + displayName, + inventoryId, + compartmentId, + sourceKey, + externalAssetKey, + assetSourceIds, + freeformTags, + definedTags); + this.compute = compute; + this.vm = vm; + this.awsEc2 = awsEc2; + this.awsEc2Cost = awsEc2Cost; + this.attachedEbsVolumesCost = attachedEbsVolumesCost; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compute") + private final ComputeProperties compute; + + public ComputeProperties getCompute() { + return compute; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vm") + private final VmProperties vm; + + public VmProperties getVm() { + return vm; + } + + @com.fasterxml.jackson.annotation.JsonProperty("awsEc2") + private final AwsEc2Properties awsEc2; + + public AwsEc2Properties getAwsEc2() { + return awsEc2; + } + + @com.fasterxml.jackson.annotation.JsonProperty("awsEc2Cost") + private final MonthlyCostSummary awsEc2Cost; + + public MonthlyCostSummary getAwsEc2Cost() { + return awsEc2Cost; + } + + @com.fasterxml.jackson.annotation.JsonProperty("attachedEbsVolumesCost") + private final MonthlyCostSummary attachedEbsVolumesCost; + + public MonthlyCostSummary getAttachedEbsVolumesCost() { + return attachedEbsVolumesCost; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateAwsEc2AssetDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", compute=").append(String.valueOf(this.compute)); + sb.append(", vm=").append(String.valueOf(this.vm)); + sb.append(", awsEc2=").append(String.valueOf(this.awsEc2)); + sb.append(", awsEc2Cost=").append(String.valueOf(this.awsEc2Cost)); + sb.append(", attachedEbsVolumesCost=").append(String.valueOf(this.attachedEbsVolumesCost)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAwsEc2AssetDetails)) { + return false; + } + + CreateAwsEc2AssetDetails other = (CreateAwsEc2AssetDetails) o; + return java.util.Objects.equals(this.compute, other.compute) + && java.util.Objects.equals(this.vm, other.vm) + && java.util.Objects.equals(this.awsEc2, other.awsEc2) + && java.util.Objects.equals(this.awsEc2Cost, other.awsEc2Cost) + && java.util.Objects.equals( + this.attachedEbsVolumesCost, other.attachedEbsVolumesCost) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.compute == null ? 43 : this.compute.hashCode()); + result = (result * PRIME) + (this.vm == null ? 43 : this.vm.hashCode()); + result = (result * PRIME) + (this.awsEc2 == null ? 43 : this.awsEc2.hashCode()); + result = (result * PRIME) + (this.awsEc2Cost == null ? 43 : this.awsEc2Cost.hashCode()); + result = + (result * PRIME) + + (this.attachedEbsVolumesCost == null + ? 43 + : this.attachedEbsVolumesCost.hashCode()); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateVmWareAssetSourceDetails.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateVmWareAssetSourceDetails.java index 38671f07f45..a87a5eabd2c 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateVmWareAssetSourceDetails.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/CreateVmWareAssetSourceDetails.java @@ -5,7 +5,7 @@ package com.oracle.bmc.cloudbridge.model; /** - * Description of an asset source. + * VMware asset source creation request. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/GroupIdentifier.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/GroupIdentifier.java new file mode 100644 index 00000000000..c0206c32b45 --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/GroupIdentifier.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * Describes a security group. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = GroupIdentifier.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class GroupIdentifier extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"groupKey", "groupName"}) + public GroupIdentifier(String groupKey, String groupName) { + super(); + this.groupKey = groupKey; + this.groupName = groupName; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The ID of the security group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupKey") + private String groupKey; + + /** + * The ID of the security group. + * @param groupKey the value to set + * @return this builder + **/ + public Builder groupKey(String groupKey) { + this.groupKey = groupKey; + this.__explicitlySet__.add("groupKey"); + return this; + } + /** + * The name of the security group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupName") + private String groupName; + + /** + * The name of the security group. + * @param groupName the value to set + * @return this builder + **/ + public Builder groupName(String groupName) { + this.groupName = groupName; + this.__explicitlySet__.add("groupName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public GroupIdentifier build() { + GroupIdentifier model = new GroupIdentifier(this.groupKey, this.groupName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(GroupIdentifier model) { + if (model.wasPropertyExplicitlySet("groupKey")) { + this.groupKey(model.getGroupKey()); + } + if (model.wasPropertyExplicitlySet("groupName")) { + this.groupName(model.getGroupName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The ID of the security group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupKey") + private final String groupKey; + + /** + * The ID of the security group. + * @return the value + **/ + public String getGroupKey() { + return groupKey; + } + + /** + * The name of the security group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupName") + private final String groupName; + + /** + * The name of the security group. + * @return the value + **/ + public String getGroupName() { + return groupName; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("GroupIdentifier("); + sb.append("super=").append(super.toString()); + sb.append("groupKey=").append(String.valueOf(this.groupKey)); + sb.append(", groupName=").append(String.valueOf(this.groupName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GroupIdentifier)) { + return false; + } + + GroupIdentifier other = (GroupIdentifier) o; + return java.util.Objects.equals(this.groupKey, other.groupKey) + && java.util.Objects.equals(this.groupName, other.groupName) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.groupKey == null ? 43 : this.groupKey.hashCode()); + result = (result * PRIME) + (this.groupName == null ? 43 : this.groupName.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/InstanceNetworkInterface.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/InstanceNetworkInterface.java new file mode 100644 index 00000000000..f7ac404bbc7 --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/InstanceNetworkInterface.java @@ -0,0 +1,690 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * Describes a network interface. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = InstanceNetworkInterface.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class InstanceNetworkInterface + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "association", + "attachment", + "description", + "securityGroups", + "interfaceType", + "ipv4Prefixes", + "ipv6Addresses", + "ipv6Prefixes", + "macAddress", + "networkInterfaceKey", + "ownerKey", + "privateIpAddresses", + "isSourceDestCheck", + "status", + "subnetKey" + }) + public InstanceNetworkInterface( + InstanceNetworkInterfaceAssociation association, + InstanceNetworkInterfaceAttachment attachment, + String description, + java.util.List securityGroups, + String interfaceType, + java.util.List ipv4Prefixes, + java.util.List ipv6Addresses, + java.util.List ipv6Prefixes, + String macAddress, + String networkInterfaceKey, + String ownerKey, + java.util.List privateIpAddresses, + Boolean isSourceDestCheck, + String status, + String subnetKey) { + super(); + this.association = association; + this.attachment = attachment; + this.description = description; + this.securityGroups = securityGroups; + this.interfaceType = interfaceType; + this.ipv4Prefixes = ipv4Prefixes; + this.ipv6Addresses = ipv6Addresses; + this.ipv6Prefixes = ipv6Prefixes; + this.macAddress = macAddress; + this.networkInterfaceKey = networkInterfaceKey; + this.ownerKey = ownerKey; + this.privateIpAddresses = privateIpAddresses; + this.isSourceDestCheck = isSourceDestCheck; + this.status = status; + this.subnetKey = subnetKey; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("association") + private InstanceNetworkInterfaceAssociation association; + + public Builder association(InstanceNetworkInterfaceAssociation association) { + this.association = association; + this.__explicitlySet__.add("association"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("attachment") + private InstanceNetworkInterfaceAttachment attachment; + + public Builder attachment(InstanceNetworkInterfaceAttachment attachment) { + this.attachment = attachment; + this.__explicitlySet__.add("attachment"); + return this; + } + /** + * The description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The security groups. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityGroups") + private java.util.List securityGroups; + + /** + * The security groups. + * @param securityGroups the value to set + * @return this builder + **/ + public Builder securityGroups(java.util.List securityGroups) { + this.securityGroups = securityGroups; + this.__explicitlySet__.add("securityGroups"); + return this; + } + /** + * The type of network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("interfaceType") + private String interfaceType; + + /** + * The type of network interface. + * @param interfaceType the value to set + * @return this builder + **/ + public Builder interfaceType(String interfaceType) { + this.interfaceType = interfaceType; + this.__explicitlySet__.add("interfaceType"); + return this; + } + /** + * The IPv4 delegated prefixes that are assigned to the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipv4Prefixes") + private java.util.List ipv4Prefixes; + + /** + * The IPv4 delegated prefixes that are assigned to the network interface. + * @param ipv4Prefixes the value to set + * @return this builder + **/ + public Builder ipv4Prefixes(java.util.List ipv4Prefixes) { + this.ipv4Prefixes = ipv4Prefixes; + this.__explicitlySet__.add("ipv4Prefixes"); + return this; + } + /** + * The IPv6 addresses associated with the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipv6Addresses") + private java.util.List ipv6Addresses; + + /** + * The IPv6 addresses associated with the network interface. + * @param ipv6Addresses the value to set + * @return this builder + **/ + public Builder ipv6Addresses(java.util.List ipv6Addresses) { + this.ipv6Addresses = ipv6Addresses; + this.__explicitlySet__.add("ipv6Addresses"); + return this; + } + /** + * The IPv6 delegated prefixes that are assigned to the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipv6Prefixes") + private java.util.List ipv6Prefixes; + + /** + * The IPv6 delegated prefixes that are assigned to the network interface. + * @param ipv6Prefixes the value to set + * @return this builder + **/ + public Builder ipv6Prefixes(java.util.List ipv6Prefixes) { + this.ipv6Prefixes = ipv6Prefixes; + this.__explicitlySet__.add("ipv6Prefixes"); + return this; + } + /** + * The MAC address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("macAddress") + private String macAddress; + + /** + * The MAC address. + * @param macAddress the value to set + * @return this builder + **/ + public Builder macAddress(String macAddress) { + this.macAddress = macAddress; + this.__explicitlySet__.add("macAddress"); + return this; + } + /** + * The ID of the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("networkInterfaceKey") + private String networkInterfaceKey; + + /** + * The ID of the network interface. + * @param networkInterfaceKey the value to set + * @return this builder + **/ + public Builder networkInterfaceKey(String networkInterfaceKey) { + this.networkInterfaceKey = networkInterfaceKey; + this.__explicitlySet__.add("networkInterfaceKey"); + return this; + } + /** + * The ID of the AWS account that created the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ownerKey") + private String ownerKey; + + /** + * The ID of the AWS account that created the network interface. + * @param ownerKey the value to set + * @return this builder + **/ + public Builder ownerKey(String ownerKey) { + this.ownerKey = ownerKey; + this.__explicitlySet__.add("ownerKey"); + return this; + } + /** + * The private IPv4 addresses associated with the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateIpAddresses") + private java.util.List privateIpAddresses; + + /** + * The private IPv4 addresses associated with the network interface. + * @param privateIpAddresses the value to set + * @return this builder + **/ + public Builder privateIpAddresses( + java.util.List privateIpAddresses) { + this.privateIpAddresses = privateIpAddresses; + this.__explicitlySet__.add("privateIpAddresses"); + return this; + } + /** + * Indicates whether source/destination checking is enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSourceDestCheck") + private Boolean isSourceDestCheck; + + /** + * Indicates whether source/destination checking is enabled. + * @param isSourceDestCheck the value to set + * @return this builder + **/ + public Builder isSourceDestCheck(Boolean isSourceDestCheck) { + this.isSourceDestCheck = isSourceDestCheck; + this.__explicitlySet__.add("isSourceDestCheck"); + return this; + } + /** + * The status of the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private String status; + + /** + * The status of the network interface. + * @param status the value to set + * @return this builder + **/ + public Builder status(String status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The ID of the subnet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetKey") + private String subnetKey; + + /** + * The ID of the subnet. + * @param subnetKey the value to set + * @return this builder + **/ + public Builder subnetKey(String subnetKey) { + this.subnetKey = subnetKey; + this.__explicitlySet__.add("subnetKey"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public InstanceNetworkInterface build() { + InstanceNetworkInterface model = + new InstanceNetworkInterface( + this.association, + this.attachment, + this.description, + this.securityGroups, + this.interfaceType, + this.ipv4Prefixes, + this.ipv6Addresses, + this.ipv6Prefixes, + this.macAddress, + this.networkInterfaceKey, + this.ownerKey, + this.privateIpAddresses, + this.isSourceDestCheck, + this.status, + this.subnetKey); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(InstanceNetworkInterface model) { + if (model.wasPropertyExplicitlySet("association")) { + this.association(model.getAssociation()); + } + if (model.wasPropertyExplicitlySet("attachment")) { + this.attachment(model.getAttachment()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("securityGroups")) { + this.securityGroups(model.getSecurityGroups()); + } + if (model.wasPropertyExplicitlySet("interfaceType")) { + this.interfaceType(model.getInterfaceType()); + } + if (model.wasPropertyExplicitlySet("ipv4Prefixes")) { + this.ipv4Prefixes(model.getIpv4Prefixes()); + } + if (model.wasPropertyExplicitlySet("ipv6Addresses")) { + this.ipv6Addresses(model.getIpv6Addresses()); + } + if (model.wasPropertyExplicitlySet("ipv6Prefixes")) { + this.ipv6Prefixes(model.getIpv6Prefixes()); + } + if (model.wasPropertyExplicitlySet("macAddress")) { + this.macAddress(model.getMacAddress()); + } + if (model.wasPropertyExplicitlySet("networkInterfaceKey")) { + this.networkInterfaceKey(model.getNetworkInterfaceKey()); + } + if (model.wasPropertyExplicitlySet("ownerKey")) { + this.ownerKey(model.getOwnerKey()); + } + if (model.wasPropertyExplicitlySet("privateIpAddresses")) { + this.privateIpAddresses(model.getPrivateIpAddresses()); + } + if (model.wasPropertyExplicitlySet("isSourceDestCheck")) { + this.isSourceDestCheck(model.getIsSourceDestCheck()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("subnetKey")) { + this.subnetKey(model.getSubnetKey()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("association") + private final InstanceNetworkInterfaceAssociation association; + + public InstanceNetworkInterfaceAssociation getAssociation() { + return association; + } + + @com.fasterxml.jackson.annotation.JsonProperty("attachment") + private final InstanceNetworkInterfaceAttachment attachment; + + public InstanceNetworkInterfaceAttachment getAttachment() { + return attachment; + } + + /** + * The description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The security groups. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityGroups") + private final java.util.List securityGroups; + + /** + * The security groups. + * @return the value + **/ + public java.util.List getSecurityGroups() { + return securityGroups; + } + + /** + * The type of network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("interfaceType") + private final String interfaceType; + + /** + * The type of network interface. + * @return the value + **/ + public String getInterfaceType() { + return interfaceType; + } + + /** + * The IPv4 delegated prefixes that are assigned to the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipv4Prefixes") + private final java.util.List ipv4Prefixes; + + /** + * The IPv4 delegated prefixes that are assigned to the network interface. + * @return the value + **/ + public java.util.List getIpv4Prefixes() { + return ipv4Prefixes; + } + + /** + * The IPv6 addresses associated with the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipv6Addresses") + private final java.util.List ipv6Addresses; + + /** + * The IPv6 addresses associated with the network interface. + * @return the value + **/ + public java.util.List getIpv6Addresses() { + return ipv6Addresses; + } + + /** + * The IPv6 delegated prefixes that are assigned to the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipv6Prefixes") + private final java.util.List ipv6Prefixes; + + /** + * The IPv6 delegated prefixes that are assigned to the network interface. + * @return the value + **/ + public java.util.List getIpv6Prefixes() { + return ipv6Prefixes; + } + + /** + * The MAC address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("macAddress") + private final String macAddress; + + /** + * The MAC address. + * @return the value + **/ + public String getMacAddress() { + return macAddress; + } + + /** + * The ID of the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("networkInterfaceKey") + private final String networkInterfaceKey; + + /** + * The ID of the network interface. + * @return the value + **/ + public String getNetworkInterfaceKey() { + return networkInterfaceKey; + } + + /** + * The ID of the AWS account that created the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ownerKey") + private final String ownerKey; + + /** + * The ID of the AWS account that created the network interface. + * @return the value + **/ + public String getOwnerKey() { + return ownerKey; + } + + /** + * The private IPv4 addresses associated with the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateIpAddresses") + private final java.util.List privateIpAddresses; + + /** + * The private IPv4 addresses associated with the network interface. + * @return the value + **/ + public java.util.List getPrivateIpAddresses() { + return privateIpAddresses; + } + + /** + * Indicates whether source/destination checking is enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSourceDestCheck") + private final Boolean isSourceDestCheck; + + /** + * Indicates whether source/destination checking is enabled. + * @return the value + **/ + public Boolean getIsSourceDestCheck() { + return isSourceDestCheck; + } + + /** + * The status of the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final String status; + + /** + * The status of the network interface. + * @return the value + **/ + public String getStatus() { + return status; + } + + /** + * The ID of the subnet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetKey") + private final String subnetKey; + + /** + * The ID of the subnet. + * @return the value + **/ + public String getSubnetKey() { + return subnetKey; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("InstanceNetworkInterface("); + sb.append("super=").append(super.toString()); + sb.append("association=").append(String.valueOf(this.association)); + sb.append(", attachment=").append(String.valueOf(this.attachment)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", securityGroups=").append(String.valueOf(this.securityGroups)); + sb.append(", interfaceType=").append(String.valueOf(this.interfaceType)); + sb.append(", ipv4Prefixes=").append(String.valueOf(this.ipv4Prefixes)); + sb.append(", ipv6Addresses=").append(String.valueOf(this.ipv6Addresses)); + sb.append(", ipv6Prefixes=").append(String.valueOf(this.ipv6Prefixes)); + sb.append(", macAddress=").append(String.valueOf(this.macAddress)); + sb.append(", networkInterfaceKey=").append(String.valueOf(this.networkInterfaceKey)); + sb.append(", ownerKey=").append(String.valueOf(this.ownerKey)); + sb.append(", privateIpAddresses=").append(String.valueOf(this.privateIpAddresses)); + sb.append(", isSourceDestCheck=").append(String.valueOf(this.isSourceDestCheck)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", subnetKey=").append(String.valueOf(this.subnetKey)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof InstanceNetworkInterface)) { + return false; + } + + InstanceNetworkInterface other = (InstanceNetworkInterface) o; + return java.util.Objects.equals(this.association, other.association) + && java.util.Objects.equals(this.attachment, other.attachment) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.securityGroups, other.securityGroups) + && java.util.Objects.equals(this.interfaceType, other.interfaceType) + && java.util.Objects.equals(this.ipv4Prefixes, other.ipv4Prefixes) + && java.util.Objects.equals(this.ipv6Addresses, other.ipv6Addresses) + && java.util.Objects.equals(this.ipv6Prefixes, other.ipv6Prefixes) + && java.util.Objects.equals(this.macAddress, other.macAddress) + && java.util.Objects.equals(this.networkInterfaceKey, other.networkInterfaceKey) + && java.util.Objects.equals(this.ownerKey, other.ownerKey) + && java.util.Objects.equals(this.privateIpAddresses, other.privateIpAddresses) + && java.util.Objects.equals(this.isSourceDestCheck, other.isSourceDestCheck) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.subnetKey, other.subnetKey) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.association == null ? 43 : this.association.hashCode()); + result = (result * PRIME) + (this.attachment == null ? 43 : this.attachment.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.securityGroups == null ? 43 : this.securityGroups.hashCode()); + result = + (result * PRIME) + + (this.interfaceType == null ? 43 : this.interfaceType.hashCode()); + result = (result * PRIME) + (this.ipv4Prefixes == null ? 43 : this.ipv4Prefixes.hashCode()); + result = + (result * PRIME) + + (this.ipv6Addresses == null ? 43 : this.ipv6Addresses.hashCode()); + result = (result * PRIME) + (this.ipv6Prefixes == null ? 43 : this.ipv6Prefixes.hashCode()); + result = (result * PRIME) + (this.macAddress == null ? 43 : this.macAddress.hashCode()); + result = + (result * PRIME) + + (this.networkInterfaceKey == null + ? 43 + : this.networkInterfaceKey.hashCode()); + result = (result * PRIME) + (this.ownerKey == null ? 43 : this.ownerKey.hashCode()); + result = + (result * PRIME) + + (this.privateIpAddresses == null + ? 43 + : this.privateIpAddresses.hashCode()); + result = + (result * PRIME) + + (this.isSourceDestCheck == null ? 43 : this.isSourceDestCheck.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.subnetKey == null ? 43 : this.subnetKey.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/InstanceNetworkInterfaceAssociation.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/InstanceNetworkInterfaceAssociation.java new file mode 100644 index 00000000000..f3cd910da0f --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/InstanceNetworkInterfaceAssociation.java @@ -0,0 +1,305 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * Describes association information for an Elastic IP address (IPv4). + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = InstanceNetworkInterfaceAssociation.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class InstanceNetworkInterfaceAssociation + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "carrierIp", + "customerOwnedIp", + "ipOwnerKey", + "publicDnsName", + "publicIp" + }) + public InstanceNetworkInterfaceAssociation( + String carrierIp, + String customerOwnedIp, + String ipOwnerKey, + String publicDnsName, + String publicIp) { + super(); + this.carrierIp = carrierIp; + this.customerOwnedIp = customerOwnedIp; + this.ipOwnerKey = ipOwnerKey; + this.publicDnsName = publicDnsName; + this.publicIp = publicIp; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The carrier IP address associated with the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("carrierIp") + private String carrierIp; + + /** + * The carrier IP address associated with the network interface. + * @param carrierIp the value to set + * @return this builder + **/ + public Builder carrierIp(String carrierIp) { + this.carrierIp = carrierIp; + this.__explicitlySet__.add("carrierIp"); + return this; + } + /** + * The customer-owned IP address associated with the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerOwnedIp") + private String customerOwnedIp; + + /** + * The customer-owned IP address associated with the network interface. + * @param customerOwnedIp the value to set + * @return this builder + **/ + public Builder customerOwnedIp(String customerOwnedIp) { + this.customerOwnedIp = customerOwnedIp; + this.__explicitlySet__.add("customerOwnedIp"); + return this; + } + /** + * The ID of the owner of the Elastic IP address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipOwnerKey") + private String ipOwnerKey; + + /** + * The ID of the owner of the Elastic IP address. + * @param ipOwnerKey the value to set + * @return this builder + **/ + public Builder ipOwnerKey(String ipOwnerKey) { + this.ipOwnerKey = ipOwnerKey; + this.__explicitlySet__.add("ipOwnerKey"); + return this; + } + /** + * The public DNS name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("publicDnsName") + private String publicDnsName; + + /** + * The public DNS name. + * @param publicDnsName the value to set + * @return this builder + **/ + public Builder publicDnsName(String publicDnsName) { + this.publicDnsName = publicDnsName; + this.__explicitlySet__.add("publicDnsName"); + return this; + } + /** + * The public IP address or Elastic IP address bound to the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("publicIp") + private String publicIp; + + /** + * The public IP address or Elastic IP address bound to the network interface. + * @param publicIp the value to set + * @return this builder + **/ + public Builder publicIp(String publicIp) { + this.publicIp = publicIp; + this.__explicitlySet__.add("publicIp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public InstanceNetworkInterfaceAssociation build() { + InstanceNetworkInterfaceAssociation model = + new InstanceNetworkInterfaceAssociation( + this.carrierIp, + this.customerOwnedIp, + this.ipOwnerKey, + this.publicDnsName, + this.publicIp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(InstanceNetworkInterfaceAssociation model) { + if (model.wasPropertyExplicitlySet("carrierIp")) { + this.carrierIp(model.getCarrierIp()); + } + if (model.wasPropertyExplicitlySet("customerOwnedIp")) { + this.customerOwnedIp(model.getCustomerOwnedIp()); + } + if (model.wasPropertyExplicitlySet("ipOwnerKey")) { + this.ipOwnerKey(model.getIpOwnerKey()); + } + if (model.wasPropertyExplicitlySet("publicDnsName")) { + this.publicDnsName(model.getPublicDnsName()); + } + if (model.wasPropertyExplicitlySet("publicIp")) { + this.publicIp(model.getPublicIp()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The carrier IP address associated with the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("carrierIp") + private final String carrierIp; + + /** + * The carrier IP address associated with the network interface. + * @return the value + **/ + public String getCarrierIp() { + return carrierIp; + } + + /** + * The customer-owned IP address associated with the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerOwnedIp") + private final String customerOwnedIp; + + /** + * The customer-owned IP address associated with the network interface. + * @return the value + **/ + public String getCustomerOwnedIp() { + return customerOwnedIp; + } + + /** + * The ID of the owner of the Elastic IP address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipOwnerKey") + private final String ipOwnerKey; + + /** + * The ID of the owner of the Elastic IP address. + * @return the value + **/ + public String getIpOwnerKey() { + return ipOwnerKey; + } + + /** + * The public DNS name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("publicDnsName") + private final String publicDnsName; + + /** + * The public DNS name. + * @return the value + **/ + public String getPublicDnsName() { + return publicDnsName; + } + + /** + * The public IP address or Elastic IP address bound to the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("publicIp") + private final String publicIp; + + /** + * The public IP address or Elastic IP address bound to the network interface. + * @return the value + **/ + public String getPublicIp() { + return publicIp; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("InstanceNetworkInterfaceAssociation("); + sb.append("super=").append(super.toString()); + sb.append("carrierIp=").append(String.valueOf(this.carrierIp)); + sb.append(", customerOwnedIp=").append(String.valueOf(this.customerOwnedIp)); + sb.append(", ipOwnerKey=").append(String.valueOf(this.ipOwnerKey)); + sb.append(", publicDnsName=").append(String.valueOf(this.publicDnsName)); + sb.append(", publicIp=").append(String.valueOf(this.publicIp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof InstanceNetworkInterfaceAssociation)) { + return false; + } + + InstanceNetworkInterfaceAssociation other = (InstanceNetworkInterfaceAssociation) o; + return java.util.Objects.equals(this.carrierIp, other.carrierIp) + && java.util.Objects.equals(this.customerOwnedIp, other.customerOwnedIp) + && java.util.Objects.equals(this.ipOwnerKey, other.ipOwnerKey) + && java.util.Objects.equals(this.publicDnsName, other.publicDnsName) + && java.util.Objects.equals(this.publicIp, other.publicIp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.carrierIp == null ? 43 : this.carrierIp.hashCode()); + result = + (result * PRIME) + + (this.customerOwnedIp == null ? 43 : this.customerOwnedIp.hashCode()); + result = (result * PRIME) + (this.ipOwnerKey == null ? 43 : this.ipOwnerKey.hashCode()); + result = + (result * PRIME) + + (this.publicDnsName == null ? 43 : this.publicDnsName.hashCode()); + result = (result * PRIME) + (this.publicIp == null ? 43 : this.publicIp.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/InstanceNetworkInterfaceAttachment.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/InstanceNetworkInterfaceAttachment.java new file mode 100644 index 00000000000..97c29cb1588 --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/InstanceNetworkInterfaceAttachment.java @@ -0,0 +1,349 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * Describes a network interface attachment. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = InstanceNetworkInterfaceAttachment.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class InstanceNetworkInterfaceAttachment + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "attachmentKey", + "timeAttach", + "isDeleteOnTermination", + "deviceIndex", + "networkCardIndex", + "status" + }) + public InstanceNetworkInterfaceAttachment( + String attachmentKey, + java.util.Date timeAttach, + Boolean isDeleteOnTermination, + Integer deviceIndex, + Integer networkCardIndex, + String status) { + super(); + this.attachmentKey = attachmentKey; + this.timeAttach = timeAttach; + this.isDeleteOnTermination = isDeleteOnTermination; + this.deviceIndex = deviceIndex; + this.networkCardIndex = networkCardIndex; + this.status = status; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The ID of the network interface attachment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attachmentKey") + private String attachmentKey; + + /** + * The ID of the network interface attachment. + * @param attachmentKey the value to set + * @return this builder + **/ + public Builder attachmentKey(String attachmentKey) { + this.attachmentKey = attachmentKey; + this.__explicitlySet__.add("attachmentKey"); + return this; + } + /** + * The timestamp when the attachment initiated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAttach") + private java.util.Date timeAttach; + + /** + * The timestamp when the attachment initiated. + * @param timeAttach the value to set + * @return this builder + **/ + public Builder timeAttach(java.util.Date timeAttach) { + this.timeAttach = timeAttach; + this.__explicitlySet__.add("timeAttach"); + return this; + } + /** + * Indicates whether the network interface is deleted when the instance is terminated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDeleteOnTermination") + private Boolean isDeleteOnTermination; + + /** + * Indicates whether the network interface is deleted when the instance is terminated. + * @param isDeleteOnTermination the value to set + * @return this builder + **/ + public Builder isDeleteOnTermination(Boolean isDeleteOnTermination) { + this.isDeleteOnTermination = isDeleteOnTermination; + this.__explicitlySet__.add("isDeleteOnTermination"); + return this; + } + /** + * The index of the device on the instance for the network interface attachment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deviceIndex") + private Integer deviceIndex; + + /** + * The index of the device on the instance for the network interface attachment. + * @param deviceIndex the value to set + * @return this builder + **/ + public Builder deviceIndex(Integer deviceIndex) { + this.deviceIndex = deviceIndex; + this.__explicitlySet__.add("deviceIndex"); + return this; + } + /** + * The index of the network card. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("networkCardIndex") + private Integer networkCardIndex; + + /** + * The index of the network card. + * @param networkCardIndex the value to set + * @return this builder + **/ + public Builder networkCardIndex(Integer networkCardIndex) { + this.networkCardIndex = networkCardIndex; + this.__explicitlySet__.add("networkCardIndex"); + return this; + } + /** + * The attachment state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private String status; + + /** + * The attachment state. + * @param status the value to set + * @return this builder + **/ + public Builder status(String status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public InstanceNetworkInterfaceAttachment build() { + InstanceNetworkInterfaceAttachment model = + new InstanceNetworkInterfaceAttachment( + this.attachmentKey, + this.timeAttach, + this.isDeleteOnTermination, + this.deviceIndex, + this.networkCardIndex, + this.status); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(InstanceNetworkInterfaceAttachment model) { + if (model.wasPropertyExplicitlySet("attachmentKey")) { + this.attachmentKey(model.getAttachmentKey()); + } + if (model.wasPropertyExplicitlySet("timeAttach")) { + this.timeAttach(model.getTimeAttach()); + } + if (model.wasPropertyExplicitlySet("isDeleteOnTermination")) { + this.isDeleteOnTermination(model.getIsDeleteOnTermination()); + } + if (model.wasPropertyExplicitlySet("deviceIndex")) { + this.deviceIndex(model.getDeviceIndex()); + } + if (model.wasPropertyExplicitlySet("networkCardIndex")) { + this.networkCardIndex(model.getNetworkCardIndex()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The ID of the network interface attachment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attachmentKey") + private final String attachmentKey; + + /** + * The ID of the network interface attachment. + * @return the value + **/ + public String getAttachmentKey() { + return attachmentKey; + } + + /** + * The timestamp when the attachment initiated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAttach") + private final java.util.Date timeAttach; + + /** + * The timestamp when the attachment initiated. + * @return the value + **/ + public java.util.Date getTimeAttach() { + return timeAttach; + } + + /** + * Indicates whether the network interface is deleted when the instance is terminated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDeleteOnTermination") + private final Boolean isDeleteOnTermination; + + /** + * Indicates whether the network interface is deleted when the instance is terminated. + * @return the value + **/ + public Boolean getIsDeleteOnTermination() { + return isDeleteOnTermination; + } + + /** + * The index of the device on the instance for the network interface attachment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deviceIndex") + private final Integer deviceIndex; + + /** + * The index of the device on the instance for the network interface attachment. + * @return the value + **/ + public Integer getDeviceIndex() { + return deviceIndex; + } + + /** + * The index of the network card. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("networkCardIndex") + private final Integer networkCardIndex; + + /** + * The index of the network card. + * @return the value + **/ + public Integer getNetworkCardIndex() { + return networkCardIndex; + } + + /** + * The attachment state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final String status; + + /** + * The attachment state. + * @return the value + **/ + public String getStatus() { + return status; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("InstanceNetworkInterfaceAttachment("); + sb.append("super=").append(super.toString()); + sb.append("attachmentKey=").append(String.valueOf(this.attachmentKey)); + sb.append(", timeAttach=").append(String.valueOf(this.timeAttach)); + sb.append(", isDeleteOnTermination=").append(String.valueOf(this.isDeleteOnTermination)); + sb.append(", deviceIndex=").append(String.valueOf(this.deviceIndex)); + sb.append(", networkCardIndex=").append(String.valueOf(this.networkCardIndex)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof InstanceNetworkInterfaceAttachment)) { + return false; + } + + InstanceNetworkInterfaceAttachment other = (InstanceNetworkInterfaceAttachment) o; + return java.util.Objects.equals(this.attachmentKey, other.attachmentKey) + && java.util.Objects.equals(this.timeAttach, other.timeAttach) + && java.util.Objects.equals(this.isDeleteOnTermination, other.isDeleteOnTermination) + && java.util.Objects.equals(this.deviceIndex, other.deviceIndex) + && java.util.Objects.equals(this.networkCardIndex, other.networkCardIndex) + && java.util.Objects.equals(this.status, other.status) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.attachmentKey == null ? 43 : this.attachmentKey.hashCode()); + result = (result * PRIME) + (this.timeAttach == null ? 43 : this.timeAttach.hashCode()); + result = + (result * PRIME) + + (this.isDeleteOnTermination == null + ? 43 + : this.isDeleteOnTermination.hashCode()); + result = (result * PRIME) + (this.deviceIndex == null ? 43 : this.deviceIndex.hashCode()); + result = + (result * PRIME) + + (this.networkCardIndex == null ? 43 : this.networkCardIndex.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/InstancePrivateIpAddress.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/InstancePrivateIpAddress.java new file mode 100644 index 00000000000..68b41b1d087 --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/InstancePrivateIpAddress.java @@ -0,0 +1,251 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * Describes a private IPv4 address. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = InstancePrivateIpAddress.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class InstancePrivateIpAddress + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "association", + "isPrimary", + "privateDnsName", + "privateIpAddress" + }) + public InstancePrivateIpAddress( + InstanceNetworkInterfaceAssociation association, + Boolean isPrimary, + String privateDnsName, + String privateIpAddress) { + super(); + this.association = association; + this.isPrimary = isPrimary; + this.privateDnsName = privateDnsName; + this.privateIpAddress = privateIpAddress; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("association") + private InstanceNetworkInterfaceAssociation association; + + public Builder association(InstanceNetworkInterfaceAssociation association) { + this.association = association; + this.__explicitlySet__.add("association"); + return this; + } + /** + * Indicates whether this IPv4 address is the primary private IP address of the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isPrimary") + private Boolean isPrimary; + + /** + * Indicates whether this IPv4 address is the primary private IP address of the network interface. + * @param isPrimary the value to set + * @return this builder + **/ + public Builder isPrimary(Boolean isPrimary) { + this.isPrimary = isPrimary; + this.__explicitlySet__.add("isPrimary"); + return this; + } + /** + * The private IPv4 DNS name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateDnsName") + private String privateDnsName; + + /** + * The private IPv4 DNS name. + * @param privateDnsName the value to set + * @return this builder + **/ + public Builder privateDnsName(String privateDnsName) { + this.privateDnsName = privateDnsName; + this.__explicitlySet__.add("privateDnsName"); + return this; + } + /** + * The private IPv4 address of the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateIpAddress") + private String privateIpAddress; + + /** + * The private IPv4 address of the network interface. + * @param privateIpAddress the value to set + * @return this builder + **/ + public Builder privateIpAddress(String privateIpAddress) { + this.privateIpAddress = privateIpAddress; + this.__explicitlySet__.add("privateIpAddress"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public InstancePrivateIpAddress build() { + InstancePrivateIpAddress model = + new InstancePrivateIpAddress( + this.association, + this.isPrimary, + this.privateDnsName, + this.privateIpAddress); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(InstancePrivateIpAddress model) { + if (model.wasPropertyExplicitlySet("association")) { + this.association(model.getAssociation()); + } + if (model.wasPropertyExplicitlySet("isPrimary")) { + this.isPrimary(model.getIsPrimary()); + } + if (model.wasPropertyExplicitlySet("privateDnsName")) { + this.privateDnsName(model.getPrivateDnsName()); + } + if (model.wasPropertyExplicitlySet("privateIpAddress")) { + this.privateIpAddress(model.getPrivateIpAddress()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("association") + private final InstanceNetworkInterfaceAssociation association; + + public InstanceNetworkInterfaceAssociation getAssociation() { + return association; + } + + /** + * Indicates whether this IPv4 address is the primary private IP address of the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isPrimary") + private final Boolean isPrimary; + + /** + * Indicates whether this IPv4 address is the primary private IP address of the network interface. + * @return the value + **/ + public Boolean getIsPrimary() { + return isPrimary; + } + + /** + * The private IPv4 DNS name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateDnsName") + private final String privateDnsName; + + /** + * The private IPv4 DNS name. + * @return the value + **/ + public String getPrivateDnsName() { + return privateDnsName; + } + + /** + * The private IPv4 address of the network interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateIpAddress") + private final String privateIpAddress; + + /** + * The private IPv4 address of the network interface. + * @return the value + **/ + public String getPrivateIpAddress() { + return privateIpAddress; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("InstancePrivateIpAddress("); + sb.append("super=").append(super.toString()); + sb.append("association=").append(String.valueOf(this.association)); + sb.append(", isPrimary=").append(String.valueOf(this.isPrimary)); + sb.append(", privateDnsName=").append(String.valueOf(this.privateDnsName)); + sb.append(", privateIpAddress=").append(String.valueOf(this.privateIpAddress)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof InstancePrivateIpAddress)) { + return false; + } + + InstancePrivateIpAddress other = (InstancePrivateIpAddress) o; + return java.util.Objects.equals(this.association, other.association) + && java.util.Objects.equals(this.isPrimary, other.isPrimary) + && java.util.Objects.equals(this.privateDnsName, other.privateDnsName) + && java.util.Objects.equals(this.privateIpAddress, other.privateIpAddress) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.association == null ? 43 : this.association.hashCode()); + result = (result * PRIME) + (this.isPrimary == null ? 43 : this.isPrimary.hashCode()); + result = + (result * PRIME) + + (this.privateDnsName == null ? 43 : this.privateDnsName.hashCode()); + result = + (result * PRIME) + + (this.privateIpAddress == null ? 43 : this.privateIpAddress.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/InstanceState.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/InstanceState.java new file mode 100644 index 00000000000..a497b706885 --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/InstanceState.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * Describes the current state of an instance. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = InstanceState.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class InstanceState extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"code", "name"}) + public InstanceState(Integer code, String name) { + super(); + this.code = code; + this.name = name; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The state of the instance as a 16-bit unsigned integer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("code") + private Integer code; + + /** + * The state of the instance as a 16-bit unsigned integer. + * @param code the value to set + * @return this builder + **/ + public Builder code(Integer code) { + this.code = code; + this.__explicitlySet__.add("code"); + return this; + } + /** + * The current state of the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The current state of the instance. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public InstanceState build() { + InstanceState model = new InstanceState(this.code, this.name); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(InstanceState model) { + if (model.wasPropertyExplicitlySet("code")) { + this.code(model.getCode()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The state of the instance as a 16-bit unsigned integer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("code") + private final Integer code; + + /** + * The state of the instance as a 16-bit unsigned integer. + * @return the value + **/ + public Integer getCode() { + return code; + } + + /** + * The current state of the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The current state of the instance. + * @return the value + **/ + public String getName() { + return name; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("InstanceState("); + sb.append("super=").append(super.toString()); + sb.append("code=").append(String.valueOf(this.code)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof InstanceState)) { + return false; + } + + InstanceState other = (InstanceState) o; + return java.util.Objects.equals(this.code, other.code) + && java.util.Objects.equals(this.name, other.name) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.code == null ? 43 : this.code.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/MonthlyCostSummary.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/MonthlyCostSummary.java new file mode 100644 index 00000000000..d7b5b9b915b --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/MonthlyCostSummary.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * Cost information for monthly maintenance. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MonthlyCostSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MonthlyCostSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"amount", "currencyCode"}) + public MonthlyCostSummary(Double amount, String currencyCode) { + super(); + this.amount = amount; + this.currencyCode = currencyCode; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Monthly costs for maintenance of this asset. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("amount") + private Double amount; + + /** + * Monthly costs for maintenance of this asset. + * @param amount the value to set + * @return this builder + **/ + public Builder amount(Double amount) { + this.amount = amount; + this.__explicitlySet__.add("amount"); + return this; + } + /** + * Currency code as defined by ISO-4217. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("currencyCode") + private String currencyCode; + + /** + * Currency code as defined by ISO-4217. + * @param currencyCode the value to set + * @return this builder + **/ + public Builder currencyCode(String currencyCode) { + this.currencyCode = currencyCode; + this.__explicitlySet__.add("currencyCode"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MonthlyCostSummary build() { + MonthlyCostSummary model = new MonthlyCostSummary(this.amount, this.currencyCode); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MonthlyCostSummary model) { + if (model.wasPropertyExplicitlySet("amount")) { + this.amount(model.getAmount()); + } + if (model.wasPropertyExplicitlySet("currencyCode")) { + this.currencyCode(model.getCurrencyCode()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Monthly costs for maintenance of this asset. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("amount") + private final Double amount; + + /** + * Monthly costs for maintenance of this asset. + * @return the value + **/ + public Double getAmount() { + return amount; + } + + /** + * Currency code as defined by ISO-4217. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("currencyCode") + private final String currencyCode; + + /** + * Currency code as defined by ISO-4217. + * @return the value + **/ + public String getCurrencyCode() { + return currencyCode; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MonthlyCostSummary("); + sb.append("super=").append(super.toString()); + sb.append("amount=").append(String.valueOf(this.amount)); + sb.append(", currencyCode=").append(String.valueOf(this.currencyCode)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MonthlyCostSummary)) { + return false; + } + + MonthlyCostSummary other = (MonthlyCostSummary) o; + return java.util.Objects.equals(this.amount, other.amount) + && java.util.Objects.equals(this.currencyCode, other.currencyCode) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.amount == null ? 43 : this.amount.hashCode()); + result = (result * PRIME) + (this.currencyCode == null ? 43 : this.currencyCode.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/OperationType.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/OperationType.java index 21f5bb0cdf6..0663ab6b7b5 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/OperationType.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/OperationType.java @@ -28,6 +28,9 @@ public enum OperationType { RefreshAssetSource("REFRESH_ASSET_SOURCE"), CreateAssetSource("CREATE_ASSET_SOURCE"), UpdateAssetSource("UPDATE_ASSET_SOURCE"), + CloudAwsDiscovery("CLOUD_AWS_DISCOVERY"), + CollectAwsRealtimeMetrics("COLLECT_AWS_REALTIME_METRICS"), + CollectAwsHistoricalMetrics("COLLECT_AWS_HISTORICAL_METRICS"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/Placement.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/Placement.java new file mode 100644 index 00000000000..48d40cdd9cc --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/Placement.java @@ -0,0 +1,426 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * Describes the placement of an instance. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Placement.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Placement extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "affinity", + "availabilityZone", + "groupName", + "hostKey", + "hostResourceGroupArn", + "partitionNumber", + "spreadDomain", + "tenancy" + }) + public Placement( + String affinity, + String availabilityZone, + String groupName, + String hostKey, + String hostResourceGroupArn, + Integer partitionNumber, + String spreadDomain, + String tenancy) { + super(); + this.affinity = affinity; + this.availabilityZone = availabilityZone; + this.groupName = groupName; + this.hostKey = hostKey; + this.hostResourceGroupArn = hostResourceGroupArn; + this.partitionNumber = partitionNumber; + this.spreadDomain = spreadDomain; + this.tenancy = tenancy; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The affinity setting for the instance on the Dedicated Host. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("affinity") + private String affinity; + + /** + * The affinity setting for the instance on the Dedicated Host. + * @param affinity the value to set + * @return this builder + **/ + public Builder affinity(String affinity) { + this.affinity = affinity; + this.__explicitlySet__.add("affinity"); + return this; + } + /** + * The Availability Zone of the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityZone") + private String availabilityZone; + + /** + * The Availability Zone of the instance. + * @param availabilityZone the value to set + * @return this builder + **/ + public Builder availabilityZone(String availabilityZone) { + this.availabilityZone = availabilityZone; + this.__explicitlySet__.add("availabilityZone"); + return this; + } + /** + * The name of the placement group the instance is in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupName") + private String groupName; + + /** + * The name of the placement group the instance is in. + * @param groupName the value to set + * @return this builder + **/ + public Builder groupName(String groupName) { + this.groupName = groupName; + this.__explicitlySet__.add("groupName"); + return this; + } + /** + * The ID of the Dedicated Host on which the instance resides. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hostKey") + private String hostKey; + + /** + * The ID of the Dedicated Host on which the instance resides. + * @param hostKey the value to set + * @return this builder + **/ + public Builder hostKey(String hostKey) { + this.hostKey = hostKey; + this.__explicitlySet__.add("hostKey"); + return this; + } + /** + * The ARN of the host resource group in which to launch the instances. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hostResourceGroupArn") + private String hostResourceGroupArn; + + /** + * The ARN of the host resource group in which to launch the instances. + * @param hostResourceGroupArn the value to set + * @return this builder + **/ + public Builder hostResourceGroupArn(String hostResourceGroupArn) { + this.hostResourceGroupArn = hostResourceGroupArn; + this.__explicitlySet__.add("hostResourceGroupArn"); + return this; + } + /** + * The number of the partition that the instance is in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("partitionNumber") + private Integer partitionNumber; + + /** + * The number of the partition that the instance is in. + * @param partitionNumber the value to set + * @return this builder + **/ + public Builder partitionNumber(Integer partitionNumber) { + this.partitionNumber = partitionNumber; + this.__explicitlySet__.add("partitionNumber"); + return this; + } + /** + * Reserved for future use. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("spreadDomain") + private String spreadDomain; + + /** + * Reserved for future use. + * @param spreadDomain the value to set + * @return this builder + **/ + public Builder spreadDomain(String spreadDomain) { + this.spreadDomain = spreadDomain; + this.__explicitlySet__.add("spreadDomain"); + return this; + } + /** + * The tenancy of the instance (if the instance is running in a VPC). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancy") + private String tenancy; + + /** + * The tenancy of the instance (if the instance is running in a VPC). + * @param tenancy the value to set + * @return this builder + **/ + public Builder tenancy(String tenancy) { + this.tenancy = tenancy; + this.__explicitlySet__.add("tenancy"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Placement build() { + Placement model = + new Placement( + this.affinity, + this.availabilityZone, + this.groupName, + this.hostKey, + this.hostResourceGroupArn, + this.partitionNumber, + this.spreadDomain, + this.tenancy); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Placement model) { + if (model.wasPropertyExplicitlySet("affinity")) { + this.affinity(model.getAffinity()); + } + if (model.wasPropertyExplicitlySet("availabilityZone")) { + this.availabilityZone(model.getAvailabilityZone()); + } + if (model.wasPropertyExplicitlySet("groupName")) { + this.groupName(model.getGroupName()); + } + if (model.wasPropertyExplicitlySet("hostKey")) { + this.hostKey(model.getHostKey()); + } + if (model.wasPropertyExplicitlySet("hostResourceGroupArn")) { + this.hostResourceGroupArn(model.getHostResourceGroupArn()); + } + if (model.wasPropertyExplicitlySet("partitionNumber")) { + this.partitionNumber(model.getPartitionNumber()); + } + if (model.wasPropertyExplicitlySet("spreadDomain")) { + this.spreadDomain(model.getSpreadDomain()); + } + if (model.wasPropertyExplicitlySet("tenancy")) { + this.tenancy(model.getTenancy()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The affinity setting for the instance on the Dedicated Host. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("affinity") + private final String affinity; + + /** + * The affinity setting for the instance on the Dedicated Host. + * @return the value + **/ + public String getAffinity() { + return affinity; + } + + /** + * The Availability Zone of the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityZone") + private final String availabilityZone; + + /** + * The Availability Zone of the instance. + * @return the value + **/ + public String getAvailabilityZone() { + return availabilityZone; + } + + /** + * The name of the placement group the instance is in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupName") + private final String groupName; + + /** + * The name of the placement group the instance is in. + * @return the value + **/ + public String getGroupName() { + return groupName; + } + + /** + * The ID of the Dedicated Host on which the instance resides. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hostKey") + private final String hostKey; + + /** + * The ID of the Dedicated Host on which the instance resides. + * @return the value + **/ + public String getHostKey() { + return hostKey; + } + + /** + * The ARN of the host resource group in which to launch the instances. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hostResourceGroupArn") + private final String hostResourceGroupArn; + + /** + * The ARN of the host resource group in which to launch the instances. + * @return the value + **/ + public String getHostResourceGroupArn() { + return hostResourceGroupArn; + } + + /** + * The number of the partition that the instance is in. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("partitionNumber") + private final Integer partitionNumber; + + /** + * The number of the partition that the instance is in. + * @return the value + **/ + public Integer getPartitionNumber() { + return partitionNumber; + } + + /** + * Reserved for future use. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("spreadDomain") + private final String spreadDomain; + + /** + * Reserved for future use. + * @return the value + **/ + public String getSpreadDomain() { + return spreadDomain; + } + + /** + * The tenancy of the instance (if the instance is running in a VPC). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancy") + private final String tenancy; + + /** + * The tenancy of the instance (if the instance is running in a VPC). + * @return the value + **/ + public String getTenancy() { + return tenancy; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Placement("); + sb.append("super=").append(super.toString()); + sb.append("affinity=").append(String.valueOf(this.affinity)); + sb.append(", availabilityZone=").append(String.valueOf(this.availabilityZone)); + sb.append(", groupName=").append(String.valueOf(this.groupName)); + sb.append(", hostKey=").append(String.valueOf(this.hostKey)); + sb.append(", hostResourceGroupArn=").append(String.valueOf(this.hostResourceGroupArn)); + sb.append(", partitionNumber=").append(String.valueOf(this.partitionNumber)); + sb.append(", spreadDomain=").append(String.valueOf(this.spreadDomain)); + sb.append(", tenancy=").append(String.valueOf(this.tenancy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Placement)) { + return false; + } + + Placement other = (Placement) o; + return java.util.Objects.equals(this.affinity, other.affinity) + && java.util.Objects.equals(this.availabilityZone, other.availabilityZone) + && java.util.Objects.equals(this.groupName, other.groupName) + && java.util.Objects.equals(this.hostKey, other.hostKey) + && java.util.Objects.equals(this.hostResourceGroupArn, other.hostResourceGroupArn) + && java.util.Objects.equals(this.partitionNumber, other.partitionNumber) + && java.util.Objects.equals(this.spreadDomain, other.spreadDomain) + && java.util.Objects.equals(this.tenancy, other.tenancy) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.affinity == null ? 43 : this.affinity.hashCode()); + result = + (result * PRIME) + + (this.availabilityZone == null ? 43 : this.availabilityZone.hashCode()); + result = (result * PRIME) + (this.groupName == null ? 43 : this.groupName.hashCode()); + result = (result * PRIME) + (this.hostKey == null ? 43 : this.hostKey.hashCode()); + result = + (result * PRIME) + + (this.hostResourceGroupArn == null + ? 43 + : this.hostResourceGroupArn.hashCode()); + result = + (result * PRIME) + + (this.partitionNumber == null ? 43 : this.partitionNumber.hashCode()); + result = (result * PRIME) + (this.spreadDomain == null ? 43 : this.spreadDomain.hashCode()); + result = (result * PRIME) + (this.tenancy == null ? 43 : this.tenancy.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdatePluginDetails.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/SupportedCloudRegionCollection.java similarity index 62% rename from bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdatePluginDetails.java rename to bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/SupportedCloudRegionCollection.java index a53bd3fc459..434024395bb 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdatePluginDetails.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/SupportedCloudRegionCollection.java @@ -5,7 +5,7 @@ package com.oracle.bmc.cloudbridge.model; /** - * The information to be updated. + * Collection of supported cloud regions. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -16,41 +16,42 @@ **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") @com.fasterxml.jackson.databind.annotation.JsonDeserialize( - builder = UpdatePluginDetails.Builder.class + builder = SupportedCloudRegionCollection.Builder.class ) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) -public final class UpdatePluginDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { +public final class SupportedCloudRegionCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"desiredState"}) - public UpdatePluginDetails(Plugin.DesiredState desiredState) { + @java.beans.ConstructorProperties({"items"}) + public SupportedCloudRegionCollection(java.util.List items) { super(); - this.desiredState = desiredState; + this.items = items; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * State to which the customer wants the plugin to move to. + * List of supported cloud regions. **/ - @com.fasterxml.jackson.annotation.JsonProperty("desiredState") - private Plugin.DesiredState desiredState; + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; /** - * State to which the customer wants the plugin to move to. - * @param desiredState the value to set + * List of supported cloud regions. + * @param items the value to set * @return this builder **/ - public Builder desiredState(Plugin.DesiredState desiredState) { - this.desiredState = desiredState; - this.__explicitlySet__.add("desiredState"); + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); return this; } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); - public UpdatePluginDetails build() { - UpdatePluginDetails model = new UpdatePluginDetails(this.desiredState); + public SupportedCloudRegionCollection build() { + SupportedCloudRegionCollection model = new SupportedCloudRegionCollection(this.items); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -58,9 +59,9 @@ public UpdatePluginDetails build() { } @com.fasterxml.jackson.annotation.JsonIgnore - public Builder copy(UpdatePluginDetails model) { - if (model.wasPropertyExplicitlySet("desiredState")) { - this.desiredState(model.getDesiredState()); + public Builder copy(SupportedCloudRegionCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); } return this; } @@ -78,17 +79,17 @@ public Builder toBuilder() { } /** - * State to which the customer wants the plugin to move to. + * List of supported cloud regions. **/ - @com.fasterxml.jackson.annotation.JsonProperty("desiredState") - private final Plugin.DesiredState desiredState; + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; /** - * State to which the customer wants the plugin to move to. + * List of supported cloud regions. * @return the value **/ - public Plugin.DesiredState getDesiredState() { - return desiredState; + public java.util.List getItems() { + return items; } @Override @@ -103,9 +104,9 @@ public String toString() { */ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); - sb.append("UpdatePluginDetails("); + sb.append("SupportedCloudRegionCollection("); sb.append("super=").append(super.toString()); - sb.append("desiredState=").append(String.valueOf(this.desiredState)); + sb.append("items=").append(String.valueOf(this.items)); sb.append(")"); return sb.toString(); } @@ -115,20 +116,19 @@ public boolean equals(Object o) { if (this == o) { return true; } - if (!(o instanceof UpdatePluginDetails)) { + if (!(o instanceof SupportedCloudRegionCollection)) { return false; } - UpdatePluginDetails other = (UpdatePluginDetails) o; - return java.util.Objects.equals(this.desiredState, other.desiredState) - && super.equals(other); + SupportedCloudRegionCollection other = (SupportedCloudRegionCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); } @Override public int hashCode() { final int PRIME = 59; int result = 1; - result = (result * PRIME) + (this.desiredState == null ? 43 : this.desiredState.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/SupportedCloudRegionLifecycleState.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/SupportedCloudRegionLifecycleState.java new file mode 100644 index 00000000000..089fffe7784 --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/SupportedCloudRegionLifecycleState.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * Lifecycle state of the supported cloud region. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +public enum SupportedCloudRegionLifecycleState { + Active("ACTIVE"), + Inactive("INACTIVE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SupportedCloudRegionLifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SupportedCloudRegionLifecycleState v : SupportedCloudRegionLifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + SupportedCloudRegionLifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SupportedCloudRegionLifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'SupportedCloudRegionLifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/SupportedCloudRegionSummary.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/SupportedCloudRegionSummary.java new file mode 100644 index 00000000000..2f6ef6a6095 --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/SupportedCloudRegionSummary.java @@ -0,0 +1,330 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * Summary of the supported cloud region. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SupportedCloudRegionSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SupportedCloudRegionSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "assetSourceType", + "name", + "lifecycleState", + "freeformTags", + "definedTags" + }) + public SupportedCloudRegionSummary( + AssetSourceType assetSourceType, + String name, + SupportedCloudRegionLifecycleState lifecycleState, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.assetSourceType = assetSourceType; + this.name = name; + this.lifecycleState = lifecycleState; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The asset source type associated with the supported cloud region. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("assetSourceType") + private AssetSourceType assetSourceType; + + /** + * The asset source type associated with the supported cloud region. + * @param assetSourceType the value to set + * @return this builder + **/ + public Builder assetSourceType(AssetSourceType assetSourceType) { + this.assetSourceType = assetSourceType; + this.__explicitlySet__.add("assetSourceType"); + return this; + } + /** + * The supported cloud region name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The supported cloud region name. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The current state of the supported cloud region. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private SupportedCloudRegionLifecycleState lifecycleState; + + /** + * The current state of the supported cloud region. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(SupportedCloudRegionLifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + * predefined name, type, or namespace/scope. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + * predefined name, type, or namespace/scope. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SupportedCloudRegionSummary build() { + SupportedCloudRegionSummary model = + new SupportedCloudRegionSummary( + this.assetSourceType, + this.name, + this.lifecycleState, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SupportedCloudRegionSummary model) { + if (model.wasPropertyExplicitlySet("assetSourceType")) { + this.assetSourceType(model.getAssetSourceType()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The asset source type associated with the supported cloud region. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("assetSourceType") + private final AssetSourceType assetSourceType; + + /** + * The asset source type associated with the supported cloud region. + * @return the value + **/ + public AssetSourceType getAssetSourceType() { + return assetSourceType; + } + + /** + * The supported cloud region name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The supported cloud region name. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The current state of the supported cloud region. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final SupportedCloudRegionLifecycleState lifecycleState; + + /** + * The current state of the supported cloud region. + * @return the value + **/ + public SupportedCloudRegionLifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + * predefined name, type, or namespace/scope. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + * predefined name, type, or namespace/scope. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SupportedCloudRegionSummary("); + sb.append("super=").append(super.toString()); + sb.append("assetSourceType=").append(String.valueOf(this.assetSourceType)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SupportedCloudRegionSummary)) { + return false; + } + + SupportedCloudRegionSummary other = (SupportedCloudRegionSummary) o; + return java.util.Objects.equals(this.assetSourceType, other.assetSourceType) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.assetSourceType == null ? 43 : this.assetSourceType.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/Tag.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/Tag.java new file mode 100644 index 00000000000..9b887c5d1c2 --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/Tag.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * Describes a tag. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Tag.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Tag extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"key", "value"}) + public Tag(String key, String value) { + super(); + this.key = key; + this.value = value; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The key of the tag. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("key") + private String key; + + /** + * The key of the tag. + * @param key the value to set + * @return this builder + **/ + public Builder key(String key) { + this.key = key; + this.__explicitlySet__.add("key"); + return this; + } + /** + * The value of the tag. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + /** + * The value of the tag. + * @param value the value to set + * @return this builder + **/ + public Builder value(String value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Tag build() { + Tag model = new Tag(this.key, this.value); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Tag model) { + if (model.wasPropertyExplicitlySet("key")) { + this.key(model.getKey()); + } + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The key of the tag. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("key") + private final String key; + + /** + * The key of the tag. + * @return the value + **/ + public String getKey() { + return key; + } + + /** + * The value of the tag. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final String value; + + /** + * The value of the tag. + * @return the value + **/ + public String getValue() { + return value; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Tag("); + sb.append("super=").append(super.toString()); + sb.append("key=").append(String.valueOf(this.key)); + sb.append(", value=").append(String.valueOf(this.value)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Tag)) { + return false; + } + + Tag other = (Tag) o; + return java.util.Objects.equals(this.key, other.key) + && java.util.Objects.equals(this.value, other.value) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.key == null ? 43 : this.key.hashCode()); + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateAssetDetails.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateAssetDetails.java index 6490c3cc366..e67ef82897e 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateAssetDetails.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateAssetDetails.java @@ -26,9 +26,17 @@ value = UpdateVmAssetDetails.class, name = "VM" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = UpdateAwsEbsAssetDetails.class, + name = "AWS_EBS" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = UpdateVmwareVmAssetDetails.class, name = "VMWARE_VM" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = UpdateAwsEc2AssetDetails.class, + name = "AWS_EC2" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateAssetSourceDetails.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateAssetSourceDetails.java index 61edc78409c..865ef7755e5 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateAssetSourceDetails.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateAssetSourceDetails.java @@ -5,7 +5,7 @@ package com.oracle.bmc.cloudbridge.model; /** - * The information about the new asset source. + * Asset source update request. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -25,6 +25,10 @@ @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = UpdateVmWareAssetSourceDetails.class, name = "VMWARE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = UpdateAwsAssetSourceDetails.class, + name = "AWS" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) @@ -33,6 +37,7 @@ public class UpdateAssetSourceDetails extends com.oracle.bmc.http.internal.Expli @java.beans.ConstructorProperties({ "displayName", "assetsCompartmentId", + "discoveryScheduleId", "freeformTags", "definedTags", "systemTags" @@ -40,12 +45,14 @@ public class UpdateAssetSourceDetails extends com.oracle.bmc.http.internal.Expli protected UpdateAssetSourceDetails( String displayName, String assetsCompartmentId, + String discoveryScheduleId, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags) { super(); this.displayName = displayName; this.assetsCompartmentId = assetsCompartmentId; + this.discoveryScheduleId = discoveryScheduleId; this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; @@ -83,6 +90,20 @@ public String getAssetsCompartmentId() { return assetsCompartmentId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the discovery schedule that is going to be assigned to an asset source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("discoveryScheduleId") + private final String discoveryScheduleId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the discovery schedule that is going to be assigned to an asset source. + * @return the value + **/ + public String getDiscoveryScheduleId() { + return discoveryScheduleId; + } + /** * The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no * predefined name, type, or namespace/scope. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). @@ -159,6 +180,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("displayName=").append(String.valueOf(this.displayName)); sb.append(", assetsCompartmentId=").append(String.valueOf(this.assetsCompartmentId)); + sb.append(", discoveryScheduleId=").append(String.valueOf(this.discoveryScheduleId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); @@ -178,6 +200,7 @@ public boolean equals(Object o) { UpdateAssetSourceDetails other = (UpdateAssetSourceDetails) o; return java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.assetsCompartmentId, other.assetsCompartmentId) + && java.util.Objects.equals(this.discoveryScheduleId, other.discoveryScheduleId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) @@ -194,6 +217,11 @@ public int hashCode() { + (this.assetsCompartmentId == null ? 43 : this.assetsCompartmentId.hashCode()); + result = + (result * PRIME) + + (this.discoveryScheduleId == null + ? 43 + : this.discoveryScheduleId.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateAwsAssetSourceDetails.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateAwsAssetSourceDetails.java new file mode 100644 index 00000000000..8a01f28f7f8 --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateAwsAssetSourceDetails.java @@ -0,0 +1,386 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * AWS asset source update request. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateAwsAssetSourceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateAwsAssetSourceDetails extends UpdateAssetSourceDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("assetsCompartmentId") + private String assetsCompartmentId; + + public Builder assetsCompartmentId(String assetsCompartmentId) { + this.assetsCompartmentId = assetsCompartmentId; + this.__explicitlySet__.add("assetsCompartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("discoveryScheduleId") + private String discoveryScheduleId; + + public Builder discoveryScheduleId(String discoveryScheduleId) { + this.discoveryScheduleId = discoveryScheduleId; + this.__explicitlySet__.add("discoveryScheduleId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("discoveryCredentials") + private AssetSourceCredentials discoveryCredentials; + + public Builder discoveryCredentials(AssetSourceCredentials discoveryCredentials) { + this.discoveryCredentials = discoveryCredentials; + this.__explicitlySet__.add("discoveryCredentials"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("replicationCredentials") + private AssetSourceCredentials replicationCredentials; + + public Builder replicationCredentials(AssetSourceCredentials replicationCredentials) { + this.replicationCredentials = replicationCredentials; + this.__explicitlySet__.add("replicationCredentials"); + return this; + } + /** + * Flag indicating whether historical metrics are collected for assets, originating from this asset source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areHistoricalMetricsCollected") + private Boolean areHistoricalMetricsCollected; + + /** + * Flag indicating whether historical metrics are collected for assets, originating from this asset source. + * @param areHistoricalMetricsCollected the value to set + * @return this builder + **/ + public Builder areHistoricalMetricsCollected(Boolean areHistoricalMetricsCollected) { + this.areHistoricalMetricsCollected = areHistoricalMetricsCollected; + this.__explicitlySet__.add("areHistoricalMetricsCollected"); + return this; + } + /** + * Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areRealtimeMetricsCollected") + private Boolean areRealtimeMetricsCollected; + + /** + * Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + * @param areRealtimeMetricsCollected the value to set + * @return this builder + **/ + public Builder areRealtimeMetricsCollected(Boolean areRealtimeMetricsCollected) { + this.areRealtimeMetricsCollected = areRealtimeMetricsCollected; + this.__explicitlySet__.add("areRealtimeMetricsCollected"); + return this; + } + /** + * Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCostInformationCollected") + private Boolean isCostInformationCollected; + + /** + * Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + * @param isCostInformationCollected the value to set + * @return this builder + **/ + public Builder isCostInformationCollected(Boolean isCostInformationCollected) { + this.isCostInformationCollected = isCostInformationCollected; + this.__explicitlySet__.add("isCostInformationCollected"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateAwsAssetSourceDetails build() { + UpdateAwsAssetSourceDetails model = + new UpdateAwsAssetSourceDetails( + this.displayName, + this.assetsCompartmentId, + this.discoveryScheduleId, + this.freeformTags, + this.definedTags, + this.systemTags, + this.discoveryCredentials, + this.replicationCredentials, + this.areHistoricalMetricsCollected, + this.areRealtimeMetricsCollected, + this.isCostInformationCollected); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateAwsAssetSourceDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("assetsCompartmentId")) { + this.assetsCompartmentId(model.getAssetsCompartmentId()); + } + if (model.wasPropertyExplicitlySet("discoveryScheduleId")) { + this.discoveryScheduleId(model.getDiscoveryScheduleId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("discoveryCredentials")) { + this.discoveryCredentials(model.getDiscoveryCredentials()); + } + if (model.wasPropertyExplicitlySet("replicationCredentials")) { + this.replicationCredentials(model.getReplicationCredentials()); + } + if (model.wasPropertyExplicitlySet("areHistoricalMetricsCollected")) { + this.areHistoricalMetricsCollected(model.getAreHistoricalMetricsCollected()); + } + if (model.wasPropertyExplicitlySet("areRealtimeMetricsCollected")) { + this.areRealtimeMetricsCollected(model.getAreRealtimeMetricsCollected()); + } + if (model.wasPropertyExplicitlySet("isCostInformationCollected")) { + this.isCostInformationCollected(model.getIsCostInformationCollected()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public UpdateAwsAssetSourceDetails( + String displayName, + String assetsCompartmentId, + String discoveryScheduleId, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + AssetSourceCredentials discoveryCredentials, + AssetSourceCredentials replicationCredentials, + Boolean areHistoricalMetricsCollected, + Boolean areRealtimeMetricsCollected, + Boolean isCostInformationCollected) { + super( + displayName, + assetsCompartmentId, + discoveryScheduleId, + freeformTags, + definedTags, + systemTags); + this.discoveryCredentials = discoveryCredentials; + this.replicationCredentials = replicationCredentials; + this.areHistoricalMetricsCollected = areHistoricalMetricsCollected; + this.areRealtimeMetricsCollected = areRealtimeMetricsCollected; + this.isCostInformationCollected = isCostInformationCollected; + } + + @com.fasterxml.jackson.annotation.JsonProperty("discoveryCredentials") + private final AssetSourceCredentials discoveryCredentials; + + public AssetSourceCredentials getDiscoveryCredentials() { + return discoveryCredentials; + } + + @com.fasterxml.jackson.annotation.JsonProperty("replicationCredentials") + private final AssetSourceCredentials replicationCredentials; + + public AssetSourceCredentials getReplicationCredentials() { + return replicationCredentials; + } + + /** + * Flag indicating whether historical metrics are collected for assets, originating from this asset source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areHistoricalMetricsCollected") + private final Boolean areHistoricalMetricsCollected; + + /** + * Flag indicating whether historical metrics are collected for assets, originating from this asset source. + * @return the value + **/ + public Boolean getAreHistoricalMetricsCollected() { + return areHistoricalMetricsCollected; + } + + /** + * Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areRealtimeMetricsCollected") + private final Boolean areRealtimeMetricsCollected; + + /** + * Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + * @return the value + **/ + public Boolean getAreRealtimeMetricsCollected() { + return areRealtimeMetricsCollected; + } + + /** + * Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCostInformationCollected") + private final Boolean isCostInformationCollected; + + /** + * Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + * @return the value + **/ + public Boolean getIsCostInformationCollected() { + return isCostInformationCollected; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateAwsAssetSourceDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", discoveryCredentials=").append(String.valueOf(this.discoveryCredentials)); + sb.append(", replicationCredentials=").append(String.valueOf(this.replicationCredentials)); + sb.append(", areHistoricalMetricsCollected=") + .append(String.valueOf(this.areHistoricalMetricsCollected)); + sb.append(", areRealtimeMetricsCollected=") + .append(String.valueOf(this.areRealtimeMetricsCollected)); + sb.append(", isCostInformationCollected=") + .append(String.valueOf(this.isCostInformationCollected)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateAwsAssetSourceDetails)) { + return false; + } + + UpdateAwsAssetSourceDetails other = (UpdateAwsAssetSourceDetails) o; + return java.util.Objects.equals(this.discoveryCredentials, other.discoveryCredentials) + && java.util.Objects.equals( + this.replicationCredentials, other.replicationCredentials) + && java.util.Objects.equals( + this.areHistoricalMetricsCollected, other.areHistoricalMetricsCollected) + && java.util.Objects.equals( + this.areRealtimeMetricsCollected, other.areRealtimeMetricsCollected) + && java.util.Objects.equals( + this.isCostInformationCollected, other.isCostInformationCollected) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.discoveryCredentials == null + ? 43 + : this.discoveryCredentials.hashCode()); + result = + (result * PRIME) + + (this.replicationCredentials == null + ? 43 + : this.replicationCredentials.hashCode()); + result = + (result * PRIME) + + (this.areHistoricalMetricsCollected == null + ? 43 + : this.areHistoricalMetricsCollected.hashCode()); + result = + (result * PRIME) + + (this.areRealtimeMetricsCollected == null + ? 43 + : this.areRealtimeMetricsCollected.hashCode()); + result = + (result * PRIME) + + (this.isCostInformationCollected == null + ? 43 + : this.isCostInformationCollected.hashCode()); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateAwsEbsAssetDetails.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateAwsEbsAssetDetails.java new file mode 100644 index 00000000000..7be92db1b46 --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateAwsEbsAssetDetails.java @@ -0,0 +1,182 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * The information of AWS EBS asset to be updated. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateAwsEbsAssetDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "assetType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateAwsEbsAssetDetails extends UpdateAssetDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("assetSourceIds") + private java.util.List assetSourceIds; + + public Builder assetSourceIds(java.util.List assetSourceIds) { + this.assetSourceIds = assetSourceIds; + this.__explicitlySet__.add("assetSourceIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("awsEbs") + private AwsEbsProperties awsEbs; + + public Builder awsEbs(AwsEbsProperties awsEbs) { + this.awsEbs = awsEbs; + this.__explicitlySet__.add("awsEbs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateAwsEbsAssetDetails build() { + UpdateAwsEbsAssetDetails model = + new UpdateAwsEbsAssetDetails( + this.displayName, + this.assetSourceIds, + this.freeformTags, + this.definedTags, + this.awsEbs); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateAwsEbsAssetDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("assetSourceIds")) { + this.assetSourceIds(model.getAssetSourceIds()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("awsEbs")) { + this.awsEbs(model.getAwsEbs()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public UpdateAwsEbsAssetDetails( + String displayName, + java.util.List assetSourceIds, + java.util.Map freeformTags, + java.util.Map> definedTags, + AwsEbsProperties awsEbs) { + super(displayName, assetSourceIds, freeformTags, definedTags); + this.awsEbs = awsEbs; + } + + @com.fasterxml.jackson.annotation.JsonProperty("awsEbs") + private final AwsEbsProperties awsEbs; + + public AwsEbsProperties getAwsEbs() { + return awsEbs; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateAwsEbsAssetDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", awsEbs=").append(String.valueOf(this.awsEbs)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateAwsEbsAssetDetails)) { + return false; + } + + UpdateAwsEbsAssetDetails other = (UpdateAwsEbsAssetDetails) o; + return java.util.Objects.equals(this.awsEbs, other.awsEbs) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.awsEbs == null ? 43 : this.awsEbs.hashCode()); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateAwsEc2AssetDetails.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateAwsEc2AssetDetails.java new file mode 100644 index 00000000000..7025cd5d039 --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateAwsEc2AssetDetails.java @@ -0,0 +1,288 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * The information of AWS VM asset to be updated. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateAwsEc2AssetDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "assetType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateAwsEc2AssetDetails extends UpdateAssetDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("assetSourceIds") + private java.util.List assetSourceIds; + + public Builder assetSourceIds(java.util.List assetSourceIds) { + this.assetSourceIds = assetSourceIds; + this.__explicitlySet__.add("assetSourceIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compute") + private ComputeProperties compute; + + public Builder compute(ComputeProperties compute) { + this.compute = compute; + this.__explicitlySet__.add("compute"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vm") + private VmProperties vm; + + public Builder vm(VmProperties vm) { + this.vm = vm; + this.__explicitlySet__.add("vm"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("awsEc2") + private AwsEc2Properties awsEc2; + + public Builder awsEc2(AwsEc2Properties awsEc2) { + this.awsEc2 = awsEc2; + this.__explicitlySet__.add("awsEc2"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("awsEc2Cost") + private MonthlyCostSummary awsEc2Cost; + + public Builder awsEc2Cost(MonthlyCostSummary awsEc2Cost) { + this.awsEc2Cost = awsEc2Cost; + this.__explicitlySet__.add("awsEc2Cost"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("attachedEbsVolumesCost") + private MonthlyCostSummary attachedEbsVolumesCost; + + public Builder attachedEbsVolumesCost(MonthlyCostSummary attachedEbsVolumesCost) { + this.attachedEbsVolumesCost = attachedEbsVolumesCost; + this.__explicitlySet__.add("attachedEbsVolumesCost"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateAwsEc2AssetDetails build() { + UpdateAwsEc2AssetDetails model = + new UpdateAwsEc2AssetDetails( + this.displayName, + this.assetSourceIds, + this.freeformTags, + this.definedTags, + this.compute, + this.vm, + this.awsEc2, + this.awsEc2Cost, + this.attachedEbsVolumesCost); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateAwsEc2AssetDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("assetSourceIds")) { + this.assetSourceIds(model.getAssetSourceIds()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("compute")) { + this.compute(model.getCompute()); + } + if (model.wasPropertyExplicitlySet("vm")) { + this.vm(model.getVm()); + } + if (model.wasPropertyExplicitlySet("awsEc2")) { + this.awsEc2(model.getAwsEc2()); + } + if (model.wasPropertyExplicitlySet("awsEc2Cost")) { + this.awsEc2Cost(model.getAwsEc2Cost()); + } + if (model.wasPropertyExplicitlySet("attachedEbsVolumesCost")) { + this.attachedEbsVolumesCost(model.getAttachedEbsVolumesCost()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public UpdateAwsEc2AssetDetails( + String displayName, + java.util.List assetSourceIds, + java.util.Map freeformTags, + java.util.Map> definedTags, + ComputeProperties compute, + VmProperties vm, + AwsEc2Properties awsEc2, + MonthlyCostSummary awsEc2Cost, + MonthlyCostSummary attachedEbsVolumesCost) { + super(displayName, assetSourceIds, freeformTags, definedTags); + this.compute = compute; + this.vm = vm; + this.awsEc2 = awsEc2; + this.awsEc2Cost = awsEc2Cost; + this.attachedEbsVolumesCost = attachedEbsVolumesCost; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compute") + private final ComputeProperties compute; + + public ComputeProperties getCompute() { + return compute; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vm") + private final VmProperties vm; + + public VmProperties getVm() { + return vm; + } + + @com.fasterxml.jackson.annotation.JsonProperty("awsEc2") + private final AwsEc2Properties awsEc2; + + public AwsEc2Properties getAwsEc2() { + return awsEc2; + } + + @com.fasterxml.jackson.annotation.JsonProperty("awsEc2Cost") + private final MonthlyCostSummary awsEc2Cost; + + public MonthlyCostSummary getAwsEc2Cost() { + return awsEc2Cost; + } + + @com.fasterxml.jackson.annotation.JsonProperty("attachedEbsVolumesCost") + private final MonthlyCostSummary attachedEbsVolumesCost; + + public MonthlyCostSummary getAttachedEbsVolumesCost() { + return attachedEbsVolumesCost; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateAwsEc2AssetDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", compute=").append(String.valueOf(this.compute)); + sb.append(", vm=").append(String.valueOf(this.vm)); + sb.append(", awsEc2=").append(String.valueOf(this.awsEc2)); + sb.append(", awsEc2Cost=").append(String.valueOf(this.awsEc2Cost)); + sb.append(", attachedEbsVolumesCost=").append(String.valueOf(this.attachedEbsVolumesCost)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateAwsEc2AssetDetails)) { + return false; + } + + UpdateAwsEc2AssetDetails other = (UpdateAwsEc2AssetDetails) o; + return java.util.Objects.equals(this.compute, other.compute) + && java.util.Objects.equals(this.vm, other.vm) + && java.util.Objects.equals(this.awsEc2, other.awsEc2) + && java.util.Objects.equals(this.awsEc2Cost, other.awsEc2Cost) + && java.util.Objects.equals( + this.attachedEbsVolumesCost, other.attachedEbsVolumesCost) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.compute == null ? 43 : this.compute.hashCode()); + result = (result * PRIME) + (this.vm == null ? 43 : this.vm.hashCode()); + result = (result * PRIME) + (this.awsEc2 == null ? 43 : this.awsEc2.hashCode()); + result = (result * PRIME) + (this.awsEc2Cost == null ? 43 : this.awsEc2Cost.hashCode()); + result = + (result * PRIME) + + (this.attachedEbsVolumesCost == null + ? 43 + : this.attachedEbsVolumesCost.hashCode()); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateVmWareAssetSourceDetails.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateVmWareAssetSourceDetails.java index a98da1fa9a7..0d366c3a311 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateVmWareAssetSourceDetails.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/UpdateVmWareAssetSourceDetails.java @@ -5,7 +5,7 @@ package com.oracle.bmc.cloudbridge.model; /** - * Asset source update details. + * VMware asset source update request. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -45,6 +45,15 @@ public Builder assetsCompartmentId(String assetsCompartmentId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("discoveryScheduleId") + private String discoveryScheduleId; + + public Builder discoveryScheduleId(String discoveryScheduleId) { + this.discoveryScheduleId = discoveryScheduleId; + this.__explicitlySet__.add("discoveryScheduleId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") private java.util.Map freeformTags; @@ -138,22 +147,6 @@ public Builder areRealtimeMetricsCollected(Boolean areRealtimeMetricsCollected) this.__explicitlySet__.add("areRealtimeMetricsCollected"); return this; } - /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the discovery schedule that is going to be assigned to an asset source. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("discoveryScheduleId") - private String discoveryScheduleId; - - /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the discovery schedule that is going to be assigned to an asset source. - * @param discoveryScheduleId the value to set - * @return this builder - **/ - public Builder discoveryScheduleId(String discoveryScheduleId) { - this.discoveryScheduleId = discoveryScheduleId; - this.__explicitlySet__.add("discoveryScheduleId"); - return this; - } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -163,6 +156,7 @@ public UpdateVmWareAssetSourceDetails build() { new UpdateVmWareAssetSourceDetails( this.displayName, this.assetsCompartmentId, + this.discoveryScheduleId, this.freeformTags, this.definedTags, this.systemTags, @@ -170,8 +164,7 @@ public UpdateVmWareAssetSourceDetails build() { this.discoveryCredentials, this.replicationCredentials, this.areHistoricalMetricsCollected, - this.areRealtimeMetricsCollected, - this.discoveryScheduleId); + this.areRealtimeMetricsCollected); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -186,6 +179,9 @@ public Builder copy(UpdateVmWareAssetSourceDetails model) { if (model.wasPropertyExplicitlySet("assetsCompartmentId")) { this.assetsCompartmentId(model.getAssetsCompartmentId()); } + if (model.wasPropertyExplicitlySet("discoveryScheduleId")) { + this.discoveryScheduleId(model.getDiscoveryScheduleId()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -210,9 +206,6 @@ public Builder copy(UpdateVmWareAssetSourceDetails model) { if (model.wasPropertyExplicitlySet("areRealtimeMetricsCollected")) { this.areRealtimeMetricsCollected(model.getAreRealtimeMetricsCollected()); } - if (model.wasPropertyExplicitlySet("discoveryScheduleId")) { - this.discoveryScheduleId(model.getDiscoveryScheduleId()); - } return this; } } @@ -232,6 +225,7 @@ public Builder toBuilder() { public UpdateVmWareAssetSourceDetails( String displayName, String assetsCompartmentId, + String discoveryScheduleId, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags, @@ -239,15 +233,19 @@ public UpdateVmWareAssetSourceDetails( AssetSourceCredentials discoveryCredentials, AssetSourceCredentials replicationCredentials, Boolean areHistoricalMetricsCollected, - Boolean areRealtimeMetricsCollected, - String discoveryScheduleId) { - super(displayName, assetsCompartmentId, freeformTags, definedTags, systemTags); + Boolean areRealtimeMetricsCollected) { + super( + displayName, + assetsCompartmentId, + discoveryScheduleId, + freeformTags, + definedTags, + systemTags); this.vcenterEndpoint = vcenterEndpoint; this.discoveryCredentials = discoveryCredentials; this.replicationCredentials = replicationCredentials; this.areHistoricalMetricsCollected = areHistoricalMetricsCollected; this.areRealtimeMetricsCollected = areRealtimeMetricsCollected; - this.discoveryScheduleId = discoveryScheduleId; } /** @@ -306,20 +304,6 @@ public Boolean getAreRealtimeMetricsCollected() { return areRealtimeMetricsCollected; } - /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the discovery schedule that is going to be assigned to an asset source. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("discoveryScheduleId") - private final String discoveryScheduleId; - - /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the discovery schedule that is going to be assigned to an asset source. - * @return the value - **/ - public String getDiscoveryScheduleId() { - return discoveryScheduleId; - } - @Override public String toString() { return this.toString(true); @@ -341,7 +325,6 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.areHistoricalMetricsCollected)); sb.append(", areRealtimeMetricsCollected=") .append(String.valueOf(this.areRealtimeMetricsCollected)); - sb.append(", discoveryScheduleId=").append(String.valueOf(this.discoveryScheduleId)); sb.append(")"); return sb.toString(); } @@ -364,7 +347,6 @@ public boolean equals(Object o) { this.areHistoricalMetricsCollected, other.areHistoricalMetricsCollected) && java.util.Objects.equals( this.areRealtimeMetricsCollected, other.areRealtimeMetricsCollected) - && java.util.Objects.equals(this.discoveryScheduleId, other.discoveryScheduleId) && super.equals(other); } @@ -395,11 +377,6 @@ public int hashCode() { + (this.areRealtimeMetricsCollected == null ? 43 : this.areRealtimeMetricsCollected.hashCode()); - result = - (result * PRIME) - + (this.discoveryScheduleId == null - ? 43 - : this.discoveryScheduleId.hashCode()); return result; } } diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/VmWareAssetSource.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/VmWareAssetSource.java index 3b824dfae10..e61e491cfa2 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/VmWareAssetSource.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/VmWareAssetSource.java @@ -5,7 +5,8 @@ package com.oracle.bmc.cloudbridge.model; /** - * Description of an asset source. + * VMware asset source. Used for discovery of virtual machines (VMs) registered in the VMware vCenter installation. + * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/VmWareAssetSourceSummary.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/VmWareAssetSourceSummary.java index bfad849a9d8..35a583531b1 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/VmWareAssetSourceSummary.java +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/VmWareAssetSourceSummary.java @@ -5,7 +5,7 @@ package com.oracle.bmc.cloudbridge.model; /** - * Description of an asset source. + * Summary of an VMware asset source provided in the list. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/VolumeAttachment.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/VolumeAttachment.java new file mode 100644 index 00000000000..41b34ff8ecf --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/model/VolumeAttachment.java @@ -0,0 +1,302 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.model; + +/** + * Describes volume attachment details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = VolumeAttachment.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class VolumeAttachment extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "isDeleteOnTermination", + "device", + "instanceKey", + "status", + "volumeKey" + }) + public VolumeAttachment( + Boolean isDeleteOnTermination, + String device, + String instanceKey, + String status, + String volumeKey) { + super(); + this.isDeleteOnTermination = isDeleteOnTermination; + this.device = device; + this.instanceKey = instanceKey; + this.status = status; + this.volumeKey = volumeKey; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Indicates whether the EBS volume is deleted on instance termination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDeleteOnTermination") + private Boolean isDeleteOnTermination; + + /** + * Indicates whether the EBS volume is deleted on instance termination. + * @param isDeleteOnTermination the value to set + * @return this builder + **/ + public Builder isDeleteOnTermination(Boolean isDeleteOnTermination) { + this.isDeleteOnTermination = isDeleteOnTermination; + this.__explicitlySet__.add("isDeleteOnTermination"); + return this; + } + /** + * The device name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("device") + private String device; + + /** + * The device name. + * @param device the value to set + * @return this builder + **/ + public Builder device(String device) { + this.device = device; + this.__explicitlySet__.add("device"); + return this; + } + /** + * The ID of the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceKey") + private String instanceKey; + + /** + * The ID of the instance. + * @param instanceKey the value to set + * @return this builder + **/ + public Builder instanceKey(String instanceKey) { + this.instanceKey = instanceKey; + this.__explicitlySet__.add("instanceKey"); + return this; + } + /** + * The attachment state of the volume. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private String status; + + /** + * The attachment state of the volume. + * @param status the value to set + * @return this builder + **/ + public Builder status(String status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The ID of the volume. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("volumeKey") + private String volumeKey; + + /** + * The ID of the volume. + * @param volumeKey the value to set + * @return this builder + **/ + public Builder volumeKey(String volumeKey) { + this.volumeKey = volumeKey; + this.__explicitlySet__.add("volumeKey"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public VolumeAttachment build() { + VolumeAttachment model = + new VolumeAttachment( + this.isDeleteOnTermination, + this.device, + this.instanceKey, + this.status, + this.volumeKey); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(VolumeAttachment model) { + if (model.wasPropertyExplicitlySet("isDeleteOnTermination")) { + this.isDeleteOnTermination(model.getIsDeleteOnTermination()); + } + if (model.wasPropertyExplicitlySet("device")) { + this.device(model.getDevice()); + } + if (model.wasPropertyExplicitlySet("instanceKey")) { + this.instanceKey(model.getInstanceKey()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("volumeKey")) { + this.volumeKey(model.getVolumeKey()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Indicates whether the EBS volume is deleted on instance termination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDeleteOnTermination") + private final Boolean isDeleteOnTermination; + + /** + * Indicates whether the EBS volume is deleted on instance termination. + * @return the value + **/ + public Boolean getIsDeleteOnTermination() { + return isDeleteOnTermination; + } + + /** + * The device name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("device") + private final String device; + + /** + * The device name. + * @return the value + **/ + public String getDevice() { + return device; + } + + /** + * The ID of the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceKey") + private final String instanceKey; + + /** + * The ID of the instance. + * @return the value + **/ + public String getInstanceKey() { + return instanceKey; + } + + /** + * The attachment state of the volume. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final String status; + + /** + * The attachment state of the volume. + * @return the value + **/ + public String getStatus() { + return status; + } + + /** + * The ID of the volume. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("volumeKey") + private final String volumeKey; + + /** + * The ID of the volume. + * @return the value + **/ + public String getVolumeKey() { + return volumeKey; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("VolumeAttachment("); + sb.append("super=").append(super.toString()); + sb.append("isDeleteOnTermination=").append(String.valueOf(this.isDeleteOnTermination)); + sb.append(", device=").append(String.valueOf(this.device)); + sb.append(", instanceKey=").append(String.valueOf(this.instanceKey)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", volumeKey=").append(String.valueOf(this.volumeKey)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof VolumeAttachment)) { + return false; + } + + VolumeAttachment other = (VolumeAttachment) o; + return java.util.Objects.equals(this.isDeleteOnTermination, other.isDeleteOnTermination) + && java.util.Objects.equals(this.device, other.device) + && java.util.Objects.equals(this.instanceKey, other.instanceKey) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.volumeKey, other.volumeKey) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.isDeleteOnTermination == null + ? 43 + : this.isDeleteOnTermination.hashCode()); + result = (result * PRIME) + (this.device == null ? 43 : this.device.hashCode()); + result = (result * PRIME) + (this.instanceKey == null ? 43 : this.instanceKey.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.volumeKey == null ? 43 : this.volumeKey.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/requests/ListSupportedCloudRegionsRequest.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/requests/ListSupportedCloudRegionsRequest.java new file mode 100644 index 00000000000..12493ed3528 --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/requests/ListSupportedCloudRegionsRequest.java @@ -0,0 +1,399 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.requests; + +import com.oracle.bmc.cloudbridge.model.*; +/** + * Example: Click here to see how to use ListSupportedCloudRegionsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +public class ListSupportedCloudRegionsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The asset source type. + */ + private com.oracle.bmc.cloudbridge.model.AssetSourceType assetSourceType; + + /** + * The asset source type. + */ + public com.oracle.bmc.cloudbridge.model.AssetSourceType getAssetSourceType() { + return assetSourceType; + } + /** + * A filter to return only supported cloud regions which name contains given nameContains as sub-string. + */ + private String nameContains; + + /** + * A filter to return only supported cloud regions which name contains given nameContains as sub-string. + */ + public String getNameContains() { + return nameContains; + } + /** + * The field to sort by. Only one sort order may be provided. By default, name is in ascending order. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. By default, name is in ascending order. + * + **/ + public enum SortBy { + Name("name"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. By default, name is in ascending order. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.cloudbridge.model.SortOrders sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.cloudbridge.model.SortOrders getSortOrder() { + return sortOrder; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListSupportedCloudRegionsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The asset source type. + */ + private com.oracle.bmc.cloudbridge.model.AssetSourceType assetSourceType = null; + + /** + * The asset source type. + * @param assetSourceType the value to set + * @return this builder instance + */ + public Builder assetSourceType( + com.oracle.bmc.cloudbridge.model.AssetSourceType assetSourceType) { + this.assetSourceType = assetSourceType; + return this; + } + + /** + * A filter to return only supported cloud regions which name contains given nameContains as sub-string. + */ + private String nameContains = null; + + /** + * A filter to return only supported cloud regions which name contains given nameContains as sub-string. + * @param nameContains the value to set + * @return this builder instance + */ + public Builder nameContains(String nameContains) { + this.nameContains = nameContains; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. By default, name is in ascending order. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. By default, name is in ascending order. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.cloudbridge.model.SortOrders sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.cloudbridge.model.SortOrders sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSupportedCloudRegionsRequest o) { + assetSourceType(o.getAssetSourceType()); + nameContains(o.getNameContains()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListSupportedCloudRegionsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListSupportedCloudRegionsRequest + */ + public ListSupportedCloudRegionsRequest build() { + ListSupportedCloudRegionsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListSupportedCloudRegionsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListSupportedCloudRegionsRequest + */ + public ListSupportedCloudRegionsRequest buildWithoutInvocationCallback() { + ListSupportedCloudRegionsRequest request = new ListSupportedCloudRegionsRequest(); + request.assetSourceType = assetSourceType; + request.nameContains = nameContains; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + return request; + // new ListSupportedCloudRegionsRequest(assetSourceType, nameContains, sortBy, sortOrder, limit, page, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .assetSourceType(assetSourceType) + .nameContains(nameContains) + .sortBy(sortBy) + .sortOrder(sortOrder) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",assetSourceType=").append(String.valueOf(this.assetSourceType)); + sb.append(",nameContains=").append(String.valueOf(this.nameContains)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSupportedCloudRegionsRequest)) { + return false; + } + + ListSupportedCloudRegionsRequest other = (ListSupportedCloudRegionsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.assetSourceType, other.assetSourceType) + && java.util.Objects.equals(this.nameContains, other.nameContains) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.assetSourceType == null ? 43 : this.assetSourceType.hashCode()); + result = (result * PRIME) + (this.nameContains == null ? 43 : this.nameContains.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/responses/ListSupportedCloudRegionsResponse.java b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/responses/ListSupportedCloudRegionsResponse.java new file mode 100644 index 00000000000..efd2b6d9680 --- /dev/null +++ b/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/responses/ListSupportedCloudRegionsResponse.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.cloudbridge.responses; + +import com.oracle.bmc.cloudbridge.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") +public class ListSupportedCloudRegionsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned SupportedCloudRegionCollection instance. + */ + private com.oracle.bmc.cloudbridge.model.SupportedCloudRegionCollection + supportedCloudRegionCollection; + + /** + * The returned SupportedCloudRegionCollection instance. + * @return the value + */ + public com.oracle.bmc.cloudbridge.model.SupportedCloudRegionCollection + getSupportedCloudRegionCollection() { + return supportedCloudRegionCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "supportedCloudRegionCollection" + }) + private ListSupportedCloudRegionsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.cloudbridge.model.SupportedCloudRegionCollection + supportedCloudRegionCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.supportedCloudRegionCollection = supportedCloudRegionCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned SupportedCloudRegionCollection instance. + */ + private com.oracle.bmc.cloudbridge.model.SupportedCloudRegionCollection + supportedCloudRegionCollection; + + /** + * The returned SupportedCloudRegionCollection instance. + * @param supportedCloudRegionCollection the value to set + * @return this builder + */ + public Builder supportedCloudRegionCollection( + com.oracle.bmc.cloudbridge.model.SupportedCloudRegionCollection + supportedCloudRegionCollection) { + this.supportedCloudRegionCollection = supportedCloudRegionCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSupportedCloudRegionsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + supportedCloudRegionCollection(o.getSupportedCloudRegionCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListSupportedCloudRegionsResponse build() { + return new ListSupportedCloudRegionsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + supportedCloudRegionCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",supportedCloudRegionCollection=") + .append(String.valueOf(supportedCloudRegionCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSupportedCloudRegionsResponse)) { + return false; + } + + ListSupportedCloudRegionsResponse other = (ListSupportedCloudRegionsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.supportedCloudRegionCollection, other.supportedCloudRegionCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.supportedCloudRegionCollection == null + ? 43 + : this.supportedCloudRegionCollection.hashCode()); + return result; + } +} diff --git a/bmc-cloudguard/pom.xml b/bmc-cloudguard/pom.xml index ff0b8bdf335..3bbd0a7966e 100644 --- a/bmc-cloudguard/pom.xml +++ b/bmc-cloudguard/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-cloudguard @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-cloudmigrations/pom.xml b/bmc-cloudmigrations/pom.xml index e0a30b63d0f..1e68a5fc7d6 100644 --- a/bmc-cloudmigrations/pom.xml +++ b/bmc-cloudmigrations/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-cloudmigrations @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-clusterplacementgroups/pom.xml b/bmc-clusterplacementgroups/pom.xml index f6945cb9a01..33208db3587 100644 --- a/bmc-clusterplacementgroups/pom.xml +++ b/bmc-clusterplacementgroups/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-clusterplacementgroups @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-common/pom.xml b/bmc-common/pom.xml index 0b281fdb2ae..09bcbcec76b 100644 --- a/bmc-common/pom.xml +++ b/bmc-common/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml @@ -76,7 +76,7 @@ com.oracle.oci.sdk oci-java-sdk-circuitbreaker - 2.73.0 + 2.79.0 diff --git a/bmc-common/src/main/java/com/oracle/bmc/Realm.java b/bmc-common/src/main/java/com/oracle/bmc/Realm.java index 87d74bb1a95..3c196ff2273 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/Realm.java +++ b/bmc-common/src/main/java/com/oracle/bmc/Realm.java @@ -33,6 +33,9 @@ public final class Realm implements Serializable, Comparable { public static final Realm OC21 = new Realm("oc21", "oraclecloud21.com"); public static final Realm OC26 = new Realm("oc26", "oraclecloud26.com"); public static final Realm OC15 = new Realm("oc15", "oraclecloud15.com"); + public static final Realm OC29 = new Realm("oc29", "oraclecloud29.com"); + public static final Realm OC23 = new Realm("oc23", "oraclecloud23.com"); + public static final Realm OC35 = new Realm("oc35", "oraclecloud35.com"); private static final long serialVersionUID = -905344971L; /** * The id of the realm. diff --git a/bmc-common/src/main/java/com/oracle/bmc/Region.java b/bmc-common/src/main/java/com/oracle/bmc/Region.java index d5f09818f4d..fb1f863b2f1 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/Region.java +++ b/bmc-common/src/main/java/com/oracle/bmc/Region.java @@ -34,6 +34,7 @@ import java.util.concurrent.locks.ReentrantLock; import static com.oracle.bmc.auth.AbstractFederationClientAuthenticationDetailsProviderBuilder.AUTHORIZATION_HEADER_VALUE; import static com.oracle.bmc.auth.AbstractFederationClientAuthenticationDetailsProviderBuilder.METADATA_SERVICE_BASE_URL; +import static com.oracle.bmc.auth.AbstractFederationClientAuthenticationDetailsProviderBuilder.METADATA_URL_OVERRIDE; import static javax.ws.rs.core.HttpHeaders.AUTHORIZATION; /** @@ -124,6 +125,8 @@ private static String getDefaultRealmFromEnv() { public static final Region US_SALTLAKE_2 = register("us-saltlake-2", Realm.OC1, "aga"); public static final Region SA_BOGOTA_1 = register("sa-bogota-1", Realm.OC1, "bog"); public static final Region SA_VALPARAISO_1 = register("sa-valparaiso-1", Realm.OC1, "vap"); + public static final Region AP_SINGAPORE_2 = register("ap-singapore-2", Realm.OC1, "xsp"); + public static final Region ME_RIYADH_1 = register("me-riyadh-1", Realm.OC1, "ruh"); // OC2 public static final Region US_LANGLEY_1 = register("us-langley-1", Realm.OC2, "lfi"); @@ -165,16 +168,31 @@ private static String getDefaultRealmFromEnv() { // OC24 public static final Region EU_DCC_ZURICH_1 = register("eu-dcc-zurich-1", Realm.OC24, "avz"); + public static final Region EU_CRISSIER_1 = register("eu-crissier-1", Realm.OC24, "avf"); // OC21 public static final Region ME_DCC_DOHA_1 = register("me-dcc-doha-1", Realm.OC21, "doh"); // OC26 public static final Region ME_ABUDHABI_3 = register("me-abudhabi-3", Realm.OC26, "ahu"); + public static final Region ME_ALAIN_1 = register("me-alain-1", Realm.OC26, "rba"); // OC15 public static final Region AP_DCC_GAZIPUR_1 = register("ap-dcc-gazipur-1", Realm.OC15, "dac"); + // OC29 + public static final Region ME_ABUDHABI_2 = register("me-abudhabi-2", Realm.OC29, "rkt"); + public static final Region ME_ABUDHABI_4 = register("me-abudhabi-4", Realm.OC29, "shj"); + + // OC23 + public static final Region US_SOMERSET_1 = register("us-somerset-1", Realm.OC23, "ebb"); + public static final Region US_THAMES_1 = register("us-thames-1", Realm.OC23, "ebl"); + + // OC35 + public static final Region AP_SEOUL_2 = register("ap-seoul-2", Realm.OC35, "dtz"); + public static final Region AP_SUWON_1 = register("ap-suwon-1", Realm.OC35, "dln"); + public static final Region AP_CHUNCHEON_2 = register("ap-chuncheon-2", Realm.OC35, "bno"); + private static final Map> SERVICE_TO_REGION_ENDPOINTS = new HashMap<>(); @@ -710,7 +728,7 @@ public static boolean registerFromInstanceMetadataService() { LOG.info( "Requesting region metadata blob from IMDS at {}", - METADATA_SERVICE_BASE_URL + "instance/regionInfo"); + getMetadataBaseUrl() + "instance/regionInfo"); final String REGION_INFO = "regionInfo"; String regionMetadataSchema = AbstractFederationClientAuthenticationDetailsProviderBuilder.simpleRetry( @@ -719,7 +737,7 @@ public static boolean registerFromInstanceMetadataService() { .request(MediaType.APPLICATION_JSON) .header(AUTHORIZATION, AUTHORIZATION_HEADER_VALUE) .get(String.class), - METADATA_SERVICE_BASE_URL, + getMetadataBaseUrl(), REGION_INFO); hasReceivedInstanceMetadataServiceResponse = true; @@ -749,6 +767,20 @@ public static boolean registerFromInstanceMetadataService() { return hasReceivedInstanceMetadataServiceResponse; } + private static String getMetadataBaseUrl() { + if (!StringUtils.isBlank(METADATA_URL_OVERRIDE)) { + LOG.info( + "Environment Variable OCI_METADATA_BASE_URL is present. Overriding default base url to: {}", + METADATA_URL_OVERRIDE); + return METADATA_URL_OVERRIDE; + } else { + LOG.info( + "Environment Variable OCI_METADATA_BASE_URL is not present. Using default base url: {}", + METADATA_SERVICE_BASE_URL); + return METADATA_SERVICE_BASE_URL; + } + } + public boolean equals(final Object o) { if (o == this) return true; if (!(o instanceof Region)) return false; diff --git a/bmc-common/src/main/java/com/oracle/bmc/Service.java b/bmc-common/src/main/java/com/oracle/bmc/Service.java index ae0240b01ce..a7cc5618127 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/Service.java +++ b/bmc-common/src/main/java/com/oracle/bmc/Service.java @@ -44,13 +44,6 @@ public interface Service { */ Map getServiceEndpointTemplateForRealmMap(); - /** - * This method adds service endpoint templates for the realm to a map - * - * @param realmId Key in the map - * @param endpoint Value in the map - */ - /** * The service endpoint name that will be used only for dotted regions if set by the service. * {service} in "https://{service}.{region}". diff --git a/bmc-common/src/main/java/com/oracle/bmc/Services.java b/bmc-common/src/main/java/com/oracle/bmc/Services.java index f3ab728e4ff..84e70206970 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/Services.java +++ b/bmc-common/src/main/java/com/oracle/bmc/Services.java @@ -21,7 +21,6 @@ public class Services { private static final Map SERVICE_CACHE = new HashMap<>(); private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(Services.class); - private static final Map REALM_SPECIFIC_ENDPOINT_TEMPLATE_MAP = new HashMap<>(); /** * Create a new service definition. If the service has already been registered @@ -55,7 +54,8 @@ private static synchronized Service create( final String serviceName, final String serviceEndpointPrefix, final String serviceEndpointTemplate, - final String endpointServiceName) { + final String endpointServiceName, + final Map serviceEndpointTemplatesForRealms) { Validate.notBlank(serviceName, "serviceName must be set to a non-empty string"); final Service newInstance = @@ -63,7 +63,8 @@ private static synchronized Service create( serviceName, serviceEndpointPrefix, serviceEndpointTemplate, - endpointServiceName); + endpointServiceName, + serviceEndpointTemplatesForRealms); if (SERVICE_CACHE.containsKey(serviceName)) { Service existing = SERVICE_CACHE.get(serviceName); if (existing.equals(newInstance)) { @@ -90,22 +91,26 @@ private static final class BasicService implements Service { private final String serviceEndpointPrefix; private final String serviceEndpointTemplate; private final String endpointServiceName; + private final Map serviceEndpointTemplatesForRealms; @java.beans.ConstructorProperties({ "serviceName", "serviceEndpointPrefix", "serviceEndpointTemplate", - "endpointServiceName" + "endpointServiceName", + "serviceEndpointTemplatesForRealms" }) public BasicService( String serviceName, String serviceEndpointPrefix, String serviceEndpointTemplate, - String endpointServiceName) { + String endpointServiceName, + Map serviceEndpointTemplatesForRealms) { this.serviceName = serviceName; this.serviceEndpointPrefix = serviceEndpointPrefix; this.serviceEndpointTemplate = serviceEndpointTemplate; this.endpointServiceName = endpointServiceName; + this.serviceEndpointTemplatesForRealms = serviceEndpointTemplatesForRealms; } public String getServiceName() { @@ -120,12 +125,8 @@ public String getServiceEndpointTemplate() { return this.serviceEndpointTemplate; } - public void addServiceEndpointTemplateForRealm(String realmId, String endpoint) { - REALM_SPECIFIC_ENDPOINT_TEMPLATE_MAP.put(realmId, endpoint); - } - public Map getServiceEndpointTemplateForRealmMap() { - return Collections.unmodifiableMap(REALM_SPECIFIC_ENDPOINT_TEMPLATE_MAP); + return Collections.unmodifiableMap(serviceEndpointTemplatesForRealms); } public String getEndpointServiceName() { @@ -157,6 +158,14 @@ public boolean equals(final Object o) { if (this$endpointServiceName == null ? other$endpointServiceName != null : !this$endpointServiceName.equals(other$endpointServiceName)) return false; + final Object this$serviceEndpointTemplatesForRealms = + this.getServiceEndpointTemplateForRealmMap(); + final Object other$serviceEndpointTemplatesForRealms = + other.getServiceEndpointTemplateForRealmMap(); + if (this$serviceEndpointTemplatesForRealms == null + ? other$serviceEndpointTemplatesForRealms != null + : !this$serviceEndpointTemplatesForRealms.equals( + other$serviceEndpointTemplatesForRealms)) return false; return true; } @@ -181,6 +190,13 @@ public int hashCode() { result = result * PRIME + ($endpointServiceName == null ? 43 : $endpointServiceName.hashCode()); + final Object $serviceEndpointTemplatesForRealms = + this.getServiceEndpointTemplateForRealmMap(); + result = + result * PRIME + + ($serviceEndpointTemplatesForRealms == null + ? 43 + : $serviceEndpointTemplatesForRealms.hashCode()); return result; } @@ -193,6 +209,8 @@ public String toString() { + this.getServiceEndpointTemplate() + ", endpointServiceName=" + this.getEndpointServiceName() + + ", serviceEndpointTemplatesForRealms=" + + this.getServiceEndpointTemplateForRealmMap() + ")"; } } @@ -202,6 +220,7 @@ public static class ServiceBuilder { private String serviceEndpointPrefix; private String serviceEndpointTemplate; private String endpointServiceName; + private Map serviceEndpointTemplatesForRealms = new HashMap<>(); ServiceBuilder() {} @@ -220,8 +239,11 @@ public ServiceBuilder serviceEndpointTemplate(String serviceEndpointTemplate) { return this; } + /** + * This method is called only when a service defines realm-specific endpoint templates + */ public ServiceBuilder addServiceEndpointTemplateForRealm(String realmId, String endpoint) { - REALM_SPECIFIC_ENDPOINT_TEMPLATE_MAP.put(realmId, endpoint); + serviceEndpointTemplatesForRealms.put(realmId, endpoint); return this; } @@ -235,7 +257,8 @@ public Service build() { serviceName, serviceEndpointPrefix, serviceEndpointTemplate, - endpointServiceName); + endpointServiceName, + serviceEndpointTemplatesForRealms); } public String toString() { @@ -247,6 +270,8 @@ public String toString() { + this.serviceEndpointTemplate + ", endpointServiceName=" + this.endpointServiceName + + ", serviceEndpointTemplatesForRealms=" + + this.serviceEndpointTemplatesForRealms + ")"; } } diff --git a/bmc-common/src/main/java/com/oracle/bmc/auth/AbstractFederationClientAuthenticationDetailsProviderBuilder.java b/bmc-common/src/main/java/com/oracle/bmc/auth/AbstractFederationClientAuthenticationDetailsProviderBuilder.java index 2e7ddb1cabb..cd0e3793396 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/auth/AbstractFederationClientAuthenticationDetailsProviderBuilder.java +++ b/bmc-common/src/main/java/com/oracle/bmc/auth/AbstractFederationClientAuthenticationDetailsProviderBuilder.java @@ -14,6 +14,7 @@ import com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration; import com.oracle.bmc.internal.GuavaUtils; import com.oracle.bmc.util.CircuitBreakerUtils; +import com.oracle.bmc.util.internal.StringUtils; import com.oracle.bmc.waiter.ExponentialBackoffDelayStrategyWithJitter; import com.oracle.bmc.waiter.WaiterConfiguration; import org.slf4j.Logger; @@ -65,10 +66,14 @@ public abstract class AbstractFederationClientAuthenticationDetailsProviderBuild */ public static final String METADATA_SERVICE_BASE_URL = "http://169.254.169.254/opc/v2/"; - /** - * Fallback url of metadata service. - */ - protected static final String FALLBACK_METADATA_SERVICE_URL = "http://169.254.169.254/opc/v1/"; + /** Environment variable used to overwrite the default metadata base url. */ + public static final String METADATA_BASE_URL_ENV_VAR = "OCI_METADATA_BASE_URL"; + + /** Metadata URL from environment variable, to use if present. */ + public static final String METADATA_URL_OVERRIDE = System.getenv(METADATA_BASE_URL_ENV_VAR); + + /** Flag to ensure V2 endpoint is only checked once, if successful. */ + private volatile boolean wasImdsV2CheckExecuted = false; /** * The Authorization header value to be sent for requests to the metadata service. @@ -132,11 +137,6 @@ public void log(java.util.logging.Level level, String msg) { */ protected String federationEndpoint; - /** - * Flag to ensure fallback logic executed only once. - */ - private volatile boolean wasFallbackCheckExecuted = false; - /** * The leaf certificate, or null if detecting from instance metadata. */ @@ -246,7 +246,7 @@ protected FederationClient createFederationClient(SessionKeySupplier sessionKeyS CircuitBreakerConfiguration circuitBreakerConfig = circuitBreakerConfiguration != null ? circuitBreakerConfiguration - : CircuitBreakerUtils.getDefaultCircuitBreakerConfiguration(); + : CircuitBreakerUtils.getDefaultAuthClientCircuitBreakerConfiguration(); if (purpose != null) { return new X509FederationClient( @@ -288,7 +288,7 @@ protected void autoDetectUsingMetadataUrl() { protected String autoDetectEndpointUsingMetadataUrl() { if (federationEndpoint == null) { - executeInstanceFallback(); + executeImdsV2EndpointCheck(); String regionStr = simpleRetry( base -> { @@ -338,11 +338,11 @@ protected String autoDetectEndpointUsingMetadataUrl() { protected void autoDetectCertificatesUsingMetadataUrl() { try { - if (!wasFallbackCheckExecuted) { + if (!wasImdsV2CheckExecuted) { LOG.info( - " Executing fallback check for certificates as federation endpoint was already set to {}", + "Executing IMDS V2 check for certificates as federation endpoint was already set to {}", getFederationEndpoint()); - executeInstanceFallback(); + executeImdsV2EndpointCheck(); } if (leafCertificateSupplier == null) { @@ -376,44 +376,39 @@ protected void autoDetectCertificatesUsingMetadataUrl() { } /** - * Checks and falls back to V1 endpoint for both federation endpoint detection & certificates if necessary. + * Checks IMDS V2 endpoint for both federation endpoint detection & certificates if necessary. */ - private void executeInstanceFallback() { + private void executeImdsV2EndpointCheck() { try { Response response = simpleRetry( base -> { - Response fallbackResponse = + Response v2CheckResponse = base.path(REGION_PATH_LITERAL) .request(MediaType.TEXT_PLAIN) .header( HttpHeaders.AUTHORIZATION, AUTHORIZATION_HEADER_VALUE) .get(); - return fallbackResponse; + return v2CheckResponse; }, getMetadataBaseUrl(), REGION_PATH_LITERAL); LOG.info( - "Rest call to verify if v2 endpoint exists, response from v2 was {}", + "REST request to verify if IMDS v2 endpoint exists, response from v2 was {}", response.getStatus()); - //fallback to v1 if v2 endpoint throws resource not found else raise exception - if (response.getStatus() == 404) { - LOG.warn("Falling back to v1, response from v2 was {}", response.getStatus()); - this.metadataBaseUrl = FALLBACK_METADATA_SERVICE_URL; - } else if (!Response.Status.Family.SUCCESSFUL.equals( - response.getStatusInfo().getFamily())) { + if (!Response.Status.Family.SUCCESSFUL.equals(response.getStatusInfo().getFamily())) { throw new RuntimeException( - "Rest call to v2 endpoint failed : HTTP error code : " + "REST request to IMDS v2 endpoint failed : HTTP error code : " + response.getStatus()); } - wasFallbackCheckExecuted = true; - LOG.info( - " Metadata base url on executing instance fallback is {}", - getMetadataBaseUrl()); + wasImdsV2CheckExecuted = true; + LOG.info("Metadata base url is {}", getMetadataBaseUrl()); } catch (RuntimeException e) { - LOG.warn("Rest call to v2 endpoint failed & cannot fallback as it's not 404 ", e); + LOG.warn( + "REST request to IMDS v2 endpoint failed with unexpected Runtime exception ", + e); } } @@ -441,7 +436,17 @@ private URLBasedX509CertificateSupplier.ResourceDetails getMetadataResourceDetai protected abstract P buildProvider(SessionKeySupplier sessionKeySupplierToUse); public String getMetadataBaseUrl() { - return this.metadataBaseUrl; + if (!StringUtils.isBlank(METADATA_URL_OVERRIDE)) { + LOG.info( + "Environment Variable OCI_METADATA_BASE_URL is present. Overriding default base url to: {}", + METADATA_URL_OVERRIDE); + return METADATA_URL_OVERRIDE; + } else { + LOG.info( + "Environment Variable OCI_METADATA_BASE_URL is not present. Using url: {}", + this.metadataBaseUrl); + return this.metadataBaseUrl; + } } public String getFederationEndpoint() { @@ -548,7 +553,7 @@ public static T simpleRetry( final String endpoint) { ExponentialBackoffDelayStrategyWithJitter strategy = - new ExponentialBackoffDelayStrategyWithJitter(TimeUnit.SECONDS.toMillis(100)); + new ExponentialBackoffDelayStrategyWithJitter(TimeUnit.SECONDS.toMillis(30)); WaiterConfiguration.WaitContext context = new WaiterConfiguration.WaitContext(System.currentTimeMillis()); @@ -582,7 +587,6 @@ public static T simpleRetry( } } } - CLIENT.close(); throw lastException; } } diff --git a/bmc-common/src/main/java/com/oracle/bmc/auth/ResourcePrincipalAuthenticationDetailsProvider.java b/bmc-common/src/main/java/com/oracle/bmc/auth/ResourcePrincipalAuthenticationDetailsProvider.java index 4cd54ab0243..5b9f383f6f9 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/auth/ResourcePrincipalAuthenticationDetailsProvider.java +++ b/bmc-common/src/main/java/com/oracle/bmc/auth/ResourcePrincipalAuthenticationDetailsProvider.java @@ -16,6 +16,7 @@ import com.oracle.bmc.auth.internal.ResourcePrincipalV2FederationClient; import com.oracle.bmc.auth.internal.ResourcePrincipalsFederationClient; import com.oracle.bmc.auth.internal.RptPathProvider; +import com.oracle.bmc.auth.internal.SupplierBasedResourcePrincipalFederationClient; import com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration; import com.oracle.bmc.internal.GuavaUtils; import com.oracle.bmc.util.CircuitBreakerUtils; @@ -157,6 +158,8 @@ public class ResourcePrincipalAuthenticationDetailsProvider org.slf4j.LoggerFactory.getLogger(ResourcePrincipalAuthenticationDetailsProvider.class); protected final static String OCI_RESOURCE_PRINCIPAL_VERSION = "OCI_RESOURCE_PRINCIPAL_VERSION"; static final String OCI_RESOURCE_PRINCIPAL_RPST = "OCI_RESOURCE_PRINCIPAL_RPST"; + static final String OCI_RESOURCE_PRINCIPAL_RPST_SUPPLIER = + "OCI_RESOURCE_PRINCIPAL_RPST_SUPPLIER"; private static final String OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT = "OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT"; private static final String OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT = @@ -507,6 +510,38 @@ public static ResourcePrincipalAuthenticationDetailsProvider build_2_2( federationClient, sessionKeySupplier, region); } + /** + * Helper method that builds a v2.2-configured client based on a resource principal supplier function + * @return ResourcePrincipalAuthenticationDetailsProvider + */ + public static ResourcePrincipalAuthenticationDetailsProvider build_2_2( + String ociResourcePrincipalPrivateKey, + String ociResourcePrincipalPassphrase, + java.util.function.Function ociResourcePrincipalRpstSupplier, + T resourcePrincipalCreationConfig, + String ociResourcePrincipalRegion, + String inputType) { + + final SessionKeySupplier sessionKeySupplier = + getSessionKeySupplierFromPemAndPassphrase( + ociResourcePrincipalPrivateKey, + ociResourcePrincipalPassphrase, + inputType); + + final FederationClient federationClient = + getFederationClientFromRpstSupplier( + ociResourcePrincipalRpstSupplier, + resourcePrincipalCreationConfig, + sessionKeySupplier); + + final Region region = + ResourcePrincipalAuthenticationDetailsProvider.getRegion( + ociResourcePrincipalRegion, inputType); + + return new ResourcePrincipalAuthenticationDetailsProvider( + federationClient, sessionKeySupplier, region); + } + /** * Helper method that interprets the runtime environment to build a v2.1.2-configured client * @return ResourcePrincipalAuthenticationDetailsProvider @@ -806,6 +841,24 @@ protected static FederationClient getFederationClientFromRpst( return federationClient; } + private static FederationClient getFederationClientFromRpstSupplier( + java.util.function.Function ociResourcePrincipalRpstSupplier, + T resourcePrincipalCreationConfig, + SessionKeySupplier sessionKeySupplier) { + + if (ociResourcePrincipalRpstSupplier == null) { + throw new IllegalArgumentException( + OCI_RESOURCE_PRINCIPAL_RPST_SUPPLIER + " missing." + RP_DEBUG_INFORMATION_LOG); + } + + LOG.debug( + "Loading RPST from supplier provided. Creating instance of SupplierBasedResourcePrincipalFederationClient"); + return new SupplierBasedResourcePrincipalFederationClient<>( + ociResourcePrincipalRpstSupplier, + resourcePrincipalCreationConfig, + sessionKeySupplier); + } + protected static SessionKeySupplier getSessionKeySupplierFromPemAndPassphrase( String ociResourcePrincipalPrivateKey, String ociResourcePrincipalPassphrase, diff --git a/bmc-common/src/main/java/com/oracle/bmc/auth/SessionTokenAuthenticationDetailsProvider.java b/bmc-common/src/main/java/com/oracle/bmc/auth/SessionTokenAuthenticationDetailsProvider.java index 8e6e22d1fb7..dad28bead65 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/auth/SessionTokenAuthenticationDetailsProvider.java +++ b/bmc-common/src/main/java/com/oracle/bmc/auth/SessionTokenAuthenticationDetailsProvider.java @@ -19,6 +19,7 @@ /** * Implementation of {@link AuthenticationDetailsProvider} that uses a session token for authentication. */ +@AuthCachingPolicy(cacheKeyId = false, cachePrivateKey = false) public class SessionTokenAuthenticationDetailsProvider implements AuthenticationDetailsProvider, RegionProvider, RefreshableOnNotAuthenticatedProvider { @@ -147,6 +148,9 @@ public String refresh() { if (this.sessionToken.equals(oldSessionToken)) { LOG.warn( "A session token refresh was attempted but it did not change. The token file has not been updated!"); + } else { + LOG.info( + "A session token refresh was attempted and the token was successfully changed. The token file has been updated!"); } } catch (IOException e) { LOG.warn("Unable to refresh session token.", e); diff --git a/bmc-common/src/main/java/com/oracle/bmc/auth/internal/FileBasedResourcePrincipalFederationClient.java b/bmc-common/src/main/java/com/oracle/bmc/auth/internal/FileBasedResourcePrincipalFederationClient.java index 9e9d548d4e9..babf7ab12b2 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/auth/internal/FileBasedResourcePrincipalFederationClient.java +++ b/bmc-common/src/main/java/com/oracle/bmc/auth/internal/FileBasedResourcePrincipalFederationClient.java @@ -12,9 +12,6 @@ import java.io.FileInputStream; import java.io.IOException; import java.nio.charset.Charset; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; import java.security.KeyPair; import java.time.Duration; import java.util.Optional; diff --git a/bmc-common/src/main/java/com/oracle/bmc/auth/internal/FixedContentResourcePrincipalFederationClient.java b/bmc-common/src/main/java/com/oracle/bmc/auth/internal/FixedContentResourcePrincipalFederationClient.java index 9256cf36b8f..c55e74c73dc 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/auth/internal/FixedContentResourcePrincipalFederationClient.java +++ b/bmc-common/src/main/java/com/oracle/bmc/auth/internal/FixedContentResourcePrincipalFederationClient.java @@ -4,12 +4,22 @@ */ package com.oracle.bmc.auth.internal; +import com.oracle.bmc.auth.ProvidesConfigurableRefresh; import com.oracle.bmc.auth.SessionKeySupplier; +import com.oracle.bmc.util.internal.Validate; +import org.slf4j.Logger; + +import java.time.Duration; +import java.util.Optional; /** * This class returns a security token, supplied as a fixed value. */ -public class FixedContentResourcePrincipalFederationClient implements FederationClient { +public class FixedContentResourcePrincipalFederationClient + implements FederationClient, ProvidesConfigurableRefresh { + private static final Logger LOG = + org.slf4j.LoggerFactory.getLogger(FixedContentResourcePrincipalFederationClient.class); + private final SessionKeySupplier sessionKeySupplier; private final SecurityTokenAdapter securityTokenAdapter; /** @@ -20,6 +30,8 @@ public class FixedContentResourcePrincipalFederationClient implements Federation */ public FixedContentResourcePrincipalFederationClient( String resourcePrincipalSessionToken, SessionKeySupplier sessionKeySupplier) { + this.sessionKeySupplier = + Validate.notNull(sessionKeySupplier, "sessionKeySupplier must not be null"); this.securityTokenAdapter = new SecurityTokenAdapter(resourcePrincipalSessionToken, sessionKeySupplier); } @@ -38,4 +50,37 @@ public String refreshAndGetSecurityToken() { public String getStringClaim(String key) { return securityTokenAdapter.getStringClaim(key); } + + @Override + public String refreshAndGetSecurityTokenIfExpiringWithin(Duration time, boolean refreshKeys) { + return refreshAndGetSecurityTokenInner(true, Optional.of(time), refreshKeys); + } + + @Override + public String refreshAndGetSecurityTokenIfExpiringWithin(Duration time) { + return refreshAndGetSecurityTokenInner(true, Optional.of(time), true); + } + + private String refreshAndGetSecurityTokenInner( + final boolean doFinalTokenValidityCheck, Optional time, boolean refreshKeys) { + // Since this client will be used in a multi-threaded environment (from within a service API), + // this needs to be synchronized to make sure multiple calls are not updating the security token at the same time. + // This should not be a blocking/dead-locked call. The worst I can see at this point is that the auth service does + // not respond and this call times out, throwing exception + synchronized (this) { + // Check again to see if the JWT is still invalid, unless we want to skip that check + if (!doFinalTokenValidityCheck + || (time.isPresent() + ? (!securityTokenAdapter.isValid(time)) + : (!securityTokenAdapter.isValid()))) { + LOG.info("Refreshing session keys."); + if (refreshKeys) { + sessionKeySupplier.refreshKeys(); + } + return securityTokenAdapter.getSecurityToken(); + } + + return securityTokenAdapter.getSecurityToken(); + } + } } diff --git a/bmc-common/src/main/java/com/oracle/bmc/auth/internal/RefreshableSecurityTokenAdapter.java b/bmc-common/src/main/java/com/oracle/bmc/auth/internal/RefreshableSecurityTokenAdapter.java new file mode 100644 index 00000000000..4ca545ec50a --- /dev/null +++ b/bmc-common/src/main/java/com/oracle/bmc/auth/internal/RefreshableSecurityTokenAdapter.java @@ -0,0 +1,190 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.auth.internal; + +import com.oracle.bmc.auth.SessionKeySupplier; +import org.slf4j.Logger; + +import java.security.interfaces.RSAPublicKey; +import java.text.ParseException; +import java.time.Duration; +import java.time.Instant; +import java.util.Date; +import java.util.Optional; +import java.util.function.Function; + +/** An extension of @{@link SecurityTokenAdapter} that allows the security token to be refreshed **/ +public class RefreshableSecurityTokenAdapter { + private static final Logger LOG = + org.slf4j.LoggerFactory.getLogger(RefreshableSecurityTokenAdapter.class); + private final T resourcePrincipalCreationConfig; + private final java.util.function.Function resourcePrincipalSessionTokenSupplier; + + private Optional jwt; + private Optional jwkAsJce; + private final SessionKeySupplier sessionKeySupplier; + private String securityToken; + private static final String JWK = "jwk"; + + public RefreshableSecurityTokenAdapter( + java.util.function.Function resourcePrincipalSessionTokenSupplier, + T resourcePrincipalCreationConfig, + SessionKeySupplier sessionKeySupplier) { + this( + resourcePrincipalSessionTokenSupplier.apply(resourcePrincipalCreationConfig), + sessionKeySupplier, + resourcePrincipalSessionTokenSupplier, + resourcePrincipalCreationConfig); + } + + public RefreshableSecurityTokenAdapter( + String securityToken, + SessionKeySupplier sessionKeySupplier, + Function resourcePrincipalSessionTokenSupplier, + T resourcePrincipalCreationConfig) { + this.securityToken = securityToken; + if (securityToken != null && !securityToken.isEmpty()) { + JwtClaimsSet jwtClaims = new JwtClaimsSet(securityToken); + this.jwt = Optional.of(jwtClaims); + this.jwkAsJce = retrievePublicKey(jwtClaims); + } else { + this.jwt = Optional.empty(); + this.jwkAsJce = Optional.empty(); + } + this.sessionKeySupplier = sessionKeySupplier; + this.resourcePrincipalSessionTokenSupplier = resourcePrincipalSessionTokenSupplier; + this.resourcePrincipalCreationConfig = resourcePrincipalCreationConfig; + } + + /** + * Checks to see if the current token is still valid + * + * @return true if valid + */ + public boolean isValid() { + return isValid(java.util.Optional.empty()); + } + + /** + * Checks to see if the current token is still valid after reducing buffer time + * + * @return true if valid + */ + boolean isValid(java.util.Optional time) { + if (!jwt.isPresent()) { + LOG.debug("Security token is not valid."); + return false; + } + + try { + Date exp = jwt.get().getExpirationTime(); + if (exp != null) { + // Make sure the token is not expired + final Duration bufferTime = time.isPresent() ? time.get() : Duration.ZERO; + if (exp.toInstant().minus(bufferTime).isAfter(Instant.now())) { + LOG.debug("Security token is not expired"); + + // Next compare the public key from the JWT is the same + // from the supplier. + // We check this in case secrets service deploys a new key + // and the JWT is still not expired. + // In such case, we would want to re-issue the token + if (jwkAsJce.isPresent() + && isEqualPublicKey( + jwkAsJce.get(), + (RSAPublicKey) sessionKeySupplier.getKeyPair().getPublic())) { + + LOG.debug( + "Security token is still valid. Public key matches with the JWK."); + return true; + } + } + } + } catch (IllegalArgumentException e) { + LOG.debug("JWT parsing failed"); + return false; + } + return false; + } + + /** + * Convert the JWK to JCE + * + * @param jwtClaimSet JWT claims + * @return JCE Public Key if JWK is present + */ + private static Optional retrievePublicKey(JwtClaimsSet jwtClaimSet) { + try { + String jwk = jwtClaimSet.getStringClaim(JWK); + if (jwk != null) { + return AuthUtils.toPublicKeyFromJson(jwk); + } + } catch (ParseException pe) { + LOG.debug("JWT parsing failed"); + } + return Optional.empty(); + } + + /** + * Checks if two public keys are equal + * + * @param a one public key + * @param b the other one + * @return true if the same + */ + private boolean isEqualPublicKey(RSAPublicKey a, RSAPublicKey b) { + if (a == null || b == null) { + throw new IllegalArgumentException("Public key cannot be null"); + } + + String encodedKey1 = AuthUtils.base64EncodeNoChunking(a); + String encodedKey2 = AuthUtils.base64EncodeNoChunking(b); + + return encodedKey1.equals(encodedKey2); + } + + /** Return a claim from the token */ + public String getStringClaim(String key) { + if (!jwt.isPresent()) { + LOG.debug("Security token is not valid."); + return null; + } + try { + return jwt.get().getStringClaim(key); + } catch (ParseException e) { + throw new IllegalStateException("JWT parsing failed"); + } + } + + /** Get half of the token duration + * + * @return half of the token duration + */ + public Duration getTokenValidDuration() { + if (!jwt.isPresent()) { + return null; + } + return Duration.ofMillis( + jwt.get().getExpirationTime().getTime() - jwt.get().getIssueTime().getTime()); + } + + public String getSecurityToken() { + return this.securityToken; + } + + public void refreshToken() { + LOG.info("Refreshing security token."); + this.securityToken = + resourcePrincipalSessionTokenSupplier.apply(resourcePrincipalCreationConfig); + if (securityToken != null && !securityToken.isEmpty()) { + JwtClaimsSet jwtClaims = new JwtClaimsSet(securityToken); + this.jwt = Optional.of(jwtClaims); + this.jwkAsJce = retrievePublicKey(jwtClaims); + } else { + this.jwt = Optional.empty(); + this.jwkAsJce = Optional.empty(); + } + } +} diff --git a/bmc-common/src/main/java/com/oracle/bmc/auth/internal/SupplierBasedResourcePrincipalFederationClient.java b/bmc-common/src/main/java/com/oracle/bmc/auth/internal/SupplierBasedResourcePrincipalFederationClient.java new file mode 100644 index 00000000000..1b45e0a1fd0 --- /dev/null +++ b/bmc-common/src/main/java/com/oracle/bmc/auth/internal/SupplierBasedResourcePrincipalFederationClient.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.auth.internal; + +import com.oracle.bmc.auth.ProvidesConfigurableRefresh; +import com.oracle.bmc.auth.SessionKeySupplier; +import com.oracle.bmc.util.internal.Validate; +import org.slf4j.Logger; + +import java.time.Duration; +import java.util.Optional; +import java.util.function.Function; + +/** This class returns a security token. This security will be refreshed once it expires by calling the supplied function */ +public class SupplierBasedResourcePrincipalFederationClient + implements FederationClient, ProvidesConfigurableRefresh { + private static final Logger LOG = + org.slf4j.LoggerFactory.getLogger(SupplierBasedResourcePrincipalFederationClient.class); + private final SessionKeySupplier sessionKeySupplier; + private final RefreshableSecurityTokenAdapter securityTokenAdapter; + + /** + * Constructor of SupplierBasedResourcePrincipalFederationClient. + * + * @param resourcePrincipalSessionTokenSupplier the method to call to get a new value for the RPST + * @param resourcePrincipalCreationConfig The object used to create the RPST + * @param sessionKeySupplier the associated SessionKeySupplier + */ + public SupplierBasedResourcePrincipalFederationClient( + Function resourcePrincipalSessionTokenSupplier, + T resourcePrincipalCreationConfig, + SessionKeySupplier sessionKeySupplier) { + this.sessionKeySupplier = + Validate.notNull(sessionKeySupplier, "sessionKeySupplier must not be null"); + this.securityTokenAdapter = + new RefreshableSecurityTokenAdapter<>( + resourcePrincipalSessionTokenSupplier, + resourcePrincipalCreationConfig, + sessionKeySupplier); + } + + @Override + public String getSecurityToken() { + if (securityTokenAdapter != null && securityTokenAdapter.isValid()) { + return securityTokenAdapter.getSecurityToken(); + } + return refreshAndGetSecurityToken(); + } + + @Override + public String refreshAndGetSecurityToken() { + return refreshAndGetSecurityTokenInner(false, Optional.empty(), false); + } + + @Override + public String getStringClaim(String key) { + return securityTokenAdapter.getStringClaim(key); + } + + @Override + public String refreshAndGetSecurityTokenIfExpiringWithin(Duration time, boolean refreshKeys) { + return refreshAndGetSecurityTokenInner(true, Optional.of(time), refreshKeys); + } + + @Override + public String refreshAndGetSecurityTokenIfExpiringWithin(Duration time) { + return refreshAndGetSecurityTokenInner(true, Optional.of(time), true); + } + + private String refreshAndGetSecurityTokenInner( + final boolean doFinalTokenValidityCheck, Optional time, boolean refreshKeys) { + // Since this client will be used in a multi-threaded environment (from within a service + // API), + // this needs to be synchronized to make sure multiple calls are not updating the security + // token at the same time. + // This should not be a blocking/dead-locked call. The worst I can see at this point is that + // the auth service does + // not respond and this call times out, throwing exception + synchronized (this) { + // Check again to see if the JWT is still invalid, unless we want to skip that check + if (!doFinalTokenValidityCheck + || (time.isPresent() + ? (!securityTokenAdapter.isValid(time)) + : (!securityTokenAdapter.isValid()))) { + LOG.info("Refreshing session keys."); + if (refreshKeys) { + sessionKeySupplier.refreshKeys(); + } + this.securityTokenAdapter.refreshToken(); + } + + return securityTokenAdapter.getSecurityToken(); + } + } +} diff --git a/bmc-common/src/main/java/com/oracle/bmc/auth/internal/X509FederationClient.java b/bmc-common/src/main/java/com/oracle/bmc/auth/internal/X509FederationClient.java index 299d868a26b..c26ee487764 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/auth/internal/X509FederationClient.java +++ b/bmc-common/src/main/java/com/oracle/bmc/auth/internal/X509FederationClient.java @@ -20,6 +20,10 @@ import javax.security.auth.Refreshable; import javax.ws.rs.client.Invocation.Builder; import javax.ws.rs.client.WebTarget; +import com.oracle.bmc.retrier.DefaultRetryCondition; +import com.oracle.bmc.retrier.RetryConfiguration; +import com.oracle.bmc.waiter.ExponentialBackoffDelayStrategyWithJitter; +import com.oracle.bmc.waiter.MaxAttemptsTerminationStrategy; import javax.ws.rs.core.Response; import com.fasterxml.jackson.annotation.JsonInclude; @@ -39,6 +43,7 @@ import com.oracle.bmc.util.internal.Validate; import javax.annotation.concurrent.Immutable; +import javax.annotation.Nonnull; import javax.security.auth.RefreshFailedException; import javax.security.auth.Refreshable; import javax.ws.rs.client.Invocation.Builder; @@ -62,6 +67,23 @@ * passing along a temporary public key that is bounded to the the security token, and the leaf certificate. */ public class X509FederationClient implements FederationClient, ProvidesConfigurableRefresh { + private static final RetryConfiguration RETRY_CONFIGURATION = + RetryConfiguration.builder() + .delayStrategy(new ExponentialBackoffDelayStrategyWithJitter(1000)) + .terminationStrategy(new MaxAttemptsTerminationStrategy(3)) + .retryCondition( + new DefaultRetryCondition() { + @Override + public boolean shouldBeRetried(@Nonnull BmcException e) { + if (e == null) { + throw new java.lang.NullPointerException( + "e is marked non-null but is null"); + } + // We should not retry on 4xx + return e.getStatusCode() < 400 || e.getStatusCode() >= 500; + } + }) + .build(); private static final Function> SECURITY_TOKEN_FN = new ResponseConversionFunctionFactory().create(SecurityToken.class); private static final String DEFAULT_PURPOSE = "DEFAULT"; @@ -315,30 +337,17 @@ private SecurityTokenAdapter getSecurityTokenFromServer() { } } - // really simple retry until the SDK supports internal retries @VisibleForTesting Response makeCall(Builder ib, URI requestUri, X509FederationRequest federationRequest) { - BmcException lastException = null; - // Keeping one instance of the WrappedInvocationBuilder in order to preserve the request ID on retries. final WrappedInvocationBuilder wrappedIb = new WrappedInvocationBuilder(ib, requestUri); - for (int retry = 0; retry < 5; retry++) { - try { - return federationHttpClient.post(wrappedIb, federationRequest, new BmcRequest()); - } catch (BmcException e) { - // retry in all cases right now - lastException = e; - try { - Thread.sleep(250L); - } catch (InterruptedException e1) { - LOG.debug( - "Thread interrupted while waiting to make next call to federation service", - e1); - Thread.currentThread().interrupt(); - break; - } - } - } - throw lastException; + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier(RETRY_CONFIGURATION, null); + return retrier.execute( + federationRequest, + retryRequest -> { + return federationHttpClient.post( + wrappedIb, federationRequest, new BmcRequest()); + }); } @Override diff --git a/bmc-common/src/main/java/com/oracle/bmc/http/internal/IdleConnectionMonitor.java b/bmc-common/src/main/java/com/oracle/bmc/http/internal/IdleConnectionMonitor.java index c774ac74891..6029b454900 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/http/internal/IdleConnectionMonitor.java +++ b/bmc-common/src/main/java/com/oracle/bmc/http/internal/IdleConnectionMonitor.java @@ -190,10 +190,15 @@ public int getWaitTimeInSeconds() { return waitTimeInSeconds; } + @VisibleForTesting boolean isIdleConnectionMonitorThreadClosed() { return shutdown; } + @VisibleForTesting + public static IdleConnectionMonitor getInstance() { + return instance; + } /** * Keeps the settings for a ConnectionMonitor. */ diff --git a/bmc-common/src/main/java/com/oracle/bmc/http/internal/RestClient.java b/bmc-common/src/main/java/com/oracle/bmc/http/internal/RestClient.java index a120f012db1..17c964e7521 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/http/internal/RestClient.java +++ b/bmc-common/src/main/java/com/oracle/bmc/http/internal/RestClient.java @@ -1496,7 +1496,7 @@ static Throwable getRootCause(Throwable t) { */ private static String getUriSafe(WebTarget target) { try { - return target.getUri().toString(); + return target.getUriBuilder().toTemplate(); } catch (Exception ex) { LOG.error("Error getting target URI string", ex); return ": " + ex.getMessage(); diff --git a/bmc-common/src/main/java/com/oracle/bmc/internal/EndpointBuilder.java b/bmc-common/src/main/java/com/oracle/bmc/internal/EndpointBuilder.java index 73a9edf52fe..923a5253569 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/internal/EndpointBuilder.java +++ b/bmc-common/src/main/java/com/oracle/bmc/internal/EndpointBuilder.java @@ -19,6 +19,7 @@ import com.oracle.bmc.http.internal.RestClient; import com.oracle.bmc.http.internal.WrappedWebTarget; import com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils; +import com.oracle.bmc.util.VisibleForTesting; import com.oracle.bmc.util.internal.StringUtils; import javax.annotation.Nonnull; @@ -241,12 +242,19 @@ public static final WrappedWebTarget populateServiceParametersInEndpoint( if (!endpointTemplate.contains("{")) { return client.getBaseTarget(); } + String endpoint = + getEndpointWithPopulatedServiceParams(endpointTemplate, requiredParametersMap); + return new WrappedWebTarget(client.getClient().target(endpoint)); + } + @VisibleForTesting + protected static String getEndpointWithPopulatedServiceParams( + String endpointTemplate, Map requiredParametersMap) { List parameters = parseEndpointForParams(endpointTemplate); - String updatedEndpoint = null; + String updatedEndpoint = endpointTemplate; if (parameters != null && parameters.size() > 0 && requiredParametersMap.isEmpty()) { updatedEndpoint = endpointTemplate.replaceAll("\\{.*?\\}", ""); - return new WrappedWebTarget(client.getClient().target(updatedEndpoint)); + return updatedEndpoint; } for (String parameter : parameters) { @@ -267,24 +275,23 @@ public static final WrappedWebTarget populateServiceParametersInEndpoint( LOG.debug( "The parameter for {} cannot be populated since the value is not of type String", paramName); - updatedEndpoint = endpointTemplate.replace(parameter, ""); - client.getClient().target(updatedEndpoint); + updatedEndpoint = updatedEndpoint.replace(parameter, ""); continue; } if (appendDot) { updatedEndpoint = - endpointTemplate.replace( + updatedEndpoint.replace( parameter, requiredParametersMap.get(paramName) + "."); } else { updatedEndpoint = - endpointTemplate.replace( + updatedEndpoint.replace( parameter, requiredParametersMap.get(paramName).toString()); } } else { - updatedEndpoint = endpointTemplate.replace(parameter, ""); + updatedEndpoint = updatedEndpoint.replace(parameter, ""); } } - return new WrappedWebTarget(client.getClient().target(updatedEndpoint)); + return updatedEndpoint; } private static List parseEndpointForParams(String endpointTemplate) { diff --git a/bmc-common/src/main/java/com/oracle/bmc/util/CircuitBreakerUtils.java b/bmc-common/src/main/java/com/oracle/bmc/util/CircuitBreakerUtils.java index 18db16ab417..d89189e1d96 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/util/CircuitBreakerUtils.java +++ b/bmc-common/src/main/java/com/oracle/bmc/util/CircuitBreakerUtils.java @@ -11,10 +11,17 @@ import com.oracle.bmc.circuitbreaker.internal.JaxRsCircuitBreakerImpl; import org.slf4j.Logger; +import java.time.Duration; +import java.util.concurrent.ThreadLocalRandom; + public class CircuitBreakerUtils { private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(CircuitBreakerUtils.class); private static volatile CircuitBreakerConfiguration defaultCircuitBreakerConfiguration; + private static final int DEFAULT_FAILURE_RATE_THRESHOLD_FOR_AUTH_CLIENT_CB = 65; + private static final int DEFAULT_MINIMUM_NUMBER_OF_CALLS_FOR_AUTH_CLIENT_CB = 3; + private static final int DEFAULT_MINIMUM_WAIT_DURATION_IN_OPEN_STATE_FOR_AUTH_CLIENT_CB = 30; + private static final int DEFAULT_MAXIMUM_WAIT_DURATION_IN_OPEN_STATE_FOR_AUTH_CLIENT_CB = 49; public static CircuitBreakerConfiguration getNoCircuitBreakerConfiguration() { return new NoCircuitBreakerConfiguration(); @@ -134,4 +141,25 @@ public static void setDefaultCircuitBreakerConfiguration( CircuitBreakerConfiguration defaultCircuitBreakerConfiguration) { CircuitBreakerUtils.defaultCircuitBreakerConfiguration = defaultCircuitBreakerConfiguration; } + + /** + * Get default CircuitBreakerConfiguration for X509 calls + * + * @return the default CircuitBreakerConfiguration for Auth client + */ + public static CircuitBreakerConfiguration getDefaultAuthClientCircuitBreakerConfiguration() { + LOG.debug( + "Configuring default auth client circuit breaker configuration for federation client"); + return CircuitBreakerConfiguration.builder() + .minimumNumberOfCalls(DEFAULT_MINIMUM_NUMBER_OF_CALLS_FOR_AUTH_CLIENT_CB) + .failureRateThreshold(DEFAULT_FAILURE_RATE_THRESHOLD_FOR_AUTH_CLIENT_CB) + .waitDurationInOpenState( + Duration.ofSeconds( + ThreadLocalRandom.current() + .nextInt( + DEFAULT_MINIMUM_WAIT_DURATION_IN_OPEN_STATE_FOR_AUTH_CLIENT_CB, + DEFAULT_MAXIMUM_WAIT_DURATION_IN_OPEN_STATE_FOR_AUTH_CLIENT_CB + + 1))) + .build(); + } } diff --git a/bmc-common/src/test/java/com/oracle/bmc/ServicesTest.java b/bmc-common/src/test/java/com/oracle/bmc/ServicesTest.java index 133583272ef..f459e376f60 100644 --- a/bmc-common/src/test/java/com/oracle/bmc/ServicesTest.java +++ b/bmc-common/src/test/java/com/oracle/bmc/ServicesTest.java @@ -7,6 +7,8 @@ import org.junit.BeforeClass; import org.junit.Test; +import static org.junit.Assert.assertEquals; + public class ServicesTest { @BeforeClass @@ -47,4 +49,50 @@ public void addService_noName() { public void addService_blankServiceName() { Services.serviceBuilder().serviceName("").build(); } + + @Test + public void testAddServiceEndpointTemplateForRealm() { + Service testService1 = + Services.serviceBuilder() + .serviceName("SERVICE") + .serviceEndpointPrefix("service") + .serviceEndpointTemplate("{region}.service.oci.oraclecloud.com") + .addServiceEndpointTemplateForRealm( + "oc1", "{region}.service.oci.oracle-cloud.com") + .build(); + + assertEquals( + "{region}.service.oci.oracle-cloud.com", + testService1.getServiceEndpointTemplateForRealmMap().get("oc1")); + assertEquals(null, testService1.getServiceEndpointTemplateForRealmMap().get("oc3")); + + Service testService2 = + Services.serviceBuilder() + .serviceName("TEST") + .serviceEndpointPrefix("test") + .serviceEndpointTemplate("{region}.test.oci.oraclecloud.com") + .addServiceEndpointTemplateForRealm( + "oc3", "{region}.test.oci.oracle-cloud.com") + .addServiceEndpointTemplateForRealm( + "oc6", "{region}.test.oci.oracle-cloud.com") + .build(); + + assertEquals(null, testService2.getServiceEndpointTemplateForRealmMap().get("oc1")); + assertEquals( + "{region}.test.oci.oracle-cloud.com", + testService2.getServiceEndpointTemplateForRealmMap().get("oc3")); + assertEquals( + "{region}.test.oci.oracle-cloud.com", + testService2.getServiceEndpointTemplateForRealmMap().get("oc6")); + + Service testService3 = + Services.serviceBuilder() + .serviceName("SERVICETEST") + .serviceEndpointPrefix("test") + .serviceEndpointTemplate("{region}.servicetest.oci.oraclecloud.com") + .build(); + assertEquals(null, testService3.getServiceEndpointTemplateForRealmMap().get("oc1")); + assertEquals(null, testService3.getServiceEndpointTemplateForRealmMap().get("oc3")); + assertEquals(null, testService3.getServiceEndpointTemplateForRealmMap().get("oc6")); + } } diff --git a/bmc-common/src/test/java/com/oracle/bmc/auth/ResourcePrincipalAuthenticationDetailsProviderTest.java b/bmc-common/src/test/java/com/oracle/bmc/auth/ResourcePrincipalAuthenticationDetailsProviderTest.java new file mode 100644 index 00000000000..b34945e5543 --- /dev/null +++ b/bmc-common/src/test/java/com/oracle/bmc/auth/ResourcePrincipalAuthenticationDetailsProviderTest.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.auth; + +import com.oracle.bmc.util.StreamUtils; +import org.junit.Assert; +import org.junit.Test; + +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.nio.charset.StandardCharsets; +import java.util.concurrent.atomic.AtomicInteger; + +public class ResourcePrincipalAuthenticationDetailsProviderTest { + + final String privateKey = + StreamUtils.toString( + new FileInputStream("src/test/resources/pkcs1_private_key.pem"), + StandardCharsets.UTF_8); + + static final String fakeToken = + "eyJraWQiOiJhc3dfb2MxX2RlMWIxZmM3IiwiYWxnIjoiUlMyNTYifQ" + + "." + + "eyJzdWIiOiJvY2lkMS5pbnN0YW5jZS5vYzEuaWFkLmFudXdjbGp0NDZjbGRkeWM3N3Q3cGpzeHFxdXF3aHBuZG03YnJ1YXlmd2U2M2ZkcmRldW80Y2VvazRwYSIsIm9wYy1jZXJ0dHlwZSI6Imluc3RhbmNlIiwiaXNzIjoiYXV0aFNlcnZpY2Uub3JhY2xlLmNvbSIsImZwcmludCI6IjZDOjMzOkMwOjdBOjAxOjE3OjNEOjNBOkQ5OjUwOkYzOjNEOkUxOjdCOkVDOkE5OjgzOjExOjlDOjU3IiwicHR5cGUiOiJpbnN0YW5jZSIsImF1ZCI6Im9jaSIsIm9wYy10YWciOiJWMSxvY2lkMS5keW5hbWljZ3JvdXAub2MxLi5hYWFhYWFhYSwzZ215cHZ4eGsyangyem54aDI3cjZ3YTV6aGFmYmxudnl0YmlmbGp0ajdkNm5oc2dkNGdhLGg1ZXc3ZXFqM3FiZ2tpeXkzbW50aG54Z3RvN2hxYnlrd29nbzNiYjRndWZzZ21rd3VxZnEiLCJ0dHlwZSI6Ing1MDkiLCJvcGMtaW5zdGFuY2UiOiJvY2lkMS5pbnN0YW5jZS5vYzEuaWFkLmFudXdjbGp0NDZjbGRkeWM3N3Q3cGpzeHFxdXF3aHBuZG03YnJ1YXlmd2U2M2ZkcmRldW80Y2VvazRwYSIsImV4cCI6MTYyOTk3MDg2Niwib3BjLWNvbXBhcnRtZW50Ijoib2NpZDEudGVuYW5jeS5vYzEuLmFhYWFhYWFhazdxc2o2bHRmd2VrNWN4bDZ4cHR6bmFucjJrdDdmeHJiaG83ZGkzdmNoYWY2bTVhcHhlcSIsImlhdCI6MTYyOTk2OTY2NiwianRpIjoiMTRiYTRiYjYtNzg3OC00ODIwLTgyZjMtZTk0ZmE5M2JkMjc3IiwidGVuYW50Ijoib2NpZDEudGVuYW5jeS5vYzEuLmFhYWFhYWFhazdxc2o2bHRmd2VrNWN4bDZ4cHR6bmFucjJrdDdmeHJiaG83ZGkzdmNoYWY2bTVhcHhlcSIsImp3ayI6IntcImtpZFwiOlwiNkM6MzM6QzA6N0E6MDE6MTc6M0Q6M0E6RDk6NTA6RjM6M0Q6RTE6N0I6RUM6QTk6ODM6MTE6OUM6NTdcIixcIm5cIjpcInVjazZ3Mk5RREMwdXl0eFNBMlBWQkZtOGUxRUNabVBJaERvenAxVVdjblIyVEJTWUErQ2V4V2hUbksyKyswNGNvbWVtVTdBT1Urd1RqTFZNRlZLR3lCWXpVdWdQV0Vhbmx1UVRmN241djdLem5JR2c2YkJGU3lHdlM5SUJUOWVWVUlQWXRoaFBPeTZnMFhWUXdERnJCakV0Z0IzNzVUSWhrU21RY2RhbllnOTJpVU1vYVg4ZHhzNUtuUmpUbExrVExaTUh5ZlduWldCc0hLWXNIZDJ3T01qUDJ5ZDJWR2ZvNGJGTWdFeCttTnVxVkxlQXd1UGZ0dm56MU5JQWp2cUZ6c253Zlhtemo0cTNRaStHSGFub0JtSG1yTldHbnlMQ0xVb2p1ZFZ3clk2bWtONS9sUGFXaSttNThueXRnNVc4WWFhMjQvckJsTkdwZHRIU3h5RDRBd1wiLFwiZVwiOlwiQVFBQlwiLFwia3R5XCI6XCJSU0FcIixcImFsZ1wiOlwiUlMyNTZcIixcInVzZVwiOlwic2lnXCJ9Iiwib3BjLXRlbmFudCI6Im9jaWQxLnRlbmFuY3kub2MxLi5hYWFhYWFhYWs3cXNqNmx0ZndlazVjeGw2eHB0em5hbnIya3Q3ZnhyYmhvN2RpM3ZjaGFmNm01YXB4ZXEifQ" + + "." + + "KG8tVWD6Nl8SiuG9zDXnZjGZVzbaGoyBABZwBQZLyaxu0lB5xXdm_RYtvyR0yygULwLvuIPzbkwTSJcJE5HjReQUIdqTP_P4E4fGbVdwrU6dYNsTOMf2jZZVQtUP7iWsJKrvOzs1ZwI1nmoZ5uRUSNq6sUbznHWk8qvdPycEuR6n5aElrXp0cHgfg9IxAU1CnnVjklIJHZslCIL-7GV2jWjn5ae456pAYFF0ihpEHpaMTnBdNkYjHq3rDnOXG3194E5_rQzwdLYhliID5uYhRr8bvfm2fvH9UMSA8ZLkSPg3Xc_z_2xrlawguLjw5Bw5-UojFYFfcJIiyXE6Qqtlqw"; + + private final String passPhrase = "passphrase"; + private final RpConfig rpConfig = new RpConfig(); + + private final static AtomicInteger counter = new AtomicInteger(0); + + public ResourcePrincipalAuthenticationDetailsProviderTest() throws FileNotFoundException {} + + @Test + public void test_ResourcePrincipalAuthenticationDetailsProviderFromSupplier_Init() { + counter.set(0); + ResourcePrincipalAuthenticationDetailsProvider + .ResourcePrincipalAuthenticationDetailsProviderBuilder.build_2_2( + privateKey, passPhrase, this::rpSupplier, rpConfig, "us-ashburn-1", ""); + Assert.assertEquals(1, counter.get()); + } + + @Test + public void test_ResourcePrincipalAuthenticationDetailsProviderFromSupplier_Refresh() { + counter.set(0); + ResourcePrincipalAuthenticationDetailsProvider authenticationDetailsProvider = + ResourcePrincipalAuthenticationDetailsProvider + .ResourcePrincipalAuthenticationDetailsProviderBuilder.build_2_2( + privateKey, passPhrase, this::rpSupplier, rpConfig, "us-ashburn-1", ""); + Assert.assertEquals(1, counter.get()); + + authenticationDetailsProvider.refresh(); + Assert.assertEquals(2, counter.get()); + } + + private String rpSupplier(RpConfig rpConfig) { + counter.incrementAndGet(); + return fakeToken; + } + + private static class RpConfig {} +} diff --git a/bmc-common/src/test/java/com/oracle/bmc/auth/SessionTokenAuthTest.java b/bmc-common/src/test/java/com/oracle/bmc/auth/SessionTokenAuthTest.java index 3e566b38aef..14224a6d0e3 100644 --- a/bmc-common/src/test/java/com/oracle/bmc/auth/SessionTokenAuthTest.java +++ b/bmc-common/src/test/java/com/oracle/bmc/auth/SessionTokenAuthTest.java @@ -12,8 +12,12 @@ import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; public class SessionTokenAuthTest { final String CONFIG_FILE_PATH = "src/test/resources/unit_test_session_token_config"; @@ -23,6 +27,7 @@ public class SessionTokenAuthTest { final String TOKEN_EXISTS_PROFILE = "TOKENEXISTS"; final String SESSION_TOKEN = "thisisasessiontoken"; final String NEW_SESSION_TOKEN = "this is a new session token!"; + final String AUTHORIZATION_HEADER_KEY = "authorization"; @Test(expected = NullPointerException.class) public void testSessionTokenNoPathProvided() throws IOException { @@ -65,6 +70,44 @@ public void testSessionTokenRefresh() throws IOException { assertEquals(provider.getKeyId(), "ST$" + NEW_SESSION_TOKEN); } + @Test + public void testSessionTokenRefreshPropogatesToSigner() throws IOException { + com.oracle.bmc.Service testService = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("SessionAuthTestService") + .serviceEndpointTemplate("https://test-service.test") + .build(); + final ConfigFileReader.ConfigFile configFile = + ConfigFileReader.parse(CONFIG_FILE_PATH, TOKEN_EXISTS_PROFILE); + writeToSessionTokenFile(SESSION_TOKEN); + final SessionTokenAuthenticationDetailsProvider provider = + new SessionTokenAuthenticationDetailsProvider(configFile); + final com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory signerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + final com.oracle.bmc.http.signing.RequestSigner requestSignerImpl = + signerFactory.createRequestSigner(testService, provider); + final Map headers = + requestSignerImpl.signRequest( + java.net.URI.create(testService.getServiceEndpointTemplate()), + javax.ws.rs.HttpMethod.GET, + new HashMap>(), + null); + // Check if the authorization header contains the old token + assertTrue(headers.get(AUTHORIZATION_HEADER_KEY).contains(SESSION_TOKEN)); + + writeToSessionTokenFile(NEW_SESSION_TOKEN); + assertEquals(provider.refresh(), NEW_SESSION_TOKEN); + final Map newHeaders = + requestSignerImpl.signRequest( + java.net.URI.create(testService.getServiceEndpointTemplate()), + javax.ws.rs.HttpMethod.GET, + new HashMap>(), + null); + // Check if the authorization header contains the new token + assertTrue(newHeaders.get(AUTHORIZATION_HEADER_KEY).contains(NEW_SESSION_TOKEN)); + } + private void writeToSessionTokenFile(String token) throws IOException { // In case the file does not exist. File tokenFile = new File(TOKEN_FILE_PATH); diff --git a/bmc-common/src/test/java/com/oracle/bmc/auth/internal/X509FederationClientTest.java b/bmc-common/src/test/java/com/oracle/bmc/auth/internal/X509FederationClientTest.java index b8da49e3ee9..977d451b876 100644 --- a/bmc-common/src/test/java/com/oracle/bmc/auth/internal/X509FederationClientTest.java +++ b/bmc-common/src/test/java/com/oracle/bmc/auth/internal/X509FederationClientTest.java @@ -99,15 +99,14 @@ public void makeCall_shouldReuseWrappedInvocationBuilderReference_whenBmcExcepti .thenReturn(expectedWIb); final Response expectedResponse = mock(Response.class); - // Stub exceptions thrown by the client 3 consecutive times then a successful + // Stub exceptions thrown by the client 2 consecutive times then a successful when( mockFederationClient.post( Mockito.any(), Mockito.any(), Mockito.any())) - .thenThrow(new BmcException(409, "ServiceCode", "Exception 1", "RequestId")) - .thenThrow(new BmcException(409, "ServiceCode", "Exception 2", "RequestId")) - .thenThrow(new BmcException(409, "ServiceCode", "Exception 3", "RequestId")) + .thenThrow(new BmcException(501, "ServiceCode", "Exception 1", "RequestId")) + .thenThrow(new BmcException(502, "ServiceCode", "Exception 2", "RequestId")) .thenReturn(expectedResponse); // Method under test. @@ -116,7 +115,7 @@ public void makeCall_shouldReuseWrappedInvocationBuilderReference_whenBmcExcepti ib, requestURI, mock(X509FederationClient.X509FederationRequest.class)); assertEquals("Response should be equal", expectedResponse, actualResponse); - verify(mockFederationClient, times(4)) + verify(mockFederationClient, times(3)) .post( wrappedIbCaptor.capture(), isA(X509FederationClient.X509FederationRequest.class), @@ -127,14 +126,41 @@ public void makeCall_shouldReuseWrappedInvocationBuilderReference_whenBmcExcepti "Captured list of WrappedInvocationBuilder should not be empty", wrappedIbsFromInvocation.isEmpty()); assertEquals( - "Captured list of WrappedInvocationBuilder size should be 4", - 4 /* expected number of captures */, + "Captured list of WrappedInvocationBuilder size should be 3", + 3 /* expected number of captures */, wrappedIbsFromInvocation.size()); for (WrappedInvocationBuilder actualWib : wrappedIbsFromInvocation) { assertEquals("Captured WIB should be the same", expectedWIb, actualWib); } } + @Test() + public void makeCall_should_fail_when_4xx_BmcExceptionIsThrown() throws Exception { + // Set up WrappedInvocationBuilder used to verify + URI requestURI = PowerMockito.mock(URI.class); + final WrappedInvocationBuilder expectedWIb = mock(WrappedInvocationBuilder.class); + final Invocation.Builder ib = mock(Invocation.Builder.class); + whenNew(WrappedInvocationBuilder.class) + .withArguments(ib, requestURI) + .thenReturn(expectedWIb); + + // Stub exceptions thrown by the client is 401 + when( + mockFederationClient.post( + Mockito.any(), + Mockito.any(), + Mockito.any())) + .thenThrow(new BmcException(401, "ServiceCode", "Exception 1", "RequestId")); + + // Method under test + try { + clientUnderTest.makeCall( + ib, requestURI, mock(X509FederationClient.X509FederationRequest.class)); + } catch (BmcException e) { + assertEquals(401, e.getStatusCode()); + } + } + @Test public void jacksonCanDeserializeSecurityToken() throws IOException { final String strToken = "{\"token\" : \"abcdef\"}"; diff --git a/bmc-common/src/test/java/com/oracle/bmc/http/internal/IdleConnectionMonitorTest.java b/bmc-common/src/test/java/com/oracle/bmc/http/internal/IdleConnectionMonitorTest.java index 5c171062f02..71b5da36a76 100644 --- a/bmc-common/src/test/java/com/oracle/bmc/http/internal/IdleConnectionMonitorTest.java +++ b/bmc-common/src/test/java/com/oracle/bmc/http/internal/IdleConnectionMonitorTest.java @@ -103,7 +103,8 @@ public void testIdleConnectionMonitorOnAutoShutdown() { assertTrue(IdleConnectionMonitor.removeConnectionManager(connectionManager2)); assertEquals(0, IdleConnectionMonitor.idleConnectionMonitorThreadSize()); - // IdleConnectionMonitor is already shutdown after the removal of the last connectionManager2 + // IdleConnectionMonitor is already shutdown after the removal of the last + // connectionManager2 assertFalse(IdleConnectionMonitor.shutdown()); } @@ -116,22 +117,10 @@ public void testWeakReferenceConnectionManagerRemoval() throws InterruptedExcept assertTrue(IdleConnectionMonitor.registerConnectionManager(connectionManager1, 10, 10)); assertEquals(1, IdleConnectionMonitor.idleConnectionMonitorThreadSize()); - int actualIdleConnectionMonitorThreadSize = 1; - // connectionManager1 is automatically removed from the IdleConnectionMonitor thread connectionManager1 = null; - for (int attempt = 0; attempt < 5; ++attempt) { - System.gc(); - Thread.sleep(1000); - IdleConnectionMonitor.cleanStaleReferences(); - actualIdleConnectionMonitorThreadSize = - IdleConnectionMonitor.idleConnectionMonitorThreadSize(); - if (actualIdleConnectionMonitorThreadSize == 0) { - break; - } - } - - assertEquals(0, actualIdleConnectionMonitorThreadSize); + garbageCollect(5, 0); + assertEquals(0, IdleConnectionMonitor.getInstance().idleConnectionMonitorThreadSize()); // Register connectionManager to IdleConnectionMonitor assertTrue(IdleConnectionMonitor.registerConnectionManager(connectionManager2, 10, 10)); @@ -151,9 +140,7 @@ public void testWeakReferenceConnectionManagerRemovalLong() throws InterruptedEx connectionManager1 = null; } - System.gc(); - Thread.sleep(1000); - IdleConnectionMonitor.cleanStaleReferences(); + garbageCollect(3, 0); assertEquals(0, IdleConnectionMonitor.idleConnectionMonitorThreadSize()); } @@ -165,8 +152,8 @@ public void testDifferentWaitTimeInSeconds() throws InterruptedException { IdleConnectionMonitor.registerConnectionManager( connectionManager1, waitTimeInSeconds1, 10)); - IdleConnectionMonitor.instance.closeIdleConnections(); - int waitTimeInSeconds = IdleConnectionMonitor.instance.getWaitTimeInSeconds(); + IdleConnectionMonitor.getInstance().closeIdleConnections(); + int waitTimeInSeconds = IdleConnectionMonitor.getInstance().getWaitTimeInSeconds(); assertEquals(waitTimeInSeconds1, waitTimeInSeconds); HttpClientConnectionManager connectionManager2 = new BasicHttpClientConnectionManager(); @@ -175,8 +162,8 @@ public void testDifferentWaitTimeInSeconds() throws InterruptedException { IdleConnectionMonitor.registerConnectionManager( connectionManager2, waitTimeInSeconds2, 10)); - IdleConnectionMonitor.instance.closeIdleConnections(); - waitTimeInSeconds = IdleConnectionMonitor.instance.getWaitTimeInSeconds(); + IdleConnectionMonitor.getInstance().closeIdleConnections(); + waitTimeInSeconds = IdleConnectionMonitor.getInstance().getWaitTimeInSeconds(); assertEquals(waitTimeInSeconds1, waitTimeInSeconds); HttpClientConnectionManager connectionManager3 = new BasicHttpClientConnectionManager(); @@ -185,30 +172,42 @@ public void testDifferentWaitTimeInSeconds() throws InterruptedException { IdleConnectionMonitor.registerConnectionManager( connectionManager3, waitTimeInSeconds3, 10)); - IdleConnectionMonitor.instance.closeIdleConnections(); - waitTimeInSeconds = IdleConnectionMonitor.instance.getWaitTimeInSeconds(); + IdleConnectionMonitor.getInstance().closeIdleConnections(); + waitTimeInSeconds = IdleConnectionMonitor.getInstance().getWaitTimeInSeconds(); assertEquals(waitTimeInSeconds3, waitTimeInSeconds); + assertEquals(3, IdleConnectionMonitor.getInstance().idleConnectionMonitorThreadSize()); + connectionManager1 = null; connectionManager3 = null; - System.gc(); - Thread.sleep(1000); - IdleConnectionMonitor.cleanStaleReferences(); + garbageCollect(3, 1); + assertEquals(1, IdleConnectionMonitor.getInstance().idleConnectionMonitorThreadSize()); - IdleConnectionMonitor.instance.closeIdleConnections(); - waitTimeInSeconds = IdleConnectionMonitor.instance.getWaitTimeInSeconds(); + IdleConnectionMonitor.getInstance().closeIdleConnections(); + waitTimeInSeconds = IdleConnectionMonitor.getInstance().getWaitTimeInSeconds(); assertEquals(waitTimeInSeconds2, waitTimeInSeconds); connectionManager2 = null; - System.gc(); - Thread.sleep(1000); - IdleConnectionMonitor.cleanStaleReferences(); + garbageCollect(3, 0); + assertEquals(0, IdleConnectionMonitor.getInstance().idleConnectionMonitorThreadSize()); - IdleConnectionMonitor.instance.closeIdleConnections(); - waitTimeInSeconds = IdleConnectionMonitor.instance.getWaitTimeInSeconds(); + IdleConnectionMonitor.getInstance().closeIdleConnections(); + waitTimeInSeconds = IdleConnectionMonitor.getInstance().getWaitTimeInSeconds(); assertEquals( DEFAULT_IDLE_CONNECTION_MONITOR_THREAD_WAIT_TIME_IN_SECONDS, waitTimeInSeconds); } + + private static void garbageCollect(int maxAttempts, int expectedConnectionMonitorThreadSize) + throws InterruptedException { + int numAttempts = maxAttempts; + do { + System.gc(); + Thread.sleep(1000); + IdleConnectionMonitor.cleanStaleReferences(); + } while (IdleConnectionMonitor.getInstance().idleConnectionMonitorThreadSize() + > expectedConnectionMonitorThreadSize + && numAttempts-- > 0); + } } diff --git a/bmc-common/src/test/java/com/oracle/bmc/internal/EndpointBuilderTest.java b/bmc-common/src/test/java/com/oracle/bmc/internal/EndpointBuilderTest.java index 002daf49d9d..7981a7ddbe8 100644 --- a/bmc-common/src/test/java/com/oracle/bmc/internal/EndpointBuilderTest.java +++ b/bmc-common/src/test/java/com/oracle/bmc/internal/EndpointBuilderTest.java @@ -125,7 +125,7 @@ public void createEndpoint_useRealmSpecificEndpointTemplateIfPresentAndIfEnvVarI Service testService = Services.serviceBuilder() .serviceEndpointPrefix("foobar") - .serviceName("EndpointBuilderTest7") + .serviceName("EndpointBuilderTest6") .serviceEndpointTemplate( "http://{serviceEndpointPrefix}.{region}.{secondLevelDomain}") .build(); @@ -142,7 +142,7 @@ public void createEndpoint_useCustomTemplateIfEnvVarIsFalse() throws Exception { Service testService = Services.serviceBuilder() .serviceEndpointPrefix("foobar") - .serviceName("EndpointBuilderTest6") + .serviceName("EndpointBuilderTest7") .serviceEndpointTemplate( "http://{serviceEndpointPrefix}.{region}.{secondLevelDomain}") .addServiceEndpointTemplateForRealm( @@ -153,4 +153,48 @@ public void createEndpoint_useCustomTemplateIfEnvVarIsFalse() throws Exception { "http://foobar.us-phoenix-1.oraclecloud.com", EndpointBuilder.createEndpoint(testService, Region.US_PHOENIX_1)); } + + @Test + public void testEndpointWithPopulatedServiceParamsWithNoRequiredParams() { + Service testService = + Services.serviceBuilder() + .serviceEndpointPrefix("foobar") + .serviceName("EndpointBuilderTest8") + .serviceEndpointTemplate( + "http://{serviceEndpointPrefix}.{region}.{secondLevelDomain}") + .addServiceEndpointTemplateForRealm( + "oc1", + "http://testservice.{serviceParameter+Dot}us-phoenix-1.oraclecloud.com") + .build(); + Map requiredParametersMap = new HashMap<>(); + + assertEquals( + "http://testservice.us-phoenix-1.oraclecloud.com", + EndpointBuilder.getEndpointWithPopulatedServiceParams( + testService.getServiceEndpointTemplateForRealmMap().get("oc1"), + requiredParametersMap)); + } + + @Test + public void testEndpointWithPopulatedServiceParamsWithRequiredParams() { + Service testService = + Services.serviceBuilder() + .serviceEndpointPrefix("foobar") + .serviceName("EndpointBuilderTest9") + .serviceEndpointTemplate( + "http://{serviceEndpointPrefix}.{region}.{secondLevelDomain}") + .addServiceEndpointTemplateForRealm( + "oc1", + "http://testservice.{serviceParameter1}{serviceParameter2+Dot}us-phoenix-1.{serviceParameter3}oraclecloud.com") + .build(); + Map requiredParametersMap = new HashMap<>(); + requiredParametersMap.put("serviceParameter1", "sp1"); + requiredParametersMap.put("serviceParameter2", "sp2"); + + assertEquals( + "http://testservice.sp1sp2.us-phoenix-1.oraclecloud.com", + EndpointBuilder.getEndpointWithPopulatedServiceParams( + testService.getServiceEndpointTemplateForRealmMap().get("oc1"), + requiredParametersMap)); + } } diff --git a/bmc-common/src/test/resources/pkcs1_private_key.pem b/bmc-common/src/test/resources/pkcs1_private_key.pem new file mode 100644 index 00000000000..e250770abca --- /dev/null +++ b/bmc-common/src/test/resources/pkcs1_private_key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAyGbtU5pXRY/35yZHR270qzWKIOx1N0SXIs2wDWASFtEejm7s +/XayXm71T+KZab6Qk+zmbP3+iBAwwg2D4wZInqso6lZqvRPrAR3lXUgeOpnZVKdz +s9FAGpMBlNKs3EVxS2rqD4X8V4P/YQxa8nnBSmTYHDgulYYHsDD9yFOzERa/NM4V +pp5Y0ArFn2GTG1lm+S0L1YUTqea3LHlyCKXXYraz7eUMn4pOBypO0M7vKx59kQBg +0KaeMXsd4nWes+sMoSHlYamImbwH0YwK0eNRLpKj/1pFNHQGCUjescQjTU5TJnan +f9/IOa/gLTXL17KZGSU64IW1IN9J53+aTfz2eQIDAQABAoIBACwRcjPVt0Y9O/Lx +GHCNZjE2A0ttI/OE2kVVfNbcHu40iycgHm44SU350WkBN+IofSuCR0OFcRDjmo05 +opxsN9Doa4Vofm1YsW9b7yGdp8QUK9XxQsCyjYmqdQkQcOG5RYojlxfVy2FFTgW9 +zUwP2SDuXxWJhzjrMcqdY1lHipOBjHQnicfFsDkbByuYf3BS0LKtDcgVkrdsAhJY +xbkfnvSj6eXsEW7aPl/z9qSFCzhMhAjBEaZ1tSS4ovJQt3rRrbtvAr+LXZzW+b/N +EfbysA216dTtAYNbAnISfbMSqP8IjzCudVDw/EXfEN9Te3NYh63p06g5/eVGYBST +8UxI5nkCgYEA+U9p3Eq/s/QXrhkktei3/sCMYFTt9g+4VqfRCBOgcU9ai5GZiU7V +QnQ5JZsyG7dX7/IPbUlEFrtXhr9NF8WQkDbPHSSkkzNp7a0puvK3MtIREQ+0UQGi +DVoyPGy680c7l/KGhGv6uyjQFUAG0Wd/k7PXLbt25Zyf4/NIBBVS2jUCgYEAzceM +fsqOIW4WEEHBkPx7iOXBiIg/vXT4qPg2ehsnRcJOmnWAijM3bQoRSyoyOPA9q4DZ +DVR302t8Gnbkmk03lGKi5IstWadcS/2giHvoHFRIPcDxGFB54qNLZVJX41EtOMBt +ehpz+RxuqTIC2T29/nyXxN0fHYwcsxxoJ5gz07UCgYEAmYuibC2RUdiUuQH9TRfu +MjUOf8nu4OwfoScsI2hLGV5BKtJamGl4CLyh8Zpayx0pSLtxauKDz+hD6NZrOafQ ++DD5cD6AKbSxmdNbbytLTz53imV8raNu1gBmDjb9ERYfCt8wn+ANBTYGqf/L8y5m +MWbCsQTTHmlPREoyYWlspL0CgYAnt3EFc8DU8PNvNdHPUvvg4z9kQ6/RuEbaDfYt +wRnmW+dh5nXltpbnA79su3swBCZS+K5r5TavZppwXSwoH+kvSY5ZAAfDuwqUXCJk +1U1qUlYTHS8rWzT7Kjs+FhOCe0N4JaO7omlp1jQBkfZ8yW7nNFLymx8LS+SqKTxt +D/JI1QKBgDgmWkgB1d/wcclscsnG2yA3sXqeH7A/mVJHj+ROiv1r1rtUEMia+xuL +IHE7ajXYsZVNdwq1O4pxARBOY6dhl02d195+dGJITJYULso5QOqCp5jSphAjVWhB ++Y/sKWdICYP4hClLdQoNMyuCnz2Mn/BmuUVeTij9UR4azWtmprlG +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/bmc-common/src/test/resources/regions.json b/bmc-common/src/test/resources/regions.json index 29bd35b0fc9..85328e4ba37 100644 --- a/bmc-common/src/test/resources/regions.json +++ b/bmc-common/src/test/resources/regions.json @@ -370,5 +370,71 @@ "realmKey": "oc15", "regionIdentifier": "ap-dcc-gazipur-1", "realmDomainComponent": "oraclecloud15.com" + }, + { + "regionKey": "xsp", + "realmKey": "oc1", + "regionIdentifier": "ap-singapore-2", + "realmDomainComponent": "oraclecloud.com" + }, + { + "regionKey": "rkt", + "realmKey": "oc29", + "regionIdentifier": "me-abudhabi-2", + "realmDomainComponent": "oraclecloud29.com" + }, + { + "regionKey": "ruh", + "realmKey": "oc1", + "regionIdentifier": "me-riyadh-1", + "realmDomainComponent": "oraclecloud.com" + }, + { + "regionKey": "shj", + "realmKey": "oc29", + "regionIdentifier": "me-abudhabi-4", + "realmDomainComponent": "oraclecloud29.com" + }, + { + "regionKey": "avf", + "realmKey": "oc24", + "regionIdentifier": "eu-crissier-1", + "realmDomainComponent": "oraclecloud24.com" + }, + { + "regionKey": "ebb", + "realmKey": "oc23", + "regionIdentifier": "us-somerset-1", + "realmDomainComponent": "oraclecloud23.com" + }, + { + "regionKey": "ebl", + "realmKey": "oc23", + "regionIdentifier": "us-thames-1", + "realmDomainComponent": "oraclecloud23.com" + }, + { + "regionKey": "dtz", + "realmKey": "oc35", + "regionIdentifier": "ap-seoul-2", + "realmDomainComponent": "oraclecloud35.com" + }, + { + "regionKey": "dln", + "realmKey": "oc35", + "regionIdentifier": "ap-suwon-1", + "realmDomainComponent": "oraclecloud35.com" + }, + { + "regionKey": "bno", + "realmKey": "oc35", + "regionIdentifier": "ap-chuncheon-2", + "realmDomainComponent": "oraclecloud35.com" + }, + { + "regionKey": "rba", + "realmKey": "oc26", + "regionIdentifier": "me-alain-1", + "realmDomainComponent": "oraclecloud26.com" } ] \ No newline at end of file diff --git a/bmc-common/src/test/resources/unit_test_session_token_config b/bmc-common/src/test/resources/unit_test_session_token_config index e909c3a657f..5ccc4622a54 100644 --- a/bmc-common/src/test/resources/unit_test_session_token_config +++ b/bmc-common/src/test/resources/unit_test_session_token_config @@ -15,5 +15,5 @@ security_token_file=src/test/resources/token fingerprint=fingerprint tenancy=tenancy user=user -key_file=key_file +key_file=src/test/resources/pkcs1_private_key.pem security_token_file=src/test/resources/unit_test_token \ No newline at end of file diff --git a/bmc-computecloudatcustomer/pom.xml b/bmc-computecloudatcustomer/pom.xml index b7f955a3791..54131d88146 100644 --- a/bmc-computecloudatcustomer/pom.xml +++ b/bmc-computecloudatcustomer/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-computecloudatcustomer @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-computeinstanceagent/pom.xml b/bmc-computeinstanceagent/pom.xml index ecfd3b5a371..2572d427a57 100644 --- a/bmc-computeinstanceagent/pom.xml +++ b/bmc-computeinstanceagent/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-computeinstanceagent @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-containerengine/pom.xml b/bmc-containerengine/pom.xml index 1317dd5393f..2dcc597238f 100644 --- a/bmc-containerengine/pom.xml +++ b/bmc-containerengine/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/ContainerEngine.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/ContainerEngine.java index 5c0ea974c13..86cdfb86437 100644 --- a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/ContainerEngine.java +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/ContainerEngine.java @@ -8,9 +8,9 @@ import com.oracle.bmc.containerengine.responses.*; /** - * API for the Container Engine for Kubernetes service. Use this API to build, deploy, + * API for the Kubernetes Engine service (also known as the Container Engine for Kubernetes service). Use this API to build, deploy, * and manage cloud-native applications. For more information, see - * [Overview of Container Engine for Kubernetes](https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). + * [Overview of Kubernetes Engine](https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). * * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. */ diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/ContainerEngineAsync.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/ContainerEngineAsync.java index 1f660146d47..c881696bb0b 100644 --- a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/ContainerEngineAsync.java +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/ContainerEngineAsync.java @@ -8,9 +8,9 @@ import com.oracle.bmc.containerengine.responses.*; /** - * API for the Container Engine for Kubernetes service. Use this API to build, deploy, + * API for the Kubernetes Engine service (also known as the Container Engine for Kubernetes service). Use this API to build, deploy, * and manage cloud-native applications. For more information, see - * [Overview of Container Engine for Kubernetes](https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). + * [Overview of Kubernetes Engine](https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). * */ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180222") diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/ContainerEngineAsyncClient.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/ContainerEngineAsyncClient.java index 079a0166ec2..14dc0491537 100644 --- a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/ContainerEngineAsyncClient.java +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/ContainerEngineAsyncClient.java @@ -480,7 +480,7 @@ public java.util.concurrent.Future clusterMig "ContainerEngine", "ClusterMigrateToNativeVcn", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/ClusterMigrateToNativeVcn"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, ClusterMigrateToNativeVcnResponse> transformer = @@ -537,7 +537,7 @@ protected void beforeRetryAction() {} "ContainerEngine", "CompleteCredentialRotation", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/CompleteCredentialRotation"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, CompleteCredentialRotationResponse> transformer = @@ -583,10 +583,7 @@ public java.util.concurrent.Future createCluster( com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "CreateCluster", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/CreateCluster"); + "ContainerEngine", "CreateCluster", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = CreateClusterConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -633,10 +630,7 @@ public java.util.concurrent.Future createKubeconfig( CreateKubeconfigConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "CreateKubeconfig", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/CreateKubeconfig"); + "ContainerEngine", "CreateKubeconfig", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = CreateKubeconfigConverter.fromResponse( @@ -685,10 +679,7 @@ public java.util.concurrent.Future createNodePool( com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "CreateNodePool", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/CreateNodePool"); + "ContainerEngine", "CreateNodePool", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = CreateNodePoolConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -739,7 +730,7 @@ public java.util.concurrent.Future createVirtualN "ContainerEngine", "CreateVirtualNodePool", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/CreateVirtualNodePool"); + ""); final java.util.function.Function transformer = CreateVirtualNodePoolConverter.fromResponse( @@ -792,7 +783,7 @@ public java.util.concurrent.Future createWorkload "ContainerEngine", "CreateWorkloadMapping", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkloadMapping/CreateWorkloadMapping"); + ""); final java.util.function.Function transformer = CreateWorkloadMappingConverter.fromResponse( @@ -840,10 +831,7 @@ public java.util.concurrent.Future deleteCluster( DeleteClusterConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "DeleteCluster", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/DeleteCluster"); + "ContainerEngine", "DeleteCluster", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = DeleteClusterConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -883,10 +871,7 @@ public java.util.concurrent.Future deleteNode( DeleteNodeConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "DeleteNode", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/DeleteNode"); + "ContainerEngine", "DeleteNode", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = DeleteNodeConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -928,10 +913,7 @@ public java.util.concurrent.Future deleteNodePool( DeleteNodePoolConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "DeleteNodePool", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/DeleteNodePool"); + "ContainerEngine", "DeleteNodePool", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = DeleteNodePoolConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -976,7 +958,7 @@ public java.util.concurrent.Future deleteVirtualN "ContainerEngine", "DeleteVirtualNodePool", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/DeleteVirtualNodePool"); + ""); final java.util.function.Function transformer = DeleteVirtualNodePoolConverter.fromResponse( @@ -1020,10 +1002,7 @@ public java.util.concurrent.Future deleteWorkRequest( DeleteWorkRequestConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "DeleteWorkRequest", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkRequest/DeleteWorkRequest"); + "ContainerEngine", "DeleteWorkRequest", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = DeleteWorkRequestConverter.fromResponse( @@ -1069,7 +1048,7 @@ public java.util.concurrent.Future deleteWorkload "ContainerEngine", "DeleteWorkloadMapping", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkloadMapping/DeleteWorkloadMapping"); + ""); final java.util.function.Function transformer = DeleteWorkloadMappingConverter.fromResponse( @@ -1112,10 +1091,7 @@ public java.util.concurrent.Future disableAddon( DisableAddonConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "DisableAddon", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/DisableAddon"); + "ContainerEngine", "DisableAddon", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = DisableAddonConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1155,10 +1131,7 @@ public java.util.concurrent.Future getAddon( GetAddonConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "GetAddon", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/GetAddon"); + "ContainerEngine", "GetAddon", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = GetAddonConverter.fromResponse(java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler handlerToUse = @@ -1196,10 +1169,7 @@ public java.util.concurrent.Future getCluster( GetClusterConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "GetCluster", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/GetCluster"); + "ContainerEngine", "GetCluster", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = GetClusterConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1246,7 +1216,7 @@ protected void beforeRetryAction() {} "ContainerEngine", "GetClusterMigrateToNativeVcnStatus", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/ClusterMigrateToNativeVcnStatus/GetClusterMigrateToNativeVcnStatus"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, GetClusterMigrateToNativeVcnStatusResponse> transformer = @@ -1294,10 +1264,7 @@ public java.util.concurrent.Future getClusterOptions( GetClusterOptionsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "GetClusterOptions", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/ClusterOptions/GetClusterOptions"); + "ContainerEngine", "GetClusterOptions", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = GetClusterOptionsConverter.fromResponse( @@ -1345,7 +1312,7 @@ protected void beforeRetryAction() {} "ContainerEngine", "GetCredentialRotationStatus", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/CredentialRotationStatus/GetCredentialRotationStatus"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, GetCredentialRotationStatusResponse> transformer = @@ -1390,10 +1357,7 @@ public java.util.concurrent.Future getNodePool( GetNodePoolConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "GetNodePool", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/GetNodePool"); + "ContainerEngine", "GetNodePool", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = GetNodePoolConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1435,10 +1399,7 @@ public java.util.concurrent.Future getNodePoolOption GetNodePoolOptionsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "GetNodePoolOptions", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePoolOptions/GetNodePoolOptions"); + "ContainerEngine", "GetNodePoolOptions", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = GetNodePoolOptionsConverter.fromResponse( @@ -1481,10 +1442,7 @@ public java.util.concurrent.Future getVirtualNode( GetVirtualNodeConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "GetVirtualNode", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/GetVirtualNode"); + "ContainerEngine", "GetVirtualNode", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = GetVirtualNodeConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1526,10 +1484,7 @@ public java.util.concurrent.Future getVirtualNodePoo GetVirtualNodePoolConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "GetVirtualNodePool", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/GetVirtualNodePool"); + "ContainerEngine", "GetVirtualNodePool", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = GetVirtualNodePoolConverter.fromResponse( @@ -1572,10 +1527,7 @@ public java.util.concurrent.Future getWorkRequest( GetWorkRequestConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "GetWorkRequest", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkRequest/GetWorkRequest"); + "ContainerEngine", "GetWorkRequest", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1617,10 +1569,7 @@ public java.util.concurrent.Future getWorkloadMappin GetWorkloadMappingConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "GetWorkloadMapping", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkloadMapping/GetWorkloadMapping"); + "ContainerEngine", "GetWorkloadMapping", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = GetWorkloadMappingConverter.fromResponse( @@ -1663,10 +1612,7 @@ public java.util.concurrent.Future installAddon( com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "InstallAddon", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/InstallAddon"); + "ContainerEngine", "InstallAddon", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = InstallAddonConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1713,10 +1659,7 @@ public java.util.concurrent.Future listAddonOptions( ListAddonOptionsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "ListAddonOptions", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/AddonOptionSummary/ListAddonOptions"); + "ContainerEngine", "ListAddonOptions", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = ListAddonOptionsConverter.fromResponse( @@ -1757,10 +1700,7 @@ public java.util.concurrent.Future listAddons( ListAddonsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "ListAddons", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/ListAddons"); + "ContainerEngine", "ListAddons", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = ListAddonsConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1801,10 +1741,7 @@ public java.util.concurrent.Future listClusters( ListClustersConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "ListClusters", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/ClusterSummary/ListClusters"); + "ContainerEngine", "ListClusters", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = ListClustersConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1845,10 +1782,7 @@ public java.util.concurrent.Future listNodePools( ListNodePoolsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "ListNodePools", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePoolSummary/ListNodePools"); + "ContainerEngine", "ListNodePools", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = ListNodePoolsConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1889,10 +1823,7 @@ public java.util.concurrent.Future listPodShapes( ListPodShapesConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "ListPodShapes", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/PodShapeSummary/ListPodShapes"); + "ContainerEngine", "ListPodShapes", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = ListPodShapesConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1937,7 +1868,7 @@ public java.util.concurrent.Future listVirtualNode "ContainerEngine", "ListVirtualNodePools", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePoolSummary/ListVirtualNodePools"); + ""); final java.util.function.Function transformer = ListVirtualNodePoolsConverter.fromResponse( @@ -1981,10 +1912,7 @@ public java.util.concurrent.Future listVirtualNodes( ListVirtualNodesConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "ListVirtualNodes", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/ListVirtualNodes"); + "ContainerEngine", "ListVirtualNodes", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = ListVirtualNodesConverter.fromResponse( @@ -2030,7 +1958,7 @@ public java.util.concurrent.Future listWorkReques "ContainerEngine", "ListWorkRequestErrors", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkRequestError/ListWorkRequestErrors"); + ""); final java.util.function.Function transformer = ListWorkRequestErrorsConverter.fromResponse( @@ -2077,7 +2005,7 @@ public java.util.concurrent.Future listWorkRequestL "ContainerEngine", "ListWorkRequestLogs", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkRequestLogEntry/ListWorkRequestLogs"); + ""); final java.util.function.Function transformer = ListWorkRequestLogsConverter.fromResponse( @@ -2121,10 +2049,7 @@ public java.util.concurrent.Future listWorkRequests( ListWorkRequestsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "ListWorkRequests", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkRequestSummary/ListWorkRequests"); + "ContainerEngine", "ListWorkRequests", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = ListWorkRequestsConverter.fromResponse( @@ -2170,7 +2095,7 @@ public java.util.concurrent.Future listWorkloadMap "ContainerEngine", "ListWorkloadMappings", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkloadMappingSummary/ListWorkloadMappings"); + ""); final java.util.function.Function transformer = ListWorkloadMappingsConverter.fromResponse( @@ -2218,7 +2143,7 @@ public java.util.concurrent.Future startCredent "ContainerEngine", "StartCredentialRotation", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/StartCredentialRotation"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, StartCredentialRotationResponse> transformer = @@ -2267,10 +2192,7 @@ public java.util.concurrent.Future updateAddon( UpdateAddonConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "UpdateAddon", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/UpdateAddon"); + "ContainerEngine", "UpdateAddon", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = UpdateAddonConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -2316,10 +2238,7 @@ public java.util.concurrent.Future updateCluster( UpdateClusterConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "UpdateCluster", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/UpdateCluster"); + "ContainerEngine", "UpdateCluster", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = UpdateClusterConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -2371,7 +2290,7 @@ protected void beforeRetryAction() {} "ContainerEngine", "UpdateClusterEndpointConfig", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/UpdateClusterEndpointConfig"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, UpdateClusterEndpointConfigResponse> transformer = @@ -2422,10 +2341,7 @@ public java.util.concurrent.Future updateNodePool( UpdateNodePoolConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "UpdateNodePool", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/UpdateNodePool"); + "ContainerEngine", "UpdateNodePool", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = UpdateNodePoolConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -2475,7 +2391,7 @@ public java.util.concurrent.Future updateVirtualN "ContainerEngine", "UpdateVirtualNodePool", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/UpdateVirtualNodePool"); + ""); final java.util.function.Function transformer = UpdateVirtualNodePoolConverter.fromResponse( @@ -2527,7 +2443,7 @@ public java.util.concurrent.Future updateWorkload "ContainerEngine", "UpdateWorkloadMapping", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkloadMapping/UpdateWorkloadMapping"); + ""); final java.util.function.Function transformer = UpdateWorkloadMappingConverter.fromResponse( diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/ContainerEngineClient.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/ContainerEngineClient.java index 8d6b57e05fc..70308ae9c59 100644 --- a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/ContainerEngineClient.java +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/ContainerEngineClient.java @@ -571,7 +571,7 @@ public ClusterMigrateToNativeVcnResponse clusterMigrateToNativeVcn( "ContainerEngine", "ClusterMigrateToNativeVcn", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/ClusterMigrateToNativeVcn"); + ""); java.util.function.Function transformer = ClusterMigrateToNativeVcnConverter.fromResponse( @@ -615,7 +615,7 @@ public CompleteCredentialRotationResponse completeCredentialRotation( "ContainerEngine", "CompleteCredentialRotation", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/CompleteCredentialRotation"); + ""); java.util.function.Function transformer = CompleteCredentialRotationConverter.fromResponse( @@ -651,10 +651,7 @@ public CreateClusterResponse createCluster(CreateClusterRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "CreateCluster", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/CreateCluster"); + "ContainerEngine", "CreateCluster", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = CreateClusterConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -690,10 +687,7 @@ public CreateKubeconfigResponse createKubeconfig(CreateKubeconfigRequest request com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "CreateKubeconfig", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/CreateKubeconfig"); + "ContainerEngine", "CreateKubeconfig", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = CreateKubeconfigConverter.fromResponse( @@ -733,10 +727,7 @@ public CreateNodePoolResponse createNodePool(CreateNodePoolRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "CreateNodePool", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/CreateNodePool"); + "ContainerEngine", "CreateNodePool", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = CreateNodePoolConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -777,7 +768,7 @@ public CreateVirtualNodePoolResponse createVirtualNodePool( "ContainerEngine", "CreateVirtualNodePool", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/CreateVirtualNodePool"); + ""); java.util.function.Function transformer = CreateVirtualNodePoolConverter.fromResponse( @@ -820,7 +811,7 @@ public CreateWorkloadMappingResponse createWorkloadMapping( "ContainerEngine", "CreateWorkloadMapping", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkloadMapping/CreateWorkloadMapping"); + ""); java.util.function.Function transformer = CreateWorkloadMappingConverter.fromResponse( @@ -858,10 +849,7 @@ public DeleteClusterResponse deleteCluster(DeleteClusterRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "DeleteCluster", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/DeleteCluster"); + "ContainerEngine", "DeleteCluster", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = DeleteClusterConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -893,10 +881,7 @@ public DeleteNodeResponse deleteNode(DeleteNodeRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "DeleteNode", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/DeleteNode"); + "ContainerEngine", "DeleteNode", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = DeleteNodeConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -929,10 +914,7 @@ public DeleteNodePoolResponse deleteNodePool(DeleteNodePoolRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "DeleteNodePool", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/DeleteNodePool"); + "ContainerEngine", "DeleteNodePool", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = DeleteNodePoolConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -969,7 +951,7 @@ public DeleteVirtualNodePoolResponse deleteVirtualNodePool( "ContainerEngine", "DeleteVirtualNodePool", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/DeleteVirtualNodePool"); + ""); java.util.function.Function transformer = DeleteVirtualNodePoolConverter.fromResponse( @@ -1004,10 +986,7 @@ public DeleteWorkRequestResponse deleteWorkRequest(DeleteWorkRequestRequest requ com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "DeleteWorkRequest", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkRequest/DeleteWorkRequest"); + "ContainerEngine", "DeleteWorkRequest", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = DeleteWorkRequestConverter.fromResponse( @@ -1046,7 +1025,7 @@ public DeleteWorkloadMappingResponse deleteWorkloadMapping( "ContainerEngine", "DeleteWorkloadMapping", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkloadMapping/DeleteWorkloadMapping"); + ""); java.util.function.Function transformer = DeleteWorkloadMappingConverter.fromResponse( @@ -1081,10 +1060,7 @@ public DisableAddonResponse disableAddon(DisableAddonRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "DisableAddon", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/DisableAddon"); + "ContainerEngine", "DisableAddon", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = DisableAddonConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1116,10 +1092,7 @@ public GetAddonResponse getAddon(GetAddonRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "GetAddon", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/GetAddon"); + "ContainerEngine", "GetAddon", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = GetAddonConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1150,10 +1123,7 @@ public GetClusterResponse getCluster(GetClusterRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "GetCluster", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/GetCluster"); + "ContainerEngine", "GetCluster", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = GetClusterConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1189,7 +1159,7 @@ public GetClusterMigrateToNativeVcnStatusResponse getClusterMigrateToNativeVcnSt "ContainerEngine", "GetClusterMigrateToNativeVcnStatus", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/ClusterMigrateToNativeVcnStatus/GetClusterMigrateToNativeVcnStatus"); + ""); java.util.function.Function< javax.ws.rs.core.Response, GetClusterMigrateToNativeVcnStatusResponse> transformer = @@ -1224,10 +1194,7 @@ public GetClusterOptionsResponse getClusterOptions(GetClusterOptionsRequest requ com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "GetClusterOptions", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/ClusterOptions/GetClusterOptions"); + "ContainerEngine", "GetClusterOptions", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = GetClusterOptionsConverter.fromResponse( @@ -1265,7 +1232,7 @@ public GetCredentialRotationStatusResponse getCredentialRotationStatus( "ContainerEngine", "GetCredentialRotationStatus", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/CredentialRotationStatus/GetCredentialRotationStatus"); + ""); java.util.function.Function transformer = GetCredentialRotationStatusConverter.fromResponse( @@ -1299,10 +1266,7 @@ public GetNodePoolResponse getNodePool(GetNodePoolRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "GetNodePool", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/GetNodePool"); + "ContainerEngine", "GetNodePool", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = GetNodePoolConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1334,10 +1298,7 @@ public GetNodePoolOptionsResponse getNodePoolOptions(GetNodePoolOptionsRequest r com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "GetNodePoolOptions", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePoolOptions/GetNodePoolOptions"); + "ContainerEngine", "GetNodePoolOptions", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = GetNodePoolOptionsConverter.fromResponse( @@ -1371,10 +1332,7 @@ public GetVirtualNodeResponse getVirtualNode(GetVirtualNodeRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "GetVirtualNode", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/GetVirtualNode"); + "ContainerEngine", "GetVirtualNode", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = GetVirtualNodeConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1406,10 +1364,7 @@ public GetVirtualNodePoolResponse getVirtualNodePool(GetVirtualNodePoolRequest r com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "GetVirtualNodePool", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/GetVirtualNodePool"); + "ContainerEngine", "GetVirtualNodePool", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = GetVirtualNodePoolConverter.fromResponse( @@ -1443,10 +1398,7 @@ public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "GetWorkRequest", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkRequest/GetWorkRequest"); + "ContainerEngine", "GetWorkRequest", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1478,10 +1430,7 @@ public GetWorkloadMappingResponse getWorkloadMapping(GetWorkloadMappingRequest r com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "GetWorkloadMapping", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkloadMapping/GetWorkloadMapping"); + "ContainerEngine", "GetWorkloadMapping", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = GetWorkloadMappingConverter.fromResponse( @@ -1516,10 +1465,7 @@ public InstallAddonResponse installAddon(InstallAddonRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "InstallAddon", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/InstallAddon"); + "ContainerEngine", "InstallAddon", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = InstallAddonConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1555,10 +1501,7 @@ public ListAddonOptionsResponse listAddonOptions(ListAddonOptionsRequest request com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "ListAddonOptions", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/AddonOptionSummary/ListAddonOptions"); + "ContainerEngine", "ListAddonOptions", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = ListAddonOptionsConverter.fromResponse( @@ -1591,10 +1534,7 @@ public ListAddonsResponse listAddons(ListAddonsRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "ListAddons", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/ListAddons"); + "ContainerEngine", "ListAddons", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = ListAddonsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1626,10 +1566,7 @@ public ListClustersResponse listClusters(ListClustersRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "ListClusters", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/ClusterSummary/ListClusters"); + "ContainerEngine", "ListClusters", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = ListClustersConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1661,10 +1598,7 @@ public ListNodePoolsResponse listNodePools(ListNodePoolsRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "ListNodePools", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePoolSummary/ListNodePools"); + "ContainerEngine", "ListNodePools", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = ListNodePoolsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1696,10 +1630,7 @@ public ListPodShapesResponse listPodShapes(ListPodShapesRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "ListPodShapes", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/PodShapeSummary/ListPodShapes"); + "ContainerEngine", "ListPodShapes", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = ListPodShapesConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1734,7 +1665,7 @@ public ListVirtualNodePoolsResponse listVirtualNodePools(ListVirtualNodePoolsReq "ContainerEngine", "ListVirtualNodePools", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePoolSummary/ListVirtualNodePools"); + ""); java.util.function.Function transformer = ListVirtualNodePoolsConverter.fromResponse( @@ -1768,10 +1699,7 @@ public ListVirtualNodesResponse listVirtualNodes(ListVirtualNodesRequest request com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "ListVirtualNodes", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/ListVirtualNodes"); + "ContainerEngine", "ListVirtualNodes", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = ListVirtualNodesConverter.fromResponse( @@ -1809,7 +1737,7 @@ public ListWorkRequestErrorsResponse listWorkRequestErrors( "ContainerEngine", "ListWorkRequestErrors", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkRequestError/ListWorkRequestErrors"); + ""); java.util.function.Function transformer = ListWorkRequestErrorsConverter.fromResponse( @@ -1846,7 +1774,7 @@ public ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsReques "ContainerEngine", "ListWorkRequestLogs", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkRequestLogEntry/ListWorkRequestLogs"); + ""); java.util.function.Function transformer = ListWorkRequestLogsConverter.fromResponse( @@ -1880,10 +1808,7 @@ public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "ListWorkRequests", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkRequestSummary/ListWorkRequests"); + "ContainerEngine", "ListWorkRequests", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = ListWorkRequestsConverter.fromResponse( @@ -1920,7 +1845,7 @@ public ListWorkloadMappingsResponse listWorkloadMappings(ListWorkloadMappingsReq "ContainerEngine", "ListWorkloadMappings", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkloadMappingSummary/ListWorkloadMappings"); + ""); java.util.function.Function transformer = ListWorkloadMappingsConverter.fromResponse( @@ -1959,7 +1884,7 @@ public StartCredentialRotationResponse startCredentialRotation( "ContainerEngine", "StartCredentialRotation", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/StartCredentialRotation"); + ""); java.util.function.Function transformer = StartCredentialRotationConverter.fromResponse( @@ -1997,10 +1922,7 @@ public UpdateAddonResponse updateAddon(UpdateAddonRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "UpdateAddon", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/UpdateAddon"); + "ContainerEngine", "UpdateAddon", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = UpdateAddonConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -2036,10 +1958,7 @@ public UpdateClusterResponse updateCluster(UpdateClusterRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "UpdateCluster", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/UpdateCluster"); + "ContainerEngine", "UpdateCluster", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = UpdateClusterConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -2079,7 +1998,7 @@ public UpdateClusterEndpointConfigResponse updateClusterEndpointConfig( "ContainerEngine", "UpdateClusterEndpointConfig", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/UpdateClusterEndpointConfig"); + ""); java.util.function.Function transformer = UpdateClusterEndpointConfigConverter.fromResponse( @@ -2118,10 +2037,7 @@ public UpdateNodePoolResponse updateNodePool(UpdateNodePoolRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "ContainerEngine", - "UpdateNodePool", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/UpdateNodePool"); + "ContainerEngine", "UpdateNodePool", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = UpdateNodePoolConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -2161,7 +2077,7 @@ public UpdateVirtualNodePoolResponse updateVirtualNodePool( "ContainerEngine", "UpdateVirtualNodePool", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/UpdateVirtualNodePool"); + ""); java.util.function.Function transformer = UpdateVirtualNodePoolConverter.fromResponse( @@ -2203,7 +2119,7 @@ public UpdateWorkloadMappingResponse updateWorkloadMapping( "ContainerEngine", "UpdateWorkloadMapping", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkloadMapping/UpdateWorkloadMapping"); + ""); java.util.function.Function transformer = UpdateWorkloadMappingConverter.fromResponse( diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/Cluster.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/Cluster.java index 823ec19f5a9..a10d8fd1319 100644 --- a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/Cluster.java +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/Cluster.java @@ -38,7 +38,8 @@ public final class Cluster extends com.oracle.bmc.http.internal.ExplicitlySetBmc "availableKubernetesUpgrades", "imagePolicyConfig", "clusterPodNetworkOptions", - "type" + "type", + "openIdConnectDiscoveryEndpoint" }) public Cluster( String id, @@ -59,7 +60,8 @@ public Cluster( java.util.List availableKubernetesUpgrades, ImagePolicyConfig imagePolicyConfig, java.util.List clusterPodNetworkOptions, - ClusterType type) { + ClusterType type, + String openIdConnectDiscoveryEndpoint) { super(); this.id = id; this.name = name; @@ -80,6 +82,7 @@ public Cluster( this.imagePolicyConfig = imagePolicyConfig; this.clusterPodNetworkOptions = clusterPodNetworkOptions; this.type = type; + this.openIdConnectDiscoveryEndpoint = openIdConnectDiscoveryEndpoint; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -296,13 +299,13 @@ public Builder metadata(ClusterMetadata metadata) { return this; } /** - * The state of the cluster masters. + * The state of the cluster masters. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private ClusterLifecycleState lifecycleState; /** - * The state of the cluster masters. + * The state of the cluster masters. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) * @param lifecycleState the value to set * @return this builder **/ @@ -411,6 +414,24 @@ public Builder type(ClusterType type) { this.__explicitlySet__.add("type"); return this; } + /** + * The cluster-specific OpenID Connect Discovery endpoint + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("openIdConnectDiscoveryEndpoint") + private String openIdConnectDiscoveryEndpoint; + + /** + * The cluster-specific OpenID Connect Discovery endpoint + * + * @param openIdConnectDiscoveryEndpoint the value to set + * @return this builder + **/ + public Builder openIdConnectDiscoveryEndpoint(String openIdConnectDiscoveryEndpoint) { + this.openIdConnectDiscoveryEndpoint = openIdConnectDiscoveryEndpoint; + this.__explicitlySet__.add("openIdConnectDiscoveryEndpoint"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -436,7 +457,8 @@ public Cluster build() { this.availableKubernetesUpgrades, this.imagePolicyConfig, this.clusterPodNetworkOptions, - this.type); + this.type, + this.openIdConnectDiscoveryEndpoint); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -502,6 +524,9 @@ public Builder copy(Cluster model) { if (model.wasPropertyExplicitlySet("type")) { this.type(model.getType()); } + if (model.wasPropertyExplicitlySet("openIdConnectDiscoveryEndpoint")) { + this.openIdConnectDiscoveryEndpoint(model.getOpenIdConnectDiscoveryEndpoint()); + } return this; } } @@ -704,13 +729,13 @@ public ClusterMetadata getMetadata() { } /** - * The state of the cluster masters. + * The state of the cluster masters. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private final ClusterLifecycleState lifecycleState; /** - * The state of the cluster masters. + * The state of the cluster masters. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) * @return the value **/ public ClusterLifecycleState getLifecycleState() { @@ -803,6 +828,22 @@ public ClusterType getType() { return type; } + /** + * The cluster-specific OpenID Connect Discovery endpoint + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("openIdConnectDiscoveryEndpoint") + private final String openIdConnectDiscoveryEndpoint; + + /** + * The cluster-specific OpenID Connect Discovery endpoint + * + * @return the value + **/ + public String getOpenIdConnectDiscoveryEndpoint() { + return openIdConnectDiscoveryEndpoint; + } + @Override public String toString() { return this.toString(true); @@ -838,6 +879,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", clusterPodNetworkOptions=") .append(String.valueOf(this.clusterPodNetworkOptions)); sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", openIdConnectDiscoveryEndpoint=") + .append(String.valueOf(this.openIdConnectDiscoveryEndpoint)); sb.append(")"); return sb.toString(); } @@ -873,6 +916,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.clusterPodNetworkOptions, other.clusterPodNetworkOptions) && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals( + this.openIdConnectDiscoveryEndpoint, other.openIdConnectDiscoveryEndpoint) && super.equals(other); } @@ -919,6 +964,11 @@ public int hashCode() { ? 43 : this.clusterPodNetworkOptions.hashCode()); result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.openIdConnectDiscoveryEndpoint == null + ? 43 + : this.openIdConnectDiscoveryEndpoint.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/ClusterCreateOptions.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/ClusterCreateOptions.java index 86a2adfa6ab..685528e402b 100644 --- a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/ClusterCreateOptions.java +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/ClusterCreateOptions.java @@ -27,7 +27,9 @@ public final class ClusterCreateOptions extends com.oracle.bmc.http.internal.Exp "addOns", "admissionControllerOptions", "persistentVolumeConfig", - "serviceLbConfig" + "serviceLbConfig", + "openIdConnectTokenAuthenticationConfig", + "openIdConnectDiscovery" }) public ClusterCreateOptions( java.util.List serviceLbSubnetIds, @@ -35,7 +37,9 @@ public ClusterCreateOptions( AddOnOptions addOns, AdmissionControllerOptions admissionControllerOptions, PersistentVolumeConfigDetails persistentVolumeConfig, - ServiceLbConfigDetails serviceLbConfig) { + ServiceLbConfigDetails serviceLbConfig, + OpenIdConnectTokenAuthenticationConfig openIdConnectTokenAuthenticationConfig, + OpenIdConnectDiscovery openIdConnectDiscovery) { super(); this.serviceLbSubnetIds = serviceLbSubnetIds; this.kubernetesNetworkConfig = kubernetesNetworkConfig; @@ -43,6 +47,8 @@ public ClusterCreateOptions( this.admissionControllerOptions = admissionControllerOptions; this.persistentVolumeConfig = persistentVolumeConfig; this.serviceLbConfig = serviceLbConfig; + this.openIdConnectTokenAuthenticationConfig = openIdConnectTokenAuthenticationConfig; + this.openIdConnectDiscovery = openIdConnectDiscovery; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -132,6 +138,25 @@ public Builder serviceLbConfig(ServiceLbConfigDetails serviceLbConfig) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("openIdConnectTokenAuthenticationConfig") + private OpenIdConnectTokenAuthenticationConfig openIdConnectTokenAuthenticationConfig; + + public Builder openIdConnectTokenAuthenticationConfig( + OpenIdConnectTokenAuthenticationConfig openIdConnectTokenAuthenticationConfig) { + this.openIdConnectTokenAuthenticationConfig = openIdConnectTokenAuthenticationConfig; + this.__explicitlySet__.add("openIdConnectTokenAuthenticationConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("openIdConnectDiscovery") + private OpenIdConnectDiscovery openIdConnectDiscovery; + + public Builder openIdConnectDiscovery(OpenIdConnectDiscovery openIdConnectDiscovery) { + this.openIdConnectDiscovery = openIdConnectDiscovery; + this.__explicitlySet__.add("openIdConnectDiscovery"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -143,7 +168,9 @@ public ClusterCreateOptions build() { this.addOns, this.admissionControllerOptions, this.persistentVolumeConfig, - this.serviceLbConfig); + this.serviceLbConfig, + this.openIdConnectTokenAuthenticationConfig, + this.openIdConnectDiscovery); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -170,6 +197,13 @@ public Builder copy(ClusterCreateOptions model) { if (model.wasPropertyExplicitlySet("serviceLbConfig")) { this.serviceLbConfig(model.getServiceLbConfig()); } + if (model.wasPropertyExplicitlySet("openIdConnectTokenAuthenticationConfig")) { + this.openIdConnectTokenAuthenticationConfig( + model.getOpenIdConnectTokenAuthenticationConfig()); + } + if (model.wasPropertyExplicitlySet("openIdConnectDiscovery")) { + this.openIdConnectDiscovery(model.getOpenIdConnectDiscovery()); + } return this; } } @@ -255,6 +289,20 @@ public ServiceLbConfigDetails getServiceLbConfig() { return serviceLbConfig; } + @com.fasterxml.jackson.annotation.JsonProperty("openIdConnectTokenAuthenticationConfig") + private final OpenIdConnectTokenAuthenticationConfig openIdConnectTokenAuthenticationConfig; + + public OpenIdConnectTokenAuthenticationConfig getOpenIdConnectTokenAuthenticationConfig() { + return openIdConnectTokenAuthenticationConfig; + } + + @com.fasterxml.jackson.annotation.JsonProperty("openIdConnectDiscovery") + private final OpenIdConnectDiscovery openIdConnectDiscovery; + + public OpenIdConnectDiscovery getOpenIdConnectDiscovery() { + return openIdConnectDiscovery; + } + @Override public String toString() { return this.toString(true); @@ -277,6 +325,9 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.admissionControllerOptions)); sb.append(", persistentVolumeConfig=").append(String.valueOf(this.persistentVolumeConfig)); sb.append(", serviceLbConfig=").append(String.valueOf(this.serviceLbConfig)); + sb.append(", openIdConnectTokenAuthenticationConfig=") + .append(String.valueOf(this.openIdConnectTokenAuthenticationConfig)); + sb.append(", openIdConnectDiscovery=").append(String.valueOf(this.openIdConnectDiscovery)); sb.append(")"); return sb.toString(); } @@ -300,6 +351,11 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.persistentVolumeConfig, other.persistentVolumeConfig) && java.util.Objects.equals(this.serviceLbConfig, other.serviceLbConfig) + && java.util.Objects.equals( + this.openIdConnectTokenAuthenticationConfig, + other.openIdConnectTokenAuthenticationConfig) + && java.util.Objects.equals( + this.openIdConnectDiscovery, other.openIdConnectDiscovery) && super.equals(other); } @@ -331,6 +387,16 @@ public int hashCode() { result = (result * PRIME) + (this.serviceLbConfig == null ? 43 : this.serviceLbConfig.hashCode()); + result = + (result * PRIME) + + (this.openIdConnectTokenAuthenticationConfig == null + ? 43 + : this.openIdConnectTokenAuthenticationConfig.hashCode()); + result = + (result * PRIME) + + (this.openIdConnectDiscovery == null + ? 43 + : this.openIdConnectDiscovery.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/ClusterLifecycleState.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/ClusterLifecycleState.java index 91828e3a924..eac5ed9fc4c 100644 --- a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/ClusterLifecycleState.java +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/ClusterLifecycleState.java @@ -5,7 +5,7 @@ package com.oracle.bmc.containerengine.model; /** - * The lifecycle state of a cluster. + * The lifecycle state of a cluster. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180222") public enum ClusterLifecycleState { diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/ClusterSummary.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/ClusterSummary.java index 416f706290c..27036148aa6 100644 --- a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/ClusterSummary.java +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/ClusterSummary.java @@ -277,13 +277,13 @@ public Builder metadata(ClusterMetadata metadata) { return this; } /** - * The state of the cluster masters. + * The state of the cluster masters. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private ClusterLifecycleState lifecycleState; /** - * The state of the cluster masters. + * The state of the cluster masters. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) * @param lifecycleState the value to set * @return this builder **/ @@ -667,13 +667,13 @@ public ClusterMetadata getMetadata() { } /** - * The state of the cluster masters. + * The state of the cluster masters. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private final ClusterLifecycleState lifecycleState; /** - * The state of the cluster masters. + * The state of the cluster masters. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) * @return the value **/ public ClusterLifecycleState getLifecycleState() { diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/InstallAddonDetails.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/InstallAddonDetails.java index bf959393a1a..e9e75964e02 100644 --- a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/InstallAddonDetails.java +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/InstallAddonDetails.java @@ -21,13 +21,22 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class InstallAddonDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"addonName", "version", "configurations"}) + @java.beans.ConstructorProperties({ + "addonName", + "version", + "configurations", + "isOverrideExisting" + }) public InstallAddonDetails( - String addonName, String version, java.util.List configurations) { + String addonName, + String version, + java.util.List configurations, + Boolean isOverrideExisting) { super(); this.addonName = addonName; this.version = version; this.configurations = configurations; + this.isOverrideExisting = isOverrideExisting; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -80,13 +89,33 @@ public Builder configurations(java.util.List configurations) this.__explicitlySet__.add("configurations"); return this; } + /** + * Whether or not to override an existing addon installation. Defaults to false. If set to true, any existing addon installation would be overridden as per new installation details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isOverrideExisting") + private Boolean isOverrideExisting; + + /** + * Whether or not to override an existing addon installation. Defaults to false. If set to true, any existing addon installation would be overridden as per new installation details. + * @param isOverrideExisting the value to set + * @return this builder + **/ + public Builder isOverrideExisting(Boolean isOverrideExisting) { + this.isOverrideExisting = isOverrideExisting; + this.__explicitlySet__.add("isOverrideExisting"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public InstallAddonDetails build() { InstallAddonDetails model = - new InstallAddonDetails(this.addonName, this.version, this.configurations); + new InstallAddonDetails( + this.addonName, + this.version, + this.configurations, + this.isOverrideExisting); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -104,6 +133,9 @@ public Builder copy(InstallAddonDetails model) { if (model.wasPropertyExplicitlySet("configurations")) { this.configurations(model.getConfigurations()); } + if (model.wasPropertyExplicitlySet("isOverrideExisting")) { + this.isOverrideExisting(model.getIsOverrideExisting()); + } return this; } } @@ -161,6 +193,20 @@ public java.util.List getConfigurations() { return configurations; } + /** + * Whether or not to override an existing addon installation. Defaults to false. If set to true, any existing addon installation would be overridden as per new installation details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isOverrideExisting") + private final Boolean isOverrideExisting; + + /** + * Whether or not to override an existing addon installation. Defaults to false. If set to true, any existing addon installation would be overridden as per new installation details. + * @return the value + **/ + public Boolean getIsOverrideExisting() { + return isOverrideExisting; + } + @Override public String toString() { return this.toString(true); @@ -178,6 +224,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("addonName=").append(String.valueOf(this.addonName)); sb.append(", version=").append(String.valueOf(this.version)); sb.append(", configurations=").append(String.valueOf(this.configurations)); + sb.append(", isOverrideExisting=").append(String.valueOf(this.isOverrideExisting)); sb.append(")"); return sb.toString(); } @@ -195,6 +242,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.addonName, other.addonName) && java.util.Objects.equals(this.version, other.version) && java.util.Objects.equals(this.configurations, other.configurations) + && java.util.Objects.equals(this.isOverrideExisting, other.isOverrideExisting) && super.equals(other); } @@ -207,6 +255,11 @@ public int hashCode() { result = (result * PRIME) + (this.configurations == null ? 43 : this.configurations.hashCode()); + result = + (result * PRIME) + + (this.isOverrideExisting == null + ? 43 + : this.isOverrideExisting.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/Node.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/Node.java index 3dae7e8efe9..12444603781 100644 --- a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/Node.java +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/Node.java @@ -298,13 +298,13 @@ public Builder systemTags(java.util.Map> s return this; } /** - * The state of the node. + * The state of the node. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private LifecycleState lifecycleState; /** - * The state of the node. + * The state of the node. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) * @param lifecycleState the value to set * @return this builder **/ @@ -618,7 +618,7 @@ public java.util.Map> getSystemTags() { } /** - * The state of the node. + * The state of the node. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) **/ public enum LifecycleState { Creating("CREATING"), @@ -671,13 +671,13 @@ public static LifecycleState create(String key) { } }; /** - * The state of the node. + * The state of the node. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private final LifecycleState lifecycleState; /** - * The state of the node. + * The state of the node. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) * @return the value **/ public LifecycleState getLifecycleState() { diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/NodePool.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/NodePool.java index 3ebe44df068..ed7826c3e1c 100644 --- a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/NodePool.java +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/NodePool.java @@ -119,13 +119,13 @@ public Builder id(String id) { return this; } /** - * The state of the nodepool. + * The state of the nodepool. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private NodePoolLifecycleState lifecycleState; /** - * The state of the nodepool. + * The state of the nodepool. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) * @param lifecycleState the value to set * @return this builder **/ @@ -655,13 +655,13 @@ public String getId() { } /** - * The state of the nodepool. + * The state of the nodepool. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private final NodePoolLifecycleState lifecycleState; /** - * The state of the nodepool. + * The state of the nodepool. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) * @return the value **/ public NodePoolLifecycleState getLifecycleState() { diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/NodePoolSummary.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/NodePoolSummary.java index 73404d9f721..325970b552a 100644 --- a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/NodePoolSummary.java +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/NodePoolSummary.java @@ -113,13 +113,13 @@ public Builder id(String id) { return this; } /** - * The state of the nodepool. + * The state of the nodepool. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private NodePoolLifecycleState lifecycleState; /** - * The state of the nodepool. + * The state of the nodepool. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) * @param lifecycleState the value to set * @return this builder **/ @@ -609,13 +609,13 @@ public String getId() { } /** - * The state of the nodepool. + * The state of the nodepool. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private final NodePoolLifecycleState lifecycleState; /** - * The state of the nodepool. + * The state of the nodepool. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) * @return the value **/ public NodePoolLifecycleState getLifecycleState() { diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/OpenIdConnectDiscovery.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/OpenIdConnectDiscovery.java new file mode 100644 index 00000000000..eec39774515 --- /dev/null +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/OpenIdConnectDiscovery.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.containerengine.model; + +/** + * The property that define the status of the OIDC Discovery feature for a cluster. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180222") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OpenIdConnectDiscovery.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OpenIdConnectDiscovery + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"isOpenIdConnectDiscoveryEnabled"}) + public OpenIdConnectDiscovery(Boolean isOpenIdConnectDiscoveryEnabled) { + super(); + this.isOpenIdConnectDiscoveryEnabled = isOpenIdConnectDiscoveryEnabled; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Whether the cluster has OIDC Discovery enabled. Defaults to false. If set to true, the cluster will be assigned a public OIDC Discovery endpoint. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isOpenIdConnectDiscoveryEnabled") + private Boolean isOpenIdConnectDiscoveryEnabled; + + /** + * Whether the cluster has OIDC Discovery enabled. Defaults to false. If set to true, the cluster will be assigned a public OIDC Discovery endpoint. + * + * @param isOpenIdConnectDiscoveryEnabled the value to set + * @return this builder + **/ + public Builder isOpenIdConnectDiscoveryEnabled(Boolean isOpenIdConnectDiscoveryEnabled) { + this.isOpenIdConnectDiscoveryEnabled = isOpenIdConnectDiscoveryEnabled; + this.__explicitlySet__.add("isOpenIdConnectDiscoveryEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OpenIdConnectDiscovery build() { + OpenIdConnectDiscovery model = + new OpenIdConnectDiscovery(this.isOpenIdConnectDiscoveryEnabled); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OpenIdConnectDiscovery model) { + if (model.wasPropertyExplicitlySet("isOpenIdConnectDiscoveryEnabled")) { + this.isOpenIdConnectDiscoveryEnabled(model.getIsOpenIdConnectDiscoveryEnabled()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Whether the cluster has OIDC Discovery enabled. Defaults to false. If set to true, the cluster will be assigned a public OIDC Discovery endpoint. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isOpenIdConnectDiscoveryEnabled") + private final Boolean isOpenIdConnectDiscoveryEnabled; + + /** + * Whether the cluster has OIDC Discovery enabled. Defaults to false. If set to true, the cluster will be assigned a public OIDC Discovery endpoint. + * + * @return the value + **/ + public Boolean getIsOpenIdConnectDiscoveryEnabled() { + return isOpenIdConnectDiscoveryEnabled; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OpenIdConnectDiscovery("); + sb.append("super=").append(super.toString()); + sb.append("isOpenIdConnectDiscoveryEnabled=") + .append(String.valueOf(this.isOpenIdConnectDiscoveryEnabled)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OpenIdConnectDiscovery)) { + return false; + } + + OpenIdConnectDiscovery other = (OpenIdConnectDiscovery) o; + return java.util.Objects.equals( + this.isOpenIdConnectDiscoveryEnabled, other.isOpenIdConnectDiscoveryEnabled) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.isOpenIdConnectDiscoveryEnabled == null + ? 43 + : this.isOpenIdConnectDiscoveryEnabled.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/OpenIdConnectTokenAuthenticationConfig.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/OpenIdConnectTokenAuthenticationConfig.java new file mode 100644 index 00000000000..4c93cb38303 --- /dev/null +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/OpenIdConnectTokenAuthenticationConfig.java @@ -0,0 +1,591 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.containerengine.model; + +/** + * The properties that configure OIDC token authentication in kube-apiserver. + * For more information, see [Configuring the API Server](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-flags). + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180222") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OpenIdConnectTokenAuthenticationConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OpenIdConnectTokenAuthenticationConfig + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "issuerUrl", + "clientId", + "usernameClaim", + "usernamePrefix", + "groupsClaim", + "groupsPrefix", + "requiredClaims", + "caCertificate", + "signingAlgorithms", + "isOpenIdConnectAuthEnabled" + }) + public OpenIdConnectTokenAuthenticationConfig( + String issuerUrl, + String clientId, + String usernameClaim, + String usernamePrefix, + String groupsClaim, + String groupsPrefix, + java.util.List requiredClaims, + String caCertificate, + java.util.List signingAlgorithms, + Boolean isOpenIdConnectAuthEnabled) { + super(); + this.issuerUrl = issuerUrl; + this.clientId = clientId; + this.usernameClaim = usernameClaim; + this.usernamePrefix = usernamePrefix; + this.groupsClaim = groupsClaim; + this.groupsPrefix = groupsPrefix; + this.requiredClaims = requiredClaims; + this.caCertificate = caCertificate; + this.signingAlgorithms = signingAlgorithms; + this.isOpenIdConnectAuthEnabled = isOpenIdConnectAuthEnabled; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * URL of the provider that allows the API server to discover public signing keys. + * Only URLs that use the https:// scheme are accepted. This is typically the provider's discovery URL, + * changed to have an empty path. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("issuerUrl") + private String issuerUrl; + + /** + * URL of the provider that allows the API server to discover public signing keys. + * Only URLs that use the https:// scheme are accepted. This is typically the provider's discovery URL, + * changed to have an empty path. + * + * @param issuerUrl the value to set + * @return this builder + **/ + public Builder issuerUrl(String issuerUrl) { + this.issuerUrl = issuerUrl; + this.__explicitlySet__.add("issuerUrl"); + return this; + } + /** + * A client id that all tokens must be issued for. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clientId") + private String clientId; + + /** + * A client id that all tokens must be issued for. + * + * @param clientId the value to set + * @return this builder + **/ + public Builder clientId(String clientId) { + this.clientId = clientId; + this.__explicitlySet__.add("clientId"); + return this; + } + /** + * JWT claim to use as the user name. By default sub, which is expected to be a unique identifier of the end + * user. Admins can choose other claims, such as email or name, depending on their provider. However, claims + * other than email will be prefixed with the issuer URL to prevent naming clashes with other plugins. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("usernameClaim") + private String usernameClaim; + + /** + * JWT claim to use as the user name. By default sub, which is expected to be a unique identifier of the end + * user. Admins can choose other claims, such as email or name, depending on their provider. However, claims + * other than email will be prefixed with the issuer URL to prevent naming clashes with other plugins. + * + * @param usernameClaim the value to set + * @return this builder + **/ + public Builder usernameClaim(String usernameClaim) { + this.usernameClaim = usernameClaim; + this.__explicitlySet__.add("usernameClaim"); + return this; + } + /** + * Prefix prepended to username claims to prevent clashes with existing names (such as system:users). + * For example, the value oidc: will create usernames like oidc:jane.doe. If this flag isn't provided and + * --oidc-username-claim is a value other than email the prefix defaults to ( Issuer URL )# where + * ( Issuer URL ) is the value of --oidc-issuer-url. The value - can be used to disable all prefixing. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("usernamePrefix") + private String usernamePrefix; + + /** + * Prefix prepended to username claims to prevent clashes with existing names (such as system:users). + * For example, the value oidc: will create usernames like oidc:jane.doe. If this flag isn't provided and + * --oidc-username-claim is a value other than email the prefix defaults to ( Issuer URL )# where + * ( Issuer URL ) is the value of --oidc-issuer-url. The value - can be used to disable all prefixing. + * + * @param usernamePrefix the value to set + * @return this builder + **/ + public Builder usernamePrefix(String usernamePrefix) { + this.usernamePrefix = usernamePrefix; + this.__explicitlySet__.add("usernamePrefix"); + return this; + } + /** + * JWT claim to use as the user's group. If the claim is present it must be an array of strings. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupsClaim") + private String groupsClaim; + + /** + * JWT claim to use as the user's group. If the claim is present it must be an array of strings. + * + * @param groupsClaim the value to set + * @return this builder + **/ + public Builder groupsClaim(String groupsClaim) { + this.groupsClaim = groupsClaim; + this.__explicitlySet__.add("groupsClaim"); + return this; + } + /** + * Prefix prepended to group claims to prevent clashes with existing names (such as system:groups). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupsPrefix") + private String groupsPrefix; + + /** + * Prefix prepended to group claims to prevent clashes with existing names (such as system:groups). + * + * @param groupsPrefix the value to set + * @return this builder + **/ + public Builder groupsPrefix(String groupsPrefix) { + this.groupsPrefix = groupsPrefix; + this.__explicitlySet__.add("groupsPrefix"); + return this; + } + /** + * A key=value pair that describes a required claim in the ID Token. If set, the claim is verified to be present + * in the ID Token with a matching value. Repeat this flag to specify multiple claims. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requiredClaims") + private java.util.List requiredClaims; + + /** + * A key=value pair that describes a required claim in the ID Token. If set, the claim is verified to be present + * in the ID Token with a matching value. Repeat this flag to specify multiple claims. + * + * @param requiredClaims the value to set + * @return this builder + **/ + public Builder requiredClaims(java.util.List requiredClaims) { + this.requiredClaims = requiredClaims; + this.__explicitlySet__.add("requiredClaims"); + return this; + } + /** + * A Base64 encoded public RSA or ECDSA certificates used to signed your identity provider's web certificate. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("caCertificate") + private String caCertificate; + + /** + * A Base64 encoded public RSA or ECDSA certificates used to signed your identity provider's web certificate. + * + * @param caCertificate the value to set + * @return this builder + **/ + public Builder caCertificate(String caCertificate) { + this.caCertificate = caCertificate; + this.__explicitlySet__.add("caCertificate"); + return this; + } + /** + * The signing algorithms accepted. Default is ["RS256"]. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("signingAlgorithms") + private java.util.List signingAlgorithms; + + /** + * The signing algorithms accepted. Default is ["RS256"]. + * + * @param signingAlgorithms the value to set + * @return this builder + **/ + public Builder signingAlgorithms(java.util.List signingAlgorithms) { + this.signingAlgorithms = signingAlgorithms; + this.__explicitlySet__.add("signingAlgorithms"); + return this; + } + /** + * Whether the cluster has OIDC Auth Config enabled. Defaults to false. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isOpenIdConnectAuthEnabled") + private Boolean isOpenIdConnectAuthEnabled; + + /** + * Whether the cluster has OIDC Auth Config enabled. Defaults to false. + * + * @param isOpenIdConnectAuthEnabled the value to set + * @return this builder + **/ + public Builder isOpenIdConnectAuthEnabled(Boolean isOpenIdConnectAuthEnabled) { + this.isOpenIdConnectAuthEnabled = isOpenIdConnectAuthEnabled; + this.__explicitlySet__.add("isOpenIdConnectAuthEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OpenIdConnectTokenAuthenticationConfig build() { + OpenIdConnectTokenAuthenticationConfig model = + new OpenIdConnectTokenAuthenticationConfig( + this.issuerUrl, + this.clientId, + this.usernameClaim, + this.usernamePrefix, + this.groupsClaim, + this.groupsPrefix, + this.requiredClaims, + this.caCertificate, + this.signingAlgorithms, + this.isOpenIdConnectAuthEnabled); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OpenIdConnectTokenAuthenticationConfig model) { + if (model.wasPropertyExplicitlySet("issuerUrl")) { + this.issuerUrl(model.getIssuerUrl()); + } + if (model.wasPropertyExplicitlySet("clientId")) { + this.clientId(model.getClientId()); + } + if (model.wasPropertyExplicitlySet("usernameClaim")) { + this.usernameClaim(model.getUsernameClaim()); + } + if (model.wasPropertyExplicitlySet("usernamePrefix")) { + this.usernamePrefix(model.getUsernamePrefix()); + } + if (model.wasPropertyExplicitlySet("groupsClaim")) { + this.groupsClaim(model.getGroupsClaim()); + } + if (model.wasPropertyExplicitlySet("groupsPrefix")) { + this.groupsPrefix(model.getGroupsPrefix()); + } + if (model.wasPropertyExplicitlySet("requiredClaims")) { + this.requiredClaims(model.getRequiredClaims()); + } + if (model.wasPropertyExplicitlySet("caCertificate")) { + this.caCertificate(model.getCaCertificate()); + } + if (model.wasPropertyExplicitlySet("signingAlgorithms")) { + this.signingAlgorithms(model.getSigningAlgorithms()); + } + if (model.wasPropertyExplicitlySet("isOpenIdConnectAuthEnabled")) { + this.isOpenIdConnectAuthEnabled(model.getIsOpenIdConnectAuthEnabled()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * URL of the provider that allows the API server to discover public signing keys. + * Only URLs that use the https:// scheme are accepted. This is typically the provider's discovery URL, + * changed to have an empty path. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("issuerUrl") + private final String issuerUrl; + + /** + * URL of the provider that allows the API server to discover public signing keys. + * Only URLs that use the https:// scheme are accepted. This is typically the provider's discovery URL, + * changed to have an empty path. + * + * @return the value + **/ + public String getIssuerUrl() { + return issuerUrl; + } + + /** + * A client id that all tokens must be issued for. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clientId") + private final String clientId; + + /** + * A client id that all tokens must be issued for. + * + * @return the value + **/ + public String getClientId() { + return clientId; + } + + /** + * JWT claim to use as the user name. By default sub, which is expected to be a unique identifier of the end + * user. Admins can choose other claims, such as email or name, depending on their provider. However, claims + * other than email will be prefixed with the issuer URL to prevent naming clashes with other plugins. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("usernameClaim") + private final String usernameClaim; + + /** + * JWT claim to use as the user name. By default sub, which is expected to be a unique identifier of the end + * user. Admins can choose other claims, such as email or name, depending on their provider. However, claims + * other than email will be prefixed with the issuer URL to prevent naming clashes with other plugins. + * + * @return the value + **/ + public String getUsernameClaim() { + return usernameClaim; + } + + /** + * Prefix prepended to username claims to prevent clashes with existing names (such as system:users). + * For example, the value oidc: will create usernames like oidc:jane.doe. If this flag isn't provided and + * --oidc-username-claim is a value other than email the prefix defaults to ( Issuer URL )# where + * ( Issuer URL ) is the value of --oidc-issuer-url. The value - can be used to disable all prefixing. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("usernamePrefix") + private final String usernamePrefix; + + /** + * Prefix prepended to username claims to prevent clashes with existing names (such as system:users). + * For example, the value oidc: will create usernames like oidc:jane.doe. If this flag isn't provided and + * --oidc-username-claim is a value other than email the prefix defaults to ( Issuer URL )# where + * ( Issuer URL ) is the value of --oidc-issuer-url. The value - can be used to disable all prefixing. + * + * @return the value + **/ + public String getUsernamePrefix() { + return usernamePrefix; + } + + /** + * JWT claim to use as the user's group. If the claim is present it must be an array of strings. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupsClaim") + private final String groupsClaim; + + /** + * JWT claim to use as the user's group. If the claim is present it must be an array of strings. + * + * @return the value + **/ + public String getGroupsClaim() { + return groupsClaim; + } + + /** + * Prefix prepended to group claims to prevent clashes with existing names (such as system:groups). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupsPrefix") + private final String groupsPrefix; + + /** + * Prefix prepended to group claims to prevent clashes with existing names (such as system:groups). + * + * @return the value + **/ + public String getGroupsPrefix() { + return groupsPrefix; + } + + /** + * A key=value pair that describes a required claim in the ID Token. If set, the claim is verified to be present + * in the ID Token with a matching value. Repeat this flag to specify multiple claims. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requiredClaims") + private final java.util.List requiredClaims; + + /** + * A key=value pair that describes a required claim in the ID Token. If set, the claim is verified to be present + * in the ID Token with a matching value. Repeat this flag to specify multiple claims. + * + * @return the value + **/ + public java.util.List getRequiredClaims() { + return requiredClaims; + } + + /** + * A Base64 encoded public RSA or ECDSA certificates used to signed your identity provider's web certificate. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("caCertificate") + private final String caCertificate; + + /** + * A Base64 encoded public RSA or ECDSA certificates used to signed your identity provider's web certificate. + * + * @return the value + **/ + public String getCaCertificate() { + return caCertificate; + } + + /** + * The signing algorithms accepted. Default is ["RS256"]. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("signingAlgorithms") + private final java.util.List signingAlgorithms; + + /** + * The signing algorithms accepted. Default is ["RS256"]. + * + * @return the value + **/ + public java.util.List getSigningAlgorithms() { + return signingAlgorithms; + } + + /** + * Whether the cluster has OIDC Auth Config enabled. Defaults to false. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isOpenIdConnectAuthEnabled") + private final Boolean isOpenIdConnectAuthEnabled; + + /** + * Whether the cluster has OIDC Auth Config enabled. Defaults to false. + * + * @return the value + **/ + public Boolean getIsOpenIdConnectAuthEnabled() { + return isOpenIdConnectAuthEnabled; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OpenIdConnectTokenAuthenticationConfig("); + sb.append("super=").append(super.toString()); + sb.append("issuerUrl=").append(String.valueOf(this.issuerUrl)); + sb.append(", clientId=").append(String.valueOf(this.clientId)); + sb.append(", usernameClaim=").append(String.valueOf(this.usernameClaim)); + sb.append(", usernamePrefix=").append(String.valueOf(this.usernamePrefix)); + sb.append(", groupsClaim=").append(String.valueOf(this.groupsClaim)); + sb.append(", groupsPrefix=").append(String.valueOf(this.groupsPrefix)); + sb.append(", requiredClaims=").append(String.valueOf(this.requiredClaims)); + sb.append(", caCertificate=").append(String.valueOf(this.caCertificate)); + sb.append(", signingAlgorithms=").append(String.valueOf(this.signingAlgorithms)); + sb.append(", isOpenIdConnectAuthEnabled=") + .append(String.valueOf(this.isOpenIdConnectAuthEnabled)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OpenIdConnectTokenAuthenticationConfig)) { + return false; + } + + OpenIdConnectTokenAuthenticationConfig other = (OpenIdConnectTokenAuthenticationConfig) o; + return java.util.Objects.equals(this.issuerUrl, other.issuerUrl) + && java.util.Objects.equals(this.clientId, other.clientId) + && java.util.Objects.equals(this.usernameClaim, other.usernameClaim) + && java.util.Objects.equals(this.usernamePrefix, other.usernamePrefix) + && java.util.Objects.equals(this.groupsClaim, other.groupsClaim) + && java.util.Objects.equals(this.groupsPrefix, other.groupsPrefix) + && java.util.Objects.equals(this.requiredClaims, other.requiredClaims) + && java.util.Objects.equals(this.caCertificate, other.caCertificate) + && java.util.Objects.equals(this.signingAlgorithms, other.signingAlgorithms) + && java.util.Objects.equals( + this.isOpenIdConnectAuthEnabled, other.isOpenIdConnectAuthEnabled) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.issuerUrl == null ? 43 : this.issuerUrl.hashCode()); + result = (result * PRIME) + (this.clientId == null ? 43 : this.clientId.hashCode()); + result = + (result * PRIME) + + (this.usernameClaim == null ? 43 : this.usernameClaim.hashCode()); + result = + (result * PRIME) + + (this.usernamePrefix == null ? 43 : this.usernamePrefix.hashCode()); + result = (result * PRIME) + (this.groupsClaim == null ? 43 : this.groupsClaim.hashCode()); + result = (result * PRIME) + (this.groupsPrefix == null ? 43 : this.groupsPrefix.hashCode()); + result = + (result * PRIME) + + (this.requiredClaims == null ? 43 : this.requiredClaims.hashCode()); + result = + (result * PRIME) + + (this.caCertificate == null ? 43 : this.caCertificate.hashCode()); + result = + (result * PRIME) + + (this.signingAlgorithms == null ? 43 : this.signingAlgorithms.hashCode()); + result = + (result * PRIME) + + (this.isOpenIdConnectAuthEnabled == null + ? 43 + : this.isOpenIdConnectAuthEnabled.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/StartCredentialRotationDetails.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/StartCredentialRotationDetails.java index 2feddca6130..fbced5c8877 100644 --- a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/StartCredentialRotationDetails.java +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/StartCredentialRotationDetails.java @@ -31,13 +31,13 @@ public StartCredentialRotationDetails(String autoCompletionDelayDuration) { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The duration in days(in ISO 8601 notation eg. P5D) after which the old credentials should be retired. Maximum delay duration is 14 days. + * The duration in days(in ISO 8601 notation eg. P5D) after which the old credentials should be retired. Maximum delay duration is 90 days. **/ @com.fasterxml.jackson.annotation.JsonProperty("autoCompletionDelayDuration") private String autoCompletionDelayDuration; /** - * The duration in days(in ISO 8601 notation eg. P5D) after which the old credentials should be retired. Maximum delay duration is 14 days. + * The duration in days(in ISO 8601 notation eg. P5D) after which the old credentials should be retired. Maximum delay duration is 90 days. * @param autoCompletionDelayDuration the value to set * @return this builder **/ @@ -80,13 +80,13 @@ public Builder toBuilder() { } /** - * The duration in days(in ISO 8601 notation eg. P5D) after which the old credentials should be retired. Maximum delay duration is 14 days. + * The duration in days(in ISO 8601 notation eg. P5D) after which the old credentials should be retired. Maximum delay duration is 90 days. **/ @com.fasterxml.jackson.annotation.JsonProperty("autoCompletionDelayDuration") private final String autoCompletionDelayDuration; /** - * The duration in days(in ISO 8601 notation eg. P5D) after which the old credentials should be retired. Maximum delay duration is 14 days. + * The duration in days(in ISO 8601 notation eg. P5D) after which the old credentials should be retired. Maximum delay duration is 90 days. * @return the value **/ public String getAutoCompletionDelayDuration() { diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/UpdateClusterOptionsDetails.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/UpdateClusterOptionsDetails.java index 611409d77e8..69c5bfb17ba 100644 --- a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/UpdateClusterOptionsDetails.java +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/UpdateClusterOptionsDetails.java @@ -25,16 +25,22 @@ public final class UpdateClusterOptionsDetails @java.beans.ConstructorProperties({ "admissionControllerOptions", "persistentVolumeConfig", - "serviceLbConfig" + "serviceLbConfig", + "openIdConnectTokenAuthenticationConfig", + "openIdConnectDiscovery" }) public UpdateClusterOptionsDetails( AdmissionControllerOptions admissionControllerOptions, PersistentVolumeConfigDetails persistentVolumeConfig, - ServiceLbConfigDetails serviceLbConfig) { + ServiceLbConfigDetails serviceLbConfig, + OpenIdConnectTokenAuthenticationConfig openIdConnectTokenAuthenticationConfig, + OpenIdConnectDiscovery openIdConnectDiscovery) { super(); this.admissionControllerOptions = admissionControllerOptions; this.persistentVolumeConfig = persistentVolumeConfig; this.serviceLbConfig = serviceLbConfig; + this.openIdConnectTokenAuthenticationConfig = openIdConnectTokenAuthenticationConfig; + this.openIdConnectDiscovery = openIdConnectDiscovery; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -76,6 +82,25 @@ public Builder serviceLbConfig(ServiceLbConfigDetails serviceLbConfig) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("openIdConnectTokenAuthenticationConfig") + private OpenIdConnectTokenAuthenticationConfig openIdConnectTokenAuthenticationConfig; + + public Builder openIdConnectTokenAuthenticationConfig( + OpenIdConnectTokenAuthenticationConfig openIdConnectTokenAuthenticationConfig) { + this.openIdConnectTokenAuthenticationConfig = openIdConnectTokenAuthenticationConfig; + this.__explicitlySet__.add("openIdConnectTokenAuthenticationConfig"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("openIdConnectDiscovery") + private OpenIdConnectDiscovery openIdConnectDiscovery; + + public Builder openIdConnectDiscovery(OpenIdConnectDiscovery openIdConnectDiscovery) { + this.openIdConnectDiscovery = openIdConnectDiscovery; + this.__explicitlySet__.add("openIdConnectDiscovery"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -84,7 +109,9 @@ public UpdateClusterOptionsDetails build() { new UpdateClusterOptionsDetails( this.admissionControllerOptions, this.persistentVolumeConfig, - this.serviceLbConfig); + this.serviceLbConfig, + this.openIdConnectTokenAuthenticationConfig, + this.openIdConnectDiscovery); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -102,6 +129,13 @@ public Builder copy(UpdateClusterOptionsDetails model) { if (model.wasPropertyExplicitlySet("serviceLbConfig")) { this.serviceLbConfig(model.getServiceLbConfig()); } + if (model.wasPropertyExplicitlySet("openIdConnectTokenAuthenticationConfig")) { + this.openIdConnectTokenAuthenticationConfig( + model.getOpenIdConnectTokenAuthenticationConfig()); + } + if (model.wasPropertyExplicitlySet("openIdConnectDiscovery")) { + this.openIdConnectDiscovery(model.getOpenIdConnectDiscovery()); + } return this; } } @@ -145,6 +179,20 @@ public ServiceLbConfigDetails getServiceLbConfig() { return serviceLbConfig; } + @com.fasterxml.jackson.annotation.JsonProperty("openIdConnectTokenAuthenticationConfig") + private final OpenIdConnectTokenAuthenticationConfig openIdConnectTokenAuthenticationConfig; + + public OpenIdConnectTokenAuthenticationConfig getOpenIdConnectTokenAuthenticationConfig() { + return openIdConnectTokenAuthenticationConfig; + } + + @com.fasterxml.jackson.annotation.JsonProperty("openIdConnectDiscovery") + private final OpenIdConnectDiscovery openIdConnectDiscovery; + + public OpenIdConnectDiscovery getOpenIdConnectDiscovery() { + return openIdConnectDiscovery; + } + @Override public String toString() { return this.toString(true); @@ -163,6 +211,9 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.admissionControllerOptions)); sb.append(", persistentVolumeConfig=").append(String.valueOf(this.persistentVolumeConfig)); sb.append(", serviceLbConfig=").append(String.valueOf(this.serviceLbConfig)); + sb.append(", openIdConnectTokenAuthenticationConfig=") + .append(String.valueOf(this.openIdConnectTokenAuthenticationConfig)); + sb.append(", openIdConnectDiscovery=").append(String.valueOf(this.openIdConnectDiscovery)); sb.append(")"); return sb.toString(); } @@ -182,6 +233,11 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.persistentVolumeConfig, other.persistentVolumeConfig) && java.util.Objects.equals(this.serviceLbConfig, other.serviceLbConfig) + && java.util.Objects.equals( + this.openIdConnectTokenAuthenticationConfig, + other.openIdConnectTokenAuthenticationConfig) + && java.util.Objects.equals( + this.openIdConnectDiscovery, other.openIdConnectDiscovery) && super.equals(other); } @@ -202,6 +258,16 @@ public int hashCode() { result = (result * PRIME) + (this.serviceLbConfig == null ? 43 : this.serviceLbConfig.hashCode()); + result = + (result * PRIME) + + (this.openIdConnectTokenAuthenticationConfig == null + ? 43 + : this.openIdConnectTokenAuthenticationConfig.hashCode()); + result = + (result * PRIME) + + (this.openIdConnectDiscovery == null + ? 43 + : this.openIdConnectDiscovery.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/WorkRequestOperationType.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/WorkRequestOperationType.java index 8e9357c3a2b..3031feb6c11 100644 --- a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/WorkRequestOperationType.java +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/WorkRequestOperationType.java @@ -12,6 +12,7 @@ public enum WorkRequestOperationType { ClusterCreate("CLUSTER_CREATE"), ClusterUpdate("CLUSTER_UPDATE"), ClusterDelete("CLUSTER_DELETE"), + CreateNamespace("CREATE_NAMESPACE"), NodepoolCreate("NODEPOOL_CREATE"), NodepoolUpdate("NODEPOOL_UPDATE"), NodepoolDelete("NODEPOOL_DELETE"), diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/WorkloadMapping.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/WorkloadMapping.java index ba6869d253e..782be76127f 100644 --- a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/WorkloadMapping.java +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/WorkloadMapping.java @@ -28,7 +28,8 @@ public final class WorkloadMapping extends com.oracle.bmc.http.internal.Explicit "timeCreated", "lifecycleState", "freeformTags", - "definedTags" + "definedTags", + "systemTags" }) public WorkloadMapping( String id, @@ -39,7 +40,8 @@ public WorkloadMapping( java.util.Date timeCreated, WorkloadMappingLifecycleState lifecycleState, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> systemTags) { super(); this.id = id; this.clusterId = clusterId; @@ -50,6 +52,7 @@ public WorkloadMapping( this.lifecycleState = lifecycleState; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.systemTags = systemTags; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -211,6 +214,26 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -226,7 +249,8 @@ public WorkloadMapping build() { this.timeCreated, this.lifecycleState, this.freeformTags, - this.definedTags); + this.definedTags, + this.systemTags); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -262,6 +286,9 @@ public Builder copy(WorkloadMapping model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } return this; } } @@ -415,6 +442,24 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + @Override public String toString() { return this.toString(true); @@ -438,6 +483,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(")"); return sb.toString(); } @@ -461,6 +507,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) && super.equals(other); } @@ -485,6 +532,7 @@ public int hashCode() { + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/WorkloadMappingSummary.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/WorkloadMappingSummary.java index 0dbf2050b42..6becfbffff8 100644 --- a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/WorkloadMappingSummary.java +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/model/WorkloadMappingSummary.java @@ -31,7 +31,8 @@ public final class WorkloadMappingSummary "timeCreated", "lifecycleState", "freeformTags", - "definedTags" + "definedTags", + "systemTags" }) public WorkloadMappingSummary( String id, @@ -42,7 +43,8 @@ public WorkloadMappingSummary( java.util.Date timeCreated, WorkloadMappingLifecycleState lifecycleState, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> systemTags) { super(); this.id = id; this.clusterId = clusterId; @@ -53,6 +55,7 @@ public WorkloadMappingSummary( this.lifecycleState = lifecycleState; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.systemTags = systemTags; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -214,6 +217,26 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -229,7 +252,8 @@ public WorkloadMappingSummary build() { this.timeCreated, this.lifecycleState, this.freeformTags, - this.definedTags); + this.definedTags, + this.systemTags); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -265,6 +289,9 @@ public Builder copy(WorkloadMappingSummary model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } return this; } } @@ -418,6 +445,24 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + @Override public String toString() { return this.toString(true); @@ -441,6 +486,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(")"); return sb.toString(); } @@ -464,6 +510,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) && super.equals(other); } @@ -488,6 +535,7 @@ public int hashCode() { + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/requests/DeleteVirtualNodePoolRequest.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/requests/DeleteVirtualNodePoolRequest.java index cb0819ebfad..e55c27daabf 100644 --- a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/requests/DeleteVirtualNodePoolRequest.java +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/requests/DeleteVirtualNodePoolRequest.java @@ -56,14 +56,14 @@ public String getOpcRequestId() { return opcRequestId; } /** - * Duration after which Sk8s will give up eviction of the pods on the node. + * Duration after which SKE will give up eviction of the pods on the node. * PT0M will indicate you want to delete the virtual node without cordon and drain. Default PT60M, Min PT0M, Max: PT60M. Format ISO 8601 e.g PT30M * */ private String overrideEvictionGraceDurationVnp; /** - * Duration after which Sk8s will give up eviction of the pods on the node. + * Duration after which SKE will give up eviction of the pods on the node. * PT0M will indicate you want to delete the virtual node without cordon and drain. Default PT60M, Min PT0M, Max: PT60M. Format ISO 8601 e.g PT30M * */ @@ -71,12 +71,12 @@ public String getOverrideEvictionGraceDurationVnp() { return overrideEvictionGraceDurationVnp; } /** - * If the underlying compute instance should be deleted if you cannot evict all the pods in grace period + * If the underlying virtual node should be force deleted if all the pods are not evicted in the evictionGraceDuration. */ private Boolean isForceDeletionAfterOverrideGraceDurationVnp; /** - * If the underlying compute instance should be deleted if you cannot evict all the pods in grace period + * If the underlying virtual node should be force deleted if all the pods are not evicted in the evictionGraceDuration. */ public Boolean getIsForceDeletionAfterOverrideGraceDurationVnp() { return isForceDeletionAfterOverrideGraceDurationVnp; @@ -145,14 +145,14 @@ public Builder opcRequestId(String opcRequestId) { } /** - * Duration after which Sk8s will give up eviction of the pods on the node. + * Duration after which SKE will give up eviction of the pods on the node. * PT0M will indicate you want to delete the virtual node without cordon and drain. Default PT60M, Min PT0M, Max: PT60M. Format ISO 8601 e.g PT30M * */ private String overrideEvictionGraceDurationVnp = null; /** - * Duration after which Sk8s will give up eviction of the pods on the node. + * Duration after which SKE will give up eviction of the pods on the node. * PT0M will indicate you want to delete the virtual node without cordon and drain. Default PT60M, Min PT0M, Max: PT60M. Format ISO 8601 e.g PT30M * * @param overrideEvictionGraceDurationVnp the value to set @@ -164,12 +164,12 @@ public Builder overrideEvictionGraceDurationVnp(String overrideEvictionGraceDura } /** - * If the underlying compute instance should be deleted if you cannot evict all the pods in grace period + * If the underlying virtual node should be force deleted if all the pods are not evicted in the evictionGraceDuration. */ private Boolean isForceDeletionAfterOverrideGraceDurationVnp = null; /** - * If the underlying compute instance should be deleted if you cannot evict all the pods in grace period + * If the underlying virtual node should be force deleted if all the pods are not evicted in the evictionGraceDuration. * @param isForceDeletionAfterOverrideGraceDurationVnp the value to set * @return this builder instance */ diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/requests/ListClustersRequest.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/requests/ListClustersRequest.java index 694df0ce61e..dc79d0d25a0 100644 --- a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/requests/ListClustersRequest.java +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/requests/ListClustersRequest.java @@ -23,13 +23,13 @@ public String getCompartmentId() { return compartmentId; } /** - * A cluster lifecycle state to filter on. Can have multiple parameters of this name. + * A cluster lifecycle state to filter on. Can have multiple parameters of this name. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) */ private java.util.List lifecycleState; /** - * A cluster lifecycle state to filter on. Can have multiple parameters of this name. + * A cluster lifecycle state to filter on. Can have multiple parameters of this name. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) */ public java.util.List getLifecycleState() { @@ -176,13 +176,13 @@ public Builder compartmentId(String compartmentId) { } /** - * A cluster lifecycle state to filter on. Can have multiple parameters of this name. + * A cluster lifecycle state to filter on. Can have multiple parameters of this name. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) */ private java.util.List lifecycleState = null; /** - * A cluster lifecycle state to filter on. Can have multiple parameters of this name. + * A cluster lifecycle state to filter on. Can have multiple parameters of this name. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) * @param lifecycleState the value to set * @return this builder instance */ @@ -194,7 +194,7 @@ public Builder lifecycleState( } /** - * Singular setter. A cluster lifecycle state to filter on. Can have multiple parameters of this name. + * Singular setter. A cluster lifecycle state to filter on. Can have multiple parameters of this name. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) * @param singularValue the singular value to set * @return this builder instance */ diff --git a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/requests/ListNodePoolsRequest.java b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/requests/ListNodePoolsRequest.java index bd1359bd0d0..1cc256942ee 100644 --- a/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/requests/ListNodePoolsRequest.java +++ b/bmc-containerengine/src/main/java/com/oracle/bmc/containerengine/requests/ListNodePoolsRequest.java @@ -151,13 +151,13 @@ public String getOpcRequestId() { return opcRequestId; } /** - * A list of nodepool lifecycle states on which to filter on, matching any of the list items (OR logic). eg. [ACTIVE, DELETING] + * A list of nodepool lifecycle states on which to filter on, matching any of the list items (OR logic). eg. [ACTIVE, DELETING]. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) */ private java.util.List lifecycleState; /** - * A list of nodepool lifecycle states on which to filter on, matching any of the list items (OR logic). eg. [ACTIVE, DELETING] + * A list of nodepool lifecycle states on which to filter on, matching any of the list items (OR logic). eg. [ACTIVE, DELETING]. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) */ public java.util.List getLifecycleState() { @@ -306,13 +306,13 @@ public Builder opcRequestId(String opcRequestId) { } /** - * A list of nodepool lifecycle states on which to filter on, matching any of the list items (OR logic). eg. [ACTIVE, DELETING] + * A list of nodepool lifecycle states on which to filter on, matching any of the list items (OR logic). eg. [ACTIVE, DELETING]. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) */ private java.util.List lifecycleState = null; /** - * A list of nodepool lifecycle states on which to filter on, matching any of the list items (OR logic). eg. [ACTIVE, DELETING] + * A list of nodepool lifecycle states on which to filter on, matching any of the list items (OR logic). eg. [ACTIVE, DELETING]. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) * @param lifecycleState the value to set * @return this builder instance */ @@ -324,7 +324,7 @@ public Builder lifecycleState( } /** - * Singular setter. A list of nodepool lifecycle states on which to filter on, matching any of the list items (OR logic). eg. [ACTIVE, DELETING] + * Singular setter. A list of nodepool lifecycle states on which to filter on, matching any of the list items (OR logic). eg. [ACTIVE, DELETING]. For more information, see [Monitoring Clusters](https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengmonitoringclusters.htm) * @param singularValue the singular value to set * @return this builder instance */ diff --git a/bmc-containerinstances/pom.xml b/bmc-containerinstances/pom.xml index 49c03a7badd..fffcc5fcfbb 100644 --- a/bmc-containerinstances/pom.xml +++ b/bmc-containerinstances/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-containerinstances @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-core/pom.xml b/bmc-core/pom.xml index 5cc8c5d6ea6..30f1ddd85bc 100644 --- a/bmc-core/pom.xml +++ b/bmc-core/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml @@ -19,12 +19,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 com.oracle.oci.sdk oci-java-sdk-workrequests - 2.73.0 + 2.79.0 diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java b/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java index 307a4c46e81..d9f4fe173d5 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java @@ -880,6 +880,20 @@ GetImageShapeCompatibilityEntryResponse getImageShapeCompatibilityEntry( GetInstanceConsoleConnectionResponse getInstanceConsoleConnection( GetInstanceConsoleConnectionRequest request); + /** + * Gets the maintenance event for the given instance. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetInstanceMaintenanceEvent API. + */ + GetInstanceMaintenanceEventResponse getInstanceMaintenanceEvent( + GetInstanceMaintenanceEventRequest request); + /** * Gets the maximum possible date that a maintenance reboot can be extended. For more information, see * [Infrastructure Maintenance](https://docs.cloud.oracle.com/iaas/Content/Compute/References/infrastructure-maintenance.htm). @@ -1041,6 +1055,12 @@ GetWindowsInstanceInitialCredentialsResponse getWindowsInstanceInitialCredential * with the signature. To get the image ID for the LaunchInstance operation, call * {@link #getAppCatalogListingResourceVersion(GetAppCatalogListingResourceVersionRequest) getAppCatalogListingResourceVersion}. *

+ * When launching an instance, you may provide the `securityAttributes` parameter in + * {@link LaunchInstanceDetails} to manage security attributes via the instance, + * or in the embedded {@link CreateVnicDetails} to manage security attributes + * via the VNIC directly, but not both. Providing `securityAttributes` in both locations will return a + * 400 Bad Request response. + *

* To determine whether capacity is available for a specific shape before you create an instance, * use the {@link #createComputeCapacityReport(CreateComputeCapacityReportRequest) createComputeCapacityReport} * operation. @@ -1404,6 +1424,20 @@ ListInstanceConsoleConnectionsResponse listInstanceConsoleConnections( */ ListInstanceDevicesResponse listInstanceDevices(ListInstanceDevicesRequest request); + /** + * Gets a list of all the maintenance events for the given instance. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListInstanceMaintenanceEvents API. + */ + ListInstanceMaintenanceEventsResponse listInstanceMaintenanceEvents( + ListInstanceMaintenanceEventsRequest request); + /** * Lists the instances in the specified compartment and the specified availability domain. * You can filter the results by specifying an instance name (the list will include all the identically-named @@ -1640,6 +1674,20 @@ UpdateComputeImageCapabilitySchemaResponse updateComputeImageCapabilitySchema( UpdateInstanceConsoleConnectionResponse updateInstanceConsoleConnection( UpdateInstanceConsoleConnectionRequest request); + /** + * Updates the maintenance event for the given instance. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateInstanceMaintenanceEvent API. + */ + UpdateInstanceMaintenanceEventResponse updateInstanceMaintenanceEvent( + UpdateInstanceMaintenanceEventRequest request); + /** * Updates information about the specified volume attachment. * @param request The request object containing the details to send diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java index 2f624238dae..60588d7f44e 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java @@ -1085,6 +1085,23 @@ java.util.concurrent.Future getInstanceCon GetInstanceConsoleConnectionResponse> handler); + /** + * Gets the maintenance event for the given instance. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getInstanceMaintenanceEvent( + GetInstanceMaintenanceEventRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetInstanceMaintenanceEventRequest, GetInstanceMaintenanceEventResponse> + handler); + /** * Gets the maximum possible date that a maintenance reboot can be extended. For more information, see * [Infrastructure Maintenance](https://docs.cloud.oracle.com/iaas/Content/Compute/References/infrastructure-maintenance.htm). @@ -1270,6 +1287,12 @@ java.util.concurrent.Future instanceAction( * with the signature. To get the image ID for the LaunchInstance operation, call * {@link #getAppCatalogListingResourceVersion(GetAppCatalogListingResourceVersionRequest, Consumer, Consumer) getAppCatalogListingResourceVersion}. *

+ * When launching an instance, you may provide the `securityAttributes` parameter in + * {@link LaunchInstanceDetails} to manage security attributes via the instance, + * or in the embedded {@link CreateVnicDetails} to manage security attributes + * via the VNIC directly, but not both. Providing `securityAttributes` in both locations will return a + * 400 Bad Request response. + *

* To determine whether capacity is available for a specific shape before you create an instance, * use the {@link #createComputeCapacityReport(CreateComputeCapacityReportRequest, Consumer, Consumer) createComputeCapacityReport} * operation. @@ -1736,6 +1759,25 @@ java.util.concurrent.Future listInstanceDevices( ListInstanceDevicesRequest, ListInstanceDevicesResponse> handler); + /** + * Gets a list of all the maintenance events for the given instance. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listInstanceMaintenanceEvents( + ListInstanceMaintenanceEventsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListInstanceMaintenanceEventsRequest, + ListInstanceMaintenanceEventsResponse> + handler); + /** * Lists the instances in the specified compartment and the specified availability domain. * You can filter the results by specifying an instance name (the list will include all the identically-named @@ -2031,6 +2073,25 @@ java.util.concurrent.Future updateInstance( UpdateInstanceConsoleConnectionResponse> handler); + /** + * Updates the maintenance event for the given instance. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + updateInstanceMaintenanceEvent( + UpdateInstanceMaintenanceEventRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateInstanceMaintenanceEventRequest, + UpdateInstanceMaintenanceEventResponse> + handler); + /** * Updates information about the specified volume attachment. * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsyncClient.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsyncClient.java index cf5a22b5015..d6d4a085588 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsyncClient.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsyncClient.java @@ -3153,6 +3153,57 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + getInstanceMaintenanceEvent( + GetInstanceMaintenanceEventRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetInstanceMaintenanceEventRequest, + GetInstanceMaintenanceEventResponse> + handler) { + LOG.trace("Called async getInstanceMaintenanceEvent"); + final GetInstanceMaintenanceEventRequest interceptedRequest = + GetInstanceMaintenanceEventConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetInstanceMaintenanceEventConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "GetInstanceMaintenanceEvent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceMaintenanceEvent/GetInstanceMaintenanceEvent"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetInstanceMaintenanceEventResponse> + transformer = + GetInstanceMaintenanceEventConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetInstanceMaintenanceEventRequest, GetInstanceMaintenanceEventResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetInstanceMaintenanceEventRequest, + GetInstanceMaintenanceEventResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetInstanceMaintenanceEventRequest, GetInstanceMaintenanceEventResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getInstanceMaintenanceReboot( @@ -4737,6 +4788,57 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + listInstanceMaintenanceEvents( + ListInstanceMaintenanceEventsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListInstanceMaintenanceEventsRequest, + ListInstanceMaintenanceEventsResponse> + handler) { + LOG.trace("Called async listInstanceMaintenanceEvents"); + final ListInstanceMaintenanceEventsRequest interceptedRequest = + ListInstanceMaintenanceEventsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListInstanceMaintenanceEventsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "ListInstanceMaintenanceEvents", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceMaintenanceEventSummary/ListInstanceMaintenanceEvents"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListInstanceMaintenanceEventsResponse> + transformer = + ListInstanceMaintenanceEventsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListInstanceMaintenanceEventsRequest, ListInstanceMaintenanceEventsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListInstanceMaintenanceEventsRequest, + ListInstanceMaintenanceEventsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListInstanceMaintenanceEventsRequest, ListInstanceMaintenanceEventsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listInstances( ListInstancesRequest request, @@ -5503,6 +5605,64 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + updateInstanceMaintenanceEvent( + UpdateInstanceMaintenanceEventRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateInstanceMaintenanceEventRequest, + UpdateInstanceMaintenanceEventResponse> + handler) { + LOG.trace("Called async updateInstanceMaintenanceEvent"); + final UpdateInstanceMaintenanceEventRequest interceptedRequest = + UpdateInstanceMaintenanceEventConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateInstanceMaintenanceEventConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "UpdateInstanceMaintenanceEvent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceMaintenanceEvent/UpdateInstanceMaintenanceEvent"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateInstanceMaintenanceEventResponse> + transformer = + UpdateInstanceMaintenanceEventConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateInstanceMaintenanceEventRequest, + UpdateInstanceMaintenanceEventResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateInstanceMaintenanceEventRequest, + UpdateInstanceMaintenanceEventResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateInstanceMaintenanceEventDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateInstanceMaintenanceEventRequest, UpdateInstanceMaintenanceEventResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateVolumeAttachment( UpdateVolumeAttachmentRequest request, diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeClient.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeClient.java index c960150f865..a563fcaeceb 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeClient.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeClient.java @@ -2647,6 +2647,44 @@ public GetInstanceConsoleConnectionResponse getInstanceConsoleConnection( }); } + @Override + public GetInstanceMaintenanceEventResponse getInstanceMaintenanceEvent( + GetInstanceMaintenanceEventRequest request) { + LOG.trace("Called getInstanceMaintenanceEvent"); + final GetInstanceMaintenanceEventRequest interceptedRequest = + GetInstanceMaintenanceEventConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetInstanceMaintenanceEventConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "GetInstanceMaintenanceEvent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceMaintenanceEvent/GetInstanceMaintenanceEvent"); + java.util.function.Function + transformer = + GetInstanceMaintenanceEventConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetInstanceMaintenanceRebootResponse getInstanceMaintenanceReboot( GetInstanceMaintenanceRebootRequest request) { @@ -3853,6 +3891,45 @@ public ListInstanceDevicesResponse listInstanceDevices(ListInstanceDevicesReques }); } + @Override + public ListInstanceMaintenanceEventsResponse listInstanceMaintenanceEvents( + ListInstanceMaintenanceEventsRequest request) { + LOG.trace("Called listInstanceMaintenanceEvents"); + final ListInstanceMaintenanceEventsRequest interceptedRequest = + ListInstanceMaintenanceEventsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListInstanceMaintenanceEventsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "ListInstanceMaintenanceEvents", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceMaintenanceEventSummary/ListInstanceMaintenanceEvents"); + java.util.function.Function< + javax.ws.rs.core.Response, ListInstanceMaintenanceEventsResponse> + transformer = + ListInstanceMaintenanceEventsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListInstancesResponse listInstances(ListInstancesRequest request) { LOG.trace("Called listInstances"); @@ -4454,6 +4531,51 @@ public UpdateInstanceConsoleConnectionResponse updateInstanceConsoleConnection( }); } + @Override + public UpdateInstanceMaintenanceEventResponse updateInstanceMaintenanceEvent( + UpdateInstanceMaintenanceEventRequest request) { + LOG.trace("Called updateInstanceMaintenanceEvent"); + final UpdateInstanceMaintenanceEventRequest interceptedRequest = + UpdateInstanceMaintenanceEventConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateInstanceMaintenanceEventConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Compute", + "UpdateInstanceMaintenanceEvent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceMaintenanceEvent/UpdateInstanceMaintenanceEvent"); + java.util.function.Function< + javax.ws.rs.core.Response, UpdateInstanceMaintenanceEventResponse> + transformer = + UpdateInstanceMaintenanceEventConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest + .getUpdateInstanceMaintenanceEventDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateVolumeAttachmentResponse updateVolumeAttachment( UpdateVolumeAttachmentRequest request) { diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputePaginators.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputePaginators.java index e0e33ef9c16..3a5f0305850 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputePaginators.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputePaginators.java @@ -2989,6 +2989,127 @@ public java.util.List apply( }); } + /** + * Creates a new iterable which will iterate over the responses received from the listInstanceMaintenanceEvents operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listInstanceMaintenanceEventsResponseIterator( + final ListInstanceMaintenanceEventsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListInstanceMaintenanceEventsRequest.Builder, ListInstanceMaintenanceEventsRequest, + ListInstanceMaintenanceEventsResponse>( + new java.util.function.Supplier() { + @Override + public ListInstanceMaintenanceEventsRequest.Builder get() { + return ListInstanceMaintenanceEventsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListInstanceMaintenanceEventsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListInstanceMaintenanceEventsRequest.Builder>, + ListInstanceMaintenanceEventsRequest>() { + @Override + public ListInstanceMaintenanceEventsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListInstanceMaintenanceEventsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListInstanceMaintenanceEventsRequest, + ListInstanceMaintenanceEventsResponse>() { + @Override + public ListInstanceMaintenanceEventsResponse apply( + ListInstanceMaintenanceEventsRequest request) { + return client.listInstanceMaintenanceEvents(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.core.model.InstanceMaintenanceEventSummary} objects + * contained in responses from the listInstanceMaintenanceEvents operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.core.model.InstanceMaintenanceEventSummary} objects + * contained in responses received from the service. + */ + public Iterable + listInstanceMaintenanceEventsRecordIterator( + final ListInstanceMaintenanceEventsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListInstanceMaintenanceEventsRequest.Builder, ListInstanceMaintenanceEventsRequest, + ListInstanceMaintenanceEventsResponse, + com.oracle.bmc.core.model.InstanceMaintenanceEventSummary>( + new java.util.function.Supplier() { + @Override + public ListInstanceMaintenanceEventsRequest.Builder get() { + return ListInstanceMaintenanceEventsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListInstanceMaintenanceEventsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListInstanceMaintenanceEventsRequest.Builder>, + ListInstanceMaintenanceEventsRequest>() { + @Override + public ListInstanceMaintenanceEventsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListInstanceMaintenanceEventsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListInstanceMaintenanceEventsRequest, + ListInstanceMaintenanceEventsResponse>() { + @Override + public ListInstanceMaintenanceEventsResponse apply( + ListInstanceMaintenanceEventsRequest request) { + return client.listInstanceMaintenanceEvents(request); + } + }, + new java.util.function.Function< + ListInstanceMaintenanceEventsResponse, + java.util.List< + com.oracle.bmc.core.model.InstanceMaintenanceEventSummary>>() { + @Override + public java.util.List + apply(ListInstanceMaintenanceEventsResponse response) { + return response.getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listInstances operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeWaiters.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeWaiters.java index 8352a8776df..7e6b3676d37 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeWaiters.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeWaiters.java @@ -1749,6 +1749,116 @@ public boolean test(GetInstanceConsoleConnectionResponse response) { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetInstanceMaintenanceEventRequest, GetInstanceMaintenanceEventResponse> + forInstanceMaintenanceEvent( + GetInstanceMaintenanceEventRequest request, + com.oracle.bmc.core.model.InstanceMaintenanceEvent.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forInstanceMaintenanceEvent( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetInstanceMaintenanceEventRequest, GetInstanceMaintenanceEventResponse> + forInstanceMaintenanceEvent( + GetInstanceMaintenanceEventRequest request, + com.oracle.bmc.core.model.InstanceMaintenanceEvent.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forInstanceMaintenanceEvent( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetInstanceMaintenanceEventRequest, GetInstanceMaintenanceEventResponse> + forInstanceMaintenanceEvent( + GetInstanceMaintenanceEventRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.core.model.InstanceMaintenanceEvent.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forInstanceMaintenanceEvent( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for InstanceMaintenanceEvent. + private com.oracle.bmc.waiter.Waiter< + GetInstanceMaintenanceEventRequest, GetInstanceMaintenanceEventResponse> + forInstanceMaintenanceEvent( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetInstanceMaintenanceEventRequest request, + final com.oracle.bmc.core.model.InstanceMaintenanceEvent.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetInstanceMaintenanceEventRequest, + GetInstanceMaintenanceEventResponse>() { + @Override + public GetInstanceMaintenanceEventResponse apply( + GetInstanceMaintenanceEventRequest request) { + return client.getInstanceMaintenanceEvent(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetInstanceMaintenanceEventResponse response) { + return targetStatesSet.contains( + response.getInstanceMaintenanceEvent().getLifecycleState()); + } + }, + false), + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * @@ -2201,4 +2311,67 @@ public UpdateInstanceResponse call() throws Exception { }, request); } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + UpdateInstanceMaintenanceEventRequest, UpdateInstanceMaintenanceEventResponse> + forUpdateInstanceMaintenanceEvent(UpdateInstanceMaintenanceEventRequest request) { + return forUpdateInstanceMaintenanceEvent( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + UpdateInstanceMaintenanceEventRequest, UpdateInstanceMaintenanceEventResponse> + forUpdateInstanceMaintenanceEvent( + UpdateInstanceMaintenanceEventRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public UpdateInstanceMaintenanceEventResponse call() throws Exception { + final UpdateInstanceMaintenanceEventResponse response = + client.updateInstanceMaintenanceEvent(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetwork.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetwork.java index 3b72c0e3cf4..1ceeabfc829 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetwork.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetwork.java @@ -121,7 +121,7 @@ AddDrgRouteDistributionStatementsResponse addDrgRouteDistributionStatements( AddIpv6VcnCidrResponse addIpv6VcnCidr(AddIpv6VcnCidrRequest request); /** - * Adds one or more security rules to the specified network security group. + * Adds up to 25 security rules to the specified network security group. Adding more than 25 rules requires multiple operations. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -1130,6 +1130,9 @@ CreateRemotePeeringConnectionResponse createRemotePeeringConnection( *

* You may optionally specify a *display name* for the service gateway, otherwise a default is provided. * It does not have to be unique, and you can change it. Avoid entering confidential information. + *

+ * Use the {@link #listServices(ListServicesRequest) listServices} operation to find service CIDR labels + * available in the region. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -3319,7 +3322,7 @@ ListVirtualCircuitAssociatedTunnelsResponse listVirtualCircuitAssociatedTunnels( ListVirtualCircuitAssociatedTunnelsRequest request); /** - * The deprecated operation lists available bandwidth levels for virtual circuits. For the compartment ID, provide the [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of your tenancy (the root compartment). + * The operation lists available bandwidth levels for virtual circuits. For the compartment ID, provide the [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of your tenancy (the root compartment). * * @param request The request object containing the details to send * @return A response object containing details about the completed operation diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsync.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsync.java index d2fe4994c19..e602f0edc3c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsync.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsync.java @@ -135,7 +135,7 @@ java.util.concurrent.Future addIpv6VcnCidr( handler); /** - * Adds one or more security rules to the specified network security group. + * Adds up to 25 security rules to the specified network security group. Adding more than 25 rules requires multiple operations. * * * @param request The request object containing the details to send @@ -1355,6 +1355,9 @@ java.util.concurrent.Future createSecurityList( *

* You may optionally specify a *display name* for the service gateway, otherwise a default is provided. * It does not have to be unique, and you can change it. Avoid entering confidential information. + *

+ * Use the {@link #listServices(ListServicesRequest, Consumer, Consumer) listServices} operation to find service CIDR labels + * available in the region. * * * @param request The request object containing the details to send @@ -4012,7 +4015,7 @@ java.util.concurrent.Future listVcns( handler); /** - * The deprecated operation lists available bandwidth levels for virtual circuits. For the compartment ID, provide the [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of your tenancy (the root compartment). + * The operation lists available bandwidth levels for virtual circuits. For the compartment ID, provide the [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of your tenancy (the root compartment). * * * @param request The request object containing the details to send diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsyncClient.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsyncClient.java index df6abaafac5..37a366fb08f 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsyncClient.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsyncClient.java @@ -9187,7 +9187,7 @@ public java.util.concurrent.Future listIpInventory( "VirtualNetwork", "ListIpInventory", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vcn/ListIpInventory"); + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IpInventoryCollection/ListIpInventory"); final java.util.function.Function transformer = ListIpInventoryConverter.fromResponse( diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkClient.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkClient.java index 1d853c6774c..9710edec0c9 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkClient.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkClient.java @@ -7459,7 +7459,7 @@ public ListIpInventoryResponse listIpInventory(ListIpInventoryRequest request) { "VirtualNetwork", "ListIpInventory", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vcn/ListIpInventory"); + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IpInventoryCollection/ListIpInventory"); java.util.function.Function transformer = ListIpInventoryConverter.fromResponse( diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetInstanceMaintenanceEventConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetInstanceMaintenanceEventConverter.java new file mode 100644 index 00000000000..57c4ff96212 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetInstanceMaintenanceEventConverter.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetInstanceMaintenanceEventConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetInstanceMaintenanceEventConverter.class); + + public static com.oracle.bmc.core.requests.GetInstanceMaintenanceEventRequest interceptRequest( + com.oracle.bmc.core.requests.GetInstanceMaintenanceEventRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.core.requests.GetInstanceMaintenanceEventRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getInstanceMaintenanceEventId(), + "instanceMaintenanceEventId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("instanceMaintenanceEvents") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getInstanceMaintenanceEventId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.GetInstanceMaintenanceEventResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.GetInstanceMaintenanceEventResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.GetInstanceMaintenanceEventResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses + .GetInstanceMaintenanceEventResponse>() { + @Override + public com.oracle.bmc.core.responses.GetInstanceMaintenanceEventResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.core.responses.GetInstanceMaintenanceEventResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model + .InstanceMaintenanceEvent>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model + .InstanceMaintenanceEvent + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.core.model + .InstanceMaintenanceEvent + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.core.model.InstanceMaintenanceEvent> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.core.responses.GetInstanceMaintenanceEventResponse + .Builder + builder = + com.oracle.bmc.core.responses + .GetInstanceMaintenanceEventResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.instanceMaintenanceEvent(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.core.responses.GetInstanceMaintenanceEventResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListInstanceMaintenanceEventsConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListInstanceMaintenanceEventsConverter.java new file mode 100644 index 00000000000..7768399452d --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListInstanceMaintenanceEventsConverter.java @@ -0,0 +1,237 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListInstanceMaintenanceEventsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListInstanceMaintenanceEventsConverter.class); + + public static com.oracle.bmc.core.requests.ListInstanceMaintenanceEventsRequest + interceptRequest( + com.oracle.bmc.core.requests.ListInstanceMaintenanceEventsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.core.requests.ListInstanceMaintenanceEventsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("instanceMaintenanceEvents"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getInstanceId() != null) { + target = + target.queryParam( + "instanceId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getInstanceId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getCorrelationToken() != null) { + target = + target.queryParam( + "correlationToken", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCorrelationToken())); + } + + if (request.getInstanceAction() != null) { + target = + target.queryParam( + "instanceAction", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getInstanceAction())); + } + + if (request.getTimeWindowStartGreaterThanOrEqualTo() != null) { + target = + target.queryParam( + "timeWindowStartGreaterThanOrEqualTo", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeWindowStartGreaterThanOrEqualTo())); + } + + if (request.getTimeWindowStartLessThanOrEqualTo() != null) { + target = + target.queryParam( + "timeWindowStartLessThanOrEqualTo", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeWindowStartLessThanOrEqualTo())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.ListInstanceMaintenanceEventsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.ListInstanceMaintenanceEventsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.ListInstanceMaintenanceEventsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses + .ListInstanceMaintenanceEventsResponse>() { + @Override + public com.oracle.bmc.core.responses + .ListInstanceMaintenanceEventsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.core.responses.ListInstanceMaintenanceEventsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.core.model + .InstanceMaintenanceEventSummary>>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.core.model + .InstanceMaintenanceEventSummary>>() {}, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.core.model + .InstanceMaintenanceEventSummary>>() {}); + } + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.core.model + .InstanceMaintenanceEventSummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.core.responses.ListInstanceMaintenanceEventsResponse + .Builder + builder = + com.oracle.bmc.core.responses + .ListInstanceMaintenanceEventsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.items(response.getItem()); + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.core.responses.ListInstanceMaintenanceEventsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateInstanceMaintenanceEventConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateInstanceMaintenanceEventConverter.java new file mode 100644 index 00000000000..0dec3454128 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateInstanceMaintenanceEventConverter.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateInstanceMaintenanceEventConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateInstanceMaintenanceEventConverter.class); + + public static com.oracle.bmc.core.requests.UpdateInstanceMaintenanceEventRequest + interceptRequest( + com.oracle.bmc.core.requests.UpdateInstanceMaintenanceEventRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.core.requests.UpdateInstanceMaintenanceEventRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getInstanceMaintenanceEventId(), + "instanceMaintenanceEventId must not be blank"); + Validate.notNull( + request.getUpdateInstanceMaintenanceEventDetails(), + "updateInstanceMaintenanceEventDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("instanceMaintenanceEvents") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getInstanceMaintenanceEventId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.UpdateInstanceMaintenanceEventResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.UpdateInstanceMaintenanceEventResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses.UpdateInstanceMaintenanceEventResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.core.responses + .UpdateInstanceMaintenanceEventResponse>() { + @Override + public com.oracle.bmc.core.responses + .UpdateInstanceMaintenanceEventResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.core.responses.UpdateInstanceMaintenanceEventResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.core.responses.UpdateInstanceMaintenanceEventResponse + .Builder + builder = + com.oracle.bmc.core.responses + .UpdateInstanceMaintenanceEventResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.core.responses.UpdateInstanceMaintenanceEventResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/AddNetworkSecurityGroupSecurityRulesDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/AddNetworkSecurityGroupSecurityRulesDetails.java index 0fd3ec93215..11eca5563c2 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/AddNetworkSecurityGroupSecurityRulesDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/AddNetworkSecurityGroupSecurityRulesDetails.java @@ -32,13 +32,19 @@ public AddNetworkSecurityGroupSecurityRulesDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The NSG security rules to add. + * An array of security rules to add to the NSG. You can add up to 25 rules in a single + * {@code AddNetworkSecurityGroupSecurityRules} operation. + * Adding more than 25 rules requires multiple operations. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("securityRules") private java.util.List securityRules; /** - * The NSG security rules to add. + * An array of security rules to add to the NSG. You can add up to 25 rules in a single + * {@code AddNetworkSecurityGroupSecurityRules} operation. + * Adding more than 25 rules requires multiple operations. + * * @param securityRules the value to set * @return this builder **/ @@ -81,13 +87,19 @@ public Builder toBuilder() { } /** - * The NSG security rules to add. + * An array of security rules to add to the NSG. You can add up to 25 rules in a single + * {@code AddNetworkSecurityGroupSecurityRules} operation. + * Adding more than 25 rules requires multiple operations. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("securityRules") private final java.util.List securityRules; /** - * The NSG security rules to add. + * An array of security rules to add to the NSG. You can add up to 25 rules in a single + * {@code AddNetworkSecurityGroupSecurityRules} operation. + * Adding more than 25 rules requires multiple operations. + * * @return the value **/ public java.util.List getSecurityRules() { diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/BlockVolumeReplica.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/BlockVolumeReplica.java index 425346ff8b8..d66aaf11d48 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/BlockVolumeReplica.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/BlockVolumeReplica.java @@ -44,7 +44,8 @@ public final class BlockVolumeReplica extends com.oracle.bmc.http.internal.Expli "timeLastSynced", "blockVolumeId", "totalDataTransferredInGBs", - "volumeGroupReplicaId" + "volumeGroupReplicaId", + "kmsKeyId" }) public BlockVolumeReplica( String availabilityDomain, @@ -59,7 +60,8 @@ public BlockVolumeReplica( java.util.Date timeLastSynced, String blockVolumeId, Long totalDataTransferredInGBs, - String volumeGroupReplicaId) { + String volumeGroupReplicaId, + String kmsKeyId) { super(); this.availabilityDomain = availabilityDomain; this.compartmentId = compartmentId; @@ -74,6 +76,7 @@ public BlockVolumeReplica( this.blockVolumeId = blockVolumeId; this.totalDataTransferredInGBs = totalDataTransferredInGBs; this.volumeGroupReplicaId = volumeGroupReplicaId; + this.kmsKeyId = kmsKeyId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -327,6 +330,28 @@ public Builder volumeGroupReplicaId(String volumeGroupReplicaId) { this.__explicitlySet__.add("volumeGroupReplicaId"); return this; } + /** + * The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -346,7 +371,8 @@ public BlockVolumeReplica build() { this.timeLastSynced, this.blockVolumeId, this.totalDataTransferredInGBs, - this.volumeGroupReplicaId); + this.volumeGroupReplicaId, + this.kmsKeyId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -394,6 +420,9 @@ public Builder copy(BlockVolumeReplica model) { if (model.wasPropertyExplicitlySet("volumeGroupReplicaId")) { this.volumeGroupReplicaId(model.getVolumeGroupReplicaId()); } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } return this; } } @@ -683,6 +712,26 @@ public String getVolumeGroupReplicaId() { return volumeGroupReplicaId; } + /** + * The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + @Override public String toString() { return this.toString(true); @@ -711,6 +760,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", totalDataTransferredInGBs=") .append(String.valueOf(this.totalDataTransferredInGBs)); sb.append(", volumeGroupReplicaId=").append(String.valueOf(this.volumeGroupReplicaId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); sb.append(")"); return sb.toString(); } @@ -739,6 +789,7 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.totalDataTransferredInGBs, other.totalDataTransferredInGBs) && java.util.Objects.equals(this.volumeGroupReplicaId, other.volumeGroupReplicaId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) && super.equals(other); } @@ -779,6 +830,7 @@ public int hashCode() { + (this.volumeGroupReplicaId == null ? 43 : this.volumeGroupReplicaId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/BlockVolumeReplicaDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/BlockVolumeReplicaDetails.java index 1cd3fc041f0..bd59d29eb46 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/BlockVolumeReplicaDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/BlockVolumeReplicaDetails.java @@ -22,11 +22,13 @@ public final class BlockVolumeReplicaDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"displayName", "availabilityDomain"}) - public BlockVolumeReplicaDetails(String displayName, String availabilityDomain) { + @java.beans.ConstructorProperties({"displayName", "availabilityDomain", "xrrKmsKeyId"}) + public BlockVolumeReplicaDetails( + String displayName, String availabilityDomain, String xrrKmsKeyId) { super(); this.displayName = displayName; this.availabilityDomain = availabilityDomain; + this.xrrKmsKeyId = xrrKmsKeyId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -73,13 +75,38 @@ public Builder availabilityDomain(String availabilityDomain) { this.__explicitlySet__.add("availabilityDomain"); return this; } + /** + * The OCID of the Vault service key which is the master encryption key for the cross region block volume replicas, which will be used in the destination region to encrypt the block volume replica's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("xrrKmsKeyId") + private String xrrKmsKeyId; + + /** + * The OCID of the Vault service key which is the master encryption key for the cross region block volume replicas, which will be used in the destination region to encrypt the block volume replica's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @param xrrKmsKeyId the value to set + * @return this builder + **/ + public Builder xrrKmsKeyId(String xrrKmsKeyId) { + this.xrrKmsKeyId = xrrKmsKeyId; + this.__explicitlySet__.add("xrrKmsKeyId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public BlockVolumeReplicaDetails build() { BlockVolumeReplicaDetails model = - new BlockVolumeReplicaDetails(this.displayName, this.availabilityDomain); + new BlockVolumeReplicaDetails( + this.displayName, this.availabilityDomain, this.xrrKmsKeyId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -94,6 +121,9 @@ public Builder copy(BlockVolumeReplicaDetails model) { if (model.wasPropertyExplicitlySet("availabilityDomain")) { this.availabilityDomain(model.getAvailabilityDomain()); } + if (model.wasPropertyExplicitlySet("xrrKmsKeyId")) { + this.xrrKmsKeyId(model.getXrrKmsKeyId()); + } return this; } } @@ -147,6 +177,28 @@ public String getAvailabilityDomain() { return availabilityDomain; } + /** + * The OCID of the Vault service key which is the master encryption key for the cross region block volume replicas, which will be used in the destination region to encrypt the block volume replica's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("xrrKmsKeyId") + private final String xrrKmsKeyId; + + /** + * The OCID of the Vault service key which is the master encryption key for the cross region block volume replicas, which will be used in the destination region to encrypt the block volume replica's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @return the value + **/ + public String getXrrKmsKeyId() { + return xrrKmsKeyId; + } + @Override public String toString() { return this.toString(true); @@ -163,6 +215,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("displayName=").append(String.valueOf(this.displayName)); sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", xrrKmsKeyId=").append(String.valueOf(this.xrrKmsKeyId)); sb.append(")"); return sb.toString(); } @@ -179,6 +232,7 @@ public boolean equals(Object o) { BlockVolumeReplicaDetails other = (BlockVolumeReplicaDetails) o; return java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.xrrKmsKeyId, other.xrrKmsKeyId) && super.equals(other); } @@ -192,6 +246,7 @@ public int hashCode() { + (this.availabilityDomain == null ? 43 : this.availabilityDomain.hashCode()); + result = (result * PRIME) + (this.xrrKmsKeyId == null ? 43 : this.xrrKmsKeyId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/BlockVolumeReplicaInfo.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/BlockVolumeReplicaInfo.java index 0edff2ffe6c..da3a6a31911 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/BlockVolumeReplicaInfo.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/BlockVolumeReplicaInfo.java @@ -22,13 +22,22 @@ public final class BlockVolumeReplicaInfo extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"displayName", "blockVolumeReplicaId", "availabilityDomain"}) + @java.beans.ConstructorProperties({ + "displayName", + "blockVolumeReplicaId", + "availabilityDomain", + "kmsKeyId" + }) public BlockVolumeReplicaInfo( - String displayName, String blockVolumeReplicaId, String availabilityDomain) { + String displayName, + String blockVolumeReplicaId, + String availabilityDomain, + String kmsKeyId) { super(); this.displayName = displayName; this.blockVolumeReplicaId = blockVolumeReplicaId; this.availabilityDomain = availabilityDomain; + this.kmsKeyId = kmsKeyId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -91,6 +100,28 @@ public Builder availabilityDomain(String availabilityDomain) { this.__explicitlySet__.add("availabilityDomain"); return this; } + /** + * The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -98,7 +129,10 @@ public Builder availabilityDomain(String availabilityDomain) { public BlockVolumeReplicaInfo build() { BlockVolumeReplicaInfo model = new BlockVolumeReplicaInfo( - this.displayName, this.blockVolumeReplicaId, this.availabilityDomain); + this.displayName, + this.blockVolumeReplicaId, + this.availabilityDomain, + this.kmsKeyId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -116,6 +150,9 @@ public Builder copy(BlockVolumeReplicaInfo model) { if (model.wasPropertyExplicitlySet("availabilityDomain")) { this.availabilityDomain(model.getAvailabilityDomain()); } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } return this; } } @@ -183,6 +220,26 @@ public String getAvailabilityDomain() { return availabilityDomain; } + /** + * The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + @Override public String toString() { return this.toString(true); @@ -200,6 +257,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("displayName=").append(String.valueOf(this.displayName)); sb.append(", blockVolumeReplicaId=").append(String.valueOf(this.blockVolumeReplicaId)); sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); sb.append(")"); return sb.toString(); } @@ -217,6 +275,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.blockVolumeReplicaId, other.blockVolumeReplicaId) && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) && super.equals(other); } @@ -235,6 +294,7 @@ public int hashCode() { + (this.availabilityDomain == null ? 43 : this.availabilityDomain.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/BootVolumeReplica.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/BootVolumeReplica.java index b61508a9a92..8d4ebd26dea 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/BootVolumeReplica.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/BootVolumeReplica.java @@ -45,7 +45,8 @@ public final class BootVolumeReplica extends com.oracle.bmc.http.internal.Explic "bootVolumeId", "imageId", "totalDataTransferredInGBs", - "volumeGroupReplicaId" + "volumeGroupReplicaId", + "kmsKeyId" }) public BootVolumeReplica( String availabilityDomain, @@ -61,7 +62,8 @@ public BootVolumeReplica( String bootVolumeId, String imageId, Long totalDataTransferredInGBs, - String volumeGroupReplicaId) { + String volumeGroupReplicaId, + String kmsKeyId) { super(); this.availabilityDomain = availabilityDomain; this.compartmentId = compartmentId; @@ -77,6 +79,7 @@ public BootVolumeReplica( this.imageId = imageId; this.totalDataTransferredInGBs = totalDataTransferredInGBs; this.volumeGroupReplicaId = volumeGroupReplicaId; + this.kmsKeyId = kmsKeyId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -348,6 +351,28 @@ public Builder volumeGroupReplicaId(String volumeGroupReplicaId) { this.__explicitlySet__.add("volumeGroupReplicaId"); return this; } + /** + * The OCID of the Vault service key to assign as the master encryption key for the boot volume replica, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The OCID of the Vault service key to assign as the master encryption key for the boot volume replica, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -368,7 +393,8 @@ public BootVolumeReplica build() { this.bootVolumeId, this.imageId, this.totalDataTransferredInGBs, - this.volumeGroupReplicaId); + this.volumeGroupReplicaId, + this.kmsKeyId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -419,6 +445,9 @@ public Builder copy(BootVolumeReplica model) { if (model.wasPropertyExplicitlySet("volumeGroupReplicaId")) { this.volumeGroupReplicaId(model.getVolumeGroupReplicaId()); } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } return this; } } @@ -724,6 +753,26 @@ public String getVolumeGroupReplicaId() { return volumeGroupReplicaId; } + /** + * The OCID of the Vault service key to assign as the master encryption key for the boot volume replica, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The OCID of the Vault service key to assign as the master encryption key for the boot volume replica, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + @Override public String toString() { return this.toString(true); @@ -753,6 +802,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", totalDataTransferredInGBs=") .append(String.valueOf(this.totalDataTransferredInGBs)); sb.append(", volumeGroupReplicaId=").append(String.valueOf(this.volumeGroupReplicaId)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); sb.append(")"); return sb.toString(); } @@ -782,6 +832,7 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.totalDataTransferredInGBs, other.totalDataTransferredInGBs) && java.util.Objects.equals(this.volumeGroupReplicaId, other.volumeGroupReplicaId) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) && super.equals(other); } @@ -821,6 +872,7 @@ public int hashCode() { + (this.volumeGroupReplicaId == null ? 43 : this.volumeGroupReplicaId.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/BootVolumeReplicaDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/BootVolumeReplicaDetails.java index 7618de5f820..0ca015cdd20 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/BootVolumeReplicaDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/BootVolumeReplicaDetails.java @@ -22,11 +22,13 @@ public final class BootVolumeReplicaDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"displayName", "availabilityDomain"}) - public BootVolumeReplicaDetails(String displayName, String availabilityDomain) { + @java.beans.ConstructorProperties({"displayName", "availabilityDomain", "xrrKmsKeyId"}) + public BootVolumeReplicaDetails( + String displayName, String availabilityDomain, String xrrKmsKeyId) { super(); this.displayName = displayName; this.availabilityDomain = availabilityDomain; + this.xrrKmsKeyId = xrrKmsKeyId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -73,13 +75,38 @@ public Builder availabilityDomain(String availabilityDomain) { this.__explicitlySet__.add("availabilityDomain"); return this; } + /** + * The OCID of the Vault service key which is the master encryption key for the cross region boot volume replicas, which will be used in the destination region to encrypt the boot volume replica's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("xrrKmsKeyId") + private String xrrKmsKeyId; + + /** + * The OCID of the Vault service key which is the master encryption key for the cross region boot volume replicas, which will be used in the destination region to encrypt the boot volume replica's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @param xrrKmsKeyId the value to set + * @return this builder + **/ + public Builder xrrKmsKeyId(String xrrKmsKeyId) { + this.xrrKmsKeyId = xrrKmsKeyId; + this.__explicitlySet__.add("xrrKmsKeyId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public BootVolumeReplicaDetails build() { BootVolumeReplicaDetails model = - new BootVolumeReplicaDetails(this.displayName, this.availabilityDomain); + new BootVolumeReplicaDetails( + this.displayName, this.availabilityDomain, this.xrrKmsKeyId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -94,6 +121,9 @@ public Builder copy(BootVolumeReplicaDetails model) { if (model.wasPropertyExplicitlySet("availabilityDomain")) { this.availabilityDomain(model.getAvailabilityDomain()); } + if (model.wasPropertyExplicitlySet("xrrKmsKeyId")) { + this.xrrKmsKeyId(model.getXrrKmsKeyId()); + } return this; } } @@ -147,6 +177,28 @@ public String getAvailabilityDomain() { return availabilityDomain; } + /** + * The OCID of the Vault service key which is the master encryption key for the cross region boot volume replicas, which will be used in the destination region to encrypt the boot volume replica's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("xrrKmsKeyId") + private final String xrrKmsKeyId; + + /** + * The OCID of the Vault service key which is the master encryption key for the cross region boot volume replicas, which will be used in the destination region to encrypt the boot volume replica's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @return the value + **/ + public String getXrrKmsKeyId() { + return xrrKmsKeyId; + } + @Override public String toString() { return this.toString(true); @@ -163,6 +215,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("displayName=").append(String.valueOf(this.displayName)); sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", xrrKmsKeyId=").append(String.valueOf(this.xrrKmsKeyId)); sb.append(")"); return sb.toString(); } @@ -179,6 +232,7 @@ public boolean equals(Object o) { BootVolumeReplicaDetails other = (BootVolumeReplicaDetails) o; return java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.xrrKmsKeyId, other.xrrKmsKeyId) && super.equals(other); } @@ -192,6 +246,7 @@ public int hashCode() { + (this.availabilityDomain == null ? 43 : this.availabilityDomain.hashCode()); + result = (result * PRIME) + (this.xrrKmsKeyId == null ? 43 : this.xrrKmsKeyId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/BootVolumeReplicaInfo.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/BootVolumeReplicaInfo.java index 90b93192820..641ba6b0d8c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/BootVolumeReplicaInfo.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/BootVolumeReplicaInfo.java @@ -22,13 +22,22 @@ public final class BootVolumeReplicaInfo extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"displayName", "bootVolumeReplicaId", "availabilityDomain"}) + @java.beans.ConstructorProperties({ + "displayName", + "bootVolumeReplicaId", + "availabilityDomain", + "kmsKeyId" + }) public BootVolumeReplicaInfo( - String displayName, String bootVolumeReplicaId, String availabilityDomain) { + String displayName, + String bootVolumeReplicaId, + String availabilityDomain, + String kmsKeyId) { super(); this.displayName = displayName; this.bootVolumeReplicaId = bootVolumeReplicaId; this.availabilityDomain = availabilityDomain; + this.kmsKeyId = kmsKeyId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -91,6 +100,28 @@ public Builder availabilityDomain(String availabilityDomain) { this.__explicitlySet__.add("availabilityDomain"); return this; } + /** + * The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -98,7 +129,10 @@ public Builder availabilityDomain(String availabilityDomain) { public BootVolumeReplicaInfo build() { BootVolumeReplicaInfo model = new BootVolumeReplicaInfo( - this.displayName, this.bootVolumeReplicaId, this.availabilityDomain); + this.displayName, + this.bootVolumeReplicaId, + this.availabilityDomain, + this.kmsKeyId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -116,6 +150,9 @@ public Builder copy(BootVolumeReplicaInfo model) { if (model.wasPropertyExplicitlySet("availabilityDomain")) { this.availabilityDomain(model.getAvailabilityDomain()); } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } return this; } } @@ -183,6 +220,26 @@ public String getAvailabilityDomain() { return availabilityDomain; } + /** + * The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + @Override public String toString() { return this.toString(true); @@ -200,6 +257,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("displayName=").append(String.valueOf(this.displayName)); sb.append(", bootVolumeReplicaId=").append(String.valueOf(this.bootVolumeReplicaId)); sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); sb.append(")"); return sb.toString(); } @@ -217,6 +275,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.bootVolumeReplicaId, other.bootVolumeReplicaId) && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) && super.equals(other); } @@ -235,6 +294,7 @@ public int hashCode() { + (this.availabilityDomain == null ? 43 : this.availabilityDomain.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/BootVolumeSourceDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/BootVolumeSourceDetails.java index a12837c6293..72933558e89 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/BootVolumeSourceDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/BootVolumeSourceDetails.java @@ -33,6 +33,10 @@ @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = BootVolumeSourceFromBootVolumeReplicaDetails.class, name = "bootVolumeReplica" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = BootVolumeSourceFromBootVolumeBackupDeltaDetails.class, + name = "bootVolumeBackupDelta" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/BootVolumeSourceFromBootVolumeBackupDeltaDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/BootVolumeSourceFromBootVolumeBackupDeltaDetails.java new file mode 100644 index 00000000000..f90527fa482 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/BootVolumeSourceFromBootVolumeBackupDeltaDetails.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.model; + +/** + * Specifies the boot volume backups (first & second) and block size in bytes. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = BootVolumeSourceFromBootVolumeBackupDeltaDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class BootVolumeSourceFromBootVolumeBackupDeltaDetails + extends BootVolumeSourceDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the first boot volume backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("firstBackupId") + private String firstBackupId; + + /** + * The OCID of the first boot volume backup. + * @param firstBackupId the value to set + * @return this builder + **/ + public Builder firstBackupId(String firstBackupId) { + this.firstBackupId = firstBackupId; + this.__explicitlySet__.add("firstBackupId"); + return this; + } + /** + * The OCID of the second boot volume backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secondBackupId") + private String secondBackupId; + + /** + * The OCID of the second boot volume backup. + * @param secondBackupId the value to set + * @return this builder + **/ + public Builder secondBackupId(String secondBackupId) { + this.secondBackupId = secondBackupId; + this.__explicitlySet__.add("secondBackupId"); + return this; + } + /** + * Block size in bytes to be considered while performing volume restore. The value must be a power of 2; ranging from 4KB (4096 bytes) to 1MB (1048576 bytes). If omitted, defaults to 4,096 bytes (4 KiB). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("changeBlockSizeInBytes") + private Long changeBlockSizeInBytes; + + /** + * Block size in bytes to be considered while performing volume restore. The value must be a power of 2; ranging from 4KB (4096 bytes) to 1MB (1048576 bytes). If omitted, defaults to 4,096 bytes (4 KiB). + * + * @param changeBlockSizeInBytes the value to set + * @return this builder + **/ + public Builder changeBlockSizeInBytes(Long changeBlockSizeInBytes) { + this.changeBlockSizeInBytes = changeBlockSizeInBytes; + this.__explicitlySet__.add("changeBlockSizeInBytes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BootVolumeSourceFromBootVolumeBackupDeltaDetails build() { + BootVolumeSourceFromBootVolumeBackupDeltaDetails model = + new BootVolumeSourceFromBootVolumeBackupDeltaDetails( + this.firstBackupId, this.secondBackupId, this.changeBlockSizeInBytes); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BootVolumeSourceFromBootVolumeBackupDeltaDetails model) { + if (model.wasPropertyExplicitlySet("firstBackupId")) { + this.firstBackupId(model.getFirstBackupId()); + } + if (model.wasPropertyExplicitlySet("secondBackupId")) { + this.secondBackupId(model.getSecondBackupId()); + } + if (model.wasPropertyExplicitlySet("changeBlockSizeInBytes")) { + this.changeBlockSizeInBytes(model.getChangeBlockSizeInBytes()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public BootVolumeSourceFromBootVolumeBackupDeltaDetails( + String firstBackupId, String secondBackupId, Long changeBlockSizeInBytes) { + super(); + this.firstBackupId = firstBackupId; + this.secondBackupId = secondBackupId; + this.changeBlockSizeInBytes = changeBlockSizeInBytes; + } + + /** + * The OCID of the first boot volume backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("firstBackupId") + private final String firstBackupId; + + /** + * The OCID of the first boot volume backup. + * @return the value + **/ + public String getFirstBackupId() { + return firstBackupId; + } + + /** + * The OCID of the second boot volume backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secondBackupId") + private final String secondBackupId; + + /** + * The OCID of the second boot volume backup. + * @return the value + **/ + public String getSecondBackupId() { + return secondBackupId; + } + + /** + * Block size in bytes to be considered while performing volume restore. The value must be a power of 2; ranging from 4KB (4096 bytes) to 1MB (1048576 bytes). If omitted, defaults to 4,096 bytes (4 KiB). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("changeBlockSizeInBytes") + private final Long changeBlockSizeInBytes; + + /** + * Block size in bytes to be considered while performing volume restore. The value must be a power of 2; ranging from 4KB (4096 bytes) to 1MB (1048576 bytes). If omitted, defaults to 4,096 bytes (4 KiB). + * + * @return the value + **/ + public Long getChangeBlockSizeInBytes() { + return changeBlockSizeInBytes; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BootVolumeSourceFromBootVolumeBackupDeltaDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", firstBackupId=").append(String.valueOf(this.firstBackupId)); + sb.append(", secondBackupId=").append(String.valueOf(this.secondBackupId)); + sb.append(", changeBlockSizeInBytes=").append(String.valueOf(this.changeBlockSizeInBytes)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BootVolumeSourceFromBootVolumeBackupDeltaDetails)) { + return false; + } + + BootVolumeSourceFromBootVolumeBackupDeltaDetails other = + (BootVolumeSourceFromBootVolumeBackupDeltaDetails) o; + return java.util.Objects.equals(this.firstBackupId, other.firstBackupId) + && java.util.Objects.equals(this.secondBackupId, other.secondBackupId) + && java.util.Objects.equals( + this.changeBlockSizeInBytes, other.changeBlockSizeInBytes) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.firstBackupId == null ? 43 : this.firstBackupId.hashCode()); + result = + (result * PRIME) + + (this.secondBackupId == null ? 43 : this.secondBackupId.hashCode()); + result = + (result * PRIME) + + (this.changeBlockSizeInBytes == null + ? 43 + : this.changeBlockSizeInBytes.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateBootVolumeDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateBootVolumeDetails.java index a8f35f44556..2d70479c135 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateBootVolumeDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateBootVolumeDetails.java @@ -36,7 +36,8 @@ public final class CreateBootVolumeDetails "sourceDetails", "isAutoTuneEnabled", "bootVolumeReplicas", - "autotunePolicies" + "autotunePolicies", + "xrcKmsKeyId" }) public CreateBootVolumeDetails( String availabilityDomain, @@ -52,7 +53,8 @@ public CreateBootVolumeDetails( BootVolumeSourceDetails sourceDetails, Boolean isAutoTuneEnabled, java.util.List bootVolumeReplicas, - java.util.List autotunePolicies) { + java.util.List autotunePolicies, + String xrcKmsKeyId) { super(); this.availabilityDomain = availabilityDomain; this.backupPolicyId = backupPolicyId; @@ -68,6 +70,7 @@ public CreateBootVolumeDetails( this.isAutoTuneEnabled = isAutoTuneEnabled; this.bootVolumeReplicas = bootVolumeReplicas; this.autotunePolicies = autotunePolicies; + this.xrcKmsKeyId = xrcKmsKeyId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -359,6 +362,30 @@ public Builder autotunePolicies(java.util.List autotunePolicies) this.__explicitlySet__.add("autotunePolicies"); return this; } + /** + * The OCID of the Vault service key which is the master encryption key for the boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("xrcKmsKeyId") + private String xrcKmsKeyId; + + /** + * The OCID of the Vault service key which is the master encryption key for the boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @param xrcKmsKeyId the value to set + * @return this builder + **/ + public Builder xrcKmsKeyId(String xrcKmsKeyId) { + this.xrcKmsKeyId = xrcKmsKeyId; + this.__explicitlySet__.add("xrcKmsKeyId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -379,7 +406,8 @@ public CreateBootVolumeDetails build() { this.sourceDetails, this.isAutoTuneEnabled, this.bootVolumeReplicas, - this.autotunePolicies); + this.autotunePolicies, + this.xrcKmsKeyId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -430,6 +458,9 @@ public Builder copy(CreateBootVolumeDetails model) { if (model.wasPropertyExplicitlySet("autotunePolicies")) { this.autotunePolicies(model.getAutotunePolicies()); } + if (model.wasPropertyExplicitlySet("xrcKmsKeyId")) { + this.xrcKmsKeyId(model.getXrcKmsKeyId()); + } return this; } } @@ -702,6 +733,28 @@ public java.util.List getAutotunePolicies() { return autotunePolicies; } + /** + * The OCID of the Vault service key which is the master encryption key for the boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("xrcKmsKeyId") + private final String xrcKmsKeyId; + + /** + * The OCID of the Vault service key which is the master encryption key for the boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @return the value + **/ + public String getXrcKmsKeyId() { + return xrcKmsKeyId; + } + @Override public String toString() { return this.toString(true); @@ -731,6 +784,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isAutoTuneEnabled=").append(String.valueOf(this.isAutoTuneEnabled)); sb.append(", bootVolumeReplicas=").append(String.valueOf(this.bootVolumeReplicas)); sb.append(", autotunePolicies=").append(String.valueOf(this.autotunePolicies)); + sb.append(", xrcKmsKeyId=").append(String.valueOf(this.xrcKmsKeyId)); sb.append(")"); return sb.toString(); } @@ -760,6 +814,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.isAutoTuneEnabled, other.isAutoTuneEnabled) && java.util.Objects.equals(this.bootVolumeReplicas, other.bootVolumeReplicas) && java.util.Objects.equals(this.autotunePolicies, other.autotunePolicies) + && java.util.Objects.equals(this.xrcKmsKeyId, other.xrcKmsKeyId) && super.equals(other); } @@ -803,6 +858,7 @@ public int hashCode() { result = (result * PRIME) + (this.autotunePolicies == null ? 43 : this.autotunePolicies.hashCode()); + result = (result * PRIME) + (this.xrcKmsKeyId == null ? 43 : this.xrcKmsKeyId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateServiceGatewayDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateServiceGatewayDetails.java index 7b439e6fd1b..7ce297c8780 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateServiceGatewayDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateServiceGatewayDetails.java @@ -52,14 +52,14 @@ public CreateServiceGatewayDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The [OCID] (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment to contain the service gateway. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment to contain the service gateway. * **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; /** - * The [OCID] (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment to contain the service gateway. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment to contain the service gateway. * * @param compartmentId the value to set * @return this builder @@ -281,14 +281,14 @@ public Builder toBuilder() { } /** - * The [OCID] (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment to contain the service gateway. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment to contain the service gateway. * **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private final String compartmentId; /** - * The [OCID] (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment to contain the service gateway. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment to contain the service gateway. * * @return the value **/ diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVcnDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVcnDetails.java index a655f7da4f5..d3b01e843e4 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVcnDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVcnDetails.java @@ -30,6 +30,7 @@ public final class CreateVcnDetails extends com.oracle.bmc.http.internal.Explici "displayName", "dnsLabel", "freeformTags", + "securityAttributes", "isIpv6Enabled" }) public CreateVcnDetails( @@ -43,6 +44,7 @@ public CreateVcnDetails( String displayName, String dnsLabel, java.util.Map freeformTags, + java.util.Map> securityAttributes, Boolean isIpv6Enabled) { super(); this.cidrBlock = cidrBlock; @@ -55,6 +57,7 @@ public CreateVcnDetails( this.displayName = displayName; this.dnsLabel = dnsLabel; this.freeformTags = freeformTags; + this.securityAttributes = securityAttributes; this.isIpv6Enabled = isIpv6Enabled; } @@ -305,6 +308,29 @@ public Builder freeformTags(java.util.Map freeformTags) { this.__explicitlySet__.add("freeformTags"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * Whether IPv6 is enabled for the VCN. Default is {@code false}. * If enabled, Oracle will assign the VCN a IPv6 /56 CIDR block. @@ -350,6 +376,7 @@ public CreateVcnDetails build() { this.displayName, this.dnsLabel, this.freeformTags, + this.securityAttributes, this.isIpv6Enabled); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -389,6 +416,9 @@ public Builder copy(CreateVcnDetails model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("isIpv6Enabled")) { this.isIpv6Enabled(model.getIsIpv6Enabled()); } @@ -631,6 +661,26 @@ public java.util.Map getFreeformTags() { return freeformTags; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * Whether IPv6 is enabled for the VCN. Default is {@code false}. * If enabled, Oracle will assign the VCN a IPv6 /56 CIDR block. @@ -682,6 +732,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", dnsLabel=").append(String.valueOf(this.dnsLabel)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", isIpv6Enabled=").append(String.valueOf(this.isIpv6Enabled)); sb.append(")"); return sb.toString(); @@ -708,6 +759,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.dnsLabel, other.dnsLabel) && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.isIpv6Enabled, other.isIpv6Enabled) && super.equals(other); } @@ -740,6 +792,11 @@ public int hashCode() { result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.dnsLabel == null ? 43 : this.dnsLabel.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.isIpv6Enabled == null ? 43 : this.isIpv6Enabled.hashCode()); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVnicDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVnicDetails.java index 8108768f0f0..eff428e4fdc 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVnicDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVnicDetails.java @@ -32,6 +32,7 @@ public final class CreateVnicDetails extends com.oracle.bmc.http.internal.Explic "definedTags", "displayName", "freeformTags", + "securityAttributes", "hostnameLabel", "ipv6AddressIpv6SubnetCidrPairDetails", "nsgIds", @@ -47,6 +48,7 @@ public CreateVnicDetails( java.util.Map> definedTags, String displayName, java.util.Map freeformTags, + java.util.Map> securityAttributes, String hostnameLabel, java.util.List ipv6AddressIpv6SubnetCidrPairDetails, @@ -62,6 +64,7 @@ public CreateVnicDetails( this.definedTags = definedTags; this.displayName = displayName; this.freeformTags = freeformTags; + this.securityAttributes = securityAttributes; this.hostnameLabel = hostnameLabel; this.ipv6AddressIpv6SubnetCidrPairDetails = ipv6AddressIpv6SubnetCidrPairDetails; this.nsgIds = nsgIds; @@ -256,6 +259,29 @@ public Builder freeformTags(java.util.Map freeformTags) { this.__explicitlySet__.add("freeformTags"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname * portion of the primary private IP's fully qualified domain name (FQDN) @@ -532,6 +558,7 @@ public CreateVnicDetails build() { this.definedTags, this.displayName, this.freeformTags, + this.securityAttributes, this.hostnameLabel, this.ipv6AddressIpv6SubnetCidrPairDetails, this.nsgIds, @@ -565,6 +592,9 @@ public Builder copy(CreateVnicDetails model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("hostnameLabel")) { this.hostnameLabel(model.getHostnameLabel()); } @@ -772,6 +802,26 @@ public java.util.Map getFreeformTags() { return freeformTags; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname * portion of the primary private IP's fully qualified domain name (FQDN) @@ -1040,6 +1090,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", hostnameLabel=").append(String.valueOf(this.hostnameLabel)); sb.append(", ipv6AddressIpv6SubnetCidrPairDetails=") .append(String.valueOf(this.ipv6AddressIpv6SubnetCidrPairDetails)); @@ -1069,6 +1120,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.hostnameLabel, other.hostnameLabel) && java.util.Objects.equals( this.ipv6AddressIpv6SubnetCidrPairDetails, @@ -1097,6 +1149,11 @@ public int hashCode() { result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.hostnameLabel == null ? 43 : this.hostnameLabel.hashCode()); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeBackupPolicyAssignmentDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeBackupPolicyAssignmentDetails.java index 38079269334..f5afb3d63af 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeBackupPolicyAssignmentDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeBackupPolicyAssignmentDetails.java @@ -22,11 +22,13 @@ public final class CreateVolumeBackupPolicyAssignmentDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"assetId", "policyId"}) - public CreateVolumeBackupPolicyAssignmentDetails(String assetId, String policyId) { + @java.beans.ConstructorProperties({"assetId", "policyId", "xrcKmsKeyId"}) + public CreateVolumeBackupPolicyAssignmentDetails( + String assetId, String policyId, String xrcKmsKeyId) { super(); this.assetId = assetId; this.policyId = policyId; + this.xrcKmsKeyId = xrcKmsKeyId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -63,13 +65,38 @@ public Builder policyId(String policyId) { this.__explicitlySet__.add("policyId"); return this; } + /** + * The OCID of the Vault service key which is the master encryption key for the block / boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("xrcKmsKeyId") + private String xrcKmsKeyId; + + /** + * The OCID of the Vault service key which is the master encryption key for the block / boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @param xrcKmsKeyId the value to set + * @return this builder + **/ + public Builder xrcKmsKeyId(String xrcKmsKeyId) { + this.xrcKmsKeyId = xrcKmsKeyId; + this.__explicitlySet__.add("xrcKmsKeyId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public CreateVolumeBackupPolicyAssignmentDetails build() { CreateVolumeBackupPolicyAssignmentDetails model = - new CreateVolumeBackupPolicyAssignmentDetails(this.assetId, this.policyId); + new CreateVolumeBackupPolicyAssignmentDetails( + this.assetId, this.policyId, this.xrcKmsKeyId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -84,6 +111,9 @@ public Builder copy(CreateVolumeBackupPolicyAssignmentDetails model) { if (model.wasPropertyExplicitlySet("policyId")) { this.policyId(model.getPolicyId()); } + if (model.wasPropertyExplicitlySet("xrcKmsKeyId")) { + this.xrcKmsKeyId(model.getXrcKmsKeyId()); + } return this; } } @@ -127,6 +157,28 @@ public String getPolicyId() { return policyId; } + /** + * The OCID of the Vault service key which is the master encryption key for the block / boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("xrcKmsKeyId") + private final String xrcKmsKeyId; + + /** + * The OCID of the Vault service key which is the master encryption key for the block / boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @return the value + **/ + public String getXrcKmsKeyId() { + return xrcKmsKeyId; + } + @Override public String toString() { return this.toString(true); @@ -143,6 +195,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("assetId=").append(String.valueOf(this.assetId)); sb.append(", policyId=").append(String.valueOf(this.policyId)); + sb.append(", xrcKmsKeyId=").append(String.valueOf(this.xrcKmsKeyId)); sb.append(")"); return sb.toString(); } @@ -160,6 +213,7 @@ public boolean equals(Object o) { (CreateVolumeBackupPolicyAssignmentDetails) o; return java.util.Objects.equals(this.assetId, other.assetId) && java.util.Objects.equals(this.policyId, other.policyId) + && java.util.Objects.equals(this.xrcKmsKeyId, other.xrcKmsKeyId) && super.equals(other); } @@ -169,6 +223,7 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.assetId == null ? 43 : this.assetId.hashCode()); result = (result * PRIME) + (this.policyId == null ? 43 : this.policyId.hashCode()); + result = (result * PRIME) + (this.xrcKmsKeyId == null ? 43 : this.xrcKmsKeyId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeDetails.java index d6cfeb52b2f..3edf31bcd43 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeDetails.java @@ -39,7 +39,8 @@ public final class CreateVolumeDetails extends com.oracle.bmc.http.internal.Expl "volumeBackupId", "isAutoTuneEnabled", "blockVolumeReplicas", - "autotunePolicies" + "autotunePolicies", + "xrcKmsKeyId" }) public CreateVolumeDetails( String availabilityDomain, @@ -57,7 +58,8 @@ public CreateVolumeDetails( String volumeBackupId, Boolean isAutoTuneEnabled, java.util.List blockVolumeReplicas, - java.util.List autotunePolicies) { + java.util.List autotunePolicies, + String xrcKmsKeyId) { super(); this.availabilityDomain = availabilityDomain; this.backupPolicyId = backupPolicyId; @@ -75,6 +77,7 @@ public CreateVolumeDetails( this.isAutoTuneEnabled = isAutoTuneEnabled; this.blockVolumeReplicas = blockVolumeReplicas; this.autotunePolicies = autotunePolicies; + this.xrcKmsKeyId = xrcKmsKeyId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -412,6 +415,30 @@ public Builder autotunePolicies(java.util.List autotunePolicies) this.__explicitlySet__.add("autotunePolicies"); return this; } + /** + * The OCID of the Vault service key which is the master encryption key for the block volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("xrcKmsKeyId") + private String xrcKmsKeyId; + + /** + * The OCID of the Vault service key which is the master encryption key for the block volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @param xrcKmsKeyId the value to set + * @return this builder + **/ + public Builder xrcKmsKeyId(String xrcKmsKeyId) { + this.xrcKmsKeyId = xrcKmsKeyId; + this.__explicitlySet__.add("xrcKmsKeyId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -434,7 +461,8 @@ public CreateVolumeDetails build() { this.volumeBackupId, this.isAutoTuneEnabled, this.blockVolumeReplicas, - this.autotunePolicies); + this.autotunePolicies, + this.xrcKmsKeyId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -491,6 +519,9 @@ public Builder copy(CreateVolumeDetails model) { if (model.wasPropertyExplicitlySet("autotunePolicies")) { this.autotunePolicies(model.getAutotunePolicies()); } + if (model.wasPropertyExplicitlySet("xrcKmsKeyId")) { + this.xrcKmsKeyId(model.getXrcKmsKeyId()); + } return this; } } @@ -805,6 +836,28 @@ public java.util.List getAutotunePolicies() { return autotunePolicies; } + /** + * The OCID of the Vault service key which is the master encryption key for the block volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("xrcKmsKeyId") + private final String xrcKmsKeyId; + + /** + * The OCID of the Vault service key which is the master encryption key for the block volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @return the value + **/ + public String getXrcKmsKeyId() { + return xrcKmsKeyId; + } + @Override public String toString() { return this.toString(true); @@ -836,6 +889,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isAutoTuneEnabled=").append(String.valueOf(this.isAutoTuneEnabled)); sb.append(", blockVolumeReplicas=").append(String.valueOf(this.blockVolumeReplicas)); sb.append(", autotunePolicies=").append(String.valueOf(this.autotunePolicies)); + sb.append(", xrcKmsKeyId=").append(String.valueOf(this.xrcKmsKeyId)); sb.append(")"); return sb.toString(); } @@ -867,6 +921,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.isAutoTuneEnabled, other.isAutoTuneEnabled) && java.util.Objects.equals(this.blockVolumeReplicas, other.blockVolumeReplicas) && java.util.Objects.equals(this.autotunePolicies, other.autotunePolicies) + && java.util.Objects.equals(this.xrcKmsKeyId, other.xrcKmsKeyId) && super.equals(other); } @@ -914,6 +969,7 @@ public int hashCode() { result = (result * PRIME) + (this.autotunePolicies == null ? 43 : this.autotunePolicies.hashCode()); + result = (result * PRIME) + (this.xrcKmsKeyId == null ? 43 : this.xrcKmsKeyId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeGroupDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeGroupDetails.java index 0c14e494a84..d9fe104554b 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeGroupDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeGroupDetails.java @@ -31,7 +31,8 @@ public final class CreateVolumeGroupDetails "freeformTags", "sourceDetails", "volumeGroupReplicas", - "clusterPlacementGroupId" + "clusterPlacementGroupId", + "xrcKmsKeyId" }) public CreateVolumeGroupDetails( String availabilityDomain, @@ -42,7 +43,8 @@ public CreateVolumeGroupDetails( java.util.Map freeformTags, VolumeGroupSourceDetails sourceDetails, java.util.List volumeGroupReplicas, - String clusterPlacementGroupId) { + String clusterPlacementGroupId, + String xrcKmsKeyId) { super(); this.availabilityDomain = availabilityDomain; this.backupPolicyId = backupPolicyId; @@ -53,6 +55,7 @@ public CreateVolumeGroupDetails( this.sourceDetails = sourceDetails; this.volumeGroupReplicas = volumeGroupReplicas; this.clusterPlacementGroupId = clusterPlacementGroupId; + this.xrcKmsKeyId = xrcKmsKeyId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -224,6 +227,30 @@ public Builder clusterPlacementGroupId(String clusterPlacementGroupId) { this.__explicitlySet__.add("clusterPlacementGroupId"); return this; } + /** + * The OCID of the Vault service key which is the master encryption key for the volume's cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("xrcKmsKeyId") + private String xrcKmsKeyId; + + /** + * The OCID of the Vault service key which is the master encryption key for the volume's cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @param xrcKmsKeyId the value to set + * @return this builder + **/ + public Builder xrcKmsKeyId(String xrcKmsKeyId) { + this.xrcKmsKeyId = xrcKmsKeyId; + this.__explicitlySet__.add("xrcKmsKeyId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -239,7 +266,8 @@ public CreateVolumeGroupDetails build() { this.freeformTags, this.sourceDetails, this.volumeGroupReplicas, - this.clusterPlacementGroupId); + this.clusterPlacementGroupId, + this.xrcKmsKeyId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -275,6 +303,9 @@ public Builder copy(CreateVolumeGroupDetails model) { if (model.wasPropertyExplicitlySet("clusterPlacementGroupId")) { this.clusterPlacementGroupId(model.getClusterPlacementGroupId()); } + if (model.wasPropertyExplicitlySet("xrcKmsKeyId")) { + this.xrcKmsKeyId(model.getXrcKmsKeyId()); + } return this; } } @@ -437,6 +468,28 @@ public String getClusterPlacementGroupId() { return clusterPlacementGroupId; } + /** + * The OCID of the Vault service key which is the master encryption key for the volume's cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("xrcKmsKeyId") + private final String xrcKmsKeyId; + + /** + * The OCID of the Vault service key which is the master encryption key for the volume's cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @return the value + **/ + public String getXrcKmsKeyId() { + return xrcKmsKeyId; + } + @Override public String toString() { return this.toString(true); @@ -461,6 +514,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", volumeGroupReplicas=").append(String.valueOf(this.volumeGroupReplicas)); sb.append(", clusterPlacementGroupId=") .append(String.valueOf(this.clusterPlacementGroupId)); + sb.append(", xrcKmsKeyId=").append(String.valueOf(this.xrcKmsKeyId)); sb.append(")"); return sb.toString(); } @@ -485,6 +539,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.volumeGroupReplicas, other.volumeGroupReplicas) && java.util.Objects.equals( this.clusterPlacementGroupId, other.clusterPlacementGroupId) + && java.util.Objects.equals(this.xrcKmsKeyId, other.xrcKmsKeyId) && super.equals(other); } @@ -519,6 +574,7 @@ public int hashCode() { + (this.clusterPlacementGroupId == null ? 43 : this.clusterPlacementGroupId.hashCode()); + result = (result * PRIME) + (this.xrcKmsKeyId == null ? 43 : this.xrcKmsKeyId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Instance.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Instance.java index a32727e44d8..989151c4960 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Instance.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Instance.java @@ -48,6 +48,8 @@ public final class Instance extends com.oracle.bmc.http.internal.ExplicitlySetBm "clusterPlacementGroupId", "dedicatedVmHostId", "definedTags", + "securityAttributes", + "securityAttributesState", "displayName", "extendedMetadata", "faultDomain", @@ -72,7 +74,8 @@ public final class Instance extends com.oracle.bmc.http.internal.ExplicitlySetBm "agentConfig", "timeMaintenanceRebootDue", "platformConfig", - "instanceConfigurationId" + "instanceConfigurationId", + "licensingConfigs" }) public Instance( String availabilityDomain, @@ -81,6 +84,8 @@ public Instance( String clusterPlacementGroupId, String dedicatedVmHostId, java.util.Map> definedTags, + java.util.Map> securityAttributes, + SecurityAttributesState securityAttributesState, String displayName, java.util.Map extendedMetadata, String faultDomain, @@ -105,7 +110,8 @@ public Instance( InstanceAgentConfig agentConfig, java.util.Date timeMaintenanceRebootDue, PlatformConfig platformConfig, - String instanceConfigurationId) { + String instanceConfigurationId, + java.util.List licensingConfigs) { super(); this.availabilityDomain = availabilityDomain; this.capacityReservationId = capacityReservationId; @@ -113,6 +119,8 @@ public Instance( this.clusterPlacementGroupId = clusterPlacementGroupId; this.dedicatedVmHostId = dedicatedVmHostId; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; + this.securityAttributesState = securityAttributesState; this.displayName = displayName; this.extendedMetadata = extendedMetadata; this.faultDomain = faultDomain; @@ -138,6 +146,7 @@ public Instance( this.timeMaintenanceRebootDue = timeMaintenanceRebootDue; this.platformConfig = platformConfig; this.instanceConfigurationId = instanceConfigurationId; + this.licensingConfigs = licensingConfigs; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -261,6 +270,45 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + /** + * The lifecycle state of the {@code securityAttributes} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributesState") + private SecurityAttributesState securityAttributesState; + + /** + * The lifecycle state of the {@code securityAttributes} + * @param securityAttributesState the value to set + * @return this builder + **/ + public Builder securityAttributesState(SecurityAttributesState securityAttributesState) { + this.securityAttributesState = securityAttributesState; + this.__explicitlySet__.add("securityAttributesState"); + return this; + } /** * A user-friendly name. Does not have to be unique, and it's changeable. * Avoid entering confidential information. @@ -756,6 +804,22 @@ public Builder instanceConfigurationId(String instanceConfigurationId) { this.__explicitlySet__.add("instanceConfigurationId"); return this; } + /** + * List of licensing configurations associated with the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licensingConfigs") + private java.util.List licensingConfigs; + + /** + * List of licensing configurations associated with the instance. + * @param licensingConfigs the value to set + * @return this builder + **/ + public Builder licensingConfigs(java.util.List licensingConfigs) { + this.licensingConfigs = licensingConfigs; + this.__explicitlySet__.add("licensingConfigs"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -769,6 +833,8 @@ public Instance build() { this.clusterPlacementGroupId, this.dedicatedVmHostId, this.definedTags, + this.securityAttributes, + this.securityAttributesState, this.displayName, this.extendedMetadata, this.faultDomain, @@ -793,7 +859,8 @@ public Instance build() { this.agentConfig, this.timeMaintenanceRebootDue, this.platformConfig, - this.instanceConfigurationId); + this.instanceConfigurationId, + this.licensingConfigs); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -820,6 +887,12 @@ public Builder copy(Instance model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } + if (model.wasPropertyExplicitlySet("securityAttributesState")) { + this.securityAttributesState(model.getSecurityAttributesState()); + } if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } @@ -895,6 +968,9 @@ public Builder copy(Instance model) { if (model.wasPropertyExplicitlySet("instanceConfigurationId")) { this.instanceConfigurationId(model.getInstanceConfigurationId()); } + if (model.wasPropertyExplicitlySet("licensingConfigs")) { + this.licensingConfigs(model.getLicensingConfigs()); + } return this; } } @@ -1016,6 +1092,88 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + + /** + * The lifecycle state of the {@code securityAttributes} + **/ + public enum SecurityAttributesState { + Stable("STABLE"), + Updating("UPDATING"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SecurityAttributesState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SecurityAttributesState v : SecurityAttributesState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + SecurityAttributesState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SecurityAttributesState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'SecurityAttributesState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The lifecycle state of the {@code securityAttributes} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributesState") + private final SecurityAttributesState securityAttributesState; + + /** + * The lifecycle state of the {@code securityAttributes} + * @return the value + **/ + public SecurityAttributesState getSecurityAttributesState() { + return securityAttributesState; + } + /** * A user-friendly name. Does not have to be unique, and it's changeable. * Avoid entering confidential information. @@ -1570,6 +1728,20 @@ public String getInstanceConfigurationId() { return instanceConfigurationId; } + /** + * List of licensing configurations associated with the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licensingConfigs") + private final java.util.List licensingConfigs; + + /** + * List of licensing configurations associated with the instance. + * @return the value + **/ + public java.util.List getLicensingConfigs() { + return licensingConfigs; + } + @Override public String toString() { return this.toString(true); @@ -1591,6 +1763,9 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.clusterPlacementGroupId)); sb.append(", dedicatedVmHostId=").append(String.valueOf(this.dedicatedVmHostId)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); + sb.append(", securityAttributesState=") + .append(String.valueOf(this.securityAttributesState)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", extendedMetadata=").append(String.valueOf(this.extendedMetadata)); sb.append(", faultDomain=").append(String.valueOf(this.faultDomain)); @@ -1619,6 +1794,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", platformConfig=").append(String.valueOf(this.platformConfig)); sb.append(", instanceConfigurationId=") .append(String.valueOf(this.instanceConfigurationId)); + sb.append(", licensingConfigs=").append(String.valueOf(this.licensingConfigs)); sb.append(")"); return sb.toString(); } @@ -1640,6 +1816,9 @@ public boolean equals(Object o) { this.clusterPlacementGroupId, other.clusterPlacementGroupId) && java.util.Objects.equals(this.dedicatedVmHostId, other.dedicatedVmHostId) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) + && java.util.Objects.equals( + this.securityAttributesState, other.securityAttributesState) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.extendedMetadata, other.extendedMetadata) && java.util.Objects.equals(this.faultDomain, other.faultDomain) @@ -1668,6 +1847,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.platformConfig, other.platformConfig) && java.util.Objects.equals( this.instanceConfigurationId, other.instanceConfigurationId) + && java.util.Objects.equals(this.licensingConfigs, other.licensingConfigs) && super.equals(other); } @@ -1697,6 +1877,16 @@ public int hashCode() { (result * PRIME) + (this.dedicatedVmHostId == null ? 43 : this.dedicatedVmHostId.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); + result = + (result * PRIME) + + (this.securityAttributesState == null + ? 43 + : this.securityAttributesState.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) @@ -1752,6 +1942,9 @@ public int hashCode() { + (this.instanceConfigurationId == null ? 43 : this.instanceConfigurationId.hashCode()); + result = + (result * PRIME) + + (this.licensingConfigs == null ? 43 : this.licensingConfigs.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfigurationCreateVnicDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfigurationCreateVnicDetails.java index fcb75bf0f6d..4018dbb9f69 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfigurationCreateVnicDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfigurationCreateVnicDetails.java @@ -31,6 +31,7 @@ public final class InstanceConfigurationCreateVnicDetails "definedTags", "displayName", "freeformTags", + "securityAttributes", "ipv6AddressIpv6SubnetCidrPairDetails", "hostnameLabel", "nsgIds", @@ -45,6 +46,7 @@ public InstanceConfigurationCreateVnicDetails( java.util.Map> definedTags, String displayName, java.util.Map freeformTags, + java.util.Map> securityAttributes, java.util.List ipv6AddressIpv6SubnetCidrPairDetails, String hostnameLabel, @@ -59,6 +61,7 @@ public InstanceConfigurationCreateVnicDetails( this.definedTags = definedTags; this.displayName = displayName; this.freeformTags = freeformTags; + this.securityAttributes = securityAttributes; this.ipv6AddressIpv6SubnetCidrPairDetails = ipv6AddressIpv6SubnetCidrPairDetails; this.hostnameLabel = hostnameLabel; this.nsgIds = nsgIds; @@ -204,6 +207,29 @@ public Builder freeformTags(java.util.Map freeformTags) { this.__explicitlySet__.add("freeformTags"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * A list of IPv6 prefixes from which the VNIC should be assigned an IPv6 address. * You can provide only the prefix and OCI selects an available @@ -346,6 +372,7 @@ public InstanceConfigurationCreateVnicDetails build() { this.definedTags, this.displayName, this.freeformTags, + this.securityAttributes, this.ipv6AddressIpv6SubnetCidrPairDetails, this.hostnameLabel, this.nsgIds, @@ -378,6 +405,9 @@ public Builder copy(InstanceConfigurationCreateVnicDetails model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("ipv6AddressIpv6SubnetCidrPairDetails")) { this.ipv6AddressIpv6SubnetCidrPairDetails( model.getIpv6AddressIpv6SubnetCidrPairDetails()); @@ -534,6 +564,26 @@ public java.util.Map getFreeformTags() { return freeformTags; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * A list of IPv6 prefixes from which the VNIC should be assigned an IPv6 address. * You can provide only the prefix and OCI selects an available @@ -670,6 +720,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", ipv6AddressIpv6SubnetCidrPairDetails=") .append(String.valueOf(this.ipv6AddressIpv6SubnetCidrPairDetails)); sb.append(", hostnameLabel=").append(String.valueOf(this.hostnameLabel)); @@ -698,6 +749,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals( this.ipv6AddressIpv6SubnetCidrPairDetails, other.ipv6AddressIpv6SubnetCidrPairDetails) @@ -725,6 +777,11 @@ public int hashCode() { result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.ipv6AddressIpv6SubnetCidrPairDetails == null diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfigurationCreateVolumeDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfigurationCreateVolumeDetails.java index cdacd9961d2..43c4f1533e6 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfigurationCreateVolumeDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfigurationCreateVolumeDetails.java @@ -37,7 +37,8 @@ public final class InstanceConfigurationCreateVolumeDetails "clusterPlacementGroupId", "sizeInGBs", "sourceDetails", - "autotunePolicies" + "autotunePolicies", + "xrcKmsKeyId" }) public InstanceConfigurationCreateVolumeDetails( String availabilityDomain, @@ -53,7 +54,8 @@ public InstanceConfigurationCreateVolumeDetails( String clusterPlacementGroupId, Long sizeInGBs, InstanceConfigurationVolumeSourceDetails sourceDetails, - java.util.List autotunePolicies) { + java.util.List autotunePolicies, + String xrcKmsKeyId) { super(); this.availabilityDomain = availabilityDomain; this.backupPolicyId = backupPolicyId; @@ -69,6 +71,7 @@ public InstanceConfigurationCreateVolumeDetails( this.sizeInGBs = sizeInGBs; this.sourceDetails = sourceDetails; this.autotunePolicies = autotunePolicies; + this.xrcKmsKeyId = xrcKmsKeyId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -366,6 +369,30 @@ public Builder autotunePolicies( this.__explicitlySet__.add("autotunePolicies"); return this; } + /** + * The OCID of the Vault service key which is the master encryption key for the block volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("xrcKmsKeyId") + private String xrcKmsKeyId; + + /** + * The OCID of the Vault service key which is the master encryption key for the block volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @param xrcKmsKeyId the value to set + * @return this builder + **/ + public Builder xrcKmsKeyId(String xrcKmsKeyId) { + this.xrcKmsKeyId = xrcKmsKeyId; + this.__explicitlySet__.add("xrcKmsKeyId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -386,7 +413,8 @@ public InstanceConfigurationCreateVolumeDetails build() { this.clusterPlacementGroupId, this.sizeInGBs, this.sourceDetails, - this.autotunePolicies); + this.autotunePolicies, + this.xrcKmsKeyId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -437,6 +465,9 @@ public Builder copy(InstanceConfigurationCreateVolumeDetails model) { if (model.wasPropertyExplicitlySet("autotunePolicies")) { this.autotunePolicies(model.getAutotunePolicies()); } + if (model.wasPropertyExplicitlySet("xrcKmsKeyId")) { + this.xrcKmsKeyId(model.getXrcKmsKeyId()); + } return this; } } @@ -714,6 +745,28 @@ public java.util.List getAutotunePolicies() return autotunePolicies; } + /** + * The OCID of the Vault service key which is the master encryption key for the block volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("xrcKmsKeyId") + private final String xrcKmsKeyId; + + /** + * The OCID of the Vault service key which is the master encryption key for the block volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @return the value + **/ + public String getXrcKmsKeyId() { + return xrcKmsKeyId; + } + @Override public String toString() { return this.toString(true); @@ -743,6 +796,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", sizeInGBs=").append(String.valueOf(this.sizeInGBs)); sb.append(", sourceDetails=").append(String.valueOf(this.sourceDetails)); sb.append(", autotunePolicies=").append(String.valueOf(this.autotunePolicies)); + sb.append(", xrcKmsKeyId=").append(String.valueOf(this.xrcKmsKeyId)); sb.append(")"); return sb.toString(); } @@ -773,6 +827,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.sizeInGBs, other.sizeInGBs) && java.util.Objects.equals(this.sourceDetails, other.sourceDetails) && java.util.Objects.equals(this.autotunePolicies, other.autotunePolicies) + && java.util.Objects.equals(this.xrcKmsKeyId, other.xrcKmsKeyId) && super.equals(other); } @@ -816,6 +871,7 @@ public int hashCode() { result = (result * PRIME) + (this.autotunePolicies == null ? 43 : this.autotunePolicies.hashCode()); + result = (result * PRIME) + (this.xrcKmsKeyId == null ? 43 : this.xrcKmsKeyId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfigurationLaunchInstanceDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfigurationLaunchInstanceDetails.java index 5a91e5429f9..bd4bf05ee3c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfigurationLaunchInstanceDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfigurationLaunchInstanceDetails.java @@ -33,6 +33,7 @@ public final class InstanceConfigurationLaunchInstanceDetails "clusterPlacementGroupId", "createVnicDetails", "definedTags", + "securityAttributes", "displayName", "extendedMetadata", "freeformTags", @@ -51,7 +52,8 @@ public final class InstanceConfigurationLaunchInstanceDetails "preferredMaintenanceAction", "instanceOptions", "availabilityConfig", - "preemptibleInstanceConfig" + "preemptibleInstanceConfig", + "licensingConfigs" }) public InstanceConfigurationLaunchInstanceDetails( String availabilityDomain, @@ -60,6 +62,7 @@ public InstanceConfigurationLaunchInstanceDetails( String clusterPlacementGroupId, InstanceConfigurationCreateVnicDetails createVnicDetails, java.util.Map> definedTags, + java.util.Map> securityAttributes, String displayName, java.util.Map extendedMetadata, java.util.Map freeformTags, @@ -78,7 +81,8 @@ public InstanceConfigurationLaunchInstanceDetails( PreferredMaintenanceAction preferredMaintenanceAction, InstanceConfigurationInstanceOptions instanceOptions, InstanceConfigurationAvailabilityConfig availabilityConfig, - PreemptibleInstanceConfigDetails preemptibleInstanceConfig) { + PreemptibleInstanceConfigDetails preemptibleInstanceConfig, + java.util.List licensingConfigs) { super(); this.availabilityDomain = availabilityDomain; this.capacityReservationId = capacityReservationId; @@ -86,6 +90,7 @@ public InstanceConfigurationLaunchInstanceDetails( this.clusterPlacementGroupId = clusterPlacementGroupId; this.createVnicDetails = createVnicDetails; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.displayName = displayName; this.extendedMetadata = extendedMetadata; this.freeformTags = freeformTags; @@ -105,6 +110,7 @@ public InstanceConfigurationLaunchInstanceDetails( this.instanceOptions = instanceOptions; this.availabilityConfig = availabilityConfig; this.preemptibleInstanceConfig = preemptibleInstanceConfig; + this.licensingConfigs = licensingConfigs; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -219,6 +225,29 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * A user-friendly name. Does not have to be unique, and it's changeable. * Avoid entering confidential information. @@ -705,6 +734,23 @@ public Builder preemptibleInstanceConfig( this.__explicitlySet__.add("preemptibleInstanceConfig"); return this; } + /** + * List of licensing configurations associated with target launch values. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licensingConfigs") + private java.util.List licensingConfigs; + + /** + * List of licensing configurations associated with target launch values. + * @param licensingConfigs the value to set + * @return this builder + **/ + public Builder licensingConfigs( + java.util.List licensingConfigs) { + this.licensingConfigs = licensingConfigs; + this.__explicitlySet__.add("licensingConfigs"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -718,6 +764,7 @@ public InstanceConfigurationLaunchInstanceDetails build() { this.clusterPlacementGroupId, this.createVnicDetails, this.definedTags, + this.securityAttributes, this.displayName, this.extendedMetadata, this.freeformTags, @@ -736,7 +783,8 @@ public InstanceConfigurationLaunchInstanceDetails build() { this.preferredMaintenanceAction, this.instanceOptions, this.availabilityConfig, - this.preemptibleInstanceConfig); + this.preemptibleInstanceConfig, + this.licensingConfigs); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -763,6 +811,9 @@ public Builder copy(InstanceConfigurationLaunchInstanceDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } @@ -820,6 +871,9 @@ public Builder copy(InstanceConfigurationLaunchInstanceDetails model) { if (model.wasPropertyExplicitlySet("preemptibleInstanceConfig")) { this.preemptibleInstanceConfig(model.getPreemptibleInstanceConfig()); } + if (model.wasPropertyExplicitlySet("licensingConfigs")) { + this.licensingConfigs(model.getLicensingConfigs()); + } return this; } } @@ -932,6 +986,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * A user-friendly name. Does not have to be unique, and it's changeable. * Avoid entering confidential information. @@ -1480,6 +1554,20 @@ public PreemptibleInstanceConfigDetails getPreemptibleInstanceConfig() { return preemptibleInstanceConfig; } + /** + * List of licensing configurations associated with target launch values. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licensingConfigs") + private final java.util.List licensingConfigs; + + /** + * List of licensing configurations associated with target launch values. + * @return the value + **/ + public java.util.List getLicensingConfigs() { + return licensingConfigs; + } + @Override public String toString() { return this.toString(true); @@ -1501,6 +1589,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.clusterPlacementGroupId)); sb.append(", createVnicDetails=").append(String.valueOf(this.createVnicDetails)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", extendedMetadata=").append(String.valueOf(this.extendedMetadata)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); @@ -1523,6 +1612,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", availabilityConfig=").append(String.valueOf(this.availabilityConfig)); sb.append(", preemptibleInstanceConfig=") .append(String.valueOf(this.preemptibleInstanceConfig)); + sb.append(", licensingConfigs=").append(String.valueOf(this.licensingConfigs)); sb.append(")"); return sb.toString(); } @@ -1545,6 +1635,7 @@ public boolean equals(Object o) { this.clusterPlacementGroupId, other.clusterPlacementGroupId) && java.util.Objects.equals(this.createVnicDetails, other.createVnicDetails) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.extendedMetadata, other.extendedMetadata) && java.util.Objects.equals(this.freeformTags, other.freeformTags) @@ -1567,6 +1658,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.availabilityConfig, other.availabilityConfig) && java.util.Objects.equals( this.preemptibleInstanceConfig, other.preemptibleInstanceConfig) + && java.util.Objects.equals(this.licensingConfigs, other.licensingConfigs) && super.equals(other); } @@ -1596,6 +1688,11 @@ public int hashCode() { (result * PRIME) + (this.createVnicDetails == null ? 43 : this.createVnicDetails.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) @@ -1643,6 +1740,9 @@ public int hashCode() { + (this.preemptibleInstanceConfig == null ? 43 : this.preemptibleInstanceConfig.hashCode()); + result = + (result * PRIME) + + (this.licensingConfigs == null ? 43 : this.licensingConfigs.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceMaintenanceAlternativeResolutionActions.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceMaintenanceAlternativeResolutionActions.java new file mode 100644 index 00000000000..972b262a13f --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceMaintenanceAlternativeResolutionActions.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.model; + +/** + * These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public enum InstanceMaintenanceAlternativeResolutionActions { + RebootMigration("REBOOT_MIGRATION"), + Terminate("TERMINATE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + InstanceMaintenanceAlternativeResolutionActions.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (InstanceMaintenanceAlternativeResolutionActions v : + InstanceMaintenanceAlternativeResolutionActions.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + InstanceMaintenanceAlternativeResolutionActions(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static InstanceMaintenanceAlternativeResolutionActions create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'InstanceMaintenanceAlternativeResolutionActions', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceMaintenanceEvent.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceMaintenanceEvent.java new file mode 100644 index 00000000000..c7d2116827b --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceMaintenanceEvent.java @@ -0,0 +1,1575 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.model; + +/** + * It is the event in which the maintenance action will be be performed on the customer instance on the scheduled date and time. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = InstanceMaintenanceEvent.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class InstanceMaintenanceEvent + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "definedTags", + "freeformTags", + "id", + "instanceId", + "compartmentId", + "maintenanceCategory", + "maintenanceReason", + "instanceAction", + "alternativeResolutionActions", + "timeStarted", + "timeFinished", + "timeWindowStart", + "startWindowDuration", + "estimatedDuration", + "timeHardDueDate", + "canReschedule", + "timeCreated", + "lifecycleState", + "lifecycleDetails", + "createdBy", + "description", + "correlationToken", + "canDeleteLocalStorage", + "additionalDetails" + }) + public InstanceMaintenanceEvent( + String displayName, + java.util.Map> definedTags, + java.util.Map freeformTags, + String id, + String instanceId, + String compartmentId, + MaintenanceCategory maintenanceCategory, + MaintenanceReason maintenanceReason, + InstanceAction instanceAction, + java.util.List + alternativeResolutionActions, + java.util.Date timeStarted, + java.util.Date timeFinished, + java.util.Date timeWindowStart, + String startWindowDuration, + String estimatedDuration, + java.util.Date timeHardDueDate, + Boolean canReschedule, + java.util.Date timeCreated, + LifecycleState lifecycleState, + String lifecycleDetails, + CreatedBy createdBy, + String description, + String correlationToken, + Boolean canDeleteLocalStorage, + java.util.Map additionalDetails) { + super(); + this.displayName = displayName; + this.definedTags = definedTags; + this.freeformTags = freeformTags; + this.id = id; + this.instanceId = instanceId; + this.compartmentId = compartmentId; + this.maintenanceCategory = maintenanceCategory; + this.maintenanceReason = maintenanceReason; + this.instanceAction = instanceAction; + this.alternativeResolutionActions = alternativeResolutionActions; + this.timeStarted = timeStarted; + this.timeFinished = timeFinished; + this.timeWindowStart = timeWindowStart; + this.startWindowDuration = startWindowDuration; + this.estimatedDuration = estimatedDuration; + this.timeHardDueDate = timeHardDueDate; + this.canReschedule = canReschedule; + this.timeCreated = timeCreated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.createdBy = createdBy; + this.description = description; + this.correlationToken = correlationToken; + this.canDeleteLocalStorage = canDeleteLocalStorage; + this.additionalDetails = additionalDetails; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a + * namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a + * namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the maintenance event. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the maintenance event. + * + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The OCID of the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceId") + private String instanceId; + + /** + * The OCID of the instance. + * @param instanceId the value to set + * @return this builder + **/ + public Builder instanceId(String instanceId) { + this.instanceId = instanceId; + this.__explicitlySet__.add("instanceId"); + return this; + } + /** + * The OCID of the compartment that contains the instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the instance. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * This indicates the priority and allowed actions for this Maintenance. Higher priority forms of Maintenance have + * tighter restrictions and may not be rescheduled, while lower priority/severity Maintenance can be rescheduled, + * deferred, or even cancelled. Please see the + * [Instance Maintenance](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceCategory") + private MaintenanceCategory maintenanceCategory; + + /** + * This indicates the priority and allowed actions for this Maintenance. Higher priority forms of Maintenance have + * tighter restrictions and may not be rescheduled, while lower priority/severity Maintenance can be rescheduled, + * deferred, or even cancelled. Please see the + * [Instance Maintenance](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + * + * @param maintenanceCategory the value to set + * @return this builder + **/ + public Builder maintenanceCategory(MaintenanceCategory maintenanceCategory) { + this.maintenanceCategory = maintenanceCategory; + this.__explicitlySet__.add("maintenanceCategory"); + return this; + } + /** + * This is the reason that Maintenance is being performed. See + * [Instance Maintenance](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceReason") + private MaintenanceReason maintenanceReason; + + /** + * This is the reason that Maintenance is being performed. See + * [Instance Maintenance](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + * + * @param maintenanceReason the value to set + * @return this builder + **/ + public Builder maintenanceReason(MaintenanceReason maintenanceReason) { + this.maintenanceReason = maintenanceReason; + this.__explicitlySet__.add("maintenanceReason"); + return this; + } + /** + * This is the action that will be performed on the Instance by OCI when the Maintenance begins. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceAction") + private InstanceAction instanceAction; + + /** + * This is the action that will be performed on the Instance by OCI when the Maintenance begins. + * + * @param instanceAction the value to set + * @return this builder + **/ + public Builder instanceAction(InstanceAction instanceAction) { + this.instanceAction = instanceAction; + this.__explicitlySet__.add("instanceAction"); + return this; + } + /** + * These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alternativeResolutionActions") + private java.util.List + alternativeResolutionActions; + + /** + * These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance. + * + * @param alternativeResolutionActions the value to set + * @return this builder + **/ + public Builder alternativeResolutionActions( + java.util.List + alternativeResolutionActions) { + this.alternativeResolutionActions = alternativeResolutionActions; + this.__explicitlySet__.add("alternativeResolutionActions"); + return this; + } + /** + * The time at which the Maintenance actually started. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The time at which the Maintenance actually started. + * + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The time at which the Maintenance actually finished. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + /** + * The time at which the Maintenance actually finished. + * + * @param timeFinished the value to set + * @return this builder + **/ + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + /** + * The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + * this time. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeWindowStart") + private java.util.Date timeWindowStart; + + /** + * The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + * this time. + * + * @param timeWindowStart the value to set + * @return this builder + **/ + public Builder timeWindowStart(java.util.Date timeWindowStart) { + this.timeWindowStart = timeWindowStart; + this.__explicitlySet__.add("timeWindowStart"); + return this; + } + /** + * The duration of the time window Maintenance is scheduled to begin within. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startWindowDuration") + private String startWindowDuration; + + /** + * The duration of the time window Maintenance is scheduled to begin within. + * + * @param startWindowDuration the value to set + * @return this builder + **/ + public Builder startWindowDuration(String startWindowDuration) { + this.startWindowDuration = startWindowDuration; + this.__explicitlySet__.add("startWindowDuration"); + return this; + } + /** + * This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedDuration") + private String estimatedDuration; + + /** + * This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state. + * + * @param estimatedDuration the value to set + * @return this builder + **/ + public Builder estimatedDuration(String estimatedDuration) { + this.estimatedDuration = estimatedDuration; + this.__explicitlySet__.add("estimatedDuration"); + return this; + } + /** + * It is the scheduled hard due date and time of the maintenance event. + * The maintenance event will happen at this time and the due date will not be extended. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeHardDueDate") + private java.util.Date timeHardDueDate; + + /** + * It is the scheduled hard due date and time of the maintenance event. + * The maintenance event will happen at this time and the due date will not be extended. + * + * @param timeHardDueDate the value to set + * @return this builder + **/ + public Builder timeHardDueDate(java.util.Date timeHardDueDate) { + this.timeHardDueDate = timeHardDueDate; + this.__explicitlySet__.add("timeHardDueDate"); + return this; + } + /** + * Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("canReschedule") + private Boolean canReschedule; + + /** + * Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate. + * + * @param canReschedule the value to set + * @return this builder + **/ + public Builder canReschedule(Boolean canReschedule) { + this.canReschedule = canReschedule; + this.__explicitlySet__.add("canReschedule"); + return this; + } + /** + * The date and time the maintenance event was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the maintenance event was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The current state of the maintenance event. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the maintenance event. + * + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Provides more details about the state of the maintenance event. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Provides more details about the state of the maintenance event. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The creator of the maintenance event. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private CreatedBy createdBy; + + /** + * The creator of the maintenance event. + * + * @param createdBy the value to set + * @return this builder + **/ + public Builder createdBy(CreatedBy createdBy) { + this.createdBy = createdBy; + this.__explicitlySet__.add("createdBy"); + return this; + } + /** + * It is the descriptive information about the maintenance taking place on the customer instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * It is the descriptive information about the maintenance taking place on the customer instance. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * A unique identifier that will group Instances that have a relationship with one another and must be scheduled + * together for the Maintenance to proceed. Any Instances that have a relationship with one another from a Maintenance + * perspective will have a matching correlationToken. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("correlationToken") + private String correlationToken; + + /** + * A unique identifier that will group Instances that have a relationship with one another and must be scheduled + * together for the Maintenance to proceed. Any Instances that have a relationship with one another from a Maintenance + * perspective will have a matching correlationToken. + * + * @param correlationToken the value to set + * @return this builder + **/ + public Builder correlationToken(String correlationToken) { + this.correlationToken = correlationToken; + this.__explicitlySet__.add("correlationToken"); + return this; + } + /** + * For Instances that have local storage, this field is set to true when local storage + * will be deleted as a result of the Maintenance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("canDeleteLocalStorage") + private Boolean canDeleteLocalStorage; + + /** + * For Instances that have local storage, this field is set to true when local storage + * will be deleted as a result of the Maintenance. + * + * @param canDeleteLocalStorage the value to set + * @return this builder + **/ + public Builder canDeleteLocalStorage(Boolean canDeleteLocalStorage) { + this.canDeleteLocalStorage = canDeleteLocalStorage; + this.__explicitlySet__.add("canDeleteLocalStorage"); + return this; + } + /** + * Additional details of the maintenance in the form of json. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalDetails") + private java.util.Map additionalDetails; + + /** + * Additional details of the maintenance in the form of json. + * + * @param additionalDetails the value to set + * @return this builder + **/ + public Builder additionalDetails(java.util.Map additionalDetails) { + this.additionalDetails = additionalDetails; + this.__explicitlySet__.add("additionalDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public InstanceMaintenanceEvent build() { + InstanceMaintenanceEvent model = + new InstanceMaintenanceEvent( + this.displayName, + this.definedTags, + this.freeformTags, + this.id, + this.instanceId, + this.compartmentId, + this.maintenanceCategory, + this.maintenanceReason, + this.instanceAction, + this.alternativeResolutionActions, + this.timeStarted, + this.timeFinished, + this.timeWindowStart, + this.startWindowDuration, + this.estimatedDuration, + this.timeHardDueDate, + this.canReschedule, + this.timeCreated, + this.lifecycleState, + this.lifecycleDetails, + this.createdBy, + this.description, + this.correlationToken, + this.canDeleteLocalStorage, + this.additionalDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(InstanceMaintenanceEvent model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("instanceId")) { + this.instanceId(model.getInstanceId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("maintenanceCategory")) { + this.maintenanceCategory(model.getMaintenanceCategory()); + } + if (model.wasPropertyExplicitlySet("maintenanceReason")) { + this.maintenanceReason(model.getMaintenanceReason()); + } + if (model.wasPropertyExplicitlySet("instanceAction")) { + this.instanceAction(model.getInstanceAction()); + } + if (model.wasPropertyExplicitlySet("alternativeResolutionActions")) { + this.alternativeResolutionActions(model.getAlternativeResolutionActions()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } + if (model.wasPropertyExplicitlySet("timeWindowStart")) { + this.timeWindowStart(model.getTimeWindowStart()); + } + if (model.wasPropertyExplicitlySet("startWindowDuration")) { + this.startWindowDuration(model.getStartWindowDuration()); + } + if (model.wasPropertyExplicitlySet("estimatedDuration")) { + this.estimatedDuration(model.getEstimatedDuration()); + } + if (model.wasPropertyExplicitlySet("timeHardDueDate")) { + this.timeHardDueDate(model.getTimeHardDueDate()); + } + if (model.wasPropertyExplicitlySet("canReschedule")) { + this.canReschedule(model.getCanReschedule()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("createdBy")) { + this.createdBy(model.getCreatedBy()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("correlationToken")) { + this.correlationToken(model.getCorrelationToken()); + } + if (model.wasPropertyExplicitlySet("canDeleteLocalStorage")) { + this.canDeleteLocalStorage(model.getCanDeleteLocalStorage()); + } + if (model.wasPropertyExplicitlySet("additionalDetails")) { + this.additionalDetails(model.getAdditionalDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a + * namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a + * namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the maintenance event. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the maintenance event. + * + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceId") + private final String instanceId; + + /** + * The OCID of the instance. + * @return the value + **/ + public String getInstanceId() { + return instanceId; + } + + /** + * The OCID of the compartment that contains the instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the instance. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * This indicates the priority and allowed actions for this Maintenance. Higher priority forms of Maintenance have + * tighter restrictions and may not be rescheduled, while lower priority/severity Maintenance can be rescheduled, + * deferred, or even cancelled. Please see the + * [Instance Maintenance](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + * + **/ + public enum MaintenanceCategory { + Emergency("EMERGENCY"), + Mandatory("MANDATORY"), + Flexible("FLEXIBLE"), + Optional("OPTIONAL"), + Notification("NOTIFICATION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(MaintenanceCategory.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (MaintenanceCategory v : MaintenanceCategory.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + MaintenanceCategory(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static MaintenanceCategory create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'MaintenanceCategory', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * This indicates the priority and allowed actions for this Maintenance. Higher priority forms of Maintenance have + * tighter restrictions and may not be rescheduled, while lower priority/severity Maintenance can be rescheduled, + * deferred, or even cancelled. Please see the + * [Instance Maintenance](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceCategory") + private final MaintenanceCategory maintenanceCategory; + + /** + * This indicates the priority and allowed actions for this Maintenance. Higher priority forms of Maintenance have + * tighter restrictions and may not be rescheduled, while lower priority/severity Maintenance can be rescheduled, + * deferred, or even cancelled. Please see the + * [Instance Maintenance](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + * + * @return the value + **/ + public MaintenanceCategory getMaintenanceCategory() { + return maintenanceCategory; + } + + /** + * This is the reason that Maintenance is being performed. See + * [Instance Maintenance](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + * + **/ + public enum MaintenanceReason { + Evacuation("EVACUATION"), + EnvironmentalFactors("ENVIRONMENTAL_FACTORS"), + Decommission("DECOMMISSION"), + HardwareReplacement("HARDWARE_REPLACEMENT"), + FirmwareUpdate("FIRMWARE_UPDATE"), + SecurityUpdate("SECURITY_UPDATE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(MaintenanceReason.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (MaintenanceReason v : MaintenanceReason.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + MaintenanceReason(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static MaintenanceReason create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'MaintenanceReason', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * This is the reason that Maintenance is being performed. See + * [Instance Maintenance](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceReason") + private final MaintenanceReason maintenanceReason; + + /** + * This is the reason that Maintenance is being performed. See + * [Instance Maintenance](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + * + * @return the value + **/ + public MaintenanceReason getMaintenanceReason() { + return maintenanceReason; + } + + /** + * This is the action that will be performed on the Instance by OCI when the Maintenance begins. + * + **/ + public enum InstanceAction { + RebootMigration("REBOOT_MIGRATION"), + Terminate("TERMINATE"), + Stop("STOP"), + None("NONE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(InstanceAction.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (InstanceAction v : InstanceAction.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + InstanceAction(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static InstanceAction create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'InstanceAction', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * This is the action that will be performed on the Instance by OCI when the Maintenance begins. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceAction") + private final InstanceAction instanceAction; + + /** + * This is the action that will be performed on the Instance by OCI when the Maintenance begins. + * + * @return the value + **/ + public InstanceAction getInstanceAction() { + return instanceAction; + } + + /** + * These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alternativeResolutionActions") + private final java.util.List + alternativeResolutionActions; + + /** + * These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance. + * + * @return the value + **/ + public java.util.List + getAlternativeResolutionActions() { + return alternativeResolutionActions; + } + + /** + * The time at which the Maintenance actually started. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The time at which the Maintenance actually started. + * + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The time at which the Maintenance actually finished. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private final java.util.Date timeFinished; + + /** + * The time at which the Maintenance actually finished. + * + * @return the value + **/ + public java.util.Date getTimeFinished() { + return timeFinished; + } + + /** + * The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + * this time. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeWindowStart") + private final java.util.Date timeWindowStart; + + /** + * The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + * this time. + * + * @return the value + **/ + public java.util.Date getTimeWindowStart() { + return timeWindowStart; + } + + /** + * The duration of the time window Maintenance is scheduled to begin within. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startWindowDuration") + private final String startWindowDuration; + + /** + * The duration of the time window Maintenance is scheduled to begin within. + * + * @return the value + **/ + public String getStartWindowDuration() { + return startWindowDuration; + } + + /** + * This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedDuration") + private final String estimatedDuration; + + /** + * This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state. + * + * @return the value + **/ + public String getEstimatedDuration() { + return estimatedDuration; + } + + /** + * It is the scheduled hard due date and time of the maintenance event. + * The maintenance event will happen at this time and the due date will not be extended. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeHardDueDate") + private final java.util.Date timeHardDueDate; + + /** + * It is the scheduled hard due date and time of the maintenance event. + * The maintenance event will happen at this time and the due date will not be extended. + * + * @return the value + **/ + public java.util.Date getTimeHardDueDate() { + return timeHardDueDate; + } + + /** + * Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("canReschedule") + private final Boolean canReschedule; + + /** + * Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate. + * + * @return the value + **/ + public Boolean getCanReschedule() { + return canReschedule; + } + + /** + * The date and time the maintenance event was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the maintenance event was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The current state of the maintenance event. + * + **/ + public enum LifecycleState { + Scheduled("SCHEDULED"), + Started("STARTED"), + Processing("PROCESSING"), + Succeeded("SUCCEEDED"), + Failed("FAILED"), + Canceled("CANCELED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the maintenance event. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the maintenance event. + * + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Provides more details about the state of the maintenance event. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Provides more details about the state of the maintenance event. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The creator of the maintenance event. + * + **/ + public enum CreatedBy { + Customer("CUSTOMER"), + System("SYSTEM"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreatedBy.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (CreatedBy v : CreatedBy.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + CreatedBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static CreatedBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'CreatedBy', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The creator of the maintenance event. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private final CreatedBy createdBy; + + /** + * The creator of the maintenance event. + * + * @return the value + **/ + public CreatedBy getCreatedBy() { + return createdBy; + } + + /** + * It is the descriptive information about the maintenance taking place on the customer instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * It is the descriptive information about the maintenance taking place on the customer instance. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * A unique identifier that will group Instances that have a relationship with one another and must be scheduled + * together for the Maintenance to proceed. Any Instances that have a relationship with one another from a Maintenance + * perspective will have a matching correlationToken. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("correlationToken") + private final String correlationToken; + + /** + * A unique identifier that will group Instances that have a relationship with one another and must be scheduled + * together for the Maintenance to proceed. Any Instances that have a relationship with one another from a Maintenance + * perspective will have a matching correlationToken. + * + * @return the value + **/ + public String getCorrelationToken() { + return correlationToken; + } + + /** + * For Instances that have local storage, this field is set to true when local storage + * will be deleted as a result of the Maintenance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("canDeleteLocalStorage") + private final Boolean canDeleteLocalStorage; + + /** + * For Instances that have local storage, this field is set to true when local storage + * will be deleted as a result of the Maintenance. + * + * @return the value + **/ + public Boolean getCanDeleteLocalStorage() { + return canDeleteLocalStorage; + } + + /** + * Additional details of the maintenance in the form of json. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalDetails") + private final java.util.Map additionalDetails; + + /** + * Additional details of the maintenance in the form of json. + * + * @return the value + **/ + public java.util.Map getAdditionalDetails() { + return additionalDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("InstanceMaintenanceEvent("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", instanceId=").append(String.valueOf(this.instanceId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", maintenanceCategory=").append(String.valueOf(this.maintenanceCategory)); + sb.append(", maintenanceReason=").append(String.valueOf(this.maintenanceReason)); + sb.append(", instanceAction=").append(String.valueOf(this.instanceAction)); + sb.append(", alternativeResolutionActions=") + .append(String.valueOf(this.alternativeResolutionActions)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); + sb.append(", timeWindowStart=").append(String.valueOf(this.timeWindowStart)); + sb.append(", startWindowDuration=").append(String.valueOf(this.startWindowDuration)); + sb.append(", estimatedDuration=").append(String.valueOf(this.estimatedDuration)); + sb.append(", timeHardDueDate=").append(String.valueOf(this.timeHardDueDate)); + sb.append(", canReschedule=").append(String.valueOf(this.canReschedule)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", createdBy=").append(String.valueOf(this.createdBy)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", correlationToken=").append(String.valueOf(this.correlationToken)); + sb.append(", canDeleteLocalStorage=").append(String.valueOf(this.canDeleteLocalStorage)); + sb.append(", additionalDetails=").append(String.valueOf(this.additionalDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof InstanceMaintenanceEvent)) { + return false; + } + + InstanceMaintenanceEvent other = (InstanceMaintenanceEvent) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.instanceId, other.instanceId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.maintenanceCategory, other.maintenanceCategory) + && java.util.Objects.equals(this.maintenanceReason, other.maintenanceReason) + && java.util.Objects.equals(this.instanceAction, other.instanceAction) + && java.util.Objects.equals( + this.alternativeResolutionActions, other.alternativeResolutionActions) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeFinished, other.timeFinished) + && java.util.Objects.equals(this.timeWindowStart, other.timeWindowStart) + && java.util.Objects.equals(this.startWindowDuration, other.startWindowDuration) + && java.util.Objects.equals(this.estimatedDuration, other.estimatedDuration) + && java.util.Objects.equals(this.timeHardDueDate, other.timeHardDueDate) + && java.util.Objects.equals(this.canReschedule, other.canReschedule) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.createdBy, other.createdBy) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.correlationToken, other.correlationToken) + && java.util.Objects.equals(this.canDeleteLocalStorage, other.canDeleteLocalStorage) + && java.util.Objects.equals(this.additionalDetails, other.additionalDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.instanceId == null ? 43 : this.instanceId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.maintenanceCategory == null + ? 43 + : this.maintenanceCategory.hashCode()); + result = + (result * PRIME) + + (this.maintenanceReason == null ? 43 : this.maintenanceReason.hashCode()); + result = + (result * PRIME) + + (this.instanceAction == null ? 43 : this.instanceAction.hashCode()); + result = + (result * PRIME) + + (this.alternativeResolutionActions == null + ? 43 + : this.alternativeResolutionActions.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); + result = + (result * PRIME) + + (this.timeWindowStart == null ? 43 : this.timeWindowStart.hashCode()); + result = + (result * PRIME) + + (this.startWindowDuration == null + ? 43 + : this.startWindowDuration.hashCode()); + result = + (result * PRIME) + + (this.estimatedDuration == null ? 43 : this.estimatedDuration.hashCode()); + result = + (result * PRIME) + + (this.timeHardDueDate == null ? 43 : this.timeHardDueDate.hashCode()); + result = + (result * PRIME) + + (this.canReschedule == null ? 43 : this.canReschedule.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.createdBy == null ? 43 : this.createdBy.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.correlationToken == null ? 43 : this.correlationToken.hashCode()); + result = + (result * PRIME) + + (this.canDeleteLocalStorage == null + ? 43 + : this.canDeleteLocalStorage.hashCode()); + result = + (result * PRIME) + + (this.additionalDetails == null ? 43 : this.additionalDetails.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceMaintenanceEventSummary.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceMaintenanceEventSummary.java new file mode 100644 index 00000000000..5271fbfa5b9 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceMaintenanceEventSummary.java @@ -0,0 +1,1171 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.model; + +/** + * It is the event in which the maintenance action will be be performed on the customer instance on the scheduled date and time. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = InstanceMaintenanceEventSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class InstanceMaintenanceEventSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "definedTags", + "displayName", + "freeformTags", + "id", + "instanceId", + "compartmentId", + "maintenanceCategory", + "maintenanceReason", + "instanceAction", + "alternativeResolutionActions", + "timeStarted", + "timeFinished", + "timeWindowStart", + "startWindowDuration", + "estimatedDuration", + "timeHardDueDate", + "canReschedule", + "timeCreated", + "lifecycleState", + "createdBy", + "description", + "correlationToken" + }) + public InstanceMaintenanceEventSummary( + java.util.Map> definedTags, + String displayName, + java.util.Map freeformTags, + String id, + String instanceId, + String compartmentId, + InstanceMaintenanceEvent.MaintenanceCategory maintenanceCategory, + InstanceMaintenanceEvent.MaintenanceReason maintenanceReason, + InstanceMaintenanceEvent.InstanceAction instanceAction, + java.util.List + alternativeResolutionActions, + java.util.Date timeStarted, + java.util.Date timeFinished, + java.util.Date timeWindowStart, + String startWindowDuration, + String estimatedDuration, + java.util.Date timeHardDueDate, + Boolean canReschedule, + java.util.Date timeCreated, + InstanceMaintenanceEvent.LifecycleState lifecycleState, + InstanceMaintenanceEvent.CreatedBy createdBy, + String description, + String correlationToken) { + super(); + this.definedTags = definedTags; + this.displayName = displayName; + this.freeformTags = freeformTags; + this.id = id; + this.instanceId = instanceId; + this.compartmentId = compartmentId; + this.maintenanceCategory = maintenanceCategory; + this.maintenanceReason = maintenanceReason; + this.instanceAction = instanceAction; + this.alternativeResolutionActions = alternativeResolutionActions; + this.timeStarted = timeStarted; + this.timeFinished = timeFinished; + this.timeWindowStart = timeWindowStart; + this.startWindowDuration = startWindowDuration; + this.estimatedDuration = estimatedDuration; + this.timeHardDueDate = timeHardDueDate; + this.canReschedule = canReschedule; + this.timeCreated = timeCreated; + this.lifecycleState = lifecycleState; + this.createdBy = createdBy; + this.description = description; + this.correlationToken = correlationToken; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Defined tags for this resource. Each key is predefined and scoped to a + * namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a + * namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the maintenance event. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the maintenance event. + * + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The OCID of the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceId") + private String instanceId; + + /** + * The OCID of the instance. + * @param instanceId the value to set + * @return this builder + **/ + public Builder instanceId(String instanceId) { + this.instanceId = instanceId; + this.__explicitlySet__.add("instanceId"); + return this; + } + /** + * The OCID of the compartment that contains the instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the instance. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * This indicates the priority and allowed actions for this Maintenance. Higher priority forms of Maintenance have + * tighter restrictions and may not be rescheduled, while lower priority/severity Maintenance can be rescheduled, + * deferred, or even cancelled. Please see the + * [Instance Maintenance](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceCategory") + private InstanceMaintenanceEvent.MaintenanceCategory maintenanceCategory; + + /** + * This indicates the priority and allowed actions for this Maintenance. Higher priority forms of Maintenance have + * tighter restrictions and may not be rescheduled, while lower priority/severity Maintenance can be rescheduled, + * deferred, or even cancelled. Please see the + * [Instance Maintenance](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + * + * @param maintenanceCategory the value to set + * @return this builder + **/ + public Builder maintenanceCategory( + InstanceMaintenanceEvent.MaintenanceCategory maintenanceCategory) { + this.maintenanceCategory = maintenanceCategory; + this.__explicitlySet__.add("maintenanceCategory"); + return this; + } + /** + * This is the reason that Maintenance is being performed. See + * [Instance Maintenance](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceReason") + private InstanceMaintenanceEvent.MaintenanceReason maintenanceReason; + + /** + * This is the reason that Maintenance is being performed. See + * [Instance Maintenance](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + * + * @param maintenanceReason the value to set + * @return this builder + **/ + public Builder maintenanceReason( + InstanceMaintenanceEvent.MaintenanceReason maintenanceReason) { + this.maintenanceReason = maintenanceReason; + this.__explicitlySet__.add("maintenanceReason"); + return this; + } + /** + * This is the action that will be performed on the Instance by OCI when the Maintenance begins. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceAction") + private InstanceMaintenanceEvent.InstanceAction instanceAction; + + /** + * This is the action that will be performed on the Instance by OCI when the Maintenance begins. + * + * @param instanceAction the value to set + * @return this builder + **/ + public Builder instanceAction(InstanceMaintenanceEvent.InstanceAction instanceAction) { + this.instanceAction = instanceAction; + this.__explicitlySet__.add("instanceAction"); + return this; + } + /** + * These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alternativeResolutionActions") + private java.util.List + alternativeResolutionActions; + + /** + * These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance. + * + * @param alternativeResolutionActions the value to set + * @return this builder + **/ + public Builder alternativeResolutionActions( + java.util.List + alternativeResolutionActions) { + this.alternativeResolutionActions = alternativeResolutionActions; + this.__explicitlySet__.add("alternativeResolutionActions"); + return this; + } + /** + * The time at which the Maintenance actually started. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The time at which the Maintenance actually started. + * + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The time at which the Maintenance actually finished. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + /** + * The time at which the Maintenance actually finished. + * + * @param timeFinished the value to set + * @return this builder + **/ + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + /** + * The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + * this time. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeWindowStart") + private java.util.Date timeWindowStart; + + /** + * The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + * this time. + * + * @param timeWindowStart the value to set + * @return this builder + **/ + public Builder timeWindowStart(java.util.Date timeWindowStart) { + this.timeWindowStart = timeWindowStart; + this.__explicitlySet__.add("timeWindowStart"); + return this; + } + /** + * The duration of the time window Maintenance is scheduled to begin within. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startWindowDuration") + private String startWindowDuration; + + /** + * The duration of the time window Maintenance is scheduled to begin within. + * + * @param startWindowDuration the value to set + * @return this builder + **/ + public Builder startWindowDuration(String startWindowDuration) { + this.startWindowDuration = startWindowDuration; + this.__explicitlySet__.add("startWindowDuration"); + return this; + } + /** + * This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedDuration") + private String estimatedDuration; + + /** + * This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state. + * + * @param estimatedDuration the value to set + * @return this builder + **/ + public Builder estimatedDuration(String estimatedDuration) { + this.estimatedDuration = estimatedDuration; + this.__explicitlySet__.add("estimatedDuration"); + return this; + } + /** + * It is the scheduled hard due date and time of the maintenance event. + * The maintenance event will happen at this time and the due date will not be extended. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeHardDueDate") + private java.util.Date timeHardDueDate; + + /** + * It is the scheduled hard due date and time of the maintenance event. + * The maintenance event will happen at this time and the due date will not be extended. + * + * @param timeHardDueDate the value to set + * @return this builder + **/ + public Builder timeHardDueDate(java.util.Date timeHardDueDate) { + this.timeHardDueDate = timeHardDueDate; + this.__explicitlySet__.add("timeHardDueDate"); + return this; + } + /** + * Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("canReschedule") + private Boolean canReschedule; + + /** + * Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate. + * + * @param canReschedule the value to set + * @return this builder + **/ + public Builder canReschedule(Boolean canReschedule) { + this.canReschedule = canReschedule; + this.__explicitlySet__.add("canReschedule"); + return this; + } + /** + * The date and time the maintenance event was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the maintenance event was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The current state of the maintenance event. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private InstanceMaintenanceEvent.LifecycleState lifecycleState; + + /** + * The current state of the maintenance event. + * + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(InstanceMaintenanceEvent.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The creator of the maintenance event. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private InstanceMaintenanceEvent.CreatedBy createdBy; + + /** + * The creator of the maintenance event. + * + * @param createdBy the value to set + * @return this builder + **/ + public Builder createdBy(InstanceMaintenanceEvent.CreatedBy createdBy) { + this.createdBy = createdBy; + this.__explicitlySet__.add("createdBy"); + return this; + } + /** + * It is the descriptive information about the maintenance taking place on the customer instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * It is the descriptive information about the maintenance taking place on the customer instance. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * A unique identifier that will group Instances that have a relationship with one another and must be scheduled + * together for the Maintenance to proceed. Any Instances that have a relationship with one another from a Maintenance + * perspective will have a matching correlationToken. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("correlationToken") + private String correlationToken; + + /** + * A unique identifier that will group Instances that have a relationship with one another and must be scheduled + * together for the Maintenance to proceed. Any Instances that have a relationship with one another from a Maintenance + * perspective will have a matching correlationToken. + * + * @param correlationToken the value to set + * @return this builder + **/ + public Builder correlationToken(String correlationToken) { + this.correlationToken = correlationToken; + this.__explicitlySet__.add("correlationToken"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public InstanceMaintenanceEventSummary build() { + InstanceMaintenanceEventSummary model = + new InstanceMaintenanceEventSummary( + this.definedTags, + this.displayName, + this.freeformTags, + this.id, + this.instanceId, + this.compartmentId, + this.maintenanceCategory, + this.maintenanceReason, + this.instanceAction, + this.alternativeResolutionActions, + this.timeStarted, + this.timeFinished, + this.timeWindowStart, + this.startWindowDuration, + this.estimatedDuration, + this.timeHardDueDate, + this.canReschedule, + this.timeCreated, + this.lifecycleState, + this.createdBy, + this.description, + this.correlationToken); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(InstanceMaintenanceEventSummary model) { + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("instanceId")) { + this.instanceId(model.getInstanceId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("maintenanceCategory")) { + this.maintenanceCategory(model.getMaintenanceCategory()); + } + if (model.wasPropertyExplicitlySet("maintenanceReason")) { + this.maintenanceReason(model.getMaintenanceReason()); + } + if (model.wasPropertyExplicitlySet("instanceAction")) { + this.instanceAction(model.getInstanceAction()); + } + if (model.wasPropertyExplicitlySet("alternativeResolutionActions")) { + this.alternativeResolutionActions(model.getAlternativeResolutionActions()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } + if (model.wasPropertyExplicitlySet("timeWindowStart")) { + this.timeWindowStart(model.getTimeWindowStart()); + } + if (model.wasPropertyExplicitlySet("startWindowDuration")) { + this.startWindowDuration(model.getStartWindowDuration()); + } + if (model.wasPropertyExplicitlySet("estimatedDuration")) { + this.estimatedDuration(model.getEstimatedDuration()); + } + if (model.wasPropertyExplicitlySet("timeHardDueDate")) { + this.timeHardDueDate(model.getTimeHardDueDate()); + } + if (model.wasPropertyExplicitlySet("canReschedule")) { + this.canReschedule(model.getCanReschedule()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("createdBy")) { + this.createdBy(model.getCreatedBy()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("correlationToken")) { + this.correlationToken(model.getCorrelationToken()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a + * namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a + * namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the maintenance event. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the maintenance event. + * + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of the instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceId") + private final String instanceId; + + /** + * The OCID of the instance. + * @return the value + **/ + public String getInstanceId() { + return instanceId; + } + + /** + * The OCID of the compartment that contains the instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the instance. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * This indicates the priority and allowed actions for this Maintenance. Higher priority forms of Maintenance have + * tighter restrictions and may not be rescheduled, while lower priority/severity Maintenance can be rescheduled, + * deferred, or even cancelled. Please see the + * [Instance Maintenance](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceCategory") + private final InstanceMaintenanceEvent.MaintenanceCategory maintenanceCategory; + + /** + * This indicates the priority and allowed actions for this Maintenance. Higher priority forms of Maintenance have + * tighter restrictions and may not be rescheduled, while lower priority/severity Maintenance can be rescheduled, + * deferred, or even cancelled. Please see the + * [Instance Maintenance](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + * + * @return the value + **/ + public InstanceMaintenanceEvent.MaintenanceCategory getMaintenanceCategory() { + return maintenanceCategory; + } + + /** + * This is the reason that Maintenance is being performed. See + * [Instance Maintenance](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceReason") + private final InstanceMaintenanceEvent.MaintenanceReason maintenanceReason; + + /** + * This is the reason that Maintenance is being performed. See + * [Instance Maintenance](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + * + * @return the value + **/ + public InstanceMaintenanceEvent.MaintenanceReason getMaintenanceReason() { + return maintenanceReason; + } + + /** + * This is the action that will be performed on the Instance by OCI when the Maintenance begins. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceAction") + private final InstanceMaintenanceEvent.InstanceAction instanceAction; + + /** + * This is the action that will be performed on the Instance by OCI when the Maintenance begins. + * + * @return the value + **/ + public InstanceMaintenanceEvent.InstanceAction getInstanceAction() { + return instanceAction; + } + + /** + * These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alternativeResolutionActions") + private final java.util.List + alternativeResolutionActions; + + /** + * These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance. + * + * @return the value + **/ + public java.util.List + getAlternativeResolutionActions() { + return alternativeResolutionActions; + } + + /** + * The time at which the Maintenance actually started. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The time at which the Maintenance actually started. + * + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The time at which the Maintenance actually finished. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private final java.util.Date timeFinished; + + /** + * The time at which the Maintenance actually finished. + * + * @return the value + **/ + public java.util.Date getTimeFinished() { + return timeFinished; + } + + /** + * The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + * this time. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeWindowStart") + private final java.util.Date timeWindowStart; + + /** + * The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + * this time. + * + * @return the value + **/ + public java.util.Date getTimeWindowStart() { + return timeWindowStart; + } + + /** + * The duration of the time window Maintenance is scheduled to begin within. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startWindowDuration") + private final String startWindowDuration; + + /** + * The duration of the time window Maintenance is scheduled to begin within. + * + * @return the value + **/ + public String getStartWindowDuration() { + return startWindowDuration; + } + + /** + * This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedDuration") + private final String estimatedDuration; + + /** + * This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state. + * + * @return the value + **/ + public String getEstimatedDuration() { + return estimatedDuration; + } + + /** + * It is the scheduled hard due date and time of the maintenance event. + * The maintenance event will happen at this time and the due date will not be extended. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeHardDueDate") + private final java.util.Date timeHardDueDate; + + /** + * It is the scheduled hard due date and time of the maintenance event. + * The maintenance event will happen at this time and the due date will not be extended. + * + * @return the value + **/ + public java.util.Date getTimeHardDueDate() { + return timeHardDueDate; + } + + /** + * Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("canReschedule") + private final Boolean canReschedule; + + /** + * Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate. + * + * @return the value + **/ + public Boolean getCanReschedule() { + return canReschedule; + } + + /** + * The date and time the maintenance event was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the maintenance event was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The current state of the maintenance event. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final InstanceMaintenanceEvent.LifecycleState lifecycleState; + + /** + * The current state of the maintenance event. + * + * @return the value + **/ + public InstanceMaintenanceEvent.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The creator of the maintenance event. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private final InstanceMaintenanceEvent.CreatedBy createdBy; + + /** + * The creator of the maintenance event. + * + * @return the value + **/ + public InstanceMaintenanceEvent.CreatedBy getCreatedBy() { + return createdBy; + } + + /** + * It is the descriptive information about the maintenance taking place on the customer instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * It is the descriptive information about the maintenance taking place on the customer instance. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * A unique identifier that will group Instances that have a relationship with one another and must be scheduled + * together for the Maintenance to proceed. Any Instances that have a relationship with one another from a Maintenance + * perspective will have a matching correlationToken. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("correlationToken") + private final String correlationToken; + + /** + * A unique identifier that will group Instances that have a relationship with one another and must be scheduled + * together for the Maintenance to proceed. Any Instances that have a relationship with one another from a Maintenance + * perspective will have a matching correlationToken. + * + * @return the value + **/ + public String getCorrelationToken() { + return correlationToken; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("InstanceMaintenanceEventSummary("); + sb.append("super=").append(super.toString()); + sb.append("definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", instanceId=").append(String.valueOf(this.instanceId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", maintenanceCategory=").append(String.valueOf(this.maintenanceCategory)); + sb.append(", maintenanceReason=").append(String.valueOf(this.maintenanceReason)); + sb.append(", instanceAction=").append(String.valueOf(this.instanceAction)); + sb.append(", alternativeResolutionActions=") + .append(String.valueOf(this.alternativeResolutionActions)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); + sb.append(", timeWindowStart=").append(String.valueOf(this.timeWindowStart)); + sb.append(", startWindowDuration=").append(String.valueOf(this.startWindowDuration)); + sb.append(", estimatedDuration=").append(String.valueOf(this.estimatedDuration)); + sb.append(", timeHardDueDate=").append(String.valueOf(this.timeHardDueDate)); + sb.append(", canReschedule=").append(String.valueOf(this.canReschedule)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", createdBy=").append(String.valueOf(this.createdBy)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", correlationToken=").append(String.valueOf(this.correlationToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof InstanceMaintenanceEventSummary)) { + return false; + } + + InstanceMaintenanceEventSummary other = (InstanceMaintenanceEventSummary) o; + return java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.instanceId, other.instanceId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.maintenanceCategory, other.maintenanceCategory) + && java.util.Objects.equals(this.maintenanceReason, other.maintenanceReason) + && java.util.Objects.equals(this.instanceAction, other.instanceAction) + && java.util.Objects.equals( + this.alternativeResolutionActions, other.alternativeResolutionActions) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeFinished, other.timeFinished) + && java.util.Objects.equals(this.timeWindowStart, other.timeWindowStart) + && java.util.Objects.equals(this.startWindowDuration, other.startWindowDuration) + && java.util.Objects.equals(this.estimatedDuration, other.estimatedDuration) + && java.util.Objects.equals(this.timeHardDueDate, other.timeHardDueDate) + && java.util.Objects.equals(this.canReschedule, other.canReschedule) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.createdBy, other.createdBy) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.correlationToken, other.correlationToken) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.instanceId == null ? 43 : this.instanceId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.maintenanceCategory == null + ? 43 + : this.maintenanceCategory.hashCode()); + result = + (result * PRIME) + + (this.maintenanceReason == null ? 43 : this.maintenanceReason.hashCode()); + result = + (result * PRIME) + + (this.instanceAction == null ? 43 : this.instanceAction.hashCode()); + result = + (result * PRIME) + + (this.alternativeResolutionActions == null + ? 43 + : this.alternativeResolutionActions.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); + result = + (result * PRIME) + + (this.timeWindowStart == null ? 43 : this.timeWindowStart.hashCode()); + result = + (result * PRIME) + + (this.startWindowDuration == null + ? 43 + : this.startWindowDuration.hashCode()); + result = + (result * PRIME) + + (this.estimatedDuration == null ? 43 : this.estimatedDuration.hashCode()); + result = + (result * PRIME) + + (this.timeHardDueDate == null ? 43 : this.timeHardDueDate.hashCode()); + result = + (result * PRIME) + + (this.canReschedule == null ? 43 : this.canReschedule.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.createdBy == null ? 43 : this.createdBy.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.correlationToken == null ? 43 : this.correlationToken.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchAttachParavirtualizedVolumeDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchAttachParavirtualizedVolumeDetails.java new file mode 100644 index 00000000000..bbb83a6cb4f --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchAttachParavirtualizedVolumeDetails.java @@ -0,0 +1,232 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.model; + +/** + * Details specific to PV type volume attachments. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = LaunchAttachParavirtualizedVolumeDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class LaunchAttachParavirtualizedVolumeDetails extends LaunchAttachVolumeDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("device") + private String device; + + public Builder device(String device) { + this.device = device; + this.__explicitlySet__.add("device"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isReadOnly") + private Boolean isReadOnly; + + public Builder isReadOnly(Boolean isReadOnly) { + this.isReadOnly = isReadOnly; + this.__explicitlySet__.add("isReadOnly"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isShareable") + private Boolean isShareable; + + public Builder isShareable(Boolean isShareable) { + this.isShareable = isShareable; + this.__explicitlySet__.add("isShareable"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("volumeId") + private String volumeId; + + public Builder volumeId(String volumeId) { + this.volumeId = volumeId; + this.__explicitlySet__.add("volumeId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("launchCreateVolumeDetails") + private LaunchCreateVolumeDetails launchCreateVolumeDetails; + + public Builder launchCreateVolumeDetails( + LaunchCreateVolumeDetails launchCreateVolumeDetails) { + this.launchCreateVolumeDetails = launchCreateVolumeDetails; + this.__explicitlySet__.add("launchCreateVolumeDetails"); + return this; + } + /** + * Whether to enable in-transit encryption for the data volume's paravirtualized attachment. The default value is false. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isPvEncryptionInTransitEnabled") + private Boolean isPvEncryptionInTransitEnabled; + + /** + * Whether to enable in-transit encryption for the data volume's paravirtualized attachment. The default value is false. + * @param isPvEncryptionInTransitEnabled the value to set + * @return this builder + **/ + public Builder isPvEncryptionInTransitEnabled(Boolean isPvEncryptionInTransitEnabled) { + this.isPvEncryptionInTransitEnabled = isPvEncryptionInTransitEnabled; + this.__explicitlySet__.add("isPvEncryptionInTransitEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public LaunchAttachParavirtualizedVolumeDetails build() { + LaunchAttachParavirtualizedVolumeDetails model = + new LaunchAttachParavirtualizedVolumeDetails( + this.device, + this.displayName, + this.isReadOnly, + this.isShareable, + this.volumeId, + this.launchCreateVolumeDetails, + this.isPvEncryptionInTransitEnabled); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(LaunchAttachParavirtualizedVolumeDetails model) { + if (model.wasPropertyExplicitlySet("device")) { + this.device(model.getDevice()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("isReadOnly")) { + this.isReadOnly(model.getIsReadOnly()); + } + if (model.wasPropertyExplicitlySet("isShareable")) { + this.isShareable(model.getIsShareable()); + } + if (model.wasPropertyExplicitlySet("volumeId")) { + this.volumeId(model.getVolumeId()); + } + if (model.wasPropertyExplicitlySet("launchCreateVolumeDetails")) { + this.launchCreateVolumeDetails(model.getLaunchCreateVolumeDetails()); + } + if (model.wasPropertyExplicitlySet("isPvEncryptionInTransitEnabled")) { + this.isPvEncryptionInTransitEnabled(model.getIsPvEncryptionInTransitEnabled()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public LaunchAttachParavirtualizedVolumeDetails( + String device, + String displayName, + Boolean isReadOnly, + Boolean isShareable, + String volumeId, + LaunchCreateVolumeDetails launchCreateVolumeDetails, + Boolean isPvEncryptionInTransitEnabled) { + super(device, displayName, isReadOnly, isShareable, volumeId, launchCreateVolumeDetails); + this.isPvEncryptionInTransitEnabled = isPvEncryptionInTransitEnabled; + } + + /** + * Whether to enable in-transit encryption for the data volume's paravirtualized attachment. The default value is false. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isPvEncryptionInTransitEnabled") + private final Boolean isPvEncryptionInTransitEnabled; + + /** + * Whether to enable in-transit encryption for the data volume's paravirtualized attachment. The default value is false. + * @return the value + **/ + public Boolean getIsPvEncryptionInTransitEnabled() { + return isPvEncryptionInTransitEnabled; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("LaunchAttachParavirtualizedVolumeDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", isPvEncryptionInTransitEnabled=") + .append(String.valueOf(this.isPvEncryptionInTransitEnabled)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof LaunchAttachParavirtualizedVolumeDetails)) { + return false; + } + + LaunchAttachParavirtualizedVolumeDetails other = + (LaunchAttachParavirtualizedVolumeDetails) o; + return java.util.Objects.equals( + this.isPvEncryptionInTransitEnabled, other.isPvEncryptionInTransitEnabled) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.isPvEncryptionInTransitEnabled == null + ? 43 + : this.isPvEncryptionInTransitEnabled.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchAttachVolumeDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchAttachVolumeDetails.java index e80d3a93948..a14c20ab4f8 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchAttachVolumeDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchAttachVolumeDetails.java @@ -22,6 +22,10 @@ defaultImpl = LaunchAttachVolumeDetails.class ) @com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = LaunchAttachParavirtualizedVolumeDetails.class, + name = "paravirtualized" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = LaunchAttachIScsiVolumeDetails.class, name = "iscsi" diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceDetails.java index 38252fe6d60..83fdf71fd73 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceDetails.java @@ -31,6 +31,7 @@ public final class LaunchInstanceDetails "createVnicDetails", "dedicatedVmHostId", "definedTags", + "securityAttributes", "displayName", "extendedMetadata", "faultDomain", @@ -53,7 +54,8 @@ public final class LaunchInstanceDetails "launchVolumeAttachments", "isPvEncryptionInTransitEnabled", "platformConfig", - "instanceConfigurationId" + "instanceConfigurationId", + "licensingConfigs" }) public LaunchInstanceDetails( String availabilityDomain, @@ -62,6 +64,7 @@ public LaunchInstanceDetails( CreateVnicDetails createVnicDetails, String dedicatedVmHostId, java.util.Map> definedTags, + java.util.Map> securityAttributes, String displayName, java.util.Map extendedMetadata, String faultDomain, @@ -84,7 +87,8 @@ public LaunchInstanceDetails( java.util.List launchVolumeAttachments, Boolean isPvEncryptionInTransitEnabled, LaunchInstancePlatformConfig platformConfig, - String instanceConfigurationId) { + String instanceConfigurationId, + java.util.List licensingConfigs) { super(); this.availabilityDomain = availabilityDomain; this.capacityReservationId = capacityReservationId; @@ -92,6 +96,7 @@ public LaunchInstanceDetails( this.createVnicDetails = createVnicDetails; this.dedicatedVmHostId = dedicatedVmHostId; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.displayName = displayName; this.extendedMetadata = extendedMetadata; this.faultDomain = faultDomain; @@ -115,6 +120,7 @@ public LaunchInstanceDetails( this.isPvEncryptionInTransitEnabled = isPvEncryptionInTransitEnabled; this.platformConfig = platformConfig; this.instanceConfigurationId = instanceConfigurationId; + this.licensingConfigs = licensingConfigs; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -231,6 +237,29 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * A user-friendly name. Does not have to be unique, and it's changeable. * Avoid entering confidential information. @@ -786,6 +815,23 @@ public Builder instanceConfigurationId(String instanceConfigurationId) { this.__explicitlySet__.add("instanceConfigurationId"); return this; } + /** + * List of licensing configurations associated with target launch values. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licensingConfigs") + private java.util.List licensingConfigs; + + /** + * List of licensing configurations associated with target launch values. + * @param licensingConfigs the value to set + * @return this builder + **/ + public Builder licensingConfigs( + java.util.List licensingConfigs) { + this.licensingConfigs = licensingConfigs; + this.__explicitlySet__.add("licensingConfigs"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -799,6 +845,7 @@ public LaunchInstanceDetails build() { this.createVnicDetails, this.dedicatedVmHostId, this.definedTags, + this.securityAttributes, this.displayName, this.extendedMetadata, this.faultDomain, @@ -821,7 +868,8 @@ public LaunchInstanceDetails build() { this.launchVolumeAttachments, this.isPvEncryptionInTransitEnabled, this.platformConfig, - this.instanceConfigurationId); + this.instanceConfigurationId, + this.licensingConfigs); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -848,6 +896,9 @@ public Builder copy(LaunchInstanceDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } @@ -917,6 +968,9 @@ public Builder copy(LaunchInstanceDetails model) { if (model.wasPropertyExplicitlySet("instanceConfigurationId")) { this.instanceConfigurationId(model.getInstanceConfigurationId()); } + if (model.wasPropertyExplicitlySet("licensingConfigs")) { + this.licensingConfigs(model.getLicensingConfigs()); + } return this; } } @@ -1031,6 +1085,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * A user-friendly name. Does not have to be unique, and it's changeable. * Avoid entering confidential information. @@ -1537,6 +1611,20 @@ public String getInstanceConfigurationId() { return instanceConfigurationId; } + /** + * List of licensing configurations associated with target launch values. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licensingConfigs") + private final java.util.List licensingConfigs; + + /** + * List of licensing configurations associated with target launch values. + * @return the value + **/ + public java.util.List getLicensingConfigs() { + return licensingConfigs; + } + @Override public String toString() { return this.toString(true); @@ -1557,6 +1645,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", createVnicDetails=").append(String.valueOf(this.createVnicDetails)); sb.append(", dedicatedVmHostId=").append(String.valueOf(this.dedicatedVmHostId)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", extendedMetadata=").append(String.valueOf(this.extendedMetadata)); sb.append(", faultDomain=").append(String.valueOf(this.faultDomain)); @@ -1585,6 +1674,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", platformConfig=").append(String.valueOf(this.platformConfig)); sb.append(", instanceConfigurationId=") .append(String.valueOf(this.instanceConfigurationId)); + sb.append(", licensingConfigs=").append(String.valueOf(this.licensingConfigs)); sb.append(")"); return sb.toString(); } @@ -1605,6 +1695,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.createVnicDetails, other.createVnicDetails) && java.util.Objects.equals(this.dedicatedVmHostId, other.dedicatedVmHostId) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.extendedMetadata, other.extendedMetadata) && java.util.Objects.equals(this.faultDomain, other.faultDomain) @@ -1633,6 +1724,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.platformConfig, other.platformConfig) && java.util.Objects.equals( this.instanceConfigurationId, other.instanceConfigurationId) + && java.util.Objects.equals(this.licensingConfigs, other.licensingConfigs) && super.equals(other); } @@ -1660,6 +1752,11 @@ public int hashCode() { (result * PRIME) + (this.dedicatedVmHostId == null ? 43 : this.dedicatedVmHostId.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) @@ -1721,6 +1818,9 @@ public int hashCode() { + (this.instanceConfigurationId == null ? 43 : this.instanceConfigurationId.hashCode()); + result = + (result * PRIME) + + (this.licensingConfigs == null ? 43 : this.licensingConfigs.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceLicensingConfig.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceLicensingConfig.java new file mode 100644 index 00000000000..e33650d95be --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceLicensingConfig.java @@ -0,0 +1,197 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.model; + +/** + * The license config requested for the instance. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type", + defaultImpl = LaunchInstanceLicensingConfig.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = LaunchInstanceWindowsLicensingConfig.class, + name = "WINDOWS" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class LaunchInstanceLicensingConfig + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"licenseType"}) + protected LaunchInstanceLicensingConfig(LicenseType licenseType) { + super(); + this.licenseType = licenseType; + } + + /** + * License Type for the OS license. + * * {@code OCI_PROVIDED} - OCI provided license (e.g. metered $/OCPU-hour). + * * {@code BRING_YOUR_OWN_LICENSE} - Bring your own license. + * + **/ + public enum LicenseType { + OciProvided("OCI_PROVIDED"), + BringYourOwnLicense("BRING_YOUR_OWN_LICENSE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LicenseType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LicenseType v : LicenseType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LicenseType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LicenseType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LicenseType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * License Type for the OS license. + * * {@code OCI_PROVIDED} - OCI provided license (e.g. metered $/OCPU-hour). + * * {@code BRING_YOUR_OWN_LICENSE} - Bring your own license. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseType") + private final LicenseType licenseType; + + /** + * License Type for the OS license. + * * {@code OCI_PROVIDED} - OCI provided license (e.g. metered $/OCPU-hour). + * * {@code BRING_YOUR_OWN_LICENSE} - Bring your own license. + * + * @return the value + **/ + public LicenseType getLicenseType() { + return licenseType; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("LaunchInstanceLicensingConfig("); + sb.append("super=").append(super.toString()); + sb.append("licenseType=").append(String.valueOf(this.licenseType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof LaunchInstanceLicensingConfig)) { + return false; + } + + LaunchInstanceLicensingConfig other = (LaunchInstanceLicensingConfig) o; + return java.util.Objects.equals(this.licenseType, other.licenseType) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.licenseType == null ? 43 : this.licenseType.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Operating System type of the Configuration. + **/ + public enum Type { + Windows("WINDOWS"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceWindowsLicensingConfig.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceWindowsLicensingConfig.java new file mode 100644 index 00000000000..3e006c0eec3 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceWindowsLicensingConfig.java @@ -0,0 +1,113 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.model; + +/** + * The default windows licensing config. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = LaunchInstanceWindowsLicensingConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class LaunchInstanceWindowsLicensingConfig extends LaunchInstanceLicensingConfig { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("licenseType") + private LicenseType licenseType; + + public Builder licenseType(LicenseType licenseType) { + this.licenseType = licenseType; + this.__explicitlySet__.add("licenseType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public LaunchInstanceWindowsLicensingConfig build() { + LaunchInstanceWindowsLicensingConfig model = + new LaunchInstanceWindowsLicensingConfig(this.licenseType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(LaunchInstanceWindowsLicensingConfig model) { + if (model.wasPropertyExplicitlySet("licenseType")) { + this.licenseType(model.getLicenseType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public LaunchInstanceWindowsLicensingConfig(LicenseType licenseType) { + super(licenseType); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("LaunchInstanceWindowsLicensingConfig("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof LaunchInstanceWindowsLicensingConfig)) { + return false; + } + + LaunchInstanceWindowsLicensingConfig other = (LaunchInstanceWindowsLicensingConfig) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/LicensingConfig.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/LicensingConfig.java new file mode 100644 index 00000000000..af652eccfd4 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/LicensingConfig.java @@ -0,0 +1,316 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.model; + +/** + * Configuration of the Operating System license. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = LicensingConfig.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class LicensingConfig extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"type", "licenseType", "osVersion"}) + public LicensingConfig(Type type, LicenseType licenseType, String osVersion) { + super(); + this.type = type; + this.licenseType = licenseType; + this.osVersion = osVersion; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Operating System type of the Configuration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * Operating System type of the Configuration. + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * License Type for the OS license. + * * {@code OCI_PROVIDED} - OCI provided license (e.g. metered $/OCPU-hour). + * * {@code BRING_YOUR_OWN_LICENSE} - Bring your own license. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseType") + private LicenseType licenseType; + + /** + * License Type for the OS license. + * * {@code OCI_PROVIDED} - OCI provided license (e.g. metered $/OCPU-hour). + * * {@code BRING_YOUR_OWN_LICENSE} - Bring your own license. + * + * @param licenseType the value to set + * @return this builder + **/ + public Builder licenseType(LicenseType licenseType) { + this.licenseType = licenseType; + this.__explicitlySet__.add("licenseType"); + return this; + } + /** + * The Operating System version of the license config. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osVersion") + private String osVersion; + + /** + * The Operating System version of the license config. + * @param osVersion the value to set + * @return this builder + **/ + public Builder osVersion(String osVersion) { + this.osVersion = osVersion; + this.__explicitlySet__.add("osVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public LicensingConfig build() { + LicensingConfig model = + new LicensingConfig(this.type, this.licenseType, this.osVersion); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(LicensingConfig model) { + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("licenseType")) { + this.licenseType(model.getLicenseType()); + } + if (model.wasPropertyExplicitlySet("osVersion")) { + this.osVersion(model.getOsVersion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Operating System type of the Configuration. + **/ + public enum Type { + Windows("WINDOWS"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * Operating System type of the Configuration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * Operating System type of the Configuration. + * @return the value + **/ + public Type getType() { + return type; + } + + /** + * License Type for the OS license. + * * {@code OCI_PROVIDED} - OCI provided license (e.g. metered $/OCPU-hour). + * * {@code BRING_YOUR_OWN_LICENSE} - Bring your own license. + * + **/ + public enum LicenseType { + OciProvided("OCI_PROVIDED"), + BringYourOwnLicense("BRING_YOUR_OWN_LICENSE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LicenseType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LicenseType v : LicenseType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LicenseType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LicenseType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LicenseType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * License Type for the OS license. + * * {@code OCI_PROVIDED} - OCI provided license (e.g. metered $/OCPU-hour). + * * {@code BRING_YOUR_OWN_LICENSE} - Bring your own license. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseType") + private final LicenseType licenseType; + + /** + * License Type for the OS license. + * * {@code OCI_PROVIDED} - OCI provided license (e.g. metered $/OCPU-hour). + * * {@code BRING_YOUR_OWN_LICENSE} - Bring your own license. + * + * @return the value + **/ + public LicenseType getLicenseType() { + return licenseType; + } + + /** + * The Operating System version of the license config. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osVersion") + private final String osVersion; + + /** + * The Operating System version of the license config. + * @return the value + **/ + public String getOsVersion() { + return osVersion; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("LicensingConfig("); + sb.append("super=").append(super.toString()); + sb.append("type=").append(String.valueOf(this.type)); + sb.append(", licenseType=").append(String.valueOf(this.licenseType)); + sb.append(", osVersion=").append(String.valueOf(this.osVersion)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof LicensingConfig)) { + return false; + } + + LicensingConfig other = (LicensingConfig) o; + return java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.licenseType, other.licenseType) + && java.util.Objects.equals(this.osVersion, other.osVersion) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + (this.licenseType == null ? 43 : this.licenseType.hashCode()); + result = (result * PRIME) + (this.osVersion == null ? 43 : this.osVersion.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/ServiceGateway.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ServiceGateway.java index 8ab22a3f25f..e23828e79c8 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/ServiceGateway.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ServiceGateway.java @@ -7,10 +7,10 @@ /** * Represents a router that lets your VCN privately access specific Oracle services such as Object * Storage without exposing the VCN to the public internet. Traffic leaving the VCN and destined - * for a supported Oracle service (see {@link #listServices(ListServicesRequest) listServices}) is - * routed through the service gateway and does not traverse the internet. The instances in the VCN - * do not need to have public IP addresses nor be in a public subnet. The VCN does not need an internet gateway - * for this traffic. For more information, see + * for a supported Oracle service (use the {@link #listServices(ListServicesRequest) listServices} operation to + * find available service CIDR labels) is routed through the service gateway and does not traverse the internet. + * The instances in the VCN do not need to have public IP addresses nor be in a public subnet. The VCN does not + * need an internet gateway for this traffic. For more information, see * [Access to Oracle Services: Service Gateway](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/servicegateway.htm). *

* To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstanceDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstanceDetails.java index c90f840ac56..992fef9bf11 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstanceDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstanceDetails.java @@ -25,6 +25,7 @@ public final class UpdateInstanceDetails @java.beans.ConstructorProperties({ "capacityReservationId", "definedTags", + "securityAttributes", "displayName", "freeformTags", "agentConfig", @@ -40,11 +41,13 @@ public final class UpdateInstanceDetails "availabilityConfig", "timeMaintenanceRebootDue", "dedicatedVmHostId", - "platformConfig" + "platformConfig", + "licensingConfigs" }) public UpdateInstanceDetails( String capacityReservationId, java.util.Map> definedTags, + java.util.Map> securityAttributes, String displayName, java.util.Map freeformTags, UpdateInstanceAgentConfigDetails agentConfig, @@ -60,10 +63,12 @@ public UpdateInstanceDetails( UpdateInstanceAvailabilityConfigDetails availabilityConfig, java.util.Date timeMaintenanceRebootDue, String dedicatedVmHostId, - UpdateInstancePlatformConfig platformConfig) { + UpdateInstancePlatformConfig platformConfig, + java.util.List licensingConfigs) { super(); this.capacityReservationId = capacityReservationId; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.displayName = displayName; this.freeformTags = freeformTags; this.agentConfig = agentConfig; @@ -80,6 +85,7 @@ public UpdateInstanceDetails( this.timeMaintenanceRebootDue = timeMaintenanceRebootDue; this.dedicatedVmHostId = dedicatedVmHostId; this.platformConfig = platformConfig; + this.licensingConfigs = licensingConfigs; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -131,6 +137,29 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * A user-friendly name. Does not have to be unique, and it's changeable. * Avoid entering confidential information. @@ -514,6 +543,23 @@ public Builder platformConfig(UpdateInstancePlatformConfig platformConfig) { this.__explicitlySet__.add("platformConfig"); return this; } + /** + * The list of liscensing configurations with target update values. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licensingConfigs") + private java.util.List licensingConfigs; + + /** + * The list of liscensing configurations with target update values. + * @param licensingConfigs the value to set + * @return this builder + **/ + public Builder licensingConfigs( + java.util.List licensingConfigs) { + this.licensingConfigs = licensingConfigs; + this.__explicitlySet__.add("licensingConfigs"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -523,6 +569,7 @@ public UpdateInstanceDetails build() { new UpdateInstanceDetails( this.capacityReservationId, this.definedTags, + this.securityAttributes, this.displayName, this.freeformTags, this.agentConfig, @@ -538,7 +585,8 @@ public UpdateInstanceDetails build() { this.availabilityConfig, this.timeMaintenanceRebootDue, this.dedicatedVmHostId, - this.platformConfig); + this.platformConfig, + this.licensingConfigs); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -553,6 +601,9 @@ public Builder copy(UpdateInstanceDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } @@ -601,6 +652,9 @@ public Builder copy(UpdateInstanceDetails model) { if (model.wasPropertyExplicitlySet("platformConfig")) { this.platformConfig(model.getPlatformConfig()); } + if (model.wasPropertyExplicitlySet("licensingConfigs")) { + this.licensingConfigs(model.getLicensingConfigs()); + } return this; } } @@ -658,6 +712,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * A user-friendly name. Does not have to be unique, and it's changeable. * Avoid entering confidential information. @@ -1048,6 +1122,20 @@ public UpdateInstancePlatformConfig getPlatformConfig() { return platformConfig; } + /** + * The list of liscensing configurations with target update values. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licensingConfigs") + private final java.util.List licensingConfigs; + + /** + * The list of liscensing configurations with target update values. + * @return the value + **/ + public java.util.List getLicensingConfigs() { + return licensingConfigs; + } + @Override public String toString() { return this.toString(true); @@ -1064,6 +1152,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("capacityReservationId=").append(String.valueOf(this.capacityReservationId)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", agentConfig=").append(String.valueOf(this.agentConfig)); @@ -1082,6 +1171,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.timeMaintenanceRebootDue)); sb.append(", dedicatedVmHostId=").append(String.valueOf(this.dedicatedVmHostId)); sb.append(", platformConfig=").append(String.valueOf(this.platformConfig)); + sb.append(", licensingConfigs=").append(String.valueOf(this.licensingConfigs)); sb.append(")"); return sb.toString(); } @@ -1098,6 +1188,7 @@ public boolean equals(Object o) { UpdateInstanceDetails other = (UpdateInstanceDetails) o; return java.util.Objects.equals(this.capacityReservationId, other.capacityReservationId) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.agentConfig, other.agentConfig) @@ -1116,6 +1207,7 @@ public boolean equals(Object o) { this.timeMaintenanceRebootDue, other.timeMaintenanceRebootDue) && java.util.Objects.equals(this.dedicatedVmHostId, other.dedicatedVmHostId) && java.util.Objects.equals(this.platformConfig, other.platformConfig) + && java.util.Objects.equals(this.licensingConfigs, other.licensingConfigs) && super.equals(other); } @@ -1129,6 +1221,11 @@ public int hashCode() { ? 43 : this.capacityReservationId.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.agentConfig == null ? 43 : this.agentConfig.hashCode()); @@ -1169,6 +1266,9 @@ public int hashCode() { result = (result * PRIME) + (this.platformConfig == null ? 43 : this.platformConfig.hashCode()); + result = + (result * PRIME) + + (this.licensingConfigs == null ? 43 : this.licensingConfigs.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstanceLicensingConfig.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstanceLicensingConfig.java new file mode 100644 index 00000000000..35ef433b950 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstanceLicensingConfig.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.model; + +/** + * The target license config to be updated on the instance. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type", + defaultImpl = UpdateInstanceLicensingConfig.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = UpdateInstanceWindowsLicensingConfig.class, + name = "WINDOWS" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class UpdateInstanceLicensingConfig + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"licenseType"}) + protected UpdateInstanceLicensingConfig(LicenseType licenseType) { + super(); + this.licenseType = licenseType; + } + + /** + * License Type for the OS license. + * * {@code OCI_PROVIDED} - OCI provided license (e.g. metered $/OCPU-hour). + * * {@code BRING_YOUR_OWN_LICENSE} - Bring your own license. + * + **/ + public enum LicenseType { + OciProvided("OCI_PROVIDED"), + BringYourOwnLicense("BRING_YOUR_OWN_LICENSE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LicenseType v : LicenseType.values()) { + map.put(v.getValue(), v); + } + } + + LicenseType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LicenseType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid LicenseType: " + key); + } + }; + /** + * License Type for the OS license. + * * {@code OCI_PROVIDED} - OCI provided license (e.g. metered $/OCPU-hour). + * * {@code BRING_YOUR_OWN_LICENSE} - Bring your own license. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseType") + private final LicenseType licenseType; + + /** + * License Type for the OS license. + * * {@code OCI_PROVIDED} - OCI provided license (e.g. metered $/OCPU-hour). + * * {@code BRING_YOUR_OWN_LICENSE} - Bring your own license. + * + * @return the value + **/ + public LicenseType getLicenseType() { + return licenseType; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateInstanceLicensingConfig("); + sb.append("super=").append(super.toString()); + sb.append("licenseType=").append(String.valueOf(this.licenseType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateInstanceLicensingConfig)) { + return false; + } + + UpdateInstanceLicensingConfig other = (UpdateInstanceLicensingConfig) o; + return java.util.Objects.equals(this.licenseType, other.licenseType) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.licenseType == null ? 43 : this.licenseType.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Operating system type of the configuration. + **/ + public enum Type { + Windows("WINDOWS"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + map.put(v.getValue(), v); + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Type: " + key); + } + }; +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstanceMaintenanceEventDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstanceMaintenanceEventDetails.java new file mode 100644 index 00000000000..100d1d3a1d9 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstanceMaintenanceEventDetails.java @@ -0,0 +1,440 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.model; + +/** + * Specifies the properties for updating maintenance due date. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateInstanceMaintenanceEventDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateInstanceMaintenanceEventDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "timeWindowStart", + "alternativeResolutionAction", + "canDeleteLocalStorage", + "displayName", + "definedTags", + "freeformTags" + }) + public UpdateInstanceMaintenanceEventDetails( + java.util.Date timeWindowStart, + InstanceMaintenanceAlternativeResolutionActions alternativeResolutionAction, + Boolean canDeleteLocalStorage, + String displayName, + java.util.Map> definedTags, + java.util.Map freeformTags) { + super(); + this.timeWindowStart = timeWindowStart; + this.alternativeResolutionAction = alternativeResolutionAction; + this.canDeleteLocalStorage = canDeleteLocalStorage; + this.displayName = displayName; + this.definedTags = definedTags; + this.freeformTags = freeformTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + * this time. + *

+ * The timeWindowEnd is automatically calculated based on the maintenanceReason and the instanceAction. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeWindowStart") + private java.util.Date timeWindowStart; + + /** + * The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + * this time. + *

+ * The timeWindowEnd is automatically calculated based on the maintenanceReason and the instanceAction. + * + * @param timeWindowStart the value to set + * @return this builder + **/ + public Builder timeWindowStart(java.util.Date timeWindowStart) { + this.timeWindowStart = timeWindowStart; + this.__explicitlySet__.add("timeWindowStart"); + return this; + } + /** + * One of the alternativeResolutionActions that was provided in the InstanceMaintenanceEvent. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alternativeResolutionAction") + private InstanceMaintenanceAlternativeResolutionActions alternativeResolutionAction; + + /** + * One of the alternativeResolutionActions that was provided in the InstanceMaintenanceEvent. + * + * @param alternativeResolutionAction the value to set + * @return this builder + **/ + public Builder alternativeResolutionAction( + InstanceMaintenanceAlternativeResolutionActions alternativeResolutionAction) { + this.alternativeResolutionAction = alternativeResolutionAction; + this.__explicitlySet__.add("alternativeResolutionAction"); + return this; + } + /** + * This field is only applicable when setting the alternativeResolutionAction. + *

+ * For Instances that have local storage, this must be set to true to verify that the local storage + * will be deleted during the migration. For instances without, this parameter has no effect. + *

+ * In cases where the local storage will be lost, this parameter must be set or the request will fail. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("canDeleteLocalStorage") + private Boolean canDeleteLocalStorage; + + /** + * This field is only applicable when setting the alternativeResolutionAction. + *

+ * For Instances that have local storage, this must be set to true to verify that the local storage + * will be deleted during the migration. For instances without, this parameter has no effect. + *

+ * In cases where the local storage will be lost, this parameter must be set or the request will fail. + * + * @param canDeleteLocalStorage the value to set + * @return this builder + **/ + public Builder canDeleteLocalStorage(Boolean canDeleteLocalStorage) { + this.canDeleteLocalStorage = canDeleteLocalStorage; + this.__explicitlySet__.add("canDeleteLocalStorage"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a + * namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a + * namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateInstanceMaintenanceEventDetails build() { + UpdateInstanceMaintenanceEventDetails model = + new UpdateInstanceMaintenanceEventDetails( + this.timeWindowStart, + this.alternativeResolutionAction, + this.canDeleteLocalStorage, + this.displayName, + this.definedTags, + this.freeformTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateInstanceMaintenanceEventDetails model) { + if (model.wasPropertyExplicitlySet("timeWindowStart")) { + this.timeWindowStart(model.getTimeWindowStart()); + } + if (model.wasPropertyExplicitlySet("alternativeResolutionAction")) { + this.alternativeResolutionAction(model.getAlternativeResolutionAction()); + } + if (model.wasPropertyExplicitlySet("canDeleteLocalStorage")) { + this.canDeleteLocalStorage(model.getCanDeleteLocalStorage()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + * this time. + *

+ * The timeWindowEnd is automatically calculated based on the maintenanceReason and the instanceAction. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeWindowStart") + private final java.util.Date timeWindowStart; + + /** + * The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + * this time. + *

+ * The timeWindowEnd is automatically calculated based on the maintenanceReason and the instanceAction. + * + * @return the value + **/ + public java.util.Date getTimeWindowStart() { + return timeWindowStart; + } + + /** + * One of the alternativeResolutionActions that was provided in the InstanceMaintenanceEvent. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alternativeResolutionAction") + private final InstanceMaintenanceAlternativeResolutionActions alternativeResolutionAction; + + /** + * One of the alternativeResolutionActions that was provided in the InstanceMaintenanceEvent. + * + * @return the value + **/ + public InstanceMaintenanceAlternativeResolutionActions getAlternativeResolutionAction() { + return alternativeResolutionAction; + } + + /** + * This field is only applicable when setting the alternativeResolutionAction. + *

+ * For Instances that have local storage, this must be set to true to verify that the local storage + * will be deleted during the migration. For instances without, this parameter has no effect. + *

+ * In cases where the local storage will be lost, this parameter must be set or the request will fail. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("canDeleteLocalStorage") + private final Boolean canDeleteLocalStorage; + + /** + * This field is only applicable when setting the alternativeResolutionAction. + *

+ * For Instances that have local storage, this must be set to true to verify that the local storage + * will be deleted during the migration. For instances without, this parameter has no effect. + *

+ * In cases where the local storage will be lost, this parameter must be set or the request will fail. + * + * @return the value + **/ + public Boolean getCanDeleteLocalStorage() { + return canDeleteLocalStorage; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a + * namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a + * namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateInstanceMaintenanceEventDetails("); + sb.append("super=").append(super.toString()); + sb.append("timeWindowStart=").append(String.valueOf(this.timeWindowStart)); + sb.append(", alternativeResolutionAction=") + .append(String.valueOf(this.alternativeResolutionAction)); + sb.append(", canDeleteLocalStorage=").append(String.valueOf(this.canDeleteLocalStorage)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateInstanceMaintenanceEventDetails)) { + return false; + } + + UpdateInstanceMaintenanceEventDetails other = (UpdateInstanceMaintenanceEventDetails) o; + return java.util.Objects.equals(this.timeWindowStart, other.timeWindowStart) + && java.util.Objects.equals( + this.alternativeResolutionAction, other.alternativeResolutionAction) + && java.util.Objects.equals(this.canDeleteLocalStorage, other.canDeleteLocalStorage) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.timeWindowStart == null ? 43 : this.timeWindowStart.hashCode()); + result = + (result * PRIME) + + (this.alternativeResolutionAction == null + ? 43 + : this.alternativeResolutionAction.hashCode()); + result = + (result * PRIME) + + (this.canDeleteLocalStorage == null + ? 43 + : this.canDeleteLocalStorage.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstanceWindowsLicensingConfig.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstanceWindowsLicensingConfig.java new file mode 100644 index 00000000000..8a613467d71 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstanceWindowsLicensingConfig.java @@ -0,0 +1,114 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.model; + +/** + * The default windows licensing config. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateInstanceWindowsLicensingConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateInstanceWindowsLicensingConfig extends UpdateInstanceLicensingConfig { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("licenseType") + private LicenseType licenseType; + + public Builder licenseType(LicenseType licenseType) { + this.licenseType = licenseType; + this.__explicitlySet__.add("licenseType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateInstanceWindowsLicensingConfig build() { + UpdateInstanceWindowsLicensingConfig model = + new UpdateInstanceWindowsLicensingConfig(this.licenseType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateInstanceWindowsLicensingConfig model) { + if (model.wasPropertyExplicitlySet("licenseType")) { + this.licenseType(model.getLicenseType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public UpdateInstanceWindowsLicensingConfig(LicenseType licenseType) { + super(licenseType); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateInstanceWindowsLicensingConfig("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateInstanceWindowsLicensingConfig)) { + return false; + } + + UpdateInstanceWindowsLicensingConfig other = (UpdateInstanceWindowsLicensingConfig) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVcnDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVcnDetails.java index 7bb4558eb7a..9d64989c763 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVcnDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVcnDetails.java @@ -19,15 +19,22 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class UpdateVcnDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"definedTags", "displayName", "freeformTags"}) + @java.beans.ConstructorProperties({ + "definedTags", + "displayName", + "freeformTags", + "securityAttributes" + }) public UpdateVcnDetails( java.util.Map> definedTags, String displayName, - java.util.Map freeformTags) { + java.util.Map freeformTags, + java.util.Map> securityAttributes) { super(); this.definedTags = definedTags; this.displayName = displayName; this.freeformTags = freeformTags; + this.securityAttributes = securityAttributes; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -101,13 +108,40 @@ public Builder freeformTags(java.util.Map freeformTags) { this.__explicitlySet__.add("freeformTags"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public UpdateVcnDetails build() { UpdateVcnDetails model = - new UpdateVcnDetails(this.definedTags, this.displayName, this.freeformTags); + new UpdateVcnDetails( + this.definedTags, + this.displayName, + this.freeformTags, + this.securityAttributes); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -125,6 +159,9 @@ public Builder copy(UpdateVcnDetails model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } return this; } } @@ -202,6 +239,26 @@ public java.util.Map getFreeformTags() { return freeformTags; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + @Override public String toString() { return this.toString(true); @@ -219,6 +276,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("definedTags=").append(String.valueOf(this.definedTags)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(")"); return sb.toString(); } @@ -236,6 +294,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && super.equals(other); } @@ -246,6 +305,11 @@ public int hashCode() { result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVnicDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVnicDetails.java index dbe095f2547..6c87d6194d1 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVnicDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVnicDetails.java @@ -25,6 +25,7 @@ public final class UpdateVnicDetails extends com.oracle.bmc.http.internal.Explic "definedTags", "displayName", "freeformTags", + "securityAttributes", "hostnameLabel", "nsgIds", "skipSourceDestCheck" @@ -33,6 +34,7 @@ public UpdateVnicDetails( java.util.Map> definedTags, String displayName, java.util.Map freeformTags, + java.util.Map> securityAttributes, String hostnameLabel, java.util.List nsgIds, Boolean skipSourceDestCheck) { @@ -40,6 +42,7 @@ public UpdateVnicDetails( this.definedTags = definedTags; this.displayName = displayName; this.freeformTags = freeformTags; + this.securityAttributes = securityAttributes; this.hostnameLabel = hostnameLabel; this.nsgIds = nsgIds; this.skipSourceDestCheck = skipSourceDestCheck; @@ -116,6 +119,29 @@ public Builder freeformTags(java.util.Map freeformTags) { this.__explicitlySet__.add("freeformTags"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname * portion of the primary private IP's fully qualified domain name (FQDN) @@ -236,6 +262,7 @@ public UpdateVnicDetails build() { this.definedTags, this.displayName, this.freeformTags, + this.securityAttributes, this.hostnameLabel, this.nsgIds, this.skipSourceDestCheck); @@ -256,6 +283,9 @@ public Builder copy(UpdateVnicDetails model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("hostnameLabel")) { this.hostnameLabel(model.getHostnameLabel()); } @@ -342,6 +372,26 @@ public java.util.Map getFreeformTags() { return freeformTags; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname * portion of the primary private IP's fully qualified domain name (FQDN) @@ -463,6 +513,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("definedTags=").append(String.valueOf(this.definedTags)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", hostnameLabel=").append(String.valueOf(this.hostnameLabel)); sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); sb.append(", skipSourceDestCheck=").append(String.valueOf(this.skipSourceDestCheck)); @@ -483,6 +534,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.hostnameLabel, other.hostnameLabel) && java.util.Objects.equals(this.nsgIds, other.nsgIds) && java.util.Objects.equals(this.skipSourceDestCheck, other.skipSourceDestCheck) @@ -496,6 +548,11 @@ public int hashCode() { result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.hostnameLabel == null ? 43 : this.hostnameLabel.hashCode()); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Vcn.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Vcn.java index 810c52294e2..a771f57753c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Vcn.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Vcn.java @@ -38,6 +38,7 @@ public final class Vcn extends com.oracle.bmc.http.internal.ExplicitlySetBmcMode "displayName", "dnsLabel", "freeformTags", + "securityAttributes", "id", "ipv6CidrBlocks", "lifecycleState", @@ -57,6 +58,7 @@ public Vcn( String displayName, String dnsLabel, java.util.Map freeformTags, + java.util.Map> securityAttributes, String id, java.util.List ipv6CidrBlocks, LifecycleState lifecycleState, @@ -75,6 +77,7 @@ public Vcn( this.displayName = displayName; this.dnsLabel = dnsLabel; this.freeformTags = freeformTags; + this.securityAttributes = securityAttributes; this.id = id; this.ipv6CidrBlocks = ipv6CidrBlocks; this.lifecycleState = lifecycleState; @@ -337,6 +340,29 @@ public Builder freeformTags(java.util.Map freeformTags) { this.__explicitlySet__.add("freeformTags"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * The VCN's Oracle ID ([OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). **/ @@ -460,6 +486,7 @@ public Vcn build() { this.displayName, this.dnsLabel, this.freeformTags, + this.securityAttributes, this.id, this.ipv6CidrBlocks, this.lifecycleState, @@ -509,6 +536,9 @@ public Builder copy(Vcn model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("id")) { this.id(model.getId()); } @@ -767,6 +797,26 @@ public java.util.Map getFreeformTags() { return freeformTags; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The VCN's Oracle ID ([OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). **/ @@ -938,6 +988,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", dnsLabel=").append(String.valueOf(this.dnsLabel)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", id=").append(String.valueOf(this.id)); sb.append(", ipv6CidrBlocks=").append(String.valueOf(this.ipv6CidrBlocks)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); @@ -969,6 +1020,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.dnsLabel, other.dnsLabel) && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.ipv6CidrBlocks, other.ipv6CidrBlocks) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) @@ -1013,6 +1065,11 @@ public int hashCode() { result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.dnsLabel == null ? 43 : this.dnsLabel.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); result = (result * PRIME) diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/VirtualCircuit.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/VirtualCircuit.java index 41701e39d4a..6db4aab0d86 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/VirtualCircuit.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/VirtualCircuit.java @@ -69,7 +69,8 @@ public final class VirtualCircuit extends com.oracle.bmc.http.internal.Explicitl "serviceType", "timeCreated", "type", - "ipMtu" + "ipMtu", + "virtualCircuitRedundancyMetadata" }) public VirtualCircuit( String bandwidthShapeName, @@ -102,7 +103,8 @@ public VirtualCircuit( ServiceType serviceType, java.util.Date timeCreated, Type type, - VirtualCircuitIpMtu ipMtu) { + VirtualCircuitIpMtu ipMtu, + VirtualCircuitRedundancyMetadata virtualCircuitRedundancyMetadata) { super(); this.bandwidthShapeName = bandwidthShapeName; this.bgpManagement = bgpManagement; @@ -135,6 +137,7 @@ public VirtualCircuit( this.timeCreated = timeCreated; this.type = type; this.ipMtu = ipMtu; + this.virtualCircuitRedundancyMetadata = virtualCircuitRedundancyMetadata; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -762,6 +765,16 @@ public Builder ipMtu(VirtualCircuitIpMtu ipMtu) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("virtualCircuitRedundancyMetadata") + private VirtualCircuitRedundancyMetadata virtualCircuitRedundancyMetadata; + + public Builder virtualCircuitRedundancyMetadata( + VirtualCircuitRedundancyMetadata virtualCircuitRedundancyMetadata) { + this.virtualCircuitRedundancyMetadata = virtualCircuitRedundancyMetadata; + this.__explicitlySet__.add("virtualCircuitRedundancyMetadata"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -798,7 +811,8 @@ public VirtualCircuit build() { this.serviceType, this.timeCreated, this.type, - this.ipMtu); + this.ipMtu, + this.virtualCircuitRedundancyMetadata); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -900,6 +914,9 @@ public Builder copy(VirtualCircuit model) { if (model.wasPropertyExplicitlySet("ipMtu")) { this.ipMtu(model.getIpMtu()); } + if (model.wasPropertyExplicitlySet("virtualCircuitRedundancyMetadata")) { + this.virtualCircuitRedundancyMetadata(model.getVirtualCircuitRedundancyMetadata()); + } return this; } } @@ -1926,6 +1943,13 @@ public VirtualCircuitIpMtu getIpMtu() { return ipMtu; } + @com.fasterxml.jackson.annotation.JsonProperty("virtualCircuitRedundancyMetadata") + private final VirtualCircuitRedundancyMetadata virtualCircuitRedundancyMetadata; + + public VirtualCircuitRedundancyMetadata getVirtualCircuitRedundancyMetadata() { + return virtualCircuitRedundancyMetadata; + } + @Override public String toString() { return this.toString(true); @@ -1971,6 +1995,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", type=").append(String.valueOf(this.type)); sb.append(", ipMtu=").append(String.valueOf(this.ipMtu)); + sb.append(", virtualCircuitRedundancyMetadata=") + .append(String.valueOf(this.virtualCircuitRedundancyMetadata)); sb.append(")"); return sb.toString(); } @@ -2017,6 +2043,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.type, other.type) && java.util.Objects.equals(this.ipMtu, other.ipMtu) + && java.util.Objects.equals( + this.virtualCircuitRedundancyMetadata, + other.virtualCircuitRedundancyMetadata) && super.equals(other); } @@ -2099,6 +2128,11 @@ public int hashCode() { result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); result = (result * PRIME) + (this.ipMtu == null ? 43 : this.ipMtu.hashCode()); + result = + (result * PRIME) + + (this.virtualCircuitRedundancyMetadata == null + ? 43 + : this.virtualCircuitRedundancyMetadata.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/VirtualCircuitRedundancyMetadata.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/VirtualCircuitRedundancyMetadata.java new file mode 100644 index 00000000000..cbc9310a333 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/VirtualCircuitRedundancyMetadata.java @@ -0,0 +1,392 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.model; + +/** + * Redundancy level details of the virtual circuit + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = VirtualCircuitRedundancyMetadata.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class VirtualCircuitRedundancyMetadata + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "configuredRedundancyLevel", + "ipv4bgpSessionRedundancyStatus", + "ipv6bgpSessionRedundancyStatus" + }) + public VirtualCircuitRedundancyMetadata( + ConfiguredRedundancyLevel configuredRedundancyLevel, + Ipv4bgpSessionRedundancyStatus ipv4bgpSessionRedundancyStatus, + Ipv6bgpSessionRedundancyStatus ipv6bgpSessionRedundancyStatus) { + super(); + this.configuredRedundancyLevel = configuredRedundancyLevel; + this.ipv4bgpSessionRedundancyStatus = ipv4bgpSessionRedundancyStatus; + this.ipv6bgpSessionRedundancyStatus = ipv6bgpSessionRedundancyStatus; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The configured redundancy level of the virtual circuit + **/ + @com.fasterxml.jackson.annotation.JsonProperty("configuredRedundancyLevel") + private ConfiguredRedundancyLevel configuredRedundancyLevel; + + /** + * The configured redundancy level of the virtual circuit + * @param configuredRedundancyLevel the value to set + * @return this builder + **/ + public Builder configuredRedundancyLevel( + ConfiguredRedundancyLevel configuredRedundancyLevel) { + this.configuredRedundancyLevel = configuredRedundancyLevel; + this.__explicitlySet__.add("configuredRedundancyLevel"); + return this; + } + /** + * IPV4 BGP redundancy status indicates if the configured redundancy level is met + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipv4bgpSessionRedundancyStatus") + private Ipv4bgpSessionRedundancyStatus ipv4bgpSessionRedundancyStatus; + + /** + * IPV4 BGP redundancy status indicates if the configured redundancy level is met + * @param ipv4bgpSessionRedundancyStatus the value to set + * @return this builder + **/ + public Builder ipv4bgpSessionRedundancyStatus( + Ipv4bgpSessionRedundancyStatus ipv4bgpSessionRedundancyStatus) { + this.ipv4bgpSessionRedundancyStatus = ipv4bgpSessionRedundancyStatus; + this.__explicitlySet__.add("ipv4bgpSessionRedundancyStatus"); + return this; + } + /** + * IPV6 BGP redundancy status indicates if the configured redundancy level is met + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipv6bgpSessionRedundancyStatus") + private Ipv6bgpSessionRedundancyStatus ipv6bgpSessionRedundancyStatus; + + /** + * IPV6 BGP redundancy status indicates if the configured redundancy level is met + * @param ipv6bgpSessionRedundancyStatus the value to set + * @return this builder + **/ + public Builder ipv6bgpSessionRedundancyStatus( + Ipv6bgpSessionRedundancyStatus ipv6bgpSessionRedundancyStatus) { + this.ipv6bgpSessionRedundancyStatus = ipv6bgpSessionRedundancyStatus; + this.__explicitlySet__.add("ipv6bgpSessionRedundancyStatus"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public VirtualCircuitRedundancyMetadata build() { + VirtualCircuitRedundancyMetadata model = + new VirtualCircuitRedundancyMetadata( + this.configuredRedundancyLevel, + this.ipv4bgpSessionRedundancyStatus, + this.ipv6bgpSessionRedundancyStatus); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(VirtualCircuitRedundancyMetadata model) { + if (model.wasPropertyExplicitlySet("configuredRedundancyLevel")) { + this.configuredRedundancyLevel(model.getConfiguredRedundancyLevel()); + } + if (model.wasPropertyExplicitlySet("ipv4bgpSessionRedundancyStatus")) { + this.ipv4bgpSessionRedundancyStatus(model.getIpv4bgpSessionRedundancyStatus()); + } + if (model.wasPropertyExplicitlySet("ipv6bgpSessionRedundancyStatus")) { + this.ipv6bgpSessionRedundancyStatus(model.getIpv6bgpSessionRedundancyStatus()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The configured redundancy level of the virtual circuit + **/ + public enum ConfiguredRedundancyLevel { + Device("DEVICE"), + Pop("POP"), + Region("REGION"), + NonRedundant("NON_REDUNDANT"), + Pending("PENDING"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ConfiguredRedundancyLevel.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ConfiguredRedundancyLevel v : ConfiguredRedundancyLevel.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ConfiguredRedundancyLevel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ConfiguredRedundancyLevel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ConfiguredRedundancyLevel', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The configured redundancy level of the virtual circuit + **/ + @com.fasterxml.jackson.annotation.JsonProperty("configuredRedundancyLevel") + private final ConfiguredRedundancyLevel configuredRedundancyLevel; + + /** + * The configured redundancy level of the virtual circuit + * @return the value + **/ + public ConfiguredRedundancyLevel getConfiguredRedundancyLevel() { + return configuredRedundancyLevel; + } + + /** + * IPV4 BGP redundancy status indicates if the configured redundancy level is met + **/ + public enum Ipv4bgpSessionRedundancyStatus { + ConfigurationMatch("CONFIGURATION_MATCH"), + ConfigurationMismatch("CONFIGURATION_MISMATCH"), + NotMetSla("NOT_MET_SLA"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(Ipv4bgpSessionRedundancyStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Ipv4bgpSessionRedundancyStatus v : Ipv4bgpSessionRedundancyStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Ipv4bgpSessionRedundancyStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Ipv4bgpSessionRedundancyStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Ipv4bgpSessionRedundancyStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * IPV4 BGP redundancy status indicates if the configured redundancy level is met + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipv4bgpSessionRedundancyStatus") + private final Ipv4bgpSessionRedundancyStatus ipv4bgpSessionRedundancyStatus; + + /** + * IPV4 BGP redundancy status indicates if the configured redundancy level is met + * @return the value + **/ + public Ipv4bgpSessionRedundancyStatus getIpv4bgpSessionRedundancyStatus() { + return ipv4bgpSessionRedundancyStatus; + } + + /** + * IPV6 BGP redundancy status indicates if the configured redundancy level is met + **/ + public enum Ipv6bgpSessionRedundancyStatus { + ConfigurationMatch("CONFIGURATION_MATCH"), + ConfigurationMismatch("CONFIGURATION_MISMATCH"), + NotMetSla("NOT_MET_SLA"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(Ipv6bgpSessionRedundancyStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Ipv6bgpSessionRedundancyStatus v : Ipv6bgpSessionRedundancyStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Ipv6bgpSessionRedundancyStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Ipv6bgpSessionRedundancyStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Ipv6bgpSessionRedundancyStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * IPV6 BGP redundancy status indicates if the configured redundancy level is met + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ipv6bgpSessionRedundancyStatus") + private final Ipv6bgpSessionRedundancyStatus ipv6bgpSessionRedundancyStatus; + + /** + * IPV6 BGP redundancy status indicates if the configured redundancy level is met + * @return the value + **/ + public Ipv6bgpSessionRedundancyStatus getIpv6bgpSessionRedundancyStatus() { + return ipv6bgpSessionRedundancyStatus; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("VirtualCircuitRedundancyMetadata("); + sb.append("super=").append(super.toString()); + sb.append("configuredRedundancyLevel=") + .append(String.valueOf(this.configuredRedundancyLevel)); + sb.append(", ipv4bgpSessionRedundancyStatus=") + .append(String.valueOf(this.ipv4bgpSessionRedundancyStatus)); + sb.append(", ipv6bgpSessionRedundancyStatus=") + .append(String.valueOf(this.ipv6bgpSessionRedundancyStatus)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof VirtualCircuitRedundancyMetadata)) { + return false; + } + + VirtualCircuitRedundancyMetadata other = (VirtualCircuitRedundancyMetadata) o; + return java.util.Objects.equals( + this.configuredRedundancyLevel, other.configuredRedundancyLevel) + && java.util.Objects.equals( + this.ipv4bgpSessionRedundancyStatus, other.ipv4bgpSessionRedundancyStatus) + && java.util.Objects.equals( + this.ipv6bgpSessionRedundancyStatus, other.ipv6bgpSessionRedundancyStatus) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.configuredRedundancyLevel == null + ? 43 + : this.configuredRedundancyLevel.hashCode()); + result = + (result * PRIME) + + (this.ipv4bgpSessionRedundancyStatus == null + ? 43 + : this.ipv4bgpSessionRedundancyStatus.hashCode()); + result = + (result * PRIME) + + (this.ipv6bgpSessionRedundancyStatus == null + ? 43 + : this.ipv6bgpSessionRedundancyStatus.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Vnic.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Vnic.java index dcd1984e107..a79d427c669 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Vnic.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Vnic.java @@ -45,6 +45,7 @@ public final class Vnic extends com.oracle.bmc.http.internal.ExplicitlySetBmcMod "compartmentId", "definedTags", "displayName", + "securityAttributes", "freeformTags", "hostnameLabel", "id", @@ -65,6 +66,7 @@ public Vnic( String compartmentId, java.util.Map> definedTags, String displayName, + java.util.Map> securityAttributes, java.util.Map freeformTags, String hostnameLabel, String id, @@ -84,6 +86,7 @@ public Vnic( this.compartmentId = compartmentId; this.definedTags = definedTags; this.displayName = displayName; + this.securityAttributes = securityAttributes; this.freeformTags = freeformTags; this.hostnameLabel = hostnameLabel; this.id = id; @@ -185,6 +188,29 @@ public Builder displayName(String displayName) { this.__explicitlySet__.add("displayName"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair with no * predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). @@ -534,6 +560,7 @@ public Vnic build() { this.compartmentId, this.definedTags, this.displayName, + this.securityAttributes, this.freeformTags, this.hostnameLabel, this.id, @@ -568,6 +595,9 @@ public Builder copy(Vnic model) { if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -699,6 +729,26 @@ public String getDisplayName() { return displayName; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. + *

+ * Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair with no * predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). @@ -1077,6 +1127,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", hostnameLabel=").append(String.valueOf(this.hostnameLabel)); sb.append(", id=").append(String.valueOf(this.id)); @@ -1109,6 +1160,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.hostnameLabel, other.hostnameLabel) && java.util.Objects.equals(this.id, other.id) @@ -1140,6 +1192,11 @@ public int hashCode() { + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeBackupPolicyAssignment.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeBackupPolicyAssignment.java index ea2a2778b3b..0bff2fb8c96 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeBackupPolicyAssignment.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeBackupPolicyAssignment.java @@ -26,14 +26,19 @@ public final class VolumeBackupPolicyAssignment extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"assetId", "id", "policyId", "timeCreated"}) + @java.beans.ConstructorProperties({"assetId", "id", "policyId", "timeCreated", "xrcKmsKeyId"}) public VolumeBackupPolicyAssignment( - String assetId, String id, String policyId, java.util.Date timeCreated) { + String assetId, + String id, + String policyId, + java.util.Date timeCreated, + String xrcKmsKeyId) { super(); this.assetId = assetId; this.id = id; this.policyId = policyId; this.timeCreated = timeCreated; + this.xrcKmsKeyId = xrcKmsKeyId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -108,6 +113,30 @@ public Builder timeCreated(java.util.Date timeCreated) { this.__explicitlySet__.add("timeCreated"); return this; } + /** + * The OCID of the Vault service key which is the master encryption key for the block / boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("xrcKmsKeyId") + private String xrcKmsKeyId; + + /** + * The OCID of the Vault service key which is the master encryption key for the block / boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @param xrcKmsKeyId the value to set + * @return this builder + **/ + public Builder xrcKmsKeyId(String xrcKmsKeyId) { + this.xrcKmsKeyId = xrcKmsKeyId; + this.__explicitlySet__.add("xrcKmsKeyId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -115,7 +144,11 @@ public Builder timeCreated(java.util.Date timeCreated) { public VolumeBackupPolicyAssignment build() { VolumeBackupPolicyAssignment model = new VolumeBackupPolicyAssignment( - this.assetId, this.id, this.policyId, this.timeCreated); + this.assetId, + this.id, + this.policyId, + this.timeCreated, + this.xrcKmsKeyId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -136,6 +169,9 @@ public Builder copy(VolumeBackupPolicyAssignment model) { if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } + if (model.wasPropertyExplicitlySet("xrcKmsKeyId")) { + this.xrcKmsKeyId(model.getXrcKmsKeyId()); + } return this; } } @@ -213,6 +249,28 @@ public java.util.Date getTimeCreated() { return timeCreated; } + /** + * The OCID of the Vault service key which is the master encryption key for the block / boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("xrcKmsKeyId") + private final String xrcKmsKeyId; + + /** + * The OCID of the Vault service key which is the master encryption key for the block / boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @return the value + **/ + public String getXrcKmsKeyId() { + return xrcKmsKeyId; + } + @Override public String toString() { return this.toString(true); @@ -231,6 +289,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", id=").append(String.valueOf(this.id)); sb.append(", policyId=").append(String.valueOf(this.policyId)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", xrcKmsKeyId=").append(String.valueOf(this.xrcKmsKeyId)); sb.append(")"); return sb.toString(); } @@ -249,6 +308,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.policyId, other.policyId) && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.xrcKmsKeyId, other.xrcKmsKeyId) && super.equals(other); } @@ -260,6 +320,7 @@ public int hashCode() { result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); result = (result * PRIME) + (this.policyId == null ? 43 : this.policyId.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.xrcKmsKeyId == null ? 43 : this.xrcKmsKeyId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeGroupReplicaDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeGroupReplicaDetails.java index 69b296ed7d5..0b43aa2a769 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeGroupReplicaDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeGroupReplicaDetails.java @@ -22,11 +22,13 @@ public final class VolumeGroupReplicaDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"displayName", "availabilityDomain"}) - public VolumeGroupReplicaDetails(String displayName, String availabilityDomain) { + @java.beans.ConstructorProperties({"displayName", "availabilityDomain", "xrrKmsKeyId"}) + public VolumeGroupReplicaDetails( + String displayName, String availabilityDomain, String xrrKmsKeyId) { super(); this.displayName = displayName; this.availabilityDomain = availabilityDomain; + this.xrrKmsKeyId = xrrKmsKeyId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -73,13 +75,38 @@ public Builder availabilityDomain(String availabilityDomain) { this.__explicitlySet__.add("availabilityDomain"); return this; } + /** + * The OCID of the Vault service key which is the master encryption key for the cross region volume group's replicas, which will be used in the destination region to encrypt the volume group's replicas encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("xrrKmsKeyId") + private String xrrKmsKeyId; + + /** + * The OCID of the Vault service key which is the master encryption key for the cross region volume group's replicas, which will be used in the destination region to encrypt the volume group's replicas encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @param xrrKmsKeyId the value to set + * @return this builder + **/ + public Builder xrrKmsKeyId(String xrrKmsKeyId) { + this.xrrKmsKeyId = xrrKmsKeyId; + this.__explicitlySet__.add("xrrKmsKeyId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public VolumeGroupReplicaDetails build() { VolumeGroupReplicaDetails model = - new VolumeGroupReplicaDetails(this.displayName, this.availabilityDomain); + new VolumeGroupReplicaDetails( + this.displayName, this.availabilityDomain, this.xrrKmsKeyId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -94,6 +121,9 @@ public Builder copy(VolumeGroupReplicaDetails model) { if (model.wasPropertyExplicitlySet("availabilityDomain")) { this.availabilityDomain(model.getAvailabilityDomain()); } + if (model.wasPropertyExplicitlySet("xrrKmsKeyId")) { + this.xrrKmsKeyId(model.getXrrKmsKeyId()); + } return this; } } @@ -147,6 +177,28 @@ public String getAvailabilityDomain() { return availabilityDomain; } + /** + * The OCID of the Vault service key which is the master encryption key for the cross region volume group's replicas, which will be used in the destination region to encrypt the volume group's replicas encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("xrrKmsKeyId") + private final String xrrKmsKeyId; + + /** + * The OCID of the Vault service key which is the master encryption key for the cross region volume group's replicas, which will be used in the destination region to encrypt the volume group's replicas encryption keys. + * For more information about the Vault service and encryption keys, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @return the value + **/ + public String getXrrKmsKeyId() { + return xrrKmsKeyId; + } + @Override public String toString() { return this.toString(true); @@ -163,6 +215,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("displayName=").append(String.valueOf(this.displayName)); sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", xrrKmsKeyId=").append(String.valueOf(this.xrrKmsKeyId)); sb.append(")"); return sb.toString(); } @@ -179,6 +232,7 @@ public boolean equals(Object o) { VolumeGroupReplicaDetails other = (VolumeGroupReplicaDetails) o; return java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.xrrKmsKeyId, other.xrrKmsKeyId) && super.equals(other); } @@ -192,6 +246,7 @@ public int hashCode() { + (this.availabilityDomain == null ? 43 : this.availabilityDomain.hashCode()); + result = (result * PRIME) + (this.xrrKmsKeyId == null ? 43 : this.xrrKmsKeyId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeGroupReplicaInfo.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeGroupReplicaInfo.java index bde4eecb968..3d575fbe16c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeGroupReplicaInfo.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeGroupReplicaInfo.java @@ -22,13 +22,22 @@ public final class VolumeGroupReplicaInfo extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"displayName", "volumeGroupReplicaId", "availabilityDomain"}) + @java.beans.ConstructorProperties({ + "displayName", + "volumeGroupReplicaId", + "availabilityDomain", + "kmsKeyId" + }) public VolumeGroupReplicaInfo( - String displayName, String volumeGroupReplicaId, String availabilityDomain) { + String displayName, + String volumeGroupReplicaId, + String availabilityDomain, + String kmsKeyId) { super(); this.displayName = displayName; this.volumeGroupReplicaId = volumeGroupReplicaId; this.availabilityDomain = availabilityDomain; + this.kmsKeyId = kmsKeyId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -91,6 +100,28 @@ public Builder availabilityDomain(String availabilityDomain) { this.__explicitlySet__.add("availabilityDomain"); return this; } + /** + * The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -98,7 +129,10 @@ public Builder availabilityDomain(String availabilityDomain) { public VolumeGroupReplicaInfo build() { VolumeGroupReplicaInfo model = new VolumeGroupReplicaInfo( - this.displayName, this.volumeGroupReplicaId, this.availabilityDomain); + this.displayName, + this.volumeGroupReplicaId, + this.availabilityDomain, + this.kmsKeyId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -116,6 +150,9 @@ public Builder copy(VolumeGroupReplicaInfo model) { if (model.wasPropertyExplicitlySet("availabilityDomain")) { this.availabilityDomain(model.getAvailabilityDomain()); } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } return this; } } @@ -183,6 +220,26 @@ public String getAvailabilityDomain() { return availabilityDomain; } + /** + * The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see + * [Overview of Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + * [Using Keys](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + * + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + @Override public String toString() { return this.toString(true); @@ -200,6 +257,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("displayName=").append(String.valueOf(this.displayName)); sb.append(", volumeGroupReplicaId=").append(String.valueOf(this.volumeGroupReplicaId)); sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); sb.append(")"); return sb.toString(); } @@ -217,6 +275,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.volumeGroupReplicaId, other.volumeGroupReplicaId) && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) && super.equals(other); } @@ -235,6 +294,7 @@ public int hashCode() { + (this.availabilityDomain == null ? 43 : this.availabilityDomain.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeSourceDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeSourceDetails.java index c68e19809c2..052ae9d749c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeSourceDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeSourceDetails.java @@ -36,6 +36,10 @@ @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = VolumeSourceFromVolumeBackupDetails.class, name = "volumeBackup" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = VolumeSourceFromVolumeBackupDeltaDetails.class, + name = "volumeBackupDelta" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeSourceFromVolumeBackupDeltaDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeSourceFromVolumeBackupDeltaDetails.java new file mode 100644 index 00000000000..24c6d6d66c5 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeSourceFromVolumeBackupDeltaDetails.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.model; + +/** + * Specifies the volume backups (first & second) and block size in bytes. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = VolumeSourceFromVolumeBackupDeltaDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class VolumeSourceFromVolumeBackupDeltaDetails extends VolumeSourceDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the first volume backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("firstBackupId") + private String firstBackupId; + + /** + * The OCID of the first volume backup. + * @param firstBackupId the value to set + * @return this builder + **/ + public Builder firstBackupId(String firstBackupId) { + this.firstBackupId = firstBackupId; + this.__explicitlySet__.add("firstBackupId"); + return this; + } + /** + * The OCID of the second volume backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secondBackupId") + private String secondBackupId; + + /** + * The OCID of the second volume backup. + * @param secondBackupId the value to set + * @return this builder + **/ + public Builder secondBackupId(String secondBackupId) { + this.secondBackupId = secondBackupId; + this.__explicitlySet__.add("secondBackupId"); + return this; + } + /** + * Block size in bytes to be considered while performing volume restore. The value must be a power of 2; ranging from 4KB (4096 bytes) to 1MB (1048576 bytes). If omitted, defaults to 4,096 bytes (4 KiB). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("changeBlockSizeInBytes") + private Long changeBlockSizeInBytes; + + /** + * Block size in bytes to be considered while performing volume restore. The value must be a power of 2; ranging from 4KB (4096 bytes) to 1MB (1048576 bytes). If omitted, defaults to 4,096 bytes (4 KiB). + * + * @param changeBlockSizeInBytes the value to set + * @return this builder + **/ + public Builder changeBlockSizeInBytes(Long changeBlockSizeInBytes) { + this.changeBlockSizeInBytes = changeBlockSizeInBytes; + this.__explicitlySet__.add("changeBlockSizeInBytes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public VolumeSourceFromVolumeBackupDeltaDetails build() { + VolumeSourceFromVolumeBackupDeltaDetails model = + new VolumeSourceFromVolumeBackupDeltaDetails( + this.firstBackupId, this.secondBackupId, this.changeBlockSizeInBytes); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(VolumeSourceFromVolumeBackupDeltaDetails model) { + if (model.wasPropertyExplicitlySet("firstBackupId")) { + this.firstBackupId(model.getFirstBackupId()); + } + if (model.wasPropertyExplicitlySet("secondBackupId")) { + this.secondBackupId(model.getSecondBackupId()); + } + if (model.wasPropertyExplicitlySet("changeBlockSizeInBytes")) { + this.changeBlockSizeInBytes(model.getChangeBlockSizeInBytes()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public VolumeSourceFromVolumeBackupDeltaDetails( + String firstBackupId, String secondBackupId, Long changeBlockSizeInBytes) { + super(); + this.firstBackupId = firstBackupId; + this.secondBackupId = secondBackupId; + this.changeBlockSizeInBytes = changeBlockSizeInBytes; + } + + /** + * The OCID of the first volume backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("firstBackupId") + private final String firstBackupId; + + /** + * The OCID of the first volume backup. + * @return the value + **/ + public String getFirstBackupId() { + return firstBackupId; + } + + /** + * The OCID of the second volume backup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secondBackupId") + private final String secondBackupId; + + /** + * The OCID of the second volume backup. + * @return the value + **/ + public String getSecondBackupId() { + return secondBackupId; + } + + /** + * Block size in bytes to be considered while performing volume restore. The value must be a power of 2; ranging from 4KB (4096 bytes) to 1MB (1048576 bytes). If omitted, defaults to 4,096 bytes (4 KiB). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("changeBlockSizeInBytes") + private final Long changeBlockSizeInBytes; + + /** + * Block size in bytes to be considered while performing volume restore. The value must be a power of 2; ranging from 4KB (4096 bytes) to 1MB (1048576 bytes). If omitted, defaults to 4,096 bytes (4 KiB). + * + * @return the value + **/ + public Long getChangeBlockSizeInBytes() { + return changeBlockSizeInBytes; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("VolumeSourceFromVolumeBackupDeltaDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", firstBackupId=").append(String.valueOf(this.firstBackupId)); + sb.append(", secondBackupId=").append(String.valueOf(this.secondBackupId)); + sb.append(", changeBlockSizeInBytes=").append(String.valueOf(this.changeBlockSizeInBytes)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof VolumeSourceFromVolumeBackupDeltaDetails)) { + return false; + } + + VolumeSourceFromVolumeBackupDeltaDetails other = + (VolumeSourceFromVolumeBackupDeltaDetails) o; + return java.util.Objects.equals(this.firstBackupId, other.firstBackupId) + && java.util.Objects.equals(this.secondBackupId, other.secondBackupId) + && java.util.Objects.equals( + this.changeBlockSizeInBytes, other.changeBlockSizeInBytes) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.firstBackupId == null ? 43 : this.firstBackupId.hashCode()); + result = + (result * PRIME) + + (this.secondBackupId == null ? 43 : this.secondBackupId.hashCode()); + result = + (result * PRIME) + + (this.changeBlockSizeInBytes == null + ? 43 + : this.changeBlockSizeInBytes.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetInstanceMaintenanceEventRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetInstanceMaintenanceEventRequest.java new file mode 100644 index 00000000000..afa098353b0 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetInstanceMaintenanceEventRequest.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.requests; + +import com.oracle.bmc.core.model.*; +/** + * Example: Click here to see how to use GetInstanceMaintenanceEventRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetInstanceMaintenanceEventRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the instance maintenance event. + */ + private String instanceMaintenanceEventId; + + /** + * The OCID of the instance maintenance event. + */ + public String getInstanceMaintenanceEventId() { + return instanceMaintenanceEventId; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetInstanceMaintenanceEventRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the instance maintenance event. + */ + private String instanceMaintenanceEventId = null; + + /** + * The OCID of the instance maintenance event. + * @param instanceMaintenanceEventId the value to set + * @return this builder instance + */ + public Builder instanceMaintenanceEventId(String instanceMaintenanceEventId) { + this.instanceMaintenanceEventId = instanceMaintenanceEventId; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetInstanceMaintenanceEventRequest o) { + instanceMaintenanceEventId(o.getInstanceMaintenanceEventId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetInstanceMaintenanceEventRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetInstanceMaintenanceEventRequest + */ + public GetInstanceMaintenanceEventRequest build() { + GetInstanceMaintenanceEventRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetInstanceMaintenanceEventRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetInstanceMaintenanceEventRequest + */ + public GetInstanceMaintenanceEventRequest buildWithoutInvocationCallback() { + GetInstanceMaintenanceEventRequest request = new GetInstanceMaintenanceEventRequest(); + request.instanceMaintenanceEventId = instanceMaintenanceEventId; + request.opcRequestId = opcRequestId; + return request; + // new GetInstanceMaintenanceEventRequest(instanceMaintenanceEventId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .instanceMaintenanceEventId(instanceMaintenanceEventId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",instanceMaintenanceEventId=") + .append(String.valueOf(this.instanceMaintenanceEventId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetInstanceMaintenanceEventRequest)) { + return false; + } + + GetInstanceMaintenanceEventRequest other = (GetInstanceMaintenanceEventRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.instanceMaintenanceEventId, other.instanceMaintenanceEventId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.instanceMaintenanceEventId == null + ? 43 + : this.instanceMaintenanceEventId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInstanceMaintenanceEventsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInstanceMaintenanceEventsRequest.java new file mode 100644 index 00000000000..ca3b9c354f4 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInstanceMaintenanceEventsRequest.java @@ -0,0 +1,705 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.requests; + +import com.oracle.bmc.core.model.*; +/** + * Example: Click here to see how to use ListInstanceMaintenanceEventsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListInstanceMaintenanceEventsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The OCID of the instance. + */ + private String instanceId; + + /** + * The OCID of the instance. + */ + public String getInstanceId() { + return instanceId; + } + /** + * A filter to only return resources that match the given lifecycle state. + */ + private com.oracle.bmc.core.model.InstanceMaintenanceEvent.LifecycleState lifecycleState; + + /** + * A filter to only return resources that match the given lifecycle state. + */ + public com.oracle.bmc.core.model.InstanceMaintenanceEvent.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * A filter to only return resources that have a matching correlationToken. + */ + private String correlationToken; + + /** + * A filter to only return resources that have a matching correlationToken. + */ + public String getCorrelationToken() { + return correlationToken; + } + /** + * A filter to only return resources that match the given instance action. + */ + private String instanceAction; + + /** + * A filter to only return resources that match the given instance action. + */ + public String getInstanceAction() { + return instanceAction; + } + /** + * Starting range to return the maintenances which are not completed (date-time is in [RFC3339](https://tools.ietf.org/html/rfc3339) format). + */ + private java.util.Date timeWindowStartGreaterThanOrEqualTo; + + /** + * Starting range to return the maintenances which are not completed (date-time is in [RFC3339](https://tools.ietf.org/html/rfc3339) format). + */ + public java.util.Date getTimeWindowStartGreaterThanOrEqualTo() { + return timeWindowStartGreaterThanOrEqualTo; + } + /** + * Ending range to return the maintenances which are not completed (date-time is in [RFC3339](https://tools.ietf.org/html/rfc3339) format). + */ + private java.util.Date timeWindowStartLessThanOrEqualTo; + + /** + * Ending range to return the maintenances which are not completed (date-time is in [RFC3339](https://tools.ietf.org/html/rfc3339) format). + */ + public java.util.Date getTimeWindowStartLessThanOrEqualTo() { + return timeWindowStartLessThanOrEqualTo; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a paginated + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + *

+ * Example: {@code 50} + * + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a paginated + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + *

+ * Example: {@code 50} + * + */ + public Integer getLimit() { + return limit; + } + /** + * For list pagination. The value of the {@code opc-next-page} response header from the previous "List" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * For list pagination. The value of the {@code opc-next-page} response header from the previous "List" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these "List" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these "List" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these "List" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortOrder: " + key); + } + }; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + */ + public SortOrder getSortOrder() { + return sortOrder; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListInstanceMaintenanceEventsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The OCID of the instance. + */ + private String instanceId = null; + + /** + * The OCID of the instance. + * @param instanceId the value to set + * @return this builder instance + */ + public Builder instanceId(String instanceId) { + this.instanceId = instanceId; + return this; + } + + /** + * A filter to only return resources that match the given lifecycle state. + */ + private com.oracle.bmc.core.model.InstanceMaintenanceEvent.LifecycleState lifecycleState = + null; + + /** + * A filter to only return resources that match the given lifecycle state. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.core.model.InstanceMaintenanceEvent.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to only return resources that have a matching correlationToken. + */ + private String correlationToken = null; + + /** + * A filter to only return resources that have a matching correlationToken. + * @param correlationToken the value to set + * @return this builder instance + */ + public Builder correlationToken(String correlationToken) { + this.correlationToken = correlationToken; + return this; + } + + /** + * A filter to only return resources that match the given instance action. + */ + private String instanceAction = null; + + /** + * A filter to only return resources that match the given instance action. + * @param instanceAction the value to set + * @return this builder instance + */ + public Builder instanceAction(String instanceAction) { + this.instanceAction = instanceAction; + return this; + } + + /** + * Starting range to return the maintenances which are not completed (date-time is in [RFC3339](https://tools.ietf.org/html/rfc3339) format). + */ + private java.util.Date timeWindowStartGreaterThanOrEqualTo = null; + + /** + * Starting range to return the maintenances which are not completed (date-time is in [RFC3339](https://tools.ietf.org/html/rfc3339) format). + * @param timeWindowStartGreaterThanOrEqualTo the value to set + * @return this builder instance + */ + public Builder timeWindowStartGreaterThanOrEqualTo( + java.util.Date timeWindowStartGreaterThanOrEqualTo) { + this.timeWindowStartGreaterThanOrEqualTo = timeWindowStartGreaterThanOrEqualTo; + return this; + } + + /** + * Ending range to return the maintenances which are not completed (date-time is in [RFC3339](https://tools.ietf.org/html/rfc3339) format). + */ + private java.util.Date timeWindowStartLessThanOrEqualTo = null; + + /** + * Ending range to return the maintenances which are not completed (date-time is in [RFC3339](https://tools.ietf.org/html/rfc3339) format). + * @param timeWindowStartLessThanOrEqualTo the value to set + * @return this builder instance + */ + public Builder timeWindowStartLessThanOrEqualTo( + java.util.Date timeWindowStartLessThanOrEqualTo) { + this.timeWindowStartLessThanOrEqualTo = timeWindowStartLessThanOrEqualTo; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a paginated + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + *

+ * Example: {@code 50} + * + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a paginated + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + *

+ * Example: {@code 50} + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * For list pagination. The value of the {@code opc-next-page} response header from the previous "List" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page = null; + + /** + * For list pagination. The value of the {@code opc-next-page} response header from the previous "List" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these "List" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these "List" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The DISPLAYNAME sort order + * is case sensitive. + * + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListInstanceMaintenanceEventsRequest o) { + compartmentId(o.getCompartmentId()); + instanceId(o.getInstanceId()); + lifecycleState(o.getLifecycleState()); + correlationToken(o.getCorrelationToken()); + instanceAction(o.getInstanceAction()); + timeWindowStartGreaterThanOrEqualTo(o.getTimeWindowStartGreaterThanOrEqualTo()); + timeWindowStartLessThanOrEqualTo(o.getTimeWindowStartLessThanOrEqualTo()); + limit(o.getLimit()); + page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListInstanceMaintenanceEventsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListInstanceMaintenanceEventsRequest + */ + public ListInstanceMaintenanceEventsRequest build() { + ListInstanceMaintenanceEventsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListInstanceMaintenanceEventsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListInstanceMaintenanceEventsRequest + */ + public ListInstanceMaintenanceEventsRequest buildWithoutInvocationCallback() { + ListInstanceMaintenanceEventsRequest request = + new ListInstanceMaintenanceEventsRequest(); + request.compartmentId = compartmentId; + request.instanceId = instanceId; + request.lifecycleState = lifecycleState; + request.correlationToken = correlationToken; + request.instanceAction = instanceAction; + request.timeWindowStartGreaterThanOrEqualTo = timeWindowStartGreaterThanOrEqualTo; + request.timeWindowStartLessThanOrEqualTo = timeWindowStartLessThanOrEqualTo; + request.limit = limit; + request.page = page; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.opcRequestId = opcRequestId; + return request; + // new ListInstanceMaintenanceEventsRequest(compartmentId, instanceId, lifecycleState, correlationToken, instanceAction, timeWindowStartGreaterThanOrEqualTo, timeWindowStartLessThanOrEqualTo, limit, page, sortBy, sortOrder, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .instanceId(instanceId) + .lifecycleState(lifecycleState) + .correlationToken(correlationToken) + .instanceAction(instanceAction) + .timeWindowStartGreaterThanOrEqualTo(timeWindowStartGreaterThanOrEqualTo) + .timeWindowStartLessThanOrEqualTo(timeWindowStartLessThanOrEqualTo) + .limit(limit) + .page(page) + .sortBy(sortBy) + .sortOrder(sortOrder) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",instanceId=").append(String.valueOf(this.instanceId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",correlationToken=").append(String.valueOf(this.correlationToken)); + sb.append(",instanceAction=").append(String.valueOf(this.instanceAction)); + sb.append(",timeWindowStartGreaterThanOrEqualTo=") + .append(String.valueOf(this.timeWindowStartGreaterThanOrEqualTo)); + sb.append(",timeWindowStartLessThanOrEqualTo=") + .append(String.valueOf(this.timeWindowStartLessThanOrEqualTo)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListInstanceMaintenanceEventsRequest)) { + return false; + } + + ListInstanceMaintenanceEventsRequest other = (ListInstanceMaintenanceEventsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.instanceId, other.instanceId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.correlationToken, other.correlationToken) + && java.util.Objects.equals(this.instanceAction, other.instanceAction) + && java.util.Objects.equals( + this.timeWindowStartGreaterThanOrEqualTo, + other.timeWindowStartGreaterThanOrEqualTo) + && java.util.Objects.equals( + this.timeWindowStartLessThanOrEqualTo, + other.timeWindowStartLessThanOrEqualTo) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.instanceId == null ? 43 : this.instanceId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.correlationToken == null ? 43 : this.correlationToken.hashCode()); + result = + (result * PRIME) + + (this.instanceAction == null ? 43 : this.instanceAction.hashCode()); + result = + (result * PRIME) + + (this.timeWindowStartGreaterThanOrEqualTo == null + ? 43 + : this.timeWindowStartGreaterThanOrEqualTo.hashCode()); + result = + (result * PRIME) + + (this.timeWindowStartLessThanOrEqualTo == null + ? 43 + : this.timeWindowStartLessThanOrEqualTo.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateInstanceMaintenanceEventRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateInstanceMaintenanceEventRequest.java new file mode 100644 index 00000000000..51518fdf0a3 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateInstanceMaintenanceEventRequest.java @@ -0,0 +1,376 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.requests; + +import com.oracle.bmc.core.model.*; +/** + * Example: Click here to see how to use UpdateInstanceMaintenanceEventRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateInstanceMaintenanceEventRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.core.model.UpdateInstanceMaintenanceEventDetails> { + + /** + * The OCID of the instance maintenance event. + */ + private String instanceMaintenanceEventId; + + /** + * The OCID of the instance maintenance event. + */ + public String getInstanceMaintenanceEventId() { + return instanceMaintenanceEventId; + } + /** + * Update instance maintenance event due date. + */ + private com.oracle.bmc.core.model.UpdateInstanceMaintenanceEventDetails + updateInstanceMaintenanceEventDetails; + + /** + * Update instance maintenance event due date. + */ + public com.oracle.bmc.core.model.UpdateInstanceMaintenanceEventDetails + getUpdateInstanceMaintenanceEventDetails() { + return updateInstanceMaintenanceEventDetails; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.core.model.UpdateInstanceMaintenanceEventDetails getBody$() { + return updateInstanceMaintenanceEventDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateInstanceMaintenanceEventRequest, + com.oracle.bmc.core.model.UpdateInstanceMaintenanceEventDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the instance maintenance event. + */ + private String instanceMaintenanceEventId = null; + + /** + * The OCID of the instance maintenance event. + * @param instanceMaintenanceEventId the value to set + * @return this builder instance + */ + public Builder instanceMaintenanceEventId(String instanceMaintenanceEventId) { + this.instanceMaintenanceEventId = instanceMaintenanceEventId; + return this; + } + + /** + * Update instance maintenance event due date. + */ + private com.oracle.bmc.core.model.UpdateInstanceMaintenanceEventDetails + updateInstanceMaintenanceEventDetails = null; + + /** + * Update instance maintenance event due date. + * @param updateInstanceMaintenanceEventDetails the value to set + * @return this builder instance + */ + public Builder updateInstanceMaintenanceEventDetails( + com.oracle.bmc.core.model.UpdateInstanceMaintenanceEventDetails + updateInstanceMaintenanceEventDetails) { + this.updateInstanceMaintenanceEventDetails = updateInstanceMaintenanceEventDetails; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateInstanceMaintenanceEventRequest o) { + instanceMaintenanceEventId(o.getInstanceMaintenanceEventId()); + updateInstanceMaintenanceEventDetails(o.getUpdateInstanceMaintenanceEventDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateInstanceMaintenanceEventRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateInstanceMaintenanceEventRequest + */ + public UpdateInstanceMaintenanceEventRequest build() { + UpdateInstanceMaintenanceEventRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.core.model.UpdateInstanceMaintenanceEventDetails body) { + updateInstanceMaintenanceEventDetails(body); + return this; + } + + /** + * Build the instance of UpdateInstanceMaintenanceEventRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateInstanceMaintenanceEventRequest + */ + public UpdateInstanceMaintenanceEventRequest buildWithoutInvocationCallback() { + UpdateInstanceMaintenanceEventRequest request = + new UpdateInstanceMaintenanceEventRequest(); + request.instanceMaintenanceEventId = instanceMaintenanceEventId; + request.updateInstanceMaintenanceEventDetails = updateInstanceMaintenanceEventDetails; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new UpdateInstanceMaintenanceEventRequest(instanceMaintenanceEventId, updateInstanceMaintenanceEventDetails, opcRequestId, ifMatch, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .instanceMaintenanceEventId(instanceMaintenanceEventId) + .updateInstanceMaintenanceEventDetails(updateInstanceMaintenanceEventDetails) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",instanceMaintenanceEventId=") + .append(String.valueOf(this.instanceMaintenanceEventId)); + sb.append(",updateInstanceMaintenanceEventDetails=") + .append(String.valueOf(this.updateInstanceMaintenanceEventDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateInstanceMaintenanceEventRequest)) { + return false; + } + + UpdateInstanceMaintenanceEventRequest other = (UpdateInstanceMaintenanceEventRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.instanceMaintenanceEventId, other.instanceMaintenanceEventId) + && java.util.Objects.equals( + this.updateInstanceMaintenanceEventDetails, + other.updateInstanceMaintenanceEventDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.instanceMaintenanceEventId == null + ? 43 + : this.instanceMaintenanceEventId.hashCode()); + result = + (result * PRIME) + + (this.updateInstanceMaintenanceEventDetails == null + ? 43 + : this.updateInstanceMaintenanceEventDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetInstanceMaintenanceEventResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetInstanceMaintenanceEventResponse.java new file mode 100644 index 00000000000..4d947a7758a --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetInstanceMaintenanceEventResponse.java @@ -0,0 +1,216 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetInstanceMaintenanceEventResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned InstanceMaintenanceEvent instance. + */ + private com.oracle.bmc.core.model.InstanceMaintenanceEvent instanceMaintenanceEvent; + + /** + * The returned InstanceMaintenanceEvent instance. + * @return the value + */ + public com.oracle.bmc.core.model.InstanceMaintenanceEvent getInstanceMaintenanceEvent() { + return instanceMaintenanceEvent; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "instanceMaintenanceEvent" + }) + private GetInstanceMaintenanceEventResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.core.model.InstanceMaintenanceEvent instanceMaintenanceEvent) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.instanceMaintenanceEvent = instanceMaintenanceEvent; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned InstanceMaintenanceEvent instance. + */ + private com.oracle.bmc.core.model.InstanceMaintenanceEvent instanceMaintenanceEvent; + + /** + * The returned InstanceMaintenanceEvent instance. + * @param instanceMaintenanceEvent the value to set + * @return this builder + */ + public Builder instanceMaintenanceEvent( + com.oracle.bmc.core.model.InstanceMaintenanceEvent instanceMaintenanceEvent) { + this.instanceMaintenanceEvent = instanceMaintenanceEvent; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetInstanceMaintenanceEventResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + instanceMaintenanceEvent(o.getInstanceMaintenanceEvent()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetInstanceMaintenanceEventResponse build() { + return new GetInstanceMaintenanceEventResponse( + __httpStatusCode__, headers, etag, opcRequestId, instanceMaintenanceEvent); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",instanceMaintenanceEvent=").append(String.valueOf(instanceMaintenanceEvent)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetInstanceMaintenanceEventResponse)) { + return false; + } + + GetInstanceMaintenanceEventResponse other = (GetInstanceMaintenanceEventResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.instanceMaintenanceEvent, other.instanceMaintenanceEvent); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.instanceMaintenanceEvent == null + ? 43 + : this.instanceMaintenanceEvent.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListInstanceMaintenanceEventsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListInstanceMaintenanceEventsResponse.java new file mode 100644 index 00000000000..27b20d0b0e6 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListInstanceMaintenanceEventsResponse.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListInstanceMaintenanceEventsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For list pagination. When this header appears in the response, additional pages + * of results remain. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages + * of results remain. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * A list of com.oracle.bmc.core.model.InstanceMaintenanceEventSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.core.model.InstanceMaintenanceEventSummary instances. + * @return the value + */ + public java.util.List getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "items" + }) + private ListInstanceMaintenanceEventsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcNextPage, + String opcRequestId, + java.util.List items) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.items = items; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages + * of results remain. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages + * of results remain. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A list of com.oracle.bmc.core.model.InstanceMaintenanceEventSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.core.model.InstanceMaintenanceEventSummary instances. + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListInstanceMaintenanceEventsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListInstanceMaintenanceEventsResponse build() { + return new ListInstanceMaintenanceEventsResponse( + __httpStatusCode__, headers, opcNextPage, opcRequestId, items); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListInstanceMaintenanceEventsResponse)) { + return false; + } + + ListInstanceMaintenanceEventsResponse other = (ListInstanceMaintenanceEventsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/UpdateInstanceMaintenanceEventResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/UpdateInstanceMaintenanceEventResponse.java new file mode 100644 index 00000000000..2b357c8b91a --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/UpdateInstanceMaintenanceEventResponse.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.core.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateInstanceMaintenanceEventResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * Use [GetWorkRequest](https://docs.cloud.oracle.com/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + * with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * Use [GetWorkRequest](https://docs.cloud.oracle.com/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + * with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private UpdateInstanceMaintenanceEventResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * Use [GetWorkRequest](https://docs.cloud.oracle.com/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + * with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * Use [GetWorkRequest](https://docs.cloud.oracle.com/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + * with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateInstanceMaintenanceEventResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateInstanceMaintenanceEventResponse build() { + return new UpdateInstanceMaintenanceEventResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateInstanceMaintenanceEventResponse)) { + return false; + } + + UpdateInstanceMaintenanceEventResponse other = (UpdateInstanceMaintenanceEventResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-dashboardservice/pom.xml b/bmc-dashboardservice/pom.xml index 2608cc09b90..c504955c0f9 100644 --- a/bmc-dashboardservice/pom.xml +++ b/bmc-dashboardservice/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-dashboardservice @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-database/pom.xml b/bmc-database/pom.xml index 006f4373a8d..bd82790d54d 100644 --- a/bmc-database/pom.xml +++ b/bmc-database/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml @@ -19,12 +19,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 com.oracle.oci.sdk oci-java-sdk-workrequests - 2.73.0 + 2.79.0 diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/Database.java b/bmc-database/src/main/java/com/oracle/bmc/database/Database.java index 26f07cf52d1..a7e52c6df06 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/Database.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/Database.java @@ -157,6 +157,33 @@ AutonomousDatabaseManualRefreshResponse autonomousDatabaseManualRefresh( */ CancelBackupResponse cancelBackup(CancelBackupRequest request); + /** + * Cancels the in progress maintenance activity under this execution window. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CancelExecutionWindow API. + */ + CancelExecutionWindowResponse cancelExecutionWindow(CancelExecutionWindowRequest request); + + /** + * Delete the scheduling plan resource along with all the scheduled actions associated with this resource. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CascadingDeleteSchedulingPlan API. + */ + CascadingDeleteSchedulingPlanResponse cascadingDeleteSchedulingPlan( + CascadingDeleteSchedulingPlanRequest request); + /** * Move the Autonomous Container Database and its dependent resources to the specified compartment. * For more information about moving Autonomous Container Databases, see @@ -205,6 +232,20 @@ ChangeAutonomousDatabaseCompartmentResponse changeAutonomousDatabaseCompartment( changeAutonomousDatabaseSoftwareImageCompartment( ChangeAutonomousDatabaseSoftwareImageCompartmentRequest request); + /** + * Associate an Autonomous Database with a different subscription. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ChangeAutonomousDatabaseSubscription API. + */ + ChangeAutonomousDatabaseSubscriptionResponse changeAutonomousDatabaseSubscription( + ChangeAutonomousDatabaseSubscriptionRequest request); + /** * **Deprecated.** Use the {@link #changeCloudExadataInfrastructureCompartment(ChangeCloudExadataInfrastructureCompartmentRequest) changeCloudExadataInfrastructureCompartment} operation to move an Exadata infrastructure resource to a different compartment and {@link #changeCloudAutonomousVmClusterCompartment(ChangeCloudAutonomousVmClusterCompartmentRequest) changeCloudAutonomousVmClusterCompartment} operation to move an Autonomous Exadata VM cluster to a different compartment. * For more information, see @@ -280,6 +321,21 @@ ChangeCloudAutonomousVmClusterCompartmentResponse changeCloudAutonomousVmCluster ChangeCloudExadataInfrastructureCompartmentResponse changeCloudExadataInfrastructureCompartment( ChangeCloudExadataInfrastructureCompartmentRequest request); + /** + * Associate a cloud Exadata infrastructure with a different subscription. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ChangeCloudExadataInfrastructureSubscription API. + */ + ChangeCloudExadataInfrastructureSubscriptionResponse + changeCloudExadataInfrastructureSubscription( + ChangeCloudExadataInfrastructureSubscriptionRequest request); + /** * Moves a cloud VM cluster and its dependent resources to another compartment. Applies to Exadata Cloud Service instances and Autonomous Database on dedicated Exadata infrastructure only. * @@ -294,6 +350,20 @@ ChangeCloudExadataInfrastructureCompartmentResponse changeCloudExadataInfrastruc ChangeCloudVmClusterCompartmentResponse changeCloudVmClusterCompartment( ChangeCloudVmClusterCompartmentRequest request); + /** + * Associate a cloud VM cluster with a different subscription. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ChangeCloudVmClusterSubscription API. + */ + ChangeCloudVmClusterSubscriptionResponse changeCloudVmClusterSubscription( + ChangeCloudVmClusterSubscriptionRequest request); + /** * Move the Database Software Image and its dependent resources to the specified compartment. * For more information about moving Databse Software Images, see @@ -369,6 +439,34 @@ ChangeDisasterRecoveryConfigurationResponse changeDisasterRecoveryConfiguration( ChangeExadataInfrastructureCompartmentResponse changeExadataInfrastructureCompartment( ChangeExadataInfrastructureCompartmentRequest request); + /** + * Moves a Exadata VM cluster on Exascale Infrastructure and its dependent resources to another compartment. Applies to Exadata Database Service on Exascale Infrastructure only. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ChangeExadbVmClusterCompartment API. + */ + ChangeExadbVmClusterCompartmentResponse changeExadbVmClusterCompartment( + ChangeExadbVmClusterCompartmentRequest request); + + /** + * Moves a Exadata Database Storage Vault to another compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ChangeExascaleDbStorageVaultCompartment API. + */ + ChangeExascaleDbStorageVaultCompartmentResponse changeExascaleDbStorageVaultCompartment( + ChangeExascaleDbStorageVaultCompartmentRequest request); + /** * Move the {@link #createExternalContainerDatabaseDetails(CreateExternalContainerDatabaseDetailsRequest) createExternalContainerDatabaseDetails} * and its dependent resources to the specified compartment. @@ -462,6 +560,34 @@ ChangeKeyStoreCompartmentResponse changeKeyStoreCompartment( ChangeOneoffPatchCompartmentResponse changeOneoffPatchCompartment( ChangeOneoffPatchCompartmentRequest request); + /** + * Moves an scheduling plan resource to another compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ChangeSchedulingPlanCompartment API. + */ + ChangeSchedulingPlanCompartmentResponse changeSchedulingPlanCompartment( + ChangeSchedulingPlanCompartmentRequest request); + + /** + * Moves an scheduling policy resource to another compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ChangeSchedulingPolicyCompartment API. + */ + ChangeSchedulingPolicyCompartmentResponse changeSchedulingPolicyCompartment( + ChangeSchedulingPolicyCompartmentRequest request); + /** * Moves a VM cluster and its dependent resources to another compartment. Applies to Exadata Cloud@Customer instances only. * To move a cloud VM cluster in an Exadata Cloud Service instance to another compartment, use the {@link #changeCloudVmClusterCompartment(ChangeCloudVmClusterCompartmentRequest) changeCloudVmClusterCompartment} operation. @@ -523,6 +649,20 @@ CompleteExternalBackupJobResponse completeExternalBackupJob( ConfigureAutonomousDatabaseVaultKeyResponse configureAutonomousDatabaseVaultKey( ConfigureAutonomousDatabaseVaultKeyRequest request); + /** + * Configures Exascale on Exadata infrastructure resource. Applies to Exadata Cloud@Customer instances only. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ConfigureExascaleExadataInfrastructure API. + */ + ConfigureExascaleExadataInfrastructureResponse configureExascaleExadataInfrastructure( + ConfigureExascaleExadataInfrastructureRequest request); + /** * This operation updates SaaS administrative user configuration of the Autonomous Database. * @param request The request object containing the details to send @@ -535,6 +675,21 @@ ConfigureAutonomousDatabaseVaultKeyResponse configureAutonomousDatabaseVaultKey( */ ConfigureSaasAdminUserResponse configureSaasAdminUser(ConfigureSaasAdminUserRequest request); + /** + * This is for user to confirm to DBaaS that the Oracle Key Valut (OKV) connection IPs, username and password are all correct. This operation will put + * the Key Store back into Active state. If details are incorrect, your OKV account may get locked after some unsuccessful attempts to connect. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ConfirmKeyStoreDetailsAreCorrect API. + */ + ConfirmKeyStoreDetailsAreCorrectResponse confirmKeyStoreDetailsAreCorrect( + ConfirmKeyStoreDetailsAreCorrectRequest request); + /** * Converts a non-container database to a pluggable database. * @@ -839,6 +994,59 @@ CreateDatabaseSoftwareImageResponse createDatabaseSoftwareImage( CreateExadataInfrastructureResponse createExadataInfrastructure( CreateExadataInfrastructureRequest request); + /** + * Creates an Exadata VM cluster on Exascale Infrastructure + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateExadbVmCluster API. + */ + CreateExadbVmClusterResponse createExadbVmCluster(CreateExadbVmClusterRequest request); + + /** + * Creates an Exadata Database Storage Vault + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateExascaleDbStorageVault API. + */ + CreateExascaleDbStorageVaultResponse createExascaleDbStorageVault( + CreateExascaleDbStorageVaultRequest request); + + /** + * Creates an execution action resource. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateExecutionAction API. + */ + CreateExecutionActionResponse createExecutionAction(CreateExecutionActionRequest request); + + /** + * Creates an execution window resource. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateExecutionWindow API. + */ + CreateExecutionWindowResponse createExecutionWindow(CreateExecutionWindowRequest request); + /** * Creates a new backup resource and returns the information the caller needs to back up an on-premises Oracle Database to Oracle Cloud Infrastructure. *

@@ -966,6 +1174,58 @@ CreateExternalPluggableDatabaseResponse createExternalPluggableDatabase( */ CreatePluggableDatabaseResponse createPluggableDatabase(CreatePluggableDatabaseRequest request); + /** + * Creates a Scheduled Action resource. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateScheduledAction API. + */ + CreateScheduledActionResponse createScheduledAction(CreateScheduledActionRequest request); + + /** + * Creates a Scheduling Plan resource. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateSchedulingPlan API. + */ + CreateSchedulingPlanResponse createSchedulingPlan(CreateSchedulingPlanRequest request); + + /** + * Creates a Scheduling Policy resource. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateSchedulingPolicy API. + */ + CreateSchedulingPolicyResponse createSchedulingPolicy(CreateSchedulingPolicyRequest request); + + /** + * Creates a Scheduling Window resource. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateSchedulingWindow API. + */ + CreateSchedulingWindowResponse createSchedulingWindow(CreateSchedulingWindowRequest request); + /** * Creates an Exadata Cloud@Customer VM cluster. * @@ -1233,6 +1493,59 @@ DeleteDatabaseSoftwareImageResponse deleteDatabaseSoftwareImage( DeleteExadataInfrastructureResponse deleteExadataInfrastructure( DeleteExadataInfrastructureRequest request); + /** + * Deletes the specified Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteExadbVmCluster API. + */ + DeleteExadbVmClusterResponse deleteExadbVmCluster(DeleteExadbVmClusterRequest request); + + /** + * Deletes the specified Exadata Database Storage Vault. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteExascaleDbStorageVault API. + */ + DeleteExascaleDbStorageVaultResponse deleteExascaleDbStorageVault( + DeleteExascaleDbStorageVaultRequest request); + + /** + * Deletes the execution action. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteExecutionAction API. + */ + DeleteExecutionActionResponse deleteExecutionAction(DeleteExecutionActionRequest request); + + /** + * Deletes the execution window. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteExecutionWindow API. + */ + DeleteExecutionWindowResponse deleteExecutionWindow(DeleteExecutionWindowRequest request); + /** * Deletes the {@link #createExternalContainerDatabaseDetails(CreateExternalContainerDatabaseDetailsRequest) createExternalContainerDatabaseDetails} * resource. Any external pluggable databases registered under this container database must be deleted in @@ -1332,6 +1645,58 @@ DeleteExternalPluggableDatabaseResponse deleteExternalPluggableDatabase( */ DeletePluggableDatabaseResponse deletePluggableDatabase(DeletePluggableDatabaseRequest request); + /** + * Deletes the scheduled action. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteScheduledAction API. + */ + DeleteScheduledActionResponse deleteScheduledAction(DeleteScheduledActionRequest request); + + /** + * Deletes the scheduling plan. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteSchedulingPlan API. + */ + DeleteSchedulingPlanResponse deleteSchedulingPlan(DeleteSchedulingPlanRequest request); + + /** + * Deletes the scheduling policy. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteSchedulingPolicy API. + */ + DeleteSchedulingPolicyResponse deleteSchedulingPolicy(DeleteSchedulingPolicyRequest request); + + /** + * Deletes the scheduling window. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteSchedulingWindow API. + */ + DeleteSchedulingWindowResponse deleteSchedulingWindow(DeleteSchedulingWindowRequest request); + /** * Deletes the specified VM cluster. Applies to Exadata Cloud@Customer instances only. * @@ -2487,6 +2852,86 @@ GetExadataInfrastructureOcpusResponse getExadataInfrastructureOcpus( */ GetExadataIormConfigResponse getExadataIormConfig(GetExadataIormConfigRequest request); + /** + * Gets information about the specified Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetExadbVmCluster API. + */ + GetExadbVmClusterResponse getExadbVmCluster(GetExadbVmClusterRequest request); + + /** + * Gets information about a specified maintenance update package for a Exadata VM cluster on Exascale Infrastructure. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetExadbVmClusterUpdate API. + */ + GetExadbVmClusterUpdateResponse getExadbVmClusterUpdate(GetExadbVmClusterUpdateRequest request); + + /** + * Gets the maintenance update history details for the specified update history entry. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetExadbVmClusterUpdateHistoryEntry API. + */ + GetExadbVmClusterUpdateHistoryEntryResponse getExadbVmClusterUpdateHistoryEntry( + GetExadbVmClusterUpdateHistoryEntryRequest request); + + /** + * Gets information about the specified Exadata Database Storage Vaults in the specified compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetExascaleDbStorageVault API. + */ + GetExascaleDbStorageVaultResponse getExascaleDbStorageVault( + GetExascaleDbStorageVaultRequest request); + + /** + * Gets information about the specified execution action. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetExecutionAction API. + */ + GetExecutionActionResponse getExecutionAction(GetExecutionActionRequest request); + + /** + * Gets information about the specified execution window. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetExecutionWindow API. + */ + GetExecutionWindowResponse getExecutionWindow(GetExecutionWindowRequest request); + /** * Gets information about the specified external backup job. *

@@ -2648,6 +3093,58 @@ GetPdbConversionHistoryEntryResponse getPdbConversionHistoryEntry( */ GetPluggableDatabaseResponse getPluggableDatabase(GetPluggableDatabaseRequest request); + /** + * Gets information about the specified Scheduled Action. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetScheduledAction API. + */ + GetScheduledActionResponse getScheduledAction(GetScheduledActionRequest request); + + /** + * Gets information about the specified Scheduling Plan. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetSchedulingPlan API. + */ + GetSchedulingPlanResponse getSchedulingPlan(GetSchedulingPlanRequest request); + + /** + * Gets information about the specified Scheduling Policy. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetSchedulingPolicy API. + */ + GetSchedulingPolicyResponse getSchedulingPolicy(GetSchedulingPolicyRequest request); + + /** + * Gets information about the specified Scheduling Window. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetSchedulingWindow API. + */ + GetSchedulingWindowResponse getSchedulingWindow(GetSchedulingWindowRequest request); + /** * Gets information about the VM cluster. Applies to Exadata Cloud@Customer instances only. * @@ -3299,10 +3796,95 @@ ListDbHomePatchHistoryEntriesResponse listDbHomePatchHistoryEntries( * * Example: Click here to see how to use ListDbServers API. */ - ListDbServersResponse listDbServers(ListDbServersRequest request); + ListDbServersResponse listDbServers(ListDbServersRequest request); + + /** + * Gets a list of expected compute performance parameters for a virtual machine DB system based on system configuration. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListDbSystemComputePerformances API. + */ + ListDbSystemComputePerformancesResponse listDbSystemComputePerformances( + ListDbSystemComputePerformancesRequest request); + + /** + * Gets the history of the patch actions performed on the specified DB system. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListDbSystemPatchHistoryEntries API. + */ + ListDbSystemPatchHistoryEntriesResponse listDbSystemPatchHistoryEntries( + ListDbSystemPatchHistoryEntriesRequest request); + + /** + * Lists the patches applicable to the specified DB system. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListDbSystemPatches API. + */ + ListDbSystemPatchesResponse listDbSystemPatches(ListDbSystemPatchesRequest request); + + /** + * Gets a list of the shapes that can be used to launch a new DB system. The shape determines resources to allocate to the DB system - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListDbSystemShapes API. + */ + ListDbSystemShapesResponse listDbSystemShapes(ListDbSystemShapesRequest request); + + /** + * Gets a list of possible expected storage performance parameters of a VMDB System based on Configuration. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListDbSystemStoragePerformances API. + */ + ListDbSystemStoragePerformancesResponse listDbSystemStoragePerformances( + ListDbSystemStoragePerformancesRequest request); + + /** + * Gets the history of the upgrade actions performed on the specified DB system. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListDbSystemUpgradeHistoryEntries API. + */ + ListDbSystemUpgradeHistoryEntriesResponse listDbSystemUpgradeHistoryEntries( + ListDbSystemUpgradeHistoryEntriesRequest request); /** - * Gets a list of expected compute performance parameters for a virtual machine DB system based on system configuration. + * Lists the DB systems in the specified compartment. You can specify a `backupId` to list only the DB systems that support creating a database using this backup in this compartment. + *

+ **Note:** Deprecated for Exadata Cloud Service systems. Use the [new resource model APIs](https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/exaflexsystem.htm#exaflexsystem_topic-resource_model) instead. + *

+ * For Exadata Cloud Service instances, support for this API will end on May 15th, 2021. See [Switching an Exadata DB System to the New Resource Model and APIs](https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/exaflexsystem_topic-resource_model_conversion.htm) for details on converting existing Exadata DB systems to the new resource model. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -3310,27 +3892,25 @@ ListDbHomePatchHistoryEntriesResponse listDbHomePatchHistoryEntries( * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries * - * Example: Click here to see how to use ListDbSystemComputePerformances API. + * Example: Click here to see how to use ListDbSystems API. */ - ListDbSystemComputePerformancesResponse listDbSystemComputePerformances( - ListDbSystemComputePerformancesRequest request); + ListDbSystemsResponse listDbSystems(ListDbSystemsRequest request); /** - * Gets the history of the patch actions performed on the specified DB system. - * + * Gets a list of supported Oracle Database versions. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries * - * Example: Click here to see how to use ListDbSystemPatchHistoryEntries API. + * Example: Click here to see how to use ListDbVersions API. */ - ListDbSystemPatchHistoryEntriesResponse listDbSystemPatchHistoryEntries( - ListDbSystemPatchHistoryEntriesRequest request); + ListDbVersionsResponse listDbVersions(ListDbVersionsRequest request); /** - * Lists the patches applicable to the specified DB system. + * Lists the Exadata infrastructure resources in the specified compartment. Applies to Exadata Cloud@Customer instances only. + * To list the Exadata Cloud Service infrastructure resources in a compartment, use the {@link #listCloudExadataInfrastructures(ListCloudExadataInfrastructuresRequest) listCloudExadataInfrastructures} operation. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -3338,24 +3918,27 @@ ListDbSystemPatchHistoryEntriesResponse listDbSystemPatchHistoryEntries( * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries * - * Example: Click here to see how to use ListDbSystemPatches API. + * Example: Click here to see how to use ListExadataInfrastructures API. */ - ListDbSystemPatchesResponse listDbSystemPatches(ListDbSystemPatchesRequest request); + ListExadataInfrastructuresResponse listExadataInfrastructures( + ListExadataInfrastructuresRequest request); /** - * Gets a list of the shapes that can be used to launch a new DB system. The shape determines resources to allocate to the DB system - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. + * Gets the history of the maintenance update actions performed on the specified Exadata VM cluster on Exascale Infrastructure. + * * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries * - * Example: Click here to see how to use ListDbSystemShapes API. + * Example: Click here to see how to use ListExadbVmClusterUpdateHistoryEntries API. */ - ListDbSystemShapesResponse listDbSystemShapes(ListDbSystemShapesRequest request); + ListExadbVmClusterUpdateHistoryEntriesResponse listExadbVmClusterUpdateHistoryEntries( + ListExadbVmClusterUpdateHistoryEntriesRequest request); /** - * Gets a list of possible expected storage performance parameters of a VMDB System based on Configuration. + * Lists the maintenance updates that can be applied to the specified Exadata VM cluster on Exascale Infrastructure. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -3363,13 +3946,13 @@ ListDbSystemPatchHistoryEntriesResponse listDbSystemPatchHistoryEntries( * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries * - * Example: Click here to see how to use ListDbSystemStoragePerformances API. + * Example: Click here to see how to use ListExadbVmClusterUpdates API. */ - ListDbSystemStoragePerformancesResponse listDbSystemStoragePerformances( - ListDbSystemStoragePerformancesRequest request); + ListExadbVmClusterUpdatesResponse listExadbVmClusterUpdates( + ListExadbVmClusterUpdatesRequest request); /** - * Gets the history of the upgrade actions performed on the specified DB system. + * Gets a list of the Exadata VM clusters on Exascale Infrastructure in the specified compartment. Applies to Exadata Database Service on Exascale Infrastructure only. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -3377,17 +3960,12 @@ ListDbSystemStoragePerformancesResponse listDbSystemStoragePerformances( * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries * - * Example: Click here to see how to use ListDbSystemUpgradeHistoryEntries API. + * Example: Click here to see how to use ListExadbVmClusters API. */ - ListDbSystemUpgradeHistoryEntriesResponse listDbSystemUpgradeHistoryEntries( - ListDbSystemUpgradeHistoryEntriesRequest request); + ListExadbVmClustersResponse listExadbVmClusters(ListExadbVmClustersRequest request); /** - * Lists the DB systems in the specified compartment. You can specify a `backupId` to list only the DB systems that support creating a database using this backup in this compartment. - *

- **Note:** Deprecated for Exadata Cloud Service systems. Use the [new resource model APIs](https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/exaflexsystem.htm#exaflexsystem_topic-resource_model) instead. - *

- * For Exadata Cloud Service instances, support for this API will end on May 15th, 2021. See [Switching an Exadata DB System to the New Resource Model and APIs](https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/exaflexsystem_topic-resource_model_conversion.htm) for details on converting existing Exadata DB systems to the new resource model. + * Gets a list of the Exadata Database Storage Vaults in the specified compartment. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -3395,25 +3973,26 @@ ListDbSystemUpgradeHistoryEntriesResponse listDbSystemUpgradeHistoryEntries( * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries * - * Example: Click here to see how to use ListDbSystems API. + * Example: Click here to see how to use ListExascaleDbStorageVaults API. */ - ListDbSystemsResponse listDbSystems(ListDbSystemsRequest request); + ListExascaleDbStorageVaultsResponse listExascaleDbStorageVaults( + ListExascaleDbStorageVaultsRequest request); /** - * Gets a list of supported Oracle Database versions. + * Lists the execution action resources in the specified compartment. + * * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries * - * Example: Click here to see how to use ListDbVersions API. + * Example: Click here to see how to use ListExecutionActions API. */ - ListDbVersionsResponse listDbVersions(ListDbVersionsRequest request); + ListExecutionActionsResponse listExecutionActions(ListExecutionActionsRequest request); /** - * Lists the Exadata infrastructure resources in the specified compartment. Applies to Exadata Cloud@Customer instances only. - * To list the Exadata Cloud Service infrastructure resources in a compartment, use the {@link #listCloudExadataInfrastructures(ListCloudExadataInfrastructuresRequest) listCloudExadataInfrastructures} operation. + * Lists the execution window resources in the specified compartment. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -3421,10 +4000,9 @@ ListDbSystemUpgradeHistoryEntriesResponse listDbSystemUpgradeHistoryEntries( * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries * - * Example: Click here to see how to use ListExadataInfrastructures API. + * Example: Click here to see how to use ListExecutionWindows API. */ - ListExadataInfrastructuresResponse listExadataInfrastructures( - ListExadataInfrastructuresRequest request); + ListExecutionWindowsResponse listExecutionWindows(ListExecutionWindowsRequest request); /** * Gets a list of the external container databases in the specified compartment. @@ -3495,6 +4073,19 @@ ListExternalPluggableDatabasesResponse listExternalPluggableDatabases( */ ListFlexComponentsResponse listFlexComponents(ListFlexComponentsRequest request); + /** + * Gets a list of supported Oracle Grid Infrastructure minor versions for the given major version and shape family. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListGiVersionMinorVersions API. + */ + ListGiVersionMinorVersionsResponse listGiVersionMinorVersions( + ListGiVersionMinorVersionsRequest request); + /** * Gets a list of supported GI versions. * @param request The request object containing the details to send @@ -3560,6 +4151,19 @@ ListMaintenanceRunHistoryResponse listMaintenanceRunHistory( */ ListOneoffPatchesResponse listOneoffPatches(ListOneoffPatchesRequest request); + /** + * List all the action params and their possible values for a given action type + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListParamsForActionType API. + */ + ListParamsForActionTypeResponse listParamsForActionType(ListParamsForActionTypeRequest request); + /** * Gets the pluggable database conversion history for a specified database in a bare metal or virtual machine DB system. * @@ -3587,6 +4191,72 @@ ListPdbConversionHistoryEntriesResponse listPdbConversionHistoryEntries( */ ListPluggableDatabasesResponse listPluggableDatabases(ListPluggableDatabasesRequest request); + /** + * Returns a recommended Scheduled Actions configuration for a given resource, plan intent and scheduling policy. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListRecommendedScheduledActions API. + */ + ListRecommendedScheduledActionsResponse listRecommendedScheduledActions( + ListRecommendedScheduledActionsRequest request); + + /** + * Lists the Scheduled Action resources in the specified compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListScheduledActions API. + */ + ListScheduledActionsResponse listScheduledActions(ListScheduledActionsRequest request); + + /** + * Lists the Scheduling Plan resources in the specified compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListSchedulingPlans API. + */ + ListSchedulingPlansResponse listSchedulingPlans(ListSchedulingPlansRequest request); + + /** + * Lists the Scheduling Policy resources in the specified compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListSchedulingPolicies API. + */ + ListSchedulingPoliciesResponse listSchedulingPolicies(ListSchedulingPoliciesRequest request); + + /** + * Lists the Scheduling Window resources in the specified compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListSchedulingWindows API. + */ + ListSchedulingWindowsResponse listSchedulingWindows(ListSchedulingWindowsRequest request); + /** * Gets a list of supported Exadata system versions for a given shape and GI version. * @param request The request object containing the details to send @@ -3748,6 +4418,20 @@ ModifyDatabaseManagementResponse modifyDatabaseManagement( ModifyPluggableDatabaseManagementResponse modifyPluggableDatabaseManagement( ModifyPluggableDatabaseManagementRequest request); + /** + * Moves an execution action member to this execution action resource from another. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use MoveExecutionActionMember API. + */ + MoveExecutionActionMemberResponse moveExecutionActionMember( + MoveExecutionActionMemberRequest request); + /** * Refreshes a pluggable database (PDB) Refreshable clone. * @@ -3835,6 +4519,20 @@ RemoteClonePluggableDatabaseResponse remoteClonePluggableDatabase( RemoveVirtualMachineFromCloudVmClusterResponse removeVirtualMachineFromCloudVmCluster( RemoveVirtualMachineFromCloudVmClusterRequest request); + /** + * Remove Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Cloud instances only. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RemoveVirtualMachineFromExadbVmCluster API. + */ + RemoveVirtualMachineFromExadbVmClusterResponse removeVirtualMachineFromExadbVmCluster( + RemoveVirtualMachineFromExadbVmClusterRequest request); + /** * Remove Virtual Machines from the VM cluster. Applies to Exadata Cloud@Customer instances only. * @@ -3849,6 +4547,32 @@ RemoveVirtualMachineFromCloudVmClusterResponse removeVirtualMachineFromCloudVmCl RemoveVirtualMachineFromVmClusterResponse removeVirtualMachineFromVmCluster( RemoveVirtualMachineFromVmClusterRequest request); + /** + * Reorders the execution actions under this execution window resource. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ReorderExecutionActions API. + */ + ReorderExecutionActionsResponse reorderExecutionActions(ReorderExecutionActionsRequest request); + + /** + * Re-order the scheduled actions under this scheduling plan resource. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ReorderScheduledActions API. + */ + ReorderScheduledActionsResponse reorderScheduledActions(ReorderScheduledActionsRequest request); + /** * Adds or removes Db server network nodes to extend or shrink the existing VM cluster network. Applies to Exadata * Cloud@Customer instances only. @@ -4092,6 +4816,30 @@ RotatePluggableDatabaseEncryptionKeyResponse rotatePluggableDatabaseEncryptionKe scanExternalContainerDatabasePluggableDatabases( ScanExternalContainerDatabasePluggableDatabasesRequest request); + /** + * Sets a new version of an existing [Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) key. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use SetDbKeyVersion API. + */ + SetDbKeyVersionResponse setDbKeyVersion(SetDbKeyVersionRequest request); + + /** + * Sets a new version of an existing [Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) key. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use SetPdbKeyVersion API. + */ + SetPdbKeyVersionResponse setPdbKeyVersion(SetPdbKeyVersionRequest request); + /** * This operation shrinks the current allocated storage down to the current actual used data storage (actualUsedDataStorageSizeInTBs). The if the base storage value for the database (dataStorageSizeInTBs) is larger than the actualUsedDataStorageSizeInTBs value, you are billed for the base storage value. * @@ -4589,6 +5337,59 @@ UpdateExadataInfrastructureResponse updateExadataInfrastructure( */ UpdateExadataIormConfigResponse updateExadataIormConfig(UpdateExadataIormConfigRequest request); + /** + * Updates the specified Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateExadbVmCluster API. + */ + UpdateExadbVmClusterResponse updateExadbVmCluster(UpdateExadbVmClusterRequest request); + + /** + * Updates the specified Exadata Database Storage Vault. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateExascaleDbStorageVault API. + */ + UpdateExascaleDbStorageVaultResponse updateExascaleDbStorageVault( + UpdateExascaleDbStorageVaultRequest request); + + /** + * Updates the execution action resource. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateExecutionAction API. + */ + UpdateExecutionActionResponse updateExecutionAction(UpdateExecutionActionRequest request); + + /** + * Updates the execution window resource. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateExecutionWindow API. + */ + UpdateExecutionWindowResponse updateExecutionWindow(UpdateExecutionWindowRequest request); + /** * Updates the properties of * an {@link #createExternalContainerDatabaseDetails(CreateExternalContainerDatabaseDetailsRequest) createExternalContainerDatabaseDetails} resource, @@ -4697,6 +5498,45 @@ UpdateExternalPluggableDatabaseResponse updateExternalPluggableDatabase( */ UpdatePluggableDatabaseResponse updatePluggableDatabase(UpdatePluggableDatabaseRequest request); + /** + * Updates the Scheduled Action resource. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateScheduledAction API. + */ + UpdateScheduledActionResponse updateScheduledAction(UpdateScheduledActionRequest request); + + /** + * Updates the Scheduling Policy resource. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateSchedulingPolicy API. + */ + UpdateSchedulingPolicyResponse updateSchedulingPolicy(UpdateSchedulingPolicyRequest request); + + /** + * Updates the Scheduling Window resource. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateSchedulingWindow API. + */ + UpdateSchedulingWindowResponse updateSchedulingWindow(UpdateSchedulingWindowRequest request); + /** * Updates the specified VM cluster. Applies to Exadata Cloud@Customer instances only. * diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseAsync.java b/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseAsync.java index f90f3c0e501..bd68d359a71 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseAsync.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseAsync.java @@ -187,6 +187,42 @@ java.util.concurrent.Future cancelBackup( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Cancels the in progress maintenance activity under this execution window. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future cancelExecutionWindow( + CancelExecutionWindowRequest request, + com.oracle.bmc.responses.AsyncHandler< + CancelExecutionWindowRequest, CancelExecutionWindowResponse> + handler); + + /** + * Delete the scheduling plan resource along with all the scheduled actions associated with this resource. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + cascadingDeleteSchedulingPlan( + CascadingDeleteSchedulingPlanRequest request, + com.oracle.bmc.responses.AsyncHandler< + CascadingDeleteSchedulingPlanRequest, + CascadingDeleteSchedulingPlanResponse> + handler); + /** * Move the Autonomous Container Database and its dependent resources to the specified compartment. * For more information about moving Autonomous Container Databases, see @@ -248,6 +284,25 @@ java.util.concurrent.Future cancelBackup( ChangeAutonomousDatabaseSoftwareImageCompartmentResponse> handler); + /** + * Associate an Autonomous Database with a different subscription. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + changeAutonomousDatabaseSubscription( + ChangeAutonomousDatabaseSubscriptionRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeAutonomousDatabaseSubscriptionRequest, + ChangeAutonomousDatabaseSubscriptionResponse> + handler); + /** * **Deprecated.** Use the {@link #changeCloudExadataInfrastructureCompartment(ChangeCloudExadataInfrastructureCompartmentRequest, Consumer, Consumer) changeCloudExadataInfrastructureCompartment} operation to move an Exadata infrastructure resource to a different compartment and {@link #changeCloudAutonomousVmClusterCompartment(ChangeCloudAutonomousVmClusterCompartmentRequest, Consumer, Consumer) changeCloudAutonomousVmClusterCompartment} operation to move an Autonomous Exadata VM cluster to a different compartment. * For more information, see @@ -347,6 +402,25 @@ java.util.concurrent.Future cancelBackup( ChangeCloudExadataInfrastructureCompartmentResponse> handler); + /** + * Associate a cloud Exadata infrastructure with a different subscription. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + changeCloudExadataInfrastructureSubscription( + ChangeCloudExadataInfrastructureSubscriptionRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeCloudExadataInfrastructureSubscriptionRequest, + ChangeCloudExadataInfrastructureSubscriptionResponse> + handler); + /** * Moves a cloud VM cluster and its dependent resources to another compartment. Applies to Exadata Cloud Service instances and Autonomous Database on dedicated Exadata infrastructure only. * @@ -366,6 +440,25 @@ java.util.concurrent.Future cancelBackup( ChangeCloudVmClusterCompartmentResponse> handler); + /** + * Associate a cloud VM cluster with a different subscription. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + changeCloudVmClusterSubscription( + ChangeCloudVmClusterSubscriptionRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeCloudVmClusterSubscriptionRequest, + ChangeCloudVmClusterSubscriptionResponse> + handler); + /** * Move the Database Software Image and its dependent resources to the specified compartment. * For more information about moving Databse Software Images, see @@ -463,6 +556,44 @@ java.util.concurrent.Future changeDbSystemCom ChangeExadataInfrastructureCompartmentResponse> handler); + /** + * Moves a Exadata VM cluster on Exascale Infrastructure and its dependent resources to another compartment. Applies to Exadata Database Service on Exascale Infrastructure only. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + changeExadbVmClusterCompartment( + ChangeExadbVmClusterCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeExadbVmClusterCompartmentRequest, + ChangeExadbVmClusterCompartmentResponse> + handler); + + /** + * Moves a Exadata Database Storage Vault to another compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + changeExascaleDbStorageVaultCompartment( + ChangeExascaleDbStorageVaultCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeExascaleDbStorageVaultCompartmentRequest, + ChangeExascaleDbStorageVaultCompartmentResponse> + handler); + /** * Move the {@link #createExternalContainerDatabaseDetails(CreateExternalContainerDatabaseDetailsRequest, Consumer, Consumer) createExternalContainerDatabaseDetails} * and its dependent resources to the specified compartment. @@ -581,6 +712,44 @@ java.util.concurrent.Future changeOneoffPa ChangeOneoffPatchCompartmentResponse> handler); + /** + * Moves an scheduling plan resource to another compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + changeSchedulingPlanCompartment( + ChangeSchedulingPlanCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeSchedulingPlanCompartmentRequest, + ChangeSchedulingPlanCompartmentResponse> + handler); + + /** + * Moves an scheduling policy resource to another compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + changeSchedulingPolicyCompartment( + ChangeSchedulingPolicyCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeSchedulingPolicyCompartmentRequest, + ChangeSchedulingPolicyCompartmentResponse> + handler); + /** * Moves a VM cluster and its dependent resources to another compartment. Applies to Exadata Cloud@Customer instances only. * To move a cloud VM cluster in an Exadata Cloud Service instance to another compartment, use the {@link #changeCloudVmClusterCompartment(ChangeCloudVmClusterCompartmentRequest, Consumer, Consumer) changeCloudVmClusterCompartment} operation. @@ -657,6 +826,25 @@ java.util.concurrent.Future completeExternalB ConfigureAutonomousDatabaseVaultKeyResponse> handler); + /** + * Configures Exascale on Exadata infrastructure resource. Applies to Exadata Cloud@Customer instances only. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + configureExascaleExadataInfrastructure( + ConfigureExascaleExadataInfrastructureRequest request, + com.oracle.bmc.responses.AsyncHandler< + ConfigureExascaleExadataInfrastructureRequest, + ConfigureExascaleExadataInfrastructureResponse> + handler); + /** * This operation updates SaaS administrative user configuration of the Autonomous Database. * @@ -673,6 +861,26 @@ java.util.concurrent.Future configureSaasAdminUs ConfigureSaasAdminUserRequest, ConfigureSaasAdminUserResponse> handler); + /** + * This is for user to confirm to DBaaS that the Oracle Key Valut (OKV) connection IPs, username and password are all correct. This operation will put + * the Key Store back into Active state. If details are incorrect, your OKV account may get locked after some unsuccessful attempts to connect. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + confirmKeyStoreDetailsAreCorrect( + ConfirmKeyStoreDetailsAreCorrectRequest request, + com.oracle.bmc.responses.AsyncHandler< + ConfirmKeyStoreDetailsAreCorrectRequest, + ConfirmKeyStoreDetailsAreCorrectResponse> + handler); + /** * Converts a non-container database to a pluggable database. * @@ -1058,6 +1266,75 @@ java.util.concurrent.Future createExadataIn CreateExadataInfrastructureRequest, CreateExadataInfrastructureResponse> handler); + /** + * Creates an Exadata VM cluster on Exascale Infrastructure + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createExadbVmCluster( + CreateExadbVmClusterRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateExadbVmClusterRequest, CreateExadbVmClusterResponse> + handler); + + /** + * Creates an Exadata Database Storage Vault + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createExascaleDbStorageVault( + CreateExascaleDbStorageVaultRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateExascaleDbStorageVaultRequest, + CreateExascaleDbStorageVaultResponse> + handler); + + /** + * Creates an execution action resource. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createExecutionAction( + CreateExecutionActionRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateExecutionActionRequest, CreateExecutionActionResponse> + handler); + + /** + * Creates an execution window resource. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createExecutionWindow( + CreateExecutionWindowRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateExecutionWindowRequest, CreateExecutionWindowResponse> + handler); + /** * Creates a new backup resource and returns the information the caller needs to back up an on-premises Oracle Database to Oracle Cloud Infrastructure. *

@@ -1224,6 +1501,74 @@ java.util.concurrent.Future createPluggableData CreatePluggableDatabaseRequest, CreatePluggableDatabaseResponse> handler); + /** + * Creates a Scheduled Action resource. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createScheduledAction( + CreateScheduledActionRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateScheduledActionRequest, CreateScheduledActionResponse> + handler); + + /** + * Creates a Scheduling Plan resource. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createSchedulingPlan( + CreateSchedulingPlanRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateSchedulingPlanRequest, CreateSchedulingPlanResponse> + handler); + + /** + * Creates a Scheduling Policy resource. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createSchedulingPolicy( + CreateSchedulingPolicyRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateSchedulingPolicyRequest, CreateSchedulingPolicyResponse> + handler); + + /** + * Creates a Scheduling Window resource. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createSchedulingWindow( + CreateSchedulingWindowRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateSchedulingWindowRequest, CreateSchedulingWindowResponse> + handler); + /** * Creates an Exadata Cloud@Customer VM cluster. * @@ -1562,6 +1907,75 @@ java.util.concurrent.Future deleteExadataIn DeleteExadataInfrastructureRequest, DeleteExadataInfrastructureResponse> handler); + /** + * Deletes the specified Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteExadbVmCluster( + DeleteExadbVmClusterRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteExadbVmClusterRequest, DeleteExadbVmClusterResponse> + handler); + + /** + * Deletes the specified Exadata Database Storage Vault. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteExascaleDbStorageVault( + DeleteExascaleDbStorageVaultRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteExascaleDbStorageVaultRequest, + DeleteExascaleDbStorageVaultResponse> + handler); + + /** + * Deletes the execution action. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteExecutionAction( + DeleteExecutionActionRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteExecutionActionRequest, DeleteExecutionActionResponse> + handler); + + /** + * Deletes the execution window. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteExecutionWindow( + DeleteExecutionWindowRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteExecutionWindowRequest, DeleteExecutionWindowResponse> + handler); + /** * Deletes the {@link #createExternalContainerDatabaseDetails(CreateExternalContainerDatabaseDetailsRequest, Consumer, Consumer) createExternalContainerDatabaseDetails} * resource. Any external pluggable databases registered under this container database must be deleted in @@ -1605,8 +2019,79 @@ java.util.concurrent.Future deleteExadataIn handler); /** - * Deletes the Oracle Cloud Infrastructure resource representing an external non-container database. - * + * Deletes the Oracle Cloud Infrastructure resource representing an external non-container database. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + deleteExternalNonContainerDatabase( + DeleteExternalNonContainerDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteExternalNonContainerDatabaseRequest, + DeleteExternalNonContainerDatabaseResponse> + handler); + + /** + * Deletes the {@link #createExternalPluggableDatabaseDetails(CreateExternalPluggableDatabaseDetailsRequest, Consumer, Consumer) createExternalPluggableDatabaseDetails}. + * resource. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + deleteExternalPluggableDatabase( + DeleteExternalPluggableDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteExternalPluggableDatabaseRequest, + DeleteExternalPluggableDatabaseResponse> + handler); + + /** + * Deletes a key store. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteKeyStore( + DeleteKeyStoreRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Deletes a one-off patch. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteOneoffPatch( + DeleteOneoffPatchRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteOneoffPatchRequest, DeleteOneoffPatchResponse> + handler); + + /** + * Deletes the specified pluggable database. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -1615,17 +2100,14 @@ java.util.concurrent.Future deleteExadataIn * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future - deleteExternalNonContainerDatabase( - DeleteExternalNonContainerDatabaseRequest request, - com.oracle.bmc.responses.AsyncHandler< - DeleteExternalNonContainerDatabaseRequest, - DeleteExternalNonContainerDatabaseResponse> - handler); + java.util.concurrent.Future deletePluggableDatabase( + DeletePluggableDatabaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeletePluggableDatabaseRequest, DeletePluggableDatabaseResponse> + handler); /** - * Deletes the {@link #createExternalPluggableDatabaseDetails(CreateExternalPluggableDatabaseDetailsRequest, Consumer, Consumer) createExternalPluggableDatabaseDetails}. - * resource. + * Deletes the scheduled action. * * * @param request The request object containing the details to send @@ -1635,16 +2117,14 @@ java.util.concurrent.Future deleteExadataIn * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future - deleteExternalPluggableDatabase( - DeleteExternalPluggableDatabaseRequest request, - com.oracle.bmc.responses.AsyncHandler< - DeleteExternalPluggableDatabaseRequest, - DeleteExternalPluggableDatabaseResponse> - handler); + java.util.concurrent.Future deleteScheduledAction( + DeleteScheduledActionRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteScheduledActionRequest, DeleteScheduledActionResponse> + handler); /** - * Deletes a key store. + * Deletes the scheduling plan. * * * @param request The request object containing the details to send @@ -1654,13 +2134,14 @@ java.util.concurrent.Future deleteExadataIn * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future deleteKeyStore( - DeleteKeyStoreRequest request, - com.oracle.bmc.responses.AsyncHandler + java.util.concurrent.Future deleteSchedulingPlan( + DeleteSchedulingPlanRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteSchedulingPlanRequest, DeleteSchedulingPlanResponse> handler); /** - * Deletes a one-off patch. + * Deletes the scheduling policy. * * * @param request The request object containing the details to send @@ -1670,14 +2151,15 @@ java.util.concurrent.Future deleteKeyStore( * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future deleteOneoffPatch( - DeleteOneoffPatchRequest request, + java.util.concurrent.Future deleteSchedulingPolicy( + DeleteSchedulingPolicyRequest request, com.oracle.bmc.responses.AsyncHandler< - DeleteOneoffPatchRequest, DeleteOneoffPatchResponse> + DeleteSchedulingPolicyRequest, DeleteSchedulingPolicyResponse> handler); /** - * Deletes the specified pluggable database. + * Deletes the scheduling window. + * * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -1686,10 +2168,10 @@ java.util.concurrent.Future deleteOneoffPatch( * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future deletePluggableDatabase( - DeletePluggableDatabaseRequest request, + java.util.concurrent.Future deleteSchedulingWindow( + DeleteSchedulingWindowRequest request, com.oracle.bmc.responses.AsyncHandler< - DeletePluggableDatabaseRequest, DeletePluggableDatabaseResponse> + DeleteSchedulingWindowRequest, DeleteSchedulingWindowResponse> handler); /** @@ -3167,6 +3649,110 @@ java.util.concurrent.Future getExadataIormConfig( GetExadataIormConfigRequest, GetExadataIormConfigResponse> handler); + /** + * Gets information about the specified Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getExadbVmCluster( + GetExadbVmClusterRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetExadbVmClusterRequest, GetExadbVmClusterResponse> + handler); + + /** + * Gets information about a specified maintenance update package for a Exadata VM cluster on Exascale Infrastructure. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getExadbVmClusterUpdate( + GetExadbVmClusterUpdateRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetExadbVmClusterUpdateRequest, GetExadbVmClusterUpdateResponse> + handler); + + /** + * Gets the maintenance update history details for the specified update history entry. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + getExadbVmClusterUpdateHistoryEntry( + GetExadbVmClusterUpdateHistoryEntryRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetExadbVmClusterUpdateHistoryEntryRequest, + GetExadbVmClusterUpdateHistoryEntryResponse> + handler); + + /** + * Gets information about the specified Exadata Database Storage Vaults in the specified compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getExascaleDbStorageVault( + GetExascaleDbStorageVaultRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetExascaleDbStorageVaultRequest, GetExascaleDbStorageVaultResponse> + handler); + + /** + * Gets information about the specified execution action. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getExecutionAction( + GetExecutionActionRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetExecutionActionRequest, GetExecutionActionResponse> + handler); + + /** + * Gets information about the specified execution window. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getExecutionWindow( + GetExecutionWindowRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetExecutionWindowRequest, GetExecutionWindowResponse> + handler); + /** * Gets information about the specified external backup job. *

@@ -3374,6 +3960,74 @@ java.util.concurrent.Future getPluggableDatabase( GetPluggableDatabaseRequest, GetPluggableDatabaseResponse> handler); + /** + * Gets information about the specified Scheduled Action. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getScheduledAction( + GetScheduledActionRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetScheduledActionRequest, GetScheduledActionResponse> + handler); + + /** + * Gets information about the specified Scheduling Plan. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getSchedulingPlan( + GetSchedulingPlanRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetSchedulingPlanRequest, GetSchedulingPlanResponse> + handler); + + /** + * Gets information about the specified Scheduling Policy. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getSchedulingPolicy( + GetSchedulingPolicyRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetSchedulingPolicyRequest, GetSchedulingPolicyResponse> + handler); + + /** + * Gets information about the specified Scheduling Window. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getSchedulingWindow( + GetSchedulingWindowRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetSchedulingWindowRequest, GetSchedulingWindowResponse> + handler); + /** * Gets information about the VM cluster. Applies to Exadata Cloud@Customer instances only. * @@ -4378,7 +5032,111 @@ java.util.concurrent.Future listDbVersions( java.util.concurrent.Future listExadataInfrastructures( ListExadataInfrastructuresRequest request, com.oracle.bmc.responses.AsyncHandler< - ListExadataInfrastructuresRequest, ListExadataInfrastructuresResponse> + ListExadataInfrastructuresRequest, ListExadataInfrastructuresResponse> + handler); + + /** + * Gets the history of the maintenance update actions performed on the specified Exadata VM cluster on Exascale Infrastructure. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listExadbVmClusterUpdateHistoryEntries( + ListExadbVmClusterUpdateHistoryEntriesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListExadbVmClusterUpdateHistoryEntriesRequest, + ListExadbVmClusterUpdateHistoryEntriesResponse> + handler); + + /** + * Lists the maintenance updates that can be applied to the specified Exadata VM cluster on Exascale Infrastructure. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listExadbVmClusterUpdates( + ListExadbVmClusterUpdatesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListExadbVmClusterUpdatesRequest, ListExadbVmClusterUpdatesResponse> + handler); + + /** + * Gets a list of the Exadata VM clusters on Exascale Infrastructure in the specified compartment. Applies to Exadata Database Service on Exascale Infrastructure only. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listExadbVmClusters( + ListExadbVmClustersRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListExadbVmClustersRequest, ListExadbVmClustersResponse> + handler); + + /** + * Gets a list of the Exadata Database Storage Vaults in the specified compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listExascaleDbStorageVaults( + ListExascaleDbStorageVaultsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListExascaleDbStorageVaultsRequest, ListExascaleDbStorageVaultsResponse> + handler); + + /** + * Lists the execution action resources in the specified compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listExecutionActions( + ListExecutionActionsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListExecutionActionsRequest, ListExecutionActionsResponse> + handler); + + /** + * Lists the execution window resources in the specified compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listExecutionWindows( + ListExecutionWindowsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListExecutionWindowsRequest, ListExecutionWindowsResponse> handler); /** @@ -4474,6 +5232,22 @@ java.util.concurrent.Future listFlexComponents( ListFlexComponentsRequest, ListFlexComponentsResponse> handler); + /** + * Gets a list of supported Oracle Grid Infrastructure minor versions for the given major version and shape family. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listGiVersionMinorVersions( + ListGiVersionMinorVersionsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListGiVersionMinorVersionsRequest, ListGiVersionMinorVersionsResponse> + handler); + /** * Gets a list of supported GI versions. * @@ -4556,6 +5330,23 @@ java.util.concurrent.Future listOneoffPatches( ListOneoffPatchesRequest, ListOneoffPatchesResponse> handler); + /** + * List all the action params and their possible values for a given action type + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listParamsForActionType( + ListParamsForActionTypeRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListParamsForActionTypeRequest, ListParamsForActionTypeResponse> + handler); + /** * Gets the pluggable database conversion history for a specified database in a bare metal or virtual machine DB system. * @@ -4592,6 +5383,93 @@ java.util.concurrent.Future listPluggableDatabas ListPluggableDatabasesRequest, ListPluggableDatabasesResponse> handler); + /** + * Returns a recommended Scheduled Actions configuration for a given resource, plan intent and scheduling policy. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listRecommendedScheduledActions( + ListRecommendedScheduledActionsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListRecommendedScheduledActionsRequest, + ListRecommendedScheduledActionsResponse> + handler); + + /** + * Lists the Scheduled Action resources in the specified compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listScheduledActions( + ListScheduledActionsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListScheduledActionsRequest, ListScheduledActionsResponse> + handler); + + /** + * Lists the Scheduling Plan resources in the specified compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listSchedulingPlans( + ListSchedulingPlansRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListSchedulingPlansRequest, ListSchedulingPlansResponse> + handler); + + /** + * Lists the Scheduling Policy resources in the specified compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listSchedulingPolicies( + ListSchedulingPoliciesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListSchedulingPoliciesRequest, ListSchedulingPoliciesResponse> + handler); + + /** + * Lists the Scheduling Window resources in the specified compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listSchedulingWindows( + ListSchedulingWindowsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListSchedulingWindowsRequest, ListSchedulingWindowsResponse> + handler); + /** * Gets a list of supported Exadata system versions for a given shape and GI version. * @@ -4801,6 +5679,23 @@ java.util.concurrent.Future modifyDatabaseMana ModifyPluggableDatabaseManagementResponse> handler); + /** + * Moves an execution action member to this execution action resource from another. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future moveExecutionActionMember( + MoveExecutionActionMemberRequest request, + com.oracle.bmc.responses.AsyncHandler< + MoveExecutionActionMemberRequest, MoveExecutionActionMemberResponse> + handler); + /** * Refreshes a pluggable database (PDB) Refreshable clone. * @@ -4914,6 +5809,25 @@ java.util.concurrent.Future remoteClonePlu RemoveVirtualMachineFromCloudVmClusterResponse> handler); + /** + * Remove Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Cloud instances only. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + removeVirtualMachineFromExadbVmCluster( + RemoveVirtualMachineFromExadbVmClusterRequest request, + com.oracle.bmc.responses.AsyncHandler< + RemoveVirtualMachineFromExadbVmClusterRequest, + RemoveVirtualMachineFromExadbVmClusterResponse> + handler); + /** * Remove Virtual Machines from the VM cluster. Applies to Exadata Cloud@Customer instances only. * @@ -4933,6 +5847,40 @@ java.util.concurrent.Future remoteClonePlu RemoveVirtualMachineFromVmClusterResponse> handler); + /** + * Reorders the execution actions under this execution window resource. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future reorderExecutionActions( + ReorderExecutionActionsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ReorderExecutionActionsRequest, ReorderExecutionActionsResponse> + handler); + + /** + * Re-order the scheduled actions under this scheduling plan resource. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future reorderScheduledActions( + ReorderScheduledActionsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ReorderScheduledActionsRequest, ReorderScheduledActionsResponse> + handler); + /** * Adds or removes Db server network nodes to extend or shrink the existing VM cluster network. Applies to Exadata * Cloud@Customer instances only. @@ -5249,6 +6197,36 @@ java.util.concurrent.Future saasAdminUserStatus( ScanExternalContainerDatabasePluggableDatabasesResponse> handler); + /** + * Sets a new version of an existing [Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) key. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future setDbKeyVersion( + SetDbKeyVersionRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Sets a new version of an existing [Vault service](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) key. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future setPdbKeyVersion( + SetPdbKeyVersionRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * This operation shrinks the current allocated storage down to the current actual used data storage (actualUsedDataStorageSizeInTBs). The if the base storage value for the database (dataStorageSizeInTBs) is larger than the actualUsedDataStorageSizeInTBs value, you are billed for the base storage value. * @@ -5888,6 +6866,75 @@ java.util.concurrent.Future updateExadataIormCo UpdateExadataIormConfigRequest, UpdateExadataIormConfigResponse> handler); + /** + * Updates the specified Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateExadbVmCluster( + UpdateExadbVmClusterRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateExadbVmClusterRequest, UpdateExadbVmClusterResponse> + handler); + + /** + * Updates the specified Exadata Database Storage Vault. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateExascaleDbStorageVault( + UpdateExascaleDbStorageVaultRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateExascaleDbStorageVaultRequest, + UpdateExascaleDbStorageVaultResponse> + handler); + + /** + * Updates the execution action resource. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateExecutionAction( + UpdateExecutionActionRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateExecutionActionRequest, UpdateExecutionActionResponse> + handler); + + /** + * Updates the execution window resource. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateExecutionWindow( + UpdateExecutionWindowRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateExecutionWindowRequest, UpdateExecutionWindowResponse> + handler); + /** * Updates the properties of * an {@link #createExternalContainerDatabaseDetails(CreateExternalContainerDatabaseDetailsRequest, Consumer, Consumer) createExternalContainerDatabaseDetails} resource, @@ -6031,6 +7078,57 @@ java.util.concurrent.Future updatePluggableData UpdatePluggableDatabaseRequest, UpdatePluggableDatabaseResponse> handler); + /** + * Updates the Scheduled Action resource. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateScheduledAction( + UpdateScheduledActionRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateScheduledActionRequest, UpdateScheduledActionResponse> + handler); + + /** + * Updates the Scheduling Policy resource. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateSchedulingPolicy( + UpdateSchedulingPolicyRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateSchedulingPolicyRequest, UpdateSchedulingPolicyResponse> + handler); + + /** + * Updates the Scheduling Window resource. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateSchedulingWindow( + UpdateSchedulingWindowRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateSchedulingWindowRequest, UpdateSchedulingWindowResponse> + handler); + /** * Updates the specified VM cluster. Applies to Exadata Cloud@Customer instances only. * diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseAsyncClient.java b/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseAsyncClient.java index 8420e870c33..7f22928bb33 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseAsyncClient.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseAsyncClient.java @@ -853,6 +853,111 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future cancelExecutionWindow( + CancelExecutionWindowRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CancelExecutionWindowRequest, CancelExecutionWindowResponse> + handler) { + LOG.trace("Called async cancelExecutionWindow"); + final CancelExecutionWindowRequest interceptedRequest = + CancelExecutionWindowConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CancelExecutionWindowConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "CancelExecutionWindow", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionWindow/CancelExecutionWindow"); + final java.util.function.Function + transformer = + CancelExecutionWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CancelExecutionWindowRequest, CancelExecutionWindowResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CancelExecutionWindowRequest, CancelExecutionWindowResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCancelExecutionWindowDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CancelExecutionWindowRequest, CancelExecutionWindowResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + cascadingDeleteSchedulingPlan( + CascadingDeleteSchedulingPlanRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CascadingDeleteSchedulingPlanRequest, + CascadingDeleteSchedulingPlanResponse> + handler) { + LOG.trace("Called async cascadingDeleteSchedulingPlan"); + final CascadingDeleteSchedulingPlanRequest interceptedRequest = + CascadingDeleteSchedulingPlanConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CascadingDeleteSchedulingPlanConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "CascadingDeleteSchedulingPlan", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPlan/CascadingDeleteSchedulingPlan"); + final java.util.function.Function< + javax.ws.rs.core.Response, CascadingDeleteSchedulingPlanResponse> + transformer = + CascadingDeleteSchedulingPlanConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CascadingDeleteSchedulingPlanRequest, CascadingDeleteSchedulingPlanResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CascadingDeleteSchedulingPlanRequest, + CascadingDeleteSchedulingPlanResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CascadingDeleteSchedulingPlanRequest, CascadingDeleteSchedulingPlanResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future changeAutonomousContainerDatabaseCompartment( @@ -1038,6 +1143,66 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + changeAutonomousDatabaseSubscription( + ChangeAutonomousDatabaseSubscriptionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeAutonomousDatabaseSubscriptionRequest, + ChangeAutonomousDatabaseSubscriptionResponse> + handler) { + LOG.trace("Called async changeAutonomousDatabaseSubscription"); + final ChangeAutonomousDatabaseSubscriptionRequest interceptedRequest = + ChangeAutonomousDatabaseSubscriptionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeAutonomousDatabaseSubscriptionConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ChangeAutonomousDatabaseSubscription", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/ChangeAutonomousDatabaseSubscription"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeAutonomousDatabaseSubscriptionResponse> + transformer = + ChangeAutonomousDatabaseSubscriptionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeAutonomousDatabaseSubscriptionRequest, + ChangeAutonomousDatabaseSubscriptionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeAutonomousDatabaseSubscriptionRequest, + ChangeAutonomousDatabaseSubscriptionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeAutonomousDatabaseSubscriptionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeAutonomousDatabaseSubscriptionRequest, + ChangeAutonomousDatabaseSubscriptionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future changeAutonomousExadataInfrastructureCompartment( @@ -1345,6 +1510,69 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + changeCloudExadataInfrastructureSubscription( + ChangeCloudExadataInfrastructureSubscriptionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeCloudExadataInfrastructureSubscriptionRequest, + ChangeCloudExadataInfrastructureSubscriptionResponse> + handler) { + LOG.trace("Called async changeCloudExadataInfrastructureSubscription"); + final ChangeCloudExadataInfrastructureSubscriptionRequest interceptedRequest = + ChangeCloudExadataInfrastructureSubscriptionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeCloudExadataInfrastructureSubscriptionConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ChangeCloudExadataInfrastructureSubscription", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudExadataInfrastructure/ChangeCloudExadataInfrastructureSubscription"); + final java.util.function.Function< + javax.ws.rs.core.Response, + ChangeCloudExadataInfrastructureSubscriptionResponse> + transformer = + ChangeCloudExadataInfrastructureSubscriptionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeCloudExadataInfrastructureSubscriptionRequest, + ChangeCloudExadataInfrastructureSubscriptionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeCloudExadataInfrastructureSubscriptionRequest, + ChangeCloudExadataInfrastructureSubscriptionResponse>, + java.util.concurrent.Future< + ChangeCloudExadataInfrastructureSubscriptionResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getChangeCloudExadataInfrastructureSubscriptionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeCloudExadataInfrastructureSubscriptionRequest, + ChangeCloudExadataInfrastructureSubscriptionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future changeCloudVmClusterCompartment( @@ -1404,6 +1632,65 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + changeCloudVmClusterSubscription( + ChangeCloudVmClusterSubscriptionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeCloudVmClusterSubscriptionRequest, + ChangeCloudVmClusterSubscriptionResponse> + handler) { + LOG.trace("Called async changeCloudVmClusterSubscription"); + final ChangeCloudVmClusterSubscriptionRequest interceptedRequest = + ChangeCloudVmClusterSubscriptionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeCloudVmClusterSubscriptionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ChangeCloudVmClusterSubscription", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudVmCluster/ChangeCloudVmClusterSubscription"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeCloudVmClusterSubscriptionResponse> + transformer = + ChangeCloudVmClusterSubscriptionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeCloudVmClusterSubscriptionRequest, + ChangeCloudVmClusterSubscriptionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeCloudVmClusterSubscriptionRequest, + ChangeCloudVmClusterSubscriptionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeCloudVmClusterSubscriptionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeCloudVmClusterSubscriptionRequest, + ChangeCloudVmClusterSubscriptionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future changeDatabaseSoftwareImageCompartment( @@ -1693,55 +1980,52 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - changeExternalContainerDatabaseCompartment( - ChangeExternalContainerDatabaseCompartmentRequest request, + public java.util.concurrent.Future + changeExadbVmClusterCompartment( + ChangeExadbVmClusterCompartmentRequest request, final com.oracle.bmc.responses.AsyncHandler< - ChangeExternalContainerDatabaseCompartmentRequest, - ChangeExternalContainerDatabaseCompartmentResponse> + ChangeExadbVmClusterCompartmentRequest, + ChangeExadbVmClusterCompartmentResponse> handler) { - LOG.trace("Called async changeExternalContainerDatabaseCompartment"); - final ChangeExternalContainerDatabaseCompartmentRequest interceptedRequest = - ChangeExternalContainerDatabaseCompartmentConverter.interceptRequest(request); + LOG.trace("Called async changeExadbVmClusterCompartment"); + final ChangeExadbVmClusterCompartmentRequest interceptedRequest = + ChangeExadbVmClusterCompartmentConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ChangeExternalContainerDatabaseCompartmentConverter.fromRequest( - client, interceptedRequest); + ChangeExadbVmClusterCompartmentConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ChangeExternalContainerDatabaseCompartment", + "ChangeExadbVmClusterCompartment", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/ChangeExternalContainerDatabaseCompartment"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmCluster/ChangeExadbVmClusterCompartment"); final java.util.function.Function< - javax.ws.rs.core.Response, - ChangeExternalContainerDatabaseCompartmentResponse> + javax.ws.rs.core.Response, ChangeExadbVmClusterCompartmentResponse> transformer = - ChangeExternalContainerDatabaseCompartmentConverter.fromResponse( + ChangeExadbVmClusterCompartmentConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - ChangeExternalContainerDatabaseCompartmentRequest, - ChangeExternalContainerDatabaseCompartmentResponse> + ChangeExadbVmClusterCompartmentRequest, + ChangeExadbVmClusterCompartmentResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ChangeExternalContainerDatabaseCompartmentRequest, - ChangeExternalContainerDatabaseCompartmentResponse>, - java.util.concurrent.Future< - ChangeExternalContainerDatabaseCompartmentResponse>> + ChangeExadbVmClusterCompartmentRequest, + ChangeExadbVmClusterCompartmentResponse>, + java.util.concurrent.Future> futureSupplier = client.postFutureSupplier( interceptedRequest, - interceptedRequest.getChangeCompartmentDetails(), + interceptedRequest.getChangeExadbVmClusterCompartmentDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ChangeExternalContainerDatabaseCompartmentRequest, - ChangeExternalContainerDatabaseCompartmentResponse>( + ChangeExadbVmClusterCompartmentRequest, + ChangeExadbVmClusterCompartmentResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1755,55 +2039,55 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - changeExternalNonContainerDatabaseCompartment( - ChangeExternalNonContainerDatabaseCompartmentRequest request, + public java.util.concurrent.Future + changeExascaleDbStorageVaultCompartment( + ChangeExascaleDbStorageVaultCompartmentRequest request, final com.oracle.bmc.responses.AsyncHandler< - ChangeExternalNonContainerDatabaseCompartmentRequest, - ChangeExternalNonContainerDatabaseCompartmentResponse> + ChangeExascaleDbStorageVaultCompartmentRequest, + ChangeExascaleDbStorageVaultCompartmentResponse> handler) { - LOG.trace("Called async changeExternalNonContainerDatabaseCompartment"); - final ChangeExternalNonContainerDatabaseCompartmentRequest interceptedRequest = - ChangeExternalNonContainerDatabaseCompartmentConverter.interceptRequest(request); + LOG.trace("Called async changeExascaleDbStorageVaultCompartment"); + final ChangeExascaleDbStorageVaultCompartmentRequest interceptedRequest = + ChangeExascaleDbStorageVaultCompartmentConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ChangeExternalNonContainerDatabaseCompartmentConverter.fromRequest( + ChangeExascaleDbStorageVaultCompartmentConverter.fromRequest( client, interceptedRequest); com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ChangeExternalNonContainerDatabaseCompartment", + "ChangeExascaleDbStorageVaultCompartment", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/ChangeExternalNonContainerDatabaseCompartment"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExascaleDbStorageVault/ChangeExascaleDbStorageVaultCompartment"); final java.util.function.Function< - javax.ws.rs.core.Response, - ChangeExternalNonContainerDatabaseCompartmentResponse> + javax.ws.rs.core.Response, ChangeExascaleDbStorageVaultCompartmentResponse> transformer = - ChangeExternalNonContainerDatabaseCompartmentConverter.fromResponse( + ChangeExascaleDbStorageVaultCompartmentConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - ChangeExternalNonContainerDatabaseCompartmentRequest, - ChangeExternalNonContainerDatabaseCompartmentResponse> + ChangeExascaleDbStorageVaultCompartmentRequest, + ChangeExascaleDbStorageVaultCompartmentResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ChangeExternalNonContainerDatabaseCompartmentRequest, - ChangeExternalNonContainerDatabaseCompartmentResponse>, + ChangeExascaleDbStorageVaultCompartmentRequest, + ChangeExascaleDbStorageVaultCompartmentResponse>, java.util.concurrent.Future< - ChangeExternalNonContainerDatabaseCompartmentResponse>> + ChangeExascaleDbStorageVaultCompartmentResponse>> futureSupplier = client.postFutureSupplier( interceptedRequest, - interceptedRequest.getChangeCompartmentDetails(), + interceptedRequest + .getChangeExascaleDbStorageVaultCompartmentDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ChangeExternalNonContainerDatabaseCompartmentRequest, - ChangeExternalNonContainerDatabaseCompartmentResponse>( + ChangeExascaleDbStorageVaultCompartmentRequest, + ChangeExascaleDbStorageVaultCompartmentResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1817,24 +2101,148 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - changeExternalPluggableDatabaseCompartment( - ChangeExternalPluggableDatabaseCompartmentRequest request, + public java.util.concurrent.Future + changeExternalContainerDatabaseCompartment( + ChangeExternalContainerDatabaseCompartmentRequest request, final com.oracle.bmc.responses.AsyncHandler< - ChangeExternalPluggableDatabaseCompartmentRequest, - ChangeExternalPluggableDatabaseCompartmentResponse> + ChangeExternalContainerDatabaseCompartmentRequest, + ChangeExternalContainerDatabaseCompartmentResponse> handler) { - LOG.trace("Called async changeExternalPluggableDatabaseCompartment"); - final ChangeExternalPluggableDatabaseCompartmentRequest interceptedRequest = - ChangeExternalPluggableDatabaseCompartmentConverter.interceptRequest(request); + LOG.trace("Called async changeExternalContainerDatabaseCompartment"); + final ChangeExternalContainerDatabaseCompartmentRequest interceptedRequest = + ChangeExternalContainerDatabaseCompartmentConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ChangeExternalPluggableDatabaseCompartmentConverter.fromRequest( + ChangeExternalContainerDatabaseCompartmentConverter.fromRequest( client, interceptedRequest); com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ChangeExternalPluggableDatabaseCompartment", + "ChangeExternalContainerDatabaseCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/ChangeExternalContainerDatabaseCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, + ChangeExternalContainerDatabaseCompartmentResponse> + transformer = + ChangeExternalContainerDatabaseCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeExternalContainerDatabaseCompartmentRequest, + ChangeExternalContainerDatabaseCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeExternalContainerDatabaseCompartmentRequest, + ChangeExternalContainerDatabaseCompartmentResponse>, + java.util.concurrent.Future< + ChangeExternalContainerDatabaseCompartmentResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeExternalContainerDatabaseCompartmentRequest, + ChangeExternalContainerDatabaseCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + changeExternalNonContainerDatabaseCompartment( + ChangeExternalNonContainerDatabaseCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeExternalNonContainerDatabaseCompartmentRequest, + ChangeExternalNonContainerDatabaseCompartmentResponse> + handler) { + LOG.trace("Called async changeExternalNonContainerDatabaseCompartment"); + final ChangeExternalNonContainerDatabaseCompartmentRequest interceptedRequest = + ChangeExternalNonContainerDatabaseCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeExternalNonContainerDatabaseCompartmentConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ChangeExternalNonContainerDatabaseCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/ChangeExternalNonContainerDatabaseCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, + ChangeExternalNonContainerDatabaseCompartmentResponse> + transformer = + ChangeExternalNonContainerDatabaseCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeExternalNonContainerDatabaseCompartmentRequest, + ChangeExternalNonContainerDatabaseCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeExternalNonContainerDatabaseCompartmentRequest, + ChangeExternalNonContainerDatabaseCompartmentResponse>, + java.util.concurrent.Future< + ChangeExternalNonContainerDatabaseCompartmentResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeExternalNonContainerDatabaseCompartmentRequest, + ChangeExternalNonContainerDatabaseCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + changeExternalPluggableDatabaseCompartment( + ChangeExternalPluggableDatabaseCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeExternalPluggableDatabaseCompartmentRequest, + ChangeExternalPluggableDatabaseCompartmentResponse> + handler) { + LOG.trace("Called async changeExternalPluggableDatabaseCompartment"); + final ChangeExternalPluggableDatabaseCompartmentRequest interceptedRequest = + ChangeExternalPluggableDatabaseCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeExternalPluggableDatabaseCompartmentConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ChangeExternalPluggableDatabaseCompartment", ib.getRequestUri().toString(), "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/ChangeExternalPluggableDatabaseCompartment"); final java.util.function.Function< @@ -2042,6 +2450,124 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + changeSchedulingPlanCompartment( + ChangeSchedulingPlanCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeSchedulingPlanCompartmentRequest, + ChangeSchedulingPlanCompartmentResponse> + handler) { + LOG.trace("Called async changeSchedulingPlanCompartment"); + final ChangeSchedulingPlanCompartmentRequest interceptedRequest = + ChangeSchedulingPlanCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeSchedulingPlanCompartmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ChangeSchedulingPlanCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPlan/ChangeSchedulingPlanCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeSchedulingPlanCompartmentResponse> + transformer = + ChangeSchedulingPlanCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeSchedulingPlanCompartmentRequest, + ChangeSchedulingPlanCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeSchedulingPlanCompartmentRequest, + ChangeSchedulingPlanCompartmentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeSchedulingPlanCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeSchedulingPlanCompartmentRequest, + ChangeSchedulingPlanCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + changeSchedulingPolicyCompartment( + ChangeSchedulingPolicyCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeSchedulingPolicyCompartmentRequest, + ChangeSchedulingPolicyCompartmentResponse> + handler) { + LOG.trace("Called async changeSchedulingPolicyCompartment"); + final ChangeSchedulingPolicyCompartmentRequest interceptedRequest = + ChangeSchedulingPolicyCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeSchedulingPolicyCompartmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ChangeSchedulingPolicyCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPolicy/ChangeSchedulingPolicyCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeSchedulingPolicyCompartmentResponse> + transformer = + ChangeSchedulingPolicyCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeSchedulingPolicyCompartmentRequest, + ChangeSchedulingPolicyCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeSchedulingPolicyCompartmentRequest, + ChangeSchedulingPolicyCompartmentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeSchedulingPolicyCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeSchedulingPolicyCompartmentRequest, + ChangeSchedulingPolicyCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future changeVmClusterCompartment( @@ -2271,6 +2797,67 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + configureExascaleExadataInfrastructure( + ConfigureExascaleExadataInfrastructureRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ConfigureExascaleExadataInfrastructureRequest, + ConfigureExascaleExadataInfrastructureResponse> + handler) { + LOG.trace("Called async configureExascaleExadataInfrastructure"); + final ConfigureExascaleExadataInfrastructureRequest interceptedRequest = + ConfigureExascaleExadataInfrastructureConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConfigureExascaleExadataInfrastructureConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ConfigureExascaleExadataInfrastructure", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadataInfrastructure/ConfigureExascaleExadataInfrastructure"); + final java.util.function.Function< + javax.ws.rs.core.Response, ConfigureExascaleExadataInfrastructureResponse> + transformer = + ConfigureExascaleExadataInfrastructureConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ConfigureExascaleExadataInfrastructureRequest, + ConfigureExascaleExadataInfrastructureResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ConfigureExascaleExadataInfrastructureRequest, + ConfigureExascaleExadataInfrastructureResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getConfigureExascaleExadataInfrastructureDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ConfigureExascaleExadataInfrastructureRequest, + ConfigureExascaleExadataInfrastructureResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future configureSaasAdminUser( ConfigureSaasAdminUserRequest request, @@ -2324,22 +2911,76 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future convertToPdb( - ConvertToPdbRequest request, - final com.oracle.bmc.responses.AsyncHandler - handler) { - LOG.trace("Called async convertToPdb"); - final ConvertToPdbRequest interceptedRequest = - ConvertToPdbConverter.interceptRequest(request); + public java.util.concurrent.Future + confirmKeyStoreDetailsAreCorrect( + ConfirmKeyStoreDetailsAreCorrectRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ConfirmKeyStoreDetailsAreCorrectRequest, + ConfirmKeyStoreDetailsAreCorrectResponse> + handler) { + LOG.trace("Called async confirmKeyStoreDetailsAreCorrect"); + final ConfirmKeyStoreDetailsAreCorrectRequest interceptedRequest = + ConfirmKeyStoreDetailsAreCorrectConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ConvertToPdbConverter.fromRequest(client, interceptedRequest); + ConfirmKeyStoreDetailsAreCorrectConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ConvertToPdb", + "ConfirmKeyStoreDetailsAreCorrect", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/Database/ConvertToPdb"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/KeyStore/ConfirmKeyStoreDetailsAreCorrect"); + final java.util.function.Function< + javax.ws.rs.core.Response, ConfirmKeyStoreDetailsAreCorrectResponse> + transformer = + ConfirmKeyStoreDetailsAreCorrectConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ConfirmKeyStoreDetailsAreCorrectRequest, + ConfirmKeyStoreDetailsAreCorrectResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ConfirmKeyStoreDetailsAreCorrectRequest, + ConfirmKeyStoreDetailsAreCorrectResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ConfirmKeyStoreDetailsAreCorrectRequest, + ConfirmKeyStoreDetailsAreCorrectResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future convertToPdb( + ConvertToPdbRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async convertToPdb"); + final ConvertToPdbRequest interceptedRequest = + ConvertToPdbConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConvertToPdbConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ConvertToPdb", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Database/ConvertToPdb"); + final java.util.function.Function transformer = ConvertToPdbConverter.fromResponse(java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler @@ -3489,6 +4130,222 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future createExadbVmCluster( + CreateExadbVmClusterRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateExadbVmClusterRequest, CreateExadbVmClusterResponse> + handler) { + LOG.trace("Called async createExadbVmCluster"); + final CreateExadbVmClusterRequest interceptedRequest = + CreateExadbVmClusterConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateExadbVmClusterConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "CreateExadbVmCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmCluster/CreateExadbVmCluster"); + final java.util.function.Function + transformer = + CreateExadbVmClusterConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateExadbVmClusterRequest, CreateExadbVmClusterResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateExadbVmClusterRequest, CreateExadbVmClusterResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateExadbVmClusterDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateExadbVmClusterRequest, CreateExadbVmClusterResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + createExascaleDbStorageVault( + CreateExascaleDbStorageVaultRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateExascaleDbStorageVaultRequest, + CreateExascaleDbStorageVaultResponse> + handler) { + LOG.trace("Called async createExascaleDbStorageVault"); + final CreateExascaleDbStorageVaultRequest interceptedRequest = + CreateExascaleDbStorageVaultConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateExascaleDbStorageVaultConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "CreateExascaleDbStorageVault", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExascaleDbStorageVault/CreateExascaleDbStorageVault"); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateExascaleDbStorageVaultResponse> + transformer = + CreateExascaleDbStorageVaultConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateExascaleDbStorageVaultRequest, CreateExascaleDbStorageVaultResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateExascaleDbStorageVaultRequest, + CreateExascaleDbStorageVaultResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateExascaleDbStorageVaultDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateExascaleDbStorageVaultRequest, CreateExascaleDbStorageVaultResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createExecutionAction( + CreateExecutionActionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateExecutionActionRequest, CreateExecutionActionResponse> + handler) { + LOG.trace("Called async createExecutionAction"); + final CreateExecutionActionRequest interceptedRequest = + CreateExecutionActionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateExecutionActionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "CreateExecutionAction", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionAction/CreateExecutionAction"); + final java.util.function.Function + transformer = + CreateExecutionActionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateExecutionActionRequest, CreateExecutionActionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateExecutionActionRequest, CreateExecutionActionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateExecutionActionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateExecutionActionRequest, CreateExecutionActionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createExecutionWindow( + CreateExecutionWindowRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateExecutionWindowRequest, CreateExecutionWindowResponse> + handler) { + LOG.trace("Called async createExecutionWindow"); + final CreateExecutionWindowRequest interceptedRequest = + CreateExecutionWindowConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateExecutionWindowConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "CreateExecutionWindow", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionWindow/CreateExecutionWindow"); + final java.util.function.Function + transformer = + CreateExecutionWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateExecutionWindowRequest, CreateExecutionWindowResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateExecutionWindowRequest, CreateExecutionWindowResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateExecutionWindowDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateExecutionWindowRequest, CreateExecutionWindowResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future createExternalBackupJob( CreateExternalBackupJobRequest request, @@ -3990,45 +4847,43 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future createVmCluster( - CreateVmClusterRequest request, + public java.util.concurrent.Future createScheduledAction( + CreateScheduledActionRequest request, final com.oracle.bmc.responses.AsyncHandler< - CreateVmClusterRequest, CreateVmClusterResponse> + CreateScheduledActionRequest, CreateScheduledActionResponse> handler) { - LOG.trace("Called async createVmCluster"); - final CreateVmClusterRequest interceptedRequest = - CreateVmClusterConverter.interceptRequest(request); + LOG.trace("Called async createScheduledAction"); + final CreateScheduledActionRequest interceptedRequest = + CreateScheduledActionConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateVmClusterConverter.fromRequest(client, interceptedRequest); + CreateScheduledActionConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "Database", - "CreateVmCluster", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmCluster/CreateVmCluster"); - final java.util.function.Function + "Database", "CreateScheduledAction", ib.getRequestUri().toString(), ""); + final java.util.function.Function transformer = - CreateVmClusterConverter.fromResponse( + CreateScheduledActionConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + CreateScheduledActionRequest, CreateScheduledActionResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - CreateVmClusterRequest, CreateVmClusterResponse>, - java.util.concurrent.Future> + CreateScheduledActionRequest, CreateScheduledActionResponse>, + java.util.concurrent.Future> futureSupplier = client.postFutureSupplier( interceptedRequest, - interceptedRequest.getCreateVmClusterDetails(), + interceptedRequest.getCreateScheduledActionDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - CreateVmClusterRequest, CreateVmClusterResponse>( + CreateScheduledActionRequest, CreateScheduledActionResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -4042,46 +4897,43 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future createVmClusterNetwork( - CreateVmClusterNetworkRequest request, + public java.util.concurrent.Future createSchedulingPlan( + CreateSchedulingPlanRequest request, final com.oracle.bmc.responses.AsyncHandler< - CreateVmClusterNetworkRequest, CreateVmClusterNetworkResponse> + CreateSchedulingPlanRequest, CreateSchedulingPlanResponse> handler) { - LOG.trace("Called async createVmClusterNetwork"); - final CreateVmClusterNetworkRequest interceptedRequest = - CreateVmClusterNetworkConverter.interceptRequest(request); + LOG.trace("Called async createSchedulingPlan"); + final CreateSchedulingPlanRequest interceptedRequest = + CreateSchedulingPlanConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateVmClusterNetworkConverter.fromRequest(client, interceptedRequest); + CreateSchedulingPlanConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "Database", - "CreateVmClusterNetwork", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmClusterNetwork/CreateVmClusterNetwork"); - final java.util.function.Function + "Database", "CreateSchedulingPlan", ib.getRequestUri().toString(), ""); + final java.util.function.Function transformer = - CreateVmClusterNetworkConverter.fromResponse( + CreateSchedulingPlanConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - CreateVmClusterNetworkRequest, CreateVmClusterNetworkResponse> + CreateSchedulingPlanRequest, CreateSchedulingPlanResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - CreateVmClusterNetworkRequest, CreateVmClusterNetworkResponse>, - java.util.concurrent.Future> + CreateSchedulingPlanRequest, CreateSchedulingPlanResponse>, + java.util.concurrent.Future> futureSupplier = client.postFutureSupplier( interceptedRequest, - interceptedRequest.getVmClusterNetworkDetails(), + interceptedRequest.getCreateSchedulingPlanDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - CreateVmClusterNetworkRequest, CreateVmClusterNetworkResponse>( + CreateSchedulingPlanRequest, CreateSchedulingPlanResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -4095,38 +4947,46 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future dbNodeAction( - DbNodeActionRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future createSchedulingPolicy( + CreateSchedulingPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateSchedulingPolicyRequest, CreateSchedulingPolicyResponse> handler) { - LOG.trace("Called async dbNodeAction"); - final DbNodeActionRequest interceptedRequest = - DbNodeActionConverter.interceptRequest(request); + LOG.trace("Called async createSchedulingPolicy"); + final CreateSchedulingPolicyRequest interceptedRequest = + CreateSchedulingPolicyConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DbNodeActionConverter.fromRequest(client, interceptedRequest); + CreateSchedulingPolicyConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DbNodeAction", + "CreateSchedulingPolicy", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbNode/DbNodeAction"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPolicy/CreateSchedulingPolicy"); + final java.util.function.Function transformer = - DbNodeActionConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + CreateSchedulingPolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateSchedulingPolicyRequest, CreateSchedulingPolicyResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - DbNodeActionRequest, DbNodeActionResponse>, - java.util.concurrent.Future> - futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + CreateSchedulingPolicyRequest, CreateSchedulingPolicyResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateSchedulingPolicyDetails(), + ib, + transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - DbNodeActionRequest, DbNodeActionResponse>( + CreateSchedulingPolicyRequest, CreateSchedulingPolicyResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -4140,13 +5000,216 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future deleteApplicationVip( - DeleteApplicationVipRequest request, + public java.util.concurrent.Future createSchedulingWindow( + CreateSchedulingWindowRequest request, final com.oracle.bmc.responses.AsyncHandler< - DeleteApplicationVipRequest, DeleteApplicationVipResponse> + CreateSchedulingWindowRequest, CreateSchedulingWindowResponse> handler) { - LOG.trace("Called async deleteApplicationVip"); - final DeleteApplicationVipRequest interceptedRequest = + LOG.trace("Called async createSchedulingWindow"); + final CreateSchedulingWindowRequest interceptedRequest = + CreateSchedulingWindowConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateSchedulingWindowConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "CreateSchedulingWindow", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingWindow/CreateSchedulingWindow"); + final java.util.function.Function + transformer = + CreateSchedulingWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateSchedulingWindowRequest, CreateSchedulingWindowResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateSchedulingWindowRequest, CreateSchedulingWindowResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateSchedulingWindowDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateSchedulingWindowRequest, CreateSchedulingWindowResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createVmCluster( + CreateVmClusterRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateVmClusterRequest, CreateVmClusterResponse> + handler) { + LOG.trace("Called async createVmCluster"); + final CreateVmClusterRequest interceptedRequest = + CreateVmClusterConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateVmClusterConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "CreateVmCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmCluster/CreateVmCluster"); + final java.util.function.Function + transformer = + CreateVmClusterConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateVmClusterRequest, CreateVmClusterResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateVmClusterDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateVmClusterRequest, CreateVmClusterResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createVmClusterNetwork( + CreateVmClusterNetworkRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateVmClusterNetworkRequest, CreateVmClusterNetworkResponse> + handler) { + LOG.trace("Called async createVmClusterNetwork"); + final CreateVmClusterNetworkRequest interceptedRequest = + CreateVmClusterNetworkConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateVmClusterNetworkConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "CreateVmClusterNetwork", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmClusterNetwork/CreateVmClusterNetwork"); + final java.util.function.Function + transformer = + CreateVmClusterNetworkConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateVmClusterNetworkRequest, CreateVmClusterNetworkResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateVmClusterNetworkRequest, CreateVmClusterNetworkResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getVmClusterNetworkDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateVmClusterNetworkRequest, CreateVmClusterNetworkResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future dbNodeAction( + DbNodeActionRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async dbNodeAction"); + final DbNodeActionRequest interceptedRequest = + DbNodeActionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DbNodeActionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "DbNodeAction", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbNode/DbNodeAction"); + final java.util.function.Function + transformer = + DbNodeActionConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DbNodeActionRequest, DbNodeActionResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DbNodeActionRequest, DbNodeActionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteApplicationVip( + DeleteApplicationVipRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteApplicationVipRequest, DeleteApplicationVipResponse> + handler) { + LOG.trace("Called async deleteApplicationVip"); + final DeleteApplicationVipRequest interceptedRequest = DeleteApplicationVipConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = DeleteApplicationVipConverter.fromRequest(client, interceptedRequest); @@ -4920,46 +5983,40 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - deleteExternalContainerDatabase( - DeleteExternalContainerDatabaseRequest request, - final com.oracle.bmc.responses.AsyncHandler< - DeleteExternalContainerDatabaseRequest, - DeleteExternalContainerDatabaseResponse> - handler) { - LOG.trace("Called async deleteExternalContainerDatabase"); - final DeleteExternalContainerDatabaseRequest interceptedRequest = - DeleteExternalContainerDatabaseConverter.interceptRequest(request); + public java.util.concurrent.Future deleteExadbVmCluster( + DeleteExadbVmClusterRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteExadbVmClusterRequest, DeleteExadbVmClusterResponse> + handler) { + LOG.trace("Called async deleteExadbVmCluster"); + final DeleteExadbVmClusterRequest interceptedRequest = + DeleteExadbVmClusterConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteExternalContainerDatabaseConverter.fromRequest(client, interceptedRequest); + DeleteExadbVmClusterConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteExternalContainerDatabase", + "DeleteExadbVmCluster", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/DeleteExternalContainerDatabase"); - final java.util.function.Function< - javax.ws.rs.core.Response, DeleteExternalContainerDatabaseResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmCluster/DeleteExadbVmCluster"); + final java.util.function.Function transformer = - DeleteExternalContainerDatabaseConverter.fromResponse( + DeleteExadbVmClusterConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - DeleteExternalContainerDatabaseRequest, - DeleteExternalContainerDatabaseResponse> + DeleteExadbVmClusterRequest, DeleteExadbVmClusterResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - DeleteExternalContainerDatabaseRequest, - DeleteExternalContainerDatabaseResponse>, - java.util.concurrent.Future> + DeleteExadbVmClusterRequest, DeleteExadbVmClusterResponse>, + java.util.concurrent.Future> futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - DeleteExternalContainerDatabaseRequest, - DeleteExternalContainerDatabaseResponse>( + DeleteExadbVmClusterRequest, DeleteExadbVmClusterResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -4973,46 +6030,44 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - deleteExternalDatabaseConnector( - DeleteExternalDatabaseConnectorRequest request, + public java.util.concurrent.Future + deleteExascaleDbStorageVault( + DeleteExascaleDbStorageVaultRequest request, final com.oracle.bmc.responses.AsyncHandler< - DeleteExternalDatabaseConnectorRequest, - DeleteExternalDatabaseConnectorResponse> + DeleteExascaleDbStorageVaultRequest, + DeleteExascaleDbStorageVaultResponse> handler) { - LOG.trace("Called async deleteExternalDatabaseConnector"); - final DeleteExternalDatabaseConnectorRequest interceptedRequest = - DeleteExternalDatabaseConnectorConverter.interceptRequest(request); + LOG.trace("Called async deleteExascaleDbStorageVault"); + final DeleteExascaleDbStorageVaultRequest interceptedRequest = + DeleteExascaleDbStorageVaultConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteExternalDatabaseConnectorConverter.fromRequest(client, interceptedRequest); + DeleteExascaleDbStorageVaultConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteExternalDatabaseConnector", + "DeleteExascaleDbStorageVault", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalDatabaseConnector/DeleteExternalDatabaseConnector"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExascaleDbStorageVault/DeleteExascaleDbStorageVault"); final java.util.function.Function< - javax.ws.rs.core.Response, DeleteExternalDatabaseConnectorResponse> + javax.ws.rs.core.Response, DeleteExascaleDbStorageVaultResponse> transformer = - DeleteExternalDatabaseConnectorConverter.fromResponse( + DeleteExascaleDbStorageVaultConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - DeleteExternalDatabaseConnectorRequest, - DeleteExternalDatabaseConnectorResponse> + DeleteExascaleDbStorageVaultRequest, DeleteExascaleDbStorageVaultResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - DeleteExternalDatabaseConnectorRequest, - DeleteExternalDatabaseConnectorResponse>, - java.util.concurrent.Future> + DeleteExascaleDbStorageVaultRequest, + DeleteExascaleDbStorageVaultResponse>, + java.util.concurrent.Future> futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - DeleteExternalDatabaseConnectorRequest, - DeleteExternalDatabaseConnectorResponse>( + DeleteExascaleDbStorageVaultRequest, DeleteExascaleDbStorageVaultResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -5026,31 +6081,231 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - deleteExternalNonContainerDatabase( - DeleteExternalNonContainerDatabaseRequest request, - final com.oracle.bmc.responses.AsyncHandler< - DeleteExternalNonContainerDatabaseRequest, - DeleteExternalNonContainerDatabaseResponse> - handler) { - LOG.trace("Called async deleteExternalNonContainerDatabase"); - final DeleteExternalNonContainerDatabaseRequest interceptedRequest = - DeleteExternalNonContainerDatabaseConverter.interceptRequest(request); + public java.util.concurrent.Future deleteExecutionAction( + DeleteExecutionActionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteExecutionActionRequest, DeleteExecutionActionResponse> + handler) { + LOG.trace("Called async deleteExecutionAction"); + final DeleteExecutionActionRequest interceptedRequest = + DeleteExecutionActionConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteExternalNonContainerDatabaseConverter.fromRequest(client, interceptedRequest); + DeleteExecutionActionConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteExternalNonContainerDatabase", + "DeleteExecutionAction", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/DeleteExternalNonContainerDatabase"); - final java.util.function.Function< - javax.ws.rs.core.Response, DeleteExternalNonContainerDatabaseResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionAction/DeleteExecutionAction"); + final java.util.function.Function transformer = - DeleteExternalNonContainerDatabaseConverter.fromResponse( + DeleteExecutionActionConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - DeleteExternalNonContainerDatabaseRequest, + DeleteExecutionActionRequest, DeleteExecutionActionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteExecutionActionRequest, DeleteExecutionActionResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteExecutionActionRequest, DeleteExecutionActionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteExecutionWindow( + DeleteExecutionWindowRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteExecutionWindowRequest, DeleteExecutionWindowResponse> + handler) { + LOG.trace("Called async deleteExecutionWindow"); + final DeleteExecutionWindowRequest interceptedRequest = + DeleteExecutionWindowConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteExecutionWindowConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "DeleteExecutionWindow", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionWindow/DeleteExecutionWindow"); + final java.util.function.Function + transformer = + DeleteExecutionWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteExecutionWindowRequest, DeleteExecutionWindowResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteExecutionWindowRequest, DeleteExecutionWindowResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteExecutionWindowRequest, DeleteExecutionWindowResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + deleteExternalContainerDatabase( + DeleteExternalContainerDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteExternalContainerDatabaseRequest, + DeleteExternalContainerDatabaseResponse> + handler) { + LOG.trace("Called async deleteExternalContainerDatabase"); + final DeleteExternalContainerDatabaseRequest interceptedRequest = + DeleteExternalContainerDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteExternalContainerDatabaseConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "DeleteExternalContainerDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/DeleteExternalContainerDatabase"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteExternalContainerDatabaseResponse> + transformer = + DeleteExternalContainerDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteExternalContainerDatabaseRequest, + DeleteExternalContainerDatabaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteExternalContainerDatabaseRequest, + DeleteExternalContainerDatabaseResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteExternalContainerDatabaseRequest, + DeleteExternalContainerDatabaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + deleteExternalDatabaseConnector( + DeleteExternalDatabaseConnectorRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteExternalDatabaseConnectorRequest, + DeleteExternalDatabaseConnectorResponse> + handler) { + LOG.trace("Called async deleteExternalDatabaseConnector"); + final DeleteExternalDatabaseConnectorRequest interceptedRequest = + DeleteExternalDatabaseConnectorConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteExternalDatabaseConnectorConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "DeleteExternalDatabaseConnector", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalDatabaseConnector/DeleteExternalDatabaseConnector"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteExternalDatabaseConnectorResponse> + transformer = + DeleteExternalDatabaseConnectorConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteExternalDatabaseConnectorRequest, + DeleteExternalDatabaseConnectorResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteExternalDatabaseConnectorRequest, + DeleteExternalDatabaseConnectorResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteExternalDatabaseConnectorRequest, + DeleteExternalDatabaseConnectorResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + deleteExternalNonContainerDatabase( + DeleteExternalNonContainerDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteExternalNonContainerDatabaseRequest, + DeleteExternalNonContainerDatabaseResponse> + handler) { + LOG.trace("Called async deleteExternalNonContainerDatabase"); + final DeleteExternalNonContainerDatabaseRequest interceptedRequest = + DeleteExternalNonContainerDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteExternalNonContainerDatabaseConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "DeleteExternalNonContainerDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/DeleteExternalNonContainerDatabase"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteExternalNonContainerDatabaseResponse> + transformer = + DeleteExternalNonContainerDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteExternalNonContainerDatabaseRequest, DeleteExternalNonContainerDatabaseResponse> handlerToUse = handler; @@ -5271,39 +6526,40 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future deleteVmCluster( - DeleteVmClusterRequest request, + public java.util.concurrent.Future deleteScheduledAction( + DeleteScheduledActionRequest request, final com.oracle.bmc.responses.AsyncHandler< - DeleteVmClusterRequest, DeleteVmClusterResponse> + DeleteScheduledActionRequest, DeleteScheduledActionResponse> handler) { - LOG.trace("Called async deleteVmCluster"); - final DeleteVmClusterRequest interceptedRequest = - DeleteVmClusterConverter.interceptRequest(request); + LOG.trace("Called async deleteScheduledAction"); + final DeleteScheduledActionRequest interceptedRequest = + DeleteScheduledActionConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteVmClusterConverter.fromRequest(client, interceptedRequest); + DeleteScheduledActionConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteVmCluster", + "DeleteScheduledAction", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmCluster/DeleteVmCluster"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ScheduledAction/DeleteScheduledAction"); + final java.util.function.Function transformer = - DeleteVmClusterConverter.fromResponse( + DeleteScheduledActionConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + DeleteScheduledActionRequest, DeleteScheduledActionResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - DeleteVmClusterRequest, DeleteVmClusterResponse>, - java.util.concurrent.Future> + DeleteScheduledActionRequest, DeleteScheduledActionResponse>, + java.util.concurrent.Future> futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - DeleteVmClusterRequest, DeleteVmClusterResponse>( + DeleteScheduledActionRequest, DeleteScheduledActionResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -5317,40 +6573,40 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future deleteVmClusterNetwork( - DeleteVmClusterNetworkRequest request, + public java.util.concurrent.Future deleteSchedulingPlan( + DeleteSchedulingPlanRequest request, final com.oracle.bmc.responses.AsyncHandler< - DeleteVmClusterNetworkRequest, DeleteVmClusterNetworkResponse> + DeleteSchedulingPlanRequest, DeleteSchedulingPlanResponse> handler) { - LOG.trace("Called async deleteVmClusterNetwork"); - final DeleteVmClusterNetworkRequest interceptedRequest = - DeleteVmClusterNetworkConverter.interceptRequest(request); + LOG.trace("Called async deleteSchedulingPlan"); + final DeleteSchedulingPlanRequest interceptedRequest = + DeleteSchedulingPlanConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteVmClusterNetworkConverter.fromRequest(client, interceptedRequest); + DeleteSchedulingPlanConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteVmClusterNetwork", + "DeleteSchedulingPlan", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmClusterNetwork/DeleteVmClusterNetwork"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPlan/DeleteSchedulingPlan"); + final java.util.function.Function transformer = - DeleteVmClusterNetworkConverter.fromResponse( + DeleteSchedulingPlanConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - DeleteVmClusterNetworkRequest, DeleteVmClusterNetworkResponse> + DeleteSchedulingPlanRequest, DeleteSchedulingPlanResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - DeleteVmClusterNetworkRequest, DeleteVmClusterNetworkResponse>, - java.util.concurrent.Future> + DeleteSchedulingPlanRequest, DeleteSchedulingPlanResponse>, + java.util.concurrent.Future> futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - DeleteVmClusterNetworkRequest, DeleteVmClusterNetworkResponse>( + DeleteSchedulingPlanRequest, DeleteSchedulingPlanResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -5364,52 +6620,40 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - deregisterAutonomousDatabaseDataSafe( - DeregisterAutonomousDatabaseDataSafeRequest request, - final com.oracle.bmc.responses.AsyncHandler< - DeregisterAutonomousDatabaseDataSafeRequest, - DeregisterAutonomousDatabaseDataSafeResponse> - handler) { - LOG.trace("Called async deregisterAutonomousDatabaseDataSafe"); - final DeregisterAutonomousDatabaseDataSafeRequest interceptedRequest = - DeregisterAutonomousDatabaseDataSafeConverter.interceptRequest(request); + public java.util.concurrent.Future deleteSchedulingPolicy( + DeleteSchedulingPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteSchedulingPolicyRequest, DeleteSchedulingPolicyResponse> + handler) { + LOG.trace("Called async deleteSchedulingPolicy"); + final DeleteSchedulingPolicyRequest interceptedRequest = + DeleteSchedulingPolicyConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeregisterAutonomousDatabaseDataSafeConverter.fromRequest( - client, interceptedRequest); + DeleteSchedulingPolicyConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeregisterAutonomousDatabaseDataSafe", + "DeleteSchedulingPolicy", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/DeregisterAutonomousDatabaseDataSafe"); - final java.util.function.Function< - javax.ws.rs.core.Response, DeregisterAutonomousDatabaseDataSafeResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPolicy/DeleteSchedulingPolicy"); + final java.util.function.Function transformer = - DeregisterAutonomousDatabaseDataSafeConverter.fromResponse( + DeleteSchedulingPolicyConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - DeregisterAutonomousDatabaseDataSafeRequest, - DeregisterAutonomousDatabaseDataSafeResponse> + DeleteSchedulingPolicyRequest, DeleteSchedulingPolicyResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - DeregisterAutonomousDatabaseDataSafeRequest, - DeregisterAutonomousDatabaseDataSafeResponse>, - java.util.concurrent.Future> - futureSupplier = - client.postFutureSupplier( - interceptedRequest, - interceptedRequest.getDeregisterAutonomousDatabaseDataSafeDetails(), - ib, - transformer); + DeleteSchedulingPolicyRequest, DeleteSchedulingPolicyResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - DeregisterAutonomousDatabaseDataSafeRequest, - DeregisterAutonomousDatabaseDataSafeResponse>( + DeleteSchedulingPolicyRequest, DeleteSchedulingPolicyResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -5423,13 +6667,212 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - disableAutonomousDatabaseManagement( - DisableAutonomousDatabaseManagementRequest request, - final com.oracle.bmc.responses.AsyncHandler< - DisableAutonomousDatabaseManagementRequest, - DisableAutonomousDatabaseManagementResponse> - handler) { + public java.util.concurrent.Future deleteSchedulingWindow( + DeleteSchedulingWindowRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteSchedulingWindowRequest, DeleteSchedulingWindowResponse> + handler) { + LOG.trace("Called async deleteSchedulingWindow"); + final DeleteSchedulingWindowRequest interceptedRequest = + DeleteSchedulingWindowConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteSchedulingWindowConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "DeleteSchedulingWindow", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingWindow/DeleteSchedulingWindow"); + final java.util.function.Function + transformer = + DeleteSchedulingWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteSchedulingWindowRequest, DeleteSchedulingWindowResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteSchedulingWindowRequest, DeleteSchedulingWindowResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteSchedulingWindowRequest, DeleteSchedulingWindowResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteVmCluster( + DeleteVmClusterRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteVmClusterRequest, DeleteVmClusterResponse> + handler) { + LOG.trace("Called async deleteVmCluster"); + final DeleteVmClusterRequest interceptedRequest = + DeleteVmClusterConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteVmClusterConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "DeleteVmCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmCluster/DeleteVmCluster"); + final java.util.function.Function + transformer = + DeleteVmClusterConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteVmClusterRequest, DeleteVmClusterResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteVmClusterRequest, DeleteVmClusterResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteVmClusterNetwork( + DeleteVmClusterNetworkRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteVmClusterNetworkRequest, DeleteVmClusterNetworkResponse> + handler) { + LOG.trace("Called async deleteVmClusterNetwork"); + final DeleteVmClusterNetworkRequest interceptedRequest = + DeleteVmClusterNetworkConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteVmClusterNetworkConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "DeleteVmClusterNetwork", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmClusterNetwork/DeleteVmClusterNetwork"); + final java.util.function.Function + transformer = + DeleteVmClusterNetworkConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteVmClusterNetworkRequest, DeleteVmClusterNetworkResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteVmClusterNetworkRequest, DeleteVmClusterNetworkResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteVmClusterNetworkRequest, DeleteVmClusterNetworkResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + deregisterAutonomousDatabaseDataSafe( + DeregisterAutonomousDatabaseDataSafeRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeregisterAutonomousDatabaseDataSafeRequest, + DeregisterAutonomousDatabaseDataSafeResponse> + handler) { + LOG.trace("Called async deregisterAutonomousDatabaseDataSafe"); + final DeregisterAutonomousDatabaseDataSafeRequest interceptedRequest = + DeregisterAutonomousDatabaseDataSafeConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeregisterAutonomousDatabaseDataSafeConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "DeregisterAutonomousDatabaseDataSafe", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/DeregisterAutonomousDatabaseDataSafe"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeregisterAutonomousDatabaseDataSafeResponse> + transformer = + DeregisterAutonomousDatabaseDataSafeConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeregisterAutonomousDatabaseDataSafeRequest, + DeregisterAutonomousDatabaseDataSafeResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeregisterAutonomousDatabaseDataSafeRequest, + DeregisterAutonomousDatabaseDataSafeResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getDeregisterAutonomousDatabaseDataSafeDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeregisterAutonomousDatabaseDataSafeRequest, + DeregisterAutonomousDatabaseDataSafeResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + disableAutonomousDatabaseManagement( + DisableAutonomousDatabaseManagementRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DisableAutonomousDatabaseManagementRequest, + DisableAutonomousDatabaseManagementResponse> + handler) { LOG.trace("Called async disableAutonomousDatabaseManagement"); final DisableAutonomousDatabaseManagementRequest interceptedRequest = DisableAutonomousDatabaseManagementConverter.interceptRequest(request); @@ -9337,7 +10780,303 @@ protected void beforeRetryAction() {} if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetDbSystemUpgradeHistoryEntryRequest, GetDbSystemUpgradeHistoryEntryResponse>( + GetDbSystemUpgradeHistoryEntryRequest, GetDbSystemUpgradeHistoryEntryResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getExadataInfrastructure( + GetExadataInfrastructureRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetExadataInfrastructureRequest, GetExadataInfrastructureResponse> + handler) { + LOG.trace("Called async getExadataInfrastructure"); + final GetExadataInfrastructureRequest interceptedRequest = + GetExadataInfrastructureConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetExadataInfrastructureConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetExadataInfrastructure", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadataInfrastructure/GetExadataInfrastructure"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetExadataInfrastructureResponse> + transformer = + GetExadataInfrastructureConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetExadataInfrastructureRequest, GetExadataInfrastructureResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetExadataInfrastructureRequest, GetExadataInfrastructureResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetExadataInfrastructureRequest, GetExadataInfrastructureResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getExadataInfrastructureOcpus( + GetExadataInfrastructureOcpusRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetExadataInfrastructureOcpusRequest, + GetExadataInfrastructureOcpusResponse> + handler) { + LOG.trace("Called async getExadataInfrastructureOcpus"); + final GetExadataInfrastructureOcpusRequest interceptedRequest = + GetExadataInfrastructureOcpusConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetExadataInfrastructureOcpusConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetExadataInfrastructureOcpus", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/OCPUs/GetExadataInfrastructureOcpus"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetExadataInfrastructureOcpusResponse> + transformer = + GetExadataInfrastructureOcpusConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetExadataInfrastructureOcpusRequest, GetExadataInfrastructureOcpusResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetExadataInfrastructureOcpusRequest, + GetExadataInfrastructureOcpusResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetExadataInfrastructureOcpusRequest, GetExadataInfrastructureOcpusResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getExadataInfrastructureUnAllocatedResources( + GetExadataInfrastructureUnAllocatedResourcesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetExadataInfrastructureUnAllocatedResourcesRequest, + GetExadataInfrastructureUnAllocatedResourcesResponse> + handler) { + LOG.trace("Called async getExadataInfrastructureUnAllocatedResources"); + final GetExadataInfrastructureUnAllocatedResourcesRequest interceptedRequest = + GetExadataInfrastructureUnAllocatedResourcesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetExadataInfrastructureUnAllocatedResourcesConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetExadataInfrastructureUnAllocatedResources", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadataInfrastructureUnAllocatedResources/GetExadataInfrastructureUnAllocatedResources"); + final java.util.function.Function< + javax.ws.rs.core.Response, + GetExadataInfrastructureUnAllocatedResourcesResponse> + transformer = + GetExadataInfrastructureUnAllocatedResourcesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetExadataInfrastructureUnAllocatedResourcesRequest, + GetExadataInfrastructureUnAllocatedResourcesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetExadataInfrastructureUnAllocatedResourcesRequest, + GetExadataInfrastructureUnAllocatedResourcesResponse>, + java.util.concurrent.Future< + GetExadataInfrastructureUnAllocatedResourcesResponse>> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetExadataInfrastructureUnAllocatedResourcesRequest, + GetExadataInfrastructureUnAllocatedResourcesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getExadataIormConfig( + GetExadataIormConfigRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetExadataIormConfigRequest, GetExadataIormConfigResponse> + handler) { + LOG.trace("Called async getExadataIormConfig"); + final GetExadataIormConfigRequest interceptedRequest = + GetExadataIormConfigConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetExadataIormConfigConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetExadataIormConfig", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystem/GetExadataIormConfig"); + final java.util.function.Function + transformer = + GetExadataIormConfigConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetExadataIormConfigRequest, GetExadataIormConfigResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetExadataIormConfigRequest, GetExadataIormConfigResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetExadataIormConfigRequest, GetExadataIormConfigResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getExadbVmCluster( + GetExadbVmClusterRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetExadbVmClusterRequest, GetExadbVmClusterResponse> + handler) { + LOG.trace("Called async getExadbVmCluster"); + final GetExadbVmClusterRequest interceptedRequest = + GetExadbVmClusterConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetExadbVmClusterConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetExadbVmCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmCluster/GetExadbVmCluster"); + final java.util.function.Function + transformer = + GetExadbVmClusterConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetExadbVmClusterRequest, GetExadbVmClusterResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetExadbVmClusterRequest, GetExadbVmClusterResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getExadbVmClusterUpdate( + GetExadbVmClusterUpdateRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetExadbVmClusterUpdateRequest, GetExadbVmClusterUpdateResponse> + handler) { + LOG.trace("Called async getExadbVmClusterUpdate"); + final GetExadbVmClusterUpdateRequest interceptedRequest = + GetExadbVmClusterUpdateConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetExadbVmClusterUpdateConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetExadbVmClusterUpdate", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmClusterUpdate/GetExadbVmClusterUpdate"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetExadbVmClusterUpdateResponse> + transformer = + GetExadbVmClusterUpdateConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetExadbVmClusterUpdateRequest, GetExadbVmClusterUpdateResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetExadbVmClusterUpdateRequest, GetExadbVmClusterUpdateResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetExadbVmClusterUpdateRequest, GetExadbVmClusterUpdateResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -9351,41 +11090,47 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future getExadataInfrastructure( - GetExadataInfrastructureRequest request, - final com.oracle.bmc.responses.AsyncHandler< - GetExadataInfrastructureRequest, GetExadataInfrastructureResponse> - handler) { - LOG.trace("Called async getExadataInfrastructure"); - final GetExadataInfrastructureRequest interceptedRequest = - GetExadataInfrastructureConverter.interceptRequest(request); + public java.util.concurrent.Future + getExadbVmClusterUpdateHistoryEntry( + GetExadbVmClusterUpdateHistoryEntryRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetExadbVmClusterUpdateHistoryEntryRequest, + GetExadbVmClusterUpdateHistoryEntryResponse> + handler) { + LOG.trace("Called async getExadbVmClusterUpdateHistoryEntry"); + final GetExadbVmClusterUpdateHistoryEntryRequest interceptedRequest = + GetExadbVmClusterUpdateHistoryEntryConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetExadataInfrastructureConverter.fromRequest(client, interceptedRequest); + GetExadbVmClusterUpdateHistoryEntryConverter.fromRequest( + client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetExadataInfrastructure", + "GetExadbVmClusterUpdateHistoryEntry", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadataInfrastructure/GetExadataInfrastructure"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmClusterUpdateHistoryEntry/GetExadbVmClusterUpdateHistoryEntry"); final java.util.function.Function< - javax.ws.rs.core.Response, GetExadataInfrastructureResponse> + javax.ws.rs.core.Response, GetExadbVmClusterUpdateHistoryEntryResponse> transformer = - GetExadataInfrastructureConverter.fromResponse( + GetExadbVmClusterUpdateHistoryEntryConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - GetExadataInfrastructureRequest, GetExadataInfrastructureResponse> + GetExadbVmClusterUpdateHistoryEntryRequest, + GetExadbVmClusterUpdateHistoryEntryResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetExadataInfrastructureRequest, GetExadataInfrastructureResponse>, - java.util.concurrent.Future> + GetExadbVmClusterUpdateHistoryEntryRequest, + GetExadbVmClusterUpdateHistoryEntryResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetExadataInfrastructureRequest, GetExadataInfrastructureResponse>( + GetExadbVmClusterUpdateHistoryEntryRequest, + GetExadbVmClusterUpdateHistoryEntryResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -9399,44 +11144,42 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - getExadataInfrastructureOcpus( - GetExadataInfrastructureOcpusRequest request, - final com.oracle.bmc.responses.AsyncHandler< - GetExadataInfrastructureOcpusRequest, - GetExadataInfrastructureOcpusResponse> - handler) { - LOG.trace("Called async getExadataInfrastructureOcpus"); - final GetExadataInfrastructureOcpusRequest interceptedRequest = - GetExadataInfrastructureOcpusConverter.interceptRequest(request); + public java.util.concurrent.Future getExascaleDbStorageVault( + GetExascaleDbStorageVaultRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetExascaleDbStorageVaultRequest, GetExascaleDbStorageVaultResponse> + handler) { + LOG.trace("Called async getExascaleDbStorageVault"); + final GetExascaleDbStorageVaultRequest interceptedRequest = + GetExascaleDbStorageVaultConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetExadataInfrastructureOcpusConverter.fromRequest(client, interceptedRequest); + GetExascaleDbStorageVaultConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetExadataInfrastructureOcpus", + "GetExascaleDbStorageVault", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/OCPUs/GetExadataInfrastructureOcpus"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExascaleDbStorageVault/GetExascaleDbStorageVault"); final java.util.function.Function< - javax.ws.rs.core.Response, GetExadataInfrastructureOcpusResponse> + javax.ws.rs.core.Response, GetExascaleDbStorageVaultResponse> transformer = - GetExadataInfrastructureOcpusConverter.fromResponse( + GetExascaleDbStorageVaultConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - GetExadataInfrastructureOcpusRequest, GetExadataInfrastructureOcpusResponse> + GetExascaleDbStorageVaultRequest, GetExascaleDbStorageVaultResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetExadataInfrastructureOcpusRequest, - GetExadataInfrastructureOcpusResponse>, - java.util.concurrent.Future> + GetExascaleDbStorageVaultRequest, + GetExascaleDbStorageVaultResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetExadataInfrastructureOcpusRequest, GetExadataInfrastructureOcpusResponse>( + GetExascaleDbStorageVaultRequest, GetExascaleDbStorageVaultResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -9450,49 +11193,39 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - getExadataInfrastructureUnAllocatedResources( - GetExadataInfrastructureUnAllocatedResourcesRequest request, - final com.oracle.bmc.responses.AsyncHandler< - GetExadataInfrastructureUnAllocatedResourcesRequest, - GetExadataInfrastructureUnAllocatedResourcesResponse> - handler) { - LOG.trace("Called async getExadataInfrastructureUnAllocatedResources"); - final GetExadataInfrastructureUnAllocatedResourcesRequest interceptedRequest = - GetExadataInfrastructureUnAllocatedResourcesConverter.interceptRequest(request); + public java.util.concurrent.Future getExecutionAction( + GetExecutionActionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetExecutionActionRequest, GetExecutionActionResponse> + handler) { + LOG.trace("Called async getExecutionAction"); + final GetExecutionActionRequest interceptedRequest = + GetExecutionActionConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetExadataInfrastructureUnAllocatedResourcesConverter.fromRequest( - client, interceptedRequest); + GetExecutionActionConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetExadataInfrastructureUnAllocatedResources", + "GetExecutionAction", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadataInfrastructureUnAllocatedResources/GetExadataInfrastructureUnAllocatedResources"); - final java.util.function.Function< - javax.ws.rs.core.Response, - GetExadataInfrastructureUnAllocatedResourcesResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionAction/GetExecutionAction"); + final java.util.function.Function transformer = - GetExadataInfrastructureUnAllocatedResourcesConverter.fromResponse( + GetExecutionActionConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler< - GetExadataInfrastructureUnAllocatedResourcesRequest, - GetExadataInfrastructureUnAllocatedResourcesResponse> + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetExadataInfrastructureUnAllocatedResourcesRequest, - GetExadataInfrastructureUnAllocatedResourcesResponse>, - java.util.concurrent.Future< - GetExadataInfrastructureUnAllocatedResourcesResponse>> + GetExecutionActionRequest, GetExecutionActionResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetExadataInfrastructureUnAllocatedResourcesRequest, - GetExadataInfrastructureUnAllocatedResourcesResponse>( + GetExecutionActionRequest, GetExecutionActionResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -9506,40 +11239,39 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future getExadataIormConfig( - GetExadataIormConfigRequest request, + public java.util.concurrent.Future getExecutionWindow( + GetExecutionWindowRequest request, final com.oracle.bmc.responses.AsyncHandler< - GetExadataIormConfigRequest, GetExadataIormConfigResponse> + GetExecutionWindowRequest, GetExecutionWindowResponse> handler) { - LOG.trace("Called async getExadataIormConfig"); - final GetExadataIormConfigRequest interceptedRequest = - GetExadataIormConfigConverter.interceptRequest(request); + LOG.trace("Called async getExecutionWindow"); + final GetExecutionWindowRequest interceptedRequest = + GetExecutionWindowConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetExadataIormConfigConverter.fromRequest(client, interceptedRequest); + GetExecutionWindowConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetExadataIormConfig", + "GetExecutionWindow", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystem/GetExadataIormConfig"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionWindow/GetExecutionWindow"); + final java.util.function.Function transformer = - GetExadataIormConfigConverter.fromResponse( + GetExecutionWindowConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler< - GetExadataIormConfigRequest, GetExadataIormConfigResponse> + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetExadataIormConfigRequest, GetExadataIormConfigResponse>, - java.util.concurrent.Future> + GetExecutionWindowRequest, GetExecutionWindowResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetExadataIormConfigRequest, GetExadataIormConfigResponse>( + GetExecutionWindowRequest, GetExecutionWindowResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -10006,29 +11738,219 @@ public java.util.concurrent.Future getOneoffPatch( final GetOneoffPatchRequest interceptedRequest = GetOneoffPatchConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetOneoffPatchConverter.fromRequest(client, interceptedRequest); + GetOneoffPatchConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetOneoffPatch", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/OneoffPatch/GetOneoffPatch"); + final java.util.function.Function + transformer = + GetOneoffPatchConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetOneoffPatchRequest, GetOneoffPatchResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetOneoffPatchRequest, GetOneoffPatchResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getPdbConversionHistoryEntry( + GetPdbConversionHistoryEntryRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetPdbConversionHistoryEntryRequest, + GetPdbConversionHistoryEntryResponse> + handler) { + LOG.trace("Called async getPdbConversionHistoryEntry"); + final GetPdbConversionHistoryEntryRequest interceptedRequest = + GetPdbConversionHistoryEntryConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetPdbConversionHistoryEntryConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetPdbConversionHistoryEntry", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/PdbConversionHistoryEntry/GetPdbConversionHistoryEntry"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetPdbConversionHistoryEntryResponse> + transformer = + GetPdbConversionHistoryEntryConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetPdbConversionHistoryEntryRequest, GetPdbConversionHistoryEntryResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetPdbConversionHistoryEntryRequest, + GetPdbConversionHistoryEntryResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetPdbConversionHistoryEntryRequest, GetPdbConversionHistoryEntryResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getPluggableDatabase( + GetPluggableDatabaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetPluggableDatabaseRequest, GetPluggableDatabaseResponse> + handler) { + LOG.trace("Called async getPluggableDatabase"); + final GetPluggableDatabaseRequest interceptedRequest = + GetPluggableDatabaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetPluggableDatabaseConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetPluggableDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/GetPluggableDatabase"); + final java.util.function.Function + transformer = + GetPluggableDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetPluggableDatabaseRequest, GetPluggableDatabaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetPluggableDatabaseRequest, GetPluggableDatabaseResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetPluggableDatabaseRequest, GetPluggableDatabaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getScheduledAction( + GetScheduledActionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetScheduledActionRequest, GetScheduledActionResponse> + handler) { + LOG.trace("Called async getScheduledAction"); + final GetScheduledActionRequest interceptedRequest = + GetScheduledActionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetScheduledActionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetScheduledAction", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ScheduledAction/GetScheduledAction"); + final java.util.function.Function + transformer = + GetScheduledActionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetScheduledActionRequest, GetScheduledActionResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetScheduledActionRequest, GetScheduledActionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getSchedulingPlan( + GetSchedulingPlanRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetSchedulingPlanRequest, GetSchedulingPlanResponse> + handler) { + LOG.trace("Called async getSchedulingPlan"); + final GetSchedulingPlanRequest interceptedRequest = + GetSchedulingPlanConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetSchedulingPlanConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetOneoffPatch", + "GetSchedulingPlan", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/OneoffPatch/GetOneoffPatch"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPlan/GetSchedulingPlan"); + final java.util.function.Function transformer = - GetOneoffPatchConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + GetSchedulingPlanConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetOneoffPatchRequest, GetOneoffPatchResponse>, - java.util.concurrent.Future> + GetSchedulingPlanRequest, GetSchedulingPlanResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetOneoffPatchRequest, GetOneoffPatchResponse>( + GetSchedulingPlanRequest, GetSchedulingPlanResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -10042,44 +11964,40 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - getPdbConversionHistoryEntry( - GetPdbConversionHistoryEntryRequest request, - final com.oracle.bmc.responses.AsyncHandler< - GetPdbConversionHistoryEntryRequest, - GetPdbConversionHistoryEntryResponse> - handler) { - LOG.trace("Called async getPdbConversionHistoryEntry"); - final GetPdbConversionHistoryEntryRequest interceptedRequest = - GetPdbConversionHistoryEntryConverter.interceptRequest(request); + public java.util.concurrent.Future getSchedulingPolicy( + GetSchedulingPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetSchedulingPolicyRequest, GetSchedulingPolicyResponse> + handler) { + LOG.trace("Called async getSchedulingPolicy"); + final GetSchedulingPolicyRequest interceptedRequest = + GetSchedulingPolicyConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetPdbConversionHistoryEntryConverter.fromRequest(client, interceptedRequest); + GetSchedulingPolicyConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetPdbConversionHistoryEntry", + "GetSchedulingPolicy", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/PdbConversionHistoryEntry/GetPdbConversionHistoryEntry"); - final java.util.function.Function< - javax.ws.rs.core.Response, GetPdbConversionHistoryEntryResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPolicy/GetSchedulingPolicy"); + final java.util.function.Function transformer = - GetPdbConversionHistoryEntryConverter.fromResponse( + GetSchedulingPolicyConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - GetPdbConversionHistoryEntryRequest, GetPdbConversionHistoryEntryResponse> + GetSchedulingPolicyRequest, GetSchedulingPolicyResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetPdbConversionHistoryEntryRequest, - GetPdbConversionHistoryEntryResponse>, - java.util.concurrent.Future> + GetSchedulingPolicyRequest, GetSchedulingPolicyResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetPdbConversionHistoryEntryRequest, GetPdbConversionHistoryEntryResponse>( + GetSchedulingPolicyRequest, GetSchedulingPolicyResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -10093,40 +12011,40 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future getPluggableDatabase( - GetPluggableDatabaseRequest request, + public java.util.concurrent.Future getSchedulingWindow( + GetSchedulingWindowRequest request, final com.oracle.bmc.responses.AsyncHandler< - GetPluggableDatabaseRequest, GetPluggableDatabaseResponse> + GetSchedulingWindowRequest, GetSchedulingWindowResponse> handler) { - LOG.trace("Called async getPluggableDatabase"); - final GetPluggableDatabaseRequest interceptedRequest = - GetPluggableDatabaseConverter.interceptRequest(request); + LOG.trace("Called async getSchedulingWindow"); + final GetSchedulingWindowRequest interceptedRequest = + GetSchedulingWindowConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetPluggableDatabaseConverter.fromRequest(client, interceptedRequest); + GetSchedulingWindowConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetPluggableDatabase", + "GetSchedulingWindow", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/GetPluggableDatabase"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingWindow/GetSchedulingWindow"); + final java.util.function.Function transformer = - GetPluggableDatabaseConverter.fromResponse( + GetSchedulingWindowConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - GetPluggableDatabaseRequest, GetPluggableDatabaseResponse> + GetSchedulingWindowRequest, GetSchedulingWindowResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetPluggableDatabaseRequest, GetPluggableDatabaseResponse>, - java.util.concurrent.Future> + GetSchedulingWindowRequest, GetSchedulingWindowResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetPluggableDatabaseRequest, GetPluggableDatabaseResponse>( + GetSchedulingWindowRequest, GetSchedulingWindowResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -12912,33 +14830,328 @@ protected void beforeRetryAction() {} final ListExadataInfrastructuresRequest interceptedRequest = ListExadataInfrastructuresConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListExadataInfrastructuresConverter.fromRequest(client, interceptedRequest); + ListExadataInfrastructuresConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ListExadataInfrastructures", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadataInfrastructure/ListExadataInfrastructures"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListExadataInfrastructuresResponse> + transformer = + ListExadataInfrastructuresConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListExadataInfrastructuresRequest, ListExadataInfrastructuresResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListExadataInfrastructuresRequest, + ListExadataInfrastructuresResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListExadataInfrastructuresRequest, ListExadataInfrastructuresResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listExadbVmClusterUpdateHistoryEntries( + ListExadbVmClusterUpdateHistoryEntriesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListExadbVmClusterUpdateHistoryEntriesRequest, + ListExadbVmClusterUpdateHistoryEntriesResponse> + handler) { + LOG.trace("Called async listExadbVmClusterUpdateHistoryEntries"); + final ListExadbVmClusterUpdateHistoryEntriesRequest interceptedRequest = + ListExadbVmClusterUpdateHistoryEntriesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListExadbVmClusterUpdateHistoryEntriesConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ListExadbVmClusterUpdateHistoryEntries", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmClusterUpdateHistoryEntry/ListExadbVmClusterUpdateHistoryEntries"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListExadbVmClusterUpdateHistoryEntriesResponse> + transformer = + ListExadbVmClusterUpdateHistoryEntriesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListExadbVmClusterUpdateHistoryEntriesRequest, + ListExadbVmClusterUpdateHistoryEntriesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListExadbVmClusterUpdateHistoryEntriesRequest, + ListExadbVmClusterUpdateHistoryEntriesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListExadbVmClusterUpdateHistoryEntriesRequest, + ListExadbVmClusterUpdateHistoryEntriesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listExadbVmClusterUpdates( + ListExadbVmClusterUpdatesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListExadbVmClusterUpdatesRequest, ListExadbVmClusterUpdatesResponse> + handler) { + LOG.trace("Called async listExadbVmClusterUpdates"); + final ListExadbVmClusterUpdatesRequest interceptedRequest = + ListExadbVmClusterUpdatesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListExadbVmClusterUpdatesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ListExadbVmClusterUpdates", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmClusterUpdate/ListExadbVmClusterUpdates"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListExadbVmClusterUpdatesResponse> + transformer = + ListExadbVmClusterUpdatesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListExadbVmClusterUpdatesRequest, ListExadbVmClusterUpdatesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListExadbVmClusterUpdatesRequest, + ListExadbVmClusterUpdatesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListExadbVmClusterUpdatesRequest, ListExadbVmClusterUpdatesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listExadbVmClusters( + ListExadbVmClustersRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListExadbVmClustersRequest, ListExadbVmClustersResponse> + handler) { + LOG.trace("Called async listExadbVmClusters"); + final ListExadbVmClustersRequest interceptedRequest = + ListExadbVmClustersConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListExadbVmClustersConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ListExadbVmClusters", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmCluster/ListExadbVmClusters"); + final java.util.function.Function + transformer = + ListExadbVmClustersConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListExadbVmClustersRequest, ListExadbVmClustersResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListExadbVmClustersRequest, ListExadbVmClustersResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListExadbVmClustersRequest, ListExadbVmClustersResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listExascaleDbStorageVaults( + ListExascaleDbStorageVaultsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListExascaleDbStorageVaultsRequest, + ListExascaleDbStorageVaultsResponse> + handler) { + LOG.trace("Called async listExascaleDbStorageVaults"); + final ListExascaleDbStorageVaultsRequest interceptedRequest = + ListExascaleDbStorageVaultsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListExascaleDbStorageVaultsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ListExascaleDbStorageVaults", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExascaleDbStorageVault/ListExascaleDbStorageVaults"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListExascaleDbStorageVaultsResponse> + transformer = + ListExascaleDbStorageVaultsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListExascaleDbStorageVaultsRequest, ListExascaleDbStorageVaultsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListExascaleDbStorageVaultsRequest, + ListExascaleDbStorageVaultsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListExascaleDbStorageVaultsRequest, ListExascaleDbStorageVaultsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listExecutionActions( + ListExecutionActionsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListExecutionActionsRequest, ListExecutionActionsResponse> + handler) { + LOG.trace("Called async listExecutionActions"); + final ListExecutionActionsRequest interceptedRequest = + ListExecutionActionsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListExecutionActionsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ListExecutionActions", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionAction/ListExecutionActions"); + final java.util.function.Function + transformer = + ListExecutionActionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListExecutionActionsRequest, ListExecutionActionsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListExecutionActionsRequest, ListExecutionActionsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListExecutionActionsRequest, ListExecutionActionsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listExecutionWindows( + ListExecutionWindowsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListExecutionWindowsRequest, ListExecutionWindowsResponse> + handler) { + LOG.trace("Called async listExecutionWindows"); + final ListExecutionWindowsRequest interceptedRequest = + ListExecutionWindowsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListExecutionWindowsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListExadataInfrastructures", + "ListExecutionWindows", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadataInfrastructure/ListExadataInfrastructures"); - final java.util.function.Function< - javax.ws.rs.core.Response, ListExadataInfrastructuresResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionWindow/ListExecutionWindows"); + final java.util.function.Function transformer = - ListExadataInfrastructuresConverter.fromResponse( + ListExecutionWindowsConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - ListExadataInfrastructuresRequest, ListExadataInfrastructuresResponse> + ListExecutionWindowsRequest, ListExecutionWindowsResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListExadataInfrastructuresRequest, - ListExadataInfrastructuresResponse>, - java.util.concurrent.Future> + ListExecutionWindowsRequest, ListExecutionWindowsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListExadataInfrastructuresRequest, ListExadataInfrastructuresResponse>( + ListExecutionWindowsRequest, ListExecutionWindowsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -13206,6 +15419,57 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + listGiVersionMinorVersions( + ListGiVersionMinorVersionsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListGiVersionMinorVersionsRequest, + ListGiVersionMinorVersionsResponse> + handler) { + LOG.trace("Called async listGiVersionMinorVersions"); + final ListGiVersionMinorVersionsRequest interceptedRequest = + ListGiVersionMinorVersionsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListGiVersionMinorVersionsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ListGiVersionMinorVersions", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/GiMinorVersionSummary/ListGiVersionMinorVersions"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListGiVersionMinorVersionsResponse> + transformer = + ListGiVersionMinorVersionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListGiVersionMinorVersionsRequest, ListGiVersionMinorVersionsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListGiVersionMinorVersionsRequest, + ListGiVersionMinorVersionsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListGiVersionMinorVersionsRequest, ListGiVersionMinorVersionsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listGiVersions( ListGiVersionsRequest request, @@ -13437,6 +15701,54 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future listParamsForActionType( + ListParamsForActionTypeRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListParamsForActionTypeRequest, ListParamsForActionTypeResponse> + handler) { + LOG.trace("Called async listParamsForActionType"); + final ListParamsForActionTypeRequest interceptedRequest = + ListParamsForActionTypeConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListParamsForActionTypeConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ListParamsForActionType", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ActionParamValuesSummary/ListParamsForActionType"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListParamsForActionTypeResponse> + transformer = + ListParamsForActionTypeConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListParamsForActionTypeRequest, ListParamsForActionTypeResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListParamsForActionTypeRequest, ListParamsForActionTypeResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListParamsForActionTypeRequest, ListParamsForActionTypeResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listPdbConversionHistoryEntries( @@ -13476,8 +15788,249 @@ protected void beforeRetryAction() {} if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListPdbConversionHistoryEntriesRequest, - ListPdbConversionHistoryEntriesResponse>( + ListPdbConversionHistoryEntriesRequest, + ListPdbConversionHistoryEntriesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listPluggableDatabases( + ListPluggableDatabasesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListPluggableDatabasesRequest, ListPluggableDatabasesResponse> + handler) { + LOG.trace("Called async listPluggableDatabases"); + final ListPluggableDatabasesRequest interceptedRequest = + ListPluggableDatabasesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPluggableDatabasesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ListPluggableDatabases", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/ListPluggableDatabases"); + final java.util.function.Function + transformer = + ListPluggableDatabasesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListPluggableDatabasesRequest, ListPluggableDatabasesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListPluggableDatabasesRequest, ListPluggableDatabasesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListPluggableDatabasesRequest, ListPluggableDatabasesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listRecommendedScheduledActions( + ListRecommendedScheduledActionsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListRecommendedScheduledActionsRequest, + ListRecommendedScheduledActionsResponse> + handler) { + LOG.trace("Called async listRecommendedScheduledActions"); + final ListRecommendedScheduledActionsRequest interceptedRequest = + ListRecommendedScheduledActionsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListRecommendedScheduledActionsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ListRecommendedScheduledActions", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/RecommendedScheduledActionSummary/ListRecommendedScheduledActions"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListRecommendedScheduledActionsResponse> + transformer = + ListRecommendedScheduledActionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListRecommendedScheduledActionsRequest, + ListRecommendedScheduledActionsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListRecommendedScheduledActionsRequest, + ListRecommendedScheduledActionsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListRecommendedScheduledActionsRequest, + ListRecommendedScheduledActionsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listScheduledActions( + ListScheduledActionsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListScheduledActionsRequest, ListScheduledActionsResponse> + handler) { + LOG.trace("Called async listScheduledActions"); + final ListScheduledActionsRequest interceptedRequest = + ListScheduledActionsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListScheduledActionsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ListScheduledActions", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ScheduledAction/ListScheduledActions"); + final java.util.function.Function + transformer = + ListScheduledActionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListScheduledActionsRequest, ListScheduledActionsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListScheduledActionsRequest, ListScheduledActionsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListScheduledActionsRequest, ListScheduledActionsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listSchedulingPlans( + ListSchedulingPlansRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListSchedulingPlansRequest, ListSchedulingPlansResponse> + handler) { + LOG.trace("Called async listSchedulingPlans"); + final ListSchedulingPlansRequest interceptedRequest = + ListSchedulingPlansConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSchedulingPlansConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ListSchedulingPlans", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPlan/ListSchedulingPlans"); + final java.util.function.Function + transformer = + ListSchedulingPlansConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListSchedulingPlansRequest, ListSchedulingPlansResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListSchedulingPlansRequest, ListSchedulingPlansResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListSchedulingPlansRequest, ListSchedulingPlansResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listSchedulingPolicies( + ListSchedulingPoliciesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListSchedulingPoliciesRequest, ListSchedulingPoliciesResponse> + handler) { + LOG.trace("Called async listSchedulingPolicies"); + final ListSchedulingPoliciesRequest interceptedRequest = + ListSchedulingPoliciesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSchedulingPoliciesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ListSchedulingPolicies", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPolicy/ListSchedulingPolicies"); + final java.util.function.Function + transformer = + ListSchedulingPoliciesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListSchedulingPoliciesRequest, ListSchedulingPoliciesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListSchedulingPoliciesRequest, ListSchedulingPoliciesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListSchedulingPoliciesRequest, ListSchedulingPoliciesResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -13491,40 +16044,40 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listPluggableDatabases( - ListPluggableDatabasesRequest request, + public java.util.concurrent.Future listSchedulingWindows( + ListSchedulingWindowsRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListPluggableDatabasesRequest, ListPluggableDatabasesResponse> + ListSchedulingWindowsRequest, ListSchedulingWindowsResponse> handler) { - LOG.trace("Called async listPluggableDatabases"); - final ListPluggableDatabasesRequest interceptedRequest = - ListPluggableDatabasesConverter.interceptRequest(request); + LOG.trace("Called async listSchedulingWindows"); + final ListSchedulingWindowsRequest interceptedRequest = + ListSchedulingWindowsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListPluggableDatabasesConverter.fromRequest(client, interceptedRequest); + ListSchedulingWindowsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListPluggableDatabases", + "ListSchedulingWindows", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/ListPluggableDatabases"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingWindow/ListSchedulingWindows"); + final java.util.function.Function transformer = - ListPluggableDatabasesConverter.fromResponse( + ListSchedulingWindowsConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - ListPluggableDatabasesRequest, ListPluggableDatabasesResponse> + ListSchedulingWindowsRequest, ListSchedulingWindowsResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListPluggableDatabasesRequest, ListPluggableDatabasesResponse>, - java.util.concurrent.Future> + ListSchedulingWindowsRequest, ListSchedulingWindowsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListPluggableDatabasesRequest, ListPluggableDatabasesResponse>( + ListSchedulingWindowsRequest, ListSchedulingWindowsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -14152,6 +16705,61 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future moveExecutionActionMember( + MoveExecutionActionMemberRequest request, + final com.oracle.bmc.responses.AsyncHandler< + MoveExecutionActionMemberRequest, MoveExecutionActionMemberResponse> + handler) { + LOG.trace("Called async moveExecutionActionMember"); + final MoveExecutionActionMemberRequest interceptedRequest = + MoveExecutionActionMemberConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + MoveExecutionActionMemberConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "MoveExecutionActionMember", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionAction/MoveExecutionActionMember"); + final java.util.function.Function< + javax.ws.rs.core.Response, MoveExecutionActionMemberResponse> + transformer = + MoveExecutionActionMemberConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + MoveExecutionActionMemberRequest, MoveExecutionActionMemberResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + MoveExecutionActionMemberRequest, + MoveExecutionActionMemberResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getMoveExecutionActionMemberDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + MoveExecutionActionMemberRequest, MoveExecutionActionMemberResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future refreshPluggableDatabase( RefreshPluggableDatabaseRequest request, @@ -14491,6 +17099,67 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + removeVirtualMachineFromExadbVmCluster( + RemoveVirtualMachineFromExadbVmClusterRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RemoveVirtualMachineFromExadbVmClusterRequest, + RemoveVirtualMachineFromExadbVmClusterResponse> + handler) { + LOG.trace("Called async removeVirtualMachineFromExadbVmCluster"); + final RemoveVirtualMachineFromExadbVmClusterRequest interceptedRequest = + RemoveVirtualMachineFromExadbVmClusterConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RemoveVirtualMachineFromExadbVmClusterConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "RemoveVirtualMachineFromExadbVmCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmCluster/RemoveVirtualMachineFromExadbVmCluster"); + final java.util.function.Function< + javax.ws.rs.core.Response, RemoveVirtualMachineFromExadbVmClusterResponse> + transformer = + RemoveVirtualMachineFromExadbVmClusterConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + RemoveVirtualMachineFromExadbVmClusterRequest, + RemoveVirtualMachineFromExadbVmClusterResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RemoveVirtualMachineFromExadbVmClusterRequest, + RemoveVirtualMachineFromExadbVmClusterResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getRemoveVirtualMachineFromExadbVmClusterDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RemoveVirtualMachineFromExadbVmClusterRequest, + RemoveVirtualMachineFromExadbVmClusterResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future removeVirtualMachineFromVmCluster( @@ -14550,6 +17219,114 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future reorderExecutionActions( + ReorderExecutionActionsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ReorderExecutionActionsRequest, ReorderExecutionActionsResponse> + handler) { + LOG.trace("Called async reorderExecutionActions"); + final ReorderExecutionActionsRequest interceptedRequest = + ReorderExecutionActionsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ReorderExecutionActionsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ReorderExecutionActions", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionWindow/ReorderExecutionActions"); + final java.util.function.Function< + javax.ws.rs.core.Response, ReorderExecutionActionsResponse> + transformer = + ReorderExecutionActionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ReorderExecutionActionsRequest, ReorderExecutionActionsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ReorderExecutionActionsRequest, ReorderExecutionActionsResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getReorderExecutionActionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ReorderExecutionActionsRequest, ReorderExecutionActionsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future reorderScheduledActions( + ReorderScheduledActionsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ReorderScheduledActionsRequest, ReorderScheduledActionsResponse> + handler) { + LOG.trace("Called async reorderScheduledActions"); + final ReorderScheduledActionsRequest interceptedRequest = + ReorderScheduledActionsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ReorderScheduledActionsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ReorderScheduledActions", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPlan/ReorderScheduledActions"); + final java.util.function.Function< + javax.ws.rs.core.Response, ReorderScheduledActionsResponse> + transformer = + ReorderScheduledActionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ReorderScheduledActionsRequest, ReorderScheduledActionsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ReorderScheduledActionsRequest, ReorderScheduledActionsResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getReorderScheduledActionsDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ReorderScheduledActionsRequest, ReorderScheduledActionsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future resizeVmClusterNetwork( ResizeVmClusterNetworkRequest request, @@ -14895,7 +17672,13 @@ protected void beforeRetryAction() {} RotateAutonomousContainerDatabaseEncryptionKeyResponse>, java.util.concurrent.Future< RotateAutonomousContainerDatabaseEncryptionKeyResponse>> - futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getRotateAutonomousContainerDatabaseEncryptionKeyDetails(), + ib, + transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { @@ -14950,7 +17733,13 @@ protected void beforeRetryAction() {} RotateAutonomousDatabaseEncryptionKeyRequest, RotateAutonomousDatabaseEncryptionKeyResponse>, java.util.concurrent.Future> - futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getRotateAutonomousDatabaseEncryptionKeyDetails(), + ib, + transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { @@ -15494,8 +18283,112 @@ protected void beforeRetryAction() {} if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ScanExternalContainerDatabasePluggableDatabasesRequest, - ScanExternalContainerDatabasePluggableDatabasesResponse>( + ScanExternalContainerDatabasePluggableDatabasesRequest, + ScanExternalContainerDatabasePluggableDatabasesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future setDbKeyVersion( + SetDbKeyVersionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + SetDbKeyVersionRequest, SetDbKeyVersionResponse> + handler) { + LOG.trace("Called async setDbKeyVersion"); + final SetDbKeyVersionRequest interceptedRequest = + SetDbKeyVersionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SetDbKeyVersionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "SetDbKeyVersion", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Database/SetDbKeyVersion"); + final java.util.function.Function + transformer = + SetDbKeyVersionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + SetDbKeyVersionRequest, SetDbKeyVersionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getSetKeyVersionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + SetDbKeyVersionRequest, SetDbKeyVersionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future setPdbKeyVersion( + SetPdbKeyVersionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + SetPdbKeyVersionRequest, SetPdbKeyVersionResponse> + handler) { + LOG.trace("Called async setPdbKeyVersion"); + final SetPdbKeyVersionRequest interceptedRequest = + SetPdbKeyVersionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SetPdbKeyVersionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "SetPdbKeyVersion", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/SetPdbKeyVersion"); + final java.util.function.Function + transformer = + SetPdbKeyVersionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + SetPdbKeyVersionRequest, SetPdbKeyVersionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getSetKeyVersionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + SetPdbKeyVersionRequest, SetPdbKeyVersionResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -17392,6 +20285,218 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future updateExadbVmCluster( + UpdateExadbVmClusterRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateExadbVmClusterRequest, UpdateExadbVmClusterResponse> + handler) { + LOG.trace("Called async updateExadbVmCluster"); + final UpdateExadbVmClusterRequest interceptedRequest = + UpdateExadbVmClusterConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateExadbVmClusterConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "UpdateExadbVmCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmCluster/UpdateExadbVmCluster"); + final java.util.function.Function + transformer = + UpdateExadbVmClusterConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateExadbVmClusterRequest, UpdateExadbVmClusterResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateExadbVmClusterRequest, UpdateExadbVmClusterResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateExadbVmClusterDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateExadbVmClusterRequest, UpdateExadbVmClusterResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + updateExascaleDbStorageVault( + UpdateExascaleDbStorageVaultRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateExascaleDbStorageVaultRequest, + UpdateExascaleDbStorageVaultResponse> + handler) { + LOG.trace("Called async updateExascaleDbStorageVault"); + final UpdateExascaleDbStorageVaultRequest interceptedRequest = + UpdateExascaleDbStorageVaultConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateExascaleDbStorageVaultConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "UpdateExascaleDbStorageVault", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExascaleDbStorageVault/UpdateExascaleDbStorageVault"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateExascaleDbStorageVaultResponse> + transformer = + UpdateExascaleDbStorageVaultConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateExascaleDbStorageVaultRequest, UpdateExascaleDbStorageVaultResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateExascaleDbStorageVaultRequest, + UpdateExascaleDbStorageVaultResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateExascaleDbStorageVaultDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateExascaleDbStorageVaultRequest, UpdateExascaleDbStorageVaultResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateExecutionAction( + UpdateExecutionActionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateExecutionActionRequest, UpdateExecutionActionResponse> + handler) { + LOG.trace("Called async updateExecutionAction"); + final UpdateExecutionActionRequest interceptedRequest = + UpdateExecutionActionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateExecutionActionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "UpdateExecutionAction", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionAction/UpdateExecutionAction"); + final java.util.function.Function + transformer = + UpdateExecutionActionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateExecutionActionRequest, UpdateExecutionActionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateExecutionActionRequest, UpdateExecutionActionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateExecutionActionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateExecutionActionRequest, UpdateExecutionActionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateExecutionWindow( + UpdateExecutionWindowRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateExecutionWindowRequest, UpdateExecutionWindowResponse> + handler) { + LOG.trace("Called async updateExecutionWindow"); + final UpdateExecutionWindowRequest interceptedRequest = + UpdateExecutionWindowConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateExecutionWindowConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "UpdateExecutionWindow", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionWindow/UpdateExecutionWindow"); + final java.util.function.Function + transformer = + UpdateExecutionWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateExecutionWindowRequest, UpdateExecutionWindowResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateExecutionWindowRequest, UpdateExecutionWindowResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateExecutionWindowDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateExecutionWindowRequest, UpdateExecutionWindowResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateExternalContainerDatabase( @@ -17830,6 +20935,159 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future updateScheduledAction( + UpdateScheduledActionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateScheduledActionRequest, UpdateScheduledActionResponse> + handler) { + LOG.trace("Called async updateScheduledAction"); + final UpdateScheduledActionRequest interceptedRequest = + UpdateScheduledActionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateScheduledActionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", "UpdateScheduledAction", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + UpdateScheduledActionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateScheduledActionRequest, UpdateScheduledActionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateScheduledActionRequest, UpdateScheduledActionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateScheduledActionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateScheduledActionRequest, UpdateScheduledActionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateSchedulingPolicy( + UpdateSchedulingPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateSchedulingPolicyRequest, UpdateSchedulingPolicyResponse> + handler) { + LOG.trace("Called async updateSchedulingPolicy"); + final UpdateSchedulingPolicyRequest interceptedRequest = + UpdateSchedulingPolicyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateSchedulingPolicyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "UpdateSchedulingPolicy", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPolicy/UpdateSchedulingPolicy"); + final java.util.function.Function + transformer = + UpdateSchedulingPolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateSchedulingPolicyRequest, UpdateSchedulingPolicyResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateSchedulingPolicyRequest, UpdateSchedulingPolicyResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateSchedulingPolicyDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateSchedulingPolicyRequest, UpdateSchedulingPolicyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateSchedulingWindow( + UpdateSchedulingWindowRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateSchedulingWindowRequest, UpdateSchedulingWindowResponse> + handler) { + LOG.trace("Called async updateSchedulingWindow"); + final UpdateSchedulingWindowRequest interceptedRequest = + UpdateSchedulingWindowConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateSchedulingWindowConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "UpdateSchedulingWindow", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingWindow/UpdateSchedulingWindow"); + final java.util.function.Function + transformer = + UpdateSchedulingWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateSchedulingWindowRequest, UpdateSchedulingWindowResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateSchedulingWindowRequest, UpdateSchedulingWindowResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateSchedulingWindowDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateSchedulingWindowRequest, UpdateSchedulingWindowResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateVmCluster( UpdateVmClusterRequest request, diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseClient.java b/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseClient.java index 32085b20850..f0899470f67 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseClient.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseClient.java @@ -857,6 +857,90 @@ public CancelBackupResponse cancelBackup(CancelBackupRequest request) { }); } + @Override + public CancelExecutionWindowResponse cancelExecutionWindow( + CancelExecutionWindowRequest request) { + LOG.trace("Called cancelExecutionWindow"); + final CancelExecutionWindowRequest interceptedRequest = + CancelExecutionWindowConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CancelExecutionWindowConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "CancelExecutionWindow", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionWindow/CancelExecutionWindow"); + java.util.function.Function + transformer = + CancelExecutionWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCancelExecutionWindowDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CascadingDeleteSchedulingPlanResponse cascadingDeleteSchedulingPlan( + CascadingDeleteSchedulingPlanRequest request) { + LOG.trace("Called cascadingDeleteSchedulingPlan"); + final CascadingDeleteSchedulingPlanRequest interceptedRequest = + CascadingDeleteSchedulingPlanConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CascadingDeleteSchedulingPlanConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "CascadingDeleteSchedulingPlan", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPlan/CascadingDeleteSchedulingPlan"); + java.util.function.Function< + javax.ws.rs.core.Response, CascadingDeleteSchedulingPlanResponse> + transformer = + CascadingDeleteSchedulingPlanConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeAutonomousContainerDatabaseCompartmentResponse changeAutonomousContainerDatabaseCompartment( @@ -997,6 +1081,52 @@ public ChangeAutonomousDatabaseCompartmentResponse changeAutonomousDatabaseCompa }); } + @Override + public ChangeAutonomousDatabaseSubscriptionResponse changeAutonomousDatabaseSubscription( + ChangeAutonomousDatabaseSubscriptionRequest request) { + LOG.trace("Called changeAutonomousDatabaseSubscription"); + final ChangeAutonomousDatabaseSubscriptionRequest interceptedRequest = + ChangeAutonomousDatabaseSubscriptionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeAutonomousDatabaseSubscriptionConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ChangeAutonomousDatabaseSubscription", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/ChangeAutonomousDatabaseSubscription"); + java.util.function.Function< + javax.ws.rs.core.Response, ChangeAutonomousDatabaseSubscriptionResponse> + transformer = + ChangeAutonomousDatabaseSubscriptionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeAutonomousDatabaseSubscriptionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeAutonomousExadataInfrastructureCompartmentResponse changeAutonomousExadataInfrastructureCompartment( @@ -1230,6 +1360,54 @@ public ChangeBackupDestinationCompartmentResponse changeBackupDestinationCompart }); } + @Override + public ChangeCloudExadataInfrastructureSubscriptionResponse + changeCloudExadataInfrastructureSubscription( + ChangeCloudExadataInfrastructureSubscriptionRequest request) { + LOG.trace("Called changeCloudExadataInfrastructureSubscription"); + final ChangeCloudExadataInfrastructureSubscriptionRequest interceptedRequest = + ChangeCloudExadataInfrastructureSubscriptionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeCloudExadataInfrastructureSubscriptionConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ChangeCloudExadataInfrastructureSubscription", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudExadataInfrastructure/ChangeCloudExadataInfrastructureSubscription"); + java.util.function.Function< + javax.ws.rs.core.Response, + ChangeCloudExadataInfrastructureSubscriptionResponse> + transformer = + ChangeCloudExadataInfrastructureSubscriptionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeCloudExadataInfrastructureSubscriptionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeCloudVmClusterCompartmentResponse changeCloudVmClusterCompartment( ChangeCloudVmClusterCompartmentRequest request) { @@ -1275,6 +1453,51 @@ public ChangeCloudVmClusterCompartmentResponse changeCloudVmClusterCompartment( }); } + @Override + public ChangeCloudVmClusterSubscriptionResponse changeCloudVmClusterSubscription( + ChangeCloudVmClusterSubscriptionRequest request) { + LOG.trace("Called changeCloudVmClusterSubscription"); + final ChangeCloudVmClusterSubscriptionRequest interceptedRequest = + ChangeCloudVmClusterSubscriptionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeCloudVmClusterSubscriptionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ChangeCloudVmClusterSubscription", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudVmCluster/ChangeCloudVmClusterSubscription"); + java.util.function.Function< + javax.ws.rs.core.Response, ChangeCloudVmClusterSubscriptionResponse> + transformer = + ChangeCloudVmClusterSubscriptionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeCloudVmClusterSubscriptionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeDatabaseSoftwareImageCompartmentResponse changeDatabaseSoftwareImageCompartment( ChangeDatabaseSoftwareImageCompartmentRequest request) { @@ -1496,6 +1719,97 @@ public ChangeExadataInfrastructureCompartmentResponse changeExadataInfrastructur }); } + @Override + public ChangeExadbVmClusterCompartmentResponse changeExadbVmClusterCompartment( + ChangeExadbVmClusterCompartmentRequest request) { + LOG.trace("Called changeExadbVmClusterCompartment"); + final ChangeExadbVmClusterCompartmentRequest interceptedRequest = + ChangeExadbVmClusterCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeExadbVmClusterCompartmentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ChangeExadbVmClusterCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmCluster/ChangeExadbVmClusterCompartment"); + java.util.function.Function< + javax.ws.rs.core.Response, ChangeExadbVmClusterCompartmentResponse> + transformer = + ChangeExadbVmClusterCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeExadbVmClusterCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ChangeExascaleDbStorageVaultCompartmentResponse changeExascaleDbStorageVaultCompartment( + ChangeExascaleDbStorageVaultCompartmentRequest request) { + LOG.trace("Called changeExascaleDbStorageVaultCompartment"); + final ChangeExascaleDbStorageVaultCompartmentRequest interceptedRequest = + ChangeExascaleDbStorageVaultCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeExascaleDbStorageVaultCompartmentConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ChangeExascaleDbStorageVaultCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExascaleDbStorageVault/ChangeExascaleDbStorageVaultCompartment"); + java.util.function.Function< + javax.ws.rs.core.Response, ChangeExascaleDbStorageVaultCompartmentResponse> + transformer = + ChangeExascaleDbStorageVaultCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeExascaleDbStorageVaultCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeExternalContainerDatabaseCompartmentResponse changeExternalContainerDatabaseCompartment( @@ -1767,13 +2081,13 @@ public ChangeOneoffPatchCompartmentResponse changeOneoffPatchCompartment( } @Override - public ChangeVmClusterCompartmentResponse changeVmClusterCompartment( - ChangeVmClusterCompartmentRequest request) { - LOG.trace("Called changeVmClusterCompartment"); - final ChangeVmClusterCompartmentRequest interceptedRequest = - ChangeVmClusterCompartmentConverter.interceptRequest(request); + public ChangeSchedulingPlanCompartmentResponse changeSchedulingPlanCompartment( + ChangeSchedulingPlanCompartmentRequest request) { + LOG.trace("Called changeSchedulingPlanCompartment"); + final ChangeSchedulingPlanCompartmentRequest interceptedRequest = + ChangeSchedulingPlanCompartmentConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ChangeVmClusterCompartmentConverter.fromRequest(client, interceptedRequest); + ChangeSchedulingPlanCompartmentConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -1783,12 +2097,13 @@ public ChangeVmClusterCompartmentResponse changeVmClusterCompartment( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ChangeVmClusterCompartment", + "ChangeSchedulingPlanCompartment", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmCluster/ChangeVmClusterCompartment"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPlan/ChangeSchedulingPlanCompartment"); + java.util.function.Function< + javax.ws.rs.core.Response, ChangeSchedulingPlanCompartmentResponse> transformer = - ChangeVmClusterCompartmentConverter.fromResponse( + ChangeSchedulingPlanCompartmentConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -1803,7 +2118,7 @@ public ChangeVmClusterCompartmentResponse changeVmClusterCompartment( client.post( ib, retriedRequest - .getChangeVmClusterCompartmentDetails(), + .getChangeSchedulingPlanCompartmentDetails(), retriedRequest); return transformer.apply(response); }); @@ -1811,14 +2126,103 @@ public ChangeVmClusterCompartmentResponse changeVmClusterCompartment( } @Override - public CheckExternalDatabaseConnectorConnectionStatusResponse - checkExternalDatabaseConnectorConnectionStatus( - CheckExternalDatabaseConnectorConnectionStatusRequest request) { - LOG.trace("Called checkExternalDatabaseConnectorConnectionStatus"); - final CheckExternalDatabaseConnectorConnectionStatusRequest interceptedRequest = - CheckExternalDatabaseConnectorConnectionStatusConverter.interceptRequest(request); + public ChangeSchedulingPolicyCompartmentResponse changeSchedulingPolicyCompartment( + ChangeSchedulingPolicyCompartmentRequest request) { + LOG.trace("Called changeSchedulingPolicyCompartment"); + final ChangeSchedulingPolicyCompartmentRequest interceptedRequest = + ChangeSchedulingPolicyCompartmentConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CheckExternalDatabaseConnectorConnectionStatusConverter.fromRequest( + ChangeSchedulingPolicyCompartmentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ChangeSchedulingPolicyCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPolicy/ChangeSchedulingPolicyCompartment"); + java.util.function.Function< + javax.ws.rs.core.Response, ChangeSchedulingPolicyCompartmentResponse> + transformer = + ChangeSchedulingPolicyCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeSchedulingPolicyCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ChangeVmClusterCompartmentResponse changeVmClusterCompartment( + ChangeVmClusterCompartmentRequest request) { + LOG.trace("Called changeVmClusterCompartment"); + final ChangeVmClusterCompartmentRequest interceptedRequest = + ChangeVmClusterCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeVmClusterCompartmentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ChangeVmClusterCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmCluster/ChangeVmClusterCompartment"); + java.util.function.Function + transformer = + ChangeVmClusterCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeVmClusterCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CheckExternalDatabaseConnectorConnectionStatusResponse + checkExternalDatabaseConnectorConnectionStatus( + CheckExternalDatabaseConnectorConnectionStatusRequest request) { + LOG.trace("Called checkExternalDatabaseConnectorConnectionStatus"); + final CheckExternalDatabaseConnectorConnectionStatusRequest interceptedRequest = + CheckExternalDatabaseConnectorConnectionStatusConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CheckExternalDatabaseConnectorConnectionStatusConverter.fromRequest( client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = @@ -1944,6 +2348,52 @@ public ConfigureAutonomousDatabaseVaultKeyResponse configureAutonomousDatabaseVa }); } + @Override + public ConfigureExascaleExadataInfrastructureResponse configureExascaleExadataInfrastructure( + ConfigureExascaleExadataInfrastructureRequest request) { + LOG.trace("Called configureExascaleExadataInfrastructure"); + final ConfigureExascaleExadataInfrastructureRequest interceptedRequest = + ConfigureExascaleExadataInfrastructureConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConfigureExascaleExadataInfrastructureConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ConfigureExascaleExadataInfrastructure", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadataInfrastructure/ConfigureExascaleExadataInfrastructure"); + java.util.function.Function< + javax.ws.rs.core.Response, ConfigureExascaleExadataInfrastructureResponse> + transformer = + ConfigureExascaleExadataInfrastructureConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getConfigureExascaleExadataInfrastructureDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ConfigureSaasAdminUserResponse configureSaasAdminUser( ConfigureSaasAdminUserRequest request) { @@ -1986,6 +2436,47 @@ public ConfigureSaasAdminUserResponse configureSaasAdminUser( }); } + @Override + public ConfirmKeyStoreDetailsAreCorrectResponse confirmKeyStoreDetailsAreCorrect( + ConfirmKeyStoreDetailsAreCorrectRequest request) { + LOG.trace("Called confirmKeyStoreDetailsAreCorrect"); + final ConfirmKeyStoreDetailsAreCorrectRequest interceptedRequest = + ConfirmKeyStoreDetailsAreCorrectConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConfirmKeyStoreDetailsAreCorrectConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ConfirmKeyStoreDetailsAreCorrect", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/KeyStore/ConfirmKeyStoreDetailsAreCorrect"); + java.util.function.Function< + javax.ws.rs.core.Response, ConfirmKeyStoreDetailsAreCorrectResponse> + transformer = + ConfirmKeyStoreDetailsAreCorrectConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ConvertToPdbResponse convertToPdb(ConvertToPdbRequest request) { LOG.trace("Called convertToPdb"); @@ -2898,13 +3389,12 @@ public CreateExadataInfrastructureResponse createExadataInfrastructure( } @Override - public CreateExternalBackupJobResponse createExternalBackupJob( - CreateExternalBackupJobRequest request) { - LOG.trace("Called createExternalBackupJob"); - final CreateExternalBackupJobRequest interceptedRequest = - CreateExternalBackupJobConverter.interceptRequest(request); + public CreateExadbVmClusterResponse createExadbVmCluster(CreateExadbVmClusterRequest request) { + LOG.trace("Called createExadbVmCluster"); + final CreateExadbVmClusterRequest interceptedRequest = + CreateExadbVmClusterConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateExternalBackupJobConverter.fromRequest(client, interceptedRequest); + CreateExadbVmClusterConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2914,12 +3404,12 @@ public CreateExternalBackupJobResponse createExternalBackupJob( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "CreateExternalBackupJob", + "CreateExadbVmCluster", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalBackupJob/CreateExternalBackupJob"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmCluster/CreateExadbVmCluster"); + java.util.function.Function transformer = - CreateExternalBackupJobConverter.fromResponse( + CreateExadbVmClusterConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -2933,7 +3423,7 @@ public CreateExternalBackupJobResponse createExternalBackupJob( javax.ws.rs.core.Response response = client.post( ib, - retriedRequest.getCreateExternalBackupJobDetails(), + retriedRequest.getCreateExadbVmClusterDetails(), retriedRequest); return transformer.apply(response); }); @@ -2941,13 +3431,13 @@ public CreateExternalBackupJobResponse createExternalBackupJob( } @Override - public CreateExternalContainerDatabaseResponse createExternalContainerDatabase( - CreateExternalContainerDatabaseRequest request) { - LOG.trace("Called createExternalContainerDatabase"); - final CreateExternalContainerDatabaseRequest interceptedRequest = - CreateExternalContainerDatabaseConverter.interceptRequest(request); + public CreateExascaleDbStorageVaultResponse createExascaleDbStorageVault( + CreateExascaleDbStorageVaultRequest request) { + LOG.trace("Called createExascaleDbStorageVault"); + final CreateExascaleDbStorageVaultRequest interceptedRequest = + CreateExascaleDbStorageVaultConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateExternalContainerDatabaseConverter.fromRequest(client, interceptedRequest); + CreateExascaleDbStorageVaultConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2957,13 +3447,12 @@ public CreateExternalContainerDatabaseResponse createExternalContainerDatabase( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "CreateExternalContainerDatabase", + "CreateExascaleDbStorageVault", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/CreateExternalContainerDatabase"); - java.util.function.Function< - javax.ws.rs.core.Response, CreateExternalContainerDatabaseResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExascaleDbStorageVault/CreateExascaleDbStorageVault"); + java.util.function.Function transformer = - CreateExternalContainerDatabaseConverter.fromResponse( + CreateExascaleDbStorageVaultConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -2978,7 +3467,7 @@ public CreateExternalContainerDatabaseResponse createExternalContainerDatabase( client.post( ib, retriedRequest - .getCreateExternalContainerDatabaseDetails(), + .getCreateExascaleDbStorageVaultDetails(), retriedRequest); return transformer.apply(response); }); @@ -2986,13 +3475,13 @@ public CreateExternalContainerDatabaseResponse createExternalContainerDatabase( } @Override - public CreateExternalDatabaseConnectorResponse createExternalDatabaseConnector( - CreateExternalDatabaseConnectorRequest request) { - LOG.trace("Called createExternalDatabaseConnector"); - final CreateExternalDatabaseConnectorRequest interceptedRequest = - CreateExternalDatabaseConnectorConverter.interceptRequest(request); + public CreateExecutionActionResponse createExecutionAction( + CreateExecutionActionRequest request) { + LOG.trace("Called createExecutionAction"); + final CreateExecutionActionRequest interceptedRequest = + CreateExecutionActionConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateExternalDatabaseConnectorConverter.fromRequest(client, interceptedRequest); + CreateExecutionActionConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3002,13 +3491,12 @@ public CreateExternalDatabaseConnectorResponse createExternalDatabaseConnector( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "CreateExternalDatabaseConnector", + "CreateExecutionAction", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalDatabaseConnector/CreateExternalDatabaseConnector"); - java.util.function.Function< - javax.ws.rs.core.Response, CreateExternalDatabaseConnectorResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionAction/CreateExecutionAction"); + java.util.function.Function transformer = - CreateExternalDatabaseConnectorConverter.fromResponse( + CreateExecutionActionConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3022,8 +3510,7 @@ public CreateExternalDatabaseConnectorResponse createExternalDatabaseConnector( javax.ws.rs.core.Response response = client.post( ib, - retriedRequest - .getCreateExternalDatabaseConnectorDetails(), + retriedRequest.getCreateExecutionActionDetails(), retriedRequest); return transformer.apply(response); }); @@ -3031,13 +3518,13 @@ public CreateExternalDatabaseConnectorResponse createExternalDatabaseConnector( } @Override - public CreateExternalNonContainerDatabaseResponse createExternalNonContainerDatabase( - CreateExternalNonContainerDatabaseRequest request) { - LOG.trace("Called createExternalNonContainerDatabase"); - final CreateExternalNonContainerDatabaseRequest interceptedRequest = - CreateExternalNonContainerDatabaseConverter.interceptRequest(request); + public CreateExecutionWindowResponse createExecutionWindow( + CreateExecutionWindowRequest request) { + LOG.trace("Called createExecutionWindow"); + final CreateExecutionWindowRequest interceptedRequest = + CreateExecutionWindowConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateExternalNonContainerDatabaseConverter.fromRequest(client, interceptedRequest); + CreateExecutionWindowConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3047,13 +3534,12 @@ public CreateExternalNonContainerDatabaseResponse createExternalNonContainerData com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "CreateExternalNonContainerDatabase", + "CreateExecutionWindow", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/CreateExternalNonContainerDatabase"); - java.util.function.Function< - javax.ws.rs.core.Response, CreateExternalNonContainerDatabaseResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionWindow/CreateExecutionWindow"); + java.util.function.Function transformer = - CreateExternalNonContainerDatabaseConverter.fromResponse( + CreateExecutionWindowConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3067,8 +3553,7 @@ public CreateExternalNonContainerDatabaseResponse createExternalNonContainerData javax.ws.rs.core.Response response = client.post( ib, - retriedRequest - .getCreateExternalNonContainerDatabaseDetails(), + retriedRequest.getCreateExecutionWindowDetails(), retriedRequest); return transformer.apply(response); }); @@ -3076,13 +3561,13 @@ public CreateExternalNonContainerDatabaseResponse createExternalNonContainerData } @Override - public CreateExternalPluggableDatabaseResponse createExternalPluggableDatabase( - CreateExternalPluggableDatabaseRequest request) { - LOG.trace("Called createExternalPluggableDatabase"); - final CreateExternalPluggableDatabaseRequest interceptedRequest = - CreateExternalPluggableDatabaseConverter.interceptRequest(request); + public CreateExternalBackupJobResponse createExternalBackupJob( + CreateExternalBackupJobRequest request) { + LOG.trace("Called createExternalBackupJob"); + final CreateExternalBackupJobRequest interceptedRequest = + CreateExternalBackupJobConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateExternalPluggableDatabaseConverter.fromRequest(client, interceptedRequest); + CreateExternalBackupJobConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3092,13 +3577,12 @@ public CreateExternalPluggableDatabaseResponse createExternalPluggableDatabase( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "CreateExternalPluggableDatabase", + "CreateExternalBackupJob", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/CreateExternalPluggableDatabase"); - java.util.function.Function< - javax.ws.rs.core.Response, CreateExternalPluggableDatabaseResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalBackupJob/CreateExternalBackupJob"); + java.util.function.Function transformer = - CreateExternalPluggableDatabaseConverter.fromResponse( + CreateExternalBackupJobConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3112,8 +3596,7 @@ public CreateExternalPluggableDatabaseResponse createExternalPluggableDatabase( javax.ws.rs.core.Response response = client.post( ib, - retriedRequest - .getCreateExternalPluggableDatabaseDetails(), + retriedRequest.getCreateExternalBackupJobDetails(), retriedRequest); return transformer.apply(response); }); @@ -3121,12 +3604,13 @@ public CreateExternalPluggableDatabaseResponse createExternalPluggableDatabase( } @Override - public CreateKeyStoreResponse createKeyStore(CreateKeyStoreRequest request) { - LOG.trace("Called createKeyStore"); - final CreateKeyStoreRequest interceptedRequest = - CreateKeyStoreConverter.interceptRequest(request); + public CreateExternalContainerDatabaseResponse createExternalContainerDatabase( + CreateExternalContainerDatabaseRequest request) { + LOG.trace("Called createExternalContainerDatabase"); + final CreateExternalContainerDatabaseRequest interceptedRequest = + CreateExternalContainerDatabaseConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateKeyStoreConverter.fromRequest(client, interceptedRequest); + CreateExternalContainerDatabaseConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3136,11 +3620,14 @@ public CreateKeyStoreResponse createKeyStore(CreateKeyStoreRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "CreateKeyStore", + "CreateExternalContainerDatabase", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/KeyStore/CreateKeyStore"); - java.util.function.Function transformer = - CreateKeyStoreConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/CreateExternalContainerDatabase"); + java.util.function.Function< + javax.ws.rs.core.Response, CreateExternalContainerDatabaseResponse> + transformer = + CreateExternalContainerDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -3153,7 +3640,8 @@ public CreateKeyStoreResponse createKeyStore(CreateKeyStoreRequest request) { javax.ws.rs.core.Response response = client.post( ib, - retriedRequest.getCreateKeyStoreDetails(), + retriedRequest + .getCreateExternalContainerDatabaseDetails(), retriedRequest); return transformer.apply(response); }); @@ -3161,13 +3649,14 @@ public CreateKeyStoreResponse createKeyStore(CreateKeyStoreRequest request) { } @Override - public CreateMaintenanceRunResponse createMaintenanceRun(CreateMaintenanceRunRequest request) { - LOG.trace("Called createMaintenanceRun"); - final CreateMaintenanceRunRequest interceptedRequest = - CreateMaintenanceRunConverter.interceptRequest(request); - com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateMaintenanceRunConverter.fromRequest(client, interceptedRequest); - + public CreateExternalDatabaseConnectorResponse createExternalDatabaseConnector( + CreateExternalDatabaseConnectorRequest request) { + LOG.trace("Called createExternalDatabaseConnector"); + final CreateExternalDatabaseConnectorRequest interceptedRequest = + CreateExternalDatabaseConnectorConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateExternalDatabaseConnectorConverter.fromRequest(client, interceptedRequest); + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); @@ -3176,12 +3665,13 @@ public CreateMaintenanceRunResponse createMaintenanceRun(CreateMaintenanceRunReq com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "CreateMaintenanceRun", + "CreateExternalDatabaseConnector", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/MaintenanceRun/CreateMaintenanceRun"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalDatabaseConnector/CreateExternalDatabaseConnector"); + java.util.function.Function< + javax.ws.rs.core.Response, CreateExternalDatabaseConnectorResponse> transformer = - CreateMaintenanceRunConverter.fromResponse( + CreateExternalDatabaseConnectorConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3195,7 +3685,8 @@ public CreateMaintenanceRunResponse createMaintenanceRun(CreateMaintenanceRunReq javax.ws.rs.core.Response response = client.post( ib, - retriedRequest.getCreateMaintenanceRunDetails(), + retriedRequest + .getCreateExternalDatabaseConnectorDetails(), retriedRequest); return transformer.apply(response); }); @@ -3203,12 +3694,13 @@ public CreateMaintenanceRunResponse createMaintenanceRun(CreateMaintenanceRunReq } @Override - public CreateOneoffPatchResponse createOneoffPatch(CreateOneoffPatchRequest request) { - LOG.trace("Called createOneoffPatch"); - final CreateOneoffPatchRequest interceptedRequest = - CreateOneoffPatchConverter.interceptRequest(request); + public CreateExternalNonContainerDatabaseResponse createExternalNonContainerDatabase( + CreateExternalNonContainerDatabaseRequest request) { + LOG.trace("Called createExternalNonContainerDatabase"); + final CreateExternalNonContainerDatabaseRequest interceptedRequest = + CreateExternalNonContainerDatabaseConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateOneoffPatchConverter.fromRequest(client, interceptedRequest); + CreateExternalNonContainerDatabaseConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3218,12 +3710,13 @@ public CreateOneoffPatchResponse createOneoffPatch(CreateOneoffPatchRequest requ com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "CreateOneoffPatch", + "CreateExternalNonContainerDatabase", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/OneoffPatch/CreateOneoffPatch"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/CreateExternalNonContainerDatabase"); + java.util.function.Function< + javax.ws.rs.core.Response, CreateExternalNonContainerDatabaseResponse> transformer = - CreateOneoffPatchConverter.fromResponse( + CreateExternalNonContainerDatabaseConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3237,7 +3730,8 @@ public CreateOneoffPatchResponse createOneoffPatch(CreateOneoffPatchRequest requ javax.ws.rs.core.Response response = client.post( ib, - retriedRequest.getCreateOneoffPatchDetails(), + retriedRequest + .getCreateExternalNonContainerDatabaseDetails(), retriedRequest); return transformer.apply(response); }); @@ -3245,13 +3739,13 @@ public CreateOneoffPatchResponse createOneoffPatch(CreateOneoffPatchRequest requ } @Override - public CreatePluggableDatabaseResponse createPluggableDatabase( - CreatePluggableDatabaseRequest request) { - LOG.trace("Called createPluggableDatabase"); - final CreatePluggableDatabaseRequest interceptedRequest = - CreatePluggableDatabaseConverter.interceptRequest(request); + public CreateExternalPluggableDatabaseResponse createExternalPluggableDatabase( + CreateExternalPluggableDatabaseRequest request) { + LOG.trace("Called createExternalPluggableDatabase"); + final CreateExternalPluggableDatabaseRequest interceptedRequest = + CreateExternalPluggableDatabaseConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreatePluggableDatabaseConverter.fromRequest(client, interceptedRequest); + CreateExternalPluggableDatabaseConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3261,12 +3755,13 @@ public CreatePluggableDatabaseResponse createPluggableDatabase( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "CreatePluggableDatabase", + "CreateExternalPluggableDatabase", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/CreatePluggableDatabase"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/CreateExternalPluggableDatabase"); + java.util.function.Function< + javax.ws.rs.core.Response, CreateExternalPluggableDatabaseResponse> transformer = - CreatePluggableDatabaseConverter.fromResponse( + CreateExternalPluggableDatabaseConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3280,7 +3775,8 @@ public CreatePluggableDatabaseResponse createPluggableDatabase( javax.ws.rs.core.Response response = client.post( ib, - retriedRequest.getCreatePluggableDatabaseDetails(), + retriedRequest + .getCreateExternalPluggableDatabaseDetails(), retriedRequest); return transformer.apply(response); }); @@ -3288,12 +3784,12 @@ public CreatePluggableDatabaseResponse createPluggableDatabase( } @Override - public CreateVmClusterResponse createVmCluster(CreateVmClusterRequest request) { - LOG.trace("Called createVmCluster"); - final CreateVmClusterRequest interceptedRequest = - CreateVmClusterConverter.interceptRequest(request); + public CreateKeyStoreResponse createKeyStore(CreateKeyStoreRequest request) { + LOG.trace("Called createKeyStore"); + final CreateKeyStoreRequest interceptedRequest = + CreateKeyStoreConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateVmClusterConverter.fromRequest(client, interceptedRequest); + CreateKeyStoreConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3303,13 +3799,11 @@ public CreateVmClusterResponse createVmCluster(CreateVmClusterRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "CreateVmCluster", + "CreateKeyStore", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmCluster/CreateVmCluster"); - java.util.function.Function - transformer = - CreateVmClusterConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/KeyStore/CreateKeyStore"); + java.util.function.Function transformer = + CreateKeyStoreConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -3322,7 +3816,7 @@ public CreateVmClusterResponse createVmCluster(CreateVmClusterRequest request) { javax.ws.rs.core.Response response = client.post( ib, - retriedRequest.getCreateVmClusterDetails(), + retriedRequest.getCreateKeyStoreDetails(), retriedRequest); return transformer.apply(response); }); @@ -3330,13 +3824,12 @@ public CreateVmClusterResponse createVmCluster(CreateVmClusterRequest request) { } @Override - public CreateVmClusterNetworkResponse createVmClusterNetwork( - CreateVmClusterNetworkRequest request) { - LOG.trace("Called createVmClusterNetwork"); - final CreateVmClusterNetworkRequest interceptedRequest = - CreateVmClusterNetworkConverter.interceptRequest(request); + public CreateMaintenanceRunResponse createMaintenanceRun(CreateMaintenanceRunRequest request) { + LOG.trace("Called createMaintenanceRun"); + final CreateMaintenanceRunRequest interceptedRequest = + CreateMaintenanceRunConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateVmClusterNetworkConverter.fromRequest(client, interceptedRequest); + CreateMaintenanceRunConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3346,12 +3839,12 @@ public CreateVmClusterNetworkResponse createVmClusterNetwork( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "CreateVmClusterNetwork", + "CreateMaintenanceRun", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmClusterNetwork/CreateVmClusterNetwork"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/MaintenanceRun/CreateMaintenanceRun"); + java.util.function.Function transformer = - CreateVmClusterNetworkConverter.fromResponse( + CreateMaintenanceRunConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3365,7 +3858,7 @@ public CreateVmClusterNetworkResponse createVmClusterNetwork( javax.ws.rs.core.Response response = client.post( ib, - retriedRequest.getVmClusterNetworkDetails(), + retriedRequest.getCreateMaintenanceRunDetails(), retriedRequest); return transformer.apply(response); }); @@ -3373,12 +3866,12 @@ public CreateVmClusterNetworkResponse createVmClusterNetwork( } @Override - public DbNodeActionResponse dbNodeAction(DbNodeActionRequest request) { - LOG.trace("Called dbNodeAction"); - final DbNodeActionRequest interceptedRequest = - DbNodeActionConverter.interceptRequest(request); + public CreateOneoffPatchResponse createOneoffPatch(CreateOneoffPatchRequest request) { + LOG.trace("Called createOneoffPatch"); + final CreateOneoffPatchRequest interceptedRequest = + CreateOneoffPatchConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DbNodeActionConverter.fromRequest(client, interceptedRequest); + CreateOneoffPatchConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3388,11 +3881,13 @@ public DbNodeActionResponse dbNodeAction(DbNodeActionRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DbNodeAction", + "CreateOneoffPatch", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbNode/DbNodeAction"); - java.util.function.Function transformer = - DbNodeActionConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/OneoffPatch/CreateOneoffPatch"); + java.util.function.Function + transformer = + CreateOneoffPatchConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -3403,33 +3898,38 @@ public DbNodeActionResponse dbNodeAction(DbNodeActionRequest request) { retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.post( + ib, + retriedRequest.getCreateOneoffPatchDetails(), + retriedRequest); return transformer.apply(response); }); }); } @Override - public DeleteApplicationVipResponse deleteApplicationVip(DeleteApplicationVipRequest request) { - LOG.trace("Called deleteApplicationVip"); - final DeleteApplicationVipRequest interceptedRequest = - DeleteApplicationVipConverter.interceptRequest(request); + public CreatePluggableDatabaseResponse createPluggableDatabase( + CreatePluggableDatabaseRequest request) { + LOG.trace("Called createPluggableDatabase"); + final CreatePluggableDatabaseRequest interceptedRequest = + CreatePluggableDatabaseConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteApplicationVipConverter.fromRequest(client, interceptedRequest); + CreatePluggableDatabaseConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteApplicationVip", + "CreatePluggableDatabase", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ApplicationVip/DeleteApplicationVip"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/CreatePluggableDatabase"); + java.util.function.Function transformer = - DeleteApplicationVipConverter.fromResponse( + CreatePluggableDatabaseConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3441,34 +3941,35 @@ public DeleteApplicationVipResponse deleteApplicationVip(DeleteApplicationVipReq retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.delete(ib, retriedRequest); + client.post( + ib, + retriedRequest.getCreatePluggableDatabaseDetails(), + retriedRequest); return transformer.apply(response); }); }); } @Override - public DeleteAutonomousDatabaseResponse deleteAutonomousDatabase( - DeleteAutonomousDatabaseRequest request) { - LOG.trace("Called deleteAutonomousDatabase"); - final DeleteAutonomousDatabaseRequest interceptedRequest = - DeleteAutonomousDatabaseConverter.interceptRequest(request); + public CreateScheduledActionResponse createScheduledAction( + CreateScheduledActionRequest request) { + LOG.trace("Called createScheduledAction"); + final CreateScheduledActionRequest interceptedRequest = + CreateScheduledActionConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); + CreateScheduledActionConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "Database", - "DeleteAutonomousDatabase", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/DeleteAutonomousDatabase"); - java.util.function.Function + "Database", "CreateScheduledAction", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = - DeleteAutonomousDatabaseConverter.fromResponse( + CreateScheduledActionConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3480,35 +3981,34 @@ public DeleteAutonomousDatabaseResponse deleteAutonomousDatabase( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.delete(ib, retriedRequest); + client.post( + ib, + retriedRequest.getCreateScheduledActionDetails(), + retriedRequest); return transformer.apply(response); }); }); } @Override - public DeleteAutonomousDatabaseBackupResponse deleteAutonomousDatabaseBackup( - DeleteAutonomousDatabaseBackupRequest request) { - LOG.trace("Called deleteAutonomousDatabaseBackup"); - final DeleteAutonomousDatabaseBackupRequest interceptedRequest = - DeleteAutonomousDatabaseBackupConverter.interceptRequest(request); + public CreateSchedulingPlanResponse createSchedulingPlan(CreateSchedulingPlanRequest request) { + LOG.trace("Called createSchedulingPlan"); + final CreateSchedulingPlanRequest interceptedRequest = + CreateSchedulingPlanConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteAutonomousDatabaseBackupConverter.fromRequest(client, interceptedRequest); + CreateSchedulingPlanConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "Database", - "DeleteAutonomousDatabaseBackup", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseBackup/DeleteAutonomousDatabaseBackup"); - java.util.function.Function< - javax.ws.rs.core.Response, DeleteAutonomousDatabaseBackupResponse> + "Database", "CreateSchedulingPlan", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = - DeleteAutonomousDatabaseBackupConverter.fromResponse( + CreateSchedulingPlanConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3520,36 +4020,38 @@ public DeleteAutonomousDatabaseBackupResponse deleteAutonomousDatabaseBackup( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.delete(ib, retriedRequest); + client.post( + ib, + retriedRequest.getCreateSchedulingPlanDetails(), + retriedRequest); return transformer.apply(response); }); }); } @Override - public DeleteAutonomousDatabaseSoftwareImageResponse deleteAutonomousDatabaseSoftwareImage( - DeleteAutonomousDatabaseSoftwareImageRequest request) { - LOG.trace("Called deleteAutonomousDatabaseSoftwareImage"); - final DeleteAutonomousDatabaseSoftwareImageRequest interceptedRequest = - DeleteAutonomousDatabaseSoftwareImageConverter.interceptRequest(request); + public CreateSchedulingPolicyResponse createSchedulingPolicy( + CreateSchedulingPolicyRequest request) { + LOG.trace("Called createSchedulingPolicy"); + final CreateSchedulingPolicyRequest interceptedRequest = + CreateSchedulingPolicyConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteAutonomousDatabaseSoftwareImageConverter.fromRequest( - client, interceptedRequest); + CreateSchedulingPolicyConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteAutonomousDatabaseSoftwareImage", + "CreateSchedulingPolicy", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseSoftwareImage/DeleteAutonomousDatabaseSoftwareImage"); - java.util.function.Function< - javax.ws.rs.core.Response, DeleteAutonomousDatabaseSoftwareImageResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPolicy/CreateSchedulingPolicy"); + java.util.function.Function transformer = - DeleteAutonomousDatabaseSoftwareImageConverter.fromResponse( + CreateSchedulingPolicyConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3561,34 +4063,38 @@ public DeleteAutonomousDatabaseSoftwareImageResponse deleteAutonomousDatabaseSof retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.delete(ib, retriedRequest); + client.post( + ib, + retriedRequest.getCreateSchedulingPolicyDetails(), + retriedRequest); return transformer.apply(response); }); }); } @Override - public DeleteAutonomousVmClusterResponse deleteAutonomousVmCluster( - DeleteAutonomousVmClusterRequest request) { - LOG.trace("Called deleteAutonomousVmCluster"); - final DeleteAutonomousVmClusterRequest interceptedRequest = - DeleteAutonomousVmClusterConverter.interceptRequest(request); + public CreateSchedulingWindowResponse createSchedulingWindow( + CreateSchedulingWindowRequest request) { + LOG.trace("Called createSchedulingWindow"); + final CreateSchedulingWindowRequest interceptedRequest = + CreateSchedulingWindowConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteAutonomousVmClusterConverter.fromRequest(client, interceptedRequest); + CreateSchedulingWindowConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteAutonomousVmCluster", + "CreateSchedulingWindow", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousVmCluster/DeleteAutonomousVmCluster"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingWindow/CreateSchedulingWindow"); + java.util.function.Function transformer = - DeleteAutonomousVmClusterConverter.fromResponse( + CreateSchedulingWindowConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3600,32 +4106,38 @@ public DeleteAutonomousVmClusterResponse deleteAutonomousVmCluster( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.delete(ib, retriedRequest); + client.post( + ib, + retriedRequest.getCreateSchedulingWindowDetails(), + retriedRequest); return transformer.apply(response); }); }); } @Override - public DeleteBackupResponse deleteBackup(DeleteBackupRequest request) { - LOG.trace("Called deleteBackup"); - final DeleteBackupRequest interceptedRequest = - DeleteBackupConverter.interceptRequest(request); + public CreateVmClusterResponse createVmCluster(CreateVmClusterRequest request) { + LOG.trace("Called createVmCluster"); + final CreateVmClusterRequest interceptedRequest = + CreateVmClusterConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteBackupConverter.fromRequest(client, interceptedRequest); + CreateVmClusterConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteBackup", + "CreateVmCluster", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/Backup/DeleteBackup"); - java.util.function.Function transformer = - DeleteBackupConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmCluster/CreateVmCluster"); + java.util.function.Function + transformer = + CreateVmClusterConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -3636,34 +4148,38 @@ public DeleteBackupResponse deleteBackup(DeleteBackupRequest request) { retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.delete(ib, retriedRequest); + client.post( + ib, + retriedRequest.getCreateVmClusterDetails(), + retriedRequest); return transformer.apply(response); }); }); } @Override - public DeleteBackupDestinationResponse deleteBackupDestination( - DeleteBackupDestinationRequest request) { - LOG.trace("Called deleteBackupDestination"); - final DeleteBackupDestinationRequest interceptedRequest = - DeleteBackupDestinationConverter.interceptRequest(request); + public CreateVmClusterNetworkResponse createVmClusterNetwork( + CreateVmClusterNetworkRequest request) { + LOG.trace("Called createVmClusterNetwork"); + final CreateVmClusterNetworkRequest interceptedRequest = + CreateVmClusterNetworkConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteBackupDestinationConverter.fromRequest(client, interceptedRequest); + CreateVmClusterNetworkConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteBackupDestination", + "CreateVmClusterNetwork", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/BackupDestination/DeleteBackupDestination"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmClusterNetwork/CreateVmClusterNetwork"); + java.util.function.Function transformer = - DeleteBackupDestinationConverter.fromResponse( + CreateVmClusterNetworkConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3675,36 +4191,36 @@ public DeleteBackupDestinationResponse deleteBackupDestination( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.delete(ib, retriedRequest); + client.post( + ib, + retriedRequest.getVmClusterNetworkDetails(), + retriedRequest); return transformer.apply(response); }); }); } @Override - public DeleteCloudAutonomousVmClusterResponse deleteCloudAutonomousVmCluster( - DeleteCloudAutonomousVmClusterRequest request) { - LOG.trace("Called deleteCloudAutonomousVmCluster"); - final DeleteCloudAutonomousVmClusterRequest interceptedRequest = - DeleteCloudAutonomousVmClusterConverter.interceptRequest(request); + public DbNodeActionResponse dbNodeAction(DbNodeActionRequest request) { + LOG.trace("Called dbNodeAction"); + final DbNodeActionRequest interceptedRequest = + DbNodeActionConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteCloudAutonomousVmClusterConverter.fromRequest(client, interceptedRequest); + DbNodeActionConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteCloudAutonomousVmCluster", + "DbNodeAction", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudAutonomousVmCluster/DeleteCloudAutonomousVmCluster"); - java.util.function.Function< - javax.ws.rs.core.Response, DeleteCloudAutonomousVmClusterResponse> - transformer = - DeleteCloudAutonomousVmClusterConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbNode/DbNodeAction"); + java.util.function.Function transformer = + DbNodeActionConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -3715,20 +4231,19 @@ public DeleteCloudAutonomousVmClusterResponse deleteCloudAutonomousVmCluster( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.delete(ib, retriedRequest); + client.post(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public DeleteCloudExadataInfrastructureResponse deleteCloudExadataInfrastructure( - DeleteCloudExadataInfrastructureRequest request) { - LOG.trace("Called deleteCloudExadataInfrastructure"); - final DeleteCloudExadataInfrastructureRequest interceptedRequest = - DeleteCloudExadataInfrastructureConverter.interceptRequest(request); + public DeleteApplicationVipResponse deleteApplicationVip(DeleteApplicationVipRequest request) { + LOG.trace("Called deleteApplicationVip"); + final DeleteApplicationVipRequest interceptedRequest = + DeleteApplicationVipConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteCloudExadataInfrastructureConverter.fromRequest(client, interceptedRequest); + DeleteApplicationVipConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3737,13 +4252,12 @@ public DeleteCloudExadataInfrastructureResponse deleteCloudExadataInfrastructure com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteCloudExadataInfrastructure", + "DeleteApplicationVip", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudExadataInfrastructure/DeleteCloudExadataInfrastructure"); - java.util.function.Function< - javax.ws.rs.core.Response, DeleteCloudExadataInfrastructureResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ApplicationVip/DeleteApplicationVip"); + java.util.function.Function transformer = - DeleteCloudExadataInfrastructureConverter.fromResponse( + DeleteApplicationVipConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3762,12 +4276,13 @@ public DeleteCloudExadataInfrastructureResponse deleteCloudExadataInfrastructure } @Override - public DeleteCloudVmClusterResponse deleteCloudVmCluster(DeleteCloudVmClusterRequest request) { - LOG.trace("Called deleteCloudVmCluster"); - final DeleteCloudVmClusterRequest interceptedRequest = - DeleteCloudVmClusterConverter.interceptRequest(request); + public DeleteAutonomousDatabaseResponse deleteAutonomousDatabase( + DeleteAutonomousDatabaseRequest request) { + LOG.trace("Called deleteAutonomousDatabase"); + final DeleteAutonomousDatabaseRequest interceptedRequest = + DeleteAutonomousDatabaseConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteCloudVmClusterConverter.fromRequest(client, interceptedRequest); + DeleteAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3776,12 +4291,12 @@ public DeleteCloudVmClusterResponse deleteCloudVmCluster(DeleteCloudVmClusterReq com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteCloudVmCluster", + "DeleteAutonomousDatabase", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudVmCluster/DeleteCloudVmCluster"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/DeleteAutonomousDatabase"); + java.util.function.Function transformer = - DeleteCloudVmClusterConverter.fromResponse( + DeleteAutonomousDatabaseConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3800,13 +4315,13 @@ public DeleteCloudVmClusterResponse deleteCloudVmCluster(DeleteCloudVmClusterReq } @Override - public DeleteConsoleConnectionResponse deleteConsoleConnection( - DeleteConsoleConnectionRequest request) { - LOG.trace("Called deleteConsoleConnection"); - final DeleteConsoleConnectionRequest interceptedRequest = - DeleteConsoleConnectionConverter.interceptRequest(request); + public DeleteAutonomousDatabaseBackupResponse deleteAutonomousDatabaseBackup( + DeleteAutonomousDatabaseBackupRequest request) { + LOG.trace("Called deleteAutonomousDatabaseBackup"); + final DeleteAutonomousDatabaseBackupRequest interceptedRequest = + DeleteAutonomousDatabaseBackupConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteConsoleConnectionConverter.fromRequest(client, interceptedRequest); + DeleteAutonomousDatabaseBackupConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3815,12 +4330,13 @@ public DeleteConsoleConnectionResponse deleteConsoleConnection( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteConsoleConnection", + "DeleteAutonomousDatabaseBackup", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ConsoleConnection/DeleteConsoleConnection"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseBackup/DeleteAutonomousDatabaseBackup"); + java.util.function.Function< + javax.ws.rs.core.Response, DeleteAutonomousDatabaseBackupResponse> transformer = - DeleteConsoleConnectionConverter.fromResponse( + DeleteAutonomousDatabaseBackupConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3839,12 +4355,14 @@ public DeleteConsoleConnectionResponse deleteConsoleConnection( } @Override - public DeleteConsoleHistoryResponse deleteConsoleHistory(DeleteConsoleHistoryRequest request) { - LOG.trace("Called deleteConsoleHistory"); - final DeleteConsoleHistoryRequest interceptedRequest = - DeleteConsoleHistoryConverter.interceptRequest(request); + public DeleteAutonomousDatabaseSoftwareImageResponse deleteAutonomousDatabaseSoftwareImage( + DeleteAutonomousDatabaseSoftwareImageRequest request) { + LOG.trace("Called deleteAutonomousDatabaseSoftwareImage"); + final DeleteAutonomousDatabaseSoftwareImageRequest interceptedRequest = + DeleteAutonomousDatabaseSoftwareImageConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteConsoleHistoryConverter.fromRequest(client, interceptedRequest); + DeleteAutonomousDatabaseSoftwareImageConverter.fromRequest( + client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3853,12 +4371,13 @@ public DeleteConsoleHistoryResponse deleteConsoleHistory(DeleteConsoleHistoryReq com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteConsoleHistory", + "DeleteAutonomousDatabaseSoftwareImage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ConsoleHistory/DeleteConsoleHistory"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseSoftwareImage/DeleteAutonomousDatabaseSoftwareImage"); + java.util.function.Function< + javax.ws.rs.core.Response, DeleteAutonomousDatabaseSoftwareImageResponse> transformer = - DeleteConsoleHistoryConverter.fromResponse( + DeleteAutonomousDatabaseSoftwareImageConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3877,12 +4396,13 @@ public DeleteConsoleHistoryResponse deleteConsoleHistory(DeleteConsoleHistoryReq } @Override - public DeleteDatabaseResponse deleteDatabase(DeleteDatabaseRequest request) { - LOG.trace("Called deleteDatabase"); - final DeleteDatabaseRequest interceptedRequest = - DeleteDatabaseConverter.interceptRequest(request); + public DeleteAutonomousVmClusterResponse deleteAutonomousVmCluster( + DeleteAutonomousVmClusterRequest request) { + LOG.trace("Called deleteAutonomousVmCluster"); + final DeleteAutonomousVmClusterRequest interceptedRequest = + DeleteAutonomousVmClusterConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteDatabaseConverter.fromRequest(client, interceptedRequest); + DeleteAutonomousVmClusterConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3891,11 +4411,13 @@ public DeleteDatabaseResponse deleteDatabase(DeleteDatabaseRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteDatabase", + "DeleteAutonomousVmCluster", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/Database/DeleteDatabase"); - java.util.function.Function transformer = - DeleteDatabaseConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousVmCluster/DeleteAutonomousVmCluster"); + java.util.function.Function + transformer = + DeleteAutonomousVmClusterConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -3913,13 +4435,12 @@ public DeleteDatabaseResponse deleteDatabase(DeleteDatabaseRequest request) { } @Override - public DeleteDatabaseSoftwareImageResponse deleteDatabaseSoftwareImage( - DeleteDatabaseSoftwareImageRequest request) { - LOG.trace("Called deleteDatabaseSoftwareImage"); - final DeleteDatabaseSoftwareImageRequest interceptedRequest = - DeleteDatabaseSoftwareImageConverter.interceptRequest(request); + public DeleteBackupResponse deleteBackup(DeleteBackupRequest request) { + LOG.trace("Called deleteBackup"); + final DeleteBackupRequest interceptedRequest = + DeleteBackupConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteDatabaseSoftwareImageConverter.fromRequest(client, interceptedRequest); + DeleteBackupConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3928,13 +4449,11 @@ public DeleteDatabaseSoftwareImageResponse deleteDatabaseSoftwareImage( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteDatabaseSoftwareImage", + "DeleteBackup", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DatabaseSoftwareImage/DeleteDatabaseSoftwareImage"); - java.util.function.Function - transformer = - DeleteDatabaseSoftwareImageConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Backup/DeleteBackup"); + java.util.function.Function transformer = + DeleteBackupConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -3952,12 +4471,13 @@ public DeleteDatabaseSoftwareImageResponse deleteDatabaseSoftwareImage( } @Override - public DeleteDbHomeResponse deleteDbHome(DeleteDbHomeRequest request) { - LOG.trace("Called deleteDbHome"); - final DeleteDbHomeRequest interceptedRequest = - DeleteDbHomeConverter.interceptRequest(request); + public DeleteBackupDestinationResponse deleteBackupDestination( + DeleteBackupDestinationRequest request) { + LOG.trace("Called deleteBackupDestination"); + final DeleteBackupDestinationRequest interceptedRequest = + DeleteBackupDestinationConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteDbHomeConverter.fromRequest(client, interceptedRequest); + DeleteBackupDestinationConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3966,11 +4486,13 @@ public DeleteDbHomeResponse deleteDbHome(DeleteDbHomeRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteDbHome", + "DeleteBackupDestination", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbHome/DeleteDbHome"); - java.util.function.Function transformer = - DeleteDbHomeConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/BackupDestination/DeleteBackupDestination"); + java.util.function.Function + transformer = + DeleteBackupDestinationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -3988,13 +4510,13 @@ public DeleteDbHomeResponse deleteDbHome(DeleteDbHomeRequest request) { } @Override - public DeleteExadataInfrastructureResponse deleteExadataInfrastructure( - DeleteExadataInfrastructureRequest request) { - LOG.trace("Called deleteExadataInfrastructure"); - final DeleteExadataInfrastructureRequest interceptedRequest = - DeleteExadataInfrastructureConverter.interceptRequest(request); + public DeleteCloudAutonomousVmClusterResponse deleteCloudAutonomousVmCluster( + DeleteCloudAutonomousVmClusterRequest request) { + LOG.trace("Called deleteCloudAutonomousVmCluster"); + final DeleteCloudAutonomousVmClusterRequest interceptedRequest = + DeleteCloudAutonomousVmClusterConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteExadataInfrastructureConverter.fromRequest(client, interceptedRequest); + DeleteCloudAutonomousVmClusterConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -4003,12 +4525,13 @@ public DeleteExadataInfrastructureResponse deleteExadataInfrastructure( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteExadataInfrastructure", + "DeleteCloudAutonomousVmCluster", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadataInfrastructure/DeleteExadataInfrastructure"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudAutonomousVmCluster/DeleteCloudAutonomousVmCluster"); + java.util.function.Function< + javax.ws.rs.core.Response, DeleteCloudAutonomousVmClusterResponse> transformer = - DeleteExadataInfrastructureConverter.fromResponse( + DeleteCloudAutonomousVmClusterConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4027,13 +4550,13 @@ public DeleteExadataInfrastructureResponse deleteExadataInfrastructure( } @Override - public DeleteExternalContainerDatabaseResponse deleteExternalContainerDatabase( - DeleteExternalContainerDatabaseRequest request) { - LOG.trace("Called deleteExternalContainerDatabase"); - final DeleteExternalContainerDatabaseRequest interceptedRequest = - DeleteExternalContainerDatabaseConverter.interceptRequest(request); + public DeleteCloudExadataInfrastructureResponse deleteCloudExadataInfrastructure( + DeleteCloudExadataInfrastructureRequest request) { + LOG.trace("Called deleteCloudExadataInfrastructure"); + final DeleteCloudExadataInfrastructureRequest interceptedRequest = + DeleteCloudExadataInfrastructureConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteExternalContainerDatabaseConverter.fromRequest(client, interceptedRequest); + DeleteCloudExadataInfrastructureConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -4042,13 +4565,13 @@ public DeleteExternalContainerDatabaseResponse deleteExternalContainerDatabase( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteExternalContainerDatabase", + "DeleteCloudExadataInfrastructure", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/DeleteExternalContainerDatabase"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudExadataInfrastructure/DeleteCloudExadataInfrastructure"); java.util.function.Function< - javax.ws.rs.core.Response, DeleteExternalContainerDatabaseResponse> + javax.ws.rs.core.Response, DeleteCloudExadataInfrastructureResponse> transformer = - DeleteExternalContainerDatabaseConverter.fromResponse( + DeleteCloudExadataInfrastructureConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4067,13 +4590,12 @@ public DeleteExternalContainerDatabaseResponse deleteExternalContainerDatabase( } @Override - public DeleteExternalDatabaseConnectorResponse deleteExternalDatabaseConnector( - DeleteExternalDatabaseConnectorRequest request) { - LOG.trace("Called deleteExternalDatabaseConnector"); - final DeleteExternalDatabaseConnectorRequest interceptedRequest = - DeleteExternalDatabaseConnectorConverter.interceptRequest(request); + public DeleteCloudVmClusterResponse deleteCloudVmCluster(DeleteCloudVmClusterRequest request) { + LOG.trace("Called deleteCloudVmCluster"); + final DeleteCloudVmClusterRequest interceptedRequest = + DeleteCloudVmClusterConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteExternalDatabaseConnectorConverter.fromRequest(client, interceptedRequest); + DeleteCloudVmClusterConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -4082,13 +4604,12 @@ public DeleteExternalDatabaseConnectorResponse deleteExternalDatabaseConnector( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteExternalDatabaseConnector", + "DeleteCloudVmCluster", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalDatabaseConnector/DeleteExternalDatabaseConnector"); - java.util.function.Function< - javax.ws.rs.core.Response, DeleteExternalDatabaseConnectorResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudVmCluster/DeleteCloudVmCluster"); + java.util.function.Function transformer = - DeleteExternalDatabaseConnectorConverter.fromResponse( + DeleteCloudVmClusterConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4107,13 +4628,13 @@ public DeleteExternalDatabaseConnectorResponse deleteExternalDatabaseConnector( } @Override - public DeleteExternalNonContainerDatabaseResponse deleteExternalNonContainerDatabase( - DeleteExternalNonContainerDatabaseRequest request) { - LOG.trace("Called deleteExternalNonContainerDatabase"); - final DeleteExternalNonContainerDatabaseRequest interceptedRequest = - DeleteExternalNonContainerDatabaseConverter.interceptRequest(request); + public DeleteConsoleConnectionResponse deleteConsoleConnection( + DeleteConsoleConnectionRequest request) { + LOG.trace("Called deleteConsoleConnection"); + final DeleteConsoleConnectionRequest interceptedRequest = + DeleteConsoleConnectionConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteExternalNonContainerDatabaseConverter.fromRequest(client, interceptedRequest); + DeleteConsoleConnectionConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -4122,13 +4643,12 @@ public DeleteExternalNonContainerDatabaseResponse deleteExternalNonContainerData com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteExternalNonContainerDatabase", + "DeleteConsoleConnection", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/DeleteExternalNonContainerDatabase"); - java.util.function.Function< - javax.ws.rs.core.Response, DeleteExternalNonContainerDatabaseResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ConsoleConnection/DeleteConsoleConnection"); + java.util.function.Function transformer = - DeleteExternalNonContainerDatabaseConverter.fromResponse( + DeleteConsoleConnectionConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4147,13 +4667,12 @@ public DeleteExternalNonContainerDatabaseResponse deleteExternalNonContainerData } @Override - public DeleteExternalPluggableDatabaseResponse deleteExternalPluggableDatabase( - DeleteExternalPluggableDatabaseRequest request) { - LOG.trace("Called deleteExternalPluggableDatabase"); - final DeleteExternalPluggableDatabaseRequest interceptedRequest = - DeleteExternalPluggableDatabaseConverter.interceptRequest(request); + public DeleteConsoleHistoryResponse deleteConsoleHistory(DeleteConsoleHistoryRequest request) { + LOG.trace("Called deleteConsoleHistory"); + final DeleteConsoleHistoryRequest interceptedRequest = + DeleteConsoleHistoryConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteExternalPluggableDatabaseConverter.fromRequest(client, interceptedRequest); + DeleteConsoleHistoryConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -4162,13 +4681,12 @@ public DeleteExternalPluggableDatabaseResponse deleteExternalPluggableDatabase( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteExternalPluggableDatabase", + "DeleteConsoleHistory", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/DeleteExternalPluggableDatabase"); - java.util.function.Function< - javax.ws.rs.core.Response, DeleteExternalPluggableDatabaseResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ConsoleHistory/DeleteConsoleHistory"); + java.util.function.Function transformer = - DeleteExternalPluggableDatabaseConverter.fromResponse( + DeleteConsoleHistoryConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4187,12 +4705,12 @@ public DeleteExternalPluggableDatabaseResponse deleteExternalPluggableDatabase( } @Override - public DeleteKeyStoreResponse deleteKeyStore(DeleteKeyStoreRequest request) { - LOG.trace("Called deleteKeyStore"); - final DeleteKeyStoreRequest interceptedRequest = - DeleteKeyStoreConverter.interceptRequest(request); + public DeleteDatabaseResponse deleteDatabase(DeleteDatabaseRequest request) { + LOG.trace("Called deleteDatabase"); + final DeleteDatabaseRequest interceptedRequest = + DeleteDatabaseConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteKeyStoreConverter.fromRequest(client, interceptedRequest); + DeleteDatabaseConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -4201,11 +4719,11 @@ public DeleteKeyStoreResponse deleteKeyStore(DeleteKeyStoreRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteKeyStore", + "DeleteDatabase", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/KeyStore/DeleteKeyStore"); - java.util.function.Function transformer = - DeleteKeyStoreConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Database/DeleteDatabase"); + java.util.function.Function transformer = + DeleteDatabaseConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -4223,12 +4741,13 @@ public DeleteKeyStoreResponse deleteKeyStore(DeleteKeyStoreRequest request) { } @Override - public DeleteOneoffPatchResponse deleteOneoffPatch(DeleteOneoffPatchRequest request) { - LOG.trace("Called deleteOneoffPatch"); - final DeleteOneoffPatchRequest interceptedRequest = - DeleteOneoffPatchConverter.interceptRequest(request); + public DeleteDatabaseSoftwareImageResponse deleteDatabaseSoftwareImage( + DeleteDatabaseSoftwareImageRequest request) { + LOG.trace("Called deleteDatabaseSoftwareImage"); + final DeleteDatabaseSoftwareImageRequest interceptedRequest = + DeleteDatabaseSoftwareImageConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteOneoffPatchConverter.fromRequest(client, interceptedRequest); + DeleteDatabaseSoftwareImageConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -4237,12 +4756,12 @@ public DeleteOneoffPatchResponse deleteOneoffPatch(DeleteOneoffPatchRequest requ com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteOneoffPatch", + "DeleteDatabaseSoftwareImage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/OneoffPatch/DeleteOneoffPatch"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DatabaseSoftwareImage/DeleteDatabaseSoftwareImage"); + java.util.function.Function transformer = - DeleteOneoffPatchConverter.fromResponse( + DeleteDatabaseSoftwareImageConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4261,13 +4780,12 @@ public DeleteOneoffPatchResponse deleteOneoffPatch(DeleteOneoffPatchRequest requ } @Override - public DeletePluggableDatabaseResponse deletePluggableDatabase( - DeletePluggableDatabaseRequest request) { - LOG.trace("Called deletePluggableDatabase"); - final DeletePluggableDatabaseRequest interceptedRequest = - DeletePluggableDatabaseConverter.interceptRequest(request); + public DeleteDbHomeResponse deleteDbHome(DeleteDbHomeRequest request) { + LOG.trace("Called deleteDbHome"); + final DeleteDbHomeRequest interceptedRequest = + DeleteDbHomeConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeletePluggableDatabaseConverter.fromRequest(client, interceptedRequest); + DeleteDbHomeConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -4276,13 +4794,11 @@ public DeletePluggableDatabaseResponse deletePluggableDatabase( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeletePluggableDatabase", + "DeleteDbHome", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/DeletePluggableDatabase"); - java.util.function.Function - transformer = - DeletePluggableDatabaseConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbHome/DeleteDbHome"); + java.util.function.Function transformer = + DeleteDbHomeConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -4300,12 +4816,13 @@ public DeletePluggableDatabaseResponse deletePluggableDatabase( } @Override - public DeleteVmClusterResponse deleteVmCluster(DeleteVmClusterRequest request) { - LOG.trace("Called deleteVmCluster"); - final DeleteVmClusterRequest interceptedRequest = - DeleteVmClusterConverter.interceptRequest(request); + public DeleteExadataInfrastructureResponse deleteExadataInfrastructure( + DeleteExadataInfrastructureRequest request) { + LOG.trace("Called deleteExadataInfrastructure"); + final DeleteExadataInfrastructureRequest interceptedRequest = + DeleteExadataInfrastructureConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteVmClusterConverter.fromRequest(client, interceptedRequest); + DeleteExadataInfrastructureConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -4314,12 +4831,12 @@ public DeleteVmClusterResponse deleteVmCluster(DeleteVmClusterRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteVmCluster", + "DeleteExadataInfrastructure", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmCluster/DeleteVmCluster"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadataInfrastructure/DeleteExadataInfrastructure"); + java.util.function.Function transformer = - DeleteVmClusterConverter.fromResponse( + DeleteExadataInfrastructureConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4338,13 +4855,12 @@ public DeleteVmClusterResponse deleteVmCluster(DeleteVmClusterRequest request) { } @Override - public DeleteVmClusterNetworkResponse deleteVmClusterNetwork( - DeleteVmClusterNetworkRequest request) { - LOG.trace("Called deleteVmClusterNetwork"); - final DeleteVmClusterNetworkRequest interceptedRequest = - DeleteVmClusterNetworkConverter.interceptRequest(request); + public DeleteExadbVmClusterResponse deleteExadbVmCluster(DeleteExadbVmClusterRequest request) { + LOG.trace("Called deleteExadbVmCluster"); + final DeleteExadbVmClusterRequest interceptedRequest = + DeleteExadbVmClusterConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteVmClusterNetworkConverter.fromRequest(client, interceptedRequest); + DeleteExadbVmClusterConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -4353,12 +4869,12 @@ public DeleteVmClusterNetworkResponse deleteVmClusterNetwork( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeleteVmClusterNetwork", + "DeleteExadbVmCluster", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmClusterNetwork/DeleteVmClusterNetwork"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmCluster/DeleteExadbVmCluster"); + java.util.function.Function transformer = - DeleteVmClusterNetworkConverter.fromResponse( + DeleteExadbVmClusterConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4377,14 +4893,13 @@ public DeleteVmClusterNetworkResponse deleteVmClusterNetwork( } @Override - public DeregisterAutonomousDatabaseDataSafeResponse deregisterAutonomousDatabaseDataSafe( - DeregisterAutonomousDatabaseDataSafeRequest request) { - LOG.trace("Called deregisterAutonomousDatabaseDataSafe"); - final DeregisterAutonomousDatabaseDataSafeRequest interceptedRequest = - DeregisterAutonomousDatabaseDataSafeConverter.interceptRequest(request); + public DeleteExascaleDbStorageVaultResponse deleteExascaleDbStorageVault( + DeleteExascaleDbStorageVaultRequest request) { + LOG.trace("Called deleteExascaleDbStorageVault"); + final DeleteExascaleDbStorageVaultRequest interceptedRequest = + DeleteExascaleDbStorageVaultConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeregisterAutonomousDatabaseDataSafeConverter.fromRequest( - client, interceptedRequest); + DeleteExascaleDbStorageVaultConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -4393,13 +4908,12 @@ public DeregisterAutonomousDatabaseDataSafeResponse deregisterAutonomousDatabase com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DeregisterAutonomousDatabaseDataSafe", + "DeleteExascaleDbStorageVault", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/DeregisterAutonomousDatabaseDataSafe"); - java.util.function.Function< - javax.ws.rs.core.Response, DeregisterAutonomousDatabaseDataSafeResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExascaleDbStorageVault/DeleteExascaleDbStorageVault"); + java.util.function.Function transformer = - DeregisterAutonomousDatabaseDataSafeConverter.fromResponse( + DeleteExascaleDbStorageVaultConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4411,25 +4925,20 @@ public DeregisterAutonomousDatabaseDataSafeResponse deregisterAutonomousDatabase retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post( - ib, - retriedRequest - .getDeregisterAutonomousDatabaseDataSafeDetails(), - retriedRequest); + client.delete(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public DisableAutonomousDatabaseManagementResponse disableAutonomousDatabaseManagement( - DisableAutonomousDatabaseManagementRequest request) { - LOG.trace("Called disableAutonomousDatabaseManagement"); - final DisableAutonomousDatabaseManagementRequest interceptedRequest = - DisableAutonomousDatabaseManagementConverter.interceptRequest(request); + public DeleteExecutionActionResponse deleteExecutionAction( + DeleteExecutionActionRequest request) { + LOG.trace("Called deleteExecutionAction"); + final DeleteExecutionActionRequest interceptedRequest = + DeleteExecutionActionConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DisableAutonomousDatabaseManagementConverter.fromRequest( - client, interceptedRequest); + DeleteExecutionActionConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -4438,13 +4947,12 @@ public DisableAutonomousDatabaseManagementResponse disableAutonomousDatabaseMana com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DisableAutonomousDatabaseManagement", + "DeleteExecutionAction", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/DisableAutonomousDatabaseManagement"); - java.util.function.Function< - javax.ws.rs.core.Response, DisableAutonomousDatabaseManagementResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionAction/DeleteExecutionAction"); + java.util.function.Function transformer = - DisableAutonomousDatabaseManagementConverter.fromResponse( + DeleteExecutionActionConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4456,22 +4964,20 @@ public DisableAutonomousDatabaseManagementResponse disableAutonomousDatabaseMana retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.delete(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public DisableAutonomousDatabaseOperationsInsightsResponse - disableAutonomousDatabaseOperationsInsights( - DisableAutonomousDatabaseOperationsInsightsRequest request) { - LOG.trace("Called disableAutonomousDatabaseOperationsInsights"); - final DisableAutonomousDatabaseOperationsInsightsRequest interceptedRequest = - DisableAutonomousDatabaseOperationsInsightsConverter.interceptRequest(request); + public DeleteExecutionWindowResponse deleteExecutionWindow( + DeleteExecutionWindowRequest request) { + LOG.trace("Called deleteExecutionWindow"); + final DeleteExecutionWindowRequest interceptedRequest = + DeleteExecutionWindowConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DisableAutonomousDatabaseOperationsInsightsConverter.fromRequest( - client, interceptedRequest); + DeleteExecutionWindowConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -4480,14 +4986,12 @@ public DisableAutonomousDatabaseManagementResponse disableAutonomousDatabaseMana com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DisableAutonomousDatabaseOperationsInsights", + "DeleteExecutionWindow", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/DisableAutonomousDatabaseOperationsInsights"); - java.util.function.Function< - javax.ws.rs.core.Response, - DisableAutonomousDatabaseOperationsInsightsResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionWindow/DeleteExecutionWindow"); + java.util.function.Function transformer = - DisableAutonomousDatabaseOperationsInsightsConverter.fromResponse( + DeleteExecutionWindowConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4499,35 +5003,35 @@ public DisableAutonomousDatabaseManagementResponse disableAutonomousDatabaseMana retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.delete(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public DisableDatabaseManagementResponse disableDatabaseManagement( - DisableDatabaseManagementRequest request) { - LOG.trace("Called disableDatabaseManagement"); - final DisableDatabaseManagementRequest interceptedRequest = - DisableDatabaseManagementConverter.interceptRequest(request); + public DeleteExternalContainerDatabaseResponse deleteExternalContainerDatabase( + DeleteExternalContainerDatabaseRequest request) { + LOG.trace("Called deleteExternalContainerDatabase"); + final DeleteExternalContainerDatabaseRequest interceptedRequest = + DeleteExternalContainerDatabaseConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DisableDatabaseManagementConverter.fromRequest(client, interceptedRequest); + DeleteExternalContainerDatabaseConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DisableDatabaseManagement", + "DeleteExternalContainerDatabase", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/Database/DisableDatabaseManagement"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/DeleteExternalContainerDatabase"); + java.util.function.Function< + javax.ws.rs.core.Response, DeleteExternalContainerDatabaseResponse> transformer = - DisableDatabaseManagementConverter.fromResponse( + DeleteExternalContainerDatabaseConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4539,40 +5043,35 @@ public DisableDatabaseManagementResponse disableDatabaseManagement( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.delete(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public DisableExternalContainerDatabaseDatabaseManagementResponse - disableExternalContainerDatabaseDatabaseManagement( - DisableExternalContainerDatabaseDatabaseManagementRequest request) { - LOG.trace("Called disableExternalContainerDatabaseDatabaseManagement"); - final DisableExternalContainerDatabaseDatabaseManagementRequest interceptedRequest = - DisableExternalContainerDatabaseDatabaseManagementConverter.interceptRequest( - request); + public DeleteExternalDatabaseConnectorResponse deleteExternalDatabaseConnector( + DeleteExternalDatabaseConnectorRequest request) { + LOG.trace("Called deleteExternalDatabaseConnector"); + final DeleteExternalDatabaseConnectorRequest interceptedRequest = + DeleteExternalDatabaseConnectorConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DisableExternalContainerDatabaseDatabaseManagementConverter.fromRequest( - client, interceptedRequest); + DeleteExternalDatabaseConnectorConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DisableExternalContainerDatabaseDatabaseManagement", + "DeleteExternalDatabaseConnector", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/DisableExternalContainerDatabaseDatabaseManagement"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalDatabaseConnector/DeleteExternalDatabaseConnector"); java.util.function.Function< - javax.ws.rs.core.Response, - DisableExternalContainerDatabaseDatabaseManagementResponse> + javax.ws.rs.core.Response, DeleteExternalDatabaseConnectorResponse> transformer = - DisableExternalContainerDatabaseDatabaseManagementConverter.fromResponse( + DeleteExternalDatabaseConnectorConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4584,39 +5083,35 @@ public DisableDatabaseManagementResponse disableDatabaseManagement( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.delete(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public DisableExternalContainerDatabaseStackMonitoringResponse - disableExternalContainerDatabaseStackMonitoring( - DisableExternalContainerDatabaseStackMonitoringRequest request) { - LOG.trace("Called disableExternalContainerDatabaseStackMonitoring"); - final DisableExternalContainerDatabaseStackMonitoringRequest interceptedRequest = - DisableExternalContainerDatabaseStackMonitoringConverter.interceptRequest(request); + public DeleteExternalNonContainerDatabaseResponse deleteExternalNonContainerDatabase( + DeleteExternalNonContainerDatabaseRequest request) { + LOG.trace("Called deleteExternalNonContainerDatabase"); + final DeleteExternalNonContainerDatabaseRequest interceptedRequest = + DeleteExternalNonContainerDatabaseConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DisableExternalContainerDatabaseStackMonitoringConverter.fromRequest( - client, interceptedRequest); + DeleteExternalNonContainerDatabaseConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DisableExternalContainerDatabaseStackMonitoring", + "DeleteExternalNonContainerDatabase", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/DisableExternalContainerDatabaseStackMonitoring"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/DeleteExternalNonContainerDatabase"); java.util.function.Function< - javax.ws.rs.core.Response, - DisableExternalContainerDatabaseStackMonitoringResponse> + javax.ws.rs.core.Response, DeleteExternalNonContainerDatabaseResponse> transformer = - DisableExternalContainerDatabaseStackMonitoringConverter.fromResponse( + DeleteExternalNonContainerDatabaseConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4628,40 +5123,35 @@ public DisableDatabaseManagementResponse disableDatabaseManagement( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.delete(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public DisableExternalNonContainerDatabaseDatabaseManagementResponse - disableExternalNonContainerDatabaseDatabaseManagement( - DisableExternalNonContainerDatabaseDatabaseManagementRequest request) { - LOG.trace("Called disableExternalNonContainerDatabaseDatabaseManagement"); - final DisableExternalNonContainerDatabaseDatabaseManagementRequest interceptedRequest = - DisableExternalNonContainerDatabaseDatabaseManagementConverter.interceptRequest( - request); + public DeleteExternalPluggableDatabaseResponse deleteExternalPluggableDatabase( + DeleteExternalPluggableDatabaseRequest request) { + LOG.trace("Called deleteExternalPluggableDatabase"); + final DeleteExternalPluggableDatabaseRequest interceptedRequest = + DeleteExternalPluggableDatabaseConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DisableExternalNonContainerDatabaseDatabaseManagementConverter.fromRequest( - client, interceptedRequest); + DeleteExternalPluggableDatabaseConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DisableExternalNonContainerDatabaseDatabaseManagement", + "DeleteExternalPluggableDatabase", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/DisableExternalNonContainerDatabaseDatabaseManagement"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/DeleteExternalPluggableDatabase"); java.util.function.Function< - javax.ws.rs.core.Response, - DisableExternalNonContainerDatabaseDatabaseManagementResponse> + javax.ws.rs.core.Response, DeleteExternalPluggableDatabaseResponse> transformer = - DisableExternalNonContainerDatabaseDatabaseManagementConverter.fromResponse( + DeleteExternalPluggableDatabaseConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4673,41 +5163,32 @@ public DisableDatabaseManagementResponse disableDatabaseManagement( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.delete(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public DisableExternalNonContainerDatabaseOperationsInsightsResponse - disableExternalNonContainerDatabaseOperationsInsights( - DisableExternalNonContainerDatabaseOperationsInsightsRequest request) { - LOG.trace("Called disableExternalNonContainerDatabaseOperationsInsights"); - final DisableExternalNonContainerDatabaseOperationsInsightsRequest interceptedRequest = - DisableExternalNonContainerDatabaseOperationsInsightsConverter.interceptRequest( - request); + public DeleteKeyStoreResponse deleteKeyStore(DeleteKeyStoreRequest request) { + LOG.trace("Called deleteKeyStore"); + final DeleteKeyStoreRequest interceptedRequest = + DeleteKeyStoreConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DisableExternalNonContainerDatabaseOperationsInsightsConverter.fromRequest( - client, interceptedRequest); + DeleteKeyStoreConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DisableExternalNonContainerDatabaseOperationsInsights", + "DeleteKeyStore", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/DisableExternalNonContainerDatabaseOperationsInsights"); - java.util.function.Function< - javax.ws.rs.core.Response, - DisableExternalNonContainerDatabaseOperationsInsightsResponse> - transformer = - DisableExternalNonContainerDatabaseOperationsInsightsConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/KeyStore/DeleteKeyStore"); + java.util.function.Function transformer = + DeleteKeyStoreConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -4718,40 +5199,33 @@ public DisableDatabaseManagementResponse disableDatabaseManagement( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.delete(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public DisableExternalNonContainerDatabaseStackMonitoringResponse - disableExternalNonContainerDatabaseStackMonitoring( - DisableExternalNonContainerDatabaseStackMonitoringRequest request) { - LOG.trace("Called disableExternalNonContainerDatabaseStackMonitoring"); - final DisableExternalNonContainerDatabaseStackMonitoringRequest interceptedRequest = - DisableExternalNonContainerDatabaseStackMonitoringConverter.interceptRequest( - request); + public DeleteOneoffPatchResponse deleteOneoffPatch(DeleteOneoffPatchRequest request) { + LOG.trace("Called deleteOneoffPatch"); + final DeleteOneoffPatchRequest interceptedRequest = + DeleteOneoffPatchConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DisableExternalNonContainerDatabaseStackMonitoringConverter.fromRequest( - client, interceptedRequest); + DeleteOneoffPatchConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DisableExternalNonContainerDatabaseStackMonitoring", + "DeleteOneoffPatch", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/DisableExternalNonContainerDatabaseStackMonitoring"); - java.util.function.Function< - javax.ws.rs.core.Response, - DisableExternalNonContainerDatabaseStackMonitoringResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/OneoffPatch/DeleteOneoffPatch"); + java.util.function.Function transformer = - DisableExternalNonContainerDatabaseStackMonitoringConverter.fromResponse( + DeleteOneoffPatchConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4763,40 +5237,34 @@ public DisableDatabaseManagementResponse disableDatabaseManagement( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.delete(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public DisableExternalPluggableDatabaseDatabaseManagementResponse - disableExternalPluggableDatabaseDatabaseManagement( - DisableExternalPluggableDatabaseDatabaseManagementRequest request) { - LOG.trace("Called disableExternalPluggableDatabaseDatabaseManagement"); - final DisableExternalPluggableDatabaseDatabaseManagementRequest interceptedRequest = - DisableExternalPluggableDatabaseDatabaseManagementConverter.interceptRequest( - request); + public DeletePluggableDatabaseResponse deletePluggableDatabase( + DeletePluggableDatabaseRequest request) { + LOG.trace("Called deletePluggableDatabase"); + final DeletePluggableDatabaseRequest interceptedRequest = + DeletePluggableDatabaseConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DisableExternalPluggableDatabaseDatabaseManagementConverter.fromRequest( - client, interceptedRequest); + DeletePluggableDatabaseConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DisableExternalPluggableDatabaseDatabaseManagement", + "DeletePluggableDatabase", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/DisableExternalPluggableDatabaseDatabaseManagement"); - java.util.function.Function< - javax.ws.rs.core.Response, - DisableExternalPluggableDatabaseDatabaseManagementResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/DeletePluggableDatabase"); + java.util.function.Function transformer = - DisableExternalPluggableDatabaseDatabaseManagementConverter.fromResponse( + DeletePluggableDatabaseConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4808,40 +5276,34 @@ public DisableDatabaseManagementResponse disableDatabaseManagement( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.delete(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public DisableExternalPluggableDatabaseOperationsInsightsResponse - disableExternalPluggableDatabaseOperationsInsights( - DisableExternalPluggableDatabaseOperationsInsightsRequest request) { - LOG.trace("Called disableExternalPluggableDatabaseOperationsInsights"); - final DisableExternalPluggableDatabaseOperationsInsightsRequest interceptedRequest = - DisableExternalPluggableDatabaseOperationsInsightsConverter.interceptRequest( - request); + public DeleteScheduledActionResponse deleteScheduledAction( + DeleteScheduledActionRequest request) { + LOG.trace("Called deleteScheduledAction"); + final DeleteScheduledActionRequest interceptedRequest = + DeleteScheduledActionConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DisableExternalPluggableDatabaseOperationsInsightsConverter.fromRequest( - client, interceptedRequest); + DeleteScheduledActionConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DisableExternalPluggableDatabaseOperationsInsights", + "DeleteScheduledAction", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/DisableExternalPluggableDatabaseOperationsInsights"); - java.util.function.Function< - javax.ws.rs.core.Response, - DisableExternalPluggableDatabaseOperationsInsightsResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ScheduledAction/DeleteScheduledAction"); + java.util.function.Function transformer = - DisableExternalPluggableDatabaseOperationsInsightsConverter.fromResponse( + DeleteScheduledActionConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4853,39 +5315,33 @@ public DisableDatabaseManagementResponse disableDatabaseManagement( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.delete(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public DisableExternalPluggableDatabaseStackMonitoringResponse - disableExternalPluggableDatabaseStackMonitoring( - DisableExternalPluggableDatabaseStackMonitoringRequest request) { - LOG.trace("Called disableExternalPluggableDatabaseStackMonitoring"); - final DisableExternalPluggableDatabaseStackMonitoringRequest interceptedRequest = - DisableExternalPluggableDatabaseStackMonitoringConverter.interceptRequest(request); + public DeleteSchedulingPlanResponse deleteSchedulingPlan(DeleteSchedulingPlanRequest request) { + LOG.trace("Called deleteSchedulingPlan"); + final DeleteSchedulingPlanRequest interceptedRequest = + DeleteSchedulingPlanConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DisableExternalPluggableDatabaseStackMonitoringConverter.fromRequest( - client, interceptedRequest); + DeleteSchedulingPlanConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DisableExternalPluggableDatabaseStackMonitoring", + "DeleteSchedulingPlan", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/DisableExternalPluggableDatabaseStackMonitoring"); - java.util.function.Function< - javax.ws.rs.core.Response, - DisableExternalPluggableDatabaseStackMonitoringResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPlan/DeleteSchedulingPlan"); + java.util.function.Function transformer = - DisableExternalPluggableDatabaseStackMonitoringConverter.fromResponse( + DeleteSchedulingPlanConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4897,36 +5353,34 @@ public DisableDatabaseManagementResponse disableDatabaseManagement( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.delete(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public DisablePluggableDatabaseManagementResponse disablePluggableDatabaseManagement( - DisablePluggableDatabaseManagementRequest request) { - LOG.trace("Called disablePluggableDatabaseManagement"); - final DisablePluggableDatabaseManagementRequest interceptedRequest = - DisablePluggableDatabaseManagementConverter.interceptRequest(request); + public DeleteSchedulingPolicyResponse deleteSchedulingPolicy( + DeleteSchedulingPolicyRequest request) { + LOG.trace("Called deleteSchedulingPolicy"); + final DeleteSchedulingPolicyRequest interceptedRequest = + DeleteSchedulingPolicyConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DisablePluggableDatabaseManagementConverter.fromRequest(client, interceptedRequest); + DeleteSchedulingPolicyConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DisablePluggableDatabaseManagement", + "DeleteSchedulingPolicy", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/DisablePluggableDatabaseManagement"); - java.util.function.Function< - javax.ws.rs.core.Response, DisablePluggableDatabaseManagementResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPolicy/DeleteSchedulingPolicy"); + java.util.function.Function transformer = - DisablePluggableDatabaseManagementConverter.fromResponse( + DeleteSchedulingPolicyConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4938,37 +5392,34 @@ public DisablePluggableDatabaseManagementResponse disablePluggableDatabaseManage retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.delete(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public DownloadExadataInfrastructureConfigFileResponse downloadExadataInfrastructureConfigFile( - DownloadExadataInfrastructureConfigFileRequest request) { - LOG.trace("Called downloadExadataInfrastructureConfigFile"); - final DownloadExadataInfrastructureConfigFileRequest interceptedRequest = - DownloadExadataInfrastructureConfigFileConverter.interceptRequest(request); + public DeleteSchedulingWindowResponse deleteSchedulingWindow( + DeleteSchedulingWindowRequest request) { + LOG.trace("Called deleteSchedulingWindow"); + final DeleteSchedulingWindowRequest interceptedRequest = + DeleteSchedulingWindowConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DownloadExadataInfrastructureConfigFileConverter.fromRequest( - client, interceptedRequest); + DeleteSchedulingWindowConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DownloadExadataInfrastructureConfigFile", + "DeleteSchedulingWindow", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadataInfrastructure/DownloadExadataInfrastructureConfigFile"); - java.util.function.Function< - javax.ws.rs.core.Response, DownloadExadataInfrastructureConfigFileResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingWindow/DeleteSchedulingWindow"); + java.util.function.Function transformer = - DownloadExadataInfrastructureConfigFileConverter.fromResponse( + DeleteSchedulingWindowConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -4980,34 +5431,33 @@ public DownloadExadataInfrastructureConfigFileResponse downloadExadataInfrastruc retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.delete(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public DownloadOneoffPatchResponse downloadOneoffPatch(DownloadOneoffPatchRequest request) { - LOG.trace("Called downloadOneoffPatch"); - final DownloadOneoffPatchRequest interceptedRequest = - DownloadOneoffPatchConverter.interceptRequest(request); + public DeleteVmClusterResponse deleteVmCluster(DeleteVmClusterRequest request) { + LOG.trace("Called deleteVmCluster"); + final DeleteVmClusterRequest interceptedRequest = + DeleteVmClusterConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DownloadOneoffPatchConverter.fromRequest(client, interceptedRequest); + DeleteVmClusterConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DownloadOneoffPatch", + "DeleteVmCluster", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/OneoffPatch/DownloadOneoffPatch"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmCluster/DeleteVmCluster"); + java.util.function.Function transformer = - DownloadOneoffPatchConverter.fromResponse( + DeleteVmClusterConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5019,35 +5469,34 @@ public DownloadOneoffPatchResponse downloadOneoffPatch(DownloadOneoffPatchReques retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.delete(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public DownloadValidationReportResponse downloadValidationReport( - DownloadValidationReportRequest request) { - LOG.trace("Called downloadValidationReport"); - final DownloadValidationReportRequest interceptedRequest = - DownloadValidationReportConverter.interceptRequest(request); + public DeleteVmClusterNetworkResponse deleteVmClusterNetwork( + DeleteVmClusterNetworkRequest request) { + LOG.trace("Called deleteVmClusterNetwork"); + final DeleteVmClusterNetworkRequest interceptedRequest = + DeleteVmClusterNetworkConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DownloadValidationReportConverter.fromRequest(client, interceptedRequest); + DeleteVmClusterNetworkConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DownloadValidationReport", + "DeleteVmClusterNetwork", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmClusterNetwork/DownloadValidationReport"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmClusterNetwork/DeleteVmClusterNetwork"); + java.util.function.Function transformer = - DownloadValidationReportConverter.fromResponse( + DeleteVmClusterNetworkConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5059,36 +5508,36 @@ public DownloadValidationReportResponse downloadValidationReport( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.delete(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public DownloadVmClusterNetworkConfigFileResponse downloadVmClusterNetworkConfigFile( - DownloadVmClusterNetworkConfigFileRequest request) { - LOG.trace("Called downloadVmClusterNetworkConfigFile"); - final DownloadVmClusterNetworkConfigFileRequest interceptedRequest = - DownloadVmClusterNetworkConfigFileConverter.interceptRequest(request); + public DeregisterAutonomousDatabaseDataSafeResponse deregisterAutonomousDatabaseDataSafe( + DeregisterAutonomousDatabaseDataSafeRequest request) { + LOG.trace("Called deregisterAutonomousDatabaseDataSafe"); + final DeregisterAutonomousDatabaseDataSafeRequest interceptedRequest = + DeregisterAutonomousDatabaseDataSafeConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DownloadVmClusterNetworkConfigFileConverter.fromRequest(client, interceptedRequest); + DeregisterAutonomousDatabaseDataSafeConverter.fromRequest( + client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "DownloadVmClusterNetworkConfigFile", + "DeregisterAutonomousDatabaseDataSafe", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmClusterNetwork/DownloadVmClusterNetworkConfigFile"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/DeregisterAutonomousDatabaseDataSafe"); java.util.function.Function< - javax.ws.rs.core.Response, DownloadVmClusterNetworkConfigFileResponse> + javax.ws.rs.core.Response, DeregisterAutonomousDatabaseDataSafeResponse> transformer = - DownloadVmClusterNetworkConfigFileConverter.fromResponse( + DeregisterAutonomousDatabaseDataSafeConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5100,20 +5549,25 @@ public DownloadVmClusterNetworkConfigFileResponse downloadVmClusterNetworkConfig retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.post( + ib, + retriedRequest + .getDeregisterAutonomousDatabaseDataSafeDetails(), + retriedRequest); return transformer.apply(response); }); }); } @Override - public EnableAutonomousDatabaseManagementResponse enableAutonomousDatabaseManagement( - EnableAutonomousDatabaseManagementRequest request) { - LOG.trace("Called enableAutonomousDatabaseManagement"); - final EnableAutonomousDatabaseManagementRequest interceptedRequest = - EnableAutonomousDatabaseManagementConverter.interceptRequest(request); + public DisableAutonomousDatabaseManagementResponse disableAutonomousDatabaseManagement( + DisableAutonomousDatabaseManagementRequest request) { + LOG.trace("Called disableAutonomousDatabaseManagement"); + final DisableAutonomousDatabaseManagementRequest interceptedRequest = + DisableAutonomousDatabaseManagementConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - EnableAutonomousDatabaseManagementConverter.fromRequest(client, interceptedRequest); + DisableAutonomousDatabaseManagementConverter.fromRequest( + client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -5122,13 +5576,13 @@ public EnableAutonomousDatabaseManagementResponse enableAutonomousDatabaseManage com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "EnableAutonomousDatabaseManagement", + "DisableAutonomousDatabaseManagement", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/EnableAutonomousDatabaseManagement"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/DisableAutonomousDatabaseManagement"); java.util.function.Function< - javax.ws.rs.core.Response, EnableAutonomousDatabaseManagementResponse> + javax.ws.rs.core.Response, DisableAutonomousDatabaseManagementResponse> transformer = - EnableAutonomousDatabaseManagementConverter.fromResponse( + DisableAutonomousDatabaseManagementConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5147,14 +5601,14 @@ public EnableAutonomousDatabaseManagementResponse enableAutonomousDatabaseManage } @Override - public EnableAutonomousDatabaseOperationsInsightsResponse - enableAutonomousDatabaseOperationsInsights( - EnableAutonomousDatabaseOperationsInsightsRequest request) { - LOG.trace("Called enableAutonomousDatabaseOperationsInsights"); - final EnableAutonomousDatabaseOperationsInsightsRequest interceptedRequest = - EnableAutonomousDatabaseOperationsInsightsConverter.interceptRequest(request); + public DisableAutonomousDatabaseOperationsInsightsResponse + disableAutonomousDatabaseOperationsInsights( + DisableAutonomousDatabaseOperationsInsightsRequest request) { + LOG.trace("Called disableAutonomousDatabaseOperationsInsights"); + final DisableAutonomousDatabaseOperationsInsightsRequest interceptedRequest = + DisableAutonomousDatabaseOperationsInsightsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - EnableAutonomousDatabaseOperationsInsightsConverter.fromRequest( + DisableAutonomousDatabaseOperationsInsightsConverter.fromRequest( client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = @@ -5164,14 +5618,14 @@ public EnableAutonomousDatabaseManagementResponse enableAutonomousDatabaseManage com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "EnableAutonomousDatabaseOperationsInsights", + "DisableAutonomousDatabaseOperationsInsights", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/EnableAutonomousDatabaseOperationsInsights"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/DisableAutonomousDatabaseOperationsInsights"); java.util.function.Function< javax.ws.rs.core.Response, - EnableAutonomousDatabaseOperationsInsightsResponse> + DisableAutonomousDatabaseOperationsInsightsResponse> transformer = - EnableAutonomousDatabaseOperationsInsightsConverter.fromResponse( + DisableAutonomousDatabaseOperationsInsightsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5190,13 +5644,13 @@ public EnableAutonomousDatabaseManagementResponse enableAutonomousDatabaseManage } @Override - public EnableDatabaseManagementResponse enableDatabaseManagement( - EnableDatabaseManagementRequest request) { - LOG.trace("Called enableDatabaseManagement"); - final EnableDatabaseManagementRequest interceptedRequest = - EnableDatabaseManagementConverter.interceptRequest(request); + public DisableDatabaseManagementResponse disableDatabaseManagement( + DisableDatabaseManagementRequest request) { + LOG.trace("Called disableDatabaseManagement"); + final DisableDatabaseManagementRequest interceptedRequest = + DisableDatabaseManagementConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - EnableDatabaseManagementConverter.fromRequest(client, interceptedRequest); + DisableDatabaseManagementConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -5206,12 +5660,12 @@ public EnableDatabaseManagementResponse enableDatabaseManagement( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "EnableDatabaseManagement", + "DisableDatabaseManagement", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/Database/EnableDatabaseManagement"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Database/DisableDatabaseManagement"); + java.util.function.Function transformer = - EnableDatabaseManagementConverter.fromResponse( + DisableDatabaseManagementConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5223,25 +5677,22 @@ public EnableDatabaseManagementResponse enableDatabaseManagement( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post( - ib, - retriedRequest.getEnableDatabaseManagementDetails(), - retriedRequest); + client.post(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public EnableExternalContainerDatabaseDatabaseManagementResponse - enableExternalContainerDatabaseDatabaseManagement( - EnableExternalContainerDatabaseDatabaseManagementRequest request) { - LOG.trace("Called enableExternalContainerDatabaseDatabaseManagement"); - final EnableExternalContainerDatabaseDatabaseManagementRequest interceptedRequest = - EnableExternalContainerDatabaseDatabaseManagementConverter.interceptRequest( + public DisableExternalContainerDatabaseDatabaseManagementResponse + disableExternalContainerDatabaseDatabaseManagement( + DisableExternalContainerDatabaseDatabaseManagementRequest request) { + LOG.trace("Called disableExternalContainerDatabaseDatabaseManagement"); + final DisableExternalContainerDatabaseDatabaseManagementRequest interceptedRequest = + DisableExternalContainerDatabaseDatabaseManagementConverter.interceptRequest( request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - EnableExternalContainerDatabaseDatabaseManagementConverter.fromRequest( + DisableExternalContainerDatabaseDatabaseManagementConverter.fromRequest( client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = @@ -5252,14 +5703,14 @@ public EnableDatabaseManagementResponse enableDatabaseManagement( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "EnableExternalContainerDatabaseDatabaseManagement", + "DisableExternalContainerDatabaseDatabaseManagement", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/EnableExternalContainerDatabaseDatabaseManagement"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/DisableExternalContainerDatabaseDatabaseManagement"); java.util.function.Function< javax.ws.rs.core.Response, - EnableExternalContainerDatabaseDatabaseManagementResponse> + DisableExternalContainerDatabaseDatabaseManagementResponse> transformer = - EnableExternalContainerDatabaseDatabaseManagementConverter.fromResponse( + DisableExternalContainerDatabaseDatabaseManagementConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5271,25 +5722,21 @@ public EnableDatabaseManagementResponse enableDatabaseManagement( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post( - ib, - retriedRequest - .getEnableExternalContainerDatabaseDatabaseManagementDetails(), - retriedRequest); + client.post(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public EnableExternalContainerDatabaseStackMonitoringResponse - enableExternalContainerDatabaseStackMonitoring( - EnableExternalContainerDatabaseStackMonitoringRequest request) { - LOG.trace("Called enableExternalContainerDatabaseStackMonitoring"); - final EnableExternalContainerDatabaseStackMonitoringRequest interceptedRequest = - EnableExternalContainerDatabaseStackMonitoringConverter.interceptRequest(request); + public DisableExternalContainerDatabaseStackMonitoringResponse + disableExternalContainerDatabaseStackMonitoring( + DisableExternalContainerDatabaseStackMonitoringRequest request) { + LOG.trace("Called disableExternalContainerDatabaseStackMonitoring"); + final DisableExternalContainerDatabaseStackMonitoringRequest interceptedRequest = + DisableExternalContainerDatabaseStackMonitoringConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - EnableExternalContainerDatabaseStackMonitoringConverter.fromRequest( + DisableExternalContainerDatabaseStackMonitoringConverter.fromRequest( client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = @@ -5300,14 +5747,14 @@ public EnableDatabaseManagementResponse enableDatabaseManagement( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "EnableExternalContainerDatabaseStackMonitoring", + "DisableExternalContainerDatabaseStackMonitoring", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/EnableExternalContainerDatabaseStackMonitoring"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/DisableExternalContainerDatabaseStackMonitoring"); java.util.function.Function< javax.ws.rs.core.Response, - EnableExternalContainerDatabaseStackMonitoringResponse> + DisableExternalContainerDatabaseStackMonitoringResponse> transformer = - EnableExternalContainerDatabaseStackMonitoringConverter.fromResponse( + DisableExternalContainerDatabaseStackMonitoringConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5319,26 +5766,22 @@ public EnableDatabaseManagementResponse enableDatabaseManagement( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post( - ib, - retriedRequest - .getEnableExternalContainerDatabaseStackMonitoringDetails(), - retriedRequest); + client.post(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public EnableExternalNonContainerDatabaseDatabaseManagementResponse - enableExternalNonContainerDatabaseDatabaseManagement( - EnableExternalNonContainerDatabaseDatabaseManagementRequest request) { - LOG.trace("Called enableExternalNonContainerDatabaseDatabaseManagement"); - final EnableExternalNonContainerDatabaseDatabaseManagementRequest interceptedRequest = - EnableExternalNonContainerDatabaseDatabaseManagementConverter.interceptRequest( + public DisableExternalNonContainerDatabaseDatabaseManagementResponse + disableExternalNonContainerDatabaseDatabaseManagement( + DisableExternalNonContainerDatabaseDatabaseManagementRequest request) { + LOG.trace("Called disableExternalNonContainerDatabaseDatabaseManagement"); + final DisableExternalNonContainerDatabaseDatabaseManagementRequest interceptedRequest = + DisableExternalNonContainerDatabaseDatabaseManagementConverter.interceptRequest( request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - EnableExternalNonContainerDatabaseDatabaseManagementConverter.fromRequest( + DisableExternalNonContainerDatabaseDatabaseManagementConverter.fromRequest( client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = @@ -5349,14 +5792,14 @@ public EnableDatabaseManagementResponse enableDatabaseManagement( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "EnableExternalNonContainerDatabaseDatabaseManagement", + "DisableExternalNonContainerDatabaseDatabaseManagement", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/EnableExternalNonContainerDatabaseDatabaseManagement"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/DisableExternalNonContainerDatabaseDatabaseManagement"); java.util.function.Function< javax.ws.rs.core.Response, - EnableExternalNonContainerDatabaseDatabaseManagementResponse> + DisableExternalNonContainerDatabaseDatabaseManagementResponse> transformer = - EnableExternalNonContainerDatabaseDatabaseManagementConverter.fromResponse( + DisableExternalNonContainerDatabaseDatabaseManagementConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5368,26 +5811,22 @@ public EnableDatabaseManagementResponse enableDatabaseManagement( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post( - ib, - retriedRequest - .getEnableExternalNonContainerDatabaseDatabaseManagementDetails(), - retriedRequest); + client.post(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public EnableExternalNonContainerDatabaseOperationsInsightsResponse - enableExternalNonContainerDatabaseOperationsInsights( - EnableExternalNonContainerDatabaseOperationsInsightsRequest request) { - LOG.trace("Called enableExternalNonContainerDatabaseOperationsInsights"); - final EnableExternalNonContainerDatabaseOperationsInsightsRequest interceptedRequest = - EnableExternalNonContainerDatabaseOperationsInsightsConverter.interceptRequest( + public DisableExternalNonContainerDatabaseOperationsInsightsResponse + disableExternalNonContainerDatabaseOperationsInsights( + DisableExternalNonContainerDatabaseOperationsInsightsRequest request) { + LOG.trace("Called disableExternalNonContainerDatabaseOperationsInsights"); + final DisableExternalNonContainerDatabaseOperationsInsightsRequest interceptedRequest = + DisableExternalNonContainerDatabaseOperationsInsightsConverter.interceptRequest( request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - EnableExternalNonContainerDatabaseOperationsInsightsConverter.fromRequest( + DisableExternalNonContainerDatabaseOperationsInsightsConverter.fromRequest( client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = @@ -5398,14 +5837,14 @@ public EnableDatabaseManagementResponse enableDatabaseManagement( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "EnableExternalNonContainerDatabaseOperationsInsights", + "DisableExternalNonContainerDatabaseOperationsInsights", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/EnableExternalNonContainerDatabaseOperationsInsights"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/DisableExternalNonContainerDatabaseOperationsInsights"); java.util.function.Function< javax.ws.rs.core.Response, - EnableExternalNonContainerDatabaseOperationsInsightsResponse> + DisableExternalNonContainerDatabaseOperationsInsightsResponse> transformer = - EnableExternalNonContainerDatabaseOperationsInsightsConverter.fromResponse( + DisableExternalNonContainerDatabaseOperationsInsightsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5417,26 +5856,22 @@ public EnableDatabaseManagementResponse enableDatabaseManagement( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post( - ib, - retriedRequest - .getEnableExternalNonContainerDatabaseOperationsInsightsDetails(), - retriedRequest); + client.post(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public EnableExternalNonContainerDatabaseStackMonitoringResponse - enableExternalNonContainerDatabaseStackMonitoring( - EnableExternalNonContainerDatabaseStackMonitoringRequest request) { - LOG.trace("Called enableExternalNonContainerDatabaseStackMonitoring"); - final EnableExternalNonContainerDatabaseStackMonitoringRequest interceptedRequest = - EnableExternalNonContainerDatabaseStackMonitoringConverter.interceptRequest( + public DisableExternalNonContainerDatabaseStackMonitoringResponse + disableExternalNonContainerDatabaseStackMonitoring( + DisableExternalNonContainerDatabaseStackMonitoringRequest request) { + LOG.trace("Called disableExternalNonContainerDatabaseStackMonitoring"); + final DisableExternalNonContainerDatabaseStackMonitoringRequest interceptedRequest = + DisableExternalNonContainerDatabaseStackMonitoringConverter.interceptRequest( request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - EnableExternalNonContainerDatabaseStackMonitoringConverter.fromRequest( + DisableExternalNonContainerDatabaseStackMonitoringConverter.fromRequest( client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = @@ -5447,14 +5882,14 @@ public EnableDatabaseManagementResponse enableDatabaseManagement( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "EnableExternalNonContainerDatabaseStackMonitoring", + "DisableExternalNonContainerDatabaseStackMonitoring", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/EnableExternalNonContainerDatabaseStackMonitoring"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/DisableExternalNonContainerDatabaseStackMonitoring"); java.util.function.Function< javax.ws.rs.core.Response, - EnableExternalNonContainerDatabaseStackMonitoringResponse> + DisableExternalNonContainerDatabaseStackMonitoringResponse> transformer = - EnableExternalNonContainerDatabaseStackMonitoringConverter.fromResponse( + DisableExternalNonContainerDatabaseStackMonitoringConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5466,26 +5901,22 @@ public EnableDatabaseManagementResponse enableDatabaseManagement( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post( - ib, - retriedRequest - .getEnableExternalNonContainerDatabaseStackMonitoringDetails(), - retriedRequest); + client.post(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public EnableExternalPluggableDatabaseDatabaseManagementResponse - enableExternalPluggableDatabaseDatabaseManagement( - EnableExternalPluggableDatabaseDatabaseManagementRequest request) { - LOG.trace("Called enableExternalPluggableDatabaseDatabaseManagement"); - final EnableExternalPluggableDatabaseDatabaseManagementRequest interceptedRequest = - EnableExternalPluggableDatabaseDatabaseManagementConverter.interceptRequest( + public DisableExternalPluggableDatabaseDatabaseManagementResponse + disableExternalPluggableDatabaseDatabaseManagement( + DisableExternalPluggableDatabaseDatabaseManagementRequest request) { + LOG.trace("Called disableExternalPluggableDatabaseDatabaseManagement"); + final DisableExternalPluggableDatabaseDatabaseManagementRequest interceptedRequest = + DisableExternalPluggableDatabaseDatabaseManagementConverter.interceptRequest( request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - EnableExternalPluggableDatabaseDatabaseManagementConverter.fromRequest( + DisableExternalPluggableDatabaseDatabaseManagementConverter.fromRequest( client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = @@ -5496,14 +5927,14 @@ public EnableDatabaseManagementResponse enableDatabaseManagement( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "EnableExternalPluggableDatabaseDatabaseManagement", + "DisableExternalPluggableDatabaseDatabaseManagement", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/EnableExternalPluggableDatabaseDatabaseManagement"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/DisableExternalPluggableDatabaseDatabaseManagement"); java.util.function.Function< javax.ws.rs.core.Response, - EnableExternalPluggableDatabaseDatabaseManagementResponse> + DisableExternalPluggableDatabaseDatabaseManagementResponse> transformer = - EnableExternalPluggableDatabaseDatabaseManagementConverter.fromResponse( + DisableExternalPluggableDatabaseDatabaseManagementConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5515,26 +5946,22 @@ public EnableDatabaseManagementResponse enableDatabaseManagement( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post( - ib, - retriedRequest - .getEnableExternalPluggableDatabaseDatabaseManagementDetails(), - retriedRequest); + client.post(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public EnableExternalPluggableDatabaseOperationsInsightsResponse - enableExternalPluggableDatabaseOperationsInsights( - EnableExternalPluggableDatabaseOperationsInsightsRequest request) { - LOG.trace("Called enableExternalPluggableDatabaseOperationsInsights"); - final EnableExternalPluggableDatabaseOperationsInsightsRequest interceptedRequest = - EnableExternalPluggableDatabaseOperationsInsightsConverter.interceptRequest( + public DisableExternalPluggableDatabaseOperationsInsightsResponse + disableExternalPluggableDatabaseOperationsInsights( + DisableExternalPluggableDatabaseOperationsInsightsRequest request) { + LOG.trace("Called disableExternalPluggableDatabaseOperationsInsights"); + final DisableExternalPluggableDatabaseOperationsInsightsRequest interceptedRequest = + DisableExternalPluggableDatabaseOperationsInsightsConverter.interceptRequest( request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - EnableExternalPluggableDatabaseOperationsInsightsConverter.fromRequest( + DisableExternalPluggableDatabaseOperationsInsightsConverter.fromRequest( client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = @@ -5545,14 +5972,14 @@ public EnableDatabaseManagementResponse enableDatabaseManagement( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "EnableExternalPluggableDatabaseOperationsInsights", + "DisableExternalPluggableDatabaseOperationsInsights", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/EnableExternalPluggableDatabaseOperationsInsights"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/DisableExternalPluggableDatabaseOperationsInsights"); java.util.function.Function< javax.ws.rs.core.Response, - EnableExternalPluggableDatabaseOperationsInsightsResponse> + DisableExternalPluggableDatabaseOperationsInsightsResponse> transformer = - EnableExternalPluggableDatabaseOperationsInsightsConverter.fromResponse( + DisableExternalPluggableDatabaseOperationsInsightsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5564,25 +5991,21 @@ public EnableDatabaseManagementResponse enableDatabaseManagement( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post( - ib, - retriedRequest - .getEnableExternalPluggableDatabaseOperationsInsightsDetails(), - retriedRequest); + client.post(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public EnableExternalPluggableDatabaseStackMonitoringResponse - enableExternalPluggableDatabaseStackMonitoring( - EnableExternalPluggableDatabaseStackMonitoringRequest request) { - LOG.trace("Called enableExternalPluggableDatabaseStackMonitoring"); - final EnableExternalPluggableDatabaseStackMonitoringRequest interceptedRequest = - EnableExternalPluggableDatabaseStackMonitoringConverter.interceptRequest(request); - com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - EnableExternalPluggableDatabaseStackMonitoringConverter.fromRequest( + public DisableExternalPluggableDatabaseStackMonitoringResponse + disableExternalPluggableDatabaseStackMonitoring( + DisableExternalPluggableDatabaseStackMonitoringRequest request) { + LOG.trace("Called disableExternalPluggableDatabaseStackMonitoring"); + final DisableExternalPluggableDatabaseStackMonitoringRequest interceptedRequest = + DisableExternalPluggableDatabaseStackMonitoringConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DisableExternalPluggableDatabaseStackMonitoringConverter.fromRequest( client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = @@ -5593,14 +6016,14 @@ public EnableDatabaseManagementResponse enableDatabaseManagement( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "EnableExternalPluggableDatabaseStackMonitoring", + "DisableExternalPluggableDatabaseStackMonitoring", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/EnableExternalPluggableDatabaseStackMonitoring"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/DisableExternalPluggableDatabaseStackMonitoring"); java.util.function.Function< javax.ws.rs.core.Response, - EnableExternalPluggableDatabaseStackMonitoringResponse> + DisableExternalPluggableDatabaseStackMonitoringResponse> transformer = - EnableExternalPluggableDatabaseStackMonitoringConverter.fromResponse( + DisableExternalPluggableDatabaseStackMonitoringConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5612,24 +6035,20 @@ public EnableDatabaseManagementResponse enableDatabaseManagement( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post( - ib, - retriedRequest - .getEnableExternalPluggableDatabaseStackMonitoringDetails(), - retriedRequest); + client.post(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public EnablePluggableDatabaseManagementResponse enablePluggableDatabaseManagement( - EnablePluggableDatabaseManagementRequest request) { - LOG.trace("Called enablePluggableDatabaseManagement"); - final EnablePluggableDatabaseManagementRequest interceptedRequest = - EnablePluggableDatabaseManagementConverter.interceptRequest(request); + public DisablePluggableDatabaseManagementResponse disablePluggableDatabaseManagement( + DisablePluggableDatabaseManagementRequest request) { + LOG.trace("Called disablePluggableDatabaseManagement"); + final DisablePluggableDatabaseManagementRequest interceptedRequest = + DisablePluggableDatabaseManagementConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - EnablePluggableDatabaseManagementConverter.fromRequest(client, interceptedRequest); + DisablePluggableDatabaseManagementConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -5639,13 +6058,13 @@ public EnablePluggableDatabaseManagementResponse enablePluggableDatabaseManageme com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "EnablePluggableDatabaseManagement", + "DisablePluggableDatabaseManagement", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/EnablePluggableDatabaseManagement"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/DisablePluggableDatabaseManagement"); java.util.function.Function< - javax.ws.rs.core.Response, EnablePluggableDatabaseManagementResponse> + javax.ws.rs.core.Response, DisablePluggableDatabaseManagementResponse> transformer = - EnablePluggableDatabaseManagementConverter.fromResponse( + DisablePluggableDatabaseManagementConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5657,24 +6076,21 @@ public EnablePluggableDatabaseManagementResponse enablePluggableDatabaseManageme retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post( - ib, - retriedRequest - .getEnablePluggableDatabaseManagementDetails(), - retriedRequest); + client.post(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public FailOverAutonomousDatabaseResponse failOverAutonomousDatabase( - FailOverAutonomousDatabaseRequest request) { - LOG.trace("Called failOverAutonomousDatabase"); - final FailOverAutonomousDatabaseRequest interceptedRequest = - FailOverAutonomousDatabaseConverter.interceptRequest(request); + public DownloadExadataInfrastructureConfigFileResponse downloadExadataInfrastructureConfigFile( + DownloadExadataInfrastructureConfigFileRequest request) { + LOG.trace("Called downloadExadataInfrastructureConfigFile"); + final DownloadExadataInfrastructureConfigFileRequest interceptedRequest = + DownloadExadataInfrastructureConfigFileConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - FailOverAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); + DownloadExadataInfrastructureConfigFileConverter.fromRequest( + client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -5684,12 +6100,13 @@ public FailOverAutonomousDatabaseResponse failOverAutonomousDatabase( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "FailOverAutonomousDatabase", + "DownloadExadataInfrastructureConfigFile", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/FailOverAutonomousDatabase"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadataInfrastructure/DownloadExadataInfrastructureConfigFile"); + java.util.function.Function< + javax.ws.rs.core.Response, DownloadExadataInfrastructureConfigFileResponse> transformer = - FailOverAutonomousDatabaseConverter.fromResponse( + DownloadExadataInfrastructureConfigFileConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5708,33 +6125,28 @@ public FailOverAutonomousDatabaseResponse failOverAutonomousDatabase( } @Override - public FailoverAutonomousContainerDatabaseDataguardAssociationResponse - failoverAutonomousContainerDatabaseDataguardAssociation( - FailoverAutonomousContainerDatabaseDataguardAssociationRequest request) { - LOG.trace("Called failoverAutonomousContainerDatabaseDataguardAssociation"); - final FailoverAutonomousContainerDatabaseDataguardAssociationRequest interceptedRequest = - FailoverAutonomousContainerDatabaseDataguardAssociationConverter.interceptRequest( - request); + public DownloadOneoffPatchResponse downloadOneoffPatch(DownloadOneoffPatchRequest request) { + LOG.trace("Called downloadOneoffPatch"); + final DownloadOneoffPatchRequest interceptedRequest = + DownloadOneoffPatchConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - FailoverAutonomousContainerDatabaseDataguardAssociationConverter.fromRequest( - client, interceptedRequest); + DownloadOneoffPatchConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "FailoverAutonomousContainerDatabaseDataguardAssociation", + "DownloadOneoffPatch", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabaseDataguardAssociation/FailoverAutonomousContainerDatabaseDataguardAssociation"); - java.util.function.Function< - javax.ws.rs.core.Response, - FailoverAutonomousContainerDatabaseDataguardAssociationResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/OneoffPatch/DownloadOneoffPatch"); + java.util.function.Function transformer = - FailoverAutonomousContainerDatabaseDataguardAssociationConverter - .fromResponse(java.util.Optional.of(serviceDetails)); + DownloadOneoffPatchConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -5752,27 +6164,28 @@ public FailOverAutonomousDatabaseResponse failOverAutonomousDatabase( } @Override - public FailoverDataGuardAssociationResponse failoverDataGuardAssociation( - FailoverDataGuardAssociationRequest request) { - LOG.trace("Called failoverDataGuardAssociation"); - final FailoverDataGuardAssociationRequest interceptedRequest = - FailoverDataGuardAssociationConverter.interceptRequest(request); + public DownloadValidationReportResponse downloadValidationReport( + DownloadValidationReportRequest request) { + LOG.trace("Called downloadValidationReport"); + final DownloadValidationReportRequest interceptedRequest = + DownloadValidationReportConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - FailoverDataGuardAssociationConverter.fromRequest(client, interceptedRequest); + DownloadValidationReportConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "FailoverDataGuardAssociation", + "DownloadValidationReport", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DataGuardAssociation/FailoverDataGuardAssociation"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmClusterNetwork/DownloadValidationReport"); + java.util.function.Function transformer = - FailoverDataGuardAssociationConverter.fromResponse( + DownloadValidationReportConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5784,24 +6197,20 @@ public FailoverDataGuardAssociationResponse failoverDataGuardAssociation( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post( - ib, - retriedRequest - .getFailoverDataGuardAssociationDetails(), - retriedRequest); + client.post(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public GenerateAutonomousDatabaseWalletResponse generateAutonomousDatabaseWallet( - GenerateAutonomousDatabaseWalletRequest request) { - LOG.trace("Called generateAutonomousDatabaseWallet"); - final GenerateAutonomousDatabaseWalletRequest interceptedRequest = - GenerateAutonomousDatabaseWalletConverter.interceptRequest(request); + public DownloadVmClusterNetworkConfigFileResponse downloadVmClusterNetworkConfigFile( + DownloadVmClusterNetworkConfigFileRequest request) { + LOG.trace("Called downloadVmClusterNetworkConfigFile"); + final DownloadVmClusterNetworkConfigFileRequest interceptedRequest = + DownloadVmClusterNetworkConfigFileConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GenerateAutonomousDatabaseWalletConverter.fromRequest(client, interceptedRequest); + DownloadVmClusterNetworkConfigFileConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -5811,13 +6220,13 @@ public GenerateAutonomousDatabaseWalletResponse generateAutonomousDatabaseWallet com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GenerateAutonomousDatabaseWallet", + "DownloadVmClusterNetworkConfigFile", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/GenerateAutonomousDatabaseWallet"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmClusterNetwork/DownloadVmClusterNetworkConfigFile"); java.util.function.Function< - javax.ws.rs.core.Response, GenerateAutonomousDatabaseWalletResponse> + javax.ws.rs.core.Response, DownloadVmClusterNetworkConfigFileResponse> transformer = - GenerateAutonomousDatabaseWalletConverter.fromResponse( + DownloadVmClusterNetworkConfigFileConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5829,41 +6238,35 @@ public GenerateAutonomousDatabaseWalletResponse generateAutonomousDatabaseWallet retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post( - ib, - retriedRequest - .getGenerateAutonomousDatabaseWalletDetails(), - retriedRequest); + client.post(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public GenerateRecommendedVmClusterNetworkResponse generateRecommendedVmClusterNetwork( - GenerateRecommendedVmClusterNetworkRequest request) { - LOG.trace("Called generateRecommendedVmClusterNetwork"); - final GenerateRecommendedVmClusterNetworkRequest interceptedRequest = - GenerateRecommendedVmClusterNetworkConverter.interceptRequest(request); + public EnableAutonomousDatabaseManagementResponse enableAutonomousDatabaseManagement( + EnableAutonomousDatabaseManagementRequest request) { + LOG.trace("Called enableAutonomousDatabaseManagement"); + final EnableAutonomousDatabaseManagementRequest interceptedRequest = + EnableAutonomousDatabaseManagementConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GenerateRecommendedVmClusterNetworkConverter.fromRequest( - client, interceptedRequest); + EnableAutonomousDatabaseManagementConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GenerateRecommendedVmClusterNetwork", + "EnableAutonomousDatabaseManagement", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadataInfrastructure/GenerateRecommendedVmClusterNetwork"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/EnableAutonomousDatabaseManagement"); java.util.function.Function< - javax.ws.rs.core.Response, GenerateRecommendedVmClusterNetworkResponse> + javax.ws.rs.core.Response, EnableAutonomousDatabaseManagementResponse> transformer = - GenerateRecommendedVmClusterNetworkConverter.fromResponse( + EnableAutonomousDatabaseManagementConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5875,23 +6278,22 @@ public GenerateRecommendedVmClusterNetworkResponse generateRecommendedVmClusterN retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post( - ib, - retriedRequest - .getGenerateRecommendedNetworkDetails(), - retriedRequest); + client.post(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public GetApplicationVipResponse getApplicationVip(GetApplicationVipRequest request) { - LOG.trace("Called getApplicationVip"); - final GetApplicationVipRequest interceptedRequest = - GetApplicationVipConverter.interceptRequest(request); + public EnableAutonomousDatabaseOperationsInsightsResponse + enableAutonomousDatabaseOperationsInsights( + EnableAutonomousDatabaseOperationsInsightsRequest request) { + LOG.trace("Called enableAutonomousDatabaseOperationsInsights"); + final EnableAutonomousDatabaseOperationsInsightsRequest interceptedRequest = + EnableAutonomousDatabaseOperationsInsightsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetApplicationVipConverter.fromRequest(client, interceptedRequest); + EnableAutonomousDatabaseOperationsInsightsConverter.fromRequest( + client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -5900,12 +6302,14 @@ public GetApplicationVipResponse getApplicationVip(GetApplicationVipRequest requ com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetApplicationVip", + "EnableAutonomousDatabaseOperationsInsights", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ApplicationVip/GetApplicationVip"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/EnableAutonomousDatabaseOperationsInsights"); + java.util.function.Function< + javax.ws.rs.core.Response, + EnableAutonomousDatabaseOperationsInsightsResponse> transformer = - GetApplicationVipConverter.fromResponse( + EnableAutonomousDatabaseOperationsInsightsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5916,35 +6320,36 @@ public GetApplicationVipResponse getApplicationVip(GetApplicationVipRequest requ return tokenRefreshRetrier.execute( retryRequest, retriedRequest -> { - javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public GetAutonomousContainerDatabaseResponse getAutonomousContainerDatabase( - GetAutonomousContainerDatabaseRequest request) { - LOG.trace("Called getAutonomousContainerDatabase"); - final GetAutonomousContainerDatabaseRequest interceptedRequest = - GetAutonomousContainerDatabaseConverter.interceptRequest(request); + public EnableDatabaseManagementResponse enableDatabaseManagement( + EnableDatabaseManagementRequest request) { + LOG.trace("Called enableDatabaseManagement"); + final EnableDatabaseManagementRequest interceptedRequest = + EnableDatabaseManagementConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetAutonomousContainerDatabaseConverter.fromRequest(client, interceptedRequest); + EnableDatabaseManagementConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetAutonomousContainerDatabase", + "EnableDatabaseManagement", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabase/GetAutonomousContainerDatabase"); - java.util.function.Function< - javax.ws.rs.core.Response, GetAutonomousContainerDatabaseResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Database/EnableDatabaseManagement"); + java.util.function.Function transformer = - GetAutonomousContainerDatabaseConverter.fromResponse( + EnableDatabaseManagementConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -5955,24 +6360,1650 @@ public GetAutonomousContainerDatabaseResponse getAutonomousContainerDatabase( return tokenRefreshRetrier.execute( retryRequest, retriedRequest -> { - javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getEnableDatabaseManagementDetails(), + retriedRequest); return transformer.apply(response); }); }); } @Override - public GetAutonomousContainerDatabaseDataguardAssociationResponse - getAutonomousContainerDatabaseDataguardAssociation( - GetAutonomousContainerDatabaseDataguardAssociationRequest request) { - LOG.trace("Called getAutonomousContainerDatabaseDataguardAssociation"); - final GetAutonomousContainerDatabaseDataguardAssociationRequest interceptedRequest = - GetAutonomousContainerDatabaseDataguardAssociationConverter.interceptRequest( + public EnableExternalContainerDatabaseDatabaseManagementResponse + enableExternalContainerDatabaseDatabaseManagement( + EnableExternalContainerDatabaseDatabaseManagementRequest request) { + LOG.trace("Called enableExternalContainerDatabaseDatabaseManagement"); + final EnableExternalContainerDatabaseDatabaseManagementRequest interceptedRequest = + EnableExternalContainerDatabaseDatabaseManagementConverter.interceptRequest( request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetAutonomousContainerDatabaseDataguardAssociationConverter.fromRequest( + EnableExternalContainerDatabaseDatabaseManagementConverter.fromRequest( client, interceptedRequest); + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "EnableExternalContainerDatabaseDatabaseManagement", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/EnableExternalContainerDatabaseDatabaseManagement"); + java.util.function.Function< + javax.ws.rs.core.Response, + EnableExternalContainerDatabaseDatabaseManagementResponse> + transformer = + EnableExternalContainerDatabaseDatabaseManagementConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getEnableExternalContainerDatabaseDatabaseManagementDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public EnableExternalContainerDatabaseStackMonitoringResponse + enableExternalContainerDatabaseStackMonitoring( + EnableExternalContainerDatabaseStackMonitoringRequest request) { + LOG.trace("Called enableExternalContainerDatabaseStackMonitoring"); + final EnableExternalContainerDatabaseStackMonitoringRequest interceptedRequest = + EnableExternalContainerDatabaseStackMonitoringConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + EnableExternalContainerDatabaseStackMonitoringConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "EnableExternalContainerDatabaseStackMonitoring", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/EnableExternalContainerDatabaseStackMonitoring"); + java.util.function.Function< + javax.ws.rs.core.Response, + EnableExternalContainerDatabaseStackMonitoringResponse> + transformer = + EnableExternalContainerDatabaseStackMonitoringConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getEnableExternalContainerDatabaseStackMonitoringDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public EnableExternalNonContainerDatabaseDatabaseManagementResponse + enableExternalNonContainerDatabaseDatabaseManagement( + EnableExternalNonContainerDatabaseDatabaseManagementRequest request) { + LOG.trace("Called enableExternalNonContainerDatabaseDatabaseManagement"); + final EnableExternalNonContainerDatabaseDatabaseManagementRequest interceptedRequest = + EnableExternalNonContainerDatabaseDatabaseManagementConverter.interceptRequest( + request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + EnableExternalNonContainerDatabaseDatabaseManagementConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "EnableExternalNonContainerDatabaseDatabaseManagement", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/EnableExternalNonContainerDatabaseDatabaseManagement"); + java.util.function.Function< + javax.ws.rs.core.Response, + EnableExternalNonContainerDatabaseDatabaseManagementResponse> + transformer = + EnableExternalNonContainerDatabaseDatabaseManagementConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getEnableExternalNonContainerDatabaseDatabaseManagementDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public EnableExternalNonContainerDatabaseOperationsInsightsResponse + enableExternalNonContainerDatabaseOperationsInsights( + EnableExternalNonContainerDatabaseOperationsInsightsRequest request) { + LOG.trace("Called enableExternalNonContainerDatabaseOperationsInsights"); + final EnableExternalNonContainerDatabaseOperationsInsightsRequest interceptedRequest = + EnableExternalNonContainerDatabaseOperationsInsightsConverter.interceptRequest( + request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + EnableExternalNonContainerDatabaseOperationsInsightsConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "EnableExternalNonContainerDatabaseOperationsInsights", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/EnableExternalNonContainerDatabaseOperationsInsights"); + java.util.function.Function< + javax.ws.rs.core.Response, + EnableExternalNonContainerDatabaseOperationsInsightsResponse> + transformer = + EnableExternalNonContainerDatabaseOperationsInsightsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getEnableExternalNonContainerDatabaseOperationsInsightsDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public EnableExternalNonContainerDatabaseStackMonitoringResponse + enableExternalNonContainerDatabaseStackMonitoring( + EnableExternalNonContainerDatabaseStackMonitoringRequest request) { + LOG.trace("Called enableExternalNonContainerDatabaseStackMonitoring"); + final EnableExternalNonContainerDatabaseStackMonitoringRequest interceptedRequest = + EnableExternalNonContainerDatabaseStackMonitoringConverter.interceptRequest( + request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + EnableExternalNonContainerDatabaseStackMonitoringConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "EnableExternalNonContainerDatabaseStackMonitoring", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/EnableExternalNonContainerDatabaseStackMonitoring"); + java.util.function.Function< + javax.ws.rs.core.Response, + EnableExternalNonContainerDatabaseStackMonitoringResponse> + transformer = + EnableExternalNonContainerDatabaseStackMonitoringConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getEnableExternalNonContainerDatabaseStackMonitoringDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public EnableExternalPluggableDatabaseDatabaseManagementResponse + enableExternalPluggableDatabaseDatabaseManagement( + EnableExternalPluggableDatabaseDatabaseManagementRequest request) { + LOG.trace("Called enableExternalPluggableDatabaseDatabaseManagement"); + final EnableExternalPluggableDatabaseDatabaseManagementRequest interceptedRequest = + EnableExternalPluggableDatabaseDatabaseManagementConverter.interceptRequest( + request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + EnableExternalPluggableDatabaseDatabaseManagementConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "EnableExternalPluggableDatabaseDatabaseManagement", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/EnableExternalPluggableDatabaseDatabaseManagement"); + java.util.function.Function< + javax.ws.rs.core.Response, + EnableExternalPluggableDatabaseDatabaseManagementResponse> + transformer = + EnableExternalPluggableDatabaseDatabaseManagementConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getEnableExternalPluggableDatabaseDatabaseManagementDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public EnableExternalPluggableDatabaseOperationsInsightsResponse + enableExternalPluggableDatabaseOperationsInsights( + EnableExternalPluggableDatabaseOperationsInsightsRequest request) { + LOG.trace("Called enableExternalPluggableDatabaseOperationsInsights"); + final EnableExternalPluggableDatabaseOperationsInsightsRequest interceptedRequest = + EnableExternalPluggableDatabaseOperationsInsightsConverter.interceptRequest( + request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + EnableExternalPluggableDatabaseOperationsInsightsConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "EnableExternalPluggableDatabaseOperationsInsights", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/EnableExternalPluggableDatabaseOperationsInsights"); + java.util.function.Function< + javax.ws.rs.core.Response, + EnableExternalPluggableDatabaseOperationsInsightsResponse> + transformer = + EnableExternalPluggableDatabaseOperationsInsightsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getEnableExternalPluggableDatabaseOperationsInsightsDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public EnableExternalPluggableDatabaseStackMonitoringResponse + enableExternalPluggableDatabaseStackMonitoring( + EnableExternalPluggableDatabaseStackMonitoringRequest request) { + LOG.trace("Called enableExternalPluggableDatabaseStackMonitoring"); + final EnableExternalPluggableDatabaseStackMonitoringRequest interceptedRequest = + EnableExternalPluggableDatabaseStackMonitoringConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + EnableExternalPluggableDatabaseStackMonitoringConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "EnableExternalPluggableDatabaseStackMonitoring", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/EnableExternalPluggableDatabaseStackMonitoring"); + java.util.function.Function< + javax.ws.rs.core.Response, + EnableExternalPluggableDatabaseStackMonitoringResponse> + transformer = + EnableExternalPluggableDatabaseStackMonitoringConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getEnableExternalPluggableDatabaseStackMonitoringDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public EnablePluggableDatabaseManagementResponse enablePluggableDatabaseManagement( + EnablePluggableDatabaseManagementRequest request) { + LOG.trace("Called enablePluggableDatabaseManagement"); + final EnablePluggableDatabaseManagementRequest interceptedRequest = + EnablePluggableDatabaseManagementConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + EnablePluggableDatabaseManagementConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "EnablePluggableDatabaseManagement", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/EnablePluggableDatabaseManagement"); + java.util.function.Function< + javax.ws.rs.core.Response, EnablePluggableDatabaseManagementResponse> + transformer = + EnablePluggableDatabaseManagementConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getEnablePluggableDatabaseManagementDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public FailOverAutonomousDatabaseResponse failOverAutonomousDatabase( + FailOverAutonomousDatabaseRequest request) { + LOG.trace("Called failOverAutonomousDatabase"); + final FailOverAutonomousDatabaseRequest interceptedRequest = + FailOverAutonomousDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + FailOverAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "FailOverAutonomousDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/FailOverAutonomousDatabase"); + java.util.function.Function + transformer = + FailOverAutonomousDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public FailoverAutonomousContainerDatabaseDataguardAssociationResponse + failoverAutonomousContainerDatabaseDataguardAssociation( + FailoverAutonomousContainerDatabaseDataguardAssociationRequest request) { + LOG.trace("Called failoverAutonomousContainerDatabaseDataguardAssociation"); + final FailoverAutonomousContainerDatabaseDataguardAssociationRequest interceptedRequest = + FailoverAutonomousContainerDatabaseDataguardAssociationConverter.interceptRequest( + request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + FailoverAutonomousContainerDatabaseDataguardAssociationConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "FailoverAutonomousContainerDatabaseDataguardAssociation", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabaseDataguardAssociation/FailoverAutonomousContainerDatabaseDataguardAssociation"); + java.util.function.Function< + javax.ws.rs.core.Response, + FailoverAutonomousContainerDatabaseDataguardAssociationResponse> + transformer = + FailoverAutonomousContainerDatabaseDataguardAssociationConverter + .fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public FailoverDataGuardAssociationResponse failoverDataGuardAssociation( + FailoverDataGuardAssociationRequest request) { + LOG.trace("Called failoverDataGuardAssociation"); + final FailoverDataGuardAssociationRequest interceptedRequest = + FailoverDataGuardAssociationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + FailoverDataGuardAssociationConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "FailoverDataGuardAssociation", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DataGuardAssociation/FailoverDataGuardAssociation"); + java.util.function.Function + transformer = + FailoverDataGuardAssociationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getFailoverDataGuardAssociationDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GenerateAutonomousDatabaseWalletResponse generateAutonomousDatabaseWallet( + GenerateAutonomousDatabaseWalletRequest request) { + LOG.trace("Called generateAutonomousDatabaseWallet"); + final GenerateAutonomousDatabaseWalletRequest interceptedRequest = + GenerateAutonomousDatabaseWalletConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GenerateAutonomousDatabaseWalletConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GenerateAutonomousDatabaseWallet", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/GenerateAutonomousDatabaseWallet"); + java.util.function.Function< + javax.ws.rs.core.Response, GenerateAutonomousDatabaseWalletResponse> + transformer = + GenerateAutonomousDatabaseWalletConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getGenerateAutonomousDatabaseWalletDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GenerateRecommendedVmClusterNetworkResponse generateRecommendedVmClusterNetwork( + GenerateRecommendedVmClusterNetworkRequest request) { + LOG.trace("Called generateRecommendedVmClusterNetwork"); + final GenerateRecommendedVmClusterNetworkRequest interceptedRequest = + GenerateRecommendedVmClusterNetworkConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GenerateRecommendedVmClusterNetworkConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GenerateRecommendedVmClusterNetwork", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadataInfrastructure/GenerateRecommendedVmClusterNetwork"); + java.util.function.Function< + javax.ws.rs.core.Response, GenerateRecommendedVmClusterNetworkResponse> + transformer = + GenerateRecommendedVmClusterNetworkConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getGenerateRecommendedNetworkDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetApplicationVipResponse getApplicationVip(GetApplicationVipRequest request) { + LOG.trace("Called getApplicationVip"); + final GetApplicationVipRequest interceptedRequest = + GetApplicationVipConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetApplicationVipConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetApplicationVip", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ApplicationVip/GetApplicationVip"); + java.util.function.Function + transformer = + GetApplicationVipConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetAutonomousContainerDatabaseResponse getAutonomousContainerDatabase( + GetAutonomousContainerDatabaseRequest request) { + LOG.trace("Called getAutonomousContainerDatabase"); + final GetAutonomousContainerDatabaseRequest interceptedRequest = + GetAutonomousContainerDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAutonomousContainerDatabaseConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetAutonomousContainerDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabase/GetAutonomousContainerDatabase"); + java.util.function.Function< + javax.ws.rs.core.Response, GetAutonomousContainerDatabaseResponse> + transformer = + GetAutonomousContainerDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetAutonomousContainerDatabaseDataguardAssociationResponse + getAutonomousContainerDatabaseDataguardAssociation( + GetAutonomousContainerDatabaseDataguardAssociationRequest request) { + LOG.trace("Called getAutonomousContainerDatabaseDataguardAssociation"); + final GetAutonomousContainerDatabaseDataguardAssociationRequest interceptedRequest = + GetAutonomousContainerDatabaseDataguardAssociationConverter.interceptRequest( + request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAutonomousContainerDatabaseDataguardAssociationConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetAutonomousContainerDatabaseDataguardAssociation", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabaseDataguardAssociation/GetAutonomousContainerDatabaseDataguardAssociation"); + java.util.function.Function< + javax.ws.rs.core.Response, + GetAutonomousContainerDatabaseDataguardAssociationResponse> + transformer = + GetAutonomousContainerDatabaseDataguardAssociationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetAutonomousContainerDatabaseResourceUsageResponse + getAutonomousContainerDatabaseResourceUsage( + GetAutonomousContainerDatabaseResourceUsageRequest request) { + LOG.trace("Called getAutonomousContainerDatabaseResourceUsage"); + final GetAutonomousContainerDatabaseResourceUsageRequest interceptedRequest = + GetAutonomousContainerDatabaseResourceUsageConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAutonomousContainerDatabaseResourceUsageConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetAutonomousContainerDatabaseResourceUsage", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabase/GetAutonomousContainerDatabaseResourceUsage"); + java.util.function.Function< + javax.ws.rs.core.Response, + GetAutonomousContainerDatabaseResourceUsageResponse> + transformer = + GetAutonomousContainerDatabaseResourceUsageConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetAutonomousDatabaseResponse getAutonomousDatabase( + GetAutonomousDatabaseRequest request) { + LOG.trace("Called getAutonomousDatabase"); + final GetAutonomousDatabaseRequest interceptedRequest = + GetAutonomousDatabaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetAutonomousDatabase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/GetAutonomousDatabase"); + java.util.function.Function + transformer = + GetAutonomousDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetAutonomousDatabaseBackupResponse getAutonomousDatabaseBackup( + GetAutonomousDatabaseBackupRequest request) { + LOG.trace("Called getAutonomousDatabaseBackup"); + final GetAutonomousDatabaseBackupRequest interceptedRequest = + GetAutonomousDatabaseBackupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAutonomousDatabaseBackupConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetAutonomousDatabaseBackup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseBackup/GetAutonomousDatabaseBackup"); + java.util.function.Function + transformer = + GetAutonomousDatabaseBackupConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetAutonomousDatabaseDataguardAssociationResponse + getAutonomousDatabaseDataguardAssociation( + GetAutonomousDatabaseDataguardAssociationRequest request) { + LOG.trace("Called getAutonomousDatabaseDataguardAssociation"); + final GetAutonomousDatabaseDataguardAssociationRequest interceptedRequest = + GetAutonomousDatabaseDataguardAssociationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAutonomousDatabaseDataguardAssociationConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetAutonomousDatabaseDataguardAssociation", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseDataguardAssociation/GetAutonomousDatabaseDataguardAssociation"); + java.util.function.Function< + javax.ws.rs.core.Response, + GetAutonomousDatabaseDataguardAssociationResponse> + transformer = + GetAutonomousDatabaseDataguardAssociationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetAutonomousDatabaseRegionalWalletResponse getAutonomousDatabaseRegionalWallet( + GetAutonomousDatabaseRegionalWalletRequest request) { + LOG.trace("Called getAutonomousDatabaseRegionalWallet"); + final GetAutonomousDatabaseRegionalWalletRequest interceptedRequest = + GetAutonomousDatabaseRegionalWalletConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAutonomousDatabaseRegionalWalletConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetAutonomousDatabaseRegionalWallet", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseWallet/GetAutonomousDatabaseRegionalWallet"); + java.util.function.Function< + javax.ws.rs.core.Response, GetAutonomousDatabaseRegionalWalletResponse> + transformer = + GetAutonomousDatabaseRegionalWalletConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetAutonomousDatabaseSoftwareImageResponse getAutonomousDatabaseSoftwareImage( + GetAutonomousDatabaseSoftwareImageRequest request) { + LOG.trace("Called getAutonomousDatabaseSoftwareImage"); + final GetAutonomousDatabaseSoftwareImageRequest interceptedRequest = + GetAutonomousDatabaseSoftwareImageConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAutonomousDatabaseSoftwareImageConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetAutonomousDatabaseSoftwareImage", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseSoftwareImage/GetAutonomousDatabaseSoftwareImage"); + java.util.function.Function< + javax.ws.rs.core.Response, GetAutonomousDatabaseSoftwareImageResponse> + transformer = + GetAutonomousDatabaseSoftwareImageConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetAutonomousDatabaseWalletResponse getAutonomousDatabaseWallet( + GetAutonomousDatabaseWalletRequest request) { + LOG.trace("Called getAutonomousDatabaseWallet"); + final GetAutonomousDatabaseWalletRequest interceptedRequest = + GetAutonomousDatabaseWalletConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAutonomousDatabaseWalletConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetAutonomousDatabaseWallet", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseWallet/GetAutonomousDatabaseWallet"); + java.util.function.Function + transformer = + GetAutonomousDatabaseWalletConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetAutonomousExadataInfrastructureResponse getAutonomousExadataInfrastructure( + GetAutonomousExadataInfrastructureRequest request) { + LOG.trace("Called getAutonomousExadataInfrastructure"); + final GetAutonomousExadataInfrastructureRequest interceptedRequest = + GetAutonomousExadataInfrastructureConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAutonomousExadataInfrastructureConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetAutonomousExadataInfrastructure", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousExadataInfrastructure/GetAutonomousExadataInfrastructure"); + java.util.function.Function< + javax.ws.rs.core.Response, GetAutonomousExadataInfrastructureResponse> + transformer = + GetAutonomousExadataInfrastructureConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetAutonomousPatchResponse getAutonomousPatch(GetAutonomousPatchRequest request) { + LOG.trace("Called getAutonomousPatch"); + final GetAutonomousPatchRequest interceptedRequest = + GetAutonomousPatchConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAutonomousPatchConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetAutonomousPatch", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousPatch/GetAutonomousPatch"); + java.util.function.Function + transformer = + GetAutonomousPatchConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetAutonomousVirtualMachineResponse getAutonomousVirtualMachine( + GetAutonomousVirtualMachineRequest request) { + LOG.trace("Called getAutonomousVirtualMachine"); + final GetAutonomousVirtualMachineRequest interceptedRequest = + GetAutonomousVirtualMachineConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAutonomousVirtualMachineConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetAutonomousVirtualMachine", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousVirtualMachine/GetAutonomousVirtualMachine"); + java.util.function.Function + transformer = + GetAutonomousVirtualMachineConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetAutonomousVmClusterResponse getAutonomousVmCluster( + GetAutonomousVmClusterRequest request) { + LOG.trace("Called getAutonomousVmCluster"); + final GetAutonomousVmClusterRequest interceptedRequest = + GetAutonomousVmClusterConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAutonomousVmClusterConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetAutonomousVmCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousVmCluster/GetAutonomousVmCluster"); + java.util.function.Function + transformer = + GetAutonomousVmClusterConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetAutonomousVmClusterResourceUsageResponse getAutonomousVmClusterResourceUsage( + GetAutonomousVmClusterResourceUsageRequest request) { + LOG.trace("Called getAutonomousVmClusterResourceUsage"); + final GetAutonomousVmClusterResourceUsageRequest interceptedRequest = + GetAutonomousVmClusterResourceUsageConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAutonomousVmClusterResourceUsageConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetAutonomousVmClusterResourceUsage", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousVmCluster/GetAutonomousVmClusterResourceUsage"); + java.util.function.Function< + javax.ws.rs.core.Response, GetAutonomousVmClusterResourceUsageResponse> + transformer = + GetAutonomousVmClusterResourceUsageConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetBackupResponse getBackup(GetBackupRequest request) { + LOG.trace("Called getBackup"); + final GetBackupRequest interceptedRequest = GetBackupConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetBackupConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetBackup", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Backup/GetBackup"); + java.util.function.Function transformer = + GetBackupConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetBackupDestinationResponse getBackupDestination(GetBackupDestinationRequest request) { + LOG.trace("Called getBackupDestination"); + final GetBackupDestinationRequest interceptedRequest = + GetBackupDestinationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetBackupDestinationConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetBackupDestination", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/BackupDestination/GetBackupDestination"); + java.util.function.Function + transformer = + GetBackupDestinationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetCloudAutonomousVmClusterResponse getCloudAutonomousVmCluster( + GetCloudAutonomousVmClusterRequest request) { + LOG.trace("Called getCloudAutonomousVmCluster"); + final GetCloudAutonomousVmClusterRequest interceptedRequest = + GetCloudAutonomousVmClusterConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetCloudAutonomousVmClusterConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetCloudAutonomousVmCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudAutonomousVmCluster/GetCloudAutonomousVmCluster"); + java.util.function.Function + transformer = + GetCloudAutonomousVmClusterConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetCloudAutonomousVmClusterResourceUsageResponse + getCloudAutonomousVmClusterResourceUsage( + GetCloudAutonomousVmClusterResourceUsageRequest request) { + LOG.trace("Called getCloudAutonomousVmClusterResourceUsage"); + final GetCloudAutonomousVmClusterResourceUsageRequest interceptedRequest = + GetCloudAutonomousVmClusterResourceUsageConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetCloudAutonomousVmClusterResourceUsageConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetCloudAutonomousVmClusterResourceUsage", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudAutonomousVmCluster/GetCloudAutonomousVmClusterResourceUsage"); + java.util.function.Function< + javax.ws.rs.core.Response, GetCloudAutonomousVmClusterResourceUsageResponse> + transformer = + GetCloudAutonomousVmClusterResourceUsageConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetCloudExadataInfrastructureResponse getCloudExadataInfrastructure( + GetCloudExadataInfrastructureRequest request) { + LOG.trace("Called getCloudExadataInfrastructure"); + final GetCloudExadataInfrastructureRequest interceptedRequest = + GetCloudExadataInfrastructureConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetCloudExadataInfrastructureConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetCloudExadataInfrastructure", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudExadataInfrastructure/GetCloudExadataInfrastructure"); + java.util.function.Function< + javax.ws.rs.core.Response, GetCloudExadataInfrastructureResponse> + transformer = + GetCloudExadataInfrastructureConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetCloudExadataInfrastructureUnallocatedResourcesResponse + getCloudExadataInfrastructureUnallocatedResources( + GetCloudExadataInfrastructureUnallocatedResourcesRequest request) { + LOG.trace("Called getCloudExadataInfrastructureUnallocatedResources"); + final GetCloudExadataInfrastructureUnallocatedResourcesRequest interceptedRequest = + GetCloudExadataInfrastructureUnallocatedResourcesConverter.interceptRequest( + request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetCloudExadataInfrastructureUnallocatedResourcesConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetCloudExadataInfrastructureUnallocatedResources", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudExadataInfrastructureUnallocatedResources/GetCloudExadataInfrastructureUnallocatedResources"); + java.util.function.Function< + javax.ws.rs.core.Response, + GetCloudExadataInfrastructureUnallocatedResourcesResponse> + transformer = + GetCloudExadataInfrastructureUnallocatedResourcesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetCloudVmClusterResponse getCloudVmCluster(GetCloudVmClusterRequest request) { + LOG.trace("Called getCloudVmCluster"); + final GetCloudVmClusterRequest interceptedRequest = + GetCloudVmClusterConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetCloudVmClusterConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetCloudVmCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudVmCluster/GetCloudVmCluster"); + java.util.function.Function + transformer = + GetCloudVmClusterConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetCloudVmClusterIormConfigResponse getCloudVmClusterIormConfig( + GetCloudVmClusterIormConfigRequest request) { + LOG.trace("Called getCloudVmClusterIormConfig"); + final GetCloudVmClusterIormConfigRequest interceptedRequest = + GetCloudVmClusterIormConfigConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetCloudVmClusterIormConfigConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetCloudVmClusterIormConfig", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudVmCluster/GetCloudVmClusterIormConfig"); + java.util.function.Function + transformer = + GetCloudVmClusterIormConfigConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetCloudVmClusterUpdateResponse getCloudVmClusterUpdate( + GetCloudVmClusterUpdateRequest request) { + LOG.trace("Called getCloudVmClusterUpdate"); + final GetCloudVmClusterUpdateRequest interceptedRequest = + GetCloudVmClusterUpdateConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetCloudVmClusterUpdateConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetCloudVmClusterUpdate", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Update/GetCloudVmClusterUpdate"); + java.util.function.Function + transformer = + GetCloudVmClusterUpdateConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetCloudVmClusterUpdateHistoryEntryResponse getCloudVmClusterUpdateHistoryEntry( + GetCloudVmClusterUpdateHistoryEntryRequest request) { + LOG.trace("Called getCloudVmClusterUpdateHistoryEntry"); + final GetCloudVmClusterUpdateHistoryEntryRequest interceptedRequest = + GetCloudVmClusterUpdateHistoryEntryConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetCloudVmClusterUpdateHistoryEntryConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "GetCloudVmClusterUpdateHistoryEntry", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/UpdateHistoryEntry/GetCloudVmClusterUpdateHistoryEntry"); + java.util.function.Function< + javax.ws.rs.core.Response, GetCloudVmClusterUpdateHistoryEntryResponse> + transformer = + GetCloudVmClusterUpdateHistoryEntryConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetConsoleConnectionResponse getConsoleConnection(GetConsoleConnectionRequest request) { + LOG.trace("Called getConsoleConnection"); + final GetConsoleConnectionRequest interceptedRequest = + GetConsoleConnectionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetConsoleConnectionConverter.fromRequest(client, interceptedRequest); + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); @@ -5980,14 +8011,12 @@ public GetAutonomousContainerDatabaseResponse getAutonomousContainerDatabase( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetAutonomousContainerDatabaseDataguardAssociation", + "GetConsoleConnection", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabaseDataguardAssociation/GetAutonomousContainerDatabaseDataguardAssociation"); - java.util.function.Function< - javax.ws.rs.core.Response, - GetAutonomousContainerDatabaseDataguardAssociationResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ConsoleConnection/GetConsoleConnection"); + java.util.function.Function transformer = - GetAutonomousContainerDatabaseDataguardAssociationConverter.fromResponse( + GetConsoleConnectionConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -6005,15 +8034,12 @@ public GetAutonomousContainerDatabaseResponse getAutonomousContainerDatabase( } @Override - public GetAutonomousContainerDatabaseResourceUsageResponse - getAutonomousContainerDatabaseResourceUsage( - GetAutonomousContainerDatabaseResourceUsageRequest request) { - LOG.trace("Called getAutonomousContainerDatabaseResourceUsage"); - final GetAutonomousContainerDatabaseResourceUsageRequest interceptedRequest = - GetAutonomousContainerDatabaseResourceUsageConverter.interceptRequest(request); + public GetConsoleHistoryResponse getConsoleHistory(GetConsoleHistoryRequest request) { + LOG.trace("Called getConsoleHistory"); + final GetConsoleHistoryRequest interceptedRequest = + GetConsoleHistoryConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetAutonomousContainerDatabaseResourceUsageConverter.fromRequest( - client, interceptedRequest); + GetConsoleHistoryConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6022,14 +8048,12 @@ public GetAutonomousContainerDatabaseResponse getAutonomousContainerDatabase( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetAutonomousContainerDatabaseResourceUsage", + "GetConsoleHistory", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabase/GetAutonomousContainerDatabaseResourceUsage"); - java.util.function.Function< - javax.ws.rs.core.Response, - GetAutonomousContainerDatabaseResourceUsageResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ConsoleHistory/GetConsoleHistory"); + java.util.function.Function transformer = - GetAutonomousContainerDatabaseResourceUsageConverter.fromResponse( + GetConsoleHistoryConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -6047,13 +8071,13 @@ public GetAutonomousContainerDatabaseResponse getAutonomousContainerDatabase( } @Override - public GetAutonomousDatabaseResponse getAutonomousDatabase( - GetAutonomousDatabaseRequest request) { - LOG.trace("Called getAutonomousDatabase"); - final GetAutonomousDatabaseRequest interceptedRequest = - GetAutonomousDatabaseConverter.interceptRequest(request); + public GetConsoleHistoryContentResponse getConsoleHistoryContent( + GetConsoleHistoryContentRequest request) { + LOG.trace("Called getConsoleHistoryContent"); + final GetConsoleHistoryContentRequest interceptedRequest = + GetConsoleHistoryContentConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetAutonomousDatabaseConverter.fromRequest(client, interceptedRequest); + GetConsoleHistoryContentConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6062,12 +8086,12 @@ public GetAutonomousDatabaseResponse getAutonomousDatabase( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetAutonomousDatabase", + "GetConsoleHistoryContent", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/GetAutonomousDatabase"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ConsoleHistory/GetConsoleHistoryContent"); + java.util.function.Function transformer = - GetAutonomousDatabaseConverter.fromResponse( + GetConsoleHistoryContentConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -6085,13 +8109,13 @@ public GetAutonomousDatabaseResponse getAutonomousDatabase( } @Override - public GetAutonomousDatabaseBackupResponse getAutonomousDatabaseBackup( - GetAutonomousDatabaseBackupRequest request) { - LOG.trace("Called getAutonomousDatabaseBackup"); - final GetAutonomousDatabaseBackupRequest interceptedRequest = - GetAutonomousDatabaseBackupConverter.interceptRequest(request); + public GetDataGuardAssociationResponse getDataGuardAssociation( + GetDataGuardAssociationRequest request) { + LOG.trace("Called getDataGuardAssociation"); + final GetDataGuardAssociationRequest interceptedRequest = + GetDataGuardAssociationConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetAutonomousDatabaseBackupConverter.fromRequest(client, interceptedRequest); + GetDataGuardAssociationConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6100,12 +8124,12 @@ public GetAutonomousDatabaseBackupResponse getAutonomousDatabaseBackup( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetAutonomousDatabaseBackup", + "GetDataGuardAssociation", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseBackup/GetAutonomousDatabaseBackup"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DataGuardAssociation/GetDataGuardAssociation"); + java.util.function.Function transformer = - GetAutonomousDatabaseBackupConverter.fromResponse( + GetDataGuardAssociationConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -6123,15 +8147,12 @@ public GetAutonomousDatabaseBackupResponse getAutonomousDatabaseBackup( } @Override - public GetAutonomousDatabaseDataguardAssociationResponse - getAutonomousDatabaseDataguardAssociation( - GetAutonomousDatabaseDataguardAssociationRequest request) { - LOG.trace("Called getAutonomousDatabaseDataguardAssociation"); - final GetAutonomousDatabaseDataguardAssociationRequest interceptedRequest = - GetAutonomousDatabaseDataguardAssociationConverter.interceptRequest(request); + public GetDatabaseResponse getDatabase(GetDatabaseRequest request) { + LOG.trace("Called getDatabase"); + final GetDatabaseRequest interceptedRequest = + GetDatabaseConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetAutonomousDatabaseDataguardAssociationConverter.fromRequest( - client, interceptedRequest); + GetDatabaseConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6140,15 +8161,11 @@ public GetAutonomousDatabaseBackupResponse getAutonomousDatabaseBackup( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetAutonomousDatabaseDataguardAssociation", + "GetDatabase", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseDataguardAssociation/GetAutonomousDatabaseDataguardAssociation"); - java.util.function.Function< - javax.ws.rs.core.Response, - GetAutonomousDatabaseDataguardAssociationResponse> - transformer = - GetAutonomousDatabaseDataguardAssociationConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Database/GetDatabase"); + java.util.function.Function transformer = + GetDatabaseConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -6165,14 +8182,13 @@ public GetAutonomousDatabaseBackupResponse getAutonomousDatabaseBackup( } @Override - public GetAutonomousDatabaseRegionalWalletResponse getAutonomousDatabaseRegionalWallet( - GetAutonomousDatabaseRegionalWalletRequest request) { - LOG.trace("Called getAutonomousDatabaseRegionalWallet"); - final GetAutonomousDatabaseRegionalWalletRequest interceptedRequest = - GetAutonomousDatabaseRegionalWalletConverter.interceptRequest(request); + public GetDatabaseSoftwareImageResponse getDatabaseSoftwareImage( + GetDatabaseSoftwareImageRequest request) { + LOG.trace("Called getDatabaseSoftwareImage"); + final GetDatabaseSoftwareImageRequest interceptedRequest = + GetDatabaseSoftwareImageConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetAutonomousDatabaseRegionalWalletConverter.fromRequest( - client, interceptedRequest); + GetDatabaseSoftwareImageConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6181,13 +8197,12 @@ public GetAutonomousDatabaseRegionalWalletResponse getAutonomousDatabaseRegional com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetAutonomousDatabaseRegionalWallet", + "GetDatabaseSoftwareImage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseWallet/GetAutonomousDatabaseRegionalWallet"); - java.util.function.Function< - javax.ws.rs.core.Response, GetAutonomousDatabaseRegionalWalletResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DatabaseSoftwareImage/GetDatabaseSoftwareImage"); + java.util.function.Function transformer = - GetAutonomousDatabaseRegionalWalletConverter.fromResponse( + GetDatabaseSoftwareImageConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -6205,13 +8220,13 @@ public GetAutonomousDatabaseRegionalWalletResponse getAutonomousDatabaseRegional } @Override - public GetAutonomousDatabaseSoftwareImageResponse getAutonomousDatabaseSoftwareImage( - GetAutonomousDatabaseSoftwareImageRequest request) { - LOG.trace("Called getAutonomousDatabaseSoftwareImage"); - final GetAutonomousDatabaseSoftwareImageRequest interceptedRequest = - GetAutonomousDatabaseSoftwareImageConverter.interceptRequest(request); + public GetDatabaseUpgradeHistoryEntryResponse getDatabaseUpgradeHistoryEntry( + GetDatabaseUpgradeHistoryEntryRequest request) { + LOG.trace("Called getDatabaseUpgradeHistoryEntry"); + final GetDatabaseUpgradeHistoryEntryRequest interceptedRequest = + GetDatabaseUpgradeHistoryEntryConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetAutonomousDatabaseSoftwareImageConverter.fromRequest(client, interceptedRequest); + GetDatabaseUpgradeHistoryEntryConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6220,13 +8235,13 @@ public GetAutonomousDatabaseSoftwareImageResponse getAutonomousDatabaseSoftwareI com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetAutonomousDatabaseSoftwareImage", + "GetDatabaseUpgradeHistoryEntry", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseSoftwareImage/GetAutonomousDatabaseSoftwareImage"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DatabaseUpgradeHistoryEntry/GetDatabaseUpgradeHistoryEntry"); java.util.function.Function< - javax.ws.rs.core.Response, GetAutonomousDatabaseSoftwareImageResponse> + javax.ws.rs.core.Response, GetDatabaseUpgradeHistoryEntryResponse> transformer = - GetAutonomousDatabaseSoftwareImageConverter.fromResponse( + GetDatabaseUpgradeHistoryEntryConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -6244,13 +8259,11 @@ public GetAutonomousDatabaseSoftwareImageResponse getAutonomousDatabaseSoftwareI } @Override - public GetAutonomousDatabaseWalletResponse getAutonomousDatabaseWallet( - GetAutonomousDatabaseWalletRequest request) { - LOG.trace("Called getAutonomousDatabaseWallet"); - final GetAutonomousDatabaseWalletRequest interceptedRequest = - GetAutonomousDatabaseWalletConverter.interceptRequest(request); + public GetDbHomeResponse getDbHome(GetDbHomeRequest request) { + LOG.trace("Called getDbHome"); + final GetDbHomeRequest interceptedRequest = GetDbHomeConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetAutonomousDatabaseWalletConverter.fromRequest(client, interceptedRequest); + GetDbHomeConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6259,13 +8272,11 @@ public GetAutonomousDatabaseWalletResponse getAutonomousDatabaseWallet( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetAutonomousDatabaseWallet", + "GetDbHome", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseWallet/GetAutonomousDatabaseWallet"); - java.util.function.Function - transformer = - GetAutonomousDatabaseWalletConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbHome/GetDbHome"); + java.util.function.Function transformer = + GetDbHomeConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -6282,13 +8293,12 @@ public GetAutonomousDatabaseWalletResponse getAutonomousDatabaseWallet( } @Override - public GetAutonomousExadataInfrastructureResponse getAutonomousExadataInfrastructure( - GetAutonomousExadataInfrastructureRequest request) { - LOG.trace("Called getAutonomousExadataInfrastructure"); - final GetAutonomousExadataInfrastructureRequest interceptedRequest = - GetAutonomousExadataInfrastructureConverter.interceptRequest(request); + public GetDbHomePatchResponse getDbHomePatch(GetDbHomePatchRequest request) { + LOG.trace("Called getDbHomePatch"); + final GetDbHomePatchRequest interceptedRequest = + GetDbHomePatchConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetAutonomousExadataInfrastructureConverter.fromRequest(client, interceptedRequest); + GetDbHomePatchConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6297,14 +8307,11 @@ public GetAutonomousExadataInfrastructureResponse getAutonomousExadataInfrastruc com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetAutonomousExadataInfrastructure", + "GetDbHomePatch", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousExadataInfrastructure/GetAutonomousExadataInfrastructure"); - java.util.function.Function< - javax.ws.rs.core.Response, GetAutonomousExadataInfrastructureResponse> - transformer = - GetAutonomousExadataInfrastructureConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Patch/GetDbHomePatch"); + java.util.function.Function transformer = + GetDbHomePatchConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -6321,12 +8328,13 @@ public GetAutonomousExadataInfrastructureResponse getAutonomousExadataInfrastruc } @Override - public GetAutonomousPatchResponse getAutonomousPatch(GetAutonomousPatchRequest request) { - LOG.trace("Called getAutonomousPatch"); - final GetAutonomousPatchRequest interceptedRequest = - GetAutonomousPatchConverter.interceptRequest(request); + public GetDbHomePatchHistoryEntryResponse getDbHomePatchHistoryEntry( + GetDbHomePatchHistoryEntryRequest request) { + LOG.trace("Called getDbHomePatchHistoryEntry"); + final GetDbHomePatchHistoryEntryRequest interceptedRequest = + GetDbHomePatchHistoryEntryConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetAutonomousPatchConverter.fromRequest(client, interceptedRequest); + GetDbHomePatchHistoryEntryConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6335,12 +8343,12 @@ public GetAutonomousPatchResponse getAutonomousPatch(GetAutonomousPatchRequest r com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetAutonomousPatch", + "GetDbHomePatchHistoryEntry", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousPatch/GetAutonomousPatch"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/PatchHistoryEntry/GetDbHomePatchHistoryEntry"); + java.util.function.Function transformer = - GetAutonomousPatchConverter.fromResponse( + GetDbHomePatchHistoryEntryConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -6358,13 +8366,11 @@ public GetAutonomousPatchResponse getAutonomousPatch(GetAutonomousPatchRequest r } @Override - public GetAutonomousVirtualMachineResponse getAutonomousVirtualMachine( - GetAutonomousVirtualMachineRequest request) { - LOG.trace("Called getAutonomousVirtualMachine"); - final GetAutonomousVirtualMachineRequest interceptedRequest = - GetAutonomousVirtualMachineConverter.interceptRequest(request); + public GetDbNodeResponse getDbNode(GetDbNodeRequest request) { + LOG.trace("Called getDbNode"); + final GetDbNodeRequest interceptedRequest = GetDbNodeConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetAutonomousVirtualMachineConverter.fromRequest(client, interceptedRequest); + GetDbNodeConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6373,13 +8379,11 @@ public GetAutonomousVirtualMachineResponse getAutonomousVirtualMachine( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetAutonomousVirtualMachine", + "GetDbNode", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousVirtualMachine/GetAutonomousVirtualMachine"); - java.util.function.Function - transformer = - GetAutonomousVirtualMachineConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbNode/GetDbNode"); + java.util.function.Function transformer = + GetDbNodeConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -6396,13 +8400,12 @@ public GetAutonomousVirtualMachineResponse getAutonomousVirtualMachine( } @Override - public GetAutonomousVmClusterResponse getAutonomousVmCluster( - GetAutonomousVmClusterRequest request) { - LOG.trace("Called getAutonomousVmCluster"); - final GetAutonomousVmClusterRequest interceptedRequest = - GetAutonomousVmClusterConverter.interceptRequest(request); + public GetDbServerResponse getDbServer(GetDbServerRequest request) { + LOG.trace("Called getDbServer"); + final GetDbServerRequest interceptedRequest = + GetDbServerConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetAutonomousVmClusterConverter.fromRequest(client, interceptedRequest); + GetDbServerConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6411,13 +8414,11 @@ public GetAutonomousVmClusterResponse getAutonomousVmCluster( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetAutonomousVmCluster", + "GetDbServer", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousVmCluster/GetAutonomousVmCluster"); - java.util.function.Function - transformer = - GetAutonomousVmClusterConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbServer/GetDbServer"); + java.util.function.Function transformer = + GetDbServerConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -6434,14 +8435,12 @@ public GetAutonomousVmClusterResponse getAutonomousVmCluster( } @Override - public GetAutonomousVmClusterResourceUsageResponse getAutonomousVmClusterResourceUsage( - GetAutonomousVmClusterResourceUsageRequest request) { - LOG.trace("Called getAutonomousVmClusterResourceUsage"); - final GetAutonomousVmClusterResourceUsageRequest interceptedRequest = - GetAutonomousVmClusterResourceUsageConverter.interceptRequest(request); + public GetDbSystemResponse getDbSystem(GetDbSystemRequest request) { + LOG.trace("Called getDbSystem"); + final GetDbSystemRequest interceptedRequest = + GetDbSystemConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetAutonomousVmClusterResourceUsageConverter.fromRequest( - client, interceptedRequest); + GetDbSystemConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6450,14 +8449,11 @@ public GetAutonomousVmClusterResourceUsageResponse getAutonomousVmClusterResourc com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetAutonomousVmClusterResourceUsage", + "GetDbSystem", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousVmCluster/GetAutonomousVmClusterResourceUsage"); - java.util.function.Function< - javax.ws.rs.core.Response, GetAutonomousVmClusterResourceUsageResponse> - transformer = - GetAutonomousVmClusterResourceUsageConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystem/GetDbSystem"); + java.util.function.Function transformer = + GetDbSystemConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -6474,11 +8470,12 @@ public GetAutonomousVmClusterResourceUsageResponse getAutonomousVmClusterResourc } @Override - public GetBackupResponse getBackup(GetBackupRequest request) { - LOG.trace("Called getBackup"); - final GetBackupRequest interceptedRequest = GetBackupConverter.interceptRequest(request); + public GetDbSystemPatchResponse getDbSystemPatch(GetDbSystemPatchRequest request) { + LOG.trace("Called getDbSystemPatch"); + final GetDbSystemPatchRequest interceptedRequest = + GetDbSystemPatchConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetBackupConverter.fromRequest(client, interceptedRequest); + GetDbSystemPatchConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6487,11 +8484,13 @@ public GetBackupResponse getBackup(GetBackupRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetBackup", + "GetDbSystemPatch", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/Backup/GetBackup"); - java.util.function.Function transformer = - GetBackupConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Patch/GetDbSystemPatch"); + java.util.function.Function + transformer = + GetDbSystemPatchConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -6508,12 +8507,13 @@ public GetBackupResponse getBackup(GetBackupRequest request) { } @Override - public GetBackupDestinationResponse getBackupDestination(GetBackupDestinationRequest request) { - LOG.trace("Called getBackupDestination"); - final GetBackupDestinationRequest interceptedRequest = - GetBackupDestinationConverter.interceptRequest(request); + public GetDbSystemPatchHistoryEntryResponse getDbSystemPatchHistoryEntry( + GetDbSystemPatchHistoryEntryRequest request) { + LOG.trace("Called getDbSystemPatchHistoryEntry"); + final GetDbSystemPatchHistoryEntryRequest interceptedRequest = + GetDbSystemPatchHistoryEntryConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetBackupDestinationConverter.fromRequest(client, interceptedRequest); + GetDbSystemPatchHistoryEntryConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6522,12 +8522,12 @@ public GetBackupDestinationResponse getBackupDestination(GetBackupDestinationReq com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetBackupDestination", + "GetDbSystemPatchHistoryEntry", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/BackupDestination/GetBackupDestination"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/PatchHistoryEntry/GetDbSystemPatchHistoryEntry"); + java.util.function.Function transformer = - GetBackupDestinationConverter.fromResponse( + GetDbSystemPatchHistoryEntryConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -6545,13 +8545,13 @@ public GetBackupDestinationResponse getBackupDestination(GetBackupDestinationReq } @Override - public GetCloudAutonomousVmClusterResponse getCloudAutonomousVmCluster( - GetCloudAutonomousVmClusterRequest request) { - LOG.trace("Called getCloudAutonomousVmCluster"); - final GetCloudAutonomousVmClusterRequest interceptedRequest = - GetCloudAutonomousVmClusterConverter.interceptRequest(request); + public GetDbSystemUpgradeHistoryEntryResponse getDbSystemUpgradeHistoryEntry( + GetDbSystemUpgradeHistoryEntryRequest request) { + LOG.trace("Called getDbSystemUpgradeHistoryEntry"); + final GetDbSystemUpgradeHistoryEntryRequest interceptedRequest = + GetDbSystemUpgradeHistoryEntryConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetCloudAutonomousVmClusterConverter.fromRequest(client, interceptedRequest); + GetDbSystemUpgradeHistoryEntryConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6560,12 +8560,13 @@ public GetCloudAutonomousVmClusterResponse getCloudAutonomousVmCluster( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetCloudAutonomousVmCluster", + "GetDbSystemUpgradeHistoryEntry", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudAutonomousVmCluster/GetCloudAutonomousVmCluster"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystemUpgradeHistoryEntry/GetDbSystemUpgradeHistoryEntry"); + java.util.function.Function< + javax.ws.rs.core.Response, GetDbSystemUpgradeHistoryEntryResponse> transformer = - GetCloudAutonomousVmClusterConverter.fromResponse( + GetDbSystemUpgradeHistoryEntryConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -6583,15 +8584,13 @@ public GetCloudAutonomousVmClusterResponse getCloudAutonomousVmCluster( } @Override - public GetCloudAutonomousVmClusterResourceUsageResponse - getCloudAutonomousVmClusterResourceUsage( - GetCloudAutonomousVmClusterResourceUsageRequest request) { - LOG.trace("Called getCloudAutonomousVmClusterResourceUsage"); - final GetCloudAutonomousVmClusterResourceUsageRequest interceptedRequest = - GetCloudAutonomousVmClusterResourceUsageConverter.interceptRequest(request); + public GetExadataInfrastructureResponse getExadataInfrastructure( + GetExadataInfrastructureRequest request) { + LOG.trace("Called getExadataInfrastructure"); + final GetExadataInfrastructureRequest interceptedRequest = + GetExadataInfrastructureConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetCloudAutonomousVmClusterResourceUsageConverter.fromRequest( - client, interceptedRequest); + GetExadataInfrastructureConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6600,13 +8599,12 @@ public GetCloudAutonomousVmClusterResponse getCloudAutonomousVmCluster( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetCloudAutonomousVmClusterResourceUsage", + "GetExadataInfrastructure", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudAutonomousVmCluster/GetCloudAutonomousVmClusterResourceUsage"); - java.util.function.Function< - javax.ws.rs.core.Response, GetCloudAutonomousVmClusterResourceUsageResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadataInfrastructure/GetExadataInfrastructure"); + java.util.function.Function transformer = - GetCloudAutonomousVmClusterResourceUsageConverter.fromResponse( + GetExadataInfrastructureConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -6624,13 +8622,13 @@ public GetCloudAutonomousVmClusterResponse getCloudAutonomousVmCluster( } @Override - public GetCloudExadataInfrastructureResponse getCloudExadataInfrastructure( - GetCloudExadataInfrastructureRequest request) { - LOG.trace("Called getCloudExadataInfrastructure"); - final GetCloudExadataInfrastructureRequest interceptedRequest = - GetCloudExadataInfrastructureConverter.interceptRequest(request); + public GetExadataInfrastructureOcpusResponse getExadataInfrastructureOcpus( + GetExadataInfrastructureOcpusRequest request) { + LOG.trace("Called getExadataInfrastructureOcpus"); + final GetExadataInfrastructureOcpusRequest interceptedRequest = + GetExadataInfrastructureOcpusConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetCloudExadataInfrastructureConverter.fromRequest(client, interceptedRequest); + GetExadataInfrastructureOcpusConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6639,13 +8637,13 @@ public GetCloudExadataInfrastructureResponse getCloudExadataInfrastructure( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetCloudExadataInfrastructure", + "GetExadataInfrastructureOcpus", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudExadataInfrastructure/GetCloudExadataInfrastructure"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/OCPUs/GetExadataInfrastructureOcpus"); java.util.function.Function< - javax.ws.rs.core.Response, GetCloudExadataInfrastructureResponse> + javax.ws.rs.core.Response, GetExadataInfrastructureOcpusResponse> transformer = - GetCloudExadataInfrastructureConverter.fromResponse( + GetExadataInfrastructureOcpusConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -6663,15 +8661,14 @@ public GetCloudExadataInfrastructureResponse getCloudExadataInfrastructure( } @Override - public GetCloudExadataInfrastructureUnallocatedResourcesResponse - getCloudExadataInfrastructureUnallocatedResources( - GetCloudExadataInfrastructureUnallocatedResourcesRequest request) { - LOG.trace("Called getCloudExadataInfrastructureUnallocatedResources"); - final GetCloudExadataInfrastructureUnallocatedResourcesRequest interceptedRequest = - GetCloudExadataInfrastructureUnallocatedResourcesConverter.interceptRequest( - request); + public GetExadataInfrastructureUnAllocatedResourcesResponse + getExadataInfrastructureUnAllocatedResources( + GetExadataInfrastructureUnAllocatedResourcesRequest request) { + LOG.trace("Called getExadataInfrastructureUnAllocatedResources"); + final GetExadataInfrastructureUnAllocatedResourcesRequest interceptedRequest = + GetExadataInfrastructureUnAllocatedResourcesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetCloudExadataInfrastructureUnallocatedResourcesConverter.fromRequest( + GetExadataInfrastructureUnAllocatedResourcesConverter.fromRequest( client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = @@ -6681,14 +8678,14 @@ public GetCloudExadataInfrastructureResponse getCloudExadataInfrastructure( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetCloudExadataInfrastructureUnallocatedResources", + "GetExadataInfrastructureUnAllocatedResources", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudExadataInfrastructureUnallocatedResources/GetCloudExadataInfrastructureUnallocatedResources"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadataInfrastructureUnAllocatedResources/GetExadataInfrastructureUnAllocatedResources"); java.util.function.Function< javax.ws.rs.core.Response, - GetCloudExadataInfrastructureUnallocatedResourcesResponse> + GetExadataInfrastructureUnAllocatedResourcesResponse> transformer = - GetCloudExadataInfrastructureUnallocatedResourcesConverter.fromResponse( + GetExadataInfrastructureUnAllocatedResourcesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -6706,12 +8703,12 @@ public GetCloudExadataInfrastructureResponse getCloudExadataInfrastructure( } @Override - public GetCloudVmClusterResponse getCloudVmCluster(GetCloudVmClusterRequest request) { - LOG.trace("Called getCloudVmCluster"); - final GetCloudVmClusterRequest interceptedRequest = - GetCloudVmClusterConverter.interceptRequest(request); + public GetExadataIormConfigResponse getExadataIormConfig(GetExadataIormConfigRequest request) { + LOG.trace("Called getExadataIormConfig"); + final GetExadataIormConfigRequest interceptedRequest = + GetExadataIormConfigConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetCloudVmClusterConverter.fromRequest(client, interceptedRequest); + GetExadataIormConfigConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6720,12 +8717,12 @@ public GetCloudVmClusterResponse getCloudVmCluster(GetCloudVmClusterRequest requ com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetCloudVmCluster", + "GetExadataIormConfig", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudVmCluster/GetCloudVmCluster"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystem/GetExadataIormConfig"); + java.util.function.Function transformer = - GetCloudVmClusterConverter.fromResponse( + GetExadataIormConfigConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -6743,13 +8740,12 @@ public GetCloudVmClusterResponse getCloudVmCluster(GetCloudVmClusterRequest requ } @Override - public GetCloudVmClusterIormConfigResponse getCloudVmClusterIormConfig( - GetCloudVmClusterIormConfigRequest request) { - LOG.trace("Called getCloudVmClusterIormConfig"); - final GetCloudVmClusterIormConfigRequest interceptedRequest = - GetCloudVmClusterIormConfigConverter.interceptRequest(request); + public GetExadbVmClusterResponse getExadbVmCluster(GetExadbVmClusterRequest request) { + LOG.trace("Called getExadbVmCluster"); + final GetExadbVmClusterRequest interceptedRequest = + GetExadbVmClusterConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetCloudVmClusterIormConfigConverter.fromRequest(client, interceptedRequest); + GetExadbVmClusterConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6758,12 +8754,12 @@ public GetCloudVmClusterIormConfigResponse getCloudVmClusterIormConfig( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetCloudVmClusterIormConfig", + "GetExadbVmCluster", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudVmCluster/GetCloudVmClusterIormConfig"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmCluster/GetExadbVmCluster"); + java.util.function.Function transformer = - GetCloudVmClusterIormConfigConverter.fromResponse( + GetExadbVmClusterConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -6781,13 +8777,13 @@ public GetCloudVmClusterIormConfigResponse getCloudVmClusterIormConfig( } @Override - public GetCloudVmClusterUpdateResponse getCloudVmClusterUpdate( - GetCloudVmClusterUpdateRequest request) { - LOG.trace("Called getCloudVmClusterUpdate"); - final GetCloudVmClusterUpdateRequest interceptedRequest = - GetCloudVmClusterUpdateConverter.interceptRequest(request); + public GetExadbVmClusterUpdateResponse getExadbVmClusterUpdate( + GetExadbVmClusterUpdateRequest request) { + LOG.trace("Called getExadbVmClusterUpdate"); + final GetExadbVmClusterUpdateRequest interceptedRequest = + GetExadbVmClusterUpdateConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetCloudVmClusterUpdateConverter.fromRequest(client, interceptedRequest); + GetExadbVmClusterUpdateConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6796,12 +8792,12 @@ public GetCloudVmClusterUpdateResponse getCloudVmClusterUpdate( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetCloudVmClusterUpdate", + "GetExadbVmClusterUpdate", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/Update/GetCloudVmClusterUpdate"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmClusterUpdate/GetExadbVmClusterUpdate"); + java.util.function.Function transformer = - GetCloudVmClusterUpdateConverter.fromResponse( + GetExadbVmClusterUpdateConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -6819,13 +8815,13 @@ public GetCloudVmClusterUpdateResponse getCloudVmClusterUpdate( } @Override - public GetCloudVmClusterUpdateHistoryEntryResponse getCloudVmClusterUpdateHistoryEntry( - GetCloudVmClusterUpdateHistoryEntryRequest request) { - LOG.trace("Called getCloudVmClusterUpdateHistoryEntry"); - final GetCloudVmClusterUpdateHistoryEntryRequest interceptedRequest = - GetCloudVmClusterUpdateHistoryEntryConverter.interceptRequest(request); + public GetExadbVmClusterUpdateHistoryEntryResponse getExadbVmClusterUpdateHistoryEntry( + GetExadbVmClusterUpdateHistoryEntryRequest request) { + LOG.trace("Called getExadbVmClusterUpdateHistoryEntry"); + final GetExadbVmClusterUpdateHistoryEntryRequest interceptedRequest = + GetExadbVmClusterUpdateHistoryEntryConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetCloudVmClusterUpdateHistoryEntryConverter.fromRequest( + GetExadbVmClusterUpdateHistoryEntryConverter.fromRequest( client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = @@ -6835,13 +8831,13 @@ public GetCloudVmClusterUpdateHistoryEntryResponse getCloudVmClusterUpdateHistor com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetCloudVmClusterUpdateHistoryEntry", + "GetExadbVmClusterUpdateHistoryEntry", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/UpdateHistoryEntry/GetCloudVmClusterUpdateHistoryEntry"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmClusterUpdateHistoryEntry/GetExadbVmClusterUpdateHistoryEntry"); java.util.function.Function< - javax.ws.rs.core.Response, GetCloudVmClusterUpdateHistoryEntryResponse> + javax.ws.rs.core.Response, GetExadbVmClusterUpdateHistoryEntryResponse> transformer = - GetCloudVmClusterUpdateHistoryEntryConverter.fromResponse( + GetExadbVmClusterUpdateHistoryEntryConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -6859,12 +8855,13 @@ public GetCloudVmClusterUpdateHistoryEntryResponse getCloudVmClusterUpdateHistor } @Override - public GetConsoleConnectionResponse getConsoleConnection(GetConsoleConnectionRequest request) { - LOG.trace("Called getConsoleConnection"); - final GetConsoleConnectionRequest interceptedRequest = - GetConsoleConnectionConverter.interceptRequest(request); + public GetExascaleDbStorageVaultResponse getExascaleDbStorageVault( + GetExascaleDbStorageVaultRequest request) { + LOG.trace("Called getExascaleDbStorageVault"); + final GetExascaleDbStorageVaultRequest interceptedRequest = + GetExascaleDbStorageVaultConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetConsoleConnectionConverter.fromRequest(client, interceptedRequest); + GetExascaleDbStorageVaultConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6873,12 +8870,12 @@ public GetConsoleConnectionResponse getConsoleConnection(GetConsoleConnectionReq com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetConsoleConnection", + "GetExascaleDbStorageVault", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ConsoleConnection/GetConsoleConnection"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExascaleDbStorageVault/GetExascaleDbStorageVault"); + java.util.function.Function transformer = - GetConsoleConnectionConverter.fromResponse( + GetExascaleDbStorageVaultConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -6896,12 +8893,12 @@ public GetConsoleConnectionResponse getConsoleConnection(GetConsoleConnectionReq } @Override - public GetConsoleHistoryResponse getConsoleHistory(GetConsoleHistoryRequest request) { - LOG.trace("Called getConsoleHistory"); - final GetConsoleHistoryRequest interceptedRequest = - GetConsoleHistoryConverter.interceptRequest(request); + public GetExecutionActionResponse getExecutionAction(GetExecutionActionRequest request) { + LOG.trace("Called getExecutionAction"); + final GetExecutionActionRequest interceptedRequest = + GetExecutionActionConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetConsoleHistoryConverter.fromRequest(client, interceptedRequest); + GetExecutionActionConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6910,12 +8907,12 @@ public GetConsoleHistoryResponse getConsoleHistory(GetConsoleHistoryRequest requ com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetConsoleHistory", + "GetExecutionAction", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ConsoleHistory/GetConsoleHistory"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionAction/GetExecutionAction"); + java.util.function.Function transformer = - GetConsoleHistoryConverter.fromResponse( + GetExecutionActionConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -6933,13 +8930,12 @@ public GetConsoleHistoryResponse getConsoleHistory(GetConsoleHistoryRequest requ } @Override - public GetConsoleHistoryContentResponse getConsoleHistoryContent( - GetConsoleHistoryContentRequest request) { - LOG.trace("Called getConsoleHistoryContent"); - final GetConsoleHistoryContentRequest interceptedRequest = - GetConsoleHistoryContentConverter.interceptRequest(request); + public GetExecutionWindowResponse getExecutionWindow(GetExecutionWindowRequest request) { + LOG.trace("Called getExecutionWindow"); + final GetExecutionWindowRequest interceptedRequest = + GetExecutionWindowConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetConsoleHistoryContentConverter.fromRequest(client, interceptedRequest); + GetExecutionWindowConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6948,12 +8944,12 @@ public GetConsoleHistoryContentResponse getConsoleHistoryContent( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetConsoleHistoryContent", + "GetExecutionWindow", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ConsoleHistory/GetConsoleHistoryContent"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionWindow/GetExecutionWindow"); + java.util.function.Function transformer = - GetConsoleHistoryContentConverter.fromResponse( + GetExecutionWindowConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -6971,13 +8967,12 @@ public GetConsoleHistoryContentResponse getConsoleHistoryContent( } @Override - public GetDataGuardAssociationResponse getDataGuardAssociation( - GetDataGuardAssociationRequest request) { - LOG.trace("Called getDataGuardAssociation"); - final GetDataGuardAssociationRequest interceptedRequest = - GetDataGuardAssociationConverter.interceptRequest(request); + public GetExternalBackupJobResponse getExternalBackupJob(GetExternalBackupJobRequest request) { + LOG.trace("Called getExternalBackupJob"); + final GetExternalBackupJobRequest interceptedRequest = + GetExternalBackupJobConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDataGuardAssociationConverter.fromRequest(client, interceptedRequest); + GetExternalBackupJobConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -6986,12 +8981,12 @@ public GetDataGuardAssociationResponse getDataGuardAssociation( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetDataGuardAssociation", + "GetExternalBackupJob", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DataGuardAssociation/GetDataGuardAssociation"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalBackupJob/GetExternalBackupJob"); + java.util.function.Function transformer = - GetDataGuardAssociationConverter.fromResponse( + GetExternalBackupJobConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -7009,12 +9004,13 @@ public GetDataGuardAssociationResponse getDataGuardAssociation( } @Override - public GetDatabaseResponse getDatabase(GetDatabaseRequest request) { - LOG.trace("Called getDatabase"); - final GetDatabaseRequest interceptedRequest = - GetDatabaseConverter.interceptRequest(request); + public GetExternalContainerDatabaseResponse getExternalContainerDatabase( + GetExternalContainerDatabaseRequest request) { + LOG.trace("Called getExternalContainerDatabase"); + final GetExternalContainerDatabaseRequest interceptedRequest = + GetExternalContainerDatabaseConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDatabaseConverter.fromRequest(client, interceptedRequest); + GetExternalContainerDatabaseConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7023,11 +9019,13 @@ public GetDatabaseResponse getDatabase(GetDatabaseRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetDatabase", + "GetExternalContainerDatabase", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/Database/GetDatabase"); - java.util.function.Function transformer = - GetDatabaseConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/GetExternalContainerDatabase"); + java.util.function.Function + transformer = + GetExternalContainerDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -7044,13 +9042,13 @@ public GetDatabaseResponse getDatabase(GetDatabaseRequest request) { } @Override - public GetDatabaseSoftwareImageResponse getDatabaseSoftwareImage( - GetDatabaseSoftwareImageRequest request) { - LOG.trace("Called getDatabaseSoftwareImage"); - final GetDatabaseSoftwareImageRequest interceptedRequest = - GetDatabaseSoftwareImageConverter.interceptRequest(request); + public GetExternalDatabaseConnectorResponse getExternalDatabaseConnector( + GetExternalDatabaseConnectorRequest request) { + LOG.trace("Called getExternalDatabaseConnector"); + final GetExternalDatabaseConnectorRequest interceptedRequest = + GetExternalDatabaseConnectorConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDatabaseSoftwareImageConverter.fromRequest(client, interceptedRequest); + GetExternalDatabaseConnectorConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7059,12 +9057,12 @@ public GetDatabaseSoftwareImageResponse getDatabaseSoftwareImage( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetDatabaseSoftwareImage", + "GetExternalDatabaseConnector", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DatabaseSoftwareImage/GetDatabaseSoftwareImage"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalDatabaseConnector/GetExternalDatabaseConnector"); + java.util.function.Function transformer = - GetDatabaseSoftwareImageConverter.fromResponse( + GetExternalDatabaseConnectorConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -7082,13 +9080,13 @@ public GetDatabaseSoftwareImageResponse getDatabaseSoftwareImage( } @Override - public GetDatabaseUpgradeHistoryEntryResponse getDatabaseUpgradeHistoryEntry( - GetDatabaseUpgradeHistoryEntryRequest request) { - LOG.trace("Called getDatabaseUpgradeHistoryEntry"); - final GetDatabaseUpgradeHistoryEntryRequest interceptedRequest = - GetDatabaseUpgradeHistoryEntryConverter.interceptRequest(request); + public GetExternalNonContainerDatabaseResponse getExternalNonContainerDatabase( + GetExternalNonContainerDatabaseRequest request) { + LOG.trace("Called getExternalNonContainerDatabase"); + final GetExternalNonContainerDatabaseRequest interceptedRequest = + GetExternalNonContainerDatabaseConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDatabaseUpgradeHistoryEntryConverter.fromRequest(client, interceptedRequest); + GetExternalNonContainerDatabaseConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7097,13 +9095,13 @@ public GetDatabaseUpgradeHistoryEntryResponse getDatabaseUpgradeHistoryEntry( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetDatabaseUpgradeHistoryEntry", + "GetExternalNonContainerDatabase", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DatabaseUpgradeHistoryEntry/GetDatabaseUpgradeHistoryEntry"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/GetExternalNonContainerDatabase"); java.util.function.Function< - javax.ws.rs.core.Response, GetDatabaseUpgradeHistoryEntryResponse> + javax.ws.rs.core.Response, GetExternalNonContainerDatabaseResponse> transformer = - GetDatabaseUpgradeHistoryEntryConverter.fromResponse( + GetExternalNonContainerDatabaseConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -7121,11 +9119,13 @@ public GetDatabaseUpgradeHistoryEntryResponse getDatabaseUpgradeHistoryEntry( } @Override - public GetDbHomeResponse getDbHome(GetDbHomeRequest request) { - LOG.trace("Called getDbHome"); - final GetDbHomeRequest interceptedRequest = GetDbHomeConverter.interceptRequest(request); + public GetExternalPluggableDatabaseResponse getExternalPluggableDatabase( + GetExternalPluggableDatabaseRequest request) { + LOG.trace("Called getExternalPluggableDatabase"); + final GetExternalPluggableDatabaseRequest interceptedRequest = + GetExternalPluggableDatabaseConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDbHomeConverter.fromRequest(client, interceptedRequest); + GetExternalPluggableDatabaseConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7134,11 +9134,13 @@ public GetDbHomeResponse getDbHome(GetDbHomeRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetDbHome", + "GetExternalPluggableDatabase", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbHome/GetDbHome"); - java.util.function.Function transformer = - GetDbHomeConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/GetExternalPluggableDatabase"); + java.util.function.Function + transformer = + GetExternalPluggableDatabaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -7155,12 +9157,13 @@ public GetDbHomeResponse getDbHome(GetDbHomeRequest request) { } @Override - public GetDbHomePatchResponse getDbHomePatch(GetDbHomePatchRequest request) { - LOG.trace("Called getDbHomePatch"); - final GetDbHomePatchRequest interceptedRequest = - GetDbHomePatchConverter.interceptRequest(request); + public GetInfrastructureTargetVersionsResponse getInfrastructureTargetVersions( + GetInfrastructureTargetVersionsRequest request) { + LOG.trace("Called getInfrastructureTargetVersions"); + final GetInfrastructureTargetVersionsRequest interceptedRequest = + GetInfrastructureTargetVersionsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDbHomePatchConverter.fromRequest(client, interceptedRequest); + GetInfrastructureTargetVersionsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7169,11 +9172,14 @@ public GetDbHomePatchResponse getDbHomePatch(GetDbHomePatchRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetDbHomePatch", + "GetInfrastructureTargetVersions", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/Patch/GetDbHomePatch"); - java.util.function.Function transformer = - GetDbHomePatchConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/InfrastructureTargetVersion/GetInfrastructureTargetVersions"); + java.util.function.Function< + javax.ws.rs.core.Response, GetInfrastructureTargetVersionsResponse> + transformer = + GetInfrastructureTargetVersionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -7190,13 +9196,12 @@ public GetDbHomePatchResponse getDbHomePatch(GetDbHomePatchRequest request) { } @Override - public GetDbHomePatchHistoryEntryResponse getDbHomePatchHistoryEntry( - GetDbHomePatchHistoryEntryRequest request) { - LOG.trace("Called getDbHomePatchHistoryEntry"); - final GetDbHomePatchHistoryEntryRequest interceptedRequest = - GetDbHomePatchHistoryEntryConverter.interceptRequest(request); + public GetKeyStoreResponse getKeyStore(GetKeyStoreRequest request) { + LOG.trace("Called getKeyStore"); + final GetKeyStoreRequest interceptedRequest = + GetKeyStoreConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDbHomePatchHistoryEntryConverter.fromRequest(client, interceptedRequest); + GetKeyStoreConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7205,13 +9210,11 @@ public GetDbHomePatchHistoryEntryResponse getDbHomePatchHistoryEntry( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetDbHomePatchHistoryEntry", + "GetKeyStore", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/PatchHistoryEntry/GetDbHomePatchHistoryEntry"); - java.util.function.Function - transformer = - GetDbHomePatchHistoryEntryConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/KeyStore/GetKeyStore"); + java.util.function.Function transformer = + GetKeyStoreConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -7228,11 +9231,12 @@ public GetDbHomePatchHistoryEntryResponse getDbHomePatchHistoryEntry( } @Override - public GetDbNodeResponse getDbNode(GetDbNodeRequest request) { - LOG.trace("Called getDbNode"); - final GetDbNodeRequest interceptedRequest = GetDbNodeConverter.interceptRequest(request); + public GetMaintenanceRunResponse getMaintenanceRun(GetMaintenanceRunRequest request) { + LOG.trace("Called getMaintenanceRun"); + final GetMaintenanceRunRequest interceptedRequest = + GetMaintenanceRunConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDbNodeConverter.fromRequest(client, interceptedRequest); + GetMaintenanceRunConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7241,11 +9245,13 @@ public GetDbNodeResponse getDbNode(GetDbNodeRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetDbNode", + "GetMaintenanceRun", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbNode/GetDbNode"); - java.util.function.Function transformer = - GetDbNodeConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/MaintenanceRun/GetMaintenanceRun"); + java.util.function.Function + transformer = + GetMaintenanceRunConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -7262,12 +9268,13 @@ public GetDbNodeResponse getDbNode(GetDbNodeRequest request) { } @Override - public GetDbServerResponse getDbServer(GetDbServerRequest request) { - LOG.trace("Called getDbServer"); - final GetDbServerRequest interceptedRequest = - GetDbServerConverter.interceptRequest(request); + public GetMaintenanceRunHistoryResponse getMaintenanceRunHistory( + GetMaintenanceRunHistoryRequest request) { + LOG.trace("Called getMaintenanceRunHistory"); + final GetMaintenanceRunHistoryRequest interceptedRequest = + GetMaintenanceRunHistoryConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDbServerConverter.fromRequest(client, interceptedRequest); + GetMaintenanceRunHistoryConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7276,11 +9283,13 @@ public GetDbServerResponse getDbServer(GetDbServerRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetDbServer", + "GetMaintenanceRunHistory", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbServer/GetDbServer"); - java.util.function.Function transformer = - GetDbServerConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/MaintenanceRunHistory/GetMaintenanceRunHistory"); + java.util.function.Function + transformer = + GetMaintenanceRunHistoryConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -7297,12 +9306,12 @@ public GetDbServerResponse getDbServer(GetDbServerRequest request) { } @Override - public GetDbSystemResponse getDbSystem(GetDbSystemRequest request) { - LOG.trace("Called getDbSystem"); - final GetDbSystemRequest interceptedRequest = - GetDbSystemConverter.interceptRequest(request); + public GetOneoffPatchResponse getOneoffPatch(GetOneoffPatchRequest request) { + LOG.trace("Called getOneoffPatch"); + final GetOneoffPatchRequest interceptedRequest = + GetOneoffPatchConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDbSystemConverter.fromRequest(client, interceptedRequest); + GetOneoffPatchConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7311,11 +9320,11 @@ public GetDbSystemResponse getDbSystem(GetDbSystemRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetDbSystem", + "GetOneoffPatch", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystem/GetDbSystem"); - java.util.function.Function transformer = - GetDbSystemConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/OneoffPatch/GetOneoffPatch"); + java.util.function.Function transformer = + GetOneoffPatchConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -7332,12 +9341,13 @@ public GetDbSystemResponse getDbSystem(GetDbSystemRequest request) { } @Override - public GetDbSystemPatchResponse getDbSystemPatch(GetDbSystemPatchRequest request) { - LOG.trace("Called getDbSystemPatch"); - final GetDbSystemPatchRequest interceptedRequest = - GetDbSystemPatchConverter.interceptRequest(request); + public GetPdbConversionHistoryEntryResponse getPdbConversionHistoryEntry( + GetPdbConversionHistoryEntryRequest request) { + LOG.trace("Called getPdbConversionHistoryEntry"); + final GetPdbConversionHistoryEntryRequest interceptedRequest = + GetPdbConversionHistoryEntryConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDbSystemPatchConverter.fromRequest(client, interceptedRequest); + GetPdbConversionHistoryEntryConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7346,12 +9356,12 @@ public GetDbSystemPatchResponse getDbSystemPatch(GetDbSystemPatchRequest request com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetDbSystemPatch", + "GetPdbConversionHistoryEntry", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/Patch/GetDbSystemPatch"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/PdbConversionHistoryEntry/GetPdbConversionHistoryEntry"); + java.util.function.Function transformer = - GetDbSystemPatchConverter.fromResponse( + GetPdbConversionHistoryEntryConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -7369,13 +9379,12 @@ public GetDbSystemPatchResponse getDbSystemPatch(GetDbSystemPatchRequest request } @Override - public GetDbSystemPatchHistoryEntryResponse getDbSystemPatchHistoryEntry( - GetDbSystemPatchHistoryEntryRequest request) { - LOG.trace("Called getDbSystemPatchHistoryEntry"); - final GetDbSystemPatchHistoryEntryRequest interceptedRequest = - GetDbSystemPatchHistoryEntryConverter.interceptRequest(request); + public GetPluggableDatabaseResponse getPluggableDatabase(GetPluggableDatabaseRequest request) { + LOG.trace("Called getPluggableDatabase"); + final GetPluggableDatabaseRequest interceptedRequest = + GetPluggableDatabaseConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDbSystemPatchHistoryEntryConverter.fromRequest(client, interceptedRequest); + GetPluggableDatabaseConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7384,12 +9393,12 @@ public GetDbSystemPatchHistoryEntryResponse getDbSystemPatchHistoryEntry( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetDbSystemPatchHistoryEntry", + "GetPluggableDatabase", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/PatchHistoryEntry/GetDbSystemPatchHistoryEntry"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/GetPluggableDatabase"); + java.util.function.Function transformer = - GetDbSystemPatchHistoryEntryConverter.fromResponse( + GetPluggableDatabaseConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -7407,13 +9416,12 @@ public GetDbSystemPatchHistoryEntryResponse getDbSystemPatchHistoryEntry( } @Override - public GetDbSystemUpgradeHistoryEntryResponse getDbSystemUpgradeHistoryEntry( - GetDbSystemUpgradeHistoryEntryRequest request) { - LOG.trace("Called getDbSystemUpgradeHistoryEntry"); - final GetDbSystemUpgradeHistoryEntryRequest interceptedRequest = - GetDbSystemUpgradeHistoryEntryConverter.interceptRequest(request); + public GetScheduledActionResponse getScheduledAction(GetScheduledActionRequest request) { + LOG.trace("Called getScheduledAction"); + final GetScheduledActionRequest interceptedRequest = + GetScheduledActionConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDbSystemUpgradeHistoryEntryConverter.fromRequest(client, interceptedRequest); + GetScheduledActionConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7422,13 +9430,12 @@ public GetDbSystemUpgradeHistoryEntryResponse getDbSystemUpgradeHistoryEntry( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetDbSystemUpgradeHistoryEntry", + "GetScheduledAction", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystemUpgradeHistoryEntry/GetDbSystemUpgradeHistoryEntry"); - java.util.function.Function< - javax.ws.rs.core.Response, GetDbSystemUpgradeHistoryEntryResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ScheduledAction/GetScheduledAction"); + java.util.function.Function transformer = - GetDbSystemUpgradeHistoryEntryConverter.fromResponse( + GetScheduledActionConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -7446,13 +9453,12 @@ public GetDbSystemUpgradeHistoryEntryResponse getDbSystemUpgradeHistoryEntry( } @Override - public GetExadataInfrastructureResponse getExadataInfrastructure( - GetExadataInfrastructureRequest request) { - LOG.trace("Called getExadataInfrastructure"); - final GetExadataInfrastructureRequest interceptedRequest = - GetExadataInfrastructureConverter.interceptRequest(request); + public GetSchedulingPlanResponse getSchedulingPlan(GetSchedulingPlanRequest request) { + LOG.trace("Called getSchedulingPlan"); + final GetSchedulingPlanRequest interceptedRequest = + GetSchedulingPlanConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetExadataInfrastructureConverter.fromRequest(client, interceptedRequest); + GetSchedulingPlanConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7461,12 +9467,12 @@ public GetExadataInfrastructureResponse getExadataInfrastructure( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetExadataInfrastructure", + "GetSchedulingPlan", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadataInfrastructure/GetExadataInfrastructure"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPlan/GetSchedulingPlan"); + java.util.function.Function transformer = - GetExadataInfrastructureConverter.fromResponse( + GetSchedulingPlanConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -7484,13 +9490,12 @@ public GetExadataInfrastructureResponse getExadataInfrastructure( } @Override - public GetExadataInfrastructureOcpusResponse getExadataInfrastructureOcpus( - GetExadataInfrastructureOcpusRequest request) { - LOG.trace("Called getExadataInfrastructureOcpus"); - final GetExadataInfrastructureOcpusRequest interceptedRequest = - GetExadataInfrastructureOcpusConverter.interceptRequest(request); + public GetSchedulingPolicyResponse getSchedulingPolicy(GetSchedulingPolicyRequest request) { + LOG.trace("Called getSchedulingPolicy"); + final GetSchedulingPolicyRequest interceptedRequest = + GetSchedulingPolicyConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetExadataInfrastructureOcpusConverter.fromRequest(client, interceptedRequest); + GetSchedulingPolicyConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7499,13 +9504,12 @@ public GetExadataInfrastructureOcpusResponse getExadataInfrastructureOcpus( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetExadataInfrastructureOcpus", + "GetSchedulingPolicy", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/OCPUs/GetExadataInfrastructureOcpus"); - java.util.function.Function< - javax.ws.rs.core.Response, GetExadataInfrastructureOcpusResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPolicy/GetSchedulingPolicy"); + java.util.function.Function transformer = - GetExadataInfrastructureOcpusConverter.fromResponse( + GetSchedulingPolicyConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -7523,15 +9527,12 @@ public GetExadataInfrastructureOcpusResponse getExadataInfrastructureOcpus( } @Override - public GetExadataInfrastructureUnAllocatedResourcesResponse - getExadataInfrastructureUnAllocatedResources( - GetExadataInfrastructureUnAllocatedResourcesRequest request) { - LOG.trace("Called getExadataInfrastructureUnAllocatedResources"); - final GetExadataInfrastructureUnAllocatedResourcesRequest interceptedRequest = - GetExadataInfrastructureUnAllocatedResourcesConverter.interceptRequest(request); + public GetSchedulingWindowResponse getSchedulingWindow(GetSchedulingWindowRequest request) { + LOG.trace("Called getSchedulingWindow"); + final GetSchedulingWindowRequest interceptedRequest = + GetSchedulingWindowConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetExadataInfrastructureUnAllocatedResourcesConverter.fromRequest( - client, interceptedRequest); + GetSchedulingWindowConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7540,14 +9541,12 @@ public GetExadataInfrastructureOcpusResponse getExadataInfrastructureOcpus( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetExadataInfrastructureUnAllocatedResources", + "GetSchedulingWindow", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadataInfrastructureUnAllocatedResources/GetExadataInfrastructureUnAllocatedResources"); - java.util.function.Function< - javax.ws.rs.core.Response, - GetExadataInfrastructureUnAllocatedResourcesResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingWindow/GetSchedulingWindow"); + java.util.function.Function transformer = - GetExadataInfrastructureUnAllocatedResourcesConverter.fromResponse( + GetSchedulingWindowConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -7565,12 +9564,12 @@ public GetExadataInfrastructureOcpusResponse getExadataInfrastructureOcpus( } @Override - public GetExadataIormConfigResponse getExadataIormConfig(GetExadataIormConfigRequest request) { - LOG.trace("Called getExadataIormConfig"); - final GetExadataIormConfigRequest interceptedRequest = - GetExadataIormConfigConverter.interceptRequest(request); + public GetVmClusterResponse getVmCluster(GetVmClusterRequest request) { + LOG.trace("Called getVmCluster"); + final GetVmClusterRequest interceptedRequest = + GetVmClusterConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetExadataIormConfigConverter.fromRequest(client, interceptedRequest); + GetVmClusterConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7579,13 +9578,11 @@ public GetExadataIormConfigResponse getExadataIormConfig(GetExadataIormConfigReq com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetExadataIormConfig", + "GetVmCluster", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystem/GetExadataIormConfig"); - java.util.function.Function - transformer = - GetExadataIormConfigConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmCluster/GetVmCluster"); + java.util.function.Function transformer = + GetVmClusterConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -7602,12 +9599,12 @@ public GetExadataIormConfigResponse getExadataIormConfig(GetExadataIormConfigReq } @Override - public GetExternalBackupJobResponse getExternalBackupJob(GetExternalBackupJobRequest request) { - LOG.trace("Called getExternalBackupJob"); - final GetExternalBackupJobRequest interceptedRequest = - GetExternalBackupJobConverter.interceptRequest(request); + public GetVmClusterNetworkResponse getVmClusterNetwork(GetVmClusterNetworkRequest request) { + LOG.trace("Called getVmClusterNetwork"); + final GetVmClusterNetworkRequest interceptedRequest = + GetVmClusterNetworkConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetExternalBackupJobConverter.fromRequest(client, interceptedRequest); + GetVmClusterNetworkConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7616,12 +9613,12 @@ public GetExternalBackupJobResponse getExternalBackupJob(GetExternalBackupJobReq com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetExternalBackupJob", + "GetVmClusterNetwork", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalBackupJob/GetExternalBackupJob"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmClusterNetwork/GetVmClusterNetwork"); + java.util.function.Function transformer = - GetExternalBackupJobConverter.fromResponse( + GetVmClusterNetworkConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -7639,13 +9636,12 @@ public GetExternalBackupJobResponse getExternalBackupJob(GetExternalBackupJobReq } @Override - public GetExternalContainerDatabaseResponse getExternalContainerDatabase( - GetExternalContainerDatabaseRequest request) { - LOG.trace("Called getExternalContainerDatabase"); - final GetExternalContainerDatabaseRequest interceptedRequest = - GetExternalContainerDatabaseConverter.interceptRequest(request); + public GetVmClusterPatchResponse getVmClusterPatch(GetVmClusterPatchRequest request) { + LOG.trace("Called getVmClusterPatch"); + final GetVmClusterPatchRequest interceptedRequest = + GetVmClusterPatchConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetExternalContainerDatabaseConverter.fromRequest(client, interceptedRequest); + GetVmClusterPatchConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7654,12 +9650,12 @@ public GetExternalContainerDatabaseResponse getExternalContainerDatabase( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetExternalContainerDatabase", + "GetVmClusterPatch", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/GetExternalContainerDatabase"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Patch/GetVmClusterPatch"); + java.util.function.Function transformer = - GetExternalContainerDatabaseConverter.fromResponse( + GetVmClusterPatchConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -7677,13 +9673,13 @@ public GetExternalContainerDatabaseResponse getExternalContainerDatabase( } @Override - public GetExternalDatabaseConnectorResponse getExternalDatabaseConnector( - GetExternalDatabaseConnectorRequest request) { - LOG.trace("Called getExternalDatabaseConnector"); - final GetExternalDatabaseConnectorRequest interceptedRequest = - GetExternalDatabaseConnectorConverter.interceptRequest(request); + public GetVmClusterPatchHistoryEntryResponse getVmClusterPatchHistoryEntry( + GetVmClusterPatchHistoryEntryRequest request) { + LOG.trace("Called getVmClusterPatchHistoryEntry"); + final GetVmClusterPatchHistoryEntryRequest interceptedRequest = + GetVmClusterPatchHistoryEntryConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetExternalDatabaseConnectorConverter.fromRequest(client, interceptedRequest); + GetVmClusterPatchHistoryEntryConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7692,12 +9688,13 @@ public GetExternalDatabaseConnectorResponse getExternalDatabaseConnector( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetExternalDatabaseConnector", + "GetVmClusterPatchHistoryEntry", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalDatabaseConnector/GetExternalDatabaseConnector"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/PatchHistoryEntry/GetVmClusterPatchHistoryEntry"); + java.util.function.Function< + javax.ws.rs.core.Response, GetVmClusterPatchHistoryEntryResponse> transformer = - GetExternalDatabaseConnectorConverter.fromResponse( + GetVmClusterPatchHistoryEntryConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -7715,13 +9712,12 @@ public GetExternalDatabaseConnectorResponse getExternalDatabaseConnector( } @Override - public GetExternalNonContainerDatabaseResponse getExternalNonContainerDatabase( - GetExternalNonContainerDatabaseRequest request) { - LOG.trace("Called getExternalNonContainerDatabase"); - final GetExternalNonContainerDatabaseRequest interceptedRequest = - GetExternalNonContainerDatabaseConverter.interceptRequest(request); + public GetVmClusterUpdateResponse getVmClusterUpdate(GetVmClusterUpdateRequest request) { + LOG.trace("Called getVmClusterUpdate"); + final GetVmClusterUpdateRequest interceptedRequest = + GetVmClusterUpdateConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetExternalNonContainerDatabaseConverter.fromRequest(client, interceptedRequest); + GetVmClusterUpdateConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7730,13 +9726,12 @@ public GetExternalNonContainerDatabaseResponse getExternalNonContainerDatabase( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetExternalNonContainerDatabase", + "GetVmClusterUpdate", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/GetExternalNonContainerDatabase"); - java.util.function.Function< - javax.ws.rs.core.Response, GetExternalNonContainerDatabaseResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmClusterUpdate/GetVmClusterUpdate"); + java.util.function.Function transformer = - GetExternalNonContainerDatabaseConverter.fromResponse( + GetVmClusterUpdateConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -7754,13 +9749,13 @@ public GetExternalNonContainerDatabaseResponse getExternalNonContainerDatabase( } @Override - public GetExternalPluggableDatabaseResponse getExternalPluggableDatabase( - GetExternalPluggableDatabaseRequest request) { - LOG.trace("Called getExternalPluggableDatabase"); - final GetExternalPluggableDatabaseRequest interceptedRequest = - GetExternalPluggableDatabaseConverter.interceptRequest(request); + public GetVmClusterUpdateHistoryEntryResponse getVmClusterUpdateHistoryEntry( + GetVmClusterUpdateHistoryEntryRequest request) { + LOG.trace("Called getVmClusterUpdateHistoryEntry"); + final GetVmClusterUpdateHistoryEntryRequest interceptedRequest = + GetVmClusterUpdateHistoryEntryConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetExternalPluggableDatabaseConverter.fromRequest(client, interceptedRequest); + GetVmClusterUpdateHistoryEntryConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7769,12 +9764,13 @@ public GetExternalPluggableDatabaseResponse getExternalPluggableDatabase( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetExternalPluggableDatabase", + "GetVmClusterUpdateHistoryEntry", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/GetExternalPluggableDatabase"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmClusterUpdateHistoryEntry/GetVmClusterUpdateHistoryEntry"); + java.util.function.Function< + javax.ws.rs.core.Response, GetVmClusterUpdateHistoryEntryResponse> transformer = - GetExternalPluggableDatabaseConverter.fromResponse( + GetVmClusterUpdateHistoryEntryConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -7792,28 +9788,30 @@ public GetExternalPluggableDatabaseResponse getExternalPluggableDatabase( } @Override - public GetInfrastructureTargetVersionsResponse getInfrastructureTargetVersions( - GetInfrastructureTargetVersionsRequest request) { - LOG.trace("Called getInfrastructureTargetVersions"); - final GetInfrastructureTargetVersionsRequest interceptedRequest = - GetInfrastructureTargetVersionsConverter.interceptRequest(request); + public LaunchAutonomousExadataInfrastructureResponse launchAutonomousExadataInfrastructure( + LaunchAutonomousExadataInfrastructureRequest request) { + LOG.trace("Called launchAutonomousExadataInfrastructure"); + final LaunchAutonomousExadataInfrastructureRequest interceptedRequest = + LaunchAutonomousExadataInfrastructureConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetInfrastructureTargetVersionsConverter.fromRequest(client, interceptedRequest); + LaunchAutonomousExadataInfrastructureConverter.fromRequest( + client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetInfrastructureTargetVersions", + "LaunchAutonomousExadataInfrastructure", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/InfrastructureTargetVersion/GetInfrastructureTargetVersions"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousExadataInfrastructure/LaunchAutonomousExadataInfrastructure"); java.util.function.Function< - javax.ws.rs.core.Response, GetInfrastructureTargetVersionsResponse> + javax.ws.rs.core.Response, LaunchAutonomousExadataInfrastructureResponse> transformer = - GetInfrastructureTargetVersionsConverter.fromResponse( + LaunchAutonomousExadataInfrastructureConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -7824,32 +9822,38 @@ public GetInfrastructureTargetVersionsResponse getInfrastructureTargetVersions( return tokenRefreshRetrier.execute( retryRequest, retriedRequest -> { - javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getLaunchAutonomousExadataInfrastructureDetails(), + retriedRequest); return transformer.apply(response); }); }); } @Override - public GetKeyStoreResponse getKeyStore(GetKeyStoreRequest request) { - LOG.trace("Called getKeyStore"); - final GetKeyStoreRequest interceptedRequest = - GetKeyStoreConverter.interceptRequest(request); + public LaunchDbSystemResponse launchDbSystem(LaunchDbSystemRequest request) { + LOG.trace("Called launchDbSystem"); + final LaunchDbSystemRequest interceptedRequest = + LaunchDbSystemConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetKeyStoreConverter.fromRequest(client, interceptedRequest); + LaunchDbSystemConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetKeyStore", + "LaunchDbSystem", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/KeyStore/GetKeyStore"); - java.util.function.Function transformer = - GetKeyStoreConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystem/LaunchDbSystem"); + java.util.function.Function transformer = + LaunchDbSystemConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -7859,19 +9863,23 @@ public GetKeyStoreResponse getKeyStore(GetKeyStoreRequest request) { return tokenRefreshRetrier.execute( retryRequest, retriedRequest -> { - javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getLaunchDbSystemDetails(), + retriedRequest); return transformer.apply(response); }); }); } @Override - public GetMaintenanceRunResponse getMaintenanceRun(GetMaintenanceRunRequest request) { - LOG.trace("Called getMaintenanceRun"); - final GetMaintenanceRunRequest interceptedRequest = - GetMaintenanceRunConverter.interceptRequest(request); + public ListApplicationVipsResponse listApplicationVips(ListApplicationVipsRequest request) { + LOG.trace("Called listApplicationVips"); + final ListApplicationVipsRequest interceptedRequest = + ListApplicationVipsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetMaintenanceRunConverter.fromRequest(client, interceptedRequest); + ListApplicationVipsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7880,12 +9888,12 @@ public GetMaintenanceRunResponse getMaintenanceRun(GetMaintenanceRunRequest requ com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetMaintenanceRun", + "ListApplicationVips", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/MaintenanceRun/GetMaintenanceRun"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ApplicationVipSummary/ListApplicationVips"); + java.util.function.Function transformer = - GetMaintenanceRunConverter.fromResponse( + ListApplicationVipsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -7903,13 +9911,16 @@ public GetMaintenanceRunResponse getMaintenanceRun(GetMaintenanceRunRequest requ } @Override - public GetMaintenanceRunHistoryResponse getMaintenanceRunHistory( - GetMaintenanceRunHistoryRequest request) { - LOG.trace("Called getMaintenanceRunHistory"); - final GetMaintenanceRunHistoryRequest interceptedRequest = - GetMaintenanceRunHistoryConverter.interceptRequest(request); + public ListAutonomousContainerDatabaseDataguardAssociationsResponse + listAutonomousContainerDatabaseDataguardAssociations( + ListAutonomousContainerDatabaseDataguardAssociationsRequest request) { + LOG.trace("Called listAutonomousContainerDatabaseDataguardAssociations"); + final ListAutonomousContainerDatabaseDataguardAssociationsRequest interceptedRequest = + ListAutonomousContainerDatabaseDataguardAssociationsConverter.interceptRequest( + request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetMaintenanceRunHistoryConverter.fromRequest(client, interceptedRequest); + ListAutonomousContainerDatabaseDataguardAssociationsConverter.fromRequest( + client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7918,12 +9929,14 @@ public GetMaintenanceRunHistoryResponse getMaintenanceRunHistory( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetMaintenanceRunHistory", + "ListAutonomousContainerDatabaseDataguardAssociations", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/MaintenanceRunHistory/GetMaintenanceRunHistory"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabaseDataguardAssociation/ListAutonomousContainerDatabaseDataguardAssociations"); + java.util.function.Function< + javax.ws.rs.core.Response, + ListAutonomousContainerDatabaseDataguardAssociationsResponse> transformer = - GetMaintenanceRunHistoryConverter.fromResponse( + ListAutonomousContainerDatabaseDataguardAssociationsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -7941,12 +9954,14 @@ public GetMaintenanceRunHistoryResponse getMaintenanceRunHistory( } @Override - public GetOneoffPatchResponse getOneoffPatch(GetOneoffPatchRequest request) { - LOG.trace("Called getOneoffPatch"); - final GetOneoffPatchRequest interceptedRequest = - GetOneoffPatchConverter.interceptRequest(request); + public ListAutonomousContainerDatabaseVersionsResponse listAutonomousContainerDatabaseVersions( + ListAutonomousContainerDatabaseVersionsRequest request) { + LOG.trace("Called listAutonomousContainerDatabaseVersions"); + final ListAutonomousContainerDatabaseVersionsRequest interceptedRequest = + ListAutonomousContainerDatabaseVersionsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetOneoffPatchConverter.fromRequest(client, interceptedRequest); + ListAutonomousContainerDatabaseVersionsConverter.fromRequest( + client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7955,11 +9970,14 @@ public GetOneoffPatchResponse getOneoffPatch(GetOneoffPatchRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetOneoffPatch", + "ListAutonomousContainerDatabaseVersions", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/OneoffPatch/GetOneoffPatch"); - java.util.function.Function transformer = - GetOneoffPatchConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabaseVersionSummary/ListAutonomousContainerDatabaseVersions"); + java.util.function.Function< + javax.ws.rs.core.Response, ListAutonomousContainerDatabaseVersionsResponse> + transformer = + ListAutonomousContainerDatabaseVersionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -7976,13 +9994,13 @@ public GetOneoffPatchResponse getOneoffPatch(GetOneoffPatchRequest request) { } @Override - public GetPdbConversionHistoryEntryResponse getPdbConversionHistoryEntry( - GetPdbConversionHistoryEntryRequest request) { - LOG.trace("Called getPdbConversionHistoryEntry"); - final GetPdbConversionHistoryEntryRequest interceptedRequest = - GetPdbConversionHistoryEntryConverter.interceptRequest(request); + public ListAutonomousContainerDatabasesResponse listAutonomousContainerDatabases( + ListAutonomousContainerDatabasesRequest request) { + LOG.trace("Called listAutonomousContainerDatabases"); + final ListAutonomousContainerDatabasesRequest interceptedRequest = + ListAutonomousContainerDatabasesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetPdbConversionHistoryEntryConverter.fromRequest(client, interceptedRequest); + ListAutonomousContainerDatabasesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -7991,12 +10009,13 @@ public GetPdbConversionHistoryEntryResponse getPdbConversionHistoryEntry( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetPdbConversionHistoryEntry", + "ListAutonomousContainerDatabases", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/PdbConversionHistoryEntry/GetPdbConversionHistoryEntry"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabase/ListAutonomousContainerDatabases"); + java.util.function.Function< + javax.ws.rs.core.Response, ListAutonomousContainerDatabasesResponse> transformer = - GetPdbConversionHistoryEntryConverter.fromResponse( + ListAutonomousContainerDatabasesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8014,12 +10033,13 @@ public GetPdbConversionHistoryEntryResponse getPdbConversionHistoryEntry( } @Override - public GetPluggableDatabaseResponse getPluggableDatabase(GetPluggableDatabaseRequest request) { - LOG.trace("Called getPluggableDatabase"); - final GetPluggableDatabaseRequest interceptedRequest = - GetPluggableDatabaseConverter.interceptRequest(request); + public ListAutonomousDatabaseBackupsResponse listAutonomousDatabaseBackups( + ListAutonomousDatabaseBackupsRequest request) { + LOG.trace("Called listAutonomousDatabaseBackups"); + final ListAutonomousDatabaseBackupsRequest interceptedRequest = + ListAutonomousDatabaseBackupsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetPluggableDatabaseConverter.fromRequest(client, interceptedRequest); + ListAutonomousDatabaseBackupsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8028,12 +10048,13 @@ public GetPluggableDatabaseResponse getPluggableDatabase(GetPluggableDatabaseReq com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetPluggableDatabase", + "ListAutonomousDatabaseBackups", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/GetPluggableDatabase"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseBackup/ListAutonomousDatabaseBackups"); + java.util.function.Function< + javax.ws.rs.core.Response, ListAutonomousDatabaseBackupsResponse> transformer = - GetPluggableDatabaseConverter.fromResponse( + ListAutonomousDatabaseBackupsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8051,12 +10072,14 @@ public GetPluggableDatabaseResponse getPluggableDatabase(GetPluggableDatabaseReq } @Override - public GetVmClusterResponse getVmCluster(GetVmClusterRequest request) { - LOG.trace("Called getVmCluster"); - final GetVmClusterRequest interceptedRequest = - GetVmClusterConverter.interceptRequest(request); + public ListAutonomousDatabaseCharacterSetsResponse listAutonomousDatabaseCharacterSets( + ListAutonomousDatabaseCharacterSetsRequest request) { + LOG.trace("Called listAutonomousDatabaseCharacterSets"); + final ListAutonomousDatabaseCharacterSetsRequest interceptedRequest = + ListAutonomousDatabaseCharacterSetsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetVmClusterConverter.fromRequest(client, interceptedRequest); + ListAutonomousDatabaseCharacterSetsConverter.fromRequest( + client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8065,11 +10088,14 @@ public GetVmClusterResponse getVmCluster(GetVmClusterRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetVmCluster", + "ListAutonomousDatabaseCharacterSets", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmCluster/GetVmCluster"); - java.util.function.Function transformer = - GetVmClusterConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseCharacterSets/ListAutonomousDatabaseCharacterSets"); + java.util.function.Function< + javax.ws.rs.core.Response, ListAutonomousDatabaseCharacterSetsResponse> + transformer = + ListAutonomousDatabaseCharacterSetsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -8086,12 +10112,13 @@ public GetVmClusterResponse getVmCluster(GetVmClusterRequest request) { } @Override - public GetVmClusterNetworkResponse getVmClusterNetwork(GetVmClusterNetworkRequest request) { - LOG.trace("Called getVmClusterNetwork"); - final GetVmClusterNetworkRequest interceptedRequest = - GetVmClusterNetworkConverter.interceptRequest(request); + public ListAutonomousDatabaseClonesResponse listAutonomousDatabaseClones( + ListAutonomousDatabaseClonesRequest request) { + LOG.trace("Called listAutonomousDatabaseClones"); + final ListAutonomousDatabaseClonesRequest interceptedRequest = + ListAutonomousDatabaseClonesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetVmClusterNetworkConverter.fromRequest(client, interceptedRequest); + ListAutonomousDatabaseClonesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8100,12 +10127,12 @@ public GetVmClusterNetworkResponse getVmClusterNetwork(GetVmClusterNetworkReques com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetVmClusterNetwork", + "ListAutonomousDatabaseClones", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmClusterNetwork/GetVmClusterNetwork"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/ListAutonomousDatabaseClones"); + java.util.function.Function transformer = - GetVmClusterNetworkConverter.fromResponse( + ListAutonomousDatabaseClonesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8123,12 +10150,15 @@ public GetVmClusterNetworkResponse getVmClusterNetwork(GetVmClusterNetworkReques } @Override - public GetVmClusterPatchResponse getVmClusterPatch(GetVmClusterPatchRequest request) { - LOG.trace("Called getVmClusterPatch"); - final GetVmClusterPatchRequest interceptedRequest = - GetVmClusterPatchConverter.interceptRequest(request); + public ListAutonomousDatabaseDataguardAssociationsResponse + listAutonomousDatabaseDataguardAssociations( + ListAutonomousDatabaseDataguardAssociationsRequest request) { + LOG.trace("Called listAutonomousDatabaseDataguardAssociations"); + final ListAutonomousDatabaseDataguardAssociationsRequest interceptedRequest = + ListAutonomousDatabaseDataguardAssociationsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetVmClusterPatchConverter.fromRequest(client, interceptedRequest); + ListAutonomousDatabaseDataguardAssociationsConverter.fromRequest( + client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8137,12 +10167,14 @@ public GetVmClusterPatchResponse getVmClusterPatch(GetVmClusterPatchRequest requ com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetVmClusterPatch", + "ListAutonomousDatabaseDataguardAssociations", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/Patch/GetVmClusterPatch"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseDataguardAssociation/ListAutonomousDatabaseDataguardAssociations"); + java.util.function.Function< + javax.ws.rs.core.Response, + ListAutonomousDatabaseDataguardAssociationsResponse> transformer = - GetVmClusterPatchConverter.fromResponse( + ListAutonomousDatabaseDataguardAssociationsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8160,13 +10192,13 @@ public GetVmClusterPatchResponse getVmClusterPatch(GetVmClusterPatchRequest requ } @Override - public GetVmClusterPatchHistoryEntryResponse getVmClusterPatchHistoryEntry( - GetVmClusterPatchHistoryEntryRequest request) { - LOG.trace("Called getVmClusterPatchHistoryEntry"); - final GetVmClusterPatchHistoryEntryRequest interceptedRequest = - GetVmClusterPatchHistoryEntryConverter.interceptRequest(request); + public ListAutonomousDatabasePeersResponse listAutonomousDatabasePeers( + ListAutonomousDatabasePeersRequest request) { + LOG.trace("Called listAutonomousDatabasePeers"); + final ListAutonomousDatabasePeersRequest interceptedRequest = + ListAutonomousDatabasePeersConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetVmClusterPatchHistoryEntryConverter.fromRequest(client, interceptedRequest); + ListAutonomousDatabasePeersConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8175,13 +10207,12 @@ public GetVmClusterPatchHistoryEntryResponse getVmClusterPatchHistoryEntry( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetVmClusterPatchHistoryEntry", + "ListAutonomousDatabasePeers", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/PatchHistoryEntry/GetVmClusterPatchHistoryEntry"); - java.util.function.Function< - javax.ws.rs.core.Response, GetVmClusterPatchHistoryEntryResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/ListAutonomousDatabasePeers"); + java.util.function.Function transformer = - GetVmClusterPatchHistoryEntryConverter.fromResponse( + ListAutonomousDatabasePeersConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8199,12 +10230,14 @@ public GetVmClusterPatchHistoryEntryResponse getVmClusterPatchHistoryEntry( } @Override - public GetVmClusterUpdateResponse getVmClusterUpdate(GetVmClusterUpdateRequest request) { - LOG.trace("Called getVmClusterUpdate"); - final GetVmClusterUpdateRequest interceptedRequest = - GetVmClusterUpdateConverter.interceptRequest(request); + public ListAutonomousDatabaseRefreshableClonesResponse listAutonomousDatabaseRefreshableClones( + ListAutonomousDatabaseRefreshableClonesRequest request) { + LOG.trace("Called listAutonomousDatabaseRefreshableClones"); + final ListAutonomousDatabaseRefreshableClonesRequest interceptedRequest = + ListAutonomousDatabaseRefreshableClonesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetVmClusterUpdateConverter.fromRequest(client, interceptedRequest); + ListAutonomousDatabaseRefreshableClonesConverter.fromRequest( + client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8213,12 +10246,13 @@ public GetVmClusterUpdateResponse getVmClusterUpdate(GetVmClusterUpdateRequest r com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetVmClusterUpdate", + "ListAutonomousDatabaseRefreshableClones", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmClusterUpdate/GetVmClusterUpdate"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/ListAutonomousDatabaseRefreshableClones"); + java.util.function.Function< + javax.ws.rs.core.Response, ListAutonomousDatabaseRefreshableClonesResponse> transformer = - GetVmClusterUpdateConverter.fromResponse( + ListAutonomousDatabaseRefreshableClonesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8236,13 +10270,14 @@ public GetVmClusterUpdateResponse getVmClusterUpdate(GetVmClusterUpdateRequest r } @Override - public GetVmClusterUpdateHistoryEntryResponse getVmClusterUpdateHistoryEntry( - GetVmClusterUpdateHistoryEntryRequest request) { - LOG.trace("Called getVmClusterUpdateHistoryEntry"); - final GetVmClusterUpdateHistoryEntryRequest interceptedRequest = - GetVmClusterUpdateHistoryEntryConverter.interceptRequest(request); + public ListAutonomousDatabaseSoftwareImagesResponse listAutonomousDatabaseSoftwareImages( + ListAutonomousDatabaseSoftwareImagesRequest request) { + LOG.trace("Called listAutonomousDatabaseSoftwareImages"); + final ListAutonomousDatabaseSoftwareImagesRequest interceptedRequest = + ListAutonomousDatabaseSoftwareImagesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetVmClusterUpdateHistoryEntryConverter.fromRequest(client, interceptedRequest); + ListAutonomousDatabaseSoftwareImagesConverter.fromRequest( + client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8251,13 +10286,13 @@ public GetVmClusterUpdateHistoryEntryResponse getVmClusterUpdateHistoryEntry( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "GetVmClusterUpdateHistoryEntry", + "ListAutonomousDatabaseSoftwareImages", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/VmClusterUpdateHistoryEntry/GetVmClusterUpdateHistoryEntry"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseSoftwareImage/ListAutonomousDatabaseSoftwareImages"); java.util.function.Function< - javax.ws.rs.core.Response, GetVmClusterUpdateHistoryEntryResponse> + javax.ws.rs.core.Response, ListAutonomousDatabaseSoftwareImagesResponse> transformer = - GetVmClusterUpdateHistoryEntryConverter.fromResponse( + ListAutonomousDatabaseSoftwareImagesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8275,30 +10310,27 @@ public GetVmClusterUpdateHistoryEntryResponse getVmClusterUpdateHistoryEntry( } @Override - public LaunchAutonomousExadataInfrastructureResponse launchAutonomousExadataInfrastructure( - LaunchAutonomousExadataInfrastructureRequest request) { - LOG.trace("Called launchAutonomousExadataInfrastructure"); - final LaunchAutonomousExadataInfrastructureRequest interceptedRequest = - LaunchAutonomousExadataInfrastructureConverter.interceptRequest(request); + public ListAutonomousDatabasesResponse listAutonomousDatabases( + ListAutonomousDatabasesRequest request) { + LOG.trace("Called listAutonomousDatabases"); + final ListAutonomousDatabasesRequest interceptedRequest = + ListAutonomousDatabasesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - LaunchAutonomousExadataInfrastructureConverter.fromRequest( - client, interceptedRequest); + ListAutonomousDatabasesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "LaunchAutonomousExadataInfrastructure", + "ListAutonomousDatabases", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousExadataInfrastructure/LaunchAutonomousExadataInfrastructure"); - java.util.function.Function< - javax.ws.rs.core.Response, LaunchAutonomousExadataInfrastructureResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/ListAutonomousDatabases"); + java.util.function.Function transformer = - LaunchAutonomousExadataInfrastructureConverter.fromResponse( + ListAutonomousDatabasesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8309,38 +10341,36 @@ public LaunchAutonomousExadataInfrastructureResponse launchAutonomousExadataInfr return tokenRefreshRetrier.execute( retryRequest, retriedRequest -> { - javax.ws.rs.core.Response response = - client.post( - ib, - retriedRequest - .getLaunchAutonomousExadataInfrastructureDetails(), - retriedRequest); + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public LaunchDbSystemResponse launchDbSystem(LaunchDbSystemRequest request) { - LOG.trace("Called launchDbSystem"); - final LaunchDbSystemRequest interceptedRequest = - LaunchDbSystemConverter.interceptRequest(request); + public ListAutonomousDbPreviewVersionsResponse listAutonomousDbPreviewVersions( + ListAutonomousDbPreviewVersionsRequest request) { + LOG.trace("Called listAutonomousDbPreviewVersions"); + final ListAutonomousDbPreviewVersionsRequest interceptedRequest = + ListAutonomousDbPreviewVersionsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - LaunchDbSystemConverter.fromRequest(client, interceptedRequest); + ListAutonomousDbPreviewVersionsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "LaunchDbSystem", + "ListAutonomousDbPreviewVersions", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystem/LaunchDbSystem"); - java.util.function.Function transformer = - LaunchDbSystemConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDbPreviewVersionSummary/ListAutonomousDbPreviewVersions"); + java.util.function.Function< + javax.ws.rs.core.Response, ListAutonomousDbPreviewVersionsResponse> + transformer = + ListAutonomousDbPreviewVersionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -8350,23 +10380,20 @@ public LaunchDbSystemResponse launchDbSystem(LaunchDbSystemRequest request) { return tokenRefreshRetrier.execute( retryRequest, retriedRequest -> { - javax.ws.rs.core.Response response = - client.post( - ib, - retriedRequest.getLaunchDbSystemDetails(), - retriedRequest); + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public ListApplicationVipsResponse listApplicationVips(ListApplicationVipsRequest request) { - LOG.trace("Called listApplicationVips"); - final ListApplicationVipsRequest interceptedRequest = - ListApplicationVipsConverter.interceptRequest(request); + public ListAutonomousDbVersionsResponse listAutonomousDbVersions( + ListAutonomousDbVersionsRequest request) { + LOG.trace("Called listAutonomousDbVersions"); + final ListAutonomousDbVersionsRequest interceptedRequest = + ListAutonomousDbVersionsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListApplicationVipsConverter.fromRequest(client, interceptedRequest); + ListAutonomousDbVersionsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8375,12 +10402,12 @@ public ListApplicationVipsResponse listApplicationVips(ListApplicationVipsReques com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListApplicationVips", + "ListAutonomousDbVersions", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ApplicationVipSummary/ListApplicationVips"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDbVersionSummary/ListAutonomousDbVersions"); + java.util.function.Function transformer = - ListApplicationVipsConverter.fromResponse( + ListAutonomousDbVersionsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8398,15 +10425,14 @@ public ListApplicationVipsResponse listApplicationVips(ListApplicationVipsReques } @Override - public ListAutonomousContainerDatabaseDataguardAssociationsResponse - listAutonomousContainerDatabaseDataguardAssociations( - ListAutonomousContainerDatabaseDataguardAssociationsRequest request) { - LOG.trace("Called listAutonomousContainerDatabaseDataguardAssociations"); - final ListAutonomousContainerDatabaseDataguardAssociationsRequest interceptedRequest = - ListAutonomousContainerDatabaseDataguardAssociationsConverter.interceptRequest( - request); + public ListAutonomousExadataInfrastructureShapesResponse + listAutonomousExadataInfrastructureShapes( + ListAutonomousExadataInfrastructureShapesRequest request) { + LOG.trace("Called listAutonomousExadataInfrastructureShapes"); + final ListAutonomousExadataInfrastructureShapesRequest interceptedRequest = + ListAutonomousExadataInfrastructureShapesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAutonomousContainerDatabaseDataguardAssociationsConverter.fromRequest( + ListAutonomousExadataInfrastructureShapesConverter.fromRequest( client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = @@ -8416,14 +10442,14 @@ public ListApplicationVipsResponse listApplicationVips(ListApplicationVipsReques com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListAutonomousContainerDatabaseDataguardAssociations", + "ListAutonomousExadataInfrastructureShapes", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabaseDataguardAssociation/ListAutonomousContainerDatabaseDataguardAssociations"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousExadataInfrastructureShapeSummary/ListAutonomousExadataInfrastructureShapes"); java.util.function.Function< javax.ws.rs.core.Response, - ListAutonomousContainerDatabaseDataguardAssociationsResponse> + ListAutonomousExadataInfrastructureShapesResponse> transformer = - ListAutonomousContainerDatabaseDataguardAssociationsConverter.fromResponse( + ListAutonomousExadataInfrastructureShapesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8441,13 +10467,13 @@ public ListApplicationVipsResponse listApplicationVips(ListApplicationVipsReques } @Override - public ListAutonomousContainerDatabaseVersionsResponse listAutonomousContainerDatabaseVersions( - ListAutonomousContainerDatabaseVersionsRequest request) { - LOG.trace("Called listAutonomousContainerDatabaseVersions"); - final ListAutonomousContainerDatabaseVersionsRequest interceptedRequest = - ListAutonomousContainerDatabaseVersionsConverter.interceptRequest(request); + public ListAutonomousExadataInfrastructuresResponse listAutonomousExadataInfrastructures( + ListAutonomousExadataInfrastructuresRequest request) { + LOG.trace("Called listAutonomousExadataInfrastructures"); + final ListAutonomousExadataInfrastructuresRequest interceptedRequest = + ListAutonomousExadataInfrastructuresConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAutonomousContainerDatabaseVersionsConverter.fromRequest( + ListAutonomousExadataInfrastructuresConverter.fromRequest( client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = @@ -8457,13 +10483,13 @@ public ListAutonomousContainerDatabaseVersionsResponse listAutonomousContainerDa com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListAutonomousContainerDatabaseVersions", + "ListAutonomousExadataInfrastructures", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabaseVersionSummary/ListAutonomousContainerDatabaseVersions"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousExadataInfrastructure/ListAutonomousExadataInfrastructures"); java.util.function.Function< - javax.ws.rs.core.Response, ListAutonomousContainerDatabaseVersionsResponse> + javax.ws.rs.core.Response, ListAutonomousExadataInfrastructuresResponse> transformer = - ListAutonomousContainerDatabaseVersionsConverter.fromResponse( + ListAutonomousExadataInfrastructuresConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8481,13 +10507,13 @@ public ListAutonomousContainerDatabaseVersionsResponse listAutonomousContainerDa } @Override - public ListAutonomousContainerDatabasesResponse listAutonomousContainerDatabases( - ListAutonomousContainerDatabasesRequest request) { - LOG.trace("Called listAutonomousContainerDatabases"); - final ListAutonomousContainerDatabasesRequest interceptedRequest = - ListAutonomousContainerDatabasesConverter.interceptRequest(request); + public ListAutonomousVirtualMachinesResponse listAutonomousVirtualMachines( + ListAutonomousVirtualMachinesRequest request) { + LOG.trace("Called listAutonomousVirtualMachines"); + final ListAutonomousVirtualMachinesRequest interceptedRequest = + ListAutonomousVirtualMachinesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAutonomousContainerDatabasesConverter.fromRequest(client, interceptedRequest); + ListAutonomousVirtualMachinesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8496,13 +10522,13 @@ public ListAutonomousContainerDatabasesResponse listAutonomousContainerDatabases com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListAutonomousContainerDatabases", + "ListAutonomousVirtualMachines", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousContainerDatabase/ListAutonomousContainerDatabases"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousVirtualMachine/ListAutonomousVirtualMachines"); java.util.function.Function< - javax.ws.rs.core.Response, ListAutonomousContainerDatabasesResponse> + javax.ws.rs.core.Response, ListAutonomousVirtualMachinesResponse> transformer = - ListAutonomousContainerDatabasesConverter.fromResponse( + ListAutonomousVirtualMachinesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8520,13 +10546,14 @@ public ListAutonomousContainerDatabasesResponse listAutonomousContainerDatabases } @Override - public ListAutonomousDatabaseBackupsResponse listAutonomousDatabaseBackups( - ListAutonomousDatabaseBackupsRequest request) { - LOG.trace("Called listAutonomousDatabaseBackups"); - final ListAutonomousDatabaseBackupsRequest interceptedRequest = - ListAutonomousDatabaseBackupsConverter.interceptRequest(request); + public ListAutonomousVmClusterAcdResourceUsageResponse listAutonomousVmClusterAcdResourceUsage( + ListAutonomousVmClusterAcdResourceUsageRequest request) { + LOG.trace("Called listAutonomousVmClusterAcdResourceUsage"); + final ListAutonomousVmClusterAcdResourceUsageRequest interceptedRequest = + ListAutonomousVmClusterAcdResourceUsageConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAutonomousDatabaseBackupsConverter.fromRequest(client, interceptedRequest); + ListAutonomousVmClusterAcdResourceUsageConverter.fromRequest( + client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8535,13 +10562,13 @@ public ListAutonomousDatabaseBackupsResponse listAutonomousDatabaseBackups( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListAutonomousDatabaseBackups", + "ListAutonomousVmClusterAcdResourceUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseBackup/ListAutonomousDatabaseBackups"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousVmCluster/ListAutonomousVmClusterAcdResourceUsage"); java.util.function.Function< - javax.ws.rs.core.Response, ListAutonomousDatabaseBackupsResponse> + javax.ws.rs.core.Response, ListAutonomousVmClusterAcdResourceUsageResponse> transformer = - ListAutonomousDatabaseBackupsConverter.fromResponse( + ListAutonomousVmClusterAcdResourceUsageConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8559,14 +10586,13 @@ public ListAutonomousDatabaseBackupsResponse listAutonomousDatabaseBackups( } @Override - public ListAutonomousDatabaseCharacterSetsResponse listAutonomousDatabaseCharacterSets( - ListAutonomousDatabaseCharacterSetsRequest request) { - LOG.trace("Called listAutonomousDatabaseCharacterSets"); - final ListAutonomousDatabaseCharacterSetsRequest interceptedRequest = - ListAutonomousDatabaseCharacterSetsConverter.interceptRequest(request); + public ListAutonomousVmClustersResponse listAutonomousVmClusters( + ListAutonomousVmClustersRequest request) { + LOG.trace("Called listAutonomousVmClusters"); + final ListAutonomousVmClustersRequest interceptedRequest = + ListAutonomousVmClustersConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAutonomousDatabaseCharacterSetsConverter.fromRequest( - client, interceptedRequest); + ListAutonomousVmClustersConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8575,13 +10601,12 @@ public ListAutonomousDatabaseCharacterSetsResponse listAutonomousDatabaseCharact com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListAutonomousDatabaseCharacterSets", + "ListAutonomousVmClusters", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseCharacterSets/ListAutonomousDatabaseCharacterSets"); - java.util.function.Function< - javax.ws.rs.core.Response, ListAutonomousDatabaseCharacterSetsResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousVmCluster/ListAutonomousVmClusters"); + java.util.function.Function transformer = - ListAutonomousDatabaseCharacterSetsConverter.fromResponse( + ListAutonomousVmClustersConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8599,13 +10624,13 @@ public ListAutonomousDatabaseCharacterSetsResponse listAutonomousDatabaseCharact } @Override - public ListAutonomousDatabaseClonesResponse listAutonomousDatabaseClones( - ListAutonomousDatabaseClonesRequest request) { - LOG.trace("Called listAutonomousDatabaseClones"); - final ListAutonomousDatabaseClonesRequest interceptedRequest = - ListAutonomousDatabaseClonesConverter.interceptRequest(request); + public ListBackupDestinationResponse listBackupDestination( + ListBackupDestinationRequest request) { + LOG.trace("Called listBackupDestination"); + final ListBackupDestinationRequest interceptedRequest = + ListBackupDestinationConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAutonomousDatabaseClonesConverter.fromRequest(client, interceptedRequest); + ListBackupDestinationConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8614,12 +10639,12 @@ public ListAutonomousDatabaseClonesResponse listAutonomousDatabaseClones( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListAutonomousDatabaseClones", + "ListBackupDestination", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/ListAutonomousDatabaseClones"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/BackupDestinationSummary/ListBackupDestination"); + java.util.function.Function transformer = - ListAutonomousDatabaseClonesConverter.fromResponse( + ListBackupDestinationConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8637,15 +10662,12 @@ public ListAutonomousDatabaseClonesResponse listAutonomousDatabaseClones( } @Override - public ListAutonomousDatabaseDataguardAssociationsResponse - listAutonomousDatabaseDataguardAssociations( - ListAutonomousDatabaseDataguardAssociationsRequest request) { - LOG.trace("Called listAutonomousDatabaseDataguardAssociations"); - final ListAutonomousDatabaseDataguardAssociationsRequest interceptedRequest = - ListAutonomousDatabaseDataguardAssociationsConverter.interceptRequest(request); + public ListBackupsResponse listBackups(ListBackupsRequest request) { + LOG.trace("Called listBackups"); + final ListBackupsRequest interceptedRequest = + ListBackupsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAutonomousDatabaseDataguardAssociationsConverter.fromRequest( - client, interceptedRequest); + ListBackupsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8654,15 +10676,11 @@ public ListAutonomousDatabaseClonesResponse listAutonomousDatabaseClones( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListAutonomousDatabaseDataguardAssociations", + "ListBackups", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseDataguardAssociation/ListAutonomousDatabaseDataguardAssociations"); - java.util.function.Function< - javax.ws.rs.core.Response, - ListAutonomousDatabaseDataguardAssociationsResponse> - transformer = - ListAutonomousDatabaseDataguardAssociationsConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Backup/ListBackups"); + java.util.function.Function transformer = + ListBackupsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -8679,13 +10697,15 @@ public ListAutonomousDatabaseClonesResponse listAutonomousDatabaseClones( } @Override - public ListAutonomousDatabasePeersResponse listAutonomousDatabasePeers( - ListAutonomousDatabasePeersRequest request) { - LOG.trace("Called listAutonomousDatabasePeers"); - final ListAutonomousDatabasePeersRequest interceptedRequest = - ListAutonomousDatabasePeersConverter.interceptRequest(request); + public ListCloudAutonomousVmClusterAcdResourceUsageResponse + listCloudAutonomousVmClusterAcdResourceUsage( + ListCloudAutonomousVmClusterAcdResourceUsageRequest request) { + LOG.trace("Called listCloudAutonomousVmClusterAcdResourceUsage"); + final ListCloudAutonomousVmClusterAcdResourceUsageRequest interceptedRequest = + ListCloudAutonomousVmClusterAcdResourceUsageConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAutonomousDatabasePeersConverter.fromRequest(client, interceptedRequest); + ListCloudAutonomousVmClusterAcdResourceUsageConverter.fromRequest( + client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8694,12 +10714,14 @@ public ListAutonomousDatabasePeersResponse listAutonomousDatabasePeers( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListAutonomousDatabasePeers", + "ListCloudAutonomousVmClusterAcdResourceUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/ListAutonomousDatabasePeers"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudAutonomousVmCluster/ListCloudAutonomousVmClusterAcdResourceUsage"); + java.util.function.Function< + javax.ws.rs.core.Response, + ListCloudAutonomousVmClusterAcdResourceUsageResponse> transformer = - ListAutonomousDatabasePeersConverter.fromResponse( + ListCloudAutonomousVmClusterAcdResourceUsageConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8717,14 +10739,13 @@ public ListAutonomousDatabasePeersResponse listAutonomousDatabasePeers( } @Override - public ListAutonomousDatabaseRefreshableClonesResponse listAutonomousDatabaseRefreshableClones( - ListAutonomousDatabaseRefreshableClonesRequest request) { - LOG.trace("Called listAutonomousDatabaseRefreshableClones"); - final ListAutonomousDatabaseRefreshableClonesRequest interceptedRequest = - ListAutonomousDatabaseRefreshableClonesConverter.interceptRequest(request); + public ListCloudAutonomousVmClustersResponse listCloudAutonomousVmClusters( + ListCloudAutonomousVmClustersRequest request) { + LOG.trace("Called listCloudAutonomousVmClusters"); + final ListCloudAutonomousVmClustersRequest interceptedRequest = + ListCloudAutonomousVmClustersConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAutonomousDatabaseRefreshableClonesConverter.fromRequest( - client, interceptedRequest); + ListCloudAutonomousVmClustersConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8733,13 +10754,13 @@ public ListAutonomousDatabaseRefreshableClonesResponse listAutonomousDatabaseRef com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListAutonomousDatabaseRefreshableClones", + "ListCloudAutonomousVmClusters", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/ListAutonomousDatabaseRefreshableClones"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudAutonomousVmCluster/ListCloudAutonomousVmClusters"); java.util.function.Function< - javax.ws.rs.core.Response, ListAutonomousDatabaseRefreshableClonesResponse> + javax.ws.rs.core.Response, ListCloudAutonomousVmClustersResponse> transformer = - ListAutonomousDatabaseRefreshableClonesConverter.fromResponse( + ListCloudAutonomousVmClustersConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8757,14 +10778,13 @@ public ListAutonomousDatabaseRefreshableClonesResponse listAutonomousDatabaseRef } @Override - public ListAutonomousDatabaseSoftwareImagesResponse listAutonomousDatabaseSoftwareImages( - ListAutonomousDatabaseSoftwareImagesRequest request) { - LOG.trace("Called listAutonomousDatabaseSoftwareImages"); - final ListAutonomousDatabaseSoftwareImagesRequest interceptedRequest = - ListAutonomousDatabaseSoftwareImagesConverter.interceptRequest(request); + public ListCloudExadataInfrastructuresResponse listCloudExadataInfrastructures( + ListCloudExadataInfrastructuresRequest request) { + LOG.trace("Called listCloudExadataInfrastructures"); + final ListCloudExadataInfrastructuresRequest interceptedRequest = + ListCloudExadataInfrastructuresConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAutonomousDatabaseSoftwareImagesConverter.fromRequest( - client, interceptedRequest); + ListCloudExadataInfrastructuresConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8773,13 +10793,13 @@ public ListAutonomousDatabaseSoftwareImagesResponse listAutonomousDatabaseSoftwa com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListAutonomousDatabaseSoftwareImages", + "ListCloudExadataInfrastructures", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabaseSoftwareImage/ListAutonomousDatabaseSoftwareImages"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudExadataInfrastructure/ListCloudExadataInfrastructures"); java.util.function.Function< - javax.ws.rs.core.Response, ListAutonomousDatabaseSoftwareImagesResponse> + javax.ws.rs.core.Response, ListCloudExadataInfrastructuresResponse> transformer = - ListAutonomousDatabaseSoftwareImagesConverter.fromResponse( + ListCloudExadataInfrastructuresConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8797,13 +10817,14 @@ public ListAutonomousDatabaseSoftwareImagesResponse listAutonomousDatabaseSoftwa } @Override - public ListAutonomousDatabasesResponse listAutonomousDatabases( - ListAutonomousDatabasesRequest request) { - LOG.trace("Called listAutonomousDatabases"); - final ListAutonomousDatabasesRequest interceptedRequest = - ListAutonomousDatabasesConverter.interceptRequest(request); + public ListCloudVmClusterUpdateHistoryEntriesResponse listCloudVmClusterUpdateHistoryEntries( + ListCloudVmClusterUpdateHistoryEntriesRequest request) { + LOG.trace("Called listCloudVmClusterUpdateHistoryEntries"); + final ListCloudVmClusterUpdateHistoryEntriesRequest interceptedRequest = + ListCloudVmClusterUpdateHistoryEntriesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAutonomousDatabasesConverter.fromRequest(client, interceptedRequest); + ListCloudVmClusterUpdateHistoryEntriesConverter.fromRequest( + client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8812,12 +10833,13 @@ public ListAutonomousDatabasesResponse listAutonomousDatabases( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListAutonomousDatabases", + "ListCloudVmClusterUpdateHistoryEntries", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/ListAutonomousDatabases"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/UpdateHistoryEntry/ListCloudVmClusterUpdateHistoryEntries"); + java.util.function.Function< + javax.ws.rs.core.Response, ListCloudVmClusterUpdateHistoryEntriesResponse> transformer = - ListAutonomousDatabasesConverter.fromResponse( + ListCloudVmClusterUpdateHistoryEntriesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8835,13 +10857,13 @@ public ListAutonomousDatabasesResponse listAutonomousDatabases( } @Override - public ListAutonomousDbPreviewVersionsResponse listAutonomousDbPreviewVersions( - ListAutonomousDbPreviewVersionsRequest request) { - LOG.trace("Called listAutonomousDbPreviewVersions"); - final ListAutonomousDbPreviewVersionsRequest interceptedRequest = - ListAutonomousDbPreviewVersionsConverter.interceptRequest(request); + public ListCloudVmClusterUpdatesResponse listCloudVmClusterUpdates( + ListCloudVmClusterUpdatesRequest request) { + LOG.trace("Called listCloudVmClusterUpdates"); + final ListCloudVmClusterUpdatesRequest interceptedRequest = + ListCloudVmClusterUpdatesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAutonomousDbPreviewVersionsConverter.fromRequest(client, interceptedRequest); + ListCloudVmClusterUpdatesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8850,13 +10872,12 @@ public ListAutonomousDbPreviewVersionsResponse listAutonomousDbPreviewVersions( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListAutonomousDbPreviewVersions", + "ListCloudVmClusterUpdates", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDbPreviewVersionSummary/ListAutonomousDbPreviewVersions"); - java.util.function.Function< - javax.ws.rs.core.Response, ListAutonomousDbPreviewVersionsResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Update/ListCloudVmClusterUpdates"); + java.util.function.Function transformer = - ListAutonomousDbPreviewVersionsConverter.fromResponse( + ListCloudVmClusterUpdatesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8874,13 +10895,12 @@ public ListAutonomousDbPreviewVersionsResponse listAutonomousDbPreviewVersions( } @Override - public ListAutonomousDbVersionsResponse listAutonomousDbVersions( - ListAutonomousDbVersionsRequest request) { - LOG.trace("Called listAutonomousDbVersions"); - final ListAutonomousDbVersionsRequest interceptedRequest = - ListAutonomousDbVersionsConverter.interceptRequest(request); + public ListCloudVmClustersResponse listCloudVmClusters(ListCloudVmClustersRequest request) { + LOG.trace("Called listCloudVmClusters"); + final ListCloudVmClustersRequest interceptedRequest = + ListCloudVmClustersConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAutonomousDbVersionsConverter.fromRequest(client, interceptedRequest); + ListCloudVmClustersConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8889,12 +10909,12 @@ public ListAutonomousDbVersionsResponse listAutonomousDbVersions( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListAutonomousDbVersions", + "ListCloudVmClusters", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDbVersionSummary/ListAutonomousDbVersions"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudVmCluster/ListCloudVmClusters"); + java.util.function.Function transformer = - ListAutonomousDbVersionsConverter.fromResponse( + ListCloudVmClustersConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8912,15 +10932,13 @@ public ListAutonomousDbVersionsResponse listAutonomousDbVersions( } @Override - public ListAutonomousExadataInfrastructureShapesResponse - listAutonomousExadataInfrastructureShapes( - ListAutonomousExadataInfrastructureShapesRequest request) { - LOG.trace("Called listAutonomousExadataInfrastructureShapes"); - final ListAutonomousExadataInfrastructureShapesRequest interceptedRequest = - ListAutonomousExadataInfrastructureShapesConverter.interceptRequest(request); + public ListConsoleConnectionsResponse listConsoleConnections( + ListConsoleConnectionsRequest request) { + LOG.trace("Called listConsoleConnections"); + final ListConsoleConnectionsRequest interceptedRequest = + ListConsoleConnectionsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAutonomousExadataInfrastructureShapesConverter.fromRequest( - client, interceptedRequest); + ListConsoleConnectionsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8929,14 +10947,12 @@ public ListAutonomousDbVersionsResponse listAutonomousDbVersions( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListAutonomousExadataInfrastructureShapes", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousExadataInfrastructureShapeSummary/ListAutonomousExadataInfrastructureShapes"); - java.util.function.Function< - javax.ws.rs.core.Response, - ListAutonomousExadataInfrastructureShapesResponse> + "ListConsoleConnections", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ConsoleConnection/ListConsoleConnections"); + java.util.function.Function transformer = - ListAutonomousExadataInfrastructureShapesConverter.fromResponse( + ListConsoleConnectionsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8954,14 +10970,12 @@ public ListAutonomousDbVersionsResponse listAutonomousDbVersions( } @Override - public ListAutonomousExadataInfrastructuresResponse listAutonomousExadataInfrastructures( - ListAutonomousExadataInfrastructuresRequest request) { - LOG.trace("Called listAutonomousExadataInfrastructures"); - final ListAutonomousExadataInfrastructuresRequest interceptedRequest = - ListAutonomousExadataInfrastructuresConverter.interceptRequest(request); + public ListConsoleHistoriesResponse listConsoleHistories(ListConsoleHistoriesRequest request) { + LOG.trace("Called listConsoleHistories"); + final ListConsoleHistoriesRequest interceptedRequest = + ListConsoleHistoriesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAutonomousExadataInfrastructuresConverter.fromRequest( - client, interceptedRequest); + ListConsoleHistoriesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -8970,13 +10984,12 @@ public ListAutonomousExadataInfrastructuresResponse listAutonomousExadataInfrast com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListAutonomousExadataInfrastructures", + "ListConsoleHistories", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousExadataInfrastructure/ListAutonomousExadataInfrastructures"); - java.util.function.Function< - javax.ws.rs.core.Response, ListAutonomousExadataInfrastructuresResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ConsoleHistory/ListConsoleHistories"); + java.util.function.Function transformer = - ListAutonomousExadataInfrastructuresConverter.fromResponse( + ListConsoleHistoriesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -8994,13 +11007,13 @@ public ListAutonomousExadataInfrastructuresResponse listAutonomousExadataInfrast } @Override - public ListAutonomousVirtualMachinesResponse listAutonomousVirtualMachines( - ListAutonomousVirtualMachinesRequest request) { - LOG.trace("Called listAutonomousVirtualMachines"); - final ListAutonomousVirtualMachinesRequest interceptedRequest = - ListAutonomousVirtualMachinesConverter.interceptRequest(request); + public ListContainerDatabasePatchesResponse listContainerDatabasePatches( + ListContainerDatabasePatchesRequest request) { + LOG.trace("Called listContainerDatabasePatches"); + final ListContainerDatabasePatchesRequest interceptedRequest = + ListContainerDatabasePatchesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAutonomousVirtualMachinesConverter.fromRequest(client, interceptedRequest); + ListContainerDatabasePatchesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9009,13 +11022,12 @@ public ListAutonomousVirtualMachinesResponse listAutonomousVirtualMachines( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListAutonomousVirtualMachines", + "ListContainerDatabasePatches", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousVirtualMachine/ListAutonomousVirtualMachines"); - java.util.function.Function< - javax.ws.rs.core.Response, ListAutonomousVirtualMachinesResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousPatch/ListContainerDatabasePatches"); + java.util.function.Function transformer = - ListAutonomousVirtualMachinesConverter.fromResponse( + ListContainerDatabasePatchesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -9033,14 +11045,13 @@ public ListAutonomousVirtualMachinesResponse listAutonomousVirtualMachines( } @Override - public ListAutonomousVmClusterAcdResourceUsageResponse listAutonomousVmClusterAcdResourceUsage( - ListAutonomousVmClusterAcdResourceUsageRequest request) { - LOG.trace("Called listAutonomousVmClusterAcdResourceUsage"); - final ListAutonomousVmClusterAcdResourceUsageRequest interceptedRequest = - ListAutonomousVmClusterAcdResourceUsageConverter.interceptRequest(request); + public ListDataGuardAssociationsResponse listDataGuardAssociations( + ListDataGuardAssociationsRequest request) { + LOG.trace("Called listDataGuardAssociations"); + final ListDataGuardAssociationsRequest interceptedRequest = + ListDataGuardAssociationsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAutonomousVmClusterAcdResourceUsageConverter.fromRequest( - client, interceptedRequest); + ListDataGuardAssociationsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9049,13 +11060,12 @@ public ListAutonomousVmClusterAcdResourceUsageResponse listAutonomousVmClusterAc com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListAutonomousVmClusterAcdResourceUsage", + "ListDataGuardAssociations", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousVmCluster/ListAutonomousVmClusterAcdResourceUsage"); - java.util.function.Function< - javax.ws.rs.core.Response, ListAutonomousVmClusterAcdResourceUsageResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DataGuardAssociation/ListDataGuardAssociations"); + java.util.function.Function transformer = - ListAutonomousVmClusterAcdResourceUsageConverter.fromResponse( + ListDataGuardAssociationsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -9073,13 +11083,13 @@ public ListAutonomousVmClusterAcdResourceUsageResponse listAutonomousVmClusterAc } @Override - public ListAutonomousVmClustersResponse listAutonomousVmClusters( - ListAutonomousVmClustersRequest request) { - LOG.trace("Called listAutonomousVmClusters"); - final ListAutonomousVmClustersRequest interceptedRequest = - ListAutonomousVmClustersConverter.interceptRequest(request); + public ListDatabaseSoftwareImagesResponse listDatabaseSoftwareImages( + ListDatabaseSoftwareImagesRequest request) { + LOG.trace("Called listDatabaseSoftwareImages"); + final ListDatabaseSoftwareImagesRequest interceptedRequest = + ListDatabaseSoftwareImagesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAutonomousVmClustersConverter.fromRequest(client, interceptedRequest); + ListDatabaseSoftwareImagesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9088,12 +11098,12 @@ public ListAutonomousVmClustersResponse listAutonomousVmClusters( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListAutonomousVmClusters", + "ListDatabaseSoftwareImages", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousVmCluster/ListAutonomousVmClusters"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DatabaseSoftwareImage/ListDatabaseSoftwareImages"); + java.util.function.Function transformer = - ListAutonomousVmClustersConverter.fromResponse( + ListDatabaseSoftwareImagesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -9111,13 +11121,13 @@ public ListAutonomousVmClustersResponse listAutonomousVmClusters( } @Override - public ListBackupDestinationResponse listBackupDestination( - ListBackupDestinationRequest request) { - LOG.trace("Called listBackupDestination"); - final ListBackupDestinationRequest interceptedRequest = - ListBackupDestinationConverter.interceptRequest(request); + public ListDatabaseUpgradeHistoryEntriesResponse listDatabaseUpgradeHistoryEntries( + ListDatabaseUpgradeHistoryEntriesRequest request) { + LOG.trace("Called listDatabaseUpgradeHistoryEntries"); + final ListDatabaseUpgradeHistoryEntriesRequest interceptedRequest = + ListDatabaseUpgradeHistoryEntriesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListBackupDestinationConverter.fromRequest(client, interceptedRequest); + ListDatabaseUpgradeHistoryEntriesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9126,12 +11136,13 @@ public ListBackupDestinationResponse listBackupDestination( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListBackupDestination", + "ListDatabaseUpgradeHistoryEntries", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/BackupDestinationSummary/ListBackupDestination"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Database/ListDatabaseUpgradeHistoryEntries"); + java.util.function.Function< + javax.ws.rs.core.Response, ListDatabaseUpgradeHistoryEntriesResponse> transformer = - ListBackupDestinationConverter.fromResponse( + ListDatabaseUpgradeHistoryEntriesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -9149,12 +11160,12 @@ public ListBackupDestinationResponse listBackupDestination( } @Override - public ListBackupsResponse listBackups(ListBackupsRequest request) { - LOG.trace("Called listBackups"); - final ListBackupsRequest interceptedRequest = - ListBackupsConverter.interceptRequest(request); + public ListDatabasesResponse listDatabases(ListDatabasesRequest request) { + LOG.trace("Called listDatabases"); + final ListDatabasesRequest interceptedRequest = + ListDatabasesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListBackupsConverter.fromRequest(client, interceptedRequest); + ListDatabasesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9163,11 +11174,11 @@ public ListBackupsResponse listBackups(ListBackupsRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListBackups", + "ListDatabases", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/Backup/ListBackups"); - java.util.function.Function transformer = - ListBackupsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Database/ListDatabases"); + java.util.function.Function transformer = + ListDatabasesConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -9184,15 +11195,13 @@ public ListBackupsResponse listBackups(ListBackupsRequest request) { } @Override - public ListCloudAutonomousVmClusterAcdResourceUsageResponse - listCloudAutonomousVmClusterAcdResourceUsage( - ListCloudAutonomousVmClusterAcdResourceUsageRequest request) { - LOG.trace("Called listCloudAutonomousVmClusterAcdResourceUsage"); - final ListCloudAutonomousVmClusterAcdResourceUsageRequest interceptedRequest = - ListCloudAutonomousVmClusterAcdResourceUsageConverter.interceptRequest(request); + public ListDbHomePatchHistoryEntriesResponse listDbHomePatchHistoryEntries( + ListDbHomePatchHistoryEntriesRequest request) { + LOG.trace("Called listDbHomePatchHistoryEntries"); + final ListDbHomePatchHistoryEntriesRequest interceptedRequest = + ListDbHomePatchHistoryEntriesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListCloudAutonomousVmClusterAcdResourceUsageConverter.fromRequest( - client, interceptedRequest); + ListDbHomePatchHistoryEntriesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9201,14 +11210,13 @@ public ListBackupsResponse listBackups(ListBackupsRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListCloudAutonomousVmClusterAcdResourceUsage", + "ListDbHomePatchHistoryEntries", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudAutonomousVmCluster/ListCloudAutonomousVmClusterAcdResourceUsage"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/PatchHistoryEntry/ListDbHomePatchHistoryEntries"); java.util.function.Function< - javax.ws.rs.core.Response, - ListCloudAutonomousVmClusterAcdResourceUsageResponse> + javax.ws.rs.core.Response, ListDbHomePatchHistoryEntriesResponse> transformer = - ListCloudAutonomousVmClusterAcdResourceUsageConverter.fromResponse( + ListDbHomePatchHistoryEntriesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -9226,13 +11234,12 @@ public ListBackupsResponse listBackups(ListBackupsRequest request) { } @Override - public ListCloudAutonomousVmClustersResponse listCloudAutonomousVmClusters( - ListCloudAutonomousVmClustersRequest request) { - LOG.trace("Called listCloudAutonomousVmClusters"); - final ListCloudAutonomousVmClustersRequest interceptedRequest = - ListCloudAutonomousVmClustersConverter.interceptRequest(request); + public ListDbHomePatchesResponse listDbHomePatches(ListDbHomePatchesRequest request) { + LOG.trace("Called listDbHomePatches"); + final ListDbHomePatchesRequest interceptedRequest = + ListDbHomePatchesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListCloudAutonomousVmClustersConverter.fromRequest(client, interceptedRequest); + ListDbHomePatchesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9241,13 +11248,12 @@ public ListCloudAutonomousVmClustersResponse listCloudAutonomousVmClusters( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListCloudAutonomousVmClusters", + "ListDbHomePatches", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudAutonomousVmCluster/ListCloudAutonomousVmClusters"); - java.util.function.Function< - javax.ws.rs.core.Response, ListCloudAutonomousVmClustersResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Patch/ListDbHomePatches"); + java.util.function.Function transformer = - ListCloudAutonomousVmClustersConverter.fromResponse( + ListDbHomePatchesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -9265,13 +11271,12 @@ public ListCloudAutonomousVmClustersResponse listCloudAutonomousVmClusters( } @Override - public ListCloudExadataInfrastructuresResponse listCloudExadataInfrastructures( - ListCloudExadataInfrastructuresRequest request) { - LOG.trace("Called listCloudExadataInfrastructures"); - final ListCloudExadataInfrastructuresRequest interceptedRequest = - ListCloudExadataInfrastructuresConverter.interceptRequest(request); + public ListDbHomesResponse listDbHomes(ListDbHomesRequest request) { + LOG.trace("Called listDbHomes"); + final ListDbHomesRequest interceptedRequest = + ListDbHomesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListCloudExadataInfrastructuresConverter.fromRequest(client, interceptedRequest); + ListDbHomesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9280,14 +11285,11 @@ public ListCloudExadataInfrastructuresResponse listCloudExadataInfrastructures( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListCloudExadataInfrastructures", + "ListDbHomes", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudExadataInfrastructure/ListCloudExadataInfrastructures"); - java.util.function.Function< - javax.ws.rs.core.Response, ListCloudExadataInfrastructuresResponse> - transformer = - ListCloudExadataInfrastructuresConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbHome/ListDbHomes"); + java.util.function.Function transformer = + ListDbHomesConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -9304,14 +11306,12 @@ public ListCloudExadataInfrastructuresResponse listCloudExadataInfrastructures( } @Override - public ListCloudVmClusterUpdateHistoryEntriesResponse listCloudVmClusterUpdateHistoryEntries( - ListCloudVmClusterUpdateHistoryEntriesRequest request) { - LOG.trace("Called listCloudVmClusterUpdateHistoryEntries"); - final ListCloudVmClusterUpdateHistoryEntriesRequest interceptedRequest = - ListCloudVmClusterUpdateHistoryEntriesConverter.interceptRequest(request); + public ListDbNodesResponse listDbNodes(ListDbNodesRequest request) { + LOG.trace("Called listDbNodes"); + final ListDbNodesRequest interceptedRequest = + ListDbNodesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListCloudVmClusterUpdateHistoryEntriesConverter.fromRequest( - client, interceptedRequest); + ListDbNodesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9320,14 +11320,11 @@ public ListCloudVmClusterUpdateHistoryEntriesResponse listCloudVmClusterUpdateHi com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListCloudVmClusterUpdateHistoryEntries", + "ListDbNodes", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/UpdateHistoryEntry/ListCloudVmClusterUpdateHistoryEntries"); - java.util.function.Function< - javax.ws.rs.core.Response, ListCloudVmClusterUpdateHistoryEntriesResponse> - transformer = - ListCloudVmClusterUpdateHistoryEntriesConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbNode/ListDbNodes"); + java.util.function.Function transformer = + ListDbNodesConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -9344,13 +11341,12 @@ public ListCloudVmClusterUpdateHistoryEntriesResponse listCloudVmClusterUpdateHi } @Override - public ListCloudVmClusterUpdatesResponse listCloudVmClusterUpdates( - ListCloudVmClusterUpdatesRequest request) { - LOG.trace("Called listCloudVmClusterUpdates"); - final ListCloudVmClusterUpdatesRequest interceptedRequest = - ListCloudVmClusterUpdatesConverter.interceptRequest(request); + public ListDbServersResponse listDbServers(ListDbServersRequest request) { + LOG.trace("Called listDbServers"); + final ListDbServersRequest interceptedRequest = + ListDbServersConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListCloudVmClusterUpdatesConverter.fromRequest(client, interceptedRequest); + ListDbServersConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9359,13 +11355,11 @@ public ListCloudVmClusterUpdatesResponse listCloudVmClusterUpdates( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListCloudVmClusterUpdates", + "ListDbServers", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/Update/ListCloudVmClusterUpdates"); - java.util.function.Function - transformer = - ListCloudVmClusterUpdatesConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbServer/ListDbServers"); + java.util.function.Function transformer = + ListDbServersConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -9382,12 +11376,13 @@ public ListCloudVmClusterUpdatesResponse listCloudVmClusterUpdates( } @Override - public ListCloudVmClustersResponse listCloudVmClusters(ListCloudVmClustersRequest request) { - LOG.trace("Called listCloudVmClusters"); - final ListCloudVmClustersRequest interceptedRequest = - ListCloudVmClustersConverter.interceptRequest(request); + public ListDbSystemComputePerformancesResponse listDbSystemComputePerformances( + ListDbSystemComputePerformancesRequest request) { + LOG.trace("Called listDbSystemComputePerformances"); + final ListDbSystemComputePerformancesRequest interceptedRequest = + ListDbSystemComputePerformancesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListCloudVmClustersConverter.fromRequest(client, interceptedRequest); + ListDbSystemComputePerformancesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9396,12 +11391,13 @@ public ListCloudVmClustersResponse listCloudVmClusters(ListCloudVmClustersReques com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListCloudVmClusters", + "ListDbSystemComputePerformances", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudVmCluster/ListCloudVmClusters"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystem/ListDbSystemComputePerformances"); + java.util.function.Function< + javax.ws.rs.core.Response, ListDbSystemComputePerformancesResponse> transformer = - ListCloudVmClustersConverter.fromResponse( + ListDbSystemComputePerformancesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -9419,13 +11415,13 @@ public ListCloudVmClustersResponse listCloudVmClusters(ListCloudVmClustersReques } @Override - public ListConsoleConnectionsResponse listConsoleConnections( - ListConsoleConnectionsRequest request) { - LOG.trace("Called listConsoleConnections"); - final ListConsoleConnectionsRequest interceptedRequest = - ListConsoleConnectionsConverter.interceptRequest(request); + public ListDbSystemPatchHistoryEntriesResponse listDbSystemPatchHistoryEntries( + ListDbSystemPatchHistoryEntriesRequest request) { + LOG.trace("Called listDbSystemPatchHistoryEntries"); + final ListDbSystemPatchHistoryEntriesRequest interceptedRequest = + ListDbSystemPatchHistoryEntriesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListConsoleConnectionsConverter.fromRequest(client, interceptedRequest); + ListDbSystemPatchHistoryEntriesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9434,12 +11430,13 @@ public ListConsoleConnectionsResponse listConsoleConnections( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListConsoleConnections", + "ListDbSystemPatchHistoryEntries", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ConsoleConnection/ListConsoleConnections"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/PatchHistoryEntry/ListDbSystemPatchHistoryEntries"); + java.util.function.Function< + javax.ws.rs.core.Response, ListDbSystemPatchHistoryEntriesResponse> transformer = - ListConsoleConnectionsConverter.fromResponse( + ListDbSystemPatchHistoryEntriesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -9457,12 +11454,12 @@ public ListConsoleConnectionsResponse listConsoleConnections( } @Override - public ListConsoleHistoriesResponse listConsoleHistories(ListConsoleHistoriesRequest request) { - LOG.trace("Called listConsoleHistories"); - final ListConsoleHistoriesRequest interceptedRequest = - ListConsoleHistoriesConverter.interceptRequest(request); + public ListDbSystemPatchesResponse listDbSystemPatches(ListDbSystemPatchesRequest request) { + LOG.trace("Called listDbSystemPatches"); + final ListDbSystemPatchesRequest interceptedRequest = + ListDbSystemPatchesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListConsoleHistoriesConverter.fromRequest(client, interceptedRequest); + ListDbSystemPatchesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9471,12 +11468,12 @@ public ListConsoleHistoriesResponse listConsoleHistories(ListConsoleHistoriesReq com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListConsoleHistories", + "ListDbSystemPatches", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ConsoleHistory/ListConsoleHistories"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Patch/ListDbSystemPatches"); + java.util.function.Function transformer = - ListConsoleHistoriesConverter.fromResponse( + ListDbSystemPatchesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -9494,13 +11491,12 @@ public ListConsoleHistoriesResponse listConsoleHistories(ListConsoleHistoriesReq } @Override - public ListContainerDatabasePatchesResponse listContainerDatabasePatches( - ListContainerDatabasePatchesRequest request) { - LOG.trace("Called listContainerDatabasePatches"); - final ListContainerDatabasePatchesRequest interceptedRequest = - ListContainerDatabasePatchesConverter.interceptRequest(request); + public ListDbSystemShapesResponse listDbSystemShapes(ListDbSystemShapesRequest request) { + LOG.trace("Called listDbSystemShapes"); + final ListDbSystemShapesRequest interceptedRequest = + ListDbSystemShapesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListContainerDatabasePatchesConverter.fromRequest(client, interceptedRequest); + ListDbSystemShapesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9509,12 +11505,12 @@ public ListContainerDatabasePatchesResponse listContainerDatabasePatches( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListContainerDatabasePatches", + "ListDbSystemShapes", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousPatch/ListContainerDatabasePatches"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystemShapeSummary/ListDbSystemShapes"); + java.util.function.Function transformer = - ListContainerDatabasePatchesConverter.fromResponse( + ListDbSystemShapesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -9532,13 +11528,13 @@ public ListContainerDatabasePatchesResponse listContainerDatabasePatches( } @Override - public ListDataGuardAssociationsResponse listDataGuardAssociations( - ListDataGuardAssociationsRequest request) { - LOG.trace("Called listDataGuardAssociations"); - final ListDataGuardAssociationsRequest interceptedRequest = - ListDataGuardAssociationsConverter.interceptRequest(request); + public ListDbSystemStoragePerformancesResponse listDbSystemStoragePerformances( + ListDbSystemStoragePerformancesRequest request) { + LOG.trace("Called listDbSystemStoragePerformances"); + final ListDbSystemStoragePerformancesRequest interceptedRequest = + ListDbSystemStoragePerformancesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDataGuardAssociationsConverter.fromRequest(client, interceptedRequest); + ListDbSystemStoragePerformancesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9547,12 +11543,13 @@ public ListDataGuardAssociationsResponse listDataGuardAssociations( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListDataGuardAssociations", + "ListDbSystemStoragePerformances", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DataGuardAssociation/ListDataGuardAssociations"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystem/ListDbSystemStoragePerformances"); + java.util.function.Function< + javax.ws.rs.core.Response, ListDbSystemStoragePerformancesResponse> transformer = - ListDataGuardAssociationsConverter.fromResponse( + ListDbSystemStoragePerformancesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -9570,13 +11567,13 @@ public ListDataGuardAssociationsResponse listDataGuardAssociations( } @Override - public ListDatabaseSoftwareImagesResponse listDatabaseSoftwareImages( - ListDatabaseSoftwareImagesRequest request) { - LOG.trace("Called listDatabaseSoftwareImages"); - final ListDatabaseSoftwareImagesRequest interceptedRequest = - ListDatabaseSoftwareImagesConverter.interceptRequest(request); + public ListDbSystemUpgradeHistoryEntriesResponse listDbSystemUpgradeHistoryEntries( + ListDbSystemUpgradeHistoryEntriesRequest request) { + LOG.trace("Called listDbSystemUpgradeHistoryEntries"); + final ListDbSystemUpgradeHistoryEntriesRequest interceptedRequest = + ListDbSystemUpgradeHistoryEntriesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDatabaseSoftwareImagesConverter.fromRequest(client, interceptedRequest); + ListDbSystemUpgradeHistoryEntriesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9585,12 +11582,13 @@ public ListDatabaseSoftwareImagesResponse listDatabaseSoftwareImages( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListDatabaseSoftwareImages", + "ListDbSystemUpgradeHistoryEntries", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DatabaseSoftwareImage/ListDatabaseSoftwareImages"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystemUpgradeHistoryEntry/ListDbSystemUpgradeHistoryEntries"); + java.util.function.Function< + javax.ws.rs.core.Response, ListDbSystemUpgradeHistoryEntriesResponse> transformer = - ListDatabaseSoftwareImagesConverter.fromResponse( + ListDbSystemUpgradeHistoryEntriesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -9608,13 +11606,12 @@ public ListDatabaseSoftwareImagesResponse listDatabaseSoftwareImages( } @Override - public ListDatabaseUpgradeHistoryEntriesResponse listDatabaseUpgradeHistoryEntries( - ListDatabaseUpgradeHistoryEntriesRequest request) { - LOG.trace("Called listDatabaseUpgradeHistoryEntries"); - final ListDatabaseUpgradeHistoryEntriesRequest interceptedRequest = - ListDatabaseUpgradeHistoryEntriesConverter.interceptRequest(request); + public ListDbSystemsResponse listDbSystems(ListDbSystemsRequest request) { + LOG.trace("Called listDbSystems"); + final ListDbSystemsRequest interceptedRequest = + ListDbSystemsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDatabaseUpgradeHistoryEntriesConverter.fromRequest(client, interceptedRequest); + ListDbSystemsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9623,14 +11620,11 @@ public ListDatabaseUpgradeHistoryEntriesResponse listDatabaseUpgradeHistoryEntri com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListDatabaseUpgradeHistoryEntries", + "ListDbSystems", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/Database/ListDatabaseUpgradeHistoryEntries"); - java.util.function.Function< - javax.ws.rs.core.Response, ListDatabaseUpgradeHistoryEntriesResponse> - transformer = - ListDatabaseUpgradeHistoryEntriesConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystem/ListDbSystems"); + java.util.function.Function transformer = + ListDbSystemsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -9647,12 +11641,12 @@ public ListDatabaseUpgradeHistoryEntriesResponse listDatabaseUpgradeHistoryEntri } @Override - public ListDatabasesResponse listDatabases(ListDatabasesRequest request) { - LOG.trace("Called listDatabases"); - final ListDatabasesRequest interceptedRequest = - ListDatabasesConverter.interceptRequest(request); + public ListDbVersionsResponse listDbVersions(ListDbVersionsRequest request) { + LOG.trace("Called listDbVersions"); + final ListDbVersionsRequest interceptedRequest = + ListDbVersionsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDatabasesConverter.fromRequest(client, interceptedRequest); + ListDbVersionsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9661,11 +11655,11 @@ public ListDatabasesResponse listDatabases(ListDatabasesRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListDatabases", + "ListDbVersions", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/Database/ListDatabases"); - java.util.function.Function transformer = - ListDatabasesConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbVersionSummary/ListDbVersions"); + java.util.function.Function transformer = + ListDbVersionsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -9682,13 +11676,13 @@ public ListDatabasesResponse listDatabases(ListDatabasesRequest request) { } @Override - public ListDbHomePatchHistoryEntriesResponse listDbHomePatchHistoryEntries( - ListDbHomePatchHistoryEntriesRequest request) { - LOG.trace("Called listDbHomePatchHistoryEntries"); - final ListDbHomePatchHistoryEntriesRequest interceptedRequest = - ListDbHomePatchHistoryEntriesConverter.interceptRequest(request); + public ListExadataInfrastructuresResponse listExadataInfrastructures( + ListExadataInfrastructuresRequest request) { + LOG.trace("Called listExadataInfrastructures"); + final ListExadataInfrastructuresRequest interceptedRequest = + ListExadataInfrastructuresConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbHomePatchHistoryEntriesConverter.fromRequest(client, interceptedRequest); + ListExadataInfrastructuresConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9697,13 +11691,12 @@ public ListDbHomePatchHistoryEntriesResponse listDbHomePatchHistoryEntries( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListDbHomePatchHistoryEntries", + "ListExadataInfrastructures", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/PatchHistoryEntry/ListDbHomePatchHistoryEntries"); - java.util.function.Function< - javax.ws.rs.core.Response, ListDbHomePatchHistoryEntriesResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadataInfrastructure/ListExadataInfrastructures"); + java.util.function.Function transformer = - ListDbHomePatchHistoryEntriesConverter.fromResponse( + ListExadataInfrastructuresConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -9721,12 +11714,14 @@ public ListDbHomePatchHistoryEntriesResponse listDbHomePatchHistoryEntries( } @Override - public ListDbHomePatchesResponse listDbHomePatches(ListDbHomePatchesRequest request) { - LOG.trace("Called listDbHomePatches"); - final ListDbHomePatchesRequest interceptedRequest = - ListDbHomePatchesConverter.interceptRequest(request); + public ListExadbVmClusterUpdateHistoryEntriesResponse listExadbVmClusterUpdateHistoryEntries( + ListExadbVmClusterUpdateHistoryEntriesRequest request) { + LOG.trace("Called listExadbVmClusterUpdateHistoryEntries"); + final ListExadbVmClusterUpdateHistoryEntriesRequest interceptedRequest = + ListExadbVmClusterUpdateHistoryEntriesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbHomePatchesConverter.fromRequest(client, interceptedRequest); + ListExadbVmClusterUpdateHistoryEntriesConverter.fromRequest( + client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9735,12 +11730,13 @@ public ListDbHomePatchesResponse listDbHomePatches(ListDbHomePatchesRequest requ com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListDbHomePatches", + "ListExadbVmClusterUpdateHistoryEntries", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/Patch/ListDbHomePatches"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmClusterUpdateHistoryEntry/ListExadbVmClusterUpdateHistoryEntries"); + java.util.function.Function< + javax.ws.rs.core.Response, ListExadbVmClusterUpdateHistoryEntriesResponse> transformer = - ListDbHomePatchesConverter.fromResponse( + ListExadbVmClusterUpdateHistoryEntriesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -9758,12 +11754,13 @@ public ListDbHomePatchesResponse listDbHomePatches(ListDbHomePatchesRequest requ } @Override - public ListDbHomesResponse listDbHomes(ListDbHomesRequest request) { - LOG.trace("Called listDbHomes"); - final ListDbHomesRequest interceptedRequest = - ListDbHomesConverter.interceptRequest(request); + public ListExadbVmClusterUpdatesResponse listExadbVmClusterUpdates( + ListExadbVmClusterUpdatesRequest request) { + LOG.trace("Called listExadbVmClusterUpdates"); + final ListExadbVmClusterUpdatesRequest interceptedRequest = + ListExadbVmClusterUpdatesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbHomesConverter.fromRequest(client, interceptedRequest); + ListExadbVmClusterUpdatesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9772,11 +11769,13 @@ public ListDbHomesResponse listDbHomes(ListDbHomesRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListDbHomes", + "ListExadbVmClusterUpdates", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbHome/ListDbHomes"); - java.util.function.Function transformer = - ListDbHomesConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmClusterUpdate/ListExadbVmClusterUpdates"); + java.util.function.Function + transformer = + ListExadbVmClusterUpdatesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -9793,12 +11792,12 @@ public ListDbHomesResponse listDbHomes(ListDbHomesRequest request) { } @Override - public ListDbNodesResponse listDbNodes(ListDbNodesRequest request) { - LOG.trace("Called listDbNodes"); - final ListDbNodesRequest interceptedRequest = - ListDbNodesConverter.interceptRequest(request); + public ListExadbVmClustersResponse listExadbVmClusters(ListExadbVmClustersRequest request) { + LOG.trace("Called listExadbVmClusters"); + final ListExadbVmClustersRequest interceptedRequest = + ListExadbVmClustersConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbNodesConverter.fromRequest(client, interceptedRequest); + ListExadbVmClustersConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9807,11 +11806,13 @@ public ListDbNodesResponse listDbNodes(ListDbNodesRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListDbNodes", + "ListExadbVmClusters", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbNode/ListDbNodes"); - java.util.function.Function transformer = - ListDbNodesConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmCluster/ListExadbVmClusters"); + java.util.function.Function + transformer = + ListExadbVmClustersConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -9828,12 +11829,13 @@ public ListDbNodesResponse listDbNodes(ListDbNodesRequest request) { } @Override - public ListDbServersResponse listDbServers(ListDbServersRequest request) { - LOG.trace("Called listDbServers"); - final ListDbServersRequest interceptedRequest = - ListDbServersConverter.interceptRequest(request); + public ListExascaleDbStorageVaultsResponse listExascaleDbStorageVaults( + ListExascaleDbStorageVaultsRequest request) { + LOG.trace("Called listExascaleDbStorageVaults"); + final ListExascaleDbStorageVaultsRequest interceptedRequest = + ListExascaleDbStorageVaultsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbServersConverter.fromRequest(client, interceptedRequest); + ListExascaleDbStorageVaultsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9842,11 +11844,13 @@ public ListDbServersResponse listDbServers(ListDbServersRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListDbServers", + "ListExascaleDbStorageVaults", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbServer/ListDbServers"); - java.util.function.Function transformer = - ListDbServersConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExascaleDbStorageVault/ListExascaleDbStorageVaults"); + java.util.function.Function + transformer = + ListExascaleDbStorageVaultsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -9863,13 +11867,12 @@ public ListDbServersResponse listDbServers(ListDbServersRequest request) { } @Override - public ListDbSystemComputePerformancesResponse listDbSystemComputePerformances( - ListDbSystemComputePerformancesRequest request) { - LOG.trace("Called listDbSystemComputePerformances"); - final ListDbSystemComputePerformancesRequest interceptedRequest = - ListDbSystemComputePerformancesConverter.interceptRequest(request); + public ListExecutionActionsResponse listExecutionActions(ListExecutionActionsRequest request) { + LOG.trace("Called listExecutionActions"); + final ListExecutionActionsRequest interceptedRequest = + ListExecutionActionsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbSystemComputePerformancesConverter.fromRequest(client, interceptedRequest); + ListExecutionActionsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9878,13 +11881,12 @@ public ListDbSystemComputePerformancesResponse listDbSystemComputePerformances( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListDbSystemComputePerformances", + "ListExecutionActions", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystem/ListDbSystemComputePerformances"); - java.util.function.Function< - javax.ws.rs.core.Response, ListDbSystemComputePerformancesResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionAction/ListExecutionActions"); + java.util.function.Function transformer = - ListDbSystemComputePerformancesConverter.fromResponse( + ListExecutionActionsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -9902,13 +11904,12 @@ public ListDbSystemComputePerformancesResponse listDbSystemComputePerformances( } @Override - public ListDbSystemPatchHistoryEntriesResponse listDbSystemPatchHistoryEntries( - ListDbSystemPatchHistoryEntriesRequest request) { - LOG.trace("Called listDbSystemPatchHistoryEntries"); - final ListDbSystemPatchHistoryEntriesRequest interceptedRequest = - ListDbSystemPatchHistoryEntriesConverter.interceptRequest(request); + public ListExecutionWindowsResponse listExecutionWindows(ListExecutionWindowsRequest request) { + LOG.trace("Called listExecutionWindows"); + final ListExecutionWindowsRequest interceptedRequest = + ListExecutionWindowsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbSystemPatchHistoryEntriesConverter.fromRequest(client, interceptedRequest); + ListExecutionWindowsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9917,13 +11918,12 @@ public ListDbSystemPatchHistoryEntriesResponse listDbSystemPatchHistoryEntries( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListDbSystemPatchHistoryEntries", + "ListExecutionWindows", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/PatchHistoryEntry/ListDbSystemPatchHistoryEntries"); - java.util.function.Function< - javax.ws.rs.core.Response, ListDbSystemPatchHistoryEntriesResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionWindow/ListExecutionWindows"); + java.util.function.Function transformer = - ListDbSystemPatchHistoryEntriesConverter.fromResponse( + ListExecutionWindowsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -9941,12 +11941,13 @@ public ListDbSystemPatchHistoryEntriesResponse listDbSystemPatchHistoryEntries( } @Override - public ListDbSystemPatchesResponse listDbSystemPatches(ListDbSystemPatchesRequest request) { - LOG.trace("Called listDbSystemPatches"); - final ListDbSystemPatchesRequest interceptedRequest = - ListDbSystemPatchesConverter.interceptRequest(request); + public ListExternalContainerDatabasesResponse listExternalContainerDatabases( + ListExternalContainerDatabasesRequest request) { + LOG.trace("Called listExternalContainerDatabases"); + final ListExternalContainerDatabasesRequest interceptedRequest = + ListExternalContainerDatabasesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbSystemPatchesConverter.fromRequest(client, interceptedRequest); + ListExternalContainerDatabasesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9955,12 +11956,13 @@ public ListDbSystemPatchesResponse listDbSystemPatches(ListDbSystemPatchesReques com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListDbSystemPatches", + "ListExternalContainerDatabases", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/Patch/ListDbSystemPatches"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/ListExternalContainerDatabases"); + java.util.function.Function< + javax.ws.rs.core.Response, ListExternalContainerDatabasesResponse> transformer = - ListDbSystemPatchesConverter.fromResponse( + ListExternalContainerDatabasesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -9975,15 +11977,16 @@ public ListDbSystemPatchesResponse listDbSystemPatches(ListDbSystemPatchesReques return transformer.apply(response); }); }); - } - - @Override - public ListDbSystemShapesResponse listDbSystemShapes(ListDbSystemShapesRequest request) { - LOG.trace("Called listDbSystemShapes"); - final ListDbSystemShapesRequest interceptedRequest = - ListDbSystemShapesConverter.interceptRequest(request); + } + + @Override + public ListExternalDatabaseConnectorsResponse listExternalDatabaseConnectors( + ListExternalDatabaseConnectorsRequest request) { + LOG.trace("Called listExternalDatabaseConnectors"); + final ListExternalDatabaseConnectorsRequest interceptedRequest = + ListExternalDatabaseConnectorsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbSystemShapesConverter.fromRequest(client, interceptedRequest); + ListExternalDatabaseConnectorsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -9992,12 +11995,13 @@ public ListDbSystemShapesResponse listDbSystemShapes(ListDbSystemShapesRequest r com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListDbSystemShapes", + "ListExternalDatabaseConnectors", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystemShapeSummary/ListDbSystemShapes"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalDatabaseConnector/ListExternalDatabaseConnectors"); + java.util.function.Function< + javax.ws.rs.core.Response, ListExternalDatabaseConnectorsResponse> transformer = - ListDbSystemShapesConverter.fromResponse( + ListExternalDatabaseConnectorsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -10015,13 +12019,13 @@ public ListDbSystemShapesResponse listDbSystemShapes(ListDbSystemShapesRequest r } @Override - public ListDbSystemStoragePerformancesResponse listDbSystemStoragePerformances( - ListDbSystemStoragePerformancesRequest request) { - LOG.trace("Called listDbSystemStoragePerformances"); - final ListDbSystemStoragePerformancesRequest interceptedRequest = - ListDbSystemStoragePerformancesConverter.interceptRequest(request); + public ListExternalNonContainerDatabasesResponse listExternalNonContainerDatabases( + ListExternalNonContainerDatabasesRequest request) { + LOG.trace("Called listExternalNonContainerDatabases"); + final ListExternalNonContainerDatabasesRequest interceptedRequest = + ListExternalNonContainerDatabasesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbSystemStoragePerformancesConverter.fromRequest(client, interceptedRequest); + ListExternalNonContainerDatabasesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -10030,13 +12034,13 @@ public ListDbSystemStoragePerformancesResponse listDbSystemStoragePerformances( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListDbSystemStoragePerformances", + "ListExternalNonContainerDatabases", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystem/ListDbSystemStoragePerformances"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/ListExternalNonContainerDatabases"); java.util.function.Function< - javax.ws.rs.core.Response, ListDbSystemStoragePerformancesResponse> + javax.ws.rs.core.Response, ListExternalNonContainerDatabasesResponse> transformer = - ListDbSystemStoragePerformancesConverter.fromResponse( + ListExternalNonContainerDatabasesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -10054,13 +12058,13 @@ public ListDbSystemStoragePerformancesResponse listDbSystemStoragePerformances( } @Override - public ListDbSystemUpgradeHistoryEntriesResponse listDbSystemUpgradeHistoryEntries( - ListDbSystemUpgradeHistoryEntriesRequest request) { - LOG.trace("Called listDbSystemUpgradeHistoryEntries"); - final ListDbSystemUpgradeHistoryEntriesRequest interceptedRequest = - ListDbSystemUpgradeHistoryEntriesConverter.interceptRequest(request); + public ListExternalPluggableDatabasesResponse listExternalPluggableDatabases( + ListExternalPluggableDatabasesRequest request) { + LOG.trace("Called listExternalPluggableDatabases"); + final ListExternalPluggableDatabasesRequest interceptedRequest = + ListExternalPluggableDatabasesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbSystemUpgradeHistoryEntriesConverter.fromRequest(client, interceptedRequest); + ListExternalPluggableDatabasesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -10069,13 +12073,13 @@ public ListDbSystemUpgradeHistoryEntriesResponse listDbSystemUpgradeHistoryEntri com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListDbSystemUpgradeHistoryEntries", + "ListExternalPluggableDatabases", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystemUpgradeHistoryEntry/ListDbSystemUpgradeHistoryEntries"); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/ListExternalPluggableDatabases"); java.util.function.Function< - javax.ws.rs.core.Response, ListDbSystemUpgradeHistoryEntriesResponse> + javax.ws.rs.core.Response, ListExternalPluggableDatabasesResponse> transformer = - ListDbSystemUpgradeHistoryEntriesConverter.fromResponse( + ListExternalPluggableDatabasesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -10093,12 +12097,12 @@ public ListDbSystemUpgradeHistoryEntriesResponse listDbSystemUpgradeHistoryEntri } @Override - public ListDbSystemsResponse listDbSystems(ListDbSystemsRequest request) { - LOG.trace("Called listDbSystems"); - final ListDbSystemsRequest interceptedRequest = - ListDbSystemsConverter.interceptRequest(request); + public ListFlexComponentsResponse listFlexComponents(ListFlexComponentsRequest request) { + LOG.trace("Called listFlexComponents"); + final ListFlexComponentsRequest interceptedRequest = + ListFlexComponentsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbSystemsConverter.fromRequest(client, interceptedRequest); + ListFlexComponentsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -10107,11 +12111,13 @@ public ListDbSystemsResponse listDbSystems(ListDbSystemsRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListDbSystems", + "ListFlexComponents", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystem/ListDbSystems"); - java.util.function.Function transformer = - ListDbSystemsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/FlexComponentCollection/ListFlexComponents"); + java.util.function.Function + transformer = + ListFlexComponentsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -10128,12 +12134,13 @@ public ListDbSystemsResponse listDbSystems(ListDbSystemsRequest request) { } @Override - public ListDbVersionsResponse listDbVersions(ListDbVersionsRequest request) { - LOG.trace("Called listDbVersions"); - final ListDbVersionsRequest interceptedRequest = - ListDbVersionsConverter.interceptRequest(request); + public ListGiVersionMinorVersionsResponse listGiVersionMinorVersions( + ListGiVersionMinorVersionsRequest request) { + LOG.trace("Called listGiVersionMinorVersions"); + final ListGiVersionMinorVersionsRequest interceptedRequest = + ListGiVersionMinorVersionsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDbVersionsConverter.fromRequest(client, interceptedRequest); + ListGiVersionMinorVersionsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -10142,11 +12149,13 @@ public ListDbVersionsResponse listDbVersions(ListDbVersionsRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListDbVersions", + "ListGiVersionMinorVersions", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbVersionSummary/ListDbVersions"); - java.util.function.Function transformer = - ListDbVersionsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/GiMinorVersionSummary/ListGiVersionMinorVersions"); + java.util.function.Function + transformer = + ListGiVersionMinorVersionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -10163,13 +12172,12 @@ public ListDbVersionsResponse listDbVersions(ListDbVersionsRequest request) { } @Override - public ListExadataInfrastructuresResponse listExadataInfrastructures( - ListExadataInfrastructuresRequest request) { - LOG.trace("Called listExadataInfrastructures"); - final ListExadataInfrastructuresRequest interceptedRequest = - ListExadataInfrastructuresConverter.interceptRequest(request); + public ListGiVersionsResponse listGiVersions(ListGiVersionsRequest request) { + LOG.trace("Called listGiVersions"); + final ListGiVersionsRequest interceptedRequest = + ListGiVersionsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListExadataInfrastructuresConverter.fromRequest(client, interceptedRequest); + ListGiVersionsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -10178,13 +12186,11 @@ public ListExadataInfrastructuresResponse listExadataInfrastructures( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListExadataInfrastructures", + "ListGiVersions", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadataInfrastructure/ListExadataInfrastructures"); - java.util.function.Function - transformer = - ListExadataInfrastructuresConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/GiVersionSummary/ListGiVersions"); + java.util.function.Function transformer = + ListGiVersionsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -10201,13 +12207,12 @@ public ListExadataInfrastructuresResponse listExadataInfrastructures( } @Override - public ListExternalContainerDatabasesResponse listExternalContainerDatabases( - ListExternalContainerDatabasesRequest request) { - LOG.trace("Called listExternalContainerDatabases"); - final ListExternalContainerDatabasesRequest interceptedRequest = - ListExternalContainerDatabasesConverter.interceptRequest(request); + public ListKeyStoresResponse listKeyStores(ListKeyStoresRequest request) { + LOG.trace("Called listKeyStores"); + final ListKeyStoresRequest interceptedRequest = + ListKeyStoresConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListExternalContainerDatabasesConverter.fromRequest(client, interceptedRequest); + ListKeyStoresConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -10216,14 +12221,11 @@ public ListExternalContainerDatabasesResponse listExternalContainerDatabases( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListExternalContainerDatabases", + "ListKeyStores", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/ListExternalContainerDatabases"); - java.util.function.Function< - javax.ws.rs.core.Response, ListExternalContainerDatabasesResponse> - transformer = - ListExternalContainerDatabasesConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/KeyStoreSummary/ListKeyStores"); + java.util.function.Function transformer = + ListKeyStoresConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -10240,13 +12242,13 @@ public ListExternalContainerDatabasesResponse listExternalContainerDatabases( } @Override - public ListExternalDatabaseConnectorsResponse listExternalDatabaseConnectors( - ListExternalDatabaseConnectorsRequest request) { - LOG.trace("Called listExternalDatabaseConnectors"); - final ListExternalDatabaseConnectorsRequest interceptedRequest = - ListExternalDatabaseConnectorsConverter.interceptRequest(request); + public ListMaintenanceRunHistoryResponse listMaintenanceRunHistory( + ListMaintenanceRunHistoryRequest request) { + LOG.trace("Called listMaintenanceRunHistory"); + final ListMaintenanceRunHistoryRequest interceptedRequest = + ListMaintenanceRunHistoryConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListExternalDatabaseConnectorsConverter.fromRequest(client, interceptedRequest); + ListMaintenanceRunHistoryConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -10255,13 +12257,12 @@ public ListExternalDatabaseConnectorsResponse listExternalDatabaseConnectors( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListExternalDatabaseConnectors", + "ListMaintenanceRunHistory", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalDatabaseConnector/ListExternalDatabaseConnectors"); - java.util.function.Function< - javax.ws.rs.core.Response, ListExternalDatabaseConnectorsResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/MaintenanceRunHistory/ListMaintenanceRunHistory"); + java.util.function.Function transformer = - ListExternalDatabaseConnectorsConverter.fromResponse( + ListMaintenanceRunHistoryConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -10279,13 +12280,12 @@ public ListExternalDatabaseConnectorsResponse listExternalDatabaseConnectors( } @Override - public ListExternalNonContainerDatabasesResponse listExternalNonContainerDatabases( - ListExternalNonContainerDatabasesRequest request) { - LOG.trace("Called listExternalNonContainerDatabases"); - final ListExternalNonContainerDatabasesRequest interceptedRequest = - ListExternalNonContainerDatabasesConverter.interceptRequest(request); + public ListMaintenanceRunsResponse listMaintenanceRuns(ListMaintenanceRunsRequest request) { + LOG.trace("Called listMaintenanceRuns"); + final ListMaintenanceRunsRequest interceptedRequest = + ListMaintenanceRunsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListExternalNonContainerDatabasesConverter.fromRequest(client, interceptedRequest); + ListMaintenanceRunsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -10294,13 +12294,12 @@ public ListExternalNonContainerDatabasesResponse listExternalNonContainerDatabas com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListExternalNonContainerDatabases", + "ListMaintenanceRuns", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalNonContainerDatabase/ListExternalNonContainerDatabases"); - java.util.function.Function< - javax.ws.rs.core.Response, ListExternalNonContainerDatabasesResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/MaintenanceRun/ListMaintenanceRuns"); + java.util.function.Function transformer = - ListExternalNonContainerDatabasesConverter.fromResponse( + ListMaintenanceRunsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -10318,13 +12317,12 @@ public ListExternalNonContainerDatabasesResponse listExternalNonContainerDatabas } @Override - public ListExternalPluggableDatabasesResponse listExternalPluggableDatabases( - ListExternalPluggableDatabasesRequest request) { - LOG.trace("Called listExternalPluggableDatabases"); - final ListExternalPluggableDatabasesRequest interceptedRequest = - ListExternalPluggableDatabasesConverter.interceptRequest(request); + public ListOneoffPatchesResponse listOneoffPatches(ListOneoffPatchesRequest request) { + LOG.trace("Called listOneoffPatches"); + final ListOneoffPatchesRequest interceptedRequest = + ListOneoffPatchesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListExternalPluggableDatabasesConverter.fromRequest(client, interceptedRequest); + ListOneoffPatchesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -10333,13 +12331,12 @@ public ListExternalPluggableDatabasesResponse listExternalPluggableDatabases( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListExternalPluggableDatabases", + "ListOneoffPatches", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalPluggableDatabase/ListExternalPluggableDatabases"); - java.util.function.Function< - javax.ws.rs.core.Response, ListExternalPluggableDatabasesResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/OneoffPatch/ListOneoffPatches"); + java.util.function.Function transformer = - ListExternalPluggableDatabasesConverter.fromResponse( + ListOneoffPatchesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -10357,12 +12354,13 @@ public ListExternalPluggableDatabasesResponse listExternalPluggableDatabases( } @Override - public ListFlexComponentsResponse listFlexComponents(ListFlexComponentsRequest request) { - LOG.trace("Called listFlexComponents"); - final ListFlexComponentsRequest interceptedRequest = - ListFlexComponentsConverter.interceptRequest(request); + public ListParamsForActionTypeResponse listParamsForActionType( + ListParamsForActionTypeRequest request) { + LOG.trace("Called listParamsForActionType"); + final ListParamsForActionTypeRequest interceptedRequest = + ListParamsForActionTypeConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListFlexComponentsConverter.fromRequest(client, interceptedRequest); + ListParamsForActionTypeConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -10371,12 +12369,12 @@ public ListFlexComponentsResponse listFlexComponents(ListFlexComponentsRequest r com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListFlexComponents", + "ListParamsForActionType", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/FlexComponentCollection/ListFlexComponents"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ActionParamValuesSummary/ListParamsForActionType"); + java.util.function.Function transformer = - ListFlexComponentsConverter.fromResponse( + ListParamsForActionTypeConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -10394,12 +12392,13 @@ public ListFlexComponentsResponse listFlexComponents(ListFlexComponentsRequest r } @Override - public ListGiVersionsResponse listGiVersions(ListGiVersionsRequest request) { - LOG.trace("Called listGiVersions"); - final ListGiVersionsRequest interceptedRequest = - ListGiVersionsConverter.interceptRequest(request); + public ListPdbConversionHistoryEntriesResponse listPdbConversionHistoryEntries( + ListPdbConversionHistoryEntriesRequest request) { + LOG.trace("Called listPdbConversionHistoryEntries"); + final ListPdbConversionHistoryEntriesRequest interceptedRequest = + ListPdbConversionHistoryEntriesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListGiVersionsConverter.fromRequest(client, interceptedRequest); + ListPdbConversionHistoryEntriesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -10408,11 +12407,14 @@ public ListGiVersionsResponse listGiVersions(ListGiVersionsRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListGiVersions", + "ListPdbConversionHistoryEntries", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/GiVersionSummary/ListGiVersions"); - java.util.function.Function transformer = - ListGiVersionsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Database/ListPdbConversionHistoryEntries"); + java.util.function.Function< + javax.ws.rs.core.Response, ListPdbConversionHistoryEntriesResponse> + transformer = + ListPdbConversionHistoryEntriesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -10429,12 +12431,13 @@ public ListGiVersionsResponse listGiVersions(ListGiVersionsRequest request) { } @Override - public ListKeyStoresResponse listKeyStores(ListKeyStoresRequest request) { - LOG.trace("Called listKeyStores"); - final ListKeyStoresRequest interceptedRequest = - ListKeyStoresConverter.interceptRequest(request); + public ListPluggableDatabasesResponse listPluggableDatabases( + ListPluggableDatabasesRequest request) { + LOG.trace("Called listPluggableDatabases"); + final ListPluggableDatabasesRequest interceptedRequest = + ListPluggableDatabasesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListKeyStoresConverter.fromRequest(client, interceptedRequest); + ListPluggableDatabasesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -10443,11 +12446,13 @@ public ListKeyStoresResponse listKeyStores(ListKeyStoresRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListKeyStores", + "ListPluggableDatabases", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/KeyStoreSummary/ListKeyStores"); - java.util.function.Function transformer = - ListKeyStoresConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/ListPluggableDatabases"); + java.util.function.Function + transformer = + ListPluggableDatabasesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -10464,13 +12469,13 @@ public ListKeyStoresResponse listKeyStores(ListKeyStoresRequest request) { } @Override - public ListMaintenanceRunHistoryResponse listMaintenanceRunHistory( - ListMaintenanceRunHistoryRequest request) { - LOG.trace("Called listMaintenanceRunHistory"); - final ListMaintenanceRunHistoryRequest interceptedRequest = - ListMaintenanceRunHistoryConverter.interceptRequest(request); + public ListRecommendedScheduledActionsResponse listRecommendedScheduledActions( + ListRecommendedScheduledActionsRequest request) { + LOG.trace("Called listRecommendedScheduledActions"); + final ListRecommendedScheduledActionsRequest interceptedRequest = + ListRecommendedScheduledActionsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListMaintenanceRunHistoryConverter.fromRequest(client, interceptedRequest); + ListRecommendedScheduledActionsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -10479,12 +12484,13 @@ public ListMaintenanceRunHistoryResponse listMaintenanceRunHistory( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListMaintenanceRunHistory", + "ListRecommendedScheduledActions", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/MaintenanceRunHistory/ListMaintenanceRunHistory"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/RecommendedScheduledActionSummary/ListRecommendedScheduledActions"); + java.util.function.Function< + javax.ws.rs.core.Response, ListRecommendedScheduledActionsResponse> transformer = - ListMaintenanceRunHistoryConverter.fromResponse( + ListRecommendedScheduledActionsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -10502,12 +12508,12 @@ public ListMaintenanceRunHistoryResponse listMaintenanceRunHistory( } @Override - public ListMaintenanceRunsResponse listMaintenanceRuns(ListMaintenanceRunsRequest request) { - LOG.trace("Called listMaintenanceRuns"); - final ListMaintenanceRunsRequest interceptedRequest = - ListMaintenanceRunsConverter.interceptRequest(request); + public ListScheduledActionsResponse listScheduledActions(ListScheduledActionsRequest request) { + LOG.trace("Called listScheduledActions"); + final ListScheduledActionsRequest interceptedRequest = + ListScheduledActionsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListMaintenanceRunsConverter.fromRequest(client, interceptedRequest); + ListScheduledActionsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -10516,12 +12522,12 @@ public ListMaintenanceRunsResponse listMaintenanceRuns(ListMaintenanceRunsReques com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListMaintenanceRuns", + "ListScheduledActions", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/MaintenanceRun/ListMaintenanceRuns"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ScheduledAction/ListScheduledActions"); + java.util.function.Function transformer = - ListMaintenanceRunsConverter.fromResponse( + ListScheduledActionsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -10539,12 +12545,12 @@ public ListMaintenanceRunsResponse listMaintenanceRuns(ListMaintenanceRunsReques } @Override - public ListOneoffPatchesResponse listOneoffPatches(ListOneoffPatchesRequest request) { - LOG.trace("Called listOneoffPatches"); - final ListOneoffPatchesRequest interceptedRequest = - ListOneoffPatchesConverter.interceptRequest(request); + public ListSchedulingPlansResponse listSchedulingPlans(ListSchedulingPlansRequest request) { + LOG.trace("Called listSchedulingPlans"); + final ListSchedulingPlansRequest interceptedRequest = + ListSchedulingPlansConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListOneoffPatchesConverter.fromRequest(client, interceptedRequest); + ListSchedulingPlansConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -10553,12 +12559,12 @@ public ListOneoffPatchesResponse listOneoffPatches(ListOneoffPatchesRequest requ com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListOneoffPatches", + "ListSchedulingPlans", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/OneoffPatch/ListOneoffPatches"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPlan/ListSchedulingPlans"); + java.util.function.Function transformer = - ListOneoffPatchesConverter.fromResponse( + ListSchedulingPlansConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -10576,13 +12582,13 @@ public ListOneoffPatchesResponse listOneoffPatches(ListOneoffPatchesRequest requ } @Override - public ListPdbConversionHistoryEntriesResponse listPdbConversionHistoryEntries( - ListPdbConversionHistoryEntriesRequest request) { - LOG.trace("Called listPdbConversionHistoryEntries"); - final ListPdbConversionHistoryEntriesRequest interceptedRequest = - ListPdbConversionHistoryEntriesConverter.interceptRequest(request); + public ListSchedulingPoliciesResponse listSchedulingPolicies( + ListSchedulingPoliciesRequest request) { + LOG.trace("Called listSchedulingPolicies"); + final ListSchedulingPoliciesRequest interceptedRequest = + ListSchedulingPoliciesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListPdbConversionHistoryEntriesConverter.fromRequest(client, interceptedRequest); + ListSchedulingPoliciesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -10591,13 +12597,12 @@ public ListPdbConversionHistoryEntriesResponse listPdbConversionHistoryEntries( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListPdbConversionHistoryEntries", + "ListSchedulingPolicies", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/Database/ListPdbConversionHistoryEntries"); - java.util.function.Function< - javax.ws.rs.core.Response, ListPdbConversionHistoryEntriesResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPolicy/ListSchedulingPolicies"); + java.util.function.Function transformer = - ListPdbConversionHistoryEntriesConverter.fromResponse( + ListSchedulingPoliciesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -10615,13 +12620,13 @@ public ListPdbConversionHistoryEntriesResponse listPdbConversionHistoryEntries( } @Override - public ListPluggableDatabasesResponse listPluggableDatabases( - ListPluggableDatabasesRequest request) { - LOG.trace("Called listPluggableDatabases"); - final ListPluggableDatabasesRequest interceptedRequest = - ListPluggableDatabasesConverter.interceptRequest(request); + public ListSchedulingWindowsResponse listSchedulingWindows( + ListSchedulingWindowsRequest request) { + LOG.trace("Called listSchedulingWindows"); + final ListSchedulingWindowsRequest interceptedRequest = + ListSchedulingWindowsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListPluggableDatabasesConverter.fromRequest(client, interceptedRequest); + ListSchedulingWindowsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -10630,12 +12635,12 @@ public ListPluggableDatabasesResponse listPluggableDatabases( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ListPluggableDatabases", + "ListSchedulingWindows", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/ListPluggableDatabases"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingWindow/ListSchedulingWindows"); + java.util.function.Function transformer = - ListPluggableDatabasesConverter.fromResponse( + ListSchedulingWindowsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -11130,6 +13135,50 @@ public ModifyPluggableDatabaseManagementResponse modifyPluggableDatabaseManageme }); } + @Override + public MoveExecutionActionMemberResponse moveExecutionActionMember( + MoveExecutionActionMemberRequest request) { + LOG.trace("Called moveExecutionActionMember"); + final MoveExecutionActionMemberRequest interceptedRequest = + MoveExecutionActionMemberConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + MoveExecutionActionMemberConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "MoveExecutionActionMember", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionAction/MoveExecutionActionMember"); + java.util.function.Function + transformer = + MoveExecutionActionMemberConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getMoveExecutionActionMemberDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public RefreshPluggableDatabaseResponse refreshPluggableDatabase( RefreshPluggableDatabaseRequest request) { @@ -11392,6 +13441,52 @@ public RemoveVirtualMachineFromCloudVmClusterResponse removeVirtualMachineFromCl }); } + @Override + public RemoveVirtualMachineFromExadbVmClusterResponse removeVirtualMachineFromExadbVmCluster( + RemoveVirtualMachineFromExadbVmClusterRequest request) { + LOG.trace("Called removeVirtualMachineFromExadbVmCluster"); + final RemoveVirtualMachineFromExadbVmClusterRequest interceptedRequest = + RemoveVirtualMachineFromExadbVmClusterConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RemoveVirtualMachineFromExadbVmClusterConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "RemoveVirtualMachineFromExadbVmCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmCluster/RemoveVirtualMachineFromExadbVmCluster"); + java.util.function.Function< + javax.ws.rs.core.Response, RemoveVirtualMachineFromExadbVmClusterResponse> + transformer = + RemoveVirtualMachineFromExadbVmClusterConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getRemoveVirtualMachineFromExadbVmClusterDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public RemoveVirtualMachineFromVmClusterResponse removeVirtualMachineFromVmCluster( RemoveVirtualMachineFromVmClusterRequest request) { @@ -11437,6 +13532,92 @@ public RemoveVirtualMachineFromVmClusterResponse removeVirtualMachineFromVmClust }); } + @Override + public ReorderExecutionActionsResponse reorderExecutionActions( + ReorderExecutionActionsRequest request) { + LOG.trace("Called reorderExecutionActions"); + final ReorderExecutionActionsRequest interceptedRequest = + ReorderExecutionActionsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ReorderExecutionActionsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ReorderExecutionActions", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionWindow/ReorderExecutionActions"); + java.util.function.Function + transformer = + ReorderExecutionActionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getReorderExecutionActionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ReorderScheduledActionsResponse reorderScheduledActions( + ReorderScheduledActionsRequest request) { + LOG.trace("Called reorderScheduledActions"); + final ReorderScheduledActionsRequest interceptedRequest = + ReorderScheduledActionsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ReorderScheduledActionsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ReorderScheduledActions", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPlan/ReorderScheduledActions"); + java.util.function.Function + transformer = + ReorderScheduledActionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getReorderScheduledActionsDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ResizeVmClusterNetworkResponse resizeVmClusterNetwork( ResizeVmClusterNetworkRequest request) { @@ -11720,7 +13901,11 @@ public RestoreDatabaseResponse restoreDatabase(RestoreDatabaseRequest request) { retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.post( + ib, + retriedRequest + .getRotateAutonomousContainerDatabaseEncryptionKeyDetails(), + retriedRequest); return transformer.apply(response); }); }); @@ -11762,7 +13947,11 @@ public RotateAutonomousDatabaseEncryptionKeyResponse rotateAutonomousDatabaseEnc retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.post( + ib, + retriedRequest + .getRotateAutonomousDatabaseEncryptionKeyDetails(), + retriedRequest); return transformer.apply(response); }); }); @@ -12106,26 +14295,109 @@ public RotateVaultKeyResponse rotateVaultKey(RotateVaultKeyRequest request) { } @Override - public SaasAdminUserStatusResponse saasAdminUserStatus(SaasAdminUserStatusRequest request) { - LOG.trace("Called saasAdminUserStatus"); - final SaasAdminUserStatusRequest interceptedRequest = - SaasAdminUserStatusConverter.interceptRequest(request); + public SaasAdminUserStatusResponse saasAdminUserStatus(SaasAdminUserStatusRequest request) { + LOG.trace("Called saasAdminUserStatus"); + final SaasAdminUserStatusRequest interceptedRequest = + SaasAdminUserStatusConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SaasAdminUserStatusConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "SaasAdminUserStatus", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/SaasAdminUserStatus"); + java.util.function.Function + transformer = + SaasAdminUserStatusConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ScanExternalContainerDatabasePluggableDatabasesResponse + scanExternalContainerDatabasePluggableDatabases( + ScanExternalContainerDatabasePluggableDatabasesRequest request) { + LOG.trace("Called scanExternalContainerDatabasePluggableDatabases"); + final ScanExternalContainerDatabasePluggableDatabasesRequest interceptedRequest = + ScanExternalContainerDatabasePluggableDatabasesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ScanExternalContainerDatabasePluggableDatabasesConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "ScanExternalContainerDatabasePluggableDatabases", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/ScanExternalContainerDatabasePluggableDatabases"); + java.util.function.Function< + javax.ws.rs.core.Response, + ScanExternalContainerDatabasePluggableDatabasesResponse> + transformer = + ScanExternalContainerDatabasePluggableDatabasesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public SetDbKeyVersionResponse setDbKeyVersion(SetDbKeyVersionRequest request) { + LOG.trace("Called setDbKeyVersion"); + final SetDbKeyVersionRequest interceptedRequest = + SetDbKeyVersionConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - SaasAdminUserStatusConverter.fromRequest(client, interceptedRequest); + SetDbKeyVersionConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "SaasAdminUserStatus", + "SetDbKeyVersion", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/SaasAdminUserStatus"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/database/20160918/Database/SetDbKeyVersion"); + java.util.function.Function transformer = - SaasAdminUserStatusConverter.fromResponse( + SetDbKeyVersionConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -12137,22 +14409,22 @@ public SaasAdminUserStatusResponse saasAdminUserStatus(SaasAdminUserStatusReques retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.post( + ib, + retriedRequest.getSetKeyVersionDetails(), + retriedRequest); return transformer.apply(response); }); }); } @Override - public ScanExternalContainerDatabasePluggableDatabasesResponse - scanExternalContainerDatabasePluggableDatabases( - ScanExternalContainerDatabasePluggableDatabasesRequest request) { - LOG.trace("Called scanExternalContainerDatabasePluggableDatabases"); - final ScanExternalContainerDatabasePluggableDatabasesRequest interceptedRequest = - ScanExternalContainerDatabasePluggableDatabasesConverter.interceptRequest(request); + public SetPdbKeyVersionResponse setPdbKeyVersion(SetPdbKeyVersionRequest request) { + LOG.trace("Called setPdbKeyVersion"); + final SetPdbKeyVersionRequest interceptedRequest = + SetPdbKeyVersionConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ScanExternalContainerDatabasePluggableDatabasesConverter.fromRequest( - client, interceptedRequest); + SetPdbKeyVersionConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -12162,14 +14434,12 @@ public SaasAdminUserStatusResponse saasAdminUserStatus(SaasAdminUserStatusReques com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Database", - "ScanExternalContainerDatabasePluggableDatabases", + "SetPdbKeyVersion", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExternalContainerDatabase/ScanExternalContainerDatabasePluggableDatabases"); - java.util.function.Function< - javax.ws.rs.core.Response, - ScanExternalContainerDatabasePluggableDatabasesResponse> + "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/SetPdbKeyVersion"); + java.util.function.Function transformer = - ScanExternalContainerDatabasePluggableDatabasesConverter.fromResponse( + SetPdbKeyVersionConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -12181,7 +14451,10 @@ public SaasAdminUserStatusResponse saasAdminUserStatus(SaasAdminUserStatusReques retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.post( + ib, + retriedRequest.getSetKeyVersionDetails(), + retriedRequest); return transformer.apply(response); }); }); @@ -13658,6 +15931,174 @@ public UpdateExadataIormConfigResponse updateExadataIormConfig( }); } + @Override + public UpdateExadbVmClusterResponse updateExadbVmCluster(UpdateExadbVmClusterRequest request) { + LOG.trace("Called updateExadbVmCluster"); + final UpdateExadbVmClusterRequest interceptedRequest = + UpdateExadbVmClusterConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateExadbVmClusterConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "UpdateExadbVmCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExadbVmCluster/UpdateExadbVmCluster"); + java.util.function.Function + transformer = + UpdateExadbVmClusterConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateExadbVmClusterDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateExascaleDbStorageVaultResponse updateExascaleDbStorageVault( + UpdateExascaleDbStorageVaultRequest request) { + LOG.trace("Called updateExascaleDbStorageVault"); + final UpdateExascaleDbStorageVaultRequest interceptedRequest = + UpdateExascaleDbStorageVaultConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateExascaleDbStorageVaultConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "UpdateExascaleDbStorageVault", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExascaleDbStorageVault/UpdateExascaleDbStorageVault"); + java.util.function.Function + transformer = + UpdateExascaleDbStorageVaultConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest + .getUpdateExascaleDbStorageVaultDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateExecutionActionResponse updateExecutionAction( + UpdateExecutionActionRequest request) { + LOG.trace("Called updateExecutionAction"); + final UpdateExecutionActionRequest interceptedRequest = + UpdateExecutionActionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateExecutionActionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "UpdateExecutionAction", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionAction/UpdateExecutionAction"); + java.util.function.Function + transformer = + UpdateExecutionActionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateExecutionActionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateExecutionWindowResponse updateExecutionWindow( + UpdateExecutionWindowRequest request) { + LOG.trace("Called updateExecutionWindow"); + final UpdateExecutionWindowRequest interceptedRequest = + UpdateExecutionWindowConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateExecutionWindowConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "UpdateExecutionWindow", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/ExecutionWindow/UpdateExecutionWindow"); + java.util.function.Function + transformer = + UpdateExecutionWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateExecutionWindowDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateExternalContainerDatabaseResponse updateExternalContainerDatabase( UpdateExternalContainerDatabaseRequest request) { @@ -13997,6 +16438,129 @@ public UpdatePluggableDatabaseResponse updatePluggableDatabase( }); } + @Override + public UpdateScheduledActionResponse updateScheduledAction( + UpdateScheduledActionRequest request) { + LOG.trace("Called updateScheduledAction"); + final UpdateScheduledActionRequest interceptedRequest = + UpdateScheduledActionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateScheduledActionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", "UpdateScheduledAction", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + UpdateScheduledActionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateScheduledActionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateSchedulingPolicyResponse updateSchedulingPolicy( + UpdateSchedulingPolicyRequest request) { + LOG.trace("Called updateSchedulingPolicy"); + final UpdateSchedulingPolicyRequest interceptedRequest = + UpdateSchedulingPolicyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateSchedulingPolicyConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "UpdateSchedulingPolicy", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingPolicy/UpdateSchedulingPolicy"); + java.util.function.Function + transformer = + UpdateSchedulingPolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateSchedulingPolicyDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateSchedulingWindowResponse updateSchedulingWindow( + UpdateSchedulingWindowRequest request) { + LOG.trace("Called updateSchedulingWindow"); + final UpdateSchedulingWindowRequest interceptedRequest = + UpdateSchedulingWindowConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateSchedulingWindowConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Database", + "UpdateSchedulingWindow", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database/20160918/SchedulingWindow/UpdateSchedulingWindow"); + java.util.function.Function + transformer = + UpdateSchedulingWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateSchedulingWindowDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateVmClusterResponse updateVmCluster(UpdateVmClusterRequest request) { LOG.trace("Called updateVmCluster"); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/DatabasePaginators.java b/bmc-database/src/main/java/com/oracle/bmc/database/DatabasePaginators.java index 6875368655f..36615b97a09 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/DatabasePaginators.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/DatabasePaginators.java @@ -5346,38 +5346,42 @@ public ListExadataInfrastructuresResponse apply( } /** - * Creates a new iterable which will iterate over the responses received from the listExternalContainerDatabases operation. This iterable + * Creates a new iterable which will iterate over the responses received from the listExadbVmClusterUpdateHistoryEntries operation. This iterable * will fetch more data from the server as needed. * * @param request a request which can be sent to the service operation * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. */ - public Iterable - listExternalContainerDatabasesResponseIterator( - final ListExternalContainerDatabasesRequest request) { + public Iterable + listExadbVmClusterUpdateHistoryEntriesResponseIterator( + final ListExadbVmClusterUpdateHistoryEntriesRequest request) { return new com.oracle.bmc.paginator.internal.ResponseIterable< - ListExternalContainerDatabasesRequest.Builder, - ListExternalContainerDatabasesRequest, ListExternalContainerDatabasesResponse>( - new java.util.function.Supplier() { + ListExadbVmClusterUpdateHistoryEntriesRequest.Builder, + ListExadbVmClusterUpdateHistoryEntriesRequest, + ListExadbVmClusterUpdateHistoryEntriesResponse>( + new java.util.function.Supplier< + ListExadbVmClusterUpdateHistoryEntriesRequest.Builder>() { @Override - public ListExternalContainerDatabasesRequest.Builder get() { - return ListExternalContainerDatabasesRequest.builder().copy(request); + public ListExadbVmClusterUpdateHistoryEntriesRequest.Builder get() { + return ListExadbVmClusterUpdateHistoryEntriesRequest.builder() + .copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function< + ListExadbVmClusterUpdateHistoryEntriesResponse, String>() { @Override - public String apply(ListExternalContainerDatabasesResponse response) { + public String apply(ListExadbVmClusterUpdateHistoryEntriesResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListExternalContainerDatabasesRequest.Builder>, - ListExternalContainerDatabasesRequest>() { + ListExadbVmClusterUpdateHistoryEntriesRequest.Builder>, + ListExadbVmClusterUpdateHistoryEntriesRequest>() { @Override - public ListExternalContainerDatabasesRequest apply( + public ListExadbVmClusterUpdateHistoryEntriesRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListExternalContainerDatabasesRequest.Builder> + ListExadbVmClusterUpdateHistoryEntriesRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -5389,52 +5393,56 @@ public ListExternalContainerDatabasesRequest apply( } }, new java.util.function.Function< - ListExternalContainerDatabasesRequest, - ListExternalContainerDatabasesResponse>() { + ListExadbVmClusterUpdateHistoryEntriesRequest, + ListExadbVmClusterUpdateHistoryEntriesResponse>() { @Override - public ListExternalContainerDatabasesResponse apply( - ListExternalContainerDatabasesRequest request) { - return client.listExternalContainerDatabases(request); + public ListExadbVmClusterUpdateHistoryEntriesResponse apply( + ListExadbVmClusterUpdateHistoryEntriesRequest request) { + return client.listExadbVmClusterUpdateHistoryEntries(request); } }); } /** - * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.ExternalContainerDatabaseSummary} objects - * contained in responses from the listExternalContainerDatabases operation. This iterable will fetch more data from the + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.ExadbVmClusterUpdateHistoryEntrySummary} objects + * contained in responses from the listExadbVmClusterUpdateHistoryEntries operation. This iterable will fetch more data from the * server as needed. * * @param request a request which can be sent to the service operation - * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.ExternalContainerDatabaseSummary} objects + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.ExadbVmClusterUpdateHistoryEntrySummary} objects * contained in responses received from the service. */ - public Iterable - listExternalContainerDatabasesRecordIterator( - final ListExternalContainerDatabasesRequest request) { + public Iterable + listExadbVmClusterUpdateHistoryEntriesRecordIterator( + final ListExadbVmClusterUpdateHistoryEntriesRequest request) { return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< - ListExternalContainerDatabasesRequest.Builder, - ListExternalContainerDatabasesRequest, ListExternalContainerDatabasesResponse, - com.oracle.bmc.database.model.ExternalContainerDatabaseSummary>( - new java.util.function.Supplier() { + ListExadbVmClusterUpdateHistoryEntriesRequest.Builder, + ListExadbVmClusterUpdateHistoryEntriesRequest, + ListExadbVmClusterUpdateHistoryEntriesResponse, + com.oracle.bmc.database.model.ExadbVmClusterUpdateHistoryEntrySummary>( + new java.util.function.Supplier< + ListExadbVmClusterUpdateHistoryEntriesRequest.Builder>() { @Override - public ListExternalContainerDatabasesRequest.Builder get() { - return ListExternalContainerDatabasesRequest.builder().copy(request); + public ListExadbVmClusterUpdateHistoryEntriesRequest.Builder get() { + return ListExadbVmClusterUpdateHistoryEntriesRequest.builder() + .copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function< + ListExadbVmClusterUpdateHistoryEntriesResponse, String>() { @Override - public String apply(ListExternalContainerDatabasesResponse response) { + public String apply(ListExadbVmClusterUpdateHistoryEntriesResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListExternalContainerDatabasesRequest.Builder>, - ListExternalContainerDatabasesRequest>() { + ListExadbVmClusterUpdateHistoryEntriesRequest.Builder>, + ListExadbVmClusterUpdateHistoryEntriesRequest>() { @Override - public ListExternalContainerDatabasesRequest apply( + public ListExadbVmClusterUpdateHistoryEntriesRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListExternalContainerDatabasesRequest.Builder> + ListExadbVmClusterUpdateHistoryEntriesRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -5446,60 +5454,61 @@ public ListExternalContainerDatabasesRequest apply( } }, new java.util.function.Function< - ListExternalContainerDatabasesRequest, - ListExternalContainerDatabasesResponse>() { + ListExadbVmClusterUpdateHistoryEntriesRequest, + ListExadbVmClusterUpdateHistoryEntriesResponse>() { @Override - public ListExternalContainerDatabasesResponse apply( - ListExternalContainerDatabasesRequest request) { - return client.listExternalContainerDatabases(request); + public ListExadbVmClusterUpdateHistoryEntriesResponse apply( + ListExadbVmClusterUpdateHistoryEntriesRequest request) { + return client.listExadbVmClusterUpdateHistoryEntries(request); } }, new java.util.function.Function< - ListExternalContainerDatabasesResponse, + ListExadbVmClusterUpdateHistoryEntriesResponse, java.util.List< - com.oracle.bmc.database.model.ExternalContainerDatabaseSummary>>() { + com.oracle.bmc.database.model + .ExadbVmClusterUpdateHistoryEntrySummary>>() { @Override public java.util.List< - com.oracle.bmc.database.model.ExternalContainerDatabaseSummary> - apply(ListExternalContainerDatabasesResponse response) { + com.oracle.bmc.database.model + .ExadbVmClusterUpdateHistoryEntrySummary> + apply(ListExadbVmClusterUpdateHistoryEntriesResponse response) { return response.getItems(); } }); } /** - * Creates a new iterable which will iterate over the responses received from the listExternalDatabaseConnectors operation. This iterable + * Creates a new iterable which will iterate over the responses received from the listExadbVmClusterUpdates operation. This iterable * will fetch more data from the server as needed. * * @param request a request which can be sent to the service operation * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. */ - public Iterable - listExternalDatabaseConnectorsResponseIterator( - final ListExternalDatabaseConnectorsRequest request) { + public Iterable listExadbVmClusterUpdatesResponseIterator( + final ListExadbVmClusterUpdatesRequest request) { return new com.oracle.bmc.paginator.internal.ResponseIterable< - ListExternalDatabaseConnectorsRequest.Builder, - ListExternalDatabaseConnectorsRequest, ListExternalDatabaseConnectorsResponse>( - new java.util.function.Supplier() { + ListExadbVmClusterUpdatesRequest.Builder, ListExadbVmClusterUpdatesRequest, + ListExadbVmClusterUpdatesResponse>( + new java.util.function.Supplier() { @Override - public ListExternalDatabaseConnectorsRequest.Builder get() { - return ListExternalDatabaseConnectorsRequest.builder().copy(request); + public ListExadbVmClusterUpdatesRequest.Builder get() { + return ListExadbVmClusterUpdatesRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListExternalDatabaseConnectorsResponse response) { + public String apply(ListExadbVmClusterUpdatesResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListExternalDatabaseConnectorsRequest.Builder>, - ListExternalDatabaseConnectorsRequest>() { + ListExadbVmClusterUpdatesRequest.Builder>, + ListExadbVmClusterUpdatesRequest>() { @Override - public ListExternalDatabaseConnectorsRequest apply( + public ListExadbVmClusterUpdatesRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListExternalDatabaseConnectorsRequest.Builder> + ListExadbVmClusterUpdatesRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -5511,52 +5520,51 @@ public ListExternalDatabaseConnectorsRequest apply( } }, new java.util.function.Function< - ListExternalDatabaseConnectorsRequest, - ListExternalDatabaseConnectorsResponse>() { + ListExadbVmClusterUpdatesRequest, ListExadbVmClusterUpdatesResponse>() { @Override - public ListExternalDatabaseConnectorsResponse apply( - ListExternalDatabaseConnectorsRequest request) { - return client.listExternalDatabaseConnectors(request); + public ListExadbVmClusterUpdatesResponse apply( + ListExadbVmClusterUpdatesRequest request) { + return client.listExadbVmClusterUpdates(request); } }); } /** - * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.ExternalDatabaseConnectorSummary} objects - * contained in responses from the listExternalDatabaseConnectors operation. This iterable will fetch more data from the + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.ExadbVmClusterUpdateSummary} objects + * contained in responses from the listExadbVmClusterUpdates operation. This iterable will fetch more data from the * server as needed. * * @param request a request which can be sent to the service operation - * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.ExternalDatabaseConnectorSummary} objects + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.ExadbVmClusterUpdateSummary} objects * contained in responses received from the service. */ - public Iterable - listExternalDatabaseConnectorsRecordIterator( - final ListExternalDatabaseConnectorsRequest request) { + public Iterable + listExadbVmClusterUpdatesRecordIterator( + final ListExadbVmClusterUpdatesRequest request) { return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< - ListExternalDatabaseConnectorsRequest.Builder, - ListExternalDatabaseConnectorsRequest, ListExternalDatabaseConnectorsResponse, - com.oracle.bmc.database.model.ExternalDatabaseConnectorSummary>( - new java.util.function.Supplier() { + ListExadbVmClusterUpdatesRequest.Builder, ListExadbVmClusterUpdatesRequest, + ListExadbVmClusterUpdatesResponse, + com.oracle.bmc.database.model.ExadbVmClusterUpdateSummary>( + new java.util.function.Supplier() { @Override - public ListExternalDatabaseConnectorsRequest.Builder get() { - return ListExternalDatabaseConnectorsRequest.builder().copy(request); + public ListExadbVmClusterUpdatesRequest.Builder get() { + return ListExadbVmClusterUpdatesRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListExternalDatabaseConnectorsResponse response) { + public String apply(ListExadbVmClusterUpdatesResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListExternalDatabaseConnectorsRequest.Builder>, - ListExternalDatabaseConnectorsRequest>() { + ListExadbVmClusterUpdatesRequest.Builder>, + ListExadbVmClusterUpdatesRequest>() { @Override - public ListExternalDatabaseConnectorsRequest apply( + public ListExadbVmClusterUpdatesRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListExternalDatabaseConnectorsRequest.Builder> + ListExadbVmClusterUpdatesRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -5568,63 +5576,57 @@ public ListExternalDatabaseConnectorsRequest apply( } }, new java.util.function.Function< - ListExternalDatabaseConnectorsRequest, - ListExternalDatabaseConnectorsResponse>() { + ListExadbVmClusterUpdatesRequest, ListExadbVmClusterUpdatesResponse>() { @Override - public ListExternalDatabaseConnectorsResponse apply( - ListExternalDatabaseConnectorsRequest request) { - return client.listExternalDatabaseConnectors(request); + public ListExadbVmClusterUpdatesResponse apply( + ListExadbVmClusterUpdatesRequest request) { + return client.listExadbVmClusterUpdates(request); } }, new java.util.function.Function< - ListExternalDatabaseConnectorsResponse, + ListExadbVmClusterUpdatesResponse, java.util.List< - com.oracle.bmc.database.model.ExternalDatabaseConnectorSummary>>() { + com.oracle.bmc.database.model.ExadbVmClusterUpdateSummary>>() { @Override - public java.util.List< - com.oracle.bmc.database.model.ExternalDatabaseConnectorSummary> - apply(ListExternalDatabaseConnectorsResponse response) { + public java.util.List + apply(ListExadbVmClusterUpdatesResponse response) { return response.getItems(); } }); } /** - * Creates a new iterable which will iterate over the responses received from the listExternalNonContainerDatabases operation. This iterable + * Creates a new iterable which will iterate over the responses received from the listExadbVmClusters operation. This iterable * will fetch more data from the server as needed. * * @param request a request which can be sent to the service operation * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. */ - public Iterable - listExternalNonContainerDatabasesResponseIterator( - final ListExternalNonContainerDatabasesRequest request) { + public Iterable listExadbVmClustersResponseIterator( + final ListExadbVmClustersRequest request) { return new com.oracle.bmc.paginator.internal.ResponseIterable< - ListExternalNonContainerDatabasesRequest.Builder, - ListExternalNonContainerDatabasesRequest, - ListExternalNonContainerDatabasesResponse>( - new java.util.function.Supplier< - ListExternalNonContainerDatabasesRequest.Builder>() { + ListExadbVmClustersRequest.Builder, ListExadbVmClustersRequest, + ListExadbVmClustersResponse>( + new java.util.function.Supplier() { @Override - public ListExternalNonContainerDatabasesRequest.Builder get() { - return ListExternalNonContainerDatabasesRequest.builder().copy(request); + public ListExadbVmClustersRequest.Builder get() { + return ListExadbVmClustersRequest.builder().copy(request); } }, - new java.util.function.Function< - ListExternalNonContainerDatabasesResponse, String>() { + new java.util.function.Function() { @Override - public String apply(ListExternalNonContainerDatabasesResponse response) { + public String apply(ListExadbVmClustersResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListExternalNonContainerDatabasesRequest.Builder>, - ListExternalNonContainerDatabasesRequest>() { + ListExadbVmClustersRequest.Builder>, + ListExadbVmClustersRequest>() { @Override - public ListExternalNonContainerDatabasesRequest apply( + public ListExadbVmClustersRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListExternalNonContainerDatabasesRequest.Builder> + ListExadbVmClustersRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -5636,54 +5638,48 @@ public ListExternalNonContainerDatabasesRequest apply( } }, new java.util.function.Function< - ListExternalNonContainerDatabasesRequest, - ListExternalNonContainerDatabasesResponse>() { + ListExadbVmClustersRequest, ListExadbVmClustersResponse>() { @Override - public ListExternalNonContainerDatabasesResponse apply( - ListExternalNonContainerDatabasesRequest request) { - return client.listExternalNonContainerDatabases(request); + public ListExadbVmClustersResponse apply(ListExadbVmClustersRequest request) { + return client.listExadbVmClusters(request); } }); } /** - * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.ExternalNonContainerDatabaseSummary} objects - * contained in responses from the listExternalNonContainerDatabases operation. This iterable will fetch more data from the + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.ExadbVmClusterSummary} objects + * contained in responses from the listExadbVmClusters operation. This iterable will fetch more data from the * server as needed. * * @param request a request which can be sent to the service operation - * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.ExternalNonContainerDatabaseSummary} objects + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.ExadbVmClusterSummary} objects * contained in responses received from the service. */ - public Iterable - listExternalNonContainerDatabasesRecordIterator( - final ListExternalNonContainerDatabasesRequest request) { + public Iterable + listExadbVmClustersRecordIterator(final ListExadbVmClustersRequest request) { return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< - ListExternalNonContainerDatabasesRequest.Builder, - ListExternalNonContainerDatabasesRequest, ListExternalNonContainerDatabasesResponse, - com.oracle.bmc.database.model.ExternalNonContainerDatabaseSummary>( - new java.util.function.Supplier< - ListExternalNonContainerDatabasesRequest.Builder>() { + ListExadbVmClustersRequest.Builder, ListExadbVmClustersRequest, + ListExadbVmClustersResponse, com.oracle.bmc.database.model.ExadbVmClusterSummary>( + new java.util.function.Supplier() { @Override - public ListExternalNonContainerDatabasesRequest.Builder get() { - return ListExternalNonContainerDatabasesRequest.builder().copy(request); + public ListExadbVmClustersRequest.Builder get() { + return ListExadbVmClustersRequest.builder().copy(request); } }, - new java.util.function.Function< - ListExternalNonContainerDatabasesResponse, String>() { + new java.util.function.Function() { @Override - public String apply(ListExternalNonContainerDatabasesResponse response) { + public String apply(ListExadbVmClustersResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListExternalNonContainerDatabasesRequest.Builder>, - ListExternalNonContainerDatabasesRequest>() { + ListExadbVmClustersRequest.Builder>, + ListExadbVmClustersRequest>() { @Override - public ListExternalNonContainerDatabasesRequest apply( + public ListExadbVmClustersRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListExternalNonContainerDatabasesRequest.Builder> + ListExadbVmClustersRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -5695,62 +5691,56 @@ public ListExternalNonContainerDatabasesRequest apply( } }, new java.util.function.Function< - ListExternalNonContainerDatabasesRequest, - ListExternalNonContainerDatabasesResponse>() { + ListExadbVmClustersRequest, ListExadbVmClustersResponse>() { @Override - public ListExternalNonContainerDatabasesResponse apply( - ListExternalNonContainerDatabasesRequest request) { - return client.listExternalNonContainerDatabases(request); + public ListExadbVmClustersResponse apply(ListExadbVmClustersRequest request) { + return client.listExadbVmClusters(request); } }, new java.util.function.Function< - ListExternalNonContainerDatabasesResponse, - java.util.List< - com.oracle.bmc.database.model - .ExternalNonContainerDatabaseSummary>>() { + ListExadbVmClustersResponse, + java.util.List>() { @Override - public java.util.List< - com.oracle.bmc.database.model - .ExternalNonContainerDatabaseSummary> - apply(ListExternalNonContainerDatabasesResponse response) { + public java.util.List + apply(ListExadbVmClustersResponse response) { return response.getItems(); } }); } /** - * Creates a new iterable which will iterate over the responses received from the listExternalPluggableDatabases operation. This iterable + * Creates a new iterable which will iterate over the responses received from the listExascaleDbStorageVaults operation. This iterable * will fetch more data from the server as needed. * * @param request a request which can be sent to the service operation * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. */ - public Iterable - listExternalPluggableDatabasesResponseIterator( - final ListExternalPluggableDatabasesRequest request) { + public Iterable + listExascaleDbStorageVaultsResponseIterator( + final ListExascaleDbStorageVaultsRequest request) { return new com.oracle.bmc.paginator.internal.ResponseIterable< - ListExternalPluggableDatabasesRequest.Builder, - ListExternalPluggableDatabasesRequest, ListExternalPluggableDatabasesResponse>( - new java.util.function.Supplier() { + ListExascaleDbStorageVaultsRequest.Builder, ListExascaleDbStorageVaultsRequest, + ListExascaleDbStorageVaultsResponse>( + new java.util.function.Supplier() { @Override - public ListExternalPluggableDatabasesRequest.Builder get() { - return ListExternalPluggableDatabasesRequest.builder().copy(request); + public ListExascaleDbStorageVaultsRequest.Builder get() { + return ListExascaleDbStorageVaultsRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListExternalPluggableDatabasesResponse response) { + public String apply(ListExascaleDbStorageVaultsResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListExternalPluggableDatabasesRequest.Builder>, - ListExternalPluggableDatabasesRequest>() { + ListExascaleDbStorageVaultsRequest.Builder>, + ListExascaleDbStorageVaultsRequest>() { @Override - public ListExternalPluggableDatabasesRequest apply( + public ListExascaleDbStorageVaultsRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListExternalPluggableDatabasesRequest.Builder> + ListExascaleDbStorageVaultsRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -5762,52 +5752,51 @@ public ListExternalPluggableDatabasesRequest apply( } }, new java.util.function.Function< - ListExternalPluggableDatabasesRequest, - ListExternalPluggableDatabasesResponse>() { + ListExascaleDbStorageVaultsRequest, ListExascaleDbStorageVaultsResponse>() { @Override - public ListExternalPluggableDatabasesResponse apply( - ListExternalPluggableDatabasesRequest request) { - return client.listExternalPluggableDatabases(request); + public ListExascaleDbStorageVaultsResponse apply( + ListExascaleDbStorageVaultsRequest request) { + return client.listExascaleDbStorageVaults(request); } }); } /** - * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.ExternalPluggableDatabaseSummary} objects - * contained in responses from the listExternalPluggableDatabases operation. This iterable will fetch more data from the + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.ExascaleDbStorageVaultSummary} objects + * contained in responses from the listExascaleDbStorageVaults operation. This iterable will fetch more data from the * server as needed. * * @param request a request which can be sent to the service operation - * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.ExternalPluggableDatabaseSummary} objects + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.ExascaleDbStorageVaultSummary} objects * contained in responses received from the service. */ - public Iterable - listExternalPluggableDatabasesRecordIterator( - final ListExternalPluggableDatabasesRequest request) { + public Iterable + listExascaleDbStorageVaultsRecordIterator( + final ListExascaleDbStorageVaultsRequest request) { return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< - ListExternalPluggableDatabasesRequest.Builder, - ListExternalPluggableDatabasesRequest, ListExternalPluggableDatabasesResponse, - com.oracle.bmc.database.model.ExternalPluggableDatabaseSummary>( - new java.util.function.Supplier() { + ListExascaleDbStorageVaultsRequest.Builder, ListExascaleDbStorageVaultsRequest, + ListExascaleDbStorageVaultsResponse, + com.oracle.bmc.database.model.ExascaleDbStorageVaultSummary>( + new java.util.function.Supplier() { @Override - public ListExternalPluggableDatabasesRequest.Builder get() { - return ListExternalPluggableDatabasesRequest.builder().copy(request); + public ListExascaleDbStorageVaultsRequest.Builder get() { + return ListExascaleDbStorageVaultsRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListExternalPluggableDatabasesResponse response) { + public String apply(ListExascaleDbStorageVaultsResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListExternalPluggableDatabasesRequest.Builder>, - ListExternalPluggableDatabasesRequest>() { + ListExascaleDbStorageVaultsRequest.Builder>, + ListExascaleDbStorageVaultsRequest>() { @Override - public ListExternalPluggableDatabasesRequest apply( + public ListExascaleDbStorageVaultsRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListExternalPluggableDatabasesRequest.Builder> + ListExascaleDbStorageVaultsRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -5819,59 +5808,58 @@ public ListExternalPluggableDatabasesRequest apply( } }, new java.util.function.Function< - ListExternalPluggableDatabasesRequest, - ListExternalPluggableDatabasesResponse>() { + ListExascaleDbStorageVaultsRequest, ListExascaleDbStorageVaultsResponse>() { @Override - public ListExternalPluggableDatabasesResponse apply( - ListExternalPluggableDatabasesRequest request) { - return client.listExternalPluggableDatabases(request); + public ListExascaleDbStorageVaultsResponse apply( + ListExascaleDbStorageVaultsRequest request) { + return client.listExascaleDbStorageVaults(request); } }, new java.util.function.Function< - ListExternalPluggableDatabasesResponse, + ListExascaleDbStorageVaultsResponse, java.util.List< - com.oracle.bmc.database.model.ExternalPluggableDatabaseSummary>>() { + com.oracle.bmc.database.model.ExascaleDbStorageVaultSummary>>() { @Override public java.util.List< - com.oracle.bmc.database.model.ExternalPluggableDatabaseSummary> - apply(ListExternalPluggableDatabasesResponse response) { + com.oracle.bmc.database.model.ExascaleDbStorageVaultSummary> + apply(ListExascaleDbStorageVaultsResponse response) { return response.getItems(); } }); } /** - * Creates a new iterable which will iterate over the responses received from the listFlexComponents operation. This iterable + * Creates a new iterable which will iterate over the responses received from the listExecutionActions operation. This iterable * will fetch more data from the server as needed. * * @param request a request which can be sent to the service operation * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. */ - public Iterable listFlexComponentsResponseIterator( - final ListFlexComponentsRequest request) { + public Iterable listExecutionActionsResponseIterator( + final ListExecutionActionsRequest request) { return new com.oracle.bmc.paginator.internal.ResponseIterable< - ListFlexComponentsRequest.Builder, ListFlexComponentsRequest, - ListFlexComponentsResponse>( - new java.util.function.Supplier() { + ListExecutionActionsRequest.Builder, ListExecutionActionsRequest, + ListExecutionActionsResponse>( + new java.util.function.Supplier() { @Override - public ListFlexComponentsRequest.Builder get() { - return ListFlexComponentsRequest.builder().copy(request); + public ListExecutionActionsRequest.Builder get() { + return ListExecutionActionsRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListFlexComponentsResponse response) { + public String apply(ListExecutionActionsResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListFlexComponentsRequest.Builder>, - ListFlexComponentsRequest>() { + ListExecutionActionsRequest.Builder>, + ListExecutionActionsRequest>() { @Override - public ListFlexComponentsRequest apply( + public ListExecutionActionsRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListFlexComponentsRequest.Builder> + ListExecutionActionsRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -5883,48 +5871,48 @@ public ListFlexComponentsRequest apply( } }, new java.util.function.Function< - ListFlexComponentsRequest, ListFlexComponentsResponse>() { + ListExecutionActionsRequest, ListExecutionActionsResponse>() { @Override - public ListFlexComponentsResponse apply(ListFlexComponentsRequest request) { - return client.listFlexComponents(request); + public ListExecutionActionsResponse apply(ListExecutionActionsRequest request) { + return client.listExecutionActions(request); } }); } /** - * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.FlexComponentSummary} objects - * contained in responses from the listFlexComponents operation. This iterable will fetch more data from the + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.ExecutionActionSummary} objects + * contained in responses from the listExecutionActions operation. This iterable will fetch more data from the * server as needed. * * @param request a request which can be sent to the service operation - * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.FlexComponentSummary} objects + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.ExecutionActionSummary} objects * contained in responses received from the service. */ - public Iterable - listFlexComponentsRecordIterator(final ListFlexComponentsRequest request) { + public Iterable + listExecutionActionsRecordIterator(final ListExecutionActionsRequest request) { return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< - ListFlexComponentsRequest.Builder, ListFlexComponentsRequest, - ListFlexComponentsResponse, com.oracle.bmc.database.model.FlexComponentSummary>( - new java.util.function.Supplier() { + ListExecutionActionsRequest.Builder, ListExecutionActionsRequest, + ListExecutionActionsResponse, com.oracle.bmc.database.model.ExecutionActionSummary>( + new java.util.function.Supplier() { @Override - public ListFlexComponentsRequest.Builder get() { - return ListFlexComponentsRequest.builder().copy(request); + public ListExecutionActionsRequest.Builder get() { + return ListExecutionActionsRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListFlexComponentsResponse response) { + public String apply(ListExecutionActionsResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListFlexComponentsRequest.Builder>, - ListFlexComponentsRequest>() { + ListExecutionActionsRequest.Builder>, + ListExecutionActionsRequest>() { @Override - public ListFlexComponentsRequest apply( + public ListExecutionActionsRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListFlexComponentsRequest.Builder> + ListExecutionActionsRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -5936,41 +5924,931 @@ public ListFlexComponentsRequest apply( } }, new java.util.function.Function< - ListFlexComponentsRequest, ListFlexComponentsResponse>() { + ListExecutionActionsRequest, ListExecutionActionsResponse>() { @Override - public ListFlexComponentsResponse apply(ListFlexComponentsRequest request) { - return client.listFlexComponents(request); + public ListExecutionActionsResponse apply(ListExecutionActionsRequest request) { + return client.listExecutionActions(request); } }, new java.util.function.Function< - ListFlexComponentsResponse, - java.util.List>() { + ListExecutionActionsResponse, + java.util.List>() { @Override - public java.util.List apply( - ListFlexComponentsResponse response) { - return response.getFlexComponentCollection().getItems(); + public java.util.List + apply(ListExecutionActionsResponse response) { + return response.getItems(); } }); } /** - * Creates a new iterable which will iterate over the responses received from the listGiVersions operation. This iterable + * Creates a new iterable which will iterate over the responses received from the listExecutionWindows operation. This iterable * will fetch more data from the server as needed. * * @param request a request which can be sent to the service operation * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. */ - public Iterable listGiVersionsResponseIterator( - final ListGiVersionsRequest request) { + public Iterable listExecutionWindowsResponseIterator( + final ListExecutionWindowsRequest request) { return new com.oracle.bmc.paginator.internal.ResponseIterable< - ListGiVersionsRequest.Builder, ListGiVersionsRequest, ListGiVersionsResponse>( - new java.util.function.Supplier() { + ListExecutionWindowsRequest.Builder, ListExecutionWindowsRequest, + ListExecutionWindowsResponse>( + new java.util.function.Supplier() { @Override - public ListGiVersionsRequest.Builder get() { - return ListGiVersionsRequest.builder().copy(request); + public ListExecutionWindowsRequest.Builder get() { + return ListExecutionWindowsRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { + @Override + public String apply(ListExecutionWindowsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExecutionWindowsRequest.Builder>, + ListExecutionWindowsRequest>() { + @Override + public ListExecutionWindowsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExecutionWindowsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListExecutionWindowsRequest, ListExecutionWindowsResponse>() { + @Override + public ListExecutionWindowsResponse apply(ListExecutionWindowsRequest request) { + return client.listExecutionWindows(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.ExecutionWindowSummary} objects + * contained in responses from the listExecutionWindows operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.ExecutionWindowSummary} objects + * contained in responses received from the service. + */ + public Iterable + listExecutionWindowsRecordIterator(final ListExecutionWindowsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListExecutionWindowsRequest.Builder, ListExecutionWindowsRequest, + ListExecutionWindowsResponse, com.oracle.bmc.database.model.ExecutionWindowSummary>( + new java.util.function.Supplier() { + @Override + public ListExecutionWindowsRequest.Builder get() { + return ListExecutionWindowsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListExecutionWindowsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExecutionWindowsRequest.Builder>, + ListExecutionWindowsRequest>() { + @Override + public ListExecutionWindowsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExecutionWindowsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListExecutionWindowsRequest, ListExecutionWindowsResponse>() { + @Override + public ListExecutionWindowsResponse apply(ListExecutionWindowsRequest request) { + return client.listExecutionWindows(request); + } + }, + new java.util.function.Function< + ListExecutionWindowsResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListExecutionWindowsResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listExternalContainerDatabases operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listExternalContainerDatabasesResponseIterator( + final ListExternalContainerDatabasesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListExternalContainerDatabasesRequest.Builder, + ListExternalContainerDatabasesRequest, ListExternalContainerDatabasesResponse>( + new java.util.function.Supplier() { + @Override + public ListExternalContainerDatabasesRequest.Builder get() { + return ListExternalContainerDatabasesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListExternalContainerDatabasesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExternalContainerDatabasesRequest.Builder>, + ListExternalContainerDatabasesRequest>() { + @Override + public ListExternalContainerDatabasesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExternalContainerDatabasesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListExternalContainerDatabasesRequest, + ListExternalContainerDatabasesResponse>() { + @Override + public ListExternalContainerDatabasesResponse apply( + ListExternalContainerDatabasesRequest request) { + return client.listExternalContainerDatabases(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.ExternalContainerDatabaseSummary} objects + * contained in responses from the listExternalContainerDatabases operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.ExternalContainerDatabaseSummary} objects + * contained in responses received from the service. + */ + public Iterable + listExternalContainerDatabasesRecordIterator( + final ListExternalContainerDatabasesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListExternalContainerDatabasesRequest.Builder, + ListExternalContainerDatabasesRequest, ListExternalContainerDatabasesResponse, + com.oracle.bmc.database.model.ExternalContainerDatabaseSummary>( + new java.util.function.Supplier() { + @Override + public ListExternalContainerDatabasesRequest.Builder get() { + return ListExternalContainerDatabasesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListExternalContainerDatabasesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExternalContainerDatabasesRequest.Builder>, + ListExternalContainerDatabasesRequest>() { + @Override + public ListExternalContainerDatabasesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExternalContainerDatabasesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListExternalContainerDatabasesRequest, + ListExternalContainerDatabasesResponse>() { + @Override + public ListExternalContainerDatabasesResponse apply( + ListExternalContainerDatabasesRequest request) { + return client.listExternalContainerDatabases(request); + } + }, + new java.util.function.Function< + ListExternalContainerDatabasesResponse, + java.util.List< + com.oracle.bmc.database.model.ExternalContainerDatabaseSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.database.model.ExternalContainerDatabaseSummary> + apply(ListExternalContainerDatabasesResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listExternalDatabaseConnectors operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listExternalDatabaseConnectorsResponseIterator( + final ListExternalDatabaseConnectorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListExternalDatabaseConnectorsRequest.Builder, + ListExternalDatabaseConnectorsRequest, ListExternalDatabaseConnectorsResponse>( + new java.util.function.Supplier() { + @Override + public ListExternalDatabaseConnectorsRequest.Builder get() { + return ListExternalDatabaseConnectorsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListExternalDatabaseConnectorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExternalDatabaseConnectorsRequest.Builder>, + ListExternalDatabaseConnectorsRequest>() { + @Override + public ListExternalDatabaseConnectorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExternalDatabaseConnectorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListExternalDatabaseConnectorsRequest, + ListExternalDatabaseConnectorsResponse>() { + @Override + public ListExternalDatabaseConnectorsResponse apply( + ListExternalDatabaseConnectorsRequest request) { + return client.listExternalDatabaseConnectors(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.ExternalDatabaseConnectorSummary} objects + * contained in responses from the listExternalDatabaseConnectors operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.ExternalDatabaseConnectorSummary} objects + * contained in responses received from the service. + */ + public Iterable + listExternalDatabaseConnectorsRecordIterator( + final ListExternalDatabaseConnectorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListExternalDatabaseConnectorsRequest.Builder, + ListExternalDatabaseConnectorsRequest, ListExternalDatabaseConnectorsResponse, + com.oracle.bmc.database.model.ExternalDatabaseConnectorSummary>( + new java.util.function.Supplier() { + @Override + public ListExternalDatabaseConnectorsRequest.Builder get() { + return ListExternalDatabaseConnectorsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListExternalDatabaseConnectorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExternalDatabaseConnectorsRequest.Builder>, + ListExternalDatabaseConnectorsRequest>() { + @Override + public ListExternalDatabaseConnectorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExternalDatabaseConnectorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListExternalDatabaseConnectorsRequest, + ListExternalDatabaseConnectorsResponse>() { + @Override + public ListExternalDatabaseConnectorsResponse apply( + ListExternalDatabaseConnectorsRequest request) { + return client.listExternalDatabaseConnectors(request); + } + }, + new java.util.function.Function< + ListExternalDatabaseConnectorsResponse, + java.util.List< + com.oracle.bmc.database.model.ExternalDatabaseConnectorSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.database.model.ExternalDatabaseConnectorSummary> + apply(ListExternalDatabaseConnectorsResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listExternalNonContainerDatabases operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listExternalNonContainerDatabasesResponseIterator( + final ListExternalNonContainerDatabasesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListExternalNonContainerDatabasesRequest.Builder, + ListExternalNonContainerDatabasesRequest, + ListExternalNonContainerDatabasesResponse>( + new java.util.function.Supplier< + ListExternalNonContainerDatabasesRequest.Builder>() { + @Override + public ListExternalNonContainerDatabasesRequest.Builder get() { + return ListExternalNonContainerDatabasesRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListExternalNonContainerDatabasesResponse, String>() { + @Override + public String apply(ListExternalNonContainerDatabasesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExternalNonContainerDatabasesRequest.Builder>, + ListExternalNonContainerDatabasesRequest>() { + @Override + public ListExternalNonContainerDatabasesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExternalNonContainerDatabasesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListExternalNonContainerDatabasesRequest, + ListExternalNonContainerDatabasesResponse>() { + @Override + public ListExternalNonContainerDatabasesResponse apply( + ListExternalNonContainerDatabasesRequest request) { + return client.listExternalNonContainerDatabases(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.ExternalNonContainerDatabaseSummary} objects + * contained in responses from the listExternalNonContainerDatabases operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.ExternalNonContainerDatabaseSummary} objects + * contained in responses received from the service. + */ + public Iterable + listExternalNonContainerDatabasesRecordIterator( + final ListExternalNonContainerDatabasesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListExternalNonContainerDatabasesRequest.Builder, + ListExternalNonContainerDatabasesRequest, ListExternalNonContainerDatabasesResponse, + com.oracle.bmc.database.model.ExternalNonContainerDatabaseSummary>( + new java.util.function.Supplier< + ListExternalNonContainerDatabasesRequest.Builder>() { + @Override + public ListExternalNonContainerDatabasesRequest.Builder get() { + return ListExternalNonContainerDatabasesRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListExternalNonContainerDatabasesResponse, String>() { + @Override + public String apply(ListExternalNonContainerDatabasesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExternalNonContainerDatabasesRequest.Builder>, + ListExternalNonContainerDatabasesRequest>() { + @Override + public ListExternalNonContainerDatabasesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExternalNonContainerDatabasesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListExternalNonContainerDatabasesRequest, + ListExternalNonContainerDatabasesResponse>() { + @Override + public ListExternalNonContainerDatabasesResponse apply( + ListExternalNonContainerDatabasesRequest request) { + return client.listExternalNonContainerDatabases(request); + } + }, + new java.util.function.Function< + ListExternalNonContainerDatabasesResponse, + java.util.List< + com.oracle.bmc.database.model + .ExternalNonContainerDatabaseSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.database.model + .ExternalNonContainerDatabaseSummary> + apply(ListExternalNonContainerDatabasesResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listExternalPluggableDatabases operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listExternalPluggableDatabasesResponseIterator( + final ListExternalPluggableDatabasesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListExternalPluggableDatabasesRequest.Builder, + ListExternalPluggableDatabasesRequest, ListExternalPluggableDatabasesResponse>( + new java.util.function.Supplier() { + @Override + public ListExternalPluggableDatabasesRequest.Builder get() { + return ListExternalPluggableDatabasesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListExternalPluggableDatabasesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExternalPluggableDatabasesRequest.Builder>, + ListExternalPluggableDatabasesRequest>() { + @Override + public ListExternalPluggableDatabasesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExternalPluggableDatabasesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListExternalPluggableDatabasesRequest, + ListExternalPluggableDatabasesResponse>() { + @Override + public ListExternalPluggableDatabasesResponse apply( + ListExternalPluggableDatabasesRequest request) { + return client.listExternalPluggableDatabases(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.ExternalPluggableDatabaseSummary} objects + * contained in responses from the listExternalPluggableDatabases operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.ExternalPluggableDatabaseSummary} objects + * contained in responses received from the service. + */ + public Iterable + listExternalPluggableDatabasesRecordIterator( + final ListExternalPluggableDatabasesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListExternalPluggableDatabasesRequest.Builder, + ListExternalPluggableDatabasesRequest, ListExternalPluggableDatabasesResponse, + com.oracle.bmc.database.model.ExternalPluggableDatabaseSummary>( + new java.util.function.Supplier() { + @Override + public ListExternalPluggableDatabasesRequest.Builder get() { + return ListExternalPluggableDatabasesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListExternalPluggableDatabasesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExternalPluggableDatabasesRequest.Builder>, + ListExternalPluggableDatabasesRequest>() { + @Override + public ListExternalPluggableDatabasesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExternalPluggableDatabasesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListExternalPluggableDatabasesRequest, + ListExternalPluggableDatabasesResponse>() { + @Override + public ListExternalPluggableDatabasesResponse apply( + ListExternalPluggableDatabasesRequest request) { + return client.listExternalPluggableDatabases(request); + } + }, + new java.util.function.Function< + ListExternalPluggableDatabasesResponse, + java.util.List< + com.oracle.bmc.database.model.ExternalPluggableDatabaseSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.database.model.ExternalPluggableDatabaseSummary> + apply(ListExternalPluggableDatabasesResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listFlexComponents operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listFlexComponentsResponseIterator( + final ListFlexComponentsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListFlexComponentsRequest.Builder, ListFlexComponentsRequest, + ListFlexComponentsResponse>( + new java.util.function.Supplier() { + @Override + public ListFlexComponentsRequest.Builder get() { + return ListFlexComponentsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListFlexComponentsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFlexComponentsRequest.Builder>, + ListFlexComponentsRequest>() { + @Override + public ListFlexComponentsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFlexComponentsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListFlexComponentsRequest, ListFlexComponentsResponse>() { + @Override + public ListFlexComponentsResponse apply(ListFlexComponentsRequest request) { + return client.listFlexComponents(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.FlexComponentSummary} objects + * contained in responses from the listFlexComponents operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.FlexComponentSummary} objects + * contained in responses received from the service. + */ + public Iterable + listFlexComponentsRecordIterator(final ListFlexComponentsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListFlexComponentsRequest.Builder, ListFlexComponentsRequest, + ListFlexComponentsResponse, com.oracle.bmc.database.model.FlexComponentSummary>( + new java.util.function.Supplier() { + @Override + public ListFlexComponentsRequest.Builder get() { + return ListFlexComponentsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListFlexComponentsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFlexComponentsRequest.Builder>, + ListFlexComponentsRequest>() { + @Override + public ListFlexComponentsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFlexComponentsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListFlexComponentsRequest, ListFlexComponentsResponse>() { + @Override + public ListFlexComponentsResponse apply(ListFlexComponentsRequest request) { + return client.listFlexComponents(request); + } + }, + new java.util.function.Function< + ListFlexComponentsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListFlexComponentsResponse response) { + return response.getFlexComponentCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listGiVersionMinorVersions operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listGiVersionMinorVersionsResponseIterator( + final ListGiVersionMinorVersionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListGiVersionMinorVersionsRequest.Builder, ListGiVersionMinorVersionsRequest, + ListGiVersionMinorVersionsResponse>( + new java.util.function.Supplier() { + @Override + public ListGiVersionMinorVersionsRequest.Builder get() { + return ListGiVersionMinorVersionsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListGiVersionMinorVersionsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListGiVersionMinorVersionsRequest.Builder>, + ListGiVersionMinorVersionsRequest>() { + @Override + public ListGiVersionMinorVersionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListGiVersionMinorVersionsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListGiVersionMinorVersionsRequest, ListGiVersionMinorVersionsResponse>() { + @Override + public ListGiVersionMinorVersionsResponse apply( + ListGiVersionMinorVersionsRequest request) { + return client.listGiVersionMinorVersions(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.GiMinorVersionSummary} objects + * contained in responses from the listGiVersionMinorVersions operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.GiMinorVersionSummary} objects + * contained in responses received from the service. + */ + public Iterable + listGiVersionMinorVersionsRecordIterator( + final ListGiVersionMinorVersionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListGiVersionMinorVersionsRequest.Builder, ListGiVersionMinorVersionsRequest, + ListGiVersionMinorVersionsResponse, + com.oracle.bmc.database.model.GiMinorVersionSummary>( + new java.util.function.Supplier() { + @Override + public ListGiVersionMinorVersionsRequest.Builder get() { + return ListGiVersionMinorVersionsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListGiVersionMinorVersionsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListGiVersionMinorVersionsRequest.Builder>, + ListGiVersionMinorVersionsRequest>() { + @Override + public ListGiVersionMinorVersionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListGiVersionMinorVersionsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListGiVersionMinorVersionsRequest, ListGiVersionMinorVersionsResponse>() { + @Override + public ListGiVersionMinorVersionsResponse apply( + ListGiVersionMinorVersionsRequest request) { + return client.listGiVersionMinorVersions(request); + } + }, + new java.util.function.Function< + ListGiVersionMinorVersionsResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListGiVersionMinorVersionsResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listGiVersions operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listGiVersionsResponseIterator( + final ListGiVersionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListGiVersionsRequest.Builder, ListGiVersionsRequest, ListGiVersionsResponse>( + new java.util.function.Supplier() { + @Override + public ListGiVersionsRequest.Builder get() { + return ListGiVersionsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListGiVersionsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListGiVersionsRequest.Builder>, + ListGiVersionsRequest>() { + @Override + public ListGiVersionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListGiVersionsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListGiVersionsResponse apply(ListGiVersionsRequest request) { + return client.listGiVersions(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.GiVersionSummary} objects + * contained in responses from the listGiVersions operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.GiVersionSummary} objects + * contained in responses received from the service. + */ + public Iterable listGiVersionsRecordIterator( + final ListGiVersionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListGiVersionsRequest.Builder, ListGiVersionsRequest, ListGiVersionsResponse, + com.oracle.bmc.database.model.GiVersionSummary>( + new java.util.function.Supplier() { + @Override + public ListGiVersionsRequest.Builder get() { + return ListGiVersionsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { @Override public String apply(ListGiVersionsResponse response) { return response.getOpcNextPage(); @@ -5978,12 +6856,466 @@ public String apply(ListGiVersionsResponse response) { }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListGiVersionsRequest.Builder>, - ListGiVersionsRequest>() { + ListGiVersionsRequest.Builder>, + ListGiVersionsRequest>() { + @Override + public ListGiVersionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListGiVersionsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListGiVersionsResponse apply(ListGiVersionsRequest request) { + return client.listGiVersions(request); + } + }, + new java.util.function.Function< + ListGiVersionsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListGiVersionsResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listKeyStores operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listKeyStoresResponseIterator( + final ListKeyStoresRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListKeyStoresRequest.Builder, ListKeyStoresRequest, ListKeyStoresResponse>( + new java.util.function.Supplier() { + @Override + public ListKeyStoresRequest.Builder get() { + return ListKeyStoresRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListKeyStoresResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListKeyStoresRequest.Builder>, + ListKeyStoresRequest>() { + @Override + public ListKeyStoresRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListKeyStoresRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListKeyStoresResponse apply(ListKeyStoresRequest request) { + return client.listKeyStores(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.KeyStoreSummary} objects + * contained in responses from the listKeyStores operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.KeyStoreSummary} objects + * contained in responses received from the service. + */ + public Iterable listKeyStoresRecordIterator( + final ListKeyStoresRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListKeyStoresRequest.Builder, ListKeyStoresRequest, ListKeyStoresResponse, + com.oracle.bmc.database.model.KeyStoreSummary>( + new java.util.function.Supplier() { + @Override + public ListKeyStoresRequest.Builder get() { + return ListKeyStoresRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListKeyStoresResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListKeyStoresRequest.Builder>, + ListKeyStoresRequest>() { + @Override + public ListKeyStoresRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListKeyStoresRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListKeyStoresResponse apply(ListKeyStoresRequest request) { + return client.listKeyStores(request); + } + }, + new java.util.function.Function< + ListKeyStoresResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListKeyStoresResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listMaintenanceRunHistory operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listMaintenanceRunHistoryResponseIterator( + final ListMaintenanceRunHistoryRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListMaintenanceRunHistoryRequest.Builder, ListMaintenanceRunHistoryRequest, + ListMaintenanceRunHistoryResponse>( + new java.util.function.Supplier() { + @Override + public ListMaintenanceRunHistoryRequest.Builder get() { + return ListMaintenanceRunHistoryRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListMaintenanceRunHistoryResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMaintenanceRunHistoryRequest.Builder>, + ListMaintenanceRunHistoryRequest>() { + @Override + public ListMaintenanceRunHistoryRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMaintenanceRunHistoryRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListMaintenanceRunHistoryRequest, ListMaintenanceRunHistoryResponse>() { + @Override + public ListMaintenanceRunHistoryResponse apply( + ListMaintenanceRunHistoryRequest request) { + return client.listMaintenanceRunHistory(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.MaintenanceRunHistorySummary} objects + * contained in responses from the listMaintenanceRunHistory operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.MaintenanceRunHistorySummary} objects + * contained in responses received from the service. + */ + public Iterable + listMaintenanceRunHistoryRecordIterator( + final ListMaintenanceRunHistoryRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListMaintenanceRunHistoryRequest.Builder, ListMaintenanceRunHistoryRequest, + ListMaintenanceRunHistoryResponse, + com.oracle.bmc.database.model.MaintenanceRunHistorySummary>( + new java.util.function.Supplier() { + @Override + public ListMaintenanceRunHistoryRequest.Builder get() { + return ListMaintenanceRunHistoryRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListMaintenanceRunHistoryResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMaintenanceRunHistoryRequest.Builder>, + ListMaintenanceRunHistoryRequest>() { + @Override + public ListMaintenanceRunHistoryRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMaintenanceRunHistoryRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListMaintenanceRunHistoryRequest, ListMaintenanceRunHistoryResponse>() { + @Override + public ListMaintenanceRunHistoryResponse apply( + ListMaintenanceRunHistoryRequest request) { + return client.listMaintenanceRunHistory(request); + } + }, + new java.util.function.Function< + ListMaintenanceRunHistoryResponse, + java.util.List< + com.oracle.bmc.database.model.MaintenanceRunHistorySummary>>() { + @Override + public java.util.List< + com.oracle.bmc.database.model.MaintenanceRunHistorySummary> + apply(ListMaintenanceRunHistoryResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listMaintenanceRuns operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listMaintenanceRunsResponseIterator( + final ListMaintenanceRunsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListMaintenanceRunsRequest.Builder, ListMaintenanceRunsRequest, + ListMaintenanceRunsResponse>( + new java.util.function.Supplier() { + @Override + public ListMaintenanceRunsRequest.Builder get() { + return ListMaintenanceRunsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListMaintenanceRunsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMaintenanceRunsRequest.Builder>, + ListMaintenanceRunsRequest>() { + @Override + public ListMaintenanceRunsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMaintenanceRunsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListMaintenanceRunsRequest, ListMaintenanceRunsResponse>() { + @Override + public ListMaintenanceRunsResponse apply(ListMaintenanceRunsRequest request) { + return client.listMaintenanceRuns(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.MaintenanceRunSummary} objects + * contained in responses from the listMaintenanceRuns operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.MaintenanceRunSummary} objects + * contained in responses received from the service. + */ + public Iterable + listMaintenanceRunsRecordIterator(final ListMaintenanceRunsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListMaintenanceRunsRequest.Builder, ListMaintenanceRunsRequest, + ListMaintenanceRunsResponse, com.oracle.bmc.database.model.MaintenanceRunSummary>( + new java.util.function.Supplier() { + @Override + public ListMaintenanceRunsRequest.Builder get() { + return ListMaintenanceRunsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListMaintenanceRunsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMaintenanceRunsRequest.Builder>, + ListMaintenanceRunsRequest>() { + @Override + public ListMaintenanceRunsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMaintenanceRunsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListMaintenanceRunsRequest, ListMaintenanceRunsResponse>() { + @Override + public ListMaintenanceRunsResponse apply(ListMaintenanceRunsRequest request) { + return client.listMaintenanceRuns(request); + } + }, + new java.util.function.Function< + ListMaintenanceRunsResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListMaintenanceRunsResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listOneoffPatches operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listOneoffPatchesResponseIterator( + final ListOneoffPatchesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListOneoffPatchesRequest.Builder, ListOneoffPatchesRequest, + ListOneoffPatchesResponse>( + new java.util.function.Supplier() { + @Override + public ListOneoffPatchesRequest.Builder get() { + return ListOneoffPatchesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListOneoffPatchesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOneoffPatchesRequest.Builder>, + ListOneoffPatchesRequest>() { + @Override + public ListOneoffPatchesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOneoffPatchesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListOneoffPatchesRequest, ListOneoffPatchesResponse>() { + @Override + public ListOneoffPatchesResponse apply(ListOneoffPatchesRequest request) { + return client.listOneoffPatches(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.OneoffPatchSummary} objects + * contained in responses from the listOneoffPatches operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.OneoffPatchSummary} objects + * contained in responses received from the service. + */ + public Iterable + listOneoffPatchesRecordIterator(final ListOneoffPatchesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListOneoffPatchesRequest.Builder, ListOneoffPatchesRequest, + ListOneoffPatchesResponse, com.oracle.bmc.database.model.OneoffPatchSummary>( + new java.util.function.Supplier() { + @Override + public ListOneoffPatchesRequest.Builder get() { + return ListOneoffPatchesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListOneoffPatchesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOneoffPatchesRequest.Builder>, + ListOneoffPatchesRequest>() { @Override - public ListGiVersionsRequest apply( + public ListOneoffPatchesRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListGiVersionsRequest.Builder> + ListOneoffPatchesRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -5994,48 +7326,111 @@ public ListGiVersionsRequest apply( } } }, - new java.util.function.Function() { + new java.util.function.Function< + ListOneoffPatchesRequest, ListOneoffPatchesResponse>() { @Override - public ListGiVersionsResponse apply(ListGiVersionsRequest request) { - return client.listGiVersions(request); + public ListOneoffPatchesResponse apply(ListOneoffPatchesRequest request) { + return client.listOneoffPatches(request); + } + }, + new java.util.function.Function< + ListOneoffPatchesResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListOneoffPatchesResponse response) { + return response.getItems(); } }); } /** - * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.GiVersionSummary} objects - * contained in responses from the listGiVersions operation. This iterable will fetch more data from the + * Creates a new iterable which will iterate over the responses received from the listParamsForActionType operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listParamsForActionTypeResponseIterator( + final ListParamsForActionTypeRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListParamsForActionTypeRequest.Builder, ListParamsForActionTypeRequest, + ListParamsForActionTypeResponse>( + new java.util.function.Supplier() { + @Override + public ListParamsForActionTypeRequest.Builder get() { + return ListParamsForActionTypeRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListParamsForActionTypeResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListParamsForActionTypeRequest.Builder>, + ListParamsForActionTypeRequest>() { + @Override + public ListParamsForActionTypeRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListParamsForActionTypeRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListParamsForActionTypeRequest, ListParamsForActionTypeResponse>() { + @Override + public ListParamsForActionTypeResponse apply( + ListParamsForActionTypeRequest request) { + return client.listParamsForActionType(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.ActionParamValuesSummary} objects + * contained in responses from the listParamsForActionType operation. This iterable will fetch more data from the * server as needed. * * @param request a request which can be sent to the service operation - * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.GiVersionSummary} objects + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.ActionParamValuesSummary} objects * contained in responses received from the service. */ - public Iterable listGiVersionsRecordIterator( - final ListGiVersionsRequest request) { + public Iterable + listParamsForActionTypeRecordIterator(final ListParamsForActionTypeRequest request) { return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< - ListGiVersionsRequest.Builder, ListGiVersionsRequest, ListGiVersionsResponse, - com.oracle.bmc.database.model.GiVersionSummary>( - new java.util.function.Supplier() { + ListParamsForActionTypeRequest.Builder, ListParamsForActionTypeRequest, + ListParamsForActionTypeResponse, + com.oracle.bmc.database.model.ActionParamValuesSummary>( + new java.util.function.Supplier() { @Override - public ListGiVersionsRequest.Builder get() { - return ListGiVersionsRequest.builder().copy(request); + public ListParamsForActionTypeRequest.Builder get() { + return ListParamsForActionTypeRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListGiVersionsResponse response) { + public String apply(ListParamsForActionTypeResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListGiVersionsRequest.Builder>, - ListGiVersionsRequest>() { + ListParamsForActionTypeRequest.Builder>, + ListParamsForActionTypeRequest>() { @Override - public ListGiVersionsRequest apply( + public ListParamsForActionTypeRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListGiVersionsRequest.Builder> + ListParamsForActionTypeRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -6046,54 +7441,179 @@ public ListGiVersionsRequest apply( } } }, - new java.util.function.Function() { + new java.util.function.Function< + ListParamsForActionTypeRequest, ListParamsForActionTypeResponse>() { @Override - public ListGiVersionsResponse apply(ListGiVersionsRequest request) { - return client.listGiVersions(request); + public ListParamsForActionTypeResponse apply( + ListParamsForActionTypeRequest request) { + return client.listParamsForActionType(request); } }, new java.util.function.Function< - ListGiVersionsResponse, - java.util.List>() { + ListParamsForActionTypeResponse, + java.util.List>() { @Override - public java.util.List apply( - ListGiVersionsResponse response) { + public java.util.List + apply(ListParamsForActionTypeResponse response) { + return response.getActionParamValuesCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listPdbConversionHistoryEntries operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listPdbConversionHistoryEntriesResponseIterator( + final ListPdbConversionHistoryEntriesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListPdbConversionHistoryEntriesRequest.Builder, + ListPdbConversionHistoryEntriesRequest, ListPdbConversionHistoryEntriesResponse>( + new java.util.function.Supplier() { + @Override + public ListPdbConversionHistoryEntriesRequest.Builder get() { + return ListPdbConversionHistoryEntriesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPdbConversionHistoryEntriesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPdbConversionHistoryEntriesRequest.Builder>, + ListPdbConversionHistoryEntriesRequest>() { + @Override + public ListPdbConversionHistoryEntriesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPdbConversionHistoryEntriesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListPdbConversionHistoryEntriesRequest, + ListPdbConversionHistoryEntriesResponse>() { + @Override + public ListPdbConversionHistoryEntriesResponse apply( + ListPdbConversionHistoryEntriesRequest request) { + return client.listPdbConversionHistoryEntries(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.PdbConversionHistoryEntrySummary} objects + * contained in responses from the listPdbConversionHistoryEntries operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.PdbConversionHistoryEntrySummary} objects + * contained in responses received from the service. + */ + public Iterable + listPdbConversionHistoryEntriesRecordIterator( + final ListPdbConversionHistoryEntriesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListPdbConversionHistoryEntriesRequest.Builder, + ListPdbConversionHistoryEntriesRequest, ListPdbConversionHistoryEntriesResponse, + com.oracle.bmc.database.model.PdbConversionHistoryEntrySummary>( + new java.util.function.Supplier() { + @Override + public ListPdbConversionHistoryEntriesRequest.Builder get() { + return ListPdbConversionHistoryEntriesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPdbConversionHistoryEntriesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPdbConversionHistoryEntriesRequest.Builder>, + ListPdbConversionHistoryEntriesRequest>() { + @Override + public ListPdbConversionHistoryEntriesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPdbConversionHistoryEntriesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListPdbConversionHistoryEntriesRequest, + ListPdbConversionHistoryEntriesResponse>() { + @Override + public ListPdbConversionHistoryEntriesResponse apply( + ListPdbConversionHistoryEntriesRequest request) { + return client.listPdbConversionHistoryEntries(request); + } + }, + new java.util.function.Function< + ListPdbConversionHistoryEntriesResponse, + java.util.List< + com.oracle.bmc.database.model.PdbConversionHistoryEntrySummary>>() { + @Override + public java.util.List< + com.oracle.bmc.database.model.PdbConversionHistoryEntrySummary> + apply(ListPdbConversionHistoryEntriesResponse response) { return response.getItems(); } }); } /** - * Creates a new iterable which will iterate over the responses received from the listKeyStores operation. This iterable + * Creates a new iterable which will iterate over the responses received from the listPluggableDatabases operation. This iterable * will fetch more data from the server as needed. * * @param request a request which can be sent to the service operation * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. */ - public Iterable listKeyStoresResponseIterator( - final ListKeyStoresRequest request) { + public Iterable listPluggableDatabasesResponseIterator( + final ListPluggableDatabasesRequest request) { return new com.oracle.bmc.paginator.internal.ResponseIterable< - ListKeyStoresRequest.Builder, ListKeyStoresRequest, ListKeyStoresResponse>( - new java.util.function.Supplier() { + ListPluggableDatabasesRequest.Builder, ListPluggableDatabasesRequest, + ListPluggableDatabasesResponse>( + new java.util.function.Supplier() { @Override - public ListKeyStoresRequest.Builder get() { - return ListKeyStoresRequest.builder().copy(request); + public ListPluggableDatabasesRequest.Builder get() { + return ListPluggableDatabasesRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListKeyStoresResponse response) { + public String apply(ListPluggableDatabasesResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListKeyStoresRequest.Builder>, - ListKeyStoresRequest>() { + ListPluggableDatabasesRequest.Builder>, + ListPluggableDatabasesRequest>() { @Override - public ListKeyStoresRequest apply( + public ListPluggableDatabasesRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListKeyStoresRequest.Builder> + ListPluggableDatabasesRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -6104,48 +7624,51 @@ public ListKeyStoresRequest apply( } } }, - new java.util.function.Function() { + new java.util.function.Function< + ListPluggableDatabasesRequest, ListPluggableDatabasesResponse>() { @Override - public ListKeyStoresResponse apply(ListKeyStoresRequest request) { - return client.listKeyStores(request); + public ListPluggableDatabasesResponse apply( + ListPluggableDatabasesRequest request) { + return client.listPluggableDatabases(request); } }); } /** - * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.KeyStoreSummary} objects - * contained in responses from the listKeyStores operation. This iterable will fetch more data from the + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.PluggableDatabaseSummary} objects + * contained in responses from the listPluggableDatabases operation. This iterable will fetch more data from the * server as needed. * * @param request a request which can be sent to the service operation - * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.KeyStoreSummary} objects + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.PluggableDatabaseSummary} objects * contained in responses received from the service. */ - public Iterable listKeyStoresRecordIterator( - final ListKeyStoresRequest request) { + public Iterable + listPluggableDatabasesRecordIterator(final ListPluggableDatabasesRequest request) { return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< - ListKeyStoresRequest.Builder, ListKeyStoresRequest, ListKeyStoresResponse, - com.oracle.bmc.database.model.KeyStoreSummary>( - new java.util.function.Supplier() { + ListPluggableDatabasesRequest.Builder, ListPluggableDatabasesRequest, + ListPluggableDatabasesResponse, + com.oracle.bmc.database.model.PluggableDatabaseSummary>( + new java.util.function.Supplier() { @Override - public ListKeyStoresRequest.Builder get() { - return ListKeyStoresRequest.builder().copy(request); + public ListPluggableDatabasesRequest.Builder get() { + return ListPluggableDatabasesRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListKeyStoresResponse response) { + public String apply(ListPluggableDatabasesResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListKeyStoresRequest.Builder>, - ListKeyStoresRequest>() { + ListPluggableDatabasesRequest.Builder>, + ListPluggableDatabasesRequest>() { @Override - public ListKeyStoresRequest apply( + public ListPluggableDatabasesRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListKeyStoresRequest.Builder> + ListPluggableDatabasesRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -6156,55 +7679,58 @@ public ListKeyStoresRequest apply( } } }, - new java.util.function.Function() { + new java.util.function.Function< + ListPluggableDatabasesRequest, ListPluggableDatabasesResponse>() { @Override - public ListKeyStoresResponse apply(ListKeyStoresRequest request) { - return client.listKeyStores(request); + public ListPluggableDatabasesResponse apply( + ListPluggableDatabasesRequest request) { + return client.listPluggableDatabases(request); } }, new java.util.function.Function< - ListKeyStoresResponse, - java.util.List>() { + ListPluggableDatabasesResponse, + java.util.List>() { @Override - public java.util.List apply( - ListKeyStoresResponse response) { + public java.util.List + apply(ListPluggableDatabasesResponse response) { return response.getItems(); } }); } /** - * Creates a new iterable which will iterate over the responses received from the listMaintenanceRunHistory operation. This iterable + * Creates a new iterable which will iterate over the responses received from the listRecommendedScheduledActions operation. This iterable * will fetch more data from the server as needed. * * @param request a request which can be sent to the service operation * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. */ - public Iterable listMaintenanceRunHistoryResponseIterator( - final ListMaintenanceRunHistoryRequest request) { + public Iterable + listRecommendedScheduledActionsResponseIterator( + final ListRecommendedScheduledActionsRequest request) { return new com.oracle.bmc.paginator.internal.ResponseIterable< - ListMaintenanceRunHistoryRequest.Builder, ListMaintenanceRunHistoryRequest, - ListMaintenanceRunHistoryResponse>( - new java.util.function.Supplier() { + ListRecommendedScheduledActionsRequest.Builder, + ListRecommendedScheduledActionsRequest, ListRecommendedScheduledActionsResponse>( + new java.util.function.Supplier() { @Override - public ListMaintenanceRunHistoryRequest.Builder get() { - return ListMaintenanceRunHistoryRequest.builder().copy(request); + public ListRecommendedScheduledActionsRequest.Builder get() { + return ListRecommendedScheduledActionsRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListMaintenanceRunHistoryResponse response) { + public String apply(ListRecommendedScheduledActionsResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListMaintenanceRunHistoryRequest.Builder>, - ListMaintenanceRunHistoryRequest>() { + ListRecommendedScheduledActionsRequest.Builder>, + ListRecommendedScheduledActionsRequest>() { @Override - public ListMaintenanceRunHistoryRequest apply( + public ListRecommendedScheduledActionsRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListMaintenanceRunHistoryRequest.Builder> + ListRecommendedScheduledActionsRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -6216,51 +7742,52 @@ public ListMaintenanceRunHistoryRequest apply( } }, new java.util.function.Function< - ListMaintenanceRunHistoryRequest, ListMaintenanceRunHistoryResponse>() { + ListRecommendedScheduledActionsRequest, + ListRecommendedScheduledActionsResponse>() { @Override - public ListMaintenanceRunHistoryResponse apply( - ListMaintenanceRunHistoryRequest request) { - return client.listMaintenanceRunHistory(request); + public ListRecommendedScheduledActionsResponse apply( + ListRecommendedScheduledActionsRequest request) { + return client.listRecommendedScheduledActions(request); } }); } /** - * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.MaintenanceRunHistorySummary} objects - * contained in responses from the listMaintenanceRunHistory operation. This iterable will fetch more data from the + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.RecommendedScheduledActionSummary} objects + * contained in responses from the listRecommendedScheduledActions operation. This iterable will fetch more data from the * server as needed. * * @param request a request which can be sent to the service operation - * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.MaintenanceRunHistorySummary} objects + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.RecommendedScheduledActionSummary} objects * contained in responses received from the service. */ - public Iterable - listMaintenanceRunHistoryRecordIterator( - final ListMaintenanceRunHistoryRequest request) { + public Iterable + listRecommendedScheduledActionsRecordIterator( + final ListRecommendedScheduledActionsRequest request) { return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< - ListMaintenanceRunHistoryRequest.Builder, ListMaintenanceRunHistoryRequest, - ListMaintenanceRunHistoryResponse, - com.oracle.bmc.database.model.MaintenanceRunHistorySummary>( - new java.util.function.Supplier() { + ListRecommendedScheduledActionsRequest.Builder, + ListRecommendedScheduledActionsRequest, ListRecommendedScheduledActionsResponse, + com.oracle.bmc.database.model.RecommendedScheduledActionSummary>( + new java.util.function.Supplier() { @Override - public ListMaintenanceRunHistoryRequest.Builder get() { - return ListMaintenanceRunHistoryRequest.builder().copy(request); + public ListRecommendedScheduledActionsRequest.Builder get() { + return ListRecommendedScheduledActionsRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListMaintenanceRunHistoryResponse response) { + public String apply(ListRecommendedScheduledActionsResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListMaintenanceRunHistoryRequest.Builder>, - ListMaintenanceRunHistoryRequest>() { + ListRecommendedScheduledActionsRequest.Builder>, + ListRecommendedScheduledActionsRequest>() { @Override - public ListMaintenanceRunHistoryRequest apply( + public ListRecommendedScheduledActionsRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListMaintenanceRunHistoryRequest.Builder> + ListRecommendedScheduledActionsRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -6272,58 +7799,60 @@ public ListMaintenanceRunHistoryRequest apply( } }, new java.util.function.Function< - ListMaintenanceRunHistoryRequest, ListMaintenanceRunHistoryResponse>() { + ListRecommendedScheduledActionsRequest, + ListRecommendedScheduledActionsResponse>() { @Override - public ListMaintenanceRunHistoryResponse apply( - ListMaintenanceRunHistoryRequest request) { - return client.listMaintenanceRunHistory(request); + public ListRecommendedScheduledActionsResponse apply( + ListRecommendedScheduledActionsRequest request) { + return client.listRecommendedScheduledActions(request); } }, new java.util.function.Function< - ListMaintenanceRunHistoryResponse, + ListRecommendedScheduledActionsResponse, java.util.List< - com.oracle.bmc.database.model.MaintenanceRunHistorySummary>>() { + com.oracle.bmc.database.model + .RecommendedScheduledActionSummary>>() { @Override public java.util.List< - com.oracle.bmc.database.model.MaintenanceRunHistorySummary> - apply(ListMaintenanceRunHistoryResponse response) { - return response.getItems(); + com.oracle.bmc.database.model.RecommendedScheduledActionSummary> + apply(ListRecommendedScheduledActionsResponse response) { + return response.getRecommendedScheduledActionsCollection().getItems(); } }); } /** - * Creates a new iterable which will iterate over the responses received from the listMaintenanceRuns operation. This iterable + * Creates a new iterable which will iterate over the responses received from the listScheduledActions operation. This iterable * will fetch more data from the server as needed. * * @param request a request which can be sent to the service operation * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. */ - public Iterable listMaintenanceRunsResponseIterator( - final ListMaintenanceRunsRequest request) { + public Iterable listScheduledActionsResponseIterator( + final ListScheduledActionsRequest request) { return new com.oracle.bmc.paginator.internal.ResponseIterable< - ListMaintenanceRunsRequest.Builder, ListMaintenanceRunsRequest, - ListMaintenanceRunsResponse>( - new java.util.function.Supplier() { + ListScheduledActionsRequest.Builder, ListScheduledActionsRequest, + ListScheduledActionsResponse>( + new java.util.function.Supplier() { @Override - public ListMaintenanceRunsRequest.Builder get() { - return ListMaintenanceRunsRequest.builder().copy(request); + public ListScheduledActionsRequest.Builder get() { + return ListScheduledActionsRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListMaintenanceRunsResponse response) { + public String apply(ListScheduledActionsResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListMaintenanceRunsRequest.Builder>, - ListMaintenanceRunsRequest>() { + ListScheduledActionsRequest.Builder>, + ListScheduledActionsRequest>() { @Override - public ListMaintenanceRunsRequest apply( + public ListScheduledActionsRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListMaintenanceRunsRequest.Builder> + ListScheduledActionsRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -6335,48 +7864,48 @@ public ListMaintenanceRunsRequest apply( } }, new java.util.function.Function< - ListMaintenanceRunsRequest, ListMaintenanceRunsResponse>() { + ListScheduledActionsRequest, ListScheduledActionsResponse>() { @Override - public ListMaintenanceRunsResponse apply(ListMaintenanceRunsRequest request) { - return client.listMaintenanceRuns(request); + public ListScheduledActionsResponse apply(ListScheduledActionsRequest request) { + return client.listScheduledActions(request); } }); } /** - * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.MaintenanceRunSummary} objects - * contained in responses from the listMaintenanceRuns operation. This iterable will fetch more data from the + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.ScheduledActionSummary} objects + * contained in responses from the listScheduledActions operation. This iterable will fetch more data from the * server as needed. * * @param request a request which can be sent to the service operation - * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.MaintenanceRunSummary} objects + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.ScheduledActionSummary} objects * contained in responses received from the service. */ - public Iterable - listMaintenanceRunsRecordIterator(final ListMaintenanceRunsRequest request) { + public Iterable + listScheduledActionsRecordIterator(final ListScheduledActionsRequest request) { return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< - ListMaintenanceRunsRequest.Builder, ListMaintenanceRunsRequest, - ListMaintenanceRunsResponse, com.oracle.bmc.database.model.MaintenanceRunSummary>( - new java.util.function.Supplier() { + ListScheduledActionsRequest.Builder, ListScheduledActionsRequest, + ListScheduledActionsResponse, com.oracle.bmc.database.model.ScheduledActionSummary>( + new java.util.function.Supplier() { @Override - public ListMaintenanceRunsRequest.Builder get() { - return ListMaintenanceRunsRequest.builder().copy(request); + public ListScheduledActionsRequest.Builder get() { + return ListScheduledActionsRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListMaintenanceRunsResponse response) { + public String apply(ListScheduledActionsResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListMaintenanceRunsRequest.Builder>, - ListMaintenanceRunsRequest>() { + ListScheduledActionsRequest.Builder>, + ListScheduledActionsRequest>() { @Override - public ListMaintenanceRunsRequest apply( + public ListScheduledActionsRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListMaintenanceRunsRequest.Builder> + ListScheduledActionsRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -6388,55 +7917,55 @@ public ListMaintenanceRunsRequest apply( } }, new java.util.function.Function< - ListMaintenanceRunsRequest, ListMaintenanceRunsResponse>() { + ListScheduledActionsRequest, ListScheduledActionsResponse>() { @Override - public ListMaintenanceRunsResponse apply(ListMaintenanceRunsRequest request) { - return client.listMaintenanceRuns(request); + public ListScheduledActionsResponse apply(ListScheduledActionsRequest request) { + return client.listScheduledActions(request); } }, new java.util.function.Function< - ListMaintenanceRunsResponse, - java.util.List>() { + ListScheduledActionsResponse, + java.util.List>() { @Override - public java.util.List - apply(ListMaintenanceRunsResponse response) { - return response.getItems(); + public java.util.List + apply(ListScheduledActionsResponse response) { + return response.getScheduledActionCollection().getItems(); } }); } /** - * Creates a new iterable which will iterate over the responses received from the listOneoffPatches operation. This iterable + * Creates a new iterable which will iterate over the responses received from the listSchedulingPlans operation. This iterable * will fetch more data from the server as needed. * * @param request a request which can be sent to the service operation * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. */ - public Iterable listOneoffPatchesResponseIterator( - final ListOneoffPatchesRequest request) { + public Iterable listSchedulingPlansResponseIterator( + final ListSchedulingPlansRequest request) { return new com.oracle.bmc.paginator.internal.ResponseIterable< - ListOneoffPatchesRequest.Builder, ListOneoffPatchesRequest, - ListOneoffPatchesResponse>( - new java.util.function.Supplier() { + ListSchedulingPlansRequest.Builder, ListSchedulingPlansRequest, + ListSchedulingPlansResponse>( + new java.util.function.Supplier() { @Override - public ListOneoffPatchesRequest.Builder get() { - return ListOneoffPatchesRequest.builder().copy(request); + public ListSchedulingPlansRequest.Builder get() { + return ListSchedulingPlansRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListOneoffPatchesResponse response) { + public String apply(ListSchedulingPlansResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListOneoffPatchesRequest.Builder>, - ListOneoffPatchesRequest>() { + ListSchedulingPlansRequest.Builder>, + ListSchedulingPlansRequest>() { @Override - public ListOneoffPatchesRequest apply( + public ListSchedulingPlansRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListOneoffPatchesRequest.Builder> + ListSchedulingPlansRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -6448,48 +7977,48 @@ public ListOneoffPatchesRequest apply( } }, new java.util.function.Function< - ListOneoffPatchesRequest, ListOneoffPatchesResponse>() { + ListSchedulingPlansRequest, ListSchedulingPlansResponse>() { @Override - public ListOneoffPatchesResponse apply(ListOneoffPatchesRequest request) { - return client.listOneoffPatches(request); + public ListSchedulingPlansResponse apply(ListSchedulingPlansRequest request) { + return client.listSchedulingPlans(request); } }); } /** - * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.OneoffPatchSummary} objects - * contained in responses from the listOneoffPatches operation. This iterable will fetch more data from the + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.SchedulingPlanSummary} objects + * contained in responses from the listSchedulingPlans operation. This iterable will fetch more data from the * server as needed. * * @param request a request which can be sent to the service operation - * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.OneoffPatchSummary} objects + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.SchedulingPlanSummary} objects * contained in responses received from the service. */ - public Iterable - listOneoffPatchesRecordIterator(final ListOneoffPatchesRequest request) { + public Iterable + listSchedulingPlansRecordIterator(final ListSchedulingPlansRequest request) { return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< - ListOneoffPatchesRequest.Builder, ListOneoffPatchesRequest, - ListOneoffPatchesResponse, com.oracle.bmc.database.model.OneoffPatchSummary>( - new java.util.function.Supplier() { + ListSchedulingPlansRequest.Builder, ListSchedulingPlansRequest, + ListSchedulingPlansResponse, com.oracle.bmc.database.model.SchedulingPlanSummary>( + new java.util.function.Supplier() { @Override - public ListOneoffPatchesRequest.Builder get() { - return ListOneoffPatchesRequest.builder().copy(request); + public ListSchedulingPlansRequest.Builder get() { + return ListSchedulingPlansRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListOneoffPatchesResponse response) { + public String apply(ListSchedulingPlansResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListOneoffPatchesRequest.Builder>, - ListOneoffPatchesRequest>() { + ListSchedulingPlansRequest.Builder>, + ListSchedulingPlansRequest>() { @Override - public ListOneoffPatchesRequest apply( + public ListSchedulingPlansRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListOneoffPatchesRequest.Builder> + ListSchedulingPlansRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -6501,56 +8030,55 @@ public ListOneoffPatchesRequest apply( } }, new java.util.function.Function< - ListOneoffPatchesRequest, ListOneoffPatchesResponse>() { + ListSchedulingPlansRequest, ListSchedulingPlansResponse>() { @Override - public ListOneoffPatchesResponse apply(ListOneoffPatchesRequest request) { - return client.listOneoffPatches(request); + public ListSchedulingPlansResponse apply(ListSchedulingPlansRequest request) { + return client.listSchedulingPlans(request); } }, new java.util.function.Function< - ListOneoffPatchesResponse, - java.util.List>() { + ListSchedulingPlansResponse, + java.util.List>() { @Override - public java.util.List apply( - ListOneoffPatchesResponse response) { - return response.getItems(); + public java.util.List + apply(ListSchedulingPlansResponse response) { + return response.getSchedulingPlanCollection().getItems(); } }); } /** - * Creates a new iterable which will iterate over the responses received from the listPdbConversionHistoryEntries operation. This iterable + * Creates a new iterable which will iterate over the responses received from the listSchedulingPolicies operation. This iterable * will fetch more data from the server as needed. * * @param request a request which can be sent to the service operation * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. */ - public Iterable - listPdbConversionHistoryEntriesResponseIterator( - final ListPdbConversionHistoryEntriesRequest request) { + public Iterable listSchedulingPoliciesResponseIterator( + final ListSchedulingPoliciesRequest request) { return new com.oracle.bmc.paginator.internal.ResponseIterable< - ListPdbConversionHistoryEntriesRequest.Builder, - ListPdbConversionHistoryEntriesRequest, ListPdbConversionHistoryEntriesResponse>( - new java.util.function.Supplier() { + ListSchedulingPoliciesRequest.Builder, ListSchedulingPoliciesRequest, + ListSchedulingPoliciesResponse>( + new java.util.function.Supplier() { @Override - public ListPdbConversionHistoryEntriesRequest.Builder get() { - return ListPdbConversionHistoryEntriesRequest.builder().copy(request); + public ListSchedulingPoliciesRequest.Builder get() { + return ListSchedulingPoliciesRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListPdbConversionHistoryEntriesResponse response) { + public String apply(ListSchedulingPoliciesResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListPdbConversionHistoryEntriesRequest.Builder>, - ListPdbConversionHistoryEntriesRequest>() { + ListSchedulingPoliciesRequest.Builder>, + ListSchedulingPoliciesRequest>() { @Override - public ListPdbConversionHistoryEntriesRequest apply( + public ListSchedulingPoliciesRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListPdbConversionHistoryEntriesRequest.Builder> + ListSchedulingPoliciesRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -6562,52 +8090,50 @@ public ListPdbConversionHistoryEntriesRequest apply( } }, new java.util.function.Function< - ListPdbConversionHistoryEntriesRequest, - ListPdbConversionHistoryEntriesResponse>() { + ListSchedulingPoliciesRequest, ListSchedulingPoliciesResponse>() { @Override - public ListPdbConversionHistoryEntriesResponse apply( - ListPdbConversionHistoryEntriesRequest request) { - return client.listPdbConversionHistoryEntries(request); + public ListSchedulingPoliciesResponse apply( + ListSchedulingPoliciesRequest request) { + return client.listSchedulingPolicies(request); } }); } /** - * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.PdbConversionHistoryEntrySummary} objects - * contained in responses from the listPdbConversionHistoryEntries operation. This iterable will fetch more data from the + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.SchedulingPolicySummary} objects + * contained in responses from the listSchedulingPolicies operation. This iterable will fetch more data from the * server as needed. * * @param request a request which can be sent to the service operation - * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.PdbConversionHistoryEntrySummary} objects + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.SchedulingPolicySummary} objects * contained in responses received from the service. */ - public Iterable - listPdbConversionHistoryEntriesRecordIterator( - final ListPdbConversionHistoryEntriesRequest request) { + public Iterable + listSchedulingPoliciesRecordIterator(final ListSchedulingPoliciesRequest request) { return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< - ListPdbConversionHistoryEntriesRequest.Builder, - ListPdbConversionHistoryEntriesRequest, ListPdbConversionHistoryEntriesResponse, - com.oracle.bmc.database.model.PdbConversionHistoryEntrySummary>( - new java.util.function.Supplier() { + ListSchedulingPoliciesRequest.Builder, ListSchedulingPoliciesRequest, + ListSchedulingPoliciesResponse, + com.oracle.bmc.database.model.SchedulingPolicySummary>( + new java.util.function.Supplier() { @Override - public ListPdbConversionHistoryEntriesRequest.Builder get() { - return ListPdbConversionHistoryEntriesRequest.builder().copy(request); + public ListSchedulingPoliciesRequest.Builder get() { + return ListSchedulingPoliciesRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListPdbConversionHistoryEntriesResponse response) { + public String apply(ListSchedulingPoliciesResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListPdbConversionHistoryEntriesRequest.Builder>, - ListPdbConversionHistoryEntriesRequest>() { + ListSchedulingPoliciesRequest.Builder>, + ListSchedulingPoliciesRequest>() { @Override - public ListPdbConversionHistoryEntriesRequest apply( + public ListSchedulingPoliciesRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListPdbConversionHistoryEntriesRequest.Builder> + ListSchedulingPoliciesRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -6619,59 +8145,56 @@ public ListPdbConversionHistoryEntriesRequest apply( } }, new java.util.function.Function< - ListPdbConversionHistoryEntriesRequest, - ListPdbConversionHistoryEntriesResponse>() { + ListSchedulingPoliciesRequest, ListSchedulingPoliciesResponse>() { @Override - public ListPdbConversionHistoryEntriesResponse apply( - ListPdbConversionHistoryEntriesRequest request) { - return client.listPdbConversionHistoryEntries(request); + public ListSchedulingPoliciesResponse apply( + ListSchedulingPoliciesRequest request) { + return client.listSchedulingPolicies(request); } }, new java.util.function.Function< - ListPdbConversionHistoryEntriesResponse, - java.util.List< - com.oracle.bmc.database.model.PdbConversionHistoryEntrySummary>>() { + ListSchedulingPoliciesResponse, + java.util.List>() { @Override - public java.util.List< - com.oracle.bmc.database.model.PdbConversionHistoryEntrySummary> - apply(ListPdbConversionHistoryEntriesResponse response) { + public java.util.List + apply(ListSchedulingPoliciesResponse response) { return response.getItems(); } }); } /** - * Creates a new iterable which will iterate over the responses received from the listPluggableDatabases operation. This iterable + * Creates a new iterable which will iterate over the responses received from the listSchedulingWindows operation. This iterable * will fetch more data from the server as needed. * * @param request a request which can be sent to the service operation * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. */ - public Iterable listPluggableDatabasesResponseIterator( - final ListPluggableDatabasesRequest request) { + public Iterable listSchedulingWindowsResponseIterator( + final ListSchedulingWindowsRequest request) { return new com.oracle.bmc.paginator.internal.ResponseIterable< - ListPluggableDatabasesRequest.Builder, ListPluggableDatabasesRequest, - ListPluggableDatabasesResponse>( - new java.util.function.Supplier() { + ListSchedulingWindowsRequest.Builder, ListSchedulingWindowsRequest, + ListSchedulingWindowsResponse>( + new java.util.function.Supplier() { @Override - public ListPluggableDatabasesRequest.Builder get() { - return ListPluggableDatabasesRequest.builder().copy(request); + public ListSchedulingWindowsRequest.Builder get() { + return ListSchedulingWindowsRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListPluggableDatabasesResponse response) { + public String apply(ListSchedulingWindowsResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListPluggableDatabasesRequest.Builder>, - ListPluggableDatabasesRequest>() { + ListSchedulingWindowsRequest.Builder>, + ListSchedulingWindowsRequest>() { @Override - public ListPluggableDatabasesRequest apply( + public ListSchedulingWindowsRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListPluggableDatabasesRequest.Builder> + ListSchedulingWindowsRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -6683,50 +8206,50 @@ public ListPluggableDatabasesRequest apply( } }, new java.util.function.Function< - ListPluggableDatabasesRequest, ListPluggableDatabasesResponse>() { + ListSchedulingWindowsRequest, ListSchedulingWindowsResponse>() { @Override - public ListPluggableDatabasesResponse apply( - ListPluggableDatabasesRequest request) { - return client.listPluggableDatabases(request); + public ListSchedulingWindowsResponse apply( + ListSchedulingWindowsRequest request) { + return client.listSchedulingWindows(request); } }); } /** - * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.PluggableDatabaseSummary} objects - * contained in responses from the listPluggableDatabases operation. This iterable will fetch more data from the + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.database.model.SchedulingWindowSummary} objects + * contained in responses from the listSchedulingWindows operation. This iterable will fetch more data from the * server as needed. * * @param request a request which can be sent to the service operation - * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.PluggableDatabaseSummary} objects + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.database.model.SchedulingWindowSummary} objects * contained in responses received from the service. */ - public Iterable - listPluggableDatabasesRecordIterator(final ListPluggableDatabasesRequest request) { + public Iterable + listSchedulingWindowsRecordIterator(final ListSchedulingWindowsRequest request) { return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< - ListPluggableDatabasesRequest.Builder, ListPluggableDatabasesRequest, - ListPluggableDatabasesResponse, - com.oracle.bmc.database.model.PluggableDatabaseSummary>( - new java.util.function.Supplier() { + ListSchedulingWindowsRequest.Builder, ListSchedulingWindowsRequest, + ListSchedulingWindowsResponse, + com.oracle.bmc.database.model.SchedulingWindowSummary>( + new java.util.function.Supplier() { @Override - public ListPluggableDatabasesRequest.Builder get() { - return ListPluggableDatabasesRequest.builder().copy(request); + public ListSchedulingWindowsRequest.Builder get() { + return ListSchedulingWindowsRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListPluggableDatabasesResponse response) { + public String apply(ListSchedulingWindowsResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListPluggableDatabasesRequest.Builder>, - ListPluggableDatabasesRequest>() { + ListSchedulingWindowsRequest.Builder>, + ListSchedulingWindowsRequest>() { @Override - public ListPluggableDatabasesRequest apply( + public ListSchedulingWindowsRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListPluggableDatabasesRequest.Builder> + ListSchedulingWindowsRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -6738,19 +8261,19 @@ public ListPluggableDatabasesRequest apply( } }, new java.util.function.Function< - ListPluggableDatabasesRequest, ListPluggableDatabasesResponse>() { + ListSchedulingWindowsRequest, ListSchedulingWindowsResponse>() { @Override - public ListPluggableDatabasesResponse apply( - ListPluggableDatabasesRequest request) { - return client.listPluggableDatabases(request); + public ListSchedulingWindowsResponse apply( + ListSchedulingWindowsRequest request) { + return client.listSchedulingWindows(request); } }, new java.util.function.Function< - ListPluggableDatabasesResponse, - java.util.List>() { + ListSchedulingWindowsResponse, + java.util.List>() { @Override - public java.util.List - apply(ListPluggableDatabasesResponse response) { + public java.util.List + apply(ListSchedulingWindowsResponse response) { return response.getItems(); } }); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseWaiters.java b/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseWaiters.java index a7448b96b37..ceda46ddc64 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseWaiters.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/DatabaseWaiters.java @@ -489,6 +489,130 @@ public CancelBackupResponse call() throws Exception { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forCancelExecutionWindow(CancelExecutionWindowRequest request) { + return forCancelExecutionWindow( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forCancelExecutionWindow( + CancelExecutionWindowRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public CancelExecutionWindowResponse call() throws Exception { + final CancelExecutionWindowResponse response = + client.cancelExecutionWindow(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + CascadingDeleteSchedulingPlanRequest, CascadingDeleteSchedulingPlanResponse> + forCascadingDeleteSchedulingPlan(CascadingDeleteSchedulingPlanRequest request) { + return forCascadingDeleteSchedulingPlan( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + CascadingDeleteSchedulingPlanRequest, CascadingDeleteSchedulingPlanResponse> + forCascadingDeleteSchedulingPlan( + CascadingDeleteSchedulingPlanRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public CascadingDeleteSchedulingPlanResponse call() throws Exception { + final CascadingDeleteSchedulingPlanResponse response = + client.cascadingDeleteSchedulingPlan(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * @@ -691,6 +815,72 @@ public ChangeAutonomousDatabaseSoftwareImageCompartmentResponse call() request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + ChangeAutonomousDatabaseSubscriptionRequest, + ChangeAutonomousDatabaseSubscriptionResponse> + forChangeAutonomousDatabaseSubscription( + ChangeAutonomousDatabaseSubscriptionRequest request) { + return forChangeAutonomousDatabaseSubscription( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + ChangeAutonomousDatabaseSubscriptionRequest, + ChangeAutonomousDatabaseSubscriptionResponse> + forChangeAutonomousDatabaseSubscription( + ChangeAutonomousDatabaseSubscriptionRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public ChangeAutonomousDatabaseSubscriptionResponse call() throws Exception { + final ChangeAutonomousDatabaseSubscriptionResponse response = + client.changeAutonomousDatabaseSubscription(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * @@ -1034,9 +1224,11 @@ public ChangeCloudExadataInfrastructureCompartmentResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ChangeCloudVmClusterCompartmentRequest, ChangeCloudVmClusterCompartmentResponse> - forChangeCloudVmClusterCompartment(ChangeCloudVmClusterCompartmentRequest request) { - return forChangeCloudVmClusterCompartment( + ChangeCloudExadataInfrastructureSubscriptionRequest, + ChangeCloudExadataInfrastructureSubscriptionResponse> + forChangeCloudExadataInfrastructureSubscription( + ChangeCloudExadataInfrastructureSubscriptionRequest request) { + return forChangeCloudExadataInfrastructureSubscription( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -1051,9 +1243,10 @@ public ChangeCloudExadataInfrastructureCompartmentResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ChangeCloudVmClusterCompartmentRequest, ChangeCloudVmClusterCompartmentResponse> - forChangeCloudVmClusterCompartment( - ChangeCloudVmClusterCompartmentRequest request, + ChangeCloudExadataInfrastructureSubscriptionRequest, + ChangeCloudExadataInfrastructureSubscriptionResponse> + forChangeCloudExadataInfrastructureSubscription( + ChangeCloudExadataInfrastructureSubscriptionRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -1063,11 +1256,13 @@ public ChangeCloudExadataInfrastructureCompartmentResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + ChangeCloudExadataInfrastructureSubscriptionResponse>() { @Override - public ChangeCloudVmClusterCompartmentResponse call() throws Exception { - final ChangeCloudVmClusterCompartmentResponse response = - client.changeCloudVmClusterCompartment(request); + public ChangeCloudExadataInfrastructureSubscriptionResponse call() + throws Exception { + final ChangeCloudExadataInfrastructureSubscriptionResponse response = + client.changeCloudExadataInfrastructureSubscription(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -1097,11 +1292,9 @@ public ChangeCloudVmClusterCompartmentResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ChangeDatabaseSoftwareImageCompartmentRequest, - ChangeDatabaseSoftwareImageCompartmentResponse> - forChangeDatabaseSoftwareImageCompartment( - ChangeDatabaseSoftwareImageCompartmentRequest request) { - return forChangeDatabaseSoftwareImageCompartment( + ChangeCloudVmClusterCompartmentRequest, ChangeCloudVmClusterCompartmentResponse> + forChangeCloudVmClusterCompartment(ChangeCloudVmClusterCompartmentRequest request) { + return forChangeCloudVmClusterCompartment( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -1116,10 +1309,9 @@ public ChangeCloudVmClusterCompartmentResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ChangeDatabaseSoftwareImageCompartmentRequest, - ChangeDatabaseSoftwareImageCompartmentResponse> - forChangeDatabaseSoftwareImageCompartment( - ChangeDatabaseSoftwareImageCompartmentRequest request, + ChangeCloudVmClusterCompartmentRequest, ChangeCloudVmClusterCompartmentResponse> + forChangeCloudVmClusterCompartment( + ChangeCloudVmClusterCompartmentRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -1129,12 +1321,11 @@ public ChangeCloudVmClusterCompartmentResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - ChangeDatabaseSoftwareImageCompartmentResponse>() { + new java.util.concurrent.Callable() { @Override - public ChangeDatabaseSoftwareImageCompartmentResponse call() throws Exception { - final ChangeDatabaseSoftwareImageCompartmentResponse response = - client.changeDatabaseSoftwareImageCompartment(request); + public ChangeCloudVmClusterCompartmentResponse call() throws Exception { + final ChangeCloudVmClusterCompartmentResponse response = + client.changeCloudVmClusterCompartment(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -1163,9 +1354,11 @@ public ChangeDatabaseSoftwareImageCompartmentResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forChangeDataguardRole(ChangeDataguardRoleRequest request) { - return forChangeDataguardRole( + public com.oracle.bmc.waiter.Waiter< + ChangeCloudVmClusterSubscriptionRequest, + ChangeCloudVmClusterSubscriptionResponse> + forChangeCloudVmClusterSubscription(ChangeCloudVmClusterSubscriptionRequest request) { + return forChangeCloudVmClusterSubscription( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -1179,9 +1372,11 @@ public ChangeDatabaseSoftwareImageCompartmentResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forChangeDataguardRole( - ChangeDataguardRoleRequest request, + public com.oracle.bmc.waiter.Waiter< + ChangeCloudVmClusterSubscriptionRequest, + ChangeCloudVmClusterSubscriptionResponse> + forChangeCloudVmClusterSubscription( + ChangeCloudVmClusterSubscriptionRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -1191,11 +1386,11 @@ public ChangeDatabaseSoftwareImageCompartmentResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public ChangeDataguardRoleResponse call() throws Exception { - final ChangeDataguardRoleResponse response = - client.changeDataguardRole(request); + public ChangeCloudVmClusterSubscriptionResponse call() throws Exception { + final ChangeCloudVmClusterSubscriptionResponse response = + client.changeCloudVmClusterSubscription(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -1225,9 +1420,11 @@ public ChangeDataguardRoleResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ChangeDbSystemCompartmentRequest, ChangeDbSystemCompartmentResponse> - forChangeDbSystemCompartment(ChangeDbSystemCompartmentRequest request) { - return forChangeDbSystemCompartment( + ChangeDatabaseSoftwareImageCompartmentRequest, + ChangeDatabaseSoftwareImageCompartmentResponse> + forChangeDatabaseSoftwareImageCompartment( + ChangeDatabaseSoftwareImageCompartmentRequest request) { + return forChangeDatabaseSoftwareImageCompartment( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -1242,9 +1439,10 @@ public ChangeDataguardRoleResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ChangeDbSystemCompartmentRequest, ChangeDbSystemCompartmentResponse> - forChangeDbSystemCompartment( - ChangeDbSystemCompartmentRequest request, + ChangeDatabaseSoftwareImageCompartmentRequest, + ChangeDatabaseSoftwareImageCompartmentResponse> + forChangeDatabaseSoftwareImageCompartment( + ChangeDatabaseSoftwareImageCompartmentRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -1254,11 +1452,12 @@ public ChangeDataguardRoleResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + ChangeDatabaseSoftwareImageCompartmentResponse>() { @Override - public ChangeDbSystemCompartmentResponse call() throws Exception { - final ChangeDbSystemCompartmentResponse response = - client.changeDbSystemCompartment(request); + public ChangeDatabaseSoftwareImageCompartmentResponse call() throws Exception { + final ChangeDatabaseSoftwareImageCompartmentResponse response = + client.changeDatabaseSoftwareImageCompartment(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -1287,12 +1486,9 @@ public ChangeDbSystemCompartmentResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - ChangeDisasterRecoveryConfigurationRequest, - ChangeDisasterRecoveryConfigurationResponse> - forChangeDisasterRecoveryConfiguration( - ChangeDisasterRecoveryConfigurationRequest request) { - return forChangeDisasterRecoveryConfiguration( + public com.oracle.bmc.waiter.Waiter + forChangeDataguardRole(ChangeDataguardRoleRequest request) { + return forChangeDataguardRole( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -1306,11 +1502,9 @@ public ChangeDbSystemCompartmentResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - ChangeDisasterRecoveryConfigurationRequest, - ChangeDisasterRecoveryConfigurationResponse> - forChangeDisasterRecoveryConfiguration( - ChangeDisasterRecoveryConfigurationRequest request, + public com.oracle.bmc.waiter.Waiter + forChangeDataguardRole( + ChangeDataguardRoleRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -1320,11 +1514,11 @@ public ChangeDbSystemCompartmentResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public ChangeDisasterRecoveryConfigurationResponse call() throws Exception { - final ChangeDisasterRecoveryConfigurationResponse response = - client.changeDisasterRecoveryConfiguration(request); + public ChangeDataguardRoleResponse call() throws Exception { + final ChangeDataguardRoleResponse response = + client.changeDataguardRole(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -1354,11 +1548,9 @@ public ChangeDisasterRecoveryConfigurationResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ChangeExadataInfrastructureCompartmentRequest, - ChangeExadataInfrastructureCompartmentResponse> - forChangeExadataInfrastructureCompartment( - ChangeExadataInfrastructureCompartmentRequest request) { - return forChangeExadataInfrastructureCompartment( + ChangeDbSystemCompartmentRequest, ChangeDbSystemCompartmentResponse> + forChangeDbSystemCompartment(ChangeDbSystemCompartmentRequest request) { + return forChangeDbSystemCompartment( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -1373,10 +1565,9 @@ public ChangeDisasterRecoveryConfigurationResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ChangeExadataInfrastructureCompartmentRequest, - ChangeExadataInfrastructureCompartmentResponse> - forChangeExadataInfrastructureCompartment( - ChangeExadataInfrastructureCompartmentRequest request, + ChangeDbSystemCompartmentRequest, ChangeDbSystemCompartmentResponse> + forChangeDbSystemCompartment( + ChangeDbSystemCompartmentRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -1386,12 +1577,11 @@ public ChangeDisasterRecoveryConfigurationResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - ChangeExadataInfrastructureCompartmentResponse>() { + new java.util.concurrent.Callable() { @Override - public ChangeExadataInfrastructureCompartmentResponse call() throws Exception { - final ChangeExadataInfrastructureCompartmentResponse response = - client.changeExadataInfrastructureCompartment(request); + public ChangeDbSystemCompartmentResponse call() throws Exception { + final ChangeDbSystemCompartmentResponse response = + client.changeDbSystemCompartment(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -1421,11 +1611,11 @@ public ChangeExadataInfrastructureCompartmentResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ChangeExternalContainerDatabaseCompartmentRequest, - ChangeExternalContainerDatabaseCompartmentResponse> - forChangeExternalContainerDatabaseCompartment( - ChangeExternalContainerDatabaseCompartmentRequest request) { - return forChangeExternalContainerDatabaseCompartment( + ChangeDisasterRecoveryConfigurationRequest, + ChangeDisasterRecoveryConfigurationResponse> + forChangeDisasterRecoveryConfiguration( + ChangeDisasterRecoveryConfigurationRequest request) { + return forChangeDisasterRecoveryConfiguration( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -1440,10 +1630,10 @@ public ChangeExadataInfrastructureCompartmentResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ChangeExternalContainerDatabaseCompartmentRequest, - ChangeExternalContainerDatabaseCompartmentResponse> - forChangeExternalContainerDatabaseCompartment( - ChangeExternalContainerDatabaseCompartmentRequest request, + ChangeDisasterRecoveryConfigurationRequest, + ChangeDisasterRecoveryConfigurationResponse> + forChangeDisasterRecoveryConfiguration( + ChangeDisasterRecoveryConfigurationRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -1453,13 +1643,11 @@ public ChangeExadataInfrastructureCompartmentResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - ChangeExternalContainerDatabaseCompartmentResponse>() { + new java.util.concurrent.Callable() { @Override - public ChangeExternalContainerDatabaseCompartmentResponse call() - throws Exception { - final ChangeExternalContainerDatabaseCompartmentResponse response = - client.changeExternalContainerDatabaseCompartment(request); + public ChangeDisasterRecoveryConfigurationResponse call() throws Exception { + final ChangeDisasterRecoveryConfigurationResponse response = + client.changeDisasterRecoveryConfiguration(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -1489,11 +1677,11 @@ public ChangeExternalContainerDatabaseCompartmentResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ChangeExternalNonContainerDatabaseCompartmentRequest, - ChangeExternalNonContainerDatabaseCompartmentResponse> - forChangeExternalNonContainerDatabaseCompartment( - ChangeExternalNonContainerDatabaseCompartmentRequest request) { - return forChangeExternalNonContainerDatabaseCompartment( + ChangeExadataInfrastructureCompartmentRequest, + ChangeExadataInfrastructureCompartmentResponse> + forChangeExadataInfrastructureCompartment( + ChangeExadataInfrastructureCompartmentRequest request) { + return forChangeExadataInfrastructureCompartment( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -1508,10 +1696,10 @@ public ChangeExternalContainerDatabaseCompartmentResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ChangeExternalNonContainerDatabaseCompartmentRequest, - ChangeExternalNonContainerDatabaseCompartmentResponse> - forChangeExternalNonContainerDatabaseCompartment( - ChangeExternalNonContainerDatabaseCompartmentRequest request, + ChangeExadataInfrastructureCompartmentRequest, + ChangeExadataInfrastructureCompartmentResponse> + forChangeExadataInfrastructureCompartment( + ChangeExadataInfrastructureCompartmentRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -1522,12 +1710,11 @@ public ChangeExternalContainerDatabaseCompartmentResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, new java.util.concurrent.Callable< - ChangeExternalNonContainerDatabaseCompartmentResponse>() { + ChangeExadataInfrastructureCompartmentResponse>() { @Override - public ChangeExternalNonContainerDatabaseCompartmentResponse call() - throws Exception { - final ChangeExternalNonContainerDatabaseCompartmentResponse response = - client.changeExternalNonContainerDatabaseCompartment(request); + public ChangeExadataInfrastructureCompartmentResponse call() throws Exception { + final ChangeExadataInfrastructureCompartmentResponse response = + client.changeExadataInfrastructureCompartment(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -1557,11 +1744,9 @@ public ChangeExternalNonContainerDatabaseCompartmentResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ChangeExternalPluggableDatabaseCompartmentRequest, - ChangeExternalPluggableDatabaseCompartmentResponse> - forChangeExternalPluggableDatabaseCompartment( - ChangeExternalPluggableDatabaseCompartmentRequest request) { - return forChangeExternalPluggableDatabaseCompartment( + ChangeExadbVmClusterCompartmentRequest, ChangeExadbVmClusterCompartmentResponse> + forChangeExadbVmClusterCompartment(ChangeExadbVmClusterCompartmentRequest request) { + return forChangeExadbVmClusterCompartment( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -1576,10 +1761,9 @@ public ChangeExternalNonContainerDatabaseCompartmentResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ChangeExternalPluggableDatabaseCompartmentRequest, - ChangeExternalPluggableDatabaseCompartmentResponse> - forChangeExternalPluggableDatabaseCompartment( - ChangeExternalPluggableDatabaseCompartmentRequest request, + ChangeExadbVmClusterCompartmentRequest, ChangeExadbVmClusterCompartmentResponse> + forChangeExadbVmClusterCompartment( + ChangeExadbVmClusterCompartmentRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -1589,13 +1773,11 @@ public ChangeExternalNonContainerDatabaseCompartmentResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - ChangeExternalPluggableDatabaseCompartmentResponse>() { + new java.util.concurrent.Callable() { @Override - public ChangeExternalPluggableDatabaseCompartmentResponse call() - throws Exception { - final ChangeExternalPluggableDatabaseCompartmentResponse response = - client.changeExternalPluggableDatabaseCompartment(request); + public ChangeExadbVmClusterCompartmentResponse call() throws Exception { + final ChangeExadbVmClusterCompartmentResponse response = + client.changeExadbVmClusterCompartment(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -1625,9 +1807,11 @@ public ChangeExternalPluggableDatabaseCompartmentResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ChangeKeyStoreCompartmentRequest, ChangeKeyStoreCompartmentResponse> - forChangeKeyStoreCompartment(ChangeKeyStoreCompartmentRequest request) { - return forChangeKeyStoreCompartment( + ChangeExascaleDbStorageVaultCompartmentRequest, + ChangeExascaleDbStorageVaultCompartmentResponse> + forChangeExascaleDbStorageVaultCompartment( + ChangeExascaleDbStorageVaultCompartmentRequest request) { + return forChangeExascaleDbStorageVaultCompartment( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -1642,9 +1826,10 @@ public ChangeExternalPluggableDatabaseCompartmentResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ChangeKeyStoreCompartmentRequest, ChangeKeyStoreCompartmentResponse> - forChangeKeyStoreCompartment( - ChangeKeyStoreCompartmentRequest request, + ChangeExascaleDbStorageVaultCompartmentRequest, + ChangeExascaleDbStorageVaultCompartmentResponse> + forChangeExascaleDbStorageVaultCompartment( + ChangeExascaleDbStorageVaultCompartmentRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -1654,11 +1839,12 @@ public ChangeExternalPluggableDatabaseCompartmentResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + ChangeExascaleDbStorageVaultCompartmentResponse>() { @Override - public ChangeKeyStoreCompartmentResponse call() throws Exception { - final ChangeKeyStoreCompartmentResponse response = - client.changeKeyStoreCompartment(request); + public ChangeExascaleDbStorageVaultCompartmentResponse call() throws Exception { + final ChangeExascaleDbStorageVaultCompartmentResponse response = + client.changeExascaleDbStorageVaultCompartment(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -1687,9 +1873,12 @@ public ChangeKeyStoreCompartmentResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forChangeKeyStoreType(ChangeKeyStoreTypeRequest request) { - return forChangeKeyStoreType( + public com.oracle.bmc.waiter.Waiter< + ChangeExternalContainerDatabaseCompartmentRequest, + ChangeExternalContainerDatabaseCompartmentResponse> + forChangeExternalContainerDatabaseCompartment( + ChangeExternalContainerDatabaseCompartmentRequest request) { + return forChangeExternalContainerDatabaseCompartment( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -1703,9 +1892,11 @@ public ChangeKeyStoreCompartmentResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forChangeKeyStoreType( - ChangeKeyStoreTypeRequest request, + public com.oracle.bmc.waiter.Waiter< + ChangeExternalContainerDatabaseCompartmentRequest, + ChangeExternalContainerDatabaseCompartmentResponse> + forChangeExternalContainerDatabaseCompartment( + ChangeExternalContainerDatabaseCompartmentRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -1715,11 +1906,13 @@ public ChangeKeyStoreCompartmentResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + ChangeExternalContainerDatabaseCompartmentResponse>() { @Override - public ChangeKeyStoreTypeResponse call() throws Exception { - final ChangeKeyStoreTypeResponse response = - client.changeKeyStoreType(request); + public ChangeExternalContainerDatabaseCompartmentResponse call() + throws Exception { + final ChangeExternalContainerDatabaseCompartmentResponse response = + client.changeExternalContainerDatabaseCompartment(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -1749,9 +1942,11 @@ public ChangeKeyStoreTypeResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ChangeOneoffPatchCompartmentRequest, ChangeOneoffPatchCompartmentResponse> - forChangeOneoffPatchCompartment(ChangeOneoffPatchCompartmentRequest request) { - return forChangeOneoffPatchCompartment( + ChangeExternalNonContainerDatabaseCompartmentRequest, + ChangeExternalNonContainerDatabaseCompartmentResponse> + forChangeExternalNonContainerDatabaseCompartment( + ChangeExternalNonContainerDatabaseCompartmentRequest request) { + return forChangeExternalNonContainerDatabaseCompartment( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -1766,9 +1961,10 @@ public ChangeKeyStoreTypeResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ChangeOneoffPatchCompartmentRequest, ChangeOneoffPatchCompartmentResponse> - forChangeOneoffPatchCompartment( - ChangeOneoffPatchCompartmentRequest request, + ChangeExternalNonContainerDatabaseCompartmentRequest, + ChangeExternalNonContainerDatabaseCompartmentResponse> + forChangeExternalNonContainerDatabaseCompartment( + ChangeExternalNonContainerDatabaseCompartmentRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -1778,11 +1974,13 @@ public ChangeKeyStoreTypeResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + ChangeExternalNonContainerDatabaseCompartmentResponse>() { @Override - public ChangeOneoffPatchCompartmentResponse call() throws Exception { - final ChangeOneoffPatchCompartmentResponse response = - client.changeOneoffPatchCompartment(request); + public ChangeExternalNonContainerDatabaseCompartmentResponse call() + throws Exception { + final ChangeExternalNonContainerDatabaseCompartmentResponse response = + client.changeExternalNonContainerDatabaseCompartment(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -1812,9 +2010,11 @@ public ChangeOneoffPatchCompartmentResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ChangeVmClusterCompartmentRequest, ChangeVmClusterCompartmentResponse> - forChangeVmClusterCompartment(ChangeVmClusterCompartmentRequest request) { - return forChangeVmClusterCompartment( + ChangeExternalPluggableDatabaseCompartmentRequest, + ChangeExternalPluggableDatabaseCompartmentResponse> + forChangeExternalPluggableDatabaseCompartment( + ChangeExternalPluggableDatabaseCompartmentRequest request) { + return forChangeExternalPluggableDatabaseCompartment( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -1829,9 +2029,10 @@ public ChangeOneoffPatchCompartmentResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ChangeVmClusterCompartmentRequest, ChangeVmClusterCompartmentResponse> - forChangeVmClusterCompartment( - ChangeVmClusterCompartmentRequest request, + ChangeExternalPluggableDatabaseCompartmentRequest, + ChangeExternalPluggableDatabaseCompartmentResponse> + forChangeExternalPluggableDatabaseCompartment( + ChangeExternalPluggableDatabaseCompartmentRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -1841,11 +2042,13 @@ public ChangeOneoffPatchCompartmentResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + ChangeExternalPluggableDatabaseCompartmentResponse>() { @Override - public ChangeVmClusterCompartmentResponse call() throws Exception { - final ChangeVmClusterCompartmentResponse response = - client.changeVmClusterCompartment(request); + public ChangeExternalPluggableDatabaseCompartmentResponse call() + throws Exception { + final ChangeExternalPluggableDatabaseCompartmentResponse response = + client.changeExternalPluggableDatabaseCompartment(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -1875,11 +2078,9 @@ public ChangeVmClusterCompartmentResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CheckExternalDatabaseConnectorConnectionStatusRequest, - CheckExternalDatabaseConnectorConnectionStatusResponse> - forCheckExternalDatabaseConnectorConnectionStatus( - CheckExternalDatabaseConnectorConnectionStatusRequest request) { - return forCheckExternalDatabaseConnectorConnectionStatus( + ChangeKeyStoreCompartmentRequest, ChangeKeyStoreCompartmentResponse> + forChangeKeyStoreCompartment(ChangeKeyStoreCompartmentRequest request) { + return forChangeKeyStoreCompartment( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -1894,10 +2095,9 @@ public ChangeVmClusterCompartmentResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CheckExternalDatabaseConnectorConnectionStatusRequest, - CheckExternalDatabaseConnectorConnectionStatusResponse> - forCheckExternalDatabaseConnectorConnectionStatus( - CheckExternalDatabaseConnectorConnectionStatusRequest request, + ChangeKeyStoreCompartmentRequest, ChangeKeyStoreCompartmentResponse> + forChangeKeyStoreCompartment( + ChangeKeyStoreCompartmentRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -1907,13 +2107,11 @@ public ChangeVmClusterCompartmentResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - CheckExternalDatabaseConnectorConnectionStatusResponse>() { + new java.util.concurrent.Callable() { @Override - public CheckExternalDatabaseConnectorConnectionStatusResponse call() - throws Exception { - final CheckExternalDatabaseConnectorConnectionStatusResponse response = - client.checkExternalDatabaseConnectorConnectionStatus(request); + public ChangeKeyStoreCompartmentResponse call() throws Exception { + final ChangeKeyStoreCompartmentResponse response = + client.changeKeyStoreCompartment(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -1942,10 +2140,9 @@ public CheckExternalDatabaseConnectorConnectionStatusResponse call() * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - CompleteExternalBackupJobRequest, CompleteExternalBackupJobResponse> - forCompleteExternalBackupJob(CompleteExternalBackupJobRequest request) { - return forCompleteExternalBackupJob( + public com.oracle.bmc.waiter.Waiter + forChangeKeyStoreType(ChangeKeyStoreTypeRequest request) { + return forChangeKeyStoreType( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -1959,10 +2156,9 @@ public CheckExternalDatabaseConnectorConnectionStatusResponse call() * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - CompleteExternalBackupJobRequest, CompleteExternalBackupJobResponse> - forCompleteExternalBackupJob( - CompleteExternalBackupJobRequest request, + public com.oracle.bmc.waiter.Waiter + forChangeKeyStoreType( + ChangeKeyStoreTypeRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -1972,11 +2168,11 @@ public CheckExternalDatabaseConnectorConnectionStatusResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CompleteExternalBackupJobResponse call() throws Exception { - final CompleteExternalBackupJobResponse response = - client.completeExternalBackupJob(request); + public ChangeKeyStoreTypeResponse call() throws Exception { + final ChangeKeyStoreTypeResponse response = + client.changeKeyStoreType(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -2006,11 +2202,9 @@ public CompleteExternalBackupJobResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ConfigureAutonomousDatabaseVaultKeyRequest, - ConfigureAutonomousDatabaseVaultKeyResponse> - forConfigureAutonomousDatabaseVaultKey( - ConfigureAutonomousDatabaseVaultKeyRequest request) { - return forConfigureAutonomousDatabaseVaultKey( + ChangeOneoffPatchCompartmentRequest, ChangeOneoffPatchCompartmentResponse> + forChangeOneoffPatchCompartment(ChangeOneoffPatchCompartmentRequest request) { + return forChangeOneoffPatchCompartment( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -2025,10 +2219,9 @@ public CompleteExternalBackupJobResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ConfigureAutonomousDatabaseVaultKeyRequest, - ConfigureAutonomousDatabaseVaultKeyResponse> - forConfigureAutonomousDatabaseVaultKey( - ConfigureAutonomousDatabaseVaultKeyRequest request, + ChangeOneoffPatchCompartmentRequest, ChangeOneoffPatchCompartmentResponse> + forChangeOneoffPatchCompartment( + ChangeOneoffPatchCompartmentRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -2038,11 +2231,11 @@ public CompleteExternalBackupJobResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public ConfigureAutonomousDatabaseVaultKeyResponse call() throws Exception { - final ConfigureAutonomousDatabaseVaultKeyResponse response = - client.configureAutonomousDatabaseVaultKey(request); + public ChangeOneoffPatchCompartmentResponse call() throws Exception { + final ChangeOneoffPatchCompartmentResponse response = + client.changeOneoffPatchCompartment(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -2072,9 +2265,9 @@ public ConfigureAutonomousDatabaseVaultKeyResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ConfigureSaasAdminUserRequest, ConfigureSaasAdminUserResponse> - forConfigureSaasAdminUser(ConfigureSaasAdminUserRequest request) { - return forConfigureSaasAdminUser( + ChangeSchedulingPlanCompartmentRequest, ChangeSchedulingPlanCompartmentResponse> + forChangeSchedulingPlanCompartment(ChangeSchedulingPlanCompartmentRequest request) { + return forChangeSchedulingPlanCompartment( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -2089,9 +2282,9 @@ public ConfigureAutonomousDatabaseVaultKeyResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ConfigureSaasAdminUserRequest, ConfigureSaasAdminUserResponse> - forConfigureSaasAdminUser( - ConfigureSaasAdminUserRequest request, + ChangeSchedulingPlanCompartmentRequest, ChangeSchedulingPlanCompartmentResponse> + forChangeSchedulingPlanCompartment( + ChangeSchedulingPlanCompartmentRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -2101,11 +2294,11 @@ public ConfigureAutonomousDatabaseVaultKeyResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public ConfigureSaasAdminUserResponse call() throws Exception { - final ConfigureSaasAdminUserResponse response = - client.configureSaasAdminUser(request); + public ChangeSchedulingPlanCompartmentResponse call() throws Exception { + final ChangeSchedulingPlanCompartmentResponse response = + client.changeSchedulingPlanCompartment(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -2134,9 +2327,11 @@ public ConfigureSaasAdminUserResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forConvertToPdb( - ConvertToPdbRequest request) { - return forConvertToPdb( + public com.oracle.bmc.waiter.Waiter< + ChangeSchedulingPolicyCompartmentRequest, + ChangeSchedulingPolicyCompartmentResponse> + forChangeSchedulingPolicyCompartment(ChangeSchedulingPolicyCompartmentRequest request) { + return forChangeSchedulingPolicyCompartment( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -2150,10 +2345,13 @@ public com.oracle.bmc.waiter.Waiter f * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forConvertToPdb( - ConvertToPdbRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter< + ChangeSchedulingPolicyCompartmentRequest, + ChangeSchedulingPolicyCompartmentResponse> + forChangeSchedulingPolicyCompartment( + ChangeSchedulingPolicyCompartmentRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { throw new IllegalStateException( "A WorkRequestClient must be supplied to this waiter for this operation"); @@ -2161,10 +2359,11 @@ public com.oracle.bmc.waiter.Waiter f return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public ConvertToPdbResponse call() throws Exception { - final ConvertToPdbResponse response = client.convertToPdb(request); + public ChangeSchedulingPolicyCompartmentResponse call() throws Exception { + final ChangeSchedulingPolicyCompartmentResponse response = + client.changeSchedulingPolicyCompartment(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -2194,10 +2393,9 @@ public ConvertToPdbResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ConvertToRegularPluggableDatabaseRequest, - ConvertToRegularPluggableDatabaseResponse> - forConvertToRegularPluggableDatabase(ConvertToRegularPluggableDatabaseRequest request) { - return forConvertToRegularPluggableDatabase( + ChangeVmClusterCompartmentRequest, ChangeVmClusterCompartmentResponse> + forChangeVmClusterCompartment(ChangeVmClusterCompartmentRequest request) { + return forChangeVmClusterCompartment( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -2212,10 +2410,9 @@ public ConvertToPdbResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ConvertToRegularPluggableDatabaseRequest, - ConvertToRegularPluggableDatabaseResponse> - forConvertToRegularPluggableDatabase( - ConvertToRegularPluggableDatabaseRequest request, + ChangeVmClusterCompartmentRequest, ChangeVmClusterCompartmentResponse> + forChangeVmClusterCompartment( + ChangeVmClusterCompartmentRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -2225,11 +2422,11 @@ public ConvertToPdbResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public ConvertToRegularPluggableDatabaseResponse call() throws Exception { - final ConvertToRegularPluggableDatabaseResponse response = - client.convertToRegularPluggableDatabase(request); + public ChangeVmClusterCompartmentResponse call() throws Exception { + final ChangeVmClusterCompartmentResponse response = + client.changeVmClusterCompartment(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -2258,9 +2455,12 @@ public ConvertToRegularPluggableDatabaseResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forCreateApplicationVip(CreateApplicationVipRequest request) { - return forCreateApplicationVip( + public com.oracle.bmc.waiter.Waiter< + CheckExternalDatabaseConnectorConnectionStatusRequest, + CheckExternalDatabaseConnectorConnectionStatusResponse> + forCheckExternalDatabaseConnectorConnectionStatus( + CheckExternalDatabaseConnectorConnectionStatusRequest request) { + return forCheckExternalDatabaseConnectorConnectionStatus( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -2274,9 +2474,11 @@ public ConvertToRegularPluggableDatabaseResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forCreateApplicationVip( - CreateApplicationVipRequest request, + public com.oracle.bmc.waiter.Waiter< + CheckExternalDatabaseConnectorConnectionStatusRequest, + CheckExternalDatabaseConnectorConnectionStatusResponse> + forCheckExternalDatabaseConnectorConnectionStatus( + CheckExternalDatabaseConnectorConnectionStatusRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -2286,11 +2488,13 @@ public ConvertToRegularPluggableDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + CheckExternalDatabaseConnectorConnectionStatusResponse>() { @Override - public CreateApplicationVipResponse call() throws Exception { - final CreateApplicationVipResponse response = - client.createApplicationVip(request); + public CheckExternalDatabaseConnectorConnectionStatusResponse call() + throws Exception { + final CheckExternalDatabaseConnectorConnectionStatusResponse response = + client.checkExternalDatabaseConnectorConnectionStatus(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -2320,10 +2524,9 @@ public CreateApplicationVipResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateAutonomousContainerDatabaseRequest, - CreateAutonomousContainerDatabaseResponse> - forCreateAutonomousContainerDatabase(CreateAutonomousContainerDatabaseRequest request) { - return forCreateAutonomousContainerDatabase( + CompleteExternalBackupJobRequest, CompleteExternalBackupJobResponse> + forCompleteExternalBackupJob(CompleteExternalBackupJobRequest request) { + return forCompleteExternalBackupJob( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -2338,10 +2541,9 @@ public CreateApplicationVipResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateAutonomousContainerDatabaseRequest, - CreateAutonomousContainerDatabaseResponse> - forCreateAutonomousContainerDatabase( - CreateAutonomousContainerDatabaseRequest request, + CompleteExternalBackupJobRequest, CompleteExternalBackupJobResponse> + forCompleteExternalBackupJob( + CompleteExternalBackupJobRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -2351,11 +2553,11 @@ public CreateApplicationVipResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateAutonomousContainerDatabaseResponse call() throws Exception { - final CreateAutonomousContainerDatabaseResponse response = - client.createAutonomousContainerDatabase(request); + public CompleteExternalBackupJobResponse call() throws Exception { + final CompleteExternalBackupJobResponse response = + client.completeExternalBackupJob(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -2385,11 +2587,11 @@ public CreateAutonomousContainerDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateAutonomousContainerDatabaseDataguardAssociationRequest, - CreateAutonomousContainerDatabaseDataguardAssociationResponse> - forCreateAutonomousContainerDatabaseDataguardAssociation( - CreateAutonomousContainerDatabaseDataguardAssociationRequest request) { - return forCreateAutonomousContainerDatabaseDataguardAssociation( + ConfigureAutonomousDatabaseVaultKeyRequest, + ConfigureAutonomousDatabaseVaultKeyResponse> + forConfigureAutonomousDatabaseVaultKey( + ConfigureAutonomousDatabaseVaultKeyRequest request) { + return forConfigureAutonomousDatabaseVaultKey( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -2404,10 +2606,10 @@ public CreateAutonomousContainerDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateAutonomousContainerDatabaseDataguardAssociationRequest, - CreateAutonomousContainerDatabaseDataguardAssociationResponse> - forCreateAutonomousContainerDatabaseDataguardAssociation( - CreateAutonomousContainerDatabaseDataguardAssociationRequest request, + ConfigureAutonomousDatabaseVaultKeyRequest, + ConfigureAutonomousDatabaseVaultKeyResponse> + forConfigureAutonomousDatabaseVaultKey( + ConfigureAutonomousDatabaseVaultKeyRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -2417,16 +2619,11 @@ public CreateAutonomousContainerDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - CreateAutonomousContainerDatabaseDataguardAssociationResponse>() { + new java.util.concurrent.Callable() { @Override - public CreateAutonomousContainerDatabaseDataguardAssociationResponse call() - throws Exception { - final CreateAutonomousContainerDatabaseDataguardAssociationResponse - response = - client - .createAutonomousContainerDatabaseDataguardAssociation( - request); + public ConfigureAutonomousDatabaseVaultKeyResponse call() throws Exception { + final ConfigureAutonomousDatabaseVaultKeyResponse response = + client.configureAutonomousDatabaseVaultKey(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -2456,9 +2653,11 @@ public CreateAutonomousContainerDatabaseDataguardAssociationResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateAutonomousDatabaseRequest, CreateAutonomousDatabaseResponse> - forCreateAutonomousDatabase(CreateAutonomousDatabaseRequest request) { - return forCreateAutonomousDatabase( + ConfigureExascaleExadataInfrastructureRequest, + ConfigureExascaleExadataInfrastructureResponse> + forConfigureExascaleExadataInfrastructure( + ConfigureExascaleExadataInfrastructureRequest request) { + return forConfigureExascaleExadataInfrastructure( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -2473,9 +2672,10 @@ public CreateAutonomousContainerDatabaseDataguardAssociationResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateAutonomousDatabaseRequest, CreateAutonomousDatabaseResponse> - forCreateAutonomousDatabase( - CreateAutonomousDatabaseRequest request, + ConfigureExascaleExadataInfrastructureRequest, + ConfigureExascaleExadataInfrastructureResponse> + forConfigureExascaleExadataInfrastructure( + ConfigureExascaleExadataInfrastructureRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -2485,11 +2685,12 @@ public CreateAutonomousContainerDatabaseDataguardAssociationResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + ConfigureExascaleExadataInfrastructureResponse>() { @Override - public CreateAutonomousDatabaseResponse call() throws Exception { - final CreateAutonomousDatabaseResponse response = - client.createAutonomousDatabase(request); + public ConfigureExascaleExadataInfrastructureResponse call() throws Exception { + final ConfigureExascaleExadataInfrastructureResponse response = + client.configureExascaleExadataInfrastructure(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -2519,9 +2720,9 @@ public CreateAutonomousDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateAutonomousDatabaseBackupRequest, CreateAutonomousDatabaseBackupResponse> - forCreateAutonomousDatabaseBackup(CreateAutonomousDatabaseBackupRequest request) { - return forCreateAutonomousDatabaseBackup( + ConfigureSaasAdminUserRequest, ConfigureSaasAdminUserResponse> + forConfigureSaasAdminUser(ConfigureSaasAdminUserRequest request) { + return forConfigureSaasAdminUser( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -2536,9 +2737,9 @@ public CreateAutonomousDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateAutonomousDatabaseBackupRequest, CreateAutonomousDatabaseBackupResponse> - forCreateAutonomousDatabaseBackup( - CreateAutonomousDatabaseBackupRequest request, + ConfigureSaasAdminUserRequest, ConfigureSaasAdminUserResponse> + forConfigureSaasAdminUser( + ConfigureSaasAdminUserRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -2548,11 +2749,11 @@ public CreateAutonomousDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateAutonomousDatabaseBackupResponse call() throws Exception { - final CreateAutonomousDatabaseBackupResponse response = - client.createAutonomousDatabaseBackup(request); + public ConfigureSaasAdminUserResponse call() throws Exception { + final ConfigureSaasAdminUserResponse response = + client.configureSaasAdminUser(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -2582,11 +2783,10 @@ public CreateAutonomousDatabaseBackupResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateAutonomousDatabaseSoftwareImageRequest, - CreateAutonomousDatabaseSoftwareImageResponse> - forCreateAutonomousDatabaseSoftwareImage( - CreateAutonomousDatabaseSoftwareImageRequest request) { - return forCreateAutonomousDatabaseSoftwareImage( + ConfirmKeyStoreDetailsAreCorrectRequest, + ConfirmKeyStoreDetailsAreCorrectResponse> + forConfirmKeyStoreDetailsAreCorrect(ConfirmKeyStoreDetailsAreCorrectRequest request) { + return forConfirmKeyStoreDetailsAreCorrect( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -2601,10 +2801,10 @@ public CreateAutonomousDatabaseBackupResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateAutonomousDatabaseSoftwareImageRequest, - CreateAutonomousDatabaseSoftwareImageResponse> - forCreateAutonomousDatabaseSoftwareImage( - CreateAutonomousDatabaseSoftwareImageRequest request, + ConfirmKeyStoreDetailsAreCorrectRequest, + ConfirmKeyStoreDetailsAreCorrectResponse> + forConfirmKeyStoreDetailsAreCorrect( + ConfirmKeyStoreDetailsAreCorrectRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -2614,11 +2814,11 @@ public CreateAutonomousDatabaseBackupResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateAutonomousDatabaseSoftwareImageResponse call() throws Exception { - final CreateAutonomousDatabaseSoftwareImageResponse response = - client.createAutonomousDatabaseSoftwareImage(request); + public ConfirmKeyStoreDetailsAreCorrectResponse call() throws Exception { + final ConfirmKeyStoreDetailsAreCorrectResponse response = + client.confirmKeyStoreDetailsAreCorrect(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -2647,10 +2847,9 @@ public CreateAutonomousDatabaseSoftwareImageResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - CreateAutonomousVmClusterRequest, CreateAutonomousVmClusterResponse> - forCreateAutonomousVmCluster(CreateAutonomousVmClusterRequest request) { - return forCreateAutonomousVmCluster( + public com.oracle.bmc.waiter.Waiter forConvertToPdb( + ConvertToPdbRequest request) { + return forConvertToPdb( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -2664,12 +2863,10 @@ public CreateAutonomousDatabaseSoftwareImageResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - CreateAutonomousVmClusterRequest, CreateAutonomousVmClusterResponse> - forCreateAutonomousVmCluster( - CreateAutonomousVmClusterRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter forConvertToPdb( + ConvertToPdbRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { throw new IllegalStateException( "A WorkRequestClient must be supplied to this waiter for this operation"); @@ -2677,11 +2874,10 @@ public CreateAutonomousDatabaseSoftwareImageResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateAutonomousVmClusterResponse call() throws Exception { - final CreateAutonomousVmClusterResponse response = - client.createAutonomousVmCluster(request); + public ConvertToPdbResponse call() throws Exception { + final ConvertToPdbResponse response = client.convertToPdb(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -2710,9 +2906,11 @@ public CreateAutonomousVmClusterResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forCreateBackup( - CreateBackupRequest request) { - return forCreateBackup( + public com.oracle.bmc.waiter.Waiter< + ConvertToRegularPluggableDatabaseRequest, + ConvertToRegularPluggableDatabaseResponse> + forConvertToRegularPluggableDatabase(ConvertToRegularPluggableDatabaseRequest request) { + return forConvertToRegularPluggableDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -2726,10 +2924,13 @@ public com.oracle.bmc.waiter.Waiter f * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forCreateBackup( - CreateBackupRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter< + ConvertToRegularPluggableDatabaseRequest, + ConvertToRegularPluggableDatabaseResponse> + forConvertToRegularPluggableDatabase( + ConvertToRegularPluggableDatabaseRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { throw new IllegalStateException( "A WorkRequestClient must be supplied to this waiter for this operation"); @@ -2737,10 +2938,11 @@ public com.oracle.bmc.waiter.Waiter f return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateBackupResponse call() throws Exception { - final CreateBackupResponse response = client.createBackup(request); + public ConvertToRegularPluggableDatabaseResponse call() throws Exception { + final ConvertToRegularPluggableDatabaseResponse response = + client.convertToRegularPluggableDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -2769,10 +2971,9 @@ public CreateBackupResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - CreateCloudAutonomousVmClusterRequest, CreateCloudAutonomousVmClusterResponse> - forCreateCloudAutonomousVmCluster(CreateCloudAutonomousVmClusterRequest request) { - return forCreateCloudAutonomousVmCluster( + public com.oracle.bmc.waiter.Waiter + forCreateApplicationVip(CreateApplicationVipRequest request) { + return forCreateApplicationVip( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -2786,10 +2987,9 @@ public CreateBackupResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - CreateCloudAutonomousVmClusterRequest, CreateCloudAutonomousVmClusterResponse> - forCreateCloudAutonomousVmCluster( - CreateCloudAutonomousVmClusterRequest request, + public com.oracle.bmc.waiter.Waiter + forCreateApplicationVip( + CreateApplicationVipRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -2799,11 +2999,11 @@ public CreateBackupResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateCloudAutonomousVmClusterResponse call() throws Exception { - final CreateCloudAutonomousVmClusterResponse response = - client.createCloudAutonomousVmCluster(request); + public CreateApplicationVipResponse call() throws Exception { + final CreateApplicationVipResponse response = + client.createApplicationVip(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -2833,10 +3033,10 @@ public CreateCloudAutonomousVmClusterResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateCloudExadataInfrastructureRequest, - CreateCloudExadataInfrastructureResponse> - forCreateCloudExadataInfrastructure(CreateCloudExadataInfrastructureRequest request) { - return forCreateCloudExadataInfrastructure( + CreateAutonomousContainerDatabaseRequest, + CreateAutonomousContainerDatabaseResponse> + forCreateAutonomousContainerDatabase(CreateAutonomousContainerDatabaseRequest request) { + return forCreateAutonomousContainerDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -2851,10 +3051,10 @@ public CreateCloudAutonomousVmClusterResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateCloudExadataInfrastructureRequest, - CreateCloudExadataInfrastructureResponse> - forCreateCloudExadataInfrastructure( - CreateCloudExadataInfrastructureRequest request, + CreateAutonomousContainerDatabaseRequest, + CreateAutonomousContainerDatabaseResponse> + forCreateAutonomousContainerDatabase( + CreateAutonomousContainerDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -2864,11 +3064,11 @@ public CreateCloudAutonomousVmClusterResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateCloudExadataInfrastructureResponse call() throws Exception { - final CreateCloudExadataInfrastructureResponse response = - client.createCloudExadataInfrastructure(request); + public CreateAutonomousContainerDatabaseResponse call() throws Exception { + final CreateAutonomousContainerDatabaseResponse response = + client.createAutonomousContainerDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -2897,9 +3097,12 @@ public CreateCloudExadataInfrastructureResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forCreateCloudVmCluster(CreateCloudVmClusterRequest request) { - return forCreateCloudVmCluster( + public com.oracle.bmc.waiter.Waiter< + CreateAutonomousContainerDatabaseDataguardAssociationRequest, + CreateAutonomousContainerDatabaseDataguardAssociationResponse> + forCreateAutonomousContainerDatabaseDataguardAssociation( + CreateAutonomousContainerDatabaseDataguardAssociationRequest request) { + return forCreateAutonomousContainerDatabaseDataguardAssociation( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -2913,9 +3116,11 @@ public CreateCloudExadataInfrastructureResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forCreateCloudVmCluster( - CreateCloudVmClusterRequest request, + public com.oracle.bmc.waiter.Waiter< + CreateAutonomousContainerDatabaseDataguardAssociationRequest, + CreateAutonomousContainerDatabaseDataguardAssociationResponse> + forCreateAutonomousContainerDatabaseDataguardAssociation( + CreateAutonomousContainerDatabaseDataguardAssociationRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -2925,11 +3130,16 @@ public CreateCloudExadataInfrastructureResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + CreateAutonomousContainerDatabaseDataguardAssociationResponse>() { @Override - public CreateCloudVmClusterResponse call() throws Exception { - final CreateCloudVmClusterResponse response = - client.createCloudVmCluster(request); + public CreateAutonomousContainerDatabaseDataguardAssociationResponse call() + throws Exception { + final CreateAutonomousContainerDatabaseDataguardAssociationResponse + response = + client + .createAutonomousContainerDatabaseDataguardAssociation( + request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -2959,9 +3169,9 @@ public CreateCloudVmClusterResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateConsoleConnectionRequest, CreateConsoleConnectionResponse> - forCreateConsoleConnection(CreateConsoleConnectionRequest request) { - return forCreateConsoleConnection( + CreateAutonomousDatabaseRequest, CreateAutonomousDatabaseResponse> + forCreateAutonomousDatabase(CreateAutonomousDatabaseRequest request) { + return forCreateAutonomousDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -2976,9 +3186,9 @@ public CreateCloudVmClusterResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateConsoleConnectionRequest, CreateConsoleConnectionResponse> - forCreateConsoleConnection( - CreateConsoleConnectionRequest request, + CreateAutonomousDatabaseRequest, CreateAutonomousDatabaseResponse> + forCreateAutonomousDatabase( + CreateAutonomousDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -2988,11 +3198,11 @@ public CreateCloudVmClusterResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateConsoleConnectionResponse call() throws Exception { - final CreateConsoleConnectionResponse response = - client.createConsoleConnection(request); + public CreateAutonomousDatabaseResponse call() throws Exception { + final CreateAutonomousDatabaseResponse response = + client.createAutonomousDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -3021,9 +3231,10 @@ public CreateConsoleConnectionResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forCreateConsoleHistory(CreateConsoleHistoryRequest request) { - return forCreateConsoleHistory( + public com.oracle.bmc.waiter.Waiter< + CreateAutonomousDatabaseBackupRequest, CreateAutonomousDatabaseBackupResponse> + forCreateAutonomousDatabaseBackup(CreateAutonomousDatabaseBackupRequest request) { + return forCreateAutonomousDatabaseBackup( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -3037,9 +3248,10 @@ public CreateConsoleConnectionResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forCreateConsoleHistory( - CreateConsoleHistoryRequest request, + public com.oracle.bmc.waiter.Waiter< + CreateAutonomousDatabaseBackupRequest, CreateAutonomousDatabaseBackupResponse> + forCreateAutonomousDatabaseBackup( + CreateAutonomousDatabaseBackupRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -3049,11 +3261,11 @@ public CreateConsoleConnectionResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateConsoleHistoryResponse call() throws Exception { - final CreateConsoleHistoryResponse response = - client.createConsoleHistory(request); + public CreateAutonomousDatabaseBackupResponse call() throws Exception { + final CreateAutonomousDatabaseBackupResponse response = + client.createAutonomousDatabaseBackup(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -3083,9 +3295,11 @@ public CreateConsoleHistoryResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateDataGuardAssociationRequest, CreateDataGuardAssociationResponse> - forCreateDataGuardAssociation(CreateDataGuardAssociationRequest request) { - return forCreateDataGuardAssociation( + CreateAutonomousDatabaseSoftwareImageRequest, + CreateAutonomousDatabaseSoftwareImageResponse> + forCreateAutonomousDatabaseSoftwareImage( + CreateAutonomousDatabaseSoftwareImageRequest request) { + return forCreateAutonomousDatabaseSoftwareImage( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -3100,9 +3314,10 @@ public CreateConsoleHistoryResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateDataGuardAssociationRequest, CreateDataGuardAssociationResponse> - forCreateDataGuardAssociation( - CreateDataGuardAssociationRequest request, + CreateAutonomousDatabaseSoftwareImageRequest, + CreateAutonomousDatabaseSoftwareImageResponse> + forCreateAutonomousDatabaseSoftwareImage( + CreateAutonomousDatabaseSoftwareImageRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -3112,11 +3327,11 @@ public CreateConsoleHistoryResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateDataGuardAssociationResponse call() throws Exception { - final CreateDataGuardAssociationResponse response = - client.createDataGuardAssociation(request); + public CreateAutonomousDatabaseSoftwareImageResponse call() throws Exception { + final CreateAutonomousDatabaseSoftwareImageResponse response = + client.createAutonomousDatabaseSoftwareImage(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -3145,9 +3360,10 @@ public CreateDataGuardAssociationResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forCreateDatabase(CreateDatabaseRequest request) { - return forCreateDatabase( + public com.oracle.bmc.waiter.Waiter< + CreateAutonomousVmClusterRequest, CreateAutonomousVmClusterResponse> + forCreateAutonomousVmCluster(CreateAutonomousVmClusterRequest request) { + return forCreateAutonomousVmCluster( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -3161,9 +3377,10 @@ public CreateDataGuardAssociationResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forCreateDatabase( - CreateDatabaseRequest request, + public com.oracle.bmc.waiter.Waiter< + CreateAutonomousVmClusterRequest, CreateAutonomousVmClusterResponse> + forCreateAutonomousVmCluster( + CreateAutonomousVmClusterRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -3173,10 +3390,11 @@ public CreateDataGuardAssociationResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateDatabaseResponse call() throws Exception { - final CreateDatabaseResponse response = client.createDatabase(request); + public CreateAutonomousVmClusterResponse call() throws Exception { + final CreateAutonomousVmClusterResponse response = + client.createAutonomousVmCluster(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -3205,10 +3423,9 @@ public CreateDatabaseResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - CreateDatabaseSoftwareImageRequest, CreateDatabaseSoftwareImageResponse> - forCreateDatabaseSoftwareImage(CreateDatabaseSoftwareImageRequest request) { - return forCreateDatabaseSoftwareImage( + public com.oracle.bmc.waiter.Waiter forCreateBackup( + CreateBackupRequest request) { + return forCreateBackup( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -3222,12 +3439,10 @@ public CreateDatabaseResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - CreateDatabaseSoftwareImageRequest, CreateDatabaseSoftwareImageResponse> - forCreateDatabaseSoftwareImage( - CreateDatabaseSoftwareImageRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter forCreateBackup( + CreateBackupRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { throw new IllegalStateException( "A WorkRequestClient must be supplied to this waiter for this operation"); @@ -3235,11 +3450,10 @@ public CreateDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateDatabaseSoftwareImageResponse call() throws Exception { - final CreateDatabaseSoftwareImageResponse response = - client.createDatabaseSoftwareImage(request); + public CreateBackupResponse call() throws Exception { + final CreateBackupResponse response = client.createBackup(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -3268,9 +3482,10 @@ public CreateDatabaseSoftwareImageResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forCreateDbHome( - CreateDbHomeRequest request) { - return forCreateDbHome( + public com.oracle.bmc.waiter.Waiter< + CreateCloudAutonomousVmClusterRequest, CreateCloudAutonomousVmClusterResponse> + forCreateCloudAutonomousVmCluster(CreateCloudAutonomousVmClusterRequest request) { + return forCreateCloudAutonomousVmCluster( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -3284,10 +3499,12 @@ public com.oracle.bmc.waiter.Waiter f * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forCreateDbHome( - CreateDbHomeRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter< + CreateCloudAutonomousVmClusterRequest, CreateCloudAutonomousVmClusterResponse> + forCreateCloudAutonomousVmCluster( + CreateCloudAutonomousVmClusterRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { throw new IllegalStateException( "A WorkRequestClient must be supplied to this waiter for this operation"); @@ -3295,10 +3512,11 @@ public com.oracle.bmc.waiter.Waiter f return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateDbHomeResponse call() throws Exception { - final CreateDbHomeResponse response = client.createDbHome(request); + public CreateCloudAutonomousVmClusterResponse call() throws Exception { + final CreateCloudAutonomousVmClusterResponse response = + client.createCloudAutonomousVmCluster(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -3328,9 +3546,10 @@ public CreateDbHomeResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateExadataInfrastructureRequest, CreateExadataInfrastructureResponse> - forCreateExadataInfrastructure(CreateExadataInfrastructureRequest request) { - return forCreateExadataInfrastructure( + CreateCloudExadataInfrastructureRequest, + CreateCloudExadataInfrastructureResponse> + forCreateCloudExadataInfrastructure(CreateCloudExadataInfrastructureRequest request) { + return forCreateCloudExadataInfrastructure( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -3345,9 +3564,10 @@ public CreateDbHomeResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateExadataInfrastructureRequest, CreateExadataInfrastructureResponse> - forCreateExadataInfrastructure( - CreateExadataInfrastructureRequest request, + CreateCloudExadataInfrastructureRequest, + CreateCloudExadataInfrastructureResponse> + forCreateCloudExadataInfrastructure( + CreateCloudExadataInfrastructureRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -3357,11 +3577,11 @@ public CreateDbHomeResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateExadataInfrastructureResponse call() throws Exception { - final CreateExadataInfrastructureResponse response = - client.createExadataInfrastructure(request); + public CreateCloudExadataInfrastructureResponse call() throws Exception { + final CreateCloudExadataInfrastructureResponse response = + client.createCloudExadataInfrastructure(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -3390,10 +3610,9 @@ public CreateExadataInfrastructureResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - CreateExternalBackupJobRequest, CreateExternalBackupJobResponse> - forCreateExternalBackupJob(CreateExternalBackupJobRequest request) { - return forCreateExternalBackupJob( + public com.oracle.bmc.waiter.Waiter + forCreateCloudVmCluster(CreateCloudVmClusterRequest request) { + return forCreateCloudVmCluster( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -3407,10 +3626,9 @@ public CreateExadataInfrastructureResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - CreateExternalBackupJobRequest, CreateExternalBackupJobResponse> - forCreateExternalBackupJob( - CreateExternalBackupJobRequest request, + public com.oracle.bmc.waiter.Waiter + forCreateCloudVmCluster( + CreateCloudVmClusterRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -3420,11 +3638,11 @@ public CreateExadataInfrastructureResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateExternalBackupJobResponse call() throws Exception { - final CreateExternalBackupJobResponse response = - client.createExternalBackupJob(request); + public CreateCloudVmClusterResponse call() throws Exception { + final CreateCloudVmClusterResponse response = + client.createCloudVmCluster(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -3454,9 +3672,9 @@ public CreateExternalBackupJobResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateExternalContainerDatabaseRequest, CreateExternalContainerDatabaseResponse> - forCreateExternalContainerDatabase(CreateExternalContainerDatabaseRequest request) { - return forCreateExternalContainerDatabase( + CreateConsoleConnectionRequest, CreateConsoleConnectionResponse> + forCreateConsoleConnection(CreateConsoleConnectionRequest request) { + return forCreateConsoleConnection( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -3471,9 +3689,9 @@ public CreateExternalBackupJobResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateExternalContainerDatabaseRequest, CreateExternalContainerDatabaseResponse> - forCreateExternalContainerDatabase( - CreateExternalContainerDatabaseRequest request, + CreateConsoleConnectionRequest, CreateConsoleConnectionResponse> + forCreateConsoleConnection( + CreateConsoleConnectionRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -3483,11 +3701,11 @@ public CreateExternalBackupJobResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateExternalContainerDatabaseResponse call() throws Exception { - final CreateExternalContainerDatabaseResponse response = - client.createExternalContainerDatabase(request); + public CreateConsoleConnectionResponse call() throws Exception { + final CreateConsoleConnectionResponse response = + client.createConsoleConnection(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -3516,10 +3734,9 @@ public CreateExternalContainerDatabaseResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - CreateExternalDatabaseConnectorRequest, CreateExternalDatabaseConnectorResponse> - forCreateExternalDatabaseConnector(CreateExternalDatabaseConnectorRequest request) { - return forCreateExternalDatabaseConnector( + public com.oracle.bmc.waiter.Waiter + forCreateConsoleHistory(CreateConsoleHistoryRequest request) { + return forCreateConsoleHistory( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -3533,10 +3750,9 @@ public CreateExternalContainerDatabaseResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - CreateExternalDatabaseConnectorRequest, CreateExternalDatabaseConnectorResponse> - forCreateExternalDatabaseConnector( - CreateExternalDatabaseConnectorRequest request, + public com.oracle.bmc.waiter.Waiter + forCreateConsoleHistory( + CreateConsoleHistoryRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -3546,11 +3762,11 @@ public CreateExternalContainerDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateExternalDatabaseConnectorResponse call() throws Exception { - final CreateExternalDatabaseConnectorResponse response = - client.createExternalDatabaseConnector(request); + public CreateConsoleHistoryResponse call() throws Exception { + final CreateConsoleHistoryResponse response = + client.createConsoleHistory(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -3580,11 +3796,9 @@ public CreateExternalDatabaseConnectorResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateExternalNonContainerDatabaseRequest, - CreateExternalNonContainerDatabaseResponse> - forCreateExternalNonContainerDatabase( - CreateExternalNonContainerDatabaseRequest request) { - return forCreateExternalNonContainerDatabase( + CreateDataGuardAssociationRequest, CreateDataGuardAssociationResponse> + forCreateDataGuardAssociation(CreateDataGuardAssociationRequest request) { + return forCreateDataGuardAssociation( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -3599,10 +3813,9 @@ public CreateExternalDatabaseConnectorResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - CreateExternalNonContainerDatabaseRequest, - CreateExternalNonContainerDatabaseResponse> - forCreateExternalNonContainerDatabase( - CreateExternalNonContainerDatabaseRequest request, + CreateDataGuardAssociationRequest, CreateDataGuardAssociationResponse> + forCreateDataGuardAssociation( + CreateDataGuardAssociationRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -3612,11 +3825,11 @@ public CreateExternalDatabaseConnectorResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateExternalNonContainerDatabaseResponse call() throws Exception { - final CreateExternalNonContainerDatabaseResponse response = - client.createExternalNonContainerDatabase(request); + public CreateDataGuardAssociationResponse call() throws Exception { + final CreateDataGuardAssociationResponse response = + client.createDataGuardAssociation(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -3645,10 +3858,9 @@ public CreateExternalNonContainerDatabaseResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - CreateExternalPluggableDatabaseRequest, CreateExternalPluggableDatabaseResponse> - forCreateExternalPluggableDatabase(CreateExternalPluggableDatabaseRequest request) { - return forCreateExternalPluggableDatabase( + public com.oracle.bmc.waiter.Waiter + forCreateDatabase(CreateDatabaseRequest request) { + return forCreateDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -3662,10 +3874,9 @@ public CreateExternalNonContainerDatabaseResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - CreateExternalPluggableDatabaseRequest, CreateExternalPluggableDatabaseResponse> - forCreateExternalPluggableDatabase( - CreateExternalPluggableDatabaseRequest request, + public com.oracle.bmc.waiter.Waiter + forCreateDatabase( + CreateDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -3675,11 +3886,10 @@ public CreateExternalNonContainerDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateExternalPluggableDatabaseResponse call() throws Exception { - final CreateExternalPluggableDatabaseResponse response = - client.createExternalPluggableDatabase(request); + public CreateDatabaseResponse call() throws Exception { + final CreateDatabaseResponse response = client.createDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -3708,9 +3918,10 @@ public CreateExternalPluggableDatabaseResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forCreateOneoffPatch(CreateOneoffPatchRequest request) { - return forCreateOneoffPatch( + public com.oracle.bmc.waiter.Waiter< + CreateDatabaseSoftwareImageRequest, CreateDatabaseSoftwareImageResponse> + forCreateDatabaseSoftwareImage(CreateDatabaseSoftwareImageRequest request) { + return forCreateDatabaseSoftwareImage( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -3724,9 +3935,10 @@ public CreateExternalPluggableDatabaseResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forCreateOneoffPatch( - CreateOneoffPatchRequest request, + public com.oracle.bmc.waiter.Waiter< + CreateDatabaseSoftwareImageRequest, CreateDatabaseSoftwareImageResponse> + forCreateDatabaseSoftwareImage( + CreateDatabaseSoftwareImageRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -3736,11 +3948,11 @@ public CreateExternalPluggableDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateOneoffPatchResponse call() throws Exception { - final CreateOneoffPatchResponse response = - client.createOneoffPatch(request); + public CreateDatabaseSoftwareImageResponse call() throws Exception { + final CreateDatabaseSoftwareImageResponse response = + client.createDatabaseSoftwareImage(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -3769,10 +3981,9 @@ public CreateOneoffPatchResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - CreatePluggableDatabaseRequest, CreatePluggableDatabaseResponse> - forCreatePluggableDatabase(CreatePluggableDatabaseRequest request) { - return forCreatePluggableDatabase( + public com.oracle.bmc.waiter.Waiter forCreateDbHome( + CreateDbHomeRequest request) { + return forCreateDbHome( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -3786,12 +3997,10 @@ public CreateOneoffPatchResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - CreatePluggableDatabaseRequest, CreatePluggableDatabaseResponse> - forCreatePluggableDatabase( - CreatePluggableDatabaseRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter forCreateDbHome( + CreateDbHomeRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { throw new IllegalStateException( "A WorkRequestClient must be supplied to this waiter for this operation"); @@ -3799,11 +4008,10 @@ public CreateOneoffPatchResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreatePluggableDatabaseResponse call() throws Exception { - final CreatePluggableDatabaseResponse response = - client.createPluggableDatabase(request); + public CreateDbHomeResponse call() throws Exception { + final CreateDbHomeResponse response = client.createDbHome(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -3832,9 +4040,10 @@ public CreatePluggableDatabaseResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forCreateVmCluster(CreateVmClusterRequest request) { - return forCreateVmCluster( + public com.oracle.bmc.waiter.Waiter< + CreateExadataInfrastructureRequest, CreateExadataInfrastructureResponse> + forCreateExadataInfrastructure(CreateExadataInfrastructureRequest request) { + return forCreateExadataInfrastructure( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -3848,9 +4057,10 @@ public CreatePluggableDatabaseResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forCreateVmCluster( - CreateVmClusterRequest request, + public com.oracle.bmc.waiter.Waiter< + CreateExadataInfrastructureRequest, CreateExadataInfrastructureResponse> + forCreateExadataInfrastructure( + CreateExadataInfrastructureRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -3860,10 +4070,11 @@ public CreatePluggableDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateVmClusterResponse call() throws Exception { - final CreateVmClusterResponse response = client.createVmCluster(request); + public CreateExadataInfrastructureResponse call() throws Exception { + final CreateExadataInfrastructureResponse response = + client.createExadataInfrastructure(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -3892,10 +4103,9 @@ public CreateVmClusterResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - CreateVmClusterNetworkRequest, CreateVmClusterNetworkResponse> - forCreateVmClusterNetwork(CreateVmClusterNetworkRequest request) { - return forCreateVmClusterNetwork( + public com.oracle.bmc.waiter.Waiter + forCreateExadbVmCluster(CreateExadbVmClusterRequest request) { + return forCreateExadbVmCluster( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -3909,10 +4119,9 @@ public CreateVmClusterResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - CreateVmClusterNetworkRequest, CreateVmClusterNetworkResponse> - forCreateVmClusterNetwork( - CreateVmClusterNetworkRequest request, + public com.oracle.bmc.waiter.Waiter + forCreateExadbVmCluster( + CreateExadbVmClusterRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -3922,11 +4131,11 @@ public CreateVmClusterResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public CreateVmClusterNetworkResponse call() throws Exception { - final CreateVmClusterNetworkResponse response = - client.createVmClusterNetwork(request); + public CreateExadbVmClusterResponse call() throws Exception { + final CreateExadbVmClusterResponse response = + client.createExadbVmCluster(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -3955,9 +4164,10 @@ public CreateVmClusterNetworkResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDbNodeAction( - DbNodeActionRequest request) { - return forDbNodeAction( + public com.oracle.bmc.waiter.Waiter< + CreateExascaleDbStorageVaultRequest, CreateExascaleDbStorageVaultResponse> + forCreateExascaleDbStorageVault(CreateExascaleDbStorageVaultRequest request) { + return forCreateExascaleDbStorageVault( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -3971,10 +4181,12 @@ public com.oracle.bmc.waiter.Waiter f * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDbNodeAction( - DbNodeActionRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter< + CreateExascaleDbStorageVaultRequest, CreateExascaleDbStorageVaultResponse> + forCreateExascaleDbStorageVault( + CreateExascaleDbStorageVaultRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { throw new IllegalStateException( "A WorkRequestClient must be supplied to this waiter for this operation"); @@ -3982,10 +4194,11 @@ public com.oracle.bmc.waiter.Waiter f return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DbNodeActionResponse call() throws Exception { - final DbNodeActionResponse response = client.dbNodeAction(request); + public CreateExascaleDbStorageVaultResponse call() throws Exception { + final CreateExascaleDbStorageVaultResponse response = + client.createExascaleDbStorageVault(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -4014,9 +4227,9 @@ public DbNodeActionResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forDeleteApplicationVip(DeleteApplicationVipRequest request) { - return forDeleteApplicationVip( + public com.oracle.bmc.waiter.Waiter + forCreateExecutionAction(CreateExecutionActionRequest request) { + return forCreateExecutionAction( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -4030,9 +4243,9 @@ public DbNodeActionResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forDeleteApplicationVip( - DeleteApplicationVipRequest request, + public com.oracle.bmc.waiter.Waiter + forCreateExecutionAction( + CreateExecutionActionRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -4042,11 +4255,11 @@ public DbNodeActionResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteApplicationVipResponse call() throws Exception { - final DeleteApplicationVipResponse response = - client.deleteApplicationVip(request); + public CreateExecutionActionResponse call() throws Exception { + final CreateExecutionActionResponse response = + client.createExecutionAction(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -4075,10 +4288,9 @@ public DeleteApplicationVipResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DeleteAutonomousDatabaseRequest, DeleteAutonomousDatabaseResponse> - forDeleteAutonomousDatabase(DeleteAutonomousDatabaseRequest request) { - return forDeleteAutonomousDatabase( + public com.oracle.bmc.waiter.Waiter + forCreateExecutionWindow(CreateExecutionWindowRequest request) { + return forCreateExecutionWindow( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -4092,10 +4304,9 @@ public DeleteApplicationVipResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DeleteAutonomousDatabaseRequest, DeleteAutonomousDatabaseResponse> - forDeleteAutonomousDatabase( - DeleteAutonomousDatabaseRequest request, + public com.oracle.bmc.waiter.Waiter + forCreateExecutionWindow( + CreateExecutionWindowRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -4105,11 +4316,11 @@ public DeleteApplicationVipResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteAutonomousDatabaseResponse call() throws Exception { - final DeleteAutonomousDatabaseResponse response = - client.deleteAutonomousDatabase(request); + public CreateExecutionWindowResponse call() throws Exception { + final CreateExecutionWindowResponse response = + client.createExecutionWindow(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -4139,9 +4350,9 @@ public DeleteAutonomousDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeleteAutonomousDatabaseBackupRequest, DeleteAutonomousDatabaseBackupResponse> - forDeleteAutonomousDatabaseBackup(DeleteAutonomousDatabaseBackupRequest request) { - return forDeleteAutonomousDatabaseBackup( + CreateExternalBackupJobRequest, CreateExternalBackupJobResponse> + forCreateExternalBackupJob(CreateExternalBackupJobRequest request) { + return forCreateExternalBackupJob( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -4156,9 +4367,9 @@ public DeleteAutonomousDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeleteAutonomousDatabaseBackupRequest, DeleteAutonomousDatabaseBackupResponse> - forDeleteAutonomousDatabaseBackup( - DeleteAutonomousDatabaseBackupRequest request, + CreateExternalBackupJobRequest, CreateExternalBackupJobResponse> + forCreateExternalBackupJob( + CreateExternalBackupJobRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -4168,11 +4379,11 @@ public DeleteAutonomousDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteAutonomousDatabaseBackupResponse call() throws Exception { - final DeleteAutonomousDatabaseBackupResponse response = - client.deleteAutonomousDatabaseBackup(request); + public CreateExternalBackupJobResponse call() throws Exception { + final CreateExternalBackupJobResponse response = + client.createExternalBackupJob(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -4202,11 +4413,9 @@ public DeleteAutonomousDatabaseBackupResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeleteAutonomousDatabaseSoftwareImageRequest, - DeleteAutonomousDatabaseSoftwareImageResponse> - forDeleteAutonomousDatabaseSoftwareImage( - DeleteAutonomousDatabaseSoftwareImageRequest request) { - return forDeleteAutonomousDatabaseSoftwareImage( + CreateExternalContainerDatabaseRequest, CreateExternalContainerDatabaseResponse> + forCreateExternalContainerDatabase(CreateExternalContainerDatabaseRequest request) { + return forCreateExternalContainerDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -4221,10 +4430,9 @@ public DeleteAutonomousDatabaseBackupResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeleteAutonomousDatabaseSoftwareImageRequest, - DeleteAutonomousDatabaseSoftwareImageResponse> - forDeleteAutonomousDatabaseSoftwareImage( - DeleteAutonomousDatabaseSoftwareImageRequest request, + CreateExternalContainerDatabaseRequest, CreateExternalContainerDatabaseResponse> + forCreateExternalContainerDatabase( + CreateExternalContainerDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -4234,11 +4442,11 @@ public DeleteAutonomousDatabaseBackupResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteAutonomousDatabaseSoftwareImageResponse call() throws Exception { - final DeleteAutonomousDatabaseSoftwareImageResponse response = - client.deleteAutonomousDatabaseSoftwareImage(request); + public CreateExternalContainerDatabaseResponse call() throws Exception { + final CreateExternalContainerDatabaseResponse response = + client.createExternalContainerDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -4268,9 +4476,9 @@ public DeleteAutonomousDatabaseSoftwareImageResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeleteAutonomousVmClusterRequest, DeleteAutonomousVmClusterResponse> - forDeleteAutonomousVmCluster(DeleteAutonomousVmClusterRequest request) { - return forDeleteAutonomousVmCluster( + CreateExternalDatabaseConnectorRequest, CreateExternalDatabaseConnectorResponse> + forCreateExternalDatabaseConnector(CreateExternalDatabaseConnectorRequest request) { + return forCreateExternalDatabaseConnector( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -4285,9 +4493,9 @@ public DeleteAutonomousDatabaseSoftwareImageResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeleteAutonomousVmClusterRequest, DeleteAutonomousVmClusterResponse> - forDeleteAutonomousVmCluster( - DeleteAutonomousVmClusterRequest request, + CreateExternalDatabaseConnectorRequest, CreateExternalDatabaseConnectorResponse> + forCreateExternalDatabaseConnector( + CreateExternalDatabaseConnectorRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -4297,11 +4505,11 @@ public DeleteAutonomousDatabaseSoftwareImageResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteAutonomousVmClusterResponse call() throws Exception { - final DeleteAutonomousVmClusterResponse response = - client.deleteAutonomousVmCluster(request); + public CreateExternalDatabaseConnectorResponse call() throws Exception { + final CreateExternalDatabaseConnectorResponse response = + client.createExternalDatabaseConnector(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -4330,9 +4538,12 @@ public DeleteAutonomousVmClusterResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDeleteBackup( - DeleteBackupRequest request) { - return forDeleteBackup( + public com.oracle.bmc.waiter.Waiter< + CreateExternalNonContainerDatabaseRequest, + CreateExternalNonContainerDatabaseResponse> + forCreateExternalNonContainerDatabase( + CreateExternalNonContainerDatabaseRequest request) { + return forCreateExternalNonContainerDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -4346,10 +4557,13 @@ public com.oracle.bmc.waiter.Waiter f * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDeleteBackup( - DeleteBackupRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter< + CreateExternalNonContainerDatabaseRequest, + CreateExternalNonContainerDatabaseResponse> + forCreateExternalNonContainerDatabase( + CreateExternalNonContainerDatabaseRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { throw new IllegalStateException( "A WorkRequestClient must be supplied to this waiter for this operation"); @@ -4357,10 +4571,11 @@ public com.oracle.bmc.waiter.Waiter f return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteBackupResponse call() throws Exception { - final DeleteBackupResponse response = client.deleteBackup(request); + public CreateExternalNonContainerDatabaseResponse call() throws Exception { + final CreateExternalNonContainerDatabaseResponse response = + client.createExternalNonContainerDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -4390,9 +4605,9 @@ public DeleteBackupResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeleteCloudAutonomousVmClusterRequest, DeleteCloudAutonomousVmClusterResponse> - forDeleteCloudAutonomousVmCluster(DeleteCloudAutonomousVmClusterRequest request) { - return forDeleteCloudAutonomousVmCluster( + CreateExternalPluggableDatabaseRequest, CreateExternalPluggableDatabaseResponse> + forCreateExternalPluggableDatabase(CreateExternalPluggableDatabaseRequest request) { + return forCreateExternalPluggableDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -4407,9 +4622,9 @@ public DeleteBackupResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeleteCloudAutonomousVmClusterRequest, DeleteCloudAutonomousVmClusterResponse> - forDeleteCloudAutonomousVmCluster( - DeleteCloudAutonomousVmClusterRequest request, + CreateExternalPluggableDatabaseRequest, CreateExternalPluggableDatabaseResponse> + forCreateExternalPluggableDatabase( + CreateExternalPluggableDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -4419,11 +4634,11 @@ public DeleteBackupResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteCloudAutonomousVmClusterResponse call() throws Exception { - final DeleteCloudAutonomousVmClusterResponse response = - client.deleteCloudAutonomousVmCluster(request); + public CreateExternalPluggableDatabaseResponse call() throws Exception { + final CreateExternalPluggableDatabaseResponse response = + client.createExternalPluggableDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -4452,11 +4667,9 @@ public DeleteCloudAutonomousVmClusterResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DeleteCloudExadataInfrastructureRequest, - DeleteCloudExadataInfrastructureResponse> - forDeleteCloudExadataInfrastructure(DeleteCloudExadataInfrastructureRequest request) { - return forDeleteCloudExadataInfrastructure( + public com.oracle.bmc.waiter.Waiter + forCreateOneoffPatch(CreateOneoffPatchRequest request) { + return forCreateOneoffPatch( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -4470,11 +4683,9 @@ public DeleteCloudAutonomousVmClusterResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DeleteCloudExadataInfrastructureRequest, - DeleteCloudExadataInfrastructureResponse> - forDeleteCloudExadataInfrastructure( - DeleteCloudExadataInfrastructureRequest request, + public com.oracle.bmc.waiter.Waiter + forCreateOneoffPatch( + CreateOneoffPatchRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -4484,11 +4695,11 @@ public DeleteCloudAutonomousVmClusterResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteCloudExadataInfrastructureResponse call() throws Exception { - final DeleteCloudExadataInfrastructureResponse response = - client.deleteCloudExadataInfrastructure(request); + public CreateOneoffPatchResponse call() throws Exception { + final CreateOneoffPatchResponse response = + client.createOneoffPatch(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -4517,9 +4728,10 @@ public DeleteCloudExadataInfrastructureResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forDeleteCloudVmCluster(DeleteCloudVmClusterRequest request) { - return forDeleteCloudVmCluster( + public com.oracle.bmc.waiter.Waiter< + CreatePluggableDatabaseRequest, CreatePluggableDatabaseResponse> + forCreatePluggableDatabase(CreatePluggableDatabaseRequest request) { + return forCreatePluggableDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -4533,9 +4745,10 @@ public DeleteCloudExadataInfrastructureResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forDeleteCloudVmCluster( - DeleteCloudVmClusterRequest request, + public com.oracle.bmc.waiter.Waiter< + CreatePluggableDatabaseRequest, CreatePluggableDatabaseResponse> + forCreatePluggableDatabase( + CreatePluggableDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -4545,11 +4758,11 @@ public DeleteCloudExadataInfrastructureResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteCloudVmClusterResponse call() throws Exception { - final DeleteCloudVmClusterResponse response = - client.deleteCloudVmCluster(request); + public CreatePluggableDatabaseResponse call() throws Exception { + final CreatePluggableDatabaseResponse response = + client.createPluggableDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -4578,10 +4791,9 @@ public DeleteCloudVmClusterResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DeleteConsoleConnectionRequest, DeleteConsoleConnectionResponse> - forDeleteConsoleConnection(DeleteConsoleConnectionRequest request) { - return forDeleteConsoleConnection( + public com.oracle.bmc.waiter.Waiter + forCreateScheduledAction(CreateScheduledActionRequest request) { + return forCreateScheduledAction( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -4595,10 +4807,9 @@ public DeleteCloudVmClusterResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DeleteConsoleConnectionRequest, DeleteConsoleConnectionResponse> - forDeleteConsoleConnection( - DeleteConsoleConnectionRequest request, + public com.oracle.bmc.waiter.Waiter + forCreateScheduledAction( + CreateScheduledActionRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -4608,11 +4819,11 @@ public DeleteCloudVmClusterResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteConsoleConnectionResponse call() throws Exception { - final DeleteConsoleConnectionResponse response = - client.deleteConsoleConnection(request); + public CreateScheduledActionResponse call() throws Exception { + final CreateScheduledActionResponse response = + client.createScheduledAction(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -4641,9 +4852,9 @@ public DeleteConsoleConnectionResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forDeleteConsoleHistory(DeleteConsoleHistoryRequest request) { - return forDeleteConsoleHistory( + public com.oracle.bmc.waiter.Waiter + forCreateSchedulingPlan(CreateSchedulingPlanRequest request) { + return forCreateSchedulingPlan( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -4657,9 +4868,9 @@ public DeleteConsoleConnectionResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forDeleteConsoleHistory( - DeleteConsoleHistoryRequest request, + public com.oracle.bmc.waiter.Waiter + forCreateSchedulingPlan( + CreateSchedulingPlanRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -4669,11 +4880,11 @@ public DeleteConsoleConnectionResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteConsoleHistoryResponse call() throws Exception { - final DeleteConsoleHistoryResponse response = - client.deleteConsoleHistory(request); + public CreateSchedulingPlanResponse call() throws Exception { + final CreateSchedulingPlanResponse response = + client.createSchedulingPlan(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -4702,9 +4913,10 @@ public DeleteConsoleHistoryResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forDeleteDatabase(DeleteDatabaseRequest request) { - return forDeleteDatabase( + public com.oracle.bmc.waiter.Waiter< + CreateSchedulingPolicyRequest, CreateSchedulingPolicyResponse> + forCreateSchedulingPolicy(CreateSchedulingPolicyRequest request) { + return forCreateSchedulingPolicy( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -4718,9 +4930,10 @@ public DeleteConsoleHistoryResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forDeleteDatabase( - DeleteDatabaseRequest request, + public com.oracle.bmc.waiter.Waiter< + CreateSchedulingPolicyRequest, CreateSchedulingPolicyResponse> + forCreateSchedulingPolicy( + CreateSchedulingPolicyRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -4730,10 +4943,11 @@ public DeleteConsoleHistoryResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteDatabaseResponse call() throws Exception { - final DeleteDatabaseResponse response = client.deleteDatabase(request); + public CreateSchedulingPolicyResponse call() throws Exception { + final CreateSchedulingPolicyResponse response = + client.createSchedulingPolicy(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -4763,9 +4977,9 @@ public DeleteDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeleteDatabaseSoftwareImageRequest, DeleteDatabaseSoftwareImageResponse> - forDeleteDatabaseSoftwareImage(DeleteDatabaseSoftwareImageRequest request) { - return forDeleteDatabaseSoftwareImage( + CreateSchedulingWindowRequest, CreateSchedulingWindowResponse> + forCreateSchedulingWindow(CreateSchedulingWindowRequest request) { + return forCreateSchedulingWindow( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -4780,9 +4994,9 @@ public DeleteDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeleteDatabaseSoftwareImageRequest, DeleteDatabaseSoftwareImageResponse> - forDeleteDatabaseSoftwareImage( - DeleteDatabaseSoftwareImageRequest request, + CreateSchedulingWindowRequest, CreateSchedulingWindowResponse> + forCreateSchedulingWindow( + CreateSchedulingWindowRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -4792,11 +5006,11 @@ public DeleteDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteDatabaseSoftwareImageResponse call() throws Exception { - final DeleteDatabaseSoftwareImageResponse response = - client.deleteDatabaseSoftwareImage(request); + public CreateSchedulingWindowResponse call() throws Exception { + final CreateSchedulingWindowResponse response = + client.createSchedulingWindow(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -4825,9 +5039,9 @@ public DeleteDatabaseSoftwareImageResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDeleteDbHome( - DeleteDbHomeRequest request) { - return forDeleteDbHome( + public com.oracle.bmc.waiter.Waiter + forCreateVmCluster(CreateVmClusterRequest request) { + return forCreateVmCluster( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -4841,10 +5055,11 @@ public com.oracle.bmc.waiter.Waiter f * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDeleteDbHome( - DeleteDbHomeRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter + forCreateVmCluster( + CreateVmClusterRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { throw new IllegalStateException( "A WorkRequestClient must be supplied to this waiter for this operation"); @@ -4852,10 +5067,10 @@ public com.oracle.bmc.waiter.Waiter f return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteDbHomeResponse call() throws Exception { - final DeleteDbHomeResponse response = client.deleteDbHome(request); + public CreateVmClusterResponse call() throws Exception { + final CreateVmClusterResponse response = client.createVmCluster(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -4885,9 +5100,9 @@ public DeleteDbHomeResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeleteExadataInfrastructureRequest, DeleteExadataInfrastructureResponse> - forDeleteExadataInfrastructure(DeleteExadataInfrastructureRequest request) { - return forDeleteExadataInfrastructure( + CreateVmClusterNetworkRequest, CreateVmClusterNetworkResponse> + forCreateVmClusterNetwork(CreateVmClusterNetworkRequest request) { + return forCreateVmClusterNetwork( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -4902,9 +5117,9 @@ public DeleteDbHomeResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeleteExadataInfrastructureRequest, DeleteExadataInfrastructureResponse> - forDeleteExadataInfrastructure( - DeleteExadataInfrastructureRequest request, + CreateVmClusterNetworkRequest, CreateVmClusterNetworkResponse> + forCreateVmClusterNetwork( + CreateVmClusterNetworkRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -4914,11 +5129,11 @@ public DeleteDbHomeResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteExadataInfrastructureResponse call() throws Exception { - final DeleteExadataInfrastructureResponse response = - client.deleteExadataInfrastructure(request); + public CreateVmClusterNetworkResponse call() throws Exception { + final CreateVmClusterNetworkResponse response = + client.createVmClusterNetwork(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -4947,10 +5162,9 @@ public DeleteExadataInfrastructureResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DeleteExternalContainerDatabaseRequest, DeleteExternalContainerDatabaseResponse> - forDeleteExternalContainerDatabase(DeleteExternalContainerDatabaseRequest request) { - return forDeleteExternalContainerDatabase( + public com.oracle.bmc.waiter.Waiter forDbNodeAction( + DbNodeActionRequest request) { + return forDbNodeAction( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -4964,12 +5178,10 @@ public DeleteExadataInfrastructureResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DeleteExternalContainerDatabaseRequest, DeleteExternalContainerDatabaseResponse> - forDeleteExternalContainerDatabase( - DeleteExternalContainerDatabaseRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter forDbNodeAction( + DbNodeActionRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { throw new IllegalStateException( "A WorkRequestClient must be supplied to this waiter for this operation"); @@ -4977,11 +5189,10 @@ public DeleteExadataInfrastructureResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteExternalContainerDatabaseResponse call() throws Exception { - final DeleteExternalContainerDatabaseResponse response = - client.deleteExternalContainerDatabase(request); + public DbNodeActionResponse call() throws Exception { + final DbNodeActionResponse response = client.dbNodeAction(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -5010,10 +5221,9 @@ public DeleteExternalContainerDatabaseResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DeleteExternalDatabaseConnectorRequest, DeleteExternalDatabaseConnectorResponse> - forDeleteExternalDatabaseConnector(DeleteExternalDatabaseConnectorRequest request) { - return forDeleteExternalDatabaseConnector( + public com.oracle.bmc.waiter.Waiter + forDeleteApplicationVip(DeleteApplicationVipRequest request) { + return forDeleteApplicationVip( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -5027,10 +5237,9 @@ public DeleteExternalContainerDatabaseResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DeleteExternalDatabaseConnectorRequest, DeleteExternalDatabaseConnectorResponse> - forDeleteExternalDatabaseConnector( - DeleteExternalDatabaseConnectorRequest request, + public com.oracle.bmc.waiter.Waiter + forDeleteApplicationVip( + DeleteApplicationVipRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -5040,11 +5249,11 @@ public DeleteExternalContainerDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteExternalDatabaseConnectorResponse call() throws Exception { - final DeleteExternalDatabaseConnectorResponse response = - client.deleteExternalDatabaseConnector(request); + public DeleteApplicationVipResponse call() throws Exception { + final DeleteApplicationVipResponse response = + client.deleteApplicationVip(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -5074,11 +5283,9 @@ public DeleteExternalDatabaseConnectorResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeleteExternalNonContainerDatabaseRequest, - DeleteExternalNonContainerDatabaseResponse> - forDeleteExternalNonContainerDatabase( - DeleteExternalNonContainerDatabaseRequest request) { - return forDeleteExternalNonContainerDatabase( + DeleteAutonomousDatabaseRequest, DeleteAutonomousDatabaseResponse> + forDeleteAutonomousDatabase(DeleteAutonomousDatabaseRequest request) { + return forDeleteAutonomousDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -5093,10 +5300,9 @@ public DeleteExternalDatabaseConnectorResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeleteExternalNonContainerDatabaseRequest, - DeleteExternalNonContainerDatabaseResponse> - forDeleteExternalNonContainerDatabase( - DeleteExternalNonContainerDatabaseRequest request, + DeleteAutonomousDatabaseRequest, DeleteAutonomousDatabaseResponse> + forDeleteAutonomousDatabase( + DeleteAutonomousDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -5106,11 +5312,11 @@ public DeleteExternalDatabaseConnectorResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteExternalNonContainerDatabaseResponse call() throws Exception { - final DeleteExternalNonContainerDatabaseResponse response = - client.deleteExternalNonContainerDatabase(request); + public DeleteAutonomousDatabaseResponse call() throws Exception { + final DeleteAutonomousDatabaseResponse response = + client.deleteAutonomousDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -5140,9 +5346,9 @@ public DeleteExternalNonContainerDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeleteExternalPluggableDatabaseRequest, DeleteExternalPluggableDatabaseResponse> - forDeleteExternalPluggableDatabase(DeleteExternalPluggableDatabaseRequest request) { - return forDeleteExternalPluggableDatabase( + DeleteAutonomousDatabaseBackupRequest, DeleteAutonomousDatabaseBackupResponse> + forDeleteAutonomousDatabaseBackup(DeleteAutonomousDatabaseBackupRequest request) { + return forDeleteAutonomousDatabaseBackup( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -5157,9 +5363,9 @@ public DeleteExternalNonContainerDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeleteExternalPluggableDatabaseRequest, DeleteExternalPluggableDatabaseResponse> - forDeleteExternalPluggableDatabase( - DeleteExternalPluggableDatabaseRequest request, + DeleteAutonomousDatabaseBackupRequest, DeleteAutonomousDatabaseBackupResponse> + forDeleteAutonomousDatabaseBackup( + DeleteAutonomousDatabaseBackupRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -5169,11 +5375,11 @@ public DeleteExternalNonContainerDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteExternalPluggableDatabaseResponse call() throws Exception { - final DeleteExternalPluggableDatabaseResponse response = - client.deleteExternalPluggableDatabase(request); + public DeleteAutonomousDatabaseBackupResponse call() throws Exception { + final DeleteAutonomousDatabaseBackupResponse response = + client.deleteAutonomousDatabaseBackup(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -5202,9 +5408,12 @@ public DeleteExternalPluggableDatabaseResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forDeleteOneoffPatch(DeleteOneoffPatchRequest request) { - return forDeleteOneoffPatch( + public com.oracle.bmc.waiter.Waiter< + DeleteAutonomousDatabaseSoftwareImageRequest, + DeleteAutonomousDatabaseSoftwareImageResponse> + forDeleteAutonomousDatabaseSoftwareImage( + DeleteAutonomousDatabaseSoftwareImageRequest request) { + return forDeleteAutonomousDatabaseSoftwareImage( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -5218,9 +5427,11 @@ public DeleteExternalPluggableDatabaseResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forDeleteOneoffPatch( - DeleteOneoffPatchRequest request, + public com.oracle.bmc.waiter.Waiter< + DeleteAutonomousDatabaseSoftwareImageRequest, + DeleteAutonomousDatabaseSoftwareImageResponse> + forDeleteAutonomousDatabaseSoftwareImage( + DeleteAutonomousDatabaseSoftwareImageRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -5230,11 +5441,11 @@ public DeleteExternalPluggableDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteOneoffPatchResponse call() throws Exception { - final DeleteOneoffPatchResponse response = - client.deleteOneoffPatch(request); + public DeleteAutonomousDatabaseSoftwareImageResponse call() throws Exception { + final DeleteAutonomousDatabaseSoftwareImageResponse response = + client.deleteAutonomousDatabaseSoftwareImage(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -5264,9 +5475,9 @@ public DeleteOneoffPatchResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeletePluggableDatabaseRequest, DeletePluggableDatabaseResponse> - forDeletePluggableDatabase(DeletePluggableDatabaseRequest request) { - return forDeletePluggableDatabase( + DeleteAutonomousVmClusterRequest, DeleteAutonomousVmClusterResponse> + forDeleteAutonomousVmCluster(DeleteAutonomousVmClusterRequest request) { + return forDeleteAutonomousVmCluster( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -5281,9 +5492,9 @@ public DeleteOneoffPatchResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeletePluggableDatabaseRequest, DeletePluggableDatabaseResponse> - forDeletePluggableDatabase( - DeletePluggableDatabaseRequest request, + DeleteAutonomousVmClusterRequest, DeleteAutonomousVmClusterResponse> + forDeleteAutonomousVmCluster( + DeleteAutonomousVmClusterRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -5293,11 +5504,11 @@ public DeleteOneoffPatchResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeletePluggableDatabaseResponse call() throws Exception { - final DeletePluggableDatabaseResponse response = - client.deletePluggableDatabase(request); + public DeleteAutonomousVmClusterResponse call() throws Exception { + final DeleteAutonomousVmClusterResponse response = + client.deleteAutonomousVmCluster(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -5326,9 +5537,9 @@ public DeletePluggableDatabaseResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forDeleteVmCluster(DeleteVmClusterRequest request) { - return forDeleteVmCluster( + public com.oracle.bmc.waiter.Waiter forDeleteBackup( + DeleteBackupRequest request) { + return forDeleteBackup( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -5342,11 +5553,10 @@ public DeletePluggableDatabaseResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forDeleteVmCluster( - DeleteVmClusterRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter forDeleteBackup( + DeleteBackupRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { throw new IllegalStateException( "A WorkRequestClient must be supplied to this waiter for this operation"); @@ -5354,10 +5564,10 @@ public DeletePluggableDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteVmClusterResponse call() throws Exception { - final DeleteVmClusterResponse response = client.deleteVmCluster(request); + public DeleteBackupResponse call() throws Exception { + final DeleteBackupResponse response = client.deleteBackup(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -5387,9 +5597,9 @@ public DeleteVmClusterResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeleteVmClusterNetworkRequest, DeleteVmClusterNetworkResponse> - forDeleteVmClusterNetwork(DeleteVmClusterNetworkRequest request) { - return forDeleteVmClusterNetwork( + DeleteCloudAutonomousVmClusterRequest, DeleteCloudAutonomousVmClusterResponse> + forDeleteCloudAutonomousVmCluster(DeleteCloudAutonomousVmClusterRequest request) { + return forDeleteCloudAutonomousVmCluster( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -5404,9 +5614,9 @@ public DeleteVmClusterResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeleteVmClusterNetworkRequest, DeleteVmClusterNetworkResponse> - forDeleteVmClusterNetwork( - DeleteVmClusterNetworkRequest request, + DeleteCloudAutonomousVmClusterRequest, DeleteCloudAutonomousVmClusterResponse> + forDeleteCloudAutonomousVmCluster( + DeleteCloudAutonomousVmClusterRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -5416,11 +5626,11 @@ public DeleteVmClusterResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeleteVmClusterNetworkResponse call() throws Exception { - final DeleteVmClusterNetworkResponse response = - client.deleteVmClusterNetwork(request); + public DeleteCloudAutonomousVmClusterResponse call() throws Exception { + final DeleteCloudAutonomousVmClusterResponse response = + client.deleteCloudAutonomousVmCluster(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -5450,11 +5660,10 @@ public DeleteVmClusterNetworkResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeregisterAutonomousDatabaseDataSafeRequest, - DeregisterAutonomousDatabaseDataSafeResponse> - forDeregisterAutonomousDatabaseDataSafe( - DeregisterAutonomousDatabaseDataSafeRequest request) { - return forDeregisterAutonomousDatabaseDataSafe( + DeleteCloudExadataInfrastructureRequest, + DeleteCloudExadataInfrastructureResponse> + forDeleteCloudExadataInfrastructure(DeleteCloudExadataInfrastructureRequest request) { + return forDeleteCloudExadataInfrastructure( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -5469,10 +5678,10 @@ public DeleteVmClusterNetworkResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DeregisterAutonomousDatabaseDataSafeRequest, - DeregisterAutonomousDatabaseDataSafeResponse> - forDeregisterAutonomousDatabaseDataSafe( - DeregisterAutonomousDatabaseDataSafeRequest request, + DeleteCloudExadataInfrastructureRequest, + DeleteCloudExadataInfrastructureResponse> + forDeleteCloudExadataInfrastructure( + DeleteCloudExadataInfrastructureRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -5482,11 +5691,11 @@ public DeleteVmClusterNetworkResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DeregisterAutonomousDatabaseDataSafeResponse call() throws Exception { - final DeregisterAutonomousDatabaseDataSafeResponse response = - client.deregisterAutonomousDatabaseDataSafe(request); + public DeleteCloudExadataInfrastructureResponse call() throws Exception { + final DeleteCloudExadataInfrastructureResponse response = + client.deleteCloudExadataInfrastructure(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -5515,12 +5724,9 @@ public DeregisterAutonomousDatabaseDataSafeResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DisableAutonomousDatabaseManagementRequest, - DisableAutonomousDatabaseManagementResponse> - forDisableAutonomousDatabaseManagement( - DisableAutonomousDatabaseManagementRequest request) { - return forDisableAutonomousDatabaseManagement( + public com.oracle.bmc.waiter.Waiter + forDeleteCloudVmCluster(DeleteCloudVmClusterRequest request) { + return forDeleteCloudVmCluster( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -5534,11 +5740,9 @@ public DeregisterAutonomousDatabaseDataSafeResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DisableAutonomousDatabaseManagementRequest, - DisableAutonomousDatabaseManagementResponse> - forDisableAutonomousDatabaseManagement( - DisableAutonomousDatabaseManagementRequest request, + public com.oracle.bmc.waiter.Waiter + forDeleteCloudVmCluster( + DeleteCloudVmClusterRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -5548,11 +5752,11 @@ public DeregisterAutonomousDatabaseDataSafeResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DisableAutonomousDatabaseManagementResponse call() throws Exception { - final DisableAutonomousDatabaseManagementResponse response = - client.disableAutonomousDatabaseManagement(request); + public DeleteCloudVmClusterResponse call() throws Exception { + final DeleteCloudVmClusterResponse response = + client.deleteCloudVmCluster(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -5582,11 +5786,9 @@ public DisableAutonomousDatabaseManagementResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DisableAutonomousDatabaseOperationsInsightsRequest, - DisableAutonomousDatabaseOperationsInsightsResponse> - forDisableAutonomousDatabaseOperationsInsights( - DisableAutonomousDatabaseOperationsInsightsRequest request) { - return forDisableAutonomousDatabaseOperationsInsights( + DeleteConsoleConnectionRequest, DeleteConsoleConnectionResponse> + forDeleteConsoleConnection(DeleteConsoleConnectionRequest request) { + return forDeleteConsoleConnection( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -5601,10 +5803,9 @@ public DisableAutonomousDatabaseManagementResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DisableAutonomousDatabaseOperationsInsightsRequest, - DisableAutonomousDatabaseOperationsInsightsResponse> - forDisableAutonomousDatabaseOperationsInsights( - DisableAutonomousDatabaseOperationsInsightsRequest request, + DeleteConsoleConnectionRequest, DeleteConsoleConnectionResponse> + forDeleteConsoleConnection( + DeleteConsoleConnectionRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -5614,13 +5815,11 @@ public DisableAutonomousDatabaseManagementResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - DisableAutonomousDatabaseOperationsInsightsResponse>() { + new java.util.concurrent.Callable() { @Override - public DisableAutonomousDatabaseOperationsInsightsResponse call() - throws Exception { - final DisableAutonomousDatabaseOperationsInsightsResponse response = - client.disableAutonomousDatabaseOperationsInsights(request); + public DeleteConsoleConnectionResponse call() throws Exception { + final DeleteConsoleConnectionResponse response = + client.deleteConsoleConnection(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -5649,10 +5848,9 @@ public DisableAutonomousDatabaseOperationsInsightsResponse call() * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DisableDatabaseManagementRequest, DisableDatabaseManagementResponse> - forDisableDatabaseManagement(DisableDatabaseManagementRequest request) { - return forDisableDatabaseManagement( + public com.oracle.bmc.waiter.Waiter + forDeleteConsoleHistory(DeleteConsoleHistoryRequest request) { + return forDeleteConsoleHistory( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -5666,10 +5864,9 @@ public DisableAutonomousDatabaseOperationsInsightsResponse call() * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DisableDatabaseManagementRequest, DisableDatabaseManagementResponse> - forDisableDatabaseManagement( - DisableDatabaseManagementRequest request, + public com.oracle.bmc.waiter.Waiter + forDeleteConsoleHistory( + DeleteConsoleHistoryRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -5679,11 +5876,11 @@ public DisableAutonomousDatabaseOperationsInsightsResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DisableDatabaseManagementResponse call() throws Exception { - final DisableDatabaseManagementResponse response = - client.disableDatabaseManagement(request); + public DeleteConsoleHistoryResponse call() throws Exception { + final DeleteConsoleHistoryResponse response = + client.deleteConsoleHistory(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -5712,12 +5909,9 @@ public DisableDatabaseManagementResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DisableExternalContainerDatabaseDatabaseManagementRequest, - DisableExternalContainerDatabaseDatabaseManagementResponse> - forDisableExternalContainerDatabaseDatabaseManagement( - DisableExternalContainerDatabaseDatabaseManagementRequest request) { - return forDisableExternalContainerDatabaseDatabaseManagement( + public com.oracle.bmc.waiter.Waiter + forDeleteDatabase(DeleteDatabaseRequest request) { + return forDeleteDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -5731,11 +5925,9 @@ public DisableDatabaseManagementResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DisableExternalContainerDatabaseDatabaseManagementRequest, - DisableExternalContainerDatabaseDatabaseManagementResponse> - forDisableExternalContainerDatabaseDatabaseManagement( - DisableExternalContainerDatabaseDatabaseManagementRequest request, + public com.oracle.bmc.waiter.Waiter + forDeleteDatabase( + DeleteDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -5745,13 +5937,10 @@ public DisableDatabaseManagementResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - DisableExternalContainerDatabaseDatabaseManagementResponse>() { + new java.util.concurrent.Callable() { @Override - public DisableExternalContainerDatabaseDatabaseManagementResponse call() - throws Exception { - final DisableExternalContainerDatabaseDatabaseManagementResponse response = - client.disableExternalContainerDatabaseDatabaseManagement(request); + public DeleteDatabaseResponse call() throws Exception { + final DeleteDatabaseResponse response = client.deleteDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -5781,11 +5970,9 @@ public DisableExternalContainerDatabaseDatabaseManagementResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DisableExternalContainerDatabaseStackMonitoringRequest, - DisableExternalContainerDatabaseStackMonitoringResponse> - forDisableExternalContainerDatabaseStackMonitoring( - DisableExternalContainerDatabaseStackMonitoringRequest request) { - return forDisableExternalContainerDatabaseStackMonitoring( + DeleteDatabaseSoftwareImageRequest, DeleteDatabaseSoftwareImageResponse> + forDeleteDatabaseSoftwareImage(DeleteDatabaseSoftwareImageRequest request) { + return forDeleteDatabaseSoftwareImage( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -5800,10 +5987,9 @@ public DisableExternalContainerDatabaseDatabaseManagementResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DisableExternalContainerDatabaseStackMonitoringRequest, - DisableExternalContainerDatabaseStackMonitoringResponse> - forDisableExternalContainerDatabaseStackMonitoring( - DisableExternalContainerDatabaseStackMonitoringRequest request, + DeleteDatabaseSoftwareImageRequest, DeleteDatabaseSoftwareImageResponse> + forDeleteDatabaseSoftwareImage( + DeleteDatabaseSoftwareImageRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -5813,13 +5999,11 @@ public DisableExternalContainerDatabaseDatabaseManagementResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - DisableExternalContainerDatabaseStackMonitoringResponse>() { + new java.util.concurrent.Callable() { @Override - public DisableExternalContainerDatabaseStackMonitoringResponse call() - throws Exception { - final DisableExternalContainerDatabaseStackMonitoringResponse response = - client.disableExternalContainerDatabaseStackMonitoring(request); + public DeleteDatabaseSoftwareImageResponse call() throws Exception { + final DeleteDatabaseSoftwareImageResponse response = + client.deleteDatabaseSoftwareImage(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -5848,12 +6032,9 @@ public DisableExternalContainerDatabaseStackMonitoringResponse call() * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DisableExternalNonContainerDatabaseDatabaseManagementRequest, - DisableExternalNonContainerDatabaseDatabaseManagementResponse> - forDisableExternalNonContainerDatabaseDatabaseManagement( - DisableExternalNonContainerDatabaseDatabaseManagementRequest request) { - return forDisableExternalNonContainerDatabaseDatabaseManagement( + public com.oracle.bmc.waiter.Waiter forDeleteDbHome( + DeleteDbHomeRequest request) { + return forDeleteDbHome( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -5867,13 +6048,10 @@ public DisableExternalContainerDatabaseStackMonitoringResponse call() * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DisableExternalNonContainerDatabaseDatabaseManagementRequest, - DisableExternalNonContainerDatabaseDatabaseManagementResponse> - forDisableExternalNonContainerDatabaseDatabaseManagement( - DisableExternalNonContainerDatabaseDatabaseManagementRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter forDeleteDbHome( + DeleteDbHomeRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { throw new IllegalStateException( "A WorkRequestClient must be supplied to this waiter for this operation"); @@ -5881,16 +6059,10 @@ public DisableExternalContainerDatabaseStackMonitoringResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - DisableExternalNonContainerDatabaseDatabaseManagementResponse>() { + new java.util.concurrent.Callable() { @Override - public DisableExternalNonContainerDatabaseDatabaseManagementResponse call() - throws Exception { - final DisableExternalNonContainerDatabaseDatabaseManagementResponse - response = - client - .disableExternalNonContainerDatabaseDatabaseManagement( - request); + public DeleteDbHomeResponse call() throws Exception { + final DeleteDbHomeResponse response = client.deleteDbHome(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -5920,11 +6092,9 @@ public DisableExternalNonContainerDatabaseDatabaseManagementResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DisableExternalNonContainerDatabaseOperationsInsightsRequest, - DisableExternalNonContainerDatabaseOperationsInsightsResponse> - forDisableExternalNonContainerDatabaseOperationsInsights( - DisableExternalNonContainerDatabaseOperationsInsightsRequest request) { - return forDisableExternalNonContainerDatabaseOperationsInsights( + DeleteExadataInfrastructureRequest, DeleteExadataInfrastructureResponse> + forDeleteExadataInfrastructure(DeleteExadataInfrastructureRequest request) { + return forDeleteExadataInfrastructure( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -5939,10 +6109,9 @@ public DisableExternalNonContainerDatabaseDatabaseManagementResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DisableExternalNonContainerDatabaseOperationsInsightsRequest, - DisableExternalNonContainerDatabaseOperationsInsightsResponse> - forDisableExternalNonContainerDatabaseOperationsInsights( - DisableExternalNonContainerDatabaseOperationsInsightsRequest request, + DeleteExadataInfrastructureRequest, DeleteExadataInfrastructureResponse> + forDeleteExadataInfrastructure( + DeleteExadataInfrastructureRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -5952,16 +6121,11 @@ public DisableExternalNonContainerDatabaseDatabaseManagementResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - DisableExternalNonContainerDatabaseOperationsInsightsResponse>() { + new java.util.concurrent.Callable() { @Override - public DisableExternalNonContainerDatabaseOperationsInsightsResponse call() - throws Exception { - final DisableExternalNonContainerDatabaseOperationsInsightsResponse - response = - client - .disableExternalNonContainerDatabaseOperationsInsights( - request); + public DeleteExadataInfrastructureResponse call() throws Exception { + final DeleteExadataInfrastructureResponse response = + client.deleteExadataInfrastructure(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -5990,12 +6154,9 @@ public DisableExternalNonContainerDatabaseOperationsInsightsResponse call() * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DisableExternalNonContainerDatabaseStackMonitoringRequest, - DisableExternalNonContainerDatabaseStackMonitoringResponse> - forDisableExternalNonContainerDatabaseStackMonitoring( - DisableExternalNonContainerDatabaseStackMonitoringRequest request) { - return forDisableExternalNonContainerDatabaseStackMonitoring( + public com.oracle.bmc.waiter.Waiter + forDeleteExadbVmCluster(DeleteExadbVmClusterRequest request) { + return forDeleteExadbVmCluster( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -6009,11 +6170,9 @@ public DisableExternalNonContainerDatabaseOperationsInsightsResponse call() * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DisableExternalNonContainerDatabaseStackMonitoringRequest, - DisableExternalNonContainerDatabaseStackMonitoringResponse> - forDisableExternalNonContainerDatabaseStackMonitoring( - DisableExternalNonContainerDatabaseStackMonitoringRequest request, + public com.oracle.bmc.waiter.Waiter + forDeleteExadbVmCluster( + DeleteExadbVmClusterRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -6023,13 +6182,11 @@ public DisableExternalNonContainerDatabaseOperationsInsightsResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - DisableExternalNonContainerDatabaseStackMonitoringResponse>() { + new java.util.concurrent.Callable() { @Override - public DisableExternalNonContainerDatabaseStackMonitoringResponse call() - throws Exception { - final DisableExternalNonContainerDatabaseStackMonitoringResponse response = - client.disableExternalNonContainerDatabaseStackMonitoring(request); + public DeleteExadbVmClusterResponse call() throws Exception { + final DeleteExadbVmClusterResponse response = + client.deleteExadbVmCluster(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -6059,11 +6216,9 @@ public DisableExternalNonContainerDatabaseStackMonitoringResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DisableExternalPluggableDatabaseDatabaseManagementRequest, - DisableExternalPluggableDatabaseDatabaseManagementResponse> - forDisableExternalPluggableDatabaseDatabaseManagement( - DisableExternalPluggableDatabaseDatabaseManagementRequest request) { - return forDisableExternalPluggableDatabaseDatabaseManagement( + DeleteExascaleDbStorageVaultRequest, DeleteExascaleDbStorageVaultResponse> + forDeleteExascaleDbStorageVault(DeleteExascaleDbStorageVaultRequest request) { + return forDeleteExascaleDbStorageVault( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -6078,10 +6233,9 @@ public DisableExternalNonContainerDatabaseStackMonitoringResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DisableExternalPluggableDatabaseDatabaseManagementRequest, - DisableExternalPluggableDatabaseDatabaseManagementResponse> - forDisableExternalPluggableDatabaseDatabaseManagement( - DisableExternalPluggableDatabaseDatabaseManagementRequest request, + DeleteExascaleDbStorageVaultRequest, DeleteExascaleDbStorageVaultResponse> + forDeleteExascaleDbStorageVault( + DeleteExascaleDbStorageVaultRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -6091,13 +6245,11 @@ public DisableExternalNonContainerDatabaseStackMonitoringResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - DisableExternalPluggableDatabaseDatabaseManagementResponse>() { + new java.util.concurrent.Callable() { @Override - public DisableExternalPluggableDatabaseDatabaseManagementResponse call() - throws Exception { - final DisableExternalPluggableDatabaseDatabaseManagementResponse response = - client.disableExternalPluggableDatabaseDatabaseManagement(request); + public DeleteExascaleDbStorageVaultResponse call() throws Exception { + final DeleteExascaleDbStorageVaultResponse response = + client.deleteExascaleDbStorageVault(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -6126,12 +6278,9 @@ public DisableExternalPluggableDatabaseDatabaseManagementResponse call() * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DisableExternalPluggableDatabaseOperationsInsightsRequest, - DisableExternalPluggableDatabaseOperationsInsightsResponse> - forDisableExternalPluggableDatabaseOperationsInsights( - DisableExternalPluggableDatabaseOperationsInsightsRequest request) { - return forDisableExternalPluggableDatabaseOperationsInsights( + public com.oracle.bmc.waiter.Waiter + forDeleteExecutionAction(DeleteExecutionActionRequest request) { + return forDeleteExecutionAction( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -6145,11 +6294,9 @@ public DisableExternalPluggableDatabaseDatabaseManagementResponse call() * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - DisableExternalPluggableDatabaseOperationsInsightsRequest, - DisableExternalPluggableDatabaseOperationsInsightsResponse> - forDisableExternalPluggableDatabaseOperationsInsights( - DisableExternalPluggableDatabaseOperationsInsightsRequest request, + public com.oracle.bmc.waiter.Waiter + forDeleteExecutionAction( + DeleteExecutionActionRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -6159,13 +6306,11 @@ public DisableExternalPluggableDatabaseDatabaseManagementResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - DisableExternalPluggableDatabaseOperationsInsightsResponse>() { + new java.util.concurrent.Callable() { @Override - public DisableExternalPluggableDatabaseOperationsInsightsResponse call() - throws Exception { - final DisableExternalPluggableDatabaseOperationsInsightsResponse response = - client.disableExternalPluggableDatabaseOperationsInsights(request); + public DeleteExecutionActionResponse call() throws Exception { + final DeleteExecutionActionResponse response = + client.deleteExecutionAction(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -6195,11 +6340,9 @@ public DisableExternalPluggableDatabaseOperationsInsightsResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DisableExternalPluggableDatabaseStackMonitoringRequest, - DisableExternalPluggableDatabaseStackMonitoringResponse> - forDisableExternalPluggableDatabaseStackMonitoring( - DisableExternalPluggableDatabaseStackMonitoringRequest request) { - return forDisableExternalPluggableDatabaseStackMonitoring( + DeleteExternalContainerDatabaseRequest, DeleteExternalContainerDatabaseResponse> + forDeleteExternalContainerDatabase(DeleteExternalContainerDatabaseRequest request) { + return forDeleteExternalContainerDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -6214,10 +6357,9 @@ public DisableExternalPluggableDatabaseOperationsInsightsResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DisableExternalPluggableDatabaseStackMonitoringRequest, - DisableExternalPluggableDatabaseStackMonitoringResponse> - forDisableExternalPluggableDatabaseStackMonitoring( - DisableExternalPluggableDatabaseStackMonitoringRequest request, + DeleteExternalContainerDatabaseRequest, DeleteExternalContainerDatabaseResponse> + forDeleteExternalContainerDatabase( + DeleteExternalContainerDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -6227,13 +6369,11 @@ public DisableExternalPluggableDatabaseOperationsInsightsResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - DisableExternalPluggableDatabaseStackMonitoringResponse>() { + new java.util.concurrent.Callable() { @Override - public DisableExternalPluggableDatabaseStackMonitoringResponse call() - throws Exception { - final DisableExternalPluggableDatabaseStackMonitoringResponse response = - client.disableExternalPluggableDatabaseStackMonitoring(request); + public DeleteExternalContainerDatabaseResponse call() throws Exception { + final DeleteExternalContainerDatabaseResponse response = + client.deleteExternalContainerDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -6263,11 +6403,9 @@ public DisableExternalPluggableDatabaseStackMonitoringResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DisablePluggableDatabaseManagementRequest, - DisablePluggableDatabaseManagementResponse> - forDisablePluggableDatabaseManagement( - DisablePluggableDatabaseManagementRequest request) { - return forDisablePluggableDatabaseManagement( + DeleteExternalDatabaseConnectorRequest, DeleteExternalDatabaseConnectorResponse> + forDeleteExternalDatabaseConnector(DeleteExternalDatabaseConnectorRequest request) { + return forDeleteExternalDatabaseConnector( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -6282,10 +6420,9 @@ public DisableExternalPluggableDatabaseStackMonitoringResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - DisablePluggableDatabaseManagementRequest, - DisablePluggableDatabaseManagementResponse> - forDisablePluggableDatabaseManagement( - DisablePluggableDatabaseManagementRequest request, + DeleteExternalDatabaseConnectorRequest, DeleteExternalDatabaseConnectorResponse> + forDeleteExternalDatabaseConnector( + DeleteExternalDatabaseConnectorRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -6295,11 +6432,11 @@ public DisableExternalPluggableDatabaseStackMonitoringResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public DisablePluggableDatabaseManagementResponse call() throws Exception { - final DisablePluggableDatabaseManagementResponse response = - client.disablePluggableDatabaseManagement(request); + public DeleteExternalDatabaseConnectorResponse call() throws Exception { + final DeleteExternalDatabaseConnectorResponse response = + client.deleteExternalDatabaseConnector(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -6329,11 +6466,11 @@ public DisablePluggableDatabaseManagementResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - EnableAutonomousDatabaseManagementRequest, - EnableAutonomousDatabaseManagementResponse> - forEnableAutonomousDatabaseManagement( - EnableAutonomousDatabaseManagementRequest request) { - return forEnableAutonomousDatabaseManagement( + DeleteExternalNonContainerDatabaseRequest, + DeleteExternalNonContainerDatabaseResponse> + forDeleteExternalNonContainerDatabase( + DeleteExternalNonContainerDatabaseRequest request) { + return forDeleteExternalNonContainerDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -6348,10 +6485,10 @@ public DisablePluggableDatabaseManagementResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - EnableAutonomousDatabaseManagementRequest, - EnableAutonomousDatabaseManagementResponse> - forEnableAutonomousDatabaseManagement( - EnableAutonomousDatabaseManagementRequest request, + DeleteExternalNonContainerDatabaseRequest, + DeleteExternalNonContainerDatabaseResponse> + forDeleteExternalNonContainerDatabase( + DeleteExternalNonContainerDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -6361,11 +6498,11 @@ public DisablePluggableDatabaseManagementResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public EnableAutonomousDatabaseManagementResponse call() throws Exception { - final EnableAutonomousDatabaseManagementResponse response = - client.enableAutonomousDatabaseManagement(request); + public DeleteExternalNonContainerDatabaseResponse call() throws Exception { + final DeleteExternalNonContainerDatabaseResponse response = + client.deleteExternalNonContainerDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -6395,11 +6532,9 @@ public EnableAutonomousDatabaseManagementResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - EnableAutonomousDatabaseOperationsInsightsRequest, - EnableAutonomousDatabaseOperationsInsightsResponse> - forEnableAutonomousDatabaseOperationsInsights( - EnableAutonomousDatabaseOperationsInsightsRequest request) { - return forEnableAutonomousDatabaseOperationsInsights( + DeleteExternalPluggableDatabaseRequest, DeleteExternalPluggableDatabaseResponse> + forDeleteExternalPluggableDatabase(DeleteExternalPluggableDatabaseRequest request) { + return forDeleteExternalPluggableDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -6414,10 +6549,9 @@ public EnableAutonomousDatabaseManagementResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - EnableAutonomousDatabaseOperationsInsightsRequest, - EnableAutonomousDatabaseOperationsInsightsResponse> - forEnableAutonomousDatabaseOperationsInsights( - EnableAutonomousDatabaseOperationsInsightsRequest request, + DeleteExternalPluggableDatabaseRequest, DeleteExternalPluggableDatabaseResponse> + forDeleteExternalPluggableDatabase( + DeleteExternalPluggableDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -6427,13 +6561,11 @@ public EnableAutonomousDatabaseManagementResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - EnableAutonomousDatabaseOperationsInsightsResponse>() { + new java.util.concurrent.Callable() { @Override - public EnableAutonomousDatabaseOperationsInsightsResponse call() - throws Exception { - final EnableAutonomousDatabaseOperationsInsightsResponse response = - client.enableAutonomousDatabaseOperationsInsights(request); + public DeleteExternalPluggableDatabaseResponse call() throws Exception { + final DeleteExternalPluggableDatabaseResponse response = + client.deleteExternalPluggableDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -6462,10 +6594,9 @@ public EnableAutonomousDatabaseOperationsInsightsResponse call() * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - EnableDatabaseManagementRequest, EnableDatabaseManagementResponse> - forEnableDatabaseManagement(EnableDatabaseManagementRequest request) { - return forEnableDatabaseManagement( + public com.oracle.bmc.waiter.Waiter + forDeleteOneoffPatch(DeleteOneoffPatchRequest request) { + return forDeleteOneoffPatch( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -6479,10 +6610,9 @@ public EnableAutonomousDatabaseOperationsInsightsResponse call() * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - EnableDatabaseManagementRequest, EnableDatabaseManagementResponse> - forEnableDatabaseManagement( - EnableDatabaseManagementRequest request, + public com.oracle.bmc.waiter.Waiter + forDeleteOneoffPatch( + DeleteOneoffPatchRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -6492,11 +6622,11 @@ public EnableAutonomousDatabaseOperationsInsightsResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public EnableDatabaseManagementResponse call() throws Exception { - final EnableDatabaseManagementResponse response = - client.enableDatabaseManagement(request); + public DeleteOneoffPatchResponse call() throws Exception { + final DeleteOneoffPatchResponse response = + client.deleteOneoffPatch(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -6526,11 +6656,9 @@ public EnableDatabaseManagementResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - EnableExternalContainerDatabaseDatabaseManagementRequest, - EnableExternalContainerDatabaseDatabaseManagementResponse> - forEnableExternalContainerDatabaseDatabaseManagement( - EnableExternalContainerDatabaseDatabaseManagementRequest request) { - return forEnableExternalContainerDatabaseDatabaseManagement( + DeletePluggableDatabaseRequest, DeletePluggableDatabaseResponse> + forDeletePluggableDatabase(DeletePluggableDatabaseRequest request) { + return forDeletePluggableDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -6545,10 +6673,9 @@ public EnableDatabaseManagementResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - EnableExternalContainerDatabaseDatabaseManagementRequest, - EnableExternalContainerDatabaseDatabaseManagementResponse> - forEnableExternalContainerDatabaseDatabaseManagement( - EnableExternalContainerDatabaseDatabaseManagementRequest request, + DeletePluggableDatabaseRequest, DeletePluggableDatabaseResponse> + forDeletePluggableDatabase( + DeletePluggableDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -6558,13 +6685,11 @@ public EnableDatabaseManagementResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - EnableExternalContainerDatabaseDatabaseManagementResponse>() { + new java.util.concurrent.Callable() { @Override - public EnableExternalContainerDatabaseDatabaseManagementResponse call() - throws Exception { - final EnableExternalContainerDatabaseDatabaseManagementResponse response = - client.enableExternalContainerDatabaseDatabaseManagement(request); + public DeletePluggableDatabaseResponse call() throws Exception { + final DeletePluggableDatabaseResponse response = + client.deletePluggableDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -6593,12 +6718,9 @@ public EnableExternalContainerDatabaseDatabaseManagementResponse call() * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - EnableExternalContainerDatabaseStackMonitoringRequest, - EnableExternalContainerDatabaseStackMonitoringResponse> - forEnableExternalContainerDatabaseStackMonitoring( - EnableExternalContainerDatabaseStackMonitoringRequest request) { - return forEnableExternalContainerDatabaseStackMonitoring( + public com.oracle.bmc.waiter.Waiter + forDeleteScheduledAction(DeleteScheduledActionRequest request) { + return forDeleteScheduledAction( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -6612,11 +6734,9 @@ public EnableExternalContainerDatabaseDatabaseManagementResponse call() * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - EnableExternalContainerDatabaseStackMonitoringRequest, - EnableExternalContainerDatabaseStackMonitoringResponse> - forEnableExternalContainerDatabaseStackMonitoring( - EnableExternalContainerDatabaseStackMonitoringRequest request, + public com.oracle.bmc.waiter.Waiter + forDeleteScheduledAction( + DeleteScheduledActionRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -6626,13 +6746,11 @@ public EnableExternalContainerDatabaseDatabaseManagementResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - EnableExternalContainerDatabaseStackMonitoringResponse>() { + new java.util.concurrent.Callable() { @Override - public EnableExternalContainerDatabaseStackMonitoringResponse call() - throws Exception { - final EnableExternalContainerDatabaseStackMonitoringResponse response = - client.enableExternalContainerDatabaseStackMonitoring(request); + public DeleteScheduledActionResponse call() throws Exception { + final DeleteScheduledActionResponse response = + client.deleteScheduledAction(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -6661,12 +6779,9 @@ public EnableExternalContainerDatabaseStackMonitoringResponse call() * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - EnableExternalNonContainerDatabaseDatabaseManagementRequest, - EnableExternalNonContainerDatabaseDatabaseManagementResponse> - forEnableExternalNonContainerDatabaseDatabaseManagement( - EnableExternalNonContainerDatabaseDatabaseManagementRequest request) { - return forEnableExternalNonContainerDatabaseDatabaseManagement( + public com.oracle.bmc.waiter.Waiter + forDeleteSchedulingPlan(DeleteSchedulingPlanRequest request) { + return forDeleteSchedulingPlan( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -6680,11 +6795,9 @@ public EnableExternalContainerDatabaseStackMonitoringResponse call() * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - EnableExternalNonContainerDatabaseDatabaseManagementRequest, - EnableExternalNonContainerDatabaseDatabaseManagementResponse> - forEnableExternalNonContainerDatabaseDatabaseManagement( - EnableExternalNonContainerDatabaseDatabaseManagementRequest request, + public com.oracle.bmc.waiter.Waiter + forDeleteSchedulingPlan( + DeleteSchedulingPlanRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -6694,15 +6807,11 @@ public EnableExternalContainerDatabaseStackMonitoringResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - EnableExternalNonContainerDatabaseDatabaseManagementResponse>() { + new java.util.concurrent.Callable() { @Override - public EnableExternalNonContainerDatabaseDatabaseManagementResponse call() - throws Exception { - final EnableExternalNonContainerDatabaseDatabaseManagementResponse - response = - client.enableExternalNonContainerDatabaseDatabaseManagement( - request); + public DeleteSchedulingPlanResponse call() throws Exception { + final DeleteSchedulingPlanResponse response = + client.deleteSchedulingPlan(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -6731,12 +6840,9 @@ public EnableExternalNonContainerDatabaseDatabaseManagementResponse call() * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - EnableExternalNonContainerDatabaseOperationsInsightsRequest, - EnableExternalNonContainerDatabaseOperationsInsightsResponse> - forEnableExternalNonContainerDatabaseOperationsInsights( - EnableExternalNonContainerDatabaseOperationsInsightsRequest request) { - return forEnableExternalNonContainerDatabaseOperationsInsights( + public com.oracle.bmc.waiter.Waiter + forDeleteVmCluster(DeleteVmClusterRequest request) { + return forDeleteVmCluster( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -6750,11 +6856,9 @@ public EnableExternalNonContainerDatabaseDatabaseManagementResponse call() * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - EnableExternalNonContainerDatabaseOperationsInsightsRequest, - EnableExternalNonContainerDatabaseOperationsInsightsResponse> - forEnableExternalNonContainerDatabaseOperationsInsights( - EnableExternalNonContainerDatabaseOperationsInsightsRequest request, + public com.oracle.bmc.waiter.Waiter + forDeleteVmCluster( + DeleteVmClusterRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -6764,15 +6868,10 @@ public EnableExternalNonContainerDatabaseDatabaseManagementResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - EnableExternalNonContainerDatabaseOperationsInsightsResponse>() { + new java.util.concurrent.Callable() { @Override - public EnableExternalNonContainerDatabaseOperationsInsightsResponse call() - throws Exception { - final EnableExternalNonContainerDatabaseOperationsInsightsResponse - response = - client.enableExternalNonContainerDatabaseOperationsInsights( - request); + public DeleteVmClusterResponse call() throws Exception { + final DeleteVmClusterResponse response = client.deleteVmCluster(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -6802,11 +6901,9 @@ public EnableExternalNonContainerDatabaseOperationsInsightsResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - EnableExternalNonContainerDatabaseStackMonitoringRequest, - EnableExternalNonContainerDatabaseStackMonitoringResponse> - forEnableExternalNonContainerDatabaseStackMonitoring( - EnableExternalNonContainerDatabaseStackMonitoringRequest request) { - return forEnableExternalNonContainerDatabaseStackMonitoring( + DeleteVmClusterNetworkRequest, DeleteVmClusterNetworkResponse> + forDeleteVmClusterNetwork(DeleteVmClusterNetworkRequest request) { + return forDeleteVmClusterNetwork( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -6821,10 +6918,9 @@ public EnableExternalNonContainerDatabaseOperationsInsightsResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - EnableExternalNonContainerDatabaseStackMonitoringRequest, - EnableExternalNonContainerDatabaseStackMonitoringResponse> - forEnableExternalNonContainerDatabaseStackMonitoring( - EnableExternalNonContainerDatabaseStackMonitoringRequest request, + DeleteVmClusterNetworkRequest, DeleteVmClusterNetworkResponse> + forDeleteVmClusterNetwork( + DeleteVmClusterNetworkRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -6834,13 +6930,11 @@ public EnableExternalNonContainerDatabaseOperationsInsightsResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - EnableExternalNonContainerDatabaseStackMonitoringResponse>() { + new java.util.concurrent.Callable() { @Override - public EnableExternalNonContainerDatabaseStackMonitoringResponse call() - throws Exception { - final EnableExternalNonContainerDatabaseStackMonitoringResponse response = - client.enableExternalNonContainerDatabaseStackMonitoring(request); + public DeleteVmClusterNetworkResponse call() throws Exception { + final DeleteVmClusterNetworkResponse response = + client.deleteVmClusterNetwork(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -6870,11 +6964,11 @@ public EnableExternalNonContainerDatabaseStackMonitoringResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - EnableExternalPluggableDatabaseDatabaseManagementRequest, - EnableExternalPluggableDatabaseDatabaseManagementResponse> - forEnableExternalPluggableDatabaseDatabaseManagement( - EnableExternalPluggableDatabaseDatabaseManagementRequest request) { - return forEnableExternalPluggableDatabaseDatabaseManagement( + DeregisterAutonomousDatabaseDataSafeRequest, + DeregisterAutonomousDatabaseDataSafeResponse> + forDeregisterAutonomousDatabaseDataSafe( + DeregisterAutonomousDatabaseDataSafeRequest request) { + return forDeregisterAutonomousDatabaseDataSafe( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -6889,10 +6983,10 @@ public EnableExternalNonContainerDatabaseStackMonitoringResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - EnableExternalPluggableDatabaseDatabaseManagementRequest, - EnableExternalPluggableDatabaseDatabaseManagementResponse> - forEnableExternalPluggableDatabaseDatabaseManagement( - EnableExternalPluggableDatabaseDatabaseManagementRequest request, + DeregisterAutonomousDatabaseDataSafeRequest, + DeregisterAutonomousDatabaseDataSafeResponse> + forDeregisterAutonomousDatabaseDataSafe( + DeregisterAutonomousDatabaseDataSafeRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -6902,13 +6996,11 @@ public EnableExternalNonContainerDatabaseStackMonitoringResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - EnableExternalPluggableDatabaseDatabaseManagementResponse>() { + new java.util.concurrent.Callable() { @Override - public EnableExternalPluggableDatabaseDatabaseManagementResponse call() - throws Exception { - final EnableExternalPluggableDatabaseDatabaseManagementResponse response = - client.enableExternalPluggableDatabaseDatabaseManagement(request); + public DeregisterAutonomousDatabaseDataSafeResponse call() throws Exception { + final DeregisterAutonomousDatabaseDataSafeResponse response = + client.deregisterAutonomousDatabaseDataSafe(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -6938,11 +7030,11 @@ public EnableExternalPluggableDatabaseDatabaseManagementResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - EnableExternalPluggableDatabaseOperationsInsightsRequest, - EnableExternalPluggableDatabaseOperationsInsightsResponse> - forEnableExternalPluggableDatabaseOperationsInsights( - EnableExternalPluggableDatabaseOperationsInsightsRequest request) { - return forEnableExternalPluggableDatabaseOperationsInsights( + DisableAutonomousDatabaseManagementRequest, + DisableAutonomousDatabaseManagementResponse> + forDisableAutonomousDatabaseManagement( + DisableAutonomousDatabaseManagementRequest request) { + return forDisableAutonomousDatabaseManagement( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -6957,10 +7049,10 @@ public EnableExternalPluggableDatabaseDatabaseManagementResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - EnableExternalPluggableDatabaseOperationsInsightsRequest, - EnableExternalPluggableDatabaseOperationsInsightsResponse> - forEnableExternalPluggableDatabaseOperationsInsights( - EnableExternalPluggableDatabaseOperationsInsightsRequest request, + DisableAutonomousDatabaseManagementRequest, + DisableAutonomousDatabaseManagementResponse> + forDisableAutonomousDatabaseManagement( + DisableAutonomousDatabaseManagementRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -6970,13 +7062,11 @@ public EnableExternalPluggableDatabaseDatabaseManagementResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - EnableExternalPluggableDatabaseOperationsInsightsResponse>() { + new java.util.concurrent.Callable() { @Override - public EnableExternalPluggableDatabaseOperationsInsightsResponse call() - throws Exception { - final EnableExternalPluggableDatabaseOperationsInsightsResponse response = - client.enableExternalPluggableDatabaseOperationsInsights(request); + public DisableAutonomousDatabaseManagementResponse call() throws Exception { + final DisableAutonomousDatabaseManagementResponse response = + client.disableAutonomousDatabaseManagement(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -7006,11 +7096,11 @@ public EnableExternalPluggableDatabaseOperationsInsightsResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - EnableExternalPluggableDatabaseStackMonitoringRequest, - EnableExternalPluggableDatabaseStackMonitoringResponse> - forEnableExternalPluggableDatabaseStackMonitoring( - EnableExternalPluggableDatabaseStackMonitoringRequest request) { - return forEnableExternalPluggableDatabaseStackMonitoring( + DisableAutonomousDatabaseOperationsInsightsRequest, + DisableAutonomousDatabaseOperationsInsightsResponse> + forDisableAutonomousDatabaseOperationsInsights( + DisableAutonomousDatabaseOperationsInsightsRequest request) { + return forDisableAutonomousDatabaseOperationsInsights( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -7025,10 +7115,10 @@ public EnableExternalPluggableDatabaseOperationsInsightsResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - EnableExternalPluggableDatabaseStackMonitoringRequest, - EnableExternalPluggableDatabaseStackMonitoringResponse> - forEnableExternalPluggableDatabaseStackMonitoring( - EnableExternalPluggableDatabaseStackMonitoringRequest request, + DisableAutonomousDatabaseOperationsInsightsRequest, + DisableAutonomousDatabaseOperationsInsightsResponse> + forDisableAutonomousDatabaseOperationsInsights( + DisableAutonomousDatabaseOperationsInsightsRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -7039,12 +7129,12 @@ public EnableExternalPluggableDatabaseOperationsInsightsResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, new java.util.concurrent.Callable< - EnableExternalPluggableDatabaseStackMonitoringResponse>() { + DisableAutonomousDatabaseOperationsInsightsResponse>() { @Override - public EnableExternalPluggableDatabaseStackMonitoringResponse call() + public DisableAutonomousDatabaseOperationsInsightsResponse call() throws Exception { - final EnableExternalPluggableDatabaseStackMonitoringResponse response = - client.enableExternalPluggableDatabaseStackMonitoring(request); + final DisableAutonomousDatabaseOperationsInsightsResponse response = + client.disableAutonomousDatabaseOperationsInsights(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -7074,10 +7164,9 @@ public EnableExternalPluggableDatabaseStackMonitoringResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - EnablePluggableDatabaseManagementRequest, - EnablePluggableDatabaseManagementResponse> - forEnablePluggableDatabaseManagement(EnablePluggableDatabaseManagementRequest request) { - return forEnablePluggableDatabaseManagement( + DisableDatabaseManagementRequest, DisableDatabaseManagementResponse> + forDisableDatabaseManagement(DisableDatabaseManagementRequest request) { + return forDisableDatabaseManagement( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -7092,10 +7181,9 @@ public EnableExternalPluggableDatabaseStackMonitoringResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - EnablePluggableDatabaseManagementRequest, - EnablePluggableDatabaseManagementResponse> - forEnablePluggableDatabaseManagement( - EnablePluggableDatabaseManagementRequest request, + DisableDatabaseManagementRequest, DisableDatabaseManagementResponse> + forDisableDatabaseManagement( + DisableDatabaseManagementRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -7105,11 +7193,11 @@ public EnableExternalPluggableDatabaseStackMonitoringResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public EnablePluggableDatabaseManagementResponse call() throws Exception { - final EnablePluggableDatabaseManagementResponse response = - client.enablePluggableDatabaseManagement(request); + public DisableDatabaseManagementResponse call() throws Exception { + final DisableDatabaseManagementResponse response = + client.disableDatabaseManagement(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -7139,9 +7227,11 @@ public EnablePluggableDatabaseManagementResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - FailOverAutonomousDatabaseRequest, FailOverAutonomousDatabaseResponse> - forFailOverAutonomousDatabase(FailOverAutonomousDatabaseRequest request) { - return forFailOverAutonomousDatabase( + DisableExternalContainerDatabaseDatabaseManagementRequest, + DisableExternalContainerDatabaseDatabaseManagementResponse> + forDisableExternalContainerDatabaseDatabaseManagement( + DisableExternalContainerDatabaseDatabaseManagementRequest request) { + return forDisableExternalContainerDatabaseDatabaseManagement( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -7156,9 +7246,10 @@ public EnablePluggableDatabaseManagementResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - FailOverAutonomousDatabaseRequest, FailOverAutonomousDatabaseResponse> - forFailOverAutonomousDatabase( - FailOverAutonomousDatabaseRequest request, + DisableExternalContainerDatabaseDatabaseManagementRequest, + DisableExternalContainerDatabaseDatabaseManagementResponse> + forDisableExternalContainerDatabaseDatabaseManagement( + DisableExternalContainerDatabaseDatabaseManagementRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -7168,11 +7259,13 @@ public EnablePluggableDatabaseManagementResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + DisableExternalContainerDatabaseDatabaseManagementResponse>() { @Override - public FailOverAutonomousDatabaseResponse call() throws Exception { - final FailOverAutonomousDatabaseResponse response = - client.failOverAutonomousDatabase(request); + public DisableExternalContainerDatabaseDatabaseManagementResponse call() + throws Exception { + final DisableExternalContainerDatabaseDatabaseManagementResponse response = + client.disableExternalContainerDatabaseDatabaseManagement(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -7202,11 +7295,11 @@ public FailOverAutonomousDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - FailoverAutonomousContainerDatabaseDataguardAssociationRequest, - FailoverAutonomousContainerDatabaseDataguardAssociationResponse> - forFailoverAutonomousContainerDatabaseDataguardAssociation( - FailoverAutonomousContainerDatabaseDataguardAssociationRequest request) { - return forFailoverAutonomousContainerDatabaseDataguardAssociation( + DisableExternalContainerDatabaseStackMonitoringRequest, + DisableExternalContainerDatabaseStackMonitoringResponse> + forDisableExternalContainerDatabaseStackMonitoring( + DisableExternalContainerDatabaseStackMonitoringRequest request) { + return forDisableExternalContainerDatabaseStackMonitoring( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -7221,10 +7314,10 @@ public FailOverAutonomousDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - FailoverAutonomousContainerDatabaseDataguardAssociationRequest, - FailoverAutonomousContainerDatabaseDataguardAssociationResponse> - forFailoverAutonomousContainerDatabaseDataguardAssociation( - FailoverAutonomousContainerDatabaseDataguardAssociationRequest request, + DisableExternalContainerDatabaseStackMonitoringRequest, + DisableExternalContainerDatabaseStackMonitoringResponse> + forDisableExternalContainerDatabaseStackMonitoring( + DisableExternalContainerDatabaseStackMonitoringRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -7235,15 +7328,12 @@ public FailOverAutonomousDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, new java.util.concurrent.Callable< - FailoverAutonomousContainerDatabaseDataguardAssociationResponse>() { + DisableExternalContainerDatabaseStackMonitoringResponse>() { @Override - public FailoverAutonomousContainerDatabaseDataguardAssociationResponse call() + public DisableExternalContainerDatabaseStackMonitoringResponse call() throws Exception { - final FailoverAutonomousContainerDatabaseDataguardAssociationResponse - response = - client - .failoverAutonomousContainerDatabaseDataguardAssociation( - request); + final DisableExternalContainerDatabaseStackMonitoringResponse response = + client.disableExternalContainerDatabaseStackMonitoring(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -7273,9 +7363,11 @@ public FailoverAutonomousContainerDatabaseDataguardAssociationResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - FailoverDataGuardAssociationRequest, FailoverDataGuardAssociationResponse> - forFailoverDataGuardAssociation(FailoverDataGuardAssociationRequest request) { - return forFailoverDataGuardAssociation( + DisableExternalNonContainerDatabaseDatabaseManagementRequest, + DisableExternalNonContainerDatabaseDatabaseManagementResponse> + forDisableExternalNonContainerDatabaseDatabaseManagement( + DisableExternalNonContainerDatabaseDatabaseManagementRequest request) { + return forDisableExternalNonContainerDatabaseDatabaseManagement( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -7290,9 +7382,10 @@ public FailoverAutonomousContainerDatabaseDataguardAssociationResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - FailoverDataGuardAssociationRequest, FailoverDataGuardAssociationResponse> - forFailoverDataGuardAssociation( - FailoverDataGuardAssociationRequest request, + DisableExternalNonContainerDatabaseDatabaseManagementRequest, + DisableExternalNonContainerDatabaseDatabaseManagementResponse> + forDisableExternalNonContainerDatabaseDatabaseManagement( + DisableExternalNonContainerDatabaseDatabaseManagementRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -7302,11 +7395,16 @@ public FailoverAutonomousContainerDatabaseDataguardAssociationResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + DisableExternalNonContainerDatabaseDatabaseManagementResponse>() { @Override - public FailoverDataGuardAssociationResponse call() throws Exception { - final FailoverDataGuardAssociationResponse response = - client.failoverDataGuardAssociation(request); + public DisableExternalNonContainerDatabaseDatabaseManagementResponse call() + throws Exception { + final DisableExternalNonContainerDatabaseDatabaseManagementResponse + response = + client + .disableExternalNonContainerDatabaseDatabaseManagement( + request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -7333,44 +7431,88 @@ public FailoverDataGuardAssociationResponse call() throws Exception { * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * * @param request the request to send - * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states - * @return a new {@code Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forApplicationVip( - GetApplicationVipRequest request, - com.oracle.bmc.database.model.ApplicationVip.LifecycleState... targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one targetState must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null targetState values are not permitted"); - - return forApplicationVip( - com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + public com.oracle.bmc.waiter.Waiter< + DisableExternalNonContainerDatabaseOperationsInsightsRequest, + DisableExternalNonContainerDatabaseOperationsInsightsResponse> + forDisableExternalNonContainerDatabaseOperationsInsights( + DisableExternalNonContainerDatabaseOperationsInsightsRequest request) { + return forDisableExternalNonContainerDatabaseOperationsInsights( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. * * @param request the request to send - * @param targetState the desired state to wait for * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forApplicationVip( - GetApplicationVipRequest request, - com.oracle.bmc.database.model.ApplicationVip.LifecycleState targetState, + public com.oracle.bmc.waiter.Waiter< + DisableExternalNonContainerDatabaseOperationsInsightsRequest, + DisableExternalNonContainerDatabaseOperationsInsightsResponse> + forDisableExternalNonContainerDatabaseOperationsInsights( + DisableExternalNonContainerDatabaseOperationsInsightsRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { - com.oracle.bmc.util.internal.Validate.notNull( - targetState, "The targetState cannot be null"); + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } - return forApplicationVip( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable< + DisableExternalNonContainerDatabaseOperationsInsightsResponse>() { + @Override + public DisableExternalNonContainerDatabaseOperationsInsightsResponse call() + throws Exception { + final DisableExternalNonContainerDatabaseOperationsInsightsResponse + response = + client + .disableExternalNonContainerDatabaseOperationsInsights( + request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + DisableExternalNonContainerDatabaseStackMonitoringRequest, + DisableExternalNonContainerDatabaseStackMonitoringResponse> + forDisableExternalNonContainerDatabaseStackMonitoring( + DisableExternalNonContainerDatabaseStackMonitoringRequest request) { + return forDisableExternalNonContainerDatabaseStackMonitoring( request, - targetState); + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** @@ -7379,58 +7521,48 @@ public FailoverDataGuardAssociationResponse call() throws Exception { * @param request the request to send * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forApplicationVip( - GetApplicationVipRequest request, + public com.oracle.bmc.waiter.Waiter< + DisableExternalNonContainerDatabaseStackMonitoringRequest, + DisableExternalNonContainerDatabaseStackMonitoringResponse> + forDisableExternalNonContainerDatabaseStackMonitoring( + DisableExternalNonContainerDatabaseStackMonitoringRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.ApplicationVip.LifecycleState... targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one target state must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null target states are not permitted"); - - return forApplicationVip( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), - request, - targetStates); - } - - // Helper method to create a new Waiter for ApplicationVip. - private com.oracle.bmc.waiter.Waiter - forApplicationVip( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetApplicationVipRequest request, - final com.oracle.bmc.database.model.ApplicationVip.LifecycleState... - targetStates) { - final java.util.Set - targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - waiter.toCallable( - () -> request, - new java.util.function.Function< - GetApplicationVipRequest, GetApplicationVipResponse>() { - @Override - public GetApplicationVipResponse apply( - GetApplicationVipRequest request) { - return client.getApplicationVip(request); - } - }, - new java.util.function.Predicate() { - @Override - public boolean test(GetApplicationVipResponse response) { - return targetStatesSet.contains( - response.getApplicationVip().getLifecycleState()); - } - }, - targetStatesSet.contains( - com.oracle.bmc.database.model.ApplicationVip.LifecycleState - .Terminated)), + new java.util.concurrent.Callable< + DisableExternalNonContainerDatabaseStackMonitoringResponse>() { + @Override + public DisableExternalNonContainerDatabaseStackMonitoringResponse call() + throws Exception { + final DisableExternalNonContainerDatabaseStackMonitoringResponse response = + client.disableExternalNonContainerDatabaseStackMonitoring(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, request); } @@ -7438,48 +7570,85 @@ public boolean test(GetApplicationVipResponse response) { * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * * @param request the request to send - * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states - * @return a new {@code Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousContainerDatabaseRequest, GetAutonomousContainerDatabaseResponse> - forAutonomousContainerDatabase( - GetAutonomousContainerDatabaseRequest request, - com.oracle.bmc.database.model.AutonomousContainerDatabase.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one targetState must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null targetState values are not permitted"); - - return forAutonomousContainerDatabase( - com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + DisableExternalPluggableDatabaseDatabaseManagementRequest, + DisableExternalPluggableDatabaseDatabaseManagementResponse> + forDisableExternalPluggableDatabaseDatabaseManagement( + DisableExternalPluggableDatabaseDatabaseManagementRequest request) { + return forDisableExternalPluggableDatabaseDatabaseManagement( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. * * @param request the request to send - * @param targetState the desired state to wait for * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousContainerDatabaseRequest, GetAutonomousContainerDatabaseResponse> - forAutonomousContainerDatabase( - GetAutonomousContainerDatabaseRequest request, - com.oracle.bmc.database.model.AutonomousContainerDatabase.LifecycleState - targetState, + DisableExternalPluggableDatabaseDatabaseManagementRequest, + DisableExternalPluggableDatabaseDatabaseManagementResponse> + forDisableExternalPluggableDatabaseDatabaseManagement( + DisableExternalPluggableDatabaseDatabaseManagementRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { - com.oracle.bmc.util.internal.Validate.notNull( - targetState, "The targetState cannot be null"); + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } - return forAutonomousContainerDatabase( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable< + DisableExternalPluggableDatabaseDatabaseManagementResponse>() { + @Override + public DisableExternalPluggableDatabaseDatabaseManagementResponse call() + throws Exception { + final DisableExternalPluggableDatabaseDatabaseManagementResponse response = + client.disableExternalPluggableDatabaseDatabaseManagement(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + DisableExternalPluggableDatabaseOperationsInsightsRequest, + DisableExternalPluggableDatabaseOperationsInsightsResponse> + forDisableExternalPluggableDatabaseOperationsInsights( + DisableExternalPluggableDatabaseOperationsInsightsRequest request) { + return forDisableExternalPluggableDatabaseOperationsInsights( request, - targetState); + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** @@ -7488,65 +7657,48 @@ public boolean test(GetApplicationVipResponse response) { * @param request the request to send * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousContainerDatabaseRequest, GetAutonomousContainerDatabaseResponse> - forAutonomousContainerDatabase( - GetAutonomousContainerDatabaseRequest request, + DisableExternalPluggableDatabaseOperationsInsightsRequest, + DisableExternalPluggableDatabaseOperationsInsightsResponse> + forDisableExternalPluggableDatabaseOperationsInsights( + DisableExternalPluggableDatabaseOperationsInsightsRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.AutonomousContainerDatabase.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one target state must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null target states are not permitted"); - - return forAutonomousContainerDatabase( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), - request, - targetStates); - } - - // Helper method to create a new Waiter for AutonomousContainerDatabase. - private com.oracle.bmc.waiter.Waiter< - GetAutonomousContainerDatabaseRequest, GetAutonomousContainerDatabaseResponse> - forAutonomousContainerDatabase( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetAutonomousContainerDatabaseRequest request, - final com.oracle.bmc.database.model.AutonomousContainerDatabase - .LifecycleState... - targetStates) { - final java.util.Set< - com.oracle.bmc.database.model.AutonomousContainerDatabase.LifecycleState> - targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - waiter.toCallable( - () -> request, - new java.util.function.Function< - GetAutonomousContainerDatabaseRequest, - GetAutonomousContainerDatabaseResponse>() { - @Override - public GetAutonomousContainerDatabaseResponse apply( - GetAutonomousContainerDatabaseRequest request) { - return client.getAutonomousContainerDatabase(request); - } - }, - new java.util.function.Predicate() { - @Override - public boolean test(GetAutonomousContainerDatabaseResponse response) { - return targetStatesSet.contains( - response.getAutonomousContainerDatabase() - .getLifecycleState()); - } - }, - targetStatesSet.contains( - com.oracle.bmc.database.model.AutonomousContainerDatabase - .LifecycleState.Terminated)), + new java.util.concurrent.Callable< + DisableExternalPluggableDatabaseOperationsInsightsResponse>() { + @Override + public DisableExternalPluggableDatabaseOperationsInsightsResponse call() + throws Exception { + final DisableExternalPluggableDatabaseOperationsInsightsResponse response = + client.disableExternalPluggableDatabaseOperationsInsights(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, request); } @@ -7554,52 +7706,17 @@ public boolean test(GetAutonomousContainerDatabaseResponse response) { * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * * @param request the request to send - * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states - * @return a new {@code Waiter} instance - */ - public com.oracle.bmc.waiter.Waiter< - GetAutonomousContainerDatabaseDataguardAssociationRequest, - GetAutonomousContainerDatabaseDataguardAssociationResponse> - forAutonomousContainerDatabaseDataguardAssociation( - GetAutonomousContainerDatabaseDataguardAssociationRequest request, - com.oracle.bmc.database.model.AutonomousContainerDatabaseDataguardAssociation - .LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one targetState must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null targetState values are not permitted"); - - return forAutonomousContainerDatabaseDataguardAssociation( - com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); - } - - /** - * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. - * - * @param request the request to send - * @param targetState the desired state to wait for - * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use - * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousContainerDatabaseDataguardAssociationRequest, - GetAutonomousContainerDatabaseDataguardAssociationResponse> - forAutonomousContainerDatabaseDataguardAssociation( - GetAutonomousContainerDatabaseDataguardAssociationRequest request, - com.oracle.bmc.database.model.AutonomousContainerDatabaseDataguardAssociation - .LifecycleState - targetState, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { - com.oracle.bmc.util.internal.Validate.notNull( - targetState, "The targetState cannot be null"); - - return forAutonomousContainerDatabaseDataguardAssociation( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + DisableExternalPluggableDatabaseStackMonitoringRequest, + DisableExternalPluggableDatabaseStackMonitoringResponse> + forDisableExternalPluggableDatabaseStackMonitoring( + DisableExternalPluggableDatabaseStackMonitoringRequest request) { + return forDisableExternalPluggableDatabaseStackMonitoring( request, - targetState); + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** @@ -7608,76 +7725,48 @@ public boolean test(GetAutonomousContainerDatabaseResponse response) { * @param request the request to send * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousContainerDatabaseDataguardAssociationRequest, - GetAutonomousContainerDatabaseDataguardAssociationResponse> - forAutonomousContainerDatabaseDataguardAssociation( - GetAutonomousContainerDatabaseDataguardAssociationRequest request, + DisableExternalPluggableDatabaseStackMonitoringRequest, + DisableExternalPluggableDatabaseStackMonitoringResponse> + forDisableExternalPluggableDatabaseStackMonitoring( + DisableExternalPluggableDatabaseStackMonitoringRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.AutonomousContainerDatabaseDataguardAssociation - .LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one target state must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null target states are not permitted"); - - return forAutonomousContainerDatabaseDataguardAssociation( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), - request, - targetStates); - } - - // Helper method to create a new Waiter for AutonomousContainerDatabaseDataguardAssociation. - private com.oracle.bmc.waiter.Waiter< - GetAutonomousContainerDatabaseDataguardAssociationRequest, - GetAutonomousContainerDatabaseDataguardAssociationResponse> - forAutonomousContainerDatabaseDataguardAssociation( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetAutonomousContainerDatabaseDataguardAssociationRequest request, - final com.oracle.bmc.database.model - .AutonomousContainerDatabaseDataguardAssociation - .LifecycleState... - targetStates) { - final java.util.Set< - com.oracle.bmc.database.model - .AutonomousContainerDatabaseDataguardAssociation.LifecycleState> - targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - waiter.toCallable( - () -> request, - new java.util.function.Function< - GetAutonomousContainerDatabaseDataguardAssociationRequest, - GetAutonomousContainerDatabaseDataguardAssociationResponse>() { - @Override - public GetAutonomousContainerDatabaseDataguardAssociationResponse apply( - GetAutonomousContainerDatabaseDataguardAssociationRequest - request) { - return client.getAutonomousContainerDatabaseDataguardAssociation( - request); - } - }, - new java.util.function.Predicate< - GetAutonomousContainerDatabaseDataguardAssociationResponse>() { - @Override - public boolean test( - GetAutonomousContainerDatabaseDataguardAssociationResponse - response) { - return targetStatesSet.contains( - response.getAutonomousContainerDatabaseDataguardAssociation() - .getLifecycleState()); - } - }, - targetStatesSet.contains( - com.oracle.bmc.database.model - .AutonomousContainerDatabaseDataguardAssociation - .LifecycleState.Terminated)), + new java.util.concurrent.Callable< + DisableExternalPluggableDatabaseStackMonitoringResponse>() { + @Override + public DisableExternalPluggableDatabaseStackMonitoringResponse call() + throws Exception { + final DisableExternalPluggableDatabaseStackMonitoringResponse response = + client.disableExternalPluggableDatabaseStackMonitoring(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, request); } @@ -7685,45 +7774,83 @@ public boolean test( * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * * @param request the request to send - * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states - * @return a new {@code Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forAutonomousDatabase( - GetAutonomousDatabaseRequest request, - com.oracle.bmc.database.model.AutonomousDatabase.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one targetState must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null targetState values are not permitted"); - - return forAutonomousDatabase( - com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + public com.oracle.bmc.waiter.Waiter< + DisablePluggableDatabaseManagementRequest, + DisablePluggableDatabaseManagementResponse> + forDisablePluggableDatabaseManagement( + DisablePluggableDatabaseManagementRequest request) { + return forDisablePluggableDatabaseManagement( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. * * @param request the request to send - * @param targetState the desired state to wait for * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forAutonomousDatabase( - GetAutonomousDatabaseRequest request, - com.oracle.bmc.database.model.AutonomousDatabase.LifecycleState targetState, + public com.oracle.bmc.waiter.Waiter< + DisablePluggableDatabaseManagementRequest, + DisablePluggableDatabaseManagementResponse> + forDisablePluggableDatabaseManagement( + DisablePluggableDatabaseManagementRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { - com.oracle.bmc.util.internal.Validate.notNull( - targetState, "The targetState cannot be null"); + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } - return forAutonomousDatabase( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public DisablePluggableDatabaseManagementResponse call() throws Exception { + final DisablePluggableDatabaseManagementResponse response = + client.disablePluggableDatabaseManagement(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + EnableAutonomousDatabaseManagementRequest, + EnableAutonomousDatabaseManagementResponse> + forEnableAutonomousDatabaseManagement( + EnableAutonomousDatabaseManagementRequest request) { + return forEnableAutonomousDatabaseManagement( request, - targetState); + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** @@ -7732,60 +7859,46 @@ public boolean test( * @param request the request to send * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forAutonomousDatabase( - GetAutonomousDatabaseRequest request, + public com.oracle.bmc.waiter.Waiter< + EnableAutonomousDatabaseManagementRequest, + EnableAutonomousDatabaseManagementResponse> + forEnableAutonomousDatabaseManagement( + EnableAutonomousDatabaseManagementRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.AutonomousDatabase.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one target state must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null target states are not permitted"); - - return forAutonomousDatabase( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), - request, - targetStates); - } - - // Helper method to create a new Waiter for AutonomousDatabase. - private com.oracle.bmc.waiter.Waiter< - GetAutonomousDatabaseRequest, GetAutonomousDatabaseResponse> - forAutonomousDatabase( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetAutonomousDatabaseRequest request, - final com.oracle.bmc.database.model.AutonomousDatabase.LifecycleState... - targetStates) { - final java.util.Set - targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - waiter.toCallable( - () -> request, - new java.util.function.Function< - GetAutonomousDatabaseRequest, GetAutonomousDatabaseResponse>() { - @Override - public GetAutonomousDatabaseResponse apply( - GetAutonomousDatabaseRequest request) { - return client.getAutonomousDatabase(request); - } - }, - new java.util.function.Predicate() { - @Override - public boolean test(GetAutonomousDatabaseResponse response) { - return targetStatesSet.contains( - response.getAutonomousDatabase().getLifecycleState()); - } - }, - targetStatesSet.contains( - com.oracle.bmc.database.model.AutonomousDatabase.LifecycleState - .Terminated)), + new java.util.concurrent.Callable() { + @Override + public EnableAutonomousDatabaseManagementResponse call() throws Exception { + final EnableAutonomousDatabaseManagementResponse response = + client.enableAutonomousDatabaseManagement(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, request); } @@ -7793,48 +7906,83 @@ public boolean test(GetAutonomousDatabaseResponse response) { * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * * @param request the request to send - * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states - * @return a new {@code Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousDatabaseBackupRequest, GetAutonomousDatabaseBackupResponse> - forAutonomousDatabaseBackup( - GetAutonomousDatabaseBackupRequest request, - com.oracle.bmc.database.model.AutonomousDatabaseBackup.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one targetState must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null targetState values are not permitted"); - - return forAutonomousDatabaseBackup( - com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + EnableAutonomousDatabaseOperationsInsightsRequest, + EnableAutonomousDatabaseOperationsInsightsResponse> + forEnableAutonomousDatabaseOperationsInsights( + EnableAutonomousDatabaseOperationsInsightsRequest request) { + return forEnableAutonomousDatabaseOperationsInsights( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. * * @param request the request to send - * @param targetState the desired state to wait for * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousDatabaseBackupRequest, GetAutonomousDatabaseBackupResponse> - forAutonomousDatabaseBackup( - GetAutonomousDatabaseBackupRequest request, - com.oracle.bmc.database.model.AutonomousDatabaseBackup.LifecycleState - targetState, + EnableAutonomousDatabaseOperationsInsightsRequest, + EnableAutonomousDatabaseOperationsInsightsResponse> + forEnableAutonomousDatabaseOperationsInsights( + EnableAutonomousDatabaseOperationsInsightsRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { - com.oracle.bmc.util.internal.Validate.notNull( - targetState, "The targetState cannot be null"); + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } - return forAutonomousDatabaseBackup( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable< + EnableAutonomousDatabaseOperationsInsightsResponse>() { + @Override + public EnableAutonomousDatabaseOperationsInsightsResponse call() + throws Exception { + final EnableAutonomousDatabaseOperationsInsightsResponse response = + client.enableAutonomousDatabaseOperationsInsights(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + EnableDatabaseManagementRequest, EnableDatabaseManagementResponse> + forEnableDatabaseManagement(EnableDatabaseManagementRequest request) { + return forEnableDatabaseManagement( request, - targetState); + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** @@ -7843,62 +7991,45 @@ public boolean test(GetAutonomousDatabaseResponse response) { * @param request the request to send * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousDatabaseBackupRequest, GetAutonomousDatabaseBackupResponse> - forAutonomousDatabaseBackup( - GetAutonomousDatabaseBackupRequest request, + EnableDatabaseManagementRequest, EnableDatabaseManagementResponse> + forEnableDatabaseManagement( + EnableDatabaseManagementRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.AutonomousDatabaseBackup.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one target state must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null target states are not permitted"); + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } - return forAutonomousDatabaseBackup( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), - request, - targetStates); - } + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public EnableDatabaseManagementResponse call() throws Exception { + final EnableDatabaseManagementResponse response = + client.enableDatabaseManagement(request); - // Helper method to create a new Waiter for AutonomousDatabaseBackup. - private com.oracle.bmc.waiter.Waiter< - GetAutonomousDatabaseBackupRequest, GetAutonomousDatabaseBackupResponse> - forAutonomousDatabaseBackup( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetAutonomousDatabaseBackupRequest request, - final com.oracle.bmc.database.model.AutonomousDatabaseBackup.LifecycleState... - targetStates) { - final java.util.Set - targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); - - return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( - executorService, - waiter.toCallable( - () -> request, - new java.util.function.Function< - GetAutonomousDatabaseBackupRequest, - GetAutonomousDatabaseBackupResponse>() { - @Override - public GetAutonomousDatabaseBackupResponse apply( - GetAutonomousDatabaseBackupRequest request) { - return client.getAutonomousDatabaseBackup(request); - } - }, - new java.util.function.Predicate() { - @Override - public boolean test(GetAutonomousDatabaseBackupResponse response) { - return targetStatesSet.contains( - response.getAutonomousDatabaseBackup().getLifecycleState()); - } - }, - targetStatesSet.contains( - com.oracle.bmc.database.model.AutonomousDatabaseBackup - .LifecycleState.Deleted)), + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, request); } @@ -7906,52 +8037,17 @@ public boolean test(GetAutonomousDatabaseBackupResponse response) { * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * * @param request the request to send - * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states - * @return a new {@code Waiter} instance - */ - public com.oracle.bmc.waiter.Waiter< - GetAutonomousDatabaseDataguardAssociationRequest, - GetAutonomousDatabaseDataguardAssociationResponse> - forAutonomousDatabaseDataguardAssociation( - GetAutonomousDatabaseDataguardAssociationRequest request, - com.oracle.bmc.database.model.AutonomousDatabaseDataguardAssociation - .LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one targetState must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null targetState values are not permitted"); - - return forAutonomousDatabaseDataguardAssociation( - com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); - } - - /** - * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. - * - * @param request the request to send - * @param targetState the desired state to wait for - * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use - * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousDatabaseDataguardAssociationRequest, - GetAutonomousDatabaseDataguardAssociationResponse> - forAutonomousDatabaseDataguardAssociation( - GetAutonomousDatabaseDataguardAssociationRequest request, - com.oracle.bmc.database.model.AutonomousDatabaseDataguardAssociation - .LifecycleState - targetState, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { - com.oracle.bmc.util.internal.Validate.notNull( - targetState, "The targetState cannot be null"); - - return forAutonomousDatabaseDataguardAssociation( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + EnableExternalContainerDatabaseDatabaseManagementRequest, + EnableExternalContainerDatabaseDatabaseManagementResponse> + forEnableExternalContainerDatabaseDatabaseManagement( + EnableExternalContainerDatabaseDatabaseManagementRequest request) { + return forEnableExternalContainerDatabaseDatabaseManagement( request, - targetState); + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** @@ -7960,71 +8056,48 @@ public boolean test(GetAutonomousDatabaseBackupResponse response) { * @param request the request to send * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousDatabaseDataguardAssociationRequest, - GetAutonomousDatabaseDataguardAssociationResponse> - forAutonomousDatabaseDataguardAssociation( - GetAutonomousDatabaseDataguardAssociationRequest request, + EnableExternalContainerDatabaseDatabaseManagementRequest, + EnableExternalContainerDatabaseDatabaseManagementResponse> + forEnableExternalContainerDatabaseDatabaseManagement( + EnableExternalContainerDatabaseDatabaseManagementRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.AutonomousDatabaseDataguardAssociation - .LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one target state must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null target states are not permitted"); - - return forAutonomousDatabaseDataguardAssociation( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), - request, - targetStates); - } - - // Helper method to create a new Waiter for AutonomousDatabaseDataguardAssociation. - private com.oracle.bmc.waiter.Waiter< - GetAutonomousDatabaseDataguardAssociationRequest, - GetAutonomousDatabaseDataguardAssociationResponse> - forAutonomousDatabaseDataguardAssociation( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetAutonomousDatabaseDataguardAssociationRequest request, - final com.oracle.bmc.database.model.AutonomousDatabaseDataguardAssociation - .LifecycleState... - targetStates) { - final java.util.Set< - com.oracle.bmc.database.model.AutonomousDatabaseDataguardAssociation - .LifecycleState> - targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - waiter.toCallable( - () -> request, - new java.util.function.Function< - GetAutonomousDatabaseDataguardAssociationRequest, - GetAutonomousDatabaseDataguardAssociationResponse>() { - @Override - public GetAutonomousDatabaseDataguardAssociationResponse apply( - GetAutonomousDatabaseDataguardAssociationRequest request) { - return client.getAutonomousDatabaseDataguardAssociation(request); - } - }, - new java.util.function.Predicate< - GetAutonomousDatabaseDataguardAssociationResponse>() { - @Override - public boolean test( - GetAutonomousDatabaseDataguardAssociationResponse response) { - return targetStatesSet.contains( - response.getAutonomousDatabaseDataguardAssociation() - .getLifecycleState()); - } - }, - targetStatesSet.contains( - com.oracle.bmc.database.model.AutonomousDatabaseDataguardAssociation - .LifecycleState.Terminated)), + new java.util.concurrent.Callable< + EnableExternalContainerDatabaseDatabaseManagementResponse>() { + @Override + public EnableExternalContainerDatabaseDatabaseManagementResponse call() + throws Exception { + final EnableExternalContainerDatabaseDatabaseManagementResponse response = + client.enableExternalContainerDatabaseDatabaseManagement(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, request); } @@ -8032,122 +8105,67 @@ public boolean test( * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * * @param request the request to send - * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states - * @return a new {@code Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousDatabaseSoftwareImageRequest, - GetAutonomousDatabaseSoftwareImageResponse> - forAutonomousDatabaseSoftwareImage( - GetAutonomousDatabaseSoftwareImageRequest request, - com.oracle.bmc.database.model.AutonomousDatabaseSoftwareImage.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one targetState must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null targetState values are not permitted"); - - return forAutonomousDatabaseSoftwareImage( - com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + EnableExternalContainerDatabaseStackMonitoringRequest, + EnableExternalContainerDatabaseStackMonitoringResponse> + forEnableExternalContainerDatabaseStackMonitoring( + EnableExternalContainerDatabaseStackMonitoringRequest request) { + return forEnableExternalContainerDatabaseStackMonitoring( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. * * @param request the request to send - * @param targetState the desired state to wait for * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousDatabaseSoftwareImageRequest, - GetAutonomousDatabaseSoftwareImageResponse> - forAutonomousDatabaseSoftwareImage( - GetAutonomousDatabaseSoftwareImageRequest request, - com.oracle.bmc.database.model.AutonomousDatabaseSoftwareImage.LifecycleState - targetState, + EnableExternalContainerDatabaseStackMonitoringRequest, + EnableExternalContainerDatabaseStackMonitoringResponse> + forEnableExternalContainerDatabaseStackMonitoring( + EnableExternalContainerDatabaseStackMonitoringRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { - com.oracle.bmc.util.internal.Validate.notNull( - targetState, "The targetState cannot be null"); + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } - return forAutonomousDatabaseSoftwareImage( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), - request, - targetState); - } + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable< + EnableExternalContainerDatabaseStackMonitoringResponse>() { + @Override + public EnableExternalContainerDatabaseStackMonitoringResponse call() + throws Exception { + final EnableExternalContainerDatabaseStackMonitoringResponse response = + client.enableExternalContainerDatabaseStackMonitoring(request); - /** - * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. - * - * @param request the request to send - * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use - * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance - */ - public com.oracle.bmc.waiter.Waiter< - GetAutonomousDatabaseSoftwareImageRequest, - GetAutonomousDatabaseSoftwareImageResponse> - forAutonomousDatabaseSoftwareImage( - GetAutonomousDatabaseSoftwareImageRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.AutonomousDatabaseSoftwareImage.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one target state must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null target states are not permitted"); - - return forAutonomousDatabaseSoftwareImage( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), - request, - targetStates); - } - - // Helper method to create a new Waiter for AutonomousDatabaseSoftwareImage. - private com.oracle.bmc.waiter.Waiter< - GetAutonomousDatabaseSoftwareImageRequest, - GetAutonomousDatabaseSoftwareImageResponse> - forAutonomousDatabaseSoftwareImage( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetAutonomousDatabaseSoftwareImageRequest request, - final com.oracle.bmc.database.model.AutonomousDatabaseSoftwareImage - .LifecycleState... - targetStates) { - final java.util.Set< - com.oracle.bmc.database.model.AutonomousDatabaseSoftwareImage - .LifecycleState> - targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); - - return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( - executorService, - waiter.toCallable( - () -> request, - new java.util.function.Function< - GetAutonomousDatabaseSoftwareImageRequest, - GetAutonomousDatabaseSoftwareImageResponse>() { - @Override - public GetAutonomousDatabaseSoftwareImageResponse apply( - GetAutonomousDatabaseSoftwareImageRequest request) { - return client.getAutonomousDatabaseSoftwareImage(request); - } - }, - new java.util.function.Predicate< - GetAutonomousDatabaseSoftwareImageResponse>() { - @Override - public boolean test( - GetAutonomousDatabaseSoftwareImageResponse response) { - return targetStatesSet.contains( - response.getAutonomousDatabaseSoftwareImage() - .getLifecycleState()); - } - }, - targetStatesSet.contains( - com.oracle.bmc.database.model.AutonomousDatabaseSoftwareImage - .LifecycleState.Terminated)), + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, request); } @@ -8155,48 +8173,17 @@ public boolean test( * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * * @param request the request to send - * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states - * @return a new {@code Waiter} instance - */ - public com.oracle.bmc.waiter.Waiter< - GetAutonomousDatabaseWalletRequest, GetAutonomousDatabaseWalletResponse> - forAutonomousDatabaseWallet( - GetAutonomousDatabaseWalletRequest request, - com.oracle.bmc.database.model.AutonomousDatabaseWallet.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one targetState must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null targetState values are not permitted"); - - return forAutonomousDatabaseWallet( - com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); - } - - /** - * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. - * - * @param request the request to send - * @param targetState the desired state to wait for - * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use - * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousDatabaseWalletRequest, GetAutonomousDatabaseWalletResponse> - forAutonomousDatabaseWallet( - GetAutonomousDatabaseWalletRequest request, - com.oracle.bmc.database.model.AutonomousDatabaseWallet.LifecycleState - targetState, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { - com.oracle.bmc.util.internal.Validate.notNull( - targetState, "The targetState cannot be null"); - - return forAutonomousDatabaseWallet( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + EnableExternalNonContainerDatabaseDatabaseManagementRequest, + EnableExternalNonContainerDatabaseDatabaseManagementResponse> + forEnableExternalNonContainerDatabaseDatabaseManagement( + EnableExternalNonContainerDatabaseDatabaseManagementRequest request) { + return forEnableExternalNonContainerDatabaseDatabaseManagement( request, - targetState); + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** @@ -8205,60 +8192,50 @@ public boolean test( * @param request the request to send * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousDatabaseWalletRequest, GetAutonomousDatabaseWalletResponse> - forAutonomousDatabaseWallet( - GetAutonomousDatabaseWalletRequest request, + EnableExternalNonContainerDatabaseDatabaseManagementRequest, + EnableExternalNonContainerDatabaseDatabaseManagementResponse> + forEnableExternalNonContainerDatabaseDatabaseManagement( + EnableExternalNonContainerDatabaseDatabaseManagementRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.AutonomousDatabaseWallet.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one target state must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null target states are not permitted"); - - return forAutonomousDatabaseWallet( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), - request, - targetStates); - } - - // Helper method to create a new Waiter for AutonomousDatabaseWallet. - private com.oracle.bmc.waiter.Waiter< - GetAutonomousDatabaseWalletRequest, GetAutonomousDatabaseWalletResponse> - forAutonomousDatabaseWallet( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetAutonomousDatabaseWalletRequest request, - final com.oracle.bmc.database.model.AutonomousDatabaseWallet.LifecycleState... - targetStates) { - final java.util.Set - targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - waiter.toCallable( - () -> request, - new java.util.function.Function< - GetAutonomousDatabaseWalletRequest, - GetAutonomousDatabaseWalletResponse>() { - @Override - public GetAutonomousDatabaseWalletResponse apply( - GetAutonomousDatabaseWalletRequest request) { - return client.getAutonomousDatabaseWallet(request); - } - }, - new java.util.function.Predicate() { - @Override - public boolean test(GetAutonomousDatabaseWalletResponse response) { - return targetStatesSet.contains( - response.getAutonomousDatabaseWallet().getLifecycleState()); - } - }, - false), + new java.util.concurrent.Callable< + EnableExternalNonContainerDatabaseDatabaseManagementResponse>() { + @Override + public EnableExternalNonContainerDatabaseDatabaseManagementResponse call() + throws Exception { + final EnableExternalNonContainerDatabaseDatabaseManagementResponse + response = + client.enableExternalNonContainerDatabaseDatabaseManagement( + request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, request); } @@ -8266,50 +8243,87 @@ public boolean test(GetAutonomousDatabaseWalletResponse response) { * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * * @param request the request to send - * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states - * @return a new {@code Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousExadataInfrastructureRequest, - GetAutonomousExadataInfrastructureResponse> - forAutonomousExadataInfrastructure( - GetAutonomousExadataInfrastructureRequest request, - com.oracle.bmc.database.model.AutonomousExadataInfrastructure.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one targetState must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null targetState values are not permitted"); - - return forAutonomousExadataInfrastructure( - com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + EnableExternalNonContainerDatabaseOperationsInsightsRequest, + EnableExternalNonContainerDatabaseOperationsInsightsResponse> + forEnableExternalNonContainerDatabaseOperationsInsights( + EnableExternalNonContainerDatabaseOperationsInsightsRequest request) { + return forEnableExternalNonContainerDatabaseOperationsInsights( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. * * @param request the request to send - * @param targetState the desired state to wait for * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousExadataInfrastructureRequest, - GetAutonomousExadataInfrastructureResponse> - forAutonomousExadataInfrastructure( - GetAutonomousExadataInfrastructureRequest request, - com.oracle.bmc.database.model.AutonomousExadataInfrastructure.LifecycleState - targetState, + EnableExternalNonContainerDatabaseOperationsInsightsRequest, + EnableExternalNonContainerDatabaseOperationsInsightsResponse> + forEnableExternalNonContainerDatabaseOperationsInsights( + EnableExternalNonContainerDatabaseOperationsInsightsRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { - com.oracle.bmc.util.internal.Validate.notNull( - targetState, "The targetState cannot be null"); + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } - return forAutonomousExadataInfrastructure( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable< + EnableExternalNonContainerDatabaseOperationsInsightsResponse>() { + @Override + public EnableExternalNonContainerDatabaseOperationsInsightsResponse call() + throws Exception { + final EnableExternalNonContainerDatabaseOperationsInsightsResponse + response = + client.enableExternalNonContainerDatabaseOperationsInsights( + request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + EnableExternalNonContainerDatabaseStackMonitoringRequest, + EnableExternalNonContainerDatabaseStackMonitoringResponse> + forEnableExternalNonContainerDatabaseStackMonitoring( + EnableExternalNonContainerDatabaseStackMonitoringRequest request) { + return forEnableExternalNonContainerDatabaseStackMonitoring( request, - targetState); + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** @@ -8318,70 +8332,48 @@ public boolean test(GetAutonomousDatabaseWalletResponse response) { * @param request the request to send * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousExadataInfrastructureRequest, - GetAutonomousExadataInfrastructureResponse> - forAutonomousExadataInfrastructure( - GetAutonomousExadataInfrastructureRequest request, + EnableExternalNonContainerDatabaseStackMonitoringRequest, + EnableExternalNonContainerDatabaseStackMonitoringResponse> + forEnableExternalNonContainerDatabaseStackMonitoring( + EnableExternalNonContainerDatabaseStackMonitoringRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.AutonomousExadataInfrastructure.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one target state must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null target states are not permitted"); - - return forAutonomousExadataInfrastructure( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), - request, - targetStates); - } - - // Helper method to create a new Waiter for AutonomousExadataInfrastructure. - private com.oracle.bmc.waiter.Waiter< - GetAutonomousExadataInfrastructureRequest, - GetAutonomousExadataInfrastructureResponse> - forAutonomousExadataInfrastructure( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetAutonomousExadataInfrastructureRequest request, - final com.oracle.bmc.database.model.AutonomousExadataInfrastructure - .LifecycleState... - targetStates) { - final java.util.Set< - com.oracle.bmc.database.model.AutonomousExadataInfrastructure - .LifecycleState> - targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - waiter.toCallable( - () -> request, - new java.util.function.Function< - GetAutonomousExadataInfrastructureRequest, - GetAutonomousExadataInfrastructureResponse>() { - @Override - public GetAutonomousExadataInfrastructureResponse apply( - GetAutonomousExadataInfrastructureRequest request) { - return client.getAutonomousExadataInfrastructure(request); - } - }, - new java.util.function.Predicate< - GetAutonomousExadataInfrastructureResponse>() { - @Override - public boolean test( - GetAutonomousExadataInfrastructureResponse response) { - return targetStatesSet.contains( - response.getAutonomousExadataInfrastructure() - .getLifecycleState()); - } - }, - targetStatesSet.contains( - com.oracle.bmc.database.model.AutonomousExadataInfrastructure - .LifecycleState.Terminated)), + new java.util.concurrent.Callable< + EnableExternalNonContainerDatabaseStackMonitoringResponse>() { + @Override + public EnableExternalNonContainerDatabaseStackMonitoringResponse call() + throws Exception { + final EnableExternalNonContainerDatabaseStackMonitoringResponse response = + client.enableExternalNonContainerDatabaseStackMonitoring(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, request); } @@ -8389,44 +8381,85 @@ public boolean test( * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * * @param request the request to send - * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states - * @return a new {@code Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forAutonomousPatch( - GetAutonomousPatchRequest request, - com.oracle.bmc.database.model.AutonomousPatch.LifecycleState... targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one targetState must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null targetState values are not permitted"); - - return forAutonomousPatch( - com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + public com.oracle.bmc.waiter.Waiter< + EnableExternalPluggableDatabaseDatabaseManagementRequest, + EnableExternalPluggableDatabaseDatabaseManagementResponse> + forEnableExternalPluggableDatabaseDatabaseManagement( + EnableExternalPluggableDatabaseDatabaseManagementRequest request) { + return forEnableExternalPluggableDatabaseDatabaseManagement( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. * * @param request the request to send - * @param targetState the desired state to wait for * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forAutonomousPatch( - GetAutonomousPatchRequest request, - com.oracle.bmc.database.model.AutonomousPatch.LifecycleState targetState, + public com.oracle.bmc.waiter.Waiter< + EnableExternalPluggableDatabaseDatabaseManagementRequest, + EnableExternalPluggableDatabaseDatabaseManagementResponse> + forEnableExternalPluggableDatabaseDatabaseManagement( + EnableExternalPluggableDatabaseDatabaseManagementRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { - com.oracle.bmc.util.internal.Validate.notNull( - targetState, "The targetState cannot be null"); + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } - return forAutonomousPatch( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable< + EnableExternalPluggableDatabaseDatabaseManagementResponse>() { + @Override + public EnableExternalPluggableDatabaseDatabaseManagementResponse call() + throws Exception { + final EnableExternalPluggableDatabaseDatabaseManagementResponse response = + client.enableExternalPluggableDatabaseDatabaseManagement(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + EnableExternalPluggableDatabaseOperationsInsightsRequest, + EnableExternalPluggableDatabaseOperationsInsightsResponse> + forEnableExternalPluggableDatabaseOperationsInsights( + EnableExternalPluggableDatabaseOperationsInsightsRequest request) { + return forEnableExternalPluggableDatabaseOperationsInsights( request, - targetState); + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** @@ -8435,56 +8468,48 @@ public boolean test( * @param request the request to send * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forAutonomousPatch( - GetAutonomousPatchRequest request, + public com.oracle.bmc.waiter.Waiter< + EnableExternalPluggableDatabaseOperationsInsightsRequest, + EnableExternalPluggableDatabaseOperationsInsightsResponse> + forEnableExternalPluggableDatabaseOperationsInsights( + EnableExternalPluggableDatabaseOperationsInsightsRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.AutonomousPatch.LifecycleState... targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one target state must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null target states are not permitted"); - - return forAutonomousPatch( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), - request, - targetStates); - } - - // Helper method to create a new Waiter for AutonomousPatch. - private com.oracle.bmc.waiter.Waiter - forAutonomousPatch( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetAutonomousPatchRequest request, - final com.oracle.bmc.database.model.AutonomousPatch.LifecycleState... - targetStates) { - final java.util.Set - targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - waiter.toCallable( - () -> request, - new java.util.function.Function< - GetAutonomousPatchRequest, GetAutonomousPatchResponse>() { - @Override - public GetAutonomousPatchResponse apply( - GetAutonomousPatchRequest request) { - return client.getAutonomousPatch(request); - } - }, - new java.util.function.Predicate() { - @Override - public boolean test(GetAutonomousPatchResponse response) { - return targetStatesSet.contains( - response.getAutonomousPatch().getLifecycleState()); - } - }, - false), + new java.util.concurrent.Callable< + EnableExternalPluggableDatabaseOperationsInsightsResponse>() { + @Override + public EnableExternalPluggableDatabaseOperationsInsightsResponse call() + throws Exception { + final EnableExternalPluggableDatabaseOperationsInsightsResponse response = + client.enableExternalPluggableDatabaseOperationsInsights(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, request); } @@ -8492,48 +8517,17 @@ public boolean test(GetAutonomousPatchResponse response) { * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * * @param request the request to send - * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states - * @return a new {@code Waiter} instance - */ - public com.oracle.bmc.waiter.Waiter< - GetAutonomousVirtualMachineRequest, GetAutonomousVirtualMachineResponse> - forAutonomousVirtualMachine( - GetAutonomousVirtualMachineRequest request, - com.oracle.bmc.database.model.AutonomousVirtualMachine.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one targetState must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null targetState values are not permitted"); - - return forAutonomousVirtualMachine( - com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); - } - - /** - * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. - * - * @param request the request to send - * @param targetState the desired state to wait for - * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use - * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousVirtualMachineRequest, GetAutonomousVirtualMachineResponse> - forAutonomousVirtualMachine( - GetAutonomousVirtualMachineRequest request, - com.oracle.bmc.database.model.AutonomousVirtualMachine.LifecycleState - targetState, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { - com.oracle.bmc.util.internal.Validate.notNull( - targetState, "The targetState cannot be null"); - - return forAutonomousVirtualMachine( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + EnableExternalPluggableDatabaseStackMonitoringRequest, + EnableExternalPluggableDatabaseStackMonitoringResponse> + forEnableExternalPluggableDatabaseStackMonitoring( + EnableExternalPluggableDatabaseStackMonitoringRequest request) { + return forEnableExternalPluggableDatabaseStackMonitoring( request, - targetState); + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** @@ -8542,62 +8536,48 @@ public boolean test(GetAutonomousPatchResponse response) { * @param request the request to send * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousVirtualMachineRequest, GetAutonomousVirtualMachineResponse> - forAutonomousVirtualMachine( - GetAutonomousVirtualMachineRequest request, + EnableExternalPluggableDatabaseStackMonitoringRequest, + EnableExternalPluggableDatabaseStackMonitoringResponse> + forEnableExternalPluggableDatabaseStackMonitoring( + EnableExternalPluggableDatabaseStackMonitoringRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.AutonomousVirtualMachine.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one target state must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null target states are not permitted"); - - return forAutonomousVirtualMachine( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), - request, - targetStates); - } - - // Helper method to create a new Waiter for AutonomousVirtualMachine. - private com.oracle.bmc.waiter.Waiter< - GetAutonomousVirtualMachineRequest, GetAutonomousVirtualMachineResponse> - forAutonomousVirtualMachine( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetAutonomousVirtualMachineRequest request, - final com.oracle.bmc.database.model.AutonomousVirtualMachine.LifecycleState... - targetStates) { - final java.util.Set - targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - waiter.toCallable( - () -> request, - new java.util.function.Function< - GetAutonomousVirtualMachineRequest, - GetAutonomousVirtualMachineResponse>() { - @Override - public GetAutonomousVirtualMachineResponse apply( - GetAutonomousVirtualMachineRequest request) { - return client.getAutonomousVirtualMachine(request); - } - }, - new java.util.function.Predicate() { - @Override - public boolean test(GetAutonomousVirtualMachineResponse response) { - return targetStatesSet.contains( - response.getAutonomousVirtualMachine().getLifecycleState()); - } - }, - targetStatesSet.contains( - com.oracle.bmc.database.model.AutonomousVirtualMachine - .LifecycleState.Terminated)), + new java.util.concurrent.Callable< + EnableExternalPluggableDatabaseStackMonitoringResponse>() { + @Override + public EnableExternalPluggableDatabaseStackMonitoringResponse call() + throws Exception { + final EnableExternalPluggableDatabaseStackMonitoringResponse response = + client.enableExternalPluggableDatabaseStackMonitoring(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, request); } @@ -8605,86 +8585,3304 @@ public boolean test(GetAutonomousVirtualMachineResponse response) { * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * * @param request the request to send - * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states - * @return a new {@code Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousVmClusterRequest, GetAutonomousVmClusterResponse> - forAutonomousVmCluster( - GetAutonomousVmClusterRequest request, - com.oracle.bmc.database.model.AutonomousVmCluster.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one targetState must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null targetState values are not permitted"); - - return forAutonomousVmCluster( - com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + EnablePluggableDatabaseManagementRequest, + EnablePluggableDatabaseManagementResponse> + forEnablePluggableDatabaseManagement(EnablePluggableDatabaseManagementRequest request) { + return forEnablePluggableDatabaseManagement( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. * * @param request the request to send - * @param targetState the desired state to wait for * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousVmClusterRequest, GetAutonomousVmClusterResponse> - forAutonomousVmCluster( - GetAutonomousVmClusterRequest request, - com.oracle.bmc.database.model.AutonomousVmCluster.LifecycleState targetState, + EnablePluggableDatabaseManagementRequest, + EnablePluggableDatabaseManagementResponse> + forEnablePluggableDatabaseManagement( + EnablePluggableDatabaseManagementRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { - com.oracle.bmc.util.internal.Validate.notNull( - targetState, "The targetState cannot be null"); + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } - return forAutonomousVmCluster( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), - request, - targetState); - } + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public EnablePluggableDatabaseManagementResponse call() throws Exception { + final EnablePluggableDatabaseManagementResponse response = + client.enablePluggableDatabaseManagement(request); - /** - * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. - * - * @param request the request to send - * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use - * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + FailOverAutonomousDatabaseRequest, FailOverAutonomousDatabaseResponse> + forFailOverAutonomousDatabase(FailOverAutonomousDatabaseRequest request) { + return forFailOverAutonomousDatabase( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + FailOverAutonomousDatabaseRequest, FailOverAutonomousDatabaseResponse> + forFailOverAutonomousDatabase( + FailOverAutonomousDatabaseRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public FailOverAutonomousDatabaseResponse call() throws Exception { + final FailOverAutonomousDatabaseResponse response = + client.failOverAutonomousDatabase(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + FailoverAutonomousContainerDatabaseDataguardAssociationRequest, + FailoverAutonomousContainerDatabaseDataguardAssociationResponse> + forFailoverAutonomousContainerDatabaseDataguardAssociation( + FailoverAutonomousContainerDatabaseDataguardAssociationRequest request) { + return forFailoverAutonomousContainerDatabaseDataguardAssociation( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + FailoverAutonomousContainerDatabaseDataguardAssociationRequest, + FailoverAutonomousContainerDatabaseDataguardAssociationResponse> + forFailoverAutonomousContainerDatabaseDataguardAssociation( + FailoverAutonomousContainerDatabaseDataguardAssociationRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable< + FailoverAutonomousContainerDatabaseDataguardAssociationResponse>() { + @Override + public FailoverAutonomousContainerDatabaseDataguardAssociationResponse call() + throws Exception { + final FailoverAutonomousContainerDatabaseDataguardAssociationResponse + response = + client + .failoverAutonomousContainerDatabaseDataguardAssociation( + request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + FailoverDataGuardAssociationRequest, FailoverDataGuardAssociationResponse> + forFailoverDataGuardAssociation(FailoverDataGuardAssociationRequest request) { + return forFailoverDataGuardAssociation( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + FailoverDataGuardAssociationRequest, FailoverDataGuardAssociationResponse> + forFailoverDataGuardAssociation( + FailoverDataGuardAssociationRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public FailoverDataGuardAssociationResponse call() throws Exception { + final FailoverDataGuardAssociationResponse response = + client.failoverDataGuardAssociation(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forApplicationVip( + GetApplicationVipRequest request, + com.oracle.bmc.database.model.ApplicationVip.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forApplicationVip( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forApplicationVip( + GetApplicationVipRequest request, + com.oracle.bmc.database.model.ApplicationVip.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forApplicationVip( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forApplicationVip( + GetApplicationVipRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.ApplicationVip.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forApplicationVip( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for ApplicationVip. + private com.oracle.bmc.waiter.Waiter + forApplicationVip( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetApplicationVipRequest request, + final com.oracle.bmc.database.model.ApplicationVip.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetApplicationVipRequest, GetApplicationVipResponse>() { + @Override + public GetApplicationVipResponse apply( + GetApplicationVipRequest request) { + return client.getApplicationVip(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetApplicationVipResponse response) { + return targetStatesSet.contains( + response.getApplicationVip().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.ApplicationVip.LifecycleState + .Terminated)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousContainerDatabaseRequest, GetAutonomousContainerDatabaseResponse> + forAutonomousContainerDatabase( + GetAutonomousContainerDatabaseRequest request, + com.oracle.bmc.database.model.AutonomousContainerDatabase.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forAutonomousContainerDatabase( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousContainerDatabaseRequest, GetAutonomousContainerDatabaseResponse> + forAutonomousContainerDatabase( + GetAutonomousContainerDatabaseRequest request, + com.oracle.bmc.database.model.AutonomousContainerDatabase.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forAutonomousContainerDatabase( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousContainerDatabaseRequest, GetAutonomousContainerDatabaseResponse> + forAutonomousContainerDatabase( + GetAutonomousContainerDatabaseRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.AutonomousContainerDatabase.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forAutonomousContainerDatabase( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for AutonomousContainerDatabase. + private com.oracle.bmc.waiter.Waiter< + GetAutonomousContainerDatabaseRequest, GetAutonomousContainerDatabaseResponse> + forAutonomousContainerDatabase( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetAutonomousContainerDatabaseRequest request, + final com.oracle.bmc.database.model.AutonomousContainerDatabase + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.database.model.AutonomousContainerDatabase.LifecycleState> + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetAutonomousContainerDatabaseRequest, + GetAutonomousContainerDatabaseResponse>() { + @Override + public GetAutonomousContainerDatabaseResponse apply( + GetAutonomousContainerDatabaseRequest request) { + return client.getAutonomousContainerDatabase(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetAutonomousContainerDatabaseResponse response) { + return targetStatesSet.contains( + response.getAutonomousContainerDatabase() + .getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.AutonomousContainerDatabase + .LifecycleState.Terminated)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousContainerDatabaseDataguardAssociationRequest, + GetAutonomousContainerDatabaseDataguardAssociationResponse> + forAutonomousContainerDatabaseDataguardAssociation( + GetAutonomousContainerDatabaseDataguardAssociationRequest request, + com.oracle.bmc.database.model.AutonomousContainerDatabaseDataguardAssociation + .LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forAutonomousContainerDatabaseDataguardAssociation( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousContainerDatabaseDataguardAssociationRequest, + GetAutonomousContainerDatabaseDataguardAssociationResponse> + forAutonomousContainerDatabaseDataguardAssociation( + GetAutonomousContainerDatabaseDataguardAssociationRequest request, + com.oracle.bmc.database.model.AutonomousContainerDatabaseDataguardAssociation + .LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forAutonomousContainerDatabaseDataguardAssociation( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousContainerDatabaseDataguardAssociationRequest, + GetAutonomousContainerDatabaseDataguardAssociationResponse> + forAutonomousContainerDatabaseDataguardAssociation( + GetAutonomousContainerDatabaseDataguardAssociationRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.AutonomousContainerDatabaseDataguardAssociation + .LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forAutonomousContainerDatabaseDataguardAssociation( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for AutonomousContainerDatabaseDataguardAssociation. + private com.oracle.bmc.waiter.Waiter< + GetAutonomousContainerDatabaseDataguardAssociationRequest, + GetAutonomousContainerDatabaseDataguardAssociationResponse> + forAutonomousContainerDatabaseDataguardAssociation( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetAutonomousContainerDatabaseDataguardAssociationRequest request, + final com.oracle.bmc.database.model + .AutonomousContainerDatabaseDataguardAssociation + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.database.model + .AutonomousContainerDatabaseDataguardAssociation.LifecycleState> + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetAutonomousContainerDatabaseDataguardAssociationRequest, + GetAutonomousContainerDatabaseDataguardAssociationResponse>() { + @Override + public GetAutonomousContainerDatabaseDataguardAssociationResponse apply( + GetAutonomousContainerDatabaseDataguardAssociationRequest + request) { + return client.getAutonomousContainerDatabaseDataguardAssociation( + request); + } + }, + new java.util.function.Predicate< + GetAutonomousContainerDatabaseDataguardAssociationResponse>() { + @Override + public boolean test( + GetAutonomousContainerDatabaseDataguardAssociationResponse + response) { + return targetStatesSet.contains( + response.getAutonomousContainerDatabaseDataguardAssociation() + .getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model + .AutonomousContainerDatabaseDataguardAssociation + .LifecycleState.Terminated)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forAutonomousDatabase( + GetAutonomousDatabaseRequest request, + com.oracle.bmc.database.model.AutonomousDatabase.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forAutonomousDatabase( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forAutonomousDatabase( + GetAutonomousDatabaseRequest request, + com.oracle.bmc.database.model.AutonomousDatabase.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forAutonomousDatabase( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forAutonomousDatabase( + GetAutonomousDatabaseRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.AutonomousDatabase.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forAutonomousDatabase( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for AutonomousDatabase. + private com.oracle.bmc.waiter.Waiter< + GetAutonomousDatabaseRequest, GetAutonomousDatabaseResponse> + forAutonomousDatabase( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetAutonomousDatabaseRequest request, + final com.oracle.bmc.database.model.AutonomousDatabase.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetAutonomousDatabaseRequest, GetAutonomousDatabaseResponse>() { + @Override + public GetAutonomousDatabaseResponse apply( + GetAutonomousDatabaseRequest request) { + return client.getAutonomousDatabase(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetAutonomousDatabaseResponse response) { + return targetStatesSet.contains( + response.getAutonomousDatabase().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.AutonomousDatabase.LifecycleState + .Terminated)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousDatabaseBackupRequest, GetAutonomousDatabaseBackupResponse> + forAutonomousDatabaseBackup( + GetAutonomousDatabaseBackupRequest request, + com.oracle.bmc.database.model.AutonomousDatabaseBackup.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forAutonomousDatabaseBackup( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousDatabaseBackupRequest, GetAutonomousDatabaseBackupResponse> + forAutonomousDatabaseBackup( + GetAutonomousDatabaseBackupRequest request, + com.oracle.bmc.database.model.AutonomousDatabaseBackup.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forAutonomousDatabaseBackup( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousDatabaseBackupRequest, GetAutonomousDatabaseBackupResponse> + forAutonomousDatabaseBackup( + GetAutonomousDatabaseBackupRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.AutonomousDatabaseBackup.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forAutonomousDatabaseBackup( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for AutonomousDatabaseBackup. + private com.oracle.bmc.waiter.Waiter< + GetAutonomousDatabaseBackupRequest, GetAutonomousDatabaseBackupResponse> + forAutonomousDatabaseBackup( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetAutonomousDatabaseBackupRequest request, + final com.oracle.bmc.database.model.AutonomousDatabaseBackup.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetAutonomousDatabaseBackupRequest, + GetAutonomousDatabaseBackupResponse>() { + @Override + public GetAutonomousDatabaseBackupResponse apply( + GetAutonomousDatabaseBackupRequest request) { + return client.getAutonomousDatabaseBackup(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetAutonomousDatabaseBackupResponse response) { + return targetStatesSet.contains( + response.getAutonomousDatabaseBackup().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.AutonomousDatabaseBackup + .LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousDatabaseDataguardAssociationRequest, + GetAutonomousDatabaseDataguardAssociationResponse> + forAutonomousDatabaseDataguardAssociation( + GetAutonomousDatabaseDataguardAssociationRequest request, + com.oracle.bmc.database.model.AutonomousDatabaseDataguardAssociation + .LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forAutonomousDatabaseDataguardAssociation( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousDatabaseDataguardAssociationRequest, + GetAutonomousDatabaseDataguardAssociationResponse> + forAutonomousDatabaseDataguardAssociation( + GetAutonomousDatabaseDataguardAssociationRequest request, + com.oracle.bmc.database.model.AutonomousDatabaseDataguardAssociation + .LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forAutonomousDatabaseDataguardAssociation( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousDatabaseDataguardAssociationRequest, + GetAutonomousDatabaseDataguardAssociationResponse> + forAutonomousDatabaseDataguardAssociation( + GetAutonomousDatabaseDataguardAssociationRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.AutonomousDatabaseDataguardAssociation + .LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forAutonomousDatabaseDataguardAssociation( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for AutonomousDatabaseDataguardAssociation. + private com.oracle.bmc.waiter.Waiter< + GetAutonomousDatabaseDataguardAssociationRequest, + GetAutonomousDatabaseDataguardAssociationResponse> + forAutonomousDatabaseDataguardAssociation( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetAutonomousDatabaseDataguardAssociationRequest request, + final com.oracle.bmc.database.model.AutonomousDatabaseDataguardAssociation + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.database.model.AutonomousDatabaseDataguardAssociation + .LifecycleState> + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetAutonomousDatabaseDataguardAssociationRequest, + GetAutonomousDatabaseDataguardAssociationResponse>() { + @Override + public GetAutonomousDatabaseDataguardAssociationResponse apply( + GetAutonomousDatabaseDataguardAssociationRequest request) { + return client.getAutonomousDatabaseDataguardAssociation(request); + } + }, + new java.util.function.Predicate< + GetAutonomousDatabaseDataguardAssociationResponse>() { + @Override + public boolean test( + GetAutonomousDatabaseDataguardAssociationResponse response) { + return targetStatesSet.contains( + response.getAutonomousDatabaseDataguardAssociation() + .getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.AutonomousDatabaseDataguardAssociation + .LifecycleState.Terminated)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousDatabaseSoftwareImageRequest, + GetAutonomousDatabaseSoftwareImageResponse> + forAutonomousDatabaseSoftwareImage( + GetAutonomousDatabaseSoftwareImageRequest request, + com.oracle.bmc.database.model.AutonomousDatabaseSoftwareImage.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forAutonomousDatabaseSoftwareImage( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousDatabaseSoftwareImageRequest, + GetAutonomousDatabaseSoftwareImageResponse> + forAutonomousDatabaseSoftwareImage( + GetAutonomousDatabaseSoftwareImageRequest request, + com.oracle.bmc.database.model.AutonomousDatabaseSoftwareImage.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forAutonomousDatabaseSoftwareImage( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousDatabaseSoftwareImageRequest, + GetAutonomousDatabaseSoftwareImageResponse> + forAutonomousDatabaseSoftwareImage( + GetAutonomousDatabaseSoftwareImageRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.AutonomousDatabaseSoftwareImage.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forAutonomousDatabaseSoftwareImage( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for AutonomousDatabaseSoftwareImage. + private com.oracle.bmc.waiter.Waiter< + GetAutonomousDatabaseSoftwareImageRequest, + GetAutonomousDatabaseSoftwareImageResponse> + forAutonomousDatabaseSoftwareImage( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetAutonomousDatabaseSoftwareImageRequest request, + final com.oracle.bmc.database.model.AutonomousDatabaseSoftwareImage + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.database.model.AutonomousDatabaseSoftwareImage + .LifecycleState> + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetAutonomousDatabaseSoftwareImageRequest, + GetAutonomousDatabaseSoftwareImageResponse>() { + @Override + public GetAutonomousDatabaseSoftwareImageResponse apply( + GetAutonomousDatabaseSoftwareImageRequest request) { + return client.getAutonomousDatabaseSoftwareImage(request); + } + }, + new java.util.function.Predicate< + GetAutonomousDatabaseSoftwareImageResponse>() { + @Override + public boolean test( + GetAutonomousDatabaseSoftwareImageResponse response) { + return targetStatesSet.contains( + response.getAutonomousDatabaseSoftwareImage() + .getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.AutonomousDatabaseSoftwareImage + .LifecycleState.Terminated)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousDatabaseWalletRequest, GetAutonomousDatabaseWalletResponse> + forAutonomousDatabaseWallet( + GetAutonomousDatabaseWalletRequest request, + com.oracle.bmc.database.model.AutonomousDatabaseWallet.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forAutonomousDatabaseWallet( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousDatabaseWalletRequest, GetAutonomousDatabaseWalletResponse> + forAutonomousDatabaseWallet( + GetAutonomousDatabaseWalletRequest request, + com.oracle.bmc.database.model.AutonomousDatabaseWallet.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forAutonomousDatabaseWallet( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousDatabaseWalletRequest, GetAutonomousDatabaseWalletResponse> + forAutonomousDatabaseWallet( + GetAutonomousDatabaseWalletRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.AutonomousDatabaseWallet.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forAutonomousDatabaseWallet( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for AutonomousDatabaseWallet. + private com.oracle.bmc.waiter.Waiter< + GetAutonomousDatabaseWalletRequest, GetAutonomousDatabaseWalletResponse> + forAutonomousDatabaseWallet( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetAutonomousDatabaseWalletRequest request, + final com.oracle.bmc.database.model.AutonomousDatabaseWallet.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetAutonomousDatabaseWalletRequest, + GetAutonomousDatabaseWalletResponse>() { + @Override + public GetAutonomousDatabaseWalletResponse apply( + GetAutonomousDatabaseWalletRequest request) { + return client.getAutonomousDatabaseWallet(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetAutonomousDatabaseWalletResponse response) { + return targetStatesSet.contains( + response.getAutonomousDatabaseWallet().getLifecycleState()); + } + }, + false), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousExadataInfrastructureRequest, + GetAutonomousExadataInfrastructureResponse> + forAutonomousExadataInfrastructure( + GetAutonomousExadataInfrastructureRequest request, + com.oracle.bmc.database.model.AutonomousExadataInfrastructure.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forAutonomousExadataInfrastructure( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousExadataInfrastructureRequest, + GetAutonomousExadataInfrastructureResponse> + forAutonomousExadataInfrastructure( + GetAutonomousExadataInfrastructureRequest request, + com.oracle.bmc.database.model.AutonomousExadataInfrastructure.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forAutonomousExadataInfrastructure( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousExadataInfrastructureRequest, + GetAutonomousExadataInfrastructureResponse> + forAutonomousExadataInfrastructure( + GetAutonomousExadataInfrastructureRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.AutonomousExadataInfrastructure.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forAutonomousExadataInfrastructure( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for AutonomousExadataInfrastructure. + private com.oracle.bmc.waiter.Waiter< + GetAutonomousExadataInfrastructureRequest, + GetAutonomousExadataInfrastructureResponse> + forAutonomousExadataInfrastructure( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetAutonomousExadataInfrastructureRequest request, + final com.oracle.bmc.database.model.AutonomousExadataInfrastructure + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.database.model.AutonomousExadataInfrastructure + .LifecycleState> + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetAutonomousExadataInfrastructureRequest, + GetAutonomousExadataInfrastructureResponse>() { + @Override + public GetAutonomousExadataInfrastructureResponse apply( + GetAutonomousExadataInfrastructureRequest request) { + return client.getAutonomousExadataInfrastructure(request); + } + }, + new java.util.function.Predicate< + GetAutonomousExadataInfrastructureResponse>() { + @Override + public boolean test( + GetAutonomousExadataInfrastructureResponse response) { + return targetStatesSet.contains( + response.getAutonomousExadataInfrastructure() + .getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.AutonomousExadataInfrastructure + .LifecycleState.Terminated)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forAutonomousPatch( + GetAutonomousPatchRequest request, + com.oracle.bmc.database.model.AutonomousPatch.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forAutonomousPatch( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forAutonomousPatch( + GetAutonomousPatchRequest request, + com.oracle.bmc.database.model.AutonomousPatch.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forAutonomousPatch( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forAutonomousPatch( + GetAutonomousPatchRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.AutonomousPatch.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forAutonomousPatch( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for AutonomousPatch. + private com.oracle.bmc.waiter.Waiter + forAutonomousPatch( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetAutonomousPatchRequest request, + final com.oracle.bmc.database.model.AutonomousPatch.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetAutonomousPatchRequest, GetAutonomousPatchResponse>() { + @Override + public GetAutonomousPatchResponse apply( + GetAutonomousPatchRequest request) { + return client.getAutonomousPatch(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetAutonomousPatchResponse response) { + return targetStatesSet.contains( + response.getAutonomousPatch().getLifecycleState()); + } + }, + false), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousVirtualMachineRequest, GetAutonomousVirtualMachineResponse> + forAutonomousVirtualMachine( + GetAutonomousVirtualMachineRequest request, + com.oracle.bmc.database.model.AutonomousVirtualMachine.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forAutonomousVirtualMachine( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousVirtualMachineRequest, GetAutonomousVirtualMachineResponse> + forAutonomousVirtualMachine( + GetAutonomousVirtualMachineRequest request, + com.oracle.bmc.database.model.AutonomousVirtualMachine.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forAutonomousVirtualMachine( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousVirtualMachineRequest, GetAutonomousVirtualMachineResponse> + forAutonomousVirtualMachine( + GetAutonomousVirtualMachineRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.AutonomousVirtualMachine.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forAutonomousVirtualMachine( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for AutonomousVirtualMachine. + private com.oracle.bmc.waiter.Waiter< + GetAutonomousVirtualMachineRequest, GetAutonomousVirtualMachineResponse> + forAutonomousVirtualMachine( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetAutonomousVirtualMachineRequest request, + final com.oracle.bmc.database.model.AutonomousVirtualMachine.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetAutonomousVirtualMachineRequest, + GetAutonomousVirtualMachineResponse>() { + @Override + public GetAutonomousVirtualMachineResponse apply( + GetAutonomousVirtualMachineRequest request) { + return client.getAutonomousVirtualMachine(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetAutonomousVirtualMachineResponse response) { + return targetStatesSet.contains( + response.getAutonomousVirtualMachine().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.AutonomousVirtualMachine + .LifecycleState.Terminated)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousVmClusterRequest, GetAutonomousVmClusterResponse> + forAutonomousVmCluster( + GetAutonomousVmClusterRequest request, + com.oracle.bmc.database.model.AutonomousVmCluster.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forAutonomousVmCluster( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousVmClusterRequest, GetAutonomousVmClusterResponse> + forAutonomousVmCluster( + GetAutonomousVmClusterRequest request, + com.oracle.bmc.database.model.AutonomousVmCluster.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forAutonomousVmCluster( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetAutonomousVmClusterRequest, GetAutonomousVmClusterResponse> + forAutonomousVmCluster( + GetAutonomousVmClusterRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.AutonomousVmCluster.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forAutonomousVmCluster( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for AutonomousVmCluster. + private com.oracle.bmc.waiter.Waiter< + GetAutonomousVmClusterRequest, GetAutonomousVmClusterResponse> + forAutonomousVmCluster( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetAutonomousVmClusterRequest request, + final com.oracle.bmc.database.model.AutonomousVmCluster.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetAutonomousVmClusterRequest, GetAutonomousVmClusterResponse>() { + @Override + public GetAutonomousVmClusterResponse apply( + GetAutonomousVmClusterRequest request) { + return client.getAutonomousVmCluster(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetAutonomousVmClusterResponse response) { + return targetStatesSet.contains( + response.getAutonomousVmCluster().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.AutonomousVmCluster.LifecycleState + .Terminated)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forBackup( + GetBackupRequest request, + com.oracle.bmc.database.model.Backup.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forBackup( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forBackup( + GetBackupRequest request, + com.oracle.bmc.database.model.Backup.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forBackup( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forBackup( + GetBackupRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.Backup.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forBackup( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for Backup. + private com.oracle.bmc.waiter.Waiter forBackup( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetBackupRequest request, + final com.oracle.bmc.database.model.Backup.LifecycleState... targetStates) { + final java.util.Set targetStatesSet = + new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function() { + @Override + public GetBackupResponse apply(GetBackupRequest request) { + return client.getBackup(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetBackupResponse response) { + return targetStatesSet.contains( + response.getBackup().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.Backup.LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forBackupDestination( + GetBackupDestinationRequest request, + com.oracle.bmc.database.model.BackupDestination.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forBackupDestination( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forBackupDestination( + GetBackupDestinationRequest request, + com.oracle.bmc.database.model.BackupDestination.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forBackupDestination( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forBackupDestination( + GetBackupDestinationRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.BackupDestination.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forBackupDestination( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for BackupDestination. + private com.oracle.bmc.waiter.Waiter + forBackupDestination( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetBackupDestinationRequest request, + final com.oracle.bmc.database.model.BackupDestination.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetBackupDestinationRequest, GetBackupDestinationResponse>() { + @Override + public GetBackupDestinationResponse apply( + GetBackupDestinationRequest request) { + return client.getBackupDestination(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetBackupDestinationResponse response) { + return targetStatesSet.contains( + response.getBackupDestination().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.BackupDestination.LifecycleState + .Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetCloudAutonomousVmClusterRequest, GetCloudAutonomousVmClusterResponse> + forCloudAutonomousVmCluster( + GetCloudAutonomousVmClusterRequest request, + com.oracle.bmc.database.model.CloudAutonomousVmCluster.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forCloudAutonomousVmCluster( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetCloudAutonomousVmClusterRequest, GetCloudAutonomousVmClusterResponse> + forCloudAutonomousVmCluster( + GetCloudAutonomousVmClusterRequest request, + com.oracle.bmc.database.model.CloudAutonomousVmCluster.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forCloudAutonomousVmCluster( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetCloudAutonomousVmClusterRequest, GetCloudAutonomousVmClusterResponse> + forCloudAutonomousVmCluster( + GetCloudAutonomousVmClusterRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.CloudAutonomousVmCluster.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forCloudAutonomousVmCluster( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for CloudAutonomousVmCluster. + private com.oracle.bmc.waiter.Waiter< + GetCloudAutonomousVmClusterRequest, GetCloudAutonomousVmClusterResponse> + forCloudAutonomousVmCluster( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetCloudAutonomousVmClusterRequest request, + final com.oracle.bmc.database.model.CloudAutonomousVmCluster.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetCloudAutonomousVmClusterRequest, + GetCloudAutonomousVmClusterResponse>() { + @Override + public GetCloudAutonomousVmClusterResponse apply( + GetCloudAutonomousVmClusterRequest request) { + return client.getCloudAutonomousVmCluster(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetCloudAutonomousVmClusterResponse response) { + return targetStatesSet.contains( + response.getCloudAutonomousVmCluster().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.CloudAutonomousVmCluster + .LifecycleState.Terminated)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetCloudExadataInfrastructureRequest, GetCloudExadataInfrastructureResponse> + forCloudExadataInfrastructure( + GetCloudExadataInfrastructureRequest request, + com.oracle.bmc.database.model.CloudExadataInfrastructure.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forCloudExadataInfrastructure( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetCloudExadataInfrastructureRequest, GetCloudExadataInfrastructureResponse> + forCloudExadataInfrastructure( + GetCloudExadataInfrastructureRequest request, + com.oracle.bmc.database.model.CloudExadataInfrastructure.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forCloudExadataInfrastructure( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetCloudExadataInfrastructureRequest, GetCloudExadataInfrastructureResponse> + forCloudExadataInfrastructure( + GetCloudExadataInfrastructureRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.CloudExadataInfrastructure.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forCloudExadataInfrastructure( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for CloudExadataInfrastructure. + private com.oracle.bmc.waiter.Waiter< + GetCloudExadataInfrastructureRequest, GetCloudExadataInfrastructureResponse> + forCloudExadataInfrastructure( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetCloudExadataInfrastructureRequest request, + final com.oracle.bmc.database.model.CloudExadataInfrastructure.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetCloudExadataInfrastructureRequest, + GetCloudExadataInfrastructureResponse>() { + @Override + public GetCloudExadataInfrastructureResponse apply( + GetCloudExadataInfrastructureRequest request) { + return client.getCloudExadataInfrastructure(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetCloudExadataInfrastructureResponse response) { + return targetStatesSet.contains( + response.getCloudExadataInfrastructure() + .getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.CloudExadataInfrastructure + .LifecycleState.Terminated)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forCloudVmCluster( + GetCloudVmClusterRequest request, + com.oracle.bmc.database.model.CloudVmCluster.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forCloudVmCluster( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forCloudVmCluster( + GetCloudVmClusterRequest request, + com.oracle.bmc.database.model.CloudVmCluster.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forCloudVmCluster( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forCloudVmCluster( + GetCloudVmClusterRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.CloudVmCluster.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forCloudVmCluster( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for CloudVmCluster. + private com.oracle.bmc.waiter.Waiter + forCloudVmCluster( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetCloudVmClusterRequest request, + final com.oracle.bmc.database.model.CloudVmCluster.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetCloudVmClusterRequest, GetCloudVmClusterResponse>() { + @Override + public GetCloudVmClusterResponse apply( + GetCloudVmClusterRequest request) { + return client.getCloudVmCluster(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetCloudVmClusterResponse response) { + return targetStatesSet.contains( + response.getCloudVmCluster().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.CloudVmCluster.LifecycleState + .Terminated)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forConsoleConnection( + GetConsoleConnectionRequest request, + com.oracle.bmc.database.model.ConsoleConnection.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forConsoleConnection( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forConsoleConnection( + GetConsoleConnectionRequest request, + com.oracle.bmc.database.model.ConsoleConnection.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forConsoleConnection( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forConsoleConnection( + GetConsoleConnectionRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.ConsoleConnection.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forConsoleConnection( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for ConsoleConnection. + private com.oracle.bmc.waiter.Waiter + forConsoleConnection( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetConsoleConnectionRequest request, + final com.oracle.bmc.database.model.ConsoleConnection.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetConsoleConnectionRequest, GetConsoleConnectionResponse>() { + @Override + public GetConsoleConnectionResponse apply( + GetConsoleConnectionRequest request) { + return client.getConsoleConnection(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetConsoleConnectionResponse response) { + return targetStatesSet.contains( + response.getConsoleConnection().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.ConsoleConnection.LifecycleState + .Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forConsoleHistory( + GetConsoleHistoryRequest request, + com.oracle.bmc.database.model.ConsoleHistory.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forConsoleHistory( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forConsoleHistory( + GetConsoleHistoryRequest request, + com.oracle.bmc.database.model.ConsoleHistory.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forConsoleHistory( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forConsoleHistory( + GetConsoleHistoryRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.ConsoleHistory.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forConsoleHistory( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for ConsoleHistory. + private com.oracle.bmc.waiter.Waiter + forConsoleHistory( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetConsoleHistoryRequest request, + final com.oracle.bmc.database.model.ConsoleHistory.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetConsoleHistoryRequest, GetConsoleHistoryResponse>() { + @Override + public GetConsoleHistoryResponse apply( + GetConsoleHistoryRequest request) { + return client.getConsoleHistory(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetConsoleHistoryResponse response) { + return targetStatesSet.contains( + response.getConsoleHistory().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.ConsoleHistory.LifecycleState + .Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetDataGuardAssociationRequest, GetDataGuardAssociationResponse> + forDataGuardAssociation( + GetDataGuardAssociationRequest request, + com.oracle.bmc.database.model.DataGuardAssociation.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forDataGuardAssociation( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetDataGuardAssociationRequest, GetDataGuardAssociationResponse> + forDataGuardAssociation( + GetDataGuardAssociationRequest request, + com.oracle.bmc.database.model.DataGuardAssociation.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forDataGuardAssociation( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetDataGuardAssociationRequest, GetDataGuardAssociationResponse> + forDataGuardAssociation( + GetDataGuardAssociationRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.DataGuardAssociation.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forDataGuardAssociation( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for DataGuardAssociation. + private com.oracle.bmc.waiter.Waiter< + GetDataGuardAssociationRequest, GetDataGuardAssociationResponse> + forDataGuardAssociation( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetDataGuardAssociationRequest request, + final com.oracle.bmc.database.model.DataGuardAssociation.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetDataGuardAssociationRequest, GetDataGuardAssociationResponse>() { + @Override + public GetDataGuardAssociationResponse apply( + GetDataGuardAssociationRequest request) { + return client.getDataGuardAssociation(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetDataGuardAssociationResponse response) { + return targetStatesSet.contains( + response.getDataGuardAssociation().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.DataGuardAssociation.LifecycleState + .Terminated)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDatabase( + GetDatabaseRequest request, + com.oracle.bmc.database.model.Database.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forDatabase( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDatabase( + GetDatabaseRequest request, + com.oracle.bmc.database.model.Database.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forDatabase( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDatabase( + GetDatabaseRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.Database.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forDatabase( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for Database. + private com.oracle.bmc.waiter.Waiter forDatabase( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetDatabaseRequest request, + final com.oracle.bmc.database.model.Database.LifecycleState... targetStates) { + final java.util.Set targetStatesSet = + new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function() { + @Override + public GetDatabaseResponse apply(GetDatabaseRequest request) { + return client.getDatabase(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetDatabaseResponse response) { + return targetStatesSet.contains( + response.getDatabase().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.Database.LifecycleState.Terminated)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetDatabaseSoftwareImageRequest, GetDatabaseSoftwareImageResponse> + forDatabaseSoftwareImage( + GetDatabaseSoftwareImageRequest request, + com.oracle.bmc.database.model.DatabaseSoftwareImage.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forDatabaseSoftwareImage( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetDatabaseSoftwareImageRequest, GetDatabaseSoftwareImageResponse> + forDatabaseSoftwareImage( + GetDatabaseSoftwareImageRequest request, + com.oracle.bmc.database.model.DatabaseSoftwareImage.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forDatabaseSoftwareImage( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetDatabaseSoftwareImageRequest, GetDatabaseSoftwareImageResponse> + forDatabaseSoftwareImage( + GetDatabaseSoftwareImageRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.DatabaseSoftwareImage.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forDatabaseSoftwareImage( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for DatabaseSoftwareImage. + private com.oracle.bmc.waiter.Waiter< + GetDatabaseSoftwareImageRequest, GetDatabaseSoftwareImageResponse> + forDatabaseSoftwareImage( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetDatabaseSoftwareImageRequest request, + final com.oracle.bmc.database.model.DatabaseSoftwareImage.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetDatabaseSoftwareImageRequest, + GetDatabaseSoftwareImageResponse>() { + @Override + public GetDatabaseSoftwareImageResponse apply( + GetDatabaseSoftwareImageRequest request) { + return client.getDatabaseSoftwareImage(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetDatabaseSoftwareImageResponse response) { + return targetStatesSet.contains( + response.getDatabaseSoftwareImage().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.DatabaseSoftwareImage.LifecycleState + .Terminated)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetDatabaseUpgradeHistoryEntryRequest, GetDatabaseUpgradeHistoryEntryResponse> + forDatabaseUpgradeHistoryEntry( + GetDatabaseUpgradeHistoryEntryRequest request, + com.oracle.bmc.database.model.DatabaseUpgradeHistoryEntry.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forDatabaseUpgradeHistoryEntry( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetDatabaseUpgradeHistoryEntryRequest, GetDatabaseUpgradeHistoryEntryResponse> + forDatabaseUpgradeHistoryEntry( + GetDatabaseUpgradeHistoryEntryRequest request, + com.oracle.bmc.database.model.DatabaseUpgradeHistoryEntry.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forDatabaseUpgradeHistoryEntry( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetDatabaseUpgradeHistoryEntryRequest, GetDatabaseUpgradeHistoryEntryResponse> + forDatabaseUpgradeHistoryEntry( + GetDatabaseUpgradeHistoryEntryRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.DatabaseUpgradeHistoryEntry.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forDatabaseUpgradeHistoryEntry( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for DatabaseUpgradeHistoryEntry. + private com.oracle.bmc.waiter.Waiter< + GetDatabaseUpgradeHistoryEntryRequest, GetDatabaseUpgradeHistoryEntryResponse> + forDatabaseUpgradeHistoryEntry( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetDatabaseUpgradeHistoryEntryRequest request, + final com.oracle.bmc.database.model.DatabaseUpgradeHistoryEntry + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.database.model.DatabaseUpgradeHistoryEntry.LifecycleState> + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetDatabaseUpgradeHistoryEntryRequest, + GetDatabaseUpgradeHistoryEntryResponse>() { + @Override + public GetDatabaseUpgradeHistoryEntryResponse apply( + GetDatabaseUpgradeHistoryEntryRequest request) { + return client.getDatabaseUpgradeHistoryEntry(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetDatabaseUpgradeHistoryEntryResponse response) { + return targetStatesSet.contains( + response.getDatabaseUpgradeHistoryEntry() + .getLifecycleState()); + } + }, + false), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDbHome( + GetDbHomeRequest request, + com.oracle.bmc.database.model.DbHome.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forDbHome( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDbHome( + GetDbHomeRequest request, + com.oracle.bmc.database.model.DbHome.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forDbHome( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDbHome( + GetDbHomeRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.DbHome.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forDbHome( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for DbHome. + private com.oracle.bmc.waiter.Waiter forDbHome( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetDbHomeRequest request, + final com.oracle.bmc.database.model.DbHome.LifecycleState... targetStates) { + final java.util.Set targetStatesSet = + new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function() { + @Override + public GetDbHomeResponse apply(GetDbHomeRequest request) { + return client.getDbHome(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetDbHomeResponse response) { + return targetStatesSet.contains( + response.getDbHome().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.DbHome.LifecycleState.Terminated)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDbNode( + GetDbNodeRequest request, + com.oracle.bmc.database.model.DbNode.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forDbNode( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDbNode( + GetDbNodeRequest request, + com.oracle.bmc.database.model.DbNode.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forDbNode( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDbNode( + GetDbNodeRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.DbNode.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forDbNode( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for DbNode. + private com.oracle.bmc.waiter.Waiter forDbNode( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetDbNodeRequest request, + final com.oracle.bmc.database.model.DbNode.LifecycleState... targetStates) { + final java.util.Set targetStatesSet = + new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function() { + @Override + public GetDbNodeResponse apply(GetDbNodeRequest request) { + return client.getDbNode(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetDbNodeResponse response) { + return targetStatesSet.contains( + response.getDbNode().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.DbNode.LifecycleState.Terminated)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDbServer( + GetDbServerRequest request, + com.oracle.bmc.database.model.DbServer.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forDbServer( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDbServer( + GetDbServerRequest request, + com.oracle.bmc.database.model.DbServer.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forDbServer( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDbServer( + GetDbServerRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.DbServer.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forDbServer( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for DbServer. + private com.oracle.bmc.waiter.Waiter forDbServer( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetDbServerRequest request, + final com.oracle.bmc.database.model.DbServer.LifecycleState... targetStates) { + final java.util.Set targetStatesSet = + new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function() { + @Override + public GetDbServerResponse apply(GetDbServerRequest request) { + return client.getDbServer(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetDbServerResponse response) { + return targetStatesSet.contains( + response.getDbServer().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.DbServer.LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDbSystem( + GetDbSystemRequest request, + com.oracle.bmc.database.model.DbSystem.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forDbSystem( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDbSystem( + GetDbSystemRequest request, + com.oracle.bmc.database.model.DbSystem.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forDbSystem( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDbSystem( + GetDbSystemRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.DbSystem.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forDbSystem( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for DbSystem. + private com.oracle.bmc.waiter.Waiter forDbSystem( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetDbSystemRequest request, + final com.oracle.bmc.database.model.DbSystem.LifecycleState... targetStates) { + final java.util.Set targetStatesSet = + new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function() { + @Override + public GetDbSystemResponse apply(GetDbSystemRequest request) { + return client.getDbSystem(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetDbSystemResponse response) { + return targetStatesSet.contains( + response.getDbSystem().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.database.model.DbSystem.LifecycleState.Terminated)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetDbSystemUpgradeHistoryEntryRequest, GetDbSystemUpgradeHistoryEntryResponse> + forDbSystemUpgradeHistoryEntry( + GetDbSystemUpgradeHistoryEntryRequest request, + com.oracle.bmc.database.model.DbSystemUpgradeHistoryEntry.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forDbSystemUpgradeHistoryEntry( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetAutonomousVmClusterRequest, GetAutonomousVmClusterResponse> - forAutonomousVmCluster( - GetAutonomousVmClusterRequest request, + GetDbSystemUpgradeHistoryEntryRequest, GetDbSystemUpgradeHistoryEntryResponse> + forDbSystemUpgradeHistoryEntry( + GetDbSystemUpgradeHistoryEntryRequest request, + com.oracle.bmc.database.model.DbSystemUpgradeHistoryEntry.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forDbSystemUpgradeHistoryEntry( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetDbSystemUpgradeHistoryEntryRequest, GetDbSystemUpgradeHistoryEntryResponse> + forDbSystemUpgradeHistoryEntry( + GetDbSystemUpgradeHistoryEntryRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.AutonomousVmCluster.LifecycleState... + com.oracle.bmc.database.model.DbSystemUpgradeHistoryEntry.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forAutonomousVmCluster( + return forDbSystemUpgradeHistoryEntry( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for AutonomousVmCluster. + // Helper method to create a new Waiter for DbSystemUpgradeHistoryEntry. private com.oracle.bmc.waiter.Waiter< - GetAutonomousVmClusterRequest, GetAutonomousVmClusterResponse> - forAutonomousVmCluster( + GetDbSystemUpgradeHistoryEntryRequest, GetDbSystemUpgradeHistoryEntryResponse> + forDbSystemUpgradeHistoryEntry( com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetAutonomousVmClusterRequest request, - final com.oracle.bmc.database.model.AutonomousVmCluster.LifecycleState... + final GetDbSystemUpgradeHistoryEntryRequest request, + final com.oracle.bmc.database.model.DbSystemUpgradeHistoryEntry + .LifecycleState... targetStates) { - final java.util.Set + final java.util.Set< + com.oracle.bmc.database.model.DbSystemUpgradeHistoryEntry.LifecycleState> targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( @@ -8692,23 +11890,23 @@ public boolean test(GetAutonomousVirtualMachineResponse response) { waiter.toCallable( () -> request, new java.util.function.Function< - GetAutonomousVmClusterRequest, GetAutonomousVmClusterResponse>() { + GetDbSystemUpgradeHistoryEntryRequest, + GetDbSystemUpgradeHistoryEntryResponse>() { @Override - public GetAutonomousVmClusterResponse apply( - GetAutonomousVmClusterRequest request) { - return client.getAutonomousVmCluster(request); + public GetDbSystemUpgradeHistoryEntryResponse apply( + GetDbSystemUpgradeHistoryEntryRequest request) { + return client.getDbSystemUpgradeHistoryEntry(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetAutonomousVmClusterResponse response) { + public boolean test(GetDbSystemUpgradeHistoryEntryResponse response) { return targetStatesSet.contains( - response.getAutonomousVmCluster().getLifecycleState()); + response.getDbSystemUpgradeHistoryEntry() + .getLifecycleState()); } }, - targetStatesSet.contains( - com.oracle.bmc.database.model.AutonomousVmCluster.LifecycleState - .Terminated)), + false), request); } @@ -8719,15 +11917,18 @@ public boolean test(GetAutonomousVmClusterResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forBackup( - GetBackupRequest request, - com.oracle.bmc.database.model.Backup.LifecycleState... targetStates) { + public com.oracle.bmc.waiter.Waiter< + GetExadataInfrastructureRequest, GetExadataInfrastructureResponse> + forExadataInfrastructure( + GetExadataInfrastructureRequest request, + com.oracle.bmc.database.model.ExadataInfrastructure.LifecycleState... + targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forBackup( + return forExadataInfrastructure( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -8740,15 +11941,17 @@ public com.oracle.bmc.waiter.Waiter forBack * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forBackup( - GetBackupRequest request, - com.oracle.bmc.database.model.Backup.LifecycleState targetState, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter< + GetExadataInfrastructureRequest, GetExadataInfrastructureResponse> + forExadataInfrastructure( + GetExadataInfrastructureRequest request, + com.oracle.bmc.database.model.ExadataInfrastructure.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forBackup( + return forExadataInfrastructure( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -8762,50 +11965,60 @@ public com.oracle.bmc.waiter.Waiter forBack * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance - */ - public com.oracle.bmc.waiter.Waiter forBackup( - GetBackupRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.Backup.LifecycleState... targetStates) { + */ + public com.oracle.bmc.waiter.Waiter< + GetExadataInfrastructureRequest, GetExadataInfrastructureResponse> + forExadataInfrastructure( + GetExadataInfrastructureRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.ExadataInfrastructure.LifecycleState... + targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forBackup( + return forExadataInfrastructure( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for Backup. - private com.oracle.bmc.waiter.Waiter forBackup( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetBackupRequest request, - final com.oracle.bmc.database.model.Backup.LifecycleState... targetStates) { - final java.util.Set targetStatesSet = - new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + // Helper method to create a new Waiter for ExadataInfrastructure. + private com.oracle.bmc.waiter.Waiter< + GetExadataInfrastructureRequest, GetExadataInfrastructureResponse> + forExadataInfrastructure( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetExadataInfrastructureRequest request, + final com.oracle.bmc.database.model.ExadataInfrastructure.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, waiter.toCallable( () -> request, - new java.util.function.Function() { + new java.util.function.Function< + GetExadataInfrastructureRequest, + GetExadataInfrastructureResponse>() { @Override - public GetBackupResponse apply(GetBackupRequest request) { - return client.getBackup(request); + public GetExadataInfrastructureResponse apply( + GetExadataInfrastructureRequest request) { + return client.getExadataInfrastructure(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetBackupResponse response) { + public boolean test(GetExadataInfrastructureResponse response) { return targetStatesSet.contains( - response.getBackup().getLifecycleState()); + response.getExadataInfrastructure().getLifecycleState()); } }, targetStatesSet.contains( - com.oracle.bmc.database.model.Backup.LifecycleState.Deleted)), + com.oracle.bmc.database.model.ExadataInfrastructure.LifecycleState + .Deleted)), request); } @@ -8816,17 +12029,17 @@ public boolean test(GetBackupResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forBackupDestination( - GetBackupDestinationRequest request, - com.oracle.bmc.database.model.BackupDestination.LifecycleState... + public com.oracle.bmc.waiter.Waiter + forExadataIormConfig( + GetExadataIormConfigRequest request, + com.oracle.bmc.database.model.ExadataIormConfig.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forBackupDestination( + return forExadataIormConfig( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -8839,16 +12052,16 @@ public boolean test(GetBackupResponse response) { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forBackupDestination( - GetBackupDestinationRequest request, - com.oracle.bmc.database.model.BackupDestination.LifecycleState targetState, + public com.oracle.bmc.waiter.Waiter + forExadataIormConfig( + GetExadataIormConfigRequest request, + com.oracle.bmc.database.model.ExadataIormConfig.LifecycleState targetState, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forBackupDestination( + return forExadataIormConfig( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -8863,32 +12076,32 @@ public boolean test(GetBackupResponse response) { * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forBackupDestination( - GetBackupDestinationRequest request, + public com.oracle.bmc.waiter.Waiter + forExadataIormConfig( + GetExadataIormConfigRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.BackupDestination.LifecycleState... + com.oracle.bmc.database.model.ExadataIormConfig.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forBackupDestination( + return forExadataIormConfig( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for BackupDestination. - private com.oracle.bmc.waiter.Waiter - forBackupDestination( + // Helper method to create a new Waiter for ExadataIormConfig. + private com.oracle.bmc.waiter.Waiter + forExadataIormConfig( com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetBackupDestinationRequest request, - final com.oracle.bmc.database.model.BackupDestination.LifecycleState... + final GetExadataIormConfigRequest request, + final com.oracle.bmc.database.model.ExadataIormConfig.LifecycleState... targetStates) { - final java.util.Set + final java.util.Set targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( @@ -8896,23 +12109,21 @@ public boolean test(GetBackupResponse response) { waiter.toCallable( () -> request, new java.util.function.Function< - GetBackupDestinationRequest, GetBackupDestinationResponse>() { + GetExadataIormConfigRequest, GetExadataIormConfigResponse>() { @Override - public GetBackupDestinationResponse apply( - GetBackupDestinationRequest request) { - return client.getBackupDestination(request); + public GetExadataIormConfigResponse apply( + GetExadataIormConfigRequest request) { + return client.getExadataIormConfig(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetBackupDestinationResponse response) { + public boolean test(GetExadataIormConfigResponse response) { return targetStatesSet.contains( - response.getBackupDestination().getLifecycleState()); + response.getExadataIormConfig().getLifecycleState()); } }, - targetStatesSet.contains( - com.oracle.bmc.database.model.BackupDestination.LifecycleState - .Deleted)), + false), request); } @@ -8923,18 +12134,16 @@ public boolean test(GetBackupDestinationResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetCloudAutonomousVmClusterRequest, GetCloudAutonomousVmClusterResponse> - forCloudAutonomousVmCluster( - GetCloudAutonomousVmClusterRequest request, - com.oracle.bmc.database.model.CloudAutonomousVmCluster.LifecycleState... - targetStates) { + public com.oracle.bmc.waiter.Waiter + forExadbVmCluster( + GetExadbVmClusterRequest request, + com.oracle.bmc.database.model.ExadbVmCluster.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forCloudAutonomousVmCluster( + return forExadbVmCluster( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -8947,18 +12156,16 @@ public boolean test(GetBackupDestinationResponse response) { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetCloudAutonomousVmClusterRequest, GetCloudAutonomousVmClusterResponse> - forCloudAutonomousVmCluster( - GetCloudAutonomousVmClusterRequest request, - com.oracle.bmc.database.model.CloudAutonomousVmCluster.LifecycleState - targetState, + public com.oracle.bmc.waiter.Waiter + forExadbVmCluster( + GetExadbVmClusterRequest request, + com.oracle.bmc.database.model.ExadbVmCluster.LifecycleState targetState, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forCloudAutonomousVmCluster( + return forExadbVmCluster( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -8973,34 +12180,31 @@ public boolean test(GetBackupDestinationResponse response) { * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetCloudAutonomousVmClusterRequest, GetCloudAutonomousVmClusterResponse> - forCloudAutonomousVmCluster( - GetCloudAutonomousVmClusterRequest request, + public com.oracle.bmc.waiter.Waiter + forExadbVmCluster( + GetExadbVmClusterRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.CloudAutonomousVmCluster.LifecycleState... - targetStates) { + com.oracle.bmc.database.model.ExadbVmCluster.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forCloudAutonomousVmCluster( + return forExadbVmCluster( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for CloudAutonomousVmCluster. - private com.oracle.bmc.waiter.Waiter< - GetCloudAutonomousVmClusterRequest, GetCloudAutonomousVmClusterResponse> - forCloudAutonomousVmCluster( + // Helper method to create a new Waiter for ExadbVmCluster. + private com.oracle.bmc.waiter.Waiter + forExadbVmCluster( com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetCloudAutonomousVmClusterRequest request, - final com.oracle.bmc.database.model.CloudAutonomousVmCluster.LifecycleState... + final GetExadbVmClusterRequest request, + final com.oracle.bmc.database.model.ExadbVmCluster.LifecycleState... targetStates) { - final java.util.Set + final java.util.Set targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( @@ -9008,24 +12212,23 @@ public boolean test(GetBackupDestinationResponse response) { waiter.toCallable( () -> request, new java.util.function.Function< - GetCloudAutonomousVmClusterRequest, - GetCloudAutonomousVmClusterResponse>() { + GetExadbVmClusterRequest, GetExadbVmClusterResponse>() { @Override - public GetCloudAutonomousVmClusterResponse apply( - GetCloudAutonomousVmClusterRequest request) { - return client.getCloudAutonomousVmCluster(request); + public GetExadbVmClusterResponse apply( + GetExadbVmClusterRequest request) { + return client.getExadbVmCluster(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetCloudAutonomousVmClusterResponse response) { + public boolean test(GetExadbVmClusterResponse response) { return targetStatesSet.contains( - response.getCloudAutonomousVmCluster().getLifecycleState()); + response.getExadbVmCluster().getLifecycleState()); } }, targetStatesSet.contains( - com.oracle.bmc.database.model.CloudAutonomousVmCluster - .LifecycleState.Terminated)), + com.oracle.bmc.database.model.ExadbVmCluster.LifecycleState + .Terminated)), request); } @@ -9037,17 +12240,17 @@ public boolean test(GetCloudAutonomousVmClusterResponse response) { * @return a new {@code Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetCloudExadataInfrastructureRequest, GetCloudExadataInfrastructureResponse> - forCloudExadataInfrastructure( - GetCloudExadataInfrastructureRequest request, - com.oracle.bmc.database.model.CloudExadataInfrastructure.LifecycleState... + GetExadbVmClusterUpdateRequest, GetExadbVmClusterUpdateResponse> + forExadbVmClusterUpdate( + GetExadbVmClusterUpdateRequest request, + com.oracle.bmc.database.model.ExadbVmClusterUpdate.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forCloudExadataInfrastructure( + return forExadbVmClusterUpdate( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -9061,17 +12264,16 @@ public boolean test(GetCloudAutonomousVmClusterResponse response) { * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetCloudExadataInfrastructureRequest, GetCloudExadataInfrastructureResponse> - forCloudExadataInfrastructure( - GetCloudExadataInfrastructureRequest request, - com.oracle.bmc.database.model.CloudExadataInfrastructure.LifecycleState - targetState, + GetExadbVmClusterUpdateRequest, GetExadbVmClusterUpdateResponse> + forExadbVmClusterUpdate( + GetExadbVmClusterUpdateRequest request, + com.oracle.bmc.database.model.ExadbVmClusterUpdate.LifecycleState targetState, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forCloudExadataInfrastructure( + return forExadbVmClusterUpdate( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -9087,33 +12289,33 @@ public boolean test(GetCloudAutonomousVmClusterResponse response) { * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetCloudExadataInfrastructureRequest, GetCloudExadataInfrastructureResponse> - forCloudExadataInfrastructure( - GetCloudExadataInfrastructureRequest request, + GetExadbVmClusterUpdateRequest, GetExadbVmClusterUpdateResponse> + forExadbVmClusterUpdate( + GetExadbVmClusterUpdateRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.CloudExadataInfrastructure.LifecycleState... + com.oracle.bmc.database.model.ExadbVmClusterUpdate.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forCloudExadataInfrastructure( + return forExadbVmClusterUpdate( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for CloudExadataInfrastructure. + // Helper method to create a new Waiter for ExadbVmClusterUpdate. private com.oracle.bmc.waiter.Waiter< - GetCloudExadataInfrastructureRequest, GetCloudExadataInfrastructureResponse> - forCloudExadataInfrastructure( + GetExadbVmClusterUpdateRequest, GetExadbVmClusterUpdateResponse> + forExadbVmClusterUpdate( com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetCloudExadataInfrastructureRequest request, - final com.oracle.bmc.database.model.CloudExadataInfrastructure.LifecycleState... + final GetExadbVmClusterUpdateRequest request, + final com.oracle.bmc.database.model.ExadbVmClusterUpdate.LifecycleState... targetStates) { - final java.util.Set + final java.util.Set targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( @@ -9121,25 +12323,21 @@ public boolean test(GetCloudAutonomousVmClusterResponse response) { waiter.toCallable( () -> request, new java.util.function.Function< - GetCloudExadataInfrastructureRequest, - GetCloudExadataInfrastructureResponse>() { + GetExadbVmClusterUpdateRequest, GetExadbVmClusterUpdateResponse>() { @Override - public GetCloudExadataInfrastructureResponse apply( - GetCloudExadataInfrastructureRequest request) { - return client.getCloudExadataInfrastructure(request); + public GetExadbVmClusterUpdateResponse apply( + GetExadbVmClusterUpdateRequest request) { + return client.getExadbVmClusterUpdate(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetCloudExadataInfrastructureResponse response) { + public boolean test(GetExadbVmClusterUpdateResponse response) { return targetStatesSet.contains( - response.getCloudExadataInfrastructure() - .getLifecycleState()); + response.getExadbVmClusterUpdate().getLifecycleState()); } }, - targetStatesSet.contains( - com.oracle.bmc.database.model.CloudExadataInfrastructure - .LifecycleState.Terminated)), + false), request); } @@ -9150,16 +12348,19 @@ public boolean test(GetCloudExadataInfrastructureResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forCloudVmCluster( - GetCloudVmClusterRequest request, - com.oracle.bmc.database.model.CloudVmCluster.LifecycleState... targetStates) { + public com.oracle.bmc.waiter.Waiter< + GetExadbVmClusterUpdateHistoryEntryRequest, + GetExadbVmClusterUpdateHistoryEntryResponse> + forExadbVmClusterUpdateHistoryEntry( + GetExadbVmClusterUpdateHistoryEntryRequest request, + com.oracle.bmc.database.model.ExadbVmClusterUpdateHistoryEntry.LifecycleState... + targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forCloudVmCluster( + return forExadbVmClusterUpdateHistoryEntry( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -9172,16 +12373,19 @@ public boolean test(GetCloudExadataInfrastructureResponse response) { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forCloudVmCluster( - GetCloudVmClusterRequest request, - com.oracle.bmc.database.model.CloudVmCluster.LifecycleState targetState, + public com.oracle.bmc.waiter.Waiter< + GetExadbVmClusterUpdateHistoryEntryRequest, + GetExadbVmClusterUpdateHistoryEntryResponse> + forExadbVmClusterUpdateHistoryEntry( + GetExadbVmClusterUpdateHistoryEntryRequest request, + com.oracle.bmc.database.model.ExadbVmClusterUpdateHistoryEntry.LifecycleState + targetState, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forCloudVmCluster( + return forExadbVmClusterUpdateHistoryEntry( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -9196,31 +12400,39 @@ public boolean test(GetCloudExadataInfrastructureResponse response) { * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forCloudVmCluster( - GetCloudVmClusterRequest request, + public com.oracle.bmc.waiter.Waiter< + GetExadbVmClusterUpdateHistoryEntryRequest, + GetExadbVmClusterUpdateHistoryEntryResponse> + forExadbVmClusterUpdateHistoryEntry( + GetExadbVmClusterUpdateHistoryEntryRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.CloudVmCluster.LifecycleState... targetStates) { + com.oracle.bmc.database.model.ExadbVmClusterUpdateHistoryEntry.LifecycleState... + targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forCloudVmCluster( + return forExadbVmClusterUpdateHistoryEntry( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for CloudVmCluster. - private com.oracle.bmc.waiter.Waiter - forCloudVmCluster( + // Helper method to create a new Waiter for ExadbVmClusterUpdateHistoryEntry. + private com.oracle.bmc.waiter.Waiter< + GetExadbVmClusterUpdateHistoryEntryRequest, + GetExadbVmClusterUpdateHistoryEntryResponse> + forExadbVmClusterUpdateHistoryEntry( com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetCloudVmClusterRequest request, - final com.oracle.bmc.database.model.CloudVmCluster.LifecycleState... + final GetExadbVmClusterUpdateHistoryEntryRequest request, + final com.oracle.bmc.database.model.ExadbVmClusterUpdateHistoryEntry + .LifecycleState... targetStates) { - final java.util.Set + final java.util.Set< + com.oracle.bmc.database.model.ExadbVmClusterUpdateHistoryEntry + .LifecycleState> targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( @@ -9228,23 +12440,25 @@ public boolean test(GetCloudExadataInfrastructureResponse response) { waiter.toCallable( () -> request, new java.util.function.Function< - GetCloudVmClusterRequest, GetCloudVmClusterResponse>() { + GetExadbVmClusterUpdateHistoryEntryRequest, + GetExadbVmClusterUpdateHistoryEntryResponse>() { @Override - public GetCloudVmClusterResponse apply( - GetCloudVmClusterRequest request) { - return client.getCloudVmCluster(request); + public GetExadbVmClusterUpdateHistoryEntryResponse apply( + GetExadbVmClusterUpdateHistoryEntryRequest request) { + return client.getExadbVmClusterUpdateHistoryEntry(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate< + GetExadbVmClusterUpdateHistoryEntryResponse>() { @Override - public boolean test(GetCloudVmClusterResponse response) { + public boolean test( + GetExadbVmClusterUpdateHistoryEntryResponse response) { return targetStatesSet.contains( - response.getCloudVmCluster().getLifecycleState()); + response.getExadbVmClusterUpdateHistoryEntry() + .getLifecycleState()); } }, - targetStatesSet.contains( - com.oracle.bmc.database.model.CloudVmCluster.LifecycleState - .Terminated)), + false), request); } @@ -9255,17 +12469,18 @@ public boolean test(GetCloudVmClusterResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forConsoleConnection( - GetConsoleConnectionRequest request, - com.oracle.bmc.database.model.ConsoleConnection.LifecycleState... + public com.oracle.bmc.waiter.Waiter< + GetExascaleDbStorageVaultRequest, GetExascaleDbStorageVaultResponse> + forExascaleDbStorageVault( + GetExascaleDbStorageVaultRequest request, + com.oracle.bmc.database.model.ExascaleDbStorageVault.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forConsoleConnection( + return forExascaleDbStorageVault( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -9278,16 +12493,17 @@ public boolean test(GetCloudVmClusterResponse response) { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forConsoleConnection( - GetConsoleConnectionRequest request, - com.oracle.bmc.database.model.ConsoleConnection.LifecycleState targetState, + public com.oracle.bmc.waiter.Waiter< + GetExascaleDbStorageVaultRequest, GetExascaleDbStorageVaultResponse> + forExascaleDbStorageVault( + GetExascaleDbStorageVaultRequest request, + com.oracle.bmc.database.model.ExascaleDbStorageVault.LifecycleState targetState, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forConsoleConnection( + return forExascaleDbStorageVault( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -9302,32 +12518,34 @@ public boolean test(GetCloudVmClusterResponse response) { * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forConsoleConnection( - GetConsoleConnectionRequest request, + public com.oracle.bmc.waiter.Waiter< + GetExascaleDbStorageVaultRequest, GetExascaleDbStorageVaultResponse> + forExascaleDbStorageVault( + GetExascaleDbStorageVaultRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.ConsoleConnection.LifecycleState... + com.oracle.bmc.database.model.ExascaleDbStorageVault.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forConsoleConnection( + return forExascaleDbStorageVault( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for ConsoleConnection. - private com.oracle.bmc.waiter.Waiter - forConsoleConnection( + // Helper method to create a new Waiter for ExascaleDbStorageVault. + private com.oracle.bmc.waiter.Waiter< + GetExascaleDbStorageVaultRequest, GetExascaleDbStorageVaultResponse> + forExascaleDbStorageVault( com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetConsoleConnectionRequest request, - final com.oracle.bmc.database.model.ConsoleConnection.LifecycleState... + final GetExascaleDbStorageVaultRequest request, + final com.oracle.bmc.database.model.ExascaleDbStorageVault.LifecycleState... targetStates) { - final java.util.Set + final java.util.Set targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( @@ -9335,23 +12553,24 @@ public boolean test(GetCloudVmClusterResponse response) { waiter.toCallable( () -> request, new java.util.function.Function< - GetConsoleConnectionRequest, GetConsoleConnectionResponse>() { + GetExascaleDbStorageVaultRequest, + GetExascaleDbStorageVaultResponse>() { @Override - public GetConsoleConnectionResponse apply( - GetConsoleConnectionRequest request) { - return client.getConsoleConnection(request); + public GetExascaleDbStorageVaultResponse apply( + GetExascaleDbStorageVaultRequest request) { + return client.getExascaleDbStorageVault(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetConsoleConnectionResponse response) { + public boolean test(GetExascaleDbStorageVaultResponse response) { return targetStatesSet.contains( - response.getConsoleConnection().getLifecycleState()); + response.getExascaleDbStorageVault().getLifecycleState()); } }, targetStatesSet.contains( - com.oracle.bmc.database.model.ConsoleConnection.LifecycleState - .Deleted)), + com.oracle.bmc.database.model.ExascaleDbStorageVault.LifecycleState + .Terminated)), request); } @@ -9362,16 +12581,16 @@ public boolean test(GetConsoleConnectionResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forConsoleHistory( - GetConsoleHistoryRequest request, - com.oracle.bmc.database.model.ConsoleHistory.LifecycleState... targetStates) { + public com.oracle.bmc.waiter.Waiter + forExecutionAction( + GetExecutionActionRequest request, + com.oracle.bmc.database.model.ExecutionAction.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forConsoleHistory( + return forExecutionAction( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -9384,16 +12603,16 @@ public boolean test(GetConsoleConnectionResponse response) { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forConsoleHistory( - GetConsoleHistoryRequest request, - com.oracle.bmc.database.model.ConsoleHistory.LifecycleState targetState, + public com.oracle.bmc.waiter.Waiter + forExecutionAction( + GetExecutionActionRequest request, + com.oracle.bmc.database.model.ExecutionAction.LifecycleState targetState, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forConsoleHistory( + return forExecutionAction( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -9408,31 +12627,31 @@ public boolean test(GetConsoleConnectionResponse response) { * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forConsoleHistory( - GetConsoleHistoryRequest request, + public com.oracle.bmc.waiter.Waiter + forExecutionAction( + GetExecutionActionRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.ConsoleHistory.LifecycleState... targetStates) { + com.oracle.bmc.database.model.ExecutionAction.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forConsoleHistory( + return forExecutionAction( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for ConsoleHistory. - private com.oracle.bmc.waiter.Waiter - forConsoleHistory( + // Helper method to create a new Waiter for ExecutionAction. + private com.oracle.bmc.waiter.Waiter + forExecutionAction( com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetConsoleHistoryRequest request, - final com.oracle.bmc.database.model.ConsoleHistory.LifecycleState... + final GetExecutionActionRequest request, + final com.oracle.bmc.database.model.ExecutionAction.LifecycleState... targetStates) { - final java.util.Set + final java.util.Set targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( @@ -9440,22 +12659,22 @@ public boolean test(GetConsoleConnectionResponse response) { waiter.toCallable( () -> request, new java.util.function.Function< - GetConsoleHistoryRequest, GetConsoleHistoryResponse>() { + GetExecutionActionRequest, GetExecutionActionResponse>() { @Override - public GetConsoleHistoryResponse apply( - GetConsoleHistoryRequest request) { - return client.getConsoleHistory(request); + public GetExecutionActionResponse apply( + GetExecutionActionRequest request) { + return client.getExecutionAction(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetConsoleHistoryResponse response) { + public boolean test(GetExecutionActionResponse response) { return targetStatesSet.contains( - response.getConsoleHistory().getLifecycleState()); + response.getExecutionAction().getLifecycleState()); } }, targetStatesSet.contains( - com.oracle.bmc.database.model.ConsoleHistory.LifecycleState + com.oracle.bmc.database.model.ExecutionAction.LifecycleState .Deleted)), request); } @@ -9467,18 +12686,16 @@ public boolean test(GetConsoleHistoryResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetDataGuardAssociationRequest, GetDataGuardAssociationResponse> - forDataGuardAssociation( - GetDataGuardAssociationRequest request, - com.oracle.bmc.database.model.DataGuardAssociation.LifecycleState... - targetStates) { + public com.oracle.bmc.waiter.Waiter + forExecutionWindow( + GetExecutionWindowRequest request, + com.oracle.bmc.database.model.ExecutionWindow.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forDataGuardAssociation( + return forExecutionWindow( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -9491,17 +12708,16 @@ public boolean test(GetConsoleHistoryResponse response) { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetDataGuardAssociationRequest, GetDataGuardAssociationResponse> - forDataGuardAssociation( - GetDataGuardAssociationRequest request, - com.oracle.bmc.database.model.DataGuardAssociation.LifecycleState targetState, + public com.oracle.bmc.waiter.Waiter + forExecutionWindow( + GetExecutionWindowRequest request, + com.oracle.bmc.database.model.ExecutionWindow.LifecycleState targetState, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forDataGuardAssociation( + return forExecutionWindow( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -9516,34 +12732,31 @@ public boolean test(GetConsoleHistoryResponse response) { * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetDataGuardAssociationRequest, GetDataGuardAssociationResponse> - forDataGuardAssociation( - GetDataGuardAssociationRequest request, + public com.oracle.bmc.waiter.Waiter + forExecutionWindow( + GetExecutionWindowRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.DataGuardAssociation.LifecycleState... - targetStates) { + com.oracle.bmc.database.model.ExecutionWindow.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forDataGuardAssociation( + return forExecutionWindow( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for DataGuardAssociation. - private com.oracle.bmc.waiter.Waiter< - GetDataGuardAssociationRequest, GetDataGuardAssociationResponse> - forDataGuardAssociation( + // Helper method to create a new Waiter for ExecutionWindow. + private com.oracle.bmc.waiter.Waiter + forExecutionWindow( com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetDataGuardAssociationRequest request, - final com.oracle.bmc.database.model.DataGuardAssociation.LifecycleState... + final GetExecutionWindowRequest request, + final com.oracle.bmc.database.model.ExecutionWindow.LifecycleState... targetStates) { - final java.util.Set + final java.util.Set targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( @@ -9551,23 +12764,23 @@ public boolean test(GetConsoleHistoryResponse response) { waiter.toCallable( () -> request, new java.util.function.Function< - GetDataGuardAssociationRequest, GetDataGuardAssociationResponse>() { + GetExecutionWindowRequest, GetExecutionWindowResponse>() { @Override - public GetDataGuardAssociationResponse apply( - GetDataGuardAssociationRequest request) { - return client.getDataGuardAssociation(request); + public GetExecutionWindowResponse apply( + GetExecutionWindowRequest request) { + return client.getExecutionWindow(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetDataGuardAssociationResponse response) { + public boolean test(GetExecutionWindowResponse response) { return targetStatesSet.contains( - response.getDataGuardAssociation().getLifecycleState()); + response.getExecutionWindow().getLifecycleState()); } }, targetStatesSet.contains( - com.oracle.bmc.database.model.DataGuardAssociation.LifecycleState - .Terminated)), + com.oracle.bmc.database.model.ExecutionWindow.LifecycleState + .Deleted)), request); } @@ -9578,15 +12791,18 @@ public boolean test(GetDataGuardAssociationResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDatabase( - GetDatabaseRequest request, - com.oracle.bmc.database.model.Database.LifecycleState... targetStates) { + public com.oracle.bmc.waiter.Waiter< + GetExternalContainerDatabaseRequest, GetExternalContainerDatabaseResponse> + forExternalContainerDatabase( + GetExternalContainerDatabaseRequest request, + com.oracle.bmc.database.model.ExternalContainerDatabase.LifecycleState... + targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forDatabase( + return forExternalContainerDatabase( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -9599,15 +12815,18 @@ public com.oracle.bmc.waiter.Waiter for * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDatabase( - GetDatabaseRequest request, - com.oracle.bmc.database.model.Database.LifecycleState targetState, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter< + GetExternalContainerDatabaseRequest, GetExternalContainerDatabaseResponse> + forExternalContainerDatabase( + GetExternalContainerDatabaseRequest request, + com.oracle.bmc.database.model.ExternalContainerDatabase.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forDatabase( + return forExternalContainerDatabase( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -9622,49 +12841,60 @@ public com.oracle.bmc.waiter.Waiter for * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDatabase( - GetDatabaseRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.Database.LifecycleState... targetStates) { + public com.oracle.bmc.waiter.Waiter< + GetExternalContainerDatabaseRequest, GetExternalContainerDatabaseResponse> + forExternalContainerDatabase( + GetExternalContainerDatabaseRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.ExternalContainerDatabase.LifecycleState... + targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forDatabase( + return forExternalContainerDatabase( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for Database. - private com.oracle.bmc.waiter.Waiter forDatabase( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetDatabaseRequest request, - final com.oracle.bmc.database.model.Database.LifecycleState... targetStates) { - final java.util.Set targetStatesSet = - new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + // Helper method to create a new Waiter for ExternalContainerDatabase. + private com.oracle.bmc.waiter.Waiter< + GetExternalContainerDatabaseRequest, GetExternalContainerDatabaseResponse> + forExternalContainerDatabase( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetExternalContainerDatabaseRequest request, + final com.oracle.bmc.database.model.ExternalContainerDatabase.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, waiter.toCallable( () -> request, - new java.util.function.Function() { + new java.util.function.Function< + GetExternalContainerDatabaseRequest, + GetExternalContainerDatabaseResponse>() { @Override - public GetDatabaseResponse apply(GetDatabaseRequest request) { - return client.getDatabase(request); + public GetExternalContainerDatabaseResponse apply( + GetExternalContainerDatabaseRequest request) { + return client.getExternalContainerDatabase(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetDatabaseResponse response) { + public boolean test(GetExternalContainerDatabaseResponse response) { return targetStatesSet.contains( - response.getDatabase().getLifecycleState()); + response.getExternalContainerDatabase() + .getLifecycleState()); } }, targetStatesSet.contains( - com.oracle.bmc.database.model.Database.LifecycleState.Terminated)), + com.oracle.bmc.database.model.ExternalContainerDatabase + .LifecycleState.Terminated)), request); } @@ -9676,17 +12906,17 @@ public boolean test(GetDatabaseResponse response) { * @return a new {@code Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetDatabaseSoftwareImageRequest, GetDatabaseSoftwareImageResponse> - forDatabaseSoftwareImage( - GetDatabaseSoftwareImageRequest request, - com.oracle.bmc.database.model.DatabaseSoftwareImage.LifecycleState... + GetExternalDatabaseConnectorRequest, GetExternalDatabaseConnectorResponse> + forExternalDatabaseConnector( + GetExternalDatabaseConnectorRequest request, + com.oracle.bmc.database.model.ExternalDatabaseConnector.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forDatabaseSoftwareImage( + return forExternalDatabaseConnector( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -9700,16 +12930,17 @@ public boolean test(GetDatabaseResponse response) { * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetDatabaseSoftwareImageRequest, GetDatabaseSoftwareImageResponse> - forDatabaseSoftwareImage( - GetDatabaseSoftwareImageRequest request, - com.oracle.bmc.database.model.DatabaseSoftwareImage.LifecycleState targetState, + GetExternalDatabaseConnectorRequest, GetExternalDatabaseConnectorResponse> + forExternalDatabaseConnector( + GetExternalDatabaseConnectorRequest request, + com.oracle.bmc.database.model.ExternalDatabaseConnector.LifecycleState + targetState, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forDatabaseSoftwareImage( + return forExternalDatabaseConnector( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -9725,33 +12956,33 @@ public boolean test(GetDatabaseResponse response) { * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetDatabaseSoftwareImageRequest, GetDatabaseSoftwareImageResponse> - forDatabaseSoftwareImage( - GetDatabaseSoftwareImageRequest request, + GetExternalDatabaseConnectorRequest, GetExternalDatabaseConnectorResponse> + forExternalDatabaseConnector( + GetExternalDatabaseConnectorRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.DatabaseSoftwareImage.LifecycleState... + com.oracle.bmc.database.model.ExternalDatabaseConnector.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forDatabaseSoftwareImage( + return forExternalDatabaseConnector( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for DatabaseSoftwareImage. + // Helper method to create a new Waiter for ExternalDatabaseConnector. private com.oracle.bmc.waiter.Waiter< - GetDatabaseSoftwareImageRequest, GetDatabaseSoftwareImageResponse> - forDatabaseSoftwareImage( + GetExternalDatabaseConnectorRequest, GetExternalDatabaseConnectorResponse> + forExternalDatabaseConnector( com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetDatabaseSoftwareImageRequest request, - final com.oracle.bmc.database.model.DatabaseSoftwareImage.LifecycleState... + final GetExternalDatabaseConnectorRequest request, + final com.oracle.bmc.database.model.ExternalDatabaseConnector.LifecycleState... targetStates) { - final java.util.Set + final java.util.Set targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( @@ -9759,24 +12990,25 @@ public boolean test(GetDatabaseResponse response) { waiter.toCallable( () -> request, new java.util.function.Function< - GetDatabaseSoftwareImageRequest, - GetDatabaseSoftwareImageResponse>() { + GetExternalDatabaseConnectorRequest, + GetExternalDatabaseConnectorResponse>() { @Override - public GetDatabaseSoftwareImageResponse apply( - GetDatabaseSoftwareImageRequest request) { - return client.getDatabaseSoftwareImage(request); + public GetExternalDatabaseConnectorResponse apply( + GetExternalDatabaseConnectorRequest request) { + return client.getExternalDatabaseConnector(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetDatabaseSoftwareImageResponse response) { + public boolean test(GetExternalDatabaseConnectorResponse response) { return targetStatesSet.contains( - response.getDatabaseSoftwareImage().getLifecycleState()); + response.getExternalDatabaseConnector() + .getLifecycleState()); } }, targetStatesSet.contains( - com.oracle.bmc.database.model.DatabaseSoftwareImage.LifecycleState - .Terminated)), + com.oracle.bmc.database.model.ExternalDatabaseConnector + .LifecycleState.Terminated)), request); } @@ -9788,17 +13020,17 @@ public boolean test(GetDatabaseSoftwareImageResponse response) { * @return a new {@code Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetDatabaseUpgradeHistoryEntryRequest, GetDatabaseUpgradeHistoryEntryResponse> - forDatabaseUpgradeHistoryEntry( - GetDatabaseUpgradeHistoryEntryRequest request, - com.oracle.bmc.database.model.DatabaseUpgradeHistoryEntry.LifecycleState... + GetExternalNonContainerDatabaseRequest, GetExternalNonContainerDatabaseResponse> + forExternalNonContainerDatabase( + GetExternalNonContainerDatabaseRequest request, + com.oracle.bmc.database.model.ExternalNonContainerDatabase.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forDatabaseUpgradeHistoryEntry( + return forExternalNonContainerDatabase( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -9812,17 +13044,17 @@ public boolean test(GetDatabaseSoftwareImageResponse response) { * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetDatabaseUpgradeHistoryEntryRequest, GetDatabaseUpgradeHistoryEntryResponse> - forDatabaseUpgradeHistoryEntry( - GetDatabaseUpgradeHistoryEntryRequest request, - com.oracle.bmc.database.model.DatabaseUpgradeHistoryEntry.LifecycleState + GetExternalNonContainerDatabaseRequest, GetExternalNonContainerDatabaseResponse> + forExternalNonContainerDatabase( + GetExternalNonContainerDatabaseRequest request, + com.oracle.bmc.database.model.ExternalNonContainerDatabase.LifecycleState targetState, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forDatabaseUpgradeHistoryEntry( + return forExternalNonContainerDatabase( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -9838,59 +13070,62 @@ public boolean test(GetDatabaseSoftwareImageResponse response) { * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetDatabaseUpgradeHistoryEntryRequest, GetDatabaseUpgradeHistoryEntryResponse> - forDatabaseUpgradeHistoryEntry( - GetDatabaseUpgradeHistoryEntryRequest request, + GetExternalNonContainerDatabaseRequest, GetExternalNonContainerDatabaseResponse> + forExternalNonContainerDatabase( + GetExternalNonContainerDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.DatabaseUpgradeHistoryEntry.LifecycleState... + com.oracle.bmc.database.model.ExternalNonContainerDatabase.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forDatabaseUpgradeHistoryEntry( + return forExternalNonContainerDatabase( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for DatabaseUpgradeHistoryEntry. + // Helper method to create a new Waiter for ExternalNonContainerDatabase. private com.oracle.bmc.waiter.Waiter< - GetDatabaseUpgradeHistoryEntryRequest, GetDatabaseUpgradeHistoryEntryResponse> - forDatabaseUpgradeHistoryEntry( + GetExternalNonContainerDatabaseRequest, GetExternalNonContainerDatabaseResponse> + forExternalNonContainerDatabase( com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetDatabaseUpgradeHistoryEntryRequest request, - final com.oracle.bmc.database.model.DatabaseUpgradeHistoryEntry + final GetExternalNonContainerDatabaseRequest request, + final com.oracle.bmc.database.model.ExternalNonContainerDatabase .LifecycleState... targetStates) { final java.util.Set< - com.oracle.bmc.database.model.DatabaseUpgradeHistoryEntry.LifecycleState> + com.oracle.bmc.database.model.ExternalNonContainerDatabase.LifecycleState> targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, waiter.toCallable( () -> request, - new java.util.function.Function< - GetDatabaseUpgradeHistoryEntryRequest, - GetDatabaseUpgradeHistoryEntryResponse>() { + new java.util.function.Function< + GetExternalNonContainerDatabaseRequest, + GetExternalNonContainerDatabaseResponse>() { @Override - public GetDatabaseUpgradeHistoryEntryResponse apply( - GetDatabaseUpgradeHistoryEntryRequest request) { - return client.getDatabaseUpgradeHistoryEntry(request); + public GetExternalNonContainerDatabaseResponse apply( + GetExternalNonContainerDatabaseRequest request) { + return client.getExternalNonContainerDatabase(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate< + GetExternalNonContainerDatabaseResponse>() { @Override - public boolean test(GetDatabaseUpgradeHistoryEntryResponse response) { + public boolean test(GetExternalNonContainerDatabaseResponse response) { return targetStatesSet.contains( - response.getDatabaseUpgradeHistoryEntry() + response.getExternalNonContainerDatabase() .getLifecycleState()); } }, - false), + targetStatesSet.contains( + com.oracle.bmc.database.model.ExternalNonContainerDatabase + .LifecycleState.Terminated)), request); } @@ -9901,15 +13136,18 @@ public boolean test(GetDatabaseUpgradeHistoryEntryResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDbHome( - GetDbHomeRequest request, - com.oracle.bmc.database.model.DbHome.LifecycleState... targetStates) { + public com.oracle.bmc.waiter.Waiter< + GetExternalPluggableDatabaseRequest, GetExternalPluggableDatabaseResponse> + forExternalPluggableDatabase( + GetExternalPluggableDatabaseRequest request, + com.oracle.bmc.database.model.ExternalPluggableDatabase.LifecycleState... + targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forDbHome( + return forExternalPluggableDatabase( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -9922,15 +13160,18 @@ public com.oracle.bmc.waiter.Waiter forDbHo * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDbHome( - GetDbHomeRequest request, - com.oracle.bmc.database.model.DbHome.LifecycleState targetState, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter< + GetExternalPluggableDatabaseRequest, GetExternalPluggableDatabaseResponse> + forExternalPluggableDatabase( + GetExternalPluggableDatabaseRequest request, + com.oracle.bmc.database.model.ExternalPluggableDatabase.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forDbHome( + return forExternalPluggableDatabase( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -9945,49 +13186,60 @@ public com.oracle.bmc.waiter.Waiter forDbHo * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDbHome( - GetDbHomeRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.DbHome.LifecycleState... targetStates) { + public com.oracle.bmc.waiter.Waiter< + GetExternalPluggableDatabaseRequest, GetExternalPluggableDatabaseResponse> + forExternalPluggableDatabase( + GetExternalPluggableDatabaseRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.ExternalPluggableDatabase.LifecycleState... + targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forDbHome( + return forExternalPluggableDatabase( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for DbHome. - private com.oracle.bmc.waiter.Waiter forDbHome( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetDbHomeRequest request, - final com.oracle.bmc.database.model.DbHome.LifecycleState... targetStates) { - final java.util.Set targetStatesSet = - new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + // Helper method to create a new Waiter for ExternalPluggableDatabase. + private com.oracle.bmc.waiter.Waiter< + GetExternalPluggableDatabaseRequest, GetExternalPluggableDatabaseResponse> + forExternalPluggableDatabase( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetExternalPluggableDatabaseRequest request, + final com.oracle.bmc.database.model.ExternalPluggableDatabase.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, waiter.toCallable( () -> request, - new java.util.function.Function() { + new java.util.function.Function< + GetExternalPluggableDatabaseRequest, + GetExternalPluggableDatabaseResponse>() { @Override - public GetDbHomeResponse apply(GetDbHomeRequest request) { - return client.getDbHome(request); + public GetExternalPluggableDatabaseResponse apply( + GetExternalPluggableDatabaseRequest request) { + return client.getExternalPluggableDatabase(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetDbHomeResponse response) { + public boolean test(GetExternalPluggableDatabaseResponse response) { return targetStatesSet.contains( - response.getDbHome().getLifecycleState()); + response.getExternalPluggableDatabase() + .getLifecycleState()); } }, targetStatesSet.contains( - com.oracle.bmc.database.model.DbHome.LifecycleState.Terminated)), + com.oracle.bmc.database.model.ExternalPluggableDatabase + .LifecycleState.Terminated)), request); } @@ -9998,15 +13250,15 @@ public boolean test(GetDbHomeResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDbNode( - GetDbNodeRequest request, - com.oracle.bmc.database.model.DbNode.LifecycleState... targetStates) { + public com.oracle.bmc.waiter.Waiter forKeyStore( + GetKeyStoreRequest request, + com.oracle.bmc.database.model.KeyStore.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forDbNode( + return forKeyStore( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -10019,15 +13271,15 @@ public com.oracle.bmc.waiter.Waiter forDbNo * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDbNode( - GetDbNodeRequest request, - com.oracle.bmc.database.model.DbNode.LifecycleState targetState, + public com.oracle.bmc.waiter.Waiter forKeyStore( + GetKeyStoreRequest request, + com.oracle.bmc.database.model.KeyStore.LifecycleState targetState, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forDbNode( + return forKeyStore( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -10042,49 +13294,49 @@ public com.oracle.bmc.waiter.Waiter forDbNo * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDbNode( - GetDbNodeRequest request, + public com.oracle.bmc.waiter.Waiter forKeyStore( + GetKeyStoreRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.DbNode.LifecycleState... targetStates) { + com.oracle.bmc.database.model.KeyStore.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forDbNode( + return forKeyStore( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for DbNode. - private com.oracle.bmc.waiter.Waiter forDbNode( + // Helper method to create a new Waiter for KeyStore. + private com.oracle.bmc.waiter.Waiter forKeyStore( com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetDbNodeRequest request, - final com.oracle.bmc.database.model.DbNode.LifecycleState... targetStates) { - final java.util.Set targetStatesSet = + final GetKeyStoreRequest request, + final com.oracle.bmc.database.model.KeyStore.LifecycleState... targetStates) { + final java.util.Set targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, waiter.toCallable( () -> request, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public GetDbNodeResponse apply(GetDbNodeRequest request) { - return client.getDbNode(request); + public GetKeyStoreResponse apply(GetKeyStoreRequest request) { + return client.getKeyStore(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetDbNodeResponse response) { + public boolean test(GetKeyStoreResponse response) { return targetStatesSet.contains( - response.getDbNode().getLifecycleState()); + response.getKeyStore().getLifecycleState()); } }, targetStatesSet.contains( - com.oracle.bmc.database.model.DbNode.LifecycleState.Terminated)), + com.oracle.bmc.database.model.KeyStore.LifecycleState.Deleted)), request); } @@ -10095,15 +13347,16 @@ public boolean test(GetDbNodeResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDbServer( - GetDbServerRequest request, - com.oracle.bmc.database.model.DbServer.LifecycleState... targetStates) { + public com.oracle.bmc.waiter.Waiter + forMaintenanceRun( + GetMaintenanceRunRequest request, + com.oracle.bmc.database.model.MaintenanceRun.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forDbServer( + return forMaintenanceRun( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -10116,15 +13369,16 @@ public com.oracle.bmc.waiter.Waiter for * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDbServer( - GetDbServerRequest request, - com.oracle.bmc.database.model.DbServer.LifecycleState targetState, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter + forMaintenanceRun( + GetMaintenanceRunRequest request, + com.oracle.bmc.database.model.MaintenanceRun.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forDbServer( + return forMaintenanceRun( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -10139,49 +13393,55 @@ public com.oracle.bmc.waiter.Waiter for * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDbServer( - GetDbServerRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.DbServer.LifecycleState... targetStates) { + public com.oracle.bmc.waiter.Waiter + forMaintenanceRun( + GetMaintenanceRunRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.MaintenanceRun.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forDbServer( + return forMaintenanceRun( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for DbServer. - private com.oracle.bmc.waiter.Waiter forDbServer( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetDbServerRequest request, - final com.oracle.bmc.database.model.DbServer.LifecycleState... targetStates) { - final java.util.Set targetStatesSet = - new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + // Helper method to create a new Waiter for MaintenanceRun. + private com.oracle.bmc.waiter.Waiter + forMaintenanceRun( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetMaintenanceRunRequest request, + final com.oracle.bmc.database.model.MaintenanceRun.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, waiter.toCallable( () -> request, - new java.util.function.Function() { + new java.util.function.Function< + GetMaintenanceRunRequest, GetMaintenanceRunResponse>() { @Override - public GetDbServerResponse apply(GetDbServerRequest request) { - return client.getDbServer(request); + public GetMaintenanceRunResponse apply( + GetMaintenanceRunRequest request) { + return client.getMaintenanceRun(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetDbServerResponse response) { + public boolean test(GetMaintenanceRunResponse response) { return targetStatesSet.contains( - response.getDbServer().getLifecycleState()); + response.getMaintenanceRun().getLifecycleState()); } }, targetStatesSet.contains( - com.oracle.bmc.database.model.DbServer.LifecycleState.Deleted)), + com.oracle.bmc.database.model.MaintenanceRun.LifecycleState + .Deleted)), request); } @@ -10192,15 +13452,16 @@ public boolean test(GetDbServerResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDbSystem( - GetDbSystemRequest request, - com.oracle.bmc.database.model.DbSystem.LifecycleState... targetStates) { + public com.oracle.bmc.waiter.Waiter + forOneoffPatch( + GetOneoffPatchRequest request, + com.oracle.bmc.database.model.OneoffPatch.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forDbSystem( + return forOneoffPatch( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -10213,15 +13474,16 @@ public com.oracle.bmc.waiter.Waiter for * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDbSystem( - GetDbSystemRequest request, - com.oracle.bmc.database.model.DbSystem.LifecycleState targetState, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter + forOneoffPatch( + GetOneoffPatchRequest request, + com.oracle.bmc.database.model.OneoffPatch.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forDbSystem( + return forOneoffPatch( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -10236,49 +13498,54 @@ public com.oracle.bmc.waiter.Waiter for * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forDbSystem( - GetDbSystemRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.DbSystem.LifecycleState... targetStates) { + public com.oracle.bmc.waiter.Waiter + forOneoffPatch( + GetOneoffPatchRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.OneoffPatch.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forDbSystem( + return forOneoffPatch( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for DbSystem. - private com.oracle.bmc.waiter.Waiter forDbSystem( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetDbSystemRequest request, - final com.oracle.bmc.database.model.DbSystem.LifecycleState... targetStates) { - final java.util.Set targetStatesSet = - new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + // Helper method to create a new Waiter for OneoffPatch. + private com.oracle.bmc.waiter.Waiter + forOneoffPatch( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetOneoffPatchRequest request, + final com.oracle.bmc.database.model.OneoffPatch.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, waiter.toCallable( () -> request, - new java.util.function.Function() { + new java.util.function.Function< + GetOneoffPatchRequest, GetOneoffPatchResponse>() { @Override - public GetDbSystemResponse apply(GetDbSystemRequest request) { - return client.getDbSystem(request); + public GetOneoffPatchResponse apply(GetOneoffPatchRequest request) { + return client.getOneoffPatch(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetDbSystemResponse response) { + public boolean test(GetOneoffPatchResponse response) { return targetStatesSet.contains( - response.getDbSystem().getLifecycleState()); + response.getOneoffPatch().getLifecycleState()); } }, targetStatesSet.contains( - com.oracle.bmc.database.model.DbSystem.LifecycleState.Terminated)), + com.oracle.bmc.database.model.OneoffPatch.LifecycleState + .Terminated)), request); } @@ -10290,17 +13557,17 @@ public boolean test(GetDbSystemResponse response) { * @return a new {@code Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetDbSystemUpgradeHistoryEntryRequest, GetDbSystemUpgradeHistoryEntryResponse> - forDbSystemUpgradeHistoryEntry( - GetDbSystemUpgradeHistoryEntryRequest request, - com.oracle.bmc.database.model.DbSystemUpgradeHistoryEntry.LifecycleState... + GetPdbConversionHistoryEntryRequest, GetPdbConversionHistoryEntryResponse> + forPdbConversionHistoryEntry( + GetPdbConversionHistoryEntryRequest request, + com.oracle.bmc.database.model.PdbConversionHistoryEntry.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forDbSystemUpgradeHistoryEntry( + return forPdbConversionHistoryEntry( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -10314,17 +13581,17 @@ public boolean test(GetDbSystemResponse response) { * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetDbSystemUpgradeHistoryEntryRequest, GetDbSystemUpgradeHistoryEntryResponse> - forDbSystemUpgradeHistoryEntry( - GetDbSystemUpgradeHistoryEntryRequest request, - com.oracle.bmc.database.model.DbSystemUpgradeHistoryEntry.LifecycleState + GetPdbConversionHistoryEntryRequest, GetPdbConversionHistoryEntryResponse> + forPdbConversionHistoryEntry( + GetPdbConversionHistoryEntryRequest request, + com.oracle.bmc.database.model.PdbConversionHistoryEntry.LifecycleState targetState, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forDbSystemUpgradeHistoryEntry( + return forPdbConversionHistoryEntry( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -10340,35 +13607,33 @@ public boolean test(GetDbSystemResponse response) { * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetDbSystemUpgradeHistoryEntryRequest, GetDbSystemUpgradeHistoryEntryResponse> - forDbSystemUpgradeHistoryEntry( - GetDbSystemUpgradeHistoryEntryRequest request, + GetPdbConversionHistoryEntryRequest, GetPdbConversionHistoryEntryResponse> + forPdbConversionHistoryEntry( + GetPdbConversionHistoryEntryRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.DbSystemUpgradeHistoryEntry.LifecycleState... + com.oracle.bmc.database.model.PdbConversionHistoryEntry.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forDbSystemUpgradeHistoryEntry( + return forPdbConversionHistoryEntry( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for DbSystemUpgradeHistoryEntry. + // Helper method to create a new Waiter for PdbConversionHistoryEntry. private com.oracle.bmc.waiter.Waiter< - GetDbSystemUpgradeHistoryEntryRequest, GetDbSystemUpgradeHistoryEntryResponse> - forDbSystemUpgradeHistoryEntry( + GetPdbConversionHistoryEntryRequest, GetPdbConversionHistoryEntryResponse> + forPdbConversionHistoryEntry( com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetDbSystemUpgradeHistoryEntryRequest request, - final com.oracle.bmc.database.model.DbSystemUpgradeHistoryEntry - .LifecycleState... + final GetPdbConversionHistoryEntryRequest request, + final com.oracle.bmc.database.model.PdbConversionHistoryEntry.LifecycleState... targetStates) { - final java.util.Set< - com.oracle.bmc.database.model.DbSystemUpgradeHistoryEntry.LifecycleState> + final java.util.Set targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( @@ -10376,19 +13641,19 @@ public boolean test(GetDbSystemResponse response) { waiter.toCallable( () -> request, new java.util.function.Function< - GetDbSystemUpgradeHistoryEntryRequest, - GetDbSystemUpgradeHistoryEntryResponse>() { + GetPdbConversionHistoryEntryRequest, + GetPdbConversionHistoryEntryResponse>() { @Override - public GetDbSystemUpgradeHistoryEntryResponse apply( - GetDbSystemUpgradeHistoryEntryRequest request) { - return client.getDbSystemUpgradeHistoryEntry(request); + public GetPdbConversionHistoryEntryResponse apply( + GetPdbConversionHistoryEntryRequest request) { + return client.getPdbConversionHistoryEntry(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetDbSystemUpgradeHistoryEntryResponse response) { + public boolean test(GetPdbConversionHistoryEntryResponse response) { return targetStatesSet.contains( - response.getDbSystemUpgradeHistoryEntry() + response.getPdbConversionHistoryEntry() .getLifecycleState()); } }, @@ -10403,18 +13668,17 @@ public boolean test(GetDbSystemUpgradeHistoryEntryResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetExadataInfrastructureRequest, GetExadataInfrastructureResponse> - forExadataInfrastructure( - GetExadataInfrastructureRequest request, - com.oracle.bmc.database.model.ExadataInfrastructure.LifecycleState... + public com.oracle.bmc.waiter.Waiter + forPluggableDatabase( + GetPluggableDatabaseRequest request, + com.oracle.bmc.database.model.PluggableDatabase.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forExadataInfrastructure( + return forPluggableDatabase( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -10427,17 +13691,16 @@ public boolean test(GetDbSystemUpgradeHistoryEntryResponse response) { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetExadataInfrastructureRequest, GetExadataInfrastructureResponse> - forExadataInfrastructure( - GetExadataInfrastructureRequest request, - com.oracle.bmc.database.model.ExadataInfrastructure.LifecycleState targetState, + public com.oracle.bmc.waiter.Waiter + forPluggableDatabase( + GetPluggableDatabaseRequest request, + com.oracle.bmc.database.model.PluggableDatabase.LifecycleState targetState, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forExadataInfrastructure( + return forPluggableDatabase( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -10452,34 +13715,32 @@ public boolean test(GetDbSystemUpgradeHistoryEntryResponse response) { * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetExadataInfrastructureRequest, GetExadataInfrastructureResponse> - forExadataInfrastructure( - GetExadataInfrastructureRequest request, + public com.oracle.bmc.waiter.Waiter + forPluggableDatabase( + GetPluggableDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.ExadataInfrastructure.LifecycleState... + com.oracle.bmc.database.model.PluggableDatabase.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forExadataInfrastructure( + return forPluggableDatabase( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for ExadataInfrastructure. - private com.oracle.bmc.waiter.Waiter< - GetExadataInfrastructureRequest, GetExadataInfrastructureResponse> - forExadataInfrastructure( + // Helper method to create a new Waiter for PluggableDatabase. + private com.oracle.bmc.waiter.Waiter + forPluggableDatabase( com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetExadataInfrastructureRequest request, - final com.oracle.bmc.database.model.ExadataInfrastructure.LifecycleState... + final GetPluggableDatabaseRequest request, + final com.oracle.bmc.database.model.PluggableDatabase.LifecycleState... targetStates) { - final java.util.Set + final java.util.Set targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( @@ -10487,24 +13748,23 @@ public boolean test(GetDbSystemUpgradeHistoryEntryResponse response) { waiter.toCallable( () -> request, new java.util.function.Function< - GetExadataInfrastructureRequest, - GetExadataInfrastructureResponse>() { + GetPluggableDatabaseRequest, GetPluggableDatabaseResponse>() { @Override - public GetExadataInfrastructureResponse apply( - GetExadataInfrastructureRequest request) { - return client.getExadataInfrastructure(request); + public GetPluggableDatabaseResponse apply( + GetPluggableDatabaseRequest request) { + return client.getPluggableDatabase(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetExadataInfrastructureResponse response) { + public boolean test(GetPluggableDatabaseResponse response) { return targetStatesSet.contains( - response.getExadataInfrastructure().getLifecycleState()); + response.getPluggableDatabase().getLifecycleState()); } }, targetStatesSet.contains( - com.oracle.bmc.database.model.ExadataInfrastructure.LifecycleState - .Deleted)), + com.oracle.bmc.database.model.PluggableDatabase.LifecycleState + .Terminated)), request); } @@ -10515,17 +13775,16 @@ public boolean test(GetExadataInfrastructureResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forExadataIormConfig( - GetExadataIormConfigRequest request, - com.oracle.bmc.database.model.ExadataIormConfig.LifecycleState... - targetStates) { + public com.oracle.bmc.waiter.Waiter + forScheduledAction( + GetScheduledActionRequest request, + com.oracle.bmc.database.model.ScheduledAction.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forExadataIormConfig( + return forScheduledAction( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -10538,16 +13797,16 @@ public boolean test(GetExadataInfrastructureResponse response) { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forExadataIormConfig( - GetExadataIormConfigRequest request, - com.oracle.bmc.database.model.ExadataIormConfig.LifecycleState targetState, + public com.oracle.bmc.waiter.Waiter + forScheduledAction( + GetScheduledActionRequest request, + com.oracle.bmc.database.model.ScheduledAction.LifecycleState targetState, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forExadataIormConfig( + return forScheduledAction( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -10562,32 +13821,31 @@ public boolean test(GetExadataInfrastructureResponse response) { * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forExadataIormConfig( - GetExadataIormConfigRequest request, + public com.oracle.bmc.waiter.Waiter + forScheduledAction( + GetScheduledActionRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.ExadataIormConfig.LifecycleState... - targetStates) { + com.oracle.bmc.database.model.ScheduledAction.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forExadataIormConfig( + return forScheduledAction( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for ExadataIormConfig. - private com.oracle.bmc.waiter.Waiter - forExadataIormConfig( + // Helper method to create a new Waiter for ScheduledAction. + private com.oracle.bmc.waiter.Waiter + forScheduledAction( com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetExadataIormConfigRequest request, - final com.oracle.bmc.database.model.ExadataIormConfig.LifecycleState... + final GetScheduledActionRequest request, + final com.oracle.bmc.database.model.ScheduledAction.LifecycleState... targetStates) { - final java.util.Set + final java.util.Set targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( @@ -10595,21 +13853,23 @@ public boolean test(GetExadataInfrastructureResponse response) { waiter.toCallable( () -> request, new java.util.function.Function< - GetExadataIormConfigRequest, GetExadataIormConfigResponse>() { + GetScheduledActionRequest, GetScheduledActionResponse>() { @Override - public GetExadataIormConfigResponse apply( - GetExadataIormConfigRequest request) { - return client.getExadataIormConfig(request); + public GetScheduledActionResponse apply( + GetScheduledActionRequest request) { + return client.getScheduledAction(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetExadataIormConfigResponse response) { + public boolean test(GetScheduledActionResponse response) { return targetStatesSet.contains( - response.getExadataIormConfig().getLifecycleState()); + response.getScheduledAction().getLifecycleState()); } }, - false), + targetStatesSet.contains( + com.oracle.bmc.database.model.ScheduledAction.LifecycleState + .Deleted)), request); } @@ -10620,18 +13880,16 @@ public boolean test(GetExadataIormConfigResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetExternalContainerDatabaseRequest, GetExternalContainerDatabaseResponse> - forExternalContainerDatabase( - GetExternalContainerDatabaseRequest request, - com.oracle.bmc.database.model.ExternalContainerDatabase.LifecycleState... - targetStates) { + public com.oracle.bmc.waiter.Waiter + forSchedulingPlan( + GetSchedulingPlanRequest request, + com.oracle.bmc.database.model.SchedulingPlan.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forExternalContainerDatabase( + return forSchedulingPlan( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -10644,18 +13902,16 @@ public boolean test(GetExadataIormConfigResponse response) { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetExternalContainerDatabaseRequest, GetExternalContainerDatabaseResponse> - forExternalContainerDatabase( - GetExternalContainerDatabaseRequest request, - com.oracle.bmc.database.model.ExternalContainerDatabase.LifecycleState - targetState, + public com.oracle.bmc.waiter.Waiter + forSchedulingPlan( + GetSchedulingPlanRequest request, + com.oracle.bmc.database.model.SchedulingPlan.LifecycleState targetState, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forExternalContainerDatabase( + return forSchedulingPlan( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -10670,34 +13926,31 @@ public boolean test(GetExadataIormConfigResponse response) { * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetExternalContainerDatabaseRequest, GetExternalContainerDatabaseResponse> - forExternalContainerDatabase( - GetExternalContainerDatabaseRequest request, + public com.oracle.bmc.waiter.Waiter + forSchedulingPlan( + GetSchedulingPlanRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.ExternalContainerDatabase.LifecycleState... - targetStates) { + com.oracle.bmc.database.model.SchedulingPlan.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forExternalContainerDatabase( + return forSchedulingPlan( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for ExternalContainerDatabase. - private com.oracle.bmc.waiter.Waiter< - GetExternalContainerDatabaseRequest, GetExternalContainerDatabaseResponse> - forExternalContainerDatabase( + // Helper method to create a new Waiter for SchedulingPlan. + private com.oracle.bmc.waiter.Waiter + forSchedulingPlan( com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetExternalContainerDatabaseRequest request, - final com.oracle.bmc.database.model.ExternalContainerDatabase.LifecycleState... + final GetSchedulingPlanRequest request, + final com.oracle.bmc.database.model.SchedulingPlan.LifecycleState... targetStates) { - final java.util.Set + final java.util.Set targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( @@ -10705,25 +13958,23 @@ public boolean test(GetExadataIormConfigResponse response) { waiter.toCallable( () -> request, new java.util.function.Function< - GetExternalContainerDatabaseRequest, - GetExternalContainerDatabaseResponse>() { + GetSchedulingPlanRequest, GetSchedulingPlanResponse>() { @Override - public GetExternalContainerDatabaseResponse apply( - GetExternalContainerDatabaseRequest request) { - return client.getExternalContainerDatabase(request); + public GetSchedulingPlanResponse apply( + GetSchedulingPlanRequest request) { + return client.getSchedulingPlan(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetExternalContainerDatabaseResponse response) { + public boolean test(GetSchedulingPlanResponse response) { return targetStatesSet.contains( - response.getExternalContainerDatabase() - .getLifecycleState()); + response.getSchedulingPlan().getLifecycleState()); } }, targetStatesSet.contains( - com.oracle.bmc.database.model.ExternalContainerDatabase - .LifecycleState.Terminated)), + com.oracle.bmc.database.model.SchedulingPlan.LifecycleState + .Deleted)), request); } @@ -10734,18 +13985,16 @@ public boolean test(GetExternalContainerDatabaseResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetExternalDatabaseConnectorRequest, GetExternalDatabaseConnectorResponse> - forExternalDatabaseConnector( - GetExternalDatabaseConnectorRequest request, - com.oracle.bmc.database.model.ExternalDatabaseConnector.LifecycleState... - targetStates) { + public com.oracle.bmc.waiter.Waiter + forSchedulingPolicy( + GetSchedulingPolicyRequest request, + com.oracle.bmc.database.model.SchedulingPolicy.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forExternalDatabaseConnector( + return forSchedulingPolicy( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -10758,18 +14007,16 @@ public boolean test(GetExternalContainerDatabaseResponse response) { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetExternalDatabaseConnectorRequest, GetExternalDatabaseConnectorResponse> - forExternalDatabaseConnector( - GetExternalDatabaseConnectorRequest request, - com.oracle.bmc.database.model.ExternalDatabaseConnector.LifecycleState - targetState, + public com.oracle.bmc.waiter.Waiter + forSchedulingPolicy( + GetSchedulingPolicyRequest request, + com.oracle.bmc.database.model.SchedulingPolicy.LifecycleState targetState, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forExternalDatabaseConnector( + return forSchedulingPolicy( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -10784,34 +14031,31 @@ public boolean test(GetExternalContainerDatabaseResponse response) { * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetExternalDatabaseConnectorRequest, GetExternalDatabaseConnectorResponse> - forExternalDatabaseConnector( - GetExternalDatabaseConnectorRequest request, + public com.oracle.bmc.waiter.Waiter + forSchedulingPolicy( + GetSchedulingPolicyRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.ExternalDatabaseConnector.LifecycleState... - targetStates) { + com.oracle.bmc.database.model.SchedulingPolicy.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forExternalDatabaseConnector( + return forSchedulingPolicy( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for ExternalDatabaseConnector. - private com.oracle.bmc.waiter.Waiter< - GetExternalDatabaseConnectorRequest, GetExternalDatabaseConnectorResponse> - forExternalDatabaseConnector( + // Helper method to create a new Waiter for SchedulingPolicy. + private com.oracle.bmc.waiter.Waiter + forSchedulingPolicy( com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetExternalDatabaseConnectorRequest request, - final com.oracle.bmc.database.model.ExternalDatabaseConnector.LifecycleState... + final GetSchedulingPolicyRequest request, + final com.oracle.bmc.database.model.SchedulingPolicy.LifecycleState... targetStates) { - final java.util.Set + final java.util.Set targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( @@ -10819,25 +14063,23 @@ public boolean test(GetExternalContainerDatabaseResponse response) { waiter.toCallable( () -> request, new java.util.function.Function< - GetExternalDatabaseConnectorRequest, - GetExternalDatabaseConnectorResponse>() { + GetSchedulingPolicyRequest, GetSchedulingPolicyResponse>() { @Override - public GetExternalDatabaseConnectorResponse apply( - GetExternalDatabaseConnectorRequest request) { - return client.getExternalDatabaseConnector(request); + public GetSchedulingPolicyResponse apply( + GetSchedulingPolicyRequest request) { + return client.getSchedulingPolicy(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetExternalDatabaseConnectorResponse response) { + public boolean test(GetSchedulingPolicyResponse response) { return targetStatesSet.contains( - response.getExternalDatabaseConnector() - .getLifecycleState()); + response.getSchedulingPolicy().getLifecycleState()); } }, targetStatesSet.contains( - com.oracle.bmc.database.model.ExternalDatabaseConnector - .LifecycleState.Terminated)), + com.oracle.bmc.database.model.SchedulingPolicy.LifecycleState + .Deleted)), request); } @@ -10848,18 +14090,16 @@ public boolean test(GetExternalDatabaseConnectorResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetExternalNonContainerDatabaseRequest, GetExternalNonContainerDatabaseResponse> - forExternalNonContainerDatabase( - GetExternalNonContainerDatabaseRequest request, - com.oracle.bmc.database.model.ExternalNonContainerDatabase.LifecycleState... - targetStates) { + public com.oracle.bmc.waiter.Waiter + forSchedulingWindow( + GetSchedulingWindowRequest request, + com.oracle.bmc.database.model.SchedulingWindow.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forExternalNonContainerDatabase( + return forSchedulingWindow( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -10872,18 +14112,16 @@ public boolean test(GetExternalDatabaseConnectorResponse response) { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetExternalNonContainerDatabaseRequest, GetExternalNonContainerDatabaseResponse> - forExternalNonContainerDatabase( - GetExternalNonContainerDatabaseRequest request, - com.oracle.bmc.database.model.ExternalNonContainerDatabase.LifecycleState - targetState, + public com.oracle.bmc.waiter.Waiter + forSchedulingWindow( + GetSchedulingWindowRequest request, + com.oracle.bmc.database.model.SchedulingWindow.LifecycleState targetState, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forExternalNonContainerDatabase( + return forSchedulingWindow( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -10898,36 +14136,31 @@ public boolean test(GetExternalDatabaseConnectorResponse response) { * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetExternalNonContainerDatabaseRequest, GetExternalNonContainerDatabaseResponse> - forExternalNonContainerDatabase( - GetExternalNonContainerDatabaseRequest request, + public com.oracle.bmc.waiter.Waiter + forSchedulingWindow( + GetSchedulingWindowRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.ExternalNonContainerDatabase.LifecycleState... - targetStates) { + com.oracle.bmc.database.model.SchedulingWindow.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forExternalNonContainerDatabase( + return forSchedulingWindow( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for ExternalNonContainerDatabase. - private com.oracle.bmc.waiter.Waiter< - GetExternalNonContainerDatabaseRequest, GetExternalNonContainerDatabaseResponse> - forExternalNonContainerDatabase( + // Helper method to create a new Waiter for SchedulingWindow. + private com.oracle.bmc.waiter.Waiter + forSchedulingWindow( com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetExternalNonContainerDatabaseRequest request, - final com.oracle.bmc.database.model.ExternalNonContainerDatabase - .LifecycleState... + final GetSchedulingWindowRequest request, + final com.oracle.bmc.database.model.SchedulingWindow.LifecycleState... targetStates) { - final java.util.Set< - com.oracle.bmc.database.model.ExternalNonContainerDatabase.LifecycleState> + final java.util.Set targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( @@ -10935,26 +14168,23 @@ public boolean test(GetExternalDatabaseConnectorResponse response) { waiter.toCallable( () -> request, new java.util.function.Function< - GetExternalNonContainerDatabaseRequest, - GetExternalNonContainerDatabaseResponse>() { + GetSchedulingWindowRequest, GetSchedulingWindowResponse>() { @Override - public GetExternalNonContainerDatabaseResponse apply( - GetExternalNonContainerDatabaseRequest request) { - return client.getExternalNonContainerDatabase(request); + public GetSchedulingWindowResponse apply( + GetSchedulingWindowRequest request) { + return client.getSchedulingWindow(request); } }, - new java.util.function.Predicate< - GetExternalNonContainerDatabaseResponse>() { + new java.util.function.Predicate() { @Override - public boolean test(GetExternalNonContainerDatabaseResponse response) { + public boolean test(GetSchedulingWindowResponse response) { return targetStatesSet.contains( - response.getExternalNonContainerDatabase() - .getLifecycleState()); + response.getSchedulingWindow().getLifecycleState()); } }, targetStatesSet.contains( - com.oracle.bmc.database.model.ExternalNonContainerDatabase - .LifecycleState.Terminated)), + com.oracle.bmc.database.model.SchedulingWindow.LifecycleState + .Deleted)), request); } @@ -10965,18 +14195,15 @@ public boolean test(GetExternalNonContainerDatabaseResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetExternalPluggableDatabaseRequest, GetExternalPluggableDatabaseResponse> - forExternalPluggableDatabase( - GetExternalPluggableDatabaseRequest request, - com.oracle.bmc.database.model.ExternalPluggableDatabase.LifecycleState... - targetStates) { + public com.oracle.bmc.waiter.Waiter forVmCluster( + GetVmClusterRequest request, + com.oracle.bmc.database.model.VmCluster.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forExternalPluggableDatabase( + return forVmCluster( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -10989,18 +14216,15 @@ public boolean test(GetExternalNonContainerDatabaseResponse response) { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetExternalPluggableDatabaseRequest, GetExternalPluggableDatabaseResponse> - forExternalPluggableDatabase( - GetExternalPluggableDatabaseRequest request, - com.oracle.bmc.database.model.ExternalPluggableDatabase.LifecycleState - targetState, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter forVmCluster( + GetVmClusterRequest request, + com.oracle.bmc.database.model.VmCluster.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forExternalPluggableDatabase( + return forVmCluster( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -11015,34 +14239,28 @@ public boolean test(GetExternalNonContainerDatabaseResponse response) { * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - GetExternalPluggableDatabaseRequest, GetExternalPluggableDatabaseResponse> - forExternalPluggableDatabase( - GetExternalPluggableDatabaseRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.ExternalPluggableDatabase.LifecycleState... - targetStates) { + public com.oracle.bmc.waiter.Waiter forVmCluster( + GetVmClusterRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.VmCluster.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forExternalPluggableDatabase( + return forVmCluster( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for ExternalPluggableDatabase. - private com.oracle.bmc.waiter.Waiter< - GetExternalPluggableDatabaseRequest, GetExternalPluggableDatabaseResponse> - forExternalPluggableDatabase( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetExternalPluggableDatabaseRequest request, - final com.oracle.bmc.database.model.ExternalPluggableDatabase.LifecycleState... - targetStates) { - final java.util.Set + // Helper method to create a new Waiter for VmCluster. + private com.oracle.bmc.waiter.Waiter forVmCluster( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetVmClusterRequest request, + final com.oracle.bmc.database.model.VmCluster.LifecycleState... targetStates) { + final java.util.Set targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( @@ -11050,25 +14268,21 @@ public boolean test(GetExternalNonContainerDatabaseResponse response) { waiter.toCallable( () -> request, new java.util.function.Function< - GetExternalPluggableDatabaseRequest, - GetExternalPluggableDatabaseResponse>() { + GetVmClusterRequest, GetVmClusterResponse>() { @Override - public GetExternalPluggableDatabaseResponse apply( - GetExternalPluggableDatabaseRequest request) { - return client.getExternalPluggableDatabase(request); + public GetVmClusterResponse apply(GetVmClusterRequest request) { + return client.getVmCluster(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetExternalPluggableDatabaseResponse response) { + public boolean test(GetVmClusterResponse response) { return targetStatesSet.contains( - response.getExternalPluggableDatabase() - .getLifecycleState()); + response.getVmCluster().getLifecycleState()); } }, targetStatesSet.contains( - com.oracle.bmc.database.model.ExternalPluggableDatabase - .LifecycleState.Terminated)), + com.oracle.bmc.database.model.VmCluster.LifecycleState.Terminated)), request); } @@ -11079,15 +14293,16 @@ public boolean test(GetExternalPluggableDatabaseResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forKeyStore( - GetKeyStoreRequest request, - com.oracle.bmc.database.model.KeyStore.LifecycleState... targetStates) { + public com.oracle.bmc.waiter.Waiter + forVmClusterNetwork( + GetVmClusterNetworkRequest request, + com.oracle.bmc.database.model.VmClusterNetwork.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forKeyStore( + return forVmClusterNetwork( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -11100,15 +14315,16 @@ public com.oracle.bmc.waiter.Waiter for * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forKeyStore( - GetKeyStoreRequest request, - com.oracle.bmc.database.model.KeyStore.LifecycleState targetState, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter + forVmClusterNetwork( + GetVmClusterNetworkRequest request, + com.oracle.bmc.database.model.VmClusterNetwork.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forKeyStore( + return forVmClusterNetwork( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -11123,49 +14339,55 @@ public com.oracle.bmc.waiter.Waiter for * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forKeyStore( - GetKeyStoreRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.KeyStore.LifecycleState... targetStates) { + public com.oracle.bmc.waiter.Waiter + forVmClusterNetwork( + GetVmClusterNetworkRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.database.model.VmClusterNetwork.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forKeyStore( + return forVmClusterNetwork( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for KeyStore. - private com.oracle.bmc.waiter.Waiter forKeyStore( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetKeyStoreRequest request, - final com.oracle.bmc.database.model.KeyStore.LifecycleState... targetStates) { - final java.util.Set targetStatesSet = - new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + // Helper method to create a new Waiter for VmClusterNetwork. + private com.oracle.bmc.waiter.Waiter + forVmClusterNetwork( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetVmClusterNetworkRequest request, + final com.oracle.bmc.database.model.VmClusterNetwork.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, waiter.toCallable( () -> request, - new java.util.function.Function() { + new java.util.function.Function< + GetVmClusterNetworkRequest, GetVmClusterNetworkResponse>() { @Override - public GetKeyStoreResponse apply(GetKeyStoreRequest request) { - return client.getKeyStore(request); + public GetVmClusterNetworkResponse apply( + GetVmClusterNetworkRequest request) { + return client.getVmClusterNetwork(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetKeyStoreResponse response) { + public boolean test(GetVmClusterNetworkResponse response) { return targetStatesSet.contains( - response.getKeyStore().getLifecycleState()); + response.getVmClusterNetwork().getLifecycleState()); } }, targetStatesSet.contains( - com.oracle.bmc.database.model.KeyStore.LifecycleState.Deleted)), + com.oracle.bmc.database.model.VmClusterNetwork.LifecycleState + .Terminated)), request); } @@ -11176,16 +14398,16 @@ public boolean test(GetKeyStoreResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forMaintenanceRun( - GetMaintenanceRunRequest request, - com.oracle.bmc.database.model.MaintenanceRun.LifecycleState... targetStates) { + public com.oracle.bmc.waiter.Waiter + forVmClusterUpdate( + GetVmClusterUpdateRequest request, + com.oracle.bmc.database.model.VmClusterUpdate.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forMaintenanceRun( + return forVmClusterUpdate( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -11198,16 +14420,16 @@ public boolean test(GetKeyStoreResponse response) { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forMaintenanceRun( - GetMaintenanceRunRequest request, - com.oracle.bmc.database.model.MaintenanceRun.LifecycleState targetState, + public com.oracle.bmc.waiter.Waiter + forVmClusterUpdate( + GetVmClusterUpdateRequest request, + com.oracle.bmc.database.model.VmClusterUpdate.LifecycleState targetState, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forMaintenanceRun( + return forVmClusterUpdate( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -11222,31 +14444,31 @@ public boolean test(GetKeyStoreResponse response) { * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forMaintenanceRun( - GetMaintenanceRunRequest request, + public com.oracle.bmc.waiter.Waiter + forVmClusterUpdate( + GetVmClusterUpdateRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.MaintenanceRun.LifecycleState... targetStates) { + com.oracle.bmc.database.model.VmClusterUpdate.LifecycleState... targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forMaintenanceRun( + return forVmClusterUpdate( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for MaintenanceRun. - private com.oracle.bmc.waiter.Waiter - forMaintenanceRun( + // Helper method to create a new Waiter for VmClusterUpdate. + private com.oracle.bmc.waiter.Waiter + forVmClusterUpdate( com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetMaintenanceRunRequest request, - final com.oracle.bmc.database.model.MaintenanceRun.LifecycleState... + final GetVmClusterUpdateRequest request, + final com.oracle.bmc.database.model.VmClusterUpdate.LifecycleState... targetStates) { - final java.util.Set + final java.util.Set targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( @@ -11254,23 +14476,21 @@ public boolean test(GetKeyStoreResponse response) { waiter.toCallable( () -> request, new java.util.function.Function< - GetMaintenanceRunRequest, GetMaintenanceRunResponse>() { + GetVmClusterUpdateRequest, GetVmClusterUpdateResponse>() { @Override - public GetMaintenanceRunResponse apply( - GetMaintenanceRunRequest request) { - return client.getMaintenanceRun(request); + public GetVmClusterUpdateResponse apply( + GetVmClusterUpdateRequest request) { + return client.getVmClusterUpdate(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetMaintenanceRunResponse response) { + public boolean test(GetVmClusterUpdateResponse response) { return targetStatesSet.contains( - response.getMaintenanceRun().getLifecycleState()); + response.getVmClusterUpdate().getLifecycleState()); } }, - targetStatesSet.contains( - com.oracle.bmc.database.model.MaintenanceRun.LifecycleState - .Deleted)), + false), request); } @@ -11281,16 +14501,18 @@ public boolean test(GetMaintenanceRunResponse response) { * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states * @return a new {@code Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forOneoffPatch( - GetOneoffPatchRequest request, - com.oracle.bmc.database.model.OneoffPatch.LifecycleState... targetStates) { + public com.oracle.bmc.waiter.Waiter< + GetVmClusterUpdateHistoryEntryRequest, GetVmClusterUpdateHistoryEntryResponse> + forVmClusterUpdateHistoryEntry( + GetVmClusterUpdateHistoryEntryRequest request, + com.oracle.bmc.database.model.VmClusterUpdateHistoryEntry.LifecycleState... + targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one targetState must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null targetState values are not permitted"); - return forOneoffPatch( + return forVmClusterUpdateHistoryEntry( com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); } @@ -11303,16 +14525,18 @@ public boolean test(GetMaintenanceRunResponse response) { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forOneoffPatch( - GetOneoffPatchRequest request, - com.oracle.bmc.database.model.OneoffPatch.LifecycleState targetState, + public com.oracle.bmc.waiter.Waiter< + GetVmClusterUpdateHistoryEntryRequest, GetVmClusterUpdateHistoryEntryResponse> + forVmClusterUpdateHistoryEntry( + GetVmClusterUpdateHistoryEntryRequest request, + com.oracle.bmc.database.model.VmClusterUpdateHistoryEntry.LifecycleState + targetState, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { com.oracle.bmc.util.internal.Validate.notNull( targetState, "The targetState cannot be null"); - return forOneoffPatch( + return forVmClusterUpdateHistoryEntry( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetState); @@ -11327,31 +14551,36 @@ public boolean test(GetMaintenanceRunResponse response) { * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states * @return a new {@code com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forOneoffPatch( - GetOneoffPatchRequest request, + public com.oracle.bmc.waiter.Waiter< + GetVmClusterUpdateHistoryEntryRequest, GetVmClusterUpdateHistoryEntryResponse> + forVmClusterUpdateHistoryEntry( + GetVmClusterUpdateHistoryEntryRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.OneoffPatch.LifecycleState... targetStates) { + com.oracle.bmc.database.model.VmClusterUpdateHistoryEntry.LifecycleState... + targetStates) { com.oracle.bmc.util.internal.Validate.notEmpty( targetStates, "At least one target state must be provided"); com.oracle.bmc.util.internal.Validate.noNullElements( targetStates, "Null target states are not permitted"); - return forOneoffPatch( + return forVmClusterUpdateHistoryEntry( com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), request, targetStates); } - // Helper method to create a new Waiter for OneoffPatch. - private com.oracle.bmc.waiter.Waiter - forOneoffPatch( + // Helper method to create a new Waiter for VmClusterUpdateHistoryEntry. + private com.oracle.bmc.waiter.Waiter< + GetVmClusterUpdateHistoryEntryRequest, GetVmClusterUpdateHistoryEntryResponse> + forVmClusterUpdateHistoryEntry( com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetOneoffPatchRequest request, - final com.oracle.bmc.database.model.OneoffPatch.LifecycleState... + final GetVmClusterUpdateHistoryEntryRequest request, + final com.oracle.bmc.database.model.VmClusterUpdateHistoryEntry + .LifecycleState... targetStates) { - final java.util.Set + final java.util.Set< + com.oracle.bmc.database.model.VmClusterUpdateHistoryEntry.LifecycleState> targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( @@ -11359,22 +14588,23 @@ public boolean test(GetMaintenanceRunResponse response) { waiter.toCallable( () -> request, new java.util.function.Function< - GetOneoffPatchRequest, GetOneoffPatchResponse>() { + GetVmClusterUpdateHistoryEntryRequest, + GetVmClusterUpdateHistoryEntryResponse>() { @Override - public GetOneoffPatchResponse apply(GetOneoffPatchRequest request) { - return client.getOneoffPatch(request); + public GetVmClusterUpdateHistoryEntryResponse apply( + GetVmClusterUpdateHistoryEntryRequest request) { + return client.getVmClusterUpdateHistoryEntry(request); } }, - new java.util.function.Predicate() { + new java.util.function.Predicate() { @Override - public boolean test(GetOneoffPatchResponse response) { + public boolean test(GetVmClusterUpdateHistoryEntryResponse response) { return targetStatesSet.contains( - response.getOneoffPatch().getLifecycleState()); + response.getVmClusterUpdateHistoryEntry() + .getLifecycleState()); } }, - targetStatesSet.contains( - com.oracle.bmc.database.model.OneoffPatch.LifecycleState - .Terminated)), + false), request); } @@ -11382,48 +14612,206 @@ public boolean test(GetOneoffPatchResponse response) { * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * * @param request the request to send - * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states - * @return a new {@code Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetPdbConversionHistoryEntryRequest, GetPdbConversionHistoryEntryResponse> - forPdbConversionHistoryEntry( - GetPdbConversionHistoryEntryRequest request, - com.oracle.bmc.database.model.PdbConversionHistoryEntry.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one targetState must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null targetState values are not permitted"); + LaunchAutonomousExadataInfrastructureRequest, + LaunchAutonomousExadataInfrastructureResponse> + forLaunchAutonomousExadataInfrastructure( + LaunchAutonomousExadataInfrastructureRequest request) { + return forLaunchAutonomousExadataInfrastructure( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } - return forPdbConversionHistoryEntry( - com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + LaunchAutonomousExadataInfrastructureRequest, + LaunchAutonomousExadataInfrastructureResponse> + forLaunchAutonomousExadataInfrastructure( + LaunchAutonomousExadataInfrastructureRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public LaunchAutonomousExadataInfrastructureResponse call() throws Exception { + final LaunchAutonomousExadataInfrastructureResponse response = + client.launchAutonomousExadataInfrastructure(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forLaunchDbSystem(LaunchDbSystemRequest request) { + return forLaunchDbSystem( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. * * @param request the request to send - * @param targetState the desired state to wait for * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forLaunchDbSystem( + LaunchDbSystemRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public LaunchDbSystemResponse call() throws Exception { + final LaunchDbSystemResponse response = client.launchDbSystem(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetPdbConversionHistoryEntryRequest, GetPdbConversionHistoryEntryResponse> - forPdbConversionHistoryEntry( - GetPdbConversionHistoryEntryRequest request, - com.oracle.bmc.database.model.PdbConversionHistoryEntry.LifecycleState - targetState, + LocalClonePluggableDatabaseRequest, LocalClonePluggableDatabaseResponse> + forLocalClonePluggableDatabase(LocalClonePluggableDatabaseRequest request) { + return forLocalClonePluggableDatabase( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + LocalClonePluggableDatabaseRequest, LocalClonePluggableDatabaseResponse> + forLocalClonePluggableDatabase( + LocalClonePluggableDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { - com.oracle.bmc.util.internal.Validate.notNull( - targetState, "The targetState cannot be null"); + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public LocalClonePluggableDatabaseResponse call() throws Exception { + final LocalClonePluggableDatabaseResponse response = + client.localClonePluggableDatabase(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } - return forPdbConversionHistoryEntry( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + MigrateExadataDbSystemResourceModelRequest, + MigrateExadataDbSystemResourceModelResponse> + forMigrateExadataDbSystemResourceModel( + MigrateExadataDbSystemResourceModelRequest request) { + return forMigrateExadataDbSystemResourceModel( request, - targetState); + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** @@ -11432,61 +14820,46 @@ public boolean test(GetOneoffPatchResponse response) { * @param request the request to send * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetPdbConversionHistoryEntryRequest, GetPdbConversionHistoryEntryResponse> - forPdbConversionHistoryEntry( - GetPdbConversionHistoryEntryRequest request, + MigrateExadataDbSystemResourceModelRequest, + MigrateExadataDbSystemResourceModelResponse> + forMigrateExadataDbSystemResourceModel( + MigrateExadataDbSystemResourceModelRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.PdbConversionHistoryEntry.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one target state must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null target states are not permitted"); - - return forPdbConversionHistoryEntry( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), - request, - targetStates); - } - - // Helper method to create a new Waiter for PdbConversionHistoryEntry. - private com.oracle.bmc.waiter.Waiter< - GetPdbConversionHistoryEntryRequest, GetPdbConversionHistoryEntryResponse> - forPdbConversionHistoryEntry( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetPdbConversionHistoryEntryRequest request, - final com.oracle.bmc.database.model.PdbConversionHistoryEntry.LifecycleState... - targetStates) { - final java.util.Set - targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - waiter.toCallable( - () -> request, - new java.util.function.Function< - GetPdbConversionHistoryEntryRequest, - GetPdbConversionHistoryEntryResponse>() { - @Override - public GetPdbConversionHistoryEntryResponse apply( - GetPdbConversionHistoryEntryRequest request) { - return client.getPdbConversionHistoryEntry(request); - } - }, - new java.util.function.Predicate() { - @Override - public boolean test(GetPdbConversionHistoryEntryResponse response) { - return targetStatesSet.contains( - response.getPdbConversionHistoryEntry() - .getLifecycleState()); - } - }, - false), + new java.util.concurrent.Callable() { + @Override + public MigrateExadataDbSystemResourceModelResponse call() throws Exception { + final MigrateExadataDbSystemResourceModelResponse response = + client.migrateExadataDbSystemResourceModel(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, request); } @@ -11494,45 +14867,75 @@ public boolean test(GetPdbConversionHistoryEntryResponse response) { * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * * @param request the request to send - * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states - * @return a new {@code Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forPluggableDatabase( - GetPluggableDatabaseRequest request, - com.oracle.bmc.database.model.PluggableDatabase.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one targetState must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null targetState values are not permitted"); - - return forPluggableDatabase( - com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + public com.oracle.bmc.waiter.Waiter + forMigrateVaultKey(MigrateVaultKeyRequest request) { + return forMigrateVaultKey( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. * * @param request the request to send - * @param targetState the desired state to wait for * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forPluggableDatabase( - GetPluggableDatabaseRequest request, - com.oracle.bmc.database.model.PluggableDatabase.LifecycleState targetState, + public com.oracle.bmc.waiter.Waiter + forMigrateVaultKey( + MigrateVaultKeyRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { - com.oracle.bmc.util.internal.Validate.notNull( - targetState, "The targetState cannot be null"); + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } - return forPluggableDatabase( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public MigrateVaultKeyResponse call() throws Exception { + final MigrateVaultKeyResponse response = client.migrateVaultKey(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + ModifyDatabaseManagementRequest, ModifyDatabaseManagementResponse> + forModifyDatabaseManagement(ModifyDatabaseManagementRequest request) { + return forModifyDatabaseManagement( request, - targetState); + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** @@ -11541,59 +14944,45 @@ public boolean test(GetPdbConversionHistoryEntryResponse response) { * @param request the request to send * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forPluggableDatabase( - GetPluggableDatabaseRequest request, + public com.oracle.bmc.waiter.Waiter< + ModifyDatabaseManagementRequest, ModifyDatabaseManagementResponse> + forModifyDatabaseManagement( + ModifyDatabaseManagementRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.PluggableDatabase.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one target state must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null target states are not permitted"); - - return forPluggableDatabase( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), - request, - targetStates); - } - - // Helper method to create a new Waiter for PluggableDatabase. - private com.oracle.bmc.waiter.Waiter - forPluggableDatabase( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetPluggableDatabaseRequest request, - final com.oracle.bmc.database.model.PluggableDatabase.LifecycleState... - targetStates) { - final java.util.Set - targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - waiter.toCallable( - () -> request, - new java.util.function.Function< - GetPluggableDatabaseRequest, GetPluggableDatabaseResponse>() { - @Override - public GetPluggableDatabaseResponse apply( - GetPluggableDatabaseRequest request) { - return client.getPluggableDatabase(request); - } - }, - new java.util.function.Predicate() { - @Override - public boolean test(GetPluggableDatabaseResponse response) { - return targetStatesSet.contains( - response.getPluggableDatabase().getLifecycleState()); - } - }, - targetStatesSet.contains( - com.oracle.bmc.database.model.PluggableDatabase.LifecycleState - .Terminated)), + new java.util.concurrent.Callable() { + @Override + public ModifyDatabaseManagementResponse call() throws Exception { + final ModifyDatabaseManagementResponse response = + client.modifyDatabaseManagement(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, request); } @@ -11601,42 +14990,16 @@ public boolean test(GetPluggableDatabaseResponse response) { * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * * @param request the request to send - * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states - * @return a new {@code Waiter} instance - */ - public com.oracle.bmc.waiter.Waiter forVmCluster( - GetVmClusterRequest request, - com.oracle.bmc.database.model.VmCluster.LifecycleState... targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one targetState must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null targetState values are not permitted"); - - return forVmCluster( - com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); - } - - /** - * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. - * - * @param request the request to send - * @param targetState the desired state to wait for - * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use - * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forVmCluster( - GetVmClusterRequest request, - com.oracle.bmc.database.model.VmCluster.LifecycleState targetState, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { - com.oracle.bmc.util.internal.Validate.notNull( - targetState, "The targetState cannot be null"); - - return forVmCluster( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + public com.oracle.bmc.waiter.Waiter< + ModifyPluggableDatabaseManagementRequest, + ModifyPluggableDatabaseManagementResponse> + forModifyPluggableDatabaseManagement(ModifyPluggableDatabaseManagementRequest request) { + return forModifyPluggableDatabaseManagement( request, - targetState); + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** @@ -11645,53 +15008,46 @@ public com.oracle.bmc.waiter.Waiter f * @param request the request to send * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forVmCluster( - GetVmClusterRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.VmCluster.LifecycleState... targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one target state must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null target states are not permitted"); - - return forVmCluster( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), - request, - targetStates); - } - - // Helper method to create a new Waiter for VmCluster. - private com.oracle.bmc.waiter.Waiter forVmCluster( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetVmClusterRequest request, - final com.oracle.bmc.database.model.VmCluster.LifecycleState... targetStates) { - final java.util.Set - targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + public com.oracle.bmc.waiter.Waiter< + ModifyPluggableDatabaseManagementRequest, + ModifyPluggableDatabaseManagementResponse> + forModifyPluggableDatabaseManagement( + ModifyPluggableDatabaseManagementRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - waiter.toCallable( - () -> request, - new java.util.function.Function< - GetVmClusterRequest, GetVmClusterResponse>() { - @Override - public GetVmClusterResponse apply(GetVmClusterRequest request) { - return client.getVmCluster(request); - } - }, - new java.util.function.Predicate() { - @Override - public boolean test(GetVmClusterResponse response) { - return targetStatesSet.contains( - response.getVmCluster().getLifecycleState()); - } - }, - targetStatesSet.contains( - com.oracle.bmc.database.model.VmCluster.LifecycleState.Terminated)), + new java.util.concurrent.Callable() { + @Override + public ModifyPluggableDatabaseManagementResponse call() throws Exception { + final ModifyPluggableDatabaseManagementResponse response = + client.modifyPluggableDatabaseManagement(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, request); } @@ -11699,44 +15055,78 @@ public boolean test(GetVmClusterResponse response) { * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * * @param request the request to send - * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states - * @return a new {@code Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forVmClusterNetwork( - GetVmClusterNetworkRequest request, - com.oracle.bmc.database.model.VmClusterNetwork.LifecycleState... targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one targetState must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null targetState values are not permitted"); - - return forVmClusterNetwork( - com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + public com.oracle.bmc.waiter.Waiter< + MoveExecutionActionMemberRequest, MoveExecutionActionMemberResponse> + forMoveExecutionActionMember(MoveExecutionActionMemberRequest request) { + return forMoveExecutionActionMember( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. * * @param request the request to send - * @param targetState the desired state to wait for * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forVmClusterNetwork( - GetVmClusterNetworkRequest request, - com.oracle.bmc.database.model.VmClusterNetwork.LifecycleState targetState, + public com.oracle.bmc.waiter.Waiter< + MoveExecutionActionMemberRequest, MoveExecutionActionMemberResponse> + forMoveExecutionActionMember( + MoveExecutionActionMemberRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { - com.oracle.bmc.util.internal.Validate.notNull( - targetState, "The targetState cannot be null"); + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } - return forVmClusterNetwork( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public MoveExecutionActionMemberResponse call() throws Exception { + final MoveExecutionActionMemberResponse response = + client.moveExecutionActionMember(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + RefreshPluggableDatabaseRequest, RefreshPluggableDatabaseResponse> + forRefreshPluggableDatabase(RefreshPluggableDatabaseRequest request) { + return forRefreshPluggableDatabase( request, - targetState); + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** @@ -11745,58 +15135,45 @@ public boolean test(GetVmClusterResponse response) { * @param request the request to send * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forVmClusterNetwork( - GetVmClusterNetworkRequest request, + public com.oracle.bmc.waiter.Waiter< + RefreshPluggableDatabaseRequest, RefreshPluggableDatabaseResponse> + forRefreshPluggableDatabase( + RefreshPluggableDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.VmClusterNetwork.LifecycleState... targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one target state must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null target states are not permitted"); - - return forVmClusterNetwork( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), - request, - targetStates); - } - - // Helper method to create a new Waiter for VmClusterNetwork. - private com.oracle.bmc.waiter.Waiter - forVmClusterNetwork( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetVmClusterNetworkRequest request, - final com.oracle.bmc.database.model.VmClusterNetwork.LifecycleState... - targetStates) { - final java.util.Set - targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - waiter.toCallable( - () -> request, - new java.util.function.Function< - GetVmClusterNetworkRequest, GetVmClusterNetworkResponse>() { - @Override - public GetVmClusterNetworkResponse apply( - GetVmClusterNetworkRequest request) { - return client.getVmClusterNetwork(request); - } - }, - new java.util.function.Predicate() { - @Override - public boolean test(GetVmClusterNetworkResponse response) { - return targetStatesSet.contains( - response.getVmClusterNetwork().getLifecycleState()); - } - }, - targetStatesSet.contains( - com.oracle.bmc.database.model.VmClusterNetwork.LifecycleState - .Terminated)), + new java.util.concurrent.Callable() { + @Override + public RefreshPluggableDatabaseResponse call() throws Exception { + final RefreshPluggableDatabaseResponse response = + client.refreshPluggableDatabase(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, request); } @@ -11804,44 +15181,83 @@ public boolean test(GetVmClusterNetworkResponse response) { * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * * @param request the request to send - * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states - * @return a new {@code Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forVmClusterUpdate( - GetVmClusterUpdateRequest request, - com.oracle.bmc.database.model.VmClusterUpdate.LifecycleState... targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one targetState must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null targetState values are not permitted"); - - return forVmClusterUpdate( - com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + public com.oracle.bmc.waiter.Waiter< + RegisterAutonomousDatabaseDataSafeRequest, + RegisterAutonomousDatabaseDataSafeResponse> + forRegisterAutonomousDatabaseDataSafe( + RegisterAutonomousDatabaseDataSafeRequest request) { + return forRegisterAutonomousDatabaseDataSafe( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. * * @param request the request to send - * @param targetState the desired state to wait for * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forVmClusterUpdate( - GetVmClusterUpdateRequest request, - com.oracle.bmc.database.model.VmClusterUpdate.LifecycleState targetState, + public com.oracle.bmc.waiter.Waiter< + RegisterAutonomousDatabaseDataSafeRequest, + RegisterAutonomousDatabaseDataSafeResponse> + forRegisterAutonomousDatabaseDataSafe( + RegisterAutonomousDatabaseDataSafeRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { - com.oracle.bmc.util.internal.Validate.notNull( - targetState, "The targetState cannot be null"); + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } - return forVmClusterUpdate( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public RegisterAutonomousDatabaseDataSafeResponse call() throws Exception { + final RegisterAutonomousDatabaseDataSafeResponse response = + client.registerAutonomousDatabaseDataSafe(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + ReinstateAutonomousContainerDatabaseDataguardAssociationRequest, + ReinstateAutonomousContainerDatabaseDataguardAssociationResponse> + forReinstateAutonomousContainerDatabaseDataguardAssociation( + ReinstateAutonomousContainerDatabaseDataguardAssociationRequest request) { + return forReinstateAutonomousContainerDatabaseDataguardAssociation( request, - targetState); + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** @@ -11850,56 +15266,51 @@ public boolean test(GetVmClusterNetworkResponse response) { * @param request the request to send * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forVmClusterUpdate( - GetVmClusterUpdateRequest request, + public com.oracle.bmc.waiter.Waiter< + ReinstateAutonomousContainerDatabaseDataguardAssociationRequest, + ReinstateAutonomousContainerDatabaseDataguardAssociationResponse> + forReinstateAutonomousContainerDatabaseDataguardAssociation( + ReinstateAutonomousContainerDatabaseDataguardAssociationRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.VmClusterUpdate.LifecycleState... targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one target state must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null target states are not permitted"); - - return forVmClusterUpdate( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), - request, - targetStates); - } - - // Helper method to create a new Waiter for VmClusterUpdate. - private com.oracle.bmc.waiter.Waiter - forVmClusterUpdate( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetVmClusterUpdateRequest request, - final com.oracle.bmc.database.model.VmClusterUpdate.LifecycleState... - targetStates) { - final java.util.Set - targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - waiter.toCallable( - () -> request, - new java.util.function.Function< - GetVmClusterUpdateRequest, GetVmClusterUpdateResponse>() { - @Override - public GetVmClusterUpdateResponse apply( - GetVmClusterUpdateRequest request) { - return client.getVmClusterUpdate(request); - } - }, - new java.util.function.Predicate() { - @Override - public boolean test(GetVmClusterUpdateResponse response) { - return targetStatesSet.contains( - response.getVmClusterUpdate().getLifecycleState()); - } - }, - false), + new java.util.concurrent.Callable< + ReinstateAutonomousContainerDatabaseDataguardAssociationResponse>() { + @Override + public ReinstateAutonomousContainerDatabaseDataguardAssociationResponse call() + throws Exception { + final ReinstateAutonomousContainerDatabaseDataguardAssociationResponse + response = + client + .reinstateAutonomousContainerDatabaseDataguardAssociation( + request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, request); } @@ -11907,48 +15318,78 @@ public boolean test(GetVmClusterUpdateResponse response) { * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * * @param request the request to send - * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states - * @return a new {@code Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetVmClusterUpdateHistoryEntryRequest, GetVmClusterUpdateHistoryEntryResponse> - forVmClusterUpdateHistoryEntry( - GetVmClusterUpdateHistoryEntryRequest request, - com.oracle.bmc.database.model.VmClusterUpdateHistoryEntry.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one targetState must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null targetState values are not permitted"); + ReinstateDataGuardAssociationRequest, ReinstateDataGuardAssociationResponse> + forReinstateDataGuardAssociation(ReinstateDataGuardAssociationRequest request) { + return forReinstateDataGuardAssociation( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } - return forVmClusterUpdateHistoryEntry( - com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + ReinstateDataGuardAssociationRequest, ReinstateDataGuardAssociationResponse> + forReinstateDataGuardAssociation( + ReinstateDataGuardAssociationRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public ReinstateDataGuardAssociationResponse call() throws Exception { + final ReinstateDataGuardAssociationResponse response = + client.reinstateDataGuardAssociation(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); } /** - * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * * @param request the request to send - * @param targetState the desired state to wait for - * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use - * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetVmClusterUpdateHistoryEntryRequest, GetVmClusterUpdateHistoryEntryResponse> - forVmClusterUpdateHistoryEntry( - GetVmClusterUpdateHistoryEntryRequest request, - com.oracle.bmc.database.model.VmClusterUpdateHistoryEntry.LifecycleState - targetState, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { - com.oracle.bmc.util.internal.Validate.notNull( - targetState, "The targetState cannot be null"); - - return forVmClusterUpdateHistoryEntry( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + RemoteClonePluggableDatabaseRequest, RemoteClonePluggableDatabaseResponse> + forRemoteClonePluggableDatabase(RemoteClonePluggableDatabaseRequest request) { + return forRemoteClonePluggableDatabase( request, - targetState); + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); } /** @@ -11957,63 +15398,45 @@ public boolean test(GetVmClusterUpdateResponse response) { * @param request the request to send * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use - * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states - * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - GetVmClusterUpdateHistoryEntryRequest, GetVmClusterUpdateHistoryEntryResponse> - forVmClusterUpdateHistoryEntry( - GetVmClusterUpdateHistoryEntryRequest request, + RemoteClonePluggableDatabaseRequest, RemoteClonePluggableDatabaseResponse> + forRemoteClonePluggableDatabase( + RemoteClonePluggableDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy, - com.oracle.bmc.database.model.VmClusterUpdateHistoryEntry.LifecycleState... - targetStates) { - com.oracle.bmc.util.internal.Validate.notEmpty( - targetStates, "At least one target state must be provided"); - com.oracle.bmc.util.internal.Validate.noNullElements( - targetStates, "Null target states are not permitted"); - - return forVmClusterUpdateHistoryEntry( - com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), - request, - targetStates); - } - - // Helper method to create a new Waiter for VmClusterUpdateHistoryEntry. - private com.oracle.bmc.waiter.Waiter< - GetVmClusterUpdateHistoryEntryRequest, GetVmClusterUpdateHistoryEntryResponse> - forVmClusterUpdateHistoryEntry( - com.oracle.bmc.waiter.BmcGenericWaiter waiter, - final GetVmClusterUpdateHistoryEntryRequest request, - final com.oracle.bmc.database.model.VmClusterUpdateHistoryEntry - .LifecycleState... - targetStates) { - final java.util.Set< - com.oracle.bmc.database.model.VmClusterUpdateHistoryEntry.LifecycleState> - targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - waiter.toCallable( - () -> request, - new java.util.function.Function< - GetVmClusterUpdateHistoryEntryRequest, - GetVmClusterUpdateHistoryEntryResponse>() { - @Override - public GetVmClusterUpdateHistoryEntryResponse apply( - GetVmClusterUpdateHistoryEntryRequest request) { - return client.getVmClusterUpdateHistoryEntry(request); - } - }, - new java.util.function.Predicate() { - @Override - public boolean test(GetVmClusterUpdateHistoryEntryResponse response) { - return targetStatesSet.contains( - response.getVmClusterUpdateHistoryEntry() - .getLifecycleState()); - } - }, - false), + new java.util.concurrent.Callable() { + @Override + public RemoteClonePluggableDatabaseResponse call() throws Exception { + final RemoteClonePluggableDatabaseResponse response = + client.remoteClonePluggableDatabase(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, request); } @@ -12024,11 +15447,11 @@ public boolean test(GetVmClusterUpdateHistoryEntryResponse response) { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - LaunchAutonomousExadataInfrastructureRequest, - LaunchAutonomousExadataInfrastructureResponse> - forLaunchAutonomousExadataInfrastructure( - LaunchAutonomousExadataInfrastructureRequest request) { - return forLaunchAutonomousExadataInfrastructure( + RemoveVirtualMachineFromCloudVmClusterRequest, + RemoveVirtualMachineFromCloudVmClusterResponse> + forRemoveVirtualMachineFromCloudVmCluster( + RemoveVirtualMachineFromCloudVmClusterRequest request) { + return forRemoveVirtualMachineFromCloudVmCluster( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -12043,10 +15466,10 @@ public boolean test(GetVmClusterUpdateHistoryEntryResponse response) { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - LaunchAutonomousExadataInfrastructureRequest, - LaunchAutonomousExadataInfrastructureResponse> - forLaunchAutonomousExadataInfrastructure( - LaunchAutonomousExadataInfrastructureRequest request, + RemoveVirtualMachineFromCloudVmClusterRequest, + RemoveVirtualMachineFromCloudVmClusterResponse> + forRemoveVirtualMachineFromCloudVmCluster( + RemoveVirtualMachineFromCloudVmClusterRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -12056,11 +15479,12 @@ public boolean test(GetVmClusterUpdateHistoryEntryResponse response) { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + RemoveVirtualMachineFromCloudVmClusterResponse>() { @Override - public LaunchAutonomousExadataInfrastructureResponse call() throws Exception { - final LaunchAutonomousExadataInfrastructureResponse response = - client.launchAutonomousExadataInfrastructure(request); + public RemoveVirtualMachineFromCloudVmClusterResponse call() throws Exception { + final RemoveVirtualMachineFromCloudVmClusterResponse response = + client.removeVirtualMachineFromCloudVmCluster(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -12089,9 +15513,12 @@ public LaunchAutonomousExadataInfrastructureResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forLaunchDbSystem(LaunchDbSystemRequest request) { - return forLaunchDbSystem( + public com.oracle.bmc.waiter.Waiter< + RemoveVirtualMachineFromExadbVmClusterRequest, + RemoveVirtualMachineFromExadbVmClusterResponse> + forRemoveVirtualMachineFromExadbVmCluster( + RemoveVirtualMachineFromExadbVmClusterRequest request) { + return forRemoveVirtualMachineFromExadbVmCluster( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -12105,9 +15532,11 @@ public LaunchAutonomousExadataInfrastructureResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forLaunchDbSystem( - LaunchDbSystemRequest request, + public com.oracle.bmc.waiter.Waiter< + RemoveVirtualMachineFromExadbVmClusterRequest, + RemoveVirtualMachineFromExadbVmClusterResponse> + forRemoveVirtualMachineFromExadbVmCluster( + RemoveVirtualMachineFromExadbVmClusterRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -12117,10 +15546,12 @@ public LaunchAutonomousExadataInfrastructureResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + RemoveVirtualMachineFromExadbVmClusterResponse>() { @Override - public LaunchDbSystemResponse call() throws Exception { - final LaunchDbSystemResponse response = client.launchDbSystem(request); + public RemoveVirtualMachineFromExadbVmClusterResponse call() throws Exception { + final RemoveVirtualMachineFromExadbVmClusterResponse response = + client.removeVirtualMachineFromExadbVmCluster(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -12150,9 +15581,10 @@ public LaunchDbSystemResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - LocalClonePluggableDatabaseRequest, LocalClonePluggableDatabaseResponse> - forLocalClonePluggableDatabase(LocalClonePluggableDatabaseRequest request) { - return forLocalClonePluggableDatabase( + RemoveVirtualMachineFromVmClusterRequest, + RemoveVirtualMachineFromVmClusterResponse> + forRemoveVirtualMachineFromVmCluster(RemoveVirtualMachineFromVmClusterRequest request) { + return forRemoveVirtualMachineFromVmCluster( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -12167,9 +15599,10 @@ public LaunchDbSystemResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - LocalClonePluggableDatabaseRequest, LocalClonePluggableDatabaseResponse> - forLocalClonePluggableDatabase( - LocalClonePluggableDatabaseRequest request, + RemoveVirtualMachineFromVmClusterRequest, + RemoveVirtualMachineFromVmClusterResponse> + forRemoveVirtualMachineFromVmCluster( + RemoveVirtualMachineFromVmClusterRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -12179,11 +15612,11 @@ public LaunchDbSystemResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public LocalClonePluggableDatabaseResponse call() throws Exception { - final LocalClonePluggableDatabaseResponse response = - client.localClonePluggableDatabase(request); + public RemoveVirtualMachineFromVmClusterResponse call() throws Exception { + final RemoveVirtualMachineFromVmClusterResponse response = + client.removeVirtualMachineFromVmCluster(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -12213,11 +15646,9 @@ public LocalClonePluggableDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - MigrateExadataDbSystemResourceModelRequest, - MigrateExadataDbSystemResourceModelResponse> - forMigrateExadataDbSystemResourceModel( - MigrateExadataDbSystemResourceModelRequest request) { - return forMigrateExadataDbSystemResourceModel( + ReorderExecutionActionsRequest, ReorderExecutionActionsResponse> + forReorderExecutionActions(ReorderExecutionActionsRequest request) { + return forReorderExecutionActions( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -12232,10 +15663,9 @@ public LocalClonePluggableDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - MigrateExadataDbSystemResourceModelRequest, - MigrateExadataDbSystemResourceModelResponse> - forMigrateExadataDbSystemResourceModel( - MigrateExadataDbSystemResourceModelRequest request, + ReorderExecutionActionsRequest, ReorderExecutionActionsResponse> + forReorderExecutionActions( + ReorderExecutionActionsRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -12245,11 +15675,11 @@ public LocalClonePluggableDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public MigrateExadataDbSystemResourceModelResponse call() throws Exception { - final MigrateExadataDbSystemResourceModelResponse response = - client.migrateExadataDbSystemResourceModel(request); + public ReorderExecutionActionsResponse call() throws Exception { + final ReorderExecutionActionsResponse response = + client.reorderExecutionActions(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -12278,9 +15708,10 @@ public MigrateExadataDbSystemResourceModelResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forMigrateVaultKey(MigrateVaultKeyRequest request) { - return forMigrateVaultKey( + public com.oracle.bmc.waiter.Waiter< + ReorderScheduledActionsRequest, ReorderScheduledActionsResponse> + forReorderScheduledActions(ReorderScheduledActionsRequest request) { + return forReorderScheduledActions( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -12294,9 +15725,10 @@ public MigrateExadataDbSystemResourceModelResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forMigrateVaultKey( - MigrateVaultKeyRequest request, + public com.oracle.bmc.waiter.Waiter< + ReorderScheduledActionsRequest, ReorderScheduledActionsResponse> + forReorderScheduledActions( + ReorderScheduledActionsRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -12306,10 +15738,11 @@ public MigrateExadataDbSystemResourceModelResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public MigrateVaultKeyResponse call() throws Exception { - final MigrateVaultKeyResponse response = client.migrateVaultKey(request); + public ReorderScheduledActionsResponse call() throws Exception { + final ReorderScheduledActionsResponse response = + client.reorderScheduledActions(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -12339,9 +15772,9 @@ public MigrateVaultKeyResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ModifyDatabaseManagementRequest, ModifyDatabaseManagementResponse> - forModifyDatabaseManagement(ModifyDatabaseManagementRequest request) { - return forModifyDatabaseManagement( + ResizeVmClusterNetworkRequest, ResizeVmClusterNetworkResponse> + forResizeVmClusterNetwork(ResizeVmClusterNetworkRequest request) { + return forResizeVmClusterNetwork( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -12356,9 +15789,9 @@ public MigrateVaultKeyResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ModifyDatabaseManagementRequest, ModifyDatabaseManagementResponse> - forModifyDatabaseManagement( - ModifyDatabaseManagementRequest request, + ResizeVmClusterNetworkRequest, ResizeVmClusterNetworkResponse> + forResizeVmClusterNetwork( + ResizeVmClusterNetworkRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -12368,11 +15801,11 @@ public MigrateVaultKeyResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public ModifyDatabaseManagementResponse call() throws Exception { - final ModifyDatabaseManagementResponse response = - client.modifyDatabaseManagement(request); + public ResizeVmClusterNetworkResponse call() throws Exception { + final ResizeVmClusterNetworkResponse response = + client.resizeVmClusterNetwork(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -12402,10 +15835,11 @@ public ModifyDatabaseManagementResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ModifyPluggableDatabaseManagementRequest, - ModifyPluggableDatabaseManagementResponse> - forModifyPluggableDatabaseManagement(ModifyPluggableDatabaseManagementRequest request) { - return forModifyPluggableDatabaseManagement( + RestartAutonomousContainerDatabaseRequest, + RestartAutonomousContainerDatabaseResponse> + forRestartAutonomousContainerDatabase( + RestartAutonomousContainerDatabaseRequest request) { + return forRestartAutonomousContainerDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -12420,10 +15854,10 @@ public ModifyDatabaseManagementResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ModifyPluggableDatabaseManagementRequest, - ModifyPluggableDatabaseManagementResponse> - forModifyPluggableDatabaseManagement( - ModifyPluggableDatabaseManagementRequest request, + RestartAutonomousContainerDatabaseRequest, + RestartAutonomousContainerDatabaseResponse> + forRestartAutonomousContainerDatabase( + RestartAutonomousContainerDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -12433,11 +15867,11 @@ public ModifyDatabaseManagementResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public ModifyPluggableDatabaseManagementResponse call() throws Exception { - final ModifyPluggableDatabaseManagementResponse response = - client.modifyPluggableDatabaseManagement(request); + public RestartAutonomousContainerDatabaseResponse call() throws Exception { + final RestartAutonomousContainerDatabaseResponse response = + client.restartAutonomousContainerDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -12467,9 +15901,9 @@ public ModifyPluggableDatabaseManagementResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RefreshPluggableDatabaseRequest, RefreshPluggableDatabaseResponse> - forRefreshPluggableDatabase(RefreshPluggableDatabaseRequest request) { - return forRefreshPluggableDatabase( + RestartAutonomousDatabaseRequest, RestartAutonomousDatabaseResponse> + forRestartAutonomousDatabase(RestartAutonomousDatabaseRequest request) { + return forRestartAutonomousDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -12484,9 +15918,9 @@ public ModifyPluggableDatabaseManagementResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RefreshPluggableDatabaseRequest, RefreshPluggableDatabaseResponse> - forRefreshPluggableDatabase( - RefreshPluggableDatabaseRequest request, + RestartAutonomousDatabaseRequest, RestartAutonomousDatabaseResponse> + forRestartAutonomousDatabase( + RestartAutonomousDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -12496,11 +15930,11 @@ public ModifyPluggableDatabaseManagementResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public RefreshPluggableDatabaseResponse call() throws Exception { - final RefreshPluggableDatabaseResponse response = - client.refreshPluggableDatabase(request); + public RestartAutonomousDatabaseResponse call() throws Exception { + final RestartAutonomousDatabaseResponse response = + client.restartAutonomousDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -12530,11 +15964,9 @@ public RefreshPluggableDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RegisterAutonomousDatabaseDataSafeRequest, - RegisterAutonomousDatabaseDataSafeResponse> - forRegisterAutonomousDatabaseDataSafe( - RegisterAutonomousDatabaseDataSafeRequest request) { - return forRegisterAutonomousDatabaseDataSafe( + RestoreAutonomousDatabaseRequest, RestoreAutonomousDatabaseResponse> + forRestoreAutonomousDatabase(RestoreAutonomousDatabaseRequest request) { + return forRestoreAutonomousDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -12549,10 +15981,9 @@ public RefreshPluggableDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RegisterAutonomousDatabaseDataSafeRequest, - RegisterAutonomousDatabaseDataSafeResponse> - forRegisterAutonomousDatabaseDataSafe( - RegisterAutonomousDatabaseDataSafeRequest request, + RestoreAutonomousDatabaseRequest, RestoreAutonomousDatabaseResponse> + forRestoreAutonomousDatabase( + RestoreAutonomousDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -12562,11 +15993,11 @@ public RefreshPluggableDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public RegisterAutonomousDatabaseDataSafeResponse call() throws Exception { - final RegisterAutonomousDatabaseDataSafeResponse response = - client.registerAutonomousDatabaseDataSafe(request); + public RestoreAutonomousDatabaseResponse call() throws Exception { + final RestoreAutonomousDatabaseResponse response = + client.restoreAutonomousDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -12595,12 +16026,9 @@ public RegisterAutonomousDatabaseDataSafeResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - ReinstateAutonomousContainerDatabaseDataguardAssociationRequest, - ReinstateAutonomousContainerDatabaseDataguardAssociationResponse> - forReinstateAutonomousContainerDatabaseDataguardAssociation( - ReinstateAutonomousContainerDatabaseDataguardAssociationRequest request) { - return forReinstateAutonomousContainerDatabaseDataguardAssociation( + public com.oracle.bmc.waiter.Waiter + forRestoreDatabase(RestoreDatabaseRequest request) { + return forRestoreDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -12614,11 +16042,9 @@ public RegisterAutonomousDatabaseDataSafeResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - ReinstateAutonomousContainerDatabaseDataguardAssociationRequest, - ReinstateAutonomousContainerDatabaseDataguardAssociationResponse> - forReinstateAutonomousContainerDatabaseDataguardAssociation( - ReinstateAutonomousContainerDatabaseDataguardAssociationRequest request, + public com.oracle.bmc.waiter.Waiter + forRestoreDatabase( + RestoreDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -12628,16 +16054,10 @@ public RegisterAutonomousDatabaseDataSafeResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - ReinstateAutonomousContainerDatabaseDataguardAssociationResponse>() { + new java.util.concurrent.Callable() { @Override - public ReinstateAutonomousContainerDatabaseDataguardAssociationResponse call() - throws Exception { - final ReinstateAutonomousContainerDatabaseDataguardAssociationResponse - response = - client - .reinstateAutonomousContainerDatabaseDataguardAssociation( - request); + public RestoreDatabaseResponse call() throws Exception { + final RestoreDatabaseResponse response = client.restoreDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -12667,9 +16087,11 @@ public ReinstateAutonomousContainerDatabaseDataguardAssociationResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ReinstateDataGuardAssociationRequest, ReinstateDataGuardAssociationResponse> - forReinstateDataGuardAssociation(ReinstateDataGuardAssociationRequest request) { - return forReinstateDataGuardAssociation( + RotateAutonomousContainerDatabaseEncryptionKeyRequest, + RotateAutonomousContainerDatabaseEncryptionKeyResponse> + forRotateAutonomousContainerDatabaseEncryptionKey( + RotateAutonomousContainerDatabaseEncryptionKeyRequest request) { + return forRotateAutonomousContainerDatabaseEncryptionKey( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -12684,9 +16106,10 @@ public ReinstateAutonomousContainerDatabaseDataguardAssociationResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ReinstateDataGuardAssociationRequest, ReinstateDataGuardAssociationResponse> - forReinstateDataGuardAssociation( - ReinstateDataGuardAssociationRequest request, + RotateAutonomousContainerDatabaseEncryptionKeyRequest, + RotateAutonomousContainerDatabaseEncryptionKeyResponse> + forRotateAutonomousContainerDatabaseEncryptionKey( + RotateAutonomousContainerDatabaseEncryptionKeyRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -12696,11 +16119,13 @@ public ReinstateAutonomousContainerDatabaseDataguardAssociationResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + RotateAutonomousContainerDatabaseEncryptionKeyResponse>() { @Override - public ReinstateDataGuardAssociationResponse call() throws Exception { - final ReinstateDataGuardAssociationResponse response = - client.reinstateDataGuardAssociation(request); + public RotateAutonomousContainerDatabaseEncryptionKeyResponse call() + throws Exception { + final RotateAutonomousContainerDatabaseEncryptionKeyResponse response = + client.rotateAutonomousContainerDatabaseEncryptionKey(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -12730,9 +16155,11 @@ public ReinstateDataGuardAssociationResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RemoteClonePluggableDatabaseRequest, RemoteClonePluggableDatabaseResponse> - forRemoteClonePluggableDatabase(RemoteClonePluggableDatabaseRequest request) { - return forRemoteClonePluggableDatabase( + RotateAutonomousDatabaseEncryptionKeyRequest, + RotateAutonomousDatabaseEncryptionKeyResponse> + forRotateAutonomousDatabaseEncryptionKey( + RotateAutonomousDatabaseEncryptionKeyRequest request) { + return forRotateAutonomousDatabaseEncryptionKey( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -12747,9 +16174,10 @@ public ReinstateDataGuardAssociationResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RemoteClonePluggableDatabaseRequest, RemoteClonePluggableDatabaseResponse> - forRemoteClonePluggableDatabase( - RemoteClonePluggableDatabaseRequest request, + RotateAutonomousDatabaseEncryptionKeyRequest, + RotateAutonomousDatabaseEncryptionKeyResponse> + forRotateAutonomousDatabaseEncryptionKey( + RotateAutonomousDatabaseEncryptionKeyRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -12759,11 +16187,11 @@ public ReinstateDataGuardAssociationResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public RemoteClonePluggableDatabaseResponse call() throws Exception { - final RemoteClonePluggableDatabaseResponse response = - client.remoteClonePluggableDatabase(request); + public RotateAutonomousDatabaseEncryptionKeyResponse call() throws Exception { + final RotateAutonomousDatabaseEncryptionKeyResponse response = + client.rotateAutonomousDatabaseEncryptionKey(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -12793,11 +16221,11 @@ public RemoteClonePluggableDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RemoveVirtualMachineFromCloudVmClusterRequest, - RemoveVirtualMachineFromCloudVmClusterResponse> - forRemoveVirtualMachineFromCloudVmCluster( - RemoveVirtualMachineFromCloudVmClusterRequest request) { - return forRemoveVirtualMachineFromCloudVmCluster( + RotateAutonomousVmClusterOrdsCertsRequest, + RotateAutonomousVmClusterOrdsCertsResponse> + forRotateAutonomousVmClusterOrdsCerts( + RotateAutonomousVmClusterOrdsCertsRequest request) { + return forRotateAutonomousVmClusterOrdsCerts( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -12812,10 +16240,10 @@ public RemoteClonePluggableDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RemoveVirtualMachineFromCloudVmClusterRequest, - RemoveVirtualMachineFromCloudVmClusterResponse> - forRemoveVirtualMachineFromCloudVmCluster( - RemoveVirtualMachineFromCloudVmClusterRequest request, + RotateAutonomousVmClusterOrdsCertsRequest, + RotateAutonomousVmClusterOrdsCertsResponse> + forRotateAutonomousVmClusterOrdsCerts( + RotateAutonomousVmClusterOrdsCertsRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -12825,12 +16253,11 @@ public RemoteClonePluggableDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - RemoveVirtualMachineFromCloudVmClusterResponse>() { + new java.util.concurrent.Callable() { @Override - public RemoveVirtualMachineFromCloudVmClusterResponse call() throws Exception { - final RemoveVirtualMachineFromCloudVmClusterResponse response = - client.removeVirtualMachineFromCloudVmCluster(request); + public RotateAutonomousVmClusterOrdsCertsResponse call() throws Exception { + final RotateAutonomousVmClusterOrdsCertsResponse response = + client.rotateAutonomousVmClusterOrdsCerts(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -12860,10 +16287,10 @@ public RemoveVirtualMachineFromCloudVmClusterResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RemoveVirtualMachineFromVmClusterRequest, - RemoveVirtualMachineFromVmClusterResponse> - forRemoveVirtualMachineFromVmCluster(RemoveVirtualMachineFromVmClusterRequest request) { - return forRemoveVirtualMachineFromVmCluster( + RotateAutonomousVmClusterSslCertsRequest, + RotateAutonomousVmClusterSslCertsResponse> + forRotateAutonomousVmClusterSslCerts(RotateAutonomousVmClusterSslCertsRequest request) { + return forRotateAutonomousVmClusterSslCerts( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -12878,10 +16305,10 @@ public RemoveVirtualMachineFromCloudVmClusterResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RemoveVirtualMachineFromVmClusterRequest, - RemoveVirtualMachineFromVmClusterResponse> - forRemoveVirtualMachineFromVmCluster( - RemoveVirtualMachineFromVmClusterRequest request, + RotateAutonomousVmClusterSslCertsRequest, + RotateAutonomousVmClusterSslCertsResponse> + forRotateAutonomousVmClusterSslCerts( + RotateAutonomousVmClusterSslCertsRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -12891,11 +16318,11 @@ public RemoveVirtualMachineFromCloudVmClusterResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public RemoveVirtualMachineFromVmClusterResponse call() throws Exception { - final RemoveVirtualMachineFromVmClusterResponse response = - client.removeVirtualMachineFromVmCluster(request); + public RotateAutonomousVmClusterSslCertsResponse call() throws Exception { + final RotateAutonomousVmClusterSslCertsResponse response = + client.rotateAutonomousVmClusterSslCerts(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -12925,9 +16352,11 @@ public RemoveVirtualMachineFromVmClusterResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ResizeVmClusterNetworkRequest, ResizeVmClusterNetworkResponse> - forResizeVmClusterNetwork(ResizeVmClusterNetworkRequest request) { - return forResizeVmClusterNetwork( + RotateCloudAutonomousVmClusterOrdsCertsRequest, + RotateCloudAutonomousVmClusterOrdsCertsResponse> + forRotateCloudAutonomousVmClusterOrdsCerts( + RotateCloudAutonomousVmClusterOrdsCertsRequest request) { + return forRotateCloudAutonomousVmClusterOrdsCerts( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -12942,9 +16371,10 @@ public RemoveVirtualMachineFromVmClusterResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ResizeVmClusterNetworkRequest, ResizeVmClusterNetworkResponse> - forResizeVmClusterNetwork( - ResizeVmClusterNetworkRequest request, + RotateCloudAutonomousVmClusterOrdsCertsRequest, + RotateCloudAutonomousVmClusterOrdsCertsResponse> + forRotateCloudAutonomousVmClusterOrdsCerts( + RotateCloudAutonomousVmClusterOrdsCertsRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -12954,11 +16384,12 @@ public RemoveVirtualMachineFromVmClusterResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + RotateCloudAutonomousVmClusterOrdsCertsResponse>() { @Override - public ResizeVmClusterNetworkResponse call() throws Exception { - final ResizeVmClusterNetworkResponse response = - client.resizeVmClusterNetwork(request); + public RotateCloudAutonomousVmClusterOrdsCertsResponse call() throws Exception { + final RotateCloudAutonomousVmClusterOrdsCertsResponse response = + client.rotateCloudAutonomousVmClusterOrdsCerts(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -12988,11 +16419,11 @@ public ResizeVmClusterNetworkResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RestartAutonomousContainerDatabaseRequest, - RestartAutonomousContainerDatabaseResponse> - forRestartAutonomousContainerDatabase( - RestartAutonomousContainerDatabaseRequest request) { - return forRestartAutonomousContainerDatabase( + RotateCloudAutonomousVmClusterSslCertsRequest, + RotateCloudAutonomousVmClusterSslCertsResponse> + forRotateCloudAutonomousVmClusterSslCerts( + RotateCloudAutonomousVmClusterSslCertsRequest request) { + return forRotateCloudAutonomousVmClusterSslCerts( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -13007,10 +16438,10 @@ public ResizeVmClusterNetworkResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RestartAutonomousContainerDatabaseRequest, - RestartAutonomousContainerDatabaseResponse> - forRestartAutonomousContainerDatabase( - RestartAutonomousContainerDatabaseRequest request, + RotateCloudAutonomousVmClusterSslCertsRequest, + RotateCloudAutonomousVmClusterSslCertsResponse> + forRotateCloudAutonomousVmClusterSslCerts( + RotateCloudAutonomousVmClusterSslCertsRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -13020,11 +16451,12 @@ public ResizeVmClusterNetworkResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + RotateCloudAutonomousVmClusterSslCertsResponse>() { @Override - public RestartAutonomousContainerDatabaseResponse call() throws Exception { - final RestartAutonomousContainerDatabaseResponse response = - client.restartAutonomousContainerDatabase(request); + public RotateCloudAutonomousVmClusterSslCertsResponse call() throws Exception { + final RotateCloudAutonomousVmClusterSslCertsResponse response = + client.rotateCloudAutonomousVmClusterSslCerts(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -13053,10 +16485,9 @@ public RestartAutonomousContainerDatabaseResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - RestartAutonomousDatabaseRequest, RestartAutonomousDatabaseResponse> - forRestartAutonomousDatabase(RestartAutonomousDatabaseRequest request) { - return forRestartAutonomousDatabase( + public com.oracle.bmc.waiter.Waiter + forRotateOrdsCerts(RotateOrdsCertsRequest request) { + return forRotateOrdsCerts( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -13070,10 +16501,9 @@ public RestartAutonomousContainerDatabaseResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - RestartAutonomousDatabaseRequest, RestartAutonomousDatabaseResponse> - forRestartAutonomousDatabase( - RestartAutonomousDatabaseRequest request, + public com.oracle.bmc.waiter.Waiter + forRotateOrdsCerts( + RotateOrdsCertsRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -13083,11 +16513,10 @@ public RestartAutonomousContainerDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public RestartAutonomousDatabaseResponse call() throws Exception { - final RestartAutonomousDatabaseResponse response = - client.restartAutonomousDatabase(request); + public RotateOrdsCertsResponse call() throws Exception { + final RotateOrdsCertsResponse response = client.rotateOrdsCerts(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -13117,9 +16546,11 @@ public RestartAutonomousDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RestoreAutonomousDatabaseRequest, RestoreAutonomousDatabaseResponse> - forRestoreAutonomousDatabase(RestoreAutonomousDatabaseRequest request) { - return forRestoreAutonomousDatabase( + RotatePluggableDatabaseEncryptionKeyRequest, + RotatePluggableDatabaseEncryptionKeyResponse> + forRotatePluggableDatabaseEncryptionKey( + RotatePluggableDatabaseEncryptionKeyRequest request) { + return forRotatePluggableDatabaseEncryptionKey( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -13134,9 +16565,10 @@ public RestartAutonomousDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RestoreAutonomousDatabaseRequest, RestoreAutonomousDatabaseResponse> - forRestoreAutonomousDatabase( - RestoreAutonomousDatabaseRequest request, + RotatePluggableDatabaseEncryptionKeyRequest, + RotatePluggableDatabaseEncryptionKeyResponse> + forRotatePluggableDatabaseEncryptionKey( + RotatePluggableDatabaseEncryptionKeyRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -13146,11 +16578,11 @@ public RestartAutonomousDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public RestoreAutonomousDatabaseResponse call() throws Exception { - final RestoreAutonomousDatabaseResponse response = - client.restoreAutonomousDatabase(request); + public RotatePluggableDatabaseEncryptionKeyResponse call() throws Exception { + final RotatePluggableDatabaseEncryptionKeyResponse response = + client.rotatePluggableDatabaseEncryptionKey(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -13179,9 +16611,9 @@ public RestoreAutonomousDatabaseResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forRestoreDatabase(RestoreDatabaseRequest request) { - return forRestoreDatabase( + public com.oracle.bmc.waiter.Waiter + forRotateSslCerts(RotateSslCertsRequest request) { + return forRotateSslCerts( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -13195,9 +16627,9 @@ public RestoreAutonomousDatabaseResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forRestoreDatabase( - RestoreDatabaseRequest request, + public com.oracle.bmc.waiter.Waiter + forRotateSslCerts( + RotateSslCertsRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -13207,10 +16639,10 @@ public RestoreAutonomousDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public RestoreDatabaseResponse call() throws Exception { - final RestoreDatabaseResponse response = client.restoreDatabase(request); + public RotateSslCertsResponse call() throws Exception { + final RotateSslCertsResponse response = client.rotateSslCerts(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -13239,12 +16671,9 @@ public RestoreDatabaseResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - RotateAutonomousContainerDatabaseEncryptionKeyRequest, - RotateAutonomousContainerDatabaseEncryptionKeyResponse> - forRotateAutonomousContainerDatabaseEncryptionKey( - RotateAutonomousContainerDatabaseEncryptionKeyRequest request) { - return forRotateAutonomousContainerDatabaseEncryptionKey( + public com.oracle.bmc.waiter.Waiter + forRotateVaultKey(RotateVaultKeyRequest request) { + return forRotateVaultKey( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -13258,11 +16687,9 @@ public RestoreDatabaseResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - RotateAutonomousContainerDatabaseEncryptionKeyRequest, - RotateAutonomousContainerDatabaseEncryptionKeyResponse> - forRotateAutonomousContainerDatabaseEncryptionKey( - RotateAutonomousContainerDatabaseEncryptionKeyRequest request, + public com.oracle.bmc.waiter.Waiter + forRotateVaultKey( + RotateVaultKeyRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -13272,13 +16699,10 @@ public RestoreDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - RotateAutonomousContainerDatabaseEncryptionKeyResponse>() { + new java.util.concurrent.Callable() { @Override - public RotateAutonomousContainerDatabaseEncryptionKeyResponse call() - throws Exception { - final RotateAutonomousContainerDatabaseEncryptionKeyResponse response = - client.rotateAutonomousContainerDatabaseEncryptionKey(request); + public RotateVaultKeyResponse call() throws Exception { + final RotateVaultKeyResponse response = client.rotateVaultKey(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -13308,11 +16732,11 @@ public RotateAutonomousContainerDatabaseEncryptionKeyResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RotateAutonomousDatabaseEncryptionKeyRequest, - RotateAutonomousDatabaseEncryptionKeyResponse> - forRotateAutonomousDatabaseEncryptionKey( - RotateAutonomousDatabaseEncryptionKeyRequest request) { - return forRotateAutonomousDatabaseEncryptionKey( + ScanExternalContainerDatabasePluggableDatabasesRequest, + ScanExternalContainerDatabasePluggableDatabasesResponse> + forScanExternalContainerDatabasePluggableDatabases( + ScanExternalContainerDatabasePluggableDatabasesRequest request) { + return forScanExternalContainerDatabasePluggableDatabases( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -13327,10 +16751,10 @@ public RotateAutonomousContainerDatabaseEncryptionKeyResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RotateAutonomousDatabaseEncryptionKeyRequest, - RotateAutonomousDatabaseEncryptionKeyResponse> - forRotateAutonomousDatabaseEncryptionKey( - RotateAutonomousDatabaseEncryptionKeyRequest request, + ScanExternalContainerDatabasePluggableDatabasesRequest, + ScanExternalContainerDatabasePluggableDatabasesResponse> + forScanExternalContainerDatabasePluggableDatabases( + ScanExternalContainerDatabasePluggableDatabasesRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -13340,11 +16764,13 @@ public RotateAutonomousContainerDatabaseEncryptionKeyResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + ScanExternalContainerDatabasePluggableDatabasesResponse>() { @Override - public RotateAutonomousDatabaseEncryptionKeyResponse call() throws Exception { - final RotateAutonomousDatabaseEncryptionKeyResponse response = - client.rotateAutonomousDatabaseEncryptionKey(request); + public ScanExternalContainerDatabasePluggableDatabasesResponse call() + throws Exception { + final ScanExternalContainerDatabasePluggableDatabasesResponse response = + client.scanExternalContainerDatabasePluggableDatabases(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -13373,12 +16799,9 @@ public RotateAutonomousDatabaseEncryptionKeyResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - RotateAutonomousVmClusterOrdsCertsRequest, - RotateAutonomousVmClusterOrdsCertsResponse> - forRotateAutonomousVmClusterOrdsCerts( - RotateAutonomousVmClusterOrdsCertsRequest request) { - return forRotateAutonomousVmClusterOrdsCerts( + public com.oracle.bmc.waiter.Waiter + forSetDbKeyVersion(SetDbKeyVersionRequest request) { + return forSetDbKeyVersion( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -13392,11 +16815,9 @@ public RotateAutonomousDatabaseEncryptionKeyResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - RotateAutonomousVmClusterOrdsCertsRequest, - RotateAutonomousVmClusterOrdsCertsResponse> - forRotateAutonomousVmClusterOrdsCerts( - RotateAutonomousVmClusterOrdsCertsRequest request, + public com.oracle.bmc.waiter.Waiter + forSetDbKeyVersion( + SetDbKeyVersionRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -13406,11 +16827,10 @@ public RotateAutonomousDatabaseEncryptionKeyResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public RotateAutonomousVmClusterOrdsCertsResponse call() throws Exception { - final RotateAutonomousVmClusterOrdsCertsResponse response = - client.rotateAutonomousVmClusterOrdsCerts(request); + public SetDbKeyVersionResponse call() throws Exception { + final SetDbKeyVersionResponse response = client.setDbKeyVersion(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -13439,11 +16859,9 @@ public RotateAutonomousVmClusterOrdsCertsResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - RotateAutonomousVmClusterSslCertsRequest, - RotateAutonomousVmClusterSslCertsResponse> - forRotateAutonomousVmClusterSslCerts(RotateAutonomousVmClusterSslCertsRequest request) { - return forRotateAutonomousVmClusterSslCerts( + public com.oracle.bmc.waiter.Waiter + forSetPdbKeyVersion(SetPdbKeyVersionRequest request) { + return forSetPdbKeyVersion( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -13457,11 +16875,9 @@ public RotateAutonomousVmClusterOrdsCertsResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - RotateAutonomousVmClusterSslCertsRequest, - RotateAutonomousVmClusterSslCertsResponse> - forRotateAutonomousVmClusterSslCerts( - RotateAutonomousVmClusterSslCertsRequest request, + public com.oracle.bmc.waiter.Waiter + forSetPdbKeyVersion( + SetPdbKeyVersionRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -13471,11 +16887,10 @@ public RotateAutonomousVmClusterOrdsCertsResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public RotateAutonomousVmClusterSslCertsResponse call() throws Exception { - final RotateAutonomousVmClusterSslCertsResponse response = - client.rotateAutonomousVmClusterSslCerts(request); + public SetPdbKeyVersionResponse call() throws Exception { + final SetPdbKeyVersionResponse response = client.setPdbKeyVersion(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -13505,11 +16920,9 @@ public RotateAutonomousVmClusterSslCertsResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RotateCloudAutonomousVmClusterOrdsCertsRequest, - RotateCloudAutonomousVmClusterOrdsCertsResponse> - forRotateCloudAutonomousVmClusterOrdsCerts( - RotateCloudAutonomousVmClusterOrdsCertsRequest request) { - return forRotateCloudAutonomousVmClusterOrdsCerts( + ShrinkAutonomousDatabaseRequest, ShrinkAutonomousDatabaseResponse> + forShrinkAutonomousDatabase(ShrinkAutonomousDatabaseRequest request) { + return forShrinkAutonomousDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -13524,10 +16937,9 @@ public RotateAutonomousVmClusterSslCertsResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RotateCloudAutonomousVmClusterOrdsCertsRequest, - RotateCloudAutonomousVmClusterOrdsCertsResponse> - forRotateCloudAutonomousVmClusterOrdsCerts( - RotateCloudAutonomousVmClusterOrdsCertsRequest request, + ShrinkAutonomousDatabaseRequest, ShrinkAutonomousDatabaseResponse> + forShrinkAutonomousDatabase( + ShrinkAutonomousDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -13537,12 +16949,11 @@ public RotateAutonomousVmClusterSslCertsResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - RotateCloudAutonomousVmClusterOrdsCertsResponse>() { + new java.util.concurrent.Callable() { @Override - public RotateCloudAutonomousVmClusterOrdsCertsResponse call() throws Exception { - final RotateCloudAutonomousVmClusterOrdsCertsResponse response = - client.rotateCloudAutonomousVmClusterOrdsCerts(request); + public ShrinkAutonomousDatabaseResponse call() throws Exception { + final ShrinkAutonomousDatabaseResponse response = + client.shrinkAutonomousDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -13572,11 +16983,9 @@ public RotateCloudAutonomousVmClusterOrdsCertsResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RotateCloudAutonomousVmClusterSslCertsRequest, - RotateCloudAutonomousVmClusterSslCertsResponse> - forRotateCloudAutonomousVmClusterSslCerts( - RotateCloudAutonomousVmClusterSslCertsRequest request) { - return forRotateCloudAutonomousVmClusterSslCerts( + StartAutonomousDatabaseRequest, StartAutonomousDatabaseResponse> + forStartAutonomousDatabase(StartAutonomousDatabaseRequest request) { + return forStartAutonomousDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -13591,10 +17000,9 @@ public RotateCloudAutonomousVmClusterOrdsCertsResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RotateCloudAutonomousVmClusterSslCertsRequest, - RotateCloudAutonomousVmClusterSslCertsResponse> - forRotateCloudAutonomousVmClusterSslCerts( - RotateCloudAutonomousVmClusterSslCertsRequest request, + StartAutonomousDatabaseRequest, StartAutonomousDatabaseResponse> + forStartAutonomousDatabase( + StartAutonomousDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -13604,12 +17012,11 @@ public RotateCloudAutonomousVmClusterOrdsCertsResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - RotateCloudAutonomousVmClusterSslCertsResponse>() { + new java.util.concurrent.Callable() { @Override - public RotateCloudAutonomousVmClusterSslCertsResponse call() throws Exception { - final RotateCloudAutonomousVmClusterSslCertsResponse response = - client.rotateCloudAutonomousVmClusterSslCerts(request); + public StartAutonomousDatabaseResponse call() throws Exception { + final StartAutonomousDatabaseResponse response = + client.startAutonomousDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -13638,9 +17045,10 @@ public RotateCloudAutonomousVmClusterSslCertsResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forRotateOrdsCerts(RotateOrdsCertsRequest request) { - return forRotateOrdsCerts( + public com.oracle.bmc.waiter.Waiter< + StartPluggableDatabaseRequest, StartPluggableDatabaseResponse> + forStartPluggableDatabase(StartPluggableDatabaseRequest request) { + return forStartPluggableDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -13654,9 +17062,10 @@ public RotateCloudAutonomousVmClusterSslCertsResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forRotateOrdsCerts( - RotateOrdsCertsRequest request, + public com.oracle.bmc.waiter.Waiter< + StartPluggableDatabaseRequest, StartPluggableDatabaseResponse> + forStartPluggableDatabase( + StartPluggableDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -13666,10 +17075,11 @@ public RotateCloudAutonomousVmClusterSslCertsResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public RotateOrdsCertsResponse call() throws Exception { - final RotateOrdsCertsResponse response = client.rotateOrdsCerts(request); + public StartPluggableDatabaseResponse call() throws Exception { + final StartPluggableDatabaseResponse response = + client.startPluggableDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -13699,11 +17109,9 @@ public RotateOrdsCertsResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RotatePluggableDatabaseEncryptionKeyRequest, - RotatePluggableDatabaseEncryptionKeyResponse> - forRotatePluggableDatabaseEncryptionKey( - RotatePluggableDatabaseEncryptionKeyRequest request) { - return forRotatePluggableDatabaseEncryptionKey( + StopAutonomousDatabaseRequest, StopAutonomousDatabaseResponse> + forStopAutonomousDatabase(StopAutonomousDatabaseRequest request) { + return forStopAutonomousDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -13718,10 +17126,9 @@ public RotateOrdsCertsResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - RotatePluggableDatabaseEncryptionKeyRequest, - RotatePluggableDatabaseEncryptionKeyResponse> - forRotatePluggableDatabaseEncryptionKey( - RotatePluggableDatabaseEncryptionKeyRequest request, + StopAutonomousDatabaseRequest, StopAutonomousDatabaseResponse> + forStopAutonomousDatabase( + StopAutonomousDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -13731,11 +17138,11 @@ public RotateOrdsCertsResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public RotatePluggableDatabaseEncryptionKeyResponse call() throws Exception { - final RotatePluggableDatabaseEncryptionKeyResponse response = - client.rotatePluggableDatabaseEncryptionKey(request); + public StopAutonomousDatabaseResponse call() throws Exception { + final StopAutonomousDatabaseResponse response = + client.stopAutonomousDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -13764,9 +17171,9 @@ public RotatePluggableDatabaseEncryptionKeyResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forRotateSslCerts(RotateSslCertsRequest request) { - return forRotateSslCerts( + public com.oracle.bmc.waiter.Waiter + forStopPluggableDatabase(StopPluggableDatabaseRequest request) { + return forStopPluggableDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -13780,9 +17187,9 @@ public RotatePluggableDatabaseEncryptionKeyResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forRotateSslCerts( - RotateSslCertsRequest request, + public com.oracle.bmc.waiter.Waiter + forStopPluggableDatabase( + StopPluggableDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -13792,10 +17199,11 @@ public RotatePluggableDatabaseEncryptionKeyResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public RotateSslCertsResponse call() throws Exception { - final RotateSslCertsResponse response = client.rotateSslCerts(request); + public StopPluggableDatabaseResponse call() throws Exception { + final StopPluggableDatabaseResponse response = + client.stopPluggableDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -13824,9 +17232,12 @@ public RotateSslCertsResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forRotateVaultKey(RotateVaultKeyRequest request) { - return forRotateVaultKey( + public com.oracle.bmc.waiter.Waiter< + SwitchoverAutonomousContainerDatabaseDataguardAssociationRequest, + SwitchoverAutonomousContainerDatabaseDataguardAssociationResponse> + forSwitchoverAutonomousContainerDatabaseDataguardAssociation( + SwitchoverAutonomousContainerDatabaseDataguardAssociationRequest request) { + return forSwitchoverAutonomousContainerDatabaseDataguardAssociation( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -13840,9 +17251,11 @@ public RotateSslCertsResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forRotateVaultKey( - RotateVaultKeyRequest request, + public com.oracle.bmc.waiter.Waiter< + SwitchoverAutonomousContainerDatabaseDataguardAssociationRequest, + SwitchoverAutonomousContainerDatabaseDataguardAssociationResponse> + forSwitchoverAutonomousContainerDatabaseDataguardAssociation( + SwitchoverAutonomousContainerDatabaseDataguardAssociationRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -13852,10 +17265,16 @@ public RotateSslCertsResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + SwitchoverAutonomousContainerDatabaseDataguardAssociationResponse>() { @Override - public RotateVaultKeyResponse call() throws Exception { - final RotateVaultKeyResponse response = client.rotateVaultKey(request); + public SwitchoverAutonomousContainerDatabaseDataguardAssociationResponse call() + throws Exception { + final SwitchoverAutonomousContainerDatabaseDataguardAssociationResponse + response = + client + .switchoverAutonomousContainerDatabaseDataguardAssociation( + request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -13885,11 +17304,9 @@ public RotateVaultKeyResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ScanExternalContainerDatabasePluggableDatabasesRequest, - ScanExternalContainerDatabasePluggableDatabasesResponse> - forScanExternalContainerDatabasePluggableDatabases( - ScanExternalContainerDatabasePluggableDatabasesRequest request) { - return forScanExternalContainerDatabasePluggableDatabases( + SwitchoverAutonomousDatabaseRequest, SwitchoverAutonomousDatabaseResponse> + forSwitchoverAutonomousDatabase(SwitchoverAutonomousDatabaseRequest request) { + return forSwitchoverAutonomousDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -13904,10 +17321,9 @@ public RotateVaultKeyResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ScanExternalContainerDatabasePluggableDatabasesRequest, - ScanExternalContainerDatabasePluggableDatabasesResponse> - forScanExternalContainerDatabasePluggableDatabases( - ScanExternalContainerDatabasePluggableDatabasesRequest request, + SwitchoverAutonomousDatabaseRequest, SwitchoverAutonomousDatabaseResponse> + forSwitchoverAutonomousDatabase( + SwitchoverAutonomousDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -13917,13 +17333,11 @@ public RotateVaultKeyResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - ScanExternalContainerDatabasePluggableDatabasesResponse>() { + new java.util.concurrent.Callable() { @Override - public ScanExternalContainerDatabasePluggableDatabasesResponse call() - throws Exception { - final ScanExternalContainerDatabasePluggableDatabasesResponse response = - client.scanExternalContainerDatabasePluggableDatabases(request); + public SwitchoverAutonomousDatabaseResponse call() throws Exception { + final SwitchoverAutonomousDatabaseResponse response = + client.switchoverAutonomousDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -13953,9 +17367,9 @@ public ScanExternalContainerDatabasePluggableDatabasesResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ShrinkAutonomousDatabaseRequest, ShrinkAutonomousDatabaseResponse> - forShrinkAutonomousDatabase(ShrinkAutonomousDatabaseRequest request) { - return forShrinkAutonomousDatabase( + SwitchoverDataGuardAssociationRequest, SwitchoverDataGuardAssociationResponse> + forSwitchoverDataGuardAssociation(SwitchoverDataGuardAssociationRequest request) { + return forSwitchoverDataGuardAssociation( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -13970,9 +17384,9 @@ public ScanExternalContainerDatabasePluggableDatabasesResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - ShrinkAutonomousDatabaseRequest, ShrinkAutonomousDatabaseResponse> - forShrinkAutonomousDatabase( - ShrinkAutonomousDatabaseRequest request, + SwitchoverDataGuardAssociationRequest, SwitchoverDataGuardAssociationResponse> + forSwitchoverDataGuardAssociation( + SwitchoverDataGuardAssociationRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -13982,11 +17396,11 @@ public ScanExternalContainerDatabasePluggableDatabasesResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public ShrinkAutonomousDatabaseResponse call() throws Exception { - final ShrinkAutonomousDatabaseResponse response = - client.shrinkAutonomousDatabase(request); + public SwitchoverDataGuardAssociationResponse call() throws Exception { + final SwitchoverDataGuardAssociationResponse response = + client.switchoverDataGuardAssociation(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -14016,9 +17430,11 @@ public ShrinkAutonomousDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - StartAutonomousDatabaseRequest, StartAutonomousDatabaseResponse> - forStartAutonomousDatabase(StartAutonomousDatabaseRequest request) { - return forStartAutonomousDatabase( + TerminateAutonomousContainerDatabaseRequest, + TerminateAutonomousContainerDatabaseResponse> + forTerminateAutonomousContainerDatabase( + TerminateAutonomousContainerDatabaseRequest request) { + return forTerminateAutonomousContainerDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -14033,9 +17449,10 @@ public ShrinkAutonomousDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - StartAutonomousDatabaseRequest, StartAutonomousDatabaseResponse> - forStartAutonomousDatabase( - StartAutonomousDatabaseRequest request, + TerminateAutonomousContainerDatabaseRequest, + TerminateAutonomousContainerDatabaseResponse> + forTerminateAutonomousContainerDatabase( + TerminateAutonomousContainerDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -14045,11 +17462,11 @@ public ShrinkAutonomousDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public StartAutonomousDatabaseResponse call() throws Exception { - final StartAutonomousDatabaseResponse response = - client.startAutonomousDatabase(request); + public TerminateAutonomousContainerDatabaseResponse call() throws Exception { + final TerminateAutonomousContainerDatabaseResponse response = + client.terminateAutonomousContainerDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -14079,9 +17496,11 @@ public StartAutonomousDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - StartPluggableDatabaseRequest, StartPluggableDatabaseResponse> - forStartPluggableDatabase(StartPluggableDatabaseRequest request) { - return forStartPluggableDatabase( + TerminateAutonomousExadataInfrastructureRequest, + TerminateAutonomousExadataInfrastructureResponse> + forTerminateAutonomousExadataInfrastructure( + TerminateAutonomousExadataInfrastructureRequest request) { + return forTerminateAutonomousExadataInfrastructure( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -14096,9 +17515,10 @@ public StartAutonomousDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - StartPluggableDatabaseRequest, StartPluggableDatabaseResponse> - forStartPluggableDatabase( - StartPluggableDatabaseRequest request, + TerminateAutonomousExadataInfrastructureRequest, + TerminateAutonomousExadataInfrastructureResponse> + forTerminateAutonomousExadataInfrastructure( + TerminateAutonomousExadataInfrastructureRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -14108,11 +17528,13 @@ public StartAutonomousDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + TerminateAutonomousExadataInfrastructureResponse>() { @Override - public StartPluggableDatabaseResponse call() throws Exception { - final StartPluggableDatabaseResponse response = - client.startPluggableDatabase(request); + public TerminateAutonomousExadataInfrastructureResponse call() + throws Exception { + final TerminateAutonomousExadataInfrastructureResponse response = + client.terminateAutonomousExadataInfrastructure(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -14141,10 +17563,9 @@ public StartPluggableDatabaseResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - StopAutonomousDatabaseRequest, StopAutonomousDatabaseResponse> - forStopAutonomousDatabase(StopAutonomousDatabaseRequest request) { - return forStopAutonomousDatabase( + public com.oracle.bmc.waiter.Waiter + forTerminateDbSystem(TerminateDbSystemRequest request) { + return forTerminateDbSystem( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -14158,10 +17579,9 @@ public StartPluggableDatabaseResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - StopAutonomousDatabaseRequest, StopAutonomousDatabaseResponse> - forStopAutonomousDatabase( - StopAutonomousDatabaseRequest request, + public com.oracle.bmc.waiter.Waiter + forTerminateDbSystem( + TerminateDbSystemRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -14171,11 +17591,11 @@ public StartPluggableDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public StopAutonomousDatabaseResponse call() throws Exception { - final StopAutonomousDatabaseResponse response = - client.stopAutonomousDatabase(request); + public TerminateDbSystemResponse call() throws Exception { + final TerminateDbSystemResponse response = + client.terminateDbSystem(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -14204,9 +17624,11 @@ public StopAutonomousDatabaseResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forStopPluggableDatabase(StopPluggableDatabaseRequest request) { - return forStopPluggableDatabase( + public com.oracle.bmc.waiter.Waiter< + UpdateAutonomousContainerDatabaseRequest, + UpdateAutonomousContainerDatabaseResponse> + forUpdateAutonomousContainerDatabase(UpdateAutonomousContainerDatabaseRequest request) { + return forUpdateAutonomousContainerDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -14220,9 +17642,11 @@ public StopAutonomousDatabaseResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forStopPluggableDatabase( - StopPluggableDatabaseRequest request, + public com.oracle.bmc.waiter.Waiter< + UpdateAutonomousContainerDatabaseRequest, + UpdateAutonomousContainerDatabaseResponse> + forUpdateAutonomousContainerDatabase( + UpdateAutonomousContainerDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -14232,11 +17656,11 @@ public StopAutonomousDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public StopPluggableDatabaseResponse call() throws Exception { - final StopPluggableDatabaseResponse response = - client.stopPluggableDatabase(request); + public UpdateAutonomousContainerDatabaseResponse call() throws Exception { + final UpdateAutonomousContainerDatabaseResponse response = + client.updateAutonomousContainerDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -14266,11 +17690,11 @@ public StopPluggableDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - SwitchoverAutonomousContainerDatabaseDataguardAssociationRequest, - SwitchoverAutonomousContainerDatabaseDataguardAssociationResponse> - forSwitchoverAutonomousContainerDatabaseDataguardAssociation( - SwitchoverAutonomousContainerDatabaseDataguardAssociationRequest request) { - return forSwitchoverAutonomousContainerDatabaseDataguardAssociation( + UpdateAutonomousContainerDatabaseDataguardAssociationRequest, + UpdateAutonomousContainerDatabaseDataguardAssociationResponse> + forUpdateAutonomousContainerDatabaseDataguardAssociation( + UpdateAutonomousContainerDatabaseDataguardAssociationRequest request) { + return forUpdateAutonomousContainerDatabaseDataguardAssociation( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -14285,10 +17709,10 @@ public StopPluggableDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - SwitchoverAutonomousContainerDatabaseDataguardAssociationRequest, - SwitchoverAutonomousContainerDatabaseDataguardAssociationResponse> - forSwitchoverAutonomousContainerDatabaseDataguardAssociation( - SwitchoverAutonomousContainerDatabaseDataguardAssociationRequest request, + UpdateAutonomousContainerDatabaseDataguardAssociationRequest, + UpdateAutonomousContainerDatabaseDataguardAssociationResponse> + forUpdateAutonomousContainerDatabaseDataguardAssociation( + UpdateAutonomousContainerDatabaseDataguardAssociationRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -14299,14 +17723,14 @@ public StopPluggableDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, new java.util.concurrent.Callable< - SwitchoverAutonomousContainerDatabaseDataguardAssociationResponse>() { + UpdateAutonomousContainerDatabaseDataguardAssociationResponse>() { @Override - public SwitchoverAutonomousContainerDatabaseDataguardAssociationResponse call() + public UpdateAutonomousContainerDatabaseDataguardAssociationResponse call() throws Exception { - final SwitchoverAutonomousContainerDatabaseDataguardAssociationResponse + final UpdateAutonomousContainerDatabaseDataguardAssociationResponse response = client - .switchoverAutonomousContainerDatabaseDataguardAssociation( + .updateAutonomousContainerDatabaseDataguardAssociation( request); if (response.getOpcWorkRequestId() != null) { @@ -14337,9 +17761,9 @@ public SwitchoverAutonomousContainerDatabaseDataguardAssociationResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - SwitchoverAutonomousDatabaseRequest, SwitchoverAutonomousDatabaseResponse> - forSwitchoverAutonomousDatabase(SwitchoverAutonomousDatabaseRequest request) { - return forSwitchoverAutonomousDatabase( + UpdateAutonomousDatabaseRequest, UpdateAutonomousDatabaseResponse> + forUpdateAutonomousDatabase(UpdateAutonomousDatabaseRequest request) { + return forUpdateAutonomousDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -14354,9 +17778,9 @@ public SwitchoverAutonomousContainerDatabaseDataguardAssociationResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - SwitchoverAutonomousDatabaseRequest, SwitchoverAutonomousDatabaseResponse> - forSwitchoverAutonomousDatabase( - SwitchoverAutonomousDatabaseRequest request, + UpdateAutonomousDatabaseRequest, UpdateAutonomousDatabaseResponse> + forUpdateAutonomousDatabase( + UpdateAutonomousDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -14366,11 +17790,11 @@ public SwitchoverAutonomousContainerDatabaseDataguardAssociationResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public SwitchoverAutonomousDatabaseResponse call() throws Exception { - final SwitchoverAutonomousDatabaseResponse response = - client.switchoverAutonomousDatabase(request); + public UpdateAutonomousDatabaseResponse call() throws Exception { + final UpdateAutonomousDatabaseResponse response = + client.updateAutonomousDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -14400,9 +17824,9 @@ public SwitchoverAutonomousDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - SwitchoverDataGuardAssociationRequest, SwitchoverDataGuardAssociationResponse> - forSwitchoverDataGuardAssociation(SwitchoverDataGuardAssociationRequest request) { - return forSwitchoverDataGuardAssociation( + UpdateAutonomousDatabaseBackupRequest, UpdateAutonomousDatabaseBackupResponse> + forUpdateAutonomousDatabaseBackup(UpdateAutonomousDatabaseBackupRequest request) { + return forUpdateAutonomousDatabaseBackup( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -14417,9 +17841,9 @@ public SwitchoverAutonomousDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - SwitchoverDataGuardAssociationRequest, SwitchoverDataGuardAssociationResponse> - forSwitchoverDataGuardAssociation( - SwitchoverDataGuardAssociationRequest request, + UpdateAutonomousDatabaseBackupRequest, UpdateAutonomousDatabaseBackupResponse> + forUpdateAutonomousDatabaseBackup( + UpdateAutonomousDatabaseBackupRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -14429,11 +17853,11 @@ public SwitchoverAutonomousDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public SwitchoverDataGuardAssociationResponse call() throws Exception { - final SwitchoverDataGuardAssociationResponse response = - client.switchoverDataGuardAssociation(request); + public UpdateAutonomousDatabaseBackupResponse call() throws Exception { + final UpdateAutonomousDatabaseBackupResponse response = + client.updateAutonomousDatabaseBackup(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -14463,11 +17887,11 @@ public SwitchoverDataGuardAssociationResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - TerminateAutonomousContainerDatabaseRequest, - TerminateAutonomousContainerDatabaseResponse> - forTerminateAutonomousContainerDatabase( - TerminateAutonomousContainerDatabaseRequest request) { - return forTerminateAutonomousContainerDatabase( + UpdateAutonomousDatabaseRegionalWalletRequest, + UpdateAutonomousDatabaseRegionalWalletResponse> + forUpdateAutonomousDatabaseRegionalWallet( + UpdateAutonomousDatabaseRegionalWalletRequest request) { + return forUpdateAutonomousDatabaseRegionalWallet( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -14482,10 +17906,10 @@ public SwitchoverDataGuardAssociationResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - TerminateAutonomousContainerDatabaseRequest, - TerminateAutonomousContainerDatabaseResponse> - forTerminateAutonomousContainerDatabase( - TerminateAutonomousContainerDatabaseRequest request, + UpdateAutonomousDatabaseRegionalWalletRequest, + UpdateAutonomousDatabaseRegionalWalletResponse> + forUpdateAutonomousDatabaseRegionalWallet( + UpdateAutonomousDatabaseRegionalWalletRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -14495,11 +17919,12 @@ public SwitchoverDataGuardAssociationResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable< + UpdateAutonomousDatabaseRegionalWalletResponse>() { @Override - public TerminateAutonomousContainerDatabaseResponse call() throws Exception { - final TerminateAutonomousContainerDatabaseResponse response = - client.terminateAutonomousContainerDatabase(request); + public UpdateAutonomousDatabaseRegionalWalletResponse call() throws Exception { + final UpdateAutonomousDatabaseRegionalWalletResponse response = + client.updateAutonomousDatabaseRegionalWallet(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -14529,11 +17954,9 @@ public TerminateAutonomousContainerDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - TerminateAutonomousExadataInfrastructureRequest, - TerminateAutonomousExadataInfrastructureResponse> - forTerminateAutonomousExadataInfrastructure( - TerminateAutonomousExadataInfrastructureRequest request) { - return forTerminateAutonomousExadataInfrastructure( + UpdateAutonomousDatabaseWalletRequest, UpdateAutonomousDatabaseWalletResponse> + forUpdateAutonomousDatabaseWallet(UpdateAutonomousDatabaseWalletRequest request) { + return forUpdateAutonomousDatabaseWallet( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -14548,10 +17971,9 @@ public TerminateAutonomousContainerDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - TerminateAutonomousExadataInfrastructureRequest, - TerminateAutonomousExadataInfrastructureResponse> - forTerminateAutonomousExadataInfrastructure( - TerminateAutonomousExadataInfrastructureRequest request, + UpdateAutonomousDatabaseWalletRequest, UpdateAutonomousDatabaseWalletResponse> + forUpdateAutonomousDatabaseWallet( + UpdateAutonomousDatabaseWalletRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -14561,13 +17983,11 @@ public TerminateAutonomousContainerDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - TerminateAutonomousExadataInfrastructureResponse>() { + new java.util.concurrent.Callable() { @Override - public TerminateAutonomousExadataInfrastructureResponse call() - throws Exception { - final TerminateAutonomousExadataInfrastructureResponse response = - client.terminateAutonomousExadataInfrastructure(request); + public UpdateAutonomousDatabaseWalletResponse call() throws Exception { + final UpdateAutonomousDatabaseWalletResponse response = + client.updateAutonomousDatabaseWallet(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -14596,9 +18016,12 @@ public TerminateAutonomousExadataInfrastructureResponse call() * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forTerminateDbSystem(TerminateDbSystemRequest request) { - return forTerminateDbSystem( + public com.oracle.bmc.waiter.Waiter< + UpdateAutonomousExadataInfrastructureRequest, + UpdateAutonomousExadataInfrastructureResponse> + forUpdateAutonomousExadataInfrastructure( + UpdateAutonomousExadataInfrastructureRequest request) { + return forUpdateAutonomousExadataInfrastructure( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -14612,9 +18035,11 @@ public TerminateAutonomousExadataInfrastructureResponse call() * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forTerminateDbSystem( - TerminateDbSystemRequest request, + public com.oracle.bmc.waiter.Waiter< + UpdateAutonomousExadataInfrastructureRequest, + UpdateAutonomousExadataInfrastructureResponse> + forUpdateAutonomousExadataInfrastructure( + UpdateAutonomousExadataInfrastructureRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -14624,11 +18049,11 @@ public TerminateAutonomousExadataInfrastructureResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public TerminateDbSystemResponse call() throws Exception { - final TerminateDbSystemResponse response = - client.terminateDbSystem(request); + public UpdateAutonomousExadataInfrastructureResponse call() throws Exception { + final UpdateAutonomousExadataInfrastructureResponse response = + client.updateAutonomousExadataInfrastructure(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -14658,10 +18083,9 @@ public TerminateDbSystemResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateAutonomousContainerDatabaseRequest, - UpdateAutonomousContainerDatabaseResponse> - forUpdateAutonomousContainerDatabase(UpdateAutonomousContainerDatabaseRequest request) { - return forUpdateAutonomousContainerDatabase( + UpdateAutonomousVmClusterRequest, UpdateAutonomousVmClusterResponse> + forUpdateAutonomousVmCluster(UpdateAutonomousVmClusterRequest request) { + return forUpdateAutonomousVmCluster( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -14676,10 +18100,9 @@ public TerminateDbSystemResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateAutonomousContainerDatabaseRequest, - UpdateAutonomousContainerDatabaseResponse> - forUpdateAutonomousContainerDatabase( - UpdateAutonomousContainerDatabaseRequest request, + UpdateAutonomousVmClusterRequest, UpdateAutonomousVmClusterResponse> + forUpdateAutonomousVmCluster( + UpdateAutonomousVmClusterRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -14689,11 +18112,11 @@ public TerminateDbSystemResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateAutonomousContainerDatabaseResponse call() throws Exception { - final UpdateAutonomousContainerDatabaseResponse response = - client.updateAutonomousContainerDatabase(request); + public UpdateAutonomousVmClusterResponse call() throws Exception { + final UpdateAutonomousVmClusterResponse response = + client.updateAutonomousVmCluster(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -14723,11 +18146,9 @@ public UpdateAutonomousContainerDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateAutonomousContainerDatabaseDataguardAssociationRequest, - UpdateAutonomousContainerDatabaseDataguardAssociationResponse> - forUpdateAutonomousContainerDatabaseDataguardAssociation( - UpdateAutonomousContainerDatabaseDataguardAssociationRequest request) { - return forUpdateAutonomousContainerDatabaseDataguardAssociation( + UpdateCloudAutonomousVmClusterRequest, UpdateCloudAutonomousVmClusterResponse> + forUpdateCloudAutonomousVmCluster(UpdateCloudAutonomousVmClusterRequest request) { + return forUpdateCloudAutonomousVmCluster( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -14742,10 +18163,9 @@ public UpdateAutonomousContainerDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateAutonomousContainerDatabaseDataguardAssociationRequest, - UpdateAutonomousContainerDatabaseDataguardAssociationResponse> - forUpdateAutonomousContainerDatabaseDataguardAssociation( - UpdateAutonomousContainerDatabaseDataguardAssociationRequest request, + UpdateCloudAutonomousVmClusterRequest, UpdateCloudAutonomousVmClusterResponse> + forUpdateCloudAutonomousVmCluster( + UpdateCloudAutonomousVmClusterRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -14755,16 +18175,11 @@ public UpdateAutonomousContainerDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - UpdateAutonomousContainerDatabaseDataguardAssociationResponse>() { + new java.util.concurrent.Callable() { @Override - public UpdateAutonomousContainerDatabaseDataguardAssociationResponse call() - throws Exception { - final UpdateAutonomousContainerDatabaseDataguardAssociationResponse - response = - client - .updateAutonomousContainerDatabaseDataguardAssociation( - request); + public UpdateCloudAutonomousVmClusterResponse call() throws Exception { + final UpdateCloudAutonomousVmClusterResponse response = + client.updateCloudAutonomousVmCluster(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -14794,9 +18209,10 @@ public UpdateAutonomousContainerDatabaseDataguardAssociationResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateAutonomousDatabaseRequest, UpdateAutonomousDatabaseResponse> - forUpdateAutonomousDatabase(UpdateAutonomousDatabaseRequest request) { - return forUpdateAutonomousDatabase( + UpdateCloudExadataInfrastructureRequest, + UpdateCloudExadataInfrastructureResponse> + forUpdateCloudExadataInfrastructure(UpdateCloudExadataInfrastructureRequest request) { + return forUpdateCloudExadataInfrastructure( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -14811,9 +18227,10 @@ public UpdateAutonomousContainerDatabaseDataguardAssociationResponse call() * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateAutonomousDatabaseRequest, UpdateAutonomousDatabaseResponse> - forUpdateAutonomousDatabase( - UpdateAutonomousDatabaseRequest request, + UpdateCloudExadataInfrastructureRequest, + UpdateCloudExadataInfrastructureResponse> + forUpdateCloudExadataInfrastructure( + UpdateCloudExadataInfrastructureRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -14823,11 +18240,11 @@ public UpdateAutonomousContainerDatabaseDataguardAssociationResponse call() return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateAutonomousDatabaseResponse call() throws Exception { - final UpdateAutonomousDatabaseResponse response = - client.updateAutonomousDatabase(request); + public UpdateCloudExadataInfrastructureResponse call() throws Exception { + final UpdateCloudExadataInfrastructureResponse response = + client.updateCloudExadataInfrastructure(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -14856,10 +18273,9 @@ public UpdateAutonomousDatabaseResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - UpdateAutonomousDatabaseBackupRequest, UpdateAutonomousDatabaseBackupResponse> - forUpdateAutonomousDatabaseBackup(UpdateAutonomousDatabaseBackupRequest request) { - return forUpdateAutonomousDatabaseBackup( + public com.oracle.bmc.waiter.Waiter + forUpdateCloudVmCluster(UpdateCloudVmClusterRequest request) { + return forUpdateCloudVmCluster( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -14873,10 +18289,9 @@ public UpdateAutonomousDatabaseResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - UpdateAutonomousDatabaseBackupRequest, UpdateAutonomousDatabaseBackupResponse> - forUpdateAutonomousDatabaseBackup( - UpdateAutonomousDatabaseBackupRequest request, + public com.oracle.bmc.waiter.Waiter + forUpdateCloudVmCluster( + UpdateCloudVmClusterRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -14886,11 +18301,11 @@ public UpdateAutonomousDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateAutonomousDatabaseBackupResponse call() throws Exception { - final UpdateAutonomousDatabaseBackupResponse response = - client.updateAutonomousDatabaseBackup(request); + public UpdateCloudVmClusterResponse call() throws Exception { + final UpdateCloudVmClusterResponse response = + client.updateCloudVmCluster(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -14920,11 +18335,9 @@ public UpdateAutonomousDatabaseBackupResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateAutonomousDatabaseRegionalWalletRequest, - UpdateAutonomousDatabaseRegionalWalletResponse> - forUpdateAutonomousDatabaseRegionalWallet( - UpdateAutonomousDatabaseRegionalWalletRequest request) { - return forUpdateAutonomousDatabaseRegionalWallet( + UpdateCloudVmClusterIormConfigRequest, UpdateCloudVmClusterIormConfigResponse> + forUpdateCloudVmClusterIormConfig(UpdateCloudVmClusterIormConfigRequest request) { + return forUpdateCloudVmClusterIormConfig( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -14939,10 +18352,9 @@ public UpdateAutonomousDatabaseBackupResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateAutonomousDatabaseRegionalWalletRequest, - UpdateAutonomousDatabaseRegionalWalletResponse> - forUpdateAutonomousDatabaseRegionalWallet( - UpdateAutonomousDatabaseRegionalWalletRequest request, + UpdateCloudVmClusterIormConfigRequest, UpdateCloudVmClusterIormConfigResponse> + forUpdateCloudVmClusterIormConfig( + UpdateCloudVmClusterIormConfigRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -14952,12 +18364,11 @@ public UpdateAutonomousDatabaseBackupResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable< - UpdateAutonomousDatabaseRegionalWalletResponse>() { + new java.util.concurrent.Callable() { @Override - public UpdateAutonomousDatabaseRegionalWalletResponse call() throws Exception { - final UpdateAutonomousDatabaseRegionalWalletResponse response = - client.updateAutonomousDatabaseRegionalWallet(request); + public UpdateCloudVmClusterIormConfigResponse call() throws Exception { + final UpdateCloudVmClusterIormConfigResponse response = + client.updateCloudVmClusterIormConfig(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -14987,9 +18398,9 @@ public UpdateAutonomousDatabaseRegionalWalletResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateAutonomousDatabaseWalletRequest, UpdateAutonomousDatabaseWalletResponse> - forUpdateAutonomousDatabaseWallet(UpdateAutonomousDatabaseWalletRequest request) { - return forUpdateAutonomousDatabaseWallet( + UpdateConsoleConnectionRequest, UpdateConsoleConnectionResponse> + forUpdateConsoleConnection(UpdateConsoleConnectionRequest request) { + return forUpdateConsoleConnection( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -15004,9 +18415,9 @@ public UpdateAutonomousDatabaseRegionalWalletResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateAutonomousDatabaseWalletRequest, UpdateAutonomousDatabaseWalletResponse> - forUpdateAutonomousDatabaseWallet( - UpdateAutonomousDatabaseWalletRequest request, + UpdateConsoleConnectionRequest, UpdateConsoleConnectionResponse> + forUpdateConsoleConnection( + UpdateConsoleConnectionRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -15016,11 +18427,11 @@ public UpdateAutonomousDatabaseRegionalWalletResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateAutonomousDatabaseWalletResponse call() throws Exception { - final UpdateAutonomousDatabaseWalletResponse response = - client.updateAutonomousDatabaseWallet(request); + public UpdateConsoleConnectionResponse call() throws Exception { + final UpdateConsoleConnectionResponse response = + client.updateConsoleConnection(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -15049,12 +18460,9 @@ public UpdateAutonomousDatabaseWalletResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - UpdateAutonomousExadataInfrastructureRequest, - UpdateAutonomousExadataInfrastructureResponse> - forUpdateAutonomousExadataInfrastructure( - UpdateAutonomousExadataInfrastructureRequest request) { - return forUpdateAutonomousExadataInfrastructure( + public com.oracle.bmc.waiter.Waiter + forUpdateConsoleHistory(UpdateConsoleHistoryRequest request) { + return forUpdateConsoleHistory( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -15068,11 +18476,9 @@ public UpdateAutonomousDatabaseWalletResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - UpdateAutonomousExadataInfrastructureRequest, - UpdateAutonomousExadataInfrastructureResponse> - forUpdateAutonomousExadataInfrastructure( - UpdateAutonomousExadataInfrastructureRequest request, + public com.oracle.bmc.waiter.Waiter + forUpdateConsoleHistory( + UpdateConsoleHistoryRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -15082,11 +18488,11 @@ public UpdateAutonomousDatabaseWalletResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateAutonomousExadataInfrastructureResponse call() throws Exception { - final UpdateAutonomousExadataInfrastructureResponse response = - client.updateAutonomousExadataInfrastructure(request); + public UpdateConsoleHistoryResponse call() throws Exception { + final UpdateConsoleHistoryResponse response = + client.updateConsoleHistory(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -15116,9 +18522,9 @@ public UpdateAutonomousExadataInfrastructureResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateAutonomousVmClusterRequest, UpdateAutonomousVmClusterResponse> - forUpdateAutonomousVmCluster(UpdateAutonomousVmClusterRequest request) { - return forUpdateAutonomousVmCluster( + UpdateDataGuardAssociationRequest, UpdateDataGuardAssociationResponse> + forUpdateDataGuardAssociation(UpdateDataGuardAssociationRequest request) { + return forUpdateDataGuardAssociation( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -15133,9 +18539,9 @@ public UpdateAutonomousExadataInfrastructureResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateAutonomousVmClusterRequest, UpdateAutonomousVmClusterResponse> - forUpdateAutonomousVmCluster( - UpdateAutonomousVmClusterRequest request, + UpdateDataGuardAssociationRequest, UpdateDataGuardAssociationResponse> + forUpdateDataGuardAssociation( + UpdateDataGuardAssociationRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -15145,11 +18551,11 @@ public UpdateAutonomousExadataInfrastructureResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateAutonomousVmClusterResponse call() throws Exception { - final UpdateAutonomousVmClusterResponse response = - client.updateAutonomousVmCluster(request); + public UpdateDataGuardAssociationResponse call() throws Exception { + final UpdateDataGuardAssociationResponse response = + client.updateDataGuardAssociation(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -15178,10 +18584,9 @@ public UpdateAutonomousVmClusterResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - UpdateCloudAutonomousVmClusterRequest, UpdateCloudAutonomousVmClusterResponse> - forUpdateCloudAutonomousVmCluster(UpdateCloudAutonomousVmClusterRequest request) { - return forUpdateCloudAutonomousVmCluster( + public com.oracle.bmc.waiter.Waiter + forUpdateDatabase(UpdateDatabaseRequest request) { + return forUpdateDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -15195,10 +18600,9 @@ public UpdateAutonomousVmClusterResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - UpdateCloudAutonomousVmClusterRequest, UpdateCloudAutonomousVmClusterResponse> - forUpdateCloudAutonomousVmCluster( - UpdateCloudAutonomousVmClusterRequest request, + public com.oracle.bmc.waiter.Waiter + forUpdateDatabase( + UpdateDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -15208,11 +18612,10 @@ public UpdateAutonomousVmClusterResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateCloudAutonomousVmClusterResponse call() throws Exception { - final UpdateCloudAutonomousVmClusterResponse response = - client.updateCloudAutonomousVmCluster(request); + public UpdateDatabaseResponse call() throws Exception { + final UpdateDatabaseResponse response = client.updateDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -15241,11 +18644,9 @@ public UpdateCloudAutonomousVmClusterResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - UpdateCloudExadataInfrastructureRequest, - UpdateCloudExadataInfrastructureResponse> - forUpdateCloudExadataInfrastructure(UpdateCloudExadataInfrastructureRequest request) { - return forUpdateCloudExadataInfrastructure( + public com.oracle.bmc.waiter.Waiter forUpdateDbHome( + UpdateDbHomeRequest request) { + return forUpdateDbHome( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -15259,13 +18660,10 @@ public UpdateCloudAutonomousVmClusterResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - UpdateCloudExadataInfrastructureRequest, - UpdateCloudExadataInfrastructureResponse> - forUpdateCloudExadataInfrastructure( - UpdateCloudExadataInfrastructureRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter forUpdateDbHome( + UpdateDbHomeRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { throw new IllegalStateException( "A WorkRequestClient must be supplied to this waiter for this operation"); @@ -15273,11 +18671,10 @@ public UpdateCloudAutonomousVmClusterResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateCloudExadataInfrastructureResponse call() throws Exception { - final UpdateCloudExadataInfrastructureResponse response = - client.updateCloudExadataInfrastructure(request); + public UpdateDbHomeResponse call() throws Exception { + final UpdateDbHomeResponse response = client.updateDbHome(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -15306,9 +18703,9 @@ public UpdateCloudExadataInfrastructureResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forUpdateCloudVmCluster(UpdateCloudVmClusterRequest request) { - return forUpdateCloudVmCluster( + public com.oracle.bmc.waiter.Waiter forUpdateDbNode( + UpdateDbNodeRequest request) { + return forUpdateDbNode( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -15322,11 +18719,10 @@ public UpdateCloudExadataInfrastructureResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forUpdateCloudVmCluster( - UpdateCloudVmClusterRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter forUpdateDbNode( + UpdateDbNodeRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { throw new IllegalStateException( "A WorkRequestClient must be supplied to this waiter for this operation"); @@ -15334,11 +18730,10 @@ public UpdateCloudExadataInfrastructureResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateCloudVmClusterResponse call() throws Exception { - final UpdateCloudVmClusterResponse response = - client.updateCloudVmCluster(request); + public UpdateDbNodeResponse call() throws Exception { + final UpdateDbNodeResponse response = client.updateDbNode(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -15367,10 +18762,9 @@ public UpdateCloudVmClusterResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - UpdateCloudVmClusterIormConfigRequest, UpdateCloudVmClusterIormConfigResponse> - forUpdateCloudVmClusterIormConfig(UpdateCloudVmClusterIormConfigRequest request) { - return forUpdateCloudVmClusterIormConfig( + public com.oracle.bmc.waiter.Waiter + forUpdateDbSystem(UpdateDbSystemRequest request) { + return forUpdateDbSystem( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -15384,10 +18778,9 @@ public UpdateCloudVmClusterResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - UpdateCloudVmClusterIormConfigRequest, UpdateCloudVmClusterIormConfigResponse> - forUpdateCloudVmClusterIormConfig( - UpdateCloudVmClusterIormConfigRequest request, + public com.oracle.bmc.waiter.Waiter + forUpdateDbSystem( + UpdateDbSystemRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -15397,11 +18790,10 @@ public UpdateCloudVmClusterResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateCloudVmClusterIormConfigResponse call() throws Exception { - final UpdateCloudVmClusterIormConfigResponse response = - client.updateCloudVmClusterIormConfig(request); + public UpdateDbSystemResponse call() throws Exception { + final UpdateDbSystemResponse response = client.updateDbSystem(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -15431,9 +18823,9 @@ public UpdateCloudVmClusterIormConfigResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateConsoleConnectionRequest, UpdateConsoleConnectionResponse> - forUpdateConsoleConnection(UpdateConsoleConnectionRequest request) { - return forUpdateConsoleConnection( + UpdateExadataInfrastructureRequest, UpdateExadataInfrastructureResponse> + forUpdateExadataInfrastructure(UpdateExadataInfrastructureRequest request) { + return forUpdateExadataInfrastructure( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -15448,9 +18840,9 @@ public UpdateCloudVmClusterIormConfigResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateConsoleConnectionRequest, UpdateConsoleConnectionResponse> - forUpdateConsoleConnection( - UpdateConsoleConnectionRequest request, + UpdateExadataInfrastructureRequest, UpdateExadataInfrastructureResponse> + forUpdateExadataInfrastructure( + UpdateExadataInfrastructureRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -15460,11 +18852,11 @@ public UpdateCloudVmClusterIormConfigResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateConsoleConnectionResponse call() throws Exception { - final UpdateConsoleConnectionResponse response = - client.updateConsoleConnection(request); + public UpdateExadataInfrastructureResponse call() throws Exception { + final UpdateExadataInfrastructureResponse response = + client.updateExadataInfrastructure(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -15493,9 +18885,10 @@ public UpdateConsoleConnectionResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forUpdateConsoleHistory(UpdateConsoleHistoryRequest request) { - return forUpdateConsoleHistory( + public com.oracle.bmc.waiter.Waiter< + UpdateExadataIormConfigRequest, UpdateExadataIormConfigResponse> + forUpdateExadataIormConfig(UpdateExadataIormConfigRequest request) { + return forUpdateExadataIormConfig( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -15509,9 +18902,10 @@ public UpdateConsoleConnectionResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forUpdateConsoleHistory( - UpdateConsoleHistoryRequest request, + public com.oracle.bmc.waiter.Waiter< + UpdateExadataIormConfigRequest, UpdateExadataIormConfigResponse> + forUpdateExadataIormConfig( + UpdateExadataIormConfigRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -15521,11 +18915,11 @@ public UpdateConsoleConnectionResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateConsoleHistoryResponse call() throws Exception { - final UpdateConsoleHistoryResponse response = - client.updateConsoleHistory(request); + public UpdateExadataIormConfigResponse call() throws Exception { + final UpdateExadataIormConfigResponse response = + client.updateExadataIormConfig(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -15554,10 +18948,9 @@ public UpdateConsoleHistoryResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - UpdateDataGuardAssociationRequest, UpdateDataGuardAssociationResponse> - forUpdateDataGuardAssociation(UpdateDataGuardAssociationRequest request) { - return forUpdateDataGuardAssociation( + public com.oracle.bmc.waiter.Waiter + forUpdateExadbVmCluster(UpdateExadbVmClusterRequest request) { + return forUpdateExadbVmCluster( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -15571,10 +18964,9 @@ public UpdateConsoleHistoryResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - UpdateDataGuardAssociationRequest, UpdateDataGuardAssociationResponse> - forUpdateDataGuardAssociation( - UpdateDataGuardAssociationRequest request, + public com.oracle.bmc.waiter.Waiter + forUpdateExadbVmCluster( + UpdateExadbVmClusterRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -15584,11 +18976,11 @@ public UpdateConsoleHistoryResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateDataGuardAssociationResponse call() throws Exception { - final UpdateDataGuardAssociationResponse response = - client.updateDataGuardAssociation(request); + public UpdateExadbVmClusterResponse call() throws Exception { + final UpdateExadbVmClusterResponse response = + client.updateExadbVmCluster(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -15617,9 +19009,10 @@ public UpdateDataGuardAssociationResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forUpdateDatabase(UpdateDatabaseRequest request) { - return forUpdateDatabase( + public com.oracle.bmc.waiter.Waiter< + UpdateExascaleDbStorageVaultRequest, UpdateExascaleDbStorageVaultResponse> + forUpdateExascaleDbStorageVault(UpdateExascaleDbStorageVaultRequest request) { + return forUpdateExascaleDbStorageVault( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -15633,9 +19026,10 @@ public UpdateDataGuardAssociationResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forUpdateDatabase( - UpdateDatabaseRequest request, + public com.oracle.bmc.waiter.Waiter< + UpdateExascaleDbStorageVaultRequest, UpdateExascaleDbStorageVaultResponse> + forUpdateExascaleDbStorageVault( + UpdateExascaleDbStorageVaultRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -15645,10 +19039,11 @@ public UpdateDataGuardAssociationResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateDatabaseResponse call() throws Exception { - final UpdateDatabaseResponse response = client.updateDatabase(request); + public UpdateExascaleDbStorageVaultResponse call() throws Exception { + final UpdateExascaleDbStorageVaultResponse response = + client.updateExascaleDbStorageVault(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -15677,9 +19072,9 @@ public UpdateDatabaseResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forUpdateDbHome( - UpdateDbHomeRequest request) { - return forUpdateDbHome( + public com.oracle.bmc.waiter.Waiter + forUpdateExecutionAction(UpdateExecutionActionRequest request) { + return forUpdateExecutionAction( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -15693,10 +19088,11 @@ public com.oracle.bmc.waiter.Waiter f * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forUpdateDbHome( - UpdateDbHomeRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter + forUpdateExecutionAction( + UpdateExecutionActionRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { throw new IllegalStateException( "A WorkRequestClient must be supplied to this waiter for this operation"); @@ -15704,10 +19100,11 @@ public com.oracle.bmc.waiter.Waiter f return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateDbHomeResponse call() throws Exception { - final UpdateDbHomeResponse response = client.updateDbHome(request); + public UpdateExecutionActionResponse call() throws Exception { + final UpdateExecutionActionResponse response = + client.updateExecutionAction(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -15736,9 +19133,9 @@ public UpdateDbHomeResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forUpdateDbNode( - UpdateDbNodeRequest request) { - return forUpdateDbNode( + public com.oracle.bmc.waiter.Waiter + forUpdateExecutionWindow(UpdateExecutionWindowRequest request) { + return forUpdateExecutionWindow( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -15752,10 +19149,11 @@ public com.oracle.bmc.waiter.Waiter f * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter forUpdateDbNode( - UpdateDbNodeRequest request, - com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, - com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + public com.oracle.bmc.waiter.Waiter + forUpdateExecutionWindow( + UpdateExecutionWindowRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { throw new IllegalStateException( "A WorkRequestClient must be supplied to this waiter for this operation"); @@ -15763,10 +19161,11 @@ public com.oracle.bmc.waiter.Waiter f return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateDbNodeResponse call() throws Exception { - final UpdateDbNodeResponse response = client.updateDbNode(request); + public UpdateExecutionWindowResponse call() throws Exception { + final UpdateExecutionWindowResponse response = + client.updateExecutionWindow(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -15795,9 +19194,10 @@ public UpdateDbNodeResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forUpdateDbSystem(UpdateDbSystemRequest request) { - return forUpdateDbSystem( + public com.oracle.bmc.waiter.Waiter< + UpdateExternalContainerDatabaseRequest, UpdateExternalContainerDatabaseResponse> + forUpdateExternalContainerDatabase(UpdateExternalContainerDatabaseRequest request) { + return forUpdateExternalContainerDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -15811,9 +19211,10 @@ public UpdateDbNodeResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter - forUpdateDbSystem( - UpdateDbSystemRequest request, + public com.oracle.bmc.waiter.Waiter< + UpdateExternalContainerDatabaseRequest, UpdateExternalContainerDatabaseResponse> + forUpdateExternalContainerDatabase( + UpdateExternalContainerDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -15823,10 +19224,11 @@ public UpdateDbNodeResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateDbSystemResponse call() throws Exception { - final UpdateDbSystemResponse response = client.updateDbSystem(request); + public UpdateExternalContainerDatabaseResponse call() throws Exception { + final UpdateExternalContainerDatabaseResponse response = + client.updateExternalContainerDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -15856,9 +19258,9 @@ public UpdateDbSystemResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateExadataInfrastructureRequest, UpdateExadataInfrastructureResponse> - forUpdateExadataInfrastructure(UpdateExadataInfrastructureRequest request) { - return forUpdateExadataInfrastructure( + UpdateExternalDatabaseConnectorRequest, UpdateExternalDatabaseConnectorResponse> + forUpdateExternalDatabaseConnector(UpdateExternalDatabaseConnectorRequest request) { + return forUpdateExternalDatabaseConnector( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -15873,9 +19275,9 @@ public UpdateDbSystemResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateExadataInfrastructureRequest, UpdateExadataInfrastructureResponse> - forUpdateExadataInfrastructure( - UpdateExadataInfrastructureRequest request, + UpdateExternalDatabaseConnectorRequest, UpdateExternalDatabaseConnectorResponse> + forUpdateExternalDatabaseConnector( + UpdateExternalDatabaseConnectorRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -15885,11 +19287,11 @@ public UpdateDbSystemResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateExadataInfrastructureResponse call() throws Exception { - final UpdateExadataInfrastructureResponse response = - client.updateExadataInfrastructure(request); + public UpdateExternalDatabaseConnectorResponse call() throws Exception { + final UpdateExternalDatabaseConnectorResponse response = + client.updateExternalDatabaseConnector(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -15919,9 +19321,11 @@ public UpdateExadataInfrastructureResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateExadataIormConfigRequest, UpdateExadataIormConfigResponse> - forUpdateExadataIormConfig(UpdateExadataIormConfigRequest request) { - return forUpdateExadataIormConfig( + UpdateExternalNonContainerDatabaseRequest, + UpdateExternalNonContainerDatabaseResponse> + forUpdateExternalNonContainerDatabase( + UpdateExternalNonContainerDatabaseRequest request) { + return forUpdateExternalNonContainerDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -15936,9 +19340,10 @@ public UpdateExadataInfrastructureResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateExadataIormConfigRequest, UpdateExadataIormConfigResponse> - forUpdateExadataIormConfig( - UpdateExadataIormConfigRequest request, + UpdateExternalNonContainerDatabaseRequest, + UpdateExternalNonContainerDatabaseResponse> + forUpdateExternalNonContainerDatabase( + UpdateExternalNonContainerDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -15948,11 +19353,11 @@ public UpdateExadataInfrastructureResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateExadataIormConfigResponse call() throws Exception { - final UpdateExadataIormConfigResponse response = - client.updateExadataIormConfig(request); + public UpdateExternalNonContainerDatabaseResponse call() throws Exception { + final UpdateExternalNonContainerDatabaseResponse response = + client.updateExternalNonContainerDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -15982,9 +19387,9 @@ public UpdateExadataIormConfigResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateExternalContainerDatabaseRequest, UpdateExternalContainerDatabaseResponse> - forUpdateExternalContainerDatabase(UpdateExternalContainerDatabaseRequest request) { - return forUpdateExternalContainerDatabase( + UpdateExternalPluggableDatabaseRequest, UpdateExternalPluggableDatabaseResponse> + forUpdateExternalPluggableDatabase(UpdateExternalPluggableDatabaseRequest request) { + return forUpdateExternalPluggableDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -15999,9 +19404,9 @@ public UpdateExadataIormConfigResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateExternalContainerDatabaseRequest, UpdateExternalContainerDatabaseResponse> - forUpdateExternalContainerDatabase( - UpdateExternalContainerDatabaseRequest request, + UpdateExternalPluggableDatabaseRequest, UpdateExternalPluggableDatabaseResponse> + forUpdateExternalPluggableDatabase( + UpdateExternalPluggableDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -16011,11 +19416,11 @@ public UpdateExadataIormConfigResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateExternalContainerDatabaseResponse call() throws Exception { - final UpdateExternalContainerDatabaseResponse response = - client.updateExternalContainerDatabase(request); + public UpdateExternalPluggableDatabaseResponse call() throws Exception { + final UpdateExternalPluggableDatabaseResponse response = + client.updateExternalPluggableDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -16045,9 +19450,9 @@ public UpdateExternalContainerDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateExternalDatabaseConnectorRequest, UpdateExternalDatabaseConnectorResponse> - forUpdateExternalDatabaseConnector(UpdateExternalDatabaseConnectorRequest request) { - return forUpdateExternalDatabaseConnector( + UpdatePluggableDatabaseRequest, UpdatePluggableDatabaseResponse> + forUpdatePluggableDatabase(UpdatePluggableDatabaseRequest request) { + return forUpdatePluggableDatabase( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -16062,9 +19467,9 @@ public UpdateExternalContainerDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateExternalDatabaseConnectorRequest, UpdateExternalDatabaseConnectorResponse> - forUpdateExternalDatabaseConnector( - UpdateExternalDatabaseConnectorRequest request, + UpdatePluggableDatabaseRequest, UpdatePluggableDatabaseResponse> + forUpdatePluggableDatabase( + UpdatePluggableDatabaseRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -16074,11 +19479,11 @@ public UpdateExternalContainerDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateExternalDatabaseConnectorResponse call() throws Exception { - final UpdateExternalDatabaseConnectorResponse response = - client.updateExternalDatabaseConnector(request); + public UpdatePluggableDatabaseResponse call() throws Exception { + final UpdatePluggableDatabaseResponse response = + client.updatePluggableDatabase(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -16107,12 +19512,9 @@ public UpdateExternalDatabaseConnectorResponse call() throws Exception { * @param request the request to send * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - UpdateExternalNonContainerDatabaseRequest, - UpdateExternalNonContainerDatabaseResponse> - forUpdateExternalNonContainerDatabase( - UpdateExternalNonContainerDatabaseRequest request) { - return forUpdateExternalNonContainerDatabase( + public com.oracle.bmc.waiter.Waiter + forUpdateScheduledAction(UpdateScheduledActionRequest request) { + return forUpdateScheduledAction( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -16126,11 +19528,9 @@ public UpdateExternalDatabaseConnectorResponse call() throws Exception { * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ - public com.oracle.bmc.waiter.Waiter< - UpdateExternalNonContainerDatabaseRequest, - UpdateExternalNonContainerDatabaseResponse> - forUpdateExternalNonContainerDatabase( - UpdateExternalNonContainerDatabaseRequest request, + public com.oracle.bmc.waiter.Waiter + forUpdateScheduledAction( + UpdateScheduledActionRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -16140,11 +19540,11 @@ public UpdateExternalDatabaseConnectorResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateExternalNonContainerDatabaseResponse call() throws Exception { - final UpdateExternalNonContainerDatabaseResponse response = - client.updateExternalNonContainerDatabase(request); + public UpdateScheduledActionResponse call() throws Exception { + final UpdateScheduledActionResponse response = + client.updateScheduledAction(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -16174,9 +19574,9 @@ public UpdateExternalNonContainerDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateExternalPluggableDatabaseRequest, UpdateExternalPluggableDatabaseResponse> - forUpdateExternalPluggableDatabase(UpdateExternalPluggableDatabaseRequest request) { - return forUpdateExternalPluggableDatabase( + UpdateSchedulingPolicyRequest, UpdateSchedulingPolicyResponse> + forUpdateSchedulingPolicy(UpdateSchedulingPolicyRequest request) { + return forUpdateSchedulingPolicy( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -16191,9 +19591,9 @@ public UpdateExternalNonContainerDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdateExternalPluggableDatabaseRequest, UpdateExternalPluggableDatabaseResponse> - forUpdateExternalPluggableDatabase( - UpdateExternalPluggableDatabaseRequest request, + UpdateSchedulingPolicyRequest, UpdateSchedulingPolicyResponse> + forUpdateSchedulingPolicy( + UpdateSchedulingPolicyRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -16203,11 +19603,11 @@ public UpdateExternalNonContainerDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdateExternalPluggableDatabaseResponse call() throws Exception { - final UpdateExternalPluggableDatabaseResponse response = - client.updateExternalPluggableDatabase(request); + public UpdateSchedulingPolicyResponse call() throws Exception { + final UpdateSchedulingPolicyResponse response = + client.updateSchedulingPolicy(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest @@ -16237,9 +19637,9 @@ public UpdateExternalPluggableDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdatePluggableDatabaseRequest, UpdatePluggableDatabaseResponse> - forUpdatePluggableDatabase(UpdatePluggableDatabaseRequest request) { - return forUpdatePluggableDatabase( + UpdateSchedulingWindowRequest, UpdateSchedulingWindowResponse> + forUpdateSchedulingWindow(UpdateSchedulingWindowRequest request) { + return forUpdateSchedulingWindow( request, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); @@ -16254,9 +19654,9 @@ public UpdateExternalPluggableDatabaseResponse call() throws Exception { * @return a new {@link com.oracle.bmc.waiter.Waiter} instance */ public com.oracle.bmc.waiter.Waiter< - UpdatePluggableDatabaseRequest, UpdatePluggableDatabaseResponse> - forUpdatePluggableDatabase( - UpdatePluggableDatabaseRequest request, + UpdateSchedulingWindowRequest, UpdateSchedulingWindowResponse> + forUpdateSchedulingWindow( + UpdateSchedulingWindowRequest request, com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, com.oracle.bmc.waiter.DelayStrategy delayStrategy) { if (workRequestClient == null) { @@ -16266,11 +19666,11 @@ public UpdateExternalPluggableDatabaseResponse call() throws Exception { return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( executorService, - new java.util.concurrent.Callable() { + new java.util.concurrent.Callable() { @Override - public UpdatePluggableDatabaseResponse call() throws Exception { - final UpdatePluggableDatabaseResponse response = - client.updatePluggableDatabase(request); + public UpdateSchedulingWindowResponse call() throws Exception { + final UpdateSchedulingWindowResponse response = + client.updateSchedulingWindow(request); if (response.getOpcWorkRequestId() != null) { final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CancelExecutionWindowConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CancelExecutionWindowConverter.java new file mode 100644 index 00000000000..08907505aa1 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CancelExecutionWindowConverter.java @@ -0,0 +1,167 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CancelExecutionWindowConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CancelExecutionWindowConverter.class); + + public static com.oracle.bmc.database.requests.CancelExecutionWindowRequest interceptRequest( + com.oracle.bmc.database.requests.CancelExecutionWindowRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.CancelExecutionWindowRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getExecutionWindowId(), "executionWindowId must not be blank"); + Validate.notNull( + request.getCancelExecutionWindowDetails(), + "cancelExecutionWindowDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("executionWindows") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExecutionWindowId())) + .path("actions") + .path("cancel"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CancelExecutionWindowResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CancelExecutionWindowResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CancelExecutionWindowResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CancelExecutionWindowResponse>() { + @Override + public com.oracle.bmc.database.responses.CancelExecutionWindowResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.CancelExecutionWindowResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExecutionWindow>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExecutionWindow + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExecutionWindow + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.ExecutionWindow> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.CancelExecutionWindowResponse + .Builder + builder = + com.oracle.bmc.database.responses + .CancelExecutionWindowResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.executionWindow(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.CancelExecutionWindowResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CascadingDeleteSchedulingPlanConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CascadingDeleteSchedulingPlanConverter.java new file mode 100644 index 00000000000..ea87c1e0acf --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CascadingDeleteSchedulingPlanConverter.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CascadingDeleteSchedulingPlanConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CascadingDeleteSchedulingPlanConverter.class); + + public static com.oracle.bmc.database.requests.CascadingDeleteSchedulingPlanRequest + interceptRequest( + com.oracle.bmc.database.requests.CascadingDeleteSchedulingPlanRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.CascadingDeleteSchedulingPlanRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSchedulingPlanId(), "schedulingPlanId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("schedulingPlans") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulingPlanId())) + .path("actions") + .path("cascadingDeleteSchedulingPlan"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CascadingDeleteSchedulingPlanResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CascadingDeleteSchedulingPlanResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CascadingDeleteSchedulingPlanResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .CascadingDeleteSchedulingPlanResponse>() { + @Override + public com.oracle.bmc.database.responses + .CascadingDeleteSchedulingPlanResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.CascadingDeleteSchedulingPlanResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .CascadingDeleteSchedulingPlanResponse.Builder + builder = + com.oracle.bmc.database.responses + .CascadingDeleteSchedulingPlanResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses + .CascadingDeleteSchedulingPlanResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeAutonomousDatabaseSubscriptionConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeAutonomousDatabaseSubscriptionConverter.java new file mode 100644 index 00000000000..668c6c03026 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeAutonomousDatabaseSubscriptionConverter.java @@ -0,0 +1,157 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeAutonomousDatabaseSubscriptionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ChangeAutonomousDatabaseSubscriptionConverter.class); + + public static com.oracle.bmc.database.requests.ChangeAutonomousDatabaseSubscriptionRequest + interceptRequest( + com.oracle.bmc.database.requests.ChangeAutonomousDatabaseSubscriptionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ChangeAutonomousDatabaseSubscriptionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getChangeAutonomousDatabaseSubscriptionDetails(), + "changeAutonomousDatabaseSubscriptionDetails is required"); + Validate.notBlank( + request.getAutonomousDatabaseId(), "autonomousDatabaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("autonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousDatabaseId())) + .path("actions") + .path("changeSubscription"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ChangeAutonomousDatabaseSubscriptionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ChangeAutonomousDatabaseSubscriptionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ChangeAutonomousDatabaseSubscriptionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ChangeAutonomousDatabaseSubscriptionResponse>() { + @Override + public com.oracle.bmc.database.responses + .ChangeAutonomousDatabaseSubscriptionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ChangeAutonomousDatabaseSubscriptionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .ChangeAutonomousDatabaseSubscriptionResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ChangeAutonomousDatabaseSubscriptionResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses + .ChangeAutonomousDatabaseSubscriptionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeCloudExadataInfrastructureSubscriptionConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeCloudExadataInfrastructureSubscriptionConverter.java new file mode 100644 index 00000000000..f417a5d9155 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeCloudExadataInfrastructureSubscriptionConverter.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeCloudExadataInfrastructureSubscriptionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ChangeCloudExadataInfrastructureSubscriptionConverter.class); + + public static com.oracle.bmc.database.requests + .ChangeCloudExadataInfrastructureSubscriptionRequest + interceptRequest( + com.oracle.bmc.database.requests + .ChangeCloudExadataInfrastructureSubscriptionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ChangeCloudExadataInfrastructureSubscriptionRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getChangeCloudExadataInfrastructureSubscriptionDetails(), + "changeCloudExadataInfrastructureSubscriptionDetails is required"); + Validate.notBlank( + request.getCloudExadataInfrastructureId(), + "cloudExadataInfrastructureId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("cloudExadataInfrastructures") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCloudExadataInfrastructureId())) + .path("actions") + .path("changeSubscription"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ChangeCloudExadataInfrastructureSubscriptionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ChangeCloudExadataInfrastructureSubscriptionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ChangeCloudExadataInfrastructureSubscriptionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ChangeCloudExadataInfrastructureSubscriptionResponse>() { + @Override + public com.oracle.bmc.database.responses + .ChangeCloudExadataInfrastructureSubscriptionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ChangeCloudExadataInfrastructureSubscriptionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .ChangeCloudExadataInfrastructureSubscriptionResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ChangeCloudExadataInfrastructureSubscriptionResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses + .ChangeCloudExadataInfrastructureSubscriptionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeCloudVmClusterSubscriptionConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeCloudVmClusterSubscriptionConverter.java new file mode 100644 index 00000000000..666d2ad87ad --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeCloudVmClusterSubscriptionConverter.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeCloudVmClusterSubscriptionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ChangeCloudVmClusterSubscriptionConverter.class); + + public static com.oracle.bmc.database.requests.ChangeCloudVmClusterSubscriptionRequest + interceptRequest( + com.oracle.bmc.database.requests.ChangeCloudVmClusterSubscriptionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ChangeCloudVmClusterSubscriptionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getChangeCloudVmClusterSubscriptionDetails(), + "changeCloudVmClusterSubscriptionDetails is required"); + Validate.notBlank(request.getCloudVmClusterId(), "cloudVmClusterId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("cloudVmClusters") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCloudVmClusterId())) + .path("actions") + .path("changeSubscription"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ChangeCloudVmClusterSubscriptionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ChangeCloudVmClusterSubscriptionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ChangeCloudVmClusterSubscriptionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ChangeCloudVmClusterSubscriptionResponse>() { + @Override + public com.oracle.bmc.database.responses + .ChangeCloudVmClusterSubscriptionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ChangeCloudVmClusterSubscriptionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .ChangeCloudVmClusterSubscriptionResponse.Builder + builder = + com.oracle.bmc.database.responses + .ChangeCloudVmClusterSubscriptionResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses + .ChangeCloudVmClusterSubscriptionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeExadbVmClusterCompartmentConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeExadbVmClusterCompartmentConverter.java new file mode 100644 index 00000000000..4b212b8bd87 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeExadbVmClusterCompartmentConverter.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeExadbVmClusterCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ChangeExadbVmClusterCompartmentConverter.class); + + public static com.oracle.bmc.database.requests.ChangeExadbVmClusterCompartmentRequest + interceptRequest( + com.oracle.bmc.database.requests.ChangeExadbVmClusterCompartmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ChangeExadbVmClusterCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getChangeExadbVmClusterCompartmentDetails(), + "changeExadbVmClusterCompartmentDetails is required"); + Validate.notBlank(request.getExadbVmClusterId(), "exadbVmClusterId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("exadbVmClusters") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExadbVmClusterId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ChangeExadbVmClusterCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ChangeExadbVmClusterCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ChangeExadbVmClusterCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ChangeExadbVmClusterCompartmentResponse>() { + @Override + public com.oracle.bmc.database.responses + .ChangeExadbVmClusterCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ChangeExadbVmClusterCompartmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .ChangeExadbVmClusterCompartmentResponse.Builder + builder = + com.oracle.bmc.database.responses + .ChangeExadbVmClusterCompartmentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses + .ChangeExadbVmClusterCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeExascaleDbStorageVaultCompartmentConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeExascaleDbStorageVaultCompartmentConverter.java new file mode 100644 index 00000000000..12fc516c8f8 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeExascaleDbStorageVaultCompartmentConverter.java @@ -0,0 +1,162 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeExascaleDbStorageVaultCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ChangeExascaleDbStorageVaultCompartmentConverter.class); + + public static com.oracle.bmc.database.requests.ChangeExascaleDbStorageVaultCompartmentRequest + interceptRequest( + com.oracle.bmc.database.requests.ChangeExascaleDbStorageVaultCompartmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ChangeExascaleDbStorageVaultCompartmentRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getChangeExascaleDbStorageVaultCompartmentDetails(), + "changeExascaleDbStorageVaultCompartmentDetails is required"); + Validate.notBlank( + request.getExascaleDbStorageVaultId(), + "exascaleDbStorageVaultId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("exascaleDbStorageVaults") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExascaleDbStorageVaultId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ChangeExascaleDbStorageVaultCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ChangeExascaleDbStorageVaultCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ChangeExascaleDbStorageVaultCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ChangeExascaleDbStorageVaultCompartmentResponse>() { + @Override + public com.oracle.bmc.database.responses + .ChangeExascaleDbStorageVaultCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ChangeExascaleDbStorageVaultCompartmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .ChangeExascaleDbStorageVaultCompartmentResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ChangeExascaleDbStorageVaultCompartmentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses + .ChangeExascaleDbStorageVaultCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeSchedulingPlanCompartmentConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeSchedulingPlanCompartmentConverter.java new file mode 100644 index 00000000000..904f1e99c93 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeSchedulingPlanCompartmentConverter.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeSchedulingPlanCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ChangeSchedulingPlanCompartmentConverter.class); + + public static com.oracle.bmc.database.requests.ChangeSchedulingPlanCompartmentRequest + interceptRequest( + com.oracle.bmc.database.requests.ChangeSchedulingPlanCompartmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ChangeSchedulingPlanCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getChangeSchedulingPlanCompartmentDetails(), + "changeSchedulingPlanCompartmentDetails is required"); + Validate.notBlank(request.getSchedulingPlanId(), "schedulingPlanId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("schedulingPlans") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulingPlanId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ChangeSchedulingPlanCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ChangeSchedulingPlanCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ChangeSchedulingPlanCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ChangeSchedulingPlanCompartmentResponse>() { + @Override + public com.oracle.bmc.database.responses + .ChangeSchedulingPlanCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ChangeSchedulingPlanCompartmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .ChangeSchedulingPlanCompartmentResponse.Builder + builder = + com.oracle.bmc.database.responses + .ChangeSchedulingPlanCompartmentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses + .ChangeSchedulingPlanCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeSchedulingPolicyCompartmentConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeSchedulingPolicyCompartmentConverter.java new file mode 100644 index 00000000000..249c56ac65e --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ChangeSchedulingPolicyCompartmentConverter.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeSchedulingPolicyCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ChangeSchedulingPolicyCompartmentConverter.class); + + public static com.oracle.bmc.database.requests.ChangeSchedulingPolicyCompartmentRequest + interceptRequest( + com.oracle.bmc.database.requests.ChangeSchedulingPolicyCompartmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ChangeSchedulingPolicyCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getChangeSchedulingPolicyCompartmentDetails(), + "changeSchedulingPolicyCompartmentDetails is required"); + Validate.notBlank(request.getSchedulingPolicyId(), "schedulingPolicyId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("schedulingPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulingPolicyId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ChangeSchedulingPolicyCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ChangeSchedulingPolicyCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ChangeSchedulingPolicyCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ChangeSchedulingPolicyCompartmentResponse>() { + @Override + public com.oracle.bmc.database.responses + .ChangeSchedulingPolicyCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ChangeSchedulingPolicyCompartmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .ChangeSchedulingPolicyCompartmentResponse.Builder + builder = + com.oracle.bmc.database.responses + .ChangeSchedulingPolicyCompartmentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses + .ChangeSchedulingPolicyCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ConfigureExascaleExadataInfrastructureConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ConfigureExascaleExadataInfrastructureConverter.java new file mode 100644 index 00000000000..fc6e0e42ce5 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ConfigureExascaleExadataInfrastructureConverter.java @@ -0,0 +1,182 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ConfigureExascaleExadataInfrastructureConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ConfigureExascaleExadataInfrastructureConverter.class); + + public static com.oracle.bmc.database.requests.ConfigureExascaleExadataInfrastructureRequest + interceptRequest( + com.oracle.bmc.database.requests.ConfigureExascaleExadataInfrastructureRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ConfigureExascaleExadataInfrastructureRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getExadataInfrastructureId(), "exadataInfrastructureId must not be blank"); + Validate.notNull( + request.getConfigureExascaleExadataInfrastructureDetails(), + "configureExascaleExadataInfrastructureDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("exadataInfrastructures") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExadataInfrastructureId())) + .path("actions") + .path("configureExascale"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ConfigureExascaleExadataInfrastructureResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ConfigureExascaleExadataInfrastructureResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ConfigureExascaleExadataInfrastructureResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ConfigureExascaleExadataInfrastructureResponse>() { + @Override + public com.oracle.bmc.database.responses + .ConfigureExascaleExadataInfrastructureResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ConfigureExascaleExadataInfrastructureResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExadataInfrastructure>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .ExadataInfrastructure + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .ExadataInfrastructure + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.ExadataInfrastructure> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .ConfigureExascaleExadataInfrastructureResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ConfigureExascaleExadataInfrastructureResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.exadataInfrastructure(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses + .ConfigureExascaleExadataInfrastructureResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ConfirmKeyStoreDetailsAreCorrectConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ConfirmKeyStoreDetailsAreCorrectConverter.java new file mode 100644 index 00000000000..013564cc1d9 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ConfirmKeyStoreDetailsAreCorrectConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ConfirmKeyStoreDetailsAreCorrectConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ConfirmKeyStoreDetailsAreCorrectConverter.class); + + public static com.oracle.bmc.database.requests.ConfirmKeyStoreDetailsAreCorrectRequest + interceptRequest( + com.oracle.bmc.database.requests.ConfirmKeyStoreDetailsAreCorrectRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ConfirmKeyStoreDetailsAreCorrectRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getKeyStoreId(), "keyStoreId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("keyStores") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getKeyStoreId())) + .path("actions") + .path("confirmDetailsAreCorrect"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ConfirmKeyStoreDetailsAreCorrectResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ConfirmKeyStoreDetailsAreCorrectResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ConfirmKeyStoreDetailsAreCorrectResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ConfirmKeyStoreDetailsAreCorrectResponse>() { + @Override + public com.oracle.bmc.database.responses + .ConfirmKeyStoreDetailsAreCorrectResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ConfirmKeyStoreDetailsAreCorrectResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .ConfirmKeyStoreDetailsAreCorrectResponse.Builder + builder = + com.oracle.bmc.database.responses + .ConfirmKeyStoreDetailsAreCorrectResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses + .ConfirmKeyStoreDetailsAreCorrectResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateExadbVmClusterConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateExadbVmClusterConverter.java new file mode 100644 index 00000000000..e2cf55a774d --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateExadbVmClusterConverter.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateExadbVmClusterConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateExadbVmClusterConverter.class); + + public static com.oracle.bmc.database.requests.CreateExadbVmClusterRequest interceptRequest( + com.oracle.bmc.database.requests.CreateExadbVmClusterRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.CreateExadbVmClusterRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateExadbVmClusterDetails(), + "createExadbVmClusterDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("exadbVmClusters"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateExadbVmClusterResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateExadbVmClusterResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateExadbVmClusterResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateExadbVmClusterResponse>() { + @Override + public com.oracle.bmc.database.responses.CreateExadbVmClusterResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.CreateExadbVmClusterResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExadbVmCluster>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExadbVmCluster + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExadbVmCluster + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.ExadbVmCluster> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.CreateExadbVmClusterResponse + .Builder + builder = + com.oracle.bmc.database.responses + .CreateExadbVmClusterResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.exadbVmCluster(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.CreateExadbVmClusterResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateExascaleDbStorageVaultConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateExascaleDbStorageVaultConverter.java new file mode 100644 index 00000000000..74b6a39e97a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateExascaleDbStorageVaultConverter.java @@ -0,0 +1,163 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateExascaleDbStorageVaultConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateExascaleDbStorageVaultConverter.class); + + public static com.oracle.bmc.database.requests.CreateExascaleDbStorageVaultRequest + interceptRequest( + com.oracle.bmc.database.requests.CreateExascaleDbStorageVaultRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.CreateExascaleDbStorageVaultRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateExascaleDbStorageVaultDetails(), + "createExascaleDbStorageVaultDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("exascaleDbStorageVaults"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateExascaleDbStorageVaultResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateExascaleDbStorageVaultResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateExascaleDbStorageVaultResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .CreateExascaleDbStorageVaultResponse>() { + @Override + public com.oracle.bmc.database.responses + .CreateExascaleDbStorageVaultResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.CreateExascaleDbStorageVaultResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExascaleDbStorageVault>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .ExascaleDbStorageVault + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .ExascaleDbStorageVault + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExascaleDbStorageVault> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .CreateExascaleDbStorageVaultResponse.Builder + builder = + com.oracle.bmc.database.responses + .CreateExascaleDbStorageVaultResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.exascaleDbStorageVault(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses + .CreateExascaleDbStorageVaultResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateExecutionActionConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateExecutionActionConverter.java new file mode 100644 index 00000000000..c345367881d --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateExecutionActionConverter.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateExecutionActionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateExecutionActionConverter.class); + + public static com.oracle.bmc.database.requests.CreateExecutionActionRequest interceptRequest( + com.oracle.bmc.database.requests.CreateExecutionActionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.CreateExecutionActionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateExecutionActionDetails(), + "createExecutionActionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("executionActions"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateExecutionActionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateExecutionActionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateExecutionActionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateExecutionActionResponse>() { + @Override + public com.oracle.bmc.database.responses.CreateExecutionActionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.CreateExecutionActionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExecutionAction>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExecutionAction + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExecutionAction + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.ExecutionAction> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.CreateExecutionActionResponse + .Builder + builder = + com.oracle.bmc.database.responses + .CreateExecutionActionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.executionAction(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.CreateExecutionActionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateExecutionWindowConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateExecutionWindowConverter.java new file mode 100644 index 00000000000..ac2f5e4b61b --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateExecutionWindowConverter.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateExecutionWindowConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateExecutionWindowConverter.class); + + public static com.oracle.bmc.database.requests.CreateExecutionWindowRequest interceptRequest( + com.oracle.bmc.database.requests.CreateExecutionWindowRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.CreateExecutionWindowRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateExecutionWindowDetails(), + "createExecutionWindowDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("executionWindows"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateExecutionWindowResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateExecutionWindowResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateExecutionWindowResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateExecutionWindowResponse>() { + @Override + public com.oracle.bmc.database.responses.CreateExecutionWindowResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.CreateExecutionWindowResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExecutionWindow>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExecutionWindow + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExecutionWindow + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.ExecutionWindow> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.CreateExecutionWindowResponse + .Builder + builder = + com.oracle.bmc.database.responses + .CreateExecutionWindowResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.executionWindow(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.CreateExecutionWindowResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateScheduledActionConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateScheduledActionConverter.java new file mode 100644 index 00000000000..63dff283aed --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateScheduledActionConverter.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateScheduledActionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateScheduledActionConverter.class); + + public static com.oracle.bmc.database.requests.CreateScheduledActionRequest interceptRequest( + com.oracle.bmc.database.requests.CreateScheduledActionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.CreateScheduledActionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateScheduledActionDetails(), + "createScheduledActionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("scheduledActions"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateScheduledActionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateScheduledActionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateScheduledActionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateScheduledActionResponse>() { + @Override + public com.oracle.bmc.database.responses.CreateScheduledActionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.CreateScheduledActionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ScheduledAction>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ScheduledAction + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ScheduledAction + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.ScheduledAction> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.CreateScheduledActionResponse + .Builder + builder = + com.oracle.bmc.database.responses + .CreateScheduledActionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.scheduledAction(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.CreateScheduledActionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateSchedulingPlanConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateSchedulingPlanConverter.java new file mode 100644 index 00000000000..f03ab7f993c --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateSchedulingPlanConverter.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateSchedulingPlanConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateSchedulingPlanConverter.class); + + public static com.oracle.bmc.database.requests.CreateSchedulingPlanRequest interceptRequest( + com.oracle.bmc.database.requests.CreateSchedulingPlanRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.CreateSchedulingPlanRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateSchedulingPlanDetails(), + "createSchedulingPlanDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("schedulingPlans"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateSchedulingPlanResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateSchedulingPlanResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateSchedulingPlanResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateSchedulingPlanResponse>() { + @Override + public com.oracle.bmc.database.responses.CreateSchedulingPlanResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.CreateSchedulingPlanResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .SchedulingPlan>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.SchedulingPlan + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.SchedulingPlan + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.SchedulingPlan> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.CreateSchedulingPlanResponse + .Builder + builder = + com.oracle.bmc.database.responses + .CreateSchedulingPlanResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.schedulingPlan(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.CreateSchedulingPlanResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateSchedulingPolicyConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateSchedulingPolicyConverter.java new file mode 100644 index 00000000000..5a187c928d8 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateSchedulingPolicyConverter.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateSchedulingPolicyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateSchedulingPolicyConverter.class); + + public static com.oracle.bmc.database.requests.CreateSchedulingPolicyRequest interceptRequest( + com.oracle.bmc.database.requests.CreateSchedulingPolicyRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.CreateSchedulingPolicyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateSchedulingPolicyDetails(), + "createSchedulingPolicyDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("schedulingPolicies"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateSchedulingPolicyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateSchedulingPolicyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateSchedulingPolicyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .CreateSchedulingPolicyResponse>() { + @Override + public com.oracle.bmc.database.responses.CreateSchedulingPolicyResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.CreateSchedulingPolicyResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .SchedulingPolicy>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.SchedulingPolicy + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.SchedulingPolicy + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.SchedulingPolicy> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.CreateSchedulingPolicyResponse + .Builder + builder = + com.oracle.bmc.database.responses + .CreateSchedulingPolicyResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.schedulingPolicy(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.CreateSchedulingPolicyResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateSchedulingWindowConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateSchedulingWindowConverter.java new file mode 100644 index 00000000000..b229b47b93b --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/CreateSchedulingWindowConverter.java @@ -0,0 +1,163 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateSchedulingWindowConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateSchedulingWindowConverter.class); + + public static com.oracle.bmc.database.requests.CreateSchedulingWindowRequest interceptRequest( + com.oracle.bmc.database.requests.CreateSchedulingWindowRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.CreateSchedulingWindowRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSchedulingPolicyId(), "schedulingPolicyId must not be blank"); + Validate.notNull( + request.getCreateSchedulingWindowDetails(), + "createSchedulingWindowDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("schedulingPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulingPolicyId())) + .path("schedulingWindows"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateSchedulingWindowResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateSchedulingWindowResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.CreateSchedulingWindowResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .CreateSchedulingWindowResponse>() { + @Override + public com.oracle.bmc.database.responses.CreateSchedulingWindowResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.CreateSchedulingWindowResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .SchedulingWindow>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.SchedulingWindow + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.SchedulingWindow + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.SchedulingWindow> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.CreateSchedulingWindowResponse + .Builder + builder = + com.oracle.bmc.database.responses + .CreateSchedulingWindowResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.schedulingWindow(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.CreateSchedulingWindowResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteExadbVmClusterConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteExadbVmClusterConverter.java new file mode 100644 index 00000000000..87a72292bb1 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteExadbVmClusterConverter.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteExadbVmClusterConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteExadbVmClusterConverter.class); + + public static com.oracle.bmc.database.requests.DeleteExadbVmClusterRequest interceptRequest( + com.oracle.bmc.database.requests.DeleteExadbVmClusterRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.DeleteExadbVmClusterRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getExadbVmClusterId(), "exadbVmClusterId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("exadbVmClusters") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExadbVmClusterId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteExadbVmClusterResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteExadbVmClusterResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteExadbVmClusterResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteExadbVmClusterResponse>() { + @Override + public com.oracle.bmc.database.responses.DeleteExadbVmClusterResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.DeleteExadbVmClusterResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.DeleteExadbVmClusterResponse + .Builder + builder = + com.oracle.bmc.database.responses + .DeleteExadbVmClusterResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.DeleteExadbVmClusterResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteExascaleDbStorageVaultConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteExascaleDbStorageVaultConverter.java new file mode 100644 index 00000000000..24208fc0dcc --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteExascaleDbStorageVaultConverter.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteExascaleDbStorageVaultConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteExascaleDbStorageVaultConverter.class); + + public static com.oracle.bmc.database.requests.DeleteExascaleDbStorageVaultRequest + interceptRequest( + com.oracle.bmc.database.requests.DeleteExascaleDbStorageVaultRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.DeleteExascaleDbStorageVaultRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getExascaleDbStorageVaultId(), + "exascaleDbStorageVaultId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("exascaleDbStorageVaults") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExascaleDbStorageVaultId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteExascaleDbStorageVaultResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteExascaleDbStorageVaultResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteExascaleDbStorageVaultResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .DeleteExascaleDbStorageVaultResponse>() { + @Override + public com.oracle.bmc.database.responses + .DeleteExascaleDbStorageVaultResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.DeleteExascaleDbStorageVaultResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .DeleteExascaleDbStorageVaultResponse.Builder + builder = + com.oracle.bmc.database.responses + .DeleteExascaleDbStorageVaultResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses + .DeleteExascaleDbStorageVaultResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteExecutionActionConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteExecutionActionConverter.java new file mode 100644 index 00000000000..1b5fb4e23a4 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteExecutionActionConverter.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteExecutionActionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteExecutionActionConverter.class); + + public static com.oracle.bmc.database.requests.DeleteExecutionActionRequest interceptRequest( + com.oracle.bmc.database.requests.DeleteExecutionActionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.DeleteExecutionActionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getExecutionActionId(), "executionActionId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("executionActions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExecutionActionId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteExecutionActionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteExecutionActionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteExecutionActionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteExecutionActionResponse>() { + @Override + public com.oracle.bmc.database.responses.DeleteExecutionActionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.DeleteExecutionActionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.DeleteExecutionActionResponse + .Builder + builder = + com.oracle.bmc.database.responses + .DeleteExecutionActionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.DeleteExecutionActionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteExecutionWindowConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteExecutionWindowConverter.java new file mode 100644 index 00000000000..efa544c452a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteExecutionWindowConverter.java @@ -0,0 +1,128 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteExecutionWindowConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteExecutionWindowConverter.class); + + public static com.oracle.bmc.database.requests.DeleteExecutionWindowRequest interceptRequest( + com.oracle.bmc.database.requests.DeleteExecutionWindowRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.DeleteExecutionWindowRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getExecutionWindowId(), "executionWindowId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("executionWindows") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExecutionWindowId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteExecutionWindowResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteExecutionWindowResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteExecutionWindowResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteExecutionWindowResponse>() { + @Override + public com.oracle.bmc.database.responses.DeleteExecutionWindowResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.DeleteExecutionWindowResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.DeleteExecutionWindowResponse + .Builder + builder = + com.oracle.bmc.database.responses + .DeleteExecutionWindowResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.DeleteExecutionWindowResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteScheduledActionConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteScheduledActionConverter.java new file mode 100644 index 00000000000..b947f70c703 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteScheduledActionConverter.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteScheduledActionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteScheduledActionConverter.class); + + public static com.oracle.bmc.database.requests.DeleteScheduledActionRequest interceptRequest( + com.oracle.bmc.database.requests.DeleteScheduledActionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.DeleteScheduledActionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getScheduledActionId(), "scheduledActionId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("scheduledActions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getScheduledActionId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteScheduledActionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteScheduledActionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteScheduledActionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteScheduledActionResponse>() { + @Override + public com.oracle.bmc.database.responses.DeleteScheduledActionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.DeleteScheduledActionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.DeleteScheduledActionResponse + .Builder + builder = + com.oracle.bmc.database.responses + .DeleteScheduledActionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.DeleteScheduledActionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteSchedulingPlanConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteSchedulingPlanConverter.java new file mode 100644 index 00000000000..2ec78d7ef23 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteSchedulingPlanConverter.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteSchedulingPlanConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteSchedulingPlanConverter.class); + + public static com.oracle.bmc.database.requests.DeleteSchedulingPlanRequest interceptRequest( + com.oracle.bmc.database.requests.DeleteSchedulingPlanRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.DeleteSchedulingPlanRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSchedulingPlanId(), "schedulingPlanId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("schedulingPlans") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulingPlanId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteSchedulingPlanResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteSchedulingPlanResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteSchedulingPlanResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteSchedulingPlanResponse>() { + @Override + public com.oracle.bmc.database.responses.DeleteSchedulingPlanResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.DeleteSchedulingPlanResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.DeleteSchedulingPlanResponse + .Builder + builder = + com.oracle.bmc.database.responses + .DeleteSchedulingPlanResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.DeleteSchedulingPlanResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteSchedulingPolicyConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteSchedulingPolicyConverter.java new file mode 100644 index 00000000000..4c881d6b1b4 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteSchedulingPolicyConverter.java @@ -0,0 +1,129 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteSchedulingPolicyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteSchedulingPolicyConverter.class); + + public static com.oracle.bmc.database.requests.DeleteSchedulingPolicyRequest interceptRequest( + com.oracle.bmc.database.requests.DeleteSchedulingPolicyRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.DeleteSchedulingPolicyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSchedulingPolicyId(), "schedulingPolicyId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("schedulingPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulingPolicyId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteSchedulingPolicyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteSchedulingPolicyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteSchedulingPolicyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .DeleteSchedulingPolicyResponse>() { + @Override + public com.oracle.bmc.database.responses.DeleteSchedulingPolicyResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.DeleteSchedulingPolicyResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.DeleteSchedulingPolicyResponse + .Builder + builder = + com.oracle.bmc.database.responses + .DeleteSchedulingPolicyResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.DeleteSchedulingPolicyResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteSchedulingWindowConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteSchedulingWindowConverter.java new file mode 100644 index 00000000000..ea4a09c16aa --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/DeleteSchedulingWindowConverter.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteSchedulingWindowConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteSchedulingWindowConverter.class); + + public static com.oracle.bmc.database.requests.DeleteSchedulingWindowRequest interceptRequest( + com.oracle.bmc.database.requests.DeleteSchedulingWindowRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.DeleteSchedulingWindowRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSchedulingPolicyId(), "schedulingPolicyId must not be blank"); + Validate.notBlank(request.getSchedulingWindowId(), "schedulingWindowId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("schedulingPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulingPolicyId())) + .path("schedulingWindows") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulingWindowId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteSchedulingWindowResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteSchedulingWindowResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.DeleteSchedulingWindowResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .DeleteSchedulingWindowResponse>() { + @Override + public com.oracle.bmc.database.responses.DeleteSchedulingWindowResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.DeleteSchedulingWindowResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.DeleteSchedulingWindowResponse + .Builder + builder = + com.oracle.bmc.database.responses + .DeleteSchedulingWindowResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.DeleteSchedulingWindowResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetExadbVmClusterConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetExadbVmClusterConverter.java new file mode 100644 index 00000000000..69fb448ca23 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetExadbVmClusterConverter.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetExadbVmClusterConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetExadbVmClusterConverter.class); + + public static com.oracle.bmc.database.requests.GetExadbVmClusterRequest interceptRequest( + com.oracle.bmc.database.requests.GetExadbVmClusterRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.GetExadbVmClusterRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getExadbVmClusterId(), "exadbVmClusterId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("exadbVmClusters") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExadbVmClusterId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetExadbVmClusterResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetExadbVmClusterResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetExadbVmClusterResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetExadbVmClusterResponse>() { + @Override + public com.oracle.bmc.database.responses.GetExadbVmClusterResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.GetExadbVmClusterResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExadbVmCluster>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExadbVmCluster + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExadbVmCluster + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.ExadbVmCluster> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.GetExadbVmClusterResponse.Builder + builder = + com.oracle.bmc.database.responses + .GetExadbVmClusterResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.exadbVmCluster(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.GetExadbVmClusterResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetExadbVmClusterUpdateConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetExadbVmClusterUpdateConverter.java new file mode 100644 index 00000000000..e630d4bfffe --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetExadbVmClusterUpdateConverter.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetExadbVmClusterUpdateConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetExadbVmClusterUpdateConverter.class); + + public static com.oracle.bmc.database.requests.GetExadbVmClusterUpdateRequest interceptRequest( + com.oracle.bmc.database.requests.GetExadbVmClusterUpdateRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.GetExadbVmClusterUpdateRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getExadbVmClusterId(), "exadbVmClusterId must not be blank"); + Validate.notBlank(request.getUpdateId(), "updateId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("exadbVmClusters") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExadbVmClusterId())) + .path("updates") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getUpdateId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetExadbVmClusterUpdateResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetExadbVmClusterUpdateResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetExadbVmClusterUpdateResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .GetExadbVmClusterUpdateResponse>() { + @Override + public com.oracle.bmc.database.responses.GetExadbVmClusterUpdateResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.GetExadbVmClusterUpdateResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExadbVmClusterUpdate>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .ExadbVmClusterUpdate + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .ExadbVmClusterUpdate + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.ExadbVmClusterUpdate> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.GetExadbVmClusterUpdateResponse + .Builder + builder = + com.oracle.bmc.database.responses + .GetExadbVmClusterUpdateResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.exadbVmClusterUpdate(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.GetExadbVmClusterUpdateResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetExadbVmClusterUpdateHistoryEntryConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetExadbVmClusterUpdateHistoryEntryConverter.java new file mode 100644 index 00000000000..27f422c2dda --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetExadbVmClusterUpdateHistoryEntryConverter.java @@ -0,0 +1,159 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetExadbVmClusterUpdateHistoryEntryConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetExadbVmClusterUpdateHistoryEntryConverter.class); + + public static com.oracle.bmc.database.requests.GetExadbVmClusterUpdateHistoryEntryRequest + interceptRequest( + com.oracle.bmc.database.requests.GetExadbVmClusterUpdateHistoryEntryRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.GetExadbVmClusterUpdateHistoryEntryRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getExadbVmClusterId(), "exadbVmClusterId must not be blank"); + Validate.notBlank( + request.getUpdateHistoryEntryId(), "updateHistoryEntryId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("exadbVmClusters") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExadbVmClusterId())) + .path("updateHistoryEntries") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getUpdateHistoryEntryId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetExadbVmClusterUpdateHistoryEntryResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetExadbVmClusterUpdateHistoryEntryResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .GetExadbVmClusterUpdateHistoryEntryResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .GetExadbVmClusterUpdateHistoryEntryResponse>() { + @Override + public com.oracle.bmc.database.responses + .GetExadbVmClusterUpdateHistoryEntryResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.GetExadbVmClusterUpdateHistoryEntryResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExadbVmClusterUpdateHistoryEntry>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .ExadbVmClusterUpdateHistoryEntry + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .ExadbVmClusterUpdateHistoryEntry + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExadbVmClusterUpdateHistoryEntry> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .GetExadbVmClusterUpdateHistoryEntryResponse.Builder + builder = + com.oracle.bmc.database.responses + .GetExadbVmClusterUpdateHistoryEntryResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.exadbVmClusterUpdateHistoryEntry(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses + .GetExadbVmClusterUpdateHistoryEntryResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetExascaleDbStorageVaultConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetExascaleDbStorageVaultConverter.java new file mode 100644 index 00000000000..ae170e355ba --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetExascaleDbStorageVaultConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetExascaleDbStorageVaultConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetExascaleDbStorageVaultConverter.class); + + public static com.oracle.bmc.database.requests.GetExascaleDbStorageVaultRequest + interceptRequest( + com.oracle.bmc.database.requests.GetExascaleDbStorageVaultRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.GetExascaleDbStorageVaultRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getExascaleDbStorageVaultId(), + "exascaleDbStorageVaultId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("exascaleDbStorageVaults") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExascaleDbStorageVaultId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetExascaleDbStorageVaultResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetExascaleDbStorageVaultResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetExascaleDbStorageVaultResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .GetExascaleDbStorageVaultResponse>() { + @Override + public com.oracle.bmc.database.responses + .GetExascaleDbStorageVaultResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.GetExascaleDbStorageVaultResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExascaleDbStorageVault>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .ExascaleDbStorageVault + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .ExascaleDbStorageVault + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExascaleDbStorageVault> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.GetExascaleDbStorageVaultResponse + .Builder + builder = + com.oracle.bmc.database.responses + .GetExascaleDbStorageVaultResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.exascaleDbStorageVault(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.GetExascaleDbStorageVaultResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetExecutionActionConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetExecutionActionConverter.java new file mode 100644 index 00000000000..85ef2e28b18 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetExecutionActionConverter.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetExecutionActionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetExecutionActionConverter.class); + + public static com.oracle.bmc.database.requests.GetExecutionActionRequest interceptRequest( + com.oracle.bmc.database.requests.GetExecutionActionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.GetExecutionActionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getExecutionActionId(), "executionActionId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("executionActions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExecutionActionId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetExecutionActionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetExecutionActionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetExecutionActionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetExecutionActionResponse>() { + @Override + public com.oracle.bmc.database.responses.GetExecutionActionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.GetExecutionActionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExecutionAction>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExecutionAction + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExecutionAction + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.ExecutionAction> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.GetExecutionActionResponse.Builder + builder = + com.oracle.bmc.database.responses + .GetExecutionActionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.executionAction(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.GetExecutionActionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetExecutionWindowConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetExecutionWindowConverter.java new file mode 100644 index 00000000000..a98bdb33087 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetExecutionWindowConverter.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetExecutionWindowConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetExecutionWindowConverter.class); + + public static com.oracle.bmc.database.requests.GetExecutionWindowRequest interceptRequest( + com.oracle.bmc.database.requests.GetExecutionWindowRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.GetExecutionWindowRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getExecutionWindowId(), "executionWindowId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("executionWindows") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExecutionWindowId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetExecutionWindowResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetExecutionWindowResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetExecutionWindowResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetExecutionWindowResponse>() { + @Override + public com.oracle.bmc.database.responses.GetExecutionWindowResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.GetExecutionWindowResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExecutionWindow>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExecutionWindow + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExecutionWindow + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.ExecutionWindow> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.GetExecutionWindowResponse.Builder + builder = + com.oracle.bmc.database.responses + .GetExecutionWindowResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.executionWindow(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.GetExecutionWindowResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetScheduledActionConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetScheduledActionConverter.java new file mode 100644 index 00000000000..0b87473769c --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetScheduledActionConverter.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetScheduledActionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetScheduledActionConverter.class); + + public static com.oracle.bmc.database.requests.GetScheduledActionRequest interceptRequest( + com.oracle.bmc.database.requests.GetScheduledActionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.GetScheduledActionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getScheduledActionId(), "scheduledActionId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("scheduledActions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getScheduledActionId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetScheduledActionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetScheduledActionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetScheduledActionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetScheduledActionResponse>() { + @Override + public com.oracle.bmc.database.responses.GetScheduledActionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.GetScheduledActionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ScheduledAction>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ScheduledAction + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ScheduledAction + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.ScheduledAction> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.GetScheduledActionResponse.Builder + builder = + com.oracle.bmc.database.responses + .GetScheduledActionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.scheduledAction(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.GetScheduledActionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetSchedulingPlanConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetSchedulingPlanConverter.java new file mode 100644 index 00000000000..787849ebfb6 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetSchedulingPlanConverter.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetSchedulingPlanConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetSchedulingPlanConverter.class); + + public static com.oracle.bmc.database.requests.GetSchedulingPlanRequest interceptRequest( + com.oracle.bmc.database.requests.GetSchedulingPlanRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.GetSchedulingPlanRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSchedulingPlanId(), "schedulingPlanId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("schedulingPlans") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulingPlanId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetSchedulingPlanResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetSchedulingPlanResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetSchedulingPlanResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetSchedulingPlanResponse>() { + @Override + public com.oracle.bmc.database.responses.GetSchedulingPlanResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.GetSchedulingPlanResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .SchedulingPlan>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.SchedulingPlan + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.SchedulingPlan + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.SchedulingPlan> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.GetSchedulingPlanResponse.Builder + builder = + com.oracle.bmc.database.responses + .GetSchedulingPlanResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.schedulingPlan(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.GetSchedulingPlanResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetSchedulingPolicyConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetSchedulingPolicyConverter.java new file mode 100644 index 00000000000..daf6fd281bf --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetSchedulingPolicyConverter.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetSchedulingPolicyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetSchedulingPolicyConverter.class); + + public static com.oracle.bmc.database.requests.GetSchedulingPolicyRequest interceptRequest( + com.oracle.bmc.database.requests.GetSchedulingPolicyRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.GetSchedulingPolicyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSchedulingPolicyId(), "schedulingPolicyId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("schedulingPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulingPolicyId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetSchedulingPolicyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetSchedulingPolicyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetSchedulingPolicyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetSchedulingPolicyResponse>() { + @Override + public com.oracle.bmc.database.responses.GetSchedulingPolicyResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.GetSchedulingPolicyResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .SchedulingPolicy>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.SchedulingPolicy + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.SchedulingPolicy + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.SchedulingPolicy> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.GetSchedulingPolicyResponse + .Builder + builder = + com.oracle.bmc.database.responses + .GetSchedulingPolicyResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.schedulingPolicy(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.GetSchedulingPolicyResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetSchedulingWindowConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetSchedulingWindowConverter.java new file mode 100644 index 00000000000..fd43e05a340 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/GetSchedulingWindowConverter.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetSchedulingWindowConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetSchedulingWindowConverter.class); + + public static com.oracle.bmc.database.requests.GetSchedulingWindowRequest interceptRequest( + com.oracle.bmc.database.requests.GetSchedulingWindowRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.GetSchedulingWindowRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSchedulingPolicyId(), "schedulingPolicyId must not be blank"); + Validate.notBlank(request.getSchedulingWindowId(), "schedulingWindowId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("schedulingPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulingPolicyId())) + .path("schedulingWindows") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulingWindowId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetSchedulingWindowResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetSchedulingWindowResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetSchedulingWindowResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.GetSchedulingWindowResponse>() { + @Override + public com.oracle.bmc.database.responses.GetSchedulingWindowResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.GetSchedulingWindowResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .SchedulingWindow>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.SchedulingWindow + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.SchedulingWindow + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.SchedulingWindow> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.GetSchedulingWindowResponse + .Builder + builder = + com.oracle.bmc.database.responses + .GetSchedulingWindowResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.schedulingWindow(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.GetSchedulingWindowResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDatabasesConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDatabasesConverter.java index 1f7288dd8df..18df32e33fc 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDatabasesConverter.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListAutonomousDatabasesConverter.java @@ -96,6 +96,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getLifecycleState().getValue())); } + if (request.getLifecycleStateNotEqualTo() != null) { + target = + target.queryParam( + "lifecycleStateNotEqualTo", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleStateNotEqualTo().getValue())); + } + if (request.getDbWorkload() != null) { target = target.queryParam( diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListBackupsConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListBackupsConverter.java index 1bbd6b87d18..3d19f3f4344 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListBackupsConverter.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListBackupsConverter.java @@ -65,6 +65,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getPage())); } + if (request.getShapeFamily() != null) { + target = + target.queryParam( + "shapeFamily", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getShapeFamily().getValue())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExadbVmClusterUpdateHistoryEntriesConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExadbVmClusterUpdateHistoryEntriesConverter.java new file mode 100644 index 00000000000..3198a7963f8 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExadbVmClusterUpdateHistoryEntriesConverter.java @@ -0,0 +1,189 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListExadbVmClusterUpdateHistoryEntriesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ListExadbVmClusterUpdateHistoryEntriesConverter.class); + + public static com.oracle.bmc.database.requests.ListExadbVmClusterUpdateHistoryEntriesRequest + interceptRequest( + com.oracle.bmc.database.requests.ListExadbVmClusterUpdateHistoryEntriesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ListExadbVmClusterUpdateHistoryEntriesRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getExadbVmClusterId(), "exadbVmClusterId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("exadbVmClusters") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExadbVmClusterId())) + .path("updateHistoryEntries"); + + if (request.getUpdateType() != null) { + target = + target.queryParam( + "updateType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getUpdateType().getValue())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ListExadbVmClusterUpdateHistoryEntriesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ListExadbVmClusterUpdateHistoryEntriesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ListExadbVmClusterUpdateHistoryEntriesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ListExadbVmClusterUpdateHistoryEntriesResponse>() { + @Override + public com.oracle.bmc.database.responses + .ListExadbVmClusterUpdateHistoryEntriesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ListExadbVmClusterUpdateHistoryEntriesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.database.model + .ExadbVmClusterUpdateHistoryEntrySummary>>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.database.model + .ExadbVmClusterUpdateHistoryEntrySummary>>() {}, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.database.model + .ExadbVmClusterUpdateHistoryEntrySummary>>() {}); + } + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.database.model + .ExadbVmClusterUpdateHistoryEntrySummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .ListExadbVmClusterUpdateHistoryEntriesResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ListExadbVmClusterUpdateHistoryEntriesResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.items(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses + .ListExadbVmClusterUpdateHistoryEntriesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExadbVmClusterUpdatesConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExadbVmClusterUpdatesConverter.java new file mode 100644 index 00000000000..1d424724679 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExadbVmClusterUpdatesConverter.java @@ -0,0 +1,188 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListExadbVmClusterUpdatesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListExadbVmClusterUpdatesConverter.class); + + public static com.oracle.bmc.database.requests.ListExadbVmClusterUpdatesRequest + interceptRequest( + com.oracle.bmc.database.requests.ListExadbVmClusterUpdatesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ListExadbVmClusterUpdatesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getExadbVmClusterId(), "exadbVmClusterId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("exadbVmClusters") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExadbVmClusterId())) + .path("updates"); + + if (request.getUpdateType() != null) { + target = + target.queryParam( + "updateType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getUpdateType().getValue())); + } + + if (request.getVersion() != null) { + target = + target.queryParam( + "version", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getVersion())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListExadbVmClusterUpdatesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListExadbVmClusterUpdatesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListExadbVmClusterUpdatesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ListExadbVmClusterUpdatesResponse>() { + @Override + public com.oracle.bmc.database.responses + .ListExadbVmClusterUpdatesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ListExadbVmClusterUpdatesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.database.model + .ExadbVmClusterUpdateSummary>>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.database.model + .ExadbVmClusterUpdateSummary>>() {}, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.database.model + .ExadbVmClusterUpdateSummary>>() {}); + } + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.database.model + .ExadbVmClusterUpdateSummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.ListExadbVmClusterUpdatesResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ListExadbVmClusterUpdatesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.items(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.ListExadbVmClusterUpdatesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExadbVmClustersConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExadbVmClustersConverter.java new file mode 100644 index 00000000000..52a7e2091b8 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExadbVmClustersConverter.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListExadbVmClustersConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListExadbVmClustersConverter.class); + + public static com.oracle.bmc.database.requests.ListExadbVmClustersRequest interceptRequest( + com.oracle.bmc.database.requests.ListExadbVmClustersRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ListExadbVmClustersRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("exadbVmClusters"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getExascaleDbStorageVaultId() != null) { + target = + target.queryParam( + "exascaleDbStorageVaultId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getExascaleDbStorageVaultId())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListExadbVmClustersResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListExadbVmClustersResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListExadbVmClustersResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListExadbVmClustersResponse>() { + @Override + public com.oracle.bmc.database.responses.ListExadbVmClustersResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ListExadbVmClustersResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.database.model + .ExadbVmClusterSummary>>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.database.model + .ExadbVmClusterSummary>>() {}, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.database.model + .ExadbVmClusterSummary>>() {}); + } + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.database.model + .ExadbVmClusterSummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.ListExadbVmClustersResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ListExadbVmClustersResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.items(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.ListExadbVmClustersResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExascaleDbStorageVaultsConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExascaleDbStorageVaultsConverter.java new file mode 100644 index 00000000000..205c1e88f21 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExascaleDbStorageVaultsConverter.java @@ -0,0 +1,214 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListExascaleDbStorageVaultsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListExascaleDbStorageVaultsConverter.class); + + public static com.oracle.bmc.database.requests.ListExascaleDbStorageVaultsRequest + interceptRequest( + com.oracle.bmc.database.requests.ListExascaleDbStorageVaultsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ListExascaleDbStorageVaultsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("exascaleDbStorageVaults"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getExadataInfrastructureId() != null) { + target = + target.queryParam( + "exadataInfrastructureId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getExadataInfrastructureId())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListExascaleDbStorageVaultsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListExascaleDbStorageVaultsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListExascaleDbStorageVaultsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ListExascaleDbStorageVaultsResponse>() { + @Override + public com.oracle.bmc.database.responses + .ListExascaleDbStorageVaultsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ListExascaleDbStorageVaultsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.database.model + .ExascaleDbStorageVaultSummary>>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.database.model + .ExascaleDbStorageVaultSummary>>() {}, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.database.model + .ExascaleDbStorageVaultSummary>>() {}); + } + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.database.model + .ExascaleDbStorageVaultSummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .ListExascaleDbStorageVaultsResponse.Builder + builder = + com.oracle.bmc.database.responses + .ListExascaleDbStorageVaultsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.items(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses + .ListExascaleDbStorageVaultsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExecutionActionsConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExecutionActionsConverter.java new file mode 100644 index 00000000000..7b3e6435d36 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExecutionActionsConverter.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListExecutionActionsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListExecutionActionsConverter.class); + + public static com.oracle.bmc.database.requests.ListExecutionActionsRequest interceptRequest( + com.oracle.bmc.database.requests.ListExecutionActionsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ListExecutionActionsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("executionActions"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getExecutionWindowId() != null) { + target = + target.queryParam( + "executionWindowId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getExecutionWindowId())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListExecutionActionsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListExecutionActionsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListExecutionActionsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListExecutionActionsResponse>() { + @Override + public com.oracle.bmc.database.responses.ListExecutionActionsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ListExecutionActionsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.database.model + .ExecutionActionSummary>>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.database.model + .ExecutionActionSummary>>() {}, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.database.model + .ExecutionActionSummary>>() {}); + } + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.database.model + .ExecutionActionSummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.ListExecutionActionsResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ListExecutionActionsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.items(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.ListExecutionActionsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExecutionWindowsConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExecutionWindowsConverter.java new file mode 100644 index 00000000000..686a910a3ef --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListExecutionWindowsConverter.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListExecutionWindowsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListExecutionWindowsConverter.class); + + public static com.oracle.bmc.database.requests.ListExecutionWindowsRequest interceptRequest( + com.oracle.bmc.database.requests.ListExecutionWindowsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ListExecutionWindowsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("executionWindows"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getExecutionResourceId() != null) { + target = + target.queryParam( + "executionResourceId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getExecutionResourceId())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListExecutionWindowsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListExecutionWindowsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListExecutionWindowsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListExecutionWindowsResponse>() { + @Override + public com.oracle.bmc.database.responses.ListExecutionWindowsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ListExecutionWindowsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.database.model + .ExecutionWindowSummary>>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.database.model + .ExecutionWindowSummary>>() {}, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.database.model + .ExecutionWindowSummary>>() {}); + } + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.database.model + .ExecutionWindowSummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.ListExecutionWindowsResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ListExecutionWindowsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.items(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.ListExecutionWindowsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListGiVersionMinorVersionsConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListGiVersionMinorVersionsConverter.java new file mode 100644 index 00000000000..23ef93f6004 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListGiVersionMinorVersionsConverter.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListGiVersionMinorVersionsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListGiVersionMinorVersionsConverter.class); + + public static com.oracle.bmc.database.requests.ListGiVersionMinorVersionsRequest + interceptRequest( + com.oracle.bmc.database.requests.ListGiVersionMinorVersionsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ListGiVersionMinorVersionsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getVersion(), "version must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("giVersions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getVersion())) + .path("minorVersions"); + + if (request.getAvailabilityDomain() != null) { + target = + target.queryParam( + "availabilityDomain", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAvailabilityDomain())); + } + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getShapeFamily() != null) { + target = + target.queryParam( + "shapeFamily", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getShapeFamily().getValue())); + } + + if (request.getIsGiVersionForProvisioning() != null) { + target = + target.queryParam( + "isGiVersionForProvisioning", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsGiVersionForProvisioning())); + } + + if (request.getShape() != null) { + target = + target.queryParam( + "shape", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getShape())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListGiVersionMinorVersionsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListGiVersionMinorVersionsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListGiVersionMinorVersionsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ListGiVersionMinorVersionsResponse>() { + @Override + public com.oracle.bmc.database.responses + .ListGiVersionMinorVersionsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ListGiVersionMinorVersionsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.database.model + .GiMinorVersionSummary>>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.database.model + .GiMinorVersionSummary>>() {}, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.database.model + .GiMinorVersionSummary>>() {}); + } + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.database.model + .GiMinorVersionSummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.ListGiVersionMinorVersionsResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ListGiVersionMinorVersionsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.items(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.ListGiVersionMinorVersionsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListGiVersionsConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListGiVersionsConverter.java index d0766fc7e07..f3b355947a6 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListGiVersionsConverter.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListGiVersionsConverter.java @@ -72,6 +72,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getShape())); } + if (request.getAvailabilityDomain() != null) { + target = + target.queryParam( + "availabilityDomain", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAvailabilityDomain())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListParamsForActionTypeConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListParamsForActionTypeConverter.java new file mode 100644 index 00000000000..b27f676d417 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListParamsForActionTypeConverter.java @@ -0,0 +1,166 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListParamsForActionTypeConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListParamsForActionTypeConverter.class); + + public static com.oracle.bmc.database.requests.ListParamsForActionTypeRequest interceptRequest( + com.oracle.bmc.database.requests.ListParamsForActionTypeRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ListParamsForActionTypeRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getType(), "type is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("scheduledActionParams"); + + target = + target.queryParam( + "type", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getType().getValue())); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListParamsForActionTypeResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListParamsForActionTypeResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListParamsForActionTypeResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ListParamsForActionTypeResponse>() { + @Override + public com.oracle.bmc.database.responses.ListParamsForActionTypeResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ListParamsForActionTypeResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ActionParamValuesCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .ActionParamValuesCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .ActionParamValuesCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ActionParamValuesCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.ListParamsForActionTypeResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ListParamsForActionTypeResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.actionParamValuesCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.ListParamsForActionTypeResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListRecommendedScheduledActionsConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListRecommendedScheduledActionsConverter.java new file mode 100644 index 00000000000..c0f863262b6 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListRecommendedScheduledActionsConverter.java @@ -0,0 +1,187 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListRecommendedScheduledActionsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListRecommendedScheduledActionsConverter.class); + + public static com.oracle.bmc.database.requests.ListRecommendedScheduledActionsRequest + interceptRequest( + com.oracle.bmc.database.requests.ListRecommendedScheduledActionsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ListRecommendedScheduledActionsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSchedulingPolicyId(), "schedulingPolicyId must not be blank"); + Validate.notNull( + request.getSchedulingPolicyTargetResourceId(), + "schedulingPolicyTargetResourceId is required"); + Validate.notNull(request.getPlanIntent(), "planIntent is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("schedulingPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulingPolicyId())) + .path("recommendedScheduledActions"); + + target = + target.queryParam( + "schedulingPolicyTargetResourceId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSchedulingPolicyTargetResourceId())); + + target = + target.queryParam( + "planIntent", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPlanIntent().getValue())); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListRecommendedScheduledActionsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListRecommendedScheduledActionsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListRecommendedScheduledActionsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ListRecommendedScheduledActionsResponse>() { + @Override + public com.oracle.bmc.database.responses + .ListRecommendedScheduledActionsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ListRecommendedScheduledActionsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .RecommendedScheduledActionsCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .RecommendedScheduledActionsCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .RecommendedScheduledActionsCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .RecommendedScheduledActionsCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .ListRecommendedScheduledActionsResponse.Builder + builder = + com.oracle.bmc.database.responses + .ListRecommendedScheduledActionsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.recommendedScheduledActionsCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses + .ListRecommendedScheduledActionsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListScheduledActionsConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListScheduledActionsConverter.java new file mode 100644 index 00000000000..ab3a5eba65c --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListScheduledActionsConverter.java @@ -0,0 +1,221 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListScheduledActionsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListScheduledActionsConverter.class); + + public static com.oracle.bmc.database.requests.ListScheduledActionsRequest interceptRequest( + com.oracle.bmc.database.requests.ListScheduledActionsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ListScheduledActionsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("scheduledActions"); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getServiceType() != null) { + target = + target.queryParam( + "serviceType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getServiceType())); + } + + if (request.getSchedulingPlanId() != null) { + target = + target.queryParam( + "schedulingPlanId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSchedulingPlanId())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListScheduledActionsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListScheduledActionsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListScheduledActionsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListScheduledActionsResponse>() { + @Override + public com.oracle.bmc.database.responses.ListScheduledActionsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ListScheduledActionsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ScheduledActionCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .ScheduledActionCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .ScheduledActionCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ScheduledActionCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.ListScheduledActionsResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ListScheduledActionsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.scheduledActionCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.ListScheduledActionsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListSchedulingPlansConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListSchedulingPlansConverter.java new file mode 100644 index 00000000000..e309771f477 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListSchedulingPlansConverter.java @@ -0,0 +1,221 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListSchedulingPlansConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListSchedulingPlansConverter.class); + + public static com.oracle.bmc.database.requests.ListSchedulingPlansRequest interceptRequest( + com.oracle.bmc.database.requests.ListSchedulingPlansRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ListSchedulingPlansRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("schedulingPlans"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getSchedulingPolicyId() != null) { + target = + target.queryParam( + "schedulingPolicyId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSchedulingPolicyId())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getResourceId() != null) { + target = + target.queryParam( + "resourceId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceId())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListSchedulingPlansResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListSchedulingPlansResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListSchedulingPlansResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListSchedulingPlansResponse>() { + @Override + public com.oracle.bmc.database.responses.ListSchedulingPlansResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ListSchedulingPlansResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .SchedulingPlanCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .SchedulingPlanCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .SchedulingPlanCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .SchedulingPlanCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.ListSchedulingPlansResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ListSchedulingPlansResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.schedulingPlanCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.ListSchedulingPlansResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListSchedulingPoliciesConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListSchedulingPoliciesConverter.java new file mode 100644 index 00000000000..df90855f1d2 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListSchedulingPoliciesConverter.java @@ -0,0 +1,202 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListSchedulingPoliciesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListSchedulingPoliciesConverter.class); + + public static com.oracle.bmc.database.requests.ListSchedulingPoliciesRequest interceptRequest( + com.oracle.bmc.database.requests.ListSchedulingPoliciesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ListSchedulingPoliciesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("schedulingPolicies"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListSchedulingPoliciesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListSchedulingPoliciesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListSchedulingPoliciesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ListSchedulingPoliciesResponse>() { + @Override + public com.oracle.bmc.database.responses.ListSchedulingPoliciesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ListSchedulingPoliciesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.database.model + .SchedulingPolicySummary>>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.database.model + .SchedulingPolicySummary>>() {}, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.database.model + .SchedulingPolicySummary>>() {}); + } + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.database.model + .SchedulingPolicySummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.ListSchedulingPoliciesResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ListSchedulingPoliciesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.items(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.ListSchedulingPoliciesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListSchedulingWindowsConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListSchedulingWindowsConverter.java new file mode 100644 index 00000000000..0eb4bbb8bbb --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ListSchedulingWindowsConverter.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListSchedulingWindowsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListSchedulingWindowsConverter.class); + + public static com.oracle.bmc.database.requests.ListSchedulingWindowsRequest interceptRequest( + com.oracle.bmc.database.requests.ListSchedulingWindowsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ListSchedulingWindowsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSchedulingPolicyId(), "schedulingPolicyId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("schedulingPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulingPolicyId())) + .path("schedulingWindows"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListSchedulingWindowsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListSchedulingWindowsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListSchedulingWindowsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ListSchedulingWindowsResponse>() { + @Override + public com.oracle.bmc.database.responses.ListSchedulingWindowsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ListSchedulingWindowsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.database.model + .SchedulingWindowSummary>>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.database.model + .SchedulingWindowSummary>>() {}, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.database.model + .SchedulingWindowSummary>>() {}); + } + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.database.model + .SchedulingWindowSummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.ListSchedulingWindowsResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ListSchedulingWindowsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.items(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.ListSchedulingWindowsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/MoveExecutionActionMemberConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/MoveExecutionActionMemberConverter.java new file mode 100644 index 00000000000..19ba9fb6ee6 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/MoveExecutionActionMemberConverter.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class MoveExecutionActionMemberConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(MoveExecutionActionMemberConverter.class); + + public static com.oracle.bmc.database.requests.MoveExecutionActionMemberRequest + interceptRequest( + com.oracle.bmc.database.requests.MoveExecutionActionMemberRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.MoveExecutionActionMemberRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getExecutionActionId(), "executionActionId must not be blank"); + Validate.notNull( + request.getMoveExecutionActionMemberDetails(), + "moveExecutionActionMemberDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("executionActions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExecutionActionId())) + .path("actions") + .path("moveActionMember"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.MoveExecutionActionMemberResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.MoveExecutionActionMemberResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.MoveExecutionActionMemberResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .MoveExecutionActionMemberResponse>() { + @Override + public com.oracle.bmc.database.responses + .MoveExecutionActionMemberResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.MoveExecutionActionMemberResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExecutionAction>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExecutionAction + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExecutionAction + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.ExecutionAction> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.MoveExecutionActionMemberResponse + .Builder + builder = + com.oracle.bmc.database.responses + .MoveExecutionActionMemberResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.executionAction(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.MoveExecutionActionMemberResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/RemoveVirtualMachineFromExadbVmClusterConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/RemoveVirtualMachineFromExadbVmClusterConverter.java new file mode 100644 index 00000000000..26fbb23c63d --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/RemoveVirtualMachineFromExadbVmClusterConverter.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class RemoveVirtualMachineFromExadbVmClusterConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + RemoveVirtualMachineFromExadbVmClusterConverter.class); + + public static com.oracle.bmc.database.requests.RemoveVirtualMachineFromExadbVmClusterRequest + interceptRequest( + com.oracle.bmc.database.requests.RemoveVirtualMachineFromExadbVmClusterRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.RemoveVirtualMachineFromExadbVmClusterRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getRemoveVirtualMachineFromExadbVmClusterDetails(), + "removeVirtualMachineFromExadbVmClusterDetails is required"); + Validate.notBlank(request.getExadbVmClusterId(), "exadbVmClusterId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("exadbVmClusters") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExadbVmClusterId())) + .path("actions") + .path("removeVirtualMachine"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .RemoveVirtualMachineFromExadbVmClusterResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .RemoveVirtualMachineFromExadbVmClusterResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .RemoveVirtualMachineFromExadbVmClusterResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .RemoveVirtualMachineFromExadbVmClusterResponse>() { + @Override + public com.oracle.bmc.database.responses + .RemoveVirtualMachineFromExadbVmClusterResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.RemoveVirtualMachineFromExadbVmClusterResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExadbVmCluster>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExadbVmCluster + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExadbVmCluster + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.ExadbVmCluster> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .RemoveVirtualMachineFromExadbVmClusterResponse + .Builder + builder = + com.oracle.bmc.database.responses + .RemoveVirtualMachineFromExadbVmClusterResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.exadbVmCluster(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses + .RemoveVirtualMachineFromExadbVmClusterResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ReorderExecutionActionsConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ReorderExecutionActionsConverter.java new file mode 100644 index 00000000000..848fb22bd27 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ReorderExecutionActionsConverter.java @@ -0,0 +1,168 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ReorderExecutionActionsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ReorderExecutionActionsConverter.class); + + public static com.oracle.bmc.database.requests.ReorderExecutionActionsRequest interceptRequest( + com.oracle.bmc.database.requests.ReorderExecutionActionsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ReorderExecutionActionsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getExecutionWindowId(), "executionWindowId must not be blank"); + Validate.notNull( + request.getReorderExecutionActionDetails(), + "reorderExecutionActionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("executionWindows") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExecutionWindowId())) + .path("actions") + .path("reorder"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ReorderExecutionActionsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ReorderExecutionActionsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ReorderExecutionActionsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ReorderExecutionActionsResponse>() { + @Override + public com.oracle.bmc.database.responses.ReorderExecutionActionsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ReorderExecutionActionsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExecutionWindow>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExecutionWindow + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExecutionWindow + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.ExecutionWindow> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.ReorderExecutionActionsResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ReorderExecutionActionsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.executionWindow(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.ReorderExecutionActionsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ReorderScheduledActionsConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ReorderScheduledActionsConverter.java new file mode 100644 index 00000000000..cb40abd8163 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/ReorderScheduledActionsConverter.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ReorderScheduledActionsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ReorderScheduledActionsConverter.class); + + public static com.oracle.bmc.database.requests.ReorderScheduledActionsRequest interceptRequest( + com.oracle.bmc.database.requests.ReorderScheduledActionsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.ReorderScheduledActionsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getReorderScheduledActionsDetails(), + "reorderScheduledActionsDetails is required"); + Validate.notBlank(request.getSchedulingPlanId(), "schedulingPlanId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("schedulingPlans") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulingPlanId())) + .path("actions") + .path("reorder"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ReorderScheduledActionsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ReorderScheduledActionsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.ReorderScheduledActionsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .ReorderScheduledActionsResponse>() { + @Override + public com.oracle.bmc.database.responses.ReorderScheduledActionsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.ReorderScheduledActionsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .SchedulingPlan>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.SchedulingPlan + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.SchedulingPlan + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.SchedulingPlan> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.ReorderScheduledActionsResponse + .Builder + builder = + com.oracle.bmc.database.responses + .ReorderScheduledActionsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.schedulingPlan(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.ReorderScheduledActionsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/SetDbKeyVersionConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/SetDbKeyVersionConverter.java new file mode 100644 index 00000000000..d073263e91c --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/SetDbKeyVersionConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class SetDbKeyVersionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SetDbKeyVersionConverter.class); + + public static com.oracle.bmc.database.requests.SetDbKeyVersionRequest interceptRequest( + com.oracle.bmc.database.requests.SetDbKeyVersionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.SetDbKeyVersionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getDatabaseId(), "databaseId must not be blank"); + Validate.notNull(request.getSetKeyVersionDetails(), "setKeyVersionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("databases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDatabaseId())) + .path("actions") + .path("setKeyVersion"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.SetDbKeyVersionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.SetDbKeyVersionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.SetDbKeyVersionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.SetDbKeyVersionResponse>() { + @Override + public com.oracle.bmc.database.responses.SetDbKeyVersionResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.SetDbKeyVersionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.Database>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.Database.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.Database.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.Database> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.SetDbKeyVersionResponse.Builder + builder = + com.oracle.bmc.database.responses + .SetDbKeyVersionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.database(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.SetDbKeyVersionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/SetPdbKeyVersionConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/SetPdbKeyVersionConverter.java new file mode 100644 index 00000000000..8146dca0803 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/SetPdbKeyVersionConverter.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class SetPdbKeyVersionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SetPdbKeyVersionConverter.class); + + public static com.oracle.bmc.database.requests.SetPdbKeyVersionRequest interceptRequest( + com.oracle.bmc.database.requests.SetPdbKeyVersionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.SetPdbKeyVersionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getPluggableDatabaseId(), "pluggableDatabaseId must not be blank"); + Validate.notNull(request.getSetKeyVersionDetails(), "setKeyVersionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("pluggableDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPluggableDatabaseId())) + .path("actions") + .path("setKeyVersion"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.SetPdbKeyVersionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.SetPdbKeyVersionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.SetPdbKeyVersionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.SetPdbKeyVersionResponse>() { + @Override + public com.oracle.bmc.database.responses.SetPdbKeyVersionResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.SetPdbKeyVersionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .PluggableDatabase>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.PluggableDatabase + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.PluggableDatabase + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.PluggableDatabase> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.SetPdbKeyVersionResponse.Builder + builder = + com.oracle.bmc.database.responses + .SetPdbKeyVersionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pluggableDatabase(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.SetPdbKeyVersionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateExadbVmClusterConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateExadbVmClusterConverter.java new file mode 100644 index 00000000000..0ca74f57a8f --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateExadbVmClusterConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateExadbVmClusterConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateExadbVmClusterConverter.class); + + public static com.oracle.bmc.database.requests.UpdateExadbVmClusterRequest interceptRequest( + com.oracle.bmc.database.requests.UpdateExadbVmClusterRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.UpdateExadbVmClusterRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getExadbVmClusterId(), "exadbVmClusterId must not be blank"); + Validate.notNull( + request.getUpdateExadbVmClusterDetails(), + "updateExadbVmClusterDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("exadbVmClusters") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExadbVmClusterId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateExadbVmClusterResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateExadbVmClusterResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateExadbVmClusterResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateExadbVmClusterResponse>() { + @Override + public com.oracle.bmc.database.responses.UpdateExadbVmClusterResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.UpdateExadbVmClusterResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExadbVmCluster>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExadbVmCluster + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExadbVmCluster + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.ExadbVmCluster> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.UpdateExadbVmClusterResponse + .Builder + builder = + com.oracle.bmc.database.responses + .UpdateExadbVmClusterResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.exadbVmCluster(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.UpdateExadbVmClusterResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateExascaleDbStorageVaultConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateExascaleDbStorageVaultConverter.java new file mode 100644 index 00000000000..1834ff4d8ac --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateExascaleDbStorageVaultConverter.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateExascaleDbStorageVaultConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateExascaleDbStorageVaultConverter.class); + + public static com.oracle.bmc.database.requests.UpdateExascaleDbStorageVaultRequest + interceptRequest( + com.oracle.bmc.database.requests.UpdateExascaleDbStorageVaultRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.UpdateExascaleDbStorageVaultRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getExascaleDbStorageVaultId(), + "exascaleDbStorageVaultId must not be blank"); + Validate.notNull( + request.getUpdateExascaleDbStorageVaultDetails(), + "updateExascaleDbStorageVaultDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("exascaleDbStorageVaults") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExascaleDbStorageVaultId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateExascaleDbStorageVaultResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateExascaleDbStorageVaultResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateExascaleDbStorageVaultResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .UpdateExascaleDbStorageVaultResponse>() { + @Override + public com.oracle.bmc.database.responses + .UpdateExascaleDbStorageVaultResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.UpdateExascaleDbStorageVaultResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExascaleDbStorageVault>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .ExascaleDbStorageVault + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model + .ExascaleDbStorageVault + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExascaleDbStorageVault> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses + .UpdateExascaleDbStorageVaultResponse.Builder + builder = + com.oracle.bmc.database.responses + .UpdateExascaleDbStorageVaultResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.exascaleDbStorageVault(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses + .UpdateExascaleDbStorageVaultResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateExecutionActionConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateExecutionActionConverter.java new file mode 100644 index 00000000000..369f5e10347 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateExecutionActionConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateExecutionActionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateExecutionActionConverter.class); + + public static com.oracle.bmc.database.requests.UpdateExecutionActionRequest interceptRequest( + com.oracle.bmc.database.requests.UpdateExecutionActionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.UpdateExecutionActionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getExecutionActionId(), "executionActionId must not be blank"); + Validate.notNull( + request.getUpdateExecutionActionDetails(), + "updateExecutionActionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("executionActions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExecutionActionId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateExecutionActionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateExecutionActionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateExecutionActionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateExecutionActionResponse>() { + @Override + public com.oracle.bmc.database.responses.UpdateExecutionActionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.UpdateExecutionActionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExecutionAction>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExecutionAction + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExecutionAction + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.ExecutionAction> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.UpdateExecutionActionResponse + .Builder + builder = + com.oracle.bmc.database.responses + .UpdateExecutionActionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.executionAction(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.UpdateExecutionActionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateExecutionWindowConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateExecutionWindowConverter.java new file mode 100644 index 00000000000..4a61c481aba --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateExecutionWindowConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateExecutionWindowConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateExecutionWindowConverter.class); + + public static com.oracle.bmc.database.requests.UpdateExecutionWindowRequest interceptRequest( + com.oracle.bmc.database.requests.UpdateExecutionWindowRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.UpdateExecutionWindowRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getExecutionWindowId(), "executionWindowId must not be blank"); + Validate.notNull( + request.getUpdateExecutionWindowDetails(), + "updateExecutionWindowDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("executionWindows") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExecutionWindowId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateExecutionWindowResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateExecutionWindowResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateExecutionWindowResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateExecutionWindowResponse>() { + @Override + public com.oracle.bmc.database.responses.UpdateExecutionWindowResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.UpdateExecutionWindowResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ExecutionWindow>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExecutionWindow + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ExecutionWindow + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.ExecutionWindow> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.UpdateExecutionWindowResponse + .Builder + builder = + com.oracle.bmc.database.responses + .UpdateExecutionWindowResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.executionWindow(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.UpdateExecutionWindowResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateScheduledActionConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateScheduledActionConverter.java new file mode 100644 index 00000000000..97606867b71 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateScheduledActionConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateScheduledActionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateScheduledActionConverter.class); + + public static com.oracle.bmc.database.requests.UpdateScheduledActionRequest interceptRequest( + com.oracle.bmc.database.requests.UpdateScheduledActionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.UpdateScheduledActionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getScheduledActionId(), "scheduledActionId must not be blank"); + Validate.notNull( + request.getUpdateScheduledActionDetails(), + "updateScheduledActionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("scheduledActions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getScheduledActionId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateScheduledActionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateScheduledActionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateScheduledActionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateScheduledActionResponse>() { + @Override + public com.oracle.bmc.database.responses.UpdateScheduledActionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.UpdateScheduledActionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .ScheduledAction>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ScheduledAction + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.ScheduledAction + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.ScheduledAction> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.UpdateScheduledActionResponse + .Builder + builder = + com.oracle.bmc.database.responses + .UpdateScheduledActionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.scheduledAction(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.UpdateScheduledActionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateSchedulingPolicyConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateSchedulingPolicyConverter.java new file mode 100644 index 00000000000..397fa129699 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateSchedulingPolicyConverter.java @@ -0,0 +1,162 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateSchedulingPolicyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateSchedulingPolicyConverter.class); + + public static com.oracle.bmc.database.requests.UpdateSchedulingPolicyRequest interceptRequest( + com.oracle.bmc.database.requests.UpdateSchedulingPolicyRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.UpdateSchedulingPolicyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSchedulingPolicyId(), "schedulingPolicyId must not be blank"); + Validate.notNull( + request.getUpdateSchedulingPolicyDetails(), + "updateSchedulingPolicyDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("schedulingPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulingPolicyId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateSchedulingPolicyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateSchedulingPolicyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateSchedulingPolicyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .UpdateSchedulingPolicyResponse>() { + @Override + public com.oracle.bmc.database.responses.UpdateSchedulingPolicyResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.UpdateSchedulingPolicyResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .SchedulingPolicy>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.SchedulingPolicy + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.SchedulingPolicy + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.SchedulingPolicy> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.UpdateSchedulingPolicyResponse + .Builder + builder = + com.oracle.bmc.database.responses + .UpdateSchedulingPolicyResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.schedulingPolicy(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.UpdateSchedulingPolicyResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateSchedulingWindowConverter.java b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateSchedulingWindowConverter.java new file mode 100644 index 00000000000..11d7981a13f --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/internal/http/UpdateSchedulingWindowConverter.java @@ -0,0 +1,167 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.database.model.*; +import com.oracle.bmc.database.requests.*; +import com.oracle.bmc.database.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateSchedulingWindowConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateSchedulingWindowConverter.class); + + public static com.oracle.bmc.database.requests.UpdateSchedulingWindowRequest interceptRequest( + com.oracle.bmc.database.requests.UpdateSchedulingWindowRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.database.requests.UpdateSchedulingWindowRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSchedulingPolicyId(), "schedulingPolicyId must not be blank"); + Validate.notBlank(request.getSchedulingWindowId(), "schedulingWindowId must not be blank"); + Validate.notNull( + request.getUpdateSchedulingWindowDetails(), + "updateSchedulingWindowDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("schedulingPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulingPolicyId())) + .path("schedulingWindows") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulingWindowId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateSchedulingWindowResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateSchedulingWindowResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses.UpdateSchedulingWindowResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.database.responses + .UpdateSchedulingWindowResponse>() { + @Override + public com.oracle.bmc.database.responses.UpdateSchedulingWindowResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.database.responses.UpdateSchedulingWindowResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model + .SchedulingWindow>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.SchedulingWindow + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.database.model.SchedulingWindow + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.database.model.SchedulingWindow> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.database.responses.UpdateSchedulingWindowResponse + .Builder + builder = + com.oracle.bmc.database.responses + .UpdateSchedulingWindowResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.schedulingWindow(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.database.responses.UpdateSchedulingWindowResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ActionMember.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ActionMember.java new file mode 100644 index 00000000000..25a0d787070 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ActionMember.java @@ -0,0 +1,212 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * The details of an action member. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ActionMember.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ActionMember extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"memberOrder", "memberId", "estimatedTimeInMins"}) + public ActionMember(Integer memberOrder, String memberId, Integer estimatedTimeInMins) { + super(); + this.memberOrder = memberOrder; + this.memberId = memberId; + this.estimatedTimeInMins = estimatedTimeInMins; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The order of the action member in a scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memberOrder") + private Integer memberOrder; + + /** + * The order of the action member in a scheduled action. + * @param memberOrder the value to set + * @return this builder + **/ + public Builder memberOrder(Integer memberOrder) { + this.memberOrder = memberOrder; + this.__explicitlySet__.add("memberOrder"); + return this; + } + /** + * The ocid of the action member. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memberId") + private String memberId; + + /** + * The ocid of the action member. + * @param memberId the value to set + * @return this builder + **/ + public Builder memberId(String memberId) { + this.memberId = memberId; + this.__explicitlySet__.add("memberId"); + return this; + } + /** + * The estimated time for the intended action member. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private Integer estimatedTimeInMins; + + /** + * The estimated time for the intended action member. + * @param estimatedTimeInMins the value to set + * @return this builder + **/ + public Builder estimatedTimeInMins(Integer estimatedTimeInMins) { + this.estimatedTimeInMins = estimatedTimeInMins; + this.__explicitlySet__.add("estimatedTimeInMins"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ActionMember build() { + ActionMember model = + new ActionMember(this.memberOrder, this.memberId, this.estimatedTimeInMins); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ActionMember model) { + if (model.wasPropertyExplicitlySet("memberOrder")) { + this.memberOrder(model.getMemberOrder()); + } + if (model.wasPropertyExplicitlySet("memberId")) { + this.memberId(model.getMemberId()); + } + if (model.wasPropertyExplicitlySet("estimatedTimeInMins")) { + this.estimatedTimeInMins(model.getEstimatedTimeInMins()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The order of the action member in a scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memberOrder") + private final Integer memberOrder; + + /** + * The order of the action member in a scheduled action. + * @return the value + **/ + public Integer getMemberOrder() { + return memberOrder; + } + + /** + * The ocid of the action member. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memberId") + private final String memberId; + + /** + * The ocid of the action member. + * @return the value + **/ + public String getMemberId() { + return memberId; + } + + /** + * The estimated time for the intended action member. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private final Integer estimatedTimeInMins; + + /** + * The estimated time for the intended action member. + * @return the value + **/ + public Integer getEstimatedTimeInMins() { + return estimatedTimeInMins; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ActionMember("); + sb.append("super=").append(super.toString()); + sb.append("memberOrder=").append(String.valueOf(this.memberOrder)); + sb.append(", memberId=").append(String.valueOf(this.memberId)); + sb.append(", estimatedTimeInMins=").append(String.valueOf(this.estimatedTimeInMins)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ActionMember)) { + return false; + } + + ActionMember other = (ActionMember) o; + return java.util.Objects.equals(this.memberOrder, other.memberOrder) + && java.util.Objects.equals(this.memberId, other.memberId) + && java.util.Objects.equals(this.estimatedTimeInMins, other.estimatedTimeInMins) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.memberOrder == null ? 43 : this.memberOrder.hashCode()); + result = (result * PRIME) + (this.memberId == null ? 43 : this.memberId.hashCode()); + result = + (result * PRIME) + + (this.estimatedTimeInMins == null + ? 43 + : this.estimatedTimeInMins.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ActionOrderDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ActionOrderDetails.java new file mode 100644 index 00000000000..9c5c05e1d30 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ActionOrderDetails.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Describes the ordering list of action resources. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ActionOrderDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ActionOrderDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"actionOrder", "actionResourceId"}) + public ActionOrderDetails(Integer actionOrder, String actionResourceId) { + super(); + this.actionOrder = actionOrder; + this.actionResourceId = actionResourceId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The priority order of the action resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionOrder") + private Integer actionOrder; + + /** + * The priority order of the action resource. + * @param actionOrder the value to set + * @return this builder + **/ + public Builder actionOrder(Integer actionOrder) { + this.actionOrder = actionOrder; + this.__explicitlySet__.add("actionOrder"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the action resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionResourceId") + private String actionResourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the action resource. + * @param actionResourceId the value to set + * @return this builder + **/ + public Builder actionResourceId(String actionResourceId) { + this.actionResourceId = actionResourceId; + this.__explicitlySet__.add("actionResourceId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ActionOrderDetails build() { + ActionOrderDetails model = + new ActionOrderDetails(this.actionOrder, this.actionResourceId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ActionOrderDetails model) { + if (model.wasPropertyExplicitlySet("actionOrder")) { + this.actionOrder(model.getActionOrder()); + } + if (model.wasPropertyExplicitlySet("actionResourceId")) { + this.actionResourceId(model.getActionResourceId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The priority order of the action resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionOrder") + private final Integer actionOrder; + + /** + * The priority order of the action resource. + * @return the value + **/ + public Integer getActionOrder() { + return actionOrder; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the action resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionResourceId") + private final String actionResourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the action resource. + * @return the value + **/ + public String getActionResourceId() { + return actionResourceId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ActionOrderDetails("); + sb.append("super=").append(super.toString()); + sb.append("actionOrder=").append(String.valueOf(this.actionOrder)); + sb.append(", actionResourceId=").append(String.valueOf(this.actionResourceId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ActionOrderDetails)) { + return false; + } + + ActionOrderDetails other = (ActionOrderDetails) o; + return java.util.Objects.equals(this.actionOrder, other.actionOrder) + && java.util.Objects.equals(this.actionResourceId, other.actionResourceId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.actionOrder == null ? 43 : this.actionOrder.hashCode()); + result = + (result * PRIME) + + (this.actionResourceId == null ? 43 : this.actionResourceId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ActionParamValuesCollection.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ActionParamValuesCollection.java new file mode 100644 index 00000000000..4a2ee5d94d4 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ActionParamValuesCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * A list of Action Parameters. Contains ActionParamValues items. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ActionParamValuesCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ActionParamValuesCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ActionParamValuesCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of Action Parameters and their possible values. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of Action Parameters and their possible values. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ActionParamValuesCollection build() { + ActionParamValuesCollection model = new ActionParamValuesCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ActionParamValuesCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of Action Parameters and their possible values. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of Action Parameters and their possible values. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ActionParamValuesCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ActionParamValuesCollection)) { + return false; + } + + ActionParamValuesCollection other = (ActionParamValuesCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ActionParamValuesSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ActionParamValuesSummary.java new file mode 100644 index 00000000000..3171dcaf417 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ActionParamValuesSummary.java @@ -0,0 +1,357 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of the action parameter and its possible values that is used in listParamsForActionType. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ActionParamValuesSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ActionParamValuesSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "parameterName", + "parameterType", + "parameterValues", + "defaultValue", + "isRequired" + }) + public ActionParamValuesSummary( + String parameterName, + ParameterType parameterType, + java.util.List parameterValues, + String defaultValue, + Boolean isRequired) { + super(); + this.parameterName = parameterName; + this.parameterType = parameterType; + this.parameterValues = parameterValues; + this.defaultValue = defaultValue; + this.isRequired = isRequired; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of this parameter. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parameterName") + private String parameterName; + + /** + * The name of this parameter. + * @param parameterName the value to set + * @return this builder + **/ + public Builder parameterName(String parameterName) { + this.parameterName = parameterName; + this.__explicitlySet__.add("parameterName"); + return this; + } + /** + * The type of the parameter. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parameterType") + private ParameterType parameterType; + + /** + * The type of the parameter. + * @param parameterType the value to set + * @return this builder + **/ + public Builder parameterType(ParameterType parameterType) { + this.parameterType = parameterType; + this.__explicitlySet__.add("parameterType"); + return this; + } + /** + * Possible values for this parameter. In case of integer it's min and max values. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parameterValues") + private java.util.List parameterValues; + + /** + * Possible values for this parameter. In case of integer it's min and max values. + * @param parameterValues the value to set + * @return this builder + **/ + public Builder parameterValues(java.util.List parameterValues) { + this.parameterValues = parameterValues; + this.__explicitlySet__.add("parameterValues"); + return this; + } + /** + * The default value for this parameter. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("defaultValue") + private String defaultValue; + + /** + * The default value for this parameter. + * @param defaultValue the value to set + * @return this builder + **/ + public Builder defaultValue(String defaultValue) { + this.defaultValue = defaultValue; + this.__explicitlySet__.add("defaultValue"); + return this; + } + /** + * Whether this parameter is required or not for this action type.\u3001 + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRequired") + private Boolean isRequired; + + /** + * Whether this parameter is required or not for this action type.\u3001 + * @param isRequired the value to set + * @return this builder + **/ + public Builder isRequired(Boolean isRequired) { + this.isRequired = isRequired; + this.__explicitlySet__.add("isRequired"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ActionParamValuesSummary build() { + ActionParamValuesSummary model = + new ActionParamValuesSummary( + this.parameterName, + this.parameterType, + this.parameterValues, + this.defaultValue, + this.isRequired); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ActionParamValuesSummary model) { + if (model.wasPropertyExplicitlySet("parameterName")) { + this.parameterName(model.getParameterName()); + } + if (model.wasPropertyExplicitlySet("parameterType")) { + this.parameterType(model.getParameterType()); + } + if (model.wasPropertyExplicitlySet("parameterValues")) { + this.parameterValues(model.getParameterValues()); + } + if (model.wasPropertyExplicitlySet("defaultValue")) { + this.defaultValue(model.getDefaultValue()); + } + if (model.wasPropertyExplicitlySet("isRequired")) { + this.isRequired(model.getIsRequired()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of this parameter. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parameterName") + private final String parameterName; + + /** + * The name of this parameter. + * @return the value + **/ + public String getParameterName() { + return parameterName; + } + + /** + * The type of the parameter. + **/ + public enum ParameterType { + Boolean("BOOLEAN"), + String("STRING"), + Integer("INTEGER"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ParameterType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ParameterType v : ParameterType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ParameterType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ParameterType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ParameterType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The type of the parameter. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parameterType") + private final ParameterType parameterType; + + /** + * The type of the parameter. + * @return the value + **/ + public ParameterType getParameterType() { + return parameterType; + } + + /** + * Possible values for this parameter. In case of integer it's min and max values. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parameterValues") + private final java.util.List parameterValues; + + /** + * Possible values for this parameter. In case of integer it's min and max values. + * @return the value + **/ + public java.util.List getParameterValues() { + return parameterValues; + } + + /** + * The default value for this parameter. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("defaultValue") + private final String defaultValue; + + /** + * The default value for this parameter. + * @return the value + **/ + public String getDefaultValue() { + return defaultValue; + } + + /** + * Whether this parameter is required or not for this action type.\u3001 + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRequired") + private final Boolean isRequired; + + /** + * Whether this parameter is required or not for this action type.\u3001 + * @return the value + **/ + public Boolean getIsRequired() { + return isRequired; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ActionParamValuesSummary("); + sb.append("super=").append(super.toString()); + sb.append("parameterName=").append(String.valueOf(this.parameterName)); + sb.append(", parameterType=").append(String.valueOf(this.parameterType)); + sb.append(", parameterValues=").append(String.valueOf(this.parameterValues)); + sb.append(", defaultValue=").append(String.valueOf(this.defaultValue)); + sb.append(", isRequired=").append(String.valueOf(this.isRequired)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ActionParamValuesSummary)) { + return false; + } + + ActionParamValuesSummary other = (ActionParamValuesSummary) o; + return java.util.Objects.equals(this.parameterName, other.parameterName) + && java.util.Objects.equals(this.parameterType, other.parameterType) + && java.util.Objects.equals(this.parameterValues, other.parameterValues) + && java.util.Objects.equals(this.defaultValue, other.defaultValue) + && java.util.Objects.equals(this.isRequired, other.isRequired) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.parameterName == null ? 43 : this.parameterName.hashCode()); + result = + (result * PRIME) + + (this.parameterType == null ? 43 : this.parameterType.hashCode()); + result = + (result * PRIME) + + (this.parameterValues == null ? 43 : this.parameterValues.hashCode()); + result = (result * PRIME) + (this.defaultValue == null ? 43 : this.defaultValue.hashCode()); + result = (result * PRIME) + (this.isRequired == null ? 43 : this.isRequired.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabase.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabase.java index 4f88d94039e..b7d2476d5ed 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabase.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabase.java @@ -605,13 +605,13 @@ public Builder isDstFileUpdateEnabled(Boolean isDstFileUpdateEnabled) { return this; } /** - * DST Time-zone File version of the Autonomous Container Database. + * DST Time-Zone File version of the Autonomous Container Database. **/ @com.fasterxml.jackson.annotation.JsonProperty("dstFileVersion") private String dstFileVersion; /** - * DST Time-zone File version of the Autonomous Container Database. + * DST Time-Zone File version of the Autonomous Container Database. * @param dstFileVersion the value to set * @return this builder **/ @@ -1865,13 +1865,13 @@ public Boolean getIsDstFileUpdateEnabled() { } /** - * DST Time-zone File version of the Autonomous Container Database. + * DST Time-Zone File version of the Autonomous Container Database. **/ @com.fasterxml.jackson.annotation.JsonProperty("dstFileVersion") private final String dstFileVersion; /** - * DST Time-zone File version of the Autonomous Container Database. + * DST Time-Zone File version of the Autonomous Container Database. * @return the value **/ public String getDstFileVersion() { diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabaseSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabaseSummary.java index 46b916abb51..a428a3947bc 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabaseSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousContainerDatabaseSummary.java @@ -606,13 +606,13 @@ public Builder isDstFileUpdateEnabled(Boolean isDstFileUpdateEnabled) { return this; } /** - * DST Time-zone File version of the Autonomous Container Database. + * DST Time-Zone File version of the Autonomous Container Database. **/ @com.fasterxml.jackson.annotation.JsonProperty("dstFileVersion") private String dstFileVersion; /** - * DST Time-zone File version of the Autonomous Container Database. + * DST Time-Zone File version of the Autonomous Container Database. * @param dstFileVersion the value to set * @return this builder **/ @@ -1866,13 +1866,13 @@ public Boolean getIsDstFileUpdateEnabled() { } /** - * DST Time-zone File version of the Autonomous Container Database. + * DST Time-Zone File version of the Autonomous Container Database. **/ @com.fasterxml.jackson.annotation.JsonProperty("dstFileVersion") private final String dstFileVersion; /** - * DST Time-zone File version of the Autonomous Container Database. + * DST Time-Zone File version of the Autonomous Container Database. * @return the value **/ public String getDstFileVersion() { diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabase.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabase.java index 6275a1e1362..666dd7ca9ad 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabase.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabase.java @@ -25,11 +25,13 @@ public final class AutonomousDatabase extends com.oracle.bmc.http.internal.Expli @java.beans.ConstructorProperties({ "id", "compartmentId", + "subscriptionId", "lifecycleState", "lifecycleDetails", "kmsKeyId", "vaultId", "kmsKeyLifecycleDetails", + "encryptionKey", "kmsKeyVersionId", "dbName", "characterSet", @@ -44,6 +46,7 @@ public final class AutonomousDatabase extends com.oracle.bmc.http.internal.Expli "timeDeletionOfFreeAutonomousDatabase", "backupConfig", "keyHistoryEntry", + "encryptionKeyHistoryEntry", "cpuCoreCount", "localAdgAutoFailoverMaxDataLossLimit", "computeModel", @@ -59,6 +62,7 @@ public final class AutonomousDatabase extends com.oracle.bmc.http.internal.Expli "infrastructureType", "isDedicated", "autonomousContainerDatabaseId", + "timeUndeleted", "timeCreated", "displayName", "serviceConsoleUrl", @@ -66,9 +70,11 @@ public final class AutonomousDatabase extends com.oracle.bmc.http.internal.Expli "connectionUrls", "publicConnectionUrls", "licenseModel", + "byolComputeCountLimit", "usedDataStorageSizeInTBs", "freeformTags", "definedTags", + "securityAttributes", "subnetId", "nsgIds", "privateEndpoint", @@ -137,16 +143,20 @@ public final class AutonomousDatabase extends com.oracle.bmc.http.internal.Expli "disasterRecoveryRegionType", "timeDisasterRecoveryRoleChanged", "remoteDisasterRecoveryConfiguration", - "netServicesArchitecture" + "netServicesArchitecture", + "availabilityDomain", + "clusterPlacementGroupId" }) public AutonomousDatabase( String id, String compartmentId, + String subscriptionId, LifecycleState lifecycleState, String lifecycleDetails, String kmsKeyId, String vaultId, String kmsKeyLifecycleDetails, + AutonomousDatabaseEncryptionKeyDetails encryptionKey, String kmsKeyVersionId, String dbName, String characterSet, @@ -161,6 +171,7 @@ public AutonomousDatabase( java.util.Date timeDeletionOfFreeAutonomousDatabase, AutonomousDatabaseBackupConfig backupConfig, java.util.List keyHistoryEntry, + java.util.List encryptionKeyHistoryEntry, Integer cpuCoreCount, Integer localAdgAutoFailoverMaxDataLossLimit, ComputeModel computeModel, @@ -176,6 +187,7 @@ public AutonomousDatabase( InfrastructureType infrastructureType, Boolean isDedicated, String autonomousContainerDatabaseId, + java.util.Date timeUndeleted, java.util.Date timeCreated, String displayName, String serviceConsoleUrl, @@ -183,9 +195,11 @@ public AutonomousDatabase( AutonomousDatabaseConnectionUrls connectionUrls, AutonomousDatabaseConnectionUrls publicConnectionUrls, LicenseModel licenseModel, + Float byolComputeCountLimit, Integer usedDataStorageSizeInTBs, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String subnetId, java.util.List nsgIds, String privateEndpoint, @@ -254,15 +268,19 @@ public AutonomousDatabase( DisasterRecoveryRegionType disasterRecoveryRegionType, java.util.Date timeDisasterRecoveryRoleChanged, DisasterRecoveryConfiguration remoteDisasterRecoveryConfiguration, - NetServicesArchitecture netServicesArchitecture) { + NetServicesArchitecture netServicesArchitecture, + String availabilityDomain, + String clusterPlacementGroupId) { super(); this.id = id; this.compartmentId = compartmentId; + this.subscriptionId = subscriptionId; this.lifecycleState = lifecycleState; this.lifecycleDetails = lifecycleDetails; this.kmsKeyId = kmsKeyId; this.vaultId = vaultId; this.kmsKeyLifecycleDetails = kmsKeyLifecycleDetails; + this.encryptionKey = encryptionKey; this.kmsKeyVersionId = kmsKeyVersionId; this.dbName = dbName; this.characterSet = characterSet; @@ -277,6 +295,7 @@ public AutonomousDatabase( this.timeDeletionOfFreeAutonomousDatabase = timeDeletionOfFreeAutonomousDatabase; this.backupConfig = backupConfig; this.keyHistoryEntry = keyHistoryEntry; + this.encryptionKeyHistoryEntry = encryptionKeyHistoryEntry; this.cpuCoreCount = cpuCoreCount; this.localAdgAutoFailoverMaxDataLossLimit = localAdgAutoFailoverMaxDataLossLimit; this.computeModel = computeModel; @@ -292,6 +311,7 @@ public AutonomousDatabase( this.infrastructureType = infrastructureType; this.isDedicated = isDedicated; this.autonomousContainerDatabaseId = autonomousContainerDatabaseId; + this.timeUndeleted = timeUndeleted; this.timeCreated = timeCreated; this.displayName = displayName; this.serviceConsoleUrl = serviceConsoleUrl; @@ -299,9 +319,11 @@ public AutonomousDatabase( this.connectionUrls = connectionUrls; this.publicConnectionUrls = publicConnectionUrls; this.licenseModel = licenseModel; + this.byolComputeCountLimit = byolComputeCountLimit; this.usedDataStorageSizeInTBs = usedDataStorageSizeInTBs; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.subnetId = subnetId; this.nsgIds = nsgIds; this.privateEndpoint = privateEndpoint; @@ -371,6 +393,8 @@ public AutonomousDatabase( this.timeDisasterRecoveryRoleChanged = timeDisasterRecoveryRoleChanged; this.remoteDisasterRecoveryConfiguration = remoteDisasterRecoveryConfiguration; this.netServicesArchitecture = netServicesArchitecture; + this.availabilityDomain = availabilityDomain; + this.clusterPlacementGroupId = clusterPlacementGroupId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -407,6 +431,22 @@ public Builder compartmentId(String compartmentId) { this.__explicitlySet__.add("compartmentId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @param subscriptionId the value to set + * @return this builder + **/ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } /** * The current state of the Autonomous Database. **/ @@ -487,6 +527,15 @@ public Builder kmsKeyLifecycleDetails(String kmsKeyLifecycleDetails) { this.__explicitlySet__.add("kmsKeyLifecycleDetails"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKey") + private AutonomousDatabaseEncryptionKeyDetails encryptionKey; + + public Builder encryptionKey(AutonomousDatabaseEncryptionKeyDetails encryptionKey) { + this.encryptionKey = encryptionKey; + this.__explicitlySet__.add("encryptionKey"); + return this; + } /** * The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances. * @@ -727,6 +776,25 @@ public Builder keyHistoryEntry( this.__explicitlySet__.add("keyHistoryEntry"); return this; } + /** + * Key History Entry. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKeyHistoryEntry") + private java.util.List + encryptionKeyHistoryEntry; + + /** + * Key History Entry. + * @param encryptionKeyHistoryEntry the value to set + * @return this builder + **/ + public Builder encryptionKeyHistoryEntry( + java.util.List + encryptionKeyHistoryEntry) { + this.encryptionKeyHistoryEntry = encryptionKeyHistoryEntry; + this.__explicitlySet__.add("encryptionKeyHistoryEntry"); + return this; + } /** * The number of CPU cores to be made available to the database. When the ECPU is selected, the value for cpuCoreCount is 0. For Autonomous Database on Dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See [Characteristics of Infrastructure Shapes](https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. *

@@ -784,7 +852,7 @@ public Builder computeModel(ComputeModel computeModel) { } /** * The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. - * For an Autonomous Database Serverless instance, the 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. + * The 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. * **/ @com.fasterxml.jackson.annotation.JsonProperty("computeCount") @@ -792,7 +860,7 @@ public Builder computeModel(ComputeModel computeModel) { /** * The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. - * For an Autonomous Database Serverless instance, the 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. + * The 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. * * @param computeCount the value to set * @return this builder @@ -888,12 +956,22 @@ public Builder provisionableCpus(java.util.List provisionableCpus) { } /** * The quantity of data in the database, in terabytes. + *

+ * The following points apply to Autonomous Databases on Serverless Infrastructure: + * - This is an integer field whose value remains null when the data size is in GBs and cannot be converted to TBs (by dividing the GB value by 1024) without rounding error. + * - To get the exact value of data storage size without rounding error, please see {@code dataStorageSizeInGBs} of Autonomous Database. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") private Integer dataStorageSizeInTBs; /** * The quantity of data in the database, in terabytes. + *

+ * The following points apply to Autonomous Databases on Serverless Infrastructure: + * - This is an integer field whose value remains null when the data size is in GBs and cannot be converted to TBs (by dividing the GB value by 1024) without rounding error. + * - To get the exact value of data storage size without rounding error, please see {@code dataStorageSizeInGBs} of Autonomous Database. + * * @param dataStorageSizeInTBs the value to set * @return this builder **/ @@ -922,12 +1000,18 @@ public Builder memoryPerOracleComputeUnitInGBs(Integer memoryPerOracleComputeUni } /** * The quantity of data in the database, in gigabytes. + *

+ * For Autonomous Transaction Processing databases using ECPUs on Serverless Infrastructure, this value is always populated. In all the other cases, this value will be null and {@code dataStorageSizeInTBs} will be populated instead. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGBs") private Integer dataStorageSizeInGBs; /** * The quantity of data in the database, in gigabytes. + *

+ * For Autonomous Transaction Processing databases using ECPUs on Serverless Infrastructure, this value is always populated. In all the other cases, this value will be null and {@code dataStorageSizeInTBs} will be populated instead. + * * @param dataStorageSizeInGBs the value to set * @return this builder **/ @@ -954,12 +1038,14 @@ public Builder usedDataStorageSizeInGBs(Integer usedDataStorageSizeInGBs) { } /** * The infrastructure type this resource belongs to. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("infrastructureType") private InfrastructureType infrastructureType; /** * The infrastructure type this resource belongs to. + * * @param infrastructureType the value to set * @return this builder **/ @@ -1002,6 +1088,24 @@ public Builder autonomousContainerDatabaseId(String autonomousContainerDatabaseI this.__explicitlySet__.add("autonomousContainerDatabaseId"); return this; } + /** + * The date and time the Autonomous Database was most recently undeleted. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUndeleted") + private java.util.Date timeUndeleted; + + /** + * The date and time the Autonomous Database was most recently undeleted. + * + * @param timeUndeleted the value to set + * @return this builder + **/ + public Builder timeUndeleted(java.util.Date timeUndeleted) { + this.timeUndeleted = timeUndeleted; + this.__explicitlySet__.add("timeUndeleted"); + return this; + } /** * The date and time the Autonomous Database was created. **/ @@ -1120,13 +1224,29 @@ public Builder licenseModel(LicenseModel licenseModel) { return this; } /** - * The amount of storage that has been used, in terabytes. + * The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("byolComputeCountLimit") + private Float byolComputeCountLimit; + + /** + * The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + * @param byolComputeCountLimit the value to set + * @return this builder + **/ + public Builder byolComputeCountLimit(Float byolComputeCountLimit) { + this.byolComputeCountLimit = byolComputeCountLimit; + this.__explicitlySet__.add("byolComputeCountLimit"); + return this; + } + /** + * The amount of storage that has been used for Autonomous Databases in dedicated infrastructure, in terabytes. **/ @com.fasterxml.jackson.annotation.JsonProperty("usedDataStorageSizeInTBs") private Integer usedDataStorageSizeInTBs; /** - * The amount of storage that has been used, in terabytes. + * The amount of storage that has been used for Autonomous Databases in dedicated infrastructure, in terabytes. * @param usedDataStorageSizeInTBs the value to set * @return this builder **/ @@ -1180,6 +1300,29 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet the resource is associated with. *

@@ -1379,14 +1522,14 @@ public Builder dbWorkload(DbWorkload dbWorkload) { return this; } /** - * Autonomous Database for Developers are free Autonomous Databases that developers can use to build and test new applications.With Autonomous these database instancess instances, you can try new Autonomous Database features for free and apply them to ongoing or new development projects. Developer database comes with limited resources and is, therefore, not suitable for large-scale testing and production deployments. When you need more compute or storage resources, you can transition to a paid database licensing by cloning your developer database into a regular Autonomous Database. See [Autonomous Database documentation](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/eddjo/index.html) for more details. + * Autonomous Database for Developers are fixed-shape Autonomous Databases that developers can use to build and test new applications. On Serverless, these are low-cost and billed per instance, on Dedicated and Cloud@Customer there is no additional cost to create Developer databases. Developer databases come with limited resources and is not intended for large-scale testing and production deployments. When you need more compute or storage resources, you may upgrade to a full paid production database. * **/ @com.fasterxml.jackson.annotation.JsonProperty("isDevTier") private Boolean isDevTier; /** - * Autonomous Database for Developers are free Autonomous Databases that developers can use to build and test new applications.With Autonomous these database instancess instances, you can try new Autonomous Database features for free and apply them to ongoing or new development projects. Developer database comes with limited resources and is, therefore, not suitable for large-scale testing and production deployments. When you need more compute or storage resources, you can transition to a paid database licensing by cloning your developer database into a regular Autonomous Database. See [Autonomous Database documentation](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/eddjo/index.html) for more details. + * Autonomous Database for Developers are fixed-shape Autonomous Databases that developers can use to build and test new applications. On Serverless, these are low-cost and billed per instance, on Dedicated and Cloud@Customer there is no additional cost to create Developer databases. Developer databases come with limited resources and is not intended for large-scale testing and production deployments. When you need more compute or storage resources, you may upgrade to a full paid production database. * * @param isDevTier the value to set * @return this builder @@ -2472,12 +2615,14 @@ public Builder remoteDisasterRecoveryConfiguration( } /** * Enabling SHARED server architecture enables a database server to allow many client processes to share very few server processes, thereby increasing the number of supported users. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("netServicesArchitecture") private NetServicesArchitecture netServicesArchitecture; /** * Enabling SHARED server architecture enables a database server to allow many client processes to share very few server processes, thereby increasing the number of supported users. + * * @param netServicesArchitecture the value to set * @return this builder **/ @@ -2486,6 +2631,38 @@ public Builder netServicesArchitecture(NetServicesArchitecture netServicesArchit this.__explicitlySet__.add("netServicesArchitecture"); return this; } + /** + * The availability domain where the Autonomous Database Serverless instance is located. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The availability domain where the Autonomous Database Serverless instance is located. + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Autonomous Serverless Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterPlacementGroupId") + private String clusterPlacementGroupId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Autonomous Serverless Database. + * @param clusterPlacementGroupId the value to set + * @return this builder + **/ + public Builder clusterPlacementGroupId(String clusterPlacementGroupId) { + this.clusterPlacementGroupId = clusterPlacementGroupId; + this.__explicitlySet__.add("clusterPlacementGroupId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -2495,11 +2672,13 @@ public AutonomousDatabase build() { new AutonomousDatabase( this.id, this.compartmentId, + this.subscriptionId, this.lifecycleState, this.lifecycleDetails, this.kmsKeyId, this.vaultId, this.kmsKeyLifecycleDetails, + this.encryptionKey, this.kmsKeyVersionId, this.dbName, this.characterSet, @@ -2514,6 +2693,7 @@ public AutonomousDatabase build() { this.timeDeletionOfFreeAutonomousDatabase, this.backupConfig, this.keyHistoryEntry, + this.encryptionKeyHistoryEntry, this.cpuCoreCount, this.localAdgAutoFailoverMaxDataLossLimit, this.computeModel, @@ -2529,6 +2709,7 @@ public AutonomousDatabase build() { this.infrastructureType, this.isDedicated, this.autonomousContainerDatabaseId, + this.timeUndeleted, this.timeCreated, this.displayName, this.serviceConsoleUrl, @@ -2536,9 +2717,11 @@ public AutonomousDatabase build() { this.connectionUrls, this.publicConnectionUrls, this.licenseModel, + this.byolComputeCountLimit, this.usedDataStorageSizeInTBs, this.freeformTags, this.definedTags, + this.securityAttributes, this.subnetId, this.nsgIds, this.privateEndpoint, @@ -2607,7 +2790,9 @@ public AutonomousDatabase build() { this.disasterRecoveryRegionType, this.timeDisasterRecoveryRoleChanged, this.remoteDisasterRecoveryConfiguration, - this.netServicesArchitecture); + this.netServicesArchitecture, + this.availabilityDomain, + this.clusterPlacementGroupId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -2622,6 +2807,9 @@ public Builder copy(AutonomousDatabase model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } @@ -2637,6 +2825,9 @@ public Builder copy(AutonomousDatabase model) { if (model.wasPropertyExplicitlySet("kmsKeyLifecycleDetails")) { this.kmsKeyLifecycleDetails(model.getKmsKeyLifecycleDetails()); } + if (model.wasPropertyExplicitlySet("encryptionKey")) { + this.encryptionKey(model.getEncryptionKey()); + } if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { this.kmsKeyVersionId(model.getKmsKeyVersionId()); } @@ -2681,6 +2872,9 @@ public Builder copy(AutonomousDatabase model) { if (model.wasPropertyExplicitlySet("keyHistoryEntry")) { this.keyHistoryEntry(model.getKeyHistoryEntry()); } + if (model.wasPropertyExplicitlySet("encryptionKeyHistoryEntry")) { + this.encryptionKeyHistoryEntry(model.getEncryptionKeyHistoryEntry()); + } if (model.wasPropertyExplicitlySet("cpuCoreCount")) { this.cpuCoreCount(model.getCpuCoreCount()); } @@ -2727,6 +2921,9 @@ public Builder copy(AutonomousDatabase model) { if (model.wasPropertyExplicitlySet("autonomousContainerDatabaseId")) { this.autonomousContainerDatabaseId(model.getAutonomousContainerDatabaseId()); } + if (model.wasPropertyExplicitlySet("timeUndeleted")) { + this.timeUndeleted(model.getTimeUndeleted()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -2748,6 +2945,9 @@ public Builder copy(AutonomousDatabase model) { if (model.wasPropertyExplicitlySet("licenseModel")) { this.licenseModel(model.getLicenseModel()); } + if (model.wasPropertyExplicitlySet("byolComputeCountLimit")) { + this.byolComputeCountLimit(model.getByolComputeCountLimit()); + } if (model.wasPropertyExplicitlySet("usedDataStorageSizeInTBs")) { this.usedDataStorageSizeInTBs(model.getUsedDataStorageSizeInTBs()); } @@ -2757,6 +2957,9 @@ public Builder copy(AutonomousDatabase model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("subnetId")) { this.subnetId(model.getSubnetId()); } @@ -2966,6 +3169,12 @@ public Builder copy(AutonomousDatabase model) { if (model.wasPropertyExplicitlySet("netServicesArchitecture")) { this.netServicesArchitecture(model.getNetServicesArchitecture()); } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("clusterPlacementGroupId")) { + this.clusterPlacementGroupId(model.getClusterPlacementGroupId()); + } return this; } } @@ -3009,6 +3218,20 @@ public String getCompartmentId() { return compartmentId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + /** * The current state of the Autonomous Database. **/ @@ -3146,6 +3369,13 @@ public String getKmsKeyLifecycleDetails() { return kmsKeyLifecycleDetails; } + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKey") + private final AutonomousDatabaseEncryptionKeyDetails encryptionKey; + + public AutonomousDatabaseEncryptionKeyDetails getEncryptionKey() { + return encryptionKey; + } + /** * The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances. * @@ -3354,6 +3584,22 @@ public java.util.List getKeyHistoryEntry() { return keyHistoryEntry; } + /** + * Key History Entry. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKeyHistoryEntry") + private final java.util.List + encryptionKeyHistoryEntry; + + /** + * Key History Entry. + * @return the value + **/ + public java.util.List + getEncryptionKeyHistoryEntry() { + return encryptionKeyHistoryEntry; + } + /** * The number of CPU cores to be made available to the database. When the ECPU is selected, the value for cpuCoreCount is 0. For Autonomous Database on Dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See [Characteristics of Infrastructure Shapes](https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. *

@@ -3452,7 +3698,7 @@ public ComputeModel getComputeModel() { /** * The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. - * For an Autonomous Database Serverless instance, the 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. + * The 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. * **/ @com.fasterxml.jackson.annotation.JsonProperty("computeCount") @@ -3460,7 +3706,7 @@ public ComputeModel getComputeModel() { /** * The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. - * For an Autonomous Database Serverless instance, the 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. + * The 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. * * @return the value **/ @@ -3546,12 +3792,22 @@ public java.util.List getProvisionableCpus() { /** * The quantity of data in the database, in terabytes. + *

+ * The following points apply to Autonomous Databases on Serverless Infrastructure: + * - This is an integer field whose value remains null when the data size is in GBs and cannot be converted to TBs (by dividing the GB value by 1024) without rounding error. + * - To get the exact value of data storage size without rounding error, please see {@code dataStorageSizeInGBs} of Autonomous Database. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") private final Integer dataStorageSizeInTBs; /** * The quantity of data in the database, in terabytes. + *

+ * The following points apply to Autonomous Databases on Serverless Infrastructure: + * - This is an integer field whose value remains null when the data size is in GBs and cannot be converted to TBs (by dividing the GB value by 1024) without rounding error. + * - To get the exact value of data storage size without rounding error, please see {@code dataStorageSizeInGBs} of Autonomous Database. + * * @return the value **/ public Integer getDataStorageSizeInTBs() { @@ -3576,12 +3832,18 @@ public Integer getMemoryPerOracleComputeUnitInGBs() { /** * The quantity of data in the database, in gigabytes. + *

+ * For Autonomous Transaction Processing databases using ECPUs on Serverless Infrastructure, this value is always populated. In all the other cases, this value will be null and {@code dataStorageSizeInTBs} will be populated instead. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGBs") private final Integer dataStorageSizeInGBs; /** * The quantity of data in the database, in gigabytes. + *

+ * For Autonomous Transaction Processing databases using ECPUs on Serverless Infrastructure, this value is always populated. In all the other cases, this value will be null and {@code dataStorageSizeInTBs} will be populated instead. + * * @return the value **/ public Integer getDataStorageSizeInGBs() { @@ -3604,6 +3866,7 @@ public Integer getUsedDataStorageSizeInGBs() { /** * The infrastructure type this resource belongs to. + * **/ public enum InfrastructureType { Cloud("CLOUD"), @@ -3652,12 +3915,14 @@ public static InfrastructureType create(String key) { }; /** * The infrastructure type this resource belongs to. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("infrastructureType") private final InfrastructureType infrastructureType; /** * The infrastructure type this resource belongs to. + * * @return the value **/ public InfrastructureType getInfrastructureType() { @@ -3694,6 +3959,22 @@ public String getAutonomousContainerDatabaseId() { return autonomousContainerDatabaseId; } + /** + * The date and time the Autonomous Database was most recently undeleted. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUndeleted") + private final java.util.Date timeUndeleted; + + /** + * The date and time the Autonomous Database was most recently undeleted. + * + * @return the value + **/ + public java.util.Date getTimeUndeleted() { + return timeUndeleted; + } + /** * The date and time the Autonomous Database was created. **/ @@ -3852,13 +4133,27 @@ public LicenseModel getLicenseModel() { } /** - * The amount of storage that has been used, in terabytes. + * The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("byolComputeCountLimit") + private final Float byolComputeCountLimit; + + /** + * The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + * @return the value + **/ + public Float getByolComputeCountLimit() { + return byolComputeCountLimit; + } + + /** + * The amount of storage that has been used for Autonomous Databases in dedicated infrastructure, in terabytes. **/ @com.fasterxml.jackson.annotation.JsonProperty("usedDataStorageSizeInTBs") private final Integer usedDataStorageSizeInTBs; /** - * The amount of storage that has been used, in terabytes. + * The amount of storage that has been used for Autonomous Databases in dedicated infrastructure, in terabytes. * @return the value **/ public Integer getUsedDataStorageSizeInTBs() { @@ -3905,6 +4200,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet the resource is associated with. *

@@ -4144,14 +4459,14 @@ public DbWorkload getDbWorkload() { } /** - * Autonomous Database for Developers are free Autonomous Databases that developers can use to build and test new applications.With Autonomous these database instancess instances, you can try new Autonomous Database features for free and apply them to ongoing or new development projects. Developer database comes with limited resources and is, therefore, not suitable for large-scale testing and production deployments. When you need more compute or storage resources, you can transition to a paid database licensing by cloning your developer database into a regular Autonomous Database. See [Autonomous Database documentation](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/eddjo/index.html) for more details. + * Autonomous Database for Developers are fixed-shape Autonomous Databases that developers can use to build and test new applications. On Serverless, these are low-cost and billed per instance, on Dedicated and Cloud@Customer there is no additional cost to create Developer databases. Developer databases come with limited resources and is not intended for large-scale testing and production deployments. When you need more compute or storage resources, you may upgrade to a full paid production database. * **/ @com.fasterxml.jackson.annotation.JsonProperty("isDevTier") private final Boolean isDevTier; /** - * Autonomous Database for Developers are free Autonomous Databases that developers can use to build and test new applications.With Autonomous these database instancess instances, you can try new Autonomous Database features for free and apply them to ongoing or new development projects. Developer database comes with limited resources and is, therefore, not suitable for large-scale testing and production deployments. When you need more compute or storage resources, you can transition to a paid database licensing by cloning your developer database into a regular Autonomous Database. See [Autonomous Database documentation](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/eddjo/index.html) for more details. + * Autonomous Database for Developers are fixed-shape Autonomous Databases that developers can use to build and test new applications. On Serverless, these are low-cost and billed per instance, on Dedicated and Cloud@Customer there is no additional cost to create Developer databases. Developer databases come with limited resources and is not intended for large-scale testing and production deployments. When you need more compute or storage resources, you may upgrade to a full paid production database. * * @return the value **/ @@ -5712,6 +6027,7 @@ public DisasterRecoveryConfiguration getRemoteDisasterRecoveryConfiguration() { /** * Enabling SHARED server architecture enables a database server to allow many client processes to share very few server processes, thereby increasing the number of supported users. + * **/ public enum NetServicesArchitecture { Dedicated("DEDICATED"), @@ -5760,18 +6076,48 @@ public static NetServicesArchitecture create(String key) { }; /** * Enabling SHARED server architecture enables a database server to allow many client processes to share very few server processes, thereby increasing the number of supported users. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("netServicesArchitecture") private final NetServicesArchitecture netServicesArchitecture; /** * Enabling SHARED server architecture enables a database server to allow many client processes to share very few server processes, thereby increasing the number of supported users. + * * @return the value **/ public NetServicesArchitecture getNetServicesArchitecture() { return netServicesArchitecture; } + /** + * The availability domain where the Autonomous Database Serverless instance is located. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The availability domain where the Autonomous Database Serverless instance is located. + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Autonomous Serverless Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterPlacementGroupId") + private final String clusterPlacementGroupId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Autonomous Serverless Database. + * @return the value + **/ + public String getClusterPlacementGroupId() { + return clusterPlacementGroupId; + } + @Override public String toString() { return this.toString(true); @@ -5788,11 +6134,13 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("id=").append(String.valueOf(this.id)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); sb.append(", vaultId=").append(String.valueOf(this.vaultId)); sb.append(", kmsKeyLifecycleDetails=").append(String.valueOf(this.kmsKeyLifecycleDetails)); + sb.append(", encryptionKey=").append(String.valueOf(this.encryptionKey)); sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); sb.append(", dbName=").append(String.valueOf(this.dbName)); sb.append(", characterSet=").append(String.valueOf(this.characterSet)); @@ -5810,6 +6158,8 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.timeDeletionOfFreeAutonomousDatabase)); sb.append(", backupConfig=").append(String.valueOf(this.backupConfig)); sb.append(", keyHistoryEntry=").append(String.valueOf(this.keyHistoryEntry)); + sb.append(", encryptionKeyHistoryEntry=") + .append(String.valueOf(this.encryptionKeyHistoryEntry)); sb.append(", cpuCoreCount=").append(String.valueOf(this.cpuCoreCount)); sb.append(", localAdgAutoFailoverMaxDataLossLimit=") .append(String.valueOf(this.localAdgAutoFailoverMaxDataLossLimit)); @@ -5831,6 +6181,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isDedicated=").append(String.valueOf(this.isDedicated)); sb.append(", autonomousContainerDatabaseId=") .append(String.valueOf(this.autonomousContainerDatabaseId)); + sb.append(", timeUndeleted=").append(String.valueOf(this.timeUndeleted)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", serviceConsoleUrl=").append(String.valueOf(this.serviceConsoleUrl)); @@ -5838,10 +6189,12 @@ public String toString(boolean includeByteArrayContents) { sb.append(", connectionUrls=").append(String.valueOf(this.connectionUrls)); sb.append(", publicConnectionUrls=").append(String.valueOf(this.publicConnectionUrls)); sb.append(", licenseModel=").append(String.valueOf(this.licenseModel)); + sb.append(", byolComputeCountLimit=").append(String.valueOf(this.byolComputeCountLimit)); sb.append(", usedDataStorageSizeInTBs=") .append(String.valueOf(this.usedDataStorageSizeInTBs)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", subnetId=").append(String.valueOf(this.subnetId)); sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); sb.append(", privateEndpoint=").append(String.valueOf(this.privateEndpoint)); @@ -5936,6 +6289,9 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.remoteDisasterRecoveryConfiguration)); sb.append(", netServicesArchitecture=") .append(String.valueOf(this.netServicesArchitecture)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", clusterPlacementGroupId=") + .append(String.valueOf(this.clusterPlacementGroupId)); sb.append(")"); return sb.toString(); } @@ -5952,12 +6308,14 @@ public boolean equals(Object o) { AutonomousDatabase other = (AutonomousDatabase) o; return java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) && java.util.Objects.equals(this.vaultId, other.vaultId) && java.util.Objects.equals( this.kmsKeyLifecycleDetails, other.kmsKeyLifecycleDetails) + && java.util.Objects.equals(this.encryptionKey, other.encryptionKey) && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) && java.util.Objects.equals(this.dbName, other.dbName) && java.util.Objects.equals(this.characterSet, other.characterSet) @@ -5978,6 +6336,8 @@ public boolean equals(Object o) { other.timeDeletionOfFreeAutonomousDatabase) && java.util.Objects.equals(this.backupConfig, other.backupConfig) && java.util.Objects.equals(this.keyHistoryEntry, other.keyHistoryEntry) + && java.util.Objects.equals( + this.encryptionKeyHistoryEntry, other.encryptionKeyHistoryEntry) && java.util.Objects.equals(this.cpuCoreCount, other.cpuCoreCount) && java.util.Objects.equals( this.localAdgAutoFailoverMaxDataLossLimit, @@ -6000,6 +6360,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.isDedicated, other.isDedicated) && java.util.Objects.equals( this.autonomousContainerDatabaseId, other.autonomousContainerDatabaseId) + && java.util.Objects.equals(this.timeUndeleted, other.timeUndeleted) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.serviceConsoleUrl, other.serviceConsoleUrl) @@ -6007,10 +6368,12 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.connectionUrls, other.connectionUrls) && java.util.Objects.equals(this.publicConnectionUrls, other.publicConnectionUrls) && java.util.Objects.equals(this.licenseModel, other.licenseModel) + && java.util.Objects.equals(this.byolComputeCountLimit, other.byolComputeCountLimit) && java.util.Objects.equals( this.usedDataStorageSizeInTBs, other.usedDataStorageSizeInTBs) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.subnetId, other.subnetId) && java.util.Objects.equals(this.nsgIds, other.nsgIds) && java.util.Objects.equals(this.privateEndpoint, other.privateEndpoint) @@ -6110,6 +6473,9 @@ public boolean equals(Object o) { other.remoteDisasterRecoveryConfiguration) && java.util.Objects.equals( this.netServicesArchitecture, other.netServicesArchitecture) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals( + this.clusterPlacementGroupId, other.clusterPlacementGroupId) && super.equals(other); } @@ -6121,6 +6487,9 @@ public int hashCode() { result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); @@ -6134,6 +6503,9 @@ public int hashCode() { + (this.kmsKeyLifecycleDetails == null ? 43 : this.kmsKeyLifecycleDetails.hashCode()); + result = + (result * PRIME) + + (this.encryptionKey == null ? 43 : this.encryptionKey.hashCode()); result = (result * PRIME) + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); @@ -6176,6 +6548,11 @@ public int hashCode() { result = (result * PRIME) + (this.keyHistoryEntry == null ? 43 : this.keyHistoryEntry.hashCode()); + result = + (result * PRIME) + + (this.encryptionKeyHistoryEntry == null + ? 43 + : this.encryptionKeyHistoryEntry.hashCode()); result = (result * PRIME) + (this.cpuCoreCount == null ? 43 : this.cpuCoreCount.hashCode()); result = (result * PRIME) @@ -6229,6 +6606,9 @@ public int hashCode() { + (this.autonomousContainerDatabaseId == null ? 43 : this.autonomousContainerDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.timeUndeleted == null ? 43 : this.timeUndeleted.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = @@ -6246,6 +6626,11 @@ public int hashCode() { ? 43 : this.publicConnectionUrls.hashCode()); result = (result * PRIME) + (this.licenseModel == null ? 43 : this.licenseModel.hashCode()); + result = + (result * PRIME) + + (this.byolComputeCountLimit == null + ? 43 + : this.byolComputeCountLimit.hashCode()); result = (result * PRIME) + (this.usedDataStorageSizeInTBs == null @@ -6253,6 +6638,11 @@ public int hashCode() { : this.usedDataStorageSizeInTBs.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); result = @@ -6518,6 +6908,16 @@ public int hashCode() { + (this.netServicesArchitecture == null ? 43 : this.netServicesArchitecture.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = + (result * PRIME) + + (this.clusterPlacementGroupId == null + ? 43 + : this.clusterPlacementGroupId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseBackupSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseBackupSummary.java index 04d35435da0..0258eb7fca8 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseBackupSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseBackupSummary.java @@ -7,8 +7,8 @@ /** * An Autonomous Database backup. * To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see [Getting Started with Policies](https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm). - *

- **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API. + * + * **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseEncryptionKeyDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseEncryptionKeyDetails.java new file mode 100644 index 00000000000..8b6d2f2e1ac --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseEncryptionKeyDetails.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of the Autonomous Database encryption key. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "provider", + defaultImpl = AutonomousDatabaseEncryptionKeyDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = OkvKeyDetails.class, name = "OKV"), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = AzureKeyDetails.class, + name = "AZURE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = AwsKeyDetails.class, name = "AWS"), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = OciKeyDetails.class, name = "OCI"), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = OracleManagedKeyDetails.class, + name = "ORACLE_MANAGED" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AutonomousDatabaseEncryptionKeyDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected AutonomousDatabaseEncryptionKeyDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AutonomousDatabaseEncryptionKeyDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AutonomousDatabaseEncryptionKeyDetails)) { + return false; + } + + AutonomousDatabaseEncryptionKeyDetails other = (AutonomousDatabaseEncryptionKeyDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The provider for the Autonomous Database encryption key. + **/ + public enum Provider { + Aws("AWS"), + Azure("AZURE"), + Oci("OCI"), + OracleManaged("ORACLE_MANAGED"), + Okv("OKV"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(Provider.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Provider v : Provider.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Provider(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Provider create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Provider', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseEncryptionKeyHistoryEntry.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseEncryptionKeyHistoryEntry.java new file mode 100644 index 00000000000..395311e261a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseEncryptionKeyHistoryEntry.java @@ -0,0 +1,167 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * The Autonomous Database encryption key history entry. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousDatabaseEncryptionKeyHistoryEntry.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AutonomousDatabaseEncryptionKeyHistoryEntry + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"encryptionKey", "timeActivated"}) + public AutonomousDatabaseEncryptionKeyHistoryEntry( + AutonomousDatabaseEncryptionKeyDetails encryptionKey, java.util.Date timeActivated) { + super(); + this.encryptionKey = encryptionKey; + this.timeActivated = timeActivated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKey") + private AutonomousDatabaseEncryptionKeyDetails encryptionKey; + + public Builder encryptionKey(AutonomousDatabaseEncryptionKeyDetails encryptionKey) { + this.encryptionKey = encryptionKey; + this.__explicitlySet__.add("encryptionKey"); + return this; + } + /** + * The date and time the encryption key was activated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeActivated") + private java.util.Date timeActivated; + + /** + * The date and time the encryption key was activated. + * @param timeActivated the value to set + * @return this builder + **/ + public Builder timeActivated(java.util.Date timeActivated) { + this.timeActivated = timeActivated; + this.__explicitlySet__.add("timeActivated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousDatabaseEncryptionKeyHistoryEntry build() { + AutonomousDatabaseEncryptionKeyHistoryEntry model = + new AutonomousDatabaseEncryptionKeyHistoryEntry( + this.encryptionKey, this.timeActivated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousDatabaseEncryptionKeyHistoryEntry model) { + if (model.wasPropertyExplicitlySet("encryptionKey")) { + this.encryptionKey(model.getEncryptionKey()); + } + if (model.wasPropertyExplicitlySet("timeActivated")) { + this.timeActivated(model.getTimeActivated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKey") + private final AutonomousDatabaseEncryptionKeyDetails encryptionKey; + + public AutonomousDatabaseEncryptionKeyDetails getEncryptionKey() { + return encryptionKey; + } + + /** + * The date and time the encryption key was activated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeActivated") + private final java.util.Date timeActivated; + + /** + * The date and time the encryption key was activated. + * @return the value + **/ + public java.util.Date getTimeActivated() { + return timeActivated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AutonomousDatabaseEncryptionKeyHistoryEntry("); + sb.append("super=").append(super.toString()); + sb.append("encryptionKey=").append(String.valueOf(this.encryptionKey)); + sb.append(", timeActivated=").append(String.valueOf(this.timeActivated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AutonomousDatabaseEncryptionKeyHistoryEntry)) { + return false; + } + + AutonomousDatabaseEncryptionKeyHistoryEntry other = + (AutonomousDatabaseEncryptionKeyHistoryEntry) o; + return java.util.Objects.equals(this.encryptionKey, other.encryptionKey) + && java.util.Objects.equals(this.timeActivated, other.timeActivated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.encryptionKey == null ? 43 : this.encryptionKey.hashCode()); + result = + (result * PRIME) + + (this.timeActivated == null ? 43 : this.timeActivated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseSoftwareImage.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseSoftwareImage.java index 49b154ea0c2..f22e67dec3c 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseSoftwareImage.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseSoftwareImage.java @@ -35,7 +35,8 @@ public final class AutonomousDatabaseSoftwareImage "freeformTags", "definedTags", "autonomousDsiOneOffPatches", - "imageShapeFamily" + "imageShapeFamily", + "dstFileVersion" }) public AutonomousDatabaseSoftwareImage( String id, @@ -49,7 +50,8 @@ public AutonomousDatabaseSoftwareImage( java.util.Map freeformTags, java.util.Map> definedTags, java.util.List autonomousDsiOneOffPatches, - ImageShapeFamily imageShapeFamily) { + ImageShapeFamily imageShapeFamily, + String dstFileVersion) { super(); this.id = id; this.compartmentId = compartmentId; @@ -63,6 +65,7 @@ public AutonomousDatabaseSoftwareImage( this.definedTags = definedTags; this.autonomousDsiOneOffPatches = autonomousDsiOneOffPatches; this.imageShapeFamily = imageShapeFamily; + this.dstFileVersion = dstFileVersion; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -273,6 +276,22 @@ public Builder imageShapeFamily(ImageShapeFamily imageShapeFamily) { this.__explicitlySet__.add("imageShapeFamily"); return this; } + /** + * DST Time-Zone File version of the Autonomous Container Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dstFileVersion") + private String dstFileVersion; + + /** + * DST Time-Zone File version of the Autonomous Container Database. + * @param dstFileVersion the value to set + * @return this builder + **/ + public Builder dstFileVersion(String dstFileVersion) { + this.dstFileVersion = dstFileVersion; + this.__explicitlySet__.add("dstFileVersion"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -291,7 +310,8 @@ public AutonomousDatabaseSoftwareImage build() { this.freeformTags, this.definedTags, this.autonomousDsiOneOffPatches, - this.imageShapeFamily); + this.imageShapeFamily, + this.dstFileVersion); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -336,6 +356,9 @@ public Builder copy(AutonomousDatabaseSoftwareImage model) { if (model.wasPropertyExplicitlySet("imageShapeFamily")) { this.imageShapeFamily(model.getImageShapeFamily()); } + if (model.wasPropertyExplicitlySet("dstFileVersion")) { + this.dstFileVersion(model.getDstFileVersion()); + } return this; } } @@ -632,6 +655,20 @@ public ImageShapeFamily getImageShapeFamily() { return imageShapeFamily; } + /** + * DST Time-Zone File version of the Autonomous Container Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dstFileVersion") + private final String dstFileVersion; + + /** + * DST Time-Zone File version of the Autonomous Container Database. + * @return the value + **/ + public String getDstFileVersion() { + return dstFileVersion; + } + @Override public String toString() { return this.toString(true); @@ -659,6 +696,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", autonomousDsiOneOffPatches=") .append(String.valueOf(this.autonomousDsiOneOffPatches)); sb.append(", imageShapeFamily=").append(String.valueOf(this.imageShapeFamily)); + sb.append(", dstFileVersion=").append(String.valueOf(this.dstFileVersion)); sb.append(")"); return sb.toString(); } @@ -686,6 +724,7 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.autonomousDsiOneOffPatches, other.autonomousDsiOneOffPatches) && java.util.Objects.equals(this.imageShapeFamily, other.imageShapeFamily) + && java.util.Objects.equals(this.dstFileVersion, other.dstFileVersion) && super.equals(other); } @@ -721,6 +760,9 @@ public int hashCode() { result = (result * PRIME) + (this.imageShapeFamily == null ? 43 : this.imageShapeFamily.hashCode()); + result = + (result * PRIME) + + (this.dstFileVersion == null ? 43 : this.dstFileVersion.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseSoftwareImageSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseSoftwareImageSummary.java index 3bef239634b..d739e11b31c 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseSoftwareImageSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseSoftwareImageSummary.java @@ -35,7 +35,8 @@ public final class AutonomousDatabaseSoftwareImageSummary "freeformTags", "definedTags", "autonomousDsiOneOffPatches", - "imageShapeFamily" + "imageShapeFamily", + "dstFileVersion" }) public AutonomousDatabaseSoftwareImageSummary( String id, @@ -49,7 +50,8 @@ public AutonomousDatabaseSoftwareImageSummary( java.util.Map freeformTags, java.util.Map> definedTags, java.util.List autonomousDsiOneOffPatches, - AutonomousDatabaseSoftwareImage.ImageShapeFamily imageShapeFamily) { + AutonomousDatabaseSoftwareImage.ImageShapeFamily imageShapeFamily, + String dstFileVersion) { super(); this.id = id; this.compartmentId = compartmentId; @@ -63,6 +65,7 @@ public AutonomousDatabaseSoftwareImageSummary( this.definedTags = definedTags; this.autonomousDsiOneOffPatches = autonomousDsiOneOffPatches; this.imageShapeFamily = imageShapeFamily; + this.dstFileVersion = dstFileVersion; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -275,6 +278,22 @@ public Builder imageShapeFamily( this.__explicitlySet__.add("imageShapeFamily"); return this; } + /** + * DST Time-Zone File version of the Autonomous Container Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dstFileVersion") + private String dstFileVersion; + + /** + * DST Time-Zone File version of the Autonomous Container Database. + * @param dstFileVersion the value to set + * @return this builder + **/ + public Builder dstFileVersion(String dstFileVersion) { + this.dstFileVersion = dstFileVersion; + this.__explicitlySet__.add("dstFileVersion"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -293,7 +312,8 @@ public AutonomousDatabaseSoftwareImageSummary build() { this.freeformTags, this.definedTags, this.autonomousDsiOneOffPatches, - this.imageShapeFamily); + this.imageShapeFamily, + this.dstFileVersion); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -338,6 +358,9 @@ public Builder copy(AutonomousDatabaseSoftwareImageSummary model) { if (model.wasPropertyExplicitlySet("imageShapeFamily")) { this.imageShapeFamily(model.getImageShapeFamily()); } + if (model.wasPropertyExplicitlySet("dstFileVersion")) { + this.dstFileVersion(model.getDstFileVersion()); + } return this; } } @@ -533,6 +556,20 @@ public AutonomousDatabaseSoftwareImage.ImageShapeFamily getImageShapeFamily() { return imageShapeFamily; } + /** + * DST Time-Zone File version of the Autonomous Container Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dstFileVersion") + private final String dstFileVersion; + + /** + * DST Time-Zone File version of the Autonomous Container Database. + * @return the value + **/ + public String getDstFileVersion() { + return dstFileVersion; + } + @Override public String toString() { return this.toString(true); @@ -560,6 +597,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", autonomousDsiOneOffPatches=") .append(String.valueOf(this.autonomousDsiOneOffPatches)); sb.append(", imageShapeFamily=").append(String.valueOf(this.imageShapeFamily)); + sb.append(", dstFileVersion=").append(String.valueOf(this.dstFileVersion)); sb.append(")"); return sb.toString(); } @@ -587,6 +625,7 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.autonomousDsiOneOffPatches, other.autonomousDsiOneOffPatches) && java.util.Objects.equals(this.imageShapeFamily, other.imageShapeFamily) + && java.util.Objects.equals(this.dstFileVersion, other.dstFileVersion) && super.equals(other); } @@ -622,6 +661,9 @@ public int hashCode() { result = (result * PRIME) + (this.imageShapeFamily == null ? 43 : this.imageShapeFamily.hashCode()); + result = + (result * PRIME) + + (this.dstFileVersion == null ? 43 : this.dstFileVersion.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseStandbySummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseStandbySummary.java index 5eca71d218b..fa0e2529f2a 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseStandbySummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseStandbySummary.java @@ -28,20 +28,23 @@ public final class AutonomousDatabaseStandbySummary "lifecycleState", "lifecycleDetails", "timeDataGuardRoleChanged", - "timeDisasterRecoveryRoleChanged" + "timeDisasterRecoveryRoleChanged", + "availabilityDomain" }) public AutonomousDatabaseStandbySummary( Integer lagTimeInSeconds, LifecycleState lifecycleState, String lifecycleDetails, java.util.Date timeDataGuardRoleChanged, - java.util.Date timeDisasterRecoveryRoleChanged) { + java.util.Date timeDisasterRecoveryRoleChanged, + String availabilityDomain) { super(); this.lagTimeInSeconds = lagTimeInSeconds; this.lifecycleState = lifecycleState; this.lifecycleDetails = lifecycleDetails; this.timeDataGuardRoleChanged = timeDataGuardRoleChanged; this.timeDisasterRecoveryRoleChanged = timeDisasterRecoveryRoleChanged; + this.availabilityDomain = availabilityDomain; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -127,6 +130,22 @@ public Builder timeDisasterRecoveryRoleChanged( this.__explicitlySet__.add("timeDisasterRecoveryRoleChanged"); return this; } + /** + * The availability domain of a local Autonomous Data Guard standby database of an Autonomous Database Serverless instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The availability domain of a local Autonomous Data Guard standby database of an Autonomous Database Serverless instance. + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -138,7 +157,8 @@ public AutonomousDatabaseStandbySummary build() { this.lifecycleState, this.lifecycleDetails, this.timeDataGuardRoleChanged, - this.timeDisasterRecoveryRoleChanged); + this.timeDisasterRecoveryRoleChanged, + this.availabilityDomain); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -162,6 +182,9 @@ public Builder copy(AutonomousDatabaseStandbySummary model) { if (model.wasPropertyExplicitlySet("timeDisasterRecoveryRoleChanged")) { this.timeDisasterRecoveryRoleChanged(model.getTimeDisasterRecoveryRoleChanged()); } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } return this; } } @@ -314,6 +337,20 @@ public java.util.Date getTimeDisasterRecoveryRoleChanged() { return timeDisasterRecoveryRoleChanged; } + /** + * The availability domain of a local Autonomous Data Guard standby database of an Autonomous Database Serverless instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The availability domain of a local Autonomous Data Guard standby database of an Autonomous Database Serverless instance. + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + @Override public String toString() { return this.toString(true); @@ -335,6 +372,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.timeDataGuardRoleChanged)); sb.append(", timeDisasterRecoveryRoleChanged=") .append(String.valueOf(this.timeDisasterRecoveryRoleChanged)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); sb.append(")"); return sb.toString(); } @@ -356,6 +394,7 @@ public boolean equals(Object o) { this.timeDataGuardRoleChanged, other.timeDataGuardRoleChanged) && java.util.Objects.equals( this.timeDisasterRecoveryRoleChanged, other.timeDisasterRecoveryRoleChanged) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) && super.equals(other); } @@ -382,6 +421,11 @@ public int hashCode() { + (this.timeDisasterRecoveryRoleChanged == null ? 43 : this.timeDisasterRecoveryRoleChanged.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseSummary.java index 2447b965728..dc92b1911f9 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseSummary.java @@ -6,8 +6,8 @@ /** * An Oracle Autonomous Database. - *

- **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API. + * + * **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -28,11 +28,13 @@ public final class AutonomousDatabaseSummary @java.beans.ConstructorProperties({ "id", "compartmentId", + "subscriptionId", "lifecycleState", "lifecycleDetails", "kmsKeyId", "vaultId", "kmsKeyLifecycleDetails", + "encryptionKey", "kmsKeyVersionId", "dbName", "characterSet", @@ -47,6 +49,7 @@ public final class AutonomousDatabaseSummary "timeDeletionOfFreeAutonomousDatabase", "backupConfig", "keyHistoryEntry", + "encryptionKeyHistoryEntry", "cpuCoreCount", "localAdgAutoFailoverMaxDataLossLimit", "computeModel", @@ -62,6 +65,7 @@ public final class AutonomousDatabaseSummary "infrastructureType", "isDedicated", "autonomousContainerDatabaseId", + "timeUndeleted", "timeCreated", "displayName", "serviceConsoleUrl", @@ -69,9 +73,11 @@ public final class AutonomousDatabaseSummary "connectionUrls", "publicConnectionUrls", "licenseModel", + "byolComputeCountLimit", "usedDataStorageSizeInTBs", "freeformTags", "definedTags", + "securityAttributes", "subnetId", "nsgIds", "privateEndpoint", @@ -140,16 +146,20 @@ public final class AutonomousDatabaseSummary "disasterRecoveryRegionType", "timeDisasterRecoveryRoleChanged", "remoteDisasterRecoveryConfiguration", - "netServicesArchitecture" + "netServicesArchitecture", + "availabilityDomain", + "clusterPlacementGroupId" }) public AutonomousDatabaseSummary( String id, String compartmentId, + String subscriptionId, LifecycleState lifecycleState, String lifecycleDetails, String kmsKeyId, String vaultId, String kmsKeyLifecycleDetails, + AutonomousDatabaseEncryptionKeyDetails encryptionKey, String kmsKeyVersionId, String dbName, String characterSet, @@ -164,6 +174,7 @@ public AutonomousDatabaseSummary( java.util.Date timeDeletionOfFreeAutonomousDatabase, AutonomousDatabaseBackupConfig backupConfig, java.util.List keyHistoryEntry, + java.util.List encryptionKeyHistoryEntry, Integer cpuCoreCount, Integer localAdgAutoFailoverMaxDataLossLimit, ComputeModel computeModel, @@ -179,6 +190,7 @@ public AutonomousDatabaseSummary( InfrastructureType infrastructureType, Boolean isDedicated, String autonomousContainerDatabaseId, + java.util.Date timeUndeleted, java.util.Date timeCreated, String displayName, String serviceConsoleUrl, @@ -186,9 +198,11 @@ public AutonomousDatabaseSummary( AutonomousDatabaseConnectionUrls connectionUrls, AutonomousDatabaseConnectionUrls publicConnectionUrls, LicenseModel licenseModel, + Float byolComputeCountLimit, Integer usedDataStorageSizeInTBs, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String subnetId, java.util.List nsgIds, String privateEndpoint, @@ -257,15 +271,19 @@ public AutonomousDatabaseSummary( DisasterRecoveryRegionType disasterRecoveryRegionType, java.util.Date timeDisasterRecoveryRoleChanged, DisasterRecoveryConfiguration remoteDisasterRecoveryConfiguration, - NetServicesArchitecture netServicesArchitecture) { + NetServicesArchitecture netServicesArchitecture, + String availabilityDomain, + String clusterPlacementGroupId) { super(); this.id = id; this.compartmentId = compartmentId; + this.subscriptionId = subscriptionId; this.lifecycleState = lifecycleState; this.lifecycleDetails = lifecycleDetails; this.kmsKeyId = kmsKeyId; this.vaultId = vaultId; this.kmsKeyLifecycleDetails = kmsKeyLifecycleDetails; + this.encryptionKey = encryptionKey; this.kmsKeyVersionId = kmsKeyVersionId; this.dbName = dbName; this.characterSet = characterSet; @@ -280,6 +298,7 @@ public AutonomousDatabaseSummary( this.timeDeletionOfFreeAutonomousDatabase = timeDeletionOfFreeAutonomousDatabase; this.backupConfig = backupConfig; this.keyHistoryEntry = keyHistoryEntry; + this.encryptionKeyHistoryEntry = encryptionKeyHistoryEntry; this.cpuCoreCount = cpuCoreCount; this.localAdgAutoFailoverMaxDataLossLimit = localAdgAutoFailoverMaxDataLossLimit; this.computeModel = computeModel; @@ -295,6 +314,7 @@ public AutonomousDatabaseSummary( this.infrastructureType = infrastructureType; this.isDedicated = isDedicated; this.autonomousContainerDatabaseId = autonomousContainerDatabaseId; + this.timeUndeleted = timeUndeleted; this.timeCreated = timeCreated; this.displayName = displayName; this.serviceConsoleUrl = serviceConsoleUrl; @@ -302,9 +322,11 @@ public AutonomousDatabaseSummary( this.connectionUrls = connectionUrls; this.publicConnectionUrls = publicConnectionUrls; this.licenseModel = licenseModel; + this.byolComputeCountLimit = byolComputeCountLimit; this.usedDataStorageSizeInTBs = usedDataStorageSizeInTBs; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.subnetId = subnetId; this.nsgIds = nsgIds; this.privateEndpoint = privateEndpoint; @@ -374,6 +396,8 @@ public AutonomousDatabaseSummary( this.timeDisasterRecoveryRoleChanged = timeDisasterRecoveryRoleChanged; this.remoteDisasterRecoveryConfiguration = remoteDisasterRecoveryConfiguration; this.netServicesArchitecture = netServicesArchitecture; + this.availabilityDomain = availabilityDomain; + this.clusterPlacementGroupId = clusterPlacementGroupId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -410,6 +434,22 @@ public Builder compartmentId(String compartmentId) { this.__explicitlySet__.add("compartmentId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @param subscriptionId the value to set + * @return this builder + **/ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } /** * The current state of the Autonomous Database. **/ @@ -490,6 +530,15 @@ public Builder kmsKeyLifecycleDetails(String kmsKeyLifecycleDetails) { this.__explicitlySet__.add("kmsKeyLifecycleDetails"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKey") + private AutonomousDatabaseEncryptionKeyDetails encryptionKey; + + public Builder encryptionKey(AutonomousDatabaseEncryptionKeyDetails encryptionKey) { + this.encryptionKey = encryptionKey; + this.__explicitlySet__.add("encryptionKey"); + return this; + } /** * The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances. * @@ -730,6 +779,25 @@ public Builder keyHistoryEntry( this.__explicitlySet__.add("keyHistoryEntry"); return this; } + /** + * Key History Entry. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKeyHistoryEntry") + private java.util.List + encryptionKeyHistoryEntry; + + /** + * Key History Entry. + * @param encryptionKeyHistoryEntry the value to set + * @return this builder + **/ + public Builder encryptionKeyHistoryEntry( + java.util.List + encryptionKeyHistoryEntry) { + this.encryptionKeyHistoryEntry = encryptionKeyHistoryEntry; + this.__explicitlySet__.add("encryptionKeyHistoryEntry"); + return this; + } /** * The number of CPU cores to be made available to the database. When the ECPU is selected, the value for cpuCoreCount is 0. For Autonomous Database on Dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See [Characteristics of Infrastructure Shapes](https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. *

@@ -787,7 +855,7 @@ public Builder computeModel(ComputeModel computeModel) { } /** * The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. - * For an Autonomous Database Serverless instance, the 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. + * The 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. * **/ @com.fasterxml.jackson.annotation.JsonProperty("computeCount") @@ -795,7 +863,7 @@ public Builder computeModel(ComputeModel computeModel) { /** * The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. - * For an Autonomous Database Serverless instance, the 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. + * The 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. * * @param computeCount the value to set * @return this builder @@ -891,12 +959,22 @@ public Builder provisionableCpus(java.util.List provisionableCpus) { } /** * The quantity of data in the database, in terabytes. + *

+ * The following points apply to Autonomous Databases on Serverless Infrastructure: + * - This is an integer field whose value remains null when the data size is in GBs and cannot be converted to TBs (by dividing the GB value by 1024) without rounding error. + * - To get the exact value of data storage size without rounding error, please see {@code dataStorageSizeInGBs} of Autonomous Database. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") private Integer dataStorageSizeInTBs; /** * The quantity of data in the database, in terabytes. + *

+ * The following points apply to Autonomous Databases on Serverless Infrastructure: + * - This is an integer field whose value remains null when the data size is in GBs and cannot be converted to TBs (by dividing the GB value by 1024) without rounding error. + * - To get the exact value of data storage size without rounding error, please see {@code dataStorageSizeInGBs} of Autonomous Database. + * * @param dataStorageSizeInTBs the value to set * @return this builder **/ @@ -925,12 +1003,18 @@ public Builder memoryPerOracleComputeUnitInGBs(Integer memoryPerOracleComputeUni } /** * The quantity of data in the database, in gigabytes. + *

+ * For Autonomous Transaction Processing databases using ECPUs on Serverless Infrastructure, this value is always populated. In all the other cases, this value will be null and {@code dataStorageSizeInTBs} will be populated instead. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGBs") private Integer dataStorageSizeInGBs; /** * The quantity of data in the database, in gigabytes. + *

+ * For Autonomous Transaction Processing databases using ECPUs on Serverless Infrastructure, this value is always populated. In all the other cases, this value will be null and {@code dataStorageSizeInTBs} will be populated instead. + * * @param dataStorageSizeInGBs the value to set * @return this builder **/ @@ -957,12 +1041,14 @@ public Builder usedDataStorageSizeInGBs(Integer usedDataStorageSizeInGBs) { } /** * The infrastructure type this resource belongs to. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("infrastructureType") private InfrastructureType infrastructureType; /** * The infrastructure type this resource belongs to. + * * @param infrastructureType the value to set * @return this builder **/ @@ -1005,6 +1091,24 @@ public Builder autonomousContainerDatabaseId(String autonomousContainerDatabaseI this.__explicitlySet__.add("autonomousContainerDatabaseId"); return this; } + /** + * The date and time the Autonomous Database was most recently undeleted. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUndeleted") + private java.util.Date timeUndeleted; + + /** + * The date and time the Autonomous Database was most recently undeleted. + * + * @param timeUndeleted the value to set + * @return this builder + **/ + public Builder timeUndeleted(java.util.Date timeUndeleted) { + this.timeUndeleted = timeUndeleted; + this.__explicitlySet__.add("timeUndeleted"); + return this; + } /** * The date and time the Autonomous Database was created. **/ @@ -1123,13 +1227,29 @@ public Builder licenseModel(LicenseModel licenseModel) { return this; } /** - * The amount of storage that has been used, in terabytes. + * The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("byolComputeCountLimit") + private Float byolComputeCountLimit; + + /** + * The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + * @param byolComputeCountLimit the value to set + * @return this builder + **/ + public Builder byolComputeCountLimit(Float byolComputeCountLimit) { + this.byolComputeCountLimit = byolComputeCountLimit; + this.__explicitlySet__.add("byolComputeCountLimit"); + return this; + } + /** + * The amount of storage that has been used for Autonomous Databases in dedicated infrastructure, in terabytes. **/ @com.fasterxml.jackson.annotation.JsonProperty("usedDataStorageSizeInTBs") private Integer usedDataStorageSizeInTBs; /** - * The amount of storage that has been used, in terabytes. + * The amount of storage that has been used for Autonomous Databases in dedicated infrastructure, in terabytes. * @param usedDataStorageSizeInTBs the value to set * @return this builder **/ @@ -1183,6 +1303,29 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet the resource is associated with. *

@@ -1382,14 +1525,14 @@ public Builder dbWorkload(DbWorkload dbWorkload) { return this; } /** - * Autonomous Database for Developers are free Autonomous Databases that developers can use to build and test new applications.With Autonomous these database instancess instances, you can try new Autonomous Database features for free and apply them to ongoing or new development projects. Developer database comes with limited resources and is, therefore, not suitable for large-scale testing and production deployments. When you need more compute or storage resources, you can transition to a paid database licensing by cloning your developer database into a regular Autonomous Database. See [Autonomous Database documentation](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/eddjo/index.html) for more details. + * Autonomous Database for Developers are fixed-shape Autonomous Databases that developers can use to build and test new applications. On Serverless, these are low-cost and billed per instance, on Dedicated and Cloud@Customer there is no additional cost to create Developer databases. Developer databases come with limited resources and is not intended for large-scale testing and production deployments. When you need more compute or storage resources, you may upgrade to a full paid production database. * **/ @com.fasterxml.jackson.annotation.JsonProperty("isDevTier") private Boolean isDevTier; /** - * Autonomous Database for Developers are free Autonomous Databases that developers can use to build and test new applications.With Autonomous these database instancess instances, you can try new Autonomous Database features for free and apply them to ongoing or new development projects. Developer database comes with limited resources and is, therefore, not suitable for large-scale testing and production deployments. When you need more compute or storage resources, you can transition to a paid database licensing by cloning your developer database into a regular Autonomous Database. See [Autonomous Database documentation](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/eddjo/index.html) for more details. + * Autonomous Database for Developers are fixed-shape Autonomous Databases that developers can use to build and test new applications. On Serverless, these are low-cost and billed per instance, on Dedicated and Cloud@Customer there is no additional cost to create Developer databases. Developer databases come with limited resources and is not intended for large-scale testing and production deployments. When you need more compute or storage resources, you may upgrade to a full paid production database. * * @param isDevTier the value to set * @return this builder @@ -2475,12 +2618,14 @@ public Builder remoteDisasterRecoveryConfiguration( } /** * Enabling SHARED server architecture enables a database server to allow many client processes to share very few server processes, thereby increasing the number of supported users. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("netServicesArchitecture") private NetServicesArchitecture netServicesArchitecture; /** * Enabling SHARED server architecture enables a database server to allow many client processes to share very few server processes, thereby increasing the number of supported users. + * * @param netServicesArchitecture the value to set * @return this builder **/ @@ -2489,6 +2634,38 @@ public Builder netServicesArchitecture(NetServicesArchitecture netServicesArchit this.__explicitlySet__.add("netServicesArchitecture"); return this; } + /** + * The availability domain where the Autonomous Database Serverless instance is located. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The availability domain where the Autonomous Database Serverless instance is located. + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Autonomous Serverless Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterPlacementGroupId") + private String clusterPlacementGroupId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Autonomous Serverless Database. + * @param clusterPlacementGroupId the value to set + * @return this builder + **/ + public Builder clusterPlacementGroupId(String clusterPlacementGroupId) { + this.clusterPlacementGroupId = clusterPlacementGroupId; + this.__explicitlySet__.add("clusterPlacementGroupId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -2498,11 +2675,13 @@ public AutonomousDatabaseSummary build() { new AutonomousDatabaseSummary( this.id, this.compartmentId, + this.subscriptionId, this.lifecycleState, this.lifecycleDetails, this.kmsKeyId, this.vaultId, this.kmsKeyLifecycleDetails, + this.encryptionKey, this.kmsKeyVersionId, this.dbName, this.characterSet, @@ -2517,6 +2696,7 @@ public AutonomousDatabaseSummary build() { this.timeDeletionOfFreeAutonomousDatabase, this.backupConfig, this.keyHistoryEntry, + this.encryptionKeyHistoryEntry, this.cpuCoreCount, this.localAdgAutoFailoverMaxDataLossLimit, this.computeModel, @@ -2532,6 +2712,7 @@ public AutonomousDatabaseSummary build() { this.infrastructureType, this.isDedicated, this.autonomousContainerDatabaseId, + this.timeUndeleted, this.timeCreated, this.displayName, this.serviceConsoleUrl, @@ -2539,9 +2720,11 @@ public AutonomousDatabaseSummary build() { this.connectionUrls, this.publicConnectionUrls, this.licenseModel, + this.byolComputeCountLimit, this.usedDataStorageSizeInTBs, this.freeformTags, this.definedTags, + this.securityAttributes, this.subnetId, this.nsgIds, this.privateEndpoint, @@ -2610,7 +2793,9 @@ public AutonomousDatabaseSummary build() { this.disasterRecoveryRegionType, this.timeDisasterRecoveryRoleChanged, this.remoteDisasterRecoveryConfiguration, - this.netServicesArchitecture); + this.netServicesArchitecture, + this.availabilityDomain, + this.clusterPlacementGroupId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -2625,6 +2810,9 @@ public Builder copy(AutonomousDatabaseSummary model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } @@ -2640,6 +2828,9 @@ public Builder copy(AutonomousDatabaseSummary model) { if (model.wasPropertyExplicitlySet("kmsKeyLifecycleDetails")) { this.kmsKeyLifecycleDetails(model.getKmsKeyLifecycleDetails()); } + if (model.wasPropertyExplicitlySet("encryptionKey")) { + this.encryptionKey(model.getEncryptionKey()); + } if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { this.kmsKeyVersionId(model.getKmsKeyVersionId()); } @@ -2684,6 +2875,9 @@ public Builder copy(AutonomousDatabaseSummary model) { if (model.wasPropertyExplicitlySet("keyHistoryEntry")) { this.keyHistoryEntry(model.getKeyHistoryEntry()); } + if (model.wasPropertyExplicitlySet("encryptionKeyHistoryEntry")) { + this.encryptionKeyHistoryEntry(model.getEncryptionKeyHistoryEntry()); + } if (model.wasPropertyExplicitlySet("cpuCoreCount")) { this.cpuCoreCount(model.getCpuCoreCount()); } @@ -2730,6 +2924,9 @@ public Builder copy(AutonomousDatabaseSummary model) { if (model.wasPropertyExplicitlySet("autonomousContainerDatabaseId")) { this.autonomousContainerDatabaseId(model.getAutonomousContainerDatabaseId()); } + if (model.wasPropertyExplicitlySet("timeUndeleted")) { + this.timeUndeleted(model.getTimeUndeleted()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -2751,6 +2948,9 @@ public Builder copy(AutonomousDatabaseSummary model) { if (model.wasPropertyExplicitlySet("licenseModel")) { this.licenseModel(model.getLicenseModel()); } + if (model.wasPropertyExplicitlySet("byolComputeCountLimit")) { + this.byolComputeCountLimit(model.getByolComputeCountLimit()); + } if (model.wasPropertyExplicitlySet("usedDataStorageSizeInTBs")) { this.usedDataStorageSizeInTBs(model.getUsedDataStorageSizeInTBs()); } @@ -2760,6 +2960,9 @@ public Builder copy(AutonomousDatabaseSummary model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("subnetId")) { this.subnetId(model.getSubnetId()); } @@ -2969,6 +3172,12 @@ public Builder copy(AutonomousDatabaseSummary model) { if (model.wasPropertyExplicitlySet("netServicesArchitecture")) { this.netServicesArchitecture(model.getNetServicesArchitecture()); } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("clusterPlacementGroupId")) { + this.clusterPlacementGroupId(model.getClusterPlacementGroupId()); + } return this; } } @@ -3012,6 +3221,20 @@ public String getCompartmentId() { return compartmentId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + /** * The current state of the Autonomous Database. **/ @@ -3149,6 +3372,13 @@ public String getKmsKeyLifecycleDetails() { return kmsKeyLifecycleDetails; } + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKey") + private final AutonomousDatabaseEncryptionKeyDetails encryptionKey; + + public AutonomousDatabaseEncryptionKeyDetails getEncryptionKey() { + return encryptionKey; + } + /** * The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances. * @@ -3357,6 +3587,22 @@ public java.util.List getKeyHistoryEntry() { return keyHistoryEntry; } + /** + * Key History Entry. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKeyHistoryEntry") + private final java.util.List + encryptionKeyHistoryEntry; + + /** + * Key History Entry. + * @return the value + **/ + public java.util.List + getEncryptionKeyHistoryEntry() { + return encryptionKeyHistoryEntry; + } + /** * The number of CPU cores to be made available to the database. When the ECPU is selected, the value for cpuCoreCount is 0. For Autonomous Database on Dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See [Characteristics of Infrastructure Shapes](https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. *

@@ -3455,7 +3701,7 @@ public ComputeModel getComputeModel() { /** * The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. - * For an Autonomous Database Serverless instance, the 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. + * The 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. * **/ @com.fasterxml.jackson.annotation.JsonProperty("computeCount") @@ -3463,7 +3709,7 @@ public ComputeModel getComputeModel() { /** * The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. - * For an Autonomous Database Serverless instance, the 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. + * The 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. * * @return the value **/ @@ -3549,12 +3795,22 @@ public java.util.List getProvisionableCpus() { /** * The quantity of data in the database, in terabytes. + *

+ * The following points apply to Autonomous Databases on Serverless Infrastructure: + * - This is an integer field whose value remains null when the data size is in GBs and cannot be converted to TBs (by dividing the GB value by 1024) without rounding error. + * - To get the exact value of data storage size without rounding error, please see {@code dataStorageSizeInGBs} of Autonomous Database. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") private final Integer dataStorageSizeInTBs; /** * The quantity of data in the database, in terabytes. + *

+ * The following points apply to Autonomous Databases on Serverless Infrastructure: + * - This is an integer field whose value remains null when the data size is in GBs and cannot be converted to TBs (by dividing the GB value by 1024) without rounding error. + * - To get the exact value of data storage size without rounding error, please see {@code dataStorageSizeInGBs} of Autonomous Database. + * * @return the value **/ public Integer getDataStorageSizeInTBs() { @@ -3579,12 +3835,18 @@ public Integer getMemoryPerOracleComputeUnitInGBs() { /** * The quantity of data in the database, in gigabytes. + *

+ * For Autonomous Transaction Processing databases using ECPUs on Serverless Infrastructure, this value is always populated. In all the other cases, this value will be null and {@code dataStorageSizeInTBs} will be populated instead. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGBs") private final Integer dataStorageSizeInGBs; /** * The quantity of data in the database, in gigabytes. + *

+ * For Autonomous Transaction Processing databases using ECPUs on Serverless Infrastructure, this value is always populated. In all the other cases, this value will be null and {@code dataStorageSizeInTBs} will be populated instead. + * * @return the value **/ public Integer getDataStorageSizeInGBs() { @@ -3607,6 +3869,7 @@ public Integer getUsedDataStorageSizeInGBs() { /** * The infrastructure type this resource belongs to. + * **/ public enum InfrastructureType { Cloud("CLOUD"), @@ -3655,12 +3918,14 @@ public static InfrastructureType create(String key) { }; /** * The infrastructure type this resource belongs to. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("infrastructureType") private final InfrastructureType infrastructureType; /** * The infrastructure type this resource belongs to. + * * @return the value **/ public InfrastructureType getInfrastructureType() { @@ -3697,6 +3962,22 @@ public String getAutonomousContainerDatabaseId() { return autonomousContainerDatabaseId; } + /** + * The date and time the Autonomous Database was most recently undeleted. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUndeleted") + private final java.util.Date timeUndeleted; + + /** + * The date and time the Autonomous Database was most recently undeleted. + * + * @return the value + **/ + public java.util.Date getTimeUndeleted() { + return timeUndeleted; + } + /** * The date and time the Autonomous Database was created. **/ @@ -3855,13 +4136,27 @@ public LicenseModel getLicenseModel() { } /** - * The amount of storage that has been used, in terabytes. + * The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("byolComputeCountLimit") + private final Float byolComputeCountLimit; + + /** + * The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + * @return the value + **/ + public Float getByolComputeCountLimit() { + return byolComputeCountLimit; + } + + /** + * The amount of storage that has been used for Autonomous Databases in dedicated infrastructure, in terabytes. **/ @com.fasterxml.jackson.annotation.JsonProperty("usedDataStorageSizeInTBs") private final Integer usedDataStorageSizeInTBs; /** - * The amount of storage that has been used, in terabytes. + * The amount of storage that has been used for Autonomous Databases in dedicated infrastructure, in terabytes. * @return the value **/ public Integer getUsedDataStorageSizeInTBs() { @@ -3908,6 +4203,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet the resource is associated with. *

@@ -4147,14 +4462,14 @@ public DbWorkload getDbWorkload() { } /** - * Autonomous Database for Developers are free Autonomous Databases that developers can use to build and test new applications.With Autonomous these database instancess instances, you can try new Autonomous Database features for free and apply them to ongoing or new development projects. Developer database comes with limited resources and is, therefore, not suitable for large-scale testing and production deployments. When you need more compute or storage resources, you can transition to a paid database licensing by cloning your developer database into a regular Autonomous Database. See [Autonomous Database documentation](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/eddjo/index.html) for more details. + * Autonomous Database for Developers are fixed-shape Autonomous Databases that developers can use to build and test new applications. On Serverless, these are low-cost and billed per instance, on Dedicated and Cloud@Customer there is no additional cost to create Developer databases. Developer databases come with limited resources and is not intended for large-scale testing and production deployments. When you need more compute or storage resources, you may upgrade to a full paid production database. * **/ @com.fasterxml.jackson.annotation.JsonProperty("isDevTier") private final Boolean isDevTier; /** - * Autonomous Database for Developers are free Autonomous Databases that developers can use to build and test new applications.With Autonomous these database instancess instances, you can try new Autonomous Database features for free and apply them to ongoing or new development projects. Developer database comes with limited resources and is, therefore, not suitable for large-scale testing and production deployments. When you need more compute or storage resources, you can transition to a paid database licensing by cloning your developer database into a regular Autonomous Database. See [Autonomous Database documentation](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/eddjo/index.html) for more details. + * Autonomous Database for Developers are fixed-shape Autonomous Databases that developers can use to build and test new applications. On Serverless, these are low-cost and billed per instance, on Dedicated and Cloud@Customer there is no additional cost to create Developer databases. Developer databases come with limited resources and is not intended for large-scale testing and production deployments. When you need more compute or storage resources, you may upgrade to a full paid production database. * * @return the value **/ @@ -5715,6 +6030,7 @@ public DisasterRecoveryConfiguration getRemoteDisasterRecoveryConfiguration() { /** * Enabling SHARED server architecture enables a database server to allow many client processes to share very few server processes, thereby increasing the number of supported users. + * **/ public enum NetServicesArchitecture { Dedicated("DEDICATED"), @@ -5763,18 +6079,48 @@ public static NetServicesArchitecture create(String key) { }; /** * Enabling SHARED server architecture enables a database server to allow many client processes to share very few server processes, thereby increasing the number of supported users. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("netServicesArchitecture") private final NetServicesArchitecture netServicesArchitecture; /** * Enabling SHARED server architecture enables a database server to allow many client processes to share very few server processes, thereby increasing the number of supported users. + * * @return the value **/ public NetServicesArchitecture getNetServicesArchitecture() { return netServicesArchitecture; } + /** + * The availability domain where the Autonomous Database Serverless instance is located. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The availability domain where the Autonomous Database Serverless instance is located. + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Autonomous Serverless Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterPlacementGroupId") + private final String clusterPlacementGroupId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Autonomous Serverless Database. + * @return the value + **/ + public String getClusterPlacementGroupId() { + return clusterPlacementGroupId; + } + @Override public String toString() { return this.toString(true); @@ -5791,11 +6137,13 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("id=").append(String.valueOf(this.id)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); sb.append(", vaultId=").append(String.valueOf(this.vaultId)); sb.append(", kmsKeyLifecycleDetails=").append(String.valueOf(this.kmsKeyLifecycleDetails)); + sb.append(", encryptionKey=").append(String.valueOf(this.encryptionKey)); sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); sb.append(", dbName=").append(String.valueOf(this.dbName)); sb.append(", characterSet=").append(String.valueOf(this.characterSet)); @@ -5813,6 +6161,8 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.timeDeletionOfFreeAutonomousDatabase)); sb.append(", backupConfig=").append(String.valueOf(this.backupConfig)); sb.append(", keyHistoryEntry=").append(String.valueOf(this.keyHistoryEntry)); + sb.append(", encryptionKeyHistoryEntry=") + .append(String.valueOf(this.encryptionKeyHistoryEntry)); sb.append(", cpuCoreCount=").append(String.valueOf(this.cpuCoreCount)); sb.append(", localAdgAutoFailoverMaxDataLossLimit=") .append(String.valueOf(this.localAdgAutoFailoverMaxDataLossLimit)); @@ -5834,6 +6184,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isDedicated=").append(String.valueOf(this.isDedicated)); sb.append(", autonomousContainerDatabaseId=") .append(String.valueOf(this.autonomousContainerDatabaseId)); + sb.append(", timeUndeleted=").append(String.valueOf(this.timeUndeleted)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", serviceConsoleUrl=").append(String.valueOf(this.serviceConsoleUrl)); @@ -5841,10 +6192,12 @@ public String toString(boolean includeByteArrayContents) { sb.append(", connectionUrls=").append(String.valueOf(this.connectionUrls)); sb.append(", publicConnectionUrls=").append(String.valueOf(this.publicConnectionUrls)); sb.append(", licenseModel=").append(String.valueOf(this.licenseModel)); + sb.append(", byolComputeCountLimit=").append(String.valueOf(this.byolComputeCountLimit)); sb.append(", usedDataStorageSizeInTBs=") .append(String.valueOf(this.usedDataStorageSizeInTBs)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", subnetId=").append(String.valueOf(this.subnetId)); sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); sb.append(", privateEndpoint=").append(String.valueOf(this.privateEndpoint)); @@ -5939,6 +6292,9 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.remoteDisasterRecoveryConfiguration)); sb.append(", netServicesArchitecture=") .append(String.valueOf(this.netServicesArchitecture)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", clusterPlacementGroupId=") + .append(String.valueOf(this.clusterPlacementGroupId)); sb.append(")"); return sb.toString(); } @@ -5955,12 +6311,14 @@ public boolean equals(Object o) { AutonomousDatabaseSummary other = (AutonomousDatabaseSummary) o; return java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) && java.util.Objects.equals(this.vaultId, other.vaultId) && java.util.Objects.equals( this.kmsKeyLifecycleDetails, other.kmsKeyLifecycleDetails) + && java.util.Objects.equals(this.encryptionKey, other.encryptionKey) && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) && java.util.Objects.equals(this.dbName, other.dbName) && java.util.Objects.equals(this.characterSet, other.characterSet) @@ -5981,6 +6339,8 @@ public boolean equals(Object o) { other.timeDeletionOfFreeAutonomousDatabase) && java.util.Objects.equals(this.backupConfig, other.backupConfig) && java.util.Objects.equals(this.keyHistoryEntry, other.keyHistoryEntry) + && java.util.Objects.equals( + this.encryptionKeyHistoryEntry, other.encryptionKeyHistoryEntry) && java.util.Objects.equals(this.cpuCoreCount, other.cpuCoreCount) && java.util.Objects.equals( this.localAdgAutoFailoverMaxDataLossLimit, @@ -6003,6 +6363,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.isDedicated, other.isDedicated) && java.util.Objects.equals( this.autonomousContainerDatabaseId, other.autonomousContainerDatabaseId) + && java.util.Objects.equals(this.timeUndeleted, other.timeUndeleted) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.serviceConsoleUrl, other.serviceConsoleUrl) @@ -6010,10 +6371,12 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.connectionUrls, other.connectionUrls) && java.util.Objects.equals(this.publicConnectionUrls, other.publicConnectionUrls) && java.util.Objects.equals(this.licenseModel, other.licenseModel) + && java.util.Objects.equals(this.byolComputeCountLimit, other.byolComputeCountLimit) && java.util.Objects.equals( this.usedDataStorageSizeInTBs, other.usedDataStorageSizeInTBs) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.subnetId, other.subnetId) && java.util.Objects.equals(this.nsgIds, other.nsgIds) && java.util.Objects.equals(this.privateEndpoint, other.privateEndpoint) @@ -6113,6 +6476,9 @@ public boolean equals(Object o) { other.remoteDisasterRecoveryConfiguration) && java.util.Objects.equals( this.netServicesArchitecture, other.netServicesArchitecture) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals( + this.clusterPlacementGroupId, other.clusterPlacementGroupId) && super.equals(other); } @@ -6124,6 +6490,9 @@ public int hashCode() { result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); @@ -6137,6 +6506,9 @@ public int hashCode() { + (this.kmsKeyLifecycleDetails == null ? 43 : this.kmsKeyLifecycleDetails.hashCode()); + result = + (result * PRIME) + + (this.encryptionKey == null ? 43 : this.encryptionKey.hashCode()); result = (result * PRIME) + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); @@ -6179,6 +6551,11 @@ public int hashCode() { result = (result * PRIME) + (this.keyHistoryEntry == null ? 43 : this.keyHistoryEntry.hashCode()); + result = + (result * PRIME) + + (this.encryptionKeyHistoryEntry == null + ? 43 + : this.encryptionKeyHistoryEntry.hashCode()); result = (result * PRIME) + (this.cpuCoreCount == null ? 43 : this.cpuCoreCount.hashCode()); result = (result * PRIME) @@ -6232,6 +6609,9 @@ public int hashCode() { + (this.autonomousContainerDatabaseId == null ? 43 : this.autonomousContainerDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.timeUndeleted == null ? 43 : this.timeUndeleted.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = @@ -6249,6 +6629,11 @@ public int hashCode() { ? 43 : this.publicConnectionUrls.hashCode()); result = (result * PRIME) + (this.licenseModel == null ? 43 : this.licenseModel.hashCode()); + result = + (result * PRIME) + + (this.byolComputeCountLimit == null + ? 43 + : this.byolComputeCountLimit.hashCode()); result = (result * PRIME) + (this.usedDataStorageSizeInTBs == null @@ -6256,6 +6641,11 @@ public int hashCode() { : this.usedDataStorageSizeInTBs.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); result = @@ -6521,6 +6911,16 @@ public int hashCode() { + (this.netServicesArchitecture == null ? 43 : this.netServicesArchitecture.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = + (result * PRIME) + + (this.clusterPlacementGroupId == null + ? 43 + : this.clusterPlacementGroupId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AwsKeyDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AwsKeyDetails.java new file mode 100644 index 00000000000..f9b693cd934 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AwsKeyDetails.java @@ -0,0 +1,254 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details for AWS encryption key. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = AwsKeyDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "provider" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AwsKeyDetails extends AutonomousDatabaseEncryptionKeyDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * AWS key service endpoint URI + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceEndpointUri") + private String serviceEndpointUri; + + /** + * AWS key service endpoint URI + * @param serviceEndpointUri the value to set + * @return this builder + **/ + public Builder serviceEndpointUri(String serviceEndpointUri) { + this.serviceEndpointUri = serviceEndpointUri; + this.__explicitlySet__.add("serviceEndpointUri"); + return this; + } + /** + * AWS key ARN + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyArn") + private String keyArn; + + /** + * AWS key ARN + * @param keyArn the value to set + * @return this builder + **/ + public Builder keyArn(String keyArn) { + this.keyArn = keyArn; + this.__explicitlySet__.add("keyArn"); + return this; + } + /** + * AWS ARN role + **/ + @com.fasterxml.jackson.annotation.JsonProperty("arnRole") + private String arnRole; + + /** + * AWS ARN role + * @param arnRole the value to set + * @return this builder + **/ + public Builder arnRole(String arnRole) { + this.arnRole = arnRole; + this.__explicitlySet__.add("arnRole"); + return this; + } + /** + * AWS external ID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("externalId") + private String externalId; + + /** + * AWS external ID + * @param externalId the value to set + * @return this builder + **/ + public Builder externalId(String externalId) { + this.externalId = externalId; + this.__explicitlySet__.add("externalId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AwsKeyDetails build() { + AwsKeyDetails model = + new AwsKeyDetails( + this.serviceEndpointUri, this.keyArn, this.arnRole, this.externalId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AwsKeyDetails model) { + if (model.wasPropertyExplicitlySet("serviceEndpointUri")) { + this.serviceEndpointUri(model.getServiceEndpointUri()); + } + if (model.wasPropertyExplicitlySet("keyArn")) { + this.keyArn(model.getKeyArn()); + } + if (model.wasPropertyExplicitlySet("arnRole")) { + this.arnRole(model.getArnRole()); + } + if (model.wasPropertyExplicitlySet("externalId")) { + this.externalId(model.getExternalId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public AwsKeyDetails( + String serviceEndpointUri, String keyArn, String arnRole, String externalId) { + super(); + this.serviceEndpointUri = serviceEndpointUri; + this.keyArn = keyArn; + this.arnRole = arnRole; + this.externalId = externalId; + } + + /** + * AWS key service endpoint URI + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceEndpointUri") + private final String serviceEndpointUri; + + /** + * AWS key service endpoint URI + * @return the value + **/ + public String getServiceEndpointUri() { + return serviceEndpointUri; + } + + /** + * AWS key ARN + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyArn") + private final String keyArn; + + /** + * AWS key ARN + * @return the value + **/ + public String getKeyArn() { + return keyArn; + } + + /** + * AWS ARN role + **/ + @com.fasterxml.jackson.annotation.JsonProperty("arnRole") + private final String arnRole; + + /** + * AWS ARN role + * @return the value + **/ + public String getArnRole() { + return arnRole; + } + + /** + * AWS external ID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("externalId") + private final String externalId; + + /** + * AWS external ID + * @return the value + **/ + public String getExternalId() { + return externalId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AwsKeyDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", serviceEndpointUri=").append(String.valueOf(this.serviceEndpointUri)); + sb.append(", keyArn=").append(String.valueOf(this.keyArn)); + sb.append(", arnRole=").append(String.valueOf(this.arnRole)); + sb.append(", externalId=").append(String.valueOf(this.externalId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AwsKeyDetails)) { + return false; + } + + AwsKeyDetails other = (AwsKeyDetails) o; + return java.util.Objects.equals(this.serviceEndpointUri, other.serviceEndpointUri) + && java.util.Objects.equals(this.keyArn, other.keyArn) + && java.util.Objects.equals(this.arnRole, other.arnRole) + && java.util.Objects.equals(this.externalId, other.externalId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.serviceEndpointUri == null + ? 43 + : this.serviceEndpointUri.hashCode()); + result = (result * PRIME) + (this.keyArn == null ? 43 : this.keyArn.hashCode()); + result = (result * PRIME) + (this.arnRole == null ? 43 : this.arnRole.hashCode()); + result = (result * PRIME) + (this.externalId == null ? 43 : this.externalId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AzureKeyDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AzureKeyDetails.java new file mode 100644 index 00000000000..5b2f51b76ff --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AzureKeyDetails.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details for Azure encryption key. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = AzureKeyDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "provider" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AzureKeyDetails extends AutonomousDatabaseEncryptionKeyDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Azure vault URI + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultUri") + private String vaultUri; + + /** + * Azure vault URI + * @param vaultUri the value to set + * @return this builder + **/ + public Builder vaultUri(String vaultUri) { + this.vaultUri = vaultUri; + this.__explicitlySet__.add("vaultUri"); + return this; + } + /** + * Azure key name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyName") + private String keyName; + + /** + * Azure key name + * @param keyName the value to set + * @return this builder + **/ + public Builder keyName(String keyName) { + this.keyName = keyName; + this.__explicitlySet__.add("keyName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AzureKeyDetails build() { + AzureKeyDetails model = new AzureKeyDetails(this.vaultUri, this.keyName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AzureKeyDetails model) { + if (model.wasPropertyExplicitlySet("vaultUri")) { + this.vaultUri(model.getVaultUri()); + } + if (model.wasPropertyExplicitlySet("keyName")) { + this.keyName(model.getKeyName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public AzureKeyDetails(String vaultUri, String keyName) { + super(); + this.vaultUri = vaultUri; + this.keyName = keyName; + } + + /** + * Azure vault URI + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultUri") + private final String vaultUri; + + /** + * Azure vault URI + * @return the value + **/ + public String getVaultUri() { + return vaultUri; + } + + /** + * Azure key name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyName") + private final String keyName; + + /** + * Azure key name + * @return the value + **/ + public String getKeyName() { + return keyName; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AzureKeyDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", vaultUri=").append(String.valueOf(this.vaultUri)); + sb.append(", keyName=").append(String.valueOf(this.keyName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AzureKeyDetails)) { + return false; + } + + AzureKeyDetails other = (AzureKeyDetails) o; + return java.util.Objects.equals(this.vaultUri, other.vaultUri) + && java.util.Objects.equals(this.keyName, other.keyName) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.vaultUri == null ? 43 : this.vaultUri.hashCode()); + result = (result * PRIME) + (this.keyName == null ? 43 : this.keyName.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CancelExecutionWindowDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CancelExecutionWindowDetails.java new file mode 100644 index 00000000000..b355c2386d1 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CancelExecutionWindowDetails.java @@ -0,0 +1,244 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Describe the parameters to create a new execution window after this execution window is canceled. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CancelExecutionWindowDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CancelExecutionWindowDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "timeScheduledOfNewWindow", + "windowDurationInMinsOfNewWindow", + "isEnforcedDurationOfNewWindow" + }) + public CancelExecutionWindowDetails( + java.util.Date timeScheduledOfNewWindow, + Integer windowDurationInMinsOfNewWindow, + Boolean isEnforcedDurationOfNewWindow) { + super(); + this.timeScheduledOfNewWindow = timeScheduledOfNewWindow; + this.windowDurationInMinsOfNewWindow = windowDurationInMinsOfNewWindow; + this.isEnforcedDurationOfNewWindow = isEnforcedDurationOfNewWindow; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * New scheduled date and time of the execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduledOfNewWindow") + private java.util.Date timeScheduledOfNewWindow; + + /** + * New scheduled date and time of the execution window. + * @param timeScheduledOfNewWindow the value to set + * @return this builder + **/ + public Builder timeScheduledOfNewWindow(java.util.Date timeScheduledOfNewWindow) { + this.timeScheduledOfNewWindow = timeScheduledOfNewWindow; + this.__explicitlySet__.add("timeScheduledOfNewWindow"); + return this; + } + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("windowDurationInMinsOfNewWindow") + private Integer windowDurationInMinsOfNewWindow; + + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + * @param windowDurationInMinsOfNewWindow the value to set + * @return this builder + **/ + public Builder windowDurationInMinsOfNewWindow(Integer windowDurationInMinsOfNewWindow) { + this.windowDurationInMinsOfNewWindow = windowDurationInMinsOfNewWindow; + this.__explicitlySet__.add("windowDurationInMinsOfNewWindow"); + return this; + } + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnforcedDurationOfNewWindow") + private Boolean isEnforcedDurationOfNewWindow; + + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + * @param isEnforcedDurationOfNewWindow the value to set + * @return this builder + **/ + public Builder isEnforcedDurationOfNewWindow(Boolean isEnforcedDurationOfNewWindow) { + this.isEnforcedDurationOfNewWindow = isEnforcedDurationOfNewWindow; + this.__explicitlySet__.add("isEnforcedDurationOfNewWindow"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CancelExecutionWindowDetails build() { + CancelExecutionWindowDetails model = + new CancelExecutionWindowDetails( + this.timeScheduledOfNewWindow, + this.windowDurationInMinsOfNewWindow, + this.isEnforcedDurationOfNewWindow); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CancelExecutionWindowDetails model) { + if (model.wasPropertyExplicitlySet("timeScheduledOfNewWindow")) { + this.timeScheduledOfNewWindow(model.getTimeScheduledOfNewWindow()); + } + if (model.wasPropertyExplicitlySet("windowDurationInMinsOfNewWindow")) { + this.windowDurationInMinsOfNewWindow(model.getWindowDurationInMinsOfNewWindow()); + } + if (model.wasPropertyExplicitlySet("isEnforcedDurationOfNewWindow")) { + this.isEnforcedDurationOfNewWindow(model.getIsEnforcedDurationOfNewWindow()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * New scheduled date and time of the execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduledOfNewWindow") + private final java.util.Date timeScheduledOfNewWindow; + + /** + * New scheduled date and time of the execution window. + * @return the value + **/ + public java.util.Date getTimeScheduledOfNewWindow() { + return timeScheduledOfNewWindow; + } + + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("windowDurationInMinsOfNewWindow") + private final Integer windowDurationInMinsOfNewWindow; + + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + * @return the value + **/ + public Integer getWindowDurationInMinsOfNewWindow() { + return windowDurationInMinsOfNewWindow; + } + + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnforcedDurationOfNewWindow") + private final Boolean isEnforcedDurationOfNewWindow; + + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + * @return the value + **/ + public Boolean getIsEnforcedDurationOfNewWindow() { + return isEnforcedDurationOfNewWindow; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CancelExecutionWindowDetails("); + sb.append("super=").append(super.toString()); + sb.append("timeScheduledOfNewWindow=") + .append(String.valueOf(this.timeScheduledOfNewWindow)); + sb.append(", windowDurationInMinsOfNewWindow=") + .append(String.valueOf(this.windowDurationInMinsOfNewWindow)); + sb.append(", isEnforcedDurationOfNewWindow=") + .append(String.valueOf(this.isEnforcedDurationOfNewWindow)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CancelExecutionWindowDetails)) { + return false; + } + + CancelExecutionWindowDetails other = (CancelExecutionWindowDetails) o; + return java.util.Objects.equals( + this.timeScheduledOfNewWindow, other.timeScheduledOfNewWindow) + && java.util.Objects.equals( + this.windowDurationInMinsOfNewWindow, other.windowDurationInMinsOfNewWindow) + && java.util.Objects.equals( + this.isEnforcedDurationOfNewWindow, other.isEnforcedDurationOfNewWindow) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.timeScheduledOfNewWindow == null + ? 43 + : this.timeScheduledOfNewWindow.hashCode()); + result = + (result * PRIME) + + (this.windowDurationInMinsOfNewWindow == null + ? 43 + : this.windowDurationInMinsOfNewWindow.hashCode()); + result = + (result * PRIME) + + (this.isEnforcedDurationOfNewWindow == null + ? 43 + : this.isEnforcedDurationOfNewWindow.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeAutonomousDatabaseSubscriptionDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeAutonomousDatabaseSubscriptionDetails.java new file mode 100644 index 00000000000..12b1bd6c737 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeAutonomousDatabaseSubscriptionDetails.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * The configuration details for associating the Autonomous Database with a different subscription. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeAutonomousDatabaseSubscriptionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeAutonomousDatabaseSubscriptionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"subscriptionId", "isDefault"}) + public ChangeAutonomousDatabaseSubscriptionDetails(String subscriptionId, Boolean isDefault) { + super(); + this.subscriptionId = subscriptionId; + this.isDefault = isDefault; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @param subscriptionId the value to set + * @return this builder + **/ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } + /** + * Indicates if the subscription is UCM or not. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private Boolean isDefault; + + /** + * Indicates if the subscription is UCM or not. + * + * @param isDefault the value to set + * @return this builder + **/ + public Builder isDefault(Boolean isDefault) { + this.isDefault = isDefault; + this.__explicitlySet__.add("isDefault"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeAutonomousDatabaseSubscriptionDetails build() { + ChangeAutonomousDatabaseSubscriptionDetails model = + new ChangeAutonomousDatabaseSubscriptionDetails( + this.subscriptionId, this.isDefault); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeAutonomousDatabaseSubscriptionDetails model) { + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } + if (model.wasPropertyExplicitlySet("isDefault")) { + this.isDefault(model.getIsDefault()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + + /** + * Indicates if the subscription is UCM or not. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private final Boolean isDefault; + + /** + * Indicates if the subscription is UCM or not. + * + * @return the value + **/ + public Boolean getIsDefault() { + return isDefault; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ChangeAutonomousDatabaseSubscriptionDetails("); + sb.append("super=").append(super.toString()); + sb.append("subscriptionId=").append(String.valueOf(this.subscriptionId)); + sb.append(", isDefault=").append(String.valueOf(this.isDefault)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeAutonomousDatabaseSubscriptionDetails)) { + return false; + } + + ChangeAutonomousDatabaseSubscriptionDetails other = + (ChangeAutonomousDatabaseSubscriptionDetails) o; + return java.util.Objects.equals(this.subscriptionId, other.subscriptionId) + && java.util.Objects.equals(this.isDefault, other.isDefault) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); + result = (result * PRIME) + (this.isDefault == null ? 43 : this.isDefault.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeCloudExadataInfrastructureSubscriptionDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeCloudExadataInfrastructureSubscriptionDetails.java new file mode 100644 index 00000000000..f75822aac26 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeCloudExadataInfrastructureSubscriptionDetails.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * The configuration details for associating the cloud Exadata infrastructure resource with a different subscription. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeCloudExadataInfrastructureSubscriptionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeCloudExadataInfrastructureSubscriptionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"subscriptionId", "isDefault"}) + public ChangeCloudExadataInfrastructureSubscriptionDetails( + String subscriptionId, Boolean isDefault) { + super(); + this.subscriptionId = subscriptionId; + this.isDefault = isDefault; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @param subscriptionId the value to set + * @return this builder + **/ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } + /** + * Indicates if the subscription is UCM or not. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private Boolean isDefault; + + /** + * Indicates if the subscription is UCM or not. + * + * @param isDefault the value to set + * @return this builder + **/ + public Builder isDefault(Boolean isDefault) { + this.isDefault = isDefault; + this.__explicitlySet__.add("isDefault"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeCloudExadataInfrastructureSubscriptionDetails build() { + ChangeCloudExadataInfrastructureSubscriptionDetails model = + new ChangeCloudExadataInfrastructureSubscriptionDetails( + this.subscriptionId, this.isDefault); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeCloudExadataInfrastructureSubscriptionDetails model) { + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } + if (model.wasPropertyExplicitlySet("isDefault")) { + this.isDefault(model.getIsDefault()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + + /** + * Indicates if the subscription is UCM or not. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private final Boolean isDefault; + + /** + * Indicates if the subscription is UCM or not. + * + * @return the value + **/ + public Boolean getIsDefault() { + return isDefault; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ChangeCloudExadataInfrastructureSubscriptionDetails("); + sb.append("super=").append(super.toString()); + sb.append("subscriptionId=").append(String.valueOf(this.subscriptionId)); + sb.append(", isDefault=").append(String.valueOf(this.isDefault)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeCloudExadataInfrastructureSubscriptionDetails)) { + return false; + } + + ChangeCloudExadataInfrastructureSubscriptionDetails other = + (ChangeCloudExadataInfrastructureSubscriptionDetails) o; + return java.util.Objects.equals(this.subscriptionId, other.subscriptionId) + && java.util.Objects.equals(this.isDefault, other.isDefault) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); + result = (result * PRIME) + (this.isDefault == null ? 43 : this.isDefault.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeCloudVmClusterSubscriptionDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeCloudVmClusterSubscriptionDetails.java new file mode 100644 index 00000000000..9a8bf07d135 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeCloudVmClusterSubscriptionDetails.java @@ -0,0 +1,182 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * The configuration details for associating the cloud VM cluster resource with a different subscription. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeCloudVmClusterSubscriptionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeCloudVmClusterSubscriptionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"subscriptionId", "isDefault"}) + public ChangeCloudVmClusterSubscriptionDetails(String subscriptionId, Boolean isDefault) { + super(); + this.subscriptionId = subscriptionId; + this.isDefault = isDefault; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @param subscriptionId the value to set + * @return this builder + **/ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } + /** + * Indicates if the subscription is UCM or not. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private Boolean isDefault; + + /** + * Indicates if the subscription is UCM or not. + * + * @param isDefault the value to set + * @return this builder + **/ + public Builder isDefault(Boolean isDefault) { + this.isDefault = isDefault; + this.__explicitlySet__.add("isDefault"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeCloudVmClusterSubscriptionDetails build() { + ChangeCloudVmClusterSubscriptionDetails model = + new ChangeCloudVmClusterSubscriptionDetails( + this.subscriptionId, this.isDefault); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeCloudVmClusterSubscriptionDetails model) { + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } + if (model.wasPropertyExplicitlySet("isDefault")) { + this.isDefault(model.getIsDefault()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + + /** + * Indicates if the subscription is UCM or not. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private final Boolean isDefault; + + /** + * Indicates if the subscription is UCM or not. + * + * @return the value + **/ + public Boolean getIsDefault() { + return isDefault; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ChangeCloudVmClusterSubscriptionDetails("); + sb.append("super=").append(super.toString()); + sb.append("subscriptionId=").append(String.valueOf(this.subscriptionId)); + sb.append(", isDefault=").append(String.valueOf(this.isDefault)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeCloudVmClusterSubscriptionDetails)) { + return false; + } + + ChangeCloudVmClusterSubscriptionDetails other = (ChangeCloudVmClusterSubscriptionDetails) o; + return java.util.Objects.equals(this.subscriptionId, other.subscriptionId) + && java.util.Objects.equals(this.isDefault, other.isDefault) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); + result = (result * PRIME) + (this.isDefault == null ? 43 : this.isDefault.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeExadbVmClusterCompartmentDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeExadbVmClusterCompartmentDetails.java new file mode 100644 index 00000000000..014b0b4e32d --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeExadbVmClusterCompartmentDetails.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * The configuration details for moving the Exadata VM cluster on Exascale Infrastructure to another compartment. Applies to Exadata Database Service on Exascale Infrastructure only. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeExadbVmClusterCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeExadbVmClusterCompartmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeExadbVmClusterCompartmentDetails(String compartmentId) { + super(); + this.compartmentId = compartmentId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeExadbVmClusterCompartmentDetails build() { + ChangeExadbVmClusterCompartmentDetails model = + new ChangeExadbVmClusterCompartmentDetails(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeExadbVmClusterCompartmentDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ChangeExadbVmClusterCompartmentDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeExadbVmClusterCompartmentDetails)) { + return false; + } + + ChangeExadbVmClusterCompartmentDetails other = (ChangeExadbVmClusterCompartmentDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeExascaleDbStorageVaultCompartmentDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeExascaleDbStorageVaultCompartmentDetails.java new file mode 100644 index 00000000000..00a0723c398 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeExascaleDbStorageVaultCompartmentDetails.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * The configuration details for moving the Exadata Database Storage Vault to another compartment. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeExascaleDbStorageVaultCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeExascaleDbStorageVaultCompartmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeExascaleDbStorageVaultCompartmentDetails(String compartmentId) { + super(); + this.compartmentId = compartmentId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeExascaleDbStorageVaultCompartmentDetails build() { + ChangeExascaleDbStorageVaultCompartmentDetails model = + new ChangeExascaleDbStorageVaultCompartmentDetails(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeExascaleDbStorageVaultCompartmentDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ChangeExascaleDbStorageVaultCompartmentDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeExascaleDbStorageVaultCompartmentDetails)) { + return false; + } + + ChangeExascaleDbStorageVaultCompartmentDetails other = + (ChangeExascaleDbStorageVaultCompartmentDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeSchedulingPlanCompartmentDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeSchedulingPlanCompartmentDetails.java new file mode 100644 index 00000000000..4f5c8a6dbb2 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeSchedulingPlanCompartmentDetails.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * The configuration details for moving the Scheduling Plan. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeSchedulingPlanCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeSchedulingPlanCompartmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeSchedulingPlanCompartmentDetails(String compartmentId) { + super(); + this.compartmentId = compartmentId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeSchedulingPlanCompartmentDetails build() { + ChangeSchedulingPlanCompartmentDetails model = + new ChangeSchedulingPlanCompartmentDetails(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeSchedulingPlanCompartmentDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ChangeSchedulingPlanCompartmentDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeSchedulingPlanCompartmentDetails)) { + return false; + } + + ChangeSchedulingPlanCompartmentDetails other = (ChangeSchedulingPlanCompartmentDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeSchedulingPolicyCompartmentDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeSchedulingPolicyCompartmentDetails.java new file mode 100644 index 00000000000..98eb244064a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeSchedulingPolicyCompartmentDetails.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * The configuration details for moving the Scheduling Policy. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeSchedulingPolicyCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeSchedulingPolicyCompartmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeSchedulingPolicyCompartmentDetails(String compartmentId) { + super(); + this.compartmentId = compartmentId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeSchedulingPolicyCompartmentDetails build() { + ChangeSchedulingPolicyCompartmentDetails model = + new ChangeSchedulingPolicyCompartmentDetails(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeSchedulingPolicyCompartmentDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ChangeSchedulingPolicyCompartmentDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeSchedulingPolicyCompartmentDetails)) { + return false; + } + + ChangeSchedulingPolicyCompartmentDetails other = + (ChangeSchedulingPolicyCompartmentDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeSubscriptionDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeSubscriptionDetails.java new file mode 100644 index 00000000000..015c8596682 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ChangeSubscriptionDetails.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * The configuration details for associating the resource with a different subscription. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeSubscriptionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeSubscriptionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"subscriptionId", "isDefault"}) + public ChangeSubscriptionDetails(String subscriptionId, Boolean isDefault) { + super(); + this.subscriptionId = subscriptionId; + this.isDefault = isDefault; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @param subscriptionId the value to set + * @return this builder + **/ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } + /** + * Indicates if the subscription is UCM or not. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private Boolean isDefault; + + /** + * Indicates if the subscription is UCM or not. + * + * @param isDefault the value to set + * @return this builder + **/ + public Builder isDefault(Boolean isDefault) { + this.isDefault = isDefault; + this.__explicitlySet__.add("isDefault"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeSubscriptionDetails build() { + ChangeSubscriptionDetails model = + new ChangeSubscriptionDetails(this.subscriptionId, this.isDefault); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeSubscriptionDetails model) { + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } + if (model.wasPropertyExplicitlySet("isDefault")) { + this.isDefault(model.getIsDefault()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + + /** + * Indicates if the subscription is UCM or not. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private final Boolean isDefault; + + /** + * Indicates if the subscription is UCM or not. + * + * @return the value + **/ + public Boolean getIsDefault() { + return isDefault; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ChangeSubscriptionDetails("); + sb.append("super=").append(super.toString()); + sb.append("subscriptionId=").append(String.valueOf(this.subscriptionId)); + sb.append(", isDefault=").append(String.valueOf(this.isDefault)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeSubscriptionDetails)) { + return false; + } + + ChangeSubscriptionDetails other = (ChangeSubscriptionDetails) o; + return java.util.Objects.equals(this.subscriptionId, other.subscriptionId) + && java.util.Objects.equals(this.isDefault, other.isDefault) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); + result = (result * PRIME) + (this.isDefault == null ? 43 : this.isDefault.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutomationApplyUpdateTimePreference.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutomationApplyUpdateTimePreference.java new file mode 100644 index 00000000000..bf099ebbaab --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutomationApplyUpdateTimePreference.java @@ -0,0 +1,201 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Configure the time slot for applying VM cloud automation software updates to the cluster. When nothing is selected, the default time slot is 12 AM to 2 AM UTC. Any 2-hour slot is available starting at 12 AM. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CloudAutomationApplyUpdateTimePreference.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CloudAutomationApplyUpdateTimePreference + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "applyUpdatePreferredStartTime", + "applyUpdatePreferredEndTime" + }) + public CloudAutomationApplyUpdateTimePreference( + String applyUpdatePreferredStartTime, String applyUpdatePreferredEndTime) { + super(); + this.applyUpdatePreferredStartTime = applyUpdatePreferredStartTime; + this.applyUpdatePreferredEndTime = applyUpdatePreferredEndTime; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Start time for polling VM cloud automation software updates for the cluster. If the startTime is not specified, 12 AM UTC is used by default. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applyUpdatePreferredStartTime") + private String applyUpdatePreferredStartTime; + + /** + * Start time for polling VM cloud automation software updates for the cluster. If the startTime is not specified, 12 AM UTC is used by default. + * + * @param applyUpdatePreferredStartTime the value to set + * @return this builder + **/ + public Builder applyUpdatePreferredStartTime(String applyUpdatePreferredStartTime) { + this.applyUpdatePreferredStartTime = applyUpdatePreferredStartTime; + this.__explicitlySet__.add("applyUpdatePreferredStartTime"); + return this; + } + /** + * End time for polling VM cloud automation software updates for the cluster. If the endTime is not specified, 2 AM UTC is used by default. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applyUpdatePreferredEndTime") + private String applyUpdatePreferredEndTime; + + /** + * End time for polling VM cloud automation software updates for the cluster. If the endTime is not specified, 2 AM UTC is used by default. + * + * @param applyUpdatePreferredEndTime the value to set + * @return this builder + **/ + public Builder applyUpdatePreferredEndTime(String applyUpdatePreferredEndTime) { + this.applyUpdatePreferredEndTime = applyUpdatePreferredEndTime; + this.__explicitlySet__.add("applyUpdatePreferredEndTime"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CloudAutomationApplyUpdateTimePreference build() { + CloudAutomationApplyUpdateTimePreference model = + new CloudAutomationApplyUpdateTimePreference( + this.applyUpdatePreferredStartTime, this.applyUpdatePreferredEndTime); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CloudAutomationApplyUpdateTimePreference model) { + if (model.wasPropertyExplicitlySet("applyUpdatePreferredStartTime")) { + this.applyUpdatePreferredStartTime(model.getApplyUpdatePreferredStartTime()); + } + if (model.wasPropertyExplicitlySet("applyUpdatePreferredEndTime")) { + this.applyUpdatePreferredEndTime(model.getApplyUpdatePreferredEndTime()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Start time for polling VM cloud automation software updates for the cluster. If the startTime is not specified, 12 AM UTC is used by default. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applyUpdatePreferredStartTime") + private final String applyUpdatePreferredStartTime; + + /** + * Start time for polling VM cloud automation software updates for the cluster. If the startTime is not specified, 12 AM UTC is used by default. + * + * @return the value + **/ + public String getApplyUpdatePreferredStartTime() { + return applyUpdatePreferredStartTime; + } + + /** + * End time for polling VM cloud automation software updates for the cluster. If the endTime is not specified, 2 AM UTC is used by default. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applyUpdatePreferredEndTime") + private final String applyUpdatePreferredEndTime; + + /** + * End time for polling VM cloud automation software updates for the cluster. If the endTime is not specified, 2 AM UTC is used by default. + * + * @return the value + **/ + public String getApplyUpdatePreferredEndTime() { + return applyUpdatePreferredEndTime; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CloudAutomationApplyUpdateTimePreference("); + sb.append("super=").append(super.toString()); + sb.append("applyUpdatePreferredStartTime=") + .append(String.valueOf(this.applyUpdatePreferredStartTime)); + sb.append(", applyUpdatePreferredEndTime=") + .append(String.valueOf(this.applyUpdatePreferredEndTime)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CloudAutomationApplyUpdateTimePreference)) { + return false; + } + + CloudAutomationApplyUpdateTimePreference other = + (CloudAutomationApplyUpdateTimePreference) o; + return java.util.Objects.equals( + this.applyUpdatePreferredStartTime, other.applyUpdatePreferredStartTime) + && java.util.Objects.equals( + this.applyUpdatePreferredEndTime, other.applyUpdatePreferredEndTime) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.applyUpdatePreferredStartTime == null + ? 43 + : this.applyUpdatePreferredStartTime.hashCode()); + result = + (result * PRIME) + + (this.applyUpdatePreferredEndTime == null + ? 43 + : this.applyUpdatePreferredEndTime.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutomationFreezePeriod.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutomationFreezePeriod.java new file mode 100644 index 00000000000..a271e251add --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutomationFreezePeriod.java @@ -0,0 +1,192 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Enables a freeze period for the VM cluster prohibiting the VMs from getting cloud automation software updates during critical business cycles. Freeze period start date. Starts at 12:00 AM UTC on the selected date and ends at 11:59:59 PM UTC on the selected date. Validates to ensure the freeze period does not exceed 45 days. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CloudAutomationFreezePeriod.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CloudAutomationFreezePeriod + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"freezePeriodStartTime", "freezePeriodEndTime"}) + public CloudAutomationFreezePeriod(String freezePeriodStartTime, String freezePeriodEndTime) { + super(); + this.freezePeriodStartTime = freezePeriodStartTime; + this.freezePeriodEndTime = freezePeriodEndTime; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Start time of the freeze period cycle. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freezePeriodStartTime") + private String freezePeriodStartTime; + + /** + * Start time of the freeze period cycle. + * + * @param freezePeriodStartTime the value to set + * @return this builder + **/ + public Builder freezePeriodStartTime(String freezePeriodStartTime) { + this.freezePeriodStartTime = freezePeriodStartTime; + this.__explicitlySet__.add("freezePeriodStartTime"); + return this; + } + /** + * End time of the freeze period cycle. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freezePeriodEndTime") + private String freezePeriodEndTime; + + /** + * End time of the freeze period cycle. + * + * @param freezePeriodEndTime the value to set + * @return this builder + **/ + public Builder freezePeriodEndTime(String freezePeriodEndTime) { + this.freezePeriodEndTime = freezePeriodEndTime; + this.__explicitlySet__.add("freezePeriodEndTime"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CloudAutomationFreezePeriod build() { + CloudAutomationFreezePeriod model = + new CloudAutomationFreezePeriod( + this.freezePeriodStartTime, this.freezePeriodEndTime); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CloudAutomationFreezePeriod model) { + if (model.wasPropertyExplicitlySet("freezePeriodStartTime")) { + this.freezePeriodStartTime(model.getFreezePeriodStartTime()); + } + if (model.wasPropertyExplicitlySet("freezePeriodEndTime")) { + this.freezePeriodEndTime(model.getFreezePeriodEndTime()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Start time of the freeze period cycle. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freezePeriodStartTime") + private final String freezePeriodStartTime; + + /** + * Start time of the freeze period cycle. + * + * @return the value + **/ + public String getFreezePeriodStartTime() { + return freezePeriodStartTime; + } + + /** + * End time of the freeze period cycle. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freezePeriodEndTime") + private final String freezePeriodEndTime; + + /** + * End time of the freeze period cycle. + * + * @return the value + **/ + public String getFreezePeriodEndTime() { + return freezePeriodEndTime; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CloudAutomationFreezePeriod("); + sb.append("super=").append(super.toString()); + sb.append("freezePeriodStartTime=").append(String.valueOf(this.freezePeriodStartTime)); + sb.append(", freezePeriodEndTime=").append(String.valueOf(this.freezePeriodEndTime)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CloudAutomationFreezePeriod)) { + return false; + } + + CloudAutomationFreezePeriod other = (CloudAutomationFreezePeriod) o; + return java.util.Objects.equals(this.freezePeriodStartTime, other.freezePeriodStartTime) + && java.util.Objects.equals(this.freezePeriodEndTime, other.freezePeriodEndTime) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.freezePeriodStartTime == null + ? 43 + : this.freezePeriodStartTime.hashCode()); + result = + (result * PRIME) + + (this.freezePeriodEndTime == null + ? 43 + : this.freezePeriodEndTime.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutomationUpdateDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutomationUpdateDetails.java new file mode 100644 index 00000000000..af7bb47d6fa --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutomationUpdateDetails.java @@ -0,0 +1,257 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Specifies the properties necessary for cloud automation updates. This includes modifying the apply update time preference, enabling or disabling early adoption, and enabling, modifying, or disabling the update freeze period. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CloudAutomationUpdateDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CloudAutomationUpdateDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "isEarlyAdoptionEnabled", + "isFreezePeriodEnabled", + "applyUpdateTimePreference", + "freezePeriod" + }) + public CloudAutomationUpdateDetails( + Boolean isEarlyAdoptionEnabled, + Boolean isFreezePeriodEnabled, + CloudAutomationApplyUpdateTimePreference applyUpdateTimePreference, + CloudAutomationFreezePeriod freezePeriod) { + super(); + this.isEarlyAdoptionEnabled = isEarlyAdoptionEnabled; + this.isFreezePeriodEnabled = isFreezePeriodEnabled; + this.applyUpdateTimePreference = applyUpdateTimePreference; + this.freezePeriod = freezePeriod; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Annotates whether the cluster should be part of early access to apply VM cloud automation software updates. Those clusters annotated as early access will download the software bits for cloud automation in the first week after the update is available, while other clusters will have to wait until the following week. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEarlyAdoptionEnabled") + private Boolean isEarlyAdoptionEnabled; + + /** + * Annotates whether the cluster should be part of early access to apply VM cloud automation software updates. Those clusters annotated as early access will download the software bits for cloud automation in the first week after the update is available, while other clusters will have to wait until the following week. + * + * @param isEarlyAdoptionEnabled the value to set + * @return this builder + **/ + public Builder isEarlyAdoptionEnabled(Boolean isEarlyAdoptionEnabled) { + this.isEarlyAdoptionEnabled = isEarlyAdoptionEnabled; + this.__explicitlySet__.add("isEarlyAdoptionEnabled"); + return this; + } + /** + * Specifies if the freeze period is enabled for the VM cluster to prevent the VMs from receiving cloud automation software updates during critical business cycles. Freeze period starts at 12:00 AM UTC and ends at 11:59:59 PM UTC on the selected date. Ensure that the freezing period does not exceed 45 days. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFreezePeriodEnabled") + private Boolean isFreezePeriodEnabled; + + /** + * Specifies if the freeze period is enabled for the VM cluster to prevent the VMs from receiving cloud automation software updates during critical business cycles. Freeze period starts at 12:00 AM UTC and ends at 11:59:59 PM UTC on the selected date. Ensure that the freezing period does not exceed 45 days. + * + * @param isFreezePeriodEnabled the value to set + * @return this builder + **/ + public Builder isFreezePeriodEnabled(Boolean isFreezePeriodEnabled) { + this.isFreezePeriodEnabled = isFreezePeriodEnabled; + this.__explicitlySet__.add("isFreezePeriodEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("applyUpdateTimePreference") + private CloudAutomationApplyUpdateTimePreference applyUpdateTimePreference; + + public Builder applyUpdateTimePreference( + CloudAutomationApplyUpdateTimePreference applyUpdateTimePreference) { + this.applyUpdateTimePreference = applyUpdateTimePreference; + this.__explicitlySet__.add("applyUpdateTimePreference"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freezePeriod") + private CloudAutomationFreezePeriod freezePeriod; + + public Builder freezePeriod(CloudAutomationFreezePeriod freezePeriod) { + this.freezePeriod = freezePeriod; + this.__explicitlySet__.add("freezePeriod"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CloudAutomationUpdateDetails build() { + CloudAutomationUpdateDetails model = + new CloudAutomationUpdateDetails( + this.isEarlyAdoptionEnabled, + this.isFreezePeriodEnabled, + this.applyUpdateTimePreference, + this.freezePeriod); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CloudAutomationUpdateDetails model) { + if (model.wasPropertyExplicitlySet("isEarlyAdoptionEnabled")) { + this.isEarlyAdoptionEnabled(model.getIsEarlyAdoptionEnabled()); + } + if (model.wasPropertyExplicitlySet("isFreezePeriodEnabled")) { + this.isFreezePeriodEnabled(model.getIsFreezePeriodEnabled()); + } + if (model.wasPropertyExplicitlySet("applyUpdateTimePreference")) { + this.applyUpdateTimePreference(model.getApplyUpdateTimePreference()); + } + if (model.wasPropertyExplicitlySet("freezePeriod")) { + this.freezePeriod(model.getFreezePeriod()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Annotates whether the cluster should be part of early access to apply VM cloud automation software updates. Those clusters annotated as early access will download the software bits for cloud automation in the first week after the update is available, while other clusters will have to wait until the following week. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEarlyAdoptionEnabled") + private final Boolean isEarlyAdoptionEnabled; + + /** + * Annotates whether the cluster should be part of early access to apply VM cloud automation software updates. Those clusters annotated as early access will download the software bits for cloud automation in the first week after the update is available, while other clusters will have to wait until the following week. + * + * @return the value + **/ + public Boolean getIsEarlyAdoptionEnabled() { + return isEarlyAdoptionEnabled; + } + + /** + * Specifies if the freeze period is enabled for the VM cluster to prevent the VMs from receiving cloud automation software updates during critical business cycles. Freeze period starts at 12:00 AM UTC and ends at 11:59:59 PM UTC on the selected date. Ensure that the freezing period does not exceed 45 days. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFreezePeriodEnabled") + private final Boolean isFreezePeriodEnabled; + + /** + * Specifies if the freeze period is enabled for the VM cluster to prevent the VMs from receiving cloud automation software updates during critical business cycles. Freeze period starts at 12:00 AM UTC and ends at 11:59:59 PM UTC on the selected date. Ensure that the freezing period does not exceed 45 days. + * + * @return the value + **/ + public Boolean getIsFreezePeriodEnabled() { + return isFreezePeriodEnabled; + } + + @com.fasterxml.jackson.annotation.JsonProperty("applyUpdateTimePreference") + private final CloudAutomationApplyUpdateTimePreference applyUpdateTimePreference; + + public CloudAutomationApplyUpdateTimePreference getApplyUpdateTimePreference() { + return applyUpdateTimePreference; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freezePeriod") + private final CloudAutomationFreezePeriod freezePeriod; + + public CloudAutomationFreezePeriod getFreezePeriod() { + return freezePeriod; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CloudAutomationUpdateDetails("); + sb.append("super=").append(super.toString()); + sb.append("isEarlyAdoptionEnabled=").append(String.valueOf(this.isEarlyAdoptionEnabled)); + sb.append(", isFreezePeriodEnabled=").append(String.valueOf(this.isFreezePeriodEnabled)); + sb.append(", applyUpdateTimePreference=") + .append(String.valueOf(this.applyUpdateTimePreference)); + sb.append(", freezePeriod=").append(String.valueOf(this.freezePeriod)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CloudAutomationUpdateDetails)) { + return false; + } + + CloudAutomationUpdateDetails other = (CloudAutomationUpdateDetails) o; + return java.util.Objects.equals(this.isEarlyAdoptionEnabled, other.isEarlyAdoptionEnabled) + && java.util.Objects.equals(this.isFreezePeriodEnabled, other.isFreezePeriodEnabled) + && java.util.Objects.equals( + this.applyUpdateTimePreference, other.applyUpdateTimePreference) + && java.util.Objects.equals(this.freezePeriod, other.freezePeriod) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.isEarlyAdoptionEnabled == null + ? 43 + : this.isEarlyAdoptionEnabled.hashCode()); + result = + (result * PRIME) + + (this.isFreezePeriodEnabled == null + ? 43 + : this.isFreezePeriodEnabled.hashCode()); + result = + (result * PRIME) + + (this.applyUpdateTimePreference == null + ? 43 + : this.applyUpdateTimePreference.hashCode()); + result = (result * PRIME) + (this.freezePeriod == null ? 43 : this.freezePeriod.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutonomousVmCluster.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutonomousVmCluster.java index f5a521d6b5f..099c0c21d0f 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutonomousVmCluster.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutonomousVmCluster.java @@ -58,6 +58,7 @@ public final class CloudAutonomousVmCluster "scanListenerPortNonTls", "freeformTags", "definedTags", + "securityAttributes", "timeDatabaseSslCertificateExpires", "timeOrdsCertificateExpires", "availableCpus", @@ -117,6 +118,7 @@ public CloudAutonomousVmCluster( Integer scanListenerPortNonTls, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, java.util.Date timeDatabaseSslCertificateExpires, java.util.Date timeOrdsCertificateExpires, Float availableCpus, @@ -175,6 +177,7 @@ public CloudAutonomousVmCluster( this.scanListenerPortNonTls = scanListenerPortNonTls; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.timeDatabaseSslCertificateExpires = timeDatabaseSslCertificateExpires; this.timeOrdsCertificateExpires = timeOrdsCertificateExpires; this.availableCpus = availableCpus; @@ -793,6 +796,29 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * The date and time of Database SSL certificate expiration. **/ @@ -1215,6 +1241,7 @@ public CloudAutonomousVmCluster build() { this.scanListenerPortNonTls, this.freeformTags, this.definedTags, + this.securityAttributes, this.timeDatabaseSslCertificateExpires, this.timeOrdsCertificateExpires, this.availableCpus, @@ -1348,6 +1375,9 @@ public Builder copy(CloudAutonomousVmCluster model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("timeDatabaseSslCertificateExpires")) { this.timeDatabaseSslCertificateExpires( model.getTimeDatabaseSslCertificateExpires()); @@ -2115,6 +2145,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The date and time of Database SSL certificate expiration. **/ @@ -2491,6 +2541,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", scanListenerPortNonTls=").append(String.valueOf(this.scanListenerPortNonTls)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", timeDatabaseSslCertificateExpires=") .append(String.valueOf(this.timeDatabaseSslCertificateExpires)); sb.append(", timeOrdsCertificateExpires=") @@ -2580,6 +2631,7 @@ public boolean equals(Object o) { this.scanListenerPortNonTls, other.scanListenerPortNonTls) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals( this.timeDatabaseSslCertificateExpires, other.timeDatabaseSslCertificateExpires) @@ -2722,6 +2774,11 @@ public int hashCode() { : this.scanListenerPortNonTls.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.timeDatabaseSslCertificateExpires == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutonomousVmClusterSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutonomousVmClusterSummary.java index 1778e24fb6e..375547ebb6c 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutonomousVmClusterSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutonomousVmClusterSummary.java @@ -58,6 +58,7 @@ public final class CloudAutonomousVmClusterSummary "scanListenerPortNonTls", "freeformTags", "definedTags", + "securityAttributes", "timeDatabaseSslCertificateExpires", "timeOrdsCertificateExpires", "availableCpus", @@ -117,6 +118,7 @@ public CloudAutonomousVmClusterSummary( Integer scanListenerPortNonTls, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, java.util.Date timeDatabaseSslCertificateExpires, java.util.Date timeOrdsCertificateExpires, Float availableCpus, @@ -175,6 +177,7 @@ public CloudAutonomousVmClusterSummary( this.scanListenerPortNonTls = scanListenerPortNonTls; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.timeDatabaseSslCertificateExpires = timeDatabaseSslCertificateExpires; this.timeOrdsCertificateExpires = timeOrdsCertificateExpires; this.availableCpus = availableCpus; @@ -793,6 +796,29 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * The date and time of Database SSL certificate expiration. **/ @@ -1215,6 +1241,7 @@ public CloudAutonomousVmClusterSummary build() { this.scanListenerPortNonTls, this.freeformTags, this.definedTags, + this.securityAttributes, this.timeDatabaseSslCertificateExpires, this.timeOrdsCertificateExpires, this.availableCpus, @@ -1348,6 +1375,9 @@ public Builder copy(CloudAutonomousVmClusterSummary model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("timeDatabaseSslCertificateExpires")) { this.timeDatabaseSslCertificateExpires( model.getTimeDatabaseSslCertificateExpires()); @@ -2115,6 +2145,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The date and time of Database SSL certificate expiration. **/ @@ -2491,6 +2541,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", scanListenerPortNonTls=").append(String.valueOf(this.scanListenerPortNonTls)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", timeDatabaseSslCertificateExpires=") .append(String.valueOf(this.timeDatabaseSslCertificateExpires)); sb.append(", timeOrdsCertificateExpires=") @@ -2580,6 +2631,7 @@ public boolean equals(Object o) { this.scanListenerPortNonTls, other.scanListenerPortNonTls) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals( this.timeDatabaseSslCertificateExpires, other.timeDatabaseSslCertificateExpires) @@ -2722,6 +2774,11 @@ public int hashCode() { : this.scanListenerPortNonTls.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.timeDatabaseSslCertificateExpires == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudExadataInfrastructure.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudExadataInfrastructure.java index 8bbbdc8bfaa..277605c4b51 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudExadataInfrastructure.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudExadataInfrastructure.java @@ -27,6 +27,7 @@ public final class CloudExadataInfrastructure "id", "compartmentId", "clusterPlacementGroupId", + "subscriptionId", "lifecycleState", "displayName", "shape", @@ -58,12 +59,14 @@ public final class CloudExadataInfrastructure "dbServerVersion", "monthlyStorageServerVersion", "monthlyDbServerVersion", - "definedFileSystemConfigurations" + "definedFileSystemConfigurations", + "isSchedulingPolicyAssociated" }) public CloudExadataInfrastructure( String id, String compartmentId, String clusterPlacementGroupId, + String subscriptionId, LifecycleState lifecycleState, String displayName, String shape, @@ -95,11 +98,13 @@ public CloudExadataInfrastructure( String dbServerVersion, String monthlyStorageServerVersion, String monthlyDbServerVersion, - java.util.List definedFileSystemConfigurations) { + java.util.List definedFileSystemConfigurations, + Boolean isSchedulingPolicyAssociated) { super(); this.id = id; this.compartmentId = compartmentId; this.clusterPlacementGroupId = clusterPlacementGroupId; + this.subscriptionId = subscriptionId; this.lifecycleState = lifecycleState; this.displayName = displayName; this.shape = shape; @@ -132,6 +137,7 @@ public CloudExadataInfrastructure( this.monthlyStorageServerVersion = monthlyStorageServerVersion; this.monthlyDbServerVersion = monthlyDbServerVersion; this.definedFileSystemConfigurations = definedFileSystemConfigurations; + this.isSchedulingPolicyAssociated = isSchedulingPolicyAssociated; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -184,6 +190,22 @@ public Builder clusterPlacementGroupId(String clusterPlacementGroupId) { this.__explicitlySet__.add("clusterPlacementGroupId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @param subscriptionId the value to set + * @return this builder + **/ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } /** * The current lifecycle state of the cloud Exadata infrastructure resource. **/ @@ -733,6 +755,22 @@ public Builder definedFileSystemConfigurations( this.__explicitlySet__.add("definedFileSystemConfigurations"); return this; } + /** + * If true, the infrastructure is using granular maintenance scheduling preference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSchedulingPolicyAssociated") + private Boolean isSchedulingPolicyAssociated; + + /** + * If true, the infrastructure is using granular maintenance scheduling preference. + * @param isSchedulingPolicyAssociated the value to set + * @return this builder + **/ + public Builder isSchedulingPolicyAssociated(Boolean isSchedulingPolicyAssociated) { + this.isSchedulingPolicyAssociated = isSchedulingPolicyAssociated; + this.__explicitlySet__.add("isSchedulingPolicyAssociated"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -743,6 +781,7 @@ public CloudExadataInfrastructure build() { this.id, this.compartmentId, this.clusterPlacementGroupId, + this.subscriptionId, this.lifecycleState, this.displayName, this.shape, @@ -774,7 +813,8 @@ public CloudExadataInfrastructure build() { this.dbServerVersion, this.monthlyStorageServerVersion, this.monthlyDbServerVersion, - this.definedFileSystemConfigurations); + this.definedFileSystemConfigurations, + this.isSchedulingPolicyAssociated); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -792,6 +832,9 @@ public Builder copy(CloudExadataInfrastructure model) { if (model.wasPropertyExplicitlySet("clusterPlacementGroupId")) { this.clusterPlacementGroupId(model.getClusterPlacementGroupId()); } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } @@ -888,6 +931,9 @@ public Builder copy(CloudExadataInfrastructure model) { if (model.wasPropertyExplicitlySet("definedFileSystemConfigurations")) { this.definedFileSystemConfigurations(model.getDefinedFileSystemConfigurations()); } + if (model.wasPropertyExplicitlySet("isSchedulingPolicyAssociated")) { + this.isSchedulingPolicyAssociated(model.getIsSchedulingPolicyAssociated()); + } return this; } } @@ -945,6 +991,20 @@ public String getClusterPlacementGroupId() { return clusterPlacementGroupId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + /** * The current lifecycle state of the cloud Exadata infrastructure resource. **/ @@ -1481,6 +1541,20 @@ public java.util.List getDefinedFileSystemConfig return definedFileSystemConfigurations; } + /** + * If true, the infrastructure is using granular maintenance scheduling preference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSchedulingPolicyAssociated") + private final Boolean isSchedulingPolicyAssociated; + + /** + * If true, the infrastructure is using granular maintenance scheduling preference. + * @return the value + **/ + public Boolean getIsSchedulingPolicyAssociated() { + return isSchedulingPolicyAssociated; + } + @Override public String toString() { return this.toString(true); @@ -1499,6 +1573,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", clusterPlacementGroupId=") .append(String.valueOf(this.clusterPlacementGroupId)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", shape=").append(String.valueOf(this.shape)); @@ -1534,6 +1609,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", monthlyDbServerVersion=").append(String.valueOf(this.monthlyDbServerVersion)); sb.append(", definedFileSystemConfigurations=") .append(String.valueOf(this.definedFileSystemConfigurations)); + sb.append(", isSchedulingPolicyAssociated=") + .append(String.valueOf(this.isSchedulingPolicyAssociated)); sb.append(")"); return sb.toString(); } @@ -1552,6 +1629,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals( this.clusterPlacementGroupId, other.clusterPlacementGroupId) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.shape, other.shape) @@ -1590,6 +1668,8 @@ public boolean equals(Object o) { this.monthlyDbServerVersion, other.monthlyDbServerVersion) && java.util.Objects.equals( this.definedFileSystemConfigurations, other.definedFileSystemConfigurations) + && java.util.Objects.equals( + this.isSchedulingPolicyAssociated, other.isSchedulingPolicyAssociated) && super.equals(other); } @@ -1606,6 +1686,9 @@ public int hashCode() { + (this.clusterPlacementGroupId == null ? 43 : this.clusterPlacementGroupId.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); @@ -1712,6 +1795,11 @@ public int hashCode() { + (this.definedFileSystemConfigurations == null ? 43 : this.definedFileSystemConfigurations.hashCode()); + result = + (result * PRIME) + + (this.isSchedulingPolicyAssociated == null + ? 43 + : this.isSchedulingPolicyAssociated.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudExadataInfrastructureSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudExadataInfrastructureSummary.java index 43a47c3a46d..bfe83c6a8a4 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudExadataInfrastructureSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudExadataInfrastructureSummary.java @@ -27,6 +27,7 @@ public final class CloudExadataInfrastructureSummary "id", "compartmentId", "clusterPlacementGroupId", + "subscriptionId", "lifecycleState", "displayName", "shape", @@ -58,12 +59,14 @@ public final class CloudExadataInfrastructureSummary "dbServerVersion", "monthlyStorageServerVersion", "monthlyDbServerVersion", - "definedFileSystemConfigurations" + "definedFileSystemConfigurations", + "isSchedulingPolicyAssociated" }) public CloudExadataInfrastructureSummary( String id, String compartmentId, String clusterPlacementGroupId, + String subscriptionId, LifecycleState lifecycleState, String displayName, String shape, @@ -95,11 +98,13 @@ public CloudExadataInfrastructureSummary( String dbServerVersion, String monthlyStorageServerVersion, String monthlyDbServerVersion, - java.util.List definedFileSystemConfigurations) { + java.util.List definedFileSystemConfigurations, + Boolean isSchedulingPolicyAssociated) { super(); this.id = id; this.compartmentId = compartmentId; this.clusterPlacementGroupId = clusterPlacementGroupId; + this.subscriptionId = subscriptionId; this.lifecycleState = lifecycleState; this.displayName = displayName; this.shape = shape; @@ -132,6 +137,7 @@ public CloudExadataInfrastructureSummary( this.monthlyStorageServerVersion = monthlyStorageServerVersion; this.monthlyDbServerVersion = monthlyDbServerVersion; this.definedFileSystemConfigurations = definedFileSystemConfigurations; + this.isSchedulingPolicyAssociated = isSchedulingPolicyAssociated; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -184,6 +190,22 @@ public Builder clusterPlacementGroupId(String clusterPlacementGroupId) { this.__explicitlySet__.add("clusterPlacementGroupId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @param subscriptionId the value to set + * @return this builder + **/ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } /** * The current lifecycle state of the cloud Exadata infrastructure resource. **/ @@ -733,6 +755,22 @@ public Builder definedFileSystemConfigurations( this.__explicitlySet__.add("definedFileSystemConfigurations"); return this; } + /** + * If true, the infrastructure is using granular maintenance scheduling preference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSchedulingPolicyAssociated") + private Boolean isSchedulingPolicyAssociated; + + /** + * If true, the infrastructure is using granular maintenance scheduling preference. + * @param isSchedulingPolicyAssociated the value to set + * @return this builder + **/ + public Builder isSchedulingPolicyAssociated(Boolean isSchedulingPolicyAssociated) { + this.isSchedulingPolicyAssociated = isSchedulingPolicyAssociated; + this.__explicitlySet__.add("isSchedulingPolicyAssociated"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -743,6 +781,7 @@ public CloudExadataInfrastructureSummary build() { this.id, this.compartmentId, this.clusterPlacementGroupId, + this.subscriptionId, this.lifecycleState, this.displayName, this.shape, @@ -774,7 +813,8 @@ public CloudExadataInfrastructureSummary build() { this.dbServerVersion, this.monthlyStorageServerVersion, this.monthlyDbServerVersion, - this.definedFileSystemConfigurations); + this.definedFileSystemConfigurations, + this.isSchedulingPolicyAssociated); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -792,6 +832,9 @@ public Builder copy(CloudExadataInfrastructureSummary model) { if (model.wasPropertyExplicitlySet("clusterPlacementGroupId")) { this.clusterPlacementGroupId(model.getClusterPlacementGroupId()); } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } @@ -888,6 +931,9 @@ public Builder copy(CloudExadataInfrastructureSummary model) { if (model.wasPropertyExplicitlySet("definedFileSystemConfigurations")) { this.definedFileSystemConfigurations(model.getDefinedFileSystemConfigurations()); } + if (model.wasPropertyExplicitlySet("isSchedulingPolicyAssociated")) { + this.isSchedulingPolicyAssociated(model.getIsSchedulingPolicyAssociated()); + } return this; } } @@ -945,6 +991,20 @@ public String getClusterPlacementGroupId() { return clusterPlacementGroupId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + /** * The current lifecycle state of the cloud Exadata infrastructure resource. **/ @@ -1481,6 +1541,20 @@ public java.util.List getDefinedFileSystemConfig return definedFileSystemConfigurations; } + /** + * If true, the infrastructure is using granular maintenance scheduling preference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSchedulingPolicyAssociated") + private final Boolean isSchedulingPolicyAssociated; + + /** + * If true, the infrastructure is using granular maintenance scheduling preference. + * @return the value + **/ + public Boolean getIsSchedulingPolicyAssociated() { + return isSchedulingPolicyAssociated; + } + @Override public String toString() { return this.toString(true); @@ -1499,6 +1573,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", clusterPlacementGroupId=") .append(String.valueOf(this.clusterPlacementGroupId)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", shape=").append(String.valueOf(this.shape)); @@ -1534,6 +1609,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", monthlyDbServerVersion=").append(String.valueOf(this.monthlyDbServerVersion)); sb.append(", definedFileSystemConfigurations=") .append(String.valueOf(this.definedFileSystemConfigurations)); + sb.append(", isSchedulingPolicyAssociated=") + .append(String.valueOf(this.isSchedulingPolicyAssociated)); sb.append(")"); return sb.toString(); } @@ -1552,6 +1629,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals( this.clusterPlacementGroupId, other.clusterPlacementGroupId) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.shape, other.shape) @@ -1590,6 +1668,8 @@ public boolean equals(Object o) { this.monthlyDbServerVersion, other.monthlyDbServerVersion) && java.util.Objects.equals( this.definedFileSystemConfigurations, other.definedFileSystemConfigurations) + && java.util.Objects.equals( + this.isSchedulingPolicyAssociated, other.isSchedulingPolicyAssociated) && super.equals(other); } @@ -1606,6 +1686,9 @@ public int hashCode() { + (this.clusterPlacementGroupId == null ? 43 : this.clusterPlacementGroupId.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); @@ -1712,6 +1795,11 @@ public int hashCode() { + (this.definedFileSystemConfigurations == null ? 43 : this.definedFileSystemConfigurations.hashCode()); + result = + (result * PRIME) + + (this.isSchedulingPolicyAssociated == null + ? 43 + : this.isSchedulingPolicyAssociated.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmCluster.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmCluster.java index dee5c31b6e1..57ac273e774 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmCluster.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmCluster.java @@ -24,6 +24,7 @@ public final class CloudVmCluster extends com.oracle.bmc.http.internal.Explicitl "iormConfigCache", "id", "compartmentId", + "subscriptionId", "availabilityDomain", "subnetId", "backupSubnetId", @@ -62,6 +63,7 @@ public final class CloudVmCluster extends com.oracle.bmc.http.internal.Explicitl "scanDnsRecordId", "freeformTags", "definedTags", + "securityAttributes", "systemTags", "scanDnsName", "zoneId", @@ -69,12 +71,14 @@ public final class CloudVmCluster extends com.oracle.bmc.http.internal.Explicitl "scanListenerPortTcpSsl", "dataCollectionOptions", "giSoftwareImageId", - "fileSystemConfigurationDetails" + "fileSystemConfigurationDetails", + "cloudAutomationUpdateDetails" }) public CloudVmCluster( ExadataIormConfig iormConfigCache, String id, String compartmentId, + String subscriptionId, String availabilityDomain, String subnetId, String backupSubnetId, @@ -113,6 +117,7 @@ public CloudVmCluster( String scanDnsRecordId, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, java.util.Map> systemTags, String scanDnsName, String zoneId, @@ -120,11 +125,13 @@ public CloudVmCluster( Integer scanListenerPortTcpSsl, DataCollectionOptions dataCollectionOptions, String giSoftwareImageId, - java.util.List fileSystemConfigurationDetails) { + java.util.List fileSystemConfigurationDetails, + CloudAutomationUpdateDetails cloudAutomationUpdateDetails) { super(); this.iormConfigCache = iormConfigCache; this.id = id; this.compartmentId = compartmentId; + this.subscriptionId = subscriptionId; this.availabilityDomain = availabilityDomain; this.subnetId = subnetId; this.backupSubnetId = backupSubnetId; @@ -163,6 +170,7 @@ public CloudVmCluster( this.scanDnsRecordId = scanDnsRecordId; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.systemTags = systemTags; this.scanDnsName = scanDnsName; this.zoneId = zoneId; @@ -171,6 +179,7 @@ public CloudVmCluster( this.dataCollectionOptions = dataCollectionOptions; this.giSoftwareImageId = giSoftwareImageId; this.fileSystemConfigurationDetails = fileSystemConfigurationDetails; + this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -216,6 +225,22 @@ public Builder compartmentId(String compartmentId) { this.__explicitlySet__.add("compartmentId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @param subscriptionId the value to set + * @return this builder + **/ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } /** * The name of the availability domain that the cloud Exadata infrastructure resource is located in. **/ @@ -911,6 +936,29 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * System tags for this resource. Each key is predefined and scoped to a namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -1042,6 +1090,16 @@ public Builder fileSystemConfigurationDetails( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") + private CloudAutomationUpdateDetails cloudAutomationUpdateDetails; + + public Builder cloudAutomationUpdateDetails( + CloudAutomationUpdateDetails cloudAutomationUpdateDetails) { + this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; + this.__explicitlySet__.add("cloudAutomationUpdateDetails"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -1051,6 +1109,7 @@ public CloudVmCluster build() { this.iormConfigCache, this.id, this.compartmentId, + this.subscriptionId, this.availabilityDomain, this.subnetId, this.backupSubnetId, @@ -1089,6 +1148,7 @@ public CloudVmCluster build() { this.scanDnsRecordId, this.freeformTags, this.definedTags, + this.securityAttributes, this.systemTags, this.scanDnsName, this.zoneId, @@ -1096,7 +1156,8 @@ public CloudVmCluster build() { this.scanListenerPortTcpSsl, this.dataCollectionOptions, this.giSoftwareImageId, - this.fileSystemConfigurationDetails); + this.fileSystemConfigurationDetails, + this.cloudAutomationUpdateDetails); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -1114,6 +1175,9 @@ public Builder copy(CloudVmCluster model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } if (model.wasPropertyExplicitlySet("availabilityDomain")) { this.availabilityDomain(model.getAvailabilityDomain()); } @@ -1228,6 +1292,9 @@ public Builder copy(CloudVmCluster model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("systemTags")) { this.systemTags(model.getSystemTags()); } @@ -1252,6 +1319,9 @@ public Builder copy(CloudVmCluster model) { if (model.wasPropertyExplicitlySet("fileSystemConfigurationDetails")) { this.fileSystemConfigurationDetails(model.getFileSystemConfigurationDetails()); } + if (model.wasPropertyExplicitlySet("cloudAutomationUpdateDetails")) { + this.cloudAutomationUpdateDetails(model.getCloudAutomationUpdateDetails()); + } return this; } } @@ -1302,6 +1372,20 @@ public String getCompartmentId() { return compartmentId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + /** * The name of the availability domain that the cloud Exadata infrastructure resource is located in. **/ @@ -2073,6 +2157,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * System tags for this resource. Each key is predefined and scoped to a namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -2186,6 +2290,13 @@ public java.util.List getFileSystemConfigurationD return fileSystemConfigurationDetails; } + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") + private final CloudAutomationUpdateDetails cloudAutomationUpdateDetails; + + public CloudAutomationUpdateDetails getCloudAutomationUpdateDetails() { + return cloudAutomationUpdateDetails; + } + @Override public String toString() { return this.toString(true); @@ -2203,6 +2314,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("iormConfigCache=").append(String.valueOf(this.iormConfigCache)); sb.append(", id=").append(String.valueOf(this.id)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); sb.append(", subnetId=").append(String.valueOf(this.subnetId)); sb.append(", backupSubnetId=").append(String.valueOf(this.backupSubnetId)); @@ -2244,6 +2356,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", scanDnsRecordId=").append(String.valueOf(this.scanDnsRecordId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", scanDnsName=").append(String.valueOf(this.scanDnsName)); sb.append(", zoneId=").append(String.valueOf(this.zoneId)); @@ -2253,6 +2366,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", giSoftwareImageId=").append(String.valueOf(this.giSoftwareImageId)); sb.append(", fileSystemConfigurationDetails=") .append(String.valueOf(this.fileSystemConfigurationDetails)); + sb.append(", cloudAutomationUpdateDetails=") + .append(String.valueOf(this.cloudAutomationUpdateDetails)); sb.append(")"); return sb.toString(); } @@ -2270,6 +2385,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.iormConfigCache, other.iormConfigCache) && java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) && java.util.Objects.equals(this.subnetId, other.subnetId) && java.util.Objects.equals(this.backupSubnetId, other.backupSubnetId) @@ -2312,6 +2428,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.scanDnsRecordId, other.scanDnsRecordId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.scanDnsName, other.scanDnsName) && java.util.Objects.equals(this.zoneId, other.zoneId) @@ -2322,6 +2439,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.giSoftwareImageId, other.giSoftwareImageId) && java.util.Objects.equals( this.fileSystemConfigurationDetails, other.fileSystemConfigurationDetails) + && java.util.Objects.equals( + this.cloudAutomationUpdateDetails, other.cloudAutomationUpdateDetails) && super.equals(other); } @@ -2336,6 +2455,9 @@ public int hashCode() { result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); result = (result * PRIME) + (this.availabilityDomain == null @@ -2428,6 +2550,11 @@ public int hashCode() { + (this.scanDnsRecordId == null ? 43 : this.scanDnsRecordId.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.scanDnsName == null ? 43 : this.scanDnsName.hashCode()); result = (result * PRIME) + (this.zoneId == null ? 43 : this.zoneId.hashCode()); @@ -2454,6 +2581,11 @@ public int hashCode() { + (this.fileSystemConfigurationDetails == null ? 43 : this.fileSystemConfigurationDetails.hashCode()); + result = + (result * PRIME) + + (this.cloudAutomationUpdateDetails == null + ? 43 + : this.cloudAutomationUpdateDetails.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmClusterSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmClusterSummary.java index e53e63d92b9..979c1ae0f84 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmClusterSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmClusterSummary.java @@ -26,6 +26,7 @@ public final class CloudVmClusterSummary @java.beans.ConstructorProperties({ "id", "compartmentId", + "subscriptionId", "availabilityDomain", "subnetId", "backupSubnetId", @@ -64,6 +65,7 @@ public final class CloudVmClusterSummary "scanDnsRecordId", "freeformTags", "definedTags", + "securityAttributes", "systemTags", "scanDnsName", "zoneId", @@ -71,11 +73,13 @@ public final class CloudVmClusterSummary "scanListenerPortTcpSsl", "dataCollectionOptions", "giSoftwareImageId", - "fileSystemConfigurationDetails" + "fileSystemConfigurationDetails", + "cloudAutomationUpdateDetails" }) public CloudVmClusterSummary( String id, String compartmentId, + String subscriptionId, String availabilityDomain, String subnetId, String backupSubnetId, @@ -114,6 +118,7 @@ public CloudVmClusterSummary( String scanDnsRecordId, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, java.util.Map> systemTags, String scanDnsName, String zoneId, @@ -121,10 +126,12 @@ public CloudVmClusterSummary( Integer scanListenerPortTcpSsl, DataCollectionOptions dataCollectionOptions, String giSoftwareImageId, - java.util.List fileSystemConfigurationDetails) { + java.util.List fileSystemConfigurationDetails, + CloudAutomationUpdateDetails cloudAutomationUpdateDetails) { super(); this.id = id; this.compartmentId = compartmentId; + this.subscriptionId = subscriptionId; this.availabilityDomain = availabilityDomain; this.subnetId = subnetId; this.backupSubnetId = backupSubnetId; @@ -163,6 +170,7 @@ public CloudVmClusterSummary( this.scanDnsRecordId = scanDnsRecordId; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.systemTags = systemTags; this.scanDnsName = scanDnsName; this.zoneId = zoneId; @@ -171,6 +179,7 @@ public CloudVmClusterSummary( this.dataCollectionOptions = dataCollectionOptions; this.giSoftwareImageId = giSoftwareImageId; this.fileSystemConfigurationDetails = fileSystemConfigurationDetails; + this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -207,6 +216,22 @@ public Builder compartmentId(String compartmentId) { this.__explicitlySet__.add("compartmentId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @param subscriptionId the value to set + * @return this builder + **/ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } /** * The name of the availability domain that the cloud Exadata infrastructure resource is located in. **/ @@ -902,6 +927,29 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * System tags for this resource. Each key is predefined and scoped to a namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -1033,6 +1081,16 @@ public Builder fileSystemConfigurationDetails( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") + private CloudAutomationUpdateDetails cloudAutomationUpdateDetails; + + public Builder cloudAutomationUpdateDetails( + CloudAutomationUpdateDetails cloudAutomationUpdateDetails) { + this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; + this.__explicitlySet__.add("cloudAutomationUpdateDetails"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -1041,6 +1099,7 @@ public CloudVmClusterSummary build() { new CloudVmClusterSummary( this.id, this.compartmentId, + this.subscriptionId, this.availabilityDomain, this.subnetId, this.backupSubnetId, @@ -1079,6 +1138,7 @@ public CloudVmClusterSummary build() { this.scanDnsRecordId, this.freeformTags, this.definedTags, + this.securityAttributes, this.systemTags, this.scanDnsName, this.zoneId, @@ -1086,7 +1146,8 @@ public CloudVmClusterSummary build() { this.scanListenerPortTcpSsl, this.dataCollectionOptions, this.giSoftwareImageId, - this.fileSystemConfigurationDetails); + this.fileSystemConfigurationDetails, + this.cloudAutomationUpdateDetails); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -1101,6 +1162,9 @@ public Builder copy(CloudVmClusterSummary model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } if (model.wasPropertyExplicitlySet("availabilityDomain")) { this.availabilityDomain(model.getAvailabilityDomain()); } @@ -1215,6 +1279,9 @@ public Builder copy(CloudVmClusterSummary model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("systemTags")) { this.systemTags(model.getSystemTags()); } @@ -1239,6 +1306,9 @@ public Builder copy(CloudVmClusterSummary model) { if (model.wasPropertyExplicitlySet("fileSystemConfigurationDetails")) { this.fileSystemConfigurationDetails(model.getFileSystemConfigurationDetails()); } + if (model.wasPropertyExplicitlySet("cloudAutomationUpdateDetails")) { + this.cloudAutomationUpdateDetails(model.getCloudAutomationUpdateDetails()); + } return this; } } @@ -1282,6 +1352,20 @@ public String getCompartmentId() { return compartmentId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + /** * The name of the availability domain that the cloud Exadata infrastructure resource is located in. **/ @@ -2053,6 +2137,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * System tags for this resource. Each key is predefined and scoped to a namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -2166,6 +2270,13 @@ public java.util.List getFileSystemConfigurationD return fileSystemConfigurationDetails; } + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") + private final CloudAutomationUpdateDetails cloudAutomationUpdateDetails; + + public CloudAutomationUpdateDetails getCloudAutomationUpdateDetails() { + return cloudAutomationUpdateDetails; + } + @Override public String toString() { return this.toString(true); @@ -2182,6 +2293,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("id=").append(String.valueOf(this.id)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); sb.append(", subnetId=").append(String.valueOf(this.subnetId)); sb.append(", backupSubnetId=").append(String.valueOf(this.backupSubnetId)); @@ -2223,6 +2335,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", scanDnsRecordId=").append(String.valueOf(this.scanDnsRecordId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", scanDnsName=").append(String.valueOf(this.scanDnsName)); sb.append(", zoneId=").append(String.valueOf(this.zoneId)); @@ -2232,6 +2345,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", giSoftwareImageId=").append(String.valueOf(this.giSoftwareImageId)); sb.append(", fileSystemConfigurationDetails=") .append(String.valueOf(this.fileSystemConfigurationDetails)); + sb.append(", cloudAutomationUpdateDetails=") + .append(String.valueOf(this.cloudAutomationUpdateDetails)); sb.append(")"); return sb.toString(); } @@ -2248,6 +2363,7 @@ public boolean equals(Object o) { CloudVmClusterSummary other = (CloudVmClusterSummary) o; return java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) && java.util.Objects.equals(this.subnetId, other.subnetId) && java.util.Objects.equals(this.backupSubnetId, other.backupSubnetId) @@ -2290,6 +2406,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.scanDnsRecordId, other.scanDnsRecordId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.scanDnsName, other.scanDnsName) && java.util.Objects.equals(this.zoneId, other.zoneId) @@ -2300,6 +2417,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.giSoftwareImageId, other.giSoftwareImageId) && java.util.Objects.equals( this.fileSystemConfigurationDetails, other.fileSystemConfigurationDetails) + && java.util.Objects.equals( + this.cloudAutomationUpdateDetails, other.cloudAutomationUpdateDetails) && super.equals(other); } @@ -2311,6 +2430,9 @@ public int hashCode() { result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); result = (result * PRIME) + (this.availabilityDomain == null @@ -2403,6 +2525,11 @@ public int hashCode() { + (this.scanDnsRecordId == null ? 43 : this.scanDnsRecordId.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.scanDnsName == null ? 43 : this.scanDnsName.hashCode()); result = (result * PRIME) + (this.zoneId == null ? 43 : this.zoneId.hashCode()); @@ -2429,6 +2556,11 @@ public int hashCode() { + (this.fileSystemConfigurationDetails == null ? 43 : this.fileSystemConfigurationDetails.hashCode()); + result = + (result * PRIME) + + (this.cloudAutomationUpdateDetails == null + ? 43 + : this.cloudAutomationUpdateDetails.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ConfigureExascaleExadataInfrastructureDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ConfigureExascaleExadataInfrastructureDetails.java new file mode 100644 index 00000000000..a0efe760e5e --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ConfigureExascaleExadataInfrastructureDetails.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * The exascale config request details for the Exadata Cloud@Customer infrastructure. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ConfigureExascaleExadataInfrastructureDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ConfigureExascaleExadataInfrastructureDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"totalStorageInGBs"}) + public ConfigureExascaleExadataInfrastructureDetails(Integer totalStorageInGBs) { + super(); + this.totalStorageInGBs = totalStorageInGBs; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Storage size needed for Exascale in GBs. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalStorageInGBs") + private Integer totalStorageInGBs; + + /** + * Storage size needed for Exascale in GBs. + * @param totalStorageInGBs the value to set + * @return this builder + **/ + public Builder totalStorageInGBs(Integer totalStorageInGBs) { + this.totalStorageInGBs = totalStorageInGBs; + this.__explicitlySet__.add("totalStorageInGBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ConfigureExascaleExadataInfrastructureDetails build() { + ConfigureExascaleExadataInfrastructureDetails model = + new ConfigureExascaleExadataInfrastructureDetails(this.totalStorageInGBs); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ConfigureExascaleExadataInfrastructureDetails model) { + if (model.wasPropertyExplicitlySet("totalStorageInGBs")) { + this.totalStorageInGBs(model.getTotalStorageInGBs()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Storage size needed for Exascale in GBs. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalStorageInGBs") + private final Integer totalStorageInGBs; + + /** + * Storage size needed for Exascale in GBs. + * @return the value + **/ + public Integer getTotalStorageInGBs() { + return totalStorageInGBs; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ConfigureExascaleExadataInfrastructureDetails("); + sb.append("super=").append(super.toString()); + sb.append("totalStorageInGBs=").append(String.valueOf(this.totalStorageInGBs)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfigureExascaleExadataInfrastructureDetails)) { + return false; + } + + ConfigureExascaleExadataInfrastructureDetails other = + (ConfigureExascaleExadataInfrastructureDetails) o; + return java.util.Objects.equals(this.totalStorageInGBs, other.totalStorageInGBs) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.totalStorageInGBs == null ? 43 : this.totalStorageInGBs.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseBase.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseBase.java index d53e10d2dc0..3c270fd0c6f 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseBase.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseBase.java @@ -6,13 +6,13 @@ /** * Details to create an Oracle Autonomous Database. - *

- **Notes:** + * + * **Notes:** * - To specify OCPU core count, you must use either {@code ocpuCount} or {@code cpuCoreCount}. You cannot use both parameters at the same time. For Autonomous Database Serverless instances, {@code ocpuCount} is not used. * - To specify a storage allocation, you must use either {@code dataStorageSizeInGBs} or {@code dataStorageSizeInTBs}. * - See the individual parameter discriptions for more information on the OCPU and storage value parameters. - *

- **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API. + * + * **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -30,6 +30,10 @@ defaultImpl = CreateAutonomousDatabaseBase.class ) @com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = UndeleteAutonomousDatabaseDetails.class, + name = "UNDELETE_ADB" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = CreateAutonomousDatabaseCloneDetails.class, name = "DATABASE" @@ -46,14 +50,14 @@ value = CreateCrossRegionDisasterRecoveryDetails.class, name = "CROSS_REGION_DISASTER_RECOVERY" ), - @com.fasterxml.jackson.annotation.JsonSubTypes.Type( - value = CreateCrossTenancyDisasterRecoveryDetails.class, - name = "CROSS_TENANCY_DISASTER_RECOVERY" - ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = CreateAutonomousDatabaseFromBackupTimestampDetails.class, name = "BACKUP_FROM_TIMESTAMP" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateCrossTenancyDisasterRecoveryDetails.class, + name = "CROSS_TENANCY_DISASTER_RECOVERY" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = CreateCrossRegionAutonomousDatabaseDataGuardDetails.class, name = "CROSS_REGION_DATAGUARD" @@ -68,6 +72,7 @@ public class CreateAutonomousDatabaseBase extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated @java.beans.ConstructorProperties({ + "subscriptionId", "compartmentId", "characterSet", "ncharacterSet", @@ -83,9 +88,11 @@ public class CreateAutonomousDatabaseBase "isFreeTier", "kmsKeyId", "vaultId", + "encryptionKey", "adminPassword", "displayName", "licenseModel", + "byolComputeCountLimit", "isPreviewVersionWithServiceTermsAccepted", "isAutoScalingEnabled", "isDevTier", @@ -103,6 +110,7 @@ public class CreateAutonomousDatabaseBase "privateEndpointLabel", "freeformTags", "definedTags", + "securityAttributes", "privateEndpointIp", "dbVersion", "customerContacts", @@ -118,6 +126,7 @@ public class CreateAutonomousDatabaseBase "secretVersionNumber" }) protected CreateAutonomousDatabaseBase( + String subscriptionId, String compartmentId, String characterSet, String ncharacterSet, @@ -133,9 +142,11 @@ protected CreateAutonomousDatabaseBase( Boolean isFreeTier, String kmsKeyId, String vaultId, + AutonomousDatabaseEncryptionKeyDetails encryptionKey, String adminPassword, String displayName, LicenseModel licenseModel, + Float byolComputeCountLimit, Boolean isPreviewVersionWithServiceTermsAccepted, Boolean isAutoScalingEnabled, Boolean isDevTier, @@ -153,6 +164,7 @@ protected CreateAutonomousDatabaseBase( String privateEndpointLabel, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateEndpointIp, String dbVersion, java.util.List customerContacts, @@ -167,6 +179,7 @@ protected CreateAutonomousDatabaseBase( String secretId, Integer secretVersionNumber) { super(); + this.subscriptionId = subscriptionId; this.compartmentId = compartmentId; this.characterSet = characterSet; this.ncharacterSet = ncharacterSet; @@ -182,9 +195,11 @@ protected CreateAutonomousDatabaseBase( this.isFreeTier = isFreeTier; this.kmsKeyId = kmsKeyId; this.vaultId = vaultId; + this.encryptionKey = encryptionKey; this.adminPassword = adminPassword; this.displayName = displayName; this.licenseModel = licenseModel; + this.byolComputeCountLimit = byolComputeCountLimit; this.isPreviewVersionWithServiceTermsAccepted = isPreviewVersionWithServiceTermsAccepted; this.isAutoScalingEnabled = isAutoScalingEnabled; this.isDevTier = isDevTier; @@ -202,6 +217,7 @@ protected CreateAutonomousDatabaseBase( this.privateEndpointLabel = privateEndpointLabel; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.privateEndpointIp = privateEndpointIp; this.dbVersion = dbVersion; this.customerContacts = customerContacts; @@ -217,6 +233,20 @@ protected CreateAutonomousDatabaseBase( this.secretVersionNumber = secretVersionNumber; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment of the Autonomous Database. **/ @@ -374,7 +404,7 @@ public ComputeModel getComputeModel() { /** * The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. - * For an Autonomous Database Serverless instance, the 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. + * The 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. * **/ @com.fasterxml.jackson.annotation.JsonProperty("computeCount") @@ -382,7 +412,7 @@ public ComputeModel getComputeModel() { /** * The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. - * For an Autonomous Database Serverless instance, the 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. + * The 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. * * @return the value **/ @@ -593,6 +623,13 @@ public String getVaultId() { return vaultId; } + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKey") + private final AutonomousDatabaseEncryptionKeyDetails encryptionKey; + + public AutonomousDatabaseEncryptionKeyDetails getEncryptionKey() { + return encryptionKey; + } + /** * **Important** The {@code adminPassword} or {@code secretId} must be specified for all Autonomous Databases except for refreshable clones. The password must be between 12 and 30 characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin", regardless of casing. *

@@ -694,6 +731,20 @@ public LicenseModel getLicenseModel() { return licenseModel; } + /** + * The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("byolComputeCountLimit") + private final Float byolComputeCountLimit; + + /** + * The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + * @return the value + **/ + public Float getByolComputeCountLimit() { + return byolComputeCountLimit; + } + /** * If set to {@code TRUE}, indicates that an Autonomous Database preview version is being provisioned, and that the preview version's terms of service have been accepted. Note that preview version software is only available for Autonomous Database Serverless instances (https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/). * @@ -727,14 +778,14 @@ public Boolean getIsAutoScalingEnabled() { } /** - * Autonomous Database for Developers are free Autonomous Databases that developers can use to build and test new applications.With Autonomous these database instancess instances, you can try new Autonomous Database features for free and apply them to ongoing or new development projects. Developer database comes with limited resources and is, therefore, not suitable for large-scale testing and production deployments. When you need more compute or storage resources, you can transition to a paid database licensing by cloning your developer database into a regular Autonomous Database. See [Autonomous Database documentation](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/eddjo/index.html) for more details. + * Autonomous Database for Developers are fixed-shape Autonomous Databases that developers can use to build and test new applications. On Serverless, these are low-cost and billed per instance, on Dedicated and Cloud@Customer there is no additional cost to create Developer databases. Developer databases come with limited resources and is not intended for large-scale testing and production deployments. When you need more compute or storage resources, you may upgrade to a full paid production database. * **/ @com.fasterxml.jackson.annotation.JsonProperty("isDevTier") private final Boolean isDevTier; /** - * Autonomous Database for Developers are free Autonomous Databases that developers can use to build and test new applications.With Autonomous these database instancess instances, you can try new Autonomous Database features for free and apply them to ongoing or new development projects. Developer database comes with limited resources and is, therefore, not suitable for large-scale testing and production deployments. When you need more compute or storage resources, you can transition to a paid database licensing by cloning your developer database into a regular Autonomous Database. See [Autonomous Database documentation](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/eddjo/index.html) for more details. + * Autonomous Database for Developers are fixed-shape Autonomous Databases that developers can use to build and test new applications. On Serverless, these are low-cost and billed per instance, on Dedicated and Cloud@Customer there is no additional cost to create Developer databases. Developer databases come with limited resources and is not intended for large-scale testing and production deployments. When you need more compute or storage resources, you may upgrade to a full paid production database. * * @return the value **/ @@ -1064,6 +1115,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The private endpoint Ip address for the resource. **/ @@ -1338,7 +1409,8 @@ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("CreateAutonomousDatabaseBase("); sb.append("super=").append(super.toString()); - sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append("subscriptionId=").append(String.valueOf(this.subscriptionId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", characterSet=").append(String.valueOf(this.characterSet)); sb.append(", ncharacterSet=").append(String.valueOf(this.ncharacterSet)); sb.append(", dbName=").append(String.valueOf(this.dbName)); @@ -1354,9 +1426,11 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isFreeTier=").append(String.valueOf(this.isFreeTier)); sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", encryptionKey=").append(String.valueOf(this.encryptionKey)); sb.append(", adminPassword=").append(String.valueOf(this.adminPassword)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", licenseModel=").append(String.valueOf(this.licenseModel)); + sb.append(", byolComputeCountLimit=").append(String.valueOf(this.byolComputeCountLimit)); sb.append(", isPreviewVersionWithServiceTermsAccepted=") .append(String.valueOf(this.isPreviewVersionWithServiceTermsAccepted)); sb.append(", isAutoScalingEnabled=").append(String.valueOf(this.isAutoScalingEnabled)); @@ -1378,6 +1452,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", privateEndpointLabel=").append(String.valueOf(this.privateEndpointLabel)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", privateEndpointIp=").append(String.valueOf(this.privateEndpointIp)); sb.append(", dbVersion=").append(String.valueOf(this.dbVersion)); sb.append(", customerContacts=").append(String.valueOf(this.customerContacts)); @@ -1408,7 +1483,8 @@ public boolean equals(Object o) { } CreateAutonomousDatabaseBase other = (CreateAutonomousDatabaseBase) o; - return java.util.Objects.equals(this.compartmentId, other.compartmentId) + return java.util.Objects.equals(this.subscriptionId, other.subscriptionId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.characterSet, other.characterSet) && java.util.Objects.equals(this.ncharacterSet, other.ncharacterSet) && java.util.Objects.equals(this.dbName, other.dbName) @@ -1424,9 +1500,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.isFreeTier, other.isFreeTier) && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.encryptionKey, other.encryptionKey) && java.util.Objects.equals(this.adminPassword, other.adminPassword) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.licenseModel, other.licenseModel) + && java.util.Objects.equals(this.byolComputeCountLimit, other.byolComputeCountLimit) && java.util.Objects.equals( this.isPreviewVersionWithServiceTermsAccepted, other.isPreviewVersionWithServiceTermsAccepted) @@ -1450,6 +1528,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.privateEndpointLabel, other.privateEndpointLabel) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.privateEndpointIp, other.privateEndpointIp) && java.util.Objects.equals(this.dbVersion, other.dbVersion) && java.util.Objects.equals(this.customerContacts, other.customerContacts) @@ -1474,6 +1553,9 @@ public boolean equals(Object o) { public int hashCode() { final int PRIME = 59; int result = 1; + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); @@ -1505,11 +1587,19 @@ public int hashCode() { result = (result * PRIME) + (this.isFreeTier == null ? 43 : this.isFreeTier.hashCode()); result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = + (result * PRIME) + + (this.encryptionKey == null ? 43 : this.encryptionKey.hashCode()); result = (result * PRIME) + (this.adminPassword == null ? 43 : this.adminPassword.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.licenseModel == null ? 43 : this.licenseModel.hashCode()); + result = + (result * PRIME) + + (this.byolComputeCountLimit == null + ? 43 + : this.byolComputeCountLimit.hashCode()); result = (result * PRIME) + (this.isPreviewVersionWithServiceTermsAccepted == null @@ -1569,6 +1659,11 @@ public int hashCode() { : this.privateEndpointLabel.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.privateEndpointIp == null ? 43 : this.privateEndpointIp.hashCode()); @@ -1633,6 +1728,7 @@ public enum Source { Database("DATABASE"), BackupFromId("BACKUP_FROM_ID"), BackupFromTimestamp("BACKUP_FROM_TIMESTAMP"), + UndeleteAdb("UNDELETE_ADB"), CloneToRefreshable("CLONE_TO_REFRESHABLE"), CrossRegionDataguard("CROSS_REGION_DATAGUARD"), CrossRegionDisasterRecovery("CROSS_REGION_DISASTER_RECOVERY"), diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseCloneDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseCloneDetails.java index b1f83f7e406..53baa8a4260 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseCloneDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseCloneDetails.java @@ -28,6 +28,15 @@ public final class CreateAutonomousDatabaseCloneDetails extends CreateAutonomousDatabaseBase { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; @@ -163,6 +172,15 @@ public Builder vaultId(String vaultId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKey") + private AutonomousDatabaseEncryptionKeyDetails encryptionKey; + + public Builder encryptionKey(AutonomousDatabaseEncryptionKeyDetails encryptionKey) { + this.encryptionKey = encryptionKey; + this.__explicitlySet__.add("encryptionKey"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") private String adminPassword; @@ -190,6 +208,15 @@ public Builder licenseModel(LicenseModel licenseModel) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("byolComputeCountLimit") + private Float byolComputeCountLimit; + + public Builder byolComputeCountLimit(Float byolComputeCountLimit) { + this.byolComputeCountLimit = byolComputeCountLimit; + this.__explicitlySet__.add("byolComputeCountLimit"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("isPreviewVersionWithServiceTermsAccepted") private Boolean isPreviewVersionWithServiceTermsAccepted; @@ -346,6 +373,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") private String privateEndpointIp; @@ -503,6 +540,7 @@ public Builder cloneType(CloneType cloneType) { public CreateAutonomousDatabaseCloneDetails build() { CreateAutonomousDatabaseCloneDetails model = new CreateAutonomousDatabaseCloneDetails( + this.subscriptionId, this.compartmentId, this.characterSet, this.ncharacterSet, @@ -518,9 +556,11 @@ public CreateAutonomousDatabaseCloneDetails build() { this.isFreeTier, this.kmsKeyId, this.vaultId, + this.encryptionKey, this.adminPassword, this.displayName, this.licenseModel, + this.byolComputeCountLimit, this.isPreviewVersionWithServiceTermsAccepted, this.isAutoScalingEnabled, this.isDevTier, @@ -538,6 +578,7 @@ public CreateAutonomousDatabaseCloneDetails build() { this.privateEndpointLabel, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateEndpointIp, this.dbVersion, this.customerContacts, @@ -561,6 +602,9 @@ public CreateAutonomousDatabaseCloneDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(CreateAutonomousDatabaseCloneDetails model) { + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } @@ -606,6 +650,9 @@ public Builder copy(CreateAutonomousDatabaseCloneDetails model) { if (model.wasPropertyExplicitlySet("vaultId")) { this.vaultId(model.getVaultId()); } + if (model.wasPropertyExplicitlySet("encryptionKey")) { + this.encryptionKey(model.getEncryptionKey()); + } if (model.wasPropertyExplicitlySet("adminPassword")) { this.adminPassword(model.getAdminPassword()); } @@ -615,6 +662,9 @@ public Builder copy(CreateAutonomousDatabaseCloneDetails model) { if (model.wasPropertyExplicitlySet("licenseModel")) { this.licenseModel(model.getLicenseModel()); } + if (model.wasPropertyExplicitlySet("byolComputeCountLimit")) { + this.byolComputeCountLimit(model.getByolComputeCountLimit()); + } if (model.wasPropertyExplicitlySet("isPreviewVersionWithServiceTermsAccepted")) { this.isPreviewVersionWithServiceTermsAccepted( model.getIsPreviewVersionWithServiceTermsAccepted()); @@ -667,6 +717,9 @@ public Builder copy(CreateAutonomousDatabaseCloneDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateEndpointIp")) { this.privateEndpointIp(model.getPrivateEndpointIp()); } @@ -730,6 +783,7 @@ public Builder toBuilder() { @Deprecated public CreateAutonomousDatabaseCloneDetails( + String subscriptionId, String compartmentId, String characterSet, String ncharacterSet, @@ -745,9 +799,11 @@ public CreateAutonomousDatabaseCloneDetails( Boolean isFreeTier, String kmsKeyId, String vaultId, + AutonomousDatabaseEncryptionKeyDetails encryptionKey, String adminPassword, String displayName, LicenseModel licenseModel, + Float byolComputeCountLimit, Boolean isPreviewVersionWithServiceTermsAccepted, Boolean isAutoScalingEnabled, Boolean isDevTier, @@ -765,6 +821,7 @@ public CreateAutonomousDatabaseCloneDetails( String privateEndpointLabel, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateEndpointIp, String dbVersion, java.util.List customerContacts, @@ -781,6 +838,7 @@ public CreateAutonomousDatabaseCloneDetails( String sourceId, CloneType cloneType) { super( + subscriptionId, compartmentId, characterSet, ncharacterSet, @@ -796,9 +854,11 @@ public CreateAutonomousDatabaseCloneDetails( isFreeTier, kmsKeyId, vaultId, + encryptionKey, adminPassword, displayName, licenseModel, + byolComputeCountLimit, isPreviewVersionWithServiceTermsAccepted, isAutoScalingEnabled, isDevTier, @@ -816,6 +876,7 @@ public CreateAutonomousDatabaseCloneDetails( privateEndpointLabel, freeformTags, definedTags, + securityAttributes, privateEndpointIp, dbVersion, customerContacts, diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseDetails.java index aed58a7bb84..850300ec008 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseDetails.java @@ -28,6 +28,15 @@ public final class CreateAutonomousDatabaseDetails extends CreateAutonomousDatabaseBase { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; @@ -163,6 +172,15 @@ public Builder vaultId(String vaultId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKey") + private AutonomousDatabaseEncryptionKeyDetails encryptionKey; + + public Builder encryptionKey(AutonomousDatabaseEncryptionKeyDetails encryptionKey) { + this.encryptionKey = encryptionKey; + this.__explicitlySet__.add("encryptionKey"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") private String adminPassword; @@ -190,6 +208,15 @@ public Builder licenseModel(LicenseModel licenseModel) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("byolComputeCountLimit") + private Float byolComputeCountLimit; + + public Builder byolComputeCountLimit(Float byolComputeCountLimit) { + this.byolComputeCountLimit = byolComputeCountLimit; + this.__explicitlySet__.add("byolComputeCountLimit"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("isPreviewVersionWithServiceTermsAccepted") private Boolean isPreviewVersionWithServiceTermsAccepted; @@ -346,6 +373,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") private String privateEndpointIp; @@ -471,6 +508,7 @@ public Builder secretVersionNumber(Integer secretVersionNumber) { public CreateAutonomousDatabaseDetails build() { CreateAutonomousDatabaseDetails model = new CreateAutonomousDatabaseDetails( + this.subscriptionId, this.compartmentId, this.characterSet, this.ncharacterSet, @@ -486,9 +524,11 @@ public CreateAutonomousDatabaseDetails build() { this.isFreeTier, this.kmsKeyId, this.vaultId, + this.encryptionKey, this.adminPassword, this.displayName, this.licenseModel, + this.byolComputeCountLimit, this.isPreviewVersionWithServiceTermsAccepted, this.isAutoScalingEnabled, this.isDevTier, @@ -506,6 +546,7 @@ public CreateAutonomousDatabaseDetails build() { this.privateEndpointLabel, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateEndpointIp, this.dbVersion, this.customerContacts, @@ -527,6 +568,9 @@ public CreateAutonomousDatabaseDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(CreateAutonomousDatabaseDetails model) { + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } @@ -572,6 +616,9 @@ public Builder copy(CreateAutonomousDatabaseDetails model) { if (model.wasPropertyExplicitlySet("vaultId")) { this.vaultId(model.getVaultId()); } + if (model.wasPropertyExplicitlySet("encryptionKey")) { + this.encryptionKey(model.getEncryptionKey()); + } if (model.wasPropertyExplicitlySet("adminPassword")) { this.adminPassword(model.getAdminPassword()); } @@ -581,6 +628,9 @@ public Builder copy(CreateAutonomousDatabaseDetails model) { if (model.wasPropertyExplicitlySet("licenseModel")) { this.licenseModel(model.getLicenseModel()); } + if (model.wasPropertyExplicitlySet("byolComputeCountLimit")) { + this.byolComputeCountLimit(model.getByolComputeCountLimit()); + } if (model.wasPropertyExplicitlySet("isPreviewVersionWithServiceTermsAccepted")) { this.isPreviewVersionWithServiceTermsAccepted( model.getIsPreviewVersionWithServiceTermsAccepted()); @@ -633,6 +683,9 @@ public Builder copy(CreateAutonomousDatabaseDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateEndpointIp")) { this.privateEndpointIp(model.getPrivateEndpointIp()); } @@ -690,6 +743,7 @@ public Builder toBuilder() { @Deprecated public CreateAutonomousDatabaseDetails( + String subscriptionId, String compartmentId, String characterSet, String ncharacterSet, @@ -705,9 +759,11 @@ public CreateAutonomousDatabaseDetails( Boolean isFreeTier, String kmsKeyId, String vaultId, + AutonomousDatabaseEncryptionKeyDetails encryptionKey, String adminPassword, String displayName, LicenseModel licenseModel, + Float byolComputeCountLimit, Boolean isPreviewVersionWithServiceTermsAccepted, Boolean isAutoScalingEnabled, Boolean isDevTier, @@ -725,6 +781,7 @@ public CreateAutonomousDatabaseDetails( String privateEndpointLabel, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateEndpointIp, String dbVersion, java.util.List customerContacts, @@ -739,6 +796,7 @@ public CreateAutonomousDatabaseDetails( String secretId, Integer secretVersionNumber) { super( + subscriptionId, compartmentId, characterSet, ncharacterSet, @@ -754,9 +812,11 @@ public CreateAutonomousDatabaseDetails( isFreeTier, kmsKeyId, vaultId, + encryptionKey, adminPassword, displayName, licenseModel, + byolComputeCountLimit, isPreviewVersionWithServiceTermsAccepted, isAutoScalingEnabled, isDevTier, @@ -774,6 +834,7 @@ public CreateAutonomousDatabaseDetails( privateEndpointLabel, freeformTags, definedTags, + securityAttributes, privateEndpointIp, dbVersion, customerContacts, diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseFromBackupDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseFromBackupDetails.java index a33a37a01f8..769f5062c7b 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseFromBackupDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseFromBackupDetails.java @@ -28,6 +28,15 @@ public final class CreateAutonomousDatabaseFromBackupDetails extends CreateAutonomousDatabaseBase { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; @@ -163,6 +172,15 @@ public Builder vaultId(String vaultId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKey") + private AutonomousDatabaseEncryptionKeyDetails encryptionKey; + + public Builder encryptionKey(AutonomousDatabaseEncryptionKeyDetails encryptionKey) { + this.encryptionKey = encryptionKey; + this.__explicitlySet__.add("encryptionKey"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") private String adminPassword; @@ -190,6 +208,15 @@ public Builder licenseModel(LicenseModel licenseModel) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("byolComputeCountLimit") + private Float byolComputeCountLimit; + + public Builder byolComputeCountLimit(Float byolComputeCountLimit) { + this.byolComputeCountLimit = byolComputeCountLimit; + this.__explicitlySet__.add("byolComputeCountLimit"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("isPreviewVersionWithServiceTermsAccepted") private Boolean isPreviewVersionWithServiceTermsAccepted; @@ -346,6 +373,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") private String privateEndpointIp; @@ -503,6 +540,7 @@ public Builder cloneType(CloneType cloneType) { public CreateAutonomousDatabaseFromBackupDetails build() { CreateAutonomousDatabaseFromBackupDetails model = new CreateAutonomousDatabaseFromBackupDetails( + this.subscriptionId, this.compartmentId, this.characterSet, this.ncharacterSet, @@ -518,9 +556,11 @@ public CreateAutonomousDatabaseFromBackupDetails build() { this.isFreeTier, this.kmsKeyId, this.vaultId, + this.encryptionKey, this.adminPassword, this.displayName, this.licenseModel, + this.byolComputeCountLimit, this.isPreviewVersionWithServiceTermsAccepted, this.isAutoScalingEnabled, this.isDevTier, @@ -538,6 +578,7 @@ public CreateAutonomousDatabaseFromBackupDetails build() { this.privateEndpointLabel, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateEndpointIp, this.dbVersion, this.customerContacts, @@ -561,6 +602,9 @@ public CreateAutonomousDatabaseFromBackupDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(CreateAutonomousDatabaseFromBackupDetails model) { + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } @@ -606,6 +650,9 @@ public Builder copy(CreateAutonomousDatabaseFromBackupDetails model) { if (model.wasPropertyExplicitlySet("vaultId")) { this.vaultId(model.getVaultId()); } + if (model.wasPropertyExplicitlySet("encryptionKey")) { + this.encryptionKey(model.getEncryptionKey()); + } if (model.wasPropertyExplicitlySet("adminPassword")) { this.adminPassword(model.getAdminPassword()); } @@ -615,6 +662,9 @@ public Builder copy(CreateAutonomousDatabaseFromBackupDetails model) { if (model.wasPropertyExplicitlySet("licenseModel")) { this.licenseModel(model.getLicenseModel()); } + if (model.wasPropertyExplicitlySet("byolComputeCountLimit")) { + this.byolComputeCountLimit(model.getByolComputeCountLimit()); + } if (model.wasPropertyExplicitlySet("isPreviewVersionWithServiceTermsAccepted")) { this.isPreviewVersionWithServiceTermsAccepted( model.getIsPreviewVersionWithServiceTermsAccepted()); @@ -667,6 +717,9 @@ public Builder copy(CreateAutonomousDatabaseFromBackupDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateEndpointIp")) { this.privateEndpointIp(model.getPrivateEndpointIp()); } @@ -730,6 +783,7 @@ public Builder toBuilder() { @Deprecated public CreateAutonomousDatabaseFromBackupDetails( + String subscriptionId, String compartmentId, String characterSet, String ncharacterSet, @@ -745,9 +799,11 @@ public CreateAutonomousDatabaseFromBackupDetails( Boolean isFreeTier, String kmsKeyId, String vaultId, + AutonomousDatabaseEncryptionKeyDetails encryptionKey, String adminPassword, String displayName, LicenseModel licenseModel, + Float byolComputeCountLimit, Boolean isPreviewVersionWithServiceTermsAccepted, Boolean isAutoScalingEnabled, Boolean isDevTier, @@ -765,6 +821,7 @@ public CreateAutonomousDatabaseFromBackupDetails( String privateEndpointLabel, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateEndpointIp, String dbVersion, java.util.List customerContacts, @@ -781,6 +838,7 @@ public CreateAutonomousDatabaseFromBackupDetails( String autonomousDatabaseBackupId, CloneType cloneType) { super( + subscriptionId, compartmentId, characterSet, ncharacterSet, @@ -796,9 +854,11 @@ public CreateAutonomousDatabaseFromBackupDetails( isFreeTier, kmsKeyId, vaultId, + encryptionKey, adminPassword, displayName, licenseModel, + byolComputeCountLimit, isPreviewVersionWithServiceTermsAccepted, isAutoScalingEnabled, isDevTier, @@ -816,6 +876,7 @@ public CreateAutonomousDatabaseFromBackupDetails( privateEndpointLabel, freeformTags, definedTags, + securityAttributes, privateEndpointIp, dbVersion, customerContacts, diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseFromBackupTimestampDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseFromBackupTimestampDetails.java index 246cb358fca..bb43510d59d 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseFromBackupTimestampDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseFromBackupTimestampDetails.java @@ -29,6 +29,15 @@ public final class CreateAutonomousDatabaseFromBackupTimestampDetails extends CreateAutonomousDatabaseBase { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; @@ -164,6 +173,15 @@ public Builder vaultId(String vaultId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKey") + private AutonomousDatabaseEncryptionKeyDetails encryptionKey; + + public Builder encryptionKey(AutonomousDatabaseEncryptionKeyDetails encryptionKey) { + this.encryptionKey = encryptionKey; + this.__explicitlySet__.add("encryptionKey"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") private String adminPassword; @@ -191,6 +209,15 @@ public Builder licenseModel(LicenseModel licenseModel) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("byolComputeCountLimit") + private Float byolComputeCountLimit; + + public Builder byolComputeCountLimit(Float byolComputeCountLimit) { + this.byolComputeCountLimit = byolComputeCountLimit; + this.__explicitlySet__.add("byolComputeCountLimit"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("isPreviewVersionWithServiceTermsAccepted") private Boolean isPreviewVersionWithServiceTermsAccepted; @@ -347,6 +374,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") private String privateEndpointIp; @@ -539,6 +576,7 @@ public Builder useLatestAvailableBackupTimeStamp( public CreateAutonomousDatabaseFromBackupTimestampDetails build() { CreateAutonomousDatabaseFromBackupTimestampDetails model = new CreateAutonomousDatabaseFromBackupTimestampDetails( + this.subscriptionId, this.compartmentId, this.characterSet, this.ncharacterSet, @@ -554,9 +592,11 @@ public CreateAutonomousDatabaseFromBackupTimestampDetails build() { this.isFreeTier, this.kmsKeyId, this.vaultId, + this.encryptionKey, this.adminPassword, this.displayName, this.licenseModel, + this.byolComputeCountLimit, this.isPreviewVersionWithServiceTermsAccepted, this.isAutoScalingEnabled, this.isDevTier, @@ -574,6 +614,7 @@ public CreateAutonomousDatabaseFromBackupTimestampDetails build() { this.privateEndpointLabel, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateEndpointIp, this.dbVersion, this.customerContacts, @@ -599,6 +640,9 @@ public CreateAutonomousDatabaseFromBackupTimestampDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(CreateAutonomousDatabaseFromBackupTimestampDetails model) { + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } @@ -644,6 +688,9 @@ public Builder copy(CreateAutonomousDatabaseFromBackupTimestampDetails model) { if (model.wasPropertyExplicitlySet("vaultId")) { this.vaultId(model.getVaultId()); } + if (model.wasPropertyExplicitlySet("encryptionKey")) { + this.encryptionKey(model.getEncryptionKey()); + } if (model.wasPropertyExplicitlySet("adminPassword")) { this.adminPassword(model.getAdminPassword()); } @@ -653,6 +700,9 @@ public Builder copy(CreateAutonomousDatabaseFromBackupTimestampDetails model) { if (model.wasPropertyExplicitlySet("licenseModel")) { this.licenseModel(model.getLicenseModel()); } + if (model.wasPropertyExplicitlySet("byolComputeCountLimit")) { + this.byolComputeCountLimit(model.getByolComputeCountLimit()); + } if (model.wasPropertyExplicitlySet("isPreviewVersionWithServiceTermsAccepted")) { this.isPreviewVersionWithServiceTermsAccepted( model.getIsPreviewVersionWithServiceTermsAccepted()); @@ -705,6 +755,9 @@ public Builder copy(CreateAutonomousDatabaseFromBackupTimestampDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateEndpointIp")) { this.privateEndpointIp(model.getPrivateEndpointIp()); } @@ -775,6 +828,7 @@ public Builder toBuilder() { @Deprecated public CreateAutonomousDatabaseFromBackupTimestampDetails( + String subscriptionId, String compartmentId, String characterSet, String ncharacterSet, @@ -790,9 +844,11 @@ public CreateAutonomousDatabaseFromBackupTimestampDetails( Boolean isFreeTier, String kmsKeyId, String vaultId, + AutonomousDatabaseEncryptionKeyDetails encryptionKey, String adminPassword, String displayName, LicenseModel licenseModel, + Float byolComputeCountLimit, Boolean isPreviewVersionWithServiceTermsAccepted, Boolean isAutoScalingEnabled, Boolean isDevTier, @@ -810,6 +866,7 @@ public CreateAutonomousDatabaseFromBackupTimestampDetails( String privateEndpointLabel, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateEndpointIp, String dbVersion, java.util.List customerContacts, @@ -828,6 +885,7 @@ public CreateAutonomousDatabaseFromBackupTimestampDetails( CloneType cloneType, Boolean useLatestAvailableBackupTimeStamp) { super( + subscriptionId, compartmentId, characterSet, ncharacterSet, @@ -843,9 +901,11 @@ public CreateAutonomousDatabaseFromBackupTimestampDetails( isFreeTier, kmsKeyId, vaultId, + encryptionKey, adminPassword, displayName, licenseModel, + byolComputeCountLimit, isPreviewVersionWithServiceTermsAccepted, isAutoScalingEnabled, isDevTier, @@ -863,6 +923,7 @@ public CreateAutonomousDatabaseFromBackupTimestampDetails( privateEndpointLabel, freeformTags, definedTags, + securityAttributes, privateEndpointIp, dbVersion, customerContacts, diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudAutonomousVmClusterDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudAutonomousVmClusterDetails.java index 759ccdf3638..1944d22d45c 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudAutonomousVmClusterDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudAutonomousVmClusterDetails.java @@ -43,7 +43,8 @@ public final class CreateCloudAutonomousVmClusterDetails "licenseModel", "nsgIds", "freeformTags", - "definedTags" + "definedTags", + "securityAttributes" }) public CreateCloudAutonomousVmClusterDetails( String compartmentId, @@ -65,7 +66,8 @@ public CreateCloudAutonomousVmClusterDetails( LicenseModel licenseModel, java.util.List nsgIds, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> securityAttributes) { super(); this.compartmentId = compartmentId; this.description = description; @@ -87,6 +89,7 @@ public CreateCloudAutonomousVmClusterDetails( this.nsgIds = nsgIds; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -441,6 +444,29 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -467,7 +493,8 @@ public CreateCloudAutonomousVmClusterDetails build() { this.licenseModel, this.nsgIds, this.freeformTags, - this.definedTags); + this.definedTags, + this.securityAttributes); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -536,6 +563,9 @@ public Builder copy(CreateCloudAutonomousVmClusterDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } return this; } } @@ -937,6 +967,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + @Override public String toString() { return this.toString(true); @@ -976,6 +1026,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(")"); return sb.toString(); } @@ -1017,6 +1068,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.nsgIds, other.nsgIds) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && super.equals(other); } @@ -1084,6 +1136,11 @@ public int hashCode() { result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudExadataInfrastructureDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudExadataInfrastructureDetails.java index 6a7fd9745ba..0224d637353 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudExadataInfrastructureDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudExadataInfrastructureDetails.java @@ -34,6 +34,7 @@ public final class CreateCloudExadataInfrastructureDetails "freeformTags", "definedTags", "clusterPlacementGroupId", + "subscriptionId", "customerContacts" }) public CreateCloudExadataInfrastructureDetails( @@ -47,6 +48,7 @@ public CreateCloudExadataInfrastructureDetails( java.util.Map freeformTags, java.util.Map> definedTags, String clusterPlacementGroupId, + String subscriptionId, java.util.List customerContacts) { super(); this.availabilityDomain = availabilityDomain; @@ -59,6 +61,7 @@ public CreateCloudExadataInfrastructureDetails( this.freeformTags = freeformTags; this.definedTags = definedTags; this.clusterPlacementGroupId = clusterPlacementGroupId; + this.subscriptionId = subscriptionId; this.customerContacts = customerContacts; } @@ -234,6 +237,22 @@ public Builder clusterPlacementGroupId(String clusterPlacementGroupId) { this.__explicitlySet__.add("clusterPlacementGroupId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @param subscriptionId the value to set + * @return this builder + **/ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } /** * Customer contacts. **/ @@ -267,6 +286,7 @@ public CreateCloudExadataInfrastructureDetails build() { this.freeformTags, this.definedTags, this.clusterPlacementGroupId, + this.subscriptionId, this.customerContacts); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -306,6 +326,9 @@ public Builder copy(CreateCloudExadataInfrastructureDetails model) { if (model.wasPropertyExplicitlySet("clusterPlacementGroupId")) { this.clusterPlacementGroupId(model.getClusterPlacementGroupId()); } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } if (model.wasPropertyExplicitlySet("customerContacts")) { this.customerContacts(model.getCustomerContacts()); } @@ -473,6 +496,20 @@ public String getClusterPlacementGroupId() { return clusterPlacementGroupId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + /** * Customer contacts. **/ @@ -512,6 +549,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", clusterPlacementGroupId=") .append(String.valueOf(this.clusterPlacementGroupId)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(", customerContacts=").append(String.valueOf(this.customerContacts)); sb.append(")"); return sb.toString(); @@ -538,6 +576,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals( this.clusterPlacementGroupId, other.clusterPlacementGroupId) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) && java.util.Objects.equals(this.customerContacts, other.customerContacts) && super.equals(other); } @@ -568,6 +607,9 @@ public int hashCode() { + (this.clusterPlacementGroupId == null ? 43 : this.clusterPlacementGroupId.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); result = (result * PRIME) + (this.customerContacts == null ? 43 : this.customerContacts.hashCode()); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudVmClusterDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudVmClusterDetails.java index f357276b7c6..f557098dda2 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudVmClusterDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudVmClusterDetails.java @@ -25,6 +25,7 @@ public final class CreateCloudVmClusterDetails @Deprecated @java.beans.ConstructorProperties({ "compartmentId", + "subscriptionId", "subnetId", "backupSubnetId", "cpuCoreCount", @@ -52,12 +53,15 @@ public final class CreateCloudVmClusterDetails "giVersion", "freeformTags", "definedTags", + "securityAttributes", "dataCollectionOptions", "systemVersion", - "fileSystemConfigurationDetails" + "fileSystemConfigurationDetails", + "cloudAutomationUpdateDetails" }) public CreateCloudVmClusterDetails( String compartmentId, + String subscriptionId, String subnetId, String backupSubnetId, Integer cpuCoreCount, @@ -85,11 +89,14 @@ public CreateCloudVmClusterDetails( String giVersion, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, DataCollectionOptions dataCollectionOptions, String systemVersion, - java.util.List fileSystemConfigurationDetails) { + java.util.List fileSystemConfigurationDetails, + CloudAutomationUpdateDetails cloudAutomationUpdateDetails) { super(); this.compartmentId = compartmentId; + this.subscriptionId = subscriptionId; this.subnetId = subnetId; this.backupSubnetId = backupSubnetId; this.cpuCoreCount = cpuCoreCount; @@ -117,9 +124,11 @@ public CreateCloudVmClusterDetails( this.giVersion = giVersion; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.dataCollectionOptions = dataCollectionOptions; this.systemVersion = systemVersion; this.fileSystemConfigurationDetails = fileSystemConfigurationDetails; + this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -140,6 +149,22 @@ public Builder compartmentId(String compartmentId) { this.__explicitlySet__.add("compartmentId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @param subscriptionId the value to set + * @return this builder + **/ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet associated with the cloud VM cluster. * @@ -651,6 +676,29 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("dataCollectionOptions") private DataCollectionOptions dataCollectionOptions; @@ -694,6 +742,16 @@ public Builder fileSystemConfigurationDetails( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") + private CloudAutomationUpdateDetails cloudAutomationUpdateDetails; + + public Builder cloudAutomationUpdateDetails( + CloudAutomationUpdateDetails cloudAutomationUpdateDetails) { + this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; + this.__explicitlySet__.add("cloudAutomationUpdateDetails"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -701,6 +759,7 @@ public CreateCloudVmClusterDetails build() { CreateCloudVmClusterDetails model = new CreateCloudVmClusterDetails( this.compartmentId, + this.subscriptionId, this.subnetId, this.backupSubnetId, this.cpuCoreCount, @@ -728,9 +787,11 @@ public CreateCloudVmClusterDetails build() { this.giVersion, this.freeformTags, this.definedTags, + this.securityAttributes, this.dataCollectionOptions, this.systemVersion, - this.fileSystemConfigurationDetails); + this.fileSystemConfigurationDetails, + this.cloudAutomationUpdateDetails); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -742,6 +803,9 @@ public Builder copy(CreateCloudVmClusterDetails model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } if (model.wasPropertyExplicitlySet("subnetId")) { this.subnetId(model.getSubnetId()); } @@ -823,6 +887,9 @@ public Builder copy(CreateCloudVmClusterDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("dataCollectionOptions")) { this.dataCollectionOptions(model.getDataCollectionOptions()); } @@ -832,6 +899,9 @@ public Builder copy(CreateCloudVmClusterDetails model) { if (model.wasPropertyExplicitlySet("fileSystemConfigurationDetails")) { this.fileSystemConfigurationDetails(model.getFileSystemConfigurationDetails()); } + if (model.wasPropertyExplicitlySet("cloudAutomationUpdateDetails")) { + this.cloudAutomationUpdateDetails(model.getCloudAutomationUpdateDetails()); + } return this; } } @@ -861,6 +931,20 @@ public String getCompartmentId() { return compartmentId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet associated with the cloud VM cluster. * @@ -1353,6 +1437,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + @com.fasterxml.jackson.annotation.JsonProperty("dataCollectionOptions") private final DataCollectionOptions dataCollectionOptions; @@ -1388,6 +1492,13 @@ public java.util.List getFileSystemConfigurationD return fileSystemConfigurationDetails; } + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") + private final CloudAutomationUpdateDetails cloudAutomationUpdateDetails; + + public CloudAutomationUpdateDetails getCloudAutomationUpdateDetails() { + return cloudAutomationUpdateDetails; + } + @Override public String toString() { return this.toString(true); @@ -1403,6 +1514,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("CreateCloudVmClusterDetails("); sb.append("super=").append(super.toString()); sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(", subnetId=").append(String.valueOf(this.subnetId)); sb.append(", backupSubnetId=").append(String.valueOf(this.backupSubnetId)); sb.append(", cpuCoreCount=").append(String.valueOf(this.cpuCoreCount)); @@ -1432,10 +1544,13 @@ public String toString(boolean includeByteArrayContents) { sb.append(", giVersion=").append(String.valueOf(this.giVersion)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", dataCollectionOptions=").append(String.valueOf(this.dataCollectionOptions)); sb.append(", systemVersion=").append(String.valueOf(this.systemVersion)); sb.append(", fileSystemConfigurationDetails=") .append(String.valueOf(this.fileSystemConfigurationDetails)); + sb.append(", cloudAutomationUpdateDetails=") + .append(String.valueOf(this.cloudAutomationUpdateDetails)); sb.append(")"); return sb.toString(); } @@ -1451,6 +1566,7 @@ public boolean equals(Object o) { CreateCloudVmClusterDetails other = (CreateCloudVmClusterDetails) o; return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) && java.util.Objects.equals(this.subnetId, other.subnetId) && java.util.Objects.equals(this.backupSubnetId, other.backupSubnetId) && java.util.Objects.equals(this.cpuCoreCount, other.cpuCoreCount) @@ -1482,10 +1598,13 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.giVersion, other.giVersion) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.dataCollectionOptions, other.dataCollectionOptions) && java.util.Objects.equals(this.systemVersion, other.systemVersion) && java.util.Objects.equals( this.fileSystemConfigurationDetails, other.fileSystemConfigurationDetails) + && java.util.Objects.equals( + this.cloudAutomationUpdateDetails, other.cloudAutomationUpdateDetails) && super.equals(other); } @@ -1496,6 +1615,9 @@ public int hashCode() { result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); result = (result * PRIME) @@ -1567,6 +1689,11 @@ public int hashCode() { result = (result * PRIME) + (this.giVersion == null ? 43 : this.giVersion.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.dataCollectionOptions == null @@ -1580,6 +1707,11 @@ public int hashCode() { + (this.fileSystemConfigurationDetails == null ? 43 : this.fileSystemConfigurationDetails.hashCode()); + result = + (result * PRIME) + + (this.cloudAutomationUpdateDetails == null + ? 43 + : this.cloudAutomationUpdateDetails.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossRegionAutonomousDatabaseDataGuardDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossRegionAutonomousDatabaseDataGuardDetails.java index 5a1b2bb2e78..61f19c4619a 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossRegionAutonomousDatabaseDataGuardDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossRegionAutonomousDatabaseDataGuardDetails.java @@ -47,6 +47,15 @@ public final class CreateCrossRegionAutonomousDatabaseDataGuardDetails extends CreateAutonomousDatabaseBase { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; @@ -182,6 +191,15 @@ public Builder vaultId(String vaultId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKey") + private AutonomousDatabaseEncryptionKeyDetails encryptionKey; + + public Builder encryptionKey(AutonomousDatabaseEncryptionKeyDetails encryptionKey) { + this.encryptionKey = encryptionKey; + this.__explicitlySet__.add("encryptionKey"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") private String adminPassword; @@ -209,6 +227,15 @@ public Builder licenseModel(LicenseModel licenseModel) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("byolComputeCountLimit") + private Float byolComputeCountLimit; + + public Builder byolComputeCountLimit(Float byolComputeCountLimit) { + this.byolComputeCountLimit = byolComputeCountLimit; + this.__explicitlySet__.add("byolComputeCountLimit"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("isPreviewVersionWithServiceTermsAccepted") private Boolean isPreviewVersionWithServiceTermsAccepted; @@ -365,6 +392,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") private String privateEndpointIp; @@ -506,6 +543,7 @@ public Builder sourceId(String sourceId) { public CreateCrossRegionAutonomousDatabaseDataGuardDetails build() { CreateCrossRegionAutonomousDatabaseDataGuardDetails model = new CreateCrossRegionAutonomousDatabaseDataGuardDetails( + this.subscriptionId, this.compartmentId, this.characterSet, this.ncharacterSet, @@ -521,9 +559,11 @@ public CreateCrossRegionAutonomousDatabaseDataGuardDetails build() { this.isFreeTier, this.kmsKeyId, this.vaultId, + this.encryptionKey, this.adminPassword, this.displayName, this.licenseModel, + this.byolComputeCountLimit, this.isPreviewVersionWithServiceTermsAccepted, this.isAutoScalingEnabled, this.isDevTier, @@ -541,6 +581,7 @@ public CreateCrossRegionAutonomousDatabaseDataGuardDetails build() { this.privateEndpointLabel, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateEndpointIp, this.dbVersion, this.customerContacts, @@ -563,6 +604,9 @@ public CreateCrossRegionAutonomousDatabaseDataGuardDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(CreateCrossRegionAutonomousDatabaseDataGuardDetails model) { + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } @@ -608,6 +652,9 @@ public Builder copy(CreateCrossRegionAutonomousDatabaseDataGuardDetails model) { if (model.wasPropertyExplicitlySet("vaultId")) { this.vaultId(model.getVaultId()); } + if (model.wasPropertyExplicitlySet("encryptionKey")) { + this.encryptionKey(model.getEncryptionKey()); + } if (model.wasPropertyExplicitlySet("adminPassword")) { this.adminPassword(model.getAdminPassword()); } @@ -617,6 +664,9 @@ public Builder copy(CreateCrossRegionAutonomousDatabaseDataGuardDetails model) { if (model.wasPropertyExplicitlySet("licenseModel")) { this.licenseModel(model.getLicenseModel()); } + if (model.wasPropertyExplicitlySet("byolComputeCountLimit")) { + this.byolComputeCountLimit(model.getByolComputeCountLimit()); + } if (model.wasPropertyExplicitlySet("isPreviewVersionWithServiceTermsAccepted")) { this.isPreviewVersionWithServiceTermsAccepted( model.getIsPreviewVersionWithServiceTermsAccepted()); @@ -669,6 +719,9 @@ public Builder copy(CreateCrossRegionAutonomousDatabaseDataGuardDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateEndpointIp")) { this.privateEndpointIp(model.getPrivateEndpointIp()); } @@ -729,6 +782,7 @@ public Builder toBuilder() { @Deprecated public CreateCrossRegionAutonomousDatabaseDataGuardDetails( + String subscriptionId, String compartmentId, String characterSet, String ncharacterSet, @@ -744,9 +798,11 @@ public CreateCrossRegionAutonomousDatabaseDataGuardDetails( Boolean isFreeTier, String kmsKeyId, String vaultId, + AutonomousDatabaseEncryptionKeyDetails encryptionKey, String adminPassword, String displayName, LicenseModel licenseModel, + Float byolComputeCountLimit, Boolean isPreviewVersionWithServiceTermsAccepted, Boolean isAutoScalingEnabled, Boolean isDevTier, @@ -764,6 +820,7 @@ public CreateCrossRegionAutonomousDatabaseDataGuardDetails( String privateEndpointLabel, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateEndpointIp, String dbVersion, java.util.List customerContacts, @@ -779,6 +836,7 @@ public CreateCrossRegionAutonomousDatabaseDataGuardDetails( Integer secretVersionNumber, String sourceId) { super( + subscriptionId, compartmentId, characterSet, ncharacterSet, @@ -794,9 +852,11 @@ public CreateCrossRegionAutonomousDatabaseDataGuardDetails( isFreeTier, kmsKeyId, vaultId, + encryptionKey, adminPassword, displayName, licenseModel, + byolComputeCountLimit, isPreviewVersionWithServiceTermsAccepted, isAutoScalingEnabled, isDevTier, @@ -814,6 +874,7 @@ public CreateCrossRegionAutonomousDatabaseDataGuardDetails( privateEndpointLabel, freeformTags, definedTags, + securityAttributes, privateEndpointIp, dbVersion, customerContacts, diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossRegionDisasterRecoveryDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossRegionDisasterRecoveryDetails.java index 446a4c33712..73ae1db1284 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossRegionDisasterRecoveryDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossRegionDisasterRecoveryDetails.java @@ -47,6 +47,15 @@ public final class CreateCrossRegionDisasterRecoveryDetails extends CreateAutonomousDatabaseBase { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; @@ -182,6 +191,15 @@ public Builder vaultId(String vaultId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKey") + private AutonomousDatabaseEncryptionKeyDetails encryptionKey; + + public Builder encryptionKey(AutonomousDatabaseEncryptionKeyDetails encryptionKey) { + this.encryptionKey = encryptionKey; + this.__explicitlySet__.add("encryptionKey"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") private String adminPassword; @@ -209,6 +227,15 @@ public Builder licenseModel(LicenseModel licenseModel) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("byolComputeCountLimit") + private Float byolComputeCountLimit; + + public Builder byolComputeCountLimit(Float byolComputeCountLimit) { + this.byolComputeCountLimit = byolComputeCountLimit; + this.__explicitlySet__.add("byolComputeCountLimit"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("isPreviewVersionWithServiceTermsAccepted") private Boolean isPreviewVersionWithServiceTermsAccepted; @@ -365,6 +392,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") private String privateEndpointIp; @@ -545,6 +582,7 @@ public Builder isReplicateAutomaticBackups(Boolean isReplicateAutomaticBackups) public CreateCrossRegionDisasterRecoveryDetails build() { CreateCrossRegionDisasterRecoveryDetails model = new CreateCrossRegionDisasterRecoveryDetails( + this.subscriptionId, this.compartmentId, this.characterSet, this.ncharacterSet, @@ -560,9 +598,11 @@ public CreateCrossRegionDisasterRecoveryDetails build() { this.isFreeTier, this.kmsKeyId, this.vaultId, + this.encryptionKey, this.adminPassword, this.displayName, this.licenseModel, + this.byolComputeCountLimit, this.isPreviewVersionWithServiceTermsAccepted, this.isAutoScalingEnabled, this.isDevTier, @@ -580,6 +620,7 @@ public CreateCrossRegionDisasterRecoveryDetails build() { this.privateEndpointLabel, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateEndpointIp, this.dbVersion, this.customerContacts, @@ -604,6 +645,9 @@ public CreateCrossRegionDisasterRecoveryDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(CreateCrossRegionDisasterRecoveryDetails model) { + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } @@ -649,6 +693,9 @@ public Builder copy(CreateCrossRegionDisasterRecoveryDetails model) { if (model.wasPropertyExplicitlySet("vaultId")) { this.vaultId(model.getVaultId()); } + if (model.wasPropertyExplicitlySet("encryptionKey")) { + this.encryptionKey(model.getEncryptionKey()); + } if (model.wasPropertyExplicitlySet("adminPassword")) { this.adminPassword(model.getAdminPassword()); } @@ -658,6 +705,9 @@ public Builder copy(CreateCrossRegionDisasterRecoveryDetails model) { if (model.wasPropertyExplicitlySet("licenseModel")) { this.licenseModel(model.getLicenseModel()); } + if (model.wasPropertyExplicitlySet("byolComputeCountLimit")) { + this.byolComputeCountLimit(model.getByolComputeCountLimit()); + } if (model.wasPropertyExplicitlySet("isPreviewVersionWithServiceTermsAccepted")) { this.isPreviewVersionWithServiceTermsAccepted( model.getIsPreviewVersionWithServiceTermsAccepted()); @@ -710,6 +760,9 @@ public Builder copy(CreateCrossRegionDisasterRecoveryDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateEndpointIp")) { this.privateEndpointIp(model.getPrivateEndpointIp()); } @@ -776,6 +829,7 @@ public Builder toBuilder() { @Deprecated public CreateCrossRegionDisasterRecoveryDetails( + String subscriptionId, String compartmentId, String characterSet, String ncharacterSet, @@ -791,9 +845,11 @@ public CreateCrossRegionDisasterRecoveryDetails( Boolean isFreeTier, String kmsKeyId, String vaultId, + AutonomousDatabaseEncryptionKeyDetails encryptionKey, String adminPassword, String displayName, LicenseModel licenseModel, + Float byolComputeCountLimit, Boolean isPreviewVersionWithServiceTermsAccepted, Boolean isAutoScalingEnabled, Boolean isDevTier, @@ -811,6 +867,7 @@ public CreateCrossRegionDisasterRecoveryDetails( String privateEndpointLabel, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateEndpointIp, String dbVersion, java.util.List customerContacts, @@ -828,6 +885,7 @@ public CreateCrossRegionDisasterRecoveryDetails( DisasterRecoveryConfiguration.DisasterRecoveryType remoteDisasterRecoveryType, Boolean isReplicateAutomaticBackups) { super( + subscriptionId, compartmentId, characterSet, ncharacterSet, @@ -843,9 +901,11 @@ public CreateCrossRegionDisasterRecoveryDetails( isFreeTier, kmsKeyId, vaultId, + encryptionKey, adminPassword, displayName, licenseModel, + byolComputeCountLimit, isPreviewVersionWithServiceTermsAccepted, isAutoScalingEnabled, isDevTier, @@ -863,6 +923,7 @@ public CreateCrossRegionDisasterRecoveryDetails( privateEndpointLabel, freeformTags, definedTags, + securityAttributes, privateEndpointIp, dbVersion, customerContacts, diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossTenancyDisasterRecoveryDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossTenancyDisasterRecoveryDetails.java index f9f2e38ab38..0169444456f 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossTenancyDisasterRecoveryDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossTenancyDisasterRecoveryDetails.java @@ -48,6 +48,15 @@ public final class CreateCrossTenancyDisasterRecoveryDetails extends CreateAutonomousDatabaseBase { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; @@ -183,6 +192,15 @@ public Builder vaultId(String vaultId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKey") + private AutonomousDatabaseEncryptionKeyDetails encryptionKey; + + public Builder encryptionKey(AutonomousDatabaseEncryptionKeyDetails encryptionKey) { + this.encryptionKey = encryptionKey; + this.__explicitlySet__.add("encryptionKey"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") private String adminPassword; @@ -210,6 +228,15 @@ public Builder licenseModel(LicenseModel licenseModel) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("byolComputeCountLimit") + private Float byolComputeCountLimit; + + public Builder byolComputeCountLimit(Float byolComputeCountLimit) { + this.byolComputeCountLimit = byolComputeCountLimit; + this.__explicitlySet__.add("byolComputeCountLimit"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("isPreviewVersionWithServiceTermsAccepted") private Boolean isPreviewVersionWithServiceTermsAccepted; @@ -366,6 +393,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") private String privateEndpointIp; @@ -546,6 +583,7 @@ public Builder isReplicateAutomaticBackups(Boolean isReplicateAutomaticBackups) public CreateCrossTenancyDisasterRecoveryDetails build() { CreateCrossTenancyDisasterRecoveryDetails model = new CreateCrossTenancyDisasterRecoveryDetails( + this.subscriptionId, this.compartmentId, this.characterSet, this.ncharacterSet, @@ -561,9 +599,11 @@ public CreateCrossTenancyDisasterRecoveryDetails build() { this.isFreeTier, this.kmsKeyId, this.vaultId, + this.encryptionKey, this.adminPassword, this.displayName, this.licenseModel, + this.byolComputeCountLimit, this.isPreviewVersionWithServiceTermsAccepted, this.isAutoScalingEnabled, this.isDevTier, @@ -581,6 +621,7 @@ public CreateCrossTenancyDisasterRecoveryDetails build() { this.privateEndpointLabel, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateEndpointIp, this.dbVersion, this.customerContacts, @@ -605,6 +646,9 @@ public CreateCrossTenancyDisasterRecoveryDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(CreateCrossTenancyDisasterRecoveryDetails model) { + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } @@ -650,6 +694,9 @@ public Builder copy(CreateCrossTenancyDisasterRecoveryDetails model) { if (model.wasPropertyExplicitlySet("vaultId")) { this.vaultId(model.getVaultId()); } + if (model.wasPropertyExplicitlySet("encryptionKey")) { + this.encryptionKey(model.getEncryptionKey()); + } if (model.wasPropertyExplicitlySet("adminPassword")) { this.adminPassword(model.getAdminPassword()); } @@ -659,6 +706,9 @@ public Builder copy(CreateCrossTenancyDisasterRecoveryDetails model) { if (model.wasPropertyExplicitlySet("licenseModel")) { this.licenseModel(model.getLicenseModel()); } + if (model.wasPropertyExplicitlySet("byolComputeCountLimit")) { + this.byolComputeCountLimit(model.getByolComputeCountLimit()); + } if (model.wasPropertyExplicitlySet("isPreviewVersionWithServiceTermsAccepted")) { this.isPreviewVersionWithServiceTermsAccepted( model.getIsPreviewVersionWithServiceTermsAccepted()); @@ -711,6 +761,9 @@ public Builder copy(CreateCrossTenancyDisasterRecoveryDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateEndpointIp")) { this.privateEndpointIp(model.getPrivateEndpointIp()); } @@ -777,6 +830,7 @@ public Builder toBuilder() { @Deprecated public CreateCrossTenancyDisasterRecoveryDetails( + String subscriptionId, String compartmentId, String characterSet, String ncharacterSet, @@ -792,9 +846,11 @@ public CreateCrossTenancyDisasterRecoveryDetails( Boolean isFreeTier, String kmsKeyId, String vaultId, + AutonomousDatabaseEncryptionKeyDetails encryptionKey, String adminPassword, String displayName, LicenseModel licenseModel, + Float byolComputeCountLimit, Boolean isPreviewVersionWithServiceTermsAccepted, Boolean isAutoScalingEnabled, Boolean isDevTier, @@ -812,6 +868,7 @@ public CreateCrossTenancyDisasterRecoveryDetails( String privateEndpointLabel, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateEndpointIp, String dbVersion, java.util.List customerContacts, @@ -829,6 +886,7 @@ public CreateCrossTenancyDisasterRecoveryDetails( DisasterRecoveryConfiguration.DisasterRecoveryType disasterRecoveryType, Boolean isReplicateAutomaticBackups) { super( + subscriptionId, compartmentId, characterSet, ncharacterSet, @@ -844,9 +902,11 @@ public CreateCrossTenancyDisasterRecoveryDetails( isFreeTier, kmsKeyId, vaultId, + encryptionKey, adminPassword, displayName, licenseModel, + byolComputeCountLimit, isPreviewVersionWithServiceTermsAccepted, isAutoScalingEnabled, isDevTier, @@ -864,6 +924,7 @@ public CreateCrossTenancyDisasterRecoveryDetails( privateEndpointLabel, freeformTags, definedTags, + securityAttributes, privateEndpointIp, dbVersion, customerContacts, diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDataGuardAssociationWithNewDbSystemDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDataGuardAssociationWithNewDbSystemDetails.java index c7f78390410..9bd7a21a781 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDataGuardAssociationWithNewDbSystemDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDataGuardAssociationWithNewDbSystemDetails.java @@ -288,6 +288,28 @@ public Builder hostname(String hostname) { this.__explicitlySet__.add("hostname"); return this; } + /** + * A domain name used for the DB system. If the Oracle-provided Internet and VCN + * Resolver is enabled for the specified subnet, the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domain") + private String domain; + + /** + * A domain name used for the DB system. If the Oracle-provided Internet and VCN + * Resolver is enabled for the specified subnet, the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. + * + * @param domain the value to set + * @return this builder + **/ + public Builder domain(String domain) { + this.domain = domain; + this.__explicitlySet__.add("domain"); + return this; + } /** * The time zone of the dataguard standby DB system. For details, see [DB System Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). **/ @@ -437,6 +459,29 @@ public Builder dbSystemDefinedTags( this.__explicitlySet__.add("dbSystemDefinedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbSystemSecurityAttributes") + private java.util.Map> dbSystemSecurityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param dbSystemSecurityAttributes the value to set + * @return this builder + **/ + public Builder dbSystemSecurityAttributes( + java.util.Map> dbSystemSecurityAttributes) { + this.dbSystemSecurityAttributes = dbSystemSecurityAttributes; + this.__explicitlySet__.add("dbSystemSecurityAttributes"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -515,12 +560,14 @@ public CreateDataGuardAssociationWithNewDbSystemDetails build() { this.nsgIds, this.backupNetworkNsgIds, this.hostname, + this.domain, this.timeZone, this.faultDomains, this.privateIp, this.licenseModel, this.dbSystemFreeformTags, this.dbSystemDefinedTags, + this.dbSystemSecurityAttributes, this.databaseFreeformTags, this.databaseDefinedTags, this.dataCollectionOptions); @@ -583,6 +630,9 @@ public Builder copy(CreateDataGuardAssociationWithNewDbSystemDetails model) { if (model.wasPropertyExplicitlySet("hostname")) { this.hostname(model.getHostname()); } + if (model.wasPropertyExplicitlySet("domain")) { + this.domain(model.getDomain()); + } if (model.wasPropertyExplicitlySet("timeZone")) { this.timeZone(model.getTimeZone()); } @@ -601,6 +651,9 @@ public Builder copy(CreateDataGuardAssociationWithNewDbSystemDetails model) { if (model.wasPropertyExplicitlySet("dbSystemDefinedTags")) { this.dbSystemDefinedTags(model.getDbSystemDefinedTags()); } + if (model.wasPropertyExplicitlySet("dbSystemSecurityAttributes")) { + this.dbSystemSecurityAttributes(model.getDbSystemSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("databaseFreeformTags")) { this.databaseFreeformTags(model.getDatabaseFreeformTags()); } @@ -644,12 +697,14 @@ public CreateDataGuardAssociationWithNewDbSystemDetails( java.util.List nsgIds, java.util.List backupNetworkNsgIds, String hostname, + String domain, String timeZone, java.util.List faultDomains, String privateIp, LicenseModel licenseModel, java.util.Map dbSystemFreeformTags, java.util.Map> dbSystemDefinedTags, + java.util.Map> dbSystemSecurityAttributes, java.util.Map databaseFreeformTags, java.util.Map> databaseDefinedTags, DataCollectionOptions dataCollectionOptions) { @@ -671,12 +726,14 @@ public CreateDataGuardAssociationWithNewDbSystemDetails( this.nsgIds = nsgIds; this.backupNetworkNsgIds = backupNetworkNsgIds; this.hostname = hostname; + this.domain = domain; this.timeZone = timeZone; this.faultDomains = faultDomains; this.privateIp = privateIp; this.licenseModel = licenseModel; this.dbSystemFreeformTags = dbSystemFreeformTags; this.dbSystemDefinedTags = dbSystemDefinedTags; + this.dbSystemSecurityAttributes = dbSystemSecurityAttributes; this.databaseFreeformTags = databaseFreeformTags; this.databaseDefinedTags = databaseDefinedTags; this.dataCollectionOptions = dataCollectionOptions; @@ -892,6 +949,26 @@ public String getHostname() { return hostname; } + /** + * A domain name used for the DB system. If the Oracle-provided Internet and VCN + * Resolver is enabled for the specified subnet, the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domain") + private final String domain; + + /** + * A domain name used for the DB system. If the Oracle-provided Internet and VCN + * Resolver is enabled for the specified subnet, the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. + * + * @return the value + **/ + public String getDomain() { + return domain; + } + /** * The time zone of the dataguard standby DB system. For details, see [DB System Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). **/ @@ -1064,6 +1141,26 @@ public java.util.Map> getDbSystemDefinedTa return dbSystemDefinedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbSystemSecurityAttributes") + private final java.util.Map> dbSystemSecurityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getDbSystemSecurityAttributes() { + return dbSystemSecurityAttributes; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -1136,12 +1233,15 @@ public String toString(boolean includeByteArrayContents) { sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); sb.append(", backupNetworkNsgIds=").append(String.valueOf(this.backupNetworkNsgIds)); sb.append(", hostname=").append(String.valueOf(this.hostname)); + sb.append(", domain=").append(String.valueOf(this.domain)); sb.append(", timeZone=").append(String.valueOf(this.timeZone)); sb.append(", faultDomains=").append(String.valueOf(this.faultDomains)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(", licenseModel=").append(String.valueOf(this.licenseModel)); sb.append(", dbSystemFreeformTags=").append(String.valueOf(this.dbSystemFreeformTags)); sb.append(", dbSystemDefinedTags=").append(String.valueOf(this.dbSystemDefinedTags)); + sb.append(", dbSystemSecurityAttributes=") + .append(String.valueOf(this.dbSystemSecurityAttributes)); sb.append(", databaseFreeformTags=").append(String.valueOf(this.databaseFreeformTags)); sb.append(", databaseDefinedTags=").append(String.valueOf(this.databaseDefinedTags)); sb.append(", dataCollectionOptions=").append(String.valueOf(this.dataCollectionOptions)); @@ -1171,12 +1271,15 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.nsgIds, other.nsgIds) && java.util.Objects.equals(this.backupNetworkNsgIds, other.backupNetworkNsgIds) && java.util.Objects.equals(this.hostname, other.hostname) + && java.util.Objects.equals(this.domain, other.domain) && java.util.Objects.equals(this.timeZone, other.timeZone) && java.util.Objects.equals(this.faultDomains, other.faultDomains) && java.util.Objects.equals(this.privateIp, other.privateIp) && java.util.Objects.equals(this.licenseModel, other.licenseModel) && java.util.Objects.equals(this.dbSystemFreeformTags, other.dbSystemFreeformTags) && java.util.Objects.equals(this.dbSystemDefinedTags, other.dbSystemDefinedTags) + && java.util.Objects.equals( + this.dbSystemSecurityAttributes, other.dbSystemSecurityAttributes) && java.util.Objects.equals(this.databaseFreeformTags, other.databaseFreeformTags) && java.util.Objects.equals(this.databaseDefinedTags, other.databaseDefinedTags) && java.util.Objects.equals(this.dataCollectionOptions, other.dataCollectionOptions) @@ -1209,6 +1312,7 @@ public int hashCode() { ? 43 : this.backupNetworkNsgIds.hashCode()); result = (result * PRIME) + (this.hostname == null ? 43 : this.hostname.hashCode()); + result = (result * PRIME) + (this.domain == null ? 43 : this.domain.hashCode()); result = (result * PRIME) + (this.timeZone == null ? 43 : this.timeZone.hashCode()); result = (result * PRIME) + (this.faultDomains == null ? 43 : this.faultDomains.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); @@ -1223,6 +1327,11 @@ public int hashCode() { + (this.dbSystemDefinedTags == null ? 43 : this.dbSystemDefinedTags.hashCode()); + result = + (result * PRIME) + + (this.dbSystemSecurityAttributes == null + ? 43 + : this.dbSystemSecurityAttributes.hashCode()); result = (result * PRIME) + (this.databaseFreeformTags == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDatabaseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDatabaseDetails.java index 71a9f65a8b9..e18d6adcafd 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDatabaseDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDatabaseDetails.java @@ -41,7 +41,8 @@ public final class CreateDatabaseDetails "kmsKeyId", "kmsKeyVersionId", "vaultId", - "sidPrefix" + "sidPrefix", + "keyStoreId" }) public CreateDatabaseDetails( String dbName, @@ -59,7 +60,8 @@ public CreateDatabaseDetails( String kmsKeyId, String kmsKeyVersionId, String vaultId, - String sidPrefix) { + String sidPrefix, + String keyStoreId) { super(); this.dbName = dbName; this.dbUniqueName = dbUniqueName; @@ -77,6 +79,7 @@ public CreateDatabaseDetails( this.kmsKeyVersionId = kmsKeyVersionId; this.vaultId = vaultId; this.sidPrefix = sidPrefix; + this.keyStoreId = keyStoreId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -365,6 +368,22 @@ public Builder sidPrefix(String sidPrefix) { this.__explicitlySet__.add("sidPrefix"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the key store of Oracle Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreId") + private String keyStoreId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the key store of Oracle Vault. + * @param keyStoreId the value to set + * @return this builder + **/ + public Builder keyStoreId(String keyStoreId) { + this.keyStoreId = keyStoreId; + this.__explicitlySet__.add("keyStoreId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -387,7 +406,8 @@ public CreateDatabaseDetails build() { this.kmsKeyId, this.kmsKeyVersionId, this.vaultId, - this.sidPrefix); + this.sidPrefix, + this.keyStoreId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -444,6 +464,9 @@ public Builder copy(CreateDatabaseDetails model) { if (model.wasPropertyExplicitlySet("sidPrefix")) { this.sidPrefix(model.getSidPrefix()); } + if (model.wasPropertyExplicitlySet("keyStoreId")) { + this.keyStoreId(model.getKeyStoreId()); + } return this; } } @@ -749,6 +772,20 @@ public String getSidPrefix() { return sidPrefix; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the key store of Oracle Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreId") + private final String keyStoreId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the key store of Oracle Vault. + * @return the value + **/ + public String getKeyStoreId() { + return keyStoreId; + } + @Override public String toString() { return this.toString(true); @@ -780,6 +817,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); sb.append(", vaultId=").append(String.valueOf(this.vaultId)); sb.append(", sidPrefix=").append(String.valueOf(this.sidPrefix)); + sb.append(", keyStoreId=").append(String.valueOf(this.keyStoreId)); sb.append(")"); return sb.toString(); } @@ -811,6 +849,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) && java.util.Objects.equals(this.vaultId, other.vaultId) && java.util.Objects.equals(this.sidPrefix, other.sidPrefix) + && java.util.Objects.equals(this.keyStoreId, other.keyStoreId) && super.equals(other); } @@ -848,6 +887,7 @@ public int hashCode() { + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); result = (result * PRIME) + (this.sidPrefix == null ? 43 : this.sidPrefix.hashCode()); + result = (result * PRIME) + (this.keyStoreId == null ? 43 : this.keyStoreId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDatabaseSoftwareImageDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDatabaseSoftwareImageDetails.java index 84a1f937564..641ff87f940 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDatabaseSoftwareImageDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDatabaseSoftwareImageDetails.java @@ -380,6 +380,7 @@ public enum ImageShapeFamily { VmBmShape("VM_BM_SHAPE"), ExadataShape("EXADATA_SHAPE"), ExaccShape("EXACC_SHAPE"), + ExadbxsShape("EXADBXS_SHAPE"), ; private final String value; diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDbHomeDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDbHomeDetails.java index 93387191988..7fde80fa7e9 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDbHomeDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDbHomeDetails.java @@ -30,7 +30,8 @@ public final class CreateDbHomeDetails extends com.oracle.bmc.http.internal.Expl "databaseSoftwareImageId", "database", "freeformTags", - "definedTags" + "definedTags", + "isUnifiedAuditingEnabled" }) public CreateDbHomeDetails( String displayName, @@ -38,7 +39,8 @@ public CreateDbHomeDetails( String databaseSoftwareImageId, CreateDatabaseDetails database, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + Boolean isUnifiedAuditingEnabled) { super(); this.displayName = displayName; this.dbVersion = dbVersion; @@ -46,6 +48,7 @@ public CreateDbHomeDetails( this.database = database; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.isUnifiedAuditingEnabled = isUnifiedAuditingEnabled; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -158,6 +161,24 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Indicates whether unified auditing is enabled or not + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isUnifiedAuditingEnabled") + private Boolean isUnifiedAuditingEnabled; + + /** + * Indicates whether unified auditing is enabled or not + * + * @param isUnifiedAuditingEnabled the value to set + * @return this builder + **/ + public Builder isUnifiedAuditingEnabled(Boolean isUnifiedAuditingEnabled) { + this.isUnifiedAuditingEnabled = isUnifiedAuditingEnabled; + this.__explicitlySet__.add("isUnifiedAuditingEnabled"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -170,7 +191,8 @@ public CreateDbHomeDetails build() { this.databaseSoftwareImageId, this.database, this.freeformTags, - this.definedTags); + this.definedTags, + this.isUnifiedAuditingEnabled); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -197,6 +219,9 @@ public Builder copy(CreateDbHomeDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("isUnifiedAuditingEnabled")) { + this.isUnifiedAuditingEnabled(model.getIsUnifiedAuditingEnabled()); + } return this; } } @@ -307,6 +332,22 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Indicates whether unified auditing is enabled or not + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isUnifiedAuditingEnabled") + private final Boolean isUnifiedAuditingEnabled; + + /** + * Indicates whether unified auditing is enabled or not + * + * @return the value + **/ + public Boolean getIsUnifiedAuditingEnabled() { + return isUnifiedAuditingEnabled; + } + @Override public String toString() { return this.toString(true); @@ -328,6 +369,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", database=").append(String.valueOf(this.database)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", isUnifiedAuditingEnabled=") + .append(String.valueOf(this.isUnifiedAuditingEnabled)); sb.append(")"); return sb.toString(); } @@ -349,6 +392,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.database, other.database) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals( + this.isUnifiedAuditingEnabled, other.isUnifiedAuditingEnabled) && super.equals(other); } @@ -366,6 +411,11 @@ public int hashCode() { result = (result * PRIME) + (this.database == null ? 43 : this.database.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.isUnifiedAuditingEnabled == null + ? 43 + : this.isUnifiedAuditingEnabled.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDbHomeFromBackupDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDbHomeFromBackupDetails.java index 779f0913d7d..665ed741ceb 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDbHomeFromBackupDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDbHomeFromBackupDetails.java @@ -27,6 +27,7 @@ public final class CreateDbHomeFromBackupDetails @Deprecated @java.beans.ConstructorProperties({ "displayName", + "isUnifiedAuditingEnabled", "databaseSoftwareImageId", "database", "freeformTags", @@ -34,12 +35,14 @@ public final class CreateDbHomeFromBackupDetails }) public CreateDbHomeFromBackupDetails( String displayName, + Boolean isUnifiedAuditingEnabled, String databaseSoftwareImageId, CreateDatabaseFromBackupDetails database, java.util.Map freeformTags, java.util.Map> definedTags) { super(); this.displayName = displayName; + this.isUnifiedAuditingEnabled = isUnifiedAuditingEnabled; this.databaseSoftwareImageId = databaseSoftwareImageId; this.database = database; this.freeformTags = freeformTags; @@ -64,6 +67,24 @@ public Builder displayName(String displayName) { this.__explicitlySet__.add("displayName"); return this; } + /** + * Indicates whether unified auditing is enabled or not + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isUnifiedAuditingEnabled") + private Boolean isUnifiedAuditingEnabled; + + /** + * Indicates whether unified auditing is enabled or not + * + * @param isUnifiedAuditingEnabled the value to set + * @return this builder + **/ + public Builder isUnifiedAuditingEnabled(Boolean isUnifiedAuditingEnabled) { + this.isUnifiedAuditingEnabled = isUnifiedAuditingEnabled; + this.__explicitlySet__.add("isUnifiedAuditingEnabled"); + return this; + } /** * The database software image [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the image to be used to restore a database. **/ @@ -142,6 +163,7 @@ public CreateDbHomeFromBackupDetails build() { CreateDbHomeFromBackupDetails model = new CreateDbHomeFromBackupDetails( this.displayName, + this.isUnifiedAuditingEnabled, this.databaseSoftwareImageId, this.database, this.freeformTags, @@ -157,6 +179,9 @@ public Builder copy(CreateDbHomeFromBackupDetails model) { if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } + if (model.wasPropertyExplicitlySet("isUnifiedAuditingEnabled")) { + this.isUnifiedAuditingEnabled(model.getIsUnifiedAuditingEnabled()); + } if (model.wasPropertyExplicitlySet("databaseSoftwareImageId")) { this.databaseSoftwareImageId(model.getDatabaseSoftwareImageId()); } @@ -198,6 +223,22 @@ public String getDisplayName() { return displayName; } + /** + * Indicates whether unified auditing is enabled or not + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isUnifiedAuditingEnabled") + private final Boolean isUnifiedAuditingEnabled; + + /** + * Indicates whether unified auditing is enabled or not + * + * @return the value + **/ + public Boolean getIsUnifiedAuditingEnabled() { + return isUnifiedAuditingEnabled; + } + /** * The database software image [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the image to be used to restore a database. **/ @@ -274,6 +315,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("CreateDbHomeFromBackupDetails("); sb.append("super=").append(super.toString()); sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", isUnifiedAuditingEnabled=") + .append(String.valueOf(this.isUnifiedAuditingEnabled)); sb.append(", databaseSoftwareImageId=") .append(String.valueOf(this.databaseSoftwareImageId)); sb.append(", database=").append(String.valueOf(this.database)); @@ -294,6 +337,8 @@ public boolean equals(Object o) { CreateDbHomeFromBackupDetails other = (CreateDbHomeFromBackupDetails) o; return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals( + this.isUnifiedAuditingEnabled, other.isUnifiedAuditingEnabled) && java.util.Objects.equals( this.databaseSoftwareImageId, other.databaseSoftwareImageId) && java.util.Objects.equals(this.database, other.database) @@ -307,6 +352,11 @@ public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.isUnifiedAuditingEnabled == null + ? 43 + : this.isUnifiedAuditingEnabled.hashCode()); result = (result * PRIME) + (this.databaseSoftwareImageId == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDbHomeFromDatabaseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDbHomeFromDatabaseDetails.java index 02a638aa50a..6b9998d5ad7 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDbHomeFromDatabaseDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDbHomeFromDatabaseDetails.java @@ -25,15 +25,23 @@ public final class CreateDbHomeFromDatabaseDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"displayName", "database", "freeformTags", "definedTags"}) + @java.beans.ConstructorProperties({ + "displayName", + "database", + "isUnifiedAuditingEnabled", + "freeformTags", + "definedTags" + }) public CreateDbHomeFromDatabaseDetails( String displayName, CreateDatabaseFromAnotherDatabaseDetails database, + Boolean isUnifiedAuditingEnabled, java.util.Map freeformTags, java.util.Map> definedTags) { super(); this.displayName = displayName; this.database = database; + this.isUnifiedAuditingEnabled = isUnifiedAuditingEnabled; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -65,6 +73,24 @@ public Builder database(CreateDatabaseFromAnotherDatabaseDetails database) { this.__explicitlySet__.add("database"); return this; } + /** + * Indicates whether unified auditing is enabled or not + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isUnifiedAuditingEnabled") + private Boolean isUnifiedAuditingEnabled; + + /** + * Indicates whether unified auditing is enabled or not + * + * @param isUnifiedAuditingEnabled the value to set + * @return this builder + **/ + public Builder isUnifiedAuditingEnabled(Boolean isUnifiedAuditingEnabled) { + this.isUnifiedAuditingEnabled = isUnifiedAuditingEnabled; + this.__explicitlySet__.add("isUnifiedAuditingEnabled"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -117,7 +143,11 @@ public Builder definedTags( public CreateDbHomeFromDatabaseDetails build() { CreateDbHomeFromDatabaseDetails model = new CreateDbHomeFromDatabaseDetails( - this.displayName, this.database, this.freeformTags, this.definedTags); + this.displayName, + this.database, + this.isUnifiedAuditingEnabled, + this.freeformTags, + this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -132,6 +162,9 @@ public Builder copy(CreateDbHomeFromDatabaseDetails model) { if (model.wasPropertyExplicitlySet("database")) { this.database(model.getDatabase()); } + if (model.wasPropertyExplicitlySet("isUnifiedAuditingEnabled")) { + this.isUnifiedAuditingEnabled(model.getIsUnifiedAuditingEnabled()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -174,6 +207,22 @@ public CreateDatabaseFromAnotherDatabaseDetails getDatabase() { return database; } + /** + * Indicates whether unified auditing is enabled or not + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isUnifiedAuditingEnabled") + private final Boolean isUnifiedAuditingEnabled; + + /** + * Indicates whether unified auditing is enabled or not + * + * @return the value + **/ + public Boolean getIsUnifiedAuditingEnabled() { + return isUnifiedAuditingEnabled; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -230,6 +279,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("displayName=").append(String.valueOf(this.displayName)); sb.append(", database=").append(String.valueOf(this.database)); + sb.append(", isUnifiedAuditingEnabled=") + .append(String.valueOf(this.isUnifiedAuditingEnabled)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -248,6 +299,8 @@ public boolean equals(Object o) { CreateDbHomeFromDatabaseDetails other = (CreateDbHomeFromDatabaseDetails) o; return java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.database, other.database) + && java.util.Objects.equals( + this.isUnifiedAuditingEnabled, other.isUnifiedAuditingEnabled) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -259,6 +312,11 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.database == null ? 43 : this.database.hashCode()); + result = + (result * PRIME) + + (this.isUnifiedAuditingEnabled == null + ? 43 + : this.isUnifiedAuditingEnabled.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExadbVmClusterDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExadbVmClusterDetails.java new file mode 100644 index 00000000000..a5cf74e0ac2 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExadbVmClusterDetails.java @@ -0,0 +1,1449 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details for the create Exadata VM cluster on Exascale Infrastructure operation. Applies to Exadata Database Service on Exascale Infrastructure only. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateExadbVmClusterDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateExadbVmClusterDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "availabilityDomain", + "subnetId", + "backupSubnetId", + "clusterName", + "displayName", + "hostname", + "domain", + "sshPublicKeys", + "licenseModel", + "timeZone", + "scanListenerPortTcp", + "scanListenerPortTcpSsl", + "privateZoneId", + "shape", + "nodeCount", + "totalECpuCount", + "enabledECpuCount", + "vmFileSystemStorage", + "exascaleDbStorageVaultId", + "nsgIds", + "backupNetworkNsgIds", + "gridImageId", + "systemVersion", + "freeformTags", + "definedTags", + "securityAttributes", + "dataCollectionOptions" + }) + public CreateExadbVmClusterDetails( + String compartmentId, + String availabilityDomain, + String subnetId, + String backupSubnetId, + String clusterName, + String displayName, + String hostname, + String domain, + java.util.List sshPublicKeys, + LicenseModel licenseModel, + String timeZone, + Integer scanListenerPortTcp, + Integer scanListenerPortTcpSsl, + String privateZoneId, + String shape, + Integer nodeCount, + Integer totalECpuCount, + Integer enabledECpuCount, + ExadbVmClusterStorageDetails vmFileSystemStorage, + String exascaleDbStorageVaultId, + java.util.List nsgIds, + java.util.List backupNetworkNsgIds, + String gridImageId, + String systemVersion, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> securityAttributes, + DataCollectionOptions dataCollectionOptions) { + super(); + this.compartmentId = compartmentId; + this.availabilityDomain = availabilityDomain; + this.subnetId = subnetId; + this.backupSubnetId = backupSubnetId; + this.clusterName = clusterName; + this.displayName = displayName; + this.hostname = hostname; + this.domain = domain; + this.sshPublicKeys = sshPublicKeys; + this.licenseModel = licenseModel; + this.timeZone = timeZone; + this.scanListenerPortTcp = scanListenerPortTcp; + this.scanListenerPortTcpSsl = scanListenerPortTcpSsl; + this.privateZoneId = privateZoneId; + this.shape = shape; + this.nodeCount = nodeCount; + this.totalECpuCount = totalECpuCount; + this.enabledECpuCount = enabledECpuCount; + this.vmFileSystemStorage = vmFileSystemStorage; + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.nsgIds = nsgIds; + this.backupNetworkNsgIds = backupNetworkNsgIds; + this.gridImageId = gridImageId; + this.systemVersion = systemVersion; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.securityAttributes = securityAttributes; + this.dataCollectionOptions = dataCollectionOptions; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The name of the availability domain in which the Exadata VM cluster on Exascale Infrastructure is located. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The name of the availability domain in which the Exadata VM cluster on Exascale Infrastructure is located. + * + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @param subnetId the value to set + * @return this builder + **/ + public Builder subnetId(String subnetId) { + this.subnetId = subnetId; + this.__explicitlySet__.add("subnetId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupSubnetId") + private String backupSubnetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @param backupSubnetId the value to set + * @return this builder + **/ + public Builder backupSubnetId(String backupSubnetId) { + this.backupSubnetId = backupSubnetId; + this.__explicitlySet__.add("backupSubnetId"); + return this; + } + /** + * The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterName") + private String clusterName; + + /** + * The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + * + * @param clusterName the value to set + * @return this builder + **/ + public Builder clusterName(String clusterName) { + this.clusterName = clusterName; + this.__explicitlySet__.add("clusterName"); + return this; + } + /** + * The user-friendly name for the Exadata VM cluster on Exascale Infrastructure. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the Exadata VM cluster on Exascale Infrastructure. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The hostname for the Exadata VM cluster on Exascale Infrastructure. The hostname must begin with an alphabetic character, and + * can contain alphanumeric characters and hyphens (-). For Exadata systems, the maximum length of the hostname is 12 characters. + *

+ * The maximum length of the combined hostname and domain is 63 characters. + *

+ **Note:** The hostname must be unique within the subnet. If it is not unique, + * then the Exadata VM cluster on Exascale Infrastructure will fail to provision. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hostname") + private String hostname; + + /** + * The hostname for the Exadata VM cluster on Exascale Infrastructure. The hostname must begin with an alphabetic character, and + * can contain alphanumeric characters and hyphens (-). For Exadata systems, the maximum length of the hostname is 12 characters. + *

+ * The maximum length of the combined hostname and domain is 63 characters. + *

+ **Note:** The hostname must be unique within the subnet. If it is not unique, + * then the Exadata VM cluster on Exascale Infrastructure will fail to provision. + * + * @param hostname the value to set + * @return this builder + **/ + public Builder hostname(String hostname) { + this.hostname = hostname; + this.__explicitlySet__.add("hostname"); + return this; + } + /** + * A domain name used for the Exadata VM cluster on Exascale Infrastructure. If the Oracle-provided internet and VCN + * resolver is enabled for the specified subnet, then the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. + * Applies to Exadata Database Service on Exascale Infrastructure only. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domain") + private String domain; + + /** + * A domain name used for the Exadata VM cluster on Exascale Infrastructure. If the Oracle-provided internet and VCN + * resolver is enabled for the specified subnet, then the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. + * Applies to Exadata Database Service on Exascale Infrastructure only. + * + * @param domain the value to set + * @return this builder + **/ + public Builder domain(String domain) { + this.domain = domain; + this.__explicitlySet__.add("domain"); + return this; + } + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sshPublicKeys") + private java.util.List sshPublicKeys; + + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + * @param sshPublicKeys the value to set + * @return this builder + **/ + public Builder sshPublicKeys(java.util.List sshPublicKeys) { + this.sshPublicKeys = sshPublicKeys; + this.__explicitlySet__.add("sshPublicKeys"); + return this; + } + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private LicenseModel licenseModel; + + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + * @param licenseModel the value to set + * @return this builder + **/ + public Builder licenseModel(LicenseModel licenseModel) { + this.licenseModel = licenseModel; + this.__explicitlySet__.add("licenseModel"); + return this; + } + /** + * The time zone to use for the Exadata VM cluster on Exascale Infrastructure. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeZone") + private String timeZone; + + /** + * The time zone to use for the Exadata VM cluster on Exascale Infrastructure. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + * @param timeZone the value to set + * @return this builder + **/ + public Builder timeZone(String timeZone) { + this.timeZone = timeZone; + this.__explicitlySet__.add("timeZone"); + return this; + } + /** + * The TCP Single Client Access Name (SCAN) port. The default port is 1521. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanListenerPortTcp") + private Integer scanListenerPortTcp; + + /** + * The TCP Single Client Access Name (SCAN) port. The default port is 1521. + * @param scanListenerPortTcp the value to set + * @return this builder + **/ + public Builder scanListenerPortTcp(Integer scanListenerPortTcp) { + this.scanListenerPortTcp = scanListenerPortTcp; + this.__explicitlySet__.add("scanListenerPortTcp"); + return this; + } + /** + * The Secured Communication (TCPS) protocol Single Client Access Name (SCAN) port. The default port is 2484. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanListenerPortTcpSsl") + private Integer scanListenerPortTcpSsl; + + /** + * The Secured Communication (TCPS) protocol Single Client Access Name (SCAN) port. The default port is 2484. + * + * @param scanListenerPortTcpSsl the value to set + * @return this builder + **/ + public Builder scanListenerPortTcpSsl(Integer scanListenerPortTcpSsl) { + this.scanListenerPortTcpSsl = scanListenerPortTcpSsl; + this.__explicitlySet__.add("scanListenerPortTcpSsl"); + return this; + } + /** + * The private zone ID in which you want DNS records to be created. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateZoneId") + private String privateZoneId; + + /** + * The private zone ID in which you want DNS records to be created. + * + * @param privateZoneId the value to set + * @return this builder + **/ + public Builder privateZoneId(String privateZoneId) { + this.privateZoneId = privateZoneId; + this.__explicitlySet__.add("privateZoneId"); + return this; + } + /** + * The shape of the Exadata VM cluster on Exascale Infrastructure resource + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private String shape; + + /** + * The shape of the Exadata VM cluster on Exascale Infrastructure resource + * + * @param shape the value to set + * @return this builder + **/ + public Builder shape(String shape) { + this.shape = shape; + this.__explicitlySet__.add("shape"); + return this; + } + /** + * The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") + private Integer nodeCount; + + /** + * The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + * + * @param nodeCount the value to set + * @return this builder + **/ + public Builder nodeCount(Integer nodeCount) { + this.nodeCount = nodeCount; + this.__explicitlySet__.add("nodeCount"); + return this; + } + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalECpuCount") + private Integer totalECpuCount; + + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + * @param totalECpuCount the value to set + * @return this builder + **/ + public Builder totalECpuCount(Integer totalECpuCount) { + this.totalECpuCount = totalECpuCount; + this.__explicitlySet__.add("totalECpuCount"); + return this; + } + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enabledECpuCount") + private Integer enabledECpuCount; + + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + * @param enabledECpuCount the value to set + * @return this builder + **/ + public Builder enabledECpuCount(Integer enabledECpuCount) { + this.enabledECpuCount = enabledECpuCount; + this.__explicitlySet__.add("enabledECpuCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmFileSystemStorage") + private ExadbVmClusterStorageDetails vmFileSystemStorage; + + public Builder vmFileSystemStorage(ExadbVmClusterStorageDetails vmFileSystemStorage) { + this.vmFileSystemStorage = vmFileSystemStorage; + this.__explicitlySet__.add("vmFileSystemStorage"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exascaleDbStorageVaultId") + private String exascaleDbStorageVaultId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + * @param exascaleDbStorageVaultId the value to set + * @return this builder + **/ + public Builder exascaleDbStorageVaultId(String exascaleDbStorageVaultId) { + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.__explicitlySet__.add("exascaleDbStorageVaultId"); + return this; + } + /** + * The list of [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). + * **NsgIds restrictions:** + * - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private java.util.List nsgIds; + + /** + * The list of [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). + * **NsgIds restrictions:** + * - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. + * + * @param nsgIds the value to set + * @return this builder + **/ + public Builder nsgIds(java.util.List nsgIds) { + this.nsgIds = nsgIds; + this.__explicitlySet__.add("nsgIds"); + return this; + } + /** + * A list of the [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupNetworkNsgIds") + private java.util.List backupNetworkNsgIds; + + /** + * A list of the [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + * @param backupNetworkNsgIds the value to set + * @return this builder + **/ + public Builder backupNetworkNsgIds(java.util.List backupNetworkNsgIds) { + this.backupNetworkNsgIds = backupNetworkNsgIds; + this.__explicitlySet__.add("backupNetworkNsgIds"); + return this; + } + /** + * Grid Setup will be done using this grid image id. + *

+ * The grid image id can be extracted from + * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= + * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using + * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gridImageId") + private String gridImageId; + + /** + * Grid Setup will be done using this grid image id. + *

+ * The grid image id can be extracted from + * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= + * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using + * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * + * @param gridImageId the value to set + * @return this builder + **/ + public Builder gridImageId(String gridImageId) { + this.gridImageId = gridImageId; + this.__explicitlySet__.add("gridImageId"); + return this; + } + /** + * Operating system version of the image. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemVersion") + private String systemVersion; + + /** + * Operating system version of the image. + * @param systemVersion the value to set + * @return this builder + **/ + public Builder systemVersion(String systemVersion) { + this.systemVersion = systemVersion; + this.__explicitlySet__.add("systemVersion"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataCollectionOptions") + private DataCollectionOptions dataCollectionOptions; + + public Builder dataCollectionOptions(DataCollectionOptions dataCollectionOptions) { + this.dataCollectionOptions = dataCollectionOptions; + this.__explicitlySet__.add("dataCollectionOptions"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateExadbVmClusterDetails build() { + CreateExadbVmClusterDetails model = + new CreateExadbVmClusterDetails( + this.compartmentId, + this.availabilityDomain, + this.subnetId, + this.backupSubnetId, + this.clusterName, + this.displayName, + this.hostname, + this.domain, + this.sshPublicKeys, + this.licenseModel, + this.timeZone, + this.scanListenerPortTcp, + this.scanListenerPortTcpSsl, + this.privateZoneId, + this.shape, + this.nodeCount, + this.totalECpuCount, + this.enabledECpuCount, + this.vmFileSystemStorage, + this.exascaleDbStorageVaultId, + this.nsgIds, + this.backupNetworkNsgIds, + this.gridImageId, + this.systemVersion, + this.freeformTags, + this.definedTags, + this.securityAttributes, + this.dataCollectionOptions); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateExadbVmClusterDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + if (model.wasPropertyExplicitlySet("backupSubnetId")) { + this.backupSubnetId(model.getBackupSubnetId()); + } + if (model.wasPropertyExplicitlySet("clusterName")) { + this.clusterName(model.getClusterName()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("hostname")) { + this.hostname(model.getHostname()); + } + if (model.wasPropertyExplicitlySet("domain")) { + this.domain(model.getDomain()); + } + if (model.wasPropertyExplicitlySet("sshPublicKeys")) { + this.sshPublicKeys(model.getSshPublicKeys()); + } + if (model.wasPropertyExplicitlySet("licenseModel")) { + this.licenseModel(model.getLicenseModel()); + } + if (model.wasPropertyExplicitlySet("timeZone")) { + this.timeZone(model.getTimeZone()); + } + if (model.wasPropertyExplicitlySet("scanListenerPortTcp")) { + this.scanListenerPortTcp(model.getScanListenerPortTcp()); + } + if (model.wasPropertyExplicitlySet("scanListenerPortTcpSsl")) { + this.scanListenerPortTcpSsl(model.getScanListenerPortTcpSsl()); + } + if (model.wasPropertyExplicitlySet("privateZoneId")) { + this.privateZoneId(model.getPrivateZoneId()); + } + if (model.wasPropertyExplicitlySet("shape")) { + this.shape(model.getShape()); + } + if (model.wasPropertyExplicitlySet("nodeCount")) { + this.nodeCount(model.getNodeCount()); + } + if (model.wasPropertyExplicitlySet("totalECpuCount")) { + this.totalECpuCount(model.getTotalECpuCount()); + } + if (model.wasPropertyExplicitlySet("enabledECpuCount")) { + this.enabledECpuCount(model.getEnabledECpuCount()); + } + if (model.wasPropertyExplicitlySet("vmFileSystemStorage")) { + this.vmFileSystemStorage(model.getVmFileSystemStorage()); + } + if (model.wasPropertyExplicitlySet("exascaleDbStorageVaultId")) { + this.exascaleDbStorageVaultId(model.getExascaleDbStorageVaultId()); + } + if (model.wasPropertyExplicitlySet("nsgIds")) { + this.nsgIds(model.getNsgIds()); + } + if (model.wasPropertyExplicitlySet("backupNetworkNsgIds")) { + this.backupNetworkNsgIds(model.getBackupNetworkNsgIds()); + } + if (model.wasPropertyExplicitlySet("gridImageId")) { + this.gridImageId(model.getGridImageId()); + } + if (model.wasPropertyExplicitlySet("systemVersion")) { + this.systemVersion(model.getSystemVersion()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } + if (model.wasPropertyExplicitlySet("dataCollectionOptions")) { + this.dataCollectionOptions(model.getDataCollectionOptions()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The name of the availability domain in which the Exadata VM cluster on Exascale Infrastructure is located. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The name of the availability domain in which the Exadata VM cluster on Exascale Infrastructure is located. + * + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public String getSubnetId() { + return subnetId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupSubnetId") + private final String backupSubnetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public String getBackupSubnetId() { + return backupSubnetId; + } + + /** + * The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterName") + private final String clusterName; + + /** + * The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + * + * @return the value + **/ + public String getClusterName() { + return clusterName; + } + + /** + * The user-friendly name for the Exadata VM cluster on Exascale Infrastructure. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the Exadata VM cluster on Exascale Infrastructure. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The hostname for the Exadata VM cluster on Exascale Infrastructure. The hostname must begin with an alphabetic character, and + * can contain alphanumeric characters and hyphens (-). For Exadata systems, the maximum length of the hostname is 12 characters. + *

+ * The maximum length of the combined hostname and domain is 63 characters. + *

+ **Note:** The hostname must be unique within the subnet. If it is not unique, + * then the Exadata VM cluster on Exascale Infrastructure will fail to provision. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hostname") + private final String hostname; + + /** + * The hostname for the Exadata VM cluster on Exascale Infrastructure. The hostname must begin with an alphabetic character, and + * can contain alphanumeric characters and hyphens (-). For Exadata systems, the maximum length of the hostname is 12 characters. + *

+ * The maximum length of the combined hostname and domain is 63 characters. + *

+ **Note:** The hostname must be unique within the subnet. If it is not unique, + * then the Exadata VM cluster on Exascale Infrastructure will fail to provision. + * + * @return the value + **/ + public String getHostname() { + return hostname; + } + + /** + * A domain name used for the Exadata VM cluster on Exascale Infrastructure. If the Oracle-provided internet and VCN + * resolver is enabled for the specified subnet, then the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. + * Applies to Exadata Database Service on Exascale Infrastructure only. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domain") + private final String domain; + + /** + * A domain name used for the Exadata VM cluster on Exascale Infrastructure. If the Oracle-provided internet and VCN + * resolver is enabled for the specified subnet, then the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. + * Applies to Exadata Database Service on Exascale Infrastructure only. + * + * @return the value + **/ + public String getDomain() { + return domain; + } + + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sshPublicKeys") + private final java.util.List sshPublicKeys; + + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + * @return the value + **/ + public java.util.List getSshPublicKeys() { + return sshPublicKeys; + } + + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + public enum LicenseModel { + LicenseIncluded("LICENSE_INCLUDED"), + BringYourOwnLicense("BRING_YOUR_OWN_LICENSE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LicenseModel v : LicenseModel.values()) { + map.put(v.getValue(), v); + } + } + + LicenseModel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LicenseModel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid LicenseModel: " + key); + } + }; + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private final LicenseModel licenseModel; + + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + * @return the value + **/ + public LicenseModel getLicenseModel() { + return licenseModel; + } + + /** + * The time zone to use for the Exadata VM cluster on Exascale Infrastructure. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeZone") + private final String timeZone; + + /** + * The time zone to use for the Exadata VM cluster on Exascale Infrastructure. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + * @return the value + **/ + public String getTimeZone() { + return timeZone; + } + + /** + * The TCP Single Client Access Name (SCAN) port. The default port is 1521. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanListenerPortTcp") + private final Integer scanListenerPortTcp; + + /** + * The TCP Single Client Access Name (SCAN) port. The default port is 1521. + * @return the value + **/ + public Integer getScanListenerPortTcp() { + return scanListenerPortTcp; + } + + /** + * The Secured Communication (TCPS) protocol Single Client Access Name (SCAN) port. The default port is 2484. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanListenerPortTcpSsl") + private final Integer scanListenerPortTcpSsl; + + /** + * The Secured Communication (TCPS) protocol Single Client Access Name (SCAN) port. The default port is 2484. + * + * @return the value + **/ + public Integer getScanListenerPortTcpSsl() { + return scanListenerPortTcpSsl; + } + + /** + * The private zone ID in which you want DNS records to be created. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateZoneId") + private final String privateZoneId; + + /** + * The private zone ID in which you want DNS records to be created. + * + * @return the value + **/ + public String getPrivateZoneId() { + return privateZoneId; + } + + /** + * The shape of the Exadata VM cluster on Exascale Infrastructure resource + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private final String shape; + + /** + * The shape of the Exadata VM cluster on Exascale Infrastructure resource + * + * @return the value + **/ + public String getShape() { + return shape; + } + + /** + * The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") + private final Integer nodeCount; + + /** + * The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public Integer getNodeCount() { + return nodeCount; + } + + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalECpuCount") + private final Integer totalECpuCount; + + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public Integer getTotalECpuCount() { + return totalECpuCount; + } + + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enabledECpuCount") + private final Integer enabledECpuCount; + + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public Integer getEnabledECpuCount() { + return enabledECpuCount; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmFileSystemStorage") + private final ExadbVmClusterStorageDetails vmFileSystemStorage; + + public ExadbVmClusterStorageDetails getVmFileSystemStorage() { + return vmFileSystemStorage; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exascaleDbStorageVaultId") + private final String exascaleDbStorageVaultId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + * @return the value + **/ + public String getExascaleDbStorageVaultId() { + return exascaleDbStorageVaultId; + } + + /** + * The list of [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). + * **NsgIds restrictions:** + * - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private final java.util.List nsgIds; + + /** + * The list of [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). + * **NsgIds restrictions:** + * - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. + * + * @return the value + **/ + public java.util.List getNsgIds() { + return nsgIds; + } + + /** + * A list of the [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupNetworkNsgIds") + private final java.util.List backupNetworkNsgIds; + + /** + * A list of the [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + * @return the value + **/ + public java.util.List getBackupNetworkNsgIds() { + return backupNetworkNsgIds; + } + + /** + * Grid Setup will be done using this grid image id. + *

+ * The grid image id can be extracted from + * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= + * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using + * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gridImageId") + private final String gridImageId; + + /** + * Grid Setup will be done using this grid image id. + *

+ * The grid image id can be extracted from + * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= + * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using + * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * + * @return the value + **/ + public String getGridImageId() { + return gridImageId; + } + + /** + * Operating system version of the image. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemVersion") + private final String systemVersion; + + /** + * Operating system version of the image. + * @return the value + **/ + public String getSystemVersion() { + return systemVersion; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataCollectionOptions") + private final DataCollectionOptions dataCollectionOptions; + + public DataCollectionOptions getDataCollectionOptions() { + return dataCollectionOptions; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateExadbVmClusterDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", backupSubnetId=").append(String.valueOf(this.backupSubnetId)); + sb.append(", clusterName=").append(String.valueOf(this.clusterName)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", hostname=").append(String.valueOf(this.hostname)); + sb.append(", domain=").append(String.valueOf(this.domain)); + sb.append(", sshPublicKeys=").append(String.valueOf(this.sshPublicKeys)); + sb.append(", licenseModel=").append(String.valueOf(this.licenseModel)); + sb.append(", timeZone=").append(String.valueOf(this.timeZone)); + sb.append(", scanListenerPortTcp=").append(String.valueOf(this.scanListenerPortTcp)); + sb.append(", scanListenerPortTcpSsl=").append(String.valueOf(this.scanListenerPortTcpSsl)); + sb.append(", privateZoneId=").append(String.valueOf(this.privateZoneId)); + sb.append(", shape=").append(String.valueOf(this.shape)); + sb.append(", nodeCount=").append(String.valueOf(this.nodeCount)); + sb.append(", totalECpuCount=").append(String.valueOf(this.totalECpuCount)); + sb.append(", enabledECpuCount=").append(String.valueOf(this.enabledECpuCount)); + sb.append(", vmFileSystemStorage=").append(String.valueOf(this.vmFileSystemStorage)); + sb.append(", exascaleDbStorageVaultId=") + .append(String.valueOf(this.exascaleDbStorageVaultId)); + sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); + sb.append(", backupNetworkNsgIds=").append(String.valueOf(this.backupNetworkNsgIds)); + sb.append(", gridImageId=").append(String.valueOf(this.gridImageId)); + sb.append(", systemVersion=").append(String.valueOf(this.systemVersion)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); + sb.append(", dataCollectionOptions=").append(String.valueOf(this.dataCollectionOptions)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateExadbVmClusterDetails)) { + return false; + } + + CreateExadbVmClusterDetails other = (CreateExadbVmClusterDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals(this.backupSubnetId, other.backupSubnetId) + && java.util.Objects.equals(this.clusterName, other.clusterName) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.hostname, other.hostname) + && java.util.Objects.equals(this.domain, other.domain) + && java.util.Objects.equals(this.sshPublicKeys, other.sshPublicKeys) + && java.util.Objects.equals(this.licenseModel, other.licenseModel) + && java.util.Objects.equals(this.timeZone, other.timeZone) + && java.util.Objects.equals(this.scanListenerPortTcp, other.scanListenerPortTcp) + && java.util.Objects.equals( + this.scanListenerPortTcpSsl, other.scanListenerPortTcpSsl) + && java.util.Objects.equals(this.privateZoneId, other.privateZoneId) + && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.nodeCount, other.nodeCount) + && java.util.Objects.equals(this.totalECpuCount, other.totalECpuCount) + && java.util.Objects.equals(this.enabledECpuCount, other.enabledECpuCount) + && java.util.Objects.equals(this.vmFileSystemStorage, other.vmFileSystemStorage) + && java.util.Objects.equals( + this.exascaleDbStorageVaultId, other.exascaleDbStorageVaultId) + && java.util.Objects.equals(this.nsgIds, other.nsgIds) + && java.util.Objects.equals(this.backupNetworkNsgIds, other.backupNetworkNsgIds) + && java.util.Objects.equals(this.gridImageId, other.gridImageId) + && java.util.Objects.equals(this.systemVersion, other.systemVersion) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) + && java.util.Objects.equals(this.dataCollectionOptions, other.dataCollectionOptions) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); + result = + (result * PRIME) + + (this.backupSubnetId == null ? 43 : this.backupSubnetId.hashCode()); + result = (result * PRIME) + (this.clusterName == null ? 43 : this.clusterName.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.hostname == null ? 43 : this.hostname.hashCode()); + result = (result * PRIME) + (this.domain == null ? 43 : this.domain.hashCode()); + result = + (result * PRIME) + + (this.sshPublicKeys == null ? 43 : this.sshPublicKeys.hashCode()); + result = (result * PRIME) + (this.licenseModel == null ? 43 : this.licenseModel.hashCode()); + result = (result * PRIME) + (this.timeZone == null ? 43 : this.timeZone.hashCode()); + result = + (result * PRIME) + + (this.scanListenerPortTcp == null + ? 43 + : this.scanListenerPortTcp.hashCode()); + result = + (result * PRIME) + + (this.scanListenerPortTcpSsl == null + ? 43 + : this.scanListenerPortTcpSsl.hashCode()); + result = + (result * PRIME) + + (this.privateZoneId == null ? 43 : this.privateZoneId.hashCode()); + result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); + result = (result * PRIME) + (this.nodeCount == null ? 43 : this.nodeCount.hashCode()); + result = + (result * PRIME) + + (this.totalECpuCount == null ? 43 : this.totalECpuCount.hashCode()); + result = + (result * PRIME) + + (this.enabledECpuCount == null ? 43 : this.enabledECpuCount.hashCode()); + result = + (result * PRIME) + + (this.vmFileSystemStorage == null + ? 43 + : this.vmFileSystemStorage.hashCode()); + result = + (result * PRIME) + + (this.exascaleDbStorageVaultId == null + ? 43 + : this.exascaleDbStorageVaultId.hashCode()); + result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); + result = + (result * PRIME) + + (this.backupNetworkNsgIds == null + ? 43 + : this.backupNetworkNsgIds.hashCode()); + result = (result * PRIME) + (this.gridImageId == null ? 43 : this.gridImageId.hashCode()); + result = + (result * PRIME) + + (this.systemVersion == null ? 43 : this.systemVersion.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); + result = + (result * PRIME) + + (this.dataCollectionOptions == null + ? 43 + : this.dataCollectionOptions.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExascaleDbStorageVaultDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExascaleDbStorageVaultDetails.java new file mode 100644 index 00000000000..a791658dfd7 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExascaleDbStorageVaultDetails.java @@ -0,0 +1,546 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details to create a Exadata Database Storage Vault. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateExascaleDbStorageVaultDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateExascaleDbStorageVaultDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "displayName", + "description", + "availabilityDomain", + "timeZone", + "highCapacityDatabaseStorage", + "additionalFlashCacheInPercent", + "freeformTags", + "definedTags", + "exadataInfrastructureId" + }) + public CreateExascaleDbStorageVaultDetails( + String compartmentId, + String displayName, + String description, + String availabilityDomain, + String timeZone, + ExascaleDbStorageInputDetails highCapacityDatabaseStorage, + Integer additionalFlashCacheInPercent, + java.util.Map freeformTags, + java.util.Map> definedTags, + String exadataInfrastructureId) { + super(); + this.compartmentId = compartmentId; + this.displayName = displayName; + this.description = description; + this.availabilityDomain = availabilityDomain; + this.timeZone = timeZone; + this.highCapacityDatabaseStorage = highCapacityDatabaseStorage; + this.additionalFlashCacheInPercent = additionalFlashCacheInPercent; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.exadataInfrastructureId = exadataInfrastructureId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Exadata Database Storage Vault description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Exadata Database Storage Vault description. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The name of the availability domain in which the Exadata Database Storage Vault is located. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The name of the availability domain in which the Exadata Database Storage Vault is located. + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + /** + * The time zone that you want to use for the Exadata Database Storage Vault. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeZone") + private String timeZone; + + /** + * The time zone that you want to use for the Exadata Database Storage Vault. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + * @param timeZone the value to set + * @return this builder + **/ + public Builder timeZone(String timeZone) { + this.timeZone = timeZone; + this.__explicitlySet__.add("timeZone"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("highCapacityDatabaseStorage") + private ExascaleDbStorageInputDetails highCapacityDatabaseStorage; + + public Builder highCapacityDatabaseStorage( + ExascaleDbStorageInputDetails highCapacityDatabaseStorage) { + this.highCapacityDatabaseStorage = highCapacityDatabaseStorage; + this.__explicitlySet__.add("highCapacityDatabaseStorage"); + return this; + } + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalFlashCacheInPercent") + private Integer additionalFlashCacheInPercent; + + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + * + * @param additionalFlashCacheInPercent the value to set + * @return this builder + **/ + public Builder additionalFlashCacheInPercent(Integer additionalFlashCacheInPercent) { + this.additionalFlashCacheInPercent = additionalFlashCacheInPercent; + this.__explicitlySet__.add("additionalFlashCacheInPercent"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exadataInfrastructureId") + private String exadataInfrastructureId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata infrastructure. + * @param exadataInfrastructureId the value to set + * @return this builder + **/ + public Builder exadataInfrastructureId(String exadataInfrastructureId) { + this.exadataInfrastructureId = exadataInfrastructureId; + this.__explicitlySet__.add("exadataInfrastructureId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateExascaleDbStorageVaultDetails build() { + CreateExascaleDbStorageVaultDetails model = + new CreateExascaleDbStorageVaultDetails( + this.compartmentId, + this.displayName, + this.description, + this.availabilityDomain, + this.timeZone, + this.highCapacityDatabaseStorage, + this.additionalFlashCacheInPercent, + this.freeformTags, + this.definedTags, + this.exadataInfrastructureId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateExascaleDbStorageVaultDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("timeZone")) { + this.timeZone(model.getTimeZone()); + } + if (model.wasPropertyExplicitlySet("highCapacityDatabaseStorage")) { + this.highCapacityDatabaseStorage(model.getHighCapacityDatabaseStorage()); + } + if (model.wasPropertyExplicitlySet("additionalFlashCacheInPercent")) { + this.additionalFlashCacheInPercent(model.getAdditionalFlashCacheInPercent()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("exadataInfrastructureId")) { + this.exadataInfrastructureId(model.getExadataInfrastructureId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Exadata Database Storage Vault description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Exadata Database Storage Vault description. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The name of the availability domain in which the Exadata Database Storage Vault is located. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The name of the availability domain in which the Exadata Database Storage Vault is located. + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The time zone that you want to use for the Exadata Database Storage Vault. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeZone") + private final String timeZone; + + /** + * The time zone that you want to use for the Exadata Database Storage Vault. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + * @return the value + **/ + public String getTimeZone() { + return timeZone; + } + + @com.fasterxml.jackson.annotation.JsonProperty("highCapacityDatabaseStorage") + private final ExascaleDbStorageInputDetails highCapacityDatabaseStorage; + + public ExascaleDbStorageInputDetails getHighCapacityDatabaseStorage() { + return highCapacityDatabaseStorage; + } + + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalFlashCacheInPercent") + private final Integer additionalFlashCacheInPercent; + + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + * + * @return the value + **/ + public Integer getAdditionalFlashCacheInPercent() { + return additionalFlashCacheInPercent; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exadataInfrastructureId") + private final String exadataInfrastructureId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata infrastructure. + * @return the value + **/ + public String getExadataInfrastructureId() { + return exadataInfrastructureId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateExascaleDbStorageVaultDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", timeZone=").append(String.valueOf(this.timeZone)); + sb.append(", highCapacityDatabaseStorage=") + .append(String.valueOf(this.highCapacityDatabaseStorage)); + sb.append(", additionalFlashCacheInPercent=") + .append(String.valueOf(this.additionalFlashCacheInPercent)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", exadataInfrastructureId=") + .append(String.valueOf(this.exadataInfrastructureId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateExascaleDbStorageVaultDetails)) { + return false; + } + + CreateExascaleDbStorageVaultDetails other = (CreateExascaleDbStorageVaultDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.timeZone, other.timeZone) + && java.util.Objects.equals( + this.highCapacityDatabaseStorage, other.highCapacityDatabaseStorage) + && java.util.Objects.equals( + this.additionalFlashCacheInPercent, other.additionalFlashCacheInPercent) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals( + this.exadataInfrastructureId, other.exadataInfrastructureId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = (result * PRIME) + (this.timeZone == null ? 43 : this.timeZone.hashCode()); + result = + (result * PRIME) + + (this.highCapacityDatabaseStorage == null + ? 43 + : this.highCapacityDatabaseStorage.hashCode()); + result = + (result * PRIME) + + (this.additionalFlashCacheInPercent == null + ? 43 + : this.additionalFlashCacheInPercent.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.exadataInfrastructureId == null + ? 43 + : this.exadataInfrastructureId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExecutionActionDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExecutionActionDetails.java new file mode 100644 index 00000000000..ebd7ef8acbb --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExecutionActionDetails.java @@ -0,0 +1,457 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Request to create execution action resource. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateExecutionActionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateExecutionActionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "executionWindowId", + "actionType", + "actionParams", + "actionMembers", + "freeformTags", + "definedTags" + }) + public CreateExecutionActionDetails( + String compartmentId, + String executionWindowId, + ActionType actionType, + java.util.Map actionParams, + java.util.List actionMembers, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.compartmentId = compartmentId; + this.executionWindowId = executionWindowId; + this.actionType = actionType; + this.actionParams = actionParams; + this.actionMembers = actionMembers; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window resource the execution action belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionWindowId") + private String executionWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window resource the execution action belongs to. + * @param executionWindowId the value to set + * @return this builder + **/ + public Builder executionWindowId(String executionWindowId) { + this.executionWindowId = executionWindowId; + this.__explicitlySet__.add("executionWindowId"); + return this; + } + /** + * The action type of the execution action being performed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + /** + * The action type of the execution action being performed + * @param actionType the value to set + * @return this builder + **/ + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionParams") + private java.util.Map actionParams; + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + * @param actionParams the value to set + * @return this builder + **/ + public Builder actionParams(java.util.Map actionParams) { + this.actionParams = actionParams; + this.__explicitlySet__.add("actionParams"); + return this; + } + /** + * List of action members of this execution action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionMembers") + private java.util.List actionMembers; + + /** + * List of action members of this execution action. + * @param actionMembers the value to set + * @return this builder + **/ + public Builder actionMembers(java.util.List actionMembers) { + this.actionMembers = actionMembers; + this.__explicitlySet__.add("actionMembers"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateExecutionActionDetails build() { + CreateExecutionActionDetails model = + new CreateExecutionActionDetails( + this.compartmentId, + this.executionWindowId, + this.actionType, + this.actionParams, + this.actionMembers, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateExecutionActionDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("executionWindowId")) { + this.executionWindowId(model.getExecutionWindowId()); + } + if (model.wasPropertyExplicitlySet("actionType")) { + this.actionType(model.getActionType()); + } + if (model.wasPropertyExplicitlySet("actionParams")) { + this.actionParams(model.getActionParams()); + } + if (model.wasPropertyExplicitlySet("actionMembers")) { + this.actionMembers(model.getActionMembers()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window resource the execution action belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionWindowId") + private final String executionWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window resource the execution action belongs to. + * @return the value + **/ + public String getExecutionWindowId() { + return executionWindowId; + } + + /** + * The action type of the execution action being performed + **/ + public enum ActionType { + DbServerFullSoftwareUpdate("DB_SERVER_FULL_SOFTWARE_UPDATE"), + StorageServerFullSoftwareUpdate("STORAGE_SERVER_FULL_SOFTWARE_UPDATE"), + NetworkSwitchFullSoftwareUpdate("NETWORK_SWITCH_FULL_SOFTWARE_UPDATE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActionType v : ActionType.values()) { + map.put(v.getValue(), v); + } + } + + ActionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ActionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ActionType: " + key); + } + }; + /** + * The action type of the execution action being performed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private final ActionType actionType; + + /** + * The action type of the execution action being performed + * @return the value + **/ + public ActionType getActionType() { + return actionType; + } + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionParams") + private final java.util.Map actionParams; + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + * @return the value + **/ + public java.util.Map getActionParams() { + return actionParams; + } + + /** + * List of action members of this execution action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionMembers") + private final java.util.List actionMembers; + + /** + * List of action members of this execution action. + * @return the value + **/ + public java.util.List getActionMembers() { + return actionMembers; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateExecutionActionDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", executionWindowId=").append(String.valueOf(this.executionWindowId)); + sb.append(", actionType=").append(String.valueOf(this.actionType)); + sb.append(", actionParams=").append(String.valueOf(this.actionParams)); + sb.append(", actionMembers=").append(String.valueOf(this.actionMembers)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateExecutionActionDetails)) { + return false; + } + + CreateExecutionActionDetails other = (CreateExecutionActionDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.executionWindowId, other.executionWindowId) + && java.util.Objects.equals(this.actionType, other.actionType) + && java.util.Objects.equals(this.actionParams, other.actionParams) + && java.util.Objects.equals(this.actionMembers, other.actionMembers) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.executionWindowId == null ? 43 : this.executionWindowId.hashCode()); + result = (result * PRIME) + (this.actionType == null ? 43 : this.actionType.hashCode()); + result = (result * PRIME) + (this.actionParams == null ? 43 : this.actionParams.hashCode()); + result = + (result * PRIME) + + (this.actionMembers == null ? 43 : this.actionMembers.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExecutionWindowDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExecutionWindowDetails.java new file mode 100644 index 00000000000..1dd24c2f92c --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExecutionWindowDetails.java @@ -0,0 +1,427 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Request to create an execution window resource under an execution resource. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateExecutionWindowDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateExecutionWindowDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "executionResourceId", + "timeScheduled", + "windowDurationInMins", + "isEnforcedDuration", + "freeformTags", + "definedTags" + }) + public CreateExecutionWindowDetails( + String compartmentId, + String executionResourceId, + java.util.Date timeScheduled, + Integer windowDurationInMins, + Boolean isEnforcedDuration, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.compartmentId = compartmentId; + this.executionResourceId = executionResourceId; + this.timeScheduled = timeScheduled; + this.windowDurationInMins = windowDurationInMins; + this.isEnforcedDuration = isEnforcedDuration; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution resource the execution window belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionResourceId") + private String executionResourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution resource the execution window belongs to. + * @param executionResourceId the value to set + * @return this builder + **/ + public Builder executionResourceId(String executionResourceId) { + this.executionResourceId = executionResourceId; + this.__explicitlySet__.add("executionResourceId"); + return this; + } + /** + * The scheduled start date and time of the execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduled") + private java.util.Date timeScheduled; + + /** + * The scheduled start date and time of the execution window. + * @param timeScheduled the value to set + * @return this builder + **/ + public Builder timeScheduled(java.util.Date timeScheduled) { + this.timeScheduled = timeScheduled; + this.__explicitlySet__.add("timeScheduled"); + return this; + } + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("windowDurationInMins") + private Integer windowDurationInMins; + + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + * @param windowDurationInMins the value to set + * @return this builder + **/ + public Builder windowDurationInMins(Integer windowDurationInMins) { + this.windowDurationInMins = windowDurationInMins; + this.__explicitlySet__.add("windowDurationInMins"); + return this; + } + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnforcedDuration") + private Boolean isEnforcedDuration; + + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + * @param isEnforcedDuration the value to set + * @return this builder + **/ + public Builder isEnforcedDuration(Boolean isEnforcedDuration) { + this.isEnforcedDuration = isEnforcedDuration; + this.__explicitlySet__.add("isEnforcedDuration"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateExecutionWindowDetails build() { + CreateExecutionWindowDetails model = + new CreateExecutionWindowDetails( + this.compartmentId, + this.executionResourceId, + this.timeScheduled, + this.windowDurationInMins, + this.isEnforcedDuration, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateExecutionWindowDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("executionResourceId")) { + this.executionResourceId(model.getExecutionResourceId()); + } + if (model.wasPropertyExplicitlySet("timeScheduled")) { + this.timeScheduled(model.getTimeScheduled()); + } + if (model.wasPropertyExplicitlySet("windowDurationInMins")) { + this.windowDurationInMins(model.getWindowDurationInMins()); + } + if (model.wasPropertyExplicitlySet("isEnforcedDuration")) { + this.isEnforcedDuration(model.getIsEnforcedDuration()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution resource the execution window belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionResourceId") + private final String executionResourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution resource the execution window belongs to. + * @return the value + **/ + public String getExecutionResourceId() { + return executionResourceId; + } + + /** + * The scheduled start date and time of the execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduled") + private final java.util.Date timeScheduled; + + /** + * The scheduled start date and time of the execution window. + * @return the value + **/ + public java.util.Date getTimeScheduled() { + return timeScheduled; + } + + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("windowDurationInMins") + private final Integer windowDurationInMins; + + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + * @return the value + **/ + public Integer getWindowDurationInMins() { + return windowDurationInMins; + } + + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnforcedDuration") + private final Boolean isEnforcedDuration; + + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + * @return the value + **/ + public Boolean getIsEnforcedDuration() { + return isEnforcedDuration; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateExecutionWindowDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", executionResourceId=").append(String.valueOf(this.executionResourceId)); + sb.append(", timeScheduled=").append(String.valueOf(this.timeScheduled)); + sb.append(", windowDurationInMins=").append(String.valueOf(this.windowDurationInMins)); + sb.append(", isEnforcedDuration=").append(String.valueOf(this.isEnforcedDuration)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateExecutionWindowDetails)) { + return false; + } + + CreateExecutionWindowDetails other = (CreateExecutionWindowDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.executionResourceId, other.executionResourceId) + && java.util.Objects.equals(this.timeScheduled, other.timeScheduled) + && java.util.Objects.equals(this.windowDurationInMins, other.windowDurationInMins) + && java.util.Objects.equals(this.isEnforcedDuration, other.isEnforcedDuration) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.executionResourceId == null + ? 43 + : this.executionResourceId.hashCode()); + result = + (result * PRIME) + + (this.timeScheduled == null ? 43 : this.timeScheduled.hashCode()); + result = + (result * PRIME) + + (this.windowDurationInMins == null + ? 43 + : this.windowDurationInMins.hashCode()); + result = + (result * PRIME) + + (this.isEnforcedDuration == null + ? 43 + : this.isEnforcedDuration.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateMaintenanceRunDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateMaintenanceRunDetails.java index 85c62955b61..383f28c6061 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateMaintenanceRunDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateMaintenanceRunDetails.java @@ -29,7 +29,8 @@ public final class CreateMaintenanceRunDetails "timeScheduled", "patchingMode", "patchType", - "compartmentId" + "compartmentId", + "databaseSoftwareImageId" }) public CreateMaintenanceRunDetails( String targetResourceId, @@ -37,7 +38,8 @@ public CreateMaintenanceRunDetails( java.util.Date timeScheduled, PatchingMode patchingMode, PatchType patchType, - String compartmentId) { + String compartmentId, + String databaseSoftwareImageId) { super(); this.targetResourceId = targetResourceId; this.isDstFileUpdateEnabled = isDstFileUpdateEnabled; @@ -45,6 +47,7 @@ public CreateMaintenanceRunDetails( this.patchingMode = patchingMode; this.patchType = patchType; this.compartmentId = compartmentId; + this.databaseSoftwareImageId = databaseSoftwareImageId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -120,14 +123,14 @@ public Builder patchingMode(PatchingMode patchingMode) { return this; } /** - * Patch type, either "QUARTERLY" or "TIMEZONE". + * Patch type, either "QUARTERLY", "TIMEZONE" or "CUSTOM_DATABASE_SOFTWARE_IMAGE". * **/ @com.fasterxml.jackson.annotation.JsonProperty("patchType") private PatchType patchType; /** - * Patch type, either "QUARTERLY" or "TIMEZONE". + * Patch type, either "QUARTERLY", "TIMEZONE" or "CUSTOM_DATABASE_SOFTWARE_IMAGE". * * @param patchType the value to set * @return this builder @@ -153,6 +156,22 @@ public Builder compartmentId(String compartmentId) { this.__explicitlySet__.add("compartmentId"); return this; } + /** + * The Autonomous Database Software Image [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseSoftwareImageId") + private String databaseSoftwareImageId; + + /** + * The Autonomous Database Software Image [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) + * @param databaseSoftwareImageId the value to set + * @return this builder + **/ + public Builder databaseSoftwareImageId(String databaseSoftwareImageId) { + this.databaseSoftwareImageId = databaseSoftwareImageId; + this.__explicitlySet__.add("databaseSoftwareImageId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -165,7 +184,8 @@ public CreateMaintenanceRunDetails build() { this.timeScheduled, this.patchingMode, this.patchType, - this.compartmentId); + this.compartmentId, + this.databaseSoftwareImageId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -192,6 +212,9 @@ public Builder copy(CreateMaintenanceRunDetails model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } + if (model.wasPropertyExplicitlySet("databaseSoftwareImageId")) { + this.databaseSoftwareImageId(model.getDatabaseSoftwareImageId()); + } return this; } } @@ -308,12 +331,13 @@ public PatchingMode getPatchingMode() { } /** - * Patch type, either "QUARTERLY" or "TIMEZONE". + * Patch type, either "QUARTERLY", "TIMEZONE" or "CUSTOM_DATABASE_SOFTWARE_IMAGE". * **/ public enum PatchType { Quarterly("QUARTERLY"), Timezone("TIMEZONE"), + CustomDatabaseSoftwareImage("CUSTOM_DATABASE_SOFTWARE_IMAGE"), ; private final String value; @@ -344,14 +368,14 @@ public static PatchType create(String key) { } }; /** - * Patch type, either "QUARTERLY" or "TIMEZONE". + * Patch type, either "QUARTERLY", "TIMEZONE" or "CUSTOM_DATABASE_SOFTWARE_IMAGE". * **/ @com.fasterxml.jackson.annotation.JsonProperty("patchType") private final PatchType patchType; /** - * Patch type, either "QUARTERLY" or "TIMEZONE". + * Patch type, either "QUARTERLY", "TIMEZONE" or "CUSTOM_DATABASE_SOFTWARE_IMAGE". * * @return the value **/ @@ -373,6 +397,20 @@ public String getCompartmentId() { return compartmentId; } + /** + * The Autonomous Database Software Image [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseSoftwareImageId") + private final String databaseSoftwareImageId; + + /** + * The Autonomous Database Software Image [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) + * @return the value + **/ + public String getDatabaseSoftwareImageId() { + return databaseSoftwareImageId; + } + @Override public String toString() { return this.toString(true); @@ -393,6 +431,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", patchingMode=").append(String.valueOf(this.patchingMode)); sb.append(", patchType=").append(String.valueOf(this.patchType)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", databaseSoftwareImageId=") + .append(String.valueOf(this.databaseSoftwareImageId)); sb.append(")"); return sb.toString(); } @@ -414,6 +454,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.patchingMode, other.patchingMode) && java.util.Objects.equals(this.patchType, other.patchType) && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals( + this.databaseSoftwareImageId, other.databaseSoftwareImageId) && super.equals(other); } @@ -437,6 +479,11 @@ public int hashCode() { result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.databaseSoftwareImageId == null + ? 43 + : this.databaseSoftwareImageId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreatePluggableDatabaseCreationTypeDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreatePluggableDatabaseCreationTypeDetails.java index fd715502e37..a0896198025 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreatePluggableDatabaseCreationTypeDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreatePluggableDatabaseCreationTypeDetails.java @@ -9,12 +9,13 @@ * Use {@code LOCAL_CLONE_PDB} for creating a new PDB using Local Clone on Source Pluggable Database. This will Clone and starts a * pluggable database (PDB) in the same database (CDB) as the source PDB. The source PDB must be in the {@code READ_WRITE} openMode to * perform the clone operation. + * isThinClone options are supported for Exadata VM cluster on Exascale Infrastructure, Exadata Cloud@Customer VM Cluster on Exadata Cloud@Customer infrastructure, and Exadata Cloud VM cluster on cloud Exadata infrastructure * Use {@code REMOTE_CLONE_PDB} for creating a new PDB using Remote Clone on Source Pluggable Database. This will Clone a pluggable * database (PDB) to a different database from the source PDB. The cloned PDB will be started upon completion of the clone * operation. The source PDB must be in the {@code READ_WRITE} openMode when performing the clone. * For Exadata Cloud@Customer instances, the source pluggable database (PDB) must be on the same Exadata Infrastructure as the * target container database (CDB) to create a remote clone. - *

+ * isThinClone options are supported for Exadata VM cluster on Exascale Infrastructure, Exadata Cloud@Customer VM Cluster on Exadata Cloud@Customer infrastructure, and Exadata Cloud VM cluster on cloud Exadata infrastructure. * Use {@code RELOCATE_PDB} for relocating the Pluggable Database from Source CDB and creating it in target CDB. This will relocate a * pluggable database (PDB) to a different database from the source PDB. The source PDB must be in the {@code READ_WRITE} openMode when * performing the relocate. diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreatePluggableDatabaseFromLocalCloneDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreatePluggableDatabaseFromLocalCloneDetails.java index 897211fe82b..b688ed9d18e 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreatePluggableDatabaseFromLocalCloneDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreatePluggableDatabaseFromLocalCloneDetails.java @@ -44,6 +44,22 @@ public Builder sourcePluggableDatabaseId(String sourcePluggableDatabaseId) { this.__explicitlySet__.add("sourcePluggableDatabaseId"); return this; } + /** + * True if Pluggable Database needs to be thin cloned and false if Pluggable Database needs to be thick cloned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isThinClone") + private Boolean isThinClone; + + /** + * True if Pluggable Database needs to be thin cloned and false if Pluggable Database needs to be thick cloned. + * @param isThinClone the value to set + * @return this builder + **/ + public Builder isThinClone(Boolean isThinClone) { + this.isThinClone = isThinClone; + this.__explicitlySet__.add("isThinClone"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -51,7 +67,7 @@ public Builder sourcePluggableDatabaseId(String sourcePluggableDatabaseId) { public CreatePluggableDatabaseFromLocalCloneDetails build() { CreatePluggableDatabaseFromLocalCloneDetails model = new CreatePluggableDatabaseFromLocalCloneDetails( - this.sourcePluggableDatabaseId); + this.sourcePluggableDatabaseId, this.isThinClone); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -63,6 +79,9 @@ public Builder copy(CreatePluggableDatabaseFromLocalCloneDetails model) { if (model.wasPropertyExplicitlySet("sourcePluggableDatabaseId")) { this.sourcePluggableDatabaseId(model.getSourcePluggableDatabaseId()); } + if (model.wasPropertyExplicitlySet("isThinClone")) { + this.isThinClone(model.getIsThinClone()); + } return this; } } @@ -79,9 +98,11 @@ public Builder toBuilder() { } @Deprecated - public CreatePluggableDatabaseFromLocalCloneDetails(String sourcePluggableDatabaseId) { + public CreatePluggableDatabaseFromLocalCloneDetails( + String sourcePluggableDatabaseId, Boolean isThinClone) { super(); this.sourcePluggableDatabaseId = sourcePluggableDatabaseId; + this.isThinClone = isThinClone; } /** @@ -98,6 +119,20 @@ public String getSourcePluggableDatabaseId() { return sourcePluggableDatabaseId; } + /** + * True if Pluggable Database needs to be thin cloned and false if Pluggable Database needs to be thick cloned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isThinClone") + private final Boolean isThinClone; + + /** + * True if Pluggable Database needs to be thin cloned and false if Pluggable Database needs to be thick cloned. + * @return the value + **/ + public Boolean getIsThinClone() { + return isThinClone; + } + @Override public String toString() { return this.toString(true); @@ -114,6 +149,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", sourcePluggableDatabaseId=") .append(String.valueOf(this.sourcePluggableDatabaseId)); + sb.append(", isThinClone=").append(String.valueOf(this.isThinClone)); sb.append(")"); return sb.toString(); } @@ -131,6 +167,7 @@ public boolean equals(Object o) { (CreatePluggableDatabaseFromLocalCloneDetails) o; return java.util.Objects.equals( this.sourcePluggableDatabaseId, other.sourcePluggableDatabaseId) + && java.util.Objects.equals(this.isThinClone, other.isThinClone) && super.equals(other); } @@ -143,6 +180,7 @@ public int hashCode() { + (this.sourcePluggableDatabaseId == null ? 43 : this.sourcePluggableDatabaseId.hashCode()); + result = (result * PRIME) + (this.isThinClone == null ? 43 : this.isThinClone.hashCode()); return result; } } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreatePluggableDatabaseFromRemoteCloneDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreatePluggableDatabaseFromRemoteCloneDetails.java index 428399ab179..1aae4ca3937 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreatePluggableDatabaseFromRemoteCloneDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreatePluggableDatabaseFromRemoteCloneDetails.java @@ -106,6 +106,22 @@ public Builder refreshableCloneDetails( this.__explicitlySet__.add("refreshableCloneDetails"); return this; } + /** + * True if Pluggable Database needs to be thin cloned and false if Pluggable Database needs to be thick cloned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isThinClone") + private Boolean isThinClone; + + /** + * True if Pluggable Database needs to be thin cloned and false if Pluggable Database needs to be thick cloned. + * @param isThinClone the value to set + * @return this builder + **/ + public Builder isThinClone(Boolean isThinClone) { + this.isThinClone = isThinClone; + this.__explicitlySet__.add("isThinClone"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -117,7 +133,8 @@ public CreatePluggableDatabaseFromRemoteCloneDetails build() { this.dblinkUserPassword, this.sourcePluggableDatabaseId, this.sourceContainerDatabaseAdminPassword, - this.refreshableCloneDetails); + this.refreshableCloneDetails, + this.isThinClone); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -142,6 +159,9 @@ public Builder copy(CreatePluggableDatabaseFromRemoteCloneDetails model) { if (model.wasPropertyExplicitlySet("refreshableCloneDetails")) { this.refreshableCloneDetails(model.getRefreshableCloneDetails()); } + if (model.wasPropertyExplicitlySet("isThinClone")) { + this.isThinClone(model.getIsThinClone()); + } return this; } } @@ -163,13 +183,15 @@ public CreatePluggableDatabaseFromRemoteCloneDetails( String dblinkUserPassword, String sourcePluggableDatabaseId, String sourceContainerDatabaseAdminPassword, - CreatePluggableDatabaseRefreshableCloneDetails refreshableCloneDetails) { + CreatePluggableDatabaseRefreshableCloneDetails refreshableCloneDetails, + Boolean isThinClone) { super(); this.dblinkUsername = dblinkUsername; this.dblinkUserPassword = dblinkUserPassword; this.sourcePluggableDatabaseId = sourcePluggableDatabaseId; this.sourceContainerDatabaseAdminPassword = sourceContainerDatabaseAdminPassword; this.refreshableCloneDetails = refreshableCloneDetails; + this.isThinClone = isThinClone; } /** @@ -235,6 +257,20 @@ public CreatePluggableDatabaseRefreshableCloneDetails getRefreshableCloneDetails return refreshableCloneDetails; } + /** + * True if Pluggable Database needs to be thin cloned and false if Pluggable Database needs to be thick cloned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isThinClone") + private final Boolean isThinClone; + + /** + * True if Pluggable Database needs to be thin cloned and false if Pluggable Database needs to be thick cloned. + * @return the value + **/ + public Boolean getIsThinClone() { + return isThinClone; + } + @Override public String toString() { return this.toString(true); @@ -256,6 +292,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", sourceContainerDatabaseAdminPassword=").append(""); sb.append(", refreshableCloneDetails=") .append(String.valueOf(this.refreshableCloneDetails)); + sb.append(", isThinClone=").append(String.valueOf(this.isThinClone)); sb.append(")"); return sb.toString(); } @@ -280,6 +317,7 @@ public boolean equals(Object o) { other.sourceContainerDatabaseAdminPassword) && java.util.Objects.equals( this.refreshableCloneDetails, other.refreshableCloneDetails) + && java.util.Objects.equals(this.isThinClone, other.isThinClone) && super.equals(other); } @@ -310,6 +348,7 @@ public int hashCode() { + (this.refreshableCloneDetails == null ? 43 : this.refreshableCloneDetails.hashCode()); + result = (result * PRIME) + (this.isThinClone == null ? 43 : this.isThinClone.hashCode()); return result; } } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateRefreshableAutonomousDatabaseCloneDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateRefreshableAutonomousDatabaseCloneDetails.java index 62ef9d233ef..392b6c4fcc7 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateRefreshableAutonomousDatabaseCloneDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateRefreshableAutonomousDatabaseCloneDetails.java @@ -29,6 +29,15 @@ public final class CreateRefreshableAutonomousDatabaseCloneDetails extends CreateAutonomousDatabaseBase { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; @@ -164,6 +173,15 @@ public Builder vaultId(String vaultId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKey") + private AutonomousDatabaseEncryptionKeyDetails encryptionKey; + + public Builder encryptionKey(AutonomousDatabaseEncryptionKeyDetails encryptionKey) { + this.encryptionKey = encryptionKey; + this.__explicitlySet__.add("encryptionKey"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") private String adminPassword; @@ -191,6 +209,15 @@ public Builder licenseModel(LicenseModel licenseModel) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("byolComputeCountLimit") + private Float byolComputeCountLimit; + + public Builder byolComputeCountLimit(Float byolComputeCountLimit) { + this.byolComputeCountLimit = byolComputeCountLimit; + this.__explicitlySet__.add("byolComputeCountLimit"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("isPreviewVersionWithServiceTermsAccepted") private Boolean isPreviewVersionWithServiceTermsAccepted; @@ -347,6 +374,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") private String privateEndpointIp; @@ -574,6 +611,7 @@ public Builder openMode(OpenMode openMode) { public CreateRefreshableAutonomousDatabaseCloneDetails build() { CreateRefreshableAutonomousDatabaseCloneDetails model = new CreateRefreshableAutonomousDatabaseCloneDetails( + this.subscriptionId, this.compartmentId, this.characterSet, this.ncharacterSet, @@ -589,9 +627,11 @@ public CreateRefreshableAutonomousDatabaseCloneDetails build() { this.isFreeTier, this.kmsKeyId, this.vaultId, + this.encryptionKey, this.adminPassword, this.displayName, this.licenseModel, + this.byolComputeCountLimit, this.isPreviewVersionWithServiceTermsAccepted, this.isAutoScalingEnabled, this.isDevTier, @@ -609,6 +649,7 @@ public CreateRefreshableAutonomousDatabaseCloneDetails build() { this.privateEndpointLabel, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateEndpointIp, this.dbVersion, this.customerContacts, @@ -636,6 +677,9 @@ public CreateRefreshableAutonomousDatabaseCloneDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(CreateRefreshableAutonomousDatabaseCloneDetails model) { + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } @@ -681,6 +725,9 @@ public Builder copy(CreateRefreshableAutonomousDatabaseCloneDetails model) { if (model.wasPropertyExplicitlySet("vaultId")) { this.vaultId(model.getVaultId()); } + if (model.wasPropertyExplicitlySet("encryptionKey")) { + this.encryptionKey(model.getEncryptionKey()); + } if (model.wasPropertyExplicitlySet("adminPassword")) { this.adminPassword(model.getAdminPassword()); } @@ -690,6 +737,9 @@ public Builder copy(CreateRefreshableAutonomousDatabaseCloneDetails model) { if (model.wasPropertyExplicitlySet("licenseModel")) { this.licenseModel(model.getLicenseModel()); } + if (model.wasPropertyExplicitlySet("byolComputeCountLimit")) { + this.byolComputeCountLimit(model.getByolComputeCountLimit()); + } if (model.wasPropertyExplicitlySet("isPreviewVersionWithServiceTermsAccepted")) { this.isPreviewVersionWithServiceTermsAccepted( model.getIsPreviewVersionWithServiceTermsAccepted()); @@ -742,6 +792,9 @@ public Builder copy(CreateRefreshableAutonomousDatabaseCloneDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateEndpointIp")) { this.privateEndpointIp(model.getPrivateEndpointIp()); } @@ -817,6 +870,7 @@ public Builder toBuilder() { @Deprecated public CreateRefreshableAutonomousDatabaseCloneDetails( + String subscriptionId, String compartmentId, String characterSet, String ncharacterSet, @@ -832,9 +886,11 @@ public CreateRefreshableAutonomousDatabaseCloneDetails( Boolean isFreeTier, String kmsKeyId, String vaultId, + AutonomousDatabaseEncryptionKeyDetails encryptionKey, String adminPassword, String displayName, LicenseModel licenseModel, + Float byolComputeCountLimit, Boolean isPreviewVersionWithServiceTermsAccepted, Boolean isAutoScalingEnabled, Boolean isDevTier, @@ -852,6 +908,7 @@ public CreateRefreshableAutonomousDatabaseCloneDetails( String privateEndpointLabel, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateEndpointIp, String dbVersion, java.util.List customerContacts, @@ -872,6 +929,7 @@ public CreateRefreshableAutonomousDatabaseCloneDetails( java.util.Date timeOfAutoRefreshStart, OpenMode openMode) { super( + subscriptionId, compartmentId, characterSet, ncharacterSet, @@ -887,9 +945,11 @@ public CreateRefreshableAutonomousDatabaseCloneDetails( isFreeTier, kmsKeyId, vaultId, + encryptionKey, adminPassword, displayName, licenseModel, + byolComputeCountLimit, isPreviewVersionWithServiceTermsAccepted, isAutoScalingEnabled, isDevTier, @@ -907,6 +967,7 @@ public CreateRefreshableAutonomousDatabaseCloneDetails( privateEndpointLabel, freeformTags, definedTags, + securityAttributes, privateEndpointIp, dbVersion, customerContacts, diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateScheduledActionDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateScheduledActionDetails.java new file mode 100644 index 00000000000..15a2f40be94 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateScheduledActionDetails.java @@ -0,0 +1,501 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Request to create Scheduled Action resource. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateScheduledActionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateScheduledActionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "actionType", + "actionParams", + "actionMembers", + "schedulingPlanId", + "schedulingWindowId", + "freeformTags", + "definedTags", + "compartmentId" + }) + public CreateScheduledActionDetails( + ActionType actionType, + java.util.Map actionParams, + java.util.List actionMembers, + String schedulingPlanId, + String schedulingWindowId, + java.util.Map freeformTags, + java.util.Map> definedTags, + String compartmentId) { + super(); + this.actionType = actionType; + this.actionParams = actionParams; + this.actionMembers = actionMembers; + this.schedulingPlanId = schedulingPlanId; + this.schedulingWindowId = schedulingWindowId; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.compartmentId = compartmentId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The type of the scheduled action being performed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + /** + * The type of the scheduled action being performed + * @param actionType the value to set + * @return this builder + **/ + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionParams") + private java.util.Map actionParams; + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + * @param actionParams the value to set + * @return this builder + **/ + public Builder actionParams(java.util.Map actionParams) { + this.actionParams = actionParams; + this.__explicitlySet__.add("actionParams"); + return this; + } + /** + * The list of action members in a scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionMembers") + private java.util.List actionMembers; + + /** + * The list of action members in a scheduled action. + * @param actionMembers the value to set + * @return this builder + **/ + public Builder actionMembers(java.util.List actionMembers) { + this.actionMembers = actionMembers; + this.__explicitlySet__.add("actionMembers"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingPlanId") + private String schedulingPlanId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. + * @param schedulingPlanId the value to set + * @return this builder + **/ + public Builder schedulingPlanId(String schedulingPlanId) { + this.schedulingPlanId = schedulingPlanId; + this.__explicitlySet__.add("schedulingPlanId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingWindowId") + private String schedulingWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + * @param schedulingWindowId the value to set + * @return this builder + **/ + public Builder schedulingWindowId(String schedulingWindowId) { + this.schedulingWindowId = schedulingWindowId; + this.__explicitlySet__.add("schedulingWindowId"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateScheduledActionDetails build() { + CreateScheduledActionDetails model = + new CreateScheduledActionDetails( + this.actionType, + this.actionParams, + this.actionMembers, + this.schedulingPlanId, + this.schedulingWindowId, + this.freeformTags, + this.definedTags, + this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateScheduledActionDetails model) { + if (model.wasPropertyExplicitlySet("actionType")) { + this.actionType(model.getActionType()); + } + if (model.wasPropertyExplicitlySet("actionParams")) { + this.actionParams(model.getActionParams()); + } + if (model.wasPropertyExplicitlySet("actionMembers")) { + this.actionMembers(model.getActionMembers()); + } + if (model.wasPropertyExplicitlySet("schedulingPlanId")) { + this.schedulingPlanId(model.getSchedulingPlanId()); + } + if (model.wasPropertyExplicitlySet("schedulingWindowId")) { + this.schedulingWindowId(model.getSchedulingWindowId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The type of the scheduled action being performed + **/ + public enum ActionType { + DbServerFullSoftwareUpdate("DB_SERVER_FULL_SOFTWARE_UPDATE"), + StorageServerFullSoftwareUpdate("STORAGE_SERVER_FULL_SOFTWARE_UPDATE"), + NetworkSwitchFullSoftwareUpdate("NETWORK_SWITCH_FULL_SOFTWARE_UPDATE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActionType v : ActionType.values()) { + map.put(v.getValue(), v); + } + } + + ActionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ActionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ActionType: " + key); + } + }; + /** + * The type of the scheduled action being performed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private final ActionType actionType; + + /** + * The type of the scheduled action being performed + * @return the value + **/ + public ActionType getActionType() { + return actionType; + } + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionParams") + private final java.util.Map actionParams; + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + * @return the value + **/ + public java.util.Map getActionParams() { + return actionParams; + } + + /** + * The list of action members in a scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionMembers") + private final java.util.List actionMembers; + + /** + * The list of action members in a scheduled action. + * @return the value + **/ + public java.util.List getActionMembers() { + return actionMembers; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingPlanId") + private final String schedulingPlanId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. + * @return the value + **/ + public String getSchedulingPlanId() { + return schedulingPlanId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingWindowId") + private final String schedulingWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + * @return the value + **/ + public String getSchedulingWindowId() { + return schedulingWindowId; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateScheduledActionDetails("); + sb.append("super=").append(super.toString()); + sb.append("actionType=").append(String.valueOf(this.actionType)); + sb.append(", actionParams=").append(String.valueOf(this.actionParams)); + sb.append(", actionMembers=").append(String.valueOf(this.actionMembers)); + sb.append(", schedulingPlanId=").append(String.valueOf(this.schedulingPlanId)); + sb.append(", schedulingWindowId=").append(String.valueOf(this.schedulingWindowId)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateScheduledActionDetails)) { + return false; + } + + CreateScheduledActionDetails other = (CreateScheduledActionDetails) o; + return java.util.Objects.equals(this.actionType, other.actionType) + && java.util.Objects.equals(this.actionParams, other.actionParams) + && java.util.Objects.equals(this.actionMembers, other.actionMembers) + && java.util.Objects.equals(this.schedulingPlanId, other.schedulingPlanId) + && java.util.Objects.equals(this.schedulingWindowId, other.schedulingWindowId) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.actionType == null ? 43 : this.actionType.hashCode()); + result = (result * PRIME) + (this.actionParams == null ? 43 : this.actionParams.hashCode()); + result = + (result * PRIME) + + (this.actionMembers == null ? 43 : this.actionMembers.hashCode()); + result = + (result * PRIME) + + (this.schedulingPlanId == null ? 43 : this.schedulingPlanId.hashCode()); + result = + (result * PRIME) + + (this.schedulingWindowId == null + ? 43 + : this.schedulingWindowId.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateSchedulingPlanDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateSchedulingPlanDetails.java new file mode 100644 index 00000000000..6963c187721 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateSchedulingPlanDetails.java @@ -0,0 +1,458 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Request to create Scheduling Plan. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateSchedulingPlanDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateSchedulingPlanDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "schedulingPolicyId", + "resourceId", + "serviceType", + "isUsingRecommendedScheduledActions", + "freeformTags", + "definedTags" + }) + public CreateSchedulingPlanDetails( + String compartmentId, + String schedulingPolicyId, + String resourceId, + ServiceType serviceType, + Boolean isUsingRecommendedScheduledActions, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.compartmentId = compartmentId; + this.schedulingPolicyId = schedulingPolicyId; + this.resourceId = resourceId; + this.serviceType = serviceType; + this.isUsingRecommendedScheduledActions = isUsingRecommendedScheduledActions; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingPolicyId") + private String schedulingPolicyId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + * @param schedulingPolicyId the value to set + * @return this builder + **/ + public Builder schedulingPolicyId(String schedulingPolicyId) { + this.schedulingPolicyId = schedulingPolicyId; + this.__explicitlySet__.add("schedulingPolicyId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource. + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * The service type of the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceType") + private ServiceType serviceType; + + /** + * The service type of the Scheduling Plan. + * @param serviceType the value to set + * @return this builder + **/ + public Builder serviceType(ServiceType serviceType) { + this.serviceType = serviceType; + this.__explicitlySet__.add("serviceType"); + return this; + } + /** + * If true, recommended scheduled actions will be generated for the scheduling plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isUsingRecommendedScheduledActions") + private Boolean isUsingRecommendedScheduledActions; + + /** + * If true, recommended scheduled actions will be generated for the scheduling plan. + * @param isUsingRecommendedScheduledActions the value to set + * @return this builder + **/ + public Builder isUsingRecommendedScheduledActions( + Boolean isUsingRecommendedScheduledActions) { + this.isUsingRecommendedScheduledActions = isUsingRecommendedScheduledActions; + this.__explicitlySet__.add("isUsingRecommendedScheduledActions"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateSchedulingPlanDetails build() { + CreateSchedulingPlanDetails model = + new CreateSchedulingPlanDetails( + this.compartmentId, + this.schedulingPolicyId, + this.resourceId, + this.serviceType, + this.isUsingRecommendedScheduledActions, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateSchedulingPlanDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("schedulingPolicyId")) { + this.schedulingPolicyId(model.getSchedulingPolicyId()); + } + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("serviceType")) { + this.serviceType(model.getServiceType()); + } + if (model.wasPropertyExplicitlySet("isUsingRecommendedScheduledActions")) { + this.isUsingRecommendedScheduledActions( + model.getIsUsingRecommendedScheduledActions()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingPolicyId") + private final String schedulingPolicyId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + * @return the value + **/ + public String getSchedulingPolicyId() { + return schedulingPolicyId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource. + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * The service type of the Scheduling Plan. + **/ + public enum ServiceType { + Exacc("EXACC"), + Exacs("EXACS"), + Fpppcs("FPPPCS"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ServiceType v : ServiceType.values()) { + map.put(v.getValue(), v); + } + } + + ServiceType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ServiceType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ServiceType: " + key); + } + }; + /** + * The service type of the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceType") + private final ServiceType serviceType; + + /** + * The service type of the Scheduling Plan. + * @return the value + **/ + public ServiceType getServiceType() { + return serviceType; + } + + /** + * If true, recommended scheduled actions will be generated for the scheduling plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isUsingRecommendedScheduledActions") + private final Boolean isUsingRecommendedScheduledActions; + + /** + * If true, recommended scheduled actions will be generated for the scheduling plan. + * @return the value + **/ + public Boolean getIsUsingRecommendedScheduledActions() { + return isUsingRecommendedScheduledActions; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateSchedulingPlanDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", schedulingPolicyId=").append(String.valueOf(this.schedulingPolicyId)); + sb.append(", resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", serviceType=").append(String.valueOf(this.serviceType)); + sb.append(", isUsingRecommendedScheduledActions=") + .append(String.valueOf(this.isUsingRecommendedScheduledActions)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSchedulingPlanDetails)) { + return false; + } + + CreateSchedulingPlanDetails other = (CreateSchedulingPlanDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.schedulingPolicyId, other.schedulingPolicyId) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.serviceType, other.serviceType) + && java.util.Objects.equals( + this.isUsingRecommendedScheduledActions, + other.isUsingRecommendedScheduledActions) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.schedulingPolicyId == null + ? 43 + : this.schedulingPolicyId.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.serviceType == null ? 43 : this.serviceType.hashCode()); + result = + (result * PRIME) + + (this.isUsingRecommendedScheduledActions == null + ? 43 + : this.isUsingRecommendedScheduledActions.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateSchedulingPolicyDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateSchedulingPolicyDetails.java new file mode 100644 index 00000000000..f983ccf4ae5 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateSchedulingPolicyDetails.java @@ -0,0 +1,407 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Request to create Scheduling Policy resource with Maintenance windows per cadence. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateSchedulingPolicyDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateSchedulingPolicyDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "displayName", + "cadence", + "cadenceStartMonth", + "freeformTags", + "definedTags" + }) + public CreateSchedulingPolicyDetails( + String compartmentId, + String displayName, + Cadence cadence, + Month cadenceStartMonth, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.compartmentId = compartmentId; + this.displayName = displayName; + this.cadence = cadence; + this.cadenceStartMonth = cadenceStartMonth; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The user-friendly name for the Scheduling Policy. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the Scheduling Policy. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The cadence period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cadence") + private Cadence cadence; + + /** + * The cadence period. + * @param cadence the value to set + * @return this builder + **/ + public Builder cadence(Cadence cadence) { + this.cadence = cadence; + this.__explicitlySet__.add("cadence"); + return this; + } + /** + * Start of the month to be followed during the cadence period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cadenceStartMonth") + private Month cadenceStartMonth; + + /** + * Start of the month to be followed during the cadence period. + * @param cadenceStartMonth the value to set + * @return this builder + **/ + public Builder cadenceStartMonth(Month cadenceStartMonth) { + this.cadenceStartMonth = cadenceStartMonth; + this.__explicitlySet__.add("cadenceStartMonth"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateSchedulingPolicyDetails build() { + CreateSchedulingPolicyDetails model = + new CreateSchedulingPolicyDetails( + this.compartmentId, + this.displayName, + this.cadence, + this.cadenceStartMonth, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateSchedulingPolicyDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("cadence")) { + this.cadence(model.getCadence()); + } + if (model.wasPropertyExplicitlySet("cadenceStartMonth")) { + this.cadenceStartMonth(model.getCadenceStartMonth()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The user-friendly name for the Scheduling Policy. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the Scheduling Policy. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The cadence period. + **/ + public enum Cadence { + Halfyearly("HALFYEARLY"), + Quarterly("QUARTERLY"), + Monthly("MONTHLY"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Cadence v : Cadence.values()) { + map.put(v.getValue(), v); + } + } + + Cadence(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Cadence create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Cadence: " + key); + } + }; + /** + * The cadence period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cadence") + private final Cadence cadence; + + /** + * The cadence period. + * @return the value + **/ + public Cadence getCadence() { + return cadence; + } + + /** + * Start of the month to be followed during the cadence period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cadenceStartMonth") + private final Month cadenceStartMonth; + + /** + * Start of the month to be followed during the cadence period. + * @return the value + **/ + public Month getCadenceStartMonth() { + return cadenceStartMonth; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateSchedulingPolicyDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", cadence=").append(String.valueOf(this.cadence)); + sb.append(", cadenceStartMonth=").append(String.valueOf(this.cadenceStartMonth)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSchedulingPolicyDetails)) { + return false; + } + + CreateSchedulingPolicyDetails other = (CreateSchedulingPolicyDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.cadence, other.cadence) + && java.util.Objects.equals(this.cadenceStartMonth, other.cadenceStartMonth) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.cadence == null ? 43 : this.cadence.hashCode()); + result = + (result * PRIME) + + (this.cadenceStartMonth == null ? 43 : this.cadenceStartMonth.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateSchedulingWindowDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateSchedulingWindowDetails.java new file mode 100644 index 00000000000..5f10e4e2e03 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateSchedulingWindowDetails.java @@ -0,0 +1,277 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Request to create Scheduling Window resource. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateSchedulingWindowDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateSchedulingWindowDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "windowPreference", + "freeformTags", + "definedTags" + }) + public CreateSchedulingWindowDetails( + String compartmentId, + WindowPreferenceDetail windowPreference, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.compartmentId = compartmentId; + this.windowPreference = windowPreference; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("windowPreference") + private WindowPreferenceDetail windowPreference; + + public Builder windowPreference(WindowPreferenceDetail windowPreference) { + this.windowPreference = windowPreference; + this.__explicitlySet__.add("windowPreference"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateSchedulingWindowDetails build() { + CreateSchedulingWindowDetails model = + new CreateSchedulingWindowDetails( + this.compartmentId, + this.windowPreference, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateSchedulingWindowDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("windowPreference")) { + this.windowPreference(model.getWindowPreference()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("windowPreference") + private final WindowPreferenceDetail windowPreference; + + public WindowPreferenceDetail getWindowPreference() { + return windowPreference; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateSchedulingWindowDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", windowPreference=").append(String.valueOf(this.windowPreference)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSchedulingWindowDetails)) { + return false; + } + + CreateSchedulingWindowDetails other = (CreateSchedulingWindowDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.windowPreference, other.windowPreference) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.windowPreference == null ? 43 : this.windowPreference.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateVmClusterDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateVmClusterDetails.java index 7e3139c844b..b00ed3807b8 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateVmClusterDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateVmClusterDetails.java @@ -46,7 +46,9 @@ public final class CreateVmClusterDetails "definedTags", "dataCollectionOptions", "systemVersion", - "fileSystemConfigurationDetails" + "fileSystemConfigurationDetails", + "cloudAutomationUpdateDetails", + "exascaleDbStorageVaultId" }) public CreateVmClusterDetails( String compartmentId, @@ -70,7 +72,9 @@ public CreateVmClusterDetails( java.util.Map> definedTags, DataCollectionOptions dataCollectionOptions, String systemVersion, - java.util.List fileSystemConfigurationDetails) { + java.util.List fileSystemConfigurationDetails, + CloudAutomationUpdateDetails cloudAutomationUpdateDetails, + String exascaleDbStorageVaultId) { super(); this.compartmentId = compartmentId; this.displayName = displayName; @@ -94,6 +98,8 @@ public CreateVmClusterDetails( this.dataCollectionOptions = dataCollectionOptions; this.systemVersion = systemVersion; this.fileSystemConfigurationDetails = fileSystemConfigurationDetails; + this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -464,6 +470,32 @@ public Builder fileSystemConfigurationDetails( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") + private CloudAutomationUpdateDetails cloudAutomationUpdateDetails; + + public Builder cloudAutomationUpdateDetails( + CloudAutomationUpdateDetails cloudAutomationUpdateDetails) { + this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; + this.__explicitlySet__.add("cloudAutomationUpdateDetails"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exascaleDbStorageVaultId") + private String exascaleDbStorageVaultId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + * @param exascaleDbStorageVaultId the value to set + * @return this builder + **/ + public Builder exascaleDbStorageVaultId(String exascaleDbStorageVaultId) { + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.__explicitlySet__.add("exascaleDbStorageVaultId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -491,7 +523,9 @@ public CreateVmClusterDetails build() { this.definedTags, this.dataCollectionOptions, this.systemVersion, - this.fileSystemConfigurationDetails); + this.fileSystemConfigurationDetails, + this.cloudAutomationUpdateDetails, + this.exascaleDbStorageVaultId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -566,6 +600,12 @@ public Builder copy(CreateVmClusterDetails model) { if (model.wasPropertyExplicitlySet("fileSystemConfigurationDetails")) { this.fileSystemConfigurationDetails(model.getFileSystemConfigurationDetails()); } + if (model.wasPropertyExplicitlySet("cloudAutomationUpdateDetails")) { + this.cloudAutomationUpdateDetails(model.getCloudAutomationUpdateDetails()); + } + if (model.wasPropertyExplicitlySet("exascaleDbStorageVaultId")) { + this.exascaleDbStorageVaultId(model.getExascaleDbStorageVaultId()); + } return this; } } @@ -936,6 +976,27 @@ public java.util.List getFileSystemConfigurationD return fileSystemConfigurationDetails; } + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") + private final CloudAutomationUpdateDetails cloudAutomationUpdateDetails; + + public CloudAutomationUpdateDetails getCloudAutomationUpdateDetails() { + return cloudAutomationUpdateDetails; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exascaleDbStorageVaultId") + private final String exascaleDbStorageVaultId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + * @return the value + **/ + public String getExascaleDbStorageVaultId() { + return exascaleDbStorageVaultId; + } + @Override public String toString() { return this.toString(true); @@ -975,6 +1036,10 @@ public String toString(boolean includeByteArrayContents) { sb.append(", systemVersion=").append(String.valueOf(this.systemVersion)); sb.append(", fileSystemConfigurationDetails=") .append(String.valueOf(this.fileSystemConfigurationDetails)); + sb.append(", cloudAutomationUpdateDetails=") + .append(String.valueOf(this.cloudAutomationUpdateDetails)); + sb.append(", exascaleDbStorageVaultId=") + .append(String.valueOf(this.exascaleDbStorageVaultId)); sb.append(")"); return sb.toString(); } @@ -1015,6 +1080,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.systemVersion, other.systemVersion) && java.util.Objects.equals( this.fileSystemConfigurationDetails, other.fileSystemConfigurationDetails) + && java.util.Objects.equals( + this.cloudAutomationUpdateDetails, other.cloudAutomationUpdateDetails) + && java.util.Objects.equals( + this.exascaleDbStorageVaultId, other.exascaleDbStorageVaultId) && super.equals(other); } @@ -1088,6 +1157,16 @@ public int hashCode() { + (this.fileSystemConfigurationDetails == null ? 43 : this.fileSystemConfigurationDetails.hashCode()); + result = + (result * PRIME) + + (this.cloudAutomationUpdateDetails == null + ? 43 + : this.cloudAutomationUpdateDetails.hashCode()); + result = + (result * PRIME) + + (this.exascaleDbStorageVaultId == null + ? 43 + : this.exascaleDbStorageVaultId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/DatabaseSoftwareImage.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/DatabaseSoftwareImage.java index 52d591d73a4..0a29d53b97b 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/DatabaseSoftwareImage.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/DatabaseSoftwareImage.java @@ -690,6 +690,7 @@ public enum ImageShapeFamily { VmBmShape("VM_BM_SHAPE"), ExadataShape("EXADATA_SHAPE"), ExaccShape("EXACC_SHAPE"), + ExadbxsShape("EXADBXS_SHAPE"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/DatabaseSoftwareImageSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/DatabaseSoftwareImageSummary.java index b680180d20d..c495cb914a8 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/DatabaseSoftwareImageSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/DatabaseSoftwareImageSummary.java @@ -696,6 +696,7 @@ public enum ImageShapeFamily { VmBmShape("VM_BM_SHAPE"), ExadataShape("EXADATA_SHAPE"), ExaccShape("EXACC_SHAPE"), + ExadbxsShape("EXADBXS_SHAPE"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbNode.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbNode.java index 0436b59be29..cdb839ccf88 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbNode.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbNode.java @@ -43,6 +43,7 @@ public final class DbNode extends com.oracle.bmc.http.internal.ExplicitlySetBmcM "cpuCoreCount", "memorySizeInGBs", "dbNodeStorageSizeInGBs", + "totalCpuCoreCount", "dbServerId" }) public DbNode( @@ -69,6 +70,7 @@ public DbNode( Integer cpuCoreCount, Integer memorySizeInGBs, Integer dbNodeStorageSizeInGBs, + Integer totalCpuCoreCount, String dbServerId) { super(); this.id = id; @@ -94,6 +96,7 @@ public DbNode( this.cpuCoreCount = cpuCoreCount; this.memorySizeInGBs = memorySizeInGBs; this.dbNodeStorageSizeInGBs = dbNodeStorageSizeInGBs; + this.totalCpuCoreCount = totalCpuCoreCount; this.dbServerId = dbServerId; } @@ -514,6 +517,22 @@ public Builder dbNodeStorageSizeInGBs(Integer dbNodeStorageSizeInGBs) { this.__explicitlySet__.add("dbNodeStorageSizeInGBs"); return this; } + /** + * The total number of CPU cores reserved on the Db node. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalCpuCoreCount") + private Integer totalCpuCoreCount; + + /** + * The total number of CPU cores reserved on the Db node. + * @param totalCpuCoreCount the value to set + * @return this builder + **/ + public Builder totalCpuCoreCount(Integer totalCpuCoreCount) { + this.totalCpuCoreCount = totalCpuCoreCount; + this.__explicitlySet__.add("totalCpuCoreCount"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exacc Db server associated with the database node. **/ @@ -560,6 +579,7 @@ public DbNode build() { this.cpuCoreCount, this.memorySizeInGBs, this.dbNodeStorageSizeInGBs, + this.totalCpuCoreCount, this.dbServerId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -638,6 +658,9 @@ public Builder copy(DbNode model) { if (model.wasPropertyExplicitlySet("dbNodeStorageSizeInGBs")) { this.dbNodeStorageSizeInGBs(model.getDbNodeStorageSizeInGBs()); } + if (model.wasPropertyExplicitlySet("totalCpuCoreCount")) { + this.totalCpuCoreCount(model.getTotalCpuCoreCount()); + } if (model.wasPropertyExplicitlySet("dbServerId")) { this.dbServerId(model.getDbServerId()); } @@ -932,6 +955,7 @@ public Integer getSoftwareStorageSizeInGB() { **/ public enum MaintenanceType { VmdbRebootMigration("VMDB_REBOOT_MIGRATION"), + ExadbxsRebootMigration("EXADBXS_REBOOT_MIGRATION"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -1126,6 +1150,20 @@ public Integer getDbNodeStorageSizeInGBs() { return dbNodeStorageSizeInGBs; } + /** + * The total number of CPU cores reserved on the Db node. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalCpuCoreCount") + private final Integer totalCpuCoreCount; + + /** + * The total number of CPU cores reserved on the Db node. + * @return the value + **/ + public Integer getTotalCpuCoreCount() { + return totalCpuCoreCount; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exacc Db server associated with the database node. **/ @@ -1180,6 +1218,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", cpuCoreCount=").append(String.valueOf(this.cpuCoreCount)); sb.append(", memorySizeInGBs=").append(String.valueOf(this.memorySizeInGBs)); sb.append(", dbNodeStorageSizeInGBs=").append(String.valueOf(this.dbNodeStorageSizeInGBs)); + sb.append(", totalCpuCoreCount=").append(String.valueOf(this.totalCpuCoreCount)); sb.append(", dbServerId=").append(String.valueOf(this.dbServerId)); sb.append(")"); return sb.toString(); @@ -1222,6 +1261,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.memorySizeInGBs, other.memorySizeInGBs) && java.util.Objects.equals( this.dbNodeStorageSizeInGBs, other.dbNodeStorageSizeInGBs) + && java.util.Objects.equals(this.totalCpuCoreCount, other.totalCpuCoreCount) && java.util.Objects.equals(this.dbServerId, other.dbServerId) && super.equals(other); } @@ -1281,6 +1321,9 @@ public int hashCode() { + (this.dbNodeStorageSizeInGBs == null ? 43 : this.dbNodeStorageSizeInGBs.hashCode()); + result = + (result * PRIME) + + (this.totalCpuCoreCount == null ? 43 : this.totalCpuCoreCount.hashCode()); result = (result * PRIME) + (this.dbServerId == null ? 43 : this.dbServerId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbNodeDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbNodeDetails.java new file mode 100644 index 00000000000..fea021bd99d --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbNodeDetails.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of the ExaCS Db node. Applies to Exadata Database Service on Exascale Infrastructure only. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = DbNodeDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DbNodeDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"dbNodeId"}) + public DbNodeDetails(String dbNodeId) { + super(); + this.dbNodeId = dbNodeId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of ExaCS Db node. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbNodeId") + private String dbNodeId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of ExaCS Db node. + * @param dbNodeId the value to set + * @return this builder + **/ + public Builder dbNodeId(String dbNodeId) { + this.dbNodeId = dbNodeId; + this.__explicitlySet__.add("dbNodeId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DbNodeDetails build() { + DbNodeDetails model = new DbNodeDetails(this.dbNodeId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DbNodeDetails model) { + if (model.wasPropertyExplicitlySet("dbNodeId")) { + this.dbNodeId(model.getDbNodeId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of ExaCS Db node. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbNodeId") + private final String dbNodeId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of ExaCS Db node. + * @return the value + **/ + public String getDbNodeId() { + return dbNodeId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DbNodeDetails("); + sb.append("super=").append(super.toString()); + sb.append("dbNodeId=").append(String.valueOf(this.dbNodeId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DbNodeDetails)) { + return false; + } + + DbNodeDetails other = (DbNodeDetails) o; + return java.util.Objects.equals(this.dbNodeId, other.dbNodeId) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.dbNodeId == null ? 43 : this.dbNodeId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbNodeSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbNodeSummary.java index eea8e9fd286..d17ad402a41 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbNodeSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbNodeSummary.java @@ -48,6 +48,7 @@ public final class DbNodeSummary extends com.oracle.bmc.http.internal.Explicitly "cpuCoreCount", "memorySizeInGBs", "dbNodeStorageSizeInGBs", + "totalCpuCoreCount", "dbServerId" }) public DbNodeSummary( @@ -74,6 +75,7 @@ public DbNodeSummary( Integer cpuCoreCount, Integer memorySizeInGBs, Integer dbNodeStorageSizeInGBs, + Integer totalCpuCoreCount, String dbServerId) { super(); this.id = id; @@ -99,6 +101,7 @@ public DbNodeSummary( this.cpuCoreCount = cpuCoreCount; this.memorySizeInGBs = memorySizeInGBs; this.dbNodeStorageSizeInGBs = dbNodeStorageSizeInGBs; + this.totalCpuCoreCount = totalCpuCoreCount; this.dbServerId = dbServerId; } @@ -519,6 +522,22 @@ public Builder dbNodeStorageSizeInGBs(Integer dbNodeStorageSizeInGBs) { this.__explicitlySet__.add("dbNodeStorageSizeInGBs"); return this; } + /** + * The total number of CPU cores reserved on the Db node. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalCpuCoreCount") + private Integer totalCpuCoreCount; + + /** + * The total number of CPU cores reserved on the Db node. + * @param totalCpuCoreCount the value to set + * @return this builder + **/ + public Builder totalCpuCoreCount(Integer totalCpuCoreCount) { + this.totalCpuCoreCount = totalCpuCoreCount; + this.__explicitlySet__.add("totalCpuCoreCount"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exacc Db server associated with the database node. **/ @@ -565,6 +584,7 @@ public DbNodeSummary build() { this.cpuCoreCount, this.memorySizeInGBs, this.dbNodeStorageSizeInGBs, + this.totalCpuCoreCount, this.dbServerId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -643,6 +663,9 @@ public Builder copy(DbNodeSummary model) { if (model.wasPropertyExplicitlySet("dbNodeStorageSizeInGBs")) { this.dbNodeStorageSizeInGBs(model.getDbNodeStorageSizeInGBs()); } + if (model.wasPropertyExplicitlySet("totalCpuCoreCount")) { + this.totalCpuCoreCount(model.getTotalCpuCoreCount()); + } if (model.wasPropertyExplicitlySet("dbServerId")) { this.dbServerId(model.getDbServerId()); } @@ -937,6 +960,7 @@ public Integer getSoftwareStorageSizeInGB() { **/ public enum MaintenanceType { VmdbRebootMigration("VMDB_REBOOT_MIGRATION"), + ExadbxsRebootMigration("EXADBXS_REBOOT_MIGRATION"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -1131,6 +1155,20 @@ public Integer getDbNodeStorageSizeInGBs() { return dbNodeStorageSizeInGBs; } + /** + * The total number of CPU cores reserved on the Db node. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalCpuCoreCount") + private final Integer totalCpuCoreCount; + + /** + * The total number of CPU cores reserved on the Db node. + * @return the value + **/ + public Integer getTotalCpuCoreCount() { + return totalCpuCoreCount; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exacc Db server associated with the database node. **/ @@ -1185,6 +1223,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", cpuCoreCount=").append(String.valueOf(this.cpuCoreCount)); sb.append(", memorySizeInGBs=").append(String.valueOf(this.memorySizeInGBs)); sb.append(", dbNodeStorageSizeInGBs=").append(String.valueOf(this.dbNodeStorageSizeInGBs)); + sb.append(", totalCpuCoreCount=").append(String.valueOf(this.totalCpuCoreCount)); sb.append(", dbServerId=").append(String.valueOf(this.dbServerId)); sb.append(")"); return sb.toString(); @@ -1227,6 +1266,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.memorySizeInGBs, other.memorySizeInGBs) && java.util.Objects.equals( this.dbNodeStorageSizeInGBs, other.dbNodeStorageSizeInGBs) + && java.util.Objects.equals(this.totalCpuCoreCount, other.totalCpuCoreCount) && java.util.Objects.equals(this.dbServerId, other.dbServerId) && super.equals(other); } @@ -1286,6 +1326,9 @@ public int hashCode() { + (this.dbNodeStorageSizeInGBs == null ? 43 : this.dbNodeStorageSizeInGBs.hashCode()); + result = + (result * PRIME) + + (this.totalCpuCoreCount == null ? 43 : this.totalCpuCoreCount.hashCode()); result = (result * PRIME) + (this.dbServerId == null ? 43 : this.dbServerId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbServer.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbServer.java index e4e99962e5c..86ffc8a7217 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbServer.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbServer.java @@ -5,7 +5,7 @@ package com.oracle.bmc.database.model; /** - * Details of the Exacc Db server resource. Applies to Exadata Cloud@Customer instances only. + * Details of the Db server resource. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -92,13 +92,13 @@ public DbServer( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exacc Db server. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Db server. **/ @com.fasterxml.jackson.annotation.JsonProperty("id") private String id; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exacc Db server. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Db server. * @param id the value to set * @return this builder **/ @@ -559,13 +559,13 @@ public Builder toBuilder() { } /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exacc Db server. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Db server. **/ @com.fasterxml.jackson.annotation.JsonProperty("id") private final String id; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exacc Db server. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Db server. * @return the value **/ public String getId() { diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbServerSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbServerSummary.java index f5d41764066..5b2bb5095c1 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbServerSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbServerSummary.java @@ -5,7 +5,7 @@ package com.oracle.bmc.database.model; /** - * Details of the Exadata Cloud@Customer Db server. + * Details of the Db server. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -92,13 +92,13 @@ public DbServerSummary( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exacc Db server. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Db server. **/ @com.fasterxml.jackson.annotation.JsonProperty("id") private String id; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exacc Db server. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Db server. * @param id the value to set * @return this builder **/ @@ -559,13 +559,13 @@ public Builder toBuilder() { } /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exacc Db server. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Db server. **/ @com.fasterxml.jackson.annotation.JsonProperty("id") private final String id; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exacc Db server. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Db server. * @return the value **/ public String getId() { diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystem.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystem.java index 6ff5fe06b70..99af70947ff 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystem.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystem.java @@ -67,6 +67,7 @@ public final class DbSystem extends com.oracle.bmc.http.internal.ExplicitlySetBm "nextMaintenanceRunId", "freeformTags", "definedTags", + "securityAttributes", "sourceDbSystemId", "pointInTimeDataDiskCloneTimestamp", "dataCollectionOptions" @@ -119,6 +120,7 @@ public DbSystem( String nextMaintenanceRunId, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String sourceDbSystemId, java.util.Date pointInTimeDataDiskCloneTimestamp, DataCollectionOptions dataCollectionOptions) { @@ -170,6 +172,7 @@ public DbSystem( this.nextMaintenanceRunId = nextMaintenanceRunId; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.sourceDbSystemId = sourceDbSystemId; this.pointInTimeDataDiskCloneTimestamp = pointInTimeDataDiskCloneTimestamp; this.dataCollectionOptions = dataCollectionOptions; @@ -1012,6 +1015,29 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the DB system. **/ @@ -1108,6 +1134,7 @@ public DbSystem build() { this.nextMaintenanceRunId, this.freeformTags, this.definedTags, + this.securityAttributes, this.sourceDbSystemId, this.pointInTimeDataDiskCloneTimestamp, this.dataCollectionOptions); @@ -1260,6 +1287,9 @@ public Builder copy(DbSystem model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("sourceDbSystemId")) { this.sourceDbSystemId(model.getSourceDbSystemId()); } @@ -2280,6 +2310,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the DB system. **/ @@ -2378,6 +2428,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", nextMaintenanceRunId=").append(String.valueOf(this.nextMaintenanceRunId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", sourceDbSystemId=").append(String.valueOf(this.sourceDbSystemId)); sb.append(", pointInTimeDataDiskCloneTimestamp=") .append(String.valueOf(this.pointInTimeDataDiskCloneTimestamp)); @@ -2445,6 +2496,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.nextMaintenanceRunId, other.nextMaintenanceRunId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.sourceDbSystemId, other.sourceDbSystemId) && java.util.Objects.equals( this.pointInTimeDataDiskCloneTimestamp, @@ -2568,6 +2620,11 @@ public int hashCode() { : this.nextMaintenanceRunId.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.sourceDbSystemId == null ? 43 : this.sourceDbSystemId.hashCode()); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystemSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystemSummary.java index d17f4b1bea6..3442d6ef5ae 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystemSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystemSummary.java @@ -88,6 +88,7 @@ public final class DbSystemSummary extends com.oracle.bmc.http.internal.Explicit "nextMaintenanceRunId", "freeformTags", "definedTags", + "securityAttributes", "sourceDbSystemId", "pointInTimeDataDiskCloneTimestamp", "dataCollectionOptions" @@ -139,6 +140,7 @@ public DbSystemSummary( String nextMaintenanceRunId, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String sourceDbSystemId, java.util.Date pointInTimeDataDiskCloneTimestamp, DataCollectionOptions dataCollectionOptions) { @@ -189,6 +191,7 @@ public DbSystemSummary( this.nextMaintenanceRunId = nextMaintenanceRunId; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.sourceDbSystemId = sourceDbSystemId; this.pointInTimeDataDiskCloneTimestamp = pointInTimeDataDiskCloneTimestamp; this.dataCollectionOptions = dataCollectionOptions; @@ -1022,6 +1025,29 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the DB system. **/ @@ -1117,6 +1143,7 @@ public DbSystemSummary build() { this.nextMaintenanceRunId, this.freeformTags, this.definedTags, + this.securityAttributes, this.sourceDbSystemId, this.pointInTimeDataDiskCloneTimestamp, this.dataCollectionOptions); @@ -1266,6 +1293,9 @@ public Builder copy(DbSystemSummary model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("sourceDbSystemId")) { this.sourceDbSystemId(model.getSourceDbSystemId()); } @@ -2279,6 +2309,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the DB system. **/ @@ -2376,6 +2426,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", nextMaintenanceRunId=").append(String.valueOf(this.nextMaintenanceRunId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", sourceDbSystemId=").append(String.valueOf(this.sourceDbSystemId)); sb.append(", pointInTimeDataDiskCloneTimestamp=") .append(String.valueOf(this.pointInTimeDataDiskCloneTimestamp)); @@ -2442,6 +2493,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.nextMaintenanceRunId, other.nextMaintenanceRunId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.sourceDbSystemId, other.sourceDbSystemId) && java.util.Objects.equals( this.pointInTimeDataDiskCloneTimestamp, @@ -2562,6 +2614,11 @@ public int hashCode() { : this.nextMaintenanceRunId.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.sourceDbSystemId == null ? 43 : this.sourceDbSystemId.hashCode()); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadataInfrastructure.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadataInfrastructure.java index 02fdcd461d8..09b58bb4df6 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadataInfrastructure.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadataInfrastructure.java @@ -71,7 +71,9 @@ public final class ExadataInfrastructure "availabilityDomain", "definedFileSystemConfigurations", "freeformTags", - "definedTags" + "definedTags", + "isSchedulingPolicyAssociated", + "exascaleConfig" }) public ExadataInfrastructure( String id, @@ -122,7 +124,9 @@ public ExadataInfrastructure( String availabilityDomain, java.util.List definedFileSystemConfigurations, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + Boolean isSchedulingPolicyAssociated, + ExascaleConfigDetails exascaleConfig) { super(); this.id = id; this.compartmentId = compartmentId; @@ -173,6 +177,8 @@ public ExadataInfrastructure( this.definedFileSystemConfigurations = definedFileSystemConfigurations; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.isSchedulingPolicyAssociated = isSchedulingPolicyAssociated; + this.exascaleConfig = exascaleConfig; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -979,6 +985,31 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * If true, the infrastructure is using granular maintenance scheduling preference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSchedulingPolicyAssociated") + private Boolean isSchedulingPolicyAssociated; + + /** + * If true, the infrastructure is using granular maintenance scheduling preference. + * @param isSchedulingPolicyAssociated the value to set + * @return this builder + **/ + public Builder isSchedulingPolicyAssociated(Boolean isSchedulingPolicyAssociated) { + this.isSchedulingPolicyAssociated = isSchedulingPolicyAssociated; + this.__explicitlySet__.add("isSchedulingPolicyAssociated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("exascaleConfig") + private ExascaleConfigDetails exascaleConfig; + + public Builder exascaleConfig(ExascaleConfigDetails exascaleConfig) { + this.exascaleConfig = exascaleConfig; + this.__explicitlySet__.add("exascaleConfig"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -1034,7 +1065,9 @@ public ExadataInfrastructure build() { this.availabilityDomain, this.definedFileSystemConfigurations, this.freeformTags, - this.definedTags); + this.definedTags, + this.isSchedulingPolicyAssociated, + this.exascaleConfig); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -1190,6 +1223,12 @@ public Builder copy(ExadataInfrastructure model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("isSchedulingPolicyAssociated")) { + this.isSchedulingPolicyAssociated(model.getIsSchedulingPolicyAssociated()); + } + if (model.wasPropertyExplicitlySet("exascaleConfig")) { + this.exascaleConfig(model.getExascaleConfig()); + } return this; } } @@ -2065,6 +2104,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * If true, the infrastructure is using granular maintenance scheduling preference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSchedulingPolicyAssociated") + private final Boolean isSchedulingPolicyAssociated; + + /** + * If true, the infrastructure is using granular maintenance scheduling preference. + * @return the value + **/ + public Boolean getIsSchedulingPolicyAssociated() { + return isSchedulingPolicyAssociated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("exascaleConfig") + private final ExascaleConfigDetails exascaleConfig; + + public ExascaleConfigDetails getExascaleConfig() { + return exascaleConfig; + } + @Override public String toString() { return this.toString(true); @@ -2143,6 +2203,9 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.definedFileSystemConfigurations)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", isSchedulingPolicyAssociated=") + .append(String.valueOf(this.isSchedulingPolicyAssociated)); + sb.append(", exascaleConfig=").append(String.valueOf(this.exascaleConfig)); sb.append(")"); return sb.toString(); } @@ -2217,6 +2280,9 @@ public boolean equals(Object o) { this.definedFileSystemConfigurations, other.definedFileSystemConfigurations) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals( + this.isSchedulingPolicyAssociated, other.isSchedulingPolicyAssociated) + && java.util.Objects.equals(this.exascaleConfig, other.exascaleConfig) && super.equals(other); } @@ -2377,6 +2443,14 @@ public int hashCode() { : this.definedFileSystemConfigurations.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.isSchedulingPolicyAssociated == null + ? 43 + : this.isSchedulingPolicyAssociated.hashCode()); + result = + (result * PRIME) + + (this.exascaleConfig == null ? 43 : this.exascaleConfig.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadataInfrastructureSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadataInfrastructureSummary.java index 1ef5731f589..9e11803cfc4 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadataInfrastructureSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadataInfrastructureSummary.java @@ -73,7 +73,9 @@ public final class ExadataInfrastructureSummary "availabilityDomain", "definedFileSystemConfigurations", "freeformTags", - "definedTags" + "definedTags", + "isSchedulingPolicyAssociated", + "exascaleConfig" }) public ExadataInfrastructureSummary( String id, @@ -124,7 +126,9 @@ public ExadataInfrastructureSummary( String availabilityDomain, java.util.List definedFileSystemConfigurations, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + Boolean isSchedulingPolicyAssociated, + ExascaleConfigDetails exascaleConfig) { super(); this.id = id; this.compartmentId = compartmentId; @@ -175,6 +179,8 @@ public ExadataInfrastructureSummary( this.definedFileSystemConfigurations = definedFileSystemConfigurations; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.isSchedulingPolicyAssociated = isSchedulingPolicyAssociated; + this.exascaleConfig = exascaleConfig; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -981,6 +987,31 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * If true, the infrastructure is using granular maintenance scheduling preference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSchedulingPolicyAssociated") + private Boolean isSchedulingPolicyAssociated; + + /** + * If true, the infrastructure is using granular maintenance scheduling preference. + * @param isSchedulingPolicyAssociated the value to set + * @return this builder + **/ + public Builder isSchedulingPolicyAssociated(Boolean isSchedulingPolicyAssociated) { + this.isSchedulingPolicyAssociated = isSchedulingPolicyAssociated; + this.__explicitlySet__.add("isSchedulingPolicyAssociated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("exascaleConfig") + private ExascaleConfigDetails exascaleConfig; + + public Builder exascaleConfig(ExascaleConfigDetails exascaleConfig) { + this.exascaleConfig = exascaleConfig; + this.__explicitlySet__.add("exascaleConfig"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -1036,7 +1067,9 @@ public ExadataInfrastructureSummary build() { this.availabilityDomain, this.definedFileSystemConfigurations, this.freeformTags, - this.definedTags); + this.definedTags, + this.isSchedulingPolicyAssociated, + this.exascaleConfig); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -1192,6 +1225,12 @@ public Builder copy(ExadataInfrastructureSummary model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("isSchedulingPolicyAssociated")) { + this.isSchedulingPolicyAssociated(model.getIsSchedulingPolicyAssociated()); + } + if (model.wasPropertyExplicitlySet("exascaleConfig")) { + this.exascaleConfig(model.getExascaleConfig()); + } return this; } } @@ -2067,6 +2106,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * If true, the infrastructure is using granular maintenance scheduling preference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSchedulingPolicyAssociated") + private final Boolean isSchedulingPolicyAssociated; + + /** + * If true, the infrastructure is using granular maintenance scheduling preference. + * @return the value + **/ + public Boolean getIsSchedulingPolicyAssociated() { + return isSchedulingPolicyAssociated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("exascaleConfig") + private final ExascaleConfigDetails exascaleConfig; + + public ExascaleConfigDetails getExascaleConfig() { + return exascaleConfig; + } + @Override public String toString() { return this.toString(true); @@ -2145,6 +2205,9 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.definedFileSystemConfigurations)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", isSchedulingPolicyAssociated=") + .append(String.valueOf(this.isSchedulingPolicyAssociated)); + sb.append(", exascaleConfig=").append(String.valueOf(this.exascaleConfig)); sb.append(")"); return sb.toString(); } @@ -2219,6 +2282,9 @@ public boolean equals(Object o) { this.definedFileSystemConfigurations, other.definedFileSystemConfigurations) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals( + this.isSchedulingPolicyAssociated, other.isSchedulingPolicyAssociated) + && java.util.Objects.equals(this.exascaleConfig, other.exascaleConfig) && super.equals(other); } @@ -2379,6 +2445,14 @@ public int hashCode() { : this.definedFileSystemConfigurations.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.isSchedulingPolicyAssociated == null + ? 43 + : this.isSchedulingPolicyAssociated.hashCode()); + result = + (result * PRIME) + + (this.exascaleConfig == null ? 43 : this.exascaleConfig.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmCluster.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmCluster.java new file mode 100644 index 00000000000..bbfb1bb0784 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmCluster.java @@ -0,0 +1,2324 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ExadbVmCluster.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExadbVmCluster extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "iormConfigCache", + "id", + "compartmentId", + "availabilityDomain", + "subnetId", + "backupSubnetId", + "nsgIds", + "backupNetworkNsgIds", + "lastUpdateHistoryEntryId", + "listenerPort", + "lifecycleState", + "nodeCount", + "shape", + "displayName", + "timeCreated", + "lifecycleDetails", + "timeZone", + "hostname", + "domain", + "clusterName", + "giVersion", + "gridImageId", + "gridImageType", + "systemVersion", + "sshPublicKeys", + "licenseModel", + "scanIpIds", + "vipIds", + "scanDnsRecordId", + "freeformTags", + "definedTags", + "securityAttributes", + "systemTags", + "scanDnsName", + "zoneId", + "scanListenerPortTcp", + "scanListenerPortTcpSsl", + "privateZoneId", + "dataCollectionOptions", + "totalECpuCount", + "enabledECpuCount", + "vmFileSystemStorage", + "snapshotFileSystemStorage", + "totalFileSystemStorage", + "exascaleDbStorageVaultId", + "memorySizeInGBs" + }) + public ExadbVmCluster( + ExadataIormConfig iormConfigCache, + String id, + String compartmentId, + String availabilityDomain, + String subnetId, + String backupSubnetId, + java.util.List nsgIds, + java.util.List backupNetworkNsgIds, + String lastUpdateHistoryEntryId, + Long listenerPort, + LifecycleState lifecycleState, + Integer nodeCount, + String shape, + String displayName, + java.util.Date timeCreated, + String lifecycleDetails, + String timeZone, + String hostname, + String domain, + String clusterName, + String giVersion, + String gridImageId, + GridImageType gridImageType, + String systemVersion, + java.util.List sshPublicKeys, + LicenseModel licenseModel, + java.util.List scanIpIds, + java.util.List vipIds, + String scanDnsRecordId, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> securityAttributes, + java.util.Map> systemTags, + String scanDnsName, + String zoneId, + Integer scanListenerPortTcp, + Integer scanListenerPortTcpSsl, + String privateZoneId, + DataCollectionOptions dataCollectionOptions, + Integer totalECpuCount, + Integer enabledECpuCount, + ExadbVmClusterStorageDetails vmFileSystemStorage, + ExadbVmClusterStorageDetails snapshotFileSystemStorage, + ExadbVmClusterStorageDetails totalFileSystemStorage, + String exascaleDbStorageVaultId, + Integer memorySizeInGBs) { + super(); + this.iormConfigCache = iormConfigCache; + this.id = id; + this.compartmentId = compartmentId; + this.availabilityDomain = availabilityDomain; + this.subnetId = subnetId; + this.backupSubnetId = backupSubnetId; + this.nsgIds = nsgIds; + this.backupNetworkNsgIds = backupNetworkNsgIds; + this.lastUpdateHistoryEntryId = lastUpdateHistoryEntryId; + this.listenerPort = listenerPort; + this.lifecycleState = lifecycleState; + this.nodeCount = nodeCount; + this.shape = shape; + this.displayName = displayName; + this.timeCreated = timeCreated; + this.lifecycleDetails = lifecycleDetails; + this.timeZone = timeZone; + this.hostname = hostname; + this.domain = domain; + this.clusterName = clusterName; + this.giVersion = giVersion; + this.gridImageId = gridImageId; + this.gridImageType = gridImageType; + this.systemVersion = systemVersion; + this.sshPublicKeys = sshPublicKeys; + this.licenseModel = licenseModel; + this.scanIpIds = scanIpIds; + this.vipIds = vipIds; + this.scanDnsRecordId = scanDnsRecordId; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.securityAttributes = securityAttributes; + this.systemTags = systemTags; + this.scanDnsName = scanDnsName; + this.zoneId = zoneId; + this.scanListenerPortTcp = scanListenerPortTcp; + this.scanListenerPortTcpSsl = scanListenerPortTcpSsl; + this.privateZoneId = privateZoneId; + this.dataCollectionOptions = dataCollectionOptions; + this.totalECpuCount = totalECpuCount; + this.enabledECpuCount = enabledECpuCount; + this.vmFileSystemStorage = vmFileSystemStorage; + this.snapshotFileSystemStorage = snapshotFileSystemStorage; + this.totalFileSystemStorage = totalFileSystemStorage; + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.memorySizeInGBs = memorySizeInGBs; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("iormConfigCache") + private ExadataIormConfig iormConfigCache; + + public Builder iormConfigCache(ExadataIormConfig iormConfigCache) { + this.iormConfigCache = iormConfigCache; + this.__explicitlySet__.add("iormConfigCache"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata VM cluster on Exascale Infrastructure. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The name of the availability domain in which the Exadata VM cluster on Exascale Infrastructure is located. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The name of the availability domain in which the Exadata VM cluster on Exascale Infrastructure is located. + * + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @param subnetId the value to set + * @return this builder + **/ + public Builder subnetId(String subnetId) { + this.subnetId = subnetId; + this.__explicitlySet__.add("subnetId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupSubnetId") + private String backupSubnetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @param backupSubnetId the value to set + * @return this builder + **/ + public Builder backupSubnetId(String backupSubnetId) { + this.backupSubnetId = backupSubnetId; + this.__explicitlySet__.add("backupSubnetId"); + return this; + } + /** + * The list of [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). + * **NsgIds restrictions:** + * - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private java.util.List nsgIds; + + /** + * The list of [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). + * **NsgIds restrictions:** + * - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. + * + * @param nsgIds the value to set + * @return this builder + **/ + public Builder nsgIds(java.util.List nsgIds) { + this.nsgIds = nsgIds; + this.__explicitlySet__.add("nsgIds"); + return this; + } + /** + * A list of the [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupNetworkNsgIds") + private java.util.List backupNetworkNsgIds; + + /** + * A list of the [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + * @param backupNetworkNsgIds the value to set + * @return this builder + **/ + public Builder backupNetworkNsgIds(java.util.List backupNetworkNsgIds) { + this.backupNetworkNsgIds = backupNetworkNsgIds; + this.__explicitlySet__.add("backupNetworkNsgIds"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the last maintenance update history entry. This value is updated when a maintenance update starts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastUpdateHistoryEntryId") + private String lastUpdateHistoryEntryId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the last maintenance update history entry. This value is updated when a maintenance update starts. + * @param lastUpdateHistoryEntryId the value to set + * @return this builder + **/ + public Builder lastUpdateHistoryEntryId(String lastUpdateHistoryEntryId) { + this.lastUpdateHistoryEntryId = lastUpdateHistoryEntryId; + this.__explicitlySet__.add("lastUpdateHistoryEntryId"); + return this; + } + /** + * The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPort") + private Long listenerPort; + + /** + * The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + * @param listenerPort the value to set + * @return this builder + **/ + public Builder listenerPort(Long listenerPort) { + this.listenerPort = listenerPort; + this.__explicitlySet__.add("listenerPort"); + return this; + } + /** + * The current state of the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Exadata VM cluster on Exascale Infrastructure. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") + private Integer nodeCount; + + /** + * The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + * + * @param nodeCount the value to set + * @return this builder + **/ + public Builder nodeCount(Integer nodeCount) { + this.nodeCount = nodeCount; + this.__explicitlySet__.add("nodeCount"); + return this; + } + /** + * The shape of the Exadata VM cluster on Exascale Infrastructure resource + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private String shape; + + /** + * The shape of the Exadata VM cluster on Exascale Infrastructure resource + * + * @param shape the value to set + * @return this builder + **/ + public Builder shape(String shape) { + this.shape = shape; + this.__explicitlySet__.add("shape"); + return this; + } + /** + * The user-friendly name for the Exadata VM cluster on Exascale Infrastructure. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the Exadata VM cluster on Exascale Infrastructure. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The date and time that the Exadata VM cluster on Exascale Infrastructure was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time that the Exadata VM cluster on Exascale Infrastructure was created. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The time zone to use for the Exadata VM cluster on Exascale Infrastructure. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeZone") + private String timeZone; + + /** + * The time zone to use for the Exadata VM cluster on Exascale Infrastructure. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + * @param timeZone the value to set + * @return this builder + **/ + public Builder timeZone(String timeZone) { + this.timeZone = timeZone; + this.__explicitlySet__.add("timeZone"); + return this; + } + /** + * The hostname for the Exadata VM cluster on Exascale Infrastructure. The hostname must begin with an alphabetic character, and + * can contain alphanumeric characters and hyphens (-). For Exadata systems, the maximum length of the hostname is 12 characters. + *

+ * The maximum length of the combined hostname and domain is 63 characters. + *

+ **Note:** The hostname must be unique within the subnet. If it is not unique, + * then the Exadata VM cluster on Exascale Infrastructure will fail to provision. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hostname") + private String hostname; + + /** + * The hostname for the Exadata VM cluster on Exascale Infrastructure. The hostname must begin with an alphabetic character, and + * can contain alphanumeric characters and hyphens (-). For Exadata systems, the maximum length of the hostname is 12 characters. + *

+ * The maximum length of the combined hostname and domain is 63 characters. + *

+ **Note:** The hostname must be unique within the subnet. If it is not unique, + * then the Exadata VM cluster on Exascale Infrastructure will fail to provision. + * + * @param hostname the value to set + * @return this builder + **/ + public Builder hostname(String hostname) { + this.hostname = hostname; + this.__explicitlySet__.add("hostname"); + return this; + } + /** + * A domain name used for the Exadata VM cluster on Exascale Infrastructure. If the Oracle-provided internet and VCN + * resolver is enabled for the specified subnet, then the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. + * Applies to Exadata Database Service on Exascale Infrastructure only. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domain") + private String domain; + + /** + * A domain name used for the Exadata VM cluster on Exascale Infrastructure. If the Oracle-provided internet and VCN + * resolver is enabled for the specified subnet, then the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. + * Applies to Exadata Database Service on Exascale Infrastructure only. + * + * @param domain the value to set + * @return this builder + **/ + public Builder domain(String domain) { + this.domain = domain; + this.__explicitlySet__.add("domain"); + return this; + } + /** + * The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterName") + private String clusterName; + + /** + * The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + * + * @param clusterName the value to set + * @return this builder + **/ + public Builder clusterName(String clusterName) { + this.clusterName = clusterName; + this.__explicitlySet__.add("clusterName"); + return this; + } + /** + * A valid Oracle Grid Infrastructure (GI) software version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("giVersion") + private String giVersion; + + /** + * A valid Oracle Grid Infrastructure (GI) software version. + * @param giVersion the value to set + * @return this builder + **/ + public Builder giVersion(String giVersion) { + this.giVersion = giVersion; + this.__explicitlySet__.add("giVersion"); + return this; + } + /** + * Grid Setup will be done using this grid image id. + *

+ * The grid image id can be extracted from + * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= + * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using + * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gridImageId") + private String gridImageId; + + /** + * Grid Setup will be done using this grid image id. + *

+ * The grid image id can be extracted from + * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= + * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using + * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * + * @param gridImageId the value to set + * @return this builder + **/ + public Builder gridImageId(String gridImageId) { + this.gridImageId = gridImageId; + this.__explicitlySet__.add("gridImageId"); + return this; + } + /** + * The type of Grid Image + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gridImageType") + private GridImageType gridImageType; + + /** + * The type of Grid Image + * @param gridImageType the value to set + * @return this builder + **/ + public Builder gridImageType(GridImageType gridImageType) { + this.gridImageType = gridImageType; + this.__explicitlySet__.add("gridImageType"); + return this; + } + /** + * Operating system version of the image. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemVersion") + private String systemVersion; + + /** + * Operating system version of the image. + * @param systemVersion the value to set + * @return this builder + **/ + public Builder systemVersion(String systemVersion) { + this.systemVersion = systemVersion; + this.__explicitlySet__.add("systemVersion"); + return this; + } + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sshPublicKeys") + private java.util.List sshPublicKeys; + + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + * @param sshPublicKeys the value to set + * @return this builder + **/ + public Builder sshPublicKeys(java.util.List sshPublicKeys) { + this.sshPublicKeys = sshPublicKeys; + this.__explicitlySet__.add("sshPublicKeys"); + return this; + } + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private LicenseModel licenseModel; + + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + * @param licenseModel the value to set + * @return this builder + **/ + public Builder licenseModel(LicenseModel licenseModel) { + this.licenseModel = licenseModel; + this.__explicitlySet__.add("licenseModel"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. + * SCAN IP addresses are typically used for load balancing and are not assigned to any interface. + * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanIpIds") + private java.util.List scanIpIds; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. + * SCAN IP addresses are typically used for load balancing and are not assigned to any interface. + * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + * @param scanIpIds the value to set + * @return this builder + **/ + public Builder scanIpIds(java.util.List scanIpIds) { + this.scanIpIds = scanIpIds; + this.__explicitlySet__.add("scanIpIds"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. + * The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to + * enable failover. If one node fails, then the VIP is reassigned to another active node in the cluster. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vipIds") + private java.util.List vipIds; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. + * The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to + * enable failover. If one node fails, then the VIP is reassigned to another active node in the cluster. + * + * @param vipIds the value to set + * @return this builder + **/ + public Builder vipIds(java.util.List vipIds) { + this.vipIds = vipIds; + this.__explicitlySet__.add("vipIds"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanDnsRecordId") + private String scanDnsRecordId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @param scanDnsRecordId the value to set + * @return this builder + **/ + public Builder scanDnsRecordId(String scanDnsRecordId) { + this.scanDnsRecordId = scanDnsRecordId; + this.__explicitlySet__.add("scanDnsRecordId"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanDnsName") + private String scanDnsName; + + /** + * The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @param scanDnsName the value to set + * @return this builder + **/ + public Builder scanDnsName(String scanDnsName) { + this.scanDnsName = scanDnsName; + this.__explicitlySet__.add("scanDnsName"); + return this; + } + /** + * The OCID of the zone with which the Exadata VM cluster on Exascale Infrastructure is associated. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("zoneId") + private String zoneId; + + /** + * The OCID of the zone with which the Exadata VM cluster on Exascale Infrastructure is associated. + * + * @param zoneId the value to set + * @return this builder + **/ + public Builder zoneId(String zoneId) { + this.zoneId = zoneId; + this.__explicitlySet__.add("zoneId"); + return this; + } + /** + * The TCP Single Client Access Name (SCAN) port. The default port is 1521. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanListenerPortTcp") + private Integer scanListenerPortTcp; + + /** + * The TCP Single Client Access Name (SCAN) port. The default port is 1521. + * @param scanListenerPortTcp the value to set + * @return this builder + **/ + public Builder scanListenerPortTcp(Integer scanListenerPortTcp) { + this.scanListenerPortTcp = scanListenerPortTcp; + this.__explicitlySet__.add("scanListenerPortTcp"); + return this; + } + /** + * The Secured Communication (TCPS) protocol Single Client Access Name (SCAN) port. The default port is 2484. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanListenerPortTcpSsl") + private Integer scanListenerPortTcpSsl; + + /** + * The Secured Communication (TCPS) protocol Single Client Access Name (SCAN) port. The default port is 2484. + * + * @param scanListenerPortTcpSsl the value to set + * @return this builder + **/ + public Builder scanListenerPortTcpSsl(Integer scanListenerPortTcpSsl) { + this.scanListenerPortTcpSsl = scanListenerPortTcpSsl; + this.__explicitlySet__.add("scanListenerPortTcpSsl"); + return this; + } + /** + * The private zone ID in which you want DNS records to be created. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateZoneId") + private String privateZoneId; + + /** + * The private zone ID in which you want DNS records to be created. + * + * @param privateZoneId the value to set + * @return this builder + **/ + public Builder privateZoneId(String privateZoneId) { + this.privateZoneId = privateZoneId; + this.__explicitlySet__.add("privateZoneId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataCollectionOptions") + private DataCollectionOptions dataCollectionOptions; + + public Builder dataCollectionOptions(DataCollectionOptions dataCollectionOptions) { + this.dataCollectionOptions = dataCollectionOptions; + this.__explicitlySet__.add("dataCollectionOptions"); + return this; + } + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalECpuCount") + private Integer totalECpuCount; + + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + * @param totalECpuCount the value to set + * @return this builder + **/ + public Builder totalECpuCount(Integer totalECpuCount) { + this.totalECpuCount = totalECpuCount; + this.__explicitlySet__.add("totalECpuCount"); + return this; + } + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enabledECpuCount") + private Integer enabledECpuCount; + + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + * @param enabledECpuCount the value to set + * @return this builder + **/ + public Builder enabledECpuCount(Integer enabledECpuCount) { + this.enabledECpuCount = enabledECpuCount; + this.__explicitlySet__.add("enabledECpuCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmFileSystemStorage") + private ExadbVmClusterStorageDetails vmFileSystemStorage; + + public Builder vmFileSystemStorage(ExadbVmClusterStorageDetails vmFileSystemStorage) { + this.vmFileSystemStorage = vmFileSystemStorage; + this.__explicitlySet__.add("vmFileSystemStorage"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("snapshotFileSystemStorage") + private ExadbVmClusterStorageDetails snapshotFileSystemStorage; + + public Builder snapshotFileSystemStorage( + ExadbVmClusterStorageDetails snapshotFileSystemStorage) { + this.snapshotFileSystemStorage = snapshotFileSystemStorage; + this.__explicitlySet__.add("snapshotFileSystemStorage"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("totalFileSystemStorage") + private ExadbVmClusterStorageDetails totalFileSystemStorage; + + public Builder totalFileSystemStorage(ExadbVmClusterStorageDetails totalFileSystemStorage) { + this.totalFileSystemStorage = totalFileSystemStorage; + this.__explicitlySet__.add("totalFileSystemStorage"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exascaleDbStorageVaultId") + private String exascaleDbStorageVaultId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + * @param exascaleDbStorageVaultId the value to set + * @return this builder + **/ + public Builder exascaleDbStorageVaultId(String exascaleDbStorageVaultId) { + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.__explicitlySet__.add("exascaleDbStorageVaultId"); + return this; + } + /** + * The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memorySizeInGBs") + private Integer memorySizeInGBs; + + /** + * The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + * + * @param memorySizeInGBs the value to set + * @return this builder + **/ + public Builder memorySizeInGBs(Integer memorySizeInGBs) { + this.memorySizeInGBs = memorySizeInGBs; + this.__explicitlySet__.add("memorySizeInGBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExadbVmCluster build() { + ExadbVmCluster model = + new ExadbVmCluster( + this.iormConfigCache, + this.id, + this.compartmentId, + this.availabilityDomain, + this.subnetId, + this.backupSubnetId, + this.nsgIds, + this.backupNetworkNsgIds, + this.lastUpdateHistoryEntryId, + this.listenerPort, + this.lifecycleState, + this.nodeCount, + this.shape, + this.displayName, + this.timeCreated, + this.lifecycleDetails, + this.timeZone, + this.hostname, + this.domain, + this.clusterName, + this.giVersion, + this.gridImageId, + this.gridImageType, + this.systemVersion, + this.sshPublicKeys, + this.licenseModel, + this.scanIpIds, + this.vipIds, + this.scanDnsRecordId, + this.freeformTags, + this.definedTags, + this.securityAttributes, + this.systemTags, + this.scanDnsName, + this.zoneId, + this.scanListenerPortTcp, + this.scanListenerPortTcpSsl, + this.privateZoneId, + this.dataCollectionOptions, + this.totalECpuCount, + this.enabledECpuCount, + this.vmFileSystemStorage, + this.snapshotFileSystemStorage, + this.totalFileSystemStorage, + this.exascaleDbStorageVaultId, + this.memorySizeInGBs); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExadbVmCluster model) { + if (model.wasPropertyExplicitlySet("iormConfigCache")) { + this.iormConfigCache(model.getIormConfigCache()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + if (model.wasPropertyExplicitlySet("backupSubnetId")) { + this.backupSubnetId(model.getBackupSubnetId()); + } + if (model.wasPropertyExplicitlySet("nsgIds")) { + this.nsgIds(model.getNsgIds()); + } + if (model.wasPropertyExplicitlySet("backupNetworkNsgIds")) { + this.backupNetworkNsgIds(model.getBackupNetworkNsgIds()); + } + if (model.wasPropertyExplicitlySet("lastUpdateHistoryEntryId")) { + this.lastUpdateHistoryEntryId(model.getLastUpdateHistoryEntryId()); + } + if (model.wasPropertyExplicitlySet("listenerPort")) { + this.listenerPort(model.getListenerPort()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("nodeCount")) { + this.nodeCount(model.getNodeCount()); + } + if (model.wasPropertyExplicitlySet("shape")) { + this.shape(model.getShape()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeZone")) { + this.timeZone(model.getTimeZone()); + } + if (model.wasPropertyExplicitlySet("hostname")) { + this.hostname(model.getHostname()); + } + if (model.wasPropertyExplicitlySet("domain")) { + this.domain(model.getDomain()); + } + if (model.wasPropertyExplicitlySet("clusterName")) { + this.clusterName(model.getClusterName()); + } + if (model.wasPropertyExplicitlySet("giVersion")) { + this.giVersion(model.getGiVersion()); + } + if (model.wasPropertyExplicitlySet("gridImageId")) { + this.gridImageId(model.getGridImageId()); + } + if (model.wasPropertyExplicitlySet("gridImageType")) { + this.gridImageType(model.getGridImageType()); + } + if (model.wasPropertyExplicitlySet("systemVersion")) { + this.systemVersion(model.getSystemVersion()); + } + if (model.wasPropertyExplicitlySet("sshPublicKeys")) { + this.sshPublicKeys(model.getSshPublicKeys()); + } + if (model.wasPropertyExplicitlySet("licenseModel")) { + this.licenseModel(model.getLicenseModel()); + } + if (model.wasPropertyExplicitlySet("scanIpIds")) { + this.scanIpIds(model.getScanIpIds()); + } + if (model.wasPropertyExplicitlySet("vipIds")) { + this.vipIds(model.getVipIds()); + } + if (model.wasPropertyExplicitlySet("scanDnsRecordId")) { + this.scanDnsRecordId(model.getScanDnsRecordId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("scanDnsName")) { + this.scanDnsName(model.getScanDnsName()); + } + if (model.wasPropertyExplicitlySet("zoneId")) { + this.zoneId(model.getZoneId()); + } + if (model.wasPropertyExplicitlySet("scanListenerPortTcp")) { + this.scanListenerPortTcp(model.getScanListenerPortTcp()); + } + if (model.wasPropertyExplicitlySet("scanListenerPortTcpSsl")) { + this.scanListenerPortTcpSsl(model.getScanListenerPortTcpSsl()); + } + if (model.wasPropertyExplicitlySet("privateZoneId")) { + this.privateZoneId(model.getPrivateZoneId()); + } + if (model.wasPropertyExplicitlySet("dataCollectionOptions")) { + this.dataCollectionOptions(model.getDataCollectionOptions()); + } + if (model.wasPropertyExplicitlySet("totalECpuCount")) { + this.totalECpuCount(model.getTotalECpuCount()); + } + if (model.wasPropertyExplicitlySet("enabledECpuCount")) { + this.enabledECpuCount(model.getEnabledECpuCount()); + } + if (model.wasPropertyExplicitlySet("vmFileSystemStorage")) { + this.vmFileSystemStorage(model.getVmFileSystemStorage()); + } + if (model.wasPropertyExplicitlySet("snapshotFileSystemStorage")) { + this.snapshotFileSystemStorage(model.getSnapshotFileSystemStorage()); + } + if (model.wasPropertyExplicitlySet("totalFileSystemStorage")) { + this.totalFileSystemStorage(model.getTotalFileSystemStorage()); + } + if (model.wasPropertyExplicitlySet("exascaleDbStorageVaultId")) { + this.exascaleDbStorageVaultId(model.getExascaleDbStorageVaultId()); + } + if (model.wasPropertyExplicitlySet("memorySizeInGBs")) { + this.memorySizeInGBs(model.getMemorySizeInGBs()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("iormConfigCache") + private final ExadataIormConfig iormConfigCache; + + public ExadataIormConfig getIormConfigCache() { + return iormConfigCache; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata VM cluster on Exascale Infrastructure. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The name of the availability domain in which the Exadata VM cluster on Exascale Infrastructure is located. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The name of the availability domain in which the Exadata VM cluster on Exascale Infrastructure is located. + * + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public String getSubnetId() { + return subnetId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupSubnetId") + private final String backupSubnetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public String getBackupSubnetId() { + return backupSubnetId; + } + + /** + * The list of [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). + * **NsgIds restrictions:** + * - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private final java.util.List nsgIds; + + /** + * The list of [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). + * **NsgIds restrictions:** + * - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. + * + * @return the value + **/ + public java.util.List getNsgIds() { + return nsgIds; + } + + /** + * A list of the [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupNetworkNsgIds") + private final java.util.List backupNetworkNsgIds; + + /** + * A list of the [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + * @return the value + **/ + public java.util.List getBackupNetworkNsgIds() { + return backupNetworkNsgIds; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the last maintenance update history entry. This value is updated when a maintenance update starts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastUpdateHistoryEntryId") + private final String lastUpdateHistoryEntryId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the last maintenance update history entry. This value is updated when a maintenance update starts. + * @return the value + **/ + public String getLastUpdateHistoryEntryId() { + return lastUpdateHistoryEntryId; + } + + /** + * The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPort") + private final Long listenerPort; + + /** + * The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + * @return the value + **/ + public Long getListenerPort() { + return listenerPort; + } + + /** + * The current state of the Exadata VM cluster on Exascale Infrastructure. + **/ + public enum LifecycleState { + Provisioning("PROVISIONING"), + Available("AVAILABLE"), + Updating("UPDATING"), + Terminating("TERMINATING"), + Terminated("TERMINATED"), + Failed("FAILED"), + MaintenanceInProgress("MAINTENANCE_IN_PROGRESS"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Exadata VM cluster on Exascale Infrastructure. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") + private final Integer nodeCount; + + /** + * The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public Integer getNodeCount() { + return nodeCount; + } + + /** + * The shape of the Exadata VM cluster on Exascale Infrastructure resource + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private final String shape; + + /** + * The shape of the Exadata VM cluster on Exascale Infrastructure resource + * + * @return the value + **/ + public String getShape() { + return shape; + } + + /** + * The user-friendly name for the Exadata VM cluster on Exascale Infrastructure. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the Exadata VM cluster on Exascale Infrastructure. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The date and time that the Exadata VM cluster on Exascale Infrastructure was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time that the Exadata VM cluster on Exascale Infrastructure was created. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The time zone to use for the Exadata VM cluster on Exascale Infrastructure. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeZone") + private final String timeZone; + + /** + * The time zone to use for the Exadata VM cluster on Exascale Infrastructure. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + * @return the value + **/ + public String getTimeZone() { + return timeZone; + } + + /** + * The hostname for the Exadata VM cluster on Exascale Infrastructure. The hostname must begin with an alphabetic character, and + * can contain alphanumeric characters and hyphens (-). For Exadata systems, the maximum length of the hostname is 12 characters. + *

+ * The maximum length of the combined hostname and domain is 63 characters. + *

+ **Note:** The hostname must be unique within the subnet. If it is not unique, + * then the Exadata VM cluster on Exascale Infrastructure will fail to provision. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hostname") + private final String hostname; + + /** + * The hostname for the Exadata VM cluster on Exascale Infrastructure. The hostname must begin with an alphabetic character, and + * can contain alphanumeric characters and hyphens (-). For Exadata systems, the maximum length of the hostname is 12 characters. + *

+ * The maximum length of the combined hostname and domain is 63 characters. + *

+ **Note:** The hostname must be unique within the subnet. If it is not unique, + * then the Exadata VM cluster on Exascale Infrastructure will fail to provision. + * + * @return the value + **/ + public String getHostname() { + return hostname; + } + + /** + * A domain name used for the Exadata VM cluster on Exascale Infrastructure. If the Oracle-provided internet and VCN + * resolver is enabled for the specified subnet, then the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. + * Applies to Exadata Database Service on Exascale Infrastructure only. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domain") + private final String domain; + + /** + * A domain name used for the Exadata VM cluster on Exascale Infrastructure. If the Oracle-provided internet and VCN + * resolver is enabled for the specified subnet, then the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. + * Applies to Exadata Database Service on Exascale Infrastructure only. + * + * @return the value + **/ + public String getDomain() { + return domain; + } + + /** + * The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterName") + private final String clusterName; + + /** + * The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + * + * @return the value + **/ + public String getClusterName() { + return clusterName; + } + + /** + * A valid Oracle Grid Infrastructure (GI) software version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("giVersion") + private final String giVersion; + + /** + * A valid Oracle Grid Infrastructure (GI) software version. + * @return the value + **/ + public String getGiVersion() { + return giVersion; + } + + /** + * Grid Setup will be done using this grid image id. + *

+ * The grid image id can be extracted from + * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= + * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using + * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gridImageId") + private final String gridImageId; + + /** + * Grid Setup will be done using this grid image id. + *

+ * The grid image id can be extracted from + * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= + * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using + * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * + * @return the value + **/ + public String getGridImageId() { + return gridImageId; + } + + /** + * The type of Grid Image + **/ + public enum GridImageType { + ReleaseUpdate("RELEASE_UPDATE"), + CustomImage("CUSTOM_IMAGE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GridImageType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (GridImageType v : GridImageType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + GridImageType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static GridImageType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'GridImageType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The type of Grid Image + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gridImageType") + private final GridImageType gridImageType; + + /** + * The type of Grid Image + * @return the value + **/ + public GridImageType getGridImageType() { + return gridImageType; + } + + /** + * Operating system version of the image. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemVersion") + private final String systemVersion; + + /** + * Operating system version of the image. + * @return the value + **/ + public String getSystemVersion() { + return systemVersion; + } + + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sshPublicKeys") + private final java.util.List sshPublicKeys; + + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + * @return the value + **/ + public java.util.List getSshPublicKeys() { + return sshPublicKeys; + } + + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + public enum LicenseModel { + LicenseIncluded("LICENSE_INCLUDED"), + BringYourOwnLicense("BRING_YOUR_OWN_LICENSE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LicenseModel.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LicenseModel v : LicenseModel.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LicenseModel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LicenseModel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LicenseModel', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private final LicenseModel licenseModel; + + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + * @return the value + **/ + public LicenseModel getLicenseModel() { + return licenseModel; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. + * SCAN IP addresses are typically used for load balancing and are not assigned to any interface. + * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanIpIds") + private final java.util.List scanIpIds; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. + * SCAN IP addresses are typically used for load balancing and are not assigned to any interface. + * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + * @return the value + **/ + public java.util.List getScanIpIds() { + return scanIpIds; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. + * The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to + * enable failover. If one node fails, then the VIP is reassigned to another active node in the cluster. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vipIds") + private final java.util.List vipIds; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. + * The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to + * enable failover. If one node fails, then the VIP is reassigned to another active node in the cluster. + * + * @return the value + **/ + public java.util.List getVipIds() { + return vipIds; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanDnsRecordId") + private final String scanDnsRecordId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public String getScanDnsRecordId() { + return scanDnsRecordId; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + /** + * The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanDnsName") + private final String scanDnsName; + + /** + * The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public String getScanDnsName() { + return scanDnsName; + } + + /** + * The OCID of the zone with which the Exadata VM cluster on Exascale Infrastructure is associated. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("zoneId") + private final String zoneId; + + /** + * The OCID of the zone with which the Exadata VM cluster on Exascale Infrastructure is associated. + * + * @return the value + **/ + public String getZoneId() { + return zoneId; + } + + /** + * The TCP Single Client Access Name (SCAN) port. The default port is 1521. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanListenerPortTcp") + private final Integer scanListenerPortTcp; + + /** + * The TCP Single Client Access Name (SCAN) port. The default port is 1521. + * @return the value + **/ + public Integer getScanListenerPortTcp() { + return scanListenerPortTcp; + } + + /** + * The Secured Communication (TCPS) protocol Single Client Access Name (SCAN) port. The default port is 2484. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanListenerPortTcpSsl") + private final Integer scanListenerPortTcpSsl; + + /** + * The Secured Communication (TCPS) protocol Single Client Access Name (SCAN) port. The default port is 2484. + * + * @return the value + **/ + public Integer getScanListenerPortTcpSsl() { + return scanListenerPortTcpSsl; + } + + /** + * The private zone ID in which you want DNS records to be created. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateZoneId") + private final String privateZoneId; + + /** + * The private zone ID in which you want DNS records to be created. + * + * @return the value + **/ + public String getPrivateZoneId() { + return privateZoneId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataCollectionOptions") + private final DataCollectionOptions dataCollectionOptions; + + public DataCollectionOptions getDataCollectionOptions() { + return dataCollectionOptions; + } + + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalECpuCount") + private final Integer totalECpuCount; + + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public Integer getTotalECpuCount() { + return totalECpuCount; + } + + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enabledECpuCount") + private final Integer enabledECpuCount; + + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public Integer getEnabledECpuCount() { + return enabledECpuCount; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmFileSystemStorage") + private final ExadbVmClusterStorageDetails vmFileSystemStorage; + + public ExadbVmClusterStorageDetails getVmFileSystemStorage() { + return vmFileSystemStorage; + } + + @com.fasterxml.jackson.annotation.JsonProperty("snapshotFileSystemStorage") + private final ExadbVmClusterStorageDetails snapshotFileSystemStorage; + + public ExadbVmClusterStorageDetails getSnapshotFileSystemStorage() { + return snapshotFileSystemStorage; + } + + @com.fasterxml.jackson.annotation.JsonProperty("totalFileSystemStorage") + private final ExadbVmClusterStorageDetails totalFileSystemStorage; + + public ExadbVmClusterStorageDetails getTotalFileSystemStorage() { + return totalFileSystemStorage; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exascaleDbStorageVaultId") + private final String exascaleDbStorageVaultId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + * @return the value + **/ + public String getExascaleDbStorageVaultId() { + return exascaleDbStorageVaultId; + } + + /** + * The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memorySizeInGBs") + private final Integer memorySizeInGBs; + + /** + * The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + * + * @return the value + **/ + public Integer getMemorySizeInGBs() { + return memorySizeInGBs; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExadbVmCluster("); + sb.append("super=").append(super.toString()); + sb.append("iormConfigCache=").append(String.valueOf(this.iormConfigCache)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", backupSubnetId=").append(String.valueOf(this.backupSubnetId)); + sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); + sb.append(", backupNetworkNsgIds=").append(String.valueOf(this.backupNetworkNsgIds)); + sb.append(", lastUpdateHistoryEntryId=") + .append(String.valueOf(this.lastUpdateHistoryEntryId)); + sb.append(", listenerPort=").append(String.valueOf(this.listenerPort)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", nodeCount=").append(String.valueOf(this.nodeCount)); + sb.append(", shape=").append(String.valueOf(this.shape)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeZone=").append(String.valueOf(this.timeZone)); + sb.append(", hostname=").append(String.valueOf(this.hostname)); + sb.append(", domain=").append(String.valueOf(this.domain)); + sb.append(", clusterName=").append(String.valueOf(this.clusterName)); + sb.append(", giVersion=").append(String.valueOf(this.giVersion)); + sb.append(", gridImageId=").append(String.valueOf(this.gridImageId)); + sb.append(", gridImageType=").append(String.valueOf(this.gridImageType)); + sb.append(", systemVersion=").append(String.valueOf(this.systemVersion)); + sb.append(", sshPublicKeys=").append(String.valueOf(this.sshPublicKeys)); + sb.append(", licenseModel=").append(String.valueOf(this.licenseModel)); + sb.append(", scanIpIds=").append(String.valueOf(this.scanIpIds)); + sb.append(", vipIds=").append(String.valueOf(this.vipIds)); + sb.append(", scanDnsRecordId=").append(String.valueOf(this.scanDnsRecordId)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", scanDnsName=").append(String.valueOf(this.scanDnsName)); + sb.append(", zoneId=").append(String.valueOf(this.zoneId)); + sb.append(", scanListenerPortTcp=").append(String.valueOf(this.scanListenerPortTcp)); + sb.append(", scanListenerPortTcpSsl=").append(String.valueOf(this.scanListenerPortTcpSsl)); + sb.append(", privateZoneId=").append(String.valueOf(this.privateZoneId)); + sb.append(", dataCollectionOptions=").append(String.valueOf(this.dataCollectionOptions)); + sb.append(", totalECpuCount=").append(String.valueOf(this.totalECpuCount)); + sb.append(", enabledECpuCount=").append(String.valueOf(this.enabledECpuCount)); + sb.append(", vmFileSystemStorage=").append(String.valueOf(this.vmFileSystemStorage)); + sb.append(", snapshotFileSystemStorage=") + .append(String.valueOf(this.snapshotFileSystemStorage)); + sb.append(", totalFileSystemStorage=").append(String.valueOf(this.totalFileSystemStorage)); + sb.append(", exascaleDbStorageVaultId=") + .append(String.valueOf(this.exascaleDbStorageVaultId)); + sb.append(", memorySizeInGBs=").append(String.valueOf(this.memorySizeInGBs)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExadbVmCluster)) { + return false; + } + + ExadbVmCluster other = (ExadbVmCluster) o; + return java.util.Objects.equals(this.iormConfigCache, other.iormConfigCache) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals(this.backupSubnetId, other.backupSubnetId) + && java.util.Objects.equals(this.nsgIds, other.nsgIds) + && java.util.Objects.equals(this.backupNetworkNsgIds, other.backupNetworkNsgIds) + && java.util.Objects.equals( + this.lastUpdateHistoryEntryId, other.lastUpdateHistoryEntryId) + && java.util.Objects.equals(this.listenerPort, other.listenerPort) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.nodeCount, other.nodeCount) + && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeZone, other.timeZone) + && java.util.Objects.equals(this.hostname, other.hostname) + && java.util.Objects.equals(this.domain, other.domain) + && java.util.Objects.equals(this.clusterName, other.clusterName) + && java.util.Objects.equals(this.giVersion, other.giVersion) + && java.util.Objects.equals(this.gridImageId, other.gridImageId) + && java.util.Objects.equals(this.gridImageType, other.gridImageType) + && java.util.Objects.equals(this.systemVersion, other.systemVersion) + && java.util.Objects.equals(this.sshPublicKeys, other.sshPublicKeys) + && java.util.Objects.equals(this.licenseModel, other.licenseModel) + && java.util.Objects.equals(this.scanIpIds, other.scanIpIds) + && java.util.Objects.equals(this.vipIds, other.vipIds) + && java.util.Objects.equals(this.scanDnsRecordId, other.scanDnsRecordId) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.scanDnsName, other.scanDnsName) + && java.util.Objects.equals(this.zoneId, other.zoneId) + && java.util.Objects.equals(this.scanListenerPortTcp, other.scanListenerPortTcp) + && java.util.Objects.equals( + this.scanListenerPortTcpSsl, other.scanListenerPortTcpSsl) + && java.util.Objects.equals(this.privateZoneId, other.privateZoneId) + && java.util.Objects.equals(this.dataCollectionOptions, other.dataCollectionOptions) + && java.util.Objects.equals(this.totalECpuCount, other.totalECpuCount) + && java.util.Objects.equals(this.enabledECpuCount, other.enabledECpuCount) + && java.util.Objects.equals(this.vmFileSystemStorage, other.vmFileSystemStorage) + && java.util.Objects.equals( + this.snapshotFileSystemStorage, other.snapshotFileSystemStorage) + && java.util.Objects.equals( + this.totalFileSystemStorage, other.totalFileSystemStorage) + && java.util.Objects.equals( + this.exascaleDbStorageVaultId, other.exascaleDbStorageVaultId) + && java.util.Objects.equals(this.memorySizeInGBs, other.memorySizeInGBs) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.iormConfigCache == null ? 43 : this.iormConfigCache.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); + result = + (result * PRIME) + + (this.backupSubnetId == null ? 43 : this.backupSubnetId.hashCode()); + result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); + result = + (result * PRIME) + + (this.backupNetworkNsgIds == null + ? 43 + : this.backupNetworkNsgIds.hashCode()); + result = + (result * PRIME) + + (this.lastUpdateHistoryEntryId == null + ? 43 + : this.lastUpdateHistoryEntryId.hashCode()); + result = (result * PRIME) + (this.listenerPort == null ? 43 : this.listenerPort.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.nodeCount == null ? 43 : this.nodeCount.hashCode()); + result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeZone == null ? 43 : this.timeZone.hashCode()); + result = (result * PRIME) + (this.hostname == null ? 43 : this.hostname.hashCode()); + result = (result * PRIME) + (this.domain == null ? 43 : this.domain.hashCode()); + result = (result * PRIME) + (this.clusterName == null ? 43 : this.clusterName.hashCode()); + result = (result * PRIME) + (this.giVersion == null ? 43 : this.giVersion.hashCode()); + result = (result * PRIME) + (this.gridImageId == null ? 43 : this.gridImageId.hashCode()); + result = + (result * PRIME) + + (this.gridImageType == null ? 43 : this.gridImageType.hashCode()); + result = + (result * PRIME) + + (this.systemVersion == null ? 43 : this.systemVersion.hashCode()); + result = + (result * PRIME) + + (this.sshPublicKeys == null ? 43 : this.sshPublicKeys.hashCode()); + result = (result * PRIME) + (this.licenseModel == null ? 43 : this.licenseModel.hashCode()); + result = (result * PRIME) + (this.scanIpIds == null ? 43 : this.scanIpIds.hashCode()); + result = (result * PRIME) + (this.vipIds == null ? 43 : this.vipIds.hashCode()); + result = + (result * PRIME) + + (this.scanDnsRecordId == null ? 43 : this.scanDnsRecordId.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + (this.scanDnsName == null ? 43 : this.scanDnsName.hashCode()); + result = (result * PRIME) + (this.zoneId == null ? 43 : this.zoneId.hashCode()); + result = + (result * PRIME) + + (this.scanListenerPortTcp == null + ? 43 + : this.scanListenerPortTcp.hashCode()); + result = + (result * PRIME) + + (this.scanListenerPortTcpSsl == null + ? 43 + : this.scanListenerPortTcpSsl.hashCode()); + result = + (result * PRIME) + + (this.privateZoneId == null ? 43 : this.privateZoneId.hashCode()); + result = + (result * PRIME) + + (this.dataCollectionOptions == null + ? 43 + : this.dataCollectionOptions.hashCode()); + result = + (result * PRIME) + + (this.totalECpuCount == null ? 43 : this.totalECpuCount.hashCode()); + result = + (result * PRIME) + + (this.enabledECpuCount == null ? 43 : this.enabledECpuCount.hashCode()); + result = + (result * PRIME) + + (this.vmFileSystemStorage == null + ? 43 + : this.vmFileSystemStorage.hashCode()); + result = + (result * PRIME) + + (this.snapshotFileSystemStorage == null + ? 43 + : this.snapshotFileSystemStorage.hashCode()); + result = + (result * PRIME) + + (this.totalFileSystemStorage == null + ? 43 + : this.totalFileSystemStorage.hashCode()); + result = + (result * PRIME) + + (this.exascaleDbStorageVaultId == null + ? 43 + : this.exascaleDbStorageVaultId.hashCode()); + result = + (result * PRIME) + + (this.memorySizeInGBs == null ? 43 : this.memorySizeInGBs.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterStorageDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterStorageDetails.java new file mode 100644 index 00000000000..d1cc3fe24b2 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterStorageDetails.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Storage Details on the Exadata VM cluster. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExadbVmClusterStorageDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExadbVmClusterStorageDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"totalSizeInGbs"}) + public ExadbVmClusterStorageDetails(Integer totalSizeInGbs) { + super(); + this.totalSizeInGbs = totalSizeInGbs; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Total Capacity + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalSizeInGbs") + private Integer totalSizeInGbs; + + /** + * Total Capacity + * + * @param totalSizeInGbs the value to set + * @return this builder + **/ + public Builder totalSizeInGbs(Integer totalSizeInGbs) { + this.totalSizeInGbs = totalSizeInGbs; + this.__explicitlySet__.add("totalSizeInGbs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExadbVmClusterStorageDetails build() { + ExadbVmClusterStorageDetails model = + new ExadbVmClusterStorageDetails(this.totalSizeInGbs); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExadbVmClusterStorageDetails model) { + if (model.wasPropertyExplicitlySet("totalSizeInGbs")) { + this.totalSizeInGbs(model.getTotalSizeInGbs()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Total Capacity + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalSizeInGbs") + private final Integer totalSizeInGbs; + + /** + * Total Capacity + * + * @return the value + **/ + public Integer getTotalSizeInGbs() { + return totalSizeInGbs; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExadbVmClusterStorageDetails("); + sb.append("super=").append(super.toString()); + sb.append("totalSizeInGbs=").append(String.valueOf(this.totalSizeInGbs)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExadbVmClusterStorageDetails)) { + return false; + } + + ExadbVmClusterStorageDetails other = (ExadbVmClusterStorageDetails) o; + return java.util.Objects.equals(this.totalSizeInGbs, other.totalSizeInGbs) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.totalSizeInGbs == null ? 43 : this.totalSizeInGbs.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterSummary.java new file mode 100644 index 00000000000..73600e9bc11 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterSummary.java @@ -0,0 +1,2299 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExadbVmClusterSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExadbVmClusterSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "availabilityDomain", + "subnetId", + "backupSubnetId", + "nsgIds", + "backupNetworkNsgIds", + "lastUpdateHistoryEntryId", + "listenerPort", + "lifecycleState", + "nodeCount", + "shape", + "displayName", + "timeCreated", + "lifecycleDetails", + "timeZone", + "hostname", + "domain", + "clusterName", + "giVersion", + "gridImageId", + "gridImageType", + "systemVersion", + "sshPublicKeys", + "licenseModel", + "scanIpIds", + "vipIds", + "scanDnsRecordId", + "freeformTags", + "definedTags", + "securityAttributes", + "systemTags", + "scanDnsName", + "zoneId", + "scanListenerPortTcp", + "scanListenerPortTcpSsl", + "privateZoneId", + "dataCollectionOptions", + "totalECpuCount", + "enabledECpuCount", + "vmFileSystemStorage", + "snapshotFileSystemStorage", + "totalFileSystemStorage", + "exascaleDbStorageVaultId", + "memorySizeInGBs" + }) + public ExadbVmClusterSummary( + String id, + String compartmentId, + String availabilityDomain, + String subnetId, + String backupSubnetId, + java.util.List nsgIds, + java.util.List backupNetworkNsgIds, + String lastUpdateHistoryEntryId, + Long listenerPort, + LifecycleState lifecycleState, + Integer nodeCount, + String shape, + String displayName, + java.util.Date timeCreated, + String lifecycleDetails, + String timeZone, + String hostname, + String domain, + String clusterName, + String giVersion, + String gridImageId, + GridImageType gridImageType, + String systemVersion, + java.util.List sshPublicKeys, + LicenseModel licenseModel, + java.util.List scanIpIds, + java.util.List vipIds, + String scanDnsRecordId, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> securityAttributes, + java.util.Map> systemTags, + String scanDnsName, + String zoneId, + Integer scanListenerPortTcp, + Integer scanListenerPortTcpSsl, + String privateZoneId, + DataCollectionOptions dataCollectionOptions, + Integer totalECpuCount, + Integer enabledECpuCount, + ExadbVmClusterStorageDetails vmFileSystemStorage, + ExadbVmClusterStorageDetails snapshotFileSystemStorage, + ExadbVmClusterStorageDetails totalFileSystemStorage, + String exascaleDbStorageVaultId, + Integer memorySizeInGBs) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.availabilityDomain = availabilityDomain; + this.subnetId = subnetId; + this.backupSubnetId = backupSubnetId; + this.nsgIds = nsgIds; + this.backupNetworkNsgIds = backupNetworkNsgIds; + this.lastUpdateHistoryEntryId = lastUpdateHistoryEntryId; + this.listenerPort = listenerPort; + this.lifecycleState = lifecycleState; + this.nodeCount = nodeCount; + this.shape = shape; + this.displayName = displayName; + this.timeCreated = timeCreated; + this.lifecycleDetails = lifecycleDetails; + this.timeZone = timeZone; + this.hostname = hostname; + this.domain = domain; + this.clusterName = clusterName; + this.giVersion = giVersion; + this.gridImageId = gridImageId; + this.gridImageType = gridImageType; + this.systemVersion = systemVersion; + this.sshPublicKeys = sshPublicKeys; + this.licenseModel = licenseModel; + this.scanIpIds = scanIpIds; + this.vipIds = vipIds; + this.scanDnsRecordId = scanDnsRecordId; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.securityAttributes = securityAttributes; + this.systemTags = systemTags; + this.scanDnsName = scanDnsName; + this.zoneId = zoneId; + this.scanListenerPortTcp = scanListenerPortTcp; + this.scanListenerPortTcpSsl = scanListenerPortTcpSsl; + this.privateZoneId = privateZoneId; + this.dataCollectionOptions = dataCollectionOptions; + this.totalECpuCount = totalECpuCount; + this.enabledECpuCount = enabledECpuCount; + this.vmFileSystemStorage = vmFileSystemStorage; + this.snapshotFileSystemStorage = snapshotFileSystemStorage; + this.totalFileSystemStorage = totalFileSystemStorage; + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.memorySizeInGBs = memorySizeInGBs; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata VM cluster on Exascale Infrastructure. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The name of the availability domain in which the Exadata VM cluster on Exascale Infrastructure is located. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The name of the availability domain in which the Exadata VM cluster on Exascale Infrastructure is located. + * + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @param subnetId the value to set + * @return this builder + **/ + public Builder subnetId(String subnetId) { + this.subnetId = subnetId; + this.__explicitlySet__.add("subnetId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupSubnetId") + private String backupSubnetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @param backupSubnetId the value to set + * @return this builder + **/ + public Builder backupSubnetId(String backupSubnetId) { + this.backupSubnetId = backupSubnetId; + this.__explicitlySet__.add("backupSubnetId"); + return this; + } + /** + * The list of [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). + * **NsgIds restrictions:** + * - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private java.util.List nsgIds; + + /** + * The list of [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). + * **NsgIds restrictions:** + * - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. + * + * @param nsgIds the value to set + * @return this builder + **/ + public Builder nsgIds(java.util.List nsgIds) { + this.nsgIds = nsgIds; + this.__explicitlySet__.add("nsgIds"); + return this; + } + /** + * A list of the [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupNetworkNsgIds") + private java.util.List backupNetworkNsgIds; + + /** + * A list of the [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + * @param backupNetworkNsgIds the value to set + * @return this builder + **/ + public Builder backupNetworkNsgIds(java.util.List backupNetworkNsgIds) { + this.backupNetworkNsgIds = backupNetworkNsgIds; + this.__explicitlySet__.add("backupNetworkNsgIds"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the last maintenance update history entry. This value is updated when a maintenance update starts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastUpdateHistoryEntryId") + private String lastUpdateHistoryEntryId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the last maintenance update history entry. This value is updated when a maintenance update starts. + * @param lastUpdateHistoryEntryId the value to set + * @return this builder + **/ + public Builder lastUpdateHistoryEntryId(String lastUpdateHistoryEntryId) { + this.lastUpdateHistoryEntryId = lastUpdateHistoryEntryId; + this.__explicitlySet__.add("lastUpdateHistoryEntryId"); + return this; + } + /** + * The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPort") + private Long listenerPort; + + /** + * The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + * @param listenerPort the value to set + * @return this builder + **/ + public Builder listenerPort(Long listenerPort) { + this.listenerPort = listenerPort; + this.__explicitlySet__.add("listenerPort"); + return this; + } + /** + * The current state of the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Exadata VM cluster on Exascale Infrastructure. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") + private Integer nodeCount; + + /** + * The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + * + * @param nodeCount the value to set + * @return this builder + **/ + public Builder nodeCount(Integer nodeCount) { + this.nodeCount = nodeCount; + this.__explicitlySet__.add("nodeCount"); + return this; + } + /** + * The shape of the Exadata VM cluster on Exascale Infrastructure resource + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private String shape; + + /** + * The shape of the Exadata VM cluster on Exascale Infrastructure resource + * + * @param shape the value to set + * @return this builder + **/ + public Builder shape(String shape) { + this.shape = shape; + this.__explicitlySet__.add("shape"); + return this; + } + /** + * The user-friendly name for the Exadata VM cluster on Exascale Infrastructure. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the Exadata VM cluster on Exascale Infrastructure. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The date and time that the Exadata VM cluster on Exascale Infrastructure was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time that the Exadata VM cluster on Exascale Infrastructure was created. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The time zone to use for the Exadata VM cluster on Exascale Infrastructure. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeZone") + private String timeZone; + + /** + * The time zone to use for the Exadata VM cluster on Exascale Infrastructure. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + * @param timeZone the value to set + * @return this builder + **/ + public Builder timeZone(String timeZone) { + this.timeZone = timeZone; + this.__explicitlySet__.add("timeZone"); + return this; + } + /** + * The hostname for the Exadata VM cluster on Exascale Infrastructure. The hostname must begin with an alphabetic character, and + * can contain alphanumeric characters and hyphens (-). For Exadata systems, the maximum length of the hostname is 12 characters. + *

+ * The maximum length of the combined hostname and domain is 63 characters. + *

+ **Note:** The hostname must be unique within the subnet. If it is not unique, + * then the Exadata VM cluster on Exascale Infrastructure will fail to provision. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hostname") + private String hostname; + + /** + * The hostname for the Exadata VM cluster on Exascale Infrastructure. The hostname must begin with an alphabetic character, and + * can contain alphanumeric characters and hyphens (-). For Exadata systems, the maximum length of the hostname is 12 characters. + *

+ * The maximum length of the combined hostname and domain is 63 characters. + *

+ **Note:** The hostname must be unique within the subnet. If it is not unique, + * then the Exadata VM cluster on Exascale Infrastructure will fail to provision. + * + * @param hostname the value to set + * @return this builder + **/ + public Builder hostname(String hostname) { + this.hostname = hostname; + this.__explicitlySet__.add("hostname"); + return this; + } + /** + * A domain name used for the Exadata VM cluster on Exascale Infrastructure. If the Oracle-provided internet and VCN + * resolver is enabled for the specified subnet, then the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. + * Applies to Exadata Database Service on Exascale Infrastructure only. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domain") + private String domain; + + /** + * A domain name used for the Exadata VM cluster on Exascale Infrastructure. If the Oracle-provided internet and VCN + * resolver is enabled for the specified subnet, then the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. + * Applies to Exadata Database Service on Exascale Infrastructure only. + * + * @param domain the value to set + * @return this builder + **/ + public Builder domain(String domain) { + this.domain = domain; + this.__explicitlySet__.add("domain"); + return this; + } + /** + * The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterName") + private String clusterName; + + /** + * The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + * + * @param clusterName the value to set + * @return this builder + **/ + public Builder clusterName(String clusterName) { + this.clusterName = clusterName; + this.__explicitlySet__.add("clusterName"); + return this; + } + /** + * A valid Oracle Grid Infrastructure (GI) software version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("giVersion") + private String giVersion; + + /** + * A valid Oracle Grid Infrastructure (GI) software version. + * @param giVersion the value to set + * @return this builder + **/ + public Builder giVersion(String giVersion) { + this.giVersion = giVersion; + this.__explicitlySet__.add("giVersion"); + return this; + } + /** + * Grid Setup will be done using this grid image id. + *

+ * The grid image id can be extracted from + * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= + * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using + * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gridImageId") + private String gridImageId; + + /** + * Grid Setup will be done using this grid image id. + *

+ * The grid image id can be extracted from + * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= + * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using + * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * + * @param gridImageId the value to set + * @return this builder + **/ + public Builder gridImageId(String gridImageId) { + this.gridImageId = gridImageId; + this.__explicitlySet__.add("gridImageId"); + return this; + } + /** + * The type of Grid Image + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gridImageType") + private GridImageType gridImageType; + + /** + * The type of Grid Image + * @param gridImageType the value to set + * @return this builder + **/ + public Builder gridImageType(GridImageType gridImageType) { + this.gridImageType = gridImageType; + this.__explicitlySet__.add("gridImageType"); + return this; + } + /** + * Operating system version of the image. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemVersion") + private String systemVersion; + + /** + * Operating system version of the image. + * @param systemVersion the value to set + * @return this builder + **/ + public Builder systemVersion(String systemVersion) { + this.systemVersion = systemVersion; + this.__explicitlySet__.add("systemVersion"); + return this; + } + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sshPublicKeys") + private java.util.List sshPublicKeys; + + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + * @param sshPublicKeys the value to set + * @return this builder + **/ + public Builder sshPublicKeys(java.util.List sshPublicKeys) { + this.sshPublicKeys = sshPublicKeys; + this.__explicitlySet__.add("sshPublicKeys"); + return this; + } + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private LicenseModel licenseModel; + + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + * @param licenseModel the value to set + * @return this builder + **/ + public Builder licenseModel(LicenseModel licenseModel) { + this.licenseModel = licenseModel; + this.__explicitlySet__.add("licenseModel"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. + * SCAN IP addresses are typically used for load balancing and are not assigned to any interface. + * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanIpIds") + private java.util.List scanIpIds; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. + * SCAN IP addresses are typically used for load balancing and are not assigned to any interface. + * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + * @param scanIpIds the value to set + * @return this builder + **/ + public Builder scanIpIds(java.util.List scanIpIds) { + this.scanIpIds = scanIpIds; + this.__explicitlySet__.add("scanIpIds"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. + * The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to + * enable failover. If one node fails, then the VIP is reassigned to another active node in the cluster. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vipIds") + private java.util.List vipIds; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. + * The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to + * enable failover. If one node fails, then the VIP is reassigned to another active node in the cluster. + * + * @param vipIds the value to set + * @return this builder + **/ + public Builder vipIds(java.util.List vipIds) { + this.vipIds = vipIds; + this.__explicitlySet__.add("vipIds"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanDnsRecordId") + private String scanDnsRecordId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @param scanDnsRecordId the value to set + * @return this builder + **/ + public Builder scanDnsRecordId(String scanDnsRecordId) { + this.scanDnsRecordId = scanDnsRecordId; + this.__explicitlySet__.add("scanDnsRecordId"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanDnsName") + private String scanDnsName; + + /** + * The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @param scanDnsName the value to set + * @return this builder + **/ + public Builder scanDnsName(String scanDnsName) { + this.scanDnsName = scanDnsName; + this.__explicitlySet__.add("scanDnsName"); + return this; + } + /** + * The OCID of the zone with which the Exadata VM cluster on Exascale Infrastructure is associated. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("zoneId") + private String zoneId; + + /** + * The OCID of the zone with which the Exadata VM cluster on Exascale Infrastructure is associated. + * + * @param zoneId the value to set + * @return this builder + **/ + public Builder zoneId(String zoneId) { + this.zoneId = zoneId; + this.__explicitlySet__.add("zoneId"); + return this; + } + /** + * The TCP Single Client Access Name (SCAN) port. The default port is 1521. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanListenerPortTcp") + private Integer scanListenerPortTcp; + + /** + * The TCP Single Client Access Name (SCAN) port. The default port is 1521. + * @param scanListenerPortTcp the value to set + * @return this builder + **/ + public Builder scanListenerPortTcp(Integer scanListenerPortTcp) { + this.scanListenerPortTcp = scanListenerPortTcp; + this.__explicitlySet__.add("scanListenerPortTcp"); + return this; + } + /** + * The Secured Communication (TCPS) protocol Single Client Access Name (SCAN) port. The default port is 2484. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanListenerPortTcpSsl") + private Integer scanListenerPortTcpSsl; + + /** + * The Secured Communication (TCPS) protocol Single Client Access Name (SCAN) port. The default port is 2484. + * + * @param scanListenerPortTcpSsl the value to set + * @return this builder + **/ + public Builder scanListenerPortTcpSsl(Integer scanListenerPortTcpSsl) { + this.scanListenerPortTcpSsl = scanListenerPortTcpSsl; + this.__explicitlySet__.add("scanListenerPortTcpSsl"); + return this; + } + /** + * The private zone ID in which you want DNS records to be created. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateZoneId") + private String privateZoneId; + + /** + * The private zone ID in which you want DNS records to be created. + * + * @param privateZoneId the value to set + * @return this builder + **/ + public Builder privateZoneId(String privateZoneId) { + this.privateZoneId = privateZoneId; + this.__explicitlySet__.add("privateZoneId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataCollectionOptions") + private DataCollectionOptions dataCollectionOptions; + + public Builder dataCollectionOptions(DataCollectionOptions dataCollectionOptions) { + this.dataCollectionOptions = dataCollectionOptions; + this.__explicitlySet__.add("dataCollectionOptions"); + return this; + } + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalECpuCount") + private Integer totalECpuCount; + + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + * @param totalECpuCount the value to set + * @return this builder + **/ + public Builder totalECpuCount(Integer totalECpuCount) { + this.totalECpuCount = totalECpuCount; + this.__explicitlySet__.add("totalECpuCount"); + return this; + } + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enabledECpuCount") + private Integer enabledECpuCount; + + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + * @param enabledECpuCount the value to set + * @return this builder + **/ + public Builder enabledECpuCount(Integer enabledECpuCount) { + this.enabledECpuCount = enabledECpuCount; + this.__explicitlySet__.add("enabledECpuCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmFileSystemStorage") + private ExadbVmClusterStorageDetails vmFileSystemStorage; + + public Builder vmFileSystemStorage(ExadbVmClusterStorageDetails vmFileSystemStorage) { + this.vmFileSystemStorage = vmFileSystemStorage; + this.__explicitlySet__.add("vmFileSystemStorage"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("snapshotFileSystemStorage") + private ExadbVmClusterStorageDetails snapshotFileSystemStorage; + + public Builder snapshotFileSystemStorage( + ExadbVmClusterStorageDetails snapshotFileSystemStorage) { + this.snapshotFileSystemStorage = snapshotFileSystemStorage; + this.__explicitlySet__.add("snapshotFileSystemStorage"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("totalFileSystemStorage") + private ExadbVmClusterStorageDetails totalFileSystemStorage; + + public Builder totalFileSystemStorage(ExadbVmClusterStorageDetails totalFileSystemStorage) { + this.totalFileSystemStorage = totalFileSystemStorage; + this.__explicitlySet__.add("totalFileSystemStorage"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exascaleDbStorageVaultId") + private String exascaleDbStorageVaultId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + * @param exascaleDbStorageVaultId the value to set + * @return this builder + **/ + public Builder exascaleDbStorageVaultId(String exascaleDbStorageVaultId) { + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.__explicitlySet__.add("exascaleDbStorageVaultId"); + return this; + } + /** + * The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memorySizeInGBs") + private Integer memorySizeInGBs; + + /** + * The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + * + * @param memorySizeInGBs the value to set + * @return this builder + **/ + public Builder memorySizeInGBs(Integer memorySizeInGBs) { + this.memorySizeInGBs = memorySizeInGBs; + this.__explicitlySet__.add("memorySizeInGBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExadbVmClusterSummary build() { + ExadbVmClusterSummary model = + new ExadbVmClusterSummary( + this.id, + this.compartmentId, + this.availabilityDomain, + this.subnetId, + this.backupSubnetId, + this.nsgIds, + this.backupNetworkNsgIds, + this.lastUpdateHistoryEntryId, + this.listenerPort, + this.lifecycleState, + this.nodeCount, + this.shape, + this.displayName, + this.timeCreated, + this.lifecycleDetails, + this.timeZone, + this.hostname, + this.domain, + this.clusterName, + this.giVersion, + this.gridImageId, + this.gridImageType, + this.systemVersion, + this.sshPublicKeys, + this.licenseModel, + this.scanIpIds, + this.vipIds, + this.scanDnsRecordId, + this.freeformTags, + this.definedTags, + this.securityAttributes, + this.systemTags, + this.scanDnsName, + this.zoneId, + this.scanListenerPortTcp, + this.scanListenerPortTcpSsl, + this.privateZoneId, + this.dataCollectionOptions, + this.totalECpuCount, + this.enabledECpuCount, + this.vmFileSystemStorage, + this.snapshotFileSystemStorage, + this.totalFileSystemStorage, + this.exascaleDbStorageVaultId, + this.memorySizeInGBs); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExadbVmClusterSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + if (model.wasPropertyExplicitlySet("backupSubnetId")) { + this.backupSubnetId(model.getBackupSubnetId()); + } + if (model.wasPropertyExplicitlySet("nsgIds")) { + this.nsgIds(model.getNsgIds()); + } + if (model.wasPropertyExplicitlySet("backupNetworkNsgIds")) { + this.backupNetworkNsgIds(model.getBackupNetworkNsgIds()); + } + if (model.wasPropertyExplicitlySet("lastUpdateHistoryEntryId")) { + this.lastUpdateHistoryEntryId(model.getLastUpdateHistoryEntryId()); + } + if (model.wasPropertyExplicitlySet("listenerPort")) { + this.listenerPort(model.getListenerPort()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("nodeCount")) { + this.nodeCount(model.getNodeCount()); + } + if (model.wasPropertyExplicitlySet("shape")) { + this.shape(model.getShape()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeZone")) { + this.timeZone(model.getTimeZone()); + } + if (model.wasPropertyExplicitlySet("hostname")) { + this.hostname(model.getHostname()); + } + if (model.wasPropertyExplicitlySet("domain")) { + this.domain(model.getDomain()); + } + if (model.wasPropertyExplicitlySet("clusterName")) { + this.clusterName(model.getClusterName()); + } + if (model.wasPropertyExplicitlySet("giVersion")) { + this.giVersion(model.getGiVersion()); + } + if (model.wasPropertyExplicitlySet("gridImageId")) { + this.gridImageId(model.getGridImageId()); + } + if (model.wasPropertyExplicitlySet("gridImageType")) { + this.gridImageType(model.getGridImageType()); + } + if (model.wasPropertyExplicitlySet("systemVersion")) { + this.systemVersion(model.getSystemVersion()); + } + if (model.wasPropertyExplicitlySet("sshPublicKeys")) { + this.sshPublicKeys(model.getSshPublicKeys()); + } + if (model.wasPropertyExplicitlySet("licenseModel")) { + this.licenseModel(model.getLicenseModel()); + } + if (model.wasPropertyExplicitlySet("scanIpIds")) { + this.scanIpIds(model.getScanIpIds()); + } + if (model.wasPropertyExplicitlySet("vipIds")) { + this.vipIds(model.getVipIds()); + } + if (model.wasPropertyExplicitlySet("scanDnsRecordId")) { + this.scanDnsRecordId(model.getScanDnsRecordId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("scanDnsName")) { + this.scanDnsName(model.getScanDnsName()); + } + if (model.wasPropertyExplicitlySet("zoneId")) { + this.zoneId(model.getZoneId()); + } + if (model.wasPropertyExplicitlySet("scanListenerPortTcp")) { + this.scanListenerPortTcp(model.getScanListenerPortTcp()); + } + if (model.wasPropertyExplicitlySet("scanListenerPortTcpSsl")) { + this.scanListenerPortTcpSsl(model.getScanListenerPortTcpSsl()); + } + if (model.wasPropertyExplicitlySet("privateZoneId")) { + this.privateZoneId(model.getPrivateZoneId()); + } + if (model.wasPropertyExplicitlySet("dataCollectionOptions")) { + this.dataCollectionOptions(model.getDataCollectionOptions()); + } + if (model.wasPropertyExplicitlySet("totalECpuCount")) { + this.totalECpuCount(model.getTotalECpuCount()); + } + if (model.wasPropertyExplicitlySet("enabledECpuCount")) { + this.enabledECpuCount(model.getEnabledECpuCount()); + } + if (model.wasPropertyExplicitlySet("vmFileSystemStorage")) { + this.vmFileSystemStorage(model.getVmFileSystemStorage()); + } + if (model.wasPropertyExplicitlySet("snapshotFileSystemStorage")) { + this.snapshotFileSystemStorage(model.getSnapshotFileSystemStorage()); + } + if (model.wasPropertyExplicitlySet("totalFileSystemStorage")) { + this.totalFileSystemStorage(model.getTotalFileSystemStorage()); + } + if (model.wasPropertyExplicitlySet("exascaleDbStorageVaultId")) { + this.exascaleDbStorageVaultId(model.getExascaleDbStorageVaultId()); + } + if (model.wasPropertyExplicitlySet("memorySizeInGBs")) { + this.memorySizeInGBs(model.getMemorySizeInGBs()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata VM cluster on Exascale Infrastructure. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The name of the availability domain in which the Exadata VM cluster on Exascale Infrastructure is located. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The name of the availability domain in which the Exadata VM cluster on Exascale Infrastructure is located. + * + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public String getSubnetId() { + return subnetId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupSubnetId") + private final String backupSubnetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public String getBackupSubnetId() { + return backupSubnetId; + } + + /** + * The list of [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). + * **NsgIds restrictions:** + * - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private final java.util.List nsgIds; + + /** + * The list of [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). + * **NsgIds restrictions:** + * - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. + * + * @return the value + **/ + public java.util.List getNsgIds() { + return nsgIds; + } + + /** + * A list of the [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupNetworkNsgIds") + private final java.util.List backupNetworkNsgIds; + + /** + * A list of the [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + * @return the value + **/ + public java.util.List getBackupNetworkNsgIds() { + return backupNetworkNsgIds; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the last maintenance update history entry. This value is updated when a maintenance update starts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastUpdateHistoryEntryId") + private final String lastUpdateHistoryEntryId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the last maintenance update history entry. This value is updated when a maintenance update starts. + * @return the value + **/ + public String getLastUpdateHistoryEntryId() { + return lastUpdateHistoryEntryId; + } + + /** + * The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listenerPort") + private final Long listenerPort; + + /** + * The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + * @return the value + **/ + public Long getListenerPort() { + return listenerPort; + } + + /** + * The current state of the Exadata VM cluster on Exascale Infrastructure. + **/ + public enum LifecycleState { + Provisioning("PROVISIONING"), + Available("AVAILABLE"), + Updating("UPDATING"), + Terminating("TERMINATING"), + Terminated("TERMINATED"), + Failed("FAILED"), + MaintenanceInProgress("MAINTENANCE_IN_PROGRESS"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Exadata VM cluster on Exascale Infrastructure. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") + private final Integer nodeCount; + + /** + * The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public Integer getNodeCount() { + return nodeCount; + } + + /** + * The shape of the Exadata VM cluster on Exascale Infrastructure resource + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private final String shape; + + /** + * The shape of the Exadata VM cluster on Exascale Infrastructure resource + * + * @return the value + **/ + public String getShape() { + return shape; + } + + /** + * The user-friendly name for the Exadata VM cluster on Exascale Infrastructure. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the Exadata VM cluster on Exascale Infrastructure. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The date and time that the Exadata VM cluster on Exascale Infrastructure was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time that the Exadata VM cluster on Exascale Infrastructure was created. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The time zone to use for the Exadata VM cluster on Exascale Infrastructure. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeZone") + private final String timeZone; + + /** + * The time zone to use for the Exadata VM cluster on Exascale Infrastructure. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + * @return the value + **/ + public String getTimeZone() { + return timeZone; + } + + /** + * The hostname for the Exadata VM cluster on Exascale Infrastructure. The hostname must begin with an alphabetic character, and + * can contain alphanumeric characters and hyphens (-). For Exadata systems, the maximum length of the hostname is 12 characters. + *

+ * The maximum length of the combined hostname and domain is 63 characters. + *

+ **Note:** The hostname must be unique within the subnet. If it is not unique, + * then the Exadata VM cluster on Exascale Infrastructure will fail to provision. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hostname") + private final String hostname; + + /** + * The hostname for the Exadata VM cluster on Exascale Infrastructure. The hostname must begin with an alphabetic character, and + * can contain alphanumeric characters and hyphens (-). For Exadata systems, the maximum length of the hostname is 12 characters. + *

+ * The maximum length of the combined hostname and domain is 63 characters. + *

+ **Note:** The hostname must be unique within the subnet. If it is not unique, + * then the Exadata VM cluster on Exascale Infrastructure will fail to provision. + * + * @return the value + **/ + public String getHostname() { + return hostname; + } + + /** + * A domain name used for the Exadata VM cluster on Exascale Infrastructure. If the Oracle-provided internet and VCN + * resolver is enabled for the specified subnet, then the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. + * Applies to Exadata Database Service on Exascale Infrastructure only. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domain") + private final String domain; + + /** + * A domain name used for the Exadata VM cluster on Exascale Infrastructure. If the Oracle-provided internet and VCN + * resolver is enabled for the specified subnet, then the domain name for the subnet is used + * (do not provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. + * Applies to Exadata Database Service on Exascale Infrastructure only. + * + * @return the value + **/ + public String getDomain() { + return domain; + } + + /** + * The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterName") + private final String clusterName; + + /** + * The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + * + * @return the value + **/ + public String getClusterName() { + return clusterName; + } + + /** + * A valid Oracle Grid Infrastructure (GI) software version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("giVersion") + private final String giVersion; + + /** + * A valid Oracle Grid Infrastructure (GI) software version. + * @return the value + **/ + public String getGiVersion() { + return giVersion; + } + + /** + * Grid Setup will be done using this grid image id. + *

+ * The grid image id can be extracted from + * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= + * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using + * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gridImageId") + private final String gridImageId; + + /** + * Grid Setup will be done using this grid image id. + *

+ * The grid image id can be extracted from + * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= + * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using + * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * + * @return the value + **/ + public String getGridImageId() { + return gridImageId; + } + + /** + * The type of Grid Image + **/ + public enum GridImageType { + ReleaseUpdate("RELEASE_UPDATE"), + CustomImage("CUSTOM_IMAGE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GridImageType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (GridImageType v : GridImageType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + GridImageType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static GridImageType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'GridImageType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The type of Grid Image + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gridImageType") + private final GridImageType gridImageType; + + /** + * The type of Grid Image + * @return the value + **/ + public GridImageType getGridImageType() { + return gridImageType; + } + + /** + * Operating system version of the image. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemVersion") + private final String systemVersion; + + /** + * Operating system version of the image. + * @return the value + **/ + public String getSystemVersion() { + return systemVersion; + } + + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sshPublicKeys") + private final java.util.List sshPublicKeys; + + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + * @return the value + **/ + public java.util.List getSshPublicKeys() { + return sshPublicKeys; + } + + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + public enum LicenseModel { + LicenseIncluded("LICENSE_INCLUDED"), + BringYourOwnLicense("BRING_YOUR_OWN_LICENSE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LicenseModel.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LicenseModel v : LicenseModel.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LicenseModel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LicenseModel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LicenseModel', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private final LicenseModel licenseModel; + + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + * @return the value + **/ + public LicenseModel getLicenseModel() { + return licenseModel; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. + * SCAN IP addresses are typically used for load balancing and are not assigned to any interface. + * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanIpIds") + private final java.util.List scanIpIds; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. + * SCAN IP addresses are typically used for load balancing and are not assigned to any interface. + * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. + *

+ **Note:** For a single-node DB system, this list is empty. + * + * @return the value + **/ + public java.util.List getScanIpIds() { + return scanIpIds; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. + * The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to + * enable failover. If one node fails, then the VIP is reassigned to another active node in the cluster. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vipIds") + private final java.util.List vipIds; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. + * The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to + * enable failover. If one node fails, then the VIP is reassigned to another active node in the cluster. + * + * @return the value + **/ + public java.util.List getVipIds() { + return vipIds; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanDnsRecordId") + private final String scanDnsRecordId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public String getScanDnsRecordId() { + return scanDnsRecordId; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + /** + * The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanDnsName") + private final String scanDnsName; + + /** + * The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public String getScanDnsName() { + return scanDnsName; + } + + /** + * The OCID of the zone with which the Exadata VM cluster on Exascale Infrastructure is associated. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("zoneId") + private final String zoneId; + + /** + * The OCID of the zone with which the Exadata VM cluster on Exascale Infrastructure is associated. + * + * @return the value + **/ + public String getZoneId() { + return zoneId; + } + + /** + * The TCP Single Client Access Name (SCAN) port. The default port is 1521. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanListenerPortTcp") + private final Integer scanListenerPortTcp; + + /** + * The TCP Single Client Access Name (SCAN) port. The default port is 1521. + * @return the value + **/ + public Integer getScanListenerPortTcp() { + return scanListenerPortTcp; + } + + /** + * The Secured Communication (TCPS) protocol Single Client Access Name (SCAN) port. The default port is 2484. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scanListenerPortTcpSsl") + private final Integer scanListenerPortTcpSsl; + + /** + * The Secured Communication (TCPS) protocol Single Client Access Name (SCAN) port. The default port is 2484. + * + * @return the value + **/ + public Integer getScanListenerPortTcpSsl() { + return scanListenerPortTcpSsl; + } + + /** + * The private zone ID in which you want DNS records to be created. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateZoneId") + private final String privateZoneId; + + /** + * The private zone ID in which you want DNS records to be created. + * + * @return the value + **/ + public String getPrivateZoneId() { + return privateZoneId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataCollectionOptions") + private final DataCollectionOptions dataCollectionOptions; + + public DataCollectionOptions getDataCollectionOptions() { + return dataCollectionOptions; + } + + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalECpuCount") + private final Integer totalECpuCount; + + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public Integer getTotalECpuCount() { + return totalECpuCount; + } + + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enabledECpuCount") + private final Integer enabledECpuCount; + + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public Integer getEnabledECpuCount() { + return enabledECpuCount; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmFileSystemStorage") + private final ExadbVmClusterStorageDetails vmFileSystemStorage; + + public ExadbVmClusterStorageDetails getVmFileSystemStorage() { + return vmFileSystemStorage; + } + + @com.fasterxml.jackson.annotation.JsonProperty("snapshotFileSystemStorage") + private final ExadbVmClusterStorageDetails snapshotFileSystemStorage; + + public ExadbVmClusterStorageDetails getSnapshotFileSystemStorage() { + return snapshotFileSystemStorage; + } + + @com.fasterxml.jackson.annotation.JsonProperty("totalFileSystemStorage") + private final ExadbVmClusterStorageDetails totalFileSystemStorage; + + public ExadbVmClusterStorageDetails getTotalFileSystemStorage() { + return totalFileSystemStorage; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exascaleDbStorageVaultId") + private final String exascaleDbStorageVaultId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + * @return the value + **/ + public String getExascaleDbStorageVaultId() { + return exascaleDbStorageVaultId; + } + + /** + * The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memorySizeInGBs") + private final Integer memorySizeInGBs; + + /** + * The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + * + * @return the value + **/ + public Integer getMemorySizeInGBs() { + return memorySizeInGBs; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExadbVmClusterSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", backupSubnetId=").append(String.valueOf(this.backupSubnetId)); + sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); + sb.append(", backupNetworkNsgIds=").append(String.valueOf(this.backupNetworkNsgIds)); + sb.append(", lastUpdateHistoryEntryId=") + .append(String.valueOf(this.lastUpdateHistoryEntryId)); + sb.append(", listenerPort=").append(String.valueOf(this.listenerPort)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", nodeCount=").append(String.valueOf(this.nodeCount)); + sb.append(", shape=").append(String.valueOf(this.shape)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeZone=").append(String.valueOf(this.timeZone)); + sb.append(", hostname=").append(String.valueOf(this.hostname)); + sb.append(", domain=").append(String.valueOf(this.domain)); + sb.append(", clusterName=").append(String.valueOf(this.clusterName)); + sb.append(", giVersion=").append(String.valueOf(this.giVersion)); + sb.append(", gridImageId=").append(String.valueOf(this.gridImageId)); + sb.append(", gridImageType=").append(String.valueOf(this.gridImageType)); + sb.append(", systemVersion=").append(String.valueOf(this.systemVersion)); + sb.append(", sshPublicKeys=").append(String.valueOf(this.sshPublicKeys)); + sb.append(", licenseModel=").append(String.valueOf(this.licenseModel)); + sb.append(", scanIpIds=").append(String.valueOf(this.scanIpIds)); + sb.append(", vipIds=").append(String.valueOf(this.vipIds)); + sb.append(", scanDnsRecordId=").append(String.valueOf(this.scanDnsRecordId)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", scanDnsName=").append(String.valueOf(this.scanDnsName)); + sb.append(", zoneId=").append(String.valueOf(this.zoneId)); + sb.append(", scanListenerPortTcp=").append(String.valueOf(this.scanListenerPortTcp)); + sb.append(", scanListenerPortTcpSsl=").append(String.valueOf(this.scanListenerPortTcpSsl)); + sb.append(", privateZoneId=").append(String.valueOf(this.privateZoneId)); + sb.append(", dataCollectionOptions=").append(String.valueOf(this.dataCollectionOptions)); + sb.append(", totalECpuCount=").append(String.valueOf(this.totalECpuCount)); + sb.append(", enabledECpuCount=").append(String.valueOf(this.enabledECpuCount)); + sb.append(", vmFileSystemStorage=").append(String.valueOf(this.vmFileSystemStorage)); + sb.append(", snapshotFileSystemStorage=") + .append(String.valueOf(this.snapshotFileSystemStorage)); + sb.append(", totalFileSystemStorage=").append(String.valueOf(this.totalFileSystemStorage)); + sb.append(", exascaleDbStorageVaultId=") + .append(String.valueOf(this.exascaleDbStorageVaultId)); + sb.append(", memorySizeInGBs=").append(String.valueOf(this.memorySizeInGBs)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExadbVmClusterSummary)) { + return false; + } + + ExadbVmClusterSummary other = (ExadbVmClusterSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals(this.backupSubnetId, other.backupSubnetId) + && java.util.Objects.equals(this.nsgIds, other.nsgIds) + && java.util.Objects.equals(this.backupNetworkNsgIds, other.backupNetworkNsgIds) + && java.util.Objects.equals( + this.lastUpdateHistoryEntryId, other.lastUpdateHistoryEntryId) + && java.util.Objects.equals(this.listenerPort, other.listenerPort) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.nodeCount, other.nodeCount) + && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeZone, other.timeZone) + && java.util.Objects.equals(this.hostname, other.hostname) + && java.util.Objects.equals(this.domain, other.domain) + && java.util.Objects.equals(this.clusterName, other.clusterName) + && java.util.Objects.equals(this.giVersion, other.giVersion) + && java.util.Objects.equals(this.gridImageId, other.gridImageId) + && java.util.Objects.equals(this.gridImageType, other.gridImageType) + && java.util.Objects.equals(this.systemVersion, other.systemVersion) + && java.util.Objects.equals(this.sshPublicKeys, other.sshPublicKeys) + && java.util.Objects.equals(this.licenseModel, other.licenseModel) + && java.util.Objects.equals(this.scanIpIds, other.scanIpIds) + && java.util.Objects.equals(this.vipIds, other.vipIds) + && java.util.Objects.equals(this.scanDnsRecordId, other.scanDnsRecordId) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.scanDnsName, other.scanDnsName) + && java.util.Objects.equals(this.zoneId, other.zoneId) + && java.util.Objects.equals(this.scanListenerPortTcp, other.scanListenerPortTcp) + && java.util.Objects.equals( + this.scanListenerPortTcpSsl, other.scanListenerPortTcpSsl) + && java.util.Objects.equals(this.privateZoneId, other.privateZoneId) + && java.util.Objects.equals(this.dataCollectionOptions, other.dataCollectionOptions) + && java.util.Objects.equals(this.totalECpuCount, other.totalECpuCount) + && java.util.Objects.equals(this.enabledECpuCount, other.enabledECpuCount) + && java.util.Objects.equals(this.vmFileSystemStorage, other.vmFileSystemStorage) + && java.util.Objects.equals( + this.snapshotFileSystemStorage, other.snapshotFileSystemStorage) + && java.util.Objects.equals( + this.totalFileSystemStorage, other.totalFileSystemStorage) + && java.util.Objects.equals( + this.exascaleDbStorageVaultId, other.exascaleDbStorageVaultId) + && java.util.Objects.equals(this.memorySizeInGBs, other.memorySizeInGBs) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); + result = + (result * PRIME) + + (this.backupSubnetId == null ? 43 : this.backupSubnetId.hashCode()); + result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); + result = + (result * PRIME) + + (this.backupNetworkNsgIds == null + ? 43 + : this.backupNetworkNsgIds.hashCode()); + result = + (result * PRIME) + + (this.lastUpdateHistoryEntryId == null + ? 43 + : this.lastUpdateHistoryEntryId.hashCode()); + result = (result * PRIME) + (this.listenerPort == null ? 43 : this.listenerPort.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.nodeCount == null ? 43 : this.nodeCount.hashCode()); + result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeZone == null ? 43 : this.timeZone.hashCode()); + result = (result * PRIME) + (this.hostname == null ? 43 : this.hostname.hashCode()); + result = (result * PRIME) + (this.domain == null ? 43 : this.domain.hashCode()); + result = (result * PRIME) + (this.clusterName == null ? 43 : this.clusterName.hashCode()); + result = (result * PRIME) + (this.giVersion == null ? 43 : this.giVersion.hashCode()); + result = (result * PRIME) + (this.gridImageId == null ? 43 : this.gridImageId.hashCode()); + result = + (result * PRIME) + + (this.gridImageType == null ? 43 : this.gridImageType.hashCode()); + result = + (result * PRIME) + + (this.systemVersion == null ? 43 : this.systemVersion.hashCode()); + result = + (result * PRIME) + + (this.sshPublicKeys == null ? 43 : this.sshPublicKeys.hashCode()); + result = (result * PRIME) + (this.licenseModel == null ? 43 : this.licenseModel.hashCode()); + result = (result * PRIME) + (this.scanIpIds == null ? 43 : this.scanIpIds.hashCode()); + result = (result * PRIME) + (this.vipIds == null ? 43 : this.vipIds.hashCode()); + result = + (result * PRIME) + + (this.scanDnsRecordId == null ? 43 : this.scanDnsRecordId.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + (this.scanDnsName == null ? 43 : this.scanDnsName.hashCode()); + result = (result * PRIME) + (this.zoneId == null ? 43 : this.zoneId.hashCode()); + result = + (result * PRIME) + + (this.scanListenerPortTcp == null + ? 43 + : this.scanListenerPortTcp.hashCode()); + result = + (result * PRIME) + + (this.scanListenerPortTcpSsl == null + ? 43 + : this.scanListenerPortTcpSsl.hashCode()); + result = + (result * PRIME) + + (this.privateZoneId == null ? 43 : this.privateZoneId.hashCode()); + result = + (result * PRIME) + + (this.dataCollectionOptions == null + ? 43 + : this.dataCollectionOptions.hashCode()); + result = + (result * PRIME) + + (this.totalECpuCount == null ? 43 : this.totalECpuCount.hashCode()); + result = + (result * PRIME) + + (this.enabledECpuCount == null ? 43 : this.enabledECpuCount.hashCode()); + result = + (result * PRIME) + + (this.vmFileSystemStorage == null + ? 43 + : this.vmFileSystemStorage.hashCode()); + result = + (result * PRIME) + + (this.snapshotFileSystemStorage == null + ? 43 + : this.snapshotFileSystemStorage.hashCode()); + result = + (result * PRIME) + + (this.totalFileSystemStorage == null + ? 43 + : this.totalFileSystemStorage.hashCode()); + result = + (result * PRIME) + + (this.exascaleDbStorageVaultId == null + ? 43 + : this.exascaleDbStorageVaultId.hashCode()); + result = + (result * PRIME) + + (this.memorySizeInGBs == null ? 43 : this.memorySizeInGBs.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterUpdate.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterUpdate.java new file mode 100644 index 00000000000..55d49d0ef07 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterUpdate.java @@ -0,0 +1,669 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * A maintenance update details for an Exadata VM cluster on Exascale Infrastructure. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExadbVmClusterUpdate.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExadbVmClusterUpdate extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "description", + "lastAction", + "availableActions", + "updateType", + "lifecycleDetails", + "lifecycleState", + "timeReleased", + "version" + }) + public ExadbVmClusterUpdate( + String id, + String description, + LastAction lastAction, + java.util.List availableActions, + UpdateType updateType, + String lifecycleDetails, + LifecycleState lifecycleState, + java.util.Date timeReleased, + String version) { + super(); + this.id = id; + this.description = description; + this.lastAction = lastAction; + this.availableActions = availableActions; + this.updateType = updateType; + this.lifecycleDetails = lifecycleDetails; + this.lifecycleState = lifecycleState; + this.timeReleased = timeReleased; + this.version = version; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Details of the maintenance update package. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Details of the maintenance update package. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The previous update action performed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastAction") + private LastAction lastAction; + + /** + * The previous update action performed. + * @param lastAction the value to set + * @return this builder + **/ + public Builder lastAction(LastAction lastAction) { + this.lastAction = lastAction; + this.__explicitlySet__.add("lastAction"); + return this; + } + /** + * The possible actions performed by the update operation on the infrastructure components. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availableActions") + private java.util.List availableActions; + + /** + * The possible actions performed by the update operation on the infrastructure components. + * @param availableActions the value to set + * @return this builder + **/ + public Builder availableActions(java.util.List availableActions) { + this.availableActions = availableActions; + this.__explicitlySet__.add("availableActions"); + return this; + } + /** + * The type of cloud VM cluster maintenance update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateType") + private UpdateType updateType; + + /** + * The type of cloud VM cluster maintenance update. + * @param updateType the value to set + * @return this builder + **/ + public Builder updateType(UpdateType updateType) { + this.updateType = updateType; + this.__explicitlySet__.add("updateType"); + return this; + } + /** + * Descriptive text providing additional details about the lifecycle state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Descriptive text providing additional details about the lifecycle state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The current state of the maintenance update. Dependent on value of {@code lastAction}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the maintenance update. Dependent on value of {@code lastAction}. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The date and time the maintenance update was released. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeReleased") + private java.util.Date timeReleased; + + /** + * The date and time the maintenance update was released. + * @param timeReleased the value to set + * @return this builder + **/ + public Builder timeReleased(java.util.Date timeReleased) { + this.timeReleased = timeReleased; + this.__explicitlySet__.add("timeReleased"); + return this; + } + /** + * The version of the maintenance update package. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * The version of the maintenance update package. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExadbVmClusterUpdate build() { + ExadbVmClusterUpdate model = + new ExadbVmClusterUpdate( + this.id, + this.description, + this.lastAction, + this.availableActions, + this.updateType, + this.lifecycleDetails, + this.lifecycleState, + this.timeReleased, + this.version); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExadbVmClusterUpdate model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("lastAction")) { + this.lastAction(model.getLastAction()); + } + if (model.wasPropertyExplicitlySet("availableActions")) { + this.availableActions(model.getAvailableActions()); + } + if (model.wasPropertyExplicitlySet("updateType")) { + this.updateType(model.getUpdateType()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeReleased")) { + this.timeReleased(model.getTimeReleased()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Details of the maintenance update package. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Details of the maintenance update package. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The previous update action performed. + **/ + public enum LastAction { + RollingApply("ROLLING_APPLY"), + NonRollingApply("NON_ROLLING_APPLY"), + Precheck("PRECHECK"), + Rollback("ROLLBACK"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LastAction.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LastAction v : LastAction.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LastAction(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LastAction create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LastAction', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The previous update action performed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastAction") + private final LastAction lastAction; + + /** + * The previous update action performed. + * @return the value + **/ + public LastAction getLastAction() { + return lastAction; + } + + /** + **/ + public enum AvailableActions { + RollingApply("ROLLING_APPLY"), + NonRollingApply("NON_ROLLING_APPLY"), + Precheck("PRECHECK"), + Rollback("ROLLBACK"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(AvailableActions.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (AvailableActions v : AvailableActions.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + AvailableActions(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AvailableActions create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'AvailableActions', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The possible actions performed by the update operation on the infrastructure components. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availableActions") + private final java.util.List availableActions; + + /** + * The possible actions performed by the update operation on the infrastructure components. + * @return the value + **/ + public java.util.List getAvailableActions() { + return availableActions; + } + + /** + * The type of cloud VM cluster maintenance update. + **/ + public enum UpdateType { + GiUpgrade("GI_UPGRADE"), + GiPatch("GI_PATCH"), + OsUpdate("OS_UPDATE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (UpdateType v : UpdateType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + UpdateType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static UpdateType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'UpdateType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The type of cloud VM cluster maintenance update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateType") + private final UpdateType updateType; + + /** + * The type of cloud VM cluster maintenance update. + * @return the value + **/ + public UpdateType getUpdateType() { + return updateType; + } + + /** + * Descriptive text providing additional details about the lifecycle state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Descriptive text providing additional details about the lifecycle state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The current state of the maintenance update. Dependent on value of {@code lastAction}. + **/ + public enum LifecycleState { + Available("AVAILABLE"), + Success("SUCCESS"), + InProgress("IN_PROGRESS"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the maintenance update. Dependent on value of {@code lastAction}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the maintenance update. Dependent on value of {@code lastAction}. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The date and time the maintenance update was released. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeReleased") + private final java.util.Date timeReleased; + + /** + * The date and time the maintenance update was released. + * @return the value + **/ + public java.util.Date getTimeReleased() { + return timeReleased; + } + + /** + * The version of the maintenance update package. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * The version of the maintenance update package. + * @return the value + **/ + public String getVersion() { + return version; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExadbVmClusterUpdate("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", lastAction=").append(String.valueOf(this.lastAction)); + sb.append(", availableActions=").append(String.valueOf(this.availableActions)); + sb.append(", updateType=").append(String.valueOf(this.updateType)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeReleased=").append(String.valueOf(this.timeReleased)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExadbVmClusterUpdate)) { + return false; + } + + ExadbVmClusterUpdate other = (ExadbVmClusterUpdate) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.lastAction, other.lastAction) + && java.util.Objects.equals(this.availableActions, other.availableActions) + && java.util.Objects.equals(this.updateType, other.updateType) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeReleased, other.timeReleased) + && java.util.Objects.equals(this.version, other.version) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.lastAction == null ? 43 : this.lastAction.hashCode()); + result = + (result * PRIME) + + (this.availableActions == null ? 43 : this.availableActions.hashCode()); + result = (result * PRIME) + (this.updateType == null ? 43 : this.updateType.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.timeReleased == null ? 43 : this.timeReleased.hashCode()); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterUpdateHistoryEntry.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterUpdateHistoryEntry.java new file mode 100644 index 00000000000..913a0855f1d --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterUpdateHistoryEntry.java @@ -0,0 +1,620 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * The record of an maintenance update action on a specified Exadata VM cluster on Exascale Infrastructure. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExadbVmClusterUpdateHistoryEntry.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExadbVmClusterUpdateHistoryEntry + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "updateId", + "updateAction", + "updateType", + "lifecycleState", + "lifecycleDetails", + "timeStarted", + "timeCompleted", + "version" + }) + public ExadbVmClusterUpdateHistoryEntry( + String id, + String updateId, + UpdateAction updateAction, + UpdateType updateType, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Date timeStarted, + java.util.Date timeCompleted, + String version) { + super(); + this.id = id; + this.updateId = updateId; + this.updateAction = updateAction; + this.updateType = updateType; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.timeStarted = timeStarted; + this.timeCompleted = timeCompleted; + this.version = version; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update history entry. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update history entry. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateId") + private String updateId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update. + * @param updateId the value to set + * @return this builder + **/ + public Builder updateId(String updateId) { + this.updateId = updateId; + this.__explicitlySet__.add("updateId"); + return this; + } + /** + * The update action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateAction") + private UpdateAction updateAction; + + /** + * The update action. + * @param updateAction the value to set + * @return this builder + **/ + public Builder updateAction(UpdateAction updateAction) { + this.updateAction = updateAction; + this.__explicitlySet__.add("updateAction"); + return this; + } + /** + * The type of cloud VM cluster maintenance update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateType") + private UpdateType updateType; + + /** + * The type of cloud VM cluster maintenance update. + * @param updateType the value to set + * @return this builder + **/ + public Builder updateType(UpdateType updateType) { + this.updateType = updateType; + this.__explicitlySet__.add("updateType"); + return this; + } + /** + * The current lifecycle state of the maintenance update operation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current lifecycle state of the maintenance update operation. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Descriptive text providing additional details about the lifecycle state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Descriptive text providing additional details about the lifecycle state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The date and time when the maintenance update action started. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The date and time when the maintenance update action started. + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The date and time when the maintenance update action completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCompleted") + private java.util.Date timeCompleted; + + /** + * The date and time when the maintenance update action completed. + * @param timeCompleted the value to set + * @return this builder + **/ + public Builder timeCompleted(java.util.Date timeCompleted) { + this.timeCompleted = timeCompleted; + this.__explicitlySet__.add("timeCompleted"); + return this; + } + /** + * The version of the maintenance update package. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * The version of the maintenance update package. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExadbVmClusterUpdateHistoryEntry build() { + ExadbVmClusterUpdateHistoryEntry model = + new ExadbVmClusterUpdateHistoryEntry( + this.id, + this.updateId, + this.updateAction, + this.updateType, + this.lifecycleState, + this.lifecycleDetails, + this.timeStarted, + this.timeCompleted, + this.version); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExadbVmClusterUpdateHistoryEntry model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("updateId")) { + this.updateId(model.getUpdateId()); + } + if (model.wasPropertyExplicitlySet("updateAction")) { + this.updateAction(model.getUpdateAction()); + } + if (model.wasPropertyExplicitlySet("updateType")) { + this.updateType(model.getUpdateType()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeCompleted")) { + this.timeCompleted(model.getTimeCompleted()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update history entry. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update history entry. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateId") + private final String updateId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update. + * @return the value + **/ + public String getUpdateId() { + return updateId; + } + + /** + * The update action. + **/ + public enum UpdateAction { + RollingApply("ROLLING_APPLY"), + NonRollingApply("NON_ROLLING_APPLY"), + Precheck("PRECHECK"), + Rollback("ROLLBACK"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateAction.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (UpdateAction v : UpdateAction.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + UpdateAction(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static UpdateAction create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'UpdateAction', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The update action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateAction") + private final UpdateAction updateAction; + + /** + * The update action. + * @return the value + **/ + public UpdateAction getUpdateAction() { + return updateAction; + } + + /** + * The type of cloud VM cluster maintenance update. + **/ + public enum UpdateType { + GiUpgrade("GI_UPGRADE"), + GiPatch("GI_PATCH"), + OsUpdate("OS_UPDATE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (UpdateType v : UpdateType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + UpdateType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static UpdateType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'UpdateType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The type of cloud VM cluster maintenance update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateType") + private final UpdateType updateType; + + /** + * The type of cloud VM cluster maintenance update. + * @return the value + **/ + public UpdateType getUpdateType() { + return updateType; + } + + /** + * The current lifecycle state of the maintenance update operation. + **/ + public enum LifecycleState { + InProgress("IN_PROGRESS"), + Succeeded("SUCCEEDED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current lifecycle state of the maintenance update operation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current lifecycle state of the maintenance update operation. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Descriptive text providing additional details about the lifecycle state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Descriptive text providing additional details about the lifecycle state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The date and time when the maintenance update action started. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The date and time when the maintenance update action started. + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The date and time when the maintenance update action completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCompleted") + private final java.util.Date timeCompleted; + + /** + * The date and time when the maintenance update action completed. + * @return the value + **/ + public java.util.Date getTimeCompleted() { + return timeCompleted; + } + + /** + * The version of the maintenance update package. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * The version of the maintenance update package. + * @return the value + **/ + public String getVersion() { + return version; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExadbVmClusterUpdateHistoryEntry("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", updateId=").append(String.valueOf(this.updateId)); + sb.append(", updateAction=").append(String.valueOf(this.updateAction)); + sb.append(", updateType=").append(String.valueOf(this.updateType)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeCompleted=").append(String.valueOf(this.timeCompleted)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExadbVmClusterUpdateHistoryEntry)) { + return false; + } + + ExadbVmClusterUpdateHistoryEntry other = (ExadbVmClusterUpdateHistoryEntry) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.updateId, other.updateId) + && java.util.Objects.equals(this.updateAction, other.updateAction) + && java.util.Objects.equals(this.updateType, other.updateType) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeCompleted, other.timeCompleted) + && java.util.Objects.equals(this.version, other.version) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.updateId == null ? 43 : this.updateId.hashCode()); + result = (result * PRIME) + (this.updateAction == null ? 43 : this.updateAction.hashCode()); + result = (result * PRIME) + (this.updateType == null ? 43 : this.updateType.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = + (result * PRIME) + + (this.timeCompleted == null ? 43 : this.timeCompleted.hashCode()); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterUpdateHistoryEntrySummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterUpdateHistoryEntrySummary.java new file mode 100644 index 00000000000..d84da8ede46 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterUpdateHistoryEntrySummary.java @@ -0,0 +1,620 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * The record of an maintenance update action on a specified Exadata VM cluster on Exascale Infrastructure. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExadbVmClusterUpdateHistoryEntrySummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExadbVmClusterUpdateHistoryEntrySummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "updateId", + "updateAction", + "updateType", + "lifecycleState", + "lifecycleDetails", + "timeStarted", + "timeCompleted", + "version" + }) + public ExadbVmClusterUpdateHistoryEntrySummary( + String id, + String updateId, + UpdateAction updateAction, + UpdateType updateType, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Date timeStarted, + java.util.Date timeCompleted, + String version) { + super(); + this.id = id; + this.updateId = updateId; + this.updateAction = updateAction; + this.updateType = updateType; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.timeStarted = timeStarted; + this.timeCompleted = timeCompleted; + this.version = version; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update history entry. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update history entry. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateId") + private String updateId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update. + * @param updateId the value to set + * @return this builder + **/ + public Builder updateId(String updateId) { + this.updateId = updateId; + this.__explicitlySet__.add("updateId"); + return this; + } + /** + * The update action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateAction") + private UpdateAction updateAction; + + /** + * The update action. + * @param updateAction the value to set + * @return this builder + **/ + public Builder updateAction(UpdateAction updateAction) { + this.updateAction = updateAction; + this.__explicitlySet__.add("updateAction"); + return this; + } + /** + * The type of cloud VM cluster maintenance update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateType") + private UpdateType updateType; + + /** + * The type of cloud VM cluster maintenance update. + * @param updateType the value to set + * @return this builder + **/ + public Builder updateType(UpdateType updateType) { + this.updateType = updateType; + this.__explicitlySet__.add("updateType"); + return this; + } + /** + * The current lifecycle state of the maintenance update operation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current lifecycle state of the maintenance update operation. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Descriptive text providing additional details about the lifecycle state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Descriptive text providing additional details about the lifecycle state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The date and time when the maintenance update action started. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The date and time when the maintenance update action started. + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The date and time when the maintenance update action completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCompleted") + private java.util.Date timeCompleted; + + /** + * The date and time when the maintenance update action completed. + * @param timeCompleted the value to set + * @return this builder + **/ + public Builder timeCompleted(java.util.Date timeCompleted) { + this.timeCompleted = timeCompleted; + this.__explicitlySet__.add("timeCompleted"); + return this; + } + /** + * The version of the maintenance update package. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * The version of the maintenance update package. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExadbVmClusterUpdateHistoryEntrySummary build() { + ExadbVmClusterUpdateHistoryEntrySummary model = + new ExadbVmClusterUpdateHistoryEntrySummary( + this.id, + this.updateId, + this.updateAction, + this.updateType, + this.lifecycleState, + this.lifecycleDetails, + this.timeStarted, + this.timeCompleted, + this.version); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExadbVmClusterUpdateHistoryEntrySummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("updateId")) { + this.updateId(model.getUpdateId()); + } + if (model.wasPropertyExplicitlySet("updateAction")) { + this.updateAction(model.getUpdateAction()); + } + if (model.wasPropertyExplicitlySet("updateType")) { + this.updateType(model.getUpdateType()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeCompleted")) { + this.timeCompleted(model.getTimeCompleted()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update history entry. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update history entry. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateId") + private final String updateId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update. + * @return the value + **/ + public String getUpdateId() { + return updateId; + } + + /** + * The update action. + **/ + public enum UpdateAction { + RollingApply("ROLLING_APPLY"), + NonRollingApply("NON_ROLLING_APPLY"), + Precheck("PRECHECK"), + Rollback("ROLLBACK"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateAction.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (UpdateAction v : UpdateAction.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + UpdateAction(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static UpdateAction create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'UpdateAction', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The update action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateAction") + private final UpdateAction updateAction; + + /** + * The update action. + * @return the value + **/ + public UpdateAction getUpdateAction() { + return updateAction; + } + + /** + * The type of cloud VM cluster maintenance update. + **/ + public enum UpdateType { + GiUpgrade("GI_UPGRADE"), + GiPatch("GI_PATCH"), + OsUpdate("OS_UPDATE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (UpdateType v : UpdateType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + UpdateType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static UpdateType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'UpdateType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The type of cloud VM cluster maintenance update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateType") + private final UpdateType updateType; + + /** + * The type of cloud VM cluster maintenance update. + * @return the value + **/ + public UpdateType getUpdateType() { + return updateType; + } + + /** + * The current lifecycle state of the maintenance update operation. + **/ + public enum LifecycleState { + InProgress("IN_PROGRESS"), + Succeeded("SUCCEEDED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current lifecycle state of the maintenance update operation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current lifecycle state of the maintenance update operation. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Descriptive text providing additional details about the lifecycle state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Descriptive text providing additional details about the lifecycle state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The date and time when the maintenance update action started. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The date and time when the maintenance update action started. + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The date and time when the maintenance update action completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCompleted") + private final java.util.Date timeCompleted; + + /** + * The date and time when the maintenance update action completed. + * @return the value + **/ + public java.util.Date getTimeCompleted() { + return timeCompleted; + } + + /** + * The version of the maintenance update package. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * The version of the maintenance update package. + * @return the value + **/ + public String getVersion() { + return version; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExadbVmClusterUpdateHistoryEntrySummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", updateId=").append(String.valueOf(this.updateId)); + sb.append(", updateAction=").append(String.valueOf(this.updateAction)); + sb.append(", updateType=").append(String.valueOf(this.updateType)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeCompleted=").append(String.valueOf(this.timeCompleted)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExadbVmClusterUpdateHistoryEntrySummary)) { + return false; + } + + ExadbVmClusterUpdateHistoryEntrySummary other = (ExadbVmClusterUpdateHistoryEntrySummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.updateId, other.updateId) + && java.util.Objects.equals(this.updateAction, other.updateAction) + && java.util.Objects.equals(this.updateType, other.updateType) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeCompleted, other.timeCompleted) + && java.util.Objects.equals(this.version, other.version) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.updateId == null ? 43 : this.updateId.hashCode()); + result = (result * PRIME) + (this.updateAction == null ? 43 : this.updateAction.hashCode()); + result = (result * PRIME) + (this.updateType == null ? 43 : this.updateType.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = + (result * PRIME) + + (this.timeCompleted == null ? 43 : this.timeCompleted.hashCode()); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterUpdateSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterUpdateSummary.java new file mode 100644 index 00000000000..ba525f59ccc --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterUpdateSummary.java @@ -0,0 +1,674 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * A maintenance update details for an Exadata VM cluster on Exascale Infrastructure. + *

+ * To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, + * talk to an administrator. If you're an administrator who needs to write policies to give users access, + * see [Getting Started with Policies](https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm). + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExadbVmClusterUpdateSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExadbVmClusterUpdateSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "description", + "lastAction", + "availableActions", + "updateType", + "lifecycleDetails", + "lifecycleState", + "timeReleased", + "version" + }) + public ExadbVmClusterUpdateSummary( + String id, + String description, + LastAction lastAction, + java.util.List availableActions, + UpdateType updateType, + String lifecycleDetails, + LifecycleState lifecycleState, + java.util.Date timeReleased, + String version) { + super(); + this.id = id; + this.description = description; + this.lastAction = lastAction; + this.availableActions = availableActions; + this.updateType = updateType; + this.lifecycleDetails = lifecycleDetails; + this.lifecycleState = lifecycleState; + this.timeReleased = timeReleased; + this.version = version; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Details of the maintenance update package. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Details of the maintenance update package. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The previous update action performed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastAction") + private LastAction lastAction; + + /** + * The previous update action performed. + * @param lastAction the value to set + * @return this builder + **/ + public Builder lastAction(LastAction lastAction) { + this.lastAction = lastAction; + this.__explicitlySet__.add("lastAction"); + return this; + } + /** + * The possible actions performed by the update operation on the infrastructure components. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availableActions") + private java.util.List availableActions; + + /** + * The possible actions performed by the update operation on the infrastructure components. + * @param availableActions the value to set + * @return this builder + **/ + public Builder availableActions(java.util.List availableActions) { + this.availableActions = availableActions; + this.__explicitlySet__.add("availableActions"); + return this; + } + /** + * The type of cloud VM cluster maintenance update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateType") + private UpdateType updateType; + + /** + * The type of cloud VM cluster maintenance update. + * @param updateType the value to set + * @return this builder + **/ + public Builder updateType(UpdateType updateType) { + this.updateType = updateType; + this.__explicitlySet__.add("updateType"); + return this; + } + /** + * Descriptive text providing additional details about the lifecycle state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Descriptive text providing additional details about the lifecycle state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The current state of the maintenance update. Dependent on value of {@code lastAction}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the maintenance update. Dependent on value of {@code lastAction}. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The date and time the maintenance update was released. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeReleased") + private java.util.Date timeReleased; + + /** + * The date and time the maintenance update was released. + * @param timeReleased the value to set + * @return this builder + **/ + public Builder timeReleased(java.util.Date timeReleased) { + this.timeReleased = timeReleased; + this.__explicitlySet__.add("timeReleased"); + return this; + } + /** + * The version of the maintenance update package. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * The version of the maintenance update package. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExadbVmClusterUpdateSummary build() { + ExadbVmClusterUpdateSummary model = + new ExadbVmClusterUpdateSummary( + this.id, + this.description, + this.lastAction, + this.availableActions, + this.updateType, + this.lifecycleDetails, + this.lifecycleState, + this.timeReleased, + this.version); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExadbVmClusterUpdateSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("lastAction")) { + this.lastAction(model.getLastAction()); + } + if (model.wasPropertyExplicitlySet("availableActions")) { + this.availableActions(model.getAvailableActions()); + } + if (model.wasPropertyExplicitlySet("updateType")) { + this.updateType(model.getUpdateType()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeReleased")) { + this.timeReleased(model.getTimeReleased()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Details of the maintenance update package. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Details of the maintenance update package. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The previous update action performed. + **/ + public enum LastAction { + RollingApply("ROLLING_APPLY"), + NonRollingApply("NON_ROLLING_APPLY"), + Precheck("PRECHECK"), + Rollback("ROLLBACK"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LastAction.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LastAction v : LastAction.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LastAction(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LastAction create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LastAction', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The previous update action performed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastAction") + private final LastAction lastAction; + + /** + * The previous update action performed. + * @return the value + **/ + public LastAction getLastAction() { + return lastAction; + } + + /** + **/ + public enum AvailableActions { + RollingApply("ROLLING_APPLY"), + NonRollingApply("NON_ROLLING_APPLY"), + Precheck("PRECHECK"), + Rollback("ROLLBACK"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(AvailableActions.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (AvailableActions v : AvailableActions.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + AvailableActions(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AvailableActions create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'AvailableActions', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The possible actions performed by the update operation on the infrastructure components. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availableActions") + private final java.util.List availableActions; + + /** + * The possible actions performed by the update operation on the infrastructure components. + * @return the value + **/ + public java.util.List getAvailableActions() { + return availableActions; + } + + /** + * The type of cloud VM cluster maintenance update. + **/ + public enum UpdateType { + GiUpgrade("GI_UPGRADE"), + GiPatch("GI_PATCH"), + OsUpdate("OS_UPDATE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (UpdateType v : UpdateType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + UpdateType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static UpdateType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'UpdateType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The type of cloud VM cluster maintenance update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateType") + private final UpdateType updateType; + + /** + * The type of cloud VM cluster maintenance update. + * @return the value + **/ + public UpdateType getUpdateType() { + return updateType; + } + + /** + * Descriptive text providing additional details about the lifecycle state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Descriptive text providing additional details about the lifecycle state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The current state of the maintenance update. Dependent on value of {@code lastAction}. + **/ + public enum LifecycleState { + Available("AVAILABLE"), + Success("SUCCESS"), + InProgress("IN_PROGRESS"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the maintenance update. Dependent on value of {@code lastAction}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the maintenance update. Dependent on value of {@code lastAction}. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The date and time the maintenance update was released. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeReleased") + private final java.util.Date timeReleased; + + /** + * The date and time the maintenance update was released. + * @return the value + **/ + public java.util.Date getTimeReleased() { + return timeReleased; + } + + /** + * The version of the maintenance update package. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * The version of the maintenance update package. + * @return the value + **/ + public String getVersion() { + return version; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExadbVmClusterUpdateSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", lastAction=").append(String.valueOf(this.lastAction)); + sb.append(", availableActions=").append(String.valueOf(this.availableActions)); + sb.append(", updateType=").append(String.valueOf(this.updateType)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeReleased=").append(String.valueOf(this.timeReleased)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExadbVmClusterUpdateSummary)) { + return false; + } + + ExadbVmClusterUpdateSummary other = (ExadbVmClusterUpdateSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.lastAction, other.lastAction) + && java.util.Objects.equals(this.availableActions, other.availableActions) + && java.util.Objects.equals(this.updateType, other.updateType) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeReleased, other.timeReleased) + && java.util.Objects.equals(this.version, other.version) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.lastAction == null ? 43 : this.lastAction.hashCode()); + result = + (result * PRIME) + + (this.availableActions == null ? 43 : this.availableActions.hashCode()); + result = (result * PRIME) + (this.updateType == null ? 43 : this.updateType.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.timeReleased == null ? 43 : this.timeReleased.hashCode()); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleConfigDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleConfigDetails.java new file mode 100644 index 00000000000..c8df7e78aea --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleConfigDetails.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * The exascale config response details for the Exadata Cloud@Customer infrastructure or cloud Exadata infrastructure . Applies to both Exadata Cloud@Customer instances and Exadata Cloud Service instances. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExascaleConfigDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExascaleConfigDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"totalStorageInGBs", "availableStorageInGBs"}) + public ExascaleConfigDetails(Integer totalStorageInGBs, Integer availableStorageInGBs) { + super(); + this.totalStorageInGBs = totalStorageInGBs; + this.availableStorageInGBs = availableStorageInGBs; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Storage size needed for Exascale in GBs. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalStorageInGBs") + private Integer totalStorageInGBs; + + /** + * Storage size needed for Exascale in GBs. + * @param totalStorageInGBs the value to set + * @return this builder + **/ + public Builder totalStorageInGBs(Integer totalStorageInGBs) { + this.totalStorageInGBs = totalStorageInGBs; + this.__explicitlySet__.add("totalStorageInGBs"); + return this; + } + /** + * Available storage size for Exascale in GBs. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availableStorageInGBs") + private Integer availableStorageInGBs; + + /** + * Available storage size for Exascale in GBs. + * @param availableStorageInGBs the value to set + * @return this builder + **/ + public Builder availableStorageInGBs(Integer availableStorageInGBs) { + this.availableStorageInGBs = availableStorageInGBs; + this.__explicitlySet__.add("availableStorageInGBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExascaleConfigDetails build() { + ExascaleConfigDetails model = + new ExascaleConfigDetails(this.totalStorageInGBs, this.availableStorageInGBs); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExascaleConfigDetails model) { + if (model.wasPropertyExplicitlySet("totalStorageInGBs")) { + this.totalStorageInGBs(model.getTotalStorageInGBs()); + } + if (model.wasPropertyExplicitlySet("availableStorageInGBs")) { + this.availableStorageInGBs(model.getAvailableStorageInGBs()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Storage size needed for Exascale in GBs. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalStorageInGBs") + private final Integer totalStorageInGBs; + + /** + * Storage size needed for Exascale in GBs. + * @return the value + **/ + public Integer getTotalStorageInGBs() { + return totalStorageInGBs; + } + + /** + * Available storage size for Exascale in GBs. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availableStorageInGBs") + private final Integer availableStorageInGBs; + + /** + * Available storage size for Exascale in GBs. + * @return the value + **/ + public Integer getAvailableStorageInGBs() { + return availableStorageInGBs; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExascaleConfigDetails("); + sb.append("super=").append(super.toString()); + sb.append("totalStorageInGBs=").append(String.valueOf(this.totalStorageInGBs)); + sb.append(", availableStorageInGBs=").append(String.valueOf(this.availableStorageInGBs)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExascaleConfigDetails)) { + return false; + } + + ExascaleConfigDetails other = (ExascaleConfigDetails) o; + return java.util.Objects.equals(this.totalStorageInGBs, other.totalStorageInGBs) + && java.util.Objects.equals(this.availableStorageInGBs, other.availableStorageInGBs) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.totalStorageInGBs == null ? 43 : this.totalStorageInGBs.hashCode()); + result = + (result * PRIME) + + (this.availableStorageInGBs == null + ? 43 + : this.availableStorageInGBs.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleDbStorageDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleDbStorageDetails.java new file mode 100644 index 00000000000..d97fad9bfd5 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleDbStorageDetails.java @@ -0,0 +1,189 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Exadata Database Storage Details + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExascaleDbStorageDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExascaleDbStorageDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"totalSizeInGbs", "availableSizeInGbs"}) + public ExascaleDbStorageDetails(Integer totalSizeInGbs, Integer availableSizeInGbs) { + super(); + this.totalSizeInGbs = totalSizeInGbs; + this.availableSizeInGbs = availableSizeInGbs; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Total Capacity + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalSizeInGbs") + private Integer totalSizeInGbs; + + /** + * Total Capacity + * + * @param totalSizeInGbs the value to set + * @return this builder + **/ + public Builder totalSizeInGbs(Integer totalSizeInGbs) { + this.totalSizeInGbs = totalSizeInGbs; + this.__explicitlySet__.add("totalSizeInGbs"); + return this; + } + /** + * Available Capacity + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availableSizeInGbs") + private Integer availableSizeInGbs; + + /** + * Available Capacity + * + * @param availableSizeInGbs the value to set + * @return this builder + **/ + public Builder availableSizeInGbs(Integer availableSizeInGbs) { + this.availableSizeInGbs = availableSizeInGbs; + this.__explicitlySet__.add("availableSizeInGbs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExascaleDbStorageDetails build() { + ExascaleDbStorageDetails model = + new ExascaleDbStorageDetails(this.totalSizeInGbs, this.availableSizeInGbs); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExascaleDbStorageDetails model) { + if (model.wasPropertyExplicitlySet("totalSizeInGbs")) { + this.totalSizeInGbs(model.getTotalSizeInGbs()); + } + if (model.wasPropertyExplicitlySet("availableSizeInGbs")) { + this.availableSizeInGbs(model.getAvailableSizeInGbs()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Total Capacity + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalSizeInGbs") + private final Integer totalSizeInGbs; + + /** + * Total Capacity + * + * @return the value + **/ + public Integer getTotalSizeInGbs() { + return totalSizeInGbs; + } + + /** + * Available Capacity + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availableSizeInGbs") + private final Integer availableSizeInGbs; + + /** + * Available Capacity + * + * @return the value + **/ + public Integer getAvailableSizeInGbs() { + return availableSizeInGbs; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExascaleDbStorageDetails("); + sb.append("super=").append(super.toString()); + sb.append("totalSizeInGbs=").append(String.valueOf(this.totalSizeInGbs)); + sb.append(", availableSizeInGbs=").append(String.valueOf(this.availableSizeInGbs)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExascaleDbStorageDetails)) { + return false; + } + + ExascaleDbStorageDetails other = (ExascaleDbStorageDetails) o; + return java.util.Objects.equals(this.totalSizeInGbs, other.totalSizeInGbs) + && java.util.Objects.equals(this.availableSizeInGbs, other.availableSizeInGbs) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.totalSizeInGbs == null ? 43 : this.totalSizeInGbs.hashCode()); + result = + (result * PRIME) + + (this.availableSizeInGbs == null + ? 43 + : this.availableSizeInGbs.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleDbStorageInputDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleDbStorageInputDetails.java new file mode 100644 index 00000000000..1236f50b11e --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleDbStorageInputDetails.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Create exadata Database Storage Details + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExascaleDbStorageInputDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExascaleDbStorageInputDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"totalSizeInGbs"}) + public ExascaleDbStorageInputDetails(Integer totalSizeInGbs) { + super(); + this.totalSizeInGbs = totalSizeInGbs; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Total Capacity + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalSizeInGbs") + private Integer totalSizeInGbs; + + /** + * Total Capacity + * + * @param totalSizeInGbs the value to set + * @return this builder + **/ + public Builder totalSizeInGbs(Integer totalSizeInGbs) { + this.totalSizeInGbs = totalSizeInGbs; + this.__explicitlySet__.add("totalSizeInGbs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExascaleDbStorageInputDetails build() { + ExascaleDbStorageInputDetails model = + new ExascaleDbStorageInputDetails(this.totalSizeInGbs); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExascaleDbStorageInputDetails model) { + if (model.wasPropertyExplicitlySet("totalSizeInGbs")) { + this.totalSizeInGbs(model.getTotalSizeInGbs()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Total Capacity + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalSizeInGbs") + private final Integer totalSizeInGbs; + + /** + * Total Capacity + * + * @return the value + **/ + public Integer getTotalSizeInGbs() { + return totalSizeInGbs; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExascaleDbStorageInputDetails("); + sb.append("super=").append(super.toString()); + sb.append("totalSizeInGbs=").append(String.valueOf(this.totalSizeInGbs)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExascaleDbStorageInputDetails)) { + return false; + } + + ExascaleDbStorageInputDetails other = (ExascaleDbStorageInputDetails) o; + return java.util.Objects.equals(this.totalSizeInGbs, other.totalSizeInGbs) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.totalSizeInGbs == null ? 43 : this.totalSizeInGbs.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleDbStorageVault.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleDbStorageVault.java new file mode 100644 index 00000000000..8302fe5d4d0 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleDbStorageVault.java @@ -0,0 +1,904 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of the Exadata Database Storage Vault. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExascaleDbStorageVault.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExascaleDbStorageVault + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "availabilityDomain", + "lifecycleState", + "displayName", + "description", + "timeCreated", + "lifecycleDetails", + "timeZone", + "vmClusterIds", + "vmClusterCount", + "freeformTags", + "definedTags", + "exadataInfrastructureId", + "systemTags", + "highCapacityDatabaseStorage", + "additionalFlashCacheInPercent" + }) + public ExascaleDbStorageVault( + String id, + String compartmentId, + String availabilityDomain, + LifecycleState lifecycleState, + String displayName, + String description, + java.util.Date timeCreated, + String lifecycleDetails, + String timeZone, + java.util.List vmClusterIds, + Integer vmClusterCount, + java.util.Map freeformTags, + java.util.Map> definedTags, + String exadataInfrastructureId, + java.util.Map> systemTags, + ExascaleDbStorageDetails highCapacityDatabaseStorage, + Integer additionalFlashCacheInPercent) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.availabilityDomain = availabilityDomain; + this.lifecycleState = lifecycleState; + this.displayName = displayName; + this.description = description; + this.timeCreated = timeCreated; + this.lifecycleDetails = lifecycleDetails; + this.timeZone = timeZone; + this.vmClusterIds = vmClusterIds; + this.vmClusterCount = vmClusterCount; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.exadataInfrastructureId = exadataInfrastructureId; + this.systemTags = systemTags; + this.highCapacityDatabaseStorage = highCapacityDatabaseStorage; + this.additionalFlashCacheInPercent = additionalFlashCacheInPercent; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The name of the availability domain in which the Exadata Database Storage Vault is located. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The name of the availability domain in which the Exadata Database Storage Vault is located. + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + /** + * The current state of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Exadata Database Storage Vault. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Exadata Database Storage Vault description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Exadata Database Storage Vault description. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The date and time that the Exadata Database Storage Vault was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time that the Exadata Database Storage Vault was created. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The time zone that you want to use for the Exadata Database Storage Vault. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeZone") + private String timeZone; + + /** + * The time zone that you want to use for the Exadata Database Storage Vault. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + * @param timeZone the value to set + * @return this builder + **/ + public Builder timeZone(String timeZone) { + this.timeZone = timeZone; + this.__explicitlySet__.add("timeZone"); + return this; + } + /** + * The List of Exadata VM cluster on Exascale Infrastructure [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) + * **Note:** If Exadata Database Storage Vault is not used for any Exadata VM cluster on Exascale Infrastructure, this list is empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterIds") + private java.util.List vmClusterIds; + + /** + * The List of Exadata VM cluster on Exascale Infrastructure [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) + * **Note:** If Exadata Database Storage Vault is not used for any Exadata VM cluster on Exascale Infrastructure, this list is empty. + * + * @param vmClusterIds the value to set + * @return this builder + **/ + public Builder vmClusterIds(java.util.List vmClusterIds) { + this.vmClusterIds = vmClusterIds; + this.__explicitlySet__.add("vmClusterIds"); + return this; + } + /** + * The number of Exadata VM clusters used the Exadata Database Storage Vault. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterCount") + private Integer vmClusterCount; + + /** + * The number of Exadata VM clusters used the Exadata Database Storage Vault. + * + * @param vmClusterCount the value to set + * @return this builder + **/ + public Builder vmClusterCount(Integer vmClusterCount) { + this.vmClusterCount = vmClusterCount; + this.__explicitlySet__.add("vmClusterCount"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exadataInfrastructureId") + private String exadataInfrastructureId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata infrastructure. + * @param exadataInfrastructureId the value to set + * @return this builder + **/ + public Builder exadataInfrastructureId(String exadataInfrastructureId) { + this.exadataInfrastructureId = exadataInfrastructureId; + this.__explicitlySet__.add("exadataInfrastructureId"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("highCapacityDatabaseStorage") + private ExascaleDbStorageDetails highCapacityDatabaseStorage; + + public Builder highCapacityDatabaseStorage( + ExascaleDbStorageDetails highCapacityDatabaseStorage) { + this.highCapacityDatabaseStorage = highCapacityDatabaseStorage; + this.__explicitlySet__.add("highCapacityDatabaseStorage"); + return this; + } + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalFlashCacheInPercent") + private Integer additionalFlashCacheInPercent; + + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + * + * @param additionalFlashCacheInPercent the value to set + * @return this builder + **/ + public Builder additionalFlashCacheInPercent(Integer additionalFlashCacheInPercent) { + this.additionalFlashCacheInPercent = additionalFlashCacheInPercent; + this.__explicitlySet__.add("additionalFlashCacheInPercent"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExascaleDbStorageVault build() { + ExascaleDbStorageVault model = + new ExascaleDbStorageVault( + this.id, + this.compartmentId, + this.availabilityDomain, + this.lifecycleState, + this.displayName, + this.description, + this.timeCreated, + this.lifecycleDetails, + this.timeZone, + this.vmClusterIds, + this.vmClusterCount, + this.freeformTags, + this.definedTags, + this.exadataInfrastructureId, + this.systemTags, + this.highCapacityDatabaseStorage, + this.additionalFlashCacheInPercent); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExascaleDbStorageVault model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeZone")) { + this.timeZone(model.getTimeZone()); + } + if (model.wasPropertyExplicitlySet("vmClusterIds")) { + this.vmClusterIds(model.getVmClusterIds()); + } + if (model.wasPropertyExplicitlySet("vmClusterCount")) { + this.vmClusterCount(model.getVmClusterCount()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("exadataInfrastructureId")) { + this.exadataInfrastructureId(model.getExadataInfrastructureId()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("highCapacityDatabaseStorage")) { + this.highCapacityDatabaseStorage(model.getHighCapacityDatabaseStorage()); + } + if (model.wasPropertyExplicitlySet("additionalFlashCacheInPercent")) { + this.additionalFlashCacheInPercent(model.getAdditionalFlashCacheInPercent()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The name of the availability domain in which the Exadata Database Storage Vault is located. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The name of the availability domain in which the Exadata Database Storage Vault is located. + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The current state of the Exadata Database Storage Vault. + **/ + public enum LifecycleState { + Provisioning("PROVISIONING"), + Available("AVAILABLE"), + Updating("UPDATING"), + Terminating("TERMINATING"), + Terminated("TERMINATED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Exadata Database Storage Vault. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Exadata Database Storage Vault description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Exadata Database Storage Vault description. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The date and time that the Exadata Database Storage Vault was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time that the Exadata Database Storage Vault was created. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The time zone that you want to use for the Exadata Database Storage Vault. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeZone") + private final String timeZone; + + /** + * The time zone that you want to use for the Exadata Database Storage Vault. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + * @return the value + **/ + public String getTimeZone() { + return timeZone; + } + + /** + * The List of Exadata VM cluster on Exascale Infrastructure [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) + * **Note:** If Exadata Database Storage Vault is not used for any Exadata VM cluster on Exascale Infrastructure, this list is empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterIds") + private final java.util.List vmClusterIds; + + /** + * The List of Exadata VM cluster on Exascale Infrastructure [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) + * **Note:** If Exadata Database Storage Vault is not used for any Exadata VM cluster on Exascale Infrastructure, this list is empty. + * + * @return the value + **/ + public java.util.List getVmClusterIds() { + return vmClusterIds; + } + + /** + * The number of Exadata VM clusters used the Exadata Database Storage Vault. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterCount") + private final Integer vmClusterCount; + + /** + * The number of Exadata VM clusters used the Exadata Database Storage Vault. + * + * @return the value + **/ + public Integer getVmClusterCount() { + return vmClusterCount; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exadataInfrastructureId") + private final String exadataInfrastructureId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata infrastructure. + * @return the value + **/ + public String getExadataInfrastructureId() { + return exadataInfrastructureId; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @com.fasterxml.jackson.annotation.JsonProperty("highCapacityDatabaseStorage") + private final ExascaleDbStorageDetails highCapacityDatabaseStorage; + + public ExascaleDbStorageDetails getHighCapacityDatabaseStorage() { + return highCapacityDatabaseStorage; + } + + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalFlashCacheInPercent") + private final Integer additionalFlashCacheInPercent; + + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + * + * @return the value + **/ + public Integer getAdditionalFlashCacheInPercent() { + return additionalFlashCacheInPercent; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExascaleDbStorageVault("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeZone=").append(String.valueOf(this.timeZone)); + sb.append(", vmClusterIds=").append(String.valueOf(this.vmClusterIds)); + sb.append(", vmClusterCount=").append(String.valueOf(this.vmClusterCount)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", exadataInfrastructureId=") + .append(String.valueOf(this.exadataInfrastructureId)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", highCapacityDatabaseStorage=") + .append(String.valueOf(this.highCapacityDatabaseStorage)); + sb.append(", additionalFlashCacheInPercent=") + .append(String.valueOf(this.additionalFlashCacheInPercent)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExascaleDbStorageVault)) { + return false; + } + + ExascaleDbStorageVault other = (ExascaleDbStorageVault) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeZone, other.timeZone) + && java.util.Objects.equals(this.vmClusterIds, other.vmClusterIds) + && java.util.Objects.equals(this.vmClusterCount, other.vmClusterCount) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals( + this.exadataInfrastructureId, other.exadataInfrastructureId) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals( + this.highCapacityDatabaseStorage, other.highCapacityDatabaseStorage) + && java.util.Objects.equals( + this.additionalFlashCacheInPercent, other.additionalFlashCacheInPercent) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeZone == null ? 43 : this.timeZone.hashCode()); + result = (result * PRIME) + (this.vmClusterIds == null ? 43 : this.vmClusterIds.hashCode()); + result = + (result * PRIME) + + (this.vmClusterCount == null ? 43 : this.vmClusterCount.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.exadataInfrastructureId == null + ? 43 + : this.exadataInfrastructureId.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = + (result * PRIME) + + (this.highCapacityDatabaseStorage == null + ? 43 + : this.highCapacityDatabaseStorage.hashCode()); + result = + (result * PRIME) + + (this.additionalFlashCacheInPercent == null + ? 43 + : this.additionalFlashCacheInPercent.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleDbStorageVaultSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleDbStorageVaultSummary.java new file mode 100644 index 00000000000..84009fee320 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExascaleDbStorageVaultSummary.java @@ -0,0 +1,804 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of the Exadata Database Storage Vault. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExascaleDbStorageVaultSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExascaleDbStorageVaultSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "availabilityDomain", + "timeZone", + "lifecycleState", + "displayName", + "description", + "timeCreated", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags", + "highCapacityDatabaseStorage", + "additionalFlashCacheInPercent", + "vmClusterCount", + "exadataInfrastructureId" + }) + public ExascaleDbStorageVaultSummary( + String id, + String compartmentId, + String availabilityDomain, + String timeZone, + ExascaleDbStorageVault.LifecycleState lifecycleState, + String displayName, + String description, + java.util.Date timeCreated, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + ExascaleDbStorageDetails highCapacityDatabaseStorage, + Integer additionalFlashCacheInPercent, + Integer vmClusterCount, + String exadataInfrastructureId) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.availabilityDomain = availabilityDomain; + this.timeZone = timeZone; + this.lifecycleState = lifecycleState; + this.displayName = displayName; + this.description = description; + this.timeCreated = timeCreated; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + this.highCapacityDatabaseStorage = highCapacityDatabaseStorage; + this.additionalFlashCacheInPercent = additionalFlashCacheInPercent; + this.vmClusterCount = vmClusterCount; + this.exadataInfrastructureId = exadataInfrastructureId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The name of the availability domain in which the Exadata Database Storage Vault is located. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * The name of the availability domain in which the Exadata Database Storage Vault is located. + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + /** + * The time zone that you want to use for the Exadata Database Storage Vault. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeZone") + private String timeZone; + + /** + * The time zone that you want to use for the Exadata Database Storage Vault. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + * @param timeZone the value to set + * @return this builder + **/ + public Builder timeZone(String timeZone) { + this.timeZone = timeZone; + this.__explicitlySet__.add("timeZone"); + return this; + } + /** + * The current state of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private ExascaleDbStorageVault.LifecycleState lifecycleState; + + /** + * The current state of the Exadata Database Storage Vault. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(ExascaleDbStorageVault.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Exadata Database Storage Vault description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Exadata Database Storage Vault description. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The date and time that the Exadata Database Storage Vault was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time that the Exadata Database Storage Vault was created. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("highCapacityDatabaseStorage") + private ExascaleDbStorageDetails highCapacityDatabaseStorage; + + public Builder highCapacityDatabaseStorage( + ExascaleDbStorageDetails highCapacityDatabaseStorage) { + this.highCapacityDatabaseStorage = highCapacityDatabaseStorage; + this.__explicitlySet__.add("highCapacityDatabaseStorage"); + return this; + } + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalFlashCacheInPercent") + private Integer additionalFlashCacheInPercent; + + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + * + * @param additionalFlashCacheInPercent the value to set + * @return this builder + **/ + public Builder additionalFlashCacheInPercent(Integer additionalFlashCacheInPercent) { + this.additionalFlashCacheInPercent = additionalFlashCacheInPercent; + this.__explicitlySet__.add("additionalFlashCacheInPercent"); + return this; + } + /** + * The number of Exadata VM clusters used the Exadata Database Storage Vault. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterCount") + private Integer vmClusterCount; + + /** + * The number of Exadata VM clusters used the Exadata Database Storage Vault. + * + * @param vmClusterCount the value to set + * @return this builder + **/ + public Builder vmClusterCount(Integer vmClusterCount) { + this.vmClusterCount = vmClusterCount; + this.__explicitlySet__.add("vmClusterCount"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exadataInfrastructureId") + private String exadataInfrastructureId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata infrastructure. + * @param exadataInfrastructureId the value to set + * @return this builder + **/ + public Builder exadataInfrastructureId(String exadataInfrastructureId) { + this.exadataInfrastructureId = exadataInfrastructureId; + this.__explicitlySet__.add("exadataInfrastructureId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExascaleDbStorageVaultSummary build() { + ExascaleDbStorageVaultSummary model = + new ExascaleDbStorageVaultSummary( + this.id, + this.compartmentId, + this.availabilityDomain, + this.timeZone, + this.lifecycleState, + this.displayName, + this.description, + this.timeCreated, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags, + this.highCapacityDatabaseStorage, + this.additionalFlashCacheInPercent, + this.vmClusterCount, + this.exadataInfrastructureId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExascaleDbStorageVaultSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("timeZone")) { + this.timeZone(model.getTimeZone()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("highCapacityDatabaseStorage")) { + this.highCapacityDatabaseStorage(model.getHighCapacityDatabaseStorage()); + } + if (model.wasPropertyExplicitlySet("additionalFlashCacheInPercent")) { + this.additionalFlashCacheInPercent(model.getAdditionalFlashCacheInPercent()); + } + if (model.wasPropertyExplicitlySet("vmClusterCount")) { + this.vmClusterCount(model.getVmClusterCount()); + } + if (model.wasPropertyExplicitlySet("exadataInfrastructureId")) { + this.exadataInfrastructureId(model.getExadataInfrastructureId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The name of the availability domain in which the Exadata Database Storage Vault is located. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * The name of the availability domain in which the Exadata Database Storage Vault is located. + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The time zone that you want to use for the Exadata Database Storage Vault. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeZone") + private final String timeZone; + + /** + * The time zone that you want to use for the Exadata Database Storage Vault. For details, see [Time Zones](https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). + * + * @return the value + **/ + public String getTimeZone() { + return timeZone; + } + + /** + * The current state of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final ExascaleDbStorageVault.LifecycleState lifecycleState; + + /** + * The current state of the Exadata Database Storage Vault. + * @return the value + **/ + public ExascaleDbStorageVault.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Exadata Database Storage Vault description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Exadata Database Storage Vault description. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The date and time that the Exadata Database Storage Vault was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time that the Exadata Database Storage Vault was created. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @com.fasterxml.jackson.annotation.JsonProperty("highCapacityDatabaseStorage") + private final ExascaleDbStorageDetails highCapacityDatabaseStorage; + + public ExascaleDbStorageDetails getHighCapacityDatabaseStorage() { + return highCapacityDatabaseStorage; + } + + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalFlashCacheInPercent") + private final Integer additionalFlashCacheInPercent; + + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + * + * @return the value + **/ + public Integer getAdditionalFlashCacheInPercent() { + return additionalFlashCacheInPercent; + } + + /** + * The number of Exadata VM clusters used the Exadata Database Storage Vault. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmClusterCount") + private final Integer vmClusterCount; + + /** + * The number of Exadata VM clusters used the Exadata Database Storage Vault. + * + * @return the value + **/ + public Integer getVmClusterCount() { + return vmClusterCount; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exadataInfrastructureId") + private final String exadataInfrastructureId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata infrastructure. + * @return the value + **/ + public String getExadataInfrastructureId() { + return exadataInfrastructureId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExascaleDbStorageVaultSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", timeZone=").append(String.valueOf(this.timeZone)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", highCapacityDatabaseStorage=") + .append(String.valueOf(this.highCapacityDatabaseStorage)); + sb.append(", additionalFlashCacheInPercent=") + .append(String.valueOf(this.additionalFlashCacheInPercent)); + sb.append(", vmClusterCount=").append(String.valueOf(this.vmClusterCount)); + sb.append(", exadataInfrastructureId=") + .append(String.valueOf(this.exadataInfrastructureId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExascaleDbStorageVaultSummary)) { + return false; + } + + ExascaleDbStorageVaultSummary other = (ExascaleDbStorageVaultSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.timeZone, other.timeZone) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals( + this.highCapacityDatabaseStorage, other.highCapacityDatabaseStorage) + && java.util.Objects.equals( + this.additionalFlashCacheInPercent, other.additionalFlashCacheInPercent) + && java.util.Objects.equals(this.vmClusterCount, other.vmClusterCount) + && java.util.Objects.equals( + this.exadataInfrastructureId, other.exadataInfrastructureId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = (result * PRIME) + (this.timeZone == null ? 43 : this.timeZone.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = + (result * PRIME) + + (this.highCapacityDatabaseStorage == null + ? 43 + : this.highCapacityDatabaseStorage.hashCode()); + result = + (result * PRIME) + + (this.additionalFlashCacheInPercent == null + ? 43 + : this.additionalFlashCacheInPercent.hashCode()); + result = + (result * PRIME) + + (this.vmClusterCount == null ? 43 : this.vmClusterCount.hashCode()); + result = + (result * PRIME) + + (this.exadataInfrastructureId == null + ? 43 + : this.exadataInfrastructureId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExecutionAction.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExecutionAction.java new file mode 100644 index 00000000000..27e0278f83a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExecutionAction.java @@ -0,0 +1,1044 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of an execution action. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ExecutionAction.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExecutionAction extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "executionWindowId", + "compartmentId", + "displayName", + "description", + "lifecycleState", + "lifecycleSubstate", + "lifecycleDetails", + "timeCreated", + "timeUpdated", + "estimatedTimeInMins", + "totalTimeTakenInMins", + "executionActionOrder", + "actionType", + "actionParams", + "actionMembers", + "freeformTags", + "definedTags" + }) + public ExecutionAction( + String id, + String executionWindowId, + String compartmentId, + String displayName, + String description, + LifecycleState lifecycleState, + LifecycleSubstate lifecycleSubstate, + String lifecycleDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Integer estimatedTimeInMins, + Integer totalTimeTakenInMins, + Integer executionActionOrder, + ActionType actionType, + java.util.Map actionParams, + java.util.List actionMembers, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.id = id; + this.executionWindowId = executionWindowId; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.description = description; + this.lifecycleState = lifecycleState; + this.lifecycleSubstate = lifecycleSubstate; + this.lifecycleDetails = lifecycleDetails; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.estimatedTimeInMins = estimatedTimeInMins; + this.totalTimeTakenInMins = totalTimeTakenInMins; + this.executionActionOrder = executionActionOrder; + this.actionType = actionType; + this.actionParams = actionParams; + this.actionMembers = actionMembers; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution action. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window resource the execution action belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionWindowId") + private String executionWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window resource the execution action belongs to. + * @param executionWindowId the value to set + * @return this builder + **/ + public Builder executionWindowId(String executionWindowId) { + this.executionWindowId = executionWindowId; + this.__explicitlySet__.add("executionWindowId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The user-friendly name for the execution action. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the execution action. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Description of the execution action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the execution action. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The current state of the execution action. Valid states are SCHEDULED, IN_PROGRESS, FAILED, CANCELED, + * UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the execution action. Valid states are SCHEDULED, IN_PROGRESS, FAILED, CANCELED, + * UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS. + * + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The current sub-state of the execution action. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleSubstate") + private LifecycleSubstate lifecycleSubstate; + + /** + * The current sub-state of the execution action. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING. + * + * @param lifecycleSubstate the value to set + * @return this builder + **/ + public Builder lifecycleSubstate(LifecycleSubstate lifecycleSubstate) { + this.lifecycleSubstate = lifecycleSubstate; + this.__explicitlySet__.add("lifecycleSubstate"); + return this; + } + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The date and time the execution action was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the execution action was created. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The last date and time that the execution action was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The last date and time that the execution action was updated. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The estimated time of the execution action in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private Integer estimatedTimeInMins; + + /** + * The estimated time of the execution action in minutes. + * @param estimatedTimeInMins the value to set + * @return this builder + **/ + public Builder estimatedTimeInMins(Integer estimatedTimeInMins) { + this.estimatedTimeInMins = estimatedTimeInMins; + this.__explicitlySet__.add("estimatedTimeInMins"); + return this; + } + /** + * The total time taken by corresponding resource activity in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalTimeTakenInMins") + private Integer totalTimeTakenInMins; + + /** + * The total time taken by corresponding resource activity in minutes. + * @param totalTimeTakenInMins the value to set + * @return this builder + **/ + public Builder totalTimeTakenInMins(Integer totalTimeTakenInMins) { + this.totalTimeTakenInMins = totalTimeTakenInMins; + this.__explicitlySet__.add("totalTimeTakenInMins"); + return this; + } + /** + * The priority order of the execution action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionActionOrder") + private Integer executionActionOrder; + + /** + * The priority order of the execution action. + * @param executionActionOrder the value to set + * @return this builder + **/ + public Builder executionActionOrder(Integer executionActionOrder) { + this.executionActionOrder = executionActionOrder; + this.__explicitlySet__.add("executionActionOrder"); + return this; + } + /** + * The action type of the execution action being performed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + /** + * The action type of the execution action being performed + * @param actionType the value to set + * @return this builder + **/ + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionParams") + private java.util.Map actionParams; + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + * @param actionParams the value to set + * @return this builder + **/ + public Builder actionParams(java.util.Map actionParams) { + this.actionParams = actionParams; + this.__explicitlySet__.add("actionParams"); + return this; + } + /** + * List of action members of this execution action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionMembers") + private java.util.List actionMembers; + + /** + * List of action members of this execution action. + * @param actionMembers the value to set + * @return this builder + **/ + public Builder actionMembers(java.util.List actionMembers) { + this.actionMembers = actionMembers; + this.__explicitlySet__.add("actionMembers"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExecutionAction build() { + ExecutionAction model = + new ExecutionAction( + this.id, + this.executionWindowId, + this.compartmentId, + this.displayName, + this.description, + this.lifecycleState, + this.lifecycleSubstate, + this.lifecycleDetails, + this.timeCreated, + this.timeUpdated, + this.estimatedTimeInMins, + this.totalTimeTakenInMins, + this.executionActionOrder, + this.actionType, + this.actionParams, + this.actionMembers, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExecutionAction model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("executionWindowId")) { + this.executionWindowId(model.getExecutionWindowId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleSubstate")) { + this.lifecycleSubstate(model.getLifecycleSubstate()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("estimatedTimeInMins")) { + this.estimatedTimeInMins(model.getEstimatedTimeInMins()); + } + if (model.wasPropertyExplicitlySet("totalTimeTakenInMins")) { + this.totalTimeTakenInMins(model.getTotalTimeTakenInMins()); + } + if (model.wasPropertyExplicitlySet("executionActionOrder")) { + this.executionActionOrder(model.getExecutionActionOrder()); + } + if (model.wasPropertyExplicitlySet("actionType")) { + this.actionType(model.getActionType()); + } + if (model.wasPropertyExplicitlySet("actionParams")) { + this.actionParams(model.getActionParams()); + } + if (model.wasPropertyExplicitlySet("actionMembers")) { + this.actionMembers(model.getActionMembers()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution action. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window resource the execution action belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionWindowId") + private final String executionWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window resource the execution action belongs to. + * @return the value + **/ + public String getExecutionWindowId() { + return executionWindowId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The user-friendly name for the execution action. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the execution action. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Description of the execution action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the execution action. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The current state of the execution action. Valid states are SCHEDULED, IN_PROGRESS, FAILED, CANCELED, + * UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS. + * + **/ + public enum LifecycleState { + Scheduled("SCHEDULED"), + InProgress("IN_PROGRESS"), + Failed("FAILED"), + Canceled("CANCELED"), + Updating("UPDATING"), + Deleted("DELETED"), + Succeeded("SUCCEEDED"), + PartialSuccess("PARTIAL_SUCCESS"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the execution action. Valid states are SCHEDULED, IN_PROGRESS, FAILED, CANCELED, + * UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the execution action. Valid states are SCHEDULED, IN_PROGRESS, FAILED, CANCELED, + * UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS. + * + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The current sub-state of the execution action. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING. + * + **/ + public enum LifecycleSubstate { + DurationExceeded("DURATION_EXCEEDED"), + MaintenanceInProgress("MAINTENANCE_IN_PROGRESS"), + Waiting("WAITING"), + Rescheduled("RESCHEDULED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleSubstate.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleSubstate v : LifecycleSubstate.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleSubstate(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleSubstate create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleSubstate', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current sub-state of the execution action. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleSubstate") + private final LifecycleSubstate lifecycleSubstate; + + /** + * The current sub-state of the execution action. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING. + * + * @return the value + **/ + public LifecycleSubstate getLifecycleSubstate() { + return lifecycleSubstate; + } + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The date and time the execution action was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the execution action was created. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The last date and time that the execution action was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The last date and time that the execution action was updated. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The estimated time of the execution action in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private final Integer estimatedTimeInMins; + + /** + * The estimated time of the execution action in minutes. + * @return the value + **/ + public Integer getEstimatedTimeInMins() { + return estimatedTimeInMins; + } + + /** + * The total time taken by corresponding resource activity in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalTimeTakenInMins") + private final Integer totalTimeTakenInMins; + + /** + * The total time taken by corresponding resource activity in minutes. + * @return the value + **/ + public Integer getTotalTimeTakenInMins() { + return totalTimeTakenInMins; + } + + /** + * The priority order of the execution action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionActionOrder") + private final Integer executionActionOrder; + + /** + * The priority order of the execution action. + * @return the value + **/ + public Integer getExecutionActionOrder() { + return executionActionOrder; + } + + /** + * The action type of the execution action being performed + **/ + public enum ActionType { + DbServerFullSoftwareUpdate("DB_SERVER_FULL_SOFTWARE_UPDATE"), + StorageServerFullSoftwareUpdate("STORAGE_SERVER_FULL_SOFTWARE_UPDATE"), + NetworkSwitchFullSoftwareUpdate("NETWORK_SWITCH_FULL_SOFTWARE_UPDATE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ActionType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActionType v : ActionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ActionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ActionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ActionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The action type of the execution action being performed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private final ActionType actionType; + + /** + * The action type of the execution action being performed + * @return the value + **/ + public ActionType getActionType() { + return actionType; + } + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionParams") + private final java.util.Map actionParams; + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + * @return the value + **/ + public java.util.Map getActionParams() { + return actionParams; + } + + /** + * List of action members of this execution action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionMembers") + private final java.util.List actionMembers; + + /** + * List of action members of this execution action. + * @return the value + **/ + public java.util.List getActionMembers() { + return actionMembers; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExecutionAction("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", executionWindowId=").append(String.valueOf(this.executionWindowId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleSubstate=").append(String.valueOf(this.lifecycleSubstate)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", estimatedTimeInMins=").append(String.valueOf(this.estimatedTimeInMins)); + sb.append(", totalTimeTakenInMins=").append(String.valueOf(this.totalTimeTakenInMins)); + sb.append(", executionActionOrder=").append(String.valueOf(this.executionActionOrder)); + sb.append(", actionType=").append(String.valueOf(this.actionType)); + sb.append(", actionParams=").append(String.valueOf(this.actionParams)); + sb.append(", actionMembers=").append(String.valueOf(this.actionMembers)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExecutionAction)) { + return false; + } + + ExecutionAction other = (ExecutionAction) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.executionWindowId, other.executionWindowId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleSubstate, other.lifecycleSubstate) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.estimatedTimeInMins, other.estimatedTimeInMins) + && java.util.Objects.equals(this.totalTimeTakenInMins, other.totalTimeTakenInMins) + && java.util.Objects.equals(this.executionActionOrder, other.executionActionOrder) + && java.util.Objects.equals(this.actionType, other.actionType) + && java.util.Objects.equals(this.actionParams, other.actionParams) + && java.util.Objects.equals(this.actionMembers, other.actionMembers) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.executionWindowId == null ? 43 : this.executionWindowId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleSubstate == null ? 43 : this.lifecycleSubstate.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.estimatedTimeInMins == null + ? 43 + : this.estimatedTimeInMins.hashCode()); + result = + (result * PRIME) + + (this.totalTimeTakenInMins == null + ? 43 + : this.totalTimeTakenInMins.hashCode()); + result = + (result * PRIME) + + (this.executionActionOrder == null + ? 43 + : this.executionActionOrder.hashCode()); + result = (result * PRIME) + (this.actionType == null ? 43 : this.actionType.hashCode()); + result = (result * PRIME) + (this.actionParams == null ? 43 : this.actionParams.hashCode()); + result = + (result * PRIME) + + (this.actionMembers == null ? 43 : this.actionMembers.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExecutionActionMember.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExecutionActionMember.java new file mode 100644 index 00000000000..ef817793be8 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExecutionActionMember.java @@ -0,0 +1,346 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * The action member details. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExecutionActionMember.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExecutionActionMember + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "memberOrder", + "memberId", + "status", + "estimatedTimeInMins", + "totalTimeTakenInMins" + }) + public ExecutionActionMember( + Integer memberOrder, + String memberId, + String status, + Integer estimatedTimeInMins, + Integer totalTimeTakenInMins) { + super(); + this.memberOrder = memberOrder; + this.memberId = memberId; + this.status = status; + this.estimatedTimeInMins = estimatedTimeInMins; + this.totalTimeTakenInMins = totalTimeTakenInMins; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The priority order of the execution action member. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memberOrder") + private Integer memberOrder; + + /** + * The priority order of the execution action member. + * @param memberOrder the value to set + * @return this builder + **/ + public Builder memberOrder(Integer memberOrder) { + this.memberOrder = memberOrder; + this.__explicitlySet__.add("memberOrder"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the parent resource the execution action belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memberId") + private String memberId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the parent resource the execution action belongs to. + * @param memberId the value to set + * @return this builder + **/ + public Builder memberId(String memberId) { + this.memberId = memberId; + this.__explicitlySet__.add("memberId"); + return this; + } + /** + * The current status of the execution action member. Valid states are SCHEDULED, IN_PROGRESS, FAILED, CANCELED, DURATION_EXCEEDED, RESCHEDULED and COMPLETED. + * enum: + * - SCHEDULED + * - IN_PROGRESS + * - FAILED + * - CANCELED + * - DURATION_EXCEEDED + * - RESCHEDULED + * - SUCCEEDED + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private String status; + + /** + * The current status of the execution action member. Valid states are SCHEDULED, IN_PROGRESS, FAILED, CANCELED, DURATION_EXCEEDED, RESCHEDULED and COMPLETED. + * enum: + * - SCHEDULED + * - IN_PROGRESS + * - FAILED + * - CANCELED + * - DURATION_EXCEEDED + * - RESCHEDULED + * - SUCCEEDED + * + * @param status the value to set + * @return this builder + **/ + public Builder status(String status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The estimated time of the execution action member in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private Integer estimatedTimeInMins; + + /** + * The estimated time of the execution action member in minutes. + * @param estimatedTimeInMins the value to set + * @return this builder + **/ + public Builder estimatedTimeInMins(Integer estimatedTimeInMins) { + this.estimatedTimeInMins = estimatedTimeInMins; + this.__explicitlySet__.add("estimatedTimeInMins"); + return this; + } + /** + * The total time taken by corresponding resource activity in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalTimeTakenInMins") + private Integer totalTimeTakenInMins; + + /** + * The total time taken by corresponding resource activity in minutes. + * @param totalTimeTakenInMins the value to set + * @return this builder + **/ + public Builder totalTimeTakenInMins(Integer totalTimeTakenInMins) { + this.totalTimeTakenInMins = totalTimeTakenInMins; + this.__explicitlySet__.add("totalTimeTakenInMins"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExecutionActionMember build() { + ExecutionActionMember model = + new ExecutionActionMember( + this.memberOrder, + this.memberId, + this.status, + this.estimatedTimeInMins, + this.totalTimeTakenInMins); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExecutionActionMember model) { + if (model.wasPropertyExplicitlySet("memberOrder")) { + this.memberOrder(model.getMemberOrder()); + } + if (model.wasPropertyExplicitlySet("memberId")) { + this.memberId(model.getMemberId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("estimatedTimeInMins")) { + this.estimatedTimeInMins(model.getEstimatedTimeInMins()); + } + if (model.wasPropertyExplicitlySet("totalTimeTakenInMins")) { + this.totalTimeTakenInMins(model.getTotalTimeTakenInMins()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The priority order of the execution action member. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memberOrder") + private final Integer memberOrder; + + /** + * The priority order of the execution action member. + * @return the value + **/ + public Integer getMemberOrder() { + return memberOrder; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the parent resource the execution action belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memberId") + private final String memberId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the parent resource the execution action belongs to. + * @return the value + **/ + public String getMemberId() { + return memberId; + } + + /** + * The current status of the execution action member. Valid states are SCHEDULED, IN_PROGRESS, FAILED, CANCELED, DURATION_EXCEEDED, RESCHEDULED and COMPLETED. + * enum: + * - SCHEDULED + * - IN_PROGRESS + * - FAILED + * - CANCELED + * - DURATION_EXCEEDED + * - RESCHEDULED + * - SUCCEEDED + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final String status; + + /** + * The current status of the execution action member. Valid states are SCHEDULED, IN_PROGRESS, FAILED, CANCELED, DURATION_EXCEEDED, RESCHEDULED and COMPLETED. + * enum: + * - SCHEDULED + * - IN_PROGRESS + * - FAILED + * - CANCELED + * - DURATION_EXCEEDED + * - RESCHEDULED + * - SUCCEEDED + * + * @return the value + **/ + public String getStatus() { + return status; + } + + /** + * The estimated time of the execution action member in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private final Integer estimatedTimeInMins; + + /** + * The estimated time of the execution action member in minutes. + * @return the value + **/ + public Integer getEstimatedTimeInMins() { + return estimatedTimeInMins; + } + + /** + * The total time taken by corresponding resource activity in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalTimeTakenInMins") + private final Integer totalTimeTakenInMins; + + /** + * The total time taken by corresponding resource activity in minutes. + * @return the value + **/ + public Integer getTotalTimeTakenInMins() { + return totalTimeTakenInMins; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExecutionActionMember("); + sb.append("super=").append(super.toString()); + sb.append("memberOrder=").append(String.valueOf(this.memberOrder)); + sb.append(", memberId=").append(String.valueOf(this.memberId)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", estimatedTimeInMins=").append(String.valueOf(this.estimatedTimeInMins)); + sb.append(", totalTimeTakenInMins=").append(String.valueOf(this.totalTimeTakenInMins)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExecutionActionMember)) { + return false; + } + + ExecutionActionMember other = (ExecutionActionMember) o; + return java.util.Objects.equals(this.memberOrder, other.memberOrder) + && java.util.Objects.equals(this.memberId, other.memberId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.estimatedTimeInMins, other.estimatedTimeInMins) + && java.util.Objects.equals(this.totalTimeTakenInMins, other.totalTimeTakenInMins) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.memberOrder == null ? 43 : this.memberOrder.hashCode()); + result = (result * PRIME) + (this.memberId == null ? 43 : this.memberId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = + (result * PRIME) + + (this.estimatedTimeInMins == null + ? 43 + : this.estimatedTimeInMins.hashCode()); + result = + (result * PRIME) + + (this.totalTimeTakenInMins == null + ? 43 + : this.totalTimeTakenInMins.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExecutionActionSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExecutionActionSummary.java new file mode 100644 index 00000000000..0ac0addf63b --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExecutionActionSummary.java @@ -0,0 +1,1047 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of an execution action. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExecutionActionSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExecutionActionSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "executionWindowId", + "compartmentId", + "displayName", + "description", + "lifecycleState", + "lifecycleSubstate", + "lifecycleDetails", + "timeCreated", + "timeUpdated", + "estimatedTimeInMins", + "totalTimeTakenInMins", + "executionActionOrder", + "actionType", + "actionParams", + "actionMembers", + "freeformTags", + "definedTags" + }) + public ExecutionActionSummary( + String id, + String executionWindowId, + String compartmentId, + String displayName, + String description, + LifecycleState lifecycleState, + LifecycleSubstate lifecycleSubstate, + String lifecycleDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Integer estimatedTimeInMins, + Integer totalTimeTakenInMins, + Integer executionActionOrder, + ActionType actionType, + java.util.Map actionParams, + java.util.List actionMembers, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.id = id; + this.executionWindowId = executionWindowId; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.description = description; + this.lifecycleState = lifecycleState; + this.lifecycleSubstate = lifecycleSubstate; + this.lifecycleDetails = lifecycleDetails; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.estimatedTimeInMins = estimatedTimeInMins; + this.totalTimeTakenInMins = totalTimeTakenInMins; + this.executionActionOrder = executionActionOrder; + this.actionType = actionType; + this.actionParams = actionParams; + this.actionMembers = actionMembers; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution action. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window resource the execution action belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionWindowId") + private String executionWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window resource the execution action belongs to. + * @param executionWindowId the value to set + * @return this builder + **/ + public Builder executionWindowId(String executionWindowId) { + this.executionWindowId = executionWindowId; + this.__explicitlySet__.add("executionWindowId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The user-friendly name for the execution action. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the execution action. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Description of the execution action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the execution action. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The current state of the execution action. Valid states are SCHEDULED, IN_PROGRESS, FAILED, CANCELED, + * UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the execution action. Valid states are SCHEDULED, IN_PROGRESS, FAILED, CANCELED, + * UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS. + * + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The current sub-state of the execution action. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleSubstate") + private LifecycleSubstate lifecycleSubstate; + + /** + * The current sub-state of the execution action. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING. + * + * @param lifecycleSubstate the value to set + * @return this builder + **/ + public Builder lifecycleSubstate(LifecycleSubstate lifecycleSubstate) { + this.lifecycleSubstate = lifecycleSubstate; + this.__explicitlySet__.add("lifecycleSubstate"); + return this; + } + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The date and time the execution action was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the execution action was created. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The last date and time that the execution action was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The last date and time that the execution action was updated. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The estimated time of the execution action in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private Integer estimatedTimeInMins; + + /** + * The estimated time of the execution action in minutes. + * @param estimatedTimeInMins the value to set + * @return this builder + **/ + public Builder estimatedTimeInMins(Integer estimatedTimeInMins) { + this.estimatedTimeInMins = estimatedTimeInMins; + this.__explicitlySet__.add("estimatedTimeInMins"); + return this; + } + /** + * The total time taken by corresponding resource activity in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalTimeTakenInMins") + private Integer totalTimeTakenInMins; + + /** + * The total time taken by corresponding resource activity in minutes. + * @param totalTimeTakenInMins the value to set + * @return this builder + **/ + public Builder totalTimeTakenInMins(Integer totalTimeTakenInMins) { + this.totalTimeTakenInMins = totalTimeTakenInMins; + this.__explicitlySet__.add("totalTimeTakenInMins"); + return this; + } + /** + * The priority order of the execution action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionActionOrder") + private Integer executionActionOrder; + + /** + * The priority order of the execution action. + * @param executionActionOrder the value to set + * @return this builder + **/ + public Builder executionActionOrder(Integer executionActionOrder) { + this.executionActionOrder = executionActionOrder; + this.__explicitlySet__.add("executionActionOrder"); + return this; + } + /** + * The action type of the execution action being performed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + /** + * The action type of the execution action being performed + * @param actionType the value to set + * @return this builder + **/ + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionParams") + private java.util.Map actionParams; + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + * @param actionParams the value to set + * @return this builder + **/ + public Builder actionParams(java.util.Map actionParams) { + this.actionParams = actionParams; + this.__explicitlySet__.add("actionParams"); + return this; + } + /** + * List of action members of this execution action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionMembers") + private java.util.List actionMembers; + + /** + * List of action members of this execution action. + * @param actionMembers the value to set + * @return this builder + **/ + public Builder actionMembers(java.util.List actionMembers) { + this.actionMembers = actionMembers; + this.__explicitlySet__.add("actionMembers"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExecutionActionSummary build() { + ExecutionActionSummary model = + new ExecutionActionSummary( + this.id, + this.executionWindowId, + this.compartmentId, + this.displayName, + this.description, + this.lifecycleState, + this.lifecycleSubstate, + this.lifecycleDetails, + this.timeCreated, + this.timeUpdated, + this.estimatedTimeInMins, + this.totalTimeTakenInMins, + this.executionActionOrder, + this.actionType, + this.actionParams, + this.actionMembers, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExecutionActionSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("executionWindowId")) { + this.executionWindowId(model.getExecutionWindowId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleSubstate")) { + this.lifecycleSubstate(model.getLifecycleSubstate()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("estimatedTimeInMins")) { + this.estimatedTimeInMins(model.getEstimatedTimeInMins()); + } + if (model.wasPropertyExplicitlySet("totalTimeTakenInMins")) { + this.totalTimeTakenInMins(model.getTotalTimeTakenInMins()); + } + if (model.wasPropertyExplicitlySet("executionActionOrder")) { + this.executionActionOrder(model.getExecutionActionOrder()); + } + if (model.wasPropertyExplicitlySet("actionType")) { + this.actionType(model.getActionType()); + } + if (model.wasPropertyExplicitlySet("actionParams")) { + this.actionParams(model.getActionParams()); + } + if (model.wasPropertyExplicitlySet("actionMembers")) { + this.actionMembers(model.getActionMembers()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution action. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window resource the execution action belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionWindowId") + private final String executionWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window resource the execution action belongs to. + * @return the value + **/ + public String getExecutionWindowId() { + return executionWindowId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The user-friendly name for the execution action. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the execution action. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Description of the execution action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the execution action. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The current state of the execution action. Valid states are SCHEDULED, IN_PROGRESS, FAILED, CANCELED, + * UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS. + * + **/ + public enum LifecycleState { + Scheduled("SCHEDULED"), + InProgress("IN_PROGRESS"), + Failed("FAILED"), + Canceled("CANCELED"), + Updating("UPDATING"), + Deleted("DELETED"), + Succeeded("SUCCEEDED"), + PartialSuccess("PARTIAL_SUCCESS"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the execution action. Valid states are SCHEDULED, IN_PROGRESS, FAILED, CANCELED, + * UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the execution action. Valid states are SCHEDULED, IN_PROGRESS, FAILED, CANCELED, + * UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS. + * + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The current sub-state of the execution action. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING. + * + **/ + public enum LifecycleSubstate { + DurationExceeded("DURATION_EXCEEDED"), + MaintenanceInProgress("MAINTENANCE_IN_PROGRESS"), + Waiting("WAITING"), + Rescheduled("RESCHEDULED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleSubstate.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleSubstate v : LifecycleSubstate.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleSubstate(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleSubstate create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleSubstate', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current sub-state of the execution action. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleSubstate") + private final LifecycleSubstate lifecycleSubstate; + + /** + * The current sub-state of the execution action. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING. + * + * @return the value + **/ + public LifecycleSubstate getLifecycleSubstate() { + return lifecycleSubstate; + } + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The date and time the execution action was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the execution action was created. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The last date and time that the execution action was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The last date and time that the execution action was updated. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The estimated time of the execution action in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private final Integer estimatedTimeInMins; + + /** + * The estimated time of the execution action in minutes. + * @return the value + **/ + public Integer getEstimatedTimeInMins() { + return estimatedTimeInMins; + } + + /** + * The total time taken by corresponding resource activity in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalTimeTakenInMins") + private final Integer totalTimeTakenInMins; + + /** + * The total time taken by corresponding resource activity in minutes. + * @return the value + **/ + public Integer getTotalTimeTakenInMins() { + return totalTimeTakenInMins; + } + + /** + * The priority order of the execution action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionActionOrder") + private final Integer executionActionOrder; + + /** + * The priority order of the execution action. + * @return the value + **/ + public Integer getExecutionActionOrder() { + return executionActionOrder; + } + + /** + * The action type of the execution action being performed + **/ + public enum ActionType { + DbServerFullSoftwareUpdate("DB_SERVER_FULL_SOFTWARE_UPDATE"), + StorageServerFullSoftwareUpdate("STORAGE_SERVER_FULL_SOFTWARE_UPDATE"), + NetworkSwitchFullSoftwareUpdate("NETWORK_SWITCH_FULL_SOFTWARE_UPDATE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ActionType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActionType v : ActionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ActionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ActionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ActionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The action type of the execution action being performed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private final ActionType actionType; + + /** + * The action type of the execution action being performed + * @return the value + **/ + public ActionType getActionType() { + return actionType; + } + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionParams") + private final java.util.Map actionParams; + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + * @return the value + **/ + public java.util.Map getActionParams() { + return actionParams; + } + + /** + * List of action members of this execution action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionMembers") + private final java.util.List actionMembers; + + /** + * List of action members of this execution action. + * @return the value + **/ + public java.util.List getActionMembers() { + return actionMembers; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExecutionActionSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", executionWindowId=").append(String.valueOf(this.executionWindowId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleSubstate=").append(String.valueOf(this.lifecycleSubstate)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", estimatedTimeInMins=").append(String.valueOf(this.estimatedTimeInMins)); + sb.append(", totalTimeTakenInMins=").append(String.valueOf(this.totalTimeTakenInMins)); + sb.append(", executionActionOrder=").append(String.valueOf(this.executionActionOrder)); + sb.append(", actionType=").append(String.valueOf(this.actionType)); + sb.append(", actionParams=").append(String.valueOf(this.actionParams)); + sb.append(", actionMembers=").append(String.valueOf(this.actionMembers)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExecutionActionSummary)) { + return false; + } + + ExecutionActionSummary other = (ExecutionActionSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.executionWindowId, other.executionWindowId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleSubstate, other.lifecycleSubstate) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.estimatedTimeInMins, other.estimatedTimeInMins) + && java.util.Objects.equals(this.totalTimeTakenInMins, other.totalTimeTakenInMins) + && java.util.Objects.equals(this.executionActionOrder, other.executionActionOrder) + && java.util.Objects.equals(this.actionType, other.actionType) + && java.util.Objects.equals(this.actionParams, other.actionParams) + && java.util.Objects.equals(this.actionMembers, other.actionMembers) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.executionWindowId == null ? 43 : this.executionWindowId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleSubstate == null ? 43 : this.lifecycleSubstate.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.estimatedTimeInMins == null + ? 43 + : this.estimatedTimeInMins.hashCode()); + result = + (result * PRIME) + + (this.totalTimeTakenInMins == null + ? 43 + : this.totalTimeTakenInMins.hashCode()); + result = + (result * PRIME) + + (this.executionActionOrder == null + ? 43 + : this.executionActionOrder.hashCode()); + result = (result * PRIME) + (this.actionType == null ? 43 : this.actionType.hashCode()); + result = (result * PRIME) + (this.actionParams == null ? 43 : this.actionParams.hashCode()); + result = + (result * PRIME) + + (this.actionMembers == null ? 43 : this.actionMembers.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExecutionWindow.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExecutionWindow.java new file mode 100644 index 00000000000..7ac857df403 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExecutionWindow.java @@ -0,0 +1,1128 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of an execution window. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ExecutionWindow.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExecutionWindow extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "executionResourceId", + "compartmentId", + "displayName", + "description", + "lifecycleState", + "lifecycleSubstate", + "lifecycleDetails", + "timeCreated", + "timeUpdated", + "timeStarted", + "timeEnded", + "timeScheduled", + "windowDurationInMins", + "isEnforcedDuration", + "estimatedTimeInMins", + "totalTimeTakenInMins", + "windowType", + "freeformTags", + "definedTags" + }) + public ExecutionWindow( + String id, + String executionResourceId, + String compartmentId, + String displayName, + String description, + LifecycleState lifecycleState, + LifecycleSubstate lifecycleSubstate, + String lifecycleDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.Date timeStarted, + java.util.Date timeEnded, + java.util.Date timeScheduled, + Integer windowDurationInMins, + Boolean isEnforcedDuration, + Integer estimatedTimeInMins, + Integer totalTimeTakenInMins, + WindowType windowType, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.id = id; + this.executionResourceId = executionResourceId; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.description = description; + this.lifecycleState = lifecycleState; + this.lifecycleSubstate = lifecycleSubstate; + this.lifecycleDetails = lifecycleDetails; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.timeStarted = timeStarted; + this.timeEnded = timeEnded; + this.timeScheduled = timeScheduled; + this.windowDurationInMins = windowDurationInMins; + this.isEnforcedDuration = isEnforcedDuration; + this.estimatedTimeInMins = estimatedTimeInMins; + this.totalTimeTakenInMins = totalTimeTakenInMins; + this.windowType = windowType; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution resource the execution window belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionResourceId") + private String executionResourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution resource the execution window belongs to. + * @param executionResourceId the value to set + * @return this builder + **/ + public Builder executionResourceId(String executionResourceId) { + this.executionResourceId = executionResourceId; + this.__explicitlySet__.add("executionResourceId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The user-friendly name for the execution window. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the execution window. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Description of the execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the execution window. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The current state of the Schedule Policy. Valid states are CREATED, SCHEDULED, IN_PROGRESS, FAILED, CANCELED, + * UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Schedule Policy. Valid states are CREATED, SCHEDULED, IN_PROGRESS, FAILED, CANCELED, + * UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS. + * + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The current sub-state of the execution window. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleSubstate") + private LifecycleSubstate lifecycleSubstate; + + /** + * The current sub-state of the execution window. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING. + * + * @param lifecycleSubstate the value to set + * @return this builder + **/ + public Builder lifecycleSubstate(LifecycleSubstate lifecycleSubstate) { + this.lifecycleSubstate = lifecycleSubstate; + this.__explicitlySet__.add("lifecycleSubstate"); + return this; + } + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The date and time the execution window was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the execution window was created. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The last date and time that the execution window was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The last date and time that the execution window was updated. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The date and time that the execution window was started. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The date and time that the execution window was started. + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The date and time that the execution window ended. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + private java.util.Date timeEnded; + + /** + * The date and time that the execution window ended. + * @param timeEnded the value to set + * @return this builder + **/ + public Builder timeEnded(java.util.Date timeEnded) { + this.timeEnded = timeEnded; + this.__explicitlySet__.add("timeEnded"); + return this; + } + /** + * The scheduled start date and time of the execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduled") + private java.util.Date timeScheduled; + + /** + * The scheduled start date and time of the execution window. + * @param timeScheduled the value to set + * @return this builder + **/ + public Builder timeScheduled(java.util.Date timeScheduled) { + this.timeScheduled = timeScheduled; + this.__explicitlySet__.add("timeScheduled"); + return this; + } + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("windowDurationInMins") + private Integer windowDurationInMins; + + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + * @param windowDurationInMins the value to set + * @return this builder + **/ + public Builder windowDurationInMins(Integer windowDurationInMins) { + this.windowDurationInMins = windowDurationInMins; + this.__explicitlySet__.add("windowDurationInMins"); + return this; + } + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnforcedDuration") + private Boolean isEnforcedDuration; + + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + * @param isEnforcedDuration the value to set + * @return this builder + **/ + public Builder isEnforcedDuration(Boolean isEnforcedDuration) { + this.isEnforcedDuration = isEnforcedDuration; + this.__explicitlySet__.add("isEnforcedDuration"); + return this; + } + /** + * The estimated time of the execution window in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private Integer estimatedTimeInMins; + + /** + * The estimated time of the execution window in minutes. + * @param estimatedTimeInMins the value to set + * @return this builder + **/ + public Builder estimatedTimeInMins(Integer estimatedTimeInMins) { + this.estimatedTimeInMins = estimatedTimeInMins; + this.__explicitlySet__.add("estimatedTimeInMins"); + return this; + } + /** + * The total time taken by corresponding resource activity in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalTimeTakenInMins") + private Integer totalTimeTakenInMins; + + /** + * The total time taken by corresponding resource activity in minutes. + * @param totalTimeTakenInMins the value to set + * @return this builder + **/ + public Builder totalTimeTakenInMins(Integer totalTimeTakenInMins) { + this.totalTimeTakenInMins = totalTimeTakenInMins; + this.__explicitlySet__.add("totalTimeTakenInMins"); + return this; + } + /** + * The execution window is of PLANNED or UNPLANNED type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("windowType") + private WindowType windowType; + + /** + * The execution window is of PLANNED or UNPLANNED type. + * @param windowType the value to set + * @return this builder + **/ + public Builder windowType(WindowType windowType) { + this.windowType = windowType; + this.__explicitlySet__.add("windowType"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExecutionWindow build() { + ExecutionWindow model = + new ExecutionWindow( + this.id, + this.executionResourceId, + this.compartmentId, + this.displayName, + this.description, + this.lifecycleState, + this.lifecycleSubstate, + this.lifecycleDetails, + this.timeCreated, + this.timeUpdated, + this.timeStarted, + this.timeEnded, + this.timeScheduled, + this.windowDurationInMins, + this.isEnforcedDuration, + this.estimatedTimeInMins, + this.totalTimeTakenInMins, + this.windowType, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExecutionWindow model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("executionResourceId")) { + this.executionResourceId(model.getExecutionResourceId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleSubstate")) { + this.lifecycleSubstate(model.getLifecycleSubstate()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeEnded")) { + this.timeEnded(model.getTimeEnded()); + } + if (model.wasPropertyExplicitlySet("timeScheduled")) { + this.timeScheduled(model.getTimeScheduled()); + } + if (model.wasPropertyExplicitlySet("windowDurationInMins")) { + this.windowDurationInMins(model.getWindowDurationInMins()); + } + if (model.wasPropertyExplicitlySet("isEnforcedDuration")) { + this.isEnforcedDuration(model.getIsEnforcedDuration()); + } + if (model.wasPropertyExplicitlySet("estimatedTimeInMins")) { + this.estimatedTimeInMins(model.getEstimatedTimeInMins()); + } + if (model.wasPropertyExplicitlySet("totalTimeTakenInMins")) { + this.totalTimeTakenInMins(model.getTotalTimeTakenInMins()); + } + if (model.wasPropertyExplicitlySet("windowType")) { + this.windowType(model.getWindowType()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution resource the execution window belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionResourceId") + private final String executionResourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution resource the execution window belongs to. + * @return the value + **/ + public String getExecutionResourceId() { + return executionResourceId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The user-friendly name for the execution window. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the execution window. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Description of the execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the execution window. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The current state of the Schedule Policy. Valid states are CREATED, SCHEDULED, IN_PROGRESS, FAILED, CANCELED, + * UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS. + * + **/ + public enum LifecycleState { + Created("CREATED"), + Scheduled("SCHEDULED"), + InProgress("IN_PROGRESS"), + Failed("FAILED"), + Canceled("CANCELED"), + Updating("UPDATING"), + Deleted("DELETED"), + Succeeded("SUCCEEDED"), + PartialSuccess("PARTIAL_SUCCESS"), + Creating("CREATING"), + Deleting("DELETING"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the Schedule Policy. Valid states are CREATED, SCHEDULED, IN_PROGRESS, FAILED, CANCELED, + * UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Schedule Policy. Valid states are CREATED, SCHEDULED, IN_PROGRESS, FAILED, CANCELED, + * UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS. + * + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The current sub-state of the execution window. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING. + * + **/ + public enum LifecycleSubstate { + DurationExceeded("DURATION_EXCEEDED"), + MaintenanceInProgress("MAINTENANCE_IN_PROGRESS"), + Waiting("WAITING"), + Rescheduled("RESCHEDULED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleSubstate.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleSubstate v : LifecycleSubstate.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleSubstate(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleSubstate create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleSubstate', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current sub-state of the execution window. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleSubstate") + private final LifecycleSubstate lifecycleSubstate; + + /** + * The current sub-state of the execution window. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING. + * + * @return the value + **/ + public LifecycleSubstate getLifecycleSubstate() { + return lifecycleSubstate; + } + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The date and time the execution window was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the execution window was created. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The last date and time that the execution window was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The last date and time that the execution window was updated. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The date and time that the execution window was started. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The date and time that the execution window was started. + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The date and time that the execution window ended. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + private final java.util.Date timeEnded; + + /** + * The date and time that the execution window ended. + * @return the value + **/ + public java.util.Date getTimeEnded() { + return timeEnded; + } + + /** + * The scheduled start date and time of the execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduled") + private final java.util.Date timeScheduled; + + /** + * The scheduled start date and time of the execution window. + * @return the value + **/ + public java.util.Date getTimeScheduled() { + return timeScheduled; + } + + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("windowDurationInMins") + private final Integer windowDurationInMins; + + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + * @return the value + **/ + public Integer getWindowDurationInMins() { + return windowDurationInMins; + } + + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnforcedDuration") + private final Boolean isEnforcedDuration; + + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + * @return the value + **/ + public Boolean getIsEnforcedDuration() { + return isEnforcedDuration; + } + + /** + * The estimated time of the execution window in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private final Integer estimatedTimeInMins; + + /** + * The estimated time of the execution window in minutes. + * @return the value + **/ + public Integer getEstimatedTimeInMins() { + return estimatedTimeInMins; + } + + /** + * The total time taken by corresponding resource activity in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalTimeTakenInMins") + private final Integer totalTimeTakenInMins; + + /** + * The total time taken by corresponding resource activity in minutes. + * @return the value + **/ + public Integer getTotalTimeTakenInMins() { + return totalTimeTakenInMins; + } + + /** + * The execution window is of PLANNED or UNPLANNED type. + **/ + public enum WindowType { + Planned("PLANNED"), + Unplanned("UNPLANNED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(WindowType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (WindowType v : WindowType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + WindowType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static WindowType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'WindowType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The execution window is of PLANNED or UNPLANNED type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("windowType") + private final WindowType windowType; + + /** + * The execution window is of PLANNED or UNPLANNED type. + * @return the value + **/ + public WindowType getWindowType() { + return windowType; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExecutionWindow("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", executionResourceId=").append(String.valueOf(this.executionResourceId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleSubstate=").append(String.valueOf(this.lifecycleSubstate)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeEnded=").append(String.valueOf(this.timeEnded)); + sb.append(", timeScheduled=").append(String.valueOf(this.timeScheduled)); + sb.append(", windowDurationInMins=").append(String.valueOf(this.windowDurationInMins)); + sb.append(", isEnforcedDuration=").append(String.valueOf(this.isEnforcedDuration)); + sb.append(", estimatedTimeInMins=").append(String.valueOf(this.estimatedTimeInMins)); + sb.append(", totalTimeTakenInMins=").append(String.valueOf(this.totalTimeTakenInMins)); + sb.append(", windowType=").append(String.valueOf(this.windowType)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExecutionWindow)) { + return false; + } + + ExecutionWindow other = (ExecutionWindow) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.executionResourceId, other.executionResourceId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleSubstate, other.lifecycleSubstate) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeEnded, other.timeEnded) + && java.util.Objects.equals(this.timeScheduled, other.timeScheduled) + && java.util.Objects.equals(this.windowDurationInMins, other.windowDurationInMins) + && java.util.Objects.equals(this.isEnforcedDuration, other.isEnforcedDuration) + && java.util.Objects.equals(this.estimatedTimeInMins, other.estimatedTimeInMins) + && java.util.Objects.equals(this.totalTimeTakenInMins, other.totalTimeTakenInMins) + && java.util.Objects.equals(this.windowType, other.windowType) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.executionResourceId == null + ? 43 + : this.executionResourceId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleSubstate == null ? 43 : this.lifecycleSubstate.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeEnded == null ? 43 : this.timeEnded.hashCode()); + result = + (result * PRIME) + + (this.timeScheduled == null ? 43 : this.timeScheduled.hashCode()); + result = + (result * PRIME) + + (this.windowDurationInMins == null + ? 43 + : this.windowDurationInMins.hashCode()); + result = + (result * PRIME) + + (this.isEnforcedDuration == null + ? 43 + : this.isEnforcedDuration.hashCode()); + result = + (result * PRIME) + + (this.estimatedTimeInMins == null + ? 43 + : this.estimatedTimeInMins.hashCode()); + result = + (result * PRIME) + + (this.totalTimeTakenInMins == null + ? 43 + : this.totalTimeTakenInMins.hashCode()); + result = (result * PRIME) + (this.windowType == null ? 43 : this.windowType.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExecutionWindowSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExecutionWindowSummary.java new file mode 100644 index 00000000000..255627b1ce1 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExecutionWindowSummary.java @@ -0,0 +1,1131 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of an execution window. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExecutionWindowSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExecutionWindowSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "executionResourceId", + "compartmentId", + "displayName", + "description", + "lifecycleState", + "lifecycleSubstate", + "lifecycleDetails", + "timeCreated", + "timeUpdated", + "timeStarted", + "timeEnded", + "timeScheduled", + "windowDurationInMins", + "isEnforcedDuration", + "estimatedTimeInMins", + "totalTimeTakenInMins", + "windowType", + "freeformTags", + "definedTags" + }) + public ExecutionWindowSummary( + String id, + String executionResourceId, + String compartmentId, + String displayName, + String description, + LifecycleState lifecycleState, + LifecycleSubstate lifecycleSubstate, + String lifecycleDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.Date timeStarted, + java.util.Date timeEnded, + java.util.Date timeScheduled, + Integer windowDurationInMins, + Boolean isEnforcedDuration, + Integer estimatedTimeInMins, + Integer totalTimeTakenInMins, + WindowType windowType, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.id = id; + this.executionResourceId = executionResourceId; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.description = description; + this.lifecycleState = lifecycleState; + this.lifecycleSubstate = lifecycleSubstate; + this.lifecycleDetails = lifecycleDetails; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.timeStarted = timeStarted; + this.timeEnded = timeEnded; + this.timeScheduled = timeScheduled; + this.windowDurationInMins = windowDurationInMins; + this.isEnforcedDuration = isEnforcedDuration; + this.estimatedTimeInMins = estimatedTimeInMins; + this.totalTimeTakenInMins = totalTimeTakenInMins; + this.windowType = windowType; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution resource the execution window belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionResourceId") + private String executionResourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution resource the execution window belongs to. + * @param executionResourceId the value to set + * @return this builder + **/ + public Builder executionResourceId(String executionResourceId) { + this.executionResourceId = executionResourceId; + this.__explicitlySet__.add("executionResourceId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The user-friendly name for the execution window. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the execution window. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Description of the execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the execution window. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The current state of the Schedule Policy. Valid states are CREATED, SCHEDULED, IN_PROGRESS, FAILED, CANCELED, + * UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Schedule Policy. Valid states are CREATED, SCHEDULED, IN_PROGRESS, FAILED, CANCELED, + * UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS. + * + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The current sub-state of the execution window. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleSubstate") + private LifecycleSubstate lifecycleSubstate; + + /** + * The current sub-state of the execution window. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING. + * + * @param lifecycleSubstate the value to set + * @return this builder + **/ + public Builder lifecycleSubstate(LifecycleSubstate lifecycleSubstate) { + this.lifecycleSubstate = lifecycleSubstate; + this.__explicitlySet__.add("lifecycleSubstate"); + return this; + } + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The date and time the execution window was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the execution window was created. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The last date and time that the execution window was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The last date and time that the execution window was updated. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The date and time that the execution window was started. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The date and time that the execution window was started. + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The date and time that the execution window ended. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + private java.util.Date timeEnded; + + /** + * The date and time that the execution window ended. + * @param timeEnded the value to set + * @return this builder + **/ + public Builder timeEnded(java.util.Date timeEnded) { + this.timeEnded = timeEnded; + this.__explicitlySet__.add("timeEnded"); + return this; + } + /** + * The scheduled start date and time of the execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduled") + private java.util.Date timeScheduled; + + /** + * The scheduled start date and time of the execution window. + * @param timeScheduled the value to set + * @return this builder + **/ + public Builder timeScheduled(java.util.Date timeScheduled) { + this.timeScheduled = timeScheduled; + this.__explicitlySet__.add("timeScheduled"); + return this; + } + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("windowDurationInMins") + private Integer windowDurationInMins; + + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + * @param windowDurationInMins the value to set + * @return this builder + **/ + public Builder windowDurationInMins(Integer windowDurationInMins) { + this.windowDurationInMins = windowDurationInMins; + this.__explicitlySet__.add("windowDurationInMins"); + return this; + } + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnforcedDuration") + private Boolean isEnforcedDuration; + + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + * @param isEnforcedDuration the value to set + * @return this builder + **/ + public Builder isEnforcedDuration(Boolean isEnforcedDuration) { + this.isEnforcedDuration = isEnforcedDuration; + this.__explicitlySet__.add("isEnforcedDuration"); + return this; + } + /** + * The estimated time of the execution window in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private Integer estimatedTimeInMins; + + /** + * The estimated time of the execution window in minutes. + * @param estimatedTimeInMins the value to set + * @return this builder + **/ + public Builder estimatedTimeInMins(Integer estimatedTimeInMins) { + this.estimatedTimeInMins = estimatedTimeInMins; + this.__explicitlySet__.add("estimatedTimeInMins"); + return this; + } + /** + * The total time taken by corresponding resource activity in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalTimeTakenInMins") + private Integer totalTimeTakenInMins; + + /** + * The total time taken by corresponding resource activity in minutes. + * @param totalTimeTakenInMins the value to set + * @return this builder + **/ + public Builder totalTimeTakenInMins(Integer totalTimeTakenInMins) { + this.totalTimeTakenInMins = totalTimeTakenInMins; + this.__explicitlySet__.add("totalTimeTakenInMins"); + return this; + } + /** + * The execution window is of PLANNED or UNPLANNED type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("windowType") + private WindowType windowType; + + /** + * The execution window is of PLANNED or UNPLANNED type. + * @param windowType the value to set + * @return this builder + **/ + public Builder windowType(WindowType windowType) { + this.windowType = windowType; + this.__explicitlySet__.add("windowType"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExecutionWindowSummary build() { + ExecutionWindowSummary model = + new ExecutionWindowSummary( + this.id, + this.executionResourceId, + this.compartmentId, + this.displayName, + this.description, + this.lifecycleState, + this.lifecycleSubstate, + this.lifecycleDetails, + this.timeCreated, + this.timeUpdated, + this.timeStarted, + this.timeEnded, + this.timeScheduled, + this.windowDurationInMins, + this.isEnforcedDuration, + this.estimatedTimeInMins, + this.totalTimeTakenInMins, + this.windowType, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExecutionWindowSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("executionResourceId")) { + this.executionResourceId(model.getExecutionResourceId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleSubstate")) { + this.lifecycleSubstate(model.getLifecycleSubstate()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeEnded")) { + this.timeEnded(model.getTimeEnded()); + } + if (model.wasPropertyExplicitlySet("timeScheduled")) { + this.timeScheduled(model.getTimeScheduled()); + } + if (model.wasPropertyExplicitlySet("windowDurationInMins")) { + this.windowDurationInMins(model.getWindowDurationInMins()); + } + if (model.wasPropertyExplicitlySet("isEnforcedDuration")) { + this.isEnforcedDuration(model.getIsEnforcedDuration()); + } + if (model.wasPropertyExplicitlySet("estimatedTimeInMins")) { + this.estimatedTimeInMins(model.getEstimatedTimeInMins()); + } + if (model.wasPropertyExplicitlySet("totalTimeTakenInMins")) { + this.totalTimeTakenInMins(model.getTotalTimeTakenInMins()); + } + if (model.wasPropertyExplicitlySet("windowType")) { + this.windowType(model.getWindowType()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution resource the execution window belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionResourceId") + private final String executionResourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution resource the execution window belongs to. + * @return the value + **/ + public String getExecutionResourceId() { + return executionResourceId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The user-friendly name for the execution window. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the execution window. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Description of the execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the execution window. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The current state of the Schedule Policy. Valid states are CREATED, SCHEDULED, IN_PROGRESS, FAILED, CANCELED, + * UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS. + * + **/ + public enum LifecycleState { + Created("CREATED"), + Scheduled("SCHEDULED"), + InProgress("IN_PROGRESS"), + Failed("FAILED"), + Canceled("CANCELED"), + Updating("UPDATING"), + Deleted("DELETED"), + Succeeded("SUCCEEDED"), + PartialSuccess("PARTIAL_SUCCESS"), + Creating("CREATING"), + Deleting("DELETING"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the Schedule Policy. Valid states are CREATED, SCHEDULED, IN_PROGRESS, FAILED, CANCELED, + * UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Schedule Policy. Valid states are CREATED, SCHEDULED, IN_PROGRESS, FAILED, CANCELED, + * UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS. + * + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The current sub-state of the execution window. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING. + * + **/ + public enum LifecycleSubstate { + DurationExceeded("DURATION_EXCEEDED"), + MaintenanceInProgress("MAINTENANCE_IN_PROGRESS"), + Waiting("WAITING"), + Rescheduled("RESCHEDULED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleSubstate.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleSubstate v : LifecycleSubstate.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleSubstate(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleSubstate create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleSubstate', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current sub-state of the execution window. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleSubstate") + private final LifecycleSubstate lifecycleSubstate; + + /** + * The current sub-state of the execution window. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING. + * + * @return the value + **/ + public LifecycleSubstate getLifecycleSubstate() { + return lifecycleSubstate; + } + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The date and time the execution window was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the execution window was created. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The last date and time that the execution window was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The last date and time that the execution window was updated. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The date and time that the execution window was started. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The date and time that the execution window was started. + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The date and time that the execution window ended. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + private final java.util.Date timeEnded; + + /** + * The date and time that the execution window ended. + * @return the value + **/ + public java.util.Date getTimeEnded() { + return timeEnded; + } + + /** + * The scheduled start date and time of the execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduled") + private final java.util.Date timeScheduled; + + /** + * The scheduled start date and time of the execution window. + * @return the value + **/ + public java.util.Date getTimeScheduled() { + return timeScheduled; + } + + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("windowDurationInMins") + private final Integer windowDurationInMins; + + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + * @return the value + **/ + public Integer getWindowDurationInMins() { + return windowDurationInMins; + } + + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnforcedDuration") + private final Boolean isEnforcedDuration; + + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + * @return the value + **/ + public Boolean getIsEnforcedDuration() { + return isEnforcedDuration; + } + + /** + * The estimated time of the execution window in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private final Integer estimatedTimeInMins; + + /** + * The estimated time of the execution window in minutes. + * @return the value + **/ + public Integer getEstimatedTimeInMins() { + return estimatedTimeInMins; + } + + /** + * The total time taken by corresponding resource activity in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalTimeTakenInMins") + private final Integer totalTimeTakenInMins; + + /** + * The total time taken by corresponding resource activity in minutes. + * @return the value + **/ + public Integer getTotalTimeTakenInMins() { + return totalTimeTakenInMins; + } + + /** + * The execution window is of PLANNED or UNPLANNED type. + **/ + public enum WindowType { + Planned("PLANNED"), + Unplanned("UNPLANNED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(WindowType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (WindowType v : WindowType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + WindowType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static WindowType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'WindowType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The execution window is of PLANNED or UNPLANNED type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("windowType") + private final WindowType windowType; + + /** + * The execution window is of PLANNED or UNPLANNED type. + * @return the value + **/ + public WindowType getWindowType() { + return windowType; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExecutionWindowSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", executionResourceId=").append(String.valueOf(this.executionResourceId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleSubstate=").append(String.valueOf(this.lifecycleSubstate)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeEnded=").append(String.valueOf(this.timeEnded)); + sb.append(", timeScheduled=").append(String.valueOf(this.timeScheduled)); + sb.append(", windowDurationInMins=").append(String.valueOf(this.windowDurationInMins)); + sb.append(", isEnforcedDuration=").append(String.valueOf(this.isEnforcedDuration)); + sb.append(", estimatedTimeInMins=").append(String.valueOf(this.estimatedTimeInMins)); + sb.append(", totalTimeTakenInMins=").append(String.valueOf(this.totalTimeTakenInMins)); + sb.append(", windowType=").append(String.valueOf(this.windowType)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExecutionWindowSummary)) { + return false; + } + + ExecutionWindowSummary other = (ExecutionWindowSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.executionResourceId, other.executionResourceId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleSubstate, other.lifecycleSubstate) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeEnded, other.timeEnded) + && java.util.Objects.equals(this.timeScheduled, other.timeScheduled) + && java.util.Objects.equals(this.windowDurationInMins, other.windowDurationInMins) + && java.util.Objects.equals(this.isEnforcedDuration, other.isEnforcedDuration) + && java.util.Objects.equals(this.estimatedTimeInMins, other.estimatedTimeInMins) + && java.util.Objects.equals(this.totalTimeTakenInMins, other.totalTimeTakenInMins) + && java.util.Objects.equals(this.windowType, other.windowType) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.executionResourceId == null + ? 43 + : this.executionResourceId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleSubstate == null ? 43 : this.lifecycleSubstate.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeEnded == null ? 43 : this.timeEnded.hashCode()); + result = + (result * PRIME) + + (this.timeScheduled == null ? 43 : this.timeScheduled.hashCode()); + result = + (result * PRIME) + + (this.windowDurationInMins == null + ? 43 + : this.windowDurationInMins.hashCode()); + result = + (result * PRIME) + + (this.isEnforcedDuration == null + ? 43 + : this.isEnforcedDuration.hashCode()); + result = + (result * PRIME) + + (this.estimatedTimeInMins == null + ? 43 + : this.estimatedTimeInMins.hashCode()); + result = + (result * PRIME) + + (this.totalTimeTakenInMins == null + ? 43 + : this.totalTimeTakenInMins.hashCode()); + result = (result * PRIME) + (this.windowType == null ? 43 : this.windowType.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/GiMinorVersionSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/GiMinorVersionSummary.java new file mode 100644 index 00000000000..4bbfe9508c5 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/GiMinorVersionSummary.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * The Oracle Grid Infrastructure (GI) minor version. + *

+ * To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see [Getting Started with Policies](https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm). + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = GiMinorVersionSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class GiMinorVersionSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"version", "gridImageId"}) + public GiMinorVersionSummary(String version, String gridImageId) { + super(); + this.version = version; + this.gridImageId = gridImageId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A valid Oracle Grid Infrastructure (GI) software version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * A valid Oracle Grid Infrastructure (GI) software version. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + /** + * Grid Infrastructure Image Id + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gridImageId") + private String gridImageId; + + /** + * Grid Infrastructure Image Id + * @param gridImageId the value to set + * @return this builder + **/ + public Builder gridImageId(String gridImageId) { + this.gridImageId = gridImageId; + this.__explicitlySet__.add("gridImageId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public GiMinorVersionSummary build() { + GiMinorVersionSummary model = new GiMinorVersionSummary(this.version, this.gridImageId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(GiMinorVersionSummary model) { + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + if (model.wasPropertyExplicitlySet("gridImageId")) { + this.gridImageId(model.getGridImageId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A valid Oracle Grid Infrastructure (GI) software version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * A valid Oracle Grid Infrastructure (GI) software version. + * @return the value + **/ + public String getVersion() { + return version; + } + + /** + * Grid Infrastructure Image Id + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gridImageId") + private final String gridImageId; + + /** + * Grid Infrastructure Image Id + * @return the value + **/ + public String getGridImageId() { + return gridImageId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("GiMinorVersionSummary("); + sb.append("super=").append(super.toString()); + sb.append("version=").append(String.valueOf(this.version)); + sb.append(", gridImageId=").append(String.valueOf(this.gridImageId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GiMinorVersionSummary)) { + return false; + } + + GiMinorVersionSummary other = (GiMinorVersionSummary) o; + return java.util.Objects.equals(this.version, other.version) + && java.util.Objects.equals(this.gridImageId, other.gridImageId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = (result * PRIME) + (this.gridImageId == null ? 43 : this.gridImageId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/GranularMaintenanceHistoryDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/GranularMaintenanceHistoryDetails.java new file mode 100644 index 00000000000..00249592268 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/GranularMaintenanceHistoryDetails.java @@ -0,0 +1,166 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of a granular maintenance history. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = GranularMaintenanceHistoryDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class GranularMaintenanceHistoryDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"executionWindow", "executionActions"}) + public GranularMaintenanceHistoryDetails( + ExecutionWindow executionWindow, java.util.List executionActions) { + super(); + this.executionWindow = executionWindow; + this.executionActions = executionActions; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("executionWindow") + private ExecutionWindow executionWindow; + + public Builder executionWindow(ExecutionWindow executionWindow) { + this.executionWindow = executionWindow; + this.__explicitlySet__.add("executionWindow"); + return this; + } + /** + * The list of execution actions for this granular maintenance history. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionActions") + private java.util.List executionActions; + + /** + * The list of execution actions for this granular maintenance history. + * @param executionActions the value to set + * @return this builder + **/ + public Builder executionActions(java.util.List executionActions) { + this.executionActions = executionActions; + this.__explicitlySet__.add("executionActions"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public GranularMaintenanceHistoryDetails build() { + GranularMaintenanceHistoryDetails model = + new GranularMaintenanceHistoryDetails( + this.executionWindow, this.executionActions); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(GranularMaintenanceHistoryDetails model) { + if (model.wasPropertyExplicitlySet("executionWindow")) { + this.executionWindow(model.getExecutionWindow()); + } + if (model.wasPropertyExplicitlySet("executionActions")) { + this.executionActions(model.getExecutionActions()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("executionWindow") + private final ExecutionWindow executionWindow; + + public ExecutionWindow getExecutionWindow() { + return executionWindow; + } + + /** + * The list of execution actions for this granular maintenance history. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionActions") + private final java.util.List executionActions; + + /** + * The list of execution actions for this granular maintenance history. + * @return the value + **/ + public java.util.List getExecutionActions() { + return executionActions; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("GranularMaintenanceHistoryDetails("); + sb.append("super=").append(super.toString()); + sb.append("executionWindow=").append(String.valueOf(this.executionWindow)); + sb.append(", executionActions=").append(String.valueOf(this.executionActions)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GranularMaintenanceHistoryDetails)) { + return false; + } + + GranularMaintenanceHistoryDetails other = (GranularMaintenanceHistoryDetails) o; + return java.util.Objects.equals(this.executionWindow, other.executionWindow) + && java.util.Objects.equals(this.executionActions, other.executionActions) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.executionWindow == null ? 43 : this.executionWindow.hashCode()); + result = + (result * PRIME) + + (this.executionActions == null ? 43 : this.executionActions.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/KeyStore.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/KeyStore.java index 4f73a405d11..999e954e823 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/KeyStore.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/KeyStore.java @@ -357,6 +357,7 @@ public java.util.Date getTimeCreated() { public enum LifecycleState { Active("ACTIVE"), Deleted("DELETED"), + NeedsAttention("NEEDS_ATTENTION"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/KeyStoreSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/KeyStoreSummary.java index 1fb0c67d1a2..80b32f3faa6 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/KeyStoreSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/KeyStoreSummary.java @@ -357,6 +357,7 @@ public java.util.Date getTimeCreated() { public enum LifecycleState { Active("ACTIVE"), Deleted("DELETED"), + NeedsAttention("NEEDS_ATTENTION"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemBase.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemBase.java index e0ae3a99867..95522fc4315 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemBase.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemBase.java @@ -71,6 +71,7 @@ public class LaunchDbSystemBase extends com.oracle.bmc.http.internal.ExplicitlyS "nodeCount", "freeformTags", "definedTags", + "securityAttributes", "privateIp", "dataCollectionOptions" }) @@ -100,6 +101,7 @@ protected LaunchDbSystemBase( Integer nodeCount, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateIp, DataCollectionOptions dataCollectionOptions) { super(); @@ -128,6 +130,7 @@ protected LaunchDbSystemBase( this.nodeCount = nodeCount; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.privateIp = privateIp; this.dataCollectionOptions = dataCollectionOptions; } @@ -667,6 +670,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * A private IP address of your choice. Must be an available IP address within the subnet's CIDR. * If you don't specify a value, Oracle automatically assigns a private IP address from the subnet. @@ -733,6 +756,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", nodeCount=").append(String.valueOf(this.nodeCount)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(", dataCollectionOptions=").append(String.valueOf(this.dataCollectionOptions)); sb.append(")"); @@ -776,6 +800,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.nodeCount, other.nodeCount) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.privateIp, other.privateIp) && java.util.Objects.equals(this.dataCollectionOptions, other.dataCollectionOptions) && super.equals(other); @@ -842,6 +867,11 @@ public int hashCode() { result = (result * PRIME) + (this.nodeCount == null ? 43 : this.nodeCount.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); result = (result * PRIME) diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemDetails.java index f7242f7fea5..2f0e850ad8b 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemDetails.java @@ -255,6 +255,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateIp") private String privateIp; @@ -382,6 +392,7 @@ public LaunchDbSystemDetails build() { this.nodeCount, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateIp, this.dataCollectionOptions, this.dbHome, @@ -472,6 +483,9 @@ public Builder copy(LaunchDbSystemDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } @@ -535,6 +549,7 @@ public LaunchDbSystemDetails( Integer nodeCount, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateIp, DataCollectionOptions dataCollectionOptions, CreateDbHomeDetails dbHome, @@ -568,6 +583,7 @@ public LaunchDbSystemDetails( nodeCount, freeformTags, definedTags, + securityAttributes, privateIp, dataCollectionOptions); this.dbHome = dbHome; diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromBackupDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromBackupDetails.java index 68a5523c41f..c81e1339a95 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromBackupDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromBackupDetails.java @@ -255,6 +255,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateIp") private String privateIp; @@ -373,6 +383,7 @@ public LaunchDbSystemFromBackupDetails build() { this.nodeCount, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateIp, this.dataCollectionOptions, this.dbHome, @@ -462,6 +473,9 @@ public Builder copy(LaunchDbSystemFromBackupDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } @@ -522,6 +536,7 @@ public LaunchDbSystemFromBackupDetails( Integer nodeCount, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateIp, DataCollectionOptions dataCollectionOptions, CreateDbHomeFromBackupDetails dbHome, @@ -554,6 +569,7 @@ public LaunchDbSystemFromBackupDetails( nodeCount, freeformTags, definedTags, + securityAttributes, privateIp, dataCollectionOptions); this.dbHome = dbHome; diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromDatabaseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromDatabaseDetails.java index 77c2e248a66..75d671f95f6 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromDatabaseDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromDatabaseDetails.java @@ -255,6 +255,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateIp") private String privateIp; @@ -373,6 +383,7 @@ public LaunchDbSystemFromDatabaseDetails build() { this.nodeCount, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateIp, this.dataCollectionOptions, this.dbHome, @@ -462,6 +473,9 @@ public Builder copy(LaunchDbSystemFromDatabaseDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } @@ -522,6 +536,7 @@ public LaunchDbSystemFromDatabaseDetails( Integer nodeCount, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateIp, DataCollectionOptions dataCollectionOptions, CreateDbHomeFromDatabaseDetails dbHome, @@ -554,6 +569,7 @@ public LaunchDbSystemFromDatabaseDetails( nodeCount, freeformTags, definedTags, + securityAttributes, privateIp, dataCollectionOptions); this.dbHome = dbHome; diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromDbSystemDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromDbSystemDetails.java index 13ce8931c37..2c9bc797beb 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromDbSystemDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromDbSystemDetails.java @@ -255,6 +255,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateIp") private String privateIp; @@ -347,6 +357,7 @@ public LaunchDbSystemFromDbSystemDetails build() { this.nodeCount, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateIp, this.dataCollectionOptions, this.sourceDbSystemId, @@ -435,6 +446,9 @@ public Builder copy(LaunchDbSystemFromDbSystemDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } @@ -492,6 +506,7 @@ public LaunchDbSystemFromDbSystemDetails( Integer nodeCount, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateIp, DataCollectionOptions dataCollectionOptions, String sourceDbSystemId, @@ -523,6 +538,7 @@ public LaunchDbSystemFromDbSystemDetails( nodeCount, freeformTags, definedTags, + securityAttributes, privateIp, dataCollectionOptions); this.sourceDbSystemId = sourceDbSystemId; diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRun.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRun.java index 9cfdad7cdac..e0206e6536a 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRun.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRun.java @@ -49,7 +49,10 @@ public final class MaintenanceRun extends com.oracle.bmc.http.internal.Explicitl "patchingEndTime", "estimatedPatchingTime", "currentPatchingComponent", - "estimatedComponentPatchingStartTime" + "estimatedComponentPatchingStartTime", + "isMaintenanceRunGranular", + "totalTimeTakenInMins", + "databaseSoftwareImageId" }) public MaintenanceRun( String id, @@ -80,7 +83,10 @@ public MaintenanceRun( java.util.Date patchingEndTime, EstimatedPatchingTime estimatedPatchingTime, String currentPatchingComponent, - java.util.Date estimatedComponentPatchingStartTime) { + java.util.Date estimatedComponentPatchingStartTime, + Boolean isMaintenanceRunGranular, + Integer totalTimeTakenInMins, + String databaseSoftwareImageId) { super(); this.id = id; this.compartmentId = compartmentId; @@ -111,6 +117,9 @@ public MaintenanceRun( this.estimatedPatchingTime = estimatedPatchingTime; this.currentPatchingComponent = currentPatchingComponent; this.estimatedComponentPatchingStartTime = estimatedComponentPatchingStartTime; + this.isMaintenanceRunGranular = isMaintenanceRunGranular; + this.totalTimeTakenInMins = totalTimeTakenInMins; + this.databaseSoftwareImageId = databaseSoftwareImageId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -585,6 +594,54 @@ public Builder estimatedComponentPatchingStartTime( this.__explicitlySet__.add("estimatedComponentPatchingStartTime"); return this; } + /** + * If {@code FALSE}, the maintenance run doesn't support granular maintenance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMaintenanceRunGranular") + private Boolean isMaintenanceRunGranular; + + /** + * If {@code FALSE}, the maintenance run doesn't support granular maintenance. + * @param isMaintenanceRunGranular the value to set + * @return this builder + **/ + public Builder isMaintenanceRunGranular(Boolean isMaintenanceRunGranular) { + this.isMaintenanceRunGranular = isMaintenanceRunGranular; + this.__explicitlySet__.add("isMaintenanceRunGranular"); + return this; + } + /** + * The total time taken by corresponding resource activity in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalTimeTakenInMins") + private Integer totalTimeTakenInMins; + + /** + * The total time taken by corresponding resource activity in minutes. + * @param totalTimeTakenInMins the value to set + * @return this builder + **/ + public Builder totalTimeTakenInMins(Integer totalTimeTakenInMins) { + this.totalTimeTakenInMins = totalTimeTakenInMins; + this.__explicitlySet__.add("totalTimeTakenInMins"); + return this; + } + /** + * The Autonomous Database Software Image [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseSoftwareImageId") + private String databaseSoftwareImageId; + + /** + * The Autonomous Database Software Image [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) + * @param databaseSoftwareImageId the value to set + * @return this builder + **/ + public Builder databaseSoftwareImageId(String databaseSoftwareImageId) { + this.databaseSoftwareImageId = databaseSoftwareImageId; + this.__explicitlySet__.add("databaseSoftwareImageId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -620,7 +677,10 @@ public MaintenanceRun build() { this.patchingEndTime, this.estimatedPatchingTime, this.currentPatchingComponent, - this.estimatedComponentPatchingStartTime); + this.estimatedComponentPatchingStartTime, + this.isMaintenanceRunGranular, + this.totalTimeTakenInMins, + this.databaseSoftwareImageId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -717,6 +777,15 @@ public Builder copy(MaintenanceRun model) { this.estimatedComponentPatchingStartTime( model.getEstimatedComponentPatchingStartTime()); } + if (model.wasPropertyExplicitlySet("isMaintenanceRunGranular")) { + this.isMaintenanceRunGranular(model.getIsMaintenanceRunGranular()); + } + if (model.wasPropertyExplicitlySet("totalTimeTakenInMins")) { + this.totalTimeTakenInMins(model.getTotalTimeTakenInMins()); + } + if (model.wasPropertyExplicitlySet("databaseSoftwareImageId")) { + this.databaseSoftwareImageId(model.getDatabaseSoftwareImageId()); + } return this; } } @@ -1086,6 +1155,7 @@ public enum MaintenanceSubtype { Oneoff("ONEOFF"), SecurityMonthly("SECURITY_MONTHLY"), Timezone("TIMEZONE"), + CustomDatabaseSoftwareImage("CUSTOM_DATABASE_SOFTWARE_IMAGE"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -1455,6 +1525,48 @@ public java.util.Date getEstimatedComponentPatchingStartTime() { return estimatedComponentPatchingStartTime; } + /** + * If {@code FALSE}, the maintenance run doesn't support granular maintenance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMaintenanceRunGranular") + private final Boolean isMaintenanceRunGranular; + + /** + * If {@code FALSE}, the maintenance run doesn't support granular maintenance. + * @return the value + **/ + public Boolean getIsMaintenanceRunGranular() { + return isMaintenanceRunGranular; + } + + /** + * The total time taken by corresponding resource activity in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalTimeTakenInMins") + private final Integer totalTimeTakenInMins; + + /** + * The total time taken by corresponding resource activity in minutes. + * @return the value + **/ + public Integer getTotalTimeTakenInMins() { + return totalTimeTakenInMins; + } + + /** + * The Autonomous Database Software Image [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseSoftwareImageId") + private final String databaseSoftwareImageId; + + /** + * The Autonomous Database Software Image [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) + * @return the value + **/ + public String getDatabaseSoftwareImageId() { + return databaseSoftwareImageId; + } + @Override public String toString() { return this.toString(true); @@ -1504,6 +1616,11 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.currentPatchingComponent)); sb.append(", estimatedComponentPatchingStartTime=") .append(String.valueOf(this.estimatedComponentPatchingStartTime)); + sb.append(", isMaintenanceRunGranular=") + .append(String.valueOf(this.isMaintenanceRunGranular)); + sb.append(", totalTimeTakenInMins=").append(String.valueOf(this.totalTimeTakenInMins)); + sb.append(", databaseSoftwareImageId=") + .append(String.valueOf(this.databaseSoftwareImageId)); sb.append(")"); return sb.toString(); } @@ -1556,6 +1673,11 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.estimatedComponentPatchingStartTime, other.estimatedComponentPatchingStartTime) + && java.util.Objects.equals( + this.isMaintenanceRunGranular, other.isMaintenanceRunGranular) + && java.util.Objects.equals(this.totalTimeTakenInMins, other.totalTimeTakenInMins) + && java.util.Objects.equals( + this.databaseSoftwareImageId, other.databaseSoftwareImageId) && super.equals(other); } @@ -1660,6 +1782,21 @@ public int hashCode() { + (this.estimatedComponentPatchingStartTime == null ? 43 : this.estimatedComponentPatchingStartTime.hashCode()); + result = + (result * PRIME) + + (this.isMaintenanceRunGranular == null + ? 43 + : this.isMaintenanceRunGranular.hashCode()); + result = + (result * PRIME) + + (this.totalTimeTakenInMins == null + ? 43 + : this.totalTimeTakenInMins.hashCode()); + result = + (result * PRIME) + + (this.databaseSoftwareImageId == null + ? 43 + : this.databaseSoftwareImageId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRunHistory.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRunHistory.java index a3928376c0d..e584b1fb77d 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRunHistory.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRunHistory.java @@ -23,15 +23,25 @@ public final class MaintenanceRunHistory extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"id", "maintenanceRunDetails", "dbServersHistoryDetails"}) + @java.beans.ConstructorProperties({ + "id", + "maintenanceRunDetails", + "dbServersHistoryDetails", + "currentExecutionWindow", + "granularMaintenanceHistory" + }) public MaintenanceRunHistory( String id, MaintenanceRunSummary maintenanceRunDetails, - java.util.List dbServersHistoryDetails) { + java.util.List dbServersHistoryDetails, + String currentExecutionWindow, + java.util.List granularMaintenanceHistory) { super(); this.id = id; this.maintenanceRunDetails = maintenanceRunDetails; this.dbServersHistoryDetails = dbServersHistoryDetails; + this.currentExecutionWindow = currentExecutionWindow; + this.granularMaintenanceHistory = granularMaintenanceHistory; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -78,6 +88,39 @@ public Builder dbServersHistoryDetails( this.__explicitlySet__.add("dbServersHistoryDetails"); return this; } + /** + * The OCID of the current execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("currentExecutionWindow") + private String currentExecutionWindow; + + /** + * The OCID of the current execution window. + * @param currentExecutionWindow the value to set + * @return this builder + **/ + public Builder currentExecutionWindow(String currentExecutionWindow) { + this.currentExecutionWindow = currentExecutionWindow; + this.__explicitlySet__.add("currentExecutionWindow"); + return this; + } + /** + * The list of granular maintenance history details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("granularMaintenanceHistory") + private java.util.List granularMaintenanceHistory; + + /** + * The list of granular maintenance history details. + * @param granularMaintenanceHistory the value to set + * @return this builder + **/ + public Builder granularMaintenanceHistory( + java.util.List granularMaintenanceHistory) { + this.granularMaintenanceHistory = granularMaintenanceHistory; + this.__explicitlySet__.add("granularMaintenanceHistory"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -85,7 +128,11 @@ public Builder dbServersHistoryDetails( public MaintenanceRunHistory build() { MaintenanceRunHistory model = new MaintenanceRunHistory( - this.id, this.maintenanceRunDetails, this.dbServersHistoryDetails); + this.id, + this.maintenanceRunDetails, + this.dbServersHistoryDetails, + this.currentExecutionWindow, + this.granularMaintenanceHistory); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -103,6 +150,12 @@ public Builder copy(MaintenanceRunHistory model) { if (model.wasPropertyExplicitlySet("dbServersHistoryDetails")) { this.dbServersHistoryDetails(model.getDbServersHistoryDetails()); } + if (model.wasPropertyExplicitlySet("currentExecutionWindow")) { + this.currentExecutionWindow(model.getCurrentExecutionWindow()); + } + if (model.wasPropertyExplicitlySet("granularMaintenanceHistory")) { + this.granularMaintenanceHistory(model.getGranularMaintenanceHistory()); + } return this; } } @@ -153,6 +206,34 @@ public java.util.List getDbServersHistoryDetails() { return dbServersHistoryDetails; } + /** + * The OCID of the current execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("currentExecutionWindow") + private final String currentExecutionWindow; + + /** + * The OCID of the current execution window. + * @return the value + **/ + public String getCurrentExecutionWindow() { + return currentExecutionWindow; + } + + /** + * The list of granular maintenance history details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("granularMaintenanceHistory") + private final java.util.List granularMaintenanceHistory; + + /** + * The list of granular maintenance history details. + * @return the value + **/ + public java.util.List getGranularMaintenanceHistory() { + return granularMaintenanceHistory; + } + @Override public String toString() { return this.toString(true); @@ -171,6 +252,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", maintenanceRunDetails=").append(String.valueOf(this.maintenanceRunDetails)); sb.append(", dbServersHistoryDetails=") .append(String.valueOf(this.dbServersHistoryDetails)); + sb.append(", currentExecutionWindow=").append(String.valueOf(this.currentExecutionWindow)); + sb.append(", granularMaintenanceHistory=") + .append(String.valueOf(this.granularMaintenanceHistory)); sb.append(")"); return sb.toString(); } @@ -189,6 +273,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.maintenanceRunDetails, other.maintenanceRunDetails) && java.util.Objects.equals( this.dbServersHistoryDetails, other.dbServersHistoryDetails) + && java.util.Objects.equals( + this.currentExecutionWindow, other.currentExecutionWindow) + && java.util.Objects.equals( + this.granularMaintenanceHistory, other.granularMaintenanceHistory) && super.equals(other); } @@ -207,6 +295,16 @@ public int hashCode() { + (this.dbServersHistoryDetails == null ? 43 : this.dbServersHistoryDetails.hashCode()); + result = + (result * PRIME) + + (this.currentExecutionWindow == null + ? 43 + : this.currentExecutionWindow.hashCode()); + result = + (result * PRIME) + + (this.granularMaintenanceHistory == null + ? 43 + : this.granularMaintenanceHistory.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRunHistorySummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRunHistorySummary.java index 3e33c4ec0f0..32229657d29 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRunHistorySummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRunHistorySummary.java @@ -22,15 +22,25 @@ public final class MaintenanceRunHistorySummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"id", "maintenanceRunDetails", "dbServersHistoryDetails"}) + @java.beans.ConstructorProperties({ + "id", + "maintenanceRunDetails", + "dbServersHistoryDetails", + "currentExecutionWindow", + "granularMaintenanceHistory" + }) public MaintenanceRunHistorySummary( String id, MaintenanceRunSummary maintenanceRunDetails, - java.util.List dbServersHistoryDetails) { + java.util.List dbServersHistoryDetails, + String currentExecutionWindow, + java.util.List granularMaintenanceHistory) { super(); this.id = id; this.maintenanceRunDetails = maintenanceRunDetails; this.dbServersHistoryDetails = dbServersHistoryDetails; + this.currentExecutionWindow = currentExecutionWindow; + this.granularMaintenanceHistory = granularMaintenanceHistory; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -77,6 +87,39 @@ public Builder dbServersHistoryDetails( this.__explicitlySet__.add("dbServersHistoryDetails"); return this; } + /** + * The OCID of the current execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("currentExecutionWindow") + private String currentExecutionWindow; + + /** + * The OCID of the current execution window. + * @param currentExecutionWindow the value to set + * @return this builder + **/ + public Builder currentExecutionWindow(String currentExecutionWindow) { + this.currentExecutionWindow = currentExecutionWindow; + this.__explicitlySet__.add("currentExecutionWindow"); + return this; + } + /** + * The list of granular maintenance history details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("granularMaintenanceHistory") + private java.util.List granularMaintenanceHistory; + + /** + * The list of granular maintenance history details. + * @param granularMaintenanceHistory the value to set + * @return this builder + **/ + public Builder granularMaintenanceHistory( + java.util.List granularMaintenanceHistory) { + this.granularMaintenanceHistory = granularMaintenanceHistory; + this.__explicitlySet__.add("granularMaintenanceHistory"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -84,7 +127,11 @@ public Builder dbServersHistoryDetails( public MaintenanceRunHistorySummary build() { MaintenanceRunHistorySummary model = new MaintenanceRunHistorySummary( - this.id, this.maintenanceRunDetails, this.dbServersHistoryDetails); + this.id, + this.maintenanceRunDetails, + this.dbServersHistoryDetails, + this.currentExecutionWindow, + this.granularMaintenanceHistory); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -102,6 +149,12 @@ public Builder copy(MaintenanceRunHistorySummary model) { if (model.wasPropertyExplicitlySet("dbServersHistoryDetails")) { this.dbServersHistoryDetails(model.getDbServersHistoryDetails()); } + if (model.wasPropertyExplicitlySet("currentExecutionWindow")) { + this.currentExecutionWindow(model.getCurrentExecutionWindow()); + } + if (model.wasPropertyExplicitlySet("granularMaintenanceHistory")) { + this.granularMaintenanceHistory(model.getGranularMaintenanceHistory()); + } return this; } } @@ -152,6 +205,34 @@ public java.util.List getDbServersHistoryDetails() { return dbServersHistoryDetails; } + /** + * The OCID of the current execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("currentExecutionWindow") + private final String currentExecutionWindow; + + /** + * The OCID of the current execution window. + * @return the value + **/ + public String getCurrentExecutionWindow() { + return currentExecutionWindow; + } + + /** + * The list of granular maintenance history details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("granularMaintenanceHistory") + private final java.util.List granularMaintenanceHistory; + + /** + * The list of granular maintenance history details. + * @return the value + **/ + public java.util.List getGranularMaintenanceHistory() { + return granularMaintenanceHistory; + } + @Override public String toString() { return this.toString(true); @@ -170,6 +251,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", maintenanceRunDetails=").append(String.valueOf(this.maintenanceRunDetails)); sb.append(", dbServersHistoryDetails=") .append(String.valueOf(this.dbServersHistoryDetails)); + sb.append(", currentExecutionWindow=").append(String.valueOf(this.currentExecutionWindow)); + sb.append(", granularMaintenanceHistory=") + .append(String.valueOf(this.granularMaintenanceHistory)); sb.append(")"); return sb.toString(); } @@ -188,6 +272,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.maintenanceRunDetails, other.maintenanceRunDetails) && java.util.Objects.equals( this.dbServersHistoryDetails, other.dbServersHistoryDetails) + && java.util.Objects.equals( + this.currentExecutionWindow, other.currentExecutionWindow) + && java.util.Objects.equals( + this.granularMaintenanceHistory, other.granularMaintenanceHistory) && super.equals(other); } @@ -206,6 +294,16 @@ public int hashCode() { + (this.dbServersHistoryDetails == null ? 43 : this.dbServersHistoryDetails.hashCode()); + result = + (result * PRIME) + + (this.currentExecutionWindow == null + ? 43 + : this.currentExecutionWindow.hashCode()); + result = + (result * PRIME) + + (this.granularMaintenanceHistory == null + ? 43 + : this.granularMaintenanceHistory.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRunSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRunSummary.java index 80aa2234765..5db46f080d5 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRunSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceRunSummary.java @@ -52,7 +52,10 @@ public final class MaintenanceRunSummary "patchingEndTime", "estimatedPatchingTime", "currentPatchingComponent", - "estimatedComponentPatchingStartTime" + "estimatedComponentPatchingStartTime", + "isMaintenanceRunGranular", + "totalTimeTakenInMins", + "databaseSoftwareImageId" }) public MaintenanceRunSummary( String id, @@ -83,7 +86,10 @@ public MaintenanceRunSummary( java.util.Date patchingEndTime, EstimatedPatchingTime estimatedPatchingTime, String currentPatchingComponent, - java.util.Date estimatedComponentPatchingStartTime) { + java.util.Date estimatedComponentPatchingStartTime, + Boolean isMaintenanceRunGranular, + Integer totalTimeTakenInMins, + String databaseSoftwareImageId) { super(); this.id = id; this.compartmentId = compartmentId; @@ -114,6 +120,9 @@ public MaintenanceRunSummary( this.estimatedPatchingTime = estimatedPatchingTime; this.currentPatchingComponent = currentPatchingComponent; this.estimatedComponentPatchingStartTime = estimatedComponentPatchingStartTime; + this.isMaintenanceRunGranular = isMaintenanceRunGranular; + this.totalTimeTakenInMins = totalTimeTakenInMins; + this.databaseSoftwareImageId = databaseSoftwareImageId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -588,6 +597,54 @@ public Builder estimatedComponentPatchingStartTime( this.__explicitlySet__.add("estimatedComponentPatchingStartTime"); return this; } + /** + * If {@code FALSE}, the maintenance run doesn't support granular maintenance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMaintenanceRunGranular") + private Boolean isMaintenanceRunGranular; + + /** + * If {@code FALSE}, the maintenance run doesn't support granular maintenance. + * @param isMaintenanceRunGranular the value to set + * @return this builder + **/ + public Builder isMaintenanceRunGranular(Boolean isMaintenanceRunGranular) { + this.isMaintenanceRunGranular = isMaintenanceRunGranular; + this.__explicitlySet__.add("isMaintenanceRunGranular"); + return this; + } + /** + * The total time taken by corresponding resource activity in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalTimeTakenInMins") + private Integer totalTimeTakenInMins; + + /** + * The total time taken by corresponding resource activity in minutes. + * @param totalTimeTakenInMins the value to set + * @return this builder + **/ + public Builder totalTimeTakenInMins(Integer totalTimeTakenInMins) { + this.totalTimeTakenInMins = totalTimeTakenInMins; + this.__explicitlySet__.add("totalTimeTakenInMins"); + return this; + } + /** + * The Autonomous Database Software Image [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseSoftwareImageId") + private String databaseSoftwareImageId; + + /** + * The Autonomous Database Software Image [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) + * @param databaseSoftwareImageId the value to set + * @return this builder + **/ + public Builder databaseSoftwareImageId(String databaseSoftwareImageId) { + this.databaseSoftwareImageId = databaseSoftwareImageId; + this.__explicitlySet__.add("databaseSoftwareImageId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -623,7 +680,10 @@ public MaintenanceRunSummary build() { this.patchingEndTime, this.estimatedPatchingTime, this.currentPatchingComponent, - this.estimatedComponentPatchingStartTime); + this.estimatedComponentPatchingStartTime, + this.isMaintenanceRunGranular, + this.totalTimeTakenInMins, + this.databaseSoftwareImageId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -720,6 +780,15 @@ public Builder copy(MaintenanceRunSummary model) { this.estimatedComponentPatchingStartTime( model.getEstimatedComponentPatchingStartTime()); } + if (model.wasPropertyExplicitlySet("isMaintenanceRunGranular")) { + this.isMaintenanceRunGranular(model.getIsMaintenanceRunGranular()); + } + if (model.wasPropertyExplicitlySet("totalTimeTakenInMins")) { + this.totalTimeTakenInMins(model.getTotalTimeTakenInMins()); + } + if (model.wasPropertyExplicitlySet("databaseSoftwareImageId")) { + this.databaseSoftwareImageId(model.getDatabaseSoftwareImageId()); + } return this; } } @@ -1089,6 +1158,7 @@ public enum MaintenanceSubtype { Oneoff("ONEOFF"), SecurityMonthly("SECURITY_MONTHLY"), Timezone("TIMEZONE"), + CustomDatabaseSoftwareImage("CUSTOM_DATABASE_SOFTWARE_IMAGE"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -1458,6 +1528,48 @@ public java.util.Date getEstimatedComponentPatchingStartTime() { return estimatedComponentPatchingStartTime; } + /** + * If {@code FALSE}, the maintenance run doesn't support granular maintenance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMaintenanceRunGranular") + private final Boolean isMaintenanceRunGranular; + + /** + * If {@code FALSE}, the maintenance run doesn't support granular maintenance. + * @return the value + **/ + public Boolean getIsMaintenanceRunGranular() { + return isMaintenanceRunGranular; + } + + /** + * The total time taken by corresponding resource activity in minutes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalTimeTakenInMins") + private final Integer totalTimeTakenInMins; + + /** + * The total time taken by corresponding resource activity in minutes. + * @return the value + **/ + public Integer getTotalTimeTakenInMins() { + return totalTimeTakenInMins; + } + + /** + * The Autonomous Database Software Image [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseSoftwareImageId") + private final String databaseSoftwareImageId; + + /** + * The Autonomous Database Software Image [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) + * @return the value + **/ + public String getDatabaseSoftwareImageId() { + return databaseSoftwareImageId; + } + @Override public String toString() { return this.toString(true); @@ -1507,6 +1619,11 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.currentPatchingComponent)); sb.append(", estimatedComponentPatchingStartTime=") .append(String.valueOf(this.estimatedComponentPatchingStartTime)); + sb.append(", isMaintenanceRunGranular=") + .append(String.valueOf(this.isMaintenanceRunGranular)); + sb.append(", totalTimeTakenInMins=").append(String.valueOf(this.totalTimeTakenInMins)); + sb.append(", databaseSoftwareImageId=") + .append(String.valueOf(this.databaseSoftwareImageId)); sb.append(")"); return sb.toString(); } @@ -1559,6 +1676,11 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.estimatedComponentPatchingStartTime, other.estimatedComponentPatchingStartTime) + && java.util.Objects.equals( + this.isMaintenanceRunGranular, other.isMaintenanceRunGranular) + && java.util.Objects.equals(this.totalTimeTakenInMins, other.totalTimeTakenInMins) + && java.util.Objects.equals( + this.databaseSoftwareImageId, other.databaseSoftwareImageId) && super.equals(other); } @@ -1663,6 +1785,21 @@ public int hashCode() { + (this.estimatedComponentPatchingStartTime == null ? 43 : this.estimatedComponentPatchingStartTime.hashCode()); + result = + (result * PRIME) + + (this.isMaintenanceRunGranular == null + ? 43 + : this.isMaintenanceRunGranular.hashCode()); + result = + (result * PRIME) + + (this.totalTimeTakenInMins == null + ? 43 + : this.totalTimeTakenInMins.hashCode()); + result = + (result * PRIME) + + (this.databaseSoftwareImageId == null + ? 43 + : this.databaseSoftwareImageId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceWindow.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceWindow.java index 0cdccffed62..15babfdb46c 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceWindow.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/MaintenanceWindow.java @@ -208,15 +208,13 @@ public Builder daysOfWeek(java.util.List daysOfWeek) { return this; } /** - * The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - * - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC + * The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC **/ @com.fasterxml.jackson.annotation.JsonProperty("hoursOfDay") private java.util.List hoursOfDay; /** - * The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - * - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC + * The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC * @param hoursOfDay the value to set * @return this builder **/ @@ -563,15 +561,13 @@ public java.util.List getDaysOfWeek() { } /** - * The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - * - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC + * The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC **/ @com.fasterxml.jackson.annotation.JsonProperty("hoursOfDay") private final java.util.List hoursOfDay; /** - * The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - * - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC + * The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC * @return the value **/ public java.util.List getHoursOfDay() { diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/MoveExecutionActionMemberDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/MoveExecutionActionMemberDetails.java new file mode 100644 index 00000000000..3be740ae52d --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/MoveExecutionActionMemberDetails.java @@ -0,0 +1,343 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Request to move an execution action member to an execution action resource from another. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MoveExecutionActionMemberDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MoveExecutionActionMemberDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "sourceExecutionActionId", + "executionActionMemberId", + "executionActionMemberCount", + "freeformTags", + "definedTags" + }) + public MoveExecutionActionMemberDetails( + String sourceExecutionActionId, + String executionActionMemberId, + Integer executionActionMemberCount, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.sourceExecutionActionId = sourceExecutionActionId; + this.executionActionMemberId = executionActionMemberId; + this.executionActionMemberCount = executionActionMemberCount; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the source execution action resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceExecutionActionId") + private String sourceExecutionActionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the source execution action resource. + * @param sourceExecutionActionId the value to set + * @return this builder + **/ + public Builder sourceExecutionActionId(String sourceExecutionActionId) { + this.sourceExecutionActionId = sourceExecutionActionId; + this.__explicitlySet__.add("sourceExecutionActionId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution action member to be moved. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionActionMemberId") + private String executionActionMemberId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution action member to be moved. + * @param executionActionMemberId the value to set + * @return this builder + **/ + public Builder executionActionMemberId(String executionActionMemberId) { + this.executionActionMemberId = executionActionMemberId; + this.__explicitlySet__.add("executionActionMemberId"); + return this; + } + /** + * The number of execution action member without ocids to be moved. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionActionMemberCount") + private Integer executionActionMemberCount; + + /** + * The number of execution action member without ocids to be moved. + * @param executionActionMemberCount the value to set + * @return this builder + **/ + public Builder executionActionMemberCount(Integer executionActionMemberCount) { + this.executionActionMemberCount = executionActionMemberCount; + this.__explicitlySet__.add("executionActionMemberCount"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MoveExecutionActionMemberDetails build() { + MoveExecutionActionMemberDetails model = + new MoveExecutionActionMemberDetails( + this.sourceExecutionActionId, + this.executionActionMemberId, + this.executionActionMemberCount, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MoveExecutionActionMemberDetails model) { + if (model.wasPropertyExplicitlySet("sourceExecutionActionId")) { + this.sourceExecutionActionId(model.getSourceExecutionActionId()); + } + if (model.wasPropertyExplicitlySet("executionActionMemberId")) { + this.executionActionMemberId(model.getExecutionActionMemberId()); + } + if (model.wasPropertyExplicitlySet("executionActionMemberCount")) { + this.executionActionMemberCount(model.getExecutionActionMemberCount()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the source execution action resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceExecutionActionId") + private final String sourceExecutionActionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the source execution action resource. + * @return the value + **/ + public String getSourceExecutionActionId() { + return sourceExecutionActionId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution action member to be moved. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionActionMemberId") + private final String executionActionMemberId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution action member to be moved. + * @return the value + **/ + public String getExecutionActionMemberId() { + return executionActionMemberId; + } + + /** + * The number of execution action member without ocids to be moved. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionActionMemberCount") + private final Integer executionActionMemberCount; + + /** + * The number of execution action member without ocids to be moved. + * @return the value + **/ + public Integer getExecutionActionMemberCount() { + return executionActionMemberCount; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MoveExecutionActionMemberDetails("); + sb.append("super=").append(super.toString()); + sb.append("sourceExecutionActionId=").append(String.valueOf(this.sourceExecutionActionId)); + sb.append(", executionActionMemberId=") + .append(String.valueOf(this.executionActionMemberId)); + sb.append(", executionActionMemberCount=") + .append(String.valueOf(this.executionActionMemberCount)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MoveExecutionActionMemberDetails)) { + return false; + } + + MoveExecutionActionMemberDetails other = (MoveExecutionActionMemberDetails) o; + return java.util.Objects.equals(this.sourceExecutionActionId, other.sourceExecutionActionId) + && java.util.Objects.equals( + this.executionActionMemberId, other.executionActionMemberId) + && java.util.Objects.equals( + this.executionActionMemberCount, other.executionActionMemberCount) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.sourceExecutionActionId == null + ? 43 + : this.sourceExecutionActionId.hashCode()); + result = + (result * PRIME) + + (this.executionActionMemberId == null + ? 43 + : this.executionActionMemberId.hashCode()); + result = + (result * PRIME) + + (this.executionActionMemberCount == null + ? 43 + : this.executionActionMemberCount.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/OciKeyDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/OciKeyDetails.java new file mode 100644 index 00000000000..8aecbcd9287 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/OciKeyDetails.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details for OCI encryption key. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = OciKeyDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "provider" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OciKeyDetails extends AutonomousDatabaseEncryptionKeyDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.cloud.oracle.com/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and {@code secretId} are required for Customer Managed Keys. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.cloud.oracle.com/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and {@code secretId} are required for Customer Managed Keys. + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OciKeyDetails build() { + OciKeyDetails model = new OciKeyDetails(this.kmsKeyId, this.vaultId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OciKeyDetails model) { + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public OciKeyDetails(String kmsKeyId, String vaultId) { + super(); + this.kmsKeyId = kmsKeyId; + this.vaultId = vaultId; + } + + /** + * The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.cloud.oracle.com/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and {@code secretId} are required for Customer Managed Keys. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.cloud.oracle.com/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and {@code secretId} are required for Customer Managed Keys. + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OciKeyDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OciKeyDetails)) { + return false; + } + + OciKeyDetails other = (OciKeyDetails) o; + return java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/OciProviderSetKeyVersionDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/OciProviderSetKeyVersionDetails.java new file mode 100644 index 00000000000..a134510da68 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/OciProviderSetKeyVersionDetails.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Used for setting KMS key versions + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OciProviderSetKeyVersionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "provider" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OciProviderSetKeyVersionDetails extends SetKeyVersionDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OciProviderSetKeyVersionDetails build() { + OciProviderSetKeyVersionDetails model = + new OciProviderSetKeyVersionDetails(this.kmsKeyVersionId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OciProviderSetKeyVersionDetails model) { + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public OciProviderSetKeyVersionDetails(String kmsKeyVersionId) { + super(); + this.kmsKeyVersionId = kmsKeyVersionId; + } + + /** + * The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OciProviderSetKeyVersionDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OciProviderSetKeyVersionDetails)) { + return false; + } + + OciProviderSetKeyVersionDetails other = (OciProviderSetKeyVersionDetails) o; + return java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/OkvKeyDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/OkvKeyDetails.java new file mode 100644 index 00000000000..160743f5a5f --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/OkvKeyDetails.java @@ -0,0 +1,305 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details for OKV encryption key. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = OkvKeyDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "provider" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OkvKeyDetails extends AutonomousDatabaseEncryptionKeyDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * URI of OKV server + **/ + @com.fasterxml.jackson.annotation.JsonProperty("okvUri") + private String okvUri; + + /** + * URI of OKV server + * @param okvUri the value to set + * @return this builder + **/ + public Builder okvUri(String okvUri) { + this.okvUri = okvUri; + this.__explicitlySet__.add("okvUri"); + return this; + } + /** + * UUID of OKV KMS Key + **/ + @com.fasterxml.jackson.annotation.JsonProperty("okvKmsKey") + private String okvKmsKey; + + /** + * UUID of OKV KMS Key + * @param okvKmsKey the value to set + * @return this builder + **/ + public Builder okvKmsKey(String okvKmsKey) { + this.okvKmsKey = okvKmsKey; + this.__explicitlySet__.add("okvKmsKey"); + return this; + } + /** + * OKV wallet directory name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("directoryName") + private String directoryName; + + /** + * OKV wallet directory name + * @param directoryName the value to set + * @return this builder + **/ + public Builder directoryName(String directoryName) { + this.directoryName = directoryName; + this.__explicitlySet__.add("directoryName"); + return this; + } + /** + * OKV certificate directory name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("certificateDirectoryName") + private String certificateDirectoryName; + + /** + * OKV certificate directory name + * @param certificateDirectoryName the value to set + * @return this builder + **/ + public Builder certificateDirectoryName(String certificateDirectoryName) { + this.certificateDirectoryName = certificateDirectoryName; + this.__explicitlySet__.add("certificateDirectoryName"); + return this; + } + /** + * OKV certificate id + **/ + @com.fasterxml.jackson.annotation.JsonProperty("certificateId") + private String certificateId; + + /** + * OKV certificate id + * @param certificateId the value to set + * @return this builder + **/ + public Builder certificateId(String certificateId) { + this.certificateId = certificateId; + this.__explicitlySet__.add("certificateId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OkvKeyDetails build() { + OkvKeyDetails model = + new OkvKeyDetails( + this.okvUri, + this.okvKmsKey, + this.directoryName, + this.certificateDirectoryName, + this.certificateId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OkvKeyDetails model) { + if (model.wasPropertyExplicitlySet("okvUri")) { + this.okvUri(model.getOkvUri()); + } + if (model.wasPropertyExplicitlySet("okvKmsKey")) { + this.okvKmsKey(model.getOkvKmsKey()); + } + if (model.wasPropertyExplicitlySet("directoryName")) { + this.directoryName(model.getDirectoryName()); + } + if (model.wasPropertyExplicitlySet("certificateDirectoryName")) { + this.certificateDirectoryName(model.getCertificateDirectoryName()); + } + if (model.wasPropertyExplicitlySet("certificateId")) { + this.certificateId(model.getCertificateId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public OkvKeyDetails( + String okvUri, + String okvKmsKey, + String directoryName, + String certificateDirectoryName, + String certificateId) { + super(); + this.okvUri = okvUri; + this.okvKmsKey = okvKmsKey; + this.directoryName = directoryName; + this.certificateDirectoryName = certificateDirectoryName; + this.certificateId = certificateId; + } + + /** + * URI of OKV server + **/ + @com.fasterxml.jackson.annotation.JsonProperty("okvUri") + private final String okvUri; + + /** + * URI of OKV server + * @return the value + **/ + public String getOkvUri() { + return okvUri; + } + + /** + * UUID of OKV KMS Key + **/ + @com.fasterxml.jackson.annotation.JsonProperty("okvKmsKey") + private final String okvKmsKey; + + /** + * UUID of OKV KMS Key + * @return the value + **/ + public String getOkvKmsKey() { + return okvKmsKey; + } + + /** + * OKV wallet directory name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("directoryName") + private final String directoryName; + + /** + * OKV wallet directory name + * @return the value + **/ + public String getDirectoryName() { + return directoryName; + } + + /** + * OKV certificate directory name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("certificateDirectoryName") + private final String certificateDirectoryName; + + /** + * OKV certificate directory name + * @return the value + **/ + public String getCertificateDirectoryName() { + return certificateDirectoryName; + } + + /** + * OKV certificate id + **/ + @com.fasterxml.jackson.annotation.JsonProperty("certificateId") + private final String certificateId; + + /** + * OKV certificate id + * @return the value + **/ + public String getCertificateId() { + return certificateId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OkvKeyDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", okvUri=").append(String.valueOf(this.okvUri)); + sb.append(", okvKmsKey=").append(String.valueOf(this.okvKmsKey)); + sb.append(", directoryName=").append(String.valueOf(this.directoryName)); + sb.append(", certificateDirectoryName=") + .append(String.valueOf(this.certificateDirectoryName)); + sb.append(", certificateId=").append(String.valueOf(this.certificateId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OkvKeyDetails)) { + return false; + } + + OkvKeyDetails other = (OkvKeyDetails) o; + return java.util.Objects.equals(this.okvUri, other.okvUri) + && java.util.Objects.equals(this.okvKmsKey, other.okvKmsKey) + && java.util.Objects.equals(this.directoryName, other.directoryName) + && java.util.Objects.equals( + this.certificateDirectoryName, other.certificateDirectoryName) + && java.util.Objects.equals(this.certificateId, other.certificateId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.okvUri == null ? 43 : this.okvUri.hashCode()); + result = (result * PRIME) + (this.okvKmsKey == null ? 43 : this.okvKmsKey.hashCode()); + result = + (result * PRIME) + + (this.directoryName == null ? 43 : this.directoryName.hashCode()); + result = + (result * PRIME) + + (this.certificateDirectoryName == null + ? 43 + : this.certificateDirectoryName.hashCode()); + result = + (result * PRIME) + + (this.certificateId == null ? 43 : this.certificateId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/OracleManagedKeyDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/OracleManagedKeyDetails.java new file mode 100644 index 00000000000..8c22e8f7737 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/OracleManagedKeyDetails.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details for Oracle-managed encryption key. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OracleManagedKeyDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "provider" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OracleManagedKeyDetails extends AutonomousDatabaseEncryptionKeyDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OracleManagedKeyDetails build() { + OracleManagedKeyDetails model = new OracleManagedKeyDetails(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OracleManagedKeyDetails model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public OracleManagedKeyDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OracleManagedKeyDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OracleManagedKeyDetails)) { + return false; + } + + OracleManagedKeyDetails other = (OracleManagedKeyDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/PluggableDatabase.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/PluggableDatabase.java index 97f3360133c..e1efe3145b7 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/PluggableDatabase.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/PluggableDatabase.java @@ -39,6 +39,8 @@ public final class PluggableDatabase extends com.oracle.bmc.http.internal.Explic "freeformTags", "definedTags", "pluggableDatabaseManagementConfig", + "kmsKeyId", + "kmsKeyVersionId", "refreshableCloneConfig", "pdbNodeLevelDetails" }) @@ -56,6 +58,8 @@ public PluggableDatabase( java.util.Map freeformTags, java.util.Map> definedTags, PluggableDatabaseManagementConfig pluggableDatabaseManagementConfig, + String kmsKeyId, + String kmsKeyVersionId, PluggableDatabaseRefreshableCloneConfig refreshableCloneConfig, java.util.List pdbNodeLevelDetails) { super(); @@ -72,6 +76,8 @@ public PluggableDatabase( this.freeformTags = freeformTags; this.definedTags = definedTags; this.pluggableDatabaseManagementConfig = pluggableDatabaseManagementConfig; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; this.refreshableCloneConfig = refreshableCloneConfig; this.pdbNodeLevelDetails = pdbNodeLevelDetails; } @@ -294,6 +300,40 @@ public Builder pluggableDatabaseManagementConfig( this.__explicitlySet__.add("pluggableDatabaseManagementConfig"); return this; } + /** + * The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("refreshableCloneConfig") private PluggableDatabaseRefreshableCloneConfig refreshableCloneConfig; @@ -345,6 +385,8 @@ public PluggableDatabase build() { this.freeformTags, this.definedTags, this.pluggableDatabaseManagementConfig, + this.kmsKeyId, + this.kmsKeyVersionId, this.refreshableCloneConfig, this.pdbNodeLevelDetails); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -395,6 +437,12 @@ public Builder copy(PluggableDatabase model) { this.pluggableDatabaseManagementConfig( model.getPluggableDatabaseManagementConfig()); } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } if (model.wasPropertyExplicitlySet("refreshableCloneConfig")) { this.refreshableCloneConfig(model.getRefreshableCloneConfig()); } @@ -715,6 +763,36 @@ public PluggableDatabaseManagementConfig getPluggableDatabaseManagementConfig() return pluggableDatabaseManagementConfig; } + /** + * The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + @com.fasterxml.jackson.annotation.JsonProperty("refreshableCloneConfig") private final PluggableDatabaseRefreshableCloneConfig refreshableCloneConfig; @@ -768,6 +846,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", pluggableDatabaseManagementConfig=") .append(String.valueOf(this.pluggableDatabaseManagementConfig)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); sb.append(", refreshableCloneConfig=").append(String.valueOf(this.refreshableCloneConfig)); sb.append(", pdbNodeLevelDetails=").append(String.valueOf(this.pdbNodeLevelDetails)); sb.append(")"); @@ -799,6 +879,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.pluggableDatabaseManagementConfig, other.pluggableDatabaseManagementConfig) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) && java.util.Objects.equals( this.refreshableCloneConfig, other.refreshableCloneConfig) && java.util.Objects.equals(this.pdbNodeLevelDetails, other.pdbNodeLevelDetails) @@ -838,6 +920,10 @@ public int hashCode() { + (this.pluggableDatabaseManagementConfig == null ? 43 : this.pluggableDatabaseManagementConfig.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); result = (result * PRIME) + (this.refreshableCloneConfig == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/PluggableDatabaseSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/PluggableDatabaseSummary.java index 39844080fc3..49fa65c6534 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/PluggableDatabaseSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/PluggableDatabaseSummary.java @@ -40,6 +40,8 @@ public final class PluggableDatabaseSummary "freeformTags", "definedTags", "pluggableDatabaseManagementConfig", + "kmsKeyId", + "kmsKeyVersionId", "refreshableCloneConfig", "pdbNodeLevelDetails" }) @@ -57,6 +59,8 @@ public PluggableDatabaseSummary( java.util.Map freeformTags, java.util.Map> definedTags, PluggableDatabaseManagementConfig pluggableDatabaseManagementConfig, + String kmsKeyId, + String kmsKeyVersionId, PluggableDatabaseRefreshableCloneConfig refreshableCloneConfig, java.util.List pdbNodeLevelDetails) { super(); @@ -73,6 +77,8 @@ public PluggableDatabaseSummary( this.freeformTags = freeformTags; this.definedTags = definedTags; this.pluggableDatabaseManagementConfig = pluggableDatabaseManagementConfig; + this.kmsKeyId = kmsKeyId; + this.kmsKeyVersionId = kmsKeyVersionId; this.refreshableCloneConfig = refreshableCloneConfig; this.pdbNodeLevelDetails = pdbNodeLevelDetails; } @@ -295,6 +301,40 @@ public Builder pluggableDatabaseManagementConfig( this.__explicitlySet__.add("pluggableDatabaseManagementConfig"); return this; } + /** + * The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + /** + * The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @param kmsKeyId the value to set + * @return this builder + **/ + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + /** + * The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private String kmsKeyVersionId; + + /** + * The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances. + * + * @param kmsKeyVersionId the value to set + * @return this builder + **/ + public Builder kmsKeyVersionId(String kmsKeyVersionId) { + this.kmsKeyVersionId = kmsKeyVersionId; + this.__explicitlySet__.add("kmsKeyVersionId"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("refreshableCloneConfig") private PluggableDatabaseRefreshableCloneConfig refreshableCloneConfig; @@ -346,6 +386,8 @@ public PluggableDatabaseSummary build() { this.freeformTags, this.definedTags, this.pluggableDatabaseManagementConfig, + this.kmsKeyId, + this.kmsKeyVersionId, this.refreshableCloneConfig, this.pdbNodeLevelDetails); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -396,6 +438,12 @@ public Builder copy(PluggableDatabaseSummary model) { this.pluggableDatabaseManagementConfig( model.getPluggableDatabaseManagementConfig()); } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("kmsKeyVersionId")) { + this.kmsKeyVersionId(model.getKmsKeyVersionId()); + } if (model.wasPropertyExplicitlySet("refreshableCloneConfig")) { this.refreshableCloneConfig(model.getRefreshableCloneConfig()); } @@ -716,6 +764,36 @@ public PluggableDatabaseManagementConfig getPluggableDatabaseManagementConfig() return pluggableDatabaseManagementConfig; } + /** + * The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private final String kmsKeyId; + + /** + * The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * @return the value + **/ + public String getKmsKeyId() { + return kmsKeyId; + } + + /** + * The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyVersionId") + private final String kmsKeyVersionId; + + /** + * The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances. + * + * @return the value + **/ + public String getKmsKeyVersionId() { + return kmsKeyVersionId; + } + @com.fasterxml.jackson.annotation.JsonProperty("refreshableCloneConfig") private final PluggableDatabaseRefreshableCloneConfig refreshableCloneConfig; @@ -769,6 +847,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", pluggableDatabaseManagementConfig=") .append(String.valueOf(this.pluggableDatabaseManagementConfig)); + sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); + sb.append(", kmsKeyVersionId=").append(String.valueOf(this.kmsKeyVersionId)); sb.append(", refreshableCloneConfig=").append(String.valueOf(this.refreshableCloneConfig)); sb.append(", pdbNodeLevelDetails=").append(String.valueOf(this.pdbNodeLevelDetails)); sb.append(")"); @@ -800,6 +880,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.pluggableDatabaseManagementConfig, other.pluggableDatabaseManagementConfig) + && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) + && java.util.Objects.equals(this.kmsKeyVersionId, other.kmsKeyVersionId) && java.util.Objects.equals( this.refreshableCloneConfig, other.refreshableCloneConfig) && java.util.Objects.equals(this.pdbNodeLevelDetails, other.pdbNodeLevelDetails) @@ -839,6 +921,10 @@ public int hashCode() { + (this.pluggableDatabaseManagementConfig == null ? 43 : this.pluggableDatabaseManagementConfig.hashCode()); + result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.kmsKeyVersionId == null ? 43 : this.kmsKeyVersionId.hashCode()); result = (result * PRIME) + (this.refreshableCloneConfig == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/RecommendedScheduledActionSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/RecommendedScheduledActionSummary.java new file mode 100644 index 00000000000..0d58f7a8e54 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/RecommendedScheduledActionSummary.java @@ -0,0 +1,449 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of the scheduled action that is used in getRecommendedScheduledActions. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RecommendedScheduledActionSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RecommendedScheduledActionSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "actionOrder", + "actionType", + "displayName", + "schedulingWindowId", + "estimatedTimeInMins", + "actionMembers", + "actionParams" + }) + public RecommendedScheduledActionSummary( + Integer actionOrder, + ActionType actionType, + String displayName, + String schedulingWindowId, + Integer estimatedTimeInMins, + java.util.List actionMembers, + java.util.Map actionParams) { + super(); + this.actionOrder = actionOrder; + this.actionType = actionType; + this.displayName = displayName; + this.schedulingWindowId = schedulingWindowId; + this.estimatedTimeInMins = estimatedTimeInMins; + this.actionMembers = actionMembers; + this.actionParams = actionParams; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The order of the scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionOrder") + private Integer actionOrder; + + /** + * The order of the scheduled action. + * @param actionOrder the value to set + * @return this builder + **/ + public Builder actionOrder(Integer actionOrder) { + this.actionOrder = actionOrder; + this.__explicitlySet__.add("actionOrder"); + return this; + } + /** + * The type of the scheduled action being performed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + /** + * The type of the scheduled action being performed + * @param actionType the value to set + * @return this builder + **/ + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + /** + * Description of the scheduled action being performed, i.e. apply full update to DB Servers 1,2,3,4. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Description of the scheduled action being performed, i.e. apply full update to DB Servers 1,2,3,4. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The id of the scheduling window this scheduled action belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingWindowId") + private String schedulingWindowId; + + /** + * The id of the scheduling window this scheduled action belongs to. + * @param schedulingWindowId the value to set + * @return this builder + **/ + public Builder schedulingWindowId(String schedulingWindowId) { + this.schedulingWindowId = schedulingWindowId; + this.__explicitlySet__.add("schedulingWindowId"); + return this; + } + /** + * The estimated patching time in minutes for the entire scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private Integer estimatedTimeInMins; + + /** + * The estimated patching time in minutes for the entire scheduled action. + * @param estimatedTimeInMins the value to set + * @return this builder + **/ + public Builder estimatedTimeInMins(Integer estimatedTimeInMins) { + this.estimatedTimeInMins = estimatedTimeInMins; + this.__explicitlySet__.add("estimatedTimeInMins"); + return this; + } + /** + * The list of action members in a scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionMembers") + private java.util.List actionMembers; + + /** + * The list of action members in a scheduled action. + * @param actionMembers the value to set + * @return this builder + **/ + public Builder actionMembers(java.util.List actionMembers) { + this.actionMembers = actionMembers; + this.__explicitlySet__.add("actionMembers"); + return this; + } + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionParams") + private java.util.Map actionParams; + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + * @param actionParams the value to set + * @return this builder + **/ + public Builder actionParams(java.util.Map actionParams) { + this.actionParams = actionParams; + this.__explicitlySet__.add("actionParams"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RecommendedScheduledActionSummary build() { + RecommendedScheduledActionSummary model = + new RecommendedScheduledActionSummary( + this.actionOrder, + this.actionType, + this.displayName, + this.schedulingWindowId, + this.estimatedTimeInMins, + this.actionMembers, + this.actionParams); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RecommendedScheduledActionSummary model) { + if (model.wasPropertyExplicitlySet("actionOrder")) { + this.actionOrder(model.getActionOrder()); + } + if (model.wasPropertyExplicitlySet("actionType")) { + this.actionType(model.getActionType()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("schedulingWindowId")) { + this.schedulingWindowId(model.getSchedulingWindowId()); + } + if (model.wasPropertyExplicitlySet("estimatedTimeInMins")) { + this.estimatedTimeInMins(model.getEstimatedTimeInMins()); + } + if (model.wasPropertyExplicitlySet("actionMembers")) { + this.actionMembers(model.getActionMembers()); + } + if (model.wasPropertyExplicitlySet("actionParams")) { + this.actionParams(model.getActionParams()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The order of the scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionOrder") + private final Integer actionOrder; + + /** + * The order of the scheduled action. + * @return the value + **/ + public Integer getActionOrder() { + return actionOrder; + } + + /** + * The type of the scheduled action being performed + **/ + public enum ActionType { + DbServerFullSoftwareUpdate("DB_SERVER_FULL_SOFTWARE_UPDATE"), + StorageServerFullSoftwareUpdate("STORAGE_SERVER_FULL_SOFTWARE_UPDATE"), + NetworkSwitchFullSoftwareUpdate("NETWORK_SWITCH_FULL_SOFTWARE_UPDATE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ActionType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActionType v : ActionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ActionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ActionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ActionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The type of the scheduled action being performed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private final ActionType actionType; + + /** + * The type of the scheduled action being performed + * @return the value + **/ + public ActionType getActionType() { + return actionType; + } + + /** + * Description of the scheduled action being performed, i.e. apply full update to DB Servers 1,2,3,4. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Description of the scheduled action being performed, i.e. apply full update to DB Servers 1,2,3,4. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The id of the scheduling window this scheduled action belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingWindowId") + private final String schedulingWindowId; + + /** + * The id of the scheduling window this scheduled action belongs to. + * @return the value + **/ + public String getSchedulingWindowId() { + return schedulingWindowId; + } + + /** + * The estimated patching time in minutes for the entire scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private final Integer estimatedTimeInMins; + + /** + * The estimated patching time in minutes for the entire scheduled action. + * @return the value + **/ + public Integer getEstimatedTimeInMins() { + return estimatedTimeInMins; + } + + /** + * The list of action members in a scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionMembers") + private final java.util.List actionMembers; + + /** + * The list of action members in a scheduled action. + * @return the value + **/ + public java.util.List getActionMembers() { + return actionMembers; + } + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionParams") + private final java.util.Map actionParams; + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + * @return the value + **/ + public java.util.Map getActionParams() { + return actionParams; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RecommendedScheduledActionSummary("); + sb.append("super=").append(super.toString()); + sb.append("actionOrder=").append(String.valueOf(this.actionOrder)); + sb.append(", actionType=").append(String.valueOf(this.actionType)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", schedulingWindowId=").append(String.valueOf(this.schedulingWindowId)); + sb.append(", estimatedTimeInMins=").append(String.valueOf(this.estimatedTimeInMins)); + sb.append(", actionMembers=").append(String.valueOf(this.actionMembers)); + sb.append(", actionParams=").append(String.valueOf(this.actionParams)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RecommendedScheduledActionSummary)) { + return false; + } + + RecommendedScheduledActionSummary other = (RecommendedScheduledActionSummary) o; + return java.util.Objects.equals(this.actionOrder, other.actionOrder) + && java.util.Objects.equals(this.actionType, other.actionType) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.schedulingWindowId, other.schedulingWindowId) + && java.util.Objects.equals(this.estimatedTimeInMins, other.estimatedTimeInMins) + && java.util.Objects.equals(this.actionMembers, other.actionMembers) + && java.util.Objects.equals(this.actionParams, other.actionParams) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.actionOrder == null ? 43 : this.actionOrder.hashCode()); + result = (result * PRIME) + (this.actionType == null ? 43 : this.actionType.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.schedulingWindowId == null + ? 43 + : this.schedulingWindowId.hashCode()); + result = + (result * PRIME) + + (this.estimatedTimeInMins == null + ? 43 + : this.estimatedTimeInMins.hashCode()); + result = + (result * PRIME) + + (this.actionMembers == null ? 43 : this.actionMembers.hashCode()); + result = (result * PRIME) + (this.actionParams == null ? 43 : this.actionParams.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/RecommendedScheduledActionsCollection.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/RecommendedScheduledActionsCollection.java new file mode 100644 index 00000000000..3d52f110775 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/RecommendedScheduledActionsCollection.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * A list of scheduled actions. Contains RecommendedScheduledAction items. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RecommendedScheduledActionsCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RecommendedScheduledActionsCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public RecommendedScheduledActionsCollection( + java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of scheduled actions. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of scheduled actions. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RecommendedScheduledActionsCollection build() { + RecommendedScheduledActionsCollection model = + new RecommendedScheduledActionsCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RecommendedScheduledActionsCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of scheduled actions. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of scheduled actions. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RecommendedScheduledActionsCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RecommendedScheduledActionsCollection)) { + return false; + } + + RecommendedScheduledActionsCollection other = (RecommendedScheduledActionsCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/RemoveVirtualMachineFromExadbVmClusterDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/RemoveVirtualMachineFromExadbVmClusterDetails.java new file mode 100644 index 00000000000..f6e4a0804ca --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/RemoveVirtualMachineFromExadbVmClusterDetails.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RemoveVirtualMachineFromExadbVmClusterDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RemoveVirtualMachineFromExadbVmClusterDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"dbNodes"}) + public RemoveVirtualMachineFromExadbVmClusterDetails(java.util.List dbNodes) { + super(); + this.dbNodes = dbNodes; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbNodes") + private java.util.List dbNodes; + + /** + * The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + * @param dbNodes the value to set + * @return this builder + **/ + public Builder dbNodes(java.util.List dbNodes) { + this.dbNodes = dbNodes; + this.__explicitlySet__.add("dbNodes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RemoveVirtualMachineFromExadbVmClusterDetails build() { + RemoveVirtualMachineFromExadbVmClusterDetails model = + new RemoveVirtualMachineFromExadbVmClusterDetails(this.dbNodes); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RemoveVirtualMachineFromExadbVmClusterDetails model) { + if (model.wasPropertyExplicitlySet("dbNodes")) { + this.dbNodes(model.getDbNodes()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbNodes") + private final java.util.List dbNodes; + + /** + * The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + * @return the value + **/ + public java.util.List getDbNodes() { + return dbNodes; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RemoveVirtualMachineFromExadbVmClusterDetails("); + sb.append("super=").append(super.toString()); + sb.append("dbNodes=").append(String.valueOf(this.dbNodes)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveVirtualMachineFromExadbVmClusterDetails)) { + return false; + } + + RemoveVirtualMachineFromExadbVmClusterDetails other = + (RemoveVirtualMachineFromExadbVmClusterDetails) o; + return java.util.Objects.equals(this.dbNodes, other.dbNodes) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.dbNodes == null ? 43 : this.dbNodes.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ReorderExecutionActionDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ReorderExecutionActionDetails.java new file mode 100644 index 00000000000..0a643b452b0 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ReorderExecutionActionDetails.java @@ -0,0 +1,256 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Describes the ordering list of execution actions for the execution window. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ReorderExecutionActionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ReorderExecutionActionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"executionActionOrderList", "freeformTags", "definedTags"}) + public ReorderExecutionActionDetails( + java.util.List executionActionOrderList, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.executionActionOrderList = executionActionOrderList; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of action resources in a specific order. + * Example: [{actionOrder: 1, actionResourceId: "resourceId1"}, {actionOrder: 2, actionResourceId: "resourceId2"}] + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionActionOrderList") + private java.util.List executionActionOrderList; + + /** + * List of action resources in a specific order. + * Example: [{actionOrder: 1, actionResourceId: "resourceId1"}, {actionOrder: 2, actionResourceId: "resourceId2"}] + * + * @param executionActionOrderList the value to set + * @return this builder + **/ + public Builder executionActionOrderList( + java.util.List executionActionOrderList) { + this.executionActionOrderList = executionActionOrderList; + this.__explicitlySet__.add("executionActionOrderList"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ReorderExecutionActionDetails build() { + ReorderExecutionActionDetails model = + new ReorderExecutionActionDetails( + this.executionActionOrderList, this.freeformTags, this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ReorderExecutionActionDetails model) { + if (model.wasPropertyExplicitlySet("executionActionOrderList")) { + this.executionActionOrderList(model.getExecutionActionOrderList()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of action resources in a specific order. + * Example: [{actionOrder: 1, actionResourceId: "resourceId1"}, {actionOrder: 2, actionResourceId: "resourceId2"}] + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionActionOrderList") + private final java.util.List executionActionOrderList; + + /** + * List of action resources in a specific order. + * Example: [{actionOrder: 1, actionResourceId: "resourceId1"}, {actionOrder: 2, actionResourceId: "resourceId2"}] + * + * @return the value + **/ + public java.util.List getExecutionActionOrderList() { + return executionActionOrderList; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ReorderExecutionActionDetails("); + sb.append("super=").append(super.toString()); + sb.append("executionActionOrderList=") + .append(String.valueOf(this.executionActionOrderList)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ReorderExecutionActionDetails)) { + return false; + } + + ReorderExecutionActionDetails other = (ReorderExecutionActionDetails) o; + return java.util.Objects.equals( + this.executionActionOrderList, other.executionActionOrderList) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.executionActionOrderList == null + ? 43 + : this.executionActionOrderList.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ReorderScheduledActionsDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ReorderScheduledActionsDetails.java new file mode 100644 index 00000000000..a36617b1fc6 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ReorderScheduledActionsDetails.java @@ -0,0 +1,196 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Describes the re-order parameters for the Scheduled Action resources. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ReorderScheduledActionsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ReorderScheduledActionsDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"schedulingWindowId", "scheduledActionIdOrders"}) + public ReorderScheduledActionsDetails( + String schedulingWindowId, java.util.List scheduledActionIdOrders) { + super(); + this.schedulingWindowId = schedulingWindowId; + this.scheduledActionIdOrders = scheduledActionIdOrders; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingWindowId") + private String schedulingWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + * @param schedulingWindowId the value to set + * @return this builder + **/ + public Builder schedulingWindowId(String schedulingWindowId) { + this.schedulingWindowId = schedulingWindowId; + this.__explicitlySet__.add("schedulingWindowId"); + return this; + } + /** + * List of action resources in a specific order. + * Example: [{actionOrder: 1, actionResourceId: "resourceId1"}, {actionOrder: 2, actionResourceId: "resourceId2"}] + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scheduledActionIdOrders") + private java.util.List scheduledActionIdOrders; + + /** + * List of action resources in a specific order. + * Example: [{actionOrder: 1, actionResourceId: "resourceId1"}, {actionOrder: 2, actionResourceId: "resourceId2"}] + * + * @param scheduledActionIdOrders the value to set + * @return this builder + **/ + public Builder scheduledActionIdOrders( + java.util.List scheduledActionIdOrders) { + this.scheduledActionIdOrders = scheduledActionIdOrders; + this.__explicitlySet__.add("scheduledActionIdOrders"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ReorderScheduledActionsDetails build() { + ReorderScheduledActionsDetails model = + new ReorderScheduledActionsDetails( + this.schedulingWindowId, this.scheduledActionIdOrders); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ReorderScheduledActionsDetails model) { + if (model.wasPropertyExplicitlySet("schedulingWindowId")) { + this.schedulingWindowId(model.getSchedulingWindowId()); + } + if (model.wasPropertyExplicitlySet("scheduledActionIdOrders")) { + this.scheduledActionIdOrders(model.getScheduledActionIdOrders()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingWindowId") + private final String schedulingWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + * @return the value + **/ + public String getSchedulingWindowId() { + return schedulingWindowId; + } + + /** + * List of action resources in a specific order. + * Example: [{actionOrder: 1, actionResourceId: "resourceId1"}, {actionOrder: 2, actionResourceId: "resourceId2"}] + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scheduledActionIdOrders") + private final java.util.List scheduledActionIdOrders; + + /** + * List of action resources in a specific order. + * Example: [{actionOrder: 1, actionResourceId: "resourceId1"}, {actionOrder: 2, actionResourceId: "resourceId2"}] + * + * @return the value + **/ + public java.util.List getScheduledActionIdOrders() { + return scheduledActionIdOrders; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ReorderScheduledActionsDetails("); + sb.append("super=").append(super.toString()); + sb.append("schedulingWindowId=").append(String.valueOf(this.schedulingWindowId)); + sb.append(", scheduledActionIdOrders=") + .append(String.valueOf(this.scheduledActionIdOrders)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ReorderScheduledActionsDetails)) { + return false; + } + + ReorderScheduledActionsDetails other = (ReorderScheduledActionsDetails) o; + return java.util.Objects.equals(this.schedulingWindowId, other.schedulingWindowId) + && java.util.Objects.equals( + this.scheduledActionIdOrders, other.scheduledActionIdOrders) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.schedulingWindowId == null + ? 43 + : this.schedulingWindowId.hashCode()); + result = + (result * PRIME) + + (this.scheduledActionIdOrders == null + ? 43 + : this.scheduledActionIdOrders.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/RotateAutonomousContainerDatabaseEncryptionKeyDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/RotateAutonomousContainerDatabaseEncryptionKeyDetails.java new file mode 100644 index 00000000000..4e81b646baa --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/RotateAutonomousContainerDatabaseEncryptionKeyDetails.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Key details provided by the user for rotate key operation for Autonomous Database. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RotateAutonomousContainerDatabaseEncryptionKeyDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RotateAutonomousContainerDatabaseEncryptionKeyDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"keyVersionId"}) + public RotateAutonomousContainerDatabaseEncryptionKeyDetails(String keyVersionId) { + super(); + this.keyVersionId = keyVersionId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Key version ocid of the key provided by the user for rotate operation. [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyVersionId") + private String keyVersionId; + + /** + * Key version ocid of the key provided by the user for rotate operation. [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param keyVersionId the value to set + * @return this builder + **/ + public Builder keyVersionId(String keyVersionId) { + this.keyVersionId = keyVersionId; + this.__explicitlySet__.add("keyVersionId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RotateAutonomousContainerDatabaseEncryptionKeyDetails build() { + RotateAutonomousContainerDatabaseEncryptionKeyDetails model = + new RotateAutonomousContainerDatabaseEncryptionKeyDetails(this.keyVersionId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RotateAutonomousContainerDatabaseEncryptionKeyDetails model) { + if (model.wasPropertyExplicitlySet("keyVersionId")) { + this.keyVersionId(model.getKeyVersionId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Key version ocid of the key provided by the user for rotate operation. [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyVersionId") + private final String keyVersionId; + + /** + * Key version ocid of the key provided by the user for rotate operation. [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @return the value + **/ + public String getKeyVersionId() { + return keyVersionId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RotateAutonomousContainerDatabaseEncryptionKeyDetails("); + sb.append("super=").append(super.toString()); + sb.append("keyVersionId=").append(String.valueOf(this.keyVersionId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RotateAutonomousContainerDatabaseEncryptionKeyDetails)) { + return false; + } + + RotateAutonomousContainerDatabaseEncryptionKeyDetails other = + (RotateAutonomousContainerDatabaseEncryptionKeyDetails) o; + return java.util.Objects.equals(this.keyVersionId, other.keyVersionId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.keyVersionId == null ? 43 : this.keyVersionId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/RotateAutonomousDatabaseEncryptionKeyDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/RotateAutonomousDatabaseEncryptionKeyDetails.java new file mode 100644 index 00000000000..b39e3dee58f --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/RotateAutonomousDatabaseEncryptionKeyDetails.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Key details provided by the user for rotate key operation for Autonomous Database. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RotateAutonomousDatabaseEncryptionKeyDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RotateAutonomousDatabaseEncryptionKeyDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"keyVersionId"}) + public RotateAutonomousDatabaseEncryptionKeyDetails(String keyVersionId) { + super(); + this.keyVersionId = keyVersionId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Key version ocid of the key provided by the user for rotate operation. [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyVersionId") + private String keyVersionId; + + /** + * Key version ocid of the key provided by the user for rotate operation. [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param keyVersionId the value to set + * @return this builder + **/ + public Builder keyVersionId(String keyVersionId) { + this.keyVersionId = keyVersionId; + this.__explicitlySet__.add("keyVersionId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RotateAutonomousDatabaseEncryptionKeyDetails build() { + RotateAutonomousDatabaseEncryptionKeyDetails model = + new RotateAutonomousDatabaseEncryptionKeyDetails(this.keyVersionId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RotateAutonomousDatabaseEncryptionKeyDetails model) { + if (model.wasPropertyExplicitlySet("keyVersionId")) { + this.keyVersionId(model.getKeyVersionId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Key version ocid of the key provided by the user for rotate operation. [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyVersionId") + private final String keyVersionId; + + /** + * Key version ocid of the key provided by the user for rotate operation. [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @return the value + **/ + public String getKeyVersionId() { + return keyVersionId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RotateAutonomousDatabaseEncryptionKeyDetails("); + sb.append("super=").append(super.toString()); + sb.append("keyVersionId=").append(String.valueOf(this.keyVersionId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RotateAutonomousDatabaseEncryptionKeyDetails)) { + return false; + } + + RotateAutonomousDatabaseEncryptionKeyDetails other = + (RotateAutonomousDatabaseEncryptionKeyDetails) o; + return java.util.Objects.equals(this.keyVersionId, other.keyVersionId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.keyVersionId == null ? 43 : this.keyVersionId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ScheduledAction.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ScheduledAction.java new file mode 100644 index 00000000000..3f1280873c4 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ScheduledAction.java @@ -0,0 +1,903 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of a Scheduled Action. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ScheduledAction.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ScheduledAction extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "schedulingPlanId", + "compartmentId", + "schedulingWindowId", + "displayName", + "actionOrder", + "actionType", + "lifecycleState", + "estimatedTimeInMins", + "actionParams", + "actionMembers", + "freeformTags", + "definedTags", + "systemTags", + "timeCreated", + "timeUpdated" + }) + public ScheduledAction( + String id, + String schedulingPlanId, + String compartmentId, + String schedulingWindowId, + String displayName, + Integer actionOrder, + ActionType actionType, + LifecycleState lifecycleState, + Integer estimatedTimeInMins, + java.util.Map actionParams, + java.util.List actionMembers, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + java.util.Date timeCreated, + java.util.Date timeUpdated) { + super(); + this.id = id; + this.schedulingPlanId = schedulingPlanId; + this.compartmentId = compartmentId; + this.schedulingWindowId = schedulingWindowId; + this.displayName = displayName; + this.actionOrder = actionOrder; + this.actionType = actionType; + this.lifecycleState = lifecycleState; + this.estimatedTimeInMins = estimatedTimeInMins; + this.actionParams = actionParams; + this.actionMembers = actionMembers; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduled Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduled Action. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingPlanId") + private String schedulingPlanId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. + * @param schedulingPlanId the value to set + * @return this builder + **/ + public Builder schedulingPlanId(String schedulingPlanId) { + this.schedulingPlanId = schedulingPlanId; + this.__explicitlySet__.add("schedulingPlanId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingWindowId") + private String schedulingWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + * @param schedulingWindowId the value to set + * @return this builder + **/ + public Builder schedulingWindowId(String schedulingWindowId) { + this.schedulingWindowId = schedulingWindowId; + this.__explicitlySet__.add("schedulingWindowId"); + return this; + } + /** + * The display name of the Scheduled Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the Scheduled Action. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The order of the scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionOrder") + private Integer actionOrder; + + /** + * The order of the scheduled action. + * @param actionOrder the value to set + * @return this builder + **/ + public Builder actionOrder(Integer actionOrder) { + this.actionOrder = actionOrder; + this.__explicitlySet__.add("actionOrder"); + return this; + } + /** + * The type of the scheduled action being performed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + /** + * The type of the scheduled action being performed + * @param actionType the value to set + * @return this builder + **/ + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + /** + * The current state of the Scheduled Action. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Scheduled Action. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. + * + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The estimated patching time for the scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private Integer estimatedTimeInMins; + + /** + * The estimated patching time for the scheduled action. + * @param estimatedTimeInMins the value to set + * @return this builder + **/ + public Builder estimatedTimeInMins(Integer estimatedTimeInMins) { + this.estimatedTimeInMins = estimatedTimeInMins; + this.__explicitlySet__.add("estimatedTimeInMins"); + return this; + } + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionParams") + private java.util.Map actionParams; + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + * @param actionParams the value to set + * @return this builder + **/ + public Builder actionParams(java.util.Map actionParams) { + this.actionParams = actionParams; + this.__explicitlySet__.add("actionParams"); + return this; + } + /** + * The list of action members in a scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionMembers") + private java.util.List actionMembers; + + /** + * The list of action members in a scheduled action. + * @param actionMembers the value to set + * @return this builder + **/ + public Builder actionMembers(java.util.List actionMembers) { + this.actionMembers = actionMembers; + this.__explicitlySet__.add("actionMembers"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * The date and time the Scheduled Action Resource was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the Scheduled Action Resource was created. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the Scheduled Action Resource was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the Scheduled Action Resource was updated. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ScheduledAction build() { + ScheduledAction model = + new ScheduledAction( + this.id, + this.schedulingPlanId, + this.compartmentId, + this.schedulingWindowId, + this.displayName, + this.actionOrder, + this.actionType, + this.lifecycleState, + this.estimatedTimeInMins, + this.actionParams, + this.actionMembers, + this.freeformTags, + this.definedTags, + this.systemTags, + this.timeCreated, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ScheduledAction model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("schedulingPlanId")) { + this.schedulingPlanId(model.getSchedulingPlanId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("schedulingWindowId")) { + this.schedulingWindowId(model.getSchedulingWindowId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("actionOrder")) { + this.actionOrder(model.getActionOrder()); + } + if (model.wasPropertyExplicitlySet("actionType")) { + this.actionType(model.getActionType()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("estimatedTimeInMins")) { + this.estimatedTimeInMins(model.getEstimatedTimeInMins()); + } + if (model.wasPropertyExplicitlySet("actionParams")) { + this.actionParams(model.getActionParams()); + } + if (model.wasPropertyExplicitlySet("actionMembers")) { + this.actionMembers(model.getActionMembers()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduled Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduled Action. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingPlanId") + private final String schedulingPlanId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. + * @return the value + **/ + public String getSchedulingPlanId() { + return schedulingPlanId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingWindowId") + private final String schedulingWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + * @return the value + **/ + public String getSchedulingWindowId() { + return schedulingWindowId; + } + + /** + * The display name of the Scheduled Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the Scheduled Action. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The order of the scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionOrder") + private final Integer actionOrder; + + /** + * The order of the scheduled action. + * @return the value + **/ + public Integer getActionOrder() { + return actionOrder; + } + + /** + * The type of the scheduled action being performed + **/ + public enum ActionType { + DbServerFullSoftwareUpdate("DB_SERVER_FULL_SOFTWARE_UPDATE"), + StorageServerFullSoftwareUpdate("STORAGE_SERVER_FULL_SOFTWARE_UPDATE"), + NetworkSwitchFullSoftwareUpdate("NETWORK_SWITCH_FULL_SOFTWARE_UPDATE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ActionType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActionType v : ActionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ActionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ActionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ActionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The type of the scheduled action being performed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private final ActionType actionType; + + /** + * The type of the scheduled action being performed + * @return the value + **/ + public ActionType getActionType() { + return actionType; + } + + /** + * The current state of the Scheduled Action. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + public enum LifecycleState { + Creating("CREATING"), + NeedsAttention("NEEDS_ATTENTION"), + Available("AVAILABLE"), + Updating("UPDATING"), + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the Scheduled Action. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Scheduled Action. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. + * + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The estimated patching time for the scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private final Integer estimatedTimeInMins; + + /** + * The estimated patching time for the scheduled action. + * @return the value + **/ + public Integer getEstimatedTimeInMins() { + return estimatedTimeInMins; + } + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionParams") + private final java.util.Map actionParams; + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + * @return the value + **/ + public java.util.Map getActionParams() { + return actionParams; + } + + /** + * The list of action members in a scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionMembers") + private final java.util.List actionMembers; + + /** + * The list of action members in a scheduled action. + * @return the value + **/ + public java.util.List getActionMembers() { + return actionMembers; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + /** + * The date and time the Scheduled Action Resource was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the Scheduled Action Resource was created. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the Scheduled Action Resource was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the Scheduled Action Resource was updated. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ScheduledAction("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", schedulingPlanId=").append(String.valueOf(this.schedulingPlanId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", schedulingWindowId=").append(String.valueOf(this.schedulingWindowId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", actionOrder=").append(String.valueOf(this.actionOrder)); + sb.append(", actionType=").append(String.valueOf(this.actionType)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", estimatedTimeInMins=").append(String.valueOf(this.estimatedTimeInMins)); + sb.append(", actionParams=").append(String.valueOf(this.actionParams)); + sb.append(", actionMembers=").append(String.valueOf(this.actionMembers)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ScheduledAction)) { + return false; + } + + ScheduledAction other = (ScheduledAction) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.schedulingPlanId, other.schedulingPlanId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.schedulingWindowId, other.schedulingWindowId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.actionOrder, other.actionOrder) + && java.util.Objects.equals(this.actionType, other.actionType) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.estimatedTimeInMins, other.estimatedTimeInMins) + && java.util.Objects.equals(this.actionParams, other.actionParams) + && java.util.Objects.equals(this.actionMembers, other.actionMembers) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.schedulingPlanId == null ? 43 : this.schedulingPlanId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.schedulingWindowId == null + ? 43 + : this.schedulingWindowId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.actionOrder == null ? 43 : this.actionOrder.hashCode()); + result = (result * PRIME) + (this.actionType == null ? 43 : this.actionType.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.estimatedTimeInMins == null + ? 43 + : this.estimatedTimeInMins.hashCode()); + result = (result * PRIME) + (this.actionParams == null ? 43 : this.actionParams.hashCode()); + result = + (result * PRIME) + + (this.actionMembers == null ? 43 : this.actionMembers.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ScheduledActionCollection.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ScheduledActionCollection.java new file mode 100644 index 00000000000..c601ade9662 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ScheduledActionCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Results of Scheduled Action resources lists. Contains ScheduledActionSummary items. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ScheduledActionCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ScheduledActionCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ScheduledActionCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of Scheduled Action resources. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of Scheduled Action resources. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ScheduledActionCollection build() { + ScheduledActionCollection model = new ScheduledActionCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ScheduledActionCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of Scheduled Action resources. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of Scheduled Action resources. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ScheduledActionCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ScheduledActionCollection)) { + return false; + } + + ScheduledActionCollection other = (ScheduledActionCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ScheduledActionSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ScheduledActionSummary.java new file mode 100644 index 00000000000..6599e1c7b89 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ScheduledActionSummary.java @@ -0,0 +1,905 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of a scheduled action. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ScheduledActionSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ScheduledActionSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "schedulingPlanId", + "compartmentId", + "schedulingWindowId", + "displayName", + "actionOrder", + "actionType", + "lifecycleState", + "estimatedTimeInMins", + "actionParams", + "actionMembers", + "freeformTags", + "definedTags", + "systemTags", + "timeCreated", + "timeUpdated" + }) + public ScheduledActionSummary( + String id, + String schedulingPlanId, + String compartmentId, + String schedulingWindowId, + String displayName, + Integer actionOrder, + ActionType actionType, + LifecycleState lifecycleState, + Integer estimatedTimeInMins, + java.util.Map actionParams, + java.util.List actionMembers, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + java.util.Date timeCreated, + java.util.Date timeUpdated) { + super(); + this.id = id; + this.schedulingPlanId = schedulingPlanId; + this.compartmentId = compartmentId; + this.schedulingWindowId = schedulingWindowId; + this.displayName = displayName; + this.actionOrder = actionOrder; + this.actionType = actionType; + this.lifecycleState = lifecycleState; + this.estimatedTimeInMins = estimatedTimeInMins; + this.actionParams = actionParams; + this.actionMembers = actionMembers; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduled Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduled Action. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingPlanId") + private String schedulingPlanId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. + * @param schedulingPlanId the value to set + * @return this builder + **/ + public Builder schedulingPlanId(String schedulingPlanId) { + this.schedulingPlanId = schedulingPlanId; + this.__explicitlySet__.add("schedulingPlanId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingWindowId") + private String schedulingWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + * @param schedulingWindowId the value to set + * @return this builder + **/ + public Builder schedulingWindowId(String schedulingWindowId) { + this.schedulingWindowId = schedulingWindowId; + this.__explicitlySet__.add("schedulingWindowId"); + return this; + } + /** + * The display name of the Scheduled Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the Scheduled Action. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The order of the scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionOrder") + private Integer actionOrder; + + /** + * The order of the scheduled action. + * @param actionOrder the value to set + * @return this builder + **/ + public Builder actionOrder(Integer actionOrder) { + this.actionOrder = actionOrder; + this.__explicitlySet__.add("actionOrder"); + return this; + } + /** + * The type of the scheduled action being performed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + /** + * The type of the scheduled action being performed + * @param actionType the value to set + * @return this builder + **/ + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + /** + * The current state of the Scheduled Action. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Scheduled Action. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. + * + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The estimated patching time for the scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private Integer estimatedTimeInMins; + + /** + * The estimated patching time for the scheduled action. + * @param estimatedTimeInMins the value to set + * @return this builder + **/ + public Builder estimatedTimeInMins(Integer estimatedTimeInMins) { + this.estimatedTimeInMins = estimatedTimeInMins; + this.__explicitlySet__.add("estimatedTimeInMins"); + return this; + } + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionParams") + private java.util.Map actionParams; + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + * @param actionParams the value to set + * @return this builder + **/ + public Builder actionParams(java.util.Map actionParams) { + this.actionParams = actionParams; + this.__explicitlySet__.add("actionParams"); + return this; + } + /** + * The list of action members in a scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionMembers") + private java.util.List actionMembers; + + /** + * The list of action members in a scheduled action. + * @param actionMembers the value to set + * @return this builder + **/ + public Builder actionMembers(java.util.List actionMembers) { + this.actionMembers = actionMembers; + this.__explicitlySet__.add("actionMembers"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * The date and time the Scheduled Action Resource was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the Scheduled Action Resource was created. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the Scheduled Action Resource was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the Scheduled Action Resource was updated. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ScheduledActionSummary build() { + ScheduledActionSummary model = + new ScheduledActionSummary( + this.id, + this.schedulingPlanId, + this.compartmentId, + this.schedulingWindowId, + this.displayName, + this.actionOrder, + this.actionType, + this.lifecycleState, + this.estimatedTimeInMins, + this.actionParams, + this.actionMembers, + this.freeformTags, + this.definedTags, + this.systemTags, + this.timeCreated, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ScheduledActionSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("schedulingPlanId")) { + this.schedulingPlanId(model.getSchedulingPlanId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("schedulingWindowId")) { + this.schedulingWindowId(model.getSchedulingWindowId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("actionOrder")) { + this.actionOrder(model.getActionOrder()); + } + if (model.wasPropertyExplicitlySet("actionType")) { + this.actionType(model.getActionType()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("estimatedTimeInMins")) { + this.estimatedTimeInMins(model.getEstimatedTimeInMins()); + } + if (model.wasPropertyExplicitlySet("actionParams")) { + this.actionParams(model.getActionParams()); + } + if (model.wasPropertyExplicitlySet("actionMembers")) { + this.actionMembers(model.getActionMembers()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduled Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduled Action. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingPlanId") + private final String schedulingPlanId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. + * @return the value + **/ + public String getSchedulingPlanId() { + return schedulingPlanId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingWindowId") + private final String schedulingWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + * @return the value + **/ + public String getSchedulingWindowId() { + return schedulingWindowId; + } + + /** + * The display name of the Scheduled Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the Scheduled Action. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The order of the scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionOrder") + private final Integer actionOrder; + + /** + * The order of the scheduled action. + * @return the value + **/ + public Integer getActionOrder() { + return actionOrder; + } + + /** + * The type of the scheduled action being performed + **/ + public enum ActionType { + DbServerFullSoftwareUpdate("DB_SERVER_FULL_SOFTWARE_UPDATE"), + StorageServerFullSoftwareUpdate("STORAGE_SERVER_FULL_SOFTWARE_UPDATE"), + NetworkSwitchFullSoftwareUpdate("NETWORK_SWITCH_FULL_SOFTWARE_UPDATE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ActionType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActionType v : ActionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ActionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ActionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ActionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The type of the scheduled action being performed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private final ActionType actionType; + + /** + * The type of the scheduled action being performed + * @return the value + **/ + public ActionType getActionType() { + return actionType; + } + + /** + * The current state of the Scheduled Action. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + public enum LifecycleState { + Creating("CREATING"), + NeedsAttention("NEEDS_ATTENTION"), + Available("AVAILABLE"), + Updating("UPDATING"), + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the Scheduled Action. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Scheduled Action. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. + * + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The estimated patching time for the scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private final Integer estimatedTimeInMins; + + /** + * The estimated patching time for the scheduled action. + * @return the value + **/ + public Integer getEstimatedTimeInMins() { + return estimatedTimeInMins; + } + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionParams") + private final java.util.Map actionParams; + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + * @return the value + **/ + public java.util.Map getActionParams() { + return actionParams; + } + + /** + * The list of action members in a scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionMembers") + private final java.util.List actionMembers; + + /** + * The list of action members in a scheduled action. + * @return the value + **/ + public java.util.List getActionMembers() { + return actionMembers; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + /** + * The date and time the Scheduled Action Resource was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the Scheduled Action Resource was created. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the Scheduled Action Resource was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the Scheduled Action Resource was updated. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ScheduledActionSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", schedulingPlanId=").append(String.valueOf(this.schedulingPlanId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", schedulingWindowId=").append(String.valueOf(this.schedulingWindowId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", actionOrder=").append(String.valueOf(this.actionOrder)); + sb.append(", actionType=").append(String.valueOf(this.actionType)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", estimatedTimeInMins=").append(String.valueOf(this.estimatedTimeInMins)); + sb.append(", actionParams=").append(String.valueOf(this.actionParams)); + sb.append(", actionMembers=").append(String.valueOf(this.actionMembers)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ScheduledActionSummary)) { + return false; + } + + ScheduledActionSummary other = (ScheduledActionSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.schedulingPlanId, other.schedulingPlanId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.schedulingWindowId, other.schedulingWindowId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.actionOrder, other.actionOrder) + && java.util.Objects.equals(this.actionType, other.actionType) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.estimatedTimeInMins, other.estimatedTimeInMins) + && java.util.Objects.equals(this.actionParams, other.actionParams) + && java.util.Objects.equals(this.actionMembers, other.actionMembers) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.schedulingPlanId == null ? 43 : this.schedulingPlanId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.schedulingWindowId == null + ? 43 + : this.schedulingWindowId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.actionOrder == null ? 43 : this.actionOrder.hashCode()); + result = (result * PRIME) + (this.actionType == null ? 43 : this.actionType.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.estimatedTimeInMins == null + ? 43 + : this.estimatedTimeInMins.hashCode()); + result = (result * PRIME) + (this.actionParams == null ? 43 : this.actionParams.hashCode()); + result = + (result * PRIME) + + (this.actionMembers == null ? 43 : this.actionMembers.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingPlan.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingPlan.java new file mode 100644 index 00000000000..6ae5ac1ac12 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingPlan.java @@ -0,0 +1,954 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of a Scheduling Plan. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = SchedulingPlan.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SchedulingPlan extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "schedulingPolicyId", + "resourceId", + "displayName", + "lifecycleState", + "lifecycleDetails", + "isUsingRecommendedScheduledActions", + "planIntent", + "estimatedTimeInMins", + "serviceType", + "timeCreated", + "timeUpdated", + "freeformTags", + "definedTags", + "systemTags" + }) + public SchedulingPlan( + String id, + String compartmentId, + String schedulingPolicyId, + String resourceId, + String displayName, + LifecycleState lifecycleState, + String lifecycleDetails, + Boolean isUsingRecommendedScheduledActions, + PlanIntent planIntent, + Integer estimatedTimeInMins, + ServiceType serviceType, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.schedulingPolicyId = schedulingPolicyId; + this.resourceId = resourceId; + this.displayName = displayName; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.isUsingRecommendedScheduledActions = isUsingRecommendedScheduledActions; + this.planIntent = planIntent; + this.estimatedTimeInMins = estimatedTimeInMins; + this.serviceType = serviceType; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingPolicyId") + private String schedulingPolicyId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + * @param schedulingPolicyId the value to set + * @return this builder + **/ + public Builder schedulingPolicyId(String schedulingPolicyId) { + this.schedulingPolicyId = schedulingPolicyId; + this.__explicitlySet__.add("schedulingPolicyId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource. + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * The display name of the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the Scheduling Plan. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The current state of the Scheduling Plan. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Scheduling Plan. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. + * + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * If true, recommended scheduled actions will be generated for the scheduling plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isUsingRecommendedScheduledActions") + private Boolean isUsingRecommendedScheduledActions; + + /** + * If true, recommended scheduled actions will be generated for the scheduling plan. + * @param isUsingRecommendedScheduledActions the value to set + * @return this builder + **/ + public Builder isUsingRecommendedScheduledActions( + Boolean isUsingRecommendedScheduledActions) { + this.isUsingRecommendedScheduledActions = isUsingRecommendedScheduledActions; + this.__explicitlySet__.add("isUsingRecommendedScheduledActions"); + return this; + } + /** + * The current intent the Scheduling Plan. Valid states is EXADATA_INFRASTRUCTURE_FULL_SOFTWARE_UPDATE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("planIntent") + private PlanIntent planIntent; + + /** + * The current intent the Scheduling Plan. Valid states is EXADATA_INFRASTRUCTURE_FULL_SOFTWARE_UPDATE. + * + * @param planIntent the value to set + * @return this builder + **/ + public Builder planIntent(PlanIntent planIntent) { + this.planIntent = planIntent; + this.__explicitlySet__.add("planIntent"); + return this; + } + /** + * The estimated time for the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private Integer estimatedTimeInMins; + + /** + * The estimated time for the Scheduling Plan. + * @param estimatedTimeInMins the value to set + * @return this builder + **/ + public Builder estimatedTimeInMins(Integer estimatedTimeInMins) { + this.estimatedTimeInMins = estimatedTimeInMins; + this.__explicitlySet__.add("estimatedTimeInMins"); + return this; + } + /** + * The service type of the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceType") + private ServiceType serviceType; + + /** + * The service type of the Scheduling Plan. + * @param serviceType the value to set + * @return this builder + **/ + public Builder serviceType(ServiceType serviceType) { + this.serviceType = serviceType; + this.__explicitlySet__.add("serviceType"); + return this; + } + /** + * The date and time the Scheduling Plan Resource was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the Scheduling Plan Resource was created. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the Scheduling Plan Resource was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the Scheduling Plan Resource was updated. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SchedulingPlan build() { + SchedulingPlan model = + new SchedulingPlan( + this.id, + this.compartmentId, + this.schedulingPolicyId, + this.resourceId, + this.displayName, + this.lifecycleState, + this.lifecycleDetails, + this.isUsingRecommendedScheduledActions, + this.planIntent, + this.estimatedTimeInMins, + this.serviceType, + this.timeCreated, + this.timeUpdated, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SchedulingPlan model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("schedulingPolicyId")) { + this.schedulingPolicyId(model.getSchedulingPolicyId()); + } + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("isUsingRecommendedScheduledActions")) { + this.isUsingRecommendedScheduledActions( + model.getIsUsingRecommendedScheduledActions()); + } + if (model.wasPropertyExplicitlySet("planIntent")) { + this.planIntent(model.getPlanIntent()); + } + if (model.wasPropertyExplicitlySet("estimatedTimeInMins")) { + this.estimatedTimeInMins(model.getEstimatedTimeInMins()); + } + if (model.wasPropertyExplicitlySet("serviceType")) { + this.serviceType(model.getServiceType()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingPolicyId") + private final String schedulingPolicyId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + * @return the value + **/ + public String getSchedulingPolicyId() { + return schedulingPolicyId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource. + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * The display name of the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the Scheduling Plan. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The current state of the Scheduling Plan. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + public enum LifecycleState { + Creating("CREATING"), + NeedsAttention("NEEDS_ATTENTION"), + Available("AVAILABLE"), + Updating("UPDATING"), + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the Scheduling Plan. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Scheduling Plan. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. + * + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * If true, recommended scheduled actions will be generated for the scheduling plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isUsingRecommendedScheduledActions") + private final Boolean isUsingRecommendedScheduledActions; + + /** + * If true, recommended scheduled actions will be generated for the scheduling plan. + * @return the value + **/ + public Boolean getIsUsingRecommendedScheduledActions() { + return isUsingRecommendedScheduledActions; + } + + /** + * The current intent the Scheduling Plan. Valid states is EXADATA_INFRASTRUCTURE_FULL_SOFTWARE_UPDATE. + * + **/ + public enum PlanIntent { + ExadataInfrastructureFullSoftwareUpdate("EXADATA_INFRASTRUCTURE_FULL_SOFTWARE_UPDATE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PlanIntent.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PlanIntent v : PlanIntent.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + PlanIntent(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PlanIntent create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'PlanIntent', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current intent the Scheduling Plan. Valid states is EXADATA_INFRASTRUCTURE_FULL_SOFTWARE_UPDATE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("planIntent") + private final PlanIntent planIntent; + + /** + * The current intent the Scheduling Plan. Valid states is EXADATA_INFRASTRUCTURE_FULL_SOFTWARE_UPDATE. + * + * @return the value + **/ + public PlanIntent getPlanIntent() { + return planIntent; + } + + /** + * The estimated time for the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private final Integer estimatedTimeInMins; + + /** + * The estimated time for the Scheduling Plan. + * @return the value + **/ + public Integer getEstimatedTimeInMins() { + return estimatedTimeInMins; + } + + /** + * The service type of the Scheduling Plan. + **/ + public enum ServiceType { + Exacc("EXACC"), + Exacs("EXACS"), + Fpppcs("FPPPCS"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ServiceType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ServiceType v : ServiceType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ServiceType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ServiceType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ServiceType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The service type of the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceType") + private final ServiceType serviceType; + + /** + * The service type of the Scheduling Plan. + * @return the value + **/ + public ServiceType getServiceType() { + return serviceType; + } + + /** + * The date and time the Scheduling Plan Resource was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the Scheduling Plan Resource was created. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the Scheduling Plan Resource was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the Scheduling Plan Resource was updated. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SchedulingPlan("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", schedulingPolicyId=").append(String.valueOf(this.schedulingPolicyId)); + sb.append(", resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", isUsingRecommendedScheduledActions=") + .append(String.valueOf(this.isUsingRecommendedScheduledActions)); + sb.append(", planIntent=").append(String.valueOf(this.planIntent)); + sb.append(", estimatedTimeInMins=").append(String.valueOf(this.estimatedTimeInMins)); + sb.append(", serviceType=").append(String.valueOf(this.serviceType)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SchedulingPlan)) { + return false; + } + + SchedulingPlan other = (SchedulingPlan) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.schedulingPolicyId, other.schedulingPolicyId) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals( + this.isUsingRecommendedScheduledActions, + other.isUsingRecommendedScheduledActions) + && java.util.Objects.equals(this.planIntent, other.planIntent) + && java.util.Objects.equals(this.estimatedTimeInMins, other.estimatedTimeInMins) + && java.util.Objects.equals(this.serviceType, other.serviceType) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.schedulingPolicyId == null + ? 43 + : this.schedulingPolicyId.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = + (result * PRIME) + + (this.isUsingRecommendedScheduledActions == null + ? 43 + : this.isUsingRecommendedScheduledActions.hashCode()); + result = (result * PRIME) + (this.planIntent == null ? 43 : this.planIntent.hashCode()); + result = + (result * PRIME) + + (this.estimatedTimeInMins == null + ? 43 + : this.estimatedTimeInMins.hashCode()); + result = (result * PRIME) + (this.serviceType == null ? 43 : this.serviceType.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingPlanCollection.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingPlanCollection.java new file mode 100644 index 00000000000..befca7c152f --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingPlanCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Results of Scheduling Plan resources lists. Contains ScheduledActionSummary items. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SchedulingPlanCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SchedulingPlanCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public SchedulingPlanCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of Scheduling Plan resources. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of Scheduling Plan resources. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SchedulingPlanCollection build() { + SchedulingPlanCollection model = new SchedulingPlanCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SchedulingPlanCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of Scheduling Plan resources. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of Scheduling Plan resources. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SchedulingPlanCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SchedulingPlanCollection)) { + return false; + } + + SchedulingPlanCollection other = (SchedulingPlanCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingPlanSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingPlanSummary.java new file mode 100644 index 00000000000..a73c67c6bb1 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingPlanSummary.java @@ -0,0 +1,956 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of a Scheduling Plan. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SchedulingPlanSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SchedulingPlanSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "schedulingPolicyId", + "resourceId", + "displayName", + "lifecycleState", + "lifecycleDetails", + "isUsingRecommendedScheduledActions", + "planIntent", + "estimatedTimeInMins", + "serviceType", + "timeCreated", + "timeUpdated", + "freeformTags", + "definedTags", + "systemTags" + }) + public SchedulingPlanSummary( + String id, + String compartmentId, + String schedulingPolicyId, + String resourceId, + String displayName, + LifecycleState lifecycleState, + String lifecycleDetails, + Boolean isUsingRecommendedScheduledActions, + PlanIntent planIntent, + Integer estimatedTimeInMins, + ServiceType serviceType, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.schedulingPolicyId = schedulingPolicyId; + this.resourceId = resourceId; + this.displayName = displayName; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.isUsingRecommendedScheduledActions = isUsingRecommendedScheduledActions; + this.planIntent = planIntent; + this.estimatedTimeInMins = estimatedTimeInMins; + this.serviceType = serviceType; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingPolicyId") + private String schedulingPolicyId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + * @param schedulingPolicyId the value to set + * @return this builder + **/ + public Builder schedulingPolicyId(String schedulingPolicyId) { + this.schedulingPolicyId = schedulingPolicyId; + this.__explicitlySet__.add("schedulingPolicyId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource. + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * The display name of the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the Scheduling Plan. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The current state of the Scheduling Plan. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Scheduling Plan. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. + * + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * If true, recommended scheduled actions will be generated for the scheduling plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isUsingRecommendedScheduledActions") + private Boolean isUsingRecommendedScheduledActions; + + /** + * If true, recommended scheduled actions will be generated for the scheduling plan. + * @param isUsingRecommendedScheduledActions the value to set + * @return this builder + **/ + public Builder isUsingRecommendedScheduledActions( + Boolean isUsingRecommendedScheduledActions) { + this.isUsingRecommendedScheduledActions = isUsingRecommendedScheduledActions; + this.__explicitlySet__.add("isUsingRecommendedScheduledActions"); + return this; + } + /** + * The current intent the Scheduling Plan. Valid states is EXADATA_INFRASTRUCTURE_FULL_SOFTWARE_UPDATE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("planIntent") + private PlanIntent planIntent; + + /** + * The current intent the Scheduling Plan. Valid states is EXADATA_INFRASTRUCTURE_FULL_SOFTWARE_UPDATE. + * + * @param planIntent the value to set + * @return this builder + **/ + public Builder planIntent(PlanIntent planIntent) { + this.planIntent = planIntent; + this.__explicitlySet__.add("planIntent"); + return this; + } + /** + * The estimated time for the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private Integer estimatedTimeInMins; + + /** + * The estimated time for the Scheduling Plan. + * @param estimatedTimeInMins the value to set + * @return this builder + **/ + public Builder estimatedTimeInMins(Integer estimatedTimeInMins) { + this.estimatedTimeInMins = estimatedTimeInMins; + this.__explicitlySet__.add("estimatedTimeInMins"); + return this; + } + /** + * The service type of the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceType") + private ServiceType serviceType; + + /** + * The service type of the Scheduling Plan. + * @param serviceType the value to set + * @return this builder + **/ + public Builder serviceType(ServiceType serviceType) { + this.serviceType = serviceType; + this.__explicitlySet__.add("serviceType"); + return this; + } + /** + * The date and time the Scheduling Plan Resource was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the Scheduling Plan Resource was created. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the Scheduling Plan Resource was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the Scheduling Plan Resource was updated. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SchedulingPlanSummary build() { + SchedulingPlanSummary model = + new SchedulingPlanSummary( + this.id, + this.compartmentId, + this.schedulingPolicyId, + this.resourceId, + this.displayName, + this.lifecycleState, + this.lifecycleDetails, + this.isUsingRecommendedScheduledActions, + this.planIntent, + this.estimatedTimeInMins, + this.serviceType, + this.timeCreated, + this.timeUpdated, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SchedulingPlanSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("schedulingPolicyId")) { + this.schedulingPolicyId(model.getSchedulingPolicyId()); + } + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("isUsingRecommendedScheduledActions")) { + this.isUsingRecommendedScheduledActions( + model.getIsUsingRecommendedScheduledActions()); + } + if (model.wasPropertyExplicitlySet("planIntent")) { + this.planIntent(model.getPlanIntent()); + } + if (model.wasPropertyExplicitlySet("estimatedTimeInMins")) { + this.estimatedTimeInMins(model.getEstimatedTimeInMins()); + } + if (model.wasPropertyExplicitlySet("serviceType")) { + this.serviceType(model.getServiceType()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingPolicyId") + private final String schedulingPolicyId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + * @return the value + **/ + public String getSchedulingPolicyId() { + return schedulingPolicyId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource. + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * The display name of the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the Scheduling Plan. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The current state of the Scheduling Plan. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + public enum LifecycleState { + Creating("CREATING"), + NeedsAttention("NEEDS_ATTENTION"), + Available("AVAILABLE"), + Updating("UPDATING"), + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the Scheduling Plan. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Scheduling Plan. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. + * + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * If true, recommended scheduled actions will be generated for the scheduling plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isUsingRecommendedScheduledActions") + private final Boolean isUsingRecommendedScheduledActions; + + /** + * If true, recommended scheduled actions will be generated for the scheduling plan. + * @return the value + **/ + public Boolean getIsUsingRecommendedScheduledActions() { + return isUsingRecommendedScheduledActions; + } + + /** + * The current intent the Scheduling Plan. Valid states is EXADATA_INFRASTRUCTURE_FULL_SOFTWARE_UPDATE. + * + **/ + public enum PlanIntent { + ExadataInfrastructureFullSoftwareUpdate("EXADATA_INFRASTRUCTURE_FULL_SOFTWARE_UPDATE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PlanIntent.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PlanIntent v : PlanIntent.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + PlanIntent(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PlanIntent create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'PlanIntent', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current intent the Scheduling Plan. Valid states is EXADATA_INFRASTRUCTURE_FULL_SOFTWARE_UPDATE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("planIntent") + private final PlanIntent planIntent; + + /** + * The current intent the Scheduling Plan. Valid states is EXADATA_INFRASTRUCTURE_FULL_SOFTWARE_UPDATE. + * + * @return the value + **/ + public PlanIntent getPlanIntent() { + return planIntent; + } + + /** + * The estimated time for the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTimeInMins") + private final Integer estimatedTimeInMins; + + /** + * The estimated time for the Scheduling Plan. + * @return the value + **/ + public Integer getEstimatedTimeInMins() { + return estimatedTimeInMins; + } + + /** + * The service type of the Scheduling Plan. + **/ + public enum ServiceType { + Exacc("EXACC"), + Exacs("EXACS"), + Fpppcs("FPPPCS"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ServiceType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ServiceType v : ServiceType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ServiceType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ServiceType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ServiceType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The service type of the Scheduling Plan. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceType") + private final ServiceType serviceType; + + /** + * The service type of the Scheduling Plan. + * @return the value + **/ + public ServiceType getServiceType() { + return serviceType; + } + + /** + * The date and time the Scheduling Plan Resource was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the Scheduling Plan Resource was created. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the Scheduling Plan Resource was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the Scheduling Plan Resource was updated. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SchedulingPlanSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", schedulingPolicyId=").append(String.valueOf(this.schedulingPolicyId)); + sb.append(", resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", isUsingRecommendedScheduledActions=") + .append(String.valueOf(this.isUsingRecommendedScheduledActions)); + sb.append(", planIntent=").append(String.valueOf(this.planIntent)); + sb.append(", estimatedTimeInMins=").append(String.valueOf(this.estimatedTimeInMins)); + sb.append(", serviceType=").append(String.valueOf(this.serviceType)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SchedulingPlanSummary)) { + return false; + } + + SchedulingPlanSummary other = (SchedulingPlanSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.schedulingPolicyId, other.schedulingPolicyId) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals( + this.isUsingRecommendedScheduledActions, + other.isUsingRecommendedScheduledActions) + && java.util.Objects.equals(this.planIntent, other.planIntent) + && java.util.Objects.equals(this.estimatedTimeInMins, other.estimatedTimeInMins) + && java.util.Objects.equals(this.serviceType, other.serviceType) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.schedulingPolicyId == null + ? 43 + : this.schedulingPolicyId.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = + (result * PRIME) + + (this.isUsingRecommendedScheduledActions == null + ? 43 + : this.isUsingRecommendedScheduledActions.hashCode()); + result = (result * PRIME) + (this.planIntent == null ? 43 : this.planIntent.hashCode()); + result = + (result * PRIME) + + (this.estimatedTimeInMins == null + ? 43 + : this.estimatedTimeInMins.hashCode()); + result = (result * PRIME) + (this.serviceType == null ? 43 : this.serviceType.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingPolicy.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingPolicy.java new file mode 100644 index 00000000000..00282205044 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingPolicy.java @@ -0,0 +1,723 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of a Scheduling Policy. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = SchedulingPolicy.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SchedulingPolicy extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "lifecycleState", + "lifecycleDetails", + "timeCreated", + "timeUpdated", + "cadence", + "cadenceStartMonth", + "timeNextWindowStarts", + "freeformTags", + "definedTags" + }) + public SchedulingPolicy( + String id, + String compartmentId, + String displayName, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Cadence cadence, + Month cadenceStartMonth, + java.util.Date timeNextWindowStarts, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.cadence = cadence; + this.cadenceStartMonth = cadenceStartMonth; + this.timeNextWindowStarts = timeNextWindowStarts; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The user-friendly name for the Scheduling Policy. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the Scheduling Policy. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED. + * + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The date and time the Scheduling Policy was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the Scheduling Policy was created. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The last date and time that the Scheduling Policy was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The last date and time that the Scheduling Policy was updated. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The cadence period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cadence") + private Cadence cadence; + + /** + * The cadence period. + * @param cadence the value to set + * @return this builder + **/ + public Builder cadence(Cadence cadence) { + this.cadence = cadence; + this.__explicitlySet__.add("cadence"); + return this; + } + /** + * Start of the month to be followed during the cadence period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cadenceStartMonth") + private Month cadenceStartMonth; + + /** + * Start of the month to be followed during the cadence period. + * @param cadenceStartMonth the value to set + * @return this builder + **/ + public Builder cadenceStartMonth(Month cadenceStartMonth) { + this.cadenceStartMonth = cadenceStartMonth; + this.__explicitlySet__.add("cadenceStartMonth"); + return this; + } + /** + * The date and time of the next scheduling window associated with the schedulingPolicy is planned to start. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeNextWindowStarts") + private java.util.Date timeNextWindowStarts; + + /** + * The date and time of the next scheduling window associated with the schedulingPolicy is planned to start. + * @param timeNextWindowStarts the value to set + * @return this builder + **/ + public Builder timeNextWindowStarts(java.util.Date timeNextWindowStarts) { + this.timeNextWindowStarts = timeNextWindowStarts; + this.__explicitlySet__.add("timeNextWindowStarts"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SchedulingPolicy build() { + SchedulingPolicy model = + new SchedulingPolicy( + this.id, + this.compartmentId, + this.displayName, + this.lifecycleState, + this.lifecycleDetails, + this.timeCreated, + this.timeUpdated, + this.cadence, + this.cadenceStartMonth, + this.timeNextWindowStarts, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SchedulingPolicy model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("cadence")) { + this.cadence(model.getCadence()); + } + if (model.wasPropertyExplicitlySet("cadenceStartMonth")) { + this.cadenceStartMonth(model.getCadenceStartMonth()); + } + if (model.wasPropertyExplicitlySet("timeNextWindowStarts")) { + this.timeNextWindowStarts(model.getTimeNextWindowStarts()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The user-friendly name for the Scheduling Policy. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the Scheduling Policy. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + public enum LifecycleState { + Creating("CREATING"), + NeedsAttention("NEEDS_ATTENTION"), + Available("AVAILABLE"), + Updating("UPDATING"), + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED. + * + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The date and time the Scheduling Policy was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the Scheduling Policy was created. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The last date and time that the Scheduling Policy was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The last date and time that the Scheduling Policy was updated. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The cadence period. + **/ + public enum Cadence { + Halfyearly("HALFYEARLY"), + Quarterly("QUARTERLY"), + Monthly("MONTHLY"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(Cadence.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Cadence v : Cadence.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Cadence(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Cadence create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Cadence', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The cadence period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cadence") + private final Cadence cadence; + + /** + * The cadence period. + * @return the value + **/ + public Cadence getCadence() { + return cadence; + } + + /** + * Start of the month to be followed during the cadence period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cadenceStartMonth") + private final Month cadenceStartMonth; + + /** + * Start of the month to be followed during the cadence period. + * @return the value + **/ + public Month getCadenceStartMonth() { + return cadenceStartMonth; + } + + /** + * The date and time of the next scheduling window associated with the schedulingPolicy is planned to start. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeNextWindowStarts") + private final java.util.Date timeNextWindowStarts; + + /** + * The date and time of the next scheduling window associated with the schedulingPolicy is planned to start. + * @return the value + **/ + public java.util.Date getTimeNextWindowStarts() { + return timeNextWindowStarts; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SchedulingPolicy("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", cadence=").append(String.valueOf(this.cadence)); + sb.append(", cadenceStartMonth=").append(String.valueOf(this.cadenceStartMonth)); + sb.append(", timeNextWindowStarts=").append(String.valueOf(this.timeNextWindowStarts)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SchedulingPolicy)) { + return false; + } + + SchedulingPolicy other = (SchedulingPolicy) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.cadence, other.cadence) + && java.util.Objects.equals(this.cadenceStartMonth, other.cadenceStartMonth) + && java.util.Objects.equals(this.timeNextWindowStarts, other.timeNextWindowStarts) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.cadence == null ? 43 : this.cadence.hashCode()); + result = + (result * PRIME) + + (this.cadenceStartMonth == null ? 43 : this.cadenceStartMonth.hashCode()); + result = + (result * PRIME) + + (this.timeNextWindowStarts == null + ? 43 + : this.timeNextWindowStarts.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingPolicySummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingPolicySummary.java new file mode 100644 index 00000000000..1cec17ed205 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingPolicySummary.java @@ -0,0 +1,726 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of a Scheduling Policy. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SchedulingPolicySummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SchedulingPolicySummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "lifecycleState", + "lifecycleDetails", + "timeCreated", + "timeUpdated", + "cadence", + "cadenceStartMonth", + "timeNextWindowStarts", + "freeformTags", + "definedTags" + }) + public SchedulingPolicySummary( + String id, + String compartmentId, + String displayName, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Cadence cadence, + Month cadenceStartMonth, + java.util.Date timeNextWindowStarts, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.cadence = cadence; + this.cadenceStartMonth = cadenceStartMonth; + this.timeNextWindowStarts = timeNextWindowStarts; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The user-friendly name for the Scheduling Policy. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the Scheduling Policy. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED. + * + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The date and time the Scheduling Policy was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the Scheduling Policy was created. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The last date and time that the Scheduling Policy was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The last date and time that the Scheduling Policy was updated. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The cadence period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cadence") + private Cadence cadence; + + /** + * The cadence period. + * @param cadence the value to set + * @return this builder + **/ + public Builder cadence(Cadence cadence) { + this.cadence = cadence; + this.__explicitlySet__.add("cadence"); + return this; + } + /** + * Start of the month to be followed during the cadence period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cadenceStartMonth") + private Month cadenceStartMonth; + + /** + * Start of the month to be followed during the cadence period. + * @param cadenceStartMonth the value to set + * @return this builder + **/ + public Builder cadenceStartMonth(Month cadenceStartMonth) { + this.cadenceStartMonth = cadenceStartMonth; + this.__explicitlySet__.add("cadenceStartMonth"); + return this; + } + /** + * The date and time of the next scheduling window associated with the schedulingPolicy is planned to start. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeNextWindowStarts") + private java.util.Date timeNextWindowStarts; + + /** + * The date and time of the next scheduling window associated with the schedulingPolicy is planned to start. + * @param timeNextWindowStarts the value to set + * @return this builder + **/ + public Builder timeNextWindowStarts(java.util.Date timeNextWindowStarts) { + this.timeNextWindowStarts = timeNextWindowStarts; + this.__explicitlySet__.add("timeNextWindowStarts"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SchedulingPolicySummary build() { + SchedulingPolicySummary model = + new SchedulingPolicySummary( + this.id, + this.compartmentId, + this.displayName, + this.lifecycleState, + this.lifecycleDetails, + this.timeCreated, + this.timeUpdated, + this.cadence, + this.cadenceStartMonth, + this.timeNextWindowStarts, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SchedulingPolicySummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("cadence")) { + this.cadence(model.getCadence()); + } + if (model.wasPropertyExplicitlySet("cadenceStartMonth")) { + this.cadenceStartMonth(model.getCadenceStartMonth()); + } + if (model.wasPropertyExplicitlySet("timeNextWindowStarts")) { + this.timeNextWindowStarts(model.getTimeNextWindowStarts()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The user-friendly name for the Scheduling Policy. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the Scheduling Policy. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + public enum LifecycleState { + Creating("CREATING"), + NeedsAttention("NEEDS_ATTENTION"), + Available("AVAILABLE"), + Updating("UPDATING"), + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED. + * + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The date and time the Scheduling Policy was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the Scheduling Policy was created. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The last date and time that the Scheduling Policy was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The last date and time that the Scheduling Policy was updated. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The cadence period. + **/ + public enum Cadence { + Halfyearly("HALFYEARLY"), + Quarterly("QUARTERLY"), + Monthly("MONTHLY"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(Cadence.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Cadence v : Cadence.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Cadence(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Cadence create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Cadence', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The cadence period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cadence") + private final Cadence cadence; + + /** + * The cadence period. + * @return the value + **/ + public Cadence getCadence() { + return cadence; + } + + /** + * Start of the month to be followed during the cadence period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cadenceStartMonth") + private final Month cadenceStartMonth; + + /** + * Start of the month to be followed during the cadence period. + * @return the value + **/ + public Month getCadenceStartMonth() { + return cadenceStartMonth; + } + + /** + * The date and time of the next scheduling window associated with the schedulingPolicy is planned to start. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeNextWindowStarts") + private final java.util.Date timeNextWindowStarts; + + /** + * The date and time of the next scheduling window associated with the schedulingPolicy is planned to start. + * @return the value + **/ + public java.util.Date getTimeNextWindowStarts() { + return timeNextWindowStarts; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SchedulingPolicySummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", cadence=").append(String.valueOf(this.cadence)); + sb.append(", cadenceStartMonth=").append(String.valueOf(this.cadenceStartMonth)); + sb.append(", timeNextWindowStarts=").append(String.valueOf(this.timeNextWindowStarts)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SchedulingPolicySummary)) { + return false; + } + + SchedulingPolicySummary other = (SchedulingPolicySummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.cadence, other.cadence) + && java.util.Objects.equals(this.cadenceStartMonth, other.cadenceStartMonth) + && java.util.Objects.equals(this.timeNextWindowStarts, other.timeNextWindowStarts) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.cadence == null ? 43 : this.cadence.hashCode()); + result = + (result * PRIME) + + (this.cadenceStartMonth == null ? 43 : this.cadenceStartMonth.hashCode()); + result = + (result * PRIME) + + (this.timeNextWindowStarts == null + ? 43 + : this.timeNextWindowStarts.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingWindow.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingWindow.java new file mode 100644 index 00000000000..a5f6a64f57e --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingWindow.java @@ -0,0 +1,666 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of a Scheduling Window. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = SchedulingWindow.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SchedulingWindow extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "timeNextSchedulingWindowStarts", + "lifecycleState", + "lifecycleDetails", + "timeCreated", + "timeUpdated", + "windowPreference", + "schedulingPolicyId", + "freeformTags", + "definedTags" + }) + public SchedulingWindow( + String id, + String compartmentId, + String displayName, + java.util.Date timeNextSchedulingWindowStarts, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated, + WindowPreferenceDetail windowPreference, + String schedulingPolicyId, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.timeNextSchedulingWindowStarts = timeNextSchedulingWindowStarts; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.windowPreference = windowPreference; + this.schedulingPolicyId = schedulingPolicyId; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The user-friendly name for the Scheduling Window. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the Scheduling Window. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The date and time of the next upcoming window associated within the schedulingWindow is planned to start. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeNextSchedulingWindowStarts") + private java.util.Date timeNextSchedulingWindowStarts; + + /** + * The date and time of the next upcoming window associated within the schedulingWindow is planned to start. + * @param timeNextSchedulingWindowStarts the value to set + * @return this builder + **/ + public Builder timeNextSchedulingWindowStarts( + java.util.Date timeNextSchedulingWindowStarts) { + this.timeNextSchedulingWindowStarts = timeNextSchedulingWindowStarts; + this.__explicitlySet__.add("timeNextSchedulingWindowStarts"); + return this; + } + /** + * The current state of the Scheduling Window. Valid states are CREATING, ACTIVE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Scheduling Window. Valid states are CREATING, ACTIVE, UPDATING, FAILED, DELETING and DELETED. + * + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The date and time the Scheduling Window was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the Scheduling Window was created. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The last date and time that the Scheduling Window was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The last date and time that the Scheduling Window was updated. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("windowPreference") + private WindowPreferenceDetail windowPreference; + + public Builder windowPreference(WindowPreferenceDetail windowPreference) { + this.windowPreference = windowPreference; + this.__explicitlySet__.add("windowPreference"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingPolicyId") + private String schedulingPolicyId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + * @param schedulingPolicyId the value to set + * @return this builder + **/ + public Builder schedulingPolicyId(String schedulingPolicyId) { + this.schedulingPolicyId = schedulingPolicyId; + this.__explicitlySet__.add("schedulingPolicyId"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SchedulingWindow build() { + SchedulingWindow model = + new SchedulingWindow( + this.id, + this.compartmentId, + this.displayName, + this.timeNextSchedulingWindowStarts, + this.lifecycleState, + this.lifecycleDetails, + this.timeCreated, + this.timeUpdated, + this.windowPreference, + this.schedulingPolicyId, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SchedulingWindow model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("timeNextSchedulingWindowStarts")) { + this.timeNextSchedulingWindowStarts(model.getTimeNextSchedulingWindowStarts()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("windowPreference")) { + this.windowPreference(model.getWindowPreference()); + } + if (model.wasPropertyExplicitlySet("schedulingPolicyId")) { + this.schedulingPolicyId(model.getSchedulingPolicyId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The user-friendly name for the Scheduling Window. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the Scheduling Window. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The date and time of the next upcoming window associated within the schedulingWindow is planned to start. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeNextSchedulingWindowStarts") + private final java.util.Date timeNextSchedulingWindowStarts; + + /** + * The date and time of the next upcoming window associated within the schedulingWindow is planned to start. + * @return the value + **/ + public java.util.Date getTimeNextSchedulingWindowStarts() { + return timeNextSchedulingWindowStarts; + } + + /** + * The current state of the Scheduling Window. Valid states are CREATING, ACTIVE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + public enum LifecycleState { + Creating("CREATING"), + Available("AVAILABLE"), + Updating("UPDATING"), + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the Scheduling Window. Valid states are CREATING, ACTIVE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Scheduling Window. Valid states are CREATING, ACTIVE, UPDATING, FAILED, DELETING and DELETED. + * + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The date and time the Scheduling Window was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the Scheduling Window was created. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The last date and time that the Scheduling Window was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The last date and time that the Scheduling Window was updated. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("windowPreference") + private final WindowPreferenceDetail windowPreference; + + public WindowPreferenceDetail getWindowPreference() { + return windowPreference; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingPolicyId") + private final String schedulingPolicyId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + * @return the value + **/ + public String getSchedulingPolicyId() { + return schedulingPolicyId; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SchedulingWindow("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", timeNextSchedulingWindowStarts=") + .append(String.valueOf(this.timeNextSchedulingWindowStarts)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", windowPreference=").append(String.valueOf(this.windowPreference)); + sb.append(", schedulingPolicyId=").append(String.valueOf(this.schedulingPolicyId)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SchedulingWindow)) { + return false; + } + + SchedulingWindow other = (SchedulingWindow) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals( + this.timeNextSchedulingWindowStarts, other.timeNextSchedulingWindowStarts) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.windowPreference, other.windowPreference) + && java.util.Objects.equals(this.schedulingPolicyId, other.schedulingPolicyId) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.timeNextSchedulingWindowStarts == null + ? 43 + : this.timeNextSchedulingWindowStarts.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.windowPreference == null ? 43 : this.windowPreference.hashCode()); + result = + (result * PRIME) + + (this.schedulingPolicyId == null + ? 43 + : this.schedulingPolicyId.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingWindowSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingWindowSummary.java new file mode 100644 index 00000000000..c2b8ae88f72 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/SchedulingWindowSummary.java @@ -0,0 +1,669 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details of a Scheduling Window. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SchedulingWindowSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SchedulingWindowSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "timeNextSchedulingWindowStarts", + "lifecycleState", + "lifecycleDetails", + "timeCreated", + "timeUpdated", + "windowPreference", + "schedulingPolicyId", + "freeformTags", + "definedTags" + }) + public SchedulingWindowSummary( + String id, + String compartmentId, + String displayName, + java.util.Date timeNextSchedulingWindowStarts, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated, + WindowPreferenceDetail windowPreference, + String schedulingPolicyId, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.timeNextSchedulingWindowStarts = timeNextSchedulingWindowStarts; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.windowPreference = windowPreference; + this.schedulingPolicyId = schedulingPolicyId; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The user-friendly name for the Scheduling Window. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the Scheduling Window. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The date and time of the next upcoming window associated within the schedulingWindow is planned to start. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeNextSchedulingWindowStarts") + private java.util.Date timeNextSchedulingWindowStarts; + + /** + * The date and time of the next upcoming window associated within the schedulingWindow is planned to start. + * @param timeNextSchedulingWindowStarts the value to set + * @return this builder + **/ + public Builder timeNextSchedulingWindowStarts( + java.util.Date timeNextSchedulingWindowStarts) { + this.timeNextSchedulingWindowStarts = timeNextSchedulingWindowStarts; + this.__explicitlySet__.add("timeNextSchedulingWindowStarts"); + return this; + } + /** + * The current state of the Scheduling Window. Valid states are CREATING, ACTIVE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Scheduling Window. Valid states are CREATING, ACTIVE, UPDATING, FAILED, DELETING and DELETED. + * + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The date and time the Scheduling Window was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the Scheduling Window was created. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The last date and time that the Scheduling Window was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The last date and time that the Scheduling Window was updated. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("windowPreference") + private WindowPreferenceDetail windowPreference; + + public Builder windowPreference(WindowPreferenceDetail windowPreference) { + this.windowPreference = windowPreference; + this.__explicitlySet__.add("windowPreference"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingPolicyId") + private String schedulingPolicyId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + * @param schedulingPolicyId the value to set + * @return this builder + **/ + public Builder schedulingPolicyId(String schedulingPolicyId) { + this.schedulingPolicyId = schedulingPolicyId; + this.__explicitlySet__.add("schedulingPolicyId"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SchedulingWindowSummary build() { + SchedulingWindowSummary model = + new SchedulingWindowSummary( + this.id, + this.compartmentId, + this.displayName, + this.timeNextSchedulingWindowStarts, + this.lifecycleState, + this.lifecycleDetails, + this.timeCreated, + this.timeUpdated, + this.windowPreference, + this.schedulingPolicyId, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SchedulingWindowSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("timeNextSchedulingWindowStarts")) { + this.timeNextSchedulingWindowStarts(model.getTimeNextSchedulingWindowStarts()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("windowPreference")) { + this.windowPreference(model.getWindowPreference()); + } + if (model.wasPropertyExplicitlySet("schedulingPolicyId")) { + this.schedulingPolicyId(model.getSchedulingPolicyId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The user-friendly name for the Scheduling Window. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the Scheduling Window. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The date and time of the next upcoming window associated within the schedulingWindow is planned to start. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeNextSchedulingWindowStarts") + private final java.util.Date timeNextSchedulingWindowStarts; + + /** + * The date and time of the next upcoming window associated within the schedulingWindow is planned to start. + * @return the value + **/ + public java.util.Date getTimeNextSchedulingWindowStarts() { + return timeNextSchedulingWindowStarts; + } + + /** + * The current state of the Scheduling Window. Valid states are CREATING, ACTIVE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + public enum LifecycleState { + Creating("CREATING"), + Available("AVAILABLE"), + Updating("UPDATING"), + Failed("FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the Scheduling Window. Valid states are CREATING, ACTIVE, UPDATING, FAILED, DELETING and DELETED. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Scheduling Window. Valid states are CREATING, ACTIVE, UPDATING, FAILED, DELETING and DELETED. + * + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Additional information about the current lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Additional information about the current lifecycle state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The date and time the Scheduling Window was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the Scheduling Window was created. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The last date and time that the Scheduling Window was updated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The last date and time that the Scheduling Window was updated. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("windowPreference") + private final WindowPreferenceDetail windowPreference; + + public WindowPreferenceDetail getWindowPreference() { + return windowPreference; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingPolicyId") + private final String schedulingPolicyId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. + * @return the value + **/ + public String getSchedulingPolicyId() { + return schedulingPolicyId; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SchedulingWindowSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", timeNextSchedulingWindowStarts=") + .append(String.valueOf(this.timeNextSchedulingWindowStarts)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", windowPreference=").append(String.valueOf(this.windowPreference)); + sb.append(", schedulingPolicyId=").append(String.valueOf(this.schedulingPolicyId)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SchedulingWindowSummary)) { + return false; + } + + SchedulingWindowSummary other = (SchedulingWindowSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals( + this.timeNextSchedulingWindowStarts, other.timeNextSchedulingWindowStarts) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.windowPreference, other.windowPreference) + && java.util.Objects.equals(this.schedulingPolicyId, other.schedulingPolicyId) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.timeNextSchedulingWindowStarts == null + ? 43 + : this.timeNextSchedulingWindowStarts.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.windowPreference == null ? 43 : this.windowPreference.hashCode()); + result = + (result * PRIME) + + (this.schedulingPolicyId == null + ? 43 + : this.schedulingPolicyId.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/SetKeyVersionDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/SetKeyVersionDetails.java new file mode 100644 index 00000000000..58a123f6e25 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/SetKeyVersionDetails.java @@ -0,0 +1,112 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Updating the database key version + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "provider", + defaultImpl = SetKeyVersionDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = OciProviderSetKeyVersionDetails.class, + name = "OCI" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class SetKeyVersionDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected SetKeyVersionDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SetKeyVersionDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SetKeyVersionDetails)) { + return false; + } + + SetKeyVersionDetails other = (SetKeyVersionDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Source of key version. + **/ + public enum Provider { + Oci("OCI"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Provider v : Provider.values()) { + map.put(v.getValue(), v); + } + } + + Provider(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Provider create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Provider: " + key); + } + }; +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UndeleteAutonomousDatabaseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UndeleteAutonomousDatabaseDetails.java new file mode 100644 index 00000000000..2276c3f948c --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UndeleteAutonomousDatabaseDetails.java @@ -0,0 +1,928 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details to undelete an Oracle Autonomous Database. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UndeleteAutonomousDatabaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "source" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UndeleteAutonomousDatabaseDetails extends CreateAutonomousDatabaseBase { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("characterSet") + private String characterSet; + + public Builder characterSet(String characterSet) { + this.characterSet = characterSet; + this.__explicitlySet__.add("characterSet"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("ncharacterSet") + private String ncharacterSet; + + public Builder ncharacterSet(String ncharacterSet) { + this.ncharacterSet = ncharacterSet; + this.__explicitlySet__.add("ncharacterSet"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbName") + private String dbName; + + public Builder dbName(String dbName) { + this.dbName = dbName; + this.__explicitlySet__.add("dbName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("cpuCoreCount") + private Integer cpuCoreCount; + + public Builder cpuCoreCount(Integer cpuCoreCount) { + this.cpuCoreCount = cpuCoreCount; + this.__explicitlySet__.add("cpuCoreCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("backupRetentionPeriodInDays") + private Integer backupRetentionPeriodInDays; + + public Builder backupRetentionPeriodInDays(Integer backupRetentionPeriodInDays) { + this.backupRetentionPeriodInDays = backupRetentionPeriodInDays; + this.__explicitlySet__.add("backupRetentionPeriodInDays"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("computeModel") + private ComputeModel computeModel; + + public Builder computeModel(ComputeModel computeModel) { + this.computeModel = computeModel; + this.__explicitlySet__.add("computeModel"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("computeCount") + private Float computeCount; + + public Builder computeCount(Float computeCount) { + this.computeCount = computeCount; + this.__explicitlySet__.add("computeCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("ocpuCount") + private Float ocpuCount; + + public Builder ocpuCount(Float ocpuCount) { + this.ocpuCount = ocpuCount; + this.__explicitlySet__.add("ocpuCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbWorkload") + private DbWorkload dbWorkload; + + public Builder dbWorkload(DbWorkload dbWorkload) { + this.dbWorkload = dbWorkload; + this.__explicitlySet__.add("dbWorkload"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInTBs") + private Integer dataStorageSizeInTBs; + + public Builder dataStorageSizeInTBs(Integer dataStorageSizeInTBs) { + this.dataStorageSizeInTBs = dataStorageSizeInTBs; + this.__explicitlySet__.add("dataStorageSizeInTBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGBs") + private Integer dataStorageSizeInGBs; + + public Builder dataStorageSizeInGBs(Integer dataStorageSizeInGBs) { + this.dataStorageSizeInGBs = dataStorageSizeInGBs; + this.__explicitlySet__.add("dataStorageSizeInGBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isFreeTier") + private Boolean isFreeTier; + + public Builder isFreeTier(Boolean isFreeTier) { + this.isFreeTier = isFreeTier; + this.__explicitlySet__.add("isFreeTier"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKey") + private AutonomousDatabaseEncryptionKeyDetails encryptionKey; + + public Builder encryptionKey(AutonomousDatabaseEncryptionKeyDetails encryptionKey) { + this.encryptionKey = encryptionKey; + this.__explicitlySet__.add("encryptionKey"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("adminPassword") + private String adminPassword; + + public Builder adminPassword(String adminPassword) { + this.adminPassword = adminPassword; + this.__explicitlySet__.add("adminPassword"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private LicenseModel licenseModel; + + public Builder licenseModel(LicenseModel licenseModel) { + this.licenseModel = licenseModel; + this.__explicitlySet__.add("licenseModel"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("byolComputeCountLimit") + private Float byolComputeCountLimit; + + public Builder byolComputeCountLimit(Float byolComputeCountLimit) { + this.byolComputeCountLimit = byolComputeCountLimit; + this.__explicitlySet__.add("byolComputeCountLimit"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isPreviewVersionWithServiceTermsAccepted") + private Boolean isPreviewVersionWithServiceTermsAccepted; + + public Builder isPreviewVersionWithServiceTermsAccepted( + Boolean isPreviewVersionWithServiceTermsAccepted) { + this.isPreviewVersionWithServiceTermsAccepted = + isPreviewVersionWithServiceTermsAccepted; + this.__explicitlySet__.add("isPreviewVersionWithServiceTermsAccepted"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isAutoScalingEnabled") + private Boolean isAutoScalingEnabled; + + public Builder isAutoScalingEnabled(Boolean isAutoScalingEnabled) { + this.isAutoScalingEnabled = isAutoScalingEnabled; + this.__explicitlySet__.add("isAutoScalingEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isDevTier") + private Boolean isDevTier; + + public Builder isDevTier(Boolean isDevTier) { + this.isDevTier = isDevTier; + this.__explicitlySet__.add("isDevTier"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isDedicated") + private Boolean isDedicated; + + public Builder isDedicated(Boolean isDedicated) { + this.isDedicated = isDedicated; + this.__explicitlySet__.add("isDedicated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("autonomousContainerDatabaseId") + private String autonomousContainerDatabaseId; + + public Builder autonomousContainerDatabaseId(String autonomousContainerDatabaseId) { + this.autonomousContainerDatabaseId = autonomousContainerDatabaseId; + this.__explicitlySet__.add("autonomousContainerDatabaseId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("inMemoryPercentage") + private Integer inMemoryPercentage; + + public Builder inMemoryPercentage(Integer inMemoryPercentage) { + this.inMemoryPercentage = inMemoryPercentage; + this.__explicitlySet__.add("inMemoryPercentage"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isAccessControlEnabled") + private Boolean isAccessControlEnabled; + + public Builder isAccessControlEnabled(Boolean isAccessControlEnabled) { + this.isAccessControlEnabled = isAccessControlEnabled; + this.__explicitlySet__.add("isAccessControlEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("whitelistedIps") + private java.util.List whitelistedIps; + + public Builder whitelistedIps(java.util.List whitelistedIps) { + this.whitelistedIps = whitelistedIps; + this.__explicitlySet__.add("whitelistedIps"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("arePrimaryWhitelistedIpsUsed") + private Boolean arePrimaryWhitelistedIpsUsed; + + public Builder arePrimaryWhitelistedIpsUsed(Boolean arePrimaryWhitelistedIpsUsed) { + this.arePrimaryWhitelistedIpsUsed = arePrimaryWhitelistedIpsUsed; + this.__explicitlySet__.add("arePrimaryWhitelistedIpsUsed"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("standbyWhitelistedIps") + private java.util.List standbyWhitelistedIps; + + public Builder standbyWhitelistedIps(java.util.List standbyWhitelistedIps) { + this.standbyWhitelistedIps = standbyWhitelistedIps; + this.__explicitlySet__.add("standbyWhitelistedIps"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isDataGuardEnabled") + private Boolean isDataGuardEnabled; + + public Builder isDataGuardEnabled(Boolean isDataGuardEnabled) { + this.isDataGuardEnabled = isDataGuardEnabled; + this.__explicitlySet__.add("isDataGuardEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isLocalDataGuardEnabled") + private Boolean isLocalDataGuardEnabled; + + public Builder isLocalDataGuardEnabled(Boolean isLocalDataGuardEnabled) { + this.isLocalDataGuardEnabled = isLocalDataGuardEnabled; + this.__explicitlySet__.add("isLocalDataGuardEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + public Builder subnetId(String subnetId) { + this.subnetId = subnetId; + this.__explicitlySet__.add("subnetId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private java.util.List nsgIds; + + public Builder nsgIds(java.util.List nsgIds) { + this.nsgIds = nsgIds; + this.__explicitlySet__.add("nsgIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointLabel") + private String privateEndpointLabel; + + public Builder privateEndpointLabel(String privateEndpointLabel) { + this.privateEndpointLabel = privateEndpointLabel; + this.__explicitlySet__.add("privateEndpointLabel"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") + private String privateEndpointIp; + + public Builder privateEndpointIp(String privateEndpointIp) { + this.privateEndpointIp = privateEndpointIp; + this.__explicitlySet__.add("privateEndpointIp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") + private String dbVersion; + + public Builder dbVersion(String dbVersion) { + this.dbVersion = dbVersion; + this.__explicitlySet__.add("dbVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("customerContacts") + private java.util.List customerContacts; + + public Builder customerContacts(java.util.List customerContacts) { + this.customerContacts = customerContacts; + this.__explicitlySet__.add("customerContacts"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isMtlsConnectionRequired") + private Boolean isMtlsConnectionRequired; + + public Builder isMtlsConnectionRequired(Boolean isMtlsConnectionRequired) { + this.isMtlsConnectionRequired = isMtlsConnectionRequired; + this.__explicitlySet__.add("isMtlsConnectionRequired"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resourcePoolLeaderId") + private String resourcePoolLeaderId; + + public Builder resourcePoolLeaderId(String resourcePoolLeaderId) { + this.resourcePoolLeaderId = resourcePoolLeaderId; + this.__explicitlySet__.add("resourcePoolLeaderId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resourcePoolSummary") + private ResourcePoolSummary resourcePoolSummary; + + public Builder resourcePoolSummary(ResourcePoolSummary resourcePoolSummary) { + this.resourcePoolSummary = resourcePoolSummary; + this.__explicitlySet__.add("resourcePoolSummary"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("autonomousMaintenanceScheduleType") + private AutonomousMaintenanceScheduleType autonomousMaintenanceScheduleType; + + public Builder autonomousMaintenanceScheduleType( + AutonomousMaintenanceScheduleType autonomousMaintenanceScheduleType) { + this.autonomousMaintenanceScheduleType = autonomousMaintenanceScheduleType; + this.__explicitlySet__.add("autonomousMaintenanceScheduleType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("scheduledOperations") + private java.util.List scheduledOperations; + + public Builder scheduledOperations( + java.util.List scheduledOperations) { + this.scheduledOperations = scheduledOperations; + this.__explicitlySet__.add("scheduledOperations"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isAutoScalingForStorageEnabled") + private Boolean isAutoScalingForStorageEnabled; + + public Builder isAutoScalingForStorageEnabled(Boolean isAutoScalingForStorageEnabled) { + this.isAutoScalingForStorageEnabled = isAutoScalingForStorageEnabled; + this.__explicitlySet__.add("isAutoScalingForStorageEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseEdition") + private AutonomousDatabaseSummary.DatabaseEdition databaseEdition; + + public Builder databaseEdition(AutonomousDatabaseSummary.DatabaseEdition databaseEdition) { + this.databaseEdition = databaseEdition; + this.__explicitlySet__.add("databaseEdition"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dbToolsDetails") + private java.util.List dbToolsDetails; + + public Builder dbToolsDetails(java.util.List dbToolsDetails) { + this.dbToolsDetails = dbToolsDetails; + this.__explicitlySet__.add("dbToolsDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("secretId") + private String secretId; + + public Builder secretId(String secretId) { + this.secretId = secretId; + this.__explicitlySet__.add("secretId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("secretVersionNumber") + private Integer secretVersionNumber; + + public Builder secretVersionNumber(Integer secretVersionNumber) { + this.secretVersionNumber = secretVersionNumber; + this.__explicitlySet__.add("secretVersionNumber"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database that you want to undelete. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceId") + private String sourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database that you want to undelete. + * @param sourceId the value to set + * @return this builder + **/ + public Builder sourceId(String sourceId) { + this.sourceId = sourceId; + this.__explicitlySet__.add("sourceId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UndeleteAutonomousDatabaseDetails build() { + UndeleteAutonomousDatabaseDetails model = + new UndeleteAutonomousDatabaseDetails( + this.subscriptionId, + this.compartmentId, + this.characterSet, + this.ncharacterSet, + this.dbName, + this.cpuCoreCount, + this.backupRetentionPeriodInDays, + this.computeModel, + this.computeCount, + this.ocpuCount, + this.dbWorkload, + this.dataStorageSizeInTBs, + this.dataStorageSizeInGBs, + this.isFreeTier, + this.kmsKeyId, + this.vaultId, + this.encryptionKey, + this.adminPassword, + this.displayName, + this.licenseModel, + this.byolComputeCountLimit, + this.isPreviewVersionWithServiceTermsAccepted, + this.isAutoScalingEnabled, + this.isDevTier, + this.isDedicated, + this.autonomousContainerDatabaseId, + this.inMemoryPercentage, + this.isAccessControlEnabled, + this.whitelistedIps, + this.arePrimaryWhitelistedIpsUsed, + this.standbyWhitelistedIps, + this.isDataGuardEnabled, + this.isLocalDataGuardEnabled, + this.subnetId, + this.nsgIds, + this.privateEndpointLabel, + this.freeformTags, + this.definedTags, + this.securityAttributes, + this.privateEndpointIp, + this.dbVersion, + this.customerContacts, + this.isMtlsConnectionRequired, + this.resourcePoolLeaderId, + this.resourcePoolSummary, + this.autonomousMaintenanceScheduleType, + this.scheduledOperations, + this.isAutoScalingForStorageEnabled, + this.databaseEdition, + this.dbToolsDetails, + this.secretId, + this.secretVersionNumber, + this.sourceId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UndeleteAutonomousDatabaseDetails model) { + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("characterSet")) { + this.characterSet(model.getCharacterSet()); + } + if (model.wasPropertyExplicitlySet("ncharacterSet")) { + this.ncharacterSet(model.getNcharacterSet()); + } + if (model.wasPropertyExplicitlySet("dbName")) { + this.dbName(model.getDbName()); + } + if (model.wasPropertyExplicitlySet("cpuCoreCount")) { + this.cpuCoreCount(model.getCpuCoreCount()); + } + if (model.wasPropertyExplicitlySet("backupRetentionPeriodInDays")) { + this.backupRetentionPeriodInDays(model.getBackupRetentionPeriodInDays()); + } + if (model.wasPropertyExplicitlySet("computeModel")) { + this.computeModel(model.getComputeModel()); + } + if (model.wasPropertyExplicitlySet("computeCount")) { + this.computeCount(model.getComputeCount()); + } + if (model.wasPropertyExplicitlySet("ocpuCount")) { + this.ocpuCount(model.getOcpuCount()); + } + if (model.wasPropertyExplicitlySet("dbWorkload")) { + this.dbWorkload(model.getDbWorkload()); + } + if (model.wasPropertyExplicitlySet("dataStorageSizeInTBs")) { + this.dataStorageSizeInTBs(model.getDataStorageSizeInTBs()); + } + if (model.wasPropertyExplicitlySet("dataStorageSizeInGBs")) { + this.dataStorageSizeInGBs(model.getDataStorageSizeInGBs()); + } + if (model.wasPropertyExplicitlySet("isFreeTier")) { + this.isFreeTier(model.getIsFreeTier()); + } + if (model.wasPropertyExplicitlySet("kmsKeyId")) { + this.kmsKeyId(model.getKmsKeyId()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("encryptionKey")) { + this.encryptionKey(model.getEncryptionKey()); + } + if (model.wasPropertyExplicitlySet("adminPassword")) { + this.adminPassword(model.getAdminPassword()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("licenseModel")) { + this.licenseModel(model.getLicenseModel()); + } + if (model.wasPropertyExplicitlySet("byolComputeCountLimit")) { + this.byolComputeCountLimit(model.getByolComputeCountLimit()); + } + if (model.wasPropertyExplicitlySet("isPreviewVersionWithServiceTermsAccepted")) { + this.isPreviewVersionWithServiceTermsAccepted( + model.getIsPreviewVersionWithServiceTermsAccepted()); + } + if (model.wasPropertyExplicitlySet("isAutoScalingEnabled")) { + this.isAutoScalingEnabled(model.getIsAutoScalingEnabled()); + } + if (model.wasPropertyExplicitlySet("isDevTier")) { + this.isDevTier(model.getIsDevTier()); + } + if (model.wasPropertyExplicitlySet("isDedicated")) { + this.isDedicated(model.getIsDedicated()); + } + if (model.wasPropertyExplicitlySet("autonomousContainerDatabaseId")) { + this.autonomousContainerDatabaseId(model.getAutonomousContainerDatabaseId()); + } + if (model.wasPropertyExplicitlySet("inMemoryPercentage")) { + this.inMemoryPercentage(model.getInMemoryPercentage()); + } + if (model.wasPropertyExplicitlySet("isAccessControlEnabled")) { + this.isAccessControlEnabled(model.getIsAccessControlEnabled()); + } + if (model.wasPropertyExplicitlySet("whitelistedIps")) { + this.whitelistedIps(model.getWhitelistedIps()); + } + if (model.wasPropertyExplicitlySet("arePrimaryWhitelistedIpsUsed")) { + this.arePrimaryWhitelistedIpsUsed(model.getArePrimaryWhitelistedIpsUsed()); + } + if (model.wasPropertyExplicitlySet("standbyWhitelistedIps")) { + this.standbyWhitelistedIps(model.getStandbyWhitelistedIps()); + } + if (model.wasPropertyExplicitlySet("isDataGuardEnabled")) { + this.isDataGuardEnabled(model.getIsDataGuardEnabled()); + } + if (model.wasPropertyExplicitlySet("isLocalDataGuardEnabled")) { + this.isLocalDataGuardEnabled(model.getIsLocalDataGuardEnabled()); + } + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + if (model.wasPropertyExplicitlySet("nsgIds")) { + this.nsgIds(model.getNsgIds()); + } + if (model.wasPropertyExplicitlySet("privateEndpointLabel")) { + this.privateEndpointLabel(model.getPrivateEndpointLabel()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } + if (model.wasPropertyExplicitlySet("privateEndpointIp")) { + this.privateEndpointIp(model.getPrivateEndpointIp()); + } + if (model.wasPropertyExplicitlySet("dbVersion")) { + this.dbVersion(model.getDbVersion()); + } + if (model.wasPropertyExplicitlySet("customerContacts")) { + this.customerContacts(model.getCustomerContacts()); + } + if (model.wasPropertyExplicitlySet("isMtlsConnectionRequired")) { + this.isMtlsConnectionRequired(model.getIsMtlsConnectionRequired()); + } + if (model.wasPropertyExplicitlySet("resourcePoolLeaderId")) { + this.resourcePoolLeaderId(model.getResourcePoolLeaderId()); + } + if (model.wasPropertyExplicitlySet("resourcePoolSummary")) { + this.resourcePoolSummary(model.getResourcePoolSummary()); + } + if (model.wasPropertyExplicitlySet("autonomousMaintenanceScheduleType")) { + this.autonomousMaintenanceScheduleType( + model.getAutonomousMaintenanceScheduleType()); + } + if (model.wasPropertyExplicitlySet("scheduledOperations")) { + this.scheduledOperations(model.getScheduledOperations()); + } + if (model.wasPropertyExplicitlySet("isAutoScalingForStorageEnabled")) { + this.isAutoScalingForStorageEnabled(model.getIsAutoScalingForStorageEnabled()); + } + if (model.wasPropertyExplicitlySet("databaseEdition")) { + this.databaseEdition(model.getDatabaseEdition()); + } + if (model.wasPropertyExplicitlySet("dbToolsDetails")) { + this.dbToolsDetails(model.getDbToolsDetails()); + } + if (model.wasPropertyExplicitlySet("secretId")) { + this.secretId(model.getSecretId()); + } + if (model.wasPropertyExplicitlySet("secretVersionNumber")) { + this.secretVersionNumber(model.getSecretVersionNumber()); + } + if (model.wasPropertyExplicitlySet("sourceId")) { + this.sourceId(model.getSourceId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public UndeleteAutonomousDatabaseDetails( + String subscriptionId, + String compartmentId, + String characterSet, + String ncharacterSet, + String dbName, + Integer cpuCoreCount, + Integer backupRetentionPeriodInDays, + ComputeModel computeModel, + Float computeCount, + Float ocpuCount, + DbWorkload dbWorkload, + Integer dataStorageSizeInTBs, + Integer dataStorageSizeInGBs, + Boolean isFreeTier, + String kmsKeyId, + String vaultId, + AutonomousDatabaseEncryptionKeyDetails encryptionKey, + String adminPassword, + String displayName, + LicenseModel licenseModel, + Float byolComputeCountLimit, + Boolean isPreviewVersionWithServiceTermsAccepted, + Boolean isAutoScalingEnabled, + Boolean isDevTier, + Boolean isDedicated, + String autonomousContainerDatabaseId, + Integer inMemoryPercentage, + Boolean isAccessControlEnabled, + java.util.List whitelistedIps, + Boolean arePrimaryWhitelistedIpsUsed, + java.util.List standbyWhitelistedIps, + Boolean isDataGuardEnabled, + Boolean isLocalDataGuardEnabled, + String subnetId, + java.util.List nsgIds, + String privateEndpointLabel, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> securityAttributes, + String privateEndpointIp, + String dbVersion, + java.util.List customerContacts, + Boolean isMtlsConnectionRequired, + String resourcePoolLeaderId, + ResourcePoolSummary resourcePoolSummary, + AutonomousMaintenanceScheduleType autonomousMaintenanceScheduleType, + java.util.List scheduledOperations, + Boolean isAutoScalingForStorageEnabled, + AutonomousDatabaseSummary.DatabaseEdition databaseEdition, + java.util.List dbToolsDetails, + String secretId, + Integer secretVersionNumber, + String sourceId) { + super( + subscriptionId, + compartmentId, + characterSet, + ncharacterSet, + dbName, + cpuCoreCount, + backupRetentionPeriodInDays, + computeModel, + computeCount, + ocpuCount, + dbWorkload, + dataStorageSizeInTBs, + dataStorageSizeInGBs, + isFreeTier, + kmsKeyId, + vaultId, + encryptionKey, + adminPassword, + displayName, + licenseModel, + byolComputeCountLimit, + isPreviewVersionWithServiceTermsAccepted, + isAutoScalingEnabled, + isDevTier, + isDedicated, + autonomousContainerDatabaseId, + inMemoryPercentage, + isAccessControlEnabled, + whitelistedIps, + arePrimaryWhitelistedIpsUsed, + standbyWhitelistedIps, + isDataGuardEnabled, + isLocalDataGuardEnabled, + subnetId, + nsgIds, + privateEndpointLabel, + freeformTags, + definedTags, + securityAttributes, + privateEndpointIp, + dbVersion, + customerContacts, + isMtlsConnectionRequired, + resourcePoolLeaderId, + resourcePoolSummary, + autonomousMaintenanceScheduleType, + scheduledOperations, + isAutoScalingForStorageEnabled, + databaseEdition, + dbToolsDetails, + secretId, + secretVersionNumber); + this.sourceId = sourceId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database that you want to undelete. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceId") + private final String sourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database that you want to undelete. + * @return the value + **/ + public String getSourceId() { + return sourceId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UndeleteAutonomousDatabaseDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", sourceId=").append(String.valueOf(this.sourceId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UndeleteAutonomousDatabaseDetails)) { + return false; + } + + UndeleteAutonomousDatabaseDetails other = (UndeleteAutonomousDatabaseDetails) o; + return java.util.Objects.equals(this.sourceId, other.sourceId) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.sourceId == null ? 43 : this.sourceId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateAutonomousDatabaseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateAutonomousDatabaseDetails.java index b1e80df29e1..793cd5e832b 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateAutonomousDatabaseDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateAutonomousDatabaseDetails.java @@ -47,8 +47,10 @@ public final class UpdateAutonomousDatabaseDetails "dbName", "freeformTags", "definedTags", + "securityAttributes", "dbWorkload", "licenseModel", + "byolComputeCountLimit", "isAccessControlEnabled", "whitelistedIps", "arePrimaryWhitelistedIpsUsed", @@ -78,7 +80,8 @@ public final class UpdateAutonomousDatabaseDetails "databaseEdition", "dbToolsDetails", "secretId", - "secretVersionNumber" + "secretVersionNumber", + "encryptionKey" }) public UpdateAutonomousDatabaseDetails( Integer backupRetentionPeriodInDays, @@ -98,8 +101,10 @@ public UpdateAutonomousDatabaseDetails( String dbName, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, DbWorkload dbWorkload, LicenseModel licenseModel, + Float byolComputeCountLimit, Boolean isAccessControlEnabled, java.util.List whitelistedIps, Boolean arePrimaryWhitelistedIpsUsed, @@ -129,7 +134,8 @@ public UpdateAutonomousDatabaseDetails( AutonomousDatabaseSummary.DatabaseEdition databaseEdition, java.util.List dbToolsDetails, String secretId, - Integer secretVersionNumber) { + Integer secretVersionNumber, + AutonomousDatabaseEncryptionKeyDetails encryptionKey) { super(); this.backupRetentionPeriodInDays = backupRetentionPeriodInDays; this.computeModel = computeModel; @@ -148,8 +154,10 @@ public UpdateAutonomousDatabaseDetails( this.dbName = dbName; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.dbWorkload = dbWorkload; this.licenseModel = licenseModel; + this.byolComputeCountLimit = byolComputeCountLimit; this.isAccessControlEnabled = isAccessControlEnabled; this.whitelistedIps = whitelistedIps; this.arePrimaryWhitelistedIpsUsed = arePrimaryWhitelistedIpsUsed; @@ -180,6 +188,7 @@ public UpdateAutonomousDatabaseDetails( this.dbToolsDetails = dbToolsDetails; this.secretId = secretId; this.secretVersionNumber = secretVersionNumber; + this.encryptionKey = encryptionKey; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -292,14 +301,14 @@ public Builder longTermBackupSchedule( return this; } /** - * Autonomous Database for Developers are free Autonomous Databases that developers can use to build and test new applications.With Autonomous these database instancess instances, you can try new Autonomous Database features for free and apply them to ongoing or new development projects. Developer database comes with limited resources and is, therefore, not suitable for large-scale testing and production deployments. When you need more compute or storage resources, you can transition to a paid database licensing by cloning your developer database into a regular Autonomous Database. See [Autonomous Database documentation](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/eddjo/index.html) for more details. + * Autonomous Database for Developers are fixed-shape Autonomous Databases that developers can use to build and test new applications. On Serverless, these are low-cost and billed per instance, on Dedicated and Cloud@Customer there is no additional cost to create Developer databases. Developer databases come with limited resources and is not intended for large-scale testing and production deployments. When you need more compute or storage resources, you may upgrade to a full paid production database. * **/ @com.fasterxml.jackson.annotation.JsonProperty("isDevTier") private Boolean isDevTier; /** - * Autonomous Database for Developers are free Autonomous Databases that developers can use to build and test new applications.With Autonomous these database instancess instances, you can try new Autonomous Database features for free and apply them to ongoing or new development projects. Developer database comes with limited resources and is, therefore, not suitable for large-scale testing and production deployments. When you need more compute or storage resources, you can transition to a paid database licensing by cloning your developer database into a regular Autonomous Database. See [Autonomous Database documentation](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/eddjo/index.html) for more details. + * Autonomous Database for Developers are fixed-shape Autonomous Databases that developers can use to build and test new applications. On Serverless, these are low-cost and billed per instance, on Dedicated and Cloud@Customer there is no additional cost to create Developer databases. Developer databases come with limited resources and is not intended for large-scale testing and production deployments. When you need more compute or storage resources, you may upgrade to a full paid production database. * * @param isDevTier the value to set * @return this builder @@ -311,7 +320,7 @@ public Builder isDevTier(Boolean isDevTier) { } /** * The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. - * For an Autonomous Database Serverless instance, the 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. + * The 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. *

* This cannot be updated in parallel with any of the following: licenseModel, databaseEdition, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. * @@ -321,7 +330,7 @@ public Builder isDevTier(Boolean isDevTier) { /** * The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. - * For an Autonomous Database Serverless instance, the 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. + * The 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. *

* This cannot be updated in parallel with any of the following: licenseModel, databaseEdition, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. * @@ -556,6 +565,29 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * The Autonomous Database workload type. The following values are valid: *

@@ -616,6 +648,22 @@ public Builder licenseModel(LicenseModel licenseModel) { this.__explicitlySet__.add("licenseModel"); return this; } + /** + * The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("byolComputeCountLimit") + private Float byolComputeCountLimit; + + /** + * The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + * @param byolComputeCountLimit the value to set + * @return this builder + **/ + public Builder byolComputeCountLimit(Float byolComputeCountLimit) { + this.byolComputeCountLimit = byolComputeCountLimit; + this.__explicitlySet__.add("byolComputeCountLimit"); + return this; + } /** * Indicates if the database-level access control is enabled. * If disabled, database access is defined by the network security rules. @@ -1307,6 +1355,15 @@ public Builder secretVersionNumber(Integer secretVersionNumber) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKey") + private AutonomousDatabaseEncryptionKeyDetails encryptionKey; + + public Builder encryptionKey(AutonomousDatabaseEncryptionKeyDetails encryptionKey) { + this.encryptionKey = encryptionKey; + this.__explicitlySet__.add("encryptionKey"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -1330,8 +1387,10 @@ public UpdateAutonomousDatabaseDetails build() { this.dbName, this.freeformTags, this.definedTags, + this.securityAttributes, this.dbWorkload, this.licenseModel, + this.byolComputeCountLimit, this.isAccessControlEnabled, this.whitelistedIps, this.arePrimaryWhitelistedIpsUsed, @@ -1361,7 +1420,8 @@ public UpdateAutonomousDatabaseDetails build() { this.databaseEdition, this.dbToolsDetails, this.secretId, - this.secretVersionNumber); + this.secretVersionNumber, + this.encryptionKey); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -1422,12 +1482,18 @@ public Builder copy(UpdateAutonomousDatabaseDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("dbWorkload")) { this.dbWorkload(model.getDbWorkload()); } if (model.wasPropertyExplicitlySet("licenseModel")) { this.licenseModel(model.getLicenseModel()); } + if (model.wasPropertyExplicitlySet("byolComputeCountLimit")) { + this.byolComputeCountLimit(model.getByolComputeCountLimit()); + } if (model.wasPropertyExplicitlySet("isAccessControlEnabled")) { this.isAccessControlEnabled(model.getIsAccessControlEnabled()); } @@ -1518,6 +1584,9 @@ public Builder copy(UpdateAutonomousDatabaseDetails model) { if (model.wasPropertyExplicitlySet("secretVersionNumber")) { this.secretVersionNumber(model.getSecretVersionNumber()); } + if (model.wasPropertyExplicitlySet("encryptionKey")) { + this.encryptionKey(model.getEncryptionKey()); + } return this; } } @@ -1662,14 +1731,14 @@ public LongTermBackUpScheduleDetails getLongTermBackupSchedule() { } /** - * Autonomous Database for Developers are free Autonomous Databases that developers can use to build and test new applications.With Autonomous these database instancess instances, you can try new Autonomous Database features for free and apply them to ongoing or new development projects. Developer database comes with limited resources and is, therefore, not suitable for large-scale testing and production deployments. When you need more compute or storage resources, you can transition to a paid database licensing by cloning your developer database into a regular Autonomous Database. See [Autonomous Database documentation](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/eddjo/index.html) for more details. + * Autonomous Database for Developers are fixed-shape Autonomous Databases that developers can use to build and test new applications. On Serverless, these are low-cost and billed per instance, on Dedicated and Cloud@Customer there is no additional cost to create Developer databases. Developer databases come with limited resources and is not intended for large-scale testing and production deployments. When you need more compute or storage resources, you may upgrade to a full paid production database. * **/ @com.fasterxml.jackson.annotation.JsonProperty("isDevTier") private final Boolean isDevTier; /** - * Autonomous Database for Developers are free Autonomous Databases that developers can use to build and test new applications.With Autonomous these database instancess instances, you can try new Autonomous Database features for free and apply them to ongoing or new development projects. Developer database comes with limited resources and is, therefore, not suitable for large-scale testing and production deployments. When you need more compute or storage resources, you can transition to a paid database licensing by cloning your developer database into a regular Autonomous Database. See [Autonomous Database documentation](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/eddjo/index.html) for more details. + * Autonomous Database for Developers are fixed-shape Autonomous Databases that developers can use to build and test new applications. On Serverless, these are low-cost and billed per instance, on Dedicated and Cloud@Customer there is no additional cost to create Developer databases. Developer databases come with limited resources and is not intended for large-scale testing and production deployments. When you need more compute or storage resources, you may upgrade to a full paid production database. * * @return the value **/ @@ -1679,7 +1748,7 @@ public Boolean getIsDevTier() { /** * The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. - * For an Autonomous Database Serverless instance, the 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. + * The 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. *

* This cannot be updated in parallel with any of the following: licenseModel, databaseEdition, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. * @@ -1689,7 +1758,7 @@ public Boolean getIsDevTier() { /** * The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. - * For an Autonomous Database Serverless instance, the 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. + * The 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the {@code computeModel} parameter. When using {@code cpuCoreCount} parameter, it is an error to specify computeCount to a non-null value. Providing {@code computeModel} and {@code computeCount} is the preferred method for both OCPU and ECPU. *

* This cannot be updated in parallel with any of the following: licenseModel, databaseEdition, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. * @@ -1903,6 +1972,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The Autonomous Database workload type. The following values are valid: *

@@ -2045,6 +2134,20 @@ public LicenseModel getLicenseModel() { return licenseModel; } + /** + * The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("byolComputeCountLimit") + private final Float byolComputeCountLimit; + + /** + * The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + * @return the value + **/ + public Float getByolComputeCountLimit() { + return byolComputeCountLimit; + } + /** * Indicates if the database-level access control is enabled. * If disabled, database access is defined by the network security rules. @@ -2785,6 +2888,13 @@ public Integer getSecretVersionNumber() { return secretVersionNumber; } + @com.fasterxml.jackson.annotation.JsonProperty("encryptionKey") + private final AutonomousDatabaseEncryptionKeyDetails encryptionKey; + + public AutonomousDatabaseEncryptionKeyDetails getEncryptionKey() { + return encryptionKey; + } + @Override public String toString() { return this.toString(true); @@ -2818,8 +2928,10 @@ public String toString(boolean includeByteArrayContents) { sb.append(", dbName=").append(String.valueOf(this.dbName)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", dbWorkload=").append(String.valueOf(this.dbWorkload)); sb.append(", licenseModel=").append(String.valueOf(this.licenseModel)); + sb.append(", byolComputeCountLimit=").append(String.valueOf(this.byolComputeCountLimit)); sb.append(", isAccessControlEnabled=").append(String.valueOf(this.isAccessControlEnabled)); sb.append(", whitelistedIps=").append(String.valueOf(this.whitelistedIps)); sb.append(", arePrimaryWhitelistedIpsUsed=") @@ -2856,6 +2968,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", dbToolsDetails=").append(String.valueOf(this.dbToolsDetails)); sb.append(", secretId=").append(String.valueOf(this.secretId)); sb.append(", secretVersionNumber=").append(String.valueOf(this.secretVersionNumber)); + sb.append(", encryptionKey=").append(String.valueOf(this.encryptionKey)); sb.append(")"); return sb.toString(); } @@ -2891,8 +3004,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.dbName, other.dbName) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.dbWorkload, other.dbWorkload) && java.util.Objects.equals(this.licenseModel, other.licenseModel) + && java.util.Objects.equals(this.byolComputeCountLimit, other.byolComputeCountLimit) && java.util.Objects.equals( this.isAccessControlEnabled, other.isAccessControlEnabled) && java.util.Objects.equals(this.whitelistedIps, other.whitelistedIps) @@ -2931,6 +3046,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.dbToolsDetails, other.dbToolsDetails) && java.util.Objects.equals(this.secretId, other.secretId) && java.util.Objects.equals(this.secretVersionNumber, other.secretVersionNumber) + && java.util.Objects.equals(this.encryptionKey, other.encryptionKey) && super.equals(other); } @@ -2981,8 +3097,18 @@ public int hashCode() { result = (result * PRIME) + (this.dbName == null ? 43 : this.dbName.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.dbWorkload == null ? 43 : this.dbWorkload.hashCode()); result = (result * PRIME) + (this.licenseModel == null ? 43 : this.licenseModel.hashCode()); + result = + (result * PRIME) + + (this.byolComputeCountLimit == null + ? 43 + : this.byolComputeCountLimit.hashCode()); result = (result * PRIME) + (this.isAccessControlEnabled == null @@ -3095,6 +3221,9 @@ public int hashCode() { + (this.secretVersionNumber == null ? 43 : this.secretVersionNumber.hashCode()); + result = + (result * PRIME) + + (this.encryptionKey == null ? 43 : this.encryptionKey.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateCloudAutonomousVmClusterDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateCloudAutonomousVmClusterDetails.java index 00af5f9cf42..02d3d7171f8 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateCloudAutonomousVmClusterDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateCloudAutonomousVmClusterDetails.java @@ -32,7 +32,8 @@ public final class UpdateCloudAutonomousVmClusterDetails "licenseModel", "nsgIds", "freeformTags", - "definedTags" + "definedTags", + "securityAttributes" }) public UpdateCloudAutonomousVmClusterDetails( String description, @@ -44,7 +45,8 @@ public UpdateCloudAutonomousVmClusterDetails( LicenseModel licenseModel, java.util.List nsgIds, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> securityAttributes) { super(); this.description = description; this.displayName = displayName; @@ -56,6 +58,7 @@ public UpdateCloudAutonomousVmClusterDetails( this.nsgIds = nsgIds; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -246,6 +249,29 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -262,7 +288,8 @@ public UpdateCloudAutonomousVmClusterDetails build() { this.licenseModel, this.nsgIds, this.freeformTags, - this.definedTags); + this.definedTags, + this.securityAttributes); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -301,6 +328,9 @@ public Builder copy(UpdateCloudAutonomousVmClusterDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } return this; } } @@ -522,6 +552,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + @Override public String toString() { return this.toString(true); @@ -549,6 +599,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(")"); return sb.toString(); } @@ -576,6 +627,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.nsgIds, other.nsgIds) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && super.equals(other); } @@ -609,6 +661,11 @@ public int hashCode() { result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateCloudVmClusterDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateCloudVmClusterDetails.java index 92aac353d16..48f35e1a7a6 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateCloudVmClusterDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateCloudVmClusterDetails.java @@ -39,8 +39,10 @@ public final class UpdateCloudVmClusterDetails "storageSizeInGBs", "freeformTags", "definedTags", + "securityAttributes", "dataCollectionOptions", - "fileSystemConfigurationDetails" + "fileSystemConfigurationDetails", + "cloudAutomationUpdateDetails" }) public UpdateCloudVmClusterDetails( String displayName, @@ -58,8 +60,10 @@ public UpdateCloudVmClusterDetails( Integer storageSizeInGBs, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, DataCollectionOptions dataCollectionOptions, - java.util.List fileSystemConfigurationDetails) { + java.util.List fileSystemConfigurationDetails, + CloudAutomationUpdateDetails cloudAutomationUpdateDetails) { super(); this.displayName = displayName; this.cpuCoreCount = cpuCoreCount; @@ -76,8 +80,10 @@ public UpdateCloudVmClusterDetails( this.storageSizeInGBs = storageSizeInGBs; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.dataCollectionOptions = dataCollectionOptions; this.fileSystemConfigurationDetails = fileSystemConfigurationDetails; + this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -340,6 +346,29 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("dataCollectionOptions") private DataCollectionOptions dataCollectionOptions; @@ -367,6 +396,16 @@ public Builder fileSystemConfigurationDetails( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") + private CloudAutomationUpdateDetails cloudAutomationUpdateDetails; + + public Builder cloudAutomationUpdateDetails( + CloudAutomationUpdateDetails cloudAutomationUpdateDetails) { + this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; + this.__explicitlySet__.add("cloudAutomationUpdateDetails"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -388,8 +427,10 @@ public UpdateCloudVmClusterDetails build() { this.storageSizeInGBs, this.freeformTags, this.definedTags, + this.securityAttributes, this.dataCollectionOptions, - this.fileSystemConfigurationDetails); + this.fileSystemConfigurationDetails, + this.cloudAutomationUpdateDetails); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -443,12 +484,18 @@ public Builder copy(UpdateCloudVmClusterDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("dataCollectionOptions")) { this.dataCollectionOptions(model.getDataCollectionOptions()); } if (model.wasPropertyExplicitlySet("fileSystemConfigurationDetails")) { this.fileSystemConfigurationDetails(model.getFileSystemConfigurationDetails()); } + if (model.wasPropertyExplicitlySet("cloudAutomationUpdateDetails")) { + this.cloudAutomationUpdateDetails(model.getCloudAutomationUpdateDetails()); + } return this; } } @@ -727,6 +774,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + @com.fasterxml.jackson.annotation.JsonProperty("dataCollectionOptions") private final DataCollectionOptions dataCollectionOptions; @@ -748,6 +815,13 @@ public java.util.List getFileSystemConfigurationD return fileSystemConfigurationDetails; } + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") + private final CloudAutomationUpdateDetails cloudAutomationUpdateDetails; + + public CloudAutomationUpdateDetails getCloudAutomationUpdateDetails() { + return cloudAutomationUpdateDetails; + } + @Override public String toString() { return this.toString(true); @@ -777,9 +851,12 @@ public String toString(boolean includeByteArrayContents) { sb.append(", storageSizeInGBs=").append(String.valueOf(this.storageSizeInGBs)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", dataCollectionOptions=").append(String.valueOf(this.dataCollectionOptions)); sb.append(", fileSystemConfigurationDetails=") .append(String.valueOf(this.fileSystemConfigurationDetails)); + sb.append(", cloudAutomationUpdateDetails=") + .append(String.valueOf(this.cloudAutomationUpdateDetails)); sb.append(")"); return sb.toString(); } @@ -810,9 +887,12 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.storageSizeInGBs, other.storageSizeInGBs) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.dataCollectionOptions, other.dataCollectionOptions) && java.util.Objects.equals( this.fileSystemConfigurationDetails, other.fileSystemConfigurationDetails) + && java.util.Objects.equals( + this.cloudAutomationUpdateDetails, other.cloudAutomationUpdateDetails) && super.equals(other); } @@ -855,6 +935,11 @@ public int hashCode() { + (this.storageSizeInGBs == null ? 43 : this.storageSizeInGBs.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.dataCollectionOptions == null @@ -865,6 +950,11 @@ public int hashCode() { + (this.fileSystemConfigurationDetails == null ? 43 : this.fileSystemConfigurationDetails.hashCode()); + result = + (result * PRIME) + + (this.cloudAutomationUpdateDetails == null + ? 43 + : this.cloudAutomationUpdateDetails.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateDbSystemDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateDbSystemDetails.java index ab603f66ef9..e65f8376fa5 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateDbSystemDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateDbSystemDetails.java @@ -33,6 +33,7 @@ public final class UpdateDbSystemDetails "recoStorageSizeInGBs", "freeformTags", "definedTags", + "securityAttributes", "shape", "nsgIds", "backupNetworkNsgIds", @@ -48,6 +49,7 @@ public UpdateDbSystemDetails( Integer recoStorageSizeInGBs, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String shape, java.util.List nsgIds, java.util.List backupNetworkNsgIds, @@ -62,6 +64,7 @@ public UpdateDbSystemDetails( this.recoStorageSizeInGBs = recoStorageSizeInGBs; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.shape = shape; this.nsgIds = nsgIds; this.backupNetworkNsgIds = backupNetworkNsgIds; @@ -194,6 +197,29 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * The shape of the DB system. The shape determines resources allocated to the DB system. * - For virtual machine shapes, the number of CPU cores and memory @@ -308,6 +334,7 @@ public UpdateDbSystemDetails build() { this.recoStorageSizeInGBs, this.freeformTags, this.definedTags, + this.securityAttributes, this.shape, this.nsgIds, this.backupNetworkNsgIds, @@ -343,6 +370,9 @@ public Builder copy(UpdateDbSystemDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("shape")) { this.shape(model.getShape()); } @@ -483,6 +513,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The shape of the DB system. The shape determines resources allocated to the DB system. * - For virtual machine shapes, the number of CPU cores and memory @@ -628,6 +678,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", recoStorageSizeInGBs=").append(String.valueOf(this.recoStorageSizeInGBs)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", shape=").append(String.valueOf(this.shape)); sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); sb.append(", backupNetworkNsgIds=").append(String.valueOf(this.backupNetworkNsgIds)); @@ -656,6 +707,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.recoStorageSizeInGBs, other.recoStorageSizeInGBs) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.shape, other.shape) && java.util.Objects.equals(this.nsgIds, other.nsgIds) && java.util.Objects.equals(this.backupNetworkNsgIds, other.backupNetworkNsgIds) @@ -687,6 +739,11 @@ public int hashCode() { : this.recoStorageSizeInGBs.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); result = diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateExadbVmClusterDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateExadbVmClusterDetails.java new file mode 100644 index 00000000000..41834123c42 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateExadbVmClusterDetails.java @@ -0,0 +1,905 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details for updating the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateExadbVmClusterDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateExadbVmClusterDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "totalECpuCount", + "enabledECpuCount", + "vmFileSystemStorage", + "nodeCount", + "licenseModel", + "sshPublicKeys", + "nsgIds", + "backupNetworkNsgIds", + "freeformTags", + "definedTags", + "securityAttributes", + "dataCollectionOptions", + "systemVersion", + "gridImageId", + "updateAction" + }) + public UpdateExadbVmClusterDetails( + String displayName, + Integer totalECpuCount, + Integer enabledECpuCount, + ExadbVmClusterStorageDetails vmFileSystemStorage, + Integer nodeCount, + LicenseModel licenseModel, + java.util.List sshPublicKeys, + java.util.List nsgIds, + java.util.List backupNetworkNsgIds, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> securityAttributes, + DataCollectionOptions dataCollectionOptions, + String systemVersion, + String gridImageId, + UpdateAction updateAction) { + super(); + this.displayName = displayName; + this.totalECpuCount = totalECpuCount; + this.enabledECpuCount = enabledECpuCount; + this.vmFileSystemStorage = vmFileSystemStorage; + this.nodeCount = nodeCount; + this.licenseModel = licenseModel; + this.sshPublicKeys = sshPublicKeys; + this.nsgIds = nsgIds; + this.backupNetworkNsgIds = backupNetworkNsgIds; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.securityAttributes = securityAttributes; + this.dataCollectionOptions = dataCollectionOptions; + this.systemVersion = systemVersion; + this.gridImageId = gridImageId; + this.updateAction = updateAction; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The user-friendly name for the Exadata VM cluster on Exascale Infrastructure. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the Exadata VM cluster on Exascale Infrastructure. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalECpuCount") + private Integer totalECpuCount; + + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + * @param totalECpuCount the value to set + * @return this builder + **/ + public Builder totalECpuCount(Integer totalECpuCount) { + this.totalECpuCount = totalECpuCount; + this.__explicitlySet__.add("totalECpuCount"); + return this; + } + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enabledECpuCount") + private Integer enabledECpuCount; + + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + * @param enabledECpuCount the value to set + * @return this builder + **/ + public Builder enabledECpuCount(Integer enabledECpuCount) { + this.enabledECpuCount = enabledECpuCount; + this.__explicitlySet__.add("enabledECpuCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmFileSystemStorage") + private ExadbVmClusterStorageDetails vmFileSystemStorage; + + public Builder vmFileSystemStorage(ExadbVmClusterStorageDetails vmFileSystemStorage) { + this.vmFileSystemStorage = vmFileSystemStorage; + this.__explicitlySet__.add("vmFileSystemStorage"); + return this; + } + /** + * The number of nodes to be added in the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") + private Integer nodeCount; + + /** + * The number of nodes to be added in the Exadata VM cluster on Exascale Infrastructure. + * + * @param nodeCount the value to set + * @return this builder + **/ + public Builder nodeCount(Integer nodeCount) { + this.nodeCount = nodeCount; + this.__explicitlySet__.add("nodeCount"); + return this; + } + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private LicenseModel licenseModel; + + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + * @param licenseModel the value to set + * @return this builder + **/ + public Builder licenseModel(LicenseModel licenseModel) { + this.licenseModel = licenseModel; + this.__explicitlySet__.add("licenseModel"); + return this; + } + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sshPublicKeys") + private java.util.List sshPublicKeys; + + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + * @param sshPublicKeys the value to set + * @return this builder + **/ + public Builder sshPublicKeys(java.util.List sshPublicKeys) { + this.sshPublicKeys = sshPublicKeys; + this.__explicitlySet__.add("sshPublicKeys"); + return this; + } + /** + * The list of [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). + * **NsgIds restrictions:** + * - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private java.util.List nsgIds; + + /** + * The list of [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). + * **NsgIds restrictions:** + * - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. + * + * @param nsgIds the value to set + * @return this builder + **/ + public Builder nsgIds(java.util.List nsgIds) { + this.nsgIds = nsgIds; + this.__explicitlySet__.add("nsgIds"); + return this; + } + /** + * A list of the [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupNetworkNsgIds") + private java.util.List backupNetworkNsgIds; + + /** + * A list of the [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + * @param backupNetworkNsgIds the value to set + * @return this builder + **/ + public Builder backupNetworkNsgIds(java.util.List backupNetworkNsgIds) { + this.backupNetworkNsgIds = backupNetworkNsgIds; + this.__explicitlySet__.add("backupNetworkNsgIds"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataCollectionOptions") + private DataCollectionOptions dataCollectionOptions; + + public Builder dataCollectionOptions(DataCollectionOptions dataCollectionOptions) { + this.dataCollectionOptions = dataCollectionOptions; + this.__explicitlySet__.add("dataCollectionOptions"); + return this; + } + /** + * Operating system version of the image. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemVersion") + private String systemVersion; + + /** + * Operating system version of the image. + * @param systemVersion the value to set + * @return this builder + **/ + public Builder systemVersion(String systemVersion) { + this.systemVersion = systemVersion; + this.__explicitlySet__.add("systemVersion"); + return this; + } + /** + * Grid Setup will be done using this grid image id. + *

+ * The grid image id can be extracted from + * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= + * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using + * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gridImageId") + private String gridImageId; + + /** + * Grid Setup will be done using this grid image id. + *

+ * The grid image id can be extracted from + * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= + * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using + * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * + * @param gridImageId the value to set + * @return this builder + **/ + public Builder gridImageId(String gridImageId) { + this.gridImageId = gridImageId; + this.__explicitlySet__.add("gridImageId"); + return this; + } + /** + * The update action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateAction") + private UpdateAction updateAction; + + /** + * The update action. + * @param updateAction the value to set + * @return this builder + **/ + public Builder updateAction(UpdateAction updateAction) { + this.updateAction = updateAction; + this.__explicitlySet__.add("updateAction"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateExadbVmClusterDetails build() { + UpdateExadbVmClusterDetails model = + new UpdateExadbVmClusterDetails( + this.displayName, + this.totalECpuCount, + this.enabledECpuCount, + this.vmFileSystemStorage, + this.nodeCount, + this.licenseModel, + this.sshPublicKeys, + this.nsgIds, + this.backupNetworkNsgIds, + this.freeformTags, + this.definedTags, + this.securityAttributes, + this.dataCollectionOptions, + this.systemVersion, + this.gridImageId, + this.updateAction); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateExadbVmClusterDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("totalECpuCount")) { + this.totalECpuCount(model.getTotalECpuCount()); + } + if (model.wasPropertyExplicitlySet("enabledECpuCount")) { + this.enabledECpuCount(model.getEnabledECpuCount()); + } + if (model.wasPropertyExplicitlySet("vmFileSystemStorage")) { + this.vmFileSystemStorage(model.getVmFileSystemStorage()); + } + if (model.wasPropertyExplicitlySet("nodeCount")) { + this.nodeCount(model.getNodeCount()); + } + if (model.wasPropertyExplicitlySet("licenseModel")) { + this.licenseModel(model.getLicenseModel()); + } + if (model.wasPropertyExplicitlySet("sshPublicKeys")) { + this.sshPublicKeys(model.getSshPublicKeys()); + } + if (model.wasPropertyExplicitlySet("nsgIds")) { + this.nsgIds(model.getNsgIds()); + } + if (model.wasPropertyExplicitlySet("backupNetworkNsgIds")) { + this.backupNetworkNsgIds(model.getBackupNetworkNsgIds()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } + if (model.wasPropertyExplicitlySet("dataCollectionOptions")) { + this.dataCollectionOptions(model.getDataCollectionOptions()); + } + if (model.wasPropertyExplicitlySet("systemVersion")) { + this.systemVersion(model.getSystemVersion()); + } + if (model.wasPropertyExplicitlySet("gridImageId")) { + this.gridImageId(model.getGridImageId()); + } + if (model.wasPropertyExplicitlySet("updateAction")) { + this.updateAction(model.getUpdateAction()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The user-friendly name for the Exadata VM cluster on Exascale Infrastructure. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the Exadata VM cluster on Exascale Infrastructure. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalECpuCount") + private final Integer totalECpuCount; + + /** + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public Integer getTotalECpuCount() { + return totalECpuCount; + } + + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enabledECpuCount") + private final Integer enabledECpuCount; + + /** + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public Integer getEnabledECpuCount() { + return enabledECpuCount; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmFileSystemStorage") + private final ExadbVmClusterStorageDetails vmFileSystemStorage; + + public ExadbVmClusterStorageDetails getVmFileSystemStorage() { + return vmFileSystemStorage; + } + + /** + * The number of nodes to be added in the Exadata VM cluster on Exascale Infrastructure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") + private final Integer nodeCount; + + /** + * The number of nodes to be added in the Exadata VM cluster on Exascale Infrastructure. + * + * @return the value + **/ + public Integer getNodeCount() { + return nodeCount; + } + + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + public enum LicenseModel { + LicenseIncluded("LICENSE_INCLUDED"), + BringYourOwnLicense("BRING_YOUR_OWN_LICENSE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LicenseModel v : LicenseModel.values()) { + map.put(v.getValue(), v); + } + } + + LicenseModel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LicenseModel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid LicenseModel: " + key); + } + }; + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private final LicenseModel licenseModel; + + /** + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is BRING_YOUR_OWN_LICENSE. + * + * @return the value + **/ + public LicenseModel getLicenseModel() { + return licenseModel; + } + + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sshPublicKeys") + private final java.util.List sshPublicKeys; + + /** + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + * @return the value + **/ + public java.util.List getSshPublicKeys() { + return sshPublicKeys; + } + + /** + * The list of [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). + * **NsgIds restrictions:** + * - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private final java.util.List nsgIds; + + /** + * The list of [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). + * **NsgIds restrictions:** + * - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. + * + * @return the value + **/ + public java.util.List getNsgIds() { + return nsgIds; + } + + /** + * A list of the [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupNetworkNsgIds") + private final java.util.List backupNetworkNsgIds; + + /** + * A list of the [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems. + * + * @return the value + **/ + public java.util.List getBackupNetworkNsgIds() { + return backupNetworkNsgIds; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataCollectionOptions") + private final DataCollectionOptions dataCollectionOptions; + + public DataCollectionOptions getDataCollectionOptions() { + return dataCollectionOptions; + } + + /** + * Operating system version of the image. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemVersion") + private final String systemVersion; + + /** + * Operating system version of the image. + * @return the value + **/ + public String getSystemVersion() { + return systemVersion; + } + + /** + * Grid Setup will be done using this grid image id. + *

+ * The grid image id can be extracted from + * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= + * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using + * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gridImageId") + private final String gridImageId; + + /** + * Grid Setup will be done using this grid image id. + *

+ * The grid image id can be extracted from + * 1. Obtain the supported major versions using API /20160918/giVersions?compartmentId=&shape=EXADB_XS&availabilityDomain= + * 2. Replace {version} with one of the supported major versions and obtain the supported minor versions using + * API /20160918/giVersions/{version}/minorVersions?compartmentId=&shapeFamily=EXADB_XS&availabilityDomain= + * + * @return the value + **/ + public String getGridImageId() { + return gridImageId; + } + + /** + * The update action. + **/ + public enum UpdateAction { + RollingApply("ROLLING_APPLY"), + NonRollingApply("NON_ROLLING_APPLY"), + Precheck("PRECHECK"), + Rollback("ROLLBACK"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (UpdateAction v : UpdateAction.values()) { + map.put(v.getValue(), v); + } + } + + UpdateAction(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static UpdateAction create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid UpdateAction: " + key); + } + }; + /** + * The update action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("updateAction") + private final UpdateAction updateAction; + + /** + * The update action. + * @return the value + **/ + public UpdateAction getUpdateAction() { + return updateAction; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateExadbVmClusterDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", totalECpuCount=").append(String.valueOf(this.totalECpuCount)); + sb.append(", enabledECpuCount=").append(String.valueOf(this.enabledECpuCount)); + sb.append(", vmFileSystemStorage=").append(String.valueOf(this.vmFileSystemStorage)); + sb.append(", nodeCount=").append(String.valueOf(this.nodeCount)); + sb.append(", licenseModel=").append(String.valueOf(this.licenseModel)); + sb.append(", sshPublicKeys=").append(String.valueOf(this.sshPublicKeys)); + sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); + sb.append(", backupNetworkNsgIds=").append(String.valueOf(this.backupNetworkNsgIds)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); + sb.append(", dataCollectionOptions=").append(String.valueOf(this.dataCollectionOptions)); + sb.append(", systemVersion=").append(String.valueOf(this.systemVersion)); + sb.append(", gridImageId=").append(String.valueOf(this.gridImageId)); + sb.append(", updateAction=").append(String.valueOf(this.updateAction)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateExadbVmClusterDetails)) { + return false; + } + + UpdateExadbVmClusterDetails other = (UpdateExadbVmClusterDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.totalECpuCount, other.totalECpuCount) + && java.util.Objects.equals(this.enabledECpuCount, other.enabledECpuCount) + && java.util.Objects.equals(this.vmFileSystemStorage, other.vmFileSystemStorage) + && java.util.Objects.equals(this.nodeCount, other.nodeCount) + && java.util.Objects.equals(this.licenseModel, other.licenseModel) + && java.util.Objects.equals(this.sshPublicKeys, other.sshPublicKeys) + && java.util.Objects.equals(this.nsgIds, other.nsgIds) + && java.util.Objects.equals(this.backupNetworkNsgIds, other.backupNetworkNsgIds) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) + && java.util.Objects.equals(this.dataCollectionOptions, other.dataCollectionOptions) + && java.util.Objects.equals(this.systemVersion, other.systemVersion) + && java.util.Objects.equals(this.gridImageId, other.gridImageId) + && java.util.Objects.equals(this.updateAction, other.updateAction) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.totalECpuCount == null ? 43 : this.totalECpuCount.hashCode()); + result = + (result * PRIME) + + (this.enabledECpuCount == null ? 43 : this.enabledECpuCount.hashCode()); + result = + (result * PRIME) + + (this.vmFileSystemStorage == null + ? 43 + : this.vmFileSystemStorage.hashCode()); + result = (result * PRIME) + (this.nodeCount == null ? 43 : this.nodeCount.hashCode()); + result = (result * PRIME) + (this.licenseModel == null ? 43 : this.licenseModel.hashCode()); + result = + (result * PRIME) + + (this.sshPublicKeys == null ? 43 : this.sshPublicKeys.hashCode()); + result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); + result = + (result * PRIME) + + (this.backupNetworkNsgIds == null + ? 43 + : this.backupNetworkNsgIds.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); + result = + (result * PRIME) + + (this.dataCollectionOptions == null + ? 43 + : this.dataCollectionOptions.hashCode()); + result = + (result * PRIME) + + (this.systemVersion == null ? 43 : this.systemVersion.hashCode()); + result = (result * PRIME) + (this.gridImageId == null ? 43 : this.gridImageId.hashCode()); + result = (result * PRIME) + (this.updateAction == null ? 43 : this.updateAction.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateExascaleDbStorageVaultDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateExascaleDbStorageVaultDetails.java new file mode 100644 index 00000000000..e42055e1cce --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateExascaleDbStorageVaultDetails.java @@ -0,0 +1,370 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Details for updating the Exadata Database Storage Vault. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateExascaleDbStorageVaultDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateExascaleDbStorageVaultDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "highCapacityDatabaseStorage", + "additionalFlashCacheInPercent", + "freeformTags", + "definedTags" + }) + public UpdateExascaleDbStorageVaultDetails( + String displayName, + String description, + ExascaleDbStorageInputDetails highCapacityDatabaseStorage, + Integer additionalFlashCacheInPercent, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.highCapacityDatabaseStorage = highCapacityDatabaseStorage; + this.additionalFlashCacheInPercent = additionalFlashCacheInPercent; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Exadata Database Storage Vault description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Exadata Database Storage Vault description. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("highCapacityDatabaseStorage") + private ExascaleDbStorageInputDetails highCapacityDatabaseStorage; + + public Builder highCapacityDatabaseStorage( + ExascaleDbStorageInputDetails highCapacityDatabaseStorage) { + this.highCapacityDatabaseStorage = highCapacityDatabaseStorage; + this.__explicitlySet__.add("highCapacityDatabaseStorage"); + return this; + } + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalFlashCacheInPercent") + private Integer additionalFlashCacheInPercent; + + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + * + * @param additionalFlashCacheInPercent the value to set + * @return this builder + **/ + public Builder additionalFlashCacheInPercent(Integer additionalFlashCacheInPercent) { + this.additionalFlashCacheInPercent = additionalFlashCacheInPercent; + this.__explicitlySet__.add("additionalFlashCacheInPercent"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateExascaleDbStorageVaultDetails build() { + UpdateExascaleDbStorageVaultDetails model = + new UpdateExascaleDbStorageVaultDetails( + this.displayName, + this.description, + this.highCapacityDatabaseStorage, + this.additionalFlashCacheInPercent, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateExascaleDbStorageVaultDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("highCapacityDatabaseStorage")) { + this.highCapacityDatabaseStorage(model.getHighCapacityDatabaseStorage()); + } + if (model.wasPropertyExplicitlySet("additionalFlashCacheInPercent")) { + this.additionalFlashCacheInPercent(model.getAdditionalFlashCacheInPercent()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Exadata Database Storage Vault description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Exadata Database Storage Vault description. + * @return the value + **/ + public String getDescription() { + return description; + } + + @com.fasterxml.jackson.annotation.JsonProperty("highCapacityDatabaseStorage") + private final ExascaleDbStorageInputDetails highCapacityDatabaseStorage; + + public ExascaleDbStorageInputDetails getHighCapacityDatabaseStorage() { + return highCapacityDatabaseStorage; + } + + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalFlashCacheInPercent") + private final Integer additionalFlashCacheInPercent; + + /** + * The size of additional Flash Cache in percentage of High Capacity database storage. + * + * @return the value + **/ + public Integer getAdditionalFlashCacheInPercent() { + return additionalFlashCacheInPercent; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateExascaleDbStorageVaultDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", highCapacityDatabaseStorage=") + .append(String.valueOf(this.highCapacityDatabaseStorage)); + sb.append(", additionalFlashCacheInPercent=") + .append(String.valueOf(this.additionalFlashCacheInPercent)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateExascaleDbStorageVaultDetails)) { + return false; + } + + UpdateExascaleDbStorageVaultDetails other = (UpdateExascaleDbStorageVaultDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals( + this.highCapacityDatabaseStorage, other.highCapacityDatabaseStorage) + && java.util.Objects.equals( + this.additionalFlashCacheInPercent, other.additionalFlashCacheInPercent) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.highCapacityDatabaseStorage == null + ? 43 + : this.highCapacityDatabaseStorage.hashCode()); + result = + (result * PRIME) + + (this.additionalFlashCacheInPercent == null + ? 43 + : this.additionalFlashCacheInPercent.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateExecutionActionDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateExecutionActionDetails.java new file mode 100644 index 00000000000..5eac2ef1372 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateExecutionActionDetails.java @@ -0,0 +1,339 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Describes the modification parameters for the execution action. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateExecutionActionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateExecutionActionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "executionWindowId", + "actionParams", + "actionMembers", + "freeformTags", + "definedTags" + }) + public UpdateExecutionActionDetails( + String executionWindowId, + java.util.Map actionParams, + java.util.List actionMembers, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.executionWindowId = executionWindowId; + this.actionParams = actionParams; + this.actionMembers = actionMembers; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window resource the execution action belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionWindowId") + private String executionWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window resource the execution action belongs to. + * @param executionWindowId the value to set + * @return this builder + **/ + public Builder executionWindowId(String executionWindowId) { + this.executionWindowId = executionWindowId; + this.__explicitlySet__.add("executionWindowId"); + return this; + } + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionParams") + private java.util.Map actionParams; + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + * @param actionParams the value to set + * @return this builder + **/ + public Builder actionParams(java.util.Map actionParams) { + this.actionParams = actionParams; + this.__explicitlySet__.add("actionParams"); + return this; + } + /** + * List of action members of this execution action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionMembers") + private java.util.List actionMembers; + + /** + * List of action members of this execution action. + * @param actionMembers the value to set + * @return this builder + **/ + public Builder actionMembers(java.util.List actionMembers) { + this.actionMembers = actionMembers; + this.__explicitlySet__.add("actionMembers"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateExecutionActionDetails build() { + UpdateExecutionActionDetails model = + new UpdateExecutionActionDetails( + this.executionWindowId, + this.actionParams, + this.actionMembers, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateExecutionActionDetails model) { + if (model.wasPropertyExplicitlySet("executionWindowId")) { + this.executionWindowId(model.getExecutionWindowId()); + } + if (model.wasPropertyExplicitlySet("actionParams")) { + this.actionParams(model.getActionParams()); + } + if (model.wasPropertyExplicitlySet("actionMembers")) { + this.actionMembers(model.getActionMembers()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window resource the execution action belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionWindowId") + private final String executionWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the execution window resource the execution action belongs to. + * @return the value + **/ + public String getExecutionWindowId() { + return executionWindowId; + } + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionParams") + private final java.util.Map actionParams; + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + * @return the value + **/ + public java.util.Map getActionParams() { + return actionParams; + } + + /** + * List of action members of this execution action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionMembers") + private final java.util.List actionMembers; + + /** + * List of action members of this execution action. + * @return the value + **/ + public java.util.List getActionMembers() { + return actionMembers; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateExecutionActionDetails("); + sb.append("super=").append(super.toString()); + sb.append("executionWindowId=").append(String.valueOf(this.executionWindowId)); + sb.append(", actionParams=").append(String.valueOf(this.actionParams)); + sb.append(", actionMembers=").append(String.valueOf(this.actionMembers)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateExecutionActionDetails)) { + return false; + } + + UpdateExecutionActionDetails other = (UpdateExecutionActionDetails) o; + return java.util.Objects.equals(this.executionWindowId, other.executionWindowId) + && java.util.Objects.equals(this.actionParams, other.actionParams) + && java.util.Objects.equals(this.actionMembers, other.actionMembers) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.executionWindowId == null ? 43 : this.executionWindowId.hashCode()); + result = (result * PRIME) + (this.actionParams == null ? 43 : this.actionParams.hashCode()); + result = + (result * PRIME) + + (this.actionMembers == null ? 43 : this.actionMembers.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateExecutionWindowDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateExecutionWindowDetails.java new file mode 100644 index 00000000000..e18a06f3c58 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateExecutionWindowDetails.java @@ -0,0 +1,341 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Describes the modification parameters for the execution window. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateExecutionWindowDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateExecutionWindowDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "timeScheduled", + "windowDurationInMins", + "isEnforcedDuration", + "freeformTags", + "definedTags" + }) + public UpdateExecutionWindowDetails( + java.util.Date timeScheduled, + Integer windowDurationInMins, + Boolean isEnforcedDuration, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.timeScheduled = timeScheduled; + this.windowDurationInMins = windowDurationInMins; + this.isEnforcedDuration = isEnforcedDuration; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The scheduled start date and time of the execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduled") + private java.util.Date timeScheduled; + + /** + * The scheduled start date and time of the execution window. + * @param timeScheduled the value to set + * @return this builder + **/ + public Builder timeScheduled(java.util.Date timeScheduled) { + this.timeScheduled = timeScheduled; + this.__explicitlySet__.add("timeScheduled"); + return this; + } + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("windowDurationInMins") + private Integer windowDurationInMins; + + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + * @param windowDurationInMins the value to set + * @return this builder + **/ + public Builder windowDurationInMins(Integer windowDurationInMins) { + this.windowDurationInMins = windowDurationInMins; + this.__explicitlySet__.add("windowDurationInMins"); + return this; + } + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnforcedDuration") + private Boolean isEnforcedDuration; + + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + * @param isEnforcedDuration the value to set + * @return this builder + **/ + public Builder isEnforcedDuration(Boolean isEnforcedDuration) { + this.isEnforcedDuration = isEnforcedDuration; + this.__explicitlySet__.add("isEnforcedDuration"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateExecutionWindowDetails build() { + UpdateExecutionWindowDetails model = + new UpdateExecutionWindowDetails( + this.timeScheduled, + this.windowDurationInMins, + this.isEnforcedDuration, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateExecutionWindowDetails model) { + if (model.wasPropertyExplicitlySet("timeScheduled")) { + this.timeScheduled(model.getTimeScheduled()); + } + if (model.wasPropertyExplicitlySet("windowDurationInMins")) { + this.windowDurationInMins(model.getWindowDurationInMins()); + } + if (model.wasPropertyExplicitlySet("isEnforcedDuration")) { + this.isEnforcedDuration(model.getIsEnforcedDuration()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The scheduled start date and time of the execution window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduled") + private final java.util.Date timeScheduled; + + /** + * The scheduled start date and time of the execution window. + * @return the value + **/ + public java.util.Date getTimeScheduled() { + return timeScheduled; + } + + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("windowDurationInMins") + private final Integer windowDurationInMins; + + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + * @return the value + **/ + public Integer getWindowDurationInMins() { + return windowDurationInMins; + } + + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnforcedDuration") + private final Boolean isEnforcedDuration; + + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + * @return the value + **/ + public Boolean getIsEnforcedDuration() { + return isEnforcedDuration; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateExecutionWindowDetails("); + sb.append("super=").append(super.toString()); + sb.append("timeScheduled=").append(String.valueOf(this.timeScheduled)); + sb.append(", windowDurationInMins=").append(String.valueOf(this.windowDurationInMins)); + sb.append(", isEnforcedDuration=").append(String.valueOf(this.isEnforcedDuration)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateExecutionWindowDetails)) { + return false; + } + + UpdateExecutionWindowDetails other = (UpdateExecutionWindowDetails) o; + return java.util.Objects.equals(this.timeScheduled, other.timeScheduled) + && java.util.Objects.equals(this.windowDurationInMins, other.windowDurationInMins) + && java.util.Objects.equals(this.isEnforcedDuration, other.isEnforcedDuration) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.timeScheduled == null ? 43 : this.timeScheduled.hashCode()); + result = + (result * PRIME) + + (this.windowDurationInMins == null + ? 43 + : this.windowDurationInMins.hashCode()); + result = + (result * PRIME) + + (this.isEnforcedDuration == null + ? 43 + : this.isEnforcedDuration.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateScheduledActionDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateScheduledActionDetails.java new file mode 100644 index 00000000000..749e39d7970 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateScheduledActionDetails.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Describes the modification parameters for the Scheduled Action. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateScheduledActionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateScheduledActionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"actionParams", "actionMembers", "schedulingWindowId"}) + public UpdateScheduledActionDetails( + java.util.Map actionParams, + java.util.List actionMembers, + String schedulingWindowId) { + super(); + this.actionParams = actionParams; + this.actionMembers = actionMembers; + this.schedulingWindowId = schedulingWindowId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionParams") + private java.util.Map actionParams; + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + * @param actionParams the value to set + * @return this builder + **/ + public Builder actionParams(java.util.Map actionParams) { + this.actionParams = actionParams; + this.__explicitlySet__.add("actionParams"); + return this; + } + /** + * The list of action members in a scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionMembers") + private java.util.List actionMembers; + + /** + * The list of action members in a scheduled action. + * @param actionMembers the value to set + * @return this builder + **/ + public Builder actionMembers(java.util.List actionMembers) { + this.actionMembers = actionMembers; + this.__explicitlySet__.add("actionMembers"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingWindowId") + private String schedulingWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + * @param schedulingWindowId the value to set + * @return this builder + **/ + public Builder schedulingWindowId(String schedulingWindowId) { + this.schedulingWindowId = schedulingWindowId; + this.__explicitlySet__.add("schedulingWindowId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateScheduledActionDetails build() { + UpdateScheduledActionDetails model = + new UpdateScheduledActionDetails( + this.actionParams, this.actionMembers, this.schedulingWindowId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateScheduledActionDetails model) { + if (model.wasPropertyExplicitlySet("actionParams")) { + this.actionParams(model.getActionParams()); + } + if (model.wasPropertyExplicitlySet("actionMembers")) { + this.actionMembers(model.getActionMembers()); + } + if (model.wasPropertyExplicitlySet("schedulingWindowId")) { + this.schedulingWindowId(model.getSchedulingWindowId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionParams") + private final java.util.Map actionParams; + + /** + * Map where a key value pair describes the specific action parameter. + * Example: {@code {"count": "3"}} + * + * @return the value + **/ + public java.util.Map getActionParams() { + return actionParams; + } + + /** + * The list of action members in a scheduled action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionMembers") + private final java.util.List actionMembers; + + /** + * The list of action members in a scheduled action. + * @return the value + **/ + public java.util.List getActionMembers() { + return actionMembers; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schedulingWindowId") + private final String schedulingWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Scheduling Window. + * @return the value + **/ + public String getSchedulingWindowId() { + return schedulingWindowId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateScheduledActionDetails("); + sb.append("super=").append(super.toString()); + sb.append("actionParams=").append(String.valueOf(this.actionParams)); + sb.append(", actionMembers=").append(String.valueOf(this.actionMembers)); + sb.append(", schedulingWindowId=").append(String.valueOf(this.schedulingWindowId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateScheduledActionDetails)) { + return false; + } + + UpdateScheduledActionDetails other = (UpdateScheduledActionDetails) o; + return java.util.Objects.equals(this.actionParams, other.actionParams) + && java.util.Objects.equals(this.actionMembers, other.actionMembers) + && java.util.Objects.equals(this.schedulingWindowId, other.schedulingWindowId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.actionParams == null ? 43 : this.actionParams.hashCode()); + result = + (result * PRIME) + + (this.actionMembers == null ? 43 : this.actionMembers.hashCode()); + result = + (result * PRIME) + + (this.schedulingWindowId == null + ? 43 + : this.schedulingWindowId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateSchedulingPolicyDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateSchedulingPolicyDetails.java new file mode 100644 index 00000000000..926615574e7 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateSchedulingPolicyDetails.java @@ -0,0 +1,365 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Describes the modification parameters for the Scheduling Policy. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateSchedulingPolicyDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateSchedulingPolicyDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "cadence", + "cadenceStartMonth", + "freeformTags", + "definedTags" + }) + public UpdateSchedulingPolicyDetails( + String displayName, + Cadence cadence, + Month cadenceStartMonth, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.cadence = cadence; + this.cadenceStartMonth = cadenceStartMonth; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The user-friendly name for the Scheduling Policy. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The user-friendly name for the Scheduling Policy. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The cadence period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cadence") + private Cadence cadence; + + /** + * The cadence period. + * @param cadence the value to set + * @return this builder + **/ + public Builder cadence(Cadence cadence) { + this.cadence = cadence; + this.__explicitlySet__.add("cadence"); + return this; + } + /** + * Start of the month to be followed during the cadence period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cadenceStartMonth") + private Month cadenceStartMonth; + + /** + * Start of the month to be followed during the cadence period. + * @param cadenceStartMonth the value to set + * @return this builder + **/ + public Builder cadenceStartMonth(Month cadenceStartMonth) { + this.cadenceStartMonth = cadenceStartMonth; + this.__explicitlySet__.add("cadenceStartMonth"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateSchedulingPolicyDetails build() { + UpdateSchedulingPolicyDetails model = + new UpdateSchedulingPolicyDetails( + this.displayName, + this.cadence, + this.cadenceStartMonth, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateSchedulingPolicyDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("cadence")) { + this.cadence(model.getCadence()); + } + if (model.wasPropertyExplicitlySet("cadenceStartMonth")) { + this.cadenceStartMonth(model.getCadenceStartMonth()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The user-friendly name for the Scheduling Policy. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The user-friendly name for the Scheduling Policy. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The cadence period. + **/ + public enum Cadence { + Halfyearly("HALFYEARLY"), + Quarterly("QUARTERLY"), + Monthly("MONTHLY"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Cadence v : Cadence.values()) { + map.put(v.getValue(), v); + } + } + + Cadence(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Cadence create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Cadence: " + key); + } + }; + /** + * The cadence period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cadence") + private final Cadence cadence; + + /** + * The cadence period. + * @return the value + **/ + public Cadence getCadence() { + return cadence; + } + + /** + * Start of the month to be followed during the cadence period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cadenceStartMonth") + private final Month cadenceStartMonth; + + /** + * Start of the month to be followed during the cadence period. + * @return the value + **/ + public Month getCadenceStartMonth() { + return cadenceStartMonth; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateSchedulingPolicyDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", cadence=").append(String.valueOf(this.cadence)); + sb.append(", cadenceStartMonth=").append(String.valueOf(this.cadenceStartMonth)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSchedulingPolicyDetails)) { + return false; + } + + UpdateSchedulingPolicyDetails other = (UpdateSchedulingPolicyDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.cadence, other.cadence) + && java.util.Objects.equals(this.cadenceStartMonth, other.cadenceStartMonth) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.cadence == null ? 43 : this.cadence.hashCode()); + result = + (result * PRIME) + + (this.cadenceStartMonth == null ? 43 : this.cadenceStartMonth.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateSchedulingWindowDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateSchedulingWindowDetails.java new file mode 100644 index 00000000000..6d4a6892b01 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateSchedulingWindowDetails.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * Describes the modification parameters for the Scheduling Window. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateSchedulingWindowDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateSchedulingWindowDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"windowPreference", "freeformTags", "definedTags"}) + public UpdateSchedulingWindowDetails( + WindowPreferenceDetail windowPreference, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.windowPreference = windowPreference; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("windowPreference") + private WindowPreferenceDetail windowPreference; + + public Builder windowPreference(WindowPreferenceDetail windowPreference) { + this.windowPreference = windowPreference; + this.__explicitlySet__.add("windowPreference"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateSchedulingWindowDetails build() { + UpdateSchedulingWindowDetails model = + new UpdateSchedulingWindowDetails( + this.windowPreference, this.freeformTags, this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateSchedulingWindowDetails model) { + if (model.wasPropertyExplicitlySet("windowPreference")) { + this.windowPreference(model.getWindowPreference()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("windowPreference") + private final WindowPreferenceDetail windowPreference; + + public WindowPreferenceDetail getWindowPreference() { + return windowPreference; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateSchedulingWindowDetails("); + sb.append("super=").append(super.toString()); + sb.append("windowPreference=").append(String.valueOf(this.windowPreference)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSchedulingWindowDetails)) { + return false; + } + + UpdateSchedulingWindowDetails other = (UpdateSchedulingWindowDetails) o; + return java.util.Objects.equals(this.windowPreference, other.windowPreference) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.windowPreference == null ? 43 : this.windowPreference.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateVmClusterDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateVmClusterDetails.java index 362deb1ac34..8a25f7091f8 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateVmClusterDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateVmClusterDetails.java @@ -38,7 +38,8 @@ public final class UpdateVmClusterDetails "freeformTags", "definedTags", "dataCollectionOptions", - "fileSystemConfigurationDetails" + "fileSystemConfigurationDetails", + "cloudAutomationUpdateDetails" }) public UpdateVmClusterDetails( Integer cpuCoreCount, @@ -54,7 +55,8 @@ public UpdateVmClusterDetails( java.util.Map freeformTags, java.util.Map> definedTags, DataCollectionOptions dataCollectionOptions, - java.util.List fileSystemConfigurationDetails) { + java.util.List fileSystemConfigurationDetails, + CloudAutomationUpdateDetails cloudAutomationUpdateDetails) { super(); this.cpuCoreCount = cpuCoreCount; this.ocpuCount = ocpuCount; @@ -70,6 +72,7 @@ public UpdateVmClusterDetails( this.definedTags = definedTags; this.dataCollectionOptions = dataCollectionOptions; this.fileSystemConfigurationDetails = fileSystemConfigurationDetails; + this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -294,6 +297,16 @@ public Builder fileSystemConfigurationDetails( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") + private CloudAutomationUpdateDetails cloudAutomationUpdateDetails; + + public Builder cloudAutomationUpdateDetails( + CloudAutomationUpdateDetails cloudAutomationUpdateDetails) { + this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; + this.__explicitlySet__.add("cloudAutomationUpdateDetails"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -313,7 +326,8 @@ public UpdateVmClusterDetails build() { this.freeformTags, this.definedTags, this.dataCollectionOptions, - this.fileSystemConfigurationDetails); + this.fileSystemConfigurationDetails, + this.cloudAutomationUpdateDetails); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -364,6 +378,9 @@ public Builder copy(UpdateVmClusterDetails model) { if (model.wasPropertyExplicitlySet("fileSystemConfigurationDetails")) { this.fileSystemConfigurationDetails(model.getFileSystemConfigurationDetails()); } + if (model.wasPropertyExplicitlySet("cloudAutomationUpdateDetails")) { + this.cloudAutomationUpdateDetails(model.getCloudAutomationUpdateDetails()); + } return this; } } @@ -604,6 +621,13 @@ public java.util.List getFileSystemConfigurationD return fileSystemConfigurationDetails; } + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") + private final CloudAutomationUpdateDetails cloudAutomationUpdateDetails; + + public CloudAutomationUpdateDetails getCloudAutomationUpdateDetails() { + return cloudAutomationUpdateDetails; + } + @Override public String toString() { return this.toString(true); @@ -633,6 +657,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", dataCollectionOptions=").append(String.valueOf(this.dataCollectionOptions)); sb.append(", fileSystemConfigurationDetails=") .append(String.valueOf(this.fileSystemConfigurationDetails)); + sb.append(", cloudAutomationUpdateDetails=") + .append(String.valueOf(this.cloudAutomationUpdateDetails)); sb.append(")"); return sb.toString(); } @@ -663,6 +689,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.dataCollectionOptions, other.dataCollectionOptions) && java.util.Objects.equals( this.fileSystemConfigurationDetails, other.fileSystemConfigurationDetails) + && java.util.Objects.equals( + this.cloudAutomationUpdateDetails, other.cloudAutomationUpdateDetails) && super.equals(other); } @@ -710,6 +738,11 @@ public int hashCode() { + (this.fileSystemConfigurationDetails == null ? 43 : this.fileSystemConfigurationDetails.hashCode()); + result = + (result * PRIME) + + (this.cloudAutomationUpdateDetails == null + ? 43 + : this.cloudAutomationUpdateDetails.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/VmCluster.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/VmCluster.java index 439d2d7b34b..e7f1d67da8c 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/VmCluster.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/VmCluster.java @@ -50,7 +50,10 @@ public final class VmCluster extends com.oracle.bmc.http.internal.ExplicitlySetB "definedTags", "dataCollectionOptions", "giSoftwareImageId", - "fileSystemConfigurationDetails" + "fileSystemConfigurationDetails", + "cloudAutomationUpdateDetails", + "exascaleDbStorageVaultId", + "storageManagementType" }) public VmCluster( String id, @@ -82,7 +85,10 @@ public VmCluster( java.util.Map> definedTags, DataCollectionOptions dataCollectionOptions, String giSoftwareImageId, - java.util.List fileSystemConfigurationDetails) { + java.util.List fileSystemConfigurationDetails, + CloudAutomationUpdateDetails cloudAutomationUpdateDetails, + String exascaleDbStorageVaultId, + StorageManagementType storageManagementType) { super(); this.id = id; this.compartmentId = compartmentId; @@ -114,6 +120,9 @@ public VmCluster( this.dataCollectionOptions = dataCollectionOptions; this.giSoftwareImageId = giSoftwareImageId; this.fileSystemConfigurationDetails = fileSystemConfigurationDetails; + this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.storageManagementType = storageManagementType; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -614,6 +623,48 @@ public Builder fileSystemConfigurationDetails( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") + private CloudAutomationUpdateDetails cloudAutomationUpdateDetails; + + public Builder cloudAutomationUpdateDetails( + CloudAutomationUpdateDetails cloudAutomationUpdateDetails) { + this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; + this.__explicitlySet__.add("cloudAutomationUpdateDetails"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exascaleDbStorageVaultId") + private String exascaleDbStorageVaultId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + * @param exascaleDbStorageVaultId the value to set + * @return this builder + **/ + public Builder exascaleDbStorageVaultId(String exascaleDbStorageVaultId) { + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.__explicitlySet__.add("exascaleDbStorageVaultId"); + return this; + } + /** + * Specifies whether the type of storage management for the VM cluster is ASM or Exascale. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("storageManagementType") + private StorageManagementType storageManagementType; + + /** + * Specifies whether the type of storage management for the VM cluster is ASM or Exascale. + * @param storageManagementType the value to set + * @return this builder + **/ + public Builder storageManagementType(StorageManagementType storageManagementType) { + this.storageManagementType = storageManagementType; + this.__explicitlySet__.add("storageManagementType"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -649,7 +700,10 @@ public VmCluster build() { this.definedTags, this.dataCollectionOptions, this.giSoftwareImageId, - this.fileSystemConfigurationDetails); + this.fileSystemConfigurationDetails, + this.cloudAutomationUpdateDetails, + this.exascaleDbStorageVaultId, + this.storageManagementType); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -748,6 +802,15 @@ public Builder copy(VmCluster model) { if (model.wasPropertyExplicitlySet("fileSystemConfigurationDetails")) { this.fileSystemConfigurationDetails(model.getFileSystemConfigurationDetails()); } + if (model.wasPropertyExplicitlySet("cloudAutomationUpdateDetails")) { + this.cloudAutomationUpdateDetails(model.getCloudAutomationUpdateDetails()); + } + if (model.wasPropertyExplicitlySet("exascaleDbStorageVaultId")) { + this.exascaleDbStorageVaultId(model.getExascaleDbStorageVaultId()); + } + if (model.wasPropertyExplicitlySet("storageManagementType")) { + this.storageManagementType(model.getStorageManagementType()); + } return this; } } @@ -1298,6 +1361,89 @@ public java.util.List getFileSystemConfigurationD return fileSystemConfigurationDetails; } + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") + private final CloudAutomationUpdateDetails cloudAutomationUpdateDetails; + + public CloudAutomationUpdateDetails getCloudAutomationUpdateDetails() { + return cloudAutomationUpdateDetails; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exascaleDbStorageVaultId") + private final String exascaleDbStorageVaultId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + * @return the value + **/ + public String getExascaleDbStorageVaultId() { + return exascaleDbStorageVaultId; + } + + /** + * Specifies whether the type of storage management for the VM cluster is ASM or Exascale. + **/ + public enum StorageManagementType { + Asm("ASM"), + Exascale("EXASCALE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(StorageManagementType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (StorageManagementType v : StorageManagementType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + StorageManagementType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static StorageManagementType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'StorageManagementType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Specifies whether the type of storage management for the VM cluster is ASM or Exascale. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("storageManagementType") + private final StorageManagementType storageManagementType; + + /** + * Specifies whether the type of storage management for the VM cluster is ASM or Exascale. + * @return the value + **/ + public StorageManagementType getStorageManagementType() { + return storageManagementType; + } + @Override public String toString() { return this.toString(true); @@ -1346,6 +1492,11 @@ public String toString(boolean includeByteArrayContents) { sb.append(", giSoftwareImageId=").append(String.valueOf(this.giSoftwareImageId)); sb.append(", fileSystemConfigurationDetails=") .append(String.valueOf(this.fileSystemConfigurationDetails)); + sb.append(", cloudAutomationUpdateDetails=") + .append(String.valueOf(this.cloudAutomationUpdateDetails)); + sb.append(", exascaleDbStorageVaultId=") + .append(String.valueOf(this.exascaleDbStorageVaultId)); + sb.append(", storageManagementType=").append(String.valueOf(this.storageManagementType)); sb.append(")"); return sb.toString(); } @@ -1395,6 +1546,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.giSoftwareImageId, other.giSoftwareImageId) && java.util.Objects.equals( this.fileSystemConfigurationDetails, other.fileSystemConfigurationDetails) + && java.util.Objects.equals( + this.cloudAutomationUpdateDetails, other.cloudAutomationUpdateDetails) + && java.util.Objects.equals( + this.exascaleDbStorageVaultId, other.exascaleDbStorageVaultId) + && java.util.Objects.equals(this.storageManagementType, other.storageManagementType) && super.equals(other); } @@ -1490,6 +1646,21 @@ public int hashCode() { + (this.fileSystemConfigurationDetails == null ? 43 : this.fileSystemConfigurationDetails.hashCode()); + result = + (result * PRIME) + + (this.cloudAutomationUpdateDetails == null + ? 43 + : this.cloudAutomationUpdateDetails.hashCode()); + result = + (result * PRIME) + + (this.exascaleDbStorageVaultId == null + ? 43 + : this.exascaleDbStorageVaultId.hashCode()); + result = + (result * PRIME) + + (this.storageManagementType == null + ? 43 + : this.storageManagementType.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/VmClusterSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/VmClusterSummary.java index 1f35db1b3c6..93d37f15007 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/VmClusterSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/VmClusterSummary.java @@ -50,7 +50,10 @@ public final class VmClusterSummary extends com.oracle.bmc.http.internal.Explici "definedTags", "dataCollectionOptions", "giSoftwareImageId", - "fileSystemConfigurationDetails" + "fileSystemConfigurationDetails", + "cloudAutomationUpdateDetails", + "exascaleDbStorageVaultId", + "storageManagementType" }) public VmClusterSummary( String id, @@ -82,7 +85,10 @@ public VmClusterSummary( java.util.Map> definedTags, DataCollectionOptions dataCollectionOptions, String giSoftwareImageId, - java.util.List fileSystemConfigurationDetails) { + java.util.List fileSystemConfigurationDetails, + CloudAutomationUpdateDetails cloudAutomationUpdateDetails, + String exascaleDbStorageVaultId, + StorageManagementType storageManagementType) { super(); this.id = id; this.compartmentId = compartmentId; @@ -114,6 +120,9 @@ public VmClusterSummary( this.dataCollectionOptions = dataCollectionOptions; this.giSoftwareImageId = giSoftwareImageId; this.fileSystemConfigurationDetails = fileSystemConfigurationDetails; + this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.storageManagementType = storageManagementType; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -614,6 +623,48 @@ public Builder fileSystemConfigurationDetails( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") + private CloudAutomationUpdateDetails cloudAutomationUpdateDetails; + + public Builder cloudAutomationUpdateDetails( + CloudAutomationUpdateDetails cloudAutomationUpdateDetails) { + this.cloudAutomationUpdateDetails = cloudAutomationUpdateDetails; + this.__explicitlySet__.add("cloudAutomationUpdateDetails"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exascaleDbStorageVaultId") + private String exascaleDbStorageVaultId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + * @param exascaleDbStorageVaultId the value to set + * @return this builder + **/ + public Builder exascaleDbStorageVaultId(String exascaleDbStorageVaultId) { + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + this.__explicitlySet__.add("exascaleDbStorageVaultId"); + return this; + } + /** + * Specifies whether the type of storage management for the VM cluster is ASM or Exascale. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("storageManagementType") + private StorageManagementType storageManagementType; + + /** + * Specifies whether the type of storage management for the VM cluster is ASM or Exascale. + * @param storageManagementType the value to set + * @return this builder + **/ + public Builder storageManagementType(StorageManagementType storageManagementType) { + this.storageManagementType = storageManagementType; + this.__explicitlySet__.add("storageManagementType"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -649,7 +700,10 @@ public VmClusterSummary build() { this.definedTags, this.dataCollectionOptions, this.giSoftwareImageId, - this.fileSystemConfigurationDetails); + this.fileSystemConfigurationDetails, + this.cloudAutomationUpdateDetails, + this.exascaleDbStorageVaultId, + this.storageManagementType); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -748,6 +802,15 @@ public Builder copy(VmClusterSummary model) { if (model.wasPropertyExplicitlySet("fileSystemConfigurationDetails")) { this.fileSystemConfigurationDetails(model.getFileSystemConfigurationDetails()); } + if (model.wasPropertyExplicitlySet("cloudAutomationUpdateDetails")) { + this.cloudAutomationUpdateDetails(model.getCloudAutomationUpdateDetails()); + } + if (model.wasPropertyExplicitlySet("exascaleDbStorageVaultId")) { + this.exascaleDbStorageVaultId(model.getExascaleDbStorageVaultId()); + } + if (model.wasPropertyExplicitlySet("storageManagementType")) { + this.storageManagementType(model.getStorageManagementType()); + } return this; } } @@ -1298,6 +1361,89 @@ public java.util.List getFileSystemConfigurationD return fileSystemConfigurationDetails; } + @com.fasterxml.jackson.annotation.JsonProperty("cloudAutomationUpdateDetails") + private final CloudAutomationUpdateDetails cloudAutomationUpdateDetails; + + public CloudAutomationUpdateDetails getCloudAutomationUpdateDetails() { + return cloudAutomationUpdateDetails; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exascaleDbStorageVaultId") + private final String exascaleDbStorageVaultId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault. + * @return the value + **/ + public String getExascaleDbStorageVaultId() { + return exascaleDbStorageVaultId; + } + + /** + * Specifies whether the type of storage management for the VM cluster is ASM or Exascale. + **/ + public enum StorageManagementType { + Asm("ASM"), + Exascale("EXASCALE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(StorageManagementType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (StorageManagementType v : StorageManagementType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + StorageManagementType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static StorageManagementType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'StorageManagementType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Specifies whether the type of storage management for the VM cluster is ASM or Exascale. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("storageManagementType") + private final StorageManagementType storageManagementType; + + /** + * Specifies whether the type of storage management for the VM cluster is ASM or Exascale. + * @return the value + **/ + public StorageManagementType getStorageManagementType() { + return storageManagementType; + } + @Override public String toString() { return this.toString(true); @@ -1346,6 +1492,11 @@ public String toString(boolean includeByteArrayContents) { sb.append(", giSoftwareImageId=").append(String.valueOf(this.giSoftwareImageId)); sb.append(", fileSystemConfigurationDetails=") .append(String.valueOf(this.fileSystemConfigurationDetails)); + sb.append(", cloudAutomationUpdateDetails=") + .append(String.valueOf(this.cloudAutomationUpdateDetails)); + sb.append(", exascaleDbStorageVaultId=") + .append(String.valueOf(this.exascaleDbStorageVaultId)); + sb.append(", storageManagementType=").append(String.valueOf(this.storageManagementType)); sb.append(")"); return sb.toString(); } @@ -1395,6 +1546,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.giSoftwareImageId, other.giSoftwareImageId) && java.util.Objects.equals( this.fileSystemConfigurationDetails, other.fileSystemConfigurationDetails) + && java.util.Objects.equals( + this.cloudAutomationUpdateDetails, other.cloudAutomationUpdateDetails) + && java.util.Objects.equals( + this.exascaleDbStorageVaultId, other.exascaleDbStorageVaultId) + && java.util.Objects.equals(this.storageManagementType, other.storageManagementType) && super.equals(other); } @@ -1490,6 +1646,21 @@ public int hashCode() { + (this.fileSystemConfigurationDetails == null ? 43 : this.fileSystemConfigurationDetails.hashCode()); + result = + (result * PRIME) + + (this.cloudAutomationUpdateDetails == null + ? 43 + : this.cloudAutomationUpdateDetails.hashCode()); + result = + (result * PRIME) + + (this.exascaleDbStorageVaultId == null + ? 43 + : this.exascaleDbStorageVaultId.hashCode()); + result = + (result * PRIME) + + (this.storageManagementType == null + ? 43 + : this.storageManagementType.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/WindowPreferenceDetail.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/WindowPreferenceDetail.java new file mode 100644 index 00000000000..598bbe04827 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/WindowPreferenceDetail.java @@ -0,0 +1,362 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.model; + +/** + * The Single Scheduling Window details. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WindowPreferenceDetail.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WindowPreferenceDetail + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "months", + "weeksOfMonth", + "daysOfWeek", + "startTime", + "duration", + "isEnforcedDuration" + }) + public WindowPreferenceDetail( + java.util.List months, + java.util.List weeksOfMonth, + java.util.List daysOfWeek, + String startTime, + Integer duration, + Boolean isEnforcedDuration) { + super(); + this.months = months; + this.weeksOfMonth = weeksOfMonth; + this.daysOfWeek = daysOfWeek; + this.startTime = startTime; + this.duration = duration; + this.isEnforcedDuration = isEnforcedDuration; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Months during the year when scheduled window should be performed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("months") + private java.util.List months; + + /** + * Months during the year when scheduled window should be performed. + * @param months the value to set + * @return this builder + **/ + public Builder months(java.util.List months) { + this.months = months; + this.__explicitlySet__.add("months"); + return this; + } + /** + * Weeks during the month when scheduled window should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. + * For example, to allow scheduling window during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Scheduling window cannot be scheduled for the fifth week of months that contain more than 28 days. + * Note that this parameter works in conjunction with the daysOfWeek and startTime parameters to allow you to specify specific days of the week and hours that scheduled window will be performed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("weeksOfMonth") + private java.util.List weeksOfMonth; + + /** + * Weeks during the month when scheduled window should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. + * For example, to allow scheduling window during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Scheduling window cannot be scheduled for the fifth week of months that contain more than 28 days. + * Note that this parameter works in conjunction with the daysOfWeek and startTime parameters to allow you to specify specific days of the week and hours that scheduled window will be performed. + * + * @param weeksOfMonth the value to set + * @return this builder + **/ + public Builder weeksOfMonth(java.util.List weeksOfMonth) { + this.weeksOfMonth = weeksOfMonth; + this.__explicitlySet__.add("weeksOfMonth"); + return this; + } + /** + * Days during the week when scheduling window should be performed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("daysOfWeek") + private java.util.List daysOfWeek; + + /** + * Days during the week when scheduling window should be performed. + * @param daysOfWeek the value to set + * @return this builder + **/ + public Builder daysOfWeek(java.util.List daysOfWeek) { + this.daysOfWeek = daysOfWeek; + this.__explicitlySet__.add("daysOfWeek"); + return this; + } + /** + * The scheduling window start time. The value must use the ISO-8601 format "hh:mm". + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startTime") + private String startTime; + + /** + * The scheduling window start time. The value must use the ISO-8601 format "hh:mm". + * @param startTime the value to set + * @return this builder + **/ + public Builder startTime(String startTime) { + this.startTime = startTime; + this.__explicitlySet__.add("startTime"); + return this; + } + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("duration") + private Integer duration; + + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + * @param duration the value to set + * @return this builder + **/ + public Builder duration(Integer duration) { + this.duration = duration; + this.__explicitlySet__.add("duration"); + return this; + } + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnforcedDuration") + private Boolean isEnforcedDuration; + + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + * @param isEnforcedDuration the value to set + * @return this builder + **/ + public Builder isEnforcedDuration(Boolean isEnforcedDuration) { + this.isEnforcedDuration = isEnforcedDuration; + this.__explicitlySet__.add("isEnforcedDuration"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WindowPreferenceDetail build() { + WindowPreferenceDetail model = + new WindowPreferenceDetail( + this.months, + this.weeksOfMonth, + this.daysOfWeek, + this.startTime, + this.duration, + this.isEnforcedDuration); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WindowPreferenceDetail model) { + if (model.wasPropertyExplicitlySet("months")) { + this.months(model.getMonths()); + } + if (model.wasPropertyExplicitlySet("weeksOfMonth")) { + this.weeksOfMonth(model.getWeeksOfMonth()); + } + if (model.wasPropertyExplicitlySet("daysOfWeek")) { + this.daysOfWeek(model.getDaysOfWeek()); + } + if (model.wasPropertyExplicitlySet("startTime")) { + this.startTime(model.getStartTime()); + } + if (model.wasPropertyExplicitlySet("duration")) { + this.duration(model.getDuration()); + } + if (model.wasPropertyExplicitlySet("isEnforcedDuration")) { + this.isEnforcedDuration(model.getIsEnforcedDuration()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Months during the year when scheduled window should be performed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("months") + private final java.util.List months; + + /** + * Months during the year when scheduled window should be performed. + * @return the value + **/ + public java.util.List getMonths() { + return months; + } + + /** + * Weeks during the month when scheduled window should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. + * For example, to allow scheduling window during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Scheduling window cannot be scheduled for the fifth week of months that contain more than 28 days. + * Note that this parameter works in conjunction with the daysOfWeek and startTime parameters to allow you to specify specific days of the week and hours that scheduled window will be performed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("weeksOfMonth") + private final java.util.List weeksOfMonth; + + /** + * Weeks during the month when scheduled window should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. + * For example, to allow scheduling window during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Scheduling window cannot be scheduled for the fifth week of months that contain more than 28 days. + * Note that this parameter works in conjunction with the daysOfWeek and startTime parameters to allow you to specify specific days of the week and hours that scheduled window will be performed. + * + * @return the value + **/ + public java.util.List getWeeksOfMonth() { + return weeksOfMonth; + } + + /** + * Days during the week when scheduling window should be performed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("daysOfWeek") + private final java.util.List daysOfWeek; + + /** + * Days during the week when scheduling window should be performed. + * @return the value + **/ + public java.util.List getDaysOfWeek() { + return daysOfWeek; + } + + /** + * The scheduling window start time. The value must use the ISO-8601 format "hh:mm". + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startTime") + private final String startTime; + + /** + * The scheduling window start time. The value must use the ISO-8601 format "hh:mm". + * @return the value + **/ + public String getStartTime() { + return startTime; + } + + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("duration") + private final Integer duration; + + /** + * Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes. + * + * @return the value + **/ + public Integer getDuration() { + return duration; + } + + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnforcedDuration") + private final Boolean isEnforcedDuration; + + /** + * Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is {@code FALSE}. + * @return the value + **/ + public Boolean getIsEnforcedDuration() { + return isEnforcedDuration; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WindowPreferenceDetail("); + sb.append("super=").append(super.toString()); + sb.append("months=").append(String.valueOf(this.months)); + sb.append(", weeksOfMonth=").append(String.valueOf(this.weeksOfMonth)); + sb.append(", daysOfWeek=").append(String.valueOf(this.daysOfWeek)); + sb.append(", startTime=").append(String.valueOf(this.startTime)); + sb.append(", duration=").append(String.valueOf(this.duration)); + sb.append(", isEnforcedDuration=").append(String.valueOf(this.isEnforcedDuration)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WindowPreferenceDetail)) { + return false; + } + + WindowPreferenceDetail other = (WindowPreferenceDetail) o; + return java.util.Objects.equals(this.months, other.months) + && java.util.Objects.equals(this.weeksOfMonth, other.weeksOfMonth) + && java.util.Objects.equals(this.daysOfWeek, other.daysOfWeek) + && java.util.Objects.equals(this.startTime, other.startTime) + && java.util.Objects.equals(this.duration, other.duration) + && java.util.Objects.equals(this.isEnforcedDuration, other.isEnforcedDuration) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.months == null ? 43 : this.months.hashCode()); + result = (result * PRIME) + (this.weeksOfMonth == null ? 43 : this.weeksOfMonth.hashCode()); + result = (result * PRIME) + (this.daysOfWeek == null ? 43 : this.daysOfWeek.hashCode()); + result = (result * PRIME) + (this.startTime == null ? 43 : this.startTime.hashCode()); + result = (result * PRIME) + (this.duration == null ? 43 : this.duration.hashCode()); + result = + (result * PRIME) + + (this.isEnforcedDuration == null + ? 43 + : this.isEnforcedDuration.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/CancelExecutionWindowRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CancelExecutionWindowRequest.java new file mode 100644 index 00000000000..5cb431c99a9 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CancelExecutionWindowRequest.java @@ -0,0 +1,365 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use CancelExecutionWindowRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CancelExecutionWindowRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.CancelExecutionWindowDetails> { + + /** + * The execution window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String executionWindowId; + + /** + * The execution window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getExecutionWindowId() { + return executionWindowId; + } + /** + * Request to cancel the in progress maintenance activity under this execution window. + */ + private com.oracle.bmc.database.model.CancelExecutionWindowDetails cancelExecutionWindowDetails; + + /** + * Request to cancel the in progress maintenance activity under this execution window. + */ + public com.oracle.bmc.database.model.CancelExecutionWindowDetails + getCancelExecutionWindowDetails() { + return cancelExecutionWindowDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.CancelExecutionWindowDetails getBody$() { + return cancelExecutionWindowDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CancelExecutionWindowRequest, + com.oracle.bmc.database.model.CancelExecutionWindowDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The execution window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String executionWindowId = null; + + /** + * The execution window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param executionWindowId the value to set + * @return this builder instance + */ + public Builder executionWindowId(String executionWindowId) { + this.executionWindowId = executionWindowId; + return this; + } + + /** + * Request to cancel the in progress maintenance activity under this execution window. + */ + private com.oracle.bmc.database.model.CancelExecutionWindowDetails + cancelExecutionWindowDetails = null; + + /** + * Request to cancel the in progress maintenance activity under this execution window. + * @param cancelExecutionWindowDetails the value to set + * @return this builder instance + */ + public Builder cancelExecutionWindowDetails( + com.oracle.bmc.database.model.CancelExecutionWindowDetails + cancelExecutionWindowDetails) { + this.cancelExecutionWindowDetails = cancelExecutionWindowDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CancelExecutionWindowRequest o) { + executionWindowId(o.getExecutionWindowId()); + cancelExecutionWindowDetails(o.getCancelExecutionWindowDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CancelExecutionWindowRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CancelExecutionWindowRequest + */ + public CancelExecutionWindowRequest build() { + CancelExecutionWindowRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.database.model.CancelExecutionWindowDetails body) { + cancelExecutionWindowDetails(body); + return this; + } + + /** + * Build the instance of CancelExecutionWindowRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CancelExecutionWindowRequest + */ + public CancelExecutionWindowRequest buildWithoutInvocationCallback() { + CancelExecutionWindowRequest request = new CancelExecutionWindowRequest(); + request.executionWindowId = executionWindowId; + request.cancelExecutionWindowDetails = cancelExecutionWindowDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new CancelExecutionWindowRequest(executionWindowId, cancelExecutionWindowDetails, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .executionWindowId(executionWindowId) + .cancelExecutionWindowDetails(cancelExecutionWindowDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",executionWindowId=").append(String.valueOf(this.executionWindowId)); + sb.append(",cancelExecutionWindowDetails=") + .append(String.valueOf(this.cancelExecutionWindowDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CancelExecutionWindowRequest)) { + return false; + } + + CancelExecutionWindowRequest other = (CancelExecutionWindowRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.executionWindowId, other.executionWindowId) + && java.util.Objects.equals( + this.cancelExecutionWindowDetails, other.cancelExecutionWindowDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.executionWindowId == null ? 43 : this.executionWindowId.hashCode()); + result = + (result * PRIME) + + (this.cancelExecutionWindowDetails == null + ? 43 + : this.cancelExecutionWindowDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/CascadingDeleteSchedulingPlanRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CascadingDeleteSchedulingPlanRequest.java new file mode 100644 index 00000000000..4f63a3af2d3 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CascadingDeleteSchedulingPlanRequest.java @@ -0,0 +1,301 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use CascadingDeleteSchedulingPlanRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CascadingDeleteSchedulingPlanRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Schedule Plan [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPlanId; + + /** + * The Schedule Plan [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getSchedulingPlanId() { + return schedulingPlanId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CascadingDeleteSchedulingPlanRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Schedule Plan [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPlanId = null; + + /** + * The Schedule Plan [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param schedulingPlanId the value to set + * @return this builder instance + */ + public Builder schedulingPlanId(String schedulingPlanId) { + this.schedulingPlanId = schedulingPlanId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CascadingDeleteSchedulingPlanRequest o) { + schedulingPlanId(o.getSchedulingPlanId()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CascadingDeleteSchedulingPlanRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CascadingDeleteSchedulingPlanRequest + */ + public CascadingDeleteSchedulingPlanRequest build() { + CascadingDeleteSchedulingPlanRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of CascadingDeleteSchedulingPlanRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CascadingDeleteSchedulingPlanRequest + */ + public CascadingDeleteSchedulingPlanRequest buildWithoutInvocationCallback() { + CascadingDeleteSchedulingPlanRequest request = + new CascadingDeleteSchedulingPlanRequest(); + request.schedulingPlanId = schedulingPlanId; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new CascadingDeleteSchedulingPlanRequest(schedulingPlanId, opcRetryToken, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulingPlanId(schedulingPlanId) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulingPlanId=").append(String.valueOf(this.schedulingPlanId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CascadingDeleteSchedulingPlanRequest)) { + return false; + } + + CascadingDeleteSchedulingPlanRequest other = (CascadingDeleteSchedulingPlanRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulingPlanId, other.schedulingPlanId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulingPlanId == null ? 43 : this.schedulingPlanId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeAutonomousDatabaseSubscriptionRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeAutonomousDatabaseSubscriptionRequest.java new file mode 100644 index 00000000000..7e648c96263 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeAutonomousDatabaseSubscriptionRequest.java @@ -0,0 +1,376 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ChangeAutonomousDatabaseSubscriptionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeAutonomousDatabaseSubscriptionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.ChangeAutonomousDatabaseSubscriptionDetails> { + + /** + * Associate an Autonomous Database with a different subscription. + */ + private com.oracle.bmc.database.model.ChangeAutonomousDatabaseSubscriptionDetails + changeAutonomousDatabaseSubscriptionDetails; + + /** + * Associate an Autonomous Database with a different subscription. + */ + public com.oracle.bmc.database.model.ChangeAutonomousDatabaseSubscriptionDetails + getChangeAutonomousDatabaseSubscriptionDetails() { + return changeAutonomousDatabaseSubscriptionDetails; + } + /** + * The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String autonomousDatabaseId; + + /** + * The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getAutonomousDatabaseId() { + return autonomousDatabaseId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.ChangeAutonomousDatabaseSubscriptionDetails getBody$() { + return changeAutonomousDatabaseSubscriptionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeAutonomousDatabaseSubscriptionRequest, + com.oracle.bmc.database.model.ChangeAutonomousDatabaseSubscriptionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Associate an Autonomous Database with a different subscription. + */ + private com.oracle.bmc.database.model.ChangeAutonomousDatabaseSubscriptionDetails + changeAutonomousDatabaseSubscriptionDetails = null; + + /** + * Associate an Autonomous Database with a different subscription. + * @param changeAutonomousDatabaseSubscriptionDetails the value to set + * @return this builder instance + */ + public Builder changeAutonomousDatabaseSubscriptionDetails( + com.oracle.bmc.database.model.ChangeAutonomousDatabaseSubscriptionDetails + changeAutonomousDatabaseSubscriptionDetails) { + this.changeAutonomousDatabaseSubscriptionDetails = + changeAutonomousDatabaseSubscriptionDetails; + return this; + } + + /** + * The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String autonomousDatabaseId = null; + + /** + * The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param autonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder autonomousDatabaseId(String autonomousDatabaseId) { + this.autonomousDatabaseId = autonomousDatabaseId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeAutonomousDatabaseSubscriptionRequest o) { + changeAutonomousDatabaseSubscriptionDetails( + o.getChangeAutonomousDatabaseSubscriptionDetails()); + autonomousDatabaseId(o.getAutonomousDatabaseId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeAutonomousDatabaseSubscriptionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeAutonomousDatabaseSubscriptionRequest + */ + public ChangeAutonomousDatabaseSubscriptionRequest build() { + ChangeAutonomousDatabaseSubscriptionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.database.model.ChangeAutonomousDatabaseSubscriptionDetails body) { + changeAutonomousDatabaseSubscriptionDetails(body); + return this; + } + + /** + * Build the instance of ChangeAutonomousDatabaseSubscriptionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeAutonomousDatabaseSubscriptionRequest + */ + public ChangeAutonomousDatabaseSubscriptionRequest buildWithoutInvocationCallback() { + ChangeAutonomousDatabaseSubscriptionRequest request = + new ChangeAutonomousDatabaseSubscriptionRequest(); + request.changeAutonomousDatabaseSubscriptionDetails = + changeAutonomousDatabaseSubscriptionDetails; + request.autonomousDatabaseId = autonomousDatabaseId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new ChangeAutonomousDatabaseSubscriptionRequest(changeAutonomousDatabaseSubscriptionDetails, autonomousDatabaseId, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .changeAutonomousDatabaseSubscriptionDetails( + changeAutonomousDatabaseSubscriptionDetails) + .autonomousDatabaseId(autonomousDatabaseId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",changeAutonomousDatabaseSubscriptionDetails=") + .append(String.valueOf(this.changeAutonomousDatabaseSubscriptionDetails)); + sb.append(",autonomousDatabaseId=").append(String.valueOf(this.autonomousDatabaseId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeAutonomousDatabaseSubscriptionRequest)) { + return false; + } + + ChangeAutonomousDatabaseSubscriptionRequest other = + (ChangeAutonomousDatabaseSubscriptionRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.changeAutonomousDatabaseSubscriptionDetails, + other.changeAutonomousDatabaseSubscriptionDetails) + && java.util.Objects.equals(this.autonomousDatabaseId, other.autonomousDatabaseId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.changeAutonomousDatabaseSubscriptionDetails == null + ? 43 + : this.changeAutonomousDatabaseSubscriptionDetails.hashCode()); + result = + (result * PRIME) + + (this.autonomousDatabaseId == null + ? 43 + : this.autonomousDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeCloudExadataInfrastructureSubscriptionRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeCloudExadataInfrastructureSubscriptionRequest.java new file mode 100644 index 00000000000..e55dc88505f --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeCloudExadataInfrastructureSubscriptionRequest.java @@ -0,0 +1,384 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ChangeCloudExadataInfrastructureSubscriptionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeCloudExadataInfrastructureSubscriptionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.ChangeCloudExadataInfrastructureSubscriptionDetails> { + + /** + * Associate a cloud Exadata infrastructure with a different subscription. + */ + private com.oracle.bmc.database.model.ChangeCloudExadataInfrastructureSubscriptionDetails + changeCloudExadataInfrastructureSubscriptionDetails; + + /** + * Associate a cloud Exadata infrastructure with a different subscription. + */ + public com.oracle.bmc.database.model.ChangeCloudExadataInfrastructureSubscriptionDetails + getChangeCloudExadataInfrastructureSubscriptionDetails() { + return changeCloudExadataInfrastructureSubscriptionDetails; + } + /** + * The cloud Exadata infrastructure [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String cloudExadataInfrastructureId; + + /** + * The cloud Exadata infrastructure [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getCloudExadataInfrastructureId() { + return cloudExadataInfrastructureId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.ChangeCloudExadataInfrastructureSubscriptionDetails + getBody$() { + return changeCloudExadataInfrastructureSubscriptionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeCloudExadataInfrastructureSubscriptionRequest, + com.oracle.bmc.database.model + .ChangeCloudExadataInfrastructureSubscriptionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Associate a cloud Exadata infrastructure with a different subscription. + */ + private com.oracle.bmc.database.model.ChangeCloudExadataInfrastructureSubscriptionDetails + changeCloudExadataInfrastructureSubscriptionDetails = null; + + /** + * Associate a cloud Exadata infrastructure with a different subscription. + * @param changeCloudExadataInfrastructureSubscriptionDetails the value to set + * @return this builder instance + */ + public Builder changeCloudExadataInfrastructureSubscriptionDetails( + com.oracle.bmc.database.model.ChangeCloudExadataInfrastructureSubscriptionDetails + changeCloudExadataInfrastructureSubscriptionDetails) { + this.changeCloudExadataInfrastructureSubscriptionDetails = + changeCloudExadataInfrastructureSubscriptionDetails; + return this; + } + + /** + * The cloud Exadata infrastructure [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String cloudExadataInfrastructureId = null; + + /** + * The cloud Exadata infrastructure [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param cloudExadataInfrastructureId the value to set + * @return this builder instance + */ + public Builder cloudExadataInfrastructureId(String cloudExadataInfrastructureId) { + this.cloudExadataInfrastructureId = cloudExadataInfrastructureId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeCloudExadataInfrastructureSubscriptionRequest o) { + changeCloudExadataInfrastructureSubscriptionDetails( + o.getChangeCloudExadataInfrastructureSubscriptionDetails()); + cloudExadataInfrastructureId(o.getCloudExadataInfrastructureId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeCloudExadataInfrastructureSubscriptionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeCloudExadataInfrastructureSubscriptionRequest + */ + public ChangeCloudExadataInfrastructureSubscriptionRequest build() { + ChangeCloudExadataInfrastructureSubscriptionRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.database.model.ChangeCloudExadataInfrastructureSubscriptionDetails + body) { + changeCloudExadataInfrastructureSubscriptionDetails(body); + return this; + } + + /** + * Build the instance of ChangeCloudExadataInfrastructureSubscriptionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeCloudExadataInfrastructureSubscriptionRequest + */ + public ChangeCloudExadataInfrastructureSubscriptionRequest + buildWithoutInvocationCallback() { + ChangeCloudExadataInfrastructureSubscriptionRequest request = + new ChangeCloudExadataInfrastructureSubscriptionRequest(); + request.changeCloudExadataInfrastructureSubscriptionDetails = + changeCloudExadataInfrastructureSubscriptionDetails; + request.cloudExadataInfrastructureId = cloudExadataInfrastructureId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new ChangeCloudExadataInfrastructureSubscriptionRequest(changeCloudExadataInfrastructureSubscriptionDetails, cloudExadataInfrastructureId, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .changeCloudExadataInfrastructureSubscriptionDetails( + changeCloudExadataInfrastructureSubscriptionDetails) + .cloudExadataInfrastructureId(cloudExadataInfrastructureId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",changeCloudExadataInfrastructureSubscriptionDetails=") + .append(String.valueOf(this.changeCloudExadataInfrastructureSubscriptionDetails)); + sb.append(",cloudExadataInfrastructureId=") + .append(String.valueOf(this.cloudExadataInfrastructureId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeCloudExadataInfrastructureSubscriptionRequest)) { + return false; + } + + ChangeCloudExadataInfrastructureSubscriptionRequest other = + (ChangeCloudExadataInfrastructureSubscriptionRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.changeCloudExadataInfrastructureSubscriptionDetails, + other.changeCloudExadataInfrastructureSubscriptionDetails) + && java.util.Objects.equals( + this.cloudExadataInfrastructureId, other.cloudExadataInfrastructureId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.changeCloudExadataInfrastructureSubscriptionDetails == null + ? 43 + : this.changeCloudExadataInfrastructureSubscriptionDetails + .hashCode()); + result = + (result * PRIME) + + (this.cloudExadataInfrastructureId == null + ? 43 + : this.cloudExadataInfrastructureId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeCloudVmClusterSubscriptionRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeCloudVmClusterSubscriptionRequest.java new file mode 100644 index 00000000000..482358e0bc4 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeCloudVmClusterSubscriptionRequest.java @@ -0,0 +1,370 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ChangeCloudVmClusterSubscriptionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeCloudVmClusterSubscriptionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.ChangeCloudVmClusterSubscriptionDetails> { + + /** + * Associate a cloud VM cluster with a different subscription. + */ + private com.oracle.bmc.database.model.ChangeCloudVmClusterSubscriptionDetails + changeCloudVmClusterSubscriptionDetails; + + /** + * Associate a cloud VM cluster with a different subscription. + */ + public com.oracle.bmc.database.model.ChangeCloudVmClusterSubscriptionDetails + getChangeCloudVmClusterSubscriptionDetails() { + return changeCloudVmClusterSubscriptionDetails; + } + /** + * The cloud VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String cloudVmClusterId; + + /** + * The cloud VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getCloudVmClusterId() { + return cloudVmClusterId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.ChangeCloudVmClusterSubscriptionDetails getBody$() { + return changeCloudVmClusterSubscriptionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeCloudVmClusterSubscriptionRequest, + com.oracle.bmc.database.model.ChangeCloudVmClusterSubscriptionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Associate a cloud VM cluster with a different subscription. + */ + private com.oracle.bmc.database.model.ChangeCloudVmClusterSubscriptionDetails + changeCloudVmClusterSubscriptionDetails = null; + + /** + * Associate a cloud VM cluster with a different subscription. + * @param changeCloudVmClusterSubscriptionDetails the value to set + * @return this builder instance + */ + public Builder changeCloudVmClusterSubscriptionDetails( + com.oracle.bmc.database.model.ChangeCloudVmClusterSubscriptionDetails + changeCloudVmClusterSubscriptionDetails) { + this.changeCloudVmClusterSubscriptionDetails = changeCloudVmClusterSubscriptionDetails; + return this; + } + + /** + * The cloud VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String cloudVmClusterId = null; + + /** + * The cloud VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param cloudVmClusterId the value to set + * @return this builder instance + */ + public Builder cloudVmClusterId(String cloudVmClusterId) { + this.cloudVmClusterId = cloudVmClusterId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeCloudVmClusterSubscriptionRequest o) { + changeCloudVmClusterSubscriptionDetails(o.getChangeCloudVmClusterSubscriptionDetails()); + cloudVmClusterId(o.getCloudVmClusterId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeCloudVmClusterSubscriptionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeCloudVmClusterSubscriptionRequest + */ + public ChangeCloudVmClusterSubscriptionRequest build() { + ChangeCloudVmClusterSubscriptionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.database.model.ChangeCloudVmClusterSubscriptionDetails body) { + changeCloudVmClusterSubscriptionDetails(body); + return this; + } + + /** + * Build the instance of ChangeCloudVmClusterSubscriptionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeCloudVmClusterSubscriptionRequest + */ + public ChangeCloudVmClusterSubscriptionRequest buildWithoutInvocationCallback() { + ChangeCloudVmClusterSubscriptionRequest request = + new ChangeCloudVmClusterSubscriptionRequest(); + request.changeCloudVmClusterSubscriptionDetails = + changeCloudVmClusterSubscriptionDetails; + request.cloudVmClusterId = cloudVmClusterId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new ChangeCloudVmClusterSubscriptionRequest(changeCloudVmClusterSubscriptionDetails, cloudVmClusterId, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .changeCloudVmClusterSubscriptionDetails(changeCloudVmClusterSubscriptionDetails) + .cloudVmClusterId(cloudVmClusterId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",changeCloudVmClusterSubscriptionDetails=") + .append(String.valueOf(this.changeCloudVmClusterSubscriptionDetails)); + sb.append(",cloudVmClusterId=").append(String.valueOf(this.cloudVmClusterId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeCloudVmClusterSubscriptionRequest)) { + return false; + } + + ChangeCloudVmClusterSubscriptionRequest other = (ChangeCloudVmClusterSubscriptionRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.changeCloudVmClusterSubscriptionDetails, + other.changeCloudVmClusterSubscriptionDetails) + && java.util.Objects.equals(this.cloudVmClusterId, other.cloudVmClusterId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.changeCloudVmClusterSubscriptionDetails == null + ? 43 + : this.changeCloudVmClusterSubscriptionDetails.hashCode()); + result = + (result * PRIME) + + (this.cloudVmClusterId == null ? 43 : this.cloudVmClusterId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeExadbVmClusterCompartmentRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeExadbVmClusterCompartmentRequest.java new file mode 100644 index 00000000000..d92348a02e9 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeExadbVmClusterCompartmentRequest.java @@ -0,0 +1,369 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ChangeExadbVmClusterCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeExadbVmClusterCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.ChangeExadbVmClusterCompartmentDetails> { + + /** + * Request to move Exadata VM cluster on Exascale Infrastructure to a different compartment + */ + private com.oracle.bmc.database.model.ChangeExadbVmClusterCompartmentDetails + changeExadbVmClusterCompartmentDetails; + + /** + * Request to move Exadata VM cluster on Exascale Infrastructure to a different compartment + */ + public com.oracle.bmc.database.model.ChangeExadbVmClusterCompartmentDetails + getChangeExadbVmClusterCompartmentDetails() { + return changeExadbVmClusterCompartmentDetails; + } + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + private String exadbVmClusterId; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + public String getExadbVmClusterId() { + return exadbVmClusterId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.ChangeExadbVmClusterCompartmentDetails getBody$() { + return changeExadbVmClusterCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeExadbVmClusterCompartmentRequest, + com.oracle.bmc.database.model.ChangeExadbVmClusterCompartmentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request to move Exadata VM cluster on Exascale Infrastructure to a different compartment + */ + private com.oracle.bmc.database.model.ChangeExadbVmClusterCompartmentDetails + changeExadbVmClusterCompartmentDetails = null; + + /** + * Request to move Exadata VM cluster on Exascale Infrastructure to a different compartment + * @param changeExadbVmClusterCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeExadbVmClusterCompartmentDetails( + com.oracle.bmc.database.model.ChangeExadbVmClusterCompartmentDetails + changeExadbVmClusterCompartmentDetails) { + this.changeExadbVmClusterCompartmentDetails = changeExadbVmClusterCompartmentDetails; + return this; + } + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + private String exadbVmClusterId = null; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + * @param exadbVmClusterId the value to set + * @return this builder instance + */ + public Builder exadbVmClusterId(String exadbVmClusterId) { + this.exadbVmClusterId = exadbVmClusterId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeExadbVmClusterCompartmentRequest o) { + changeExadbVmClusterCompartmentDetails(o.getChangeExadbVmClusterCompartmentDetails()); + exadbVmClusterId(o.getExadbVmClusterId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeExadbVmClusterCompartmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeExadbVmClusterCompartmentRequest + */ + public ChangeExadbVmClusterCompartmentRequest build() { + ChangeExadbVmClusterCompartmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.database.model.ChangeExadbVmClusterCompartmentDetails body) { + changeExadbVmClusterCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeExadbVmClusterCompartmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeExadbVmClusterCompartmentRequest + */ + public ChangeExadbVmClusterCompartmentRequest buildWithoutInvocationCallback() { + ChangeExadbVmClusterCompartmentRequest request = + new ChangeExadbVmClusterCompartmentRequest(); + request.changeExadbVmClusterCompartmentDetails = changeExadbVmClusterCompartmentDetails; + request.exadbVmClusterId = exadbVmClusterId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new ChangeExadbVmClusterCompartmentRequest(changeExadbVmClusterCompartmentDetails, exadbVmClusterId, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .changeExadbVmClusterCompartmentDetails(changeExadbVmClusterCompartmentDetails) + .exadbVmClusterId(exadbVmClusterId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",changeExadbVmClusterCompartmentDetails=") + .append(String.valueOf(this.changeExadbVmClusterCompartmentDetails)); + sb.append(",exadbVmClusterId=").append(String.valueOf(this.exadbVmClusterId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeExadbVmClusterCompartmentRequest)) { + return false; + } + + ChangeExadbVmClusterCompartmentRequest other = (ChangeExadbVmClusterCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.changeExadbVmClusterCompartmentDetails, + other.changeExadbVmClusterCompartmentDetails) + && java.util.Objects.equals(this.exadbVmClusterId, other.exadbVmClusterId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.changeExadbVmClusterCompartmentDetails == null + ? 43 + : this.changeExadbVmClusterCompartmentDetails.hashCode()); + result = + (result * PRIME) + + (this.exadbVmClusterId == null ? 43 : this.exadbVmClusterId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeExascaleDbStorageVaultCompartmentRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeExascaleDbStorageVaultCompartmentRequest.java new file mode 100644 index 00000000000..1f68cd9994a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeExascaleDbStorageVaultCompartmentRequest.java @@ -0,0 +1,379 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ChangeExascaleDbStorageVaultCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeExascaleDbStorageVaultCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.ChangeExascaleDbStorageVaultCompartmentDetails> { + + /** + * Request to move Exadata Database Storage Vault to a different compartment + */ + private com.oracle.bmc.database.model.ChangeExascaleDbStorageVaultCompartmentDetails + changeExascaleDbStorageVaultCompartmentDetails; + + /** + * Request to move Exadata Database Storage Vault to a different compartment + */ + public com.oracle.bmc.database.model.ChangeExascaleDbStorageVaultCompartmentDetails + getChangeExascaleDbStorageVaultCompartmentDetails() { + return changeExascaleDbStorageVaultCompartmentDetails; + } + /** + * The Exadata Database Storage Vault [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String exascaleDbStorageVaultId; + + /** + * The Exadata Database Storage Vault [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getExascaleDbStorageVaultId() { + return exascaleDbStorageVaultId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.ChangeExascaleDbStorageVaultCompartmentDetails getBody$() { + return changeExascaleDbStorageVaultCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeExascaleDbStorageVaultCompartmentRequest, + com.oracle.bmc.database.model.ChangeExascaleDbStorageVaultCompartmentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request to move Exadata Database Storage Vault to a different compartment + */ + private com.oracle.bmc.database.model.ChangeExascaleDbStorageVaultCompartmentDetails + changeExascaleDbStorageVaultCompartmentDetails = null; + + /** + * Request to move Exadata Database Storage Vault to a different compartment + * @param changeExascaleDbStorageVaultCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeExascaleDbStorageVaultCompartmentDetails( + com.oracle.bmc.database.model.ChangeExascaleDbStorageVaultCompartmentDetails + changeExascaleDbStorageVaultCompartmentDetails) { + this.changeExascaleDbStorageVaultCompartmentDetails = + changeExascaleDbStorageVaultCompartmentDetails; + return this; + } + + /** + * The Exadata Database Storage Vault [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String exascaleDbStorageVaultId = null; + + /** + * The Exadata Database Storage Vault [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param exascaleDbStorageVaultId the value to set + * @return this builder instance + */ + public Builder exascaleDbStorageVaultId(String exascaleDbStorageVaultId) { + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeExascaleDbStorageVaultCompartmentRequest o) { + changeExascaleDbStorageVaultCompartmentDetails( + o.getChangeExascaleDbStorageVaultCompartmentDetails()); + exascaleDbStorageVaultId(o.getExascaleDbStorageVaultId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeExascaleDbStorageVaultCompartmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeExascaleDbStorageVaultCompartmentRequest + */ + public ChangeExascaleDbStorageVaultCompartmentRequest build() { + ChangeExascaleDbStorageVaultCompartmentRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.database.model.ChangeExascaleDbStorageVaultCompartmentDetails body) { + changeExascaleDbStorageVaultCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeExascaleDbStorageVaultCompartmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeExascaleDbStorageVaultCompartmentRequest + */ + public ChangeExascaleDbStorageVaultCompartmentRequest buildWithoutInvocationCallback() { + ChangeExascaleDbStorageVaultCompartmentRequest request = + new ChangeExascaleDbStorageVaultCompartmentRequest(); + request.changeExascaleDbStorageVaultCompartmentDetails = + changeExascaleDbStorageVaultCompartmentDetails; + request.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new ChangeExascaleDbStorageVaultCompartmentRequest(changeExascaleDbStorageVaultCompartmentDetails, exascaleDbStorageVaultId, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .changeExascaleDbStorageVaultCompartmentDetails( + changeExascaleDbStorageVaultCompartmentDetails) + .exascaleDbStorageVaultId(exascaleDbStorageVaultId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",changeExascaleDbStorageVaultCompartmentDetails=") + .append(String.valueOf(this.changeExascaleDbStorageVaultCompartmentDetails)); + sb.append(",exascaleDbStorageVaultId=") + .append(String.valueOf(this.exascaleDbStorageVaultId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeExascaleDbStorageVaultCompartmentRequest)) { + return false; + } + + ChangeExascaleDbStorageVaultCompartmentRequest other = + (ChangeExascaleDbStorageVaultCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.changeExascaleDbStorageVaultCompartmentDetails, + other.changeExascaleDbStorageVaultCompartmentDetails) + && java.util.Objects.equals( + this.exascaleDbStorageVaultId, other.exascaleDbStorageVaultId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.changeExascaleDbStorageVaultCompartmentDetails == null + ? 43 + : this.changeExascaleDbStorageVaultCompartmentDetails.hashCode()); + result = + (result * PRIME) + + (this.exascaleDbStorageVaultId == null + ? 43 + : this.exascaleDbStorageVaultId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeSchedulingPlanCompartmentRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeSchedulingPlanCompartmentRequest.java new file mode 100644 index 00000000000..2592da5550d --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeSchedulingPlanCompartmentRequest.java @@ -0,0 +1,369 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ChangeSchedulingPlanCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeSchedulingPlanCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.ChangeSchedulingPlanCompartmentDetails> { + + /** + * Request to move scheduling plan to a different compartment + */ + private com.oracle.bmc.database.model.ChangeSchedulingPlanCompartmentDetails + changeSchedulingPlanCompartmentDetails; + + /** + * Request to move scheduling plan to a different compartment + */ + public com.oracle.bmc.database.model.ChangeSchedulingPlanCompartmentDetails + getChangeSchedulingPlanCompartmentDetails() { + return changeSchedulingPlanCompartmentDetails; + } + /** + * The Schedule Plan [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPlanId; + + /** + * The Schedule Plan [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getSchedulingPlanId() { + return schedulingPlanId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.ChangeSchedulingPlanCompartmentDetails getBody$() { + return changeSchedulingPlanCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeSchedulingPlanCompartmentRequest, + com.oracle.bmc.database.model.ChangeSchedulingPlanCompartmentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request to move scheduling plan to a different compartment + */ + private com.oracle.bmc.database.model.ChangeSchedulingPlanCompartmentDetails + changeSchedulingPlanCompartmentDetails = null; + + /** + * Request to move scheduling plan to a different compartment + * @param changeSchedulingPlanCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeSchedulingPlanCompartmentDetails( + com.oracle.bmc.database.model.ChangeSchedulingPlanCompartmentDetails + changeSchedulingPlanCompartmentDetails) { + this.changeSchedulingPlanCompartmentDetails = changeSchedulingPlanCompartmentDetails; + return this; + } + + /** + * The Schedule Plan [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPlanId = null; + + /** + * The Schedule Plan [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param schedulingPlanId the value to set + * @return this builder instance + */ + public Builder schedulingPlanId(String schedulingPlanId) { + this.schedulingPlanId = schedulingPlanId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeSchedulingPlanCompartmentRequest o) { + changeSchedulingPlanCompartmentDetails(o.getChangeSchedulingPlanCompartmentDetails()); + schedulingPlanId(o.getSchedulingPlanId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeSchedulingPlanCompartmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeSchedulingPlanCompartmentRequest + */ + public ChangeSchedulingPlanCompartmentRequest build() { + ChangeSchedulingPlanCompartmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.database.model.ChangeSchedulingPlanCompartmentDetails body) { + changeSchedulingPlanCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeSchedulingPlanCompartmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeSchedulingPlanCompartmentRequest + */ + public ChangeSchedulingPlanCompartmentRequest buildWithoutInvocationCallback() { + ChangeSchedulingPlanCompartmentRequest request = + new ChangeSchedulingPlanCompartmentRequest(); + request.changeSchedulingPlanCompartmentDetails = changeSchedulingPlanCompartmentDetails; + request.schedulingPlanId = schedulingPlanId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new ChangeSchedulingPlanCompartmentRequest(changeSchedulingPlanCompartmentDetails, schedulingPlanId, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .changeSchedulingPlanCompartmentDetails(changeSchedulingPlanCompartmentDetails) + .schedulingPlanId(schedulingPlanId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",changeSchedulingPlanCompartmentDetails=") + .append(String.valueOf(this.changeSchedulingPlanCompartmentDetails)); + sb.append(",schedulingPlanId=").append(String.valueOf(this.schedulingPlanId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeSchedulingPlanCompartmentRequest)) { + return false; + } + + ChangeSchedulingPlanCompartmentRequest other = (ChangeSchedulingPlanCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.changeSchedulingPlanCompartmentDetails, + other.changeSchedulingPlanCompartmentDetails) + && java.util.Objects.equals(this.schedulingPlanId, other.schedulingPlanId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.changeSchedulingPlanCompartmentDetails == null + ? 43 + : this.changeSchedulingPlanCompartmentDetails.hashCode()); + result = + (result * PRIME) + + (this.schedulingPlanId == null ? 43 : this.schedulingPlanId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeSchedulingPolicyCompartmentRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeSchedulingPolicyCompartmentRequest.java new file mode 100644 index 00000000000..ec8e7974619 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ChangeSchedulingPolicyCompartmentRequest.java @@ -0,0 +1,375 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ChangeSchedulingPolicyCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeSchedulingPolicyCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.ChangeSchedulingPolicyCompartmentDetails> { + + /** + * Request to move scheduling policy to a different compartment + */ + private com.oracle.bmc.database.model.ChangeSchedulingPolicyCompartmentDetails + changeSchedulingPolicyCompartmentDetails; + + /** + * Request to move scheduling policy to a different compartment + */ + public com.oracle.bmc.database.model.ChangeSchedulingPolicyCompartmentDetails + getChangeSchedulingPolicyCompartmentDetails() { + return changeSchedulingPolicyCompartmentDetails; + } + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPolicyId; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getSchedulingPolicyId() { + return schedulingPolicyId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.ChangeSchedulingPolicyCompartmentDetails getBody$() { + return changeSchedulingPolicyCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeSchedulingPolicyCompartmentRequest, + com.oracle.bmc.database.model.ChangeSchedulingPolicyCompartmentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request to move scheduling policy to a different compartment + */ + private com.oracle.bmc.database.model.ChangeSchedulingPolicyCompartmentDetails + changeSchedulingPolicyCompartmentDetails = null; + + /** + * Request to move scheduling policy to a different compartment + * @param changeSchedulingPolicyCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeSchedulingPolicyCompartmentDetails( + com.oracle.bmc.database.model.ChangeSchedulingPolicyCompartmentDetails + changeSchedulingPolicyCompartmentDetails) { + this.changeSchedulingPolicyCompartmentDetails = + changeSchedulingPolicyCompartmentDetails; + return this; + } + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPolicyId = null; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param schedulingPolicyId the value to set + * @return this builder instance + */ + public Builder schedulingPolicyId(String schedulingPolicyId) { + this.schedulingPolicyId = schedulingPolicyId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeSchedulingPolicyCompartmentRequest o) { + changeSchedulingPolicyCompartmentDetails( + o.getChangeSchedulingPolicyCompartmentDetails()); + schedulingPolicyId(o.getSchedulingPolicyId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeSchedulingPolicyCompartmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeSchedulingPolicyCompartmentRequest + */ + public ChangeSchedulingPolicyCompartmentRequest build() { + ChangeSchedulingPolicyCompartmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.database.model.ChangeSchedulingPolicyCompartmentDetails body) { + changeSchedulingPolicyCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeSchedulingPolicyCompartmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeSchedulingPolicyCompartmentRequest + */ + public ChangeSchedulingPolicyCompartmentRequest buildWithoutInvocationCallback() { + ChangeSchedulingPolicyCompartmentRequest request = + new ChangeSchedulingPolicyCompartmentRequest(); + request.changeSchedulingPolicyCompartmentDetails = + changeSchedulingPolicyCompartmentDetails; + request.schedulingPolicyId = schedulingPolicyId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new ChangeSchedulingPolicyCompartmentRequest(changeSchedulingPolicyCompartmentDetails, schedulingPolicyId, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .changeSchedulingPolicyCompartmentDetails(changeSchedulingPolicyCompartmentDetails) + .schedulingPolicyId(schedulingPolicyId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",changeSchedulingPolicyCompartmentDetails=") + .append(String.valueOf(this.changeSchedulingPolicyCompartmentDetails)); + sb.append(",schedulingPolicyId=").append(String.valueOf(this.schedulingPolicyId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeSchedulingPolicyCompartmentRequest)) { + return false; + } + + ChangeSchedulingPolicyCompartmentRequest other = + (ChangeSchedulingPolicyCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.changeSchedulingPolicyCompartmentDetails, + other.changeSchedulingPolicyCompartmentDetails) + && java.util.Objects.equals(this.schedulingPolicyId, other.schedulingPolicyId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.changeSchedulingPolicyCompartmentDetails == null + ? 43 + : this.changeSchedulingPolicyCompartmentDetails.hashCode()); + result = + (result * PRIME) + + (this.schedulingPolicyId == null + ? 43 + : this.schedulingPolicyId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ConfigureExascaleExadataInfrastructureRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ConfigureExascaleExadataInfrastructureRequest.java new file mode 100644 index 00000000000..a0a9ab91569 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ConfigureExascaleExadataInfrastructureRequest.java @@ -0,0 +1,378 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ConfigureExascaleExadataInfrastructureRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ConfigureExascaleExadataInfrastructureRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.ConfigureExascaleExadataInfrastructureDetails> { + + /** + * The Exadata infrastructure [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String exadataInfrastructureId; + + /** + * The Exadata infrastructure [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getExadataInfrastructureId() { + return exadataInfrastructureId; + } + /** + * The exascale config details for the Exadata infrastructure with the total storage needed. + */ + private com.oracle.bmc.database.model.ConfigureExascaleExadataInfrastructureDetails + configureExascaleExadataInfrastructureDetails; + + /** + * The exascale config details for the Exadata infrastructure with the total storage needed. + */ + public com.oracle.bmc.database.model.ConfigureExascaleExadataInfrastructureDetails + getConfigureExascaleExadataInfrastructureDetails() { + return configureExascaleExadataInfrastructureDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.ConfigureExascaleExadataInfrastructureDetails getBody$() { + return configureExascaleExadataInfrastructureDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ConfigureExascaleExadataInfrastructureRequest, + com.oracle.bmc.database.model.ConfigureExascaleExadataInfrastructureDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Exadata infrastructure [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String exadataInfrastructureId = null; + + /** + * The Exadata infrastructure [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param exadataInfrastructureId the value to set + * @return this builder instance + */ + public Builder exadataInfrastructureId(String exadataInfrastructureId) { + this.exadataInfrastructureId = exadataInfrastructureId; + return this; + } + + /** + * The exascale config details for the Exadata infrastructure with the total storage needed. + */ + private com.oracle.bmc.database.model.ConfigureExascaleExadataInfrastructureDetails + configureExascaleExadataInfrastructureDetails = null; + + /** + * The exascale config details for the Exadata infrastructure with the total storage needed. + * @param configureExascaleExadataInfrastructureDetails the value to set + * @return this builder instance + */ + public Builder configureExascaleExadataInfrastructureDetails( + com.oracle.bmc.database.model.ConfigureExascaleExadataInfrastructureDetails + configureExascaleExadataInfrastructureDetails) { + this.configureExascaleExadataInfrastructureDetails = + configureExascaleExadataInfrastructureDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ConfigureExascaleExadataInfrastructureRequest o) { + exadataInfrastructureId(o.getExadataInfrastructureId()); + configureExascaleExadataInfrastructureDetails( + o.getConfigureExascaleExadataInfrastructureDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ConfigureExascaleExadataInfrastructureRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ConfigureExascaleExadataInfrastructureRequest + */ + public ConfigureExascaleExadataInfrastructureRequest build() { + ConfigureExascaleExadataInfrastructureRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.database.model.ConfigureExascaleExadataInfrastructureDetails body) { + configureExascaleExadataInfrastructureDetails(body); + return this; + } + + /** + * Build the instance of ConfigureExascaleExadataInfrastructureRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ConfigureExascaleExadataInfrastructureRequest + */ + public ConfigureExascaleExadataInfrastructureRequest buildWithoutInvocationCallback() { + ConfigureExascaleExadataInfrastructureRequest request = + new ConfigureExascaleExadataInfrastructureRequest(); + request.exadataInfrastructureId = exadataInfrastructureId; + request.configureExascaleExadataInfrastructureDetails = + configureExascaleExadataInfrastructureDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new ConfigureExascaleExadataInfrastructureRequest(exadataInfrastructureId, configureExascaleExadataInfrastructureDetails, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .exadataInfrastructureId(exadataInfrastructureId) + .configureExascaleExadataInfrastructureDetails( + configureExascaleExadataInfrastructureDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",exadataInfrastructureId=").append(String.valueOf(this.exadataInfrastructureId)); + sb.append(",configureExascaleExadataInfrastructureDetails=") + .append(String.valueOf(this.configureExascaleExadataInfrastructureDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfigureExascaleExadataInfrastructureRequest)) { + return false; + } + + ConfigureExascaleExadataInfrastructureRequest other = + (ConfigureExascaleExadataInfrastructureRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.exadataInfrastructureId, other.exadataInfrastructureId) + && java.util.Objects.equals( + this.configureExascaleExadataInfrastructureDetails, + other.configureExascaleExadataInfrastructureDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.exadataInfrastructureId == null + ? 43 + : this.exadataInfrastructureId.hashCode()); + result = + (result * PRIME) + + (this.configureExascaleExadataInfrastructureDetails == null + ? 43 + : this.configureExascaleExadataInfrastructureDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ConfirmKeyStoreDetailsAreCorrectRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ConfirmKeyStoreDetailsAreCorrectRequest.java new file mode 100644 index 00000000000..1cfcd093326 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ConfirmKeyStoreDetailsAreCorrectRequest.java @@ -0,0 +1,299 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ConfirmKeyStoreDetailsAreCorrectRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ConfirmKeyStoreDetailsAreCorrectRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the key store. + */ + private String keyStoreId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the key store. + */ + public String getKeyStoreId() { + return keyStoreId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ConfirmKeyStoreDetailsAreCorrectRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the key store. + */ + private String keyStoreId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the key store. + * @param keyStoreId the value to set + * @return this builder instance + */ + public Builder keyStoreId(String keyStoreId) { + this.keyStoreId = keyStoreId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ConfirmKeyStoreDetailsAreCorrectRequest o) { + keyStoreId(o.getKeyStoreId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ConfirmKeyStoreDetailsAreCorrectRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ConfirmKeyStoreDetailsAreCorrectRequest + */ + public ConfirmKeyStoreDetailsAreCorrectRequest build() { + ConfirmKeyStoreDetailsAreCorrectRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ConfirmKeyStoreDetailsAreCorrectRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ConfirmKeyStoreDetailsAreCorrectRequest + */ + public ConfirmKeyStoreDetailsAreCorrectRequest buildWithoutInvocationCallback() { + ConfirmKeyStoreDetailsAreCorrectRequest request = + new ConfirmKeyStoreDetailsAreCorrectRequest(); + request.keyStoreId = keyStoreId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new ConfirmKeyStoreDetailsAreCorrectRequest(keyStoreId, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .keyStoreId(keyStoreId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",keyStoreId=").append(String.valueOf(this.keyStoreId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfirmKeyStoreDetailsAreCorrectRequest)) { + return false; + } + + ConfirmKeyStoreDetailsAreCorrectRequest other = (ConfirmKeyStoreDetailsAreCorrectRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.keyStoreId, other.keyStoreId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.keyStoreId == null ? 43 : this.keyStoreId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateExadbVmClusterRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateExadbVmClusterRequest.java new file mode 100644 index 00000000000..46f0817057f --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateExadbVmClusterRequest.java @@ -0,0 +1,291 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use CreateExadbVmClusterRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateExadbVmClusterRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.CreateExadbVmClusterDetails> { + + /** + * Request to create a Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only. See [The New Exadata Cloud Service Resource Model](https://docs.cloud.oracle.com/iaas/Content/Database/iaas/Content/Database/Concepts/exaflexsystem.htm#exaflexsystem_topic-resource_model) for information on this resource type. + * + */ + private com.oracle.bmc.database.model.CreateExadbVmClusterDetails createExadbVmClusterDetails; + + /** + * Request to create a Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only. See [The New Exadata Cloud Service Resource Model](https://docs.cloud.oracle.com/iaas/Content/Database/iaas/Content/Database/Concepts/exaflexsystem.htm#exaflexsystem_topic-resource_model) for information on this resource type. + * + */ + public com.oracle.bmc.database.model.CreateExadbVmClusterDetails + getCreateExadbVmClusterDetails() { + return createExadbVmClusterDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.CreateExadbVmClusterDetails getBody$() { + return createExadbVmClusterDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateExadbVmClusterRequest, + com.oracle.bmc.database.model.CreateExadbVmClusterDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request to create a Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only. See [The New Exadata Cloud Service Resource Model](https://docs.cloud.oracle.com/iaas/Content/Database/iaas/Content/Database/Concepts/exaflexsystem.htm#exaflexsystem_topic-resource_model) for information on this resource type. + * + */ + private com.oracle.bmc.database.model.CreateExadbVmClusterDetails + createExadbVmClusterDetails = null; + + /** + * Request to create a Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only. See [The New Exadata Cloud Service Resource Model](https://docs.cloud.oracle.com/iaas/Content/Database/iaas/Content/Database/Concepts/exaflexsystem.htm#exaflexsystem_topic-resource_model) for information on this resource type. + * + * @param createExadbVmClusterDetails the value to set + * @return this builder instance + */ + public Builder createExadbVmClusterDetails( + com.oracle.bmc.database.model.CreateExadbVmClusterDetails + createExadbVmClusterDetails) { + this.createExadbVmClusterDetails = createExadbVmClusterDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateExadbVmClusterRequest o) { + createExadbVmClusterDetails(o.getCreateExadbVmClusterDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateExadbVmClusterRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateExadbVmClusterRequest + */ + public CreateExadbVmClusterRequest build() { + CreateExadbVmClusterRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.database.model.CreateExadbVmClusterDetails body) { + createExadbVmClusterDetails(body); + return this; + } + + /** + * Build the instance of CreateExadbVmClusterRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateExadbVmClusterRequest + */ + public CreateExadbVmClusterRequest buildWithoutInvocationCallback() { + CreateExadbVmClusterRequest request = new CreateExadbVmClusterRequest(); + request.createExadbVmClusterDetails = createExadbVmClusterDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateExadbVmClusterRequest(createExadbVmClusterDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createExadbVmClusterDetails(createExadbVmClusterDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createExadbVmClusterDetails=") + .append(String.valueOf(this.createExadbVmClusterDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateExadbVmClusterRequest)) { + return false; + } + + CreateExadbVmClusterRequest other = (CreateExadbVmClusterRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createExadbVmClusterDetails, other.createExadbVmClusterDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createExadbVmClusterDetails == null + ? 43 + : this.createExadbVmClusterDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateExascaleDbStorageVaultRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateExascaleDbStorageVaultRequest.java new file mode 100644 index 00000000000..8220c5da261 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateExascaleDbStorageVaultRequest.java @@ -0,0 +1,294 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use CreateExascaleDbStorageVaultRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateExascaleDbStorageVaultRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.CreateExascaleDbStorageVaultDetails> { + + /** + * Request to create a Exadata Database Storage Vault. + * + */ + private com.oracle.bmc.database.model.CreateExascaleDbStorageVaultDetails + createExascaleDbStorageVaultDetails; + + /** + * Request to create a Exadata Database Storage Vault. + * + */ + public com.oracle.bmc.database.model.CreateExascaleDbStorageVaultDetails + getCreateExascaleDbStorageVaultDetails() { + return createExascaleDbStorageVaultDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.CreateExascaleDbStorageVaultDetails getBody$() { + return createExascaleDbStorageVaultDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateExascaleDbStorageVaultRequest, + com.oracle.bmc.database.model.CreateExascaleDbStorageVaultDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request to create a Exadata Database Storage Vault. + * + */ + private com.oracle.bmc.database.model.CreateExascaleDbStorageVaultDetails + createExascaleDbStorageVaultDetails = null; + + /** + * Request to create a Exadata Database Storage Vault. + * + * @param createExascaleDbStorageVaultDetails the value to set + * @return this builder instance + */ + public Builder createExascaleDbStorageVaultDetails( + com.oracle.bmc.database.model.CreateExascaleDbStorageVaultDetails + createExascaleDbStorageVaultDetails) { + this.createExascaleDbStorageVaultDetails = createExascaleDbStorageVaultDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateExascaleDbStorageVaultRequest o) { + createExascaleDbStorageVaultDetails(o.getCreateExascaleDbStorageVaultDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateExascaleDbStorageVaultRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateExascaleDbStorageVaultRequest + */ + public CreateExascaleDbStorageVaultRequest build() { + CreateExascaleDbStorageVaultRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.database.model.CreateExascaleDbStorageVaultDetails body) { + createExascaleDbStorageVaultDetails(body); + return this; + } + + /** + * Build the instance of CreateExascaleDbStorageVaultRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateExascaleDbStorageVaultRequest + */ + public CreateExascaleDbStorageVaultRequest buildWithoutInvocationCallback() { + CreateExascaleDbStorageVaultRequest request = new CreateExascaleDbStorageVaultRequest(); + request.createExascaleDbStorageVaultDetails = createExascaleDbStorageVaultDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateExascaleDbStorageVaultRequest(createExascaleDbStorageVaultDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createExascaleDbStorageVaultDetails(createExascaleDbStorageVaultDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createExascaleDbStorageVaultDetails=") + .append(String.valueOf(this.createExascaleDbStorageVaultDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateExascaleDbStorageVaultRequest)) { + return false; + } + + CreateExascaleDbStorageVaultRequest other = (CreateExascaleDbStorageVaultRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createExascaleDbStorageVaultDetails, + other.createExascaleDbStorageVaultDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createExascaleDbStorageVaultDetails == null + ? 43 + : this.createExascaleDbStorageVaultDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateExecutionActionRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateExecutionActionRequest.java new file mode 100644 index 00000000000..9365b8d900f --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateExecutionActionRequest.java @@ -0,0 +1,287 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use CreateExecutionActionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateExecutionActionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.CreateExecutionActionDetails> { + + /** + * Request to create execution action. + */ + private com.oracle.bmc.database.model.CreateExecutionActionDetails createExecutionActionDetails; + + /** + * Request to create execution action. + */ + public com.oracle.bmc.database.model.CreateExecutionActionDetails + getCreateExecutionActionDetails() { + return createExecutionActionDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.CreateExecutionActionDetails getBody$() { + return createExecutionActionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateExecutionActionRequest, + com.oracle.bmc.database.model.CreateExecutionActionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request to create execution action. + */ + private com.oracle.bmc.database.model.CreateExecutionActionDetails + createExecutionActionDetails = null; + + /** + * Request to create execution action. + * @param createExecutionActionDetails the value to set + * @return this builder instance + */ + public Builder createExecutionActionDetails( + com.oracle.bmc.database.model.CreateExecutionActionDetails + createExecutionActionDetails) { + this.createExecutionActionDetails = createExecutionActionDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateExecutionActionRequest o) { + createExecutionActionDetails(o.getCreateExecutionActionDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateExecutionActionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateExecutionActionRequest + */ + public CreateExecutionActionRequest build() { + CreateExecutionActionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.database.model.CreateExecutionActionDetails body) { + createExecutionActionDetails(body); + return this; + } + + /** + * Build the instance of CreateExecutionActionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateExecutionActionRequest + */ + public CreateExecutionActionRequest buildWithoutInvocationCallback() { + CreateExecutionActionRequest request = new CreateExecutionActionRequest(); + request.createExecutionActionDetails = createExecutionActionDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateExecutionActionRequest(createExecutionActionDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createExecutionActionDetails(createExecutionActionDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createExecutionActionDetails=") + .append(String.valueOf(this.createExecutionActionDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateExecutionActionRequest)) { + return false; + } + + CreateExecutionActionRequest other = (CreateExecutionActionRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createExecutionActionDetails, other.createExecutionActionDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createExecutionActionDetails == null + ? 43 + : this.createExecutionActionDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateExecutionWindowRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateExecutionWindowRequest.java new file mode 100644 index 00000000000..714d4ea4e8b --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateExecutionWindowRequest.java @@ -0,0 +1,287 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use CreateExecutionWindowRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateExecutionWindowRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.CreateExecutionWindowDetails> { + + /** + * Request to create execution window. + */ + private com.oracle.bmc.database.model.CreateExecutionWindowDetails createExecutionWindowDetails; + + /** + * Request to create execution window. + */ + public com.oracle.bmc.database.model.CreateExecutionWindowDetails + getCreateExecutionWindowDetails() { + return createExecutionWindowDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.CreateExecutionWindowDetails getBody$() { + return createExecutionWindowDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateExecutionWindowRequest, + com.oracle.bmc.database.model.CreateExecutionWindowDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request to create execution window. + */ + private com.oracle.bmc.database.model.CreateExecutionWindowDetails + createExecutionWindowDetails = null; + + /** + * Request to create execution window. + * @param createExecutionWindowDetails the value to set + * @return this builder instance + */ + public Builder createExecutionWindowDetails( + com.oracle.bmc.database.model.CreateExecutionWindowDetails + createExecutionWindowDetails) { + this.createExecutionWindowDetails = createExecutionWindowDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateExecutionWindowRequest o) { + createExecutionWindowDetails(o.getCreateExecutionWindowDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateExecutionWindowRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateExecutionWindowRequest + */ + public CreateExecutionWindowRequest build() { + CreateExecutionWindowRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.database.model.CreateExecutionWindowDetails body) { + createExecutionWindowDetails(body); + return this; + } + + /** + * Build the instance of CreateExecutionWindowRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateExecutionWindowRequest + */ + public CreateExecutionWindowRequest buildWithoutInvocationCallback() { + CreateExecutionWindowRequest request = new CreateExecutionWindowRequest(); + request.createExecutionWindowDetails = createExecutionWindowDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateExecutionWindowRequest(createExecutionWindowDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createExecutionWindowDetails(createExecutionWindowDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createExecutionWindowDetails=") + .append(String.valueOf(this.createExecutionWindowDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateExecutionWindowRequest)) { + return false; + } + + CreateExecutionWindowRequest other = (CreateExecutionWindowRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createExecutionWindowDetails, other.createExecutionWindowDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createExecutionWindowDetails == null + ? 43 + : this.createExecutionWindowDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateScheduledActionRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateScheduledActionRequest.java new file mode 100644 index 00000000000..1ad0a5cc8ee --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateScheduledActionRequest.java @@ -0,0 +1,287 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use CreateScheduledActionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateScheduledActionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.CreateScheduledActionDetails> { + + /** + * Request to create Scheduled Action. + */ + private com.oracle.bmc.database.model.CreateScheduledActionDetails createScheduledActionDetails; + + /** + * Request to create Scheduled Action. + */ + public com.oracle.bmc.database.model.CreateScheduledActionDetails + getCreateScheduledActionDetails() { + return createScheduledActionDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.CreateScheduledActionDetails getBody$() { + return createScheduledActionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateScheduledActionRequest, + com.oracle.bmc.database.model.CreateScheduledActionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request to create Scheduled Action. + */ + private com.oracle.bmc.database.model.CreateScheduledActionDetails + createScheduledActionDetails = null; + + /** + * Request to create Scheduled Action. + * @param createScheduledActionDetails the value to set + * @return this builder instance + */ + public Builder createScheduledActionDetails( + com.oracle.bmc.database.model.CreateScheduledActionDetails + createScheduledActionDetails) { + this.createScheduledActionDetails = createScheduledActionDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateScheduledActionRequest o) { + createScheduledActionDetails(o.getCreateScheduledActionDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateScheduledActionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateScheduledActionRequest + */ + public CreateScheduledActionRequest build() { + CreateScheduledActionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.database.model.CreateScheduledActionDetails body) { + createScheduledActionDetails(body); + return this; + } + + /** + * Build the instance of CreateScheduledActionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateScheduledActionRequest + */ + public CreateScheduledActionRequest buildWithoutInvocationCallback() { + CreateScheduledActionRequest request = new CreateScheduledActionRequest(); + request.createScheduledActionDetails = createScheduledActionDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateScheduledActionRequest(createScheduledActionDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createScheduledActionDetails(createScheduledActionDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createScheduledActionDetails=") + .append(String.valueOf(this.createScheduledActionDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateScheduledActionRequest)) { + return false; + } + + CreateScheduledActionRequest other = (CreateScheduledActionRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createScheduledActionDetails, other.createScheduledActionDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createScheduledActionDetails == null + ? 43 + : this.createScheduledActionDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateSchedulingPlanRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateSchedulingPlanRequest.java new file mode 100644 index 00000000000..47bcabb822e --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateSchedulingPlanRequest.java @@ -0,0 +1,287 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use CreateSchedulingPlanRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateSchedulingPlanRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.CreateSchedulingPlanDetails> { + + /** + * Request to create Scheduling Plan. + */ + private com.oracle.bmc.database.model.CreateSchedulingPlanDetails createSchedulingPlanDetails; + + /** + * Request to create Scheduling Plan. + */ + public com.oracle.bmc.database.model.CreateSchedulingPlanDetails + getCreateSchedulingPlanDetails() { + return createSchedulingPlanDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.CreateSchedulingPlanDetails getBody$() { + return createSchedulingPlanDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateSchedulingPlanRequest, + com.oracle.bmc.database.model.CreateSchedulingPlanDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request to create Scheduling Plan. + */ + private com.oracle.bmc.database.model.CreateSchedulingPlanDetails + createSchedulingPlanDetails = null; + + /** + * Request to create Scheduling Plan. + * @param createSchedulingPlanDetails the value to set + * @return this builder instance + */ + public Builder createSchedulingPlanDetails( + com.oracle.bmc.database.model.CreateSchedulingPlanDetails + createSchedulingPlanDetails) { + this.createSchedulingPlanDetails = createSchedulingPlanDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateSchedulingPlanRequest o) { + createSchedulingPlanDetails(o.getCreateSchedulingPlanDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateSchedulingPlanRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateSchedulingPlanRequest + */ + public CreateSchedulingPlanRequest build() { + CreateSchedulingPlanRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.database.model.CreateSchedulingPlanDetails body) { + createSchedulingPlanDetails(body); + return this; + } + + /** + * Build the instance of CreateSchedulingPlanRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateSchedulingPlanRequest + */ + public CreateSchedulingPlanRequest buildWithoutInvocationCallback() { + CreateSchedulingPlanRequest request = new CreateSchedulingPlanRequest(); + request.createSchedulingPlanDetails = createSchedulingPlanDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateSchedulingPlanRequest(createSchedulingPlanDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createSchedulingPlanDetails(createSchedulingPlanDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createSchedulingPlanDetails=") + .append(String.valueOf(this.createSchedulingPlanDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSchedulingPlanRequest)) { + return false; + } + + CreateSchedulingPlanRequest other = (CreateSchedulingPlanRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createSchedulingPlanDetails, other.createSchedulingPlanDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createSchedulingPlanDetails == null + ? 43 + : this.createSchedulingPlanDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateSchedulingPolicyRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateSchedulingPolicyRequest.java new file mode 100644 index 00000000000..b8bf5f6b82a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateSchedulingPolicyRequest.java @@ -0,0 +1,288 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use CreateSchedulingPolicyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateSchedulingPolicyRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.CreateSchedulingPolicyDetails> { + + /** + * Request to create Scheduling Policy. + */ + private com.oracle.bmc.database.model.CreateSchedulingPolicyDetails + createSchedulingPolicyDetails; + + /** + * Request to create Scheduling Policy. + */ + public com.oracle.bmc.database.model.CreateSchedulingPolicyDetails + getCreateSchedulingPolicyDetails() { + return createSchedulingPolicyDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.CreateSchedulingPolicyDetails getBody$() { + return createSchedulingPolicyDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateSchedulingPolicyRequest, + com.oracle.bmc.database.model.CreateSchedulingPolicyDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request to create Scheduling Policy. + */ + private com.oracle.bmc.database.model.CreateSchedulingPolicyDetails + createSchedulingPolicyDetails = null; + + /** + * Request to create Scheduling Policy. + * @param createSchedulingPolicyDetails the value to set + * @return this builder instance + */ + public Builder createSchedulingPolicyDetails( + com.oracle.bmc.database.model.CreateSchedulingPolicyDetails + createSchedulingPolicyDetails) { + this.createSchedulingPolicyDetails = createSchedulingPolicyDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateSchedulingPolicyRequest o) { + createSchedulingPolicyDetails(o.getCreateSchedulingPolicyDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateSchedulingPolicyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateSchedulingPolicyRequest + */ + public CreateSchedulingPolicyRequest build() { + CreateSchedulingPolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.database.model.CreateSchedulingPolicyDetails body) { + createSchedulingPolicyDetails(body); + return this; + } + + /** + * Build the instance of CreateSchedulingPolicyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateSchedulingPolicyRequest + */ + public CreateSchedulingPolicyRequest buildWithoutInvocationCallback() { + CreateSchedulingPolicyRequest request = new CreateSchedulingPolicyRequest(); + request.createSchedulingPolicyDetails = createSchedulingPolicyDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateSchedulingPolicyRequest(createSchedulingPolicyDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createSchedulingPolicyDetails(createSchedulingPolicyDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createSchedulingPolicyDetails=") + .append(String.valueOf(this.createSchedulingPolicyDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSchedulingPolicyRequest)) { + return false; + } + + CreateSchedulingPolicyRequest other = (CreateSchedulingPolicyRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createSchedulingPolicyDetails, other.createSchedulingPolicyDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createSchedulingPolicyDetails == null + ? 43 + : this.createSchedulingPolicyDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateSchedulingWindowRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateSchedulingWindowRequest.java new file mode 100644 index 00000000000..d082ec0c0ed --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/CreateSchedulingWindowRequest.java @@ -0,0 +1,324 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use CreateSchedulingWindowRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateSchedulingWindowRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.CreateSchedulingWindowDetails> { + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPolicyId; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getSchedulingPolicyId() { + return schedulingPolicyId; + } + /** + * Request to create Scheduling Window. + */ + private com.oracle.bmc.database.model.CreateSchedulingWindowDetails + createSchedulingWindowDetails; + + /** + * Request to create Scheduling Window. + */ + public com.oracle.bmc.database.model.CreateSchedulingWindowDetails + getCreateSchedulingWindowDetails() { + return createSchedulingWindowDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.CreateSchedulingWindowDetails getBody$() { + return createSchedulingWindowDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateSchedulingWindowRequest, + com.oracle.bmc.database.model.CreateSchedulingWindowDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPolicyId = null; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param schedulingPolicyId the value to set + * @return this builder instance + */ + public Builder schedulingPolicyId(String schedulingPolicyId) { + this.schedulingPolicyId = schedulingPolicyId; + return this; + } + + /** + * Request to create Scheduling Window. + */ + private com.oracle.bmc.database.model.CreateSchedulingWindowDetails + createSchedulingWindowDetails = null; + + /** + * Request to create Scheduling Window. + * @param createSchedulingWindowDetails the value to set + * @return this builder instance + */ + public Builder createSchedulingWindowDetails( + com.oracle.bmc.database.model.CreateSchedulingWindowDetails + createSchedulingWindowDetails) { + this.createSchedulingWindowDetails = createSchedulingWindowDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateSchedulingWindowRequest o) { + schedulingPolicyId(o.getSchedulingPolicyId()); + createSchedulingWindowDetails(o.getCreateSchedulingWindowDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateSchedulingWindowRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateSchedulingWindowRequest + */ + public CreateSchedulingWindowRequest build() { + CreateSchedulingWindowRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.database.model.CreateSchedulingWindowDetails body) { + createSchedulingWindowDetails(body); + return this; + } + + /** + * Build the instance of CreateSchedulingWindowRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateSchedulingWindowRequest + */ + public CreateSchedulingWindowRequest buildWithoutInvocationCallback() { + CreateSchedulingWindowRequest request = new CreateSchedulingWindowRequest(); + request.schedulingPolicyId = schedulingPolicyId; + request.createSchedulingWindowDetails = createSchedulingWindowDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateSchedulingWindowRequest(schedulingPolicyId, createSchedulingWindowDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulingPolicyId(schedulingPolicyId) + .createSchedulingWindowDetails(createSchedulingWindowDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulingPolicyId=").append(String.valueOf(this.schedulingPolicyId)); + sb.append(",createSchedulingWindowDetails=") + .append(String.valueOf(this.createSchedulingWindowDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSchedulingWindowRequest)) { + return false; + } + + CreateSchedulingWindowRequest other = (CreateSchedulingWindowRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulingPolicyId, other.schedulingPolicyId) + && java.util.Objects.equals( + this.createSchedulingWindowDetails, other.createSchedulingWindowDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulingPolicyId == null + ? 43 + : this.schedulingPolicyId.hashCode()); + result = + (result * PRIME) + + (this.createSchedulingWindowDetails == null + ? 43 + : this.createSchedulingWindowDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteExadbVmClusterRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteExadbVmClusterRequest.java new file mode 100644 index 00000000000..bb70c17f8d6 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteExadbVmClusterRequest.java @@ -0,0 +1,246 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use DeleteExadbVmClusterRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteExadbVmClusterRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + private String exadbVmClusterId; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + public String getExadbVmClusterId() { + return exadbVmClusterId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteExadbVmClusterRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + private String exadbVmClusterId = null; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + * @param exadbVmClusterId the value to set + * @return this builder instance + */ + public Builder exadbVmClusterId(String exadbVmClusterId) { + this.exadbVmClusterId = exadbVmClusterId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteExadbVmClusterRequest o) { + exadbVmClusterId(o.getExadbVmClusterId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteExadbVmClusterRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteExadbVmClusterRequest + */ + public DeleteExadbVmClusterRequest build() { + DeleteExadbVmClusterRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteExadbVmClusterRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteExadbVmClusterRequest + */ + public DeleteExadbVmClusterRequest buildWithoutInvocationCallback() { + DeleteExadbVmClusterRequest request = new DeleteExadbVmClusterRequest(); + request.exadbVmClusterId = exadbVmClusterId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteExadbVmClusterRequest(exadbVmClusterId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .exadbVmClusterId(exadbVmClusterId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",exadbVmClusterId=").append(String.valueOf(this.exadbVmClusterId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteExadbVmClusterRequest)) { + return false; + } + + DeleteExadbVmClusterRequest other = (DeleteExadbVmClusterRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.exadbVmClusterId, other.exadbVmClusterId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.exadbVmClusterId == null ? 43 : this.exadbVmClusterId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteExascaleDbStorageVaultRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteExascaleDbStorageVaultRequest.java new file mode 100644 index 00000000000..b94c00c5ec5 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteExascaleDbStorageVaultRequest.java @@ -0,0 +1,250 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use DeleteExascaleDbStorageVaultRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteExascaleDbStorageVaultRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Exadata Database Storage Vault [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String exascaleDbStorageVaultId; + + /** + * The Exadata Database Storage Vault [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getExascaleDbStorageVaultId() { + return exascaleDbStorageVaultId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteExascaleDbStorageVaultRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Exadata Database Storage Vault [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String exascaleDbStorageVaultId = null; + + /** + * The Exadata Database Storage Vault [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param exascaleDbStorageVaultId the value to set + * @return this builder instance + */ + public Builder exascaleDbStorageVaultId(String exascaleDbStorageVaultId) { + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteExascaleDbStorageVaultRequest o) { + exascaleDbStorageVaultId(o.getExascaleDbStorageVaultId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteExascaleDbStorageVaultRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteExascaleDbStorageVaultRequest + */ + public DeleteExascaleDbStorageVaultRequest build() { + DeleteExascaleDbStorageVaultRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteExascaleDbStorageVaultRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteExascaleDbStorageVaultRequest + */ + public DeleteExascaleDbStorageVaultRequest buildWithoutInvocationCallback() { + DeleteExascaleDbStorageVaultRequest request = new DeleteExascaleDbStorageVaultRequest(); + request.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteExascaleDbStorageVaultRequest(exascaleDbStorageVaultId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .exascaleDbStorageVaultId(exascaleDbStorageVaultId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",exascaleDbStorageVaultId=") + .append(String.valueOf(this.exascaleDbStorageVaultId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteExascaleDbStorageVaultRequest)) { + return false; + } + + DeleteExascaleDbStorageVaultRequest other = (DeleteExascaleDbStorageVaultRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.exascaleDbStorageVaultId, other.exascaleDbStorageVaultId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.exascaleDbStorageVaultId == null + ? 43 + : this.exascaleDbStorageVaultId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteExecutionActionRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteExecutionActionRequest.java new file mode 100644 index 00000000000..a848f4e3cbc --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteExecutionActionRequest.java @@ -0,0 +1,246 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use DeleteExecutionActionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteExecutionActionRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The execution action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String executionActionId; + + /** + * The execution action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getExecutionActionId() { + return executionActionId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteExecutionActionRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The execution action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String executionActionId = null; + + /** + * The execution action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param executionActionId the value to set + * @return this builder instance + */ + public Builder executionActionId(String executionActionId) { + this.executionActionId = executionActionId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteExecutionActionRequest o) { + executionActionId(o.getExecutionActionId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteExecutionActionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteExecutionActionRequest + */ + public DeleteExecutionActionRequest build() { + DeleteExecutionActionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteExecutionActionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteExecutionActionRequest + */ + public DeleteExecutionActionRequest buildWithoutInvocationCallback() { + DeleteExecutionActionRequest request = new DeleteExecutionActionRequest(); + request.executionActionId = executionActionId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteExecutionActionRequest(executionActionId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .executionActionId(executionActionId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",executionActionId=").append(String.valueOf(this.executionActionId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteExecutionActionRequest)) { + return false; + } + + DeleteExecutionActionRequest other = (DeleteExecutionActionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.executionActionId, other.executionActionId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.executionActionId == null ? 43 : this.executionActionId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteExecutionWindowRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteExecutionWindowRequest.java new file mode 100644 index 00000000000..b88fc4410c6 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteExecutionWindowRequest.java @@ -0,0 +1,246 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use DeleteExecutionWindowRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteExecutionWindowRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The execution window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String executionWindowId; + + /** + * The execution window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getExecutionWindowId() { + return executionWindowId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteExecutionWindowRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The execution window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String executionWindowId = null; + + /** + * The execution window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param executionWindowId the value to set + * @return this builder instance + */ + public Builder executionWindowId(String executionWindowId) { + this.executionWindowId = executionWindowId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteExecutionWindowRequest o) { + executionWindowId(o.getExecutionWindowId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteExecutionWindowRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteExecutionWindowRequest + */ + public DeleteExecutionWindowRequest build() { + DeleteExecutionWindowRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteExecutionWindowRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteExecutionWindowRequest + */ + public DeleteExecutionWindowRequest buildWithoutInvocationCallback() { + DeleteExecutionWindowRequest request = new DeleteExecutionWindowRequest(); + request.executionWindowId = executionWindowId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteExecutionWindowRequest(executionWindowId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .executionWindowId(executionWindowId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",executionWindowId=").append(String.valueOf(this.executionWindowId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteExecutionWindowRequest)) { + return false; + } + + DeleteExecutionWindowRequest other = (DeleteExecutionWindowRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.executionWindowId, other.executionWindowId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.executionWindowId == null ? 43 : this.executionWindowId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteScheduledActionRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteScheduledActionRequest.java new file mode 100644 index 00000000000..c12823e3068 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteScheduledActionRequest.java @@ -0,0 +1,246 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use DeleteScheduledActionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteScheduledActionRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Scheduled Action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String scheduledActionId; + + /** + * The Scheduled Action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getScheduledActionId() { + return scheduledActionId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteScheduledActionRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Scheduled Action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String scheduledActionId = null; + + /** + * The Scheduled Action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param scheduledActionId the value to set + * @return this builder instance + */ + public Builder scheduledActionId(String scheduledActionId) { + this.scheduledActionId = scheduledActionId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteScheduledActionRequest o) { + scheduledActionId(o.getScheduledActionId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteScheduledActionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteScheduledActionRequest + */ + public DeleteScheduledActionRequest build() { + DeleteScheduledActionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteScheduledActionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteScheduledActionRequest + */ + public DeleteScheduledActionRequest buildWithoutInvocationCallback() { + DeleteScheduledActionRequest request = new DeleteScheduledActionRequest(); + request.scheduledActionId = scheduledActionId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteScheduledActionRequest(scheduledActionId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .scheduledActionId(scheduledActionId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",scheduledActionId=").append(String.valueOf(this.scheduledActionId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteScheduledActionRequest)) { + return false; + } + + DeleteScheduledActionRequest other = (DeleteScheduledActionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.scheduledActionId, other.scheduledActionId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.scheduledActionId == null ? 43 : this.scheduledActionId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteSchedulingPlanRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteSchedulingPlanRequest.java new file mode 100644 index 00000000000..028320363b0 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteSchedulingPlanRequest.java @@ -0,0 +1,246 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use DeleteSchedulingPlanRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteSchedulingPlanRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Schedule Plan [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPlanId; + + /** + * The Schedule Plan [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getSchedulingPlanId() { + return schedulingPlanId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteSchedulingPlanRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Schedule Plan [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPlanId = null; + + /** + * The Schedule Plan [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param schedulingPlanId the value to set + * @return this builder instance + */ + public Builder schedulingPlanId(String schedulingPlanId) { + this.schedulingPlanId = schedulingPlanId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteSchedulingPlanRequest o) { + schedulingPlanId(o.getSchedulingPlanId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteSchedulingPlanRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteSchedulingPlanRequest + */ + public DeleteSchedulingPlanRequest build() { + DeleteSchedulingPlanRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteSchedulingPlanRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteSchedulingPlanRequest + */ + public DeleteSchedulingPlanRequest buildWithoutInvocationCallback() { + DeleteSchedulingPlanRequest request = new DeleteSchedulingPlanRequest(); + request.schedulingPlanId = schedulingPlanId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteSchedulingPlanRequest(schedulingPlanId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulingPlanId(schedulingPlanId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulingPlanId=").append(String.valueOf(this.schedulingPlanId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSchedulingPlanRequest)) { + return false; + } + + DeleteSchedulingPlanRequest other = (DeleteSchedulingPlanRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulingPlanId, other.schedulingPlanId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulingPlanId == null ? 43 : this.schedulingPlanId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteSchedulingPolicyRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteSchedulingPolicyRequest.java new file mode 100644 index 00000000000..ffefc2ce10f --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteSchedulingPolicyRequest.java @@ -0,0 +1,248 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use DeleteSchedulingPolicyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteSchedulingPolicyRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPolicyId; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getSchedulingPolicyId() { + return schedulingPolicyId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteSchedulingPolicyRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPolicyId = null; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param schedulingPolicyId the value to set + * @return this builder instance + */ + public Builder schedulingPolicyId(String schedulingPolicyId) { + this.schedulingPolicyId = schedulingPolicyId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteSchedulingPolicyRequest o) { + schedulingPolicyId(o.getSchedulingPolicyId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteSchedulingPolicyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteSchedulingPolicyRequest + */ + public DeleteSchedulingPolicyRequest build() { + DeleteSchedulingPolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteSchedulingPolicyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteSchedulingPolicyRequest + */ + public DeleteSchedulingPolicyRequest buildWithoutInvocationCallback() { + DeleteSchedulingPolicyRequest request = new DeleteSchedulingPolicyRequest(); + request.schedulingPolicyId = schedulingPolicyId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteSchedulingPolicyRequest(schedulingPolicyId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulingPolicyId(schedulingPolicyId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulingPolicyId=").append(String.valueOf(this.schedulingPolicyId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSchedulingPolicyRequest)) { + return false; + } + + DeleteSchedulingPolicyRequest other = (DeleteSchedulingPolicyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulingPolicyId, other.schedulingPolicyId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulingPolicyId == null + ? 43 + : this.schedulingPolicyId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteSchedulingWindowRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteSchedulingWindowRequest.java new file mode 100644 index 00000000000..d1cf6365b80 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/DeleteSchedulingWindowRequest.java @@ -0,0 +1,284 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use DeleteSchedulingWindowRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteSchedulingWindowRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPolicyId; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getSchedulingPolicyId() { + return schedulingPolicyId; + } + /** + * The Scheduling Window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingWindowId; + + /** + * The Scheduling Window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getSchedulingWindowId() { + return schedulingWindowId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteSchedulingWindowRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPolicyId = null; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param schedulingPolicyId the value to set + * @return this builder instance + */ + public Builder schedulingPolicyId(String schedulingPolicyId) { + this.schedulingPolicyId = schedulingPolicyId; + return this; + } + + /** + * The Scheduling Window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingWindowId = null; + + /** + * The Scheduling Window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param schedulingWindowId the value to set + * @return this builder instance + */ + public Builder schedulingWindowId(String schedulingWindowId) { + this.schedulingWindowId = schedulingWindowId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteSchedulingWindowRequest o) { + schedulingPolicyId(o.getSchedulingPolicyId()); + schedulingWindowId(o.getSchedulingWindowId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteSchedulingWindowRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteSchedulingWindowRequest + */ + public DeleteSchedulingWindowRequest build() { + DeleteSchedulingWindowRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteSchedulingWindowRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteSchedulingWindowRequest + */ + public DeleteSchedulingWindowRequest buildWithoutInvocationCallback() { + DeleteSchedulingWindowRequest request = new DeleteSchedulingWindowRequest(); + request.schedulingPolicyId = schedulingPolicyId; + request.schedulingWindowId = schedulingWindowId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteSchedulingWindowRequest(schedulingPolicyId, schedulingWindowId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulingPolicyId(schedulingPolicyId) + .schedulingWindowId(schedulingWindowId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulingPolicyId=").append(String.valueOf(this.schedulingPolicyId)); + sb.append(",schedulingWindowId=").append(String.valueOf(this.schedulingWindowId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSchedulingWindowRequest)) { + return false; + } + + DeleteSchedulingWindowRequest other = (DeleteSchedulingWindowRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulingPolicyId, other.schedulingPolicyId) + && java.util.Objects.equals(this.schedulingWindowId, other.schedulingWindowId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulingPolicyId == null + ? 43 + : this.schedulingPolicyId.hashCode()); + result = + (result * PRIME) + + (this.schedulingWindowId == null + ? 43 + : this.schedulingWindowId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetExadbVmClusterRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetExadbVmClusterRequest.java new file mode 100644 index 00000000000..6ef91adf7d0 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetExadbVmClusterRequest.java @@ -0,0 +1,199 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use GetExadbVmClusterRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetExadbVmClusterRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + private String exadbVmClusterId; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + public String getExadbVmClusterId() { + return exadbVmClusterId; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetExadbVmClusterRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + private String exadbVmClusterId = null; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + * @param exadbVmClusterId the value to set + * @return this builder instance + */ + public Builder exadbVmClusterId(String exadbVmClusterId) { + this.exadbVmClusterId = exadbVmClusterId; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetExadbVmClusterRequest o) { + exadbVmClusterId(o.getExadbVmClusterId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetExadbVmClusterRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetExadbVmClusterRequest + */ + public GetExadbVmClusterRequest build() { + GetExadbVmClusterRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetExadbVmClusterRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetExadbVmClusterRequest + */ + public GetExadbVmClusterRequest buildWithoutInvocationCallback() { + GetExadbVmClusterRequest request = new GetExadbVmClusterRequest(); + request.exadbVmClusterId = exadbVmClusterId; + request.opcRequestId = opcRequestId; + return request; + // new GetExadbVmClusterRequest(exadbVmClusterId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().exadbVmClusterId(exadbVmClusterId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",exadbVmClusterId=").append(String.valueOf(this.exadbVmClusterId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetExadbVmClusterRequest)) { + return false; + } + + GetExadbVmClusterRequest other = (GetExadbVmClusterRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.exadbVmClusterId, other.exadbVmClusterId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.exadbVmClusterId == null ? 43 : this.exadbVmClusterId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetExadbVmClusterUpdateHistoryEntryRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetExadbVmClusterUpdateHistoryEntryRequest.java new file mode 100644 index 00000000000..740062c4b6f --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetExadbVmClusterUpdateHistoryEntryRequest.java @@ -0,0 +1,240 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use GetExadbVmClusterUpdateHistoryEntryRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetExadbVmClusterUpdateHistoryEntryRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + private String exadbVmClusterId; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + public String getExadbVmClusterId() { + return exadbVmClusterId; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update history entry. + */ + private String updateHistoryEntryId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update history entry. + */ + public String getUpdateHistoryEntryId() { + return updateHistoryEntryId; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetExadbVmClusterUpdateHistoryEntryRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + private String exadbVmClusterId = null; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + * @param exadbVmClusterId the value to set + * @return this builder instance + */ + public Builder exadbVmClusterId(String exadbVmClusterId) { + this.exadbVmClusterId = exadbVmClusterId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update history entry. + */ + private String updateHistoryEntryId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update history entry. + * @param updateHistoryEntryId the value to set + * @return this builder instance + */ + public Builder updateHistoryEntryId(String updateHistoryEntryId) { + this.updateHistoryEntryId = updateHistoryEntryId; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetExadbVmClusterUpdateHistoryEntryRequest o) { + exadbVmClusterId(o.getExadbVmClusterId()); + updateHistoryEntryId(o.getUpdateHistoryEntryId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetExadbVmClusterUpdateHistoryEntryRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetExadbVmClusterUpdateHistoryEntryRequest + */ + public GetExadbVmClusterUpdateHistoryEntryRequest build() { + GetExadbVmClusterUpdateHistoryEntryRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetExadbVmClusterUpdateHistoryEntryRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetExadbVmClusterUpdateHistoryEntryRequest + */ + public GetExadbVmClusterUpdateHistoryEntryRequest buildWithoutInvocationCallback() { + GetExadbVmClusterUpdateHistoryEntryRequest request = + new GetExadbVmClusterUpdateHistoryEntryRequest(); + request.exadbVmClusterId = exadbVmClusterId; + request.updateHistoryEntryId = updateHistoryEntryId; + request.opcRequestId = opcRequestId; + return request; + // new GetExadbVmClusterUpdateHistoryEntryRequest(exadbVmClusterId, updateHistoryEntryId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .exadbVmClusterId(exadbVmClusterId) + .updateHistoryEntryId(updateHistoryEntryId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",exadbVmClusterId=").append(String.valueOf(this.exadbVmClusterId)); + sb.append(",updateHistoryEntryId=").append(String.valueOf(this.updateHistoryEntryId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetExadbVmClusterUpdateHistoryEntryRequest)) { + return false; + } + + GetExadbVmClusterUpdateHistoryEntryRequest other = + (GetExadbVmClusterUpdateHistoryEntryRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.exadbVmClusterId, other.exadbVmClusterId) + && java.util.Objects.equals(this.updateHistoryEntryId, other.updateHistoryEntryId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.exadbVmClusterId == null ? 43 : this.exadbVmClusterId.hashCode()); + result = + (result * PRIME) + + (this.updateHistoryEntryId == null + ? 43 + : this.updateHistoryEntryId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetExadbVmClusterUpdateRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetExadbVmClusterUpdateRequest.java new file mode 100644 index 00000000000..051467d996a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetExadbVmClusterUpdateRequest.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use GetExadbVmClusterUpdateRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetExadbVmClusterUpdateRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + private String exadbVmClusterId; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + public String getExadbVmClusterId() { + return exadbVmClusterId; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update. + */ + private String updateId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update. + */ + public String getUpdateId() { + return updateId; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetExadbVmClusterUpdateRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + private String exadbVmClusterId = null; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + * @param exadbVmClusterId the value to set + * @return this builder instance + */ + public Builder exadbVmClusterId(String exadbVmClusterId) { + this.exadbVmClusterId = exadbVmClusterId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update. + */ + private String updateId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update. + * @param updateId the value to set + * @return this builder instance + */ + public Builder updateId(String updateId) { + this.updateId = updateId; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetExadbVmClusterUpdateRequest o) { + exadbVmClusterId(o.getExadbVmClusterId()); + updateId(o.getUpdateId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetExadbVmClusterUpdateRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetExadbVmClusterUpdateRequest + */ + public GetExadbVmClusterUpdateRequest build() { + GetExadbVmClusterUpdateRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetExadbVmClusterUpdateRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetExadbVmClusterUpdateRequest + */ + public GetExadbVmClusterUpdateRequest buildWithoutInvocationCallback() { + GetExadbVmClusterUpdateRequest request = new GetExadbVmClusterUpdateRequest(); + request.exadbVmClusterId = exadbVmClusterId; + request.updateId = updateId; + request.opcRequestId = opcRequestId; + return request; + // new GetExadbVmClusterUpdateRequest(exadbVmClusterId, updateId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .exadbVmClusterId(exadbVmClusterId) + .updateId(updateId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",exadbVmClusterId=").append(String.valueOf(this.exadbVmClusterId)); + sb.append(",updateId=").append(String.valueOf(this.updateId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetExadbVmClusterUpdateRequest)) { + return false; + } + + GetExadbVmClusterUpdateRequest other = (GetExadbVmClusterUpdateRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.exadbVmClusterId, other.exadbVmClusterId) + && java.util.Objects.equals(this.updateId, other.updateId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.exadbVmClusterId == null ? 43 : this.exadbVmClusterId.hashCode()); + result = (result * PRIME) + (this.updateId == null ? 43 : this.updateId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetExascaleDbStorageVaultRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetExascaleDbStorageVaultRequest.java new file mode 100644 index 00000000000..1e4ad7c4184 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetExascaleDbStorageVaultRequest.java @@ -0,0 +1,206 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use GetExascaleDbStorageVaultRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetExascaleDbStorageVaultRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Exadata Database Storage Vault [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String exascaleDbStorageVaultId; + + /** + * The Exadata Database Storage Vault [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getExascaleDbStorageVaultId() { + return exascaleDbStorageVaultId; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetExascaleDbStorageVaultRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Exadata Database Storage Vault [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String exascaleDbStorageVaultId = null; + + /** + * The Exadata Database Storage Vault [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param exascaleDbStorageVaultId the value to set + * @return this builder instance + */ + public Builder exascaleDbStorageVaultId(String exascaleDbStorageVaultId) { + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetExascaleDbStorageVaultRequest o) { + exascaleDbStorageVaultId(o.getExascaleDbStorageVaultId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetExascaleDbStorageVaultRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetExascaleDbStorageVaultRequest + */ + public GetExascaleDbStorageVaultRequest build() { + GetExascaleDbStorageVaultRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetExascaleDbStorageVaultRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetExascaleDbStorageVaultRequest + */ + public GetExascaleDbStorageVaultRequest buildWithoutInvocationCallback() { + GetExascaleDbStorageVaultRequest request = new GetExascaleDbStorageVaultRequest(); + request.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + request.opcRequestId = opcRequestId; + return request; + // new GetExascaleDbStorageVaultRequest(exascaleDbStorageVaultId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .exascaleDbStorageVaultId(exascaleDbStorageVaultId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",exascaleDbStorageVaultId=") + .append(String.valueOf(this.exascaleDbStorageVaultId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetExascaleDbStorageVaultRequest)) { + return false; + } + + GetExascaleDbStorageVaultRequest other = (GetExascaleDbStorageVaultRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.exascaleDbStorageVaultId, other.exascaleDbStorageVaultId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.exascaleDbStorageVaultId == null + ? 43 + : this.exascaleDbStorageVaultId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetExecutionActionRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetExecutionActionRequest.java new file mode 100644 index 00000000000..d3361b05496 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetExecutionActionRequest.java @@ -0,0 +1,199 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use GetExecutionActionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetExecutionActionRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The execution action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String executionActionId; + + /** + * The execution action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getExecutionActionId() { + return executionActionId; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetExecutionActionRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The execution action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String executionActionId = null; + + /** + * The execution action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param executionActionId the value to set + * @return this builder instance + */ + public Builder executionActionId(String executionActionId) { + this.executionActionId = executionActionId; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetExecutionActionRequest o) { + executionActionId(o.getExecutionActionId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetExecutionActionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetExecutionActionRequest + */ + public GetExecutionActionRequest build() { + GetExecutionActionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetExecutionActionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetExecutionActionRequest + */ + public GetExecutionActionRequest buildWithoutInvocationCallback() { + GetExecutionActionRequest request = new GetExecutionActionRequest(); + request.executionActionId = executionActionId; + request.opcRequestId = opcRequestId; + return request; + // new GetExecutionActionRequest(executionActionId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().executionActionId(executionActionId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",executionActionId=").append(String.valueOf(this.executionActionId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetExecutionActionRequest)) { + return false; + } + + GetExecutionActionRequest other = (GetExecutionActionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.executionActionId, other.executionActionId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.executionActionId == null ? 43 : this.executionActionId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetExecutionWindowRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetExecutionWindowRequest.java new file mode 100644 index 00000000000..d4405acb6ad --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetExecutionWindowRequest.java @@ -0,0 +1,199 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use GetExecutionWindowRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetExecutionWindowRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The execution window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String executionWindowId; + + /** + * The execution window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getExecutionWindowId() { + return executionWindowId; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetExecutionWindowRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The execution window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String executionWindowId = null; + + /** + * The execution window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param executionWindowId the value to set + * @return this builder instance + */ + public Builder executionWindowId(String executionWindowId) { + this.executionWindowId = executionWindowId; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetExecutionWindowRequest o) { + executionWindowId(o.getExecutionWindowId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetExecutionWindowRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetExecutionWindowRequest + */ + public GetExecutionWindowRequest build() { + GetExecutionWindowRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetExecutionWindowRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetExecutionWindowRequest + */ + public GetExecutionWindowRequest buildWithoutInvocationCallback() { + GetExecutionWindowRequest request = new GetExecutionWindowRequest(); + request.executionWindowId = executionWindowId; + request.opcRequestId = opcRequestId; + return request; + // new GetExecutionWindowRequest(executionWindowId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().executionWindowId(executionWindowId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",executionWindowId=").append(String.valueOf(this.executionWindowId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetExecutionWindowRequest)) { + return false; + } + + GetExecutionWindowRequest other = (GetExecutionWindowRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.executionWindowId, other.executionWindowId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.executionWindowId == null ? 43 : this.executionWindowId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetScheduledActionRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetScheduledActionRequest.java new file mode 100644 index 00000000000..dd5485a485e --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetScheduledActionRequest.java @@ -0,0 +1,199 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use GetScheduledActionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetScheduledActionRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Scheduled Action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String scheduledActionId; + + /** + * The Scheduled Action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getScheduledActionId() { + return scheduledActionId; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetScheduledActionRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Scheduled Action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String scheduledActionId = null; + + /** + * The Scheduled Action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param scheduledActionId the value to set + * @return this builder instance + */ + public Builder scheduledActionId(String scheduledActionId) { + this.scheduledActionId = scheduledActionId; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetScheduledActionRequest o) { + scheduledActionId(o.getScheduledActionId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetScheduledActionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetScheduledActionRequest + */ + public GetScheduledActionRequest build() { + GetScheduledActionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetScheduledActionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetScheduledActionRequest + */ + public GetScheduledActionRequest buildWithoutInvocationCallback() { + GetScheduledActionRequest request = new GetScheduledActionRequest(); + request.scheduledActionId = scheduledActionId; + request.opcRequestId = opcRequestId; + return request; + // new GetScheduledActionRequest(scheduledActionId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().scheduledActionId(scheduledActionId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",scheduledActionId=").append(String.valueOf(this.scheduledActionId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetScheduledActionRequest)) { + return false; + } + + GetScheduledActionRequest other = (GetScheduledActionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.scheduledActionId, other.scheduledActionId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.scheduledActionId == null ? 43 : this.scheduledActionId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetSchedulingPlanRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetSchedulingPlanRequest.java new file mode 100644 index 00000000000..079906af89d --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetSchedulingPlanRequest.java @@ -0,0 +1,199 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use GetSchedulingPlanRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetSchedulingPlanRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Schedule Plan [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPlanId; + + /** + * The Schedule Plan [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getSchedulingPlanId() { + return schedulingPlanId; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetSchedulingPlanRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Schedule Plan [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPlanId = null; + + /** + * The Schedule Plan [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param schedulingPlanId the value to set + * @return this builder instance + */ + public Builder schedulingPlanId(String schedulingPlanId) { + this.schedulingPlanId = schedulingPlanId; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSchedulingPlanRequest o) { + schedulingPlanId(o.getSchedulingPlanId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetSchedulingPlanRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetSchedulingPlanRequest + */ + public GetSchedulingPlanRequest build() { + GetSchedulingPlanRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetSchedulingPlanRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetSchedulingPlanRequest + */ + public GetSchedulingPlanRequest buildWithoutInvocationCallback() { + GetSchedulingPlanRequest request = new GetSchedulingPlanRequest(); + request.schedulingPlanId = schedulingPlanId; + request.opcRequestId = opcRequestId; + return request; + // new GetSchedulingPlanRequest(schedulingPlanId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().schedulingPlanId(schedulingPlanId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulingPlanId=").append(String.valueOf(this.schedulingPlanId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSchedulingPlanRequest)) { + return false; + } + + GetSchedulingPlanRequest other = (GetSchedulingPlanRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulingPlanId, other.schedulingPlanId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulingPlanId == null ? 43 : this.schedulingPlanId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetSchedulingPolicyRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetSchedulingPolicyRequest.java new file mode 100644 index 00000000000..6da93a2950b --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetSchedulingPolicyRequest.java @@ -0,0 +1,201 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use GetSchedulingPolicyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetSchedulingPolicyRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPolicyId; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getSchedulingPolicyId() { + return schedulingPolicyId; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetSchedulingPolicyRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPolicyId = null; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param schedulingPolicyId the value to set + * @return this builder instance + */ + public Builder schedulingPolicyId(String schedulingPolicyId) { + this.schedulingPolicyId = schedulingPolicyId; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSchedulingPolicyRequest o) { + schedulingPolicyId(o.getSchedulingPolicyId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetSchedulingPolicyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetSchedulingPolicyRequest + */ + public GetSchedulingPolicyRequest build() { + GetSchedulingPolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetSchedulingPolicyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetSchedulingPolicyRequest + */ + public GetSchedulingPolicyRequest buildWithoutInvocationCallback() { + GetSchedulingPolicyRequest request = new GetSchedulingPolicyRequest(); + request.schedulingPolicyId = schedulingPolicyId; + request.opcRequestId = opcRequestId; + return request; + // new GetSchedulingPolicyRequest(schedulingPolicyId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().schedulingPolicyId(schedulingPolicyId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulingPolicyId=").append(String.valueOf(this.schedulingPolicyId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSchedulingPolicyRequest)) { + return false; + } + + GetSchedulingPolicyRequest other = (GetSchedulingPolicyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulingPolicyId, other.schedulingPolicyId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulingPolicyId == null + ? 43 + : this.schedulingPolicyId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetSchedulingWindowRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetSchedulingWindowRequest.java new file mode 100644 index 00000000000..18a2dba6627 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/GetSchedulingWindowRequest.java @@ -0,0 +1,239 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use GetSchedulingWindowRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetSchedulingWindowRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPolicyId; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getSchedulingPolicyId() { + return schedulingPolicyId; + } + /** + * The Scheduling Window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingWindowId; + + /** + * The Scheduling Window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getSchedulingWindowId() { + return schedulingWindowId; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetSchedulingWindowRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPolicyId = null; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param schedulingPolicyId the value to set + * @return this builder instance + */ + public Builder schedulingPolicyId(String schedulingPolicyId) { + this.schedulingPolicyId = schedulingPolicyId; + return this; + } + + /** + * The Scheduling Window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingWindowId = null; + + /** + * The Scheduling Window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param schedulingWindowId the value to set + * @return this builder instance + */ + public Builder schedulingWindowId(String schedulingWindowId) { + this.schedulingWindowId = schedulingWindowId; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSchedulingWindowRequest o) { + schedulingPolicyId(o.getSchedulingPolicyId()); + schedulingWindowId(o.getSchedulingWindowId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetSchedulingWindowRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetSchedulingWindowRequest + */ + public GetSchedulingWindowRequest build() { + GetSchedulingWindowRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetSchedulingWindowRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetSchedulingWindowRequest + */ + public GetSchedulingWindowRequest buildWithoutInvocationCallback() { + GetSchedulingWindowRequest request = new GetSchedulingWindowRequest(); + request.schedulingPolicyId = schedulingPolicyId; + request.schedulingWindowId = schedulingWindowId; + request.opcRequestId = opcRequestId; + return request; + // new GetSchedulingWindowRequest(schedulingPolicyId, schedulingWindowId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulingPolicyId(schedulingPolicyId) + .schedulingWindowId(schedulingWindowId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulingPolicyId=").append(String.valueOf(this.schedulingPolicyId)); + sb.append(",schedulingWindowId=").append(String.valueOf(this.schedulingWindowId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSchedulingWindowRequest)) { + return false; + } + + GetSchedulingWindowRequest other = (GetSchedulingWindowRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulingPolicyId, other.schedulingPolicyId) + && java.util.Objects.equals(this.schedulingWindowId, other.schedulingWindowId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulingPolicyId == null + ? 43 + : this.schedulingPolicyId.hashCode()); + result = + (result * PRIME) + + (this.schedulingWindowId == null + ? 43 + : this.schedulingWindowId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDatabasesRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDatabasesRequest.java index 80988a396fe..3a9f400c7de 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDatabasesRequest.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListAutonomousDatabasesRequest.java @@ -184,6 +184,19 @@ public SortOrder getSortOrder() { getLifecycleState() { return lifecycleState; } + /** + * A filter to return only resources that not match the given lifecycle state. + */ + private com.oracle.bmc.database.model.AutonomousDatabaseSummary.LifecycleState + lifecycleStateNotEqualTo; + + /** + * A filter to return only resources that not match the given lifecycle state. + */ + public com.oracle.bmc.database.model.AutonomousDatabaseSummary.LifecycleState + getLifecycleStateNotEqualTo() { + return lifecycleStateNotEqualTo; + } /** * A filter to return only autonomous database resources that match the specified workload type. */ @@ -435,6 +448,24 @@ public Builder lifecycleState( return this; } + /** + * A filter to return only resources that not match the given lifecycle state. + */ + private com.oracle.bmc.database.model.AutonomousDatabaseSummary.LifecycleState + lifecycleStateNotEqualTo = null; + + /** + * A filter to return only resources that not match the given lifecycle state. + * @param lifecycleStateNotEqualTo the value to set + * @return this builder instance + */ + public Builder lifecycleStateNotEqualTo( + com.oracle.bmc.database.model.AutonomousDatabaseSummary.LifecycleState + lifecycleStateNotEqualTo) { + this.lifecycleStateNotEqualTo = lifecycleStateNotEqualTo; + return this; + } + /** * A filter to return only autonomous database resources that match the specified workload type. */ @@ -620,6 +651,7 @@ public Builder copy(ListAutonomousDatabasesRequest o) { sortOrder(o.getSortOrder()); infrastructureType(o.getInfrastructureType()); lifecycleState(o.getLifecycleState()); + lifecycleStateNotEqualTo(o.getLifecycleStateNotEqualTo()); dbWorkload(o.getDbWorkload()); dbVersion(o.getDbVersion()); isFreeTier(o.getIsFreeTier()); @@ -669,6 +701,7 @@ public ListAutonomousDatabasesRequest buildWithoutInvocationCallback() { request.sortOrder = sortOrder; request.infrastructureType = infrastructureType; request.lifecycleState = lifecycleState; + request.lifecycleStateNotEqualTo = lifecycleStateNotEqualTo; request.dbWorkload = dbWorkload; request.dbVersion = dbVersion; request.isFreeTier = isFreeTier; @@ -679,7 +712,7 @@ public ListAutonomousDatabasesRequest buildWithoutInvocationCallback() { request.isResourcePoolLeader = isResourcePoolLeader; request.resourcePoolLeaderId = resourcePoolLeaderId; return request; - // new ListAutonomousDatabasesRequest(compartmentId, autonomousContainerDatabaseId, limit, page, sortBy, sortOrder, infrastructureType, lifecycleState, dbWorkload, dbVersion, isFreeTier, displayName, opcRequestId, isRefreshableClone, isDataGuardEnabled, isResourcePoolLeader, resourcePoolLeaderId); + // new ListAutonomousDatabasesRequest(compartmentId, autonomousContainerDatabaseId, limit, page, sortBy, sortOrder, infrastructureType, lifecycleState, lifecycleStateNotEqualTo, dbWorkload, dbVersion, isFreeTier, displayName, opcRequestId, isRefreshableClone, isDataGuardEnabled, isResourcePoolLeader, resourcePoolLeaderId); } } @@ -697,6 +730,7 @@ public Builder toBuilder() { .sortOrder(sortOrder) .infrastructureType(infrastructureType) .lifecycleState(lifecycleState) + .lifecycleStateNotEqualTo(lifecycleStateNotEqualTo) .dbWorkload(dbWorkload) .dbVersion(dbVersion) .isFreeTier(isFreeTier) @@ -730,6 +764,8 @@ public String toString() { sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); sb.append(",infrastructureType=").append(String.valueOf(this.infrastructureType)); sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",lifecycleStateNotEqualTo=") + .append(String.valueOf(this.lifecycleStateNotEqualTo)); sb.append(",dbWorkload=").append(String.valueOf(this.dbWorkload)); sb.append(",dbVersion=").append(String.valueOf(this.dbVersion)); sb.append(",isFreeTier=").append(String.valueOf(this.isFreeTier)); @@ -763,6 +799,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.sortOrder, other.sortOrder) && java.util.Objects.equals(this.infrastructureType, other.infrastructureType) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals( + this.lifecycleStateNotEqualTo, other.lifecycleStateNotEqualTo) && java.util.Objects.equals(this.dbWorkload, other.dbWorkload) && java.util.Objects.equals(this.dbVersion, other.dbVersion) && java.util.Objects.equals(this.isFreeTier, other.isFreeTier) @@ -798,6 +836,11 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleStateNotEqualTo == null + ? 43 + : this.lifecycleStateNotEqualTo.hashCode()); result = (result * PRIME) + (this.dbWorkload == null ? 43 : this.dbWorkload.hashCode()); result = (result * PRIME) + (this.dbVersion == null ? 43 : this.dbVersion.hashCode()); result = (result * PRIME) + (this.isFreeTier == null ? 43 : this.isFreeTier.hashCode()); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListBackupsRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListBackupsRequest.java index e3fca32a52b..119a61cb71a 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListBackupsRequest.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListBackupsRequest.java @@ -55,6 +55,57 @@ public Integer getLimit() { public String getPage() { return page; } + /** + * If provided, filters the results to the set of database versions which are supported for the given shape family. + */ + private ShapeFamily shapeFamily; + + /** + * If provided, filters the results to the set of database versions which are supported for the given shape family. + **/ + public enum ShapeFamily { + Singlenode("SINGLENODE"), + Yoda("YODA"), + Virtualmachine("VIRTUALMACHINE"), + Exadata("EXADATA"), + Exacc("EXACC"), + ExadbXs("EXADB_XS"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ShapeFamily v : ShapeFamily.values()) { + map.put(v.getValue(), v); + } + } + + ShapeFamily(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ShapeFamily create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ShapeFamily: " + key); + } + }; + + /** + * If provided, filters the results to the set of database versions which are supported for the given shape family. + */ + public ShapeFamily getShapeFamily() { + return shapeFamily; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -123,6 +174,21 @@ public Builder page(String page) { return this; } + /** + * If provided, filters the results to the set of database versions which are supported for the given shape family. + */ + private ShapeFamily shapeFamily = null; + + /** + * If provided, filters the results to the set of database versions which are supported for the given shape family. + * @param shapeFamily the value to set + * @return this builder instance + */ + public Builder shapeFamily(ShapeFamily shapeFamily) { + this.shapeFamily = shapeFamily; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -155,6 +221,7 @@ public Builder copy(ListBackupsRequest o) { compartmentId(o.getCompartmentId()); limit(o.getLimit()); page(o.getPage()); + shapeFamily(o.getShapeFamily()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -191,8 +258,9 @@ public ListBackupsRequest buildWithoutInvocationCallback() { request.compartmentId = compartmentId; request.limit = limit; request.page = page; + request.shapeFamily = shapeFamily; return request; - // new ListBackupsRequest(databaseId, compartmentId, limit, page); + // new ListBackupsRequest(databaseId, compartmentId, limit, page, shapeFamily); } } @@ -205,7 +273,8 @@ public Builder toBuilder() { .databaseId(databaseId) .compartmentId(compartmentId) .limit(limit) - .page(page); + .page(page) + .shapeFamily(shapeFamily); } /** @@ -225,6 +294,7 @@ public String toString() { sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(",limit=").append(String.valueOf(this.limit)); sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",shapeFamily=").append(String.valueOf(this.shapeFamily)); sb.append(")"); return sb.toString(); } @@ -243,7 +313,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.databaseId, other.databaseId) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.limit, other.limit) - && java.util.Objects.equals(this.page, other.page); + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.shapeFamily, other.shapeFamily); } @Override @@ -256,6 +327,7 @@ public int hashCode() { + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.shapeFamily == null ? 43 : this.shapeFamily.hashCode()); return result; } } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExadbVmClusterUpdateHistoryEntriesRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExadbVmClusterUpdateHistoryEntriesRequest.java new file mode 100644 index 00000000000..f40cdb3246a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExadbVmClusterUpdateHistoryEntriesRequest.java @@ -0,0 +1,338 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ListExadbVmClusterUpdateHistoryEntriesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListExadbVmClusterUpdateHistoryEntriesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + private String exadbVmClusterId; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + public String getExadbVmClusterId() { + return exadbVmClusterId; + } + /** + * A filter to return only resources that match the given update type exactly. + */ + private UpdateType updateType; + + /** + * A filter to return only resources that match the given update type exactly. + **/ + public enum UpdateType { + GiUpgrade("GI_UPGRADE"), + GiPatch("GI_PATCH"), + OsUpdate("OS_UPDATE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (UpdateType v : UpdateType.values()) { + map.put(v.getValue(), v); + } + } + + UpdateType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static UpdateType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid UpdateType: " + key); + } + }; + + /** + * A filter to return only resources that match the given update type exactly. + */ + public UpdateType getUpdateType() { + return updateType; + } + /** + * The maximum number of items to return per page. + */ + private Integer limit; + + /** + * The maximum number of items to return per page. + */ + public Integer getLimit() { + return limit; + } + /** + * The pagination token to continue listing from. + */ + private String page; + + /** + * The pagination token to continue listing from. + */ + public String getPage() { + return page; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListExadbVmClusterUpdateHistoryEntriesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + private String exadbVmClusterId = null; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + * @param exadbVmClusterId the value to set + * @return this builder instance + */ + public Builder exadbVmClusterId(String exadbVmClusterId) { + this.exadbVmClusterId = exadbVmClusterId; + return this; + } + + /** + * A filter to return only resources that match the given update type exactly. + */ + private UpdateType updateType = null; + + /** + * A filter to return only resources that match the given update type exactly. + * @param updateType the value to set + * @return this builder instance + */ + public Builder updateType(UpdateType updateType) { + this.updateType = updateType; + return this; + } + + /** + * The maximum number of items to return per page. + */ + private Integer limit = null; + + /** + * The maximum number of items to return per page. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The pagination token to continue listing from. + */ + private String page = null; + + /** + * The pagination token to continue listing from. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListExadbVmClusterUpdateHistoryEntriesRequest o) { + exadbVmClusterId(o.getExadbVmClusterId()); + updateType(o.getUpdateType()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListExadbVmClusterUpdateHistoryEntriesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListExadbVmClusterUpdateHistoryEntriesRequest + */ + public ListExadbVmClusterUpdateHistoryEntriesRequest build() { + ListExadbVmClusterUpdateHistoryEntriesRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListExadbVmClusterUpdateHistoryEntriesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListExadbVmClusterUpdateHistoryEntriesRequest + */ + public ListExadbVmClusterUpdateHistoryEntriesRequest buildWithoutInvocationCallback() { + ListExadbVmClusterUpdateHistoryEntriesRequest request = + new ListExadbVmClusterUpdateHistoryEntriesRequest(); + request.exadbVmClusterId = exadbVmClusterId; + request.updateType = updateType; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + return request; + // new ListExadbVmClusterUpdateHistoryEntriesRequest(exadbVmClusterId, updateType, limit, page, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .exadbVmClusterId(exadbVmClusterId) + .updateType(updateType) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",exadbVmClusterId=").append(String.valueOf(this.exadbVmClusterId)); + sb.append(",updateType=").append(String.valueOf(this.updateType)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListExadbVmClusterUpdateHistoryEntriesRequest)) { + return false; + } + + ListExadbVmClusterUpdateHistoryEntriesRequest other = + (ListExadbVmClusterUpdateHistoryEntriesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.exadbVmClusterId, other.exadbVmClusterId) + && java.util.Objects.equals(this.updateType, other.updateType) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.exadbVmClusterId == null ? 43 : this.exadbVmClusterId.hashCode()); + result = (result * PRIME) + (this.updateType == null ? 43 : this.updateType.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExadbVmClusterUpdatesRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExadbVmClusterUpdatesRequest.java new file mode 100644 index 00000000000..d88bd0e3e0e --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExadbVmClusterUpdatesRequest.java @@ -0,0 +1,367 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ListExadbVmClusterUpdatesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListExadbVmClusterUpdatesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + private String exadbVmClusterId; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + public String getExadbVmClusterId() { + return exadbVmClusterId; + } + /** + * A filter to return only resources that match the given update type exactly. + */ + private UpdateType updateType; + + /** + * A filter to return only resources that match the given update type exactly. + **/ + public enum UpdateType { + GiUpgrade("GI_UPGRADE"), + GiPatch("GI_PATCH"), + OsUpdate("OS_UPDATE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (UpdateType v : UpdateType.values()) { + map.put(v.getValue(), v); + } + } + + UpdateType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static UpdateType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid UpdateType: " + key); + } + }; + + /** + * A filter to return only resources that match the given update type exactly. + */ + public UpdateType getUpdateType() { + return updateType; + } + /** + * A filter to return only resources that match the given update version exactly. + */ + private String version; + + /** + * A filter to return only resources that match the given update version exactly. + */ + public String getVersion() { + return version; + } + /** + * The maximum number of items to return per page. + */ + private Integer limit; + + /** + * The maximum number of items to return per page. + */ + public Integer getLimit() { + return limit; + } + /** + * The pagination token to continue listing from. + */ + private String page; + + /** + * The pagination token to continue listing from. + */ + public String getPage() { + return page; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListExadbVmClusterUpdatesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + private String exadbVmClusterId = null; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + * @param exadbVmClusterId the value to set + * @return this builder instance + */ + public Builder exadbVmClusterId(String exadbVmClusterId) { + this.exadbVmClusterId = exadbVmClusterId; + return this; + } + + /** + * A filter to return only resources that match the given update type exactly. + */ + private UpdateType updateType = null; + + /** + * A filter to return only resources that match the given update type exactly. + * @param updateType the value to set + * @return this builder instance + */ + public Builder updateType(UpdateType updateType) { + this.updateType = updateType; + return this; + } + + /** + * A filter to return only resources that match the given update version exactly. + */ + private String version = null; + + /** + * A filter to return only resources that match the given update version exactly. + * @param version the value to set + * @return this builder instance + */ + public Builder version(String version) { + this.version = version; + return this; + } + + /** + * The maximum number of items to return per page. + */ + private Integer limit = null; + + /** + * The maximum number of items to return per page. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The pagination token to continue listing from. + */ + private String page = null; + + /** + * The pagination token to continue listing from. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListExadbVmClusterUpdatesRequest o) { + exadbVmClusterId(o.getExadbVmClusterId()); + updateType(o.getUpdateType()); + version(o.getVersion()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListExadbVmClusterUpdatesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListExadbVmClusterUpdatesRequest + */ + public ListExadbVmClusterUpdatesRequest build() { + ListExadbVmClusterUpdatesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListExadbVmClusterUpdatesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListExadbVmClusterUpdatesRequest + */ + public ListExadbVmClusterUpdatesRequest buildWithoutInvocationCallback() { + ListExadbVmClusterUpdatesRequest request = new ListExadbVmClusterUpdatesRequest(); + request.exadbVmClusterId = exadbVmClusterId; + request.updateType = updateType; + request.version = version; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + return request; + // new ListExadbVmClusterUpdatesRequest(exadbVmClusterId, updateType, version, limit, page, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .exadbVmClusterId(exadbVmClusterId) + .updateType(updateType) + .version(version) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",exadbVmClusterId=").append(String.valueOf(this.exadbVmClusterId)); + sb.append(",updateType=").append(String.valueOf(this.updateType)); + sb.append(",version=").append(String.valueOf(this.version)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListExadbVmClusterUpdatesRequest)) { + return false; + } + + ListExadbVmClusterUpdatesRequest other = (ListExadbVmClusterUpdatesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.exadbVmClusterId, other.exadbVmClusterId) + && java.util.Objects.equals(this.updateType, other.updateType) + && java.util.Objects.equals(this.version, other.version) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.exadbVmClusterId == null ? 43 : this.exadbVmClusterId.hashCode()); + result = (result * PRIME) + (this.updateType == null ? 43 : this.updateType.hashCode()); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExadbVmClustersRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExadbVmClustersRequest.java new file mode 100644 index 00000000000..eb36e45a1b9 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExadbVmClustersRequest.java @@ -0,0 +1,520 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ListExadbVmClustersRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListExadbVmClustersRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String compartmentId; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The maximum number of items to return per page. + */ + private Integer limit; + + /** + * The maximum number of items to return per page. + */ + public Integer getLimit() { + return limit; + } + /** + * The pagination token to continue listing from. + */ + private String page; + + /** + * The pagination token to continue listing from. + */ + public String getPage() { + return page; + } + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortOrder: " + key); + } + }; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public SortOrder getSortOrder() { + return sortOrder; + } + /** + * A filter to return only Exadata VM clusters on Exascale Infrastructure that match the given lifecycle state exactly. + * + */ + private com.oracle.bmc.database.model.ExadbVmClusterSummary.LifecycleState lifecycleState; + + /** + * A filter to return only Exadata VM clusters on Exascale Infrastructure that match the given lifecycle state exactly. + * + */ + public com.oracle.bmc.database.model.ExadbVmClusterSummary.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only Exadata VM clusters on Exascale Infrastructure that match the given Exascale Database Storage Vault ID. + * + */ + private String exascaleDbStorageVaultId; + + /** + * A filter to return only Exadata VM clusters on Exascale Infrastructure that match the given Exascale Database Storage Vault ID. + * + */ + public String getExascaleDbStorageVaultId() { + return exascaleDbStorageVaultId; + } + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + public String getDisplayName() { + return displayName; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListExadbVmClustersRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String compartmentId = null; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The maximum number of items to return per page. + */ + private Integer limit = null; + + /** + * The maximum number of items to return per page. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The pagination token to continue listing from. + */ + private String page = null; + + /** + * The pagination token to continue listing from. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * A filter to return only Exadata VM clusters on Exascale Infrastructure that match the given lifecycle state exactly. + * + */ + private com.oracle.bmc.database.model.ExadbVmClusterSummary.LifecycleState lifecycleState = + null; + + /** + * A filter to return only Exadata VM clusters on Exascale Infrastructure that match the given lifecycle state exactly. + * + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.database.model.ExadbVmClusterSummary.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only Exadata VM clusters on Exascale Infrastructure that match the given Exascale Database Storage Vault ID. + * + */ + private String exascaleDbStorageVaultId = null; + + /** + * A filter to return only Exadata VM clusters on Exascale Infrastructure that match the given Exascale Database Storage Vault ID. + * + * @param exascaleDbStorageVaultId the value to set + * @return this builder instance + */ + public Builder exascaleDbStorageVaultId(String exascaleDbStorageVaultId) { + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListExadbVmClustersRequest o) { + compartmentId(o.getCompartmentId()); + limit(o.getLimit()); + page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); + exascaleDbStorageVaultId(o.getExascaleDbStorageVaultId()); + displayName(o.getDisplayName()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListExadbVmClustersRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListExadbVmClustersRequest + */ + public ListExadbVmClustersRequest build() { + ListExadbVmClustersRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListExadbVmClustersRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListExadbVmClustersRequest + */ + public ListExadbVmClustersRequest buildWithoutInvocationCallback() { + ListExadbVmClustersRequest request = new ListExadbVmClustersRequest(); + request.compartmentId = compartmentId; + request.limit = limit; + request.page = page; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.lifecycleState = lifecycleState; + request.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + request.displayName = displayName; + request.opcRequestId = opcRequestId; + return request; + // new ListExadbVmClustersRequest(compartmentId, limit, page, sortBy, sortOrder, lifecycleState, exascaleDbStorageVaultId, displayName, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .limit(limit) + .page(page) + .sortBy(sortBy) + .sortOrder(sortOrder) + .lifecycleState(lifecycleState) + .exascaleDbStorageVaultId(exascaleDbStorageVaultId) + .displayName(displayName) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",exascaleDbStorageVaultId=") + .append(String.valueOf(this.exascaleDbStorageVaultId)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListExadbVmClustersRequest)) { + return false; + } + + ListExadbVmClustersRequest other = (ListExadbVmClustersRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals( + this.exascaleDbStorageVaultId, other.exascaleDbStorageVaultId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.exascaleDbStorageVaultId == null + ? 43 + : this.exascaleDbStorageVaultId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExascaleDbStorageVaultsRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExascaleDbStorageVaultsRequest.java new file mode 100644 index 00000000000..785562211e3 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExascaleDbStorageVaultsRequest.java @@ -0,0 +1,513 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ListExascaleDbStorageVaultsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListExascaleDbStorageVaultsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String compartmentId; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The maximum number of items to return per page. + */ + private Integer limit; + + /** + * The maximum number of items to return per page. + */ + public Integer getLimit() { + return limit; + } + /** + * The pagination token to continue listing from. + */ + private String page; + + /** + * The pagination token to continue listing from. + */ + public String getPage() { + return page; + } + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortOrder: " + key); + } + }; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public SortOrder getSortOrder() { + return sortOrder; + } + /** + * A filter to return only Exadata Database Storage Vaults that match the given lifecycle state exactly. + */ + private com.oracle.bmc.database.model.ExascaleDbStorageVault.LifecycleState lifecycleState; + + /** + * A filter to return only Exadata Database Storage Vaults that match the given lifecycle state exactly. + */ + public com.oracle.bmc.database.model.ExascaleDbStorageVault.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + public String getDisplayName() { + return displayName; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A filter to return only list of Vaults that are linked to the exadata infrastructure Id. + */ + private String exadataInfrastructureId; + + /** + * A filter to return only list of Vaults that are linked to the exadata infrastructure Id. + */ + public String getExadataInfrastructureId() { + return exadataInfrastructureId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListExascaleDbStorageVaultsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String compartmentId = null; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The maximum number of items to return per page. + */ + private Integer limit = null; + + /** + * The maximum number of items to return per page. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The pagination token to continue listing from. + */ + private String page = null; + + /** + * The pagination token to continue listing from. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * A filter to return only Exadata Database Storage Vaults that match the given lifecycle state exactly. + */ + private com.oracle.bmc.database.model.ExascaleDbStorageVault.LifecycleState lifecycleState = + null; + + /** + * A filter to return only Exadata Database Storage Vaults that match the given lifecycle state exactly. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.database.model.ExascaleDbStorageVault.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A filter to return only list of Vaults that are linked to the exadata infrastructure Id. + */ + private String exadataInfrastructureId = null; + + /** + * A filter to return only list of Vaults that are linked to the exadata infrastructure Id. + * @param exadataInfrastructureId the value to set + * @return this builder instance + */ + public Builder exadataInfrastructureId(String exadataInfrastructureId) { + this.exadataInfrastructureId = exadataInfrastructureId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListExascaleDbStorageVaultsRequest o) { + compartmentId(o.getCompartmentId()); + limit(o.getLimit()); + page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + opcRequestId(o.getOpcRequestId()); + exadataInfrastructureId(o.getExadataInfrastructureId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListExascaleDbStorageVaultsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListExascaleDbStorageVaultsRequest + */ + public ListExascaleDbStorageVaultsRequest build() { + ListExascaleDbStorageVaultsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListExascaleDbStorageVaultsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListExascaleDbStorageVaultsRequest + */ + public ListExascaleDbStorageVaultsRequest buildWithoutInvocationCallback() { + ListExascaleDbStorageVaultsRequest request = new ListExascaleDbStorageVaultsRequest(); + request.compartmentId = compartmentId; + request.limit = limit; + request.page = page; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.opcRequestId = opcRequestId; + request.exadataInfrastructureId = exadataInfrastructureId; + return request; + // new ListExascaleDbStorageVaultsRequest(compartmentId, limit, page, sortBy, sortOrder, lifecycleState, displayName, opcRequestId, exadataInfrastructureId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .limit(limit) + .page(page) + .sortBy(sortBy) + .sortOrder(sortOrder) + .lifecycleState(lifecycleState) + .displayName(displayName) + .opcRequestId(opcRequestId) + .exadataInfrastructureId(exadataInfrastructureId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",exadataInfrastructureId=").append(String.valueOf(this.exadataInfrastructureId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListExascaleDbStorageVaultsRequest)) { + return false; + } + + ListExascaleDbStorageVaultsRequest other = (ListExascaleDbStorageVaultsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.exadataInfrastructureId, other.exadataInfrastructureId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.exadataInfrastructureId == null + ? 43 + : this.exadataInfrastructureId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExecutionActionsRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExecutionActionsRequest.java new file mode 100644 index 00000000000..59d6b3e08a8 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExecutionActionsRequest.java @@ -0,0 +1,510 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ListExecutionActionsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListExecutionActionsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String compartmentId; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The maximum number of items to return per page. + */ + private Integer limit; + + /** + * The maximum number of items to return per page. + */ + public Integer getLimit() { + return limit; + } + /** + * The pagination token to continue listing from. + */ + private String page; + + /** + * The pagination token to continue listing from. + */ + public String getPage() { + return page; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortOrder: " + key); + } + }; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public SortOrder getSortOrder() { + return sortOrder; + } + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + private com.oracle.bmc.database.model.ExecutionActionSummary.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + public com.oracle.bmc.database.model.ExecutionActionSummary.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the given execution wondow id. + */ + private String executionWindowId; + + /** + * A filter to return only resources that match the given execution wondow id. + */ + public String getExecutionWindowId() { + return executionWindowId; + } + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + public String getDisplayName() { + return displayName; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListExecutionActionsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String compartmentId = null; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The maximum number of items to return per page. + */ + private Integer limit = null; + + /** + * The maximum number of items to return per page. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The pagination token to continue listing from. + */ + private String page = null; + + /** + * The pagination token to continue listing from. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + private com.oracle.bmc.database.model.ExecutionActionSummary.LifecycleState lifecycleState = + null; + + /** + * A filter to return only resources that match the given lifecycle state exactly. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.database.model.ExecutionActionSummary.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the given execution wondow id. + */ + private String executionWindowId = null; + + /** + * A filter to return only resources that match the given execution wondow id. + * @param executionWindowId the value to set + * @return this builder instance + */ + public Builder executionWindowId(String executionWindowId) { + this.executionWindowId = executionWindowId; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListExecutionActionsRequest o) { + compartmentId(o.getCompartmentId()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); + executionWindowId(o.getExecutionWindowId()); + displayName(o.getDisplayName()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListExecutionActionsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListExecutionActionsRequest + */ + public ListExecutionActionsRequest build() { + ListExecutionActionsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListExecutionActionsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListExecutionActionsRequest + */ + public ListExecutionActionsRequest buildWithoutInvocationCallback() { + ListExecutionActionsRequest request = new ListExecutionActionsRequest(); + request.compartmentId = compartmentId; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.lifecycleState = lifecycleState; + request.executionWindowId = executionWindowId; + request.displayName = displayName; + return request; + // new ListExecutionActionsRequest(compartmentId, limit, page, opcRequestId, sortBy, sortOrder, lifecycleState, executionWindowId, displayName); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId) + .sortBy(sortBy) + .sortOrder(sortOrder) + .lifecycleState(lifecycleState) + .executionWindowId(executionWindowId) + .displayName(displayName); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",executionWindowId=").append(String.valueOf(this.executionWindowId)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListExecutionActionsRequest)) { + return false; + } + + ListExecutionActionsRequest other = (ListExecutionActionsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.executionWindowId, other.executionWindowId) + && java.util.Objects.equals(this.displayName, other.displayName); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.executionWindowId == null ? 43 : this.executionWindowId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExecutionWindowsRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExecutionWindowsRequest.java new file mode 100644 index 00000000000..216fcdbbbef --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListExecutionWindowsRequest.java @@ -0,0 +1,512 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ListExecutionWindowsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListExecutionWindowsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String compartmentId; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The maximum number of items to return per page. + */ + private Integer limit; + + /** + * The maximum number of items to return per page. + */ + public Integer getLimit() { + return limit; + } + /** + * The pagination token to continue listing from. + */ + private String page; + + /** + * The pagination token to continue listing from. + */ + public String getPage() { + return page; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * A filter to return only resources that match the given resource id exactly. + */ + private String executionResourceId; + + /** + * A filter to return only resources that match the given resource id exactly. + */ + public String getExecutionResourceId() { + return executionResourceId; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortOrder: " + key); + } + }; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public SortOrder getSortOrder() { + return sortOrder; + } + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + private com.oracle.bmc.database.model.ExecutionWindowSummary.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + public com.oracle.bmc.database.model.ExecutionWindowSummary.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + public String getDisplayName() { + return displayName; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListExecutionWindowsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String compartmentId = null; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The maximum number of items to return per page. + */ + private Integer limit = null; + + /** + * The maximum number of items to return per page. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The pagination token to continue listing from. + */ + private String page = null; + + /** + * The pagination token to continue listing from. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * A filter to return only resources that match the given resource id exactly. + */ + private String executionResourceId = null; + + /** + * A filter to return only resources that match the given resource id exactly. + * @param executionResourceId the value to set + * @return this builder instance + */ + public Builder executionResourceId(String executionResourceId) { + this.executionResourceId = executionResourceId; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + private com.oracle.bmc.database.model.ExecutionWindowSummary.LifecycleState lifecycleState = + null; + + /** + * A filter to return only resources that match the given lifecycle state exactly. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.database.model.ExecutionWindowSummary.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListExecutionWindowsRequest o) { + compartmentId(o.getCompartmentId()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + sortBy(o.getSortBy()); + executionResourceId(o.getExecutionResourceId()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListExecutionWindowsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListExecutionWindowsRequest + */ + public ListExecutionWindowsRequest build() { + ListExecutionWindowsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListExecutionWindowsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListExecutionWindowsRequest + */ + public ListExecutionWindowsRequest buildWithoutInvocationCallback() { + ListExecutionWindowsRequest request = new ListExecutionWindowsRequest(); + request.compartmentId = compartmentId; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + request.sortBy = sortBy; + request.executionResourceId = executionResourceId; + request.sortOrder = sortOrder; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + return request; + // new ListExecutionWindowsRequest(compartmentId, limit, page, opcRequestId, sortBy, executionResourceId, sortOrder, lifecycleState, displayName); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId) + .sortBy(sortBy) + .executionResourceId(executionResourceId) + .sortOrder(sortOrder) + .lifecycleState(lifecycleState) + .displayName(displayName); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",executionResourceId=").append(String.valueOf(this.executionResourceId)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListExecutionWindowsRequest)) { + return false; + } + + ListExecutionWindowsRequest other = (ListExecutionWindowsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.executionResourceId, other.executionResourceId) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = + (result * PRIME) + + (this.executionResourceId == null + ? 43 + : this.executionResourceId.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListGiVersionMinorVersionsRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListGiVersionMinorVersionsRequest.java new file mode 100644 index 00000000000..e8f16f7fdbb --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListGiVersionMinorVersionsRequest.java @@ -0,0 +1,611 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ListGiVersionMinorVersionsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListGiVersionMinorVersionsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Oracle Grid Infrastructure major version. + */ + private String version; + + /** + * The Oracle Grid Infrastructure major version. + */ + public String getVersion() { + return version; + } + /** + * The target availability domain. Only passed if the limit is AD-specific. + */ + private String availabilityDomain; + + /** + * The target availability domain. Only passed if the limit is AD-specific. + */ + public String getAvailabilityDomain() { + return availabilityDomain; + } + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String compartmentId; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * If provided, filters the results to the set of database versions which are supported for the given shape family. + */ + private ShapeFamily shapeFamily; + + /** + * If provided, filters the results to the set of database versions which are supported for the given shape family. + **/ + public enum ShapeFamily { + Singlenode("SINGLENODE"), + Yoda("YODA"), + Virtualmachine("VIRTUALMACHINE"), + Exadata("EXADATA"), + Exacc("EXACC"), + ExadbXs("EXADB_XS"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ShapeFamily v : ShapeFamily.values()) { + map.put(v.getValue(), v); + } + } + + ShapeFamily(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ShapeFamily create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ShapeFamily: " + key); + } + }; + + /** + * If provided, filters the results to the set of database versions which are supported for the given shape family. + */ + public ShapeFamily getShapeFamily() { + return shapeFamily; + } + /** + * If true, returns the Grid Infrastructure versions that can be used for provisioning a cluster + */ + private Boolean isGiVersionForProvisioning; + + /** + * If true, returns the Grid Infrastructure versions that can be used for provisioning a cluster + */ + public Boolean getIsGiVersionForProvisioning() { + return isGiVersionForProvisioning; + } + /** + * If provided, filters the results for the given shape. + */ + private String shape; + + /** + * If provided, filters the results for the given shape. + */ + public String getShape() { + return shape; + } + /** + * Sort by VERSION. Default order for VERSION is descending. + */ + private SortBy sortBy; + + /** + * Sort by VERSION. Default order for VERSION is descending. + **/ + public enum SortBy { + Version("VERSION"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * Sort by VERSION. Default order for VERSION is descending. + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortOrder: " + key); + } + }; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public SortOrder getSortOrder() { + return sortOrder; + } + /** + * The maximum number of items to return per page. + */ + private Integer limit; + + /** + * The maximum number of items to return per page. + */ + public Integer getLimit() { + return limit; + } + /** + * The pagination token to continue listing from. + */ + private String page; + + /** + * The pagination token to continue listing from. + */ + public String getPage() { + return page; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListGiVersionMinorVersionsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Oracle Grid Infrastructure major version. + */ + private String version = null; + + /** + * The Oracle Grid Infrastructure major version. + * @param version the value to set + * @return this builder instance + */ + public Builder version(String version) { + this.version = version; + return this; + } + + /** + * The target availability domain. Only passed if the limit is AD-specific. + */ + private String availabilityDomain = null; + + /** + * The target availability domain. Only passed if the limit is AD-specific. + * @param availabilityDomain the value to set + * @return this builder instance + */ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + return this; + } + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String compartmentId = null; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * If provided, filters the results to the set of database versions which are supported for the given shape family. + */ + private ShapeFamily shapeFamily = null; + + /** + * If provided, filters the results to the set of database versions which are supported for the given shape family. + * @param shapeFamily the value to set + * @return this builder instance + */ + public Builder shapeFamily(ShapeFamily shapeFamily) { + this.shapeFamily = shapeFamily; + return this; + } + + /** + * If true, returns the Grid Infrastructure versions that can be used for provisioning a cluster + */ + private Boolean isGiVersionForProvisioning = null; + + /** + * If true, returns the Grid Infrastructure versions that can be used for provisioning a cluster + * @param isGiVersionForProvisioning the value to set + * @return this builder instance + */ + public Builder isGiVersionForProvisioning(Boolean isGiVersionForProvisioning) { + this.isGiVersionForProvisioning = isGiVersionForProvisioning; + return this; + } + + /** + * If provided, filters the results for the given shape. + */ + private String shape = null; + + /** + * If provided, filters the results for the given shape. + * @param shape the value to set + * @return this builder instance + */ + public Builder shape(String shape) { + this.shape = shape; + return this; + } + + /** + * Sort by VERSION. Default order for VERSION is descending. + */ + private SortBy sortBy = null; + + /** + * Sort by VERSION. Default order for VERSION is descending. + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The maximum number of items to return per page. + */ + private Integer limit = null; + + /** + * The maximum number of items to return per page. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The pagination token to continue listing from. + */ + private String page = null; + + /** + * The pagination token to continue listing from. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListGiVersionMinorVersionsRequest o) { + version(o.getVersion()); + availabilityDomain(o.getAvailabilityDomain()); + compartmentId(o.getCompartmentId()); + opcRequestId(o.getOpcRequestId()); + shapeFamily(o.getShapeFamily()); + isGiVersionForProvisioning(o.getIsGiVersionForProvisioning()); + shape(o.getShape()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + limit(o.getLimit()); + page(o.getPage()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListGiVersionMinorVersionsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListGiVersionMinorVersionsRequest + */ + public ListGiVersionMinorVersionsRequest build() { + ListGiVersionMinorVersionsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListGiVersionMinorVersionsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListGiVersionMinorVersionsRequest + */ + public ListGiVersionMinorVersionsRequest buildWithoutInvocationCallback() { + ListGiVersionMinorVersionsRequest request = new ListGiVersionMinorVersionsRequest(); + request.version = version; + request.availabilityDomain = availabilityDomain; + request.compartmentId = compartmentId; + request.opcRequestId = opcRequestId; + request.shapeFamily = shapeFamily; + request.isGiVersionForProvisioning = isGiVersionForProvisioning; + request.shape = shape; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.limit = limit; + request.page = page; + return request; + // new ListGiVersionMinorVersionsRequest(version, availabilityDomain, compartmentId, opcRequestId, shapeFamily, isGiVersionForProvisioning, shape, sortBy, sortOrder, limit, page); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .version(version) + .availabilityDomain(availabilityDomain) + .compartmentId(compartmentId) + .opcRequestId(opcRequestId) + .shapeFamily(shapeFamily) + .isGiVersionForProvisioning(isGiVersionForProvisioning) + .shape(shape) + .sortBy(sortBy) + .sortOrder(sortOrder) + .limit(limit) + .page(page); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",version=").append(String.valueOf(this.version)); + sb.append(",availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",shapeFamily=").append(String.valueOf(this.shapeFamily)); + sb.append(",isGiVersionForProvisioning=") + .append(String.valueOf(this.isGiVersionForProvisioning)); + sb.append(",shape=").append(String.valueOf(this.shape)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListGiVersionMinorVersionsRequest)) { + return false; + } + + ListGiVersionMinorVersionsRequest other = (ListGiVersionMinorVersionsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.version, other.version) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.shapeFamily, other.shapeFamily) + && java.util.Objects.equals( + this.isGiVersionForProvisioning, other.isGiVersionForProvisioning) + && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.shapeFamily == null ? 43 : this.shapeFamily.hashCode()); + result = + (result * PRIME) + + (this.isGiVersionForProvisioning == null + ? 43 + : this.isGiVersionForProvisioning.hashCode()); + result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListGiVersionsRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListGiVersionsRequest.java index 841e9c2c059..1201d9204b0 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListGiVersionsRequest.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListGiVersionsRequest.java @@ -102,6 +102,17 @@ public SortOrder getSortOrder() { public String getShape() { return shape; } + /** + * The target availability domain. Only passed if the limit is AD-specific. + */ + private String availabilityDomain; + + /** + * The target availability domain. Only passed if the limit is AD-specific. + */ + public String getAvailabilityDomain() { + return availabilityDomain; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -185,6 +196,21 @@ public Builder shape(String shape) { return this; } + /** + * The target availability domain. Only passed if the limit is AD-specific. + */ + private String availabilityDomain = null; + + /** + * The target availability domain. Only passed if the limit is AD-specific. + * @param availabilityDomain the value to set + * @return this builder instance + */ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -218,6 +244,7 @@ public Builder copy(ListGiVersionsRequest o) { page(o.getPage()); sortOrder(o.getSortOrder()); shape(o.getShape()); + availabilityDomain(o.getAvailabilityDomain()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -255,8 +282,9 @@ public ListGiVersionsRequest buildWithoutInvocationCallback() { request.page = page; request.sortOrder = sortOrder; request.shape = shape; + request.availabilityDomain = availabilityDomain; return request; - // new ListGiVersionsRequest(compartmentId, limit, page, sortOrder, shape); + // new ListGiVersionsRequest(compartmentId, limit, page, sortOrder, shape, availabilityDomain); } } @@ -270,7 +298,8 @@ public Builder toBuilder() { .limit(limit) .page(page) .sortOrder(sortOrder) - .shape(shape); + .shape(shape) + .availabilityDomain(availabilityDomain); } /** @@ -291,6 +320,7 @@ public String toString() { sb.append(",page=").append(String.valueOf(this.page)); sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); sb.append(",shape=").append(String.valueOf(this.shape)); + sb.append(",availabilityDomain=").append(String.valueOf(this.availabilityDomain)); sb.append(")"); return sb.toString(); } @@ -310,7 +340,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.limit, other.limit) && java.util.Objects.equals(this.page, other.page) && java.util.Objects.equals(this.sortOrder, other.sortOrder) - && java.util.Objects.equals(this.shape, other.shape); + && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain); } @Override @@ -324,6 +355,11 @@ public int hashCode() { result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); return result; } } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListParamsForActionTypeRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListParamsForActionTypeRequest.java new file mode 100644 index 00000000000..93f09a3f424 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListParamsForActionTypeRequest.java @@ -0,0 +1,262 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ListParamsForActionTypeRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListParamsForActionTypeRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The type of the scheduled action + */ + private com.oracle.bmc.database.model.RecommendedScheduledActionSummary.ActionType type; + + /** + * The type of the scheduled action + */ + public com.oracle.bmc.database.model.RecommendedScheduledActionSummary.ActionType getType() { + return type; + } + /** + * The maximum number of items to return per page. + */ + private Integer limit; + + /** + * The maximum number of items to return per page. + */ + public Integer getLimit() { + return limit; + } + /** + * The pagination token to continue listing from. + */ + private String page; + + /** + * The pagination token to continue listing from. + */ + public String getPage() { + return page; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListParamsForActionTypeRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The type of the scheduled action + */ + private com.oracle.bmc.database.model.RecommendedScheduledActionSummary.ActionType type = + null; + + /** + * The type of the scheduled action + * @param type the value to set + * @return this builder instance + */ + public Builder type( + com.oracle.bmc.database.model.RecommendedScheduledActionSummary.ActionType type) { + this.type = type; + return this; + } + + /** + * The maximum number of items to return per page. + */ + private Integer limit = null; + + /** + * The maximum number of items to return per page. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The pagination token to continue listing from. + */ + private String page = null; + + /** + * The pagination token to continue listing from. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListParamsForActionTypeRequest o) { + type(o.getType()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListParamsForActionTypeRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListParamsForActionTypeRequest + */ + public ListParamsForActionTypeRequest build() { + ListParamsForActionTypeRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListParamsForActionTypeRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListParamsForActionTypeRequest + */ + public ListParamsForActionTypeRequest buildWithoutInvocationCallback() { + ListParamsForActionTypeRequest request = new ListParamsForActionTypeRequest(); + request.type = type; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + return request; + // new ListParamsForActionTypeRequest(type, limit, page, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().type(type).limit(limit).page(page).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",type=").append(String.valueOf(this.type)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListParamsForActionTypeRequest)) { + return false; + } + + ListParamsForActionTypeRequest other = (ListParamsForActionTypeRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListRecommendedScheduledActionsRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListRecommendedScheduledActionsRequest.java new file mode 100644 index 00000000000..6b8f92766a7 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListRecommendedScheduledActionsRequest.java @@ -0,0 +1,375 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ListRecommendedScheduledActionsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListRecommendedScheduledActionsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPolicyId; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getSchedulingPolicyId() { + return schedulingPolicyId; + } + /** + * The target resource [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) the scheduled actions will be for. + */ + private String schedulingPolicyTargetResourceId; + + /** + * The target resource [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) the scheduled actions will be for. + */ + public String getSchedulingPolicyTargetResourceId() { + return schedulingPolicyTargetResourceId; + } + /** + * The scheduling plan intent the scheduled actions will be for. + */ + private PlanIntent planIntent; + + /** + * The scheduling plan intent the scheduled actions will be for. + **/ + public enum PlanIntent { + ExadataInfrastructureFullSoftwareUpdate("EXADATA_INFRASTRUCTURE_FULL_SOFTWARE_UPDATE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PlanIntent v : PlanIntent.values()) { + map.put(v.getValue(), v); + } + } + + PlanIntent(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PlanIntent create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid PlanIntent: " + key); + } + }; + + /** + * The scheduling plan intent the scheduled actions will be for. + */ + public PlanIntent getPlanIntent() { + return planIntent; + } + /** + * The maximum number of items to return per page. + */ + private Integer limit; + + /** + * The maximum number of items to return per page. + */ + public Integer getLimit() { + return limit; + } + /** + * The pagination token to continue listing from. + */ + private String page; + + /** + * The pagination token to continue listing from. + */ + public String getPage() { + return page; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListRecommendedScheduledActionsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPolicyId = null; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param schedulingPolicyId the value to set + * @return this builder instance + */ + public Builder schedulingPolicyId(String schedulingPolicyId) { + this.schedulingPolicyId = schedulingPolicyId; + return this; + } + + /** + * The target resource [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) the scheduled actions will be for. + */ + private String schedulingPolicyTargetResourceId = null; + + /** + * The target resource [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) the scheduled actions will be for. + * @param schedulingPolicyTargetResourceId the value to set + * @return this builder instance + */ + public Builder schedulingPolicyTargetResourceId(String schedulingPolicyTargetResourceId) { + this.schedulingPolicyTargetResourceId = schedulingPolicyTargetResourceId; + return this; + } + + /** + * The scheduling plan intent the scheduled actions will be for. + */ + private PlanIntent planIntent = null; + + /** + * The scheduling plan intent the scheduled actions will be for. + * @param planIntent the value to set + * @return this builder instance + */ + public Builder planIntent(PlanIntent planIntent) { + this.planIntent = planIntent; + return this; + } + + /** + * The maximum number of items to return per page. + */ + private Integer limit = null; + + /** + * The maximum number of items to return per page. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The pagination token to continue listing from. + */ + private String page = null; + + /** + * The pagination token to continue listing from. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListRecommendedScheduledActionsRequest o) { + schedulingPolicyId(o.getSchedulingPolicyId()); + schedulingPolicyTargetResourceId(o.getSchedulingPolicyTargetResourceId()); + planIntent(o.getPlanIntent()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListRecommendedScheduledActionsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListRecommendedScheduledActionsRequest + */ + public ListRecommendedScheduledActionsRequest build() { + ListRecommendedScheduledActionsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListRecommendedScheduledActionsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListRecommendedScheduledActionsRequest + */ + public ListRecommendedScheduledActionsRequest buildWithoutInvocationCallback() { + ListRecommendedScheduledActionsRequest request = + new ListRecommendedScheduledActionsRequest(); + request.schedulingPolicyId = schedulingPolicyId; + request.schedulingPolicyTargetResourceId = schedulingPolicyTargetResourceId; + request.planIntent = planIntent; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + return request; + // new ListRecommendedScheduledActionsRequest(schedulingPolicyId, schedulingPolicyTargetResourceId, planIntent, limit, page, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulingPolicyId(schedulingPolicyId) + .schedulingPolicyTargetResourceId(schedulingPolicyTargetResourceId) + .planIntent(planIntent) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulingPolicyId=").append(String.valueOf(this.schedulingPolicyId)); + sb.append(",schedulingPolicyTargetResourceId=") + .append(String.valueOf(this.schedulingPolicyTargetResourceId)); + sb.append(",planIntent=").append(String.valueOf(this.planIntent)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListRecommendedScheduledActionsRequest)) { + return false; + } + + ListRecommendedScheduledActionsRequest other = (ListRecommendedScheduledActionsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulingPolicyId, other.schedulingPolicyId) + && java.util.Objects.equals( + this.schedulingPolicyTargetResourceId, + other.schedulingPolicyTargetResourceId) + && java.util.Objects.equals(this.planIntent, other.planIntent) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulingPolicyId == null + ? 43 + : this.schedulingPolicyId.hashCode()); + result = + (result * PRIME) + + (this.schedulingPolicyTargetResourceId == null + ? 43 + : this.schedulingPolicyTargetResourceId.hashCode()); + result = (result * PRIME) + (this.planIntent == null ? 43 : this.planIntent.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListScheduledActionsRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListScheduledActionsRequest.java new file mode 100644 index 00000000000..a804badbe1a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListScheduledActionsRequest.java @@ -0,0 +1,574 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ListScheduledActionsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListScheduledActionsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String compartmentId; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The maximum number of items to return per page. + */ + private Integer limit; + + /** + * The maximum number of items to return per page. + */ + public Integer getLimit() { + return limit; + } + /** + * The pagination token to continue listing from. + */ + private String page; + + /** + * The pagination token to continue listing from. + */ + public String getPage() { + return page; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortOrder: " + key); + } + }; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public SortOrder getSortOrder() { + return sortOrder; + } + /** + * A filter to return only resources that match the given service type exactly. + */ + private String serviceType; + + /** + * A filter to return only resources that match the given service type exactly. + */ + public String getServiceType() { + return serviceType; + } + /** + * A filter to return only resources that match the given scheduling policy id exactly. + */ + private String schedulingPlanId; + + /** + * A filter to return only resources that match the given scheduling policy id exactly. + */ + public String getSchedulingPlanId() { + return schedulingPlanId; + } + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + public String getDisplayName() { + return displayName; + } + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * A filter to return only resources that match the given Scheduled Action id exactly. + */ + private String id; + + /** + * A filter to return only resources that match the given Scheduled Action id exactly. + */ + public String getId() { + return id; + } + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + private com.oracle.bmc.database.model.ScheduledActionSummary.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + public com.oracle.bmc.database.model.ScheduledActionSummary.LifecycleState getLifecycleState() { + return lifecycleState; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListScheduledActionsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String compartmentId = null; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The maximum number of items to return per page. + */ + private Integer limit = null; + + /** + * The maximum number of items to return per page. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The pagination token to continue listing from. + */ + private String page = null; + + /** + * The pagination token to continue listing from. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * A filter to return only resources that match the given service type exactly. + */ + private String serviceType = null; + + /** + * A filter to return only resources that match the given service type exactly. + * @param serviceType the value to set + * @return this builder instance + */ + public Builder serviceType(String serviceType) { + this.serviceType = serviceType; + return this; + } + + /** + * A filter to return only resources that match the given scheduling policy id exactly. + */ + private String schedulingPlanId = null; + + /** + * A filter to return only resources that match the given scheduling policy id exactly. + * @param schedulingPlanId the value to set + * @return this builder instance + */ + public Builder schedulingPlanId(String schedulingPlanId) { + this.schedulingPlanId = schedulingPlanId; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * A filter to return only resources that match the given Scheduled Action id exactly. + */ + private String id = null; + + /** + * A filter to return only resources that match the given Scheduled Action id exactly. + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + private com.oracle.bmc.database.model.ScheduledActionSummary.LifecycleState lifecycleState = + null; + + /** + * A filter to return only resources that match the given lifecycle state exactly. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.database.model.ScheduledActionSummary.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListScheduledActionsRequest o) { + compartmentId(o.getCompartmentId()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + sortOrder(o.getSortOrder()); + serviceType(o.getServiceType()); + schedulingPlanId(o.getSchedulingPlanId()); + displayName(o.getDisplayName()); + sortBy(o.getSortBy()); + id(o.getId()); + lifecycleState(o.getLifecycleState()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListScheduledActionsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListScheduledActionsRequest + */ + public ListScheduledActionsRequest build() { + ListScheduledActionsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListScheduledActionsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListScheduledActionsRequest + */ + public ListScheduledActionsRequest buildWithoutInvocationCallback() { + ListScheduledActionsRequest request = new ListScheduledActionsRequest(); + request.compartmentId = compartmentId; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + request.sortOrder = sortOrder; + request.serviceType = serviceType; + request.schedulingPlanId = schedulingPlanId; + request.displayName = displayName; + request.sortBy = sortBy; + request.id = id; + request.lifecycleState = lifecycleState; + return request; + // new ListScheduledActionsRequest(compartmentId, limit, page, opcRequestId, sortOrder, serviceType, schedulingPlanId, displayName, sortBy, id, lifecycleState); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId) + .sortOrder(sortOrder) + .serviceType(serviceType) + .schedulingPlanId(schedulingPlanId) + .displayName(displayName) + .sortBy(sortBy) + .id(id) + .lifecycleState(lifecycleState); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",serviceType=").append(String.valueOf(this.serviceType)); + sb.append(",schedulingPlanId=").append(String.valueOf(this.schedulingPlanId)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListScheduledActionsRequest)) { + return false; + } + + ListScheduledActionsRequest other = (ListScheduledActionsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.serviceType, other.serviceType) + && java.util.Objects.equals(this.schedulingPlanId, other.schedulingPlanId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.serviceType == null ? 43 : this.serviceType.hashCode()); + result = + (result * PRIME) + + (this.schedulingPlanId == null ? 43 : this.schedulingPlanId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListSchedulingPlansRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListSchedulingPlansRequest.java new file mode 100644 index 00000000000..a40cb54532f --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListSchedulingPlansRequest.java @@ -0,0 +1,574 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ListSchedulingPlansRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListSchedulingPlansRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String compartmentId; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The maximum number of items to return per page. + */ + private Integer limit; + + /** + * The maximum number of items to return per page. + */ + public Integer getLimit() { + return limit; + } + /** + * The pagination token to continue listing from. + */ + private String page; + + /** + * The pagination token to continue listing from. + */ + public String getPage() { + return page; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortOrder: " + key); + } + }; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public SortOrder getSortOrder() { + return sortOrder; + } + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + private com.oracle.bmc.database.model.SchedulingPlanSummary.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + public com.oracle.bmc.database.model.SchedulingPlanSummary.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the given scheduling policy id exactly. + */ + private String schedulingPolicyId; + + /** + * A filter to return only resources that match the given scheduling policy id exactly. + */ + public String getSchedulingPolicyId() { + return schedulingPolicyId; + } + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + public String getDisplayName() { + return displayName; + } + /** + * A filter to return only resources that match the given resource id exactly. + */ + private String resourceId; + + /** + * A filter to return only resources that match the given resource id exactly. + */ + public String getResourceId() { + return resourceId; + } + /** + * A filter to return only resources that match the given Schedule Plan id exactly. + */ + private String id; + + /** + * A filter to return only resources that match the given Schedule Plan id exactly. + */ + public String getId() { + return id; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListSchedulingPlansRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String compartmentId = null; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The maximum number of items to return per page. + */ + private Integer limit = null; + + /** + * The maximum number of items to return per page. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The pagination token to continue listing from. + */ + private String page = null; + + /** + * The pagination token to continue listing from. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + private com.oracle.bmc.database.model.SchedulingPlanSummary.LifecycleState lifecycleState = + null; + + /** + * A filter to return only resources that match the given lifecycle state exactly. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.database.model.SchedulingPlanSummary.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the given scheduling policy id exactly. + */ + private String schedulingPolicyId = null; + + /** + * A filter to return only resources that match the given scheduling policy id exactly. + * @param schedulingPolicyId the value to set + * @return this builder instance + */ + public Builder schedulingPolicyId(String schedulingPolicyId) { + this.schedulingPolicyId = schedulingPolicyId; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A filter to return only resources that match the given resource id exactly. + */ + private String resourceId = null; + + /** + * A filter to return only resources that match the given resource id exactly. + * @param resourceId the value to set + * @return this builder instance + */ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * A filter to return only resources that match the given Schedule Plan id exactly. + */ + private String id = null; + + /** + * A filter to return only resources that match the given Schedule Plan id exactly. + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSchedulingPlansRequest o) { + compartmentId(o.getCompartmentId()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); + schedulingPolicyId(o.getSchedulingPolicyId()); + displayName(o.getDisplayName()); + resourceId(o.getResourceId()); + id(o.getId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListSchedulingPlansRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListSchedulingPlansRequest + */ + public ListSchedulingPlansRequest build() { + ListSchedulingPlansRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListSchedulingPlansRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListSchedulingPlansRequest + */ + public ListSchedulingPlansRequest buildWithoutInvocationCallback() { + ListSchedulingPlansRequest request = new ListSchedulingPlansRequest(); + request.compartmentId = compartmentId; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.lifecycleState = lifecycleState; + request.schedulingPolicyId = schedulingPolicyId; + request.displayName = displayName; + request.resourceId = resourceId; + request.id = id; + return request; + // new ListSchedulingPlansRequest(compartmentId, limit, page, opcRequestId, sortBy, sortOrder, lifecycleState, schedulingPolicyId, displayName, resourceId, id); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId) + .sortBy(sortBy) + .sortOrder(sortOrder) + .lifecycleState(lifecycleState) + .schedulingPolicyId(schedulingPolicyId) + .displayName(displayName) + .resourceId(resourceId) + .id(id); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",schedulingPolicyId=").append(String.valueOf(this.schedulingPolicyId)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",resourceId=").append(String.valueOf(this.resourceId)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSchedulingPlansRequest)) { + return false; + } + + ListSchedulingPlansRequest other = (ListSchedulingPlansRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.schedulingPolicyId, other.schedulingPolicyId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.id, other.id); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.schedulingPolicyId == null + ? 43 + : this.schedulingPolicyId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListSchedulingPoliciesRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListSchedulingPoliciesRequest.java new file mode 100644 index 00000000000..a3fd648963d --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListSchedulingPoliciesRequest.java @@ -0,0 +1,477 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ListSchedulingPoliciesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListSchedulingPoliciesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String compartmentId; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The maximum number of items to return per page. + */ + private Integer limit; + + /** + * The maximum number of items to return per page. + */ + public Integer getLimit() { + return limit; + } + /** + * The pagination token to continue listing from. + */ + private String page; + + /** + * The pagination token to continue listing from. + */ + public String getPage() { + return page; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortOrder: " + key); + } + }; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public SortOrder getSortOrder() { + return sortOrder; + } + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + private com.oracle.bmc.database.model.SchedulingPolicySummary.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + public com.oracle.bmc.database.model.SchedulingPolicySummary.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + public String getDisplayName() { + return displayName; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListSchedulingPoliciesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String compartmentId = null; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The maximum number of items to return per page. + */ + private Integer limit = null; + + /** + * The maximum number of items to return per page. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The pagination token to continue listing from. + */ + private String page = null; + + /** + * The pagination token to continue listing from. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + private com.oracle.bmc.database.model.SchedulingPolicySummary.LifecycleState + lifecycleState = null; + + /** + * A filter to return only resources that match the given lifecycle state exactly. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.database.model.SchedulingPolicySummary.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSchedulingPoliciesRequest o) { + compartmentId(o.getCompartmentId()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListSchedulingPoliciesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListSchedulingPoliciesRequest + */ + public ListSchedulingPoliciesRequest build() { + ListSchedulingPoliciesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListSchedulingPoliciesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListSchedulingPoliciesRequest + */ + public ListSchedulingPoliciesRequest buildWithoutInvocationCallback() { + ListSchedulingPoliciesRequest request = new ListSchedulingPoliciesRequest(); + request.compartmentId = compartmentId; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + return request; + // new ListSchedulingPoliciesRequest(compartmentId, limit, page, opcRequestId, sortBy, sortOrder, lifecycleState, displayName); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId) + .sortBy(sortBy) + .sortOrder(sortOrder) + .lifecycleState(lifecycleState) + .displayName(displayName); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSchedulingPoliciesRequest)) { + return false; + } + + ListSchedulingPoliciesRequest other = (ListSchedulingPoliciesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListSchedulingWindowsRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListSchedulingWindowsRequest.java new file mode 100644 index 00000000000..e2f06437572 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ListSchedulingWindowsRequest.java @@ -0,0 +1,513 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ListSchedulingWindowsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListSchedulingWindowsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPolicyId; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getSchedulingPolicyId() { + return schedulingPolicyId; + } + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String compartmentId; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The maximum number of items to return per page. + */ + private Integer limit; + + /** + * The maximum number of items to return per page. + */ + public Integer getLimit() { + return limit; + } + /** + * The pagination token to continue listing from. + */ + private String page; + + /** + * The pagination token to continue listing from. + */ + public String getPage() { + return page; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortOrder: " + key); + } + }; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public SortOrder getSortOrder() { + return sortOrder; + } + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + private com.oracle.bmc.database.model.SchedulingWindowSummary.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + public com.oracle.bmc.database.model.SchedulingWindowSummary.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + public String getDisplayName() { + return displayName; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListSchedulingWindowsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPolicyId = null; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param schedulingPolicyId the value to set + * @return this builder instance + */ + public Builder schedulingPolicyId(String schedulingPolicyId) { + this.schedulingPolicyId = schedulingPolicyId; + return this; + } + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String compartmentId = null; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The maximum number of items to return per page. + */ + private Integer limit = null; + + /** + * The maximum number of items to return per page. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The pagination token to continue listing from. + */ + private String page = null; + + /** + * The pagination token to continue listing from. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * A filter to return only resources that match the given lifecycle state exactly. + */ + private com.oracle.bmc.database.model.SchedulingWindowSummary.LifecycleState + lifecycleState = null; + + /** + * A filter to return only resources that match the given lifecycle state exactly. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.database.model.SchedulingWindowSummary.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. The match is not case sensitive. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSchedulingWindowsRequest o) { + schedulingPolicyId(o.getSchedulingPolicyId()); + compartmentId(o.getCompartmentId()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListSchedulingWindowsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListSchedulingWindowsRequest + */ + public ListSchedulingWindowsRequest build() { + ListSchedulingWindowsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListSchedulingWindowsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListSchedulingWindowsRequest + */ + public ListSchedulingWindowsRequest buildWithoutInvocationCallback() { + ListSchedulingWindowsRequest request = new ListSchedulingWindowsRequest(); + request.schedulingPolicyId = schedulingPolicyId; + request.compartmentId = compartmentId; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + return request; + // new ListSchedulingWindowsRequest(schedulingPolicyId, compartmentId, limit, page, opcRequestId, sortBy, sortOrder, lifecycleState, displayName); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulingPolicyId(schedulingPolicyId) + .compartmentId(compartmentId) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId) + .sortBy(sortBy) + .sortOrder(sortOrder) + .lifecycleState(lifecycleState) + .displayName(displayName); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulingPolicyId=").append(String.valueOf(this.schedulingPolicyId)); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSchedulingWindowsRequest)) { + return false; + } + + ListSchedulingWindowsRequest other = (ListSchedulingWindowsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulingPolicyId, other.schedulingPolicyId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulingPolicyId == null + ? 43 + : this.schedulingPolicyId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/MoveExecutionActionMemberRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/MoveExecutionActionMemberRequest.java new file mode 100644 index 00000000000..d7bc6e1d93c --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/MoveExecutionActionMemberRequest.java @@ -0,0 +1,367 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use MoveExecutionActionMemberRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class MoveExecutionActionMemberRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.MoveExecutionActionMemberDetails> { + + /** + * The execution action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String executionActionId; + + /** + * The execution action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getExecutionActionId() { + return executionActionId; + } + /** + * Request to move an execution action member to this execution action resource from another. + */ + private com.oracle.bmc.database.model.MoveExecutionActionMemberDetails + moveExecutionActionMemberDetails; + + /** + * Request to move an execution action member to this execution action resource from another. + */ + public com.oracle.bmc.database.model.MoveExecutionActionMemberDetails + getMoveExecutionActionMemberDetails() { + return moveExecutionActionMemberDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.MoveExecutionActionMemberDetails getBody$() { + return moveExecutionActionMemberDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + MoveExecutionActionMemberRequest, + com.oracle.bmc.database.model.MoveExecutionActionMemberDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The execution action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String executionActionId = null; + + /** + * The execution action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param executionActionId the value to set + * @return this builder instance + */ + public Builder executionActionId(String executionActionId) { + this.executionActionId = executionActionId; + return this; + } + + /** + * Request to move an execution action member to this execution action resource from another. + */ + private com.oracle.bmc.database.model.MoveExecutionActionMemberDetails + moveExecutionActionMemberDetails = null; + + /** + * Request to move an execution action member to this execution action resource from another. + * @param moveExecutionActionMemberDetails the value to set + * @return this builder instance + */ + public Builder moveExecutionActionMemberDetails( + com.oracle.bmc.database.model.MoveExecutionActionMemberDetails + moveExecutionActionMemberDetails) { + this.moveExecutionActionMemberDetails = moveExecutionActionMemberDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(MoveExecutionActionMemberRequest o) { + executionActionId(o.getExecutionActionId()); + moveExecutionActionMemberDetails(o.getMoveExecutionActionMemberDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of MoveExecutionActionMemberRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of MoveExecutionActionMemberRequest + */ + public MoveExecutionActionMemberRequest build() { + MoveExecutionActionMemberRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.database.model.MoveExecutionActionMemberDetails body) { + moveExecutionActionMemberDetails(body); + return this; + } + + /** + * Build the instance of MoveExecutionActionMemberRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of MoveExecutionActionMemberRequest + */ + public MoveExecutionActionMemberRequest buildWithoutInvocationCallback() { + MoveExecutionActionMemberRequest request = new MoveExecutionActionMemberRequest(); + request.executionActionId = executionActionId; + request.moveExecutionActionMemberDetails = moveExecutionActionMemberDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new MoveExecutionActionMemberRequest(executionActionId, moveExecutionActionMemberDetails, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .executionActionId(executionActionId) + .moveExecutionActionMemberDetails(moveExecutionActionMemberDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",executionActionId=").append(String.valueOf(this.executionActionId)); + sb.append(",moveExecutionActionMemberDetails=") + .append(String.valueOf(this.moveExecutionActionMemberDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MoveExecutionActionMemberRequest)) { + return false; + } + + MoveExecutionActionMemberRequest other = (MoveExecutionActionMemberRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.executionActionId, other.executionActionId) + && java.util.Objects.equals( + this.moveExecutionActionMemberDetails, + other.moveExecutionActionMemberDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.executionActionId == null ? 43 : this.executionActionId.hashCode()); + result = + (result * PRIME) + + (this.moveExecutionActionMemberDetails == null + ? 43 + : this.moveExecutionActionMemberDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/RemoveVirtualMachineFromExadbVmClusterRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/RemoveVirtualMachineFromExadbVmClusterRequest.java new file mode 100644 index 00000000000..e54cbca676e --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/RemoveVirtualMachineFromExadbVmClusterRequest.java @@ -0,0 +1,375 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use RemoveVirtualMachineFromExadbVmClusterRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class RemoveVirtualMachineFromExadbVmClusterRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.RemoveVirtualMachineFromExadbVmClusterDetails> { + + /** + * Request to remove Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. + */ + private com.oracle.bmc.database.model.RemoveVirtualMachineFromExadbVmClusterDetails + removeVirtualMachineFromExadbVmClusterDetails; + + /** + * Request to remove Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. + */ + public com.oracle.bmc.database.model.RemoveVirtualMachineFromExadbVmClusterDetails + getRemoveVirtualMachineFromExadbVmClusterDetails() { + return removeVirtualMachineFromExadbVmClusterDetails; + } + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + private String exadbVmClusterId; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + public String getExadbVmClusterId() { + return exadbVmClusterId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.RemoveVirtualMachineFromExadbVmClusterDetails getBody$() { + return removeVirtualMachineFromExadbVmClusterDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RemoveVirtualMachineFromExadbVmClusterRequest, + com.oracle.bmc.database.model.RemoveVirtualMachineFromExadbVmClusterDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request to remove Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. + */ + private com.oracle.bmc.database.model.RemoveVirtualMachineFromExadbVmClusterDetails + removeVirtualMachineFromExadbVmClusterDetails = null; + + /** + * Request to remove Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. + * @param removeVirtualMachineFromExadbVmClusterDetails the value to set + * @return this builder instance + */ + public Builder removeVirtualMachineFromExadbVmClusterDetails( + com.oracle.bmc.database.model.RemoveVirtualMachineFromExadbVmClusterDetails + removeVirtualMachineFromExadbVmClusterDetails) { + this.removeVirtualMachineFromExadbVmClusterDetails = + removeVirtualMachineFromExadbVmClusterDetails; + return this; + } + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + private String exadbVmClusterId = null; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + * @param exadbVmClusterId the value to set + * @return this builder instance + */ + public Builder exadbVmClusterId(String exadbVmClusterId) { + this.exadbVmClusterId = exadbVmClusterId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveVirtualMachineFromExadbVmClusterRequest o) { + removeVirtualMachineFromExadbVmClusterDetails( + o.getRemoveVirtualMachineFromExadbVmClusterDetails()); + exadbVmClusterId(o.getExadbVmClusterId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RemoveVirtualMachineFromExadbVmClusterRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RemoveVirtualMachineFromExadbVmClusterRequest + */ + public RemoveVirtualMachineFromExadbVmClusterRequest build() { + RemoveVirtualMachineFromExadbVmClusterRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.database.model.RemoveVirtualMachineFromExadbVmClusterDetails body) { + removeVirtualMachineFromExadbVmClusterDetails(body); + return this; + } + + /** + * Build the instance of RemoveVirtualMachineFromExadbVmClusterRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RemoveVirtualMachineFromExadbVmClusterRequest + */ + public RemoveVirtualMachineFromExadbVmClusterRequest buildWithoutInvocationCallback() { + RemoveVirtualMachineFromExadbVmClusterRequest request = + new RemoveVirtualMachineFromExadbVmClusterRequest(); + request.removeVirtualMachineFromExadbVmClusterDetails = + removeVirtualMachineFromExadbVmClusterDetails; + request.exadbVmClusterId = exadbVmClusterId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new RemoveVirtualMachineFromExadbVmClusterRequest(removeVirtualMachineFromExadbVmClusterDetails, exadbVmClusterId, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .removeVirtualMachineFromExadbVmClusterDetails( + removeVirtualMachineFromExadbVmClusterDetails) + .exadbVmClusterId(exadbVmClusterId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",removeVirtualMachineFromExadbVmClusterDetails=") + .append(String.valueOf(this.removeVirtualMachineFromExadbVmClusterDetails)); + sb.append(",exadbVmClusterId=").append(String.valueOf(this.exadbVmClusterId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveVirtualMachineFromExadbVmClusterRequest)) { + return false; + } + + RemoveVirtualMachineFromExadbVmClusterRequest other = + (RemoveVirtualMachineFromExadbVmClusterRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.removeVirtualMachineFromExadbVmClusterDetails, + other.removeVirtualMachineFromExadbVmClusterDetails) + && java.util.Objects.equals(this.exadbVmClusterId, other.exadbVmClusterId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.removeVirtualMachineFromExadbVmClusterDetails == null + ? 43 + : this.removeVirtualMachineFromExadbVmClusterDetails.hashCode()); + result = + (result * PRIME) + + (this.exadbVmClusterId == null ? 43 : this.exadbVmClusterId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ReorderExecutionActionsRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ReorderExecutionActionsRequest.java new file mode 100644 index 00000000000..676d99839ef --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ReorderExecutionActionsRequest.java @@ -0,0 +1,366 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ReorderExecutionActionsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ReorderExecutionActionsRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.ReorderExecutionActionDetails> { + + /** + * The execution window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String executionWindowId; + + /** + * The execution window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getExecutionWindowId() { + return executionWindowId; + } + /** + * Request to reorder the execution actions under this execution window resource. + */ + private com.oracle.bmc.database.model.ReorderExecutionActionDetails + reorderExecutionActionDetails; + + /** + * Request to reorder the execution actions under this execution window resource. + */ + public com.oracle.bmc.database.model.ReorderExecutionActionDetails + getReorderExecutionActionDetails() { + return reorderExecutionActionDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.ReorderExecutionActionDetails getBody$() { + return reorderExecutionActionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ReorderExecutionActionsRequest, + com.oracle.bmc.database.model.ReorderExecutionActionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The execution window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String executionWindowId = null; + + /** + * The execution window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param executionWindowId the value to set + * @return this builder instance + */ + public Builder executionWindowId(String executionWindowId) { + this.executionWindowId = executionWindowId; + return this; + } + + /** + * Request to reorder the execution actions under this execution window resource. + */ + private com.oracle.bmc.database.model.ReorderExecutionActionDetails + reorderExecutionActionDetails = null; + + /** + * Request to reorder the execution actions under this execution window resource. + * @param reorderExecutionActionDetails the value to set + * @return this builder instance + */ + public Builder reorderExecutionActionDetails( + com.oracle.bmc.database.model.ReorderExecutionActionDetails + reorderExecutionActionDetails) { + this.reorderExecutionActionDetails = reorderExecutionActionDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ReorderExecutionActionsRequest o) { + executionWindowId(o.getExecutionWindowId()); + reorderExecutionActionDetails(o.getReorderExecutionActionDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ReorderExecutionActionsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ReorderExecutionActionsRequest + */ + public ReorderExecutionActionsRequest build() { + ReorderExecutionActionsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.database.model.ReorderExecutionActionDetails body) { + reorderExecutionActionDetails(body); + return this; + } + + /** + * Build the instance of ReorderExecutionActionsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ReorderExecutionActionsRequest + */ + public ReorderExecutionActionsRequest buildWithoutInvocationCallback() { + ReorderExecutionActionsRequest request = new ReorderExecutionActionsRequest(); + request.executionWindowId = executionWindowId; + request.reorderExecutionActionDetails = reorderExecutionActionDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new ReorderExecutionActionsRequest(executionWindowId, reorderExecutionActionDetails, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .executionWindowId(executionWindowId) + .reorderExecutionActionDetails(reorderExecutionActionDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",executionWindowId=").append(String.valueOf(this.executionWindowId)); + sb.append(",reorderExecutionActionDetails=") + .append(String.valueOf(this.reorderExecutionActionDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ReorderExecutionActionsRequest)) { + return false; + } + + ReorderExecutionActionsRequest other = (ReorderExecutionActionsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.executionWindowId, other.executionWindowId) + && java.util.Objects.equals( + this.reorderExecutionActionDetails, other.reorderExecutionActionDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.executionWindowId == null ? 43 : this.executionWindowId.hashCode()); + result = + (result * PRIME) + + (this.reorderExecutionActionDetails == null + ? 43 + : this.reorderExecutionActionDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/ReorderScheduledActionsRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ReorderScheduledActionsRequest.java new file mode 100644 index 00000000000..5b601dd01c5 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/ReorderScheduledActionsRequest.java @@ -0,0 +1,366 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use ReorderScheduledActionsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ReorderScheduledActionsRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.ReorderScheduledActionsDetails> { + + /** + * Request to re-order Scheduled Action resources. + */ + private com.oracle.bmc.database.model.ReorderScheduledActionsDetails + reorderScheduledActionsDetails; + + /** + * Request to re-order Scheduled Action resources. + */ + public com.oracle.bmc.database.model.ReorderScheduledActionsDetails + getReorderScheduledActionsDetails() { + return reorderScheduledActionsDetails; + } + /** + * The Schedule Plan [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPlanId; + + /** + * The Schedule Plan [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getSchedulingPlanId() { + return schedulingPlanId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.ReorderScheduledActionsDetails getBody$() { + return reorderScheduledActionsDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ReorderScheduledActionsRequest, + com.oracle.bmc.database.model.ReorderScheduledActionsDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request to re-order Scheduled Action resources. + */ + private com.oracle.bmc.database.model.ReorderScheduledActionsDetails + reorderScheduledActionsDetails = null; + + /** + * Request to re-order Scheduled Action resources. + * @param reorderScheduledActionsDetails the value to set + * @return this builder instance + */ + public Builder reorderScheduledActionsDetails( + com.oracle.bmc.database.model.ReorderScheduledActionsDetails + reorderScheduledActionsDetails) { + this.reorderScheduledActionsDetails = reorderScheduledActionsDetails; + return this; + } + + /** + * The Schedule Plan [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPlanId = null; + + /** + * The Schedule Plan [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param schedulingPlanId the value to set + * @return this builder instance + */ + public Builder schedulingPlanId(String schedulingPlanId) { + this.schedulingPlanId = schedulingPlanId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ReorderScheduledActionsRequest o) { + reorderScheduledActionsDetails(o.getReorderScheduledActionsDetails()); + schedulingPlanId(o.getSchedulingPlanId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ReorderScheduledActionsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ReorderScheduledActionsRequest + */ + public ReorderScheduledActionsRequest build() { + ReorderScheduledActionsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.database.model.ReorderScheduledActionsDetails body) { + reorderScheduledActionsDetails(body); + return this; + } + + /** + * Build the instance of ReorderScheduledActionsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ReorderScheduledActionsRequest + */ + public ReorderScheduledActionsRequest buildWithoutInvocationCallback() { + ReorderScheduledActionsRequest request = new ReorderScheduledActionsRequest(); + request.reorderScheduledActionsDetails = reorderScheduledActionsDetails; + request.schedulingPlanId = schedulingPlanId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new ReorderScheduledActionsRequest(reorderScheduledActionsDetails, schedulingPlanId, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .reorderScheduledActionsDetails(reorderScheduledActionsDetails) + .schedulingPlanId(schedulingPlanId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",reorderScheduledActionsDetails=") + .append(String.valueOf(this.reorderScheduledActionsDetails)); + sb.append(",schedulingPlanId=").append(String.valueOf(this.schedulingPlanId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ReorderScheduledActionsRequest)) { + return false; + } + + ReorderScheduledActionsRequest other = (ReorderScheduledActionsRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.reorderScheduledActionsDetails, other.reorderScheduledActionsDetails) + && java.util.Objects.equals(this.schedulingPlanId, other.schedulingPlanId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.reorderScheduledActionsDetails == null + ? 43 + : this.reorderScheduledActionsDetails.hashCode()); + result = + (result * PRIME) + + (this.schedulingPlanId == null ? 43 : this.schedulingPlanId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/RotateAutonomousContainerDatabaseEncryptionKeyRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/RotateAutonomousContainerDatabaseEncryptionKeyRequest.java index ffe56ba55fd..14412a9f019 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/requests/RotateAutonomousContainerDatabaseEncryptionKeyRequest.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/RotateAutonomousContainerDatabaseEncryptionKeyRequest.java @@ -10,7 +10,9 @@ */ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") public class RotateAutonomousContainerDatabaseEncryptionKeyRequest - extends com.oracle.bmc.requests.BmcRequest { + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model + .RotateAutonomousContainerDatabaseEncryptionKeyDetails> { /** * The Autonomous Container Database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @@ -74,10 +76,36 @@ public String getOpcRetryToken() { public String getOpcRequestId() { return opcRequestId; } + /** + * Key details provided by the user for rotate key operation for Autonomous Database. + */ + private com.oracle.bmc.database.model.RotateAutonomousContainerDatabaseEncryptionKeyDetails + rotateAutonomousContainerDatabaseEncryptionKeyDetails; + + /** + * Key details provided by the user for rotate key operation for Autonomous Database. + */ + public com.oracle.bmc.database.model.RotateAutonomousContainerDatabaseEncryptionKeyDetails + getRotateAutonomousContainerDatabaseEncryptionKeyDetails() { + return rotateAutonomousContainerDatabaseEncryptionKeyDetails; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.RotateAutonomousContainerDatabaseEncryptionKeyDetails + getBody$() { + return rotateAutonomousContainerDatabaseEncryptionKeyDetails; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< - RotateAutonomousContainerDatabaseEncryptionKeyRequest, java.lang.Void> { + RotateAutonomousContainerDatabaseEncryptionKeyRequest, + com.oracle.bmc.database.model + .RotateAutonomousContainerDatabaseEncryptionKeyDetails> { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; @@ -160,6 +188,25 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Key details provided by the user for rotate key operation for Autonomous Database. + */ + private com.oracle.bmc.database.model.RotateAutonomousContainerDatabaseEncryptionKeyDetails + rotateAutonomousContainerDatabaseEncryptionKeyDetails = null; + + /** + * Key details provided by the user for rotate key operation for Autonomous Database. + * @param rotateAutonomousContainerDatabaseEncryptionKeyDetails the value to set + * @return this builder instance + */ + public Builder rotateAutonomousContainerDatabaseEncryptionKeyDetails( + com.oracle.bmc.database.model.RotateAutonomousContainerDatabaseEncryptionKeyDetails + rotateAutonomousContainerDatabaseEncryptionKeyDetails) { + this.rotateAutonomousContainerDatabaseEncryptionKeyDetails = + rotateAutonomousContainerDatabaseEncryptionKeyDetails; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -192,6 +239,8 @@ public Builder copy(RotateAutonomousContainerDatabaseEncryptionKeyRequest o) { ifMatch(o.getIfMatch()); opcRetryToken(o.getOpcRetryToken()); opcRequestId(o.getOpcRequestId()); + rotateAutonomousContainerDatabaseEncryptionKeyDetails( + o.getRotateAutonomousContainerDatabaseEncryptionKeyDetails()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -215,6 +264,19 @@ public RotateAutonomousContainerDatabaseEncryptionKeyRequest build() { return request; } + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.database.model.RotateAutonomousContainerDatabaseEncryptionKeyDetails + body) { + rotateAutonomousContainerDatabaseEncryptionKeyDetails(body); + return this; + } + /** * Build the instance of RotateAutonomousContainerDatabaseEncryptionKeyRequest as configured by this builder * @@ -231,8 +293,10 @@ public RotateAutonomousContainerDatabaseEncryptionKeyRequest build() { request.ifMatch = ifMatch; request.opcRetryToken = opcRetryToken; request.opcRequestId = opcRequestId; + request.rotateAutonomousContainerDatabaseEncryptionKeyDetails = + rotateAutonomousContainerDatabaseEncryptionKeyDetails; return request; - // new RotateAutonomousContainerDatabaseEncryptionKeyRequest(autonomousContainerDatabaseId, ifMatch, opcRetryToken, opcRequestId); + // new RotateAutonomousContainerDatabaseEncryptionKeyRequest(autonomousContainerDatabaseId, ifMatch, opcRetryToken, opcRequestId, rotateAutonomousContainerDatabaseEncryptionKeyDetails); } } @@ -245,7 +309,9 @@ public Builder toBuilder() { .autonomousContainerDatabaseId(autonomousContainerDatabaseId) .ifMatch(ifMatch) .opcRetryToken(opcRetryToken) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .rotateAutonomousContainerDatabaseEncryptionKeyDetails( + rotateAutonomousContainerDatabaseEncryptionKeyDetails); } /** @@ -266,6 +332,8 @@ public String toString() { sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",rotateAutonomousContainerDatabaseEncryptionKeyDetails=") + .append(String.valueOf(this.rotateAutonomousContainerDatabaseEncryptionKeyDetails)); sb.append(")"); return sb.toString(); } @@ -286,7 +354,10 @@ public boolean equals(Object o) { this.autonomousContainerDatabaseId, other.autonomousContainerDatabaseId) && java.util.Objects.equals(this.ifMatch, other.ifMatch) && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.rotateAutonomousContainerDatabaseEncryptionKeyDetails, + other.rotateAutonomousContainerDatabaseEncryptionKeyDetails); } @Override @@ -303,6 +374,12 @@ public int hashCode() { (result * PRIME) + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.rotateAutonomousContainerDatabaseEncryptionKeyDetails == null + ? 43 + : this.rotateAutonomousContainerDatabaseEncryptionKeyDetails + .hashCode()); return result; } } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/RotateAutonomousDatabaseEncryptionKeyRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/RotateAutonomousDatabaseEncryptionKeyRequest.java index 572afe22374..216c988d963 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/requests/RotateAutonomousDatabaseEncryptionKeyRequest.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/RotateAutonomousDatabaseEncryptionKeyRequest.java @@ -10,7 +10,8 @@ */ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") public class RotateAutonomousDatabaseEncryptionKeyRequest - extends com.oracle.bmc.requests.BmcRequest { + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.RotateAutonomousDatabaseEncryptionKeyDetails> { /** * The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @@ -74,10 +75,34 @@ public String getOpcRetryToken() { public String getOpcRequestId() { return opcRequestId; } + /** + * Key details provided by the user for rotate key operation for Autonomous Database. + */ + private com.oracle.bmc.database.model.RotateAutonomousDatabaseEncryptionKeyDetails + rotateAutonomousDatabaseEncryptionKeyDetails; + + /** + * Key details provided by the user for rotate key operation for Autonomous Database. + */ + public com.oracle.bmc.database.model.RotateAutonomousDatabaseEncryptionKeyDetails + getRotateAutonomousDatabaseEncryptionKeyDetails() { + return rotateAutonomousDatabaseEncryptionKeyDetails; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.RotateAutonomousDatabaseEncryptionKeyDetails getBody$() { + return rotateAutonomousDatabaseEncryptionKeyDetails; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< - RotateAutonomousDatabaseEncryptionKeyRequest, java.lang.Void> { + RotateAutonomousDatabaseEncryptionKeyRequest, + com.oracle.bmc.database.model.RotateAutonomousDatabaseEncryptionKeyDetails> { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; @@ -160,6 +185,25 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Key details provided by the user for rotate key operation for Autonomous Database. + */ + private com.oracle.bmc.database.model.RotateAutonomousDatabaseEncryptionKeyDetails + rotateAutonomousDatabaseEncryptionKeyDetails = null; + + /** + * Key details provided by the user for rotate key operation for Autonomous Database. + * @param rotateAutonomousDatabaseEncryptionKeyDetails the value to set + * @return this builder instance + */ + public Builder rotateAutonomousDatabaseEncryptionKeyDetails( + com.oracle.bmc.database.model.RotateAutonomousDatabaseEncryptionKeyDetails + rotateAutonomousDatabaseEncryptionKeyDetails) { + this.rotateAutonomousDatabaseEncryptionKeyDetails = + rotateAutonomousDatabaseEncryptionKeyDetails; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -192,6 +236,8 @@ public Builder copy(RotateAutonomousDatabaseEncryptionKeyRequest o) { ifMatch(o.getIfMatch()); opcRetryToken(o.getOpcRetryToken()); opcRequestId(o.getOpcRequestId()); + rotateAutonomousDatabaseEncryptionKeyDetails( + o.getRotateAutonomousDatabaseEncryptionKeyDetails()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -214,6 +260,18 @@ public RotateAutonomousDatabaseEncryptionKeyRequest build() { return request; } + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.database.model.RotateAutonomousDatabaseEncryptionKeyDetails body) { + rotateAutonomousDatabaseEncryptionKeyDetails(body); + return this; + } + /** * Build the instance of RotateAutonomousDatabaseEncryptionKeyRequest as configured by this builder * @@ -229,8 +287,10 @@ public RotateAutonomousDatabaseEncryptionKeyRequest buildWithoutInvocationCallba request.ifMatch = ifMatch; request.opcRetryToken = opcRetryToken; request.opcRequestId = opcRequestId; + request.rotateAutonomousDatabaseEncryptionKeyDetails = + rotateAutonomousDatabaseEncryptionKeyDetails; return request; - // new RotateAutonomousDatabaseEncryptionKeyRequest(autonomousDatabaseId, ifMatch, opcRetryToken, opcRequestId); + // new RotateAutonomousDatabaseEncryptionKeyRequest(autonomousDatabaseId, ifMatch, opcRetryToken, opcRequestId, rotateAutonomousDatabaseEncryptionKeyDetails); } } @@ -243,7 +303,9 @@ public Builder toBuilder() { .autonomousDatabaseId(autonomousDatabaseId) .ifMatch(ifMatch) .opcRetryToken(opcRetryToken) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .rotateAutonomousDatabaseEncryptionKeyDetails( + rotateAutonomousDatabaseEncryptionKeyDetails); } /** @@ -263,6 +325,8 @@ public String toString() { sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",rotateAutonomousDatabaseEncryptionKeyDetails=") + .append(String.valueOf(this.rotateAutonomousDatabaseEncryptionKeyDetails)); sb.append(")"); return sb.toString(); } @@ -282,7 +346,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.autonomousDatabaseId, other.autonomousDatabaseId) && java.util.Objects.equals(this.ifMatch, other.ifMatch) && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.rotateAutonomousDatabaseEncryptionKeyDetails, + other.rotateAutonomousDatabaseEncryptionKeyDetails); } @Override @@ -299,6 +366,11 @@ public int hashCode() { (result * PRIME) + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.rotateAutonomousDatabaseEncryptionKeyDetails == null + ? 43 + : this.rotateAutonomousDatabaseEncryptionKeyDetails.hashCode()); return result; } } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/SetDbKeyVersionRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/SetDbKeyVersionRequest.java new file mode 100644 index 00000000000..71a591a2773 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/SetDbKeyVersionRequest.java @@ -0,0 +1,357 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use SetDbKeyVersionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class SetDbKeyVersionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.SetKeyVersionDetails> { + + /** + * The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String databaseId; + + /** + * The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getDatabaseId() { + return databaseId; + } + /** + * Requests Key Version Update. + */ + private com.oracle.bmc.database.model.SetKeyVersionDetails setKeyVersionDetails; + + /** + * Requests Key Version Update. + */ + public com.oracle.bmc.database.model.SetKeyVersionDetails getSetKeyVersionDetails() { + return setKeyVersionDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.SetKeyVersionDetails getBody$() { + return setKeyVersionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + SetDbKeyVersionRequest, com.oracle.bmc.database.model.SetKeyVersionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String databaseId = null; + + /** + * The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param databaseId the value to set + * @return this builder instance + */ + public Builder databaseId(String databaseId) { + this.databaseId = databaseId; + return this; + } + + /** + * Requests Key Version Update. + */ + private com.oracle.bmc.database.model.SetKeyVersionDetails setKeyVersionDetails = null; + + /** + * Requests Key Version Update. + * @param setKeyVersionDetails the value to set + * @return this builder instance + */ + public Builder setKeyVersionDetails( + com.oracle.bmc.database.model.SetKeyVersionDetails setKeyVersionDetails) { + this.setKeyVersionDetails = setKeyVersionDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SetDbKeyVersionRequest o) { + databaseId(o.getDatabaseId()); + setKeyVersionDetails(o.getSetKeyVersionDetails()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of SetDbKeyVersionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of SetDbKeyVersionRequest + */ + public SetDbKeyVersionRequest build() { + SetDbKeyVersionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.database.model.SetKeyVersionDetails body) { + setKeyVersionDetails(body); + return this; + } + + /** + * Build the instance of SetDbKeyVersionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of SetDbKeyVersionRequest + */ + public SetDbKeyVersionRequest buildWithoutInvocationCallback() { + SetDbKeyVersionRequest request = new SetDbKeyVersionRequest(); + request.databaseId = databaseId; + request.setKeyVersionDetails = setKeyVersionDetails; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new SetDbKeyVersionRequest(databaseId, setKeyVersionDetails, ifMatch, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .databaseId(databaseId) + .setKeyVersionDetails(setKeyVersionDetails) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",databaseId=").append(String.valueOf(this.databaseId)); + sb.append(",setKeyVersionDetails=").append(String.valueOf(this.setKeyVersionDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SetDbKeyVersionRequest)) { + return false; + } + + SetDbKeyVersionRequest other = (SetDbKeyVersionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.databaseId, other.databaseId) + && java.util.Objects.equals(this.setKeyVersionDetails, other.setKeyVersionDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.databaseId == null ? 43 : this.databaseId.hashCode()); + result = + (result * PRIME) + + (this.setKeyVersionDetails == null + ? 43 + : this.setKeyVersionDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/SetPdbKeyVersionRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/SetPdbKeyVersionRequest.java new file mode 100644 index 00000000000..17bb4cd7854 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/SetPdbKeyVersionRequest.java @@ -0,0 +1,361 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use SetPdbKeyVersionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class SetPdbKeyVersionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.SetKeyVersionDetails> { + + /** + * The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String pluggableDatabaseId; + + /** + * The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getPluggableDatabaseId() { + return pluggableDatabaseId; + } + /** + * Requests Key Version Update. + */ + private com.oracle.bmc.database.model.SetKeyVersionDetails setKeyVersionDetails; + + /** + * Requests Key Version Update. + */ + public com.oracle.bmc.database.model.SetKeyVersionDetails getSetKeyVersionDetails() { + return setKeyVersionDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.SetKeyVersionDetails getBody$() { + return setKeyVersionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + SetPdbKeyVersionRequest, com.oracle.bmc.database.model.SetKeyVersionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String pluggableDatabaseId = null; + + /** + * The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param pluggableDatabaseId the value to set + * @return this builder instance + */ + public Builder pluggableDatabaseId(String pluggableDatabaseId) { + this.pluggableDatabaseId = pluggableDatabaseId; + return this; + } + + /** + * Requests Key Version Update. + */ + private com.oracle.bmc.database.model.SetKeyVersionDetails setKeyVersionDetails = null; + + /** + * Requests Key Version Update. + * @param setKeyVersionDetails the value to set + * @return this builder instance + */ + public Builder setKeyVersionDetails( + com.oracle.bmc.database.model.SetKeyVersionDetails setKeyVersionDetails) { + this.setKeyVersionDetails = setKeyVersionDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SetPdbKeyVersionRequest o) { + pluggableDatabaseId(o.getPluggableDatabaseId()); + setKeyVersionDetails(o.getSetKeyVersionDetails()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of SetPdbKeyVersionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of SetPdbKeyVersionRequest + */ + public SetPdbKeyVersionRequest build() { + SetPdbKeyVersionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.database.model.SetKeyVersionDetails body) { + setKeyVersionDetails(body); + return this; + } + + /** + * Build the instance of SetPdbKeyVersionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of SetPdbKeyVersionRequest + */ + public SetPdbKeyVersionRequest buildWithoutInvocationCallback() { + SetPdbKeyVersionRequest request = new SetPdbKeyVersionRequest(); + request.pluggableDatabaseId = pluggableDatabaseId; + request.setKeyVersionDetails = setKeyVersionDetails; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new SetPdbKeyVersionRequest(pluggableDatabaseId, setKeyVersionDetails, ifMatch, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pluggableDatabaseId(pluggableDatabaseId) + .setKeyVersionDetails(setKeyVersionDetails) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pluggableDatabaseId=").append(String.valueOf(this.pluggableDatabaseId)); + sb.append(",setKeyVersionDetails=").append(String.valueOf(this.setKeyVersionDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SetPdbKeyVersionRequest)) { + return false; + } + + SetPdbKeyVersionRequest other = (SetPdbKeyVersionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pluggableDatabaseId, other.pluggableDatabaseId) + && java.util.Objects.equals(this.setKeyVersionDetails, other.setKeyVersionDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pluggableDatabaseId == null + ? 43 + : this.pluggableDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.setKeyVersionDetails == null + ? 43 + : this.setKeyVersionDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateExadbVmClusterRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateExadbVmClusterRequest.java new file mode 100644 index 00000000000..81e1c62d075 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateExadbVmClusterRequest.java @@ -0,0 +1,311 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use UpdateExadbVmClusterRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateExadbVmClusterRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.UpdateExadbVmClusterDetails> { + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + private String exadbVmClusterId; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + public String getExadbVmClusterId() { + return exadbVmClusterId; + } + /** + * Request to update the attributes of a Exadata VM cluster on Exascale Infrastructure. + */ + private com.oracle.bmc.database.model.UpdateExadbVmClusterDetails updateExadbVmClusterDetails; + + /** + * Request to update the attributes of a Exadata VM cluster on Exascale Infrastructure. + */ + public com.oracle.bmc.database.model.UpdateExadbVmClusterDetails + getUpdateExadbVmClusterDetails() { + return updateExadbVmClusterDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.UpdateExadbVmClusterDetails getBody$() { + return updateExadbVmClusterDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateExadbVmClusterRequest, + com.oracle.bmc.database.model.UpdateExadbVmClusterDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + */ + private String exadbVmClusterId = null; + + /** + * The Exadata VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) on Exascale Infrastructure. + * @param exadbVmClusterId the value to set + * @return this builder instance + */ + public Builder exadbVmClusterId(String exadbVmClusterId) { + this.exadbVmClusterId = exadbVmClusterId; + return this; + } + + /** + * Request to update the attributes of a Exadata VM cluster on Exascale Infrastructure. + */ + private com.oracle.bmc.database.model.UpdateExadbVmClusterDetails + updateExadbVmClusterDetails = null; + + /** + * Request to update the attributes of a Exadata VM cluster on Exascale Infrastructure. + * @param updateExadbVmClusterDetails the value to set + * @return this builder instance + */ + public Builder updateExadbVmClusterDetails( + com.oracle.bmc.database.model.UpdateExadbVmClusterDetails + updateExadbVmClusterDetails) { + this.updateExadbVmClusterDetails = updateExadbVmClusterDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateExadbVmClusterRequest o) { + exadbVmClusterId(o.getExadbVmClusterId()); + updateExadbVmClusterDetails(o.getUpdateExadbVmClusterDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateExadbVmClusterRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateExadbVmClusterRequest + */ + public UpdateExadbVmClusterRequest build() { + UpdateExadbVmClusterRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.database.model.UpdateExadbVmClusterDetails body) { + updateExadbVmClusterDetails(body); + return this; + } + + /** + * Build the instance of UpdateExadbVmClusterRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateExadbVmClusterRequest + */ + public UpdateExadbVmClusterRequest buildWithoutInvocationCallback() { + UpdateExadbVmClusterRequest request = new UpdateExadbVmClusterRequest(); + request.exadbVmClusterId = exadbVmClusterId; + request.updateExadbVmClusterDetails = updateExadbVmClusterDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateExadbVmClusterRequest(exadbVmClusterId, updateExadbVmClusterDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .exadbVmClusterId(exadbVmClusterId) + .updateExadbVmClusterDetails(updateExadbVmClusterDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",exadbVmClusterId=").append(String.valueOf(this.exadbVmClusterId)); + sb.append(",updateExadbVmClusterDetails=") + .append(String.valueOf(this.updateExadbVmClusterDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateExadbVmClusterRequest)) { + return false; + } + + UpdateExadbVmClusterRequest other = (UpdateExadbVmClusterRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.exadbVmClusterId, other.exadbVmClusterId) + && java.util.Objects.equals( + this.updateExadbVmClusterDetails, other.updateExadbVmClusterDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.exadbVmClusterId == null ? 43 : this.exadbVmClusterId.hashCode()); + result = + (result * PRIME) + + (this.updateExadbVmClusterDetails == null + ? 43 + : this.updateExadbVmClusterDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateExascaleDbStorageVaultRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateExascaleDbStorageVaultRequest.java new file mode 100644 index 00000000000..a8cef62844d --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateExascaleDbStorageVaultRequest.java @@ -0,0 +1,318 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use UpdateExascaleDbStorageVaultRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateExascaleDbStorageVaultRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.UpdateExascaleDbStorageVaultDetails> { + + /** + * The Exadata Database Storage Vault [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String exascaleDbStorageVaultId; + + /** + * The Exadata Database Storage Vault [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getExascaleDbStorageVaultId() { + return exascaleDbStorageVaultId; + } + /** + * Request to update the attributes of a Exadata Database Storage Vault. + */ + private com.oracle.bmc.database.model.UpdateExascaleDbStorageVaultDetails + updateExascaleDbStorageVaultDetails; + + /** + * Request to update the attributes of a Exadata Database Storage Vault. + */ + public com.oracle.bmc.database.model.UpdateExascaleDbStorageVaultDetails + getUpdateExascaleDbStorageVaultDetails() { + return updateExascaleDbStorageVaultDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.UpdateExascaleDbStorageVaultDetails getBody$() { + return updateExascaleDbStorageVaultDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateExascaleDbStorageVaultRequest, + com.oracle.bmc.database.model.UpdateExascaleDbStorageVaultDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Exadata Database Storage Vault [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String exascaleDbStorageVaultId = null; + + /** + * The Exadata Database Storage Vault [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param exascaleDbStorageVaultId the value to set + * @return this builder instance + */ + public Builder exascaleDbStorageVaultId(String exascaleDbStorageVaultId) { + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + return this; + } + + /** + * Request to update the attributes of a Exadata Database Storage Vault. + */ + private com.oracle.bmc.database.model.UpdateExascaleDbStorageVaultDetails + updateExascaleDbStorageVaultDetails = null; + + /** + * Request to update the attributes of a Exadata Database Storage Vault. + * @param updateExascaleDbStorageVaultDetails the value to set + * @return this builder instance + */ + public Builder updateExascaleDbStorageVaultDetails( + com.oracle.bmc.database.model.UpdateExascaleDbStorageVaultDetails + updateExascaleDbStorageVaultDetails) { + this.updateExascaleDbStorageVaultDetails = updateExascaleDbStorageVaultDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateExascaleDbStorageVaultRequest o) { + exascaleDbStorageVaultId(o.getExascaleDbStorageVaultId()); + updateExascaleDbStorageVaultDetails(o.getUpdateExascaleDbStorageVaultDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateExascaleDbStorageVaultRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateExascaleDbStorageVaultRequest + */ + public UpdateExascaleDbStorageVaultRequest build() { + UpdateExascaleDbStorageVaultRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.database.model.UpdateExascaleDbStorageVaultDetails body) { + updateExascaleDbStorageVaultDetails(body); + return this; + } + + /** + * Build the instance of UpdateExascaleDbStorageVaultRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateExascaleDbStorageVaultRequest + */ + public UpdateExascaleDbStorageVaultRequest buildWithoutInvocationCallback() { + UpdateExascaleDbStorageVaultRequest request = new UpdateExascaleDbStorageVaultRequest(); + request.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + request.updateExascaleDbStorageVaultDetails = updateExascaleDbStorageVaultDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateExascaleDbStorageVaultRequest(exascaleDbStorageVaultId, updateExascaleDbStorageVaultDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .exascaleDbStorageVaultId(exascaleDbStorageVaultId) + .updateExascaleDbStorageVaultDetails(updateExascaleDbStorageVaultDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",exascaleDbStorageVaultId=") + .append(String.valueOf(this.exascaleDbStorageVaultId)); + sb.append(",updateExascaleDbStorageVaultDetails=") + .append(String.valueOf(this.updateExascaleDbStorageVaultDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateExascaleDbStorageVaultRequest)) { + return false; + } + + UpdateExascaleDbStorageVaultRequest other = (UpdateExascaleDbStorageVaultRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.exascaleDbStorageVaultId, other.exascaleDbStorageVaultId) + && java.util.Objects.equals( + this.updateExascaleDbStorageVaultDetails, + other.updateExascaleDbStorageVaultDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.exascaleDbStorageVaultId == null + ? 43 + : this.exascaleDbStorageVaultId.hashCode()); + result = + (result * PRIME) + + (this.updateExascaleDbStorageVaultDetails == null + ? 43 + : this.updateExascaleDbStorageVaultDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateExecutionActionRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateExecutionActionRequest.java new file mode 100644 index 00000000000..1ebed7c424b --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateExecutionActionRequest.java @@ -0,0 +1,311 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use UpdateExecutionActionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateExecutionActionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.UpdateExecutionActionDetails> { + + /** + * The execution action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String executionActionId; + + /** + * The execution action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getExecutionActionId() { + return executionActionId; + } + /** + * Request to update the properties of a execution action. + */ + private com.oracle.bmc.database.model.UpdateExecutionActionDetails updateExecutionActionDetails; + + /** + * Request to update the properties of a execution action. + */ + public com.oracle.bmc.database.model.UpdateExecutionActionDetails + getUpdateExecutionActionDetails() { + return updateExecutionActionDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.UpdateExecutionActionDetails getBody$() { + return updateExecutionActionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateExecutionActionRequest, + com.oracle.bmc.database.model.UpdateExecutionActionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The execution action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String executionActionId = null; + + /** + * The execution action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param executionActionId the value to set + * @return this builder instance + */ + public Builder executionActionId(String executionActionId) { + this.executionActionId = executionActionId; + return this; + } + + /** + * Request to update the properties of a execution action. + */ + private com.oracle.bmc.database.model.UpdateExecutionActionDetails + updateExecutionActionDetails = null; + + /** + * Request to update the properties of a execution action. + * @param updateExecutionActionDetails the value to set + * @return this builder instance + */ + public Builder updateExecutionActionDetails( + com.oracle.bmc.database.model.UpdateExecutionActionDetails + updateExecutionActionDetails) { + this.updateExecutionActionDetails = updateExecutionActionDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateExecutionActionRequest o) { + executionActionId(o.getExecutionActionId()); + updateExecutionActionDetails(o.getUpdateExecutionActionDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateExecutionActionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateExecutionActionRequest + */ + public UpdateExecutionActionRequest build() { + UpdateExecutionActionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.database.model.UpdateExecutionActionDetails body) { + updateExecutionActionDetails(body); + return this; + } + + /** + * Build the instance of UpdateExecutionActionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateExecutionActionRequest + */ + public UpdateExecutionActionRequest buildWithoutInvocationCallback() { + UpdateExecutionActionRequest request = new UpdateExecutionActionRequest(); + request.executionActionId = executionActionId; + request.updateExecutionActionDetails = updateExecutionActionDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateExecutionActionRequest(executionActionId, updateExecutionActionDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .executionActionId(executionActionId) + .updateExecutionActionDetails(updateExecutionActionDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",executionActionId=").append(String.valueOf(this.executionActionId)); + sb.append(",updateExecutionActionDetails=") + .append(String.valueOf(this.updateExecutionActionDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateExecutionActionRequest)) { + return false; + } + + UpdateExecutionActionRequest other = (UpdateExecutionActionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.executionActionId, other.executionActionId) + && java.util.Objects.equals( + this.updateExecutionActionDetails, other.updateExecutionActionDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.executionActionId == null ? 43 : this.executionActionId.hashCode()); + result = + (result * PRIME) + + (this.updateExecutionActionDetails == null + ? 43 + : this.updateExecutionActionDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateExecutionWindowRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateExecutionWindowRequest.java new file mode 100644 index 00000000000..a29019a01d0 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateExecutionWindowRequest.java @@ -0,0 +1,311 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use UpdateExecutionWindowRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateExecutionWindowRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.UpdateExecutionWindowDetails> { + + /** + * The execution window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String executionWindowId; + + /** + * The execution window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getExecutionWindowId() { + return executionWindowId; + } + /** + * Request to update the properties of a execution window. + */ + private com.oracle.bmc.database.model.UpdateExecutionWindowDetails updateExecutionWindowDetails; + + /** + * Request to update the properties of a execution window. + */ + public com.oracle.bmc.database.model.UpdateExecutionWindowDetails + getUpdateExecutionWindowDetails() { + return updateExecutionWindowDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.UpdateExecutionWindowDetails getBody$() { + return updateExecutionWindowDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateExecutionWindowRequest, + com.oracle.bmc.database.model.UpdateExecutionWindowDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The execution window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String executionWindowId = null; + + /** + * The execution window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param executionWindowId the value to set + * @return this builder instance + */ + public Builder executionWindowId(String executionWindowId) { + this.executionWindowId = executionWindowId; + return this; + } + + /** + * Request to update the properties of a execution window. + */ + private com.oracle.bmc.database.model.UpdateExecutionWindowDetails + updateExecutionWindowDetails = null; + + /** + * Request to update the properties of a execution window. + * @param updateExecutionWindowDetails the value to set + * @return this builder instance + */ + public Builder updateExecutionWindowDetails( + com.oracle.bmc.database.model.UpdateExecutionWindowDetails + updateExecutionWindowDetails) { + this.updateExecutionWindowDetails = updateExecutionWindowDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateExecutionWindowRequest o) { + executionWindowId(o.getExecutionWindowId()); + updateExecutionWindowDetails(o.getUpdateExecutionWindowDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateExecutionWindowRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateExecutionWindowRequest + */ + public UpdateExecutionWindowRequest build() { + UpdateExecutionWindowRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.database.model.UpdateExecutionWindowDetails body) { + updateExecutionWindowDetails(body); + return this; + } + + /** + * Build the instance of UpdateExecutionWindowRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateExecutionWindowRequest + */ + public UpdateExecutionWindowRequest buildWithoutInvocationCallback() { + UpdateExecutionWindowRequest request = new UpdateExecutionWindowRequest(); + request.executionWindowId = executionWindowId; + request.updateExecutionWindowDetails = updateExecutionWindowDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateExecutionWindowRequest(executionWindowId, updateExecutionWindowDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .executionWindowId(executionWindowId) + .updateExecutionWindowDetails(updateExecutionWindowDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",executionWindowId=").append(String.valueOf(this.executionWindowId)); + sb.append(",updateExecutionWindowDetails=") + .append(String.valueOf(this.updateExecutionWindowDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateExecutionWindowRequest)) { + return false; + } + + UpdateExecutionWindowRequest other = (UpdateExecutionWindowRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.executionWindowId, other.executionWindowId) + && java.util.Objects.equals( + this.updateExecutionWindowDetails, other.updateExecutionWindowDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.executionWindowId == null ? 43 : this.executionWindowId.hashCode()); + result = + (result * PRIME) + + (this.updateExecutionWindowDetails == null + ? 43 + : this.updateExecutionWindowDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateScheduledActionRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateScheduledActionRequest.java new file mode 100644 index 00000000000..8d3ece5c2ee --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateScheduledActionRequest.java @@ -0,0 +1,311 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use UpdateScheduledActionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateScheduledActionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.UpdateScheduledActionDetails> { + + /** + * The Scheduled Action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String scheduledActionId; + + /** + * The Scheduled Action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getScheduledActionId() { + return scheduledActionId; + } + /** + * Request to update the properties of a Scheduled Action. + */ + private com.oracle.bmc.database.model.UpdateScheduledActionDetails updateScheduledActionDetails; + + /** + * Request to update the properties of a Scheduled Action. + */ + public com.oracle.bmc.database.model.UpdateScheduledActionDetails + getUpdateScheduledActionDetails() { + return updateScheduledActionDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.UpdateScheduledActionDetails getBody$() { + return updateScheduledActionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateScheduledActionRequest, + com.oracle.bmc.database.model.UpdateScheduledActionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Scheduled Action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String scheduledActionId = null; + + /** + * The Scheduled Action [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param scheduledActionId the value to set + * @return this builder instance + */ + public Builder scheduledActionId(String scheduledActionId) { + this.scheduledActionId = scheduledActionId; + return this; + } + + /** + * Request to update the properties of a Scheduled Action. + */ + private com.oracle.bmc.database.model.UpdateScheduledActionDetails + updateScheduledActionDetails = null; + + /** + * Request to update the properties of a Scheduled Action. + * @param updateScheduledActionDetails the value to set + * @return this builder instance + */ + public Builder updateScheduledActionDetails( + com.oracle.bmc.database.model.UpdateScheduledActionDetails + updateScheduledActionDetails) { + this.updateScheduledActionDetails = updateScheduledActionDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateScheduledActionRequest o) { + scheduledActionId(o.getScheduledActionId()); + updateScheduledActionDetails(o.getUpdateScheduledActionDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateScheduledActionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateScheduledActionRequest + */ + public UpdateScheduledActionRequest build() { + UpdateScheduledActionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.database.model.UpdateScheduledActionDetails body) { + updateScheduledActionDetails(body); + return this; + } + + /** + * Build the instance of UpdateScheduledActionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateScheduledActionRequest + */ + public UpdateScheduledActionRequest buildWithoutInvocationCallback() { + UpdateScheduledActionRequest request = new UpdateScheduledActionRequest(); + request.scheduledActionId = scheduledActionId; + request.updateScheduledActionDetails = updateScheduledActionDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateScheduledActionRequest(scheduledActionId, updateScheduledActionDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .scheduledActionId(scheduledActionId) + .updateScheduledActionDetails(updateScheduledActionDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",scheduledActionId=").append(String.valueOf(this.scheduledActionId)); + sb.append(",updateScheduledActionDetails=") + .append(String.valueOf(this.updateScheduledActionDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateScheduledActionRequest)) { + return false; + } + + UpdateScheduledActionRequest other = (UpdateScheduledActionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.scheduledActionId, other.scheduledActionId) + && java.util.Objects.equals( + this.updateScheduledActionDetails, other.updateScheduledActionDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.scheduledActionId == null ? 43 : this.scheduledActionId.hashCode()); + result = + (result * PRIME) + + (this.updateScheduledActionDetails == null + ? 43 + : this.updateScheduledActionDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateSchedulingPolicyRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateSchedulingPolicyRequest.java new file mode 100644 index 00000000000..3b3f633e48a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateSchedulingPolicyRequest.java @@ -0,0 +1,314 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use UpdateSchedulingPolicyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateSchedulingPolicyRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.UpdateSchedulingPolicyDetails> { + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPolicyId; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getSchedulingPolicyId() { + return schedulingPolicyId; + } + /** + * Request to update the properties of a Scheduling Policy. + */ + private com.oracle.bmc.database.model.UpdateSchedulingPolicyDetails + updateSchedulingPolicyDetails; + + /** + * Request to update the properties of a Scheduling Policy. + */ + public com.oracle.bmc.database.model.UpdateSchedulingPolicyDetails + getUpdateSchedulingPolicyDetails() { + return updateSchedulingPolicyDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.UpdateSchedulingPolicyDetails getBody$() { + return updateSchedulingPolicyDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateSchedulingPolicyRequest, + com.oracle.bmc.database.model.UpdateSchedulingPolicyDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPolicyId = null; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param schedulingPolicyId the value to set + * @return this builder instance + */ + public Builder schedulingPolicyId(String schedulingPolicyId) { + this.schedulingPolicyId = schedulingPolicyId; + return this; + } + + /** + * Request to update the properties of a Scheduling Policy. + */ + private com.oracle.bmc.database.model.UpdateSchedulingPolicyDetails + updateSchedulingPolicyDetails = null; + + /** + * Request to update the properties of a Scheduling Policy. + * @param updateSchedulingPolicyDetails the value to set + * @return this builder instance + */ + public Builder updateSchedulingPolicyDetails( + com.oracle.bmc.database.model.UpdateSchedulingPolicyDetails + updateSchedulingPolicyDetails) { + this.updateSchedulingPolicyDetails = updateSchedulingPolicyDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateSchedulingPolicyRequest o) { + schedulingPolicyId(o.getSchedulingPolicyId()); + updateSchedulingPolicyDetails(o.getUpdateSchedulingPolicyDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateSchedulingPolicyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateSchedulingPolicyRequest + */ + public UpdateSchedulingPolicyRequest build() { + UpdateSchedulingPolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.database.model.UpdateSchedulingPolicyDetails body) { + updateSchedulingPolicyDetails(body); + return this; + } + + /** + * Build the instance of UpdateSchedulingPolicyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateSchedulingPolicyRequest + */ + public UpdateSchedulingPolicyRequest buildWithoutInvocationCallback() { + UpdateSchedulingPolicyRequest request = new UpdateSchedulingPolicyRequest(); + request.schedulingPolicyId = schedulingPolicyId; + request.updateSchedulingPolicyDetails = updateSchedulingPolicyDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateSchedulingPolicyRequest(schedulingPolicyId, updateSchedulingPolicyDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulingPolicyId(schedulingPolicyId) + .updateSchedulingPolicyDetails(updateSchedulingPolicyDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulingPolicyId=").append(String.valueOf(this.schedulingPolicyId)); + sb.append(",updateSchedulingPolicyDetails=") + .append(String.valueOf(this.updateSchedulingPolicyDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSchedulingPolicyRequest)) { + return false; + } + + UpdateSchedulingPolicyRequest other = (UpdateSchedulingPolicyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulingPolicyId, other.schedulingPolicyId) + && java.util.Objects.equals( + this.updateSchedulingPolicyDetails, other.updateSchedulingPolicyDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulingPolicyId == null + ? 43 + : this.schedulingPolicyId.hashCode()); + result = + (result * PRIME) + + (this.updateSchedulingPolicyDetails == null + ? 43 + : this.updateSchedulingPolicyDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateSchedulingWindowRequest.java b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateSchedulingWindowRequest.java new file mode 100644 index 00000000000..5a82ce34502 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/requests/UpdateSchedulingWindowRequest.java @@ -0,0 +1,350 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.requests; + +import com.oracle.bmc.database.model.*; +/** + * Example: Click here to see how to use UpdateSchedulingWindowRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateSchedulingWindowRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.database.model.UpdateSchedulingWindowDetails> { + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPolicyId; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getSchedulingPolicyId() { + return schedulingPolicyId; + } + /** + * The Scheduling Window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingWindowId; + + /** + * The Scheduling Window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + public String getSchedulingWindowId() { + return schedulingWindowId; + } + /** + * Request to update the properties of a Scheduling Window. + */ + private com.oracle.bmc.database.model.UpdateSchedulingWindowDetails + updateSchedulingWindowDetails; + + /** + * Request to update the properties of a Scheduling Window. + */ + public com.oracle.bmc.database.model.UpdateSchedulingWindowDetails + getUpdateSchedulingWindowDetails() { + return updateSchedulingWindowDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.database.model.UpdateSchedulingWindowDetails getBody$() { + return updateSchedulingWindowDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateSchedulingWindowRequest, + com.oracle.bmc.database.model.UpdateSchedulingWindowDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingPolicyId = null; + + /** + * The Scheduling Policy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param schedulingPolicyId the value to set + * @return this builder instance + */ + public Builder schedulingPolicyId(String schedulingPolicyId) { + this.schedulingPolicyId = schedulingPolicyId; + return this; + } + + /** + * The Scheduling Window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + private String schedulingWindowId = null; + + /** + * The Scheduling Window [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param schedulingWindowId the value to set + * @return this builder instance + */ + public Builder schedulingWindowId(String schedulingWindowId) { + this.schedulingWindowId = schedulingWindowId; + return this; + } + + /** + * Request to update the properties of a Scheduling Window. + */ + private com.oracle.bmc.database.model.UpdateSchedulingWindowDetails + updateSchedulingWindowDetails = null; + + /** + * Request to update the properties of a Scheduling Window. + * @param updateSchedulingWindowDetails the value to set + * @return this builder instance + */ + public Builder updateSchedulingWindowDetails( + com.oracle.bmc.database.model.UpdateSchedulingWindowDetails + updateSchedulingWindowDetails) { + this.updateSchedulingWindowDetails = updateSchedulingWindowDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateSchedulingWindowRequest o) { + schedulingPolicyId(o.getSchedulingPolicyId()); + schedulingWindowId(o.getSchedulingWindowId()); + updateSchedulingWindowDetails(o.getUpdateSchedulingWindowDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateSchedulingWindowRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateSchedulingWindowRequest + */ + public UpdateSchedulingWindowRequest build() { + UpdateSchedulingWindowRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.database.model.UpdateSchedulingWindowDetails body) { + updateSchedulingWindowDetails(body); + return this; + } + + /** + * Build the instance of UpdateSchedulingWindowRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateSchedulingWindowRequest + */ + public UpdateSchedulingWindowRequest buildWithoutInvocationCallback() { + UpdateSchedulingWindowRequest request = new UpdateSchedulingWindowRequest(); + request.schedulingPolicyId = schedulingPolicyId; + request.schedulingWindowId = schedulingWindowId; + request.updateSchedulingWindowDetails = updateSchedulingWindowDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateSchedulingWindowRequest(schedulingPolicyId, schedulingWindowId, updateSchedulingWindowDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulingPolicyId(schedulingPolicyId) + .schedulingWindowId(schedulingWindowId) + .updateSchedulingWindowDetails(updateSchedulingWindowDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulingPolicyId=").append(String.valueOf(this.schedulingPolicyId)); + sb.append(",schedulingWindowId=").append(String.valueOf(this.schedulingWindowId)); + sb.append(",updateSchedulingWindowDetails=") + .append(String.valueOf(this.updateSchedulingWindowDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSchedulingWindowRequest)) { + return false; + } + + UpdateSchedulingWindowRequest other = (UpdateSchedulingWindowRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulingPolicyId, other.schedulingPolicyId) + && java.util.Objects.equals(this.schedulingWindowId, other.schedulingWindowId) + && java.util.Objects.equals( + this.updateSchedulingWindowDetails, other.updateSchedulingWindowDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulingPolicyId == null + ? 43 + : this.schedulingPolicyId.hashCode()); + result = + (result * PRIME) + + (this.schedulingWindowId == null + ? 43 + : this.schedulingWindowId.hashCode()); + result = + (result * PRIME) + + (this.updateSchedulingWindowDetails == null + ? 43 + : this.updateSchedulingWindowDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/CancelExecutionWindowResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CancelExecutionWindowResponse.java new file mode 100644 index 00000000000..c3dbad357ea --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CancelExecutionWindowResponse.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CancelExecutionWindowResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ExecutionWindow instance. + */ + private com.oracle.bmc.database.model.ExecutionWindow executionWindow; + + /** + * The returned ExecutionWindow instance. + * @return the value + */ + public com.oracle.bmc.database.model.ExecutionWindow getExecutionWindow() { + return executionWindow; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "etag", + "opcRequestId", + "executionWindow" + }) + private CancelExecutionWindowResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ExecutionWindow executionWindow) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.executionWindow = executionWindow; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ExecutionWindow instance. + */ + private com.oracle.bmc.database.model.ExecutionWindow executionWindow; + + /** + * The returned ExecutionWindow instance. + * @param executionWindow the value to set + * @return this builder + */ + public Builder executionWindow( + com.oracle.bmc.database.model.ExecutionWindow executionWindow) { + this.executionWindow = executionWindow; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CancelExecutionWindowResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + executionWindow(o.getExecutionWindow()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CancelExecutionWindowResponse build() { + return new CancelExecutionWindowResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + etag, + opcRequestId, + executionWindow); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",executionWindow=").append(String.valueOf(executionWindow)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CancelExecutionWindowResponse)) { + return false; + } + + CancelExecutionWindowResponse other = (CancelExecutionWindowResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.executionWindow, other.executionWindow); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.executionWindow == null ? 43 : this.executionWindow.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/CascadingDeleteSchedulingPlanResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CascadingDeleteSchedulingPlanResponse.java new file mode 100644 index 00000000000..d9179b4e69a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CascadingDeleteSchedulingPlanResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CascadingDeleteSchedulingPlanResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private CascadingDeleteSchedulingPlanResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CascadingDeleteSchedulingPlanResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CascadingDeleteSchedulingPlanResponse build() { + return new CascadingDeleteSchedulingPlanResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CascadingDeleteSchedulingPlanResponse)) { + return false; + } + + CascadingDeleteSchedulingPlanResponse other = (CascadingDeleteSchedulingPlanResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeAutonomousDatabaseSubscriptionResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeAutonomousDatabaseSubscriptionResponse.java new file mode 100644 index 00000000000..bbfae989511 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeAutonomousDatabaseSubscriptionResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeAutonomousDatabaseSubscriptionResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private ChangeAutonomousDatabaseSubscriptionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeAutonomousDatabaseSubscriptionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeAutonomousDatabaseSubscriptionResponse build() { + return new ChangeAutonomousDatabaseSubscriptionResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeAutonomousDatabaseSubscriptionResponse)) { + return false; + } + + ChangeAutonomousDatabaseSubscriptionResponse other = + (ChangeAutonomousDatabaseSubscriptionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeCloudExadataInfrastructureSubscriptionResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeCloudExadataInfrastructureSubscriptionResponse.java new file mode 100644 index 00000000000..95a3d63b175 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeCloudExadataInfrastructureSubscriptionResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeCloudExadataInfrastructureSubscriptionResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private ChangeCloudExadataInfrastructureSubscriptionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeCloudExadataInfrastructureSubscriptionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeCloudExadataInfrastructureSubscriptionResponse build() { + return new ChangeCloudExadataInfrastructureSubscriptionResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeCloudExadataInfrastructureSubscriptionResponse)) { + return false; + } + + ChangeCloudExadataInfrastructureSubscriptionResponse other = + (ChangeCloudExadataInfrastructureSubscriptionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeCloudVmClusterSubscriptionResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeCloudVmClusterSubscriptionResponse.java new file mode 100644 index 00000000000..da082f6a951 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeCloudVmClusterSubscriptionResponse.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeCloudVmClusterSubscriptionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private ChangeCloudVmClusterSubscriptionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeCloudVmClusterSubscriptionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeCloudVmClusterSubscriptionResponse build() { + return new ChangeCloudVmClusterSubscriptionResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeCloudVmClusterSubscriptionResponse)) { + return false; + } + + ChangeCloudVmClusterSubscriptionResponse other = + (ChangeCloudVmClusterSubscriptionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeExadbVmClusterCompartmentResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeExadbVmClusterCompartmentResponse.java new file mode 100644 index 00000000000..426e3619959 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeExadbVmClusterCompartmentResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeExadbVmClusterCompartmentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private ChangeExadbVmClusterCompartmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeExadbVmClusterCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeExadbVmClusterCompartmentResponse build() { + return new ChangeExadbVmClusterCompartmentResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeExadbVmClusterCompartmentResponse)) { + return false; + } + + ChangeExadbVmClusterCompartmentResponse other = (ChangeExadbVmClusterCompartmentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeExascaleDbStorageVaultCompartmentResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeExascaleDbStorageVaultCompartmentResponse.java new file mode 100644 index 00000000000..6da358faf7f --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeExascaleDbStorageVaultCompartmentResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeExascaleDbStorageVaultCompartmentResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private ChangeExascaleDbStorageVaultCompartmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeExascaleDbStorageVaultCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeExascaleDbStorageVaultCompartmentResponse build() { + return new ChangeExascaleDbStorageVaultCompartmentResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeExascaleDbStorageVaultCompartmentResponse)) { + return false; + } + + ChangeExascaleDbStorageVaultCompartmentResponse other = + (ChangeExascaleDbStorageVaultCompartmentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeSchedulingPlanCompartmentResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeSchedulingPlanCompartmentResponse.java new file mode 100644 index 00000000000..df5473a89c2 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeSchedulingPlanCompartmentResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeSchedulingPlanCompartmentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private ChangeSchedulingPlanCompartmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeSchedulingPlanCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeSchedulingPlanCompartmentResponse build() { + return new ChangeSchedulingPlanCompartmentResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeSchedulingPlanCompartmentResponse)) { + return false; + } + + ChangeSchedulingPlanCompartmentResponse other = (ChangeSchedulingPlanCompartmentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeSchedulingPolicyCompartmentResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeSchedulingPolicyCompartmentResponse.java new file mode 100644 index 00000000000..7d8becef16a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ChangeSchedulingPolicyCompartmentResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ChangeSchedulingPolicyCompartmentResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private ChangeSchedulingPolicyCompartmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeSchedulingPolicyCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeSchedulingPolicyCompartmentResponse build() { + return new ChangeSchedulingPolicyCompartmentResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeSchedulingPolicyCompartmentResponse)) { + return false; + } + + ChangeSchedulingPolicyCompartmentResponse other = + (ChangeSchedulingPolicyCompartmentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ConfigureExascaleExadataInfrastructureResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ConfigureExascaleExadataInfrastructureResponse.java new file mode 100644 index 00000000000..c5a03d40b88 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ConfigureExascaleExadataInfrastructureResponse.java @@ -0,0 +1,260 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ConfigureExascaleExadataInfrastructureResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ExadataInfrastructure instance. + */ + private com.oracle.bmc.database.model.ExadataInfrastructure exadataInfrastructure; + + /** + * The returned ExadataInfrastructure instance. + * @return the value + */ + public com.oracle.bmc.database.model.ExadataInfrastructure getExadataInfrastructure() { + return exadataInfrastructure; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "etag", + "opcRequestId", + "exadataInfrastructure" + }) + private ConfigureExascaleExadataInfrastructureResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ExadataInfrastructure exadataInfrastructure) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.exadataInfrastructure = exadataInfrastructure; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ExadataInfrastructure instance. + */ + private com.oracle.bmc.database.model.ExadataInfrastructure exadataInfrastructure; + + /** + * The returned ExadataInfrastructure instance. + * @param exadataInfrastructure the value to set + * @return this builder + */ + public Builder exadataInfrastructure( + com.oracle.bmc.database.model.ExadataInfrastructure exadataInfrastructure) { + this.exadataInfrastructure = exadataInfrastructure; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ConfigureExascaleExadataInfrastructureResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + exadataInfrastructure(o.getExadataInfrastructure()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ConfigureExascaleExadataInfrastructureResponse build() { + return new ConfigureExascaleExadataInfrastructureResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + etag, + opcRequestId, + exadataInfrastructure); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",exadataInfrastructure=").append(String.valueOf(exadataInfrastructure)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfigureExascaleExadataInfrastructureResponse)) { + return false; + } + + ConfigureExascaleExadataInfrastructureResponse other = + (ConfigureExascaleExadataInfrastructureResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.exadataInfrastructure, other.exadataInfrastructure); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.exadataInfrastructure == null + ? 43 + : this.exadataInfrastructure.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ConfirmKeyStoreDetailsAreCorrectResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ConfirmKeyStoreDetailsAreCorrectResponse.java new file mode 100644 index 00000000000..46ef3e85615 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ConfirmKeyStoreDetailsAreCorrectResponse.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ConfirmKeyStoreDetailsAreCorrectResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private ConfirmKeyStoreDetailsAreCorrectResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ConfirmKeyStoreDetailsAreCorrectResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ConfirmKeyStoreDetailsAreCorrectResponse build() { + return new ConfirmKeyStoreDetailsAreCorrectResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfirmKeyStoreDetailsAreCorrectResponse)) { + return false; + } + + ConfirmKeyStoreDetailsAreCorrectResponse other = + (ConfirmKeyStoreDetailsAreCorrectResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateExadbVmClusterResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateExadbVmClusterResponse.java new file mode 100644 index 00000000000..ddb956c17ca --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateExadbVmClusterResponse.java @@ -0,0 +1,254 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateExadbVmClusterResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ExadbVmCluster instance. + */ + private com.oracle.bmc.database.model.ExadbVmCluster exadbVmCluster; + + /** + * The returned ExadbVmCluster instance. + * @return the value + */ + public com.oracle.bmc.database.model.ExadbVmCluster getExadbVmCluster() { + return exadbVmCluster; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "etag", + "opcRequestId", + "exadbVmCluster" + }) + private CreateExadbVmClusterResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ExadbVmCluster exadbVmCluster) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.exadbVmCluster = exadbVmCluster; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ExadbVmCluster instance. + */ + private com.oracle.bmc.database.model.ExadbVmCluster exadbVmCluster; + + /** + * The returned ExadbVmCluster instance. + * @param exadbVmCluster the value to set + * @return this builder + */ + public Builder exadbVmCluster(com.oracle.bmc.database.model.ExadbVmCluster exadbVmCluster) { + this.exadbVmCluster = exadbVmCluster; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateExadbVmClusterResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + exadbVmCluster(o.getExadbVmCluster()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateExadbVmClusterResponse build() { + return new CreateExadbVmClusterResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + etag, + opcRequestId, + exadbVmCluster); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",exadbVmCluster=").append(String.valueOf(exadbVmCluster)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateExadbVmClusterResponse)) { + return false; + } + + CreateExadbVmClusterResponse other = (CreateExadbVmClusterResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.exadbVmCluster, other.exadbVmCluster); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.exadbVmCluster == null ? 43 : this.exadbVmCluster.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateExascaleDbStorageVaultResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateExascaleDbStorageVaultResponse.java new file mode 100644 index 00000000000..e2cd26a2a39 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateExascaleDbStorageVaultResponse.java @@ -0,0 +1,258 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateExascaleDbStorageVaultResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ExascaleDbStorageVault instance. + */ + private com.oracle.bmc.database.model.ExascaleDbStorageVault exascaleDbStorageVault; + + /** + * The returned ExascaleDbStorageVault instance. + * @return the value + */ + public com.oracle.bmc.database.model.ExascaleDbStorageVault getExascaleDbStorageVault() { + return exascaleDbStorageVault; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "etag", + "opcRequestId", + "exascaleDbStorageVault" + }) + private CreateExascaleDbStorageVaultResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ExascaleDbStorageVault exascaleDbStorageVault) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.exascaleDbStorageVault = exascaleDbStorageVault; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ExascaleDbStorageVault instance. + */ + private com.oracle.bmc.database.model.ExascaleDbStorageVault exascaleDbStorageVault; + + /** + * The returned ExascaleDbStorageVault instance. + * @param exascaleDbStorageVault the value to set + * @return this builder + */ + public Builder exascaleDbStorageVault( + com.oracle.bmc.database.model.ExascaleDbStorageVault exascaleDbStorageVault) { + this.exascaleDbStorageVault = exascaleDbStorageVault; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateExascaleDbStorageVaultResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + exascaleDbStorageVault(o.getExascaleDbStorageVault()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateExascaleDbStorageVaultResponse build() { + return new CreateExascaleDbStorageVaultResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + etag, + opcRequestId, + exascaleDbStorageVault); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",exascaleDbStorageVault=").append(String.valueOf(exascaleDbStorageVault)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateExascaleDbStorageVaultResponse)) { + return false; + } + + CreateExascaleDbStorageVaultResponse other = (CreateExascaleDbStorageVaultResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.exascaleDbStorageVault, other.exascaleDbStorageVault); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.exascaleDbStorageVault == null + ? 43 + : this.exascaleDbStorageVault.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateExecutionActionResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateExecutionActionResponse.java new file mode 100644 index 00000000000..ca75a0f0828 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateExecutionActionResponse.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateExecutionActionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ExecutionAction instance. + */ + private com.oracle.bmc.database.model.ExecutionAction executionAction; + + /** + * The returned ExecutionAction instance. + * @return the value + */ + public com.oracle.bmc.database.model.ExecutionAction getExecutionAction() { + return executionAction; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "etag", + "opcRequestId", + "executionAction" + }) + private CreateExecutionActionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ExecutionAction executionAction) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.executionAction = executionAction; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ExecutionAction instance. + */ + private com.oracle.bmc.database.model.ExecutionAction executionAction; + + /** + * The returned ExecutionAction instance. + * @param executionAction the value to set + * @return this builder + */ + public Builder executionAction( + com.oracle.bmc.database.model.ExecutionAction executionAction) { + this.executionAction = executionAction; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateExecutionActionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + executionAction(o.getExecutionAction()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateExecutionActionResponse build() { + return new CreateExecutionActionResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + etag, + opcRequestId, + executionAction); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",executionAction=").append(String.valueOf(executionAction)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateExecutionActionResponse)) { + return false; + } + + CreateExecutionActionResponse other = (CreateExecutionActionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.executionAction, other.executionAction); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.executionAction == null ? 43 : this.executionAction.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateExecutionWindowResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateExecutionWindowResponse.java new file mode 100644 index 00000000000..23a589c6988 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateExecutionWindowResponse.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateExecutionWindowResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ExecutionWindow instance. + */ + private com.oracle.bmc.database.model.ExecutionWindow executionWindow; + + /** + * The returned ExecutionWindow instance. + * @return the value + */ + public com.oracle.bmc.database.model.ExecutionWindow getExecutionWindow() { + return executionWindow; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "etag", + "opcRequestId", + "executionWindow" + }) + private CreateExecutionWindowResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ExecutionWindow executionWindow) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.executionWindow = executionWindow; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ExecutionWindow instance. + */ + private com.oracle.bmc.database.model.ExecutionWindow executionWindow; + + /** + * The returned ExecutionWindow instance. + * @param executionWindow the value to set + * @return this builder + */ + public Builder executionWindow( + com.oracle.bmc.database.model.ExecutionWindow executionWindow) { + this.executionWindow = executionWindow; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateExecutionWindowResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + executionWindow(o.getExecutionWindow()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateExecutionWindowResponse build() { + return new CreateExecutionWindowResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + etag, + opcRequestId, + executionWindow); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",executionWindow=").append(String.valueOf(executionWindow)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateExecutionWindowResponse)) { + return false; + } + + CreateExecutionWindowResponse other = (CreateExecutionWindowResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.executionWindow, other.executionWindow); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.executionWindow == null ? 43 : this.executionWindow.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateScheduledActionResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateScheduledActionResponse.java new file mode 100644 index 00000000000..80c8450c44a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateScheduledActionResponse.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateScheduledActionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ScheduledAction instance. + */ + private com.oracle.bmc.database.model.ScheduledAction scheduledAction; + + /** + * The returned ScheduledAction instance. + * @return the value + */ + public com.oracle.bmc.database.model.ScheduledAction getScheduledAction() { + return scheduledAction; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "etag", + "opcRequestId", + "scheduledAction" + }) + private CreateScheduledActionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ScheduledAction scheduledAction) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.scheduledAction = scheduledAction; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ScheduledAction instance. + */ + private com.oracle.bmc.database.model.ScheduledAction scheduledAction; + + /** + * The returned ScheduledAction instance. + * @param scheduledAction the value to set + * @return this builder + */ + public Builder scheduledAction( + com.oracle.bmc.database.model.ScheduledAction scheduledAction) { + this.scheduledAction = scheduledAction; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateScheduledActionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + scheduledAction(o.getScheduledAction()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateScheduledActionResponse build() { + return new CreateScheduledActionResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + etag, + opcRequestId, + scheduledAction); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",scheduledAction=").append(String.valueOf(scheduledAction)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateScheduledActionResponse)) { + return false; + } + + CreateScheduledActionResponse other = (CreateScheduledActionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.scheduledAction, other.scheduledAction); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.scheduledAction == null ? 43 : this.scheduledAction.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateSchedulingPlanResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateSchedulingPlanResponse.java new file mode 100644 index 00000000000..ac9fc4e1d63 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateSchedulingPlanResponse.java @@ -0,0 +1,254 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateSchedulingPlanResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned SchedulingPlan instance. + */ + private com.oracle.bmc.database.model.SchedulingPlan schedulingPlan; + + /** + * The returned SchedulingPlan instance. + * @return the value + */ + public com.oracle.bmc.database.model.SchedulingPlan getSchedulingPlan() { + return schedulingPlan; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "etag", + "opcRequestId", + "schedulingPlan" + }) + private CreateSchedulingPlanResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.SchedulingPlan schedulingPlan) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.schedulingPlan = schedulingPlan; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned SchedulingPlan instance. + */ + private com.oracle.bmc.database.model.SchedulingPlan schedulingPlan; + + /** + * The returned SchedulingPlan instance. + * @param schedulingPlan the value to set + * @return this builder + */ + public Builder schedulingPlan(com.oracle.bmc.database.model.SchedulingPlan schedulingPlan) { + this.schedulingPlan = schedulingPlan; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateSchedulingPlanResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + schedulingPlan(o.getSchedulingPlan()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateSchedulingPlanResponse build() { + return new CreateSchedulingPlanResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + etag, + opcRequestId, + schedulingPlan); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",schedulingPlan=").append(String.valueOf(schedulingPlan)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSchedulingPlanResponse)) { + return false; + } + + CreateSchedulingPlanResponse other = (CreateSchedulingPlanResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.schedulingPlan, other.schedulingPlan); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.schedulingPlan == null ? 43 : this.schedulingPlan.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateSchedulingPolicyResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateSchedulingPolicyResponse.java new file mode 100644 index 00000000000..e74c5ef6f5d --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateSchedulingPolicyResponse.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateSchedulingPolicyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned SchedulingPolicy instance. + */ + private com.oracle.bmc.database.model.SchedulingPolicy schedulingPolicy; + + /** + * The returned SchedulingPolicy instance. + * @return the value + */ + public com.oracle.bmc.database.model.SchedulingPolicy getSchedulingPolicy() { + return schedulingPolicy; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "etag", + "opcRequestId", + "schedulingPolicy" + }) + private CreateSchedulingPolicyResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.SchedulingPolicy schedulingPolicy) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.schedulingPolicy = schedulingPolicy; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned SchedulingPolicy instance. + */ + private com.oracle.bmc.database.model.SchedulingPolicy schedulingPolicy; + + /** + * The returned SchedulingPolicy instance. + * @param schedulingPolicy the value to set + * @return this builder + */ + public Builder schedulingPolicy( + com.oracle.bmc.database.model.SchedulingPolicy schedulingPolicy) { + this.schedulingPolicy = schedulingPolicy; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateSchedulingPolicyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + schedulingPolicy(o.getSchedulingPolicy()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateSchedulingPolicyResponse build() { + return new CreateSchedulingPolicyResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + etag, + opcRequestId, + schedulingPolicy); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",schedulingPolicy=").append(String.valueOf(schedulingPolicy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSchedulingPolicyResponse)) { + return false; + } + + CreateSchedulingPolicyResponse other = (CreateSchedulingPolicyResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.schedulingPolicy, other.schedulingPolicy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.schedulingPolicy == null ? 43 : this.schedulingPolicy.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateSchedulingWindowResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateSchedulingWindowResponse.java new file mode 100644 index 00000000000..ae20a3369c7 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/CreateSchedulingWindowResponse.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreateSchedulingWindowResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned SchedulingWindow instance. + */ + private com.oracle.bmc.database.model.SchedulingWindow schedulingWindow; + + /** + * The returned SchedulingWindow instance. + * @return the value + */ + public com.oracle.bmc.database.model.SchedulingWindow getSchedulingWindow() { + return schedulingWindow; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "etag", + "opcRequestId", + "schedulingWindow" + }) + private CreateSchedulingWindowResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.SchedulingWindow schedulingWindow) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.schedulingWindow = schedulingWindow; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned SchedulingWindow instance. + */ + private com.oracle.bmc.database.model.SchedulingWindow schedulingWindow; + + /** + * The returned SchedulingWindow instance. + * @param schedulingWindow the value to set + * @return this builder + */ + public Builder schedulingWindow( + com.oracle.bmc.database.model.SchedulingWindow schedulingWindow) { + this.schedulingWindow = schedulingWindow; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateSchedulingWindowResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + schedulingWindow(o.getSchedulingWindow()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateSchedulingWindowResponse build() { + return new CreateSchedulingWindowResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + etag, + opcRequestId, + schedulingWindow); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",schedulingWindow=").append(String.valueOf(schedulingWindow)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSchedulingWindowResponse)) { + return false; + } + + CreateSchedulingWindowResponse other = (CreateSchedulingWindowResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.schedulingWindow, other.schedulingWindow); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.schedulingWindow == null ? 43 : this.schedulingWindow.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteExadbVmClusterResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteExadbVmClusterResponse.java new file mode 100644 index 00000000000..b0e7a2e2a5d --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteExadbVmClusterResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteExadbVmClusterResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteExadbVmClusterResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteExadbVmClusterResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteExadbVmClusterResponse build() { + return new DeleteExadbVmClusterResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteExadbVmClusterResponse)) { + return false; + } + + DeleteExadbVmClusterResponse other = (DeleteExadbVmClusterResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteExascaleDbStorageVaultResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteExascaleDbStorageVaultResponse.java new file mode 100644 index 00000000000..94c495fdf3e --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteExascaleDbStorageVaultResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteExascaleDbStorageVaultResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteExascaleDbStorageVaultResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteExascaleDbStorageVaultResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteExascaleDbStorageVaultResponse build() { + return new DeleteExascaleDbStorageVaultResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteExascaleDbStorageVaultResponse)) { + return false; + } + + DeleteExascaleDbStorageVaultResponse other = (DeleteExascaleDbStorageVaultResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteExecutionActionResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteExecutionActionResponse.java new file mode 100644 index 00000000000..3407db445a4 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteExecutionActionResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteExecutionActionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteExecutionActionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteExecutionActionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteExecutionActionResponse build() { + return new DeleteExecutionActionResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteExecutionActionResponse)) { + return false; + } + + DeleteExecutionActionResponse other = (DeleteExecutionActionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteExecutionWindowResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteExecutionWindowResponse.java new file mode 100644 index 00000000000..7f2f047e231 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteExecutionWindowResponse.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteExecutionWindowResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeleteExecutionWindowResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteExecutionWindowResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteExecutionWindowResponse build() { + return new DeleteExecutionWindowResponse(__httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteExecutionWindowResponse)) { + return false; + } + + DeleteExecutionWindowResponse other = (DeleteExecutionWindowResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteScheduledActionResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteScheduledActionResponse.java new file mode 100644 index 00000000000..73f4bb47659 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteScheduledActionResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteScheduledActionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteScheduledActionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteScheduledActionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteScheduledActionResponse build() { + return new DeleteScheduledActionResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteScheduledActionResponse)) { + return false; + } + + DeleteScheduledActionResponse other = (DeleteScheduledActionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteSchedulingPlanResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteSchedulingPlanResponse.java new file mode 100644 index 00000000000..7f6d015af9f --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteSchedulingPlanResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteSchedulingPlanResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteSchedulingPlanResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteSchedulingPlanResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteSchedulingPlanResponse build() { + return new DeleteSchedulingPlanResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSchedulingPlanResponse)) { + return false; + } + + DeleteSchedulingPlanResponse other = (DeleteSchedulingPlanResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteSchedulingPolicyResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteSchedulingPolicyResponse.java new file mode 100644 index 00000000000..ec0fa334ef3 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteSchedulingPolicyResponse.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteSchedulingPolicyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeleteSchedulingPolicyResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteSchedulingPolicyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteSchedulingPolicyResponse build() { + return new DeleteSchedulingPolicyResponse(__httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSchedulingPolicyResponse)) { + return false; + } + + DeleteSchedulingPolicyResponse other = (DeleteSchedulingPolicyResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteSchedulingWindowResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteSchedulingWindowResponse.java new file mode 100644 index 00000000000..3eb722ca1eb --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/DeleteSchedulingWindowResponse.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeleteSchedulingWindowResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeleteSchedulingWindowResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteSchedulingWindowResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteSchedulingWindowResponse build() { + return new DeleteSchedulingWindowResponse(__httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSchedulingWindowResponse)) { + return false; + } + + DeleteSchedulingWindowResponse other = (DeleteSchedulingWindowResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetExadbVmClusterResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetExadbVmClusterResponse.java new file mode 100644 index 00000000000..c019f6dfda0 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetExadbVmClusterResponse.java @@ -0,0 +1,208 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetExadbVmClusterResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ExadbVmCluster instance. + */ + private com.oracle.bmc.database.model.ExadbVmCluster exadbVmCluster; + + /** + * The returned ExadbVmCluster instance. + * @return the value + */ + public com.oracle.bmc.database.model.ExadbVmCluster getExadbVmCluster() { + return exadbVmCluster; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "exadbVmCluster" + }) + private GetExadbVmClusterResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ExadbVmCluster exadbVmCluster) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.exadbVmCluster = exadbVmCluster; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ExadbVmCluster instance. + */ + private com.oracle.bmc.database.model.ExadbVmCluster exadbVmCluster; + + /** + * The returned ExadbVmCluster instance. + * @param exadbVmCluster the value to set + * @return this builder + */ + public Builder exadbVmCluster(com.oracle.bmc.database.model.ExadbVmCluster exadbVmCluster) { + this.exadbVmCluster = exadbVmCluster; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetExadbVmClusterResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + exadbVmCluster(o.getExadbVmCluster()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetExadbVmClusterResponse build() { + return new GetExadbVmClusterResponse( + __httpStatusCode__, headers, etag, opcRequestId, exadbVmCluster); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",exadbVmCluster=").append(String.valueOf(exadbVmCluster)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetExadbVmClusterResponse)) { + return false; + } + + GetExadbVmClusterResponse other = (GetExadbVmClusterResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.exadbVmCluster, other.exadbVmCluster); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.exadbVmCluster == null ? 43 : this.exadbVmCluster.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetExadbVmClusterUpdateHistoryEntryResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetExadbVmClusterUpdateHistoryEntryResponse.java new file mode 100644 index 00000000000..dd0afb663c0 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetExadbVmClusterUpdateHistoryEntryResponse.java @@ -0,0 +1,225 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetExadbVmClusterUpdateHistoryEntryResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ExadbVmClusterUpdateHistoryEntry instance. + */ + private com.oracle.bmc.database.model.ExadbVmClusterUpdateHistoryEntry + exadbVmClusterUpdateHistoryEntry; + + /** + * The returned ExadbVmClusterUpdateHistoryEntry instance. + * @return the value + */ + public com.oracle.bmc.database.model.ExadbVmClusterUpdateHistoryEntry + getExadbVmClusterUpdateHistoryEntry() { + return exadbVmClusterUpdateHistoryEntry; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "exadbVmClusterUpdateHistoryEntry" + }) + private GetExadbVmClusterUpdateHistoryEntryResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ExadbVmClusterUpdateHistoryEntry + exadbVmClusterUpdateHistoryEntry) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.exadbVmClusterUpdateHistoryEntry = exadbVmClusterUpdateHistoryEntry; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ExadbVmClusterUpdateHistoryEntry instance. + */ + private com.oracle.bmc.database.model.ExadbVmClusterUpdateHistoryEntry + exadbVmClusterUpdateHistoryEntry; + + /** + * The returned ExadbVmClusterUpdateHistoryEntry instance. + * @param exadbVmClusterUpdateHistoryEntry the value to set + * @return this builder + */ + public Builder exadbVmClusterUpdateHistoryEntry( + com.oracle.bmc.database.model.ExadbVmClusterUpdateHistoryEntry + exadbVmClusterUpdateHistoryEntry) { + this.exadbVmClusterUpdateHistoryEntry = exadbVmClusterUpdateHistoryEntry; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetExadbVmClusterUpdateHistoryEntryResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + exadbVmClusterUpdateHistoryEntry(o.getExadbVmClusterUpdateHistoryEntry()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetExadbVmClusterUpdateHistoryEntryResponse build() { + return new GetExadbVmClusterUpdateHistoryEntryResponse( + __httpStatusCode__, + headers, + etag, + opcRequestId, + exadbVmClusterUpdateHistoryEntry); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",exadbVmClusterUpdateHistoryEntry=") + .append(String.valueOf(exadbVmClusterUpdateHistoryEntry)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetExadbVmClusterUpdateHistoryEntryResponse)) { + return false; + } + + GetExadbVmClusterUpdateHistoryEntryResponse other = + (GetExadbVmClusterUpdateHistoryEntryResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.exadbVmClusterUpdateHistoryEntry, + other.exadbVmClusterUpdateHistoryEntry); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.exadbVmClusterUpdateHistoryEntry == null + ? 43 + : this.exadbVmClusterUpdateHistoryEntry.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetExadbVmClusterUpdateResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetExadbVmClusterUpdateResponse.java new file mode 100644 index 00000000000..33dbbf2fffd --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetExadbVmClusterUpdateResponse.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetExadbVmClusterUpdateResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ExadbVmClusterUpdate instance. + */ + private com.oracle.bmc.database.model.ExadbVmClusterUpdate exadbVmClusterUpdate; + + /** + * The returned ExadbVmClusterUpdate instance. + * @return the value + */ + public com.oracle.bmc.database.model.ExadbVmClusterUpdate getExadbVmClusterUpdate() { + return exadbVmClusterUpdate; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "exadbVmClusterUpdate" + }) + private GetExadbVmClusterUpdateResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + com.oracle.bmc.database.model.ExadbVmClusterUpdate exadbVmClusterUpdate) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.exadbVmClusterUpdate = exadbVmClusterUpdate; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ExadbVmClusterUpdate instance. + */ + private com.oracle.bmc.database.model.ExadbVmClusterUpdate exadbVmClusterUpdate; + + /** + * The returned ExadbVmClusterUpdate instance. + * @param exadbVmClusterUpdate the value to set + * @return this builder + */ + public Builder exadbVmClusterUpdate( + com.oracle.bmc.database.model.ExadbVmClusterUpdate exadbVmClusterUpdate) { + this.exadbVmClusterUpdate = exadbVmClusterUpdate; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetExadbVmClusterUpdateResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + exadbVmClusterUpdate(o.getExadbVmClusterUpdate()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetExadbVmClusterUpdateResponse build() { + return new GetExadbVmClusterUpdateResponse( + __httpStatusCode__, headers, opcRequestId, exadbVmClusterUpdate); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",exadbVmClusterUpdate=").append(String.valueOf(exadbVmClusterUpdate)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetExadbVmClusterUpdateResponse)) { + return false; + } + + GetExadbVmClusterUpdateResponse other = (GetExadbVmClusterUpdateResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.exadbVmClusterUpdate, other.exadbVmClusterUpdate); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.exadbVmClusterUpdate == null + ? 43 + : this.exadbVmClusterUpdate.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetExascaleDbStorageVaultResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetExascaleDbStorageVaultResponse.java new file mode 100644 index 00000000000..2150dc97931 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetExascaleDbStorageVaultResponse.java @@ -0,0 +1,212 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetExascaleDbStorageVaultResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ExascaleDbStorageVault instance. + */ + private com.oracle.bmc.database.model.ExascaleDbStorageVault exascaleDbStorageVault; + + /** + * The returned ExascaleDbStorageVault instance. + * @return the value + */ + public com.oracle.bmc.database.model.ExascaleDbStorageVault getExascaleDbStorageVault() { + return exascaleDbStorageVault; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "exascaleDbStorageVault" + }) + private GetExascaleDbStorageVaultResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ExascaleDbStorageVault exascaleDbStorageVault) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.exascaleDbStorageVault = exascaleDbStorageVault; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ExascaleDbStorageVault instance. + */ + private com.oracle.bmc.database.model.ExascaleDbStorageVault exascaleDbStorageVault; + + /** + * The returned ExascaleDbStorageVault instance. + * @param exascaleDbStorageVault the value to set + * @return this builder + */ + public Builder exascaleDbStorageVault( + com.oracle.bmc.database.model.ExascaleDbStorageVault exascaleDbStorageVault) { + this.exascaleDbStorageVault = exascaleDbStorageVault; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetExascaleDbStorageVaultResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + exascaleDbStorageVault(o.getExascaleDbStorageVault()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetExascaleDbStorageVaultResponse build() { + return new GetExascaleDbStorageVaultResponse( + __httpStatusCode__, headers, etag, opcRequestId, exascaleDbStorageVault); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",exascaleDbStorageVault=").append(String.valueOf(exascaleDbStorageVault)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetExascaleDbStorageVaultResponse)) { + return false; + } + + GetExascaleDbStorageVaultResponse other = (GetExascaleDbStorageVaultResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.exascaleDbStorageVault, other.exascaleDbStorageVault); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.exascaleDbStorageVault == null + ? 43 + : this.exascaleDbStorageVault.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetExecutionActionResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetExecutionActionResponse.java new file mode 100644 index 00000000000..230a5b91299 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetExecutionActionResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetExecutionActionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ExecutionAction instance. + */ + private com.oracle.bmc.database.model.ExecutionAction executionAction; + + /** + * The returned ExecutionAction instance. + * @return the value + */ + public com.oracle.bmc.database.model.ExecutionAction getExecutionAction() { + return executionAction; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "executionAction" + }) + private GetExecutionActionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ExecutionAction executionAction) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.executionAction = executionAction; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ExecutionAction instance. + */ + private com.oracle.bmc.database.model.ExecutionAction executionAction; + + /** + * The returned ExecutionAction instance. + * @param executionAction the value to set + * @return this builder + */ + public Builder executionAction( + com.oracle.bmc.database.model.ExecutionAction executionAction) { + this.executionAction = executionAction; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetExecutionActionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + executionAction(o.getExecutionAction()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetExecutionActionResponse build() { + return new GetExecutionActionResponse( + __httpStatusCode__, headers, etag, opcRequestId, executionAction); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",executionAction=").append(String.valueOf(executionAction)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetExecutionActionResponse)) { + return false; + } + + GetExecutionActionResponse other = (GetExecutionActionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.executionAction, other.executionAction); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.executionAction == null ? 43 : this.executionAction.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetExecutionWindowResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetExecutionWindowResponse.java new file mode 100644 index 00000000000..dd03490f3e7 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetExecutionWindowResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetExecutionWindowResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ExecutionWindow instance. + */ + private com.oracle.bmc.database.model.ExecutionWindow executionWindow; + + /** + * The returned ExecutionWindow instance. + * @return the value + */ + public com.oracle.bmc.database.model.ExecutionWindow getExecutionWindow() { + return executionWindow; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "executionWindow" + }) + private GetExecutionWindowResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ExecutionWindow executionWindow) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.executionWindow = executionWindow; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ExecutionWindow instance. + */ + private com.oracle.bmc.database.model.ExecutionWindow executionWindow; + + /** + * The returned ExecutionWindow instance. + * @param executionWindow the value to set + * @return this builder + */ + public Builder executionWindow( + com.oracle.bmc.database.model.ExecutionWindow executionWindow) { + this.executionWindow = executionWindow; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetExecutionWindowResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + executionWindow(o.getExecutionWindow()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetExecutionWindowResponse build() { + return new GetExecutionWindowResponse( + __httpStatusCode__, headers, etag, opcRequestId, executionWindow); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",executionWindow=").append(String.valueOf(executionWindow)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetExecutionWindowResponse)) { + return false; + } + + GetExecutionWindowResponse other = (GetExecutionWindowResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.executionWindow, other.executionWindow); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.executionWindow == null ? 43 : this.executionWindow.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetScheduledActionResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetScheduledActionResponse.java new file mode 100644 index 00000000000..d8af9ffc508 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetScheduledActionResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetScheduledActionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ScheduledAction instance. + */ + private com.oracle.bmc.database.model.ScheduledAction scheduledAction; + + /** + * The returned ScheduledAction instance. + * @return the value + */ + public com.oracle.bmc.database.model.ScheduledAction getScheduledAction() { + return scheduledAction; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "scheduledAction" + }) + private GetScheduledActionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ScheduledAction scheduledAction) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.scheduledAction = scheduledAction; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ScheduledAction instance. + */ + private com.oracle.bmc.database.model.ScheduledAction scheduledAction; + + /** + * The returned ScheduledAction instance. + * @param scheduledAction the value to set + * @return this builder + */ + public Builder scheduledAction( + com.oracle.bmc.database.model.ScheduledAction scheduledAction) { + this.scheduledAction = scheduledAction; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetScheduledActionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + scheduledAction(o.getScheduledAction()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetScheduledActionResponse build() { + return new GetScheduledActionResponse( + __httpStatusCode__, headers, etag, opcRequestId, scheduledAction); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",scheduledAction=").append(String.valueOf(scheduledAction)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetScheduledActionResponse)) { + return false; + } + + GetScheduledActionResponse other = (GetScheduledActionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.scheduledAction, other.scheduledAction); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.scheduledAction == null ? 43 : this.scheduledAction.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetSchedulingPlanResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetSchedulingPlanResponse.java new file mode 100644 index 00000000000..b8c9717ab24 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetSchedulingPlanResponse.java @@ -0,0 +1,208 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetSchedulingPlanResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned SchedulingPlan instance. + */ + private com.oracle.bmc.database.model.SchedulingPlan schedulingPlan; + + /** + * The returned SchedulingPlan instance. + * @return the value + */ + public com.oracle.bmc.database.model.SchedulingPlan getSchedulingPlan() { + return schedulingPlan; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "schedulingPlan" + }) + private GetSchedulingPlanResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.SchedulingPlan schedulingPlan) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.schedulingPlan = schedulingPlan; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned SchedulingPlan instance. + */ + private com.oracle.bmc.database.model.SchedulingPlan schedulingPlan; + + /** + * The returned SchedulingPlan instance. + * @param schedulingPlan the value to set + * @return this builder + */ + public Builder schedulingPlan(com.oracle.bmc.database.model.SchedulingPlan schedulingPlan) { + this.schedulingPlan = schedulingPlan; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSchedulingPlanResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + schedulingPlan(o.getSchedulingPlan()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetSchedulingPlanResponse build() { + return new GetSchedulingPlanResponse( + __httpStatusCode__, headers, etag, opcRequestId, schedulingPlan); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",schedulingPlan=").append(String.valueOf(schedulingPlan)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSchedulingPlanResponse)) { + return false; + } + + GetSchedulingPlanResponse other = (GetSchedulingPlanResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.schedulingPlan, other.schedulingPlan); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.schedulingPlan == null ? 43 : this.schedulingPlan.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetSchedulingPolicyResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetSchedulingPolicyResponse.java new file mode 100644 index 00000000000..6f81c80981a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetSchedulingPolicyResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetSchedulingPolicyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned SchedulingPolicy instance. + */ + private com.oracle.bmc.database.model.SchedulingPolicy schedulingPolicy; + + /** + * The returned SchedulingPolicy instance. + * @return the value + */ + public com.oracle.bmc.database.model.SchedulingPolicy getSchedulingPolicy() { + return schedulingPolicy; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "schedulingPolicy" + }) + private GetSchedulingPolicyResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.SchedulingPolicy schedulingPolicy) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.schedulingPolicy = schedulingPolicy; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned SchedulingPolicy instance. + */ + private com.oracle.bmc.database.model.SchedulingPolicy schedulingPolicy; + + /** + * The returned SchedulingPolicy instance. + * @param schedulingPolicy the value to set + * @return this builder + */ + public Builder schedulingPolicy( + com.oracle.bmc.database.model.SchedulingPolicy schedulingPolicy) { + this.schedulingPolicy = schedulingPolicy; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSchedulingPolicyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + schedulingPolicy(o.getSchedulingPolicy()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetSchedulingPolicyResponse build() { + return new GetSchedulingPolicyResponse( + __httpStatusCode__, headers, etag, opcRequestId, schedulingPolicy); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",schedulingPolicy=").append(String.valueOf(schedulingPolicy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSchedulingPolicyResponse)) { + return false; + } + + GetSchedulingPolicyResponse other = (GetSchedulingPolicyResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.schedulingPolicy, other.schedulingPolicy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.schedulingPolicy == null ? 43 : this.schedulingPolicy.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetSchedulingWindowResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetSchedulingWindowResponse.java new file mode 100644 index 00000000000..aa482d70004 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/GetSchedulingWindowResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetSchedulingWindowResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned SchedulingWindow instance. + */ + private com.oracle.bmc.database.model.SchedulingWindow schedulingWindow; + + /** + * The returned SchedulingWindow instance. + * @return the value + */ + public com.oracle.bmc.database.model.SchedulingWindow getSchedulingWindow() { + return schedulingWindow; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "schedulingWindow" + }) + private GetSchedulingWindowResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.SchedulingWindow schedulingWindow) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.schedulingWindow = schedulingWindow; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned SchedulingWindow instance. + */ + private com.oracle.bmc.database.model.SchedulingWindow schedulingWindow; + + /** + * The returned SchedulingWindow instance. + * @param schedulingWindow the value to set + * @return this builder + */ + public Builder schedulingWindow( + com.oracle.bmc.database.model.SchedulingWindow schedulingWindow) { + this.schedulingWindow = schedulingWindow; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSchedulingWindowResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + schedulingWindow(o.getSchedulingWindow()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetSchedulingWindowResponse build() { + return new GetSchedulingWindowResponse( + __httpStatusCode__, headers, etag, opcRequestId, schedulingWindow); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",schedulingWindow=").append(String.valueOf(schedulingWindow)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSchedulingWindowResponse)) { + return false; + } + + GetSchedulingWindowResponse other = (GetSchedulingWindowResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.schedulingWindow, other.schedulingWindow); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.schedulingWindow == null ? 43 : this.schedulingWindow.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListExadbVmClusterUpdateHistoryEntriesResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListExadbVmClusterUpdateHistoryEntriesResponse.java new file mode 100644 index 00000000000..893a463da5b --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListExadbVmClusterUpdateHistoryEntriesResponse.java @@ -0,0 +1,233 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListExadbVmClusterUpdateHistoryEntriesResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of com.oracle.bmc.database.model.ExadbVmClusterUpdateHistoryEntrySummary instances. + */ + private java.util.List + items; + + /** + * A list of com.oracle.bmc.database.model.ExadbVmClusterUpdateHistoryEntrySummary instances. + * @return the value + */ + public java.util.List + getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "items" + }) + private ListExadbVmClusterUpdateHistoryEntriesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + java.util.List + items) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of com.oracle.bmc.database.model.ExadbVmClusterUpdateHistoryEntrySummary instances. + */ + private java.util.List< + com.oracle.bmc.database.model.ExadbVmClusterUpdateHistoryEntrySummary> + items; + + /** + * A list of com.oracle.bmc.database.model.ExadbVmClusterUpdateHistoryEntrySummary instances. + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List< + com.oracle.bmc.database.model + .ExadbVmClusterUpdateHistoryEntrySummary> + items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListExadbVmClusterUpdateHistoryEntriesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListExadbVmClusterUpdateHistoryEntriesResponse build() { + return new ListExadbVmClusterUpdateHistoryEntriesResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, items); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListExadbVmClusterUpdateHistoryEntriesResponse)) { + return false; + } + + ListExadbVmClusterUpdateHistoryEntriesResponse other = + (ListExadbVmClusterUpdateHistoryEntriesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListExadbVmClusterUpdatesResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListExadbVmClusterUpdatesResponse.java new file mode 100644 index 00000000000..65015160ff2 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListExadbVmClusterUpdatesResponse.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListExadbVmClusterUpdatesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of com.oracle.bmc.database.model.ExadbVmClusterUpdateSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.database.model.ExadbVmClusterUpdateSummary instances. + * @return the value + */ + public java.util.List getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "items" + }) + private ListExadbVmClusterUpdatesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + java.util.List items) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of com.oracle.bmc.database.model.ExadbVmClusterUpdateSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.database.model.ExadbVmClusterUpdateSummary instances. + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListExadbVmClusterUpdatesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListExadbVmClusterUpdatesResponse build() { + return new ListExadbVmClusterUpdatesResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, items); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListExadbVmClusterUpdatesResponse)) { + return false; + } + + ListExadbVmClusterUpdatesResponse other = (ListExadbVmClusterUpdatesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListExadbVmClustersResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListExadbVmClustersResponse.java new file mode 100644 index 00000000000..b7341aa8240 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListExadbVmClustersResponse.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListExadbVmClustersResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of com.oracle.bmc.database.model.ExadbVmClusterSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.database.model.ExadbVmClusterSummary instances. + * @return the value + */ + public java.util.List getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "items" + }) + private ListExadbVmClustersResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + java.util.List items) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of com.oracle.bmc.database.model.ExadbVmClusterSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.database.model.ExadbVmClusterSummary instances. + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListExadbVmClustersResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListExadbVmClustersResponse build() { + return new ListExadbVmClustersResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, items); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListExadbVmClustersResponse)) { + return false; + } + + ListExadbVmClustersResponse other = (ListExadbVmClustersResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListExascaleDbStorageVaultsResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListExascaleDbStorageVaultsResponse.java new file mode 100644 index 00000000000..2bb7cdaad91 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListExascaleDbStorageVaultsResponse.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListExascaleDbStorageVaultsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of com.oracle.bmc.database.model.ExascaleDbStorageVaultSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.database.model.ExascaleDbStorageVaultSummary instances. + * @return the value + */ + public java.util.List getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "items" + }) + private ListExascaleDbStorageVaultsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + java.util.List items) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of com.oracle.bmc.database.model.ExascaleDbStorageVaultSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.database.model.ExascaleDbStorageVaultSummary instances. + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListExascaleDbStorageVaultsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListExascaleDbStorageVaultsResponse build() { + return new ListExascaleDbStorageVaultsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, items); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListExascaleDbStorageVaultsResponse)) { + return false; + } + + ListExascaleDbStorageVaultsResponse other = (ListExascaleDbStorageVaultsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListExecutionActionsResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListExecutionActionsResponse.java new file mode 100644 index 00000000000..fb50acce0e0 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListExecutionActionsResponse.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListExecutionActionsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of com.oracle.bmc.database.model.ExecutionActionSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.database.model.ExecutionActionSummary instances. + * @return the value + */ + public java.util.List getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "items" + }) + private ListExecutionActionsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + java.util.List items) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of com.oracle.bmc.database.model.ExecutionActionSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.database.model.ExecutionActionSummary instances. + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListExecutionActionsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListExecutionActionsResponse build() { + return new ListExecutionActionsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, items); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListExecutionActionsResponse)) { + return false; + } + + ListExecutionActionsResponse other = (ListExecutionActionsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListExecutionWindowsResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListExecutionWindowsResponse.java new file mode 100644 index 00000000000..e5fedb0e1f9 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListExecutionWindowsResponse.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListExecutionWindowsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of com.oracle.bmc.database.model.ExecutionWindowSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.database.model.ExecutionWindowSummary instances. + * @return the value + */ + public java.util.List getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "items" + }) + private ListExecutionWindowsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + java.util.List items) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of com.oracle.bmc.database.model.ExecutionWindowSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.database.model.ExecutionWindowSummary instances. + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListExecutionWindowsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListExecutionWindowsResponse build() { + return new ListExecutionWindowsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, items); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListExecutionWindowsResponse)) { + return false; + } + + ListExecutionWindowsResponse other = (ListExecutionWindowsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListGiVersionMinorVersionsResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListGiVersionMinorVersionsResponse.java new file mode 100644 index 00000000000..abc513df013 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListGiVersionMinorVersionsResponse.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListGiVersionMinorVersionsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of com.oracle.bmc.database.model.GiMinorVersionSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.database.model.GiMinorVersionSummary instances. + * @return the value + */ + public java.util.List getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "items" + }) + private ListGiVersionMinorVersionsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + java.util.List items) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of com.oracle.bmc.database.model.GiMinorVersionSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.database.model.GiMinorVersionSummary instances. + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListGiVersionMinorVersionsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListGiVersionMinorVersionsResponse build() { + return new ListGiVersionMinorVersionsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, items); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListGiVersionMinorVersionsResponse)) { + return false; + } + + ListGiVersionMinorVersionsResponse other = (ListGiVersionMinorVersionsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListParamsForActionTypeResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListParamsForActionTypeResponse.java new file mode 100644 index 00000000000..39ac42af287 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListParamsForActionTypeResponse.java @@ -0,0 +1,236 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListParamsForActionTypeResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned ActionParamValuesCollection instance. + */ + private com.oracle.bmc.database.model.ActionParamValuesCollection actionParamValuesCollection; + + /** + * The returned ActionParamValuesCollection instance. + * @return the value + */ + public com.oracle.bmc.database.model.ActionParamValuesCollection + getActionParamValuesCollection() { + return actionParamValuesCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "actionParamValuesCollection" + }) + private ListParamsForActionTypeResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.database.model.ActionParamValuesCollection actionParamValuesCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.actionParamValuesCollection = actionParamValuesCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned ActionParamValuesCollection instance. + */ + private com.oracle.bmc.database.model.ActionParamValuesCollection + actionParamValuesCollection; + + /** + * The returned ActionParamValuesCollection instance. + * @param actionParamValuesCollection the value to set + * @return this builder + */ + public Builder actionParamValuesCollection( + com.oracle.bmc.database.model.ActionParamValuesCollection + actionParamValuesCollection) { + this.actionParamValuesCollection = actionParamValuesCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListParamsForActionTypeResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + actionParamValuesCollection(o.getActionParamValuesCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListParamsForActionTypeResponse build() { + return new ListParamsForActionTypeResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + actionParamValuesCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",actionParamValuesCollection=") + .append(String.valueOf(actionParamValuesCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListParamsForActionTypeResponse)) { + return false; + } + + ListParamsForActionTypeResponse other = (ListParamsForActionTypeResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.actionParamValuesCollection, other.actionParamValuesCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.actionParamValuesCollection == null + ? 43 + : this.actionParamValuesCollection.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListRecommendedScheduledActionsResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListRecommendedScheduledActionsResponse.java new file mode 100644 index 00000000000..28735f2455a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListRecommendedScheduledActionsResponse.java @@ -0,0 +1,239 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListRecommendedScheduledActionsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned RecommendedScheduledActionsCollection instance. + */ + private com.oracle.bmc.database.model.RecommendedScheduledActionsCollection + recommendedScheduledActionsCollection; + + /** + * The returned RecommendedScheduledActionsCollection instance. + * @return the value + */ + public com.oracle.bmc.database.model.RecommendedScheduledActionsCollection + getRecommendedScheduledActionsCollection() { + return recommendedScheduledActionsCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "recommendedScheduledActionsCollection" + }) + private ListRecommendedScheduledActionsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.database.model.RecommendedScheduledActionsCollection + recommendedScheduledActionsCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.recommendedScheduledActionsCollection = recommendedScheduledActionsCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned RecommendedScheduledActionsCollection instance. + */ + private com.oracle.bmc.database.model.RecommendedScheduledActionsCollection + recommendedScheduledActionsCollection; + + /** + * The returned RecommendedScheduledActionsCollection instance. + * @param recommendedScheduledActionsCollection the value to set + * @return this builder + */ + public Builder recommendedScheduledActionsCollection( + com.oracle.bmc.database.model.RecommendedScheduledActionsCollection + recommendedScheduledActionsCollection) { + this.recommendedScheduledActionsCollection = recommendedScheduledActionsCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListRecommendedScheduledActionsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + recommendedScheduledActionsCollection(o.getRecommendedScheduledActionsCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListRecommendedScheduledActionsResponse build() { + return new ListRecommendedScheduledActionsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + recommendedScheduledActionsCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",recommendedScheduledActionsCollection=") + .append(String.valueOf(recommendedScheduledActionsCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListRecommendedScheduledActionsResponse)) { + return false; + } + + ListRecommendedScheduledActionsResponse other = (ListRecommendedScheduledActionsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.recommendedScheduledActionsCollection, + other.recommendedScheduledActionsCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.recommendedScheduledActionsCollection == null + ? 43 + : this.recommendedScheduledActionsCollection.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListScheduledActionsResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListScheduledActionsResponse.java new file mode 100644 index 00000000000..6c446324783 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListScheduledActionsResponse.java @@ -0,0 +1,232 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListScheduledActionsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned ScheduledActionCollection instance. + */ + private com.oracle.bmc.database.model.ScheduledActionCollection scheduledActionCollection; + + /** + * The returned ScheduledActionCollection instance. + * @return the value + */ + public com.oracle.bmc.database.model.ScheduledActionCollection getScheduledActionCollection() { + return scheduledActionCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "scheduledActionCollection" + }) + private ListScheduledActionsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.database.model.ScheduledActionCollection scheduledActionCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.scheduledActionCollection = scheduledActionCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned ScheduledActionCollection instance. + */ + private com.oracle.bmc.database.model.ScheduledActionCollection scheduledActionCollection; + + /** + * The returned ScheduledActionCollection instance. + * @param scheduledActionCollection the value to set + * @return this builder + */ + public Builder scheduledActionCollection( + com.oracle.bmc.database.model.ScheduledActionCollection scheduledActionCollection) { + this.scheduledActionCollection = scheduledActionCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListScheduledActionsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + scheduledActionCollection(o.getScheduledActionCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListScheduledActionsResponse build() { + return new ListScheduledActionsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + scheduledActionCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",scheduledActionCollection=").append(String.valueOf(scheduledActionCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListScheduledActionsResponse)) { + return false; + } + + ListScheduledActionsResponse other = (ListScheduledActionsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.scheduledActionCollection, other.scheduledActionCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.scheduledActionCollection == null + ? 43 + : this.scheduledActionCollection.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListSchedulingPlansResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListSchedulingPlansResponse.java new file mode 100644 index 00000000000..7f3c15fa902 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListSchedulingPlansResponse.java @@ -0,0 +1,232 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListSchedulingPlansResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned SchedulingPlanCollection instance. + */ + private com.oracle.bmc.database.model.SchedulingPlanCollection schedulingPlanCollection; + + /** + * The returned SchedulingPlanCollection instance. + * @return the value + */ + public com.oracle.bmc.database.model.SchedulingPlanCollection getSchedulingPlanCollection() { + return schedulingPlanCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "schedulingPlanCollection" + }) + private ListSchedulingPlansResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.database.model.SchedulingPlanCollection schedulingPlanCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.schedulingPlanCollection = schedulingPlanCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned SchedulingPlanCollection instance. + */ + private com.oracle.bmc.database.model.SchedulingPlanCollection schedulingPlanCollection; + + /** + * The returned SchedulingPlanCollection instance. + * @param schedulingPlanCollection the value to set + * @return this builder + */ + public Builder schedulingPlanCollection( + com.oracle.bmc.database.model.SchedulingPlanCollection schedulingPlanCollection) { + this.schedulingPlanCollection = schedulingPlanCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSchedulingPlansResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + schedulingPlanCollection(o.getSchedulingPlanCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListSchedulingPlansResponse build() { + return new ListSchedulingPlansResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + schedulingPlanCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",schedulingPlanCollection=").append(String.valueOf(schedulingPlanCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSchedulingPlansResponse)) { + return false; + } + + ListSchedulingPlansResponse other = (ListSchedulingPlansResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.schedulingPlanCollection, other.schedulingPlanCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.schedulingPlanCollection == null + ? 43 + : this.schedulingPlanCollection.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListSchedulingPoliciesResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListSchedulingPoliciesResponse.java new file mode 100644 index 00000000000..c5ba1a3e592 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListSchedulingPoliciesResponse.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListSchedulingPoliciesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of com.oracle.bmc.database.model.SchedulingPolicySummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.database.model.SchedulingPolicySummary instances. + * @return the value + */ + public java.util.List getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "items" + }) + private ListSchedulingPoliciesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + java.util.List items) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of com.oracle.bmc.database.model.SchedulingPolicySummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.database.model.SchedulingPolicySummary instances. + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSchedulingPoliciesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListSchedulingPoliciesResponse build() { + return new ListSchedulingPoliciesResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, items); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSchedulingPoliciesResponse)) { + return false; + } + + ListSchedulingPoliciesResponse other = (ListSchedulingPoliciesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListSchedulingWindowsResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListSchedulingWindowsResponse.java new file mode 100644 index 00000000000..04526050ebe --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ListSchedulingWindowsResponse.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListSchedulingWindowsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of com.oracle.bmc.database.model.SchedulingWindowSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.database.model.SchedulingWindowSummary instances. + * @return the value + */ + public java.util.List getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "items" + }) + private ListSchedulingWindowsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + java.util.List items) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of com.oracle.bmc.database.model.SchedulingWindowSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.database.model.SchedulingWindowSummary instances. + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSchedulingWindowsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListSchedulingWindowsResponse build() { + return new ListSchedulingWindowsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, items); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSchedulingWindowsResponse)) { + return false; + } + + ListSchedulingWindowsResponse other = (ListSchedulingWindowsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/MoveExecutionActionMemberResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/MoveExecutionActionMemberResponse.java new file mode 100644 index 00000000000..aa04d4a6e61 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/MoveExecutionActionMemberResponse.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class MoveExecutionActionMemberResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ExecutionAction instance. + */ + private com.oracle.bmc.database.model.ExecutionAction executionAction; + + /** + * The returned ExecutionAction instance. + * @return the value + */ + public com.oracle.bmc.database.model.ExecutionAction getExecutionAction() { + return executionAction; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "etag", + "opcRequestId", + "executionAction" + }) + private MoveExecutionActionMemberResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ExecutionAction executionAction) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.executionAction = executionAction; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ExecutionAction instance. + */ + private com.oracle.bmc.database.model.ExecutionAction executionAction; + + /** + * The returned ExecutionAction instance. + * @param executionAction the value to set + * @return this builder + */ + public Builder executionAction( + com.oracle.bmc.database.model.ExecutionAction executionAction) { + this.executionAction = executionAction; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(MoveExecutionActionMemberResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + executionAction(o.getExecutionAction()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public MoveExecutionActionMemberResponse build() { + return new MoveExecutionActionMemberResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + etag, + opcRequestId, + executionAction); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",executionAction=").append(String.valueOf(executionAction)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MoveExecutionActionMemberResponse)) { + return false; + } + + MoveExecutionActionMemberResponse other = (MoveExecutionActionMemberResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.executionAction, other.executionAction); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.executionAction == null ? 43 : this.executionAction.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/RemoveVirtualMachineFromExadbVmClusterResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/RemoveVirtualMachineFromExadbVmClusterResponse.java new file mode 100644 index 00000000000..587bb170797 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/RemoveVirtualMachineFromExadbVmClusterResponse.java @@ -0,0 +1,256 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class RemoveVirtualMachineFromExadbVmClusterResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ExadbVmCluster instance. + */ + private com.oracle.bmc.database.model.ExadbVmCluster exadbVmCluster; + + /** + * The returned ExadbVmCluster instance. + * @return the value + */ + public com.oracle.bmc.database.model.ExadbVmCluster getExadbVmCluster() { + return exadbVmCluster; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "etag", + "opcRequestId", + "exadbVmCluster" + }) + private RemoveVirtualMachineFromExadbVmClusterResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ExadbVmCluster exadbVmCluster) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.exadbVmCluster = exadbVmCluster; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ExadbVmCluster instance. + */ + private com.oracle.bmc.database.model.ExadbVmCluster exadbVmCluster; + + /** + * The returned ExadbVmCluster instance. + * @param exadbVmCluster the value to set + * @return this builder + */ + public Builder exadbVmCluster(com.oracle.bmc.database.model.ExadbVmCluster exadbVmCluster) { + this.exadbVmCluster = exadbVmCluster; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveVirtualMachineFromExadbVmClusterResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + exadbVmCluster(o.getExadbVmCluster()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RemoveVirtualMachineFromExadbVmClusterResponse build() { + return new RemoveVirtualMachineFromExadbVmClusterResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + etag, + opcRequestId, + exadbVmCluster); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",exadbVmCluster=").append(String.valueOf(exadbVmCluster)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveVirtualMachineFromExadbVmClusterResponse)) { + return false; + } + + RemoveVirtualMachineFromExadbVmClusterResponse other = + (RemoveVirtualMachineFromExadbVmClusterResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.exadbVmCluster, other.exadbVmCluster); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.exadbVmCluster == null ? 43 : this.exadbVmCluster.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ReorderExecutionActionsResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ReorderExecutionActionsResponse.java new file mode 100644 index 00000000000..b3464b351f3 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ReorderExecutionActionsResponse.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ReorderExecutionActionsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ExecutionWindow instance. + */ + private com.oracle.bmc.database.model.ExecutionWindow executionWindow; + + /** + * The returned ExecutionWindow instance. + * @return the value + */ + public com.oracle.bmc.database.model.ExecutionWindow getExecutionWindow() { + return executionWindow; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "etag", + "opcRequestId", + "executionWindow" + }) + private ReorderExecutionActionsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ExecutionWindow executionWindow) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.executionWindow = executionWindow; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ExecutionWindow instance. + */ + private com.oracle.bmc.database.model.ExecutionWindow executionWindow; + + /** + * The returned ExecutionWindow instance. + * @param executionWindow the value to set + * @return this builder + */ + public Builder executionWindow( + com.oracle.bmc.database.model.ExecutionWindow executionWindow) { + this.executionWindow = executionWindow; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ReorderExecutionActionsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + executionWindow(o.getExecutionWindow()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ReorderExecutionActionsResponse build() { + return new ReorderExecutionActionsResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + etag, + opcRequestId, + executionWindow); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",executionWindow=").append(String.valueOf(executionWindow)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ReorderExecutionActionsResponse)) { + return false; + } + + ReorderExecutionActionsResponse other = (ReorderExecutionActionsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.executionWindow, other.executionWindow); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.executionWindow == null ? 43 : this.executionWindow.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/ReorderScheduledActionsResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ReorderScheduledActionsResponse.java new file mode 100644 index 00000000000..6b45a0601d2 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/ReorderScheduledActionsResponse.java @@ -0,0 +1,306 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ReorderScheduledActionsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * The returned SchedulingPlan instance. + */ + private com.oracle.bmc.database.model.SchedulingPlan schedulingPlan; + + /** + * The returned SchedulingPlan instance. + * @return the value + */ + public com.oracle.bmc.database.model.SchedulingPlan getSchedulingPlan() { + return schedulingPlan; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "opcNextPage", + "opcWorkRequestId", + "schedulingPlan" + }) + private ReorderScheduledActionsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + String opcNextPage, + String opcWorkRequestId, + com.oracle.bmc.database.model.SchedulingPlan schedulingPlan) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.opcWorkRequestId = opcWorkRequestId; + this.schedulingPlan = schedulingPlan; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then there are additional items still to get. Include this value as the {@code page} parameter for the + * subsequent GET request. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * The returned SchedulingPlan instance. + */ + private com.oracle.bmc.database.model.SchedulingPlan schedulingPlan; + + /** + * The returned SchedulingPlan instance. + * @param schedulingPlan the value to set + * @return this builder + */ + public Builder schedulingPlan(com.oracle.bmc.database.model.SchedulingPlan schedulingPlan) { + this.schedulingPlan = schedulingPlan; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ReorderScheduledActionsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + opcWorkRequestId(o.getOpcWorkRequestId()); + schedulingPlan(o.getSchedulingPlan()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ReorderScheduledActionsResponse build() { + return new ReorderScheduledActionsResponse( + __httpStatusCode__, + headers, + etag, + opcRequestId, + opcNextPage, + opcWorkRequestId, + schedulingPlan); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",schedulingPlan=").append(String.valueOf(schedulingPlan)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ReorderScheduledActionsResponse)) { + return false; + } + + ReorderScheduledActionsResponse other = (ReorderScheduledActionsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.schedulingPlan, other.schedulingPlan); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = + (result * PRIME) + + (this.schedulingPlan == null ? 43 : this.schedulingPlan.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/SetDbKeyVersionResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/SetDbKeyVersionResponse.java new file mode 100644 index 00000000000..f628adea2c0 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/SetDbKeyVersionResponse.java @@ -0,0 +1,247 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class SetDbKeyVersionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Database instance. + */ + private com.oracle.bmc.database.model.Database database; + + /** + * The returned Database instance. + * @return the value + */ + public com.oracle.bmc.database.model.Database getDatabase() { + return database; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcWorkRequestId", + "opcRequestId", + "database" + }) + private SetDbKeyVersionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.database.model.Database database) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.database = database; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Database instance. + */ + private com.oracle.bmc.database.model.Database database; + + /** + * The returned Database instance. + * @param database the value to set + * @return this builder + */ + public Builder database(com.oracle.bmc.database.model.Database database) { + this.database = database; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SetDbKeyVersionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + database(o.getDatabase()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public SetDbKeyVersionResponse build() { + return new SetDbKeyVersionResponse( + __httpStatusCode__, headers, etag, opcWorkRequestId, opcRequestId, database); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",database=").append(String.valueOf(database)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SetDbKeyVersionResponse)) { + return false; + } + + SetDbKeyVersionResponse other = (SetDbKeyVersionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.database, other.database); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.database == null ? 43 : this.database.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/SetPdbKeyVersionResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/SetPdbKeyVersionResponse.java new file mode 100644 index 00000000000..faa6534b1e0 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/SetPdbKeyVersionResponse.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class SetPdbKeyVersionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned PluggableDatabase instance. + */ + private com.oracle.bmc.database.model.PluggableDatabase pluggableDatabase; + + /** + * The returned PluggableDatabase instance. + * @return the value + */ + public com.oracle.bmc.database.model.PluggableDatabase getPluggableDatabase() { + return pluggableDatabase; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcWorkRequestId", + "opcRequestId", + "pluggableDatabase" + }) + private SetPdbKeyVersionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.database.model.PluggableDatabase pluggableDatabase) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.pluggableDatabase = pluggableDatabase; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned PluggableDatabase instance. + */ + private com.oracle.bmc.database.model.PluggableDatabase pluggableDatabase; + + /** + * The returned PluggableDatabase instance. + * @param pluggableDatabase the value to set + * @return this builder + */ + public Builder pluggableDatabase( + com.oracle.bmc.database.model.PluggableDatabase pluggableDatabase) { + this.pluggableDatabase = pluggableDatabase; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SetPdbKeyVersionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + pluggableDatabase(o.getPluggableDatabase()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public SetPdbKeyVersionResponse build() { + return new SetPdbKeyVersionResponse( + __httpStatusCode__, + headers, + etag, + opcWorkRequestId, + opcRequestId, + pluggableDatabase); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",pluggableDatabase=").append(String.valueOf(pluggableDatabase)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SetPdbKeyVersionResponse)) { + return false; + } + + SetPdbKeyVersionResponse other = (SetPdbKeyVersionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.pluggableDatabase, other.pluggableDatabase); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.pluggableDatabase == null ? 43 : this.pluggableDatabase.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateExadbVmClusterResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateExadbVmClusterResponse.java new file mode 100644 index 00000000000..33c91a60acf --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateExadbVmClusterResponse.java @@ -0,0 +1,254 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateExadbVmClusterResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ExadbVmCluster instance. + */ + private com.oracle.bmc.database.model.ExadbVmCluster exadbVmCluster; + + /** + * The returned ExadbVmCluster instance. + * @return the value + */ + public com.oracle.bmc.database.model.ExadbVmCluster getExadbVmCluster() { + return exadbVmCluster; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "etag", + "opcRequestId", + "exadbVmCluster" + }) + private UpdateExadbVmClusterResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ExadbVmCluster exadbVmCluster) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.exadbVmCluster = exadbVmCluster; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ExadbVmCluster instance. + */ + private com.oracle.bmc.database.model.ExadbVmCluster exadbVmCluster; + + /** + * The returned ExadbVmCluster instance. + * @param exadbVmCluster the value to set + * @return this builder + */ + public Builder exadbVmCluster(com.oracle.bmc.database.model.ExadbVmCluster exadbVmCluster) { + this.exadbVmCluster = exadbVmCluster; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateExadbVmClusterResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + exadbVmCluster(o.getExadbVmCluster()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateExadbVmClusterResponse build() { + return new UpdateExadbVmClusterResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + etag, + opcRequestId, + exadbVmCluster); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",exadbVmCluster=").append(String.valueOf(exadbVmCluster)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateExadbVmClusterResponse)) { + return false; + } + + UpdateExadbVmClusterResponse other = (UpdateExadbVmClusterResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.exadbVmCluster, other.exadbVmCluster); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.exadbVmCluster == null ? 43 : this.exadbVmCluster.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateExascaleDbStorageVaultResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateExascaleDbStorageVaultResponse.java new file mode 100644 index 00000000000..9aa9bb3e581 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateExascaleDbStorageVaultResponse.java @@ -0,0 +1,258 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateExascaleDbStorageVaultResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ExascaleDbStorageVault instance. + */ + private com.oracle.bmc.database.model.ExascaleDbStorageVault exascaleDbStorageVault; + + /** + * The returned ExascaleDbStorageVault instance. + * @return the value + */ + public com.oracle.bmc.database.model.ExascaleDbStorageVault getExascaleDbStorageVault() { + return exascaleDbStorageVault; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "etag", + "opcRequestId", + "exascaleDbStorageVault" + }) + private UpdateExascaleDbStorageVaultResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ExascaleDbStorageVault exascaleDbStorageVault) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.exascaleDbStorageVault = exascaleDbStorageVault; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ExascaleDbStorageVault instance. + */ + private com.oracle.bmc.database.model.ExascaleDbStorageVault exascaleDbStorageVault; + + /** + * The returned ExascaleDbStorageVault instance. + * @param exascaleDbStorageVault the value to set + * @return this builder + */ + public Builder exascaleDbStorageVault( + com.oracle.bmc.database.model.ExascaleDbStorageVault exascaleDbStorageVault) { + this.exascaleDbStorageVault = exascaleDbStorageVault; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateExascaleDbStorageVaultResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + exascaleDbStorageVault(o.getExascaleDbStorageVault()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateExascaleDbStorageVaultResponse build() { + return new UpdateExascaleDbStorageVaultResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + etag, + opcRequestId, + exascaleDbStorageVault); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",exascaleDbStorageVault=").append(String.valueOf(exascaleDbStorageVault)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateExascaleDbStorageVaultResponse)) { + return false; + } + + UpdateExascaleDbStorageVaultResponse other = (UpdateExascaleDbStorageVaultResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.exascaleDbStorageVault, other.exascaleDbStorageVault); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.exascaleDbStorageVault == null + ? 43 + : this.exascaleDbStorageVault.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateExecutionActionResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateExecutionActionResponse.java new file mode 100644 index 00000000000..93e524dfa7a --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateExecutionActionResponse.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateExecutionActionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ExecutionAction instance. + */ + private com.oracle.bmc.database.model.ExecutionAction executionAction; + + /** + * The returned ExecutionAction instance. + * @return the value + */ + public com.oracle.bmc.database.model.ExecutionAction getExecutionAction() { + return executionAction; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "etag", + "opcRequestId", + "executionAction" + }) + private UpdateExecutionActionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ExecutionAction executionAction) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.executionAction = executionAction; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ExecutionAction instance. + */ + private com.oracle.bmc.database.model.ExecutionAction executionAction; + + /** + * The returned ExecutionAction instance. + * @param executionAction the value to set + * @return this builder + */ + public Builder executionAction( + com.oracle.bmc.database.model.ExecutionAction executionAction) { + this.executionAction = executionAction; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateExecutionActionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + executionAction(o.getExecutionAction()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateExecutionActionResponse build() { + return new UpdateExecutionActionResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + etag, + opcRequestId, + executionAction); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",executionAction=").append(String.valueOf(executionAction)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateExecutionActionResponse)) { + return false; + } + + UpdateExecutionActionResponse other = (UpdateExecutionActionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.executionAction, other.executionAction); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.executionAction == null ? 43 : this.executionAction.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateExecutionWindowResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateExecutionWindowResponse.java new file mode 100644 index 00000000000..42c4bc7868c --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateExecutionWindowResponse.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateExecutionWindowResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ExecutionWindow instance. + */ + private com.oracle.bmc.database.model.ExecutionWindow executionWindow; + + /** + * The returned ExecutionWindow instance. + * @return the value + */ + public com.oracle.bmc.database.model.ExecutionWindow getExecutionWindow() { + return executionWindow; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "etag", + "opcRequestId", + "executionWindow" + }) + private UpdateExecutionWindowResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ExecutionWindow executionWindow) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.executionWindow = executionWindow; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ExecutionWindow instance. + */ + private com.oracle.bmc.database.model.ExecutionWindow executionWindow; + + /** + * The returned ExecutionWindow instance. + * @param executionWindow the value to set + * @return this builder + */ + public Builder executionWindow( + com.oracle.bmc.database.model.ExecutionWindow executionWindow) { + this.executionWindow = executionWindow; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateExecutionWindowResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + executionWindow(o.getExecutionWindow()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateExecutionWindowResponse build() { + return new UpdateExecutionWindowResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + etag, + opcRequestId, + executionWindow); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",executionWindow=").append(String.valueOf(executionWindow)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateExecutionWindowResponse)) { + return false; + } + + UpdateExecutionWindowResponse other = (UpdateExecutionWindowResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.executionWindow, other.executionWindow); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.executionWindow == null ? 43 : this.executionWindow.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateScheduledActionResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateScheduledActionResponse.java new file mode 100644 index 00000000000..e6a68f8e778 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateScheduledActionResponse.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateScheduledActionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ScheduledAction instance. + */ + private com.oracle.bmc.database.model.ScheduledAction scheduledAction; + + /** + * The returned ScheduledAction instance. + * @return the value + */ + public com.oracle.bmc.database.model.ScheduledAction getScheduledAction() { + return scheduledAction; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "etag", + "opcRequestId", + "scheduledAction" + }) + private UpdateScheduledActionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.ScheduledAction scheduledAction) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.scheduledAction = scheduledAction; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ScheduledAction instance. + */ + private com.oracle.bmc.database.model.ScheduledAction scheduledAction; + + /** + * The returned ScheduledAction instance. + * @param scheduledAction the value to set + * @return this builder + */ + public Builder scheduledAction( + com.oracle.bmc.database.model.ScheduledAction scheduledAction) { + this.scheduledAction = scheduledAction; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateScheduledActionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + scheduledAction(o.getScheduledAction()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateScheduledActionResponse build() { + return new UpdateScheduledActionResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + etag, + opcRequestId, + scheduledAction); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",scheduledAction=").append(String.valueOf(scheduledAction)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateScheduledActionResponse)) { + return false; + } + + UpdateScheduledActionResponse other = (UpdateScheduledActionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.scheduledAction, other.scheduledAction); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.scheduledAction == null ? 43 : this.scheduledAction.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateSchedulingPolicyResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateSchedulingPolicyResponse.java new file mode 100644 index 00000000000..f1533a8de32 --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateSchedulingPolicyResponse.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateSchedulingPolicyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned SchedulingPolicy instance. + */ + private com.oracle.bmc.database.model.SchedulingPolicy schedulingPolicy; + + /** + * The returned SchedulingPolicy instance. + * @return the value + */ + public com.oracle.bmc.database.model.SchedulingPolicy getSchedulingPolicy() { + return schedulingPolicy; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "etag", + "opcRequestId", + "schedulingPolicy" + }) + private UpdateSchedulingPolicyResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.SchedulingPolicy schedulingPolicy) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.schedulingPolicy = schedulingPolicy; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned SchedulingPolicy instance. + */ + private com.oracle.bmc.database.model.SchedulingPolicy schedulingPolicy; + + /** + * The returned SchedulingPolicy instance. + * @param schedulingPolicy the value to set + * @return this builder + */ + public Builder schedulingPolicy( + com.oracle.bmc.database.model.SchedulingPolicy schedulingPolicy) { + this.schedulingPolicy = schedulingPolicy; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateSchedulingPolicyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + schedulingPolicy(o.getSchedulingPolicy()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateSchedulingPolicyResponse build() { + return new UpdateSchedulingPolicyResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + etag, + opcRequestId, + schedulingPolicy); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",schedulingPolicy=").append(String.valueOf(schedulingPolicy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSchedulingPolicyResponse)) { + return false; + } + + UpdateSchedulingPolicyResponse other = (UpdateSchedulingPolicyResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.schedulingPolicy, other.schedulingPolicy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.schedulingPolicy == null ? 43 : this.schedulingPolicy.hashCode()); + return result; + } +} diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateSchedulingWindowResponse.java b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateSchedulingWindowResponse.java new file mode 100644 index 00000000000..772f8e2b1eb --- /dev/null +++ b/bmc-database/src/main/java/com/oracle/bmc/database/responses/UpdateSchedulingWindowResponse.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.database.responses; + +import com.oracle.bmc.database.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdateSchedulingWindowResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned SchedulingWindow instance. + */ + private com.oracle.bmc.database.model.SchedulingWindow schedulingWindow; + + /** + * The returned SchedulingWindow instance. + * @return the value + */ + public com.oracle.bmc.database.model.SchedulingWindow getSchedulingWindow() { + return schedulingWindow; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "etag", + "opcRequestId", + "schedulingWindow" + }) + private UpdateSchedulingWindowResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String etag, + String opcRequestId, + com.oracle.bmc.database.model.SchedulingWindow schedulingWindow) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.schedulingWindow = schedulingWindow; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned SchedulingWindow instance. + */ + private com.oracle.bmc.database.model.SchedulingWindow schedulingWindow; + + /** + * The returned SchedulingWindow instance. + * @param schedulingWindow the value to set + * @return this builder + */ + public Builder schedulingWindow( + com.oracle.bmc.database.model.SchedulingWindow schedulingWindow) { + this.schedulingWindow = schedulingWindow; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateSchedulingWindowResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + schedulingWindow(o.getSchedulingWindow()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateSchedulingWindowResponse build() { + return new UpdateSchedulingWindowResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + etag, + opcRequestId, + schedulingWindow); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",schedulingWindow=").append(String.valueOf(schedulingWindow)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSchedulingWindowResponse)) { + return false; + } + + UpdateSchedulingWindowResponse other = (UpdateSchedulingWindowResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.schedulingWindow, other.schedulingWindow); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.schedulingWindow == null ? 43 : this.schedulingWindow.hashCode()); + return result; + } +} diff --git a/bmc-databasemanagement/pom.xml b/bmc-databasemanagement/pom.xml index e1b26b06b09..e600e1c5aa9 100644 --- a/bmc-databasemanagement/pom.xml +++ b/bmc-databasemanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-databasemanagement @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/DbManagement.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/DbManagement.java index f56be71dedb..ae3a1acd9bf 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/DbManagement.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/DbManagement.java @@ -635,6 +635,20 @@ DisableAutomaticInitialPlanCaptureResponse disableAutomaticInitialPlanCapture( DisableAutomaticSpmEvolveAdvisorTaskResponse disableAutomaticSpmEvolveAdvisorTask( DisableAutomaticSpmEvolveAdvisorTaskRequest request); + /** + * Disables a Database Management feature for the specified Autonomous Database. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DisableAutonomousDatabaseManagementFeature API. + */ + DisableAutonomousDatabaseManagementFeatureResponse disableAutonomousDatabaseManagementFeature( + DisableAutonomousDatabaseManagementFeatureRequest request); + /** * Disables a Database Management feature for the specified Oracle cloud database. * @@ -899,6 +913,20 @@ EnableAutomaticInitialPlanCaptureResponse enableAutomaticInitialPlanCapture( EnableAutomaticSpmEvolveAdvisorTaskResponse enableAutomaticSpmEvolveAdvisorTask( EnableAutomaticSpmEvolveAdvisorTaskRequest request); + /** + * Enables a Database Management feature for the specified Autonomous Database. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use EnableAutonomousDatabaseManagementFeature API. + */ + EnableAutonomousDatabaseManagementFeatureResponse enableAutonomousDatabaseManagementFeature( + EnableAutonomousDatabaseManagementFeatureRequest request); + /** * Enables a Database Management feature for the specified cloud database. * @@ -2360,6 +2388,20 @@ LoadSqlPlanBaselinesFromAwrResponse loadSqlPlanBaselinesFromAwr( LoadSqlPlanBaselinesFromCursorCacheResponse loadSqlPlanBaselinesFromCursorCache( LoadSqlPlanBaselinesFromCursorCacheRequest request); + /** + * Modifies the Database Management feature for the specified Autonomous Database. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ModifyAutonomousDatabaseManagementFeature API. + */ + ModifyAutonomousDatabaseManagementFeatureResponse modifyAutonomousDatabaseManagementFeature( + ModifyAutonomousDatabaseManagementFeatureRequest request); + /** * Modifies a Database Management feature for the specified Oracle cloud database. * diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/DbManagementAsync.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/DbManagementAsync.java index be829c11362..1bb738ddf3b 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/DbManagementAsync.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/DbManagementAsync.java @@ -798,6 +798,25 @@ java.util.concurrent.Future deletePreferredCr DisableAutomaticSpmEvolveAdvisorTaskResponse> handler); + /** + * Disables a Database Management feature for the specified Autonomous Database. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + disableAutonomousDatabaseManagementFeature( + DisableAutonomousDatabaseManagementFeatureRequest request, + com.oracle.bmc.responses.AsyncHandler< + DisableAutonomousDatabaseManagementFeatureRequest, + DisableAutonomousDatabaseManagementFeatureResponse> + handler); + /** * Disables a Database Management feature for the specified Oracle cloud database. * @@ -1128,6 +1147,25 @@ java.util.concurrent.Future dropTablespace( EnableAutomaticSpmEvolveAdvisorTaskResponse> handler); + /** + * Enables a Database Management feature for the specified Autonomous Database. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + enableAutonomousDatabaseManagementFeature( + EnableAutonomousDatabaseManagementFeatureRequest request, + com.oracle.bmc.responses.AsyncHandler< + EnableAutonomousDatabaseManagementFeatureRequest, + EnableAutonomousDatabaseManagementFeatureResponse> + handler); + /** * Enables a Database Management feature for the specified cloud database. * @@ -2993,6 +3031,25 @@ java.util.concurrent.Future loadSqlPlanBase LoadSqlPlanBaselinesFromCursorCacheResponse> handler); + /** + * Modifies the Database Management feature for the specified Autonomous Database. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + modifyAutonomousDatabaseManagementFeature( + ModifyAutonomousDatabaseManagementFeatureRequest request, + com.oracle.bmc.responses.AsyncHandler< + ModifyAutonomousDatabaseManagementFeatureRequest, + ModifyAutonomousDatabaseManagementFeatureResponse> + handler); + /** * Modifies a Database Management feature for the specified Oracle cloud database. * diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/DbManagementAsyncClient.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/DbManagementAsyncClient.java index f48879f0b4b..1f580a7b833 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/DbManagementAsyncClient.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/DbManagementAsyncClient.java @@ -2595,6 +2595,69 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + disableAutonomousDatabaseManagementFeature( + DisableAutonomousDatabaseManagementFeatureRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DisableAutonomousDatabaseManagementFeatureRequest, + DisableAutonomousDatabaseManagementFeatureResponse> + handler) { + LOG.trace("Called async disableAutonomousDatabaseManagementFeature"); + final DisableAutonomousDatabaseManagementFeatureRequest interceptedRequest = + DisableAutonomousDatabaseManagementFeatureConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DisableAutonomousDatabaseManagementFeatureConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DbManagement", + "DisableAutonomousDatabaseManagementFeature", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database-management/20201101/ManagedDatabase/DisableAutonomousDatabaseManagementFeature"); + final java.util.function.Function< + javax.ws.rs.core.Response, + DisableAutonomousDatabaseManagementFeatureResponse> + transformer = + DisableAutonomousDatabaseManagementFeatureConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DisableAutonomousDatabaseManagementFeatureRequest, + DisableAutonomousDatabaseManagementFeatureResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DisableAutonomousDatabaseManagementFeatureRequest, + DisableAutonomousDatabaseManagementFeatureResponse>, + java.util.concurrent.Future< + DisableAutonomousDatabaseManagementFeatureResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getDisableAutonomousDatabaseManagementFeatureDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DisableAutonomousDatabaseManagementFeatureRequest, + DisableAutonomousDatabaseManagementFeatureResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future disableDatabaseManagementFeature( @@ -3478,6 +3541,69 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + enableAutonomousDatabaseManagementFeature( + EnableAutonomousDatabaseManagementFeatureRequest request, + final com.oracle.bmc.responses.AsyncHandler< + EnableAutonomousDatabaseManagementFeatureRequest, + EnableAutonomousDatabaseManagementFeatureResponse> + handler) { + LOG.trace("Called async enableAutonomousDatabaseManagementFeature"); + final EnableAutonomousDatabaseManagementFeatureRequest interceptedRequest = + EnableAutonomousDatabaseManagementFeatureConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + EnableAutonomousDatabaseManagementFeatureConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DbManagement", + "EnableAutonomousDatabaseManagementFeature", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database-management/20201101/ManagedDatabase/EnableAutonomousDatabaseManagementFeature"); + final java.util.function.Function< + javax.ws.rs.core.Response, + EnableAutonomousDatabaseManagementFeatureResponse> + transformer = + EnableAutonomousDatabaseManagementFeatureConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + EnableAutonomousDatabaseManagementFeatureRequest, + EnableAutonomousDatabaseManagementFeatureResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + EnableAutonomousDatabaseManagementFeatureRequest, + EnableAutonomousDatabaseManagementFeatureResponse>, + java.util.concurrent.Future< + EnableAutonomousDatabaseManagementFeatureResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getEnableAutonomousDatabaseManagementFeatureDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + EnableAutonomousDatabaseManagementFeatureRequest, + EnableAutonomousDatabaseManagementFeatureResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future enableDatabaseManagementFeature( @@ -8695,6 +8821,69 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + modifyAutonomousDatabaseManagementFeature( + ModifyAutonomousDatabaseManagementFeatureRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ModifyAutonomousDatabaseManagementFeatureRequest, + ModifyAutonomousDatabaseManagementFeatureResponse> + handler) { + LOG.trace("Called async modifyAutonomousDatabaseManagementFeature"); + final ModifyAutonomousDatabaseManagementFeatureRequest interceptedRequest = + ModifyAutonomousDatabaseManagementFeatureConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ModifyAutonomousDatabaseManagementFeatureConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DbManagement", + "ModifyAutonomousDatabaseManagementFeature", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database-management/20201101/ManagedDatabase/ModifyAutonomousDatabaseManagementFeature"); + final java.util.function.Function< + javax.ws.rs.core.Response, + ModifyAutonomousDatabaseManagementFeatureResponse> + transformer = + ModifyAutonomousDatabaseManagementFeatureConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ModifyAutonomousDatabaseManagementFeatureRequest, + ModifyAutonomousDatabaseManagementFeatureResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ModifyAutonomousDatabaseManagementFeatureRequest, + ModifyAutonomousDatabaseManagementFeatureResponse>, + java.util.concurrent.Future< + ModifyAutonomousDatabaseManagementFeatureResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getModifyAutonomousDatabaseManagementFeatureDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ModifyAutonomousDatabaseManagementFeatureRequest, + ModifyAutonomousDatabaseManagementFeatureResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future modifyDatabaseManagementFeature( diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/DbManagementClient.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/DbManagementClient.java index 5540d8d705b..0d0cfb0ada7 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/DbManagementClient.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/DbManagementClient.java @@ -2206,6 +2206,54 @@ public DisableAutomaticSpmEvolveAdvisorTaskResponse disableAutomaticSpmEvolveAdv }); } + @Override + public DisableAutonomousDatabaseManagementFeatureResponse + disableAutonomousDatabaseManagementFeature( + DisableAutonomousDatabaseManagementFeatureRequest request) { + LOG.trace("Called disableAutonomousDatabaseManagementFeature"); + final DisableAutonomousDatabaseManagementFeatureRequest interceptedRequest = + DisableAutonomousDatabaseManagementFeatureConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DisableAutonomousDatabaseManagementFeatureConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DbManagement", + "DisableAutonomousDatabaseManagementFeature", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database-management/20201101/ManagedDatabase/DisableAutonomousDatabaseManagementFeature"); + java.util.function.Function< + javax.ws.rs.core.Response, + DisableAutonomousDatabaseManagementFeatureResponse> + transformer = + DisableAutonomousDatabaseManagementFeatureConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getDisableAutonomousDatabaseManagementFeatureDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DisableDatabaseManagementFeatureResponse disableDatabaseManagementFeature( DisableDatabaseManagementFeatureRequest request) { @@ -2883,6 +2931,54 @@ public EnableAutomaticSpmEvolveAdvisorTaskResponse enableAutomaticSpmEvolveAdvis }); } + @Override + public EnableAutonomousDatabaseManagementFeatureResponse + enableAutonomousDatabaseManagementFeature( + EnableAutonomousDatabaseManagementFeatureRequest request) { + LOG.trace("Called enableAutonomousDatabaseManagementFeature"); + final EnableAutonomousDatabaseManagementFeatureRequest interceptedRequest = + EnableAutonomousDatabaseManagementFeatureConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + EnableAutonomousDatabaseManagementFeatureConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DbManagement", + "EnableAutonomousDatabaseManagementFeature", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database-management/20201101/ManagedDatabase/EnableAutonomousDatabaseManagementFeature"); + java.util.function.Function< + javax.ws.rs.core.Response, + EnableAutonomousDatabaseManagementFeatureResponse> + transformer = + EnableAutonomousDatabaseManagementFeatureConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getEnableAutonomousDatabaseManagementFeatureDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public EnableDatabaseManagementFeatureResponse enableDatabaseManagementFeature( EnableDatabaseManagementFeatureRequest request) { @@ -6942,6 +7038,54 @@ public LoadSqlPlanBaselinesFromCursorCacheResponse loadSqlPlanBaselinesFromCurso }); } + @Override + public ModifyAutonomousDatabaseManagementFeatureResponse + modifyAutonomousDatabaseManagementFeature( + ModifyAutonomousDatabaseManagementFeatureRequest request) { + LOG.trace("Called modifyAutonomousDatabaseManagementFeature"); + final ModifyAutonomousDatabaseManagementFeatureRequest interceptedRequest = + ModifyAutonomousDatabaseManagementFeatureConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ModifyAutonomousDatabaseManagementFeatureConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DbManagement", + "ModifyAutonomousDatabaseManagementFeature", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database-management/20201101/ManagedDatabase/ModifyAutonomousDatabaseManagementFeature"); + java.util.function.Function< + javax.ws.rs.core.Response, + ModifyAutonomousDatabaseManagementFeatureResponse> + transformer = + ModifyAutonomousDatabaseManagementFeatureConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getModifyAutonomousDatabaseManagementFeatureDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ModifyDatabaseManagementFeatureResponse modifyDatabaseManagementFeature( ModifyDatabaseManagementFeatureRequest request) { diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/internal/http/DisableAutonomousDatabaseManagementFeatureConverter.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/internal/http/DisableAutonomousDatabaseManagementFeatureConverter.java new file mode 100644 index 00000000000..3b5983e60c4 --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/internal/http/DisableAutonomousDatabaseManagementFeatureConverter.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.databasemanagement.model.*; +import com.oracle.bmc.databasemanagement.requests.*; +import com.oracle.bmc.databasemanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +public class DisableAutonomousDatabaseManagementFeatureConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + DisableAutonomousDatabaseManagementFeatureConverter.class); + + public static com.oracle.bmc.databasemanagement.requests + .DisableAutonomousDatabaseManagementFeatureRequest + interceptRequest( + com.oracle.bmc.databasemanagement.requests + .DisableAutonomousDatabaseManagementFeatureRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.databasemanagement.requests + .DisableAutonomousDatabaseManagementFeatureRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousDatabaseId(), "autonomousDatabaseId must not be blank"); + Validate.notNull( + request.getDisableAutonomousDatabaseManagementFeatureDetails(), + "disableAutonomousDatabaseManagementFeatureDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20201101") + .path("autonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousDatabaseId())) + .path("actions") + .path("disableDatabaseManagement"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemanagement.responses + .DisableAutonomousDatabaseManagementFeatureResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemanagement.responses + .DisableAutonomousDatabaseManagementFeatureResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemanagement.responses + .DisableAutonomousDatabaseManagementFeatureResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemanagement.responses + .DisableAutonomousDatabaseManagementFeatureResponse>() { + @Override + public com.oracle.bmc.databasemanagement.responses + .DisableAutonomousDatabaseManagementFeatureResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.databasemanagement.responses.DisableAutonomousDatabaseManagementFeatureResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.databasemanagement.responses + .DisableAutonomousDatabaseManagementFeatureResponse + .Builder + builder = + com.oracle.bmc.databasemanagement.responses + .DisableAutonomousDatabaseManagementFeatureResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.databasemanagement.responses + .DisableAutonomousDatabaseManagementFeatureResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/internal/http/EnableAutonomousDatabaseManagementFeatureConverter.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/internal/http/EnableAutonomousDatabaseManagementFeatureConverter.java new file mode 100644 index 00000000000..70a8276ca2a --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/internal/http/EnableAutonomousDatabaseManagementFeatureConverter.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.databasemanagement.model.*; +import com.oracle.bmc.databasemanagement.requests.*; +import com.oracle.bmc.databasemanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +public class EnableAutonomousDatabaseManagementFeatureConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + EnableAutonomousDatabaseManagementFeatureConverter.class); + + public static com.oracle.bmc.databasemanagement.requests + .EnableAutonomousDatabaseManagementFeatureRequest + interceptRequest( + com.oracle.bmc.databasemanagement.requests + .EnableAutonomousDatabaseManagementFeatureRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.databasemanagement.requests + .EnableAutonomousDatabaseManagementFeatureRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousDatabaseId(), "autonomousDatabaseId must not be blank"); + Validate.notNull( + request.getEnableAutonomousDatabaseManagementFeatureDetails(), + "enableAutonomousDatabaseManagementFeatureDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20201101") + .path("autonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousDatabaseId())) + .path("actions") + .path("enableDatabaseManagement"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemanagement.responses + .EnableAutonomousDatabaseManagementFeatureResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemanagement.responses + .EnableAutonomousDatabaseManagementFeatureResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemanagement.responses + .EnableAutonomousDatabaseManagementFeatureResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemanagement.responses + .EnableAutonomousDatabaseManagementFeatureResponse>() { + @Override + public com.oracle.bmc.databasemanagement.responses + .EnableAutonomousDatabaseManagementFeatureResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.databasemanagement.responses.EnableAutonomousDatabaseManagementFeatureResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.databasemanagement.responses + .EnableAutonomousDatabaseManagementFeatureResponse + .Builder + builder = + com.oracle.bmc.databasemanagement.responses + .EnableAutonomousDatabaseManagementFeatureResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.databasemanagement.responses + .EnableAutonomousDatabaseManagementFeatureResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/internal/http/ListDbManagementPrivateEndpointsConverter.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/internal/http/ListDbManagementPrivateEndpointsConverter.java index 59115f2e96d..087a633f78c 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/internal/http/ListDbManagementPrivateEndpointsConverter.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/internal/http/ListDbManagementPrivateEndpointsConverter.java @@ -68,6 +68,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getIsCluster())); } + if (request.getIsDnsResolutionEnabled() != null) { + target = + target.queryParam( + "isDnsResolutionEnabled", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsDnsResolutionEnabled())); + } + if (request.getLifecycleState() != null) { target = target.queryParam( diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/internal/http/ModifyAutonomousDatabaseManagementFeatureConverter.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/internal/http/ModifyAutonomousDatabaseManagementFeatureConverter.java new file mode 100644 index 00000000000..63b29061f31 --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/internal/http/ModifyAutonomousDatabaseManagementFeatureConverter.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.databasemanagement.model.*; +import com.oracle.bmc.databasemanagement.requests.*; +import com.oracle.bmc.databasemanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +public class ModifyAutonomousDatabaseManagementFeatureConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ModifyAutonomousDatabaseManagementFeatureConverter.class); + + public static com.oracle.bmc.databasemanagement.requests + .ModifyAutonomousDatabaseManagementFeatureRequest + interceptRequest( + com.oracle.bmc.databasemanagement.requests + .ModifyAutonomousDatabaseManagementFeatureRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.databasemanagement.requests + .ModifyAutonomousDatabaseManagementFeatureRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getAutonomousDatabaseId(), "autonomousDatabaseId must not be blank"); + Validate.notNull( + request.getModifyAutonomousDatabaseManagementFeatureDetails(), + "modifyAutonomousDatabaseManagementFeatureDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20201101") + .path("autonomousDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAutonomousDatabaseId())) + .path("actions") + .path("modifyDatabaseManagement"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemanagement.responses + .ModifyAutonomousDatabaseManagementFeatureResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemanagement.responses + .ModifyAutonomousDatabaseManagementFeatureResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemanagement.responses + .ModifyAutonomousDatabaseManagementFeatureResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemanagement.responses + .ModifyAutonomousDatabaseManagementFeatureResponse>() { + @Override + public com.oracle.bmc.databasemanagement.responses + .ModifyAutonomousDatabaseManagementFeatureResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.databasemanagement.responses.ModifyAutonomousDatabaseManagementFeatureResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.databasemanagement.responses + .ModifyAutonomousDatabaseManagementFeatureResponse + .Builder + builder = + com.oracle.bmc.databasemanagement.responses + .ModifyAutonomousDatabaseManagementFeatureResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.databasemanagement.responses + .ModifyAutonomousDatabaseManagementFeatureResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/AutonomousDatabaseDiagnosticsAndManagementFeatureDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/AutonomousDatabaseDiagnosticsAndManagementFeatureDetails.java new file mode 100644 index 00000000000..ed3ee497628 --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/AutonomousDatabaseDiagnosticsAndManagementFeatureDetails.java @@ -0,0 +1,131 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.model; + +/** + * The details required to enable the Diagnostics and Management feature. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousDatabaseDiagnosticsAndManagementFeatureDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "feature" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AutonomousDatabaseDiagnosticsAndManagementFeatureDetails + extends AutonomousDatabaseFeatureDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("databaseConnectionDetails") + private DatabaseConnectionDetails databaseConnectionDetails; + + public Builder databaseConnectionDetails( + DatabaseConnectionDetails databaseConnectionDetails) { + this.databaseConnectionDetails = databaseConnectionDetails; + this.__explicitlySet__.add("databaseConnectionDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectorDetails") + private ConnectorDetails connectorDetails; + + public Builder connectorDetails(ConnectorDetails connectorDetails) { + this.connectorDetails = connectorDetails; + this.__explicitlySet__.add("connectorDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousDatabaseDiagnosticsAndManagementFeatureDetails build() { + AutonomousDatabaseDiagnosticsAndManagementFeatureDetails model = + new AutonomousDatabaseDiagnosticsAndManagementFeatureDetails( + this.databaseConnectionDetails, this.connectorDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousDatabaseDiagnosticsAndManagementFeatureDetails model) { + if (model.wasPropertyExplicitlySet("databaseConnectionDetails")) { + this.databaseConnectionDetails(model.getDatabaseConnectionDetails()); + } + if (model.wasPropertyExplicitlySet("connectorDetails")) { + this.connectorDetails(model.getConnectorDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public AutonomousDatabaseDiagnosticsAndManagementFeatureDetails( + DatabaseConnectionDetails databaseConnectionDetails, + ConnectorDetails connectorDetails) { + super(databaseConnectionDetails, connectorDetails); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AutonomousDatabaseDiagnosticsAndManagementFeatureDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AutonomousDatabaseDiagnosticsAndManagementFeatureDetails)) { + return false; + } + + AutonomousDatabaseDiagnosticsAndManagementFeatureDetails other = + (AutonomousDatabaseDiagnosticsAndManagementFeatureDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/AutonomousDatabaseFeatureDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/AutonomousDatabaseFeatureDetails.java new file mode 100644 index 00000000000..d84d6ae4b7b --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/AutonomousDatabaseFeatureDetails.java @@ -0,0 +1,113 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.model; + +/** + * The details required to enable the specified Database Management feature for an Autonomous Database. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "feature", + defaultImpl = AutonomousDatabaseFeatureDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = AutonomousDatabaseSqlWatchFeatureDetails.class, + name = "SQLWATCH" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = AutonomousDatabaseDiagnosticsAndManagementFeatureDetails.class, + name = "DIAGNOSTICS_AND_MANAGEMENT" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AutonomousDatabaseFeatureDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"databaseConnectionDetails", "connectorDetails"}) + protected AutonomousDatabaseFeatureDetails( + DatabaseConnectionDetails databaseConnectionDetails, + ConnectorDetails connectorDetails) { + super(); + this.databaseConnectionDetails = databaseConnectionDetails; + this.connectorDetails = connectorDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseConnectionDetails") + private final DatabaseConnectionDetails databaseConnectionDetails; + + public DatabaseConnectionDetails getDatabaseConnectionDetails() { + return databaseConnectionDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectorDetails") + private final ConnectorDetails connectorDetails; + + public ConnectorDetails getConnectorDetails() { + return connectorDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AutonomousDatabaseFeatureDetails("); + sb.append("super=").append(super.toString()); + sb.append("databaseConnectionDetails=") + .append(String.valueOf(this.databaseConnectionDetails)); + sb.append(", connectorDetails=").append(String.valueOf(this.connectorDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AutonomousDatabaseFeatureDetails)) { + return false; + } + + AutonomousDatabaseFeatureDetails other = (AutonomousDatabaseFeatureDetails) o; + return java.util.Objects.equals( + this.databaseConnectionDetails, other.databaseConnectionDetails) + && java.util.Objects.equals(this.connectorDetails, other.connectorDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.databaseConnectionDetails == null + ? 43 + : this.databaseConnectionDetails.hashCode()); + result = + (result * PRIME) + + (this.connectorDetails == null ? 43 : this.connectorDetails.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/AutonomousDatabaseSqlWatchFeatureDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/AutonomousDatabaseSqlWatchFeatureDetails.java new file mode 100644 index 00000000000..e0f0b904037 --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/AutonomousDatabaseSqlWatchFeatureDetails.java @@ -0,0 +1,131 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.model; + +/** + * The details required to enable the SQL Watch feature. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AutonomousDatabaseSqlWatchFeatureDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "feature" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AutonomousDatabaseSqlWatchFeatureDetails + extends AutonomousDatabaseFeatureDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("databaseConnectionDetails") + private DatabaseConnectionDetails databaseConnectionDetails; + + public Builder databaseConnectionDetails( + DatabaseConnectionDetails databaseConnectionDetails) { + this.databaseConnectionDetails = databaseConnectionDetails; + this.__explicitlySet__.add("databaseConnectionDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectorDetails") + private ConnectorDetails connectorDetails; + + public Builder connectorDetails(ConnectorDetails connectorDetails) { + this.connectorDetails = connectorDetails; + this.__explicitlySet__.add("connectorDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AutonomousDatabaseSqlWatchFeatureDetails build() { + AutonomousDatabaseSqlWatchFeatureDetails model = + new AutonomousDatabaseSqlWatchFeatureDetails( + this.databaseConnectionDetails, this.connectorDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AutonomousDatabaseSqlWatchFeatureDetails model) { + if (model.wasPropertyExplicitlySet("databaseConnectionDetails")) { + this.databaseConnectionDetails(model.getDatabaseConnectionDetails()); + } + if (model.wasPropertyExplicitlySet("connectorDetails")) { + this.connectorDetails(model.getConnectorDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public AutonomousDatabaseSqlWatchFeatureDetails( + DatabaseConnectionDetails databaseConnectionDetails, + ConnectorDetails connectorDetails) { + super(databaseConnectionDetails, connectorDetails); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AutonomousDatabaseSqlWatchFeatureDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AutonomousDatabaseSqlWatchFeatureDetails)) { + return false; + } + + AutonomousDatabaseSqlWatchFeatureDetails other = + (AutonomousDatabaseSqlWatchFeatureDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/BasicDatabaseConnectionStringDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/BasicDatabaseConnectionStringDetails.java index 3224603ede0..568ec6d9d0e 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/BasicDatabaseConnectionStringDetails.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/BasicDatabaseConnectionStringDetails.java @@ -157,7 +157,15 @@ public Integer getPort() { public enum Protocol { Tcp("TCP"), Tcps("TCPS"), - ; + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(Protocol.class); private final String value; private static java.util.Map map; @@ -165,7 +173,9 @@ public enum Protocol { static { map = new java.util.HashMap<>(); for (Protocol v : Protocol.values()) { - map.put(v.getValue(), v); + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } } } @@ -183,7 +193,10 @@ public static Protocol create(String key) { if (map.containsKey(key)) { return map.get(key); } - throw new IllegalArgumentException("Invalid Protocol: " + key); + LOG.warn( + "Received unknown value '{}' for enum 'Protocol', returning UnknownEnumValue", + key); + return UnknownEnumValue; } }; /** diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ConnectorDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ConnectorDetails.java index f552c6cc18c..99c530fc7db 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ConnectorDetails.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ConnectorDetails.java @@ -26,6 +26,10 @@ value = ExternalConnectorDetails.class, name = "EXTERNAL" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DirectConnectorDetails.class, + name = "DIRECT" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = MacsConnectorDetails.class, name = "MACS" @@ -87,13 +91,24 @@ public int hashCode() { * - PE: Private endpoint * - MACS: Management agent * - EXTERNAL: External database connector + *

+ * - DIRECT: Direct connection * **/ public enum ConnectorType { Pe("PE"), Macs("MACS"), External("EXTERNAL"), - ; + Direct("DIRECT"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ConnectorType.class); private final String value; private static java.util.Map map; @@ -101,7 +116,9 @@ public enum ConnectorType { static { map = new java.util.HashMap<>(); for (ConnectorType v : ConnectorType.values()) { - map.put(v.getValue(), v); + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } } } @@ -119,7 +136,10 @@ public static ConnectorType create(String key) { if (map.containsKey(key)) { return map.get(key); } - throw new IllegalArgumentException("Invalid ConnectorType: " + key); + LOG.warn( + "Received unknown value '{}' for enum 'ConnectorType', returning UnknownEnumValue", + key); + return UnknownEnumValue; } }; } diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/CreateDbManagementPrivateEndpointDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/CreateDbManagementPrivateEndpointDetails.java index 255a499d110..0c4bda91d20 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/CreateDbManagementPrivateEndpointDetails.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/CreateDbManagementPrivateEndpointDetails.java @@ -26,6 +26,7 @@ public final class CreateDbManagementPrivateEndpointDetails "name", "compartmentId", "isCluster", + "isDnsResolutionEnabled", "subnetId", "description", "nsgIds", @@ -36,6 +37,7 @@ public CreateDbManagementPrivateEndpointDetails( String name, String compartmentId, Boolean isCluster, + Boolean isDnsResolutionEnabled, String subnetId, String description, java.util.List nsgIds, @@ -45,6 +47,7 @@ public CreateDbManagementPrivateEndpointDetails( this.name = name; this.compartmentId = compartmentId; this.isCluster = isCluster; + this.isDnsResolutionEnabled = isDnsResolutionEnabled; this.subnetId = subnetId; this.description = description; this.nsgIds = nsgIds; @@ -102,6 +105,22 @@ public Builder isCluster(Boolean isCluster) { this.__explicitlySet__.add("isCluster"); return this; } + /** + * Specifies whether the Database Management private endpoint has DNS proxy server enabled to resolve private host name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDnsResolutionEnabled") + private Boolean isDnsResolutionEnabled; + + /** + * Specifies whether the Database Management private endpoint has DNS proxy server enabled to resolve private host name. + * @param isDnsResolutionEnabled the value to set + * @return this builder + **/ + public Builder isDnsResolutionEnabled(Boolean isDnsResolutionEnabled) { + this.isDnsResolutionEnabled = isDnsResolutionEnabled; + this.__explicitlySet__.add("isDnsResolutionEnabled"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet. **/ @@ -207,6 +226,7 @@ public CreateDbManagementPrivateEndpointDetails build() { this.name, this.compartmentId, this.isCluster, + this.isDnsResolutionEnabled, this.subnetId, this.description, this.nsgIds, @@ -229,6 +249,9 @@ public Builder copy(CreateDbManagementPrivateEndpointDetails model) { if (model.wasPropertyExplicitlySet("isCluster")) { this.isCluster(model.getIsCluster()); } + if (model.wasPropertyExplicitlySet("isDnsResolutionEnabled")) { + this.isDnsResolutionEnabled(model.getIsDnsResolutionEnabled()); + } if (model.wasPropertyExplicitlySet("subnetId")) { this.subnetId(model.getSubnetId()); } @@ -301,6 +324,20 @@ public Boolean getIsCluster() { return isCluster; } + /** + * Specifies whether the Database Management private endpoint has DNS proxy server enabled to resolve private host name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDnsResolutionEnabled") + private final Boolean isDnsResolutionEnabled; + + /** + * Specifies whether the Database Management private endpoint has DNS proxy server enabled to resolve private host name. + * @return the value + **/ + public Boolean getIsDnsResolutionEnabled() { + return isDnsResolutionEnabled; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet. **/ @@ -402,6 +439,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("name=").append(String.valueOf(this.name)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", isCluster=").append(String.valueOf(this.isCluster)); + sb.append(", isDnsResolutionEnabled=").append(String.valueOf(this.isDnsResolutionEnabled)); sb.append(", subnetId=").append(String.valueOf(this.subnetId)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); @@ -425,6 +463,8 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.name, other.name) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.isCluster, other.isCluster) + && java.util.Objects.equals( + this.isDnsResolutionEnabled, other.isDnsResolutionEnabled) && java.util.Objects.equals(this.subnetId, other.subnetId) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.nsgIds, other.nsgIds) @@ -442,6 +482,11 @@ public int hashCode() { (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.isCluster == null ? 43 : this.isCluster.hashCode()); + result = + (result * PRIME) + + (this.isDnsResolutionEnabled == null + ? 43 + : this.isDnsResolutionEnabled.hashCode()); result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseConnectionCredentials.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseConnectionCredentials.java index ce8cf314e37..90fd2fe4463 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseConnectionCredentials.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseConnectionCredentials.java @@ -24,6 +24,10 @@ defaultImpl = DatabaseConnectionCredentials.class ) @com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DatabaseNamedCredentialConnectionDetails.class, + name = "NAMED_CREDENTIAL" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = DatabaseConnectionCredentailsByName.class, name = "NAME_REFERENCE" @@ -92,6 +96,7 @@ public enum CredentialType { NameReference("NAME_REFERENCE"), Details("DETAILS"), SslDetails("SSL_DETAILS"), + NamedCredentials("NAMED_CREDENTIALS"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseConnectionStringDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseConnectionStringDetails.java index 0ae7e714070..aaeaf5f99b5 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseConnectionStringDetails.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseConnectionStringDetails.java @@ -83,7 +83,15 @@ public int hashCode() { **/ public enum ConnectionType { Basic("BASIC"), - ; + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ConnectionType.class); private final String value; private static java.util.Map map; @@ -91,7 +99,9 @@ public enum ConnectionType { static { map = new java.util.HashMap<>(); for (ConnectionType v : ConnectionType.values()) { - map.put(v.getValue(), v); + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } } } @@ -109,7 +119,10 @@ public static ConnectionType create(String key) { if (map.containsKey(key)) { return map.get(key); } - throw new IllegalArgumentException("Invalid ConnectionType: " + key); + LOG.warn( + "Received unknown value '{}' for enum 'ConnectionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; } }; } diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseDiagnosticsAndManagementFeatureConfiguration.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseDiagnosticsAndManagementFeatureConfiguration.java index fa2b5fb4e07..fec7bd95b93 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseDiagnosticsAndManagementFeatureConfiguration.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseDiagnosticsAndManagementFeatureConfiguration.java @@ -136,7 +136,15 @@ public DatabaseDiagnosticsAndManagementFeatureConfiguration( public enum LicenseModel { LicenseIncluded("LICENSE_INCLUDED"), BringYourOwnLicense("BRING_YOUR_OWN_LICENSE"), - ; + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LicenseModel.class); private final String value; private static java.util.Map map; @@ -144,7 +152,9 @@ public enum LicenseModel { static { map = new java.util.HashMap<>(); for (LicenseModel v : LicenseModel.values()) { - map.put(v.getValue(), v); + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } } } @@ -162,7 +172,10 @@ public static LicenseModel create(String key) { if (map.containsKey(key)) { return map.get(key); } - throw new IllegalArgumentException("Invalid LicenseModel: " + key); + LOG.warn( + "Received unknown value '{}' for enum 'LicenseModel', returning UnknownEnumValue", + key); + return UnknownEnumValue; } }; /** diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseFeatureConfiguration.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseFeatureConfiguration.java index 17d488dbd39..636d39e3122 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseFeatureConfiguration.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseFeatureConfiguration.java @@ -25,6 +25,14 @@ @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = DatabaseDiagnosticsAndManagementFeatureConfiguration.class, name = "DIAGNOSTICS_AND_MANAGEMENT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DatabaseLifecycleFeatureConfiguration.class, + name = "DB_LIFECYCLE_MANAGEMENT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DatabaseSqlWatchFeatureConfiguration.class, + name = "SQLWATCH" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) @@ -61,7 +69,15 @@ public enum FeatureStatus { PendingDisable("PENDING_DISABLE"), Enabling("ENABLING"), Disabling("DISABLING"), - ; + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(FeatureStatus.class); private final String value; private static java.util.Map map; @@ -69,7 +85,9 @@ public enum FeatureStatus { static { map = new java.util.HashMap<>(); for (FeatureStatus v : FeatureStatus.values()) { - map.put(v.getValue(), v); + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } } } @@ -87,7 +105,10 @@ public static FeatureStatus create(String key) { if (map.containsKey(key)) { return map.get(key); } - throw new IllegalArgumentException("Invalid FeatureStatus: " + key); + LOG.warn( + "Received unknown value '{}' for enum 'FeatureStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; } }; /** diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseFeatureDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseFeatureDetails.java index 294c0259625..b0143fa3beb 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseFeatureDetails.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseFeatureDetails.java @@ -25,6 +25,14 @@ @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = DatabaseDiagnosticsAndManagementFeatureDetails.class, name = "DIAGNOSTICS_AND_MANAGEMENT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DatabaseLifecycleManagementFeatureDetails.class, + name = "DB_LIFECYCLE_MANAGEMENT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DatabaseSqlWatchFeatureDetails.class, + name = "SQLWATCH" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseLifecycleFeatureConfiguration.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseLifecycleFeatureConfiguration.java new file mode 100644 index 00000000000..c205d1609dc --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseLifecycleFeatureConfiguration.java @@ -0,0 +1,236 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.model; + +/** + * The details required to enable the Database Lifecycle Management feature. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DatabaseLifecycleFeatureConfiguration.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "feature" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DatabaseLifecycleFeatureConfiguration extends DatabaseFeatureConfiguration { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("featureStatus") + private FeatureStatus featureStatus; + + public Builder featureStatus(FeatureStatus featureStatus) { + this.featureStatus = featureStatus; + this.__explicitlySet__.add("featureStatus"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectorDetails") + private ConnectorDetails connectorDetails; + + public Builder connectorDetails(ConnectorDetails connectorDetails) { + this.connectorDetails = connectorDetails; + this.__explicitlySet__.add("connectorDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseConnectionDetails") + private DatabaseConnectionDetails databaseConnectionDetails; + + public Builder databaseConnectionDetails( + DatabaseConnectionDetails databaseConnectionDetails) { + this.databaseConnectionDetails = databaseConnectionDetails; + this.__explicitlySet__.add("databaseConnectionDetails"); + return this; + } + /** + * The Oracle license model that applies to the external database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private LicenseModel licenseModel; + + /** + * The Oracle license model that applies to the external database. + * + * @param licenseModel the value to set + * @return this builder + **/ + public Builder licenseModel(LicenseModel licenseModel) { + this.licenseModel = licenseModel; + this.__explicitlySet__.add("licenseModel"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DatabaseLifecycleFeatureConfiguration build() { + DatabaseLifecycleFeatureConfiguration model = + new DatabaseLifecycleFeatureConfiguration( + this.featureStatus, + this.connectorDetails, + this.databaseConnectionDetails, + this.licenseModel); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DatabaseLifecycleFeatureConfiguration model) { + if (model.wasPropertyExplicitlySet("featureStatus")) { + this.featureStatus(model.getFeatureStatus()); + } + if (model.wasPropertyExplicitlySet("connectorDetails")) { + this.connectorDetails(model.getConnectorDetails()); + } + if (model.wasPropertyExplicitlySet("databaseConnectionDetails")) { + this.databaseConnectionDetails(model.getDatabaseConnectionDetails()); + } + if (model.wasPropertyExplicitlySet("licenseModel")) { + this.licenseModel(model.getLicenseModel()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DatabaseLifecycleFeatureConfiguration( + FeatureStatus featureStatus, + ConnectorDetails connectorDetails, + DatabaseConnectionDetails databaseConnectionDetails, + LicenseModel licenseModel) { + super(featureStatus, connectorDetails, databaseConnectionDetails); + this.licenseModel = licenseModel; + } + + /** + * The Oracle license model that applies to the external database. + * + **/ + public enum LicenseModel { + LicenseIncluded("LICENSE_INCLUDED"), + BringYourOwnLicense("BRING_YOUR_OWN_LICENSE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LicenseModel.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LicenseModel v : LicenseModel.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LicenseModel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LicenseModel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LicenseModel', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The Oracle license model that applies to the external database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private final LicenseModel licenseModel; + + /** + * The Oracle license model that applies to the external database. + * + * @return the value + **/ + public LicenseModel getLicenseModel() { + return licenseModel; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DatabaseLifecycleFeatureConfiguration("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", licenseModel=").append(String.valueOf(this.licenseModel)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DatabaseLifecycleFeatureConfiguration)) { + return false; + } + + DatabaseLifecycleFeatureConfiguration other = (DatabaseLifecycleFeatureConfiguration) o; + return java.util.Objects.equals(this.licenseModel, other.licenseModel) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.licenseModel == null ? 43 : this.licenseModel.hashCode()); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseLifecycleManagementFeatureDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseLifecycleManagementFeatureDetails.java new file mode 100644 index 00000000000..2bd00940d2e --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseLifecycleManagementFeatureDetails.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.model; + +/** + * The details required to enable the Database Lifecycle Management feature. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DatabaseLifecycleManagementFeatureDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "feature" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DatabaseLifecycleManagementFeatureDetails extends DatabaseFeatureDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("databaseConnectionDetails") + private DatabaseConnectionDetails databaseConnectionDetails; + + public Builder databaseConnectionDetails( + DatabaseConnectionDetails databaseConnectionDetails) { + this.databaseConnectionDetails = databaseConnectionDetails; + this.__explicitlySet__.add("databaseConnectionDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectorDetails") + private ConnectorDetails connectorDetails; + + public Builder connectorDetails(ConnectorDetails connectorDetails) { + this.connectorDetails = connectorDetails; + this.__explicitlySet__.add("connectorDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DatabaseLifecycleManagementFeatureDetails build() { + DatabaseLifecycleManagementFeatureDetails model = + new DatabaseLifecycleManagementFeatureDetails( + this.databaseConnectionDetails, this.connectorDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DatabaseLifecycleManagementFeatureDetails model) { + if (model.wasPropertyExplicitlySet("databaseConnectionDetails")) { + this.databaseConnectionDetails(model.getDatabaseConnectionDetails()); + } + if (model.wasPropertyExplicitlySet("connectorDetails")) { + this.connectorDetails(model.getConnectorDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DatabaseLifecycleManagementFeatureDetails( + DatabaseConnectionDetails databaseConnectionDetails, + ConnectorDetails connectorDetails) { + super(databaseConnectionDetails, connectorDetails); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DatabaseLifecycleManagementFeatureDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DatabaseLifecycleManagementFeatureDetails)) { + return false; + } + + DatabaseLifecycleManagementFeatureDetails other = + (DatabaseLifecycleManagementFeatureDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseNamedCredentialConnectionDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseNamedCredentialConnectionDetails.java new file mode 100644 index 00000000000..74a1f08d54b --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseNamedCredentialConnectionDetails.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.model; + +/** + * User provides a named credential OCID, which will be used to retrieve the password to connect to the database. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DatabaseNamedCredentialConnectionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "credentialType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DatabaseNamedCredentialConnectionDetails extends DatabaseConnectionCredentials { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Named Credential + * where the database password metadata is stored. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namedCredentialId") + private String namedCredentialId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Named Credential + * where the database password metadata is stored. + * + * @param namedCredentialId the value to set + * @return this builder + **/ + public Builder namedCredentialId(String namedCredentialId) { + this.namedCredentialId = namedCredentialId; + this.__explicitlySet__.add("namedCredentialId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DatabaseNamedCredentialConnectionDetails build() { + DatabaseNamedCredentialConnectionDetails model = + new DatabaseNamedCredentialConnectionDetails(this.namedCredentialId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DatabaseNamedCredentialConnectionDetails model) { + if (model.wasPropertyExplicitlySet("namedCredentialId")) { + this.namedCredentialId(model.getNamedCredentialId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DatabaseNamedCredentialConnectionDetails(String namedCredentialId) { + super(); + this.namedCredentialId = namedCredentialId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Named Credential + * where the database password metadata is stored. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namedCredentialId") + private final String namedCredentialId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Named Credential + * where the database password metadata is stored. + * + * @return the value + **/ + public String getNamedCredentialId() { + return namedCredentialId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DatabaseNamedCredentialConnectionDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", namedCredentialId=").append(String.valueOf(this.namedCredentialId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DatabaseNamedCredentialConnectionDetails)) { + return false; + } + + DatabaseNamedCredentialConnectionDetails other = + (DatabaseNamedCredentialConnectionDetails) o; + return java.util.Objects.equals(this.namedCredentialId, other.namedCredentialId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.namedCredentialId == null ? 43 : this.namedCredentialId.hashCode()); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseSqlWatchFeatureConfiguration.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseSqlWatchFeatureConfiguration.java new file mode 100644 index 00000000000..4f2729b966a --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseSqlWatchFeatureConfiguration.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.model; + +/** + * The details required to enable the SQL Watch feature. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DatabaseSqlWatchFeatureConfiguration.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "feature" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DatabaseSqlWatchFeatureConfiguration extends DatabaseFeatureConfiguration { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("featureStatus") + private FeatureStatus featureStatus; + + public Builder featureStatus(FeatureStatus featureStatus) { + this.featureStatus = featureStatus; + this.__explicitlySet__.add("featureStatus"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectorDetails") + private ConnectorDetails connectorDetails; + + public Builder connectorDetails(ConnectorDetails connectorDetails) { + this.connectorDetails = connectorDetails; + this.__explicitlySet__.add("connectorDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseConnectionDetails") + private DatabaseConnectionDetails databaseConnectionDetails; + + public Builder databaseConnectionDetails( + DatabaseConnectionDetails databaseConnectionDetails) { + this.databaseConnectionDetails = databaseConnectionDetails; + this.__explicitlySet__.add("databaseConnectionDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DatabaseSqlWatchFeatureConfiguration build() { + DatabaseSqlWatchFeatureConfiguration model = + new DatabaseSqlWatchFeatureConfiguration( + this.featureStatus, + this.connectorDetails, + this.databaseConnectionDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DatabaseSqlWatchFeatureConfiguration model) { + if (model.wasPropertyExplicitlySet("featureStatus")) { + this.featureStatus(model.getFeatureStatus()); + } + if (model.wasPropertyExplicitlySet("connectorDetails")) { + this.connectorDetails(model.getConnectorDetails()); + } + if (model.wasPropertyExplicitlySet("databaseConnectionDetails")) { + this.databaseConnectionDetails(model.getDatabaseConnectionDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DatabaseSqlWatchFeatureConfiguration( + FeatureStatus featureStatus, + ConnectorDetails connectorDetails, + DatabaseConnectionDetails databaseConnectionDetails) { + super(featureStatus, connectorDetails, databaseConnectionDetails); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DatabaseSqlWatchFeatureConfiguration("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DatabaseSqlWatchFeatureConfiguration)) { + return false; + } + + DatabaseSqlWatchFeatureConfiguration other = (DatabaseSqlWatchFeatureConfiguration) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseSqlWatchFeatureDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseSqlWatchFeatureDetails.java new file mode 100644 index 00000000000..54470276c6d --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DatabaseSqlWatchFeatureDetails.java @@ -0,0 +1,129 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.model; + +/** + * The details required to enable the SQL Watch feature. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DatabaseSqlWatchFeatureDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "feature" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DatabaseSqlWatchFeatureDetails extends DatabaseFeatureDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("databaseConnectionDetails") + private DatabaseConnectionDetails databaseConnectionDetails; + + public Builder databaseConnectionDetails( + DatabaseConnectionDetails databaseConnectionDetails) { + this.databaseConnectionDetails = databaseConnectionDetails; + this.__explicitlySet__.add("databaseConnectionDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectorDetails") + private ConnectorDetails connectorDetails; + + public Builder connectorDetails(ConnectorDetails connectorDetails) { + this.connectorDetails = connectorDetails; + this.__explicitlySet__.add("connectorDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DatabaseSqlWatchFeatureDetails build() { + DatabaseSqlWatchFeatureDetails model = + new DatabaseSqlWatchFeatureDetails( + this.databaseConnectionDetails, this.connectorDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DatabaseSqlWatchFeatureDetails model) { + if (model.wasPropertyExplicitlySet("databaseConnectionDetails")) { + this.databaseConnectionDetails(model.getDatabaseConnectionDetails()); + } + if (model.wasPropertyExplicitlySet("connectorDetails")) { + this.connectorDetails(model.getConnectorDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DatabaseSqlWatchFeatureDetails( + DatabaseConnectionDetails databaseConnectionDetails, + ConnectorDetails connectorDetails) { + super(databaseConnectionDetails, connectorDetails); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DatabaseSqlWatchFeatureDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DatabaseSqlWatchFeatureDetails)) { + return false; + } + + DatabaseSqlWatchFeatureDetails other = (DatabaseSqlWatchFeatureDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DbManagementFeature.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DbManagementFeature.java index 89969dd141c..47eb0bb5234 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DbManagementFeature.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DbManagementFeature.java @@ -14,7 +14,17 @@ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") public enum DbManagementFeature { DiagnosticsAndManagement("DIAGNOSTICS_AND_MANAGEMENT"), - ; + DbLifecycleManagement("DB_LIFECYCLE_MANAGEMENT"), + Sqlwatch("SQLWATCH"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DbManagementFeature.class); private final String value; private static java.util.Map map; @@ -22,7 +32,9 @@ public enum DbManagementFeature { static { map = new java.util.HashMap<>(); for (DbManagementFeature v : DbManagementFeature.values()) { - map.put(v.getValue(), v); + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } } } @@ -40,6 +52,9 @@ public static DbManagementFeature create(String key) { if (map.containsKey(key)) { return map.get(key); } - throw new IllegalArgumentException("Invalid DbManagementFeature: " + key); + LOG.warn( + "Received unknown value '{}' for enum 'DbManagementFeature', returning UnknownEnumValue", + key); + return UnknownEnumValue; } } diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DbManagementPrivateEndpoint.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DbManagementPrivateEndpoint.java index bd4f6bdfe7c..854da422deb 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DbManagementPrivateEndpoint.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DbManagementPrivateEndpoint.java @@ -27,6 +27,7 @@ public final class DbManagementPrivateEndpoint "name", "compartmentId", "isCluster", + "isDnsResolutionEnabled", "vcnId", "subnetId", "privateIp", @@ -43,6 +44,7 @@ public DbManagementPrivateEndpoint( String name, String compartmentId, Boolean isCluster, + Boolean isDnsResolutionEnabled, String vcnId, String subnetId, String privateIp, @@ -58,6 +60,7 @@ public DbManagementPrivateEndpoint( this.name = name; this.compartmentId = compartmentId; this.isCluster = isCluster; + this.isDnsResolutionEnabled = isDnsResolutionEnabled; this.vcnId = vcnId; this.subnetId = subnetId; this.privateIp = privateIp; @@ -136,6 +139,22 @@ public Builder isCluster(Boolean isCluster) { this.__explicitlySet__.add("isCluster"); return this; } + /** + * Specifies whether the Database Management private endpoint has DNS proxy server enabled to resolve private host name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDnsResolutionEnabled") + private Boolean isDnsResolutionEnabled; + + /** + * Specifies whether the Database Management private endpoint has DNS proxy server enabled to resolve private host name. + * @param isDnsResolutionEnabled the value to set + * @return this builder + **/ + public Builder isDnsResolutionEnabled(Boolean isDnsResolutionEnabled) { + this.isDnsResolutionEnabled = isDnsResolutionEnabled; + this.__explicitlySet__.add("isDnsResolutionEnabled"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the VCN. **/ @@ -334,6 +353,7 @@ public DbManagementPrivateEndpoint build() { this.name, this.compartmentId, this.isCluster, + this.isDnsResolutionEnabled, this.vcnId, this.subnetId, this.privateIp, @@ -364,6 +384,9 @@ public Builder copy(DbManagementPrivateEndpoint model) { if (model.wasPropertyExplicitlySet("isCluster")) { this.isCluster(model.getIsCluster()); } + if (model.wasPropertyExplicitlySet("isDnsResolutionEnabled")) { + this.isDnsResolutionEnabled(model.getIsDnsResolutionEnabled()); + } if (model.wasPropertyExplicitlySet("vcnId")) { this.vcnId(model.getVcnId()); } @@ -465,6 +488,20 @@ public Boolean getIsCluster() { return isCluster; } + /** + * Specifies whether the Database Management private endpoint has DNS proxy server enabled to resolve private host name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDnsResolutionEnabled") + private final Boolean isDnsResolutionEnabled; + + /** + * Specifies whether the Database Management private endpoint has DNS proxy server enabled to resolve private host name. + * @return the value + **/ + public Boolean getIsDnsResolutionEnabled() { + return isDnsResolutionEnabled; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the VCN. **/ @@ -649,6 +686,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", name=").append(String.valueOf(this.name)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", isCluster=").append(String.valueOf(this.isCluster)); + sb.append(", isDnsResolutionEnabled=").append(String.valueOf(this.isDnsResolutionEnabled)); sb.append(", vcnId=").append(String.valueOf(this.vcnId)); sb.append(", subnetId=").append(String.valueOf(this.subnetId)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); @@ -677,6 +715,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.name, other.name) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.isCluster, other.isCluster) + && java.util.Objects.equals( + this.isDnsResolutionEnabled, other.isDnsResolutionEnabled) && java.util.Objects.equals(this.vcnId, other.vcnId) && java.util.Objects.equals(this.subnetId, other.subnetId) && java.util.Objects.equals(this.privateIp, other.privateIp) @@ -700,6 +740,11 @@ public int hashCode() { (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.isCluster == null ? 43 : this.isCluster.hashCode()); + result = + (result * PRIME) + + (this.isDnsResolutionEnabled == null + ? 43 + : this.isDnsResolutionEnabled.hashCode()); result = (result * PRIME) + (this.vcnId == null ? 43 : this.vcnId.hashCode()); result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DeploymentType.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DeploymentType.java index 950efe3a811..dbe03985ae9 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DeploymentType.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DeploymentType.java @@ -13,6 +13,7 @@ * - EXADATA: Exadata infrastructure in Oracle Cloud. * - EXADATA_CC: Exadata Cloud@Customer infrastructure in customer's data center. * - AUTONOMOUS: Oracle Autonomous Cloud infrastructure + * - EXADATA_XS: Exadata Exascale on virtual infrastructure * **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") @@ -23,6 +24,7 @@ public enum DeploymentType { Exadata("EXADATA"), ExadataCc("EXADATA_CC"), Autonomous("AUTONOMOUS"), + ExadataXs("EXADATA_XS"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DirectConnectorDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DirectConnectorDetails.java new file mode 100644 index 00000000000..4f06c46e398 --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DirectConnectorDetails.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.model; + +/** + * The connector details required to connect to an Autonomous Database. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DirectConnectorDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "connectorType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DirectConnectorDetails extends ConnectorDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DirectConnectorDetails build() { + DirectConnectorDetails model = new DirectConnectorDetails(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DirectConnectorDetails model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DirectConnectorDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DirectConnectorDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DirectConnectorDetails)) { + return false; + } + + DirectConnectorDetails other = (DirectConnectorDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DisableAutonomousDatabaseManagementFeatureDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DisableAutonomousDatabaseManagementFeatureDetails.java new file mode 100644 index 00000000000..ad3904766e2 --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/DisableAutonomousDatabaseManagementFeatureDetails.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.model; + +/** + * The details required to disable a Database Management feature for an Autonomous Database. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DisableAutonomousDatabaseManagementFeatureDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DisableAutonomousDatabaseManagementFeatureDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"feature"}) + public DisableAutonomousDatabaseManagementFeatureDetails(DbManagementFeature feature) { + super(); + this.feature = feature; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the Database Management feature. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("feature") + private DbManagementFeature feature; + + /** + * The name of the Database Management feature. + * @param feature the value to set + * @return this builder + **/ + public Builder feature(DbManagementFeature feature) { + this.feature = feature; + this.__explicitlySet__.add("feature"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DisableAutonomousDatabaseManagementFeatureDetails build() { + DisableAutonomousDatabaseManagementFeatureDetails model = + new DisableAutonomousDatabaseManagementFeatureDetails(this.feature); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DisableAutonomousDatabaseManagementFeatureDetails model) { + if (model.wasPropertyExplicitlySet("feature")) { + this.feature(model.getFeature()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the Database Management feature. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("feature") + private final DbManagementFeature feature; + + /** + * The name of the Database Management feature. + * @return the value + **/ + public DbManagementFeature getFeature() { + return feature; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DisableAutonomousDatabaseManagementFeatureDetails("); + sb.append("super=").append(super.toString()); + sb.append("feature=").append(String.valueOf(this.feature)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DisableAutonomousDatabaseManagementFeatureDetails)) { + return false; + } + + DisableAutonomousDatabaseManagementFeatureDetails other = + (DisableAutonomousDatabaseManagementFeatureDetails) o; + return java.util.Objects.equals(this.feature, other.feature) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.feature == null ? 43 : this.feature.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/EnableAutonomousDatabaseManagementFeatureDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/EnableAutonomousDatabaseManagementFeatureDetails.java new file mode 100644 index 00000000000..1b4bbde967f --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/EnableAutonomousDatabaseManagementFeatureDetails.java @@ -0,0 +1,127 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.model; + +/** + * The details required to enable a Database Management feature for an Autonomous Database. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = EnableAutonomousDatabaseManagementFeatureDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class EnableAutonomousDatabaseManagementFeatureDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"featureDetails"}) + public EnableAutonomousDatabaseManagementFeatureDetails( + AutonomousDatabaseFeatureDetails featureDetails) { + super(); + this.featureDetails = featureDetails; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("featureDetails") + private AutonomousDatabaseFeatureDetails featureDetails; + + public Builder featureDetails(AutonomousDatabaseFeatureDetails featureDetails) { + this.featureDetails = featureDetails; + this.__explicitlySet__.add("featureDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public EnableAutonomousDatabaseManagementFeatureDetails build() { + EnableAutonomousDatabaseManagementFeatureDetails model = + new EnableAutonomousDatabaseManagementFeatureDetails(this.featureDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(EnableAutonomousDatabaseManagementFeatureDetails model) { + if (model.wasPropertyExplicitlySet("featureDetails")) { + this.featureDetails(model.getFeatureDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("featureDetails") + private final AutonomousDatabaseFeatureDetails featureDetails; + + public AutonomousDatabaseFeatureDetails getFeatureDetails() { + return featureDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("EnableAutonomousDatabaseManagementFeatureDetails("); + sb.append("super=").append(super.toString()); + sb.append("featureDetails=").append(String.valueOf(this.featureDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof EnableAutonomousDatabaseManagementFeatureDetails)) { + return false; + } + + EnableAutonomousDatabaseManagementFeatureDetails other = + (EnableAutonomousDatabaseManagementFeatureDetails) o; + return java.util.Objects.equals(this.featureDetails, other.featureDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.featureDetails == null ? 43 : this.featureDetails.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalDatabaseFeatureDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalDatabaseFeatureDetails.java index 5d75ee06955..5ed9f789136 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalDatabaseFeatureDetails.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalDatabaseFeatureDetails.java @@ -22,6 +22,14 @@ defaultImpl = ExternalDatabaseFeatureDetails.class ) @com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ExternalDatabaseLifecycleManagementFeatureDetails.class, + name = "DB_LIFECYCLE_MANAGEMENT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ExternalDatabaseSqlWatchFeatureDetails.class, + name = "SQLWATCH" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = ExternalDatabaseDiagnosticsAndManagementFeatureDetails.class, name = "DIAGNOSTICS_AND_MANAGEMENT" diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalDatabaseLifecycleManagementFeatureDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalDatabaseLifecycleManagementFeatureDetails.java new file mode 100644 index 00000000000..831c976476a --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalDatabaseLifecycleManagementFeatureDetails.java @@ -0,0 +1,194 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.model; + +/** + * The details required to enable the Database Lifecycle Management feature. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExternalDatabaseLifecycleManagementFeatureDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "feature" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExternalDatabaseLifecycleManagementFeatureDetails + extends ExternalDatabaseFeatureDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("connectorDetails") + private ConnectorDetails connectorDetails; + + public Builder connectorDetails(ConnectorDetails connectorDetails) { + this.connectorDetails = connectorDetails; + this.__explicitlySet__.add("connectorDetails"); + return this; + } + /** + * The Oracle license model that applies to the external database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private LicenseModel licenseModel; + + /** + * The Oracle license model that applies to the external database. + * + * @param licenseModel the value to set + * @return this builder + **/ + public Builder licenseModel(LicenseModel licenseModel) { + this.licenseModel = licenseModel; + this.__explicitlySet__.add("licenseModel"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExternalDatabaseLifecycleManagementFeatureDetails build() { + ExternalDatabaseLifecycleManagementFeatureDetails model = + new ExternalDatabaseLifecycleManagementFeatureDetails( + this.connectorDetails, this.licenseModel); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExternalDatabaseLifecycleManagementFeatureDetails model) { + if (model.wasPropertyExplicitlySet("connectorDetails")) { + this.connectorDetails(model.getConnectorDetails()); + } + if (model.wasPropertyExplicitlySet("licenseModel")) { + this.licenseModel(model.getLicenseModel()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ExternalDatabaseLifecycleManagementFeatureDetails( + ConnectorDetails connectorDetails, LicenseModel licenseModel) { + super(connectorDetails); + this.licenseModel = licenseModel; + } + + /** + * The Oracle license model that applies to the external database. + * + **/ + public enum LicenseModel { + LicenseIncluded("LICENSE_INCLUDED"), + BringYourOwnLicense("BRING_YOUR_OWN_LICENSE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LicenseModel v : LicenseModel.values()) { + map.put(v.getValue(), v); + } + } + + LicenseModel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LicenseModel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid LicenseModel: " + key); + } + }; + /** + * The Oracle license model that applies to the external database. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("licenseModel") + private final LicenseModel licenseModel; + + /** + * The Oracle license model that applies to the external database. + * + * @return the value + **/ + public LicenseModel getLicenseModel() { + return licenseModel; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExternalDatabaseLifecycleManagementFeatureDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", licenseModel=").append(String.valueOf(this.licenseModel)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExternalDatabaseLifecycleManagementFeatureDetails)) { + return false; + } + + ExternalDatabaseLifecycleManagementFeatureDetails other = + (ExternalDatabaseLifecycleManagementFeatureDetails) o; + return java.util.Objects.equals(this.licenseModel, other.licenseModel) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.licenseModel == null ? 43 : this.licenseModel.hashCode()); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalDatabaseSqlWatchFeatureDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalDatabaseSqlWatchFeatureDetails.java new file mode 100644 index 00000000000..d700345cca5 --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalDatabaseSqlWatchFeatureDetails.java @@ -0,0 +1,113 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.model; + +/** + * The details required to enable the SQL Watch feature. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExternalDatabaseSqlWatchFeatureDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "feature" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExternalDatabaseSqlWatchFeatureDetails extends ExternalDatabaseFeatureDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("connectorDetails") + private ConnectorDetails connectorDetails; + + public Builder connectorDetails(ConnectorDetails connectorDetails) { + this.connectorDetails = connectorDetails; + this.__explicitlySet__.add("connectorDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExternalDatabaseSqlWatchFeatureDetails build() { + ExternalDatabaseSqlWatchFeatureDetails model = + new ExternalDatabaseSqlWatchFeatureDetails(this.connectorDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExternalDatabaseSqlWatchFeatureDetails model) { + if (model.wasPropertyExplicitlySet("connectorDetails")) { + this.connectorDetails(model.getConnectorDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ExternalDatabaseSqlWatchFeatureDetails(ConnectorDetails connectorDetails) { + super(connectorDetails); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExternalDatabaseSqlWatchFeatureDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExternalDatabaseSqlWatchFeatureDetails)) { + return false; + } + + ExternalDatabaseSqlWatchFeatureDetails other = (ExternalDatabaseSqlWatchFeatureDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalDatabaseSummary.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalDatabaseSummary.java index 88391dc0b2f..8e2bfe56ea1 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalDatabaseSummary.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalDatabaseSummary.java @@ -38,7 +38,10 @@ public final class ExternalDatabaseSummary "timeCreated", "freeformTags", "definedTags", - "systemTags" + "systemTags", + "dbmgmtFeatureConfigs", + "databaseVersion", + "databasePlatformName" }) public ExternalDatabaseSummary( String id, @@ -56,7 +59,10 @@ public ExternalDatabaseSummary( java.util.Date timeCreated, java.util.Map freeformTags, java.util.Map> definedTags, - java.util.Map> systemTags) { + java.util.Map> systemTags, + java.util.List dbmgmtFeatureConfigs, + String databaseVersion, + String databasePlatformName) { super(); this.id = id; this.displayName = displayName; @@ -74,6 +80,9 @@ public ExternalDatabaseSummary( this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; + this.dbmgmtFeatureConfigs = dbmgmtFeatureConfigs; + this.databaseVersion = databaseVersion; + this.databasePlatformName = databasePlatformName; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -351,6 +360,55 @@ public Builder systemTags(java.util.Map> s this.__explicitlySet__.add("systemTags"); return this; } + /** + * The list of feature configurations + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbmgmtFeatureConfigs") + private java.util.List dbmgmtFeatureConfigs; + + /** + * The list of feature configurations + * @param dbmgmtFeatureConfigs the value to set + * @return this builder + **/ + public Builder dbmgmtFeatureConfigs( + java.util.List dbmgmtFeatureConfigs) { + this.dbmgmtFeatureConfigs = dbmgmtFeatureConfigs; + this.__explicitlySet__.add("dbmgmtFeatureConfigs"); + return this; + } + /** + * The Oracle database version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseVersion") + private String databaseVersion; + + /** + * The Oracle database version. + * @param databaseVersion the value to set + * @return this builder + **/ + public Builder databaseVersion(String databaseVersion) { + this.databaseVersion = databaseVersion; + this.__explicitlySet__.add("databaseVersion"); + return this; + } + /** + * The operating system of database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databasePlatformName") + private String databasePlatformName; + + /** + * The operating system of database. + * @param databasePlatformName the value to set + * @return this builder + **/ + public Builder databasePlatformName(String databasePlatformName) { + this.databasePlatformName = databasePlatformName; + this.__explicitlySet__.add("databasePlatformName"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -373,7 +431,10 @@ public ExternalDatabaseSummary build() { this.timeCreated, this.freeformTags, this.definedTags, - this.systemTags); + this.systemTags, + this.dbmgmtFeatureConfigs, + this.databaseVersion, + this.databasePlatformName); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -430,6 +491,15 @@ public Builder copy(ExternalDatabaseSummary model) { if (model.wasPropertyExplicitlySet("systemTags")) { this.systemTags(model.getSystemTags()); } + if (model.wasPropertyExplicitlySet("dbmgmtFeatureConfigs")) { + this.dbmgmtFeatureConfigs(model.getDbmgmtFeatureConfigs()); + } + if (model.wasPropertyExplicitlySet("databaseVersion")) { + this.databaseVersion(model.getDatabaseVersion()); + } + if (model.wasPropertyExplicitlySet("databasePlatformName")) { + this.databasePlatformName(model.getDatabasePlatformName()); + } return this; } } @@ -738,6 +808,48 @@ public java.util.Map> getSystemTags() { return systemTags; } + /** + * The list of feature configurations + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbmgmtFeatureConfigs") + private final java.util.List dbmgmtFeatureConfigs; + + /** + * The list of feature configurations + * @return the value + **/ + public java.util.List getDbmgmtFeatureConfigs() { + return dbmgmtFeatureConfigs; + } + + /** + * The Oracle database version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseVersion") + private final String databaseVersion; + + /** + * The Oracle database version. + * @return the value + **/ + public String getDatabaseVersion() { + return databaseVersion; + } + + /** + * The operating system of database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databasePlatformName") + private final String databasePlatformName; + + /** + * The operating system of database. + * @return the value + **/ + public String getDatabasePlatformName() { + return databasePlatformName; + } + @Override public String toString() { return this.toString(true); @@ -769,6 +881,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", dbmgmtFeatureConfigs=").append(String.valueOf(this.dbmgmtFeatureConfigs)); + sb.append(", databaseVersion=").append(String.valueOf(this.databaseVersion)); + sb.append(", databasePlatformName=").append(String.valueOf(this.databasePlatformName)); sb.append(")"); return sb.toString(); } @@ -800,6 +915,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.dbmgmtFeatureConfigs, other.dbmgmtFeatureConfigs) + && java.util.Objects.equals(this.databaseVersion, other.databaseVersion) + && java.util.Objects.equals(this.databasePlatformName, other.databasePlatformName) && super.equals(other); } @@ -841,6 +959,19 @@ public int hashCode() { result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = + (result * PRIME) + + (this.dbmgmtFeatureConfigs == null + ? 43 + : this.dbmgmtFeatureConfigs.hashCode()); + result = + (result * PRIME) + + (this.databaseVersion == null ? 43 : this.databaseVersion.hashCode()); + result = + (result * PRIME) + + (this.databasePlatformName == null + ? 43 + : this.databasePlatformName.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalPluggableDatabaseFeatureDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalPluggableDatabaseFeatureDetails.java index 0e8e3bef450..7b5b3b9e6bc 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalPluggableDatabaseFeatureDetails.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalPluggableDatabaseFeatureDetails.java @@ -25,6 +25,14 @@ @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = ExternalPluggableDatabaseDiagnosticsAndManagementFeatureDetails.class, name = "DIAGNOSTICS_AND_MANAGEMENT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ExternalPluggableDatabaseLifecycleManagementFeatureDetails.class, + name = "DB_LIFECYCLE_MANAGEMENT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ExternalPluggableDatabaseSqlWatchFeatureDetails.class, + name = "SQLWATCH" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalPluggableDatabaseLifecycleManagementFeatureDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalPluggableDatabaseLifecycleManagementFeatureDetails.java new file mode 100644 index 00000000000..a364497afb7 --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalPluggableDatabaseLifecycleManagementFeatureDetails.java @@ -0,0 +1,117 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.model; + +/** + * The details required to enable the Database Lifecycle Management feature. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExternalPluggableDatabaseLifecycleManagementFeatureDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "feature" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExternalPluggableDatabaseLifecycleManagementFeatureDetails + extends ExternalPluggableDatabaseFeatureDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("connectorDetails") + private ConnectorDetails connectorDetails; + + public Builder connectorDetails(ConnectorDetails connectorDetails) { + this.connectorDetails = connectorDetails; + this.__explicitlySet__.add("connectorDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExternalPluggableDatabaseLifecycleManagementFeatureDetails build() { + ExternalPluggableDatabaseLifecycleManagementFeatureDetails model = + new ExternalPluggableDatabaseLifecycleManagementFeatureDetails( + this.connectorDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExternalPluggableDatabaseLifecycleManagementFeatureDetails model) { + if (model.wasPropertyExplicitlySet("connectorDetails")) { + this.connectorDetails(model.getConnectorDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ExternalPluggableDatabaseLifecycleManagementFeatureDetails( + ConnectorDetails connectorDetails) { + super(connectorDetails); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExternalPluggableDatabaseLifecycleManagementFeatureDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExternalPluggableDatabaseLifecycleManagementFeatureDetails)) { + return false; + } + + ExternalPluggableDatabaseLifecycleManagementFeatureDetails other = + (ExternalPluggableDatabaseLifecycleManagementFeatureDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalPluggableDatabaseSqlWatchFeatureDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalPluggableDatabaseSqlWatchFeatureDetails.java new file mode 100644 index 00000000000..4a42e700a4b --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ExternalPluggableDatabaseSqlWatchFeatureDetails.java @@ -0,0 +1,115 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.model; + +/** + * The details required to enable the SQL watch feature. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExternalPluggableDatabaseSqlWatchFeatureDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "feature" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExternalPluggableDatabaseSqlWatchFeatureDetails + extends ExternalPluggableDatabaseFeatureDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("connectorDetails") + private ConnectorDetails connectorDetails; + + public Builder connectorDetails(ConnectorDetails connectorDetails) { + this.connectorDetails = connectorDetails; + this.__explicitlySet__.add("connectorDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExternalPluggableDatabaseSqlWatchFeatureDetails build() { + ExternalPluggableDatabaseSqlWatchFeatureDetails model = + new ExternalPluggableDatabaseSqlWatchFeatureDetails(this.connectorDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExternalPluggableDatabaseSqlWatchFeatureDetails model) { + if (model.wasPropertyExplicitlySet("connectorDetails")) { + this.connectorDetails(model.getConnectorDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ExternalPluggableDatabaseSqlWatchFeatureDetails(ConnectorDetails connectorDetails) { + super(connectorDetails); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExternalPluggableDatabaseSqlWatchFeatureDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExternalPluggableDatabaseSqlWatchFeatureDetails)) { + return false; + } + + ExternalPluggableDatabaseSqlWatchFeatureDetails other = + (ExternalPluggableDatabaseSqlWatchFeatureDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ManagedDatabase.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ManagedDatabase.java index 788a1c40f17..3f8420af43c 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ManagedDatabase.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ManagedDatabase.java @@ -45,7 +45,9 @@ public final class ManagedDatabase extends com.oracle.bmc.http.internal.Explicit "additionalDetails", "freeformTags", "definedTags", - "systemTags" + "systemTags", + "dbmgmtFeatureConfigs", + "databasePlatformName" }) public ManagedDatabase( String id, @@ -73,7 +75,9 @@ public ManagedDatabase( java.util.Map additionalDetails, java.util.Map freeformTags, java.util.Map> definedTags, - java.util.Map> systemTags) { + java.util.Map> systemTags, + java.util.List dbmgmtFeatureConfigs, + String databasePlatformName) { super(); this.id = id; this.compartmentId = compartmentId; @@ -101,6 +105,8 @@ public ManagedDatabase( this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; + this.dbmgmtFeatureConfigs = dbmgmtFeatureConfigs; + this.databasePlatformName = databasePlatformName; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -570,6 +576,39 @@ public Builder systemTags(java.util.Map> s this.__explicitlySet__.add("systemTags"); return this; } + /** + * The list of feature configurations + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbmgmtFeatureConfigs") + private java.util.List dbmgmtFeatureConfigs; + + /** + * The list of feature configurations + * @param dbmgmtFeatureConfigs the value to set + * @return this builder + **/ + public Builder dbmgmtFeatureConfigs( + java.util.List dbmgmtFeatureConfigs) { + this.dbmgmtFeatureConfigs = dbmgmtFeatureConfigs; + this.__explicitlySet__.add("dbmgmtFeatureConfigs"); + return this; + } + /** + * The operating system of database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databasePlatformName") + private String databasePlatformName; + + /** + * The operating system of database. + * @param databasePlatformName the value to set + * @return this builder + **/ + public Builder databasePlatformName(String databasePlatformName) { + this.databasePlatformName = databasePlatformName; + this.__explicitlySet__.add("databasePlatformName"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -602,7 +641,9 @@ public ManagedDatabase build() { this.additionalDetails, this.freeformTags, this.definedTags, - this.systemTags); + this.systemTags, + this.dbmgmtFeatureConfigs, + this.databasePlatformName); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -689,6 +730,12 @@ public Builder copy(ManagedDatabase model) { if (model.wasPropertyExplicitlySet("systemTags")) { this.systemTags(model.getSystemTags()); } + if (model.wasPropertyExplicitlySet("dbmgmtFeatureConfigs")) { + this.dbmgmtFeatureConfigs(model.getDbmgmtFeatureConfigs()); + } + if (model.wasPropertyExplicitlySet("databasePlatformName")) { + this.databasePlatformName(model.getDatabasePlatformName()); + } return this; } } @@ -1116,6 +1163,34 @@ public java.util.Map> getSystemTags() { return systemTags; } + /** + * The list of feature configurations + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbmgmtFeatureConfigs") + private final java.util.List dbmgmtFeatureConfigs; + + /** + * The list of feature configurations + * @return the value + **/ + public java.util.List getDbmgmtFeatureConfigs() { + return dbmgmtFeatureConfigs; + } + + /** + * The operating system of database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databasePlatformName") + private final String databasePlatformName; + + /** + * The operating system of database. + * @return the value + **/ + public String getDatabasePlatformName() { + return databasePlatformName; + } + @Override public String toString() { return this.toString(true); @@ -1157,6 +1232,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", dbmgmtFeatureConfigs=").append(String.valueOf(this.dbmgmtFeatureConfigs)); + sb.append(", databasePlatformName=").append(String.valueOf(this.databasePlatformName)); sb.append(")"); return sb.toString(); } @@ -1198,6 +1275,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.dbmgmtFeatureConfigs, other.dbmgmtFeatureConfigs) + && java.util.Objects.equals(this.databasePlatformName, other.databasePlatformName) && super.equals(other); } @@ -1265,6 +1344,16 @@ public int hashCode() { result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = + (result * PRIME) + + (this.dbmgmtFeatureConfigs == null + ? 43 + : this.dbmgmtFeatureConfigs.hashCode()); + result = + (result * PRIME) + + (this.databasePlatformName == null + ? 43 + : this.databasePlatformName.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ManagedDatabaseSummary.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ManagedDatabaseSummary.java index ffb6c4b971e..fc3122a00ac 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ManagedDatabaseSummary.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ManagedDatabaseSummary.java @@ -39,7 +39,9 @@ public final class ManagedDatabaseSummary "databaseVersion", "freeformTags", "definedTags", - "systemTags" + "systemTags", + "dbmgmtFeatureConfigs", + "databasePlatformName" }) public ManagedDatabaseSummary( String id, @@ -58,7 +60,9 @@ public ManagedDatabaseSummary( String databaseVersion, java.util.Map freeformTags, java.util.Map> definedTags, - java.util.Map> systemTags) { + java.util.Map> systemTags, + java.util.List dbmgmtFeatureConfigs, + String databasePlatformName) { super(); this.id = id; this.compartmentId = compartmentId; @@ -77,6 +81,8 @@ public ManagedDatabaseSummary( this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; + this.dbmgmtFeatureConfigs = dbmgmtFeatureConfigs; + this.databasePlatformName = databasePlatformName; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -388,6 +394,39 @@ public Builder systemTags(java.util.Map> s this.__explicitlySet__.add("systemTags"); return this; } + /** + * The list of feature configurations + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbmgmtFeatureConfigs") + private java.util.List dbmgmtFeatureConfigs; + + /** + * The list of feature configurations + * @param dbmgmtFeatureConfigs the value to set + * @return this builder + **/ + public Builder dbmgmtFeatureConfigs( + java.util.List dbmgmtFeatureConfigs) { + this.dbmgmtFeatureConfigs = dbmgmtFeatureConfigs; + this.__explicitlySet__.add("dbmgmtFeatureConfigs"); + return this; + } + /** + * The operating system of database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databasePlatformName") + private String databasePlatformName; + + /** + * The operating system of database. + * @param databasePlatformName the value to set + * @return this builder + **/ + public Builder databasePlatformName(String databasePlatformName) { + this.databasePlatformName = databasePlatformName; + this.__explicitlySet__.add("databasePlatformName"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -411,7 +450,9 @@ public ManagedDatabaseSummary build() { this.databaseVersion, this.freeformTags, this.definedTags, - this.systemTags); + this.systemTags, + this.dbmgmtFeatureConfigs, + this.databasePlatformName); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -471,6 +512,12 @@ public Builder copy(ManagedDatabaseSummary model) { if (model.wasPropertyExplicitlySet("systemTags")) { this.systemTags(model.getSystemTags()); } + if (model.wasPropertyExplicitlySet("dbmgmtFeatureConfigs")) { + this.dbmgmtFeatureConfigs(model.getDbmgmtFeatureConfigs()); + } + if (model.wasPropertyExplicitlySet("databasePlatformName")) { + this.databasePlatformName(model.getDatabasePlatformName()); + } return this; } } @@ -758,6 +805,34 @@ public java.util.Map> getSystemTags() { return systemTags; } + /** + * The list of feature configurations + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbmgmtFeatureConfigs") + private final java.util.List dbmgmtFeatureConfigs; + + /** + * The list of feature configurations + * @return the value + **/ + public java.util.List getDbmgmtFeatureConfigs() { + return dbmgmtFeatureConfigs; + } + + /** + * The operating system of database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databasePlatformName") + private final String databasePlatformName; + + /** + * The operating system of database. + * @return the value + **/ + public String getDatabasePlatformName() { + return databasePlatformName; + } + @Override public String toString() { return this.toString(true); @@ -789,6 +864,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", dbmgmtFeatureConfigs=").append(String.valueOf(this.dbmgmtFeatureConfigs)); + sb.append(", databasePlatformName=").append(String.valueOf(this.databasePlatformName)); sb.append(")"); return sb.toString(); } @@ -820,6 +897,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.dbmgmtFeatureConfigs, other.dbmgmtFeatureConfigs) + && java.util.Objects.equals(this.databasePlatformName, other.databasePlatformName) && super.equals(other); } @@ -858,6 +937,16 @@ public int hashCode() { result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = + (result * PRIME) + + (this.dbmgmtFeatureConfigs == null + ? 43 + : this.dbmgmtFeatureConfigs.hashCode()); + result = + (result * PRIME) + + (this.databasePlatformName == null + ? 43 + : this.databasePlatformName.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ModifyAutonomousDatabaseManagementFeatureDetails.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ModifyAutonomousDatabaseManagementFeatureDetails.java new file mode 100644 index 00000000000..6ad062db663 --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/ModifyAutonomousDatabaseManagementFeatureDetails.java @@ -0,0 +1,127 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.model; + +/** + * The details required to modify a Database Management feature for an Autonomous Database. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ModifyAutonomousDatabaseManagementFeatureDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ModifyAutonomousDatabaseManagementFeatureDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"featureDetails"}) + public ModifyAutonomousDatabaseManagementFeatureDetails( + AutonomousDatabaseFeatureDetails featureDetails) { + super(); + this.featureDetails = featureDetails; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("featureDetails") + private AutonomousDatabaseFeatureDetails featureDetails; + + public Builder featureDetails(AutonomousDatabaseFeatureDetails featureDetails) { + this.featureDetails = featureDetails; + this.__explicitlySet__.add("featureDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ModifyAutonomousDatabaseManagementFeatureDetails build() { + ModifyAutonomousDatabaseManagementFeatureDetails model = + new ModifyAutonomousDatabaseManagementFeatureDetails(this.featureDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ModifyAutonomousDatabaseManagementFeatureDetails model) { + if (model.wasPropertyExplicitlySet("featureDetails")) { + this.featureDetails(model.getFeatureDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("featureDetails") + private final AutonomousDatabaseFeatureDetails featureDetails; + + public AutonomousDatabaseFeatureDetails getFeatureDetails() { + return featureDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ModifyAutonomousDatabaseManagementFeatureDetails("); + sb.append("super=").append(super.toString()); + sb.append("featureDetails=").append(String.valueOf(this.featureDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ModifyAutonomousDatabaseManagementFeatureDetails)) { + return false; + } + + ModifyAutonomousDatabaseManagementFeatureDetails other = + (ModifyAutonomousDatabaseManagementFeatureDetails) o; + return java.util.Objects.equals(this.featureDetails, other.featureDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.featureDetails == null ? 43 : this.featureDetails.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/OptimizerStatisticsCollectionOperation.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/OptimizerStatisticsCollectionOperation.java index efd462644a6..1310070b118 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/OptimizerStatisticsCollectionOperation.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/OptimizerStatisticsCollectionOperation.java @@ -487,6 +487,7 @@ public enum Status { Completed("COMPLETED"), Failed("FAILED"), TimedOut("TIMED_OUT"), + Unknown("UNKNOWN"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/OptimizerStatisticsCollectionOperationSummary.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/OptimizerStatisticsCollectionOperationSummary.java index 9655c982c09..889710c33fa 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/OptimizerStatisticsCollectionOperationSummary.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/model/OptimizerStatisticsCollectionOperationSummary.java @@ -427,6 +427,7 @@ public enum Status { Completed("COMPLETED"), Failed("FAILED"), TimedOut("TIMED_OUT"), + Unknown("UNKNOWN"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/requests/DisableAutonomousDatabaseManagementFeatureRequest.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/requests/DisableAutonomousDatabaseManagementFeatureRequest.java new file mode 100644 index 00000000000..be95404b3e8 --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/requests/DisableAutonomousDatabaseManagementFeatureRequest.java @@ -0,0 +1,390 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.requests; + +import com.oracle.bmc.databasemanagement.model.*; +/** + * Example: Click here to see how to use DisableAutonomousDatabaseManagementFeatureRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +public class DisableAutonomousDatabaseManagementFeatureRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.databasemanagement.model + .DisableAutonomousDatabaseManagementFeatureDetails> { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database. + */ + private String autonomousDatabaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database. + */ + public String getAutonomousDatabaseId() { + return autonomousDatabaseId; + } + /** + * The details required to disable a Database Management feature for an Autonomous Database. + */ + private com.oracle.bmc.databasemanagement.model + .DisableAutonomousDatabaseManagementFeatureDetails + disableAutonomousDatabaseManagementFeatureDetails; + + /** + * The details required to disable a Database Management feature for an Autonomous Database. + */ + public com.oracle.bmc.databasemanagement.model.DisableAutonomousDatabaseManagementFeatureDetails + getDisableAutonomousDatabaseManagementFeatureDetails() { + return disableAutonomousDatabaseManagementFeatureDetails; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.databasemanagement.model.DisableAutonomousDatabaseManagementFeatureDetails + getBody$() { + return disableAutonomousDatabaseManagementFeatureDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DisableAutonomousDatabaseManagementFeatureRequest, + com.oracle.bmc.databasemanagement.model + .DisableAutonomousDatabaseManagementFeatureDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database. + */ + private String autonomousDatabaseId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database. + * @param autonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder autonomousDatabaseId(String autonomousDatabaseId) { + this.autonomousDatabaseId = autonomousDatabaseId; + return this; + } + + /** + * The details required to disable a Database Management feature for an Autonomous Database. + */ + private com.oracle.bmc.databasemanagement.model + .DisableAutonomousDatabaseManagementFeatureDetails + disableAutonomousDatabaseManagementFeatureDetails = null; + + /** + * The details required to disable a Database Management feature for an Autonomous Database. + * @param disableAutonomousDatabaseManagementFeatureDetails the value to set + * @return this builder instance + */ + public Builder disableAutonomousDatabaseManagementFeatureDetails( + com.oracle.bmc.databasemanagement.model + .DisableAutonomousDatabaseManagementFeatureDetails + disableAutonomousDatabaseManagementFeatureDetails) { + this.disableAutonomousDatabaseManagementFeatureDetails = + disableAutonomousDatabaseManagementFeatureDetails; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DisableAutonomousDatabaseManagementFeatureRequest o) { + autonomousDatabaseId(o.getAutonomousDatabaseId()); + disableAutonomousDatabaseManagementFeatureDetails( + o.getDisableAutonomousDatabaseManagementFeatureDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DisableAutonomousDatabaseManagementFeatureRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DisableAutonomousDatabaseManagementFeatureRequest + */ + public DisableAutonomousDatabaseManagementFeatureRequest build() { + DisableAutonomousDatabaseManagementFeatureRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.databasemanagement.model + .DisableAutonomousDatabaseManagementFeatureDetails + body) { + disableAutonomousDatabaseManagementFeatureDetails(body); + return this; + } + + /** + * Build the instance of DisableAutonomousDatabaseManagementFeatureRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DisableAutonomousDatabaseManagementFeatureRequest + */ + public DisableAutonomousDatabaseManagementFeatureRequest buildWithoutInvocationCallback() { + DisableAutonomousDatabaseManagementFeatureRequest request = + new DisableAutonomousDatabaseManagementFeatureRequest(); + request.autonomousDatabaseId = autonomousDatabaseId; + request.disableAutonomousDatabaseManagementFeatureDetails = + disableAutonomousDatabaseManagementFeatureDetails; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + return request; + // new DisableAutonomousDatabaseManagementFeatureRequest(autonomousDatabaseId, disableAutonomousDatabaseManagementFeatureDetails, opcRequestId, opcRetryToken, ifMatch); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .autonomousDatabaseId(autonomousDatabaseId) + .disableAutonomousDatabaseManagementFeatureDetails( + disableAutonomousDatabaseManagementFeatureDetails) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",autonomousDatabaseId=").append(String.valueOf(this.autonomousDatabaseId)); + sb.append(",disableAutonomousDatabaseManagementFeatureDetails=") + .append(String.valueOf(this.disableAutonomousDatabaseManagementFeatureDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DisableAutonomousDatabaseManagementFeatureRequest)) { + return false; + } + + DisableAutonomousDatabaseManagementFeatureRequest other = + (DisableAutonomousDatabaseManagementFeatureRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.autonomousDatabaseId, other.autonomousDatabaseId) + && java.util.Objects.equals( + this.disableAutonomousDatabaseManagementFeatureDetails, + other.disableAutonomousDatabaseManagementFeatureDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.autonomousDatabaseId == null + ? 43 + : this.autonomousDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.disableAutonomousDatabaseManagementFeatureDetails == null + ? 43 + : this.disableAutonomousDatabaseManagementFeatureDetails + .hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/requests/EnableAutonomousDatabaseManagementFeatureRequest.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/requests/EnableAutonomousDatabaseManagementFeatureRequest.java new file mode 100644 index 00000000000..5b1283bff18 --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/requests/EnableAutonomousDatabaseManagementFeatureRequest.java @@ -0,0 +1,388 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.requests; + +import com.oracle.bmc.databasemanagement.model.*; +/** + * Example: Click here to see how to use EnableAutonomousDatabaseManagementFeatureRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +public class EnableAutonomousDatabaseManagementFeatureRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.databasemanagement.model + .EnableAutonomousDatabaseManagementFeatureDetails> { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database. + */ + private String autonomousDatabaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database. + */ + public String getAutonomousDatabaseId() { + return autonomousDatabaseId; + } + /** + * The details required to enable a Database Management feature for an Autonomous Database. + */ + private com.oracle.bmc.databasemanagement.model.EnableAutonomousDatabaseManagementFeatureDetails + enableAutonomousDatabaseManagementFeatureDetails; + + /** + * The details required to enable a Database Management feature for an Autonomous Database. + */ + public com.oracle.bmc.databasemanagement.model.EnableAutonomousDatabaseManagementFeatureDetails + getEnableAutonomousDatabaseManagementFeatureDetails() { + return enableAutonomousDatabaseManagementFeatureDetails; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.databasemanagement.model.EnableAutonomousDatabaseManagementFeatureDetails + getBody$() { + return enableAutonomousDatabaseManagementFeatureDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + EnableAutonomousDatabaseManagementFeatureRequest, + com.oracle.bmc.databasemanagement.model + .EnableAutonomousDatabaseManagementFeatureDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database. + */ + private String autonomousDatabaseId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database. + * @param autonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder autonomousDatabaseId(String autonomousDatabaseId) { + this.autonomousDatabaseId = autonomousDatabaseId; + return this; + } + + /** + * The details required to enable a Database Management feature for an Autonomous Database. + */ + private com.oracle.bmc.databasemanagement.model + .EnableAutonomousDatabaseManagementFeatureDetails + enableAutonomousDatabaseManagementFeatureDetails = null; + + /** + * The details required to enable a Database Management feature for an Autonomous Database. + * @param enableAutonomousDatabaseManagementFeatureDetails the value to set + * @return this builder instance + */ + public Builder enableAutonomousDatabaseManagementFeatureDetails( + com.oracle.bmc.databasemanagement.model + .EnableAutonomousDatabaseManagementFeatureDetails + enableAutonomousDatabaseManagementFeatureDetails) { + this.enableAutonomousDatabaseManagementFeatureDetails = + enableAutonomousDatabaseManagementFeatureDetails; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(EnableAutonomousDatabaseManagementFeatureRequest o) { + autonomousDatabaseId(o.getAutonomousDatabaseId()); + enableAutonomousDatabaseManagementFeatureDetails( + o.getEnableAutonomousDatabaseManagementFeatureDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of EnableAutonomousDatabaseManagementFeatureRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of EnableAutonomousDatabaseManagementFeatureRequest + */ + public EnableAutonomousDatabaseManagementFeatureRequest build() { + EnableAutonomousDatabaseManagementFeatureRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.databasemanagement.model + .EnableAutonomousDatabaseManagementFeatureDetails + body) { + enableAutonomousDatabaseManagementFeatureDetails(body); + return this; + } + + /** + * Build the instance of EnableAutonomousDatabaseManagementFeatureRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of EnableAutonomousDatabaseManagementFeatureRequest + */ + public EnableAutonomousDatabaseManagementFeatureRequest buildWithoutInvocationCallback() { + EnableAutonomousDatabaseManagementFeatureRequest request = + new EnableAutonomousDatabaseManagementFeatureRequest(); + request.autonomousDatabaseId = autonomousDatabaseId; + request.enableAutonomousDatabaseManagementFeatureDetails = + enableAutonomousDatabaseManagementFeatureDetails; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + return request; + // new EnableAutonomousDatabaseManagementFeatureRequest(autonomousDatabaseId, enableAutonomousDatabaseManagementFeatureDetails, opcRequestId, opcRetryToken, ifMatch); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .autonomousDatabaseId(autonomousDatabaseId) + .enableAutonomousDatabaseManagementFeatureDetails( + enableAutonomousDatabaseManagementFeatureDetails) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",autonomousDatabaseId=").append(String.valueOf(this.autonomousDatabaseId)); + sb.append(",enableAutonomousDatabaseManagementFeatureDetails=") + .append(String.valueOf(this.enableAutonomousDatabaseManagementFeatureDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof EnableAutonomousDatabaseManagementFeatureRequest)) { + return false; + } + + EnableAutonomousDatabaseManagementFeatureRequest other = + (EnableAutonomousDatabaseManagementFeatureRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.autonomousDatabaseId, other.autonomousDatabaseId) + && java.util.Objects.equals( + this.enableAutonomousDatabaseManagementFeatureDetails, + other.enableAutonomousDatabaseManagementFeatureDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.autonomousDatabaseId == null + ? 43 + : this.autonomousDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.enableAutonomousDatabaseManagementFeatureDetails == null + ? 43 + : this.enableAutonomousDatabaseManagementFeatureDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/requests/ListDbManagementPrivateEndpointsRequest.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/requests/ListDbManagementPrivateEndpointsRequest.java index e9731e05fbd..811510c2c9d 100644 --- a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/requests/ListDbManagementPrivateEndpointsRequest.java +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/requests/ListDbManagementPrivateEndpointsRequest.java @@ -58,6 +58,21 @@ public String getVcnId() { public Boolean getIsCluster() { return isCluster; } + /** + * The option to filter Database Management private endpoints which are endbled with DNS proxy server. This should be used along with the vcnId query parameter. + * Only one of this parameter and IsClusterDbManagementPrivateEndpointQueryParam should be set to true at one time. + * + */ + private Boolean isDnsResolutionEnabled; + + /** + * The option to filter Database Management private endpoints which are endbled with DNS proxy server. This should be used along with the vcnId query parameter. + * Only one of this parameter and IsClusterDbManagementPrivateEndpointQueryParam should be set to true at one time. + * + */ + public Boolean getIsDnsResolutionEnabled() { + return isDnsResolutionEnabled; + } /** * The lifecycle state of a resource. */ @@ -243,6 +258,25 @@ public Builder isCluster(Boolean isCluster) { return this; } + /** + * The option to filter Database Management private endpoints which are endbled with DNS proxy server. This should be used along with the vcnId query parameter. + * Only one of this parameter and IsClusterDbManagementPrivateEndpointQueryParam should be set to true at one time. + * + */ + private Boolean isDnsResolutionEnabled = null; + + /** + * The option to filter Database Management private endpoints which are endbled with DNS proxy server. This should be used along with the vcnId query parameter. + * Only one of this parameter and IsClusterDbManagementPrivateEndpointQueryParam should be set to true at one time. + * + * @param isDnsResolutionEnabled the value to set + * @return this builder instance + */ + public Builder isDnsResolutionEnabled(Boolean isDnsResolutionEnabled) { + this.isDnsResolutionEnabled = isDnsResolutionEnabled; + return this; + } + /** * The lifecycle state of a resource. */ @@ -376,6 +410,7 @@ public Builder copy(ListDbManagementPrivateEndpointsRequest o) { name(o.getName()); vcnId(o.getVcnId()); isCluster(o.getIsCluster()); + isDnsResolutionEnabled(o.getIsDnsResolutionEnabled()); lifecycleState(o.getLifecycleState()); limit(o.getLimit()); page(o.getPage()); @@ -419,6 +454,7 @@ public ListDbManagementPrivateEndpointsRequest buildWithoutInvocationCallback() request.name = name; request.vcnId = vcnId; request.isCluster = isCluster; + request.isDnsResolutionEnabled = isDnsResolutionEnabled; request.lifecycleState = lifecycleState; request.limit = limit; request.page = page; @@ -426,7 +462,7 @@ public ListDbManagementPrivateEndpointsRequest buildWithoutInvocationCallback() request.sortBy = sortBy; request.opcRequestId = opcRequestId; return request; - // new ListDbManagementPrivateEndpointsRequest(compartmentId, name, vcnId, isCluster, lifecycleState, limit, page, sortOrder, sortBy, opcRequestId); + // new ListDbManagementPrivateEndpointsRequest(compartmentId, name, vcnId, isCluster, isDnsResolutionEnabled, lifecycleState, limit, page, sortOrder, sortBy, opcRequestId); } } @@ -440,6 +476,7 @@ public Builder toBuilder() { .name(name) .vcnId(vcnId) .isCluster(isCluster) + .isDnsResolutionEnabled(isDnsResolutionEnabled) .lifecycleState(lifecycleState) .limit(limit) .page(page) @@ -465,6 +502,7 @@ public String toString() { sb.append(",name=").append(String.valueOf(this.name)); sb.append(",vcnId=").append(String.valueOf(this.vcnId)); sb.append(",isCluster=").append(String.valueOf(this.isCluster)); + sb.append(",isDnsResolutionEnabled=").append(String.valueOf(this.isDnsResolutionEnabled)); sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(",limit=").append(String.valueOf(this.limit)); sb.append(",page=").append(String.valueOf(this.page)); @@ -490,6 +528,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.name, other.name) && java.util.Objects.equals(this.vcnId, other.vcnId) && java.util.Objects.equals(this.isCluster, other.isCluster) + && java.util.Objects.equals( + this.isDnsResolutionEnabled, other.isDnsResolutionEnabled) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.limit, other.limit) && java.util.Objects.equals(this.page, other.page) @@ -508,6 +548,11 @@ public int hashCode() { result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); result = (result * PRIME) + (this.vcnId == null ? 43 : this.vcnId.hashCode()); result = (result * PRIME) + (this.isCluster == null ? 43 : this.isCluster.hashCode()); + result = + (result * PRIME) + + (this.isDnsResolutionEnabled == null + ? 43 + : this.isDnsResolutionEnabled.hashCode()); result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/requests/ModifyAutonomousDatabaseManagementFeatureRequest.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/requests/ModifyAutonomousDatabaseManagementFeatureRequest.java new file mode 100644 index 00000000000..733df8535e7 --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/requests/ModifyAutonomousDatabaseManagementFeatureRequest.java @@ -0,0 +1,388 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.requests; + +import com.oracle.bmc.databasemanagement.model.*; +/** + * Example: Click here to see how to use ModifyAutonomousDatabaseManagementFeatureRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +public class ModifyAutonomousDatabaseManagementFeatureRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.databasemanagement.model + .ModifyAutonomousDatabaseManagementFeatureDetails> { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database. + */ + private String autonomousDatabaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database. + */ + public String getAutonomousDatabaseId() { + return autonomousDatabaseId; + } + /** + * The details required to modify a Database Management feature for an Autonomous Database. + */ + private com.oracle.bmc.databasemanagement.model.ModifyAutonomousDatabaseManagementFeatureDetails + modifyAutonomousDatabaseManagementFeatureDetails; + + /** + * The details required to modify a Database Management feature for an Autonomous Database. + */ + public com.oracle.bmc.databasemanagement.model.ModifyAutonomousDatabaseManagementFeatureDetails + getModifyAutonomousDatabaseManagementFeatureDetails() { + return modifyAutonomousDatabaseManagementFeatureDetails; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.databasemanagement.model.ModifyAutonomousDatabaseManagementFeatureDetails + getBody$() { + return modifyAutonomousDatabaseManagementFeatureDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ModifyAutonomousDatabaseManagementFeatureRequest, + com.oracle.bmc.databasemanagement.model + .ModifyAutonomousDatabaseManagementFeatureDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database. + */ + private String autonomousDatabaseId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database. + * @param autonomousDatabaseId the value to set + * @return this builder instance + */ + public Builder autonomousDatabaseId(String autonomousDatabaseId) { + this.autonomousDatabaseId = autonomousDatabaseId; + return this; + } + + /** + * The details required to modify a Database Management feature for an Autonomous Database. + */ + private com.oracle.bmc.databasemanagement.model + .ModifyAutonomousDatabaseManagementFeatureDetails + modifyAutonomousDatabaseManagementFeatureDetails = null; + + /** + * The details required to modify a Database Management feature for an Autonomous Database. + * @param modifyAutonomousDatabaseManagementFeatureDetails the value to set + * @return this builder instance + */ + public Builder modifyAutonomousDatabaseManagementFeatureDetails( + com.oracle.bmc.databasemanagement.model + .ModifyAutonomousDatabaseManagementFeatureDetails + modifyAutonomousDatabaseManagementFeatureDetails) { + this.modifyAutonomousDatabaseManagementFeatureDetails = + modifyAutonomousDatabaseManagementFeatureDetails; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ModifyAutonomousDatabaseManagementFeatureRequest o) { + autonomousDatabaseId(o.getAutonomousDatabaseId()); + modifyAutonomousDatabaseManagementFeatureDetails( + o.getModifyAutonomousDatabaseManagementFeatureDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ModifyAutonomousDatabaseManagementFeatureRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ModifyAutonomousDatabaseManagementFeatureRequest + */ + public ModifyAutonomousDatabaseManagementFeatureRequest build() { + ModifyAutonomousDatabaseManagementFeatureRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.databasemanagement.model + .ModifyAutonomousDatabaseManagementFeatureDetails + body) { + modifyAutonomousDatabaseManagementFeatureDetails(body); + return this; + } + + /** + * Build the instance of ModifyAutonomousDatabaseManagementFeatureRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ModifyAutonomousDatabaseManagementFeatureRequest + */ + public ModifyAutonomousDatabaseManagementFeatureRequest buildWithoutInvocationCallback() { + ModifyAutonomousDatabaseManagementFeatureRequest request = + new ModifyAutonomousDatabaseManagementFeatureRequest(); + request.autonomousDatabaseId = autonomousDatabaseId; + request.modifyAutonomousDatabaseManagementFeatureDetails = + modifyAutonomousDatabaseManagementFeatureDetails; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + return request; + // new ModifyAutonomousDatabaseManagementFeatureRequest(autonomousDatabaseId, modifyAutonomousDatabaseManagementFeatureDetails, opcRequestId, opcRetryToken, ifMatch); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .autonomousDatabaseId(autonomousDatabaseId) + .modifyAutonomousDatabaseManagementFeatureDetails( + modifyAutonomousDatabaseManagementFeatureDetails) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",autonomousDatabaseId=").append(String.valueOf(this.autonomousDatabaseId)); + sb.append(",modifyAutonomousDatabaseManagementFeatureDetails=") + .append(String.valueOf(this.modifyAutonomousDatabaseManagementFeatureDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ModifyAutonomousDatabaseManagementFeatureRequest)) { + return false; + } + + ModifyAutonomousDatabaseManagementFeatureRequest other = + (ModifyAutonomousDatabaseManagementFeatureRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.autonomousDatabaseId, other.autonomousDatabaseId) + && java.util.Objects.equals( + this.modifyAutonomousDatabaseManagementFeatureDetails, + other.modifyAutonomousDatabaseManagementFeatureDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.autonomousDatabaseId == null + ? 43 + : this.autonomousDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.modifyAutonomousDatabaseManagementFeatureDetails == null + ? 43 + : this.modifyAutonomousDatabaseManagementFeatureDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/responses/DisableAutonomousDatabaseManagementFeatureResponse.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/responses/DisableAutonomousDatabaseManagementFeatureResponse.java new file mode 100644 index 00000000000..a1b5b0dad54 --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/responses/DisableAutonomousDatabaseManagementFeatureResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.responses; + +import com.oracle.bmc.databasemanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +public class DisableAutonomousDatabaseManagementFeatureResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private DisableAutonomousDatabaseManagementFeatureResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DisableAutonomousDatabaseManagementFeatureResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DisableAutonomousDatabaseManagementFeatureResponse build() { + return new DisableAutonomousDatabaseManagementFeatureResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DisableAutonomousDatabaseManagementFeatureResponse)) { + return false; + } + + DisableAutonomousDatabaseManagementFeatureResponse other = + (DisableAutonomousDatabaseManagementFeatureResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/responses/EnableAutonomousDatabaseManagementFeatureResponse.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/responses/EnableAutonomousDatabaseManagementFeatureResponse.java new file mode 100644 index 00000000000..d08367cf04b --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/responses/EnableAutonomousDatabaseManagementFeatureResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.responses; + +import com.oracle.bmc.databasemanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +public class EnableAutonomousDatabaseManagementFeatureResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private EnableAutonomousDatabaseManagementFeatureResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(EnableAutonomousDatabaseManagementFeatureResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public EnableAutonomousDatabaseManagementFeatureResponse build() { + return new EnableAutonomousDatabaseManagementFeatureResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof EnableAutonomousDatabaseManagementFeatureResponse)) { + return false; + } + + EnableAutonomousDatabaseManagementFeatureResponse other = + (EnableAutonomousDatabaseManagementFeatureResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/responses/ModifyAutonomousDatabaseManagementFeatureResponse.java b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/responses/ModifyAutonomousDatabaseManagementFeatureResponse.java new file mode 100644 index 00000000000..66dd9918cbe --- /dev/null +++ b/bmc-databasemanagement/src/main/java/com/oracle/bmc/databasemanagement/responses/ModifyAutonomousDatabaseManagementFeatureResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemanagement.responses; + +import com.oracle.bmc.databasemanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20201101") +public class ModifyAutonomousDatabaseManagementFeatureResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private ModifyAutonomousDatabaseManagementFeatureResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ModifyAutonomousDatabaseManagementFeatureResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ModifyAutonomousDatabaseManagementFeatureResponse build() { + return new ModifyAutonomousDatabaseManagementFeatureResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ModifyAutonomousDatabaseManagementFeatureResponse)) { + return false; + } + + ModifyAutonomousDatabaseManagementFeatureResponse other = + (ModifyAutonomousDatabaseManagementFeatureResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-databasemigration/pom.xml b/bmc-databasemigration/pom.xml index 2e2f89127de..a6947d4fbac 100644 --- a/bmc-databasemigration/pom.xml +++ b/bmc-databasemigration/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-databasemigration @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/DatabaseMigration.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/DatabaseMigration.java index a06597c8809..6e33282c644 100644 --- a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/DatabaseMigration.java +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/DatabaseMigration.java @@ -168,6 +168,20 @@ ChangeMigrationCompartmentResponse changeMigrationCompartment( */ CreateMigrationResponse createMigration(CreateMigrationRequest request); + /** + * Creates a new version of the current parameter file contents to the specified value. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateParameterFileVersion API. + */ + CreateParameterFileVersionResponse createParameterFileVersion( + CreateParameterFileVersionRequest request); + /** * Deletes the Database Connection represented by the specified connection ID. * @@ -207,6 +221,20 @@ ChangeMigrationCompartmentResponse changeMigrationCompartment( */ DeleteMigrationResponse deleteMigration(DeleteMigrationRequest request); + /** + * Deletes the given parameter file version + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteParameterFileVersion API. + */ + DeleteParameterFileVersionResponse deleteParameterFileVersion( + DeleteParameterFileVersionRequest request); + /** * Start Validate Migration job. * @@ -285,6 +313,20 @@ ChangeMigrationCompartmentResponse changeMigrationCompartment( */ GetMigrationResponse getMigration(GetMigrationRequest request); + /** + * Obtain the parameter file version contents for the specified parameter file name and the associated job. This operation will + * be allowed only if the job is certain acceptable lifecycle states. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetParameterFileVersion API. + */ + GetParameterFileVersionResponse getParameterFileVersion(GetParameterFileVersionRequest request); + /** * Gets the details of a work request. * @@ -378,6 +420,18 @@ ListMigrationObjectTypesResponse listMigrationObjectTypes( */ ListMigrationObjectsResponse listMigrationObjects(ListMigrationObjectsRequest request); + /** + * List of parameters that can be used to customize migrations. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListMigrationParameters API. + */ + ListMigrationParametersResponse listMigrationParameters(ListMigrationParametersRequest request); + /** * List all Migrations. * @@ -391,6 +445,22 @@ ListMigrationObjectTypesResponse listMigrationObjectTypes( */ ListMigrationsResponse listMigrations(ListMigrationsRequest request); + /** + * Return a list of the parameter file metadata of the migration execution of the specified job. This will + * only be acceptable if the job is in particular state. It will be accessible if the job is in + * the FAILED, PAUSED or SUSPENDED state. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListParameterFileVersions API. + */ + ListParameterFileVersionsResponse listParameterFileVersions( + ListParameterFileVersionsRequest request); + /** * Gets the errors for a work request. * @@ -430,6 +500,20 @@ ListMigrationObjectTypesResponse listMigrationObjectTypes( */ ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request); + /** + * Make current the given parameter file version + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use MakeCurrentParameterFileVersion API. + */ + MakeCurrentParameterFileVersionResponse makeCurrentParameterFileVersion( + MakeCurrentParameterFileVersionRequest request); + /** * Remove excluded/included objects. * @@ -482,6 +566,19 @@ ListMigrationObjectTypesResponse listMigrationObjectTypes( */ StartMigrationResponse startMigration(StartMigrationRequest request); + /** + * Place the currently executing migration Job in a Suspended State. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use SuspendJob API. + */ + SuspendJobResponse suspendJob(SuspendJobRequest request); + /** * Update Database Connection resource details. * diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/DatabaseMigrationAsync.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/DatabaseMigrationAsync.java index e902b86d078..d64346a84ac 100644 --- a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/DatabaseMigrationAsync.java +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/DatabaseMigrationAsync.java @@ -192,6 +192,23 @@ java.util.concurrent.Future createMigration( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Creates a new version of the current parameter file contents to the specified value. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createParameterFileVersion( + CreateParameterFileVersionRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateParameterFileVersionRequest, CreateParameterFileVersionResponse> + handler); + /** * Deletes the Database Connection represented by the specified connection ID. * @@ -239,6 +256,23 @@ java.util.concurrent.Future deleteMigration( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Deletes the given parameter file version + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteParameterFileVersion( + DeleteParameterFileVersionRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteParameterFileVersionRequest, DeleteParameterFileVersionResponse> + handler); + /** * Start Validate Migration job. * @@ -336,6 +370,24 @@ java.util.concurrent.Future getMigration( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Obtain the parameter file version contents for the specified parameter file name and the associated job. This operation will + * be allowed only if the job is certain acceptable lifecycle states. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getParameterFileVersion( + GetParameterFileVersionRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetParameterFileVersionRequest, GetParameterFileVersionResponse> + handler); + /** * Gets the details of a work request. * @@ -451,6 +503,22 @@ java.util.concurrent.Future listMigrationObjects( ListMigrationObjectsRequest, ListMigrationObjectsResponse> handler); + /** + * List of parameters that can be used to customize migrations. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listMigrationParameters( + ListMigrationParametersRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListMigrationParametersRequest, ListMigrationParametersResponse> + handler); + /** * List all Migrations. * @@ -467,6 +535,25 @@ java.util.concurrent.Future listMigrations( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Return a list of the parameter file metadata of the migration execution of the specified job. This will + * only be acceptable if the job is in particular state. It will be accessible if the job is in + * the FAILED, PAUSED or SUSPENDED state. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listParameterFileVersions( + ListParameterFileVersionsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListParameterFileVersionsRequest, ListParameterFileVersionsResponse> + handler); + /** * Gets the errors for a work request. * @@ -517,6 +604,25 @@ java.util.concurrent.Future listWorkRequests( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Make current the given parameter file version + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + makeCurrentParameterFileVersion( + MakeCurrentParameterFileVersionRequest request, + com.oracle.bmc.responses.AsyncHandler< + MakeCurrentParameterFileVersionRequest, + MakeCurrentParameterFileVersionResponse> + handler); + /** * Remove excluded/included objects. * @@ -582,6 +688,21 @@ java.util.concurrent.Future startMigration( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Place the currently executing migration Job in a Suspended State. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future suspendJob( + SuspendJobRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + /** * Update Database Connection resource details. * diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/DatabaseMigrationAsyncClient.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/DatabaseMigrationAsyncClient.java index 859332f3730..0e85723f6ac 100644 --- a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/DatabaseMigrationAsyncClient.java +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/DatabaseMigrationAsyncClient.java @@ -871,6 +871,63 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + createParameterFileVersion( + CreateParameterFileVersionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateParameterFileVersionRequest, + CreateParameterFileVersionResponse> + handler) { + LOG.trace("Called async createParameterFileVersion"); + final CreateParameterFileVersionRequest interceptedRequest = + CreateParameterFileVersionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateParameterFileVersionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DatabaseMigration", + "CreateParameterFileVersion", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/Job/CreateParameterFileVersion"); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateParameterFileVersionResponse> + transformer = + CreateParameterFileVersionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateParameterFileVersionRequest, CreateParameterFileVersionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateParameterFileVersionRequest, + CreateParameterFileVersionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateParameterFileVersionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateParameterFileVersionRequest, CreateParameterFileVersionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteConnection( DeleteConnectionRequest request, @@ -1005,6 +1062,57 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + deleteParameterFileVersion( + DeleteParameterFileVersionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteParameterFileVersionRequest, + DeleteParameterFileVersionResponse> + handler) { + LOG.trace("Called async deleteParameterFileVersion"); + final DeleteParameterFileVersionRequest interceptedRequest = + DeleteParameterFileVersionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteParameterFileVersionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DatabaseMigration", + "DeleteParameterFileVersion", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/Job/DeleteParameterFileVersion"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteParameterFileVersionResponse> + transformer = + DeleteParameterFileVersionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteParameterFileVersionRequest, DeleteParameterFileVersionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteParameterFileVersionRequest, + DeleteParameterFileVersionResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteParameterFileVersionRequest, DeleteParameterFileVersionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future evaluateMigration( EvaluateMigrationRequest request, @@ -1272,6 +1380,54 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future getParameterFileVersion( + GetParameterFileVersionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetParameterFileVersionRequest, GetParameterFileVersionResponse> + handler) { + LOG.trace("Called async getParameterFileVersion"); + final GetParameterFileVersionRequest interceptedRequest = + GetParameterFileVersionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetParameterFileVersionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DatabaseMigration", + "GetParameterFileVersion", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/Job/GetParameterFileVersion"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetParameterFileVersionResponse> + transformer = + GetParameterFileVersionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetParameterFileVersionRequest, GetParameterFileVersionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetParameterFileVersionRequest, GetParameterFileVersionResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetParameterFileVersionRequest, GetParameterFileVersionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getWorkRequest( GetWorkRequestRequest request, @@ -1591,6 +1747,54 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future listMigrationParameters( + ListMigrationParametersRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListMigrationParametersRequest, ListMigrationParametersResponse> + handler) { + LOG.trace("Called async listMigrationParameters"); + final ListMigrationParametersRequest interceptedRequest = + ListMigrationParametersConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListMigrationParametersConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DatabaseMigration", + "ListMigrationParameters", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/MigrationParameterSummary/ListMigrationParameters"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListMigrationParametersResponse> + transformer = + ListMigrationParametersConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListMigrationParametersRequest, ListMigrationParametersResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListMigrationParametersRequest, ListMigrationParametersResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListMigrationParametersRequest, ListMigrationParametersResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listMigrations( ListMigrationsRequest request, @@ -1636,6 +1840,55 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future listParameterFileVersions( + ListParameterFileVersionsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListParameterFileVersionsRequest, ListParameterFileVersionsResponse> + handler) { + LOG.trace("Called async listParameterFileVersions"); + final ListParameterFileVersionsRequest interceptedRequest = + ListParameterFileVersionsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListParameterFileVersionsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DatabaseMigration", + "ListParameterFileVersions", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/Job/ListParameterFileVersions"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListParameterFileVersionsResponse> + transformer = + ListParameterFileVersionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListParameterFileVersionsRequest, ListParameterFileVersionsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListParameterFileVersionsRequest, + ListParameterFileVersionsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListParameterFileVersionsRequest, ListParameterFileVersionsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listWorkRequestErrors( ListWorkRequestErrorsRequest request, @@ -1776,6 +2029,60 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + makeCurrentParameterFileVersion( + MakeCurrentParameterFileVersionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + MakeCurrentParameterFileVersionRequest, + MakeCurrentParameterFileVersionResponse> + handler) { + LOG.trace("Called async makeCurrentParameterFileVersion"); + final MakeCurrentParameterFileVersionRequest interceptedRequest = + MakeCurrentParameterFileVersionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + MakeCurrentParameterFileVersionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DatabaseMigration", + "MakeCurrentParameterFileVersion", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/Job/MakeCurrentParameterFileVersion"); + final java.util.function.Function< + javax.ws.rs.core.Response, MakeCurrentParameterFileVersionResponse> + transformer = + MakeCurrentParameterFileVersionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + MakeCurrentParameterFileVersionRequest, + MakeCurrentParameterFileVersionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + MakeCurrentParameterFileVersionRequest, + MakeCurrentParameterFileVersionResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + MakeCurrentParameterFileVersionRequest, + MakeCurrentParameterFileVersionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future removeMigrationObjects( RemoveMigrationObjectsRequest request, @@ -1975,6 +2282,50 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future suspendJob( + SuspendJobRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async suspendJob"); + final SuspendJobRequest interceptedRequest = SuspendJobConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SuspendJobConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DatabaseMigration", + "SuspendJob", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/Job/SuspendJob"); + final java.util.function.Function + transformer = + SuspendJobConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + SuspendJobRequest, SuspendJobResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + SuspendJobRequest, SuspendJobResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateConnection( UpdateConnectionRequest request, diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/DatabaseMigrationClient.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/DatabaseMigrationClient.java index 3e3a6e960d5..6b300114d10 100644 --- a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/DatabaseMigrationClient.java +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/DatabaseMigrationClient.java @@ -878,6 +878,50 @@ public CreateMigrationResponse createMigration(CreateMigrationRequest request) { }); } + @Override + public CreateParameterFileVersionResponse createParameterFileVersion( + CreateParameterFileVersionRequest request) { + LOG.trace("Called createParameterFileVersion"); + final CreateParameterFileVersionRequest interceptedRequest = + CreateParameterFileVersionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateParameterFileVersionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DatabaseMigration", + "CreateParameterFileVersion", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/Job/CreateParameterFileVersion"); + java.util.function.Function + transformer = + CreateParameterFileVersionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getCreateParameterFileVersionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DeleteConnectionResponse deleteConnection(DeleteConnectionRequest request) { LOG.trace("Called deleteConnection"); @@ -989,6 +1033,45 @@ public DeleteMigrationResponse deleteMigration(DeleteMigrationRequest request) { }); } + @Override + public DeleteParameterFileVersionResponse deleteParameterFileVersion( + DeleteParameterFileVersionRequest request) { + LOG.trace("Called deleteParameterFileVersion"); + final DeleteParameterFileVersionRequest interceptedRequest = + DeleteParameterFileVersionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteParameterFileVersionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DatabaseMigration", + "DeleteParameterFileVersion", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/Job/DeleteParameterFileVersion"); + java.util.function.Function + transformer = + DeleteParameterFileVersionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public EvaluateMigrationResponse evaluateMigration(EvaluateMigrationRequest request) { LOG.trace("Called evaluateMigration"); @@ -1206,6 +1289,44 @@ public GetMigrationResponse getMigration(GetMigrationRequest request) { }); } + @Override + public GetParameterFileVersionResponse getParameterFileVersion( + GetParameterFileVersionRequest request) { + LOG.trace("Called getParameterFileVersion"); + final GetParameterFileVersionRequest interceptedRequest = + GetParameterFileVersionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetParameterFileVersionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DatabaseMigration", + "GetParameterFileVersion", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/Job/GetParameterFileVersion"); + java.util.function.Function + transformer = + GetParameterFileVersionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) { LOG.trace("Called getWorkRequest"); @@ -1459,6 +1580,44 @@ public ListMigrationObjectsResponse listMigrationObjects(ListMigrationObjectsReq }); } + @Override + public ListMigrationParametersResponse listMigrationParameters( + ListMigrationParametersRequest request) { + LOG.trace("Called listMigrationParameters"); + final ListMigrationParametersRequest interceptedRequest = + ListMigrationParametersConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListMigrationParametersConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DatabaseMigration", + "ListMigrationParameters", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/MigrationParameterSummary/ListMigrationParameters"); + java.util.function.Function + transformer = + ListMigrationParametersConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListMigrationsResponse listMigrations(ListMigrationsRequest request) { LOG.trace("Called listMigrations"); @@ -1494,6 +1653,44 @@ public ListMigrationsResponse listMigrations(ListMigrationsRequest request) { }); } + @Override + public ListParameterFileVersionsResponse listParameterFileVersions( + ListParameterFileVersionsRequest request) { + LOG.trace("Called listParameterFileVersions"); + final ListParameterFileVersionsRequest interceptedRequest = + ListParameterFileVersionsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListParameterFileVersionsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DatabaseMigration", + "ListParameterFileVersions", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/Job/ListParameterFileVersions"); + java.util.function.Function + transformer = + ListParameterFileVersionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListWorkRequestErrorsResponse listWorkRequestErrors( ListWorkRequestErrorsRequest request) { @@ -1606,6 +1803,47 @@ public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request }); } + @Override + public MakeCurrentParameterFileVersionResponse makeCurrentParameterFileVersion( + MakeCurrentParameterFileVersionRequest request) { + LOG.trace("Called makeCurrentParameterFileVersion"); + final MakeCurrentParameterFileVersionRequest interceptedRequest = + MakeCurrentParameterFileVersionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + MakeCurrentParameterFileVersionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DatabaseMigration", + "MakeCurrentParameterFileVersion", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/Job/MakeCurrentParameterFileVersion"); + java.util.function.Function< + javax.ws.rs.core.Response, MakeCurrentParameterFileVersionResponse> + transformer = + MakeCurrentParameterFileVersionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public RemoveMigrationObjectsResponse removeMigrationObjects( RemoveMigrationObjectsRequest request) { @@ -1766,6 +2004,42 @@ public StartMigrationResponse startMigration(StartMigrationRequest request) { }); } + @Override + public SuspendJobResponse suspendJob(SuspendJobRequest request) { + LOG.trace("Called suspendJob"); + final SuspendJobRequest interceptedRequest = SuspendJobConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SuspendJobConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DatabaseMigration", + "SuspendJob", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/Job/SuspendJob"); + java.util.function.Function transformer = + SuspendJobConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateConnectionResponse updateConnection(UpdateConnectionRequest request) { LOG.trace("Called updateConnection"); diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/DatabaseMigrationPaginators.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/DatabaseMigrationPaginators.java index d41dd213f64..a954e1620ac 100644 --- a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/DatabaseMigrationPaginators.java +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/DatabaseMigrationPaginators.java @@ -599,6 +599,126 @@ public ListMigrationObjectTypesResponse apply( }); } + /** + * Creates a new iterable which will iterate over the responses received from the listMigrationParameters operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listMigrationParametersResponseIterator( + final ListMigrationParametersRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListMigrationParametersRequest.Builder, ListMigrationParametersRequest, + ListMigrationParametersResponse>( + new java.util.function.Supplier() { + @Override + public ListMigrationParametersRequest.Builder get() { + return ListMigrationParametersRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListMigrationParametersResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMigrationParametersRequest.Builder>, + ListMigrationParametersRequest>() { + @Override + public ListMigrationParametersRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMigrationParametersRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListMigrationParametersRequest, ListMigrationParametersResponse>() { + @Override + public ListMigrationParametersResponse apply( + ListMigrationParametersRequest request) { + return client.listMigrationParameters(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.databasemigration.model.MigrationParameterSummary} objects + * contained in responses from the listMigrationParameters operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.databasemigration.model.MigrationParameterSummary} objects + * contained in responses received from the service. + */ + public Iterable + listMigrationParametersRecordIterator(final ListMigrationParametersRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListMigrationParametersRequest.Builder, ListMigrationParametersRequest, + ListMigrationParametersResponse, + com.oracle.bmc.databasemigration.model.MigrationParameterSummary>( + new java.util.function.Supplier() { + @Override + public ListMigrationParametersRequest.Builder get() { + return ListMigrationParametersRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListMigrationParametersResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMigrationParametersRequest.Builder>, + ListMigrationParametersRequest>() { + @Override + public ListMigrationParametersRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMigrationParametersRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListMigrationParametersRequest, ListMigrationParametersResponse>() { + @Override + public ListMigrationParametersResponse apply( + ListMigrationParametersRequest request) { + return client.listMigrationParameters(request); + } + }, + new java.util.function.Function< + ListMigrationParametersResponse, + java.util.List< + com.oracle.bmc.databasemigration.model + .MigrationParameterSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.databasemigration.model + .MigrationParameterSummary> + apply(ListMigrationParametersResponse response) { + return response.getMigrationParameterSummaryCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listMigrations operation. This iterable * will fetch more data from the server as needed. @@ -709,6 +829,127 @@ public ListMigrationsResponse apply(ListMigrationsRequest request) { }); } + /** + * Creates a new iterable which will iterate over the responses received from the listParameterFileVersions operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listParameterFileVersionsResponseIterator( + final ListParameterFileVersionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListParameterFileVersionsRequest.Builder, ListParameterFileVersionsRequest, + ListParameterFileVersionsResponse>( + new java.util.function.Supplier() { + @Override + public ListParameterFileVersionsRequest.Builder get() { + return ListParameterFileVersionsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListParameterFileVersionsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListParameterFileVersionsRequest.Builder>, + ListParameterFileVersionsRequest>() { + @Override + public ListParameterFileVersionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListParameterFileVersionsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListParameterFileVersionsRequest, ListParameterFileVersionsResponse>() { + @Override + public ListParameterFileVersionsResponse apply( + ListParameterFileVersionsRequest request) { + return client.listParameterFileVersions(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.databasemigration.model.ParameterFileVersionSummary} objects + * contained in responses from the listParameterFileVersions operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.databasemigration.model.ParameterFileVersionSummary} objects + * contained in responses received from the service. + */ + public Iterable + listParameterFileVersionsRecordIterator( + final ListParameterFileVersionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListParameterFileVersionsRequest.Builder, ListParameterFileVersionsRequest, + ListParameterFileVersionsResponse, + com.oracle.bmc.databasemigration.model.ParameterFileVersionSummary>( + new java.util.function.Supplier() { + @Override + public ListParameterFileVersionsRequest.Builder get() { + return ListParameterFileVersionsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListParameterFileVersionsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListParameterFileVersionsRequest.Builder>, + ListParameterFileVersionsRequest>() { + @Override + public ListParameterFileVersionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListParameterFileVersionsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListParameterFileVersionsRequest, ListParameterFileVersionsResponse>() { + @Override + public ListParameterFileVersionsResponse apply( + ListParameterFileVersionsRequest request) { + return client.listParameterFileVersions(request); + } + }, + new java.util.function.Function< + ListParameterFileVersionsResponse, + java.util.List< + com.oracle.bmc.databasemigration.model + .ParameterFileVersionSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.databasemigration.model + .ParameterFileVersionSummary> + apply(ListParameterFileVersionsResponse response) { + return response.getParameterFileVersionCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listWorkRequestErrors operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/CreateParameterFileVersionConverter.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/CreateParameterFileVersionConverter.java new file mode 100644 index 00000000000..496489ba4e2 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/CreateParameterFileVersionConverter.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.databasemigration.model.*; +import com.oracle.bmc.databasemigration.requests.*; +import com.oracle.bmc.databasemigration.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class CreateParameterFileVersionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateParameterFileVersionConverter.class); + + public static com.oracle.bmc.databasemigration.requests.CreateParameterFileVersionRequest + interceptRequest( + com.oracle.bmc.databasemigration.requests.CreateParameterFileVersionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.databasemigration.requests.CreateParameterFileVersionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getJobId(), "jobId must not be blank"); + Validate.notNull( + request.getCreateParameterFileVersionDetails(), + "createParameterFileVersionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230518") + .path("jobs") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getJobId())) + .path("parameterFileVersions"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses.CreateParameterFileVersionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses.CreateParameterFileVersionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses + .CreateParameterFileVersionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses + .CreateParameterFileVersionResponse>() { + @Override + public com.oracle.bmc.databasemigration.responses + .CreateParameterFileVersionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.databasemigration.responses.CreateParameterFileVersionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.databasemigration.responses + .CreateParameterFileVersionResponse.Builder + builder = + com.oracle.bmc.databasemigration.responses + .CreateParameterFileVersionResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.databasemigration.responses + .CreateParameterFileVersionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/DeleteParameterFileVersionConverter.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/DeleteParameterFileVersionConverter.java new file mode 100644 index 00000000000..0f54d600dfd --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/DeleteParameterFileVersionConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.databasemigration.model.*; +import com.oracle.bmc.databasemigration.requests.*; +import com.oracle.bmc.databasemigration.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class DeleteParameterFileVersionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteParameterFileVersionConverter.class); + + public static com.oracle.bmc.databasemigration.requests.DeleteParameterFileVersionRequest + interceptRequest( + com.oracle.bmc.databasemigration.requests.DeleteParameterFileVersionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.databasemigration.requests.DeleteParameterFileVersionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getJobId(), "jobId must not be blank"); + Validate.notBlank(request.getParameterFileName(), "parameterFileName must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230518") + .path("jobs") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getJobId())) + .path("parameterFileVersions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getParameterFileName())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses.DeleteParameterFileVersionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses.DeleteParameterFileVersionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses + .DeleteParameterFileVersionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses + .DeleteParameterFileVersionResponse>() { + @Override + public com.oracle.bmc.databasemigration.responses + .DeleteParameterFileVersionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.databasemigration.responses.DeleteParameterFileVersionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.databasemigration.responses + .DeleteParameterFileVersionResponse.Builder + builder = + com.oracle.bmc.databasemigration.responses + .DeleteParameterFileVersionResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.databasemigration.responses + .DeleteParameterFileVersionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/GetParameterFileVersionConverter.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/GetParameterFileVersionConverter.java new file mode 100644 index 00000000000..f8c1e2f05a5 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/GetParameterFileVersionConverter.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.databasemigration.model.*; +import com.oracle.bmc.databasemigration.requests.*; +import com.oracle.bmc.databasemigration.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class GetParameterFileVersionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetParameterFileVersionConverter.class); + + public static com.oracle.bmc.databasemigration.requests.GetParameterFileVersionRequest + interceptRequest( + com.oracle.bmc.databasemigration.requests.GetParameterFileVersionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.databasemigration.requests.GetParameterFileVersionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getParameterFileName(), "parameterFileName must not be blank"); + Validate.notBlank(request.getJobId(), "jobId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230518") + .path("jobs") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getJobId())) + .path("parameterFileVersions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getParameterFileName())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses.GetParameterFileVersionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses.GetParameterFileVersionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses.GetParameterFileVersionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses + .GetParameterFileVersionResponse>() { + @Override + public com.oracle.bmc.databasemigration.responses + .GetParameterFileVersionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.databasemigration.responses.GetParameterFileVersionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.databasemigration.model + .ParameterFileVersion>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.databasemigration.model + .ParameterFileVersion + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.databasemigration.model + .ParameterFileVersion + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.databasemigration.model + .ParameterFileVersion> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.databasemigration.responses + .GetParameterFileVersionResponse.Builder + builder = + com.oracle.bmc.databasemigration.responses + .GetParameterFileVersionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.parameterFileVersion(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.databasemigration.responses + .GetParameterFileVersionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/ListMigrationParametersConverter.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/ListMigrationParametersConverter.java new file mode 100644 index 00000000000..09d3b59eed8 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/ListMigrationParametersConverter.java @@ -0,0 +1,195 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.databasemigration.model.*; +import com.oracle.bmc.databasemigration.requests.*; +import com.oracle.bmc.databasemigration.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class ListMigrationParametersConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListMigrationParametersConverter.class); + + public static com.oracle.bmc.databasemigration.requests.ListMigrationParametersRequest + interceptRequest( + com.oracle.bmc.databasemigration.requests.ListMigrationParametersRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.databasemigration.requests.ListMigrationParametersRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230518").path("migrationParameters"); + + if (request.getMigrationType() != null) { + target = + target.queryParam( + "migrationType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getMigrationType().getValue())); + } + + if (request.getDatabaseCombination() != null) { + target = + target.queryParam( + "databaseCombination", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDatabaseCombination().getValue())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses.ListMigrationParametersResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses.ListMigrationParametersResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses.ListMigrationParametersResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses + .ListMigrationParametersResponse>() { + @Override + public com.oracle.bmc.databasemigration.responses + .ListMigrationParametersResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.databasemigration.responses.ListMigrationParametersResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.databasemigration.model + .MigrationParameterSummaryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.databasemigration.model + .MigrationParameterSummaryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.databasemigration.model + .MigrationParameterSummaryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.databasemigration.model + .MigrationParameterSummaryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.databasemigration.responses + .ListMigrationParametersResponse.Builder + builder = + com.oracle.bmc.databasemigration.responses + .ListMigrationParametersResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.migrationParameterSummaryCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.databasemigration.responses + .ListMigrationParametersResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/ListParameterFileVersionsConverter.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/ListParameterFileVersionsConverter.java new file mode 100644 index 00000000000..504bf668ee6 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/ListParameterFileVersionsConverter.java @@ -0,0 +1,195 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.databasemigration.model.*; +import com.oracle.bmc.databasemigration.requests.*; +import com.oracle.bmc.databasemigration.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class ListParameterFileVersionsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListParameterFileVersionsConverter.class); + + public static com.oracle.bmc.databasemigration.requests.ListParameterFileVersionsRequest + interceptRequest( + com.oracle.bmc.databasemigration.requests.ListParameterFileVersionsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.databasemigration.requests.ListParameterFileVersionsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getJobId(), "jobId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230518") + .path("jobs") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getJobId())) + .path("parameterFileVersions"); + + if (request.getName() != null) { + target = + target.queryParam( + "name", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getName())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses.ListParameterFileVersionsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses.ListParameterFileVersionsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses + .ListParameterFileVersionsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses + .ListParameterFileVersionsResponse>() { + @Override + public com.oracle.bmc.databasemigration.responses + .ListParameterFileVersionsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.databasemigration.responses.ListParameterFileVersionsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.databasemigration.model + .ParameterFileVersionCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.databasemigration.model + .ParameterFileVersionCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.databasemigration.model + .ParameterFileVersionCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.databasemigration.model + .ParameterFileVersionCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.databasemigration.responses + .ListParameterFileVersionsResponse.Builder + builder = + com.oracle.bmc.databasemigration.responses + .ListParameterFileVersionsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.parameterFileVersionCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.databasemigration.responses + .ListParameterFileVersionsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/MakeCurrentParameterFileVersionConverter.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/MakeCurrentParameterFileVersionConverter.java new file mode 100644 index 00000000000..ac522711d25 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/MakeCurrentParameterFileVersionConverter.java @@ -0,0 +1,167 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.databasemigration.model.*; +import com.oracle.bmc.databasemigration.requests.*; +import com.oracle.bmc.databasemigration.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class MakeCurrentParameterFileVersionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(MakeCurrentParameterFileVersionConverter.class); + + public static com.oracle.bmc.databasemigration.requests.MakeCurrentParameterFileVersionRequest + interceptRequest( + com.oracle.bmc.databasemigration.requests.MakeCurrentParameterFileVersionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.databasemigration.requests.MakeCurrentParameterFileVersionRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getJobId(), "jobId must not be blank"); + Validate.notBlank(request.getParameterFileName(), "parameterFileName must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230518") + .path("jobs") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getJobId())) + .path("parameterFileVersions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getParameterFileName())) + .path("actions") + .path("makeCurrent"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses + .MakeCurrentParameterFileVersionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses + .MakeCurrentParameterFileVersionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses + .MakeCurrentParameterFileVersionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses + .MakeCurrentParameterFileVersionResponse>() { + @Override + public com.oracle.bmc.databasemigration.responses + .MakeCurrentParameterFileVersionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.databasemigration.responses.MakeCurrentParameterFileVersionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.databasemigration.model.Job>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.databasemigration.model.Job + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.databasemigration.model.Job + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.databasemigration.model.Job> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.databasemigration.responses + .MakeCurrentParameterFileVersionResponse.Builder + builder = + com.oracle.bmc.databasemigration.responses + .MakeCurrentParameterFileVersionResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.job(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.databasemigration.responses + .MakeCurrentParameterFileVersionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/SuspendJobConverter.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/SuspendJobConverter.java new file mode 100644 index 00000000000..a979fd61db8 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/internal/http/SuspendJobConverter.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.databasemigration.model.*; +import com.oracle.bmc.databasemigration.requests.*; +import com.oracle.bmc.databasemigration.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class SuspendJobConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SuspendJobConverter.class); + + public static com.oracle.bmc.databasemigration.requests.SuspendJobRequest interceptRequest( + com.oracle.bmc.databasemigration.requests.SuspendJobRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.databasemigration.requests.SuspendJobRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getJobId(), "jobId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230518") + .path("jobs") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getJobId())) + .path("actions") + .path("suspend"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses.SuspendJobResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses.SuspendJobResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses.SuspendJobResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.databasemigration.responses.SuspendJobResponse>() { + @Override + public com.oracle.bmc.databasemigration.responses.SuspendJobResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.databasemigration.responses.SuspendJobResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.databasemigration.model.Job>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.databasemigration.model.Job + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.databasemigration.model.Job + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.databasemigration.model.Job> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.databasemigration.responses.SuspendJobResponse + .Builder + builder = + com.oracle.bmc.databasemigration.responses + .SuspendJobResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.job(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.databasemigration.responses.SuspendJobResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/AdvancedParameterDataTypes.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/AdvancedParameterDataTypes.java new file mode 100644 index 00000000000..313358d6412 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/AdvancedParameterDataTypes.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.model; + +/** + * Advanced Parameter Data types. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public enum AdvancedParameterDataTypes { + String("STRING"), + Integer("INTEGER"), + Float("FLOAT"), + Boolean("BOOLEAN"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(AdvancedParameterDataTypes.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (AdvancedParameterDataTypes v : AdvancedParameterDataTypes.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + AdvancedParameterDataTypes(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AdvancedParameterDataTypes create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'AdvancedParameterDataTypes', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/CreateOracleMigrationDetails.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/CreateOracleMigrationDetails.java index d4a94bab8fd..2b24b7cba04 100644 --- a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/CreateOracleMigrationDetails.java +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/CreateOracleMigrationDetails.java @@ -145,6 +145,23 @@ public Builder ggsDetails(CreateOracleGgsDeploymentDetails ggsDetails) { this.__explicitlySet__.add("ggsDetails"); return this; } + /** + * List of Migration Parameter objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("advancedParameters") + private java.util.List advancedParameters; + + /** + * List of Migration Parameter objects. + * @param advancedParameters the value to set + * @return this builder + **/ + public Builder advancedParameters( + java.util.List advancedParameters) { + this.advancedParameters = advancedParameters; + this.__explicitlySet__.add("advancedParameters"); + return this; + } /** * The OCID of the resource being referenced. **/ @@ -238,6 +255,7 @@ public CreateOracleMigrationDetails build() { this.advisorSettings, this.hubDetails, this.ggsDetails, + this.advancedParameters, this.sourceContainerDatabaseConnectionId, this.excludeObjects, this.includeObjects, @@ -289,6 +307,9 @@ public Builder copy(CreateOracleMigrationDetails model) { if (model.wasPropertyExplicitlySet("ggsDetails")) { this.ggsDetails(model.getGgsDetails()); } + if (model.wasPropertyExplicitlySet("advancedParameters")) { + this.advancedParameters(model.getAdvancedParameters()); + } if (model.wasPropertyExplicitlySet("sourceContainerDatabaseConnectionId")) { this.sourceContainerDatabaseConnectionId( model.getSourceContainerDatabaseConnectionId()); @@ -332,6 +353,7 @@ public CreateOracleMigrationDetails( CreateOracleAdvisorSettings advisorSettings, CreateGoldenGateHubDetails hubDetails, CreateOracleGgsDeploymentDetails ggsDetails, + java.util.List advancedParameters, String sourceContainerDatabaseConnectionId, java.util.List excludeObjects, java.util.List includeObjects, @@ -350,6 +372,7 @@ public CreateOracleMigrationDetails( this.advisorSettings = advisorSettings; this.hubDetails = hubDetails; this.ggsDetails = ggsDetails; + this.advancedParameters = advancedParameters; this.sourceContainerDatabaseConnectionId = sourceContainerDatabaseConnectionId; this.excludeObjects = excludeObjects; this.includeObjects = includeObjects; @@ -391,6 +414,20 @@ public CreateOracleGgsDeploymentDetails getGgsDetails() { return ggsDetails; } + /** + * List of Migration Parameter objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("advancedParameters") + private final java.util.List advancedParameters; + + /** + * List of Migration Parameter objects. + * @return the value + **/ + public java.util.List getAdvancedParameters() { + return advancedParameters; + } + /** * The OCID of the resource being referenced. **/ @@ -475,6 +512,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", advisorSettings=").append(String.valueOf(this.advisorSettings)); sb.append(", hubDetails=").append(String.valueOf(this.hubDetails)); sb.append(", ggsDetails=").append(String.valueOf(this.ggsDetails)); + sb.append(", advancedParameters=").append(String.valueOf(this.advancedParameters)); sb.append(", sourceContainerDatabaseConnectionId=") .append(String.valueOf(this.sourceContainerDatabaseConnectionId)); sb.append(", excludeObjects=").append(String.valueOf(this.excludeObjects)); @@ -500,6 +538,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.advisorSettings, other.advisorSettings) && java.util.Objects.equals(this.hubDetails, other.hubDetails) && java.util.Objects.equals(this.ggsDetails, other.ggsDetails) + && java.util.Objects.equals(this.advancedParameters, other.advancedParameters) && java.util.Objects.equals( this.sourceContainerDatabaseConnectionId, other.sourceContainerDatabaseConnectionId) @@ -529,6 +568,11 @@ public int hashCode() { + (this.advisorSettings == null ? 43 : this.advisorSettings.hashCode()); result = (result * PRIME) + (this.hubDetails == null ? 43 : this.hubDetails.hashCode()); result = (result * PRIME) + (this.ggsDetails == null ? 43 : this.ggsDetails.hashCode()); + result = + (result * PRIME) + + (this.advancedParameters == null + ? 43 + : this.advancedParameters.hashCode()); result = (result * PRIME) + (this.sourceContainerDatabaseConnectionId == null diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/CreateParameterFileVersionDetails.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/CreateParameterFileVersionDetails.java new file mode 100644 index 00000000000..9ecd1a7f9ff --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/CreateParameterFileVersionDetails.java @@ -0,0 +1,251 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.model; + +/** + * Details about a specific ParameterFileVersion + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateParameterFileVersionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateParameterFileVersionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"description", "kind", "content", "name"}) + public CreateParameterFileVersionDetails( + String description, JobParameterFileVersionKind kind, String content, String name) { + super(); + this.description = description; + this.kind = kind; + this.content = content; + this.name = name; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Describes the current parameter file version + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Describes the current parameter file version + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kind") + private JobParameterFileVersionKind kind; + + /** + * Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT) + * @param kind the value to set + * @return this builder + **/ + public Builder kind(JobParameterFileVersionKind kind) { + this.kind = kind; + this.__explicitlySet__.add("kind"); + return this; + } + /** + * The content in base64 encoded character string containing the value of the parameter file + **/ + @com.fasterxml.jackson.annotation.JsonProperty("content") + private String content; + + /** + * The content in base64 encoded character string containing the value of the parameter file + * @param content the value to set + * @return this builder + **/ + public Builder content(String content) { + this.content = content; + this.__explicitlySet__.add("content"); + return this; + } + /** + * Customizable name for the paramenter file version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Customizable name for the paramenter file version. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateParameterFileVersionDetails build() { + CreateParameterFileVersionDetails model = + new CreateParameterFileVersionDetails( + this.description, this.kind, this.content, this.name); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateParameterFileVersionDetails model) { + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("kind")) { + this.kind(model.getKind()); + } + if (model.wasPropertyExplicitlySet("content")) { + this.content(model.getContent()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Describes the current parameter file version + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Describes the current parameter file version + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kind") + private final JobParameterFileVersionKind kind; + + /** + * Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT) + * @return the value + **/ + public JobParameterFileVersionKind getKind() { + return kind; + } + + /** + * The content in base64 encoded character string containing the value of the parameter file + **/ + @com.fasterxml.jackson.annotation.JsonProperty("content") + private final String content; + + /** + * The content in base64 encoded character string containing the value of the parameter file + * @return the value + **/ + public String getContent() { + return content; + } + + /** + * Customizable name for the paramenter file version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Customizable name for the paramenter file version. + * @return the value + **/ + public String getName() { + return name; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateParameterFileVersionDetails("); + sb.append("super=").append(super.toString()); + sb.append("description=").append(String.valueOf(this.description)); + sb.append(", kind=").append(String.valueOf(this.kind)); + sb.append(", content=").append(String.valueOf(this.content)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateParameterFileVersionDetails)) { + return false; + } + + CreateParameterFileVersionDetails other = (CreateParameterFileVersionDetails) o; + return java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.kind, other.kind) + && java.util.Objects.equals(this.content, other.content) + && java.util.Objects.equals(this.name, other.name) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.kind == null ? 43 : this.kind.hashCode()); + result = (result * PRIME) + (this.content == null ? 43 : this.content.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/DataPumpTablespaceBlockSizesInKb.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/DataPumpTablespaceBlockSizesInKb.java index cb395965f08..e50c0ea7444 100644 --- a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/DataPumpTablespaceBlockSizesInKb.java +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/DataPumpTablespaceBlockSizesInKb.java @@ -9,8 +9,10 @@ **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") public enum DataPumpTablespaceBlockSizesInKb { + Size2K("SIZE_2K"), Size8K("SIZE_8K"), Size16K("SIZE_16K"), + Size32K("SIZE_32K"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/Job.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/Job.java index ace16db8e89..b0fca603a08 100644 --- a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/Job.java +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/Job.java @@ -31,6 +31,7 @@ public final class Job extends com.oracle.bmc.http.internal.ExplicitlySetBmcMode "unsupportedObjects", "lifecycleState", "lifecycleDetails", + "parameterFileVersions", "freeformTags", "definedTags", "systemTags" @@ -46,6 +47,7 @@ public Job( java.util.List unsupportedObjects, JobLifecycleStates lifecycleState, String lifecycleDetails, + java.util.List parameterFileVersions, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags) { @@ -60,6 +62,7 @@ public Job( this.unsupportedObjects = unsupportedObjects; this.lifecycleState = lifecycleState; this.lifecycleDetails = lifecycleDetails; + this.parameterFileVersions = parameterFileVersions; this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; @@ -241,6 +244,25 @@ public Builder lifecycleDetails(String lifecycleDetails) { this.__explicitlySet__.add("lifecycleDetails"); return this; } + /** + * A list of parameter file versions that can be viewed or edited for the current job. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parameterFileVersions") + private java.util.List parameterFileVersions; + + /** + * A list of parameter file versions that can be viewed or edited for the current job. + * + * @param parameterFileVersions the value to set + * @return this builder + **/ + public Builder parameterFileVersions( + java.util.List parameterFileVersions) { + this.parameterFileVersions = parameterFileVersions; + this.__explicitlySet__.add("parameterFileVersions"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. * For more information, see Resource Tags. Example: {"Department": "Finance"} @@ -319,6 +341,7 @@ public Job build() { this.unsupportedObjects, this.lifecycleState, this.lifecycleDetails, + this.parameterFileVersions, this.freeformTags, this.definedTags, this.systemTags); @@ -360,6 +383,9 @@ public Builder copy(Job model) { if (model.wasPropertyExplicitlySet("lifecycleDetails")) { this.lifecycleDetails(model.getLifecycleDetails()); } + if (model.wasPropertyExplicitlySet("parameterFileVersions")) { + this.parameterFileVersions(model.getParameterFileVersions()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -537,6 +563,22 @@ public String getLifecycleDetails() { return lifecycleDetails; } + /** + * A list of parameter file versions that can be viewed or edited for the current job. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parameterFileVersions") + private final java.util.List parameterFileVersions; + + /** + * A list of parameter file versions that can be viewed or edited for the current job. + * + * @return the value + **/ + public java.util.List getParameterFileVersions() { + return parameterFileVersions; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. * For more information, see Resource Tags. Example: {"Department": "Finance"} @@ -615,6 +657,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", unsupportedObjects=").append(String.valueOf(this.unsupportedObjects)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", parameterFileVersions=").append(String.valueOf(this.parameterFileVersions)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); @@ -642,6 +685,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.unsupportedObjects, other.unsupportedObjects) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.parameterFileVersions, other.parameterFileVersions) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) @@ -670,6 +714,11 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = + (result * PRIME) + + (this.parameterFileVersions == null + ? 43 + : this.parameterFileVersions.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/JobParameterFileVersionKind.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/JobParameterFileVersionKind.java new file mode 100644 index 00000000000..2381d963ea7 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/JobParameterFileVersionKind.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.model; + +/** + * The valid type of parameter file version + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public enum JobParameterFileVersionKind { + Extract("EXTRACT"), + Replicat("REPLICAT"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(JobParameterFileVersionKind.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (JobParameterFileVersionKind v : JobParameterFileVersionKind.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + JobParameterFileVersionKind(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static JobParameterFileVersionKind create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'JobParameterFileVersionKind', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/MigrationParameterBase.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/MigrationParameterBase.java new file mode 100644 index 00000000000..0df4900f5d0 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/MigrationParameterBase.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.model; + +/** + * Migration parameter base object. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MigrationParameterBase.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MigrationParameterBase + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "dataType"}) + public MigrationParameterBase(String name, AdvancedParameterDataTypes dataType) { + super(); + this.name = name; + this.dataType = dataType; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Parameter name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Parameter name. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Parameter data type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataType") + private AdvancedParameterDataTypes dataType; + + /** + * Parameter data type. + * @param dataType the value to set + * @return this builder + **/ + public Builder dataType(AdvancedParameterDataTypes dataType) { + this.dataType = dataType; + this.__explicitlySet__.add("dataType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MigrationParameterBase build() { + MigrationParameterBase model = new MigrationParameterBase(this.name, this.dataType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MigrationParameterBase model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("dataType")) { + this.dataType(model.getDataType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Parameter name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Parameter name. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Parameter data type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataType") + private final AdvancedParameterDataTypes dataType; + + /** + * Parameter data type. + * @return the value + **/ + public AdvancedParameterDataTypes getDataType() { + return dataType; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MigrationParameterBase("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", dataType=").append(String.valueOf(this.dataType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MigrationParameterBase)) { + return false; + } + + MigrationParameterBase other = (MigrationParameterBase) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.dataType, other.dataType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.dataType == null ? 43 : this.dataType.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/MigrationParameterDetails.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/MigrationParameterDetails.java new file mode 100644 index 00000000000..b068ef01ef5 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/MigrationParameterDetails.java @@ -0,0 +1,228 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.model; + +/** + * Migration parameter details object. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MigrationParameterDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MigrationParameterDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"value", "name", "dataType"}) + public MigrationParameterDetails( + String value, String name, AdvancedParameterDataTypes dataType) { + super(); + this.value = value; + this.name = name; + this.dataType = dataType; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * If a STRING data type then the value should be an array of characters, + * if a INTEGER data type then the value should be an integer value, + * if a FLOAT data type then the value should be an float value, + * if a BOOLEAN data type then the value should be TRUE or FALSE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + /** + * If a STRING data type then the value should be an array of characters, + * if a INTEGER data type then the value should be an integer value, + * if a FLOAT data type then the value should be an float value, + * if a BOOLEAN data type then the value should be TRUE or FALSE. + * + * @param value the value to set + * @return this builder + **/ + public Builder value(String value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + /** + * Parameter name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Parameter name. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Parameter data type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataType") + private AdvancedParameterDataTypes dataType; + + /** + * Parameter data type. + * @param dataType the value to set + * @return this builder + **/ + public Builder dataType(AdvancedParameterDataTypes dataType) { + this.dataType = dataType; + this.__explicitlySet__.add("dataType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MigrationParameterDetails build() { + MigrationParameterDetails model = + new MigrationParameterDetails(this.value, this.name, this.dataType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MigrationParameterDetails model) { + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("dataType")) { + this.dataType(model.getDataType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * If a STRING data type then the value should be an array of characters, + * if a INTEGER data type then the value should be an integer value, + * if a FLOAT data type then the value should be an float value, + * if a BOOLEAN data type then the value should be TRUE or FALSE. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final String value; + + /** + * If a STRING data type then the value should be an array of characters, + * if a INTEGER data type then the value should be an integer value, + * if a FLOAT data type then the value should be an float value, + * if a BOOLEAN data type then the value should be TRUE or FALSE. + * + * @return the value + **/ + public String getValue() { + return value; + } + + /** + * Parameter name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Parameter name. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Parameter data type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataType") + private final AdvancedParameterDataTypes dataType; + + /** + * Parameter data type. + * @return the value + **/ + public AdvancedParameterDataTypes getDataType() { + return dataType; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MigrationParameterDetails("); + sb.append("super=").append(super.toString()); + sb.append("value=").append(String.valueOf(this.value)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", dataType=").append(String.valueOf(this.dataType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MigrationParameterDetails)) { + return false; + } + + MigrationParameterDetails other = (MigrationParameterDetails) o; + return java.util.Objects.equals(this.value, other.value) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.dataType, other.dataType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.dataType == null ? 43 : this.dataType.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/MigrationParameterSummary.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/MigrationParameterSummary.java new file mode 100644 index 00000000000..13105dbb9c6 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/MigrationParameterSummary.java @@ -0,0 +1,639 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.model; + +/** + * Migration parameter response object. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MigrationParameterSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MigrationParameterSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "databaseCombination", + "displayName", + "docUrlLink", + "description", + "categoryName", + "categoryDisplayName", + "migrationType", + "defaultValue", + "minValue", + "maxValue", + "hintText", + "name", + "dataType" + }) + public MigrationParameterSummary( + DatabaseCombination databaseCombination, + String displayName, + String docUrlLink, + String description, + String categoryName, + String categoryDisplayName, + MigrationTypes migrationType, + String defaultValue, + Float minValue, + Float maxValue, + String hintText, + String name, + AdvancedParameterDataTypes dataType) { + super(); + this.databaseCombination = databaseCombination; + this.displayName = displayName; + this.docUrlLink = docUrlLink; + this.description = description; + this.categoryName = categoryName; + this.categoryDisplayName = categoryDisplayName; + this.migrationType = migrationType; + this.defaultValue = defaultValue; + this.minValue = minValue; + this.maxValue = maxValue; + this.hintText = hintText; + this.name = name; + this.dataType = dataType; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The combination of source and target databases participating in a migration. + * Example: ORACLE means the migration is meant for migrating Oracle source and target databases. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseCombination") + private DatabaseCombination databaseCombination; + + /** + * The combination of source and target databases participating in a migration. + * Example: ORACLE means the migration is meant for migrating Oracle source and target databases. + * + * @param databaseCombination the value to set + * @return this builder + **/ + public Builder databaseCombination(DatabaseCombination databaseCombination) { + this.databaseCombination = databaseCombination; + this.__explicitlySet__.add("databaseCombination"); + return this; + } + /** + * Parameter display name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Parameter display name. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Parameter documentation URL link. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("docUrlLink") + private String docUrlLink; + + /** + * Parameter documentation URL link. + * @param docUrlLink the value to set + * @return this builder + **/ + public Builder docUrlLink(String docUrlLink) { + this.docUrlLink = docUrlLink; + this.__explicitlySet__.add("docUrlLink"); + return this; + } + /** + * Parameter name description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Parameter name description. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Parameter category name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("categoryName") + private String categoryName; + + /** + * Parameter category name. + * @param categoryName the value to set + * @return this builder + **/ + public Builder categoryName(String categoryName) { + this.categoryName = categoryName; + this.__explicitlySet__.add("categoryName"); + return this; + } + /** + * Parameter category display name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("categoryDisplayName") + private String categoryDisplayName; + + /** + * Parameter category display name. + * @param categoryDisplayName the value to set + * @return this builder + **/ + public Builder categoryDisplayName(String categoryDisplayName) { + this.categoryDisplayName = categoryDisplayName; + this.__explicitlySet__.add("categoryDisplayName"); + return this; + } + /** + * Migration Stage. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("migrationType") + private MigrationTypes migrationType; + + /** + * Migration Stage. + * @param migrationType the value to set + * @return this builder + **/ + public Builder migrationType(MigrationTypes migrationType) { + this.migrationType = migrationType; + this.__explicitlySet__.add("migrationType"); + return this; + } + /** + * Default value for a parameter. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("defaultValue") + private String defaultValue; + + /** + * Default value for a parameter. + * @param defaultValue the value to set + * @return this builder + **/ + public Builder defaultValue(String defaultValue) { + this.defaultValue = defaultValue; + this.__explicitlySet__.add("defaultValue"); + return this; + } + /** + * Parameter minimum value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("minValue") + private Float minValue; + + /** + * Parameter minimum value. + * @param minValue the value to set + * @return this builder + **/ + public Builder minValue(Float minValue) { + this.minValue = minValue; + this.__explicitlySet__.add("minValue"); + return this; + } + /** + * Parameter maximum value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxValue") + private Float maxValue; + + /** + * Parameter maximum value. + * @param maxValue the value to set + * @return this builder + **/ + public Builder maxValue(Float maxValue) { + this.maxValue = maxValue; + this.__explicitlySet__.add("maxValue"); + return this; + } + /** + * Hint text for parameter value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hintText") + private String hintText; + + /** + * Hint text for parameter value. + * @param hintText the value to set + * @return this builder + **/ + public Builder hintText(String hintText) { + this.hintText = hintText; + this.__explicitlySet__.add("hintText"); + return this; + } + /** + * Parameter name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Parameter name. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Parameter data type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataType") + private AdvancedParameterDataTypes dataType; + + /** + * Parameter data type. + * @param dataType the value to set + * @return this builder + **/ + public Builder dataType(AdvancedParameterDataTypes dataType) { + this.dataType = dataType; + this.__explicitlySet__.add("dataType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MigrationParameterSummary build() { + MigrationParameterSummary model = + new MigrationParameterSummary( + this.databaseCombination, + this.displayName, + this.docUrlLink, + this.description, + this.categoryName, + this.categoryDisplayName, + this.migrationType, + this.defaultValue, + this.minValue, + this.maxValue, + this.hintText, + this.name, + this.dataType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MigrationParameterSummary model) { + if (model.wasPropertyExplicitlySet("databaseCombination")) { + this.databaseCombination(model.getDatabaseCombination()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("docUrlLink")) { + this.docUrlLink(model.getDocUrlLink()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("categoryName")) { + this.categoryName(model.getCategoryName()); + } + if (model.wasPropertyExplicitlySet("categoryDisplayName")) { + this.categoryDisplayName(model.getCategoryDisplayName()); + } + if (model.wasPropertyExplicitlySet("migrationType")) { + this.migrationType(model.getMigrationType()); + } + if (model.wasPropertyExplicitlySet("defaultValue")) { + this.defaultValue(model.getDefaultValue()); + } + if (model.wasPropertyExplicitlySet("minValue")) { + this.minValue(model.getMinValue()); + } + if (model.wasPropertyExplicitlySet("maxValue")) { + this.maxValue(model.getMaxValue()); + } + if (model.wasPropertyExplicitlySet("hintText")) { + this.hintText(model.getHintText()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("dataType")) { + this.dataType(model.getDataType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The combination of source and target databases participating in a migration. + * Example: ORACLE means the migration is meant for migrating Oracle source and target databases. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseCombination") + private final DatabaseCombination databaseCombination; + + /** + * The combination of source and target databases participating in a migration. + * Example: ORACLE means the migration is meant for migrating Oracle source and target databases. + * + * @return the value + **/ + public DatabaseCombination getDatabaseCombination() { + return databaseCombination; + } + + /** + * Parameter display name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Parameter display name. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Parameter documentation URL link. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("docUrlLink") + private final String docUrlLink; + + /** + * Parameter documentation URL link. + * @return the value + **/ + public String getDocUrlLink() { + return docUrlLink; + } + + /** + * Parameter name description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Parameter name description. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Parameter category name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("categoryName") + private final String categoryName; + + /** + * Parameter category name. + * @return the value + **/ + public String getCategoryName() { + return categoryName; + } + + /** + * Parameter category display name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("categoryDisplayName") + private final String categoryDisplayName; + + /** + * Parameter category display name. + * @return the value + **/ + public String getCategoryDisplayName() { + return categoryDisplayName; + } + + /** + * Migration Stage. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("migrationType") + private final MigrationTypes migrationType; + + /** + * Migration Stage. + * @return the value + **/ + public MigrationTypes getMigrationType() { + return migrationType; + } + + /** + * Default value for a parameter. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("defaultValue") + private final String defaultValue; + + /** + * Default value for a parameter. + * @return the value + **/ + public String getDefaultValue() { + return defaultValue; + } + + /** + * Parameter minimum value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("minValue") + private final Float minValue; + + /** + * Parameter minimum value. + * @return the value + **/ + public Float getMinValue() { + return minValue; + } + + /** + * Parameter maximum value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxValue") + private final Float maxValue; + + /** + * Parameter maximum value. + * @return the value + **/ + public Float getMaxValue() { + return maxValue; + } + + /** + * Hint text for parameter value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hintText") + private final String hintText; + + /** + * Hint text for parameter value. + * @return the value + **/ + public String getHintText() { + return hintText; + } + + /** + * Parameter name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Parameter name. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Parameter data type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataType") + private final AdvancedParameterDataTypes dataType; + + /** + * Parameter data type. + * @return the value + **/ + public AdvancedParameterDataTypes getDataType() { + return dataType; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MigrationParameterSummary("); + sb.append("super=").append(super.toString()); + sb.append("databaseCombination=").append(String.valueOf(this.databaseCombination)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", docUrlLink=").append(String.valueOf(this.docUrlLink)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", categoryName=").append(String.valueOf(this.categoryName)); + sb.append(", categoryDisplayName=").append(String.valueOf(this.categoryDisplayName)); + sb.append(", migrationType=").append(String.valueOf(this.migrationType)); + sb.append(", defaultValue=").append(String.valueOf(this.defaultValue)); + sb.append(", minValue=").append(String.valueOf(this.minValue)); + sb.append(", maxValue=").append(String.valueOf(this.maxValue)); + sb.append(", hintText=").append(String.valueOf(this.hintText)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", dataType=").append(String.valueOf(this.dataType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MigrationParameterSummary)) { + return false; + } + + MigrationParameterSummary other = (MigrationParameterSummary) o; + return java.util.Objects.equals(this.databaseCombination, other.databaseCombination) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.docUrlLink, other.docUrlLink) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.categoryName, other.categoryName) + && java.util.Objects.equals(this.categoryDisplayName, other.categoryDisplayName) + && java.util.Objects.equals(this.migrationType, other.migrationType) + && java.util.Objects.equals(this.defaultValue, other.defaultValue) + && java.util.Objects.equals(this.minValue, other.minValue) + && java.util.Objects.equals(this.maxValue, other.maxValue) + && java.util.Objects.equals(this.hintText, other.hintText) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.dataType, other.dataType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.databaseCombination == null + ? 43 + : this.databaseCombination.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.docUrlLink == null ? 43 : this.docUrlLink.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.categoryName == null ? 43 : this.categoryName.hashCode()); + result = + (result * PRIME) + + (this.categoryDisplayName == null + ? 43 + : this.categoryDisplayName.hashCode()); + result = + (result * PRIME) + + (this.migrationType == null ? 43 : this.migrationType.hashCode()); + result = (result * PRIME) + (this.defaultValue == null ? 43 : this.defaultValue.hashCode()); + result = (result * PRIME) + (this.minValue == null ? 43 : this.minValue.hashCode()); + result = (result * PRIME) + (this.maxValue == null ? 43 : this.maxValue.hashCode()); + result = (result * PRIME) + (this.hintText == null ? 43 : this.hintText.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.dataType == null ? 43 : this.dataType.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/MigrationParameterSummaryCollection.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/MigrationParameterSummaryCollection.java new file mode 100644 index 00000000000..75c41ccb901 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/MigrationParameterSummaryCollection.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.model; + +/** + * List of Migration Parameter Summary objects. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MigrationParameterSummaryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MigrationParameterSummaryCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public MigrationParameterSummaryCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of Migration Parameters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of Migration Parameters. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MigrationParameterSummaryCollection build() { + MigrationParameterSummaryCollection model = + new MigrationParameterSummaryCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MigrationParameterSummaryCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of Migration Parameters. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of Migration Parameters. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MigrationParameterSummaryCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MigrationParameterSummaryCollection)) { + return false; + } + + MigrationParameterSummaryCollection other = (MigrationParameterSummaryCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/OracleMigration.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/OracleMigration.java index e04f17af157..b053d4046df 100644 --- a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/OracleMigration.java +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/OracleMigration.java @@ -241,6 +241,23 @@ public Builder sourceContainerDatabaseConnectionId( this.__explicitlySet__.add("sourceContainerDatabaseConnectionId"); return this; } + /** + * List of Migration Parameter objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("advancedParameters") + private java.util.List advancedParameters; + + /** + * List of Migration Parameter objects. + * @param advancedParameters the value to set + * @return this builder + **/ + public Builder advancedParameters( + java.util.List advancedParameters) { + this.advancedParameters = advancedParameters; + this.__explicitlySet__.add("advancedParameters"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -270,7 +287,8 @@ public OracleMigration build() { this.advisorSettings, this.hubDetails, this.ggsDetails, - this.sourceContainerDatabaseConnectionId); + this.sourceContainerDatabaseConnectionId, + this.advancedParameters); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -349,6 +367,9 @@ public Builder copy(OracleMigration model) { this.sourceContainerDatabaseConnectionId( model.getSourceContainerDatabaseConnectionId()); } + if (model.wasPropertyExplicitlySet("advancedParameters")) { + this.advancedParameters(model.getAdvancedParameters()); + } return this; } } @@ -388,7 +409,8 @@ public OracleMigration( OracleAdvisorSettings advisorSettings, GoldenGateHubDetails hubDetails, OracleGgsDeploymentDetails ggsDetails, - String sourceContainerDatabaseConnectionId) { + String sourceContainerDatabaseConnectionId, + java.util.List advancedParameters) { super( id, description, @@ -413,6 +435,7 @@ public OracleMigration( this.hubDetails = hubDetails; this.ggsDetails = ggsDetails; this.sourceContainerDatabaseConnectionId = sourceContainerDatabaseConnectionId; + this.advancedParameters = advancedParameters; } @com.fasterxml.jackson.annotation.JsonProperty("dataTransferMediumDetails") @@ -464,6 +487,20 @@ public String getSourceContainerDatabaseConnectionId() { return sourceContainerDatabaseConnectionId; } + /** + * List of Migration Parameter objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("advancedParameters") + private final java.util.List advancedParameters; + + /** + * List of Migration Parameter objects. + * @return the value + **/ + public java.util.List getAdvancedParameters() { + return advancedParameters; + } + @Override public String toString() { return this.toString(true); @@ -486,6 +523,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", ggsDetails=").append(String.valueOf(this.ggsDetails)); sb.append(", sourceContainerDatabaseConnectionId=") .append(String.valueOf(this.sourceContainerDatabaseConnectionId)); + sb.append(", advancedParameters=").append(String.valueOf(this.advancedParameters)); sb.append(")"); return sb.toString(); } @@ -509,6 +547,7 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.sourceContainerDatabaseConnectionId, other.sourceContainerDatabaseConnectionId) + && java.util.Objects.equals(this.advancedParameters, other.advancedParameters) && super.equals(other); } @@ -536,6 +575,11 @@ public int hashCode() { + (this.sourceContainerDatabaseConnectionId == null ? 43 : this.sourceContainerDatabaseConnectionId.hashCode()); + result = + (result * PRIME) + + (this.advancedParameters == null + ? 43 + : this.advancedParameters.hashCode()); return result; } } diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/ParameterFileVersion.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/ParameterFileVersion.java new file mode 100644 index 00000000000..6243a6970c5 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/ParameterFileVersion.java @@ -0,0 +1,384 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.model; + +/** + * A parameter file detatails + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ParameterFileVersion.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ParameterFileVersion extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "description", + "isCurrent", + "isFactory", + "kind", + "timeCreated", + "content" + }) + public ParameterFileVersion( + String name, + String description, + Boolean isCurrent, + Boolean isFactory, + JobParameterFileVersionKind kind, + java.util.Date timeCreated, + String content) { + super(); + this.name = name; + this.description = description; + this.isCurrent = isCurrent; + this.isFactory = isFactory; + this.kind = kind; + this.timeCreated = timeCreated; + this.content = content; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A unique name associated with the current migration/job and extract/replicat name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * A unique name associated with the current migration/job and extract/replicat name + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Describes the current parameter file version + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Describes the current parameter file version + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Return boolean true/false for the currently in-use parameter file (factory or a versioned file) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCurrent") + private Boolean isCurrent; + + /** + * Return boolean true/false for the currently in-use parameter file (factory or a versioned file) + * @param isCurrent the value to set + * @return this builder + **/ + public Builder isCurrent(Boolean isCurrent) { + this.isCurrent = isCurrent; + this.__explicitlySet__.add("isCurrent"); + return this; + } + /** + * Return true/false for whether the parameter file is oracle provided (Factory) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFactory") + private Boolean isFactory; + + /** + * Return true/false for whether the parameter file is oracle provided (Factory) + * @param isFactory the value to set + * @return this builder + **/ + public Builder isFactory(Boolean isFactory) { + this.isFactory = isFactory; + this.__explicitlySet__.add("isFactory"); + return this; + } + /** + * Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kind") + private JobParameterFileVersionKind kind; + + /** + * Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT) + * @param kind the value to set + * @return this builder + **/ + public Builder kind(JobParameterFileVersionKind kind) { + this.kind = kind; + this.__explicitlySet__.add("kind"); + return this; + } + /** + * The time when this parameter file was applied on the process + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time when this parameter file was applied on the process + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The content in base64 encoded character string containing the value of the parameter file + **/ + @com.fasterxml.jackson.annotation.JsonProperty("content") + private String content; + + /** + * The content in base64 encoded character string containing the value of the parameter file + * @param content the value to set + * @return this builder + **/ + public Builder content(String content) { + this.content = content; + this.__explicitlySet__.add("content"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ParameterFileVersion build() { + ParameterFileVersion model = + new ParameterFileVersion( + this.name, + this.description, + this.isCurrent, + this.isFactory, + this.kind, + this.timeCreated, + this.content); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ParameterFileVersion model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("isCurrent")) { + this.isCurrent(model.getIsCurrent()); + } + if (model.wasPropertyExplicitlySet("isFactory")) { + this.isFactory(model.getIsFactory()); + } + if (model.wasPropertyExplicitlySet("kind")) { + this.kind(model.getKind()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("content")) { + this.content(model.getContent()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A unique name associated with the current migration/job and extract/replicat name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * A unique name associated with the current migration/job and extract/replicat name + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Describes the current parameter file version + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Describes the current parameter file version + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Return boolean true/false for the currently in-use parameter file (factory or a versioned file) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCurrent") + private final Boolean isCurrent; + + /** + * Return boolean true/false for the currently in-use parameter file (factory or a versioned file) + * @return the value + **/ + public Boolean getIsCurrent() { + return isCurrent; + } + + /** + * Return true/false for whether the parameter file is oracle provided (Factory) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFactory") + private final Boolean isFactory; + + /** + * Return true/false for whether the parameter file is oracle provided (Factory) + * @return the value + **/ + public Boolean getIsFactory() { + return isFactory; + } + + /** + * Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kind") + private final JobParameterFileVersionKind kind; + + /** + * Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT) + * @return the value + **/ + public JobParameterFileVersionKind getKind() { + return kind; + } + + /** + * The time when this parameter file was applied on the process + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time when this parameter file was applied on the process + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The content in base64 encoded character string containing the value of the parameter file + **/ + @com.fasterxml.jackson.annotation.JsonProperty("content") + private final String content; + + /** + * The content in base64 encoded character string containing the value of the parameter file + * @return the value + **/ + public String getContent() { + return content; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ParameterFileVersion("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", isCurrent=").append(String.valueOf(this.isCurrent)); + sb.append(", isFactory=").append(String.valueOf(this.isFactory)); + sb.append(", kind=").append(String.valueOf(this.kind)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", content=").append(String.valueOf(this.content)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ParameterFileVersion)) { + return false; + } + + ParameterFileVersion other = (ParameterFileVersion) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.isCurrent, other.isCurrent) + && java.util.Objects.equals(this.isFactory, other.isFactory) + && java.util.Objects.equals(this.kind, other.kind) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.content, other.content) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.isCurrent == null ? 43 : this.isCurrent.hashCode()); + result = (result * PRIME) + (this.isFactory == null ? 43 : this.isFactory.hashCode()); + result = (result * PRIME) + (this.kind == null ? 43 : this.kind.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.content == null ? 43 : this.content.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/ParameterFileVersionCollection.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/ParameterFileVersionCollection.java new file mode 100644 index 00000000000..93a8fcc48f5 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/ParameterFileVersionCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.model; + +/** + * Results of request for Parameter Files. Contents is a collection of ParameterFileVersionSummary. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ParameterFileVersionCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ParameterFileVersionCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ParameterFileVersionCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A list of A parameter file metadata + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * A list of A parameter file metadata + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ParameterFileVersionCollection build() { + ParameterFileVersionCollection model = new ParameterFileVersionCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ParameterFileVersionCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A list of A parameter file metadata + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * A list of A parameter file metadata + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ParameterFileVersionCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ParameterFileVersionCollection)) { + return false; + } + + ParameterFileVersionCollection other = (ParameterFileVersionCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/ParameterFileVersionSummary.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/ParameterFileVersionSummary.java new file mode 100644 index 00000000000..77c4eadcab0 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/ParameterFileVersionSummary.java @@ -0,0 +1,490 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.model; + +/** + * A parameter file detatails + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ParameterFileVersionSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ParameterFileVersionSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "kind", + "description", + "isCurrent", + "isFactory", + "timeCreated", + "freeformTags", + "definedTags", + "systemTags" + }) + public ParameterFileVersionSummary( + String name, + JobParameterFileVersionKind kind, + String description, + Boolean isCurrent, + Boolean isFactory, + java.util.Date timeCreated, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.name = name; + this.kind = kind; + this.description = description; + this.isCurrent = isCurrent; + this.isFactory = isFactory; + this.timeCreated = timeCreated; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A unique name associated with the current migration/job and extract/replicat name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * A unique name associated with the current migration/job and extract/replicat name + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kind") + private JobParameterFileVersionKind kind; + + /** + * Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT) + * @param kind the value to set + * @return this builder + **/ + public Builder kind(JobParameterFileVersionKind kind) { + this.kind = kind; + this.__explicitlySet__.add("kind"); + return this; + } + /** + * A description to discribe the current parameter file version + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A description to discribe the current parameter file version + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Return boolean true/false for the currently in-use parameter file (factory or a versioned file) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCurrent") + private Boolean isCurrent; + + /** + * Return boolean true/false for the currently in-use parameter file (factory or a versioned file) + * @param isCurrent the value to set + * @return this builder + **/ + public Builder isCurrent(Boolean isCurrent) { + this.isCurrent = isCurrent; + this.__explicitlySet__.add("isCurrent"); + return this; + } + /** + * Return true/false for whether the parameter file is oracle provided (Factory) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFactory") + private Boolean isFactory; + + /** + * Return true/false for whether the parameter file is oracle provided (Factory) + * @param isFactory the value to set + * @return this builder + **/ + public Builder isFactory(Boolean isFactory) { + this.isFactory = isFactory; + this.__explicitlySet__.add("isFactory"); + return this; + } + /** + * The time when this parameter file was applied on the process + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time when this parameter file was applied on the process + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see Resource Tags. Example: {"Department": "Finance"} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see Resource Tags. Example: {"Department": "Finance"} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ParameterFileVersionSummary build() { + ParameterFileVersionSummary model = + new ParameterFileVersionSummary( + this.name, + this.kind, + this.description, + this.isCurrent, + this.isFactory, + this.timeCreated, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ParameterFileVersionSummary model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("kind")) { + this.kind(model.getKind()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("isCurrent")) { + this.isCurrent(model.getIsCurrent()); + } + if (model.wasPropertyExplicitlySet("isFactory")) { + this.isFactory(model.getIsFactory()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A unique name associated with the current migration/job and extract/replicat name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * A unique name associated with the current migration/job and extract/replicat name + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kind") + private final JobParameterFileVersionKind kind; + + /** + * Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT) + * @return the value + **/ + public JobParameterFileVersionKind getKind() { + return kind; + } + + /** + * A description to discribe the current parameter file version + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A description to discribe the current parameter file version + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Return boolean true/false for the currently in-use parameter file (factory or a versioned file) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCurrent") + private final Boolean isCurrent; + + /** + * Return boolean true/false for the currently in-use parameter file (factory or a versioned file) + * @return the value + **/ + public Boolean getIsCurrent() { + return isCurrent; + } + + /** + * Return true/false for whether the parameter file is oracle provided (Factory) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFactory") + private final Boolean isFactory; + + /** + * Return true/false for whether the parameter file is oracle provided (Factory) + * @return the value + **/ + public Boolean getIsFactory() { + return isFactory; + } + + /** + * The time when this parameter file was applied on the process + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time when this parameter file was applied on the process + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see Resource Tags. Example: {"Department": "Finance"} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see Resource Tags. Example: {"Department": "Finance"} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ParameterFileVersionSummary("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", kind=").append(String.valueOf(this.kind)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", isCurrent=").append(String.valueOf(this.isCurrent)); + sb.append(", isFactory=").append(String.valueOf(this.isFactory)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ParameterFileVersionSummary)) { + return false; + } + + ParameterFileVersionSummary other = (ParameterFileVersionSummary) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.kind, other.kind) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.isCurrent, other.isCurrent) + && java.util.Objects.equals(this.isFactory, other.isFactory) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.kind == null ? 43 : this.kind.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.isCurrent == null ? 43 : this.isCurrent.hashCode()); + result = (result * PRIME) + (this.isFactory == null ? 43 : this.isFactory.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/PhaseStatus.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/PhaseStatus.java index ac76d87b57f..94a172e7789 100644 --- a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/PhaseStatus.java +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/PhaseStatus.java @@ -29,7 +29,9 @@ public final class PhaseStatus extends com.oracle.bmc.http.internal.ExplicitlySe "action", "extract", "logLocation", - "progress" + "progress", + "isSuspendAvailable", + "editableParameterFiles" }) public PhaseStatus( OdmsJobPhases name, @@ -40,7 +42,9 @@ public PhaseStatus( String action, java.util.List extract, LogLocationBucketDetails logLocation, - Integer progress) { + Integer progress, + Boolean isSuspendAvailable, + java.util.List editableParameterFiles) { super(); this.name = name; this.status = status; @@ -51,6 +55,8 @@ public PhaseStatus( this.extract = extract; this.logLocation = logLocation; this.progress = progress; + this.isSuspendAvailable = isSuspendAvailable; + this.editableParameterFiles = editableParameterFiles; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -208,6 +214,43 @@ public Builder progress(Integer progress) { this.__explicitlySet__.add("progress"); return this; } + /** + * This is returned as true if the current phase can be suspended. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSuspendAvailable") + private Boolean isSuspendAvailable; + + /** + * This is returned as true if the current phase can be suspended. + * + * @param isSuspendAvailable the value to set + * @return this builder + **/ + public Builder isSuspendAvailable(Boolean isSuspendAvailable) { + this.isSuspendAvailable = isSuspendAvailable; + this.__explicitlySet__.add("isSuspendAvailable"); + return this; + } + /** + * Attribute that returns an array of names and types of GoldenGate configuration files that are available for read or update. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("editableParameterFiles") + private java.util.List editableParameterFiles; + + /** + * Attribute that returns an array of names and types of GoldenGate configuration files that are available for read or update. + * + * @param editableParameterFiles the value to set + * @return this builder + **/ + public Builder editableParameterFiles( + java.util.List editableParameterFiles) { + this.editableParameterFiles = editableParameterFiles; + this.__explicitlySet__.add("editableParameterFiles"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -223,7 +266,9 @@ public PhaseStatus build() { this.action, this.extract, this.logLocation, - this.progress); + this.progress, + this.isSuspendAvailable, + this.editableParameterFiles); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -259,6 +304,12 @@ public Builder copy(PhaseStatus model) { if (model.wasPropertyExplicitlySet("progress")) { this.progress(model.getProgress()); } + if (model.wasPropertyExplicitlySet("isSuspendAvailable")) { + this.isSuspendAvailable(model.getIsSuspendAvailable()); + } + if (model.wasPropertyExplicitlySet("editableParameterFiles")) { + this.editableParameterFiles(model.getEditableParameterFiles()); + } return this; } } @@ -409,6 +460,38 @@ public Integer getProgress() { return progress; } + /** + * This is returned as true if the current phase can be suspended. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isSuspendAvailable") + private final Boolean isSuspendAvailable; + + /** + * This is returned as true if the current phase can be suspended. + * + * @return the value + **/ + public Boolean getIsSuspendAvailable() { + return isSuspendAvailable; + } + + /** + * Attribute that returns an array of names and types of GoldenGate configuration files that are available for read or update. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("editableParameterFiles") + private final java.util.List editableParameterFiles; + + /** + * Attribute that returns an array of names and types of GoldenGate configuration files that are available for read or update. + * + * @return the value + **/ + public java.util.List getEditableParameterFiles() { + return editableParameterFiles; + } + @Override public String toString() { return this.toString(true); @@ -433,6 +516,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", extract=").append(String.valueOf(this.extract)); sb.append(", logLocation=").append(String.valueOf(this.logLocation)); sb.append(", progress=").append(String.valueOf(this.progress)); + sb.append(", isSuspendAvailable=").append(String.valueOf(this.isSuspendAvailable)); + sb.append(", editableParameterFiles=").append(String.valueOf(this.editableParameterFiles)); sb.append(")"); return sb.toString(); } @@ -457,6 +542,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.extract, other.extract) && java.util.Objects.equals(this.logLocation, other.logLocation) && java.util.Objects.equals(this.progress, other.progress) + && java.util.Objects.equals(this.isSuspendAvailable, other.isSuspendAvailable) + && java.util.Objects.equals( + this.editableParameterFiles, other.editableParameterFiles) && super.equals(other); } @@ -477,6 +565,16 @@ public int hashCode() { result = (result * PRIME) + (this.extract == null ? 43 : this.extract.hashCode()); result = (result * PRIME) + (this.logLocation == null ? 43 : this.logLocation.hashCode()); result = (result * PRIME) + (this.progress == null ? 43 : this.progress.hashCode()); + result = + (result * PRIME) + + (this.isSuspendAvailable == null + ? 43 + : this.isSuspendAvailable.hashCode()); + result = + (result * PRIME) + + (this.editableParameterFiles == null + ? 43 + : this.editableParameterFiles.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/UpdateOracleMigrationDetails.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/UpdateOracleMigrationDetails.java index d2d1da06e40..503618d0edf 100644 --- a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/UpdateOracleMigrationDetails.java +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/model/UpdateOracleMigrationDetails.java @@ -136,6 +136,23 @@ public Builder ggsDetails(UpdateOracleGgsDeploymentDetails ggsDetails) { this.__explicitlySet__.add("ggsDetails"); return this; } + /** + * List of Migration Parameter objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("advancedParameters") + private java.util.List advancedParameters; + + /** + * List of Migration Parameter objects. + * @param advancedParameters the value to set + * @return this builder + **/ + public Builder advancedParameters( + java.util.List advancedParameters) { + this.advancedParameters = advancedParameters; + this.__explicitlySet__.add("advancedParameters"); + return this; + } /** * The OCID of the resource being referenced. **/ @@ -172,6 +189,7 @@ public UpdateOracleMigrationDetails build() { this.advisorSettings, this.hubDetails, this.ggsDetails, + this.advancedParameters, this.sourceContainerDatabaseConnectionId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -217,6 +235,9 @@ public Builder copy(UpdateOracleMigrationDetails model) { if (model.wasPropertyExplicitlySet("ggsDetails")) { this.ggsDetails(model.getGgsDetails()); } + if (model.wasPropertyExplicitlySet("advancedParameters")) { + this.advancedParameters(model.getAdvancedParameters()); + } if (model.wasPropertyExplicitlySet("sourceContainerDatabaseConnectionId")) { this.sourceContainerDatabaseConnectionId( model.getSourceContainerDatabaseConnectionId()); @@ -250,6 +271,7 @@ public UpdateOracleMigrationDetails( UpdateOracleAdvisorSettings advisorSettings, UpdateGoldenGateHubDetails hubDetails, UpdateOracleGgsDeploymentDetails ggsDetails, + java.util.List advancedParameters, String sourceContainerDatabaseConnectionId) { super( description, @@ -264,6 +286,7 @@ public UpdateOracleMigrationDetails( this.advisorSettings = advisorSettings; this.hubDetails = hubDetails; this.ggsDetails = ggsDetails; + this.advancedParameters = advancedParameters; this.sourceContainerDatabaseConnectionId = sourceContainerDatabaseConnectionId; } @@ -302,6 +325,20 @@ public UpdateOracleGgsDeploymentDetails getGgsDetails() { return ggsDetails; } + /** + * List of Migration Parameter objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("advancedParameters") + private final java.util.List advancedParameters; + + /** + * List of Migration Parameter objects. + * @return the value + **/ + public java.util.List getAdvancedParameters() { + return advancedParameters; + } + /** * The OCID of the resource being referenced. **/ @@ -336,6 +373,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", advisorSettings=").append(String.valueOf(this.advisorSettings)); sb.append(", hubDetails=").append(String.valueOf(this.hubDetails)); sb.append(", ggsDetails=").append(String.valueOf(this.ggsDetails)); + sb.append(", advancedParameters=").append(String.valueOf(this.advancedParameters)); sb.append(", sourceContainerDatabaseConnectionId=") .append(String.valueOf(this.sourceContainerDatabaseConnectionId)); sb.append(")"); @@ -358,6 +396,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.advisorSettings, other.advisorSettings) && java.util.Objects.equals(this.hubDetails, other.hubDetails) && java.util.Objects.equals(this.ggsDetails, other.ggsDetails) + && java.util.Objects.equals(this.advancedParameters, other.advancedParameters) && java.util.Objects.equals( this.sourceContainerDatabaseConnectionId, other.sourceContainerDatabaseConnectionId) @@ -383,6 +422,11 @@ public int hashCode() { + (this.advisorSettings == null ? 43 : this.advisorSettings.hashCode()); result = (result * PRIME) + (this.hubDetails == null ? 43 : this.hubDetails.hashCode()); result = (result * PRIME) + (this.ggsDetails == null ? 43 : this.ggsDetails.hashCode()); + result = + (result * PRIME) + + (this.advancedParameters == null + ? 43 + : this.advancedParameters.hashCode()); result = (result * PRIME) + (this.sourceContainerDatabaseConnectionId == null diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/CreateParameterFileVersionRequest.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/CreateParameterFileVersionRequest.java new file mode 100644 index 00000000000..55c93dd9fe6 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/CreateParameterFileVersionRequest.java @@ -0,0 +1,386 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.requests; + +import com.oracle.bmc.databasemigration.model.*; +/** + * Example: Click here to see how to use CreateParameterFileVersionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class CreateParameterFileVersionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.databasemigration.model.CreateParameterFileVersionDetails> { + + /** + * The OCID of the job + * + */ + private String jobId; + + /** + * The OCID of the job + * + */ + public String getJobId() { + return jobId; + } + /** + * The parameter file version details to be created + * + */ + private com.oracle.bmc.databasemigration.model.CreateParameterFileVersionDetails + createParameterFileVersionDetails; + + /** + * The parameter file version details to be created + * + */ + public com.oracle.bmc.databasemigration.model.CreateParameterFileVersionDetails + getCreateParameterFileVersionDetails() { + return createParameterFileVersionDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.databasemigration.model.CreateParameterFileVersionDetails getBody$() { + return createParameterFileVersionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateParameterFileVersionRequest, + com.oracle.bmc.databasemigration.model.CreateParameterFileVersionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the job + * + */ + private String jobId = null; + + /** + * The OCID of the job + * + * @param jobId the value to set + * @return this builder instance + */ + public Builder jobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * The parameter file version details to be created + * + */ + private com.oracle.bmc.databasemigration.model.CreateParameterFileVersionDetails + createParameterFileVersionDetails = null; + + /** + * The parameter file version details to be created + * + * @param createParameterFileVersionDetails the value to set + * @return this builder instance + */ + public Builder createParameterFileVersionDetails( + com.oracle.bmc.databasemigration.model.CreateParameterFileVersionDetails + createParameterFileVersionDetails) { + this.createParameterFileVersionDetails = createParameterFileVersionDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateParameterFileVersionRequest o) { + jobId(o.getJobId()); + createParameterFileVersionDetails(o.getCreateParameterFileVersionDetails()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateParameterFileVersionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateParameterFileVersionRequest + */ + public CreateParameterFileVersionRequest build() { + CreateParameterFileVersionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.databasemigration.model.CreateParameterFileVersionDetails body) { + createParameterFileVersionDetails(body); + return this; + } + + /** + * Build the instance of CreateParameterFileVersionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateParameterFileVersionRequest + */ + public CreateParameterFileVersionRequest buildWithoutInvocationCallback() { + CreateParameterFileVersionRequest request = new CreateParameterFileVersionRequest(); + request.jobId = jobId; + request.createParameterFileVersionDetails = createParameterFileVersionDetails; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateParameterFileVersionRequest(jobId, createParameterFileVersionDetails, ifMatch, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .jobId(jobId) + .createParameterFileVersionDetails(createParameterFileVersionDetails) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",jobId=").append(String.valueOf(this.jobId)); + sb.append(",createParameterFileVersionDetails=") + .append(String.valueOf(this.createParameterFileVersionDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateParameterFileVersionRequest)) { + return false; + } + + CreateParameterFileVersionRequest other = (CreateParameterFileVersionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.jobId, other.jobId) + && java.util.Objects.equals( + this.createParameterFileVersionDetails, + other.createParameterFileVersionDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.jobId == null ? 43 : this.jobId.hashCode()); + result = + (result * PRIME) + + (this.createParameterFileVersionDetails == null + ? 43 + : this.createParameterFileVersionDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/DeleteParameterFileVersionRequest.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/DeleteParameterFileVersionRequest.java new file mode 100644 index 00000000000..39efbc72a2b --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/DeleteParameterFileVersionRequest.java @@ -0,0 +1,298 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.requests; + +import com.oracle.bmc.databasemigration.model.*; +/** + * Example: Click here to see how to use DeleteParameterFileVersionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class DeleteParameterFileVersionRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the job + * + */ + private String jobId; + + /** + * The OCID of the job + * + */ + public String getJobId() { + return jobId; + } + /** + * A unique name associated with the current migration/job and extract/replicat name + * + */ + private String parameterFileName; + + /** + * A unique name associated with the current migration/job and extract/replicat name + * + */ + public String getParameterFileName() { + return parameterFileName; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteParameterFileVersionRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the job + * + */ + private String jobId = null; + + /** + * The OCID of the job + * + * @param jobId the value to set + * @return this builder instance + */ + public Builder jobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * A unique name associated with the current migration/job and extract/replicat name + * + */ + private String parameterFileName = null; + + /** + * A unique name associated with the current migration/job and extract/replicat name + * + * @param parameterFileName the value to set + * @return this builder instance + */ + public Builder parameterFileName(String parameterFileName) { + this.parameterFileName = parameterFileName; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteParameterFileVersionRequest o) { + jobId(o.getJobId()); + parameterFileName(o.getParameterFileName()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteParameterFileVersionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteParameterFileVersionRequest + */ + public DeleteParameterFileVersionRequest build() { + DeleteParameterFileVersionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteParameterFileVersionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteParameterFileVersionRequest + */ + public DeleteParameterFileVersionRequest buildWithoutInvocationCallback() { + DeleteParameterFileVersionRequest request = new DeleteParameterFileVersionRequest(); + request.jobId = jobId; + request.parameterFileName = parameterFileName; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new DeleteParameterFileVersionRequest(jobId, parameterFileName, opcRequestId, ifMatch); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .jobId(jobId) + .parameterFileName(parameterFileName) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",jobId=").append(String.valueOf(this.jobId)); + sb.append(",parameterFileName=").append(String.valueOf(this.parameterFileName)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteParameterFileVersionRequest)) { + return false; + } + + DeleteParameterFileVersionRequest other = (DeleteParameterFileVersionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.jobId, other.jobId) + && java.util.Objects.equals(this.parameterFileName, other.parameterFileName) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.jobId == null ? 43 : this.jobId.hashCode()); + result = + (result * PRIME) + + (this.parameterFileName == null ? 43 : this.parameterFileName.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/GetParameterFileVersionRequest.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/GetParameterFileVersionRequest.java new file mode 100644 index 00000000000..2f877763ccb --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/GetParameterFileVersionRequest.java @@ -0,0 +1,246 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.requests; + +import com.oracle.bmc.databasemigration.model.*; +/** + * Example: Click here to see how to use GetParameterFileVersionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class GetParameterFileVersionRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * A unique name associated with the current migration/job and extract/replicat name + * + */ + private String parameterFileName; + + /** + * A unique name associated with the current migration/job and extract/replicat name + * + */ + public String getParameterFileName() { + return parameterFileName; + } + /** + * The OCID of the job + * + */ + private String jobId; + + /** + * The OCID of the job + * + */ + public String getJobId() { + return jobId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetParameterFileVersionRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * A unique name associated with the current migration/job and extract/replicat name + * + */ + private String parameterFileName = null; + + /** + * A unique name associated with the current migration/job and extract/replicat name + * + * @param parameterFileName the value to set + * @return this builder instance + */ + public Builder parameterFileName(String parameterFileName) { + this.parameterFileName = parameterFileName; + return this; + } + + /** + * The OCID of the job + * + */ + private String jobId = null; + + /** + * The OCID of the job + * + * @param jobId the value to set + * @return this builder instance + */ + public Builder jobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetParameterFileVersionRequest o) { + parameterFileName(o.getParameterFileName()); + jobId(o.getJobId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetParameterFileVersionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetParameterFileVersionRequest + */ + public GetParameterFileVersionRequest build() { + GetParameterFileVersionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetParameterFileVersionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetParameterFileVersionRequest + */ + public GetParameterFileVersionRequest buildWithoutInvocationCallback() { + GetParameterFileVersionRequest request = new GetParameterFileVersionRequest(); + request.parameterFileName = parameterFileName; + request.jobId = jobId; + request.opcRequestId = opcRequestId; + return request; + // new GetParameterFileVersionRequest(parameterFileName, jobId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .parameterFileName(parameterFileName) + .jobId(jobId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",parameterFileName=").append(String.valueOf(this.parameterFileName)); + sb.append(",jobId=").append(String.valueOf(this.jobId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetParameterFileVersionRequest)) { + return false; + } + + GetParameterFileVersionRequest other = (GetParameterFileVersionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.parameterFileName, other.parameterFileName) + && java.util.Objects.equals(this.jobId, other.jobId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.parameterFileName == null ? 43 : this.parameterFileName.hashCode()); + result = (result * PRIME) + (this.jobId == null ? 43 : this.jobId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/ListMigrationParametersRequest.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/ListMigrationParametersRequest.java new file mode 100644 index 00000000000..36f211f0477 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/ListMigrationParametersRequest.java @@ -0,0 +1,439 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.requests; + +import com.oracle.bmc.databasemigration.model.*; +/** + * Example: Click here to see how to use ListMigrationParametersRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class ListMigrationParametersRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A filter to return only resources that match a certain Migration Type. + * + */ + private com.oracle.bmc.databasemigration.model.MigrationTypes migrationType; + + /** + * A filter to return only resources that match a certain Migration Type. + * + */ + public com.oracle.bmc.databasemigration.model.MigrationTypes getMigrationType() { + return migrationType; + } + /** + * A filter to return only resources that match a certain Database Combination. + * + */ + private com.oracle.bmc.databasemigration.model.DatabaseCombination databaseCombination; + + /** + * A filter to return only resources that match a certain Database Combination. + * + */ + public com.oracle.bmc.databasemigration.model.DatabaseCombination getDatabaseCombination() { + return databaseCombination; + } + /** + * The maximum number of items to return. + * + */ + private Integer limit; + + /** + * The maximum number of items to return. + * + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * + */ + public String getPage() { + return page; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. + * Default order for displayName is ascending. If no value is specified timeCreated is default. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. + * Default order for displayName is ascending. If no value is specified timeCreated is default. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. + * Default order for displayName is ascending. If no value is specified timeCreated is default. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either 'asc' or 'desc'. + * + */ + private com.oracle.bmc.databasemigration.model.SortOrders sortOrder; + + /** + * The sort order to use, either 'asc' or 'desc'. + * + */ + public com.oracle.bmc.databasemigration.model.SortOrders getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListMigrationParametersRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A filter to return only resources that match a certain Migration Type. + * + */ + private com.oracle.bmc.databasemigration.model.MigrationTypes migrationType = null; + + /** + * A filter to return only resources that match a certain Migration Type. + * + * @param migrationType the value to set + * @return this builder instance + */ + public Builder migrationType( + com.oracle.bmc.databasemigration.model.MigrationTypes migrationType) { + this.migrationType = migrationType; + return this; + } + + /** + * A filter to return only resources that match a certain Database Combination. + * + */ + private com.oracle.bmc.databasemigration.model.DatabaseCombination databaseCombination = + null; + + /** + * A filter to return only resources that match a certain Database Combination. + * + * @param databaseCombination the value to set + * @return this builder instance + */ + public Builder databaseCombination( + com.oracle.bmc.databasemigration.model.DatabaseCombination databaseCombination) { + this.databaseCombination = databaseCombination; + return this; + } + + /** + * The maximum number of items to return. + * + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. + * Default order for displayName is ascending. If no value is specified timeCreated is default. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. + * Default order for displayName is ascending. If no value is specified timeCreated is default. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either 'asc' or 'desc'. + * + */ + private com.oracle.bmc.databasemigration.model.SortOrders sortOrder = null; + + /** + * The sort order to use, either 'asc' or 'desc'. + * + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.databasemigration.model.SortOrders sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListMigrationParametersRequest o) { + opcRequestId(o.getOpcRequestId()); + migrationType(o.getMigrationType()); + databaseCombination(o.getDatabaseCombination()); + limit(o.getLimit()); + page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListMigrationParametersRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListMigrationParametersRequest + */ + public ListMigrationParametersRequest build() { + ListMigrationParametersRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListMigrationParametersRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListMigrationParametersRequest + */ + public ListMigrationParametersRequest buildWithoutInvocationCallback() { + ListMigrationParametersRequest request = new ListMigrationParametersRequest(); + request.opcRequestId = opcRequestId; + request.migrationType = migrationType; + request.databaseCombination = databaseCombination; + request.limit = limit; + request.page = page; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListMigrationParametersRequest(opcRequestId, migrationType, databaseCombination, limit, page, sortBy, sortOrder); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .opcRequestId(opcRequestId) + .migrationType(migrationType) + .databaseCombination(databaseCombination) + .limit(limit) + .page(page) + .sortBy(sortBy) + .sortOrder(sortOrder); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",migrationType=").append(String.valueOf(this.migrationType)); + sb.append(",databaseCombination=").append(String.valueOf(this.databaseCombination)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListMigrationParametersRequest)) { + return false; + } + + ListMigrationParametersRequest other = (ListMigrationParametersRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.migrationType, other.migrationType) + && java.util.Objects.equals(this.databaseCombination, other.databaseCombination) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.migrationType == null ? 43 : this.migrationType.hashCode()); + result = + (result * PRIME) + + (this.databaseCombination == null + ? 43 + : this.databaseCombination.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/ListParameterFileVersionsRequest.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/ListParameterFileVersionsRequest.java new file mode 100644 index 00000000000..bb2a00771b4 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/ListParameterFileVersionsRequest.java @@ -0,0 +1,430 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.requests; + +import com.oracle.bmc.databasemigration.model.*; +/** + * Example: Click here to see how to use ListParameterFileVersionsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class ListParameterFileVersionsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the job + * + */ + private String jobId; + + /** + * The OCID of the job + * + */ + public String getJobId() { + return jobId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A filter to return only resources that match the entire name given. + * + */ + private String name; + + /** + * A filter to return only resources that match the entire name given. + * + */ + public String getName() { + return name; + } + /** + * The maximum number of items to return. + * + */ + private Integer limit; + + /** + * The maximum number of items to return. + * + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * + */ + public String getPage() { + return page; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. + * Default order for displayName is ascending. If no value is specified timeCreated is default. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. + * Default order for displayName is ascending. If no value is specified timeCreated is default. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. + * Default order for displayName is ascending. If no value is specified timeCreated is default. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either 'asc' or 'desc'. + * + */ + private com.oracle.bmc.databasemigration.model.SortOrders sortOrder; + + /** + * The sort order to use, either 'asc' or 'desc'. + * + */ + public com.oracle.bmc.databasemigration.model.SortOrders getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListParameterFileVersionsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the job + * + */ + private String jobId = null; + + /** + * The OCID of the job + * + * @param jobId the value to set + * @return this builder instance + */ + public Builder jobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A filter to return only resources that match the entire name given. + * + */ + private String name = null; + + /** + * A filter to return only resources that match the entire name given. + * + * @param name the value to set + * @return this builder instance + */ + public Builder name(String name) { + this.name = name; + return this; + } + + /** + * The maximum number of items to return. + * + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. + * Default order for displayName is ascending. If no value is specified timeCreated is default. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. + * Default order for displayName is ascending. If no value is specified timeCreated is default. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either 'asc' or 'desc'. + * + */ + private com.oracle.bmc.databasemigration.model.SortOrders sortOrder = null; + + /** + * The sort order to use, either 'asc' or 'desc'. + * + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.databasemigration.model.SortOrders sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListParameterFileVersionsRequest o) { + jobId(o.getJobId()); + opcRequestId(o.getOpcRequestId()); + name(o.getName()); + limit(o.getLimit()); + page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListParameterFileVersionsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListParameterFileVersionsRequest + */ + public ListParameterFileVersionsRequest build() { + ListParameterFileVersionsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListParameterFileVersionsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListParameterFileVersionsRequest + */ + public ListParameterFileVersionsRequest buildWithoutInvocationCallback() { + ListParameterFileVersionsRequest request = new ListParameterFileVersionsRequest(); + request.jobId = jobId; + request.opcRequestId = opcRequestId; + request.name = name; + request.limit = limit; + request.page = page; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListParameterFileVersionsRequest(jobId, opcRequestId, name, limit, page, sortBy, sortOrder); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .jobId(jobId) + .opcRequestId(opcRequestId) + .name(name) + .limit(limit) + .page(page) + .sortBy(sortBy) + .sortOrder(sortOrder); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",jobId=").append(String.valueOf(this.jobId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",name=").append(String.valueOf(this.name)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListParameterFileVersionsRequest)) { + return false; + } + + ListParameterFileVersionsRequest other = (ListParameterFileVersionsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.jobId, other.jobId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.jobId == null ? 43 : this.jobId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/MakeCurrentParameterFileVersionRequest.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/MakeCurrentParameterFileVersionRequest.java new file mode 100644 index 00000000000..28445915f77 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/MakeCurrentParameterFileVersionRequest.java @@ -0,0 +1,353 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.requests; + +import com.oracle.bmc.databasemigration.model.*; +/** + * Example: Click here to see how to use MakeCurrentParameterFileVersionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class MakeCurrentParameterFileVersionRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the job + * + */ + private String jobId; + + /** + * The OCID of the job + * + */ + public String getJobId() { + return jobId; + } + /** + * A unique name associated with the current migration/job and extract/replicat name + * + */ + private String parameterFileName; + + /** + * A unique name associated with the current migration/job and extract/replicat name + * + */ + public String getParameterFileName() { + return parameterFileName; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + MakeCurrentParameterFileVersionRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the job + * + */ + private String jobId = null; + + /** + * The OCID of the job + * + * @param jobId the value to set + * @return this builder instance + */ + public Builder jobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * A unique name associated with the current migration/job and extract/replicat name + * + */ + private String parameterFileName = null; + + /** + * A unique name associated with the current migration/job and extract/replicat name + * + * @param parameterFileName the value to set + * @return this builder instance + */ + public Builder parameterFileName(String parameterFileName) { + this.parameterFileName = parameterFileName; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(MakeCurrentParameterFileVersionRequest o) { + jobId(o.getJobId()); + parameterFileName(o.getParameterFileName()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of MakeCurrentParameterFileVersionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of MakeCurrentParameterFileVersionRequest + */ + public MakeCurrentParameterFileVersionRequest build() { + MakeCurrentParameterFileVersionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of MakeCurrentParameterFileVersionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of MakeCurrentParameterFileVersionRequest + */ + public MakeCurrentParameterFileVersionRequest buildWithoutInvocationCallback() { + MakeCurrentParameterFileVersionRequest request = + new MakeCurrentParameterFileVersionRequest(); + request.jobId = jobId; + request.parameterFileName = parameterFileName; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new MakeCurrentParameterFileVersionRequest(jobId, parameterFileName, ifMatch, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .jobId(jobId) + .parameterFileName(parameterFileName) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",jobId=").append(String.valueOf(this.jobId)); + sb.append(",parameterFileName=").append(String.valueOf(this.parameterFileName)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MakeCurrentParameterFileVersionRequest)) { + return false; + } + + MakeCurrentParameterFileVersionRequest other = (MakeCurrentParameterFileVersionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.jobId, other.jobId) + && java.util.Objects.equals(this.parameterFileName, other.parameterFileName) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.jobId == null ? 43 : this.jobId.hashCode()); + result = + (result * PRIME) + + (this.parameterFileName == null ? 43 : this.parameterFileName.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/SuspendJobRequest.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/SuspendJobRequest.java new file mode 100644 index 00000000000..fca7d4b0730 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/requests/SuspendJobRequest.java @@ -0,0 +1,313 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.requests; + +import com.oracle.bmc.databasemigration.model.*; +/** + * Example: Click here to see how to use SuspendJobRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class SuspendJobRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the job + * + */ + private String jobId; + + /** + * The OCID of the job + * + */ + public String getJobId() { + return jobId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + SuspendJobRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the job + * + */ + private String jobId = null; + + /** + * The OCID of the job + * + * @param jobId the value to set + * @return this builder instance + */ + public Builder jobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SuspendJobRequest o) { + jobId(o.getJobId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of SuspendJobRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of SuspendJobRequest + */ + public SuspendJobRequest build() { + SuspendJobRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of SuspendJobRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of SuspendJobRequest + */ + public SuspendJobRequest buildWithoutInvocationCallback() { + SuspendJobRequest request = new SuspendJobRequest(); + request.jobId = jobId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new SuspendJobRequest(jobId, ifMatch, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .jobId(jobId) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",jobId=").append(String.valueOf(this.jobId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SuspendJobRequest)) { + return false; + } + + SuspendJobRequest other = (SuspendJobRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.jobId, other.jobId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.jobId == null ? 43 : this.jobId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/CreateParameterFileVersionResponse.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/CreateParameterFileVersionResponse.java new file mode 100644 index 00000000000..2b564983baa --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/CreateParameterFileVersionResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.responses; + +import com.oracle.bmc.databasemigration.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class CreateParameterFileVersionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private CreateParameterFileVersionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateParameterFileVersionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateParameterFileVersionResponse build() { + return new CreateParameterFileVersionResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateParameterFileVersionResponse)) { + return false; + } + + CreateParameterFileVersionResponse other = (CreateParameterFileVersionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/DeleteParameterFileVersionResponse.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/DeleteParameterFileVersionResponse.java new file mode 100644 index 00000000000..6f115233b0b --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/DeleteParameterFileVersionResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.responses; + +import com.oracle.bmc.databasemigration.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class DeleteParameterFileVersionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private DeleteParameterFileVersionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteParameterFileVersionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteParameterFileVersionResponse build() { + return new DeleteParameterFileVersionResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteParameterFileVersionResponse)) { + return false; + } + + DeleteParameterFileVersionResponse other = (DeleteParameterFileVersionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/GetParameterFileVersionResponse.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/GetParameterFileVersionResponse.java new file mode 100644 index 00000000000..21c1407bc91 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/GetParameterFileVersionResponse.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.responses; + +import com.oracle.bmc.databasemigration.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class GetParameterFileVersionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned ParameterFileVersion instance. + */ + private com.oracle.bmc.databasemigration.model.ParameterFileVersion parameterFileVersion; + + /** + * The returned ParameterFileVersion instance. + * @return the value + */ + public com.oracle.bmc.databasemigration.model.ParameterFileVersion getParameterFileVersion() { + return parameterFileVersion; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "parameterFileVersion" + }) + private GetParameterFileVersionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.databasemigration.model.ParameterFileVersion parameterFileVersion) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.parameterFileVersion = parameterFileVersion; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned ParameterFileVersion instance. + */ + private com.oracle.bmc.databasemigration.model.ParameterFileVersion parameterFileVersion; + + /** + * The returned ParameterFileVersion instance. + * @param parameterFileVersion the value to set + * @return this builder + */ + public Builder parameterFileVersion( + com.oracle.bmc.databasemigration.model.ParameterFileVersion parameterFileVersion) { + this.parameterFileVersion = parameterFileVersion; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetParameterFileVersionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + parameterFileVersion(o.getParameterFileVersion()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetParameterFileVersionResponse build() { + return new GetParameterFileVersionResponse( + __httpStatusCode__, headers, opcRequestId, etag, parameterFileVersion); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",parameterFileVersion=").append(String.valueOf(parameterFileVersion)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetParameterFileVersionResponse)) { + return false; + } + + GetParameterFileVersionResponse other = (GetParameterFileVersionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.parameterFileVersion, other.parameterFileVersion); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.parameterFileVersion == null + ? 43 + : this.parameterFileVersion.hashCode()); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/ListMigrationParametersResponse.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/ListMigrationParametersResponse.java new file mode 100644 index 00000000000..e8ad852b87f --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/ListMigrationParametersResponse.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.responses; + +import com.oracle.bmc.databasemigration.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class ListMigrationParametersResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned MigrationParameterSummaryCollection instance. + */ + private com.oracle.bmc.databasemigration.model.MigrationParameterSummaryCollection + migrationParameterSummaryCollection; + + /** + * The returned MigrationParameterSummaryCollection instance. + * @return the value + */ + public com.oracle.bmc.databasemigration.model.MigrationParameterSummaryCollection + getMigrationParameterSummaryCollection() { + return migrationParameterSummaryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "migrationParameterSummaryCollection" + }) + private ListMigrationParametersResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.databasemigration.model.MigrationParameterSummaryCollection + migrationParameterSummaryCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.migrationParameterSummaryCollection = migrationParameterSummaryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned MigrationParameterSummaryCollection instance. + */ + private com.oracle.bmc.databasemigration.model.MigrationParameterSummaryCollection + migrationParameterSummaryCollection; + + /** + * The returned MigrationParameterSummaryCollection instance. + * @param migrationParameterSummaryCollection the value to set + * @return this builder + */ + public Builder migrationParameterSummaryCollection( + com.oracle.bmc.databasemigration.model.MigrationParameterSummaryCollection + migrationParameterSummaryCollection) { + this.migrationParameterSummaryCollection = migrationParameterSummaryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListMigrationParametersResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + migrationParameterSummaryCollection(o.getMigrationParameterSummaryCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListMigrationParametersResponse build() { + return new ListMigrationParametersResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + migrationParameterSummaryCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",migrationParameterSummaryCollection=") + .append(String.valueOf(migrationParameterSummaryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListMigrationParametersResponse)) { + return false; + } + + ListMigrationParametersResponse other = (ListMigrationParametersResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.migrationParameterSummaryCollection, + other.migrationParameterSummaryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.migrationParameterSummaryCollection == null + ? 43 + : this.migrationParameterSummaryCollection.hashCode()); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/ListParameterFileVersionsResponse.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/ListParameterFileVersionsResponse.java new file mode 100644 index 00000000000..00d91f1a9b1 --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/ListParameterFileVersionsResponse.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.responses; + +import com.oracle.bmc.databasemigration.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class ListParameterFileVersionsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned ParameterFileVersionCollection instance. + */ + private com.oracle.bmc.databasemigration.model.ParameterFileVersionCollection + parameterFileVersionCollection; + + /** + * The returned ParameterFileVersionCollection instance. + * @return the value + */ + public com.oracle.bmc.databasemigration.model.ParameterFileVersionCollection + getParameterFileVersionCollection() { + return parameterFileVersionCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "parameterFileVersionCollection" + }) + private ListParameterFileVersionsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.databasemigration.model.ParameterFileVersionCollection + parameterFileVersionCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.parameterFileVersionCollection = parameterFileVersionCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned ParameterFileVersionCollection instance. + */ + private com.oracle.bmc.databasemigration.model.ParameterFileVersionCollection + parameterFileVersionCollection; + + /** + * The returned ParameterFileVersionCollection instance. + * @param parameterFileVersionCollection the value to set + * @return this builder + */ + public Builder parameterFileVersionCollection( + com.oracle.bmc.databasemigration.model.ParameterFileVersionCollection + parameterFileVersionCollection) { + this.parameterFileVersionCollection = parameterFileVersionCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListParameterFileVersionsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + parameterFileVersionCollection(o.getParameterFileVersionCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListParameterFileVersionsResponse build() { + return new ListParameterFileVersionsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + parameterFileVersionCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",parameterFileVersionCollection=") + .append(String.valueOf(parameterFileVersionCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListParameterFileVersionsResponse)) { + return false; + } + + ListParameterFileVersionsResponse other = (ListParameterFileVersionsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.parameterFileVersionCollection, other.parameterFileVersionCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.parameterFileVersionCollection == null + ? 43 + : this.parameterFileVersionCollection.hashCode()); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/MakeCurrentParameterFileVersionResponse.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/MakeCurrentParameterFileVersionResponse.java new file mode 100644 index 00000000000..f40fd20bcdd --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/MakeCurrentParameterFileVersionResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.responses; + +import com.oracle.bmc.databasemigration.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class MakeCurrentParameterFileVersionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned Job instance. + */ + private com.oracle.bmc.databasemigration.model.Job job; + + /** + * The returned Job instance. + * @return the value + */ + public com.oracle.bmc.databasemigration.model.Job getJob() { + return job; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "job" + }) + private MakeCurrentParameterFileVersionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.databasemigration.model.Job job) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.job = job; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned Job instance. + */ + private com.oracle.bmc.databasemigration.model.Job job; + + /** + * The returned Job instance. + * @param job the value to set + * @return this builder + */ + public Builder job(com.oracle.bmc.databasemigration.model.Job job) { + this.job = job; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(MakeCurrentParameterFileVersionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + job(o.getJob()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public MakeCurrentParameterFileVersionResponse build() { + return new MakeCurrentParameterFileVersionResponse( + __httpStatusCode__, headers, opcRequestId, etag, job); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",job=").append(String.valueOf(job)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MakeCurrentParameterFileVersionResponse)) { + return false; + } + + MakeCurrentParameterFileVersionResponse other = (MakeCurrentParameterFileVersionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.job, other.job); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.job == null ? 43 : this.job.hashCode()); + return result; + } +} diff --git a/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/SuspendJobResponse.java b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/SuspendJobResponse.java new file mode 100644 index 00000000000..1b0b19f50bd --- /dev/null +++ b/bmc-databasemigration/src/main/java/com/oracle/bmc/databasemigration/responses/SuspendJobResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.databasemigration.responses; + +import com.oracle.bmc.databasemigration.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230518") +public class SuspendJobResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned Job instance. + */ + private com.oracle.bmc.databasemigration.model.Job job; + + /** + * The returned Job instance. + * @return the value + */ + public com.oracle.bmc.databasemigration.model.Job getJob() { + return job; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "job" + }) + private SuspendJobResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.databasemigration.model.Job job) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.job = job; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned Job instance. + */ + private com.oracle.bmc.databasemigration.model.Job job; + + /** + * The returned Job instance. + * @param job the value to set + * @return this builder + */ + public Builder job(com.oracle.bmc.databasemigration.model.Job job) { + this.job = job; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SuspendJobResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + job(o.getJob()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public SuspendJobResponse build() { + return new SuspendJobResponse(__httpStatusCode__, headers, opcRequestId, etag, job); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",job=").append(String.valueOf(job)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SuspendJobResponse)) { + return false; + } + + SuspendJobResponse other = (SuspendJobResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.job, other.job); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.job == null ? 43 : this.job.hashCode()); + return result; + } +} diff --git a/bmc-databasetools/pom.xml b/bmc-databasetools/pom.xml index 62819956568..a232b3569c5 100644 --- a/bmc-databasetools/pom.xml +++ b/bmc-databasetools/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-databasetools @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-datacatalog/pom.xml b/bmc-datacatalog/pom.xml index bef0e283b93..773cb31d54c 100644 --- a/bmc-datacatalog/pom.xml +++ b/bmc-datacatalog/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-datacatalog @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-dataflow/pom.xml b/bmc-dataflow/pom.xml index 7f90acfcf72..d5e47806313 100644 --- a/bmc-dataflow/pom.xml +++ b/bmc-dataflow/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-dataflow @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/DataFlow.java b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/DataFlow.java index 1d90e824f0c..ad760dc238b 100644 --- a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/DataFlow.java +++ b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/DataFlow.java @@ -60,6 +60,20 @@ public interface DataFlow extends AutoCloseable { */ void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + /** + * Deletes an application using an `applicationId` and terminates related runs. This operation will timeout in approximate 30 minutes if any related Runs are not terminated successfully. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CascadingDeleteApplication API. + */ + CascadingDeleteApplicationResponse cascadingDeleteApplication( + CascadingDeleteApplicationRequest request); + /** * Moves an application into a different compartment. When provided, If-Match is checked against ETag values of the resource. * Associated resources, like runs, will not be automatically moved. @@ -537,6 +551,18 @@ ChangeSqlEndpointCompartmentResponse changeSqlEndpointCompartment( */ StartPoolResponse startPool(StartPoolRequest request); + /** + * Starts the SqlEndpoint for a given `SqlEndpointId`. When provided, If-Match is checked against ETag values of the resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use StartSqlEndpoint API. + */ + StartSqlEndpointResponse startSqlEndpoint(StartSqlEndpointRequest request); + /** * Stops the dataflow pool for a given `poolId`. When provided, If-Match is checked against ETag values of the resource. * @@ -550,6 +576,18 @@ ChangeSqlEndpointCompartmentResponse changeSqlEndpointCompartment( */ StopPoolResponse stopPool(StopPoolRequest request); + /** + * Stops the SqlEndpoint for a given `SqlEndpointId`. When provided, If-Match is checked against ETag values of the resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use StopSqlEndpoint API. + */ + StopSqlEndpointResponse stopSqlEndpoint(StopSqlEndpointRequest request); + /** * Updates an application using an `applicationId`. * diff --git a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/DataFlowAsync.java b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/DataFlowAsync.java index 7df3e7396e1..1f17ac9d3ca 100644 --- a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/DataFlowAsync.java +++ b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/DataFlowAsync.java @@ -59,6 +59,23 @@ public interface DataFlowAsync extends AutoCloseable { */ void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + /** + * Deletes an application using an `applicationId` and terminates related runs. This operation will timeout in approximate 30 minutes if any related Runs are not terminated successfully. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future cascadingDeleteApplication( + CascadingDeleteApplicationRequest request, + com.oracle.bmc.responses.AsyncHandler< + CascadingDeleteApplicationRequest, CascadingDeleteApplicationResponse> + handler); + /** * Moves an application into a different compartment. When provided, If-Match is checked against ETag values of the resource. * Associated resources, like runs, will not be automatically moved. @@ -649,6 +666,21 @@ java.util.concurrent.Future startPool( StartPoolRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Starts the SqlEndpoint for a given `SqlEndpointId`. When provided, If-Match is checked against ETag values of the resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future startSqlEndpoint( + StartSqlEndpointRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Stops the dataflow pool for a given `poolId`. When provided, If-Match is checked against ETag values of the resource. * @@ -664,6 +696,21 @@ java.util.concurrent.Future stopPool( StopPoolRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Stops the SqlEndpoint for a given `SqlEndpointId`. When provided, If-Match is checked against ETag values of the resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future stopSqlEndpoint( + StopSqlEndpointRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Updates an application using an `applicationId`. * diff --git a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/DataFlowAsyncClient.java b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/DataFlowAsyncClient.java index 4e4d90ce7ab..872029847ef 100644 --- a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/DataFlowAsyncClient.java +++ b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/DataFlowAsyncClient.java @@ -462,6 +462,57 @@ public void close() { client.close(); } + @Override + public java.util.concurrent.Future + cascadingDeleteApplication( + CascadingDeleteApplicationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CascadingDeleteApplicationRequest, + CascadingDeleteApplicationResponse> + handler) { + LOG.trace("Called async cascadingDeleteApplication"); + final CascadingDeleteApplicationRequest interceptedRequest = + CascadingDeleteApplicationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CascadingDeleteApplicationConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataFlow", + "CascadingDeleteApplication", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-flow/20200129/Application/CascadingDeleteApplication"); + final java.util.function.Function< + javax.ws.rs.core.Response, CascadingDeleteApplicationResponse> + transformer = + CascadingDeleteApplicationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CascadingDeleteApplicationRequest, CascadingDeleteApplicationResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CascadingDeleteApplicationRequest, + CascadingDeleteApplicationResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CascadingDeleteApplicationRequest, CascadingDeleteApplicationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future changeApplicationCompartment( @@ -2146,6 +2197,53 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future startSqlEndpoint( + StartSqlEndpointRequest request, + final com.oracle.bmc.responses.AsyncHandler< + StartSqlEndpointRequest, StartSqlEndpointResponse> + handler) { + LOG.trace("Called async startSqlEndpoint"); + final StartSqlEndpointRequest interceptedRequest = + StartSqlEndpointConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StartSqlEndpointConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataFlow", + "StartSqlEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-flow/20200129/SqlEndpoint/StartSqlEndpoint"); + final java.util.function.Function + transformer = + StartSqlEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + StartSqlEndpointRequest, StartSqlEndpointResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + StartSqlEndpointRequest, StartSqlEndpointResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future stopPool( StopPoolRequest request, @@ -2188,6 +2286,53 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future stopSqlEndpoint( + StopSqlEndpointRequest request, + final com.oracle.bmc.responses.AsyncHandler< + StopSqlEndpointRequest, StopSqlEndpointResponse> + handler) { + LOG.trace("Called async stopSqlEndpoint"); + final StopSqlEndpointRequest interceptedRequest = + StopSqlEndpointConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StopSqlEndpointConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataFlow", + "StopSqlEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-flow/20200129/SqlEndpoint/StopSqlEndpoint"); + final java.util.function.Function + transformer = + StopSqlEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + StopSqlEndpointRequest, StopSqlEndpointResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + StopSqlEndpointRequest, StopSqlEndpointResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateApplication( UpdateApplicationRequest request, diff --git a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/DataFlowClient.java b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/DataFlowClient.java index 8a828258da0..6431467deaa 100644 --- a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/DataFlowClient.java +++ b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/DataFlowClient.java @@ -552,6 +552,45 @@ public void close() { client.close(); } + @Override + public CascadingDeleteApplicationResponse cascadingDeleteApplication( + CascadingDeleteApplicationRequest request) { + LOG.trace("Called cascadingDeleteApplication"); + final CascadingDeleteApplicationRequest interceptedRequest = + CascadingDeleteApplicationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CascadingDeleteApplicationConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataFlow", + "CascadingDeleteApplication", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-flow/20200129/Application/CascadingDeleteApplication"); + java.util.function.Function + transformer = + CascadingDeleteApplicationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeApplicationCompartmentResponse changeApplicationCompartment( ChangeApplicationCompartmentRequest request) { @@ -1905,6 +1944,45 @@ public StartPoolResponse startPool(StartPoolRequest request) { }); } + @Override + public StartSqlEndpointResponse startSqlEndpoint(StartSqlEndpointRequest request) { + LOG.trace("Called startSqlEndpoint"); + final StartSqlEndpointRequest interceptedRequest = + StartSqlEndpointConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StartSqlEndpointConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataFlow", + "StartSqlEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-flow/20200129/SqlEndpoint/StartSqlEndpoint"); + java.util.function.Function + transformer = + StartSqlEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public StopPoolResponse stopPool(StopPoolRequest request) { LOG.trace("Called stopPool"); @@ -1941,6 +2019,45 @@ public StopPoolResponse stopPool(StopPoolRequest request) { }); } + @Override + public StopSqlEndpointResponse stopSqlEndpoint(StopSqlEndpointRequest request) { + LOG.trace("Called stopSqlEndpoint"); + final StopSqlEndpointRequest interceptedRequest = + StopSqlEndpointConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StopSqlEndpointConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataFlow", + "StopSqlEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-flow/20200129/SqlEndpoint/StopSqlEndpoint"); + java.util.function.Function + transformer = + StopSqlEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateApplicationResponse updateApplication(UpdateApplicationRequest request) { LOG.trace("Called updateApplication"); diff --git a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/internal/http/CascadingDeleteApplicationConverter.java b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/internal/http/CascadingDeleteApplicationConverter.java new file mode 100644 index 00000000000..64f14fb17de --- /dev/null +++ b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/internal/http/CascadingDeleteApplicationConverter.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dataflow.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.dataflow.model.*; +import com.oracle.bmc.dataflow.requests.*; +import com.oracle.bmc.dataflow.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200129") +public class CascadingDeleteApplicationConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CascadingDeleteApplicationConverter.class); + + public static com.oracle.bmc.dataflow.requests.CascadingDeleteApplicationRequest + interceptRequest( + com.oracle.bmc.dataflow.requests.CascadingDeleteApplicationRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.dataflow.requests.CascadingDeleteApplicationRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getApplicationId(), "applicationId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20200129") + .path("applications") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getApplicationId())) + .path("actions") + .path("cascadingDeleteApplication"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.dataflow.responses.CascadingDeleteApplicationResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.dataflow.responses.CascadingDeleteApplicationResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.dataflow.responses.CascadingDeleteApplicationResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.dataflow.responses + .CascadingDeleteApplicationResponse>() { + @Override + public com.oracle.bmc.dataflow.responses + .CascadingDeleteApplicationResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.dataflow.responses.CascadingDeleteApplicationResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.dataflow.responses.CascadingDeleteApplicationResponse + .Builder + builder = + com.oracle.bmc.dataflow.responses + .CascadingDeleteApplicationResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.dataflow.responses.CascadingDeleteApplicationResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/internal/http/StartSqlEndpointConverter.java b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/internal/http/StartSqlEndpointConverter.java new file mode 100644 index 00000000000..d6aff29ee40 --- /dev/null +++ b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/internal/http/StartSqlEndpointConverter.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dataflow.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.dataflow.model.*; +import com.oracle.bmc.dataflow.requests.*; +import com.oracle.bmc.dataflow.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200129") +public class StartSqlEndpointConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(StartSqlEndpointConverter.class); + + public static com.oracle.bmc.dataflow.requests.StartSqlEndpointRequest interceptRequest( + com.oracle.bmc.dataflow.requests.StartSqlEndpointRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.dataflow.requests.StartSqlEndpointRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSqlEndpointId(), "sqlEndpointId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20200129") + .path("sqlEndpoints") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSqlEndpointId())) + .path("actions") + .path("start"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.dataflow.responses.StartSqlEndpointResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.dataflow.responses.StartSqlEndpointResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.dataflow.responses.StartSqlEndpointResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.dataflow.responses.StartSqlEndpointResponse>() { + @Override + public com.oracle.bmc.dataflow.responses.StartSqlEndpointResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.dataflow.responses.StartSqlEndpointResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.dataflow.responses.StartSqlEndpointResponse.Builder + builder = + com.oracle.bmc.dataflow.responses + .StartSqlEndpointResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.dataflow.responses.StartSqlEndpointResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/internal/http/StopSqlEndpointConverter.java b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/internal/http/StopSqlEndpointConverter.java new file mode 100644 index 00000000000..4525487f51a --- /dev/null +++ b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/internal/http/StopSqlEndpointConverter.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dataflow.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.dataflow.model.*; +import com.oracle.bmc.dataflow.requests.*; +import com.oracle.bmc.dataflow.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200129") +public class StopSqlEndpointConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(StopSqlEndpointConverter.class); + + public static com.oracle.bmc.dataflow.requests.StopSqlEndpointRequest interceptRequest( + com.oracle.bmc.dataflow.requests.StopSqlEndpointRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.dataflow.requests.StopSqlEndpointRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSqlEndpointId(), "sqlEndpointId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20200129") + .path("sqlEndpoints") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSqlEndpointId())) + .path("actions") + .path("stop"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.dataflow.responses.StopSqlEndpointResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.dataflow.responses.StopSqlEndpointResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.dataflow.responses.StopSqlEndpointResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.dataflow.responses.StopSqlEndpointResponse>() { + @Override + public com.oracle.bmc.dataflow.responses.StopSqlEndpointResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.dataflow.responses.StopSqlEndpointResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.dataflow.responses.StopSqlEndpointResponse.Builder + builder = + com.oracle.bmc.dataflow.responses + .StopSqlEndpointResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.dataflow.responses.StopSqlEndpointResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/model/ApplicationLifecycleState.java b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/model/ApplicationLifecycleState.java index 2dadd9cee29..106449cc63e 100644 --- a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/model/ApplicationLifecycleState.java +++ b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/model/ApplicationLifecycleState.java @@ -11,6 +11,7 @@ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200129") public enum ApplicationLifecycleState { Active("ACTIVE"), + Deleting("DELETING"), Deleted("DELETED"), Inactive("INACTIVE"), diff --git a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/model/SqlEndpointLifecycleState.java b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/model/SqlEndpointLifecycleState.java index fed7a90a7e1..a84096bdf29 100644 --- a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/model/SqlEndpointLifecycleState.java +++ b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/model/SqlEndpointLifecycleState.java @@ -24,6 +24,7 @@ public enum SqlEndpointLifecycleState { Failed("FAILED"), Updating("UPDATING"), NeedsAttention("NEEDS_ATTENTION"), + Inactive("INACTIVE"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/model/UpdateSqlEndpointDetails.java b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/model/UpdateSqlEndpointDetails.java index 0153be80708..092509f1205 100644 --- a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/model/UpdateSqlEndpointDetails.java +++ b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/model/UpdateSqlEndpointDetails.java @@ -5,7 +5,7 @@ package com.oracle.bmc.dataflow.model; /** - * Currently only the tags of a SQL Endpoint can be updated. + * The information about all updatable parameters of a SQL Endpoint. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -22,13 +22,49 @@ public final class UpdateSqlEndpointDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"definedTags", "freeformTags"}) + @java.beans.ConstructorProperties({ + "definedTags", + "freeformTags", + "displayName", + "description", + "driverShape", + "driverShapeConfig", + "executorShape", + "executorShapeConfig", + "minExecutorCount", + "maxExecutorCount", + "metastoreId", + "lakeId", + "sparkAdvancedConfigurations" + }) public UpdateSqlEndpointDetails( java.util.Map> definedTags, - java.util.Map freeformTags) { + java.util.Map freeformTags, + String displayName, + String description, + String driverShape, + ShapeConfig driverShapeConfig, + String executorShape, + ShapeConfig executorShapeConfig, + Integer minExecutorCount, + Integer maxExecutorCount, + String metastoreId, + String lakeId, + java.util.Map sparkAdvancedConfigurations) { super(); this.definedTags = definedTags; this.freeformTags = freeformTags; + this.displayName = displayName; + this.description = description; + this.driverShape = driverShape; + this.driverShapeConfig = driverShapeConfig; + this.executorShape = executorShape; + this.executorShapeConfig = executorShapeConfig; + this.minExecutorCount = minExecutorCount; + this.maxExecutorCount = maxExecutorCount; + this.metastoreId = metastoreId; + this.lakeId = lakeId; + this.sparkAdvancedConfigurations = sparkAdvancedConfigurations; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -76,13 +112,199 @@ public Builder freeformTags(java.util.Map freeformTags) { this.__explicitlySet__.add("freeformTags"); return this; } + /** + * The SQL Endpoint name, which can be changed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The SQL Endpoint name, which can be changed. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The description of CreateSQLEndpointDetails. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description of CreateSQLEndpointDetails. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The shape of the SQL Endpoint driver instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("driverShape") + private String driverShape; + + /** + * The shape of the SQL Endpoint driver instance. + * @param driverShape the value to set + * @return this builder + **/ + public Builder driverShape(String driverShape) { + this.driverShape = driverShape; + this.__explicitlySet__.add("driverShape"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("driverShapeConfig") + private ShapeConfig driverShapeConfig; + + public Builder driverShapeConfig(ShapeConfig driverShapeConfig) { + this.driverShapeConfig = driverShapeConfig; + this.__explicitlySet__.add("driverShapeConfig"); + return this; + } + /** + * The shape of the SQL Endpoint worker instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executorShape") + private String executorShape; + + /** + * The shape of the SQL Endpoint worker instance. + * @param executorShape the value to set + * @return this builder + **/ + public Builder executorShape(String executorShape) { + this.executorShape = executorShape; + this.__explicitlySet__.add("executorShape"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("executorShapeConfig") + private ShapeConfig executorShapeConfig; + + public Builder executorShapeConfig(ShapeConfig executorShapeConfig) { + this.executorShapeConfig = executorShapeConfig; + this.__explicitlySet__.add("executorShapeConfig"); + return this; + } + /** + * The minimum number of executors. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("minExecutorCount") + private Integer minExecutorCount; + + /** + * The minimum number of executors. + * @param minExecutorCount the value to set + * @return this builder + **/ + public Builder minExecutorCount(Integer minExecutorCount) { + this.minExecutorCount = minExecutorCount; + this.__explicitlySet__.add("minExecutorCount"); + return this; + } + /** + * The maximum number of executors. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxExecutorCount") + private Integer maxExecutorCount; + + /** + * The maximum number of executors. + * @param maxExecutorCount the value to set + * @return this builder + **/ + public Builder maxExecutorCount(Integer maxExecutorCount) { + this.maxExecutorCount = maxExecutorCount; + this.__explicitlySet__.add("maxExecutorCount"); + return this; + } + /** + * Metastore OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metastoreId") + private String metastoreId; + + /** + * Metastore OCID + * @param metastoreId the value to set + * @return this builder + **/ + public Builder metastoreId(String metastoreId) { + this.metastoreId = metastoreId; + this.__explicitlySet__.add("metastoreId"); + return this; + } + /** + * OCI lake OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lakeId") + private String lakeId; + + /** + * OCI lake OCID + * @param lakeId the value to set + * @return this builder + **/ + public Builder lakeId(String lakeId) { + this.lakeId = lakeId; + this.__explicitlySet__.add("lakeId"); + return this; + } + /** + * The Spark configuration passed to the running process. + * See https://spark.apache.org/docs/latest/configuration.html#available-properties. + * Example: { "spark.app.name" : "My App Name", "spark.shuffle.io.maxRetries" : "4" } + * Note: Not all Spark properties are permitted to be set. Attempting to set a property that is + * not allowed to be overwritten will cause a 400 status to be returned. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sparkAdvancedConfigurations") + private java.util.Map sparkAdvancedConfigurations; + + /** + * The Spark configuration passed to the running process. + * See https://spark.apache.org/docs/latest/configuration.html#available-properties. + * Example: { "spark.app.name" : "My App Name", "spark.shuffle.io.maxRetries" : "4" } + * Note: Not all Spark properties are permitted to be set. Attempting to set a property that is + * not allowed to be overwritten will cause a 400 status to be returned. + * + * @param sparkAdvancedConfigurations the value to set + * @return this builder + **/ + public Builder sparkAdvancedConfigurations( + java.util.Map sparkAdvancedConfigurations) { + this.sparkAdvancedConfigurations = sparkAdvancedConfigurations; + this.__explicitlySet__.add("sparkAdvancedConfigurations"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public UpdateSqlEndpointDetails build() { UpdateSqlEndpointDetails model = - new UpdateSqlEndpointDetails(this.definedTags, this.freeformTags); + new UpdateSqlEndpointDetails( + this.definedTags, + this.freeformTags, + this.displayName, + this.description, + this.driverShape, + this.driverShapeConfig, + this.executorShape, + this.executorShapeConfig, + this.minExecutorCount, + this.maxExecutorCount, + this.metastoreId, + this.lakeId, + this.sparkAdvancedConfigurations); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -97,6 +319,39 @@ public Builder copy(UpdateSqlEndpointDetails model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("driverShape")) { + this.driverShape(model.getDriverShape()); + } + if (model.wasPropertyExplicitlySet("driverShapeConfig")) { + this.driverShapeConfig(model.getDriverShapeConfig()); + } + if (model.wasPropertyExplicitlySet("executorShape")) { + this.executorShape(model.getExecutorShape()); + } + if (model.wasPropertyExplicitlySet("executorShapeConfig")) { + this.executorShapeConfig(model.getExecutorShapeConfig()); + } + if (model.wasPropertyExplicitlySet("minExecutorCount")) { + this.minExecutorCount(model.getMinExecutorCount()); + } + if (model.wasPropertyExplicitlySet("maxExecutorCount")) { + this.maxExecutorCount(model.getMaxExecutorCount()); + } + if (model.wasPropertyExplicitlySet("metastoreId")) { + this.metastoreId(model.getMetastoreId()); + } + if (model.wasPropertyExplicitlySet("lakeId")) { + this.lakeId(model.getLakeId()); + } + if (model.wasPropertyExplicitlySet("sparkAdvancedConfigurations")) { + this.sparkAdvancedConfigurations(model.getSparkAdvancedConfigurations()); + } return this; } } @@ -150,6 +405,156 @@ public java.util.Map getFreeformTags() { return freeformTags; } + /** + * The SQL Endpoint name, which can be changed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The SQL Endpoint name, which can be changed. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The description of CreateSQLEndpointDetails. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description of CreateSQLEndpointDetails. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The shape of the SQL Endpoint driver instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("driverShape") + private final String driverShape; + + /** + * The shape of the SQL Endpoint driver instance. + * @return the value + **/ + public String getDriverShape() { + return driverShape; + } + + @com.fasterxml.jackson.annotation.JsonProperty("driverShapeConfig") + private final ShapeConfig driverShapeConfig; + + public ShapeConfig getDriverShapeConfig() { + return driverShapeConfig; + } + + /** + * The shape of the SQL Endpoint worker instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executorShape") + private final String executorShape; + + /** + * The shape of the SQL Endpoint worker instance. + * @return the value + **/ + public String getExecutorShape() { + return executorShape; + } + + @com.fasterxml.jackson.annotation.JsonProperty("executorShapeConfig") + private final ShapeConfig executorShapeConfig; + + public ShapeConfig getExecutorShapeConfig() { + return executorShapeConfig; + } + + /** + * The minimum number of executors. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("minExecutorCount") + private final Integer minExecutorCount; + + /** + * The minimum number of executors. + * @return the value + **/ + public Integer getMinExecutorCount() { + return minExecutorCount; + } + + /** + * The maximum number of executors. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxExecutorCount") + private final Integer maxExecutorCount; + + /** + * The maximum number of executors. + * @return the value + **/ + public Integer getMaxExecutorCount() { + return maxExecutorCount; + } + + /** + * Metastore OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metastoreId") + private final String metastoreId; + + /** + * Metastore OCID + * @return the value + **/ + public String getMetastoreId() { + return metastoreId; + } + + /** + * OCI lake OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lakeId") + private final String lakeId; + + /** + * OCI lake OCID + * @return the value + **/ + public String getLakeId() { + return lakeId; + } + + /** + * The Spark configuration passed to the running process. + * See https://spark.apache.org/docs/latest/configuration.html#available-properties. + * Example: { "spark.app.name" : "My App Name", "spark.shuffle.io.maxRetries" : "4" } + * Note: Not all Spark properties are permitted to be set. Attempting to set a property that is + * not allowed to be overwritten will cause a 400 status to be returned. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sparkAdvancedConfigurations") + private final java.util.Map sparkAdvancedConfigurations; + + /** + * The Spark configuration passed to the running process. + * See https://spark.apache.org/docs/latest/configuration.html#available-properties. + * Example: { "spark.app.name" : "My App Name", "spark.shuffle.io.maxRetries" : "4" } + * Note: Not all Spark properties are permitted to be set. Attempting to set a property that is + * not allowed to be overwritten will cause a 400 status to be returned. + * + * @return the value + **/ + public java.util.Map getSparkAdvancedConfigurations() { + return sparkAdvancedConfigurations; + } + @Override public String toString() { return this.toString(true); @@ -166,6 +571,18 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("definedTags=").append(String.valueOf(this.definedTags)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", driverShape=").append(String.valueOf(this.driverShape)); + sb.append(", driverShapeConfig=").append(String.valueOf(this.driverShapeConfig)); + sb.append(", executorShape=").append(String.valueOf(this.executorShape)); + sb.append(", executorShapeConfig=").append(String.valueOf(this.executorShapeConfig)); + sb.append(", minExecutorCount=").append(String.valueOf(this.minExecutorCount)); + sb.append(", maxExecutorCount=").append(String.valueOf(this.maxExecutorCount)); + sb.append(", metastoreId=").append(String.valueOf(this.metastoreId)); + sb.append(", lakeId=").append(String.valueOf(this.lakeId)); + sb.append(", sparkAdvancedConfigurations=") + .append(String.valueOf(this.sparkAdvancedConfigurations)); sb.append(")"); return sb.toString(); } @@ -182,6 +599,18 @@ public boolean equals(Object o) { UpdateSqlEndpointDetails other = (UpdateSqlEndpointDetails) o; return java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.driverShape, other.driverShape) + && java.util.Objects.equals(this.driverShapeConfig, other.driverShapeConfig) + && java.util.Objects.equals(this.executorShape, other.executorShape) + && java.util.Objects.equals(this.executorShapeConfig, other.executorShapeConfig) + && java.util.Objects.equals(this.minExecutorCount, other.minExecutorCount) + && java.util.Objects.equals(this.maxExecutorCount, other.maxExecutorCount) + && java.util.Objects.equals(this.metastoreId, other.metastoreId) + && java.util.Objects.equals(this.lakeId, other.lakeId) + && java.util.Objects.equals( + this.sparkAdvancedConfigurations, other.sparkAdvancedConfigurations) && super.equals(other); } @@ -191,6 +620,33 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.driverShape == null ? 43 : this.driverShape.hashCode()); + result = + (result * PRIME) + + (this.driverShapeConfig == null ? 43 : this.driverShapeConfig.hashCode()); + result = + (result * PRIME) + + (this.executorShape == null ? 43 : this.executorShape.hashCode()); + result = + (result * PRIME) + + (this.executorShapeConfig == null + ? 43 + : this.executorShapeConfig.hashCode()); + result = + (result * PRIME) + + (this.minExecutorCount == null ? 43 : this.minExecutorCount.hashCode()); + result = + (result * PRIME) + + (this.maxExecutorCount == null ? 43 : this.maxExecutorCount.hashCode()); + result = (result * PRIME) + (this.metastoreId == null ? 43 : this.metastoreId.hashCode()); + result = (result * PRIME) + (this.lakeId == null ? 43 : this.lakeId.hashCode()); + result = + (result * PRIME) + + (this.sparkAdvancedConfigurations == null + ? 43 + : this.sparkAdvancedConfigurations.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/requests/CascadingDeleteApplicationRequest.java b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/requests/CascadingDeleteApplicationRequest.java new file mode 100644 index 00000000000..8346033c620 --- /dev/null +++ b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/requests/CascadingDeleteApplicationRequest.java @@ -0,0 +1,254 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dataflow.requests; + +import com.oracle.bmc.dataflow.model.*; +/** + * Example: Click here to see how to use CascadingDeleteApplicationRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200129") +public class CascadingDeleteApplicationRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The unique ID for an application. + * + */ + private String applicationId; + + /** + * The unique ID for an application. + * + */ + public String getApplicationId() { + return applicationId; + } + /** + * Unique identifier for the request. If provided, the returned request ID will include this value. + * Otherwise, a random request ID will be generated by the service. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. If provided, the returned request ID will include this value. + * Otherwise, a random request ID will be generated by the service. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, + * set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, + * set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CascadingDeleteApplicationRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The unique ID for an application. + * + */ + private String applicationId = null; + + /** + * The unique ID for an application. + * + * @param applicationId the value to set + * @return this builder instance + */ + public Builder applicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Unique identifier for the request. If provided, the returned request ID will include this value. + * Otherwise, a random request ID will be generated by the service. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. If provided, the returned request ID will include this value. + * Otherwise, a random request ID will be generated by the service. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, + * set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, + * set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CascadingDeleteApplicationRequest o) { + applicationId(o.getApplicationId()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CascadingDeleteApplicationRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CascadingDeleteApplicationRequest + */ + public CascadingDeleteApplicationRequest build() { + CascadingDeleteApplicationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of CascadingDeleteApplicationRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CascadingDeleteApplicationRequest + */ + public CascadingDeleteApplicationRequest buildWithoutInvocationCallback() { + CascadingDeleteApplicationRequest request = new CascadingDeleteApplicationRequest(); + request.applicationId = applicationId; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new CascadingDeleteApplicationRequest(applicationId, opcRequestId, ifMatch); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .applicationId(applicationId) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",applicationId=").append(String.valueOf(this.applicationId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CascadingDeleteApplicationRequest)) { + return false; + } + + CascadingDeleteApplicationRequest other = (CascadingDeleteApplicationRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.applicationId, other.applicationId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.applicationId == null ? 43 : this.applicationId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/requests/StartSqlEndpointRequest.java b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/requests/StartSqlEndpointRequest.java new file mode 100644 index 00000000000..1fddcef8721 --- /dev/null +++ b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/requests/StartSqlEndpointRequest.java @@ -0,0 +1,299 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dataflow.requests; + +import com.oracle.bmc.dataflow.model.*; +/** + * Example: Click here to see how to use StartSqlEndpointRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200129") +public class StartSqlEndpointRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The unique id of the SQL Endpoint. + */ + private String sqlEndpointId; + + /** + * The unique id of the SQL Endpoint. + */ + public String getSqlEndpointId() { + return sqlEndpointId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, + * set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, + * set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. If provided, the returned request ID will include this value. + * Otherwise, a random request ID will be generated by the service. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. If provided, the returned request ID will include this value. + * Otherwise, a random request ID will be generated by the service. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error + * without risk of executing that same action again. Retry tokens expire after 24 hours, + * but can be invalidated before then due to conflicting operations. + * For example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error + * without risk of executing that same action again. Retry tokens expire after 24 hours, + * but can be invalidated before then due to conflicting operations. + * For example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + StartSqlEndpointRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The unique id of the SQL Endpoint. + */ + private String sqlEndpointId = null; + + /** + * The unique id of the SQL Endpoint. + * @param sqlEndpointId the value to set + * @return this builder instance + */ + public Builder sqlEndpointId(String sqlEndpointId) { + this.sqlEndpointId = sqlEndpointId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, + * set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, + * set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. If provided, the returned request ID will include this value. + * Otherwise, a random request ID will be generated by the service. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. If provided, the returned request ID will include this value. + * Otherwise, a random request ID will be generated by the service. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error + * without risk of executing that same action again. Retry tokens expire after 24 hours, + * but can be invalidated before then due to conflicting operations. + * For example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error + * without risk of executing that same action again. Retry tokens expire after 24 hours, + * but can be invalidated before then due to conflicting operations. + * For example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(StartSqlEndpointRequest o) { + sqlEndpointId(o.getSqlEndpointId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of StartSqlEndpointRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of StartSqlEndpointRequest + */ + public StartSqlEndpointRequest build() { + StartSqlEndpointRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of StartSqlEndpointRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of StartSqlEndpointRequest + */ + public StartSqlEndpointRequest buildWithoutInvocationCallback() { + StartSqlEndpointRequest request = new StartSqlEndpointRequest(); + request.sqlEndpointId = sqlEndpointId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new StartSqlEndpointRequest(sqlEndpointId, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .sqlEndpointId(sqlEndpointId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",sqlEndpointId=").append(String.valueOf(this.sqlEndpointId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof StartSqlEndpointRequest)) { + return false; + } + + StartSqlEndpointRequest other = (StartSqlEndpointRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.sqlEndpointId, other.sqlEndpointId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.sqlEndpointId == null ? 43 : this.sqlEndpointId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/requests/StopSqlEndpointRequest.java b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/requests/StopSqlEndpointRequest.java new file mode 100644 index 00000000000..aad99327911 --- /dev/null +++ b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/requests/StopSqlEndpointRequest.java @@ -0,0 +1,299 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dataflow.requests; + +import com.oracle.bmc.dataflow.model.*; +/** + * Example: Click here to see how to use StopSqlEndpointRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200129") +public class StopSqlEndpointRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The unique id of the SQL Endpoint. + */ + private String sqlEndpointId; + + /** + * The unique id of the SQL Endpoint. + */ + public String getSqlEndpointId() { + return sqlEndpointId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, + * set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, + * set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. If provided, the returned request ID will include this value. + * Otherwise, a random request ID will be generated by the service. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. If provided, the returned request ID will include this value. + * Otherwise, a random request ID will be generated by the service. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error + * without risk of executing that same action again. Retry tokens expire after 24 hours, + * but can be invalidated before then due to conflicting operations. + * For example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error + * without risk of executing that same action again. Retry tokens expire after 24 hours, + * but can be invalidated before then due to conflicting operations. + * For example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + StopSqlEndpointRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The unique id of the SQL Endpoint. + */ + private String sqlEndpointId = null; + + /** + * The unique id of the SQL Endpoint. + * @param sqlEndpointId the value to set + * @return this builder instance + */ + public Builder sqlEndpointId(String sqlEndpointId) { + this.sqlEndpointId = sqlEndpointId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, + * set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, + * set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. If provided, the returned request ID will include this value. + * Otherwise, a random request ID will be generated by the service. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. If provided, the returned request ID will include this value. + * Otherwise, a random request ID will be generated by the service. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error + * without risk of executing that same action again. Retry tokens expire after 24 hours, + * but can be invalidated before then due to conflicting operations. + * For example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error + * without risk of executing that same action again. Retry tokens expire after 24 hours, + * but can be invalidated before then due to conflicting operations. + * For example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(StopSqlEndpointRequest o) { + sqlEndpointId(o.getSqlEndpointId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of StopSqlEndpointRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of StopSqlEndpointRequest + */ + public StopSqlEndpointRequest build() { + StopSqlEndpointRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of StopSqlEndpointRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of StopSqlEndpointRequest + */ + public StopSqlEndpointRequest buildWithoutInvocationCallback() { + StopSqlEndpointRequest request = new StopSqlEndpointRequest(); + request.sqlEndpointId = sqlEndpointId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new StopSqlEndpointRequest(sqlEndpointId, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .sqlEndpointId(sqlEndpointId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",sqlEndpointId=").append(String.valueOf(this.sqlEndpointId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof StopSqlEndpointRequest)) { + return false; + } + + StopSqlEndpointRequest other = (StopSqlEndpointRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.sqlEndpointId, other.sqlEndpointId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.sqlEndpointId == null ? 43 : this.sqlEndpointId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/responses/CascadingDeleteApplicationResponse.java b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/responses/CascadingDeleteApplicationResponse.java new file mode 100644 index 00000000000..1b7fb0bce8b --- /dev/null +++ b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/responses/CascadingDeleteApplicationResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dataflow.responses; + +import com.oracle.bmc.dataflow.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200129") +public class CascadingDeleteApplicationResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle assigned identifier for a work request. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle assigned identifier for a work request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle assigned identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private CascadingDeleteApplicationResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle assigned identifier for a work request. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle assigned identifier for a work request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle assigned identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CascadingDeleteApplicationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CascadingDeleteApplicationResponse build() { + return new CascadingDeleteApplicationResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CascadingDeleteApplicationResponse)) { + return false; + } + + CascadingDeleteApplicationResponse other = (CascadingDeleteApplicationResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/responses/StartSqlEndpointResponse.java b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/responses/StartSqlEndpointResponse.java new file mode 100644 index 00000000000..ecbc6e7ae30 --- /dev/null +++ b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/responses/StartSqlEndpointResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dataflow.responses; + +import com.oracle.bmc.dataflow.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200129") +public class StartSqlEndpointResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle assigned identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle assigned identifier for a work request. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle assigned identifier for a work request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private StartSqlEndpointResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle assigned identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle assigned identifier for a work request. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle assigned identifier for a work request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(StartSqlEndpointResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public StartSqlEndpointResponse build() { + return new StartSqlEndpointResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof StartSqlEndpointResponse)) { + return false; + } + + StartSqlEndpointResponse other = (StartSqlEndpointResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/responses/StopSqlEndpointResponse.java b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/responses/StopSqlEndpointResponse.java new file mode 100644 index 00000000000..d9fedab3c44 --- /dev/null +++ b/bmc-dataflow/src/main/java/com/oracle/bmc/dataflow/responses/StopSqlEndpointResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dataflow.responses; + +import com.oracle.bmc.dataflow.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200129") +public class StopSqlEndpointResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle assigned identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle assigned identifier for a work request. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle assigned identifier for a work request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private StopSqlEndpointResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle assigned identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle assigned identifier for a work request. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle assigned identifier for a work request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(StopSqlEndpointResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public StopSqlEndpointResponse build() { + return new StopSqlEndpointResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof StopSqlEndpointResponse)) { + return false; + } + + StopSqlEndpointResponse other = (StopSqlEndpointResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-dataintegration/pom.xml b/bmc-dataintegration/pom.xml index c14c0d9d668..0020092e8fd 100644 --- a/bmc-dataintegration/pom.xml +++ b/bmc-dataintegration/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-dataintegration @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-datalabelingservice/pom.xml b/bmc-datalabelingservice/pom.xml index e4733c71f3f..f7b2de4db76 100644 --- a/bmc-datalabelingservice/pom.xml +++ b/bmc-datalabelingservice/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-datalabelingservice @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-datalabelingservicedataplane/pom.xml b/bmc-datalabelingservicedataplane/pom.xml index 22482ab1ee0..ed8f1c3e4fe 100644 --- a/bmc-datalabelingservicedataplane/pom.xml +++ b/bmc-datalabelingservicedataplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-datalabelingservicedataplane @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-datasafe/pom.xml b/bmc-datasafe/pom.xml index b29d143af9d..a0b096ef7e4 100644 --- a/bmc-datasafe/pom.xml +++ b/bmc-datasafe/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-datasafe @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafe.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafe.java index 32edef06ae5..aade6392582 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafe.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafe.java @@ -137,6 +137,32 @@ ApplyDiscoveryJobResultsResponse applyDiscoveryJobResults( ApplySdmMaskingPolicyDifferenceResponse applySdmMaskingPolicyDifference( ApplySdmMaskingPolicyDifferenceRequest request); + /** + * Appends the allowedSqls with entries from the logs. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use BulkCreateSqlFirewallAllowedSqls API. + */ + BulkCreateSqlFirewallAllowedSqlsResponse bulkCreateSqlFirewallAllowedSqls( + BulkCreateSqlFirewallAllowedSqlsRequest request); + + /** + * Delete multiple allowed sqls from the SQL firewall policy. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use BulkDeleteSqlFirewallAllowedSqls API. + */ + BulkDeleteSqlFirewallAllowedSqlsResponse bulkDeleteSqlFirewallAllowedSqls( + BulkDeleteSqlFirewallAllowedSqlsRequest request); + /** * Calculates the volume of audit events available on the target database to be collected. Measurable up to the defined retention period of the audit target resource. * @param request The request object containing the details to send @@ -188,6 +214,19 @@ CalculateAuditVolumeCollectedResponse calculateAuditVolumeCollected( */ ChangeAlertCompartmentResponse changeAlertCompartment(ChangeAlertCompartmentRequest request); + /** + * Moves the specified alert policy into a different compartment. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ChangeAlertPolicyCompartment API. + */ + ChangeAlertPolicyCompartmentResponse changeAlertPolicyCompartment( + ChangeAlertPolicyCompartmentRequest request); + /** * Moves the archive retreival to the specified compartment. When provided, if-Match is checked against ETag value of the resource. * @@ -539,6 +578,32 @@ CompareSecurityAssessmentResponse compareSecurityAssessment( */ CompareUserAssessmentResponse compareUserAssessment(CompareUserAssessmentRequest request); + /** + * Creates a new user-defined alert policy. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateAlertPolicy API. + */ + CreateAlertPolicyResponse createAlertPolicy(CreateAlertPolicyRequest request); + + /** + * Creates a new rule for the alert policy. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateAlertPolicyRule API. + */ + CreateAlertPolicyRuleResponse createAlertPolicyRule(CreateAlertPolicyRuleRequest request); + /** * Creates a work request to retrieve archived audit data. This asynchronous process will usually take over an hour to complete. * Save the id from the response of this operation. Call GetAuditArchiveRetrieval operation after an hour, passing the id to know the status of @@ -851,6 +916,30 @@ CreateTargetAlertPolicyAssociationResponse createTargetAlertPolicyAssociation( DeactivateTargetDatabaseResponse deactivateTargetDatabase( DeactivateTargetDatabaseRequest request); + /** + * Deletes the specified user-defined alert policy. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteAlertPolicy API. + */ + DeleteAlertPolicyResponse deleteAlertPolicy(DeleteAlertPolicyRequest request); + + /** + * Deletes the specified user-defined alert policy rule. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteAlertPolicyRule API. + */ + DeleteAlertPolicyRuleResponse deleteAlertPolicyRule(DeleteAlertPolicyRuleRequest request); + /** * To unload retrieved archive data, call the operation ListAuditArchiveRetrieval first. * This will return the auditArchiveRetrievalId. Then call this operation with auditArchiveRetrievalId. @@ -1082,6 +1171,19 @@ DeleteSensitiveDataModelResponse deleteSensitiveDataModel( */ DeleteSqlCollectionResponse deleteSqlCollection(DeleteSqlCollectionRequest request); + /** + * Deletes the specified allowed sql. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteSqlFirewallAllowedSql API. + */ + DeleteSqlFirewallAllowedSqlResponse deleteSqlFirewallAllowedSql( + DeleteSqlFirewallAllowedSqlRequest request); + /** * Deletes the SQL Firewall policy resource. * @@ -1459,6 +1561,18 @@ GenerateUserAssessmentReportResponse generateUserAssessmentReport( */ GetAlertPolicyResponse getAlertPolicy(GetAlertPolicyRequest request); + /** + * Gets the details of a policy rule by its key. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetAlertPolicyRule API. + */ + GetAlertPolicyRuleResponse getAlertPolicyRule(GetAlertPolicyRuleRequest request); + /** * Gets the details of the specified archive retreival. * @param request The request object containing the details to send @@ -1920,6 +2034,19 @@ GetSecurityPolicyEntryStateResponse getSecurityPolicyEntryState( */ GetSqlCollectionResponse getSqlCollection(GetSqlCollectionRequest request); + /** + * Gets a SQL firewall allowed SQL by identifier. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetSqlFirewallAllowedSql API. + */ + GetSqlFirewallAllowedSqlResponse getSqlFirewallAllowedSql( + GetSqlFirewallAllowedSqlRequest request); + /** * Gets a SQL Firewall policy by identifier. * @param request The request object containing the details to send @@ -2354,7 +2481,7 @@ ListDatabaseSecurityConfigsResponse listDatabaseSecurityConfigs( /** * Retrieves a list of all database table access entries in Data Safe. - * + *

* The ListDatabaseTableAccessEntries operation returns only the database table access reports for the specified security policy report. * * @param request The request object containing the details to send @@ -2962,6 +3089,20 @@ ListSecurityPolicyReportsResponse listSecurityPolicyReports( */ ListSensitiveColumnsResponse listSensitiveColumns(ListSensitiveColumnsRequest request); + /** + * Gets a list of sensitive type Ids present in the specified sensitive data model. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListSensitiveDataModelSensitiveTypes API. + */ + ListSensitiveDataModelSensitiveTypesResponse listSensitiveDataModelSensitiveTypes( + ListSensitiveDataModelSensitiveTypesRequest request); + /** * Gets a list of sensitive data models based on the specified query parameters. * @@ -3473,6 +3614,21 @@ PatchSdmMaskingPolicyDifferenceColumnsResponse patchSdmMaskingPolicyDifferenceCo */ PatchSensitiveColumnsResponse patchSensitiveColumns(PatchSensitiveColumnsRequest request); + /** + * Delete multiple allowed sqls. You can use this operation to delete one or more allowed sqls. + * Create and update of multiple allowed sqls is not supported. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use PatchSqlFirewallAllowedSql API. + */ + PatchSqlFirewallAllowedSqlResponse patchSqlFirewallAllowedSql( + PatchSqlFirewallAllowedSqlRequest request); + /** * Creates new target-alert policy associations that will be applied on the target database. * @@ -3729,7 +3885,8 @@ SetUserAssessmentBaselineResponse setUserAssessmentBaseline( SuspendWorkRequestResponse suspendWorkRequest(SuspendWorkRequestRequest request); /** - * Removes the baseline setting for the saved security assessment. The saved security assessment is no longer considered a baseline. + * Removes the baseline setting for the saved security assessment associated with the targetId passed via body. + * If no body or empty body is passed then the baseline settings of all the saved security assessments pertaining to the baseline assessment OCID provided in the path will be removed. * Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource. * * @param request The request object containing the details to send @@ -3744,7 +3901,8 @@ UnsetSecurityAssessmentBaselineResponse unsetSecurityAssessmentBaseline( UnsetSecurityAssessmentBaselineRequest request); /** - * Removes the baseline setting for the saved user assessment. The saved user assessment is no longer considered a baseline. + * Removes the baseline setting for the saved user assessment associated with the targetId passed via body. + * If no body or empty body is passed then the baseline settings of all the saved user assessments pertaining to the baseline assessment OCID provided in the path will be removed. * Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource. * * @param request The request object containing the details to send @@ -3770,6 +3928,30 @@ UnsetUserAssessmentBaselineResponse unsetUserAssessmentBaseline( */ UpdateAlertResponse updateAlert(UpdateAlertRequest request); + /** + * Updates the specified alert policy . + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateAlertPolicy API. + */ + UpdateAlertPolicyResponse updateAlertPolicy(UpdateAlertPolicyRequest request); + + /** + * Updates the specified alert policy rule. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateAlertPolicyRule API. + */ + UpdateAlertPolicyRuleResponse updateAlertPolicyRule(UpdateAlertPolicyRuleRequest request); + /** * Updates the audit archive retrieval. * @param request The request object containing the details to send diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeAsync.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeAsync.java index 42102f7da86..71f259084ca 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeAsync.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeAsync.java @@ -154,6 +154,42 @@ java.util.concurrent.Future applyDiscoveryJobR ApplySdmMaskingPolicyDifferenceResponse> handler); + /** + * Appends the allowedSqls with entries from the logs. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + bulkCreateSqlFirewallAllowedSqls( + BulkCreateSqlFirewallAllowedSqlsRequest request, + com.oracle.bmc.responses.AsyncHandler< + BulkCreateSqlFirewallAllowedSqlsRequest, + BulkCreateSqlFirewallAllowedSqlsResponse> + handler); + + /** + * Delete multiple allowed sqls from the SQL firewall policy. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + bulkDeleteSqlFirewallAllowedSqls( + BulkDeleteSqlFirewallAllowedSqlsRequest request, + com.oracle.bmc.responses.AsyncHandler< + BulkDeleteSqlFirewallAllowedSqlsRequest, + BulkDeleteSqlFirewallAllowedSqlsResponse> + handler); + /** * Calculates the volume of audit events available on the target database to be collected. Measurable up to the defined retention period of the audit target resource. * @@ -223,6 +259,23 @@ java.util.concurrent.Future changeAlertCompartme ChangeAlertCompartmentRequest, ChangeAlertCompartmentResponse> handler); + /** + * Moves the specified alert policy into a different compartment. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future changeAlertPolicyCompartment( + ChangeAlertPolicyCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeAlertPolicyCompartmentRequest, + ChangeAlertPolicyCompartmentResponse> + handler); + /** * Moves the archive retreival to the specified compartment. When provided, if-Match is checked against ETag value of the resource. * @@ -696,6 +749,40 @@ java.util.concurrent.Future compareUserAssessment CompareUserAssessmentRequest, CompareUserAssessmentResponse> handler); + /** + * Creates a new user-defined alert policy. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createAlertPolicy( + CreateAlertPolicyRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateAlertPolicyRequest, CreateAlertPolicyResponse> + handler); + + /** + * Creates a new rule for the alert policy. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createAlertPolicyRule( + CreateAlertPolicyRuleRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateAlertPolicyRuleRequest, CreateAlertPolicyRuleResponse> + handler); + /** * Creates a work request to retrieve archived audit data. This asynchronous process will usually take over an hour to complete. * Save the id from the response of this operation. Call GetAuditArchiveRetrieval operation after an hour, passing the id to know the status of @@ -1081,6 +1168,38 @@ java.util.concurrent.Future deactivateTargetDa DeactivateTargetDatabaseRequest, DeactivateTargetDatabaseResponse> handler); + /** + * Deletes the specified user-defined alert policy. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteAlertPolicy( + DeleteAlertPolicyRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteAlertPolicyRequest, DeleteAlertPolicyResponse> + handler); + + /** + * Deletes the specified user-defined alert policy rule. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteAlertPolicyRule( + DeleteAlertPolicyRuleRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteAlertPolicyRuleRequest, DeleteAlertPolicyRuleResponse> + handler); + /** * To unload retrieved archive data, call the operation ListAuditArchiveRetrieval first. * This will return the auditArchiveRetrievalId. Then call this operation with auditArchiveRetrievalId. @@ -1380,6 +1499,22 @@ java.util.concurrent.Future deleteSqlCollection( DeleteSqlCollectionRequest, DeleteSqlCollectionResponse> handler); + /** + * Deletes the specified allowed sql. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteSqlFirewallAllowedSql( + DeleteSqlFirewallAllowedSqlRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteSqlFirewallAllowedSqlRequest, DeleteSqlFirewallAllowedSqlResponse> + handler); + /** * Deletes the SQL Firewall policy resource. * @@ -1862,6 +1997,22 @@ java.util.concurrent.Future getAlertPolicy( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets the details of a policy rule by its key. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getAlertPolicyRule( + GetAlertPolicyRuleRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetAlertPolicyRuleRequest, GetAlertPolicyRuleResponse> + handler); + /** * Gets the details of the specified archive retreival. * @@ -2449,6 +2600,22 @@ java.util.concurrent.Future getSqlCollection( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets a SQL firewall allowed SQL by identifier. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getSqlFirewallAllowedSql( + GetSqlFirewallAllowedSqlRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetSqlFirewallAllowedSqlRequest, GetSqlFirewallAllowedSqlResponse> + handler); + /** * Gets a SQL Firewall policy by identifier. * @@ -2966,7 +3133,7 @@ java.util.concurrent.Future listDatabaseSec /** * Retrieves a list of all database table access entries in Data Safe. - * + *

* The ListDatabaseTableAccessEntries operation returns only the database table access reports for the specified security policy report. * * @@ -3721,6 +3888,25 @@ java.util.concurrent.Future listSensitiveColumns( ListSensitiveColumnsRequest, ListSensitiveColumnsResponse> handler); + /** + * Gets a list of sensitive type Ids present in the specified sensitive data model. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listSensitiveDataModelSensitiveTypes( + ListSensitiveDataModelSensitiveTypesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListSensitiveDataModelSensitiveTypesRequest, + ListSensitiveDataModelSensitiveTypesResponse> + handler); + /** * Gets a list of sensitive data models based on the specified query parameters. * @@ -4344,6 +4530,24 @@ java.util.concurrent.Future patchSensitiveColumns PatchSensitiveColumnsRequest, PatchSensitiveColumnsResponse> handler); + /** + * Delete multiple allowed sqls. You can use this operation to delete one or more allowed sqls. + * Create and update of multiple allowed sqls is not supported. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future patchSqlFirewallAllowedSql( + PatchSqlFirewallAllowedSqlRequest request, + com.oracle.bmc.responses.AsyncHandler< + PatchSqlFirewallAllowedSqlRequest, PatchSqlFirewallAllowedSqlResponse> + handler); + /** * Creates new target-alert policy associations that will be applied on the target database. * @@ -4678,7 +4882,8 @@ java.util.concurrent.Future suspendWorkRequest( handler); /** - * Removes the baseline setting for the saved security assessment. The saved security assessment is no longer considered a baseline. + * Removes the baseline setting for the saved security assessment associated with the targetId passed via body. + * If no body or empty body is passed then the baseline settings of all the saved security assessments pertaining to the baseline assessment OCID provided in the path will be removed. * Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource. * * @@ -4698,7 +4903,8 @@ java.util.concurrent.Future suspendWorkRequest( handler); /** - * Removes the baseline setting for the saved user assessment. The saved user assessment is no longer considered a baseline. + * Removes the baseline setting for the saved user assessment associated with the targetId passed via body. + * If no body or empty body is passed then the baseline settings of all the saved user assessments pertaining to the baseline assessment OCID provided in the path will be removed. * Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource. * * @@ -4729,6 +4935,38 @@ java.util.concurrent.Future updateAlert( UpdateAlertRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Updates the specified alert policy . + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateAlertPolicy( + UpdateAlertPolicyRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateAlertPolicyRequest, UpdateAlertPolicyResponse> + handler); + + /** + * Updates the specified alert policy rule. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateAlertPolicyRule( + UpdateAlertPolicyRuleRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateAlertPolicyRuleRequest, UpdateAlertPolicyRuleResponse> + handler); + /** * Updates the audit archive retrieval. * diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeAsyncClient.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeAsyncClient.java index 614e956baa5..2a074052da9 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeAsyncClient.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeAsyncClient.java @@ -726,6 +726,123 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + bulkCreateSqlFirewallAllowedSqls( + BulkCreateSqlFirewallAllowedSqlsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + BulkCreateSqlFirewallAllowedSqlsRequest, + BulkCreateSqlFirewallAllowedSqlsResponse> + handler) { + LOG.trace("Called async bulkCreateSqlFirewallAllowedSqls"); + final BulkCreateSqlFirewallAllowedSqlsRequest interceptedRequest = + BulkCreateSqlFirewallAllowedSqlsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + BulkCreateSqlFirewallAllowedSqlsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "BulkCreateSqlFirewallAllowedSqls", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallAllowedSql/BulkCreateSqlFirewallAllowedSqls"); + final java.util.function.Function< + javax.ws.rs.core.Response, BulkCreateSqlFirewallAllowedSqlsResponse> + transformer = + BulkCreateSqlFirewallAllowedSqlsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + BulkCreateSqlFirewallAllowedSqlsRequest, + BulkCreateSqlFirewallAllowedSqlsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + BulkCreateSqlFirewallAllowedSqlsRequest, + BulkCreateSqlFirewallAllowedSqlsResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getBulkCreateSqlFirewallAllowedSqlsDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + BulkCreateSqlFirewallAllowedSqlsRequest, + BulkCreateSqlFirewallAllowedSqlsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + bulkDeleteSqlFirewallAllowedSqls( + BulkDeleteSqlFirewallAllowedSqlsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + BulkDeleteSqlFirewallAllowedSqlsRequest, + BulkDeleteSqlFirewallAllowedSqlsResponse> + handler) { + LOG.trace("Called async bulkDeleteSqlFirewallAllowedSqls"); + final BulkDeleteSqlFirewallAllowedSqlsRequest interceptedRequest = + BulkDeleteSqlFirewallAllowedSqlsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + BulkDeleteSqlFirewallAllowedSqlsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "BulkDeleteSqlFirewallAllowedSqls", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallAllowedSql/BulkDeleteSqlFirewallAllowedSqls"); + final java.util.function.Function< + javax.ws.rs.core.Response, BulkDeleteSqlFirewallAllowedSqlsResponse> + transformer = + BulkDeleteSqlFirewallAllowedSqlsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + BulkDeleteSqlFirewallAllowedSqlsRequest, + BulkDeleteSqlFirewallAllowedSqlsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + BulkDeleteSqlFirewallAllowedSqlsRequest, + BulkDeleteSqlFirewallAllowedSqlsResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getBulkDeleteSqlFirewallAllowedSqlsDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + BulkDeleteSqlFirewallAllowedSqlsRequest, + BulkDeleteSqlFirewallAllowedSqlsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future calculateAuditVolumeAvailable( @@ -940,6 +1057,63 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + changeAlertPolicyCompartment( + ChangeAlertPolicyCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeAlertPolicyCompartmentRequest, + ChangeAlertPolicyCompartmentResponse> + handler) { + LOG.trace("Called async changeAlertPolicyCompartment"); + final ChangeAlertPolicyCompartmentRequest interceptedRequest = + ChangeAlertPolicyCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeAlertPolicyCompartmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "ChangeAlertPolicyCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicy/ChangeAlertPolicyCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeAlertPolicyCompartmentResponse> + transformer = + ChangeAlertPolicyCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeAlertPolicyCompartmentRequest, ChangeAlertPolicyCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeAlertPolicyCompartmentRequest, + ChangeAlertPolicyCompartmentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeAlertPolicyCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeAlertPolicyCompartmentRequest, ChangeAlertPolicyCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future changeAuditArchiveRetrievalCompartment( @@ -2470,6 +2644,111 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future createAlertPolicy( + CreateAlertPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateAlertPolicyRequest, CreateAlertPolicyResponse> + handler) { + LOG.trace("Called async createAlertPolicy"); + final CreateAlertPolicyRequest interceptedRequest = + CreateAlertPolicyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateAlertPolicyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "CreateAlertPolicy", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicy/CreateAlertPolicy"); + final java.util.function.Function + transformer = + CreateAlertPolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateAlertPolicyRequest, CreateAlertPolicyResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateAlertPolicyDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateAlertPolicyRequest, CreateAlertPolicyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createAlertPolicyRule( + CreateAlertPolicyRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateAlertPolicyRuleRequest, CreateAlertPolicyRuleResponse> + handler) { + LOG.trace("Called async createAlertPolicyRule"); + final CreateAlertPolicyRuleRequest interceptedRequest = + CreateAlertPolicyRuleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateAlertPolicyRuleConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "CreateAlertPolicyRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicyRule/CreateAlertPolicyRule"); + final java.util.function.Function + transformer = + CreateAlertPolicyRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateAlertPolicyRuleRequest, CreateAlertPolicyRuleResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateAlertPolicyRuleRequest, CreateAlertPolicyRuleResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateAlertPolicyRuleDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateAlertPolicyRuleRequest, CreateAlertPolicyRuleResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future createAuditArchiveRetrieval( @@ -3493,6 +3772,99 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future deleteAlertPolicy( + DeleteAlertPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteAlertPolicyRequest, DeleteAlertPolicyResponse> + handler) { + LOG.trace("Called async deleteAlertPolicy"); + final DeleteAlertPolicyRequest interceptedRequest = + DeleteAlertPolicyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteAlertPolicyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "DeleteAlertPolicy", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicy/DeleteAlertPolicy"); + final java.util.function.Function + transformer = + DeleteAlertPolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteAlertPolicyRequest, DeleteAlertPolicyResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteAlertPolicyRequest, DeleteAlertPolicyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteAlertPolicyRule( + DeleteAlertPolicyRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteAlertPolicyRuleRequest, DeleteAlertPolicyRuleResponse> + handler) { + LOG.trace("Called async deleteAlertPolicyRule"); + final DeleteAlertPolicyRuleRequest interceptedRequest = + DeleteAlertPolicyRuleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteAlertPolicyRuleConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "DeleteAlertPolicyRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicyRule/DeleteAlertPolicyRule"); + final java.util.function.Function + transformer = + DeleteAlertPolicyRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteAlertPolicyRuleRequest, DeleteAlertPolicyRuleResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteAlertPolicyRuleRequest, DeleteAlertPolicyRuleResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteAlertPolicyRuleRequest, DeleteAlertPolicyRuleResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteAuditArchiveRetrieval( @@ -4365,6 +4737,57 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + deleteSqlFirewallAllowedSql( + DeleteSqlFirewallAllowedSqlRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteSqlFirewallAllowedSqlRequest, + DeleteSqlFirewallAllowedSqlResponse> + handler) { + LOG.trace("Called async deleteSqlFirewallAllowedSql"); + final DeleteSqlFirewallAllowedSqlRequest interceptedRequest = + DeleteSqlFirewallAllowedSqlConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteSqlFirewallAllowedSqlConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "DeleteSqlFirewallAllowedSql", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallAllowedSql/DeleteSqlFirewallAllowedSql"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteSqlFirewallAllowedSqlResponse> + transformer = + DeleteSqlFirewallAllowedSqlConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteSqlFirewallAllowedSqlRequest, DeleteSqlFirewallAllowedSqlResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteSqlFirewallAllowedSqlRequest, + DeleteSqlFirewallAllowedSqlResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteSqlFirewallAllowedSqlRequest, DeleteSqlFirewallAllowedSqlResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteSqlFirewallPolicy( DeleteSqlFirewallPolicyRequest request, @@ -5743,6 +6166,52 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future getAlertPolicyRule( + GetAlertPolicyRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetAlertPolicyRuleRequest, GetAlertPolicyRuleResponse> + handler) { + LOG.trace("Called async getAlertPolicyRule"); + final GetAlertPolicyRuleRequest interceptedRequest = + GetAlertPolicyRuleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAlertPolicyRuleConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "GetAlertPolicyRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicyRule/GetAlertPolicyRule"); + final java.util.function.Function + transformer = + GetAlertPolicyRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetAlertPolicyRuleRequest, GetAlertPolicyRuleResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetAlertPolicyRuleRequest, GetAlertPolicyRuleResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getAuditArchiveRetrieval( GetAuditArchiveRetrievalRequest request, @@ -7463,6 +7932,54 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future getSqlFirewallAllowedSql( + GetSqlFirewallAllowedSqlRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetSqlFirewallAllowedSqlRequest, GetSqlFirewallAllowedSqlResponse> + handler) { + LOG.trace("Called async getSqlFirewallAllowedSql"); + final GetSqlFirewallAllowedSqlRequest interceptedRequest = + GetSqlFirewallAllowedSqlConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetSqlFirewallAllowedSqlConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "GetSqlFirewallAllowedSql", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallAllowedSql/GetSqlFirewallAllowedSql"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetSqlFirewallAllowedSqlResponse> + transformer = + GetSqlFirewallAllowedSqlConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetSqlFirewallAllowedSqlRequest, GetSqlFirewallAllowedSqlResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetSqlFirewallAllowedSqlRequest, GetSqlFirewallAllowedSqlResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetSqlFirewallAllowedSqlRequest, GetSqlFirewallAllowedSqlResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getSqlFirewallPolicy( GetSqlFirewallPolicyRequest request, @@ -10418,6 +10935,60 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + listSensitiveDataModelSensitiveTypes( + ListSensitiveDataModelSensitiveTypesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListSensitiveDataModelSensitiveTypesRequest, + ListSensitiveDataModelSensitiveTypesResponse> + handler) { + LOG.trace("Called async listSensitiveDataModelSensitiveTypes"); + final ListSensitiveDataModelSensitiveTypesRequest interceptedRequest = + ListSensitiveDataModelSensitiveTypesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSensitiveDataModelSensitiveTypesConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "ListSensitiveDataModelSensitiveTypes", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveDataModelSensitiveTypeCollection/ListSensitiveDataModelSensitiveTypes"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListSensitiveDataModelSensitiveTypesResponse> + transformer = + ListSensitiveDataModelSensitiveTypesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListSensitiveDataModelSensitiveTypesRequest, + ListSensitiveDataModelSensitiveTypesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListSensitiveDataModelSensitiveTypesRequest, + ListSensitiveDataModelSensitiveTypesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListSensitiveDataModelSensitiveTypesRequest, + ListSensitiveDataModelSensitiveTypesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listSensitiveDataModels( ListSensitiveDataModelsRequest request, @@ -11892,6 +12463,62 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + patchSqlFirewallAllowedSql( + PatchSqlFirewallAllowedSqlRequest request, + final com.oracle.bmc.responses.AsyncHandler< + PatchSqlFirewallAllowedSqlRequest, + PatchSqlFirewallAllowedSqlResponse> + handler) { + LOG.trace("Called async patchSqlFirewallAllowedSql"); + final PatchSqlFirewallAllowedSqlRequest interceptedRequest = + PatchSqlFirewallAllowedSqlConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PatchSqlFirewallAllowedSqlConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "PatchSqlFirewallAllowedSql", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallAllowedSql/PatchSqlFirewallAllowedSql"); + final java.util.function.Function< + javax.ws.rs.core.Response, PatchSqlFirewallAllowedSqlResponse> + transformer = + PatchSqlFirewallAllowedSqlConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + PatchSqlFirewallAllowedSqlRequest, PatchSqlFirewallAllowedSqlResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + PatchSqlFirewallAllowedSqlRequest, + PatchSqlFirewallAllowedSqlResponse>, + java.util.concurrent.Future> + futureSupplier = + client.patchFutureSupplier( + interceptedRequest, + interceptedRequest.getPatchSqlFirewallAllowedSqlDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + PatchSqlFirewallAllowedSqlRequest, PatchSqlFirewallAllowedSqlResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future patchTargetAlertPolicyAssociation( @@ -12941,7 +13568,12 @@ protected void beforeRetryAction() {} UnsetSecurityAssessmentBaselineRequest, UnsetSecurityAssessmentBaselineResponse>, java.util.concurrent.Future> - futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getUnsetSecurityAssessmentBaselineDetails(), + ib, + transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { @@ -12994,7 +13626,12 @@ protected void beforeRetryAction() {} UnsetUserAssessmentBaselineRequest, UnsetUserAssessmentBaselineResponse>, java.util.concurrent.Future> - futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getUnsetUserAssessmentBaselineDetails(), + ib, + transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { @@ -13061,6 +13698,109 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future updateAlertPolicy( + UpdateAlertPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateAlertPolicyRequest, UpdateAlertPolicyResponse> + handler) { + LOG.trace("Called async updateAlertPolicy"); + final UpdateAlertPolicyRequest interceptedRequest = + UpdateAlertPolicyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateAlertPolicyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "UpdateAlertPolicy", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicy/UpdateAlertPolicy"); + final java.util.function.Function + transformer = + UpdateAlertPolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateAlertPolicyRequest, UpdateAlertPolicyResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateAlertPolicyDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateAlertPolicyRequest, UpdateAlertPolicyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateAlertPolicyRule( + UpdateAlertPolicyRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateAlertPolicyRuleRequest, UpdateAlertPolicyRuleResponse> + handler) { + LOG.trace("Called async updateAlertPolicyRule"); + final UpdateAlertPolicyRuleRequest interceptedRequest = + UpdateAlertPolicyRuleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateAlertPolicyRuleConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "UpdateAlertPolicyRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicyRule/UpdateAlertPolicyRule"); + final java.util.function.Function + transformer = + UpdateAlertPolicyRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateAlertPolicyRuleRequest, UpdateAlertPolicyRuleResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateAlertPolicyRuleRequest, UpdateAlertPolicyRuleResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateAlertPolicyRuleDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateAlertPolicyRuleRequest, UpdateAlertPolicyRuleResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateAuditArchiveRetrieval( diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeClient.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeClient.java index 4fe7d445f16..3d563698957 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeClient.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeClient.java @@ -762,6 +762,95 @@ public ApplySdmMaskingPolicyDifferenceResponse applySdmMaskingPolicyDifference( }); } + @Override + public BulkCreateSqlFirewallAllowedSqlsResponse bulkCreateSqlFirewallAllowedSqls( + BulkCreateSqlFirewallAllowedSqlsRequest request) { + LOG.trace("Called bulkCreateSqlFirewallAllowedSqls"); + final BulkCreateSqlFirewallAllowedSqlsRequest interceptedRequest = + BulkCreateSqlFirewallAllowedSqlsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + BulkCreateSqlFirewallAllowedSqlsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "BulkCreateSqlFirewallAllowedSqls", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallAllowedSql/BulkCreateSqlFirewallAllowedSqls"); + java.util.function.Function< + javax.ws.rs.core.Response, BulkCreateSqlFirewallAllowedSqlsResponse> + transformer = + BulkCreateSqlFirewallAllowedSqlsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getBulkCreateSqlFirewallAllowedSqlsDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public BulkDeleteSqlFirewallAllowedSqlsResponse bulkDeleteSqlFirewallAllowedSqls( + BulkDeleteSqlFirewallAllowedSqlsRequest request) { + LOG.trace("Called bulkDeleteSqlFirewallAllowedSqls"); + final BulkDeleteSqlFirewallAllowedSqlsRequest interceptedRequest = + BulkDeleteSqlFirewallAllowedSqlsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + BulkDeleteSqlFirewallAllowedSqlsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "BulkDeleteSqlFirewallAllowedSqls", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallAllowedSql/BulkDeleteSqlFirewallAllowedSqls"); + java.util.function.Function< + javax.ws.rs.core.Response, BulkDeleteSqlFirewallAllowedSqlsResponse> + transformer = + BulkDeleteSqlFirewallAllowedSqlsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getBulkDeleteSqlFirewallAllowedSqlsDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public CalculateAuditVolumeAvailableResponse calculateAuditVolumeAvailable( CalculateAuditVolumeAvailableRequest request) { @@ -934,6 +1023,50 @@ public ChangeAlertCompartmentResponse changeAlertCompartment( }); } + @Override + public ChangeAlertPolicyCompartmentResponse changeAlertPolicyCompartment( + ChangeAlertPolicyCompartmentRequest request) { + LOG.trace("Called changeAlertPolicyCompartment"); + final ChangeAlertPolicyCompartmentRequest interceptedRequest = + ChangeAlertPolicyCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeAlertPolicyCompartmentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "ChangeAlertPolicyCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicy/ChangeAlertPolicyCompartment"); + java.util.function.Function + transformer = + ChangeAlertPolicyCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeAlertPolicyCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeAuditArchiveRetrievalCompartmentResponse changeAuditArchiveRetrievalCompartment( ChangeAuditArchiveRetrievalCompartmentRequest request) { @@ -2113,6 +2246,91 @@ public CompareUserAssessmentResponse compareUserAssessment( }); } + @Override + public CreateAlertPolicyResponse createAlertPolicy(CreateAlertPolicyRequest request) { + LOG.trace("Called createAlertPolicy"); + final CreateAlertPolicyRequest interceptedRequest = + CreateAlertPolicyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateAlertPolicyConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "CreateAlertPolicy", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicy/CreateAlertPolicy"); + java.util.function.Function + transformer = + CreateAlertPolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateAlertPolicyDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateAlertPolicyRuleResponse createAlertPolicyRule( + CreateAlertPolicyRuleRequest request) { + LOG.trace("Called createAlertPolicyRule"); + final CreateAlertPolicyRuleRequest interceptedRequest = + CreateAlertPolicyRuleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateAlertPolicyRuleConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "CreateAlertPolicyRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicyRule/CreateAlertPolicyRule"); + java.util.function.Function + transformer = + CreateAlertPolicyRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateAlertPolicyRuleDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public CreateAuditArchiveRetrievalResponse createAuditArchiveRetrieval( CreateAuditArchiveRetrievalRequest request) { @@ -2922,6 +3140,83 @@ public DeactivateTargetDatabaseResponse deactivateTargetDatabase( }); } + @Override + public DeleteAlertPolicyResponse deleteAlertPolicy(DeleteAlertPolicyRequest request) { + LOG.trace("Called deleteAlertPolicy"); + final DeleteAlertPolicyRequest interceptedRequest = + DeleteAlertPolicyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteAlertPolicyConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "DeleteAlertPolicy", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicy/DeleteAlertPolicy"); + java.util.function.Function + transformer = + DeleteAlertPolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteAlertPolicyRuleResponse deleteAlertPolicyRule( + DeleteAlertPolicyRuleRequest request) { + LOG.trace("Called deleteAlertPolicyRule"); + final DeleteAlertPolicyRuleRequest interceptedRequest = + DeleteAlertPolicyRuleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteAlertPolicyRuleConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "DeleteAlertPolicyRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicyRule/DeleteAlertPolicyRule"); + java.util.function.Function + transformer = + DeleteAlertPolicyRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DeleteAuditArchiveRetrievalResponse deleteAuditArchiveRetrieval( DeleteAuditArchiveRetrievalRequest request) { @@ -3621,6 +3916,45 @@ public DeleteSqlCollectionResponse deleteSqlCollection(DeleteSqlCollectionReques }); } + @Override + public DeleteSqlFirewallAllowedSqlResponse deleteSqlFirewallAllowedSql( + DeleteSqlFirewallAllowedSqlRequest request) { + LOG.trace("Called deleteSqlFirewallAllowedSql"); + final DeleteSqlFirewallAllowedSqlRequest interceptedRequest = + DeleteSqlFirewallAllowedSqlConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteSqlFirewallAllowedSqlConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "DeleteSqlFirewallAllowedSql", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallAllowedSql/DeleteSqlFirewallAllowedSql"); + java.util.function.Function + transformer = + DeleteSqlFirewallAllowedSqlConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DeleteSqlFirewallPolicyResponse deleteSqlFirewallPolicy( DeleteSqlFirewallPolicyRequest request) { @@ -4700,6 +5034,43 @@ public GetAlertPolicyResponse getAlertPolicy(GetAlertPolicyRequest request) { }); } + @Override + public GetAlertPolicyRuleResponse getAlertPolicyRule(GetAlertPolicyRuleRequest request) { + LOG.trace("Called getAlertPolicyRule"); + final GetAlertPolicyRuleRequest interceptedRequest = + GetAlertPolicyRuleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAlertPolicyRuleConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "GetAlertPolicyRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicyRule/GetAlertPolicyRule"); + java.util.function.Function + transformer = + GetAlertPolicyRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetAuditArchiveRetrievalResponse getAuditArchiveRetrieval( GetAuditArchiveRetrievalRequest request) { @@ -6046,6 +6417,44 @@ public GetSqlCollectionResponse getSqlCollection(GetSqlCollectionRequest request }); } + @Override + public GetSqlFirewallAllowedSqlResponse getSqlFirewallAllowedSql( + GetSqlFirewallAllowedSqlRequest request) { + LOG.trace("Called getSqlFirewallAllowedSql"); + final GetSqlFirewallAllowedSqlRequest interceptedRequest = + GetSqlFirewallAllowedSqlConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetSqlFirewallAllowedSqlConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "GetSqlFirewallAllowedSql", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallAllowedSql/GetSqlFirewallAllowedSql"); + java.util.function.Function + transformer = + GetSqlFirewallAllowedSqlConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetSqlFirewallPolicyResponse getSqlFirewallPolicy(GetSqlFirewallPolicyRequest request) { LOG.trace("Called getSqlFirewallPolicy"); @@ -8360,6 +8769,46 @@ public ListSensitiveColumnsResponse listSensitiveColumns(ListSensitiveColumnsReq }); } + @Override + public ListSensitiveDataModelSensitiveTypesResponse listSensitiveDataModelSensitiveTypes( + ListSensitiveDataModelSensitiveTypesRequest request) { + LOG.trace("Called listSensitiveDataModelSensitiveTypes"); + final ListSensitiveDataModelSensitiveTypesRequest interceptedRequest = + ListSensitiveDataModelSensitiveTypesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSensitiveDataModelSensitiveTypesConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "ListSensitiveDataModelSensitiveTypes", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveDataModelSensitiveTypeCollection/ListSensitiveDataModelSensitiveTypes"); + java.util.function.Function< + javax.ws.rs.core.Response, ListSensitiveDataModelSensitiveTypesResponse> + transformer = + ListSensitiveDataModelSensitiveTypesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListSensitiveDataModelsResponse listSensitiveDataModels( ListSensitiveDataModelsRequest request) { @@ -9511,6 +9960,49 @@ public PatchSensitiveColumnsResponse patchSensitiveColumns( }); } + @Override + public PatchSqlFirewallAllowedSqlResponse patchSqlFirewallAllowedSql( + PatchSqlFirewallAllowedSqlRequest request) { + LOG.trace("Called patchSqlFirewallAllowedSql"); + final PatchSqlFirewallAllowedSqlRequest interceptedRequest = + PatchSqlFirewallAllowedSqlConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PatchSqlFirewallAllowedSqlConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "PatchSqlFirewallAllowedSql", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallAllowedSql/PatchSqlFirewallAllowedSql"); + java.util.function.Function + transformer = + PatchSqlFirewallAllowedSqlConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.patch( + ib, + retriedRequest + .getPatchSqlFirewallAllowedSqlDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public PatchTargetAlertPolicyAssociationResponse patchTargetAlertPolicyAssociation( PatchTargetAlertPolicyAssociationRequest request) { @@ -10359,7 +10851,11 @@ public UnsetSecurityAssessmentBaselineResponse unsetSecurityAssessmentBaseline( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.post( + ib, + retriedRequest + .getUnsetSecurityAssessmentBaselineDetails(), + retriedRequest); return transformer.apply(response); }); }); @@ -10399,7 +10895,11 @@ public UnsetUserAssessmentBaselineResponse unsetUserAssessmentBaseline( retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + client.post( + ib, + retriedRequest + .getUnsetUserAssessmentBaselineDetails(), + retriedRequest); return transformer.apply(response); }); }); @@ -10444,6 +10944,89 @@ public UpdateAlertResponse updateAlert(UpdateAlertRequest request) { }); } + @Override + public UpdateAlertPolicyResponse updateAlertPolicy(UpdateAlertPolicyRequest request) { + LOG.trace("Called updateAlertPolicy"); + final UpdateAlertPolicyRequest interceptedRequest = + UpdateAlertPolicyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateAlertPolicyConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "UpdateAlertPolicy", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicy/UpdateAlertPolicy"); + java.util.function.Function + transformer = + UpdateAlertPolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateAlertPolicyDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateAlertPolicyRuleResponse updateAlertPolicyRule( + UpdateAlertPolicyRuleRequest request) { + LOG.trace("Called updateAlertPolicyRule"); + final UpdateAlertPolicyRuleRequest interceptedRequest = + UpdateAlertPolicyRuleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateAlertPolicyRuleConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataSafe", + "UpdateAlertPolicyRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicyRule/UpdateAlertPolicyRule"); + java.util.function.Function + transformer = + UpdateAlertPolicyRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateAlertPolicyRuleDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateAuditArchiveRetrievalResponse updateAuditArchiveRetrieval( UpdateAuditArchiveRetrievalRequest request) { diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafePaginators.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafePaginators.java index 3196734df76..5646726c30b 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafePaginators.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafePaginators.java @@ -6378,6 +6378,136 @@ public ListSensitiveColumnsResponse apply(ListSensitiveColumnsRequest request) { }); } + /** + * Creates a new iterable which will iterate over the responses received from the listSensitiveDataModelSensitiveTypes operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listSensitiveDataModelSensitiveTypesResponseIterator( + final ListSensitiveDataModelSensitiveTypesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListSensitiveDataModelSensitiveTypesRequest.Builder, + ListSensitiveDataModelSensitiveTypesRequest, + ListSensitiveDataModelSensitiveTypesResponse>( + new java.util.function.Supplier< + ListSensitiveDataModelSensitiveTypesRequest.Builder>() { + @Override + public ListSensitiveDataModelSensitiveTypesRequest.Builder get() { + return ListSensitiveDataModelSensitiveTypesRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListSensitiveDataModelSensitiveTypesResponse, String>() { + @Override + public String apply(ListSensitiveDataModelSensitiveTypesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSensitiveDataModelSensitiveTypesRequest.Builder>, + ListSensitiveDataModelSensitiveTypesRequest>() { + @Override + public ListSensitiveDataModelSensitiveTypesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSensitiveDataModelSensitiveTypesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSensitiveDataModelSensitiveTypesRequest, + ListSensitiveDataModelSensitiveTypesResponse>() { + @Override + public ListSensitiveDataModelSensitiveTypesResponse apply( + ListSensitiveDataModelSensitiveTypesRequest request) { + return client.listSensitiveDataModelSensitiveTypes(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.datasafe.model.SensitiveDataModelSensitiveTypeSummary} objects + * contained in responses from the listSensitiveDataModelSensitiveTypes operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.datasafe.model.SensitiveDataModelSensitiveTypeSummary} objects + * contained in responses received from the service. + */ + public Iterable + listSensitiveDataModelSensitiveTypesRecordIterator( + final ListSensitiveDataModelSensitiveTypesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListSensitiveDataModelSensitiveTypesRequest.Builder, + ListSensitiveDataModelSensitiveTypesRequest, + ListSensitiveDataModelSensitiveTypesResponse, + com.oracle.bmc.datasafe.model.SensitiveDataModelSensitiveTypeSummary>( + new java.util.function.Supplier< + ListSensitiveDataModelSensitiveTypesRequest.Builder>() { + @Override + public ListSensitiveDataModelSensitiveTypesRequest.Builder get() { + return ListSensitiveDataModelSensitiveTypesRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListSensitiveDataModelSensitiveTypesResponse, String>() { + @Override + public String apply(ListSensitiveDataModelSensitiveTypesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSensitiveDataModelSensitiveTypesRequest.Builder>, + ListSensitiveDataModelSensitiveTypesRequest>() { + @Override + public ListSensitiveDataModelSensitiveTypesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSensitiveDataModelSensitiveTypesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSensitiveDataModelSensitiveTypesRequest, + ListSensitiveDataModelSensitiveTypesResponse>() { + @Override + public ListSensitiveDataModelSensitiveTypesResponse apply( + ListSensitiveDataModelSensitiveTypesRequest request) { + return client.listSensitiveDataModelSensitiveTypes(request); + } + }, + new java.util.function.Function< + ListSensitiveDataModelSensitiveTypesResponse, + java.util.List< + com.oracle.bmc.datasafe.model + .SensitiveDataModelSensitiveTypeSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.datasafe.model + .SensitiveDataModelSensitiveTypeSummary> + apply(ListSensitiveDataModelSensitiveTypesResponse response) { + return response.getSensitiveDataModelSensitiveTypeCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listSensitiveDataModels operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeWaiters.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeWaiters.java index 70dd47c1530..b4f6850eb3d 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeWaiters.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/DataSafeWaiters.java @@ -221,6 +221,109 @@ public boolean test(GetAlertPolicyResponse response) { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetState the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forAlertPolicyRule( + GetAlertPolicyRuleRequest request, + com.oracle.bmc.datasafe.model.AlertPolicyRuleLifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forAlertPolicyRule( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forAlertPolicyRule( + GetAlertPolicyRuleRequest request, + com.oracle.bmc.datasafe.model.AlertPolicyRuleLifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forAlertPolicyRule( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forAlertPolicyRule( + GetAlertPolicyRuleRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.datasafe.model.AlertPolicyRuleLifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forAlertPolicyRule( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for AlertPolicyRule. + private com.oracle.bmc.waiter.Waiter + forAlertPolicyRule( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetAlertPolicyRuleRequest request, + final com.oracle.bmc.datasafe.model.AlertPolicyRuleLifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetAlertPolicyRuleRequest, GetAlertPolicyRuleResponse>() { + @Override + public GetAlertPolicyRuleResponse apply( + GetAlertPolicyRuleRequest request) { + return client.getAlertPolicyRule(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetAlertPolicyRuleResponse response) { + return targetStatesSet.contains( + response.getAlertPolicyRule().getLifecycleState()); + } + }, + false), + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * @@ -3078,6 +3181,118 @@ public boolean test(GetSqlCollectionResponse response) { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetState the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetSqlFirewallAllowedSqlRequest, GetSqlFirewallAllowedSqlResponse> + forSqlFirewallAllowedSql( + GetSqlFirewallAllowedSqlRequest request, + com.oracle.bmc.datasafe.model.SqlFirewallAllowedSqlLifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forSqlFirewallAllowedSql( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetSqlFirewallAllowedSqlRequest, GetSqlFirewallAllowedSqlResponse> + forSqlFirewallAllowedSql( + GetSqlFirewallAllowedSqlRequest request, + com.oracle.bmc.datasafe.model.SqlFirewallAllowedSqlLifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forSqlFirewallAllowedSql( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetSqlFirewallAllowedSqlRequest, GetSqlFirewallAllowedSqlResponse> + forSqlFirewallAllowedSql( + GetSqlFirewallAllowedSqlRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.datasafe.model.SqlFirewallAllowedSqlLifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forSqlFirewallAllowedSql( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for SqlFirewallAllowedSql. + private com.oracle.bmc.waiter.Waiter< + GetSqlFirewallAllowedSqlRequest, GetSqlFirewallAllowedSqlResponse> + forSqlFirewallAllowedSql( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetSqlFirewallAllowedSqlRequest request, + final com.oracle.bmc.datasafe.model.SqlFirewallAllowedSqlLifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetSqlFirewallAllowedSqlRequest, + GetSqlFirewallAllowedSqlResponse>() { + @Override + public GetSqlFirewallAllowedSqlResponse apply( + GetSqlFirewallAllowedSqlRequest request) { + return client.getSqlFirewallAllowedSql(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetSqlFirewallAllowedSqlResponse response) { + return targetStatesSet.contains( + response.getSqlFirewallAllowedSql().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.datasafe.model.SqlFirewallAllowedSqlLifecycleState + .Deleted)), + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/BulkCreateSqlFirewallAllowedSqlsConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/BulkCreateSqlFirewallAllowedSqlsConverter.java new file mode 100644 index 00000000000..0bdbe65831a --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/BulkCreateSqlFirewallAllowedSqlsConverter.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class BulkCreateSqlFirewallAllowedSqlsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(BulkCreateSqlFirewallAllowedSqlsConverter.class); + + public static com.oracle.bmc.datasafe.requests.BulkCreateSqlFirewallAllowedSqlsRequest + interceptRequest( + com.oracle.bmc.datasafe.requests.BulkCreateSqlFirewallAllowedSqlsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.BulkCreateSqlFirewallAllowedSqlsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getBulkCreateSqlFirewallAllowedSqlsDetails(), + "bulkCreateSqlFirewallAllowedSqlsDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181201") + .path("sqlFirewallAllowedSqls") + .path("actions") + .path("bulkCreate"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.BulkCreateSqlFirewallAllowedSqlsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.BulkCreateSqlFirewallAllowedSqlsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.BulkCreateSqlFirewallAllowedSqlsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses + .BulkCreateSqlFirewallAllowedSqlsResponse>() { + @Override + public com.oracle.bmc.datasafe.responses + .BulkCreateSqlFirewallAllowedSqlsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.BulkCreateSqlFirewallAllowedSqlsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datasafe.responses + .BulkCreateSqlFirewallAllowedSqlsResponse.Builder + builder = + com.oracle.bmc.datasafe.responses + .BulkCreateSqlFirewallAllowedSqlsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.datasafe.responses + .BulkCreateSqlFirewallAllowedSqlsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/BulkDeleteSqlFirewallAllowedSqlsConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/BulkDeleteSqlFirewallAllowedSqlsConverter.java new file mode 100644 index 00000000000..914081d5f09 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/BulkDeleteSqlFirewallAllowedSqlsConverter.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class BulkDeleteSqlFirewallAllowedSqlsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(BulkDeleteSqlFirewallAllowedSqlsConverter.class); + + public static com.oracle.bmc.datasafe.requests.BulkDeleteSqlFirewallAllowedSqlsRequest + interceptRequest( + com.oracle.bmc.datasafe.requests.BulkDeleteSqlFirewallAllowedSqlsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.BulkDeleteSqlFirewallAllowedSqlsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getBulkDeleteSqlFirewallAllowedSqlsDetails(), + "bulkDeleteSqlFirewallAllowedSqlsDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181201") + .path("sqlFirewallAllowedSqls") + .path("actions") + .path("bulkDelete"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.BulkDeleteSqlFirewallAllowedSqlsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.BulkDeleteSqlFirewallAllowedSqlsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.BulkDeleteSqlFirewallAllowedSqlsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses + .BulkDeleteSqlFirewallAllowedSqlsResponse>() { + @Override + public com.oracle.bmc.datasafe.responses + .BulkDeleteSqlFirewallAllowedSqlsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.BulkDeleteSqlFirewallAllowedSqlsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datasafe.responses + .BulkDeleteSqlFirewallAllowedSqlsResponse.Builder + builder = + com.oracle.bmc.datasafe.responses + .BulkDeleteSqlFirewallAllowedSqlsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.datasafe.responses + .BulkDeleteSqlFirewallAllowedSqlsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ChangeAlertPolicyCompartmentConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ChangeAlertPolicyCompartmentConverter.java new file mode 100644 index 00000000000..c3510612dd5 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ChangeAlertPolicyCompartmentConverter.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ChangeAlertPolicyCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ChangeAlertPolicyCompartmentConverter.class); + + public static com.oracle.bmc.datasafe.requests.ChangeAlertPolicyCompartmentRequest + interceptRequest( + com.oracle.bmc.datasafe.requests.ChangeAlertPolicyCompartmentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.ChangeAlertPolicyCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAlertPolicyId(), "alertPolicyId must not be blank"); + Validate.notNull( + request.getChangeAlertPolicyCompartmentDetails(), + "changeAlertPolicyCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181201") + .path("alertPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAlertPolicyId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.ChangeAlertPolicyCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.ChangeAlertPolicyCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.ChangeAlertPolicyCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses + .ChangeAlertPolicyCompartmentResponse>() { + @Override + public com.oracle.bmc.datasafe.responses + .ChangeAlertPolicyCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.ChangeAlertPolicyCompartmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datasafe.responses + .ChangeAlertPolicyCompartmentResponse.Builder + builder = + com.oracle.bmc.datasafe.responses + .ChangeAlertPolicyCompartmentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.datasafe.responses + .ChangeAlertPolicyCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/CreateAlertPolicyConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/CreateAlertPolicyConverter.java new file mode 100644 index 00000000000..863807a4652 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/CreateAlertPolicyConverter.java @@ -0,0 +1,162 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class CreateAlertPolicyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateAlertPolicyConverter.class); + + public static com.oracle.bmc.datasafe.requests.CreateAlertPolicyRequest interceptRequest( + com.oracle.bmc.datasafe.requests.CreateAlertPolicyRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.CreateAlertPolicyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateAlertPolicyDetails(), "createAlertPolicyDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20181201").path("alertPolicies"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.CreateAlertPolicyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.CreateAlertPolicyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.CreateAlertPolicyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.CreateAlertPolicyResponse>() { + @Override + public com.oracle.bmc.datasafe.responses.CreateAlertPolicyResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.CreateAlertPolicyResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model.AlertPolicy>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model.AlertPolicy.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model.AlertPolicy + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model.AlertPolicy> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datasafe.responses.CreateAlertPolicyResponse.Builder + builder = + com.oracle.bmc.datasafe.responses + .CreateAlertPolicyResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.alertPolicy(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.datasafe.responses.CreateAlertPolicyResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/CreateAlertPolicyRuleConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/CreateAlertPolicyRuleConverter.java new file mode 100644 index 00000000000..a4a615adcb9 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/CreateAlertPolicyRuleConverter.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class CreateAlertPolicyRuleConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateAlertPolicyRuleConverter.class); + + public static com.oracle.bmc.datasafe.requests.CreateAlertPolicyRuleRequest interceptRequest( + com.oracle.bmc.datasafe.requests.CreateAlertPolicyRuleRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.CreateAlertPolicyRuleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateAlertPolicyRuleDetails(), + "createAlertPolicyRuleDetails is required"); + Validate.notBlank(request.getAlertPolicyId(), "alertPolicyId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181201") + .path("alertPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAlertPolicyId())) + .path("rules"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.CreateAlertPolicyRuleResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.CreateAlertPolicyRuleResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.CreateAlertPolicyRuleResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.CreateAlertPolicyRuleResponse>() { + @Override + public com.oracle.bmc.datasafe.responses.CreateAlertPolicyRuleResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.CreateAlertPolicyRuleResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model + .AlertPolicyRule>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model.AlertPolicyRule + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model.AlertPolicyRule + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model.AlertPolicyRule> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datasafe.responses.CreateAlertPolicyRuleResponse + .Builder + builder = + com.oracle.bmc.datasafe.responses + .CreateAlertPolicyRuleResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.alertPolicyRule(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.datasafe.responses.CreateAlertPolicyRuleResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/DeleteAlertPolicyConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/DeleteAlertPolicyConverter.java new file mode 100644 index 00000000000..1341e50c4d4 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/DeleteAlertPolicyConverter.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class DeleteAlertPolicyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteAlertPolicyConverter.class); + + public static com.oracle.bmc.datasafe.requests.DeleteAlertPolicyRequest interceptRequest( + com.oracle.bmc.datasafe.requests.DeleteAlertPolicyRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.DeleteAlertPolicyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAlertPolicyId(), "alertPolicyId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181201") + .path("alertPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAlertPolicyId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.DeleteAlertPolicyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.DeleteAlertPolicyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.DeleteAlertPolicyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.DeleteAlertPolicyResponse>() { + @Override + public com.oracle.bmc.datasafe.responses.DeleteAlertPolicyResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.DeleteAlertPolicyResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datasafe.responses.DeleteAlertPolicyResponse.Builder + builder = + com.oracle.bmc.datasafe.responses + .DeleteAlertPolicyResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.datasafe.responses.DeleteAlertPolicyResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/DeleteAlertPolicyRuleConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/DeleteAlertPolicyRuleConverter.java new file mode 100644 index 00000000000..7e84359ac0b --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/DeleteAlertPolicyRuleConverter.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class DeleteAlertPolicyRuleConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteAlertPolicyRuleConverter.class); + + public static com.oracle.bmc.datasafe.requests.DeleteAlertPolicyRuleRequest interceptRequest( + com.oracle.bmc.datasafe.requests.DeleteAlertPolicyRuleRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.DeleteAlertPolicyRuleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAlertPolicyId(), "alertPolicyId must not be blank"); + Validate.notBlank(request.getRuleKey(), "ruleKey must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181201") + .path("alertPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAlertPolicyId())) + .path("rules") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRuleKey())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.DeleteAlertPolicyRuleResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.DeleteAlertPolicyRuleResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.DeleteAlertPolicyRuleResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.DeleteAlertPolicyRuleResponse>() { + @Override + public com.oracle.bmc.datasafe.responses.DeleteAlertPolicyRuleResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.DeleteAlertPolicyRuleResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datasafe.responses.DeleteAlertPolicyRuleResponse + .Builder + builder = + com.oracle.bmc.datasafe.responses + .DeleteAlertPolicyRuleResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.datasafe.responses.DeleteAlertPolicyRuleResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/DeleteSqlFirewallAllowedSqlConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/DeleteSqlFirewallAllowedSqlConverter.java new file mode 100644 index 00000000000..2d45d930294 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/DeleteSqlFirewallAllowedSqlConverter.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class DeleteSqlFirewallAllowedSqlConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteSqlFirewallAllowedSqlConverter.class); + + public static com.oracle.bmc.datasafe.requests.DeleteSqlFirewallAllowedSqlRequest + interceptRequest( + com.oracle.bmc.datasafe.requests.DeleteSqlFirewallAllowedSqlRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.DeleteSqlFirewallAllowedSqlRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSqlFirewallAllowedSqlId(), "sqlFirewallAllowedSqlId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181201") + .path("sqlFirewallAllowedSqls") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSqlFirewallAllowedSqlId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.DeleteSqlFirewallAllowedSqlResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.DeleteSqlFirewallAllowedSqlResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.DeleteSqlFirewallAllowedSqlResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses + .DeleteSqlFirewallAllowedSqlResponse>() { + @Override + public com.oracle.bmc.datasafe.responses + .DeleteSqlFirewallAllowedSqlResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.DeleteSqlFirewallAllowedSqlResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datasafe.responses + .DeleteSqlFirewallAllowedSqlResponse.Builder + builder = + com.oracle.bmc.datasafe.responses + .DeleteSqlFirewallAllowedSqlResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.datasafe.responses + .DeleteSqlFirewallAllowedSqlResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/GetAlertPolicyRuleConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/GetAlertPolicyRuleConverter.java new file mode 100644 index 00000000000..f8dd24a3d0a --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/GetAlertPolicyRuleConverter.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class GetAlertPolicyRuleConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetAlertPolicyRuleConverter.class); + + public static com.oracle.bmc.datasafe.requests.GetAlertPolicyRuleRequest interceptRequest( + com.oracle.bmc.datasafe.requests.GetAlertPolicyRuleRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.GetAlertPolicyRuleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAlertPolicyId(), "alertPolicyId must not be blank"); + Validate.notBlank(request.getRuleKey(), "ruleKey must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181201") + .path("alertPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAlertPolicyId())) + .path("rules") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRuleKey())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.GetAlertPolicyRuleResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.GetAlertPolicyRuleResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.GetAlertPolicyRuleResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.GetAlertPolicyRuleResponse>() { + @Override + public com.oracle.bmc.datasafe.responses.GetAlertPolicyRuleResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.GetAlertPolicyRuleResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model + .AlertPolicyRule>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model.AlertPolicyRule + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model.AlertPolicyRule + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model.AlertPolicyRule> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datasafe.responses.GetAlertPolicyRuleResponse.Builder + builder = + com.oracle.bmc.datasafe.responses + .GetAlertPolicyRuleResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.alertPolicyRule(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.datasafe.responses.GetAlertPolicyRuleResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/GetSqlFirewallAllowedSqlConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/GetSqlFirewallAllowedSqlConverter.java new file mode 100644 index 00000000000..d59fa657f8b --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/GetSqlFirewallAllowedSqlConverter.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class GetSqlFirewallAllowedSqlConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetSqlFirewallAllowedSqlConverter.class); + + public static com.oracle.bmc.datasafe.requests.GetSqlFirewallAllowedSqlRequest interceptRequest( + com.oracle.bmc.datasafe.requests.GetSqlFirewallAllowedSqlRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.GetSqlFirewallAllowedSqlRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSqlFirewallAllowedSqlId(), "sqlFirewallAllowedSqlId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181201") + .path("sqlFirewallAllowedSqls") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSqlFirewallAllowedSqlId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.GetSqlFirewallAllowedSqlResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.GetSqlFirewallAllowedSqlResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.GetSqlFirewallAllowedSqlResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses + .GetSqlFirewallAllowedSqlResponse>() { + @Override + public com.oracle.bmc.datasafe.responses + .GetSqlFirewallAllowedSqlResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.GetSqlFirewallAllowedSqlResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model + .SqlFirewallAllowedSql>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model + .SqlFirewallAllowedSql + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model + .SqlFirewallAllowedSql + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model.SqlFirewallAllowedSql> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datasafe.responses.GetSqlFirewallAllowedSqlResponse + .Builder + builder = + com.oracle.bmc.datasafe.responses + .GetSqlFirewallAllowedSqlResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.sqlFirewallAllowedSql(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.datasafe.responses.GetSqlFirewallAllowedSqlResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListFindingsConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListFindingsConverter.java index cd261cd3803..afd3e159af3 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListFindingsConverter.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListFindingsConverter.java @@ -105,6 +105,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getAccessLevel().getValue())); } + if (request.getTargetId() != null) { + target = + target.queryParam( + "targetId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTargetId())); + } + if (request.getFindingKey() != null) { target = target.queryParam( diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListReportsConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListReportsConverter.java index 0a2be6feeed..a3576b48d85 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListReportsConverter.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListReportsConverter.java @@ -96,6 +96,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getSortBy().getValue())); } + if (request.getMimeType() != null) { + target = + target.queryParam( + "mimeType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getMimeType().getValue())); + } + if (request.getReportDefinitionId() != null) { target = target.queryParam( @@ -104,6 +112,22 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getReportDefinitionId())); } + if (request.getTimeGeneratedGreaterThanOrEqualTo() != null) { + target = + target.queryParam( + "timeGeneratedGreaterThanOrEqualTo", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeGeneratedGreaterThanOrEqualTo())); + } + + if (request.getTimeGeneratedLessThan() != null) { + target = + target.queryParam( + "timeGeneratedLessThan", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeGeneratedLessThan())); + } + if (request.getLifecycleState() != null) { target = target.queryParam( diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListSensitiveDataModelSensitiveTypesConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListSensitiveDataModelSensitiveTypesConverter.java new file mode 100644 index 00000000000..df213781eff --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/ListSensitiveDataModelSensitiveTypesConverter.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ListSensitiveDataModelSensitiveTypesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListSensitiveDataModelSensitiveTypesConverter.class); + + public static com.oracle.bmc.datasafe.requests.ListSensitiveDataModelSensitiveTypesRequest + interceptRequest( + com.oracle.bmc.datasafe.requests.ListSensitiveDataModelSensitiveTypesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.ListSensitiveDataModelSensitiveTypesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSensitiveDataModelId(), "sensitiveDataModelId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181201") + .path("sensitiveDataModels") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSensitiveDataModelId())) + .path("sensitiveTypes"); + + if (request.getSensitiveTypeId() != null) { + target = + target.queryParam( + "sensitiveTypeId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSensitiveTypeId())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.ListSensitiveDataModelSensitiveTypesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.ListSensitiveDataModelSensitiveTypesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses + .ListSensitiveDataModelSensitiveTypesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses + .ListSensitiveDataModelSensitiveTypesResponse>() { + @Override + public com.oracle.bmc.datasafe.responses + .ListSensitiveDataModelSensitiveTypesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.ListSensitiveDataModelSensitiveTypesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model + .SensitiveDataModelSensitiveTypeCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model + .SensitiveDataModelSensitiveTypeCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.datasafe.model + .SensitiveDataModelSensitiveTypeCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.datasafe.model + .SensitiveDataModelSensitiveTypeCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datasafe.responses + .ListSensitiveDataModelSensitiveTypesResponse + .Builder + builder = + com.oracle.bmc.datasafe.responses + .ListSensitiveDataModelSensitiveTypesResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.sensitiveDataModelSensitiveTypeCollection( + response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcPrevPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-prev-page"); + if (opcPrevPageHeader.isPresent()) { + builder.opcPrevPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-prev-page", + opcPrevPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.datasafe.responses + .ListSensitiveDataModelSensitiveTypesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/PatchSqlFirewallAllowedSqlConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/PatchSqlFirewallAllowedSqlConverter.java new file mode 100644 index 00000000000..6d96c9ad279 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/PatchSqlFirewallAllowedSqlConverter.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class PatchSqlFirewallAllowedSqlConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PatchSqlFirewallAllowedSqlConverter.class); + + public static com.oracle.bmc.datasafe.requests.PatchSqlFirewallAllowedSqlRequest + interceptRequest( + com.oracle.bmc.datasafe.requests.PatchSqlFirewallAllowedSqlRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.PatchSqlFirewallAllowedSqlRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getPatchSqlFirewallAllowedSqlDetails(), + "patchSqlFirewallAllowedSqlDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20181201").path("sqlFirewallAllowedSqls"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.PatchSqlFirewallAllowedSqlResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.PatchSqlFirewallAllowedSqlResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.PatchSqlFirewallAllowedSqlResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses + .PatchSqlFirewallAllowedSqlResponse>() { + @Override + public com.oracle.bmc.datasafe.responses + .PatchSqlFirewallAllowedSqlResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.PatchSqlFirewallAllowedSqlResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datasafe.responses.PatchSqlFirewallAllowedSqlResponse + .Builder + builder = + com.oracle.bmc.datasafe.responses + .PatchSqlFirewallAllowedSqlResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.datasafe.responses.PatchSqlFirewallAllowedSqlResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/UpdateAlertPolicyConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/UpdateAlertPolicyConverter.java new file mode 100644 index 00000000000..cd7651f61c8 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/UpdateAlertPolicyConverter.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class UpdateAlertPolicyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateAlertPolicyConverter.class); + + public static com.oracle.bmc.datasafe.requests.UpdateAlertPolicyRequest interceptRequest( + com.oracle.bmc.datasafe.requests.UpdateAlertPolicyRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.UpdateAlertPolicyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAlertPolicyId(), "alertPolicyId must not be blank"); + Validate.notNull( + request.getUpdateAlertPolicyDetails(), "updateAlertPolicyDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181201") + .path("alertPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAlertPolicyId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.UpdateAlertPolicyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.UpdateAlertPolicyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.UpdateAlertPolicyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.UpdateAlertPolicyResponse>() { + @Override + public com.oracle.bmc.datasafe.responses.UpdateAlertPolicyResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.UpdateAlertPolicyResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datasafe.responses.UpdateAlertPolicyResponse.Builder + builder = + com.oracle.bmc.datasafe.responses + .UpdateAlertPolicyResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.datasafe.responses.UpdateAlertPolicyResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/UpdateAlertPolicyRuleConverter.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/UpdateAlertPolicyRuleConverter.java new file mode 100644 index 00000000000..cab3adc18ac --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/internal/http/UpdateAlertPolicyRuleConverter.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datasafe.model.*; +import com.oracle.bmc.datasafe.requests.*; +import com.oracle.bmc.datasafe.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class UpdateAlertPolicyRuleConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateAlertPolicyRuleConverter.class); + + public static com.oracle.bmc.datasafe.requests.UpdateAlertPolicyRuleRequest interceptRequest( + com.oracle.bmc.datasafe.requests.UpdateAlertPolicyRuleRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datasafe.requests.UpdateAlertPolicyRuleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAlertPolicyId(), "alertPolicyId must not be blank"); + Validate.notBlank(request.getRuleKey(), "ruleKey must not be blank"); + Validate.notNull( + request.getUpdateAlertPolicyRuleDetails(), + "updateAlertPolicyRuleDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181201") + .path("alertPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAlertPolicyId())) + .path("rules") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRuleKey())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.UpdateAlertPolicyRuleResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.UpdateAlertPolicyRuleResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.UpdateAlertPolicyRuleResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datasafe.responses.UpdateAlertPolicyRuleResponse>() { + @Override + public com.oracle.bmc.datasafe.responses.UpdateAlertPolicyRuleResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datasafe.responses.UpdateAlertPolicyRuleResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datasafe.responses.UpdateAlertPolicyRuleResponse + .Builder + builder = + com.oracle.bmc.datasafe.responses + .UpdateAlertPolicyRuleResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.datasafe.responses.UpdateAlertPolicyRuleResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/Alert.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/Alert.java index 2d357f450bd..2a532a259a4 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/Alert.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/Alert.java @@ -39,6 +39,8 @@ public final class Alert extends com.oracle.bmc.http.internal.ExplicitlySetBmcMo "lifecycleState", "timeCreated", "timeUpdated", + "alertPolicyRuleKey", + "alertPolicyRuleName", "freeformTags", "definedTags", "systemTags" @@ -63,6 +65,8 @@ public Alert( AlertLifecycleState lifecycleState, java.util.Date timeCreated, java.util.Date timeUpdated, + String alertPolicyRuleKey, + String alertPolicyRuleName, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags) { @@ -86,6 +90,8 @@ public Alert( this.lifecycleState = lifecycleState; this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; + this.alertPolicyRuleKey = alertPolicyRuleKey; + this.alertPolicyRuleName = alertPolicyRuleName; this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; @@ -402,6 +408,38 @@ public Builder timeUpdated(java.util.Date timeUpdated) { this.__explicitlySet__.add("timeUpdated"); return this; } + /** + * The key of the rule of alert policy that triggered alert. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alertPolicyRuleKey") + private String alertPolicyRuleKey; + + /** + * The key of the rule of alert policy that triggered alert. + * @param alertPolicyRuleKey the value to set + * @return this builder + **/ + public Builder alertPolicyRuleKey(String alertPolicyRuleKey) { + this.alertPolicyRuleKey = alertPolicyRuleKey; + this.__explicitlySet__.add("alertPolicyRuleKey"); + return this; + } + /** + * The display name of the rule of alert policy that triggered alert. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alertPolicyRuleName") + private String alertPolicyRuleName; + + /** + * The display name of the rule of alert policy that triggered alert. + * @param alertPolicyRuleName the value to set + * @return this builder + **/ + public Builder alertPolicyRuleName(String alertPolicyRuleName) { + this.alertPolicyRuleName = alertPolicyRuleName; + this.__explicitlySet__.add("alertPolicyRuleName"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) *

@@ -493,6 +531,8 @@ public Alert build() { this.lifecycleState, this.timeCreated, this.timeUpdated, + this.alertPolicyRuleKey, + this.alertPolicyRuleName, this.freeformTags, this.definedTags, this.systemTags); @@ -561,6 +601,12 @@ public Builder copy(Alert model) { if (model.wasPropertyExplicitlySet("timeUpdated")) { this.timeUpdated(model.getTimeUpdated()); } + if (model.wasPropertyExplicitlySet("alertPolicyRuleKey")) { + this.alertPolicyRuleKey(model.getAlertPolicyRuleKey()); + } + if (model.wasPropertyExplicitlySet("alertPolicyRuleName")) { + this.alertPolicyRuleName(model.getAlertPolicyRuleName()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -903,6 +949,34 @@ public java.util.Date getTimeUpdated() { return timeUpdated; } + /** + * The key of the rule of alert policy that triggered alert. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alertPolicyRuleKey") + private final String alertPolicyRuleKey; + + /** + * The key of the rule of alert policy that triggered alert. + * @return the value + **/ + public String getAlertPolicyRuleKey() { + return alertPolicyRuleKey; + } + + /** + * The display name of the rule of alert policy that triggered alert. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alertPolicyRuleName") + private final String alertPolicyRuleName; + + /** + * The display name of the rule of alert policy that triggered alert. + * @return the value + **/ + public String getAlertPolicyRuleName() { + return alertPolicyRuleName; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) *

@@ -994,6 +1068,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", alertPolicyRuleKey=").append(String.valueOf(this.alertPolicyRuleKey)); + sb.append(", alertPolicyRuleName=").append(String.valueOf(this.alertPolicyRuleName)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); @@ -1030,6 +1106,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.alertPolicyRuleKey, other.alertPolicyRuleKey) + && java.util.Objects.equals(this.alertPolicyRuleName, other.alertPolicyRuleName) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) @@ -1069,6 +1147,16 @@ public int hashCode() { + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.alertPolicyRuleKey == null + ? 43 + : this.alertPolicyRuleKey.hashCode()); + result = + (result * PRIME) + + (this.alertPolicyRuleName == null + ? 43 + : this.alertPolicyRuleName.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertPolicy.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertPolicy.java index 1c1ff663b4f..3e9e33eee0d 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertPolicy.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertPolicy.java @@ -33,6 +33,7 @@ public final class AlertPolicy extends com.oracle.bmc.http.internal.ExplicitlySe "timeCreated", "timeUpdated", "lifecycleState", + "lifecycleDetails", "freeformTags", "definedTags", "systemTags" @@ -48,6 +49,7 @@ public AlertPolicy( java.util.Date timeCreated, java.util.Date timeUpdated, AlertPolicyLifecycleState lifecycleState, + String lifecycleDetails, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags) { @@ -62,6 +64,7 @@ public AlertPolicy( this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; @@ -229,6 +232,22 @@ public Builder lifecycleState(AlertPolicyLifecycleState lifecycleState) { this.__explicitlySet__.add("lifecycleState"); return this; } + /** + * Details about the current state of the alert policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Details about the current state of the alert policy. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) *

@@ -311,6 +330,7 @@ public AlertPolicy build() { this.timeCreated, this.timeUpdated, this.lifecycleState, + this.lifecycleDetails, this.freeformTags, this.definedTags, this.systemTags); @@ -352,6 +372,9 @@ public Builder copy(AlertPolicy model) { if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -516,6 +539,20 @@ public AlertPolicyLifecycleState getLifecycleState() { return lifecycleState; } + /** + * Details about the current state of the alert policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Details about the current state of the alert policy. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) *

@@ -598,6 +635,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); @@ -625,6 +663,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) @@ -653,6 +692,9 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertPolicyRule.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertPolicyRule.java index 7d86f32f75b..82980b6aa1a 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertPolicyRule.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertPolicyRule.java @@ -19,12 +19,28 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class AlertPolicyRule extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"key", "description", "expression"}) - public AlertPolicyRule(String key, String description, String expression) { + @java.beans.ConstructorProperties({ + "key", + "description", + "expression", + "lifecycleState", + "displayName", + "timeCreated" + }) + public AlertPolicyRule( + String key, + String description, + String expression, + AlertPolicyRuleLifecycleState lifecycleState, + String displayName, + java.util.Date timeCreated) { super(); this.key = key; this.description = description; this.expression = expression; + this.lifecycleState = lifecycleState; + this.displayName = displayName; + this.timeCreated = timeCreated; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -77,13 +93,67 @@ public Builder expression(String expression) { this.__explicitlySet__.add("expression"); return this; } + /** + * The current state of the alert policy rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private AlertPolicyRuleLifecycleState lifecycleState; + + /** + * The current state of the alert policy rule. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(AlertPolicyRuleLifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The display name of the alert policy rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the alert policy rule. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Creation date and time of the alert policy rule, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Creation date and time of the alert policy rule, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public AlertPolicyRule build() { AlertPolicyRule model = - new AlertPolicyRule(this.key, this.description, this.expression); + new AlertPolicyRule( + this.key, + this.description, + this.expression, + this.lifecycleState, + this.displayName, + this.timeCreated); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -101,6 +171,15 @@ public Builder copy(AlertPolicyRule model) { if (model.wasPropertyExplicitlySet("expression")) { this.expression(model.getExpression()); } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } return this; } } @@ -158,6 +237,48 @@ public String getExpression() { return expression; } + /** + * The current state of the alert policy rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final AlertPolicyRuleLifecycleState lifecycleState; + + /** + * The current state of the alert policy rule. + * @return the value + **/ + public AlertPolicyRuleLifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The display name of the alert policy rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the alert policy rule. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Creation date and time of the alert policy rule, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Creation date and time of the alert policy rule, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + @Override public String toString() { return this.toString(true); @@ -175,6 +296,9 @@ public String toString(boolean includeByteArrayContents) { sb.append("key=").append(String.valueOf(this.key)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", expression=").append(String.valueOf(this.expression)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(")"); return sb.toString(); } @@ -192,6 +316,9 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.key, other.key) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.expression, other.expression) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) && super.equals(other); } @@ -202,6 +329,11 @@ public int hashCode() { result = (result * PRIME) + (this.key == null ? 43 : this.key.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); result = (result * PRIME) + (this.expression == null ? 43 : this.expression.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertPolicyRuleLifecycleState.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertPolicyRuleLifecycleState.java new file mode 100644 index 00000000000..6d6b7c79d0e --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertPolicyRuleLifecycleState.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * The current state of the alert policy rule resource. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public enum AlertPolicyRuleLifecycleState { + Creating("CREATING"), + Updating("UPDATING"), + Active("ACTIVE"), + Deleting("DELETING"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(AlertPolicyRuleLifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (AlertPolicyRuleLifecycleState v : AlertPolicyRuleLifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + AlertPolicyRuleLifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AlertPolicyRuleLifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'AlertPolicyRuleLifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertPolicyRuleSummary.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertPolicyRuleSummary.java index 97cf9ef7906..6ce9443e328 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertPolicyRuleSummary.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertPolicyRuleSummary.java @@ -22,12 +22,28 @@ public final class AlertPolicyRuleSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"key", "description", "expression"}) - public AlertPolicyRuleSummary(String key, String description, String expression) { + @java.beans.ConstructorProperties({ + "key", + "description", + "expression", + "lifecycleState", + "displayName", + "timeCreated" + }) + public AlertPolicyRuleSummary( + String key, + String description, + String expression, + AlertPolicyRuleLifecycleState lifecycleState, + String displayName, + java.util.Date timeCreated) { super(); this.key = key; this.description = description; this.expression = expression; + this.lifecycleState = lifecycleState; + this.displayName = displayName; + this.timeCreated = timeCreated; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -80,13 +96,67 @@ public Builder expression(String expression) { this.__explicitlySet__.add("expression"); return this; } + /** + * The current state of the alert policy rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private AlertPolicyRuleLifecycleState lifecycleState; + + /** + * The current state of the alert policy rule. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(AlertPolicyRuleLifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The display name of the alert policy rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the alert policy rule. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Creation date and time of the alert policy rule, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Creation date and time of the alert policy rule, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public AlertPolicyRuleSummary build() { AlertPolicyRuleSummary model = - new AlertPolicyRuleSummary(this.key, this.description, this.expression); + new AlertPolicyRuleSummary( + this.key, + this.description, + this.expression, + this.lifecycleState, + this.displayName, + this.timeCreated); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -104,6 +174,15 @@ public Builder copy(AlertPolicyRuleSummary model) { if (model.wasPropertyExplicitlySet("expression")) { this.expression(model.getExpression()); } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } return this; } } @@ -161,6 +240,48 @@ public String getExpression() { return expression; } + /** + * The current state of the alert policy rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final AlertPolicyRuleLifecycleState lifecycleState; + + /** + * The current state of the alert policy rule. + * @return the value + **/ + public AlertPolicyRuleLifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The display name of the alert policy rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the alert policy rule. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Creation date and time of the alert policy rule, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Creation date and time of the alert policy rule, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + @Override public String toString() { return this.toString(true); @@ -178,6 +299,9 @@ public String toString(boolean includeByteArrayContents) { sb.append("key=").append(String.valueOf(this.key)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", expression=").append(String.valueOf(this.expression)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(")"); return sb.toString(); } @@ -195,6 +319,9 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.key, other.key) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.expression, other.expression) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) && super.equals(other); } @@ -205,6 +332,11 @@ public int hashCode() { result = (result * PRIME) + (this.key == null ? 43 : this.key.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); result = (result * PRIME) + (this.expression == null ? 43 : this.expression.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertPolicySummary.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertPolicySummary.java index 55a4961956b..4670d9106fa 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertPolicySummary.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertPolicySummary.java @@ -32,6 +32,7 @@ public final class AlertPolicySummary extends com.oracle.bmc.http.internal.Expli "timeCreated", "timeUpdated", "lifecycleState", + "lifecycleDetails", "freeformTags", "definedTags" }) @@ -46,6 +47,7 @@ public AlertPolicySummary( java.util.Date timeCreated, java.util.Date timeUpdated, AlertPolicyLifecycleState lifecycleState, + String lifecycleDetails, java.util.Map freeformTags, java.util.Map> definedTags) { super(); @@ -59,6 +61,7 @@ public AlertPolicySummary( this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -225,6 +228,22 @@ public Builder lifecycleState(AlertPolicyLifecycleState lifecycleState) { this.__explicitlySet__.add("lifecycleState"); return this; } + /** + * Details about the current state of the alert policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Details about the current state of the alert policy. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) *

@@ -287,6 +306,7 @@ public AlertPolicySummary build() { this.timeCreated, this.timeUpdated, this.lifecycleState, + this.lifecycleDetails, this.freeformTags, this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -327,6 +347,9 @@ public Builder copy(AlertPolicySummary model) { if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -488,6 +511,20 @@ public AlertPolicyLifecycleState getLifecycleState() { return lifecycleState; } + /** + * Details about the current state of the alert policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Details about the current state of the alert policy. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) *

@@ -552,6 +589,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -578,6 +616,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -605,6 +644,9 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertSummary.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertSummary.java index a6df8e7d5ff..dbc6e26dc8a 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertSummary.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AlertSummary.java @@ -36,6 +36,8 @@ public final class AlertSummary extends com.oracle.bmc.http.internal.ExplicitlyS "timeCreated", "timeUpdated", "lifecycleState", + "alertPolicyRuleKey", + "alertPolicyRuleName", "featureDetails", "freeformTags", "definedTags" @@ -57,6 +59,8 @@ public AlertSummary( java.util.Date timeCreated, java.util.Date timeUpdated, AlertLifecycleState lifecycleState, + String alertPolicyRuleKey, + String alertPolicyRuleName, java.util.Map> featureDetails, java.util.Map freeformTags, java.util.Map> definedTags) { @@ -77,6 +81,8 @@ public AlertSummary( this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.lifecycleState = lifecycleState; + this.alertPolicyRuleKey = alertPolicyRuleKey; + this.alertPolicyRuleName = alertPolicyRuleName; this.featureDetails = featureDetails; this.freeformTags = freeformTags; this.definedTags = definedTags; @@ -340,6 +346,38 @@ public Builder lifecycleState(AlertLifecycleState lifecycleState) { this.__explicitlySet__.add("lifecycleState"); return this; } + /** + * The key of the rule of alert policy that triggered alert. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alertPolicyRuleKey") + private String alertPolicyRuleKey; + + /** + * The key of the rule of alert policy that triggered alert. + * @param alertPolicyRuleKey the value to set + * @return this builder + **/ + public Builder alertPolicyRuleKey(String alertPolicyRuleKey) { + this.alertPolicyRuleKey = alertPolicyRuleKey; + this.__explicitlySet__.add("alertPolicyRuleKey"); + return this; + } + /** + * The display name of the rule of alert policy that triggered alert. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alertPolicyRuleName") + private String alertPolicyRuleName; + + /** + * The display name of the rule of alert policy that triggered alert. + * @param alertPolicyRuleName the value to set + * @return this builder + **/ + public Builder alertPolicyRuleName(String alertPolicyRuleName) { + this.alertPolicyRuleName = alertPolicyRuleName; + this.__explicitlySet__.add("alertPolicyRuleName"); + return this; + } /** * Map that contains maps of values. * Example: {@code {"Operations": {"CostCenter": "42"}}} @@ -429,6 +467,8 @@ public AlertSummary build() { this.timeCreated, this.timeUpdated, this.lifecycleState, + this.alertPolicyRuleKey, + this.alertPolicyRuleName, this.featureDetails, this.freeformTags, this.definedTags); @@ -488,6 +528,12 @@ public Builder copy(AlertSummary model) { if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } + if (model.wasPropertyExplicitlySet("alertPolicyRuleKey")) { + this.alertPolicyRuleKey(model.getAlertPolicyRuleKey()); + } + if (model.wasPropertyExplicitlySet("alertPolicyRuleName")) { + this.alertPolicyRuleName(model.getAlertPolicyRuleName()); + } if (model.wasPropertyExplicitlySet("featureDetails")) { this.featureDetails(model.getFeatureDetails()); } @@ -784,6 +830,34 @@ public AlertLifecycleState getLifecycleState() { return lifecycleState; } + /** + * The key of the rule of alert policy that triggered alert. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alertPolicyRuleKey") + private final String alertPolicyRuleKey; + + /** + * The key of the rule of alert policy that triggered alert. + * @return the value + **/ + public String getAlertPolicyRuleKey() { + return alertPolicyRuleKey; + } + + /** + * The display name of the rule of alert policy that triggered alert. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alertPolicyRuleName") + private final String alertPolicyRuleName; + + /** + * The display name of the rule of alert policy that triggered alert. + * @return the value + **/ + public String getAlertPolicyRuleName() { + return alertPolicyRuleName; + } + /** * Map that contains maps of values. * Example: {@code {"Operations": {"CostCenter": "42"}}} @@ -872,6 +946,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", alertPolicyRuleKey=").append(String.valueOf(this.alertPolicyRuleKey)); + sb.append(", alertPolicyRuleName=").append(String.valueOf(this.alertPolicyRuleName)); sb.append(", featureDetails=").append(String.valueOf(this.featureDetails)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); @@ -905,6 +981,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.alertPolicyRuleKey, other.alertPolicyRuleKey) + && java.util.Objects.equals(this.alertPolicyRuleName, other.alertPolicyRuleName) && java.util.Objects.equals(this.featureDetails, other.featureDetails) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) @@ -939,6 +1017,16 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.alertPolicyRuleKey == null + ? 43 + : this.alertPolicyRuleKey.hashCode()); + result = + (result * PRIME) + + (this.alertPolicyRuleName == null + ? 43 + : this.alertPolicyRuleName.hashCode()); result = (result * PRIME) + (this.featureDetails == null ? 43 : this.featureDetails.hashCode()); diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AuditEventSummary.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AuditEventSummary.java index ddfdc74626f..e71c59edddf 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AuditEventSummary.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/AuditEventSummary.java @@ -57,6 +57,8 @@ public final class AuditEventSummary extends com.oracle.bmc.http.internal.Explic "peerTargetDatabaseKey", "trailSource", "databaseUniqueName", + "applicationContexts", + "fgaPolicyName", "freeformTags", "definedTags" }) @@ -96,6 +98,8 @@ public AuditEventSummary( Integer peerTargetDatabaseKey, AuditTrailSource trailSource, String databaseUniqueName, + String applicationContexts, + String fgaPolicyName, java.util.Map freeformTags, java.util.Map> definedTags) { super(); @@ -134,6 +138,8 @@ public AuditEventSummary( this.peerTargetDatabaseKey = peerTargetDatabaseKey; this.trailSource = trailSource; this.databaseUniqueName = databaseUniqueName; + this.applicationContexts = applicationContexts; + this.fgaPolicyName = fgaPolicyName; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -708,6 +714,38 @@ public Builder databaseUniqueName(String databaseUniqueName) { this.__explicitlySet__.add("databaseUniqueName"); return this; } + /** + * Semicolon-seperated list of application context namespace, attribute, value information in (APPCTX_NSPACE,APPCTX_ATTRIBUTE=) format. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationContexts") + private String applicationContexts; + + /** + * Semicolon-seperated list of application context namespace, attribute, value information in (APPCTX_NSPACE,APPCTX_ATTRIBUTE=) format. + * @param applicationContexts the value to set + * @return this builder + **/ + public Builder applicationContexts(String applicationContexts) { + this.applicationContexts = applicationContexts; + this.__explicitlySet__.add("applicationContexts"); + return this; + } + /** + * Fine-grained auditing (FGA) policy name that generated this audit record. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fgaPolicyName") + private String fgaPolicyName; + + /** + * Fine-grained auditing (FGA) policy name that generated this audit record. + * @param fgaPolicyName the value to set + * @return this builder + **/ + public Builder fgaPolicyName(String fgaPolicyName) { + this.fgaPolicyName = fgaPolicyName; + this.__explicitlySet__.add("fgaPolicyName"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) *

@@ -795,6 +833,8 @@ public AuditEventSummary build() { this.peerTargetDatabaseKey, this.trailSource, this.databaseUniqueName, + this.applicationContexts, + this.fgaPolicyName, this.freeformTags, this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -910,6 +950,12 @@ public Builder copy(AuditEventSummary model) { if (model.wasPropertyExplicitlySet("databaseUniqueName")) { this.databaseUniqueName(model.getDatabaseUniqueName()); } + if (model.wasPropertyExplicitlySet("applicationContexts")) { + this.applicationContexts(model.getApplicationContexts()); + } + if (model.wasPropertyExplicitlySet("fgaPolicyName")) { + this.fgaPolicyName(model.getFgaPolicyName()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -1678,6 +1724,34 @@ public String getDatabaseUniqueName() { return databaseUniqueName; } + /** + * Semicolon-seperated list of application context namespace, attribute, value information in (APPCTX_NSPACE,APPCTX_ATTRIBUTE=) format. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationContexts") + private final String applicationContexts; + + /** + * Semicolon-seperated list of application context namespace, attribute, value information in (APPCTX_NSPACE,APPCTX_ATTRIBUTE=) format. + * @return the value + **/ + public String getApplicationContexts() { + return applicationContexts; + } + + /** + * Fine-grained auditing (FGA) policy name that generated this audit record. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fgaPolicyName") + private final String fgaPolicyName; + + /** + * Fine-grained auditing (FGA) policy name that generated this audit record. + * @return the value + **/ + public String getFgaPolicyName() { + return fgaPolicyName; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) *

@@ -1768,6 +1842,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", peerTargetDatabaseKey=").append(String.valueOf(this.peerTargetDatabaseKey)); sb.append(", trailSource=").append(String.valueOf(this.trailSource)); sb.append(", databaseUniqueName=").append(String.valueOf(this.databaseUniqueName)); + sb.append(", applicationContexts=").append(String.valueOf(this.applicationContexts)); + sb.append(", fgaPolicyName=").append(String.valueOf(this.fgaPolicyName)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -1820,6 +1896,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.peerTargetDatabaseKey, other.peerTargetDatabaseKey) && java.util.Objects.equals(this.trailSource, other.trailSource) && java.util.Objects.equals(this.databaseUniqueName, other.databaseUniqueName) + && java.util.Objects.equals(this.applicationContexts, other.applicationContexts) + && java.util.Objects.equals(this.fgaPolicyName, other.fgaPolicyName) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -1892,6 +1970,14 @@ public int hashCode() { + (this.databaseUniqueName == null ? 43 : this.databaseUniqueName.hashCode()); + result = + (result * PRIME) + + (this.applicationContexts == null + ? 43 + : this.applicationContexts.hashCode()); + result = + (result * PRIME) + + (this.fgaPolicyName == null ? 43 : this.fgaPolicyName.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/BulkCreateSqlFirewallAllowedSqlsDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/BulkCreateSqlFirewallAllowedSqlsDetails.java new file mode 100644 index 00000000000..37fc6427ba4 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/BulkCreateSqlFirewallAllowedSqlsDetails.java @@ -0,0 +1,203 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * The details used to append the violation logs as allowed SQLs + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = BulkCreateSqlFirewallAllowedSqlsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class BulkCreateSqlFirewallAllowedSqlsDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"sqlFirewallPolicyId", "logType", "selection"}) + public BulkCreateSqlFirewallAllowedSqlsDetails( + String sqlFirewallPolicyId, LogType logType, SelectionDetails selection) { + super(); + this.sqlFirewallPolicyId = sqlFirewallPolicyId; + this.logType = logType; + this.selection = selection; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the SQL firewall policy where new allowed SQLs needs to be added. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sqlFirewallPolicyId") + private String sqlFirewallPolicyId; + + /** + * The OCID of the SQL firewall policy where new allowed SQLs needs to be added. + * @param sqlFirewallPolicyId the value to set + * @return this builder + **/ + public Builder sqlFirewallPolicyId(String sqlFirewallPolicyId) { + this.sqlFirewallPolicyId = sqlFirewallPolicyId; + this.__explicitlySet__.add("sqlFirewallPolicyId"); + return this; + } + /** + * The type of log to be added as an allowed sql. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("logType") + private LogType logType; + + /** + * The type of log to be added as an allowed sql. + * @param logType the value to set + * @return this builder + **/ + public Builder logType(LogType logType) { + this.logType = logType; + this.__explicitlySet__.add("logType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private SelectionDetails selection; + + public Builder selection(SelectionDetails selection) { + this.selection = selection; + this.__explicitlySet__.add("selection"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BulkCreateSqlFirewallAllowedSqlsDetails build() { + BulkCreateSqlFirewallAllowedSqlsDetails model = + new BulkCreateSqlFirewallAllowedSqlsDetails( + this.sqlFirewallPolicyId, this.logType, this.selection); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BulkCreateSqlFirewallAllowedSqlsDetails model) { + if (model.wasPropertyExplicitlySet("sqlFirewallPolicyId")) { + this.sqlFirewallPolicyId(model.getSqlFirewallPolicyId()); + } + if (model.wasPropertyExplicitlySet("logType")) { + this.logType(model.getLogType()); + } + if (model.wasPropertyExplicitlySet("selection")) { + this.selection(model.getSelection()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the SQL firewall policy where new allowed SQLs needs to be added. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sqlFirewallPolicyId") + private final String sqlFirewallPolicyId; + + /** + * The OCID of the SQL firewall policy where new allowed SQLs needs to be added. + * @return the value + **/ + public String getSqlFirewallPolicyId() { + return sqlFirewallPolicyId; + } + + /** + * The type of log to be added as an allowed sql. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("logType") + private final LogType logType; + + /** + * The type of log to be added as an allowed sql. + * @return the value + **/ + public LogType getLogType() { + return logType; + } + + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private final SelectionDetails selection; + + public SelectionDetails getSelection() { + return selection; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BulkCreateSqlFirewallAllowedSqlsDetails("); + sb.append("super=").append(super.toString()); + sb.append("sqlFirewallPolicyId=").append(String.valueOf(this.sqlFirewallPolicyId)); + sb.append(", logType=").append(String.valueOf(this.logType)); + sb.append(", selection=").append(String.valueOf(this.selection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkCreateSqlFirewallAllowedSqlsDetails)) { + return false; + } + + BulkCreateSqlFirewallAllowedSqlsDetails other = (BulkCreateSqlFirewallAllowedSqlsDetails) o; + return java.util.Objects.equals(this.sqlFirewallPolicyId, other.sqlFirewallPolicyId) + && java.util.Objects.equals(this.logType, other.logType) + && java.util.Objects.equals(this.selection, other.selection) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.sqlFirewallPolicyId == null + ? 43 + : this.sqlFirewallPolicyId.hashCode()); + result = (result * PRIME) + (this.logType == null ? 43 : this.logType.hashCode()); + result = (result * PRIME) + (this.selection == null ? 43 : this.selection.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/BulkDeleteSqlFirewallAllowedSqlsDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/BulkDeleteSqlFirewallAllowedSqlsDetails.java new file mode 100644 index 00000000000..748920c765b --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/BulkDeleteSqlFirewallAllowedSqlsDetails.java @@ -0,0 +1,166 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * Details of the allowed SQLs to be deleted from the SQL firewall policy. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = BulkDeleteSqlFirewallAllowedSqlsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class BulkDeleteSqlFirewallAllowedSqlsDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"sqlFirewallPolicyId", "selection"}) + public BulkDeleteSqlFirewallAllowedSqlsDetails( + String sqlFirewallPolicyId, SelectionDetails selection) { + super(); + this.sqlFirewallPolicyId = sqlFirewallPolicyId; + this.selection = selection; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the SQL firewall policy whose allowed SQLs needs to be deleted. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sqlFirewallPolicyId") + private String sqlFirewallPolicyId; + + /** + * The OCID of the SQL firewall policy whose allowed SQLs needs to be deleted. + * @param sqlFirewallPolicyId the value to set + * @return this builder + **/ + public Builder sqlFirewallPolicyId(String sqlFirewallPolicyId) { + this.sqlFirewallPolicyId = sqlFirewallPolicyId; + this.__explicitlySet__.add("sqlFirewallPolicyId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private SelectionDetails selection; + + public Builder selection(SelectionDetails selection) { + this.selection = selection; + this.__explicitlySet__.add("selection"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BulkDeleteSqlFirewallAllowedSqlsDetails build() { + BulkDeleteSqlFirewallAllowedSqlsDetails model = + new BulkDeleteSqlFirewallAllowedSqlsDetails( + this.sqlFirewallPolicyId, this.selection); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BulkDeleteSqlFirewallAllowedSqlsDetails model) { + if (model.wasPropertyExplicitlySet("sqlFirewallPolicyId")) { + this.sqlFirewallPolicyId(model.getSqlFirewallPolicyId()); + } + if (model.wasPropertyExplicitlySet("selection")) { + this.selection(model.getSelection()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the SQL firewall policy whose allowed SQLs needs to be deleted. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sqlFirewallPolicyId") + private final String sqlFirewallPolicyId; + + /** + * The OCID of the SQL firewall policy whose allowed SQLs needs to be deleted. + * @return the value + **/ + public String getSqlFirewallPolicyId() { + return sqlFirewallPolicyId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private final SelectionDetails selection; + + public SelectionDetails getSelection() { + return selection; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BulkDeleteSqlFirewallAllowedSqlsDetails("); + sb.append("super=").append(super.toString()); + sb.append("sqlFirewallPolicyId=").append(String.valueOf(this.sqlFirewallPolicyId)); + sb.append(", selection=").append(String.valueOf(this.selection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkDeleteSqlFirewallAllowedSqlsDetails)) { + return false; + } + + BulkDeleteSqlFirewallAllowedSqlsDetails other = (BulkDeleteSqlFirewallAllowedSqlsDetails) o; + return java.util.Objects.equals(this.sqlFirewallPolicyId, other.sqlFirewallPolicyId) + && java.util.Objects.equals(this.selection, other.selection) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.sqlFirewallPolicyId == null + ? 43 + : this.sqlFirewallPolicyId.hashCode()); + result = (result * PRIME) + (this.selection == null ? 43 : this.selection.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateAlertPolicyDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateAlertPolicyDetails.java index 689db44cffd..f42c1bd27c1 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateAlertPolicyDetails.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateAlertPolicyDetails.java @@ -29,6 +29,7 @@ public final class CreateAlertPolicyDetails "description", "severity", "compartmentId", + "alertPolicyRuleDetails", "freeformTags", "definedTags" }) @@ -38,6 +39,7 @@ public CreateAlertPolicyDetails( String description, AlertSeverity severity, String compartmentId, + java.util.List alertPolicyRuleDetails, java.util.Map freeformTags, java.util.Map> definedTags) { super(); @@ -46,6 +48,7 @@ public CreateAlertPolicyDetails( this.description = description; this.severity = severity; this.compartmentId = compartmentId; + this.alertPolicyRuleDetails = alertPolicyRuleDetails; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -132,6 +135,23 @@ public Builder compartmentId(String compartmentId) { this.__explicitlySet__.add("compartmentId"); return this; } + /** + * The details of the alert policy rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alertPolicyRuleDetails") + private java.util.List alertPolicyRuleDetails; + + /** + * The details of the alert policy rule. + * @param alertPolicyRuleDetails the value to set + * @return this builder + **/ + public Builder alertPolicyRuleDetails( + java.util.List alertPolicyRuleDetails) { + this.alertPolicyRuleDetails = alertPolicyRuleDetails; + this.__explicitlySet__.add("alertPolicyRuleDetails"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) *

@@ -189,6 +209,7 @@ public CreateAlertPolicyDetails build() { this.description, this.severity, this.compartmentId, + this.alertPolicyRuleDetails, this.freeformTags, this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -214,6 +235,9 @@ public Builder copy(CreateAlertPolicyDetails model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } + if (model.wasPropertyExplicitlySet("alertPolicyRuleDetails")) { + this.alertPolicyRuleDetails(model.getAlertPolicyRuleDetails()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -305,6 +329,20 @@ public String getCompartmentId() { return compartmentId; } + /** + * The details of the alert policy rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("alertPolicyRuleDetails") + private final java.util.List alertPolicyRuleDetails; + + /** + * The details of the alert policy rule. + * @return the value + **/ + public java.util.List getAlertPolicyRuleDetails() { + return alertPolicyRuleDetails; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) *

@@ -364,6 +402,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", description=").append(String.valueOf(this.description)); sb.append(", severity=").append(String.valueOf(this.severity)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", alertPolicyRuleDetails=").append(String.valueOf(this.alertPolicyRuleDetails)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -385,6 +424,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.severity, other.severity) && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals( + this.alertPolicyRuleDetails, other.alertPolicyRuleDetails) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -403,6 +444,11 @@ public int hashCode() { result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.alertPolicyRuleDetails == null + ? 43 + : this.alertPolicyRuleDetails.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateAlertPolicyRuleDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateAlertPolicyRuleDetails.java index d8011f533f6..c1c2da6b529 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateAlertPolicyRuleDetails.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateAlertPolicyRuleDetails.java @@ -23,11 +23,12 @@ public final class CreateAlertPolicyRuleDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"expression", "description"}) - public CreateAlertPolicyRuleDetails(String expression, String description) { + @java.beans.ConstructorProperties({"expression", "description", "displayName"}) + public CreateAlertPolicyRuleDetails(String expression, String description, String displayName) { super(); this.expression = expression; this.description = description; + this.displayName = displayName; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -64,13 +65,30 @@ public Builder description(String description) { this.__explicitlySet__.add("description"); return this; } + /** + * The display name of the alert policy rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the alert policy rule. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public CreateAlertPolicyRuleDetails build() { CreateAlertPolicyRuleDetails model = - new CreateAlertPolicyRuleDetails(this.expression, this.description); + new CreateAlertPolicyRuleDetails( + this.expression, this.description, this.displayName); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -85,6 +103,9 @@ public Builder copy(CreateAlertPolicyRuleDetails model) { if (model.wasPropertyExplicitlySet("description")) { this.description(model.getDescription()); } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } return this; } } @@ -128,6 +149,20 @@ public String getDescription() { return description; } + /** + * The display name of the alert policy rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the alert policy rule. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + @Override public String toString() { return this.toString(true); @@ -144,6 +179,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("expression=").append(String.valueOf(this.expression)); sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(")"); return sb.toString(); } @@ -160,6 +196,7 @@ public boolean equals(Object o) { CreateAlertPolicyRuleDetails other = (CreateAlertPolicyRuleDetails) o; return java.util.Objects.equals(this.expression, other.expression) && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.displayName, other.displayName) && super.equals(other); } @@ -169,6 +206,7 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.expression == null ? 43 : this.expression.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateDiscoveryJobDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateDiscoveryJobDetails.java index 476388010ae..aab3b252c60 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateDiscoveryJobDetails.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateDiscoveryJobDetails.java @@ -28,6 +28,7 @@ public final class CreateDiscoveryJobDetails "compartmentId", "displayName", "schemasForDiscovery", + "tablesForDiscovery", "sensitiveTypeIdsForDiscovery", "isSampleDataCollectionEnabled", "isAppDefinedRelationDiscoveryEnabled", @@ -42,6 +43,7 @@ public CreateDiscoveryJobDetails( String compartmentId, String displayName, java.util.List schemasForDiscovery, + java.util.List tablesForDiscovery, java.util.List sensitiveTypeIdsForDiscovery, Boolean isSampleDataCollectionEnabled, Boolean isAppDefinedRelationDiscoveryEnabled, @@ -55,6 +57,7 @@ public CreateDiscoveryJobDetails( this.compartmentId = compartmentId; this.displayName = displayName; this.schemasForDiscovery = schemasForDiscovery; + this.tablesForDiscovery = tablesForDiscovery; this.sensitiveTypeIdsForDiscovery = sensitiveTypeIdsForDiscovery; this.isSampleDataCollectionEnabled = isSampleDataCollectionEnabled; this.isAppDefinedRelationDiscoveryEnabled = isAppDefinedRelationDiscoveryEnabled; @@ -160,6 +163,26 @@ public Builder schemasForDiscovery(java.util.List schemasForDiscovery) { this.__explicitlySet__.add("schemasForDiscovery"); return this; } + /** + * The data discovery jobs will scan the tables specified here, including both schemas and tables. In the absence + * of explicit input, the list of tables is obtained from the tablesForDiscovery attribute of the sensitive data model. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tablesForDiscovery") + private java.util.List tablesForDiscovery; + + /** + * The data discovery jobs will scan the tables specified here, including both schemas and tables. In the absence + * of explicit input, the list of tables is obtained from the tablesForDiscovery attribute of the sensitive data model. + * + * @param tablesForDiscovery the value to set + * @return this builder + **/ + public Builder tablesForDiscovery(java.util.List tablesForDiscovery) { + this.tablesForDiscovery = tablesForDiscovery; + this.__explicitlySet__.add("tablesForDiscovery"); + return this; + } /** * The OCIDs of the sensitive types to be used by the discovery job. If not provided, the sensitiveTypeIdsForDiscovery * attribute of the sensitive data model is used to get the list of sensitive types. @@ -337,6 +360,7 @@ public CreateDiscoveryJobDetails build() { this.compartmentId, this.displayName, this.schemasForDiscovery, + this.tablesForDiscovery, this.sensitiveTypeIdsForDiscovery, this.isSampleDataCollectionEnabled, this.isAppDefinedRelationDiscoveryEnabled, @@ -367,6 +391,9 @@ public Builder copy(CreateDiscoveryJobDetails model) { if (model.wasPropertyExplicitlySet("schemasForDiscovery")) { this.schemasForDiscovery(model.getSchemasForDiscovery()); } + if (model.wasPropertyExplicitlySet("tablesForDiscovery")) { + this.tablesForDiscovery(model.getTablesForDiscovery()); + } if (model.wasPropertyExplicitlySet("sensitiveTypeIdsForDiscovery")) { this.sensitiveTypeIdsForDiscovery(model.getSensitiveTypeIdsForDiscovery()); } @@ -488,6 +515,24 @@ public java.util.List getSchemasForDiscovery() { return schemasForDiscovery; } + /** + * The data discovery jobs will scan the tables specified here, including both schemas and tables. In the absence + * of explicit input, the list of tables is obtained from the tablesForDiscovery attribute of the sensitive data model. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tablesForDiscovery") + private final java.util.List tablesForDiscovery; + + /** + * The data discovery jobs will scan the tables specified here, including both schemas and tables. In the absence + * of explicit input, the list of tables is obtained from the tablesForDiscovery attribute of the sensitive data model. + * + * @return the value + **/ + public java.util.List getTablesForDiscovery() { + return tablesForDiscovery; + } + /** * The OCIDs of the sensitive types to be used by the discovery job. If not provided, the sensitiveTypeIdsForDiscovery * attribute of the sensitive data model is used to get the list of sensitive types. @@ -655,6 +700,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", schemasForDiscovery=").append(String.valueOf(this.schemasForDiscovery)); + sb.append(", tablesForDiscovery=").append(String.valueOf(this.tablesForDiscovery)); sb.append(", sensitiveTypeIdsForDiscovery=") .append(String.valueOf(this.sensitiveTypeIdsForDiscovery)); sb.append(", isSampleDataCollectionEnabled=") @@ -685,6 +731,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.schemasForDiscovery, other.schemasForDiscovery) + && java.util.Objects.equals(this.tablesForDiscovery, other.tablesForDiscovery) && java.util.Objects.equals( this.sensitiveTypeIdsForDiscovery, other.sensitiveTypeIdsForDiscovery) && java.util.Objects.equals( @@ -721,6 +768,11 @@ public int hashCode() { + (this.schemasForDiscovery == null ? 43 : this.schemasForDiscovery.hashCode()); + result = + (result * PRIME) + + (this.tablesForDiscovery == null + ? 43 + : this.tablesForDiscovery.hashCode()); result = (result * PRIME) + (this.sensitiveTypeIdsForDiscovery == null diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateSecurityAssessmentDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateSecurityAssessmentDetails.java index 8008e777ae2..d1f60a236d7 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateSecurityAssessmentDetails.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateSecurityAssessmentDetails.java @@ -27,6 +27,7 @@ public final class CreateSecurityAssessmentDetails "displayName", "description", "targetId", + "isAssessmentScheduled", "schedule", "freeformTags", "definedTags" @@ -36,6 +37,7 @@ public CreateSecurityAssessmentDetails( String displayName, String description, String targetId, + Boolean isAssessmentScheduled, String schedule, java.util.Map freeformTags, java.util.Map> definedTags) { @@ -44,6 +46,7 @@ public CreateSecurityAssessmentDetails( this.displayName = displayName; this.description = description; this.targetId = targetId; + this.isAssessmentScheduled = isAssessmentScheduled; this.schedule = schedule; this.freeformTags = freeformTags; this.definedTags = definedTags; @@ -115,6 +118,22 @@ public Builder targetId(String targetId) { this.__explicitlySet__.add("targetId"); return this; } + /** + * Indicates whether the assessment is scheduled to run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAssessmentScheduled") + private Boolean isAssessmentScheduled; + + /** + * Indicates whether the assessment is scheduled to run. + * @param isAssessmentScheduled the value to set + * @return this builder + **/ + public Builder isAssessmentScheduled(Boolean isAssessmentScheduled) { + this.isAssessmentScheduled = isAssessmentScheduled; + this.__explicitlySet__.add("isAssessmentScheduled"); + return this; + } /** * To schedule the assessment for running periodically, specify the schedule in this attribute. * Create or schedule one assessment per compartment. If not defined, the assessment runs immediately. @@ -219,6 +238,7 @@ public CreateSecurityAssessmentDetails build() { this.displayName, this.description, this.targetId, + this.isAssessmentScheduled, this.schedule, this.freeformTags, this.definedTags); @@ -242,6 +262,9 @@ public Builder copy(CreateSecurityAssessmentDetails model) { if (model.wasPropertyExplicitlySet("targetId")) { this.targetId(model.getTargetId()); } + if (model.wasPropertyExplicitlySet("isAssessmentScheduled")) { + this.isAssessmentScheduled(model.getIsAssessmentScheduled()); + } if (model.wasPropertyExplicitlySet("schedule")) { this.schedule(model.getSchedule()); } @@ -322,6 +345,20 @@ public String getTargetId() { return targetId; } + /** + * Indicates whether the assessment is scheduled to run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAssessmentScheduled") + private final Boolean isAssessmentScheduled; + + /** + * Indicates whether the assessment is scheduled to run. + * @return the value + **/ + public Boolean getIsAssessmentScheduled() { + return isAssessmentScheduled; + } + /** * To schedule the assessment for running periodically, specify the schedule in this attribute. * Create or schedule one assessment per compartment. If not defined, the assessment runs immediately. @@ -426,6 +463,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", targetId=").append(String.valueOf(this.targetId)); + sb.append(", isAssessmentScheduled=").append(String.valueOf(this.isAssessmentScheduled)); sb.append(", schedule=").append(String.valueOf(this.schedule)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); @@ -447,6 +485,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.targetId, other.targetId) + && java.util.Objects.equals(this.isAssessmentScheduled, other.isAssessmentScheduled) && java.util.Objects.equals(this.schedule, other.schedule) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) @@ -463,6 +502,11 @@ public int hashCode() { result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); + result = + (result * PRIME) + + (this.isAssessmentScheduled == null + ? 43 + : this.isAssessmentScheduled.hashCode()); result = (result * PRIME) + (this.schedule == null ? 43 : this.schedule.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateSensitiveDataModelDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateSensitiveDataModelDetails.java index 60bdd1026aa..837af8d9806 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateSensitiveDataModelDetails.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateSensitiveDataModelDetails.java @@ -36,6 +36,7 @@ public final class CreateSensitiveDataModelDetails "appSuiteName", "description", "schemasForDiscovery", + "tablesForDiscovery", "sensitiveTypeIdsForDiscovery", "isSampleDataCollectionEnabled", "isAppDefinedRelationDiscoveryEnabled", @@ -51,6 +52,7 @@ public CreateSensitiveDataModelDetails( String appSuiteName, String description, java.util.List schemasForDiscovery, + java.util.List tablesForDiscovery, java.util.List sensitiveTypeIdsForDiscovery, Boolean isSampleDataCollectionEnabled, Boolean isAppDefinedRelationDiscoveryEnabled, @@ -65,6 +67,7 @@ public CreateSensitiveDataModelDetails( this.appSuiteName = appSuiteName; this.description = description; this.schemasForDiscovery = schemasForDiscovery; + this.tablesForDiscovery = tablesForDiscovery; this.sensitiveTypeIdsForDiscovery = sensitiveTypeIdsForDiscovery; this.isSampleDataCollectionEnabled = isSampleDataCollectionEnabled; this.isAppDefinedRelationDiscoveryEnabled = isAppDefinedRelationDiscoveryEnabled; @@ -176,6 +179,28 @@ public Builder schemasForDiscovery(java.util.List schemasForDiscovery) { this.__explicitlySet__.add("schemasForDiscovery"); return this; } + /** + * The data discovery jobs will scan the tables specified here, including both schemas and tables. + * For instance, the input could be in the format: [{schemaName: "HR", tableName: ["T1", "T2"]}, {schemaName: + * "OE", tableName : ["T3", "T4"]}]. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tablesForDiscovery") + private java.util.List tablesForDiscovery; + + /** + * The data discovery jobs will scan the tables specified here, including both schemas and tables. + * For instance, the input could be in the format: [{schemaName: "HR", tableName: ["T1", "T2"]}, {schemaName: + * "OE", tableName : ["T3", "T4"]}]. + * + * @param tablesForDiscovery the value to set + * @return this builder + **/ + public Builder tablesForDiscovery(java.util.List tablesForDiscovery) { + this.tablesForDiscovery = tablesForDiscovery; + this.__explicitlySet__.add("tablesForDiscovery"); + return this; + } /** * The OCIDs of the sensitive types to be used by data discovery jobs. If OCID of a sensitive category is provided, * all its child sensitive types are used for data discovery. @@ -348,6 +373,7 @@ public CreateSensitiveDataModelDetails build() { this.appSuiteName, this.description, this.schemasForDiscovery, + this.tablesForDiscovery, this.sensitiveTypeIdsForDiscovery, this.isSampleDataCollectionEnabled, this.isAppDefinedRelationDiscoveryEnabled, @@ -381,6 +407,9 @@ public Builder copy(CreateSensitiveDataModelDetails model) { if (model.wasPropertyExplicitlySet("schemasForDiscovery")) { this.schemasForDiscovery(model.getSchemasForDiscovery()); } + if (model.wasPropertyExplicitlySet("tablesForDiscovery")) { + this.tablesForDiscovery(model.getTablesForDiscovery()); + } if (model.wasPropertyExplicitlySet("sensitiveTypeIdsForDiscovery")) { this.sensitiveTypeIdsForDiscovery(model.getSensitiveTypeIdsForDiscovery()); } @@ -506,6 +535,26 @@ public java.util.List getSchemasForDiscovery() { return schemasForDiscovery; } + /** + * The data discovery jobs will scan the tables specified here, including both schemas and tables. + * For instance, the input could be in the format: [{schemaName: "HR", tableName: ["T1", "T2"]}, {schemaName: + * "OE", tableName : ["T3", "T4"]}]. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tablesForDiscovery") + private final java.util.List tablesForDiscovery; + + /** + * The data discovery jobs will scan the tables specified here, including both schemas and tables. + * For instance, the input could be in the format: [{schemaName: "HR", tableName: ["T1", "T2"]}, {schemaName: + * "OE", tableName : ["T3", "T4"]}]. + * + * @return the value + **/ + public java.util.List getTablesForDiscovery() { + return tablesForDiscovery; + } + /** * The OCIDs of the sensitive types to be used by data discovery jobs. If OCID of a sensitive category is provided, * all its child sensitive types are used for data discovery. @@ -668,6 +717,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", appSuiteName=").append(String.valueOf(this.appSuiteName)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", schemasForDiscovery=").append(String.valueOf(this.schemasForDiscovery)); + sb.append(", tablesForDiscovery=").append(String.valueOf(this.tablesForDiscovery)); sb.append(", sensitiveTypeIdsForDiscovery=") .append(String.valueOf(this.sensitiveTypeIdsForDiscovery)); sb.append(", isSampleDataCollectionEnabled=") @@ -699,6 +749,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.appSuiteName, other.appSuiteName) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.schemasForDiscovery, other.schemasForDiscovery) + && java.util.Objects.equals(this.tablesForDiscovery, other.tablesForDiscovery) && java.util.Objects.equals( this.sensitiveTypeIdsForDiscovery, other.sensitiveTypeIdsForDiscovery) && java.util.Objects.equals( @@ -730,6 +781,11 @@ public int hashCode() { + (this.schemasForDiscovery == null ? 43 : this.schemasForDiscovery.hashCode()); + result = + (result * PRIME) + + (this.tablesForDiscovery == null + ? 43 + : this.tablesForDiscovery.hashCode()); result = (result * PRIME) + (this.sensitiveTypeIdsForDiscovery == null diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateUserAssessmentDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateUserAssessmentDetails.java index f483a9b2878..8adff978a74 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateUserAssessmentDetails.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/CreateUserAssessmentDetails.java @@ -26,6 +26,7 @@ public final class CreateUserAssessmentDetails "compartmentId", "description", "displayName", + "isAssessmentScheduled", "schedule", "targetId", "freeformTags", @@ -35,6 +36,7 @@ public CreateUserAssessmentDetails( String compartmentId, String description, String displayName, + Boolean isAssessmentScheduled, String schedule, String targetId, java.util.Map freeformTags, @@ -43,6 +45,7 @@ public CreateUserAssessmentDetails( this.compartmentId = compartmentId; this.description = description; this.displayName = displayName; + this.isAssessmentScheduled = isAssessmentScheduled; this.schedule = schedule; this.targetId = targetId; this.freeformTags = freeformTags; @@ -99,6 +102,22 @@ public Builder displayName(String displayName) { this.__explicitlySet__.add("displayName"); return this; } + /** + * Indicates whether the assessment is scheduled to run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAssessmentScheduled") + private Boolean isAssessmentScheduled; + + /** + * Indicates whether the assessment is scheduled to run. + * @param isAssessmentScheduled the value to set + * @return this builder + **/ + public Builder isAssessmentScheduled(Boolean isAssessmentScheduled) { + this.isAssessmentScheduled = isAssessmentScheduled; + this.__explicitlySet__.add("isAssessmentScheduled"); + return this; + } /** * To schedule the assessment for saving periodically, specify the schedule in this attribute. * Create or schedule one assessment per compartment. If not defined, the assessment runs immediately. @@ -218,6 +237,7 @@ public CreateUserAssessmentDetails build() { this.compartmentId, this.description, this.displayName, + this.isAssessmentScheduled, this.schedule, this.targetId, this.freeformTags, @@ -239,6 +259,9 @@ public Builder copy(CreateUserAssessmentDetails model) { if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } + if (model.wasPropertyExplicitlySet("isAssessmentScheduled")) { + this.isAssessmentScheduled(model.getIsAssessmentScheduled()); + } if (model.wasPropertyExplicitlySet("schedule")) { this.schedule(model.getSchedule()); } @@ -308,6 +331,20 @@ public String getDisplayName() { return displayName; } + /** + * Indicates whether the assessment is scheduled to run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAssessmentScheduled") + private final Boolean isAssessmentScheduled; + + /** + * Indicates whether the assessment is scheduled to run. + * @return the value + **/ + public Boolean getIsAssessmentScheduled() { + return isAssessmentScheduled; + } + /** * To schedule the assessment for saving periodically, specify the schedule in this attribute. * Create or schedule one assessment per compartment. If not defined, the assessment runs immediately. @@ -425,6 +462,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", isAssessmentScheduled=").append(String.valueOf(this.isAssessmentScheduled)); sb.append(", schedule=").append(String.valueOf(this.schedule)); sb.append(", targetId=").append(String.valueOf(this.targetId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); @@ -446,6 +484,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.isAssessmentScheduled, other.isAssessmentScheduled) && java.util.Objects.equals(this.schedule, other.schedule) && java.util.Objects.equals(this.targetId, other.targetId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) @@ -462,6 +501,11 @@ public int hashCode() { + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.isAssessmentScheduled == null + ? 43 + : this.isAssessmentScheduled.hashCode()); result = (result * PRIME) + (this.schedule == null ? 43 : this.schedule.hashCode()); result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/DiscoveryJob.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/DiscoveryJob.java index 715cf5bee5a..5acb4c46cd0 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/DiscoveryJob.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/DiscoveryJob.java @@ -30,6 +30,7 @@ public final class DiscoveryJob extends com.oracle.bmc.http.internal.ExplicitlyS "sensitiveDataModelId", "targetId", "schemasForDiscovery", + "tablesForDiscovery", "sensitiveTypeIdsForDiscovery", "isSampleDataCollectionEnabled", "isAppDefinedRelationDiscoveryEnabled", @@ -56,6 +57,7 @@ public DiscoveryJob( String sensitiveDataModelId, String targetId, java.util.List schemasForDiscovery, + java.util.List tablesForDiscovery, java.util.List sensitiveTypeIdsForDiscovery, Boolean isSampleDataCollectionEnabled, Boolean isAppDefinedRelationDiscoveryEnabled, @@ -81,6 +83,7 @@ public DiscoveryJob( this.sensitiveDataModelId = sensitiveDataModelId; this.targetId = targetId; this.schemasForDiscovery = schemasForDiscovery; + this.tablesForDiscovery = tablesForDiscovery; this.sensitiveTypeIdsForDiscovery = sensitiveTypeIdsForDiscovery; this.isSampleDataCollectionEnabled = isSampleDataCollectionEnabled; this.isAppDefinedRelationDiscoveryEnabled = isAppDefinedRelationDiscoveryEnabled; @@ -269,6 +272,24 @@ public Builder schemasForDiscovery(java.util.List schemasForDiscovery) { this.__explicitlySet__.add("schemasForDiscovery"); return this; } + /** + * The data discovery jobs will scan the tables specified here, including both schemas and tables. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tablesForDiscovery") + private java.util.List tablesForDiscovery; + + /** + * The data discovery jobs will scan the tables specified here, including both schemas and tables. + * + * @param tablesForDiscovery the value to set + * @return this builder + **/ + public Builder tablesForDiscovery(java.util.List tablesForDiscovery) { + this.tablesForDiscovery = tablesForDiscovery; + this.__explicitlySet__.add("tablesForDiscovery"); + return this; + } /** * The OCIDs of the sensitive types used for data discovery. **/ @@ -557,6 +578,7 @@ public DiscoveryJob build() { this.sensitiveDataModelId, this.targetId, this.schemasForDiscovery, + this.tablesForDiscovery, this.sensitiveTypeIdsForDiscovery, this.isSampleDataCollectionEnabled, this.isAppDefinedRelationDiscoveryEnabled, @@ -609,6 +631,9 @@ public Builder copy(DiscoveryJob model) { if (model.wasPropertyExplicitlySet("schemasForDiscovery")) { this.schemasForDiscovery(model.getSchemasForDiscovery()); } + if (model.wasPropertyExplicitlySet("tablesForDiscovery")) { + this.tablesForDiscovery(model.getTablesForDiscovery()); + } if (model.wasPropertyExplicitlySet("sensitiveTypeIdsForDiscovery")) { this.sensitiveTypeIdsForDiscovery(model.getSensitiveTypeIdsForDiscovery()); } @@ -872,6 +897,22 @@ public java.util.List getSchemasForDiscovery() { return schemasForDiscovery; } + /** + * The data discovery jobs will scan the tables specified here, including both schemas and tables. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tablesForDiscovery") + private final java.util.List tablesForDiscovery; + + /** + * The data discovery jobs will scan the tables specified here, including both schemas and tables. + * + * @return the value + **/ + public java.util.List getTablesForDiscovery() { + return tablesForDiscovery; + } + /** * The OCIDs of the sensitive types used for data discovery. **/ @@ -1136,6 +1177,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", sensitiveDataModelId=").append(String.valueOf(this.sensitiveDataModelId)); sb.append(", targetId=").append(String.valueOf(this.targetId)); sb.append(", schemasForDiscovery=").append(String.valueOf(this.schemasForDiscovery)); + sb.append(", tablesForDiscovery=").append(String.valueOf(this.tablesForDiscovery)); sb.append(", sensitiveTypeIdsForDiscovery=") .append(String.valueOf(this.sensitiveTypeIdsForDiscovery)); sb.append(", isSampleDataCollectionEnabled=") @@ -1181,6 +1223,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.sensitiveDataModelId, other.sensitiveDataModelId) && java.util.Objects.equals(this.targetId, other.targetId) && java.util.Objects.equals(this.schemasForDiscovery, other.schemasForDiscovery) + && java.util.Objects.equals(this.tablesForDiscovery, other.tablesForDiscovery) && java.util.Objects.equals( this.sensitiveTypeIdsForDiscovery, other.sensitiveTypeIdsForDiscovery) && java.util.Objects.equals( @@ -1234,6 +1277,11 @@ public int hashCode() { + (this.schemasForDiscovery == null ? 43 : this.schemasForDiscovery.hashCode()); + result = + (result * PRIME) + + (this.tablesForDiscovery == null + ? 43 + : this.tablesForDiscovery.hashCode()); result = (result * PRIME) + (this.sensitiveTypeIdsForDiscovery == null diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/FindingSummary.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/FindingSummary.java index cce31dedcaa..df77c7b2d5b 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/FindingSummary.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/FindingSummary.java @@ -29,6 +29,7 @@ public final class FindingSummary extends com.oracle.bmc.http.internal.Explicitl "remarks", "details", "summary", + "oneline", "references", "oracleDefinedSeverity", "isRiskModified", @@ -49,6 +50,7 @@ public FindingSummary( String remarks, Object details, String summary, + String oneline, References references, Finding.Severity oracleDefinedSeverity, Boolean isRiskModified, @@ -68,6 +70,7 @@ public FindingSummary( this.remarks = remarks; this.details = details; this.summary = summary; + this.oneline = oneline; this.references = references; this.oracleDefinedSeverity = oracleDefinedSeverity; this.isRiskModified = isRiskModified; @@ -225,6 +228,22 @@ public Builder summary(String summary) { this.__explicitlySet__.add("summary"); return this; } + /** + * Provides a recommended approach to take to remediate the finding reported. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("oneline") + private String oneline; + + /** + * Provides a recommended approach to take to remediate the finding reported. + * @param oneline the value to set + * @return this builder + **/ + public Builder oneline(String oneline) { + this.oneline = oneline; + this.__explicitlySet__.add("oneline"); + return this; + } /** * Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, a STIG rule, or a GDPR Article/Recital. **/ @@ -387,6 +406,7 @@ public FindingSummary build() { this.remarks, this.details, this.summary, + this.oneline, this.references, this.oracleDefinedSeverity, this.isRiskModified, @@ -431,6 +451,9 @@ public Builder copy(FindingSummary model) { if (model.wasPropertyExplicitlySet("summary")) { this.summary(model.getSummary()); } + if (model.wasPropertyExplicitlySet("oneline")) { + this.oneline(model.getOneline()); + } if (model.wasPropertyExplicitlySet("references")) { this.references(model.getReferences()); } @@ -652,6 +675,20 @@ public String getSummary() { return summary; } + /** + * Provides a recommended approach to take to remediate the finding reported. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("oneline") + private final String oneline; + + /** + * Provides a recommended approach to take to remediate the finding reported. + * @return the value + **/ + public String getOneline() { + return oneline; + } + /** * Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, a STIG rule, or a GDPR Article/Recital. **/ @@ -803,6 +840,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", remarks=").append(String.valueOf(this.remarks)); sb.append(", details=").append(String.valueOf(this.details)); sb.append(", summary=").append(String.valueOf(this.summary)); + sb.append(", oneline=").append(String.valueOf(this.oneline)); sb.append(", references=").append(String.valueOf(this.references)); sb.append(", oracleDefinedSeverity=").append(String.valueOf(this.oracleDefinedSeverity)); sb.append(", isRiskModified=").append(String.valueOf(this.isRiskModified)); @@ -836,6 +874,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.remarks, other.remarks) && java.util.Objects.equals(this.details, other.details) && java.util.Objects.equals(this.summary, other.summary) + && java.util.Objects.equals(this.oneline, other.oneline) && java.util.Objects.equals(this.references, other.references) && java.util.Objects.equals(this.oracleDefinedSeverity, other.oracleDefinedSeverity) && java.util.Objects.equals(this.isRiskModified, other.isRiskModified) @@ -862,6 +901,7 @@ public int hashCode() { result = (result * PRIME) + (this.remarks == null ? 43 : this.remarks.hashCode()); result = (result * PRIME) + (this.details == null ? 43 : this.details.hashCode()); result = (result * PRIME) + (this.summary == null ? 43 : this.summary.hashCode()); + result = (result * PRIME) + (this.oneline == null ? 43 : this.oneline.hashCode()); result = (result * PRIME) + (this.references == null ? 43 : this.references.hashCode()); result = (result * PRIME) diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/GenerateReportDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/GenerateReportDetails.java index afb0ae5969d..d656cd0c6a7 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/GenerateReportDetails.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/GenerateReportDetails.java @@ -123,13 +123,13 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * Specifies the format of report to be .xls or .pdf + * Specifies the format of report to be .xls or .pdf or .json **/ @com.fasterxml.jackson.annotation.JsonProperty("mimeType") private MimeType mimeType; /** - * Specifies the format of report to be .xls or .pdf + * Specifies the format of report to be .xls or .pdf or .json * @param mimeType the value to set * @return this builder **/ @@ -309,11 +309,12 @@ public String getCompartmentId() { } /** - * Specifies the format of report to be .xls or .pdf + * Specifies the format of report to be .xls or .pdf or .json **/ public enum MimeType { Pdf("PDF"), Xls("XLS"), + Json("JSON"), ; private final String value; @@ -344,13 +345,13 @@ public static MimeType create(String key) { } }; /** - * Specifies the format of report to be .xls or .pdf + * Specifies the format of report to be .xls or .pdf or .json **/ @com.fasterxml.jackson.annotation.JsonProperty("mimeType") private final MimeType mimeType; /** - * Specifies the format of report to be .xls or .pdf + * Specifies the format of report to be .xls or .pdf or .json * @return the value **/ public MimeType getMimeType() { diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ListSelectionMode.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ListSelectionMode.java new file mode 100644 index 00000000000..c63de2d9b15 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ListSelectionMode.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * Indicates that the selection is a list of resource ocids. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ListSelectionMode.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "selectionMode" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ListSelectionMode extends SelectionDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * * Array of the violation log ocids to be selected in case of allowed SQLs bulk create. + * * Array of the allowed SQL ocids to be selected in case of allowed SQLs bulk delete. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * * Array of the violation log ocids to be selected in case of allowed SQLs bulk create. + * * Array of the allowed SQL ocids to be selected in case of allowed SQLs bulk delete. + * + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ListSelectionMode build() { + ListSelectionMode model = new ListSelectionMode(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ListSelectionMode model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ListSelectionMode(java.util.List items) { + super(); + this.items = items; + } + + /** + * * Array of the violation log ocids to be selected in case of allowed SQLs bulk create. + * * Array of the allowed SQL ocids to be selected in case of allowed SQLs bulk delete. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * * Array of the violation log ocids to be selected in case of allowed SQLs bulk create. + * * Array of the allowed SQL ocids to be selected in case of allowed SQLs bulk delete. + * + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ListSelectionMode("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSelectionMode)) { + return false; + } + + ListSelectionMode other = (ListSelectionMode) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/LogType.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/LogType.java new file mode 100644 index 00000000000..b0f7edbf505 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/LogType.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * The type of log to be added as an allowed sql. Allowed values are + * - VIOLATION_LOG + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public enum LogType { + ViolationLog("VIOLATION_LOG"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LogType v : LogType.values()) { + map.put(v.getValue(), v); + } + } + + LogType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LogType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid LogType: " + key); + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/PatchSqlFirewallAllowedSqlDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/PatchSqlFirewallAllowedSqlDetails.java new file mode 100644 index 00000000000..ff7318510e2 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/PatchSqlFirewallAllowedSqlDetails.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * The details used to delete multiple allowed sqls. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PatchSqlFirewallAllowedSqlDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchSqlFirewallAllowedSqlDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items", "sqlFirewallPolicyId"}) + public PatchSqlFirewallAllowedSqlDetails( + java.util.List items, String sqlFirewallPolicyId) { + super(); + this.items = items; + this.sqlFirewallPolicyId = sqlFirewallPolicyId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * An array of patch instructions. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * An array of patch instructions. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + /** + * The OCID of the SQL firewall policy whose allowed SQL needs to be deleted. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sqlFirewallPolicyId") + private String sqlFirewallPolicyId; + + /** + * The OCID of the SQL firewall policy whose allowed SQL needs to be deleted. + * @param sqlFirewallPolicyId the value to set + * @return this builder + **/ + public Builder sqlFirewallPolicyId(String sqlFirewallPolicyId) { + this.sqlFirewallPolicyId = sqlFirewallPolicyId; + this.__explicitlySet__.add("sqlFirewallPolicyId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PatchSqlFirewallAllowedSqlDetails build() { + PatchSqlFirewallAllowedSqlDetails model = + new PatchSqlFirewallAllowedSqlDetails(this.items, this.sqlFirewallPolicyId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchSqlFirewallAllowedSqlDetails model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + if (model.wasPropertyExplicitlySet("sqlFirewallPolicyId")) { + this.sqlFirewallPolicyId(model.getSqlFirewallPolicyId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * An array of patch instructions. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * An array of patch instructions. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + /** + * The OCID of the SQL firewall policy whose allowed SQL needs to be deleted. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sqlFirewallPolicyId") + private final String sqlFirewallPolicyId; + + /** + * The OCID of the SQL firewall policy whose allowed SQL needs to be deleted. + * @return the value + **/ + public String getSqlFirewallPolicyId() { + return sqlFirewallPolicyId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PatchSqlFirewallAllowedSqlDetails("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(", sqlFirewallPolicyId=").append(String.valueOf(this.sqlFirewallPolicyId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchSqlFirewallAllowedSqlDetails)) { + return false; + } + + PatchSqlFirewallAllowedSqlDetails other = (PatchSqlFirewallAllowedSqlDetails) o; + return java.util.Objects.equals(this.items, other.items) + && java.util.Objects.equals(this.sqlFirewallPolicyId, other.sqlFirewallPolicyId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = + (result * PRIME) + + (this.sqlFirewallPolicyId == null + ? 43 + : this.sqlFirewallPolicyId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/References.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/References.java index 99a56112d7f..077da7a14a7 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/References.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/References.java @@ -5,7 +5,7 @@ package com.oracle.bmc.datasafe.model; /** - * References to the sections of STIG, CIS, and/or GDPR relevant to the current finding. + * References to the sections of STIG, CIS, GDPR and/or OBP relevant to the current finding. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -19,12 +19,13 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class References extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"stig", "cis", "gdpr"}) - public References(String stig, String cis, String gdpr) { + @java.beans.ConstructorProperties({"stig", "cis", "gdpr", "obp"}) + public References(String stig, String cis, String gdpr, String obp) { super(); this.stig = stig; this.cis = cis; this.gdpr = gdpr; + this.obp = obp; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -77,12 +78,28 @@ public Builder gdpr(String gdpr) { this.__explicitlySet__.add("gdpr"); return this; } + /** + * Relevant section from OBP. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("obp") + private String obp; + + /** + * Relevant section from OBP. + * @param obp the value to set + * @return this builder + **/ + public Builder obp(String obp) { + this.obp = obp; + this.__explicitlySet__.add("obp"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public References build() { - References model = new References(this.stig, this.cis, this.gdpr); + References model = new References(this.stig, this.cis, this.gdpr, this.obp); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -100,6 +117,9 @@ public Builder copy(References model) { if (model.wasPropertyExplicitlySet("gdpr")) { this.gdpr(model.getGdpr()); } + if (model.wasPropertyExplicitlySet("obp")) { + this.obp(model.getObp()); + } return this; } } @@ -157,6 +177,20 @@ public String getGdpr() { return gdpr; } + /** + * Relevant section from OBP. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("obp") + private final String obp; + + /** + * Relevant section from OBP. + * @return the value + **/ + public String getObp() { + return obp; + } + @Override public String toString() { return this.toString(true); @@ -174,6 +208,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("stig=").append(String.valueOf(this.stig)); sb.append(", cis=").append(String.valueOf(this.cis)); sb.append(", gdpr=").append(String.valueOf(this.gdpr)); + sb.append(", obp=").append(String.valueOf(this.obp)); sb.append(")"); return sb.toString(); } @@ -191,6 +226,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.stig, other.stig) && java.util.Objects.equals(this.cis, other.cis) && java.util.Objects.equals(this.gdpr, other.gdpr) + && java.util.Objects.equals(this.obp, other.obp) && super.equals(other); } @@ -201,6 +237,7 @@ public int hashCode() { result = (result * PRIME) + (this.stig == null ? 43 : this.stig.hashCode()); result = (result * PRIME) + (this.cis == null ? 43 : this.cis.hashCode()); result = (result * PRIME) + (this.gdpr == null ? 43 : this.gdpr.hashCode()); + result = (result * PRIME) + (this.obp == null ? 43 : this.obp.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/Report.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/Report.java index 8c163a13a3b..3a30ebebb76 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/Report.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/Report.java @@ -29,6 +29,7 @@ public final class Report extends com.oracle.bmc.http.internal.ExplicitlySetBmcM "timeGenerated", "lifecycleState", "type", + "lifecycleDetails", "freeformTags", "definedTags", "systemTags" @@ -43,6 +44,7 @@ public Report( java.util.Date timeGenerated, ReportLifecycleState lifecycleState, ReportType type, + String lifecycleDetails, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags) { @@ -56,6 +58,7 @@ public Report( this.timeGenerated = timeGenerated; this.lifecycleState = lifecycleState; this.type = type; + this.lifecycleDetails = lifecycleDetails; this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; @@ -144,13 +147,13 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * Specifies the format of report to be .xls or .pdf + * Specifies the format of report to be .xls or .pdf or .json **/ @com.fasterxml.jackson.annotation.JsonProperty("mimeType") private MimeType mimeType; /** - * Specifies the format of report to be .xls or .pdf + * Specifies the format of report to be .xls or .pdf or .json * @param mimeType the value to set * @return this builder **/ @@ -207,6 +210,22 @@ public Builder type(ReportType type) { this.__explicitlySet__.add("type"); return this; } + /** + * Details about the current state of the report in Data Safe. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Details about the current state of the report in Data Safe. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) *

@@ -288,6 +307,7 @@ public Report build() { this.timeGenerated, this.lifecycleState, this.type, + this.lifecycleDetails, this.freeformTags, this.definedTags, this.systemTags); @@ -326,6 +346,9 @@ public Builder copy(Report model) { if (model.wasPropertyExplicitlySet("type")) { this.type(model.getType()); } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -421,11 +444,12 @@ public String getCompartmentId() { } /** - * Specifies the format of report to be .xls or .pdf + * Specifies the format of report to be .xls or .pdf or .json **/ public enum MimeType { Pdf("PDF"), Xls("XLS"), + Json("JSON"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -469,13 +493,13 @@ public static MimeType create(String key) { } }; /** - * Specifies the format of report to be .xls or .pdf + * Specifies the format of report to be .xls or .pdf or .json **/ @com.fasterxml.jackson.annotation.JsonProperty("mimeType") private final MimeType mimeType; /** - * Specifies the format of report to be .xls or .pdf + * Specifies the format of report to be .xls or .pdf or .json * @return the value **/ public MimeType getMimeType() { @@ -524,6 +548,20 @@ public ReportType getType() { return type; } + /** + * Details about the current state of the report in Data Safe. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Details about the current state of the report in Data Safe. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) *

@@ -605,6 +643,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeGenerated=").append(String.valueOf(this.timeGenerated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); @@ -631,6 +670,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeGenerated, other.timeGenerated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) @@ -660,6 +700,9 @@ public int hashCode() { (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportDefinition.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportDefinition.java index 18d10bb3513..23cf2bcbd98 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportDefinition.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportDefinition.java @@ -44,6 +44,7 @@ public final class ReportDefinition extends com.oracle.bmc.http.internal.Explici "scheduledReportCompartmentId", "recordTimeSpan", "complianceStandards", + "lifecycleDetails", "freeformTags", "definedTags", "systemTags" @@ -73,6 +74,7 @@ public ReportDefinition( String scheduledReportCompartmentId, String recordTimeSpan, java.util.List complianceStandards, + String lifecycleDetails, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags) { @@ -101,6 +103,7 @@ public ReportDefinition( this.scheduledReportCompartmentId = scheduledReportCompartmentId; this.recordTimeSpan = recordTimeSpan; this.complianceStandards = complianceStandards; + this.lifecycleDetails = lifecycleDetails; this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; @@ -425,13 +428,13 @@ public Builder schedule(String schedule) { return this; } /** - * Specifies the format of the report ( either .xls or .pdf ) + * Specifies the format of the report ( either .xls or .pdf or .json) **/ @com.fasterxml.jackson.annotation.JsonProperty("scheduledReportMimeType") private ScheduledReportMimeType scheduledReportMimeType; /** - * Specifies the format of the report ( either .xls or .pdf ) + * Specifies the format of the report ( either .xls or .pdf or .json) * @param scheduledReportMimeType the value to set * @return this builder **/ @@ -540,6 +543,22 @@ public Builder complianceStandards(java.util.List complianceStandards) { this.__explicitlySet__.add("complianceStandards"); return this; } + /** + * Details about the current state of the report definition in Data Safe. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Details about the current state of the report definition in Data Safe. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) *

@@ -636,6 +655,7 @@ public ReportDefinition build() { this.scheduledReportCompartmentId, this.recordTimeSpan, this.complianceStandards, + this.lifecycleDetails, this.freeformTags, this.definedTags, this.systemTags); @@ -719,6 +739,9 @@ public Builder copy(ReportDefinition model) { if (model.wasPropertyExplicitlySet("complianceStandards")) { this.complianceStandards(model.getComplianceStandards()); } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -1075,11 +1098,12 @@ public String getSchedule() { } /** - * Specifies the format of the report ( either .xls or .pdf ) + * Specifies the format of the report ( either .xls or .pdf or .json) **/ public enum ScheduledReportMimeType { Pdf("PDF"), Xls("XLS"), + Json("JSON"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -1123,13 +1147,13 @@ public static ScheduledReportMimeType create(String key) { } }; /** - * Specifies the format of the report ( either .xls or .pdf ) + * Specifies the format of the report ( either .xls or .pdf or .json) **/ @com.fasterxml.jackson.annotation.JsonProperty("scheduledReportMimeType") private final ScheduledReportMimeType scheduledReportMimeType; /** - * Specifies the format of the report ( either .xls or .pdf ) + * Specifies the format of the report ( either .xls or .pdf or .json) * @return the value **/ public ScheduledReportMimeType getScheduledReportMimeType() { @@ -1226,6 +1250,20 @@ public java.util.List getComplianceStandards() { return complianceStandards; } + /** + * Details about the current state of the report definition in Data Safe. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Details about the current state of the report definition in Data Safe. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) *

@@ -1325,6 +1363,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.scheduledReportCompartmentId)); sb.append(", recordTimeSpan=").append(String.valueOf(this.recordTimeSpan)); sb.append(", complianceStandards=").append(String.valueOf(this.complianceStandards)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); @@ -1369,6 +1408,7 @@ public boolean equals(Object o) { this.scheduledReportCompartmentId, other.scheduledReportCompartmentId) && java.util.Objects.equals(this.recordTimeSpan, other.recordTimeSpan) && java.util.Objects.equals(this.complianceStandards, other.complianceStandards) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) @@ -1433,6 +1473,9 @@ public int hashCode() { + (this.complianceStandards == null ? 43 : this.complianceStandards.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportDefinitionLifecycleState.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportDefinitionLifecycleState.java index cd1b7f1d23e..5fc30e37c86 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportDefinitionLifecycleState.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportDefinitionLifecycleState.java @@ -14,6 +14,7 @@ public enum ReportDefinitionLifecycleState { Active("ACTIVE"), Deleting("DELETING"), Deleted("DELETED"), + Failed("FAILED"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportLifecycleState.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportLifecycleState.java index 01ef74a279f..2deaf842c81 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportLifecycleState.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportLifecycleState.java @@ -11,6 +11,8 @@ public enum ReportLifecycleState { Updating("UPDATING"), Active("ACTIVE"), + Creating("CREATING"), + Failed("FAILED"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportSummary.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportSummary.java index e13ab78c15e..ca3f844259c 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportSummary.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ReportSummary.java @@ -125,13 +125,13 @@ public Builder description(String description) { return this; } /** - * Specifies the format of report to be .xls or .pdf. + * Specifies the format of report to be .xls or .pdf or .json. **/ @com.fasterxml.jackson.annotation.JsonProperty("mimeType") private MimeType mimeType; /** - * Specifies the format of report to be .xls or .pdf. + * Specifies the format of report to be .xls or .pdf or .json. * @param mimeType the value to set * @return this builder **/ @@ -380,11 +380,12 @@ public String getDescription() { } /** - * Specifies the format of report to be .xls or .pdf. + * Specifies the format of report to be .xls or .pdf or .json. **/ public enum MimeType { Pdf("PDF"), Xls("XLS"), + Json("JSON"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -428,13 +429,13 @@ public static MimeType create(String key) { } }; /** - * Specifies the format of report to be .xls or .pdf. + * Specifies the format of report to be .xls or .pdf or .json. **/ @com.fasterxml.jackson.annotation.JsonProperty("mimeType") private final MimeType mimeType; /** - * Specifies the format of report to be .xls or .pdf. + * Specifies the format of report to be .xls or .pdf or .json. * @return the value **/ public MimeType getMimeType() { diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ScheduleReportDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ScheduleReportDetails.java index 20f3a589baa..693a782442e 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ScheduleReportDetails.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ScheduleReportDetails.java @@ -106,13 +106,13 @@ public Builder schedule(String schedule) { return this; } /** - * Specifies if the report will be in .xls or .pdf format + * Specifies if the report will be in .xls or .pdf or .json format **/ @com.fasterxml.jackson.annotation.JsonProperty("mimeType") private MimeType mimeType; /** - * Specifies if the report will be in .xls or .pdf format + * Specifies if the report will be in .xls or .pdf or .json format * @param mimeType the value to set * @return this builder **/ @@ -257,11 +257,12 @@ public String getSchedule() { } /** - * Specifies if the report will be in .xls or .pdf format + * Specifies if the report will be in .xls or .pdf or .json format **/ public enum MimeType { Pdf("PDF"), Xls("XLS"), + Json("JSON"), ; private final String value; @@ -292,13 +293,13 @@ public static MimeType create(String key) { } }; /** - * Specifies if the report will be in .xls or .pdf format + * Specifies if the report will be in .xls or .pdf or .json format **/ @com.fasterxml.jackson.annotation.JsonProperty("mimeType") private final MimeType mimeType; /** - * Specifies if the report will be in .xls or .pdf format + * Specifies if the report will be in .xls or .pdf or .json format * @return the value **/ public MimeType getMimeType() { diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ScimQuerySelectionMode.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ScimQuerySelectionMode.java new file mode 100644 index 00000000000..c58a3339f43 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/ScimQuerySelectionMode.java @@ -0,0 +1,166 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * Indicates that the selection is a scimQuery. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ScimQuerySelectionMode.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "selectionMode" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ScimQuerySelectionMode extends SelectionDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 + * of the System for Cross-Domain Identity Management (SCIM) specification, which is available + * at [RFC3339](https://tools.ietf.org/html/draft-ietf-scim-api-12). In SCIM filtering expressions, + * text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. + * (Numeric and boolean values should not be quoted.) + *

+ **Example:** query=(dbUserName eq "PAY_APP") + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scimQuery") + private String scimQuery; + + /** + * The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 + * of the System for Cross-Domain Identity Management (SCIM) specification, which is available + * at [RFC3339](https://tools.ietf.org/html/draft-ietf-scim-api-12). In SCIM filtering expressions, + * text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. + * (Numeric and boolean values should not be quoted.) + *

+ **Example:** query=(dbUserName eq "PAY_APP") + * + * @param scimQuery the value to set + * @return this builder + **/ + public Builder scimQuery(String scimQuery) { + this.scimQuery = scimQuery; + this.__explicitlySet__.add("scimQuery"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ScimQuerySelectionMode build() { + ScimQuerySelectionMode model = new ScimQuerySelectionMode(this.scimQuery); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ScimQuerySelectionMode model) { + if (model.wasPropertyExplicitlySet("scimQuery")) { + this.scimQuery(model.getScimQuery()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ScimQuerySelectionMode(String scimQuery) { + super(); + this.scimQuery = scimQuery; + } + + /** + * The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 + * of the System for Cross-Domain Identity Management (SCIM) specification, which is available + * at [RFC3339](https://tools.ietf.org/html/draft-ietf-scim-api-12). In SCIM filtering expressions, + * text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. + * (Numeric and boolean values should not be quoted.) + *

+ **Example:** query=(dbUserName eq "PAY_APP") + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scimQuery") + private final String scimQuery; + + /** + * The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 + * of the System for Cross-Domain Identity Management (SCIM) specification, which is available + * at [RFC3339](https://tools.ietf.org/html/draft-ietf-scim-api-12). In SCIM filtering expressions, + * text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. + * (Numeric and boolean values should not be quoted.) + *

+ **Example:** query=(dbUserName eq "PAY_APP") + * + * @return the value + **/ + public String getScimQuery() { + return scimQuery; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ScimQuerySelectionMode("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", scimQuery=").append(String.valueOf(this.scimQuery)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ScimQuerySelectionMode)) { + return false; + } + + ScimQuerySelectionMode other = (ScimQuerySelectionMode) o; + return java.util.Objects.equals(this.scimQuery, other.scimQuery) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.scimQuery == null ? 43 : this.scimQuery.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SecurityAssessment.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SecurityAssessment.java index 826ab9c8baf..f328cdb7d2e 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SecurityAssessment.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SecurityAssessment.java @@ -43,6 +43,7 @@ public final class SecurityAssessment extends com.oracle.bmc.http.internal.Expli "scheduleSecurityAssessmentId", "triggeredBy", "description", + "isAssessmentScheduled", "schedule", "link", "type", @@ -70,6 +71,7 @@ public SecurityAssessment( String scheduleSecurityAssessmentId, TriggeredBy triggeredBy, String description, + Boolean isAssessmentScheduled, String schedule, String link, Type type, @@ -96,6 +98,7 @@ public SecurityAssessment( this.scheduleSecurityAssessmentId = scheduleSecurityAssessmentId; this.triggeredBy = triggeredBy; this.description = description; + this.isAssessmentScheduled = isAssessmentScheduled; this.schedule = schedule; this.link = link; this.type = type; @@ -403,6 +406,22 @@ public Builder description(String description) { this.__explicitlySet__.add("description"); return this; } + /** + * Indicates whether the assessment is scheduled to run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAssessmentScheduled") + private Boolean isAssessmentScheduled; + + /** + * Indicates whether the assessment is scheduled to run. + * @param isAssessmentScheduled the value to set + * @return this builder + **/ + public Builder isAssessmentScheduled(Boolean isAssessmentScheduled) { + this.isAssessmentScheduled = isAssessmentScheduled; + this.__explicitlySet__.add("isAssessmentScheduled"); + return this; + } /** * Schedule to save the assessment periodically in the specified format: * ; @@ -596,6 +615,7 @@ public SecurityAssessment build() { this.scheduleSecurityAssessmentId, this.triggeredBy, this.description, + this.isAssessmentScheduled, this.schedule, this.link, this.type, @@ -665,6 +685,9 @@ public Builder copy(SecurityAssessment model) { if (model.wasPropertyExplicitlySet("description")) { this.description(model.getDescription()); } + if (model.wasPropertyExplicitlySet("isAssessmentScheduled")) { + this.isAssessmentScheduled(model.getIsAssessmentScheduled()); + } if (model.wasPropertyExplicitlySet("schedule")) { this.schedule(model.getSchedule()); } @@ -1009,6 +1032,20 @@ public String getDescription() { return description; } + /** + * Indicates whether the assessment is scheduled to run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAssessmentScheduled") + private final Boolean isAssessmentScheduled; + + /** + * Indicates whether the assessment is scheduled to run. + * @return the value + **/ + public Boolean getIsAssessmentScheduled() { + return isAssessmentScheduled; + } + /** * Schedule to save the assessment periodically in the specified format: * ; @@ -1251,6 +1288,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.scheduleSecurityAssessmentId)); sb.append(", triggeredBy=").append(String.valueOf(this.triggeredBy)); sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", isAssessmentScheduled=").append(String.valueOf(this.isAssessmentScheduled)); sb.append(", schedule=").append(String.valueOf(this.schedule)); sb.append(", link=").append(String.valueOf(this.link)); sb.append(", type=").append(String.valueOf(this.type)); @@ -1293,6 +1331,7 @@ public boolean equals(Object o) { this.scheduleSecurityAssessmentId, other.scheduleSecurityAssessmentId) && java.util.Objects.equals(this.triggeredBy, other.triggeredBy) && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.isAssessmentScheduled, other.isAssessmentScheduled) && java.util.Objects.equals(this.schedule, other.schedule) && java.util.Objects.equals(this.link, other.link) && java.util.Objects.equals(this.type, other.type) @@ -1353,6 +1392,11 @@ public int hashCode() { : this.scheduleSecurityAssessmentId.hashCode()); result = (result * PRIME) + (this.triggeredBy == null ? 43 : this.triggeredBy.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.isAssessmentScheduled == null + ? 43 + : this.isAssessmentScheduled.hashCode()); result = (result * PRIME) + (this.schedule == null ? 43 : this.schedule.hashCode()); result = (result * PRIME) + (this.link == null ? 43 : this.link.hashCode()); result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SelectionDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SelectionDetails.java new file mode 100644 index 00000000000..4d48ca56d90 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SelectionDetails.java @@ -0,0 +1,120 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * Details of the items to be selected and the mode of selection. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "selectionMode", + defaultImpl = SelectionDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ListSelectionMode.class, + name = "LIST" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ScimQuerySelectionMode.class, + name = "SCIM_QUERY" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class SelectionDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected SelectionDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SelectionDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SelectionDetails)) { + return false; + } + + SelectionDetails other = (SelectionDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The mode of selection of items, whether it is a list of ocids or a scimQuery. Allowed values: + * - LIST + * - SCIM_QUERY + * + **/ + public enum SelectionMode { + List("LIST"), + ScimQuery("SCIM_QUERY"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SelectionMode v : SelectionMode.values()) { + map.put(v.getValue(), v); + } + } + + SelectionMode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SelectionMode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SelectionMode: " + key); + } + }; +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveDataModel.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveDataModel.java index fc2f4f72b45..7021965307f 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveDataModel.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveDataModel.java @@ -36,6 +36,7 @@ public final class SensitiveDataModel extends com.oracle.bmc.http.internal.Expli "appSuiteName", "description", "schemasForDiscovery", + "tablesForDiscovery", "sensitiveTypeIdsForDiscovery", "isSampleDataCollectionEnabled", "isAppDefinedRelationDiscoveryEnabled", @@ -56,6 +57,7 @@ public SensitiveDataModel( String appSuiteName, String description, java.util.List schemasForDiscovery, + java.util.List tablesForDiscovery, java.util.List sensitiveTypeIdsForDiscovery, Boolean isSampleDataCollectionEnabled, Boolean isAppDefinedRelationDiscoveryEnabled, @@ -75,6 +77,7 @@ public SensitiveDataModel( this.appSuiteName = appSuiteName; this.description = description; this.schemasForDiscovery = schemasForDiscovery; + this.tablesForDiscovery = tablesForDiscovery; this.sensitiveTypeIdsForDiscovery = sensitiveTypeIdsForDiscovery; this.isSampleDataCollectionEnabled = isSampleDataCollectionEnabled; this.isAppDefinedRelationDiscoveryEnabled = isAppDefinedRelationDiscoveryEnabled; @@ -255,6 +258,28 @@ public Builder schemasForDiscovery(java.util.List schemasForDiscovery) { this.__explicitlySet__.add("schemasForDiscovery"); return this; } + /** + * The data discovery jobs will scan the tables specified here, including both schemas and tables. + * For instance, the input could be in the format: [{schemaName: "HR", tableName: ["T1", "T2"]}, {schemaName: + * "OE", tableName : ["T3", "T4"]}]. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tablesForDiscovery") + private java.util.List tablesForDiscovery; + + /** + * The data discovery jobs will scan the tables specified here, including both schemas and tables. + * For instance, the input could be in the format: [{schemaName: "HR", tableName: ["T1", "T2"]}, {schemaName: + * "OE", tableName : ["T3", "T4"]}]. + * + * @param tablesForDiscovery the value to set + * @return this builder + **/ + public Builder tablesForDiscovery(java.util.List tablesForDiscovery) { + this.tablesForDiscovery = tablesForDiscovery; + this.__explicitlySet__.add("tablesForDiscovery"); + return this; + } /** * The OCIDs of the sensitive types to be used by data discovery jobs. **/ @@ -447,6 +472,7 @@ public SensitiveDataModel build() { this.appSuiteName, this.description, this.schemasForDiscovery, + this.tablesForDiscovery, this.sensitiveTypeIdsForDiscovery, this.isSampleDataCollectionEnabled, this.isAppDefinedRelationDiscoveryEnabled, @@ -493,6 +519,9 @@ public Builder copy(SensitiveDataModel model) { if (model.wasPropertyExplicitlySet("schemasForDiscovery")) { this.schemasForDiscovery(model.getSchemasForDiscovery()); } + if (model.wasPropertyExplicitlySet("tablesForDiscovery")) { + this.tablesForDiscovery(model.getTablesForDiscovery()); + } if (model.wasPropertyExplicitlySet("sensitiveTypeIdsForDiscovery")) { this.sensitiveTypeIdsForDiscovery(model.getSensitiveTypeIdsForDiscovery()); } @@ -681,6 +710,26 @@ public java.util.List getSchemasForDiscovery() { return schemasForDiscovery; } + /** + * The data discovery jobs will scan the tables specified here, including both schemas and tables. + * For instance, the input could be in the format: [{schemaName: "HR", tableName: ["T1", "T2"]}, {schemaName: + * "OE", tableName : ["T3", "T4"]}]. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tablesForDiscovery") + private final java.util.List tablesForDiscovery; + + /** + * The data discovery jobs will scan the tables specified here, including both schemas and tables. + * For instance, the input could be in the format: [{schemaName: "HR", tableName: ["T1", "T2"]}, {schemaName: + * "OE", tableName : ["T3", "T4"]}]. + * + * @return the value + **/ + public java.util.List getTablesForDiscovery() { + return tablesForDiscovery; + } + /** * The OCIDs of the sensitive types to be used by data discovery jobs. **/ @@ -861,6 +910,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", appSuiteName=").append(String.valueOf(this.appSuiteName)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", schemasForDiscovery=").append(String.valueOf(this.schemasForDiscovery)); + sb.append(", tablesForDiscovery=").append(String.valueOf(this.tablesForDiscovery)); sb.append(", sensitiveTypeIdsForDiscovery=") .append(String.valueOf(this.sensitiveTypeIdsForDiscovery)); sb.append(", isSampleDataCollectionEnabled=") @@ -897,6 +947,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.appSuiteName, other.appSuiteName) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.schemasForDiscovery, other.schemasForDiscovery) + && java.util.Objects.equals(this.tablesForDiscovery, other.tablesForDiscovery) && java.util.Objects.equals( this.sensitiveTypeIdsForDiscovery, other.sensitiveTypeIdsForDiscovery) && java.util.Objects.equals( @@ -935,6 +986,11 @@ public int hashCode() { + (this.schemasForDiscovery == null ? 43 : this.schemasForDiscovery.hashCode()); + result = + (result * PRIME) + + (this.tablesForDiscovery == null + ? 43 + : this.tablesForDiscovery.hashCode()); result = (result * PRIME) + (this.sensitiveTypeIdsForDiscovery == null diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveDataModelSensitiveTypeCollection.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveDataModelSensitiveTypeCollection.java new file mode 100644 index 00000000000..e7064b31e84 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveDataModelSensitiveTypeCollection.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * A collection of sensitive types summary objects present in a sensitive data model. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SensitiveDataModelSensitiveTypeCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SensitiveDataModelSensitiveTypeCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public SensitiveDataModelSensitiveTypeCollection( + java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * An array of sensitive types summary objects present in a sensitive data model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * An array of sensitive types summary objects present in a sensitive data model. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SensitiveDataModelSensitiveTypeCollection build() { + SensitiveDataModelSensitiveTypeCollection model = + new SensitiveDataModelSensitiveTypeCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SensitiveDataModelSensitiveTypeCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * An array of sensitive types summary objects present in a sensitive data model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * An array of sensitive types summary objects present in a sensitive data model. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SensitiveDataModelSensitiveTypeCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SensitiveDataModelSensitiveTypeCollection)) { + return false; + } + + SensitiveDataModelSensitiveTypeCollection other = + (SensitiveDataModelSensitiveTypeCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveDataModelSensitiveTypeSummary.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveDataModelSensitiveTypeSummary.java new file mode 100644 index 00000000000..c9babacb2e2 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SensitiveDataModelSensitiveTypeSummary.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * Summary of sensitive types present in a sensitive data model. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SensitiveDataModelSensitiveTypeSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SensitiveDataModelSensitiveTypeSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"sensitiveTypeId", "count"}) + public SensitiveDataModelSensitiveTypeSummary(String sensitiveTypeId, Long count) { + super(); + this.sensitiveTypeId = sensitiveTypeId; + this.count = count; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the sensitive type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveTypeId") + private String sensitiveTypeId; + + /** + * The OCID of the sensitive type. + * @param sensitiveTypeId the value to set + * @return this builder + **/ + public Builder sensitiveTypeId(String sensitiveTypeId) { + this.sensitiveTypeId = sensitiveTypeId; + this.__explicitlySet__.add("sensitiveTypeId"); + return this; + } + /** + * The total number of sensitive columns linked to this specific sensitive type . + **/ + @com.fasterxml.jackson.annotation.JsonProperty("count") + private Long count; + + /** + * The total number of sensitive columns linked to this specific sensitive type . + * @param count the value to set + * @return this builder + **/ + public Builder count(Long count) { + this.count = count; + this.__explicitlySet__.add("count"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SensitiveDataModelSensitiveTypeSummary build() { + SensitiveDataModelSensitiveTypeSummary model = + new SensitiveDataModelSensitiveTypeSummary(this.sensitiveTypeId, this.count); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SensitiveDataModelSensitiveTypeSummary model) { + if (model.wasPropertyExplicitlySet("sensitiveTypeId")) { + this.sensitiveTypeId(model.getSensitiveTypeId()); + } + if (model.wasPropertyExplicitlySet("count")) { + this.count(model.getCount()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the sensitive type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sensitiveTypeId") + private final String sensitiveTypeId; + + /** + * The OCID of the sensitive type. + * @return the value + **/ + public String getSensitiveTypeId() { + return sensitiveTypeId; + } + + /** + * The total number of sensitive columns linked to this specific sensitive type . + **/ + @com.fasterxml.jackson.annotation.JsonProperty("count") + private final Long count; + + /** + * The total number of sensitive columns linked to this specific sensitive type . + * @return the value + **/ + public Long getCount() { + return count; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SensitiveDataModelSensitiveTypeSummary("); + sb.append("super=").append(super.toString()); + sb.append("sensitiveTypeId=").append(String.valueOf(this.sensitiveTypeId)); + sb.append(", count=").append(String.valueOf(this.count)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SensitiveDataModelSensitiveTypeSummary)) { + return false; + } + + SensitiveDataModelSensitiveTypeSummary other = (SensitiveDataModelSensitiveTypeSummary) o; + return java.util.Objects.equals(this.sensitiveTypeId, other.sensitiveTypeId) + && java.util.Objects.equals(this.count, other.count) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.sensitiveTypeId == null ? 43 : this.sensitiveTypeId.hashCode()); + result = (result * PRIME) + (this.count == null ? 43 : this.count.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SqlFirewallAllowedSql.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SqlFirewallAllowedSql.java new file mode 100644 index 00000000000..e8b66100507 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SqlFirewallAllowedSql.java @@ -0,0 +1,892 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * The resource represents a SQL Firewall allowed SQL in Data Safe. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SqlFirewallAllowedSql.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SqlFirewallAllowedSql + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "description", + "sqlFirewallPolicyId", + "currentUser", + "dbUserName", + "sqlText", + "sqlLevel", + "sqlAccessedObjects", + "version", + "timeCollected", + "timeUpdated", + "lifecycleState", + "freeformTags", + "definedTags", + "systemTags" + }) + public SqlFirewallAllowedSql( + String id, + String compartmentId, + String displayName, + String description, + String sqlFirewallPolicyId, + String currentUser, + String dbUserName, + String sqlText, + SqlLevel sqlLevel, + java.util.List sqlAccessedObjects, + Float version, + java.util.Date timeCollected, + java.util.Date timeUpdated, + SqlFirewallAllowedSqlLifecycleState lifecycleState, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.description = description; + this.sqlFirewallPolicyId = sqlFirewallPolicyId; + this.currentUser = currentUser; + this.dbUserName = dbUserName; + this.sqlText = sqlText; + this.sqlLevel = sqlLevel; + this.sqlAccessedObjects = sqlAccessedObjects; + this.version = version; + this.timeCollected = timeCollected; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the SQL Firewall allowed SQL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the SQL Firewall allowed SQL. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The OCID of the compartment containing the SQL Firewall allowed SQL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment containing the SQL Firewall allowed SQL. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The display name of the SQL Firewall allowed SQL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the SQL Firewall allowed SQL. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The description of the SQL Firewall allowed SQL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description of the SQL Firewall allowed SQL. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The OCID of the SQL Firewall policy corresponding to the SQL Firewall allowed SQL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sqlFirewallPolicyId") + private String sqlFirewallPolicyId; + + /** + * The OCID of the SQL Firewall policy corresponding to the SQL Firewall allowed SQL. + * @param sqlFirewallPolicyId the value to set + * @return this builder + **/ + public Builder sqlFirewallPolicyId(String sqlFirewallPolicyId) { + this.sqlFirewallPolicyId = sqlFirewallPolicyId; + this.__explicitlySet__.add("sqlFirewallPolicyId"); + return this; + } + /** + * The name of the user that SQL was executed as. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("currentUser") + private String currentUser; + + /** + * The name of the user that SQL was executed as. + * @param currentUser the value to set + * @return this builder + **/ + public Builder currentUser(String currentUser) { + this.currentUser = currentUser; + this.__explicitlySet__.add("currentUser"); + return this; + } + /** + * The database user name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbUserName") + private String dbUserName; + + /** + * The database user name. + * @param dbUserName the value to set + * @return this builder + **/ + public Builder dbUserName(String dbUserName) { + this.dbUserName = dbUserName; + this.__explicitlySet__.add("dbUserName"); + return this; + } + /** + * The SQL text of the SQL Firewall allowed SQL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sqlText") + private String sqlText; + + /** + * The SQL text of the SQL Firewall allowed SQL. + * @param sqlText the value to set + * @return this builder + **/ + public Builder sqlText(String sqlText) { + this.sqlText = sqlText; + this.__explicitlySet__.add("sqlText"); + return this; + } + /** + * Specifies the level of SQL included for this SQL Firewall policy. + * USER_ISSUED_SQL - User issued SQL statements only. + * ALL_SQL - Includes all SQL statements including SQL statement issued inside PL/SQL units. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sqlLevel") + private SqlLevel sqlLevel; + + /** + * Specifies the level of SQL included for this SQL Firewall policy. + * USER_ISSUED_SQL - User issued SQL statements only. + * ALL_SQL - Includes all SQL statements including SQL statement issued inside PL/SQL units. + * + * @param sqlLevel the value to set + * @return this builder + **/ + public Builder sqlLevel(SqlLevel sqlLevel) { + this.sqlLevel = sqlLevel; + this.__explicitlySet__.add("sqlLevel"); + return this; + } + /** + * The objects accessed by the SQL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sqlAccessedObjects") + private java.util.List sqlAccessedObjects; + + /** + * The objects accessed by the SQL. + * @param sqlAccessedObjects the value to set + * @return this builder + **/ + public Builder sqlAccessedObjects(java.util.List sqlAccessedObjects) { + this.sqlAccessedObjects = sqlAccessedObjects; + this.__explicitlySet__.add("sqlAccessedObjects"); + return this; + } + /** + * Version of the associated SQL Firewall policy. This identifies whether the allowed SQLs were added in the same batch or not. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private Float version; + + /** + * Version of the associated SQL Firewall policy. This identifies whether the allowed SQLs were added in the same batch or not. + * @param version the value to set + * @return this builder + **/ + public Builder version(Float version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + /** + * The time the the SQL Firewall allowed SQL was collected from the target database, in the format defined by RFC3339. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCollected") + private java.util.Date timeCollected; + + /** + * The time the the SQL Firewall allowed SQL was collected from the target database, in the format defined by RFC3339. + * @param timeCollected the value to set + * @return this builder + **/ + public Builder timeCollected(java.util.Date timeCollected) { + this.timeCollected = timeCollected; + this.__explicitlySet__.add("timeCollected"); + return this; + } + /** + * The last date and time the SQL Firewall allowed SQL was updated, in the format defined by RFC3339. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The last date and time the SQL Firewall allowed SQL was updated, in the format defined by RFC3339. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of the SQL Firewall allowed SQL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private SqlFirewallAllowedSqlLifecycleState lifecycleState; + + /** + * The current state of the SQL Firewall allowed SQL. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(SqlFirewallAllowedSqlLifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SqlFirewallAllowedSql build() { + SqlFirewallAllowedSql model = + new SqlFirewallAllowedSql( + this.id, + this.compartmentId, + this.displayName, + this.description, + this.sqlFirewallPolicyId, + this.currentUser, + this.dbUserName, + this.sqlText, + this.sqlLevel, + this.sqlAccessedObjects, + this.version, + this.timeCollected, + this.timeUpdated, + this.lifecycleState, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SqlFirewallAllowedSql model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("sqlFirewallPolicyId")) { + this.sqlFirewallPolicyId(model.getSqlFirewallPolicyId()); + } + if (model.wasPropertyExplicitlySet("currentUser")) { + this.currentUser(model.getCurrentUser()); + } + if (model.wasPropertyExplicitlySet("dbUserName")) { + this.dbUserName(model.getDbUserName()); + } + if (model.wasPropertyExplicitlySet("sqlText")) { + this.sqlText(model.getSqlText()); + } + if (model.wasPropertyExplicitlySet("sqlLevel")) { + this.sqlLevel(model.getSqlLevel()); + } + if (model.wasPropertyExplicitlySet("sqlAccessedObjects")) { + this.sqlAccessedObjects(model.getSqlAccessedObjects()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + if (model.wasPropertyExplicitlySet("timeCollected")) { + this.timeCollected(model.getTimeCollected()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the SQL Firewall allowed SQL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the SQL Firewall allowed SQL. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of the compartment containing the SQL Firewall allowed SQL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment containing the SQL Firewall allowed SQL. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The display name of the SQL Firewall allowed SQL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the SQL Firewall allowed SQL. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The description of the SQL Firewall allowed SQL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description of the SQL Firewall allowed SQL. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The OCID of the SQL Firewall policy corresponding to the SQL Firewall allowed SQL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sqlFirewallPolicyId") + private final String sqlFirewallPolicyId; + + /** + * The OCID of the SQL Firewall policy corresponding to the SQL Firewall allowed SQL. + * @return the value + **/ + public String getSqlFirewallPolicyId() { + return sqlFirewallPolicyId; + } + + /** + * The name of the user that SQL was executed as. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("currentUser") + private final String currentUser; + + /** + * The name of the user that SQL was executed as. + * @return the value + **/ + public String getCurrentUser() { + return currentUser; + } + + /** + * The database user name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbUserName") + private final String dbUserName; + + /** + * The database user name. + * @return the value + **/ + public String getDbUserName() { + return dbUserName; + } + + /** + * The SQL text of the SQL Firewall allowed SQL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sqlText") + private final String sqlText; + + /** + * The SQL text of the SQL Firewall allowed SQL. + * @return the value + **/ + public String getSqlText() { + return sqlText; + } + + /** + * Specifies the level of SQL included for this SQL Firewall policy. + * USER_ISSUED_SQL - User issued SQL statements only. + * ALL_SQL - Includes all SQL statements including SQL statement issued inside PL/SQL units. + * + **/ + public enum SqlLevel { + UserIssuedSql("USER_ISSUED_SQL"), + AllSql("ALL_SQL"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SqlLevel.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SqlLevel v : SqlLevel.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + SqlLevel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SqlLevel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'SqlLevel', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Specifies the level of SQL included for this SQL Firewall policy. + * USER_ISSUED_SQL - User issued SQL statements only. + * ALL_SQL - Includes all SQL statements including SQL statement issued inside PL/SQL units. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sqlLevel") + private final SqlLevel sqlLevel; + + /** + * Specifies the level of SQL included for this SQL Firewall policy. + * USER_ISSUED_SQL - User issued SQL statements only. + * ALL_SQL - Includes all SQL statements including SQL statement issued inside PL/SQL units. + * + * @return the value + **/ + public SqlLevel getSqlLevel() { + return sqlLevel; + } + + /** + * The objects accessed by the SQL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sqlAccessedObjects") + private final java.util.List sqlAccessedObjects; + + /** + * The objects accessed by the SQL. + * @return the value + **/ + public java.util.List getSqlAccessedObjects() { + return sqlAccessedObjects; + } + + /** + * Version of the associated SQL Firewall policy. This identifies whether the allowed SQLs were added in the same batch or not. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final Float version; + + /** + * Version of the associated SQL Firewall policy. This identifies whether the allowed SQLs were added in the same batch or not. + * @return the value + **/ + public Float getVersion() { + return version; + } + + /** + * The time the the SQL Firewall allowed SQL was collected from the target database, in the format defined by RFC3339. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCollected") + private final java.util.Date timeCollected; + + /** + * The time the the SQL Firewall allowed SQL was collected from the target database, in the format defined by RFC3339. + * @return the value + **/ + public java.util.Date getTimeCollected() { + return timeCollected; + } + + /** + * The last date and time the SQL Firewall allowed SQL was updated, in the format defined by RFC3339. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The last date and time the SQL Firewall allowed SQL was updated, in the format defined by RFC3339. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the SQL Firewall allowed SQL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final SqlFirewallAllowedSqlLifecycleState lifecycleState; + + /** + * The current state of the SQL Firewall allowed SQL. + * @return the value + **/ + public SqlFirewallAllowedSqlLifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SqlFirewallAllowedSql("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", sqlFirewallPolicyId=").append(String.valueOf(this.sqlFirewallPolicyId)); + sb.append(", currentUser=").append(String.valueOf(this.currentUser)); + sb.append(", dbUserName=").append(String.valueOf(this.dbUserName)); + sb.append(", sqlText=").append(String.valueOf(this.sqlText)); + sb.append(", sqlLevel=").append(String.valueOf(this.sqlLevel)); + sb.append(", sqlAccessedObjects=").append(String.valueOf(this.sqlAccessedObjects)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(", timeCollected=").append(String.valueOf(this.timeCollected)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SqlFirewallAllowedSql)) { + return false; + } + + SqlFirewallAllowedSql other = (SqlFirewallAllowedSql) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.sqlFirewallPolicyId, other.sqlFirewallPolicyId) + && java.util.Objects.equals(this.currentUser, other.currentUser) + && java.util.Objects.equals(this.dbUserName, other.dbUserName) + && java.util.Objects.equals(this.sqlText, other.sqlText) + && java.util.Objects.equals(this.sqlLevel, other.sqlLevel) + && java.util.Objects.equals(this.sqlAccessedObjects, other.sqlAccessedObjects) + && java.util.Objects.equals(this.version, other.version) + && java.util.Objects.equals(this.timeCollected, other.timeCollected) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.sqlFirewallPolicyId == null + ? 43 + : this.sqlFirewallPolicyId.hashCode()); + result = (result * PRIME) + (this.currentUser == null ? 43 : this.currentUser.hashCode()); + result = (result * PRIME) + (this.dbUserName == null ? 43 : this.dbUserName.hashCode()); + result = (result * PRIME) + (this.sqlText == null ? 43 : this.sqlText.hashCode()); + result = (result * PRIME) + (this.sqlLevel == null ? 43 : this.sqlLevel.hashCode()); + result = + (result * PRIME) + + (this.sqlAccessedObjects == null + ? 43 + : this.sqlAccessedObjects.hashCode()); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = + (result * PRIME) + + (this.timeCollected == null ? 43 : this.timeCollected.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SqlFirewallAllowedSqlLifecycleState.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SqlFirewallAllowedSqlLifecycleState.java index 10ef5468647..da31957c6c8 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SqlFirewallAllowedSqlLifecycleState.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/SqlFirewallAllowedSqlLifecycleState.java @@ -11,6 +11,7 @@ public enum SqlFirewallAllowedSqlLifecycleState { Active("ACTIVE"), Deleted("DELETED"), + Failed("FAILED"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/TablesForDiscovery.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/TablesForDiscovery.java new file mode 100644 index 00000000000..b6ba09718f6 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/TablesForDiscovery.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * This contains the schema name along with one or more optional table names. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = TablesForDiscovery.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class TablesForDiscovery extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"schemaName", "tableNames"}) + public TablesForDiscovery(String schemaName, java.util.List tableNames) { + super(); + this.schemaName = schemaName; + this.tableNames = tableNames; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * This contains the name of the schema. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schemaName") + private String schemaName; + + /** + * This contains the name of the schema. + * @param schemaName the value to set + * @return this builder + **/ + public Builder schemaName(String schemaName) { + this.schemaName = schemaName; + this.__explicitlySet__.add("schemaName"); + return this; + } + /** + * This contains an optional list of the table names. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tableNames") + private java.util.List tableNames; + + /** + * This contains an optional list of the table names. + * @param tableNames the value to set + * @return this builder + **/ + public Builder tableNames(java.util.List tableNames) { + this.tableNames = tableNames; + this.__explicitlySet__.add("tableNames"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public TablesForDiscovery build() { + TablesForDiscovery model = new TablesForDiscovery(this.schemaName, this.tableNames); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(TablesForDiscovery model) { + if (model.wasPropertyExplicitlySet("schemaName")) { + this.schemaName(model.getSchemaName()); + } + if (model.wasPropertyExplicitlySet("tableNames")) { + this.tableNames(model.getTableNames()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * This contains the name of the schema. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schemaName") + private final String schemaName; + + /** + * This contains the name of the schema. + * @return the value + **/ + public String getSchemaName() { + return schemaName; + } + + /** + * This contains an optional list of the table names. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tableNames") + private final java.util.List tableNames; + + /** + * This contains an optional list of the table names. + * @return the value + **/ + public java.util.List getTableNames() { + return tableNames; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TablesForDiscovery("); + sb.append("super=").append(super.toString()); + sb.append("schemaName=").append(String.valueOf(this.schemaName)); + sb.append(", tableNames=").append(String.valueOf(this.tableNames)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TablesForDiscovery)) { + return false; + } + + TablesForDiscovery other = (TablesForDiscovery) o; + return java.util.Objects.equals(this.schemaName, other.schemaName) + && java.util.Objects.equals(this.tableNames, other.tableNames) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.schemaName == null ? 43 : this.schemaName.hashCode()); + result = (result * PRIME) + (this.tableNames == null ? 43 : this.tableNames.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/TargetAlertPolicyAssociation.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/TargetAlertPolicyAssociation.java index 8660f171ce0..d57dcd8eed9 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/TargetAlertPolicyAssociation.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/TargetAlertPolicyAssociation.java @@ -33,6 +33,7 @@ public final class TargetAlertPolicyAssociation "timeCreated", "timeUpdated", "lifecycleState", + "lifecycleDetails", "freeformTags", "definedTags", "systemTags" @@ -48,6 +49,7 @@ public TargetAlertPolicyAssociation( java.util.Date timeCreated, java.util.Date timeUpdated, AlertPolicyLifecycleState lifecycleState, + String lifecycleDetails, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags) { @@ -62,6 +64,7 @@ public TargetAlertPolicyAssociation( this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; @@ -229,6 +232,22 @@ public Builder lifecycleState(AlertPolicyLifecycleState lifecycleState) { this.__explicitlySet__.add("lifecycleState"); return this; } + /** + * Details about the current state of the target-alert policy association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Details about the current state of the target-alert policy association. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) *

@@ -311,6 +330,7 @@ public TargetAlertPolicyAssociation build() { this.timeCreated, this.timeUpdated, this.lifecycleState, + this.lifecycleDetails, this.freeformTags, this.definedTags, this.systemTags); @@ -352,6 +372,9 @@ public Builder copy(TargetAlertPolicyAssociation model) { if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -516,6 +539,20 @@ public AlertPolicyLifecycleState getLifecycleState() { return lifecycleState; } + /** + * Details about the current state of the target-alert policy association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Details about the current state of the target-alert policy association. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) *

@@ -598,6 +635,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); @@ -625,6 +663,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) @@ -649,6 +688,9 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/TargetAlertPolicyAssociationSummary.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/TargetAlertPolicyAssociationSummary.java index 3fef4c304f9..d1eb1221959 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/TargetAlertPolicyAssociationSummary.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/TargetAlertPolicyAssociationSummary.java @@ -33,6 +33,7 @@ public final class TargetAlertPolicyAssociationSummary "timeCreated", "timeUpdated", "lifecycleState", + "lifecycleDetails", "freeformTags", "definedTags" }) @@ -47,6 +48,7 @@ public TargetAlertPolicyAssociationSummary( java.util.Date timeCreated, java.util.Date timeUpdated, AlertPolicyLifecycleState lifecycleState, + String lifecycleDetails, java.util.Map freeformTags, java.util.Map> definedTags) { super(); @@ -60,6 +62,7 @@ public TargetAlertPolicyAssociationSummary( this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -226,6 +229,22 @@ public Builder lifecycleState(AlertPolicyLifecycleState lifecycleState) { this.__explicitlySet__.add("lifecycleState"); return this; } + /** + * Details about the current state of the target-alert policy association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Details about the current state of the target-alert policy association. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) *

@@ -288,6 +307,7 @@ public TargetAlertPolicyAssociationSummary build() { this.timeCreated, this.timeUpdated, this.lifecycleState, + this.lifecycleDetails, this.freeformTags, this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -328,6 +348,9 @@ public Builder copy(TargetAlertPolicyAssociationSummary model) { if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -489,6 +512,20 @@ public AlertPolicyLifecycleState getLifecycleState() { return lifecycleState; } + /** + * Details about the current state of the target-alert policy association. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Details about the current state of the target-alert policy association. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) *

@@ -553,6 +590,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -579,6 +617,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -602,6 +641,9 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UnsetSecurityAssessmentBaselineDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UnsetSecurityAssessmentBaselineDetails.java new file mode 100644 index 00000000000..e74e00c77d0 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UnsetSecurityAssessmentBaselineDetails.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * The details required to unset the baseline of the assessment. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UnsetSecurityAssessmentBaselineDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UnsetSecurityAssessmentBaselineDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"targetIds"}) + public UnsetSecurityAssessmentBaselineDetails(java.util.List targetIds) { + super(); + this.targetIds = targetIds; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The list of database target OCIDs for which the user intends to unset the baseline. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetIds") + private java.util.List targetIds; + + /** + * The list of database target OCIDs for which the user intends to unset the baseline. + * @param targetIds the value to set + * @return this builder + **/ + public Builder targetIds(java.util.List targetIds) { + this.targetIds = targetIds; + this.__explicitlySet__.add("targetIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UnsetSecurityAssessmentBaselineDetails build() { + UnsetSecurityAssessmentBaselineDetails model = + new UnsetSecurityAssessmentBaselineDetails(this.targetIds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UnsetSecurityAssessmentBaselineDetails model) { + if (model.wasPropertyExplicitlySet("targetIds")) { + this.targetIds(model.getTargetIds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The list of database target OCIDs for which the user intends to unset the baseline. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetIds") + private final java.util.List targetIds; + + /** + * The list of database target OCIDs for which the user intends to unset the baseline. + * @return the value + **/ + public java.util.List getTargetIds() { + return targetIds; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UnsetSecurityAssessmentBaselineDetails("); + sb.append("super=").append(super.toString()); + sb.append("targetIds=").append(String.valueOf(this.targetIds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UnsetSecurityAssessmentBaselineDetails)) { + return false; + } + + UnsetSecurityAssessmentBaselineDetails other = (UnsetSecurityAssessmentBaselineDetails) o; + return java.util.Objects.equals(this.targetIds, other.targetIds) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.targetIds == null ? 43 : this.targetIds.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UnsetUserAssessmentBaselineDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UnsetUserAssessmentBaselineDetails.java new file mode 100644 index 00000000000..38d768731b9 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UnsetUserAssessmentBaselineDetails.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * The details required to unset the baseline of the assessment. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UnsetUserAssessmentBaselineDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UnsetUserAssessmentBaselineDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"targetIds"}) + public UnsetUserAssessmentBaselineDetails(java.util.List targetIds) { + super(); + this.targetIds = targetIds; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The list of database target OCIDs for which the user intends to unset the baseline. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetIds") + private java.util.List targetIds; + + /** + * The list of database target OCIDs for which the user intends to unset the baseline. + * @param targetIds the value to set + * @return this builder + **/ + public Builder targetIds(java.util.List targetIds) { + this.targetIds = targetIds; + this.__explicitlySet__.add("targetIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UnsetUserAssessmentBaselineDetails build() { + UnsetUserAssessmentBaselineDetails model = + new UnsetUserAssessmentBaselineDetails(this.targetIds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UnsetUserAssessmentBaselineDetails model) { + if (model.wasPropertyExplicitlySet("targetIds")) { + this.targetIds(model.getTargetIds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The list of database target OCIDs for which the user intends to unset the baseline. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetIds") + private final java.util.List targetIds; + + /** + * The list of database target OCIDs for which the user intends to unset the baseline. + * @return the value + **/ + public java.util.List getTargetIds() { + return targetIds; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UnsetUserAssessmentBaselineDetails("); + sb.append("super=").append(super.toString()); + sb.append("targetIds=").append(String.valueOf(this.targetIds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UnsetUserAssessmentBaselineDetails)) { + return false; + } + + UnsetUserAssessmentBaselineDetails other = (UnsetUserAssessmentBaselineDetails) o; + return java.util.Objects.equals(this.targetIds, other.targetIds) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.targetIds == null ? 43 : this.targetIds.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateAlertPolicyDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateAlertPolicyDetails.java new file mode 100644 index 00000000000..9381b77e46a --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateAlertPolicyDetails.java @@ -0,0 +1,326 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.model; + +/** + * The details used to update a alert policy. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateAlertPolicyDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateAlertPolicyDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "severity", + "freeformTags", + "definedTags" + }) + public UpdateAlertPolicyDetails( + String displayName, + String description, + AlertSeverity severity, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.severity = severity; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The display name of the alert policy. The name does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the alert policy. The name does not have to be unique, and it's changeable. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The description of the alert policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description of the alert policy. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Severity level of the alert raised by this policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private AlertSeverity severity; + + /** + * Severity level of the alert raised by this policy. + * @param severity the value to set + * @return this builder + **/ + public Builder severity(AlertSeverity severity) { + this.severity = severity; + this.__explicitlySet__.add("severity"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateAlertPolicyDetails build() { + UpdateAlertPolicyDetails model = + new UpdateAlertPolicyDetails( + this.displayName, + this.description, + this.severity, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateAlertPolicyDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("severity")) { + this.severity(model.getSeverity()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The display name of the alert policy. The name does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the alert policy. The name does not have to be unique, and it's changeable. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The description of the alert policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description of the alert policy. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Severity level of the alert raised by this policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private final AlertSeverity severity; + + /** + * Severity level of the alert raised by this policy. + * @return the value + **/ + public AlertSeverity getSeverity() { + return severity; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateAlertPolicyDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", severity=").append(String.valueOf(this.severity)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateAlertPolicyDetails)) { + return false; + } + + UpdateAlertPolicyDetails other = (UpdateAlertPolicyDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.severity, other.severity) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.severity == null ? 43 : this.severity.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateAlertPolicyRuleDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateAlertPolicyRuleDetails.java index 6986c2f69e5..d938e8eab61 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateAlertPolicyRuleDetails.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateAlertPolicyRuleDetails.java @@ -22,11 +22,12 @@ public final class UpdateAlertPolicyRuleDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"description", "expression"}) - public UpdateAlertPolicyRuleDetails(String description, String expression) { + @java.beans.ConstructorProperties({"description", "expression", "displayName"}) + public UpdateAlertPolicyRuleDetails(String description, String expression, String displayName) { super(); this.description = description; this.expression = expression; + this.displayName = displayName; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -63,13 +64,30 @@ public Builder expression(String expression) { this.__explicitlySet__.add("expression"); return this; } + /** + * The display name of the alert policy rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the alert policy rule. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public UpdateAlertPolicyRuleDetails build() { UpdateAlertPolicyRuleDetails model = - new UpdateAlertPolicyRuleDetails(this.description, this.expression); + new UpdateAlertPolicyRuleDetails( + this.description, this.expression, this.displayName); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -84,6 +102,9 @@ public Builder copy(UpdateAlertPolicyRuleDetails model) { if (model.wasPropertyExplicitlySet("expression")) { this.expression(model.getExpression()); } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } return this; } } @@ -127,6 +148,20 @@ public String getExpression() { return expression; } + /** + * The display name of the alert policy rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the alert policy rule. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + @Override public String toString() { return this.toString(true); @@ -143,6 +178,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("description=").append(String.valueOf(this.description)); sb.append(", expression=").append(String.valueOf(this.expression)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(")"); return sb.toString(); } @@ -159,6 +195,7 @@ public boolean equals(Object o) { UpdateAlertPolicyRuleDetails other = (UpdateAlertPolicyRuleDetails) o; return java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.expression, other.expression) + && java.util.Objects.equals(this.displayName, other.displayName) && super.equals(other); } @@ -168,6 +205,7 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); result = (result * PRIME) + (this.expression == null ? 43 : this.expression.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateSecurityAssessmentDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateSecurityAssessmentDetails.java index 437a4cf8b66..19dfc954de4 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateSecurityAssessmentDetails.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateSecurityAssessmentDetails.java @@ -25,6 +25,7 @@ public final class UpdateSecurityAssessmentDetails @java.beans.ConstructorProperties({ "displayName", "description", + "isAssessmentScheduled", "schedule", "freeformTags", "definedTags" @@ -32,12 +33,14 @@ public final class UpdateSecurityAssessmentDetails public UpdateSecurityAssessmentDetails( String displayName, String description, + Boolean isAssessmentScheduled, String schedule, java.util.Map freeformTags, java.util.Map> definedTags) { super(); this.displayName = displayName; this.description = description; + this.isAssessmentScheduled = isAssessmentScheduled; this.schedule = schedule; this.freeformTags = freeformTags; this.definedTags = definedTags; @@ -77,6 +80,22 @@ public Builder description(String description) { this.__explicitlySet__.add("description"); return this; } + /** + * Indicates whether the assessment is scheduled to run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAssessmentScheduled") + private Boolean isAssessmentScheduled; + + /** + * Indicates whether the assessment is scheduled to run. + * @param isAssessmentScheduled the value to set + * @return this builder + **/ + public Builder isAssessmentScheduled(Boolean isAssessmentScheduled) { + this.isAssessmentScheduled = isAssessmentScheduled; + this.__explicitlySet__.add("isAssessmentScheduled"); + return this; + } /** * This is applicable only for save schedule and latest assessment. It updates the existing schedule in a specified format: * ; @@ -175,6 +194,7 @@ public UpdateSecurityAssessmentDetails build() { new UpdateSecurityAssessmentDetails( this.displayName, this.description, + this.isAssessmentScheduled, this.schedule, this.freeformTags, this.definedTags); @@ -192,6 +212,9 @@ public Builder copy(UpdateSecurityAssessmentDetails model) { if (model.wasPropertyExplicitlySet("description")) { this.description(model.getDescription()); } + if (model.wasPropertyExplicitlySet("isAssessmentScheduled")) { + this.isAssessmentScheduled(model.getIsAssessmentScheduled()); + } if (model.wasPropertyExplicitlySet("schedule")) { this.schedule(model.getSchedule()); } @@ -244,6 +267,20 @@ public String getDescription() { return description; } + /** + * Indicates whether the assessment is scheduled to run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAssessmentScheduled") + private final Boolean isAssessmentScheduled; + + /** + * Indicates whether the assessment is scheduled to run. + * @return the value + **/ + public Boolean getIsAssessmentScheduled() { + return isAssessmentScheduled; + } + /** * This is applicable only for save schedule and latest assessment. It updates the existing schedule in a specified format: * ; @@ -342,6 +379,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("displayName=").append(String.valueOf(this.displayName)); sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", isAssessmentScheduled=").append(String.valueOf(this.isAssessmentScheduled)); sb.append(", schedule=").append(String.valueOf(this.schedule)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); @@ -361,6 +399,7 @@ public boolean equals(Object o) { UpdateSecurityAssessmentDetails other = (UpdateSecurityAssessmentDetails) o; return java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.isAssessmentScheduled, other.isAssessmentScheduled) && java.util.Objects.equals(this.schedule, other.schedule) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) @@ -373,6 +412,11 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.isAssessmentScheduled == null + ? 43 + : this.isAssessmentScheduled.hashCode()); result = (result * PRIME) + (this.schedule == null ? 43 : this.schedule.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateSensitiveDataModelDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateSensitiveDataModelDetails.java index a251d8cf3c0..5bfc38c3040 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateSensitiveDataModelDetails.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateSensitiveDataModelDetails.java @@ -29,6 +29,7 @@ public final class UpdateSensitiveDataModelDetails "appSuiteName", "description", "schemasForDiscovery", + "tablesForDiscovery", "sensitiveTypeIdsForDiscovery", "isSampleDataCollectionEnabled", "isAppDefinedRelationDiscoveryEnabled", @@ -41,6 +42,7 @@ public UpdateSensitiveDataModelDetails( String appSuiteName, String description, java.util.List schemasForDiscovery, + java.util.List tablesForDiscovery, java.util.List sensitiveTypeIdsForDiscovery, Boolean isSampleDataCollectionEnabled, Boolean isAppDefinedRelationDiscoveryEnabled, @@ -52,6 +54,7 @@ public UpdateSensitiveDataModelDetails( this.appSuiteName = appSuiteName; this.description = description; this.schemasForDiscovery = schemasForDiscovery; + this.tablesForDiscovery = tablesForDiscovery; this.sensitiveTypeIdsForDiscovery = sensitiveTypeIdsForDiscovery; this.isSampleDataCollectionEnabled = isSampleDataCollectionEnabled; this.isAppDefinedRelationDiscoveryEnabled = isAppDefinedRelationDiscoveryEnabled; @@ -147,6 +150,28 @@ public Builder schemasForDiscovery(java.util.List schemasForDiscovery) { this.__explicitlySet__.add("schemasForDiscovery"); return this; } + /** + * The data discovery jobs will scan the tables specified here, including both schemas and tables. + * For instance, the input could be in the format: [{schemaName: "HR", tableName: ["T1", "T2"]}, {schemaName: + * "OE", tableName : ["T3", "T4"]}]. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tablesForDiscovery") + private java.util.List tablesForDiscovery; + + /** + * The data discovery jobs will scan the tables specified here, including both schemas and tables. + * For instance, the input could be in the format: [{schemaName: "HR", tableName: ["T1", "T2"]}, {schemaName: + * "OE", tableName : ["T3", "T4"]}]. + * + * @param tablesForDiscovery the value to set + * @return this builder + **/ + public Builder tablesForDiscovery(java.util.List tablesForDiscovery) { + this.tablesForDiscovery = tablesForDiscovery; + this.__explicitlySet__.add("tablesForDiscovery"); + return this; + } /** * The OCIDs of the sensitive types to be used for future data discovery jobs. If OCID of a sensitive category is * provided, all its child sensitive types are used for data discovery. @@ -280,6 +305,7 @@ public UpdateSensitiveDataModelDetails build() { this.appSuiteName, this.description, this.schemasForDiscovery, + this.tablesForDiscovery, this.sensitiveTypeIdsForDiscovery, this.isSampleDataCollectionEnabled, this.isAppDefinedRelationDiscoveryEnabled, @@ -308,6 +334,9 @@ public Builder copy(UpdateSensitiveDataModelDetails model) { if (model.wasPropertyExplicitlySet("schemasForDiscovery")) { this.schemasForDiscovery(model.getSchemasForDiscovery()); } + if (model.wasPropertyExplicitlySet("tablesForDiscovery")) { + this.tablesForDiscovery(model.getTablesForDiscovery()); + } if (model.wasPropertyExplicitlySet("sensitiveTypeIdsForDiscovery")) { this.sensitiveTypeIdsForDiscovery(model.getSensitiveTypeIdsForDiscovery()); } @@ -415,6 +444,26 @@ public java.util.List getSchemasForDiscovery() { return schemasForDiscovery; } + /** + * The data discovery jobs will scan the tables specified here, including both schemas and tables. + * For instance, the input could be in the format: [{schemaName: "HR", tableName: ["T1", "T2"]}, {schemaName: + * "OE", tableName : ["T3", "T4"]}]. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tablesForDiscovery") + private final java.util.List tablesForDiscovery; + + /** + * The data discovery jobs will scan the tables specified here, including both schemas and tables. + * For instance, the input could be in the format: [{schemaName: "HR", tableName: ["T1", "T2"]}, {schemaName: + * "OE", tableName : ["T3", "T4"]}]. + * + * @return the value + **/ + public java.util.List getTablesForDiscovery() { + return tablesForDiscovery; + } + /** * The OCIDs of the sensitive types to be used for future data discovery jobs. If OCID of a sensitive category is * provided, all its child sensitive types are used for data discovery. @@ -542,6 +591,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", appSuiteName=").append(String.valueOf(this.appSuiteName)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", schemasForDiscovery=").append(String.valueOf(this.schemasForDiscovery)); + sb.append(", tablesForDiscovery=").append(String.valueOf(this.tablesForDiscovery)); sb.append(", sensitiveTypeIdsForDiscovery=") .append(String.valueOf(this.sensitiveTypeIdsForDiscovery)); sb.append(", isSampleDataCollectionEnabled=") @@ -569,6 +619,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.appSuiteName, other.appSuiteName) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.schemasForDiscovery, other.schemasForDiscovery) + && java.util.Objects.equals(this.tablesForDiscovery, other.tablesForDiscovery) && java.util.Objects.equals( this.sensitiveTypeIdsForDiscovery, other.sensitiveTypeIdsForDiscovery) && java.util.Objects.equals( @@ -594,6 +645,11 @@ public int hashCode() { + (this.schemasForDiscovery == null ? 43 : this.schemasForDiscovery.hashCode()); + result = + (result * PRIME) + + (this.tablesForDiscovery == null + ? 43 + : this.tablesForDiscovery.hashCode()); result = (result * PRIME) + (this.sensitiveTypeIdsForDiscovery == null diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateUserAssessmentDetails.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateUserAssessmentDetails.java index 5663e4b832e..59b7c09d756 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateUserAssessmentDetails.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UpdateUserAssessmentDetails.java @@ -25,6 +25,7 @@ public final class UpdateUserAssessmentDetails @java.beans.ConstructorProperties({ "description", "displayName", + "isAssessmentScheduled", "schedule", "freeformTags", "definedTags" @@ -32,12 +33,14 @@ public final class UpdateUserAssessmentDetails public UpdateUserAssessmentDetails( String description, String displayName, + Boolean isAssessmentScheduled, String schedule, java.util.Map freeformTags, java.util.Map> definedTags) { super(); this.description = description; this.displayName = displayName; + this.isAssessmentScheduled = isAssessmentScheduled; this.schedule = schedule; this.freeformTags = freeformTags; this.definedTags = definedTags; @@ -77,6 +80,22 @@ public Builder displayName(String displayName) { this.__explicitlySet__.add("displayName"); return this; } + /** + * Indicates whether the assessment is scheduled to run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAssessmentScheduled") + private Boolean isAssessmentScheduled; + + /** + * Indicates whether the assessment is scheduled to run. + * @param isAssessmentScheduled the value to set + * @return this builder + **/ + public Builder isAssessmentScheduled(Boolean isAssessmentScheduled) { + this.isAssessmentScheduled = isAssessmentScheduled; + this.__explicitlySet__.add("isAssessmentScheduled"); + return this; + } /** * The schedule for periodically saving the assessment. This is applicable only for assessments of type save schedule and latest assessment. It updates the existing schedule in a specified format: * ; @@ -175,6 +194,7 @@ public UpdateUserAssessmentDetails build() { new UpdateUserAssessmentDetails( this.description, this.displayName, + this.isAssessmentScheduled, this.schedule, this.freeformTags, this.definedTags); @@ -192,6 +212,9 @@ public Builder copy(UpdateUserAssessmentDetails model) { if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } + if (model.wasPropertyExplicitlySet("isAssessmentScheduled")) { + this.isAssessmentScheduled(model.getIsAssessmentScheduled()); + } if (model.wasPropertyExplicitlySet("schedule")) { this.schedule(model.getSchedule()); } @@ -244,6 +267,20 @@ public String getDisplayName() { return displayName; } + /** + * Indicates whether the assessment is scheduled to run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAssessmentScheduled") + private final Boolean isAssessmentScheduled; + + /** + * Indicates whether the assessment is scheduled to run. + * @return the value + **/ + public Boolean getIsAssessmentScheduled() { + return isAssessmentScheduled; + } + /** * The schedule for periodically saving the assessment. This is applicable only for assessments of type save schedule and latest assessment. It updates the existing schedule in a specified format: * ; @@ -342,6 +379,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("description=").append(String.valueOf(this.description)); sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", isAssessmentScheduled=").append(String.valueOf(this.isAssessmentScheduled)); sb.append(", schedule=").append(String.valueOf(this.schedule)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); @@ -361,6 +399,7 @@ public boolean equals(Object o) { UpdateUserAssessmentDetails other = (UpdateUserAssessmentDetails) o; return java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.isAssessmentScheduled, other.isAssessmentScheduled) && java.util.Objects.equals(this.schedule, other.schedule) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) @@ -373,6 +412,11 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.isAssessmentScheduled == null + ? 43 + : this.isAssessmentScheduled.hashCode()); result = (result * PRIME) + (this.schedule == null ? 43 : this.schedule.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UserAssessment.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UserAssessment.java index 4cd22ecbaa9..8581787efc8 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UserAssessment.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UserAssessment.java @@ -32,6 +32,7 @@ public final class UserAssessment extends com.oracle.bmc.http.internal.Explicitl "lifecycleState", "lifecycleDetails", "scheduleAssessmentId", + "isAssessmentScheduled", "schedule", "statistics", "targetIds", @@ -57,6 +58,7 @@ public UserAssessment( UserAssessmentLifecycleState lifecycleState, String lifecycleDetails, String scheduleAssessmentId, + Boolean isAssessmentScheduled, String schedule, java.util.Map> statistics, java.util.List targetIds, @@ -81,6 +83,7 @@ public UserAssessment( this.lifecycleState = lifecycleState; this.lifecycleDetails = lifecycleDetails; this.scheduleAssessmentId = scheduleAssessmentId; + this.isAssessmentScheduled = isAssessmentScheduled; this.schedule = schedule; this.statistics = statistics; this.targetIds = targetIds; @@ -296,6 +299,22 @@ public Builder scheduleAssessmentId(String scheduleAssessmentId) { this.__explicitlySet__.add("scheduleAssessmentId"); return this; } + /** + * Indicates whether the assessment is scheduled to run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAssessmentScheduled") + private Boolean isAssessmentScheduled; + + /** + * Indicates whether the assessment is scheduled to run. + * @param isAssessmentScheduled the value to set + * @return this builder + **/ + public Builder isAssessmentScheduled(Boolean isAssessmentScheduled) { + this.isAssessmentScheduled = isAssessmentScheduled; + this.__explicitlySet__.add("isAssessmentScheduled"); + return this; + } /** * Schedule of the assessment that runs periodically in this specified format: * ; @@ -556,6 +575,7 @@ public UserAssessment build() { this.lifecycleState, this.lifecycleDetails, this.scheduleAssessmentId, + this.isAssessmentScheduled, this.schedule, this.statistics, this.targetIds, @@ -611,6 +631,9 @@ public Builder copy(UserAssessment model) { if (model.wasPropertyExplicitlySet("scheduleAssessmentId")) { this.scheduleAssessmentId(model.getScheduleAssessmentId()); } + if (model.wasPropertyExplicitlySet("isAssessmentScheduled")) { + this.isAssessmentScheduled(model.getIsAssessmentScheduled()); + } if (model.wasPropertyExplicitlySet("schedule")) { this.schedule(model.getSchedule()); } @@ -835,6 +858,20 @@ public String getScheduleAssessmentId() { return scheduleAssessmentId; } + /** + * Indicates whether the assessment is scheduled to run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAssessmentScheduled") + private final Boolean isAssessmentScheduled; + + /** + * Indicates whether the assessment is scheduled to run. + * @return the value + **/ + public Boolean getIsAssessmentScheduled() { + return isAssessmentScheduled; + } + /** * Schedule of the assessment that runs periodically in this specified format: * ; @@ -1183,6 +1220,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", scheduleAssessmentId=").append(String.valueOf(this.scheduleAssessmentId)); + sb.append(", isAssessmentScheduled=").append(String.valueOf(this.isAssessmentScheduled)); sb.append(", schedule=").append(String.valueOf(this.schedule)); sb.append(", statistics=").append(String.valueOf(this.statistics)); sb.append(", targetIds=").append(String.valueOf(this.targetIds)); @@ -1222,6 +1260,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.scheduleAssessmentId, other.scheduleAssessmentId) + && java.util.Objects.equals(this.isAssessmentScheduled, other.isAssessmentScheduled) && java.util.Objects.equals(this.schedule, other.schedule) && java.util.Objects.equals(this.statistics, other.statistics) && java.util.Objects.equals(this.targetIds, other.targetIds) @@ -1276,6 +1315,11 @@ public int hashCode() { + (this.scheduleAssessmentId == null ? 43 : this.scheduleAssessmentId.hashCode()); + result = + (result * PRIME) + + (this.isAssessmentScheduled == null + ? 43 + : this.isAssessmentScheduled.hashCode()); result = (result * PRIME) + (this.schedule == null ? 43 : this.schedule.hashCode()); result = (result * PRIME) + (this.statistics == null ? 43 : this.statistics.hashCode()); result = (result * PRIME) + (this.targetIds == null ? 43 : this.targetIds.hashCode()); diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UserAssessmentSummary.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UserAssessmentSummary.java index 410f36b84b7..02807e70517 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UserAssessmentSummary.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/UserAssessmentSummary.java @@ -35,6 +35,7 @@ public final class UserAssessmentSummary "lifecycleState", "lifecycleDetails", "scheduleAssessmentId", + "isAssessmentScheduled", "schedule", "statistics", "targetIds", @@ -59,6 +60,7 @@ public UserAssessmentSummary( UserAssessmentLifecycleState lifecycleState, String lifecycleDetails, String scheduleAssessmentId, + Boolean isAssessmentScheduled, String schedule, java.util.Map> statistics, java.util.List targetIds, @@ -82,6 +84,7 @@ public UserAssessmentSummary( this.lifecycleState = lifecycleState; this.lifecycleDetails = lifecycleDetails; this.scheduleAssessmentId = scheduleAssessmentId; + this.isAssessmentScheduled = isAssessmentScheduled; this.schedule = schedule; this.statistics = statistics; this.targetIds = targetIds; @@ -296,6 +299,22 @@ public Builder scheduleAssessmentId(String scheduleAssessmentId) { this.__explicitlySet__.add("scheduleAssessmentId"); return this; } + /** + * Indicates whether the assessment is scheduled to run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAssessmentScheduled") + private Boolean isAssessmentScheduled; + + /** + * Indicates whether the assessment is scheduled to run. + * @param isAssessmentScheduled the value to set + * @return this builder + **/ + public Builder isAssessmentScheduled(Boolean isAssessmentScheduled) { + this.isAssessmentScheduled = isAssessmentScheduled; + this.__explicitlySet__.add("isAssessmentScheduled"); + return this; + } /** * Schedule to save the assessment periodically in the specified format: * ; @@ -534,6 +553,7 @@ public UserAssessmentSummary build() { this.lifecycleState, this.lifecycleDetails, this.scheduleAssessmentId, + this.isAssessmentScheduled, this.schedule, this.statistics, this.targetIds, @@ -588,6 +608,9 @@ public Builder copy(UserAssessmentSummary model) { if (model.wasPropertyExplicitlySet("scheduleAssessmentId")) { this.scheduleAssessmentId(model.getScheduleAssessmentId()); } + if (model.wasPropertyExplicitlySet("isAssessmentScheduled")) { + this.isAssessmentScheduled(model.getIsAssessmentScheduled()); + } if (model.wasPropertyExplicitlySet("schedule")) { this.schedule(model.getSchedule()); } @@ -809,6 +832,20 @@ public String getScheduleAssessmentId() { return scheduleAssessmentId; } + /** + * Indicates whether the assessment is scheduled to run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAssessmentScheduled") + private final Boolean isAssessmentScheduled; + + /** + * Indicates whether the assessment is scheduled to run. + * @return the value + **/ + public Boolean getIsAssessmentScheduled() { + return isAssessmentScheduled; + } + /** * Schedule to save the assessment periodically in the specified format: * ; @@ -1136,6 +1173,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", scheduleAssessmentId=").append(String.valueOf(this.scheduleAssessmentId)); + sb.append(", isAssessmentScheduled=").append(String.valueOf(this.isAssessmentScheduled)); sb.append(", schedule=").append(String.valueOf(this.schedule)); sb.append(", statistics=").append(String.valueOf(this.statistics)); sb.append(", targetIds=").append(String.valueOf(this.targetIds)); @@ -1174,6 +1212,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.scheduleAssessmentId, other.scheduleAssessmentId) + && java.util.Objects.equals(this.isAssessmentScheduled, other.isAssessmentScheduled) && java.util.Objects.equals(this.schedule, other.schedule) && java.util.Objects.equals(this.statistics, other.statistics) && java.util.Objects.equals(this.targetIds, other.targetIds) @@ -1227,6 +1266,11 @@ public int hashCode() { + (this.scheduleAssessmentId == null ? 43 : this.scheduleAssessmentId.hashCode()); + result = + (result * PRIME) + + (this.isAssessmentScheduled == null + ? 43 + : this.isAssessmentScheduled.hashCode()); result = (result * PRIME) + (this.schedule == null ? 43 : this.schedule.hashCode()); result = (result * PRIME) + (this.statistics == null ? 43 : this.statistics.hashCode()); result = (result * PRIME) + (this.targetIds == null ? 43 : this.targetIds.hashCode()); diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/WorkRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/WorkRequest.java index c117fc48be3..fc4fcea5b07 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/WorkRequest.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/WorkRequest.java @@ -324,6 +324,9 @@ public enum OperationType { SetSecurityAssessmentBaseline("SET_SECURITY_ASSESSMENT_BASELINE"), UnsetSecurityAssessmentBaseline("UNSET_SECURITY_ASSESSMENT_BASELINE"), GenerateSecurityAssessmentReport("GENERATE_SECURITY_ASSESSMENT_REPORT"), + DeleteSqlFirewallAllowedSql("DELETE_SQL_FIREWALL_ALLOWED_SQL"), + BulkCreateSqlFirewallAllowedSql("BULK_CREATE_SQL_FIREWALL_ALLOWED_SQL"), + BulkDeleteSqlFirewallAllowedSql("BULK_DELETE_SQL_FIREWALL_ALLOWED_SQL"), CreateAuditProfile("CREATE_AUDIT_PROFILE"), CalculateVolume("CALCULATE_VOLUME"), CalculateCollectedVolume("CALCULATE_COLLECTED_VOLUME"), @@ -344,6 +347,7 @@ public enum OperationType { RefreshSqlCollectionLogInsights("REFRESH_SQL_COLLECTION_LOG_INSIGHTS"), PurgeSqlCollectionLogs("PURGE_SQL_COLLECTION_LOGS"), RefreshViolations("REFRESH_VIOLATIONS"), + CreateArchival("CREATE_ARCHIVAL"), UpdateSecurityPolicy("UPDATE_SECURITY_POLICY"), ChangeSecurityPolicyCompartment("CHANGE_SECURITY_POLICY_COMPARTMENT"), UpdateSecurityPolicyDeployment("UPDATE_SECURITY_POLICY_DEPLOYMENT"), @@ -400,6 +404,7 @@ public enum OperationType { PatchDifference("PATCH_DIFFERENCE"), ApplyDifference("APPLY_DIFFERENCE"), MaskPolicyGenerateHealthReport("MASK_POLICY_GENERATE_HEALTH_REPORT"), + MaskPolicyDeleteHealthReport("MASK_POLICY_DELETE_HEALTH_REPORT"), AbortMasking("ABORT_MASKING"), CreateSecurityPolicyReport("CREATE_SECURITY_POLICY_REPORT"), RefreshSecurityPolicyCache("REFRESH_SECURITY_POLICY_CACHE"), @@ -408,6 +413,13 @@ public enum OperationType { RemoveScheduleReport("REMOVE_SCHEDULE_REPORT"), UpdateAllAlert("UPDATE_ALL_ALERT"), PatchTargetAlertPolicyAssociation("PATCH_TARGET_ALERT_POLICY_ASSOCIATION"), + CreateAlertPolicy("CREATE_ALERT_POLICY"), + UpdateAlertPolicy("UPDATE_ALERT_POLICY"), + DeleteAlertPolicy("DELETE_ALERT_POLICY"), + CreateAlertPolicyRule("CREATE_ALERT_POLICY_RULE"), + UpdateAlertPolicyRule("UPDATE_ALERT_POLICY_RULE"), + DeleteAlertPolicyRule("DELETE_ALERT_POLICY_RULE"), + ChangeAlertPolicyCompartment("CHANGE_ALERT_POLICY_COMPARTMENT"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/WorkRequestSummary.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/WorkRequestSummary.java index 11bd692e1e9..c49b93c7cb5 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/WorkRequestSummary.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/model/WorkRequestSummary.java @@ -326,6 +326,9 @@ public enum OperationType { SetSecurityAssessmentBaseline("SET_SECURITY_ASSESSMENT_BASELINE"), UnsetSecurityAssessmentBaseline("UNSET_SECURITY_ASSESSMENT_BASELINE"), GenerateSecurityAssessmentReport("GENERATE_SECURITY_ASSESSMENT_REPORT"), + DeleteSqlFirewallAllowedSql("DELETE_SQL_FIREWALL_ALLOWED_SQL"), + BulkCreateSqlFirewallAllowedSql("BULK_CREATE_SQL_FIREWALL_ALLOWED_SQL"), + BulkDeleteSqlFirewallAllowedSql("BULK_DELETE_SQL_FIREWALL_ALLOWED_SQL"), CalculateVolume("CALCULATE_VOLUME"), CalculateCollectedVolume("CALCULATE_COLLECTED_VOLUME"), CreateDbSecurityConfig("CREATE_DB_SECURITY_CONFIG"), @@ -345,6 +348,7 @@ public enum OperationType { RefreshSqlCollectionLogInsights("REFRESH_SQL_COLLECTION_LOG_INSIGHTS"), PurgeSqlCollectionLogs("PURGE_SQL_COLLECTION_LOGS"), RefreshViolations("REFRESH_VIOLATIONS"), + CreateArchival("CREATE_ARCHIVAL"), UpdateSecurityPolicy("UPDATE_SECURITY_POLICY"), ChangeSecurityPolicyCompartment("CHANGE_SECURITY_POLICY_COMPARTMENT"), UpdateSecurityPolicyDeployment("UPDATE_SECURITY_POLICY_DEPLOYMENT"), @@ -401,6 +405,7 @@ public enum OperationType { PatchDifference("PATCH_DIFFERENCE"), ApplyDifference("APPLY_DIFFERENCE"), MaskPolicyGenerateHealthReport("MASK_POLICY_GENERATE_HEALTH_REPORT"), + MaskPolicyDeleteHealthReport("MASK_POLICY_DELETE_HEALTH_REPORT"), AbortMasking("ABORT_MASKING"), CreateSecurityPolicyReport("CREATE_SECURITY_POLICY_REPORT"), RefreshSecurityPolicyCache("REFRESH_SECURITY_POLICY_CACHE"), @@ -409,6 +414,13 @@ public enum OperationType { RemoveScheduleReport("REMOVE_SCHEDULE_REPORT"), UpdateAllAlert("UPDATE_ALL_ALERT"), PatchTargetAlertPolicyAssociation("PATCH_TARGET_ALERT_POLICY_ASSOCIATION"), + CreateAlertPolicy("CREATE_ALERT_POLICY"), + UpdateAlertPolicy("UPDATE_ALERT_POLICY"), + DeleteAlertPolicy("DELETE_ALERT_POLICY"), + CreateAlertPolicyRule("CREATE_ALERT_POLICY_RULE"), + UpdateAlertPolicyRule("UPDATE_ALERT_POLICY_RULE"), + DeleteAlertPolicyRule("DELETE_ALERT_POLICY_RULE"), + ChangeAlertPolicyCompartment("CHANGE_ALERT_POLICY_COMPARTMENT"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/BulkCreateSqlFirewallAllowedSqlsRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/BulkCreateSqlFirewallAllowedSqlsRequest.java new file mode 100644 index 00000000000..d1e741ed7cc --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/BulkCreateSqlFirewallAllowedSqlsRequest.java @@ -0,0 +1,284 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use BulkCreateSqlFirewallAllowedSqlsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class BulkCreateSqlFirewallAllowedSqlsRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.datasafe.model.BulkCreateSqlFirewallAllowedSqlsDetails> { + + /** + * Details of the allowed sql. + */ + private com.oracle.bmc.datasafe.model.BulkCreateSqlFirewallAllowedSqlsDetails + bulkCreateSqlFirewallAllowedSqlsDetails; + + /** + * Details of the allowed sql. + */ + public com.oracle.bmc.datasafe.model.BulkCreateSqlFirewallAllowedSqlsDetails + getBulkCreateSqlFirewallAllowedSqlsDetails() { + return bulkCreateSqlFirewallAllowedSqlsDetails; + } + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.datasafe.model.BulkCreateSqlFirewallAllowedSqlsDetails getBody$() { + return bulkCreateSqlFirewallAllowedSqlsDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + BulkCreateSqlFirewallAllowedSqlsRequest, + com.oracle.bmc.datasafe.model.BulkCreateSqlFirewallAllowedSqlsDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details of the allowed sql. + */ + private com.oracle.bmc.datasafe.model.BulkCreateSqlFirewallAllowedSqlsDetails + bulkCreateSqlFirewallAllowedSqlsDetails = null; + + /** + * Details of the allowed sql. + * @param bulkCreateSqlFirewallAllowedSqlsDetails the value to set + * @return this builder instance + */ + public Builder bulkCreateSqlFirewallAllowedSqlsDetails( + com.oracle.bmc.datasafe.model.BulkCreateSqlFirewallAllowedSqlsDetails + bulkCreateSqlFirewallAllowedSqlsDetails) { + this.bulkCreateSqlFirewallAllowedSqlsDetails = bulkCreateSqlFirewallAllowedSqlsDetails; + return this; + } + + /** + * Unique identifier for the request. + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(BulkCreateSqlFirewallAllowedSqlsRequest o) { + bulkCreateSqlFirewallAllowedSqlsDetails(o.getBulkCreateSqlFirewallAllowedSqlsDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of BulkCreateSqlFirewallAllowedSqlsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of BulkCreateSqlFirewallAllowedSqlsRequest + */ + public BulkCreateSqlFirewallAllowedSqlsRequest build() { + BulkCreateSqlFirewallAllowedSqlsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.datasafe.model.BulkCreateSqlFirewallAllowedSqlsDetails body) { + bulkCreateSqlFirewallAllowedSqlsDetails(body); + return this; + } + + /** + * Build the instance of BulkCreateSqlFirewallAllowedSqlsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of BulkCreateSqlFirewallAllowedSqlsRequest + */ + public BulkCreateSqlFirewallAllowedSqlsRequest buildWithoutInvocationCallback() { + BulkCreateSqlFirewallAllowedSqlsRequest request = + new BulkCreateSqlFirewallAllowedSqlsRequest(); + request.bulkCreateSqlFirewallAllowedSqlsDetails = + bulkCreateSqlFirewallAllowedSqlsDetails; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new BulkCreateSqlFirewallAllowedSqlsRequest(bulkCreateSqlFirewallAllowedSqlsDetails, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .bulkCreateSqlFirewallAllowedSqlsDetails(bulkCreateSqlFirewallAllowedSqlsDetails) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",bulkCreateSqlFirewallAllowedSqlsDetails=") + .append(String.valueOf(this.bulkCreateSqlFirewallAllowedSqlsDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkCreateSqlFirewallAllowedSqlsRequest)) { + return false; + } + + BulkCreateSqlFirewallAllowedSqlsRequest other = (BulkCreateSqlFirewallAllowedSqlsRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.bulkCreateSqlFirewallAllowedSqlsDetails, + other.bulkCreateSqlFirewallAllowedSqlsDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.bulkCreateSqlFirewallAllowedSqlsDetails == null + ? 43 + : this.bulkCreateSqlFirewallAllowedSqlsDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/BulkDeleteSqlFirewallAllowedSqlsRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/BulkDeleteSqlFirewallAllowedSqlsRequest.java new file mode 100644 index 00000000000..a7d9d3f976d --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/BulkDeleteSqlFirewallAllowedSqlsRequest.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use BulkDeleteSqlFirewallAllowedSqlsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class BulkDeleteSqlFirewallAllowedSqlsRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.datasafe.model.BulkDeleteSqlFirewallAllowedSqlsDetails> { + + /** + * Details of the allowed sql to be deleted from the SQL firewall policy. + */ + private com.oracle.bmc.datasafe.model.BulkDeleteSqlFirewallAllowedSqlsDetails + bulkDeleteSqlFirewallAllowedSqlsDetails; + + /** + * Details of the allowed sql to be deleted from the SQL firewall policy. + */ + public com.oracle.bmc.datasafe.model.BulkDeleteSqlFirewallAllowedSqlsDetails + getBulkDeleteSqlFirewallAllowedSqlsDetails() { + return bulkDeleteSqlFirewallAllowedSqlsDetails; + } + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.datasafe.model.BulkDeleteSqlFirewallAllowedSqlsDetails getBody$() { + return bulkDeleteSqlFirewallAllowedSqlsDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + BulkDeleteSqlFirewallAllowedSqlsRequest, + com.oracle.bmc.datasafe.model.BulkDeleteSqlFirewallAllowedSqlsDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details of the allowed sql to be deleted from the SQL firewall policy. + */ + private com.oracle.bmc.datasafe.model.BulkDeleteSqlFirewallAllowedSqlsDetails + bulkDeleteSqlFirewallAllowedSqlsDetails = null; + + /** + * Details of the allowed sql to be deleted from the SQL firewall policy. + * @param bulkDeleteSqlFirewallAllowedSqlsDetails the value to set + * @return this builder instance + */ + public Builder bulkDeleteSqlFirewallAllowedSqlsDetails( + com.oracle.bmc.datasafe.model.BulkDeleteSqlFirewallAllowedSqlsDetails + bulkDeleteSqlFirewallAllowedSqlsDetails) { + this.bulkDeleteSqlFirewallAllowedSqlsDetails = bulkDeleteSqlFirewallAllowedSqlsDetails; + return this; + } + + /** + * Unique identifier for the request. + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(BulkDeleteSqlFirewallAllowedSqlsRequest o) { + bulkDeleteSqlFirewallAllowedSqlsDetails(o.getBulkDeleteSqlFirewallAllowedSqlsDetails()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of BulkDeleteSqlFirewallAllowedSqlsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of BulkDeleteSqlFirewallAllowedSqlsRequest + */ + public BulkDeleteSqlFirewallAllowedSqlsRequest build() { + BulkDeleteSqlFirewallAllowedSqlsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.datasafe.model.BulkDeleteSqlFirewallAllowedSqlsDetails body) { + bulkDeleteSqlFirewallAllowedSqlsDetails(body); + return this; + } + + /** + * Build the instance of BulkDeleteSqlFirewallAllowedSqlsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of BulkDeleteSqlFirewallAllowedSqlsRequest + */ + public BulkDeleteSqlFirewallAllowedSqlsRequest buildWithoutInvocationCallback() { + BulkDeleteSqlFirewallAllowedSqlsRequest request = + new BulkDeleteSqlFirewallAllowedSqlsRequest(); + request.bulkDeleteSqlFirewallAllowedSqlsDetails = + bulkDeleteSqlFirewallAllowedSqlsDetails; + request.opcRequestId = opcRequestId; + return request; + // new BulkDeleteSqlFirewallAllowedSqlsRequest(bulkDeleteSqlFirewallAllowedSqlsDetails, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .bulkDeleteSqlFirewallAllowedSqlsDetails(bulkDeleteSqlFirewallAllowedSqlsDetails) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",bulkDeleteSqlFirewallAllowedSqlsDetails=") + .append(String.valueOf(this.bulkDeleteSqlFirewallAllowedSqlsDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkDeleteSqlFirewallAllowedSqlsRequest)) { + return false; + } + + BulkDeleteSqlFirewallAllowedSqlsRequest other = (BulkDeleteSqlFirewallAllowedSqlsRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.bulkDeleteSqlFirewallAllowedSqlsDetails, + other.bulkDeleteSqlFirewallAllowedSqlsDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.bulkDeleteSqlFirewallAllowedSqlsDetails == null + ? 43 + : this.bulkDeleteSqlFirewallAllowedSqlsDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ChangeAlertPolicyCompartmentRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ChangeAlertPolicyCompartmentRequest.java new file mode 100644 index 00000000000..9d59b90f57c --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ChangeAlertPolicyCompartmentRequest.java @@ -0,0 +1,368 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use ChangeAlertPolicyCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ChangeAlertPolicyCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.datasafe.model.ChangeAlertPolicyCompartmentDetails> { + + /** + * The OCID of the alert policy. + */ + private String alertPolicyId; + + /** + * The OCID of the alert policy. + */ + public String getAlertPolicyId() { + return alertPolicyId; + } + /** + * The details used to change the compartment of an alert policy. + */ + private com.oracle.bmc.datasafe.model.ChangeAlertPolicyCompartmentDetails + changeAlertPolicyCompartmentDetails; + + /** + * The details used to change the compartment of an alert policy. + */ + public com.oracle.bmc.datasafe.model.ChangeAlertPolicyCompartmentDetails + getChangeAlertPolicyCompartmentDetails() { + return changeAlertPolicyCompartmentDetails; + } + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.datasafe.model.ChangeAlertPolicyCompartmentDetails getBody$() { + return changeAlertPolicyCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeAlertPolicyCompartmentRequest, + com.oracle.bmc.datasafe.model.ChangeAlertPolicyCompartmentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the alert policy. + */ + private String alertPolicyId = null; + + /** + * The OCID of the alert policy. + * @param alertPolicyId the value to set + * @return this builder instance + */ + public Builder alertPolicyId(String alertPolicyId) { + this.alertPolicyId = alertPolicyId; + return this; + } + + /** + * The details used to change the compartment of an alert policy. + */ + private com.oracle.bmc.datasafe.model.ChangeAlertPolicyCompartmentDetails + changeAlertPolicyCompartmentDetails = null; + + /** + * The details used to change the compartment of an alert policy. + * @param changeAlertPolicyCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeAlertPolicyCompartmentDetails( + com.oracle.bmc.datasafe.model.ChangeAlertPolicyCompartmentDetails + changeAlertPolicyCompartmentDetails) { + this.changeAlertPolicyCompartmentDetails = changeAlertPolicyCompartmentDetails; + return this; + } + + /** + * Unique identifier for the request. + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeAlertPolicyCompartmentRequest o) { + alertPolicyId(o.getAlertPolicyId()); + changeAlertPolicyCompartmentDetails(o.getChangeAlertPolicyCompartmentDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeAlertPolicyCompartmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeAlertPolicyCompartmentRequest + */ + public ChangeAlertPolicyCompartmentRequest build() { + ChangeAlertPolicyCompartmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.datasafe.model.ChangeAlertPolicyCompartmentDetails body) { + changeAlertPolicyCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeAlertPolicyCompartmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeAlertPolicyCompartmentRequest + */ + public ChangeAlertPolicyCompartmentRequest buildWithoutInvocationCallback() { + ChangeAlertPolicyCompartmentRequest request = new ChangeAlertPolicyCompartmentRequest(); + request.alertPolicyId = alertPolicyId; + request.changeAlertPolicyCompartmentDetails = changeAlertPolicyCompartmentDetails; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new ChangeAlertPolicyCompartmentRequest(alertPolicyId, changeAlertPolicyCompartmentDetails, opcRequestId, ifMatch, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .alertPolicyId(alertPolicyId) + .changeAlertPolicyCompartmentDetails(changeAlertPolicyCompartmentDetails) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",alertPolicyId=").append(String.valueOf(this.alertPolicyId)); + sb.append(",changeAlertPolicyCompartmentDetails=") + .append(String.valueOf(this.changeAlertPolicyCompartmentDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeAlertPolicyCompartmentRequest)) { + return false; + } + + ChangeAlertPolicyCompartmentRequest other = (ChangeAlertPolicyCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.alertPolicyId, other.alertPolicyId) + && java.util.Objects.equals( + this.changeAlertPolicyCompartmentDetails, + other.changeAlertPolicyCompartmentDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.alertPolicyId == null ? 43 : this.alertPolicyId.hashCode()); + result = + (result * PRIME) + + (this.changeAlertPolicyCompartmentDetails == null + ? 43 + : this.changeAlertPolicyCompartmentDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/CreateAlertPolicyRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/CreateAlertPolicyRequest.java new file mode 100644 index 00000000000..79ede12e2ce --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/CreateAlertPolicyRequest.java @@ -0,0 +1,277 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use CreateAlertPolicyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class CreateAlertPolicyRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.datasafe.model.CreateAlertPolicyDetails> { + + /** + * The details used to create a new alert policy. + */ + private com.oracle.bmc.datasafe.model.CreateAlertPolicyDetails createAlertPolicyDetails; + + /** + * The details used to create a new alert policy. + */ + public com.oracle.bmc.datasafe.model.CreateAlertPolicyDetails getCreateAlertPolicyDetails() { + return createAlertPolicyDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.datasafe.model.CreateAlertPolicyDetails getBody$() { + return createAlertPolicyDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateAlertPolicyRequest, + com.oracle.bmc.datasafe.model.CreateAlertPolicyDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The details used to create a new alert policy. + */ + private com.oracle.bmc.datasafe.model.CreateAlertPolicyDetails createAlertPolicyDetails = + null; + + /** + * The details used to create a new alert policy. + * @param createAlertPolicyDetails the value to set + * @return this builder instance + */ + public Builder createAlertPolicyDetails( + com.oracle.bmc.datasafe.model.CreateAlertPolicyDetails createAlertPolicyDetails) { + this.createAlertPolicyDetails = createAlertPolicyDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateAlertPolicyRequest o) { + createAlertPolicyDetails(o.getCreateAlertPolicyDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateAlertPolicyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateAlertPolicyRequest + */ + public CreateAlertPolicyRequest build() { + CreateAlertPolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.datasafe.model.CreateAlertPolicyDetails body) { + createAlertPolicyDetails(body); + return this; + } + + /** + * Build the instance of CreateAlertPolicyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateAlertPolicyRequest + */ + public CreateAlertPolicyRequest buildWithoutInvocationCallback() { + CreateAlertPolicyRequest request = new CreateAlertPolicyRequest(); + request.createAlertPolicyDetails = createAlertPolicyDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateAlertPolicyRequest(createAlertPolicyDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createAlertPolicyDetails(createAlertPolicyDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createAlertPolicyDetails=") + .append(String.valueOf(this.createAlertPolicyDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAlertPolicyRequest)) { + return false; + } + + CreateAlertPolicyRequest other = (CreateAlertPolicyRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createAlertPolicyDetails, other.createAlertPolicyDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createAlertPolicyDetails == null + ? 43 + : this.createAlertPolicyDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/CreateAlertPolicyRuleRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/CreateAlertPolicyRuleRequest.java new file mode 100644 index 00000000000..e61bb86f90c --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/CreateAlertPolicyRuleRequest.java @@ -0,0 +1,313 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use CreateAlertPolicyRuleRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class CreateAlertPolicyRuleRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.datasafe.model.CreateAlertPolicyRuleDetails> { + + /** + * The details used to create a new alert policy rule. + */ + private com.oracle.bmc.datasafe.model.CreateAlertPolicyRuleDetails createAlertPolicyRuleDetails; + + /** + * The details used to create a new alert policy rule. + */ + public com.oracle.bmc.datasafe.model.CreateAlertPolicyRuleDetails + getCreateAlertPolicyRuleDetails() { + return createAlertPolicyRuleDetails; + } + /** + * The OCID of the alert policy. + */ + private String alertPolicyId; + + /** + * The OCID of the alert policy. + */ + public String getAlertPolicyId() { + return alertPolicyId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.datasafe.model.CreateAlertPolicyRuleDetails getBody$() { + return createAlertPolicyRuleDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateAlertPolicyRuleRequest, + com.oracle.bmc.datasafe.model.CreateAlertPolicyRuleDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The details used to create a new alert policy rule. + */ + private com.oracle.bmc.datasafe.model.CreateAlertPolicyRuleDetails + createAlertPolicyRuleDetails = null; + + /** + * The details used to create a new alert policy rule. + * @param createAlertPolicyRuleDetails the value to set + * @return this builder instance + */ + public Builder createAlertPolicyRuleDetails( + com.oracle.bmc.datasafe.model.CreateAlertPolicyRuleDetails + createAlertPolicyRuleDetails) { + this.createAlertPolicyRuleDetails = createAlertPolicyRuleDetails; + return this; + } + + /** + * The OCID of the alert policy. + */ + private String alertPolicyId = null; + + /** + * The OCID of the alert policy. + * @param alertPolicyId the value to set + * @return this builder instance + */ + public Builder alertPolicyId(String alertPolicyId) { + this.alertPolicyId = alertPolicyId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique identifier for the request. + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateAlertPolicyRuleRequest o) { + createAlertPolicyRuleDetails(o.getCreateAlertPolicyRuleDetails()); + alertPolicyId(o.getAlertPolicyId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateAlertPolicyRuleRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateAlertPolicyRuleRequest + */ + public CreateAlertPolicyRuleRequest build() { + CreateAlertPolicyRuleRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.datasafe.model.CreateAlertPolicyRuleDetails body) { + createAlertPolicyRuleDetails(body); + return this; + } + + /** + * Build the instance of CreateAlertPolicyRuleRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateAlertPolicyRuleRequest + */ + public CreateAlertPolicyRuleRequest buildWithoutInvocationCallback() { + CreateAlertPolicyRuleRequest request = new CreateAlertPolicyRuleRequest(); + request.createAlertPolicyRuleDetails = createAlertPolicyRuleDetails; + request.alertPolicyId = alertPolicyId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateAlertPolicyRuleRequest(createAlertPolicyRuleDetails, alertPolicyId, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createAlertPolicyRuleDetails(createAlertPolicyRuleDetails) + .alertPolicyId(alertPolicyId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createAlertPolicyRuleDetails=") + .append(String.valueOf(this.createAlertPolicyRuleDetails)); + sb.append(",alertPolicyId=").append(String.valueOf(this.alertPolicyId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAlertPolicyRuleRequest)) { + return false; + } + + CreateAlertPolicyRuleRequest other = (CreateAlertPolicyRuleRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createAlertPolicyRuleDetails, other.createAlertPolicyRuleDetails) + && java.util.Objects.equals(this.alertPolicyId, other.alertPolicyId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createAlertPolicyRuleDetails == null + ? 43 + : this.createAlertPolicyRuleDetails.hashCode()); + result = + (result * PRIME) + + (this.alertPolicyId == null ? 43 : this.alertPolicyId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/DeleteAlertPolicyRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/DeleteAlertPolicyRequest.java new file mode 100644 index 00000000000..046c849e71e --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/DeleteAlertPolicyRequest.java @@ -0,0 +1,249 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use DeleteAlertPolicyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class DeleteAlertPolicyRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the alert policy. + */ + private String alertPolicyId; + + /** + * The OCID of the alert policy. + */ + public String getAlertPolicyId() { + return alertPolicyId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteAlertPolicyRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the alert policy. + */ + private String alertPolicyId = null; + + /** + * The OCID of the alert policy. + * @param alertPolicyId the value to set + * @return this builder instance + */ + public Builder alertPolicyId(String alertPolicyId) { + this.alertPolicyId = alertPolicyId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteAlertPolicyRequest o) { + alertPolicyId(o.getAlertPolicyId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteAlertPolicyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteAlertPolicyRequest + */ + public DeleteAlertPolicyRequest build() { + DeleteAlertPolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteAlertPolicyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteAlertPolicyRequest + */ + public DeleteAlertPolicyRequest buildWithoutInvocationCallback() { + DeleteAlertPolicyRequest request = new DeleteAlertPolicyRequest(); + request.alertPolicyId = alertPolicyId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteAlertPolicyRequest(alertPolicyId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .alertPolicyId(alertPolicyId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",alertPolicyId=").append(String.valueOf(this.alertPolicyId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteAlertPolicyRequest)) { + return false; + } + + DeleteAlertPolicyRequest other = (DeleteAlertPolicyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.alertPolicyId, other.alertPolicyId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.alertPolicyId == null ? 43 : this.alertPolicyId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/DeleteAlertPolicyRuleRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/DeleteAlertPolicyRuleRequest.java new file mode 100644 index 00000000000..cf66e34aee5 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/DeleteAlertPolicyRuleRequest.java @@ -0,0 +1,282 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use DeleteAlertPolicyRuleRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class DeleteAlertPolicyRuleRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the alert policy. + */ + private String alertPolicyId; + + /** + * The OCID of the alert policy. + */ + public String getAlertPolicyId() { + return alertPolicyId; + } + /** + * The key of the alert policy rule. + */ + private String ruleKey; + + /** + * The key of the alert policy rule. + */ + public String getRuleKey() { + return ruleKey; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteAlertPolicyRuleRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the alert policy. + */ + private String alertPolicyId = null; + + /** + * The OCID of the alert policy. + * @param alertPolicyId the value to set + * @return this builder instance + */ + public Builder alertPolicyId(String alertPolicyId) { + this.alertPolicyId = alertPolicyId; + return this; + } + + /** + * The key of the alert policy rule. + */ + private String ruleKey = null; + + /** + * The key of the alert policy rule. + * @param ruleKey the value to set + * @return this builder instance + */ + public Builder ruleKey(String ruleKey) { + this.ruleKey = ruleKey; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteAlertPolicyRuleRequest o) { + alertPolicyId(o.getAlertPolicyId()); + ruleKey(o.getRuleKey()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteAlertPolicyRuleRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteAlertPolicyRuleRequest + */ + public DeleteAlertPolicyRuleRequest build() { + DeleteAlertPolicyRuleRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteAlertPolicyRuleRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteAlertPolicyRuleRequest + */ + public DeleteAlertPolicyRuleRequest buildWithoutInvocationCallback() { + DeleteAlertPolicyRuleRequest request = new DeleteAlertPolicyRuleRequest(); + request.alertPolicyId = alertPolicyId; + request.ruleKey = ruleKey; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteAlertPolicyRuleRequest(alertPolicyId, ruleKey, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .alertPolicyId(alertPolicyId) + .ruleKey(ruleKey) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",alertPolicyId=").append(String.valueOf(this.alertPolicyId)); + sb.append(",ruleKey=").append(String.valueOf(this.ruleKey)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteAlertPolicyRuleRequest)) { + return false; + } + + DeleteAlertPolicyRuleRequest other = (DeleteAlertPolicyRuleRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.alertPolicyId, other.alertPolicyId) + && java.util.Objects.equals(this.ruleKey, other.ruleKey) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.alertPolicyId == null ? 43 : this.alertPolicyId.hashCode()); + result = (result * PRIME) + (this.ruleKey == null ? 43 : this.ruleKey.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/DeleteSqlFirewallAllowedSqlRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/DeleteSqlFirewallAllowedSqlRequest.java new file mode 100644 index 00000000000..1c32933a272 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/DeleteSqlFirewallAllowedSqlRequest.java @@ -0,0 +1,253 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use DeleteSqlFirewallAllowedSqlRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class DeleteSqlFirewallAllowedSqlRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the sqlFirewallAllowedSql resource. + */ + private String sqlFirewallAllowedSqlId; + + /** + * The OCID of the sqlFirewallAllowedSql resource. + */ + public String getSqlFirewallAllowedSqlId() { + return sqlFirewallAllowedSqlId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteSqlFirewallAllowedSqlRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the sqlFirewallAllowedSql resource. + */ + private String sqlFirewallAllowedSqlId = null; + + /** + * The OCID of the sqlFirewallAllowedSql resource. + * @param sqlFirewallAllowedSqlId the value to set + * @return this builder instance + */ + public Builder sqlFirewallAllowedSqlId(String sqlFirewallAllowedSqlId) { + this.sqlFirewallAllowedSqlId = sqlFirewallAllowedSqlId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteSqlFirewallAllowedSqlRequest o) { + sqlFirewallAllowedSqlId(o.getSqlFirewallAllowedSqlId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteSqlFirewallAllowedSqlRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteSqlFirewallAllowedSqlRequest + */ + public DeleteSqlFirewallAllowedSqlRequest build() { + DeleteSqlFirewallAllowedSqlRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteSqlFirewallAllowedSqlRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteSqlFirewallAllowedSqlRequest + */ + public DeleteSqlFirewallAllowedSqlRequest buildWithoutInvocationCallback() { + DeleteSqlFirewallAllowedSqlRequest request = new DeleteSqlFirewallAllowedSqlRequest(); + request.sqlFirewallAllowedSqlId = sqlFirewallAllowedSqlId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteSqlFirewallAllowedSqlRequest(sqlFirewallAllowedSqlId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .sqlFirewallAllowedSqlId(sqlFirewallAllowedSqlId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",sqlFirewallAllowedSqlId=").append(String.valueOf(this.sqlFirewallAllowedSqlId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSqlFirewallAllowedSqlRequest)) { + return false; + } + + DeleteSqlFirewallAllowedSqlRequest other = (DeleteSqlFirewallAllowedSqlRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.sqlFirewallAllowedSqlId, other.sqlFirewallAllowedSqlId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.sqlFirewallAllowedSqlId == null + ? 43 + : this.sqlFirewallAllowedSqlId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/GetAlertPolicyRuleRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/GetAlertPolicyRuleRequest.java new file mode 100644 index 00000000000..8e3ec7b7287 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/GetAlertPolicyRuleRequest.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use GetAlertPolicyRuleRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class GetAlertPolicyRuleRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the alert policy. + */ + private String alertPolicyId; + + /** + * The OCID of the alert policy. + */ + public String getAlertPolicyId() { + return alertPolicyId; + } + /** + * The key of the alert policy rule. + */ + private String ruleKey; + + /** + * The key of the alert policy rule. + */ + public String getRuleKey() { + return ruleKey; + } + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetAlertPolicyRuleRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the alert policy. + */ + private String alertPolicyId = null; + + /** + * The OCID of the alert policy. + * @param alertPolicyId the value to set + * @return this builder instance + */ + public Builder alertPolicyId(String alertPolicyId) { + this.alertPolicyId = alertPolicyId; + return this; + } + + /** + * The key of the alert policy rule. + */ + private String ruleKey = null; + + /** + * The key of the alert policy rule. + * @param ruleKey the value to set + * @return this builder instance + */ + public Builder ruleKey(String ruleKey) { + this.ruleKey = ruleKey; + return this; + } + + /** + * Unique identifier for the request. + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAlertPolicyRuleRequest o) { + alertPolicyId(o.getAlertPolicyId()); + ruleKey(o.getRuleKey()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetAlertPolicyRuleRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetAlertPolicyRuleRequest + */ + public GetAlertPolicyRuleRequest build() { + GetAlertPolicyRuleRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetAlertPolicyRuleRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetAlertPolicyRuleRequest + */ + public GetAlertPolicyRuleRequest buildWithoutInvocationCallback() { + GetAlertPolicyRuleRequest request = new GetAlertPolicyRuleRequest(); + request.alertPolicyId = alertPolicyId; + request.ruleKey = ruleKey; + request.opcRequestId = opcRequestId; + return request; + // new GetAlertPolicyRuleRequest(alertPolicyId, ruleKey, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .alertPolicyId(alertPolicyId) + .ruleKey(ruleKey) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",alertPolicyId=").append(String.valueOf(this.alertPolicyId)); + sb.append(",ruleKey=").append(String.valueOf(this.ruleKey)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetAlertPolicyRuleRequest)) { + return false; + } + + GetAlertPolicyRuleRequest other = (GetAlertPolicyRuleRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.alertPolicyId, other.alertPolicyId) + && java.util.Objects.equals(this.ruleKey, other.ruleKey) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.alertPolicyId == null ? 43 : this.alertPolicyId.hashCode()); + result = (result * PRIME) + (this.ruleKey == null ? 43 : this.ruleKey.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/GetSqlFirewallAllowedSqlRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/GetSqlFirewallAllowedSqlRequest.java new file mode 100644 index 00000000000..bf153b2c246 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/GetSqlFirewallAllowedSqlRequest.java @@ -0,0 +1,201 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use GetSqlFirewallAllowedSqlRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class GetSqlFirewallAllowedSqlRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the sqlFirewallAllowedSql resource. + */ + private String sqlFirewallAllowedSqlId; + + /** + * The OCID of the sqlFirewallAllowedSql resource. + */ + public String getSqlFirewallAllowedSqlId() { + return sqlFirewallAllowedSqlId; + } + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetSqlFirewallAllowedSqlRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the sqlFirewallAllowedSql resource. + */ + private String sqlFirewallAllowedSqlId = null; + + /** + * The OCID of the sqlFirewallAllowedSql resource. + * @param sqlFirewallAllowedSqlId the value to set + * @return this builder instance + */ + public Builder sqlFirewallAllowedSqlId(String sqlFirewallAllowedSqlId) { + this.sqlFirewallAllowedSqlId = sqlFirewallAllowedSqlId; + return this; + } + + /** + * Unique identifier for the request. + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSqlFirewallAllowedSqlRequest o) { + sqlFirewallAllowedSqlId(o.getSqlFirewallAllowedSqlId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetSqlFirewallAllowedSqlRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetSqlFirewallAllowedSqlRequest + */ + public GetSqlFirewallAllowedSqlRequest build() { + GetSqlFirewallAllowedSqlRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetSqlFirewallAllowedSqlRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetSqlFirewallAllowedSqlRequest + */ + public GetSqlFirewallAllowedSqlRequest buildWithoutInvocationCallback() { + GetSqlFirewallAllowedSqlRequest request = new GetSqlFirewallAllowedSqlRequest(); + request.sqlFirewallAllowedSqlId = sqlFirewallAllowedSqlId; + request.opcRequestId = opcRequestId; + return request; + // new GetSqlFirewallAllowedSqlRequest(sqlFirewallAllowedSqlId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .sqlFirewallAllowedSqlId(sqlFirewallAllowedSqlId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",sqlFirewallAllowedSqlId=").append(String.valueOf(this.sqlFirewallAllowedSqlId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSqlFirewallAllowedSqlRequest)) { + return false; + } + + GetSqlFirewallAllowedSqlRequest other = (GetSqlFirewallAllowedSqlRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.sqlFirewallAllowedSqlId, other.sqlFirewallAllowedSqlId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.sqlFirewallAllowedSqlId == null + ? 43 + : this.sqlFirewallAllowedSqlId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListAlertAnalyticsRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListAlertAnalyticsRequest.java index a37683b9c49..576d958d175 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListAlertAnalyticsRequest.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListAlertAnalyticsRequest.java @@ -368,6 +368,9 @@ public enum SummaryField { Medium("medium"), Low("low"), Alertcount("alertcount"), + AlertPolicyRuleKey("alertPolicyRuleKey"), + AlertPolicyRuleName("alertPolicyRuleName"), + Throttled("throttled"), ; private final String value; @@ -424,6 +427,8 @@ public enum GroupBy { AlertStatus("alertStatus"), TimeCreated("timeCreated"), PolicyId("policyId"), + AlertPolicyRuleKey("alertPolicyRuleKey"), + AlertPolicyRuleName("alertPolicyRuleName"), ; private final String value; diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListAuditEventAnalyticsRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListAuditEventAnalyticsRequest.java index da31e03a0e1..7030b274d82 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListAuditEventAnalyticsRequest.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListAuditEventAnalyticsRequest.java @@ -164,7 +164,7 @@ public AccessLevel getAccessLevel() { * text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. * (Numeric and boolean values should not be quoted.) *

- **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (eventName eq 'LOGON') + **Example:** (operationTime ge "2021-06-04T12:00:00.000Z") and (eventName eq "LOGON") * */ private String scimQuery; @@ -176,7 +176,7 @@ public AccessLevel getAccessLevel() { * text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. * (Numeric and boolean values should not be quoted.) *

- **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (eventName eq 'LOGON') + **Example:** (operationTime ge "2021-06-04T12:00:00.000Z") and (eventName eq "LOGON") * */ public String getScimQuery() { @@ -634,7 +634,7 @@ public Builder accessLevel(AccessLevel accessLevel) { * text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. * (Numeric and boolean values should not be quoted.) *

- **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (eventName eq 'LOGON') + **Example:** (operationTime ge "2021-06-04T12:00:00.000Z") and (eventName eq "LOGON") * */ private String scimQuery = null; @@ -646,7 +646,7 @@ public Builder accessLevel(AccessLevel accessLevel) { * text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. * (Numeric and boolean values should not be quoted.) *

- **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (eventName eq 'LOGON') + **Example:** (operationTime ge "2021-06-04T12:00:00.000Z") and (eventName eq "LOGON") * * @param scimQuery the value to set * @return this builder instance diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListAuditEventsRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListAuditEventsRequest.java index 8078d774b08..01d157cfcfd 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListAuditEventsRequest.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListAuditEventsRequest.java @@ -142,7 +142,7 @@ public String getPage() { * text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. * (Numeric and boolean values should not be quoted.) *

- **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (eventName eq 'LOGON') + **Example:** (operationTime ge "2021-06-04T12:00:00.000Z") and (eventName eq "LOGON") * */ private String scimQuery; @@ -154,7 +154,7 @@ public String getPage() { * text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. * (Numeric and boolean values should not be quoted.) *

- **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (eventName eq 'LOGON') + **Example:** (operationTime ge "2021-06-04T12:00:00.000Z") and (eventName eq "LOGON") * */ public String getScimQuery() { @@ -406,7 +406,7 @@ public Builder page(String page) { * text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. * (Numeric and boolean values should not be quoted.) *

- **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (eventName eq 'LOGON') + **Example:** (operationTime ge "2021-06-04T12:00:00.000Z") and (eventName eq "LOGON") * */ private String scimQuery = null; @@ -418,7 +418,7 @@ public Builder page(String page) { * text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. * (Numeric and boolean values should not be quoted.) *

- **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (eventName eq 'LOGON') + **Example:** (operationTime ge "2021-06-04T12:00:00.000Z") and (eventName eq "LOGON") * * @param scimQuery the value to set * @return this builder instance diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListFindingsRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListFindingsRequest.java index 2cc3286e1ca..d8b6c7586a8 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListFindingsRequest.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListFindingsRequest.java @@ -214,6 +214,17 @@ public static AccessLevel create(String key) { public AccessLevel getAccessLevel() { return accessLevel; } + /** + * A filter to return only items related to a specific target OCID. + */ + private String targetId; + + /** + * A filter to return only items related to a specific target OCID. + */ + public String getTargetId() { + return targetId; + } /** * Each finding in security assessment has an associated key (think of key as a finding's name). * For a given finding, the key will be the same across targets. The user can use these keys to filter the findings. @@ -401,6 +412,21 @@ public Builder accessLevel(AccessLevel accessLevel) { return this; } + /** + * A filter to return only items related to a specific target OCID. + */ + private String targetId = null; + + /** + * A filter to return only items related to a specific target OCID. + * @param targetId the value to set + * @return this builder instance + */ + public Builder targetId(String targetId) { + this.targetId = targetId; + return this; + } + /** * Each finding in security assessment has an associated key (think of key as a finding's name). * For a given finding, the key will be the same across targets. The user can use these keys to filter the findings. @@ -458,6 +484,7 @@ public Builder copy(ListFindingsRequest o) { page(o.getPage()); compartmentIdInSubtree(o.getCompartmentIdInSubtree()); accessLevel(o.getAccessLevel()); + targetId(o.getTargetId()); findingKey(o.getFindingKey()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); @@ -501,9 +528,10 @@ public ListFindingsRequest buildWithoutInvocationCallback() { request.page = page; request.compartmentIdInSubtree = compartmentIdInSubtree; request.accessLevel = accessLevel; + request.targetId = targetId; request.findingKey = findingKey; return request; - // new ListFindingsRequest(securityAssessmentId, opcRequestId, isTopFinding, severity, lifecycleState, references, limit, page, compartmentIdInSubtree, accessLevel, findingKey); + // new ListFindingsRequest(securityAssessmentId, opcRequestId, isTopFinding, severity, lifecycleState, references, limit, page, compartmentIdInSubtree, accessLevel, targetId, findingKey); } } @@ -523,6 +551,7 @@ public Builder toBuilder() { .page(page) .compartmentIdInSubtree(compartmentIdInSubtree) .accessLevel(accessLevel) + .targetId(targetId) .findingKey(findingKey); } @@ -549,6 +578,7 @@ public String toString() { sb.append(",page=").append(String.valueOf(this.page)); sb.append(",compartmentIdInSubtree=").append(String.valueOf(this.compartmentIdInSubtree)); sb.append(",accessLevel=").append(String.valueOf(this.accessLevel)); + sb.append(",targetId=").append(String.valueOf(this.targetId)); sb.append(",findingKey=").append(String.valueOf(this.findingKey)); sb.append(")"); return sb.toString(); @@ -576,6 +606,7 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.compartmentIdInSubtree, other.compartmentIdInSubtree) && java.util.Objects.equals(this.accessLevel, other.accessLevel) + && java.util.Objects.equals(this.targetId, other.targetId) && java.util.Objects.equals(this.findingKey, other.findingKey); } @@ -603,6 +634,7 @@ public int hashCode() { ? 43 : this.compartmentIdInSubtree.hashCode()); result = (result * PRIME) + (this.accessLevel == null ? 43 : this.accessLevel.hashCode()); + result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); result = (result * PRIME) + (this.findingKey == null ? 43 : this.findingKey.hashCode()); return result; } diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListReportsRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListReportsRequest.java index 80303ffeafc..3e43463f347 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListReportsRequest.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListReportsRequest.java @@ -226,6 +226,54 @@ public static SortBy create(String key) { public SortBy getSortBy() { return sortBy; } + /** + * An optional filter to return only resources that match the specified mime type. + */ + private MimeType mimeType; + + /** + * An optional filter to return only resources that match the specified mime type. + **/ + public enum MimeType { + Pdf("PDF"), + Xls("XLS"), + Json("JSON"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (MimeType v : MimeType.values()) { + map.put(v.getValue(), v); + } + } + + MimeType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static MimeType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid MimeType: " + key); + } + }; + + /** + * An optional filter to return only resources that match the specified mime type. + */ + public MimeType getMimeType() { + return mimeType; + } /** * The ID of the report definition to filter the list of reports */ @@ -237,6 +285,50 @@ public SortBy getSortBy() { public String getReportDefinitionId() { return reportDefinitionId; } + /** + * A filter to return only the resources that were generated after the specified date and time, as defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * Using TimeGeneratedGreaterThanOrEqualToQueryParam parameter retrieves all resources generated after that date. + *

+ **Example:** 2016-12-19T16:39:57.600Z + * + */ + private java.util.Date timeGeneratedGreaterThanOrEqualTo; + + /** + * A filter to return only the resources that were generated after the specified date and time, as defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * Using TimeGeneratedGreaterThanOrEqualToQueryParam parameter retrieves all resources generated after that date. + *

+ **Example:** 2016-12-19T16:39:57.600Z + * + */ + public java.util.Date getTimeGeneratedGreaterThanOrEqualTo() { + return timeGeneratedGreaterThanOrEqualTo; + } + /** + * Search for resources that were generated before a specific date. + * Specifying this parameter corresponding {@code timeGeneratedLessThan} + * parameter will retrieve all resources generated before the + * specified generated date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as + * defined by RFC 3339. + *

+ **Example:** 2016-12-19T16:39:57.600Z + * + */ + private java.util.Date timeGeneratedLessThan; + + /** + * Search for resources that were generated before a specific date. + * Specifying this parameter corresponding {@code timeGeneratedLessThan} + * parameter will retrieve all resources generated before the + * specified generated date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as + * defined by RFC 3339. + *

+ **Example:** 2016-12-19T16:39:57.600Z + * + */ + public java.util.Date getTimeGeneratedLessThan() { + return timeGeneratedLessThan; + } /** * Unique identifier for the request. */ @@ -412,6 +504,21 @@ public Builder sortBy(SortBy sortBy) { return this; } + /** + * An optional filter to return only resources that match the specified mime type. + */ + private MimeType mimeType = null; + + /** + * An optional filter to return only resources that match the specified mime type. + * @param mimeType the value to set + * @return this builder instance + */ + public Builder mimeType(MimeType mimeType) { + this.mimeType = mimeType; + return this; + } + /** * The ID of the report definition to filter the list of reports */ @@ -427,6 +534,59 @@ public Builder reportDefinitionId(String reportDefinitionId) { return this; } + /** + * A filter to return only the resources that were generated after the specified date and time, as defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * Using TimeGeneratedGreaterThanOrEqualToQueryParam parameter retrieves all resources generated after that date. + *

+ **Example:** 2016-12-19T16:39:57.600Z + * + */ + private java.util.Date timeGeneratedGreaterThanOrEqualTo = null; + + /** + * A filter to return only the resources that were generated after the specified date and time, as defined by [RFC3339](https://tools.ietf.org/html/rfc3339). + * Using TimeGeneratedGreaterThanOrEqualToQueryParam parameter retrieves all resources generated after that date. + *

+ **Example:** 2016-12-19T16:39:57.600Z + * + * @param timeGeneratedGreaterThanOrEqualTo the value to set + * @return this builder instance + */ + public Builder timeGeneratedGreaterThanOrEqualTo( + java.util.Date timeGeneratedGreaterThanOrEqualTo) { + this.timeGeneratedGreaterThanOrEqualTo = timeGeneratedGreaterThanOrEqualTo; + return this; + } + + /** + * Search for resources that were generated before a specific date. + * Specifying this parameter corresponding {@code timeGeneratedLessThan} + * parameter will retrieve all resources generated before the + * specified generated date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as + * defined by RFC 3339. + *

+ **Example:** 2016-12-19T16:39:57.600Z + * + */ + private java.util.Date timeGeneratedLessThan = null; + + /** + * Search for resources that were generated before a specific date. + * Specifying this parameter corresponding {@code timeGeneratedLessThan} + * parameter will retrieve all resources generated before the + * specified generated date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as + * defined by RFC 3339. + *

+ **Example:** 2016-12-19T16:39:57.600Z + * + * @param timeGeneratedLessThan the value to set + * @return this builder instance + */ + public Builder timeGeneratedLessThan(java.util.Date timeGeneratedLessThan) { + this.timeGeneratedLessThan = timeGeneratedLessThan; + return this; + } + /** * Unique identifier for the request. */ @@ -509,7 +669,10 @@ public Builder copy(ListReportsRequest o) { page(o.getPage()); sortOrder(o.getSortOrder()); sortBy(o.getSortBy()); + mimeType(o.getMimeType()); reportDefinitionId(o.getReportDefinitionId()); + timeGeneratedGreaterThanOrEqualTo(o.getTimeGeneratedGreaterThanOrEqualTo()); + timeGeneratedLessThan(o.getTimeGeneratedLessThan()); opcRequestId(o.getOpcRequestId()); lifecycleState(o.getLifecycleState()); type(o.getType()); @@ -553,12 +716,15 @@ public ListReportsRequest buildWithoutInvocationCallback() { request.page = page; request.sortOrder = sortOrder; request.sortBy = sortBy; + request.mimeType = mimeType; request.reportDefinitionId = reportDefinitionId; + request.timeGeneratedGreaterThanOrEqualTo = timeGeneratedGreaterThanOrEqualTo; + request.timeGeneratedLessThan = timeGeneratedLessThan; request.opcRequestId = opcRequestId; request.lifecycleState = lifecycleState; request.type = type; return request; - // new ListReportsRequest(compartmentId, compartmentIdInSubtree, accessLevel, displayName, limit, page, sortOrder, sortBy, reportDefinitionId, opcRequestId, lifecycleState, type); + // new ListReportsRequest(compartmentId, compartmentIdInSubtree, accessLevel, displayName, limit, page, sortOrder, sortBy, mimeType, reportDefinitionId, timeGeneratedGreaterThanOrEqualTo, timeGeneratedLessThan, opcRequestId, lifecycleState, type); } } @@ -576,7 +742,10 @@ public Builder toBuilder() { .page(page) .sortOrder(sortOrder) .sortBy(sortBy) + .mimeType(mimeType) .reportDefinitionId(reportDefinitionId) + .timeGeneratedGreaterThanOrEqualTo(timeGeneratedGreaterThanOrEqualTo) + .timeGeneratedLessThan(timeGeneratedLessThan) .opcRequestId(opcRequestId) .lifecycleState(lifecycleState) .type(type); @@ -603,7 +772,11 @@ public String toString() { sb.append(",page=").append(String.valueOf(this.page)); sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",mimeType=").append(String.valueOf(this.mimeType)); sb.append(",reportDefinitionId=").append(String.valueOf(this.reportDefinitionId)); + sb.append(",timeGeneratedGreaterThanOrEqualTo=") + .append(String.valueOf(this.timeGeneratedGreaterThanOrEqualTo)); + sb.append(",timeGeneratedLessThan=").append(String.valueOf(this.timeGeneratedLessThan)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(",type=").append(String.valueOf(this.type)); @@ -631,7 +804,12 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.page, other.page) && java.util.Objects.equals(this.sortOrder, other.sortOrder) && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.mimeType, other.mimeType) && java.util.Objects.equals(this.reportDefinitionId, other.reportDefinitionId) + && java.util.Objects.equals( + this.timeGeneratedGreaterThanOrEqualTo, + other.timeGeneratedGreaterThanOrEqualTo) + && java.util.Objects.equals(this.timeGeneratedLessThan, other.timeGeneratedLessThan) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.type, other.type); @@ -655,11 +833,22 @@ public int hashCode() { result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.mimeType == null ? 43 : this.mimeType.hashCode()); result = (result * PRIME) + (this.reportDefinitionId == null ? 43 : this.reportDefinitionId.hashCode()); + result = + (result * PRIME) + + (this.timeGeneratedGreaterThanOrEqualTo == null + ? 43 + : this.timeGeneratedGreaterThanOrEqualTo.hashCode()); + result = + (result * PRIME) + + (this.timeGeneratedLessThan == null + ? 43 + : this.timeGeneratedLessThan.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); result = (result * PRIME) diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListSensitiveDataModelSensitiveTypesRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListSensitiveDataModelSensitiveTypesRequest.java new file mode 100644 index 00000000000..d375c62ae10 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/ListSensitiveDataModelSensitiveTypesRequest.java @@ -0,0 +1,445 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use ListSensitiveDataModelSensitiveTypesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ListSensitiveDataModelSensitiveTypesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the sensitive data model. + */ + private String sensitiveDataModelId; + + /** + * The OCID of the sensitive data model. + */ + public String getSensitiveDataModelId() { + return sensitiveDataModelId; + } + /** + * A filter to return only items related to a specific sensitive type OCID. + */ + private String sensitiveTypeId; + + /** + * A filter to return only items related to a specific sensitive type OCID. + */ + public String getSensitiveTypeId() { + return sensitiveTypeId; + } + /** + * - The field to sort by. You can specify only one sorting parameter (sortorder). + * The default order is descending. + * + */ + private SortBy sortBy; + + /** + * - The field to sort by. You can specify only one sorting parameter (sortorder). + * The default order is descending. + * + **/ + public enum SortBy { + Count("count"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * - The field to sort by. You can specify only one sorting parameter (sortorder). + * The default order is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending (ASC) or descending (DESC). + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (ASC) or descending (DESC). + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortOrder: " + key); + } + }; + + /** + * The sort order to use, either ascending (ASC) or descending (DESC). + */ + public SortOrder getSortOrder() { + return sortOrder; + } + /** + * For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit; + + /** + * For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public Integer getLimit() { + return limit; + } + /** + * For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page; + + /** + * For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public String getPage() { + return page; + } + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListSensitiveDataModelSensitiveTypesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the sensitive data model. + */ + private String sensitiveDataModelId = null; + + /** + * The OCID of the sensitive data model. + * @param sensitiveDataModelId the value to set + * @return this builder instance + */ + public Builder sensitiveDataModelId(String sensitiveDataModelId) { + this.sensitiveDataModelId = sensitiveDataModelId; + return this; + } + + /** + * A filter to return only items related to a specific sensitive type OCID. + */ + private String sensitiveTypeId = null; + + /** + * A filter to return only items related to a specific sensitive type OCID. + * @param sensitiveTypeId the value to set + * @return this builder instance + */ + public Builder sensitiveTypeId(String sensitiveTypeId) { + this.sensitiveTypeId = sensitiveTypeId; + return this; + } + + /** + * - The field to sort by. You can specify only one sorting parameter (sortorder). + * The default order is descending. + * + */ + private SortBy sortBy = null; + + /** + * - The field to sort by. You can specify only one sorting parameter (sortorder). + * The default order is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending (ASC) or descending (DESC). + */ + private SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending (ASC) or descending (DESC). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page = null; + + /** + * For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Unique identifier for the request. + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSensitiveDataModelSensitiveTypesRequest o) { + sensitiveDataModelId(o.getSensitiveDataModelId()); + sensitiveTypeId(o.getSensitiveTypeId()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListSensitiveDataModelSensitiveTypesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListSensitiveDataModelSensitiveTypesRequest + */ + public ListSensitiveDataModelSensitiveTypesRequest build() { + ListSensitiveDataModelSensitiveTypesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListSensitiveDataModelSensitiveTypesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListSensitiveDataModelSensitiveTypesRequest + */ + public ListSensitiveDataModelSensitiveTypesRequest buildWithoutInvocationCallback() { + ListSensitiveDataModelSensitiveTypesRequest request = + new ListSensitiveDataModelSensitiveTypesRequest(); + request.sensitiveDataModelId = sensitiveDataModelId; + request.sensitiveTypeId = sensitiveTypeId; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + return request; + // new ListSensitiveDataModelSensitiveTypesRequest(sensitiveDataModelId, sensitiveTypeId, sortBy, sortOrder, limit, page, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .sensitiveDataModelId(sensitiveDataModelId) + .sensitiveTypeId(sensitiveTypeId) + .sortBy(sortBy) + .sortOrder(sortOrder) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",sensitiveDataModelId=").append(String.valueOf(this.sensitiveDataModelId)); + sb.append(",sensitiveTypeId=").append(String.valueOf(this.sensitiveTypeId)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSensitiveDataModelSensitiveTypesRequest)) { + return false; + } + + ListSensitiveDataModelSensitiveTypesRequest other = + (ListSensitiveDataModelSensitiveTypesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.sensitiveDataModelId, other.sensitiveDataModelId) + && java.util.Objects.equals(this.sensitiveTypeId, other.sensitiveTypeId) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.sensitiveDataModelId == null + ? 43 + : this.sensitiveDataModelId.hashCode()); + result = + (result * PRIME) + + (this.sensitiveTypeId == null ? 43 : this.sensitiveTypeId.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/PatchSqlFirewallAllowedSqlRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/PatchSqlFirewallAllowedSqlRequest.java new file mode 100644 index 00000000000..2d2bc6be359 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/PatchSqlFirewallAllowedSqlRequest.java @@ -0,0 +1,283 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use PatchSqlFirewallAllowedSqlRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class PatchSqlFirewallAllowedSqlRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.datasafe.model.PatchSqlFirewallAllowedSqlDetails> { + + /** + * The details used to patch the allowed sqls. + */ + private com.oracle.bmc.datasafe.model.PatchSqlFirewallAllowedSqlDetails + patchSqlFirewallAllowedSqlDetails; + + /** + * The details used to patch the allowed sqls. + */ + public com.oracle.bmc.datasafe.model.PatchSqlFirewallAllowedSqlDetails + getPatchSqlFirewallAllowedSqlDetails() { + return patchSqlFirewallAllowedSqlDetails; + } + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.datasafe.model.PatchSqlFirewallAllowedSqlDetails getBody$() { + return patchSqlFirewallAllowedSqlDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + PatchSqlFirewallAllowedSqlRequest, + com.oracle.bmc.datasafe.model.PatchSqlFirewallAllowedSqlDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The details used to patch the allowed sqls. + */ + private com.oracle.bmc.datasafe.model.PatchSqlFirewallAllowedSqlDetails + patchSqlFirewallAllowedSqlDetails = null; + + /** + * The details used to patch the allowed sqls. + * @param patchSqlFirewallAllowedSqlDetails the value to set + * @return this builder instance + */ + public Builder patchSqlFirewallAllowedSqlDetails( + com.oracle.bmc.datasafe.model.PatchSqlFirewallAllowedSqlDetails + patchSqlFirewallAllowedSqlDetails) { + this.patchSqlFirewallAllowedSqlDetails = patchSqlFirewallAllowedSqlDetails; + return this; + } + + /** + * Unique identifier for the request. + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(PatchSqlFirewallAllowedSqlRequest o) { + patchSqlFirewallAllowedSqlDetails(o.getPatchSqlFirewallAllowedSqlDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of PatchSqlFirewallAllowedSqlRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of PatchSqlFirewallAllowedSqlRequest + */ + public PatchSqlFirewallAllowedSqlRequest build() { + PatchSqlFirewallAllowedSqlRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.datasafe.model.PatchSqlFirewallAllowedSqlDetails body) { + patchSqlFirewallAllowedSqlDetails(body); + return this; + } + + /** + * Build the instance of PatchSqlFirewallAllowedSqlRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of PatchSqlFirewallAllowedSqlRequest + */ + public PatchSqlFirewallAllowedSqlRequest buildWithoutInvocationCallback() { + PatchSqlFirewallAllowedSqlRequest request = new PatchSqlFirewallAllowedSqlRequest(); + request.patchSqlFirewallAllowedSqlDetails = patchSqlFirewallAllowedSqlDetails; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new PatchSqlFirewallAllowedSqlRequest(patchSqlFirewallAllowedSqlDetails, opcRequestId, ifMatch); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .patchSqlFirewallAllowedSqlDetails(patchSqlFirewallAllowedSqlDetails) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",patchSqlFirewallAllowedSqlDetails=") + .append(String.valueOf(this.patchSqlFirewallAllowedSqlDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchSqlFirewallAllowedSqlRequest)) { + return false; + } + + PatchSqlFirewallAllowedSqlRequest other = (PatchSqlFirewallAllowedSqlRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.patchSqlFirewallAllowedSqlDetails, + other.patchSqlFirewallAllowedSqlDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.patchSqlFirewallAllowedSqlDetails == null + ? 43 + : this.patchSqlFirewallAllowedSqlDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/UnsetSecurityAssessmentBaselineRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/UnsetSecurityAssessmentBaselineRequest.java index ce503ea61eb..71d1182ae51 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/UnsetSecurityAssessmentBaselineRequest.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/UnsetSecurityAssessmentBaselineRequest.java @@ -10,7 +10,8 @@ */ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") public class UnsetSecurityAssessmentBaselineRequest - extends com.oracle.bmc.requests.BmcRequest { + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.datasafe.model.UnsetSecurityAssessmentBaselineDetails> { /** * The OCID of the security assessment. @@ -74,10 +75,34 @@ public String getOpcRetryToken() { public String getOpcRequestId() { return opcRequestId; } + /** + * Details of the target associated with the security assessment for which the user intents to unset the baseline. + */ + private com.oracle.bmc.datasafe.model.UnsetSecurityAssessmentBaselineDetails + unsetSecurityAssessmentBaselineDetails; + + /** + * Details of the target associated with the security assessment for which the user intents to unset the baseline. + */ + public com.oracle.bmc.datasafe.model.UnsetSecurityAssessmentBaselineDetails + getUnsetSecurityAssessmentBaselineDetails() { + return unsetSecurityAssessmentBaselineDetails; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.datasafe.model.UnsetSecurityAssessmentBaselineDetails getBody$() { + return unsetSecurityAssessmentBaselineDetails; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< - UnsetSecurityAssessmentBaselineRequest, java.lang.Void> { + UnsetSecurityAssessmentBaselineRequest, + com.oracle.bmc.datasafe.model.UnsetSecurityAssessmentBaselineDetails> { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; @@ -160,6 +185,24 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Details of the target associated with the security assessment for which the user intents to unset the baseline. + */ + private com.oracle.bmc.datasafe.model.UnsetSecurityAssessmentBaselineDetails + unsetSecurityAssessmentBaselineDetails = null; + + /** + * Details of the target associated with the security assessment for which the user intents to unset the baseline. + * @param unsetSecurityAssessmentBaselineDetails the value to set + * @return this builder instance + */ + public Builder unsetSecurityAssessmentBaselineDetails( + com.oracle.bmc.datasafe.model.UnsetSecurityAssessmentBaselineDetails + unsetSecurityAssessmentBaselineDetails) { + this.unsetSecurityAssessmentBaselineDetails = unsetSecurityAssessmentBaselineDetails; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -192,6 +235,7 @@ public Builder copy(UnsetSecurityAssessmentBaselineRequest o) { ifMatch(o.getIfMatch()); opcRetryToken(o.getOpcRetryToken()); opcRequestId(o.getOpcRequestId()); + unsetSecurityAssessmentBaselineDetails(o.getUnsetSecurityAssessmentBaselineDetails()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -214,6 +258,18 @@ public UnsetSecurityAssessmentBaselineRequest build() { return request; } + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.datasafe.model.UnsetSecurityAssessmentBaselineDetails body) { + unsetSecurityAssessmentBaselineDetails(body); + return this; + } + /** * Build the instance of UnsetSecurityAssessmentBaselineRequest as configured by this builder * @@ -229,8 +285,9 @@ public UnsetSecurityAssessmentBaselineRequest buildWithoutInvocationCallback() { request.ifMatch = ifMatch; request.opcRetryToken = opcRetryToken; request.opcRequestId = opcRequestId; + request.unsetSecurityAssessmentBaselineDetails = unsetSecurityAssessmentBaselineDetails; return request; - // new UnsetSecurityAssessmentBaselineRequest(securityAssessmentId, ifMatch, opcRetryToken, opcRequestId); + // new UnsetSecurityAssessmentBaselineRequest(securityAssessmentId, ifMatch, opcRetryToken, opcRequestId, unsetSecurityAssessmentBaselineDetails); } } @@ -243,7 +300,8 @@ public Builder toBuilder() { .securityAssessmentId(securityAssessmentId) .ifMatch(ifMatch) .opcRetryToken(opcRetryToken) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .unsetSecurityAssessmentBaselineDetails(unsetSecurityAssessmentBaselineDetails); } /** @@ -263,6 +321,8 @@ public String toString() { sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",unsetSecurityAssessmentBaselineDetails=") + .append(String.valueOf(this.unsetSecurityAssessmentBaselineDetails)); sb.append(")"); return sb.toString(); } @@ -281,7 +341,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.securityAssessmentId, other.securityAssessmentId) && java.util.Objects.equals(this.ifMatch, other.ifMatch) && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.unsetSecurityAssessmentBaselineDetails, + other.unsetSecurityAssessmentBaselineDetails); } @Override @@ -298,6 +361,11 @@ public int hashCode() { (result * PRIME) + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.unsetSecurityAssessmentBaselineDetails == null + ? 43 + : this.unsetSecurityAssessmentBaselineDetails.hashCode()); return result; } } diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/UnsetUserAssessmentBaselineRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/UnsetUserAssessmentBaselineRequest.java index 7b45bc8cb55..89b67874636 100644 --- a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/UnsetUserAssessmentBaselineRequest.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/UnsetUserAssessmentBaselineRequest.java @@ -10,7 +10,8 @@ */ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") public class UnsetUserAssessmentBaselineRequest - extends com.oracle.bmc.requests.BmcRequest { + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.datasafe.model.UnsetUserAssessmentBaselineDetails> { /** * The OCID of the user assessment. @@ -74,10 +75,34 @@ public String getOpcRetryToken() { public String getOpcRequestId() { return opcRequestId; } + /** + * Details of the target associated with the user assessment for which the user intents to unset the baseline. + */ + private com.oracle.bmc.datasafe.model.UnsetUserAssessmentBaselineDetails + unsetUserAssessmentBaselineDetails; + + /** + * Details of the target associated with the user assessment for which the user intents to unset the baseline. + */ + public com.oracle.bmc.datasafe.model.UnsetUserAssessmentBaselineDetails + getUnsetUserAssessmentBaselineDetails() { + return unsetUserAssessmentBaselineDetails; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.datasafe.model.UnsetUserAssessmentBaselineDetails getBody$() { + return unsetUserAssessmentBaselineDetails; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< - UnsetUserAssessmentBaselineRequest, java.lang.Void> { + UnsetUserAssessmentBaselineRequest, + com.oracle.bmc.datasafe.model.UnsetUserAssessmentBaselineDetails> { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; @@ -160,6 +185,24 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Details of the target associated with the user assessment for which the user intents to unset the baseline. + */ + private com.oracle.bmc.datasafe.model.UnsetUserAssessmentBaselineDetails + unsetUserAssessmentBaselineDetails = null; + + /** + * Details of the target associated with the user assessment for which the user intents to unset the baseline. + * @param unsetUserAssessmentBaselineDetails the value to set + * @return this builder instance + */ + public Builder unsetUserAssessmentBaselineDetails( + com.oracle.bmc.datasafe.model.UnsetUserAssessmentBaselineDetails + unsetUserAssessmentBaselineDetails) { + this.unsetUserAssessmentBaselineDetails = unsetUserAssessmentBaselineDetails; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -192,6 +235,7 @@ public Builder copy(UnsetUserAssessmentBaselineRequest o) { ifMatch(o.getIfMatch()); opcRetryToken(o.getOpcRetryToken()); opcRequestId(o.getOpcRequestId()); + unsetUserAssessmentBaselineDetails(o.getUnsetUserAssessmentBaselineDetails()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -214,6 +258,18 @@ public UnsetUserAssessmentBaselineRequest build() { return request; } + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.datasafe.model.UnsetUserAssessmentBaselineDetails body) { + unsetUserAssessmentBaselineDetails(body); + return this; + } + /** * Build the instance of UnsetUserAssessmentBaselineRequest as configured by this builder * @@ -228,8 +284,9 @@ public UnsetUserAssessmentBaselineRequest buildWithoutInvocationCallback() { request.ifMatch = ifMatch; request.opcRetryToken = opcRetryToken; request.opcRequestId = opcRequestId; + request.unsetUserAssessmentBaselineDetails = unsetUserAssessmentBaselineDetails; return request; - // new UnsetUserAssessmentBaselineRequest(userAssessmentId, ifMatch, opcRetryToken, opcRequestId); + // new UnsetUserAssessmentBaselineRequest(userAssessmentId, ifMatch, opcRetryToken, opcRequestId, unsetUserAssessmentBaselineDetails); } } @@ -242,7 +299,8 @@ public Builder toBuilder() { .userAssessmentId(userAssessmentId) .ifMatch(ifMatch) .opcRetryToken(opcRetryToken) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .unsetUserAssessmentBaselineDetails(unsetUserAssessmentBaselineDetails); } /** @@ -262,6 +320,8 @@ public String toString() { sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",unsetUserAssessmentBaselineDetails=") + .append(String.valueOf(this.unsetUserAssessmentBaselineDetails)); sb.append(")"); return sb.toString(); } @@ -280,7 +340,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.userAssessmentId, other.userAssessmentId) && java.util.Objects.equals(this.ifMatch, other.ifMatch) && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.unsetUserAssessmentBaselineDetails, + other.unsetUserAssessmentBaselineDetails); } @Override @@ -295,6 +358,11 @@ public int hashCode() { (result * PRIME) + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.unsetUserAssessmentBaselineDetails == null + ? 43 + : this.unsetUserAssessmentBaselineDetails.hashCode()); return result; } } diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/UpdateAlertPolicyRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/UpdateAlertPolicyRequest.java new file mode 100644 index 00000000000..a9ef91749f0 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/UpdateAlertPolicyRequest.java @@ -0,0 +1,313 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use UpdateAlertPolicyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class UpdateAlertPolicyRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.datasafe.model.UpdateAlertPolicyDetails> { + + /** + * The OCID of the alert policy. + */ + private String alertPolicyId; + + /** + * The OCID of the alert policy. + */ + public String getAlertPolicyId() { + return alertPolicyId; + } + /** + * The details used to update the alert policy. + */ + private com.oracle.bmc.datasafe.model.UpdateAlertPolicyDetails updateAlertPolicyDetails; + + /** + * The details used to update the alert policy. + */ + public com.oracle.bmc.datasafe.model.UpdateAlertPolicyDetails getUpdateAlertPolicyDetails() { + return updateAlertPolicyDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.datasafe.model.UpdateAlertPolicyDetails getBody$() { + return updateAlertPolicyDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateAlertPolicyRequest, + com.oracle.bmc.datasafe.model.UpdateAlertPolicyDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the alert policy. + */ + private String alertPolicyId = null; + + /** + * The OCID of the alert policy. + * @param alertPolicyId the value to set + * @return this builder instance + */ + public Builder alertPolicyId(String alertPolicyId) { + this.alertPolicyId = alertPolicyId; + return this; + } + + /** + * The details used to update the alert policy. + */ + private com.oracle.bmc.datasafe.model.UpdateAlertPolicyDetails updateAlertPolicyDetails = + null; + + /** + * The details used to update the alert policy. + * @param updateAlertPolicyDetails the value to set + * @return this builder instance + */ + public Builder updateAlertPolicyDetails( + com.oracle.bmc.datasafe.model.UpdateAlertPolicyDetails updateAlertPolicyDetails) { + this.updateAlertPolicyDetails = updateAlertPolicyDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateAlertPolicyRequest o) { + alertPolicyId(o.getAlertPolicyId()); + updateAlertPolicyDetails(o.getUpdateAlertPolicyDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateAlertPolicyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateAlertPolicyRequest + */ + public UpdateAlertPolicyRequest build() { + UpdateAlertPolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.datasafe.model.UpdateAlertPolicyDetails body) { + updateAlertPolicyDetails(body); + return this; + } + + /** + * Build the instance of UpdateAlertPolicyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateAlertPolicyRequest + */ + public UpdateAlertPolicyRequest buildWithoutInvocationCallback() { + UpdateAlertPolicyRequest request = new UpdateAlertPolicyRequest(); + request.alertPolicyId = alertPolicyId; + request.updateAlertPolicyDetails = updateAlertPolicyDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateAlertPolicyRequest(alertPolicyId, updateAlertPolicyDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .alertPolicyId(alertPolicyId) + .updateAlertPolicyDetails(updateAlertPolicyDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",alertPolicyId=").append(String.valueOf(this.alertPolicyId)); + sb.append(",updateAlertPolicyDetails=") + .append(String.valueOf(this.updateAlertPolicyDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateAlertPolicyRequest)) { + return false; + } + + UpdateAlertPolicyRequest other = (UpdateAlertPolicyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.alertPolicyId, other.alertPolicyId) + && java.util.Objects.equals( + this.updateAlertPolicyDetails, other.updateAlertPolicyDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.alertPolicyId == null ? 43 : this.alertPolicyId.hashCode()); + result = + (result * PRIME) + + (this.updateAlertPolicyDetails == null + ? 43 + : this.updateAlertPolicyDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/UpdateAlertPolicyRuleRequest.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/UpdateAlertPolicyRuleRequest.java new file mode 100644 index 00000000000..97eddc269ed --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/requests/UpdateAlertPolicyRuleRequest.java @@ -0,0 +1,347 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.requests; + +import com.oracle.bmc.datasafe.model.*; +/** + * Example: Click here to see how to use UpdateAlertPolicyRuleRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class UpdateAlertPolicyRuleRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.datasafe.model.UpdateAlertPolicyRuleDetails> { + + /** + * The OCID of the alert policy. + */ + private String alertPolicyId; + + /** + * The OCID of the alert policy. + */ + public String getAlertPolicyId() { + return alertPolicyId; + } + /** + * The key of the alert policy rule. + */ + private String ruleKey; + + /** + * The key of the alert policy rule. + */ + public String getRuleKey() { + return ruleKey; + } + /** + * The details used to update the alert policy rule. + */ + private com.oracle.bmc.datasafe.model.UpdateAlertPolicyRuleDetails updateAlertPolicyRuleDetails; + + /** + * The details used to update the alert policy rule. + */ + public com.oracle.bmc.datasafe.model.UpdateAlertPolicyRuleDetails + getUpdateAlertPolicyRuleDetails() { + return updateAlertPolicyRuleDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.datasafe.model.UpdateAlertPolicyRuleDetails getBody$() { + return updateAlertPolicyRuleDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateAlertPolicyRuleRequest, + com.oracle.bmc.datasafe.model.UpdateAlertPolicyRuleDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the alert policy. + */ + private String alertPolicyId = null; + + /** + * The OCID of the alert policy. + * @param alertPolicyId the value to set + * @return this builder instance + */ + public Builder alertPolicyId(String alertPolicyId) { + this.alertPolicyId = alertPolicyId; + return this; + } + + /** + * The key of the alert policy rule. + */ + private String ruleKey = null; + + /** + * The key of the alert policy rule. + * @param ruleKey the value to set + * @return this builder instance + */ + public Builder ruleKey(String ruleKey) { + this.ruleKey = ruleKey; + return this; + } + + /** + * The details used to update the alert policy rule. + */ + private com.oracle.bmc.datasafe.model.UpdateAlertPolicyRuleDetails + updateAlertPolicyRuleDetails = null; + + /** + * The details used to update the alert policy rule. + * @param updateAlertPolicyRuleDetails the value to set + * @return this builder instance + */ + public Builder updateAlertPolicyRuleDetails( + com.oracle.bmc.datasafe.model.UpdateAlertPolicyRuleDetails + updateAlertPolicyRuleDetails) { + this.updateAlertPolicyRuleDetails = updateAlertPolicyRuleDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the if-match parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateAlertPolicyRuleRequest o) { + alertPolicyId(o.getAlertPolicyId()); + ruleKey(o.getRuleKey()); + updateAlertPolicyRuleDetails(o.getUpdateAlertPolicyRuleDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateAlertPolicyRuleRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateAlertPolicyRuleRequest + */ + public UpdateAlertPolicyRuleRequest build() { + UpdateAlertPolicyRuleRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.datasafe.model.UpdateAlertPolicyRuleDetails body) { + updateAlertPolicyRuleDetails(body); + return this; + } + + /** + * Build the instance of UpdateAlertPolicyRuleRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateAlertPolicyRuleRequest + */ + public UpdateAlertPolicyRuleRequest buildWithoutInvocationCallback() { + UpdateAlertPolicyRuleRequest request = new UpdateAlertPolicyRuleRequest(); + request.alertPolicyId = alertPolicyId; + request.ruleKey = ruleKey; + request.updateAlertPolicyRuleDetails = updateAlertPolicyRuleDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateAlertPolicyRuleRequest(alertPolicyId, ruleKey, updateAlertPolicyRuleDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .alertPolicyId(alertPolicyId) + .ruleKey(ruleKey) + .updateAlertPolicyRuleDetails(updateAlertPolicyRuleDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",alertPolicyId=").append(String.valueOf(this.alertPolicyId)); + sb.append(",ruleKey=").append(String.valueOf(this.ruleKey)); + sb.append(",updateAlertPolicyRuleDetails=") + .append(String.valueOf(this.updateAlertPolicyRuleDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateAlertPolicyRuleRequest)) { + return false; + } + + UpdateAlertPolicyRuleRequest other = (UpdateAlertPolicyRuleRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.alertPolicyId, other.alertPolicyId) + && java.util.Objects.equals(this.ruleKey, other.ruleKey) + && java.util.Objects.equals( + this.updateAlertPolicyRuleDetails, other.updateAlertPolicyRuleDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.alertPolicyId == null ? 43 : this.alertPolicyId.hashCode()); + result = (result * PRIME) + (this.ruleKey == null ? 43 : this.ruleKey.hashCode()); + result = + (result * PRIME) + + (this.updateAlertPolicyRuleDetails == null + ? 43 + : this.updateAlertPolicyRuleDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/BulkCreateSqlFirewallAllowedSqlsResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/BulkCreateSqlFirewallAllowedSqlsResponse.java new file mode 100644 index 00000000000..6ea7bc8e850 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/BulkCreateSqlFirewallAllowedSqlsResponse.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class BulkCreateSqlFirewallAllowedSqlsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private BulkCreateSqlFirewallAllowedSqlsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(BulkCreateSqlFirewallAllowedSqlsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public BulkCreateSqlFirewallAllowedSqlsResponse build() { + return new BulkCreateSqlFirewallAllowedSqlsResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkCreateSqlFirewallAllowedSqlsResponse)) { + return false; + } + + BulkCreateSqlFirewallAllowedSqlsResponse other = + (BulkCreateSqlFirewallAllowedSqlsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/BulkDeleteSqlFirewallAllowedSqlsResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/BulkDeleteSqlFirewallAllowedSqlsResponse.java new file mode 100644 index 00000000000..e8f62e797ed --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/BulkDeleteSqlFirewallAllowedSqlsResponse.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class BulkDeleteSqlFirewallAllowedSqlsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private BulkDeleteSqlFirewallAllowedSqlsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(BulkDeleteSqlFirewallAllowedSqlsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public BulkDeleteSqlFirewallAllowedSqlsResponse build() { + return new BulkDeleteSqlFirewallAllowedSqlsResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkDeleteSqlFirewallAllowedSqlsResponse)) { + return false; + } + + BulkDeleteSqlFirewallAllowedSqlsResponse other = + (BulkDeleteSqlFirewallAllowedSqlsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ChangeAlertPolicyCompartmentResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ChangeAlertPolicyCompartmentResponse.java new file mode 100644 index 00000000000..7986107cb47 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ChangeAlertPolicyCompartmentResponse.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ChangeAlertPolicyCompartmentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private ChangeAlertPolicyCompartmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeAlertPolicyCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeAlertPolicyCompartmentResponse build() { + return new ChangeAlertPolicyCompartmentResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeAlertPolicyCompartmentResponse)) { + return false; + } + + ChangeAlertPolicyCompartmentResponse other = (ChangeAlertPolicyCompartmentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/CreateAlertPolicyResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/CreateAlertPolicyResponse.java new file mode 100644 index 00000000000..a72163c9611 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/CreateAlertPolicyResponse.java @@ -0,0 +1,292 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class CreateAlertPolicyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + */ + private String etag; + + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The full URI of the alert policy. + * + */ + private String location; + + /** + * The full URI of the alert policy. + * + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * The returned AlertPolicy instance. + */ + private com.oracle.bmc.datasafe.model.AlertPolicy alertPolicy; + + /** + * The returned AlertPolicy instance. + * @return the value + */ + public com.oracle.bmc.datasafe.model.AlertPolicy getAlertPolicy() { + return alertPolicy; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcWorkRequestId", + "opcRequestId", + "location", + "alertPolicy" + }) + private CreateAlertPolicyResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcWorkRequestId, + String opcRequestId, + String location, + com.oracle.bmc.datasafe.model.AlertPolicy alertPolicy) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.location = location; + this.alertPolicy = alertPolicy; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + */ + private String etag; + + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The full URI of the alert policy. + * + */ + private String location; + + /** + * The full URI of the alert policy. + * + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * The returned AlertPolicy instance. + */ + private com.oracle.bmc.datasafe.model.AlertPolicy alertPolicy; + + /** + * The returned AlertPolicy instance. + * @param alertPolicy the value to set + * @return this builder + */ + public Builder alertPolicy(com.oracle.bmc.datasafe.model.AlertPolicy alertPolicy) { + this.alertPolicy = alertPolicy; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateAlertPolicyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + location(o.getLocation()); + alertPolicy(o.getAlertPolicy()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateAlertPolicyResponse build() { + return new CreateAlertPolicyResponse( + __httpStatusCode__, + headers, + etag, + opcWorkRequestId, + opcRequestId, + location, + alertPolicy); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",alertPolicy=").append(String.valueOf(alertPolicy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAlertPolicyResponse)) { + return false; + } + + CreateAlertPolicyResponse other = (CreateAlertPolicyResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.alertPolicy, other.alertPolicy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = (result * PRIME) + (this.alertPolicy == null ? 43 : this.alertPolicy.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/CreateAlertPolicyRuleResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/CreateAlertPolicyRuleResponse.java new file mode 100644 index 00000000000..dc6c5b44d1f --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/CreateAlertPolicyRuleResponse.java @@ -0,0 +1,295 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class CreateAlertPolicyRuleResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + */ + private String etag; + + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The full URI of the alert policy rule. + * + */ + private String location; + + /** + * The full URI of the alert policy rule. + * + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * The returned AlertPolicyRule instance. + */ + private com.oracle.bmc.datasafe.model.AlertPolicyRule alertPolicyRule; + + /** + * The returned AlertPolicyRule instance. + * @return the value + */ + public com.oracle.bmc.datasafe.model.AlertPolicyRule getAlertPolicyRule() { + return alertPolicyRule; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcWorkRequestId", + "opcRequestId", + "location", + "alertPolicyRule" + }) + private CreateAlertPolicyRuleResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcWorkRequestId, + String opcRequestId, + String location, + com.oracle.bmc.datasafe.model.AlertPolicyRule alertPolicyRule) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.location = location; + this.alertPolicyRule = alertPolicyRule; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + */ + private String etag; + + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The full URI of the alert policy rule. + * + */ + private String location; + + /** + * The full URI of the alert policy rule. + * + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * The returned AlertPolicyRule instance. + */ + private com.oracle.bmc.datasafe.model.AlertPolicyRule alertPolicyRule; + + /** + * The returned AlertPolicyRule instance. + * @param alertPolicyRule the value to set + * @return this builder + */ + public Builder alertPolicyRule( + com.oracle.bmc.datasafe.model.AlertPolicyRule alertPolicyRule) { + this.alertPolicyRule = alertPolicyRule; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateAlertPolicyRuleResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + location(o.getLocation()); + alertPolicyRule(o.getAlertPolicyRule()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateAlertPolicyRuleResponse build() { + return new CreateAlertPolicyRuleResponse( + __httpStatusCode__, + headers, + etag, + opcWorkRequestId, + opcRequestId, + location, + alertPolicyRule); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",alertPolicyRule=").append(String.valueOf(alertPolicyRule)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAlertPolicyRuleResponse)) { + return false; + } + + CreateAlertPolicyRuleResponse other = (CreateAlertPolicyRuleResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.alertPolicyRule, other.alertPolicyRule); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = + (result * PRIME) + + (this.alertPolicyRule == null ? 43 : this.alertPolicyRule.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/DeleteAlertPolicyResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/DeleteAlertPolicyResponse.java new file mode 100644 index 00000000000..eed93154849 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/DeleteAlertPolicyResponse.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class DeleteAlertPolicyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteAlertPolicyResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteAlertPolicyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteAlertPolicyResponse build() { + return new DeleteAlertPolicyResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteAlertPolicyResponse)) { + return false; + } + + DeleteAlertPolicyResponse other = (DeleteAlertPolicyResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/DeleteAlertPolicyRuleResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/DeleteAlertPolicyRuleResponse.java new file mode 100644 index 00000000000..d65f41d91d5 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/DeleteAlertPolicyRuleResponse.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class DeleteAlertPolicyRuleResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteAlertPolicyRuleResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteAlertPolicyRuleResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteAlertPolicyRuleResponse build() { + return new DeleteAlertPolicyRuleResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteAlertPolicyRuleResponse)) { + return false; + } + + DeleteAlertPolicyRuleResponse other = (DeleteAlertPolicyRuleResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/DeleteSqlFirewallAllowedSqlResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/DeleteSqlFirewallAllowedSqlResponse.java new file mode 100644 index 00000000000..1d6f8860fd1 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/DeleteSqlFirewallAllowedSqlResponse.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class DeleteSqlFirewallAllowedSqlResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteSqlFirewallAllowedSqlResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteSqlFirewallAllowedSqlResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteSqlFirewallAllowedSqlResponse build() { + return new DeleteSqlFirewallAllowedSqlResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSqlFirewallAllowedSqlResponse)) { + return false; + } + + DeleteSqlFirewallAllowedSqlResponse other = (DeleteSqlFirewallAllowedSqlResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/GetAlertPolicyRuleResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/GetAlertPolicyRuleResponse.java new file mode 100644 index 00000000000..c0d7f29c508 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/GetAlertPolicyRuleResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class GetAlertPolicyRuleResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + */ + private String etag; + + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned AlertPolicyRule instance. + */ + private com.oracle.bmc.datasafe.model.AlertPolicyRule alertPolicyRule; + + /** + * The returned AlertPolicyRule instance. + * @return the value + */ + public com.oracle.bmc.datasafe.model.AlertPolicyRule getAlertPolicyRule() { + return alertPolicyRule; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "alertPolicyRule" + }) + private GetAlertPolicyRuleResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.datasafe.model.AlertPolicyRule alertPolicyRule) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.alertPolicyRule = alertPolicyRule; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + */ + private String etag; + + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned AlertPolicyRule instance. + */ + private com.oracle.bmc.datasafe.model.AlertPolicyRule alertPolicyRule; + + /** + * The returned AlertPolicyRule instance. + * @param alertPolicyRule the value to set + * @return this builder + */ + public Builder alertPolicyRule( + com.oracle.bmc.datasafe.model.AlertPolicyRule alertPolicyRule) { + this.alertPolicyRule = alertPolicyRule; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAlertPolicyRuleResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + alertPolicyRule(o.getAlertPolicyRule()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetAlertPolicyRuleResponse build() { + return new GetAlertPolicyRuleResponse( + __httpStatusCode__, headers, etag, opcRequestId, alertPolicyRule); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",alertPolicyRule=").append(String.valueOf(alertPolicyRule)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetAlertPolicyRuleResponse)) { + return false; + } + + GetAlertPolicyRuleResponse other = (GetAlertPolicyRuleResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.alertPolicyRule, other.alertPolicyRule); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.alertPolicyRule == null ? 43 : this.alertPolicyRule.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/GetSqlFirewallAllowedSqlResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/GetSqlFirewallAllowedSqlResponse.java new file mode 100644 index 00000000000..e748f8e8200 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/GetSqlFirewallAllowedSqlResponse.java @@ -0,0 +1,212 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class GetSqlFirewallAllowedSqlResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + */ + private String etag; + + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned SqlFirewallAllowedSql instance. + */ + private com.oracle.bmc.datasafe.model.SqlFirewallAllowedSql sqlFirewallAllowedSql; + + /** + * The returned SqlFirewallAllowedSql instance. + * @return the value + */ + public com.oracle.bmc.datasafe.model.SqlFirewallAllowedSql getSqlFirewallAllowedSql() { + return sqlFirewallAllowedSql; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "sqlFirewallAllowedSql" + }) + private GetSqlFirewallAllowedSqlResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.datasafe.model.SqlFirewallAllowedSql sqlFirewallAllowedSql) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.sqlFirewallAllowedSql = sqlFirewallAllowedSql; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + */ + private String etag; + + /** + * For optimistic concurrency control. For more information, see [ETags for Optimistic Concurrency Control](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned SqlFirewallAllowedSql instance. + */ + private com.oracle.bmc.datasafe.model.SqlFirewallAllowedSql sqlFirewallAllowedSql; + + /** + * The returned SqlFirewallAllowedSql instance. + * @param sqlFirewallAllowedSql the value to set + * @return this builder + */ + public Builder sqlFirewallAllowedSql( + com.oracle.bmc.datasafe.model.SqlFirewallAllowedSql sqlFirewallAllowedSql) { + this.sqlFirewallAllowedSql = sqlFirewallAllowedSql; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSqlFirewallAllowedSqlResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + sqlFirewallAllowedSql(o.getSqlFirewallAllowedSql()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetSqlFirewallAllowedSqlResponse build() { + return new GetSqlFirewallAllowedSqlResponse( + __httpStatusCode__, headers, etag, opcRequestId, sqlFirewallAllowedSql); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",sqlFirewallAllowedSql=").append(String.valueOf(sqlFirewallAllowedSql)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSqlFirewallAllowedSqlResponse)) { + return false; + } + + GetSqlFirewallAllowedSqlResponse other = (GetSqlFirewallAllowedSqlResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.sqlFirewallAllowedSql, other.sqlFirewallAllowedSql); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.sqlFirewallAllowedSql == null + ? 43 + : this.sqlFirewallAllowedSql.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ListSensitiveDataModelSensitiveTypesResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ListSensitiveDataModelSensitiveTypesResponse.java new file mode 100644 index 00000000000..eaed50222f8 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/ListSensitiveDataModelSensitiveTypesResponse.java @@ -0,0 +1,275 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class ListSensitiveDataModelSensitiveTypesResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the previous batch of items. + * + */ + private String opcPrevPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the previous batch of items. + * + * @return the value + */ + public String getOpcPrevPage() { + return opcPrevPage; + } + + /** + * The returned SensitiveDataModelSensitiveTypeCollection instance. + */ + private com.oracle.bmc.datasafe.model.SensitiveDataModelSensitiveTypeCollection + sensitiveDataModelSensitiveTypeCollection; + + /** + * The returned SensitiveDataModelSensitiveTypeCollection instance. + * @return the value + */ + public com.oracle.bmc.datasafe.model.SensitiveDataModelSensitiveTypeCollection + getSensitiveDataModelSensitiveTypeCollection() { + return sensitiveDataModelSensitiveTypeCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "opcPrevPage", + "sensitiveDataModelSensitiveTypeCollection" + }) + private ListSensitiveDataModelSensitiveTypesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + String opcPrevPage, + com.oracle.bmc.datasafe.model.SensitiveDataModelSensitiveTypeCollection + sensitiveDataModelSensitiveTypeCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.opcPrevPage = opcPrevPage; + this.sensitiveDataModelSensitiveTypeCollection = sensitiveDataModelSensitiveTypeCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the previous batch of items. + * + */ + private String opcPrevPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the previous batch of items. + * + * @param opcPrevPage the value to set + * @return this builder + */ + public Builder opcPrevPage(String opcPrevPage) { + this.opcPrevPage = opcPrevPage; + return this; + } + + /** + * The returned SensitiveDataModelSensitiveTypeCollection instance. + */ + private com.oracle.bmc.datasafe.model.SensitiveDataModelSensitiveTypeCollection + sensitiveDataModelSensitiveTypeCollection; + + /** + * The returned SensitiveDataModelSensitiveTypeCollection instance. + * @param sensitiveDataModelSensitiveTypeCollection the value to set + * @return this builder + */ + public Builder sensitiveDataModelSensitiveTypeCollection( + com.oracle.bmc.datasafe.model.SensitiveDataModelSensitiveTypeCollection + sensitiveDataModelSensitiveTypeCollection) { + this.sensitiveDataModelSensitiveTypeCollection = + sensitiveDataModelSensitiveTypeCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSensitiveDataModelSensitiveTypesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + opcPrevPage(o.getOpcPrevPage()); + sensitiveDataModelSensitiveTypeCollection( + o.getSensitiveDataModelSensitiveTypeCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListSensitiveDataModelSensitiveTypesResponse build() { + return new ListSensitiveDataModelSensitiveTypesResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + opcPrevPage, + sensitiveDataModelSensitiveTypeCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcPrevPage=").append(String.valueOf(opcPrevPage)); + sb.append(",sensitiveDataModelSensitiveTypeCollection=") + .append(String.valueOf(sensitiveDataModelSensitiveTypeCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSensitiveDataModelSensitiveTypesResponse)) { + return false; + } + + ListSensitiveDataModelSensitiveTypesResponse other = + (ListSensitiveDataModelSensitiveTypesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcPrevPage, other.opcPrevPage) + && java.util.Objects.equals( + this.sensitiveDataModelSensitiveTypeCollection, + other.sensitiveDataModelSensitiveTypeCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcPrevPage == null ? 43 : this.opcPrevPage.hashCode()); + result = + (result * PRIME) + + (this.sensitiveDataModelSensitiveTypeCollection == null + ? 43 + : this.sensitiveDataModelSensitiveTypeCollection.hashCode()); + return result; + } +} diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/PatchSqlFirewallAllowedSqlResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/PatchSqlFirewallAllowedSqlResponse.java new file mode 100644 index 00000000000..5c180a875ad --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/PatchSqlFirewallAllowedSqlResponse.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class PatchSqlFirewallAllowedSqlResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private PatchSqlFirewallAllowedSqlResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(PatchSqlFirewallAllowedSqlResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public PatchSqlFirewallAllowedSqlResponse build() { + return new PatchSqlFirewallAllowedSqlResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchSqlFirewallAllowedSqlResponse)) { + return false; + } + + PatchSqlFirewallAllowedSqlResponse other = (PatchSqlFirewallAllowedSqlResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/responses/GetStatusResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/UpdateAlertPolicyResponse.java similarity index 63% rename from bmc-cims/src/main/java/com/oracle/bmc/cims/responses/GetStatusResponse.java rename to bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/UpdateAlertPolicyResponse.java index 4cdb5a3c468..26958215365 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/responses/GetStatusResponse.java +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/UpdateAlertPolicyResponse.java @@ -2,19 +2,21 @@ * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ -package com.oracle.bmc.cims.responses; +package com.oracle.bmc.datasafe.responses; -import com.oracle.bmc.cims.model.*; +import com.oracle.bmc.datasafe.model.*; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181231") -public class GetStatusResponse extends com.oracle.bmc.responses.BmcResponse { +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class UpdateAlertPolicyResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * * @return the value */ public String getOpcRequestId() { @@ -22,27 +24,34 @@ public String getOpcRequestId() { } /** - * The returned Status instance. + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * */ - private com.oracle.bmc.cims.model.Status status; + private String opcWorkRequestId; /** - * The returned Status instance. + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * * @return the value */ - public com.oracle.bmc.cims.model.Status getStatus() { - return status; + public String getOpcWorkRequestId() { + return opcWorkRequestId; } - @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId", "status"}) - private GetStatusResponse( + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private UpdateAlertPolicyResponse( int __httpStatusCode__, javax.ws.rs.core.MultivaluedMap headers, String opcRequestId, - com.oracle.bmc.cims.model.Status status) { + String opcWorkRequestId) { super(__httpStatusCode__, headers); this.opcRequestId = opcRequestId; - this.status = status; + this.opcWorkRequestId = opcWorkRequestId; } public static class Builder { @@ -62,11 +71,13 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * * @param opcRequestId the value to set * @return this builder */ @@ -76,17 +87,19 @@ public Builder opcRequestId(String opcRequestId) { } /** - * The returned Status instance. + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * */ - private com.oracle.bmc.cims.model.Status status; + private String opcWorkRequestId; /** - * The returned Status instance. - * @param status the value to set + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set * @return this builder */ - public Builder status(com.oracle.bmc.cims.model.Status status) { - this.status = status; + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; return this; } @@ -94,11 +107,11 @@ public Builder status(com.oracle.bmc.cims.model.Status status) { * Copy method to populate the builder with values from the given instance. * @return this builder instance */ - public Builder copy(GetStatusResponse o) { + public Builder copy(UpdateAlertPolicyResponse o) { __httpStatusCode__(o.get__httpStatusCode__()); headers(o.getHeaders()); opcRequestId(o.getOpcRequestId()); - status(o.getStatus()); + opcWorkRequestId(o.getOpcWorkRequestId()); return this; } @@ -107,8 +120,9 @@ public Builder copy(GetStatusResponse o) { * Build the response object. * @return the response object */ - public GetStatusResponse build() { - return new GetStatusResponse(__httpStatusCode__, headers, opcRequestId, status); + public UpdateAlertPolicyResponse build() { + return new UpdateAlertPolicyResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); } } @@ -126,7 +140,7 @@ public String toString() { sb.append("("); sb.append("super=").append(super.toString()); sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); - sb.append(",status=").append(String.valueOf(status)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); sb.append(")"); return sb.toString(); } @@ -136,14 +150,14 @@ public boolean equals(Object o) { if (this == o) { return true; } - if (!(o instanceof GetStatusResponse)) { + if (!(o instanceof UpdateAlertPolicyResponse)) { return false; } - GetStatusResponse other = (GetStatusResponse) o; + UpdateAlertPolicyResponse other = (UpdateAlertPolicyResponse) o; return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) - && java.util.Objects.equals(this.status, other.status); + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); } @Override @@ -151,7 +165,9 @@ public int hashCode() { final int PRIME = 59; int result = super.hashCode(); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); - result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); return result; } } diff --git a/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/UpdateAlertPolicyRuleResponse.java b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/UpdateAlertPolicyRuleResponse.java new file mode 100644 index 00000000000..51a64526e22 --- /dev/null +++ b/bmc-datasafe/src/main/java/com/oracle/bmc/datasafe/responses/UpdateAlertPolicyRuleResponse.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datasafe.responses; + +import com.oracle.bmc.datasafe.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181201") +public class UpdateAlertPolicyRuleResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private UpdateAlertPolicyRuleResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateAlertPolicyRuleResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateAlertPolicyRuleResponse build() { + return new UpdateAlertPolicyRuleResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateAlertPolicyRuleResponse)) { + return false; + } + + UpdateAlertPolicyRuleResponse other = (UpdateAlertPolicyRuleResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-datascience/pom.xml b/bmc-datascience/pom.xml index a5b71ebeec2..5a1b3eb9b2f 100644 --- a/bmc-datascience/pom.xml +++ b/bmc-datascience/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-datascience @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScience.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScience.java index d518906675b..2532d536299 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScience.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScience.java @@ -1125,6 +1125,19 @@ ListNotebookSessionShapesResponse listNotebookSessionShapes( */ ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request); + /** + * Restore archived model artifact + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RestoreArchivedModelArtifact API. + */ + RestoreArchivedModelArtifactResponse restoreArchivedModelArtifact( + RestoreArchivedModelArtifactRequest request); + /** * Updates a private endpoint using a `privateEndpointId`. If changes to a private endpoint match * a previously defined private endpoint, then a 409 status code is returned. This indicates diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceAsync.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceAsync.java index ae84b28beb4..997b84bfa93 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceAsync.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceAsync.java @@ -1322,6 +1322,23 @@ java.util.concurrent.Future listWorkRequests( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Restore archived model artifact + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future restoreArchivedModelArtifact( + RestoreArchivedModelArtifactRequest request, + com.oracle.bmc.responses.AsyncHandler< + RestoreArchivedModelArtifactRequest, + RestoreArchivedModelArtifactResponse> + handler); + /** * Updates a private endpoint using a `privateEndpointId`. If changes to a private endpoint match * a previously defined private endpoint, then a 409 status code is returned. This indicates diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceAsyncClient.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceAsyncClient.java index ca31cbfe399..bad33ae5d17 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceAsyncClient.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceAsyncClient.java @@ -4391,6 +4391,58 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + restoreArchivedModelArtifact( + RestoreArchivedModelArtifactRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RestoreArchivedModelArtifactRequest, + RestoreArchivedModelArtifactResponse> + handler) { + LOG.trace("Called async restoreArchivedModelArtifact"); + final RestoreArchivedModelArtifactRequest interceptedRequest = + RestoreArchivedModelArtifactConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RestoreArchivedModelArtifactConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataScience", + "RestoreArchivedModelArtifact", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/RestoreArchivedModelArtifact"); + final java.util.function.Function< + javax.ws.rs.core.Response, RestoreArchivedModelArtifactResponse> + transformer = + RestoreArchivedModelArtifactConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + RestoreArchivedModelArtifactRequest, RestoreArchivedModelArtifactResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RestoreArchivedModelArtifactRequest, + RestoreArchivedModelArtifactResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RestoreArchivedModelArtifactRequest, RestoreArchivedModelArtifactResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateDataSciencePrivateEndpoint( diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceClient.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceClient.java index 46ae440b6ee..684310b17ca 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceClient.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/DataScienceClient.java @@ -3755,6 +3755,46 @@ public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request }); } + @Override + public RestoreArchivedModelArtifactResponse restoreArchivedModelArtifact( + RestoreArchivedModelArtifactRequest request) { + LOG.trace("Called restoreArchivedModelArtifact"); + final RestoreArchivedModelArtifactRequest interceptedRequest = + RestoreArchivedModelArtifactConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RestoreArchivedModelArtifactConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DataScience", + "RestoreArchivedModelArtifact", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/RestoreArchivedModelArtifact"); + java.util.function.Function + transformer = + RestoreArchivedModelArtifactConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateDataSciencePrivateEndpointResponse updateDataSciencePrivateEndpoint( UpdateDataSciencePrivateEndpointRequest request) { diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/RestoreArchivedModelArtifactConverter.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/RestoreArchivedModelArtifactConverter.java new file mode 100644 index 00000000000..c6e72068480 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/internal/http/RestoreArchivedModelArtifactConverter.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.datascience.model.*; +import com.oracle.bmc.datascience.requests.*; +import com.oracle.bmc.datascience.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class RestoreArchivedModelArtifactConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RestoreArchivedModelArtifactConverter.class); + + public static com.oracle.bmc.datascience.requests.RestoreArchivedModelArtifactRequest + interceptRequest( + com.oracle.bmc.datascience.requests.RestoreArchivedModelArtifactRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.datascience.requests.RestoreArchivedModelArtifactRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getModelId(), "modelId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190101") + .path("models") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getModelId())) + .path("actions") + .path("restore"); + + if (request.getRestoreModelForHoursSpecified() != null) { + target = + target.queryParam( + "restoreModelForHoursSpecified", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getRestoreModelForHoursSpecified())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses.RestoreArchivedModelArtifactResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses.RestoreArchivedModelArtifactResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses.RestoreArchivedModelArtifactResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.datascience.responses + .RestoreArchivedModelArtifactResponse>() { + @Override + public com.oracle.bmc.datascience.responses + .RestoreArchivedModelArtifactResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.datascience.responses.RestoreArchivedModelArtifactResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.datascience.responses + .RestoreArchivedModelArtifactResponse.Builder + builder = + com.oracle.bmc.datascience.responses + .RestoreArchivedModelArtifactResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.datascience.responses + .RestoreArchivedModelArtifactResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/BackupOperationDetails.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/BackupOperationDetails.java new file mode 100644 index 00000000000..5964c0e4ddf --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/BackupOperationDetails.java @@ -0,0 +1,221 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.model; + +/** + * Backup operation details of the model. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = BackupOperationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class BackupOperationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"timeLastBackup", "backupState", "backupStateDetails"}) + public BackupOperationDetails( + java.util.Date timeLastBackup, + ModelSettingActionState backupState, + String backupStateDetails) { + super(); + this.timeLastBackup = timeLastBackup; + this.backupState = backupState; + this.backupStateDetails = backupStateDetails; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The last backup execution time of the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLastBackup") + private java.util.Date timeLastBackup; + + /** + * The last backup execution time of the model. + * @param timeLastBackup the value to set + * @return this builder + **/ + public Builder timeLastBackup(java.util.Date timeLastBackup) { + this.timeLastBackup = timeLastBackup; + this.__explicitlySet__.add("timeLastBackup"); + return this; + } + /** + * The backup status of the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupState") + private ModelSettingActionState backupState; + + /** + * The backup status of the model. + * @param backupState the value to set + * @return this builder + **/ + public Builder backupState(ModelSettingActionState backupState) { + this.backupState = backupState; + this.__explicitlySet__.add("backupState"); + return this; + } + /** + * The backup execution status details of the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupStateDetails") + private String backupStateDetails; + + /** + * The backup execution status details of the model. + * @param backupStateDetails the value to set + * @return this builder + **/ + public Builder backupStateDetails(String backupStateDetails) { + this.backupStateDetails = backupStateDetails; + this.__explicitlySet__.add("backupStateDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BackupOperationDetails build() { + BackupOperationDetails model = + new BackupOperationDetails( + this.timeLastBackup, this.backupState, this.backupStateDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BackupOperationDetails model) { + if (model.wasPropertyExplicitlySet("timeLastBackup")) { + this.timeLastBackup(model.getTimeLastBackup()); + } + if (model.wasPropertyExplicitlySet("backupState")) { + this.backupState(model.getBackupState()); + } + if (model.wasPropertyExplicitlySet("backupStateDetails")) { + this.backupStateDetails(model.getBackupStateDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The last backup execution time of the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLastBackup") + private final java.util.Date timeLastBackup; + + /** + * The last backup execution time of the model. + * @return the value + **/ + public java.util.Date getTimeLastBackup() { + return timeLastBackup; + } + + /** + * The backup status of the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupState") + private final ModelSettingActionState backupState; + + /** + * The backup status of the model. + * @return the value + **/ + public ModelSettingActionState getBackupState() { + return backupState; + } + + /** + * The backup execution status details of the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupStateDetails") + private final String backupStateDetails; + + /** + * The backup execution status details of the model. + * @return the value + **/ + public String getBackupStateDetails() { + return backupStateDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BackupOperationDetails("); + sb.append("super=").append(super.toString()); + sb.append("timeLastBackup=").append(String.valueOf(this.timeLastBackup)); + sb.append(", backupState=").append(String.valueOf(this.backupState)); + sb.append(", backupStateDetails=").append(String.valueOf(this.backupStateDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BackupOperationDetails)) { + return false; + } + + BackupOperationDetails other = (BackupOperationDetails) o; + return java.util.Objects.equals(this.timeLastBackup, other.timeLastBackup) + && java.util.Objects.equals(this.backupState, other.backupState) + && java.util.Objects.equals(this.backupStateDetails, other.backupStateDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.timeLastBackup == null ? 43 : this.timeLastBackup.hashCode()); + result = (result * PRIME) + (this.backupState == null ? 43 : this.backupState.hashCode()); + result = + (result * PRIME) + + (this.backupStateDetails == null + ? 43 + : this.backupStateDetails.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/BackupSetting.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/BackupSetting.java new file mode 100644 index 00000000000..b985e1de925 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/BackupSetting.java @@ -0,0 +1,225 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.model; + +/** + * Back up setting details of the model. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = BackupSetting.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class BackupSetting extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "isBackupEnabled", + "backupRegion", + "customerNotificationType" + }) + public BackupSetting( + Boolean isBackupEnabled, + String backupRegion, + ModelSettingCustomerNotificationType customerNotificationType) { + super(); + this.isBackupEnabled = isBackupEnabled; + this.backupRegion = backupRegion; + this.customerNotificationType = customerNotificationType; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Boolean flag representing whether backup needs to be enabled/disabled for the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isBackupEnabled") + private Boolean isBackupEnabled; + + /** + * Boolean flag representing whether backup needs to be enabled/disabled for the model. + * @param isBackupEnabled the value to set + * @return this builder + **/ + public Builder isBackupEnabled(Boolean isBackupEnabled) { + this.isBackupEnabled = isBackupEnabled; + this.__explicitlySet__.add("isBackupEnabled"); + return this; + } + /** + * OCI backup region for the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupRegion") + private String backupRegion; + + /** + * OCI backup region for the model. + * @param backupRegion the value to set + * @return this builder + **/ + public Builder backupRegion(String backupRegion) { + this.backupRegion = backupRegion; + this.__explicitlySet__.add("backupRegion"); + return this; + } + /** + * Customer notification on backup success/failure events. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerNotificationType") + private ModelSettingCustomerNotificationType customerNotificationType; + + /** + * Customer notification on backup success/failure events. + * @param customerNotificationType the value to set + * @return this builder + **/ + public Builder customerNotificationType( + ModelSettingCustomerNotificationType customerNotificationType) { + this.customerNotificationType = customerNotificationType; + this.__explicitlySet__.add("customerNotificationType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BackupSetting build() { + BackupSetting model = + new BackupSetting( + this.isBackupEnabled, this.backupRegion, this.customerNotificationType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BackupSetting model) { + if (model.wasPropertyExplicitlySet("isBackupEnabled")) { + this.isBackupEnabled(model.getIsBackupEnabled()); + } + if (model.wasPropertyExplicitlySet("backupRegion")) { + this.backupRegion(model.getBackupRegion()); + } + if (model.wasPropertyExplicitlySet("customerNotificationType")) { + this.customerNotificationType(model.getCustomerNotificationType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Boolean flag representing whether backup needs to be enabled/disabled for the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isBackupEnabled") + private final Boolean isBackupEnabled; + + /** + * Boolean flag representing whether backup needs to be enabled/disabled for the model. + * @return the value + **/ + public Boolean getIsBackupEnabled() { + return isBackupEnabled; + } + + /** + * OCI backup region for the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backupRegion") + private final String backupRegion; + + /** + * OCI backup region for the model. + * @return the value + **/ + public String getBackupRegion() { + return backupRegion; + } + + /** + * Customer notification on backup success/failure events. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerNotificationType") + private final ModelSettingCustomerNotificationType customerNotificationType; + + /** + * Customer notification on backup success/failure events. + * @return the value + **/ + public ModelSettingCustomerNotificationType getCustomerNotificationType() { + return customerNotificationType; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BackupSetting("); + sb.append("super=").append(super.toString()); + sb.append("isBackupEnabled=").append(String.valueOf(this.isBackupEnabled)); + sb.append(", backupRegion=").append(String.valueOf(this.backupRegion)); + sb.append(", customerNotificationType=") + .append(String.valueOf(this.customerNotificationType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BackupSetting)) { + return false; + } + + BackupSetting other = (BackupSetting) o; + return java.util.Objects.equals(this.isBackupEnabled, other.isBackupEnabled) + && java.util.Objects.equals(this.backupRegion, other.backupRegion) + && java.util.Objects.equals( + this.customerNotificationType, other.customerNotificationType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.isBackupEnabled == null ? 43 : this.isBackupEnabled.hashCode()); + result = (result * PRIME) + (this.backupRegion == null ? 43 : this.backupRegion.hashCode()); + result = + (result * PRIME) + + (this.customerNotificationType == null + ? 43 + : this.customerNotificationType.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/CreateModelDetails.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/CreateModelDetails.java index 79dd413db6d..276fb078b8d 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/CreateModelDetails.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/CreateModelDetails.java @@ -33,7 +33,9 @@ public final class CreateModelDetails extends com.oracle.bmc.http.internal.Expli "inputSchema", "outputSchema", "modelVersionSetId", - "versionLabel" + "versionLabel", + "retentionSetting", + "backupSetting" }) public CreateModelDetails( String compartmentId, @@ -47,7 +49,9 @@ public CreateModelDetails( String inputSchema, String outputSchema, String modelVersionSetId, - String versionLabel) { + String versionLabel, + RetentionSetting retentionSetting, + BackupSetting backupSetting) { super(); this.compartmentId = compartmentId; this.projectId = projectId; @@ -61,6 +65,8 @@ public CreateModelDetails( this.outputSchema = outputSchema; this.modelVersionSetId = modelVersionSetId; this.versionLabel = versionLabel; + this.retentionSetting = retentionSetting; + this.backupSetting = backupSetting; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -271,6 +277,24 @@ public Builder versionLabel(String versionLabel) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("retentionSetting") + private RetentionSetting retentionSetting; + + public Builder retentionSetting(RetentionSetting retentionSetting) { + this.retentionSetting = retentionSetting; + this.__explicitlySet__.add("retentionSetting"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("backupSetting") + private BackupSetting backupSetting; + + public Builder backupSetting(BackupSetting backupSetting) { + this.backupSetting = backupSetting; + this.__explicitlySet__.add("backupSetting"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -288,7 +312,9 @@ public CreateModelDetails build() { this.inputSchema, this.outputSchema, this.modelVersionSetId, - this.versionLabel); + this.versionLabel, + this.retentionSetting, + this.backupSetting); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -333,6 +359,12 @@ public Builder copy(CreateModelDetails model) { if (model.wasPropertyExplicitlySet("versionLabel")) { this.versionLabel(model.getVersionLabel()); } + if (model.wasPropertyExplicitlySet("retentionSetting")) { + this.retentionSetting(model.getRetentionSetting()); + } + if (model.wasPropertyExplicitlySet("backupSetting")) { + this.backupSetting(model.getBackupSetting()); + } return this; } } @@ -528,6 +560,20 @@ public String getVersionLabel() { return versionLabel; } + @com.fasterxml.jackson.annotation.JsonProperty("retentionSetting") + private final RetentionSetting retentionSetting; + + public RetentionSetting getRetentionSetting() { + return retentionSetting; + } + + @com.fasterxml.jackson.annotation.JsonProperty("backupSetting") + private final BackupSetting backupSetting; + + public BackupSetting getBackupSetting() { + return backupSetting; + } + @Override public String toString() { return this.toString(true); @@ -554,6 +600,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", outputSchema=").append(String.valueOf(this.outputSchema)); sb.append(", modelVersionSetId=").append(String.valueOf(this.modelVersionSetId)); sb.append(", versionLabel=").append(String.valueOf(this.versionLabel)); + sb.append(", retentionSetting=").append(String.valueOf(this.retentionSetting)); + sb.append(", backupSetting=").append(String.valueOf(this.backupSetting)); sb.append(")"); return sb.toString(); } @@ -580,6 +628,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.outputSchema, other.outputSchema) && java.util.Objects.equals(this.modelVersionSetId, other.modelVersionSetId) && java.util.Objects.equals(this.versionLabel, other.versionLabel) + && java.util.Objects.equals(this.retentionSetting, other.retentionSetting) + && java.util.Objects.equals(this.backupSetting, other.backupSetting) && super.equals(other); } @@ -611,6 +661,12 @@ public int hashCode() { (result * PRIME) + (this.modelVersionSetId == null ? 43 : this.modelVersionSetId.hashCode()); result = (result * PRIME) + (this.versionLabel == null ? 43 : this.versionLabel.hashCode()); + result = + (result * PRIME) + + (this.retentionSetting == null ? 43 : this.retentionSetting.hashCode()); + result = + (result * PRIME) + + (this.backupSetting == null ? 43 : this.backupSetting.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/Model.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/Model.java index 3038bb45031..b0b8fc871bc 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/Model.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/Model.java @@ -26,6 +26,7 @@ public final class Model extends com.oracle.bmc.http.internal.ExplicitlySetBmcMo "displayName", "description", "lifecycleState", + "lifecycleDetails", "timeCreated", "createdBy", "freeformTags", @@ -37,7 +38,11 @@ public final class Model extends com.oracle.bmc.http.internal.ExplicitlySetBmcMo "modelVersionSetId", "modelVersionSetName", "versionId", - "versionLabel" + "versionLabel", + "retentionSetting", + "backupSetting", + "retentionOperationDetails", + "backupOperationDetails" }) public Model( String id, @@ -46,6 +51,7 @@ public Model( String displayName, String description, ModelLifecycleState lifecycleState, + String lifecycleDetails, java.util.Date timeCreated, String createdBy, java.util.Map freeformTags, @@ -57,7 +63,11 @@ public Model( String modelVersionSetId, String modelVersionSetName, Long versionId, - String versionLabel) { + String versionLabel, + RetentionSetting retentionSetting, + BackupSetting backupSetting, + RetentionOperationDetails retentionOperationDetails, + BackupOperationDetails backupOperationDetails) { super(); this.id = id; this.compartmentId = compartmentId; @@ -65,6 +75,7 @@ public Model( this.displayName = displayName; this.description = description; this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; this.timeCreated = timeCreated; this.createdBy = createdBy; this.freeformTags = freeformTags; @@ -77,6 +88,10 @@ public Model( this.modelVersionSetName = modelVersionSetName; this.versionId = versionId; this.versionLabel = versionLabel; + this.retentionSetting = retentionSetting; + this.backupSetting = backupSetting; + this.retentionOperationDetails = retentionOperationDetails; + this.backupOperationDetails = backupOperationDetails; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -177,6 +192,22 @@ public Builder lifecycleState(ModelLifecycleState lifecycleState) { this.__explicitlySet__.add("lifecycleState"); return this; } + /** + * Details about the lifecycle state of the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Details about the lifecycle state of the model. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } /** * The date and time the resource was created in the timestamp format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). * Example: 2019-08-25T21:10:29.41Z @@ -383,6 +414,43 @@ public Builder versionLabel(String versionLabel) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("retentionSetting") + private RetentionSetting retentionSetting; + + public Builder retentionSetting(RetentionSetting retentionSetting) { + this.retentionSetting = retentionSetting; + this.__explicitlySet__.add("retentionSetting"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("backupSetting") + private BackupSetting backupSetting; + + public Builder backupSetting(BackupSetting backupSetting) { + this.backupSetting = backupSetting; + this.__explicitlySet__.add("backupSetting"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("retentionOperationDetails") + private RetentionOperationDetails retentionOperationDetails; + + public Builder retentionOperationDetails( + RetentionOperationDetails retentionOperationDetails) { + this.retentionOperationDetails = retentionOperationDetails; + this.__explicitlySet__.add("retentionOperationDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("backupOperationDetails") + private BackupOperationDetails backupOperationDetails; + + public Builder backupOperationDetails(BackupOperationDetails backupOperationDetails) { + this.backupOperationDetails = backupOperationDetails; + this.__explicitlySet__.add("backupOperationDetails"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -395,6 +463,7 @@ public Model build() { this.displayName, this.description, this.lifecycleState, + this.lifecycleDetails, this.timeCreated, this.createdBy, this.freeformTags, @@ -406,7 +475,11 @@ public Model build() { this.modelVersionSetId, this.modelVersionSetName, this.versionId, - this.versionLabel); + this.versionLabel, + this.retentionSetting, + this.backupSetting, + this.retentionOperationDetails, + this.backupOperationDetails); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -433,6 +506,9 @@ public Builder copy(Model model) { if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -469,6 +545,18 @@ public Builder copy(Model model) { if (model.wasPropertyExplicitlySet("versionLabel")) { this.versionLabel(model.getVersionLabel()); } + if (model.wasPropertyExplicitlySet("retentionSetting")) { + this.retentionSetting(model.getRetentionSetting()); + } + if (model.wasPropertyExplicitlySet("backupSetting")) { + this.backupSetting(model.getBackupSetting()); + } + if (model.wasPropertyExplicitlySet("retentionOperationDetails")) { + this.retentionOperationDetails(model.getRetentionOperationDetails()); + } + if (model.wasPropertyExplicitlySet("backupOperationDetails")) { + this.backupOperationDetails(model.getBackupOperationDetails()); + } return this; } } @@ -568,6 +656,20 @@ public ModelLifecycleState getLifecycleState() { return lifecycleState; } + /** + * Details about the lifecycle state of the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Details about the lifecycle state of the model. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + /** * The date and time the resource was created in the timestamp format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). * Example: 2019-08-25T21:10:29.41Z @@ -748,6 +850,34 @@ public String getVersionLabel() { return versionLabel; } + @com.fasterxml.jackson.annotation.JsonProperty("retentionSetting") + private final RetentionSetting retentionSetting; + + public RetentionSetting getRetentionSetting() { + return retentionSetting; + } + + @com.fasterxml.jackson.annotation.JsonProperty("backupSetting") + private final BackupSetting backupSetting; + + public BackupSetting getBackupSetting() { + return backupSetting; + } + + @com.fasterxml.jackson.annotation.JsonProperty("retentionOperationDetails") + private final RetentionOperationDetails retentionOperationDetails; + + public RetentionOperationDetails getRetentionOperationDetails() { + return retentionOperationDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("backupOperationDetails") + private final BackupOperationDetails backupOperationDetails; + + public BackupOperationDetails getBackupOperationDetails() { + return backupOperationDetails; + } + @Override public String toString() { return this.toString(true); @@ -768,6 +898,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", createdBy=").append(String.valueOf(this.createdBy)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); @@ -780,6 +911,11 @@ public String toString(boolean includeByteArrayContents) { sb.append(", modelVersionSetName=").append(String.valueOf(this.modelVersionSetName)); sb.append(", versionId=").append(String.valueOf(this.versionId)); sb.append(", versionLabel=").append(String.valueOf(this.versionLabel)); + sb.append(", retentionSetting=").append(String.valueOf(this.retentionSetting)); + sb.append(", backupSetting=").append(String.valueOf(this.backupSetting)); + sb.append(", retentionOperationDetails=") + .append(String.valueOf(this.retentionOperationDetails)); + sb.append(", backupOperationDetails=").append(String.valueOf(this.backupOperationDetails)); sb.append(")"); return sb.toString(); } @@ -800,6 +936,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.createdBy, other.createdBy) && java.util.Objects.equals(this.freeformTags, other.freeformTags) @@ -812,6 +949,12 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.modelVersionSetName, other.modelVersionSetName) && java.util.Objects.equals(this.versionId, other.versionId) && java.util.Objects.equals(this.versionLabel, other.versionLabel) + && java.util.Objects.equals(this.retentionSetting, other.retentionSetting) + && java.util.Objects.equals(this.backupSetting, other.backupSetting) + && java.util.Objects.equals( + this.retentionOperationDetails, other.retentionOperationDetails) + && java.util.Objects.equals( + this.backupOperationDetails, other.backupOperationDetails) && super.equals(other); } @@ -829,6 +972,9 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.createdBy == null ? 43 : this.createdBy.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); @@ -855,6 +1001,22 @@ public int hashCode() { : this.modelVersionSetName.hashCode()); result = (result * PRIME) + (this.versionId == null ? 43 : this.versionId.hashCode()); result = (result * PRIME) + (this.versionLabel == null ? 43 : this.versionLabel.hashCode()); + result = + (result * PRIME) + + (this.retentionSetting == null ? 43 : this.retentionSetting.hashCode()); + result = + (result * PRIME) + + (this.backupSetting == null ? 43 : this.backupSetting.hashCode()); + result = + (result * PRIME) + + (this.retentionOperationDetails == null + ? 43 + : this.retentionOperationDetails.hashCode()); + result = + (result * PRIME) + + (this.backupOperationDetails == null + ? 43 + : this.backupOperationDetails.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelSettingActionState.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelSettingActionState.java new file mode 100644 index 00000000000..31789aaccfb --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelSettingActionState.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.model; + +/** + * Represents the state of the model for backup, archival and deletion. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public enum ModelSettingActionState { + Pending("PENDING"), + Failed("FAILED"), + Succeeded("SUCCEEDED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ModelSettingActionState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ModelSettingActionState v : ModelSettingActionState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ModelSettingActionState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ModelSettingActionState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ModelSettingActionState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelSettingCustomerNotificationType.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelSettingCustomerNotificationType.java new file mode 100644 index 00000000000..2f9fe587b14 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelSettingCustomerNotificationType.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.model; + +/** + * Customer notification type based on setting action events for backup, archival and deletion. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public enum ModelSettingCustomerNotificationType { + None("NONE"), + All("ALL"), + OnFailure("ON_FAILURE"), + OnSuccess("ON_SUCCESS"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ModelSettingCustomerNotificationType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ModelSettingCustomerNotificationType v : + ModelSettingCustomerNotificationType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ModelSettingCustomerNotificationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ModelSettingCustomerNotificationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ModelSettingCustomerNotificationType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelSummary.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelSummary.java index e78dc24da69..c50e216e187 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelSummary.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/ModelSummary.java @@ -27,6 +27,7 @@ public final class ModelSummary extends com.oracle.bmc.http.internal.ExplicitlyS "createdBy", "timeCreated", "lifecycleState", + "lifecycleDetails", "modelVersionSetId", "modelVersionSetName", "versionId", @@ -42,6 +43,7 @@ public ModelSummary( String createdBy, java.util.Date timeCreated, ModelLifecycleState lifecycleState, + String lifecycleDetails, String modelVersionSetId, String modelVersionSetName, Long versionId, @@ -56,6 +58,7 @@ public ModelSummary( this.createdBy = createdBy; this.timeCreated = timeCreated; this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; this.modelVersionSetId = modelVersionSetId; this.modelVersionSetName = modelVersionSetName; this.versionId = versionId; @@ -182,6 +185,22 @@ public Builder lifecycleState(ModelLifecycleState lifecycleState) { this.__explicitlySet__.add("lifecycleState"); return this; } + /** + * Details about the lifecycle state of the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Details about the lifecycle state of the model. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } /** * The OCID of the model version set that the model is associated to. **/ @@ -301,6 +320,7 @@ public ModelSummary build() { this.createdBy, this.timeCreated, this.lifecycleState, + this.lifecycleDetails, this.modelVersionSetId, this.modelVersionSetName, this.versionId, @@ -336,6 +356,9 @@ public Builder copy(ModelSummary model) { if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } if (model.wasPropertyExplicitlySet("modelVersionSetId")) { this.modelVersionSetId(model.getModelVersionSetId()); } @@ -471,6 +494,20 @@ public ModelLifecycleState getLifecycleState() { return lifecycleState; } + /** + * Details about the lifecycle state of the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Details about the lifecycle state of the model. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + /** * The OCID of the model version set that the model is associated to. **/ @@ -584,6 +621,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", createdBy=").append(String.valueOf(this.createdBy)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", modelVersionSetId=").append(String.valueOf(this.modelVersionSetId)); sb.append(", modelVersionSetName=").append(String.valueOf(this.modelVersionSetName)); sb.append(", versionId=").append(String.valueOf(this.versionId)); @@ -611,6 +649,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.createdBy, other.createdBy) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.modelVersionSetId, other.modelVersionSetId) && java.util.Objects.equals(this.modelVersionSetName, other.modelVersionSetName) && java.util.Objects.equals(this.versionId, other.versionId) @@ -635,6 +674,9 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); result = (result * PRIME) + (this.modelVersionSetId == null ? 43 : this.modelVersionSetId.hashCode()); diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/RetentionOperationDetails.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/RetentionOperationDetails.java new file mode 100644 index 00000000000..c8ccfe6fb64 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/RetentionOperationDetails.java @@ -0,0 +1,357 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.model; + +/** + * Retention operation details for the model. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RetentionOperationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RetentionOperationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "archiveState", + "archiveStateDetails", + "timeArchivalScheduled", + "deleteState", + "deleteStateDetails", + "timeDeletionScheduled" + }) + public RetentionOperationDetails( + ModelSettingActionState archiveState, + String archiveStateDetails, + java.util.Date timeArchivalScheduled, + ModelSettingActionState deleteState, + String deleteStateDetails, + java.util.Date timeDeletionScheduled) { + super(); + this.archiveState = archiveState; + this.archiveStateDetails = archiveStateDetails; + this.timeArchivalScheduled = timeArchivalScheduled; + this.deleteState = deleteState; + this.deleteStateDetails = deleteStateDetails; + this.timeDeletionScheduled = timeDeletionScheduled; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The archival status of model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("archiveState") + private ModelSettingActionState archiveState; + + /** + * The archival status of model. + * @param archiveState the value to set + * @return this builder + **/ + public Builder archiveState(ModelSettingActionState archiveState) { + this.archiveState = archiveState; + this.__explicitlySet__.add("archiveState"); + return this; + } + /** + * The archival state details of the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("archiveStateDetails") + private String archiveStateDetails; + + /** + * The archival state details of the model. + * @param archiveStateDetails the value to set + * @return this builder + **/ + public Builder archiveStateDetails(String archiveStateDetails) { + this.archiveStateDetails = archiveStateDetails; + this.__explicitlySet__.add("archiveStateDetails"); + return this; + } + /** + * The estimated archival time of the model based on the provided retention setting. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeArchivalScheduled") + private java.util.Date timeArchivalScheduled; + + /** + * The estimated archival time of the model based on the provided retention setting. + * @param timeArchivalScheduled the value to set + * @return this builder + **/ + public Builder timeArchivalScheduled(java.util.Date timeArchivalScheduled) { + this.timeArchivalScheduled = timeArchivalScheduled; + this.__explicitlySet__.add("timeArchivalScheduled"); + return this; + } + /** + * The deletion status of the archived model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deleteState") + private ModelSettingActionState deleteState; + + /** + * The deletion status of the archived model. + * @param deleteState the value to set + * @return this builder + **/ + public Builder deleteState(ModelSettingActionState deleteState) { + this.deleteState = deleteState; + this.__explicitlySet__.add("deleteState"); + return this; + } + /** + * The deletion status details of the archived model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deleteStateDetails") + private String deleteStateDetails; + + /** + * The deletion status details of the archived model. + * @param deleteStateDetails the value to set + * @return this builder + **/ + public Builder deleteStateDetails(String deleteStateDetails) { + this.deleteStateDetails = deleteStateDetails; + this.__explicitlySet__.add("deleteStateDetails"); + return this; + } + /** + * The estimated deletion time of the model based on the provided retention setting. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeDeletionScheduled") + private java.util.Date timeDeletionScheduled; + + /** + * The estimated deletion time of the model based on the provided retention setting. + * @param timeDeletionScheduled the value to set + * @return this builder + **/ + public Builder timeDeletionScheduled(java.util.Date timeDeletionScheduled) { + this.timeDeletionScheduled = timeDeletionScheduled; + this.__explicitlySet__.add("timeDeletionScheduled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RetentionOperationDetails build() { + RetentionOperationDetails model = + new RetentionOperationDetails( + this.archiveState, + this.archiveStateDetails, + this.timeArchivalScheduled, + this.deleteState, + this.deleteStateDetails, + this.timeDeletionScheduled); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RetentionOperationDetails model) { + if (model.wasPropertyExplicitlySet("archiveState")) { + this.archiveState(model.getArchiveState()); + } + if (model.wasPropertyExplicitlySet("archiveStateDetails")) { + this.archiveStateDetails(model.getArchiveStateDetails()); + } + if (model.wasPropertyExplicitlySet("timeArchivalScheduled")) { + this.timeArchivalScheduled(model.getTimeArchivalScheduled()); + } + if (model.wasPropertyExplicitlySet("deleteState")) { + this.deleteState(model.getDeleteState()); + } + if (model.wasPropertyExplicitlySet("deleteStateDetails")) { + this.deleteStateDetails(model.getDeleteStateDetails()); + } + if (model.wasPropertyExplicitlySet("timeDeletionScheduled")) { + this.timeDeletionScheduled(model.getTimeDeletionScheduled()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The archival status of model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("archiveState") + private final ModelSettingActionState archiveState; + + /** + * The archival status of model. + * @return the value + **/ + public ModelSettingActionState getArchiveState() { + return archiveState; + } + + /** + * The archival state details of the model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("archiveStateDetails") + private final String archiveStateDetails; + + /** + * The archival state details of the model. + * @return the value + **/ + public String getArchiveStateDetails() { + return archiveStateDetails; + } + + /** + * The estimated archival time of the model based on the provided retention setting. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeArchivalScheduled") + private final java.util.Date timeArchivalScheduled; + + /** + * The estimated archival time of the model based on the provided retention setting. + * @return the value + **/ + public java.util.Date getTimeArchivalScheduled() { + return timeArchivalScheduled; + } + + /** + * The deletion status of the archived model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deleteState") + private final ModelSettingActionState deleteState; + + /** + * The deletion status of the archived model. + * @return the value + **/ + public ModelSettingActionState getDeleteState() { + return deleteState; + } + + /** + * The deletion status details of the archived model. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deleteStateDetails") + private final String deleteStateDetails; + + /** + * The deletion status details of the archived model. + * @return the value + **/ + public String getDeleteStateDetails() { + return deleteStateDetails; + } + + /** + * The estimated deletion time of the model based on the provided retention setting. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeDeletionScheduled") + private final java.util.Date timeDeletionScheduled; + + /** + * The estimated deletion time of the model based on the provided retention setting. + * @return the value + **/ + public java.util.Date getTimeDeletionScheduled() { + return timeDeletionScheduled; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RetentionOperationDetails("); + sb.append("super=").append(super.toString()); + sb.append("archiveState=").append(String.valueOf(this.archiveState)); + sb.append(", archiveStateDetails=").append(String.valueOf(this.archiveStateDetails)); + sb.append(", timeArchivalScheduled=").append(String.valueOf(this.timeArchivalScheduled)); + sb.append(", deleteState=").append(String.valueOf(this.deleteState)); + sb.append(", deleteStateDetails=").append(String.valueOf(this.deleteStateDetails)); + sb.append(", timeDeletionScheduled=").append(String.valueOf(this.timeDeletionScheduled)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RetentionOperationDetails)) { + return false; + } + + RetentionOperationDetails other = (RetentionOperationDetails) o; + return java.util.Objects.equals(this.archiveState, other.archiveState) + && java.util.Objects.equals(this.archiveStateDetails, other.archiveStateDetails) + && java.util.Objects.equals(this.timeArchivalScheduled, other.timeArchivalScheduled) + && java.util.Objects.equals(this.deleteState, other.deleteState) + && java.util.Objects.equals(this.deleteStateDetails, other.deleteStateDetails) + && java.util.Objects.equals(this.timeDeletionScheduled, other.timeDeletionScheduled) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.archiveState == null ? 43 : this.archiveState.hashCode()); + result = + (result * PRIME) + + (this.archiveStateDetails == null + ? 43 + : this.archiveStateDetails.hashCode()); + result = + (result * PRIME) + + (this.timeArchivalScheduled == null + ? 43 + : this.timeArchivalScheduled.hashCode()); + result = (result * PRIME) + (this.deleteState == null ? 43 : this.deleteState.hashCode()); + result = + (result * PRIME) + + (this.deleteStateDetails == null + ? 43 + : this.deleteStateDetails.hashCode()); + result = + (result * PRIME) + + (this.timeDeletionScheduled == null + ? 43 + : this.timeDeletionScheduled.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/RetentionSetting.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/RetentionSetting.java new file mode 100644 index 00000000000..76c87af5b30 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/RetentionSetting.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.model; + +/** + * Retention setting details of the model. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = RetentionSetting.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RetentionSetting extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "archiveAfterDays", + "deleteAfterDays", + "customerNotificationType" + }) + public RetentionSetting( + Integer archiveAfterDays, + Integer deleteAfterDays, + ModelSettingCustomerNotificationType customerNotificationType) { + super(); + this.archiveAfterDays = archiveAfterDays; + this.deleteAfterDays = deleteAfterDays; + this.customerNotificationType = customerNotificationType; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Number of days after which the model will be archived. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("archiveAfterDays") + private Integer archiveAfterDays; + + /** + * Number of days after which the model will be archived. + * @param archiveAfterDays the value to set + * @return this builder + **/ + public Builder archiveAfterDays(Integer archiveAfterDays) { + this.archiveAfterDays = archiveAfterDays; + this.__explicitlySet__.add("archiveAfterDays"); + return this; + } + /** + * Number of days after which the archived model will be deleted. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deleteAfterDays") + private Integer deleteAfterDays; + + /** + * Number of days after which the archived model will be deleted. + * @param deleteAfterDays the value to set + * @return this builder + **/ + public Builder deleteAfterDays(Integer deleteAfterDays) { + this.deleteAfterDays = deleteAfterDays; + this.__explicitlySet__.add("deleteAfterDays"); + return this; + } + /** + * Customer notification options on success/failure of archival, deletion events. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerNotificationType") + private ModelSettingCustomerNotificationType customerNotificationType; + + /** + * Customer notification options on success/failure of archival, deletion events. + * @param customerNotificationType the value to set + * @return this builder + **/ + public Builder customerNotificationType( + ModelSettingCustomerNotificationType customerNotificationType) { + this.customerNotificationType = customerNotificationType; + this.__explicitlySet__.add("customerNotificationType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RetentionSetting build() { + RetentionSetting model = + new RetentionSetting( + this.archiveAfterDays, + this.deleteAfterDays, + this.customerNotificationType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RetentionSetting model) { + if (model.wasPropertyExplicitlySet("archiveAfterDays")) { + this.archiveAfterDays(model.getArchiveAfterDays()); + } + if (model.wasPropertyExplicitlySet("deleteAfterDays")) { + this.deleteAfterDays(model.getDeleteAfterDays()); + } + if (model.wasPropertyExplicitlySet("customerNotificationType")) { + this.customerNotificationType(model.getCustomerNotificationType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Number of days after which the model will be archived. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("archiveAfterDays") + private final Integer archiveAfterDays; + + /** + * Number of days after which the model will be archived. + * @return the value + **/ + public Integer getArchiveAfterDays() { + return archiveAfterDays; + } + + /** + * Number of days after which the archived model will be deleted. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deleteAfterDays") + private final Integer deleteAfterDays; + + /** + * Number of days after which the archived model will be deleted. + * @return the value + **/ + public Integer getDeleteAfterDays() { + return deleteAfterDays; + } + + /** + * Customer notification options on success/failure of archival, deletion events. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerNotificationType") + private final ModelSettingCustomerNotificationType customerNotificationType; + + /** + * Customer notification options on success/failure of archival, deletion events. + * @return the value + **/ + public ModelSettingCustomerNotificationType getCustomerNotificationType() { + return customerNotificationType; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RetentionSetting("); + sb.append("super=").append(super.toString()); + sb.append("archiveAfterDays=").append(String.valueOf(this.archiveAfterDays)); + sb.append(", deleteAfterDays=").append(String.valueOf(this.deleteAfterDays)); + sb.append(", customerNotificationType=") + .append(String.valueOf(this.customerNotificationType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RetentionSetting)) { + return false; + } + + RetentionSetting other = (RetentionSetting) o; + return java.util.Objects.equals(this.archiveAfterDays, other.archiveAfterDays) + && java.util.Objects.equals(this.deleteAfterDays, other.deleteAfterDays) + && java.util.Objects.equals( + this.customerNotificationType, other.customerNotificationType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.archiveAfterDays == null ? 43 : this.archiveAfterDays.hashCode()); + result = + (result * PRIME) + + (this.deleteAfterDays == null ? 43 : this.deleteAfterDays.hashCode()); + result = + (result * PRIME) + + (this.customerNotificationType == null + ? 43 + : this.customerNotificationType.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/UpdateModelDetails.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/UpdateModelDetails.java index f20d839fa5d..8dde6d82828 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/UpdateModelDetails.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/UpdateModelDetails.java @@ -30,7 +30,9 @@ public final class UpdateModelDetails extends com.oracle.bmc.http.internal.Expli "customMetadataList", "definedMetadataList", "modelVersionSetId", - "versionLabel" + "versionLabel", + "retentionSetting", + "backupSetting" }) public UpdateModelDetails( String displayName, @@ -40,7 +42,9 @@ public UpdateModelDetails( java.util.List customMetadataList, java.util.List definedMetadataList, String modelVersionSetId, - String versionLabel) { + String versionLabel, + RetentionSetting retentionSetting, + BackupSetting backupSetting) { super(); this.displayName = displayName; this.description = description; @@ -50,6 +54,8 @@ public UpdateModelDetails( this.definedMetadataList = definedMetadataList; this.modelVersionSetId = modelVersionSetId; this.versionLabel = versionLabel; + this.retentionSetting = retentionSetting; + this.backupSetting = backupSetting; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -196,6 +202,24 @@ public Builder versionLabel(String versionLabel) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("retentionSetting") + private RetentionSetting retentionSetting; + + public Builder retentionSetting(RetentionSetting retentionSetting) { + this.retentionSetting = retentionSetting; + this.__explicitlySet__.add("retentionSetting"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("backupSetting") + private BackupSetting backupSetting; + + public Builder backupSetting(BackupSetting backupSetting) { + this.backupSetting = backupSetting; + this.__explicitlySet__.add("backupSetting"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -209,7 +233,9 @@ public UpdateModelDetails build() { this.customMetadataList, this.definedMetadataList, this.modelVersionSetId, - this.versionLabel); + this.versionLabel, + this.retentionSetting, + this.backupSetting); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -242,6 +268,12 @@ public Builder copy(UpdateModelDetails model) { if (model.wasPropertyExplicitlySet("versionLabel")) { this.versionLabel(model.getVersionLabel()); } + if (model.wasPropertyExplicitlySet("retentionSetting")) { + this.retentionSetting(model.getRetentionSetting()); + } + if (model.wasPropertyExplicitlySet("backupSetting")) { + this.backupSetting(model.getBackupSetting()); + } return this; } } @@ -381,6 +413,20 @@ public String getVersionLabel() { return versionLabel; } + @com.fasterxml.jackson.annotation.JsonProperty("retentionSetting") + private final RetentionSetting retentionSetting; + + public RetentionSetting getRetentionSetting() { + return retentionSetting; + } + + @com.fasterxml.jackson.annotation.JsonProperty("backupSetting") + private final BackupSetting backupSetting; + + public BackupSetting getBackupSetting() { + return backupSetting; + } + @Override public String toString() { return this.toString(true); @@ -403,6 +449,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", definedMetadataList=").append(String.valueOf(this.definedMetadataList)); sb.append(", modelVersionSetId=").append(String.valueOf(this.modelVersionSetId)); sb.append(", versionLabel=").append(String.valueOf(this.versionLabel)); + sb.append(", retentionSetting=").append(String.valueOf(this.retentionSetting)); + sb.append(", backupSetting=").append(String.valueOf(this.backupSetting)); sb.append(")"); return sb.toString(); } @@ -425,6 +473,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.definedMetadataList, other.definedMetadataList) && java.util.Objects.equals(this.modelVersionSetId, other.modelVersionSetId) && java.util.Objects.equals(this.versionLabel, other.versionLabel) + && java.util.Objects.equals(this.retentionSetting, other.retentionSetting) + && java.util.Objects.equals(this.backupSetting, other.backupSetting) && super.equals(other); } @@ -450,6 +500,12 @@ public int hashCode() { (result * PRIME) + (this.modelVersionSetId == null ? 43 : this.modelVersionSetId.hashCode()); result = (result * PRIME) + (this.versionLabel == null ? 43 : this.versionLabel.hashCode()); + result = + (result * PRIME) + + (this.retentionSetting == null ? 43 : this.retentionSetting.hashCode()); + result = + (result * PRIME) + + (this.backupSetting == null ? 43 : this.backupSetting.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/WorkRequestOperationType.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/WorkRequestOperationType.java index 5c1099a22c0..06cee3b1a6e 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/WorkRequestOperationType.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/model/WorkRequestOperationType.java @@ -33,6 +33,7 @@ public enum WorkRequestOperationType { PrivateEndpointDelete("PRIVATE_ENDPOINT_DELETE"), PrivateEndpointMove("PRIVATE_ENDPOINT_MOVE"), PrivateEndpointUpdate("PRIVATE_ENDPOINT_UPDATE"), + RestoreArchivedModel("RESTORE_ARCHIVED_MODEL"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/ListWorkRequestsRequest.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/ListWorkRequestsRequest.java index b16b7dd073e..1de18c16823 100644 --- a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/ListWorkRequestsRequest.java +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/ListWorkRequestsRequest.java @@ -68,6 +68,7 @@ public enum OperationType { PrivateEndpointDelete("PRIVATE_ENDPOINT_DELETE"), PrivateEndpointMove("PRIVATE_ENDPOINT_MOVE"), PrivateEndpointUpdate("PRIVATE_ENDPOINT_UPDATE"), + RestoreArchivedModel("RESTORE_ARCHIVED_MODEL"), ; private final String value; diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/RestoreArchivedModelArtifactRequest.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/RestoreArchivedModelArtifactRequest.java new file mode 100644 index 00000000000..633be4981e3 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/requests/RestoreArchivedModelArtifactRequest.java @@ -0,0 +1,328 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.requests; + +import com.oracle.bmc.datascience.model.*; +/** + * Example: Click here to see how to use RestoreArchivedModelArtifactRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class RestoreArchivedModelArtifactRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + private String modelId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + public String getModelId() { + return modelId; + } + /** + * Duration in hours for which the archived model is available for access. + */ + private Integer restoreModelForHoursSpecified; + + /** + * Duration in hours for which the archived model is available for access. + */ + public Integer getRestoreModelForHoursSpecified() { + return restoreModelForHoursSpecified; + } + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code etag} value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code etag} value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RestoreArchivedModelArtifactRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + */ + private String modelId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + * @param modelId the value to set + * @return this builder instance + */ + public Builder modelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * Duration in hours for which the archived model is available for access. + */ + private Integer restoreModelForHoursSpecified = null; + + /** + * Duration in hours for which the archived model is available for access. + * @param restoreModelForHoursSpecified the value to set + * @return this builder instance + */ + public Builder restoreModelForHoursSpecified(Integer restoreModelForHoursSpecified) { + this.restoreModelForHoursSpecified = restoreModelForHoursSpecified; + return this; + } + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code etag} value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource is updated or deleted only if the {@code etag} you + * provide matches the resource's current {@code etag} value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RestoreArchivedModelArtifactRequest o) { + modelId(o.getModelId()); + restoreModelForHoursSpecified(o.getRestoreModelForHoursSpecified()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RestoreArchivedModelArtifactRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RestoreArchivedModelArtifactRequest + */ + public RestoreArchivedModelArtifactRequest build() { + RestoreArchivedModelArtifactRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of RestoreArchivedModelArtifactRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RestoreArchivedModelArtifactRequest + */ + public RestoreArchivedModelArtifactRequest buildWithoutInvocationCallback() { + RestoreArchivedModelArtifactRequest request = new RestoreArchivedModelArtifactRequest(); + request.modelId = modelId; + request.restoreModelForHoursSpecified = restoreModelForHoursSpecified; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + return request; + // new RestoreArchivedModelArtifactRequest(modelId, restoreModelForHoursSpecified, opcRequestId, opcRetryToken, ifMatch); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .modelId(modelId) + .restoreModelForHoursSpecified(restoreModelForHoursSpecified) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",modelId=").append(String.valueOf(this.modelId)); + sb.append(",restoreModelForHoursSpecified=") + .append(String.valueOf(this.restoreModelForHoursSpecified)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RestoreArchivedModelArtifactRequest)) { + return false; + } + + RestoreArchivedModelArtifactRequest other = (RestoreArchivedModelArtifactRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.modelId, other.modelId) + && java.util.Objects.equals( + this.restoreModelForHoursSpecified, other.restoreModelForHoursSpecified) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.modelId == null ? 43 : this.modelId.hashCode()); + result = + (result * PRIME) + + (this.restoreModelForHoursSpecified == null + ? 43 + : this.restoreModelForHoursSpecified.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/RestoreArchivedModelArtifactResponse.java b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/RestoreArchivedModelArtifactResponse.java new file mode 100644 index 00000000000..eb5d2f64eb5 --- /dev/null +++ b/bmc-datascience/src/main/java/com/oracle/bmc/datascience/responses/RestoreArchivedModelArtifactResponse.java @@ -0,0 +1,131 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.datascience.responses; + +import com.oracle.bmc.datascience.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190101") +public class RestoreArchivedModelArtifactResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private RestoreArchivedModelArtifactResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle assigned identifier for the request. If you need to contact + * Oracle about a particular request, then provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RestoreArchivedModelArtifactResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RestoreArchivedModelArtifactResponse build() { + return new RestoreArchivedModelArtifactResponse( + __httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RestoreArchivedModelArtifactResponse)) { + return false; + } + + RestoreArchivedModelArtifactResponse other = (RestoreArchivedModelArtifactResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/pom.xml b/bmc-delegateaccesscontrol/pom.xml new file mode 100644 index 00000000000..1d952341729 --- /dev/null +++ b/bmc-delegateaccesscontrol/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + com.oracle.oci.sdk + oci-java-sdk + 2.79.0 + ../pom.xml + + oci-java-sdk-delegateaccesscontrol + Oracle Cloud Infrastructure SDK - Delegate Access Control + This project contains the SDK used for Oracle Cloud Infrastructure Delegate Access Control + https://docs.cloud.oracle.com/Content/API/SDKDocs/javasdk.htm + + + com.oracle.oci.sdk + oci-java-sdk-common + 2.79.0 + + + \ No newline at end of file diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/DelegateAccessControl.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/DelegateAccessControl.java new file mode 100644 index 00000000000..7ca73a3d9af --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/DelegateAccessControl.java @@ -0,0 +1,437 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol; + +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; + +/** + * Oracle Delegate Access Control allows ExaCC and ExaCS customers to delegate management of their Exadata resources operators outside their tenancies. + * With Delegate Access Control, Support Providers can deliver managed services using comprehensive and robust tooling built on the OCI platform. + * Customers maintain control over who has access to the delegated resources in their tenancy and what actions can be taken. + * Enterprises managing resources across multiple tenants can use Delegate Access Control to streamline management tasks. + * Using logging service, customers can view a near real-time audit report of all actions performed by a Service Provider operator. + * + * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public interface DelegateAccessControl extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the service. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this Region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Approves a Delegated Resource Access Request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ApproveDelegatedResourceAccessRequest API. + */ + ApproveDelegatedResourceAccessRequestResponse approveDelegatedResourceAccessRequest( + ApproveDelegatedResourceAccessRequestRequest request); + + /** + * Moves the Delegation Control resource into a different compartment. When provided, 'If-Match' is checked against 'ETag' values of the resource. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ChangeDelegationControlCompartment API. + */ + ChangeDelegationControlCompartmentResponse changeDelegationControlCompartment( + ChangeDelegationControlCompartmentRequest request); + + /** + * Moves the Delegation Subscription resource into a different compartment. When provided, 'If-Match' is checked against 'ETag' values of the resource. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ChangeDelegationSubscriptionCompartment API. + */ + ChangeDelegationSubscriptionCompartmentResponse changeDelegationSubscriptionCompartment( + ChangeDelegationSubscriptionCompartmentRequest request); + + /** + * Creates a Delegation Control. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateDelegationControl API. + */ + CreateDelegationControlResponse createDelegationControl(CreateDelegationControlRequest request); + + /** + * Creates Delegation Subscription in Delegation Control. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateDelegationSubscription API. + */ + CreateDelegationSubscriptionResponse createDelegationSubscription( + CreateDelegationSubscriptionRequest request); + + /** + * Deletes a Delegation Control. You cannot delete a Delegation Control if it is assigned to govern any target resource currently or in the future. + * In that case, first, delete all of the current and future assignments before deleting the Delegation Control. A Delegation Control that was previously assigned to a target + * resource is marked as DELETED following a successful deletion. However, it is not completely deleted from the system. This is to ensure auditing information for the accesses + * done under the Delegation Control is preserved for future needs. The system purges the deleted Delegation Control only when all of the audit data associated with the + * Delegation Control are also deleted. Therefore, you cannot reuse the name of the deleted Delegation Control until the system purges the Delegation Control. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteDelegationControl API. + */ + DeleteDelegationControlResponse deleteDelegationControl(DeleteDelegationControlRequest request); + + /** + * eletes an Delegation Subscription in Delegation Control. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteDelegationSubscription API. + */ + DeleteDelegationSubscriptionResponse deleteDelegationSubscription( + DeleteDelegationSubscriptionRequest request); + + /** + * Gets details of a Delegated Resource Access Request. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetDelegatedResourceAccessRequest API. + */ + GetDelegatedResourceAccessRequestResponse getDelegatedResourceAccessRequest( + GetDelegatedResourceAccessRequestRequest request); + + /** + * Gets the audit log report for the given Delegated Resource Access Request. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetDelegatedResourceAccessRequestAuditLogReport API. + */ + GetDelegatedResourceAccessRequestAuditLogReportResponse + getDelegatedResourceAccessRequestAuditLogReport( + GetDelegatedResourceAccessRequestAuditLogReportRequest request); + + /** + * Gets the Delegation Control associated with the specified Delegation Control ID. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetDelegationControl API. + */ + GetDelegationControlResponse getDelegationControl(GetDelegationControlRequest request); + + /** + * Gets a DelegationSubscription by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetDelegationSubscription API. + */ + GetDelegationSubscriptionResponse getDelegationSubscription( + GetDelegationSubscriptionRequest request); + + /** + * Gets a ServiceProvider by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetServiceProvider API. + */ + GetServiceProviderResponse getServiceProvider(GetServiceProviderRequest request); + + /** + * Gets the Service Provider Action associated with the specified Service Provider Action ID. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetServiceProviderAction API. + */ + GetServiceProviderActionResponse getServiceProviderAction( + GetServiceProviderActionRequest request); + + /** + * Returns a history of all status associated with the Delegated Resource Access RequestId. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListDelegatedResourceAccessRequestHistories API. + */ + ListDelegatedResourceAccessRequestHistoriesResponse listDelegatedResourceAccessRequestHistories( + ListDelegatedResourceAccessRequestHistoriesRequest request); + + /** + * Lists all Delegated Resource Access Requests in the compartment. Note that only one of lifecycleState or requestStatus query parameter can be used. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListDelegatedResourceAccessRequests API. + */ + ListDelegatedResourceAccessRequestsResponse listDelegatedResourceAccessRequests( + ListDelegatedResourceAccessRequestsRequest request); + + /** + * Returns a list of resources associated with the Delegation Control. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListDelegationControlResources API. + */ + ListDelegationControlResourcesResponse listDelegationControlResources( + ListDelegationControlResourcesRequest request); + + /** + * Lists the Delegation Controls in the compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListDelegationControls API. + */ + ListDelegationControlsResponse listDelegationControls(ListDelegationControlsRequest request); + + /** + * Lists the Delegation Subscriptions in Delegation Control. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListDelegationSubscriptions API. + */ + ListDelegationSubscriptionsResponse listDelegationSubscriptions( + ListDelegationSubscriptionsRequest request); + + /** + * Lists all the ServiceProviderActions available in the system. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListServiceProviderActions API. + */ + ListServiceProviderActionsResponse listServiceProviderActions( + ListServiceProviderActionsRequest request); + + /** + * Lists the MoreInformation interaction between customer and support operators. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListServiceProviderInteractions API. + */ + ListServiceProviderInteractionsResponse listServiceProviderInteractions( + ListServiceProviderInteractionsRequest request); + + /** + * Lists the Service Providers. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListServiceProviders API. + */ + ListServiceProvidersResponse listServiceProviders(ListServiceProvidersRequest request); + + /** + * Rejects a Delegated Resource Access Request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RejectDelegatedResourceAccessRequest API. + */ + RejectDelegatedResourceAccessRequestResponse rejectDelegatedResourceAccessRequest( + RejectDelegatedResourceAccessRequestRequest request); + + /** + * Revokes an already approved Delegated Resource Access Request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RevokeDelegatedResourceAccessRequest API. + */ + RevokeDelegatedResourceAccessRequestResponse revokeDelegatedResourceAccessRequest( + RevokeDelegatedResourceAccessRequestRequest request); + + /** + * Posts query for additional information for the given Delegated Resource Access Request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ServiceProviderInteractionRequest API. + */ + ServiceProviderInteractionRequestResponse serviceProviderInteractionRequest( + ServiceProviderInteractionRequestRequest request); + + /** + * Updates the existing DelegationControl for a given Delegation Control ID. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateDelegationControl API. + */ + UpdateDelegationControlResponse updateDelegationControl(UpdateDelegationControlRequest request); + + /** + * Updates the existing DelegationSubscription for a given Delegation Subscription ID. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateDelegationSubscription API. + */ + UpdateDelegationSubscriptionResponse updateDelegationSubscription( + UpdateDelegationSubscriptionRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + DelegateAccessControlWaiters getWaiters(); + + /** + * Gets the pre-configured paginators available for list operations in this service which may return multiple + * pages of data. These paginators provide an {@link java.lang.Iterable} interface so that service responses, or + * resources/records, can be iterated through without having to manually deal with pagination and page tokens. + * + * @return The service paginators. + */ + DelegateAccessControlPaginators getPaginators(); +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/DelegateAccessControlAsync.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/DelegateAccessControlAsync.java new file mode 100644 index 00000000000..561a9eaa40c --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/DelegateAccessControlAsync.java @@ -0,0 +1,531 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol; + +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; + +/** + * Oracle Delegate Access Control allows ExaCC and ExaCS customers to delegate management of their Exadata resources operators outside their tenancies. + * With Delegate Access Control, Support Providers can deliver managed services using comprehensive and robust tooling built on the OCI platform. + * Customers maintain control over who has access to the delegated resources in their tenancy and what actions can be taken. + * Enterprises managing resources across multiple tenants can use Delegate Access Control to streamline management tasks. + * Using logging service, customers can view a near real-time audit report of all actions performed by a Service Provider operator. + * + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public interface DelegateAccessControlAsync extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the serice. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Approves a Delegated Resource Access Request. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + approveDelegatedResourceAccessRequest( + ApproveDelegatedResourceAccessRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + ApproveDelegatedResourceAccessRequestRequest, + ApproveDelegatedResourceAccessRequestResponse> + handler); + + /** + * Moves the Delegation Control resource into a different compartment. When provided, 'If-Match' is checked against 'ETag' values of the resource. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + changeDelegationControlCompartment( + ChangeDelegationControlCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeDelegationControlCompartmentRequest, + ChangeDelegationControlCompartmentResponse> + handler); + + /** + * Moves the Delegation Subscription resource into a different compartment. When provided, 'If-Match' is checked against 'ETag' values of the resource. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + changeDelegationSubscriptionCompartment( + ChangeDelegationSubscriptionCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeDelegationSubscriptionCompartmentRequest, + ChangeDelegationSubscriptionCompartmentResponse> + handler); + + /** + * Creates a Delegation Control. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createDelegationControl( + CreateDelegationControlRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateDelegationControlRequest, CreateDelegationControlResponse> + handler); + + /** + * Creates Delegation Subscription in Delegation Control. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createDelegationSubscription( + CreateDelegationSubscriptionRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateDelegationSubscriptionRequest, + CreateDelegationSubscriptionResponse> + handler); + + /** + * Deletes a Delegation Control. You cannot delete a Delegation Control if it is assigned to govern any target resource currently or in the future. + * In that case, first, delete all of the current and future assignments before deleting the Delegation Control. A Delegation Control that was previously assigned to a target + * resource is marked as DELETED following a successful deletion. However, it is not completely deleted from the system. This is to ensure auditing information for the accesses + * done under the Delegation Control is preserved for future needs. The system purges the deleted Delegation Control only when all of the audit data associated with the + * Delegation Control are also deleted. Therefore, you cannot reuse the name of the deleted Delegation Control until the system purges the Delegation Control. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteDelegationControl( + DeleteDelegationControlRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteDelegationControlRequest, DeleteDelegationControlResponse> + handler); + + /** + * eletes an Delegation Subscription in Delegation Control. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteDelegationSubscription( + DeleteDelegationSubscriptionRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteDelegationSubscriptionRequest, + DeleteDelegationSubscriptionResponse> + handler); + + /** + * Gets details of a Delegated Resource Access Request. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + getDelegatedResourceAccessRequest( + GetDelegatedResourceAccessRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetDelegatedResourceAccessRequestRequest, + GetDelegatedResourceAccessRequestResponse> + handler); + + /** + * Gets the audit log report for the given Delegated Resource Access Request. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + getDelegatedResourceAccessRequestAuditLogReport( + GetDelegatedResourceAccessRequestAuditLogReportRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetDelegatedResourceAccessRequestAuditLogReportRequest, + GetDelegatedResourceAccessRequestAuditLogReportResponse> + handler); + + /** + * Gets the Delegation Control associated with the specified Delegation Control ID. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getDelegationControl( + GetDelegationControlRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetDelegationControlRequest, GetDelegationControlResponse> + handler); + + /** + * Gets a DelegationSubscription by identifier + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getDelegationSubscription( + GetDelegationSubscriptionRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetDelegationSubscriptionRequest, GetDelegationSubscriptionResponse> + handler); + + /** + * Gets a ServiceProvider by identifier + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getServiceProvider( + GetServiceProviderRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetServiceProviderRequest, GetServiceProviderResponse> + handler); + + /** + * Gets the Service Provider Action associated with the specified Service Provider Action ID. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getServiceProviderAction( + GetServiceProviderActionRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetServiceProviderActionRequest, GetServiceProviderActionResponse> + handler); + + /** + * Returns a history of all status associated with the Delegated Resource Access RequestId. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listDelegatedResourceAccessRequestHistories( + ListDelegatedResourceAccessRequestHistoriesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListDelegatedResourceAccessRequestHistoriesRequest, + ListDelegatedResourceAccessRequestHistoriesResponse> + handler); + + /** + * Lists all Delegated Resource Access Requests in the compartment. Note that only one of lifecycleState or requestStatus query parameter can be used. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listDelegatedResourceAccessRequests( + ListDelegatedResourceAccessRequestsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListDelegatedResourceAccessRequestsRequest, + ListDelegatedResourceAccessRequestsResponse> + handler); + + /** + * Returns a list of resources associated with the Delegation Control. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listDelegationControlResources( + ListDelegationControlResourcesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListDelegationControlResourcesRequest, + ListDelegationControlResourcesResponse> + handler); + + /** + * Lists the Delegation Controls in the compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listDelegationControls( + ListDelegationControlsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListDelegationControlsRequest, ListDelegationControlsResponse> + handler); + + /** + * Lists the Delegation Subscriptions in Delegation Control. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listDelegationSubscriptions( + ListDelegationSubscriptionsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListDelegationSubscriptionsRequest, ListDelegationSubscriptionsResponse> + handler); + + /** + * Lists all the ServiceProviderActions available in the system. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listServiceProviderActions( + ListServiceProviderActionsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListServiceProviderActionsRequest, ListServiceProviderActionsResponse> + handler); + + /** + * Lists the MoreInformation interaction between customer and support operators. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listServiceProviderInteractions( + ListServiceProviderInteractionsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListServiceProviderInteractionsRequest, + ListServiceProviderInteractionsResponse> + handler); + + /** + * Lists the Service Providers. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listServiceProviders( + ListServiceProvidersRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListServiceProvidersRequest, ListServiceProvidersResponse> + handler); + + /** + * Rejects a Delegated Resource Access Request. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + rejectDelegatedResourceAccessRequest( + RejectDelegatedResourceAccessRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + RejectDelegatedResourceAccessRequestRequest, + RejectDelegatedResourceAccessRequestResponse> + handler); + + /** + * Revokes an already approved Delegated Resource Access Request. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + revokeDelegatedResourceAccessRequest( + RevokeDelegatedResourceAccessRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + RevokeDelegatedResourceAccessRequestRequest, + RevokeDelegatedResourceAccessRequestResponse> + handler); + + /** + * Posts query for additional information for the given Delegated Resource Access Request. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + serviceProviderInteractionRequest( + ServiceProviderInteractionRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + ServiceProviderInteractionRequestRequest, + ServiceProviderInteractionRequestResponse> + handler); + + /** + * Updates the existing DelegationControl for a given Delegation Control ID. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateDelegationControl( + UpdateDelegationControlRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateDelegationControlRequest, UpdateDelegationControlResponse> + handler); + + /** + * Updates the existing DelegationSubscription for a given Delegation Subscription ID. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateDelegationSubscription( + UpdateDelegationSubscriptionRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateDelegationSubscriptionRequest, + UpdateDelegationSubscriptionResponse> + handler); +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/DelegateAccessControlAsyncClient.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/DelegateAccessControlAsyncClient.java new file mode 100644 index 00000000000..8260a3aedc5 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/DelegateAccessControlAsyncClient.java @@ -0,0 +1,1851 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol; + +import com.oracle.bmc.delegateaccesscontrol.internal.http.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; + +/** + * Async client implementation for DelegateAccessControl service.
+ * There are two ways to use async client: + * 1. Use AsyncHandler: using AsyncHandler, if the response to the call is an {@link java.io.InputStream}, like + * getObject Api in object storage service, developers need to process the stream in AsyncHandler, and not anywhere else, + * because the stream will be closed right after the AsyncHandler is invoked.
+ * 2. Use Java Future: using Java Future, developers need to close the stream after they are done with the Java Future.
+ * Accessing the result should be done in a mutually exclusive manner, either through the Future or the AsyncHandler, + * but not both. If the Future is used, the caller should pass in null as the AsyncHandler. If the AsyncHandler + * is used, it is still safe to use the Future to determine whether or not the request was completed via + * Future.isDone/isCancelled.
+ * Please refer to https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class DelegateAccessControlAsyncClient implements DelegateAccessControlAsync { + /** + * Service instance for DelegateAccessControl. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("DELEGATEACCESSCONTROL") + .serviceEndpointPrefix("") + .serviceEndpointTemplate( + "https://delegate-access-control.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DelegateAccessControlAsyncClient.class); + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public DelegateAccessControlAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public DelegateAccessControlAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public DelegateAccessControlAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public DelegateAccessControlAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public DelegateAccessControlAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public DelegateAccessControlAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public DelegateAccessControlAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + public DelegateAccessControlAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.clientConfigurationToUse = configuration; + + this.refreshClient(); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder< + Builder, DelegateAccessControlAsyncClient> { + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public DelegateAccessControlAsyncClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new DelegateAccessControlAsyncClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint); + } + } + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public java.util.concurrent.Future + approveDelegatedResourceAccessRequest( + ApproveDelegatedResourceAccessRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ApproveDelegatedResourceAccessRequestRequest, + ApproveDelegatedResourceAccessRequestResponse> + handler) { + LOG.trace("Called async approveDelegatedResourceAccessRequest"); + final ApproveDelegatedResourceAccessRequestRequest interceptedRequest = + ApproveDelegatedResourceAccessRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ApproveDelegatedResourceAccessRequestConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ApproveDelegatedResourceAccessRequest", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ApproveDelegatedResourceAccessRequestResponse> + transformer = + ApproveDelegatedResourceAccessRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ApproveDelegatedResourceAccessRequestRequest, + ApproveDelegatedResourceAccessRequestResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ApproveDelegatedResourceAccessRequestRequest, + ApproveDelegatedResourceAccessRequestResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getApproveDelegatedResourceAccessRequestDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ApproveDelegatedResourceAccessRequestRequest, + ApproveDelegatedResourceAccessRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + changeDelegationControlCompartment( + ChangeDelegationControlCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeDelegationControlCompartmentRequest, + ChangeDelegationControlCompartmentResponse> + handler) { + LOG.trace("Called async changeDelegationControlCompartment"); + final ChangeDelegationControlCompartmentRequest interceptedRequest = + ChangeDelegationControlCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeDelegationControlCompartmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ChangeDelegationControlCompartment", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeDelegationControlCompartmentResponse> + transformer = + ChangeDelegationControlCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeDelegationControlCompartmentRequest, + ChangeDelegationControlCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeDelegationControlCompartmentRequest, + ChangeDelegationControlCompartmentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeDelegationControlCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeDelegationControlCompartmentRequest, + ChangeDelegationControlCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + changeDelegationSubscriptionCompartment( + ChangeDelegationSubscriptionCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeDelegationSubscriptionCompartmentRequest, + ChangeDelegationSubscriptionCompartmentResponse> + handler) { + LOG.trace("Called async changeDelegationSubscriptionCompartment"); + final ChangeDelegationSubscriptionCompartmentRequest interceptedRequest = + ChangeDelegationSubscriptionCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeDelegationSubscriptionCompartmentConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ChangeDelegationSubscriptionCompartment", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeDelegationSubscriptionCompartmentResponse> + transformer = + ChangeDelegationSubscriptionCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeDelegationSubscriptionCompartmentRequest, + ChangeDelegationSubscriptionCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeDelegationSubscriptionCompartmentRequest, + ChangeDelegationSubscriptionCompartmentResponse>, + java.util.concurrent.Future< + ChangeDelegationSubscriptionCompartmentResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getChangeDelegationSubscriptionCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeDelegationSubscriptionCompartmentRequest, + ChangeDelegationSubscriptionCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createDelegationControl( + CreateDelegationControlRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateDelegationControlRequest, CreateDelegationControlResponse> + handler) { + LOG.trace("Called async createDelegationControl"); + final CreateDelegationControlRequest interceptedRequest = + CreateDelegationControlConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateDelegationControlConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "CreateDelegationControl", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateDelegationControlResponse> + transformer = + CreateDelegationControlConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateDelegationControlRequest, CreateDelegationControlResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateDelegationControlRequest, CreateDelegationControlResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateDelegationControlDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateDelegationControlRequest, CreateDelegationControlResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + createDelegationSubscription( + CreateDelegationSubscriptionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateDelegationSubscriptionRequest, + CreateDelegationSubscriptionResponse> + handler) { + LOG.trace("Called async createDelegationSubscription"); + final CreateDelegationSubscriptionRequest interceptedRequest = + CreateDelegationSubscriptionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateDelegationSubscriptionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "CreateDelegationSubscription", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateDelegationSubscriptionResponse> + transformer = + CreateDelegationSubscriptionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateDelegationSubscriptionRequest, CreateDelegationSubscriptionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateDelegationSubscriptionRequest, + CreateDelegationSubscriptionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateDelegationSubscriptionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateDelegationSubscriptionRequest, CreateDelegationSubscriptionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteDelegationControl( + DeleteDelegationControlRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteDelegationControlRequest, DeleteDelegationControlResponse> + handler) { + LOG.trace("Called async deleteDelegationControl"); + final DeleteDelegationControlRequest interceptedRequest = + DeleteDelegationControlConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteDelegationControlConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "DeleteDelegationControl", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteDelegationControlResponse> + transformer = + DeleteDelegationControlConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteDelegationControlRequest, DeleteDelegationControlResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteDelegationControlRequest, DeleteDelegationControlResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteDelegationControlRequest, DeleteDelegationControlResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + deleteDelegationSubscription( + DeleteDelegationSubscriptionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteDelegationSubscriptionRequest, + DeleteDelegationSubscriptionResponse> + handler) { + LOG.trace("Called async deleteDelegationSubscription"); + final DeleteDelegationSubscriptionRequest interceptedRequest = + DeleteDelegationSubscriptionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteDelegationSubscriptionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "DeleteDelegationSubscription", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteDelegationSubscriptionResponse> + transformer = + DeleteDelegationSubscriptionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteDelegationSubscriptionRequest, DeleteDelegationSubscriptionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteDelegationSubscriptionRequest, + DeleteDelegationSubscriptionResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteDelegationSubscriptionRequest, DeleteDelegationSubscriptionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getDelegatedResourceAccessRequest( + GetDelegatedResourceAccessRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetDelegatedResourceAccessRequestRequest, + GetDelegatedResourceAccessRequestResponse> + handler) { + LOG.trace("Called async getDelegatedResourceAccessRequest"); + final GetDelegatedResourceAccessRequestRequest interceptedRequest = + GetDelegatedResourceAccessRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDelegatedResourceAccessRequestConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "GetDelegatedResourceAccessRequest", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, GetDelegatedResourceAccessRequestResponse> + transformer = + GetDelegatedResourceAccessRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetDelegatedResourceAccessRequestRequest, + GetDelegatedResourceAccessRequestResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetDelegatedResourceAccessRequestRequest, + GetDelegatedResourceAccessRequestResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetDelegatedResourceAccessRequestRequest, + GetDelegatedResourceAccessRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getDelegatedResourceAccessRequestAuditLogReport( + GetDelegatedResourceAccessRequestAuditLogReportRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetDelegatedResourceAccessRequestAuditLogReportRequest, + GetDelegatedResourceAccessRequestAuditLogReportResponse> + handler) { + LOG.trace("Called async getDelegatedResourceAccessRequestAuditLogReport"); + final GetDelegatedResourceAccessRequestAuditLogReportRequest interceptedRequest = + GetDelegatedResourceAccessRequestAuditLogReportConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDelegatedResourceAccessRequestAuditLogReportConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "GetDelegatedResourceAccessRequestAuditLogReport", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, + GetDelegatedResourceAccessRequestAuditLogReportResponse> + transformer = + GetDelegatedResourceAccessRequestAuditLogReportConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetDelegatedResourceAccessRequestAuditLogReportRequest, + GetDelegatedResourceAccessRequestAuditLogReportResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetDelegatedResourceAccessRequestAuditLogReportRequest, + GetDelegatedResourceAccessRequestAuditLogReportResponse>, + java.util.concurrent.Future< + GetDelegatedResourceAccessRequestAuditLogReportResponse>> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetDelegatedResourceAccessRequestAuditLogReportRequest, + GetDelegatedResourceAccessRequestAuditLogReportResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getDelegationControl( + GetDelegationControlRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetDelegationControlRequest, GetDelegationControlResponse> + handler) { + LOG.trace("Called async getDelegationControl"); + final GetDelegationControlRequest interceptedRequest = + GetDelegationControlConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDelegationControlConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "GetDelegationControl", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + GetDelegationControlConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetDelegationControlRequest, GetDelegationControlResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetDelegationControlRequest, GetDelegationControlResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetDelegationControlRequest, GetDelegationControlResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getDelegationSubscription( + GetDelegationSubscriptionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetDelegationSubscriptionRequest, GetDelegationSubscriptionResponse> + handler) { + LOG.trace("Called async getDelegationSubscription"); + final GetDelegationSubscriptionRequest interceptedRequest = + GetDelegationSubscriptionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDelegationSubscriptionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "GetDelegationSubscription", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, GetDelegationSubscriptionResponse> + transformer = + GetDelegationSubscriptionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetDelegationSubscriptionRequest, GetDelegationSubscriptionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetDelegationSubscriptionRequest, + GetDelegationSubscriptionResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetDelegationSubscriptionRequest, GetDelegationSubscriptionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getServiceProvider( + GetServiceProviderRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetServiceProviderRequest, GetServiceProviderResponse> + handler) { + LOG.trace("Called async getServiceProvider"); + final GetServiceProviderRequest interceptedRequest = + GetServiceProviderConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetServiceProviderConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "GetServiceProvider", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + GetServiceProviderConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetServiceProviderRequest, GetServiceProviderResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetServiceProviderRequest, GetServiceProviderResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getServiceProviderAction( + GetServiceProviderActionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetServiceProviderActionRequest, GetServiceProviderActionResponse> + handler) { + LOG.trace("Called async getServiceProviderAction"); + final GetServiceProviderActionRequest interceptedRequest = + GetServiceProviderActionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetServiceProviderActionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "GetServiceProviderAction", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, GetServiceProviderActionResponse> + transformer = + GetServiceProviderActionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetServiceProviderActionRequest, GetServiceProviderActionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetServiceProviderActionRequest, GetServiceProviderActionResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetServiceProviderActionRequest, GetServiceProviderActionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listDelegatedResourceAccessRequestHistories( + ListDelegatedResourceAccessRequestHistoriesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListDelegatedResourceAccessRequestHistoriesRequest, + ListDelegatedResourceAccessRequestHistoriesResponse> + handler) { + LOG.trace("Called async listDelegatedResourceAccessRequestHistories"); + final ListDelegatedResourceAccessRequestHistoriesRequest interceptedRequest = + ListDelegatedResourceAccessRequestHistoriesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDelegatedResourceAccessRequestHistoriesConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ListDelegatedResourceAccessRequestHistories", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, + ListDelegatedResourceAccessRequestHistoriesResponse> + transformer = + ListDelegatedResourceAccessRequestHistoriesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListDelegatedResourceAccessRequestHistoriesRequest, + ListDelegatedResourceAccessRequestHistoriesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListDelegatedResourceAccessRequestHistoriesRequest, + ListDelegatedResourceAccessRequestHistoriesResponse>, + java.util.concurrent.Future< + ListDelegatedResourceAccessRequestHistoriesResponse>> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListDelegatedResourceAccessRequestHistoriesRequest, + ListDelegatedResourceAccessRequestHistoriesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listDelegatedResourceAccessRequests( + ListDelegatedResourceAccessRequestsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListDelegatedResourceAccessRequestsRequest, + ListDelegatedResourceAccessRequestsResponse> + handler) { + LOG.trace("Called async listDelegatedResourceAccessRequests"); + final ListDelegatedResourceAccessRequestsRequest interceptedRequest = + ListDelegatedResourceAccessRequestsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDelegatedResourceAccessRequestsConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ListDelegatedResourceAccessRequests", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ListDelegatedResourceAccessRequestsResponse> + transformer = + ListDelegatedResourceAccessRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListDelegatedResourceAccessRequestsRequest, + ListDelegatedResourceAccessRequestsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListDelegatedResourceAccessRequestsRequest, + ListDelegatedResourceAccessRequestsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListDelegatedResourceAccessRequestsRequest, + ListDelegatedResourceAccessRequestsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listDelegationControlResources( + ListDelegationControlResourcesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListDelegationControlResourcesRequest, + ListDelegationControlResourcesResponse> + handler) { + LOG.trace("Called async listDelegationControlResources"); + final ListDelegationControlResourcesRequest interceptedRequest = + ListDelegationControlResourcesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDelegationControlResourcesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ListDelegationControlResources", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ListDelegationControlResourcesResponse> + transformer = + ListDelegationControlResourcesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListDelegationControlResourcesRequest, + ListDelegationControlResourcesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListDelegationControlResourcesRequest, + ListDelegationControlResourcesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListDelegationControlResourcesRequest, ListDelegationControlResourcesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listDelegationControls( + ListDelegationControlsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListDelegationControlsRequest, ListDelegationControlsResponse> + handler) { + LOG.trace("Called async listDelegationControls"); + final ListDelegationControlsRequest interceptedRequest = + ListDelegationControlsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDelegationControlsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ListDelegationControls", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListDelegationControlsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListDelegationControlsRequest, ListDelegationControlsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListDelegationControlsRequest, ListDelegationControlsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListDelegationControlsRequest, ListDelegationControlsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listDelegationSubscriptions( + ListDelegationSubscriptionsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListDelegationSubscriptionsRequest, + ListDelegationSubscriptionsResponse> + handler) { + LOG.trace("Called async listDelegationSubscriptions"); + final ListDelegationSubscriptionsRequest interceptedRequest = + ListDelegationSubscriptionsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDelegationSubscriptionsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ListDelegationSubscriptions", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ListDelegationSubscriptionsResponse> + transformer = + ListDelegationSubscriptionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListDelegationSubscriptionsRequest, ListDelegationSubscriptionsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListDelegationSubscriptionsRequest, + ListDelegationSubscriptionsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListDelegationSubscriptionsRequest, ListDelegationSubscriptionsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listServiceProviderActions( + ListServiceProviderActionsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListServiceProviderActionsRequest, + ListServiceProviderActionsResponse> + handler) { + LOG.trace("Called async listServiceProviderActions"); + final ListServiceProviderActionsRequest interceptedRequest = + ListServiceProviderActionsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListServiceProviderActionsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ListServiceProviderActions", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ListServiceProviderActionsResponse> + transformer = + ListServiceProviderActionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListServiceProviderActionsRequest, ListServiceProviderActionsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListServiceProviderActionsRequest, + ListServiceProviderActionsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListServiceProviderActionsRequest, ListServiceProviderActionsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listServiceProviderInteractions( + ListServiceProviderInteractionsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListServiceProviderInteractionsRequest, + ListServiceProviderInteractionsResponse> + handler) { + LOG.trace("Called async listServiceProviderInteractions"); + final ListServiceProviderInteractionsRequest interceptedRequest = + ListServiceProviderInteractionsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListServiceProviderInteractionsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ListServiceProviderInteractions", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ListServiceProviderInteractionsResponse> + transformer = + ListServiceProviderInteractionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListServiceProviderInteractionsRequest, + ListServiceProviderInteractionsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListServiceProviderInteractionsRequest, + ListServiceProviderInteractionsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListServiceProviderInteractionsRequest, + ListServiceProviderInteractionsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listServiceProviders( + ListServiceProvidersRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListServiceProvidersRequest, ListServiceProvidersResponse> + handler) { + LOG.trace("Called async listServiceProviders"); + final ListServiceProvidersRequest interceptedRequest = + ListServiceProvidersConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListServiceProvidersConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ListServiceProviders", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListServiceProvidersConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListServiceProvidersRequest, ListServiceProvidersResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListServiceProvidersRequest, ListServiceProvidersResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListServiceProvidersRequest, ListServiceProvidersResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + rejectDelegatedResourceAccessRequest( + RejectDelegatedResourceAccessRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RejectDelegatedResourceAccessRequestRequest, + RejectDelegatedResourceAccessRequestResponse> + handler) { + LOG.trace("Called async rejectDelegatedResourceAccessRequest"); + final RejectDelegatedResourceAccessRequestRequest interceptedRequest = + RejectDelegatedResourceAccessRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RejectDelegatedResourceAccessRequestConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "RejectDelegatedResourceAccessRequest", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, RejectDelegatedResourceAccessRequestResponse> + transformer = + RejectDelegatedResourceAccessRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + RejectDelegatedResourceAccessRequestRequest, + RejectDelegatedResourceAccessRequestResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RejectDelegatedResourceAccessRequestRequest, + RejectDelegatedResourceAccessRequestResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRejectDelegatedResourceAccessRequestDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RejectDelegatedResourceAccessRequestRequest, + RejectDelegatedResourceAccessRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + revokeDelegatedResourceAccessRequest( + RevokeDelegatedResourceAccessRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RevokeDelegatedResourceAccessRequestRequest, + RevokeDelegatedResourceAccessRequestResponse> + handler) { + LOG.trace("Called async revokeDelegatedResourceAccessRequest"); + final RevokeDelegatedResourceAccessRequestRequest interceptedRequest = + RevokeDelegatedResourceAccessRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RevokeDelegatedResourceAccessRequestConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "RevokeDelegatedResourceAccessRequest", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, RevokeDelegatedResourceAccessRequestResponse> + transformer = + RevokeDelegatedResourceAccessRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + RevokeDelegatedResourceAccessRequestRequest, + RevokeDelegatedResourceAccessRequestResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RevokeDelegatedResourceAccessRequestRequest, + RevokeDelegatedResourceAccessRequestResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRevokeDelegatedResourceAccessRequestDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RevokeDelegatedResourceAccessRequestRequest, + RevokeDelegatedResourceAccessRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + serviceProviderInteractionRequest( + ServiceProviderInteractionRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ServiceProviderInteractionRequestRequest, + ServiceProviderInteractionRequestResponse> + handler) { + LOG.trace("Called async serviceProviderInteractionRequest"); + final ServiceProviderInteractionRequestRequest interceptedRequest = + ServiceProviderInteractionRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ServiceProviderInteractionRequestConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ServiceProviderInteractionRequest", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ServiceProviderInteractionRequestResponse> + transformer = + ServiceProviderInteractionRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ServiceProviderInteractionRequestRequest, + ServiceProviderInteractionRequestResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ServiceProviderInteractionRequestRequest, + ServiceProviderInteractionRequestResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getServiceProviderInteractionRequestDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ServiceProviderInteractionRequestRequest, + ServiceProviderInteractionRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateDelegationControl( + UpdateDelegationControlRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateDelegationControlRequest, UpdateDelegationControlResponse> + handler) { + LOG.trace("Called async updateDelegationControl"); + final UpdateDelegationControlRequest interceptedRequest = + UpdateDelegationControlConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateDelegationControlConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "UpdateDelegationControl", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateDelegationControlResponse> + transformer = + UpdateDelegationControlConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateDelegationControlRequest, UpdateDelegationControlResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateDelegationControlRequest, UpdateDelegationControlResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateDelegationControlDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateDelegationControlRequest, UpdateDelegationControlResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + updateDelegationSubscription( + UpdateDelegationSubscriptionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateDelegationSubscriptionRequest, + UpdateDelegationSubscriptionResponse> + handler) { + LOG.trace("Called async updateDelegationSubscription"); + final UpdateDelegationSubscriptionRequest interceptedRequest = + UpdateDelegationSubscriptionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateDelegationSubscriptionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "UpdateDelegationSubscription", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateDelegationSubscriptionResponse> + transformer = + UpdateDelegationSubscriptionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateDelegationSubscriptionRequest, UpdateDelegationSubscriptionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateDelegationSubscriptionRequest, + UpdateDelegationSubscriptionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateDelegationSubscriptionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateDelegationSubscriptionRequest, UpdateDelegationSubscriptionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/DelegateAccessControlClient.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/DelegateAccessControlClient.java new file mode 100644 index 00000000000..d11820c1b0f --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/DelegateAccessControlClient.java @@ -0,0 +1,1627 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol; + +import com.oracle.bmc.delegateaccesscontrol.internal.http.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration; +import com.oracle.bmc.util.CircuitBreakerUtils; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class DelegateAccessControlClient implements DelegateAccessControl { + /** + * Service instance for DelegateAccessControl. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("DELEGATEACCESSCONTROL") + .serviceEndpointPrefix("") + .serviceEndpointTemplate( + "https://delegate-access-control.{region}.oci.{secondLevelDomain}") + .build(); + // attempt twice if it's instance principals, immediately failures will try to refresh the token + private static final int MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS = 2; + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DelegateAccessControlClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final DelegateAccessControlWaiters waiters; + + private final DelegateAccessControlPaginators paginators; + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + circuitBreakerConfiguration; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public DelegateAccessControlClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public DelegateAccessControlClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public DelegateAccessControlClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public DelegateAccessControlClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public DelegateAccessControlClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public DelegateAccessControlClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public DelegateAccessControlClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + */ + public DelegateAccessControlClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * Use the {@link Builder} to get access to all these parameters. + * + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + protected DelegateAccessControlClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + this.restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + + this.clientConfigurationToUse = + (configuration != null) + ? configuration + : com.oracle.bmc.ClientConfiguration.builder().build(); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.retryConfiguration = clientConfigurationToUse.getRetryConfiguration(); + final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + userCircuitBreakerConfiguration = + CircuitBreakerUtils.getUserDefinedCircuitBreakerConfiguration( + configuration); + if (userCircuitBreakerConfiguration == null) { + this.circuitBreakerConfiguration = + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION; + } else { + this.circuitBreakerConfiguration = userCircuitBreakerConfiguration; + } + + this.refreshClient(); + + if (executorService == null) { + // up to 50 (core) threads, time out after 60s idle, all daemon + java.util.concurrent.ThreadPoolExecutor threadPoolExecutor = + new java.util.concurrent.ThreadPoolExecutor( + 50, + 50, + 60L, + java.util.concurrent.TimeUnit.SECONDS, + new java.util.concurrent.LinkedBlockingQueue(), + com.oracle.bmc.internal.ClientThreadFactory.builder() + .isDaemon(true) + .nameFormat("DelegateAccessControl-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new DelegateAccessControlWaiters(executorService, this); + + this.paginators = new DelegateAccessControlPaginators(this); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder< + Builder, DelegateAccessControlClient> { + private java.util.concurrent.ExecutorService executorService; + + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Set the ExecutorService for the client to be created. + * @param executorService executorService + * @return this builder + */ + public Builder executorService(java.util.concurrent.ExecutorService executorService) { + this.executorService = executorService; + return this; + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public DelegateAccessControlClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new DelegateAccessControlClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + restClientFactoryBuilder); + } + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, this.authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient, + null, + this.circuitBreakerConfiguration); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public ApproveDelegatedResourceAccessRequestResponse approveDelegatedResourceAccessRequest( + ApproveDelegatedResourceAccessRequestRequest request) { + LOG.trace("Called approveDelegatedResourceAccessRequest"); + final ApproveDelegatedResourceAccessRequestRequest interceptedRequest = + ApproveDelegatedResourceAccessRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ApproveDelegatedResourceAccessRequestConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ApproveDelegatedResourceAccessRequest", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, ApproveDelegatedResourceAccessRequestResponse> + transformer = + ApproveDelegatedResourceAccessRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getApproveDelegatedResourceAccessRequestDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ChangeDelegationControlCompartmentResponse changeDelegationControlCompartment( + ChangeDelegationControlCompartmentRequest request) { + LOG.trace("Called changeDelegationControlCompartment"); + final ChangeDelegationControlCompartmentRequest interceptedRequest = + ChangeDelegationControlCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeDelegationControlCompartmentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ChangeDelegationControlCompartment", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, ChangeDelegationControlCompartmentResponse> + transformer = + ChangeDelegationControlCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeDelegationControlCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ChangeDelegationSubscriptionCompartmentResponse changeDelegationSubscriptionCompartment( + ChangeDelegationSubscriptionCompartmentRequest request) { + LOG.trace("Called changeDelegationSubscriptionCompartment"); + final ChangeDelegationSubscriptionCompartmentRequest interceptedRequest = + ChangeDelegationSubscriptionCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeDelegationSubscriptionCompartmentConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ChangeDelegationSubscriptionCompartment", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, ChangeDelegationSubscriptionCompartmentResponse> + transformer = + ChangeDelegationSubscriptionCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeDelegationSubscriptionCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateDelegationControlResponse createDelegationControl( + CreateDelegationControlRequest request) { + LOG.trace("Called createDelegationControl"); + final CreateDelegationControlRequest interceptedRequest = + CreateDelegationControlConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateDelegationControlConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "CreateDelegationControl", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + CreateDelegationControlConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateDelegationControlDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateDelegationSubscriptionResponse createDelegationSubscription( + CreateDelegationSubscriptionRequest request) { + LOG.trace("Called createDelegationSubscription"); + final CreateDelegationSubscriptionRequest interceptedRequest = + CreateDelegationSubscriptionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateDelegationSubscriptionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "CreateDelegationSubscription", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + CreateDelegationSubscriptionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getCreateDelegationSubscriptionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteDelegationControlResponse deleteDelegationControl( + DeleteDelegationControlRequest request) { + LOG.trace("Called deleteDelegationControl"); + final DeleteDelegationControlRequest interceptedRequest = + DeleteDelegationControlConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteDelegationControlConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "DeleteDelegationControl", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + DeleteDelegationControlConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteDelegationSubscriptionResponse deleteDelegationSubscription( + DeleteDelegationSubscriptionRequest request) { + LOG.trace("Called deleteDelegationSubscription"); + final DeleteDelegationSubscriptionRequest interceptedRequest = + DeleteDelegationSubscriptionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteDelegationSubscriptionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "DeleteDelegationSubscription", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + DeleteDelegationSubscriptionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetDelegatedResourceAccessRequestResponse getDelegatedResourceAccessRequest( + GetDelegatedResourceAccessRequestRequest request) { + LOG.trace("Called getDelegatedResourceAccessRequest"); + final GetDelegatedResourceAccessRequestRequest interceptedRequest = + GetDelegatedResourceAccessRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDelegatedResourceAccessRequestConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "GetDelegatedResourceAccessRequest", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, GetDelegatedResourceAccessRequestResponse> + transformer = + GetDelegatedResourceAccessRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetDelegatedResourceAccessRequestAuditLogReportResponse + getDelegatedResourceAccessRequestAuditLogReport( + GetDelegatedResourceAccessRequestAuditLogReportRequest request) { + LOG.trace("Called getDelegatedResourceAccessRequestAuditLogReport"); + final GetDelegatedResourceAccessRequestAuditLogReportRequest interceptedRequest = + GetDelegatedResourceAccessRequestAuditLogReportConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDelegatedResourceAccessRequestAuditLogReportConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "GetDelegatedResourceAccessRequestAuditLogReport", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, + GetDelegatedResourceAccessRequestAuditLogReportResponse> + transformer = + GetDelegatedResourceAccessRequestAuditLogReportConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetDelegationControlResponse getDelegationControl(GetDelegationControlRequest request) { + LOG.trace("Called getDelegationControl"); + final GetDelegationControlRequest interceptedRequest = + GetDelegationControlConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDelegationControlConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "GetDelegationControl", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + GetDelegationControlConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetDelegationSubscriptionResponse getDelegationSubscription( + GetDelegationSubscriptionRequest request) { + LOG.trace("Called getDelegationSubscription"); + final GetDelegationSubscriptionRequest interceptedRequest = + GetDelegationSubscriptionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDelegationSubscriptionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "GetDelegationSubscription", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + GetDelegationSubscriptionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetServiceProviderResponse getServiceProvider(GetServiceProviderRequest request) { + LOG.trace("Called getServiceProvider"); + final GetServiceProviderRequest interceptedRequest = + GetServiceProviderConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetServiceProviderConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "GetServiceProvider", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + GetServiceProviderConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetServiceProviderActionResponse getServiceProviderAction( + GetServiceProviderActionRequest request) { + LOG.trace("Called getServiceProviderAction"); + final GetServiceProviderActionRequest interceptedRequest = + GetServiceProviderActionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetServiceProviderActionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "GetServiceProviderAction", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + GetServiceProviderActionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListDelegatedResourceAccessRequestHistoriesResponse + listDelegatedResourceAccessRequestHistories( + ListDelegatedResourceAccessRequestHistoriesRequest request) { + LOG.trace("Called listDelegatedResourceAccessRequestHistories"); + final ListDelegatedResourceAccessRequestHistoriesRequest interceptedRequest = + ListDelegatedResourceAccessRequestHistoriesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDelegatedResourceAccessRequestHistoriesConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ListDelegatedResourceAccessRequestHistories", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, + ListDelegatedResourceAccessRequestHistoriesResponse> + transformer = + ListDelegatedResourceAccessRequestHistoriesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListDelegatedResourceAccessRequestsResponse listDelegatedResourceAccessRequests( + ListDelegatedResourceAccessRequestsRequest request) { + LOG.trace("Called listDelegatedResourceAccessRequests"); + final ListDelegatedResourceAccessRequestsRequest interceptedRequest = + ListDelegatedResourceAccessRequestsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDelegatedResourceAccessRequestsConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ListDelegatedResourceAccessRequests", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, ListDelegatedResourceAccessRequestsResponse> + transformer = + ListDelegatedResourceAccessRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListDelegationControlResourcesResponse listDelegationControlResources( + ListDelegationControlResourcesRequest request) { + LOG.trace("Called listDelegationControlResources"); + final ListDelegationControlResourcesRequest interceptedRequest = + ListDelegationControlResourcesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDelegationControlResourcesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ListDelegationControlResources", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, ListDelegationControlResourcesResponse> + transformer = + ListDelegationControlResourcesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListDelegationControlsResponse listDelegationControls( + ListDelegationControlsRequest request) { + LOG.trace("Called listDelegationControls"); + final ListDelegationControlsRequest interceptedRequest = + ListDelegationControlsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDelegationControlsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ListDelegationControls", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListDelegationControlsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListDelegationSubscriptionsResponse listDelegationSubscriptions( + ListDelegationSubscriptionsRequest request) { + LOG.trace("Called listDelegationSubscriptions"); + final ListDelegationSubscriptionsRequest interceptedRequest = + ListDelegationSubscriptionsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDelegationSubscriptionsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ListDelegationSubscriptions", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListDelegationSubscriptionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListServiceProviderActionsResponse listServiceProviderActions( + ListServiceProviderActionsRequest request) { + LOG.trace("Called listServiceProviderActions"); + final ListServiceProviderActionsRequest interceptedRequest = + ListServiceProviderActionsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListServiceProviderActionsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ListServiceProviderActions", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListServiceProviderActionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListServiceProviderInteractionsResponse listServiceProviderInteractions( + ListServiceProviderInteractionsRequest request) { + LOG.trace("Called listServiceProviderInteractions"); + final ListServiceProviderInteractionsRequest interceptedRequest = + ListServiceProviderInteractionsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListServiceProviderInteractionsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ListServiceProviderInteractions", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, ListServiceProviderInteractionsResponse> + transformer = + ListServiceProviderInteractionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListServiceProvidersResponse listServiceProviders(ListServiceProvidersRequest request) { + LOG.trace("Called listServiceProviders"); + final ListServiceProvidersRequest interceptedRequest = + ListServiceProvidersConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListServiceProvidersConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ListServiceProviders", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListServiceProvidersConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public RejectDelegatedResourceAccessRequestResponse rejectDelegatedResourceAccessRequest( + RejectDelegatedResourceAccessRequestRequest request) { + LOG.trace("Called rejectDelegatedResourceAccessRequest"); + final RejectDelegatedResourceAccessRequestRequest interceptedRequest = + RejectDelegatedResourceAccessRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RejectDelegatedResourceAccessRequestConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "RejectDelegatedResourceAccessRequest", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, RejectDelegatedResourceAccessRequestResponse> + transformer = + RejectDelegatedResourceAccessRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getRejectDelegatedResourceAccessRequestDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public RevokeDelegatedResourceAccessRequestResponse revokeDelegatedResourceAccessRequest( + RevokeDelegatedResourceAccessRequestRequest request) { + LOG.trace("Called revokeDelegatedResourceAccessRequest"); + final RevokeDelegatedResourceAccessRequestRequest interceptedRequest = + RevokeDelegatedResourceAccessRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RevokeDelegatedResourceAccessRequestConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "RevokeDelegatedResourceAccessRequest", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, RevokeDelegatedResourceAccessRequestResponse> + transformer = + RevokeDelegatedResourceAccessRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getRevokeDelegatedResourceAccessRequestDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ServiceProviderInteractionRequestResponse serviceProviderInteractionRequest( + ServiceProviderInteractionRequestRequest request) { + LOG.trace("Called serviceProviderInteractionRequest"); + final ServiceProviderInteractionRequestRequest interceptedRequest = + ServiceProviderInteractionRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ServiceProviderInteractionRequestConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "ServiceProviderInteractionRequest", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, ServiceProviderInteractionRequestResponse> + transformer = + ServiceProviderInteractionRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getServiceProviderInteractionRequestDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateDelegationControlResponse updateDelegationControl( + UpdateDelegationControlRequest request) { + LOG.trace("Called updateDelegationControl"); + final UpdateDelegationControlRequest interceptedRequest = + UpdateDelegationControlConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateDelegationControlConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "UpdateDelegationControl", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + UpdateDelegationControlConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateDelegationControlDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateDelegationSubscriptionResponse updateDelegationSubscription( + UpdateDelegationSubscriptionRequest request) { + LOG.trace("Called updateDelegationSubscription"); + final UpdateDelegationSubscriptionRequest interceptedRequest = + UpdateDelegationSubscriptionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateDelegationSubscriptionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DelegateAccessControl", + "UpdateDelegationSubscription", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + UpdateDelegationSubscriptionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest + .getUpdateDelegationSubscriptionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DelegateAccessControlWaiters getWaiters() { + return waiters; + } + + @Override + public DelegateAccessControlPaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/DelegateAccessControlPaginators.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/DelegateAccessControlPaginators.java new file mode 100644 index 00000000000..295ea2af5d8 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/DelegateAccessControlPaginators.java @@ -0,0 +1,1037 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol; + +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of DelegateAccessControl where multiple pages of data may be fetched. + * Two styles of iteration are supported: + * + *

    + *
  • Iterating over the Response objects returned by the list operation. These are referred to as ResponseIterators, and the methods are suffixed with ResponseIterator. For example: listUsersResponseIterator
  • + *
  • Iterating over the resources/records being listed. These are referred to as RecordIterators, and the methods are suffixed with RecordIterator. For example: listUsersRecordIterator
  • + *
+ * + * These iterables abstract away the need to write code to manually handle pagination via looping and using the page tokens. + * They will automatically fetch more data from the service when required. + * + * As an example, if we were using the ListUsers operation in IdentityService, then the {@link java.lang.Iterable} returned by calling a + * ResponseIterator method would iterate over the ListUsersResponse objects returned by each ListUsers call, whereas the {@link java.lang.Iterable} + * returned by calling a RecordIterator method would iterate over the User records and we don't have to deal with ListUsersResponse objects at all. + * In either case, pagination will be automatically handled so we can iterate until there are no more responses or no more resources/records available. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class DelegateAccessControlPaginators { + private final DelegateAccessControl client; + + public DelegateAccessControlPaginators(DelegateAccessControl client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listDelegatedResourceAccessRequestHistories operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listDelegatedResourceAccessRequestHistoriesResponseIterator( + final ListDelegatedResourceAccessRequestHistoriesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListDelegatedResourceAccessRequestHistoriesRequest.Builder, + ListDelegatedResourceAccessRequestHistoriesRequest, + ListDelegatedResourceAccessRequestHistoriesResponse>( + new java.util.function.Supplier< + ListDelegatedResourceAccessRequestHistoriesRequest.Builder>() { + @Override + public ListDelegatedResourceAccessRequestHistoriesRequest.Builder get() { + return ListDelegatedResourceAccessRequestHistoriesRequest.builder() + .copy(request); + } + }, + new java.util.function.Function< + ListDelegatedResourceAccessRequestHistoriesResponse, String>() { + @Override + public String apply( + ListDelegatedResourceAccessRequestHistoriesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDelegatedResourceAccessRequestHistoriesRequest.Builder>, + ListDelegatedResourceAccessRequestHistoriesRequest>() { + @Override + public ListDelegatedResourceAccessRequestHistoriesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDelegatedResourceAccessRequestHistoriesRequest + .Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListDelegatedResourceAccessRequestHistoriesRequest, + ListDelegatedResourceAccessRequestHistoriesResponse>() { + @Override + public ListDelegatedResourceAccessRequestHistoriesResponse apply( + ListDelegatedResourceAccessRequestHistoriesRequest request) { + return client.listDelegatedResourceAccessRequestHistories(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequestHistorySummary} objects + * contained in responses from the listDelegatedResourceAccessRequestHistories operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequestHistorySummary} objects + * contained in responses received from the service. + */ + public Iterable< + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestHistorySummary> + listDelegatedResourceAccessRequestHistoriesRecordIterator( + final ListDelegatedResourceAccessRequestHistoriesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListDelegatedResourceAccessRequestHistoriesRequest.Builder, + ListDelegatedResourceAccessRequestHistoriesRequest, + ListDelegatedResourceAccessRequestHistoriesResponse, + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestHistorySummary>( + new java.util.function.Supplier< + ListDelegatedResourceAccessRequestHistoriesRequest.Builder>() { + @Override + public ListDelegatedResourceAccessRequestHistoriesRequest.Builder get() { + return ListDelegatedResourceAccessRequestHistoriesRequest.builder() + .copy(request); + } + }, + new java.util.function.Function< + ListDelegatedResourceAccessRequestHistoriesResponse, String>() { + @Override + public String apply( + ListDelegatedResourceAccessRequestHistoriesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDelegatedResourceAccessRequestHistoriesRequest.Builder>, + ListDelegatedResourceAccessRequestHistoriesRequest>() { + @Override + public ListDelegatedResourceAccessRequestHistoriesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDelegatedResourceAccessRequestHistoriesRequest + .Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListDelegatedResourceAccessRequestHistoriesRequest, + ListDelegatedResourceAccessRequestHistoriesResponse>() { + @Override + public ListDelegatedResourceAccessRequestHistoriesResponse apply( + ListDelegatedResourceAccessRequestHistoriesRequest request) { + return client.listDelegatedResourceAccessRequestHistories(request); + } + }, + new java.util.function.Function< + ListDelegatedResourceAccessRequestHistoriesResponse, + java.util.List< + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestHistorySummary>>() { + @Override + public java.util.List< + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestHistorySummary> + apply(ListDelegatedResourceAccessRequestHistoriesResponse response) { + return response.getDelegatedResourceAccessRequestHistoryCollection() + .getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listDelegatedResourceAccessRequests operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listDelegatedResourceAccessRequestsResponseIterator( + final ListDelegatedResourceAccessRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListDelegatedResourceAccessRequestsRequest.Builder, + ListDelegatedResourceAccessRequestsRequest, + ListDelegatedResourceAccessRequestsResponse>( + new java.util.function.Supplier< + ListDelegatedResourceAccessRequestsRequest.Builder>() { + @Override + public ListDelegatedResourceAccessRequestsRequest.Builder get() { + return ListDelegatedResourceAccessRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListDelegatedResourceAccessRequestsResponse, String>() { + @Override + public String apply(ListDelegatedResourceAccessRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDelegatedResourceAccessRequestsRequest.Builder>, + ListDelegatedResourceAccessRequestsRequest>() { + @Override + public ListDelegatedResourceAccessRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDelegatedResourceAccessRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListDelegatedResourceAccessRequestsRequest, + ListDelegatedResourceAccessRequestsResponse>() { + @Override + public ListDelegatedResourceAccessRequestsResponse apply( + ListDelegatedResourceAccessRequestsRequest request) { + return client.listDelegatedResourceAccessRequests(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequestSummary} objects + * contained in responses from the listDelegatedResourceAccessRequests operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequestSummary} objects + * contained in responses received from the service. + */ + public Iterable< + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestSummary> + listDelegatedResourceAccessRequestsRecordIterator( + final ListDelegatedResourceAccessRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListDelegatedResourceAccessRequestsRequest.Builder, + ListDelegatedResourceAccessRequestsRequest, + ListDelegatedResourceAccessRequestsResponse, + com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequestSummary>( + new java.util.function.Supplier< + ListDelegatedResourceAccessRequestsRequest.Builder>() { + @Override + public ListDelegatedResourceAccessRequestsRequest.Builder get() { + return ListDelegatedResourceAccessRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListDelegatedResourceAccessRequestsResponse, String>() { + @Override + public String apply(ListDelegatedResourceAccessRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDelegatedResourceAccessRequestsRequest.Builder>, + ListDelegatedResourceAccessRequestsRequest>() { + @Override + public ListDelegatedResourceAccessRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDelegatedResourceAccessRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListDelegatedResourceAccessRequestsRequest, + ListDelegatedResourceAccessRequestsResponse>() { + @Override + public ListDelegatedResourceAccessRequestsResponse apply( + ListDelegatedResourceAccessRequestsRequest request) { + return client.listDelegatedResourceAccessRequests(request); + } + }, + new java.util.function.Function< + ListDelegatedResourceAccessRequestsResponse, + java.util.List< + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestSummary> + apply(ListDelegatedResourceAccessRequestsResponse response) { + return response.getDelegatedResourceAccessRequestSummaryCollection() + .getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listDelegationControlResources operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listDelegationControlResourcesResponseIterator( + final ListDelegationControlResourcesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListDelegationControlResourcesRequest.Builder, + ListDelegationControlResourcesRequest, ListDelegationControlResourcesResponse>( + new java.util.function.Supplier() { + @Override + public ListDelegationControlResourcesRequest.Builder get() { + return ListDelegationControlResourcesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListDelegationControlResourcesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDelegationControlResourcesRequest.Builder>, + ListDelegationControlResourcesRequest>() { + @Override + public ListDelegationControlResourcesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDelegationControlResourcesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListDelegationControlResourcesRequest, + ListDelegationControlResourcesResponse>() { + @Override + public ListDelegationControlResourcesResponse apply( + ListDelegationControlResourcesRequest request) { + return client.listDelegationControlResources(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.DelegationControlResourceSummary} objects + * contained in responses from the listDelegationControlResources operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.DelegationControlResourceSummary} objects + * contained in responses received from the service. + */ + public Iterable + listDelegationControlResourcesRecordIterator( + final ListDelegationControlResourcesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListDelegationControlResourcesRequest.Builder, + ListDelegationControlResourcesRequest, ListDelegationControlResourcesResponse, + com.oracle.bmc.delegateaccesscontrol.model.DelegationControlResourceSummary>( + new java.util.function.Supplier() { + @Override + public ListDelegationControlResourcesRequest.Builder get() { + return ListDelegationControlResourcesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListDelegationControlResourcesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDelegationControlResourcesRequest.Builder>, + ListDelegationControlResourcesRequest>() { + @Override + public ListDelegationControlResourcesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDelegationControlResourcesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListDelegationControlResourcesRequest, + ListDelegationControlResourcesResponse>() { + @Override + public ListDelegationControlResourcesResponse apply( + ListDelegationControlResourcesRequest request) { + return client.listDelegationControlResources(request); + } + }, + new java.util.function.Function< + ListDelegationControlResourcesResponse, + java.util.List< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControlResourceSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControlResourceSummary> + apply(ListDelegationControlResourcesResponse response) { + return response.getDelegationControlResourceCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listDelegationControls operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listDelegationControlsResponseIterator( + final ListDelegationControlsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListDelegationControlsRequest.Builder, ListDelegationControlsRequest, + ListDelegationControlsResponse>( + new java.util.function.Supplier() { + @Override + public ListDelegationControlsRequest.Builder get() { + return ListDelegationControlsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListDelegationControlsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDelegationControlsRequest.Builder>, + ListDelegationControlsRequest>() { + @Override + public ListDelegationControlsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDelegationControlsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListDelegationControlsRequest, ListDelegationControlsResponse>() { + @Override + public ListDelegationControlsResponse apply( + ListDelegationControlsRequest request) { + return client.listDelegationControls(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.DelegationControlSummary} objects + * contained in responses from the listDelegationControls operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.DelegationControlSummary} objects + * contained in responses received from the service. + */ + public Iterable + listDelegationControlsRecordIterator(final ListDelegationControlsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListDelegationControlsRequest.Builder, ListDelegationControlsRequest, + ListDelegationControlsResponse, + com.oracle.bmc.delegateaccesscontrol.model.DelegationControlSummary>( + new java.util.function.Supplier() { + @Override + public ListDelegationControlsRequest.Builder get() { + return ListDelegationControlsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListDelegationControlsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDelegationControlsRequest.Builder>, + ListDelegationControlsRequest>() { + @Override + public ListDelegationControlsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDelegationControlsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListDelegationControlsRequest, ListDelegationControlsResponse>() { + @Override + public ListDelegationControlsResponse apply( + ListDelegationControlsRequest request) { + return client.listDelegationControls(request); + } + }, + new java.util.function.Function< + ListDelegationControlsResponse, + java.util.List< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControlSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControlSummary> + apply(ListDelegationControlsResponse response) { + return response.getDelegationControlSummaryCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listDelegationSubscriptions operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listDelegationSubscriptionsResponseIterator( + final ListDelegationSubscriptionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListDelegationSubscriptionsRequest.Builder, ListDelegationSubscriptionsRequest, + ListDelegationSubscriptionsResponse>( + new java.util.function.Supplier() { + @Override + public ListDelegationSubscriptionsRequest.Builder get() { + return ListDelegationSubscriptionsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListDelegationSubscriptionsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDelegationSubscriptionsRequest.Builder>, + ListDelegationSubscriptionsRequest>() { + @Override + public ListDelegationSubscriptionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDelegationSubscriptionsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListDelegationSubscriptionsRequest, ListDelegationSubscriptionsResponse>() { + @Override + public ListDelegationSubscriptionsResponse apply( + ListDelegationSubscriptionsRequest request) { + return client.listDelegationSubscriptions(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscriptionSummary} objects + * contained in responses from the listDelegationSubscriptions operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscriptionSummary} objects + * contained in responses received from the service. + */ + public Iterable + listDelegationSubscriptionsRecordIterator( + final ListDelegationSubscriptionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListDelegationSubscriptionsRequest.Builder, ListDelegationSubscriptionsRequest, + ListDelegationSubscriptionsResponse, + com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscriptionSummary>( + new java.util.function.Supplier() { + @Override + public ListDelegationSubscriptionsRequest.Builder get() { + return ListDelegationSubscriptionsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListDelegationSubscriptionsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDelegationSubscriptionsRequest.Builder>, + ListDelegationSubscriptionsRequest>() { + @Override + public ListDelegationSubscriptionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDelegationSubscriptionsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListDelegationSubscriptionsRequest, ListDelegationSubscriptionsResponse>() { + @Override + public ListDelegationSubscriptionsResponse apply( + ListDelegationSubscriptionsRequest request) { + return client.listDelegationSubscriptions(request); + } + }, + new java.util.function.Function< + ListDelegationSubscriptionsResponse, + java.util.List< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationSubscriptionSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationSubscriptionSummary> + apply(ListDelegationSubscriptionsResponse response) { + return response.getDelegationSubscriptionSummaryCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listServiceProviderActions operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listServiceProviderActionsResponseIterator( + final ListServiceProviderActionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListServiceProviderActionsRequest.Builder, ListServiceProviderActionsRequest, + ListServiceProviderActionsResponse>( + new java.util.function.Supplier() { + @Override + public ListServiceProviderActionsRequest.Builder get() { + return ListServiceProviderActionsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListServiceProviderActionsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListServiceProviderActionsRequest.Builder>, + ListServiceProviderActionsRequest>() { + @Override + public ListServiceProviderActionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListServiceProviderActionsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListServiceProviderActionsRequest, ListServiceProviderActionsResponse>() { + @Override + public ListServiceProviderActionsResponse apply( + ListServiceProviderActionsRequest request) { + return client.listServiceProviderActions(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderActionSummary} objects + * contained in responses from the listServiceProviderActions operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderActionSummary} objects + * contained in responses received from the service. + */ + public Iterable + listServiceProviderActionsRecordIterator( + final ListServiceProviderActionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListServiceProviderActionsRequest.Builder, ListServiceProviderActionsRequest, + ListServiceProviderActionsResponse, + com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderActionSummary>( + new java.util.function.Supplier() { + @Override + public ListServiceProviderActionsRequest.Builder get() { + return ListServiceProviderActionsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListServiceProviderActionsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListServiceProviderActionsRequest.Builder>, + ListServiceProviderActionsRequest>() { + @Override + public ListServiceProviderActionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListServiceProviderActionsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListServiceProviderActionsRequest, ListServiceProviderActionsResponse>() { + @Override + public ListServiceProviderActionsResponse apply( + ListServiceProviderActionsRequest request) { + return client.listServiceProviderActions(request); + } + }, + new java.util.function.Function< + ListServiceProviderActionsResponse, + java.util.List< + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderActionSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderActionSummary> + apply(ListServiceProviderActionsResponse response) { + return response.getServiceProviderActionSummaryCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listServiceProviderInteractions operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listServiceProviderInteractionsResponseIterator( + final ListServiceProviderInteractionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListServiceProviderInteractionsRequest.Builder, + ListServiceProviderInteractionsRequest, ListServiceProviderInteractionsResponse>( + new java.util.function.Supplier() { + @Override + public ListServiceProviderInteractionsRequest.Builder get() { + return ListServiceProviderInteractionsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListServiceProviderInteractionsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListServiceProviderInteractionsRequest.Builder>, + ListServiceProviderInteractionsRequest>() { + @Override + public ListServiceProviderInteractionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListServiceProviderInteractionsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListServiceProviderInteractionsRequest, + ListServiceProviderInteractionsResponse>() { + @Override + public ListServiceProviderInteractionsResponse apply( + ListServiceProviderInteractionsRequest request) { + return client.listServiceProviderInteractions(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderInteractionSummary} objects + * contained in responses from the listServiceProviderInteractions operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderInteractionSummary} objects + * contained in responses received from the service. + */ + public Iterable + listServiceProviderInteractionsRecordIterator( + final ListServiceProviderInteractionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListServiceProviderInteractionsRequest.Builder, + ListServiceProviderInteractionsRequest, ListServiceProviderInteractionsResponse, + com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderInteractionSummary>( + new java.util.function.Supplier() { + @Override + public ListServiceProviderInteractionsRequest.Builder get() { + return ListServiceProviderInteractionsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListServiceProviderInteractionsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListServiceProviderInteractionsRequest.Builder>, + ListServiceProviderInteractionsRequest>() { + @Override + public ListServiceProviderInteractionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListServiceProviderInteractionsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListServiceProviderInteractionsRequest, + ListServiceProviderInteractionsResponse>() { + @Override + public ListServiceProviderInteractionsResponse apply( + ListServiceProviderInteractionsRequest request) { + return client.listServiceProviderInteractions(request); + } + }, + new java.util.function.Function< + ListServiceProviderInteractionsResponse, + java.util.List< + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderInteractionSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderInteractionSummary> + apply(ListServiceProviderInteractionsResponse response) { + return response.getServiceProviderInteractionCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listServiceProviders operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listServiceProvidersResponseIterator( + final ListServiceProvidersRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListServiceProvidersRequest.Builder, ListServiceProvidersRequest, + ListServiceProvidersResponse>( + new java.util.function.Supplier() { + @Override + public ListServiceProvidersRequest.Builder get() { + return ListServiceProvidersRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListServiceProvidersResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListServiceProvidersRequest.Builder>, + ListServiceProvidersRequest>() { + @Override + public ListServiceProvidersRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListServiceProvidersRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListServiceProvidersRequest, ListServiceProvidersResponse>() { + @Override + public ListServiceProvidersResponse apply(ListServiceProvidersRequest request) { + return client.listServiceProviders(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderSummary} objects + * contained in responses from the listServiceProviders operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderSummary} objects + * contained in responses received from the service. + */ + public Iterable + listServiceProvidersRecordIterator(final ListServiceProvidersRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListServiceProvidersRequest.Builder, ListServiceProvidersRequest, + ListServiceProvidersResponse, + com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderSummary>( + new java.util.function.Supplier() { + @Override + public ListServiceProvidersRequest.Builder get() { + return ListServiceProvidersRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListServiceProvidersResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListServiceProvidersRequest.Builder>, + ListServiceProvidersRequest>() { + @Override + public ListServiceProvidersRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListServiceProvidersRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListServiceProvidersRequest, ListServiceProvidersResponse>() { + @Override + public ListServiceProvidersResponse apply(ListServiceProvidersRequest request) { + return client.listServiceProviders(request); + } + }, + new java.util.function.Function< + ListServiceProvidersResponse, + java.util.List< + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderSummary> + apply(ListServiceProvidersResponse response) { + return response.getServiceProviderSummaryCollection().getItems(); + } + }); + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/DelegateAccessControlWaiters.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/DelegateAccessControlWaiters.java new file mode 100644 index 00000000000..3af08039f86 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/DelegateAccessControlWaiters.java @@ -0,0 +1,604 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol; + +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of DelegateAccessControl. + *

+ * The default configuration used is defined by {@link com.oracle.bmc.waiter.Waiters.Waiters#DEFAULT_POLLING_WAITER}. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class DelegateAccessControlWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final DelegateAccessControl client; + + public DelegateAccessControlWaiters( + java.util.concurrent.ExecutorService executorService, DelegateAccessControl client) { + this.executorService = executorService; + this.client = client; + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetDelegatedResourceAccessRequestRequest, + GetDelegatedResourceAccessRequestResponse> + forDelegatedResourceAccessRequest( + GetDelegatedResourceAccessRequestRequest request, + com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequest + .LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forDelegatedResourceAccessRequest( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetDelegatedResourceAccessRequestRequest, + GetDelegatedResourceAccessRequestResponse> + forDelegatedResourceAccessRequest( + GetDelegatedResourceAccessRequestRequest request, + com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequest + .LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forDelegatedResourceAccessRequest( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetDelegatedResourceAccessRequestRequest, + GetDelegatedResourceAccessRequestResponse> + forDelegatedResourceAccessRequest( + GetDelegatedResourceAccessRequestRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequest + .LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forDelegatedResourceAccessRequest( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for DelegatedResourceAccessRequest. + private com.oracle.bmc.waiter.Waiter< + GetDelegatedResourceAccessRequestRequest, + GetDelegatedResourceAccessRequestResponse> + forDelegatedResourceAccessRequest( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetDelegatedResourceAccessRequestRequest request, + final com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequest + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequest + .LifecycleState> + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetDelegatedResourceAccessRequestRequest, + GetDelegatedResourceAccessRequestResponse>() { + @Override + public GetDelegatedResourceAccessRequestResponse apply( + GetDelegatedResourceAccessRequestRequest request) { + return client.getDelegatedResourceAccessRequest(request); + } + }, + new java.util.function.Predicate< + GetDelegatedResourceAccessRequestResponse>() { + @Override + public boolean test( + GetDelegatedResourceAccessRequestResponse response) { + return targetStatesSet.contains( + response.getDelegatedResourceAccessRequest() + .getLifecycleState()); + } + }, + false), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forDelegationControl( + GetDelegationControlRequest request, + com.oracle.bmc.delegateaccesscontrol.model.DelegationControl.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forDelegationControl( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forDelegationControl( + GetDelegationControlRequest request, + com.oracle.bmc.delegateaccesscontrol.model.DelegationControl.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forDelegationControl( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forDelegationControl( + GetDelegationControlRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.delegateaccesscontrol.model.DelegationControl.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forDelegationControl( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for DelegationControl. + private com.oracle.bmc.waiter.Waiter + forDelegationControl( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetDelegationControlRequest request, + final com.oracle.bmc.delegateaccesscontrol.model.DelegationControl + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.delegateaccesscontrol.model.DelegationControl.LifecycleState> + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetDelegationControlRequest, GetDelegationControlResponse>() { + @Override + public GetDelegationControlResponse apply( + GetDelegationControlRequest request) { + return client.getDelegationControl(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetDelegationControlResponse response) { + return targetStatesSet.contains( + response.getDelegationControl().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.delegateaccesscontrol.model.DelegationControl + .LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetDelegationSubscriptionRequest, GetDelegationSubscriptionResponse> + forDelegationSubscription( + GetDelegationSubscriptionRequest request, + com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription + .LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forDelegationSubscription( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetDelegationSubscriptionRequest, GetDelegationSubscriptionResponse> + forDelegationSubscription( + GetDelegationSubscriptionRequest request, + com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forDelegationSubscription( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetDelegationSubscriptionRequest, GetDelegationSubscriptionResponse> + forDelegationSubscription( + GetDelegationSubscriptionRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription + .LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forDelegationSubscription( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for DelegationSubscription. + private com.oracle.bmc.waiter.Waiter< + GetDelegationSubscriptionRequest, GetDelegationSubscriptionResponse> + forDelegationSubscription( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetDelegationSubscriptionRequest request, + final com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription + .LifecycleState> + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetDelegationSubscriptionRequest, + GetDelegationSubscriptionResponse>() { + @Override + public GetDelegationSubscriptionResponse apply( + GetDelegationSubscriptionRequest request) { + return client.getDelegationSubscription(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetDelegationSubscriptionResponse response) { + return targetStatesSet.contains( + response.getDelegationSubscription().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription + .LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forServiceProvider( + GetServiceProviderRequest request, + com.oracle.bmc.delegateaccesscontrol.model.ServiceProvider.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forServiceProvider( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forServiceProvider( + GetServiceProviderRequest request, + com.oracle.bmc.delegateaccesscontrol.model.ServiceProvider.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forServiceProvider( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forServiceProvider( + GetServiceProviderRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.delegateaccesscontrol.model.ServiceProvider.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forServiceProvider( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for ServiceProvider. + private com.oracle.bmc.waiter.Waiter + forServiceProvider( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetServiceProviderRequest request, + final com.oracle.bmc.delegateaccesscontrol.model.ServiceProvider + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.delegateaccesscontrol.model.ServiceProvider.LifecycleState> + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetServiceProviderRequest, GetServiceProviderResponse>() { + @Override + public GetServiceProviderResponse apply( + GetServiceProviderRequest request) { + return client.getServiceProvider(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetServiceProviderResponse response) { + return targetStatesSet.contains( + response.getServiceProvider().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.delegateaccesscontrol.model.ServiceProvider + .LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetServiceProviderActionRequest, GetServiceProviderActionResponse> + forServiceProviderAction( + GetServiceProviderActionRequest request, + com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderAction + .LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forServiceProviderAction( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetServiceProviderActionRequest, GetServiceProviderActionResponse> + forServiceProviderAction( + GetServiceProviderActionRequest request, + com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderAction.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forServiceProviderAction( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetServiceProviderActionRequest, GetServiceProviderActionResponse> + forServiceProviderAction( + GetServiceProviderActionRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderAction + .LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forServiceProviderAction( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for ServiceProviderAction. + private com.oracle.bmc.waiter.Waiter< + GetServiceProviderActionRequest, GetServiceProviderActionResponse> + forServiceProviderAction( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetServiceProviderActionRequest request, + final com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderAction + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderAction + .LifecycleState> + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetServiceProviderActionRequest, + GetServiceProviderActionResponse>() { + @Override + public GetServiceProviderActionResponse apply( + GetServiceProviderActionRequest request) { + return client.getServiceProviderAction(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetServiceProviderActionResponse response) { + return targetStatesSet.contains( + response.getServiceProviderAction().getLifecycleState()); + } + }, + false), + request); + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/SdkClientsMetadata.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/SdkClientsMetadata.java new file mode 100644 index 00000000000..8c3576dadb7 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/SdkClientsMetadata.java @@ -0,0 +1,16 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol; + +import com.oracle.bmc.SdkClients; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@SdkClients({ + DelegateAccessControlAsyncClient.class, + DelegateAccessControlClient.class, + WorkRequestAsyncClient.class, + WorkRequestClient.class +}) +public final class SdkClientsMetadata {} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/WorkRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/WorkRequest.java new file mode 100644 index 00000000000..8b3934195f5 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/WorkRequest.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol; + +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; + +/** + * Oracle Delegate Access Control allows ExaCC and ExaCS customers to delegate management of their Exadata resources operators outside their tenancies. + * With Delegate Access Control, Support Providers can deliver managed services using comprehensive and robust tooling built on the OCI platform. + * Customers maintain control over who has access to the delegated resources in their tenancy and what actions can be taken. + * Enterprises managing resources across multiple tenants can use Delegate Access Control to streamline management tasks. + * Using logging service, customers can view a near real-time audit report of all actions performed by a Service Provider operator. + * + * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public interface WorkRequest extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the service. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this Region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Gets details of the work request with the given ID. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetWorkRequest API. + */ + GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request); + + /** + * Returns a (paginated) list of errors for the work request with the given ID. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListWorkRequestErrors API. + */ + ListWorkRequestErrorsResponse listWorkRequestErrors(ListWorkRequestErrorsRequest request); + + /** + * Returns a (paginated) list of logs for the work request with the given ID. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListWorkRequestLogs API. + */ + ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsRequest request); + + /** + * Lists the work requests in a compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListWorkRequests API. + */ + ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + WorkRequestWaiters getWaiters(); + + /** + * Gets the pre-configured paginators available for list operations in this service which may return multiple + * pages of data. These paginators provide an {@link java.lang.Iterable} interface so that service responses, or + * resources/records, can be iterated through without having to manually deal with pagination and page tokens. + * + * @return The service paginators. + */ + WorkRequestPaginators getPaginators(); +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/WorkRequestAsync.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/WorkRequestAsync.java new file mode 100644 index 00000000000..12116ada561 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/WorkRequestAsync.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol; + +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; + +/** + * Oracle Delegate Access Control allows ExaCC and ExaCS customers to delegate management of their Exadata resources operators outside their tenancies. + * With Delegate Access Control, Support Providers can deliver managed services using comprehensive and robust tooling built on the OCI platform. + * Customers maintain control over who has access to the delegated resources in their tenancy and what actions can be taken. + * Enterprises managing resources across multiple tenants can use Delegate Access Control to streamline management tasks. + * Using logging service, customers can view a near real-time audit report of all actions performed by a Service Provider operator. + * + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public interface WorkRequestAsync extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the serice. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Gets details of the work request with the given ID. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getWorkRequest( + GetWorkRequestRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Returns a (paginated) list of errors for the work request with the given ID. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listWorkRequestErrors( + ListWorkRequestErrorsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + handler); + + /** + * Returns a (paginated) list of logs for the work request with the given ID. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listWorkRequestLogs( + ListWorkRequestLogsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + handler); + + /** + * Lists the work requests in a compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listWorkRequests( + ListWorkRequestsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/WorkRequestAsyncClient.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/WorkRequestAsyncClient.java new file mode 100644 index 00000000000..7947fd78dc4 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/WorkRequestAsyncClient.java @@ -0,0 +1,633 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol; + +import com.oracle.bmc.delegateaccesscontrol.internal.http.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; + +/** + * Async client implementation for WorkRequest service.
+ * There are two ways to use async client: + * 1. Use AsyncHandler: using AsyncHandler, if the response to the call is an {@link java.io.InputStream}, like + * getObject Api in object storage service, developers need to process the stream in AsyncHandler, and not anywhere else, + * because the stream will be closed right after the AsyncHandler is invoked.
+ * 2. Use Java Future: using Java Future, developers need to close the stream after they are done with the Java Future.
+ * Accessing the result should be done in a mutually exclusive manner, either through the Future or the AsyncHandler, + * but not both. If the Future is used, the caller should pass in null as the AsyncHandler. If the AsyncHandler + * is used, it is still safe to use the Future to determine whether or not the request was completed via + * Future.isDone/isCancelled.
+ * Please refer to https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class WorkRequestAsyncClient implements WorkRequestAsync { + /** + * Service instance for WorkRequest. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("WORKREQUEST") + .serviceEndpointPrefix("") + .serviceEndpointTemplate( + "https://delegate-access-control.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(WorkRequestAsyncClient.class); + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public WorkRequestAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public WorkRequestAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public WorkRequestAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public WorkRequestAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public WorkRequestAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public WorkRequestAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public WorkRequestAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + public WorkRequestAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.clientConfigurationToUse = configuration; + + this.refreshClient(); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder { + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public WorkRequestAsyncClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new WorkRequestAsyncClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint); + } + } + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public java.util.concurrent.Future getWorkRequest( + GetWorkRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetWorkRequestRequest, GetWorkRequestResponse> + handler) { + LOG.trace("Called async getWorkRequest"); + final GetWorkRequestRequest interceptedRequest = + GetWorkRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetWorkRequestConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "WorkRequest", "GetWorkRequest", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetWorkRequestRequest, GetWorkRequestResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetWorkRequestRequest, GetWorkRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listWorkRequestErrors( + ListWorkRequestErrorsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + handler) { + LOG.trace("Called async listWorkRequestErrors"); + final ListWorkRequestErrorsRequest interceptedRequest = + ListWorkRequestErrorsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestErrorsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "WorkRequest", "ListWorkRequestErrors", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + ListWorkRequestErrorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listWorkRequestLogs( + ListWorkRequestLogsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + handler) { + LOG.trace("Called async listWorkRequestLogs"); + final ListWorkRequestLogsRequest interceptedRequest = + ListWorkRequestLogsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestLogsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "WorkRequest", "ListWorkRequestLogs", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + ListWorkRequestLogsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listWorkRequests( + ListWorkRequestsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestsRequest, ListWorkRequestsResponse> + handler) { + LOG.trace("Called async listWorkRequests"); + final ListWorkRequestsRequest interceptedRequest = + ListWorkRequestsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "WorkRequest", "ListWorkRequests", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + ListWorkRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestsRequest, ListWorkRequestsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListWorkRequestsRequest, ListWorkRequestsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/WorkRequestClient.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/WorkRequestClient.java new file mode 100644 index 00000000000..f03e0ce41d1 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/WorkRequestClient.java @@ -0,0 +1,695 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol; + +import com.oracle.bmc.delegateaccesscontrol.internal.http.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration; +import com.oracle.bmc.util.CircuitBreakerUtils; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class WorkRequestClient implements WorkRequest { + /** + * Service instance for WorkRequest. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("WORKREQUEST") + .serviceEndpointPrefix("") + .serviceEndpointTemplate( + "https://delegate-access-control.{region}.oci.{secondLevelDomain}") + .build(); + // attempt twice if it's instance principals, immediately failures will try to refresh the token + private static final int MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS = 2; + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(WorkRequestClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final WorkRequestWaiters waiters; + + private final WorkRequestPaginators paginators; + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + circuitBreakerConfiguration; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public WorkRequestClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public WorkRequestClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public WorkRequestClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public WorkRequestClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public WorkRequestClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public WorkRequestClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public WorkRequestClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + */ + public WorkRequestClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * Use the {@link Builder} to get access to all these parameters. + * + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + protected WorkRequestClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + this.restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + + this.clientConfigurationToUse = + (configuration != null) + ? configuration + : com.oracle.bmc.ClientConfiguration.builder().build(); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.retryConfiguration = clientConfigurationToUse.getRetryConfiguration(); + final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + userCircuitBreakerConfiguration = + CircuitBreakerUtils.getUserDefinedCircuitBreakerConfiguration( + configuration); + if (userCircuitBreakerConfiguration == null) { + this.circuitBreakerConfiguration = + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION; + } else { + this.circuitBreakerConfiguration = userCircuitBreakerConfiguration; + } + + this.refreshClient(); + + if (executorService == null) { + // up to 50 (core) threads, time out after 60s idle, all daemon + java.util.concurrent.ThreadPoolExecutor threadPoolExecutor = + new java.util.concurrent.ThreadPoolExecutor( + 50, + 50, + 60L, + java.util.concurrent.TimeUnit.SECONDS, + new java.util.concurrent.LinkedBlockingQueue(), + com.oracle.bmc.internal.ClientThreadFactory.builder() + .isDaemon(true) + .nameFormat("WorkRequest-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new WorkRequestWaiters(executorService, this); + + this.paginators = new WorkRequestPaginators(this); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder { + private java.util.concurrent.ExecutorService executorService; + + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Set the ExecutorService for the client to be created. + * @param executorService executorService + * @return this builder + */ + public Builder executorService(java.util.concurrent.ExecutorService executorService) { + this.executorService = executorService; + return this; + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public WorkRequestClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new WorkRequestClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + restClientFactoryBuilder); + } + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, this.authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient, + null, + this.circuitBreakerConfiguration); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) { + LOG.trace("Called getWorkRequest"); + final GetWorkRequestRequest interceptedRequest = + GetWorkRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetWorkRequestConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "WorkRequest", "GetWorkRequest", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListWorkRequestErrorsResponse listWorkRequestErrors( + ListWorkRequestErrorsRequest request) { + LOG.trace("Called listWorkRequestErrors"); + final ListWorkRequestErrorsRequest interceptedRequest = + ListWorkRequestErrorsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestErrorsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "WorkRequest", "ListWorkRequestErrors", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + ListWorkRequestErrorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsRequest request) { + LOG.trace("Called listWorkRequestLogs"); + final ListWorkRequestLogsRequest interceptedRequest = + ListWorkRequestLogsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestLogsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "WorkRequest", "ListWorkRequestLogs", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + ListWorkRequestLogsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request) { + LOG.trace("Called listWorkRequests"); + final ListWorkRequestsRequest interceptedRequest = + ListWorkRequestsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "WorkRequest", "ListWorkRequests", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + ListWorkRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public WorkRequestWaiters getWaiters() { + return waiters; + } + + @Override + public WorkRequestPaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/WorkRequestPaginators.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/WorkRequestPaginators.java new file mode 100644 index 00000000000..191144fddc7 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/WorkRequestPaginators.java @@ -0,0 +1,383 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol; + +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of WorkRequest where multiple pages of data may be fetched. + * Two styles of iteration are supported: + * + *

    + *
  • Iterating over the Response objects returned by the list operation. These are referred to as ResponseIterators, and the methods are suffixed with ResponseIterator. For example: listUsersResponseIterator
  • + *
  • Iterating over the resources/records being listed. These are referred to as RecordIterators, and the methods are suffixed with RecordIterator. For example: listUsersRecordIterator
  • + *
+ * + * These iterables abstract away the need to write code to manually handle pagination via looping and using the page tokens. + * They will automatically fetch more data from the service when required. + * + * As an example, if we were using the ListUsers operation in IdentityService, then the {@link java.lang.Iterable} returned by calling a + * ResponseIterator method would iterate over the ListUsersResponse objects returned by each ListUsers call, whereas the {@link java.lang.Iterable} + * returned by calling a RecordIterator method would iterate over the User records and we don't have to deal with ListUsersResponse objects at all. + * In either case, pagination will be automatically handled so we can iterate until there are no more responses or no more resources/records available. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class WorkRequestPaginators { + private final WorkRequest client; + + public WorkRequestPaginators(WorkRequest client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listWorkRequestErrors operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listWorkRequestErrorsResponseIterator( + final ListWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListWorkRequestErrorsRequest.Builder, ListWorkRequestErrorsRequest, + ListWorkRequestErrorsResponse>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestErrorsRequest.Builder get() { + return ListWorkRequestErrorsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.Builder>, + ListWorkRequestErrorsRequest>() { + @Override + public ListWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>() { + @Override + public ListWorkRequestErrorsResponse apply( + ListWorkRequestErrorsRequest request) { + return client.listWorkRequestErrors(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.WorkRequestError} objects + * contained in responses from the listWorkRequestErrors operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.WorkRequestError} objects + * contained in responses received from the service. + */ + public Iterable + listWorkRequestErrorsRecordIterator(final ListWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListWorkRequestErrorsRequest.Builder, ListWorkRequestErrorsRequest, + ListWorkRequestErrorsResponse, + com.oracle.bmc.delegateaccesscontrol.model.WorkRequestError>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestErrorsRequest.Builder get() { + return ListWorkRequestErrorsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.Builder>, + ListWorkRequestErrorsRequest>() { + @Override + public ListWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>() { + @Override + public ListWorkRequestErrorsResponse apply( + ListWorkRequestErrorsRequest request) { + return client.listWorkRequestErrors(request); + } + }, + new java.util.function.Function< + ListWorkRequestErrorsResponse, + java.util.List< + com.oracle.bmc.delegateaccesscontrol.model.WorkRequestError>>() { + @Override + public java.util.List< + com.oracle.bmc.delegateaccesscontrol.model.WorkRequestError> + apply(ListWorkRequestErrorsResponse response) { + return response.getWorkRequestErrorCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listWorkRequestLogs operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listWorkRequestLogsResponseIterator( + final ListWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListWorkRequestLogsRequest.Builder, ListWorkRequestLogsRequest, + ListWorkRequestLogsResponse>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestLogsRequest.Builder get() { + return ListWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.Builder>, + ListWorkRequestLogsRequest>() { + @Override + public ListWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>() { + @Override + public ListWorkRequestLogsResponse apply(ListWorkRequestLogsRequest request) { + return client.listWorkRequestLogs(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.WorkRequestLogEntry} objects + * contained in responses from the listWorkRequestLogs operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.WorkRequestLogEntry} objects + * contained in responses received from the service. + */ + public Iterable + listWorkRequestLogsRecordIterator(final ListWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListWorkRequestLogsRequest.Builder, ListWorkRequestLogsRequest, + ListWorkRequestLogsResponse, + com.oracle.bmc.delegateaccesscontrol.model.WorkRequestLogEntry>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestLogsRequest.Builder get() { + return ListWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.Builder>, + ListWorkRequestLogsRequest>() { + @Override + public ListWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>() { + @Override + public ListWorkRequestLogsResponse apply(ListWorkRequestLogsRequest request) { + return client.listWorkRequestLogs(request); + } + }, + new java.util.function.Function< + ListWorkRequestLogsResponse, + java.util.List< + com.oracle.bmc.delegateaccesscontrol.model.WorkRequestLogEntry>>() { + @Override + public java.util.List< + com.oracle.bmc.delegateaccesscontrol.model.WorkRequestLogEntry> + apply(ListWorkRequestLogsResponse response) { + return response.getWorkRequestLogEntryCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listWorkRequests operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listWorkRequestsResponseIterator( + final ListWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListWorkRequestsRequest.Builder, ListWorkRequestsRequest, ListWorkRequestsResponse>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestsRequest.Builder get() { + return ListWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.Builder>, + ListWorkRequestsRequest>() { + @Override + public ListWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListWorkRequestsRequest, ListWorkRequestsResponse>() { + @Override + public ListWorkRequestsResponse apply(ListWorkRequestsRequest request) { + return client.listWorkRequests(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.WorkRequestSummary} objects + * contained in responses from the listWorkRequests operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.delegateaccesscontrol.model.WorkRequestSummary} objects + * contained in responses received from the service. + */ + public Iterable + listWorkRequestsRecordIterator(final ListWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListWorkRequestsRequest.Builder, ListWorkRequestsRequest, ListWorkRequestsResponse, + com.oracle.bmc.delegateaccesscontrol.model.WorkRequestSummary>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestsRequest.Builder get() { + return ListWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.Builder>, + ListWorkRequestsRequest>() { + @Override + public ListWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListWorkRequestsRequest, ListWorkRequestsResponse>() { + @Override + public ListWorkRequestsResponse apply(ListWorkRequestsRequest request) { + return client.listWorkRequests(request); + } + }, + new java.util.function.Function< + ListWorkRequestsResponse, + java.util.List< + com.oracle.bmc.delegateaccesscontrol.model.WorkRequestSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.delegateaccesscontrol.model.WorkRequestSummary> + apply(ListWorkRequestsResponse response) { + return response.getWorkRequestSummaryCollection().getItems(); + } + }); + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/WorkRequestWaiters.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/WorkRequestWaiters.java new file mode 100644 index 00000000000..cc6185ca2f7 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/WorkRequestWaiters.java @@ -0,0 +1,82 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol; + +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of WorkRequest. + *

+ * The default configuration used is defined by {@link com.oracle.bmc.waiter.Waiters.Waiters#DEFAULT_POLLING_WAITER}. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class WorkRequestWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final WorkRequest client; + + public WorkRequestWaiters( + java.util.concurrent.ExecutorService executorService, WorkRequest client) { + this.executorService = executorService; + this.client = client; + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using default configuration. + * + * @param request the request to send + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forWorkRequest(GetWorkRequestRequest request) { + return forWorkRequest(com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@linkcom.oracle.bmc.waiter. DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forWorkRequest( + GetWorkRequestRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + return forWorkRequest( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request); + } + + // Helper method to create a new Waiter for WorkRequest. + private com.oracle.bmc.waiter.Waiter + forWorkRequest( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetWorkRequestRequest request) { + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetWorkRequestRequest, GetWorkRequestResponse>() { + @Override + public GetWorkRequestResponse apply(GetWorkRequestRequest request) { + return client.getWorkRequest(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetWorkRequestResponse response) { + // work requests are complete once the time finished is available + return response.getWorkRequest().getTimeFinished() != null; + } + }, + false), + request); + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ApproveDelegatedResourceAccessRequestConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ApproveDelegatedResourceAccessRequestConverter.java new file mode 100644 index 00000000000..99efe1d3d30 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ApproveDelegatedResourceAccessRequestConverter.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ApproveDelegatedResourceAccessRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ApproveDelegatedResourceAccessRequestConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests + .ApproveDelegatedResourceAccessRequestRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests + .ApproveDelegatedResourceAccessRequestRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests + .ApproveDelegatedResourceAccessRequestRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDelegatedResourceAccessRequestId(), + "delegatedResourceAccessRequestId must not be blank"); + Validate.notNull( + request.getApproveDelegatedResourceAccessRequestDetails(), + "approveDelegatedResourceAccessRequestDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("delegatedResourceAccessRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDelegatedResourceAccessRequestId())) + .path("actions") + .path("approve"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ApproveDelegatedResourceAccessRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ApproveDelegatedResourceAccessRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ApproveDelegatedResourceAccessRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ApproveDelegatedResourceAccessRequestResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .ApproveDelegatedResourceAccessRequestResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.ApproveDelegatedResourceAccessRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .ApproveDelegatedResourceAccessRequestResponse + .Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .ApproveDelegatedResourceAccessRequestResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .ApproveDelegatedResourceAccessRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ChangeDelegationControlCompartmentConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ChangeDelegationControlCompartmentConverter.java new file mode 100644 index 00000000000..6c3d92446ec --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ChangeDelegationControlCompartmentConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ChangeDelegationControlCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ChangeDelegationControlCompartmentConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests + .ChangeDelegationControlCompartmentRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests + .ChangeDelegationControlCompartmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.ChangeDelegationControlCompartmentRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDelegationControlId(), "delegationControlId must not be blank"); + Validate.notNull( + request.getChangeDelegationControlCompartmentDetails(), + "changeDelegationControlCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("delegationControls") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDelegationControlId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ChangeDelegationControlCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ChangeDelegationControlCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ChangeDelegationControlCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ChangeDelegationControlCompartmentResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .ChangeDelegationControlCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.ChangeDelegationControlCompartmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .ChangeDelegationControlCompartmentResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .ChangeDelegationControlCompartmentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .ChangeDelegationControlCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ChangeDelegationSubscriptionCompartmentConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ChangeDelegationSubscriptionCompartmentConverter.java new file mode 100644 index 00000000000..3480d826710 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ChangeDelegationSubscriptionCompartmentConverter.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ChangeDelegationSubscriptionCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ChangeDelegationSubscriptionCompartmentConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests + .ChangeDelegationSubscriptionCompartmentRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests + .ChangeDelegationSubscriptionCompartmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests + .ChangeDelegationSubscriptionCompartmentRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDelegationSubscriptionId(), + "delegationSubscriptionId must not be blank"); + Validate.notNull( + request.getChangeDelegationSubscriptionCompartmentDetails(), + "changeDelegationSubscriptionCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("delegationSubscriptions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDelegationSubscriptionId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ChangeDelegationSubscriptionCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ChangeDelegationSubscriptionCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ChangeDelegationSubscriptionCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ChangeDelegationSubscriptionCompartmentResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .ChangeDelegationSubscriptionCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.ChangeDelegationSubscriptionCompartmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .ChangeDelegationSubscriptionCompartmentResponse + .Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .ChangeDelegationSubscriptionCompartmentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .ChangeDelegationSubscriptionCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/CreateDelegationControlConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/CreateDelegationControlConverter.java new file mode 100644 index 00000000000..e86a9fbbae1 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/CreateDelegationControlConverter.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class CreateDelegationControlConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateDelegationControlConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests.CreateDelegationControlRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests.CreateDelegationControlRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.CreateDelegationControlRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateDelegationControlDetails(), + "createDelegationControlDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230801").path("delegationControls"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.CreateDelegationControlResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.CreateDelegationControlResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .CreateDelegationControlResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .CreateDelegationControlResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .CreateDelegationControlResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.CreateDelegationControlResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControl>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControl + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControl + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControl> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .CreateDelegationControlResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .CreateDelegationControlResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.delegationControl(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .CreateDelegationControlResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/CreateDelegationSubscriptionConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/CreateDelegationSubscriptionConverter.java new file mode 100644 index 00000000000..a9a3a740c3a --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/CreateDelegationSubscriptionConverter.java @@ -0,0 +1,191 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class CreateDelegationSubscriptionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateDelegationSubscriptionConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests.CreateDelegationSubscriptionRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests + .CreateDelegationSubscriptionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.CreateDelegationSubscriptionRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateDelegationSubscriptionDetails(), + "createDelegationSubscriptionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230801").path("delegationSubscriptions"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .CreateDelegationSubscriptionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .CreateDelegationSubscriptionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .CreateDelegationSubscriptionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .CreateDelegationSubscriptionResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .CreateDelegationSubscriptionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.CreateDelegationSubscriptionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationSubscription>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegationSubscription + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegationSubscription + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationSubscription> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .CreateDelegationSubscriptionResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .CreateDelegationSubscriptionResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.delegationSubscription(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .CreateDelegationSubscriptionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/DeleteDelegationControlConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/DeleteDelegationControlConverter.java new file mode 100644 index 00000000000..818e8719a87 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/DeleteDelegationControlConverter.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class DeleteDelegationControlConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteDelegationControlConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests.DeleteDelegationControlRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests.DeleteDelegationControlRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.DeleteDelegationControlRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDelegationControlId(), "delegationControlId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("delegationControls") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDelegationControlId())); + + if (request.getDescription() != null) { + target = + target.queryParam( + "description", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDescription())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.DeleteDelegationControlResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.DeleteDelegationControlResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .DeleteDelegationControlResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .DeleteDelegationControlResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .DeleteDelegationControlResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.DeleteDelegationControlResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .DeleteDelegationControlResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .DeleteDelegationControlResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .DeleteDelegationControlResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/DeleteDelegationSubscriptionConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/DeleteDelegationSubscriptionConverter.java new file mode 100644 index 00000000000..5ee55ea4517 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/DeleteDelegationSubscriptionConverter.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class DeleteDelegationSubscriptionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteDelegationSubscriptionConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests.DeleteDelegationSubscriptionRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests + .DeleteDelegationSubscriptionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.DeleteDelegationSubscriptionRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDelegationSubscriptionId(), + "delegationSubscriptionId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("delegationSubscriptions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDelegationSubscriptionId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .DeleteDelegationSubscriptionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .DeleteDelegationSubscriptionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .DeleteDelegationSubscriptionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .DeleteDelegationSubscriptionResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .DeleteDelegationSubscriptionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.DeleteDelegationSubscriptionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .DeleteDelegationSubscriptionResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .DeleteDelegationSubscriptionResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .DeleteDelegationSubscriptionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetDelegatedResourceAccessRequestAuditLogReportConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetDelegatedResourceAccessRequestAuditLogReportConverter.java new file mode 100644 index 00000000000..1b579b5fdfb --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetDelegatedResourceAccessRequestAuditLogReportConverter.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetDelegatedResourceAccessRequestAuditLogReportConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + GetDelegatedResourceAccessRequestAuditLogReportConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests + .GetDelegatedResourceAccessRequestAuditLogReportRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests + .GetDelegatedResourceAccessRequestAuditLogReportRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests + .GetDelegatedResourceAccessRequestAuditLogReportRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDelegatedResourceAccessRequestId(), + "delegatedResourceAccessRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("delegatedResourceAccessRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDelegatedResourceAccessRequestId())) + .path("delegatedResourceAccessRequestAuditLogReport"); + + if (request.getIsProcessTreeEnabled() != null) { + target = + target.queryParam( + "isProcessTreeEnabled", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsProcessTreeEnabled())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegatedResourceAccessRequestAuditLogReportResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegatedResourceAccessRequestAuditLogReportResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegatedResourceAccessRequestAuditLogReportResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegatedResourceAccessRequestAuditLogReportResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegatedResourceAccessRequestAuditLogReportResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.GetDelegatedResourceAccessRequestAuditLogReportResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestAuditLogReport>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestAuditLogReport + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestAuditLogReport + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestAuditLogReport> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegatedResourceAccessRequestAuditLogReportResponse + .Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegatedResourceAccessRequestAuditLogReportResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.delegatedResourceAccessRequestAuditLogReport( + response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegatedResourceAccessRequestAuditLogReportResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetDelegatedResourceAccessRequestConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetDelegatedResourceAccessRequestConverter.java new file mode 100644 index 00000000000..ac8fa40c892 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetDelegatedResourceAccessRequestConverter.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetDelegatedResourceAccessRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetDelegatedResourceAccessRequestConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests + .GetDelegatedResourceAccessRequestRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests + .GetDelegatedResourceAccessRequestRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.GetDelegatedResourceAccessRequestRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDelegatedResourceAccessRequestId(), + "delegatedResourceAccessRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("delegatedResourceAccessRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDelegatedResourceAccessRequestId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegatedResourceAccessRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegatedResourceAccessRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegatedResourceAccessRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegatedResourceAccessRequestResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegatedResourceAccessRequestResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.GetDelegatedResourceAccessRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequest>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequest + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequest + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequest> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegatedResourceAccessRequestResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegatedResourceAccessRequestResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.delegatedResourceAccessRequest(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegatedResourceAccessRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetDelegationControlConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetDelegationControlConverter.java new file mode 100644 index 00000000000..89e3a2154b4 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetDelegationControlConverter.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetDelegationControlConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetDelegationControlConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests.GetDelegationControlRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests.GetDelegationControlRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.GetDelegationControlRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDelegationControlId(), "delegationControlId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("delegationControls") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDelegationControlId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.GetDelegationControlResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.GetDelegationControlResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.GetDelegationControlResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegationControlResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegationControlResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.GetDelegationControlResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControl>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControl + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControl + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControl> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegationControlResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegationControlResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.delegationControl(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegationControlResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetDelegationSubscriptionConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetDelegationSubscriptionConverter.java new file mode 100644 index 00000000000..d77d055a932 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetDelegationSubscriptionConverter.java @@ -0,0 +1,157 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetDelegationSubscriptionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetDelegationSubscriptionConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests.GetDelegationSubscriptionRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests.GetDelegationSubscriptionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.GetDelegationSubscriptionRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDelegationSubscriptionId(), + "delegationSubscriptionId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("delegationSubscriptions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDelegationSubscriptionId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegationSubscriptionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegationSubscriptionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegationSubscriptionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegationSubscriptionResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegationSubscriptionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.GetDelegationSubscriptionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationSubscription>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegationSubscription + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegationSubscription + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationSubscription> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegationSubscriptionResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegationSubscriptionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.delegationSubscription(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .GetDelegationSubscriptionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetServiceProviderActionConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetServiceProviderActionConverter.java new file mode 100644 index 00000000000..483c30b0199 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetServiceProviderActionConverter.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetServiceProviderActionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetServiceProviderActionConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests.GetServiceProviderActionRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests.GetServiceProviderActionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.GetServiceProviderActionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getServiceProviderActionId(), "serviceProviderActionId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("serviceProviderActions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getServiceProviderActionId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.GetServiceProviderActionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.GetServiceProviderActionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .GetServiceProviderActionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .GetServiceProviderActionResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .GetServiceProviderActionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.GetServiceProviderActionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderAction>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderAction + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderAction + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderAction> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .GetServiceProviderActionResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .GetServiceProviderActionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.serviceProviderAction(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .GetServiceProviderActionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetServiceProviderConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetServiceProviderConverter.java new file mode 100644 index 00000000000..7c2ed90d9d5 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetServiceProviderConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetServiceProviderConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetServiceProviderConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests.GetServiceProviderRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests.GetServiceProviderRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.GetServiceProviderRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getServiceProviderId(), "serviceProviderId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("serviceProviders") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getServiceProviderId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.GetServiceProviderResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.GetServiceProviderResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.GetServiceProviderResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .GetServiceProviderResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .GetServiceProviderResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.GetServiceProviderResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProvider>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProvider + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProvider + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProvider> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .GetServiceProviderResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .GetServiceProviderResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.serviceProvider(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .GetServiceProviderResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetWorkRequestConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetWorkRequestConverter.java new file mode 100644 index 00000000000..e6e94b45bc4 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/GetWorkRequestConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetWorkRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetWorkRequestConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests.GetWorkRequestRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests.GetWorkRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.GetWorkRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.GetWorkRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.GetWorkRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.GetWorkRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .GetWorkRequestResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .GetWorkRequestResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.GetWorkRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .WorkRequest>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .WorkRequest + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .WorkRequest + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .WorkRequest> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .GetWorkRequestResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .GetWorkRequestResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequest(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> retryAfterHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "retry-after"); + if (retryAfterHeader.isPresent()) { + builder.retryAfter( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "retry-after", + retryAfterHeader.get().get(0), + Integer.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .GetWorkRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListDelegatedResourceAccessRequestHistoriesConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListDelegatedResourceAccessRequestHistoriesConverter.java new file mode 100644 index 00000000000..474f72aafb6 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListDelegatedResourceAccessRequestHistoriesConverter.java @@ -0,0 +1,199 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListDelegatedResourceAccessRequestHistoriesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ListDelegatedResourceAccessRequestHistoriesConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests + .ListDelegatedResourceAccessRequestHistoriesRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests + .ListDelegatedResourceAccessRequestHistoriesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests + .ListDelegatedResourceAccessRequestHistoriesRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDelegatedResourceAccessRequestId(), + "delegatedResourceAccessRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("delegatedResourceAccessRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDelegatedResourceAccessRequestId())) + .path("history"); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegatedResourceAccessRequestHistoriesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegatedResourceAccessRequestHistoriesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegatedResourceAccessRequestHistoriesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegatedResourceAccessRequestHistoriesResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegatedResourceAccessRequestHistoriesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.ListDelegatedResourceAccessRequestHistoriesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestHistoryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestHistoryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestHistoryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestHistoryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegatedResourceAccessRequestHistoriesResponse + .Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegatedResourceAccessRequestHistoriesResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.delegatedResourceAccessRequestHistoryCollection( + response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegatedResourceAccessRequestHistoriesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListDelegatedResourceAccessRequestsConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListDelegatedResourceAccessRequestsConverter.java new file mode 100644 index 00000000000..01fce7f9a9b --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListDelegatedResourceAccessRequestsConverter.java @@ -0,0 +1,242 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListDelegatedResourceAccessRequestsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListDelegatedResourceAccessRequestsConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests + .ListDelegatedResourceAccessRequestsRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests + .ListDelegatedResourceAccessRequestsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.ListDelegatedResourceAccessRequestsRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230801").path("delegatedResourceAccessRequests"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getDelegationControlId() != null) { + target = + target.queryParam( + "delegationControlId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDelegationControlId())); + } + + if (request.getResourceId() != null) { + target = + target.queryParam( + "resourceId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getRequestStatus() != null) { + target = + target.queryParam( + "requestStatus", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getRequestStatus().getValue())); + } + + if (request.getTimeStart() != null) { + target = + target.queryParam( + "timeStart", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeStart())); + } + + if (request.getTimeEnd() != null) { + target = + target.queryParam( + "timeEnd", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeEnd())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegatedResourceAccessRequestsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegatedResourceAccessRequestsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegatedResourceAccessRequestsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegatedResourceAccessRequestsResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegatedResourceAccessRequestsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.ListDelegatedResourceAccessRequestsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestSummaryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestSummaryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestSummaryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestSummaryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegatedResourceAccessRequestsResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegatedResourceAccessRequestsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.delegatedResourceAccessRequestSummaryCollection( + response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegatedResourceAccessRequestsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListDelegationControlResourcesConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListDelegationControlResourcesConverter.java new file mode 100644 index 00000000000..e0581b7b251 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListDelegationControlResourcesConverter.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListDelegationControlResourcesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListDelegationControlResourcesConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests + .ListDelegationControlResourcesRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests + .ListDelegationControlResourcesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.ListDelegationControlResourcesRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDelegationControlId(), "delegationControlId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("delegationControls") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDelegationControlId())) + .path("resources"); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationControlResourcesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationControlResourcesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationControlResourcesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationControlResourcesResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationControlResourcesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.ListDelegationControlResourcesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControlResourceCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControlResourceCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControlResourceCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControlResourceCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationControlResourcesResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationControlResourcesResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.delegationControlResourceCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationControlResourcesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListDelegationControlsConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListDelegationControlsConverter.java new file mode 100644 index 00000000000..eee1ca27227 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListDelegationControlsConverter.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListDelegationControlsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListDelegationControlsConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests.ListDelegationControlsRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests.ListDelegationControlsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.ListDelegationControlsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230801").path("delegationControls"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getResourceType() != null) { + target = + target.queryParam( + "resourceType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceType().getValue())); + } + + if (request.getResourceId() != null) { + target = + target.queryParam( + "resourceId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.ListDelegationControlsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.ListDelegationControlsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationControlsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationControlsResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationControlsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.ListDelegationControlsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControlSummaryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControlSummaryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControlSummaryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControlSummaryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationControlsResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationControlsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.delegationControlSummaryCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationControlsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListDelegationSubscriptionsConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListDelegationSubscriptionsConverter.java new file mode 100644 index 00000000000..e4a4d2115dc --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListDelegationSubscriptionsConverter.java @@ -0,0 +1,207 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListDelegationSubscriptionsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListDelegationSubscriptionsConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests.ListDelegationSubscriptionsRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests.ListDelegationSubscriptionsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.ListDelegationSubscriptionsRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230801").path("delegationSubscriptions"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationSubscriptionsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationSubscriptionsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationSubscriptionsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationSubscriptionsResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationSubscriptionsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.ListDelegationSubscriptionsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationSubscriptionSummaryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegationSubscriptionSummaryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegationSubscriptionSummaryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationSubscriptionSummaryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationSubscriptionsResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationSubscriptionsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.delegationSubscriptionSummaryCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .ListDelegationSubscriptionsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListServiceProviderActionsConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListServiceProviderActionsConverter.java new file mode 100644 index 00000000000..08cdde69cf2 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListServiceProviderActionsConverter.java @@ -0,0 +1,224 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListServiceProviderActionsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListServiceProviderActionsConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests.ListServiceProviderActionsRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests.ListServiceProviderActionsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.ListServiceProviderActionsRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230801").path("serviceProviderActions"); + + if (request.getName() != null) { + target = + target.queryParam( + "name", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getName())); + } + + if (request.getResourceType() != null) { + target = + target.queryParam( + "resourceType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceType().getValue())); + } + + if (request.getServiceProviderServiceType() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "serviceProviderServiceType", + request.getServiceProviderServiceType(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProviderActionsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProviderActionsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProviderActionsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProviderActionsResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProviderActionsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.ListServiceProviderActionsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderActionSummaryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderActionSummaryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderActionSummaryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderActionSummaryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProviderActionsResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProviderActionsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.serviceProviderActionSummaryCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProviderActionsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListServiceProviderInteractionsConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListServiceProviderInteractionsConverter.java new file mode 100644 index 00000000000..c37966999ad --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListServiceProviderInteractionsConverter.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListServiceProviderInteractionsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListServiceProviderInteractionsConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests + .ListServiceProviderInteractionsRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests + .ListServiceProviderInteractionsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.ListServiceProviderInteractionsRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDelegatedResourceAccessRequestId(), + "delegatedResourceAccessRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("delegatedResourceAccessRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDelegatedResourceAccessRequestId())) + .path("serviceProviderInteractions"); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProviderInteractionsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProviderInteractionsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProviderInteractionsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProviderInteractionsResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProviderInteractionsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.ListServiceProviderInteractionsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderInteractionCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderInteractionCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderInteractionCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderInteractionCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProviderInteractionsResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProviderInteractionsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.serviceProviderInteractionCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProviderInteractionsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListServiceProvidersConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListServiceProvidersConverter.java new file mode 100644 index 00000000000..4d0c5d1bb19 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListServiceProvidersConverter.java @@ -0,0 +1,218 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListServiceProvidersConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListServiceProvidersConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests.ListServiceProvidersRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests.ListServiceProvidersRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.ListServiceProvidersRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230801").path("serviceProviders"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getName() != null) { + target = + target.queryParam( + "name", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getName())); + } + + if (request.getSupportedResourceType() != null) { + target = + target.queryParam( + "supportedResourceType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSupportedResourceType().getValue())); + } + + if (request.getServiceProviderType() != null) { + target = + target.queryParam( + "serviceProviderType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getServiceProviderType().getValue())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.ListServiceProvidersResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.ListServiceProvidersResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.ListServiceProvidersResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProvidersResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProvidersResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.ListServiceProvidersResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderSummaryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderSummaryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderSummaryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderSummaryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProvidersResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProvidersResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.serviceProviderSummaryCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .ListServiceProvidersResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListWorkRequestErrorsConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListWorkRequestErrorsConverter.java new file mode 100644 index 00000000000..d13919e6ee7 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListWorkRequestErrorsConverter.java @@ -0,0 +1,187 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListWorkRequestErrorsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListWorkRequestErrorsConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests.ListWorkRequestErrorsRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests.ListWorkRequestErrorsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.ListWorkRequestErrorsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())) + .path("errors"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.ListWorkRequestErrorsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.ListWorkRequestErrorsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListWorkRequestErrorsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListWorkRequestErrorsResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .ListWorkRequestErrorsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.ListWorkRequestErrorsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .WorkRequestErrorCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .WorkRequestErrorCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .WorkRequestErrorCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .WorkRequestErrorCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .ListWorkRequestErrorsResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .ListWorkRequestErrorsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestErrorCollection(response.getItem()); + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .ListWorkRequestErrorsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListWorkRequestLogsConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListWorkRequestLogsConverter.java new file mode 100644 index 00000000000..da40be8a972 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListWorkRequestLogsConverter.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListWorkRequestLogsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListWorkRequestLogsConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests.ListWorkRequestLogsRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests.ListWorkRequestLogsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.ListWorkRequestLogsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())) + .path("logs"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.ListWorkRequestLogsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.ListWorkRequestLogsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.ListWorkRequestLogsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListWorkRequestLogsResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .ListWorkRequestLogsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.ListWorkRequestLogsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .WorkRequestLogEntryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .WorkRequestLogEntryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .WorkRequestLogEntryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .WorkRequestLogEntryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .ListWorkRequestLogsResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .ListWorkRequestLogsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestLogEntryCollection(response.getItem()); + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .ListWorkRequestLogsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListWorkRequestsConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListWorkRequestsConverter.java new file mode 100644 index 00000000000..66dcf7d9620 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ListWorkRequestsConverter.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListWorkRequestsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListWorkRequestsConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests.ListWorkRequestsRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests.ListWorkRequestsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.ListWorkRequestsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230801").path("workRequests"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getWorkRequestId() != null) { + target = + target.queryParam( + "workRequestId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getWorkRequestId())); + } + + if (request.getStatus() != null) { + target = + target.queryParam( + "status", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getStatus().getValue())); + } + + if (request.getResourceId() != null) { + target = + target.queryParam( + "resourceId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceId())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.ListWorkRequestsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.ListWorkRequestsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.ListWorkRequestsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ListWorkRequestsResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .ListWorkRequestsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.ListWorkRequestsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .WorkRequestSummaryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .WorkRequestSummaryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .WorkRequestSummaryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .WorkRequestSummaryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .ListWorkRequestsResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .ListWorkRequestsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestSummaryCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .ListWorkRequestsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/RejectDelegatedResourceAccessRequestConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/RejectDelegatedResourceAccessRequestConverter.java new file mode 100644 index 00000000000..1433c79d5d1 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/RejectDelegatedResourceAccessRequestConverter.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class RejectDelegatedResourceAccessRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RejectDelegatedResourceAccessRequestConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests + .RejectDelegatedResourceAccessRequestRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests + .RejectDelegatedResourceAccessRequestRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests + .RejectDelegatedResourceAccessRequestRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDelegatedResourceAccessRequestId(), + "delegatedResourceAccessRequestId must not be blank"); + Validate.notNull( + request.getRejectDelegatedResourceAccessRequestDetails(), + "rejectDelegatedResourceAccessRequestDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("delegatedResourceAccessRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDelegatedResourceAccessRequestId())) + .path("actions") + .path("reject"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .RejectDelegatedResourceAccessRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .RejectDelegatedResourceAccessRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .RejectDelegatedResourceAccessRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .RejectDelegatedResourceAccessRequestResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .RejectDelegatedResourceAccessRequestResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.RejectDelegatedResourceAccessRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .RejectDelegatedResourceAccessRequestResponse + .Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .RejectDelegatedResourceAccessRequestResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .RejectDelegatedResourceAccessRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/RevokeDelegatedResourceAccessRequestConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/RevokeDelegatedResourceAccessRequestConverter.java new file mode 100644 index 00000000000..245fd48513e --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/RevokeDelegatedResourceAccessRequestConverter.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class RevokeDelegatedResourceAccessRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RevokeDelegatedResourceAccessRequestConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests + .RevokeDelegatedResourceAccessRequestRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests + .RevokeDelegatedResourceAccessRequestRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests + .RevokeDelegatedResourceAccessRequestRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDelegatedResourceAccessRequestId(), + "delegatedResourceAccessRequestId must not be blank"); + Validate.notNull( + request.getRevokeDelegatedResourceAccessRequestDetails(), + "revokeDelegatedResourceAccessRequestDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("delegatedResourceAccessRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDelegatedResourceAccessRequestId())) + .path("actions") + .path("revoke"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .RevokeDelegatedResourceAccessRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .RevokeDelegatedResourceAccessRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .RevokeDelegatedResourceAccessRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .RevokeDelegatedResourceAccessRequestResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .RevokeDelegatedResourceAccessRequestResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.RevokeDelegatedResourceAccessRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .RevokeDelegatedResourceAccessRequestResponse + .Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .RevokeDelegatedResourceAccessRequestResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .RevokeDelegatedResourceAccessRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ServiceProviderInteractionRequestConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ServiceProviderInteractionRequestConverter.java new file mode 100644 index 00000000000..dd63ef8937b --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/ServiceProviderInteractionRequestConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ServiceProviderInteractionRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ServiceProviderInteractionRequestConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests + .ServiceProviderInteractionRequestRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests + .ServiceProviderInteractionRequestRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.ServiceProviderInteractionRequestRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDelegatedResourceAccessRequestId(), + "delegatedResourceAccessRequestId must not be blank"); + Validate.notNull( + request.getServiceProviderInteractionRequestDetails(), + "serviceProviderInteractionRequestDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("delegatedResourceAccessRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDelegatedResourceAccessRequestId())) + .path("actions") + .path("serviceProviderInteractionRequest"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ServiceProviderInteractionRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ServiceProviderInteractionRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ServiceProviderInteractionRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .ServiceProviderInteractionRequestResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .ServiceProviderInteractionRequestResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.ServiceProviderInteractionRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .ServiceProviderInteractionRequestResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .ServiceProviderInteractionRequestResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .ServiceProviderInteractionRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/UpdateDelegationControlConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/UpdateDelegationControlConverter.java new file mode 100644 index 00000000000..162b51dcdfe --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/UpdateDelegationControlConverter.java @@ -0,0 +1,182 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class UpdateDelegationControlConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateDelegationControlConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests.UpdateDelegationControlRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests.UpdateDelegationControlRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.UpdateDelegationControlRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDelegationControlId(), "delegationControlId must not be blank"); + Validate.notNull( + request.getUpdateDelegationControlDetails(), + "updateDelegationControlDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("delegationControls") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDelegationControlId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.UpdateDelegationControlResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses.UpdateDelegationControlResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .UpdateDelegationControlResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .UpdateDelegationControlResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .UpdateDelegationControlResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.UpdateDelegationControlResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControl>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControl + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControl + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationControl> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .UpdateDelegationControlResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .UpdateDelegationControlResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.delegationControl(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .UpdateDelegationControlResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/UpdateDelegationSubscriptionConverter.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/UpdateDelegationSubscriptionConverter.java new file mode 100644 index 00000000000..178e188c17e --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/internal/http/UpdateDelegationSubscriptionConverter.java @@ -0,0 +1,188 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.delegateaccesscontrol.model.*; +import com.oracle.bmc.delegateaccesscontrol.requests.*; +import com.oracle.bmc.delegateaccesscontrol.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class UpdateDelegationSubscriptionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateDelegationSubscriptionConverter.class); + + public static com.oracle.bmc.delegateaccesscontrol.requests.UpdateDelegationSubscriptionRequest + interceptRequest( + com.oracle.bmc.delegateaccesscontrol.requests + .UpdateDelegationSubscriptionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.delegateaccesscontrol.requests.UpdateDelegationSubscriptionRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getDelegationSubscriptionId(), + "delegationSubscriptionId must not be blank"); + Validate.notNull( + request.getUpdateDelegationSubscriptionDetails(), + "updateDelegationSubscriptionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230801") + .path("delegationSubscriptions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDelegationSubscriptionId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .UpdateDelegationSubscriptionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .UpdateDelegationSubscriptionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .UpdateDelegationSubscriptionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.delegateaccesscontrol.responses + .UpdateDelegationSubscriptionResponse>() { + @Override + public com.oracle.bmc.delegateaccesscontrol.responses + .UpdateDelegationSubscriptionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.delegateaccesscontrol.responses.UpdateDelegationSubscriptionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationSubscription>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegationSubscription + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.delegateaccesscontrol.model + .DelegationSubscription + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.delegateaccesscontrol.model + .DelegationSubscription> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.delegateaccesscontrol.responses + .UpdateDelegationSubscriptionResponse.Builder + builder = + com.oracle.bmc.delegateaccesscontrol.responses + .UpdateDelegationSubscriptionResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.delegationSubscription(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.delegateaccesscontrol.responses + .UpdateDelegationSubscriptionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ActionType.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ActionType.java new file mode 100644 index 00000000000..ef9768a7106 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ActionType.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Possible types of actions. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public enum ActionType { + Created("CREATED"), + Updated("UPDATED"), + Deleted("DELETED"), + InProgress("IN_PROGRESS"), + Related("RELATED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(ActionType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActionType v : ActionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ActionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ActionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ActionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ApproveDelegatedResourceAccessRequestDetails.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ApproveDelegatedResourceAccessRequestDetails.java new file mode 100644 index 00000000000..73b87283cfb --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ApproveDelegatedResourceAccessRequestDetails.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Details of the Delegated Resource Access Request approval. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ApproveDelegatedResourceAccessRequestDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ApproveDelegatedResourceAccessRequestDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "approverComment", + "additionalMessage", + "timeApprovedForAccess" + }) + public ApproveDelegatedResourceAccessRequestDetails( + String approverComment, + String additionalMessage, + java.util.Date timeApprovedForAccess) { + super(); + this.approverComment = approverComment; + this.additionalMessage = additionalMessage; + this.timeApprovedForAccess = timeApprovedForAccess; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Comment by the approver during approval. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approverComment") + private String approverComment; + + /** + * Comment by the approver during approval. + * @param approverComment the value to set + * @return this builder + **/ + public Builder approverComment(String approverComment) { + this.approverComment = approverComment; + this.__explicitlySet__.add("approverComment"); + return this; + } + /** + * Message that needs to be displayed to the operator. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalMessage") + private String additionalMessage; + + /** + * Message that needs to be displayed to the operator. + * @param additionalMessage the value to set + * @return this builder + **/ + public Builder additionalMessage(String additionalMessage) { + this.additionalMessage = additionalMessage; + this.__explicitlySet__.add("additionalMessage"); + return this; + } + /** + * Access start time that is actually approved by the customer in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeApprovedForAccess") + private java.util.Date timeApprovedForAccess; + + /** + * Access start time that is actually approved by the customer in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + * @param timeApprovedForAccess the value to set + * @return this builder + **/ + public Builder timeApprovedForAccess(java.util.Date timeApprovedForAccess) { + this.timeApprovedForAccess = timeApprovedForAccess; + this.__explicitlySet__.add("timeApprovedForAccess"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ApproveDelegatedResourceAccessRequestDetails build() { + ApproveDelegatedResourceAccessRequestDetails model = + new ApproveDelegatedResourceAccessRequestDetails( + this.approverComment, + this.additionalMessage, + this.timeApprovedForAccess); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ApproveDelegatedResourceAccessRequestDetails model) { + if (model.wasPropertyExplicitlySet("approverComment")) { + this.approverComment(model.getApproverComment()); + } + if (model.wasPropertyExplicitlySet("additionalMessage")) { + this.additionalMessage(model.getAdditionalMessage()); + } + if (model.wasPropertyExplicitlySet("timeApprovedForAccess")) { + this.timeApprovedForAccess(model.getTimeApprovedForAccess()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Comment by the approver during approval. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approverComment") + private final String approverComment; + + /** + * Comment by the approver during approval. + * @return the value + **/ + public String getApproverComment() { + return approverComment; + } + + /** + * Message that needs to be displayed to the operator. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalMessage") + private final String additionalMessage; + + /** + * Message that needs to be displayed to the operator. + * @return the value + **/ + public String getAdditionalMessage() { + return additionalMessage; + } + + /** + * Access start time that is actually approved by the customer in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeApprovedForAccess") + private final java.util.Date timeApprovedForAccess; + + /** + * Access start time that is actually approved by the customer in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + * @return the value + **/ + public java.util.Date getTimeApprovedForAccess() { + return timeApprovedForAccess; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ApproveDelegatedResourceAccessRequestDetails("); + sb.append("super=").append(super.toString()); + sb.append("approverComment=").append(String.valueOf(this.approverComment)); + sb.append(", additionalMessage=").append(String.valueOf(this.additionalMessage)); + sb.append(", timeApprovedForAccess=").append(String.valueOf(this.timeApprovedForAccess)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ApproveDelegatedResourceAccessRequestDetails)) { + return false; + } + + ApproveDelegatedResourceAccessRequestDetails other = + (ApproveDelegatedResourceAccessRequestDetails) o; + return java.util.Objects.equals(this.approverComment, other.approverComment) + && java.util.Objects.equals(this.additionalMessage, other.additionalMessage) + && java.util.Objects.equals(this.timeApprovedForAccess, other.timeApprovedForAccess) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.approverComment == null ? 43 : this.approverComment.hashCode()); + result = + (result * PRIME) + + (this.additionalMessage == null ? 43 : this.additionalMessage.hashCode()); + result = + (result * PRIME) + + (this.timeApprovedForAccess == null + ? 43 + : this.timeApprovedForAccess.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/AuditReportStatus.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/AuditReportStatus.java new file mode 100644 index 00000000000..d926c601a86 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/AuditReportStatus.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Audit Report status + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public enum AuditReportStatus { + Notavailable("NOTAVAILABLE"), + Available("AVAILABLE"), + Expired("EXPIRED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(AuditReportStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (AuditReportStatus v : AuditReportStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + AuditReportStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AuditReportStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'AuditReportStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ChangeDelegationControlCompartmentDetails.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ChangeDelegationControlCompartmentDetails.java new file mode 100644 index 00000000000..2b47d760191 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ChangeDelegationControlCompartmentDetails.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Details of the new compartment to contain the Delegation Control. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeDelegationControlCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeDelegationControlCompartmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeDelegationControlCompartmentDetails(String compartmentId) { + super(); + this.compartmentId = compartmentId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the new compartment to contain the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the new compartment to contain the Delegation Control. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeDelegationControlCompartmentDetails build() { + ChangeDelegationControlCompartmentDetails model = + new ChangeDelegationControlCompartmentDetails(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeDelegationControlCompartmentDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the new compartment to contain the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the new compartment to contain the Delegation Control. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ChangeDelegationControlCompartmentDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeDelegationControlCompartmentDetails)) { + return false; + } + + ChangeDelegationControlCompartmentDetails other = + (ChangeDelegationControlCompartmentDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ChangeDelegationSubscriptionCompartmentDetails.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ChangeDelegationSubscriptionCompartmentDetails.java new file mode 100644 index 00000000000..f7f40c53f31 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ChangeDelegationSubscriptionCompartmentDetails.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Details of the new compartment to contain the Delegation Subscription. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeDelegationSubscriptionCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeDelegationSubscriptionCompartmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeDelegationSubscriptionCompartmentDetails(String compartmentId) { + super(); + this.compartmentId = compartmentId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the new compartment to contain the Delegation Subscription. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the new compartment to contain the Delegation Subscription. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeDelegationSubscriptionCompartmentDetails build() { + ChangeDelegationSubscriptionCompartmentDetails model = + new ChangeDelegationSubscriptionCompartmentDetails(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeDelegationSubscriptionCompartmentDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the new compartment to contain the Delegation Subscription. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the new compartment to contain the Delegation Subscription. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ChangeDelegationSubscriptionCompartmentDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeDelegationSubscriptionCompartmentDetails)) { + return false; + } + + ChangeDelegationSubscriptionCompartmentDetails other = + (ChangeDelegationSubscriptionCompartmentDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/CreateDelegationControlDetails.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/CreateDelegationControlDetails.java new file mode 100644 index 00000000000..fb32157a7eb --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/CreateDelegationControlDetails.java @@ -0,0 +1,785 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * While creating the Delegation Control, specify how Service Provider Actions are approved and the users who have the privilege of approving the Service Provider Actions associated with the Delegation Control. + *

+ * You must specify which Service Provider Actions must be pre-approved. The rest of the Service Provider Actions associated with the Delegation Control will require an explicit approval from the users selected either through the approver groups or individually. + *

+ * You must name your Delegation Control appropriately so it reflects the resources that will be governed by the Delegation Control. Neither the Delegation Controls nor their assignments to resources are visible to the support operators. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDelegationControlDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDelegationControlDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "displayName", + "description", + "numApprovalsRequired", + "preApprovedServiceProviderActionNames", + "delegationSubscriptionIds", + "isAutoApproveDuringMaintenance", + "resourceIds", + "resourceType", + "notificationTopicId", + "notificationMessageFormat", + "vaultId", + "vaultKeyId", + "freeformTags", + "definedTags" + }) + public CreateDelegationControlDetails( + String compartmentId, + String displayName, + String description, + Integer numApprovalsRequired, + java.util.List preApprovedServiceProviderActionNames, + java.util.List delegationSubscriptionIds, + Boolean isAutoApproveDuringMaintenance, + java.util.List resourceIds, + DelegationControlResourceType resourceType, + String notificationTopicId, + DelegationControl.NotificationMessageFormat notificationMessageFormat, + String vaultId, + String vaultKeyId, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.compartmentId = compartmentId; + this.displayName = displayName; + this.description = description; + this.numApprovalsRequired = numApprovalsRequired; + this.preApprovedServiceProviderActionNames = preApprovedServiceProviderActionNames; + this.delegationSubscriptionIds = delegationSubscriptionIds; + this.isAutoApproveDuringMaintenance = isAutoApproveDuringMaintenance; + this.resourceIds = resourceIds; + this.resourceType = resourceType; + this.notificationTopicId = notificationTopicId; + this.notificationMessageFormat = notificationMessageFormat; + this.vaultId = vaultId; + this.vaultKeyId = vaultKeyId; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the compartment that contains this Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains this Delegation Control. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Name of the Delegation Control. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Name of the Delegation Control. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Description of the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the Delegation Control. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * number of approvals required. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numApprovalsRequired") + private Integer numApprovalsRequired; + + /** + * number of approvals required. + * @param numApprovalsRequired the value to set + * @return this builder + **/ + public Builder numApprovalsRequired(Integer numApprovalsRequired) { + this.numApprovalsRequired = numApprovalsRequired; + this.__explicitlySet__.add("numApprovalsRequired"); + return this; + } + /** + * List of pre-approved Service Provider Action names. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. Delegated Resource Access Requests associated with a resource governed by this Delegation Control will be + * automatically approved if the Delegated Resource Access Request only contain Service Provider Actions in the pre-approved list. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("preApprovedServiceProviderActionNames") + private java.util.List preApprovedServiceProviderActionNames; + + /** + * List of pre-approved Service Provider Action names. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. Delegated Resource Access Requests associated with a resource governed by this Delegation Control will be + * automatically approved if the Delegated Resource Access Request only contain Service Provider Actions in the pre-approved list. + * + * @param preApprovedServiceProviderActionNames the value to set + * @return this builder + **/ + public Builder preApprovedServiceProviderActionNames( + java.util.List preApprovedServiceProviderActionNames) { + this.preApprovedServiceProviderActionNames = preApprovedServiceProviderActionNames; + this.__explicitlySet__.add("preApprovedServiceProviderActionNames"); + return this; + } + /** + * List of Delegation Subscription OCID that are allowed for this Delegation Control. The allowed subscriptions will determine the available Service Provider Actions. Only support operators for the allowed subscriptions are allowed to create Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("delegationSubscriptionIds") + private java.util.List delegationSubscriptionIds; + + /** + * List of Delegation Subscription OCID that are allowed for this Delegation Control. The allowed subscriptions will determine the available Service Provider Actions. Only support operators for the allowed subscriptions are allowed to create Delegated Resource Access Request. + * @param delegationSubscriptionIds the value to set + * @return this builder + **/ + public Builder delegationSubscriptionIds(java.util.List delegationSubscriptionIds) { + this.delegationSubscriptionIds = delegationSubscriptionIds; + this.__explicitlySet__.add("delegationSubscriptionIds"); + return this; + } + /** + * Set to true to allow all Delegated Resource Access Request to be approved automatically during maintenance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoApproveDuringMaintenance") + private Boolean isAutoApproveDuringMaintenance; + + /** + * Set to true to allow all Delegated Resource Access Request to be approved automatically during maintenance. + * @param isAutoApproveDuringMaintenance the value to set + * @return this builder + **/ + public Builder isAutoApproveDuringMaintenance(Boolean isAutoApproveDuringMaintenance) { + this.isAutoApproveDuringMaintenance = isAutoApproveDuringMaintenance; + this.__explicitlySet__.add("isAutoApproveDuringMaintenance"); + return this; + } + /** + * The OCID of the selected resources that this Delegation Control is applicable to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceIds") + private java.util.List resourceIds; + + /** + * The OCID of the selected resources that this Delegation Control is applicable to. + * @param resourceIds the value to set + * @return this builder + **/ + public Builder resourceIds(java.util.List resourceIds) { + this.resourceIds = resourceIds; + this.__explicitlySet__.add("resourceIds"); + return this; + } + /** + * Resource type for which the Delegation Control is applicable to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private DelegationControlResourceType resourceType; + + /** + * Resource type for which the Delegation Control is applicable to. + * @param resourceType the value to set + * @return this builder + **/ + public Builder resourceType(DelegationControlResourceType resourceType) { + this.resourceType = resourceType; + this.__explicitlySet__.add("resourceType"); + return this; + } + /** + * The OCID of the OCI Notification topic to publish messages related to this Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicId") + private String notificationTopicId; + + /** + * The OCID of the OCI Notification topic to publish messages related to this Delegation Control. + * @param notificationTopicId the value to set + * @return this builder + **/ + public Builder notificationTopicId(String notificationTopicId) { + this.notificationTopicId = notificationTopicId; + this.__explicitlySet__.add("notificationTopicId"); + return this; + } + /** + * The format of the OCI Notification messages for this Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationMessageFormat") + private DelegationControl.NotificationMessageFormat notificationMessageFormat; + + /** + * The format of the OCI Notification messages for this Delegation Control. + * @param notificationMessageFormat the value to set + * @return this builder + **/ + public Builder notificationMessageFormat( + DelegationControl.NotificationMessageFormat notificationMessageFormat) { + this.notificationMessageFormat = notificationMessageFormat; + this.__explicitlySet__.add("notificationMessageFormat"); + return this; + } + /** + * The OCID of the OCI Vault that will store the secrets containing the SSH keys to access the resource governed by this Delegation Control by Delegate Access Control Service. This property is required when resourceType is CLOUDVMCLUSTER. Delegate Access Control Service will generate the SSH keys and store them as secrets in the OCI Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The OCID of the OCI Vault that will store the secrets containing the SSH keys to access the resource governed by this Delegation Control by Delegate Access Control Service. This property is required when resourceType is CLOUDVMCLUSTER. Delegate Access Control Service will generate the SSH keys and store them as secrets in the OCI Vault. + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The OCID of the Master Encryption Key in the OCI Vault specified by vaultId. This key will be used to encrypt the SSH keys to access the resource governed by this Delegation Control by Delegate Access Control Service. This property is required when resourceType is CLOUDVMCLUSTER. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultKeyId") + private String vaultKeyId; + + /** + * The OCID of the Master Encryption Key in the OCI Vault specified by vaultId. This key will be used to encrypt the SSH keys to access the resource governed by this Delegation Control by Delegate Access Control Service. This property is required when resourceType is CLOUDVMCLUSTER. + * @param vaultKeyId the value to set + * @return this builder + **/ + public Builder vaultKeyId(String vaultKeyId) { + this.vaultKeyId = vaultKeyId; + this.__explicitlySet__.add("vaultKeyId"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDelegationControlDetails build() { + CreateDelegationControlDetails model = + new CreateDelegationControlDetails( + this.compartmentId, + this.displayName, + this.description, + this.numApprovalsRequired, + this.preApprovedServiceProviderActionNames, + this.delegationSubscriptionIds, + this.isAutoApproveDuringMaintenance, + this.resourceIds, + this.resourceType, + this.notificationTopicId, + this.notificationMessageFormat, + this.vaultId, + this.vaultKeyId, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDelegationControlDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("numApprovalsRequired")) { + this.numApprovalsRequired(model.getNumApprovalsRequired()); + } + if (model.wasPropertyExplicitlySet("preApprovedServiceProviderActionNames")) { + this.preApprovedServiceProviderActionNames( + model.getPreApprovedServiceProviderActionNames()); + } + if (model.wasPropertyExplicitlySet("delegationSubscriptionIds")) { + this.delegationSubscriptionIds(model.getDelegationSubscriptionIds()); + } + if (model.wasPropertyExplicitlySet("isAutoApproveDuringMaintenance")) { + this.isAutoApproveDuringMaintenance(model.getIsAutoApproveDuringMaintenance()); + } + if (model.wasPropertyExplicitlySet("resourceIds")) { + this.resourceIds(model.getResourceIds()); + } + if (model.wasPropertyExplicitlySet("resourceType")) { + this.resourceType(model.getResourceType()); + } + if (model.wasPropertyExplicitlySet("notificationTopicId")) { + this.notificationTopicId(model.getNotificationTopicId()); + } + if (model.wasPropertyExplicitlySet("notificationMessageFormat")) { + this.notificationMessageFormat(model.getNotificationMessageFormat()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("vaultKeyId")) { + this.vaultKeyId(model.getVaultKeyId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the compartment that contains this Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains this Delegation Control. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Name of the Delegation Control. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Name of the Delegation Control. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Description of the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the Delegation Control. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * number of approvals required. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numApprovalsRequired") + private final Integer numApprovalsRequired; + + /** + * number of approvals required. + * @return the value + **/ + public Integer getNumApprovalsRequired() { + return numApprovalsRequired; + } + + /** + * List of pre-approved Service Provider Action names. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. Delegated Resource Access Requests associated with a resource governed by this Delegation Control will be + * automatically approved if the Delegated Resource Access Request only contain Service Provider Actions in the pre-approved list. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("preApprovedServiceProviderActionNames") + private final java.util.List preApprovedServiceProviderActionNames; + + /** + * List of pre-approved Service Provider Action names. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. Delegated Resource Access Requests associated with a resource governed by this Delegation Control will be + * automatically approved if the Delegated Resource Access Request only contain Service Provider Actions in the pre-approved list. + * + * @return the value + **/ + public java.util.List getPreApprovedServiceProviderActionNames() { + return preApprovedServiceProviderActionNames; + } + + /** + * List of Delegation Subscription OCID that are allowed for this Delegation Control. The allowed subscriptions will determine the available Service Provider Actions. Only support operators for the allowed subscriptions are allowed to create Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("delegationSubscriptionIds") + private final java.util.List delegationSubscriptionIds; + + /** + * List of Delegation Subscription OCID that are allowed for this Delegation Control. The allowed subscriptions will determine the available Service Provider Actions. Only support operators for the allowed subscriptions are allowed to create Delegated Resource Access Request. + * @return the value + **/ + public java.util.List getDelegationSubscriptionIds() { + return delegationSubscriptionIds; + } + + /** + * Set to true to allow all Delegated Resource Access Request to be approved automatically during maintenance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoApproveDuringMaintenance") + private final Boolean isAutoApproveDuringMaintenance; + + /** + * Set to true to allow all Delegated Resource Access Request to be approved automatically during maintenance. + * @return the value + **/ + public Boolean getIsAutoApproveDuringMaintenance() { + return isAutoApproveDuringMaintenance; + } + + /** + * The OCID of the selected resources that this Delegation Control is applicable to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceIds") + private final java.util.List resourceIds; + + /** + * The OCID of the selected resources that this Delegation Control is applicable to. + * @return the value + **/ + public java.util.List getResourceIds() { + return resourceIds; + } + + /** + * Resource type for which the Delegation Control is applicable to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private final DelegationControlResourceType resourceType; + + /** + * Resource type for which the Delegation Control is applicable to. + * @return the value + **/ + public DelegationControlResourceType getResourceType() { + return resourceType; + } + + /** + * The OCID of the OCI Notification topic to publish messages related to this Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicId") + private final String notificationTopicId; + + /** + * The OCID of the OCI Notification topic to publish messages related to this Delegation Control. + * @return the value + **/ + public String getNotificationTopicId() { + return notificationTopicId; + } + + /** + * The format of the OCI Notification messages for this Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationMessageFormat") + private final DelegationControl.NotificationMessageFormat notificationMessageFormat; + + /** + * The format of the OCI Notification messages for this Delegation Control. + * @return the value + **/ + public DelegationControl.NotificationMessageFormat getNotificationMessageFormat() { + return notificationMessageFormat; + } + + /** + * The OCID of the OCI Vault that will store the secrets containing the SSH keys to access the resource governed by this Delegation Control by Delegate Access Control Service. This property is required when resourceType is CLOUDVMCLUSTER. Delegate Access Control Service will generate the SSH keys and store them as secrets in the OCI Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The OCID of the OCI Vault that will store the secrets containing the SSH keys to access the resource governed by this Delegation Control by Delegate Access Control Service. This property is required when resourceType is CLOUDVMCLUSTER. Delegate Access Control Service will generate the SSH keys and store them as secrets in the OCI Vault. + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The OCID of the Master Encryption Key in the OCI Vault specified by vaultId. This key will be used to encrypt the SSH keys to access the resource governed by this Delegation Control by Delegate Access Control Service. This property is required when resourceType is CLOUDVMCLUSTER. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultKeyId") + private final String vaultKeyId; + + /** + * The OCID of the Master Encryption Key in the OCI Vault specified by vaultId. This key will be used to encrypt the SSH keys to access the resource governed by this Delegation Control by Delegate Access Control Service. This property is required when resourceType is CLOUDVMCLUSTER. + * @return the value + **/ + public String getVaultKeyId() { + return vaultKeyId; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateDelegationControlDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", numApprovalsRequired=").append(String.valueOf(this.numApprovalsRequired)); + sb.append(", preApprovedServiceProviderActionNames=") + .append(String.valueOf(this.preApprovedServiceProviderActionNames)); + sb.append(", delegationSubscriptionIds=") + .append(String.valueOf(this.delegationSubscriptionIds)); + sb.append(", isAutoApproveDuringMaintenance=") + .append(String.valueOf(this.isAutoApproveDuringMaintenance)); + sb.append(", resourceIds=").append(String.valueOf(this.resourceIds)); + sb.append(", resourceType=").append(String.valueOf(this.resourceType)); + sb.append(", notificationTopicId=").append(String.valueOf(this.notificationTopicId)); + sb.append(", notificationMessageFormat=") + .append(String.valueOf(this.notificationMessageFormat)); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", vaultKeyId=").append(String.valueOf(this.vaultKeyId)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDelegationControlDetails)) { + return false; + } + + CreateDelegationControlDetails other = (CreateDelegationControlDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.numApprovalsRequired, other.numApprovalsRequired) + && java.util.Objects.equals( + this.preApprovedServiceProviderActionNames, + other.preApprovedServiceProviderActionNames) + && java.util.Objects.equals( + this.delegationSubscriptionIds, other.delegationSubscriptionIds) + && java.util.Objects.equals( + this.isAutoApproveDuringMaintenance, other.isAutoApproveDuringMaintenance) + && java.util.Objects.equals(this.resourceIds, other.resourceIds) + && java.util.Objects.equals(this.resourceType, other.resourceType) + && java.util.Objects.equals(this.notificationTopicId, other.notificationTopicId) + && java.util.Objects.equals( + this.notificationMessageFormat, other.notificationMessageFormat) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.vaultKeyId, other.vaultKeyId) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.numApprovalsRequired == null + ? 43 + : this.numApprovalsRequired.hashCode()); + result = + (result * PRIME) + + (this.preApprovedServiceProviderActionNames == null + ? 43 + : this.preApprovedServiceProviderActionNames.hashCode()); + result = + (result * PRIME) + + (this.delegationSubscriptionIds == null + ? 43 + : this.delegationSubscriptionIds.hashCode()); + result = + (result * PRIME) + + (this.isAutoApproveDuringMaintenance == null + ? 43 + : this.isAutoApproveDuringMaintenance.hashCode()); + result = (result * PRIME) + (this.resourceIds == null ? 43 : this.resourceIds.hashCode()); + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); + result = + (result * PRIME) + + (this.notificationTopicId == null + ? 43 + : this.notificationTopicId.hashCode()); + result = + (result * PRIME) + + (this.notificationMessageFormat == null + ? 43 + : this.notificationMessageFormat.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.vaultKeyId == null ? 43 : this.vaultKeyId.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/CreateDelegationSubscriptionDetails.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/CreateDelegationSubscriptionDetails.java new file mode 100644 index 00000000000..ebe4ae441c1 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/CreateDelegationSubscriptionDetails.java @@ -0,0 +1,387 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Details for creating the Delegation Subscription. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDelegationSubscriptionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDelegationSubscriptionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "serviceProviderId", + "description", + "subscribedServiceType", + "freeformTags", + "definedTags" + }) + public CreateDelegationSubscriptionDetails( + String compartmentId, + String serviceProviderId, + String description, + ServiceProviderServiceType subscribedServiceType, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.compartmentId = compartmentId; + this.serviceProviderId = serviceProviderId; + this.description = description; + this.subscribedServiceType = subscribedServiceType; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the compartment that contains the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the Delegation Control. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Unique identifier of the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceProviderId") + private String serviceProviderId; + + /** + * Unique identifier of the Service Provider. + * @param serviceProviderId the value to set + * @return this builder + **/ + public Builder serviceProviderId(String serviceProviderId) { + this.serviceProviderId = serviceProviderId; + this.__explicitlySet__.add("serviceProviderId"); + return this; + } + /** + * Description of the Delegation Subscription. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the Delegation Subscription. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Subscribed Service Provider Service Type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscribedServiceType") + private ServiceProviderServiceType subscribedServiceType; + + /** + * Subscribed Service Provider Service Type. + * @param subscribedServiceType the value to set + * @return this builder + **/ + public Builder subscribedServiceType(ServiceProviderServiceType subscribedServiceType) { + this.subscribedServiceType = subscribedServiceType; + this.__explicitlySet__.add("subscribedServiceType"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDelegationSubscriptionDetails build() { + CreateDelegationSubscriptionDetails model = + new CreateDelegationSubscriptionDetails( + this.compartmentId, + this.serviceProviderId, + this.description, + this.subscribedServiceType, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDelegationSubscriptionDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("serviceProviderId")) { + this.serviceProviderId(model.getServiceProviderId()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("subscribedServiceType")) { + this.subscribedServiceType(model.getSubscribedServiceType()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the compartment that contains the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the Delegation Control. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Unique identifier of the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceProviderId") + private final String serviceProviderId; + + /** + * Unique identifier of the Service Provider. + * @return the value + **/ + public String getServiceProviderId() { + return serviceProviderId; + } + + /** + * Description of the Delegation Subscription. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the Delegation Subscription. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Subscribed Service Provider Service Type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscribedServiceType") + private final ServiceProviderServiceType subscribedServiceType; + + /** + * Subscribed Service Provider Service Type. + * @return the value + **/ + public ServiceProviderServiceType getSubscribedServiceType() { + return subscribedServiceType; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateDelegationSubscriptionDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", serviceProviderId=").append(String.valueOf(this.serviceProviderId)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", subscribedServiceType=").append(String.valueOf(this.subscribedServiceType)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDelegationSubscriptionDetails)) { + return false; + } + + CreateDelegationSubscriptionDetails other = (CreateDelegationSubscriptionDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.serviceProviderId, other.serviceProviderId) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.subscribedServiceType, other.subscribedServiceType) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.serviceProviderId == null ? 43 : this.serviceProviderId.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.subscribedServiceType == null + ? 43 + : this.subscribedServiceType.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequest.java new file mode 100644 index 00000000000..223658a4fac --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequest.java @@ -0,0 +1,1664 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * A support operator raises Delegated Resource Access Request when they need access to any infrastructure resource governed by Delegation Control. + * The Delegated Resource Access Request identifies the target resource and the set of Service Provider Actions. Delegated Resource Access Request handling depends upon the Delegation Control + * that governs the target resource, and the set of Service Provider Actions listed for approval in the Delegated Resource Access Request. If all of the Service Provider Actions + * listed in the Delegated Resource Access Request are in the pre-approved list in the Delegation Control that governs the target resource, then the Delegated Resource Access Request is + * automatically approved. If not, then the Delegated Resource Access Request requires explicit approval from the approver group specified by the Delegation Control governing the target resource. + *

+ * You can approve or reject a Delegated Resource Access Request. You can also revoke the approval of an already approved Delegated Resource Access Request. While creating a Delegated Resource Access Request, + * the support operator specifies the duration of access. You have the option to approve the entire duration or reduce or even increase the time duration. + * A support operator can also request for an extension. The approval for such an extension is processed the same way the original Delegated Resource Access Request was processed. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DelegatedResourceAccessRequest.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DelegatedResourceAccessRequest + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "ticketNumbers", + "reasonForRequest", + "description", + "timeAccessRequested", + "resourceId", + "resourceName", + "resourceType", + "requesterType", + "requestedActionNames", + "databaseNameList", + "providedServiceTypes", + "delegationSubscriptionIds", + "severity", + "durationInHours", + "extendDurationInHours", + "isAutoApproved", + "lifecycleState", + "lifecycleStateDetails", + "requestStatus", + "timeCreated", + "timeUpdated", + "numInitialApprovals", + "numExtensionApprovals", + "approvalInfo", + "closureComment", + "delegationControlId", + "auditTypes", + "isPendingMoreInfo", + "freeformTags", + "definedTags", + "systemTags" + }) + public DelegatedResourceAccessRequest( + String id, + String compartmentId, + String displayName, + java.util.List ticketNumbers, + String reasonForRequest, + String description, + java.util.Date timeAccessRequested, + String resourceId, + String resourceName, + DelegationControlResourceType resourceType, + DelegatedResourceAccessRequesterType requesterType, + java.util.List requestedActionNames, + java.util.List databaseNameList, + java.util.List providedServiceTypes, + java.util.List delegationSubscriptionIds, + DelegatedResourceAccessRequestSeverity severity, + Integer durationInHours, + Integer extendDurationInHours, + Boolean isAutoApproved, + LifecycleState lifecycleState, + String lifecycleStateDetails, + DelegatedResourceAccessRequestStatus requestStatus, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Integer numInitialApprovals, + Integer numExtensionApprovals, + java.util.List approvalInfo, + String closureComment, + String delegationControlId, + java.util.List auditTypes, + Boolean isPendingMoreInfo, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.ticketNumbers = ticketNumbers; + this.reasonForRequest = reasonForRequest; + this.description = description; + this.timeAccessRequested = timeAccessRequested; + this.resourceId = resourceId; + this.resourceName = resourceName; + this.resourceType = resourceType; + this.requesterType = requesterType; + this.requestedActionNames = requestedActionNames; + this.databaseNameList = databaseNameList; + this.providedServiceTypes = providedServiceTypes; + this.delegationSubscriptionIds = delegationSubscriptionIds; + this.severity = severity; + this.durationInHours = durationInHours; + this.extendDurationInHours = extendDurationInHours; + this.isAutoApproved = isAutoApproved; + this.lifecycleState = lifecycleState; + this.lifecycleStateDetails = lifecycleStateDetails; + this.requestStatus = requestStatus; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.numInitialApprovals = numInitialApprovals; + this.numExtensionApprovals = numExtensionApprovals; + this.approvalInfo = approvalInfo; + this.closureComment = closureComment; + this.delegationControlId = delegationControlId; + this.auditTypes = auditTypes; + this.isPendingMoreInfo = isPendingMoreInfo; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the Delegated Resource Access Request. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The OCID of the compartment that contains the Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the Delegated Resource Access Request. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Display name. This is generated by the system automatically. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Display name. This is generated by the system automatically. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A list of ticket numbers related to this Delegated Resource Access Request, e.g. Service Request (SR) number and JIRA ticket number. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ticketNumbers") + private java.util.List ticketNumbers; + + /** + * A list of ticket numbers related to this Delegated Resource Access Request, e.g. Service Request (SR) number and JIRA ticket number. + * @param ticketNumbers the value to set + * @return this builder + **/ + public Builder ticketNumbers(java.util.List ticketNumbers) { + this.ticketNumbers = ticketNumbers; + this.__explicitlySet__.add("ticketNumbers"); + return this; + } + /** + * A short description explaining why this Delegated Resource Access Request is needed by the support operator. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reasonForRequest") + private String reasonForRequest; + + /** + * A short description explaining why this Delegated Resource Access Request is needed by the support operator. + * @param reasonForRequest the value to set + * @return this builder + **/ + public Builder reasonForRequest(String reasonForRequest) { + this.reasonForRequest = reasonForRequest; + this.__explicitlySet__.add("reasonForRequest"); + return this; + } + /** + * Detailed description of this Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Detailed description of this Delegated Resource Access Request. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Requested access start time in UTC. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccessRequested") + private java.util.Date timeAccessRequested; + + /** + * Requested access start time in UTC. + * @param timeAccessRequested the value to set + * @return this builder + **/ + public Builder timeAccessRequested(java.util.Date timeAccessRequested) { + this.timeAccessRequested = timeAccessRequested; + this.__explicitlySet__.add("timeAccessRequested"); + return this; + } + /** + * The OCID of the target resource associated with the Delegated Resource Access Request. The support operator raises a Delegated Resource Access Request to get approval to + * access the target resource. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * The OCID of the target resource associated with the Delegated Resource Access Request. The support operator raises a Delegated Resource Access Request to get approval to + * access the target resource. + * + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * The name of the target resource associated with the Delegated Resource Access Request. The support operator raises a Delegated Resource Access Request to get approval to + * access the target resource. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceName") + private String resourceName; + + /** + * The name of the target resource associated with the Delegated Resource Access Request. The support operator raises a Delegated Resource Access Request to get approval to + * access the target resource. + * + * @param resourceName the value to set + * @return this builder + **/ + public Builder resourceName(String resourceName) { + this.resourceName = resourceName; + this.__explicitlySet__.add("resourceName"); + return this; + } + /** + * Resource type for which the associated Delegation Control is applicable to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private DelegationControlResourceType resourceType; + + /** + * Resource type for which the associated Delegation Control is applicable to. + * @param resourceType the value to set + * @return this builder + **/ + public Builder resourceType(DelegationControlResourceType resourceType) { + this.resourceType = resourceType; + this.__explicitlySet__.add("resourceType"); + return this; + } + /** + * Requester type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requesterType") + private DelegatedResourceAccessRequesterType requesterType; + + /** + * Requester type + * @param requesterType the value to set + * @return this builder + **/ + public Builder requesterType(DelegatedResourceAccessRequesterType requesterType) { + this.requesterType = requesterType; + this.__explicitlySet__.add("requesterType"); + return this; + } + /** + * List of Service Provider Action names for which approval is sought by the support operator user. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestedActionNames") + private java.util.List requestedActionNames; + + /** + * List of Service Provider Action names for which approval is sought by the support operator user. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. + * @param requestedActionNames the value to set + * @return this builder + **/ + public Builder requestedActionNames(java.util.List requestedActionNames) { + this.requestedActionNames = requestedActionNames; + this.__explicitlySet__.add("requestedActionNames"); + return this; + } + /** + * List of Database unique names for which access is requested. This parameter is required for DLGT_MGMT_SYS_MAINT_ACCESS cage when database access in needed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseNameList") + private java.util.List databaseNameList; + + /** + * List of Database unique names for which access is requested. This parameter is required for DLGT_MGMT_SYS_MAINT_ACCESS cage when database access in needed. + * @param databaseNameList the value to set + * @return this builder + **/ + public Builder databaseNameList(java.util.List databaseNameList) { + this.databaseNameList = databaseNameList; + this.__explicitlySet__.add("databaseNameList"); + return this; + } + /** + * List of Service Provider Service Types being provided by the support operator user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("providedServiceTypes") + private java.util.List providedServiceTypes; + + /** + * List of Service Provider Service Types being provided by the support operator user. + * @param providedServiceTypes the value to set + * @return this builder + **/ + public Builder providedServiceTypes( + java.util.List providedServiceTypes) { + this.providedServiceTypes = providedServiceTypes; + this.__explicitlySet__.add("providedServiceTypes"); + return this; + } + /** + * List of Delegation Subscription OCID that are associated with this Delegated Resource Access Request based on the service types being requested. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("delegationSubscriptionIds") + private java.util.List delegationSubscriptionIds; + + /** + * List of Delegation Subscription OCID that are associated with this Delegated Resource Access Request based on the service types being requested. + * @param delegationSubscriptionIds the value to set + * @return this builder + **/ + public Builder delegationSubscriptionIds(java.util.List delegationSubscriptionIds) { + this.delegationSubscriptionIds = delegationSubscriptionIds; + this.__explicitlySet__.add("delegationSubscriptionIds"); + return this; + } + /** + * Priority assigned to the Delegated Resource Access Request by the support operator + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private DelegatedResourceAccessRequestSeverity severity; + + /** + * Priority assigned to the Delegated Resource Access Request by the support operator + * @param severity the value to set + * @return this builder + **/ + public Builder severity(DelegatedResourceAccessRequestSeverity severity) { + this.severity = severity; + this.__explicitlySet__.add("severity"); + return this; + } + /** + * Duration in hours for which access is sought on the target resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("durationInHours") + private Integer durationInHours; + + /** + * Duration in hours for which access is sought on the target resource. + * @param durationInHours the value to set + * @return this builder + **/ + public Builder durationInHours(Integer durationInHours) { + this.durationInHours = durationInHours; + this.__explicitlySet__.add("durationInHours"); + return this; + } + /** + * Duration in hours for which extension access is sought on the target resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("extendDurationInHours") + private Integer extendDurationInHours; + + /** + * Duration in hours for which extension access is sought on the target resource. + * @param extendDurationInHours the value to set + * @return this builder + **/ + public Builder extendDurationInHours(Integer extendDurationInHours) { + this.extendDurationInHours = extendDurationInHours; + this.__explicitlySet__.add("extendDurationInHours"); + return this; + } + /** + * Set to true if the request is approved automatically based on preApprovedServiceProviderActionNames or isAutoApproveDuringMaintenance in the associated Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoApproved") + private Boolean isAutoApproved; + + /** + * Set to true if the request is approved automatically based on preApprovedServiceProviderActionNames or isAutoApproveDuringMaintenance in the associated Delegation Control. + * @param isAutoApproved the value to set + * @return this builder + **/ + public Builder isAutoApproved(Boolean isAutoApproved) { + this.isAutoApproved = isAutoApproved; + this.__explicitlySet__.add("isAutoApproved"); + return this; + } + /** + * The current lifecycle state of the Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Delegated Resource Access Request. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Description of the current lifecycle state in more detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleStateDetails") + private String lifecycleStateDetails; + + /** + * Description of the current lifecycle state in more detail. + * @param lifecycleStateDetails the value to set + * @return this builder + **/ + public Builder lifecycleStateDetails(String lifecycleStateDetails) { + this.lifecycleStateDetails = lifecycleStateDetails; + this.__explicitlySet__.add("lifecycleStateDetails"); + return this; + } + /** + * The current status of the Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestStatus") + private DelegatedResourceAccessRequestStatus requestStatus; + + /** + * The current status of the Delegated Resource Access Request. + * @param requestStatus the value to set + * @return this builder + **/ + public Builder requestStatus(DelegatedResourceAccessRequestStatus requestStatus) { + this.requestStatus = requestStatus; + this.__explicitlySet__.add("requestStatus"); + return this; + } + /** + * Time when the Delegated Resource Access Request was created in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Time when the Delegated Resource Access Request was created in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * Time when the Delegated Resource Access Request was last modified in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * Time when the Delegated Resource Access Request was last modified in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Number of initial approvals that have been obtained so far. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numInitialApprovals") + private Integer numInitialApprovals; + + /** + * Number of initial approvals that have been obtained so far. + * @param numInitialApprovals the value to set + * @return this builder + **/ + public Builder numInitialApprovals(Integer numInitialApprovals) { + this.numInitialApprovals = numInitialApprovals; + this.__explicitlySet__.add("numInitialApprovals"); + return this; + } + /** + * Number of extension approvals that have been obtained so far. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numExtensionApprovals") + private Integer numExtensionApprovals; + + /** + * Number of extension approvals that have been obtained so far. + * @param numExtensionApprovals the value to set + * @return this builder + **/ + public Builder numExtensionApprovals(Integer numExtensionApprovals) { + this.numExtensionApprovals = numExtensionApprovals; + this.__explicitlySet__.add("numExtensionApprovals"); + return this; + } + /** + * In case of single approval, this will have only one item. Else, a list of approvals. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approvalInfo") + private java.util.List approvalInfo; + + /** + * In case of single approval, this will have only one item. Else, a list of approvals. + * @param approvalInfo the value to set + * @return this builder + **/ + public Builder approvalInfo( + java.util.List approvalInfo) { + this.approvalInfo = approvalInfo; + this.__explicitlySet__.add("approvalInfo"); + return this; + } + /** + * The comment entered by the support operator while closing the request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("closureComment") + private String closureComment; + + /** + * The comment entered by the support operator while closing the request. + * @param closureComment the value to set + * @return this builder + **/ + public Builder closureComment(String closureComment) { + this.closureComment = closureComment; + this.__explicitlySet__.add("closureComment"); + return this; + } + /** + * The OCID of the Delegation Control governing the target resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("delegationControlId") + private String delegationControlId; + + /** + * The OCID of the Delegation Control governing the target resource. + * @param delegationControlId the value to set + * @return this builder + **/ + public Builder delegationControlId(String delegationControlId) { + this.delegationControlId = delegationControlId; + this.__explicitlySet__.add("delegationControlId"); + return this; + } + /** + * Specifies the type of auditing to be enabled. There are two levels of auditing: command-level and keystroke-level. + * By default, both command-level and keystroke-level auditing are enabled, i.e. commands and key strokes issued by the support operator are logged. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("auditTypes") + private java.util.List auditTypes; + + /** + * Specifies the type of auditing to be enabled. There are two levels of auditing: command-level and keystroke-level. + * By default, both command-level and keystroke-level auditing are enabled, i.e. commands and key strokes issued by the support operator are logged. + * + * @param auditTypes the value to set + * @return this builder + **/ + public Builder auditTypes( + java.util.List auditTypes) { + this.auditTypes = auditTypes; + this.__explicitlySet__.add("auditTypes"); + return this; + } + /** + * Indicates if the delegated resource access request is waiting on more information from the operator + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isPendingMoreInfo") + private Boolean isPendingMoreInfo; + + /** + * Indicates if the delegated resource access request is waiting on more information from the operator + * @param isPendingMoreInfo the value to set + * @return this builder + **/ + public Builder isPendingMoreInfo(Boolean isPendingMoreInfo) { + this.isPendingMoreInfo = isPendingMoreInfo; + this.__explicitlySet__.add("isPendingMoreInfo"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DelegatedResourceAccessRequest build() { + DelegatedResourceAccessRequest model = + new DelegatedResourceAccessRequest( + this.id, + this.compartmentId, + this.displayName, + this.ticketNumbers, + this.reasonForRequest, + this.description, + this.timeAccessRequested, + this.resourceId, + this.resourceName, + this.resourceType, + this.requesterType, + this.requestedActionNames, + this.databaseNameList, + this.providedServiceTypes, + this.delegationSubscriptionIds, + this.severity, + this.durationInHours, + this.extendDurationInHours, + this.isAutoApproved, + this.lifecycleState, + this.lifecycleStateDetails, + this.requestStatus, + this.timeCreated, + this.timeUpdated, + this.numInitialApprovals, + this.numExtensionApprovals, + this.approvalInfo, + this.closureComment, + this.delegationControlId, + this.auditTypes, + this.isPendingMoreInfo, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DelegatedResourceAccessRequest model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("ticketNumbers")) { + this.ticketNumbers(model.getTicketNumbers()); + } + if (model.wasPropertyExplicitlySet("reasonForRequest")) { + this.reasonForRequest(model.getReasonForRequest()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("timeAccessRequested")) { + this.timeAccessRequested(model.getTimeAccessRequested()); + } + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("resourceName")) { + this.resourceName(model.getResourceName()); + } + if (model.wasPropertyExplicitlySet("resourceType")) { + this.resourceType(model.getResourceType()); + } + if (model.wasPropertyExplicitlySet("requesterType")) { + this.requesterType(model.getRequesterType()); + } + if (model.wasPropertyExplicitlySet("requestedActionNames")) { + this.requestedActionNames(model.getRequestedActionNames()); + } + if (model.wasPropertyExplicitlySet("databaseNameList")) { + this.databaseNameList(model.getDatabaseNameList()); + } + if (model.wasPropertyExplicitlySet("providedServiceTypes")) { + this.providedServiceTypes(model.getProvidedServiceTypes()); + } + if (model.wasPropertyExplicitlySet("delegationSubscriptionIds")) { + this.delegationSubscriptionIds(model.getDelegationSubscriptionIds()); + } + if (model.wasPropertyExplicitlySet("severity")) { + this.severity(model.getSeverity()); + } + if (model.wasPropertyExplicitlySet("durationInHours")) { + this.durationInHours(model.getDurationInHours()); + } + if (model.wasPropertyExplicitlySet("extendDurationInHours")) { + this.extendDurationInHours(model.getExtendDurationInHours()); + } + if (model.wasPropertyExplicitlySet("isAutoApproved")) { + this.isAutoApproved(model.getIsAutoApproved()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleStateDetails")) { + this.lifecycleStateDetails(model.getLifecycleStateDetails()); + } + if (model.wasPropertyExplicitlySet("requestStatus")) { + this.requestStatus(model.getRequestStatus()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("numInitialApprovals")) { + this.numInitialApprovals(model.getNumInitialApprovals()); + } + if (model.wasPropertyExplicitlySet("numExtensionApprovals")) { + this.numExtensionApprovals(model.getNumExtensionApprovals()); + } + if (model.wasPropertyExplicitlySet("approvalInfo")) { + this.approvalInfo(model.getApprovalInfo()); + } + if (model.wasPropertyExplicitlySet("closureComment")) { + this.closureComment(model.getClosureComment()); + } + if (model.wasPropertyExplicitlySet("delegationControlId")) { + this.delegationControlId(model.getDelegationControlId()); + } + if (model.wasPropertyExplicitlySet("auditTypes")) { + this.auditTypes(model.getAuditTypes()); + } + if (model.wasPropertyExplicitlySet("isPendingMoreInfo")) { + this.isPendingMoreInfo(model.getIsPendingMoreInfo()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the Delegated Resource Access Request. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of the compartment that contains the Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the Delegated Resource Access Request. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Display name. This is generated by the system automatically. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Display name. This is generated by the system automatically. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A list of ticket numbers related to this Delegated Resource Access Request, e.g. Service Request (SR) number and JIRA ticket number. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ticketNumbers") + private final java.util.List ticketNumbers; + + /** + * A list of ticket numbers related to this Delegated Resource Access Request, e.g. Service Request (SR) number and JIRA ticket number. + * @return the value + **/ + public java.util.List getTicketNumbers() { + return ticketNumbers; + } + + /** + * A short description explaining why this Delegated Resource Access Request is needed by the support operator. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reasonForRequest") + private final String reasonForRequest; + + /** + * A short description explaining why this Delegated Resource Access Request is needed by the support operator. + * @return the value + **/ + public String getReasonForRequest() { + return reasonForRequest; + } + + /** + * Detailed description of this Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Detailed description of this Delegated Resource Access Request. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Requested access start time in UTC. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccessRequested") + private final java.util.Date timeAccessRequested; + + /** + * Requested access start time in UTC. + * @return the value + **/ + public java.util.Date getTimeAccessRequested() { + return timeAccessRequested; + } + + /** + * The OCID of the target resource associated with the Delegated Resource Access Request. The support operator raises a Delegated Resource Access Request to get approval to + * access the target resource. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * The OCID of the target resource associated with the Delegated Resource Access Request. The support operator raises a Delegated Resource Access Request to get approval to + * access the target resource. + * + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * The name of the target resource associated with the Delegated Resource Access Request. The support operator raises a Delegated Resource Access Request to get approval to + * access the target resource. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceName") + private final String resourceName; + + /** + * The name of the target resource associated with the Delegated Resource Access Request. The support operator raises a Delegated Resource Access Request to get approval to + * access the target resource. + * + * @return the value + **/ + public String getResourceName() { + return resourceName; + } + + /** + * Resource type for which the associated Delegation Control is applicable to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private final DelegationControlResourceType resourceType; + + /** + * Resource type for which the associated Delegation Control is applicable to. + * @return the value + **/ + public DelegationControlResourceType getResourceType() { + return resourceType; + } + + /** + * Requester type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requesterType") + private final DelegatedResourceAccessRequesterType requesterType; + + /** + * Requester type + * @return the value + **/ + public DelegatedResourceAccessRequesterType getRequesterType() { + return requesterType; + } + + /** + * List of Service Provider Action names for which approval is sought by the support operator user. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestedActionNames") + private final java.util.List requestedActionNames; + + /** + * List of Service Provider Action names for which approval is sought by the support operator user. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. + * @return the value + **/ + public java.util.List getRequestedActionNames() { + return requestedActionNames; + } + + /** + * List of Database unique names for which access is requested. This parameter is required for DLGT_MGMT_SYS_MAINT_ACCESS cage when database access in needed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseNameList") + private final java.util.List databaseNameList; + + /** + * List of Database unique names for which access is requested. This parameter is required for DLGT_MGMT_SYS_MAINT_ACCESS cage when database access in needed. + * @return the value + **/ + public java.util.List getDatabaseNameList() { + return databaseNameList; + } + + /** + * List of Service Provider Service Types being provided by the support operator user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("providedServiceTypes") + private final java.util.List providedServiceTypes; + + /** + * List of Service Provider Service Types being provided by the support operator user. + * @return the value + **/ + public java.util.List getProvidedServiceTypes() { + return providedServiceTypes; + } + + /** + * List of Delegation Subscription OCID that are associated with this Delegated Resource Access Request based on the service types being requested. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("delegationSubscriptionIds") + private final java.util.List delegationSubscriptionIds; + + /** + * List of Delegation Subscription OCID that are associated with this Delegated Resource Access Request based on the service types being requested. + * @return the value + **/ + public java.util.List getDelegationSubscriptionIds() { + return delegationSubscriptionIds; + } + + /** + * Priority assigned to the Delegated Resource Access Request by the support operator + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private final DelegatedResourceAccessRequestSeverity severity; + + /** + * Priority assigned to the Delegated Resource Access Request by the support operator + * @return the value + **/ + public DelegatedResourceAccessRequestSeverity getSeverity() { + return severity; + } + + /** + * Duration in hours for which access is sought on the target resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("durationInHours") + private final Integer durationInHours; + + /** + * Duration in hours for which access is sought on the target resource. + * @return the value + **/ + public Integer getDurationInHours() { + return durationInHours; + } + + /** + * Duration in hours for which extension access is sought on the target resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("extendDurationInHours") + private final Integer extendDurationInHours; + + /** + * Duration in hours for which extension access is sought on the target resource. + * @return the value + **/ + public Integer getExtendDurationInHours() { + return extendDurationInHours; + } + + /** + * Set to true if the request is approved automatically based on preApprovedServiceProviderActionNames or isAutoApproveDuringMaintenance in the associated Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoApproved") + private final Boolean isAutoApproved; + + /** + * Set to true if the request is approved automatically based on preApprovedServiceProviderActionNames or isAutoApproveDuringMaintenance in the associated Delegation Control. + * @return the value + **/ + public Boolean getIsAutoApproved() { + return isAutoApproved; + } + + /** + * The current lifecycle state of the Delegated Resource Access Request. + **/ + public enum LifecycleState { + Accepted("ACCEPTED"), + InProgress("IN_PROGRESS"), + Waiting("WAITING"), + Failed("FAILED"), + Succeeded("SUCCEEDED"), + Canceling("CANCELING"), + Canceled("CANCELED"), + NeedsAttention("NEEDS_ATTENTION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current lifecycle state of the Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Delegated Resource Access Request. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Description of the current lifecycle state in more detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleStateDetails") + private final String lifecycleStateDetails; + + /** + * Description of the current lifecycle state in more detail. + * @return the value + **/ + public String getLifecycleStateDetails() { + return lifecycleStateDetails; + } + + /** + * The current status of the Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestStatus") + private final DelegatedResourceAccessRequestStatus requestStatus; + + /** + * The current status of the Delegated Resource Access Request. + * @return the value + **/ + public DelegatedResourceAccessRequestStatus getRequestStatus() { + return requestStatus; + } + + /** + * Time when the Delegated Resource Access Request was created in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Time when the Delegated Resource Access Request was created in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * Time when the Delegated Resource Access Request was last modified in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * Time when the Delegated Resource Access Request was last modified in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Number of initial approvals that have been obtained so far. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numInitialApprovals") + private final Integer numInitialApprovals; + + /** + * Number of initial approvals that have been obtained so far. + * @return the value + **/ + public Integer getNumInitialApprovals() { + return numInitialApprovals; + } + + /** + * Number of extension approvals that have been obtained so far. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numExtensionApprovals") + private final Integer numExtensionApprovals; + + /** + * Number of extension approvals that have been obtained so far. + * @return the value + **/ + public Integer getNumExtensionApprovals() { + return numExtensionApprovals; + } + + /** + * In case of single approval, this will have only one item. Else, a list of approvals. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approvalInfo") + private final java.util.List approvalInfo; + + /** + * In case of single approval, this will have only one item. Else, a list of approvals. + * @return the value + **/ + public java.util.List getApprovalInfo() { + return approvalInfo; + } + + /** + * The comment entered by the support operator while closing the request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("closureComment") + private final String closureComment; + + /** + * The comment entered by the support operator while closing the request. + * @return the value + **/ + public String getClosureComment() { + return closureComment; + } + + /** + * The OCID of the Delegation Control governing the target resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("delegationControlId") + private final String delegationControlId; + + /** + * The OCID of the Delegation Control governing the target resource. + * @return the value + **/ + public String getDelegationControlId() { + return delegationControlId; + } + + /** + * Specifies the type of auditing to be enabled. There are two levels of auditing: command-level and keystroke-level. + * By default, both command-level and keystroke-level auditing are enabled, i.e. commands and key strokes issued by the support operator are logged. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("auditTypes") + private final java.util.List auditTypes; + + /** + * Specifies the type of auditing to be enabled. There are two levels of auditing: command-level and keystroke-level. + * By default, both command-level and keystroke-level auditing are enabled, i.e. commands and key strokes issued by the support operator are logged. + * + * @return the value + **/ + public java.util.List getAuditTypes() { + return auditTypes; + } + + /** + * Indicates if the delegated resource access request is waiting on more information from the operator + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isPendingMoreInfo") + private final Boolean isPendingMoreInfo; + + /** + * Indicates if the delegated resource access request is waiting on more information from the operator + * @return the value + **/ + public Boolean getIsPendingMoreInfo() { + return isPendingMoreInfo; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DelegatedResourceAccessRequest("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", ticketNumbers=").append(String.valueOf(this.ticketNumbers)); + sb.append(", reasonForRequest=").append(String.valueOf(this.reasonForRequest)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", timeAccessRequested=").append(String.valueOf(this.timeAccessRequested)); + sb.append(", resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", resourceName=").append(String.valueOf(this.resourceName)); + sb.append(", resourceType=").append(String.valueOf(this.resourceType)); + sb.append(", requesterType=").append(String.valueOf(this.requesterType)); + sb.append(", requestedActionNames=").append(String.valueOf(this.requestedActionNames)); + sb.append(", databaseNameList=").append(String.valueOf(this.databaseNameList)); + sb.append(", providedServiceTypes=").append(String.valueOf(this.providedServiceTypes)); + sb.append(", delegationSubscriptionIds=") + .append(String.valueOf(this.delegationSubscriptionIds)); + sb.append(", severity=").append(String.valueOf(this.severity)); + sb.append(", durationInHours=").append(String.valueOf(this.durationInHours)); + sb.append(", extendDurationInHours=").append(String.valueOf(this.extendDurationInHours)); + sb.append(", isAutoApproved=").append(String.valueOf(this.isAutoApproved)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleStateDetails=").append(String.valueOf(this.lifecycleStateDetails)); + sb.append(", requestStatus=").append(String.valueOf(this.requestStatus)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", numInitialApprovals=").append(String.valueOf(this.numInitialApprovals)); + sb.append(", numExtensionApprovals=").append(String.valueOf(this.numExtensionApprovals)); + sb.append(", approvalInfo=").append(String.valueOf(this.approvalInfo)); + sb.append(", closureComment=").append(String.valueOf(this.closureComment)); + sb.append(", delegationControlId=").append(String.valueOf(this.delegationControlId)); + sb.append(", auditTypes=").append(String.valueOf(this.auditTypes)); + sb.append(", isPendingMoreInfo=").append(String.valueOf(this.isPendingMoreInfo)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DelegatedResourceAccessRequest)) { + return false; + } + + DelegatedResourceAccessRequest other = (DelegatedResourceAccessRequest) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.ticketNumbers, other.ticketNumbers) + && java.util.Objects.equals(this.reasonForRequest, other.reasonForRequest) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.timeAccessRequested, other.timeAccessRequested) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.resourceName, other.resourceName) + && java.util.Objects.equals(this.resourceType, other.resourceType) + && java.util.Objects.equals(this.requesterType, other.requesterType) + && java.util.Objects.equals(this.requestedActionNames, other.requestedActionNames) + && java.util.Objects.equals(this.databaseNameList, other.databaseNameList) + && java.util.Objects.equals(this.providedServiceTypes, other.providedServiceTypes) + && java.util.Objects.equals( + this.delegationSubscriptionIds, other.delegationSubscriptionIds) + && java.util.Objects.equals(this.severity, other.severity) + && java.util.Objects.equals(this.durationInHours, other.durationInHours) + && java.util.Objects.equals(this.extendDurationInHours, other.extendDurationInHours) + && java.util.Objects.equals(this.isAutoApproved, other.isAutoApproved) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleStateDetails, other.lifecycleStateDetails) + && java.util.Objects.equals(this.requestStatus, other.requestStatus) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.numInitialApprovals, other.numInitialApprovals) + && java.util.Objects.equals(this.numExtensionApprovals, other.numExtensionApprovals) + && java.util.Objects.equals(this.approvalInfo, other.approvalInfo) + && java.util.Objects.equals(this.closureComment, other.closureComment) + && java.util.Objects.equals(this.delegationControlId, other.delegationControlId) + && java.util.Objects.equals(this.auditTypes, other.auditTypes) + && java.util.Objects.equals(this.isPendingMoreInfo, other.isPendingMoreInfo) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.ticketNumbers == null ? 43 : this.ticketNumbers.hashCode()); + result = + (result * PRIME) + + (this.reasonForRequest == null ? 43 : this.reasonForRequest.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.timeAccessRequested == null + ? 43 + : this.timeAccessRequested.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.resourceName == null ? 43 : this.resourceName.hashCode()); + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); + result = + (result * PRIME) + + (this.requesterType == null ? 43 : this.requesterType.hashCode()); + result = + (result * PRIME) + + (this.requestedActionNames == null + ? 43 + : this.requestedActionNames.hashCode()); + result = + (result * PRIME) + + (this.databaseNameList == null ? 43 : this.databaseNameList.hashCode()); + result = + (result * PRIME) + + (this.providedServiceTypes == null + ? 43 + : this.providedServiceTypes.hashCode()); + result = + (result * PRIME) + + (this.delegationSubscriptionIds == null + ? 43 + : this.delegationSubscriptionIds.hashCode()); + result = (result * PRIME) + (this.severity == null ? 43 : this.severity.hashCode()); + result = + (result * PRIME) + + (this.durationInHours == null ? 43 : this.durationInHours.hashCode()); + result = + (result * PRIME) + + (this.extendDurationInHours == null + ? 43 + : this.extendDurationInHours.hashCode()); + result = + (result * PRIME) + + (this.isAutoApproved == null ? 43 : this.isAutoApproved.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleStateDetails == null + ? 43 + : this.lifecycleStateDetails.hashCode()); + result = + (result * PRIME) + + (this.requestStatus == null ? 43 : this.requestStatus.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.numInitialApprovals == null + ? 43 + : this.numInitialApprovals.hashCode()); + result = + (result * PRIME) + + (this.numExtensionApprovals == null + ? 43 + : this.numExtensionApprovals.hashCode()); + result = (result * PRIME) + (this.approvalInfo == null ? 43 : this.approvalInfo.hashCode()); + result = + (result * PRIME) + + (this.closureComment == null ? 43 : this.closureComment.hashCode()); + result = + (result * PRIME) + + (this.delegationControlId == null + ? 43 + : this.delegationControlId.hashCode()); + result = (result * PRIME) + (this.auditTypes == null ? 43 : this.auditTypes.hashCode()); + result = + (result * PRIME) + + (this.isPendingMoreInfo == null ? 43 : this.isPendingMoreInfo.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestApprovalDetails.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestApprovalDetails.java new file mode 100644 index 00000000000..491745e9f2b --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestApprovalDetails.java @@ -0,0 +1,453 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Approval info for initial access or extension of a Delegated Resource Access Request + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DelegatedResourceAccessRequestApprovalDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DelegatedResourceAccessRequestApprovalDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "approvalAction", + "timeApprovedForAccess", + "approvalType", + "approverComment", + "approverId", + "approverAdditionalMessage" + }) + public DelegatedResourceAccessRequestApprovalDetails( + ApprovalAction approvalAction, + java.util.Date timeApprovedForAccess, + ApprovalType approvalType, + String approverComment, + String approverId, + String approverAdditionalMessage) { + super(); + this.approvalAction = approvalAction; + this.timeApprovedForAccess = timeApprovedForAccess; + this.approvalType = approvalType; + this.approverComment = approverComment; + this.approverId = approverId; + this.approverAdditionalMessage = approverAdditionalMessage; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Indicated whether the request is approved or rejected. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approvalAction") + private ApprovalAction approvalAction; + + /** + * Indicated whether the request is approved or rejected. + * @param approvalAction the value to set + * @return this builder + **/ + public Builder approvalAction(ApprovalAction approvalAction) { + this.approvalAction = approvalAction; + this.__explicitlySet__.add("approvalAction"); + return this; + } + /** + * Access start time that is actually approved by the customer in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeApprovedForAccess") + private java.util.Date timeApprovedForAccess; + + /** + * Access start time that is actually approved by the customer in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * @param timeApprovedForAccess the value to set + * @return this builder + **/ + public Builder timeApprovedForAccess(java.util.Date timeApprovedForAccess) { + this.timeApprovedForAccess = timeApprovedForAccess; + this.__explicitlySet__.add("timeApprovedForAccess"); + return this; + } + /** + * approval type, initial or extension + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approvalType") + private ApprovalType approvalType; + + /** + * approval type, initial or extension + * @param approvalType the value to set + * @return this builder + **/ + public Builder approvalType(ApprovalType approvalType) { + this.approvalType = approvalType; + this.__explicitlySet__.add("approvalType"); + return this; + } + /** + * Comment specified by the approver of the request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approverComment") + private String approverComment; + + /** + * Comment specified by the approver of the request. + * @param approverComment the value to set + * @return this builder + **/ + public Builder approverComment(String approverComment) { + this.approverComment = approverComment; + this.__explicitlySet__.add("approverComment"); + return this; + } + /** + * User ID of the approver. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approverId") + private String approverId; + + /** + * User ID of the approver. + * @param approverId the value to set + * @return this builder + **/ + public Builder approverId(String approverId) { + this.approverId = approverId; + this.__explicitlySet__.add("approverId"); + return this; + } + /** + * Additional message specified by the approver of the request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approverAdditionalMessage") + private String approverAdditionalMessage; + + /** + * Additional message specified by the approver of the request. + * @param approverAdditionalMessage the value to set + * @return this builder + **/ + public Builder approverAdditionalMessage(String approverAdditionalMessage) { + this.approverAdditionalMessage = approverAdditionalMessage; + this.__explicitlySet__.add("approverAdditionalMessage"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DelegatedResourceAccessRequestApprovalDetails build() { + DelegatedResourceAccessRequestApprovalDetails model = + new DelegatedResourceAccessRequestApprovalDetails( + this.approvalAction, + this.timeApprovedForAccess, + this.approvalType, + this.approverComment, + this.approverId, + this.approverAdditionalMessage); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DelegatedResourceAccessRequestApprovalDetails model) { + if (model.wasPropertyExplicitlySet("approvalAction")) { + this.approvalAction(model.getApprovalAction()); + } + if (model.wasPropertyExplicitlySet("timeApprovedForAccess")) { + this.timeApprovedForAccess(model.getTimeApprovedForAccess()); + } + if (model.wasPropertyExplicitlySet("approvalType")) { + this.approvalType(model.getApprovalType()); + } + if (model.wasPropertyExplicitlySet("approverComment")) { + this.approverComment(model.getApproverComment()); + } + if (model.wasPropertyExplicitlySet("approverId")) { + this.approverId(model.getApproverId()); + } + if (model.wasPropertyExplicitlySet("approverAdditionalMessage")) { + this.approverAdditionalMessage(model.getApproverAdditionalMessage()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Indicated whether the request is approved or rejected. + **/ + public enum ApprovalAction { + Approve("APPROVE"), + Reject("REJECT"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ApprovalAction.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ApprovalAction v : ApprovalAction.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ApprovalAction(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ApprovalAction create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ApprovalAction', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Indicated whether the request is approved or rejected. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approvalAction") + private final ApprovalAction approvalAction; + + /** + * Indicated whether the request is approved or rejected. + * @return the value + **/ + public ApprovalAction getApprovalAction() { + return approvalAction; + } + + /** + * Access start time that is actually approved by the customer in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeApprovedForAccess") + private final java.util.Date timeApprovedForAccess; + + /** + * Access start time that is actually approved by the customer in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * @return the value + **/ + public java.util.Date getTimeApprovedForAccess() { + return timeApprovedForAccess; + } + + /** + * approval type, initial or extension + **/ + public enum ApprovalType { + Initial("INITIAL"), + Extension("EXTENSION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ApprovalType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ApprovalType v : ApprovalType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ApprovalType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ApprovalType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ApprovalType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * approval type, initial or extension + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approvalType") + private final ApprovalType approvalType; + + /** + * approval type, initial or extension + * @return the value + **/ + public ApprovalType getApprovalType() { + return approvalType; + } + + /** + * Comment specified by the approver of the request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approverComment") + private final String approverComment; + + /** + * Comment specified by the approver of the request. + * @return the value + **/ + public String getApproverComment() { + return approverComment; + } + + /** + * User ID of the approver. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approverId") + private final String approverId; + + /** + * User ID of the approver. + * @return the value + **/ + public String getApproverId() { + return approverId; + } + + /** + * Additional message specified by the approver of the request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approverAdditionalMessage") + private final String approverAdditionalMessage; + + /** + * Additional message specified by the approver of the request. + * @return the value + **/ + public String getApproverAdditionalMessage() { + return approverAdditionalMessage; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DelegatedResourceAccessRequestApprovalDetails("); + sb.append("super=").append(super.toString()); + sb.append("approvalAction=").append(String.valueOf(this.approvalAction)); + sb.append(", timeApprovedForAccess=").append(String.valueOf(this.timeApprovedForAccess)); + sb.append(", approvalType=").append(String.valueOf(this.approvalType)); + sb.append(", approverComment=").append(String.valueOf(this.approverComment)); + sb.append(", approverId=").append(String.valueOf(this.approverId)); + sb.append(", approverAdditionalMessage=") + .append(String.valueOf(this.approverAdditionalMessage)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DelegatedResourceAccessRequestApprovalDetails)) { + return false; + } + + DelegatedResourceAccessRequestApprovalDetails other = + (DelegatedResourceAccessRequestApprovalDetails) o; + return java.util.Objects.equals(this.approvalAction, other.approvalAction) + && java.util.Objects.equals(this.timeApprovedForAccess, other.timeApprovedForAccess) + && java.util.Objects.equals(this.approvalType, other.approvalType) + && java.util.Objects.equals(this.approverComment, other.approverComment) + && java.util.Objects.equals(this.approverId, other.approverId) + && java.util.Objects.equals( + this.approverAdditionalMessage, other.approverAdditionalMessage) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.approvalAction == null ? 43 : this.approvalAction.hashCode()); + result = + (result * PRIME) + + (this.timeApprovedForAccess == null + ? 43 + : this.timeApprovedForAccess.hashCode()); + result = (result * PRIME) + (this.approvalType == null ? 43 : this.approvalType.hashCode()); + result = + (result * PRIME) + + (this.approverComment == null ? 43 : this.approverComment.hashCode()); + result = (result * PRIME) + (this.approverId == null ? 43 : this.approverId.hashCode()); + result = + (result * PRIME) + + (this.approverAdditionalMessage == null + ? 43 + : this.approverAdditionalMessage.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestAuditLogReport.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestAuditLogReport.java new file mode 100644 index 00000000000..c2a5f1c2afa --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestAuditLogReport.java @@ -0,0 +1,272 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * The audit log report details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DelegatedResourceAccessRequestAuditLogReport.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DelegatedResourceAccessRequestAuditLogReport + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "report", + "processTree", + "auditReportStatus", + "timeReportGenerated" + }) + public DelegatedResourceAccessRequestAuditLogReport( + String report, + String processTree, + AuditReportStatus auditReportStatus, + java.util.Date timeReportGenerated) { + super(); + this.report = report; + this.processTree = processTree; + this.auditReportStatus = auditReportStatus; + this.timeReportGenerated = timeReportGenerated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Audit log report. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("report") + private String report; + + /** + * Audit log report. + * @param report the value to set + * @return this builder + **/ + public Builder report(String report) { + this.report = report; + this.__explicitlySet__.add("report"); + return this; + } + /** + * The process tree data + **/ + @com.fasterxml.jackson.annotation.JsonProperty("processTree") + private String processTree; + + /** + * The process tree data + * @param processTree the value to set + * @return this builder + **/ + public Builder processTree(String processTree) { + this.processTree = processTree; + this.__explicitlySet__.add("processTree"); + return this; + } + /** + * Status of the audit report + **/ + @com.fasterxml.jackson.annotation.JsonProperty("auditReportStatus") + private AuditReportStatus auditReportStatus; + + /** + * Status of the audit report + * @param auditReportStatus the value to set + * @return this builder + **/ + public Builder auditReportStatus(AuditReportStatus auditReportStatus) { + this.auditReportStatus = auditReportStatus; + this.__explicitlySet__.add("auditReportStatus"); + return this; + } + /** + * Time when the audit report was generated [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeReportGenerated") + private java.util.Date timeReportGenerated; + + /** + * Time when the audit report was generated [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @param timeReportGenerated the value to set + * @return this builder + **/ + public Builder timeReportGenerated(java.util.Date timeReportGenerated) { + this.timeReportGenerated = timeReportGenerated; + this.__explicitlySet__.add("timeReportGenerated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DelegatedResourceAccessRequestAuditLogReport build() { + DelegatedResourceAccessRequestAuditLogReport model = + new DelegatedResourceAccessRequestAuditLogReport( + this.report, + this.processTree, + this.auditReportStatus, + this.timeReportGenerated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DelegatedResourceAccessRequestAuditLogReport model) { + if (model.wasPropertyExplicitlySet("report")) { + this.report(model.getReport()); + } + if (model.wasPropertyExplicitlySet("processTree")) { + this.processTree(model.getProcessTree()); + } + if (model.wasPropertyExplicitlySet("auditReportStatus")) { + this.auditReportStatus(model.getAuditReportStatus()); + } + if (model.wasPropertyExplicitlySet("timeReportGenerated")) { + this.timeReportGenerated(model.getTimeReportGenerated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Audit log report. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("report") + private final String report; + + /** + * Audit log report. + * @return the value + **/ + public String getReport() { + return report; + } + + /** + * The process tree data + **/ + @com.fasterxml.jackson.annotation.JsonProperty("processTree") + private final String processTree; + + /** + * The process tree data + * @return the value + **/ + public String getProcessTree() { + return processTree; + } + + /** + * Status of the audit report + **/ + @com.fasterxml.jackson.annotation.JsonProperty("auditReportStatus") + private final AuditReportStatus auditReportStatus; + + /** + * Status of the audit report + * @return the value + **/ + public AuditReportStatus getAuditReportStatus() { + return auditReportStatus; + } + + /** + * Time when the audit report was generated [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeReportGenerated") + private final java.util.Date timeReportGenerated; + + /** + * Time when the audit report was generated [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @return the value + **/ + public java.util.Date getTimeReportGenerated() { + return timeReportGenerated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DelegatedResourceAccessRequestAuditLogReport("); + sb.append("super=").append(super.toString()); + sb.append("report=").append(String.valueOf(this.report)); + sb.append(", processTree=").append(String.valueOf(this.processTree)); + sb.append(", auditReportStatus=").append(String.valueOf(this.auditReportStatus)); + sb.append(", timeReportGenerated=").append(String.valueOf(this.timeReportGenerated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DelegatedResourceAccessRequestAuditLogReport)) { + return false; + } + + DelegatedResourceAccessRequestAuditLogReport other = + (DelegatedResourceAccessRequestAuditLogReport) o; + return java.util.Objects.equals(this.report, other.report) + && java.util.Objects.equals(this.processTree, other.processTree) + && java.util.Objects.equals(this.auditReportStatus, other.auditReportStatus) + && java.util.Objects.equals(this.timeReportGenerated, other.timeReportGenerated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.report == null ? 43 : this.report.hashCode()); + result = (result * PRIME) + (this.processTree == null ? 43 : this.processTree.hashCode()); + result = + (result * PRIME) + + (this.auditReportStatus == null ? 43 : this.auditReportStatus.hashCode()); + result = + (result * PRIME) + + (this.timeReportGenerated == null + ? 43 + : this.timeReportGenerated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestAuditType.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestAuditType.java new file mode 100644 index 00000000000..f0827cd058f --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestAuditType.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Possible audit type for Delegated Resource Access Request. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public enum DelegatedResourceAccessRequestAuditType { + CommandAudit("COMMAND_AUDIT"), + CommandKeystrokeAudit("COMMAND_KEYSTROKE_AUDIT"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DelegatedResourceAccessRequestAuditType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DelegatedResourceAccessRequestAuditType v : + DelegatedResourceAccessRequestAuditType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DelegatedResourceAccessRequestAuditType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DelegatedResourceAccessRequestAuditType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DelegatedResourceAccessRequestAuditType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestHistoryCollection.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestHistoryCollection.java new file mode 100644 index 00000000000..4a21bf442a9 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestHistoryCollection.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * List of Delegated Resource Access Request status transitions. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DelegatedResourceAccessRequestHistoryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DelegatedResourceAccessRequestHistoryCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public DelegatedResourceAccessRequestHistoryCollection( + java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of DelegatedResourceAccessRequestHistorySummary objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of DelegatedResourceAccessRequestHistorySummary objects. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DelegatedResourceAccessRequestHistoryCollection build() { + DelegatedResourceAccessRequestHistoryCollection model = + new DelegatedResourceAccessRequestHistoryCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DelegatedResourceAccessRequestHistoryCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of DelegatedResourceAccessRequestHistorySummary objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of DelegatedResourceAccessRequestHistorySummary objects. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DelegatedResourceAccessRequestHistoryCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DelegatedResourceAccessRequestHistoryCollection)) { + return false; + } + + DelegatedResourceAccessRequestHistoryCollection other = + (DelegatedResourceAccessRequestHistoryCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestHistorySummary.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestHistorySummary.java new file mode 100644 index 00000000000..abee6b9ef1a --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestHistorySummary.java @@ -0,0 +1,311 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Summary of Delegated Resource Access Request status changes. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DelegatedResourceAccessRequestHistorySummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DelegatedResourceAccessRequestHistorySummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "lifecycleState", + "requestStatus", + "userId", + "comment", + "timestamp" + }) + public DelegatedResourceAccessRequestHistorySummary( + DelegatedResourceAccessRequest.LifecycleState lifecycleState, + DelegatedResourceAccessRequestStatus requestStatus, + String userId, + String comment, + java.util.Date timestamp) { + super(); + this.lifecycleState = lifecycleState; + this.requestStatus = requestStatus; + this.userId = userId; + this.comment = comment; + this.timestamp = timestamp; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The current lifecycle state of the Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private DelegatedResourceAccessRequest.LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Delegated Resource Access Request. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState( + DelegatedResourceAccessRequest.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The current status of the Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestStatus") + private DelegatedResourceAccessRequestStatus requestStatus; + + /** + * The current status of the Delegated Resource Access Request. + * @param requestStatus the value to set + * @return this builder + **/ + public Builder requestStatus(DelegatedResourceAccessRequestStatus requestStatus) { + this.requestStatus = requestStatus; + this.__explicitlySet__.add("requestStatus"); + return this; + } + /** + * ID of user who modified the Delegated Resource Access Request. For operator, this field is "Operator". + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userId") + private String userId; + + /** + * ID of user who modified the Delegated Resource Access Request. For operator, this field is "Operator". + * @param userId the value to set + * @return this builder + **/ + public Builder userId(String userId) { + this.userId = userId; + this.__explicitlySet__.add("userId"); + return this; + } + /** + * Comment about the status change. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("comment") + private String comment; + + /** + * Comment about the status change. + * @param comment the value to set + * @return this builder + **/ + public Builder comment(String comment) { + this.comment = comment; + this.__explicitlySet__.add("comment"); + return this; + } + /** + * Time when the respective action happened in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + /** + * Time when the respective action happened in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + * @param timestamp the value to set + * @return this builder + **/ + public Builder timestamp(java.util.Date timestamp) { + this.timestamp = timestamp; + this.__explicitlySet__.add("timestamp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DelegatedResourceAccessRequestHistorySummary build() { + DelegatedResourceAccessRequestHistorySummary model = + new DelegatedResourceAccessRequestHistorySummary( + this.lifecycleState, + this.requestStatus, + this.userId, + this.comment, + this.timestamp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DelegatedResourceAccessRequestHistorySummary model) { + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("requestStatus")) { + this.requestStatus(model.getRequestStatus()); + } + if (model.wasPropertyExplicitlySet("userId")) { + this.userId(model.getUserId()); + } + if (model.wasPropertyExplicitlySet("comment")) { + this.comment(model.getComment()); + } + if (model.wasPropertyExplicitlySet("timestamp")) { + this.timestamp(model.getTimestamp()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The current lifecycle state of the Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final DelegatedResourceAccessRequest.LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Delegated Resource Access Request. + * @return the value + **/ + public DelegatedResourceAccessRequest.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The current status of the Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestStatus") + private final DelegatedResourceAccessRequestStatus requestStatus; + + /** + * The current status of the Delegated Resource Access Request. + * @return the value + **/ + public DelegatedResourceAccessRequestStatus getRequestStatus() { + return requestStatus; + } + + /** + * ID of user who modified the Delegated Resource Access Request. For operator, this field is "Operator". + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userId") + private final String userId; + + /** + * ID of user who modified the Delegated Resource Access Request. For operator, this field is "Operator". + * @return the value + **/ + public String getUserId() { + return userId; + } + + /** + * Comment about the status change. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("comment") + private final String comment; + + /** + * Comment about the status change. + * @return the value + **/ + public String getComment() { + return comment; + } + + /** + * Time when the respective action happened in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private final java.util.Date timestamp; + + /** + * Time when the respective action happened in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + * @return the value + **/ + public java.util.Date getTimestamp() { + return timestamp; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DelegatedResourceAccessRequestHistorySummary("); + sb.append("super=").append(super.toString()); + sb.append("lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", requestStatus=").append(String.valueOf(this.requestStatus)); + sb.append(", userId=").append(String.valueOf(this.userId)); + sb.append(", comment=").append(String.valueOf(this.comment)); + sb.append(", timestamp=").append(String.valueOf(this.timestamp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DelegatedResourceAccessRequestHistorySummary)) { + return false; + } + + DelegatedResourceAccessRequestHistorySummary other = + (DelegatedResourceAccessRequestHistorySummary) o; + return java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.requestStatus, other.requestStatus) + && java.util.Objects.equals(this.userId, other.userId) + && java.util.Objects.equals(this.comment, other.comment) + && java.util.Objects.equals(this.timestamp, other.timestamp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.requestStatus == null ? 43 : this.requestStatus.hashCode()); + result = (result * PRIME) + (this.userId == null ? 43 : this.userId.hashCode()); + result = (result * PRIME) + (this.comment == null ? 43 : this.comment.hashCode()); + result = (result * PRIME) + (this.timestamp == null ? 43 : this.timestamp.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestSeverity.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestSeverity.java new file mode 100644 index 00000000000..abe50b9f015 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestSeverity.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Levels of severities associated with a Delegated Resource Access Request + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public enum DelegatedResourceAccessRequestSeverity { + S1("S1"), + S2("S2"), + S3("S3"), + S4("S4"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DelegatedResourceAccessRequestSeverity.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DelegatedResourceAccessRequestSeverity v : + DelegatedResourceAccessRequestSeverity.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DelegatedResourceAccessRequestSeverity(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DelegatedResourceAccessRequestSeverity create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DelegatedResourceAccessRequestSeverity', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestStatus.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestStatus.java new file mode 100644 index 00000000000..ebc99efe1e2 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestStatus.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Possible status for a Delegated Resource Access Request. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public enum DelegatedResourceAccessRequestStatus { + Created("CREATED"), + ApprovalWaiting("APPROVAL_WAITING"), + OperatorAssignmentWaiting("OPERATOR_ASSIGNMENT_WAITING"), + Preapproved("PREAPPROVED"), + Approved("APPROVED"), + ApprovedForFuture("APPROVED_FOR_FUTURE"), + Rejected("REJECTED"), + Deployed("DEPLOYED"), + DeployFailed("DEPLOY_FAILED"), + Undeployed("UNDEPLOYED"), + UndeployFailed("UNDEPLOY_FAILED"), + CloseFailed("CLOSE_FAILED"), + RevokeFailed("REVOKE_FAILED"), + ExpiryFailed("EXPIRY_FAILED"), + Revoking("REVOKING"), + Revoked("REVOKED"), + Extending("EXTENDING"), + Extended("EXTENDED"), + ExtensionRejected("EXTENSION_REJECTED"), + ExtensionFailed("EXTENSION_FAILED"), + Completing("COMPLETING"), + Completed("COMPLETED"), + Expired("EXPIRED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DelegatedResourceAccessRequestStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DelegatedResourceAccessRequestStatus v : + DelegatedResourceAccessRequestStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DelegatedResourceAccessRequestStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DelegatedResourceAccessRequestStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DelegatedResourceAccessRequestStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestSummary.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestSummary.java new file mode 100644 index 00000000000..c3020e00c91 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestSummary.java @@ -0,0 +1,1167 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Summary of Delegated Resource Access Request. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DelegatedResourceAccessRequestSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DelegatedResourceAccessRequestSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "ticketNumbers", + "reasonForRequest", + "timeAccessRequested", + "resourceId", + "resourceName", + "resourceType", + "requestedActionNames", + "requesterType", + "delegationControlId", + "severity", + "durationInHours", + "extendDurationInHours", + "isAutoApproved", + "lifecycleState", + "lifecycleStateDetails", + "requestStatus", + "timeCreated", + "timeUpdated", + "freeformTags", + "definedTags", + "systemTags" + }) + public DelegatedResourceAccessRequestSummary( + String id, + String compartmentId, + String displayName, + java.util.List ticketNumbers, + String reasonForRequest, + java.util.Date timeAccessRequested, + String resourceId, + String resourceName, + DelegationControlResourceType resourceType, + java.util.List requestedActionNames, + DelegatedResourceAccessRequesterType requesterType, + String delegationControlId, + DelegatedResourceAccessRequestSeverity severity, + Integer durationInHours, + Integer extendDurationInHours, + Boolean isAutoApproved, + DelegatedResourceAccessRequest.LifecycleState lifecycleState, + String lifecycleStateDetails, + DelegatedResourceAccessRequestStatus requestStatus, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.ticketNumbers = ticketNumbers; + this.reasonForRequest = reasonForRequest; + this.timeAccessRequested = timeAccessRequested; + this.resourceId = resourceId; + this.resourceName = resourceName; + this.resourceType = resourceType; + this.requestedActionNames = requestedActionNames; + this.requesterType = requesterType; + this.delegationControlId = delegationControlId; + this.severity = severity; + this.durationInHours = durationInHours; + this.extendDurationInHours = extendDurationInHours; + this.isAutoApproved = isAutoApproved; + this.lifecycleState = lifecycleState; + this.lifecycleStateDetails = lifecycleStateDetails; + this.requestStatus = requestStatus; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the Delegated Resource Access Request. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The OCID of the compartment that contains the Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the Delegated Resource Access Request. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Display name. This is generated by the system automatically. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Display name. This is generated by the system automatically. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A list of ticket numbers related to this Delegated Resource Access Request, e.g. Service Request (SR) number and JIRA ticket number. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ticketNumbers") + private java.util.List ticketNumbers; + + /** + * A list of ticket numbers related to this Delegated Resource Access Request, e.g. Service Request (SR) number and JIRA ticket number. + * @param ticketNumbers the value to set + * @return this builder + **/ + public Builder ticketNumbers(java.util.List ticketNumbers) { + this.ticketNumbers = ticketNumbers; + this.__explicitlySet__.add("ticketNumbers"); + return this; + } + /** + * A short description explaining why this Delegated Resource Access Request is needed by the support operator. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reasonForRequest") + private String reasonForRequest; + + /** + * A short description explaining why this Delegated Resource Access Request is needed by the support operator. + * @param reasonForRequest the value to set + * @return this builder + **/ + public Builder reasonForRequest(String reasonForRequest) { + this.reasonForRequest = reasonForRequest; + this.__explicitlySet__.add("reasonForRequest"); + return this; + } + /** + * Requested access start time in UTC. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccessRequested") + private java.util.Date timeAccessRequested; + + /** + * Requested access start time in UTC. + * @param timeAccessRequested the value to set + * @return this builder + **/ + public Builder timeAccessRequested(java.util.Date timeAccessRequested) { + this.timeAccessRequested = timeAccessRequested; + this.__explicitlySet__.add("timeAccessRequested"); + return this; + } + /** + * The OCID of the target resource associated with the Delegated Resource Access Request. The support operator raises a Delegated Resource Access Request to get approval to + * access the target resource. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * The OCID of the target resource associated with the Delegated Resource Access Request. The support operator raises a Delegated Resource Access Request to get approval to + * access the target resource. + * + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * The name of the target resource associated with the Delegated Resource Access Request. The support operator raises a Delegated Resource Access Request to get approval to + * access the target resource. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceName") + private String resourceName; + + /** + * The name of the target resource associated with the Delegated Resource Access Request. The support operator raises a Delegated Resource Access Request to get approval to + * access the target resource. + * + * @param resourceName the value to set + * @return this builder + **/ + public Builder resourceName(String resourceName) { + this.resourceName = resourceName; + this.__explicitlySet__.add("resourceName"); + return this; + } + /** + * Resource type for which the associated Delegation Control is applicable to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private DelegationControlResourceType resourceType; + + /** + * Resource type for which the associated Delegation Control is applicable to. + * @param resourceType the value to set + * @return this builder + **/ + public Builder resourceType(DelegationControlResourceType resourceType) { + this.resourceType = resourceType; + this.__explicitlySet__.add("resourceType"); + return this; + } + /** + * List of Service Provider Action names for which approval is sought by the support operator user. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestedActionNames") + private java.util.List requestedActionNames; + + /** + * List of Service Provider Action names for which approval is sought by the support operator user. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. + * @param requestedActionNames the value to set + * @return this builder + **/ + public Builder requestedActionNames(java.util.List requestedActionNames) { + this.requestedActionNames = requestedActionNames; + this.__explicitlySet__.add("requestedActionNames"); + return this; + } + /** + * Requester type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requesterType") + private DelegatedResourceAccessRequesterType requesterType; + + /** + * Requester type + * @param requesterType the value to set + * @return this builder + **/ + public Builder requesterType(DelegatedResourceAccessRequesterType requesterType) { + this.requesterType = requesterType; + this.__explicitlySet__.add("requesterType"); + return this; + } + /** + * The OCID of the Delegation Control governing the target resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("delegationControlId") + private String delegationControlId; + + /** + * The OCID of the Delegation Control governing the target resource. + * @param delegationControlId the value to set + * @return this builder + **/ + public Builder delegationControlId(String delegationControlId) { + this.delegationControlId = delegationControlId; + this.__explicitlySet__.add("delegationControlId"); + return this; + } + /** + * Priority assigned to the Delegated Resource Access Request by the support operator + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private DelegatedResourceAccessRequestSeverity severity; + + /** + * Priority assigned to the Delegated Resource Access Request by the support operator + * @param severity the value to set + * @return this builder + **/ + public Builder severity(DelegatedResourceAccessRequestSeverity severity) { + this.severity = severity; + this.__explicitlySet__.add("severity"); + return this; + } + /** + * Duration in hours for which access is sought on the target resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("durationInHours") + private Integer durationInHours; + + /** + * Duration in hours for which access is sought on the target resource. + * @param durationInHours the value to set + * @return this builder + **/ + public Builder durationInHours(Integer durationInHours) { + this.durationInHours = durationInHours; + this.__explicitlySet__.add("durationInHours"); + return this; + } + /** + * Duration in hours for which extension access is sought on the target resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("extendDurationInHours") + private Integer extendDurationInHours; + + /** + * Duration in hours for which extension access is sought on the target resource. + * @param extendDurationInHours the value to set + * @return this builder + **/ + public Builder extendDurationInHours(Integer extendDurationInHours) { + this.extendDurationInHours = extendDurationInHours; + this.__explicitlySet__.add("extendDurationInHours"); + return this; + } + /** + * Set to true if the request is approved automatically based on preApprovedServiceProviderActionNames or isAutoApproveDuringMaintenance in the associated Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoApproved") + private Boolean isAutoApproved; + + /** + * Set to true if the request is approved automatically based on preApprovedServiceProviderActionNames or isAutoApproveDuringMaintenance in the associated Delegation Control. + * @param isAutoApproved the value to set + * @return this builder + **/ + public Builder isAutoApproved(Boolean isAutoApproved) { + this.isAutoApproved = isAutoApproved; + this.__explicitlySet__.add("isAutoApproved"); + return this; + } + /** + * The current lifecycle state of the Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private DelegatedResourceAccessRequest.LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Delegated Resource Access Request. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState( + DelegatedResourceAccessRequest.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Description of the current lifecycle state in more detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleStateDetails") + private String lifecycleStateDetails; + + /** + * Description of the current lifecycle state in more detail. + * @param lifecycleStateDetails the value to set + * @return this builder + **/ + public Builder lifecycleStateDetails(String lifecycleStateDetails) { + this.lifecycleStateDetails = lifecycleStateDetails; + this.__explicitlySet__.add("lifecycleStateDetails"); + return this; + } + /** + * The current status of the Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestStatus") + private DelegatedResourceAccessRequestStatus requestStatus; + + /** + * The current status of the Delegated Resource Access Request. + * @param requestStatus the value to set + * @return this builder + **/ + public Builder requestStatus(DelegatedResourceAccessRequestStatus requestStatus) { + this.requestStatus = requestStatus; + this.__explicitlySet__.add("requestStatus"); + return this; + } + /** + * Time when the Delegated Resource Access Request was created by the support operator user in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Time when the Delegated Resource Access Request was created by the support operator user in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * Time when the Delegated Resource Access Request was last modified in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * Time when the Delegated Resource Access Request was last modified in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DelegatedResourceAccessRequestSummary build() { + DelegatedResourceAccessRequestSummary model = + new DelegatedResourceAccessRequestSummary( + this.id, + this.compartmentId, + this.displayName, + this.ticketNumbers, + this.reasonForRequest, + this.timeAccessRequested, + this.resourceId, + this.resourceName, + this.resourceType, + this.requestedActionNames, + this.requesterType, + this.delegationControlId, + this.severity, + this.durationInHours, + this.extendDurationInHours, + this.isAutoApproved, + this.lifecycleState, + this.lifecycleStateDetails, + this.requestStatus, + this.timeCreated, + this.timeUpdated, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DelegatedResourceAccessRequestSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("ticketNumbers")) { + this.ticketNumbers(model.getTicketNumbers()); + } + if (model.wasPropertyExplicitlySet("reasonForRequest")) { + this.reasonForRequest(model.getReasonForRequest()); + } + if (model.wasPropertyExplicitlySet("timeAccessRequested")) { + this.timeAccessRequested(model.getTimeAccessRequested()); + } + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("resourceName")) { + this.resourceName(model.getResourceName()); + } + if (model.wasPropertyExplicitlySet("resourceType")) { + this.resourceType(model.getResourceType()); + } + if (model.wasPropertyExplicitlySet("requestedActionNames")) { + this.requestedActionNames(model.getRequestedActionNames()); + } + if (model.wasPropertyExplicitlySet("requesterType")) { + this.requesterType(model.getRequesterType()); + } + if (model.wasPropertyExplicitlySet("delegationControlId")) { + this.delegationControlId(model.getDelegationControlId()); + } + if (model.wasPropertyExplicitlySet("severity")) { + this.severity(model.getSeverity()); + } + if (model.wasPropertyExplicitlySet("durationInHours")) { + this.durationInHours(model.getDurationInHours()); + } + if (model.wasPropertyExplicitlySet("extendDurationInHours")) { + this.extendDurationInHours(model.getExtendDurationInHours()); + } + if (model.wasPropertyExplicitlySet("isAutoApproved")) { + this.isAutoApproved(model.getIsAutoApproved()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleStateDetails")) { + this.lifecycleStateDetails(model.getLifecycleStateDetails()); + } + if (model.wasPropertyExplicitlySet("requestStatus")) { + this.requestStatus(model.getRequestStatus()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the Delegated Resource Access Request. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of the compartment that contains the Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the Delegated Resource Access Request. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Display name. This is generated by the system automatically. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Display name. This is generated by the system automatically. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A list of ticket numbers related to this Delegated Resource Access Request, e.g. Service Request (SR) number and JIRA ticket number. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ticketNumbers") + private final java.util.List ticketNumbers; + + /** + * A list of ticket numbers related to this Delegated Resource Access Request, e.g. Service Request (SR) number and JIRA ticket number. + * @return the value + **/ + public java.util.List getTicketNumbers() { + return ticketNumbers; + } + + /** + * A short description explaining why this Delegated Resource Access Request is needed by the support operator. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reasonForRequest") + private final String reasonForRequest; + + /** + * A short description explaining why this Delegated Resource Access Request is needed by the support operator. + * @return the value + **/ + public String getReasonForRequest() { + return reasonForRequest; + } + + /** + * Requested access start time in UTC. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccessRequested") + private final java.util.Date timeAccessRequested; + + /** + * Requested access start time in UTC. + * @return the value + **/ + public java.util.Date getTimeAccessRequested() { + return timeAccessRequested; + } + + /** + * The OCID of the target resource associated with the Delegated Resource Access Request. The support operator raises a Delegated Resource Access Request to get approval to + * access the target resource. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * The OCID of the target resource associated with the Delegated Resource Access Request. The support operator raises a Delegated Resource Access Request to get approval to + * access the target resource. + * + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * The name of the target resource associated with the Delegated Resource Access Request. The support operator raises a Delegated Resource Access Request to get approval to + * access the target resource. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceName") + private final String resourceName; + + /** + * The name of the target resource associated with the Delegated Resource Access Request. The support operator raises a Delegated Resource Access Request to get approval to + * access the target resource. + * + * @return the value + **/ + public String getResourceName() { + return resourceName; + } + + /** + * Resource type for which the associated Delegation Control is applicable to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private final DelegationControlResourceType resourceType; + + /** + * Resource type for which the associated Delegation Control is applicable to. + * @return the value + **/ + public DelegationControlResourceType getResourceType() { + return resourceType; + } + + /** + * List of Service Provider Action names for which approval is sought by the support operator user. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestedActionNames") + private final java.util.List requestedActionNames; + + /** + * List of Service Provider Action names for which approval is sought by the support operator user. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. + * @return the value + **/ + public java.util.List getRequestedActionNames() { + return requestedActionNames; + } + + /** + * Requester type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requesterType") + private final DelegatedResourceAccessRequesterType requesterType; + + /** + * Requester type + * @return the value + **/ + public DelegatedResourceAccessRequesterType getRequesterType() { + return requesterType; + } + + /** + * The OCID of the Delegation Control governing the target resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("delegationControlId") + private final String delegationControlId; + + /** + * The OCID of the Delegation Control governing the target resource. + * @return the value + **/ + public String getDelegationControlId() { + return delegationControlId; + } + + /** + * Priority assigned to the Delegated Resource Access Request by the support operator + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private final DelegatedResourceAccessRequestSeverity severity; + + /** + * Priority assigned to the Delegated Resource Access Request by the support operator + * @return the value + **/ + public DelegatedResourceAccessRequestSeverity getSeverity() { + return severity; + } + + /** + * Duration in hours for which access is sought on the target resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("durationInHours") + private final Integer durationInHours; + + /** + * Duration in hours for which access is sought on the target resource. + * @return the value + **/ + public Integer getDurationInHours() { + return durationInHours; + } + + /** + * Duration in hours for which extension access is sought on the target resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("extendDurationInHours") + private final Integer extendDurationInHours; + + /** + * Duration in hours for which extension access is sought on the target resource. + * @return the value + **/ + public Integer getExtendDurationInHours() { + return extendDurationInHours; + } + + /** + * Set to true if the request is approved automatically based on preApprovedServiceProviderActionNames or isAutoApproveDuringMaintenance in the associated Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoApproved") + private final Boolean isAutoApproved; + + /** + * Set to true if the request is approved automatically based on preApprovedServiceProviderActionNames or isAutoApproveDuringMaintenance in the associated Delegation Control. + * @return the value + **/ + public Boolean getIsAutoApproved() { + return isAutoApproved; + } + + /** + * The current lifecycle state of the Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final DelegatedResourceAccessRequest.LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Delegated Resource Access Request. + * @return the value + **/ + public DelegatedResourceAccessRequest.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Description of the current lifecycle state in more detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleStateDetails") + private final String lifecycleStateDetails; + + /** + * Description of the current lifecycle state in more detail. + * @return the value + **/ + public String getLifecycleStateDetails() { + return lifecycleStateDetails; + } + + /** + * The current status of the Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestStatus") + private final DelegatedResourceAccessRequestStatus requestStatus; + + /** + * The current status of the Delegated Resource Access Request. + * @return the value + **/ + public DelegatedResourceAccessRequestStatus getRequestStatus() { + return requestStatus; + } + + /** + * Time when the Delegated Resource Access Request was created by the support operator user in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Time when the Delegated Resource Access Request was created by the support operator user in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * Time when the Delegated Resource Access Request was last modified in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * Time when the Delegated Resource Access Request was last modified in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DelegatedResourceAccessRequestSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", ticketNumbers=").append(String.valueOf(this.ticketNumbers)); + sb.append(", reasonForRequest=").append(String.valueOf(this.reasonForRequest)); + sb.append(", timeAccessRequested=").append(String.valueOf(this.timeAccessRequested)); + sb.append(", resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", resourceName=").append(String.valueOf(this.resourceName)); + sb.append(", resourceType=").append(String.valueOf(this.resourceType)); + sb.append(", requestedActionNames=").append(String.valueOf(this.requestedActionNames)); + sb.append(", requesterType=").append(String.valueOf(this.requesterType)); + sb.append(", delegationControlId=").append(String.valueOf(this.delegationControlId)); + sb.append(", severity=").append(String.valueOf(this.severity)); + sb.append(", durationInHours=").append(String.valueOf(this.durationInHours)); + sb.append(", extendDurationInHours=").append(String.valueOf(this.extendDurationInHours)); + sb.append(", isAutoApproved=").append(String.valueOf(this.isAutoApproved)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleStateDetails=").append(String.valueOf(this.lifecycleStateDetails)); + sb.append(", requestStatus=").append(String.valueOf(this.requestStatus)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DelegatedResourceAccessRequestSummary)) { + return false; + } + + DelegatedResourceAccessRequestSummary other = (DelegatedResourceAccessRequestSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.ticketNumbers, other.ticketNumbers) + && java.util.Objects.equals(this.reasonForRequest, other.reasonForRequest) + && java.util.Objects.equals(this.timeAccessRequested, other.timeAccessRequested) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.resourceName, other.resourceName) + && java.util.Objects.equals(this.resourceType, other.resourceType) + && java.util.Objects.equals(this.requestedActionNames, other.requestedActionNames) + && java.util.Objects.equals(this.requesterType, other.requesterType) + && java.util.Objects.equals(this.delegationControlId, other.delegationControlId) + && java.util.Objects.equals(this.severity, other.severity) + && java.util.Objects.equals(this.durationInHours, other.durationInHours) + && java.util.Objects.equals(this.extendDurationInHours, other.extendDurationInHours) + && java.util.Objects.equals(this.isAutoApproved, other.isAutoApproved) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleStateDetails, other.lifecycleStateDetails) + && java.util.Objects.equals(this.requestStatus, other.requestStatus) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.ticketNumbers == null ? 43 : this.ticketNumbers.hashCode()); + result = + (result * PRIME) + + (this.reasonForRequest == null ? 43 : this.reasonForRequest.hashCode()); + result = + (result * PRIME) + + (this.timeAccessRequested == null + ? 43 + : this.timeAccessRequested.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.resourceName == null ? 43 : this.resourceName.hashCode()); + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); + result = + (result * PRIME) + + (this.requestedActionNames == null + ? 43 + : this.requestedActionNames.hashCode()); + result = + (result * PRIME) + + (this.requesterType == null ? 43 : this.requesterType.hashCode()); + result = + (result * PRIME) + + (this.delegationControlId == null + ? 43 + : this.delegationControlId.hashCode()); + result = (result * PRIME) + (this.severity == null ? 43 : this.severity.hashCode()); + result = + (result * PRIME) + + (this.durationInHours == null ? 43 : this.durationInHours.hashCode()); + result = + (result * PRIME) + + (this.extendDurationInHours == null + ? 43 + : this.extendDurationInHours.hashCode()); + result = + (result * PRIME) + + (this.isAutoApproved == null ? 43 : this.isAutoApproved.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleStateDetails == null + ? 43 + : this.lifecycleStateDetails.hashCode()); + result = + (result * PRIME) + + (this.requestStatus == null ? 43 : this.requestStatus.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestSummaryCollection.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestSummaryCollection.java new file mode 100644 index 00000000000..8e59321a144 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequestSummaryCollection.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Results of Delegated Resource Access Request search, which contains summary of Delegated Resource Access Request. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DelegatedResourceAccessRequestSummaryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DelegatedResourceAccessRequestSummaryCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public DelegatedResourceAccessRequestSummaryCollection( + java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * contains DelegatedResourceAccessRequestSummary + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * contains DelegatedResourceAccessRequestSummary + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DelegatedResourceAccessRequestSummaryCollection build() { + DelegatedResourceAccessRequestSummaryCollection model = + new DelegatedResourceAccessRequestSummaryCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DelegatedResourceAccessRequestSummaryCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * contains DelegatedResourceAccessRequestSummary + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * contains DelegatedResourceAccessRequestSummary + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DelegatedResourceAccessRequestSummaryCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DelegatedResourceAccessRequestSummaryCollection)) { + return false; + } + + DelegatedResourceAccessRequestSummaryCollection other = + (DelegatedResourceAccessRequestSummaryCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequesterType.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequesterType.java new file mode 100644 index 00000000000..8501b95d5e0 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegatedResourceAccessRequesterType.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Requester types + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public enum DelegatedResourceAccessRequesterType { + Operator("OPERATOR"), + Customer("CUSTOMER"), + System("SYSTEM"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DelegatedResourceAccessRequesterType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DelegatedResourceAccessRequesterType v : + DelegatedResourceAccessRequesterType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DelegatedResourceAccessRequesterType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DelegatedResourceAccessRequesterType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DelegatedResourceAccessRequesterType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationControl.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationControl.java new file mode 100644 index 00000000000..08fe5bc3c2c --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationControl.java @@ -0,0 +1,1199 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Delegation Control enables you to grant, audit, or revoke the access Oracle has to your Exadata Cloud infrastructure, and obtain audit reports of all actions taken by a human operator, in a near real-time manner. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DelegationControl.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DelegationControl extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "description", + "numApprovalsRequired", + "preApprovedServiceProviderActionNames", + "delegationSubscriptionIds", + "isAutoApproveDuringMaintenance", + "resourceIds", + "resourceType", + "notificationTopicId", + "notificationMessageFormat", + "vaultId", + "vaultKeyId", + "lifecycleState", + "lifecycleStateDetails", + "timeCreated", + "timeUpdated", + "timeDeleted", + "freeformTags", + "definedTags", + "systemTags" + }) + public DelegationControl( + String id, + String compartmentId, + String displayName, + String description, + Integer numApprovalsRequired, + java.util.List preApprovedServiceProviderActionNames, + java.util.List delegationSubscriptionIds, + Boolean isAutoApproveDuringMaintenance, + java.util.List resourceIds, + DelegationControlResourceType resourceType, + String notificationTopicId, + NotificationMessageFormat notificationMessageFormat, + String vaultId, + String vaultKeyId, + LifecycleState lifecycleState, + String lifecycleStateDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.Date timeDeleted, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.description = description; + this.numApprovalsRequired = numApprovalsRequired; + this.preApprovedServiceProviderActionNames = preApprovedServiceProviderActionNames; + this.delegationSubscriptionIds = delegationSubscriptionIds; + this.isAutoApproveDuringMaintenance = isAutoApproveDuringMaintenance; + this.resourceIds = resourceIds; + this.resourceType = resourceType; + this.notificationTopicId = notificationTopicId; + this.notificationMessageFormat = notificationMessageFormat; + this.vaultId = vaultId; + this.vaultKeyId = vaultKeyId; + this.lifecycleState = lifecycleState; + this.lifecycleStateDetails = lifecycleStateDetails; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.timeDeleted = timeDeleted; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the Delegation Control. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The OCID of the compartment that contains the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the Delegation Control. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Name of the Delegation Control. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Name of the Delegation Control. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Description of the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the Delegation Control. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * number of approvals required. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numApprovalsRequired") + private Integer numApprovalsRequired; + + /** + * number of approvals required. + * @param numApprovalsRequired the value to set + * @return this builder + **/ + public Builder numApprovalsRequired(Integer numApprovalsRequired) { + this.numApprovalsRequired = numApprovalsRequired; + this.__explicitlySet__.add("numApprovalsRequired"); + return this; + } + /** + * List of pre-approved Service Provider Action names. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. Delegated Resource Access Requests associated with a resource governed by this Delegation Control will be + * automatically approved if the Delegated Resource Access Request only contain Service Provider Actions in the pre-approved list. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("preApprovedServiceProviderActionNames") + private java.util.List preApprovedServiceProviderActionNames; + + /** + * List of pre-approved Service Provider Action names. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. Delegated Resource Access Requests associated with a resource governed by this Delegation Control will be + * automatically approved if the Delegated Resource Access Request only contain Service Provider Actions in the pre-approved list. + * + * @param preApprovedServiceProviderActionNames the value to set + * @return this builder + **/ + public Builder preApprovedServiceProviderActionNames( + java.util.List preApprovedServiceProviderActionNames) { + this.preApprovedServiceProviderActionNames = preApprovedServiceProviderActionNames; + this.__explicitlySet__.add("preApprovedServiceProviderActionNames"); + return this; + } + /** + * List of Delegation Subscription OCID that are allowed for this Delegation Control. The allowed subscriptions will determine the available Service Provider Actions. Only support operators for the allowed subscriptions are allowed to create Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("delegationSubscriptionIds") + private java.util.List delegationSubscriptionIds; + + /** + * List of Delegation Subscription OCID that are allowed for this Delegation Control. The allowed subscriptions will determine the available Service Provider Actions. Only support operators for the allowed subscriptions are allowed to create Delegated Resource Access Request. + * @param delegationSubscriptionIds the value to set + * @return this builder + **/ + public Builder delegationSubscriptionIds(java.util.List delegationSubscriptionIds) { + this.delegationSubscriptionIds = delegationSubscriptionIds; + this.__explicitlySet__.add("delegationSubscriptionIds"); + return this; + } + /** + * Set to true to allow all Delegated Resource Access Request to be approved automatically during maintenance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoApproveDuringMaintenance") + private Boolean isAutoApproveDuringMaintenance; + + /** + * Set to true to allow all Delegated Resource Access Request to be approved automatically during maintenance. + * @param isAutoApproveDuringMaintenance the value to set + * @return this builder + **/ + public Builder isAutoApproveDuringMaintenance(Boolean isAutoApproveDuringMaintenance) { + this.isAutoApproveDuringMaintenance = isAutoApproveDuringMaintenance; + this.__explicitlySet__.add("isAutoApproveDuringMaintenance"); + return this; + } + /** + * The OCID of the selected resources that this Delegation Control is applicable to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceIds") + private java.util.List resourceIds; + + /** + * The OCID of the selected resources that this Delegation Control is applicable to. + * @param resourceIds the value to set + * @return this builder + **/ + public Builder resourceIds(java.util.List resourceIds) { + this.resourceIds = resourceIds; + this.__explicitlySet__.add("resourceIds"); + return this; + } + /** + * Resource type for which the Delegation Control is applicable to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private DelegationControlResourceType resourceType; + + /** + * Resource type for which the Delegation Control is applicable to. + * @param resourceType the value to set + * @return this builder + **/ + public Builder resourceType(DelegationControlResourceType resourceType) { + this.resourceType = resourceType; + this.__explicitlySet__.add("resourceType"); + return this; + } + /** + * The OCID of the OCI Notification topic to publish messages related to this Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicId") + private String notificationTopicId; + + /** + * The OCID of the OCI Notification topic to publish messages related to this Delegation Control. + * @param notificationTopicId the value to set + * @return this builder + **/ + public Builder notificationTopicId(String notificationTopicId) { + this.notificationTopicId = notificationTopicId; + this.__explicitlySet__.add("notificationTopicId"); + return this; + } + /** + * The format of the OCI Notification messages for this Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationMessageFormat") + private NotificationMessageFormat notificationMessageFormat; + + /** + * The format of the OCI Notification messages for this Delegation Control. + * @param notificationMessageFormat the value to set + * @return this builder + **/ + public Builder notificationMessageFormat( + NotificationMessageFormat notificationMessageFormat) { + this.notificationMessageFormat = notificationMessageFormat; + this.__explicitlySet__.add("notificationMessageFormat"); + return this; + } + /** + * The OCID of the OCI Vault that will store the secrets containing the SSH keys to access the resource governed by this Delegation Control by Delegate Access Control Service. This property is required when resourceType is CLOUDVMCLUSTER. Delegate Access Control Service will generate the SSH keys and store them as secrets in the OCI Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * The OCID of the OCI Vault that will store the secrets containing the SSH keys to access the resource governed by this Delegation Control by Delegate Access Control Service. This property is required when resourceType is CLOUDVMCLUSTER. Delegate Access Control Service will generate the SSH keys and store them as secrets in the OCI Vault. + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + /** + * The OCID of the Master Encryption Key in the OCI Vault specified by vaultId. This key will be used to encrypt the SSH keys to access the resource governed by this Delegation Control by Delegate Access Control Service. This property is required when resourceType is CLOUDVMCLUSTER. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultKeyId") + private String vaultKeyId; + + /** + * The OCID of the Master Encryption Key in the OCI Vault specified by vaultId. This key will be used to encrypt the SSH keys to access the resource governed by this Delegation Control by Delegate Access Control Service. This property is required when resourceType is CLOUDVMCLUSTER. + * @param vaultKeyId the value to set + * @return this builder + **/ + public Builder vaultKeyId(String vaultKeyId) { + this.vaultKeyId = vaultKeyId; + this.__explicitlySet__.add("vaultKeyId"); + return this; + } + /** + * The current lifecycle state of the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Delegation Control. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Description of the current lifecycle state in more detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleStateDetails") + private String lifecycleStateDetails; + + /** + * Description of the current lifecycle state in more detail. + * @param lifecycleStateDetails the value to set + * @return this builder + **/ + public Builder lifecycleStateDetails(String lifecycleStateDetails) { + this.lifecycleStateDetails = lifecycleStateDetails; + this.__explicitlySet__.add("lifecycleStateDetails"); + return this; + } + /** + * Time when the Delegation Control was created expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Time when the Delegation Control was created expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * Time when the Delegation Control was last modified expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * Time when the Delegation Control was last modified expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Time when the Delegation Control was deleted expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * Note a deleted Delegation Control still stays in the system, so that you can still audit Service Provider Actions associated with Delegated Resource Access Requests + * raised on target resources governed by the deleted Delegation Control. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeDeleted") + private java.util.Date timeDeleted; + + /** + * Time when the Delegation Control was deleted expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * Note a deleted Delegation Control still stays in the system, so that you can still audit Service Provider Actions associated with Delegated Resource Access Requests + * raised on target resources governed by the deleted Delegation Control. + * + * @param timeDeleted the value to set + * @return this builder + **/ + public Builder timeDeleted(java.util.Date timeDeleted) { + this.timeDeleted = timeDeleted; + this.__explicitlySet__.add("timeDeleted"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DelegationControl build() { + DelegationControl model = + new DelegationControl( + this.id, + this.compartmentId, + this.displayName, + this.description, + this.numApprovalsRequired, + this.preApprovedServiceProviderActionNames, + this.delegationSubscriptionIds, + this.isAutoApproveDuringMaintenance, + this.resourceIds, + this.resourceType, + this.notificationTopicId, + this.notificationMessageFormat, + this.vaultId, + this.vaultKeyId, + this.lifecycleState, + this.lifecycleStateDetails, + this.timeCreated, + this.timeUpdated, + this.timeDeleted, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DelegationControl model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("numApprovalsRequired")) { + this.numApprovalsRequired(model.getNumApprovalsRequired()); + } + if (model.wasPropertyExplicitlySet("preApprovedServiceProviderActionNames")) { + this.preApprovedServiceProviderActionNames( + model.getPreApprovedServiceProviderActionNames()); + } + if (model.wasPropertyExplicitlySet("delegationSubscriptionIds")) { + this.delegationSubscriptionIds(model.getDelegationSubscriptionIds()); + } + if (model.wasPropertyExplicitlySet("isAutoApproveDuringMaintenance")) { + this.isAutoApproveDuringMaintenance(model.getIsAutoApproveDuringMaintenance()); + } + if (model.wasPropertyExplicitlySet("resourceIds")) { + this.resourceIds(model.getResourceIds()); + } + if (model.wasPropertyExplicitlySet("resourceType")) { + this.resourceType(model.getResourceType()); + } + if (model.wasPropertyExplicitlySet("notificationTopicId")) { + this.notificationTopicId(model.getNotificationTopicId()); + } + if (model.wasPropertyExplicitlySet("notificationMessageFormat")) { + this.notificationMessageFormat(model.getNotificationMessageFormat()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + if (model.wasPropertyExplicitlySet("vaultKeyId")) { + this.vaultKeyId(model.getVaultKeyId()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleStateDetails")) { + this.lifecycleStateDetails(model.getLifecycleStateDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("timeDeleted")) { + this.timeDeleted(model.getTimeDeleted()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the Delegation Control. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of the compartment that contains the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the Delegation Control. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Name of the Delegation Control. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Name of the Delegation Control. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Description of the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the Delegation Control. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * number of approvals required. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numApprovalsRequired") + private final Integer numApprovalsRequired; + + /** + * number of approvals required. + * @return the value + **/ + public Integer getNumApprovalsRequired() { + return numApprovalsRequired; + } + + /** + * List of pre-approved Service Provider Action names. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. Delegated Resource Access Requests associated with a resource governed by this Delegation Control will be + * automatically approved if the Delegated Resource Access Request only contain Service Provider Actions in the pre-approved list. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("preApprovedServiceProviderActionNames") + private final java.util.List preApprovedServiceProviderActionNames; + + /** + * List of pre-approved Service Provider Action names. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. Delegated Resource Access Requests associated with a resource governed by this Delegation Control will be + * automatically approved if the Delegated Resource Access Request only contain Service Provider Actions in the pre-approved list. + * + * @return the value + **/ + public java.util.List getPreApprovedServiceProviderActionNames() { + return preApprovedServiceProviderActionNames; + } + + /** + * List of Delegation Subscription OCID that are allowed for this Delegation Control. The allowed subscriptions will determine the available Service Provider Actions. Only support operators for the allowed subscriptions are allowed to create Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("delegationSubscriptionIds") + private final java.util.List delegationSubscriptionIds; + + /** + * List of Delegation Subscription OCID that are allowed for this Delegation Control. The allowed subscriptions will determine the available Service Provider Actions. Only support operators for the allowed subscriptions are allowed to create Delegated Resource Access Request. + * @return the value + **/ + public java.util.List getDelegationSubscriptionIds() { + return delegationSubscriptionIds; + } + + /** + * Set to true to allow all Delegated Resource Access Request to be approved automatically during maintenance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoApproveDuringMaintenance") + private final Boolean isAutoApproveDuringMaintenance; + + /** + * Set to true to allow all Delegated Resource Access Request to be approved automatically during maintenance. + * @return the value + **/ + public Boolean getIsAutoApproveDuringMaintenance() { + return isAutoApproveDuringMaintenance; + } + + /** + * The OCID of the selected resources that this Delegation Control is applicable to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceIds") + private final java.util.List resourceIds; + + /** + * The OCID of the selected resources that this Delegation Control is applicable to. + * @return the value + **/ + public java.util.List getResourceIds() { + return resourceIds; + } + + /** + * Resource type for which the Delegation Control is applicable to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private final DelegationControlResourceType resourceType; + + /** + * Resource type for which the Delegation Control is applicable to. + * @return the value + **/ + public DelegationControlResourceType getResourceType() { + return resourceType; + } + + /** + * The OCID of the OCI Notification topic to publish messages related to this Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicId") + private final String notificationTopicId; + + /** + * The OCID of the OCI Notification topic to publish messages related to this Delegation Control. + * @return the value + **/ + public String getNotificationTopicId() { + return notificationTopicId; + } + + /** + * The format of the OCI Notification messages for this Delegation Control. + **/ + public enum NotificationMessageFormat { + Json("JSON"), + Html("HTML"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(NotificationMessageFormat.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (NotificationMessageFormat v : NotificationMessageFormat.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + NotificationMessageFormat(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static NotificationMessageFormat create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'NotificationMessageFormat', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The format of the OCI Notification messages for this Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationMessageFormat") + private final NotificationMessageFormat notificationMessageFormat; + + /** + * The format of the OCI Notification messages for this Delegation Control. + * @return the value + **/ + public NotificationMessageFormat getNotificationMessageFormat() { + return notificationMessageFormat; + } + + /** + * The OCID of the OCI Vault that will store the secrets containing the SSH keys to access the resource governed by this Delegation Control by Delegate Access Control Service. This property is required when resourceType is CLOUDVMCLUSTER. Delegate Access Control Service will generate the SSH keys and store them as secrets in the OCI Vault. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * The OCID of the OCI Vault that will store the secrets containing the SSH keys to access the resource governed by this Delegation Control by Delegate Access Control Service. This property is required when resourceType is CLOUDVMCLUSTER. Delegate Access Control Service will generate the SSH keys and store them as secrets in the OCI Vault. + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + /** + * The OCID of the Master Encryption Key in the OCI Vault specified by vaultId. This key will be used to encrypt the SSH keys to access the resource governed by this Delegation Control by Delegate Access Control Service. This property is required when resourceType is CLOUDVMCLUSTER. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultKeyId") + private final String vaultKeyId; + + /** + * The OCID of the Master Encryption Key in the OCI Vault specified by vaultId. This key will be used to encrypt the SSH keys to access the resource governed by this Delegation Control by Delegate Access Control Service. This property is required when resourceType is CLOUDVMCLUSTER. + * @return the value + **/ + public String getVaultKeyId() { + return vaultKeyId; + } + + /** + * The current lifecycle state of the Delegation Control. + **/ + public enum LifecycleState { + Creating("CREATING"), + Active("ACTIVE"), + Updating("UPDATING"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + NeedsAttention("NEEDS_ATTENTION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current lifecycle state of the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Delegation Control. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Description of the current lifecycle state in more detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleStateDetails") + private final String lifecycleStateDetails; + + /** + * Description of the current lifecycle state in more detail. + * @return the value + **/ + public String getLifecycleStateDetails() { + return lifecycleStateDetails; + } + + /** + * Time when the Delegation Control was created expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Time when the Delegation Control was created expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * Time when the Delegation Control was last modified expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * Time when the Delegation Control was last modified expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Time when the Delegation Control was deleted expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * Note a deleted Delegation Control still stays in the system, so that you can still audit Service Provider Actions associated with Delegated Resource Access Requests + * raised on target resources governed by the deleted Delegation Control. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeDeleted") + private final java.util.Date timeDeleted; + + /** + * Time when the Delegation Control was deleted expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * Note a deleted Delegation Control still stays in the system, so that you can still audit Service Provider Actions associated with Delegated Resource Access Requests + * raised on target resources governed by the deleted Delegation Control. + * + * @return the value + **/ + public java.util.Date getTimeDeleted() { + return timeDeleted; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DelegationControl("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", numApprovalsRequired=").append(String.valueOf(this.numApprovalsRequired)); + sb.append(", preApprovedServiceProviderActionNames=") + .append(String.valueOf(this.preApprovedServiceProviderActionNames)); + sb.append(", delegationSubscriptionIds=") + .append(String.valueOf(this.delegationSubscriptionIds)); + sb.append(", isAutoApproveDuringMaintenance=") + .append(String.valueOf(this.isAutoApproveDuringMaintenance)); + sb.append(", resourceIds=").append(String.valueOf(this.resourceIds)); + sb.append(", resourceType=").append(String.valueOf(this.resourceType)); + sb.append(", notificationTopicId=").append(String.valueOf(this.notificationTopicId)); + sb.append(", notificationMessageFormat=") + .append(String.valueOf(this.notificationMessageFormat)); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(", vaultKeyId=").append(String.valueOf(this.vaultKeyId)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleStateDetails=").append(String.valueOf(this.lifecycleStateDetails)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", timeDeleted=").append(String.valueOf(this.timeDeleted)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DelegationControl)) { + return false; + } + + DelegationControl other = (DelegationControl) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.numApprovalsRequired, other.numApprovalsRequired) + && java.util.Objects.equals( + this.preApprovedServiceProviderActionNames, + other.preApprovedServiceProviderActionNames) + && java.util.Objects.equals( + this.delegationSubscriptionIds, other.delegationSubscriptionIds) + && java.util.Objects.equals( + this.isAutoApproveDuringMaintenance, other.isAutoApproveDuringMaintenance) + && java.util.Objects.equals(this.resourceIds, other.resourceIds) + && java.util.Objects.equals(this.resourceType, other.resourceType) + && java.util.Objects.equals(this.notificationTopicId, other.notificationTopicId) + && java.util.Objects.equals( + this.notificationMessageFormat, other.notificationMessageFormat) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && java.util.Objects.equals(this.vaultKeyId, other.vaultKeyId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleStateDetails, other.lifecycleStateDetails) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.timeDeleted, other.timeDeleted) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.numApprovalsRequired == null + ? 43 + : this.numApprovalsRequired.hashCode()); + result = + (result * PRIME) + + (this.preApprovedServiceProviderActionNames == null + ? 43 + : this.preApprovedServiceProviderActionNames.hashCode()); + result = + (result * PRIME) + + (this.delegationSubscriptionIds == null + ? 43 + : this.delegationSubscriptionIds.hashCode()); + result = + (result * PRIME) + + (this.isAutoApproveDuringMaintenance == null + ? 43 + : this.isAutoApproveDuringMaintenance.hashCode()); + result = (result * PRIME) + (this.resourceIds == null ? 43 : this.resourceIds.hashCode()); + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); + result = + (result * PRIME) + + (this.notificationTopicId == null + ? 43 + : this.notificationTopicId.hashCode()); + result = + (result * PRIME) + + (this.notificationMessageFormat == null + ? 43 + : this.notificationMessageFormat.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + result = (result * PRIME) + (this.vaultKeyId == null ? 43 : this.vaultKeyId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleStateDetails == null + ? 43 + : this.lifecycleStateDetails.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.timeDeleted == null ? 43 : this.timeDeleted.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationControlResourceCollection.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationControlResourceCollection.java new file mode 100644 index 00000000000..91b555d8d61 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationControlResourceCollection.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * List of DelegationControlResourceSummary objects. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DelegationControlResourceCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DelegationControlResourceCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public DelegationControlResourceCollection( + java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of DelegationControlResourceSummary objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of DelegationControlResourceSummary objects. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DelegationControlResourceCollection build() { + DelegationControlResourceCollection model = + new DelegationControlResourceCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DelegationControlResourceCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of DelegationControlResourceSummary objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of DelegationControlResourceSummary objects. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DelegationControlResourceCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DelegationControlResourceCollection)) { + return false; + } + + DelegationControlResourceCollection other = (DelegationControlResourceCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationControlResourceSummary.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationControlResourceSummary.java new file mode 100644 index 00000000000..2ccac676418 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationControlResourceSummary.java @@ -0,0 +1,231 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Details of the resources that this Delegation Control is applicable to. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DelegationControlResourceSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DelegationControlResourceSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"id", "resourceStatus"}) + public DelegationControlResourceSummary(String id, ResourceStatus resourceStatus) { + super(); + this.id = id; + this.resourceStatus = resourceStatus; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The current status of the resource in Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceStatus") + private ResourceStatus resourceStatus; + + /** + * The current status of the resource in Delegation Control. + * @param resourceStatus the value to set + * @return this builder + **/ + public Builder resourceStatus(ResourceStatus resourceStatus) { + this.resourceStatus = resourceStatus; + this.__explicitlySet__.add("resourceStatus"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DelegationControlResourceSummary build() { + DelegationControlResourceSummary model = + new DelegationControlResourceSummary(this.id, this.resourceStatus); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DelegationControlResourceSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("resourceStatus")) { + this.resourceStatus(model.getResourceStatus()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The current status of the resource in Delegation Control. + **/ + public enum ResourceStatus { + Created("CREATED"), + Applying("APPLYING"), + Applied("APPLIED"), + ApplyFailed("APPLY_FAILED"), + Updating("UPDATING"), + UpdateFailed("UPDATE_FAILED"), + Deleting("DELETING"), + Deleted("DELETED"), + DeletionFailed("DELETION_FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ResourceStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ResourceStatus v : ResourceStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ResourceStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ResourceStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ResourceStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current status of the resource in Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceStatus") + private final ResourceStatus resourceStatus; + + /** + * The current status of the resource in Delegation Control. + * @return the value + **/ + public ResourceStatus getResourceStatus() { + return resourceStatus; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DelegationControlResourceSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", resourceStatus=").append(String.valueOf(this.resourceStatus)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DelegationControlResourceSummary)) { + return false; + } + + DelegationControlResourceSummary other = (DelegationControlResourceSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.resourceStatus, other.resourceStatus) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.resourceStatus == null ? 43 : this.resourceStatus.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationControlResourceType.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationControlResourceType.java new file mode 100644 index 00000000000..c357985ab96 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationControlResourceType.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Resource types available to be governed under Delegation Control + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public enum DelegationControlResourceType { + Vmcluster("VMCLUSTER"), + Cloudvmcluster("CLOUDVMCLUSTER"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DelegationControlResourceType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DelegationControlResourceType v : DelegationControlResourceType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DelegationControlResourceType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DelegationControlResourceType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DelegationControlResourceType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationControlSummary.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationControlSummary.java new file mode 100644 index 00000000000..f6439de2313 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationControlSummary.java @@ -0,0 +1,646 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Summary of the Delegation Control. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DelegationControlSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DelegationControlSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "compartmentId", + "resourceType", + "timeCreated", + "timeUpdated", + "timeDeleted", + "lifecycleState", + "lifecycleStateDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public DelegationControlSummary( + String id, + String displayName, + String compartmentId, + DelegationControlResourceType resourceType, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.Date timeDeleted, + DelegationControl.LifecycleState lifecycleState, + String lifecycleStateDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.compartmentId = compartmentId; + this.resourceType = resourceType; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.timeDeleted = timeDeleted; + this.lifecycleState = lifecycleState; + this.lifecycleStateDetails = lifecycleStateDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the Delegation Control. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Name of the Delegation Control. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Name of the Delegation Control. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The OCID of the compartment that contains the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the Delegation Control. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * resourceType for which the Delegation Control is applicable + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private DelegationControlResourceType resourceType; + + /** + * resourceType for which the Delegation Control is applicable + * @param resourceType the value to set + * @return this builder + **/ + public Builder resourceType(DelegationControlResourceType resourceType) { + this.resourceType = resourceType; + this.__explicitlySet__.add("resourceType"); + return this; + } + /** + * Time when the Delegation Control was created, expressed in [RFC 3339] (https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Time when the Delegation Control was created, expressed in [RFC 3339] (https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * Time when the Delegation Control was last modified, expressed in [RFC 3339] (https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * Time when the Delegation Control was last modified, expressed in [RFC 3339] (https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Time when the Delegation Control was deleted, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeDeleted") + private java.util.Date timeDeleted; + + /** + * Time when the Delegation Control was deleted, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + * @param timeDeleted the value to set + * @return this builder + **/ + public Builder timeDeleted(java.util.Date timeDeleted) { + this.timeDeleted = timeDeleted; + this.__explicitlySet__.add("timeDeleted"); + return this; + } + /** + * The current lifecycle state of the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private DelegationControl.LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Delegation Control. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(DelegationControl.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Description of the current lifecycle state in more detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleStateDetails") + private String lifecycleStateDetails; + + /** + * Description of the current lifecycle state in more detail. + * @param lifecycleStateDetails the value to set + * @return this builder + **/ + public Builder lifecycleStateDetails(String lifecycleStateDetails) { + this.lifecycleStateDetails = lifecycleStateDetails; + this.__explicitlySet__.add("lifecycleStateDetails"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DelegationControlSummary build() { + DelegationControlSummary model = + new DelegationControlSummary( + this.id, + this.displayName, + this.compartmentId, + this.resourceType, + this.timeCreated, + this.timeUpdated, + this.timeDeleted, + this.lifecycleState, + this.lifecycleStateDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DelegationControlSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resourceType")) { + this.resourceType(model.getResourceType()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("timeDeleted")) { + this.timeDeleted(model.getTimeDeleted()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleStateDetails")) { + this.lifecycleStateDetails(model.getLifecycleStateDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the Delegation Control. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Name of the Delegation Control. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Name of the Delegation Control. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The OCID of the compartment that contains the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the Delegation Control. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * resourceType for which the Delegation Control is applicable + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private final DelegationControlResourceType resourceType; + + /** + * resourceType for which the Delegation Control is applicable + * @return the value + **/ + public DelegationControlResourceType getResourceType() { + return resourceType; + } + + /** + * Time when the Delegation Control was created, expressed in [RFC 3339] (https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Time when the Delegation Control was created, expressed in [RFC 3339] (https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * Time when the Delegation Control was last modified, expressed in [RFC 3339] (https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * Time when the Delegation Control was last modified, expressed in [RFC 3339] (https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Time when the Delegation Control was deleted, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeDeleted") + private final java.util.Date timeDeleted; + + /** + * Time when the Delegation Control was deleted, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + * @return the value + **/ + public java.util.Date getTimeDeleted() { + return timeDeleted; + } + + /** + * The current lifecycle state of the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final DelegationControl.LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Delegation Control. + * @return the value + **/ + public DelegationControl.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Description of the current lifecycle state in more detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleStateDetails") + private final String lifecycleStateDetails; + + /** + * Description of the current lifecycle state in more detail. + * @return the value + **/ + public String getLifecycleStateDetails() { + return lifecycleStateDetails; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DelegationControlSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resourceType=").append(String.valueOf(this.resourceType)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", timeDeleted=").append(String.valueOf(this.timeDeleted)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleStateDetails=").append(String.valueOf(this.lifecycleStateDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DelegationControlSummary)) { + return false; + } + + DelegationControlSummary other = (DelegationControlSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resourceType, other.resourceType) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.timeDeleted, other.timeDeleted) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleStateDetails, other.lifecycleStateDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.timeDeleted == null ? 43 : this.timeDeleted.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleStateDetails == null + ? 43 + : this.lifecycleStateDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationControlSummaryCollection.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationControlSummaryCollection.java new file mode 100644 index 00000000000..ca2df6d1d58 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationControlSummaryCollection.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Results of Delegation Control search, which contains summary of the Delegation Control. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DelegationControlSummaryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DelegationControlSummaryCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public DelegationControlSummaryCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * contains DelegationControlSummary + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * contains DelegationControlSummary + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DelegationControlSummaryCollection build() { + DelegationControlSummaryCollection model = + new DelegationControlSummaryCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DelegationControlSummaryCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * contains DelegationControlSummary + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * contains DelegationControlSummary + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DelegationControlSummaryCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DelegationControlSummaryCollection)) { + return false; + } + + DelegationControlSummaryCollection other = (DelegationControlSummaryCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationSubscription.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationSubscription.java new file mode 100644 index 00000000000..01b1c283ddc --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationSubscription.java @@ -0,0 +1,745 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Details of the Delegation Subscription. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DelegationSubscription.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DelegationSubscription + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "serviceProviderId", + "description", + "subscribedServiceType", + "lifecycleState", + "lifecycleStateDetails", + "timeCreated", + "timeUpdated", + "freeformTags", + "definedTags", + "systemTags" + }) + public DelegationSubscription( + String id, + String compartmentId, + String displayName, + String serviceProviderId, + String description, + ServiceProviderServiceType subscribedServiceType, + LifecycleState lifecycleState, + String lifecycleStateDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.serviceProviderId = serviceProviderId; + this.description = description; + this.subscribedServiceType = subscribedServiceType; + this.lifecycleState = lifecycleState; + this.lifecycleStateDetails = lifecycleStateDetails; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique identifier for the Delegation Subscription. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique identifier for the Delegation Subscription. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The OCID of the compartment that contains the Delegation Subscription. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the Delegation Subscription. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Display name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Display name + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Unique identifier of the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceProviderId") + private String serviceProviderId; + + /** + * Unique identifier of the Service Provider. + * @param serviceProviderId the value to set + * @return this builder + **/ + public Builder serviceProviderId(String serviceProviderId) { + this.serviceProviderId = serviceProviderId; + this.__explicitlySet__.add("serviceProviderId"); + return this; + } + /** + * Description of the Delegation Subscription. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the Delegation Subscription. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Subscribed Service Provider Service Type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscribedServiceType") + private ServiceProviderServiceType subscribedServiceType; + + /** + * Subscribed Service Provider Service Type. + * @param subscribedServiceType the value to set + * @return this builder + **/ + public Builder subscribedServiceType(ServiceProviderServiceType subscribedServiceType) { + this.subscribedServiceType = subscribedServiceType; + this.__explicitlySet__.add("subscribedServiceType"); + return this; + } + /** + * The current lifecycle state of the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Service Provider. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Description of the current lifecycle state in more detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleStateDetails") + private String lifecycleStateDetails; + + /** + * Description of the current lifecycle state in more detail. + * @param lifecycleStateDetails the value to set + * @return this builder + **/ + public Builder lifecycleStateDetails(String lifecycleStateDetails) { + this.lifecycleStateDetails = lifecycleStateDetails; + this.__explicitlySet__.add("lifecycleStateDetails"); + return this; + } + /** + * Time when the Service Provider was created expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Time when the Service Provider was created expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * Time when the Service Provider was last modified expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * Time when the Service Provider was last modified expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DelegationSubscription build() { + DelegationSubscription model = + new DelegationSubscription( + this.id, + this.compartmentId, + this.displayName, + this.serviceProviderId, + this.description, + this.subscribedServiceType, + this.lifecycleState, + this.lifecycleStateDetails, + this.timeCreated, + this.timeUpdated, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DelegationSubscription model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("serviceProviderId")) { + this.serviceProviderId(model.getServiceProviderId()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("subscribedServiceType")) { + this.subscribedServiceType(model.getSubscribedServiceType()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleStateDetails")) { + this.lifecycleStateDetails(model.getLifecycleStateDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique identifier for the Delegation Subscription. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique identifier for the Delegation Subscription. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of the compartment that contains the Delegation Subscription. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the Delegation Subscription. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Display name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Display name + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Unique identifier of the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceProviderId") + private final String serviceProviderId; + + /** + * Unique identifier of the Service Provider. + * @return the value + **/ + public String getServiceProviderId() { + return serviceProviderId; + } + + /** + * Description of the Delegation Subscription. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the Delegation Subscription. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Subscribed Service Provider Service Type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscribedServiceType") + private final ServiceProviderServiceType subscribedServiceType; + + /** + * Subscribed Service Provider Service Type. + * @return the value + **/ + public ServiceProviderServiceType getSubscribedServiceType() { + return subscribedServiceType; + } + + /** + * The current lifecycle state of the Service Provider. + **/ + public enum LifecycleState { + Creating("CREATING"), + Active("ACTIVE"), + Updating("UPDATING"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current lifecycle state of the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Service Provider. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Description of the current lifecycle state in more detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleStateDetails") + private final String lifecycleStateDetails; + + /** + * Description of the current lifecycle state in more detail. + * @return the value + **/ + public String getLifecycleStateDetails() { + return lifecycleStateDetails; + } + + /** + * Time when the Service Provider was created expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Time when the Service Provider was created expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * Time when the Service Provider was last modified expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * Time when the Service Provider was last modified expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DelegationSubscription("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", serviceProviderId=").append(String.valueOf(this.serviceProviderId)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", subscribedServiceType=").append(String.valueOf(this.subscribedServiceType)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleStateDetails=").append(String.valueOf(this.lifecycleStateDetails)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DelegationSubscription)) { + return false; + } + + DelegationSubscription other = (DelegationSubscription) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.serviceProviderId, other.serviceProviderId) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.subscribedServiceType, other.subscribedServiceType) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleStateDetails, other.lifecycleStateDetails) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.serviceProviderId == null ? 43 : this.serviceProviderId.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.subscribedServiceType == null + ? 43 + : this.subscribedServiceType.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleStateDetails == null + ? 43 + : this.lifecycleStateDetails.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationSubscriptionSummary.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationSubscriptionSummary.java new file mode 100644 index 00000000000..3939c159891 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationSubscriptionSummary.java @@ -0,0 +1,649 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Summary of the Delegation Subscription. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DelegationSubscriptionSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DelegationSubscriptionSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "serviceProviderId", + "subscribedServiceType", + "lifecycleState", + "lifecycleStateDetails", + "timeCreated", + "timeUpdated", + "freeformTags", + "definedTags", + "systemTags" + }) + public DelegationSubscriptionSummary( + String id, + String compartmentId, + String displayName, + String serviceProviderId, + ServiceProviderServiceType subscribedServiceType, + DelegationSubscription.LifecycleState lifecycleState, + String lifecycleStateDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.serviceProviderId = serviceProviderId; + this.subscribedServiceType = subscribedServiceType; + this.lifecycleState = lifecycleState; + this.lifecycleStateDetails = lifecycleStateDetails; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique identifier for the Delegation Subscription. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique identifier for the Delegation Subscription. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The OCID of the compartment that contains the Delegation Subscription. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the Delegation Subscription. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Display name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Display name + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Unique identifier of the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceProviderId") + private String serviceProviderId; + + /** + * Unique identifier of the Service Provider. + * @param serviceProviderId the value to set + * @return this builder + **/ + public Builder serviceProviderId(String serviceProviderId) { + this.serviceProviderId = serviceProviderId; + this.__explicitlySet__.add("serviceProviderId"); + return this; + } + /** + * Subscribed Service Provider Service Type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscribedServiceType") + private ServiceProviderServiceType subscribedServiceType; + + /** + * Subscribed Service Provider Service Type. + * @param subscribedServiceType the value to set + * @return this builder + **/ + public Builder subscribedServiceType(ServiceProviderServiceType subscribedServiceType) { + this.subscribedServiceType = subscribedServiceType; + this.__explicitlySet__.add("subscribedServiceType"); + return this; + } + /** + * The current lifecycle state of the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private DelegationSubscription.LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Service Provider. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(DelegationSubscription.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Description of the current lifecycle state in more detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleStateDetails") + private String lifecycleStateDetails; + + /** + * Description of the current lifecycle state in more detail. + * @param lifecycleStateDetails the value to set + * @return this builder + **/ + public Builder lifecycleStateDetails(String lifecycleStateDetails) { + this.lifecycleStateDetails = lifecycleStateDetails; + this.__explicitlySet__.add("lifecycleStateDetails"); + return this; + } + /** + * Time when the Service Provider was created expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Time when the Service Provider was created expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * Time when the Service Provider was last modified expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * Time when the Service Provider was last modified expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DelegationSubscriptionSummary build() { + DelegationSubscriptionSummary model = + new DelegationSubscriptionSummary( + this.id, + this.compartmentId, + this.displayName, + this.serviceProviderId, + this.subscribedServiceType, + this.lifecycleState, + this.lifecycleStateDetails, + this.timeCreated, + this.timeUpdated, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DelegationSubscriptionSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("serviceProviderId")) { + this.serviceProviderId(model.getServiceProviderId()); + } + if (model.wasPropertyExplicitlySet("subscribedServiceType")) { + this.subscribedServiceType(model.getSubscribedServiceType()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleStateDetails")) { + this.lifecycleStateDetails(model.getLifecycleStateDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique identifier for the Delegation Subscription. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique identifier for the Delegation Subscription. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of the compartment that contains the Delegation Subscription. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the Delegation Subscription. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Display name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Display name + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Unique identifier of the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceProviderId") + private final String serviceProviderId; + + /** + * Unique identifier of the Service Provider. + * @return the value + **/ + public String getServiceProviderId() { + return serviceProviderId; + } + + /** + * Subscribed Service Provider Service Type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscribedServiceType") + private final ServiceProviderServiceType subscribedServiceType; + + /** + * Subscribed Service Provider Service Type. + * @return the value + **/ + public ServiceProviderServiceType getSubscribedServiceType() { + return subscribedServiceType; + } + + /** + * The current lifecycle state of the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final DelegationSubscription.LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Service Provider. + * @return the value + **/ + public DelegationSubscription.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Description of the current lifecycle state in more detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleStateDetails") + private final String lifecycleStateDetails; + + /** + * Description of the current lifecycle state in more detail. + * @return the value + **/ + public String getLifecycleStateDetails() { + return lifecycleStateDetails; + } + + /** + * Time when the Service Provider was created expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Time when the Service Provider was created expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * Time when the Service Provider was last modified expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * Time when the Service Provider was last modified expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DelegationSubscriptionSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", serviceProviderId=").append(String.valueOf(this.serviceProviderId)); + sb.append(", subscribedServiceType=").append(String.valueOf(this.subscribedServiceType)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleStateDetails=").append(String.valueOf(this.lifecycleStateDetails)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DelegationSubscriptionSummary)) { + return false; + } + + DelegationSubscriptionSummary other = (DelegationSubscriptionSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.serviceProviderId, other.serviceProviderId) + && java.util.Objects.equals(this.subscribedServiceType, other.subscribedServiceType) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleStateDetails, other.lifecycleStateDetails) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.serviceProviderId == null ? 43 : this.serviceProviderId.hashCode()); + result = + (result * PRIME) + + (this.subscribedServiceType == null + ? 43 + : this.subscribedServiceType.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleStateDetails == null + ? 43 + : this.lifecycleStateDetails.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationSubscriptionSummaryCollection.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationSubscriptionSummaryCollection.java new file mode 100644 index 00000000000..0939f662620 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/DelegationSubscriptionSummaryCollection.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * List of DelegationSubscriptionSummary objects. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DelegationSubscriptionSummaryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DelegationSubscriptionSummaryCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public DelegationSubscriptionSummaryCollection( + java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of DelegationSubscriptionSummary objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of DelegationSubscriptionSummary objects. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DelegationSubscriptionSummaryCollection build() { + DelegationSubscriptionSummaryCollection model = + new DelegationSubscriptionSummaryCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DelegationSubscriptionSummaryCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of DelegationSubscriptionSummary objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of DelegationSubscriptionSummary objects. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DelegationSubscriptionSummaryCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DelegationSubscriptionSummaryCollection)) { + return false; + } + + DelegationSubscriptionSummaryCollection other = (DelegationSubscriptionSummaryCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/OperationStatus.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/OperationStatus.java new file mode 100644 index 00000000000..c745979dfe9 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/OperationStatus.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Possible operation status. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public enum OperationStatus { + Accepted("ACCEPTED"), + InProgress("IN_PROGRESS"), + Waiting("WAITING"), + NeedsAttention("NEEDS_ATTENTION"), + Failed("FAILED"), + Succeeded("SUCCEEDED"), + Canceling("CANCELING"), + Canceled("CANCELED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(OperationStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OperationStatus v : OperationStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + OperationStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OperationStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'OperationStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/OperationType.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/OperationType.java new file mode 100644 index 00000000000..28c70b7f425 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/OperationType.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Possible operation types. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public enum OperationType { + CreateDelegationControl("CREATE_DELEGATION_CONTROL"), + UpdateDelegationControl("UPDATE_DELEGATION_CONTROL"), + DeleteDelegationControl("DELETE_DELEGATION_CONTROL"), + MoveDelegationControl("MOVE_DELEGATION_CONTROL"), + CreateDelegatedResourceAccessRequest("CREATE_DELEGATED_RESOURCE_ACCESS_REQUEST"), + ApproveDelegatedResourceAccessRequest("APPROVE_DELEGATED_RESOURCE_ACCESS_REQUEST"), + RejectDelegatedResourceAccessRequest("REJECT_DELEGATED_RESOURCE_ACCESS_REQUEST"), + RevokeDelegatedResourceAccessRequest("REVOKE_DELEGATED_RESOURCE_ACCESS_REQUEST"), + CreateDelegationSubscription("CREATE_DELEGATION_SUBSCRIPTION"), + UpdateDelegationSubscription("UPDATE_DELEGATION_SUBSCRIPTION"), + DeleteDelegationSubscription("DELETE_DELEGATION_SUBSCRIPTION"), + MoveDelegationSubscription("MOVE_DELEGATION_SUBSCRIPTION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(OperationType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OperationType v : OperationType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + OperationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OperationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'OperationType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/RejectDelegatedResourceAccessRequestDetails.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/RejectDelegatedResourceAccessRequestDetails.java new file mode 100644 index 00000000000..19fc5328f7e --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/RejectDelegatedResourceAccessRequestDetails.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Summary of why the Delegated Resource Access Request was rejected. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RejectDelegatedResourceAccessRequestDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RejectDelegatedResourceAccessRequestDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"approverComment"}) + public RejectDelegatedResourceAccessRequestDetails(String approverComment) { + super(); + this.approverComment = approverComment; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Comment by the approver explaining why the request is rejected. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approverComment") + private String approverComment; + + /** + * Comment by the approver explaining why the request is rejected. + * @param approverComment the value to set + * @return this builder + **/ + public Builder approverComment(String approverComment) { + this.approverComment = approverComment; + this.__explicitlySet__.add("approverComment"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RejectDelegatedResourceAccessRequestDetails build() { + RejectDelegatedResourceAccessRequestDetails model = + new RejectDelegatedResourceAccessRequestDetails(this.approverComment); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RejectDelegatedResourceAccessRequestDetails model) { + if (model.wasPropertyExplicitlySet("approverComment")) { + this.approverComment(model.getApproverComment()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Comment by the approver explaining why the request is rejected. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approverComment") + private final String approverComment; + + /** + * Comment by the approver explaining why the request is rejected. + * @return the value + **/ + public String getApproverComment() { + return approverComment; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RejectDelegatedResourceAccessRequestDetails("); + sb.append("super=").append(super.toString()); + sb.append("approverComment=").append(String.valueOf(this.approverComment)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RejectDelegatedResourceAccessRequestDetails)) { + return false; + } + + RejectDelegatedResourceAccessRequestDetails other = + (RejectDelegatedResourceAccessRequestDetails) o; + return java.util.Objects.equals(this.approverComment, other.approverComment) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.approverComment == null ? 43 : this.approverComment.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/RevokeDelegatedResourceAccessRequestDetails.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/RevokeDelegatedResourceAccessRequestDetails.java new file mode 100644 index 00000000000..4cc005eefa1 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/RevokeDelegatedResourceAccessRequestDetails.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Summary of why the already approved Delegated Resource Access Request was revoked. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RevokeDelegatedResourceAccessRequestDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RevokeDelegatedResourceAccessRequestDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"approverComment"}) + public RevokeDelegatedResourceAccessRequestDetails(String approverComment) { + super(); + this.approverComment = approverComment; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Comment specified by the approver explaining why the approval is revoked. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approverComment") + private String approverComment; + + /** + * Comment specified by the approver explaining why the approval is revoked. + * @param approverComment the value to set + * @return this builder + **/ + public Builder approverComment(String approverComment) { + this.approverComment = approverComment; + this.__explicitlySet__.add("approverComment"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RevokeDelegatedResourceAccessRequestDetails build() { + RevokeDelegatedResourceAccessRequestDetails model = + new RevokeDelegatedResourceAccessRequestDetails(this.approverComment); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RevokeDelegatedResourceAccessRequestDetails model) { + if (model.wasPropertyExplicitlySet("approverComment")) { + this.approverComment(model.getApproverComment()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Comment specified by the approver explaining why the approval is revoked. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approverComment") + private final String approverComment; + + /** + * Comment specified by the approver explaining why the approval is revoked. + * @return the value + **/ + public String getApproverComment() { + return approverComment; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RevokeDelegatedResourceAccessRequestDetails("); + sb.append("super=").append(super.toString()); + sb.append("approverComment=").append(String.valueOf(this.approverComment)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RevokeDelegatedResourceAccessRequestDetails)) { + return false; + } + + RevokeDelegatedResourceAccessRequestDetails other = + (RevokeDelegatedResourceAccessRequestDetails) o; + return java.util.Objects.equals(this.approverComment, other.approverComment) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.approverComment == null ? 43 : this.approverComment.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProvider.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProvider.java new file mode 100644 index 00000000000..9c25da7648c --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProvider.java @@ -0,0 +1,833 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Details of the Service Provider. Service provider offers services to the customer to support the delegated resources. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ServiceProvider.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ServiceProvider extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "name", + "description", + "serviceProviderType", + "serviceTypes", + "supportedResourceTypes", + "lifecycleState", + "lifecycleStateDetails", + "timeCreated", + "timeUpdated", + "freeformTags", + "definedTags", + "systemTags" + }) + public ServiceProvider( + String id, + String compartmentId, + String name, + String description, + ServiceProviderType serviceProviderType, + java.util.List serviceTypes, + java.util.List supportedResourceTypes, + LifecycleState lifecycleState, + String lifecycleStateDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.name = name; + this.description = description; + this.serviceProviderType = serviceProviderType; + this.serviceTypes = serviceTypes; + this.supportedResourceTypes = supportedResourceTypes; + this.lifecycleState = lifecycleState; + this.lifecycleStateDetails = lifecycleStateDetails; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique identifier for the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique identifier for the Service Provider. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The OCID of the compartment that contains the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the Delegation Control. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Unique name of the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Unique name of the Service Provider. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Description of the Service Provider. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the Service Provider. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Service Provider type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceProviderType") + private ServiceProviderType serviceProviderType; + + /** + * Service Provider type. + * @param serviceProviderType the value to set + * @return this builder + **/ + public Builder serviceProviderType(ServiceProviderType serviceProviderType) { + this.serviceProviderType = serviceProviderType; + this.__explicitlySet__.add("serviceProviderType"); + return this; + } + /** + * Types of services offered by this provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceTypes") + private java.util.List serviceTypes; + + /** + * Types of services offered by this provider. + * @param serviceTypes the value to set + * @return this builder + **/ + public Builder serviceTypes(java.util.List serviceTypes) { + this.serviceTypes = serviceTypes; + this.__explicitlySet__.add("serviceTypes"); + return this; + } + /** + * Resource types for which this provider will provide service. Default to all if not specified. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportedResourceTypes") + private java.util.List supportedResourceTypes; + + /** + * Resource types for which this provider will provide service. Default to all if not specified. + * @param supportedResourceTypes the value to set + * @return this builder + **/ + public Builder supportedResourceTypes( + java.util.List supportedResourceTypes) { + this.supportedResourceTypes = supportedResourceTypes; + this.__explicitlySet__.add("supportedResourceTypes"); + return this; + } + /** + * The current lifecycle state of the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Service Provider. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Description of the current lifecycle state in more detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleStateDetails") + private String lifecycleStateDetails; + + /** + * Description of the current lifecycle state in more detail. + * @param lifecycleStateDetails the value to set + * @return this builder + **/ + public Builder lifecycleStateDetails(String lifecycleStateDetails) { + this.lifecycleStateDetails = lifecycleStateDetails; + this.__explicitlySet__.add("lifecycleStateDetails"); + return this; + } + /** + * Time when the Service Provider was created expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Time when the Service Provider was created expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * Time when the Service Provider was last modified expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * Time when the Service Provider was last modified expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ServiceProvider build() { + ServiceProvider model = + new ServiceProvider( + this.id, + this.compartmentId, + this.name, + this.description, + this.serviceProviderType, + this.serviceTypes, + this.supportedResourceTypes, + this.lifecycleState, + this.lifecycleStateDetails, + this.timeCreated, + this.timeUpdated, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ServiceProvider model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("serviceProviderType")) { + this.serviceProviderType(model.getServiceProviderType()); + } + if (model.wasPropertyExplicitlySet("serviceTypes")) { + this.serviceTypes(model.getServiceTypes()); + } + if (model.wasPropertyExplicitlySet("supportedResourceTypes")) { + this.supportedResourceTypes(model.getSupportedResourceTypes()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleStateDetails")) { + this.lifecycleStateDetails(model.getLifecycleStateDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique identifier for the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique identifier for the Service Provider. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of the compartment that contains the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the Delegation Control. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Unique name of the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Unique name of the Service Provider. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Description of the Service Provider. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the Service Provider. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Service Provider type. + **/ + public enum ServiceProviderType { + OracleProvided("ORACLE_PROVIDED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ServiceProviderType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ServiceProviderType v : ServiceProviderType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ServiceProviderType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ServiceProviderType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ServiceProviderType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Service Provider type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceProviderType") + private final ServiceProviderType serviceProviderType; + + /** + * Service Provider type. + * @return the value + **/ + public ServiceProviderType getServiceProviderType() { + return serviceProviderType; + } + + /** + * Types of services offered by this provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceTypes") + private final java.util.List serviceTypes; + + /** + * Types of services offered by this provider. + * @return the value + **/ + public java.util.List getServiceTypes() { + return serviceTypes; + } + + /** + * Resource types for which this provider will provide service. Default to all if not specified. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportedResourceTypes") + private final java.util.List supportedResourceTypes; + + /** + * Resource types for which this provider will provide service. Default to all if not specified. + * @return the value + **/ + public java.util.List getSupportedResourceTypes() { + return supportedResourceTypes; + } + + /** + * The current lifecycle state of the Service Provider. + **/ + public enum LifecycleState { + Creating("CREATING"), + Active("ACTIVE"), + Updating("UPDATING"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current lifecycle state of the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Service Provider. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Description of the current lifecycle state in more detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleStateDetails") + private final String lifecycleStateDetails; + + /** + * Description of the current lifecycle state in more detail. + * @return the value + **/ + public String getLifecycleStateDetails() { + return lifecycleStateDetails; + } + + /** + * Time when the Service Provider was created expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Time when the Service Provider was created expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * Time when the Service Provider was last modified expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * Time when the Service Provider was last modified expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ServiceProvider("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", serviceProviderType=").append(String.valueOf(this.serviceProviderType)); + sb.append(", serviceTypes=").append(String.valueOf(this.serviceTypes)); + sb.append(", supportedResourceTypes=").append(String.valueOf(this.supportedResourceTypes)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleStateDetails=").append(String.valueOf(this.lifecycleStateDetails)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ServiceProvider)) { + return false; + } + + ServiceProvider other = (ServiceProvider) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.serviceProviderType, other.serviceProviderType) + && java.util.Objects.equals(this.serviceTypes, other.serviceTypes) + && java.util.Objects.equals( + this.supportedResourceTypes, other.supportedResourceTypes) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleStateDetails, other.lifecycleStateDetails) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.serviceProviderType == null + ? 43 + : this.serviceProviderType.hashCode()); + result = (result * PRIME) + (this.serviceTypes == null ? 43 : this.serviceTypes.hashCode()); + result = + (result * PRIME) + + (this.supportedResourceTypes == null + ? 43 + : this.supportedResourceTypes.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleStateDetails == null + ? 43 + : this.lifecycleStateDetails.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderAction.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderAction.java new file mode 100644 index 00000000000..e3d4a0ea2ef --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderAction.java @@ -0,0 +1,532 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Details of the Service Provider Action. Service provider actions are a pre-defined set of commands available to the support operator on different layers of the infrastructure. Although the groupings may differ depending on the infrastructure layers, + * the groups are designed to enable the support operator access to commands to resolve a specific set of issues. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ServiceProviderAction.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ServiceProviderAction + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "name", + "customerDisplayName", + "component", + "resourceType", + "serviceProviderServiceTypes", + "lifecycleState", + "description", + "properties" + }) + public ServiceProviderAction( + String id, + String name, + String customerDisplayName, + String component, + DelegationControlResourceType resourceType, + java.util.List serviceProviderServiceTypes, + LifecycleState lifecycleState, + String description, + java.util.List properties) { + super(); + this.id = id; + this.name = name; + this.customerDisplayName = customerDisplayName; + this.component = component; + this.resourceType = resourceType; + this.serviceProviderServiceTypes = serviceProviderServiceTypes; + this.lifecycleState = lifecycleState; + this.description = description; + this.properties = properties; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique Oracle assigned identifier for the Service Provider Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique Oracle assigned identifier for the Service Provider Action. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Unique name of the Service Provider Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Unique name of the Service Provider Action. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Display Name of the Service Provider Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerDisplayName") + private String customerDisplayName; + + /** + * Display Name of the Service Provider Action. + * @param customerDisplayName the value to set + * @return this builder + **/ + public Builder customerDisplayName(String customerDisplayName) { + this.customerDisplayName = customerDisplayName; + this.__explicitlySet__.add("customerDisplayName"); + return this; + } + /** + * Name of the infrastructure layer associated with the Service Provider Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("component") + private String component; + + /** + * Name of the infrastructure layer associated with the Service Provider Action. + * @param component the value to set + * @return this builder + **/ + public Builder component(String component) { + this.component = component; + this.__explicitlySet__.add("component"); + return this; + } + /** + * resourceType for which the ServiceProviderAction is applicable + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private DelegationControlResourceType resourceType; + + /** + * resourceType for which the ServiceProviderAction is applicable + * @param resourceType the value to set + * @return this builder + **/ + public Builder resourceType(DelegationControlResourceType resourceType) { + this.resourceType = resourceType; + this.__explicitlySet__.add("resourceType"); + return this; + } + /** + * List of Service Provider Service Types that this Service Provider Action is applicable to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceProviderServiceTypes") + private java.util.List serviceProviderServiceTypes; + + /** + * List of Service Provider Service Types that this Service Provider Action is applicable to. + * @param serviceProviderServiceTypes the value to set + * @return this builder + **/ + public Builder serviceProviderServiceTypes( + java.util.List serviceProviderServiceTypes) { + this.serviceProviderServiceTypes = serviceProviderServiceTypes; + this.__explicitlySet__.add("serviceProviderServiceTypes"); + return this; + } + /** + * The current lifecycle state of the Service Provider Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Service Provider Action. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Description of the Service Provider Action in terms of associated risk profile, and characteristics of the operating system commands made + * available to the support operator under this Service Provider Action. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the Service Provider Action in terms of associated risk profile, and characteristics of the operating system commands made + * available to the support operator under this Service Provider Action. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Fine grained properties associated with the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("properties") + private java.util.List properties; + + /** + * Fine grained properties associated with the Delegation Control. + * @param properties the value to set + * @return this builder + **/ + public Builder properties(java.util.List properties) { + this.properties = properties; + this.__explicitlySet__.add("properties"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ServiceProviderAction build() { + ServiceProviderAction model = + new ServiceProviderAction( + this.id, + this.name, + this.customerDisplayName, + this.component, + this.resourceType, + this.serviceProviderServiceTypes, + this.lifecycleState, + this.description, + this.properties); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ServiceProviderAction model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("customerDisplayName")) { + this.customerDisplayName(model.getCustomerDisplayName()); + } + if (model.wasPropertyExplicitlySet("component")) { + this.component(model.getComponent()); + } + if (model.wasPropertyExplicitlySet("resourceType")) { + this.resourceType(model.getResourceType()); + } + if (model.wasPropertyExplicitlySet("serviceProviderServiceTypes")) { + this.serviceProviderServiceTypes(model.getServiceProviderServiceTypes()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("properties")) { + this.properties(model.getProperties()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique Oracle assigned identifier for the Service Provider Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique Oracle assigned identifier for the Service Provider Action. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Unique name of the Service Provider Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Unique name of the Service Provider Action. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Display Name of the Service Provider Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerDisplayName") + private final String customerDisplayName; + + /** + * Display Name of the Service Provider Action. + * @return the value + **/ + public String getCustomerDisplayName() { + return customerDisplayName; + } + + /** + * Name of the infrastructure layer associated with the Service Provider Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("component") + private final String component; + + /** + * Name of the infrastructure layer associated with the Service Provider Action. + * @return the value + **/ + public String getComponent() { + return component; + } + + /** + * resourceType for which the ServiceProviderAction is applicable + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private final DelegationControlResourceType resourceType; + + /** + * resourceType for which the ServiceProviderAction is applicable + * @return the value + **/ + public DelegationControlResourceType getResourceType() { + return resourceType; + } + + /** + * List of Service Provider Service Types that this Service Provider Action is applicable to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceProviderServiceTypes") + private final java.util.List serviceProviderServiceTypes; + + /** + * List of Service Provider Service Types that this Service Provider Action is applicable to. + * @return the value + **/ + public java.util.List getServiceProviderServiceTypes() { + return serviceProviderServiceTypes; + } + + /** + * The current lifecycle state of the Service Provider Action. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Inactive("INACTIVE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current lifecycle state of the Service Provider Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Service Provider Action. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Description of the Service Provider Action in terms of associated risk profile, and characteristics of the operating system commands made + * available to the support operator under this Service Provider Action. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the Service Provider Action in terms of associated risk profile, and characteristics of the operating system commands made + * available to the support operator under this Service Provider Action. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Fine grained properties associated with the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("properties") + private final java.util.List properties; + + /** + * Fine grained properties associated with the Delegation Control. + * @return the value + **/ + public java.util.List getProperties() { + return properties; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ServiceProviderAction("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", customerDisplayName=").append(String.valueOf(this.customerDisplayName)); + sb.append(", component=").append(String.valueOf(this.component)); + sb.append(", resourceType=").append(String.valueOf(this.resourceType)); + sb.append(", serviceProviderServiceTypes=") + .append(String.valueOf(this.serviceProviderServiceTypes)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", properties=").append(String.valueOf(this.properties)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ServiceProviderAction)) { + return false; + } + + ServiceProviderAction other = (ServiceProviderAction) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.customerDisplayName, other.customerDisplayName) + && java.util.Objects.equals(this.component, other.component) + && java.util.Objects.equals(this.resourceType, other.resourceType) + && java.util.Objects.equals( + this.serviceProviderServiceTypes, other.serviceProviderServiceTypes) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.properties, other.properties) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = + (result * PRIME) + + (this.customerDisplayName == null + ? 43 + : this.customerDisplayName.hashCode()); + result = (result * PRIME) + (this.component == null ? 43 : this.component.hashCode()); + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); + result = + (result * PRIME) + + (this.serviceProviderServiceTypes == null + ? 43 + : this.serviceProviderServiceTypes.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.properties == null ? 43 : this.properties.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderActionProperties.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderActionProperties.java new file mode 100644 index 00000000000..7af0da7f971 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderActionProperties.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Details of the properties of Service Provider Action. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ServiceProviderActionProperties.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ServiceProviderActionProperties + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "value"}) + public ServiceProviderActionProperties(String name, String value) { + super(); + this.name = name; + this.value = value; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Name of the property + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Name of the property + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * value of the property + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + /** + * value of the property + * @param value the value to set + * @return this builder + **/ + public Builder value(String value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ServiceProviderActionProperties build() { + ServiceProviderActionProperties model = + new ServiceProviderActionProperties(this.name, this.value); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ServiceProviderActionProperties model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Name of the property + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name of the property + * @return the value + **/ + public String getName() { + return name; + } + + /** + * value of the property + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final String value; + + /** + * value of the property + * @return the value + **/ + public String getValue() { + return value; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ServiceProviderActionProperties("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", value=").append(String.valueOf(this.value)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ServiceProviderActionProperties)) { + return false; + } + + ServiceProviderActionProperties other = (ServiceProviderActionProperties) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.value, other.value) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderActionSummary.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderActionSummary.java new file mode 100644 index 00000000000..2981ed784c9 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderActionSummary.java @@ -0,0 +1,442 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Details of the Service Provider Action. Service provider actions are pre-defined set of commands available to the support operator on different layers of the infrastructure. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ServiceProviderActionSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ServiceProviderActionSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "name", + "customerDisplayName", + "component", + "resourceType", + "serviceProviderServiceTypes", + "lifecycleState", + "description" + }) + public ServiceProviderActionSummary( + String id, + String name, + String customerDisplayName, + String component, + DelegationControlResourceType resourceType, + java.util.List serviceProviderServiceTypes, + ServiceProviderAction.LifecycleState lifecycleState, + String description) { + super(); + this.id = id; + this.name = name; + this.customerDisplayName = customerDisplayName; + this.component = component; + this.resourceType = resourceType; + this.serviceProviderServiceTypes = serviceProviderServiceTypes; + this.lifecycleState = lifecycleState; + this.description = description; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique identifier assigned by Oracle to a Service Provider Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique identifier assigned by Oracle to a Service Provider Action. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Name of the Service Provider Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Name of the Service Provider Action. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Display Name of the Service Provider Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerDisplayName") + private String customerDisplayName; + + /** + * Display Name of the Service Provider Action. + * @param customerDisplayName the value to set + * @return this builder + **/ + public Builder customerDisplayName(String customerDisplayName) { + this.customerDisplayName = customerDisplayName; + this.__explicitlySet__.add("customerDisplayName"); + return this; + } + /** + * Name of the component for which the Service Provider Action is applicable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("component") + private String component; + + /** + * Name of the component for which the Service Provider Action is applicable. + * @param component the value to set + * @return this builder + **/ + public Builder component(String component) { + this.component = component; + this.__explicitlySet__.add("component"); + return this; + } + /** + * resourceType for which the ServiceProviderAction is applicable + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private DelegationControlResourceType resourceType; + + /** + * resourceType for which the ServiceProviderAction is applicable + * @param resourceType the value to set + * @return this builder + **/ + public Builder resourceType(DelegationControlResourceType resourceType) { + this.resourceType = resourceType; + this.__explicitlySet__.add("resourceType"); + return this; + } + /** + * List of Service Provider Service Types that this Service Provider Action is applicable to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceProviderServiceTypes") + private java.util.List serviceProviderServiceTypes; + + /** + * List of Service Provider Service Types that this Service Provider Action is applicable to. + * @param serviceProviderServiceTypes the value to set + * @return this builder + **/ + public Builder serviceProviderServiceTypes( + java.util.List serviceProviderServiceTypes) { + this.serviceProviderServiceTypes = serviceProviderServiceTypes; + this.__explicitlySet__.add("serviceProviderServiceTypes"); + return this; + } + /** + * The current lifecycle state of the Service Provider Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private ServiceProviderAction.LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Service Provider Action. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(ServiceProviderAction.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Description of the Service Provider Action in terms of associated risk profile, and characteristics of the operating system commands made + * available to the support operator under this Service Provider Action. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the Service Provider Action in terms of associated risk profile, and characteristics of the operating system commands made + * available to the support operator under this Service Provider Action. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ServiceProviderActionSummary build() { + ServiceProviderActionSummary model = + new ServiceProviderActionSummary( + this.id, + this.name, + this.customerDisplayName, + this.component, + this.resourceType, + this.serviceProviderServiceTypes, + this.lifecycleState, + this.description); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ServiceProviderActionSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("customerDisplayName")) { + this.customerDisplayName(model.getCustomerDisplayName()); + } + if (model.wasPropertyExplicitlySet("component")) { + this.component(model.getComponent()); + } + if (model.wasPropertyExplicitlySet("resourceType")) { + this.resourceType(model.getResourceType()); + } + if (model.wasPropertyExplicitlySet("serviceProviderServiceTypes")) { + this.serviceProviderServiceTypes(model.getServiceProviderServiceTypes()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique identifier assigned by Oracle to a Service Provider Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique identifier assigned by Oracle to a Service Provider Action. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Name of the Service Provider Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name of the Service Provider Action. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Display Name of the Service Provider Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerDisplayName") + private final String customerDisplayName; + + /** + * Display Name of the Service Provider Action. + * @return the value + **/ + public String getCustomerDisplayName() { + return customerDisplayName; + } + + /** + * Name of the component for which the Service Provider Action is applicable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("component") + private final String component; + + /** + * Name of the component for which the Service Provider Action is applicable. + * @return the value + **/ + public String getComponent() { + return component; + } + + /** + * resourceType for which the ServiceProviderAction is applicable + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private final DelegationControlResourceType resourceType; + + /** + * resourceType for which the ServiceProviderAction is applicable + * @return the value + **/ + public DelegationControlResourceType getResourceType() { + return resourceType; + } + + /** + * List of Service Provider Service Types that this Service Provider Action is applicable to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceProviderServiceTypes") + private final java.util.List serviceProviderServiceTypes; + + /** + * List of Service Provider Service Types that this Service Provider Action is applicable to. + * @return the value + **/ + public java.util.List getServiceProviderServiceTypes() { + return serviceProviderServiceTypes; + } + + /** + * The current lifecycle state of the Service Provider Action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final ServiceProviderAction.LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Service Provider Action. + * @return the value + **/ + public ServiceProviderAction.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Description of the Service Provider Action in terms of associated risk profile, and characteristics of the operating system commands made + * available to the support operator under this Service Provider Action. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the Service Provider Action in terms of associated risk profile, and characteristics of the operating system commands made + * available to the support operator under this Service Provider Action. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ServiceProviderActionSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", customerDisplayName=").append(String.valueOf(this.customerDisplayName)); + sb.append(", component=").append(String.valueOf(this.component)); + sb.append(", resourceType=").append(String.valueOf(this.resourceType)); + sb.append(", serviceProviderServiceTypes=") + .append(String.valueOf(this.serviceProviderServiceTypes)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ServiceProviderActionSummary)) { + return false; + } + + ServiceProviderActionSummary other = (ServiceProviderActionSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.customerDisplayName, other.customerDisplayName) + && java.util.Objects.equals(this.component, other.component) + && java.util.Objects.equals(this.resourceType, other.resourceType) + && java.util.Objects.equals( + this.serviceProviderServiceTypes, other.serviceProviderServiceTypes) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.description, other.description) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = + (result * PRIME) + + (this.customerDisplayName == null + ? 43 + : this.customerDisplayName.hashCode()); + result = (result * PRIME) + (this.component == null ? 43 : this.component.hashCode()); + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); + result = + (result * PRIME) + + (this.serviceProviderServiceTypes == null + ? 43 + : this.serviceProviderServiceTypes.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderActionSummaryCollection.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderActionSummaryCollection.java new file mode 100644 index 00000000000..c455c45f382 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderActionSummaryCollection.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * List of ServiceProviderActionSummary resources. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ServiceProviderActionSummaryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ServiceProviderActionSummaryCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ServiceProviderActionSummaryCollection( + java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * contains ServiceProviderActionSummary + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * contains ServiceProviderActionSummary + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ServiceProviderActionSummaryCollection build() { + ServiceProviderActionSummaryCollection model = + new ServiceProviderActionSummaryCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ServiceProviderActionSummaryCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * contains ServiceProviderActionSummary + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * contains ServiceProviderActionSummary + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ServiceProviderActionSummaryCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ServiceProviderActionSummaryCollection)) { + return false; + } + + ServiceProviderActionSummaryCollection other = (ServiceProviderActionSummaryCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderInteractionCollection.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderInteractionCollection.java new file mode 100644 index 00000000000..ef1c85367dd --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderInteractionCollection.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Results of access request additionalInfo search, which contains details of the conversation between customer and operator. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ServiceProviderInteractionCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ServiceProviderInteractionCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ServiceProviderInteractionCollection( + java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * contains ServiceProviderInteractionSummary + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * contains ServiceProviderInteractionSummary + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ServiceProviderInteractionCollection build() { + ServiceProviderInteractionCollection model = + new ServiceProviderInteractionCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ServiceProviderInteractionCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * contains ServiceProviderInteractionSummary + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * contains ServiceProviderInteractionSummary + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ServiceProviderInteractionCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ServiceProviderInteractionCollection)) { + return false; + } + + ServiceProviderInteractionCollection other = (ServiceProviderInteractionCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderInteractionRequestDetails.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderInteractionRequestDetails.java new file mode 100644 index 00000000000..dde9540c1ae --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderInteractionRequestDetails.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Details for asking operator to provide more information. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ServiceProviderInteractionRequestDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ServiceProviderInteractionRequestDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"moreInfoDetails"}) + public ServiceProviderInteractionRequestDetails(String moreInfoDetails) { + super(); + this.moreInfoDetails = moreInfoDetails; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Questions for operator to provide more information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("moreInfoDetails") + private String moreInfoDetails; + + /** + * Questions for operator to provide more information. + * @param moreInfoDetails the value to set + * @return this builder + **/ + public Builder moreInfoDetails(String moreInfoDetails) { + this.moreInfoDetails = moreInfoDetails; + this.__explicitlySet__.add("moreInfoDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ServiceProviderInteractionRequestDetails build() { + ServiceProviderInteractionRequestDetails model = + new ServiceProviderInteractionRequestDetails(this.moreInfoDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ServiceProviderInteractionRequestDetails model) { + if (model.wasPropertyExplicitlySet("moreInfoDetails")) { + this.moreInfoDetails(model.getMoreInfoDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Questions for operator to provide more information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("moreInfoDetails") + private final String moreInfoDetails; + + /** + * Questions for operator to provide more information. + * @return the value + **/ + public String getMoreInfoDetails() { + return moreInfoDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ServiceProviderInteractionRequestDetails("); + sb.append("super=").append(super.toString()); + sb.append("moreInfoDetails=").append(String.valueOf(this.moreInfoDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ServiceProviderInteractionRequestDetails)) { + return false; + } + + ServiceProviderInteractionRequestDetails other = + (ServiceProviderInteractionRequestDetails) o; + return java.util.Objects.equals(this.moreInfoDetails, other.moreInfoDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.moreInfoDetails == null ? 43 : this.moreInfoDetails.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderInteractionSummary.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderInteractionSummary.java new file mode 100644 index 00000000000..beb211d5fe1 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderInteractionSummary.java @@ -0,0 +1,395 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Summary of customer and operator conversation. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ServiceProviderInteractionSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ServiceProviderInteractionSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "messageIdentifier", + "userId", + "userName", + "message", + "userType", + "timestamp" + }) + public ServiceProviderInteractionSummary( + String messageIdentifier, + String userId, + String userName, + String message, + UserType userType, + java.util.Date timestamp) { + super(); + this.messageIdentifier = messageIdentifier; + this.userId = userId; + this.userName = userName; + this.message = message; + this.userType = userType; + this.timestamp = timestamp; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The unique identifier of the message within the scope of the associated access request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("messageIdentifier") + private String messageIdentifier; + + /** + * The unique identifier of the message within the scope of the associated access request. + * @param messageIdentifier the value to set + * @return this builder + **/ + public Builder messageIdentifier(String messageIdentifier) { + this.messageIdentifier = messageIdentifier; + this.__explicitlySet__.add("messageIdentifier"); + return this; + } + /** + * ID of the customer or operator who is part of this conversation. For operator, this field is null. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userId") + private String userId; + + /** + * ID of the customer or operator who is part of this conversation. For operator, this field is null. + * @param userId the value to set + * @return this builder + **/ + public Builder userId(String userId) { + this.userId = userId; + this.__explicitlySet__.add("userId"); + return this; + } + /** + * Name of the customer or operator who is part of this conversation. For operator, the name is "Operator". + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userName") + private String userName; + + /** + * Name of the customer or operator who is part of this conversation. For operator, the name is "Operator". + * @param userName the value to set + * @return this builder + **/ + public Builder userName(String userName) { + this.userName = userName; + this.__explicitlySet__.add("userName"); + return this; + } + /** + * The information exchanged between the customer and the operator. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * The information exchanged between the customer and the operator. + * @param message the value to set + * @return this builder + **/ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + /** + * Indicates whether the user is a customer or an operator. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userType") + private UserType userType; + + /** + * Indicates whether the user is a customer or an operator. + * @param userType the value to set + * @return this builder + **/ + public Builder userType(UserType userType) { + this.userType = userType; + this.__explicitlySet__.add("userType"); + return this; + } + /** + * Time when the conversation happened in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + /** + * Time when the conversation happened in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + * @param timestamp the value to set + * @return this builder + **/ + public Builder timestamp(java.util.Date timestamp) { + this.timestamp = timestamp; + this.__explicitlySet__.add("timestamp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ServiceProviderInteractionSummary build() { + ServiceProviderInteractionSummary model = + new ServiceProviderInteractionSummary( + this.messageIdentifier, + this.userId, + this.userName, + this.message, + this.userType, + this.timestamp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ServiceProviderInteractionSummary model) { + if (model.wasPropertyExplicitlySet("messageIdentifier")) { + this.messageIdentifier(model.getMessageIdentifier()); + } + if (model.wasPropertyExplicitlySet("userId")) { + this.userId(model.getUserId()); + } + if (model.wasPropertyExplicitlySet("userName")) { + this.userName(model.getUserName()); + } + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + if (model.wasPropertyExplicitlySet("userType")) { + this.userType(model.getUserType()); + } + if (model.wasPropertyExplicitlySet("timestamp")) { + this.timestamp(model.getTimestamp()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The unique identifier of the message within the scope of the associated access request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("messageIdentifier") + private final String messageIdentifier; + + /** + * The unique identifier of the message within the scope of the associated access request. + * @return the value + **/ + public String getMessageIdentifier() { + return messageIdentifier; + } + + /** + * ID of the customer or operator who is part of this conversation. For operator, this field is null. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userId") + private final String userId; + + /** + * ID of the customer or operator who is part of this conversation. For operator, this field is null. + * @return the value + **/ + public String getUserId() { + return userId; + } + + /** + * Name of the customer or operator who is part of this conversation. For operator, the name is "Operator". + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userName") + private final String userName; + + /** + * Name of the customer or operator who is part of this conversation. For operator, the name is "Operator". + * @return the value + **/ + public String getUserName() { + return userName; + } + + /** + * The information exchanged between the customer and the operator. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * The information exchanged between the customer and the operator. + * @return the value + **/ + public String getMessage() { + return message; + } + + /** + * Indicates whether the user is a customer or an operator. + **/ + public enum UserType { + Customer("CUSTOMER"), + Operator("OPERATOR"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UserType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (UserType v : UserType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + UserType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static UserType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'UserType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Indicates whether the user is a customer or an operator. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userType") + private final UserType userType; + + /** + * Indicates whether the user is a customer or an operator. + * @return the value + **/ + public UserType getUserType() { + return userType; + } + + /** + * Time when the conversation happened in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private final java.util.Date timestamp; + + /** + * Time when the conversation happened in [RFC 3339](https://tools.ietf.org/html/rfc3339)timestamp format, e.g. '2020-05-22T21:10:29.600Z'. + * + * @return the value + **/ + public java.util.Date getTimestamp() { + return timestamp; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ServiceProviderInteractionSummary("); + sb.append("super=").append(super.toString()); + sb.append("messageIdentifier=").append(String.valueOf(this.messageIdentifier)); + sb.append(", userId=").append(String.valueOf(this.userId)); + sb.append(", userName=").append(String.valueOf(this.userName)); + sb.append(", message=").append(String.valueOf(this.message)); + sb.append(", userType=").append(String.valueOf(this.userType)); + sb.append(", timestamp=").append(String.valueOf(this.timestamp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ServiceProviderInteractionSummary)) { + return false; + } + + ServiceProviderInteractionSummary other = (ServiceProviderInteractionSummary) o; + return java.util.Objects.equals(this.messageIdentifier, other.messageIdentifier) + && java.util.Objects.equals(this.userId, other.userId) + && java.util.Objects.equals(this.userName, other.userName) + && java.util.Objects.equals(this.message, other.message) + && java.util.Objects.equals(this.userType, other.userType) + && java.util.Objects.equals(this.timestamp, other.timestamp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.messageIdentifier == null ? 43 : this.messageIdentifier.hashCode()); + result = (result * PRIME) + (this.userId == null ? 43 : this.userId.hashCode()); + result = (result * PRIME) + (this.userName == null ? 43 : this.userName.hashCode()); + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + (this.userType == null ? 43 : this.userType.hashCode()); + result = (result * PRIME) + (this.timestamp == null ? 43 : this.timestamp.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderServiceType.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderServiceType.java new file mode 100644 index 00000000000..8558091acf3 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderServiceType.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Types of service provided by the Service Provider. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public enum ServiceProviderServiceType { + Troubleshooting("TROUBLESHOOTING"), + AssistedPatching("ASSISTED_PATCHING"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ServiceProviderServiceType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ServiceProviderServiceType v : ServiceProviderServiceType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ServiceProviderServiceType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ServiceProviderServiceType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ServiceProviderServiceType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderSummary.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderSummary.java new file mode 100644 index 00000000000..2a4170b890a --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderSummary.java @@ -0,0 +1,694 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Summary of the Service Provider. Service provider offers services to the customer to support the delegated resources. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ServiceProviderSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ServiceProviderSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "name", + "serviceProviderType", + "serviceTypes", + "supportedResourceTypes", + "lifecycleState", + "lifecycleStateDetails", + "timeCreated", + "timeUpdated", + "freeformTags", + "definedTags", + "systemTags" + }) + public ServiceProviderSummary( + String id, + String compartmentId, + String name, + ServiceProvider.ServiceProviderType serviceProviderType, + java.util.List serviceTypes, + java.util.List supportedResourceTypes, + ServiceProvider.LifecycleState lifecycleState, + String lifecycleStateDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.name = name; + this.serviceProviderType = serviceProviderType; + this.serviceTypes = serviceTypes; + this.supportedResourceTypes = supportedResourceTypes; + this.lifecycleState = lifecycleState; + this.lifecycleStateDetails = lifecycleStateDetails; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique identifier for the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique identifier for the Service Provider. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The OCID of the compartment that contains the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the Delegation Control. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Unique name of the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Unique name of the Service Provider. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Service Provider type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceProviderType") + private ServiceProvider.ServiceProviderType serviceProviderType; + + /** + * Service Provider type. + * @param serviceProviderType the value to set + * @return this builder + **/ + public Builder serviceProviderType( + ServiceProvider.ServiceProviderType serviceProviderType) { + this.serviceProviderType = serviceProviderType; + this.__explicitlySet__.add("serviceProviderType"); + return this; + } + /** + * Types of services offered by this provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceTypes") + private java.util.List serviceTypes; + + /** + * Types of services offered by this provider. + * @param serviceTypes the value to set + * @return this builder + **/ + public Builder serviceTypes(java.util.List serviceTypes) { + this.serviceTypes = serviceTypes; + this.__explicitlySet__.add("serviceTypes"); + return this; + } + /** + * Resource types for which this provider will provide service. Default to all if not specified. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportedResourceTypes") + private java.util.List supportedResourceTypes; + + /** + * Resource types for which this provider will provide service. Default to all if not specified. + * @param supportedResourceTypes the value to set + * @return this builder + **/ + public Builder supportedResourceTypes( + java.util.List supportedResourceTypes) { + this.supportedResourceTypes = supportedResourceTypes; + this.__explicitlySet__.add("supportedResourceTypes"); + return this; + } + /** + * The current lifecycle state of the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private ServiceProvider.LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Service Provider. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(ServiceProvider.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Description of the current lifecycle state in more detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleStateDetails") + private String lifecycleStateDetails; + + /** + * Description of the current lifecycle state in more detail. + * @param lifecycleStateDetails the value to set + * @return this builder + **/ + public Builder lifecycleStateDetails(String lifecycleStateDetails) { + this.lifecycleStateDetails = lifecycleStateDetails; + this.__explicitlySet__.add("lifecycleStateDetails"); + return this; + } + /** + * Time when the Service Provider was created expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Time when the Service Provider was created expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * Time when the Service Provider was last modified expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * Time when the Service Provider was last modified expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ServiceProviderSummary build() { + ServiceProviderSummary model = + new ServiceProviderSummary( + this.id, + this.compartmentId, + this.name, + this.serviceProviderType, + this.serviceTypes, + this.supportedResourceTypes, + this.lifecycleState, + this.lifecycleStateDetails, + this.timeCreated, + this.timeUpdated, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ServiceProviderSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("serviceProviderType")) { + this.serviceProviderType(model.getServiceProviderType()); + } + if (model.wasPropertyExplicitlySet("serviceTypes")) { + this.serviceTypes(model.getServiceTypes()); + } + if (model.wasPropertyExplicitlySet("supportedResourceTypes")) { + this.supportedResourceTypes(model.getSupportedResourceTypes()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleStateDetails")) { + this.lifecycleStateDetails(model.getLifecycleStateDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique identifier for the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique identifier for the Service Provider. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of the compartment that contains the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the Delegation Control. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Unique name of the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Unique name of the Service Provider. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Service Provider type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceProviderType") + private final ServiceProvider.ServiceProviderType serviceProviderType; + + /** + * Service Provider type. + * @return the value + **/ + public ServiceProvider.ServiceProviderType getServiceProviderType() { + return serviceProviderType; + } + + /** + * Types of services offered by this provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceTypes") + private final java.util.List serviceTypes; + + /** + * Types of services offered by this provider. + * @return the value + **/ + public java.util.List getServiceTypes() { + return serviceTypes; + } + + /** + * Resource types for which this provider will provide service. Default to all if not specified. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportedResourceTypes") + private final java.util.List supportedResourceTypes; + + /** + * Resource types for which this provider will provide service. Default to all if not specified. + * @return the value + **/ + public java.util.List getSupportedResourceTypes() { + return supportedResourceTypes; + } + + /** + * The current lifecycle state of the Service Provider. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final ServiceProvider.LifecycleState lifecycleState; + + /** + * The current lifecycle state of the Service Provider. + * @return the value + **/ + public ServiceProvider.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Description of the current lifecycle state in more detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleStateDetails") + private final String lifecycleStateDetails; + + /** + * Description of the current lifecycle state in more detail. + * @return the value + **/ + public String getLifecycleStateDetails() { + return lifecycleStateDetails; + } + + /** + * Time when the Service Provider was created expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Time when the Service Provider was created expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * Time when the Service Provider was last modified expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * Time when the Service Provider was last modified expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format, e.g. '2020-05-22T21:10:29.600Z' + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ServiceProviderSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", serviceProviderType=").append(String.valueOf(this.serviceProviderType)); + sb.append(", serviceTypes=").append(String.valueOf(this.serviceTypes)); + sb.append(", supportedResourceTypes=").append(String.valueOf(this.supportedResourceTypes)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleStateDetails=").append(String.valueOf(this.lifecycleStateDetails)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ServiceProviderSummary)) { + return false; + } + + ServiceProviderSummary other = (ServiceProviderSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.serviceProviderType, other.serviceProviderType) + && java.util.Objects.equals(this.serviceTypes, other.serviceTypes) + && java.util.Objects.equals( + this.supportedResourceTypes, other.supportedResourceTypes) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleStateDetails, other.lifecycleStateDetails) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = + (result * PRIME) + + (this.serviceProviderType == null + ? 43 + : this.serviceProviderType.hashCode()); + result = (result * PRIME) + (this.serviceTypes == null ? 43 : this.serviceTypes.hashCode()); + result = + (result * PRIME) + + (this.supportedResourceTypes == null + ? 43 + : this.supportedResourceTypes.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleStateDetails == null + ? 43 + : this.lifecycleStateDetails.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderSummaryCollection.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderSummaryCollection.java new file mode 100644 index 00000000000..65c5347203e --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/ServiceProviderSummaryCollection.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * List of ServiceProviderSummary objects. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ServiceProviderSummaryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ServiceProviderSummaryCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ServiceProviderSummaryCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of ServiceProviderSummary objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of ServiceProviderSummary objects. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ServiceProviderSummaryCollection build() { + ServiceProviderSummaryCollection model = + new ServiceProviderSummaryCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ServiceProviderSummaryCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of ServiceProviderSummary objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of ServiceProviderSummary objects. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ServiceProviderSummaryCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ServiceProviderSummaryCollection)) { + return false; + } + + ServiceProviderSummaryCollection other = (ServiceProviderSummaryCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/SortOrders.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/SortOrders.java new file mode 100644 index 00000000000..8e40756134e --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/SortOrders.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Sort orders. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public enum SortOrders { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrders v : SortOrders.values()) { + map.put(v.getValue(), v); + } + } + + SortOrders(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrders create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortOrders: " + key); + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/UpdateDelegationControlDetails.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/UpdateDelegationControlDetails.java new file mode 100644 index 00000000000..dc7f49ce13a --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/UpdateDelegationControlDetails.java @@ -0,0 +1,618 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Information about the new Delegation Control. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateDelegationControlDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateDelegationControlDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "numApprovalsRequired", + "delegationSubscriptionIds", + "isAutoApproveDuringMaintenance", + "resourceIds", + "preApprovedServiceProviderActionNames", + "notificationTopicId", + "notificationMessageFormat", + "freeformTags", + "definedTags" + }) + public UpdateDelegationControlDetails( + String displayName, + String description, + Integer numApprovalsRequired, + java.util.List delegationSubscriptionIds, + Boolean isAutoApproveDuringMaintenance, + java.util.List resourceIds, + java.util.List preApprovedServiceProviderActionNames, + String notificationTopicId, + DelegationControl.NotificationMessageFormat notificationMessageFormat, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.numApprovalsRequired = numApprovalsRequired; + this.delegationSubscriptionIds = delegationSubscriptionIds; + this.isAutoApproveDuringMaintenance = isAutoApproveDuringMaintenance; + this.resourceIds = resourceIds; + this.preApprovedServiceProviderActionNames = preApprovedServiceProviderActionNames; + this.notificationTopicId = notificationTopicId; + this.notificationMessageFormat = notificationMessageFormat; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Name of the Delegation Control. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Name of the Delegation Control. The name does not need to be unique. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Description of the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the Delegation Control. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * number of approvals required. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numApprovalsRequired") + private Integer numApprovalsRequired; + + /** + * number of approvals required. + * @param numApprovalsRequired the value to set + * @return this builder + **/ + public Builder numApprovalsRequired(Integer numApprovalsRequired) { + this.numApprovalsRequired = numApprovalsRequired; + this.__explicitlySet__.add("numApprovalsRequired"); + return this; + } + /** + * List of Delegation Subscription OCID that are allowed for this Delegation Control. The allowed subscriptions will determine the available Service Provider Actions. Only support operators for the allowed subscriptions are allowed to create Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("delegationSubscriptionIds") + private java.util.List delegationSubscriptionIds; + + /** + * List of Delegation Subscription OCID that are allowed for this Delegation Control. The allowed subscriptions will determine the available Service Provider Actions. Only support operators for the allowed subscriptions are allowed to create Delegated Resource Access Request. + * @param delegationSubscriptionIds the value to set + * @return this builder + **/ + public Builder delegationSubscriptionIds(java.util.List delegationSubscriptionIds) { + this.delegationSubscriptionIds = delegationSubscriptionIds; + this.__explicitlySet__.add("delegationSubscriptionIds"); + return this; + } + /** + * Set to true to allow all Delegated Resource Access Request to be approved automatically during maintenance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoApproveDuringMaintenance") + private Boolean isAutoApproveDuringMaintenance; + + /** + * Set to true to allow all Delegated Resource Access Request to be approved automatically during maintenance. + * @param isAutoApproveDuringMaintenance the value to set + * @return this builder + **/ + public Builder isAutoApproveDuringMaintenance(Boolean isAutoApproveDuringMaintenance) { + this.isAutoApproveDuringMaintenance = isAutoApproveDuringMaintenance; + this.__explicitlySet__.add("isAutoApproveDuringMaintenance"); + return this; + } + /** + * The OCID of the selected resources that this Delegation Control is applicable to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceIds") + private java.util.List resourceIds; + + /** + * The OCID of the selected resources that this Delegation Control is applicable to. + * @param resourceIds the value to set + * @return this builder + **/ + public Builder resourceIds(java.util.List resourceIds) { + this.resourceIds = resourceIds; + this.__explicitlySet__.add("resourceIds"); + return this; + } + /** + * List of pre-approved Service Provider Action names. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. Delegated Resource Access Requests associated with a resource governed by this Delegation Control will be + * automatically approved if the Delegated Resource Access Request only contain Service Provider Actions in the pre-approved list. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("preApprovedServiceProviderActionNames") + private java.util.List preApprovedServiceProviderActionNames; + + /** + * List of pre-approved Service Provider Action names. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. Delegated Resource Access Requests associated with a resource governed by this Delegation Control will be + * automatically approved if the Delegated Resource Access Request only contain Service Provider Actions in the pre-approved list. + * + * @param preApprovedServiceProviderActionNames the value to set + * @return this builder + **/ + public Builder preApprovedServiceProviderActionNames( + java.util.List preApprovedServiceProviderActionNames) { + this.preApprovedServiceProviderActionNames = preApprovedServiceProviderActionNames; + this.__explicitlySet__.add("preApprovedServiceProviderActionNames"); + return this; + } + /** + * The OCID of the OCI Notification topic to publish messages related to this Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicId") + private String notificationTopicId; + + /** + * The OCID of the OCI Notification topic to publish messages related to this Delegation Control. + * @param notificationTopicId the value to set + * @return this builder + **/ + public Builder notificationTopicId(String notificationTopicId) { + this.notificationTopicId = notificationTopicId; + this.__explicitlySet__.add("notificationTopicId"); + return this; + } + /** + * The format of the OCI Notification messages for this Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationMessageFormat") + private DelegationControl.NotificationMessageFormat notificationMessageFormat; + + /** + * The format of the OCI Notification messages for this Delegation Control. + * @param notificationMessageFormat the value to set + * @return this builder + **/ + public Builder notificationMessageFormat( + DelegationControl.NotificationMessageFormat notificationMessageFormat) { + this.notificationMessageFormat = notificationMessageFormat; + this.__explicitlySet__.add("notificationMessageFormat"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateDelegationControlDetails build() { + UpdateDelegationControlDetails model = + new UpdateDelegationControlDetails( + this.displayName, + this.description, + this.numApprovalsRequired, + this.delegationSubscriptionIds, + this.isAutoApproveDuringMaintenance, + this.resourceIds, + this.preApprovedServiceProviderActionNames, + this.notificationTopicId, + this.notificationMessageFormat, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateDelegationControlDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("numApprovalsRequired")) { + this.numApprovalsRequired(model.getNumApprovalsRequired()); + } + if (model.wasPropertyExplicitlySet("delegationSubscriptionIds")) { + this.delegationSubscriptionIds(model.getDelegationSubscriptionIds()); + } + if (model.wasPropertyExplicitlySet("isAutoApproveDuringMaintenance")) { + this.isAutoApproveDuringMaintenance(model.getIsAutoApproveDuringMaintenance()); + } + if (model.wasPropertyExplicitlySet("resourceIds")) { + this.resourceIds(model.getResourceIds()); + } + if (model.wasPropertyExplicitlySet("preApprovedServiceProviderActionNames")) { + this.preApprovedServiceProviderActionNames( + model.getPreApprovedServiceProviderActionNames()); + } + if (model.wasPropertyExplicitlySet("notificationTopicId")) { + this.notificationTopicId(model.getNotificationTopicId()); + } + if (model.wasPropertyExplicitlySet("notificationMessageFormat")) { + this.notificationMessageFormat(model.getNotificationMessageFormat()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Name of the Delegation Control. The name does not need to be unique. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Name of the Delegation Control. The name does not need to be unique. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Description of the Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the Delegation Control. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * number of approvals required. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numApprovalsRequired") + private final Integer numApprovalsRequired; + + /** + * number of approvals required. + * @return the value + **/ + public Integer getNumApprovalsRequired() { + return numApprovalsRequired; + } + + /** + * List of Delegation Subscription OCID that are allowed for this Delegation Control. The allowed subscriptions will determine the available Service Provider Actions. Only support operators for the allowed subscriptions are allowed to create Delegated Resource Access Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("delegationSubscriptionIds") + private final java.util.List delegationSubscriptionIds; + + /** + * List of Delegation Subscription OCID that are allowed for this Delegation Control. The allowed subscriptions will determine the available Service Provider Actions. Only support operators for the allowed subscriptions are allowed to create Delegated Resource Access Request. + * @return the value + **/ + public java.util.List getDelegationSubscriptionIds() { + return delegationSubscriptionIds; + } + + /** + * Set to true to allow all Delegated Resource Access Request to be approved automatically during maintenance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoApproveDuringMaintenance") + private final Boolean isAutoApproveDuringMaintenance; + + /** + * Set to true to allow all Delegated Resource Access Request to be approved automatically during maintenance. + * @return the value + **/ + public Boolean getIsAutoApproveDuringMaintenance() { + return isAutoApproveDuringMaintenance; + } + + /** + * The OCID of the selected resources that this Delegation Control is applicable to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceIds") + private final java.util.List resourceIds; + + /** + * The OCID of the selected resources that this Delegation Control is applicable to. + * @return the value + **/ + public java.util.List getResourceIds() { + return resourceIds; + } + + /** + * List of pre-approved Service Provider Action names. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. Delegated Resource Access Requests associated with a resource governed by this Delegation Control will be + * automatically approved if the Delegated Resource Access Request only contain Service Provider Actions in the pre-approved list. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("preApprovedServiceProviderActionNames") + private final java.util.List preApprovedServiceProviderActionNames; + + /** + * List of pre-approved Service Provider Action names. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. Delegated Resource Access Requests associated with a resource governed by this Delegation Control will be + * automatically approved if the Delegated Resource Access Request only contain Service Provider Actions in the pre-approved list. + * + * @return the value + **/ + public java.util.List getPreApprovedServiceProviderActionNames() { + return preApprovedServiceProviderActionNames; + } + + /** + * The OCID of the OCI Notification topic to publish messages related to this Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationTopicId") + private final String notificationTopicId; + + /** + * The OCID of the OCI Notification topic to publish messages related to this Delegation Control. + * @return the value + **/ + public String getNotificationTopicId() { + return notificationTopicId; + } + + /** + * The format of the OCI Notification messages for this Delegation Control. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationMessageFormat") + private final DelegationControl.NotificationMessageFormat notificationMessageFormat; + + /** + * The format of the OCI Notification messages for this Delegation Control. + * @return the value + **/ + public DelegationControl.NotificationMessageFormat getNotificationMessageFormat() { + return notificationMessageFormat; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateDelegationControlDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", numApprovalsRequired=").append(String.valueOf(this.numApprovalsRequired)); + sb.append(", delegationSubscriptionIds=") + .append(String.valueOf(this.delegationSubscriptionIds)); + sb.append(", isAutoApproveDuringMaintenance=") + .append(String.valueOf(this.isAutoApproveDuringMaintenance)); + sb.append(", resourceIds=").append(String.valueOf(this.resourceIds)); + sb.append(", preApprovedServiceProviderActionNames=") + .append(String.valueOf(this.preApprovedServiceProviderActionNames)); + sb.append(", notificationTopicId=").append(String.valueOf(this.notificationTopicId)); + sb.append(", notificationMessageFormat=") + .append(String.valueOf(this.notificationMessageFormat)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateDelegationControlDetails)) { + return false; + } + + UpdateDelegationControlDetails other = (UpdateDelegationControlDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.numApprovalsRequired, other.numApprovalsRequired) + && java.util.Objects.equals( + this.delegationSubscriptionIds, other.delegationSubscriptionIds) + && java.util.Objects.equals( + this.isAutoApproveDuringMaintenance, other.isAutoApproveDuringMaintenance) + && java.util.Objects.equals(this.resourceIds, other.resourceIds) + && java.util.Objects.equals( + this.preApprovedServiceProviderActionNames, + other.preApprovedServiceProviderActionNames) + && java.util.Objects.equals(this.notificationTopicId, other.notificationTopicId) + && java.util.Objects.equals( + this.notificationMessageFormat, other.notificationMessageFormat) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.numApprovalsRequired == null + ? 43 + : this.numApprovalsRequired.hashCode()); + result = + (result * PRIME) + + (this.delegationSubscriptionIds == null + ? 43 + : this.delegationSubscriptionIds.hashCode()); + result = + (result * PRIME) + + (this.isAutoApproveDuringMaintenance == null + ? 43 + : this.isAutoApproveDuringMaintenance.hashCode()); + result = (result * PRIME) + (this.resourceIds == null ? 43 : this.resourceIds.hashCode()); + result = + (result * PRIME) + + (this.preApprovedServiceProviderActionNames == null + ? 43 + : this.preApprovedServiceProviderActionNames.hashCode()); + result = + (result * PRIME) + + (this.notificationTopicId == null + ? 43 + : this.notificationTopicId.hashCode()); + result = + (result * PRIME) + + (this.notificationMessageFormat == null + ? 43 + : this.notificationMessageFormat.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/UpdateDelegationSubscriptionDetails.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/UpdateDelegationSubscriptionDetails.java new file mode 100644 index 00000000000..7c30834f65c --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/UpdateDelegationSubscriptionDetails.java @@ -0,0 +1,253 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Details for updating the Delegation Subscription. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateDelegationSubscriptionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateDelegationSubscriptionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"description", "freeformTags", "definedTags"}) + public UpdateDelegationSubscriptionDetails( + String description, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.description = description; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Description of the Delegation Subscription. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the Delegation Subscription. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateDelegationSubscriptionDetails build() { + UpdateDelegationSubscriptionDetails model = + new UpdateDelegationSubscriptionDetails( + this.description, this.freeformTags, this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateDelegationSubscriptionDetails model) { + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Description of the Delegation Subscription. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the Delegation Subscription. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateDelegationSubscriptionDetails("); + sb.append("super=").append(super.toString()); + sb.append("description=").append(String.valueOf(this.description)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateDelegationSubscriptionDetails)) { + return false; + } + + UpdateDelegationSubscriptionDetails other = (UpdateDelegationSubscriptionDetails) o; + return java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequest.java new file mode 100644 index 00000000000..ba0c104a585 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequest.java @@ -0,0 +1,500 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * A description of workrequest status + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = WorkRequest.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequest extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "operationType", + "status", + "id", + "compartmentId", + "resources", + "percentComplete", + "timeAccepted", + "timeStarted", + "timeFinished" + }) + public WorkRequest( + OperationType operationType, + OperationStatus status, + String id, + String compartmentId, + java.util.List resources, + Float percentComplete, + java.util.Date timeAccepted, + java.util.Date timeStarted, + java.util.Date timeFinished) { + super(); + this.operationType = operationType; + this.status = status; + this.id = id; + this.compartmentId = compartmentId; + this.resources = resources; + this.percentComplete = percentComplete; + this.timeAccepted = timeAccepted; + this.timeStarted = timeStarted; + this.timeFinished = timeFinished; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Type of the work request + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private OperationType operationType; + + /** + * Type of the work request + * @param operationType the value to set + * @return this builder + **/ + public Builder operationType(OperationType operationType) { + this.operationType = operationType; + this.__explicitlySet__.add("operationType"); + return this; + } + /** + * Status of current work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private OperationStatus status; + + /** + * Status of current work request. + * @param status the value to set + * @return this builder + **/ + public Builder status(OperationStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The id of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The id of the work request. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The ocid of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The ocid of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The resources affected by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * The resources affected by this work request. + * @param resources the value to set + * @return this builder + **/ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** + * Percentage of the request completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private Float percentComplete; + + /** + * Percentage of the request completed. + * @param percentComplete the value to set + * @return this builder + **/ + public Builder percentComplete(Float percentComplete) { + this.percentComplete = percentComplete; + this.__explicitlySet__.add("percentComplete"); + return this; + } + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private java.util.Date timeAccepted; + + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + * @param timeAccepted the value to set + * @return this builder + **/ + public Builder timeAccepted(java.util.Date timeAccepted) { + this.timeAccepted = timeAccepted; + this.__explicitlySet__.add("timeAccepted"); + return this; + } + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + /** + * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @param timeFinished the value to set + * @return this builder + **/ + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequest build() { + WorkRequest model = + new WorkRequest( + this.operationType, + this.status, + this.id, + this.compartmentId, + this.resources, + this.percentComplete, + this.timeAccepted, + this.timeStarted, + this.timeFinished); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequest model) { + if (model.wasPropertyExplicitlySet("operationType")) { + this.operationType(model.getOperationType()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("percentComplete")) { + this.percentComplete(model.getPercentComplete()); + } + if (model.wasPropertyExplicitlySet("timeAccepted")) { + this.timeAccepted(model.getTimeAccepted()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Type of the work request + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private final OperationType operationType; + + /** + * Type of the work request + * @return the value + **/ + public OperationType getOperationType() { + return operationType; + } + + /** + * Status of current work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final OperationStatus status; + + /** + * Status of current work request. + * @return the value + **/ + public OperationStatus getStatus() { + return status; + } + + /** + * The id of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The id of the work request. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The ocid of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The ocid of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The resources affected by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * The resources affected by this work request. + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + /** + * Percentage of the request completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private final Float percentComplete; + + /** + * Percentage of the request completed. + * @return the value + **/ + public Float getPercentComplete() { + return percentComplete; + } + + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private final java.util.Date timeAccepted; + + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + * @return the value + **/ + public java.util.Date getTimeAccepted() { + return timeAccepted; + } + + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private final java.util.Date timeFinished; + + /** + * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeFinished() { + return timeFinished; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequest("); + sb.append("super=").append(super.toString()); + sb.append("operationType=").append(String.valueOf(this.operationType)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", percentComplete=").append(String.valueOf(this.percentComplete)); + sb.append(", timeAccepted=").append(String.valueOf(this.timeAccepted)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequest)) { + return false; + } + + WorkRequest other = (WorkRequest) o; + return java.util.Objects.equals(this.operationType, other.operationType) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.percentComplete, other.percentComplete) + && java.util.Objects.equals(this.timeAccepted, other.timeAccepted) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeFinished, other.timeFinished) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.operationType == null ? 43 : this.operationType.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = + (result * PRIME) + + (this.percentComplete == null ? 43 : this.percentComplete.hashCode()); + result = (result * PRIME) + (this.timeAccepted == null ? 43 : this.timeAccepted.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestError.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestError.java new file mode 100644 index 00000000000..b5617d4ec8e --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestError.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * An error encountered while executing a work request. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = WorkRequestError.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestError extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"code", "message", "timestamp"}) + public WorkRequestError(String code, String message, java.util.Date timestamp) { + super(); + this.code = code; + this.message = message; + this.timestamp = timestamp; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A machine-usable code for the error that occured. Error codes are listed on + * (https://docs.cloud.oracle.com/Content/API/References/apierrors.htm) + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("code") + private String code; + + /** + * A machine-usable code for the error that occured. Error codes are listed on + * (https://docs.cloud.oracle.com/Content/API/References/apierrors.htm) + * + * @param code the value to set + * @return this builder + **/ + public Builder code(String code) { + this.code = code; + this.__explicitlySet__.add("code"); + return this; + } + /** + * A human readable description of the issue encountered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * A human readable description of the issue encountered. + * @param message the value to set + * @return this builder + **/ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + /** + * The time the error occured. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + /** + * The time the error occured. An RFC3339 formatted datetime string. + * @param timestamp the value to set + * @return this builder + **/ + public Builder timestamp(java.util.Date timestamp) { + this.timestamp = timestamp; + this.__explicitlySet__.add("timestamp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestError build() { + WorkRequestError model = new WorkRequestError(this.code, this.message, this.timestamp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestError model) { + if (model.wasPropertyExplicitlySet("code")) { + this.code(model.getCode()); + } + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + if (model.wasPropertyExplicitlySet("timestamp")) { + this.timestamp(model.getTimestamp()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A machine-usable code for the error that occured. Error codes are listed on + * (https://docs.cloud.oracle.com/Content/API/References/apierrors.htm) + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("code") + private final String code; + + /** + * A machine-usable code for the error that occured. Error codes are listed on + * (https://docs.cloud.oracle.com/Content/API/References/apierrors.htm) + * + * @return the value + **/ + public String getCode() { + return code; + } + + /** + * A human readable description of the issue encountered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * A human readable description of the issue encountered. + * @return the value + **/ + public String getMessage() { + return message; + } + + /** + * The time the error occured. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private final java.util.Date timestamp; + + /** + * The time the error occured. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimestamp() { + return timestamp; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestError("); + sb.append("super=").append(super.toString()); + sb.append("code=").append(String.valueOf(this.code)); + sb.append(", message=").append(String.valueOf(this.message)); + sb.append(", timestamp=").append(String.valueOf(this.timestamp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestError)) { + return false; + } + + WorkRequestError other = (WorkRequestError) o; + return java.util.Objects.equals(this.code, other.code) + && java.util.Objects.equals(this.message, other.message) + && java.util.Objects.equals(this.timestamp, other.timestamp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.code == null ? 43 : this.code.hashCode()); + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + (this.timestamp == null ? 43 : this.timestamp.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestErrorCollection.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestErrorCollection.java new file mode 100644 index 00000000000..75a56c4425f --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestErrorCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Results of a workRequestError search. Contains both WorkRequestError items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestErrorCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestErrorCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public WorkRequestErrorCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of workRequestError objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of workRequestError objects. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestErrorCollection build() { + WorkRequestErrorCollection model = new WorkRequestErrorCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestErrorCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of workRequestError objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of workRequestError objects. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestErrorCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestErrorCollection)) { + return false; + } + + WorkRequestErrorCollection other = (WorkRequestErrorCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestLogEntry.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestLogEntry.java new file mode 100644 index 00000000000..56e525d4ffc --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestLogEntry.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * A log message from the execution of a work request. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestLogEntry.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestLogEntry extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"message", "timestamp"}) + public WorkRequestLogEntry(String message, java.util.Date timestamp) { + super(); + this.message = message; + this.timestamp = timestamp; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Human-readable log message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * Human-readable log message. + * @param message the value to set + * @return this builder + **/ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + /** + * The time the log message was written. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + /** + * The time the log message was written. An RFC3339 formatted datetime string + * @param timestamp the value to set + * @return this builder + **/ + public Builder timestamp(java.util.Date timestamp) { + this.timestamp = timestamp; + this.__explicitlySet__.add("timestamp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestLogEntry build() { + WorkRequestLogEntry model = new WorkRequestLogEntry(this.message, this.timestamp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestLogEntry model) { + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + if (model.wasPropertyExplicitlySet("timestamp")) { + this.timestamp(model.getTimestamp()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Human-readable log message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * Human-readable log message. + * @return the value + **/ + public String getMessage() { + return message; + } + + /** + * The time the log message was written. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private final java.util.Date timestamp; + + /** + * The time the log message was written. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimestamp() { + return timestamp; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestLogEntry("); + sb.append("super=").append(super.toString()); + sb.append("message=").append(String.valueOf(this.message)); + sb.append(", timestamp=").append(String.valueOf(this.timestamp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestLogEntry)) { + return false; + } + + WorkRequestLogEntry other = (WorkRequestLogEntry) o; + return java.util.Objects.equals(this.message, other.message) + && java.util.Objects.equals(this.timestamp, other.timestamp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + (this.timestamp == null ? 43 : this.timestamp.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestLogEntryCollection.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestLogEntryCollection.java new file mode 100644 index 00000000000..fe62da1e426 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestLogEntryCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Results of a workRequestLog search. Contains both workRequestLog items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestLogEntryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestLogEntryCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public WorkRequestLogEntryCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of workRequestLogEntries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of workRequestLogEntries. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestLogEntryCollection build() { + WorkRequestLogEntryCollection model = new WorkRequestLogEntryCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestLogEntryCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of workRequestLogEntries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of workRequestLogEntries. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestLogEntryCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestLogEntryCollection)) { + return false; + } + + WorkRequestLogEntryCollection other = (WorkRequestLogEntryCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestResource.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestResource.java new file mode 100644 index 00000000000..77838ad3474 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestResource.java @@ -0,0 +1,316 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * A resource created or operated on by a work request. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestResource.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestResource extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "entityType", + "actionType", + "identifier", + "entityUri", + "metadata" + }) + public WorkRequestResource( + String entityType, + ActionType actionType, + String identifier, + String entityUri, + java.util.Map metadata) { + super(); + this.entityType = entityType; + this.actionType = actionType; + this.identifier = identifier; + this.entityUri = entityUri; + this.metadata = metadata; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The resource type the work request affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private String entityType; + + /** + * The resource type the work request affects. + * @param entityType the value to set + * @return this builder + **/ + public Builder entityType(String entityType) { + this.entityType = entityType; + this.__explicitlySet__.add("entityType"); + return this; + } + /** + * The way in which this resource is affected by the work tracked in the work request. + * A resource being created, updated, or deleted will remain in the IN_PROGRESS state until + * work is complete for that resource at which point it will transition to CREATED, UPDATED, + * or DELETED, respectively. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + /** + * The way in which this resource is affected by the work tracked in the work request. + * A resource being created, updated, or deleted will remain in the IN_PROGRESS state until + * work is complete for that resource at which point it will transition to CREATED, UPDATED, + * or DELETED, respectively. + * + * @param actionType the value to set + * @return this builder + **/ + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + /** + * The identifier of the resource the work request affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("identifier") + private String identifier; + + /** + * The identifier of the resource the work request affects. + * @param identifier the value to set + * @return this builder + **/ + public Builder identifier(String identifier) { + this.identifier = identifier; + this.__explicitlySet__.add("identifier"); + return this; + } + /** + * The URI path that the user can do a GET on to access the resource metadata + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityUri") + private String entityUri; + + /** + * The URI path that the user can do a GET on to access the resource metadata + * @param entityUri the value to set + * @return this builder + **/ + public Builder entityUri(String entityUri) { + this.entityUri = entityUri; + this.__explicitlySet__.add("entityUri"); + return this; + } + /** + * Additional information that helps to explain the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private java.util.Map metadata; + + /** + * Additional information that helps to explain the resource. + * @param metadata the value to set + * @return this builder + **/ + public Builder metadata(java.util.Map metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestResource build() { + WorkRequestResource model = + new WorkRequestResource( + this.entityType, + this.actionType, + this.identifier, + this.entityUri, + this.metadata); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestResource model) { + if (model.wasPropertyExplicitlySet("entityType")) { + this.entityType(model.getEntityType()); + } + if (model.wasPropertyExplicitlySet("actionType")) { + this.actionType(model.getActionType()); + } + if (model.wasPropertyExplicitlySet("identifier")) { + this.identifier(model.getIdentifier()); + } + if (model.wasPropertyExplicitlySet("entityUri")) { + this.entityUri(model.getEntityUri()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The resource type the work request affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private final String entityType; + + /** + * The resource type the work request affects. + * @return the value + **/ + public String getEntityType() { + return entityType; + } + + /** + * The way in which this resource is affected by the work tracked in the work request. + * A resource being created, updated, or deleted will remain in the IN_PROGRESS state until + * work is complete for that resource at which point it will transition to CREATED, UPDATED, + * or DELETED, respectively. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private final ActionType actionType; + + /** + * The way in which this resource is affected by the work tracked in the work request. + * A resource being created, updated, or deleted will remain in the IN_PROGRESS state until + * work is complete for that resource at which point it will transition to CREATED, UPDATED, + * or DELETED, respectively. + * + * @return the value + **/ + public ActionType getActionType() { + return actionType; + } + + /** + * The identifier of the resource the work request affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("identifier") + private final String identifier; + + /** + * The identifier of the resource the work request affects. + * @return the value + **/ + public String getIdentifier() { + return identifier; + } + + /** + * The URI path that the user can do a GET on to access the resource metadata + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityUri") + private final String entityUri; + + /** + * The URI path that the user can do a GET on to access the resource metadata + * @return the value + **/ + public String getEntityUri() { + return entityUri; + } + + /** + * Additional information that helps to explain the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final java.util.Map metadata; + + /** + * Additional information that helps to explain the resource. + * @return the value + **/ + public java.util.Map getMetadata() { + return metadata; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestResource("); + sb.append("super=").append(super.toString()); + sb.append("entityType=").append(String.valueOf(this.entityType)); + sb.append(", actionType=").append(String.valueOf(this.actionType)); + sb.append(", identifier=").append(String.valueOf(this.identifier)); + sb.append(", entityUri=").append(String.valueOf(this.entityUri)); + sb.append(", metadata=").append(String.valueOf(this.metadata)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestResource)) { + return false; + } + + WorkRequestResource other = (WorkRequestResource) o; + return java.util.Objects.equals(this.entityType, other.entityType) + && java.util.Objects.equals(this.actionType, other.actionType) + && java.util.Objects.equals(this.identifier, other.identifier) + && java.util.Objects.equals(this.entityUri, other.entityUri) + && java.util.Objects.equals(this.metadata, other.metadata) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.entityType == null ? 43 : this.entityType.hashCode()); + result = (result * PRIME) + (this.actionType == null ? 43 : this.actionType.hashCode()); + result = (result * PRIME) + (this.identifier == null ? 43 : this.identifier.hashCode()); + result = (result * PRIME) + (this.entityUri == null ? 43 : this.entityUri.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestResourceMetadataKey.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestResourceMetadataKey.java new file mode 100644 index 00000000000..b39db7b59be --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestResourceMetadataKey.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Possible Metadata keys for workRequest resource metadata + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public enum WorkRequestResourceMetadataKey { + VmClusterId("VM_CLUSTER_ID"), + Hostnames("HOSTNAMES"), + Commands("COMMANDS"), + ResultLocation("RESULT_LOCATION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(WorkRequestResourceMetadataKey.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (WorkRequestResourceMetadataKey v : WorkRequestResourceMetadataKey.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + WorkRequestResourceMetadataKey(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static WorkRequestResourceMetadataKey create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'WorkRequestResourceMetadataKey', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestSummary.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestSummary.java new file mode 100644 index 00000000000..e9dcd2a56c2 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestSummary.java @@ -0,0 +1,502 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * A summary of the status of a work request. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "operationType", + "status", + "id", + "compartmentId", + "resources", + "percentComplete", + "timeAccepted", + "timeStarted", + "timeFinished" + }) + public WorkRequestSummary( + OperationType operationType, + OperationStatus status, + String id, + String compartmentId, + java.util.List resources, + Float percentComplete, + java.util.Date timeAccepted, + java.util.Date timeStarted, + java.util.Date timeFinished) { + super(); + this.operationType = operationType; + this.status = status; + this.id = id; + this.compartmentId = compartmentId; + this.resources = resources; + this.percentComplete = percentComplete; + this.timeAccepted = timeAccepted; + this.timeStarted = timeStarted; + this.timeFinished = timeFinished; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Type of the work request + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private OperationType operationType; + + /** + * Type of the work request + * @param operationType the value to set + * @return this builder + **/ + public Builder operationType(OperationType operationType) { + this.operationType = operationType; + this.__explicitlySet__.add("operationType"); + return this; + } + /** + * Status of current work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private OperationStatus status; + + /** + * Status of current work request. + * @param status the value to set + * @return this builder + **/ + public Builder status(OperationStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The id of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The id of the work request. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The ocid of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The ocid of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The resources affected by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * The resources affected by this work request. + * @param resources the value to set + * @return this builder + **/ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** + * Percentage of the request completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private Float percentComplete; + + /** + * Percentage of the request completed. + * @param percentComplete the value to set + * @return this builder + **/ + public Builder percentComplete(Float percentComplete) { + this.percentComplete = percentComplete; + this.__explicitlySet__.add("percentComplete"); + return this; + } + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private java.util.Date timeAccepted; + + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + * @param timeAccepted the value to set + * @return this builder + **/ + public Builder timeAccepted(java.util.Date timeAccepted) { + this.timeAccepted = timeAccepted; + this.__explicitlySet__.add("timeAccepted"); + return this; + } + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + /** + * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @param timeFinished the value to set + * @return this builder + **/ + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestSummary build() { + WorkRequestSummary model = + new WorkRequestSummary( + this.operationType, + this.status, + this.id, + this.compartmentId, + this.resources, + this.percentComplete, + this.timeAccepted, + this.timeStarted, + this.timeFinished); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestSummary model) { + if (model.wasPropertyExplicitlySet("operationType")) { + this.operationType(model.getOperationType()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("percentComplete")) { + this.percentComplete(model.getPercentComplete()); + } + if (model.wasPropertyExplicitlySet("timeAccepted")) { + this.timeAccepted(model.getTimeAccepted()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Type of the work request + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private final OperationType operationType; + + /** + * Type of the work request + * @return the value + **/ + public OperationType getOperationType() { + return operationType; + } + + /** + * Status of current work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final OperationStatus status; + + /** + * Status of current work request. + * @return the value + **/ + public OperationStatus getStatus() { + return status; + } + + /** + * The id of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The id of the work request. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The ocid of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The ocid of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The resources affected by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * The resources affected by this work request. + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + /** + * Percentage of the request completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private final Float percentComplete; + + /** + * Percentage of the request completed. + * @return the value + **/ + public Float getPercentComplete() { + return percentComplete; + } + + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private final java.util.Date timeAccepted; + + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + * @return the value + **/ + public java.util.Date getTimeAccepted() { + return timeAccepted; + } + + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private final java.util.Date timeFinished; + + /** + * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeFinished() { + return timeFinished; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestSummary("); + sb.append("super=").append(super.toString()); + sb.append("operationType=").append(String.valueOf(this.operationType)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", percentComplete=").append(String.valueOf(this.percentComplete)); + sb.append(", timeAccepted=").append(String.valueOf(this.timeAccepted)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestSummary)) { + return false; + } + + WorkRequestSummary other = (WorkRequestSummary) o; + return java.util.Objects.equals(this.operationType, other.operationType) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.percentComplete, other.percentComplete) + && java.util.Objects.equals(this.timeAccepted, other.timeAccepted) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeFinished, other.timeFinished) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.operationType == null ? 43 : this.operationType.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = + (result * PRIME) + + (this.percentComplete == null ? 43 : this.percentComplete.hashCode()); + result = (result * PRIME) + (this.timeAccepted == null ? 43 : this.timeAccepted.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestSummaryCollection.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestSummaryCollection.java new file mode 100644 index 00000000000..586237ae900 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/model/WorkRequestSummaryCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.model; + +/** + * Results of a workRequest search. Contains both WorkRequest items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestSummaryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestSummaryCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public WorkRequestSummaryCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of workRequestSummary objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of workRequestSummary objects. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestSummaryCollection build() { + WorkRequestSummaryCollection model = new WorkRequestSummaryCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestSummaryCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of workRequestSummary objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of workRequestSummary objects. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestSummaryCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestSummaryCollection)) { + return false; + } + + WorkRequestSummaryCollection other = (WorkRequestSummaryCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ApproveDelegatedResourceAccessRequestRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ApproveDelegatedResourceAccessRequestRequest.java new file mode 100644 index 00000000000..f109cf8a936 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ApproveDelegatedResourceAccessRequestRequest.java @@ -0,0 +1,390 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use ApproveDelegatedResourceAccessRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ApproveDelegatedResourceAccessRequestRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.delegateaccesscontrol.model + .ApproveDelegatedResourceAccessRequestDetails> { + + /** + * Unique Delegated Resource Access Request identifier + */ + private String delegatedResourceAccessRequestId; + + /** + * Unique Delegated Resource Access Request identifier + */ + public String getDelegatedResourceAccessRequestId() { + return delegatedResourceAccessRequestId; + } + /** + * Details regarding the approval of a Delegated Resource Access Request created by the support operator. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ApproveDelegatedResourceAccessRequestDetails + approveDelegatedResourceAccessRequestDetails; + + /** + * Details regarding the approval of a Delegated Resource Access Request created by the support operator. + */ + public com.oracle.bmc.delegateaccesscontrol.model.ApproveDelegatedResourceAccessRequestDetails + getApproveDelegatedResourceAccessRequestDetails() { + return approveDelegatedResourceAccessRequestDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.delegateaccesscontrol.model.ApproveDelegatedResourceAccessRequestDetails + getBody$() { + return approveDelegatedResourceAccessRequestDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ApproveDelegatedResourceAccessRequestRequest, + com.oracle.bmc.delegateaccesscontrol.model + .ApproveDelegatedResourceAccessRequestDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Delegated Resource Access Request identifier + */ + private String delegatedResourceAccessRequestId = null; + + /** + * Unique Delegated Resource Access Request identifier + * @param delegatedResourceAccessRequestId the value to set + * @return this builder instance + */ + public Builder delegatedResourceAccessRequestId(String delegatedResourceAccessRequestId) { + this.delegatedResourceAccessRequestId = delegatedResourceAccessRequestId; + return this; + } + + /** + * Details regarding the approval of a Delegated Resource Access Request created by the support operator. + */ + private com.oracle.bmc.delegateaccesscontrol.model + .ApproveDelegatedResourceAccessRequestDetails + approveDelegatedResourceAccessRequestDetails = null; + + /** + * Details regarding the approval of a Delegated Resource Access Request created by the support operator. + * @param approveDelegatedResourceAccessRequestDetails the value to set + * @return this builder instance + */ + public Builder approveDelegatedResourceAccessRequestDetails( + com.oracle.bmc.delegateaccesscontrol.model + .ApproveDelegatedResourceAccessRequestDetails + approveDelegatedResourceAccessRequestDetails) { + this.approveDelegatedResourceAccessRequestDetails = + approveDelegatedResourceAccessRequestDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ApproveDelegatedResourceAccessRequestRequest o) { + delegatedResourceAccessRequestId(o.getDelegatedResourceAccessRequestId()); + approveDelegatedResourceAccessRequestDetails( + o.getApproveDelegatedResourceAccessRequestDetails()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ApproveDelegatedResourceAccessRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ApproveDelegatedResourceAccessRequestRequest + */ + public ApproveDelegatedResourceAccessRequestRequest build() { + ApproveDelegatedResourceAccessRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.delegateaccesscontrol.model + .ApproveDelegatedResourceAccessRequestDetails + body) { + approveDelegatedResourceAccessRequestDetails(body); + return this; + } + + /** + * Build the instance of ApproveDelegatedResourceAccessRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ApproveDelegatedResourceAccessRequestRequest + */ + public ApproveDelegatedResourceAccessRequestRequest buildWithoutInvocationCallback() { + ApproveDelegatedResourceAccessRequestRequest request = + new ApproveDelegatedResourceAccessRequestRequest(); + request.delegatedResourceAccessRequestId = delegatedResourceAccessRequestId; + request.approveDelegatedResourceAccessRequestDetails = + approveDelegatedResourceAccessRequestDetails; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new ApproveDelegatedResourceAccessRequestRequest(delegatedResourceAccessRequestId, approveDelegatedResourceAccessRequestDetails, opcRetryToken, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .delegatedResourceAccessRequestId(delegatedResourceAccessRequestId) + .approveDelegatedResourceAccessRequestDetails( + approveDelegatedResourceAccessRequestDetails) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",delegatedResourceAccessRequestId=") + .append(String.valueOf(this.delegatedResourceAccessRequestId)); + sb.append(",approveDelegatedResourceAccessRequestDetails=") + .append(String.valueOf(this.approveDelegatedResourceAccessRequestDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ApproveDelegatedResourceAccessRequestRequest)) { + return false; + } + + ApproveDelegatedResourceAccessRequestRequest other = + (ApproveDelegatedResourceAccessRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.delegatedResourceAccessRequestId, + other.delegatedResourceAccessRequestId) + && java.util.Objects.equals( + this.approveDelegatedResourceAccessRequestDetails, + other.approveDelegatedResourceAccessRequestDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.delegatedResourceAccessRequestId == null + ? 43 + : this.delegatedResourceAccessRequestId.hashCode()); + result = + (result * PRIME) + + (this.approveDelegatedResourceAccessRequestDetails == null + ? 43 + : this.approveDelegatedResourceAccessRequestDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ChangeDelegationControlCompartmentRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ChangeDelegationControlCompartmentRequest.java new file mode 100644 index 00000000000..ec924867d9a --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ChangeDelegationControlCompartmentRequest.java @@ -0,0 +1,384 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use ChangeDelegationControlCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ChangeDelegationControlCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.delegateaccesscontrol.model + .ChangeDelegationControlCompartmentDetails> { + + /** + * unique Delegation Control identifier + */ + private String delegationControlId; + + /** + * unique Delegation Control identifier + */ + public String getDelegationControlId() { + return delegationControlId; + } + /** + * Moves the Delegation Control resource into a different compartment. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ChangeDelegationControlCompartmentDetails + changeDelegationControlCompartmentDetails; + + /** + * Moves the Delegation Control resource into a different compartment. + */ + public com.oracle.bmc.delegateaccesscontrol.model.ChangeDelegationControlCompartmentDetails + getChangeDelegationControlCompartmentDetails() { + return changeDelegationControlCompartmentDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.delegateaccesscontrol.model.ChangeDelegationControlCompartmentDetails + getBody$() { + return changeDelegationControlCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeDelegationControlCompartmentRequest, + com.oracle.bmc.delegateaccesscontrol.model + .ChangeDelegationControlCompartmentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique Delegation Control identifier + */ + private String delegationControlId = null; + + /** + * unique Delegation Control identifier + * @param delegationControlId the value to set + * @return this builder instance + */ + public Builder delegationControlId(String delegationControlId) { + this.delegationControlId = delegationControlId; + return this; + } + + /** + * Moves the Delegation Control resource into a different compartment. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ChangeDelegationControlCompartmentDetails + changeDelegationControlCompartmentDetails = null; + + /** + * Moves the Delegation Control resource into a different compartment. + * @param changeDelegationControlCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeDelegationControlCompartmentDetails( + com.oracle.bmc.delegateaccesscontrol.model.ChangeDelegationControlCompartmentDetails + changeDelegationControlCompartmentDetails) { + this.changeDelegationControlCompartmentDetails = + changeDelegationControlCompartmentDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeDelegationControlCompartmentRequest o) { + delegationControlId(o.getDelegationControlId()); + changeDelegationControlCompartmentDetails( + o.getChangeDelegationControlCompartmentDetails()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeDelegationControlCompartmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeDelegationControlCompartmentRequest + */ + public ChangeDelegationControlCompartmentRequest build() { + ChangeDelegationControlCompartmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.delegateaccesscontrol.model.ChangeDelegationControlCompartmentDetails + body) { + changeDelegationControlCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeDelegationControlCompartmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeDelegationControlCompartmentRequest + */ + public ChangeDelegationControlCompartmentRequest buildWithoutInvocationCallback() { + ChangeDelegationControlCompartmentRequest request = + new ChangeDelegationControlCompartmentRequest(); + request.delegationControlId = delegationControlId; + request.changeDelegationControlCompartmentDetails = + changeDelegationControlCompartmentDetails; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new ChangeDelegationControlCompartmentRequest(delegationControlId, changeDelegationControlCompartmentDetails, opcRetryToken, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .delegationControlId(delegationControlId) + .changeDelegationControlCompartmentDetails( + changeDelegationControlCompartmentDetails) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",delegationControlId=").append(String.valueOf(this.delegationControlId)); + sb.append(",changeDelegationControlCompartmentDetails=") + .append(String.valueOf(this.changeDelegationControlCompartmentDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeDelegationControlCompartmentRequest)) { + return false; + } + + ChangeDelegationControlCompartmentRequest other = + (ChangeDelegationControlCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.delegationControlId, other.delegationControlId) + && java.util.Objects.equals( + this.changeDelegationControlCompartmentDetails, + other.changeDelegationControlCompartmentDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.delegationControlId == null + ? 43 + : this.delegationControlId.hashCode()); + result = + (result * PRIME) + + (this.changeDelegationControlCompartmentDetails == null + ? 43 + : this.changeDelegationControlCompartmentDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ChangeDelegationSubscriptionCompartmentRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ChangeDelegationSubscriptionCompartmentRequest.java new file mode 100644 index 00000000000..1ad63b27641 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ChangeDelegationSubscriptionCompartmentRequest.java @@ -0,0 +1,391 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use ChangeDelegationSubscriptionCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ChangeDelegationSubscriptionCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.delegateaccesscontrol.model + .ChangeDelegationSubscriptionCompartmentDetails> { + + /** + * unique Delegation Subscription identifier + */ + private String delegationSubscriptionId; + + /** + * unique Delegation Subscription identifier + */ + public String getDelegationSubscriptionId() { + return delegationSubscriptionId; + } + /** + * Moves the Delegation Subscription resource into a different compartment. + */ + private com.oracle.bmc.delegateaccesscontrol.model + .ChangeDelegationSubscriptionCompartmentDetails + changeDelegationSubscriptionCompartmentDetails; + + /** + * Moves the Delegation Subscription resource into a different compartment. + */ + public com.oracle.bmc.delegateaccesscontrol.model.ChangeDelegationSubscriptionCompartmentDetails + getChangeDelegationSubscriptionCompartmentDetails() { + return changeDelegationSubscriptionCompartmentDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.delegateaccesscontrol.model.ChangeDelegationSubscriptionCompartmentDetails + getBody$() { + return changeDelegationSubscriptionCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeDelegationSubscriptionCompartmentRequest, + com.oracle.bmc.delegateaccesscontrol.model + .ChangeDelegationSubscriptionCompartmentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique Delegation Subscription identifier + */ + private String delegationSubscriptionId = null; + + /** + * unique Delegation Subscription identifier + * @param delegationSubscriptionId the value to set + * @return this builder instance + */ + public Builder delegationSubscriptionId(String delegationSubscriptionId) { + this.delegationSubscriptionId = delegationSubscriptionId; + return this; + } + + /** + * Moves the Delegation Subscription resource into a different compartment. + */ + private com.oracle.bmc.delegateaccesscontrol.model + .ChangeDelegationSubscriptionCompartmentDetails + changeDelegationSubscriptionCompartmentDetails = null; + + /** + * Moves the Delegation Subscription resource into a different compartment. + * @param changeDelegationSubscriptionCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeDelegationSubscriptionCompartmentDetails( + com.oracle.bmc.delegateaccesscontrol.model + .ChangeDelegationSubscriptionCompartmentDetails + changeDelegationSubscriptionCompartmentDetails) { + this.changeDelegationSubscriptionCompartmentDetails = + changeDelegationSubscriptionCompartmentDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeDelegationSubscriptionCompartmentRequest o) { + delegationSubscriptionId(o.getDelegationSubscriptionId()); + changeDelegationSubscriptionCompartmentDetails( + o.getChangeDelegationSubscriptionCompartmentDetails()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeDelegationSubscriptionCompartmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeDelegationSubscriptionCompartmentRequest + */ + public ChangeDelegationSubscriptionCompartmentRequest build() { + ChangeDelegationSubscriptionCompartmentRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.delegateaccesscontrol.model + .ChangeDelegationSubscriptionCompartmentDetails + body) { + changeDelegationSubscriptionCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeDelegationSubscriptionCompartmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeDelegationSubscriptionCompartmentRequest + */ + public ChangeDelegationSubscriptionCompartmentRequest buildWithoutInvocationCallback() { + ChangeDelegationSubscriptionCompartmentRequest request = + new ChangeDelegationSubscriptionCompartmentRequest(); + request.delegationSubscriptionId = delegationSubscriptionId; + request.changeDelegationSubscriptionCompartmentDetails = + changeDelegationSubscriptionCompartmentDetails; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new ChangeDelegationSubscriptionCompartmentRequest(delegationSubscriptionId, changeDelegationSubscriptionCompartmentDetails, opcRetryToken, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .delegationSubscriptionId(delegationSubscriptionId) + .changeDelegationSubscriptionCompartmentDetails( + changeDelegationSubscriptionCompartmentDetails) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",delegationSubscriptionId=") + .append(String.valueOf(this.delegationSubscriptionId)); + sb.append(",changeDelegationSubscriptionCompartmentDetails=") + .append(String.valueOf(this.changeDelegationSubscriptionCompartmentDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeDelegationSubscriptionCompartmentRequest)) { + return false; + } + + ChangeDelegationSubscriptionCompartmentRequest other = + (ChangeDelegationSubscriptionCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.delegationSubscriptionId, other.delegationSubscriptionId) + && java.util.Objects.equals( + this.changeDelegationSubscriptionCompartmentDetails, + other.changeDelegationSubscriptionCompartmentDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.delegationSubscriptionId == null + ? 43 + : this.delegationSubscriptionId.hashCode()); + result = + (result * PRIME) + + (this.changeDelegationSubscriptionCompartmentDetails == null + ? 43 + : this.changeDelegationSubscriptionCompartmentDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/CreateDelegationControlRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/CreateDelegationControlRequest.java new file mode 100644 index 00000000000..afe9e1ce559 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/CreateDelegationControlRequest.java @@ -0,0 +1,285 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use CreateDelegationControlRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class CreateDelegationControlRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.delegateaccesscontrol.model.CreateDelegationControlDetails> { + + /** + * Details for the new Delegation Control. + */ + private com.oracle.bmc.delegateaccesscontrol.model.CreateDelegationControlDetails + createDelegationControlDetails; + + /** + * Details for the new Delegation Control. + */ + public com.oracle.bmc.delegateaccesscontrol.model.CreateDelegationControlDetails + getCreateDelegationControlDetails() { + return createDelegationControlDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.delegateaccesscontrol.model.CreateDelegationControlDetails getBody$() { + return createDelegationControlDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateDelegationControlRequest, + com.oracle.bmc.delegateaccesscontrol.model.CreateDelegationControlDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new Delegation Control. + */ + private com.oracle.bmc.delegateaccesscontrol.model.CreateDelegationControlDetails + createDelegationControlDetails = null; + + /** + * Details for the new Delegation Control. + * @param createDelegationControlDetails the value to set + * @return this builder instance + */ + public Builder createDelegationControlDetails( + com.oracle.bmc.delegateaccesscontrol.model.CreateDelegationControlDetails + createDelegationControlDetails) { + this.createDelegationControlDetails = createDelegationControlDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateDelegationControlRequest o) { + createDelegationControlDetails(o.getCreateDelegationControlDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateDelegationControlRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateDelegationControlRequest + */ + public CreateDelegationControlRequest build() { + CreateDelegationControlRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.delegateaccesscontrol.model.CreateDelegationControlDetails body) { + createDelegationControlDetails(body); + return this; + } + + /** + * Build the instance of CreateDelegationControlRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateDelegationControlRequest + */ + public CreateDelegationControlRequest buildWithoutInvocationCallback() { + CreateDelegationControlRequest request = new CreateDelegationControlRequest(); + request.createDelegationControlDetails = createDelegationControlDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateDelegationControlRequest(createDelegationControlDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createDelegationControlDetails(createDelegationControlDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createDelegationControlDetails=") + .append(String.valueOf(this.createDelegationControlDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDelegationControlRequest)) { + return false; + } + + CreateDelegationControlRequest other = (CreateDelegationControlRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createDelegationControlDetails, other.createDelegationControlDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createDelegationControlDetails == null + ? 43 + : this.createDelegationControlDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/CreateDelegationSubscriptionRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/CreateDelegationSubscriptionRequest.java new file mode 100644 index 00000000000..249a11f446d --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/CreateDelegationSubscriptionRequest.java @@ -0,0 +1,289 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use CreateDelegationSubscriptionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class CreateDelegationSubscriptionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.delegateaccesscontrol.model.CreateDelegationSubscriptionDetails> { + + /** + * Details for creating Delegation Subscription in Delegation Control. + */ + private com.oracle.bmc.delegateaccesscontrol.model.CreateDelegationSubscriptionDetails + createDelegationSubscriptionDetails; + + /** + * Details for creating Delegation Subscription in Delegation Control. + */ + public com.oracle.bmc.delegateaccesscontrol.model.CreateDelegationSubscriptionDetails + getCreateDelegationSubscriptionDetails() { + return createDelegationSubscriptionDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.delegateaccesscontrol.model.CreateDelegationSubscriptionDetails + getBody$() { + return createDelegationSubscriptionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateDelegationSubscriptionRequest, + com.oracle.bmc.delegateaccesscontrol.model + .CreateDelegationSubscriptionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for creating Delegation Subscription in Delegation Control. + */ + private com.oracle.bmc.delegateaccesscontrol.model.CreateDelegationSubscriptionDetails + createDelegationSubscriptionDetails = null; + + /** + * Details for creating Delegation Subscription in Delegation Control. + * @param createDelegationSubscriptionDetails the value to set + * @return this builder instance + */ + public Builder createDelegationSubscriptionDetails( + com.oracle.bmc.delegateaccesscontrol.model.CreateDelegationSubscriptionDetails + createDelegationSubscriptionDetails) { + this.createDelegationSubscriptionDetails = createDelegationSubscriptionDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateDelegationSubscriptionRequest o) { + createDelegationSubscriptionDetails(o.getCreateDelegationSubscriptionDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateDelegationSubscriptionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateDelegationSubscriptionRequest + */ + public CreateDelegationSubscriptionRequest build() { + CreateDelegationSubscriptionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.delegateaccesscontrol.model.CreateDelegationSubscriptionDetails + body) { + createDelegationSubscriptionDetails(body); + return this; + } + + /** + * Build the instance of CreateDelegationSubscriptionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateDelegationSubscriptionRequest + */ + public CreateDelegationSubscriptionRequest buildWithoutInvocationCallback() { + CreateDelegationSubscriptionRequest request = new CreateDelegationSubscriptionRequest(); + request.createDelegationSubscriptionDetails = createDelegationSubscriptionDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateDelegationSubscriptionRequest(createDelegationSubscriptionDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createDelegationSubscriptionDetails(createDelegationSubscriptionDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createDelegationSubscriptionDetails=") + .append(String.valueOf(this.createDelegationSubscriptionDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDelegationSubscriptionRequest)) { + return false; + } + + CreateDelegationSubscriptionRequest other = (CreateDelegationSubscriptionRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createDelegationSubscriptionDetails, + other.createDelegationSubscriptionDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createDelegationSubscriptionDetails == null + ? 43 + : this.createDelegationSubscriptionDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/DeleteDelegationControlRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/DeleteDelegationControlRequest.java new file mode 100644 index 00000000000..20139deebfa --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/DeleteDelegationControlRequest.java @@ -0,0 +1,284 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use DeleteDelegationControlRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class DeleteDelegationControlRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique Delegation Control identifier + */ + private String delegationControlId; + + /** + * unique Delegation Control identifier + */ + public String getDelegationControlId() { + return delegationControlId; + } + /** + * Reason why this Delegation Control is deleted. + */ + private String description; + + /** + * Reason why this Delegation Control is deleted. + */ + public String getDescription() { + return description; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteDelegationControlRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique Delegation Control identifier + */ + private String delegationControlId = null; + + /** + * unique Delegation Control identifier + * @param delegationControlId the value to set + * @return this builder instance + */ + public Builder delegationControlId(String delegationControlId) { + this.delegationControlId = delegationControlId; + return this; + } + + /** + * Reason why this Delegation Control is deleted. + */ + private String description = null; + + /** + * Reason why this Delegation Control is deleted. + * @param description the value to set + * @return this builder instance + */ + public Builder description(String description) { + this.description = description; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteDelegationControlRequest o) { + delegationControlId(o.getDelegationControlId()); + description(o.getDescription()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteDelegationControlRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteDelegationControlRequest + */ + public DeleteDelegationControlRequest build() { + DeleteDelegationControlRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteDelegationControlRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteDelegationControlRequest + */ + public DeleteDelegationControlRequest buildWithoutInvocationCallback() { + DeleteDelegationControlRequest request = new DeleteDelegationControlRequest(); + request.delegationControlId = delegationControlId; + request.description = description; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteDelegationControlRequest(delegationControlId, description, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .delegationControlId(delegationControlId) + .description(description) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",delegationControlId=").append(String.valueOf(this.delegationControlId)); + sb.append(",description=").append(String.valueOf(this.description)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteDelegationControlRequest)) { + return false; + } + + DeleteDelegationControlRequest other = (DeleteDelegationControlRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.delegationControlId, other.delegationControlId) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.delegationControlId == null + ? 43 + : this.delegationControlId.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/DeleteDelegationSubscriptionRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/DeleteDelegationSubscriptionRequest.java new file mode 100644 index 00000000000..01d0b9a0656 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/DeleteDelegationSubscriptionRequest.java @@ -0,0 +1,254 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use DeleteDelegationSubscriptionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class DeleteDelegationSubscriptionRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique Delegation Subscription identifier + */ + private String delegationSubscriptionId; + + /** + * unique Delegation Subscription identifier + */ + public String getDelegationSubscriptionId() { + return delegationSubscriptionId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteDelegationSubscriptionRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique Delegation Subscription identifier + */ + private String delegationSubscriptionId = null; + + /** + * unique Delegation Subscription identifier + * @param delegationSubscriptionId the value to set + * @return this builder instance + */ + public Builder delegationSubscriptionId(String delegationSubscriptionId) { + this.delegationSubscriptionId = delegationSubscriptionId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteDelegationSubscriptionRequest o) { + delegationSubscriptionId(o.getDelegationSubscriptionId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteDelegationSubscriptionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteDelegationSubscriptionRequest + */ + public DeleteDelegationSubscriptionRequest build() { + DeleteDelegationSubscriptionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteDelegationSubscriptionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteDelegationSubscriptionRequest + */ + public DeleteDelegationSubscriptionRequest buildWithoutInvocationCallback() { + DeleteDelegationSubscriptionRequest request = new DeleteDelegationSubscriptionRequest(); + request.delegationSubscriptionId = delegationSubscriptionId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteDelegationSubscriptionRequest(delegationSubscriptionId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .delegationSubscriptionId(delegationSubscriptionId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",delegationSubscriptionId=") + .append(String.valueOf(this.delegationSubscriptionId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteDelegationSubscriptionRequest)) { + return false; + } + + DeleteDelegationSubscriptionRequest other = (DeleteDelegationSubscriptionRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.delegationSubscriptionId, other.delegationSubscriptionId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.delegationSubscriptionId == null + ? 43 + : this.delegationSubscriptionId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetDelegatedResourceAccessRequestAuditLogReportRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetDelegatedResourceAccessRequestAuditLogReportRequest.java new file mode 100644 index 00000000000..b43bc01ba23 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetDelegatedResourceAccessRequestAuditLogReportRequest.java @@ -0,0 +1,243 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use GetDelegatedResourceAccessRequestAuditLogReportRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetDelegatedResourceAccessRequestAuditLogReportRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Delegated Resource Access Request identifier + */ + private String delegatedResourceAccessRequestId; + + /** + * Unique Delegated Resource Access Request identifier + */ + public String getDelegatedResourceAccessRequestId() { + return delegatedResourceAccessRequestId; + } + /** + * Set to true to enable process tree computation in audit report + */ + private Boolean isProcessTreeEnabled; + + /** + * Set to true to enable process tree computation in audit report + */ + public Boolean getIsProcessTreeEnabled() { + return isProcessTreeEnabled; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetDelegatedResourceAccessRequestAuditLogReportRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Delegated Resource Access Request identifier + */ + private String delegatedResourceAccessRequestId = null; + + /** + * Unique Delegated Resource Access Request identifier + * @param delegatedResourceAccessRequestId the value to set + * @return this builder instance + */ + public Builder delegatedResourceAccessRequestId(String delegatedResourceAccessRequestId) { + this.delegatedResourceAccessRequestId = delegatedResourceAccessRequestId; + return this; + } + + /** + * Set to true to enable process tree computation in audit report + */ + private Boolean isProcessTreeEnabled = null; + + /** + * Set to true to enable process tree computation in audit report + * @param isProcessTreeEnabled the value to set + * @return this builder instance + */ + public Builder isProcessTreeEnabled(Boolean isProcessTreeEnabled) { + this.isProcessTreeEnabled = isProcessTreeEnabled; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDelegatedResourceAccessRequestAuditLogReportRequest o) { + delegatedResourceAccessRequestId(o.getDelegatedResourceAccessRequestId()); + isProcessTreeEnabled(o.getIsProcessTreeEnabled()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetDelegatedResourceAccessRequestAuditLogReportRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetDelegatedResourceAccessRequestAuditLogReportRequest + */ + public GetDelegatedResourceAccessRequestAuditLogReportRequest build() { + GetDelegatedResourceAccessRequestAuditLogReportRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetDelegatedResourceAccessRequestAuditLogReportRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetDelegatedResourceAccessRequestAuditLogReportRequest + */ + public GetDelegatedResourceAccessRequestAuditLogReportRequest + buildWithoutInvocationCallback() { + GetDelegatedResourceAccessRequestAuditLogReportRequest request = + new GetDelegatedResourceAccessRequestAuditLogReportRequest(); + request.delegatedResourceAccessRequestId = delegatedResourceAccessRequestId; + request.isProcessTreeEnabled = isProcessTreeEnabled; + request.opcRequestId = opcRequestId; + return request; + // new GetDelegatedResourceAccessRequestAuditLogReportRequest(delegatedResourceAccessRequestId, isProcessTreeEnabled, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .delegatedResourceAccessRequestId(delegatedResourceAccessRequestId) + .isProcessTreeEnabled(isProcessTreeEnabled) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",delegatedResourceAccessRequestId=") + .append(String.valueOf(this.delegatedResourceAccessRequestId)); + sb.append(",isProcessTreeEnabled=").append(String.valueOf(this.isProcessTreeEnabled)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDelegatedResourceAccessRequestAuditLogReportRequest)) { + return false; + } + + GetDelegatedResourceAccessRequestAuditLogReportRequest other = + (GetDelegatedResourceAccessRequestAuditLogReportRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.delegatedResourceAccessRequestId, + other.delegatedResourceAccessRequestId) + && java.util.Objects.equals(this.isProcessTreeEnabled, other.isProcessTreeEnabled) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.delegatedResourceAccessRequestId == null + ? 43 + : this.delegatedResourceAccessRequestId.hashCode()); + result = + (result * PRIME) + + (this.isProcessTreeEnabled == null + ? 43 + : this.isProcessTreeEnabled.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetDelegatedResourceAccessRequestRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetDelegatedResourceAccessRequestRequest.java new file mode 100644 index 00000000000..82f5d0accce --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetDelegatedResourceAccessRequestRequest.java @@ -0,0 +1,205 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use GetDelegatedResourceAccessRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetDelegatedResourceAccessRequestRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Delegated Resource Access Request identifier + */ + private String delegatedResourceAccessRequestId; + + /** + * Unique Delegated Resource Access Request identifier + */ + public String getDelegatedResourceAccessRequestId() { + return delegatedResourceAccessRequestId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetDelegatedResourceAccessRequestRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Delegated Resource Access Request identifier + */ + private String delegatedResourceAccessRequestId = null; + + /** + * Unique Delegated Resource Access Request identifier + * @param delegatedResourceAccessRequestId the value to set + * @return this builder instance + */ + public Builder delegatedResourceAccessRequestId(String delegatedResourceAccessRequestId) { + this.delegatedResourceAccessRequestId = delegatedResourceAccessRequestId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDelegatedResourceAccessRequestRequest o) { + delegatedResourceAccessRequestId(o.getDelegatedResourceAccessRequestId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetDelegatedResourceAccessRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetDelegatedResourceAccessRequestRequest + */ + public GetDelegatedResourceAccessRequestRequest build() { + GetDelegatedResourceAccessRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetDelegatedResourceAccessRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetDelegatedResourceAccessRequestRequest + */ + public GetDelegatedResourceAccessRequestRequest buildWithoutInvocationCallback() { + GetDelegatedResourceAccessRequestRequest request = + new GetDelegatedResourceAccessRequestRequest(); + request.delegatedResourceAccessRequestId = delegatedResourceAccessRequestId; + request.opcRequestId = opcRequestId; + return request; + // new GetDelegatedResourceAccessRequestRequest(delegatedResourceAccessRequestId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .delegatedResourceAccessRequestId(delegatedResourceAccessRequestId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",delegatedResourceAccessRequestId=") + .append(String.valueOf(this.delegatedResourceAccessRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDelegatedResourceAccessRequestRequest)) { + return false; + } + + GetDelegatedResourceAccessRequestRequest other = + (GetDelegatedResourceAccessRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.delegatedResourceAccessRequestId, + other.delegatedResourceAccessRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.delegatedResourceAccessRequestId == null + ? 43 + : this.delegatedResourceAccessRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetDelegationControlRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetDelegationControlRequest.java new file mode 100644 index 00000000000..09851894363 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetDelegationControlRequest.java @@ -0,0 +1,198 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use GetDelegationControlRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetDelegationControlRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique Delegation Control identifier + */ + private String delegationControlId; + + /** + * unique Delegation Control identifier + */ + public String getDelegationControlId() { + return delegationControlId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetDelegationControlRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique Delegation Control identifier + */ + private String delegationControlId = null; + + /** + * unique Delegation Control identifier + * @param delegationControlId the value to set + * @return this builder instance + */ + public Builder delegationControlId(String delegationControlId) { + this.delegationControlId = delegationControlId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDelegationControlRequest o) { + delegationControlId(o.getDelegationControlId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetDelegationControlRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetDelegationControlRequest + */ + public GetDelegationControlRequest build() { + GetDelegationControlRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetDelegationControlRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetDelegationControlRequest + */ + public GetDelegationControlRequest buildWithoutInvocationCallback() { + GetDelegationControlRequest request = new GetDelegationControlRequest(); + request.delegationControlId = delegationControlId; + request.opcRequestId = opcRequestId; + return request; + // new GetDelegationControlRequest(delegationControlId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().delegationControlId(delegationControlId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",delegationControlId=").append(String.valueOf(this.delegationControlId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDelegationControlRequest)) { + return false; + } + + GetDelegationControlRequest other = (GetDelegationControlRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.delegationControlId, other.delegationControlId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.delegationControlId == null + ? 43 + : this.delegationControlId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetDelegationSubscriptionRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetDelegationSubscriptionRequest.java new file mode 100644 index 00000000000..9c71c9ea097 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetDelegationSubscriptionRequest.java @@ -0,0 +1,202 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use GetDelegationSubscriptionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetDelegationSubscriptionRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique Delegation Subscription identifier + */ + private String delegationSubscriptionId; + + /** + * unique Delegation Subscription identifier + */ + public String getDelegationSubscriptionId() { + return delegationSubscriptionId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetDelegationSubscriptionRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique Delegation Subscription identifier + */ + private String delegationSubscriptionId = null; + + /** + * unique Delegation Subscription identifier + * @param delegationSubscriptionId the value to set + * @return this builder instance + */ + public Builder delegationSubscriptionId(String delegationSubscriptionId) { + this.delegationSubscriptionId = delegationSubscriptionId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDelegationSubscriptionRequest o) { + delegationSubscriptionId(o.getDelegationSubscriptionId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetDelegationSubscriptionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetDelegationSubscriptionRequest + */ + public GetDelegationSubscriptionRequest build() { + GetDelegationSubscriptionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetDelegationSubscriptionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetDelegationSubscriptionRequest + */ + public GetDelegationSubscriptionRequest buildWithoutInvocationCallback() { + GetDelegationSubscriptionRequest request = new GetDelegationSubscriptionRequest(); + request.delegationSubscriptionId = delegationSubscriptionId; + request.opcRequestId = opcRequestId; + return request; + // new GetDelegationSubscriptionRequest(delegationSubscriptionId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .delegationSubscriptionId(delegationSubscriptionId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",delegationSubscriptionId=") + .append(String.valueOf(this.delegationSubscriptionId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDelegationSubscriptionRequest)) { + return false; + } + + GetDelegationSubscriptionRequest other = (GetDelegationSubscriptionRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.delegationSubscriptionId, other.delegationSubscriptionId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.delegationSubscriptionId == null + ? 43 + : this.delegationSubscriptionId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetServiceProviderActionRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetServiceProviderActionRequest.java new file mode 100644 index 00000000000..eb10b371b3f --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetServiceProviderActionRequest.java @@ -0,0 +1,201 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use GetServiceProviderActionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetServiceProviderActionRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Oracle supplied identifier associated with the Service Provider Action. + */ + private String serviceProviderActionId; + + /** + * Unique Oracle supplied identifier associated with the Service Provider Action. + */ + public String getServiceProviderActionId() { + return serviceProviderActionId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetServiceProviderActionRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Oracle supplied identifier associated with the Service Provider Action. + */ + private String serviceProviderActionId = null; + + /** + * Unique Oracle supplied identifier associated with the Service Provider Action. + * @param serviceProviderActionId the value to set + * @return this builder instance + */ + public Builder serviceProviderActionId(String serviceProviderActionId) { + this.serviceProviderActionId = serviceProviderActionId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetServiceProviderActionRequest o) { + serviceProviderActionId(o.getServiceProviderActionId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetServiceProviderActionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetServiceProviderActionRequest + */ + public GetServiceProviderActionRequest build() { + GetServiceProviderActionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetServiceProviderActionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetServiceProviderActionRequest + */ + public GetServiceProviderActionRequest buildWithoutInvocationCallback() { + GetServiceProviderActionRequest request = new GetServiceProviderActionRequest(); + request.serviceProviderActionId = serviceProviderActionId; + request.opcRequestId = opcRequestId; + return request; + // new GetServiceProviderActionRequest(serviceProviderActionId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .serviceProviderActionId(serviceProviderActionId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",serviceProviderActionId=").append(String.valueOf(this.serviceProviderActionId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetServiceProviderActionRequest)) { + return false; + } + + GetServiceProviderActionRequest other = (GetServiceProviderActionRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.serviceProviderActionId, other.serviceProviderActionId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.serviceProviderActionId == null + ? 43 + : this.serviceProviderActionId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetServiceProviderRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetServiceProviderRequest.java new file mode 100644 index 00000000000..6cba14f982d --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetServiceProviderRequest.java @@ -0,0 +1,195 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use GetServiceProviderRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetServiceProviderRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique Service Provider identifier + */ + private String serviceProviderId; + + /** + * unique Service Provider identifier + */ + public String getServiceProviderId() { + return serviceProviderId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetServiceProviderRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique Service Provider identifier + */ + private String serviceProviderId = null; + + /** + * unique Service Provider identifier + * @param serviceProviderId the value to set + * @return this builder instance + */ + public Builder serviceProviderId(String serviceProviderId) { + this.serviceProviderId = serviceProviderId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetServiceProviderRequest o) { + serviceProviderId(o.getServiceProviderId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetServiceProviderRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetServiceProviderRequest + */ + public GetServiceProviderRequest build() { + GetServiceProviderRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetServiceProviderRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetServiceProviderRequest + */ + public GetServiceProviderRequest buildWithoutInvocationCallback() { + GetServiceProviderRequest request = new GetServiceProviderRequest(); + request.serviceProviderId = serviceProviderId; + request.opcRequestId = opcRequestId; + return request; + // new GetServiceProviderRequest(serviceProviderId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().serviceProviderId(serviceProviderId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",serviceProviderId=").append(String.valueOf(this.serviceProviderId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetServiceProviderRequest)) { + return false; + } + + GetServiceProviderRequest other = (GetServiceProviderRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.serviceProviderId, other.serviceProviderId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.serviceProviderId == null ? 43 : this.serviceProviderId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetWorkRequestRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetWorkRequestRequest.java new file mode 100644 index 00000000000..744efa1ca43 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/GetWorkRequestRequest.java @@ -0,0 +1,195 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use GetWorkRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetWorkRequestRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the asynchronous request. + */ + private String workRequestId; + + /** + * The ID of the asynchronous request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetWorkRequestRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the asynchronous request. + */ + private String workRequestId = null; + + /** + * The ID of the asynchronous request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetWorkRequestRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetWorkRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetWorkRequestRequest + */ + public GetWorkRequestRequest build() { + GetWorkRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetWorkRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetWorkRequestRequest + */ + public GetWorkRequestRequest buildWithoutInvocationCallback() { + GetWorkRequestRequest request = new GetWorkRequestRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + return request; + // new GetWorkRequestRequest(workRequestId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().workRequestId(workRequestId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetWorkRequestRequest)) { + return false; + } + + GetWorkRequestRequest other = (GetWorkRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListDelegatedResourceAccessRequestHistoriesRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListDelegatedResourceAccessRequestHistoriesRequest.java new file mode 100644 index 00000000000..28762aef965 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListDelegatedResourceAccessRequestHistoriesRequest.java @@ -0,0 +1,374 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use ListDelegatedResourceAccessRequestHistoriesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListDelegatedResourceAccessRequestHistoriesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Delegated Resource Access Request identifier + */ + private String delegatedResourceAccessRequestId; + + /** + * Unique Delegated Resource Access Request identifier + */ + public String getDelegatedResourceAccessRequestId() { + return delegatedResourceAccessRequestId; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder; + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + public com.oracle.bmc.delegateaccesscontrol.model.SortOrders getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. If no value is specified, timestamp is default. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. If no value is specified, timestamp is default. + * + **/ + public enum SortBy { + Timestamp("timestamp"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. If no value is specified, timestamp is default. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListDelegatedResourceAccessRequestHistoriesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Delegated Resource Access Request identifier + */ + private String delegatedResourceAccessRequestId = null; + + /** + * Unique Delegated Resource Access Request identifier + * @param delegatedResourceAccessRequestId the value to set + * @return this builder instance + */ + public Builder delegatedResourceAccessRequestId(String delegatedResourceAccessRequestId) { + this.delegatedResourceAccessRequestId = delegatedResourceAccessRequestId; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder = null; + + /** + * The sort order to use, either 'asc' or 'desc'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. If no value is specified, timestamp is default. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. If no value is specified, timestamp is default. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListDelegatedResourceAccessRequestHistoriesRequest o) { + delegatedResourceAccessRequestId(o.getDelegatedResourceAccessRequestId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListDelegatedResourceAccessRequestHistoriesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListDelegatedResourceAccessRequestHistoriesRequest + */ + public ListDelegatedResourceAccessRequestHistoriesRequest build() { + ListDelegatedResourceAccessRequestHistoriesRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListDelegatedResourceAccessRequestHistoriesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListDelegatedResourceAccessRequestHistoriesRequest + */ + public ListDelegatedResourceAccessRequestHistoriesRequest buildWithoutInvocationCallback() { + ListDelegatedResourceAccessRequestHistoriesRequest request = + new ListDelegatedResourceAccessRequestHistoriesRequest(); + request.delegatedResourceAccessRequestId = delegatedResourceAccessRequestId; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListDelegatedResourceAccessRequestHistoriesRequest(delegatedResourceAccessRequestId, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .delegatedResourceAccessRequestId(delegatedResourceAccessRequestId) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",delegatedResourceAccessRequestId=") + .append(String.valueOf(this.delegatedResourceAccessRequestId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListDelegatedResourceAccessRequestHistoriesRequest)) { + return false; + } + + ListDelegatedResourceAccessRequestHistoriesRequest other = + (ListDelegatedResourceAccessRequestHistoriesRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.delegatedResourceAccessRequestId, + other.delegatedResourceAccessRequestId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.delegatedResourceAccessRequestId == null + ? 43 + : this.delegatedResourceAccessRequestId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListDelegatedResourceAccessRequestsRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListDelegatedResourceAccessRequestsRequest.java new file mode 100644 index 00000000000..b69b9c18533 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListDelegatedResourceAccessRequestsRequest.java @@ -0,0 +1,605 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use ListDelegatedResourceAccessRequestsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListDelegatedResourceAccessRequestsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * unique Delegation Control identifier + */ + private String delegationControlId; + + /** + * unique Delegation Control identifier + */ + public String getDelegationControlId() { + return delegationControlId; + } + /** + * A filter to return only Delegated Resource Access Requests for the given resource identifier. + */ + private String resourceId; + + /** + * A filter to return only Delegated Resource Access Requests for the given resource identifier. + */ + public String getResourceId() { + return resourceId; + } + /** + * A filter to return only Delegated Resource Access Requests whose lifecycleState matches the given Delegated Resource Access Request lifecycleState. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequest.LifecycleState + lifecycleState; + + /** + * A filter to return only Delegated Resource Access Requests whose lifecycleState matches the given Delegated Resource Access Request lifecycleState. + */ + public com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequest.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only Delegated Resource Access Requests whose status matches the given Delegated Resource Access Request status. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequestStatus + requestStatus; + + /** + * A filter to return only Delegated Resource Access Requests whose status matches the given Delegated Resource Access Request status. + */ + public com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequestStatus + getRequestStatus() { + return requestStatus; + } + /** + * Query start time in UTC in ISO 8601 format(inclusive). + * Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + * timeIntervalStart and timeIntervalEnd parameters cannot be used together. + * + */ + private java.util.Date timeStart; + + /** + * Query start time in UTC in ISO 8601 format(inclusive). + * Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + * timeIntervalStart and timeIntervalEnd parameters cannot be used together. + * + */ + public java.util.Date getTimeStart() { + return timeStart; + } + /** + * Query end time in UTC in ISO 8601 format(inclusive). + * Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + * timeIntervalStart and timeIntervalEnd parameters cannot be used together. + * + */ + private java.util.Date timeEnd; + + /** + * Query end time in UTC in ISO 8601 format(inclusive). + * Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + * timeIntervalStart and timeIntervalEnd parameters cannot be used together. + * + */ + public java.util.Date getTimeEnd() { + return timeEnd; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder; + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + public com.oracle.bmc.delegateaccesscontrol.model.SortOrders getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, default is timeCreated. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, default is timeCreated. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, default is timeCreated. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListDelegatedResourceAccessRequestsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * unique Delegation Control identifier + */ + private String delegationControlId = null; + + /** + * unique Delegation Control identifier + * @param delegationControlId the value to set + * @return this builder instance + */ + public Builder delegationControlId(String delegationControlId) { + this.delegationControlId = delegationControlId; + return this; + } + + /** + * A filter to return only Delegated Resource Access Requests for the given resource identifier. + */ + private String resourceId = null; + + /** + * A filter to return only Delegated Resource Access Requests for the given resource identifier. + * @param resourceId the value to set + * @return this builder instance + */ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * A filter to return only Delegated Resource Access Requests whose lifecycleState matches the given Delegated Resource Access Request lifecycleState. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequest + .LifecycleState + lifecycleState = null; + + /** + * A filter to return only Delegated Resource Access Requests whose lifecycleState matches the given Delegated Resource Access Request lifecycleState. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequest + .LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only Delegated Resource Access Requests whose status matches the given Delegated Resource Access Request status. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequestStatus + requestStatus = null; + + /** + * A filter to return only Delegated Resource Access Requests whose status matches the given Delegated Resource Access Request status. + * @param requestStatus the value to set + * @return this builder instance + */ + public Builder requestStatus( + com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequestStatus + requestStatus) { + this.requestStatus = requestStatus; + return this; + } + + /** + * Query start time in UTC in ISO 8601 format(inclusive). + * Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + * timeIntervalStart and timeIntervalEnd parameters cannot be used together. + * + */ + private java.util.Date timeStart = null; + + /** + * Query start time in UTC in ISO 8601 format(inclusive). + * Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + * timeIntervalStart and timeIntervalEnd parameters cannot be used together. + * + * @param timeStart the value to set + * @return this builder instance + */ + public Builder timeStart(java.util.Date timeStart) { + this.timeStart = timeStart; + return this; + } + + /** + * Query end time in UTC in ISO 8601 format(inclusive). + * Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + * timeIntervalStart and timeIntervalEnd parameters cannot be used together. + * + */ + private java.util.Date timeEnd = null; + + /** + * Query end time in UTC in ISO 8601 format(inclusive). + * Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + * timeIntervalStart and timeIntervalEnd parameters cannot be used together. + * + * @param timeEnd the value to set + * @return this builder instance + */ + public Builder timeEnd(java.util.Date timeEnd) { + this.timeEnd = timeEnd; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder = null; + + /** + * The sort order to use, either 'asc' or 'desc'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, default is timeCreated. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, default is timeCreated. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListDelegatedResourceAccessRequestsRequest o) { + compartmentId(o.getCompartmentId()); + delegationControlId(o.getDelegationControlId()); + resourceId(o.getResourceId()); + lifecycleState(o.getLifecycleState()); + requestStatus(o.getRequestStatus()); + timeStart(o.getTimeStart()); + timeEnd(o.getTimeEnd()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListDelegatedResourceAccessRequestsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListDelegatedResourceAccessRequestsRequest + */ + public ListDelegatedResourceAccessRequestsRequest build() { + ListDelegatedResourceAccessRequestsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListDelegatedResourceAccessRequestsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListDelegatedResourceAccessRequestsRequest + */ + public ListDelegatedResourceAccessRequestsRequest buildWithoutInvocationCallback() { + ListDelegatedResourceAccessRequestsRequest request = + new ListDelegatedResourceAccessRequestsRequest(); + request.compartmentId = compartmentId; + request.delegationControlId = delegationControlId; + request.resourceId = resourceId; + request.lifecycleState = lifecycleState; + request.requestStatus = requestStatus; + request.timeStart = timeStart; + request.timeEnd = timeEnd; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListDelegatedResourceAccessRequestsRequest(compartmentId, delegationControlId, resourceId, lifecycleState, requestStatus, timeStart, timeEnd, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .delegationControlId(delegationControlId) + .resourceId(resourceId) + .lifecycleState(lifecycleState) + .requestStatus(requestStatus) + .timeStart(timeStart) + .timeEnd(timeEnd) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",delegationControlId=").append(String.valueOf(this.delegationControlId)); + sb.append(",resourceId=").append(String.valueOf(this.resourceId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",requestStatus=").append(String.valueOf(this.requestStatus)); + sb.append(",timeStart=").append(String.valueOf(this.timeStart)); + sb.append(",timeEnd=").append(String.valueOf(this.timeEnd)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListDelegatedResourceAccessRequestsRequest)) { + return false; + } + + ListDelegatedResourceAccessRequestsRequest other = + (ListDelegatedResourceAccessRequestsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.delegationControlId, other.delegationControlId) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.requestStatus, other.requestStatus) + && java.util.Objects.equals(this.timeStart, other.timeStart) + && java.util.Objects.equals(this.timeEnd, other.timeEnd) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.delegationControlId == null + ? 43 + : this.delegationControlId.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.requestStatus == null ? 43 : this.requestStatus.hashCode()); + result = (result * PRIME) + (this.timeStart == null ? 43 : this.timeStart.hashCode()); + result = (result * PRIME) + (this.timeEnd == null ? 43 : this.timeEnd.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListDelegationControlResourcesRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListDelegationControlResourcesRequest.java new file mode 100644 index 00000000000..647ebfb121d --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListDelegationControlResourcesRequest.java @@ -0,0 +1,265 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use ListDelegationControlResourcesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListDelegationControlResourcesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique Delegation Control identifier + */ + private String delegationControlId; + + /** + * unique Delegation Control identifier + */ + public String getDelegationControlId() { + return delegationControlId; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListDelegationControlResourcesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique Delegation Control identifier + */ + private String delegationControlId = null; + + /** + * unique Delegation Control identifier + * @param delegationControlId the value to set + * @return this builder instance + */ + public Builder delegationControlId(String delegationControlId) { + this.delegationControlId = delegationControlId; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListDelegationControlResourcesRequest o) { + delegationControlId(o.getDelegationControlId()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListDelegationControlResourcesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListDelegationControlResourcesRequest + */ + public ListDelegationControlResourcesRequest build() { + ListDelegationControlResourcesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListDelegationControlResourcesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListDelegationControlResourcesRequest + */ + public ListDelegationControlResourcesRequest buildWithoutInvocationCallback() { + ListDelegationControlResourcesRequest request = + new ListDelegationControlResourcesRequest(); + request.delegationControlId = delegationControlId; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + return request; + // new ListDelegationControlResourcesRequest(delegationControlId, limit, page, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .delegationControlId(delegationControlId) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",delegationControlId=").append(String.valueOf(this.delegationControlId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListDelegationControlResourcesRequest)) { + return false; + } + + ListDelegationControlResourcesRequest other = (ListDelegationControlResourcesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.delegationControlId, other.delegationControlId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.delegationControlId == null + ? 43 + : this.delegationControlId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListDelegationControlsRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListDelegationControlsRequest.java new file mode 100644 index 00000000000..2ef589a84f9 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListDelegationControlsRequest.java @@ -0,0 +1,506 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use ListDelegationControlsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListDelegationControlsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only Delegation Control resources whose lifecycleState matches the given Delegation Control lifecycle state. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationControl.LifecycleState + lifecycleState; + + /** + * A filter to return only Delegation Control resources whose lifecycleState matches the given Delegation Control lifecycle state. + */ + public com.oracle.bmc.delegateaccesscontrol.model.DelegationControl.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return Delegation Control resources that match the given display name. + */ + private String displayName; + + /** + * A filter to return Delegation Control resources that match the given display name. + */ + public String getDisplayName() { + return displayName; + } + /** + * A filter to return only resources that match the given resource type. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationControlResourceType resourceType; + + /** + * A filter to return only resources that match the given resource type. + */ + public com.oracle.bmc.delegateaccesscontrol.model.DelegationControlResourceType + getResourceType() { + return resourceType; + } + /** + * A filter to return Delegation Control resources that match the given resource ID. + */ + private String resourceId; + + /** + * A filter to return Delegation Control resources that match the given resource ID. + */ + public String getResourceId() { + return resourceId; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder; + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + public com.oracle.bmc.delegateaccesscontrol.model.SortOrders getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, default is timeCreated. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, default is timeCreated. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, default is timeCreated. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListDelegationControlsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only Delegation Control resources whose lifecycleState matches the given Delegation Control lifecycle state. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationControl.LifecycleState + lifecycleState = null; + + /** + * A filter to return only Delegation Control resources whose lifecycleState matches the given Delegation Control lifecycle state. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.delegateaccesscontrol.model.DelegationControl.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return Delegation Control resources that match the given display name. + */ + private String displayName = null; + + /** + * A filter to return Delegation Control resources that match the given display name. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A filter to return only resources that match the given resource type. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationControlResourceType + resourceType = null; + + /** + * A filter to return only resources that match the given resource type. + * @param resourceType the value to set + * @return this builder instance + */ + public Builder resourceType( + com.oracle.bmc.delegateaccesscontrol.model.DelegationControlResourceType + resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * A filter to return Delegation Control resources that match the given resource ID. + */ + private String resourceId = null; + + /** + * A filter to return Delegation Control resources that match the given resource ID. + * @param resourceId the value to set + * @return this builder instance + */ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder = null; + + /** + * The sort order to use, either 'asc' or 'desc'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, default is timeCreated. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, default is timeCreated. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListDelegationControlsRequest o) { + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + resourceType(o.getResourceType()); + resourceId(o.getResourceId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListDelegationControlsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListDelegationControlsRequest + */ + public ListDelegationControlsRequest build() { + ListDelegationControlsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListDelegationControlsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListDelegationControlsRequest + */ + public ListDelegationControlsRequest buildWithoutInvocationCallback() { + ListDelegationControlsRequest request = new ListDelegationControlsRequest(); + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.resourceType = resourceType; + request.resourceId = resourceId; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListDelegationControlsRequest(compartmentId, lifecycleState, displayName, resourceType, resourceId, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .lifecycleState(lifecycleState) + .displayName(displayName) + .resourceType(resourceType) + .resourceId(resourceId) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",resourceType=").append(String.valueOf(this.resourceType)); + sb.append(",resourceId=").append(String.valueOf(this.resourceId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListDelegationControlsRequest)) { + return false; + } + + ListDelegationControlsRequest other = (ListDelegationControlsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.resourceType, other.resourceType) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListDelegationSubscriptionsRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListDelegationSubscriptionsRequest.java new file mode 100644 index 00000000000..41bc2532ad1 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListDelegationSubscriptionsRequest.java @@ -0,0 +1,438 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use ListDelegationSubscriptionsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListDelegationSubscriptionsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only Delegation Subscription resources whose lifecycleState matches the given Delegation Subscription lifecycle state. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription.LifecycleState + lifecycleState; + + /** + * A filter to return only Delegation Subscription resources whose lifecycleState matches the given Delegation Subscription lifecycle state. + */ + public com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return Delegation Subscription resources that match the given display name. + */ + private String displayName; + + /** + * A filter to return Delegation Subscription resources that match the given display name. + */ + public String getDisplayName() { + return displayName; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder; + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + public com.oracle.bmc.delegateaccesscontrol.model.SortOrders getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, timeCreated is default. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, timeCreated is default. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, timeCreated is default. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListDelegationSubscriptionsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only Delegation Subscription resources whose lifecycleState matches the given Delegation Subscription lifecycle state. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription.LifecycleState + lifecycleState = null; + + /** + * A filter to return only Delegation Subscription resources whose lifecycleState matches the given Delegation Subscription lifecycle state. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return Delegation Subscription resources that match the given display name. + */ + private String displayName = null; + + /** + * A filter to return Delegation Subscription resources that match the given display name. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder = null; + + /** + * The sort order to use, either 'asc' or 'desc'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, timeCreated is default. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, timeCreated is default. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListDelegationSubscriptionsRequest o) { + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListDelegationSubscriptionsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListDelegationSubscriptionsRequest + */ + public ListDelegationSubscriptionsRequest build() { + ListDelegationSubscriptionsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListDelegationSubscriptionsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListDelegationSubscriptionsRequest + */ + public ListDelegationSubscriptionsRequest buildWithoutInvocationCallback() { + ListDelegationSubscriptionsRequest request = new ListDelegationSubscriptionsRequest(); + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListDelegationSubscriptionsRequest(compartmentId, lifecycleState, displayName, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .lifecycleState(lifecycleState) + .displayName(displayName) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListDelegationSubscriptionsRequest)) { + return false; + } + + ListDelegationSubscriptionsRequest other = (ListDelegationSubscriptionsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListServiceProviderActionsRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListServiceProviderActionsRequest.java new file mode 100644 index 00000000000..119b3ae99e6 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListServiceProviderActionsRequest.java @@ -0,0 +1,529 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use ListServiceProviderActionsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListServiceProviderActionsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only resources that match the entire name given. + */ + private String name; + + /** + * A filter to return only resources that match the entire name given. + */ + public String getName() { + return name; + } + /** + * A filter to return only resources that match the given resource type. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationControlResourceType resourceType; + + /** + * A filter to return only resources that match the given resource type. + */ + public com.oracle.bmc.delegateaccesscontrol.model.DelegationControlResourceType + getResourceType() { + return resourceType; + } + /** + * A filter to return only resources that match the given Service Provider service type. + */ + private java.util.List + serviceProviderServiceType; + + /** + * A filter to return only resources that match the given Service Provider service type. + */ + public java.util.List + getServiceProviderServiceType() { + return serviceProviderServiceType; + } + /** + * A filter to return only resources whose lifecycleState matches the given Service Provider Action lifecycleState. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderAction.LifecycleState + lifecycleState; + + /** + * A filter to return only resources whose lifecycleState matches the given Service Provider Action lifecycleState. + */ + public com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderAction.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder; + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + public com.oracle.bmc.delegateaccesscontrol.model.SortOrders getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. If no value is specified, default is timeCreated. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. If no value is specified, default is timeCreated. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + Name("name"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. If no value is specified, default is timeCreated. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListServiceProviderActionsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only resources that match the entire name given. + */ + private String name = null; + + /** + * A filter to return only resources that match the entire name given. + * @param name the value to set + * @return this builder instance + */ + public Builder name(String name) { + this.name = name; + return this; + } + + /** + * A filter to return only resources that match the given resource type. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationControlResourceType + resourceType = null; + + /** + * A filter to return only resources that match the given resource type. + * @param resourceType the value to set + * @return this builder instance + */ + public Builder resourceType( + com.oracle.bmc.delegateaccesscontrol.model.DelegationControlResourceType + resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * A filter to return only resources that match the given Service Provider service type. + */ + private java.util.List< + com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderServiceType> + serviceProviderServiceType = null; + + /** + * A filter to return only resources that match the given Service Provider service type. + * @param serviceProviderServiceType the value to set + * @return this builder instance + */ + public Builder serviceProviderServiceType( + java.util.List< + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderServiceType> + serviceProviderServiceType) { + this.serviceProviderServiceType = serviceProviderServiceType; + return this; + } + + /** + * Singular setter. A filter to return only resources that match the given Service Provider service type. + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder serviceProviderServiceType(ServiceProviderServiceType singularValue) { + return this.serviceProviderServiceType(java.util.Arrays.asList(singularValue)); + } + + /** + * A filter to return only resources whose lifecycleState matches the given Service Provider Action lifecycleState. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderAction.LifecycleState + lifecycleState = null; + + /** + * A filter to return only resources whose lifecycleState matches the given Service Provider Action lifecycleState. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderAction.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder = null; + + /** + * The sort order to use, either 'asc' or 'desc'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. If no value is specified, default is timeCreated. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. If no value is specified, default is timeCreated. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListServiceProviderActionsRequest o) { + compartmentId(o.getCompartmentId()); + name(o.getName()); + resourceType(o.getResourceType()); + serviceProviderServiceType(o.getServiceProviderServiceType()); + lifecycleState(o.getLifecycleState()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListServiceProviderActionsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListServiceProviderActionsRequest + */ + public ListServiceProviderActionsRequest build() { + ListServiceProviderActionsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListServiceProviderActionsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListServiceProviderActionsRequest + */ + public ListServiceProviderActionsRequest buildWithoutInvocationCallback() { + ListServiceProviderActionsRequest request = new ListServiceProviderActionsRequest(); + request.compartmentId = compartmentId; + request.name = name; + request.resourceType = resourceType; + request.serviceProviderServiceType = serviceProviderServiceType; + request.lifecycleState = lifecycleState; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListServiceProviderActionsRequest(compartmentId, name, resourceType, serviceProviderServiceType, lifecycleState, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .name(name) + .resourceType(resourceType) + .serviceProviderServiceType(serviceProviderServiceType) + .lifecycleState(lifecycleState) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",name=").append(String.valueOf(this.name)); + sb.append(",resourceType=").append(String.valueOf(this.resourceType)); + sb.append(",serviceProviderServiceType=") + .append(String.valueOf(this.serviceProviderServiceType)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListServiceProviderActionsRequest)) { + return false; + } + + ListServiceProviderActionsRequest other = (ListServiceProviderActionsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.resourceType, other.resourceType) + && java.util.Objects.equals( + this.serviceProviderServiceType, other.serviceProviderServiceType) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); + result = + (result * PRIME) + + (this.serviceProviderServiceType == null + ? 43 + : this.serviceProviderServiceType.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListServiceProviderInteractionsRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListServiceProviderInteractionsRequest.java new file mode 100644 index 00000000000..4b2432afa00 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListServiceProviderInteractionsRequest.java @@ -0,0 +1,268 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use ListServiceProviderInteractionsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListServiceProviderInteractionsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Delegated Resource Access Request identifier + */ + private String delegatedResourceAccessRequestId; + + /** + * Unique Delegated Resource Access Request identifier + */ + public String getDelegatedResourceAccessRequestId() { + return delegatedResourceAccessRequestId; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListServiceProviderInteractionsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Delegated Resource Access Request identifier + */ + private String delegatedResourceAccessRequestId = null; + + /** + * Unique Delegated Resource Access Request identifier + * @param delegatedResourceAccessRequestId the value to set + * @return this builder instance + */ + public Builder delegatedResourceAccessRequestId(String delegatedResourceAccessRequestId) { + this.delegatedResourceAccessRequestId = delegatedResourceAccessRequestId; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListServiceProviderInteractionsRequest o) { + delegatedResourceAccessRequestId(o.getDelegatedResourceAccessRequestId()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListServiceProviderInteractionsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListServiceProviderInteractionsRequest + */ + public ListServiceProviderInteractionsRequest build() { + ListServiceProviderInteractionsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListServiceProviderInteractionsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListServiceProviderInteractionsRequest + */ + public ListServiceProviderInteractionsRequest buildWithoutInvocationCallback() { + ListServiceProviderInteractionsRequest request = + new ListServiceProviderInteractionsRequest(); + request.delegatedResourceAccessRequestId = delegatedResourceAccessRequestId; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + return request; + // new ListServiceProviderInteractionsRequest(delegatedResourceAccessRequestId, limit, page, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .delegatedResourceAccessRequestId(delegatedResourceAccessRequestId) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",delegatedResourceAccessRequestId=") + .append(String.valueOf(this.delegatedResourceAccessRequestId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListServiceProviderInteractionsRequest)) { + return false; + } + + ListServiceProviderInteractionsRequest other = (ListServiceProviderInteractionsRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.delegatedResourceAccessRequestId, + other.delegatedResourceAccessRequestId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.delegatedResourceAccessRequestId == null + ? 43 + : this.delegatedResourceAccessRequestId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListServiceProvidersRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListServiceProvidersRequest.java new file mode 100644 index 00000000000..92c9770f42f --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListServiceProvidersRequest.java @@ -0,0 +1,520 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use ListServiceProvidersRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListServiceProvidersRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only Service Provider resources whose lifecycleState matches the given Service Provider lifecycle state. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ServiceProvider.LifecycleState + lifecycleState; + + /** + * A filter to return only Service Provider resources whose lifecycleState matches the given Service Provider lifecycle state. + */ + public com.oracle.bmc.delegateaccesscontrol.model.ServiceProvider.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return Service Provider resources that match the given name. + */ + private String name; + + /** + * A filter to return Service Provider resources that match the given name. + */ + public String getName() { + return name; + } + /** + * A filter to return only Service Provider resources whose supported resource type matches the given resource type. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationControlResourceType + supportedResourceType; + + /** + * A filter to return only Service Provider resources whose supported resource type matches the given resource type. + */ + public com.oracle.bmc.delegateaccesscontrol.model.DelegationControlResourceType + getSupportedResourceType() { + return supportedResourceType; + } + /** + * A filter to return only Service Provider resources whose provider type matches the given provider type. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ServiceProvider.ServiceProviderType + serviceProviderType; + + /** + * A filter to return only Service Provider resources whose provider type matches the given provider type. + */ + public com.oracle.bmc.delegateaccesscontrol.model.ServiceProvider.ServiceProviderType + getServiceProviderType() { + return serviceProviderType; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder; + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + public com.oracle.bmc.delegateaccesscontrol.model.SortOrders getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. If no value is specified, timeCreated is default. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. If no value is specified, timeCreated is default. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. If no value is specified, timeCreated is default. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListServiceProvidersRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only Service Provider resources whose lifecycleState matches the given Service Provider lifecycle state. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ServiceProvider.LifecycleState + lifecycleState = null; + + /** + * A filter to return only Service Provider resources whose lifecycleState matches the given Service Provider lifecycle state. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.delegateaccesscontrol.model.ServiceProvider.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return Service Provider resources that match the given name. + */ + private String name = null; + + /** + * A filter to return Service Provider resources that match the given name. + * @param name the value to set + * @return this builder instance + */ + public Builder name(String name) { + this.name = name; + return this; + } + + /** + * A filter to return only Service Provider resources whose supported resource type matches the given resource type. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationControlResourceType + supportedResourceType = null; + + /** + * A filter to return only Service Provider resources whose supported resource type matches the given resource type. + * @param supportedResourceType the value to set + * @return this builder instance + */ + public Builder supportedResourceType( + com.oracle.bmc.delegateaccesscontrol.model.DelegationControlResourceType + supportedResourceType) { + this.supportedResourceType = supportedResourceType; + return this; + } + + /** + * A filter to return only Service Provider resources whose provider type matches the given provider type. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ServiceProvider.ServiceProviderType + serviceProviderType = null; + + /** + * A filter to return only Service Provider resources whose provider type matches the given provider type. + * @param serviceProviderType the value to set + * @return this builder instance + */ + public Builder serviceProviderType( + com.oracle.bmc.delegateaccesscontrol.model.ServiceProvider.ServiceProviderType + serviceProviderType) { + this.serviceProviderType = serviceProviderType; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder = null; + + /** + * The sort order to use, either 'asc' or 'desc'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. If no value is specified, timeCreated is default. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. If no value is specified, timeCreated is default. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListServiceProvidersRequest o) { + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + name(o.getName()); + supportedResourceType(o.getSupportedResourceType()); + serviceProviderType(o.getServiceProviderType()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListServiceProvidersRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListServiceProvidersRequest + */ + public ListServiceProvidersRequest build() { + ListServiceProvidersRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListServiceProvidersRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListServiceProvidersRequest + */ + public ListServiceProvidersRequest buildWithoutInvocationCallback() { + ListServiceProvidersRequest request = new ListServiceProvidersRequest(); + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.name = name; + request.supportedResourceType = supportedResourceType; + request.serviceProviderType = serviceProviderType; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListServiceProvidersRequest(compartmentId, lifecycleState, name, supportedResourceType, serviceProviderType, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .lifecycleState(lifecycleState) + .name(name) + .supportedResourceType(supportedResourceType) + .serviceProviderType(serviceProviderType) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",name=").append(String.valueOf(this.name)); + sb.append(",supportedResourceType=").append(String.valueOf(this.supportedResourceType)); + sb.append(",serviceProviderType=").append(String.valueOf(this.serviceProviderType)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListServiceProvidersRequest)) { + return false; + } + + ListServiceProvidersRequest other = (ListServiceProvidersRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.supportedResourceType, other.supportedResourceType) + && java.util.Objects.equals(this.serviceProviderType, other.serviceProviderType) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = + (result * PRIME) + + (this.supportedResourceType == null + ? 43 + : this.supportedResourceType.hashCode()); + result = + (result * PRIME) + + (this.serviceProviderType == null + ? 43 + : this.serviceProviderType.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListWorkRequestErrorsRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListWorkRequestErrorsRequest.java new file mode 100644 index 00000000000..f0ed248d304 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListWorkRequestErrorsRequest.java @@ -0,0 +1,366 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use ListWorkRequestErrorsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListWorkRequestErrorsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the asynchronous request. + */ + private String workRequestId; + + /** + * The ID of the asynchronous request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + **/ + public enum SortBy { + Timestamp("timestamp"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder; + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + public com.oracle.bmc.delegateaccesscontrol.model.SortOrders getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListWorkRequestErrorsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the asynchronous request. + */ + private String workRequestId = null; + + /** + * The ID of the asynchronous request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder = null; + + /** + * The sort order to use, either 'asc' or 'desc'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestErrorsRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListWorkRequestErrorsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListWorkRequestErrorsRequest + */ + public ListWorkRequestErrorsRequest build() { + ListWorkRequestErrorsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListWorkRequestErrorsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListWorkRequestErrorsRequest + */ + public ListWorkRequestErrorsRequest buildWithoutInvocationCallback() { + ListWorkRequestErrorsRequest request = new ListWorkRequestErrorsRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListWorkRequestErrorsRequest(workRequestId, opcRequestId, page, limit, sortBy, sortOrder); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .workRequestId(workRequestId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortBy(sortBy) + .sortOrder(sortOrder); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListWorkRequestErrorsRequest)) { + return false; + } + + ListWorkRequestErrorsRequest other = (ListWorkRequestErrorsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListWorkRequestLogsRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListWorkRequestLogsRequest.java new file mode 100644 index 00000000000..cd623e01ee1 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListWorkRequestLogsRequest.java @@ -0,0 +1,365 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use ListWorkRequestLogsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListWorkRequestLogsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the asynchronous request. + */ + private String workRequestId; + + /** + * The ID of the asynchronous request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + **/ + public enum SortBy { + Timestamp("timestamp"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder; + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + public com.oracle.bmc.delegateaccesscontrol.model.SortOrders getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListWorkRequestLogsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the asynchronous request. + */ + private String workRequestId = null; + + /** + * The ID of the asynchronous request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder = null; + + /** + * The sort order to use, either 'asc' or 'desc'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestLogsRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListWorkRequestLogsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListWorkRequestLogsRequest + */ + public ListWorkRequestLogsRequest build() { + ListWorkRequestLogsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListWorkRequestLogsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListWorkRequestLogsRequest + */ + public ListWorkRequestLogsRequest buildWithoutInvocationCallback() { + ListWorkRequestLogsRequest request = new ListWorkRequestLogsRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListWorkRequestLogsRequest(workRequestId, opcRequestId, page, limit, sortBy, sortOrder); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .workRequestId(workRequestId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortBy(sortBy) + .sortOrder(sortOrder); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListWorkRequestLogsRequest)) { + return false; + } + + ListWorkRequestLogsRequest other = (ListWorkRequestLogsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListWorkRequestsRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListWorkRequestsRequest.java new file mode 100644 index 00000000000..314b5192a90 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ListWorkRequestsRequest.java @@ -0,0 +1,463 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use ListWorkRequestsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListWorkRequestsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The ID of the asynchronous work request. + */ + private String workRequestId; + + /** + * The ID of the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * A filter to return only work requests with the given OperationStatus. + */ + private com.oracle.bmc.delegateaccesscontrol.model.OperationStatus status; + + /** + * A filter to return only work requests with the given OperationStatus. + */ + public com.oracle.bmc.delegateaccesscontrol.model.OperationStatus getStatus() { + return status; + } + /** + * The ID of the resource affected by the work request. + */ + private String resourceId; + + /** + * The ID of the resource affected by the work request. + */ + public String getResourceId() { + return resourceId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder; + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + public com.oracle.bmc.delegateaccesscontrol.model.SortOrders getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + * + **/ + public enum SortBy { + TimeAccepted("timeAccepted"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListWorkRequestsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The ID of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The ID of the asynchronous work request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * A filter to return only work requests with the given OperationStatus. + */ + private com.oracle.bmc.delegateaccesscontrol.model.OperationStatus status = null; + + /** + * A filter to return only work requests with the given OperationStatus. + * @param status the value to set + * @return this builder instance + */ + public Builder status(com.oracle.bmc.delegateaccesscontrol.model.OperationStatus status) { + this.status = status; + return this; + } + + /** + * The ID of the resource affected by the work request. + */ + private String resourceId = null; + + /** + * The ID of the resource affected by the work request. + * @param resourceId the value to set + * @return this builder instance + */ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The sort order to use, either 'asc' or 'desc'. + */ + private com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder = null; + + /** + * The sort order to use, either 'asc' or 'desc'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.delegateaccesscontrol.model.SortOrders sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestsRequest o) { + compartmentId(o.getCompartmentId()); + workRequestId(o.getWorkRequestId()); + status(o.getStatus()); + resourceId(o.getResourceId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListWorkRequestsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListWorkRequestsRequest + */ + public ListWorkRequestsRequest build() { + ListWorkRequestsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListWorkRequestsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListWorkRequestsRequest + */ + public ListWorkRequestsRequest buildWithoutInvocationCallback() { + ListWorkRequestsRequest request = new ListWorkRequestsRequest(); + request.compartmentId = compartmentId; + request.workRequestId = workRequestId; + request.status = status; + request.resourceId = resourceId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + return request; + // new ListWorkRequestsRequest(compartmentId, workRequestId, status, resourceId, opcRequestId, page, limit, sortOrder, sortBy); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .workRequestId(workRequestId) + .status(status) + .resourceId(resourceId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortOrder(sortOrder) + .sortBy(sortBy); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",status=").append(String.valueOf(this.status)); + sb.append(",resourceId=").append(String.valueOf(this.resourceId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListWorkRequestsRequest)) { + return false; + } + + ListWorkRequestsRequest other = (ListWorkRequestsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/RejectDelegatedResourceAccessRequestRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/RejectDelegatedResourceAccessRequestRequest.java new file mode 100644 index 00000000000..5351625af6c --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/RejectDelegatedResourceAccessRequestRequest.java @@ -0,0 +1,390 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use RejectDelegatedResourceAccessRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class RejectDelegatedResourceAccessRequestRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.delegateaccesscontrol.model + .RejectDelegatedResourceAccessRequestDetails> { + + /** + * Unique Delegated Resource Access Request identifier + */ + private String delegatedResourceAccessRequestId; + + /** + * Unique Delegated Resource Access Request identifier + */ + public String getDelegatedResourceAccessRequestId() { + return delegatedResourceAccessRequestId; + } + /** + * Details regarding the rejection of a Delegated Resource Access Request created by the support operator. + */ + private com.oracle.bmc.delegateaccesscontrol.model.RejectDelegatedResourceAccessRequestDetails + rejectDelegatedResourceAccessRequestDetails; + + /** + * Details regarding the rejection of a Delegated Resource Access Request created by the support operator. + */ + public com.oracle.bmc.delegateaccesscontrol.model.RejectDelegatedResourceAccessRequestDetails + getRejectDelegatedResourceAccessRequestDetails() { + return rejectDelegatedResourceAccessRequestDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.delegateaccesscontrol.model.RejectDelegatedResourceAccessRequestDetails + getBody$() { + return rejectDelegatedResourceAccessRequestDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RejectDelegatedResourceAccessRequestRequest, + com.oracle.bmc.delegateaccesscontrol.model + .RejectDelegatedResourceAccessRequestDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Delegated Resource Access Request identifier + */ + private String delegatedResourceAccessRequestId = null; + + /** + * Unique Delegated Resource Access Request identifier + * @param delegatedResourceAccessRequestId the value to set + * @return this builder instance + */ + public Builder delegatedResourceAccessRequestId(String delegatedResourceAccessRequestId) { + this.delegatedResourceAccessRequestId = delegatedResourceAccessRequestId; + return this; + } + + /** + * Details regarding the rejection of a Delegated Resource Access Request created by the support operator. + */ + private com.oracle.bmc.delegateaccesscontrol.model + .RejectDelegatedResourceAccessRequestDetails + rejectDelegatedResourceAccessRequestDetails = null; + + /** + * Details regarding the rejection of a Delegated Resource Access Request created by the support operator. + * @param rejectDelegatedResourceAccessRequestDetails the value to set + * @return this builder instance + */ + public Builder rejectDelegatedResourceAccessRequestDetails( + com.oracle.bmc.delegateaccesscontrol.model + .RejectDelegatedResourceAccessRequestDetails + rejectDelegatedResourceAccessRequestDetails) { + this.rejectDelegatedResourceAccessRequestDetails = + rejectDelegatedResourceAccessRequestDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RejectDelegatedResourceAccessRequestRequest o) { + delegatedResourceAccessRequestId(o.getDelegatedResourceAccessRequestId()); + rejectDelegatedResourceAccessRequestDetails( + o.getRejectDelegatedResourceAccessRequestDetails()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RejectDelegatedResourceAccessRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RejectDelegatedResourceAccessRequestRequest + */ + public RejectDelegatedResourceAccessRequestRequest build() { + RejectDelegatedResourceAccessRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.delegateaccesscontrol.model + .RejectDelegatedResourceAccessRequestDetails + body) { + rejectDelegatedResourceAccessRequestDetails(body); + return this; + } + + /** + * Build the instance of RejectDelegatedResourceAccessRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RejectDelegatedResourceAccessRequestRequest + */ + public RejectDelegatedResourceAccessRequestRequest buildWithoutInvocationCallback() { + RejectDelegatedResourceAccessRequestRequest request = + new RejectDelegatedResourceAccessRequestRequest(); + request.delegatedResourceAccessRequestId = delegatedResourceAccessRequestId; + request.rejectDelegatedResourceAccessRequestDetails = + rejectDelegatedResourceAccessRequestDetails; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new RejectDelegatedResourceAccessRequestRequest(delegatedResourceAccessRequestId, rejectDelegatedResourceAccessRequestDetails, opcRetryToken, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .delegatedResourceAccessRequestId(delegatedResourceAccessRequestId) + .rejectDelegatedResourceAccessRequestDetails( + rejectDelegatedResourceAccessRequestDetails) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",delegatedResourceAccessRequestId=") + .append(String.valueOf(this.delegatedResourceAccessRequestId)); + sb.append(",rejectDelegatedResourceAccessRequestDetails=") + .append(String.valueOf(this.rejectDelegatedResourceAccessRequestDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RejectDelegatedResourceAccessRequestRequest)) { + return false; + } + + RejectDelegatedResourceAccessRequestRequest other = + (RejectDelegatedResourceAccessRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.delegatedResourceAccessRequestId, + other.delegatedResourceAccessRequestId) + && java.util.Objects.equals( + this.rejectDelegatedResourceAccessRequestDetails, + other.rejectDelegatedResourceAccessRequestDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.delegatedResourceAccessRequestId == null + ? 43 + : this.delegatedResourceAccessRequestId.hashCode()); + result = + (result * PRIME) + + (this.rejectDelegatedResourceAccessRequestDetails == null + ? 43 + : this.rejectDelegatedResourceAccessRequestDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/RevokeDelegatedResourceAccessRequestRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/RevokeDelegatedResourceAccessRequestRequest.java new file mode 100644 index 00000000000..a5d6cceb6c6 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/RevokeDelegatedResourceAccessRequestRequest.java @@ -0,0 +1,390 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use RevokeDelegatedResourceAccessRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class RevokeDelegatedResourceAccessRequestRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.delegateaccesscontrol.model + .RevokeDelegatedResourceAccessRequestDetails> { + + /** + * Unique Delegated Resource Access Request identifier + */ + private String delegatedResourceAccessRequestId; + + /** + * Unique Delegated Resource Access Request identifier + */ + public String getDelegatedResourceAccessRequestId() { + return delegatedResourceAccessRequestId; + } + /** + * Details regarding the revocation of a Delegated Resource Access Request created by the support operator. + */ + private com.oracle.bmc.delegateaccesscontrol.model.RevokeDelegatedResourceAccessRequestDetails + revokeDelegatedResourceAccessRequestDetails; + + /** + * Details regarding the revocation of a Delegated Resource Access Request created by the support operator. + */ + public com.oracle.bmc.delegateaccesscontrol.model.RevokeDelegatedResourceAccessRequestDetails + getRevokeDelegatedResourceAccessRequestDetails() { + return revokeDelegatedResourceAccessRequestDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.delegateaccesscontrol.model.RevokeDelegatedResourceAccessRequestDetails + getBody$() { + return revokeDelegatedResourceAccessRequestDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RevokeDelegatedResourceAccessRequestRequest, + com.oracle.bmc.delegateaccesscontrol.model + .RevokeDelegatedResourceAccessRequestDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Delegated Resource Access Request identifier + */ + private String delegatedResourceAccessRequestId = null; + + /** + * Unique Delegated Resource Access Request identifier + * @param delegatedResourceAccessRequestId the value to set + * @return this builder instance + */ + public Builder delegatedResourceAccessRequestId(String delegatedResourceAccessRequestId) { + this.delegatedResourceAccessRequestId = delegatedResourceAccessRequestId; + return this; + } + + /** + * Details regarding the revocation of a Delegated Resource Access Request created by the support operator. + */ + private com.oracle.bmc.delegateaccesscontrol.model + .RevokeDelegatedResourceAccessRequestDetails + revokeDelegatedResourceAccessRequestDetails = null; + + /** + * Details regarding the revocation of a Delegated Resource Access Request created by the support operator. + * @param revokeDelegatedResourceAccessRequestDetails the value to set + * @return this builder instance + */ + public Builder revokeDelegatedResourceAccessRequestDetails( + com.oracle.bmc.delegateaccesscontrol.model + .RevokeDelegatedResourceAccessRequestDetails + revokeDelegatedResourceAccessRequestDetails) { + this.revokeDelegatedResourceAccessRequestDetails = + revokeDelegatedResourceAccessRequestDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RevokeDelegatedResourceAccessRequestRequest o) { + delegatedResourceAccessRequestId(o.getDelegatedResourceAccessRequestId()); + revokeDelegatedResourceAccessRequestDetails( + o.getRevokeDelegatedResourceAccessRequestDetails()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RevokeDelegatedResourceAccessRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RevokeDelegatedResourceAccessRequestRequest + */ + public RevokeDelegatedResourceAccessRequestRequest build() { + RevokeDelegatedResourceAccessRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.delegateaccesscontrol.model + .RevokeDelegatedResourceAccessRequestDetails + body) { + revokeDelegatedResourceAccessRequestDetails(body); + return this; + } + + /** + * Build the instance of RevokeDelegatedResourceAccessRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RevokeDelegatedResourceAccessRequestRequest + */ + public RevokeDelegatedResourceAccessRequestRequest buildWithoutInvocationCallback() { + RevokeDelegatedResourceAccessRequestRequest request = + new RevokeDelegatedResourceAccessRequestRequest(); + request.delegatedResourceAccessRequestId = delegatedResourceAccessRequestId; + request.revokeDelegatedResourceAccessRequestDetails = + revokeDelegatedResourceAccessRequestDetails; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new RevokeDelegatedResourceAccessRequestRequest(delegatedResourceAccessRequestId, revokeDelegatedResourceAccessRequestDetails, opcRetryToken, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .delegatedResourceAccessRequestId(delegatedResourceAccessRequestId) + .revokeDelegatedResourceAccessRequestDetails( + revokeDelegatedResourceAccessRequestDetails) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",delegatedResourceAccessRequestId=") + .append(String.valueOf(this.delegatedResourceAccessRequestId)); + sb.append(",revokeDelegatedResourceAccessRequestDetails=") + .append(String.valueOf(this.revokeDelegatedResourceAccessRequestDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RevokeDelegatedResourceAccessRequestRequest)) { + return false; + } + + RevokeDelegatedResourceAccessRequestRequest other = + (RevokeDelegatedResourceAccessRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.delegatedResourceAccessRequestId, + other.delegatedResourceAccessRequestId) + && java.util.Objects.equals( + this.revokeDelegatedResourceAccessRequestDetails, + other.revokeDelegatedResourceAccessRequestDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.delegatedResourceAccessRequestId == null + ? 43 + : this.delegatedResourceAccessRequestId.hashCode()); + result = + (result * PRIME) + + (this.revokeDelegatedResourceAccessRequestDetails == null + ? 43 + : this.revokeDelegatedResourceAccessRequestDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ServiceProviderInteractionRequestRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ServiceProviderInteractionRequestRequest.java new file mode 100644 index 00000000000..ff26d5ddffa --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/ServiceProviderInteractionRequestRequest.java @@ -0,0 +1,386 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use ServiceProviderInteractionRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ServiceProviderInteractionRequestRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderInteractionRequestDetails> { + + /** + * Unique Delegated Resource Access Request identifier + */ + private String delegatedResourceAccessRequestId; + + /** + * Unique Delegated Resource Access Request identifier + */ + public String getDelegatedResourceAccessRequestId() { + return delegatedResourceAccessRequestId; + } + /** + * Details containing Query for additional information provided by Customer. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderInteractionRequestDetails + serviceProviderInteractionRequestDetails; + + /** + * Details containing Query for additional information provided by Customer. + */ + public com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderInteractionRequestDetails + getServiceProviderInteractionRequestDetails() { + return serviceProviderInteractionRequestDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderInteractionRequestDetails + getBody$() { + return serviceProviderInteractionRequestDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ServiceProviderInteractionRequestRequest, + com.oracle.bmc.delegateaccesscontrol.model + .ServiceProviderInteractionRequestDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Delegated Resource Access Request identifier + */ + private String delegatedResourceAccessRequestId = null; + + /** + * Unique Delegated Resource Access Request identifier + * @param delegatedResourceAccessRequestId the value to set + * @return this builder instance + */ + public Builder delegatedResourceAccessRequestId(String delegatedResourceAccessRequestId) { + this.delegatedResourceAccessRequestId = delegatedResourceAccessRequestId; + return this; + } + + /** + * Details containing Query for additional information provided by Customer. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderInteractionRequestDetails + serviceProviderInteractionRequestDetails = null; + + /** + * Details containing Query for additional information provided by Customer. + * @param serviceProviderInteractionRequestDetails the value to set + * @return this builder instance + */ + public Builder serviceProviderInteractionRequestDetails( + com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderInteractionRequestDetails + serviceProviderInteractionRequestDetails) { + this.serviceProviderInteractionRequestDetails = + serviceProviderInteractionRequestDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ServiceProviderInteractionRequestRequest o) { + delegatedResourceAccessRequestId(o.getDelegatedResourceAccessRequestId()); + serviceProviderInteractionRequestDetails( + o.getServiceProviderInteractionRequestDetails()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ServiceProviderInteractionRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ServiceProviderInteractionRequestRequest + */ + public ServiceProviderInteractionRequestRequest build() { + ServiceProviderInteractionRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderInteractionRequestDetails + body) { + serviceProviderInteractionRequestDetails(body); + return this; + } + + /** + * Build the instance of ServiceProviderInteractionRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ServiceProviderInteractionRequestRequest + */ + public ServiceProviderInteractionRequestRequest buildWithoutInvocationCallback() { + ServiceProviderInteractionRequestRequest request = + new ServiceProviderInteractionRequestRequest(); + request.delegatedResourceAccessRequestId = delegatedResourceAccessRequestId; + request.serviceProviderInteractionRequestDetails = + serviceProviderInteractionRequestDetails; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new ServiceProviderInteractionRequestRequest(delegatedResourceAccessRequestId, serviceProviderInteractionRequestDetails, opcRetryToken, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .delegatedResourceAccessRequestId(delegatedResourceAccessRequestId) + .serviceProviderInteractionRequestDetails(serviceProviderInteractionRequestDetails) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",delegatedResourceAccessRequestId=") + .append(String.valueOf(this.delegatedResourceAccessRequestId)); + sb.append(",serviceProviderInteractionRequestDetails=") + .append(String.valueOf(this.serviceProviderInteractionRequestDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ServiceProviderInteractionRequestRequest)) { + return false; + } + + ServiceProviderInteractionRequestRequest other = + (ServiceProviderInteractionRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.delegatedResourceAccessRequestId, + other.delegatedResourceAccessRequestId) + && java.util.Objects.equals( + this.serviceProviderInteractionRequestDetails, + other.serviceProviderInteractionRequestDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.delegatedResourceAccessRequestId == null + ? 43 + : this.delegatedResourceAccessRequestId.hashCode()); + result = + (result * PRIME) + + (this.serviceProviderInteractionRequestDetails == null + ? 43 + : this.serviceProviderInteractionRequestDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/UpdateDelegationControlRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/UpdateDelegationControlRequest.java new file mode 100644 index 00000000000..c58cffe86cd --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/UpdateDelegationControlRequest.java @@ -0,0 +1,319 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use UpdateDelegationControlRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class UpdateDelegationControlRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.delegateaccesscontrol.model.UpdateDelegationControlDetails> { + + /** + * unique Delegation Control identifier + */ + private String delegationControlId; + + /** + * unique Delegation Control identifier + */ + public String getDelegationControlId() { + return delegationControlId; + } + /** + * Details for the new DelegationControl. + */ + private com.oracle.bmc.delegateaccesscontrol.model.UpdateDelegationControlDetails + updateDelegationControlDetails; + + /** + * Details for the new DelegationControl. + */ + public com.oracle.bmc.delegateaccesscontrol.model.UpdateDelegationControlDetails + getUpdateDelegationControlDetails() { + return updateDelegationControlDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.delegateaccesscontrol.model.UpdateDelegationControlDetails getBody$() { + return updateDelegationControlDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateDelegationControlRequest, + com.oracle.bmc.delegateaccesscontrol.model.UpdateDelegationControlDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique Delegation Control identifier + */ + private String delegationControlId = null; + + /** + * unique Delegation Control identifier + * @param delegationControlId the value to set + * @return this builder instance + */ + public Builder delegationControlId(String delegationControlId) { + this.delegationControlId = delegationControlId; + return this; + } + + /** + * Details for the new DelegationControl. + */ + private com.oracle.bmc.delegateaccesscontrol.model.UpdateDelegationControlDetails + updateDelegationControlDetails = null; + + /** + * Details for the new DelegationControl. + * @param updateDelegationControlDetails the value to set + * @return this builder instance + */ + public Builder updateDelegationControlDetails( + com.oracle.bmc.delegateaccesscontrol.model.UpdateDelegationControlDetails + updateDelegationControlDetails) { + this.updateDelegationControlDetails = updateDelegationControlDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateDelegationControlRequest o) { + delegationControlId(o.getDelegationControlId()); + updateDelegationControlDetails(o.getUpdateDelegationControlDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateDelegationControlRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateDelegationControlRequest + */ + public UpdateDelegationControlRequest build() { + UpdateDelegationControlRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.delegateaccesscontrol.model.UpdateDelegationControlDetails body) { + updateDelegationControlDetails(body); + return this; + } + + /** + * Build the instance of UpdateDelegationControlRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateDelegationControlRequest + */ + public UpdateDelegationControlRequest buildWithoutInvocationCallback() { + UpdateDelegationControlRequest request = new UpdateDelegationControlRequest(); + request.delegationControlId = delegationControlId; + request.updateDelegationControlDetails = updateDelegationControlDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateDelegationControlRequest(delegationControlId, updateDelegationControlDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .delegationControlId(delegationControlId) + .updateDelegationControlDetails(updateDelegationControlDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",delegationControlId=").append(String.valueOf(this.delegationControlId)); + sb.append(",updateDelegationControlDetails=") + .append(String.valueOf(this.updateDelegationControlDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateDelegationControlRequest)) { + return false; + } + + UpdateDelegationControlRequest other = (UpdateDelegationControlRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.delegationControlId, other.delegationControlId) + && java.util.Objects.equals( + this.updateDelegationControlDetails, other.updateDelegationControlDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.delegationControlId == null + ? 43 + : this.delegationControlId.hashCode()); + result = + (result * PRIME) + + (this.updateDelegationControlDetails == null + ? 43 + : this.updateDelegationControlDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/UpdateDelegationSubscriptionRequest.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/UpdateDelegationSubscriptionRequest.java new file mode 100644 index 00000000000..6023ac27b7d --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/requests/UpdateDelegationSubscriptionRequest.java @@ -0,0 +1,325 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.requests; + +import com.oracle.bmc.delegateaccesscontrol.model.*; +/** + * Example: Click here to see how to use UpdateDelegationSubscriptionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class UpdateDelegationSubscriptionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.delegateaccesscontrol.model.UpdateDelegationSubscriptionDetails> { + + /** + * unique Delegation Subscription identifier + */ + private String delegationSubscriptionId; + + /** + * unique Delegation Subscription identifier + */ + public String getDelegationSubscriptionId() { + return delegationSubscriptionId; + } + /** + * Details for the DelegationSubscription to be updated. + */ + private com.oracle.bmc.delegateaccesscontrol.model.UpdateDelegationSubscriptionDetails + updateDelegationSubscriptionDetails; + + /** + * Details for the DelegationSubscription to be updated. + */ + public com.oracle.bmc.delegateaccesscontrol.model.UpdateDelegationSubscriptionDetails + getUpdateDelegationSubscriptionDetails() { + return updateDelegationSubscriptionDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.delegateaccesscontrol.model.UpdateDelegationSubscriptionDetails + getBody$() { + return updateDelegationSubscriptionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateDelegationSubscriptionRequest, + com.oracle.bmc.delegateaccesscontrol.model + .UpdateDelegationSubscriptionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique Delegation Subscription identifier + */ + private String delegationSubscriptionId = null; + + /** + * unique Delegation Subscription identifier + * @param delegationSubscriptionId the value to set + * @return this builder instance + */ + public Builder delegationSubscriptionId(String delegationSubscriptionId) { + this.delegationSubscriptionId = delegationSubscriptionId; + return this; + } + + /** + * Details for the DelegationSubscription to be updated. + */ + private com.oracle.bmc.delegateaccesscontrol.model.UpdateDelegationSubscriptionDetails + updateDelegationSubscriptionDetails = null; + + /** + * Details for the DelegationSubscription to be updated. + * @param updateDelegationSubscriptionDetails the value to set + * @return this builder instance + */ + public Builder updateDelegationSubscriptionDetails( + com.oracle.bmc.delegateaccesscontrol.model.UpdateDelegationSubscriptionDetails + updateDelegationSubscriptionDetails) { + this.updateDelegationSubscriptionDetails = updateDelegationSubscriptionDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateDelegationSubscriptionRequest o) { + delegationSubscriptionId(o.getDelegationSubscriptionId()); + updateDelegationSubscriptionDetails(o.getUpdateDelegationSubscriptionDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateDelegationSubscriptionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateDelegationSubscriptionRequest + */ + public UpdateDelegationSubscriptionRequest build() { + UpdateDelegationSubscriptionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.delegateaccesscontrol.model.UpdateDelegationSubscriptionDetails + body) { + updateDelegationSubscriptionDetails(body); + return this; + } + + /** + * Build the instance of UpdateDelegationSubscriptionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateDelegationSubscriptionRequest + */ + public UpdateDelegationSubscriptionRequest buildWithoutInvocationCallback() { + UpdateDelegationSubscriptionRequest request = new UpdateDelegationSubscriptionRequest(); + request.delegationSubscriptionId = delegationSubscriptionId; + request.updateDelegationSubscriptionDetails = updateDelegationSubscriptionDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateDelegationSubscriptionRequest(delegationSubscriptionId, updateDelegationSubscriptionDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .delegationSubscriptionId(delegationSubscriptionId) + .updateDelegationSubscriptionDetails(updateDelegationSubscriptionDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",delegationSubscriptionId=") + .append(String.valueOf(this.delegationSubscriptionId)); + sb.append(",updateDelegationSubscriptionDetails=") + .append(String.valueOf(this.updateDelegationSubscriptionDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateDelegationSubscriptionRequest)) { + return false; + } + + UpdateDelegationSubscriptionRequest other = (UpdateDelegationSubscriptionRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.delegationSubscriptionId, other.delegationSubscriptionId) + && java.util.Objects.equals( + this.updateDelegationSubscriptionDetails, + other.updateDelegationSubscriptionDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.delegationSubscriptionId == null + ? 43 + : this.delegationSubscriptionId.hashCode()); + result = + (result * PRIME) + + (this.updateDelegationSubscriptionDetails == null + ? 43 + : this.updateDelegationSubscriptionDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ApproveDelegatedResourceAccessRequestResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ApproveDelegatedResourceAccessRequestResponse.java new file mode 100644 index 00000000000..ef3a8de4322 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ApproveDelegatedResourceAccessRequestResponse.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ApproveDelegatedResourceAccessRequestResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private ApproveDelegatedResourceAccessRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ApproveDelegatedResourceAccessRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ApproveDelegatedResourceAccessRequestResponse build() { + return new ApproveDelegatedResourceAccessRequestResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ApproveDelegatedResourceAccessRequestResponse)) { + return false; + } + + ApproveDelegatedResourceAccessRequestResponse other = + (ApproveDelegatedResourceAccessRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ChangeDelegationControlCompartmentResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ChangeDelegationControlCompartmentResponse.java new file mode 100644 index 00000000000..21b86459504 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ChangeDelegationControlCompartmentResponse.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ChangeDelegationControlCompartmentResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private ChangeDelegationControlCompartmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeDelegationControlCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeDelegationControlCompartmentResponse build() { + return new ChangeDelegationControlCompartmentResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeDelegationControlCompartmentResponse)) { + return false; + } + + ChangeDelegationControlCompartmentResponse other = + (ChangeDelegationControlCompartmentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ChangeDelegationSubscriptionCompartmentResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ChangeDelegationSubscriptionCompartmentResponse.java new file mode 100644 index 00000000000..a4c3290ac4f --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ChangeDelegationSubscriptionCompartmentResponse.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ChangeDelegationSubscriptionCompartmentResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private ChangeDelegationSubscriptionCompartmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeDelegationSubscriptionCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeDelegationSubscriptionCompartmentResponse build() { + return new ChangeDelegationSubscriptionCompartmentResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeDelegationSubscriptionCompartmentResponse)) { + return false; + } + + ChangeDelegationSubscriptionCompartmentResponse other = + (ChangeDelegationSubscriptionCompartmentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/CreateDelegationControlResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/CreateDelegationControlResponse.java new file mode 100644 index 00000000000..1b0fbceaae4 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/CreateDelegationControlResponse.java @@ -0,0 +1,337 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class CreateDelegationControlResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * URI of the resource + */ + private String location; + + /** + * URI of the resource + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * URI of the resource + */ + private String contentLocation; + + /** + * URI of the resource + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned DelegationControl instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationControl delegationControl; + + /** + * The returned DelegationControl instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model.DelegationControl getDelegationControl() { + return delegationControl; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId", + "location", + "contentLocation", + "etag", + "delegationControl" + }) + private CreateDelegationControlResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId, + String location, + String contentLocation, + String etag, + com.oracle.bmc.delegateaccesscontrol.model.DelegationControl delegationControl) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.location = location; + this.contentLocation = contentLocation; + this.etag = etag; + this.delegationControl = delegationControl; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * URI of the resource + */ + private String location; + + /** + * URI of the resource + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * URI of the resource + */ + private String contentLocation; + + /** + * URI of the resource + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned DelegationControl instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationControl delegationControl; + + /** + * The returned DelegationControl instance. + * @param delegationControl the value to set + * @return this builder + */ + public Builder delegationControl( + com.oracle.bmc.delegateaccesscontrol.model.DelegationControl delegationControl) { + this.delegationControl = delegationControl; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateDelegationControlResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + delegationControl(o.getDelegationControl()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateDelegationControlResponse build() { + return new CreateDelegationControlResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + opcRequestId, + location, + contentLocation, + etag, + delegationControl); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",delegationControl=").append(String.valueOf(delegationControl)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDelegationControlResponse)) { + return false; + } + + CreateDelegationControlResponse other = (CreateDelegationControlResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.delegationControl, other.delegationControl); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.delegationControl == null ? 43 : this.delegationControl.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/CreateDelegationSubscriptionResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/CreateDelegationSubscriptionResponse.java new file mode 100644 index 00000000000..2f4a6c2e44a --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/CreateDelegationSubscriptionResponse.java @@ -0,0 +1,345 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class CreateDelegationSubscriptionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * URI of the resource + */ + private String location; + + /** + * URI of the resource + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * URI of the resource + */ + private String contentLocation; + + /** + * URI of the resource + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned DelegationSubscription instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription + delegationSubscription; + + /** + * The returned DelegationSubscription instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription + getDelegationSubscription() { + return delegationSubscription; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId", + "location", + "contentLocation", + "etag", + "delegationSubscription" + }) + private CreateDelegationSubscriptionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId, + String location, + String contentLocation, + String etag, + com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription + delegationSubscription) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.location = location; + this.contentLocation = contentLocation; + this.etag = etag; + this.delegationSubscription = delegationSubscription; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * URI of the resource + */ + private String location; + + /** + * URI of the resource + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * URI of the resource + */ + private String contentLocation; + + /** + * URI of the resource + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned DelegationSubscription instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription + delegationSubscription; + + /** + * The returned DelegationSubscription instance. + * @param delegationSubscription the value to set + * @return this builder + */ + public Builder delegationSubscription( + com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription + delegationSubscription) { + this.delegationSubscription = delegationSubscription; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateDelegationSubscriptionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + delegationSubscription(o.getDelegationSubscription()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateDelegationSubscriptionResponse build() { + return new CreateDelegationSubscriptionResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + opcRequestId, + location, + contentLocation, + etag, + delegationSubscription); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",delegationSubscription=").append(String.valueOf(delegationSubscription)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDelegationSubscriptionResponse)) { + return false; + } + + CreateDelegationSubscriptionResponse other = (CreateDelegationSubscriptionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals( + this.delegationSubscription, other.delegationSubscription); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.delegationSubscription == null + ? 43 + : this.delegationSubscription.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/DeleteDelegationControlResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/DeleteDelegationControlResponse.java new file mode 100644 index 00000000000..e6f8a99cfcc --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/DeleteDelegationControlResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class DeleteDelegationControlResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private DeleteDelegationControlResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteDelegationControlResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteDelegationControlResponse build() { + return new DeleteDelegationControlResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteDelegationControlResponse)) { + return false; + } + + DeleteDelegationControlResponse other = (DeleteDelegationControlResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/DeleteDelegationSubscriptionResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/DeleteDelegationSubscriptionResponse.java new file mode 100644 index 00000000000..9d9f2989e50 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/DeleteDelegationSubscriptionResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class DeleteDelegationSubscriptionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteDelegationSubscriptionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteDelegationSubscriptionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteDelegationSubscriptionResponse build() { + return new DeleteDelegationSubscriptionResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteDelegationSubscriptionResponse)) { + return false; + } + + DeleteDelegationSubscriptionResponse other = (DeleteDelegationSubscriptionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetDelegatedResourceAccessRequestAuditLogReportResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetDelegatedResourceAccessRequestAuditLogReportResponse.java new file mode 100644 index 00000000000..fc6aaa0c323 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetDelegatedResourceAccessRequestAuditLogReportResponse.java @@ -0,0 +1,194 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetDelegatedResourceAccessRequestAuditLogReportResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned DelegatedResourceAccessRequestAuditLogReport instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequestAuditLogReport + delegatedResourceAccessRequestAuditLogReport; + + /** + * The returned DelegatedResourceAccessRequestAuditLogReport instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequestAuditLogReport + getDelegatedResourceAccessRequestAuditLogReport() { + return delegatedResourceAccessRequestAuditLogReport; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "delegatedResourceAccessRequestAuditLogReport" + }) + private GetDelegatedResourceAccessRequestAuditLogReportResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequestAuditLogReport + delegatedResourceAccessRequestAuditLogReport) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.delegatedResourceAccessRequestAuditLogReport = + delegatedResourceAccessRequestAuditLogReport; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned DelegatedResourceAccessRequestAuditLogReport instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestAuditLogReport + delegatedResourceAccessRequestAuditLogReport; + + /** + * The returned DelegatedResourceAccessRequestAuditLogReport instance. + * @param delegatedResourceAccessRequestAuditLogReport the value to set + * @return this builder + */ + public Builder delegatedResourceAccessRequestAuditLogReport( + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestAuditLogReport + delegatedResourceAccessRequestAuditLogReport) { + this.delegatedResourceAccessRequestAuditLogReport = + delegatedResourceAccessRequestAuditLogReport; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDelegatedResourceAccessRequestAuditLogReportResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + delegatedResourceAccessRequestAuditLogReport( + o.getDelegatedResourceAccessRequestAuditLogReport()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetDelegatedResourceAccessRequestAuditLogReportResponse build() { + return new GetDelegatedResourceAccessRequestAuditLogReportResponse( + __httpStatusCode__, + headers, + opcRequestId, + delegatedResourceAccessRequestAuditLogReport); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",delegatedResourceAccessRequestAuditLogReport=") + .append(String.valueOf(delegatedResourceAccessRequestAuditLogReport)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDelegatedResourceAccessRequestAuditLogReportResponse)) { + return false; + } + + GetDelegatedResourceAccessRequestAuditLogReportResponse other = + (GetDelegatedResourceAccessRequestAuditLogReportResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.delegatedResourceAccessRequestAuditLogReport, + other.delegatedResourceAccessRequestAuditLogReport); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.delegatedResourceAccessRequestAuditLogReport == null + ? 43 + : this.delegatedResourceAccessRequestAuditLogReport.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetDelegatedResourceAccessRequestResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetDelegatedResourceAccessRequestResponse.java new file mode 100644 index 00000000000..84c4ab04b46 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetDelegatedResourceAccessRequestResponse.java @@ -0,0 +1,228 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetDelegatedResourceAccessRequestResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned DelegatedResourceAccessRequest instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequest + delegatedResourceAccessRequest; + + /** + * The returned DelegatedResourceAccessRequest instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequest + getDelegatedResourceAccessRequest() { + return delegatedResourceAccessRequest; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "delegatedResourceAccessRequest" + }) + private GetDelegatedResourceAccessRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequest + delegatedResourceAccessRequest) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.delegatedResourceAccessRequest = delegatedResourceAccessRequest; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned DelegatedResourceAccessRequest instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequest + delegatedResourceAccessRequest; + + /** + * The returned DelegatedResourceAccessRequest instance. + * @param delegatedResourceAccessRequest the value to set + * @return this builder + */ + public Builder delegatedResourceAccessRequest( + com.oracle.bmc.delegateaccesscontrol.model.DelegatedResourceAccessRequest + delegatedResourceAccessRequest) { + this.delegatedResourceAccessRequest = delegatedResourceAccessRequest; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDelegatedResourceAccessRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + delegatedResourceAccessRequest(o.getDelegatedResourceAccessRequest()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetDelegatedResourceAccessRequestResponse build() { + return new GetDelegatedResourceAccessRequestResponse( + __httpStatusCode__, + headers, + etag, + opcRequestId, + delegatedResourceAccessRequest); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",delegatedResourceAccessRequest=") + .append(String.valueOf(delegatedResourceAccessRequest)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDelegatedResourceAccessRequestResponse)) { + return false; + } + + GetDelegatedResourceAccessRequestResponse other = + (GetDelegatedResourceAccessRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.delegatedResourceAccessRequest, other.delegatedResourceAccessRequest); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.delegatedResourceAccessRequest == null + ? 43 + : this.delegatedResourceAccessRequest.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetDelegationControlResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetDelegationControlResponse.java new file mode 100644 index 00000000000..8aea0cd5005 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetDelegationControlResponse.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetDelegationControlResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned DelegationControl instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationControl delegationControl; + + /** + * The returned DelegationControl instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model.DelegationControl getDelegationControl() { + return delegationControl; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "delegationControl" + }) + private GetDelegationControlResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.delegateaccesscontrol.model.DelegationControl delegationControl) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.delegationControl = delegationControl; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned DelegationControl instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationControl delegationControl; + + /** + * The returned DelegationControl instance. + * @param delegationControl the value to set + * @return this builder + */ + public Builder delegationControl( + com.oracle.bmc.delegateaccesscontrol.model.DelegationControl delegationControl) { + this.delegationControl = delegationControl; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDelegationControlResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + delegationControl(o.getDelegationControl()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetDelegationControlResponse build() { + return new GetDelegationControlResponse( + __httpStatusCode__, headers, etag, opcRequestId, delegationControl); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",delegationControl=").append(String.valueOf(delegationControl)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDelegationControlResponse)) { + return false; + } + + GetDelegationControlResponse other = (GetDelegationControlResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.delegationControl, other.delegationControl); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.delegationControl == null ? 43 : this.delegationControl.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetDelegationSubscriptionResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetDelegationSubscriptionResponse.java new file mode 100644 index 00000000000..d97b421d163 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetDelegationSubscriptionResponse.java @@ -0,0 +1,221 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetDelegationSubscriptionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned DelegationSubscription instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription + delegationSubscription; + + /** + * The returned DelegationSubscription instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription + getDelegationSubscription() { + return delegationSubscription; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "delegationSubscription" + }) + private GetDelegationSubscriptionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription + delegationSubscription) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.delegationSubscription = delegationSubscription; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned DelegationSubscription instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription + delegationSubscription; + + /** + * The returned DelegationSubscription instance. + * @param delegationSubscription the value to set + * @return this builder + */ + public Builder delegationSubscription( + com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription + delegationSubscription) { + this.delegationSubscription = delegationSubscription; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDelegationSubscriptionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + delegationSubscription(o.getDelegationSubscription()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetDelegationSubscriptionResponse build() { + return new GetDelegationSubscriptionResponse( + __httpStatusCode__, headers, etag, opcRequestId, delegationSubscription); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",delegationSubscription=").append(String.valueOf(delegationSubscription)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDelegationSubscriptionResponse)) { + return false; + } + + GetDelegationSubscriptionResponse other = (GetDelegationSubscriptionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.delegationSubscription, other.delegationSubscription); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.delegationSubscription == null + ? 43 + : this.delegationSubscription.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetServiceProviderActionResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetServiceProviderActionResponse.java new file mode 100644 index 00000000000..c4c4852587a --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetServiceProviderActionResponse.java @@ -0,0 +1,220 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetServiceProviderActionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ServiceProviderAction instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderAction serviceProviderAction; + + /** + * The returned ServiceProviderAction instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderAction + getServiceProviderAction() { + return serviceProviderAction; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "serviceProviderAction" + }) + private GetServiceProviderActionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderAction + serviceProviderAction) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.serviceProviderAction = serviceProviderAction; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ServiceProviderAction instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderAction + serviceProviderAction; + + /** + * The returned ServiceProviderAction instance. + * @param serviceProviderAction the value to set + * @return this builder + */ + public Builder serviceProviderAction( + com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderAction + serviceProviderAction) { + this.serviceProviderAction = serviceProviderAction; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetServiceProviderActionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + serviceProviderAction(o.getServiceProviderAction()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetServiceProviderActionResponse build() { + return new GetServiceProviderActionResponse( + __httpStatusCode__, headers, etag, opcRequestId, serviceProviderAction); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",serviceProviderAction=").append(String.valueOf(serviceProviderAction)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetServiceProviderActionResponse)) { + return false; + } + + GetServiceProviderActionResponse other = (GetServiceProviderActionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.serviceProviderAction, other.serviceProviderAction); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.serviceProviderAction == null + ? 43 + : this.serviceProviderAction.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetServiceProviderResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetServiceProviderResponse.java new file mode 100644 index 00000000000..b54d96cebad --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetServiceProviderResponse.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetServiceProviderResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ServiceProvider instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ServiceProvider serviceProvider; + + /** + * The returned ServiceProvider instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model.ServiceProvider getServiceProvider() { + return serviceProvider; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "serviceProvider" + }) + private GetServiceProviderResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.delegateaccesscontrol.model.ServiceProvider serviceProvider) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.serviceProvider = serviceProvider; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ServiceProvider instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ServiceProvider serviceProvider; + + /** + * The returned ServiceProvider instance. + * @param serviceProvider the value to set + * @return this builder + */ + public Builder serviceProvider( + com.oracle.bmc.delegateaccesscontrol.model.ServiceProvider serviceProvider) { + this.serviceProvider = serviceProvider; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetServiceProviderResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + serviceProvider(o.getServiceProvider()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetServiceProviderResponse build() { + return new GetServiceProviderResponse( + __httpStatusCode__, headers, etag, opcRequestId, serviceProvider); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",serviceProvider=").append(String.valueOf(serviceProvider)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetServiceProviderResponse)) { + return false; + } + + GetServiceProviderResponse other = (GetServiceProviderResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.serviceProvider, other.serviceProvider); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.serviceProvider == null ? 43 : this.serviceProvider.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetWorkRequestResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetWorkRequestResponse.java new file mode 100644 index 00000000000..c2d7e58c832 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/GetWorkRequestResponse.java @@ -0,0 +1,246 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class GetWorkRequestResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @return the value + */ + public Integer getRetryAfter() { + return retryAfter; + } + + /** + * The returned WorkRequest instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.WorkRequest workRequest; + + /** + * The returned WorkRequest instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model.WorkRequest getWorkRequest() { + return workRequest; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "retryAfter", + "workRequest" + }) + private GetWorkRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + Integer retryAfter, + com.oracle.bmc.delegateaccesscontrol.model.WorkRequest workRequest) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + this.workRequest = workRequest; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @param retryAfter the value to set + * @return this builder + */ + public Builder retryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * The returned WorkRequest instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.WorkRequest workRequest; + + /** + * The returned WorkRequest instance. + * @param workRequest the value to set + * @return this builder + */ + public Builder workRequest( + com.oracle.bmc.delegateaccesscontrol.model.WorkRequest workRequest) { + this.workRequest = workRequest; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetWorkRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + workRequest(o.getWorkRequest()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetWorkRequestResponse build() { + return new GetWorkRequestResponse( + __httpStatusCode__, headers, etag, opcRequestId, retryAfter, workRequest); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",retryAfter=").append(String.valueOf(retryAfter)); + sb.append(",workRequest=").append(String.valueOf(workRequest)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetWorkRequestResponse)) { + return false; + } + + GetWorkRequestResponse other = (GetWorkRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.retryAfter, other.retryAfter) + && java.util.Objects.equals(this.workRequest, other.workRequest); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.retryAfter == null ? 43 : this.retryAfter.hashCode()); + result = (result * PRIME) + (this.workRequest == null ? 43 : this.workRequest.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListDelegatedResourceAccessRequestHistoriesResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListDelegatedResourceAccessRequestHistoriesResponse.java new file mode 100644 index 00000000000..24200ab6c27 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListDelegatedResourceAccessRequestHistoriesResponse.java @@ -0,0 +1,241 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListDelegatedResourceAccessRequestHistoriesResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned DelegatedResourceAccessRequestHistoryCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestHistoryCollection + delegatedResourceAccessRequestHistoryCollection; + + /** + * The returned DelegatedResourceAccessRequestHistoryCollection instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestHistoryCollection + getDelegatedResourceAccessRequestHistoryCollection() { + return delegatedResourceAccessRequestHistoryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "delegatedResourceAccessRequestHistoryCollection" + }) + private ListDelegatedResourceAccessRequestHistoriesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestHistoryCollection + delegatedResourceAccessRequestHistoryCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.delegatedResourceAccessRequestHistoryCollection = + delegatedResourceAccessRequestHistoryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned DelegatedResourceAccessRequestHistoryCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestHistoryCollection + delegatedResourceAccessRequestHistoryCollection; + + /** + * The returned DelegatedResourceAccessRequestHistoryCollection instance. + * @param delegatedResourceAccessRequestHistoryCollection the value to set + * @return this builder + */ + public Builder delegatedResourceAccessRequestHistoryCollection( + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestHistoryCollection + delegatedResourceAccessRequestHistoryCollection) { + this.delegatedResourceAccessRequestHistoryCollection = + delegatedResourceAccessRequestHistoryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListDelegatedResourceAccessRequestHistoriesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + delegatedResourceAccessRequestHistoryCollection( + o.getDelegatedResourceAccessRequestHistoryCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListDelegatedResourceAccessRequestHistoriesResponse build() { + return new ListDelegatedResourceAccessRequestHistoriesResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + delegatedResourceAccessRequestHistoryCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",delegatedResourceAccessRequestHistoryCollection=") + .append(String.valueOf(delegatedResourceAccessRequestHistoryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListDelegatedResourceAccessRequestHistoriesResponse)) { + return false; + } + + ListDelegatedResourceAccessRequestHistoriesResponse other = + (ListDelegatedResourceAccessRequestHistoriesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.delegatedResourceAccessRequestHistoryCollection, + other.delegatedResourceAccessRequestHistoryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.delegatedResourceAccessRequestHistoryCollection == null + ? 43 + : this.delegatedResourceAccessRequestHistoryCollection.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListDelegatedResourceAccessRequestsResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListDelegatedResourceAccessRequestsResponse.java new file mode 100644 index 00000000000..e3c2d09e7ba --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListDelegatedResourceAccessRequestsResponse.java @@ -0,0 +1,241 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListDelegatedResourceAccessRequestsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned DelegatedResourceAccessRequestSummaryCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestSummaryCollection + delegatedResourceAccessRequestSummaryCollection; + + /** + * The returned DelegatedResourceAccessRequestSummaryCollection instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestSummaryCollection + getDelegatedResourceAccessRequestSummaryCollection() { + return delegatedResourceAccessRequestSummaryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "delegatedResourceAccessRequestSummaryCollection" + }) + private ListDelegatedResourceAccessRequestsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestSummaryCollection + delegatedResourceAccessRequestSummaryCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.delegatedResourceAccessRequestSummaryCollection = + delegatedResourceAccessRequestSummaryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned DelegatedResourceAccessRequestSummaryCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestSummaryCollection + delegatedResourceAccessRequestSummaryCollection; + + /** + * The returned DelegatedResourceAccessRequestSummaryCollection instance. + * @param delegatedResourceAccessRequestSummaryCollection the value to set + * @return this builder + */ + public Builder delegatedResourceAccessRequestSummaryCollection( + com.oracle.bmc.delegateaccesscontrol.model + .DelegatedResourceAccessRequestSummaryCollection + delegatedResourceAccessRequestSummaryCollection) { + this.delegatedResourceAccessRequestSummaryCollection = + delegatedResourceAccessRequestSummaryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListDelegatedResourceAccessRequestsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + delegatedResourceAccessRequestSummaryCollection( + o.getDelegatedResourceAccessRequestSummaryCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListDelegatedResourceAccessRequestsResponse build() { + return new ListDelegatedResourceAccessRequestsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + delegatedResourceAccessRequestSummaryCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",delegatedResourceAccessRequestSummaryCollection=") + .append(String.valueOf(delegatedResourceAccessRequestSummaryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListDelegatedResourceAccessRequestsResponse)) { + return false; + } + + ListDelegatedResourceAccessRequestsResponse other = + (ListDelegatedResourceAccessRequestsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.delegatedResourceAccessRequestSummaryCollection, + other.delegatedResourceAccessRequestSummaryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.delegatedResourceAccessRequestSummaryCollection == null + ? 43 + : this.delegatedResourceAccessRequestSummaryCollection.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListDelegationControlResourcesResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListDelegationControlResourcesResponse.java new file mode 100644 index 00000000000..b0a501385c3 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListDelegationControlResourcesResponse.java @@ -0,0 +1,231 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListDelegationControlResourcesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned DelegationControlResourceCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationControlResourceCollection + delegationControlResourceCollection; + + /** + * The returned DelegationControlResourceCollection instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model.DelegationControlResourceCollection + getDelegationControlResourceCollection() { + return delegationControlResourceCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "delegationControlResourceCollection" + }) + private ListDelegationControlResourcesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.delegateaccesscontrol.model.DelegationControlResourceCollection + delegationControlResourceCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.delegationControlResourceCollection = delegationControlResourceCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned DelegationControlResourceCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationControlResourceCollection + delegationControlResourceCollection; + + /** + * The returned DelegationControlResourceCollection instance. + * @param delegationControlResourceCollection the value to set + * @return this builder + */ + public Builder delegationControlResourceCollection( + com.oracle.bmc.delegateaccesscontrol.model.DelegationControlResourceCollection + delegationControlResourceCollection) { + this.delegationControlResourceCollection = delegationControlResourceCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListDelegationControlResourcesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + delegationControlResourceCollection(o.getDelegationControlResourceCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListDelegationControlResourcesResponse build() { + return new ListDelegationControlResourcesResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + delegationControlResourceCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",delegationControlResourceCollection=") + .append(String.valueOf(delegationControlResourceCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListDelegationControlResourcesResponse)) { + return false; + } + + ListDelegationControlResourcesResponse other = (ListDelegationControlResourcesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.delegationControlResourceCollection, + other.delegationControlResourceCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.delegationControlResourceCollection == null + ? 43 + : this.delegationControlResourceCollection.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListDelegationControlsResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListDelegationControlsResponse.java new file mode 100644 index 00000000000..c1d086f032d --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListDelegationControlsResponse.java @@ -0,0 +1,231 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListDelegationControlsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned DelegationControlSummaryCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationControlSummaryCollection + delegationControlSummaryCollection; + + /** + * The returned DelegationControlSummaryCollection instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model.DelegationControlSummaryCollection + getDelegationControlSummaryCollection() { + return delegationControlSummaryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "delegationControlSummaryCollection" + }) + private ListDelegationControlsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.delegateaccesscontrol.model.DelegationControlSummaryCollection + delegationControlSummaryCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.delegationControlSummaryCollection = delegationControlSummaryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned DelegationControlSummaryCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationControlSummaryCollection + delegationControlSummaryCollection; + + /** + * The returned DelegationControlSummaryCollection instance. + * @param delegationControlSummaryCollection the value to set + * @return this builder + */ + public Builder delegationControlSummaryCollection( + com.oracle.bmc.delegateaccesscontrol.model.DelegationControlSummaryCollection + delegationControlSummaryCollection) { + this.delegationControlSummaryCollection = delegationControlSummaryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListDelegationControlsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + delegationControlSummaryCollection(o.getDelegationControlSummaryCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListDelegationControlsResponse build() { + return new ListDelegationControlsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + delegationControlSummaryCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",delegationControlSummaryCollection=") + .append(String.valueOf(delegationControlSummaryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListDelegationControlsResponse)) { + return false; + } + + ListDelegationControlsResponse other = (ListDelegationControlsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.delegationControlSummaryCollection, + other.delegationControlSummaryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.delegationControlSummaryCollection == null + ? 43 + : this.delegationControlSummaryCollection.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListDelegationSubscriptionsResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListDelegationSubscriptionsResponse.java new file mode 100644 index 00000000000..b3e9f5ae508 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListDelegationSubscriptionsResponse.java @@ -0,0 +1,231 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListDelegationSubscriptionsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned DelegationSubscriptionSummaryCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscriptionSummaryCollection + delegationSubscriptionSummaryCollection; + + /** + * The returned DelegationSubscriptionSummaryCollection instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscriptionSummaryCollection + getDelegationSubscriptionSummaryCollection() { + return delegationSubscriptionSummaryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "delegationSubscriptionSummaryCollection" + }) + private ListDelegationSubscriptionsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscriptionSummaryCollection + delegationSubscriptionSummaryCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.delegationSubscriptionSummaryCollection = delegationSubscriptionSummaryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned DelegationSubscriptionSummaryCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscriptionSummaryCollection + delegationSubscriptionSummaryCollection; + + /** + * The returned DelegationSubscriptionSummaryCollection instance. + * @param delegationSubscriptionSummaryCollection the value to set + * @return this builder + */ + public Builder delegationSubscriptionSummaryCollection( + com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscriptionSummaryCollection + delegationSubscriptionSummaryCollection) { + this.delegationSubscriptionSummaryCollection = delegationSubscriptionSummaryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListDelegationSubscriptionsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + delegationSubscriptionSummaryCollection(o.getDelegationSubscriptionSummaryCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListDelegationSubscriptionsResponse build() { + return new ListDelegationSubscriptionsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + delegationSubscriptionSummaryCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",delegationSubscriptionSummaryCollection=") + .append(String.valueOf(delegationSubscriptionSummaryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListDelegationSubscriptionsResponse)) { + return false; + } + + ListDelegationSubscriptionsResponse other = (ListDelegationSubscriptionsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.delegationSubscriptionSummaryCollection, + other.delegationSubscriptionSummaryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.delegationSubscriptionSummaryCollection == null + ? 43 + : this.delegationSubscriptionSummaryCollection.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListServiceProviderActionsResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListServiceProviderActionsResponse.java new file mode 100644 index 00000000000..f0cd6bce47b --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListServiceProviderActionsResponse.java @@ -0,0 +1,231 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListServiceProviderActionsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned ServiceProviderActionSummaryCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderActionSummaryCollection + serviceProviderActionSummaryCollection; + + /** + * The returned ServiceProviderActionSummaryCollection instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderActionSummaryCollection + getServiceProviderActionSummaryCollection() { + return serviceProviderActionSummaryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "serviceProviderActionSummaryCollection" + }) + private ListServiceProviderActionsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderActionSummaryCollection + serviceProviderActionSummaryCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.serviceProviderActionSummaryCollection = serviceProviderActionSummaryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned ServiceProviderActionSummaryCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderActionSummaryCollection + serviceProviderActionSummaryCollection; + + /** + * The returned ServiceProviderActionSummaryCollection instance. + * @param serviceProviderActionSummaryCollection the value to set + * @return this builder + */ + public Builder serviceProviderActionSummaryCollection( + com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderActionSummaryCollection + serviceProviderActionSummaryCollection) { + this.serviceProviderActionSummaryCollection = serviceProviderActionSummaryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListServiceProviderActionsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + serviceProviderActionSummaryCollection(o.getServiceProviderActionSummaryCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListServiceProviderActionsResponse build() { + return new ListServiceProviderActionsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + serviceProviderActionSummaryCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",serviceProviderActionSummaryCollection=") + .append(String.valueOf(serviceProviderActionSummaryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListServiceProviderActionsResponse)) { + return false; + } + + ListServiceProviderActionsResponse other = (ListServiceProviderActionsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.serviceProviderActionSummaryCollection, + other.serviceProviderActionSummaryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.serviceProviderActionSummaryCollection == null + ? 43 + : this.serviceProviderActionSummaryCollection.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListServiceProviderInteractionsResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListServiceProviderInteractionsResponse.java new file mode 100644 index 00000000000..a9112b3e172 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListServiceProviderInteractionsResponse.java @@ -0,0 +1,231 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListServiceProviderInteractionsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned ServiceProviderInteractionCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderInteractionCollection + serviceProviderInteractionCollection; + + /** + * The returned ServiceProviderInteractionCollection instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderInteractionCollection + getServiceProviderInteractionCollection() { + return serviceProviderInteractionCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "serviceProviderInteractionCollection" + }) + private ListServiceProviderInteractionsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderInteractionCollection + serviceProviderInteractionCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.serviceProviderInteractionCollection = serviceProviderInteractionCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned ServiceProviderInteractionCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderInteractionCollection + serviceProviderInteractionCollection; + + /** + * The returned ServiceProviderInteractionCollection instance. + * @param serviceProviderInteractionCollection the value to set + * @return this builder + */ + public Builder serviceProviderInteractionCollection( + com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderInteractionCollection + serviceProviderInteractionCollection) { + this.serviceProviderInteractionCollection = serviceProviderInteractionCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListServiceProviderInteractionsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + serviceProviderInteractionCollection(o.getServiceProviderInteractionCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListServiceProviderInteractionsResponse build() { + return new ListServiceProviderInteractionsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + serviceProviderInteractionCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",serviceProviderInteractionCollection=") + .append(String.valueOf(serviceProviderInteractionCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListServiceProviderInteractionsResponse)) { + return false; + } + + ListServiceProviderInteractionsResponse other = (ListServiceProviderInteractionsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.serviceProviderInteractionCollection, + other.serviceProviderInteractionCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.serviceProviderInteractionCollection == null + ? 43 + : this.serviceProviderInteractionCollection.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListServiceProvidersResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListServiceProvidersResponse.java new file mode 100644 index 00000000000..375b73a002d --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListServiceProvidersResponse.java @@ -0,0 +1,231 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListServiceProvidersResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned ServiceProviderSummaryCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderSummaryCollection + serviceProviderSummaryCollection; + + /** + * The returned ServiceProviderSummaryCollection instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderSummaryCollection + getServiceProviderSummaryCollection() { + return serviceProviderSummaryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "serviceProviderSummaryCollection" + }) + private ListServiceProvidersResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderSummaryCollection + serviceProviderSummaryCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.serviceProviderSummaryCollection = serviceProviderSummaryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned ServiceProviderSummaryCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderSummaryCollection + serviceProviderSummaryCollection; + + /** + * The returned ServiceProviderSummaryCollection instance. + * @param serviceProviderSummaryCollection the value to set + * @return this builder + */ + public Builder serviceProviderSummaryCollection( + com.oracle.bmc.delegateaccesscontrol.model.ServiceProviderSummaryCollection + serviceProviderSummaryCollection) { + this.serviceProviderSummaryCollection = serviceProviderSummaryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListServiceProvidersResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + serviceProviderSummaryCollection(o.getServiceProviderSummaryCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListServiceProvidersResponse build() { + return new ListServiceProvidersResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + serviceProviderSummaryCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",serviceProviderSummaryCollection=") + .append(String.valueOf(serviceProviderSummaryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListServiceProvidersResponse)) { + return false; + } + + ListServiceProvidersResponse other = (ListServiceProvidersResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.serviceProviderSummaryCollection, + other.serviceProviderSummaryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.serviceProviderSummaryCollection == null + ? 43 + : this.serviceProviderSummaryCollection.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListWorkRequestErrorsResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListWorkRequestErrorsResponse.java new file mode 100644 index 00000000000..f6b2fb6fe04 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListWorkRequestErrorsResponse.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListWorkRequestErrorsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned WorkRequestErrorCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.WorkRequestErrorCollection + workRequestErrorCollection; + + /** + * The returned WorkRequestErrorCollection instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model.WorkRequestErrorCollection + getWorkRequestErrorCollection() { + return workRequestErrorCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "workRequestErrorCollection" + }) + private ListWorkRequestErrorsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.delegateaccesscontrol.model.WorkRequestErrorCollection + workRequestErrorCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.workRequestErrorCollection = workRequestErrorCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned WorkRequestErrorCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.WorkRequestErrorCollection + workRequestErrorCollection; + + /** + * The returned WorkRequestErrorCollection instance. + * @param workRequestErrorCollection the value to set + * @return this builder + */ + public Builder workRequestErrorCollection( + com.oracle.bmc.delegateaccesscontrol.model.WorkRequestErrorCollection + workRequestErrorCollection) { + this.workRequestErrorCollection = workRequestErrorCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestErrorsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + workRequestErrorCollection(o.getWorkRequestErrorCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListWorkRequestErrorsResponse build() { + return new ListWorkRequestErrorsResponse( + __httpStatusCode__, + headers, + opcNextPage, + opcRequestId, + workRequestErrorCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",workRequestErrorCollection=") + .append(String.valueOf(workRequestErrorCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListWorkRequestErrorsResponse)) { + return false; + } + + ListWorkRequestErrorsResponse other = (ListWorkRequestErrorsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.workRequestErrorCollection, other.workRequestErrorCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.workRequestErrorCollection == null + ? 43 + : this.workRequestErrorCollection.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListWorkRequestLogsResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListWorkRequestLogsResponse.java new file mode 100644 index 00000000000..d074743bad9 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListWorkRequestLogsResponse.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListWorkRequestLogsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned WorkRequestLogEntryCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection; + + /** + * The returned WorkRequestLogEntryCollection instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model.WorkRequestLogEntryCollection + getWorkRequestLogEntryCollection() { + return workRequestLogEntryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "workRequestLogEntryCollection" + }) + private ListWorkRequestLogsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.delegateaccesscontrol.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.workRequestLogEntryCollection = workRequestLogEntryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned WorkRequestLogEntryCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection; + + /** + * The returned WorkRequestLogEntryCollection instance. + * @param workRequestLogEntryCollection the value to set + * @return this builder + */ + public Builder workRequestLogEntryCollection( + com.oracle.bmc.delegateaccesscontrol.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection) { + this.workRequestLogEntryCollection = workRequestLogEntryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestLogsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + workRequestLogEntryCollection(o.getWorkRequestLogEntryCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListWorkRequestLogsResponse build() { + return new ListWorkRequestLogsResponse( + __httpStatusCode__, + headers, + opcNextPage, + opcRequestId, + workRequestLogEntryCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",workRequestLogEntryCollection=") + .append(String.valueOf(workRequestLogEntryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListWorkRequestLogsResponse)) { + return false; + } + + ListWorkRequestLogsResponse other = (ListWorkRequestLogsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.workRequestLogEntryCollection, other.workRequestLogEntryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.workRequestLogEntryCollection == null + ? 43 + : this.workRequestLogEntryCollection.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListWorkRequestsResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListWorkRequestsResponse.java new file mode 100644 index 00000000000..d5d7f9e7beb --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ListWorkRequestsResponse.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ListWorkRequestsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned WorkRequestSummaryCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.WorkRequestSummaryCollection + workRequestSummaryCollection; + + /** + * The returned WorkRequestSummaryCollection instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model.WorkRequestSummaryCollection + getWorkRequestSummaryCollection() { + return workRequestSummaryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "workRequestSummaryCollection" + }) + private ListWorkRequestsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.delegateaccesscontrol.model.WorkRequestSummaryCollection + workRequestSummaryCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.workRequestSummaryCollection = workRequestSummaryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned WorkRequestSummaryCollection instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.WorkRequestSummaryCollection + workRequestSummaryCollection; + + /** + * The returned WorkRequestSummaryCollection instance. + * @param workRequestSummaryCollection the value to set + * @return this builder + */ + public Builder workRequestSummaryCollection( + com.oracle.bmc.delegateaccesscontrol.model.WorkRequestSummaryCollection + workRequestSummaryCollection) { + this.workRequestSummaryCollection = workRequestSummaryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + workRequestSummaryCollection(o.getWorkRequestSummaryCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListWorkRequestsResponse build() { + return new ListWorkRequestsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + workRequestSummaryCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",workRequestSummaryCollection=") + .append(String.valueOf(workRequestSummaryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListWorkRequestsResponse)) { + return false; + } + + ListWorkRequestsResponse other = (ListWorkRequestsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.workRequestSummaryCollection, other.workRequestSummaryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.workRequestSummaryCollection == null + ? 43 + : this.workRequestSummaryCollection.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/RejectDelegatedResourceAccessRequestResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/RejectDelegatedResourceAccessRequestResponse.java new file mode 100644 index 00000000000..a9b60d0e3bb --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/RejectDelegatedResourceAccessRequestResponse.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class RejectDelegatedResourceAccessRequestResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private RejectDelegatedResourceAccessRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RejectDelegatedResourceAccessRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RejectDelegatedResourceAccessRequestResponse build() { + return new RejectDelegatedResourceAccessRequestResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RejectDelegatedResourceAccessRequestResponse)) { + return false; + } + + RejectDelegatedResourceAccessRequestResponse other = + (RejectDelegatedResourceAccessRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/RevokeDelegatedResourceAccessRequestResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/RevokeDelegatedResourceAccessRequestResponse.java new file mode 100644 index 00000000000..d447274c5a7 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/RevokeDelegatedResourceAccessRequestResponse.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class RevokeDelegatedResourceAccessRequestResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private RevokeDelegatedResourceAccessRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RevokeDelegatedResourceAccessRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RevokeDelegatedResourceAccessRequestResponse build() { + return new RevokeDelegatedResourceAccessRequestResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RevokeDelegatedResourceAccessRequestResponse)) { + return false; + } + + RevokeDelegatedResourceAccessRequestResponse other = + (RevokeDelegatedResourceAccessRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ServiceProviderInteractionRequestResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ServiceProviderInteractionRequestResponse.java new file mode 100644 index 00000000000..f529dfc2628 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/ServiceProviderInteractionRequestResponse.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class ServiceProviderInteractionRequestResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private ServiceProviderInteractionRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ServiceProviderInteractionRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ServiceProviderInteractionRequestResponse build() { + return new ServiceProviderInteractionRequestResponse( + __httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ServiceProviderInteractionRequestResponse)) { + return false; + } + + ServiceProviderInteractionRequestResponse other = + (ServiceProviderInteractionRequestResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/UpdateDelegationControlResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/UpdateDelegationControlResponse.java new file mode 100644 index 00000000000..c4eb0ac0333 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/UpdateDelegationControlResponse.java @@ -0,0 +1,301 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class UpdateDelegationControlResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * URI of the resource + */ + private String contentLocation; + + /** + * URI of the resource + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned DelegationControl instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationControl delegationControl; + + /** + * The returned DelegationControl instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model.DelegationControl getDelegationControl() { + return delegationControl; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId", + "contentLocation", + "etag", + "delegationControl" + }) + private UpdateDelegationControlResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId, + String contentLocation, + String etag, + com.oracle.bmc.delegateaccesscontrol.model.DelegationControl delegationControl) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + this.contentLocation = contentLocation; + this.etag = etag; + this.delegationControl = delegationControl; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * URI of the resource + */ + private String contentLocation; + + /** + * URI of the resource + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned DelegationControl instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationControl delegationControl; + + /** + * The returned DelegationControl instance. + * @param delegationControl the value to set + * @return this builder + */ + public Builder delegationControl( + com.oracle.bmc.delegateaccesscontrol.model.DelegationControl delegationControl) { + this.delegationControl = delegationControl; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateDelegationControlResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + delegationControl(o.getDelegationControl()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateDelegationControlResponse build() { + return new UpdateDelegationControlResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcWorkRequestId, + contentLocation, + etag, + delegationControl); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",delegationControl=").append(String.valueOf(delegationControl)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateDelegationControlResponse)) { + return false; + } + + UpdateDelegationControlResponse other = (UpdateDelegationControlResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.delegationControl, other.delegationControl); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.delegationControl == null ? 43 : this.delegationControl.hashCode()); + return result; + } +} diff --git a/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/UpdateDelegationSubscriptionResponse.java b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/UpdateDelegationSubscriptionResponse.java new file mode 100644 index 00000000000..9694a45c700 --- /dev/null +++ b/bmc-delegateaccesscontrol/src/main/java/com/oracle/bmc/delegateaccesscontrol/responses/UpdateDelegationSubscriptionResponse.java @@ -0,0 +1,309 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.delegateaccesscontrol.responses; + +import com.oracle.bmc.delegateaccesscontrol.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230801") +public class UpdateDelegationSubscriptionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * URI of the resource + */ + private String contentLocation; + + /** + * URI of the resource + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned DelegationSubscription instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription + delegationSubscription; + + /** + * The returned DelegationSubscription instance. + * @return the value + */ + public com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription + getDelegationSubscription() { + return delegationSubscription; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId", + "contentLocation", + "etag", + "delegationSubscription" + }) + private UpdateDelegationSubscriptionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId, + String contentLocation, + String etag, + com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription + delegationSubscription) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + this.contentLocation = contentLocation; + this.etag = etag; + this.delegationSubscription = delegationSubscription; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * URI of the resource + */ + private String contentLocation; + + /** + * URI of the resource + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned DelegationSubscription instance. + */ + private com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription + delegationSubscription; + + /** + * The returned DelegationSubscription instance. + * @param delegationSubscription the value to set + * @return this builder + */ + public Builder delegationSubscription( + com.oracle.bmc.delegateaccesscontrol.model.DelegationSubscription + delegationSubscription) { + this.delegationSubscription = delegationSubscription; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateDelegationSubscriptionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + delegationSubscription(o.getDelegationSubscription()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateDelegationSubscriptionResponse build() { + return new UpdateDelegationSubscriptionResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcWorkRequestId, + contentLocation, + etag, + delegationSubscription); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",delegationSubscription=").append(String.valueOf(delegationSubscription)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateDelegationSubscriptionResponse)) { + return false; + } + + UpdateDelegationSubscriptionResponse other = (UpdateDelegationSubscriptionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals( + this.delegationSubscription, other.delegationSubscription); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.delegationSubscription == null + ? 43 + : this.delegationSubscription.hashCode()); + return result; + } +} diff --git a/bmc-demandsignal/pom.xml b/bmc-demandsignal/pom.xml index 98424a537da..1040dc5c913 100644 --- a/bmc-demandsignal/pom.xml +++ b/bmc-demandsignal/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-demandsignal @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-desktops/pom.xml b/bmc-desktops/pom.xml index 4aeeac0c03e..4c92b43b0a7 100644 --- a/bmc-desktops/pom.xml +++ b/bmc-desktops/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-desktops @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/internal/http/StopDesktopConverter.java b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/internal/http/StopDesktopConverter.java index 06b4357c4e4..78dfc707499 100644 --- a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/internal/http/StopDesktopConverter.java +++ b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/internal/http/StopDesktopConverter.java @@ -41,6 +41,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( .path("actions") .path("stop"); + if (request.getIsSoftStop() != null) { + target = + target.queryParam( + "isSoftStop", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsSoftStop())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/CreateDesktopPoolDesktopSessionLifecycleActions.java b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/CreateDesktopPoolDesktopSessionLifecycleActions.java new file mode 100644 index 00000000000..04e202faa9b --- /dev/null +++ b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/CreateDesktopPoolDesktopSessionLifecycleActions.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.desktops.model; + +/** + * The details of action to be triggered in case of inactivity or disconnect + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220618") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDesktopPoolDesktopSessionLifecycleActions.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDesktopPoolDesktopSessionLifecycleActions + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"inactivity", "disconnect"}) + public CreateDesktopPoolDesktopSessionLifecycleActions( + InactivityConfig inactivity, DisconnectConfig disconnect) { + super(); + this.inactivity = inactivity; + this.disconnect = disconnect; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("inactivity") + private InactivityConfig inactivity; + + public Builder inactivity(InactivityConfig inactivity) { + this.inactivity = inactivity; + this.__explicitlySet__.add("inactivity"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("disconnect") + private DisconnectConfig disconnect; + + public Builder disconnect(DisconnectConfig disconnect) { + this.disconnect = disconnect; + this.__explicitlySet__.add("disconnect"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDesktopPoolDesktopSessionLifecycleActions build() { + CreateDesktopPoolDesktopSessionLifecycleActions model = + new CreateDesktopPoolDesktopSessionLifecycleActions( + this.inactivity, this.disconnect); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDesktopPoolDesktopSessionLifecycleActions model) { + if (model.wasPropertyExplicitlySet("inactivity")) { + this.inactivity(model.getInactivity()); + } + if (model.wasPropertyExplicitlySet("disconnect")) { + this.disconnect(model.getDisconnect()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("inactivity") + private final InactivityConfig inactivity; + + public InactivityConfig getInactivity() { + return inactivity; + } + + @com.fasterxml.jackson.annotation.JsonProperty("disconnect") + private final DisconnectConfig disconnect; + + public DisconnectConfig getDisconnect() { + return disconnect; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateDesktopPoolDesktopSessionLifecycleActions("); + sb.append("super=").append(super.toString()); + sb.append("inactivity=").append(String.valueOf(this.inactivity)); + sb.append(", disconnect=").append(String.valueOf(this.disconnect)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDesktopPoolDesktopSessionLifecycleActions)) { + return false; + } + + CreateDesktopPoolDesktopSessionLifecycleActions other = + (CreateDesktopPoolDesktopSessionLifecycleActions) o; + return java.util.Objects.equals(this.inactivity, other.inactivity) + && java.util.Objects.equals(this.disconnect, other.disconnect) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.inactivity == null ? 43 : this.inactivity.hashCode()); + result = (result * PRIME) + (this.disconnect == null ? 43 : this.disconnect.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/CreateDesktopPoolDetails.java b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/CreateDesktopPoolDetails.java index 341568f7a21..8c711a5028d 100644 --- a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/CreateDesktopPoolDetails.java +++ b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/CreateDesktopPoolDetails.java @@ -29,6 +29,8 @@ public final class CreateDesktopPoolDetails "maximumSize", "standbySize", "shapeName", + "shapeConfig", + "useDedicatedVmHost", "isStorageEnabled", "storageSizeInGBs", "storageBackupPolicyId", @@ -36,6 +38,7 @@ public final class CreateDesktopPoolDetails "availabilityPolicy", "image", "networkConfiguration", + "sessionLifecycleActions", "timeStartScheduled", "timeStopScheduled", "contactDetails", @@ -43,7 +46,8 @@ public final class CreateDesktopPoolDetails "availabilityDomain", "freeformTags", "definedTags", - "nsgIds" + "nsgIds", + "privateAccessDetails" }) public CreateDesktopPoolDetails( String compartmentId, @@ -52,6 +56,8 @@ public CreateDesktopPoolDetails( Integer maximumSize, Integer standbySize, String shapeName, + CreateDesktopPoolShapeConfigDetails shapeConfig, + UseDedicatedVmHost useDedicatedVmHost, Boolean isStorageEnabled, Integer storageSizeInGBs, String storageBackupPolicyId, @@ -59,6 +65,7 @@ public CreateDesktopPoolDetails( DesktopAvailabilityPolicy availabilityPolicy, DesktopImage image, DesktopNetworkConfiguration networkConfiguration, + CreateDesktopPoolDesktopSessionLifecycleActions sessionLifecycleActions, java.util.Date timeStartScheduled, java.util.Date timeStopScheduled, String contactDetails, @@ -66,7 +73,8 @@ public CreateDesktopPoolDetails( String availabilityDomain, java.util.Map freeformTags, java.util.Map> definedTags, - java.util.List nsgIds) { + java.util.List nsgIds, + CreateDesktopPoolPrivateAccessDetails privateAccessDetails) { super(); this.compartmentId = compartmentId; this.displayName = displayName; @@ -74,6 +82,8 @@ public CreateDesktopPoolDetails( this.maximumSize = maximumSize; this.standbySize = standbySize; this.shapeName = shapeName; + this.shapeConfig = shapeConfig; + this.useDedicatedVmHost = useDedicatedVmHost; this.isStorageEnabled = isStorageEnabled; this.storageSizeInGBs = storageSizeInGBs; this.storageBackupPolicyId = storageBackupPolicyId; @@ -81,6 +91,7 @@ public CreateDesktopPoolDetails( this.availabilityPolicy = availabilityPolicy; this.image = image; this.networkConfiguration = networkConfiguration; + this.sessionLifecycleActions = sessionLifecycleActions; this.timeStartScheduled = timeStartScheduled; this.timeStopScheduled = timeStopScheduled; this.contactDetails = contactDetails; @@ -89,6 +100,7 @@ public CreateDesktopPoolDetails( this.freeformTags = freeformTags; this.definedTags = definedTags; this.nsgIds = nsgIds; + this.privateAccessDetails = privateAccessDetails; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -193,6 +205,31 @@ public Builder shapeName(String shapeName) { this.__explicitlySet__.add("shapeName"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("shapeConfig") + private CreateDesktopPoolShapeConfigDetails shapeConfig; + + public Builder shapeConfig(CreateDesktopPoolShapeConfigDetails shapeConfig) { + this.shapeConfig = shapeConfig; + this.__explicitlySet__.add("shapeConfig"); + return this; + } + /** + * Indicates whether the desktop pool uses dedicated virtual machine hosts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("useDedicatedVmHost") + private UseDedicatedVmHost useDedicatedVmHost; + + /** + * Indicates whether the desktop pool uses dedicated virtual machine hosts. + * @param useDedicatedVmHost the value to set + * @return this builder + **/ + public Builder useDedicatedVmHost(UseDedicatedVmHost useDedicatedVmHost) { + this.useDedicatedVmHost = useDedicatedVmHost; + this.__explicitlySet__.add("useDedicatedVmHost"); + return this; + } /** * Indicates whether storage is enabled for the desktop pool. **/ @@ -277,6 +314,16 @@ public Builder networkConfiguration(DesktopNetworkConfiguration networkConfigura this.__explicitlySet__.add("networkConfiguration"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("sessionLifecycleActions") + private CreateDesktopPoolDesktopSessionLifecycleActions sessionLifecycleActions; + + public Builder sessionLifecycleActions( + CreateDesktopPoolDesktopSessionLifecycleActions sessionLifecycleActions) { + this.sessionLifecycleActions = sessionLifecycleActions; + this.__explicitlySet__.add("sessionLifecycleActions"); + return this; + } /** * The start time of the desktop pool. **/ @@ -405,13 +452,13 @@ public Builder definedTags( return this; } /** - * A list of network security groups for the desktop pool. + * A list of network security groups for the private access. **/ @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") private java.util.List nsgIds; /** - * A list of network security groups for the desktop pool. + * A list of network security groups for the private access. * @param nsgIds the value to set * @return this builder **/ @@ -421,6 +468,16 @@ public Builder nsgIds(java.util.List nsgIds) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("privateAccessDetails") + private CreateDesktopPoolPrivateAccessDetails privateAccessDetails; + + public Builder privateAccessDetails( + CreateDesktopPoolPrivateAccessDetails privateAccessDetails) { + this.privateAccessDetails = privateAccessDetails; + this.__explicitlySet__.add("privateAccessDetails"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -433,6 +490,8 @@ public CreateDesktopPoolDetails build() { this.maximumSize, this.standbySize, this.shapeName, + this.shapeConfig, + this.useDedicatedVmHost, this.isStorageEnabled, this.storageSizeInGBs, this.storageBackupPolicyId, @@ -440,6 +499,7 @@ public CreateDesktopPoolDetails build() { this.availabilityPolicy, this.image, this.networkConfiguration, + this.sessionLifecycleActions, this.timeStartScheduled, this.timeStopScheduled, this.contactDetails, @@ -447,7 +507,8 @@ public CreateDesktopPoolDetails build() { this.availabilityDomain, this.freeformTags, this.definedTags, - this.nsgIds); + this.nsgIds, + this.privateAccessDetails); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -474,6 +535,12 @@ public Builder copy(CreateDesktopPoolDetails model) { if (model.wasPropertyExplicitlySet("shapeName")) { this.shapeName(model.getShapeName()); } + if (model.wasPropertyExplicitlySet("shapeConfig")) { + this.shapeConfig(model.getShapeConfig()); + } + if (model.wasPropertyExplicitlySet("useDedicatedVmHost")) { + this.useDedicatedVmHost(model.getUseDedicatedVmHost()); + } if (model.wasPropertyExplicitlySet("isStorageEnabled")) { this.isStorageEnabled(model.getIsStorageEnabled()); } @@ -495,6 +562,9 @@ public Builder copy(CreateDesktopPoolDetails model) { if (model.wasPropertyExplicitlySet("networkConfiguration")) { this.networkConfiguration(model.getNetworkConfiguration()); } + if (model.wasPropertyExplicitlySet("sessionLifecycleActions")) { + this.sessionLifecycleActions(model.getSessionLifecycleActions()); + } if (model.wasPropertyExplicitlySet("timeStartScheduled")) { this.timeStartScheduled(model.getTimeStartScheduled()); } @@ -519,6 +589,9 @@ public Builder copy(CreateDesktopPoolDetails model) { if (model.wasPropertyExplicitlySet("nsgIds")) { this.nsgIds(model.getNsgIds()); } + if (model.wasPropertyExplicitlySet("privateAccessDetails")) { + this.privateAccessDetails(model.getPrivateAccessDetails()); + } return this; } } @@ -622,6 +695,63 @@ public String getShapeName() { return shapeName; } + @com.fasterxml.jackson.annotation.JsonProperty("shapeConfig") + private final CreateDesktopPoolShapeConfigDetails shapeConfig; + + public CreateDesktopPoolShapeConfigDetails getShapeConfig() { + return shapeConfig; + } + + /** + * Indicates whether the desktop pool uses dedicated virtual machine hosts. + **/ + public enum UseDedicatedVmHost { + True("TRUE"), + False("FALSE"), + Auto("AUTO"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (UseDedicatedVmHost v : UseDedicatedVmHost.values()) { + map.put(v.getValue(), v); + } + } + + UseDedicatedVmHost(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static UseDedicatedVmHost create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid UseDedicatedVmHost: " + key); + } + }; + /** + * Indicates whether the desktop pool uses dedicated virtual machine hosts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("useDedicatedVmHost") + private final UseDedicatedVmHost useDedicatedVmHost; + + /** + * Indicates whether the desktop pool uses dedicated virtual machine hosts. + * @return the value + **/ + public UseDedicatedVmHost getUseDedicatedVmHost() { + return useDedicatedVmHost; + } + /** * Indicates whether storage is enabled for the desktop pool. **/ @@ -692,6 +822,13 @@ public DesktopNetworkConfiguration getNetworkConfiguration() { return networkConfiguration; } + @com.fasterxml.jackson.annotation.JsonProperty("sessionLifecycleActions") + private final CreateDesktopPoolDesktopSessionLifecycleActions sessionLifecycleActions; + + public CreateDesktopPoolDesktopSessionLifecycleActions getSessionLifecycleActions() { + return sessionLifecycleActions; + } + /** * The start time of the desktop pool. **/ @@ -805,19 +942,26 @@ public java.util.Map> getDefinedTags() { } /** - * A list of network security groups for the desktop pool. + * A list of network security groups for the private access. **/ @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") private final java.util.List nsgIds; /** - * A list of network security groups for the desktop pool. + * A list of network security groups for the private access. * @return the value **/ public java.util.List getNsgIds() { return nsgIds; } + @com.fasterxml.jackson.annotation.JsonProperty("privateAccessDetails") + private final CreateDesktopPoolPrivateAccessDetails privateAccessDetails; + + public CreateDesktopPoolPrivateAccessDetails getPrivateAccessDetails() { + return privateAccessDetails; + } + @Override public String toString() { return this.toString(true); @@ -838,6 +982,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", maximumSize=").append(String.valueOf(this.maximumSize)); sb.append(", standbySize=").append(String.valueOf(this.standbySize)); sb.append(", shapeName=").append(String.valueOf(this.shapeName)); + sb.append(", shapeConfig=").append(String.valueOf(this.shapeConfig)); + sb.append(", useDedicatedVmHost=").append(String.valueOf(this.useDedicatedVmHost)); sb.append(", isStorageEnabled=").append(String.valueOf(this.isStorageEnabled)); sb.append(", storageSizeInGBs=").append(String.valueOf(this.storageSizeInGBs)); sb.append(", storageBackupPolicyId=").append(String.valueOf(this.storageBackupPolicyId)); @@ -845,6 +991,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", availabilityPolicy=").append(String.valueOf(this.availabilityPolicy)); sb.append(", image=").append(String.valueOf(this.image)); sb.append(", networkConfiguration=").append(String.valueOf(this.networkConfiguration)); + sb.append(", sessionLifecycleActions=") + .append(String.valueOf(this.sessionLifecycleActions)); sb.append(", timeStartScheduled=").append(String.valueOf(this.timeStartScheduled)); sb.append(", timeStopScheduled=").append(String.valueOf(this.timeStopScheduled)); sb.append(", contactDetails=").append(String.valueOf(this.contactDetails)); @@ -853,6 +1001,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); + sb.append(", privateAccessDetails=").append(String.valueOf(this.privateAccessDetails)); sb.append(")"); return sb.toString(); } @@ -873,6 +1022,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.maximumSize, other.maximumSize) && java.util.Objects.equals(this.standbySize, other.standbySize) && java.util.Objects.equals(this.shapeName, other.shapeName) + && java.util.Objects.equals(this.shapeConfig, other.shapeConfig) + && java.util.Objects.equals(this.useDedicatedVmHost, other.useDedicatedVmHost) && java.util.Objects.equals(this.isStorageEnabled, other.isStorageEnabled) && java.util.Objects.equals(this.storageSizeInGBs, other.storageSizeInGBs) && java.util.Objects.equals(this.storageBackupPolicyId, other.storageBackupPolicyId) @@ -880,6 +1031,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.availabilityPolicy, other.availabilityPolicy) && java.util.Objects.equals(this.image, other.image) && java.util.Objects.equals(this.networkConfiguration, other.networkConfiguration) + && java.util.Objects.equals( + this.sessionLifecycleActions, other.sessionLifecycleActions) && java.util.Objects.equals(this.timeStartScheduled, other.timeStartScheduled) && java.util.Objects.equals(this.timeStopScheduled, other.timeStopScheduled) && java.util.Objects.equals(this.contactDetails, other.contactDetails) @@ -888,6 +1041,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.nsgIds, other.nsgIds) + && java.util.Objects.equals(this.privateAccessDetails, other.privateAccessDetails) && super.equals(other); } @@ -903,6 +1057,12 @@ public int hashCode() { result = (result * PRIME) + (this.maximumSize == null ? 43 : this.maximumSize.hashCode()); result = (result * PRIME) + (this.standbySize == null ? 43 : this.standbySize.hashCode()); result = (result * PRIME) + (this.shapeName == null ? 43 : this.shapeName.hashCode()); + result = (result * PRIME) + (this.shapeConfig == null ? 43 : this.shapeConfig.hashCode()); + result = + (result * PRIME) + + (this.useDedicatedVmHost == null + ? 43 + : this.useDedicatedVmHost.hashCode()); result = (result * PRIME) + (this.isStorageEnabled == null ? 43 : this.isStorageEnabled.hashCode()); @@ -926,6 +1086,11 @@ public int hashCode() { + (this.networkConfiguration == null ? 43 : this.networkConfiguration.hashCode()); + result = + (result * PRIME) + + (this.sessionLifecycleActions == null + ? 43 + : this.sessionLifecycleActions.hashCode()); result = (result * PRIME) + (this.timeStartScheduled == null @@ -950,6 +1115,11 @@ public int hashCode() { result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); + result = + (result * PRIME) + + (this.privateAccessDetails == null + ? 43 + : this.privateAccessDetails.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/CreateDesktopPoolPrivateAccessDetails.java b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/CreateDesktopPoolPrivateAccessDetails.java new file mode 100644 index 00000000000..6cbe9ce7c8c --- /dev/null +++ b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/CreateDesktopPoolPrivateAccessDetails.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.desktops.model; + +/** + * The details of the desktop's private access network connectivity to be set up for the desktop pool. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220618") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDesktopPoolPrivateAccessDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDesktopPoolPrivateAccessDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"subnetId", "nsgIds", "privateIp"}) + public CreateDesktopPoolPrivateAccessDetails( + String subnetId, java.util.List nsgIds, String privateIp) { + super(); + this.subnetId = subnetId; + this.nsgIds = nsgIds; + this.privateIp = privateIp; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet in the customer VCN where the + * connectivity will be established. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet in the customer VCN where the + * connectivity will be established. + * + * @param subnetId the value to set + * @return this builder + **/ + public Builder subnetId(String subnetId) { + this.subnetId = subnetId; + this.__explicitlySet__.add("subnetId"); + return this; + } + /** + * A list of network security groups for the private access. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private java.util.List nsgIds; + + /** + * A list of network security groups for the private access. + * @param nsgIds the value to set + * @return this builder + **/ + public Builder nsgIds(java.util.List nsgIds) { + this.nsgIds = nsgIds; + this.__explicitlySet__.add("nsgIds"); + return this; + } + /** + * The IPv4 address from the provided OCI subnet which needs to be assigned to the VNIC. If not provided, it will + * be auto-assigned with an available IPv4 address from the subnet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateIp") + private String privateIp; + + /** + * The IPv4 address from the provided OCI subnet which needs to be assigned to the VNIC. If not provided, it will + * be auto-assigned with an available IPv4 address from the subnet. + * + * @param privateIp the value to set + * @return this builder + **/ + public Builder privateIp(String privateIp) { + this.privateIp = privateIp; + this.__explicitlySet__.add("privateIp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDesktopPoolPrivateAccessDetails build() { + CreateDesktopPoolPrivateAccessDetails model = + new CreateDesktopPoolPrivateAccessDetails( + this.subnetId, this.nsgIds, this.privateIp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDesktopPoolPrivateAccessDetails model) { + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + if (model.wasPropertyExplicitlySet("nsgIds")) { + this.nsgIds(model.getNsgIds()); + } + if (model.wasPropertyExplicitlySet("privateIp")) { + this.privateIp(model.getPrivateIp()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet in the customer VCN where the + * connectivity will be established. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet in the customer VCN where the + * connectivity will be established. + * + * @return the value + **/ + public String getSubnetId() { + return subnetId; + } + + /** + * A list of network security groups for the private access. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private final java.util.List nsgIds; + + /** + * A list of network security groups for the private access. + * @return the value + **/ + public java.util.List getNsgIds() { + return nsgIds; + } + + /** + * The IPv4 address from the provided OCI subnet which needs to be assigned to the VNIC. If not provided, it will + * be auto-assigned with an available IPv4 address from the subnet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateIp") + private final String privateIp; + + /** + * The IPv4 address from the provided OCI subnet which needs to be assigned to the VNIC. If not provided, it will + * be auto-assigned with an available IPv4 address from the subnet. + * + * @return the value + **/ + public String getPrivateIp() { + return privateIp; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateDesktopPoolPrivateAccessDetails("); + sb.append("super=").append(super.toString()); + sb.append("subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); + sb.append(", privateIp=").append(String.valueOf(this.privateIp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDesktopPoolPrivateAccessDetails)) { + return false; + } + + CreateDesktopPoolPrivateAccessDetails other = (CreateDesktopPoolPrivateAccessDetails) o; + return java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals(this.nsgIds, other.nsgIds) + && java.util.Objects.equals(this.privateIp, other.privateIp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); + result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); + result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/CreateDesktopPoolShapeConfigDetails.java b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/CreateDesktopPoolShapeConfigDetails.java new file mode 100644 index 00000000000..a8fc83dfc58 --- /dev/null +++ b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/CreateDesktopPoolShapeConfigDetails.java @@ -0,0 +1,308 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.desktops.model; + +/** + * The compute instance shape configuration requested for each desktop in the desktop pool. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220618") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDesktopPoolShapeConfigDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDesktopPoolShapeConfigDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"ocpus", "memoryInGBs", "baselineOcpuUtilization"}) + public CreateDesktopPoolShapeConfigDetails( + Long ocpus, Long memoryInGBs, BaselineOcpuUtilization baselineOcpuUtilization) { + super(); + this.ocpus = ocpus; + this.memoryInGBs = memoryInGBs; + this.baselineOcpuUtilization = baselineOcpuUtilization; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The total number of OCPUs available for each desktop compute instance in the desktop pool. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ocpus") + private Long ocpus; + + /** + * The total number of OCPUs available for each desktop compute instance in the desktop pool. + * + * @param ocpus the value to set + * @return this builder + **/ + public Builder ocpus(Long ocpus) { + this.ocpus = ocpus; + this.__explicitlySet__.add("ocpus"); + return this; + } + /** + * The total amount of memory available in gigabytes for each desktop compute instance in the desktop pool. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memoryInGBs") + private Long memoryInGBs; + + /** + * The total amount of memory available in gigabytes for each desktop compute instance in the desktop pool. + * + * @param memoryInGBs the value to set + * @return this builder + **/ + public Builder memoryInGBs(Long memoryInGBs) { + this.memoryInGBs = memoryInGBs; + this.__explicitlySet__.add("memoryInGBs"); + return this; + } + /** + * The baseline OCPU utilization for a subcore burstable VM instance used for each desktop compute instance in + * the desktop pool. + * Leave this attribute blank for a non-burstable instance, or explicitly specify non-burstable with + * {@code BASELINE_1_1}. + * + * The following values are supported: + * - {@code BASELINE_1_8} - baseline usage is 1/8 of an OCPU. + * - {@code BASELINE_1_2} - baseline usage is 1/2 of an OCPU. + * - {@code BASELINE_1_1} - baseline usage is the entire OCPU. This represents a non-burstable instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("baselineOcpuUtilization") + private BaselineOcpuUtilization baselineOcpuUtilization; + + /** + * The baseline OCPU utilization for a subcore burstable VM instance used for each desktop compute instance in + * the desktop pool. + * Leave this attribute blank for a non-burstable instance, or explicitly specify non-burstable with + * {@code BASELINE_1_1}. + * + * The following values are supported: + * - {@code BASELINE_1_8} - baseline usage is 1/8 of an OCPU. + * - {@code BASELINE_1_2} - baseline usage is 1/2 of an OCPU. + * - {@code BASELINE_1_1} - baseline usage is the entire OCPU. This represents a non-burstable instance. + * + * @param baselineOcpuUtilization the value to set + * @return this builder + **/ + public Builder baselineOcpuUtilization(BaselineOcpuUtilization baselineOcpuUtilization) { + this.baselineOcpuUtilization = baselineOcpuUtilization; + this.__explicitlySet__.add("baselineOcpuUtilization"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDesktopPoolShapeConfigDetails build() { + CreateDesktopPoolShapeConfigDetails model = + new CreateDesktopPoolShapeConfigDetails( + this.ocpus, this.memoryInGBs, this.baselineOcpuUtilization); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDesktopPoolShapeConfigDetails model) { + if (model.wasPropertyExplicitlySet("ocpus")) { + this.ocpus(model.getOcpus()); + } + if (model.wasPropertyExplicitlySet("memoryInGBs")) { + this.memoryInGBs(model.getMemoryInGBs()); + } + if (model.wasPropertyExplicitlySet("baselineOcpuUtilization")) { + this.baselineOcpuUtilization(model.getBaselineOcpuUtilization()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The total number of OCPUs available for each desktop compute instance in the desktop pool. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ocpus") + private final Long ocpus; + + /** + * The total number of OCPUs available for each desktop compute instance in the desktop pool. + * + * @return the value + **/ + public Long getOcpus() { + return ocpus; + } + + /** + * The total amount of memory available in gigabytes for each desktop compute instance in the desktop pool. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memoryInGBs") + private final Long memoryInGBs; + + /** + * The total amount of memory available in gigabytes for each desktop compute instance in the desktop pool. + * + * @return the value + **/ + public Long getMemoryInGBs() { + return memoryInGBs; + } + + /** + * The baseline OCPU utilization for a subcore burstable VM instance used for each desktop compute instance in + * the desktop pool. + * Leave this attribute blank for a non-burstable instance, or explicitly specify non-burstable with + * {@code BASELINE_1_1}. + * + * The following values are supported: + * - {@code BASELINE_1_8} - baseline usage is 1/8 of an OCPU. + * - {@code BASELINE_1_2} - baseline usage is 1/2 of an OCPU. + * - {@code BASELINE_1_1} - baseline usage is the entire OCPU. This represents a non-burstable instance. + * + **/ + public enum BaselineOcpuUtilization { + Baseline18("BASELINE_1_8"), + Baseline12("BASELINE_1_2"), + Baseline11("BASELINE_1_1"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (BaselineOcpuUtilization v : BaselineOcpuUtilization.values()) { + map.put(v.getValue(), v); + } + } + + BaselineOcpuUtilization(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static BaselineOcpuUtilization create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid BaselineOcpuUtilization: " + key); + } + }; + /** + * The baseline OCPU utilization for a subcore burstable VM instance used for each desktop compute instance in + * the desktop pool. + * Leave this attribute blank for a non-burstable instance, or explicitly specify non-burstable with + * {@code BASELINE_1_1}. + * + * The following values are supported: + * - {@code BASELINE_1_8} - baseline usage is 1/8 of an OCPU. + * - {@code BASELINE_1_2} - baseline usage is 1/2 of an OCPU. + * - {@code BASELINE_1_1} - baseline usage is the entire OCPU. This represents a non-burstable instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("baselineOcpuUtilization") + private final BaselineOcpuUtilization baselineOcpuUtilization; + + /** + * The baseline OCPU utilization for a subcore burstable VM instance used for each desktop compute instance in + * the desktop pool. + * Leave this attribute blank for a non-burstable instance, or explicitly specify non-burstable with + * {@code BASELINE_1_1}. + * + * The following values are supported: + * - {@code BASELINE_1_8} - baseline usage is 1/8 of an OCPU. + * - {@code BASELINE_1_2} - baseline usage is 1/2 of an OCPU. + * - {@code BASELINE_1_1} - baseline usage is the entire OCPU. This represents a non-burstable instance. + * + * @return the value + **/ + public BaselineOcpuUtilization getBaselineOcpuUtilization() { + return baselineOcpuUtilization; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateDesktopPoolShapeConfigDetails("); + sb.append("super=").append(super.toString()); + sb.append("ocpus=").append(String.valueOf(this.ocpus)); + sb.append(", memoryInGBs=").append(String.valueOf(this.memoryInGBs)); + sb.append(", baselineOcpuUtilization=") + .append(String.valueOf(this.baselineOcpuUtilization)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDesktopPoolShapeConfigDetails)) { + return false; + } + + CreateDesktopPoolShapeConfigDetails other = (CreateDesktopPoolShapeConfigDetails) o; + return java.util.Objects.equals(this.ocpus, other.ocpus) + && java.util.Objects.equals(this.memoryInGBs, other.memoryInGBs) + && java.util.Objects.equals( + this.baselineOcpuUtilization, other.baselineOcpuUtilization) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.ocpus == null ? 43 : this.ocpus.hashCode()); + result = (result * PRIME) + (this.memoryInGBs == null ? 43 : this.memoryInGBs.hashCode()); + result = + (result * PRIME) + + (this.baselineOcpuUtilization == null + ? 43 + : this.baselineOcpuUtilization.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopImage.java b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopImage.java index adcc3315173..497bea90bfe 100644 --- a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopImage.java +++ b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopImage.java @@ -19,11 +19,12 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class DesktopImage extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"imageId", "imageName"}) - public DesktopImage(String imageId, String imageName) { + @java.beans.ConstructorProperties({"imageId", "imageName", "operatingSystem"}) + public DesktopImage(String imageId, String imageName, String operatingSystem) { super(); this.imageId = imageId; this.imageName = imageName; + this.operatingSystem = operatingSystem; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -60,12 +61,29 @@ public Builder imageName(String imageName) { this.__explicitlySet__.add("imageName"); return this; } + /** + * The operating system of the desktop image, e.g. "Oracle Linux", "Windows". + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operatingSystem") + private String operatingSystem; + + /** + * The operating system of the desktop image, e.g. "Oracle Linux", "Windows". + * @param operatingSystem the value to set + * @return this builder + **/ + public Builder operatingSystem(String operatingSystem) { + this.operatingSystem = operatingSystem; + this.__explicitlySet__.add("operatingSystem"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public DesktopImage build() { - DesktopImage model = new DesktopImage(this.imageId, this.imageName); + DesktopImage model = + new DesktopImage(this.imageId, this.imageName, this.operatingSystem); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -80,6 +98,9 @@ public Builder copy(DesktopImage model) { if (model.wasPropertyExplicitlySet("imageName")) { this.imageName(model.getImageName()); } + if (model.wasPropertyExplicitlySet("operatingSystem")) { + this.operatingSystem(model.getOperatingSystem()); + } return this; } } @@ -123,6 +144,20 @@ public String getImageName() { return imageName; } + /** + * The operating system of the desktop image, e.g. "Oracle Linux", "Windows". + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operatingSystem") + private final String operatingSystem; + + /** + * The operating system of the desktop image, e.g. "Oracle Linux", "Windows". + * @return the value + **/ + public String getOperatingSystem() { + return operatingSystem; + } + @Override public String toString() { return this.toString(true); @@ -139,6 +174,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("imageId=").append(String.valueOf(this.imageId)); sb.append(", imageName=").append(String.valueOf(this.imageName)); + sb.append(", operatingSystem=").append(String.valueOf(this.operatingSystem)); sb.append(")"); return sb.toString(); } @@ -155,6 +191,7 @@ public boolean equals(Object o) { DesktopImage other = (DesktopImage) o; return java.util.Objects.equals(this.imageId, other.imageId) && java.util.Objects.equals(this.imageName, other.imageName) + && java.util.Objects.equals(this.operatingSystem, other.operatingSystem) && super.equals(other); } @@ -164,6 +201,9 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.imageId == null ? 43 : this.imageId.hashCode()); result = (result * PRIME) + (this.imageName == null ? 43 : this.imageName.hashCode()); + result = + (result * PRIME) + + (this.operatingSystem == null ? 43 : this.operatingSystem.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopNetworkConfiguration.java b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopNetworkConfiguration.java index e7b9d2b520f..7e17313d293 100644 --- a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopNetworkConfiguration.java +++ b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopNetworkConfiguration.java @@ -32,13 +32,15 @@ public DesktopNetworkConfiguration(String vcnId, String subnetId) { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The OCID of the VCN used by the desktop pool. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer VCN. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("vcnId") private String vcnId; /** - * The OCID of the VCN used by the desktop pool. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer VCN. + * * @param vcnId the value to set * @return this builder **/ @@ -48,13 +50,17 @@ public Builder vcnId(String vcnId) { return this; } /** - * The OCID of the subnet to use for the desktop pool. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet in the customer VCN where the + * connectivity will be established. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("subnetId") private String subnetId; /** - * The OCID of the subnet to use for the desktop pool. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet in the customer VCN where the + * connectivity will be established. + * * @param subnetId the value to set * @return this builder **/ @@ -100,13 +106,15 @@ public Builder toBuilder() { } /** - * The OCID of the VCN used by the desktop pool. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer VCN. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("vcnId") private final String vcnId; /** - * The OCID of the VCN used by the desktop pool. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer VCN. + * * @return the value **/ public String getVcnId() { @@ -114,13 +122,17 @@ public String getVcnId() { } /** - * The OCID of the subnet to use for the desktop pool. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet in the customer VCN where the + * connectivity will be established. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("subnetId") private final String subnetId; /** - * The OCID of the subnet to use for the desktop pool. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet in the customer VCN where the + * connectivity will be established. + * * @return the value **/ public String getSubnetId() { diff --git a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopPool.java b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopPool.java index c4231b137a4..ec6ac5ea179 100644 --- a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopPool.java +++ b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopPool.java @@ -29,6 +29,8 @@ public final class DesktopPool extends com.oracle.bmc.http.internal.ExplicitlySe "maximumSize", "standbySize", "shapeName", + "shapeConfig", + "useDedicatedVmHost", "isStorageEnabled", "storageSizeInGBs", "storageBackupPolicyId", @@ -36,6 +38,7 @@ public final class DesktopPool extends com.oracle.bmc.http.internal.ExplicitlySe "availabilityPolicy", "image", "networkConfiguration", + "sessionLifecycleActions", "timeStartScheduled", "timeStopScheduled", "contactDetails", @@ -43,7 +46,8 @@ public final class DesktopPool extends com.oracle.bmc.http.internal.ExplicitlySe "availabilityDomain", "freeformTags", "definedTags", - "nsgIds" + "nsgIds", + "privateAccessDetails" }) public DesktopPool( String id, @@ -55,6 +59,8 @@ public DesktopPool( Integer maximumSize, Integer standbySize, String shapeName, + DesktopPoolShapeConfig shapeConfig, + UseDedicatedVmHost useDedicatedVmHost, Boolean isStorageEnabled, Integer storageSizeInGBs, String storageBackupPolicyId, @@ -62,6 +68,7 @@ public DesktopPool( DesktopAvailabilityPolicy availabilityPolicy, DesktopImage image, DesktopNetworkConfiguration networkConfiguration, + DesktopSessionLifecycleActions sessionLifecycleActions, java.util.Date timeStartScheduled, java.util.Date timeStopScheduled, String contactDetails, @@ -69,7 +76,8 @@ public DesktopPool( String availabilityDomain, java.util.Map freeformTags, java.util.Map> definedTags, - java.util.List nsgIds) { + java.util.List nsgIds, + DesktopPoolPrivateAccessDetails privateAccessDetails) { super(); this.id = id; this.compartmentId = compartmentId; @@ -80,6 +88,8 @@ public DesktopPool( this.maximumSize = maximumSize; this.standbySize = standbySize; this.shapeName = shapeName; + this.shapeConfig = shapeConfig; + this.useDedicatedVmHost = useDedicatedVmHost; this.isStorageEnabled = isStorageEnabled; this.storageSizeInGBs = storageSizeInGBs; this.storageBackupPolicyId = storageBackupPolicyId; @@ -87,6 +97,7 @@ public DesktopPool( this.availabilityPolicy = availabilityPolicy; this.image = image; this.networkConfiguration = networkConfiguration; + this.sessionLifecycleActions = sessionLifecycleActions; this.timeStartScheduled = timeStartScheduled; this.timeStopScheduled = timeStopScheduled; this.contactDetails = contactDetails; @@ -95,6 +106,7 @@ public DesktopPool( this.freeformTags = freeformTags; this.definedTags = definedTags; this.nsgIds = nsgIds; + this.privateAccessDetails = privateAccessDetails; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -247,6 +259,31 @@ public Builder shapeName(String shapeName) { this.__explicitlySet__.add("shapeName"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("shapeConfig") + private DesktopPoolShapeConfig shapeConfig; + + public Builder shapeConfig(DesktopPoolShapeConfig shapeConfig) { + this.shapeConfig = shapeConfig; + this.__explicitlySet__.add("shapeConfig"); + return this; + } + /** + * Indicates whether the desktop pool uses dedicated virtual machine hosts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("useDedicatedVmHost") + private UseDedicatedVmHost useDedicatedVmHost; + + /** + * Indicates whether the desktop pool uses dedicated virtual machine hosts. + * @param useDedicatedVmHost the value to set + * @return this builder + **/ + public Builder useDedicatedVmHost(UseDedicatedVmHost useDedicatedVmHost) { + this.useDedicatedVmHost = useDedicatedVmHost; + this.__explicitlySet__.add("useDedicatedVmHost"); + return this; + } /** * Indicates whether storage is enabled for the desktop pool. **/ @@ -331,6 +368,16 @@ public Builder networkConfiguration(DesktopNetworkConfiguration networkConfigura this.__explicitlySet__.add("networkConfiguration"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("sessionLifecycleActions") + private DesktopSessionLifecycleActions sessionLifecycleActions; + + public Builder sessionLifecycleActions( + DesktopSessionLifecycleActions sessionLifecycleActions) { + this.sessionLifecycleActions = sessionLifecycleActions; + this.__explicitlySet__.add("sessionLifecycleActions"); + return this; + } /** * The start time of the desktop pool. **/ @@ -459,13 +506,13 @@ public Builder definedTags( return this; } /** - * A list of network security groups for the desktop pool. + * A list of network security groups for the network. **/ @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") private java.util.List nsgIds; /** - * A list of network security groups for the desktop pool. + * A list of network security groups for the network. * @param nsgIds the value to set * @return this builder **/ @@ -475,6 +522,15 @@ public Builder nsgIds(java.util.List nsgIds) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("privateAccessDetails") + private DesktopPoolPrivateAccessDetails privateAccessDetails; + + public Builder privateAccessDetails(DesktopPoolPrivateAccessDetails privateAccessDetails) { + this.privateAccessDetails = privateAccessDetails; + this.__explicitlySet__.add("privateAccessDetails"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -490,6 +546,8 @@ public DesktopPool build() { this.maximumSize, this.standbySize, this.shapeName, + this.shapeConfig, + this.useDedicatedVmHost, this.isStorageEnabled, this.storageSizeInGBs, this.storageBackupPolicyId, @@ -497,6 +555,7 @@ public DesktopPool build() { this.availabilityPolicy, this.image, this.networkConfiguration, + this.sessionLifecycleActions, this.timeStartScheduled, this.timeStopScheduled, this.contactDetails, @@ -504,7 +563,8 @@ public DesktopPool build() { this.availabilityDomain, this.freeformTags, this.definedTags, - this.nsgIds); + this.nsgIds, + this.privateAccessDetails); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -540,6 +600,12 @@ public Builder copy(DesktopPool model) { if (model.wasPropertyExplicitlySet("shapeName")) { this.shapeName(model.getShapeName()); } + if (model.wasPropertyExplicitlySet("shapeConfig")) { + this.shapeConfig(model.getShapeConfig()); + } + if (model.wasPropertyExplicitlySet("useDedicatedVmHost")) { + this.useDedicatedVmHost(model.getUseDedicatedVmHost()); + } if (model.wasPropertyExplicitlySet("isStorageEnabled")) { this.isStorageEnabled(model.getIsStorageEnabled()); } @@ -561,6 +627,9 @@ public Builder copy(DesktopPool model) { if (model.wasPropertyExplicitlySet("networkConfiguration")) { this.networkConfiguration(model.getNetworkConfiguration()); } + if (model.wasPropertyExplicitlySet("sessionLifecycleActions")) { + this.sessionLifecycleActions(model.getSessionLifecycleActions()); + } if (model.wasPropertyExplicitlySet("timeStartScheduled")) { this.timeStartScheduled(model.getTimeStartScheduled()); } @@ -585,6 +654,9 @@ public Builder copy(DesktopPool model) { if (model.wasPropertyExplicitlySet("nsgIds")) { this.nsgIds(model.getNsgIds()); } + if (model.wasPropertyExplicitlySet("privateAccessDetails")) { + this.privateAccessDetails(model.getPrivateAccessDetails()); + } return this; } } @@ -730,6 +802,76 @@ public String getShapeName() { return shapeName; } + @com.fasterxml.jackson.annotation.JsonProperty("shapeConfig") + private final DesktopPoolShapeConfig shapeConfig; + + public DesktopPoolShapeConfig getShapeConfig() { + return shapeConfig; + } + + /** + * Indicates whether the desktop pool uses dedicated virtual machine hosts. + **/ + public enum UseDedicatedVmHost { + True("TRUE"), + False("FALSE"), + Auto("AUTO"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UseDedicatedVmHost.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (UseDedicatedVmHost v : UseDedicatedVmHost.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + UseDedicatedVmHost(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static UseDedicatedVmHost create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'UseDedicatedVmHost', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Indicates whether the desktop pool uses dedicated virtual machine hosts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("useDedicatedVmHost") + private final UseDedicatedVmHost useDedicatedVmHost; + + /** + * Indicates whether the desktop pool uses dedicated virtual machine hosts. + * @return the value + **/ + public UseDedicatedVmHost getUseDedicatedVmHost() { + return useDedicatedVmHost; + } + /** * Indicates whether storage is enabled for the desktop pool. **/ @@ -800,6 +942,13 @@ public DesktopNetworkConfiguration getNetworkConfiguration() { return networkConfiguration; } + @com.fasterxml.jackson.annotation.JsonProperty("sessionLifecycleActions") + private final DesktopSessionLifecycleActions sessionLifecycleActions; + + public DesktopSessionLifecycleActions getSessionLifecycleActions() { + return sessionLifecycleActions; + } + /** * The start time of the desktop pool. **/ @@ -913,19 +1062,26 @@ public java.util.Map> getDefinedTags() { } /** - * A list of network security groups for the desktop pool. + * A list of network security groups for the network. **/ @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") private final java.util.List nsgIds; /** - * A list of network security groups for the desktop pool. + * A list of network security groups for the network. * @return the value **/ public java.util.List getNsgIds() { return nsgIds; } + @com.fasterxml.jackson.annotation.JsonProperty("privateAccessDetails") + private final DesktopPoolPrivateAccessDetails privateAccessDetails; + + public DesktopPoolPrivateAccessDetails getPrivateAccessDetails() { + return privateAccessDetails; + } + @Override public String toString() { return this.toString(true); @@ -949,6 +1105,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", maximumSize=").append(String.valueOf(this.maximumSize)); sb.append(", standbySize=").append(String.valueOf(this.standbySize)); sb.append(", shapeName=").append(String.valueOf(this.shapeName)); + sb.append(", shapeConfig=").append(String.valueOf(this.shapeConfig)); + sb.append(", useDedicatedVmHost=").append(String.valueOf(this.useDedicatedVmHost)); sb.append(", isStorageEnabled=").append(String.valueOf(this.isStorageEnabled)); sb.append(", storageSizeInGBs=").append(String.valueOf(this.storageSizeInGBs)); sb.append(", storageBackupPolicyId=").append(String.valueOf(this.storageBackupPolicyId)); @@ -956,6 +1114,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", availabilityPolicy=").append(String.valueOf(this.availabilityPolicy)); sb.append(", image=").append(String.valueOf(this.image)); sb.append(", networkConfiguration=").append(String.valueOf(this.networkConfiguration)); + sb.append(", sessionLifecycleActions=") + .append(String.valueOf(this.sessionLifecycleActions)); sb.append(", timeStartScheduled=").append(String.valueOf(this.timeStartScheduled)); sb.append(", timeStopScheduled=").append(String.valueOf(this.timeStopScheduled)); sb.append(", contactDetails=").append(String.valueOf(this.contactDetails)); @@ -964,6 +1124,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); + sb.append(", privateAccessDetails=").append(String.valueOf(this.privateAccessDetails)); sb.append(")"); return sb.toString(); } @@ -987,6 +1148,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.maximumSize, other.maximumSize) && java.util.Objects.equals(this.standbySize, other.standbySize) && java.util.Objects.equals(this.shapeName, other.shapeName) + && java.util.Objects.equals(this.shapeConfig, other.shapeConfig) + && java.util.Objects.equals(this.useDedicatedVmHost, other.useDedicatedVmHost) && java.util.Objects.equals(this.isStorageEnabled, other.isStorageEnabled) && java.util.Objects.equals(this.storageSizeInGBs, other.storageSizeInGBs) && java.util.Objects.equals(this.storageBackupPolicyId, other.storageBackupPolicyId) @@ -994,6 +1157,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.availabilityPolicy, other.availabilityPolicy) && java.util.Objects.equals(this.image, other.image) && java.util.Objects.equals(this.networkConfiguration, other.networkConfiguration) + && java.util.Objects.equals( + this.sessionLifecycleActions, other.sessionLifecycleActions) && java.util.Objects.equals(this.timeStartScheduled, other.timeStartScheduled) && java.util.Objects.equals(this.timeStopScheduled, other.timeStopScheduled) && java.util.Objects.equals(this.contactDetails, other.contactDetails) @@ -1002,6 +1167,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.nsgIds, other.nsgIds) + && java.util.Objects.equals(this.privateAccessDetails, other.privateAccessDetails) && super.equals(other); } @@ -1022,6 +1188,12 @@ public int hashCode() { result = (result * PRIME) + (this.maximumSize == null ? 43 : this.maximumSize.hashCode()); result = (result * PRIME) + (this.standbySize == null ? 43 : this.standbySize.hashCode()); result = (result * PRIME) + (this.shapeName == null ? 43 : this.shapeName.hashCode()); + result = (result * PRIME) + (this.shapeConfig == null ? 43 : this.shapeConfig.hashCode()); + result = + (result * PRIME) + + (this.useDedicatedVmHost == null + ? 43 + : this.useDedicatedVmHost.hashCode()); result = (result * PRIME) + (this.isStorageEnabled == null ? 43 : this.isStorageEnabled.hashCode()); @@ -1045,6 +1217,11 @@ public int hashCode() { + (this.networkConfiguration == null ? 43 : this.networkConfiguration.hashCode()); + result = + (result * PRIME) + + (this.sessionLifecycleActions == null + ? 43 + : this.sessionLifecycleActions.hashCode()); result = (result * PRIME) + (this.timeStartScheduled == null @@ -1069,6 +1246,11 @@ public int hashCode() { result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); + result = + (result * PRIME) + + (this.privateAccessDetails == null + ? 43 + : this.privateAccessDetails.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopPoolPrivateAccessDetails.java b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopPoolPrivateAccessDetails.java new file mode 100644 index 00000000000..9e3d4e68054 --- /dev/null +++ b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopPoolPrivateAccessDetails.java @@ -0,0 +1,328 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.desktops.model; + +/** + * The details of the desktop's private access network connectivity that were used to create the pool. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220618") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DesktopPoolPrivateAccessDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DesktopPoolPrivateAccessDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"vcnId", "endpointFqdn", "subnetId", "nsgIds", "privateIp"}) + public DesktopPoolPrivateAccessDetails( + String vcnId, + String endpointFqdn, + String subnetId, + java.util.List nsgIds, + String privateIp) { + super(); + this.vcnId = vcnId; + this.endpointFqdn = endpointFqdn; + this.subnetId = subnetId; + this.nsgIds = nsgIds; + this.privateIp = privateIp; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer VCN. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnId") + private String vcnId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer VCN. + * + * @param vcnId the value to set + * @return this builder + **/ + public Builder vcnId(String vcnId) { + this.vcnId = vcnId; + this.__explicitlySet__.add("vcnId"); + return this; + } + /** + * The three-label FQDN to use for the private endpoint. The customer VCN's DNS records are + * updated with this FQDN. This enables the customer to use the FQDN instead of the private endpoint's + * private IP address to access the service (for example,\u00A0xyz.oraclecloud.com). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("endpointFqdn") + private String endpointFqdn; + + /** + * The three-label FQDN to use for the private endpoint. The customer VCN's DNS records are + * updated with this FQDN. This enables the customer to use the FQDN instead of the private endpoint's + * private IP address to access the service (for example,\u00A0xyz.oraclecloud.com). + * + * @param endpointFqdn the value to set + * @return this builder + **/ + public Builder endpointFqdn(String endpointFqdn) { + this.endpointFqdn = endpointFqdn; + this.__explicitlySet__.add("endpointFqdn"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet in the customer VCN where the + * connectivity will be established. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet in the customer VCN where the + * connectivity will be established. + * + * @param subnetId the value to set + * @return this builder + **/ + public Builder subnetId(String subnetId) { + this.subnetId = subnetId; + this.__explicitlySet__.add("subnetId"); + return this; + } + /** + * A list of network security groups for the private access. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private java.util.List nsgIds; + + /** + * A list of network security groups for the private access. + * @param nsgIds the value to set + * @return this builder + **/ + public Builder nsgIds(java.util.List nsgIds) { + this.nsgIds = nsgIds; + this.__explicitlySet__.add("nsgIds"); + return this; + } + /** + * The IPv4 address from the provided OCI subnet which needs to be assigned to the VNIC. If not provided, it will + * be auto-assigned with an available IPv4 address from the subnet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateIp") + private String privateIp; + + /** + * The IPv4 address from the provided OCI subnet which needs to be assigned to the VNIC. If not provided, it will + * be auto-assigned with an available IPv4 address from the subnet. + * + * @param privateIp the value to set + * @return this builder + **/ + public Builder privateIp(String privateIp) { + this.privateIp = privateIp; + this.__explicitlySet__.add("privateIp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DesktopPoolPrivateAccessDetails build() { + DesktopPoolPrivateAccessDetails model = + new DesktopPoolPrivateAccessDetails( + this.vcnId, + this.endpointFqdn, + this.subnetId, + this.nsgIds, + this.privateIp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DesktopPoolPrivateAccessDetails model) { + if (model.wasPropertyExplicitlySet("vcnId")) { + this.vcnId(model.getVcnId()); + } + if (model.wasPropertyExplicitlySet("endpointFqdn")) { + this.endpointFqdn(model.getEndpointFqdn()); + } + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + if (model.wasPropertyExplicitlySet("nsgIds")) { + this.nsgIds(model.getNsgIds()); + } + if (model.wasPropertyExplicitlySet("privateIp")) { + this.privateIp(model.getPrivateIp()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer VCN. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnId") + private final String vcnId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer VCN. + * + * @return the value + **/ + public String getVcnId() { + return vcnId; + } + + /** + * The three-label FQDN to use for the private endpoint. The customer VCN's DNS records are + * updated with this FQDN. This enables the customer to use the FQDN instead of the private endpoint's + * private IP address to access the service (for example,\u00A0xyz.oraclecloud.com). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("endpointFqdn") + private final String endpointFqdn; + + /** + * The three-label FQDN to use for the private endpoint. The customer VCN's DNS records are + * updated with this FQDN. This enables the customer to use the FQDN instead of the private endpoint's + * private IP address to access the service (for example,\u00A0xyz.oraclecloud.com). + * + * @return the value + **/ + public String getEndpointFqdn() { + return endpointFqdn; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet in the customer VCN where the + * connectivity will be established. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet in the customer VCN where the + * connectivity will be established. + * + * @return the value + **/ + public String getSubnetId() { + return subnetId; + } + + /** + * A list of network security groups for the private access. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private final java.util.List nsgIds; + + /** + * A list of network security groups for the private access. + * @return the value + **/ + public java.util.List getNsgIds() { + return nsgIds; + } + + /** + * The IPv4 address from the provided OCI subnet which needs to be assigned to the VNIC. If not provided, it will + * be auto-assigned with an available IPv4 address from the subnet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateIp") + private final String privateIp; + + /** + * The IPv4 address from the provided OCI subnet which needs to be assigned to the VNIC. If not provided, it will + * be auto-assigned with an available IPv4 address from the subnet. + * + * @return the value + **/ + public String getPrivateIp() { + return privateIp; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DesktopPoolPrivateAccessDetails("); + sb.append("super=").append(super.toString()); + sb.append("vcnId=").append(String.valueOf(this.vcnId)); + sb.append(", endpointFqdn=").append(String.valueOf(this.endpointFqdn)); + sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); + sb.append(", privateIp=").append(String.valueOf(this.privateIp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DesktopPoolPrivateAccessDetails)) { + return false; + } + + DesktopPoolPrivateAccessDetails other = (DesktopPoolPrivateAccessDetails) o; + return java.util.Objects.equals(this.vcnId, other.vcnId) + && java.util.Objects.equals(this.endpointFqdn, other.endpointFqdn) + && java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals(this.nsgIds, other.nsgIds) + && java.util.Objects.equals(this.privateIp, other.privateIp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.vcnId == null ? 43 : this.vcnId.hashCode()); + result = (result * PRIME) + (this.endpointFqdn == null ? 43 : this.endpointFqdn.hashCode()); + result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); + result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); + result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopPoolShapeConfig.java b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopPoolShapeConfig.java new file mode 100644 index 00000000000..716bea11bb9 --- /dev/null +++ b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopPoolShapeConfig.java @@ -0,0 +1,322 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.desktops.model; + +/** + * The shape configuration used for each desktop compute instance in the desktop pool. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220618") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DesktopPoolShapeConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DesktopPoolShapeConfig + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"ocpus", "memoryInGBs", "baselineOcpuUtilization"}) + public DesktopPoolShapeConfig( + Long ocpus, Long memoryInGBs, BaselineOcpuUtilization baselineOcpuUtilization) { + super(); + this.ocpus = ocpus; + this.memoryInGBs = memoryInGBs; + this.baselineOcpuUtilization = baselineOcpuUtilization; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The total number of OCPUs available for each desktop compute instance in the desktop pool. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ocpus") + private Long ocpus; + + /** + * The total number of OCPUs available for each desktop compute instance in the desktop pool. + * + * @param ocpus the value to set + * @return this builder + **/ + public Builder ocpus(Long ocpus) { + this.ocpus = ocpus; + this.__explicitlySet__.add("ocpus"); + return this; + } + /** + * The total amount of memory available in gigabytes for each desktop compute instance in the desktop pool. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memoryInGBs") + private Long memoryInGBs; + + /** + * The total amount of memory available in gigabytes for each desktop compute instance in the desktop pool. + * + * @param memoryInGBs the value to set + * @return this builder + **/ + public Builder memoryInGBs(Long memoryInGBs) { + this.memoryInGBs = memoryInGBs; + this.__explicitlySet__.add("memoryInGBs"); + return this; + } + /** + * The baseline OCPU utilization for a subcore burstable VM instance used for each desktop compute instance in + * the desktop pool. + * Leave this attribute blank for a non-burstable instance, or explicitly specify non-burstable with + * {@code BASELINE_1_1}. + * + * The following values are supported: + * - {@code BASELINE_1_8} - baseline usage is 1/8 of an OCPU. + * - {@code BASELINE_1_2} - baseline usage is 1/2 of an OCPU. + * - {@code BASELINE_1_1} - baseline usage is the entire OCPU. This represents a non-burstable instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("baselineOcpuUtilization") + private BaselineOcpuUtilization baselineOcpuUtilization; + + /** + * The baseline OCPU utilization for a subcore burstable VM instance used for each desktop compute instance in + * the desktop pool. + * Leave this attribute blank for a non-burstable instance, or explicitly specify non-burstable with + * {@code BASELINE_1_1}. + * + * The following values are supported: + * - {@code BASELINE_1_8} - baseline usage is 1/8 of an OCPU. + * - {@code BASELINE_1_2} - baseline usage is 1/2 of an OCPU. + * - {@code BASELINE_1_1} - baseline usage is the entire OCPU. This represents a non-burstable instance. + * + * @param baselineOcpuUtilization the value to set + * @return this builder + **/ + public Builder baselineOcpuUtilization(BaselineOcpuUtilization baselineOcpuUtilization) { + this.baselineOcpuUtilization = baselineOcpuUtilization; + this.__explicitlySet__.add("baselineOcpuUtilization"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DesktopPoolShapeConfig build() { + DesktopPoolShapeConfig model = + new DesktopPoolShapeConfig( + this.ocpus, this.memoryInGBs, this.baselineOcpuUtilization); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DesktopPoolShapeConfig model) { + if (model.wasPropertyExplicitlySet("ocpus")) { + this.ocpus(model.getOcpus()); + } + if (model.wasPropertyExplicitlySet("memoryInGBs")) { + this.memoryInGBs(model.getMemoryInGBs()); + } + if (model.wasPropertyExplicitlySet("baselineOcpuUtilization")) { + this.baselineOcpuUtilization(model.getBaselineOcpuUtilization()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The total number of OCPUs available for each desktop compute instance in the desktop pool. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ocpus") + private final Long ocpus; + + /** + * The total number of OCPUs available for each desktop compute instance in the desktop pool. + * + * @return the value + **/ + public Long getOcpus() { + return ocpus; + } + + /** + * The total amount of memory available in gigabytes for each desktop compute instance in the desktop pool. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memoryInGBs") + private final Long memoryInGBs; + + /** + * The total amount of memory available in gigabytes for each desktop compute instance in the desktop pool. + * + * @return the value + **/ + public Long getMemoryInGBs() { + return memoryInGBs; + } + + /** + * The baseline OCPU utilization for a subcore burstable VM instance used for each desktop compute instance in + * the desktop pool. + * Leave this attribute blank for a non-burstable instance, or explicitly specify non-burstable with + * {@code BASELINE_1_1}. + * + * The following values are supported: + * - {@code BASELINE_1_8} - baseline usage is 1/8 of an OCPU. + * - {@code BASELINE_1_2} - baseline usage is 1/2 of an OCPU. + * - {@code BASELINE_1_1} - baseline usage is the entire OCPU. This represents a non-burstable instance. + * + **/ + public enum BaselineOcpuUtilization { + Baseline18("BASELINE_1_8"), + Baseline12("BASELINE_1_2"), + Baseline11("BASELINE_1_1"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(BaselineOcpuUtilization.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (BaselineOcpuUtilization v : BaselineOcpuUtilization.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + BaselineOcpuUtilization(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static BaselineOcpuUtilization create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'BaselineOcpuUtilization', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The baseline OCPU utilization for a subcore burstable VM instance used for each desktop compute instance in + * the desktop pool. + * Leave this attribute blank for a non-burstable instance, or explicitly specify non-burstable with + * {@code BASELINE_1_1}. + * + * The following values are supported: + * - {@code BASELINE_1_8} - baseline usage is 1/8 of an OCPU. + * - {@code BASELINE_1_2} - baseline usage is 1/2 of an OCPU. + * - {@code BASELINE_1_1} - baseline usage is the entire OCPU. This represents a non-burstable instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("baselineOcpuUtilization") + private final BaselineOcpuUtilization baselineOcpuUtilization; + + /** + * The baseline OCPU utilization for a subcore burstable VM instance used for each desktop compute instance in + * the desktop pool. + * Leave this attribute blank for a non-burstable instance, or explicitly specify non-burstable with + * {@code BASELINE_1_1}. + * + * The following values are supported: + * - {@code BASELINE_1_8} - baseline usage is 1/8 of an OCPU. + * - {@code BASELINE_1_2} - baseline usage is 1/2 of an OCPU. + * - {@code BASELINE_1_1} - baseline usage is the entire OCPU. This represents a non-burstable instance. + * + * @return the value + **/ + public BaselineOcpuUtilization getBaselineOcpuUtilization() { + return baselineOcpuUtilization; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DesktopPoolShapeConfig("); + sb.append("super=").append(super.toString()); + sb.append("ocpus=").append(String.valueOf(this.ocpus)); + sb.append(", memoryInGBs=").append(String.valueOf(this.memoryInGBs)); + sb.append(", baselineOcpuUtilization=") + .append(String.valueOf(this.baselineOcpuUtilization)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DesktopPoolShapeConfig)) { + return false; + } + + DesktopPoolShapeConfig other = (DesktopPoolShapeConfig) o; + return java.util.Objects.equals(this.ocpus, other.ocpus) + && java.util.Objects.equals(this.memoryInGBs, other.memoryInGBs) + && java.util.Objects.equals( + this.baselineOcpuUtilization, other.baselineOcpuUtilization) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.ocpus == null ? 43 : this.ocpus.hashCode()); + result = (result * PRIME) + (this.memoryInGBs == null ? 43 : this.memoryInGBs.hashCode()); + result = + (result * PRIME) + + (this.baselineOcpuUtilization == null + ? 43 + : this.baselineOcpuUtilization.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopSessionLifecycleActions.java b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopSessionLifecycleActions.java new file mode 100644 index 00000000000..11d6d1ca45c --- /dev/null +++ b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DesktopSessionLifecycleActions.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.desktops.model; + +/** + * Action to be triggered on inactivity or disconnect + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220618") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DesktopSessionLifecycleActions.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DesktopSessionLifecycleActions + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"inactivity", "disconnect"}) + public DesktopSessionLifecycleActions( + InactivityConfig inactivity, DisconnectConfig disconnect) { + super(); + this.inactivity = inactivity; + this.disconnect = disconnect; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("inactivity") + private InactivityConfig inactivity; + + public Builder inactivity(InactivityConfig inactivity) { + this.inactivity = inactivity; + this.__explicitlySet__.add("inactivity"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("disconnect") + private DisconnectConfig disconnect; + + public Builder disconnect(DisconnectConfig disconnect) { + this.disconnect = disconnect; + this.__explicitlySet__.add("disconnect"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DesktopSessionLifecycleActions build() { + DesktopSessionLifecycleActions model = + new DesktopSessionLifecycleActions(this.inactivity, this.disconnect); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DesktopSessionLifecycleActions model) { + if (model.wasPropertyExplicitlySet("inactivity")) { + this.inactivity(model.getInactivity()); + } + if (model.wasPropertyExplicitlySet("disconnect")) { + this.disconnect(model.getDisconnect()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("inactivity") + private final InactivityConfig inactivity; + + public InactivityConfig getInactivity() { + return inactivity; + } + + @com.fasterxml.jackson.annotation.JsonProperty("disconnect") + private final DisconnectConfig disconnect; + + public DisconnectConfig getDisconnect() { + return disconnect; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DesktopSessionLifecycleActions("); + sb.append("super=").append(super.toString()); + sb.append("inactivity=").append(String.valueOf(this.inactivity)); + sb.append(", disconnect=").append(String.valueOf(this.disconnect)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DesktopSessionLifecycleActions)) { + return false; + } + + DesktopSessionLifecycleActions other = (DesktopSessionLifecycleActions) o; + return java.util.Objects.equals(this.inactivity, other.inactivity) + && java.util.Objects.equals(this.disconnect, other.disconnect) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.inactivity == null ? 43 : this.inactivity.hashCode()); + result = (result * PRIME) + (this.disconnect == null ? 43 : this.disconnect.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DisconnectConfig.java b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DisconnectConfig.java new file mode 100644 index 00000000000..f417738d5d7 --- /dev/null +++ b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/DisconnectConfig.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.desktops.model; + +/** + * Action and grace period for disconnect + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220618") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = DisconnectConfig.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DisconnectConfig extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"action", "gracePeriodInMinutes"}) + public DisconnectConfig(Action action, Integer gracePeriodInMinutes) { + super(); + this.action = action; + this.gracePeriodInMinutes = gracePeriodInMinutes; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * a disconnect action to be triggered + **/ + @com.fasterxml.jackson.annotation.JsonProperty("action") + private Action action; + + /** + * a disconnect action to be triggered + * @param action the value to set + * @return this builder + **/ + public Builder action(Action action) { + this.action = action; + this.__explicitlySet__.add("action"); + return this; + } + /** + * The period of time (in minutes) after disconnect before any action occurs. + * If the value is not provided, a default value is used. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gracePeriodInMinutes") + private Integer gracePeriodInMinutes; + + /** + * The period of time (in minutes) after disconnect before any action occurs. + * If the value is not provided, a default value is used. + * + * @param gracePeriodInMinutes the value to set + * @return this builder + **/ + public Builder gracePeriodInMinutes(Integer gracePeriodInMinutes) { + this.gracePeriodInMinutes = gracePeriodInMinutes; + this.__explicitlySet__.add("gracePeriodInMinutes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DisconnectConfig build() { + DisconnectConfig model = new DisconnectConfig(this.action, this.gracePeriodInMinutes); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DisconnectConfig model) { + if (model.wasPropertyExplicitlySet("action")) { + this.action(model.getAction()); + } + if (model.wasPropertyExplicitlySet("gracePeriodInMinutes")) { + this.gracePeriodInMinutes(model.getGracePeriodInMinutes()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * a disconnect action to be triggered + **/ + public enum Action { + None("NONE"), + Stop("STOP"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Action.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Action v : Action.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Action(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Action create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Action', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * a disconnect action to be triggered + **/ + @com.fasterxml.jackson.annotation.JsonProperty("action") + private final Action action; + + /** + * a disconnect action to be triggered + * @return the value + **/ + public Action getAction() { + return action; + } + + /** + * The period of time (in minutes) after disconnect before any action occurs. + * If the value is not provided, a default value is used. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gracePeriodInMinutes") + private final Integer gracePeriodInMinutes; + + /** + * The period of time (in minutes) after disconnect before any action occurs. + * If the value is not provided, a default value is used. + * + * @return the value + **/ + public Integer getGracePeriodInMinutes() { + return gracePeriodInMinutes; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DisconnectConfig("); + sb.append("super=").append(super.toString()); + sb.append("action=").append(String.valueOf(this.action)); + sb.append(", gracePeriodInMinutes=").append(String.valueOf(this.gracePeriodInMinutes)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DisconnectConfig)) { + return false; + } + + DisconnectConfig other = (DisconnectConfig) o; + return java.util.Objects.equals(this.action, other.action) + && java.util.Objects.equals(this.gracePeriodInMinutes, other.gracePeriodInMinutes) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.action == null ? 43 : this.action.hashCode()); + result = + (result * PRIME) + + (this.gracePeriodInMinutes == null + ? 43 + : this.gracePeriodInMinutes.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/InactivityConfig.java b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/InactivityConfig.java new file mode 100644 index 00000000000..f1308aeb893 --- /dev/null +++ b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/InactivityConfig.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.desktops.model; + +/** + * Action and grace period for inactivity + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220618") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = InactivityConfig.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class InactivityConfig extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"action", "gracePeriodInMinutes"}) + public InactivityConfig(Action action, Integer gracePeriodInMinutes) { + super(); + this.action = action; + this.gracePeriodInMinutes = gracePeriodInMinutes; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * an inactivity action to be triggered + **/ + @com.fasterxml.jackson.annotation.JsonProperty("action") + private Action action; + + /** + * an inactivity action to be triggered + * @param action the value to set + * @return this builder + **/ + public Builder action(Action action) { + this.action = action; + this.__explicitlySet__.add("action"); + return this; + } + /** + * The period of time (in minutes) during which the session must remain inactive before any action occurs. + * If the value is not provided, a default value is used. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gracePeriodInMinutes") + private Integer gracePeriodInMinutes; + + /** + * The period of time (in minutes) during which the session must remain inactive before any action occurs. + * If the value is not provided, a default value is used. + * + * @param gracePeriodInMinutes the value to set + * @return this builder + **/ + public Builder gracePeriodInMinutes(Integer gracePeriodInMinutes) { + this.gracePeriodInMinutes = gracePeriodInMinutes; + this.__explicitlySet__.add("gracePeriodInMinutes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public InactivityConfig build() { + InactivityConfig model = new InactivityConfig(this.action, this.gracePeriodInMinutes); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(InactivityConfig model) { + if (model.wasPropertyExplicitlySet("action")) { + this.action(model.getAction()); + } + if (model.wasPropertyExplicitlySet("gracePeriodInMinutes")) { + this.gracePeriodInMinutes(model.getGracePeriodInMinutes()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * an inactivity action to be triggered + **/ + public enum Action { + None("NONE"), + Disconnect("DISCONNECT"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Action.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Action v : Action.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Action(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Action create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Action', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * an inactivity action to be triggered + **/ + @com.fasterxml.jackson.annotation.JsonProperty("action") + private final Action action; + + /** + * an inactivity action to be triggered + * @return the value + **/ + public Action getAction() { + return action; + } + + /** + * The period of time (in minutes) during which the session must remain inactive before any action occurs. + * If the value is not provided, a default value is used. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gracePeriodInMinutes") + private final Integer gracePeriodInMinutes; + + /** + * The period of time (in minutes) during which the session must remain inactive before any action occurs. + * If the value is not provided, a default value is used. + * + * @return the value + **/ + public Integer getGracePeriodInMinutes() { + return gracePeriodInMinutes; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("InactivityConfig("); + sb.append("super=").append(super.toString()); + sb.append("action=").append(String.valueOf(this.action)); + sb.append(", gracePeriodInMinutes=").append(String.valueOf(this.gracePeriodInMinutes)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof InactivityConfig)) { + return false; + } + + InactivityConfig other = (InactivityConfig) o; + return java.util.Objects.equals(this.action, other.action) + && java.util.Objects.equals(this.gracePeriodInMinutes, other.gracePeriodInMinutes) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.action == null ? 43 : this.action.hashCode()); + result = + (result * PRIME) + + (this.gracePeriodInMinutes == null + ? 43 + : this.gracePeriodInMinutes.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/UpdateDesktopPoolDesktopSessionLifecycleActions.java b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/UpdateDesktopPoolDesktopSessionLifecycleActions.java new file mode 100644 index 00000000000..886e542c760 --- /dev/null +++ b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/UpdateDesktopPoolDesktopSessionLifecycleActions.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.desktops.model; + +/** + * The update details of action to be triggered in case of inactivity or disconnect + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220618") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateDesktopPoolDesktopSessionLifecycleActions.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateDesktopPoolDesktopSessionLifecycleActions + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"inactivity", "disconnect"}) + public UpdateDesktopPoolDesktopSessionLifecycleActions( + InactivityConfig inactivity, DisconnectConfig disconnect) { + super(); + this.inactivity = inactivity; + this.disconnect = disconnect; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("inactivity") + private InactivityConfig inactivity; + + public Builder inactivity(InactivityConfig inactivity) { + this.inactivity = inactivity; + this.__explicitlySet__.add("inactivity"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("disconnect") + private DisconnectConfig disconnect; + + public Builder disconnect(DisconnectConfig disconnect) { + this.disconnect = disconnect; + this.__explicitlySet__.add("disconnect"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateDesktopPoolDesktopSessionLifecycleActions build() { + UpdateDesktopPoolDesktopSessionLifecycleActions model = + new UpdateDesktopPoolDesktopSessionLifecycleActions( + this.inactivity, this.disconnect); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateDesktopPoolDesktopSessionLifecycleActions model) { + if (model.wasPropertyExplicitlySet("inactivity")) { + this.inactivity(model.getInactivity()); + } + if (model.wasPropertyExplicitlySet("disconnect")) { + this.disconnect(model.getDisconnect()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("inactivity") + private final InactivityConfig inactivity; + + public InactivityConfig getInactivity() { + return inactivity; + } + + @com.fasterxml.jackson.annotation.JsonProperty("disconnect") + private final DisconnectConfig disconnect; + + public DisconnectConfig getDisconnect() { + return disconnect; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateDesktopPoolDesktopSessionLifecycleActions("); + sb.append("super=").append(super.toString()); + sb.append("inactivity=").append(String.valueOf(this.inactivity)); + sb.append(", disconnect=").append(String.valueOf(this.disconnect)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateDesktopPoolDesktopSessionLifecycleActions)) { + return false; + } + + UpdateDesktopPoolDesktopSessionLifecycleActions other = + (UpdateDesktopPoolDesktopSessionLifecycleActions) o; + return java.util.Objects.equals(this.inactivity, other.inactivity) + && java.util.Objects.equals(this.disconnect, other.disconnect) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.inactivity == null ? 43 : this.inactivity.hashCode()); + result = (result * PRIME) + (this.disconnect == null ? 43 : this.disconnect.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/UpdateDesktopPoolDetails.java b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/UpdateDesktopPoolDetails.java index 219051c99b9..cbcaafc7c48 100644 --- a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/UpdateDesktopPoolDetails.java +++ b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/model/UpdateDesktopPoolDetails.java @@ -33,7 +33,8 @@ public final class UpdateDesktopPoolDetails "timeStartScheduled", "timeStopScheduled", "freeformTags", - "definedTags" + "definedTags", + "sessionLifecycleActions" }) public UpdateDesktopPoolDetails( String displayName, @@ -46,7 +47,8 @@ public UpdateDesktopPoolDetails( java.util.Date timeStartScheduled, java.util.Date timeStopScheduled, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + UpdateDesktopPoolDesktopSessionLifecycleActions sessionLifecycleActions) { super(); this.displayName = displayName; this.description = description; @@ -59,6 +61,7 @@ public UpdateDesktopPoolDetails( this.timeStopScheduled = timeStopScheduled; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.sessionLifecycleActions = sessionLifecycleActions; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -245,6 +248,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("sessionLifecycleActions") + private UpdateDesktopPoolDesktopSessionLifecycleActions sessionLifecycleActions; + + public Builder sessionLifecycleActions( + UpdateDesktopPoolDesktopSessionLifecycleActions sessionLifecycleActions) { + this.sessionLifecycleActions = sessionLifecycleActions; + this.__explicitlySet__.add("sessionLifecycleActions"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -261,7 +274,8 @@ public UpdateDesktopPoolDetails build() { this.timeStartScheduled, this.timeStopScheduled, this.freeformTags, - this.definedTags); + this.definedTags, + this.sessionLifecycleActions); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -303,6 +317,9 @@ public Builder copy(UpdateDesktopPoolDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("sessionLifecycleActions")) { + this.sessionLifecycleActions(model.getSessionLifecycleActions()); + } return this; } } @@ -476,6 +493,13 @@ public java.util.Map> getDefinedTags() { return definedTags; } + @com.fasterxml.jackson.annotation.JsonProperty("sessionLifecycleActions") + private final UpdateDesktopPoolDesktopSessionLifecycleActions sessionLifecycleActions; + + public UpdateDesktopPoolDesktopSessionLifecycleActions getSessionLifecycleActions() { + return sessionLifecycleActions; + } + @Override public String toString() { return this.toString(true); @@ -501,6 +525,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeStopScheduled=").append(String.valueOf(this.timeStopScheduled)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", sessionLifecycleActions=") + .append(String.valueOf(this.sessionLifecycleActions)); sb.append(")"); return sb.toString(); } @@ -526,6 +552,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeStopScheduled, other.timeStopScheduled) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals( + this.sessionLifecycleActions, other.sessionLifecycleActions) && super.equals(other); } @@ -556,6 +584,11 @@ public int hashCode() { + (this.timeStopScheduled == null ? 43 : this.timeStopScheduled.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.sessionLifecycleActions == null + ? 43 + : this.sessionLifecycleActions.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/requests/StopDesktopRequest.java b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/requests/StopDesktopRequest.java index bffa9a602de..c48a33c29ae 100644 --- a/bmc-desktops/src/main/java/com/oracle/bmc/desktops/requests/StopDesktopRequest.java +++ b/bmc-desktops/src/main/java/com/oracle/bmc/desktops/requests/StopDesktopRequest.java @@ -55,6 +55,17 @@ public String getIfMatch() { public String getOpcRetryToken() { return opcRetryToken; } + /** + * Force a STOP(power off) of the desktop if set to false + */ + private Boolean isSoftStop; + + /** + * Force a STOP(power off) of the desktop if set to false + */ + public Boolean getIsSoftStop() { + return isSoftStop; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -123,6 +134,21 @@ public Builder opcRetryToken(String opcRetryToken) { return this; } + /** + * Force a STOP(power off) of the desktop if set to false + */ + private Boolean isSoftStop = null; + + /** + * Force a STOP(power off) of the desktop if set to false + * @param isSoftStop the value to set + * @return this builder instance + */ + public Builder isSoftStop(Boolean isSoftStop) { + this.isSoftStop = isSoftStop; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -155,6 +181,7 @@ public Builder copy(StopDesktopRequest o) { opcRequestId(o.getOpcRequestId()); ifMatch(o.getIfMatch()); opcRetryToken(o.getOpcRetryToken()); + isSoftStop(o.getIsSoftStop()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -191,8 +218,9 @@ public StopDesktopRequest buildWithoutInvocationCallback() { request.opcRequestId = opcRequestId; request.ifMatch = ifMatch; request.opcRetryToken = opcRetryToken; + request.isSoftStop = isSoftStop; return request; - // new StopDesktopRequest(desktopId, opcRequestId, ifMatch, opcRetryToken); + // new StopDesktopRequest(desktopId, opcRequestId, ifMatch, opcRetryToken, isSoftStop); } } @@ -205,7 +233,8 @@ public Builder toBuilder() { .desktopId(desktopId) .opcRequestId(opcRequestId) .ifMatch(ifMatch) - .opcRetryToken(opcRetryToken); + .opcRetryToken(opcRetryToken) + .isSoftStop(isSoftStop); } /** @@ -225,6 +254,7 @@ public String toString() { sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",isSoftStop=").append(String.valueOf(this.isSoftStop)); sb.append(")"); return sb.toString(); } @@ -243,7 +273,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.desktopId, other.desktopId) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.isSoftStop, other.isSoftStop); } @Override @@ -256,6 +287,7 @@ public int hashCode() { result = (result * PRIME) + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.isSoftStop == null ? 43 : this.isSoftStop.hashCode()); return result; } } diff --git a/bmc-devops/pom.xml b/bmc-devops/pom.xml index 70ce246f608..aa59124c050 100644 --- a/bmc-devops/pom.xml +++ b/bmc-devops/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-devops @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/Devops.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/Devops.java index 7bb555002f8..a874b94fb09 100644 --- a/bmc-devops/src/main/java/com/oracle/bmc/devops/Devops.java +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/Devops.java @@ -234,6 +234,32 @@ CreateBuildPipelineStageResponse createBuildPipelineStage( */ CreateDeploymentResponse createDeployment(CreateDeploymentRequest request); + /** + * Creates a new reference or updates an existing one. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateOrUpdateGitRef API. + */ + CreateOrUpdateGitRefResponse createOrUpdateGitRef(CreateOrUpdateGitRefRequest request); + + /** + * Creates a restriction on a branch that prevents certain actions on it. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateOrUpdateProtectedBranch API. + */ + CreateOrUpdateProtectedBranchResponse createOrUpdateProtectedBranch( + CreateOrUpdateProtectedBranchRequest request); + /** * Creates a new project. * @param request The request object containing the details to send @@ -246,6 +272,74 @@ CreateBuildPipelineStageResponse createBuildPipelineStage( */ CreateProjectResponse createProject(CreateProjectRequest request); + /** + * Creates a new PullRequest. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreatePullRequest API. + */ + CreatePullRequestResponse createPullRequest(CreatePullRequestRequest request); + + /** + * Creates PullRequest attachment + * + * + * Note: This operation consumes a stream. + * + * If the stream supports {@link java.io.InputStream#mark(int)} and {@link java.io.InputStream#reset()}, when a retry is + * necessary, the stream is reset so it starts at the beginning (or whatever the stream's position was at the time this + * operation is called}. + * + * Note this means that if the caller has used {@link java.io.InputStream#mark(int)} before, then the mark + * will not be the same anymore after this operation, and a subsequent call to {@link java.io.InputStream#reset()} by + * the caller will reset the stream not to the caller's mark, but to the position the stream was in when this operation + * was called. + * + * If the stream is a {@link java.io.FileInputStream}, and the stream's {@link java.nio.channels.FileChannel} position + * can be changed (like for a regular file), the stream will be wrapped in such a way that it does provide + * support for {@link java.io.InputStream#mark(int)} and {@link java.io.InputStream#reset()}. Then the same procedure as + * above is followed. If the stream's {@link java.nio.channels.FileChannel} position cannot be changed (like for a + * named pipe), then the stream's contents will be buffered in memory, as described below. + * + * If the stream does not support {@link java.io.InputStream#mark(int)} and {@link java.io.InputStream#reset()}, then + * the stream is wrapped in a {@link java.io.BufferedInputStream}, which means the entire contents may + * be buffered in memory. Then the same procedure as above is followed. + * + * The contents of the stream, except when the stream is a {@link java.io.FileInputStream} whose + * {@link java.nio.channels.FileChannel} position can be changed, should be less than 2 GiB in size if retries are used. + * This is because streams 2 GiB in size or larger do no guarantee that mark-and-reset can be performed. If the stream + * is larger, do not use built-in retries and manage retries yourself. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreatePullRequestAttachment API. + */ + CreatePullRequestAttachmentResponse createPullRequestAttachment( + CreatePullRequestAttachmentRequest request); + + /** + * Creates a new PullRequest comment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreatePullRequestComment API. + */ + CreatePullRequestCommentResponse createPullRequestComment( + CreatePullRequestCommentRequest request); + /** * Creates a new repository. * @@ -272,6 +366,19 @@ CreateBuildPipelineStageResponse createBuildPipelineStage( */ CreateTriggerResponse createTrigger(CreateTriggerRequest request); + /** + * Decline a PullRequest + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeclinePullRequest API. + */ + DeclinePullRequestResponse declinePullRequest(DeclinePullRequestRequest request); + /** * Deletes a build pipeline resource by identifier. * @param request The request object containing the details to send @@ -357,6 +464,18 @@ DeleteBuildPipelineStageResponse deleteBuildPipelineStage( */ DeleteDeployStageResponse deleteDeployStage(DeleteDeployStageRequest request); + /** + * Deletes a Repository's Ref by its name. Returns an error if the name is ambiguous. Can be disambiguated by using full names like \"heads/\" or \"tags/\". + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteGitRef API. + */ + DeleteGitRefResponse deleteGitRef(DeleteGitRefRequest request); + /** * Deletes a project resource by identifier * @param request The request object containing the details to send @@ -369,6 +488,69 @@ DeleteBuildPipelineStageResponse deleteBuildPipelineStage( */ DeleteProjectResponse deleteProject(DeleteProjectRequest request); + /** + * Removes the custom repository settings configured for a project. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteProjectRepositorySettings API. + */ + DeleteProjectRepositorySettingsResponse deleteProjectRepositorySettings( + DeleteProjectRepositorySettingsRequest request); + + /** + * Removes the protection from a branch + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteProtectedBranch API. + */ + DeleteProtectedBranchResponse deleteProtectedBranch(DeleteProtectedBranchRequest request); + + /** + * Deletes a PullRequest resource by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeletePullRequest API. + */ + DeletePullRequestResponse deletePullRequest(DeletePullRequestRequest request); + + /** + * Deletes a PullRequest attachment metadata by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeletePullRequestAttachment API. + */ + DeletePullRequestAttachmentResponse deletePullRequestAttachment( + DeletePullRequestAttachmentRequest request); + + /** + * Deletes a PullRequest comment by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeletePullRequestComment API. + */ + DeletePullRequestCommentResponse deletePullRequestComment( + DeletePullRequestCommentRequest request); + /** * Deletes a Repository's Ref by its name. Returns an error if the name is ambiguous. Can be disambiguated by using full names like \"heads/\" or \"tags/\". This API will be deprecated on Wed, 12 June 2024 01:00:00 GMT as it does not get recognized when refName has '/'. This will be replaced by \"/repositories/{repositoryId}/actions/deleteGitRef\". * @param request The request object containing the details to send @@ -393,6 +575,19 @@ DeleteBuildPipelineStageResponse deleteBuildPipelineStage( */ DeleteRepositoryResponse deleteRepository(DeleteRepositoryRequest request); + /** + * Removes the custom settings configured for a repository + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteRepositorySettings API. + */ + DeleteRepositorySettingsResponse deleteRepositorySettings( + DeleteRepositorySettingsRequest request); + /** * Deletes a trigger resource by identifier. * @param request The request object containing the details to send @@ -603,6 +798,108 @@ DeleteBuildPipelineStageResponse deleteBuildPipelineStage( */ GetProjectResponse getProject(GetProjectRequest request); + /** + * Get the project notification preference for the user passed as path param + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetProjectNotificationPreference API. + */ + GetProjectNotificationPreferenceResponse getProjectNotificationPreference( + GetProjectNotificationPreferenceRequest request); + + /** + * Retrieves a project's repository settings details. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetProjectRepositorySettings API. + */ + GetProjectRepositorySettingsResponse getProjectRepositorySettings( + GetProjectRepositorySettingsRequest request); + + /** + * Gets a PullRequest by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetPullRequest API. + */ + GetPullRequestResponse getPullRequest(GetPullRequestRequest request); + + /** + * Get PullRequest attachment metadata by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetPullRequestAttachment API. + */ + GetPullRequestAttachmentResponse getPullRequestAttachment( + GetPullRequestAttachmentRequest request); + + /** + * Gets the content of the attachment. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetPullRequestAttachmentContent API. + */ + GetPullRequestAttachmentContentResponse getPullRequestAttachmentContent( + GetPullRequestAttachmentContentRequest request); + + /** + * Get pull request diff summary metric + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetPullRequestChangeSummaryMetrics API. + */ + GetPullRequestChangeSummaryMetricsResponse getPullRequestChangeSummaryMetrics( + GetPullRequestChangeSummaryMetricsRequest request); + + /** + * Get PullRequest comment by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetPullRequestComment API. + */ + GetPullRequestCommentResponse getPullRequestComment(GetPullRequestCommentRequest request); + + /** + * Get the pull request notification preference for the user passed as path param + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetPullRequestNotificationPreference API. + */ + GetPullRequestNotificationPreferenceResponse getPullRequestNotificationPreference( + GetPullRequestNotificationPreferenceRequest request); + /** * This API will be deprecated on Wed, 12 June 2024 01:00:00 GMT as it does not get recognized when refName has '/'. This will be replaced by \"/repositories/{repositoryId}/refs\". Retrieves a repository's reference by its name with preference for branches over tags if the name is ambiguous. This can be disambiguated by using full names like \"heads/\" or \"tags/\". * @param request The request object containing the details to send @@ -680,6 +977,31 @@ GetRepositoryArchiveContentResponse getRepositoryArchiveContent( */ GetRepositoryFileLinesResponse getRepositoryFileLines(GetRepositoryFileLinesRequest request); + /** + * Get the repository notification preference for the user passed as path param + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetRepositoryNotificationPreference API. + */ + GetRepositoryNotificationPreferenceResponse getRepositoryNotificationPreference( + GetRepositoryNotificationPreferenceRequest request); + + /** + * Retrieves a repository's settings details. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetRepositorySettings API. + */ + GetRepositorySettingsResponse getRepositorySettings(GetRepositorySettingsRequest request); + /** * Retrieves a trigger by identifier. * @param request The request object containing the details to send @@ -704,6 +1026,19 @@ GetRepositoryArchiveContentResponse getRepositoryArchiveContent( */ GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request); + /** + * Like a PullRequest comment + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use LikePullRequestComment API. + */ + LikePullRequestCommentResponse likePullRequestComment(LikePullRequestCommentRequest request); + /** * Retrieve a list of all the authors. * @@ -743,6 +1078,19 @@ GetRepositoryArchiveContentResponse getRepositoryArchiveContent( */ ListBuildPipelinesResponse listBuildPipelines(ListBuildPipelinesRequest request); + /** + * Returns a list of build run snapshots for a given commit or the latest commit on a pull request if no commit is provided. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListBuildRunSnapshots API. + */ + ListBuildRunSnapshotsResponse listBuildRunSnapshots(ListBuildRunSnapshotsRequest request); + /** * Returns a list of build run summary. * @@ -855,6 +1203,18 @@ GetRepositoryArchiveContentResponse getRepositoryArchiveContent( */ ListDeploymentsResponse listDeployments(ListDeploymentsRequest request); + /** + * LIST operation that returns a collection of fork sync status objects. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListForkSyncStatuses API. + */ + ListForkSyncStatusesResponse listForkSyncStatuses(ListForkSyncStatusesRequest request); + /** * Returns a list of mirror entry in history within 30 days. * @@ -881,6 +1241,20 @@ GetRepositoryArchiveContentResponse getRepositoryArchiveContent( */ ListPathsResponse listPaths(ListPathsRequest request); + /** + * Retrieve a list of all the Commit Analytics authors. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListProjectCommitAnalyticsAuthors API. + */ + ListProjectCommitAnalyticsAuthorsResponse listProjectCommitAnalyticsAuthors( + ListProjectCommitAnalyticsAuthorsRequest request); + /** * Returns a list of projects. * @param request The request object containing the details to send @@ -893,6 +1267,108 @@ GetRepositoryArchiveContentResponse getRepositoryArchiveContent( */ ListProjectsResponse listProjects(ListProjectsRequest request); + /** + * Returns a list of Protected Branches. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListProtectedBranches API. + */ + ListProtectedBranchesResponse listProtectedBranches(ListProtectedBranchesRequest request); + + /** + * List actions that have been taken on a pull request + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListPullRequestActivities API. + */ + ListPullRequestActivitiesResponse listPullRequestActivities( + ListPullRequestActivitiesRequest request); + + /** + * List PullRequest level attachments by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListPullRequestAttachments API. + */ + ListPullRequestAttachmentsResponse listPullRequestAttachments( + ListPullRequestAttachmentsRequest request); + + /** + * Retrieve a list of all the PR authors. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListPullRequestAuthors API. + */ + ListPullRequestAuthorsResponse listPullRequestAuthors(ListPullRequestAuthorsRequest request); + + /** + * List PullRequest level comments by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListPullRequestComments API. + */ + ListPullRequestCommentsResponse listPullRequestComments(ListPullRequestCommentsRequest request); + + /** + * List pull request commits + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListPullRequestCommits API. + */ + ListPullRequestCommitsResponse listPullRequestCommits(ListPullRequestCommitsRequest request); + + /** + * List pull request file changes + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListPullRequestFileChanges API. + */ + ListPullRequestFileChangesResponse listPullRequestFileChanges( + ListPullRequestFileChangesRequest request); + + /** + * Returns a list of PullRequests. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListPullRequests API. + */ + ListPullRequestsResponse listPullRequests(ListPullRequestsRequest request); + /** * Returns a list of references. * @@ -919,6 +1395,20 @@ GetRepositoryArchiveContentResponse getRepositoryArchiveContent( */ ListRepositoriesResponse listRepositories(ListRepositoriesRequest request); + /** + * Retrieve a list of all the Commit Analytics authors. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListRepositoryCommitAnalyticsAuthors API. + */ + ListRepositoryCommitAnalyticsAuthorsResponse listRepositoryCommitAnalyticsAuthors( + ListRepositoryCommitAnalyticsAuthorsRequest request); + /** * Returns a list of triggers. * @@ -968,6 +1458,18 @@ GetRepositoryArchiveContentResponse getRepositoryArchiveContent( */ ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request); + /** + * Merge the PullRequest + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use MergePullRequest API. + */ + MergePullRequestResponse mergePullRequest(MergePullRequestRequest request); + /** * Synchronize a mirrored repository to the latest version from external providers. * @@ -981,6 +1483,19 @@ GetRepositoryArchiveContentResponse getRepositoryArchiveContent( */ MirrorRepositoryResponse mirrorRepository(MirrorRepositoryRequest request); + /** + * Updates the reviewer list of a pull request + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use PatchPullRequest API. + */ + PatchPullRequestResponse patchPullRequest(PatchPullRequestRequest request); + /** * Creates a new reference or updates an existing one. This API will be deprecated on Wed, 12 June 2024 01:00:00 GMT as it does not get recognized when refName has '/'. This will be replaced by \"/repositories/{repositoryId}/actions/createOrUpdateGitRef\". * @@ -994,6 +1509,32 @@ GetRepositoryArchiveContentResponse getRepositoryArchiveContent( */ PutRepositoryRefResponse putRepositoryRef(PutRepositoryRefRequest request); + /** + * Reopen a PullRequest + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ReopenPullRequest API. + */ + ReopenPullRequestResponse reopenPullRequest(ReopenPullRequestRequest request); + + /** + * Review a PullRequest + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ReviewPullRequest API. + */ + ReviewPullRequestResponse reviewPullRequest(ReviewPullRequestRequest request); + /** * Cascading operation that marks Project and child DevOps resources in a DELETING state for a retention period * @param request The request object containing the details to send @@ -1007,6 +1548,71 @@ GetRepositoryArchiveContentResponse getRepositoryArchiveContent( ScheduleCascadingProjectDeletionResponse scheduleCascadingProjectDeletion( ScheduleCascadingProjectDeletionRequest request); + /** + * Retrieves repository analytics for a given project. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use SummarizeProjectRepositoryAnalytics API. + */ + SummarizeProjectRepositoryAnalyticsResponse summarizeProjectRepositoryAnalytics( + SummarizeProjectRepositoryAnalyticsRequest request); + + /** + * Retrieves repository analytics for a given repository. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use SummarizeRepositoryAnalytics API. + */ + SummarizeRepositoryAnalyticsResponse summarizeRepositoryAnalytics( + SummarizeRepositoryAnalyticsRequest request); + + /** + * Synchronize a forked repository to the latest version + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use SyncRepository API. + */ + SyncRepositoryResponse syncRepository(SyncRepositoryRequest request); + + /** + * Unlike a PullRequest comment + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UnlikePullRequestComment API. + */ + UnlikePullRequestCommentResponse unlikePullRequestComment( + UnlikePullRequestCommentRequest request); + + /** + * unsubscribe the PullRequest + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UnsubscribePullRequest API. + */ + UnsubscribePullRequestResponse unsubscribePullRequest(UnsubscribePullRequestRequest request); + /** * Updates the build pipeline. * @param request The request object containing the details to send @@ -1128,6 +1734,70 @@ UpdateBuildPipelineStageResponse updateBuildPipelineStage( */ UpdateProjectResponse updateProject(UpdateProjectRequest request); + /** + * Update the project notification preference for the user passed as path param + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateProjectNotificationPreference API. + */ + UpdateProjectNotificationPreferenceResponse updateProjectNotificationPreference( + UpdateProjectNotificationPreferenceRequest request); + + /** + * Updates the repository settings for a project. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateProjectRepositorySettings API. + */ + UpdateProjectRepositorySettingsResponse updateProjectRepositorySettings( + UpdateProjectRepositorySettingsRequest request); + + /** + * Updates the PullRequest + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdatePullRequest API. + */ + UpdatePullRequestResponse updatePullRequest(UpdatePullRequestRequest request); + + /** + * Updates the PullRequest comment + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdatePullRequestComment API. + */ + UpdatePullRequestCommentResponse updatePullRequestComment( + UpdatePullRequestCommentRequest request); + + /** + * Update the pull request notification preference for the user passed as path param + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdatePullRequestNotificationPreference API. + */ + UpdatePullRequestNotificationPreferenceResponse updatePullRequestNotificationPreference( + UpdatePullRequestNotificationPreferenceRequest request); + /** * Updates the repository. * @param request The request object containing the details to send @@ -1140,6 +1810,32 @@ UpdateBuildPipelineStageResponse updateBuildPipelineStage( */ UpdateRepositoryResponse updateRepository(UpdateRepositoryRequest request); + /** + * Update the repository notification preference for the user passed as path param + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateRepositoryNotificationPreference API. + */ + UpdateRepositoryNotificationPreferenceResponse updateRepositoryNotificationPreference( + UpdateRepositoryNotificationPreferenceRequest request); + + /** + * Updates the settings for a repository. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateRepositorySettings API. + */ + UpdateRepositorySettingsResponse updateRepositorySettings( + UpdateRepositorySettingsRequest request); + /** * Updates the trigger. * @param request The request object containing the details to send diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/DevopsAsync.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/DevopsAsync.java index 98f07adac87..783b1ccf623 100644 --- a/bmc-devops/src/main/java/com/oracle/bmc/devops/DevopsAsync.java +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/DevopsAsync.java @@ -283,6 +283,41 @@ java.util.concurrent.Future createDeployment( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Creates a new reference or updates an existing one. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createOrUpdateGitRef( + CreateOrUpdateGitRefRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateOrUpdateGitRefRequest, CreateOrUpdateGitRefResponse> + handler); + + /** + * Creates a restriction on a branch that prevents certain actions on it. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + createOrUpdateProtectedBranch( + CreateOrUpdateProtectedBranchRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateOrUpdateProtectedBranchRequest, + CreateOrUpdateProtectedBranchResponse> + handler); + /** * Creates a new project. * @@ -298,6 +333,57 @@ java.util.concurrent.Future createProject( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Creates a new PullRequest. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createPullRequest( + CreatePullRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreatePullRequestRequest, CreatePullRequestResponse> + handler); + + /** + * Creates PullRequest attachment + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createPullRequestAttachment( + CreatePullRequestAttachmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreatePullRequestAttachmentRequest, CreatePullRequestAttachmentResponse> + handler); + + /** + * Creates a new PullRequest comment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createPullRequestComment( + CreatePullRequestCommentRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreatePullRequestCommentRequest, CreatePullRequestCommentResponse> + handler); + /** * Creates a new repository. * @@ -330,6 +416,23 @@ java.util.concurrent.Future createTrigger( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Decline a PullRequest + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future declinePullRequest( + DeclinePullRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeclinePullRequestRequest, DeclinePullRequestResponse> + handler); + /** * Deletes a build pipeline resource by identifier. * @@ -441,6 +544,21 @@ java.util.concurrent.Future deleteDeployStage( DeleteDeployStageRequest, DeleteDeployStageResponse> handler); + /** + * Deletes a Repository's Ref by its name. Returns an error if the name is ambiguous. Can be disambiguated by using full names like \"heads/\" or \"tags/\". + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteGitRef( + DeleteGitRefRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Deletes a project resource by identifier * @@ -456,6 +574,88 @@ java.util.concurrent.Future deleteProject( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Removes the custom repository settings configured for a project. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + deleteProjectRepositorySettings( + DeleteProjectRepositorySettingsRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteProjectRepositorySettingsRequest, + DeleteProjectRepositorySettingsResponse> + handler); + + /** + * Removes the protection from a branch + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteProtectedBranch( + DeleteProtectedBranchRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteProtectedBranchRequest, DeleteProtectedBranchResponse> + handler); + + /** + * Deletes a PullRequest resource by identifier + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deletePullRequest( + DeletePullRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeletePullRequestRequest, DeletePullRequestResponse> + handler); + + /** + * Deletes a PullRequest attachment metadata by identifier + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deletePullRequestAttachment( + DeletePullRequestAttachmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeletePullRequestAttachmentRequest, DeletePullRequestAttachmentResponse> + handler); + + /** + * Deletes a PullRequest comment by identifier + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deletePullRequestComment( + DeletePullRequestCommentRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeletePullRequestCommentRequest, DeletePullRequestCommentResponse> + handler); + /** * Deletes a Repository's Ref by its name. Returns an error if the name is ambiguous. Can be disambiguated by using full names like \"heads/\" or \"tags/\". This API will be deprecated on Wed, 12 June 2024 01:00:00 GMT as it does not get recognized when refName has '/'. This will be replaced by \"/repositories/{repositoryId}/actions/deleteGitRef\". * @@ -485,6 +685,22 @@ java.util.concurrent.Future deleteRepository( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Removes the custom settings configured for a repository + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteRepositorySettings( + DeleteRepositorySettingsRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteRepositorySettingsRequest, DeleteRepositorySettingsResponse> + handler); + /** * Deletes a trigger resource by identifier. * @@ -746,7 +962,7 @@ java.util.concurrent.Future getProject( com.oracle.bmc.responses.AsyncHandler handler); /** - * This API will be deprecated on Wed, 12 June 2024 01:00:00 GMT as it does not get recognized when refName has '/'. This will be replaced by \"/repositories/{repositoryId}/refs\". Retrieves a repository's reference by its name with preference for branches over tags if the name is ambiguous. This can be disambiguated by using full names like \"heads/\" or \"tags/\". + * Get the project notification preference for the user passed as path param * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -755,13 +971,16 @@ java.util.concurrent.Future getProject( * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future getRef( - GetRefRequest request, - com.oracle.bmc.responses.AsyncHandler handler); + java.util.concurrent.Future + getProjectNotificationPreference( + GetProjectNotificationPreferenceRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetProjectNotificationPreferenceRequest, + GetProjectNotificationPreferenceResponse> + handler); /** - * Gets the line-by-line difference between file on different commits. - * + * Retrieves a project's repository settings details. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -770,14 +989,15 @@ java.util.concurrent.Future getRef( * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future getRepoFileDiff( - GetRepoFileDiffRequest request, - com.oracle.bmc.responses.AsyncHandler + java.util.concurrent.Future getProjectRepositorySettings( + GetProjectRepositorySettingsRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetProjectRepositorySettingsRequest, + GetProjectRepositorySettingsResponse> handler); /** - * Retrieve lines of a specified file. Supports starting line number and limit. - * + * Gets a PullRequest by identifier * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -786,13 +1006,13 @@ java.util.concurrent.Future getRepoFileDiff( * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future getRepoFileLines( - GetRepoFileLinesRequest request, - com.oracle.bmc.responses.AsyncHandler + java.util.concurrent.Future getPullRequest( + GetPullRequestRequest request, + com.oracle.bmc.responses.AsyncHandler handler); /** - * Retrieves a repository by identifier. + * Get PullRequest attachment metadata by identifier * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -801,14 +1021,14 @@ java.util.concurrent.Future getRepoFileLines( * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future getRepository( - GetRepositoryRequest request, - com.oracle.bmc.responses.AsyncHandler + java.util.concurrent.Future getPullRequestAttachment( + GetPullRequestAttachmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetPullRequestAttachmentRequest, GetPullRequestAttachmentResponse> handler); /** - * Returns the archived repository information. - * + * Gets the content of the attachment. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -817,15 +1037,16 @@ java.util.concurrent.Future getRepository( * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future getRepositoryArchiveContent( - GetRepositoryArchiveContentRequest request, - com.oracle.bmc.responses.AsyncHandler< - GetRepositoryArchiveContentRequest, GetRepositoryArchiveContentResponse> - handler); + java.util.concurrent.Future + getPullRequestAttachmentContent( + GetPullRequestAttachmentContentRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetPullRequestAttachmentContentRequest, + GetPullRequestAttachmentContentResponse> + handler); /** - * Retrieve lines of a specified file. Supports starting line number and limit. This API will be deprecated on Wed, 29 Mar 2023 01:00:00 GMT as it does not get recognized when filePath has '/'. This will be replaced by \"/repositories/{repositoryId}/file/lines\" - * + * Get pull request diff summary metric * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -834,14 +1055,16 @@ java.util.concurrent.Future getRepositoryAr * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future getRepositoryFileLines( - GetRepositoryFileLinesRequest request, - com.oracle.bmc.responses.AsyncHandler< - GetRepositoryFileLinesRequest, GetRepositoryFileLinesResponse> - handler); + java.util.concurrent.Future + getPullRequestChangeSummaryMetrics( + GetPullRequestChangeSummaryMetricsRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetPullRequestChangeSummaryMetricsRequest, + GetPullRequestChangeSummaryMetricsResponse> + handler); /** - * Retrieves a trigger by identifier. + * Get PullRequest comment by identifier * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -850,12 +1073,14 @@ java.util.concurrent.Future getRepositoryFileLin * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future getTrigger( - GetTriggerRequest request, - com.oracle.bmc.responses.AsyncHandler handler); + java.util.concurrent.Future getPullRequestComment( + GetPullRequestCommentRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetPullRequestCommentRequest, GetPullRequestCommentResponse> + handler); /** - * Retrieves the status of the work request with the given ID. + * Get the pull request notification preference for the user passed as path param * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -864,14 +1089,16 @@ java.util.concurrent.Future getTrigger( * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future getWorkRequest( - GetWorkRequestRequest request, - com.oracle.bmc.responses.AsyncHandler - handler); + java.util.concurrent.Future + getPullRequestNotificationPreference( + GetPullRequestNotificationPreferenceRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetPullRequestNotificationPreferenceRequest, + GetPullRequestNotificationPreferenceResponse> + handler); /** - * Retrieve a list of all the authors. - * + * This API will be deprecated on Wed, 12 June 2024 01:00:00 GMT as it does not get recognized when refName has '/'. This will be replaced by \"/repositories/{repositoryId}/refs\". Retrieves a repository's reference by its name with preference for branches over tags if the name is ambiguous. This can be disambiguated by using full names like \"heads/\" or \"tags/\". * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -880,12 +1107,12 @@ java.util.concurrent.Future getWorkRequest( * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future listAuthors( - ListAuthorsRequest request, - com.oracle.bmc.responses.AsyncHandler handler); + java.util.concurrent.Future getRef( + GetRefRequest request, + com.oracle.bmc.responses.AsyncHandler handler); /** - * Returns a list of all stages in a compartment or build pipeline. + * Gets the line-by-line difference between file on different commits. * * * @param request The request object containing the details to send @@ -895,14 +1122,13 @@ java.util.concurrent.Future listAuthors( * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future listBuildPipelineStages( - ListBuildPipelineStagesRequest request, - com.oracle.bmc.responses.AsyncHandler< - ListBuildPipelineStagesRequest, ListBuildPipelineStagesResponse> + java.util.concurrent.Future getRepoFileDiff( + GetRepoFileDiffRequest request, + com.oracle.bmc.responses.AsyncHandler handler); /** - * Returns a list of build pipelines. + * Retrieve lines of a specified file. Supports starting line number and limit. * * * @param request The request object containing the details to send @@ -912,15 +1138,13 @@ java.util.concurrent.Future listBuildPipelineSt * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future listBuildPipelines( - ListBuildPipelinesRequest request, - com.oracle.bmc.responses.AsyncHandler< - ListBuildPipelinesRequest, ListBuildPipelinesResponse> + java.util.concurrent.Future getRepoFileLines( + GetRepoFileLinesRequest request, + com.oracle.bmc.responses.AsyncHandler handler); /** - * Returns a list of build run summary. - * + * Retrieves a repository by identifier. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -929,13 +1153,13 @@ java.util.concurrent.Future listBuildPipelines( * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future listBuildRuns( - ListBuildRunsRequest request, - com.oracle.bmc.responses.AsyncHandler + java.util.concurrent.Future getRepository( + GetRepositoryRequest request, + com.oracle.bmc.responses.AsyncHandler handler); /** - * Compares two revisions and lists the differences. Supports comparison between two references or commits. + * Returns the archived repository information. * * * @param request The request object containing the details to send @@ -945,11 +1169,207 @@ java.util.concurrent.Future listBuildRuns( * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future listCommitDiffs( - ListCommitDiffsRequest request, - com.oracle.bmc.responses.AsyncHandler - handler); - + java.util.concurrent.Future getRepositoryArchiveContent( + GetRepositoryArchiveContentRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetRepositoryArchiveContentRequest, GetRepositoryArchiveContentResponse> + handler); + + /** + * Retrieve lines of a specified file. Supports starting line number and limit. This API will be deprecated on Wed, 29 Mar 2023 01:00:00 GMT as it does not get recognized when filePath has '/'. This will be replaced by \"/repositories/{repositoryId}/file/lines\" + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getRepositoryFileLines( + GetRepositoryFileLinesRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetRepositoryFileLinesRequest, GetRepositoryFileLinesResponse> + handler); + + /** + * Get the repository notification preference for the user passed as path param + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + getRepositoryNotificationPreference( + GetRepositoryNotificationPreferenceRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetRepositoryNotificationPreferenceRequest, + GetRepositoryNotificationPreferenceResponse> + handler); + + /** + * Retrieves a repository's settings details. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getRepositorySettings( + GetRepositorySettingsRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetRepositorySettingsRequest, GetRepositorySettingsResponse> + handler); + + /** + * Retrieves a trigger by identifier. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getTrigger( + GetTriggerRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Retrieves the status of the work request with the given ID. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getWorkRequest( + GetWorkRequestRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Like a PullRequest comment + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future likePullRequestComment( + LikePullRequestCommentRequest request, + com.oracle.bmc.responses.AsyncHandler< + LikePullRequestCommentRequest, LikePullRequestCommentResponse> + handler); + + /** + * Retrieve a list of all the authors. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listAuthors( + ListAuthorsRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Returns a list of all stages in a compartment or build pipeline. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listBuildPipelineStages( + ListBuildPipelineStagesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListBuildPipelineStagesRequest, ListBuildPipelineStagesResponse> + handler); + + /** + * Returns a list of build pipelines. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listBuildPipelines( + ListBuildPipelinesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListBuildPipelinesRequest, ListBuildPipelinesResponse> + handler); + + /** + * Returns a list of build run snapshots for a given commit or the latest commit on a pull request if no commit is provided. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listBuildRunSnapshots( + ListBuildRunSnapshotsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListBuildRunSnapshotsRequest, ListBuildRunSnapshotsResponse> + handler); + + /** + * Returns a list of build run summary. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listBuildRuns( + ListBuildRunsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Compares two revisions and lists the differences. Supports comparison between two references or commits. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listCommitDiffs( + ListCommitDiffsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Returns a list of commits. * @@ -976,13 +1396,174 @@ java.util.concurrent.Future listCommits( * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future listConnections( - ListConnectionsRequest request, - com.oracle.bmc.responses.AsyncHandler + java.util.concurrent.Future listConnections( + ListConnectionsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Returns a list of deployment artifacts. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listDeployArtifacts( + ListDeployArtifactsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListDeployArtifactsRequest, ListDeployArtifactsResponse> + handler); + + /** + * Returns a list of deployment environments. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listDeployEnvironments( + ListDeployEnvironmentsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListDeployEnvironmentsRequest, ListDeployEnvironmentsResponse> + handler); + + /** + * Returns a list of deployment pipelines. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listDeployPipelines( + ListDeployPipelinesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListDeployPipelinesRequest, ListDeployPipelinesResponse> + handler); + + /** + * Retrieves a list of deployment stages. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listDeployStages( + ListDeployStagesRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Returns a list of deployments. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listDeployments( + ListDeploymentsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * LIST operation that returns a collection of fork sync status objects. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listForkSyncStatuses( + ListForkSyncStatusesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListForkSyncStatusesRequest, ListForkSyncStatusesResponse> + handler); + + /** + * Returns a list of mirror entry in history within 30 days. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listMirrorRecords( + ListMirrorRecordsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListMirrorRecordsRequest, ListMirrorRecordsResponse> + handler); + + /** + * Retrieves a list of files and directories in a repository. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listPaths( + ListPathsRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Retrieve a list of all the Commit Analytics authors. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listProjectCommitAnalyticsAuthors( + ListProjectCommitAnalyticsAuthorsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListProjectCommitAnalyticsAuthorsRequest, + ListProjectCommitAnalyticsAuthorsResponse> + handler); + + /** + * Returns a list of projects. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listProjects( + ListProjectsRequest request, + com.oracle.bmc.responses.AsyncHandler handler); /** - * Returns a list of deployment artifacts. + * Returns a list of Protected Branches. + * * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -991,14 +1572,14 @@ java.util.concurrent.Future listConnections( * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future listDeployArtifacts( - ListDeployArtifactsRequest request, + java.util.concurrent.Future listProtectedBranches( + ListProtectedBranchesRequest request, com.oracle.bmc.responses.AsyncHandler< - ListDeployArtifactsRequest, ListDeployArtifactsResponse> + ListProtectedBranchesRequest, ListProtectedBranchesResponse> handler); /** - * Returns a list of deployment environments. + * List actions that have been taken on a pull request * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -1007,14 +1588,14 @@ java.util.concurrent.Future listDeployArtifacts( * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future listDeployEnvironments( - ListDeployEnvironmentsRequest request, + java.util.concurrent.Future listPullRequestActivities( + ListPullRequestActivitiesRequest request, com.oracle.bmc.responses.AsyncHandler< - ListDeployEnvironmentsRequest, ListDeployEnvironmentsResponse> + ListPullRequestActivitiesRequest, ListPullRequestActivitiesResponse> handler); /** - * Returns a list of deployment pipelines. + * List PullRequest level attachments by identifier * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -1023,14 +1604,15 @@ java.util.concurrent.Future listDeployEnvironmen * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future listDeployPipelines( - ListDeployPipelinesRequest request, + java.util.concurrent.Future listPullRequestAttachments( + ListPullRequestAttachmentsRequest request, com.oracle.bmc.responses.AsyncHandler< - ListDeployPipelinesRequest, ListDeployPipelinesResponse> + ListPullRequestAttachmentsRequest, ListPullRequestAttachmentsResponse> handler); /** - * Retrieves a list of deployment stages. + * Retrieve a list of all the PR authors. + * * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -1039,13 +1621,14 @@ java.util.concurrent.Future listDeployPipelines( * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future listDeployStages( - ListDeployStagesRequest request, - com.oracle.bmc.responses.AsyncHandler + java.util.concurrent.Future listPullRequestAuthors( + ListPullRequestAuthorsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListPullRequestAuthorsRequest, ListPullRequestAuthorsResponse> handler); /** - * Returns a list of deployments. + * List PullRequest level comments by identifier * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -1054,14 +1637,14 @@ java.util.concurrent.Future listDeployStages( * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future listDeployments( - ListDeploymentsRequest request, - com.oracle.bmc.responses.AsyncHandler + java.util.concurrent.Future listPullRequestComments( + ListPullRequestCommentsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListPullRequestCommentsRequest, ListPullRequestCommentsResponse> handler); /** - * Returns a list of mirror entry in history within 30 days. - * + * List pull request commits * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -1070,15 +1653,14 @@ java.util.concurrent.Future listDeployments( * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future listMirrorRecords( - ListMirrorRecordsRequest request, + java.util.concurrent.Future listPullRequestCommits( + ListPullRequestCommitsRequest request, com.oracle.bmc.responses.AsyncHandler< - ListMirrorRecordsRequest, ListMirrorRecordsResponse> + ListPullRequestCommitsRequest, ListPullRequestCommitsResponse> handler); /** - * Retrieves a list of files and directories in a repository. - * + * List pull request file changes * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -1087,12 +1669,15 @@ java.util.concurrent.Future listMirrorRecords( * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future listPaths( - ListPathsRequest request, - com.oracle.bmc.responses.AsyncHandler handler); + java.util.concurrent.Future listPullRequestFileChanges( + ListPullRequestFileChangesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListPullRequestFileChangesRequest, ListPullRequestFileChangesResponse> + handler); /** - * Returns a list of projects. + * Returns a list of PullRequests. + * * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -1101,9 +1686,9 @@ java.util.concurrent.Future listPaths( * types of responses (like java.io.InputStream) may not be able to be read in * both places as the underlying stream may only be consumed once. */ - java.util.concurrent.Future listProjects( - ListProjectsRequest request, - com.oracle.bmc.responses.AsyncHandler + java.util.concurrent.Future listPullRequests( + ListPullRequestsRequest request, + com.oracle.bmc.responses.AsyncHandler handler); /** @@ -1137,6 +1722,25 @@ java.util.concurrent.Future listRepositories( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Retrieve a list of all the Commit Analytics authors. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listRepositoryCommitAnalyticsAuthors( + ListRepositoryCommitAnalyticsAuthorsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListRepositoryCommitAnalyticsAuthorsRequest, + ListRepositoryCommitAnalyticsAuthorsResponse> + handler); + /** * Returns a list of triggers. * @@ -1200,6 +1804,21 @@ java.util.concurrent.Future listWorkRequests( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Merge the PullRequest + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future mergePullRequest( + MergePullRequestRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Synchronize a mirrored repository to the latest version from external providers. * @@ -1216,6 +1835,22 @@ java.util.concurrent.Future mirrorRepository( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Updates the reviewer list of a pull request + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future patchPullRequest( + PatchPullRequestRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Creates a new reference or updates an existing one. This API will be deprecated on Wed, 12 June 2024 01:00:00 GMT as it does not get recognized when refName has '/'. This will be replaced by \"/repositories/{repositoryId}/actions/createOrUpdateGitRef\". * @@ -1232,6 +1867,40 @@ java.util.concurrent.Future putRepositoryRef( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Reopen a PullRequest + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future reopenPullRequest( + ReopenPullRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + ReopenPullRequestRequest, ReopenPullRequestResponse> + handler); + + /** + * Review a PullRequest + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future reviewPullRequest( + ReviewPullRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + ReviewPullRequestRequest, ReviewPullRequestResponse> + handler); + /** * Cascading operation that marks Project and child DevOps resources in a DELETING state for a retention period * @@ -1250,6 +1919,90 @@ java.util.concurrent.Future putRepositoryRef( ScheduleCascadingProjectDeletionResponse> handler); + /** + * Retrieves repository analytics for a given project. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + summarizeProjectRepositoryAnalytics( + SummarizeProjectRepositoryAnalyticsRequest request, + com.oracle.bmc.responses.AsyncHandler< + SummarizeProjectRepositoryAnalyticsRequest, + SummarizeProjectRepositoryAnalyticsResponse> + handler); + + /** + * Retrieves repository analytics for a given repository. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future summarizeRepositoryAnalytics( + SummarizeRepositoryAnalyticsRequest request, + com.oracle.bmc.responses.AsyncHandler< + SummarizeRepositoryAnalyticsRequest, + SummarizeRepositoryAnalyticsResponse> + handler); + + /** + * Synchronize a forked repository to the latest version + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future syncRepository( + SyncRepositoryRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Unlike a PullRequest comment + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future unlikePullRequestComment( + UnlikePullRequestCommentRequest request, + com.oracle.bmc.responses.AsyncHandler< + UnlikePullRequestCommentRequest, UnlikePullRequestCommentResponse> + handler); + + /** + * unsubscribe the PullRequest + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future unsubscribePullRequest( + UnsubscribePullRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + UnsubscribePullRequestRequest, UnsubscribePullRequestResponse> + handler); + /** * Updates the build pipeline. * @@ -1406,6 +2159,92 @@ java.util.concurrent.Future updateProject( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Update the project notification preference for the user passed as path param + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + updateProjectNotificationPreference( + UpdateProjectNotificationPreferenceRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateProjectNotificationPreferenceRequest, + UpdateProjectNotificationPreferenceResponse> + handler); + + /** + * Updates the repository settings for a project. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + updateProjectRepositorySettings( + UpdateProjectRepositorySettingsRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateProjectRepositorySettingsRequest, + UpdateProjectRepositorySettingsResponse> + handler); + + /** + * Updates the PullRequest + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updatePullRequest( + UpdatePullRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdatePullRequestRequest, UpdatePullRequestResponse> + handler); + + /** + * Updates the PullRequest comment + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updatePullRequestComment( + UpdatePullRequestCommentRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdatePullRequestCommentRequest, UpdatePullRequestCommentResponse> + handler); + + /** + * Update the pull request notification preference for the user passed as path param + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + updatePullRequestNotificationPreference( + UpdatePullRequestNotificationPreferenceRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdatePullRequestNotificationPreferenceRequest, + UpdatePullRequestNotificationPreferenceResponse> + handler); + /** * Updates the repository. * @@ -1421,6 +2260,40 @@ java.util.concurrent.Future updateRepository( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Update the repository notification preference for the user passed as path param + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + updateRepositoryNotificationPreference( + UpdateRepositoryNotificationPreferenceRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateRepositoryNotificationPreferenceRequest, + UpdateRepositoryNotificationPreferenceResponse> + handler); + + /** + * Updates the settings for a repository. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateRepositorySettings( + UpdateRepositorySettingsRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateRepositorySettingsRequest, UpdateRepositorySettingsResponse> + handler); + /** * Updates the trigger. * diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/DevopsAsyncClient.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/DevopsAsyncClient.java index 776e86f20c4..59542e47c5f 100644 --- a/bmc-devops/src/main/java/com/oracle/bmc/devops/DevopsAsyncClient.java +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/DevopsAsyncClient.java @@ -299,7 +299,8 @@ public DevopsAsyncClient( if (com.oracle.bmc.http.ApacheUtils.isExtraStreamLogsEnabled()) { LOG.warn( com.oracle.bmc.http.ApacheUtils.getStreamWarningMessage( - "DevopsAsyncClient", "getObjectContent,getRepositoryArchiveContent")); + "DevopsAsyncClient", + "getObjectContent,getPullRequestAttachmentContent,getRepositoryArchiveContent,unsubscribePullRequest")); } } @@ -1201,6 +1202,116 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future createOrUpdateGitRef( + CreateOrUpdateGitRefRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateOrUpdateGitRefRequest, CreateOrUpdateGitRefResponse> + handler) { + LOG.trace("Called async createOrUpdateGitRef"); + final CreateOrUpdateGitRefRequest interceptedRequest = + CreateOrUpdateGitRefConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateOrUpdateGitRefConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "CreateOrUpdateGitRef", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/CreateOrUpdateGitRef"); + final java.util.function.Function + transformer = + CreateOrUpdateGitRefConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateOrUpdateGitRefRequest, CreateOrUpdateGitRefResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateOrUpdateGitRefRequest, CreateOrUpdateGitRefResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateOrUpdateGitRefDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateOrUpdateGitRefRequest, CreateOrUpdateGitRefResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + createOrUpdateProtectedBranch( + CreateOrUpdateProtectedBranchRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateOrUpdateProtectedBranchRequest, + CreateOrUpdateProtectedBranchResponse> + handler) { + LOG.trace("Called async createOrUpdateProtectedBranch"); + final CreateOrUpdateProtectedBranchRequest interceptedRequest = + CreateOrUpdateProtectedBranchConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateOrUpdateProtectedBranchConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "CreateOrUpdateProtectedBranch", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProtectedBranch/CreateOrUpdateProtectedBranch"); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateOrUpdateProtectedBranchResponse> + transformer = + CreateOrUpdateProtectedBranchConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateOrUpdateProtectedBranchRequest, CreateOrUpdateProtectedBranchResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateOrUpdateProtectedBranchRequest, + CreateOrUpdateProtectedBranchResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateOrUpdateProtectedBranchDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateOrUpdateProtectedBranchRequest, CreateOrUpdateProtectedBranchResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future createProject( CreateProjectRequest request, @@ -1251,6 +1362,181 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future createPullRequest( + CreatePullRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreatePullRequestRequest, CreatePullRequestResponse> + handler) { + LOG.trace("Called async createPullRequest"); + final CreatePullRequestRequest interceptedRequest = + CreatePullRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreatePullRequestConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "CreatePullRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/CreatePullRequest"); + final java.util.function.Function + transformer = + CreatePullRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreatePullRequestRequest, CreatePullRequestResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreatePullRequestDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreatePullRequestRequest, CreatePullRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + createPullRequestAttachment( + CreatePullRequestAttachmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreatePullRequestAttachmentRequest, + CreatePullRequestAttachmentResponse> + handler) { + LOG.trace("Called async createPullRequestAttachment"); + if (request.getRetryConfiguration() != null + || authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + request = + com.oracle.bmc.retrier.Retriers.wrapBodyInputStreamIfNecessary( + request, CreatePullRequestAttachmentRequest.builder()); + } + final CreatePullRequestAttachmentRequest interceptedRequest = + CreatePullRequestAttachmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreatePullRequestAttachmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "CreatePullRequestAttachment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/CreatePullRequestAttachment"); + final java.util.function.Function< + javax.ws.rs.core.Response, CreatePullRequestAttachmentResponse> + transformer = + CreatePullRequestAttachmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreatePullRequestAttachmentRequest, CreatePullRequestAttachmentResponse> + handlerToUse = + new com.oracle.bmc.responses.internal.StreamClosingAsyncHandler<>(handler); + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreatePullRequestAttachmentRequest, + CreatePullRequestAttachmentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreatePullRequestAttachmentBody(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreatePullRequestAttachmentRequest, CreatePullRequestAttachmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() { + LOG.debug("Resetting stream"); + com.oracle.bmc.retrier.Retriers.tryResetStreamForRetry( + interceptedRequest.getCreatePullRequestAttachmentBody(), true); + } + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createPullRequestComment( + CreatePullRequestCommentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreatePullRequestCommentRequest, CreatePullRequestCommentResponse> + handler) { + LOG.trace("Called async createPullRequestComment"); + final CreatePullRequestCommentRequest interceptedRequest = + CreatePullRequestCommentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreatePullRequestCommentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "CreatePullRequestComment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/CreatePullRequestComment"); + final java.util.function.Function< + javax.ws.rs.core.Response, CreatePullRequestCommentResponse> + transformer = + CreatePullRequestCommentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreatePullRequestCommentRequest, CreatePullRequestCommentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreatePullRequestCommentRequest, CreatePullRequestCommentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreatePullRequestCommentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreatePullRequestCommentRequest, CreatePullRequestCommentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future createRepository( CreateRepositoryRequest request, @@ -1353,6 +1639,52 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future declinePullRequest( + DeclinePullRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeclinePullRequestRequest, DeclinePullRequestResponse> + handler) { + LOG.trace("Called async declinePullRequest"); + final DeclinePullRequestRequest interceptedRequest = + DeclinePullRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeclinePullRequestConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "DeclinePullRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/DeclinePullRequest"); + final java.util.function.Function + transformer = + DeclinePullRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeclinePullRequestRequest, DeclinePullRequestResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeclinePullRequestRequest, DeclinePullRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteBuildPipeline( DeleteBuildPipelineRequest request, @@ -1682,6 +2014,56 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future deleteGitRef( + DeleteGitRefRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async deleteGitRef"); + final DeleteGitRefRequest interceptedRequest = + DeleteGitRefConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteGitRefConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "DeleteGitRef", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/DeleteGitRef"); + final java.util.function.Function + transformer = + DeleteGitRefConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteGitRefRequest, DeleteGitRefResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getDeleteGitRefDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteGitRefRequest, DeleteGitRefResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteProject( DeleteProjectRequest request, @@ -1727,10 +2109,262 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future deleteRef( - DeleteRefRequest request, - final com.oracle.bmc.responses.AsyncHandler - handler) { + public java.util.concurrent.Future + deleteProjectRepositorySettings( + DeleteProjectRepositorySettingsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteProjectRepositorySettingsRequest, + DeleteProjectRepositorySettingsResponse> + handler) { + LOG.trace("Called async deleteProjectRepositorySettings"); + final DeleteProjectRepositorySettingsRequest interceptedRequest = + DeleteProjectRepositorySettingsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteProjectRepositorySettingsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "DeleteProjectRepositorySettings", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProjectRepositorySettings/DeleteProjectRepositorySettings"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteProjectRepositorySettingsResponse> + transformer = + DeleteProjectRepositorySettingsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteProjectRepositorySettingsRequest, + DeleteProjectRepositorySettingsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteProjectRepositorySettingsRequest, + DeleteProjectRepositorySettingsResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteProjectRepositorySettingsRequest, + DeleteProjectRepositorySettingsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteProtectedBranch( + DeleteProtectedBranchRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteProtectedBranchRequest, DeleteProtectedBranchResponse> + handler) { + LOG.trace("Called async deleteProtectedBranch"); + final DeleteProtectedBranchRequest interceptedRequest = + DeleteProtectedBranchConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteProtectedBranchConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "DeleteProtectedBranch", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProtectedBranch/DeleteProtectedBranch"); + final java.util.function.Function + transformer = + DeleteProtectedBranchConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteProtectedBranchRequest, DeleteProtectedBranchResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteProtectedBranchRequest, DeleteProtectedBranchResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getDeleteProtectedBranchDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteProtectedBranchRequest, DeleteProtectedBranchResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deletePullRequest( + DeletePullRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeletePullRequestRequest, DeletePullRequestResponse> + handler) { + LOG.trace("Called async deletePullRequest"); + final DeletePullRequestRequest interceptedRequest = + DeletePullRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeletePullRequestConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "DeletePullRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/DeletePullRequest"); + final java.util.function.Function + transformer = + DeletePullRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeletePullRequestRequest, DeletePullRequestResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeletePullRequestRequest, DeletePullRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + deletePullRequestAttachment( + DeletePullRequestAttachmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeletePullRequestAttachmentRequest, + DeletePullRequestAttachmentResponse> + handler) { + LOG.trace("Called async deletePullRequestAttachment"); + final DeletePullRequestAttachmentRequest interceptedRequest = + DeletePullRequestAttachmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeletePullRequestAttachmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "DeletePullRequestAttachment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/DeletePullRequestAttachment"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeletePullRequestAttachmentResponse> + transformer = + DeletePullRequestAttachmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeletePullRequestAttachmentRequest, DeletePullRequestAttachmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeletePullRequestAttachmentRequest, + DeletePullRequestAttachmentResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeletePullRequestAttachmentRequest, DeletePullRequestAttachmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deletePullRequestComment( + DeletePullRequestCommentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeletePullRequestCommentRequest, DeletePullRequestCommentResponse> + handler) { + LOG.trace("Called async deletePullRequestComment"); + final DeletePullRequestCommentRequest interceptedRequest = + DeletePullRequestCommentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeletePullRequestCommentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "DeletePullRequestComment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/DeletePullRequestComment"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeletePullRequestCommentResponse> + transformer = + DeletePullRequestCommentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeletePullRequestCommentRequest, DeletePullRequestCommentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeletePullRequestCommentRequest, DeletePullRequestCommentResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeletePullRequestCommentRequest, DeletePullRequestCommentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteRef( + DeleteRefRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { LOG.trace("Called async deleteRef"); final DeleteRefRequest interceptedRequest = DeleteRefConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = @@ -1815,6 +2449,55 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future deleteRepositorySettings( + DeleteRepositorySettingsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteRepositorySettingsRequest, DeleteRepositorySettingsResponse> + handler) { + LOG.trace("Called async deleteRepositorySettings"); + final DeleteRepositorySettingsRequest interceptedRequest = + DeleteRepositorySettingsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteRepositorySettingsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "DeleteRepositorySettings", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositorySettings/DeleteRepositorySettings"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteRepositorySettingsResponse> + transformer = + DeleteRepositorySettingsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteRepositorySettingsRequest, DeleteRepositorySettingsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteRepositorySettingsRequest, DeleteRepositorySettingsResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteRepositorySettingsRequest, DeleteRepositorySettingsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteTrigger( DeleteTriggerRequest request, @@ -2576,32 +3259,46 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future getRef( - GetRefRequest request, - final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async getRef"); - final GetRefRequest interceptedRequest = GetRefConverter.interceptRequest(request); + public java.util.concurrent.Future + getProjectNotificationPreference( + GetProjectNotificationPreferenceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetProjectNotificationPreferenceRequest, + GetProjectNotificationPreferenceResponse> + handler) { + LOG.trace("Called async getProjectNotificationPreference"); + final GetProjectNotificationPreferenceRequest interceptedRequest = + GetProjectNotificationPreferenceConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetRefConverter.fromRequest(client, interceptedRequest); + GetProjectNotificationPreferenceConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "GetRef", + "GetProjectNotificationPreference", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRef"); - final java.util.function.Function transformer = - GetRefConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProjectNotificationPreference/GetProjectNotificationPreference"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetProjectNotificationPreferenceResponse> + transformer = + GetProjectNotificationPreferenceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetProjectNotificationPreferenceRequest, + GetProjectNotificationPreferenceResponse> + handlerToUse = handler; java.util.function.Function< - com.oracle.bmc.responses.AsyncHandler, - java.util.concurrent.Future> + com.oracle.bmc.responses.AsyncHandler< + GetProjectNotificationPreferenceRequest, + GetProjectNotificationPreferenceResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetRefRequest, GetRefResponse>( + GetProjectNotificationPreferenceRequest, + GetProjectNotificationPreferenceResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -2615,39 +3312,44 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future getRepoFileDiff( - GetRepoFileDiffRequest request, - final com.oracle.bmc.responses.AsyncHandler< - GetRepoFileDiffRequest, GetRepoFileDiffResponse> - handler) { - LOG.trace("Called async getRepoFileDiff"); - final GetRepoFileDiffRequest interceptedRequest = - GetRepoFileDiffConverter.interceptRequest(request); + public java.util.concurrent.Future + getProjectRepositorySettings( + GetProjectRepositorySettingsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetProjectRepositorySettingsRequest, + GetProjectRepositorySettingsResponse> + handler) { + LOG.trace("Called async getProjectRepositorySettings"); + final GetProjectRepositorySettingsRequest interceptedRequest = + GetProjectRepositorySettingsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetRepoFileDiffConverter.fromRequest(client, interceptedRequest); + GetProjectRepositorySettingsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "GetRepoFileDiff", + "GetProjectRepositorySettings", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepoFileDiff"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProjectRepositorySettings/GetProjectRepositorySettings"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetProjectRepositorySettingsResponse> transformer = - GetRepoFileDiffConverter.fromResponse( + GetProjectRepositorySettingsConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + GetProjectRepositorySettingsRequest, GetProjectRepositorySettingsResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetRepoFileDiffRequest, GetRepoFileDiffResponse>, - java.util.concurrent.Future> + GetProjectRepositorySettingsRequest, + GetProjectRepositorySettingsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetRepoFileDiffRequest, GetRepoFileDiffResponse>( + GetProjectRepositorySettingsRequest, GetProjectRepositorySettingsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -2661,39 +3363,38 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future getRepoFileLines( - GetRepoFileLinesRequest request, + public java.util.concurrent.Future getPullRequest( + GetPullRequestRequest request, final com.oracle.bmc.responses.AsyncHandler< - GetRepoFileLinesRequest, GetRepoFileLinesResponse> + GetPullRequestRequest, GetPullRequestResponse> handler) { - LOG.trace("Called async getRepoFileLines"); - final GetRepoFileLinesRequest interceptedRequest = - GetRepoFileLinesConverter.interceptRequest(request); + LOG.trace("Called async getPullRequest"); + final GetPullRequestRequest interceptedRequest = + GetPullRequestConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetRepoFileLinesConverter.fromRequest(client, interceptedRequest); + GetPullRequestConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "GetRepoFileLines", + "GetPullRequest", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepoFileLines"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/GetPullRequest"); + final java.util.function.Function transformer = - GetRepoFileLinesConverter.fromResponse( - java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + GetPullRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetRepoFileLinesRequest, GetRepoFileLinesResponse>, - java.util.concurrent.Future> + GetPullRequestRequest, GetPullRequestResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetRepoFileLinesRequest, GetRepoFileLinesResponse>( + GetPullRequestRequest, GetPullRequestResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -2707,37 +3408,41 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future getRepository( - GetRepositoryRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future getPullRequestAttachment( + GetPullRequestAttachmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetPullRequestAttachmentRequest, GetPullRequestAttachmentResponse> handler) { - LOG.trace("Called async getRepository"); - final GetRepositoryRequest interceptedRequest = - GetRepositoryConverter.interceptRequest(request); + LOG.trace("Called async getPullRequestAttachment"); + final GetPullRequestAttachmentRequest interceptedRequest = + GetPullRequestAttachmentConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetRepositoryConverter.fromRequest(client, interceptedRequest); + GetPullRequestAttachmentConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "GetRepository", + "GetPullRequestAttachment", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepository"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/GetPullRequestAttachment"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetPullRequestAttachmentResponse> transformer = - GetRepositoryConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + GetPullRequestAttachmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetPullRequestAttachmentRequest, GetPullRequestAttachmentResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetRepositoryRequest, GetRepositoryResponse>, - java.util.concurrent.Future> + GetPullRequestAttachmentRequest, GetPullRequestAttachmentResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetRepositoryRequest, GetRepositoryResponse>( + GetPullRequestAttachmentRequest, GetPullRequestAttachmentResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -2751,44 +3456,46 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - getRepositoryArchiveContent( - GetRepositoryArchiveContentRequest request, + public java.util.concurrent.Future + getPullRequestAttachmentContent( + GetPullRequestAttachmentContentRequest request, final com.oracle.bmc.responses.AsyncHandler< - GetRepositoryArchiveContentRequest, - GetRepositoryArchiveContentResponse> + GetPullRequestAttachmentContentRequest, + GetPullRequestAttachmentContentResponse> handler) { - LOG.trace("Called async getRepositoryArchiveContent"); - final GetRepositoryArchiveContentRequest interceptedRequest = - GetRepositoryArchiveContentConverter.interceptRequest(request); + LOG.trace("Called async getPullRequestAttachmentContent"); + final GetPullRequestAttachmentContentRequest interceptedRequest = + GetPullRequestAttachmentContentConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetRepositoryArchiveContentConverter.fromRequest(client, interceptedRequest); + GetPullRequestAttachmentContentConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "GetRepositoryArchiveContent", + "GetPullRequestAttachmentContent", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepositoryArchiveContent"); + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/GetPullRequestAttachmentContent"); final java.util.function.Function< - javax.ws.rs.core.Response, GetRepositoryArchiveContentResponse> + javax.ws.rs.core.Response, GetPullRequestAttachmentContentResponse> transformer = - GetRepositoryArchiveContentConverter.fromResponse( + GetPullRequestAttachmentContentConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - GetRepositoryArchiveContentRequest, GetRepositoryArchiveContentResponse> + GetPullRequestAttachmentContentRequest, + GetPullRequestAttachmentContentResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetRepositoryArchiveContentRequest, - GetRepositoryArchiveContentResponse>, - java.util.concurrent.Future> + GetPullRequestAttachmentContentRequest, + GetPullRequestAttachmentContentResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetRepositoryArchiveContentRequest, GetRepositoryArchiveContentResponse>( + GetPullRequestAttachmentContentRequest, + GetPullRequestAttachmentContentResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -2802,40 +3509,46 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future getRepositoryFileLines( - GetRepositoryFileLinesRequest request, - final com.oracle.bmc.responses.AsyncHandler< - GetRepositoryFileLinesRequest, GetRepositoryFileLinesResponse> - handler) { - LOG.trace("Called async getRepositoryFileLines"); - final GetRepositoryFileLinesRequest interceptedRequest = - GetRepositoryFileLinesConverter.interceptRequest(request); + public java.util.concurrent.Future + getPullRequestChangeSummaryMetrics( + GetPullRequestChangeSummaryMetricsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetPullRequestChangeSummaryMetricsRequest, + GetPullRequestChangeSummaryMetricsResponse> + handler) { + LOG.trace("Called async getPullRequestChangeSummaryMetrics"); + final GetPullRequestChangeSummaryMetricsRequest interceptedRequest = + GetPullRequestChangeSummaryMetricsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetRepositoryFileLinesConverter.fromRequest(client, interceptedRequest); + GetPullRequestChangeSummaryMetricsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "GetRepositoryFileLines", + "GetPullRequestChangeSummaryMetrics", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepositoryFileLines"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/GetPullRequestChangeSummaryMetrics"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetPullRequestChangeSummaryMetricsResponse> transformer = - GetRepositoryFileLinesConverter.fromResponse( + GetPullRequestChangeSummaryMetricsConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - GetRepositoryFileLinesRequest, GetRepositoryFileLinesResponse> + GetPullRequestChangeSummaryMetricsRequest, + GetPullRequestChangeSummaryMetricsResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetRepositoryFileLinesRequest, GetRepositoryFileLinesResponse>, - java.util.concurrent.Future> + GetPullRequestChangeSummaryMetricsRequest, + GetPullRequestChangeSummaryMetricsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetRepositoryFileLinesRequest, GetRepositoryFileLinesResponse>( + GetPullRequestChangeSummaryMetricsRequest, + GetPullRequestChangeSummaryMetricsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -2849,36 +3562,40 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future getTrigger( - GetTriggerRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future getPullRequestComment( + GetPullRequestCommentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetPullRequestCommentRequest, GetPullRequestCommentResponse> handler) { - LOG.trace("Called async getTrigger"); - final GetTriggerRequest interceptedRequest = GetTriggerConverter.interceptRequest(request); + LOG.trace("Called async getPullRequestComment"); + final GetPullRequestCommentRequest interceptedRequest = + GetPullRequestCommentConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetTriggerConverter.fromRequest(client, interceptedRequest); + GetPullRequestCommentConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "GetTrigger", + "GetPullRequestComment", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Trigger/GetTrigger"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/GetPullRequestComment"); + final java.util.function.Function transformer = - GetTriggerConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler handlerToUse = - handler; + GetPullRequestCommentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetPullRequestCommentRequest, GetPullRequestCommentResponse> + handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetTriggerRequest, GetTriggerResponse>, - java.util.concurrent.Future> + GetPullRequestCommentRequest, GetPullRequestCommentResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetTriggerRequest, GetTriggerResponse>( + GetPullRequestCommentRequest, GetPullRequestCommentResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -2892,38 +3609,47 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future getWorkRequest( - GetWorkRequestRequest request, - final com.oracle.bmc.responses.AsyncHandler< - GetWorkRequestRequest, GetWorkRequestResponse> - handler) { - LOG.trace("Called async getWorkRequest"); - final GetWorkRequestRequest interceptedRequest = - GetWorkRequestConverter.interceptRequest(request); + public java.util.concurrent.Future + getPullRequestNotificationPreference( + GetPullRequestNotificationPreferenceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetPullRequestNotificationPreferenceRequest, + GetPullRequestNotificationPreferenceResponse> + handler) { + LOG.trace("Called async getPullRequestNotificationPreference"); + final GetPullRequestNotificationPreferenceRequest interceptedRequest = + GetPullRequestNotificationPreferenceConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetWorkRequestConverter.fromRequest(client, interceptedRequest); + GetPullRequestNotificationPreferenceConverter.fromRequest( + client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "GetWorkRequest", + "GetPullRequestNotificationPreference", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/WorkRequest/GetWorkRequest"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequestNotificationPreference/GetPullRequestNotificationPreference"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetPullRequestNotificationPreferenceResponse> transformer = - GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + GetPullRequestNotificationPreferenceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetPullRequestNotificationPreferenceRequest, + GetPullRequestNotificationPreferenceResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetWorkRequestRequest, GetWorkRequestResponse>, - java.util.concurrent.Future> + GetPullRequestNotificationPreferenceRequest, + GetPullRequestNotificationPreferenceResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetWorkRequestRequest, GetWorkRequestResponse>( + GetPullRequestNotificationPreferenceRequest, + GetPullRequestNotificationPreferenceResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -2937,37 +3663,32 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listAuthors( - ListAuthorsRequest request, - final com.oracle.bmc.responses.AsyncHandler - handler) { - LOG.trace("Called async listAuthors"); - final ListAuthorsRequest interceptedRequest = - ListAuthorsConverter.interceptRequest(request); + public java.util.concurrent.Future getRef( + GetRefRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { + LOG.trace("Called async getRef"); + final GetRefRequest interceptedRequest = GetRefConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAuthorsConverter.fromRequest(client, interceptedRequest); + GetRefConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListAuthors", + "GetRef", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListAuthors"); - final java.util.function.Function - transformer = - ListAuthorsConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler - handlerToUse = handler; + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRef"); + final java.util.function.Function transformer = + GetRefConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< - com.oracle.bmc.responses.AsyncHandler< - ListAuthorsRequest, ListAuthorsResponse>, - java.util.concurrent.Future> + com.oracle.bmc.responses.AsyncHandler, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListAuthorsRequest, ListAuthorsResponse>( + GetRefRequest, GetRefResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -2981,41 +3702,39 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listBuildPipelineStages( - ListBuildPipelineStagesRequest request, + public java.util.concurrent.Future getRepoFileDiff( + GetRepoFileDiffRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListBuildPipelineStagesRequest, ListBuildPipelineStagesResponse> + GetRepoFileDiffRequest, GetRepoFileDiffResponse> handler) { - LOG.trace("Called async listBuildPipelineStages"); - final ListBuildPipelineStagesRequest interceptedRequest = - ListBuildPipelineStagesConverter.interceptRequest(request); + LOG.trace("Called async getRepoFileDiff"); + final GetRepoFileDiffRequest interceptedRequest = + GetRepoFileDiffConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListBuildPipelineStagesConverter.fromRequest(client, interceptedRequest); + GetRepoFileDiffConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListBuildPipelineStages", + "GetRepoFileDiff", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildPipelineStageSummary/ListBuildPipelineStages"); - final java.util.function.Function< - javax.ws.rs.core.Response, ListBuildPipelineStagesResponse> + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepoFileDiff"); + final java.util.function.Function transformer = - ListBuildPipelineStagesConverter.fromResponse( + GetRepoFileDiffConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler< - ListBuildPipelineStagesRequest, ListBuildPipelineStagesResponse> + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListBuildPipelineStagesRequest, ListBuildPipelineStagesResponse>, - java.util.concurrent.Future> + GetRepoFileDiffRequest, GetRepoFileDiffResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListBuildPipelineStagesRequest, ListBuildPipelineStagesResponse>( + GetRepoFileDiffRequest, GetRepoFileDiffResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3029,39 +3748,39 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listBuildPipelines( - ListBuildPipelinesRequest request, + public java.util.concurrent.Future getRepoFileLines( + GetRepoFileLinesRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListBuildPipelinesRequest, ListBuildPipelinesResponse> + GetRepoFileLinesRequest, GetRepoFileLinesResponse> handler) { - LOG.trace("Called async listBuildPipelines"); - final ListBuildPipelinesRequest interceptedRequest = - ListBuildPipelinesConverter.interceptRequest(request); + LOG.trace("Called async getRepoFileLines"); + final GetRepoFileLinesRequest interceptedRequest = + GetRepoFileLinesConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListBuildPipelinesConverter.fromRequest(client, interceptedRequest); + GetRepoFileLinesConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListBuildPipelines", + "GetRepoFileLines", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildPipelineCollection/ListBuildPipelines"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepoFileLines"); + final java.util.function.Function transformer = - ListBuildPipelinesConverter.fromResponse( + GetRepoFileLinesConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListBuildPipelinesRequest, ListBuildPipelinesResponse>, - java.util.concurrent.Future> + GetRepoFileLinesRequest, GetRepoFileLinesResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListBuildPipelinesRequest, ListBuildPipelinesResponse>( + GetRepoFileLinesRequest, GetRepoFileLinesResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3075,37 +3794,37 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listBuildRuns( - ListBuildRunsRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future getRepository( + GetRepositoryRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async listBuildRuns"); - final ListBuildRunsRequest interceptedRequest = - ListBuildRunsConverter.interceptRequest(request); + LOG.trace("Called async getRepository"); + final GetRepositoryRequest interceptedRequest = + GetRepositoryConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListBuildRunsConverter.fromRequest(client, interceptedRequest); + GetRepositoryConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListBuildRuns", + "GetRepository", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildRunSummary/ListBuildRuns"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepository"); + final java.util.function.Function transformer = - ListBuildRunsConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + GetRepositoryConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListBuildRunsRequest, ListBuildRunsResponse>, - java.util.concurrent.Future> + GetRepositoryRequest, GetRepositoryResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListBuildRunsRequest, ListBuildRunsResponse>( + GetRepositoryRequest, GetRepositoryResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3119,39 +3838,44 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listCommitDiffs( - ListCommitDiffsRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ListCommitDiffsRequest, ListCommitDiffsResponse> - handler) { - LOG.trace("Called async listCommitDiffs"); - final ListCommitDiffsRequest interceptedRequest = - ListCommitDiffsConverter.interceptRequest(request); + public java.util.concurrent.Future + getRepositoryArchiveContent( + GetRepositoryArchiveContentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetRepositoryArchiveContentRequest, + GetRepositoryArchiveContentResponse> + handler) { + LOG.trace("Called async getRepositoryArchiveContent"); + final GetRepositoryArchiveContentRequest interceptedRequest = + GetRepositoryArchiveContentConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListCommitDiffsConverter.fromRequest(client, interceptedRequest); + GetRepositoryArchiveContentConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListCommitDiffs", + "GetRepositoryArchiveContent", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListCommitDiffs"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepositoryArchiveContent"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetRepositoryArchiveContentResponse> transformer = - ListCommitDiffsConverter.fromResponse( + GetRepositoryArchiveContentConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + GetRepositoryArchiveContentRequest, GetRepositoryArchiveContentResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListCommitDiffsRequest, ListCommitDiffsResponse>, - java.util.concurrent.Future> + GetRepositoryArchiveContentRequest, + GetRepositoryArchiveContentResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListCommitDiffsRequest, ListCommitDiffsResponse>( + GetRepositoryArchiveContentRequest, GetRepositoryArchiveContentResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3165,37 +3889,40 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listCommits( - ListCommitsRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future getRepositoryFileLines( + GetRepositoryFileLinesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetRepositoryFileLinesRequest, GetRepositoryFileLinesResponse> handler) { - LOG.trace("Called async listCommits"); - final ListCommitsRequest interceptedRequest = - ListCommitsConverter.interceptRequest(request); + LOG.trace("Called async getRepositoryFileLines"); + final GetRepositoryFileLinesRequest interceptedRequest = + GetRepositoryFileLinesConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListCommitsConverter.fromRequest(client, interceptedRequest); + GetRepositoryFileLinesConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListCommits", + "GetRepositoryFileLines", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryCommit/ListCommits"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepositoryFileLines"); + final java.util.function.Function transformer = - ListCommitsConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + GetRepositoryFileLinesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetRepositoryFileLinesRequest, GetRepositoryFileLinesResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListCommitsRequest, ListCommitsResponse>, - java.util.concurrent.Future> + GetRepositoryFileLinesRequest, GetRepositoryFileLinesResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListCommitsRequest, ListCommitsResponse>( + GetRepositoryFileLinesRequest, GetRepositoryFileLinesResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3209,39 +3936,47 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listConnections( - ListConnectionsRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ListConnectionsRequest, ListConnectionsResponse> - handler) { - LOG.trace("Called async listConnections"); - final ListConnectionsRequest interceptedRequest = - ListConnectionsConverter.interceptRequest(request); + public java.util.concurrent.Future + getRepositoryNotificationPreference( + GetRepositoryNotificationPreferenceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetRepositoryNotificationPreferenceRequest, + GetRepositoryNotificationPreferenceResponse> + handler) { + LOG.trace("Called async getRepositoryNotificationPreference"); + final GetRepositoryNotificationPreferenceRequest interceptedRequest = + GetRepositoryNotificationPreferenceConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListConnectionsConverter.fromRequest(client, interceptedRequest); + GetRepositoryNotificationPreferenceConverter.fromRequest( + client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListConnections", + "GetRepositoryNotificationPreference", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ConnectionCollection/ListConnections"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryNotificationPreference/GetRepositoryNotificationPreference"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetRepositoryNotificationPreferenceResponse> transformer = - ListConnectionsConverter.fromResponse( + GetRepositoryNotificationPreferenceConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + GetRepositoryNotificationPreferenceRequest, + GetRepositoryNotificationPreferenceResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListConnectionsRequest, ListConnectionsResponse>, - java.util.concurrent.Future> + GetRepositoryNotificationPreferenceRequest, + GetRepositoryNotificationPreferenceResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListConnectionsRequest, ListConnectionsResponse>( + GetRepositoryNotificationPreferenceRequest, + GetRepositoryNotificationPreferenceResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3255,40 +3990,40 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listDeployArtifacts( - ListDeployArtifactsRequest request, + public java.util.concurrent.Future getRepositorySettings( + GetRepositorySettingsRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListDeployArtifactsRequest, ListDeployArtifactsResponse> + GetRepositorySettingsRequest, GetRepositorySettingsResponse> handler) { - LOG.trace("Called async listDeployArtifacts"); - final ListDeployArtifactsRequest interceptedRequest = - ListDeployArtifactsConverter.interceptRequest(request); + LOG.trace("Called async getRepositorySettings"); + final GetRepositorySettingsRequest interceptedRequest = + GetRepositorySettingsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDeployArtifactsConverter.fromRequest(client, interceptedRequest); + GetRepositorySettingsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListDeployArtifacts", + "GetRepositorySettings", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployArtifactSummary/ListDeployArtifacts"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositorySettings/GetRepositorySettings"); + final java.util.function.Function transformer = - ListDeployArtifactsConverter.fromResponse( + GetRepositorySettingsConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - ListDeployArtifactsRequest, ListDeployArtifactsResponse> + GetRepositorySettingsRequest, GetRepositorySettingsResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListDeployArtifactsRequest, ListDeployArtifactsResponse>, - java.util.concurrent.Future> + GetRepositorySettingsRequest, GetRepositorySettingsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListDeployArtifactsRequest, ListDeployArtifactsResponse>( + GetRepositorySettingsRequest, GetRepositorySettingsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3302,40 +4037,36 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listDeployEnvironments( - ListDeployEnvironmentsRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ListDeployEnvironmentsRequest, ListDeployEnvironmentsResponse> + public java.util.concurrent.Future getTrigger( + GetTriggerRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async listDeployEnvironments"); - final ListDeployEnvironmentsRequest interceptedRequest = - ListDeployEnvironmentsConverter.interceptRequest(request); + LOG.trace("Called async getTrigger"); + final GetTriggerRequest interceptedRequest = GetTriggerConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDeployEnvironmentsConverter.fromRequest(client, interceptedRequest); + GetTriggerConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListDeployEnvironments", + "GetTrigger", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployEnvironmentSummary/ListDeployEnvironments"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Trigger/GetTrigger"); + final java.util.function.Function transformer = - ListDeployEnvironmentsConverter.fromResponse( - java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler< - ListDeployEnvironmentsRequest, ListDeployEnvironmentsResponse> - handlerToUse = handler; + GetTriggerConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListDeployEnvironmentsRequest, ListDeployEnvironmentsResponse>, - java.util.concurrent.Future> + GetTriggerRequest, GetTriggerResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListDeployEnvironmentsRequest, ListDeployEnvironmentsResponse>( + GetTriggerRequest, GetTriggerResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3349,40 +4080,38 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listDeployPipelines( - ListDeployPipelinesRequest request, + public java.util.concurrent.Future getWorkRequest( + GetWorkRequestRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListDeployPipelinesRequest, ListDeployPipelinesResponse> + GetWorkRequestRequest, GetWorkRequestResponse> handler) { - LOG.trace("Called async listDeployPipelines"); - final ListDeployPipelinesRequest interceptedRequest = - ListDeployPipelinesConverter.interceptRequest(request); + LOG.trace("Called async getWorkRequest"); + final GetWorkRequestRequest interceptedRequest = + GetWorkRequestConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDeployPipelinesConverter.fromRequest(client, interceptedRequest); + GetWorkRequestConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListDeployPipelines", + "GetWorkRequest", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployPipelineSummary/ListDeployPipelines"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/WorkRequest/GetWorkRequest"); + final java.util.function.Function transformer = - ListDeployPipelinesConverter.fromResponse( - java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler< - ListDeployPipelinesRequest, ListDeployPipelinesResponse> + GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListDeployPipelinesRequest, ListDeployPipelinesResponse>, - java.util.concurrent.Future> + GetWorkRequestRequest, GetWorkRequestResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListDeployPipelinesRequest, ListDeployPipelinesResponse>( + GetWorkRequestRequest, GetWorkRequestResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3396,39 +4125,40 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listDeployStages( - ListDeployStagesRequest request, + public java.util.concurrent.Future likePullRequestComment( + LikePullRequestCommentRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListDeployStagesRequest, ListDeployStagesResponse> + LikePullRequestCommentRequest, LikePullRequestCommentResponse> handler) { - LOG.trace("Called async listDeployStages"); - final ListDeployStagesRequest interceptedRequest = - ListDeployStagesConverter.interceptRequest(request); + LOG.trace("Called async likePullRequestComment"); + final LikePullRequestCommentRequest interceptedRequest = + LikePullRequestCommentConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDeployStagesConverter.fromRequest(client, interceptedRequest); + LikePullRequestCommentConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListDeployStages", + "LikePullRequestComment", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployStageSummary/ListDeployStages"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/LikePullRequestComment"); + final java.util.function.Function transformer = - ListDeployStagesConverter.fromResponse( + LikePullRequestCommentConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + LikePullRequestCommentRequest, LikePullRequestCommentResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListDeployStagesRequest, ListDeployStagesResponse>, - java.util.concurrent.Future> - futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + LikePullRequestCommentRequest, LikePullRequestCommentResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListDeployStagesRequest, ListDeployStagesResponse>( + LikePullRequestCommentRequest, LikePullRequestCommentResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3442,39 +4172,37 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listDeployments( - ListDeploymentsRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ListDeploymentsRequest, ListDeploymentsResponse> + public java.util.concurrent.Future listAuthors( + ListAuthorsRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async listDeployments"); - final ListDeploymentsRequest interceptedRequest = - ListDeploymentsConverter.interceptRequest(request); + LOG.trace("Called async listAuthors"); + final ListAuthorsRequest interceptedRequest = + ListAuthorsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDeploymentsConverter.fromRequest(client, interceptedRequest); + ListAuthorsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListDeployments", + "ListAuthors", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeploymentSummary/ListDeployments"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListAuthors"); + final java.util.function.Function transformer = - ListDeploymentsConverter.fromResponse( - java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + ListAuthorsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListDeploymentsRequest, ListDeploymentsResponse>, - java.util.concurrent.Future> + ListAuthorsRequest, ListAuthorsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListDeploymentsRequest, ListDeploymentsResponse>( + ListAuthorsRequest, ListAuthorsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3488,39 +4216,41 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listMirrorRecords( - ListMirrorRecordsRequest request, + public java.util.concurrent.Future listBuildPipelineStages( + ListBuildPipelineStagesRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListMirrorRecordsRequest, ListMirrorRecordsResponse> + ListBuildPipelineStagesRequest, ListBuildPipelineStagesResponse> handler) { - LOG.trace("Called async listMirrorRecords"); - final ListMirrorRecordsRequest interceptedRequest = - ListMirrorRecordsConverter.interceptRequest(request); + LOG.trace("Called async listBuildPipelineStages"); + final ListBuildPipelineStagesRequest interceptedRequest = + ListBuildPipelineStagesConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListMirrorRecordsConverter.fromRequest(client, interceptedRequest); + ListBuildPipelineStagesConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListMirrorRecords", + "ListBuildPipelineStages", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListMirrorRecords"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildPipelineStageSummary/ListBuildPipelineStages"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListBuildPipelineStagesResponse> transformer = - ListMirrorRecordsConverter.fromResponse( + ListBuildPipelineStagesConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + ListBuildPipelineStagesRequest, ListBuildPipelineStagesResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListMirrorRecordsRequest, ListMirrorRecordsResponse>, - java.util.concurrent.Future> + ListBuildPipelineStagesRequest, ListBuildPipelineStagesResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListMirrorRecordsRequest, ListMirrorRecordsResponse>( + ListBuildPipelineStagesRequest, ListBuildPipelineStagesResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3534,35 +4264,39 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listPaths( - ListPathsRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future listBuildPipelines( + ListBuildPipelinesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListBuildPipelinesRequest, ListBuildPipelinesResponse> handler) { - LOG.trace("Called async listPaths"); - final ListPathsRequest interceptedRequest = ListPathsConverter.interceptRequest(request); + LOG.trace("Called async listBuildPipelines"); + final ListBuildPipelinesRequest interceptedRequest = + ListBuildPipelinesConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListPathsConverter.fromRequest(client, interceptedRequest); + ListBuildPipelinesConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListPaths", + "ListBuildPipelines", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryPathSummary/ListPaths"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildPipelineCollection/ListBuildPipelines"); + final java.util.function.Function transformer = - ListPathsConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler handlerToUse = - handler; + ListBuildPipelinesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; java.util.function.Function< - com.oracle.bmc.responses.AsyncHandler, - java.util.concurrent.Future> + com.oracle.bmc.responses.AsyncHandler< + ListBuildPipelinesRequest, ListBuildPipelinesResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListPathsRequest, ListPathsResponse>( + ListBuildPipelinesRequest, ListBuildPipelinesResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3576,37 +4310,40 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listProjects( - ListProjectsRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future listBuildRunSnapshots( + ListBuildRunSnapshotsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListBuildRunSnapshotsRequest, ListBuildRunSnapshotsResponse> handler) { - LOG.trace("Called async listProjects"); - final ListProjectsRequest interceptedRequest = - ListProjectsConverter.interceptRequest(request); + LOG.trace("Called async listBuildRunSnapshots"); + final ListBuildRunSnapshotsRequest interceptedRequest = + ListBuildRunSnapshotsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListProjectsConverter.fromRequest(client, interceptedRequest); + ListBuildRunSnapshotsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListProjects", + "ListBuildRunSnapshots", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProjectSummary/ListProjects"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListBuildRunSnapshots"); + final java.util.function.Function transformer = - ListProjectsConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + ListBuildRunSnapshotsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListBuildRunSnapshotsRequest, ListBuildRunSnapshotsResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListProjectsRequest, ListProjectsResponse>, - java.util.concurrent.Future> + ListBuildRunSnapshotsRequest, ListBuildRunSnapshotsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListProjectsRequest, ListProjectsResponse>( + ListBuildRunSnapshotsRequest, ListBuildRunSnapshotsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3620,34 +4357,37 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listRefs( - ListRefsRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future listBuildRuns( + ListBuildRunsRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async listRefs"); - final ListRefsRequest interceptedRequest = ListRefsConverter.interceptRequest(request); + LOG.trace("Called async listBuildRuns"); + final ListBuildRunsRequest interceptedRequest = + ListBuildRunsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListRefsConverter.fromRequest(client, interceptedRequest); + ListBuildRunsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListRefs", + "ListBuildRuns", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryRef/ListRefs"); - final java.util.function.Function transformer = - ListRefsConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler handlerToUse = - handler; + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildRunSummary/ListBuildRuns"); + final java.util.function.Function + transformer = + ListBuildRunsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; java.util.function.Function< - com.oracle.bmc.responses.AsyncHandler, - java.util.concurrent.Future> + com.oracle.bmc.responses.AsyncHandler< + ListBuildRunsRequest, ListBuildRunsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListRefsRequest, ListRefsResponse>( + ListBuildRunsRequest, ListBuildRunsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3661,39 +4401,39 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listRepositories( - ListRepositoriesRequest request, + public java.util.concurrent.Future listCommitDiffs( + ListCommitDiffsRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListRepositoriesRequest, ListRepositoriesResponse> + ListCommitDiffsRequest, ListCommitDiffsResponse> handler) { - LOG.trace("Called async listRepositories"); - final ListRepositoriesRequest interceptedRequest = - ListRepositoriesConverter.interceptRequest(request); + LOG.trace("Called async listCommitDiffs"); + final ListCommitDiffsRequest interceptedRequest = + ListCommitDiffsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListRepositoriesConverter.fromRequest(client, interceptedRequest); + ListCommitDiffsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListRepositories", + "ListCommitDiffs", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListRepositories"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListCommitDiffs"); + final java.util.function.Function transformer = - ListRepositoriesConverter.fromResponse( + ListCommitDiffsConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListRepositoriesRequest, ListRepositoriesResponse>, - java.util.concurrent.Future> + ListCommitDiffsRequest, ListCommitDiffsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListRepositoriesRequest, ListRepositoriesResponse>( + ListCommitDiffsRequest, ListCommitDiffsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3707,37 +4447,37 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listTriggers( - ListTriggersRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future listCommits( + ListCommitsRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async listTriggers"); - final ListTriggersRequest interceptedRequest = - ListTriggersConverter.interceptRequest(request); + LOG.trace("Called async listCommits"); + final ListCommitsRequest interceptedRequest = + ListCommitsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListTriggersConverter.fromRequest(client, interceptedRequest); + ListCommitsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListTriggers", + "ListCommits", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/TriggerCollection/ListTriggers"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryCommit/ListCommits"); + final java.util.function.Function transformer = - ListTriggersConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + ListCommitsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListTriggersRequest, ListTriggersResponse>, - java.util.concurrent.Future> + ListCommitsRequest, ListCommitsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListTriggersRequest, ListTriggersResponse>( + ListCommitsRequest, ListCommitsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3751,40 +4491,39 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listWorkRequestErrors( - ListWorkRequestErrorsRequest request, + public java.util.concurrent.Future listConnections( + ListConnectionsRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + ListConnectionsRequest, ListConnectionsResponse> handler) { - LOG.trace("Called async listWorkRequestErrors"); - final ListWorkRequestErrorsRequest interceptedRequest = - ListWorkRequestErrorsConverter.interceptRequest(request); + LOG.trace("Called async listConnections"); + final ListConnectionsRequest interceptedRequest = + ListConnectionsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListWorkRequestErrorsConverter.fromRequest(client, interceptedRequest); + ListConnectionsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListWorkRequestErrors", + "ListConnections", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/WorkRequestError/ListWorkRequestErrors"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ConnectionCollection/ListConnections"); + final java.util.function.Function transformer = - ListWorkRequestErrorsConverter.fromResponse( + ListConnectionsConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler< - ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>, - java.util.concurrent.Future> + ListConnectionsRequest, ListConnectionsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>( + ListConnectionsRequest, ListConnectionsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3798,40 +4537,40 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listWorkRequestLogs( - ListWorkRequestLogsRequest request, + public java.util.concurrent.Future listDeployArtifacts( + ListDeployArtifactsRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + ListDeployArtifactsRequest, ListDeployArtifactsResponse> handler) { - LOG.trace("Called async listWorkRequestLogs"); - final ListWorkRequestLogsRequest interceptedRequest = - ListWorkRequestLogsConverter.interceptRequest(request); + LOG.trace("Called async listDeployArtifacts"); + final ListDeployArtifactsRequest interceptedRequest = + ListDeployArtifactsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListWorkRequestLogsConverter.fromRequest(client, interceptedRequest); + ListDeployArtifactsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListWorkRequestLogs", + "ListDeployArtifacts", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/WorkRequestLogEntry/ListWorkRequestLogs"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployArtifactSummary/ListDeployArtifacts"); + final java.util.function.Function transformer = - ListWorkRequestLogsConverter.fromResponse( + ListDeployArtifactsConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + ListDeployArtifactsRequest, ListDeployArtifactsResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>, - java.util.concurrent.Future> + ListDeployArtifactsRequest, ListDeployArtifactsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>( + ListDeployArtifactsRequest, ListDeployArtifactsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3845,39 +4584,40 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listWorkRequests( - ListWorkRequestsRequest request, + public java.util.concurrent.Future listDeployEnvironments( + ListDeployEnvironmentsRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListWorkRequestsRequest, ListWorkRequestsResponse> + ListDeployEnvironmentsRequest, ListDeployEnvironmentsResponse> handler) { - LOG.trace("Called async listWorkRequests"); - final ListWorkRequestsRequest interceptedRequest = - ListWorkRequestsConverter.interceptRequest(request); + LOG.trace("Called async listDeployEnvironments"); + final ListDeployEnvironmentsRequest interceptedRequest = + ListDeployEnvironmentsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListWorkRequestsConverter.fromRequest(client, interceptedRequest); + ListDeployEnvironmentsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListWorkRequests", + "ListDeployEnvironments", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/WorkRequest/ListWorkRequests"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployEnvironmentSummary/ListDeployEnvironments"); + final java.util.function.Function transformer = - ListWorkRequestsConverter.fromResponse( + ListDeployEnvironmentsConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + ListDeployEnvironmentsRequest, ListDeployEnvironmentsResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListWorkRequestsRequest, ListWorkRequestsResponse>, - java.util.concurrent.Future> + ListDeployEnvironmentsRequest, ListDeployEnvironmentsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListWorkRequestsRequest, ListWorkRequestsResponse>( + ListDeployEnvironmentsRequest, ListDeployEnvironmentsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3891,39 +4631,40 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future mirrorRepository( - MirrorRepositoryRequest request, + public java.util.concurrent.Future listDeployPipelines( + ListDeployPipelinesRequest request, final com.oracle.bmc.responses.AsyncHandler< - MirrorRepositoryRequest, MirrorRepositoryResponse> + ListDeployPipelinesRequest, ListDeployPipelinesResponse> handler) { - LOG.trace("Called async mirrorRepository"); - final MirrorRepositoryRequest interceptedRequest = - MirrorRepositoryConverter.interceptRequest(request); + LOG.trace("Called async listDeployPipelines"); + final ListDeployPipelinesRequest interceptedRequest = + ListDeployPipelinesConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - MirrorRepositoryConverter.fromRequest(client, interceptedRequest); + ListDeployPipelinesConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "MirrorRepository", + "ListDeployPipelines", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/MirrorRepository"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployPipelineSummary/ListDeployPipelines"); + final java.util.function.Function transformer = - MirrorRepositoryConverter.fromResponse( + ListDeployPipelinesConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + ListDeployPipelinesRequest, ListDeployPipelinesResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - MirrorRepositoryRequest, MirrorRepositoryResponse>, - java.util.concurrent.Future> - futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + ListDeployPipelinesRequest, ListDeployPipelinesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - MirrorRepositoryRequest, MirrorRepositoryResponse>( + ListDeployPipelinesRequest, ListDeployPipelinesResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3937,45 +4678,1848 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future putRepositoryRef( - PutRepositoryRefRequest request, + public java.util.concurrent.Future listDeployStages( + ListDeployStagesRequest request, final com.oracle.bmc.responses.AsyncHandler< - PutRepositoryRefRequest, PutRepositoryRefResponse> + ListDeployStagesRequest, ListDeployStagesResponse> handler) { - LOG.trace("Called async putRepositoryRef"); - final PutRepositoryRefRequest interceptedRequest = + LOG.trace("Called async listDeployStages"); + final ListDeployStagesRequest interceptedRequest = + ListDeployStagesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDeployStagesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListDeployStages", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployStageSummary/ListDeployStages"); + final java.util.function.Function + transformer = + ListDeployStagesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListDeployStagesRequest, ListDeployStagesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListDeployStagesRequest, ListDeployStagesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listDeployments( + ListDeploymentsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListDeploymentsRequest, ListDeploymentsResponse> + handler) { + LOG.trace("Called async listDeployments"); + final ListDeploymentsRequest interceptedRequest = + ListDeploymentsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDeploymentsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListDeployments", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeploymentSummary/ListDeployments"); + final java.util.function.Function + transformer = + ListDeploymentsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListDeploymentsRequest, ListDeploymentsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListDeploymentsRequest, ListDeploymentsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listForkSyncStatuses( + ListForkSyncStatusesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListForkSyncStatusesRequest, ListForkSyncStatusesResponse> + handler) { + LOG.trace("Called async listForkSyncStatuses"); + final ListForkSyncStatusesRequest interceptedRequest = + ListForkSyncStatusesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListForkSyncStatusesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListForkSyncStatuses", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListForkSyncStatuses"); + final java.util.function.Function + transformer = + ListForkSyncStatusesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListForkSyncStatusesRequest, ListForkSyncStatusesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListForkSyncStatusesRequest, ListForkSyncStatusesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListForkSyncStatusesRequest, ListForkSyncStatusesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listMirrorRecords( + ListMirrorRecordsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListMirrorRecordsRequest, ListMirrorRecordsResponse> + handler) { + LOG.trace("Called async listMirrorRecords"); + final ListMirrorRecordsRequest interceptedRequest = + ListMirrorRecordsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListMirrorRecordsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListMirrorRecords", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListMirrorRecords"); + final java.util.function.Function + transformer = + ListMirrorRecordsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListMirrorRecordsRequest, ListMirrorRecordsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListMirrorRecordsRequest, ListMirrorRecordsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listPaths( + ListPathsRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listPaths"); + final ListPathsRequest interceptedRequest = ListPathsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPathsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListPaths", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryPathSummary/ListPaths"); + final java.util.function.Function + transformer = + ListPathsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListPathsRequest, ListPathsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listProjectCommitAnalyticsAuthors( + ListProjectCommitAnalyticsAuthorsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListProjectCommitAnalyticsAuthorsRequest, + ListProjectCommitAnalyticsAuthorsResponse> + handler) { + LOG.trace("Called async listProjectCommitAnalyticsAuthors"); + final ListProjectCommitAnalyticsAuthorsRequest interceptedRequest = + ListProjectCommitAnalyticsAuthorsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListProjectCommitAnalyticsAuthorsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListProjectCommitAnalyticsAuthors", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListProjectCommitAnalyticsAuthors"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListProjectCommitAnalyticsAuthorsResponse> + transformer = + ListProjectCommitAnalyticsAuthorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListProjectCommitAnalyticsAuthorsRequest, + ListProjectCommitAnalyticsAuthorsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListProjectCommitAnalyticsAuthorsRequest, + ListProjectCommitAnalyticsAuthorsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListProjectCommitAnalyticsAuthorsRequest, + ListProjectCommitAnalyticsAuthorsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listProjects( + ListProjectsRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listProjects"); + final ListProjectsRequest interceptedRequest = + ListProjectsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListProjectsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListProjects", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProjectSummary/ListProjects"); + final java.util.function.Function + transformer = + ListProjectsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListProjectsRequest, ListProjectsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListProjectsRequest, ListProjectsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listProtectedBranches( + ListProtectedBranchesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListProtectedBranchesRequest, ListProtectedBranchesResponse> + handler) { + LOG.trace("Called async listProtectedBranches"); + final ListProtectedBranchesRequest interceptedRequest = + ListProtectedBranchesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListProtectedBranchesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListProtectedBranches", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProtectedBranchCollection/ListProtectedBranches"); + final java.util.function.Function + transformer = + ListProtectedBranchesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListProtectedBranchesRequest, ListProtectedBranchesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListProtectedBranchesRequest, ListProtectedBranchesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListProtectedBranchesRequest, ListProtectedBranchesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listPullRequestActivities( + ListPullRequestActivitiesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListPullRequestActivitiesRequest, ListPullRequestActivitiesResponse> + handler) { + LOG.trace("Called async listPullRequestActivities"); + final ListPullRequestActivitiesRequest interceptedRequest = + ListPullRequestActivitiesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPullRequestActivitiesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListPullRequestActivities", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ListPullRequestActivities"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListPullRequestActivitiesResponse> + transformer = + ListPullRequestActivitiesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListPullRequestActivitiesRequest, ListPullRequestActivitiesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListPullRequestActivitiesRequest, + ListPullRequestActivitiesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListPullRequestActivitiesRequest, ListPullRequestActivitiesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listPullRequestAttachments( + ListPullRequestAttachmentsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListPullRequestAttachmentsRequest, + ListPullRequestAttachmentsResponse> + handler) { + LOG.trace("Called async listPullRequestAttachments"); + final ListPullRequestAttachmentsRequest interceptedRequest = + ListPullRequestAttachmentsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPullRequestAttachmentsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListPullRequestAttachments", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ListPullRequestAttachments"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListPullRequestAttachmentsResponse> + transformer = + ListPullRequestAttachmentsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListPullRequestAttachmentsRequest, ListPullRequestAttachmentsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListPullRequestAttachmentsRequest, + ListPullRequestAttachmentsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListPullRequestAttachmentsRequest, ListPullRequestAttachmentsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listPullRequestAuthors( + ListPullRequestAuthorsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListPullRequestAuthorsRequest, ListPullRequestAuthorsResponse> + handler) { + LOG.trace("Called async listPullRequestAuthors"); + final ListPullRequestAuthorsRequest interceptedRequest = + ListPullRequestAuthorsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPullRequestAuthorsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListPullRequestAuthors", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListPullRequestAuthors"); + final java.util.function.Function + transformer = + ListPullRequestAuthorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListPullRequestAuthorsRequest, ListPullRequestAuthorsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListPullRequestAuthorsRequest, ListPullRequestAuthorsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListPullRequestAuthorsRequest, ListPullRequestAuthorsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listPullRequestComments( + ListPullRequestCommentsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListPullRequestCommentsRequest, ListPullRequestCommentsResponse> + handler) { + LOG.trace("Called async listPullRequestComments"); + final ListPullRequestCommentsRequest interceptedRequest = + ListPullRequestCommentsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPullRequestCommentsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListPullRequestComments", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ListPullRequestComments"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListPullRequestCommentsResponse> + transformer = + ListPullRequestCommentsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListPullRequestCommentsRequest, ListPullRequestCommentsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListPullRequestCommentsRequest, ListPullRequestCommentsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListPullRequestCommentsRequest, ListPullRequestCommentsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listPullRequestCommits( + ListPullRequestCommitsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListPullRequestCommitsRequest, ListPullRequestCommitsResponse> + handler) { + LOG.trace("Called async listPullRequestCommits"); + final ListPullRequestCommitsRequest interceptedRequest = + ListPullRequestCommitsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPullRequestCommitsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListPullRequestCommits", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ListPullRequestCommits"); + final java.util.function.Function + transformer = + ListPullRequestCommitsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListPullRequestCommitsRequest, ListPullRequestCommitsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListPullRequestCommitsRequest, ListPullRequestCommitsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListPullRequestCommitsRequest, ListPullRequestCommitsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listPullRequestFileChanges( + ListPullRequestFileChangesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListPullRequestFileChangesRequest, + ListPullRequestFileChangesResponse> + handler) { + LOG.trace("Called async listPullRequestFileChanges"); + final ListPullRequestFileChangesRequest interceptedRequest = + ListPullRequestFileChangesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPullRequestFileChangesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListPullRequestFileChanges", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ListPullRequestFileChanges"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListPullRequestFileChangesResponse> + transformer = + ListPullRequestFileChangesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListPullRequestFileChangesRequest, ListPullRequestFileChangesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListPullRequestFileChangesRequest, + ListPullRequestFileChangesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListPullRequestFileChangesRequest, ListPullRequestFileChangesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listPullRequests( + ListPullRequestsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListPullRequestsRequest, ListPullRequestsResponse> + handler) { + LOG.trace("Called async listPullRequests"); + final ListPullRequestsRequest interceptedRequest = + ListPullRequestsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPullRequestsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListPullRequests", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequestCollection/ListPullRequests"); + final java.util.function.Function + transformer = + ListPullRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListPullRequestsRequest, ListPullRequestsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListPullRequestsRequest, ListPullRequestsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listRefs( + ListRefsRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listRefs"); + final ListRefsRequest interceptedRequest = ListRefsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListRefsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListRefs", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryRef/ListRefs"); + final java.util.function.Function transformer = + ListRefsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListRefsRequest, ListRefsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listRepositories( + ListRepositoriesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListRepositoriesRequest, ListRepositoriesResponse> + handler) { + LOG.trace("Called async listRepositories"); + final ListRepositoriesRequest interceptedRequest = + ListRepositoriesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListRepositoriesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListRepositories", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListRepositories"); + final java.util.function.Function + transformer = + ListRepositoriesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListRepositoriesRequest, ListRepositoriesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListRepositoriesRequest, ListRepositoriesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listRepositoryCommitAnalyticsAuthors( + ListRepositoryCommitAnalyticsAuthorsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListRepositoryCommitAnalyticsAuthorsRequest, + ListRepositoryCommitAnalyticsAuthorsResponse> + handler) { + LOG.trace("Called async listRepositoryCommitAnalyticsAuthors"); + final ListRepositoryCommitAnalyticsAuthorsRequest interceptedRequest = + ListRepositoryCommitAnalyticsAuthorsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListRepositoryCommitAnalyticsAuthorsConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListRepositoryCommitAnalyticsAuthors", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListRepositoryCommitAnalyticsAuthors"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListRepositoryCommitAnalyticsAuthorsResponse> + transformer = + ListRepositoryCommitAnalyticsAuthorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListRepositoryCommitAnalyticsAuthorsRequest, + ListRepositoryCommitAnalyticsAuthorsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListRepositoryCommitAnalyticsAuthorsRequest, + ListRepositoryCommitAnalyticsAuthorsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListRepositoryCommitAnalyticsAuthorsRequest, + ListRepositoryCommitAnalyticsAuthorsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listTriggers( + ListTriggersRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listTriggers"); + final ListTriggersRequest interceptedRequest = + ListTriggersConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListTriggersConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListTriggers", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/TriggerCollection/ListTriggers"); + final java.util.function.Function + transformer = + ListTriggersConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListTriggersRequest, ListTriggersResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListTriggersRequest, ListTriggersResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listWorkRequestErrors( + ListWorkRequestErrorsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + handler) { + LOG.trace("Called async listWorkRequestErrors"); + final ListWorkRequestErrorsRequest interceptedRequest = + ListWorkRequestErrorsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestErrorsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListWorkRequestErrors", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/WorkRequestError/ListWorkRequestErrors"); + final java.util.function.Function + transformer = + ListWorkRequestErrorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listWorkRequestLogs( + ListWorkRequestLogsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + handler) { + LOG.trace("Called async listWorkRequestLogs"); + final ListWorkRequestLogsRequest interceptedRequest = + ListWorkRequestLogsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestLogsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListWorkRequestLogs", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/WorkRequestLogEntry/ListWorkRequestLogs"); + final java.util.function.Function + transformer = + ListWorkRequestLogsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listWorkRequests( + ListWorkRequestsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestsRequest, ListWorkRequestsResponse> + handler) { + LOG.trace("Called async listWorkRequests"); + final ListWorkRequestsRequest interceptedRequest = + ListWorkRequestsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListWorkRequests", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/WorkRequest/ListWorkRequests"); + final java.util.function.Function + transformer = + ListWorkRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestsRequest, ListWorkRequestsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListWorkRequestsRequest, ListWorkRequestsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future mergePullRequest( + MergePullRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + MergePullRequestRequest, MergePullRequestResponse> + handler) { + LOG.trace("Called async mergePullRequest"); + final MergePullRequestRequest interceptedRequest = + MergePullRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + MergePullRequestConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "MergePullRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/MergePullRequest"); + final java.util.function.Function + transformer = + MergePullRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + MergePullRequestRequest, MergePullRequestResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getMergePullRequestDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + MergePullRequestRequest, MergePullRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future mirrorRepository( + MirrorRepositoryRequest request, + final com.oracle.bmc.responses.AsyncHandler< + MirrorRepositoryRequest, MirrorRepositoryResponse> + handler) { + LOG.trace("Called async mirrorRepository"); + final MirrorRepositoryRequest interceptedRequest = + MirrorRepositoryConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + MirrorRepositoryConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "MirrorRepository", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/MirrorRepository"); + final java.util.function.Function + transformer = + MirrorRepositoryConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + MirrorRepositoryRequest, MirrorRepositoryResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + MirrorRepositoryRequest, MirrorRepositoryResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future patchPullRequest( + PatchPullRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + PatchPullRequestRequest, PatchPullRequestResponse> + handler) { + LOG.trace("Called async patchPullRequest"); + final PatchPullRequestRequest interceptedRequest = + PatchPullRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PatchPullRequestConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "PatchPullRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/PatchPullRequest"); + final java.util.function.Function + transformer = + PatchPullRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + PatchPullRequestRequest, PatchPullRequestResponse>, + java.util.concurrent.Future> + futureSupplier = + client.patchFutureSupplier( + interceptedRequest, + interceptedRequest.getPatchPullRequestDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + PatchPullRequestRequest, PatchPullRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future putRepositoryRef( + PutRepositoryRefRequest request, + final com.oracle.bmc.responses.AsyncHandler< + PutRepositoryRefRequest, PutRepositoryRefResponse> + handler) { + LOG.trace("Called async putRepositoryRef"); + final PutRepositoryRefRequest interceptedRequest = PutRepositoryRefConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - PutRepositoryRefConverter.fromRequest(client, interceptedRequest); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + PutRepositoryRefConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "PutRepositoryRef", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/PutRepositoryRef"); + final java.util.function.Function + transformer = + PutRepositoryRefConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + PutRepositoryRefRequest, PutRepositoryRefResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getPutRepositoryRefDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + PutRepositoryRefRequest, PutRepositoryRefResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future reopenPullRequest( + ReopenPullRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ReopenPullRequestRequest, ReopenPullRequestResponse> + handler) { + LOG.trace("Called async reopenPullRequest"); + final ReopenPullRequestRequest interceptedRequest = + ReopenPullRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ReopenPullRequestConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ReopenPullRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ReopenPullRequest"); + final java.util.function.Function + transformer = + ReopenPullRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ReopenPullRequestRequest, ReopenPullRequestResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ReopenPullRequestRequest, ReopenPullRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future reviewPullRequest( + ReviewPullRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ReviewPullRequestRequest, ReviewPullRequestResponse> + handler) { + LOG.trace("Called async reviewPullRequest"); + final ReviewPullRequestRequest interceptedRequest = + ReviewPullRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ReviewPullRequestConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ReviewPullRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ReviewPullRequest"); + final java.util.function.Function + transformer = + ReviewPullRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ReviewPullRequestRequest, ReviewPullRequestResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getReviewPullRequestDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ReviewPullRequestRequest, ReviewPullRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + scheduleCascadingProjectDeletion( + ScheduleCascadingProjectDeletionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ScheduleCascadingProjectDeletionRequest, + ScheduleCascadingProjectDeletionResponse> + handler) { + LOG.trace("Called async scheduleCascadingProjectDeletion"); + final ScheduleCascadingProjectDeletionRequest interceptedRequest = + ScheduleCascadingProjectDeletionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ScheduleCascadingProjectDeletionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ScheduleCascadingProjectDeletion", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Project/ScheduleCascadingProjectDeletion"); + final java.util.function.Function< + javax.ws.rs.core.Response, ScheduleCascadingProjectDeletionResponse> + transformer = + ScheduleCascadingProjectDeletionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ScheduleCascadingProjectDeletionRequest, + ScheduleCascadingProjectDeletionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ScheduleCascadingProjectDeletionRequest, + ScheduleCascadingProjectDeletionResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ScheduleCascadingProjectDeletionRequest, + ScheduleCascadingProjectDeletionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + summarizeProjectRepositoryAnalytics( + SummarizeProjectRepositoryAnalyticsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + SummarizeProjectRepositoryAnalyticsRequest, + SummarizeProjectRepositoryAnalyticsResponse> + handler) { + LOG.trace("Called async summarizeProjectRepositoryAnalytics"); + final SummarizeProjectRepositoryAnalyticsRequest interceptedRequest = + SummarizeProjectRepositoryAnalyticsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SummarizeProjectRepositoryAnalyticsConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "SummarizeProjectRepositoryAnalytics", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryMetricAggregation/SummarizeProjectRepositoryAnalytics"); + final java.util.function.Function< + javax.ws.rs.core.Response, SummarizeProjectRepositoryAnalyticsResponse> + transformer = + SummarizeProjectRepositoryAnalyticsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + SummarizeProjectRepositoryAnalyticsRequest, + SummarizeProjectRepositoryAnalyticsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + SummarizeProjectRepositoryAnalyticsRequest, + SummarizeProjectRepositoryAnalyticsResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getSummarizeProjectRepositoryAnalyticsDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + SummarizeProjectRepositoryAnalyticsRequest, + SummarizeProjectRepositoryAnalyticsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + summarizeRepositoryAnalytics( + SummarizeRepositoryAnalyticsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + SummarizeRepositoryAnalyticsRequest, + SummarizeRepositoryAnalyticsResponse> + handler) { + LOG.trace("Called async summarizeRepositoryAnalytics"); + final SummarizeRepositoryAnalyticsRequest interceptedRequest = + SummarizeRepositoryAnalyticsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SummarizeRepositoryAnalyticsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "SummarizeRepositoryAnalytics", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryMetricAggregation/SummarizeRepositoryAnalytics"); + final java.util.function.Function< + javax.ws.rs.core.Response, SummarizeRepositoryAnalyticsResponse> + transformer = + SummarizeRepositoryAnalyticsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + SummarizeRepositoryAnalyticsRequest, SummarizeRepositoryAnalyticsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + SummarizeRepositoryAnalyticsRequest, + SummarizeRepositoryAnalyticsResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getSummarizeRepositoryAnalyticsDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + SummarizeRepositoryAnalyticsRequest, SummarizeRepositoryAnalyticsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future syncRepository( + SyncRepositoryRequest request, + final com.oracle.bmc.responses.AsyncHandler< + SyncRepositoryRequest, SyncRepositoryResponse> + handler) { + LOG.trace("Called async syncRepository"); + final SyncRepositoryRequest interceptedRequest = + SyncRepositoryConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SyncRepositoryConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "SyncRepository", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/SyncRepository"); + final java.util.function.Function + transformer = + SyncRepositoryConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + SyncRepositoryRequest, SyncRepositoryResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getSyncRepositoryDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + SyncRepositoryRequest, SyncRepositoryResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future unlikePullRequestComment( + UnlikePullRequestCommentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UnlikePullRequestCommentRequest, UnlikePullRequestCommentResponse> + handler) { + LOG.trace("Called async unlikePullRequestComment"); + final UnlikePullRequestCommentRequest interceptedRequest = + UnlikePullRequestCommentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UnlikePullRequestCommentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "UnlikePullRequestComment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/UnlikePullRequestComment"); + final java.util.function.Function< + javax.ws.rs.core.Response, UnlikePullRequestCommentResponse> + transformer = + UnlikePullRequestCommentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UnlikePullRequestCommentRequest, UnlikePullRequestCommentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UnlikePullRequestCommentRequest, UnlikePullRequestCommentResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UnlikePullRequestCommentRequest, UnlikePullRequestCommentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future unsubscribePullRequest( + UnsubscribePullRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UnsubscribePullRequestRequest, UnsubscribePullRequestResponse> + handler) { + LOG.trace("Called async unsubscribePullRequest"); + final UnsubscribePullRequestRequest interceptedRequest = + UnsubscribePullRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UnsubscribePullRequestConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "UnsubscribePullRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/UnsubscribePullRequest"); + final java.util.function.Function + transformer = + UnsubscribePullRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UnsubscribePullRequestRequest, UnsubscribePullRequestResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UnsubscribePullRequestRequest, UnsubscribePullRequestResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UnsubscribePullRequestRequest, UnsubscribePullRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateBuildPipeline( + UpdateBuildPipelineRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateBuildPipelineRequest, UpdateBuildPipelineResponse> + handler) { + LOG.trace("Called async updateBuildPipeline"); + final UpdateBuildPipelineRequest interceptedRequest = + UpdateBuildPipelineConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateBuildPipelineConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "UpdateBuildPipeline", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildPipeline/UpdateBuildPipeline"); + final java.util.function.Function + transformer = + UpdateBuildPipelineConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateBuildPipelineRequest, UpdateBuildPipelineResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateBuildPipelineRequest, UpdateBuildPipelineResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateBuildPipelineDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateBuildPipelineRequest, UpdateBuildPipelineResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateBuildPipelineStage( + UpdateBuildPipelineStageRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateBuildPipelineStageRequest, UpdateBuildPipelineStageResponse> + handler) { + LOG.trace("Called async updateBuildPipelineStage"); + final UpdateBuildPipelineStageRequest interceptedRequest = + UpdateBuildPipelineStageConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateBuildPipelineStageConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "UpdateBuildPipelineStage", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildPipelineStage/UpdateBuildPipelineStage"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateBuildPipelineStageResponse> + transformer = + UpdateBuildPipelineStageConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateBuildPipelineStageRequest, UpdateBuildPipelineStageResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateBuildPipelineStageRequest, UpdateBuildPipelineStageResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateBuildPipelineStageDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateBuildPipelineStageRequest, UpdateBuildPipelineStageResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateBuildRun( + UpdateBuildRunRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateBuildRunRequest, UpdateBuildRunResponse> + handler) { + LOG.trace("Called async updateBuildRun"); + final UpdateBuildRunRequest interceptedRequest = + UpdateBuildRunConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateBuildRunConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "PutRepositoryRef", + "UpdateBuildRun", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/PutRepositoryRef"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildRun/UpdateBuildRun"); + final java.util.function.Function transformer = - PutRepositoryRefConverter.fromResponse( + UpdateBuildRunConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateBuildRunRequest, UpdateBuildRunResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateBuildRunDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateBuildRunRequest, UpdateBuildRunResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateConnection( + UpdateConnectionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateConnectionRequest, UpdateConnectionResponse> + handler) { + LOG.trace("Called async updateConnection"); + final UpdateConnectionRequest interceptedRequest = + UpdateConnectionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateConnectionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "UpdateConnection", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Connection/UpdateConnection"); + final java.util.function.Function + transformer = + UpdateConnectionConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - PutRepositoryRefRequest, PutRepositoryRefResponse>, - java.util.concurrent.Future> + UpdateConnectionRequest, UpdateConnectionResponse>, + java.util.concurrent.Future> futureSupplier = client.putFutureSupplier( interceptedRequest, - interceptedRequest.getPutRepositoryRefDetails(), + interceptedRequest.getUpdateConnectionDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - PutRepositoryRefRequest, PutRepositoryRefResponse>( + UpdateConnectionRequest, UpdateConnectionResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -3989,47 +6533,98 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - scheduleCascadingProjectDeletion( - ScheduleCascadingProjectDeletionRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ScheduleCascadingProjectDeletionRequest, - ScheduleCascadingProjectDeletionResponse> - handler) { - LOG.trace("Called async scheduleCascadingProjectDeletion"); - final ScheduleCascadingProjectDeletionRequest interceptedRequest = - ScheduleCascadingProjectDeletionConverter.interceptRequest(request); + public java.util.concurrent.Future updateDeployArtifact( + UpdateDeployArtifactRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateDeployArtifactRequest, UpdateDeployArtifactResponse> + handler) { + LOG.trace("Called async updateDeployArtifact"); + final UpdateDeployArtifactRequest interceptedRequest = + UpdateDeployArtifactConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ScheduleCascadingProjectDeletionConverter.fromRequest(client, interceptedRequest); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + UpdateDeployArtifactConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ScheduleCascadingProjectDeletion", + "UpdateDeployArtifact", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Project/ScheduleCascadingProjectDeletion"); + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployArtifact/UpdateDeployArtifact"); + final java.util.function.Function + transformer = + UpdateDeployArtifactConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateDeployArtifactRequest, UpdateDeployArtifactResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateDeployArtifactRequest, UpdateDeployArtifactResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateDeployArtifactDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateDeployArtifactRequest, UpdateDeployArtifactResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateDeployEnvironment( + UpdateDeployEnvironmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateDeployEnvironmentRequest, UpdateDeployEnvironmentResponse> + handler) { + LOG.trace("Called async updateDeployEnvironment"); + final UpdateDeployEnvironmentRequest interceptedRequest = + UpdateDeployEnvironmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateDeployEnvironmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "UpdateDeployEnvironment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployEnvironment/UpdateDeployEnvironment"); final java.util.function.Function< - javax.ws.rs.core.Response, ScheduleCascadingProjectDeletionResponse> + javax.ws.rs.core.Response, UpdateDeployEnvironmentResponse> transformer = - ScheduleCascadingProjectDeletionConverter.fromResponse( + UpdateDeployEnvironmentConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - ScheduleCascadingProjectDeletionRequest, - ScheduleCascadingProjectDeletionResponse> + UpdateDeployEnvironmentRequest, UpdateDeployEnvironmentResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ScheduleCascadingProjectDeletionRequest, - ScheduleCascadingProjectDeletionResponse>, - java.util.concurrent.Future> - futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + UpdateDeployEnvironmentRequest, UpdateDeployEnvironmentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateDeployEnvironmentDetails(), + ib, + transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ScheduleCascadingProjectDeletionRequest, - ScheduleCascadingProjectDeletionResponse>( + UpdateDeployEnvironmentRequest, UpdateDeployEnvironmentResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -4043,45 +6638,96 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future updateBuildPipeline( - UpdateBuildPipelineRequest request, + public java.util.concurrent.Future updateDeployPipeline( + UpdateDeployPipelineRequest request, final com.oracle.bmc.responses.AsyncHandler< - UpdateBuildPipelineRequest, UpdateBuildPipelineResponse> + UpdateDeployPipelineRequest, UpdateDeployPipelineResponse> handler) { - LOG.trace("Called async updateBuildPipeline"); - final UpdateBuildPipelineRequest interceptedRequest = - UpdateBuildPipelineConverter.interceptRequest(request); + LOG.trace("Called async updateDeployPipeline"); + final UpdateDeployPipelineRequest interceptedRequest = + UpdateDeployPipelineConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - UpdateBuildPipelineConverter.fromRequest(client, interceptedRequest); + UpdateDeployPipelineConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "UpdateBuildPipeline", + "UpdateDeployPipeline", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildPipeline/UpdateBuildPipeline"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployPipeline/UpdateDeployPipeline"); + final java.util.function.Function transformer = - UpdateBuildPipelineConverter.fromResponse( + UpdateDeployPipelineConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateDeployPipelineRequest, UpdateDeployPipelineResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateDeployPipelineRequest, UpdateDeployPipelineResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateDeployPipelineDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateDeployPipelineRequest, UpdateDeployPipelineResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateDeployStage( + UpdateDeployStageRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateDeployStageRequest, UpdateDeployStageResponse> + handler) { + LOG.trace("Called async updateDeployStage"); + final UpdateDeployStageRequest interceptedRequest = + UpdateDeployStageConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateDeployStageConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "UpdateDeployStage", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployStage/UpdateDeployStage"); + final java.util.function.Function + transformer = + UpdateDeployStageConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler< - UpdateBuildPipelineRequest, UpdateBuildPipelineResponse> + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - UpdateBuildPipelineRequest, UpdateBuildPipelineResponse>, - java.util.concurrent.Future> + UpdateDeployStageRequest, UpdateDeployStageResponse>, + java.util.concurrent.Future> futureSupplier = client.putFutureSupplier( interceptedRequest, - interceptedRequest.getUpdateBuildPipelineDetails(), + interceptedRequest.getUpdateDeployStageDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - UpdateBuildPipelineRequest, UpdateBuildPipelineResponse>( + UpdateDeployStageRequest, UpdateDeployStageResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -4095,46 +6741,44 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future updateBuildPipelineStage( - UpdateBuildPipelineStageRequest request, + public java.util.concurrent.Future updateDeployment( + UpdateDeploymentRequest request, final com.oracle.bmc.responses.AsyncHandler< - UpdateBuildPipelineStageRequest, UpdateBuildPipelineStageResponse> + UpdateDeploymentRequest, UpdateDeploymentResponse> handler) { - LOG.trace("Called async updateBuildPipelineStage"); - final UpdateBuildPipelineStageRequest interceptedRequest = - UpdateBuildPipelineStageConverter.interceptRequest(request); + LOG.trace("Called async updateDeployment"); + final UpdateDeploymentRequest interceptedRequest = + UpdateDeploymentConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - UpdateBuildPipelineStageConverter.fromRequest(client, interceptedRequest); + UpdateDeploymentConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "UpdateBuildPipelineStage", + "UpdateDeployment", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildPipelineStage/UpdateBuildPipelineStage"); - final java.util.function.Function< - javax.ws.rs.core.Response, UpdateBuildPipelineStageResponse> + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Deployment/UpdateDeployment"); + final java.util.function.Function transformer = - UpdateBuildPipelineStageConverter.fromResponse( + UpdateDeploymentConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler< - UpdateBuildPipelineStageRequest, UpdateBuildPipelineStageResponse> + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - UpdateBuildPipelineStageRequest, UpdateBuildPipelineStageResponse>, - java.util.concurrent.Future> + UpdateDeploymentRequest, UpdateDeploymentResponse>, + java.util.concurrent.Future> futureSupplier = client.putFutureSupplier( interceptedRequest, - interceptedRequest.getUpdateBuildPipelineStageDetails(), + interceptedRequest.getUpdateDeploymentDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - UpdateBuildPipelineStageRequest, UpdateBuildPipelineStageResponse>( + UpdateDeploymentRequest, UpdateDeploymentResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -4148,43 +6792,42 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future updateBuildRun( - UpdateBuildRunRequest request, - final com.oracle.bmc.responses.AsyncHandler< - UpdateBuildRunRequest, UpdateBuildRunResponse> + public java.util.concurrent.Future updateProject( + UpdateProjectRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async updateBuildRun"); - final UpdateBuildRunRequest interceptedRequest = - UpdateBuildRunConverter.interceptRequest(request); + LOG.trace("Called async updateProject"); + final UpdateProjectRequest interceptedRequest = + UpdateProjectConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - UpdateBuildRunConverter.fromRequest(client, interceptedRequest); + UpdateProjectConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "UpdateBuildRun", + "UpdateProject", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildRun/UpdateBuildRun"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Project/UpdateProject"); + final java.util.function.Function transformer = - UpdateBuildRunConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + UpdateProjectConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - UpdateBuildRunRequest, UpdateBuildRunResponse>, - java.util.concurrent.Future> + UpdateProjectRequest, UpdateProjectResponse>, + java.util.concurrent.Future> futureSupplier = client.putFutureSupplier( interceptedRequest, - interceptedRequest.getUpdateBuildRunDetails(), + interceptedRequest.getUpdateProjectDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - UpdateBuildRunRequest, UpdateBuildRunResponse>( + UpdateProjectRequest, UpdateProjectResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -4198,44 +6841,52 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future updateConnection( - UpdateConnectionRequest request, - final com.oracle.bmc.responses.AsyncHandler< - UpdateConnectionRequest, UpdateConnectionResponse> - handler) { - LOG.trace("Called async updateConnection"); - final UpdateConnectionRequest interceptedRequest = - UpdateConnectionConverter.interceptRequest(request); + public java.util.concurrent.Future + updateProjectNotificationPreference( + UpdateProjectNotificationPreferenceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateProjectNotificationPreferenceRequest, + UpdateProjectNotificationPreferenceResponse> + handler) { + LOG.trace("Called async updateProjectNotificationPreference"); + final UpdateProjectNotificationPreferenceRequest interceptedRequest = + UpdateProjectNotificationPreferenceConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - UpdateConnectionConverter.fromRequest(client, interceptedRequest); + UpdateProjectNotificationPreferenceConverter.fromRequest( + client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "UpdateConnection", + "UpdateProjectNotificationPreference", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Connection/UpdateConnection"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProjectNotificationPreference/UpdateProjectNotificationPreference"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateProjectNotificationPreferenceResponse> transformer = - UpdateConnectionConverter.fromResponse( + UpdateProjectNotificationPreferenceConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + UpdateProjectNotificationPreferenceRequest, + UpdateProjectNotificationPreferenceResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - UpdateConnectionRequest, UpdateConnectionResponse>, - java.util.concurrent.Future> + UpdateProjectNotificationPreferenceRequest, + UpdateProjectNotificationPreferenceResponse>, + java.util.concurrent.Future> futureSupplier = client.putFutureSupplier( interceptedRequest, - interceptedRequest.getUpdateConnectionDetails(), + interceptedRequest.getUpdateProjectNotificationPreferenceDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - UpdateConnectionRequest, UpdateConnectionResponse>( + UpdateProjectNotificationPreferenceRequest, + UpdateProjectNotificationPreferenceResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -4249,45 +6900,52 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future updateDeployArtifact( - UpdateDeployArtifactRequest request, - final com.oracle.bmc.responses.AsyncHandler< - UpdateDeployArtifactRequest, UpdateDeployArtifactResponse> - handler) { - LOG.trace("Called async updateDeployArtifact"); - final UpdateDeployArtifactRequest interceptedRequest = - UpdateDeployArtifactConverter.interceptRequest(request); + public java.util.concurrent.Future + updateProjectRepositorySettings( + UpdateProjectRepositorySettingsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateProjectRepositorySettingsRequest, + UpdateProjectRepositorySettingsResponse> + handler) { + LOG.trace("Called async updateProjectRepositorySettings"); + final UpdateProjectRepositorySettingsRequest interceptedRequest = + UpdateProjectRepositorySettingsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - UpdateDeployArtifactConverter.fromRequest(client, interceptedRequest); + UpdateProjectRepositorySettingsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "UpdateDeployArtifact", + "UpdateProjectRepositorySettings", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployArtifact/UpdateDeployArtifact"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProjectRepositorySettings/UpdateProjectRepositorySettings"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateProjectRepositorySettingsResponse> transformer = - UpdateDeployArtifactConverter.fromResponse( + UpdateProjectRepositorySettingsConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - UpdateDeployArtifactRequest, UpdateDeployArtifactResponse> + UpdateProjectRepositorySettingsRequest, + UpdateProjectRepositorySettingsResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - UpdateDeployArtifactRequest, UpdateDeployArtifactResponse>, - java.util.concurrent.Future> + UpdateProjectRepositorySettingsRequest, + UpdateProjectRepositorySettingsResponse>, + java.util.concurrent.Future> futureSupplier = client.putFutureSupplier( interceptedRequest, - interceptedRequest.getUpdateDeployArtifactDetails(), + interceptedRequest.getUpdateProjectRepositorySettingsDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - UpdateDeployArtifactRequest, UpdateDeployArtifactResponse>( + UpdateProjectRepositorySettingsRequest, + UpdateProjectRepositorySettingsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -4301,46 +6959,44 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future updateDeployEnvironment( - UpdateDeployEnvironmentRequest request, + public java.util.concurrent.Future updatePullRequest( + UpdatePullRequestRequest request, final com.oracle.bmc.responses.AsyncHandler< - UpdateDeployEnvironmentRequest, UpdateDeployEnvironmentResponse> + UpdatePullRequestRequest, UpdatePullRequestResponse> handler) { - LOG.trace("Called async updateDeployEnvironment"); - final UpdateDeployEnvironmentRequest interceptedRequest = - UpdateDeployEnvironmentConverter.interceptRequest(request); + LOG.trace("Called async updatePullRequest"); + final UpdatePullRequestRequest interceptedRequest = + UpdatePullRequestConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - UpdateDeployEnvironmentConverter.fromRequest(client, interceptedRequest); + UpdatePullRequestConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "UpdateDeployEnvironment", + "UpdatePullRequest", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployEnvironment/UpdateDeployEnvironment"); - final java.util.function.Function< - javax.ws.rs.core.Response, UpdateDeployEnvironmentResponse> + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/UpdatePullRequest"); + final java.util.function.Function transformer = - UpdateDeployEnvironmentConverter.fromResponse( + UpdatePullRequestConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler< - UpdateDeployEnvironmentRequest, UpdateDeployEnvironmentResponse> + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - UpdateDeployEnvironmentRequest, UpdateDeployEnvironmentResponse>, - java.util.concurrent.Future> + UpdatePullRequestRequest, UpdatePullRequestResponse>, + java.util.concurrent.Future> futureSupplier = client.putFutureSupplier( interceptedRequest, - interceptedRequest.getUpdateDeployEnvironmentDetails(), + interceptedRequest.getUpdatePullRequestDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - UpdateDeployEnvironmentRequest, UpdateDeployEnvironmentResponse>( + UpdatePullRequestRequest, UpdatePullRequestResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -4354,45 +7010,46 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future updateDeployPipeline( - UpdateDeployPipelineRequest request, + public java.util.concurrent.Future updatePullRequestComment( + UpdatePullRequestCommentRequest request, final com.oracle.bmc.responses.AsyncHandler< - UpdateDeployPipelineRequest, UpdateDeployPipelineResponse> + UpdatePullRequestCommentRequest, UpdatePullRequestCommentResponse> handler) { - LOG.trace("Called async updateDeployPipeline"); - final UpdateDeployPipelineRequest interceptedRequest = - UpdateDeployPipelineConverter.interceptRequest(request); + LOG.trace("Called async updatePullRequestComment"); + final UpdatePullRequestCommentRequest interceptedRequest = + UpdatePullRequestCommentConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - UpdateDeployPipelineConverter.fromRequest(client, interceptedRequest); + UpdatePullRequestCommentConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "UpdateDeployPipeline", + "UpdatePullRequestComment", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployPipeline/UpdateDeployPipeline"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/UpdatePullRequestComment"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdatePullRequestCommentResponse> transformer = - UpdateDeployPipelineConverter.fromResponse( + UpdatePullRequestCommentConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - UpdateDeployPipelineRequest, UpdateDeployPipelineResponse> + UpdatePullRequestCommentRequest, UpdatePullRequestCommentResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - UpdateDeployPipelineRequest, UpdateDeployPipelineResponse>, - java.util.concurrent.Future> + UpdatePullRequestCommentRequest, UpdatePullRequestCommentResponse>, + java.util.concurrent.Future> futureSupplier = client.putFutureSupplier( interceptedRequest, - interceptedRequest.getUpdateDeployPipelineDetails(), + interceptedRequest.getUpdatePullRequestCommentDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - UpdateDeployPipelineRequest, UpdateDeployPipelineResponse>( + UpdatePullRequestCommentRequest, UpdatePullRequestCommentResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -4406,44 +7063,54 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future updateDeployStage( - UpdateDeployStageRequest request, - final com.oracle.bmc.responses.AsyncHandler< - UpdateDeployStageRequest, UpdateDeployStageResponse> - handler) { - LOG.trace("Called async updateDeployStage"); - final UpdateDeployStageRequest interceptedRequest = - UpdateDeployStageConverter.interceptRequest(request); + public java.util.concurrent.Future + updatePullRequestNotificationPreference( + UpdatePullRequestNotificationPreferenceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdatePullRequestNotificationPreferenceRequest, + UpdatePullRequestNotificationPreferenceResponse> + handler) { + LOG.trace("Called async updatePullRequestNotificationPreference"); + final UpdatePullRequestNotificationPreferenceRequest interceptedRequest = + UpdatePullRequestNotificationPreferenceConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - UpdateDeployStageConverter.fromRequest(client, interceptedRequest); + UpdatePullRequestNotificationPreferenceConverter.fromRequest( + client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "UpdateDeployStage", + "UpdatePullRequestNotificationPreference", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployStage/UpdateDeployStage"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequestNotificationPreference/UpdatePullRequestNotificationPreference"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdatePullRequestNotificationPreferenceResponse> transformer = - UpdateDeployStageConverter.fromResponse( + UpdatePullRequestNotificationPreferenceConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + UpdatePullRequestNotificationPreferenceRequest, + UpdatePullRequestNotificationPreferenceResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - UpdateDeployStageRequest, UpdateDeployStageResponse>, - java.util.concurrent.Future> + UpdatePullRequestNotificationPreferenceRequest, + UpdatePullRequestNotificationPreferenceResponse>, + java.util.concurrent.Future< + UpdatePullRequestNotificationPreferenceResponse>> futureSupplier = client.putFutureSupplier( interceptedRequest, - interceptedRequest.getUpdateDeployStageDetails(), + interceptedRequest + .getUpdatePullRequestNotificationPreferenceDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - UpdateDeployStageRequest, UpdateDeployStageResponse>( + UpdatePullRequestNotificationPreferenceRequest, + UpdatePullRequestNotificationPreferenceResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -4457,44 +7124,44 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future updateDeployment( - UpdateDeploymentRequest request, + public java.util.concurrent.Future updateRepository( + UpdateRepositoryRequest request, final com.oracle.bmc.responses.AsyncHandler< - UpdateDeploymentRequest, UpdateDeploymentResponse> + UpdateRepositoryRequest, UpdateRepositoryResponse> handler) { - LOG.trace("Called async updateDeployment"); - final UpdateDeploymentRequest interceptedRequest = - UpdateDeploymentConverter.interceptRequest(request); + LOG.trace("Called async updateRepository"); + final UpdateRepositoryRequest interceptedRequest = + UpdateRepositoryConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - UpdateDeploymentConverter.fromRequest(client, interceptedRequest); + UpdateRepositoryConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "UpdateDeployment", + "UpdateRepository", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Deployment/UpdateDeployment"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/UpdateRepository"); + final java.util.function.Function transformer = - UpdateDeploymentConverter.fromResponse( + UpdateRepositoryConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - UpdateDeploymentRequest, UpdateDeploymentResponse>, - java.util.concurrent.Future> + UpdateRepositoryRequest, UpdateRepositoryResponse>, + java.util.concurrent.Future> futureSupplier = client.putFutureSupplier( interceptedRequest, - interceptedRequest.getUpdateDeploymentDetails(), + interceptedRequest.getUpdateRepositoryDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - UpdateDeploymentRequest, UpdateDeploymentResponse>( + UpdateRepositoryRequest, UpdateRepositoryResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -4508,42 +7175,53 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future updateProject( - UpdateProjectRequest request, - final com.oracle.bmc.responses.AsyncHandler - handler) { - LOG.trace("Called async updateProject"); - final UpdateProjectRequest interceptedRequest = - UpdateProjectConverter.interceptRequest(request); + public java.util.concurrent.Future + updateRepositoryNotificationPreference( + UpdateRepositoryNotificationPreferenceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateRepositoryNotificationPreferenceRequest, + UpdateRepositoryNotificationPreferenceResponse> + handler) { + LOG.trace("Called async updateRepositoryNotificationPreference"); + final UpdateRepositoryNotificationPreferenceRequest interceptedRequest = + UpdateRepositoryNotificationPreferenceConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - UpdateProjectConverter.fromRequest(client, interceptedRequest); + UpdateRepositoryNotificationPreferenceConverter.fromRequest( + client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "UpdateProject", + "UpdateRepositoryNotificationPreference", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Project/UpdateProject"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryNotificationPreference/UpdateRepositoryNotificationPreference"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateRepositoryNotificationPreferenceResponse> transformer = - UpdateProjectConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + UpdateRepositoryNotificationPreferenceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateRepositoryNotificationPreferenceRequest, + UpdateRepositoryNotificationPreferenceResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - UpdateProjectRequest, UpdateProjectResponse>, - java.util.concurrent.Future> + UpdateRepositoryNotificationPreferenceRequest, + UpdateRepositoryNotificationPreferenceResponse>, + java.util.concurrent.Future> futureSupplier = client.putFutureSupplier( interceptedRequest, - interceptedRequest.getUpdateProjectDetails(), + interceptedRequest + .getUpdateRepositoryNotificationPreferenceDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - UpdateProjectRequest, UpdateProjectResponse>( + UpdateRepositoryNotificationPreferenceRequest, + UpdateRepositoryNotificationPreferenceResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -4557,44 +7235,47 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future updateRepository( - UpdateRepositoryRequest request, + public java.util.concurrent.Future updateRepositorySettings( + UpdateRepositorySettingsRequest request, final com.oracle.bmc.responses.AsyncHandler< - UpdateRepositoryRequest, UpdateRepositoryResponse> + UpdateRepositorySettingsRequest, UpdateRepositorySettingsResponse> handler) { - LOG.trace("Called async updateRepository"); - final UpdateRepositoryRequest interceptedRequest = - UpdateRepositoryConverter.interceptRequest(request); + LOG.trace("Called async updateRepositorySettings"); + final UpdateRepositorySettingsRequest interceptedRequest = + UpdateRepositorySettingsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - UpdateRepositoryConverter.fromRequest(client, interceptedRequest); + UpdateRepositorySettingsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "UpdateRepository", + "UpdateRepositorySettings", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/UpdateRepository"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositorySettings/UpdateRepositorySettings"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateRepositorySettingsResponse> transformer = - UpdateRepositoryConverter.fromResponse( + UpdateRepositorySettingsConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + UpdateRepositorySettingsRequest, UpdateRepositorySettingsResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - UpdateRepositoryRequest, UpdateRepositoryResponse>, - java.util.concurrent.Future> + UpdateRepositorySettingsRequest, UpdateRepositorySettingsResponse>, + java.util.concurrent.Future> futureSupplier = client.putFutureSupplier( interceptedRequest, - interceptedRequest.getUpdateRepositoryDetails(), + interceptedRequest.getUpdateRepositorySettingsDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - UpdateRepositoryRequest, UpdateRepositoryResponse>( + UpdateRepositorySettingsRequest, UpdateRepositorySettingsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/DevopsClient.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/DevopsClient.java index bf0d62edcf7..536c443efdb 100644 --- a/bmc-devops/src/main/java/com/oracle/bmc/devops/DevopsClient.java +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/DevopsClient.java @@ -377,7 +377,8 @@ protected DevopsClient( if (com.oracle.bmc.http.ApacheUtils.isExtraStreamLogsEnabled()) { LOG.warn( com.oracle.bmc.http.ApacheUtils.getStreamWarningMessage( - "DevopsClient", "getObjectContent,getRepositoryArchiveContent")); + "DevopsClient", + "getObjectContent,getPullRequestAttachmentContent,getRepositoryArchiveContent,unsubscribePullRequest")); } } @@ -1139,6 +1140,93 @@ public CreateDeploymentResponse createDeployment(CreateDeploymentRequest request }); } + @Override + public CreateOrUpdateGitRefResponse createOrUpdateGitRef(CreateOrUpdateGitRefRequest request) { + LOG.trace("Called createOrUpdateGitRef"); + final CreateOrUpdateGitRefRequest interceptedRequest = + CreateOrUpdateGitRefConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateOrUpdateGitRefConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "CreateOrUpdateGitRef", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/CreateOrUpdateGitRef"); + java.util.function.Function + transformer = + CreateOrUpdateGitRefConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateOrUpdateGitRefDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateOrUpdateProtectedBranchResponse createOrUpdateProtectedBranch( + CreateOrUpdateProtectedBranchRequest request) { + LOG.trace("Called createOrUpdateProtectedBranch"); + final CreateOrUpdateProtectedBranchRequest interceptedRequest = + CreateOrUpdateProtectedBranchConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateOrUpdateProtectedBranchConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "CreateOrUpdateProtectedBranch", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProtectedBranch/CreateOrUpdateProtectedBranch"); + java.util.function.Function< + javax.ws.rs.core.Response, CreateOrUpdateProtectedBranchResponse> + transformer = + CreateOrUpdateProtectedBranchConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getCreateOrUpdateProtectedBranchDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public CreateProjectResponse createProject(CreateProjectRequest request) { LOG.trace("Called createProject"); @@ -1179,6 +1267,168 @@ public CreateProjectResponse createProject(CreateProjectRequest request) { }); } + @Override + public CreatePullRequestResponse createPullRequest(CreatePullRequestRequest request) { + LOG.trace("Called createPullRequest"); + final CreatePullRequestRequest interceptedRequest = + CreatePullRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreatePullRequestConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "CreatePullRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/CreatePullRequest"); + java.util.function.Function + transformer = + CreatePullRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreatePullRequestDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreatePullRequestAttachmentResponse createPullRequestAttachment( + CreatePullRequestAttachmentRequest request) { + LOG.trace("Called createPullRequestAttachment"); + try { + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + request.getRetryConfiguration(), retryConfiguration, true); + if (request.getRetryConfiguration() != null + || retryConfiguration != null + || shouldRetryBecauseOfWaiterConfiguration(retrier) + || authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + request = + com.oracle.bmc.retrier.Retriers.wrapBodyInputStreamIfNecessary( + request, CreatePullRequestAttachmentRequest.builder()); + } + final CreatePullRequestAttachmentRequest interceptedRequest = + CreatePullRequestAttachmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreatePullRequestAttachmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "CreatePullRequestAttachment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/CreatePullRequestAttachment"); + java.util.function.Function< + javax.ws.rs.core.Response, CreatePullRequestAttachmentResponse> + transformer = + CreatePullRequestAttachmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + try { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getCreatePullRequestAttachmentBody(), + retriedRequest); + return transformer.apply(response); + } catch (RuntimeException e) { + if (interceptedRequest.getRetryConfiguration() != null + || retryConfiguration != null + || shouldRetryBecauseOfWaiterConfiguration(retrier) + || (e instanceof com.oracle.bmc.model.BmcException + && tokenRefreshRetrier + .getRetryCondition() + .shouldBeRetried( + (com.oracle.bmc.model + .BmcException) + e))) { + com.oracle.bmc.retrier.Retriers.tryResetStreamForRetry( + interceptedRequest + .getCreatePullRequestAttachmentBody(), + true); + } + throw e; // rethrow + } + }); + }); + } finally { + com.oracle.bmc.io.internal.KeepOpenInputStream.closeStream( + request.getCreatePullRequestAttachmentBody()); + } + } + + @Override + public CreatePullRequestCommentResponse createPullRequestComment( + CreatePullRequestCommentRequest request) { + LOG.trace("Called createPullRequestComment"); + final CreatePullRequestCommentRequest interceptedRequest = + CreatePullRequestCommentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreatePullRequestCommentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "CreatePullRequestComment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/CreatePullRequestComment"); + java.util.function.Function + transformer = + CreatePullRequestCommentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreatePullRequestCommentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public CreateRepositoryResponse createRepository(CreateRepositoryRequest request) { LOG.trace("Called createRepository"); @@ -1261,6 +1511,44 @@ public CreateTriggerResponse createTrigger(CreateTriggerRequest request) { }); } + @Override + public DeclinePullRequestResponse declinePullRequest(DeclinePullRequestRequest request) { + LOG.trace("Called declinePullRequest"); + final DeclinePullRequestRequest interceptedRequest = + DeclinePullRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeclinePullRequestConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "DeclinePullRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/DeclinePullRequest"); + java.util.function.Function + transformer = + DeclinePullRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DeleteBuildPipelineResponse deleteBuildPipeline(DeleteBuildPipelineRequest request) { LOG.trace("Called deleteBuildPipeline"); @@ -1529,6 +1817,46 @@ public DeleteDeployStageResponse deleteDeployStage(DeleteDeployStageRequest requ }); } + @Override + public DeleteGitRefResponse deleteGitRef(DeleteGitRefRequest request) { + LOG.trace("Called deleteGitRef"); + final DeleteGitRefRequest interceptedRequest = + DeleteGitRefConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteGitRefConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "DeleteGitRef", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/DeleteGitRef"); + java.util.function.Function transformer = + DeleteGitRefConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getDeleteGitRefDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DeleteProjectResponse deleteProject(DeleteProjectRequest request) { LOG.trace("Called deleteProject"); @@ -1566,11 +1894,13 @@ public DeleteProjectResponse deleteProject(DeleteProjectRequest request) { } @Override - public DeleteRefResponse deleteRef(DeleteRefRequest request) { - LOG.trace("Called deleteRef"); - final DeleteRefRequest interceptedRequest = DeleteRefConverter.interceptRequest(request); + public DeleteProjectRepositorySettingsResponse deleteProjectRepositorySettings( + DeleteProjectRepositorySettingsRequest request) { + LOG.trace("Called deleteProjectRepositorySettings"); + final DeleteProjectRepositorySettingsRequest interceptedRequest = + DeleteProjectRepositorySettingsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteRefConverter.fromRequest(client, interceptedRequest); + DeleteProjectRepositorySettingsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -1580,11 +1910,14 @@ public DeleteRefResponse deleteRef(DeleteRefRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "DeleteRef", + "DeleteProjectRepositorySettings", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/DeleteRef"); - java.util.function.Function transformer = - DeleteRefConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProjectRepositorySettings/DeleteProjectRepositorySettings"); + java.util.function.Function< + javax.ws.rs.core.Response, DeleteProjectRepositorySettingsResponse> + transformer = + DeleteProjectRepositorySettingsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -1602,26 +1935,28 @@ public DeleteRefResponse deleteRef(DeleteRefRequest request) { } @Override - public DeleteRepositoryResponse deleteRepository(DeleteRepositoryRequest request) { - LOG.trace("Called deleteRepository"); - final DeleteRepositoryRequest interceptedRequest = - DeleteRepositoryConverter.interceptRequest(request); + public DeleteProtectedBranchResponse deleteProtectedBranch( + DeleteProtectedBranchRequest request) { + LOG.trace("Called deleteProtectedBranch"); + final DeleteProtectedBranchRequest interceptedRequest = + DeleteProtectedBranchConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteRepositoryConverter.fromRequest(client, interceptedRequest); + DeleteProtectedBranchConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "DeleteRepository", + "DeleteProtectedBranch", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/DeleteRepository"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProtectedBranch/DeleteProtectedBranch"); + java.util.function.Function transformer = - DeleteRepositoryConverter.fromResponse( + DeleteProtectedBranchConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -1633,19 +1968,22 @@ public DeleteRepositoryResponse deleteRepository(DeleteRepositoryRequest request retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.delete(ib, retriedRequest); + client.post( + ib, + retriedRequest.getDeleteProtectedBranchDetails(), + retriedRequest); return transformer.apply(response); }); }); } @Override - public DeleteTriggerResponse deleteTrigger(DeleteTriggerRequest request) { - LOG.trace("Called deleteTrigger"); - final DeleteTriggerRequest interceptedRequest = - DeleteTriggerConverter.interceptRequest(request); + public DeletePullRequestResponse deletePullRequest(DeletePullRequestRequest request) { + LOG.trace("Called deletePullRequest"); + final DeletePullRequestRequest interceptedRequest = + DeletePullRequestConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteTriggerConverter.fromRequest(client, interceptedRequest); + DeletePullRequestConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -1654,11 +1992,13 @@ public DeleteTriggerResponse deleteTrigger(DeleteTriggerRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "DeleteTrigger", + "DeletePullRequest", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Trigger/DeleteTrigger"); - java.util.function.Function transformer = - DeleteTriggerConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/DeletePullRequest"); + java.util.function.Function + transformer = + DeletePullRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -1676,12 +2016,13 @@ public DeleteTriggerResponse deleteTrigger(DeleteTriggerRequest request) { } @Override - public GetBuildPipelineResponse getBuildPipeline(GetBuildPipelineRequest request) { - LOG.trace("Called getBuildPipeline"); - final GetBuildPipelineRequest interceptedRequest = - GetBuildPipelineConverter.interceptRequest(request); + public DeletePullRequestAttachmentResponse deletePullRequestAttachment( + DeletePullRequestAttachmentRequest request) { + LOG.trace("Called deletePullRequestAttachment"); + final DeletePullRequestAttachmentRequest interceptedRequest = + DeletePullRequestAttachmentConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetBuildPipelineConverter.fromRequest(client, interceptedRequest); + DeletePullRequestAttachmentConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -1690,12 +2031,12 @@ public GetBuildPipelineResponse getBuildPipeline(GetBuildPipelineRequest request com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "GetBuildPipeline", + "DeletePullRequestAttachment", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildPipeline/GetBuildPipeline"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/DeletePullRequestAttachment"); + java.util.function.Function transformer = - GetBuildPipelineConverter.fromResponse( + DeletePullRequestAttachmentConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -1706,20 +2047,21 @@ public GetBuildPipelineResponse getBuildPipeline(GetBuildPipelineRequest request return tokenRefreshRetrier.execute( retryRequest, retriedRequest -> { - javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public GetBuildPipelineStageResponse getBuildPipelineStage( - GetBuildPipelineStageRequest request) { - LOG.trace("Called getBuildPipelineStage"); - final GetBuildPipelineStageRequest interceptedRequest = - GetBuildPipelineStageConverter.interceptRequest(request); + public DeletePullRequestCommentResponse deletePullRequestComment( + DeletePullRequestCommentRequest request) { + LOG.trace("Called deletePullRequestComment"); + final DeletePullRequestCommentRequest interceptedRequest = + DeletePullRequestCommentConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetBuildPipelineStageConverter.fromRequest(client, interceptedRequest); + DeletePullRequestCommentConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -1728,12 +2070,12 @@ public GetBuildPipelineStageResponse getBuildPipelineStage( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "GetBuildPipelineStage", + "DeletePullRequestComment", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildPipelineStage/GetBuildPipelineStage"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/DeletePullRequestComment"); + java.util.function.Function transformer = - GetBuildPipelineStageConverter.fromResponse( + DeletePullRequestCommentConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -1744,14 +2086,240 @@ public GetBuildPipelineStageResponse getBuildPipelineStage( return tokenRefreshRetrier.execute( retryRequest, retriedRequest -> { - javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public GetBuildRunResponse getBuildRun(GetBuildRunRequest request) { + public DeleteRefResponse deleteRef(DeleteRefRequest request) { + LOG.trace("Called deleteRef"); + final DeleteRefRequest interceptedRequest = DeleteRefConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteRefConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "DeleteRef", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/DeleteRef"); + java.util.function.Function transformer = + DeleteRefConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteRepositoryResponse deleteRepository(DeleteRepositoryRequest request) { + LOG.trace("Called deleteRepository"); + final DeleteRepositoryRequest interceptedRequest = + DeleteRepositoryConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteRepositoryConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "DeleteRepository", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/DeleteRepository"); + java.util.function.Function + transformer = + DeleteRepositoryConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteRepositorySettingsResponse deleteRepositorySettings( + DeleteRepositorySettingsRequest request) { + LOG.trace("Called deleteRepositorySettings"); + final DeleteRepositorySettingsRequest interceptedRequest = + DeleteRepositorySettingsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteRepositorySettingsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "DeleteRepositorySettings", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositorySettings/DeleteRepositorySettings"); + java.util.function.Function + transformer = + DeleteRepositorySettingsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteTriggerResponse deleteTrigger(DeleteTriggerRequest request) { + LOG.trace("Called deleteTrigger"); + final DeleteTriggerRequest interceptedRequest = + DeleteTriggerConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteTriggerConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "DeleteTrigger", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Trigger/DeleteTrigger"); + java.util.function.Function transformer = + DeleteTriggerConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetBuildPipelineResponse getBuildPipeline(GetBuildPipelineRequest request) { + LOG.trace("Called getBuildPipeline"); + final GetBuildPipelineRequest interceptedRequest = + GetBuildPipelineConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetBuildPipelineConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "GetBuildPipeline", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildPipeline/GetBuildPipeline"); + java.util.function.Function + transformer = + GetBuildPipelineConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetBuildPipelineStageResponse getBuildPipelineStage( + GetBuildPipelineStageRequest request) { + LOG.trace("Called getBuildPipelineStage"); + final GetBuildPipelineStageRequest interceptedRequest = + GetBuildPipelineStageConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetBuildPipelineStageConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "GetBuildPipelineStage", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildPipelineStage/GetBuildPipelineStage"); + java.util.function.Function + transformer = + GetBuildPipelineStageConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetBuildRunResponse getBuildRun(GetBuildRunRequest request) { LOG.trace("Called getBuildRun"); final GetBuildRunRequest interceptedRequest = GetBuildRunConverter.interceptRequest(request); @@ -2248,11 +2816,13 @@ public GetProjectResponse getProject(GetProjectRequest request) { } @Override - public GetRefResponse getRef(GetRefRequest request) { - LOG.trace("Called getRef"); - final GetRefRequest interceptedRequest = GetRefConverter.interceptRequest(request); + public GetProjectNotificationPreferenceResponse getProjectNotificationPreference( + GetProjectNotificationPreferenceRequest request) { + LOG.trace("Called getProjectNotificationPreference"); + final GetProjectNotificationPreferenceRequest interceptedRequest = + GetProjectNotificationPreferenceConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetRefConverter.fromRequest(client, interceptedRequest); + GetProjectNotificationPreferenceConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2261,11 +2831,14 @@ public GetRefResponse getRef(GetRefRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "GetRef", + "GetProjectNotificationPreference", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRef"); - java.util.function.Function transformer = - GetRefConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProjectNotificationPreference/GetProjectNotificationPreference"); + java.util.function.Function< + javax.ws.rs.core.Response, GetProjectNotificationPreferenceResponse> + transformer = + GetProjectNotificationPreferenceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -2282,12 +2855,13 @@ public GetRefResponse getRef(GetRefRequest request) { } @Override - public GetRepoFileDiffResponse getRepoFileDiff(GetRepoFileDiffRequest request) { - LOG.trace("Called getRepoFileDiff"); - final GetRepoFileDiffRequest interceptedRequest = - GetRepoFileDiffConverter.interceptRequest(request); + public GetProjectRepositorySettingsResponse getProjectRepositorySettings( + GetProjectRepositorySettingsRequest request) { + LOG.trace("Called getProjectRepositorySettings"); + final GetProjectRepositorySettingsRequest interceptedRequest = + GetProjectRepositorySettingsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetRepoFileDiffConverter.fromRequest(client, interceptedRequest); + GetProjectRepositorySettingsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2296,12 +2870,12 @@ public GetRepoFileDiffResponse getRepoFileDiff(GetRepoFileDiffRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "GetRepoFileDiff", + "GetProjectRepositorySettings", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepoFileDiff"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProjectRepositorySettings/GetProjectRepositorySettings"); + java.util.function.Function transformer = - GetRepoFileDiffConverter.fromResponse( + GetProjectRepositorySettingsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -2319,12 +2893,12 @@ public GetRepoFileDiffResponse getRepoFileDiff(GetRepoFileDiffRequest request) { } @Override - public GetRepoFileLinesResponse getRepoFileLines(GetRepoFileLinesRequest request) { - LOG.trace("Called getRepoFileLines"); - final GetRepoFileLinesRequest interceptedRequest = - GetRepoFileLinesConverter.interceptRequest(request); + public GetPullRequestResponse getPullRequest(GetPullRequestRequest request) { + LOG.trace("Called getPullRequest"); + final GetPullRequestRequest interceptedRequest = + GetPullRequestConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetRepoFileLinesConverter.fromRequest(client, interceptedRequest); + GetPullRequestConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2333,13 +2907,11 @@ public GetRepoFileLinesResponse getRepoFileLines(GetRepoFileLinesRequest request com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "GetRepoFileLines", + "GetPullRequest", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepoFileLines"); - java.util.function.Function - transformer = - GetRepoFileLinesConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/GetPullRequest"); + java.util.function.Function transformer = + GetPullRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -2356,12 +2928,13 @@ public GetRepoFileLinesResponse getRepoFileLines(GetRepoFileLinesRequest request } @Override - public GetRepositoryResponse getRepository(GetRepositoryRequest request) { - LOG.trace("Called getRepository"); - final GetRepositoryRequest interceptedRequest = - GetRepositoryConverter.interceptRequest(request); + public GetPullRequestAttachmentResponse getPullRequestAttachment( + GetPullRequestAttachmentRequest request) { + LOG.trace("Called getPullRequestAttachment"); + final GetPullRequestAttachmentRequest interceptedRequest = + GetPullRequestAttachmentConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetRepositoryConverter.fromRequest(client, interceptedRequest); + GetPullRequestAttachmentConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2370,11 +2943,13 @@ public GetRepositoryResponse getRepository(GetRepositoryRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "GetRepository", + "GetPullRequestAttachment", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepository"); - java.util.function.Function transformer = - GetRepositoryConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/GetPullRequestAttachment"); + java.util.function.Function + transformer = + GetPullRequestAttachmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -2391,13 +2966,13 @@ public GetRepositoryResponse getRepository(GetRepositoryRequest request) { } @Override - public GetRepositoryArchiveContentResponse getRepositoryArchiveContent( - GetRepositoryArchiveContentRequest request) { - LOG.trace("Called getRepositoryArchiveContent"); - final GetRepositoryArchiveContentRequest interceptedRequest = - GetRepositoryArchiveContentConverter.interceptRequest(request); + public GetPullRequestAttachmentContentResponse getPullRequestAttachmentContent( + GetPullRequestAttachmentContentRequest request) { + LOG.trace("Called getPullRequestAttachmentContent"); + final GetPullRequestAttachmentContentRequest interceptedRequest = + GetPullRequestAttachmentContentConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetRepositoryArchiveContentConverter.fromRequest(client, interceptedRequest); + GetPullRequestAttachmentContentConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2406,12 +2981,13 @@ public GetRepositoryArchiveContentResponse getRepositoryArchiveContent( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "GetRepositoryArchiveContent", + "GetPullRequestAttachmentContent", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepositoryArchiveContent"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/GetPullRequestAttachmentContent"); + java.util.function.Function< + javax.ws.rs.core.Response, GetPullRequestAttachmentContentResponse> transformer = - GetRepositoryArchiveContentConverter.fromResponse( + GetPullRequestAttachmentContentConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -2429,13 +3005,13 @@ public GetRepositoryArchiveContentResponse getRepositoryArchiveContent( } @Override - public GetRepositoryFileLinesResponse getRepositoryFileLines( - GetRepositoryFileLinesRequest request) { - LOG.trace("Called getRepositoryFileLines"); - final GetRepositoryFileLinesRequest interceptedRequest = - GetRepositoryFileLinesConverter.interceptRequest(request); + public GetPullRequestChangeSummaryMetricsResponse getPullRequestChangeSummaryMetrics( + GetPullRequestChangeSummaryMetricsRequest request) { + LOG.trace("Called getPullRequestChangeSummaryMetrics"); + final GetPullRequestChangeSummaryMetricsRequest interceptedRequest = + GetPullRequestChangeSummaryMetricsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetRepositoryFileLinesConverter.fromRequest(client, interceptedRequest); + GetPullRequestChangeSummaryMetricsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2444,12 +3020,13 @@ public GetRepositoryFileLinesResponse getRepositoryFileLines( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "GetRepositoryFileLines", + "GetPullRequestChangeSummaryMetrics", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepositoryFileLines"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/GetPullRequestChangeSummaryMetrics"); + java.util.function.Function< + javax.ws.rs.core.Response, GetPullRequestChangeSummaryMetricsResponse> transformer = - GetRepositoryFileLinesConverter.fromResponse( + GetPullRequestChangeSummaryMetricsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -2467,11 +3044,13 @@ public GetRepositoryFileLinesResponse getRepositoryFileLines( } @Override - public GetTriggerResponse getTrigger(GetTriggerRequest request) { - LOG.trace("Called getTrigger"); - final GetTriggerRequest interceptedRequest = GetTriggerConverter.interceptRequest(request); + public GetPullRequestCommentResponse getPullRequestComment( + GetPullRequestCommentRequest request) { + LOG.trace("Called getPullRequestComment"); + final GetPullRequestCommentRequest interceptedRequest = + GetPullRequestCommentConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetTriggerConverter.fromRequest(client, interceptedRequest); + GetPullRequestCommentConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2480,11 +3059,13 @@ public GetTriggerResponse getTrigger(GetTriggerRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "GetTrigger", + "GetPullRequestComment", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Trigger/GetTrigger"); - java.util.function.Function transformer = - GetTriggerConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/GetPullRequestComment"); + java.util.function.Function + transformer = + GetPullRequestCommentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -2501,12 +3082,14 @@ public GetTriggerResponse getTrigger(GetTriggerRequest request) { } @Override - public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) { - LOG.trace("Called getWorkRequest"); - final GetWorkRequestRequest interceptedRequest = - GetWorkRequestConverter.interceptRequest(request); + public GetPullRequestNotificationPreferenceResponse getPullRequestNotificationPreference( + GetPullRequestNotificationPreferenceRequest request) { + LOG.trace("Called getPullRequestNotificationPreference"); + final GetPullRequestNotificationPreferenceRequest interceptedRequest = + GetPullRequestNotificationPreferenceConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetWorkRequestConverter.fromRequest(client, interceptedRequest); + GetPullRequestNotificationPreferenceConverter.fromRequest( + client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2515,11 +3098,14 @@ public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "GetWorkRequest", + "GetPullRequestNotificationPreference", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/WorkRequest/GetWorkRequest"); - java.util.function.Function transformer = - GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequestNotificationPreference/GetPullRequestNotificationPreference"); + java.util.function.Function< + javax.ws.rs.core.Response, GetPullRequestNotificationPreferenceResponse> + transformer = + GetPullRequestNotificationPreferenceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -2536,12 +3122,11 @@ public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) { } @Override - public ListAuthorsResponse listAuthors(ListAuthorsRequest request) { - LOG.trace("Called listAuthors"); - final ListAuthorsRequest interceptedRequest = - ListAuthorsConverter.interceptRequest(request); + public GetRefResponse getRef(GetRefRequest request) { + LOG.trace("Called getRef"); + final GetRefRequest interceptedRequest = GetRefConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAuthorsConverter.fromRequest(client, interceptedRequest); + GetRefConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2550,11 +3135,11 @@ public ListAuthorsResponse listAuthors(ListAuthorsRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListAuthors", + "GetRef", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListAuthors"); - java.util.function.Function transformer = - ListAuthorsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRef"); + java.util.function.Function transformer = + GetRefConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -2571,13 +3156,12 @@ public ListAuthorsResponse listAuthors(ListAuthorsRequest request) { } @Override - public ListBuildPipelineStagesResponse listBuildPipelineStages( - ListBuildPipelineStagesRequest request) { - LOG.trace("Called listBuildPipelineStages"); - final ListBuildPipelineStagesRequest interceptedRequest = - ListBuildPipelineStagesConverter.interceptRequest(request); + public GetRepoFileDiffResponse getRepoFileDiff(GetRepoFileDiffRequest request) { + LOG.trace("Called getRepoFileDiff"); + final GetRepoFileDiffRequest interceptedRequest = + GetRepoFileDiffConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListBuildPipelineStagesConverter.fromRequest(client, interceptedRequest); + GetRepoFileDiffConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2586,12 +3170,12 @@ public ListBuildPipelineStagesResponse listBuildPipelineStages( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListBuildPipelineStages", + "GetRepoFileDiff", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildPipelineStageSummary/ListBuildPipelineStages"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepoFileDiff"); + java.util.function.Function transformer = - ListBuildPipelineStagesConverter.fromResponse( + GetRepoFileDiffConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -2609,12 +3193,12 @@ public ListBuildPipelineStagesResponse listBuildPipelineStages( } @Override - public ListBuildPipelinesResponse listBuildPipelines(ListBuildPipelinesRequest request) { - LOG.trace("Called listBuildPipelines"); - final ListBuildPipelinesRequest interceptedRequest = - ListBuildPipelinesConverter.interceptRequest(request); + public GetRepoFileLinesResponse getRepoFileLines(GetRepoFileLinesRequest request) { + LOG.trace("Called getRepoFileLines"); + final GetRepoFileLinesRequest interceptedRequest = + GetRepoFileLinesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListBuildPipelinesConverter.fromRequest(client, interceptedRequest); + GetRepoFileLinesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2623,12 +3207,12 @@ public ListBuildPipelinesResponse listBuildPipelines(ListBuildPipelinesRequest r com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListBuildPipelines", + "GetRepoFileLines", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildPipelineCollection/ListBuildPipelines"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepoFileLines"); + java.util.function.Function transformer = - ListBuildPipelinesConverter.fromResponse( + GetRepoFileLinesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -2646,12 +3230,12 @@ public ListBuildPipelinesResponse listBuildPipelines(ListBuildPipelinesRequest r } @Override - public ListBuildRunsResponse listBuildRuns(ListBuildRunsRequest request) { - LOG.trace("Called listBuildRuns"); - final ListBuildRunsRequest interceptedRequest = - ListBuildRunsConverter.interceptRequest(request); + public GetRepositoryResponse getRepository(GetRepositoryRequest request) { + LOG.trace("Called getRepository"); + final GetRepositoryRequest interceptedRequest = + GetRepositoryConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListBuildRunsConverter.fromRequest(client, interceptedRequest); + GetRepositoryConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2660,11 +3244,11 @@ public ListBuildRunsResponse listBuildRuns(ListBuildRunsRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListBuildRuns", + "GetRepository", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildRunSummary/ListBuildRuns"); - java.util.function.Function transformer = - ListBuildRunsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepository"); + java.util.function.Function transformer = + GetRepositoryConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -2681,12 +3265,13 @@ public ListBuildRunsResponse listBuildRuns(ListBuildRunsRequest request) { } @Override - public ListCommitDiffsResponse listCommitDiffs(ListCommitDiffsRequest request) { - LOG.trace("Called listCommitDiffs"); - final ListCommitDiffsRequest interceptedRequest = - ListCommitDiffsConverter.interceptRequest(request); + public GetRepositoryArchiveContentResponse getRepositoryArchiveContent( + GetRepositoryArchiveContentRequest request) { + LOG.trace("Called getRepositoryArchiveContent"); + final GetRepositoryArchiveContentRequest interceptedRequest = + GetRepositoryArchiveContentConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListCommitDiffsConverter.fromRequest(client, interceptedRequest); + GetRepositoryArchiveContentConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2695,12 +3280,12 @@ public ListCommitDiffsResponse listCommitDiffs(ListCommitDiffsRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListCommitDiffs", + "GetRepositoryArchiveContent", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListCommitDiffs"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepositoryArchiveContent"); + java.util.function.Function transformer = - ListCommitDiffsConverter.fromResponse( + GetRepositoryArchiveContentConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -2718,12 +3303,13 @@ public ListCommitDiffsResponse listCommitDiffs(ListCommitDiffsRequest request) { } @Override - public ListCommitsResponse listCommits(ListCommitsRequest request) { - LOG.trace("Called listCommits"); - final ListCommitsRequest interceptedRequest = - ListCommitsConverter.interceptRequest(request); + public GetRepositoryFileLinesResponse getRepositoryFileLines( + GetRepositoryFileLinesRequest request) { + LOG.trace("Called getRepositoryFileLines"); + final GetRepositoryFileLinesRequest interceptedRequest = + GetRepositoryFileLinesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListCommitsConverter.fromRequest(client, interceptedRequest); + GetRepositoryFileLinesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2732,11 +3318,13 @@ public ListCommitsResponse listCommits(ListCommitsRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListCommits", + "GetRepositoryFileLines", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryCommit/ListCommits"); - java.util.function.Function transformer = - ListCommitsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/GetRepositoryFileLines"); + java.util.function.Function + transformer = + GetRepositoryFileLinesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -2753,12 +3341,14 @@ public ListCommitsResponse listCommits(ListCommitsRequest request) { } @Override - public ListConnectionsResponse listConnections(ListConnectionsRequest request) { - LOG.trace("Called listConnections"); - final ListConnectionsRequest interceptedRequest = - ListConnectionsConverter.interceptRequest(request); + public GetRepositoryNotificationPreferenceResponse getRepositoryNotificationPreference( + GetRepositoryNotificationPreferenceRequest request) { + LOG.trace("Called getRepositoryNotificationPreference"); + final GetRepositoryNotificationPreferenceRequest interceptedRequest = + GetRepositoryNotificationPreferenceConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListConnectionsConverter.fromRequest(client, interceptedRequest); + GetRepositoryNotificationPreferenceConverter.fromRequest( + client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2767,12 +3357,13 @@ public ListConnectionsResponse listConnections(ListConnectionsRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListConnections", + "GetRepositoryNotificationPreference", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ConnectionCollection/ListConnections"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryNotificationPreference/GetRepositoryNotificationPreference"); + java.util.function.Function< + javax.ws.rs.core.Response, GetRepositoryNotificationPreferenceResponse> transformer = - ListConnectionsConverter.fromResponse( + GetRepositoryNotificationPreferenceConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -2790,12 +3381,13 @@ public ListConnectionsResponse listConnections(ListConnectionsRequest request) { } @Override - public ListDeployArtifactsResponse listDeployArtifacts(ListDeployArtifactsRequest request) { - LOG.trace("Called listDeployArtifacts"); - final ListDeployArtifactsRequest interceptedRequest = - ListDeployArtifactsConverter.interceptRequest(request); + public GetRepositorySettingsResponse getRepositorySettings( + GetRepositorySettingsRequest request) { + LOG.trace("Called getRepositorySettings"); + final GetRepositorySettingsRequest interceptedRequest = + GetRepositorySettingsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDeployArtifactsConverter.fromRequest(client, interceptedRequest); + GetRepositorySettingsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2804,12 +3396,12 @@ public ListDeployArtifactsResponse listDeployArtifacts(ListDeployArtifactsReques com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListDeployArtifacts", + "GetRepositorySettings", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployArtifactSummary/ListDeployArtifacts"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositorySettings/GetRepositorySettings"); + java.util.function.Function transformer = - ListDeployArtifactsConverter.fromResponse( + GetRepositorySettingsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -2827,13 +3419,11 @@ public ListDeployArtifactsResponse listDeployArtifacts(ListDeployArtifactsReques } @Override - public ListDeployEnvironmentsResponse listDeployEnvironments( - ListDeployEnvironmentsRequest request) { - LOG.trace("Called listDeployEnvironments"); - final ListDeployEnvironmentsRequest interceptedRequest = - ListDeployEnvironmentsConverter.interceptRequest(request); + public GetTriggerResponse getTrigger(GetTriggerRequest request) { + LOG.trace("Called getTrigger"); + final GetTriggerRequest interceptedRequest = GetTriggerConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDeployEnvironmentsConverter.fromRequest(client, interceptedRequest); + GetTriggerConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2842,13 +3432,11 @@ public ListDeployEnvironmentsResponse listDeployEnvironments( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListDeployEnvironments", + "GetTrigger", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployEnvironmentSummary/ListDeployEnvironments"); - java.util.function.Function - transformer = - ListDeployEnvironmentsConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Trigger/GetTrigger"); + java.util.function.Function transformer = + GetTriggerConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -2865,12 +3453,12 @@ public ListDeployEnvironmentsResponse listDeployEnvironments( } @Override - public ListDeployPipelinesResponse listDeployPipelines(ListDeployPipelinesRequest request) { - LOG.trace("Called listDeployPipelines"); - final ListDeployPipelinesRequest interceptedRequest = - ListDeployPipelinesConverter.interceptRequest(request); + public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) { + LOG.trace("Called getWorkRequest"); + final GetWorkRequestRequest interceptedRequest = + GetWorkRequestConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDeployPipelinesConverter.fromRequest(client, interceptedRequest); + GetWorkRequestConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2879,13 +3467,11 @@ public ListDeployPipelinesResponse listDeployPipelines(ListDeployPipelinesReques com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListDeployPipelines", + "GetWorkRequest", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployPipelineSummary/ListDeployPipelines"); - java.util.function.Function - transformer = - ListDeployPipelinesConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/WorkRequest/GetWorkRequest"); + java.util.function.Function transformer = + GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -2902,12 +3488,13 @@ public ListDeployPipelinesResponse listDeployPipelines(ListDeployPipelinesReques } @Override - public ListDeployStagesResponse listDeployStages(ListDeployStagesRequest request) { - LOG.trace("Called listDeployStages"); - final ListDeployStagesRequest interceptedRequest = - ListDeployStagesConverter.interceptRequest(request); + public LikePullRequestCommentResponse likePullRequestComment( + LikePullRequestCommentRequest request) { + LOG.trace("Called likePullRequestComment"); + final LikePullRequestCommentRequest interceptedRequest = + LikePullRequestCommentConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDeployStagesConverter.fromRequest(client, interceptedRequest); + LikePullRequestCommentConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2916,12 +3503,12 @@ public ListDeployStagesResponse listDeployStages(ListDeployStagesRequest request com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListDeployStages", + "LikePullRequestComment", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployStageSummary/ListDeployStages"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/LikePullRequestComment"); + java.util.function.Function transformer = - ListDeployStagesConverter.fromResponse( + LikePullRequestCommentConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -2932,19 +3519,20 @@ public ListDeployStagesResponse listDeployStages(ListDeployStagesRequest request return tokenRefreshRetrier.execute( retryRequest, retriedRequest -> { - javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public ListDeploymentsResponse listDeployments(ListDeploymentsRequest request) { - LOG.trace("Called listDeployments"); - final ListDeploymentsRequest interceptedRequest = - ListDeploymentsConverter.interceptRequest(request); + public ListAuthorsResponse listAuthors(ListAuthorsRequest request) { + LOG.trace("Called listAuthors"); + final ListAuthorsRequest interceptedRequest = + ListAuthorsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListDeploymentsConverter.fromRequest(client, interceptedRequest); + ListAuthorsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2953,13 +3541,11 @@ public ListDeploymentsResponse listDeployments(ListDeploymentsRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListDeployments", + "ListAuthors", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeploymentSummary/ListDeployments"); - java.util.function.Function - transformer = - ListDeploymentsConverter.fromResponse( - java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListAuthors"); + java.util.function.Function transformer = + ListAuthorsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -2976,12 +3562,13 @@ public ListDeploymentsResponse listDeployments(ListDeploymentsRequest request) { } @Override - public ListMirrorRecordsResponse listMirrorRecords(ListMirrorRecordsRequest request) { - LOG.trace("Called listMirrorRecords"); - final ListMirrorRecordsRequest interceptedRequest = - ListMirrorRecordsConverter.interceptRequest(request); - com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListMirrorRecordsConverter.fromRequest(client, interceptedRequest); + public ListBuildPipelineStagesResponse listBuildPipelineStages( + ListBuildPipelineStagesRequest request) { + LOG.trace("Called listBuildPipelineStages"); + final ListBuildPipelineStagesRequest interceptedRequest = + ListBuildPipelineStagesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListBuildPipelineStagesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -2990,12 +3577,12 @@ public ListMirrorRecordsResponse listMirrorRecords(ListMirrorRecordsRequest requ com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListMirrorRecords", + "ListBuildPipelineStages", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListMirrorRecords"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildPipelineStageSummary/ListBuildPipelineStages"); + java.util.function.Function transformer = - ListMirrorRecordsConverter.fromResponse( + ListBuildPipelineStagesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3013,11 +3600,12 @@ public ListMirrorRecordsResponse listMirrorRecords(ListMirrorRecordsRequest requ } @Override - public ListPathsResponse listPaths(ListPathsRequest request) { - LOG.trace("Called listPaths"); - final ListPathsRequest interceptedRequest = ListPathsConverter.interceptRequest(request); + public ListBuildPipelinesResponse listBuildPipelines(ListBuildPipelinesRequest request) { + LOG.trace("Called listBuildPipelines"); + final ListBuildPipelinesRequest interceptedRequest = + ListBuildPipelinesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListPathsConverter.fromRequest(client, interceptedRequest); + ListBuildPipelinesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3026,11 +3614,13 @@ public ListPathsResponse listPaths(ListPathsRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListPaths", + "ListBuildPipelines", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryPathSummary/ListPaths"); - java.util.function.Function transformer = - ListPathsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildPipelineCollection/ListBuildPipelines"); + java.util.function.Function + transformer = + ListBuildPipelinesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -3047,12 +3637,13 @@ public ListPathsResponse listPaths(ListPathsRequest request) { } @Override - public ListProjectsResponse listProjects(ListProjectsRequest request) { - LOG.trace("Called listProjects"); - final ListProjectsRequest interceptedRequest = - ListProjectsConverter.interceptRequest(request); + public ListBuildRunSnapshotsResponse listBuildRunSnapshots( + ListBuildRunSnapshotsRequest request) { + LOG.trace("Called listBuildRunSnapshots"); + final ListBuildRunSnapshotsRequest interceptedRequest = + ListBuildRunSnapshotsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListProjectsConverter.fromRequest(client, interceptedRequest); + ListBuildRunSnapshotsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3061,11 +3652,13 @@ public ListProjectsResponse listProjects(ListProjectsRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListProjects", + "ListBuildRunSnapshots", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProjectSummary/ListProjects"); - java.util.function.Function transformer = - ListProjectsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListBuildRunSnapshots"); + java.util.function.Function + transformer = + ListBuildRunSnapshotsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -3082,11 +3675,12 @@ public ListProjectsResponse listProjects(ListProjectsRequest request) { } @Override - public ListRefsResponse listRefs(ListRefsRequest request) { - LOG.trace("Called listRefs"); - final ListRefsRequest interceptedRequest = ListRefsConverter.interceptRequest(request); + public ListBuildRunsResponse listBuildRuns(ListBuildRunsRequest request) { + LOG.trace("Called listBuildRuns"); + final ListBuildRunsRequest interceptedRequest = + ListBuildRunsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListRefsConverter.fromRequest(client, interceptedRequest); + ListBuildRunsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3095,11 +3689,11 @@ public ListRefsResponse listRefs(ListRefsRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListRefs", + "ListBuildRuns", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryRef/ListRefs"); - java.util.function.Function transformer = - ListRefsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/BuildRunSummary/ListBuildRuns"); + java.util.function.Function transformer = + ListBuildRunsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -3116,12 +3710,12 @@ public ListRefsResponse listRefs(ListRefsRequest request) { } @Override - public ListRepositoriesResponse listRepositories(ListRepositoriesRequest request) { - LOG.trace("Called listRepositories"); - final ListRepositoriesRequest interceptedRequest = - ListRepositoriesConverter.interceptRequest(request); + public ListCommitDiffsResponse listCommitDiffs(ListCommitDiffsRequest request) { + LOG.trace("Called listCommitDiffs"); + final ListCommitDiffsRequest interceptedRequest = + ListCommitDiffsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListRepositoriesConverter.fromRequest(client, interceptedRequest); + ListCommitDiffsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3130,12 +3724,12 @@ public ListRepositoriesResponse listRepositories(ListRepositoriesRequest request com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListRepositories", + "ListCommitDiffs", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListRepositories"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListCommitDiffs"); + java.util.function.Function transformer = - ListRepositoriesConverter.fromResponse( + ListCommitDiffsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3153,12 +3747,12 @@ public ListRepositoriesResponse listRepositories(ListRepositoriesRequest request } @Override - public ListTriggersResponse listTriggers(ListTriggersRequest request) { - LOG.trace("Called listTriggers"); - final ListTriggersRequest interceptedRequest = - ListTriggersConverter.interceptRequest(request); + public ListCommitsResponse listCommits(ListCommitsRequest request) { + LOG.trace("Called listCommits"); + final ListCommitsRequest interceptedRequest = + ListCommitsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListTriggersConverter.fromRequest(client, interceptedRequest); + ListCommitsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3167,11 +3761,11 @@ public ListTriggersResponse listTriggers(ListTriggersRequest request) { com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListTriggers", + "ListCommits", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/TriggerCollection/ListTriggers"); - java.util.function.Function transformer = - ListTriggersConverter.fromResponse(java.util.Optional.of(serviceDetails)); + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryCommit/ListCommits"); + java.util.function.Function transformer = + ListCommitsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, retryRequest -> { @@ -3188,13 +3782,12 @@ public ListTriggersResponse listTriggers(ListTriggersRequest request) { } @Override - public ListWorkRequestErrorsResponse listWorkRequestErrors( - ListWorkRequestErrorsRequest request) { - LOG.trace("Called listWorkRequestErrors"); - final ListWorkRequestErrorsRequest interceptedRequest = - ListWorkRequestErrorsConverter.interceptRequest(request); + public ListConnectionsResponse listConnections(ListConnectionsRequest request) { + LOG.trace("Called listConnections"); + final ListConnectionsRequest interceptedRequest = + ListConnectionsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListWorkRequestErrorsConverter.fromRequest(client, interceptedRequest); + ListConnectionsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3203,12 +3796,12 @@ public ListWorkRequestErrorsResponse listWorkRequestErrors( com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListWorkRequestErrors", + "ListConnections", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/WorkRequestError/ListWorkRequestErrors"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ConnectionCollection/ListConnections"); + java.util.function.Function transformer = - ListWorkRequestErrorsConverter.fromResponse( + ListConnectionsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3226,12 +3819,12 @@ public ListWorkRequestErrorsResponse listWorkRequestErrors( } @Override - public ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsRequest request) { - LOG.trace("Called listWorkRequestLogs"); - final ListWorkRequestLogsRequest interceptedRequest = - ListWorkRequestLogsConverter.interceptRequest(request); + public ListDeployArtifactsResponse listDeployArtifacts(ListDeployArtifactsRequest request) { + LOG.trace("Called listDeployArtifacts"); + final ListDeployArtifactsRequest interceptedRequest = + ListDeployArtifactsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListWorkRequestLogsConverter.fromRequest(client, interceptedRequest); + ListDeployArtifactsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3240,12 +3833,12 @@ public ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsReques com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListWorkRequestLogs", + "ListDeployArtifacts", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/WorkRequestLogEntry/ListWorkRequestLogs"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployArtifactSummary/ListDeployArtifacts"); + java.util.function.Function transformer = - ListWorkRequestLogsConverter.fromResponse( + ListDeployArtifactsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3263,12 +3856,13 @@ public ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsReques } @Override - public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request) { - LOG.trace("Called listWorkRequests"); - final ListWorkRequestsRequest interceptedRequest = - ListWorkRequestsConverter.interceptRequest(request); + public ListDeployEnvironmentsResponse listDeployEnvironments( + ListDeployEnvironmentsRequest request) { + LOG.trace("Called listDeployEnvironments"); + final ListDeployEnvironmentsRequest interceptedRequest = + ListDeployEnvironmentsConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListWorkRequestsConverter.fromRequest(client, interceptedRequest); + ListDeployEnvironmentsConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3277,12 +3871,12 @@ public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ListWorkRequests", + "ListDeployEnvironments", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/WorkRequest/ListWorkRequests"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployEnvironmentSummary/ListDeployEnvironments"); + java.util.function.Function transformer = - ListWorkRequestsConverter.fromResponse( + ListDeployEnvironmentsConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3300,12 +3894,12 @@ public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request } @Override - public MirrorRepositoryResponse mirrorRepository(MirrorRepositoryRequest request) { - LOG.trace("Called mirrorRepository"); - final MirrorRepositoryRequest interceptedRequest = - MirrorRepositoryConverter.interceptRequest(request); + public ListDeployPipelinesResponse listDeployPipelines(ListDeployPipelinesRequest request) { + LOG.trace("Called listDeployPipelines"); + final ListDeployPipelinesRequest interceptedRequest = + ListDeployPipelinesConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - MirrorRepositoryConverter.fromRequest(client, interceptedRequest); + ListDeployPipelinesConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -3314,12 +3908,12 @@ public MirrorRepositoryResponse mirrorRepository(MirrorRepositoryRequest request com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "MirrorRepository", + "ListDeployPipelines", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/MirrorRepository"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployPipelineSummary/ListDeployPipelines"); + java.util.function.Function transformer = - MirrorRepositoryConverter.fromResponse( + ListDeployPipelinesConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3330,35 +3924,1263 @@ public MirrorRepositoryResponse mirrorRepository(MirrorRepositoryRequest request return tokenRefreshRetrier.execute( retryRequest, retriedRequest -> { - javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public PutRepositoryRefResponse putRepositoryRef(PutRepositoryRefRequest request) { - LOG.trace("Called putRepositoryRef"); - final PutRepositoryRefRequest interceptedRequest = - PutRepositoryRefConverter.interceptRequest(request); + public ListDeployStagesResponse listDeployStages(ListDeployStagesRequest request) { + LOG.trace("Called listDeployStages"); + final ListDeployStagesRequest interceptedRequest = + ListDeployStagesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDeployStagesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListDeployStages", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeployStageSummary/ListDeployStages"); + java.util.function.Function + transformer = + ListDeployStagesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListDeploymentsResponse listDeployments(ListDeploymentsRequest request) { + LOG.trace("Called listDeployments"); + final ListDeploymentsRequest interceptedRequest = + ListDeploymentsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDeploymentsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListDeployments", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/DeploymentSummary/ListDeployments"); + java.util.function.Function + transformer = + ListDeploymentsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListForkSyncStatusesResponse listForkSyncStatuses(ListForkSyncStatusesRequest request) { + LOG.trace("Called listForkSyncStatuses"); + final ListForkSyncStatusesRequest interceptedRequest = + ListForkSyncStatusesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListForkSyncStatusesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListForkSyncStatuses", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListForkSyncStatuses"); + java.util.function.Function + transformer = + ListForkSyncStatusesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListMirrorRecordsResponse listMirrorRecords(ListMirrorRecordsRequest request) { + LOG.trace("Called listMirrorRecords"); + final ListMirrorRecordsRequest interceptedRequest = + ListMirrorRecordsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListMirrorRecordsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListMirrorRecords", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListMirrorRecords"); + java.util.function.Function + transformer = + ListMirrorRecordsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListPathsResponse listPaths(ListPathsRequest request) { + LOG.trace("Called listPaths"); + final ListPathsRequest interceptedRequest = ListPathsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPathsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListPaths", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryPathSummary/ListPaths"); + java.util.function.Function transformer = + ListPathsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListProjectCommitAnalyticsAuthorsResponse listProjectCommitAnalyticsAuthors( + ListProjectCommitAnalyticsAuthorsRequest request) { + LOG.trace("Called listProjectCommitAnalyticsAuthors"); + final ListProjectCommitAnalyticsAuthorsRequest interceptedRequest = + ListProjectCommitAnalyticsAuthorsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListProjectCommitAnalyticsAuthorsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListProjectCommitAnalyticsAuthors", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListProjectCommitAnalyticsAuthors"); + java.util.function.Function< + javax.ws.rs.core.Response, ListProjectCommitAnalyticsAuthorsResponse> + transformer = + ListProjectCommitAnalyticsAuthorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListProjectsResponse listProjects(ListProjectsRequest request) { + LOG.trace("Called listProjects"); + final ListProjectsRequest interceptedRequest = + ListProjectsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListProjectsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListProjects", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProjectSummary/ListProjects"); + java.util.function.Function transformer = + ListProjectsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListProtectedBranchesResponse listProtectedBranches( + ListProtectedBranchesRequest request) { + LOG.trace("Called listProtectedBranches"); + final ListProtectedBranchesRequest interceptedRequest = + ListProtectedBranchesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListProtectedBranchesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListProtectedBranches", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProtectedBranchCollection/ListProtectedBranches"); + java.util.function.Function + transformer = + ListProtectedBranchesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListPullRequestActivitiesResponse listPullRequestActivities( + ListPullRequestActivitiesRequest request) { + LOG.trace("Called listPullRequestActivities"); + final ListPullRequestActivitiesRequest interceptedRequest = + ListPullRequestActivitiesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPullRequestActivitiesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListPullRequestActivities", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ListPullRequestActivities"); + java.util.function.Function + transformer = + ListPullRequestActivitiesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListPullRequestAttachmentsResponse listPullRequestAttachments( + ListPullRequestAttachmentsRequest request) { + LOG.trace("Called listPullRequestAttachments"); + final ListPullRequestAttachmentsRequest interceptedRequest = + ListPullRequestAttachmentsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPullRequestAttachmentsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListPullRequestAttachments", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ListPullRequestAttachments"); + java.util.function.Function + transformer = + ListPullRequestAttachmentsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListPullRequestAuthorsResponse listPullRequestAuthors( + ListPullRequestAuthorsRequest request) { + LOG.trace("Called listPullRequestAuthors"); + final ListPullRequestAuthorsRequest interceptedRequest = + ListPullRequestAuthorsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPullRequestAuthorsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListPullRequestAuthors", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListPullRequestAuthors"); + java.util.function.Function + transformer = + ListPullRequestAuthorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListPullRequestCommentsResponse listPullRequestComments( + ListPullRequestCommentsRequest request) { + LOG.trace("Called listPullRequestComments"); + final ListPullRequestCommentsRequest interceptedRequest = + ListPullRequestCommentsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPullRequestCommentsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListPullRequestComments", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ListPullRequestComments"); + java.util.function.Function + transformer = + ListPullRequestCommentsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListPullRequestCommitsResponse listPullRequestCommits( + ListPullRequestCommitsRequest request) { + LOG.trace("Called listPullRequestCommits"); + final ListPullRequestCommitsRequest interceptedRequest = + ListPullRequestCommitsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPullRequestCommitsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListPullRequestCommits", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ListPullRequestCommits"); + java.util.function.Function + transformer = + ListPullRequestCommitsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListPullRequestFileChangesResponse listPullRequestFileChanges( + ListPullRequestFileChangesRequest request) { + LOG.trace("Called listPullRequestFileChanges"); + final ListPullRequestFileChangesRequest interceptedRequest = + ListPullRequestFileChangesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPullRequestFileChangesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListPullRequestFileChanges", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ListPullRequestFileChanges"); + java.util.function.Function + transformer = + ListPullRequestFileChangesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListPullRequestsResponse listPullRequests(ListPullRequestsRequest request) { + LOG.trace("Called listPullRequests"); + final ListPullRequestsRequest interceptedRequest = + ListPullRequestsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPullRequestsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListPullRequests", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequestCollection/ListPullRequests"); + java.util.function.Function + transformer = + ListPullRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListRefsResponse listRefs(ListRefsRequest request) { + LOG.trace("Called listRefs"); + final ListRefsRequest interceptedRequest = ListRefsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListRefsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListRefs", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryRef/ListRefs"); + java.util.function.Function transformer = + ListRefsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListRepositoriesResponse listRepositories(ListRepositoriesRequest request) { + LOG.trace("Called listRepositories"); + final ListRepositoriesRequest interceptedRequest = + ListRepositoriesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListRepositoriesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListRepositories", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListRepositories"); + java.util.function.Function + transformer = + ListRepositoriesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListRepositoryCommitAnalyticsAuthorsResponse listRepositoryCommitAnalyticsAuthors( + ListRepositoryCommitAnalyticsAuthorsRequest request) { + LOG.trace("Called listRepositoryCommitAnalyticsAuthors"); + final ListRepositoryCommitAnalyticsAuthorsRequest interceptedRequest = + ListRepositoryCommitAnalyticsAuthorsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListRepositoryCommitAnalyticsAuthorsConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListRepositoryCommitAnalyticsAuthors", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/ListRepositoryCommitAnalyticsAuthors"); + java.util.function.Function< + javax.ws.rs.core.Response, ListRepositoryCommitAnalyticsAuthorsResponse> + transformer = + ListRepositoryCommitAnalyticsAuthorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListTriggersResponse listTriggers(ListTriggersRequest request) { + LOG.trace("Called listTriggers"); + final ListTriggersRequest interceptedRequest = + ListTriggersConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListTriggersConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListTriggers", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/TriggerCollection/ListTriggers"); + java.util.function.Function transformer = + ListTriggersConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListWorkRequestErrorsResponse listWorkRequestErrors( + ListWorkRequestErrorsRequest request) { + LOG.trace("Called listWorkRequestErrors"); + final ListWorkRequestErrorsRequest interceptedRequest = + ListWorkRequestErrorsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestErrorsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListWorkRequestErrors", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/WorkRequestError/ListWorkRequestErrors"); + java.util.function.Function + transformer = + ListWorkRequestErrorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsRequest request) { + LOG.trace("Called listWorkRequestLogs"); + final ListWorkRequestLogsRequest interceptedRequest = + ListWorkRequestLogsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestLogsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListWorkRequestLogs", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/WorkRequestLogEntry/ListWorkRequestLogs"); + java.util.function.Function + transformer = + ListWorkRequestLogsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request) { + LOG.trace("Called listWorkRequests"); + final ListWorkRequestsRequest interceptedRequest = + ListWorkRequestsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ListWorkRequests", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/WorkRequest/ListWorkRequests"); + java.util.function.Function + transformer = + ListWorkRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public MergePullRequestResponse mergePullRequest(MergePullRequestRequest request) { + LOG.trace("Called mergePullRequest"); + final MergePullRequestRequest interceptedRequest = + MergePullRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + MergePullRequestConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "MergePullRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/MergePullRequest"); + java.util.function.Function + transformer = + MergePullRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getMergePullRequestDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public MirrorRepositoryResponse mirrorRepository(MirrorRepositoryRequest request) { + LOG.trace("Called mirrorRepository"); + final MirrorRepositoryRequest interceptedRequest = + MirrorRepositoryConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + MirrorRepositoryConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "MirrorRepository", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/MirrorRepository"); + java.util.function.Function + transformer = + MirrorRepositoryConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public PatchPullRequestResponse patchPullRequest(PatchPullRequestRequest request) { + LOG.trace("Called patchPullRequest"); + final PatchPullRequestRequest interceptedRequest = + PatchPullRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PatchPullRequestConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "PatchPullRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/PatchPullRequest"); + java.util.function.Function + transformer = + PatchPullRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.patch( + ib, + retriedRequest.getPatchPullRequestDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public PutRepositoryRefResponse putRepositoryRef(PutRepositoryRefRequest request) { + LOG.trace("Called putRepositoryRef"); + final PutRepositoryRefRequest interceptedRequest = + PutRepositoryRefConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PutRepositoryRefConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "PutRepositoryRef", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/PutRepositoryRef"); + java.util.function.Function + transformer = + PutRepositoryRefConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getPutRepositoryRefDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ReopenPullRequestResponse reopenPullRequest(ReopenPullRequestRequest request) { + LOG.trace("Called reopenPullRequest"); + final ReopenPullRequestRequest interceptedRequest = + ReopenPullRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ReopenPullRequestConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ReopenPullRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ReopenPullRequest"); + java.util.function.Function + transformer = + ReopenPullRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ReviewPullRequestResponse reviewPullRequest(ReviewPullRequestRequest request) { + LOG.trace("Called reviewPullRequest"); + final ReviewPullRequestRequest interceptedRequest = + ReviewPullRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ReviewPullRequestConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ReviewPullRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/ReviewPullRequest"); + java.util.function.Function + transformer = + ReviewPullRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getReviewPullRequestDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ScheduleCascadingProjectDeletionResponse scheduleCascadingProjectDeletion( + ScheduleCascadingProjectDeletionRequest request) { + LOG.trace("Called scheduleCascadingProjectDeletion"); + final ScheduleCascadingProjectDeletionRequest interceptedRequest = + ScheduleCascadingProjectDeletionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ScheduleCascadingProjectDeletionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "ScheduleCascadingProjectDeletion", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Project/ScheduleCascadingProjectDeletion"); + java.util.function.Function< + javax.ws.rs.core.Response, ScheduleCascadingProjectDeletionResponse> + transformer = + ScheduleCascadingProjectDeletionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public SummarizeProjectRepositoryAnalyticsResponse summarizeProjectRepositoryAnalytics( + SummarizeProjectRepositoryAnalyticsRequest request) { + LOG.trace("Called summarizeProjectRepositoryAnalytics"); + final SummarizeProjectRepositoryAnalyticsRequest interceptedRequest = + SummarizeProjectRepositoryAnalyticsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SummarizeProjectRepositoryAnalyticsConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "SummarizeProjectRepositoryAnalytics", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryMetricAggregation/SummarizeProjectRepositoryAnalytics"); + java.util.function.Function< + javax.ws.rs.core.Response, SummarizeProjectRepositoryAnalyticsResponse> + transformer = + SummarizeProjectRepositoryAnalyticsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getSummarizeProjectRepositoryAnalyticsDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public SummarizeRepositoryAnalyticsResponse summarizeRepositoryAnalytics( + SummarizeRepositoryAnalyticsRequest request) { + LOG.trace("Called summarizeRepositoryAnalytics"); + final SummarizeRepositoryAnalyticsRequest interceptedRequest = + SummarizeRepositoryAnalyticsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SummarizeRepositoryAnalyticsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "SummarizeRepositoryAnalytics", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryMetricAggregation/SummarizeRepositoryAnalytics"); + java.util.function.Function + transformer = + SummarizeRepositoryAnalyticsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getSummarizeRepositoryAnalyticsDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public SyncRepositoryResponse syncRepository(SyncRepositoryRequest request) { + LOG.trace("Called syncRepository"); + final SyncRepositoryRequest interceptedRequest = + SyncRepositoryConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SyncRepositoryConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "SyncRepository", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/SyncRepository"); + java.util.function.Function transformer = + SyncRepositoryConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getSyncRepositoryDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UnlikePullRequestCommentResponse unlikePullRequestComment( + UnlikePullRequestCommentRequest request) { + LOG.trace("Called unlikePullRequestComment"); + final UnlikePullRequestCommentRequest interceptedRequest = + UnlikePullRequestCommentConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - PutRepositoryRefConverter.fromRequest(client, interceptedRequest); + UnlikePullRequestCommentConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, true); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "PutRepositoryRef", + "UnlikePullRequestComment", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Repository/PutRepositoryRef"); - java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/UnlikePullRequestComment"); + java.util.function.Function transformer = - PutRepositoryRefConverter.fromResponse( + UnlikePullRequestCommentConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3370,39 +5192,34 @@ public PutRepositoryRefResponse putRepositoryRef(PutRepositoryRefRequest request retryRequest, retriedRequest -> { javax.ws.rs.core.Response response = - client.put( - ib, - retriedRequest.getPutRepositoryRefDetails(), - retriedRequest); + client.post(ib, retriedRequest); return transformer.apply(response); }); }); } @Override - public ScheduleCascadingProjectDeletionResponse scheduleCascadingProjectDeletion( - ScheduleCascadingProjectDeletionRequest request) { - LOG.trace("Called scheduleCascadingProjectDeletion"); - final ScheduleCascadingProjectDeletionRequest interceptedRequest = - ScheduleCascadingProjectDeletionConverter.interceptRequest(request); + public UnsubscribePullRequestResponse unsubscribePullRequest( + UnsubscribePullRequestRequest request) { + LOG.trace("Called unsubscribePullRequest"); + final UnsubscribePullRequestRequest interceptedRequest = + UnsubscribePullRequestConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ScheduleCascadingProjectDeletionConverter.fromRequest(client, interceptedRequest); + UnsubscribePullRequestConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( interceptedRequest.getRetryConfiguration(), retryConfiguration, true); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "Devops", - "ScheduleCascadingProjectDeletion", + "UnsubscribePullRequest", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Project/ScheduleCascadingProjectDeletion"); - java.util.function.Function< - javax.ws.rs.core.Response, ScheduleCascadingProjectDeletionResponse> + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/UnsubscribePullRequest"); + java.util.function.Function transformer = - ScheduleCascadingProjectDeletionConverter.fromResponse( + UnsubscribePullRequestConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( interceptedRequest, @@ -3413,8 +5230,7 @@ public ScheduleCascadingProjectDeletionResponse scheduleCascadingProjectDeletion return tokenRefreshRetrier.execute( retryRequest, retriedRequest -> { - javax.ws.rs.core.Response response = - client.post(ib, retriedRequest); + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); return transformer.apply(response); }); }); @@ -3828,6 +5644,224 @@ public UpdateProjectResponse updateProject(UpdateProjectRequest request) { }); } + @Override + public UpdateProjectNotificationPreferenceResponse updateProjectNotificationPreference( + UpdateProjectNotificationPreferenceRequest request) { + LOG.trace("Called updateProjectNotificationPreference"); + final UpdateProjectNotificationPreferenceRequest interceptedRequest = + UpdateProjectNotificationPreferenceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateProjectNotificationPreferenceConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "UpdateProjectNotificationPreference", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProjectNotificationPreference/UpdateProjectNotificationPreference"); + java.util.function.Function< + javax.ws.rs.core.Response, UpdateProjectNotificationPreferenceResponse> + transformer = + UpdateProjectNotificationPreferenceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest + .getUpdateProjectNotificationPreferenceDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateProjectRepositorySettingsResponse updateProjectRepositorySettings( + UpdateProjectRepositorySettingsRequest request) { + LOG.trace("Called updateProjectRepositorySettings"); + final UpdateProjectRepositorySettingsRequest interceptedRequest = + UpdateProjectRepositorySettingsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateProjectRepositorySettingsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "UpdateProjectRepositorySettings", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/ProjectRepositorySettings/UpdateProjectRepositorySettings"); + java.util.function.Function< + javax.ws.rs.core.Response, UpdateProjectRepositorySettingsResponse> + transformer = + UpdateProjectRepositorySettingsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest + .getUpdateProjectRepositorySettingsDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdatePullRequestResponse updatePullRequest(UpdatePullRequestRequest request) { + LOG.trace("Called updatePullRequest"); + final UpdatePullRequestRequest interceptedRequest = + UpdatePullRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdatePullRequestConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "UpdatePullRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/UpdatePullRequest"); + java.util.function.Function + transformer = + UpdatePullRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdatePullRequestDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdatePullRequestCommentResponse updatePullRequestComment( + UpdatePullRequestCommentRequest request) { + LOG.trace("Called updatePullRequestComment"); + final UpdatePullRequestCommentRequest interceptedRequest = + UpdatePullRequestCommentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdatePullRequestCommentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "UpdatePullRequestComment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequest/UpdatePullRequestComment"); + java.util.function.Function + transformer = + UpdatePullRequestCommentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdatePullRequestCommentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdatePullRequestNotificationPreferenceResponse updatePullRequestNotificationPreference( + UpdatePullRequestNotificationPreferenceRequest request) { + LOG.trace("Called updatePullRequestNotificationPreference"); + final UpdatePullRequestNotificationPreferenceRequest interceptedRequest = + UpdatePullRequestNotificationPreferenceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdatePullRequestNotificationPreferenceConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "UpdatePullRequestNotificationPreference", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/PullRequestNotificationPreference/UpdatePullRequestNotificationPreference"); + java.util.function.Function< + javax.ws.rs.core.Response, UpdatePullRequestNotificationPreferenceResponse> + transformer = + UpdatePullRequestNotificationPreferenceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest + .getUpdatePullRequestNotificationPreferenceDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateRepositoryResponse updateRepository(UpdateRepositoryRequest request) { LOG.trace("Called updateRepository"); @@ -3869,6 +5903,94 @@ public UpdateRepositoryResponse updateRepository(UpdateRepositoryRequest request }); } + @Override + public UpdateRepositoryNotificationPreferenceResponse updateRepositoryNotificationPreference( + UpdateRepositoryNotificationPreferenceRequest request) { + LOG.trace("Called updateRepositoryNotificationPreference"); + final UpdateRepositoryNotificationPreferenceRequest interceptedRequest = + UpdateRepositoryNotificationPreferenceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateRepositoryNotificationPreferenceConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "UpdateRepositoryNotificationPreference", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositoryNotificationPreference/UpdateRepositoryNotificationPreference"); + java.util.function.Function< + javax.ws.rs.core.Response, UpdateRepositoryNotificationPreferenceResponse> + transformer = + UpdateRepositoryNotificationPreferenceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest + .getUpdateRepositoryNotificationPreferenceDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateRepositorySettingsResponse updateRepositorySettings( + UpdateRepositorySettingsRequest request) { + LOG.trace("Called updateRepositorySettings"); + final UpdateRepositorySettingsRequest interceptedRequest = + UpdateRepositorySettingsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateRepositorySettingsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Devops", + "UpdateRepositorySettings", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/devops/20210630/RepositorySettings/UpdateRepositorySettings"); + java.util.function.Function + transformer = + UpdateRepositorySettingsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateRepositorySettingsDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateTriggerResponse updateTrigger(UpdateTriggerRequest request) { LOG.trace("Called updateTrigger"); @@ -3956,4 +6078,30 @@ public DevopsWaiters getWaiters() { public DevopsPaginators getPaginators() { return paginators; } + + private static boolean shouldRetryBecauseOfWaiterConfiguration( + com.oracle.bmc.retrier.BmcGenericRetrier retrier) { + boolean hasTerminationStrategy = false; + boolean isMaxAttemptsTerminationStrategy = false; + if (retrier.getWaiter() != null && retrier.getWaiter().getWaiterConfiguration() != null) { + hasTerminationStrategy = + retrier.getWaiter().getWaiterConfiguration().getTerminationStrategy() != null; + if (hasTerminationStrategy) { + isMaxAttemptsTerminationStrategy = + retrier.getWaiter().getWaiterConfiguration().getTerminationStrategy() + instanceof com.oracle.bmc.waiter.MaxAttemptsTerminationStrategy; + } + } + final boolean shouldRetry = + hasTerminationStrategy + && (!isMaxAttemptsTerminationStrategy + || isMaxAttemptsTerminationStrategy + && ((com.oracle.bmc.waiter.MaxAttemptsTerminationStrategy) + retrier.getWaiter() + .getWaiterConfiguration() + .getTerminationStrategy()) + .getMaxAttempts() + > 1); + return shouldRetry; + } } diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/DevopsPaginators.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/DevopsPaginators.java index 6f211b7b24e..cc9bcd3af2e 100644 --- a/bmc-devops/src/main/java/com/oracle/bmc/devops/DevopsPaginators.java +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/DevopsPaginators.java @@ -372,6 +372,121 @@ public java.util.List apply( }); } + /** + * Creates a new iterable which will iterate over the responses received from the listBuildRunSnapshots operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listBuildRunSnapshotsResponseIterator( + final ListBuildRunSnapshotsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListBuildRunSnapshotsRequest.Builder, ListBuildRunSnapshotsRequest, + ListBuildRunSnapshotsResponse>( + new java.util.function.Supplier() { + @Override + public ListBuildRunSnapshotsRequest.Builder get() { + return ListBuildRunSnapshotsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListBuildRunSnapshotsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListBuildRunSnapshotsRequest.Builder>, + ListBuildRunSnapshotsRequest>() { + @Override + public ListBuildRunSnapshotsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListBuildRunSnapshotsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListBuildRunSnapshotsRequest, ListBuildRunSnapshotsResponse>() { + @Override + public ListBuildRunSnapshotsResponse apply( + ListBuildRunSnapshotsRequest request) { + return client.listBuildRunSnapshots(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.devops.model.BuildRunSnapshotSummary} objects + * contained in responses from the listBuildRunSnapshots operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.devops.model.BuildRunSnapshotSummary} objects + * contained in responses received from the service. + */ + public Iterable + listBuildRunSnapshotsRecordIterator(final ListBuildRunSnapshotsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListBuildRunSnapshotsRequest.Builder, ListBuildRunSnapshotsRequest, + ListBuildRunSnapshotsResponse, com.oracle.bmc.devops.model.BuildRunSnapshotSummary>( + new java.util.function.Supplier() { + @Override + public ListBuildRunSnapshotsRequest.Builder get() { + return ListBuildRunSnapshotsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListBuildRunSnapshotsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListBuildRunSnapshotsRequest.Builder>, + ListBuildRunSnapshotsRequest>() { + @Override + public ListBuildRunSnapshotsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListBuildRunSnapshotsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListBuildRunSnapshotsRequest, ListBuildRunSnapshotsResponse>() { + @Override + public ListBuildRunSnapshotsResponse apply( + ListBuildRunSnapshotsRequest request) { + return client.listBuildRunSnapshots(request); + } + }, + new java.util.function.Function< + ListBuildRunSnapshotsResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListBuildRunSnapshotsResponse response) { + return response.getBuildRunSnapshotCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listBuildRuns operation. This iterable * will fetch more data from the server as needed. @@ -1600,6 +1715,132 @@ public java.util.List apply( }); } + /** + * Creates a new iterable which will iterate over the responses received from the listProjectCommitAnalyticsAuthors operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listProjectCommitAnalyticsAuthorsResponseIterator( + final ListProjectCommitAnalyticsAuthorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListProjectCommitAnalyticsAuthorsRequest.Builder, + ListProjectCommitAnalyticsAuthorsRequest, + ListProjectCommitAnalyticsAuthorsResponse>( + new java.util.function.Supplier< + ListProjectCommitAnalyticsAuthorsRequest.Builder>() { + @Override + public ListProjectCommitAnalyticsAuthorsRequest.Builder get() { + return ListProjectCommitAnalyticsAuthorsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListProjectCommitAnalyticsAuthorsResponse, String>() { + @Override + public String apply(ListProjectCommitAnalyticsAuthorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListProjectCommitAnalyticsAuthorsRequest.Builder>, + ListProjectCommitAnalyticsAuthorsRequest>() { + @Override + public ListProjectCommitAnalyticsAuthorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListProjectCommitAnalyticsAuthorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListProjectCommitAnalyticsAuthorsRequest, + ListProjectCommitAnalyticsAuthorsResponse>() { + @Override + public ListProjectCommitAnalyticsAuthorsResponse apply( + ListProjectCommitAnalyticsAuthorsRequest request) { + return client.listProjectCommitAnalyticsAuthors(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.devops.model.CommitAnalyticsAuthorSummary} objects + * contained in responses from the listProjectCommitAnalyticsAuthors operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.devops.model.CommitAnalyticsAuthorSummary} objects + * contained in responses received from the service. + */ + public Iterable + listProjectCommitAnalyticsAuthorsRecordIterator( + final ListProjectCommitAnalyticsAuthorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListProjectCommitAnalyticsAuthorsRequest.Builder, + ListProjectCommitAnalyticsAuthorsRequest, ListProjectCommitAnalyticsAuthorsResponse, + com.oracle.bmc.devops.model.CommitAnalyticsAuthorSummary>( + new java.util.function.Supplier< + ListProjectCommitAnalyticsAuthorsRequest.Builder>() { + @Override + public ListProjectCommitAnalyticsAuthorsRequest.Builder get() { + return ListProjectCommitAnalyticsAuthorsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListProjectCommitAnalyticsAuthorsResponse, String>() { + @Override + public String apply(ListProjectCommitAnalyticsAuthorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListProjectCommitAnalyticsAuthorsRequest.Builder>, + ListProjectCommitAnalyticsAuthorsRequest>() { + @Override + public ListProjectCommitAnalyticsAuthorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListProjectCommitAnalyticsAuthorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListProjectCommitAnalyticsAuthorsRequest, + ListProjectCommitAnalyticsAuthorsResponse>() { + @Override + public ListProjectCommitAnalyticsAuthorsResponse apply( + ListProjectCommitAnalyticsAuthorsRequest request) { + return client.listProjectCommitAnalyticsAuthors(request); + } + }, + new java.util.function.Function< + ListProjectCommitAnalyticsAuthorsResponse, + java.util.List< + com.oracle.bmc.devops.model.CommitAnalyticsAuthorSummary>>() { + @Override + public java.util.List + apply(ListProjectCommitAnalyticsAuthorsResponse response) { + return response.getCommitAnalyticsAuthorCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listProjects operation. This iterable * will fetch more data from the server as needed. @@ -1711,35 +1952,37 @@ public java.util.List apply( } /** - * Creates a new iterable which will iterate over the responses received from the listRefs operation. This iterable + * Creates a new iterable which will iterate over the responses received from the listProtectedBranches operation. This iterable * will fetch more data from the server as needed. * * @param request a request which can be sent to the service operation * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. */ - public Iterable listRefsResponseIterator(final ListRefsRequest request) { + public Iterable listProtectedBranchesResponseIterator( + final ListProtectedBranchesRequest request) { return new com.oracle.bmc.paginator.internal.ResponseIterable< - ListRefsRequest.Builder, ListRefsRequest, ListRefsResponse>( - new java.util.function.Supplier() { + ListProtectedBranchesRequest.Builder, ListProtectedBranchesRequest, + ListProtectedBranchesResponse>( + new java.util.function.Supplier() { @Override - public ListRefsRequest.Builder get() { - return ListRefsRequest.builder().copy(request); + public ListProtectedBranchesRequest.Builder get() { + return ListProtectedBranchesRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListRefsResponse response) { + public String apply(ListProtectedBranchesResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListRefsRequest.Builder>, - ListRefsRequest>() { + ListProtectedBranchesRequest.Builder>, + ListProtectedBranchesRequest>() { @Override - public ListRefsRequest apply( + public ListProtectedBranchesRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListRefsRequest.Builder> + ListProtectedBranchesRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -1750,48 +1993,50 @@ public ListRefsRequest apply( } } }, - new java.util.function.Function() { + new java.util.function.Function< + ListProtectedBranchesRequest, ListProtectedBranchesResponse>() { @Override - public ListRefsResponse apply(ListRefsRequest request) { - return client.listRefs(request); + public ListProtectedBranchesResponse apply( + ListProtectedBranchesRequest request) { + return client.listProtectedBranches(request); } }); } /** - * Creates a new iterable which will iterate over the {@link com.oracle.bmc.devops.model.RepositoryRefSummary} objects - * contained in responses from the listRefs operation. This iterable will fetch more data from the + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.devops.model.ProtectedBranchSummary} objects + * contained in responses from the listProtectedBranches operation. This iterable will fetch more data from the * server as needed. * * @param request a request which can be sent to the service operation - * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.devops.model.RepositoryRefSummary} objects + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.devops.model.ProtectedBranchSummary} objects * contained in responses received from the service. */ - public Iterable listRefsRecordIterator( - final ListRefsRequest request) { + public Iterable + listProtectedBranchesRecordIterator(final ListProtectedBranchesRequest request) { return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< - ListRefsRequest.Builder, ListRefsRequest, ListRefsResponse, - com.oracle.bmc.devops.model.RepositoryRefSummary>( - new java.util.function.Supplier() { + ListProtectedBranchesRequest.Builder, ListProtectedBranchesRequest, + ListProtectedBranchesResponse, com.oracle.bmc.devops.model.ProtectedBranchSummary>( + new java.util.function.Supplier() { @Override - public ListRefsRequest.Builder get() { - return ListRefsRequest.builder().copy(request); + public ListProtectedBranchesRequest.Builder get() { + return ListProtectedBranchesRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListRefsResponse response) { + public String apply(ListProtectedBranchesResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListRefsRequest.Builder>, - ListRefsRequest>() { + ListProtectedBranchesRequest.Builder>, + ListProtectedBranchesRequest>() { @Override - public ListRefsRequest apply( + public ListProtectedBranchesRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListRefsRequest.Builder> + ListProtectedBranchesRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -1802,54 +2047,57 @@ public ListRefsRequest apply( } } }, - new java.util.function.Function() { + new java.util.function.Function< + ListProtectedBranchesRequest, ListProtectedBranchesResponse>() { @Override - public ListRefsResponse apply(ListRefsRequest request) { - return client.listRefs(request); + public ListProtectedBranchesResponse apply( + ListProtectedBranchesRequest request) { + return client.listProtectedBranches(request); } }, new java.util.function.Function< - ListRefsResponse, - java.util.List>() { + ListProtectedBranchesResponse, + java.util.List>() { @Override - public java.util.List apply( - ListRefsResponse response) { - return response.getRepositoryRefCollection().getItems(); + public java.util.List apply( + ListProtectedBranchesResponse response) { + return response.getProtectedBranchCollection().getItems(); } }); } /** - * Creates a new iterable which will iterate over the responses received from the listRepositories operation. This iterable + * Creates a new iterable which will iterate over the responses received from the listPullRequestActivities operation. This iterable * will fetch more data from the server as needed. * * @param request a request which can be sent to the service operation * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. */ - public Iterable listRepositoriesResponseIterator( - final ListRepositoriesRequest request) { + public Iterable listPullRequestActivitiesResponseIterator( + final ListPullRequestActivitiesRequest request) { return new com.oracle.bmc.paginator.internal.ResponseIterable< - ListRepositoriesRequest.Builder, ListRepositoriesRequest, ListRepositoriesResponse>( - new java.util.function.Supplier() { + ListPullRequestActivitiesRequest.Builder, ListPullRequestActivitiesRequest, + ListPullRequestActivitiesResponse>( + new java.util.function.Supplier() { @Override - public ListRepositoriesRequest.Builder get() { - return ListRepositoriesRequest.builder().copy(request); + public ListPullRequestActivitiesRequest.Builder get() { + return ListPullRequestActivitiesRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListRepositoriesResponse response) { + public String apply(ListPullRequestActivitiesResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListRepositoriesRequest.Builder>, - ListRepositoriesRequest>() { + ListPullRequestActivitiesRequest.Builder>, + ListPullRequestActivitiesRequest>() { @Override - public ListRepositoriesRequest apply( + public ListPullRequestActivitiesRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListRepositoriesRequest.Builder> + ListPullRequestActivitiesRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -1861,48 +2109,51 @@ public ListRepositoriesRequest apply( } }, new java.util.function.Function< - ListRepositoriesRequest, ListRepositoriesResponse>() { + ListPullRequestActivitiesRequest, ListPullRequestActivitiesResponse>() { @Override - public ListRepositoriesResponse apply(ListRepositoriesRequest request) { - return client.listRepositories(request); + public ListPullRequestActivitiesResponse apply( + ListPullRequestActivitiesRequest request) { + return client.listPullRequestActivities(request); } }); } /** - * Creates a new iterable which will iterate over the {@link com.oracle.bmc.devops.model.RepositorySummary} objects - * contained in responses from the listRepositories operation. This iterable will fetch more data from the + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.devops.model.PullRequestActivitySummary} objects + * contained in responses from the listPullRequestActivities operation. This iterable will fetch more data from the * server as needed. * * @param request a request which can be sent to the service operation - * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.devops.model.RepositorySummary} objects + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.devops.model.PullRequestActivitySummary} objects * contained in responses received from the service. */ - public Iterable listRepositoriesRecordIterator( - final ListRepositoriesRequest request) { + public Iterable + listPullRequestActivitiesRecordIterator( + final ListPullRequestActivitiesRequest request) { return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< - ListRepositoriesRequest.Builder, ListRepositoriesRequest, ListRepositoriesResponse, - com.oracle.bmc.devops.model.RepositorySummary>( - new java.util.function.Supplier() { + ListPullRequestActivitiesRequest.Builder, ListPullRequestActivitiesRequest, + ListPullRequestActivitiesResponse, + com.oracle.bmc.devops.model.PullRequestActivitySummary>( + new java.util.function.Supplier() { @Override - public ListRepositoriesRequest.Builder get() { - return ListRepositoriesRequest.builder().copy(request); + public ListPullRequestActivitiesRequest.Builder get() { + return ListPullRequestActivitiesRequest.builder().copy(request); } }, - new java.util.function.Function() { + new java.util.function.Function() { @Override - public String apply(ListRepositoriesResponse response) { + public String apply(ListPullRequestActivitiesResponse response) { return response.getOpcNextPage(); } }, new java.util.function.Function< com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListRepositoriesRequest.Builder>, - ListRepositoriesRequest>() { + ListPullRequestActivitiesRequest.Builder>, + ListPullRequestActivitiesRequest>() { @Override - public ListRepositoriesRequest apply( + public ListPullRequestActivitiesRequest apply( com.oracle.bmc.paginator.internal.RequestBuilderAndToken< - ListRepositoriesRequest.Builder> + ListPullRequestActivitiesRequest.Builder> input) { if (input.getNextPageToken() == null) { return input.getRequestBuilder().build(); @@ -1914,19 +2165,1064 @@ public ListRepositoriesRequest apply( } }, new java.util.function.Function< - ListRepositoriesRequest, ListRepositoriesResponse>() { + ListPullRequestActivitiesRequest, ListPullRequestActivitiesResponse>() { @Override - public ListRepositoriesResponse apply(ListRepositoriesRequest request) { - return client.listRepositories(request); + public ListPullRequestActivitiesResponse apply( + ListPullRequestActivitiesRequest request) { + return client.listPullRequestActivities(request); } }, new java.util.function.Function< - ListRepositoriesResponse, - java.util.List>() { + ListPullRequestActivitiesResponse, + java.util.List>() { @Override - public java.util.List apply( - ListRepositoriesResponse response) { - return response.getRepositoryCollection().getItems(); + public java.util.List + apply(ListPullRequestActivitiesResponse response) { + return response.getPullRequestActivityCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listPullRequestAttachments operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listPullRequestAttachmentsResponseIterator( + final ListPullRequestAttachmentsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListPullRequestAttachmentsRequest.Builder, ListPullRequestAttachmentsRequest, + ListPullRequestAttachmentsResponse>( + new java.util.function.Supplier() { + @Override + public ListPullRequestAttachmentsRequest.Builder get() { + return ListPullRequestAttachmentsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPullRequestAttachmentsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestAttachmentsRequest.Builder>, + ListPullRequestAttachmentsRequest>() { + @Override + public ListPullRequestAttachmentsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestAttachmentsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListPullRequestAttachmentsRequest, ListPullRequestAttachmentsResponse>() { + @Override + public ListPullRequestAttachmentsResponse apply( + ListPullRequestAttachmentsRequest request) { + return client.listPullRequestAttachments(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.devops.model.PullRequestAttachmentSummary} objects + * contained in responses from the listPullRequestAttachments operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.devops.model.PullRequestAttachmentSummary} objects + * contained in responses received from the service. + */ + public Iterable + listPullRequestAttachmentsRecordIterator( + final ListPullRequestAttachmentsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListPullRequestAttachmentsRequest.Builder, ListPullRequestAttachmentsRequest, + ListPullRequestAttachmentsResponse, + com.oracle.bmc.devops.model.PullRequestAttachmentSummary>( + new java.util.function.Supplier() { + @Override + public ListPullRequestAttachmentsRequest.Builder get() { + return ListPullRequestAttachmentsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPullRequestAttachmentsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestAttachmentsRequest.Builder>, + ListPullRequestAttachmentsRequest>() { + @Override + public ListPullRequestAttachmentsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestAttachmentsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListPullRequestAttachmentsRequest, ListPullRequestAttachmentsResponse>() { + @Override + public ListPullRequestAttachmentsResponse apply( + ListPullRequestAttachmentsRequest request) { + return client.listPullRequestAttachments(request); + } + }, + new java.util.function.Function< + ListPullRequestAttachmentsResponse, + java.util.List< + com.oracle.bmc.devops.model.PullRequestAttachmentSummary>>() { + @Override + public java.util.List + apply(ListPullRequestAttachmentsResponse response) { + return response.getPullRequestAttachmentCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listPullRequestAuthors operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listPullRequestAuthorsResponseIterator( + final ListPullRequestAuthorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListPullRequestAuthorsRequest.Builder, ListPullRequestAuthorsRequest, + ListPullRequestAuthorsResponse>( + new java.util.function.Supplier() { + @Override + public ListPullRequestAuthorsRequest.Builder get() { + return ListPullRequestAuthorsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPullRequestAuthorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestAuthorsRequest.Builder>, + ListPullRequestAuthorsRequest>() { + @Override + public ListPullRequestAuthorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestAuthorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListPullRequestAuthorsRequest, ListPullRequestAuthorsResponse>() { + @Override + public ListPullRequestAuthorsResponse apply( + ListPullRequestAuthorsRequest request) { + return client.listPullRequestAuthors(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.devops.model.PullRequestAuthorSummary} objects + * contained in responses from the listPullRequestAuthors operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.devops.model.PullRequestAuthorSummary} objects + * contained in responses received from the service. + */ + public Iterable + listPullRequestAuthorsRecordIterator(final ListPullRequestAuthorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListPullRequestAuthorsRequest.Builder, ListPullRequestAuthorsRequest, + ListPullRequestAuthorsResponse, + com.oracle.bmc.devops.model.PullRequestAuthorSummary>( + new java.util.function.Supplier() { + @Override + public ListPullRequestAuthorsRequest.Builder get() { + return ListPullRequestAuthorsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPullRequestAuthorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestAuthorsRequest.Builder>, + ListPullRequestAuthorsRequest>() { + @Override + public ListPullRequestAuthorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestAuthorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListPullRequestAuthorsRequest, ListPullRequestAuthorsResponse>() { + @Override + public ListPullRequestAuthorsResponse apply( + ListPullRequestAuthorsRequest request) { + return client.listPullRequestAuthors(request); + } + }, + new java.util.function.Function< + ListPullRequestAuthorsResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListPullRequestAuthorsResponse response) { + return response.getPullRequestAuthorCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listPullRequestComments operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listPullRequestCommentsResponseIterator( + final ListPullRequestCommentsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListPullRequestCommentsRequest.Builder, ListPullRequestCommentsRequest, + ListPullRequestCommentsResponse>( + new java.util.function.Supplier() { + @Override + public ListPullRequestCommentsRequest.Builder get() { + return ListPullRequestCommentsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPullRequestCommentsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestCommentsRequest.Builder>, + ListPullRequestCommentsRequest>() { + @Override + public ListPullRequestCommentsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestCommentsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListPullRequestCommentsRequest, ListPullRequestCommentsResponse>() { + @Override + public ListPullRequestCommentsResponse apply( + ListPullRequestCommentsRequest request) { + return client.listPullRequestComments(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.devops.model.PullRequestCommentSummary} objects + * contained in responses from the listPullRequestComments operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.devops.model.PullRequestCommentSummary} objects + * contained in responses received from the service. + */ + public Iterable + listPullRequestCommentsRecordIterator(final ListPullRequestCommentsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListPullRequestCommentsRequest.Builder, ListPullRequestCommentsRequest, + ListPullRequestCommentsResponse, + com.oracle.bmc.devops.model.PullRequestCommentSummary>( + new java.util.function.Supplier() { + @Override + public ListPullRequestCommentsRequest.Builder get() { + return ListPullRequestCommentsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPullRequestCommentsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestCommentsRequest.Builder>, + ListPullRequestCommentsRequest>() { + @Override + public ListPullRequestCommentsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestCommentsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListPullRequestCommentsRequest, ListPullRequestCommentsResponse>() { + @Override + public ListPullRequestCommentsResponse apply( + ListPullRequestCommentsRequest request) { + return client.listPullRequestComments(request); + } + }, + new java.util.function.Function< + ListPullRequestCommentsResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListPullRequestCommentsResponse response) { + return response.getPullRequestCommentCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listPullRequestCommits operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listPullRequestCommitsResponseIterator( + final ListPullRequestCommitsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListPullRequestCommitsRequest.Builder, ListPullRequestCommitsRequest, + ListPullRequestCommitsResponse>( + new java.util.function.Supplier() { + @Override + public ListPullRequestCommitsRequest.Builder get() { + return ListPullRequestCommitsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPullRequestCommitsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestCommitsRequest.Builder>, + ListPullRequestCommitsRequest>() { + @Override + public ListPullRequestCommitsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestCommitsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListPullRequestCommitsRequest, ListPullRequestCommitsResponse>() { + @Override + public ListPullRequestCommitsResponse apply( + ListPullRequestCommitsRequest request) { + return client.listPullRequestCommits(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.devops.model.RepositoryCommitSummary} objects + * contained in responses from the listPullRequestCommits operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.devops.model.RepositoryCommitSummary} objects + * contained in responses received from the service. + */ + public Iterable + listPullRequestCommitsRecordIterator(final ListPullRequestCommitsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListPullRequestCommitsRequest.Builder, ListPullRequestCommitsRequest, + ListPullRequestCommitsResponse, + com.oracle.bmc.devops.model.RepositoryCommitSummary>( + new java.util.function.Supplier() { + @Override + public ListPullRequestCommitsRequest.Builder get() { + return ListPullRequestCommitsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPullRequestCommitsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestCommitsRequest.Builder>, + ListPullRequestCommitsRequest>() { + @Override + public ListPullRequestCommitsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestCommitsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListPullRequestCommitsRequest, ListPullRequestCommitsResponse>() { + @Override + public ListPullRequestCommitsResponse apply( + ListPullRequestCommitsRequest request) { + return client.listPullRequestCommits(request); + } + }, + new java.util.function.Function< + ListPullRequestCommitsResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListPullRequestCommitsResponse response) { + return response.getRepositoryCommitCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listPullRequestFileChanges operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listPullRequestFileChangesResponseIterator( + final ListPullRequestFileChangesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListPullRequestFileChangesRequest.Builder, ListPullRequestFileChangesRequest, + ListPullRequestFileChangesResponse>( + new java.util.function.Supplier() { + @Override + public ListPullRequestFileChangesRequest.Builder get() { + return ListPullRequestFileChangesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPullRequestFileChangesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestFileChangesRequest.Builder>, + ListPullRequestFileChangesRequest>() { + @Override + public ListPullRequestFileChangesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestFileChangesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListPullRequestFileChangesRequest, ListPullRequestFileChangesResponse>() { + @Override + public ListPullRequestFileChangesResponse apply( + ListPullRequestFileChangesRequest request) { + return client.listPullRequestFileChanges(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.devops.model.PullRequestFileChangeSummary} objects + * contained in responses from the listPullRequestFileChanges operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.devops.model.PullRequestFileChangeSummary} objects + * contained in responses received from the service. + */ + public Iterable + listPullRequestFileChangesRecordIterator( + final ListPullRequestFileChangesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListPullRequestFileChangesRequest.Builder, ListPullRequestFileChangesRequest, + ListPullRequestFileChangesResponse, + com.oracle.bmc.devops.model.PullRequestFileChangeSummary>( + new java.util.function.Supplier() { + @Override + public ListPullRequestFileChangesRequest.Builder get() { + return ListPullRequestFileChangesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPullRequestFileChangesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestFileChangesRequest.Builder>, + ListPullRequestFileChangesRequest>() { + @Override + public ListPullRequestFileChangesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestFileChangesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListPullRequestFileChangesRequest, ListPullRequestFileChangesResponse>() { + @Override + public ListPullRequestFileChangesResponse apply( + ListPullRequestFileChangesRequest request) { + return client.listPullRequestFileChanges(request); + } + }, + new java.util.function.Function< + ListPullRequestFileChangesResponse, + java.util.List< + com.oracle.bmc.devops.model.PullRequestFileChangeSummary>>() { + @Override + public java.util.List + apply(ListPullRequestFileChangesResponse response) { + return response.getPullRequestFileChangeCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listPullRequests operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listPullRequestsResponseIterator( + final ListPullRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListPullRequestsRequest.Builder, ListPullRequestsRequest, ListPullRequestsResponse>( + new java.util.function.Supplier() { + @Override + public ListPullRequestsRequest.Builder get() { + return ListPullRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPullRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestsRequest.Builder>, + ListPullRequestsRequest>() { + @Override + public ListPullRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListPullRequestsRequest, ListPullRequestsResponse>() { + @Override + public ListPullRequestsResponse apply(ListPullRequestsRequest request) { + return client.listPullRequests(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.devops.model.PullRequestSummary} objects + * contained in responses from the listPullRequests operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.devops.model.PullRequestSummary} objects + * contained in responses received from the service. + */ + public Iterable listPullRequestsRecordIterator( + final ListPullRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListPullRequestsRequest.Builder, ListPullRequestsRequest, ListPullRequestsResponse, + com.oracle.bmc.devops.model.PullRequestSummary>( + new java.util.function.Supplier() { + @Override + public ListPullRequestsRequest.Builder get() { + return ListPullRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPullRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestsRequest.Builder>, + ListPullRequestsRequest>() { + @Override + public ListPullRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPullRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListPullRequestsRequest, ListPullRequestsResponse>() { + @Override + public ListPullRequestsResponse apply(ListPullRequestsRequest request) { + return client.listPullRequests(request); + } + }, + new java.util.function.Function< + ListPullRequestsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListPullRequestsResponse response) { + return response.getPullRequestCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listRefs operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listRefsResponseIterator(final ListRefsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListRefsRequest.Builder, ListRefsRequest, ListRefsResponse>( + new java.util.function.Supplier() { + @Override + public ListRefsRequest.Builder get() { + return ListRefsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListRefsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListRefsRequest.Builder>, + ListRefsRequest>() { + @Override + public ListRefsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListRefsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListRefsResponse apply(ListRefsRequest request) { + return client.listRefs(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.devops.model.RepositoryRefSummary} objects + * contained in responses from the listRefs operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.devops.model.RepositoryRefSummary} objects + * contained in responses received from the service. + */ + public Iterable listRefsRecordIterator( + final ListRefsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListRefsRequest.Builder, ListRefsRequest, ListRefsResponse, + com.oracle.bmc.devops.model.RepositoryRefSummary>( + new java.util.function.Supplier() { + @Override + public ListRefsRequest.Builder get() { + return ListRefsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListRefsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListRefsRequest.Builder>, + ListRefsRequest>() { + @Override + public ListRefsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListRefsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListRefsResponse apply(ListRefsRequest request) { + return client.listRefs(request); + } + }, + new java.util.function.Function< + ListRefsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListRefsResponse response) { + return response.getRepositoryRefCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listRepositories operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listRepositoriesResponseIterator( + final ListRepositoriesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListRepositoriesRequest.Builder, ListRepositoriesRequest, ListRepositoriesResponse>( + new java.util.function.Supplier() { + @Override + public ListRepositoriesRequest.Builder get() { + return ListRepositoriesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListRepositoriesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListRepositoriesRequest.Builder>, + ListRepositoriesRequest>() { + @Override + public ListRepositoriesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListRepositoriesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListRepositoriesRequest, ListRepositoriesResponse>() { + @Override + public ListRepositoriesResponse apply(ListRepositoriesRequest request) { + return client.listRepositories(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.devops.model.RepositorySummary} objects + * contained in responses from the listRepositories operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.devops.model.RepositorySummary} objects + * contained in responses received from the service. + */ + public Iterable listRepositoriesRecordIterator( + final ListRepositoriesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListRepositoriesRequest.Builder, ListRepositoriesRequest, ListRepositoriesResponse, + com.oracle.bmc.devops.model.RepositorySummary>( + new java.util.function.Supplier() { + @Override + public ListRepositoriesRequest.Builder get() { + return ListRepositoriesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListRepositoriesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListRepositoriesRequest.Builder>, + ListRepositoriesRequest>() { + @Override + public ListRepositoriesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListRepositoriesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListRepositoriesRequest, ListRepositoriesResponse>() { + @Override + public ListRepositoriesResponse apply(ListRepositoriesRequest request) { + return client.listRepositories(request); + } + }, + new java.util.function.Function< + ListRepositoriesResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListRepositoriesResponse response) { + return response.getRepositoryCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listRepositoryCommitAnalyticsAuthors operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listRepositoryCommitAnalyticsAuthorsResponseIterator( + final ListRepositoryCommitAnalyticsAuthorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListRepositoryCommitAnalyticsAuthorsRequest.Builder, + ListRepositoryCommitAnalyticsAuthorsRequest, + ListRepositoryCommitAnalyticsAuthorsResponse>( + new java.util.function.Supplier< + ListRepositoryCommitAnalyticsAuthorsRequest.Builder>() { + @Override + public ListRepositoryCommitAnalyticsAuthorsRequest.Builder get() { + return ListRepositoryCommitAnalyticsAuthorsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListRepositoryCommitAnalyticsAuthorsResponse, String>() { + @Override + public String apply(ListRepositoryCommitAnalyticsAuthorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListRepositoryCommitAnalyticsAuthorsRequest.Builder>, + ListRepositoryCommitAnalyticsAuthorsRequest>() { + @Override + public ListRepositoryCommitAnalyticsAuthorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListRepositoryCommitAnalyticsAuthorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListRepositoryCommitAnalyticsAuthorsRequest, + ListRepositoryCommitAnalyticsAuthorsResponse>() { + @Override + public ListRepositoryCommitAnalyticsAuthorsResponse apply( + ListRepositoryCommitAnalyticsAuthorsRequest request) { + return client.listRepositoryCommitAnalyticsAuthors(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.devops.model.CommitAnalyticsAuthorSummary} objects + * contained in responses from the listRepositoryCommitAnalyticsAuthors operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.devops.model.CommitAnalyticsAuthorSummary} objects + * contained in responses received from the service. + */ + public Iterable + listRepositoryCommitAnalyticsAuthorsRecordIterator( + final ListRepositoryCommitAnalyticsAuthorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListRepositoryCommitAnalyticsAuthorsRequest.Builder, + ListRepositoryCommitAnalyticsAuthorsRequest, + ListRepositoryCommitAnalyticsAuthorsResponse, + com.oracle.bmc.devops.model.CommitAnalyticsAuthorSummary>( + new java.util.function.Supplier< + ListRepositoryCommitAnalyticsAuthorsRequest.Builder>() { + @Override + public ListRepositoryCommitAnalyticsAuthorsRequest.Builder get() { + return ListRepositoryCommitAnalyticsAuthorsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListRepositoryCommitAnalyticsAuthorsResponse, String>() { + @Override + public String apply(ListRepositoryCommitAnalyticsAuthorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListRepositoryCommitAnalyticsAuthorsRequest.Builder>, + ListRepositoryCommitAnalyticsAuthorsRequest>() { + @Override + public ListRepositoryCommitAnalyticsAuthorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListRepositoryCommitAnalyticsAuthorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListRepositoryCommitAnalyticsAuthorsRequest, + ListRepositoryCommitAnalyticsAuthorsResponse>() { + @Override + public ListRepositoryCommitAnalyticsAuthorsResponse apply( + ListRepositoryCommitAnalyticsAuthorsRequest request) { + return client.listRepositoryCommitAnalyticsAuthors(request); + } + }, + new java.util.function.Function< + ListRepositoryCommitAnalyticsAuthorsResponse, + java.util.List< + com.oracle.bmc.devops.model.CommitAnalyticsAuthorSummary>>() { + @Override + public java.util.List + apply(ListRepositoryCommitAnalyticsAuthorsResponse response) { + return response.getCommitAnalyticsAuthorCollection().getItems(); } }); } diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/DevopsWaiters.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/DevopsWaiters.java index e0cf8f2e072..362e496b4ca 100644 --- a/bmc-devops/src/main/java/com/oracle/bmc/devops/DevopsWaiters.java +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/DevopsWaiters.java @@ -1034,6 +1034,108 @@ public boolean test(GetProjectResponse response) { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forPullRequest( + GetPullRequestRequest request, + com.oracle.bmc.devops.model.PullRequest.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forPullRequest( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forPullRequest( + GetPullRequestRequest request, + com.oracle.bmc.devops.model.PullRequest.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forPullRequest( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forPullRequest( + GetPullRequestRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.devops.model.PullRequest.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forPullRequest( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for PullRequest. + private com.oracle.bmc.waiter.Waiter + forPullRequest( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetPullRequestRequest request, + final com.oracle.bmc.devops.model.PullRequest.LifecycleState... targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetPullRequestRequest, GetPullRequestResponse>() { + @Override + public GetPullRequestResponse apply(GetPullRequestRequest request) { + return client.getPullRequest(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetPullRequestResponse response) { + return targetStatesSet.contains( + response.getPullRequest().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.devops.model.PullRequest.LifecycleState.Deleted)), + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/CreateOrUpdateGitRefConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/CreateOrUpdateGitRefConverter.java new file mode 100644 index 00000000000..0ff35fe2711 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/CreateOrUpdateGitRefConverter.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class CreateOrUpdateGitRefConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateOrUpdateGitRefConverter.class); + + public static com.oracle.bmc.devops.requests.CreateOrUpdateGitRefRequest interceptRequest( + com.oracle.bmc.devops.requests.CreateOrUpdateGitRefRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.CreateOrUpdateGitRefRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getRepositoryId(), "repositoryId must not be blank"); + Validate.notNull( + request.getCreateOrUpdateGitRefDetails(), + "createOrUpdateGitRefDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("repositories") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRepositoryId())) + .path("actions") + .path("createOrUpdateGitRef"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.CreateOrUpdateGitRefResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.CreateOrUpdateGitRefResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.CreateOrUpdateGitRefResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.CreateOrUpdateGitRefResponse>() { + @Override + public com.oracle.bmc.devops.responses.CreateOrUpdateGitRefResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.CreateOrUpdateGitRefResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.RepositoryRef>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.RepositoryRef.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.RepositoryRef + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.RepositoryRef> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.CreateOrUpdateGitRefResponse.Builder + builder = + com.oracle.bmc.devops.responses + .CreateOrUpdateGitRefResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.repositoryRef(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.CreateOrUpdateGitRefResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/CreateOrUpdateProtectedBranchConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/CreateOrUpdateProtectedBranchConverter.java new file mode 100644 index 00000000000..92284bdde8d --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/CreateOrUpdateProtectedBranchConverter.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class CreateOrUpdateProtectedBranchConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateOrUpdateProtectedBranchConverter.class); + + public static com.oracle.bmc.devops.requests.CreateOrUpdateProtectedBranchRequest + interceptRequest( + com.oracle.bmc.devops.requests.CreateOrUpdateProtectedBranchRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.CreateOrUpdateProtectedBranchRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getRepositoryId(), "repositoryId must not be blank"); + Validate.notNull( + request.getCreateOrUpdateProtectedBranchDetails(), + "createOrUpdateProtectedBranchDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("repositories") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRepositoryId())) + .path("actions") + .path("createOrUpdateProtectedBranch"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.CreateOrUpdateProtectedBranchResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.CreateOrUpdateProtectedBranchResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.CreateOrUpdateProtectedBranchResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .CreateOrUpdateProtectedBranchResponse>() { + @Override + public com.oracle.bmc.devops.responses + .CreateOrUpdateProtectedBranchResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.CreateOrUpdateProtectedBranchResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .ProtectedBranch>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.ProtectedBranch + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.ProtectedBranch + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.ProtectedBranch> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses + .CreateOrUpdateProtectedBranchResponse.Builder + builder = + com.oracle.bmc.devops.responses + .CreateOrUpdateProtectedBranchResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.protectedBranch(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses + .CreateOrUpdateProtectedBranchResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/CreatePullRequestAttachmentConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/CreatePullRequestAttachmentConverter.java new file mode 100644 index 00000000000..d55e70a97a3 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/CreatePullRequestAttachmentConverter.java @@ -0,0 +1,182 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class CreatePullRequestAttachmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreatePullRequestAttachmentConverter.class); + + public static com.oracle.bmc.devops.requests.CreatePullRequestAttachmentRequest + interceptRequest( + com.oracle.bmc.devops.requests.CreatePullRequestAttachmentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.CreatePullRequestAttachmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + Validate.notNull(request.getContentDisposition(), "contentDisposition is required"); + Validate.notNull( + request.getCreatePullRequestAttachmentBody(), + "createPullRequestAttachmentBody is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("attachments"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + ib.header("content-disposition", request.getContentDisposition()); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.CreatePullRequestAttachmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.CreatePullRequestAttachmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.CreatePullRequestAttachmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .CreatePullRequestAttachmentResponse>() { + @Override + public com.oracle.bmc.devops.responses + .CreatePullRequestAttachmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.CreatePullRequestAttachmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestAttachment>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestAttachment + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestAttachment + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequestAttachment> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.CreatePullRequestAttachmentResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .CreatePullRequestAttachmentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequestAttachment(response.getItem()); + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.devops.responses.CreatePullRequestAttachmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/CreatePullRequestCommentConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/CreatePullRequestCommentConverter.java new file mode 100644 index 00000000000..ea2f2cba022 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/CreatePullRequestCommentConverter.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class CreatePullRequestCommentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreatePullRequestCommentConverter.class); + + public static com.oracle.bmc.devops.requests.CreatePullRequestCommentRequest interceptRequest( + com.oracle.bmc.devops.requests.CreatePullRequestCommentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.CreatePullRequestCommentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + Validate.notNull( + request.getCreatePullRequestCommentDetails(), + "createPullRequestCommentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("comments"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.CreatePullRequestCommentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.CreatePullRequestCommentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.CreatePullRequestCommentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .CreatePullRequestCommentResponse>() { + @Override + public com.oracle.bmc.devops.responses.CreatePullRequestCommentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.CreatePullRequestCommentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestComment>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequestComment + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequestComment + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequestComment> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.CreatePullRequestCommentResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .CreatePullRequestCommentResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequestComment(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.devops.responses.CreatePullRequestCommentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/CreatePullRequestConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/CreatePullRequestConverter.java new file mode 100644 index 00000000000..4038835b554 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/CreatePullRequestConverter.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class CreatePullRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreatePullRequestConverter.class); + + public static com.oracle.bmc.devops.requests.CreatePullRequestRequest interceptRequest( + com.oracle.bmc.devops.requests.CreatePullRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.CreatePullRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreatePullRequestDetails(), "createPullRequestDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20210630").path("pullRequests"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.CreatePullRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.CreatePullRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.CreatePullRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.CreatePullRequestResponse>() { + @Override + public com.oracle.bmc.devops.responses.CreatePullRequestResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.CreatePullRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequest>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequest.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequest.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequest> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.CreatePullRequestResponse.Builder + builder = + com.oracle.bmc.devops.responses + .CreatePullRequestResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequest(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.devops.responses.CreatePullRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeclinePullRequestConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeclinePullRequestConverter.java new file mode 100644 index 00000000000..9f70c631f3b --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeclinePullRequestConverter.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeclinePullRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeclinePullRequestConverter.class); + + public static com.oracle.bmc.devops.requests.DeclinePullRequestRequest interceptRequest( + com.oracle.bmc.devops.requests.DeclinePullRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.DeclinePullRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("actions") + .path("decline"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeclinePullRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeclinePullRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeclinePullRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeclinePullRequestResponse>() { + @Override + public com.oracle.bmc.devops.responses.DeclinePullRequestResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.DeclinePullRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequest>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequest.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequest.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequest> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.DeclinePullRequestResponse.Builder + builder = + com.oracle.bmc.devops.responses + .DeclinePullRequestResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequest(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.devops.responses.DeclinePullRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeleteGitRefConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeleteGitRefConverter.java new file mode 100644 index 00000000000..c9641896c44 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeleteGitRefConverter.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeleteGitRefConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteGitRefConverter.class); + + public static com.oracle.bmc.devops.requests.DeleteGitRefRequest interceptRequest( + com.oracle.bmc.devops.requests.DeleteGitRefRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.DeleteGitRefRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getRepositoryId(), "repositoryId must not be blank"); + Validate.notNull(request.getDeleteGitRefDetails(), "deleteGitRefDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("repositories") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRepositoryId())) + .path("actions") + .path("deleteGitRef"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.devops.responses.DeleteGitRefResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.devops.responses.DeleteGitRefResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeleteGitRefResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeleteGitRefResponse>() { + @Override + public com.oracle.bmc.devops.responses.DeleteGitRefResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.DeleteGitRefResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.DeleteGitRefResponse.Builder + builder = + com.oracle.bmc.devops.responses.DeleteGitRefResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.DeleteGitRefResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeleteProjectRepositorySettingsConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeleteProjectRepositorySettingsConverter.java new file mode 100644 index 00000000000..b4a5d1abd69 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeleteProjectRepositorySettingsConverter.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeleteProjectRepositorySettingsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteProjectRepositorySettingsConverter.class); + + public static com.oracle.bmc.devops.requests.DeleteProjectRepositorySettingsRequest + interceptRequest( + com.oracle.bmc.devops.requests.DeleteProjectRepositorySettingsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.DeleteProjectRepositorySettingsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getProjectId(), "projectId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("projects") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getProjectId())) + .path("repositorySettings"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeleteProjectRepositorySettingsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeleteProjectRepositorySettingsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeleteProjectRepositorySettingsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .DeleteProjectRepositorySettingsResponse>() { + @Override + public com.oracle.bmc.devops.responses + .DeleteProjectRepositorySettingsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.DeleteProjectRepositorySettingsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses + .DeleteProjectRepositorySettingsResponse.Builder + builder = + com.oracle.bmc.devops.responses + .DeleteProjectRepositorySettingsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses + .DeleteProjectRepositorySettingsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeleteProtectedBranchConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeleteProtectedBranchConverter.java new file mode 100644 index 00000000000..688686f3c4e --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeleteProtectedBranchConverter.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeleteProtectedBranchConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteProtectedBranchConverter.class); + + public static com.oracle.bmc.devops.requests.DeleteProtectedBranchRequest interceptRequest( + com.oracle.bmc.devops.requests.DeleteProtectedBranchRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.DeleteProtectedBranchRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getRepositoryId(), "repositoryId must not be blank"); + Validate.notNull( + request.getDeleteProtectedBranchDetails(), + "deleteProtectedBranchDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("repositories") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRepositoryId())) + .path("actions") + .path("deleteProtectedBranch"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeleteProtectedBranchResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeleteProtectedBranchResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeleteProtectedBranchResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeleteProtectedBranchResponse>() { + @Override + public com.oracle.bmc.devops.responses.DeleteProtectedBranchResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.DeleteProtectedBranchResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.DeleteProtectedBranchResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .DeleteProtectedBranchResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.DeleteProtectedBranchResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeletePullRequestAttachmentConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeletePullRequestAttachmentConverter.java new file mode 100644 index 00000000000..9cc897c9a01 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeletePullRequestAttachmentConverter.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeletePullRequestAttachmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeletePullRequestAttachmentConverter.class); + + public static com.oracle.bmc.devops.requests.DeletePullRequestAttachmentRequest + interceptRequest( + com.oracle.bmc.devops.requests.DeletePullRequestAttachmentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.DeletePullRequestAttachmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + Validate.notBlank(request.getAttachmentId(), "attachmentId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("attachments") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAttachmentId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeletePullRequestAttachmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeletePullRequestAttachmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeletePullRequestAttachmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .DeletePullRequestAttachmentResponse>() { + @Override + public com.oracle.bmc.devops.responses + .DeletePullRequestAttachmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.DeletePullRequestAttachmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.DeletePullRequestAttachmentResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .DeletePullRequestAttachmentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.DeletePullRequestAttachmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeletePullRequestCommentConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeletePullRequestCommentConverter.java new file mode 100644 index 00000000000..bcf11b2455c --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeletePullRequestCommentConverter.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeletePullRequestCommentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeletePullRequestCommentConverter.class); + + public static com.oracle.bmc.devops.requests.DeletePullRequestCommentRequest interceptRequest( + com.oracle.bmc.devops.requests.DeletePullRequestCommentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.DeletePullRequestCommentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + Validate.notBlank(request.getCommentId(), "commentId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("comments") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCommentId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeletePullRequestCommentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeletePullRequestCommentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeletePullRequestCommentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .DeletePullRequestCommentResponse>() { + @Override + public com.oracle.bmc.devops.responses.DeletePullRequestCommentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.DeletePullRequestCommentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.DeletePullRequestCommentResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .DeletePullRequestCommentResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.DeletePullRequestCommentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeletePullRequestConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeletePullRequestConverter.java new file mode 100644 index 00000000000..03d4f0a9115 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeletePullRequestConverter.java @@ -0,0 +1,127 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeletePullRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeletePullRequestConverter.class); + + public static com.oracle.bmc.devops.requests.DeletePullRequestRequest interceptRequest( + com.oracle.bmc.devops.requests.DeletePullRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.DeletePullRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeletePullRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeletePullRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeletePullRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeletePullRequestResponse>() { + @Override + public com.oracle.bmc.devops.responses.DeletePullRequestResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.DeletePullRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.DeletePullRequestResponse.Builder + builder = + com.oracle.bmc.devops.responses + .DeletePullRequestResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.DeletePullRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeleteRepositorySettingsConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeleteRepositorySettingsConverter.java new file mode 100644 index 00000000000..c29984b6fe0 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/DeleteRepositorySettingsConverter.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeleteRepositorySettingsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteRepositorySettingsConverter.class); + + public static com.oracle.bmc.devops.requests.DeleteRepositorySettingsRequest interceptRequest( + com.oracle.bmc.devops.requests.DeleteRepositorySettingsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.DeleteRepositorySettingsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getRepositoryId(), "repositoryId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("repositories") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRepositoryId())) + .path("repositorySettings"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeleteRepositorySettingsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeleteRepositorySettingsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.DeleteRepositorySettingsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .DeleteRepositorySettingsResponse>() { + @Override + public com.oracle.bmc.devops.responses.DeleteRepositorySettingsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.DeleteRepositorySettingsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.DeleteRepositorySettingsResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .DeleteRepositorySettingsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.DeleteRepositorySettingsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetCommitDiffConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetCommitDiffConverter.java index afe9713799a..677a202060b 100644 --- a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetCommitDiffConverter.java +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetCommitDiffConverter.java @@ -55,6 +55,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( request.getTargetVersion())); + if (request.getTargetRepositoryId() != null) { + target = + target.queryParam( + "targetRepositoryId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTargetRepositoryId())); + } + if (request.getIsComparisonFromMergeBase() != null) { target = target.queryParam( diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetProjectNotificationPreferenceConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetProjectNotificationPreferenceConverter.java new file mode 100644 index 00000000000..789a0235efc --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetProjectNotificationPreferenceConverter.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetProjectNotificationPreferenceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetProjectNotificationPreferenceConverter.class); + + public static com.oracle.bmc.devops.requests.GetProjectNotificationPreferenceRequest + interceptRequest( + com.oracle.bmc.devops.requests.GetProjectNotificationPreferenceRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.GetProjectNotificationPreferenceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getProjectId(), "projectId must not be blank"); + Validate.notBlank(request.getPrincipalId(), "principalId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("projects") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getProjectId())) + .path("principals") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPrincipalId())) + .path("pullRequestNotificationPreference"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetProjectNotificationPreferenceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetProjectNotificationPreferenceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetProjectNotificationPreferenceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .GetProjectNotificationPreferenceResponse>() { + @Override + public com.oracle.bmc.devops.responses + .GetProjectNotificationPreferenceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.GetProjectNotificationPreferenceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .ProjectNotificationPreference>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .ProjectNotificationPreference + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .ProjectNotificationPreference + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .ProjectNotificationPreference> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses + .GetProjectNotificationPreferenceResponse.Builder + builder = + com.oracle.bmc.devops.responses + .GetProjectNotificationPreferenceResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.projectNotificationPreference(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses + .GetProjectNotificationPreferenceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetProjectRepositorySettingsConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetProjectRepositorySettingsConverter.java new file mode 100644 index 00000000000..b6312a28ebb --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetProjectRepositorySettingsConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetProjectRepositorySettingsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetProjectRepositorySettingsConverter.class); + + public static com.oracle.bmc.devops.requests.GetProjectRepositorySettingsRequest + interceptRequest( + com.oracle.bmc.devops.requests.GetProjectRepositorySettingsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.GetProjectRepositorySettingsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getProjectId(), "projectId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("projects") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getProjectId())) + .path("repositorySettings"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetProjectRepositorySettingsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetProjectRepositorySettingsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetProjectRepositorySettingsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .GetProjectRepositorySettingsResponse>() { + @Override + public com.oracle.bmc.devops.responses + .GetProjectRepositorySettingsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.GetProjectRepositorySettingsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .ProjectRepositorySettings>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .ProjectRepositorySettings + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .ProjectRepositorySettings + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .ProjectRepositorySettings> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.GetProjectRepositorySettingsResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .GetProjectRepositorySettingsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.projectRepositorySettings(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.GetProjectRepositorySettingsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetPullRequestAttachmentContentConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetPullRequestAttachmentContentConverter.java new file mode 100644 index 00000000000..e31b81c7aa4 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetPullRequestAttachmentContentConverter.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetPullRequestAttachmentContentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetPullRequestAttachmentContentConverter.class); + + public static com.oracle.bmc.devops.requests.GetPullRequestAttachmentContentRequest + interceptRequest( + com.oracle.bmc.devops.requests.GetPullRequestAttachmentContentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.GetPullRequestAttachmentContentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + Validate.notBlank(request.getAttachmentId(), "attachmentId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("attachments") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAttachmentId())) + .path("content"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept("application/octet-stream"); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetPullRequestAttachmentContentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetPullRequestAttachmentContentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetPullRequestAttachmentContentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .GetPullRequestAttachmentContentResponse>() { + @Override + public com.oracle.bmc.devops.responses + .GetPullRequestAttachmentContentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.GetPullRequestAttachmentContentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.io.InputStream>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + java.io.InputStream.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + java.io.InputStream.class); + } + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses + .GetPullRequestAttachmentContentResponse.Builder + builder = + com.oracle.bmc.devops.responses + .GetPullRequestAttachmentContentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.inputStream(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses + .GetPullRequestAttachmentContentResponse + responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetPullRequestAttachmentConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetPullRequestAttachmentConverter.java new file mode 100644 index 00000000000..59b1a0caa8b --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetPullRequestAttachmentConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetPullRequestAttachmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetPullRequestAttachmentConverter.class); + + public static com.oracle.bmc.devops.requests.GetPullRequestAttachmentRequest interceptRequest( + com.oracle.bmc.devops.requests.GetPullRequestAttachmentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.GetPullRequestAttachmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + Validate.notBlank(request.getAttachmentId(), "attachmentId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("attachments") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAttachmentId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetPullRequestAttachmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetPullRequestAttachmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetPullRequestAttachmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .GetPullRequestAttachmentResponse>() { + @Override + public com.oracle.bmc.devops.responses.GetPullRequestAttachmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.GetPullRequestAttachmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestAttachment>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestAttachment + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestAttachment + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequestAttachment> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.GetPullRequestAttachmentResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .GetPullRequestAttachmentResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequestAttachment(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.GetPullRequestAttachmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetPullRequestChangeSummaryMetricsConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetPullRequestChangeSummaryMetricsConverter.java new file mode 100644 index 00000000000..1bccdad59ab --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetPullRequestChangeSummaryMetricsConverter.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetPullRequestChangeSummaryMetricsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetPullRequestChangeSummaryMetricsConverter.class); + + public static com.oracle.bmc.devops.requests.GetPullRequestChangeSummaryMetricsRequest + interceptRequest( + com.oracle.bmc.devops.requests.GetPullRequestChangeSummaryMetricsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.GetPullRequestChangeSummaryMetricsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("changeSummaryMetrics"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetPullRequestChangeSummaryMetricsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetPullRequestChangeSummaryMetricsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetPullRequestChangeSummaryMetricsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .GetPullRequestChangeSummaryMetricsResponse>() { + @Override + public com.oracle.bmc.devops.responses + .GetPullRequestChangeSummaryMetricsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.GetPullRequestChangeSummaryMetricsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestChangeSummaryMetrics>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestChangeSummaryMetrics + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestChangeSummaryMetrics + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestChangeSummaryMetrics> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses + .GetPullRequestChangeSummaryMetricsResponse.Builder + builder = + com.oracle.bmc.devops.responses + .GetPullRequestChangeSummaryMetricsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequestChangeSummaryMetrics(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses + .GetPullRequestChangeSummaryMetricsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetPullRequestCommentConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetPullRequestCommentConverter.java new file mode 100644 index 00000000000..9fcc3337054 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetPullRequestCommentConverter.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetPullRequestCommentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetPullRequestCommentConverter.class); + + public static com.oracle.bmc.devops.requests.GetPullRequestCommentRequest interceptRequest( + com.oracle.bmc.devops.requests.GetPullRequestCommentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.GetPullRequestCommentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + Validate.notBlank(request.getCommentId(), "commentId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("comments") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCommentId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetPullRequestCommentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetPullRequestCommentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetPullRequestCommentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetPullRequestCommentResponse>() { + @Override + public com.oracle.bmc.devops.responses.GetPullRequestCommentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.GetPullRequestCommentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestComment>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequestComment + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequestComment + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequestComment> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.GetPullRequestCommentResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .GetPullRequestCommentResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequestComment(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.GetPullRequestCommentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetPullRequestConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetPullRequestConverter.java new file mode 100644 index 00000000000..f79757e4c09 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetPullRequestConverter.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetPullRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetPullRequestConverter.class); + + public static com.oracle.bmc.devops.requests.GetPullRequestRequest interceptRequest( + com.oracle.bmc.devops.requests.GetPullRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.GetPullRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetPullRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetPullRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetPullRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetPullRequestResponse>() { + @Override + public com.oracle.bmc.devops.responses.GetPullRequestResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.GetPullRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequest>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequest.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequest.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequest> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.GetPullRequestResponse.Builder + builder = + com.oracle.bmc.devops.responses + .GetPullRequestResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequest(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.GetPullRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetPullRequestNotificationPreferenceConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetPullRequestNotificationPreferenceConverter.java new file mode 100644 index 00000000000..7b199c4c0e9 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetPullRequestNotificationPreferenceConverter.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetPullRequestNotificationPreferenceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetPullRequestNotificationPreferenceConverter.class); + + public static com.oracle.bmc.devops.requests.GetPullRequestNotificationPreferenceRequest + interceptRequest( + com.oracle.bmc.devops.requests.GetPullRequestNotificationPreferenceRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.GetPullRequestNotificationPreferenceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + Validate.notBlank(request.getPrincipalId(), "principalId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("principals") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPrincipalId())) + .path("pullRequestNotificationPreference"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetPullRequestNotificationPreferenceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetPullRequestNotificationPreferenceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .GetPullRequestNotificationPreferenceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .GetPullRequestNotificationPreferenceResponse>() { + @Override + public com.oracle.bmc.devops.responses + .GetPullRequestNotificationPreferenceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.GetPullRequestNotificationPreferenceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestNotificationPreference>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestNotificationPreference + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestNotificationPreference + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestNotificationPreference> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses + .GetPullRequestNotificationPreferenceResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .GetPullRequestNotificationPreferenceResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequestNotificationPreference(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses + .GetPullRequestNotificationPreferenceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetRepositoryNotificationPreferenceConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetRepositoryNotificationPreferenceConverter.java new file mode 100644 index 00000000000..5145140e2c5 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetRepositoryNotificationPreferenceConverter.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetRepositoryNotificationPreferenceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetRepositoryNotificationPreferenceConverter.class); + + public static com.oracle.bmc.devops.requests.GetRepositoryNotificationPreferenceRequest + interceptRequest( + com.oracle.bmc.devops.requests.GetRepositoryNotificationPreferenceRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.GetRepositoryNotificationPreferenceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getRepositoryId(), "repositoryId must not be blank"); + Validate.notBlank(request.getPrincipalId(), "principalId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("repositories") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRepositoryId())) + .path("principals") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPrincipalId())) + .path("pullRequestNotificationPreference"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetRepositoryNotificationPreferenceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetRepositoryNotificationPreferenceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetRepositoryNotificationPreferenceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .GetRepositoryNotificationPreferenceResponse>() { + @Override + public com.oracle.bmc.devops.responses + .GetRepositoryNotificationPreferenceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.GetRepositoryNotificationPreferenceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .RepositoryNotificationPreference>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .RepositoryNotificationPreference + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .RepositoryNotificationPreference + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .RepositoryNotificationPreference> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses + .GetRepositoryNotificationPreferenceResponse.Builder + builder = + com.oracle.bmc.devops.responses + .GetRepositoryNotificationPreferenceResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.repositoryNotificationPreference(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses + .GetRepositoryNotificationPreferenceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetRepositorySettingsConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetRepositorySettingsConverter.java new file mode 100644 index 00000000000..05d89c78740 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/GetRepositorySettingsConverter.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetRepositorySettingsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetRepositorySettingsConverter.class); + + public static com.oracle.bmc.devops.requests.GetRepositorySettingsRequest interceptRequest( + com.oracle.bmc.devops.requests.GetRepositorySettingsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.GetRepositorySettingsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getRepositoryId(), "repositoryId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("repositories") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRepositoryId())) + .path("repositorySettings"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetRepositorySettingsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetRepositorySettingsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetRepositorySettingsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.GetRepositorySettingsResponse>() { + @Override + public com.oracle.bmc.devops.responses.GetRepositorySettingsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.GetRepositorySettingsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .RepositorySettings>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.RepositorySettings + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.RepositorySettings + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.RepositorySettings> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.GetRepositorySettingsResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .GetRepositorySettingsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.repositorySettings(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.GetRepositorySettingsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/LikePullRequestCommentConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/LikePullRequestCommentConverter.java new file mode 100644 index 00000000000..89139aa472c --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/LikePullRequestCommentConverter.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class LikePullRequestCommentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LikePullRequestCommentConverter.class); + + public static com.oracle.bmc.devops.requests.LikePullRequestCommentRequest interceptRequest( + com.oracle.bmc.devops.requests.LikePullRequestCommentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.LikePullRequestCommentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + Validate.notBlank(request.getCommentId(), "commentId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("comments") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCommentId())) + .path("actions") + .path("like"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.LikePullRequestCommentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.LikePullRequestCommentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.LikePullRequestCommentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.LikePullRequestCommentResponse>() { + @Override + public com.oracle.bmc.devops.responses.LikePullRequestCommentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.LikePullRequestCommentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestComment>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequestComment + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequestComment + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequestComment> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.LikePullRequestCommentResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .LikePullRequestCommentResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequestComment(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.devops.responses.LikePullRequestCommentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListBuildRunSnapshotsConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListBuildRunSnapshotsConverter.java new file mode 100644 index 00000000000..e7617810789 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListBuildRunSnapshotsConverter.java @@ -0,0 +1,205 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListBuildRunSnapshotsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListBuildRunSnapshotsConverter.class); + + public static com.oracle.bmc.devops.requests.ListBuildRunSnapshotsRequest interceptRequest( + com.oracle.bmc.devops.requests.ListBuildRunSnapshotsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.ListBuildRunSnapshotsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("buildRunSnapshots"); + + if (request.getPipelineId() != null) { + target = + target.queryParam( + "pipelineId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPipelineId())); + } + + if (request.getBuildRunId() != null) { + target = + target.queryParam( + "buildRunId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getBuildRunId())); + } + + if (request.getCommitId() != null) { + target = + target.queryParam( + "commitId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCommitId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListBuildRunSnapshotsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListBuildRunSnapshotsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListBuildRunSnapshotsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListBuildRunSnapshotsResponse>() { + @Override + public com.oracle.bmc.devops.responses.ListBuildRunSnapshotsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.ListBuildRunSnapshotsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .BuildRunSnapshotCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .BuildRunSnapshotCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .BuildRunSnapshotCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .BuildRunSnapshotCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.ListBuildRunSnapshotsResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .ListBuildRunSnapshotsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.buildRunSnapshotCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.ListBuildRunSnapshotsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListCommitDiffsConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListCommitDiffsConverter.java index 6c46ce74765..c3951705ddc 100644 --- a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListCommitDiffsConverter.java +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListCommitDiffsConverter.java @@ -54,6 +54,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( request.getTargetVersion())); + if (request.getTargetRepositoryId() != null) { + target = + target.queryParam( + "targetRepositoryId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTargetRepositoryId())); + } + if (request.getIsComparisonFromMergeBase() != null) { target = target.queryParam( diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListForkSyncStatusesConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListForkSyncStatusesConverter.java new file mode 100644 index 00000000000..7f79e28c3da --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListForkSyncStatusesConverter.java @@ -0,0 +1,157 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListForkSyncStatusesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListForkSyncStatusesConverter.class); + + public static com.oracle.bmc.devops.requests.ListForkSyncStatusesRequest interceptRequest( + com.oracle.bmc.devops.requests.ListForkSyncStatusesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.ListForkSyncStatusesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getRepositoryId(), "repositoryId must not be blank"); + Validate.notNull(request.getBranchNameQueryParam(), "branchNameQueryParam is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("repositories") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRepositoryId())) + .path("forkSyncStatuses"); + + target = + target.queryParam( + "branchNameQueryParam", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getBranchNameQueryParam())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListForkSyncStatusesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListForkSyncStatusesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListForkSyncStatusesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListForkSyncStatusesResponse>() { + @Override + public com.oracle.bmc.devops.responses.ListForkSyncStatusesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.ListForkSyncStatusesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .ForkSyncStatusCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .ForkSyncStatusCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .ForkSyncStatusCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .ForkSyncStatusCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.ListForkSyncStatusesResponse.Builder + builder = + com.oracle.bmc.devops.responses + .ListForkSyncStatusesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.forkSyncStatusCollection(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.ListForkSyncStatusesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListProjectCommitAnalyticsAuthorsConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListProjectCommitAnalyticsAuthorsConverter.java new file mode 100644 index 00000000000..4db53db413d --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListProjectCommitAnalyticsAuthorsConverter.java @@ -0,0 +1,187 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListProjectCommitAnalyticsAuthorsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListProjectCommitAnalyticsAuthorsConverter.class); + + public static com.oracle.bmc.devops.requests.ListProjectCommitAnalyticsAuthorsRequest + interceptRequest( + com.oracle.bmc.devops.requests.ListProjectCommitAnalyticsAuthorsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.ListProjectCommitAnalyticsAuthorsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getProjectId(), "projectId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("projects") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getProjectId())) + .path("commitAnalyticsAuthors"); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListProjectCommitAnalyticsAuthorsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListProjectCommitAnalyticsAuthorsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListProjectCommitAnalyticsAuthorsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .ListProjectCommitAnalyticsAuthorsResponse>() { + @Override + public com.oracle.bmc.devops.responses + .ListProjectCommitAnalyticsAuthorsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.ListProjectCommitAnalyticsAuthorsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .CommitAnalyticsAuthorCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .CommitAnalyticsAuthorCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .CommitAnalyticsAuthorCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .CommitAnalyticsAuthorCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses + .ListProjectCommitAnalyticsAuthorsResponse.Builder + builder = + com.oracle.bmc.devops.responses + .ListProjectCommitAnalyticsAuthorsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.commitAnalyticsAuthorCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses + .ListProjectCommitAnalyticsAuthorsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListProtectedBranchesConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListProtectedBranchesConverter.java new file mode 100644 index 00000000000..51610daa458 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListProtectedBranchesConverter.java @@ -0,0 +1,189 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListProtectedBranchesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListProtectedBranchesConverter.class); + + public static com.oracle.bmc.devops.requests.ListProtectedBranchesRequest interceptRequest( + com.oracle.bmc.devops.requests.ListProtectedBranchesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.ListProtectedBranchesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getRepositoryId(), "repositoryId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("repositories") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRepositoryId())) + .path("protectedBranches"); + + if (request.getName() != null) { + target = + target.queryParam( + "name", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getName())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListProtectedBranchesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListProtectedBranchesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListProtectedBranchesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListProtectedBranchesResponse>() { + @Override + public com.oracle.bmc.devops.responses.ListProtectedBranchesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.ListProtectedBranchesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .ProtectedBranchCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .ProtectedBranchCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .ProtectedBranchCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .ProtectedBranchCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.ListProtectedBranchesResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .ListProtectedBranchesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.protectedBranchCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.ListProtectedBranchesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestActivitiesConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestActivitiesConverter.java new file mode 100644 index 00000000000..d219dbbfe33 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestActivitiesConverter.java @@ -0,0 +1,182 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestActivitiesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListPullRequestActivitiesConverter.class); + + public static com.oracle.bmc.devops.requests.ListPullRequestActivitiesRequest interceptRequest( + com.oracle.bmc.devops.requests.ListPullRequestActivitiesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.ListPullRequestActivitiesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("activities"); + + if (request.getActivityType() != null) { + target = + target.queryParam( + "activityType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getActivityType().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestActivitiesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestActivitiesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestActivitiesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .ListPullRequestActivitiesResponse>() { + @Override + public com.oracle.bmc.devops.responses.ListPullRequestActivitiesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.ListPullRequestActivitiesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestActivityCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestActivityCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestActivityCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestActivityCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.ListPullRequestActivitiesResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .ListPullRequestActivitiesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequestActivityCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.ListPullRequestActivitiesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestAttachmentsConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestAttachmentsConverter.java new file mode 100644 index 00000000000..e1adfc4ad0a --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestAttachmentsConverter.java @@ -0,0 +1,200 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestAttachmentsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListPullRequestAttachmentsConverter.class); + + public static com.oracle.bmc.devops.requests.ListPullRequestAttachmentsRequest interceptRequest( + com.oracle.bmc.devops.requests.ListPullRequestAttachmentsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.ListPullRequestAttachmentsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("attachments"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getFileName() != null) { + target = + target.queryParam( + "fileName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getFileName())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestAttachmentsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestAttachmentsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestAttachmentsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .ListPullRequestAttachmentsResponse>() { + @Override + public com.oracle.bmc.devops.responses + .ListPullRequestAttachmentsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.ListPullRequestAttachmentsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestAttachmentCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestAttachmentCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestAttachmentCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestAttachmentCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.ListPullRequestAttachmentsResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .ListPullRequestAttachmentsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequestAttachmentCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.ListPullRequestAttachmentsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestAuthorsConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestAuthorsConverter.java new file mode 100644 index 00000000000..34e807a619f --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestAuthorsConverter.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestAuthorsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListPullRequestAuthorsConverter.class); + + public static com.oracle.bmc.devops.requests.ListPullRequestAuthorsRequest interceptRequest( + com.oracle.bmc.devops.requests.ListPullRequestAuthorsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.ListPullRequestAuthorsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getRepositoryId(), "repositoryId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("repositories") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRepositoryId())) + .path("pullRequestAuthors"); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestAuthorsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestAuthorsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestAuthorsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestAuthorsResponse>() { + @Override + public com.oracle.bmc.devops.responses.ListPullRequestAuthorsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.ListPullRequestAuthorsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestAuthorCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestAuthorCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestAuthorCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestAuthorCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.ListPullRequestAuthorsResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .ListPullRequestAuthorsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequestAuthorCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.ListPullRequestAuthorsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestCommentsConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestCommentsConverter.java new file mode 100644 index 00000000000..bf12b456bf5 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestCommentsConverter.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestCommentsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListPullRequestCommentsConverter.class); + + public static com.oracle.bmc.devops.requests.ListPullRequestCommentsRequest interceptRequest( + com.oracle.bmc.devops.requests.ListPullRequestCommentsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.ListPullRequestCommentsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("comments"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getCommentId() != null) { + target = + target.queryParam( + "commentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCommentId())); + } + + if (request.getCommitId() != null) { + target = + target.queryParam( + "commitId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCommitId())); + } + + if (request.getFilePath() != null) { + target = + target.queryParam( + "filePath", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getFilePath())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestCommentsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestCommentsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestCommentsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestCommentsResponse>() { + @Override + public com.oracle.bmc.devops.responses.ListPullRequestCommentsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.ListPullRequestCommentsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestCommentCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestCommentCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestCommentCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestCommentCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.ListPullRequestCommentsResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .ListPullRequestCommentsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequestCommentCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.ListPullRequestCommentsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestCommitsConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestCommitsConverter.java new file mode 100644 index 00000000000..939407ac46f --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestCommitsConverter.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestCommitsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListPullRequestCommitsConverter.class); + + public static com.oracle.bmc.devops.requests.ListPullRequestCommitsRequest interceptRequest( + com.oracle.bmc.devops.requests.ListPullRequestCommitsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.ListPullRequestCommitsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("commits"); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestCommitsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestCommitsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestCommitsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestCommitsResponse>() { + @Override + public com.oracle.bmc.devops.responses.ListPullRequestCommitsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.ListPullRequestCommitsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .RepositoryCommitCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .RepositoryCommitCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .RepositoryCommitCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .RepositoryCommitCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.ListPullRequestCommitsResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .ListPullRequestCommitsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.repositoryCommitCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.ListPullRequestCommitsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestFileChangesConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestFileChangesConverter.java new file mode 100644 index 00000000000..1f0704d79bc --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestFileChangesConverter.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestFileChangesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListPullRequestFileChangesConverter.class); + + public static com.oracle.bmc.devops.requests.ListPullRequestFileChangesRequest interceptRequest( + com.oracle.bmc.devops.requests.ListPullRequestFileChangesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.ListPullRequestFileChangesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("fileChanges"); + + if (request.getFilePath() != null) { + target = + target.queryParam( + "filePath", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getFilePath())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestFileChangesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestFileChangesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestFileChangesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .ListPullRequestFileChangesResponse>() { + @Override + public com.oracle.bmc.devops.responses + .ListPullRequestFileChangesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.ListPullRequestFileChangesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestFileChangeCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestFileChangeCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestFileChangeCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestFileChangeCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.ListPullRequestFileChangesResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .ListPullRequestFileChangesResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequestFileChangeCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.ListPullRequestFileChangesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestsConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestsConverter.java new file mode 100644 index 00000000000..9f8dab9eba8 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListPullRequestsConverter.java @@ -0,0 +1,260 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListPullRequestsConverter.class); + + public static com.oracle.bmc.devops.requests.ListPullRequestsRequest interceptRequest( + com.oracle.bmc.devops.requests.ListPullRequestsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.ListPullRequestsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20210630").path("pullRequests"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getLifecycleDetails() != null) { + target = + target.queryParam( + "lifecycleDetails", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleDetails().getValue())); + } + + if (request.getRepositoryId() != null) { + target = + target.queryParam( + "repositoryId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getRepositoryId())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getCreatedBy() != null) { + target = + target.queryParam( + "createdBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCreatedBy())); + } + + if (request.getDestinationBranch() != null) { + target = + target.queryParam( + "destinationBranch", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDestinationBranch())); + } + + if (request.getSourceBranch() != null) { + target = + target.queryParam( + "sourceBranch", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSourceBranch())); + } + + if (request.getReviewerPrincipalId() != null) { + target = + target.queryParam( + "reviewerPrincipalId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getReviewerPrincipalId())); + } + + if (request.getSourceRepositoryId() != null) { + target = + target.queryParam( + "sourceRepositoryId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSourceRepositoryId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListPullRequestsResponse>() { + @Override + public com.oracle.bmc.devops.responses.ListPullRequestsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.ListPullRequestsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequestCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.ListPullRequestsResponse.Builder + builder = + com.oracle.bmc.devops.responses + .ListPullRequestsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequestCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.ListPullRequestsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListRepositoryCommitAnalyticsAuthorsConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListRepositoryCommitAnalyticsAuthorsConverter.java new file mode 100644 index 00000000000..b66b731f224 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ListRepositoryCommitAnalyticsAuthorsConverter.java @@ -0,0 +1,189 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListRepositoryCommitAnalyticsAuthorsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListRepositoryCommitAnalyticsAuthorsConverter.class); + + public static com.oracle.bmc.devops.requests.ListRepositoryCommitAnalyticsAuthorsRequest + interceptRequest( + com.oracle.bmc.devops.requests.ListRepositoryCommitAnalyticsAuthorsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.ListRepositoryCommitAnalyticsAuthorsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getRepositoryId(), "repositoryId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("repositories") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRepositoryId())) + .path("commitAnalyticsAuthors"); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListRepositoryCommitAnalyticsAuthorsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ListRepositoryCommitAnalyticsAuthorsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .ListRepositoryCommitAnalyticsAuthorsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .ListRepositoryCommitAnalyticsAuthorsResponse>() { + @Override + public com.oracle.bmc.devops.responses + .ListRepositoryCommitAnalyticsAuthorsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.ListRepositoryCommitAnalyticsAuthorsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .CommitAnalyticsAuthorCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .CommitAnalyticsAuthorCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .CommitAnalyticsAuthorCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .CommitAnalyticsAuthorCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses + .ListRepositoryCommitAnalyticsAuthorsResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .ListRepositoryCommitAnalyticsAuthorsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.commitAnalyticsAuthorCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses + .ListRepositoryCommitAnalyticsAuthorsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/MergePullRequestConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/MergePullRequestConverter.java new file mode 100644 index 00000000000..97d8a562532 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/MergePullRequestConverter.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class MergePullRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(MergePullRequestConverter.class); + + public static com.oracle.bmc.devops.requests.MergePullRequestRequest interceptRequest( + com.oracle.bmc.devops.requests.MergePullRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.MergePullRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + Validate.notNull( + request.getMergePullRequestDetails(), "mergePullRequestDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("actions") + .path("merge"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.MergePullRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.MergePullRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.MergePullRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.MergePullRequestResponse>() { + @Override + public com.oracle.bmc.devops.responses.MergePullRequestResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.MergePullRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequest>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequest.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequest.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequest> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.MergePullRequestResponse.Builder + builder = + com.oracle.bmc.devops.responses + .MergePullRequestResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequest(response.getItem()); + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.MergePullRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/PatchPullRequestConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/PatchPullRequestConverter.java new file mode 100644 index 00000000000..74b4e07b32a --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/PatchPullRequestConverter.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class PatchPullRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PatchPullRequestConverter.class); + + public static com.oracle.bmc.devops.requests.PatchPullRequestRequest interceptRequest( + com.oracle.bmc.devops.requests.PatchPullRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.PatchPullRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + Validate.notNull( + request.getPatchPullRequestDetails(), "patchPullRequestDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.PatchPullRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.PatchPullRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.PatchPullRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.PatchPullRequestResponse>() { + @Override + public com.oracle.bmc.devops.responses.PatchPullRequestResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.PatchPullRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequest>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequest.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequest.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequest> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.PatchPullRequestResponse.Builder + builder = + com.oracle.bmc.devops.responses + .PatchPullRequestResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequest(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.devops.responses.PatchPullRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ReopenPullRequestConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ReopenPullRequestConverter.java new file mode 100644 index 00000000000..dd77918d2e0 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ReopenPullRequestConverter.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ReopenPullRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ReopenPullRequestConverter.class); + + public static com.oracle.bmc.devops.requests.ReopenPullRequestRequest interceptRequest( + com.oracle.bmc.devops.requests.ReopenPullRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.ReopenPullRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("actions") + .path("reopen"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ReopenPullRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ReopenPullRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ReopenPullRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ReopenPullRequestResponse>() { + @Override + public com.oracle.bmc.devops.responses.ReopenPullRequestResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.ReopenPullRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequest>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequest.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequest.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequest> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.ReopenPullRequestResponse.Builder + builder = + com.oracle.bmc.devops.responses + .ReopenPullRequestResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequest(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.devops.responses.ReopenPullRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ReviewPullRequestConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ReviewPullRequestConverter.java new file mode 100644 index 00000000000..fb9eb0f15c7 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/ReviewPullRequestConverter.java @@ -0,0 +1,162 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ReviewPullRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ReviewPullRequestConverter.class); + + public static com.oracle.bmc.devops.requests.ReviewPullRequestRequest interceptRequest( + com.oracle.bmc.devops.requests.ReviewPullRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.ReviewPullRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + Validate.notNull( + request.getReviewPullRequestDetails(), "reviewPullRequestDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("actions") + .path("review"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ReviewPullRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ReviewPullRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ReviewPullRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.ReviewPullRequestResponse>() { + @Override + public com.oracle.bmc.devops.responses.ReviewPullRequestResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.ReviewPullRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequest>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequest.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequest.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequest> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.ReviewPullRequestResponse.Builder + builder = + com.oracle.bmc.devops.responses + .ReviewPullRequestResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequest(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.devops.responses.ReviewPullRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/SummarizeProjectRepositoryAnalyticsConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/SummarizeProjectRepositoryAnalyticsConverter.java new file mode 100644 index 00000000000..343aae8d772 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/SummarizeProjectRepositoryAnalyticsConverter.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class SummarizeProjectRepositoryAnalyticsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SummarizeProjectRepositoryAnalyticsConverter.class); + + public static com.oracle.bmc.devops.requests.SummarizeProjectRepositoryAnalyticsRequest + interceptRequest( + com.oracle.bmc.devops.requests.SummarizeProjectRepositoryAnalyticsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.SummarizeProjectRepositoryAnalyticsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getProjectId(), "projectId must not be blank"); + Validate.notNull( + request.getSummarizeProjectRepositoryAnalyticsDetails(), + "summarizeProjectRepositoryAnalyticsDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("projects") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getProjectId())) + .path("repositoryAnalytics"); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.SummarizeProjectRepositoryAnalyticsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.SummarizeProjectRepositoryAnalyticsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.SummarizeProjectRepositoryAnalyticsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .SummarizeProjectRepositoryAnalyticsResponse>() { + @Override + public com.oracle.bmc.devops.responses + .SummarizeProjectRepositoryAnalyticsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.SummarizeProjectRepositoryAnalyticsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .RepositoryMetricAggregation>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .RepositoryMetricAggregation + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .RepositoryMetricAggregation + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .RepositoryMetricAggregation> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses + .SummarizeProjectRepositoryAnalyticsResponse.Builder + builder = + com.oracle.bmc.devops.responses + .SummarizeProjectRepositoryAnalyticsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.repositoryMetricAggregation(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses + .SummarizeProjectRepositoryAnalyticsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/SummarizeRepositoryAnalyticsConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/SummarizeRepositoryAnalyticsConverter.java new file mode 100644 index 00000000000..dbdd99ee89a --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/SummarizeRepositoryAnalyticsConverter.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class SummarizeRepositoryAnalyticsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SummarizeRepositoryAnalyticsConverter.class); + + public static com.oracle.bmc.devops.requests.SummarizeRepositoryAnalyticsRequest + interceptRequest( + com.oracle.bmc.devops.requests.SummarizeRepositoryAnalyticsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.SummarizeRepositoryAnalyticsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getRepositoryId(), "repositoryId must not be blank"); + Validate.notNull( + request.getSummarizeRepositoryAnalyticsDetails(), + "summarizeRepositoryAnalyticsDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("repository") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRepositoryId())) + .path("repositoryAnalytics"); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.SummarizeRepositoryAnalyticsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.SummarizeRepositoryAnalyticsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.SummarizeRepositoryAnalyticsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .SummarizeRepositoryAnalyticsResponse>() { + @Override + public com.oracle.bmc.devops.responses + .SummarizeRepositoryAnalyticsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.SummarizeRepositoryAnalyticsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .RepositoryMetricAggregation>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .RepositoryMetricAggregation + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .RepositoryMetricAggregation + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .RepositoryMetricAggregation> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.SummarizeRepositoryAnalyticsResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .SummarizeRepositoryAnalyticsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.repositoryMetricAggregation(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.SummarizeRepositoryAnalyticsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/SyncRepositoryConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/SyncRepositoryConverter.java new file mode 100644 index 00000000000..21901670c23 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/SyncRepositoryConverter.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class SyncRepositoryConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SyncRepositoryConverter.class); + + public static com.oracle.bmc.devops.requests.SyncRepositoryRequest interceptRequest( + com.oracle.bmc.devops.requests.SyncRepositoryRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.SyncRepositoryRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getRepositoryId(), "repositoryId must not be blank"); + Validate.notNull(request.getSyncMergeStrategy(), "syncMergeStrategy is required"); + Validate.notNull(request.getSyncRepositoryDetails(), "syncRepositoryDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("repositories") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRepositoryId())) + .path("actions") + .path("sync"); + + target = + target.queryParam( + "syncMergeStrategy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSyncMergeStrategy().getValue())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.SyncRepositoryResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.SyncRepositoryResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.SyncRepositoryResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.SyncRepositoryResponse>() { + @Override + public com.oracle.bmc.devops.responses.SyncRepositoryResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.SyncRepositoryResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.SyncRepositoryResponse.Builder + builder = + com.oracle.bmc.devops.responses + .SyncRepositoryResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.SyncRepositoryResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UnlikePullRequestCommentConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UnlikePullRequestCommentConverter.java new file mode 100644 index 00000000000..9483ee9cd45 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UnlikePullRequestCommentConverter.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UnlikePullRequestCommentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UnlikePullRequestCommentConverter.class); + + public static com.oracle.bmc.devops.requests.UnlikePullRequestCommentRequest interceptRequest( + com.oracle.bmc.devops.requests.UnlikePullRequestCommentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.UnlikePullRequestCommentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + Validate.notBlank(request.getCommentId(), "commentId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("comments") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCommentId())) + .path("actions") + .path("unlike"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UnlikePullRequestCommentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UnlikePullRequestCommentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UnlikePullRequestCommentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .UnlikePullRequestCommentResponse>() { + @Override + public com.oracle.bmc.devops.responses.UnlikePullRequestCommentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.UnlikePullRequestCommentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestComment>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequestComment + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequestComment + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequestComment> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.UnlikePullRequestCommentResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .UnlikePullRequestCommentResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequestComment(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.devops.responses.UnlikePullRequestCommentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UnsubscribePullRequestConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UnsubscribePullRequestConverter.java new file mode 100644 index 00000000000..4528302f56f --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UnsubscribePullRequestConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UnsubscribePullRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UnsubscribePullRequestConverter.class); + + public static com.oracle.bmc.devops.requests.UnsubscribePullRequestRequest interceptRequest( + com.oracle.bmc.devops.requests.UnsubscribePullRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.UnsubscribePullRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + Validate.notNull(request.getToken(), "token is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("actions") + .path("unsubscribe"); + + target = + target.queryParam( + "token", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getToken())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept("text/html"); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UnsubscribePullRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UnsubscribePullRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UnsubscribePullRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UnsubscribePullRequestResponse>() { + @Override + public com.oracle.bmc.devops.responses.UnsubscribePullRequestResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.UnsubscribePullRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.io.InputStream>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + java.io.InputStream.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + java.io.InputStream.class); + } + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.UnsubscribePullRequestResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .UnsubscribePullRequestResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.inputStream(response.getItem()); + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.UnsubscribePullRequestResponse + responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdateProjectNotificationPreferenceConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdateProjectNotificationPreferenceConverter.java new file mode 100644 index 00000000000..65daac86ce9 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdateProjectNotificationPreferenceConverter.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdateProjectNotificationPreferenceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateProjectNotificationPreferenceConverter.class); + + public static com.oracle.bmc.devops.requests.UpdateProjectNotificationPreferenceRequest + interceptRequest( + com.oracle.bmc.devops.requests.UpdateProjectNotificationPreferenceRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.UpdateProjectNotificationPreferenceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getUpdateProjectNotificationPreferenceDetails(), + "updateProjectNotificationPreferenceDetails is required"); + Validate.notBlank(request.getProjectId(), "projectId must not be blank"); + Validate.notBlank(request.getPrincipalId(), "principalId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("projects") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getProjectId())) + .path("principals") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPrincipalId())) + .path("pullRequestNotificationPreference"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UpdateProjectNotificationPreferenceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UpdateProjectNotificationPreferenceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UpdateProjectNotificationPreferenceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .UpdateProjectNotificationPreferenceResponse>() { + @Override + public com.oracle.bmc.devops.responses + .UpdateProjectNotificationPreferenceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.UpdateProjectNotificationPreferenceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .ProjectNotificationPreference>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .ProjectNotificationPreference + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .ProjectNotificationPreference + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .ProjectNotificationPreference> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses + .UpdateProjectNotificationPreferenceResponse.Builder + builder = + com.oracle.bmc.devops.responses + .UpdateProjectNotificationPreferenceResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.projectNotificationPreference(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses + .UpdateProjectNotificationPreferenceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdateProjectRepositorySettingsConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdateProjectRepositorySettingsConverter.java new file mode 100644 index 00000000000..998193c4b07 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdateProjectRepositorySettingsConverter.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdateProjectRepositorySettingsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateProjectRepositorySettingsConverter.class); + + public static com.oracle.bmc.devops.requests.UpdateProjectRepositorySettingsRequest + interceptRequest( + com.oracle.bmc.devops.requests.UpdateProjectRepositorySettingsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.UpdateProjectRepositorySettingsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getProjectId(), "projectId must not be blank"); + Validate.notNull( + request.getUpdateProjectRepositorySettingsDetails(), + "updateProjectRepositorySettingsDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("projects") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getProjectId())) + .path("repositorySettings"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UpdateProjectRepositorySettingsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UpdateProjectRepositorySettingsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UpdateProjectRepositorySettingsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .UpdateProjectRepositorySettingsResponse>() { + @Override + public com.oracle.bmc.devops.responses + .UpdateProjectRepositorySettingsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.UpdateProjectRepositorySettingsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .ProjectRepositorySettings>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .ProjectRepositorySettings + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .ProjectRepositorySettings + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .ProjectRepositorySettings> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses + .UpdateProjectRepositorySettingsResponse.Builder + builder = + com.oracle.bmc.devops.responses + .UpdateProjectRepositorySettingsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.projectRepositorySettings(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses + .UpdateProjectRepositorySettingsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdatePullRequestCommentConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdatePullRequestCommentConverter.java new file mode 100644 index 00000000000..4aaf90afc6e --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdatePullRequestCommentConverter.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdatePullRequestCommentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdatePullRequestCommentConverter.class); + + public static com.oracle.bmc.devops.requests.UpdatePullRequestCommentRequest interceptRequest( + com.oracle.bmc.devops.requests.UpdatePullRequestCommentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.UpdatePullRequestCommentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + Validate.notBlank(request.getCommentId(), "commentId must not be blank"); + Validate.notNull( + request.getUpdatePullRequestCommentDetails(), + "updatePullRequestCommentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("comments") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCommentId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UpdatePullRequestCommentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UpdatePullRequestCommentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UpdatePullRequestCommentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .UpdatePullRequestCommentResponse>() { + @Override + public com.oracle.bmc.devops.responses.UpdatePullRequestCommentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.UpdatePullRequestCommentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestComment>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequestComment + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequestComment + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequestComment> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.UpdatePullRequestCommentResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .UpdatePullRequestCommentResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequestComment(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.UpdatePullRequestCommentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdatePullRequestConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdatePullRequestConverter.java new file mode 100644 index 00000000000..e43c862801b --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdatePullRequestConverter.java @@ -0,0 +1,167 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdatePullRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdatePullRequestConverter.class); + + public static com.oracle.bmc.devops.requests.UpdatePullRequestRequest interceptRequest( + com.oracle.bmc.devops.requests.UpdatePullRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.UpdatePullRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + Validate.notNull( + request.getUpdatePullRequestDetails(), "updatePullRequestDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UpdatePullRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UpdatePullRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UpdatePullRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UpdatePullRequestResponse>() { + @Override + public com.oracle.bmc.devops.responses.UpdatePullRequestResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.UpdatePullRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequest>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequest.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.PullRequest.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.PullRequest> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.UpdatePullRequestResponse.Builder + builder = + com.oracle.bmc.devops.responses + .UpdatePullRequestResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequest(response.getItem()); + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.UpdatePullRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdatePullRequestNotificationPreferenceConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdatePullRequestNotificationPreferenceConverter.java new file mode 100644 index 00000000000..9192bf8e040 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdatePullRequestNotificationPreferenceConverter.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdatePullRequestNotificationPreferenceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + UpdatePullRequestNotificationPreferenceConverter.class); + + public static com.oracle.bmc.devops.requests.UpdatePullRequestNotificationPreferenceRequest + interceptRequest( + com.oracle.bmc.devops.requests.UpdatePullRequestNotificationPreferenceRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.UpdatePullRequestNotificationPreferenceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getUpdatePullRequestNotificationPreferenceDetails(), + "updatePullRequestNotificationPreferenceDetails is required"); + Validate.notBlank(request.getPullRequestId(), "pullRequestId must not be blank"); + Validate.notBlank(request.getPrincipalId(), "principalId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("pullRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPullRequestId())) + .path("principals") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPrincipalId())) + .path("pullRequestNotificationPreference"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UpdatePullRequestNotificationPreferenceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UpdatePullRequestNotificationPreferenceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .UpdatePullRequestNotificationPreferenceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .UpdatePullRequestNotificationPreferenceResponse>() { + @Override + public com.oracle.bmc.devops.responses + .UpdatePullRequestNotificationPreferenceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.UpdatePullRequestNotificationPreferenceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestNotificationPreference>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestNotificationPreference + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .PullRequestNotificationPreference + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .PullRequestNotificationPreference> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses + .UpdatePullRequestNotificationPreferenceResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .UpdatePullRequestNotificationPreferenceResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.pullRequestNotificationPreference(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses + .UpdatePullRequestNotificationPreferenceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdateRepositoryNotificationPreferenceConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdateRepositoryNotificationPreferenceConverter.java new file mode 100644 index 00000000000..33343b5acfc --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdateRepositoryNotificationPreferenceConverter.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdateRepositoryNotificationPreferenceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + UpdateRepositoryNotificationPreferenceConverter.class); + + public static com.oracle.bmc.devops.requests.UpdateRepositoryNotificationPreferenceRequest + interceptRequest( + com.oracle.bmc.devops.requests.UpdateRepositoryNotificationPreferenceRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.UpdateRepositoryNotificationPreferenceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getUpdateRepositoryNotificationPreferenceDetails(), + "updateRepositoryNotificationPreferenceDetails is required"); + Validate.notBlank(request.getRepositoryId(), "repositoryId must not be blank"); + Validate.notBlank(request.getPrincipalId(), "principalId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("repositories") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRepositoryId())) + .path("principals") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPrincipalId())) + .path("pullRequestNotificationPreference"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UpdateRepositoryNotificationPreferenceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UpdateRepositoryNotificationPreferenceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .UpdateRepositoryNotificationPreferenceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .UpdateRepositoryNotificationPreferenceResponse>() { + @Override + public com.oracle.bmc.devops.responses + .UpdateRepositoryNotificationPreferenceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.UpdateRepositoryNotificationPreferenceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .RepositoryNotificationPreference>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .RepositoryNotificationPreference + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model + .RepositoryNotificationPreference + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .RepositoryNotificationPreference> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses + .UpdateRepositoryNotificationPreferenceResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .UpdateRepositoryNotificationPreferenceResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.repositoryNotificationPreference(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses + .UpdateRepositoryNotificationPreferenceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdateRepositorySettingsConverter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdateRepositorySettingsConverter.java new file mode 100644 index 00000000000..94b5780b5a3 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/internal/http/UpdateRepositorySettingsConverter.java @@ -0,0 +1,167 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.devops.model.*; +import com.oracle.bmc.devops.requests.*; +import com.oracle.bmc.devops.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdateRepositorySettingsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateRepositorySettingsConverter.class); + + public static com.oracle.bmc.devops.requests.UpdateRepositorySettingsRequest interceptRequest( + com.oracle.bmc.devops.requests.UpdateRepositorySettingsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.devops.requests.UpdateRepositorySettingsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getRepositoryId(), "repositoryId must not be blank"); + Validate.notNull( + request.getUpdateRepositorySettingsDetails(), + "updateRepositorySettingsDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210630") + .path("repositories") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRepositoryId())) + .path("repositorySettings"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UpdateRepositorySettingsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UpdateRepositorySettingsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses.UpdateRepositorySettingsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.devops.responses + .UpdateRepositorySettingsResponse>() { + @Override + public com.oracle.bmc.devops.responses.UpdateRepositorySettingsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.devops.responses.UpdateRepositorySettingsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model + .RepositorySettings>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.RepositorySettings + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.devops.model.RepositorySettings + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.devops.model.RepositorySettings> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.devops.responses.UpdateRepositorySettingsResponse + .Builder + builder = + com.oracle.bmc.devops.responses + .UpdateRepositorySettingsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.repositorySettings(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.devops.responses.UpdateRepositorySettingsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ApprovalActivitySummary.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ApprovalActivitySummary.java new file mode 100644 index 00000000000..ef1ac14fe2a --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ApprovalActivitySummary.java @@ -0,0 +1,242 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * activity describing a reviewer's approval decision + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ApprovalActivitySummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "activityType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ApprovalActivitySummary extends PullRequestActivitySummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("principal") + private PrincipalDetails principal; + + public Builder principal(PrincipalDetails principal) { + this.principal = principal; + this.__explicitlySet__.add("principal"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("pullRequestId") + private String pullRequestId; + + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + this.__explicitlySet__.add("pullRequestId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeOccurred") + private java.util.Date timeOccurred; + + public Builder timeOccurred(java.util.Date timeOccurred) { + this.timeOccurred = timeOccurred; + this.__explicitlySet__.add("timeOccurred"); + return this; + } + /** + * The approval status of a reviewer + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * The approval status of a reviewer + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ApprovalActivitySummary build() { + ApprovalActivitySummary model = + new ApprovalActivitySummary( + this.id, + this.principal, + this.pullRequestId, + this.timeOccurred, + this.status); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ApprovalActivitySummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("principal")) { + this.principal(model.getPrincipal()); + } + if (model.wasPropertyExplicitlySet("pullRequestId")) { + this.pullRequestId(model.getPullRequestId()); + } + if (model.wasPropertyExplicitlySet("timeOccurred")) { + this.timeOccurred(model.getTimeOccurred()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ApprovalActivitySummary( + String id, + PrincipalDetails principal, + String pullRequestId, + java.util.Date timeOccurred, + Status status) { + super(id, principal, pullRequestId, timeOccurred); + this.status = status; + } + + /** + * The approval status of a reviewer + **/ + public enum Status { + Approved("APPROVED"), + Unapproved("UNAPPROVED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The approval status of a reviewer + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * The approval status of a reviewer + * @return the value + **/ + public Status getStatus() { + return status; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ApprovalActivitySummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ApprovalActivitySummary)) { + return false; + } + + ApprovalActivitySummary other = (ApprovalActivitySummary) o; + return java.util.Objects.equals(this.status, other.status) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ApprovalRule.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ApprovalRule.java new file mode 100644 index 00000000000..017a7ba2b62 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ApprovalRule.java @@ -0,0 +1,262 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * A rule which must be satisfied for matching pull requests before the pull request can be merged + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ApprovalRule.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ApprovalRule extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "destinationBranch", + "reviewers", + "minApprovalsCount" + }) + public ApprovalRule( + String name, + String destinationBranch, + java.util.List reviewers, + Integer minApprovalsCount) { + super(); + this.name = name; + this.destinationBranch = destinationBranch; + this.reviewers = reviewers; + this.minApprovalsCount = minApprovalsCount; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Name which is used to uniquely identify an approval rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Name which is used to uniquely identify an approval rule. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Branch name where pull requests targeting the branch must satisfy the approval rule. This value being null means the rule applies to all pull requests + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationBranch") + private String destinationBranch; + + /** + * Branch name where pull requests targeting the branch must satisfy the approval rule. This value being null means the rule applies to all pull requests + * @param destinationBranch the value to set + * @return this builder + **/ + public Builder destinationBranch(String destinationBranch) { + this.destinationBranch = destinationBranch; + this.__explicitlySet__.add("destinationBranch"); + return this; + } + /** + * List of users who must provide approvals up to the minApprovalsCount specified in the rule. An empty list means the approvals can come from any user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reviewers") + private java.util.List reviewers; + + /** + * List of users who must provide approvals up to the minApprovalsCount specified in the rule. An empty list means the approvals can come from any user. + * @param reviewers the value to set + * @return this builder + **/ + public Builder reviewers(java.util.List reviewers) { + this.reviewers = reviewers; + this.__explicitlySet__.add("reviewers"); + return this; + } + /** + * Minimum number of approvals which must be provided by the reviewers specified in the list before the rule can be satisfied + **/ + @com.fasterxml.jackson.annotation.JsonProperty("minApprovalsCount") + private Integer minApprovalsCount; + + /** + * Minimum number of approvals which must be provided by the reviewers specified in the list before the rule can be satisfied + * @param minApprovalsCount the value to set + * @return this builder + **/ + public Builder minApprovalsCount(Integer minApprovalsCount) { + this.minApprovalsCount = minApprovalsCount; + this.__explicitlySet__.add("minApprovalsCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ApprovalRule build() { + ApprovalRule model = + new ApprovalRule( + this.name, + this.destinationBranch, + this.reviewers, + this.minApprovalsCount); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ApprovalRule model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("destinationBranch")) { + this.destinationBranch(model.getDestinationBranch()); + } + if (model.wasPropertyExplicitlySet("reviewers")) { + this.reviewers(model.getReviewers()); + } + if (model.wasPropertyExplicitlySet("minApprovalsCount")) { + this.minApprovalsCount(model.getMinApprovalsCount()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Name which is used to uniquely identify an approval rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name which is used to uniquely identify an approval rule. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Branch name where pull requests targeting the branch must satisfy the approval rule. This value being null means the rule applies to all pull requests + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationBranch") + private final String destinationBranch; + + /** + * Branch name where pull requests targeting the branch must satisfy the approval rule. This value being null means the rule applies to all pull requests + * @return the value + **/ + public String getDestinationBranch() { + return destinationBranch; + } + + /** + * List of users who must provide approvals up to the minApprovalsCount specified in the rule. An empty list means the approvals can come from any user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reviewers") + private final java.util.List reviewers; + + /** + * List of users who must provide approvals up to the minApprovalsCount specified in the rule. An empty list means the approvals can come from any user. + * @return the value + **/ + public java.util.List getReviewers() { + return reviewers; + } + + /** + * Minimum number of approvals which must be provided by the reviewers specified in the list before the rule can be satisfied + **/ + @com.fasterxml.jackson.annotation.JsonProperty("minApprovalsCount") + private final Integer minApprovalsCount; + + /** + * Minimum number of approvals which must be provided by the reviewers specified in the list before the rule can be satisfied + * @return the value + **/ + public Integer getMinApprovalsCount() { + return minApprovalsCount; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ApprovalRule("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", destinationBranch=").append(String.valueOf(this.destinationBranch)); + sb.append(", reviewers=").append(String.valueOf(this.reviewers)); + sb.append(", minApprovalsCount=").append(String.valueOf(this.minApprovalsCount)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ApprovalRule)) { + return false; + } + + ApprovalRule other = (ApprovalRule) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.destinationBranch, other.destinationBranch) + && java.util.Objects.equals(this.reviewers, other.reviewers) + && java.util.Objects.equals(this.minApprovalsCount, other.minApprovalsCount) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = + (result * PRIME) + + (this.destinationBranch == null ? 43 : this.destinationBranch.hashCode()); + result = (result * PRIME) + (this.reviewers == null ? 43 : this.reviewers.hashCode()); + result = + (result * PRIME) + + (this.minApprovalsCount == null ? 43 : this.minApprovalsCount.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ApprovalRuleCollection.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ApprovalRuleCollection.java new file mode 100644 index 00000000000..80d0ad4018a --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ApprovalRuleCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * List of approval rules which must be statisfied before pull requests which match the rules can be merged + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ApprovalRuleCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ApprovalRuleCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ApprovalRuleCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of approval rules. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of approval rules. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ApprovalRuleCollection build() { + ApprovalRuleCollection model = new ApprovalRuleCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ApprovalRuleCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of approval rules. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of approval rules. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ApprovalRuleCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ApprovalRuleCollection)) { + return false; + } + + ApprovalRuleCollection other = (ApprovalRuleCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ApprovalRuleMergeCheck.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ApprovalRuleMergeCheck.java new file mode 100644 index 00000000000..66352a9dbd1 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ApprovalRuleMergeCheck.java @@ -0,0 +1,438 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The status of the approval rules. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ApprovalRuleMergeCheck.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ApprovalRuleMergeCheck extends MergeCheck { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruleName") + private String ruleName; + + /** + * The name of the rule. + * @param ruleName the value to set + * @return this builder + **/ + public Builder ruleName(String ruleName) { + this.ruleName = ruleName; + this.__explicitlySet__.add("ruleName"); + return this; + } + /** + * The status of the approval rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * The status of the approval rule. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The number of total approvals needed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalApprovalCount") + private Integer totalApprovalCount; + + /** + * The number of total approvals needed. + * @param totalApprovalCount the value to set + * @return this builder + **/ + public Builder totalApprovalCount(Integer totalApprovalCount) { + this.totalApprovalCount = totalApprovalCount; + this.__explicitlySet__.add("totalApprovalCount"); + return this; + } + /** + * The current number of approvals. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("currentApprovalCount") + private Integer currentApprovalCount; + + /** + * The current number of approvals. + * @param currentApprovalCount the value to set + * @return this builder + **/ + public Builder currentApprovalCount(Integer currentApprovalCount) { + this.currentApprovalCount = currentApprovalCount; + this.__explicitlySet__.add("currentApprovalCount"); + return this; + } + /** + * The list of default reviewers. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reviewers") + private java.util.List reviewers; + + /** + * The list of default reviewers. + * @param reviewers the value to set + * @return this builder + **/ + public Builder reviewers(java.util.List reviewers) { + this.reviewers = reviewers; + this.__explicitlySet__.add("reviewers"); + return this; + } + /** + * The level of rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("level") + private Level level; + + /** + * The level of rule. + * @param level the value to set + * @return this builder + **/ + public Builder level(Level level) { + this.level = level; + this.__explicitlySet__.add("level"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ApprovalRuleMergeCheck build() { + ApprovalRuleMergeCheck model = + new ApprovalRuleMergeCheck( + this.ruleName, + this.status, + this.totalApprovalCount, + this.currentApprovalCount, + this.reviewers, + this.level); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ApprovalRuleMergeCheck model) { + if (model.wasPropertyExplicitlySet("ruleName")) { + this.ruleName(model.getRuleName()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("totalApprovalCount")) { + this.totalApprovalCount(model.getTotalApprovalCount()); + } + if (model.wasPropertyExplicitlySet("currentApprovalCount")) { + this.currentApprovalCount(model.getCurrentApprovalCount()); + } + if (model.wasPropertyExplicitlySet("reviewers")) { + this.reviewers(model.getReviewers()); + } + if (model.wasPropertyExplicitlySet("level")) { + this.level(model.getLevel()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ApprovalRuleMergeCheck( + String ruleName, + Status status, + Integer totalApprovalCount, + Integer currentApprovalCount, + java.util.List reviewers, + Level level) { + super(); + this.ruleName = ruleName; + this.status = status; + this.totalApprovalCount = totalApprovalCount; + this.currentApprovalCount = currentApprovalCount; + this.reviewers = reviewers; + this.level = level; + } + + /** + * The name of the rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ruleName") + private final String ruleName; + + /** + * The name of the rule. + * @return the value + **/ + public String getRuleName() { + return ruleName; + } + + /** + * The status of the approval rule. + **/ + public enum Status { + NeedsApproval("NEEDS_APPROVAL"), + Succeeded("SUCCEEDED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The status of the approval rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * The status of the approval rule. + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * The number of total approvals needed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalApprovalCount") + private final Integer totalApprovalCount; + + /** + * The number of total approvals needed. + * @return the value + **/ + public Integer getTotalApprovalCount() { + return totalApprovalCount; + } + + /** + * The current number of approvals. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("currentApprovalCount") + private final Integer currentApprovalCount; + + /** + * The current number of approvals. + * @return the value + **/ + public Integer getCurrentApprovalCount() { + return currentApprovalCount; + } + + /** + * The list of default reviewers. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reviewers") + private final java.util.List reviewers; + + /** + * The list of default reviewers. + * @return the value + **/ + public java.util.List getReviewers() { + return reviewers; + } + + /** + * The level of rule. + **/ + public enum Level { + Project("PROJECT"), + Repository("REPOSITORY"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Level.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Level v : Level.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Level(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Level create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Level', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The level of rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("level") + private final Level level; + + /** + * The level of rule. + * @return the value + **/ + public Level getLevel() { + return level; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ApprovalRuleMergeCheck("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", ruleName=").append(String.valueOf(this.ruleName)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", totalApprovalCount=").append(String.valueOf(this.totalApprovalCount)); + sb.append(", currentApprovalCount=").append(String.valueOf(this.currentApprovalCount)); + sb.append(", reviewers=").append(String.valueOf(this.reviewers)); + sb.append(", level=").append(String.valueOf(this.level)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ApprovalRuleMergeCheck)) { + return false; + } + + ApprovalRuleMergeCheck other = (ApprovalRuleMergeCheck) o; + return java.util.Objects.equals(this.ruleName, other.ruleName) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.totalApprovalCount, other.totalApprovalCount) + && java.util.Objects.equals(this.currentApprovalCount, other.currentApprovalCount) + && java.util.Objects.equals(this.reviewers, other.reviewers) + && java.util.Objects.equals(this.level, other.level) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.ruleName == null ? 43 : this.ruleName.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = + (result * PRIME) + + (this.totalApprovalCount == null + ? 43 + : this.totalApprovalCount.hashCode()); + result = + (result * PRIME) + + (this.currentApprovalCount == null + ? 43 + : this.currentApprovalCount.hashCode()); + result = (result * PRIME) + (this.reviewers == null ? 43 : this.reviewers.hashCode()); + result = (result * PRIME) + (this.level == null ? 43 : this.level.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/BuildMergeCheck.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/BuildMergeCheck.java new file mode 100644 index 00000000000..47e6a81d53b --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/BuildMergeCheck.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The status of the build pipelines. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = BuildMergeCheck.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class BuildMergeCheck extends MergeCheck { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The pipeline OCID. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pipelineId") + private String pipelineId; + + /** + * The pipeline OCID. + * @param pipelineId the value to set + * @return this builder + **/ + public Builder pipelineId(String pipelineId) { + this.pipelineId = pipelineId; + this.__explicitlySet__.add("pipelineId"); + return this; + } + /** + * The build run OCID. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildRunId") + private String buildRunId; + + /** + * The build run OCID. + * @param buildRunId the value to set + * @return this builder + **/ + public Builder buildRunId(String buildRunId) { + this.buildRunId = buildRunId; + this.__explicitlySet__.add("buildRunId"); + return this; + } + /** + * The status of the build. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildStatus") + private String buildStatus; + + /** + * The status of the build. + * @param buildStatus the value to set + * @return this builder + **/ + public Builder buildStatus(String buildStatus) { + this.buildStatus = buildStatus; + this.__explicitlySet__.add("buildStatus"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BuildMergeCheck build() { + BuildMergeCheck model = + new BuildMergeCheck(this.pipelineId, this.buildRunId, this.buildStatus); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BuildMergeCheck model) { + if (model.wasPropertyExplicitlySet("pipelineId")) { + this.pipelineId(model.getPipelineId()); + } + if (model.wasPropertyExplicitlySet("buildRunId")) { + this.buildRunId(model.getBuildRunId()); + } + if (model.wasPropertyExplicitlySet("buildStatus")) { + this.buildStatus(model.getBuildStatus()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public BuildMergeCheck(String pipelineId, String buildRunId, String buildStatus) { + super(); + this.pipelineId = pipelineId; + this.buildRunId = buildRunId; + this.buildStatus = buildStatus; + } + + /** + * The pipeline OCID. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pipelineId") + private final String pipelineId; + + /** + * The pipeline OCID. + * @return the value + **/ + public String getPipelineId() { + return pipelineId; + } + + /** + * The build run OCID. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildRunId") + private final String buildRunId; + + /** + * The build run OCID. + * @return the value + **/ + public String getBuildRunId() { + return buildRunId; + } + + /** + * The status of the build. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildStatus") + private final String buildStatus; + + /** + * The status of the build. + * @return the value + **/ + public String getBuildStatus() { + return buildStatus; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BuildMergeCheck("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", pipelineId=").append(String.valueOf(this.pipelineId)); + sb.append(", buildRunId=").append(String.valueOf(this.buildRunId)); + sb.append(", buildStatus=").append(String.valueOf(this.buildStatus)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BuildMergeCheck)) { + return false; + } + + BuildMergeCheck other = (BuildMergeCheck) o; + return java.util.Objects.equals(this.pipelineId, other.pipelineId) + && java.util.Objects.equals(this.buildRunId, other.buildRunId) + && java.util.Objects.equals(this.buildStatus, other.buildStatus) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.pipelineId == null ? 43 : this.pipelineId.hashCode()); + result = (result * PRIME) + (this.buildRunId == null ? 43 : this.buildRunId.hashCode()); + result = (result * PRIME) + (this.buildStatus == null ? 43 : this.buildStatus.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/BuildRunSnapshot.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/BuildRunSnapshot.java new file mode 100644 index 00000000000..bc46be235f4 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/BuildRunSnapshot.java @@ -0,0 +1,463 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Snapshot of a build run. Contains information including pipelineId, commitId. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = BuildRunSnapshot.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class BuildRunSnapshot extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "buildPipelineId", + "displayName", + "commitId", + "buildRunId", + "lifecycleState", + "lifecycleDetails", + "timeCreated", + "timeUpdated" + }) + public BuildRunSnapshot( + String buildPipelineId, + String displayName, + String commitId, + String buildRunId, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated) { + super(); + this.buildPipelineId = buildPipelineId; + this.displayName = displayName; + this.commitId = commitId; + this.buildRunId = buildRunId; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the build pipeline where the build was triggered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildPipelineId") + private String buildPipelineId; + + /** + * The OCID of the build pipeline where the build was triggered. + * @param buildPipelineId the value to set + * @return this builder + **/ + public Builder buildPipelineId(String buildPipelineId) { + this.buildPipelineId = buildPipelineId; + this.__explicitlySet__.add("buildPipelineId"); + return this; + } + /** + * The display name of the build run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the build run. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The commit id which the build was triggered from. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitId") + private String commitId; + + /** + * The commit id which the build was triggered from. + * @param commitId the value to set + * @return this builder + **/ + public Builder commitId(String commitId) { + this.commitId = commitId; + this.__explicitlySet__.add("commitId"); + return this; + } + /** + * The OCID of the build run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildRunId") + private String buildRunId; + + /** + * The OCID of the build run. + * @param buildRunId the value to set + * @return this builder + **/ + public Builder buildRunId(String buildRunId) { + this.buildRunId = buildRunId; + this.__explicitlySet__.add("buildRunId"); + return this; + } + /** + * The current status of the build run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current status of the build run. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The time the build run was created. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time the build run was created. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time the build run was updated. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time the build run was updated. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BuildRunSnapshot build() { + BuildRunSnapshot model = + new BuildRunSnapshot( + this.buildPipelineId, + this.displayName, + this.commitId, + this.buildRunId, + this.lifecycleState, + this.lifecycleDetails, + this.timeCreated, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BuildRunSnapshot model) { + if (model.wasPropertyExplicitlySet("buildPipelineId")) { + this.buildPipelineId(model.getBuildPipelineId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("commitId")) { + this.commitId(model.getCommitId()); + } + if (model.wasPropertyExplicitlySet("buildRunId")) { + this.buildRunId(model.getBuildRunId()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the build pipeline where the build was triggered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildPipelineId") + private final String buildPipelineId; + + /** + * The OCID of the build pipeline where the build was triggered. + * @return the value + **/ + public String getBuildPipelineId() { + return buildPipelineId; + } + + /** + * The display name of the build run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the build run. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The commit id which the build was triggered from. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitId") + private final String commitId; + + /** + * The commit id which the build was triggered from. + * @return the value + **/ + public String getCommitId() { + return commitId; + } + + /** + * The OCID of the build run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildRunId") + private final String buildRunId; + + /** + * The OCID of the build run. + * @return the value + **/ + public String getBuildRunId() { + return buildRunId; + } + + /** + * The current status of the build run. + **/ + public enum LifecycleState { + Accepted("ACCEPTED"), + InProgress("IN_PROGRESS"), + Failed("FAILED"), + Succeeded("SUCCEEDED"), + Canceling("CANCELING"), + Canceled("CANCELED"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + map.put(v.getValue(), v); + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid LifecycleState: " + key); + } + }; + /** + * The current status of the build run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current status of the build run. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The time the build run was created. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the build run was created. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the build run was updated. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the build run was updated. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BuildRunSnapshot("); + sb.append("super=").append(super.toString()); + sb.append("buildPipelineId=").append(String.valueOf(this.buildPipelineId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", commitId=").append(String.valueOf(this.commitId)); + sb.append(", buildRunId=").append(String.valueOf(this.buildRunId)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BuildRunSnapshot)) { + return false; + } + + BuildRunSnapshot other = (BuildRunSnapshot) o; + return java.util.Objects.equals(this.buildPipelineId, other.buildPipelineId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.commitId, other.commitId) + && java.util.Objects.equals(this.buildRunId, other.buildRunId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.buildPipelineId == null ? 43 : this.buildPipelineId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.commitId == null ? 43 : this.commitId.hashCode()); + result = (result * PRIME) + (this.buildRunId == null ? 43 : this.buildRunId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/BuildRunSnapshotCollection.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/BuildRunSnapshotCollection.java new file mode 100644 index 00000000000..5132e055861 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/BuildRunSnapshotCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Results of a build run search. Contains build run summary items. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = BuildRunSnapshotCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class BuildRunSnapshotCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public BuildRunSnapshotCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of build runs. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of build runs. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BuildRunSnapshotCollection build() { + BuildRunSnapshotCollection model = new BuildRunSnapshotCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BuildRunSnapshotCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of build runs. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of build runs. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BuildRunSnapshotCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BuildRunSnapshotCollection)) { + return false; + } + + BuildRunSnapshotCollection other = (BuildRunSnapshotCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/BuildRunSnapshotSummary.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/BuildRunSnapshotSummary.java new file mode 100644 index 00000000000..c3dead1ff6f --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/BuildRunSnapshotSummary.java @@ -0,0 +1,427 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Summary of a single build run snapshot. Contains information including pipelineId, commitId. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = BuildRunSnapshotSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class BuildRunSnapshotSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "buildPipelineId", + "commitId", + "buildRunId", + "displayName", + "lifecycleState", + "lifecycleDetails", + "timeCreated", + "timeUpdated" + }) + public BuildRunSnapshotSummary( + String buildPipelineId, + String commitId, + String buildRunId, + String displayName, + BuildRunSnapshot.LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated) { + super(); + this.buildPipelineId = buildPipelineId; + this.commitId = commitId; + this.buildRunId = buildRunId; + this.displayName = displayName; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the build pipeline where the build was triggered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildPipelineId") + private String buildPipelineId; + + /** + * The OCID of the build pipeline where the build was triggered. + * @param buildPipelineId the value to set + * @return this builder + **/ + public Builder buildPipelineId(String buildPipelineId) { + this.buildPipelineId = buildPipelineId; + this.__explicitlySet__.add("buildPipelineId"); + return this; + } + /** + * The commit id which the build was triggered from. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitId") + private String commitId; + + /** + * The commit id which the build was triggered from. + * @param commitId the value to set + * @return this builder + **/ + public Builder commitId(String commitId) { + this.commitId = commitId; + this.__explicitlySet__.add("commitId"); + return this; + } + /** + * The OCID of the build run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildRunId") + private String buildRunId; + + /** + * The OCID of the build run. + * @param buildRunId the value to set + * @return this builder + **/ + public Builder buildRunId(String buildRunId) { + this.buildRunId = buildRunId; + this.__explicitlySet__.add("buildRunId"); + return this; + } + /** + * The display name of the build run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The display name of the build run. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The current status of the build run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private BuildRunSnapshot.LifecycleState lifecycleState; + + /** + * The current status of the build run. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(BuildRunSnapshot.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The time the build run was created. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time the build run was created. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time the build run was updated. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time the build run was updated. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BuildRunSnapshotSummary build() { + BuildRunSnapshotSummary model = + new BuildRunSnapshotSummary( + this.buildPipelineId, + this.commitId, + this.buildRunId, + this.displayName, + this.lifecycleState, + this.lifecycleDetails, + this.timeCreated, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BuildRunSnapshotSummary model) { + if (model.wasPropertyExplicitlySet("buildPipelineId")) { + this.buildPipelineId(model.getBuildPipelineId()); + } + if (model.wasPropertyExplicitlySet("commitId")) { + this.commitId(model.getCommitId()); + } + if (model.wasPropertyExplicitlySet("buildRunId")) { + this.buildRunId(model.getBuildRunId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the build pipeline where the build was triggered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildPipelineId") + private final String buildPipelineId; + + /** + * The OCID of the build pipeline where the build was triggered. + * @return the value + **/ + public String getBuildPipelineId() { + return buildPipelineId; + } + + /** + * The commit id which the build was triggered from. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitId") + private final String commitId; + + /** + * The commit id which the build was triggered from. + * @return the value + **/ + public String getCommitId() { + return commitId; + } + + /** + * The OCID of the build run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("buildRunId") + private final String buildRunId; + + /** + * The OCID of the build run. + * @return the value + **/ + public String getBuildRunId() { + return buildRunId; + } + + /** + * The display name of the build run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The display name of the build run. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The current status of the build run. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final BuildRunSnapshot.LifecycleState lifecycleState; + + /** + * The current status of the build run. + * @return the value + **/ + public BuildRunSnapshot.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The time the build run was created. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the build run was created. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the build run was updated. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the build run was updated. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BuildRunSnapshotSummary("); + sb.append("super=").append(super.toString()); + sb.append("buildPipelineId=").append(String.valueOf(this.buildPipelineId)); + sb.append(", commitId=").append(String.valueOf(this.commitId)); + sb.append(", buildRunId=").append(String.valueOf(this.buildRunId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BuildRunSnapshotSummary)) { + return false; + } + + BuildRunSnapshotSummary other = (BuildRunSnapshotSummary) o; + return java.util.Objects.equals(this.buildPipelineId, other.buildPipelineId) + && java.util.Objects.equals(this.commitId, other.commitId) + && java.util.Objects.equals(this.buildRunId, other.buildRunId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.buildPipelineId == null ? 43 : this.buildPipelineId.hashCode()); + result = (result * PRIME) + (this.commitId == null ? 43 : this.commitId.hashCode()); + result = (result * PRIME) + (this.buildRunId == null ? 43 : this.buildRunId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CommentActivitySummary.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CommentActivitySummary.java new file mode 100644 index 00000000000..c1f54e5d61d --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CommentActivitySummary.java @@ -0,0 +1,195 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * activity describing comment addition to a pull request + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CommentActivitySummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "activityType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CommentActivitySummary extends PullRequestActivitySummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("principal") + private PrincipalDetails principal; + + public Builder principal(PrincipalDetails principal) { + this.principal = principal; + this.__explicitlySet__.add("principal"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("pullRequestId") + private String pullRequestId; + + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + this.__explicitlySet__.add("pullRequestId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeOccurred") + private java.util.Date timeOccurred; + + public Builder timeOccurred(java.util.Date timeOccurred) { + this.timeOccurred = timeOccurred; + this.__explicitlySet__.add("timeOccurred"); + return this; + } + /** + * Identifier of comment added to a PR + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commentId") + private String commentId; + + /** + * Identifier of comment added to a PR + * @param commentId the value to set + * @return this builder + **/ + public Builder commentId(String commentId) { + this.commentId = commentId; + this.__explicitlySet__.add("commentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CommentActivitySummary build() { + CommentActivitySummary model = + new CommentActivitySummary( + this.id, + this.principal, + this.pullRequestId, + this.timeOccurred, + this.commentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CommentActivitySummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("principal")) { + this.principal(model.getPrincipal()); + } + if (model.wasPropertyExplicitlySet("pullRequestId")) { + this.pullRequestId(model.getPullRequestId()); + } + if (model.wasPropertyExplicitlySet("timeOccurred")) { + this.timeOccurred(model.getTimeOccurred()); + } + if (model.wasPropertyExplicitlySet("commentId")) { + this.commentId(model.getCommentId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CommentActivitySummary( + String id, + PrincipalDetails principal, + String pullRequestId, + java.util.Date timeOccurred, + String commentId) { + super(id, principal, pullRequestId, timeOccurred); + this.commentId = commentId; + } + + /** + * Identifier of comment added to a PR + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commentId") + private final String commentId; + + /** + * Identifier of comment added to a PR + * @return the value + **/ + public String getCommentId() { + return commentId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CommentActivitySummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", commentId=").append(String.valueOf(this.commentId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CommentActivitySummary)) { + return false; + } + + CommentActivitySummary other = (CommentActivitySummary) o; + return java.util.Objects.equals(this.commentId, other.commentId) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.commentId == null ? 43 : this.commentId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CommitActivitySummary.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CommitActivitySummary.java new file mode 100644 index 00000000000..103d6c7ef6b --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CommitActivitySummary.java @@ -0,0 +1,237 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * activity describing commit updates to a pull request + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CommitActivitySummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "activityType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CommitActivitySummary extends PullRequestActivitySummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("principal") + private PrincipalDetails principal; + + public Builder principal(PrincipalDetails principal) { + this.principal = principal; + this.__explicitlySet__.add("principal"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("pullRequestId") + private String pullRequestId; + + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + this.__explicitlySet__.add("pullRequestId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeOccurred") + private java.util.Date timeOccurred; + + public Builder timeOccurred(java.util.Date timeOccurred) { + this.timeOccurred = timeOccurred; + this.__explicitlySet__.add("timeOccurred"); + return this; + } + /** + * list of commits added to a PR source branch after git push + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitsAdded") + private java.util.List commitsAdded; + + /** + * list of commits added to a PR source branch after git push + * @param commitsAdded the value to set + * @return this builder + **/ + public Builder commitsAdded(java.util.List commitsAdded) { + this.commitsAdded = commitsAdded; + this.__explicitlySet__.add("commitsAdded"); + return this; + } + /** + * list of commits removed from a PR source branch after git push + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitsRemoved") + private java.util.List commitsRemoved; + + /** + * list of commits removed from a PR source branch after git push + * @param commitsRemoved the value to set + * @return this builder + **/ + public Builder commitsRemoved(java.util.List commitsRemoved) { + this.commitsRemoved = commitsRemoved; + this.__explicitlySet__.add("commitsRemoved"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CommitActivitySummary build() { + CommitActivitySummary model = + new CommitActivitySummary( + this.id, + this.principal, + this.pullRequestId, + this.timeOccurred, + this.commitsAdded, + this.commitsRemoved); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CommitActivitySummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("principal")) { + this.principal(model.getPrincipal()); + } + if (model.wasPropertyExplicitlySet("pullRequestId")) { + this.pullRequestId(model.getPullRequestId()); + } + if (model.wasPropertyExplicitlySet("timeOccurred")) { + this.timeOccurred(model.getTimeOccurred()); + } + if (model.wasPropertyExplicitlySet("commitsAdded")) { + this.commitsAdded(model.getCommitsAdded()); + } + if (model.wasPropertyExplicitlySet("commitsRemoved")) { + this.commitsRemoved(model.getCommitsRemoved()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CommitActivitySummary( + String id, + PrincipalDetails principal, + String pullRequestId, + java.util.Date timeOccurred, + java.util.List commitsAdded, + java.util.List commitsRemoved) { + super(id, principal, pullRequestId, timeOccurred); + this.commitsAdded = commitsAdded; + this.commitsRemoved = commitsRemoved; + } + + /** + * list of commits added to a PR source branch after git push + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitsAdded") + private final java.util.List commitsAdded; + + /** + * list of commits added to a PR source branch after git push + * @return the value + **/ + public java.util.List getCommitsAdded() { + return commitsAdded; + } + + /** + * list of commits removed from a PR source branch after git push + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitsRemoved") + private final java.util.List commitsRemoved; + + /** + * list of commits removed from a PR source branch after git push + * @return the value + **/ + public java.util.List getCommitsRemoved() { + return commitsRemoved; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CommitActivitySummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", commitsAdded=").append(String.valueOf(this.commitsAdded)); + sb.append(", commitsRemoved=").append(String.valueOf(this.commitsRemoved)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CommitActivitySummary)) { + return false; + } + + CommitActivitySummary other = (CommitActivitySummary) o; + return java.util.Objects.equals(this.commitsAdded, other.commitsAdded) + && java.util.Objects.equals(this.commitsRemoved, other.commitsRemoved) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.commitsAdded == null ? 43 : this.commitsAdded.hashCode()); + result = + (result * PRIME) + + (this.commitsRemoved == null ? 43 : this.commitsRemoved.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CommitAnalyticsAuthorCollection.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CommitAnalyticsAuthorCollection.java new file mode 100644 index 00000000000..850315a2b6d --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CommitAnalyticsAuthorCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Result of listing Commit Analytics authors. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CommitAnalyticsAuthorCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CommitAnalyticsAuthorCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public CommitAnalyticsAuthorCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of authors. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of authors. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CommitAnalyticsAuthorCollection build() { + CommitAnalyticsAuthorCollection model = new CommitAnalyticsAuthorCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CommitAnalyticsAuthorCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of authors. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of authors. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CommitAnalyticsAuthorCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CommitAnalyticsAuthorCollection)) { + return false; + } + + CommitAnalyticsAuthorCollection other = (CommitAnalyticsAuthorCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CommitAnalyticsAuthorSummary.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CommitAnalyticsAuthorSummary.java new file mode 100644 index 00000000000..bdf40c3a0ef --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CommitAnalyticsAuthorSummary.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Object containing summary of Commit Analytics author. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CommitAnalyticsAuthorSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CommitAnalyticsAuthorSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"authorName", "authorEmail"}) + public CommitAnalyticsAuthorSummary(String authorName, String authorEmail) { + super(); + this.authorName = authorName; + this.authorEmail = authorEmail; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Author name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("authorName") + private String authorName; + + /** + * Author name. + * @param authorName the value to set + * @return this builder + **/ + public Builder authorName(String authorName) { + this.authorName = authorName; + this.__explicitlySet__.add("authorName"); + return this; + } + /** + * Author email. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("authorEmail") + private String authorEmail; + + /** + * Author email. + * @param authorEmail the value to set + * @return this builder + **/ + public Builder authorEmail(String authorEmail) { + this.authorEmail = authorEmail; + this.__explicitlySet__.add("authorEmail"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CommitAnalyticsAuthorSummary build() { + CommitAnalyticsAuthorSummary model = + new CommitAnalyticsAuthorSummary(this.authorName, this.authorEmail); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CommitAnalyticsAuthorSummary model) { + if (model.wasPropertyExplicitlySet("authorName")) { + this.authorName(model.getAuthorName()); + } + if (model.wasPropertyExplicitlySet("authorEmail")) { + this.authorEmail(model.getAuthorEmail()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Author name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("authorName") + private final String authorName; + + /** + * Author name. + * @return the value + **/ + public String getAuthorName() { + return authorName; + } + + /** + * Author email. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("authorEmail") + private final String authorEmail; + + /** + * Author email. + * @return the value + **/ + public String getAuthorEmail() { + return authorEmail; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CommitAnalyticsAuthorSummary("); + sb.append("super=").append(super.toString()); + sb.append("authorName=").append(String.valueOf(this.authorName)); + sb.append(", authorEmail=").append(String.valueOf(this.authorEmail)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CommitAnalyticsAuthorSummary)) { + return false; + } + + CommitAnalyticsAuthorSummary other = (CommitAnalyticsAuthorSummary) o; + return java.util.Objects.equals(this.authorName, other.authorName) + && java.util.Objects.equals(this.authorEmail, other.authorEmail) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.authorName == null ? 43 : this.authorName.hashCode()); + result = (result * PRIME) + (this.authorEmail == null ? 43 : this.authorEmail.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ConflictMergeCheck.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ConflictMergeCheck.java new file mode 100644 index 00000000000..a61c481c666 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ConflictMergeCheck.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The status of the merge conflict. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ConflictMergeCheck.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ConflictMergeCheck extends MergeCheck { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The status of the conflict. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * The status of the conflict. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ConflictMergeCheck build() { + ConflictMergeCheck model = new ConflictMergeCheck(this.status); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ConflictMergeCheck model) { + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ConflictMergeCheck(Status status) { + super(); + this.status = status; + } + + /** + * The status of the conflict. + **/ + public enum Status { + Succeeded("SUCCEEDED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The status of the conflict. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * The status of the conflict. + * @return the value + **/ + public Status getStatus() { + return status; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ConflictMergeCheck("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConflictMergeCheck)) { + return false; + } + + ConflictMergeCheck other = (ConflictMergeCheck) o; + return java.util.Objects.equals(this.status, other.status) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreateOrUpdateGitBranchDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreateOrUpdateGitBranchDetails.java new file mode 100644 index 00000000000..f526b777355 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreateOrUpdateGitBranchDetails.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The information needed to create a branch. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateOrUpdateGitBranchDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "refType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateOrUpdateGitBranchDetails extends CreateOrUpdateGitRefDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("refName") + private String refName; + + public Builder refName(String refName) { + this.refName = refName; + this.__explicitlySet__.add("refName"); + return this; + } + /** + * Commit ID pointed to by the new branch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitId") + private String commitId; + + /** + * Commit ID pointed to by the new branch. + * @param commitId the value to set + * @return this builder + **/ + public Builder commitId(String commitId) { + this.commitId = commitId; + this.__explicitlySet__.add("commitId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateOrUpdateGitBranchDetails build() { + CreateOrUpdateGitBranchDetails model = + new CreateOrUpdateGitBranchDetails(this.refName, this.commitId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateOrUpdateGitBranchDetails model) { + if (model.wasPropertyExplicitlySet("refName")) { + this.refName(model.getRefName()); + } + if (model.wasPropertyExplicitlySet("commitId")) { + this.commitId(model.getCommitId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateOrUpdateGitBranchDetails(String refName, String commitId) { + super(refName); + this.commitId = commitId; + } + + /** + * Commit ID pointed to by the new branch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitId") + private final String commitId; + + /** + * Commit ID pointed to by the new branch. + * @return the value + **/ + public String getCommitId() { + return commitId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateOrUpdateGitBranchDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", commitId=").append(String.valueOf(this.commitId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateOrUpdateGitBranchDetails)) { + return false; + } + + CreateOrUpdateGitBranchDetails other = (CreateOrUpdateGitBranchDetails) o; + return java.util.Objects.equals(this.commitId, other.commitId) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.commitId == null ? 43 : this.commitId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreateOrUpdateGitRefDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreateOrUpdateGitRefDetails.java new file mode 100644 index 00000000000..f2eb9df9ed4 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreateOrUpdateGitRefDetails.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The information needed to create a reference. If the reference already exists, then it can be used to update the reference. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "refType", + defaultImpl = CreateOrUpdateGitRefDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateOrUpdateGitBranchDetails.class, + name = "BRANCH" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateOrUpdateGitTagDetails.class, + name = "TAG" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CreateOrUpdateGitRefDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"refName"}) + protected CreateOrUpdateGitRefDetails(String refName) { + super(); + this.refName = refName; + } + + /** + * The name of the reference to create or update. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("refName") + private final String refName; + + /** + * The name of the reference to create or update. + * @return the value + **/ + public String getRefName() { + return refName; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateOrUpdateGitRefDetails("); + sb.append("super=").append(super.toString()); + sb.append("refName=").append(String.valueOf(this.refName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateOrUpdateGitRefDetails)) { + return false; + } + + CreateOrUpdateGitRefDetails other = (CreateOrUpdateGitRefDetails) o; + return java.util.Objects.equals(this.refName, other.refName) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.refName == null ? 43 : this.refName.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The type of reference (BRANCH or TAG). + **/ + public enum RefType { + Branch("BRANCH"), + Tag("TAG"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (RefType v : RefType.values()) { + map.put(v.getValue(), v); + } + } + + RefType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static RefType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid RefType: " + key); + } + }; +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreateOrUpdateGitTagDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreateOrUpdateGitTagDetails.java new file mode 100644 index 00000000000..a3be22f2764 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreateOrUpdateGitTagDetails.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The information needed to create a lightweight tag. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateOrUpdateGitTagDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "refType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateOrUpdateGitTagDetails extends CreateOrUpdateGitRefDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("refName") + private String refName; + + public Builder refName(String refName) { + this.refName = refName; + this.__explicitlySet__.add("refName"); + return this; + } + /** + * SHA-1 hash value of the object pointed to by the tag. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectId") + private String objectId; + + /** + * SHA-1 hash value of the object pointed to by the tag. + * @param objectId the value to set + * @return this builder + **/ + public Builder objectId(String objectId) { + this.objectId = objectId; + this.__explicitlySet__.add("objectId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateOrUpdateGitTagDetails build() { + CreateOrUpdateGitTagDetails model = + new CreateOrUpdateGitTagDetails(this.refName, this.objectId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateOrUpdateGitTagDetails model) { + if (model.wasPropertyExplicitlySet("refName")) { + this.refName(model.getRefName()); + } + if (model.wasPropertyExplicitlySet("objectId")) { + this.objectId(model.getObjectId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateOrUpdateGitTagDetails(String refName, String objectId) { + super(refName); + this.objectId = objectId; + } + + /** + * SHA-1 hash value of the object pointed to by the tag. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectId") + private final String objectId; + + /** + * SHA-1 hash value of the object pointed to by the tag. + * @return the value + **/ + public String getObjectId() { + return objectId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateOrUpdateGitTagDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", objectId=").append(String.valueOf(this.objectId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateOrUpdateGitTagDetails)) { + return false; + } + + CreateOrUpdateGitTagDetails other = (CreateOrUpdateGitTagDetails) o; + return java.util.Objects.equals(this.objectId, other.objectId) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.objectId == null ? 43 : this.objectId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreateOrUpdateProtectedBranchDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreateOrUpdateProtectedBranchDetails.java new file mode 100644 index 00000000000..7242ca2543c --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreateOrUpdateProtectedBranchDetails.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Information to create a protected branch + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateOrUpdateProtectedBranchDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateOrUpdateProtectedBranchDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"branchName", "protectionLevels"}) + public CreateOrUpdateProtectedBranchDetails( + String branchName, java.util.List protectionLevels) { + super(); + this.branchName = branchName; + this.protectionLevels = protectionLevels; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Name of a branch to protect. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("branchName") + private String branchName; + + /** + * Name of a branch to protect. + * @param branchName the value to set + * @return this builder + **/ + public Builder branchName(String branchName) { + this.branchName = branchName; + this.__explicitlySet__.add("branchName"); + return this; + } + /** + * Level of protection to add on a branch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionLevels") + private java.util.List protectionLevels; + + /** + * Level of protection to add on a branch. + * @param protectionLevels the value to set + * @return this builder + **/ + public Builder protectionLevels(java.util.List protectionLevels) { + this.protectionLevels = protectionLevels; + this.__explicitlySet__.add("protectionLevels"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateOrUpdateProtectedBranchDetails build() { + CreateOrUpdateProtectedBranchDetails model = + new CreateOrUpdateProtectedBranchDetails( + this.branchName, this.protectionLevels); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateOrUpdateProtectedBranchDetails model) { + if (model.wasPropertyExplicitlySet("branchName")) { + this.branchName(model.getBranchName()); + } + if (model.wasPropertyExplicitlySet("protectionLevels")) { + this.protectionLevels(model.getProtectionLevels()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Name of a branch to protect. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("branchName") + private final String branchName; + + /** + * Name of a branch to protect. + * @return the value + **/ + public String getBranchName() { + return branchName; + } + + /** + * Level of protection to add on a branch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionLevels") + private final java.util.List protectionLevels; + + /** + * Level of protection to add on a branch. + * @return the value + **/ + public java.util.List getProtectionLevels() { + return protectionLevels; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateOrUpdateProtectedBranchDetails("); + sb.append("super=").append(super.toString()); + sb.append("branchName=").append(String.valueOf(this.branchName)); + sb.append(", protectionLevels=").append(String.valueOf(this.protectionLevels)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateOrUpdateProtectedBranchDetails)) { + return false; + } + + CreateOrUpdateProtectedBranchDetails other = (CreateOrUpdateProtectedBranchDetails) o; + return java.util.Objects.equals(this.branchName, other.branchName) + && java.util.Objects.equals(this.protectionLevels, other.protectionLevels) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.branchName == null ? 43 : this.branchName.hashCode()); + result = + (result * PRIME) + + (this.protectionLevels == null ? 43 : this.protectionLevels.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreatePullRequestCommentDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreatePullRequestCommentDetails.java new file mode 100644 index 00000000000..31a9c495eae --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreatePullRequestCommentDetails.java @@ -0,0 +1,341 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The information about new Comment. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreatePullRequestCommentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreatePullRequestCommentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "data", + "parentId", + "filePath", + "commitId", + "fileType", + "lineNumber" + }) + public CreatePullRequestCommentDetails( + String data, + String parentId, + String filePath, + String commitId, + PullRequestComment.FileType fileType, + Integer lineNumber) { + super(); + this.data = data; + this.parentId = parentId; + this.filePath = filePath; + this.commitId = commitId; + this.fileType = fileType; + this.lineNumber = lineNumber; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Content of the Comment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("data") + private String data; + + /** + * Content of the Comment. + * @param data the value to set + * @return this builder + **/ + public Builder data(String data) { + this.data = data; + this.__explicitlySet__.add("data"); + return this; + } + /** + * ID of parent Comment + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentId") + private String parentId; + + /** + * ID of parent Comment + * @param parentId the value to set + * @return this builder + **/ + public Builder parentId(String parentId) { + this.parentId = parentId; + this.__explicitlySet__.add("parentId"); + return this; + } + /** + * File path in the commit + **/ + @com.fasterxml.jackson.annotation.JsonProperty("filePath") + private String filePath; + + /** + * File path in the commit + * @param filePath the value to set + * @return this builder + **/ + public Builder filePath(String filePath) { + this.filePath = filePath; + this.__explicitlySet__.add("filePath"); + return this; + } + /** + * Commit SHA + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitId") + private String commitId; + + /** + * Commit SHA + * @param commitId the value to set + * @return this builder + **/ + public Builder commitId(String commitId) { + this.commitId = commitId; + this.__explicitlySet__.add("commitId"); + return this; + } + /** + * File path in the target commit + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fileType") + private PullRequestComment.FileType fileType; + + /** + * File path in the target commit + * @param fileType the value to set + * @return this builder + **/ + public Builder fileType(PullRequestComment.FileType fileType) { + this.fileType = fileType; + this.__explicitlySet__.add("fileType"); + return this; + } + /** + * Line number in the file + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lineNumber") + private Integer lineNumber; + + /** + * Line number in the file + * @param lineNumber the value to set + * @return this builder + **/ + public Builder lineNumber(Integer lineNumber) { + this.lineNumber = lineNumber; + this.__explicitlySet__.add("lineNumber"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreatePullRequestCommentDetails build() { + CreatePullRequestCommentDetails model = + new CreatePullRequestCommentDetails( + this.data, + this.parentId, + this.filePath, + this.commitId, + this.fileType, + this.lineNumber); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreatePullRequestCommentDetails model) { + if (model.wasPropertyExplicitlySet("data")) { + this.data(model.getData()); + } + if (model.wasPropertyExplicitlySet("parentId")) { + this.parentId(model.getParentId()); + } + if (model.wasPropertyExplicitlySet("filePath")) { + this.filePath(model.getFilePath()); + } + if (model.wasPropertyExplicitlySet("commitId")) { + this.commitId(model.getCommitId()); + } + if (model.wasPropertyExplicitlySet("fileType")) { + this.fileType(model.getFileType()); + } + if (model.wasPropertyExplicitlySet("lineNumber")) { + this.lineNumber(model.getLineNumber()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Content of the Comment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("data") + private final String data; + + /** + * Content of the Comment. + * @return the value + **/ + public String getData() { + return data; + } + + /** + * ID of parent Comment + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentId") + private final String parentId; + + /** + * ID of parent Comment + * @return the value + **/ + public String getParentId() { + return parentId; + } + + /** + * File path in the commit + **/ + @com.fasterxml.jackson.annotation.JsonProperty("filePath") + private final String filePath; + + /** + * File path in the commit + * @return the value + **/ + public String getFilePath() { + return filePath; + } + + /** + * Commit SHA + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitId") + private final String commitId; + + /** + * Commit SHA + * @return the value + **/ + public String getCommitId() { + return commitId; + } + + /** + * File path in the target commit + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fileType") + private final PullRequestComment.FileType fileType; + + /** + * File path in the target commit + * @return the value + **/ + public PullRequestComment.FileType getFileType() { + return fileType; + } + + /** + * Line number in the file + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lineNumber") + private final Integer lineNumber; + + /** + * Line number in the file + * @return the value + **/ + public Integer getLineNumber() { + return lineNumber; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreatePullRequestCommentDetails("); + sb.append("super=").append(super.toString()); + sb.append("data=").append(String.valueOf(this.data)); + sb.append(", parentId=").append(String.valueOf(this.parentId)); + sb.append(", filePath=").append(String.valueOf(this.filePath)); + sb.append(", commitId=").append(String.valueOf(this.commitId)); + sb.append(", fileType=").append(String.valueOf(this.fileType)); + sb.append(", lineNumber=").append(String.valueOf(this.lineNumber)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreatePullRequestCommentDetails)) { + return false; + } + + CreatePullRequestCommentDetails other = (CreatePullRequestCommentDetails) o; + return java.util.Objects.equals(this.data, other.data) + && java.util.Objects.equals(this.parentId, other.parentId) + && java.util.Objects.equals(this.filePath, other.filePath) + && java.util.Objects.equals(this.commitId, other.commitId) + && java.util.Objects.equals(this.fileType, other.fileType) + && java.util.Objects.equals(this.lineNumber, other.lineNumber) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.data == null ? 43 : this.data.hashCode()); + result = (result * PRIME) + (this.parentId == null ? 43 : this.parentId.hashCode()); + result = (result * PRIME) + (this.filePath == null ? 43 : this.filePath.hashCode()); + result = (result * PRIME) + (this.commitId == null ? 43 : this.commitId.hashCode()); + result = (result * PRIME) + (this.fileType == null ? 43 : this.fileType.hashCode()); + result = (result * PRIME) + (this.lineNumber == null ? 43 : this.lineNumber.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreatePullRequestDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreatePullRequestDetails.java new file mode 100644 index 00000000000..85c1a20fd20 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreatePullRequestDetails.java @@ -0,0 +1,468 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The information about new Pull Request. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreatePullRequestDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreatePullRequestDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "sourceBranch", + "destinationBranch", + "repositoryId", + "sourceRepositoryId", + "description", + "reviewers", + "freeformTags", + "definedTags" + }) + public CreatePullRequestDetails( + String displayName, + String sourceBranch, + String destinationBranch, + String repositoryId, + String sourceRepositoryId, + String description, + java.util.List reviewers, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.sourceBranch = sourceBranch; + this.destinationBranch = destinationBranch; + this.repositoryId = repositoryId; + this.sourceRepositoryId = sourceRepositoryId; + this.description = description; + this.reviewers = reviewers; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Pull Request title + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Pull Request title + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The source branch of the pull request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceBranch") + private String sourceBranch; + + /** + * The source branch of the pull request. + * @param sourceBranch the value to set + * @return this builder + **/ + public Builder sourceBranch(String sourceBranch) { + this.sourceBranch = sourceBranch; + this.__explicitlySet__.add("sourceBranch"); + return this; + } + /** + * The destination branch of the pull request. If not provided, default branch will be used as the destination branch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationBranch") + private String destinationBranch; + + /** + * The destination branch of the pull request. If not provided, default branch will be used as the destination branch. + * @param destinationBranch the value to set + * @return this builder + **/ + public Builder destinationBranch(String destinationBranch) { + this.destinationBranch = destinationBranch; + this.__explicitlySet__.add("destinationBranch"); + return this; + } + /** + * The OCID of the repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("repositoryId") + private String repositoryId; + + /** + * The OCID of the repository. + * @param repositoryId the value to set + * @return this builder + **/ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + this.__explicitlySet__.add("repositoryId"); + return this; + } + /** + * The OCID of the forked repository that will act as the source of the changes to be included in the pull request against the parent repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceRepositoryId") + private String sourceRepositoryId; + + /** + * The OCID of the forked repository that will act as the source of the changes to be included in the pull request against the parent repository. + * @param sourceRepositoryId the value to set + * @return this builder + **/ + public Builder sourceRepositoryId(String sourceRepositoryId) { + this.sourceRepositoryId = sourceRepositoryId; + this.__explicitlySet__.add("sourceRepositoryId"); + return this; + } + /** + * Details of the pull request. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Details of the pull request. Avoid entering confidential information. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Reviewers for this pull request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reviewers") + private java.util.List reviewers; + + /** + * Reviewers for this pull request. + * @param reviewers the value to set + * @return this builder + **/ + public Builder reviewers(java.util.List reviewers) { + this.reviewers = reviewers; + this.__explicitlySet__.add("reviewers"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreatePullRequestDetails build() { + CreatePullRequestDetails model = + new CreatePullRequestDetails( + this.displayName, + this.sourceBranch, + this.destinationBranch, + this.repositoryId, + this.sourceRepositoryId, + this.description, + this.reviewers, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreatePullRequestDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("sourceBranch")) { + this.sourceBranch(model.getSourceBranch()); + } + if (model.wasPropertyExplicitlySet("destinationBranch")) { + this.destinationBranch(model.getDestinationBranch()); + } + if (model.wasPropertyExplicitlySet("repositoryId")) { + this.repositoryId(model.getRepositoryId()); + } + if (model.wasPropertyExplicitlySet("sourceRepositoryId")) { + this.sourceRepositoryId(model.getSourceRepositoryId()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("reviewers")) { + this.reviewers(model.getReviewers()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Pull Request title + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Pull Request title + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The source branch of the pull request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceBranch") + private final String sourceBranch; + + /** + * The source branch of the pull request. + * @return the value + **/ + public String getSourceBranch() { + return sourceBranch; + } + + /** + * The destination branch of the pull request. If not provided, default branch will be used as the destination branch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationBranch") + private final String destinationBranch; + + /** + * The destination branch of the pull request. If not provided, default branch will be used as the destination branch. + * @return the value + **/ + public String getDestinationBranch() { + return destinationBranch; + } + + /** + * The OCID of the repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("repositoryId") + private final String repositoryId; + + /** + * The OCID of the repository. + * @return the value + **/ + public String getRepositoryId() { + return repositoryId; + } + + /** + * The OCID of the forked repository that will act as the source of the changes to be included in the pull request against the parent repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceRepositoryId") + private final String sourceRepositoryId; + + /** + * The OCID of the forked repository that will act as the source of the changes to be included in the pull request against the parent repository. + * @return the value + **/ + public String getSourceRepositoryId() { + return sourceRepositoryId; + } + + /** + * Details of the pull request. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Details of the pull request. Avoid entering confidential information. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Reviewers for this pull request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reviewers") + private final java.util.List reviewers; + + /** + * Reviewers for this pull request. + * @return the value + **/ + public java.util.List getReviewers() { + return reviewers; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreatePullRequestDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", sourceBranch=").append(String.valueOf(this.sourceBranch)); + sb.append(", destinationBranch=").append(String.valueOf(this.destinationBranch)); + sb.append(", repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(", sourceRepositoryId=").append(String.valueOf(this.sourceRepositoryId)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", reviewers=").append(String.valueOf(this.reviewers)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreatePullRequestDetails)) { + return false; + } + + CreatePullRequestDetails other = (CreatePullRequestDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.sourceBranch, other.sourceBranch) + && java.util.Objects.equals(this.destinationBranch, other.destinationBranch) + && java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals(this.sourceRepositoryId, other.sourceRepositoryId) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.reviewers, other.reviewers) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.sourceBranch == null ? 43 : this.sourceBranch.hashCode()); + result = + (result * PRIME) + + (this.destinationBranch == null ? 43 : this.destinationBranch.hashCode()); + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = + (result * PRIME) + + (this.sourceRepositoryId == null + ? 43 + : this.sourceRepositoryId.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.reviewers == null ? 43 : this.reviewers.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreateRepositoryDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreateRepositoryDetails.java index b15bcab5ef1..d24fde54419 100644 --- a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreateRepositoryDetails.java +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreateRepositoryDetails.java @@ -25,6 +25,7 @@ public final class CreateRepositoryDetails @java.beans.ConstructorProperties({ "name", "projectId", + "parentRepositoryId", "defaultBranch", "repositoryType", "mirrorRepositoryConfig", @@ -35,6 +36,7 @@ public final class CreateRepositoryDetails public CreateRepositoryDetails( String name, String projectId, + String parentRepositoryId, String defaultBranch, Repository.RepositoryType repositoryType, MirrorRepositoryConfig mirrorRepositoryConfig, @@ -44,6 +46,7 @@ public CreateRepositoryDetails( super(); this.name = name; this.projectId = projectId; + this.parentRepositoryId = parentRepositoryId; this.defaultBranch = defaultBranch; this.repositoryType = repositoryType; this.mirrorRepositoryConfig = mirrorRepositoryConfig; @@ -86,6 +89,22 @@ public Builder projectId(String projectId) { this.__explicitlySet__.add("projectId"); return this; } + /** + * The OCID of the parent repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentRepositoryId") + private String parentRepositoryId; + + /** + * The OCID of the parent repository. + * @param parentRepositoryId the value to set + * @return this builder + **/ + public Builder parentRepositoryId(String parentRepositoryId) { + this.parentRepositoryId = parentRepositoryId; + this.__explicitlySet__.add("parentRepositoryId"); + return this; + } /** * The default branch of the repository. **/ @@ -106,6 +125,7 @@ public Builder defaultBranch(String defaultBranch) { * Type of repository. Allowed values: * {@code MIRRORED} * {@code HOSTED} + * {@code FORKED} * **/ @com.fasterxml.jackson.annotation.JsonProperty("repositoryType") @@ -115,6 +135,7 @@ public Builder defaultBranch(String defaultBranch) { * Type of repository. Allowed values: * {@code MIRRORED} * {@code HOSTED} + * {@code FORKED} * * @param repositoryType the value to set * @return this builder @@ -191,6 +212,7 @@ public CreateRepositoryDetails build() { new CreateRepositoryDetails( this.name, this.projectId, + this.parentRepositoryId, this.defaultBranch, this.repositoryType, this.mirrorRepositoryConfig, @@ -211,6 +233,9 @@ public Builder copy(CreateRepositoryDetails model) { if (model.wasPropertyExplicitlySet("projectId")) { this.projectId(model.getProjectId()); } + if (model.wasPropertyExplicitlySet("parentRepositoryId")) { + this.parentRepositoryId(model.getParentRepositoryId()); + } if (model.wasPropertyExplicitlySet("defaultBranch")) { this.defaultBranch(model.getDefaultBranch()); } @@ -272,6 +297,20 @@ public String getProjectId() { return projectId; } + /** + * The OCID of the parent repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentRepositoryId") + private final String parentRepositoryId; + + /** + * The OCID of the parent repository. + * @return the value + **/ + public String getParentRepositoryId() { + return parentRepositoryId; + } + /** * The default branch of the repository. **/ @@ -290,6 +329,7 @@ public String getDefaultBranch() { * Type of repository. Allowed values: * {@code MIRRORED} * {@code HOSTED} + * {@code FORKED} * **/ @com.fasterxml.jackson.annotation.JsonProperty("repositoryType") @@ -299,6 +339,7 @@ public String getDefaultBranch() { * Type of repository. Allowed values: * {@code MIRRORED} * {@code HOSTED} + * {@code FORKED} * * @return the value **/ @@ -371,6 +412,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("name=").append(String.valueOf(this.name)); sb.append(", projectId=").append(String.valueOf(this.projectId)); + sb.append(", parentRepositoryId=").append(String.valueOf(this.parentRepositoryId)); sb.append(", defaultBranch=").append(String.valueOf(this.defaultBranch)); sb.append(", repositoryType=").append(String.valueOf(this.repositoryType)); sb.append(", mirrorRepositoryConfig=").append(String.valueOf(this.mirrorRepositoryConfig)); @@ -393,6 +435,7 @@ public boolean equals(Object o) { CreateRepositoryDetails other = (CreateRepositoryDetails) o; return java.util.Objects.equals(this.name, other.name) && java.util.Objects.equals(this.projectId, other.projectId) + && java.util.Objects.equals(this.parentRepositoryId, other.parentRepositoryId) && java.util.Objects.equals(this.defaultBranch, other.defaultBranch) && java.util.Objects.equals(this.repositoryType, other.repositoryType) && java.util.Objects.equals( @@ -409,6 +452,11 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); result = (result * PRIME) + (this.projectId == null ? 43 : this.projectId.hashCode()); + result = + (result * PRIME) + + (this.parentRepositoryId == null + ? 43 + : this.parentRepositoryId.hashCode()); result = (result * PRIME) + (this.defaultBranch == null ? 43 : this.defaultBranch.hashCode()); diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreateReviewerDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreateReviewerDetails.java new file mode 100644 index 00000000000..e083d3bc5df --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/CreateReviewerDetails.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The reviewer to be created. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateReviewerDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateReviewerDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"principalId"}) + public CreateReviewerDetails(String principalId) { + super(); + this.principalId = principalId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Pull Request reviewer id + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalId") + private String principalId; + + /** + * Pull Request reviewer id + * @param principalId the value to set + * @return this builder + **/ + public Builder principalId(String principalId) { + this.principalId = principalId; + this.__explicitlySet__.add("principalId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateReviewerDetails build() { + CreateReviewerDetails model = new CreateReviewerDetails(this.principalId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateReviewerDetails model) { + if (model.wasPropertyExplicitlySet("principalId")) { + this.principalId(model.getPrincipalId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Pull Request reviewer id + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalId") + private final String principalId; + + /** + * Pull Request reviewer id + * @return the value + **/ + public String getPrincipalId() { + return principalId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateReviewerDetails("); + sb.append("super=").append(super.toString()); + sb.append("principalId=").append(String.valueOf(this.principalId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateReviewerDetails)) { + return false; + } + + CreateReviewerDetails other = (CreateReviewerDetails) o; + return java.util.Objects.equals(this.principalId, other.principalId) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.principalId == null ? 43 : this.principalId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/DeleteGitRefDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/DeleteGitRefDetails.java new file mode 100644 index 00000000000..95e81c59791 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/DeleteGitRefDetails.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The information needed to delete a reference. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DeleteGitRefDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DeleteGitRefDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"refName"}) + public DeleteGitRefDetails(String refName) { + super(); + this.refName = refName; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A filter to return only resources that match the given reference name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("refName") + private String refName; + + /** + * A filter to return only resources that match the given reference name. + * @param refName the value to set + * @return this builder + **/ + public Builder refName(String refName) { + this.refName = refName; + this.__explicitlySet__.add("refName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DeleteGitRefDetails build() { + DeleteGitRefDetails model = new DeleteGitRefDetails(this.refName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DeleteGitRefDetails model) { + if (model.wasPropertyExplicitlySet("refName")) { + this.refName(model.getRefName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A filter to return only resources that match the given reference name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("refName") + private final String refName; + + /** + * A filter to return only resources that match the given reference name. + * @return the value + **/ + public String getRefName() { + return refName; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DeleteGitRefDetails("); + sb.append("super=").append(super.toString()); + sb.append("refName=").append(String.valueOf(this.refName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteGitRefDetails)) { + return false; + } + + DeleteGitRefDetails other = (DeleteGitRefDetails) o; + return java.util.Objects.equals(this.refName, other.refName) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.refName == null ? 43 : this.refName.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/DeleteProtectedBranchDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/DeleteProtectedBranchDetails.java new file mode 100644 index 00000000000..072407eaa54 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/DeleteProtectedBranchDetails.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Information to delete a protected branch + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DeleteProtectedBranchDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DeleteProtectedBranchDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"branchName"}) + public DeleteProtectedBranchDetails(String branchName) { + super(); + this.branchName = branchName; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Name of a protected branch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("branchName") + private String branchName; + + /** + * Name of a protected branch. + * @param branchName the value to set + * @return this builder + **/ + public Builder branchName(String branchName) { + this.branchName = branchName; + this.__explicitlySet__.add("branchName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DeleteProtectedBranchDetails build() { + DeleteProtectedBranchDetails model = new DeleteProtectedBranchDetails(this.branchName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DeleteProtectedBranchDetails model) { + if (model.wasPropertyExplicitlySet("branchName")) { + this.branchName(model.getBranchName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Name of a protected branch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("branchName") + private final String branchName; + + /** + * Name of a protected branch. + * @return the value + **/ + public String getBranchName() { + return branchName; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DeleteProtectedBranchDetails("); + sb.append("super=").append(super.toString()); + sb.append("branchName=").append(String.valueOf(this.branchName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteProtectedBranchDetails)) { + return false; + } + + DeleteProtectedBranchDetails other = (DeleteProtectedBranchDetails) o; + return java.util.Objects.equals(this.branchName, other.branchName) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.branchName == null ? 43 : this.branchName.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/DeployArtifactSource.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/DeployArtifactSource.java index f353687036f..cca21eb4a0e 100644 --- a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/DeployArtifactSource.java +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/DeployArtifactSource.java @@ -98,6 +98,7 @@ public enum DeployArtifactSourceType { Ocir("OCIR"), GenericArtifact("GENERIC_ARTIFACT"), HelmChart("HELM_CHART"), + HelmCommandSpec("HELM_COMMAND_SPEC"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/DevopsCodeRepositoryFilter.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/DevopsCodeRepositoryFilter.java index a1d454a970a..e4a84657c09 100644 --- a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/DevopsCodeRepositoryFilter.java +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/DevopsCodeRepositoryFilter.java @@ -115,6 +115,8 @@ public DevopsCodeRepositoryFilter( **/ public enum Events { Push("PUSH"), + PullRequestCreated("PULL_REQUEST_CREATED"), + PullRequestUpdated("PULL_REQUEST_UPDATED"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/DevopsCodeRepositoryFilterAttributes.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/DevopsCodeRepositoryFilterAttributes.java index 83a82f41707..439b84e6788 100644 --- a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/DevopsCodeRepositoryFilterAttributes.java +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/DevopsCodeRepositoryFilterAttributes.java @@ -22,10 +22,12 @@ public final class DevopsCodeRepositoryFilterAttributes extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"headRef", "fileFilter"}) - public DevopsCodeRepositoryFilterAttributes(String headRef, FileFilter fileFilter) { + @java.beans.ConstructorProperties({"headRef", "baseRef", "fileFilter"}) + public DevopsCodeRepositoryFilterAttributes( + String headRef, String baseRef, FileFilter fileFilter) { super(); this.headRef = headRef; + this.baseRef = baseRef; this.fileFilter = fileFilter; } @@ -47,6 +49,22 @@ public Builder headRef(String headRef) { this.__explicitlySet__.add("headRef"); return this; } + /** + * The target branch for pull requests; not applicable for push requests. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("baseRef") + private String baseRef; + + /** + * The target branch for pull requests; not applicable for push requests. + * @param baseRef the value to set + * @return this builder + **/ + public Builder baseRef(String baseRef) { + this.baseRef = baseRef; + this.__explicitlySet__.add("baseRef"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("fileFilter") private FileFilter fileFilter; @@ -62,7 +80,8 @@ public Builder fileFilter(FileFilter fileFilter) { public DevopsCodeRepositoryFilterAttributes build() { DevopsCodeRepositoryFilterAttributes model = - new DevopsCodeRepositoryFilterAttributes(this.headRef, this.fileFilter); + new DevopsCodeRepositoryFilterAttributes( + this.headRef, this.baseRef, this.fileFilter); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -74,6 +93,9 @@ public Builder copy(DevopsCodeRepositoryFilterAttributes model) { if (model.wasPropertyExplicitlySet("headRef")) { this.headRef(model.getHeadRef()); } + if (model.wasPropertyExplicitlySet("baseRef")) { + this.baseRef(model.getBaseRef()); + } if (model.wasPropertyExplicitlySet("fileFilter")) { this.fileFilter(model.getFileFilter()); } @@ -106,6 +128,20 @@ public String getHeadRef() { return headRef; } + /** + * The target branch for pull requests; not applicable for push requests. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("baseRef") + private final String baseRef; + + /** + * The target branch for pull requests; not applicable for push requests. + * @return the value + **/ + public String getBaseRef() { + return baseRef; + } + @com.fasterxml.jackson.annotation.JsonProperty("fileFilter") private final FileFilter fileFilter; @@ -128,6 +164,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("DevopsCodeRepositoryFilterAttributes("); sb.append("super=").append(super.toString()); sb.append("headRef=").append(String.valueOf(this.headRef)); + sb.append(", baseRef=").append(String.valueOf(this.baseRef)); sb.append(", fileFilter=").append(String.valueOf(this.fileFilter)); sb.append(")"); return sb.toString(); @@ -144,6 +181,7 @@ public boolean equals(Object o) { DevopsCodeRepositoryFilterAttributes other = (DevopsCodeRepositoryFilterAttributes) o; return java.util.Objects.equals(this.headRef, other.headRef) + && java.util.Objects.equals(this.baseRef, other.baseRef) && java.util.Objects.equals(this.fileFilter, other.fileFilter) && super.equals(other); } @@ -153,6 +191,7 @@ public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.headRef == null ? 43 : this.headRef.hashCode()); + result = (result * PRIME) + (this.baseRef == null ? 43 : this.baseRef.hashCode()); result = (result * PRIME) + (this.fileFilter == null ? 43 : this.fileFilter.hashCode()); result = (result * PRIME) + super.hashCode(); return result; diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ExecuteMergePullRequestDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ExecuteMergePullRequestDetails.java new file mode 100644 index 00000000000..36ddf295899 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ExecuteMergePullRequestDetails.java @@ -0,0 +1,256 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The information about the merge. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExecuteMergePullRequestDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "actionType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExecuteMergePullRequestDetails extends MergePullRequestDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The commit message to be shown for this pull request in the destination branch after merge is done. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitMessage") + private String commitMessage; + + /** + * The commit message to be shown for this pull request in the destination branch after merge is done. + * @param commitMessage the value to set + * @return this builder + **/ + public Builder commitMessage(String commitMessage) { + this.commitMessage = commitMessage; + this.__explicitlySet__.add("commitMessage"); + return this; + } + /** + * the strategy of merging. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mergeStrategy") + private MergeStrategy mergeStrategy; + + /** + * the strategy of merging. + * @param mergeStrategy the value to set + * @return this builder + **/ + public Builder mergeStrategy(MergeStrategy mergeStrategy) { + this.mergeStrategy = mergeStrategy; + this.__explicitlySet__.add("mergeStrategy"); + return this; + } + /** + * What needs to happen after the merge is done successfully. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("postMergeAction") + private PostMergeAction postMergeAction; + + /** + * What needs to happen after the merge is done successfully. + * @param postMergeAction the value to set + * @return this builder + **/ + public Builder postMergeAction(PostMergeAction postMergeAction) { + this.postMergeAction = postMergeAction; + this.__explicitlySet__.add("postMergeAction"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExecuteMergePullRequestDetails build() { + ExecuteMergePullRequestDetails model = + new ExecuteMergePullRequestDetails( + this.commitMessage, this.mergeStrategy, this.postMergeAction); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExecuteMergePullRequestDetails model) { + if (model.wasPropertyExplicitlySet("commitMessage")) { + this.commitMessage(model.getCommitMessage()); + } + if (model.wasPropertyExplicitlySet("mergeStrategy")) { + this.mergeStrategy(model.getMergeStrategy()); + } + if (model.wasPropertyExplicitlySet("postMergeAction")) { + this.postMergeAction(model.getPostMergeAction()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ExecuteMergePullRequestDetails( + String commitMessage, MergeStrategy mergeStrategy, PostMergeAction postMergeAction) { + super(); + this.commitMessage = commitMessage; + this.mergeStrategy = mergeStrategy; + this.postMergeAction = postMergeAction; + } + + /** + * The commit message to be shown for this pull request in the destination branch after merge is done. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitMessage") + private final String commitMessage; + + /** + * The commit message to be shown for this pull request in the destination branch after merge is done. + * @return the value + **/ + public String getCommitMessage() { + return commitMessage; + } + + /** + * the strategy of merging. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mergeStrategy") + private final MergeStrategy mergeStrategy; + + /** + * the strategy of merging. + * @return the value + **/ + public MergeStrategy getMergeStrategy() { + return mergeStrategy; + } + + /** + * What needs to happen after the merge is done successfully. + **/ + public enum PostMergeAction { + DeleteSourceBranch("DELETE_SOURCE_BRANCH"), + KeepSourceBranch("KEEP_SOURCE_BRANCH"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PostMergeAction v : PostMergeAction.values()) { + map.put(v.getValue(), v); + } + } + + PostMergeAction(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PostMergeAction create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid PostMergeAction: " + key); + } + }; + /** + * What needs to happen after the merge is done successfully. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("postMergeAction") + private final PostMergeAction postMergeAction; + + /** + * What needs to happen after the merge is done successfully. + * @return the value + **/ + public PostMergeAction getPostMergeAction() { + return postMergeAction; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExecuteMergePullRequestDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", commitMessage=").append(String.valueOf(this.commitMessage)); + sb.append(", mergeStrategy=").append(String.valueOf(this.mergeStrategy)); + sb.append(", postMergeAction=").append(String.valueOf(this.postMergeAction)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExecuteMergePullRequestDetails)) { + return false; + } + + ExecuteMergePullRequestDetails other = (ExecuteMergePullRequestDetails) o; + return java.util.Objects.equals(this.commitMessage, other.commitMessage) + && java.util.Objects.equals(this.mergeStrategy, other.mergeStrategy) + && java.util.Objects.equals(this.postMergeAction, other.postMergeAction) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.commitMessage == null ? 43 : this.commitMessage.hashCode()); + result = + (result * PRIME) + + (this.mergeStrategy == null ? 43 : this.mergeStrategy.hashCode()); + result = + (result * PRIME) + + (this.postMergeAction == null ? 43 : this.postMergeAction.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ForkSyncStatusCollection.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ForkSyncStatusCollection.java new file mode 100644 index 00000000000..6d3cee1de33 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ForkSyncStatusCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * A collection of Fork Sync Status summaries. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ForkSyncStatusCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ForkSyncStatusCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ForkSyncStatusCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of fork sync status objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of fork sync status objects. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ForkSyncStatusCollection build() { + ForkSyncStatusCollection model = new ForkSyncStatusCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ForkSyncStatusCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of fork sync status objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of fork sync status objects. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ForkSyncStatusCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ForkSyncStatusCollection)) { + return false; + } + + ForkSyncStatusCollection other = (ForkSyncStatusCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ForkSyncStatusSummary.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ForkSyncStatusSummary.java new file mode 100644 index 00000000000..6b04725850b --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ForkSyncStatusSummary.java @@ -0,0 +1,260 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Object that contains the sync status for a specific branch name. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ForkSyncStatusSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ForkSyncStatusSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"syncStatus", "repositoryId", "branchName"}) + public ForkSyncStatusSummary(SyncStatus syncStatus, String repositoryId, String branchName) { + super(); + this.syncStatus = syncStatus; + this.repositoryId = repositoryId; + this.branchName = branchName; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Sync status for the provided branch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("syncStatus") + private SyncStatus syncStatus; + + /** + * Sync status for the provided branch. + * @param syncStatus the value to set + * @return this builder + **/ + public Builder syncStatus(SyncStatus syncStatus) { + this.syncStatus = syncStatus; + this.__explicitlySet__.add("syncStatus"); + return this; + } + /** + * The OCID of the child repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("repositoryId") + private String repositoryId; + + /** + * The OCID of the child repository. + * @param repositoryId the value to set + * @return this builder + **/ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + this.__explicitlySet__.add("repositoryId"); + return this; + } + /** + * The branch in the child repository we are checking the sync status of. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("branchName") + private String branchName; + + /** + * The branch in the child repository we are checking the sync status of. + * @param branchName the value to set + * @return this builder + **/ + public Builder branchName(String branchName) { + this.branchName = branchName; + this.__explicitlySet__.add("branchName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ForkSyncStatusSummary build() { + ForkSyncStatusSummary model = + new ForkSyncStatusSummary(this.syncStatus, this.repositoryId, this.branchName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ForkSyncStatusSummary model) { + if (model.wasPropertyExplicitlySet("syncStatus")) { + this.syncStatus(model.getSyncStatus()); + } + if (model.wasPropertyExplicitlySet("repositoryId")) { + this.repositoryId(model.getRepositoryId()); + } + if (model.wasPropertyExplicitlySet("branchName")) { + this.branchName(model.getBranchName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Sync status for the provided branch. + **/ + public enum SyncStatus { + InSync("IN_SYNC"), + SyncInProgress("SYNC_IN_PROGRESS"), + OutOfSync("OUT_OF_SYNC"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SyncStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SyncStatus v : SyncStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + SyncStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SyncStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'SyncStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Sync status for the provided branch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("syncStatus") + private final SyncStatus syncStatus; + + /** + * Sync status for the provided branch. + * @return the value + **/ + public SyncStatus getSyncStatus() { + return syncStatus; + } + + /** + * The OCID of the child repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("repositoryId") + private final String repositoryId; + + /** + * The OCID of the child repository. + * @return the value + **/ + public String getRepositoryId() { + return repositoryId; + } + + /** + * The branch in the child repository we are checking the sync status of. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("branchName") + private final String branchName; + + /** + * The branch in the child repository we are checking the sync status of. + * @return the value + **/ + public String getBranchName() { + return branchName; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ForkSyncStatusSummary("); + sb.append("super=").append(super.toString()); + sb.append("syncStatus=").append(String.valueOf(this.syncStatus)); + sb.append(", repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(", branchName=").append(String.valueOf(this.branchName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ForkSyncStatusSummary)) { + return false; + } + + ForkSyncStatusSummary other = (ForkSyncStatusSummary) o; + return java.util.Objects.equals(this.syncStatus, other.syncStatus) + && java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals(this.branchName, other.branchName) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.syncStatus == null ? 43 : this.syncStatus.hashCode()); + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = (result * PRIME) + (this.branchName == null ? 43 : this.branchName.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/GenericArtifactLocationDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/GenericArtifactLocationDetails.java new file mode 100644 index 00000000000..d77d9635fb3 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/GenericArtifactLocationDetails.java @@ -0,0 +1,112 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Location where artifact is uploaded for user access. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "storageType", + defaultImpl = GenericArtifactLocationDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ObjectStorageGenericArtifactLocationDetails.class, + name = "OBJECT_STORAGE" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class GenericArtifactLocationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected GenericArtifactLocationDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("GenericArtifactLocationDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GenericArtifactLocationDetails)) { + return false; + } + + GenericArtifactLocationDetails other = (GenericArtifactLocationDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Storage source like ObjectStorage, etc. + **/ + public enum StorageType { + ObjectStorage("OBJECT_STORAGE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (StorageType v : StorageType.values()) { + map.put(v.getValue(), v); + } + } + + StorageType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static StorageType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid StorageType: " + key); + } + }; +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/GenericArtifacts.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/GenericArtifacts.java new file mode 100644 index 00000000000..c8d2eb76793 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/GenericArtifacts.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Details of artifact generated via pipeline run + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = GenericArtifacts.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "outputType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class GenericArtifacts extends StageOutput { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private String stepName; + + public Builder stepName(String stepName) { + this.stepName = stepName; + this.__explicitlySet__.add("stepName"); + return this; + } + /** + * Name of artifact. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Name of artifact. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("locationDetails") + private GenericArtifactLocationDetails locationDetails; + + public Builder locationDetails(GenericArtifactLocationDetails locationDetails) { + this.locationDetails = locationDetails; + this.__explicitlySet__.add("locationDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public GenericArtifacts build() { + GenericArtifacts model = + new GenericArtifacts(this.stepName, this.name, this.locationDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(GenericArtifacts model) { + if (model.wasPropertyExplicitlySet("stepName")) { + this.stepName(model.getStepName()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("locationDetails")) { + this.locationDetails(model.getLocationDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public GenericArtifacts( + String stepName, String name, GenericArtifactLocationDetails locationDetails) { + super(stepName); + this.name = name; + this.locationDetails = locationDetails; + } + + /** + * Name of artifact. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name of artifact. + * @return the value + **/ + public String getName() { + return name; + } + + @com.fasterxml.jackson.annotation.JsonProperty("locationDetails") + private final GenericArtifactLocationDetails locationDetails; + + public GenericArtifactLocationDetails getLocationDetails() { + return locationDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("GenericArtifacts("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", locationDetails=").append(String.valueOf(this.locationDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GenericArtifacts)) { + return false; + } + + GenericArtifacts other = (GenericArtifacts) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.locationDetails, other.locationDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = + (result * PRIME) + + (this.locationDetails == null ? 43 : this.locationDetails.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergeCheck.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergeCheck.java new file mode 100644 index 00000000000..5e978a47607 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergeCheck.java @@ -0,0 +1,132 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Merge Check summary + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type", + defaultImpl = MergeCheck.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = BuildMergeCheck.class, + name = "BUILD" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ConflictMergeCheck.class, + name = "CONFLICT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ApprovalRuleMergeCheck.class, + name = "APPROVAL_RULE" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class MergeCheck extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected MergeCheck() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MergeCheck("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MergeCheck)) { + return false; + } + + MergeCheck other = (MergeCheck) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * the type of this merge check. + **/ + public enum Type { + Conflict("CONFLICT"), + ApprovalRule("APPROVAL_RULE"), + Build("BUILD"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergeCheckCollection.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergeCheckCollection.java new file mode 100644 index 00000000000..d12285773f0 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergeCheckCollection.java @@ -0,0 +1,258 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * list of merge checks. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MergeCheckCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MergeCheckCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items", "timeValidated"}) + public MergeCheckCollection(java.util.List items, java.util.Date timeValidated) { + super(); + this.items = items; + this.timeValidated = timeValidated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of pullRequest mergeCheck objects. + * Example: {"items": [{ "type" : "CONFLICT(ENUM values)", + * "status" : "FAILED(ENUM values)"}, + * {"type": "APPROVAL_RULE(ENUM VALUE)", + * "ruleName": "rule 1", + * "status" : "NEEDS_APPROVAL(ENUM values)", + * "totalApprovalCount":"5", + * "currentApprovalCount":"1", + * "reviewers":[], + * "level": "PROJECT/REPOSITORY(ENUM values)"}, + * {"type": "APPROVAL_RULE(ENUM VALUE)", + * "ruleName": "rule 2", + * "status" : "SUCCEEDED(ENUM values)", + * "totalApprovalCount":"5", + * "currentApprovalCount":"5", + * "reviewers":[], + * "level": "PROJECT/REPOSITORY(ENUM values)"} , + * {"type": "BUILD(ENUM VALUE)", + * "pipelineId": "PipelineOCID", + * "buildRunId": "BuildRunOCID", + * "status" : "SUCCEEDED/PENDING/FAIlED/IN-PROGRESS(ENUM values)"} + * ]} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of pullRequest mergeCheck objects. + * Example: {"items": [{ "type" : "CONFLICT(ENUM values)", + * "status" : "FAILED(ENUM values)"}, + * {"type": "APPROVAL_RULE(ENUM VALUE)", + * "ruleName": "rule 1", + * "status" : "NEEDS_APPROVAL(ENUM values)", + * "totalApprovalCount":"5", + * "currentApprovalCount":"1", + * "reviewers":[], + * "level": "PROJECT/REPOSITORY(ENUM values)"}, + * {"type": "APPROVAL_RULE(ENUM VALUE)", + * "ruleName": "rule 2", + * "status" : "SUCCEEDED(ENUM values)", + * "totalApprovalCount":"5", + * "currentApprovalCount":"5", + * "reviewers":[], + * "level": "PROJECT/REPOSITORY(ENUM values)"} , + * {"type": "BUILD(ENUM VALUE)", + * "pipelineId": "PipelineOCID", + * "buildRunId": "BuildRunOCID", + * "status" : "SUCCEEDED/PENDING/FAIlED/IN-PROGRESS(ENUM values)"} + * ]} + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + /** + * The time Stamp of the validation check. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeValidated") + private java.util.Date timeValidated; + + /** + * The time Stamp of the validation check. + * @param timeValidated the value to set + * @return this builder + **/ + public Builder timeValidated(java.util.Date timeValidated) { + this.timeValidated = timeValidated; + this.__explicitlySet__.add("timeValidated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MergeCheckCollection build() { + MergeCheckCollection model = new MergeCheckCollection(this.items, this.timeValidated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MergeCheckCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + if (model.wasPropertyExplicitlySet("timeValidated")) { + this.timeValidated(model.getTimeValidated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of pullRequest mergeCheck objects. + * Example: {"items": [{ "type" : "CONFLICT(ENUM values)", + * "status" : "FAILED(ENUM values)"}, + * {"type": "APPROVAL_RULE(ENUM VALUE)", + * "ruleName": "rule 1", + * "status" : "NEEDS_APPROVAL(ENUM values)", + * "totalApprovalCount":"5", + * "currentApprovalCount":"1", + * "reviewers":[], + * "level": "PROJECT/REPOSITORY(ENUM values)"}, + * {"type": "APPROVAL_RULE(ENUM VALUE)", + * "ruleName": "rule 2", + * "status" : "SUCCEEDED(ENUM values)", + * "totalApprovalCount":"5", + * "currentApprovalCount":"5", + * "reviewers":[], + * "level": "PROJECT/REPOSITORY(ENUM values)"} , + * {"type": "BUILD(ENUM VALUE)", + * "pipelineId": "PipelineOCID", + * "buildRunId": "BuildRunOCID", + * "status" : "SUCCEEDED/PENDING/FAIlED/IN-PROGRESS(ENUM values)"} + * ]} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of pullRequest mergeCheck objects. + * Example: {"items": [{ "type" : "CONFLICT(ENUM values)", + * "status" : "FAILED(ENUM values)"}, + * {"type": "APPROVAL_RULE(ENUM VALUE)", + * "ruleName": "rule 1", + * "status" : "NEEDS_APPROVAL(ENUM values)", + * "totalApprovalCount":"5", + * "currentApprovalCount":"1", + * "reviewers":[], + * "level": "PROJECT/REPOSITORY(ENUM values)"}, + * {"type": "APPROVAL_RULE(ENUM VALUE)", + * "ruleName": "rule 2", + * "status" : "SUCCEEDED(ENUM values)", + * "totalApprovalCount":"5", + * "currentApprovalCount":"5", + * "reviewers":[], + * "level": "PROJECT/REPOSITORY(ENUM values)"} , + * {"type": "BUILD(ENUM VALUE)", + * "pipelineId": "PipelineOCID", + * "buildRunId": "BuildRunOCID", + * "status" : "SUCCEEDED/PENDING/FAIlED/IN-PROGRESS(ENUM values)"} + * ]} + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + /** + * The time Stamp of the validation check. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeValidated") + private final java.util.Date timeValidated; + + /** + * The time Stamp of the validation check. + * @return the value + **/ + public java.util.Date getTimeValidated() { + return timeValidated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MergeCheckCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(", timeValidated=").append(String.valueOf(this.timeValidated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MergeCheckCollection)) { + return false; + } + + MergeCheckCollection other = (MergeCheckCollection) o; + return java.util.Objects.equals(this.items, other.items) + && java.util.Objects.equals(this.timeValidated, other.timeValidated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = + (result * PRIME) + + (this.timeValidated == null ? 43 : this.timeValidated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergeCheckSettingsValue.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergeCheckSettingsValue.java new file mode 100644 index 00000000000..9f9d15875ef --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergeCheckSettingsValue.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Value for a given merge check setting. Can be ENABLED or DISABLED. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public enum MergeCheckSettingsValue { + Enabled("ENABLED"), + Disabled("DISABLED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(MergeCheckSettingsValue.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (MergeCheckSettingsValue v : MergeCheckSettingsValue.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + MergeCheckSettingsValue(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static MergeCheckSettingsValue create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'MergeCheckSettingsValue', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergeChecks.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergeChecks.java new file mode 100644 index 00000000000..1bf972a6c6a --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergeChecks.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Criteria which must be satisfied to merge a pull request. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = MergeChecks.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MergeChecks extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"lastBuildSucceeded"}) + public MergeChecks(MergeCheckSettingsValue lastBuildSucceeded) { + super(); + this.lastBuildSucceeded = lastBuildSucceeded; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Indicates whether or not a pull request must have a successful build run and no queued builds before it can be merged + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastBuildSucceeded") + private MergeCheckSettingsValue lastBuildSucceeded; + + /** + * Indicates whether or not a pull request must have a successful build run and no queued builds before it can be merged + * @param lastBuildSucceeded the value to set + * @return this builder + **/ + public Builder lastBuildSucceeded(MergeCheckSettingsValue lastBuildSucceeded) { + this.lastBuildSucceeded = lastBuildSucceeded; + this.__explicitlySet__.add("lastBuildSucceeded"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MergeChecks build() { + MergeChecks model = new MergeChecks(this.lastBuildSucceeded); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MergeChecks model) { + if (model.wasPropertyExplicitlySet("lastBuildSucceeded")) { + this.lastBuildSucceeded(model.getLastBuildSucceeded()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Indicates whether or not a pull request must have a successful build run and no queued builds before it can be merged + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastBuildSucceeded") + private final MergeCheckSettingsValue lastBuildSucceeded; + + /** + * Indicates whether or not a pull request must have a successful build run and no queued builds before it can be merged + * @return the value + **/ + public MergeCheckSettingsValue getLastBuildSucceeded() { + return lastBuildSucceeded; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MergeChecks("); + sb.append("super=").append(super.toString()); + sb.append("lastBuildSucceeded=").append(String.valueOf(this.lastBuildSucceeded)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MergeChecks)) { + return false; + } + + MergeChecks other = (MergeChecks) o; + return java.util.Objects.equals(this.lastBuildSucceeded, other.lastBuildSucceeded) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.lastBuildSucceeded == null + ? 43 + : this.lastBuildSucceeded.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergePullRequestDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergePullRequestDetails.java new file mode 100644 index 00000000000..201c0339b08 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergePullRequestDetails.java @@ -0,0 +1,116 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * determines if this is a merge or a validation. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "actionType", + defaultImpl = MergePullRequestDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ExecuteMergePullRequestDetails.class, + name = "EXECUTE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ValidateMergePullRequestDetails.class, + name = "VALIDATE" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class MergePullRequestDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected MergePullRequestDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MergePullRequestDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MergePullRequestDetails)) { + return false; + } + + MergePullRequestDetails other = (MergePullRequestDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * the type of action for this merge. + **/ + public enum ActionType { + Execute("EXECUTE"), + Validate("VALIDATE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActionType v : ActionType.values()) { + map.put(v.getValue(), v); + } + } + + ActionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ActionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ActionType: " + key); + } + }; +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergeSettings.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergeSettings.java new file mode 100644 index 00000000000..7146be16fd7 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergeSettings.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Enabled and disabled merge strategies for a project or repository, also contains a default strategy. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = MergeSettings.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MergeSettings extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"defaultMergeStrategy", "allowedMergeStrategies"}) + public MergeSettings( + MergeStrategy defaultMergeStrategy, + java.util.List allowedMergeStrategies) { + super(); + this.defaultMergeStrategy = defaultMergeStrategy; + this.allowedMergeStrategies = allowedMergeStrategies; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Default type of merge strategy associated with the a Project or Repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("defaultMergeStrategy") + private MergeStrategy defaultMergeStrategy; + + /** + * Default type of merge strategy associated with the a Project or Repository. + * @param defaultMergeStrategy the value to set + * @return this builder + **/ + public Builder defaultMergeStrategy(MergeStrategy defaultMergeStrategy) { + this.defaultMergeStrategy = defaultMergeStrategy; + this.__explicitlySet__.add("defaultMergeStrategy"); + return this; + } + /** + * List of merge strategies which are allowed for a Project or Repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("allowedMergeStrategies") + private java.util.List allowedMergeStrategies; + + /** + * List of merge strategies which are allowed for a Project or Repository. + * @param allowedMergeStrategies the value to set + * @return this builder + **/ + public Builder allowedMergeStrategies( + java.util.List allowedMergeStrategies) { + this.allowedMergeStrategies = allowedMergeStrategies; + this.__explicitlySet__.add("allowedMergeStrategies"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MergeSettings build() { + MergeSettings model = + new MergeSettings(this.defaultMergeStrategy, this.allowedMergeStrategies); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MergeSettings model) { + if (model.wasPropertyExplicitlySet("defaultMergeStrategy")) { + this.defaultMergeStrategy(model.getDefaultMergeStrategy()); + } + if (model.wasPropertyExplicitlySet("allowedMergeStrategies")) { + this.allowedMergeStrategies(model.getAllowedMergeStrategies()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Default type of merge strategy associated with the a Project or Repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("defaultMergeStrategy") + private final MergeStrategy defaultMergeStrategy; + + /** + * Default type of merge strategy associated with the a Project or Repository. + * @return the value + **/ + public MergeStrategy getDefaultMergeStrategy() { + return defaultMergeStrategy; + } + + /** + * List of merge strategies which are allowed for a Project or Repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("allowedMergeStrategies") + private final java.util.List allowedMergeStrategies; + + /** + * List of merge strategies which are allowed for a Project or Repository. + * @return the value + **/ + public java.util.List getAllowedMergeStrategies() { + return allowedMergeStrategies; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MergeSettings("); + sb.append("super=").append(super.toString()); + sb.append("defaultMergeStrategy=").append(String.valueOf(this.defaultMergeStrategy)); + sb.append(", allowedMergeStrategies=").append(String.valueOf(this.allowedMergeStrategies)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MergeSettings)) { + return false; + } + + MergeSettings other = (MergeSettings) o; + return java.util.Objects.equals(this.defaultMergeStrategy, other.defaultMergeStrategy) + && java.util.Objects.equals( + this.allowedMergeStrategies, other.allowedMergeStrategies) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.defaultMergeStrategy == null + ? 43 + : this.defaultMergeStrategy.hashCode()); + result = + (result * PRIME) + + (this.allowedMergeStrategies == null + ? 43 + : this.allowedMergeStrategies.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergeStrategy.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergeStrategy.java new file mode 100644 index 00000000000..20fb384ebe2 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MergeStrategy.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Merge strategies which can be enabled or disabled for a repository or project. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public enum MergeStrategy { + MergeCommit("MERGE_COMMIT"), + FastForward("FAST_FORWARD"), + FastForwardOnly("FAST_FORWARD_ONLY"), + RebaseAndMerge("REBASE_AND_MERGE"), + RebaseAndFastForward("REBASE_AND_FAST_FORWARD"), + Squash("SQUASH"), + SquashFastForwardOnly("SQUASH_FAST_FORWARD_ONLY"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(MergeStrategy.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (MergeStrategy v : MergeStrategy.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + MergeStrategy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static MergeStrategy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'MergeStrategy', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MetricName.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MetricName.java new file mode 100644 index 00000000000..737d9164a81 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MetricName.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The metric type: + * COMMITS - Represents the number of commits. + * LINES_ADDED - Represents the number of lines of code added. + * LINES_DELETED - Represents the number of lines of code deleted. + * PULL_REQUEST_CREATED - Represents the number of pull requests which is in created/ open state. + * PULL_REQUEST_MERGED - Represents the number of pull requests which is in merging/ merged state. + * PULL_REQUEST_DECLINED - Represents the number of pull requests which is in declined state. + * PULL_REQUEST_REVIEW_START_DURATION_IN_DAYS - Represents the time from when a pull request is created to the first comment on the pull request. + * PULL_REQUEST_REVIEW_DURATION_IN_DAYS - Represents the time from the first comment on the pull request to when the pull request is merged or closed. + * PULL_REQUEST_APPROVED - Represents the number of pull requests which is approved by the user when the pull request is merged. + * PULL_REQUEST_REVIEWED - Represents the number of pull requests which has been commented on. + * PULL_REQUEST_COMMENTS - Represents the total number of comments given across different pull requests. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public enum MetricName { + Commits("COMMITS"), + LinesAdded("LINES_ADDED"), + LinesDeleted("LINES_DELETED"), + PullRequestCreated("PULL_REQUEST_CREATED"), + PullRequestMerged("PULL_REQUEST_MERGED"), + PullRequestDeclined("PULL_REQUEST_DECLINED"), + PullRequestReviewStartDurationInDays("PULL_REQUEST_REVIEW_START_DURATION_IN_DAYS"), + PullRequestReviewDurationInDays("PULL_REQUEST_REVIEW_DURATION_IN_DAYS"), + PullRequestApproved("PULL_REQUEST_APPROVED"), + PullRequestReviewed("PULL_REQUEST_REVIEWED"), + PullRequestComments("PULL_REQUEST_COMMENTS"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(MetricName.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (MetricName v : MetricName.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + MetricName(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static MetricName create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'MetricName', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MirrorRepositoryConfig.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MirrorRepositoryConfig.java index 4e20c963479..7df94790f21 100644 --- a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MirrorRepositoryConfig.java +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/MirrorRepositoryConfig.java @@ -34,13 +34,13 @@ public MirrorRepositoryConfig( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * Upstream git repository connection identifer. + * Upstream git repository connection identifier. **/ @com.fasterxml.jackson.annotation.JsonProperty("connectorId") private String connectorId; /** - * Upstream git repository connection identifer. + * Upstream git repository connection identifier. * @param connectorId the value to set * @return this builder **/ @@ -115,13 +115,13 @@ public Builder toBuilder() { } /** - * Upstream git repository connection identifer. + * Upstream git repository connection identifier. **/ @com.fasterxml.jackson.annotation.JsonProperty("connectorId") private final String connectorId; /** - * Upstream git repository connection identifer. + * Upstream git repository connection identifier. * @return the value **/ public String getConnectorId() { diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ObjectStorageGenericArtifactLocationDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ObjectStorageGenericArtifactLocationDetails.java new file mode 100644 index 00000000000..09c3a034c74 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ObjectStorageGenericArtifactLocationDetails.java @@ -0,0 +1,254 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * ObjectStorage bucket details where artifact is located. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ObjectStorageGenericArtifactLocationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "storageType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ObjectStorageGenericArtifactLocationDetails + extends GenericArtifactLocationDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique namespace in the tenancy which contains the bucket + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespace") + private String namespace; + + /** + * Unique namespace in the tenancy which contains the bucket + * @param namespace the value to set + * @return this builder + **/ + public Builder namespace(String namespace) { + this.namespace = namespace; + this.__explicitlySet__.add("namespace"); + return this; + } + /** + * Specifies the Object Storage bucket. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private String bucketName; + + /** + * Specifies the Object Storage bucket. + * @param bucketName the value to set + * @return this builder + **/ + public Builder bucketName(String bucketName) { + this.bucketName = bucketName; + this.__explicitlySet__.add("bucketName"); + return this; + } + /** + * Specifies the name of object inside the bucket. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectName") + private String objectName; + + /** + * Specifies the name of object inside the bucket. + * @param objectName the value to set + * @return this builder + **/ + public Builder objectName(String objectName) { + this.objectName = objectName; + this.__explicitlySet__.add("objectName"); + return this; + } + /** + * Region identifier. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("region") + private String region; + + /** + * Region identifier. + * @param region the value to set + * @return this builder + **/ + public Builder region(String region) { + this.region = region; + this.__explicitlySet__.add("region"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ObjectStorageGenericArtifactLocationDetails build() { + ObjectStorageGenericArtifactLocationDetails model = + new ObjectStorageGenericArtifactLocationDetails( + this.namespace, this.bucketName, this.objectName, this.region); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ObjectStorageGenericArtifactLocationDetails model) { + if (model.wasPropertyExplicitlySet("namespace")) { + this.namespace(model.getNamespace()); + } + if (model.wasPropertyExplicitlySet("bucketName")) { + this.bucketName(model.getBucketName()); + } + if (model.wasPropertyExplicitlySet("objectName")) { + this.objectName(model.getObjectName()); + } + if (model.wasPropertyExplicitlySet("region")) { + this.region(model.getRegion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ObjectStorageGenericArtifactLocationDetails( + String namespace, String bucketName, String objectName, String region) { + super(); + this.namespace = namespace; + this.bucketName = bucketName; + this.objectName = objectName; + this.region = region; + } + + /** + * Unique namespace in the tenancy which contains the bucket + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespace") + private final String namespace; + + /** + * Unique namespace in the tenancy which contains the bucket + * @return the value + **/ + public String getNamespace() { + return namespace; + } + + /** + * Specifies the Object Storage bucket. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private final String bucketName; + + /** + * Specifies the Object Storage bucket. + * @return the value + **/ + public String getBucketName() { + return bucketName; + } + + /** + * Specifies the name of object inside the bucket. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectName") + private final String objectName; + + /** + * Specifies the name of object inside the bucket. + * @return the value + **/ + public String getObjectName() { + return objectName; + } + + /** + * Region identifier. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("region") + private final String region; + + /** + * Region identifier. + * @return the value + **/ + public String getRegion() { + return region; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ObjectStorageGenericArtifactLocationDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", namespace=").append(String.valueOf(this.namespace)); + sb.append(", bucketName=").append(String.valueOf(this.bucketName)); + sb.append(", objectName=").append(String.valueOf(this.objectName)); + sb.append(", region=").append(String.valueOf(this.region)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ObjectStorageGenericArtifactLocationDetails)) { + return false; + } + + ObjectStorageGenericArtifactLocationDetails other = + (ObjectStorageGenericArtifactLocationDetails) o; + return java.util.Objects.equals(this.namespace, other.namespace) + && java.util.Objects.equals(this.bucketName, other.bucketName) + && java.util.Objects.equals(this.objectName, other.objectName) + && java.util.Objects.equals(this.region, other.region) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.namespace == null ? 43 : this.namespace.hashCode()); + result = (result * PRIME) + (this.bucketName == null ? 43 : this.bucketName.hashCode()); + result = (result * PRIME) + (this.objectName == null ? 43 : this.objectName.hashCode()); + result = (result * PRIME) + (this.region == null ? 43 : this.region.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/OperationType.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/OperationType.java index aa7a1915299..a379f617c1e 100644 --- a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/OperationType.java +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/OperationType.java @@ -45,8 +45,15 @@ public enum OperationType { UpdateRepository("UPDATE_REPOSITORY"), DeleteRepository("DELETE_REPOSITORY"), MirrorRepository("MIRROR_REPOSITORY"), + ForkRepository("FORK_REPOSITORY"), + SyncForkRepository("SYNC_FORK_REPOSITORY"), ScheduleCascadingProjectDeletion("SCHEDULE_CASCADING_PROJECT_DELETION"), CancelScheduledCascadingProjectDeletion("CANCEL_SCHEDULED_CASCADING_PROJECT_DELETION"), + CreatePullRequest("CREATE_PULL_REQUEST"), + UpdatePullRequest("UPDATE_PULL_REQUEST"), + DeletePullRequest("DELETE_PULL_REQUEST"), + MovePullRequest("MOVE_PULL_REQUEST"), + MergePullRequest("MERGE_PULL_REQUEST"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchInsertInstruction.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchInsertInstruction.java new file mode 100644 index 00000000000..3466bbc4dfb --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchInsertInstruction.java @@ -0,0 +1,277 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * An operation that inserts a value into an array, shifting array items as necessary and handling NOT_FOUND exceptions by creating the implied containing structure. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PatchInsertInstruction.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "operation" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchInsertInstruction extends PatchInstruction { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private String selection; + + public Builder selection(String selection) { + this.selection = selection; + this.__explicitlySet__.add("selection"); + return this; + } + /** + * A value to be inserted into the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private Object value; + + /** + * A value to be inserted into the target. + * @param value the value to set + * @return this builder + **/ + public Builder value(Object value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + /** + * A selection to be evaluated against the array for identifying a particular reference item within it, with the same format and semantics as {@code selection}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selectedItem") + private String selectedItem; + + /** + * A selection to be evaluated against the array for identifying a particular reference item within it, with the same format and semantics as {@code selection}. + * @param selectedItem the value to set + * @return this builder + **/ + public Builder selectedItem(String selectedItem) { + this.selectedItem = selectedItem; + this.__explicitlySet__.add("selectedItem"); + return this; + } + /** + * Where to insert the value, relative to the first item matched by {@code selectedItem}. + * If {@code selectedItem} is unspecified, then "BEFORE" specifies insertion at the first position in an array and "AFTER" specifies insertion at the last position. + * If {@code selectedItem} is specified but results in an empty selection, then both values specify insertion at the last position. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("position") + private Position position; + + /** + * Where to insert the value, relative to the first item matched by {@code selectedItem}. + * If {@code selectedItem} is unspecified, then "BEFORE" specifies insertion at the first position in an array and "AFTER" specifies insertion at the last position. + * If {@code selectedItem} is specified but results in an empty selection, then both values specify insertion at the last position. + * + * @param position the value to set + * @return this builder + **/ + public Builder position(Position position) { + this.position = position; + this.__explicitlySet__.add("position"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PatchInsertInstruction build() { + PatchInsertInstruction model = + new PatchInsertInstruction( + this.selection, this.value, this.selectedItem, this.position); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchInsertInstruction model) { + if (model.wasPropertyExplicitlySet("selection")) { + this.selection(model.getSelection()); + } + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + if (model.wasPropertyExplicitlySet("selectedItem")) { + this.selectedItem(model.getSelectedItem()); + } + if (model.wasPropertyExplicitlySet("position")) { + this.position(model.getPosition()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PatchInsertInstruction( + String selection, Object value, String selectedItem, Position position) { + super(selection); + this.value = value; + this.selectedItem = selectedItem; + this.position = position; + } + + /** + * A value to be inserted into the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final Object value; + + /** + * A value to be inserted into the target. + * @return the value + **/ + public Object getValue() { + return value; + } + + /** + * A selection to be evaluated against the array for identifying a particular reference item within it, with the same format and semantics as {@code selection}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selectedItem") + private final String selectedItem; + + /** + * A selection to be evaluated against the array for identifying a particular reference item within it, with the same format and semantics as {@code selection}. + * @return the value + **/ + public String getSelectedItem() { + return selectedItem; + } + + /** + * Where to insert the value, relative to the first item matched by {@code selectedItem}. + * If {@code selectedItem} is unspecified, then "BEFORE" specifies insertion at the first position in an array and "AFTER" specifies insertion at the last position. + * If {@code selectedItem} is specified but results in an empty selection, then both values specify insertion at the last position. + * + **/ + public enum Position { + Before("BEFORE"), + After("AFTER"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Position v : Position.values()) { + map.put(v.getValue(), v); + } + } + + Position(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Position create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Position: " + key); + } + }; + /** + * Where to insert the value, relative to the first item matched by {@code selectedItem}. + * If {@code selectedItem} is unspecified, then "BEFORE" specifies insertion at the first position in an array and "AFTER" specifies insertion at the last position. + * If {@code selectedItem} is specified but results in an empty selection, then both values specify insertion at the last position. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("position") + private final Position position; + + /** + * Where to insert the value, relative to the first item matched by {@code selectedItem}. + * If {@code selectedItem} is unspecified, then "BEFORE" specifies insertion at the first position in an array and "AFTER" specifies insertion at the last position. + * If {@code selectedItem} is specified but results in an empty selection, then both values specify insertion at the last position. + * + * @return the value + **/ + public Position getPosition() { + return position; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PatchInsertInstruction("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", value=").append(String.valueOf(this.value)); + sb.append(", selectedItem=").append(String.valueOf(this.selectedItem)); + sb.append(", position=").append(String.valueOf(this.position)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchInsertInstruction)) { + return false; + } + + PatchInsertInstruction other = (PatchInsertInstruction) o; + return java.util.Objects.equals(this.value, other.value) + && java.util.Objects.equals(this.selectedItem, other.selectedItem) + && java.util.Objects.equals(this.position, other.position) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + result = (result * PRIME) + (this.selectedItem == null ? 43 : this.selectedItem.hashCode()); + result = (result * PRIME) + (this.position == null ? 43 : this.position.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchInstruction.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchInstruction.java new file mode 100644 index 00000000000..1484ff8cb41 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchInstruction.java @@ -0,0 +1,163 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * A single instruction to be included as part of Patch request content. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "operation", + defaultImpl = PatchInstruction.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PatchMoveInstruction.class, + name = "MOVE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PatchRemoveInstruction.class, + name = "REMOVE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PatchReplaceInstruction.class, + name = "REPLACE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PatchInsertInstruction.class, + name = "INSERT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PatchRequireInstruction.class, + name = "REQUIRE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PatchMergeInstruction.class, + name = "MERGE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PatchProhibitInstruction.class, + name = "PROHIBIT" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class PatchInstruction extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"selection"}) + protected PatchInstruction(String selection) { + super(); + this.selection = selection; + } + + /** + * The set of values to which the operation applies as a [JMESPath expression](https://jmespath.org/specification.html) for evaluation against the context resource. + * An operation fails if the selection yields an exception, except as otherwise specified. + * Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private final String selection; + + /** + * The set of values to which the operation applies as a [JMESPath expression](https://jmespath.org/specification.html) for evaluation against the context resource. + * An operation fails if the selection yields an exception, except as otherwise specified. + * Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + * + * @return the value + **/ + public String getSelection() { + return selection; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PatchInstruction("); + sb.append("super=").append(super.toString()); + sb.append("selection=").append(String.valueOf(this.selection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchInstruction)) { + return false; + } + + PatchInstruction other = (PatchInstruction) o; + return java.util.Objects.equals(this.selection, other.selection) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.selection == null ? 43 : this.selection.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + **/ + public enum Operation { + Require("REQUIRE"), + Prohibit("PROHIBIT"), + Replace("REPLACE"), + Insert("INSERT"), + Remove("REMOVE"), + Move("MOVE"), + Merge("MERGE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Operation v : Operation.values()) { + map.put(v.getValue(), v); + } + } + + Operation(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Operation create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Operation: " + key); + } + }; +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchMergeInstruction.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchMergeInstruction.java new file mode 100644 index 00000000000..31c4c956b16 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchMergeInstruction.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * An operation that recursively updates items of the selection, or adding the value if the selection is empty. + * If the value is not an object, it is used directly, otherwise each key-value member is used + * to create or update a member of the same name in the target and the same process is applied recursively for each object-typed value + * (similar to [RFC 7396](https://tools.ietf.org/html/rfc7396#section-2) JSON Merge Patch, except that null values are copied + * rather than transformed into deletions). + * NOT_FOUND exceptions are handled by creating the implied containing structure. + * To avoid referential errors if an item's descendant is also in the selection, items of the selection are processed in order of decreasing depth. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PatchMergeInstruction.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "operation" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchMergeInstruction extends PatchInstruction { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private String selection; + + public Builder selection(String selection) { + this.selection = selection; + this.__explicitlySet__.add("selection"); + return this; + } + /** + * A value to be merged into the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private Object value; + + /** + * A value to be merged into the target. + * @param value the value to set + * @return this builder + **/ + public Builder value(Object value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PatchMergeInstruction build() { + PatchMergeInstruction model = new PatchMergeInstruction(this.selection, this.value); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchMergeInstruction model) { + if (model.wasPropertyExplicitlySet("selection")) { + this.selection(model.getSelection()); + } + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PatchMergeInstruction(String selection, Object value) { + super(selection); + this.value = value; + } + + /** + * A value to be merged into the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final Object value; + + /** + * A value to be merged into the target. + * @return the value + **/ + public Object getValue() { + return value; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PatchMergeInstruction("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", value=").append(String.valueOf(this.value)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchMergeInstruction)) { + return false; + } + + PatchMergeInstruction other = (PatchMergeInstruction) o; + return java.util.Objects.equals(this.value, other.value) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchMoveInstruction.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchMoveInstruction.java new file mode 100644 index 00000000000..90c68f438fd --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchMoveInstruction.java @@ -0,0 +1,242 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * An operation that "puts" values from elsewhere in the target, functionally equivalent to a single add and then a remove. + * The first item of the selection is replaced, or created if the selection is empty. + * NOT_FOUND exceptions in the selection are handled by creating the implied containing structure. + * This operation fails if the {@code from} selection yields any exceptions, or if an item is moved to any of its descendants. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PatchMoveInstruction.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "operation" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchMoveInstruction extends PatchInstruction { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private String selection; + + public Builder selection(String selection) { + this.selection = selection; + this.__explicitlySet__.add("selection"); + return this; + } + /** + * The selection that is to be moved, with the same format and semantics as {@code selection}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("from") + private String from; + + /** + * The selection that is to be moved, with the same format and semantics as {@code selection}. + * @param from the value to set + * @return this builder + **/ + public Builder from(String from) { + this.from = from; + this.__explicitlySet__.add("from"); + return this; + } + /** + * Where to insert the value in an array, relative to the first item in the selection. + * If there is no such item, then "BEFORE" specifies insertion at the first position in an array and "AFTER" specifies insertion at the last position. + * If the first item in the selection is not the child of an array, then this field has no effect. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("position") + private Position position; + + /** + * Where to insert the value in an array, relative to the first item in the selection. + * If there is no such item, then "BEFORE" specifies insertion at the first position in an array and "AFTER" specifies insertion at the last position. + * If the first item in the selection is not the child of an array, then this field has no effect. + * + * @param position the value to set + * @return this builder + **/ + public Builder position(Position position) { + this.position = position; + this.__explicitlySet__.add("position"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PatchMoveInstruction build() { + PatchMoveInstruction model = + new PatchMoveInstruction(this.selection, this.from, this.position); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchMoveInstruction model) { + if (model.wasPropertyExplicitlySet("selection")) { + this.selection(model.getSelection()); + } + if (model.wasPropertyExplicitlySet("from")) { + this.from(model.getFrom()); + } + if (model.wasPropertyExplicitlySet("position")) { + this.position(model.getPosition()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PatchMoveInstruction(String selection, String from, Position position) { + super(selection); + this.from = from; + this.position = position; + } + + /** + * The selection that is to be moved, with the same format and semantics as {@code selection}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("from") + private final String from; + + /** + * The selection that is to be moved, with the same format and semantics as {@code selection}. + * @return the value + **/ + public String getFrom() { + return from; + } + + /** + * Where to insert the value in an array, relative to the first item in the selection. + * If there is no such item, then "BEFORE" specifies insertion at the first position in an array and "AFTER" specifies insertion at the last position. + * If the first item in the selection is not the child of an array, then this field has no effect. + * + **/ + public enum Position { + At("AT"), + Before("BEFORE"), + After("AFTER"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Position v : Position.values()) { + map.put(v.getValue(), v); + } + } + + Position(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Position create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Position: " + key); + } + }; + /** + * Where to insert the value in an array, relative to the first item in the selection. + * If there is no such item, then "BEFORE" specifies insertion at the first position in an array and "AFTER" specifies insertion at the last position. + * If the first item in the selection is not the child of an array, then this field has no effect. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("position") + private final Position position; + + /** + * Where to insert the value in an array, relative to the first item in the selection. + * If there is no such item, then "BEFORE" specifies insertion at the first position in an array and "AFTER" specifies insertion at the last position. + * If the first item in the selection is not the child of an array, then this field has no effect. + * + * @return the value + **/ + public Position getPosition() { + return position; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PatchMoveInstruction("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", from=").append(String.valueOf(this.from)); + sb.append(", position=").append(String.valueOf(this.position)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchMoveInstruction)) { + return false; + } + + PatchMoveInstruction other = (PatchMoveInstruction) o; + return java.util.Objects.equals(this.from, other.from) + && java.util.Objects.equals(this.position, other.position) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.from == null ? 43 : this.from.hashCode()); + result = (result * PRIME) + (this.position == null ? 43 : this.position.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchProhibitInstruction.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchProhibitInstruction.java new file mode 100644 index 00000000000..ab6cfaf06cf --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchProhibitInstruction.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * A precondition operation that requires a selection to be empty, or optionally to be non-empty but include no item with a specified value + * (useful for asserting that a value does not exist before attempting to create it, avoiding accidental update). + * It fails if value is provided and the selection includes an item matching it, or if value is not provided and the selection is not empty, + * but ignores NOT_FOUND exceptions. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PatchProhibitInstruction.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "operation" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchProhibitInstruction extends PatchInstruction { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private String selection; + + public Builder selection(String selection) { + this.selection = selection; + this.__explicitlySet__.add("selection"); + return this; + } + /** + * A value to be compared against each item of the selection. + * If this value is an object, then it matches any item that would be unaffected by applying this value as a merge operation. + * Otherwise, it matches any item to which it is equal according to the rules of [JSON Schema](https://tools.ietf.org/html/draft-handrews-json-schema-00#section-4.2.3). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private Object value; + + /** + * A value to be compared against each item of the selection. + * If this value is an object, then it matches any item that would be unaffected by applying this value as a merge operation. + * Otherwise, it matches any item to which it is equal according to the rules of [JSON Schema](https://tools.ietf.org/html/draft-handrews-json-schema-00#section-4.2.3). + * + * @param value the value to set + * @return this builder + **/ + public Builder value(Object value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PatchProhibitInstruction build() { + PatchProhibitInstruction model = + new PatchProhibitInstruction(this.selection, this.value); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchProhibitInstruction model) { + if (model.wasPropertyExplicitlySet("selection")) { + this.selection(model.getSelection()); + } + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PatchProhibitInstruction(String selection, Object value) { + super(selection); + this.value = value; + } + + /** + * A value to be compared against each item of the selection. + * If this value is an object, then it matches any item that would be unaffected by applying this value as a merge operation. + * Otherwise, it matches any item to which it is equal according to the rules of [JSON Schema](https://tools.ietf.org/html/draft-handrews-json-schema-00#section-4.2.3). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final Object value; + + /** + * A value to be compared against each item of the selection. + * If this value is an object, then it matches any item that would be unaffected by applying this value as a merge operation. + * Otherwise, it matches any item to which it is equal according to the rules of [JSON Schema](https://tools.ietf.org/html/draft-handrews-json-schema-00#section-4.2.3). + * + * @return the value + **/ + public Object getValue() { + return value; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PatchProhibitInstruction("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", value=").append(String.valueOf(this.value)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchProhibitInstruction)) { + return false; + } + + PatchProhibitInstruction other = (PatchProhibitInstruction) o; + return java.util.Objects.equals(this.value, other.value) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchPullRequestDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchPullRequestDetails.java new file mode 100644 index 00000000000..8e0b1a7aaee --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchPullRequestDetails.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Pull request details to patch + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PatchPullRequestDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchPullRequestDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public PatchPullRequestDetails(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of patch instructions + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of patch instructions + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PatchPullRequestDetails build() { + PatchPullRequestDetails model = new PatchPullRequestDetails(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchPullRequestDetails model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of patch instructions + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of patch instructions + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PatchPullRequestDetails("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchPullRequestDetails)) { + return false; + } + + PatchPullRequestDetails other = (PatchPullRequestDetails) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchRemoveInstruction.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchRemoveInstruction.java new file mode 100644 index 00000000000..e461430a6a0 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchRemoveInstruction.java @@ -0,0 +1,114 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * An operation that deletes items, ignoring NOT_FOUND exceptions. + * To avoid referential errors if an item's descendant is also in the selection, items of the selection are processed in order of decreasing depth. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PatchRemoveInstruction.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "operation" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchRemoveInstruction extends PatchInstruction { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private String selection; + + public Builder selection(String selection) { + this.selection = selection; + this.__explicitlySet__.add("selection"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PatchRemoveInstruction build() { + PatchRemoveInstruction model = new PatchRemoveInstruction(this.selection); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchRemoveInstruction model) { + if (model.wasPropertyExplicitlySet("selection")) { + this.selection(model.getSelection()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PatchRemoveInstruction(String selection) { + super(selection); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PatchRemoveInstruction("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchRemoveInstruction)) { + return false; + } + + PatchRemoveInstruction other = (PatchRemoveInstruction) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchReplaceInstruction.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchReplaceInstruction.java new file mode 100644 index 00000000000..d9a6038b1f9 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchReplaceInstruction.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * An operation that "puts" a value, replacing every item of the selection with it, or creating it if the selection is empty. + * NOT_FOUND exceptions are handled by creating the implied containing structure (but note that this may put the target in an invalid state, + * which can be prevented by use of precondition operations). + * To avoid referential errors if an item's descendant is also in the selection, items of the selection are processed in order of decreasing depth. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PatchReplaceInstruction.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "operation" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchReplaceInstruction extends PatchInstruction { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private String selection; + + public Builder selection(String selection) { + this.selection = selection; + this.__explicitlySet__.add("selection"); + return this; + } + /** + * A value to be added into the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private Object value; + + /** + * A value to be added into the target. + * @param value the value to set + * @return this builder + **/ + public Builder value(Object value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PatchReplaceInstruction build() { + PatchReplaceInstruction model = new PatchReplaceInstruction(this.selection, this.value); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchReplaceInstruction model) { + if (model.wasPropertyExplicitlySet("selection")) { + this.selection(model.getSelection()); + } + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PatchReplaceInstruction(String selection, Object value) { + super(selection); + this.value = value; + } + + /** + * A value to be added into the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final Object value; + + /** + * A value to be added into the target. + * @return the value + **/ + public Object getValue() { + return value; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PatchReplaceInstruction("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", value=").append(String.valueOf(this.value)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchReplaceInstruction)) { + return false; + } + + PatchReplaceInstruction other = (PatchReplaceInstruction) o; + return java.util.Objects.equals(this.value, other.value) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchRequireInstruction.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchRequireInstruction.java new file mode 100644 index 00000000000..44efebb8f97 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PatchRequireInstruction.java @@ -0,0 +1,163 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * A precondition operation that requires a selection to be non-empty, and optionally to include an item with a specified value + * (useful for asserting that a value exists before attempting to update it, avoiding accidental creation). + * It fails if the selection is empty, or if value is provided and no item of the selection matches it. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PatchRequireInstruction.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "operation" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchRequireInstruction extends PatchInstruction { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private String selection; + + public Builder selection(String selection) { + this.selection = selection; + this.__explicitlySet__.add("selection"); + return this; + } + /** + * A value to be compared against each item of the selection. + * If this value is an object, then it matches any item that would be unaffected by applying this value as a merge operation. + * Otherwise, it matches any item to which it is equal according to the rules of [JSON Schema](https://tools.ietf.org/html/draft-handrews-json-schema-00#section-4.2.3). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private Object value; + + /** + * A value to be compared against each item of the selection. + * If this value is an object, then it matches any item that would be unaffected by applying this value as a merge operation. + * Otherwise, it matches any item to which it is equal according to the rules of [JSON Schema](https://tools.ietf.org/html/draft-handrews-json-schema-00#section-4.2.3). + * + * @param value the value to set + * @return this builder + **/ + public Builder value(Object value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PatchRequireInstruction build() { + PatchRequireInstruction model = new PatchRequireInstruction(this.selection, this.value); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchRequireInstruction model) { + if (model.wasPropertyExplicitlySet("selection")) { + this.selection(model.getSelection()); + } + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PatchRequireInstruction(String selection, Object value) { + super(selection); + this.value = value; + } + + /** + * A value to be compared against each item of the selection. + * If this value is an object, then it matches any item that would be unaffected by applying this value as a merge operation. + * Otherwise, it matches any item to which it is equal according to the rules of [JSON Schema](https://tools.ietf.org/html/draft-handrews-json-schema-00#section-4.2.3). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final Object value; + + /** + * A value to be compared against each item of the selection. + * If this value is an object, then it matches any item that would be unaffected by applying this value as a merge operation. + * Otherwise, it matches any item to which it is equal according to the rules of [JSON Schema](https://tools.ietf.org/html/draft-handrews-json-schema-00#section-4.2.3). + * + * @return the value + **/ + public Object getValue() { + return value; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PatchRequireInstruction("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", value=").append(String.valueOf(this.value)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchRequireInstruction)) { + return false; + } + + PatchRequireInstruction other = (PatchRequireInstruction) o; + return java.util.Objects.equals(this.value, other.value) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PrincipalDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PrincipalDetails.java new file mode 100644 index 00000000000..11df10232dc --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PrincipalDetails.java @@ -0,0 +1,363 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The principal details + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = PrincipalDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PrincipalDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "principalId", + "principalName", + "principalType", + "principalState" + }) + public PrincipalDetails( + String principalId, + String principalName, + PrincipalType principalType, + PrincipalState principalState) { + super(); + this.principalId = principalId; + this.principalName = principalName; + this.principalType = principalType; + this.principalState = principalState; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * the OCID of the principal + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalId") + private String principalId; + + /** + * the OCID of the principal + * @param principalId the value to set + * @return this builder + **/ + public Builder principalId(String principalId) { + this.principalId = principalId; + this.__explicitlySet__.add("principalId"); + return this; + } + /** + * the name of the principal + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalName") + private String principalName; + + /** + * the name of the principal + * @param principalName the value to set + * @return this builder + **/ + public Builder principalName(String principalName) { + this.principalName = principalName; + this.__explicitlySet__.add("principalName"); + return this; + } + /** + * the type of principal + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalType") + private PrincipalType principalType; + + /** + * the type of principal + * @param principalType the value to set + * @return this builder + **/ + public Builder principalType(PrincipalType principalType) { + this.principalType = principalType; + this.__explicitlySet__.add("principalType"); + return this; + } + /** + * The state of the principal, it can be active or inactive or suppressed for emails + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalState") + private PrincipalState principalState; + + /** + * The state of the principal, it can be active or inactive or suppressed for emails + * @param principalState the value to set + * @return this builder + **/ + public Builder principalState(PrincipalState principalState) { + this.principalState = principalState; + this.__explicitlySet__.add("principalState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PrincipalDetails build() { + PrincipalDetails model = + new PrincipalDetails( + this.principalId, + this.principalName, + this.principalType, + this.principalState); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PrincipalDetails model) { + if (model.wasPropertyExplicitlySet("principalId")) { + this.principalId(model.getPrincipalId()); + } + if (model.wasPropertyExplicitlySet("principalName")) { + this.principalName(model.getPrincipalName()); + } + if (model.wasPropertyExplicitlySet("principalType")) { + this.principalType(model.getPrincipalType()); + } + if (model.wasPropertyExplicitlySet("principalState")) { + this.principalState(model.getPrincipalState()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * the OCID of the principal + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalId") + private final String principalId; + + /** + * the OCID of the principal + * @return the value + **/ + public String getPrincipalId() { + return principalId; + } + + /** + * the name of the principal + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalName") + private final String principalName; + + /** + * the name of the principal + * @return the value + **/ + public String getPrincipalName() { + return principalName; + } + + /** + * the type of principal + **/ + public enum PrincipalType { + Service("SERVICE"), + User("USER"), + Instance("INSTANCE"), + Resource("RESOURCE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PrincipalType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PrincipalType v : PrincipalType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + PrincipalType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PrincipalType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'PrincipalType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * the type of principal + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalType") + private final PrincipalType principalType; + + /** + * the type of principal + * @return the value + **/ + public PrincipalType getPrincipalType() { + return principalType; + } + + /** + * The state of the principal, it can be active or inactive or suppressed for emails + **/ + public enum PrincipalState { + Active("ACTIVE"), + Inactive("INACTIVE"), + Suppressed("SUPPRESSED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PrincipalState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PrincipalState v : PrincipalState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + PrincipalState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PrincipalState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'PrincipalState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The state of the principal, it can be active or inactive or suppressed for emails + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalState") + private final PrincipalState principalState; + + /** + * The state of the principal, it can be active or inactive or suppressed for emails + * @return the value + **/ + public PrincipalState getPrincipalState() { + return principalState; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PrincipalDetails("); + sb.append("super=").append(super.toString()); + sb.append("principalId=").append(String.valueOf(this.principalId)); + sb.append(", principalName=").append(String.valueOf(this.principalName)); + sb.append(", principalType=").append(String.valueOf(this.principalType)); + sb.append(", principalState=").append(String.valueOf(this.principalState)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PrincipalDetails)) { + return false; + } + + PrincipalDetails other = (PrincipalDetails) o; + return java.util.Objects.equals(this.principalId, other.principalId) + && java.util.Objects.equals(this.principalName, other.principalName) + && java.util.Objects.equals(this.principalType, other.principalType) + && java.util.Objects.equals(this.principalState, other.principalState) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.principalId == null ? 43 : this.principalId.hashCode()); + result = + (result * PRIME) + + (this.principalName == null ? 43 : this.principalName.hashCode()); + result = + (result * PRIME) + + (this.principalType == null ? 43 : this.principalType.hashCode()); + result = + (result * PRIME) + + (this.principalState == null ? 43 : this.principalState.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ProjectNotificationPreference.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ProjectNotificationPreference.java new file mode 100644 index 00000000000..f01bb56a606 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ProjectNotificationPreference.java @@ -0,0 +1,267 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The notification preference of the project. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ProjectNotificationPreference.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ProjectNotificationPreference + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"projectId", "userId", "notificationPreference"}) + public ProjectNotificationPreference( + String projectId, String userId, NotificationPreference notificationPreference) { + super(); + this.projectId = projectId; + this.userId = userId; + this.notificationPreference = notificationPreference; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The ocid of project resource + **/ + @com.fasterxml.jackson.annotation.JsonProperty("projectId") + private String projectId; + + /** + * The ocid of project resource + * @param projectId the value to set + * @return this builder + **/ + public Builder projectId(String projectId) { + this.projectId = projectId; + this.__explicitlySet__.add("projectId"); + return this; + } + /** + * The ocid of user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userId") + private String userId; + + /** + * The ocid of user. + * @param userId the value to set + * @return this builder + **/ + public Builder userId(String userId) { + this.userId = userId; + this.__explicitlySet__.add("userId"); + return this; + } + /** + * The override value of project notification preference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationPreference") + private NotificationPreference notificationPreference; + + /** + * The override value of project notification preference. + * @param notificationPreference the value to set + * @return this builder + **/ + public Builder notificationPreference(NotificationPreference notificationPreference) { + this.notificationPreference = notificationPreference; + this.__explicitlySet__.add("notificationPreference"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ProjectNotificationPreference build() { + ProjectNotificationPreference model = + new ProjectNotificationPreference( + this.projectId, this.userId, this.notificationPreference); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ProjectNotificationPreference model) { + if (model.wasPropertyExplicitlySet("projectId")) { + this.projectId(model.getProjectId()); + } + if (model.wasPropertyExplicitlySet("userId")) { + this.userId(model.getUserId()); + } + if (model.wasPropertyExplicitlySet("notificationPreference")) { + this.notificationPreference(model.getNotificationPreference()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The ocid of project resource + **/ + @com.fasterxml.jackson.annotation.JsonProperty("projectId") + private final String projectId; + + /** + * The ocid of project resource + * @return the value + **/ + public String getProjectId() { + return projectId; + } + + /** + * The ocid of user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userId") + private final String userId; + + /** + * The ocid of user. + * @return the value + **/ + public String getUserId() { + return userId; + } + + /** + * The override value of project notification preference. + **/ + public enum NotificationPreference { + Watch("WATCH"), + Ignore("IGNORE"), + Mention("MENTION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(NotificationPreference.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (NotificationPreference v : NotificationPreference.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + NotificationPreference(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static NotificationPreference create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'NotificationPreference', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The override value of project notification preference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationPreference") + private final NotificationPreference notificationPreference; + + /** + * The override value of project notification preference. + * @return the value + **/ + public NotificationPreference getNotificationPreference() { + return notificationPreference; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ProjectNotificationPreference("); + sb.append("super=").append(super.toString()); + sb.append("projectId=").append(String.valueOf(this.projectId)); + sb.append(", userId=").append(String.valueOf(this.userId)); + sb.append(", notificationPreference=").append(String.valueOf(this.notificationPreference)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ProjectNotificationPreference)) { + return false; + } + + ProjectNotificationPreference other = (ProjectNotificationPreference) o; + return java.util.Objects.equals(this.projectId, other.projectId) + && java.util.Objects.equals(this.userId, other.userId) + && java.util.Objects.equals( + this.notificationPreference, other.notificationPreference) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.projectId == null ? 43 : this.projectId.hashCode()); + result = (result * PRIME) + (this.userId == null ? 43 : this.userId.hashCode()); + result = + (result * PRIME) + + (this.notificationPreference == null + ? 43 + : this.notificationPreference.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ProjectRepositorySettings.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ProjectRepositorySettings.java new file mode 100644 index 00000000000..29f24310bf3 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ProjectRepositorySettings.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * User configured settings for project resources and their child repositories. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ProjectRepositorySettings.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ProjectRepositorySettings + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"mergeSettings", "approvalRules"}) + public ProjectRepositorySettings( + MergeSettings mergeSettings, ApprovalRuleCollection approvalRules) { + super(); + this.mergeSettings = mergeSettings; + this.approvalRules = approvalRules; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("mergeSettings") + private MergeSettings mergeSettings; + + public Builder mergeSettings(MergeSettings mergeSettings) { + this.mergeSettings = mergeSettings; + this.__explicitlySet__.add("mergeSettings"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("approvalRules") + private ApprovalRuleCollection approvalRules; + + public Builder approvalRules(ApprovalRuleCollection approvalRules) { + this.approvalRules = approvalRules; + this.__explicitlySet__.add("approvalRules"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ProjectRepositorySettings build() { + ProjectRepositorySettings model = + new ProjectRepositorySettings(this.mergeSettings, this.approvalRules); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ProjectRepositorySettings model) { + if (model.wasPropertyExplicitlySet("mergeSettings")) { + this.mergeSettings(model.getMergeSettings()); + } + if (model.wasPropertyExplicitlySet("approvalRules")) { + this.approvalRules(model.getApprovalRules()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("mergeSettings") + private final MergeSettings mergeSettings; + + public MergeSettings getMergeSettings() { + return mergeSettings; + } + + @com.fasterxml.jackson.annotation.JsonProperty("approvalRules") + private final ApprovalRuleCollection approvalRules; + + public ApprovalRuleCollection getApprovalRules() { + return approvalRules; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ProjectRepositorySettings("); + sb.append("super=").append(super.toString()); + sb.append("mergeSettings=").append(String.valueOf(this.mergeSettings)); + sb.append(", approvalRules=").append(String.valueOf(this.approvalRules)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ProjectRepositorySettings)) { + return false; + } + + ProjectRepositorySettings other = (ProjectRepositorySettings) o; + return java.util.Objects.equals(this.mergeSettings, other.mergeSettings) + && java.util.Objects.equals(this.approvalRules, other.approvalRules) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.mergeSettings == null ? 43 : this.mergeSettings.hashCode()); + result = + (result * PRIME) + + (this.approvalRules == null ? 43 : this.approvalRules.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ProtectedBranch.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ProtectedBranch.java new file mode 100644 index 00000000000..2acc140354e --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ProtectedBranch.java @@ -0,0 +1,261 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Holds information used to restrict certain actions on branches + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ProtectedBranch.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ProtectedBranch extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "branchName", + "protectionLevels", + "freeformTags", + "definedTags" + }) + public ProtectedBranch( + String branchName, + java.util.List protectionLevels, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.branchName = branchName; + this.protectionLevels = protectionLevels; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Branch name inside a repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("branchName") + private String branchName; + + /** + * Branch name inside a repository. + * @param branchName the value to set + * @return this builder + **/ + public Builder branchName(String branchName) { + this.branchName = branchName; + this.__explicitlySet__.add("branchName"); + return this; + } + /** + * Protection levels to be added on the branch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionLevels") + private java.util.List protectionLevels; + + /** + * Protection levels to be added on the branch. + * @param protectionLevels the value to set + * @return this builder + **/ + public Builder protectionLevels(java.util.List protectionLevels) { + this.protectionLevels = protectionLevels; + this.__explicitlySet__.add("protectionLevels"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ProtectedBranch build() { + ProtectedBranch model = + new ProtectedBranch( + this.branchName, + this.protectionLevels, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ProtectedBranch model) { + if (model.wasPropertyExplicitlySet("branchName")) { + this.branchName(model.getBranchName()); + } + if (model.wasPropertyExplicitlySet("protectionLevels")) { + this.protectionLevels(model.getProtectionLevels()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Branch name inside a repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("branchName") + private final String branchName; + + /** + * Branch name inside a repository. + * @return the value + **/ + public String getBranchName() { + return branchName; + } + + /** + * Protection levels to be added on the branch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionLevels") + private final java.util.List protectionLevels; + + /** + * Protection levels to be added on the branch. + * @return the value + **/ + public java.util.List getProtectionLevels() { + return protectionLevels; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ProtectedBranch("); + sb.append("super=").append(super.toString()); + sb.append("branchName=").append(String.valueOf(this.branchName)); + sb.append(", protectionLevels=").append(String.valueOf(this.protectionLevels)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ProtectedBranch)) { + return false; + } + + ProtectedBranch other = (ProtectedBranch) o; + return java.util.Objects.equals(this.branchName, other.branchName) + && java.util.Objects.equals(this.protectionLevels, other.protectionLevels) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.branchName == null ? 43 : this.branchName.hashCode()); + result = + (result * PRIME) + + (this.protectionLevels == null ? 43 : this.protectionLevels.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ProtectedBranchCollection.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ProtectedBranchCollection.java new file mode 100644 index 00000000000..17b1e7d00bc --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ProtectedBranchCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Collection of protected branches + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ProtectedBranchCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ProtectedBranchCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ProtectedBranchCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of objects describing protected branches + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of objects describing protected branches + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ProtectedBranchCollection build() { + ProtectedBranchCollection model = new ProtectedBranchCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ProtectedBranchCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of objects describing protected branches + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of objects describing protected branches + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ProtectedBranchCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ProtectedBranchCollection)) { + return false; + } + + ProtectedBranchCollection other = (ProtectedBranchCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ProtectedBranchSummary.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ProtectedBranchSummary.java new file mode 100644 index 00000000000..ed10e93ab2a --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ProtectedBranchSummary.java @@ -0,0 +1,304 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Holds information used to restrict certain actions on branches + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ProtectedBranchSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ProtectedBranchSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "branchName", + "protectionLevels", + "freeformTags", + "definedTags", + "systemTags" + }) + public ProtectedBranchSummary( + String branchName, + java.util.List protectionLevels, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.branchName = branchName; + this.protectionLevels = protectionLevels; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Branch name inside a repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("branchName") + private String branchName; + + /** + * Branch name inside a repository. + * @param branchName the value to set + * @return this builder + **/ + public Builder branchName(String branchName) { + this.branchName = branchName; + this.__explicitlySet__.add("branchName"); + return this; + } + /** + * Protection level to be added on the branch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionLevels") + private java.util.List protectionLevels; + + /** + * Protection level to be added on the branch. + * @param protectionLevels the value to set + * @return this builder + **/ + public Builder protectionLevels(java.util.List protectionLevels) { + this.protectionLevels = protectionLevels; + this.__explicitlySet__.add("protectionLevels"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ProtectedBranchSummary build() { + ProtectedBranchSummary model = + new ProtectedBranchSummary( + this.branchName, + this.protectionLevels, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ProtectedBranchSummary model) { + if (model.wasPropertyExplicitlySet("branchName")) { + this.branchName(model.getBranchName()); + } + if (model.wasPropertyExplicitlySet("protectionLevels")) { + this.protectionLevels(model.getProtectionLevels()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Branch name inside a repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("branchName") + private final String branchName; + + /** + * Branch name inside a repository. + * @return the value + **/ + public String getBranchName() { + return branchName; + } + + /** + * Protection level to be added on the branch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("protectionLevels") + private final java.util.List protectionLevels; + + /** + * Protection level to be added on the branch. + * @return the value + **/ + public java.util.List getProtectionLevels() { + return protectionLevels; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ProtectedBranchSummary("); + sb.append("super=").append(super.toString()); + sb.append("branchName=").append(String.valueOf(this.branchName)); + sb.append(", protectionLevels=").append(String.valueOf(this.protectionLevels)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ProtectedBranchSummary)) { + return false; + } + + ProtectedBranchSummary other = (ProtectedBranchSummary) o; + return java.util.Objects.equals(this.branchName, other.branchName) + && java.util.Objects.equals(this.protectionLevels, other.protectionLevels) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.branchName == null ? 43 : this.branchName.hashCode()); + result = + (result * PRIME) + + (this.protectionLevels == null ? 43 : this.protectionLevels.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ProtectionLevel.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ProtectionLevel.java new file mode 100644 index 00000000000..37dd710f02f --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ProtectionLevel.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Protection level to be added on the branch. + * READ_ONLY: Makes the branch read-only. All changes to the branch will be rejected. + * PULL_REQUEST_MERGE_ONLY: Changes to a branch are only accepted via a pull request. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public enum ProtectionLevel { + ReadOnly("READ_ONLY"), + PullRequestMergeOnly("PULL_REQUEST_MERGE_ONLY"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ProtectionLevel.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ProtectionLevel v : ProtectionLevel.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ProtectionLevel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ProtectionLevel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ProtectionLevel', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequest.java new file mode 100644 index 00000000000..2ab6951f35a --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequest.java @@ -0,0 +1,1108 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Pull Request containing the diff between a review branch and a destination branch + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = PullRequest.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PullRequest extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "description", + "compartmentId", + "repositoryId", + "sourceBranch", + "destinationBranch", + "sourceCommitIdAtTermination", + "mergeBaseCommitIdAtTermination", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "reviewers", + "mergeChecks", + "createdBy", + "mergedBy", + "sourceRepositoryId", + "totalComments", + "totalReviewers", + "freeformTags", + "definedTags", + "systemTags" + }) + public PullRequest( + String id, + String displayName, + String description, + String compartmentId, + String repositoryId, + String sourceBranch, + String destinationBranch, + String sourceCommitIdAtTermination, + String mergeBaseCommitIdAtTermination, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + LifecycleDetails lifecycleDetails, + java.util.List reviewers, + MergeCheckCollection mergeChecks, + PrincipalDetails createdBy, + PrincipalDetails mergedBy, + String sourceRepositoryId, + Integer totalComments, + Integer totalReviewers, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.description = description; + this.compartmentId = compartmentId; + this.repositoryId = repositoryId; + this.sourceBranch = sourceBranch; + this.destinationBranch = destinationBranch; + this.sourceCommitIdAtTermination = sourceCommitIdAtTermination; + this.mergeBaseCommitIdAtTermination = mergeBaseCommitIdAtTermination; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.reviewers = reviewers; + this.mergeChecks = mergeChecks; + this.createdBy = createdBy; + this.mergedBy = mergedBy; + this.sourceRepositoryId = sourceRepositoryId; + this.totalComments = totalComments; + this.totalReviewers = totalReviewers; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique identifier that is immutable on creation + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique identifier that is immutable on creation + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * PullRequest title, can be renamed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * PullRequest title, can be renamed + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Details of the pull request. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Details of the pull request. Avoid entering confidential information. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Compartment Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Compartment Identifier + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * DevOps Repository Identifier tells which repository this pull request belongs to + **/ + @com.fasterxml.jackson.annotation.JsonProperty("repositoryId") + private String repositoryId; + + /** + * DevOps Repository Identifier tells which repository this pull request belongs to + * @param repositoryId the value to set + * @return this builder + **/ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + this.__explicitlySet__.add("repositoryId"); + return this; + } + /** + * The source branch which contains the changes to be reviewed. Example: "feature/JIRA-123" + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceBranch") + private String sourceBranch; + + /** + * The source branch which contains the changes to be reviewed. Example: "feature/JIRA-123" + * @param sourceBranch the value to set + * @return this builder + **/ + public Builder sourceBranch(String sourceBranch) { + this.sourceBranch = sourceBranch; + this.__explicitlySet__.add("sourceBranch"); + return this; + } + /** + * The destination branch against which the changes are to be reviewed. Example: "main". + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationBranch") + private String destinationBranch; + + /** + * The destination branch against which the changes are to be reviewed. Example: "main". + * @param destinationBranch the value to set + * @return this builder + **/ + public Builder destinationBranch(String destinationBranch) { + this.destinationBranch = destinationBranch; + this.__explicitlySet__.add("destinationBranch"); + return this; + } + /** + * The source branch commit ID when the Pull Request status was last changed to merged or closed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceCommitIdAtTermination") + private String sourceCommitIdAtTermination; + + /** + * The source branch commit ID when the Pull Request status was last changed to merged or closed + * @param sourceCommitIdAtTermination the value to set + * @return this builder + **/ + public Builder sourceCommitIdAtTermination(String sourceCommitIdAtTermination) { + this.sourceCommitIdAtTermination = sourceCommitIdAtTermination; + this.__explicitlySet__.add("sourceCommitIdAtTermination"); + return this; + } + /** + * The merge base commit ID when the Pull Request status was last changed to merged or closed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mergeBaseCommitIdAtTermination") + private String mergeBaseCommitIdAtTermination; + + /** + * The merge base commit ID when the Pull Request status was last changed to merged or closed + * @param mergeBaseCommitIdAtTermination the value to set + * @return this builder + **/ + public Builder mergeBaseCommitIdAtTermination(String mergeBaseCommitIdAtTermination) { + this.mergeBaseCommitIdAtTermination = mergeBaseCommitIdAtTermination; + this.__explicitlySet__.add("mergeBaseCommitIdAtTermination"); + return this; + } + /** + * The time the PullRequest was created. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time the PullRequest was created. An RFC3339 formatted datetime string + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time the PullRequest was updated. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time the PullRequest was updated. An RFC3339 formatted datetime string + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of the PullRequest. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the PullRequest. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The status of the Pull Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private LifecycleDetails lifecycleDetails; + + /** + * The status of the Pull Request. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(LifecycleDetails lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * List of Reviewers. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reviewers") + private java.util.List reviewers; + + /** + * List of Reviewers. + * @param reviewers the value to set + * @return this builder + **/ + public Builder reviewers(java.util.List reviewers) { + this.reviewers = reviewers; + this.__explicitlySet__.add("reviewers"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("mergeChecks") + private MergeCheckCollection mergeChecks; + + public Builder mergeChecks(MergeCheckCollection mergeChecks) { + this.mergeChecks = mergeChecks; + this.__explicitlySet__.add("mergeChecks"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private PrincipalDetails createdBy; + + public Builder createdBy(PrincipalDetails createdBy) { + this.createdBy = createdBy; + this.__explicitlySet__.add("createdBy"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("mergedBy") + private PrincipalDetails mergedBy; + + public Builder mergedBy(PrincipalDetails mergedBy) { + this.mergedBy = mergedBy; + this.__explicitlySet__.add("mergedBy"); + return this; + } + /** + * The OCID of the forked repository that will act as the source of the changes to be included in the pull request against the parent repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceRepositoryId") + private String sourceRepositoryId; + + /** + * The OCID of the forked repository that will act as the source of the changes to be included in the pull request against the parent repository. + * @param sourceRepositoryId the value to set + * @return this builder + **/ + public Builder sourceRepositoryId(String sourceRepositoryId) { + this.sourceRepositoryId = sourceRepositoryId; + this.__explicitlySet__.add("sourceRepositoryId"); + return this; + } + /** + * The total number of comments on the pull request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalComments") + private Integer totalComments; + + /** + * The total number of comments on the pull request. + * @param totalComments the value to set + * @return this builder + **/ + public Builder totalComments(Integer totalComments) { + this.totalComments = totalComments; + this.__explicitlySet__.add("totalComments"); + return this; + } + /** + * The total number of reviewers on the pull request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalReviewers") + private Integer totalReviewers; + + /** + * The total number of reviewers on the pull request. + * @param totalReviewers the value to set + * @return this builder + **/ + public Builder totalReviewers(Integer totalReviewers) { + this.totalReviewers = totalReviewers; + this.__explicitlySet__.add("totalReviewers"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PullRequest build() { + PullRequest model = + new PullRequest( + this.id, + this.displayName, + this.description, + this.compartmentId, + this.repositoryId, + this.sourceBranch, + this.destinationBranch, + this.sourceCommitIdAtTermination, + this.mergeBaseCommitIdAtTermination, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.reviewers, + this.mergeChecks, + this.createdBy, + this.mergedBy, + this.sourceRepositoryId, + this.totalComments, + this.totalReviewers, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PullRequest model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("repositoryId")) { + this.repositoryId(model.getRepositoryId()); + } + if (model.wasPropertyExplicitlySet("sourceBranch")) { + this.sourceBranch(model.getSourceBranch()); + } + if (model.wasPropertyExplicitlySet("destinationBranch")) { + this.destinationBranch(model.getDestinationBranch()); + } + if (model.wasPropertyExplicitlySet("sourceCommitIdAtTermination")) { + this.sourceCommitIdAtTermination(model.getSourceCommitIdAtTermination()); + } + if (model.wasPropertyExplicitlySet("mergeBaseCommitIdAtTermination")) { + this.mergeBaseCommitIdAtTermination(model.getMergeBaseCommitIdAtTermination()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("reviewers")) { + this.reviewers(model.getReviewers()); + } + if (model.wasPropertyExplicitlySet("mergeChecks")) { + this.mergeChecks(model.getMergeChecks()); + } + if (model.wasPropertyExplicitlySet("createdBy")) { + this.createdBy(model.getCreatedBy()); + } + if (model.wasPropertyExplicitlySet("mergedBy")) { + this.mergedBy(model.getMergedBy()); + } + if (model.wasPropertyExplicitlySet("sourceRepositoryId")) { + this.sourceRepositoryId(model.getSourceRepositoryId()); + } + if (model.wasPropertyExplicitlySet("totalComments")) { + this.totalComments(model.getTotalComments()); + } + if (model.wasPropertyExplicitlySet("totalReviewers")) { + this.totalReviewers(model.getTotalReviewers()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique identifier that is immutable on creation + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique identifier that is immutable on creation + * @return the value + **/ + public String getId() { + return id; + } + + /** + * PullRequest title, can be renamed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * PullRequest title, can be renamed + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Details of the pull request. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Details of the pull request. Avoid entering confidential information. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Compartment Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Compartment Identifier + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * DevOps Repository Identifier tells which repository this pull request belongs to + **/ + @com.fasterxml.jackson.annotation.JsonProperty("repositoryId") + private final String repositoryId; + + /** + * DevOps Repository Identifier tells which repository this pull request belongs to + * @return the value + **/ + public String getRepositoryId() { + return repositoryId; + } + + /** + * The source branch which contains the changes to be reviewed. Example: "feature/JIRA-123" + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceBranch") + private final String sourceBranch; + + /** + * The source branch which contains the changes to be reviewed. Example: "feature/JIRA-123" + * @return the value + **/ + public String getSourceBranch() { + return sourceBranch; + } + + /** + * The destination branch against which the changes are to be reviewed. Example: "main". + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationBranch") + private final String destinationBranch; + + /** + * The destination branch against which the changes are to be reviewed. Example: "main". + * @return the value + **/ + public String getDestinationBranch() { + return destinationBranch; + } + + /** + * The source branch commit ID when the Pull Request status was last changed to merged or closed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceCommitIdAtTermination") + private final String sourceCommitIdAtTermination; + + /** + * The source branch commit ID when the Pull Request status was last changed to merged or closed + * @return the value + **/ + public String getSourceCommitIdAtTermination() { + return sourceCommitIdAtTermination; + } + + /** + * The merge base commit ID when the Pull Request status was last changed to merged or closed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mergeBaseCommitIdAtTermination") + private final String mergeBaseCommitIdAtTermination; + + /** + * The merge base commit ID when the Pull Request status was last changed to merged or closed + * @return the value + **/ + public String getMergeBaseCommitIdAtTermination() { + return mergeBaseCommitIdAtTermination; + } + + /** + * The time the PullRequest was created. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the PullRequest was created. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the PullRequest was updated. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the PullRequest was updated. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the PullRequest. + **/ + public enum LifecycleState { + Creating("CREATING"), + Updating("UPDATING"), + Active("ACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the PullRequest. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the PullRequest. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The status of the Pull Request. + **/ + public enum LifecycleDetails { + Open("OPEN"), + Conflict("CONFLICT"), + Closed("CLOSED"), + Merging("MERGING"), + Merged("MERGED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleDetails.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleDetails v : LifecycleDetails.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleDetails(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleDetails create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleDetails', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The status of the Pull Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final LifecycleDetails lifecycleDetails; + + /** + * The status of the Pull Request. + * @return the value + **/ + public LifecycleDetails getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * List of Reviewers. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reviewers") + private final java.util.List reviewers; + + /** + * List of Reviewers. + * @return the value + **/ + public java.util.List getReviewers() { + return reviewers; + } + + @com.fasterxml.jackson.annotation.JsonProperty("mergeChecks") + private final MergeCheckCollection mergeChecks; + + public MergeCheckCollection getMergeChecks() { + return mergeChecks; + } + + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private final PrincipalDetails createdBy; + + public PrincipalDetails getCreatedBy() { + return createdBy; + } + + @com.fasterxml.jackson.annotation.JsonProperty("mergedBy") + private final PrincipalDetails mergedBy; + + public PrincipalDetails getMergedBy() { + return mergedBy; + } + + /** + * The OCID of the forked repository that will act as the source of the changes to be included in the pull request against the parent repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceRepositoryId") + private final String sourceRepositoryId; + + /** + * The OCID of the forked repository that will act as the source of the changes to be included in the pull request against the parent repository. + * @return the value + **/ + public String getSourceRepositoryId() { + return sourceRepositoryId; + } + + /** + * The total number of comments on the pull request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalComments") + private final Integer totalComments; + + /** + * The total number of comments on the pull request. + * @return the value + **/ + public Integer getTotalComments() { + return totalComments; + } + + /** + * The total number of reviewers on the pull request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalReviewers") + private final Integer totalReviewers; + + /** + * The total number of reviewers on the pull request. + * @return the value + **/ + public Integer getTotalReviewers() { + return totalReviewers; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PullRequest("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(", sourceBranch=").append(String.valueOf(this.sourceBranch)); + sb.append(", destinationBranch=").append(String.valueOf(this.destinationBranch)); + sb.append(", sourceCommitIdAtTermination=") + .append(String.valueOf(this.sourceCommitIdAtTermination)); + sb.append(", mergeBaseCommitIdAtTermination=") + .append(String.valueOf(this.mergeBaseCommitIdAtTermination)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", reviewers=").append(String.valueOf(this.reviewers)); + sb.append(", mergeChecks=").append(String.valueOf(this.mergeChecks)); + sb.append(", createdBy=").append(String.valueOf(this.createdBy)); + sb.append(", mergedBy=").append(String.valueOf(this.mergedBy)); + sb.append(", sourceRepositoryId=").append(String.valueOf(this.sourceRepositoryId)); + sb.append(", totalComments=").append(String.valueOf(this.totalComments)); + sb.append(", totalReviewers=").append(String.valueOf(this.totalReviewers)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PullRequest)) { + return false; + } + + PullRequest other = (PullRequest) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals(this.sourceBranch, other.sourceBranch) + && java.util.Objects.equals(this.destinationBranch, other.destinationBranch) + && java.util.Objects.equals( + this.sourceCommitIdAtTermination, other.sourceCommitIdAtTermination) + && java.util.Objects.equals( + this.mergeBaseCommitIdAtTermination, other.mergeBaseCommitIdAtTermination) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.reviewers, other.reviewers) + && java.util.Objects.equals(this.mergeChecks, other.mergeChecks) + && java.util.Objects.equals(this.createdBy, other.createdBy) + && java.util.Objects.equals(this.mergedBy, other.mergedBy) + && java.util.Objects.equals(this.sourceRepositoryId, other.sourceRepositoryId) + && java.util.Objects.equals(this.totalComments, other.totalComments) + && java.util.Objects.equals(this.totalReviewers, other.totalReviewers) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = (result * PRIME) + (this.sourceBranch == null ? 43 : this.sourceBranch.hashCode()); + result = + (result * PRIME) + + (this.destinationBranch == null ? 43 : this.destinationBranch.hashCode()); + result = + (result * PRIME) + + (this.sourceCommitIdAtTermination == null + ? 43 + : this.sourceCommitIdAtTermination.hashCode()); + result = + (result * PRIME) + + (this.mergeBaseCommitIdAtTermination == null + ? 43 + : this.mergeBaseCommitIdAtTermination.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.reviewers == null ? 43 : this.reviewers.hashCode()); + result = (result * PRIME) + (this.mergeChecks == null ? 43 : this.mergeChecks.hashCode()); + result = (result * PRIME) + (this.createdBy == null ? 43 : this.createdBy.hashCode()); + result = (result * PRIME) + (this.mergedBy == null ? 43 : this.mergedBy.hashCode()); + result = + (result * PRIME) + + (this.sourceRepositoryId == null + ? 43 + : this.sourceRepositoryId.hashCode()); + result = + (result * PRIME) + + (this.totalComments == null ? 43 : this.totalComments.hashCode()); + result = + (result * PRIME) + + (this.totalReviewers == null ? 43 : this.totalReviewers.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestActivityCollection.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestActivityCollection.java new file mode 100644 index 00000000000..a3f243ec7f4 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestActivityCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Result of list pullRequest activities. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PullRequestActivityCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PullRequestActivityCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public PullRequestActivityCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of pullRequest activity objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of pullRequest activity objects. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PullRequestActivityCollection build() { + PullRequestActivityCollection model = new PullRequestActivityCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PullRequestActivityCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of pullRequest activity objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of pullRequest activity objects. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PullRequestActivityCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PullRequestActivityCollection)) { + return false; + } + + PullRequestActivityCollection other = (PullRequestActivityCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestActivitySummary.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestActivitySummary.java new file mode 100644 index 00000000000..54ded1ad415 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestActivitySummary.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Summary of an activity record in a pull request + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "activityType", + defaultImpl = PullRequestActivitySummary.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CommitActivitySummary.class, + name = "COMMIT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CommentActivitySummary.class, + name = "COMMENT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ApprovalActivitySummary.class, + name = "APPROVAL" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ReviewerActivitySummary.class, + name = "REVIEWER" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PullRequestLifecycleActivitySummary.class, + name = "LIFECYCLE" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class PullRequestActivitySummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"id", "principal", "pullRequestId", "timeOccurred"}) + protected PullRequestActivitySummary( + String id, + PrincipalDetails principal, + String pullRequestId, + java.util.Date timeOccurred) { + super(); + this.id = id; + this.principal = principal; + this.pullRequestId = pullRequestId; + this.timeOccurred = timeOccurred; + } + + /** + * activity identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * activity identifier + * @return the value + **/ + public String getId() { + return id; + } + + @com.fasterxml.jackson.annotation.JsonProperty("principal") + private final PrincipalDetails principal; + + public PrincipalDetails getPrincipal() { + return principal; + } + + /** + * pullRequest OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pullRequestId") + private final String pullRequestId; + + /** + * pullRequest OCID + * @return the value + **/ + public String getPullRequestId() { + return pullRequestId; + } + + /** + * The time the action was performed. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeOccurred") + private final java.util.Date timeOccurred; + + /** + * The time the action was performed. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeOccurred() { + return timeOccurred; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PullRequestActivitySummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", principal=").append(String.valueOf(this.principal)); + sb.append(", pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(", timeOccurred=").append(String.valueOf(this.timeOccurred)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PullRequestActivitySummary)) { + return false; + } + + PullRequestActivitySummary other = (PullRequestActivitySummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.principal, other.principal) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.timeOccurred, other.timeOccurred) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.principal == null ? 43 : this.principal.hashCode()); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.timeOccurred == null ? 43 : this.timeOccurred.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The type of activity performed + **/ + public enum ActivityType { + Lifecycle("LIFECYCLE"), + Approval("APPROVAL"), + Commit("COMMIT"), + Reviewer("REVIEWER"), + Comment("COMMENT"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ActivityType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActivityType v : ActivityType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ActivityType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ActivityType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ActivityType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestAttachment.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestAttachment.java new file mode 100644 index 00000000000..073081c478b --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestAttachment.java @@ -0,0 +1,289 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Pull Request attachment created by users. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PullRequestAttachment.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PullRequestAttachment + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "pullRequestId", + "fileName", + "timeCreated", + "createdBy" + }) + public PullRequestAttachment( + String id, + String pullRequestId, + String fileName, + java.util.Date timeCreated, + PrincipalDetails createdBy) { + super(); + this.id = id; + this.pullRequestId = pullRequestId; + this.fileName = fileName; + this.timeCreated = timeCreated; + this.createdBy = createdBy; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique identifier that is immutable on creation + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique identifier that is immutable on creation + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * OCID of the pull request that this attachment belongs to + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pullRequestId") + private String pullRequestId; + + /** + * OCID of the pull request that this attachment belongs to + * @param pullRequestId the value to set + * @return this builder + **/ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + this.__explicitlySet__.add("pullRequestId"); + return this; + } + /** + * name to display in description or comment + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fileName") + private String fileName; + + /** + * name to display in description or comment + * @param fileName the value to set + * @return this builder + **/ + public Builder fileName(String fileName) { + this.fileName = fileName; + this.__explicitlySet__.add("fileName"); + return this; + } + /** + * Creation timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Creation timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private PrincipalDetails createdBy; + + public Builder createdBy(PrincipalDetails createdBy) { + this.createdBy = createdBy; + this.__explicitlySet__.add("createdBy"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PullRequestAttachment build() { + PullRequestAttachment model = + new PullRequestAttachment( + this.id, + this.pullRequestId, + this.fileName, + this.timeCreated, + this.createdBy); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PullRequestAttachment model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("pullRequestId")) { + this.pullRequestId(model.getPullRequestId()); + } + if (model.wasPropertyExplicitlySet("fileName")) { + this.fileName(model.getFileName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("createdBy")) { + this.createdBy(model.getCreatedBy()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique identifier that is immutable on creation + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique identifier that is immutable on creation + * @return the value + **/ + public String getId() { + return id; + } + + /** + * OCID of the pull request that this attachment belongs to + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pullRequestId") + private final String pullRequestId; + + /** + * OCID of the pull request that this attachment belongs to + * @return the value + **/ + public String getPullRequestId() { + return pullRequestId; + } + + /** + * name to display in description or comment + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fileName") + private final String fileName; + + /** + * name to display in description or comment + * @return the value + **/ + public String getFileName() { + return fileName; + } + + /** + * Creation timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Creation timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private final PrincipalDetails createdBy; + + public PrincipalDetails getCreatedBy() { + return createdBy; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PullRequestAttachment("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(", fileName=").append(String.valueOf(this.fileName)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", createdBy=").append(String.valueOf(this.createdBy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PullRequestAttachment)) { + return false; + } + + PullRequestAttachment other = (PullRequestAttachment) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.fileName, other.fileName) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.createdBy, other.createdBy) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.fileName == null ? 43 : this.fileName.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.createdBy == null ? 43 : this.createdBy.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestAttachmentCollection.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestAttachmentCollection.java new file mode 100644 index 00000000000..187b81b9359 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestAttachmentCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Result of list pullRequest attachment. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PullRequestAttachmentCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PullRequestAttachmentCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public PullRequestAttachmentCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of pullRequest attachment objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of pullRequest attachment objects. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PullRequestAttachmentCollection build() { + PullRequestAttachmentCollection model = new PullRequestAttachmentCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PullRequestAttachmentCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of pullRequest attachment objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of pullRequest attachment objects. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PullRequestAttachmentCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PullRequestAttachmentCollection)) { + return false; + } + + PullRequestAttachmentCollection other = (PullRequestAttachmentCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestAttachmentSummary.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestAttachmentSummary.java new file mode 100644 index 00000000000..0eac721c83e --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestAttachmentSummary.java @@ -0,0 +1,289 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * summary of a pullRequest attachment + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PullRequestAttachmentSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PullRequestAttachmentSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "pullRequestId", + "fileName", + "timeCreated", + "createdBy" + }) + public PullRequestAttachmentSummary( + String id, + String pullRequestId, + String fileName, + java.util.Date timeCreated, + PrincipalDetails createdBy) { + super(); + this.id = id; + this.pullRequestId = pullRequestId; + this.fileName = fileName; + this.timeCreated = timeCreated; + this.createdBy = createdBy; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique identifier that is immutable on creation + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique identifier that is immutable on creation + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * OCID of the pull request that this attachment belongs to + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pullRequestId") + private String pullRequestId; + + /** + * OCID of the pull request that this attachment belongs to + * @param pullRequestId the value to set + * @return this builder + **/ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + this.__explicitlySet__.add("pullRequestId"); + return this; + } + /** + * name to display in description or comment + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fileName") + private String fileName; + + /** + * name to display in description or comment + * @param fileName the value to set + * @return this builder + **/ + public Builder fileName(String fileName) { + this.fileName = fileName; + this.__explicitlySet__.add("fileName"); + return this; + } + /** + * Creation timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Creation timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private PrincipalDetails createdBy; + + public Builder createdBy(PrincipalDetails createdBy) { + this.createdBy = createdBy; + this.__explicitlySet__.add("createdBy"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PullRequestAttachmentSummary build() { + PullRequestAttachmentSummary model = + new PullRequestAttachmentSummary( + this.id, + this.pullRequestId, + this.fileName, + this.timeCreated, + this.createdBy); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PullRequestAttachmentSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("pullRequestId")) { + this.pullRequestId(model.getPullRequestId()); + } + if (model.wasPropertyExplicitlySet("fileName")) { + this.fileName(model.getFileName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("createdBy")) { + this.createdBy(model.getCreatedBy()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique identifier that is immutable on creation + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique identifier that is immutable on creation + * @return the value + **/ + public String getId() { + return id; + } + + /** + * OCID of the pull request that this attachment belongs to + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pullRequestId") + private final String pullRequestId; + + /** + * OCID of the pull request that this attachment belongs to + * @return the value + **/ + public String getPullRequestId() { + return pullRequestId; + } + + /** + * name to display in description or comment + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fileName") + private final String fileName; + + /** + * name to display in description or comment + * @return the value + **/ + public String getFileName() { + return fileName; + } + + /** + * Creation timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Creation timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private final PrincipalDetails createdBy; + + public PrincipalDetails getCreatedBy() { + return createdBy; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PullRequestAttachmentSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(", fileName=").append(String.valueOf(this.fileName)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", createdBy=").append(String.valueOf(this.createdBy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PullRequestAttachmentSummary)) { + return false; + } + + PullRequestAttachmentSummary other = (PullRequestAttachmentSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.fileName, other.fileName) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.createdBy, other.createdBy) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.fileName == null ? 43 : this.fileName.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.createdBy == null ? 43 : this.createdBy.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestAuthorCollection.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestAuthorCollection.java new file mode 100644 index 00000000000..e9cf64cd71c --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestAuthorCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Result of listing PR authors. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PullRequestAuthorCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PullRequestAuthorCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public PullRequestAuthorCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of authors who has ever created PR before. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of authors who has ever created PR before. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PullRequestAuthorCollection build() { + PullRequestAuthorCollection model = new PullRequestAuthorCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PullRequestAuthorCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of authors who has ever created PR before. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of authors who has ever created PR before. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PullRequestAuthorCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PullRequestAuthorCollection)) { + return false; + } + + PullRequestAuthorCollection other = (PullRequestAuthorCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestAuthorSummary.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestAuthorSummary.java new file mode 100644 index 00000000000..4c9f9897dd0 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestAuthorSummary.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Object containing summary of PR author. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PullRequestAuthorSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PullRequestAuthorSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"principalDetails"}) + public PullRequestAuthorSummary(PrincipalDetails principalDetails) { + super(); + this.principalDetails = principalDetails; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("principalDetails") + private PrincipalDetails principalDetails; + + public Builder principalDetails(PrincipalDetails principalDetails) { + this.principalDetails = principalDetails; + this.__explicitlySet__.add("principalDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PullRequestAuthorSummary build() { + PullRequestAuthorSummary model = new PullRequestAuthorSummary(this.principalDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PullRequestAuthorSummary model) { + if (model.wasPropertyExplicitlySet("principalDetails")) { + this.principalDetails(model.getPrincipalDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("principalDetails") + private final PrincipalDetails principalDetails; + + public PrincipalDetails getPrincipalDetails() { + return principalDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PullRequestAuthorSummary("); + sb.append("super=").append(super.toString()); + sb.append("principalDetails=").append(String.valueOf(this.principalDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PullRequestAuthorSummary)) { + return false; + } + + PullRequestAuthorSummary other = (PullRequestAuthorSummary) o; + return java.util.Objects.equals(this.principalDetails, other.principalDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.principalDetails == null ? 43 : this.principalDetails.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestChangeSummaryMetrics.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestChangeSummaryMetrics.java new file mode 100644 index 00000000000..f2016b3db5f --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestChangeSummaryMetrics.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Response object for obtaining summary metric of Pull Request changed files. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PullRequestChangeSummaryMetrics.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PullRequestChangeSummaryMetrics + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"changedFilesCount", "addedLinesCount", "deletedLinesCount"}) + public PullRequestChangeSummaryMetrics( + Integer changedFilesCount, Integer addedLinesCount, Integer deletedLinesCount) { + super(); + this.changedFilesCount = changedFilesCount; + this.addedLinesCount = addedLinesCount; + this.deletedLinesCount = deletedLinesCount; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The number of lines added in whole difference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("changedFilesCount") + private Integer changedFilesCount; + + /** + * The number of lines added in whole difference. + * @param changedFilesCount the value to set + * @return this builder + **/ + public Builder changedFilesCount(Integer changedFilesCount) { + this.changedFilesCount = changedFilesCount; + this.__explicitlySet__.add("changedFilesCount"); + return this; + } + /** + * The number of lines added in whole difference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("addedLinesCount") + private Integer addedLinesCount; + + /** + * The number of lines added in whole difference. + * @param addedLinesCount the value to set + * @return this builder + **/ + public Builder addedLinesCount(Integer addedLinesCount) { + this.addedLinesCount = addedLinesCount; + this.__explicitlySet__.add("addedLinesCount"); + return this; + } + /** + * The number of lines deleted in whole difference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deletedLinesCount") + private Integer deletedLinesCount; + + /** + * The number of lines deleted in whole difference. + * @param deletedLinesCount the value to set + * @return this builder + **/ + public Builder deletedLinesCount(Integer deletedLinesCount) { + this.deletedLinesCount = deletedLinesCount; + this.__explicitlySet__.add("deletedLinesCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PullRequestChangeSummaryMetrics build() { + PullRequestChangeSummaryMetrics model = + new PullRequestChangeSummaryMetrics( + this.changedFilesCount, this.addedLinesCount, this.deletedLinesCount); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PullRequestChangeSummaryMetrics model) { + if (model.wasPropertyExplicitlySet("changedFilesCount")) { + this.changedFilesCount(model.getChangedFilesCount()); + } + if (model.wasPropertyExplicitlySet("addedLinesCount")) { + this.addedLinesCount(model.getAddedLinesCount()); + } + if (model.wasPropertyExplicitlySet("deletedLinesCount")) { + this.deletedLinesCount(model.getDeletedLinesCount()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The number of lines added in whole difference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("changedFilesCount") + private final Integer changedFilesCount; + + /** + * The number of lines added in whole difference. + * @return the value + **/ + public Integer getChangedFilesCount() { + return changedFilesCount; + } + + /** + * The number of lines added in whole difference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("addedLinesCount") + private final Integer addedLinesCount; + + /** + * The number of lines added in whole difference. + * @return the value + **/ + public Integer getAddedLinesCount() { + return addedLinesCount; + } + + /** + * The number of lines deleted in whole difference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deletedLinesCount") + private final Integer deletedLinesCount; + + /** + * The number of lines deleted in whole difference. + * @return the value + **/ + public Integer getDeletedLinesCount() { + return deletedLinesCount; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PullRequestChangeSummaryMetrics("); + sb.append("super=").append(super.toString()); + sb.append("changedFilesCount=").append(String.valueOf(this.changedFilesCount)); + sb.append(", addedLinesCount=").append(String.valueOf(this.addedLinesCount)); + sb.append(", deletedLinesCount=").append(String.valueOf(this.deletedLinesCount)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PullRequestChangeSummaryMetrics)) { + return false; + } + + PullRequestChangeSummaryMetrics other = (PullRequestChangeSummaryMetrics) o; + return java.util.Objects.equals(this.changedFilesCount, other.changedFilesCount) + && java.util.Objects.equals(this.addedLinesCount, other.addedLinesCount) + && java.util.Objects.equals(this.deletedLinesCount, other.deletedLinesCount) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.changedFilesCount == null ? 43 : this.changedFilesCount.hashCode()); + result = + (result * PRIME) + + (this.addedLinesCount == null ? 43 : this.addedLinesCount.hashCode()); + result = + (result * PRIME) + + (this.deletedLinesCount == null ? 43 : this.deletedLinesCount.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestCollection.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestCollection.java new file mode 100644 index 00000000000..38fd5bee472 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Results of a Pull Request search. Contains both PullRequestSummary items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PullRequestCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PullRequestCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public PullRequestCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of Pull Requests. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of Pull Requests. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PullRequestCollection build() { + PullRequestCollection model = new PullRequestCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PullRequestCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of Pull Requests. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of Pull Requests. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PullRequestCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PullRequestCollection)) { + return false; + } + + PullRequestCollection other = (PullRequestCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestComment.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestComment.java new file mode 100644 index 00000000000..110404625f0 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestComment.java @@ -0,0 +1,847 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * User comments created by reviewers during the pull request review. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PullRequestComment.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PullRequestComment extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "pullRequestId", + "data", + "parentId", + "filePath", + "commitId", + "fileType", + "lineNumber", + "likes", + "status", + "timeCreated", + "createdBy", + "timeUpdated", + "updatedBy", + "contextStatus", + "commentContext" + }) + public PullRequestComment( + String id, + String pullRequestId, + String data, + String parentId, + String filePath, + String commitId, + FileType fileType, + Integer lineNumber, + PullRequestCommentLikeCollection likes, + Status status, + java.util.Date timeCreated, + PrincipalDetails createdBy, + java.util.Date timeUpdated, + PrincipalDetails updatedBy, + ContextStatus contextStatus, + java.util.List commentContext) { + super(); + this.id = id; + this.pullRequestId = pullRequestId; + this.data = data; + this.parentId = parentId; + this.filePath = filePath; + this.commitId = commitId; + this.fileType = fileType; + this.lineNumber = lineNumber; + this.likes = likes; + this.status = status; + this.timeCreated = timeCreated; + this.createdBy = createdBy; + this.timeUpdated = timeUpdated; + this.updatedBy = updatedBy; + this.contextStatus = contextStatus; + this.commentContext = commentContext; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique identifier that is immutable on creation + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique identifier that is immutable on creation + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * OCID of the pull request that this comment belongs to + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pullRequestId") + private String pullRequestId; + + /** + * OCID of the pull request that this comment belongs to + * @param pullRequestId the value to set + * @return this builder + **/ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + this.__explicitlySet__.add("pullRequestId"); + return this; + } + /** + * Content of the Comment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("data") + private String data; + + /** + * Content of the Comment. + * @param data the value to set + * @return this builder + **/ + public Builder data(String data) { + this.data = data; + this.__explicitlySet__.add("data"); + return this; + } + /** + * ID of parent Comment + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentId") + private String parentId; + + /** + * ID of parent Comment + * @param parentId the value to set + * @return this builder + **/ + public Builder parentId(String parentId) { + this.parentId = parentId; + this.__explicitlySet__.add("parentId"); + return this; + } + /** + * File path in the commit + **/ + @com.fasterxml.jackson.annotation.JsonProperty("filePath") + private String filePath; + + /** + * File path in the commit + * @param filePath the value to set + * @return this builder + **/ + public Builder filePath(String filePath) { + this.filePath = filePath; + this.__explicitlySet__.add("filePath"); + return this; + } + /** + * Commit SHA + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitId") + private String commitId; + + /** + * Commit SHA + * @param commitId the value to set + * @return this builder + **/ + public Builder commitId(String commitId) { + this.commitId = commitId; + this.__explicitlySet__.add("commitId"); + return this; + } + /** + * File path in the target commit + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fileType") + private FileType fileType; + + /** + * File path in the target commit + * @param fileType the value to set + * @return this builder + **/ + public Builder fileType(FileType fileType) { + this.fileType = fileType; + this.__explicitlySet__.add("fileType"); + return this; + } + /** + * Line number in the file + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lineNumber") + private Integer lineNumber; + + /** + * Line number in the file + * @param lineNumber the value to set + * @return this builder + **/ + public Builder lineNumber(Integer lineNumber) { + this.lineNumber = lineNumber; + this.__explicitlySet__.add("lineNumber"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("likes") + private PullRequestCommentLikeCollection likes; + + public Builder likes(PullRequestCommentLikeCollection likes) { + this.likes = likes; + this.__explicitlySet__.add("likes"); + return this; + } + /** + * Status of the Comment + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * Status of the Comment + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * Creation timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Creation timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private PrincipalDetails createdBy; + + public Builder createdBy(PrincipalDetails createdBy) { + this.createdBy = createdBy; + this.__explicitlySet__.add("createdBy"); + return this; + } + /** + * Latest update timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * Latest update timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("updatedBy") + private PrincipalDetails updatedBy; + + public Builder updatedBy(PrincipalDetails updatedBy) { + this.updatedBy = updatedBy; + this.__explicitlySet__.add("updatedBy"); + return this; + } + /** + * Shows the status of an inline comments context + **/ + @com.fasterxml.jackson.annotation.JsonProperty("contextStatus") + private ContextStatus contextStatus; + + /** + * Shows the status of an inline comments context + * @param contextStatus the value to set + * @return this builder + **/ + public Builder contextStatus(ContextStatus contextStatus) { + this.contextStatus = contextStatus; + this.__explicitlySet__.add("contextStatus"); + return this; + } + /** + * 4 line snippet to be displayed as context for inline comments + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commentContext") + private java.util.List commentContext; + + /** + * 4 line snippet to be displayed as context for inline comments + * @param commentContext the value to set + * @return this builder + **/ + public Builder commentContext(java.util.List commentContext) { + this.commentContext = commentContext; + this.__explicitlySet__.add("commentContext"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PullRequestComment build() { + PullRequestComment model = + new PullRequestComment( + this.id, + this.pullRequestId, + this.data, + this.parentId, + this.filePath, + this.commitId, + this.fileType, + this.lineNumber, + this.likes, + this.status, + this.timeCreated, + this.createdBy, + this.timeUpdated, + this.updatedBy, + this.contextStatus, + this.commentContext); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PullRequestComment model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("pullRequestId")) { + this.pullRequestId(model.getPullRequestId()); + } + if (model.wasPropertyExplicitlySet("data")) { + this.data(model.getData()); + } + if (model.wasPropertyExplicitlySet("parentId")) { + this.parentId(model.getParentId()); + } + if (model.wasPropertyExplicitlySet("filePath")) { + this.filePath(model.getFilePath()); + } + if (model.wasPropertyExplicitlySet("commitId")) { + this.commitId(model.getCommitId()); + } + if (model.wasPropertyExplicitlySet("fileType")) { + this.fileType(model.getFileType()); + } + if (model.wasPropertyExplicitlySet("lineNumber")) { + this.lineNumber(model.getLineNumber()); + } + if (model.wasPropertyExplicitlySet("likes")) { + this.likes(model.getLikes()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("createdBy")) { + this.createdBy(model.getCreatedBy()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("updatedBy")) { + this.updatedBy(model.getUpdatedBy()); + } + if (model.wasPropertyExplicitlySet("contextStatus")) { + this.contextStatus(model.getContextStatus()); + } + if (model.wasPropertyExplicitlySet("commentContext")) { + this.commentContext(model.getCommentContext()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique identifier that is immutable on creation + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique identifier that is immutable on creation + * @return the value + **/ + public String getId() { + return id; + } + + /** + * OCID of the pull request that this comment belongs to + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pullRequestId") + private final String pullRequestId; + + /** + * OCID of the pull request that this comment belongs to + * @return the value + **/ + public String getPullRequestId() { + return pullRequestId; + } + + /** + * Content of the Comment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("data") + private final String data; + + /** + * Content of the Comment. + * @return the value + **/ + public String getData() { + return data; + } + + /** + * ID of parent Comment + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentId") + private final String parentId; + + /** + * ID of parent Comment + * @return the value + **/ + public String getParentId() { + return parentId; + } + + /** + * File path in the commit + **/ + @com.fasterxml.jackson.annotation.JsonProperty("filePath") + private final String filePath; + + /** + * File path in the commit + * @return the value + **/ + public String getFilePath() { + return filePath; + } + + /** + * Commit SHA + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitId") + private final String commitId; + + /** + * Commit SHA + * @return the value + **/ + public String getCommitId() { + return commitId; + } + + /** + * File path in the target commit + **/ + public enum FileType { + Source("SOURCE"), + Destination("DESTINATION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(FileType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (FileType v : FileType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + FileType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static FileType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'FileType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * File path in the target commit + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fileType") + private final FileType fileType; + + /** + * File path in the target commit + * @return the value + **/ + public FileType getFileType() { + return fileType; + } + + /** + * Line number in the file + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lineNumber") + private final Integer lineNumber; + + /** + * Line number in the file + * @return the value + **/ + public Integer getLineNumber() { + return lineNumber; + } + + @com.fasterxml.jackson.annotation.JsonProperty("likes") + private final PullRequestCommentLikeCollection likes; + + public PullRequestCommentLikeCollection getLikes() { + return likes; + } + + /** + * Status of the Comment + **/ + public enum Status { + Active("ACTIVE"), + Outdated("OUTDATED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Status of the Comment + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * Status of the Comment + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * Creation timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Creation timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private final PrincipalDetails createdBy; + + public PrincipalDetails getCreatedBy() { + return createdBy; + } + + /** + * Latest update timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * Latest update timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("updatedBy") + private final PrincipalDetails updatedBy; + + public PrincipalDetails getUpdatedBy() { + return updatedBy; + } + + /** + * Shows the status of an inline comments context + **/ + public enum ContextStatus { + Processed("PROCESSED"), + NeedsProcessing("NEEDS_PROCESSING"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ContextStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ContextStatus v : ContextStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ContextStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ContextStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ContextStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Shows the status of an inline comments context + **/ + @com.fasterxml.jackson.annotation.JsonProperty("contextStatus") + private final ContextStatus contextStatus; + + /** + * Shows the status of an inline comments context + * @return the value + **/ + public ContextStatus getContextStatus() { + return contextStatus; + } + + /** + * 4 line snippet to be displayed as context for inline comments + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commentContext") + private final java.util.List commentContext; + + /** + * 4 line snippet to be displayed as context for inline comments + * @return the value + **/ + public java.util.List getCommentContext() { + return commentContext; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PullRequestComment("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(", data=").append(String.valueOf(this.data)); + sb.append(", parentId=").append(String.valueOf(this.parentId)); + sb.append(", filePath=").append(String.valueOf(this.filePath)); + sb.append(", commitId=").append(String.valueOf(this.commitId)); + sb.append(", fileType=").append(String.valueOf(this.fileType)); + sb.append(", lineNumber=").append(String.valueOf(this.lineNumber)); + sb.append(", likes=").append(String.valueOf(this.likes)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", createdBy=").append(String.valueOf(this.createdBy)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", updatedBy=").append(String.valueOf(this.updatedBy)); + sb.append(", contextStatus=").append(String.valueOf(this.contextStatus)); + sb.append(", commentContext=").append(String.valueOf(this.commentContext)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PullRequestComment)) { + return false; + } + + PullRequestComment other = (PullRequestComment) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.data, other.data) + && java.util.Objects.equals(this.parentId, other.parentId) + && java.util.Objects.equals(this.filePath, other.filePath) + && java.util.Objects.equals(this.commitId, other.commitId) + && java.util.Objects.equals(this.fileType, other.fileType) + && java.util.Objects.equals(this.lineNumber, other.lineNumber) + && java.util.Objects.equals(this.likes, other.likes) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.createdBy, other.createdBy) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.updatedBy, other.updatedBy) + && java.util.Objects.equals(this.contextStatus, other.contextStatus) + && java.util.Objects.equals(this.commentContext, other.commentContext) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.data == null ? 43 : this.data.hashCode()); + result = (result * PRIME) + (this.parentId == null ? 43 : this.parentId.hashCode()); + result = (result * PRIME) + (this.filePath == null ? 43 : this.filePath.hashCode()); + result = (result * PRIME) + (this.commitId == null ? 43 : this.commitId.hashCode()); + result = (result * PRIME) + (this.fileType == null ? 43 : this.fileType.hashCode()); + result = (result * PRIME) + (this.lineNumber == null ? 43 : this.lineNumber.hashCode()); + result = (result * PRIME) + (this.likes == null ? 43 : this.likes.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.createdBy == null ? 43 : this.createdBy.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.updatedBy == null ? 43 : this.updatedBy.hashCode()); + result = + (result * PRIME) + + (this.contextStatus == null ? 43 : this.contextStatus.hashCode()); + result = + (result * PRIME) + + (this.commentContext == null ? 43 : this.commentContext.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestCommentCollection.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestCommentCollection.java new file mode 100644 index 00000000000..2d4b2477f9b --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestCommentCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Result of list pullRequest comments. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PullRequestCommentCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PullRequestCommentCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public PullRequestCommentCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of pullRequest comment objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of pullRequest comment objects. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PullRequestCommentCollection build() { + PullRequestCommentCollection model = new PullRequestCommentCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PullRequestCommentCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of pullRequest comment objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of pullRequest comment objects. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PullRequestCommentCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PullRequestCommentCollection)) { + return false; + } + + PullRequestCommentCollection other = (PullRequestCommentCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestCommentLikeCollection.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestCommentLikeCollection.java new file mode 100644 index 00000000000..14467f1a151 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestCommentLikeCollection.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Abstract of Pull Request Comment likes. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PullRequestCommentLikeCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PullRequestCommentLikeCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"users", "totalLikes"}) + public PullRequestCommentLikeCollection( + java.util.List users, Integer totalLikes) { + super(); + this.users = users; + this.totalLikes = totalLikes; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of liked users of whom liked the pull request comment (max size is 50). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("users") + private java.util.List users; + + /** + * List of liked users of whom liked the pull request comment (max size is 50). + * @param users the value to set + * @return this builder + **/ + public Builder users(java.util.List users) { + this.users = users; + this.__explicitlySet__.add("users"); + return this; + } + /** + * Total like counter + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalLikes") + private Integer totalLikes; + + /** + * Total like counter + * @param totalLikes the value to set + * @return this builder + **/ + public Builder totalLikes(Integer totalLikes) { + this.totalLikes = totalLikes; + this.__explicitlySet__.add("totalLikes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PullRequestCommentLikeCollection build() { + PullRequestCommentLikeCollection model = + new PullRequestCommentLikeCollection(this.users, this.totalLikes); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PullRequestCommentLikeCollection model) { + if (model.wasPropertyExplicitlySet("users")) { + this.users(model.getUsers()); + } + if (model.wasPropertyExplicitlySet("totalLikes")) { + this.totalLikes(model.getTotalLikes()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of liked users of whom liked the pull request comment (max size is 50). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("users") + private final java.util.List users; + + /** + * List of liked users of whom liked the pull request comment (max size is 50). + * @return the value + **/ + public java.util.List getUsers() { + return users; + } + + /** + * Total like counter + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalLikes") + private final Integer totalLikes; + + /** + * Total like counter + * @return the value + **/ + public Integer getTotalLikes() { + return totalLikes; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PullRequestCommentLikeCollection("); + sb.append("super=").append(super.toString()); + sb.append("users=").append(String.valueOf(this.users)); + sb.append(", totalLikes=").append(String.valueOf(this.totalLikes)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PullRequestCommentLikeCollection)) { + return false; + } + + PullRequestCommentLikeCollection other = (PullRequestCommentLikeCollection) o; + return java.util.Objects.equals(this.users, other.users) + && java.util.Objects.equals(this.totalLikes, other.totalLikes) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.users == null ? 43 : this.users.hashCode()); + result = (result * PRIME) + (this.totalLikes == null ? 43 : this.totalLikes.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestCommentSummary.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestCommentSummary.java new file mode 100644 index 00000000000..1dc2fcf2e14 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestCommentSummary.java @@ -0,0 +1,705 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * summary of a pullRequest comment + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PullRequestCommentSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PullRequestCommentSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "pullRequestId", + "data", + "parentId", + "filePath", + "commitId", + "fileType", + "lineNumber", + "likes", + "status", + "timeCreated", + "createdBy", + "timeUpdated", + "updatedBy", + "contextStatus", + "commentContext" + }) + public PullRequestCommentSummary( + String id, + String pullRequestId, + String data, + String parentId, + String filePath, + String commitId, + PullRequestComment.FileType fileType, + Integer lineNumber, + PullRequestCommentLikeCollection likes, + PullRequestComment.Status status, + java.util.Date timeCreated, + PrincipalDetails createdBy, + java.util.Date timeUpdated, + PrincipalDetails updatedBy, + PullRequestComment.ContextStatus contextStatus, + java.util.List commentContext) { + super(); + this.id = id; + this.pullRequestId = pullRequestId; + this.data = data; + this.parentId = parentId; + this.filePath = filePath; + this.commitId = commitId; + this.fileType = fileType; + this.lineNumber = lineNumber; + this.likes = likes; + this.status = status; + this.timeCreated = timeCreated; + this.createdBy = createdBy; + this.timeUpdated = timeUpdated; + this.updatedBy = updatedBy; + this.contextStatus = contextStatus; + this.commentContext = commentContext; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique identifier that is immutable on creation + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique identifier that is immutable on creation + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * OCID of the pull request that this comment belongs to + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pullRequestId") + private String pullRequestId; + + /** + * OCID of the pull request that this comment belongs to + * @param pullRequestId the value to set + * @return this builder + **/ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + this.__explicitlySet__.add("pullRequestId"); + return this; + } + /** + * Content of the Comment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("data") + private String data; + + /** + * Content of the Comment. + * @param data the value to set + * @return this builder + **/ + public Builder data(String data) { + this.data = data; + this.__explicitlySet__.add("data"); + return this; + } + /** + * ID of parent Comment + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentId") + private String parentId; + + /** + * ID of parent Comment + * @param parentId the value to set + * @return this builder + **/ + public Builder parentId(String parentId) { + this.parentId = parentId; + this.__explicitlySet__.add("parentId"); + return this; + } + /** + * File path in the commit + **/ + @com.fasterxml.jackson.annotation.JsonProperty("filePath") + private String filePath; + + /** + * File path in the commit + * @param filePath the value to set + * @return this builder + **/ + public Builder filePath(String filePath) { + this.filePath = filePath; + this.__explicitlySet__.add("filePath"); + return this; + } + /** + * Commit SHA + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitId") + private String commitId; + + /** + * Commit SHA + * @param commitId the value to set + * @return this builder + **/ + public Builder commitId(String commitId) { + this.commitId = commitId; + this.__explicitlySet__.add("commitId"); + return this; + } + /** + * File path in the target commit + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fileType") + private PullRequestComment.FileType fileType; + + /** + * File path in the target commit + * @param fileType the value to set + * @return this builder + **/ + public Builder fileType(PullRequestComment.FileType fileType) { + this.fileType = fileType; + this.__explicitlySet__.add("fileType"); + return this; + } + /** + * Line number in the file + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lineNumber") + private Integer lineNumber; + + /** + * Line number in the file + * @param lineNumber the value to set + * @return this builder + **/ + public Builder lineNumber(Integer lineNumber) { + this.lineNumber = lineNumber; + this.__explicitlySet__.add("lineNumber"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("likes") + private PullRequestCommentLikeCollection likes; + + public Builder likes(PullRequestCommentLikeCollection likes) { + this.likes = likes; + this.__explicitlySet__.add("likes"); + return this; + } + /** + * Status of the Comment + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private PullRequestComment.Status status; + + /** + * Status of the Comment + * @param status the value to set + * @return this builder + **/ + public Builder status(PullRequestComment.Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * Creation timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Creation timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private PrincipalDetails createdBy; + + public Builder createdBy(PrincipalDetails createdBy) { + this.createdBy = createdBy; + this.__explicitlySet__.add("createdBy"); + return this; + } + /** + * Latest update timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * Latest update timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("updatedBy") + private PrincipalDetails updatedBy; + + public Builder updatedBy(PrincipalDetails updatedBy) { + this.updatedBy = updatedBy; + this.__explicitlySet__.add("updatedBy"); + return this; + } + /** + * Shows the status of an inline comments context + **/ + @com.fasterxml.jackson.annotation.JsonProperty("contextStatus") + private PullRequestComment.ContextStatus contextStatus; + + /** + * Shows the status of an inline comments context + * @param contextStatus the value to set + * @return this builder + **/ + public Builder contextStatus(PullRequestComment.ContextStatus contextStatus) { + this.contextStatus = contextStatus; + this.__explicitlySet__.add("contextStatus"); + return this; + } + /** + * 4 line snippet to be displayed as context for inline comments + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commentContext") + private java.util.List commentContext; + + /** + * 4 line snippet to be displayed as context for inline comments + * @param commentContext the value to set + * @return this builder + **/ + public Builder commentContext(java.util.List commentContext) { + this.commentContext = commentContext; + this.__explicitlySet__.add("commentContext"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PullRequestCommentSummary build() { + PullRequestCommentSummary model = + new PullRequestCommentSummary( + this.id, + this.pullRequestId, + this.data, + this.parentId, + this.filePath, + this.commitId, + this.fileType, + this.lineNumber, + this.likes, + this.status, + this.timeCreated, + this.createdBy, + this.timeUpdated, + this.updatedBy, + this.contextStatus, + this.commentContext); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PullRequestCommentSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("pullRequestId")) { + this.pullRequestId(model.getPullRequestId()); + } + if (model.wasPropertyExplicitlySet("data")) { + this.data(model.getData()); + } + if (model.wasPropertyExplicitlySet("parentId")) { + this.parentId(model.getParentId()); + } + if (model.wasPropertyExplicitlySet("filePath")) { + this.filePath(model.getFilePath()); + } + if (model.wasPropertyExplicitlySet("commitId")) { + this.commitId(model.getCommitId()); + } + if (model.wasPropertyExplicitlySet("fileType")) { + this.fileType(model.getFileType()); + } + if (model.wasPropertyExplicitlySet("lineNumber")) { + this.lineNumber(model.getLineNumber()); + } + if (model.wasPropertyExplicitlySet("likes")) { + this.likes(model.getLikes()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("createdBy")) { + this.createdBy(model.getCreatedBy()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("updatedBy")) { + this.updatedBy(model.getUpdatedBy()); + } + if (model.wasPropertyExplicitlySet("contextStatus")) { + this.contextStatus(model.getContextStatus()); + } + if (model.wasPropertyExplicitlySet("commentContext")) { + this.commentContext(model.getCommentContext()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique identifier that is immutable on creation + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique identifier that is immutable on creation + * @return the value + **/ + public String getId() { + return id; + } + + /** + * OCID of the pull request that this comment belongs to + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pullRequestId") + private final String pullRequestId; + + /** + * OCID of the pull request that this comment belongs to + * @return the value + **/ + public String getPullRequestId() { + return pullRequestId; + } + + /** + * Content of the Comment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("data") + private final String data; + + /** + * Content of the Comment. + * @return the value + **/ + public String getData() { + return data; + } + + /** + * ID of parent Comment + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentId") + private final String parentId; + + /** + * ID of parent Comment + * @return the value + **/ + public String getParentId() { + return parentId; + } + + /** + * File path in the commit + **/ + @com.fasterxml.jackson.annotation.JsonProperty("filePath") + private final String filePath; + + /** + * File path in the commit + * @return the value + **/ + public String getFilePath() { + return filePath; + } + + /** + * Commit SHA + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitId") + private final String commitId; + + /** + * Commit SHA + * @return the value + **/ + public String getCommitId() { + return commitId; + } + + /** + * File path in the target commit + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fileType") + private final PullRequestComment.FileType fileType; + + /** + * File path in the target commit + * @return the value + **/ + public PullRequestComment.FileType getFileType() { + return fileType; + } + + /** + * Line number in the file + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lineNumber") + private final Integer lineNumber; + + /** + * Line number in the file + * @return the value + **/ + public Integer getLineNumber() { + return lineNumber; + } + + @com.fasterxml.jackson.annotation.JsonProperty("likes") + private final PullRequestCommentLikeCollection likes; + + public PullRequestCommentLikeCollection getLikes() { + return likes; + } + + /** + * Status of the Comment + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final PullRequestComment.Status status; + + /** + * Status of the Comment + * @return the value + **/ + public PullRequestComment.Status getStatus() { + return status; + } + + /** + * Creation timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Creation timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private final PrincipalDetails createdBy; + + public PrincipalDetails getCreatedBy() { + return createdBy; + } + + /** + * Latest update timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * Latest update timestamp. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339). + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("updatedBy") + private final PrincipalDetails updatedBy; + + public PrincipalDetails getUpdatedBy() { + return updatedBy; + } + + /** + * Shows the status of an inline comments context + **/ + @com.fasterxml.jackson.annotation.JsonProperty("contextStatus") + private final PullRequestComment.ContextStatus contextStatus; + + /** + * Shows the status of an inline comments context + * @return the value + **/ + public PullRequestComment.ContextStatus getContextStatus() { + return contextStatus; + } + + /** + * 4 line snippet to be displayed as context for inline comments + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commentContext") + private final java.util.List commentContext; + + /** + * 4 line snippet to be displayed as context for inline comments + * @return the value + **/ + public java.util.List getCommentContext() { + return commentContext; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PullRequestCommentSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(", data=").append(String.valueOf(this.data)); + sb.append(", parentId=").append(String.valueOf(this.parentId)); + sb.append(", filePath=").append(String.valueOf(this.filePath)); + sb.append(", commitId=").append(String.valueOf(this.commitId)); + sb.append(", fileType=").append(String.valueOf(this.fileType)); + sb.append(", lineNumber=").append(String.valueOf(this.lineNumber)); + sb.append(", likes=").append(String.valueOf(this.likes)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", createdBy=").append(String.valueOf(this.createdBy)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", updatedBy=").append(String.valueOf(this.updatedBy)); + sb.append(", contextStatus=").append(String.valueOf(this.contextStatus)); + sb.append(", commentContext=").append(String.valueOf(this.commentContext)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PullRequestCommentSummary)) { + return false; + } + + PullRequestCommentSummary other = (PullRequestCommentSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.data, other.data) + && java.util.Objects.equals(this.parentId, other.parentId) + && java.util.Objects.equals(this.filePath, other.filePath) + && java.util.Objects.equals(this.commitId, other.commitId) + && java.util.Objects.equals(this.fileType, other.fileType) + && java.util.Objects.equals(this.lineNumber, other.lineNumber) + && java.util.Objects.equals(this.likes, other.likes) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.createdBy, other.createdBy) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.updatedBy, other.updatedBy) + && java.util.Objects.equals(this.contextStatus, other.contextStatus) + && java.util.Objects.equals(this.commentContext, other.commentContext) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.data == null ? 43 : this.data.hashCode()); + result = (result * PRIME) + (this.parentId == null ? 43 : this.parentId.hashCode()); + result = (result * PRIME) + (this.filePath == null ? 43 : this.filePath.hashCode()); + result = (result * PRIME) + (this.commitId == null ? 43 : this.commitId.hashCode()); + result = (result * PRIME) + (this.fileType == null ? 43 : this.fileType.hashCode()); + result = (result * PRIME) + (this.lineNumber == null ? 43 : this.lineNumber.hashCode()); + result = (result * PRIME) + (this.likes == null ? 43 : this.likes.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.createdBy == null ? 43 : this.createdBy.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.updatedBy == null ? 43 : this.updatedBy.hashCode()); + result = + (result * PRIME) + + (this.contextStatus == null ? 43 : this.contextStatus.hashCode()); + result = + (result * PRIME) + + (this.commentContext == null ? 43 : this.commentContext.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestFileChangeCollection.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestFileChangeCollection.java new file mode 100644 index 00000000000..569343216fa --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestFileChangeCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Result of Pull Request difference. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PullRequestFileChangeCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PullRequestFileChangeCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public PullRequestFileChangeCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of objects describing Pull Request differences for changed files. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of objects describing Pull Request differences for changed files. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PullRequestFileChangeCollection build() { + PullRequestFileChangeCollection model = new PullRequestFileChangeCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PullRequestFileChangeCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of objects describing Pull Request differences for changed files. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of objects describing Pull Request differences for changed files. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PullRequestFileChangeCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PullRequestFileChangeCollection)) { + return false; + } + + PullRequestFileChangeCollection other = (PullRequestFileChangeCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestFileChangeSummary.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestFileChangeSummary.java new file mode 100644 index 00000000000..510506020af --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestFileChangeSummary.java @@ -0,0 +1,626 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Entry for description of change on a file. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PullRequestFileChangeSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PullRequestFileChangeSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "changeType", + "objectType", + "commitId", + "oldPath", + "newPath", + "oldId", + "newId", + "addedLinesCount", + "deletedLinesCount", + "hasConflicts", + "freeformTags", + "definedTags", + "systemTags" + }) + public PullRequestFileChangeSummary( + String changeType, + String objectType, + String commitId, + String oldPath, + String newPath, + String oldId, + String newId, + Integer addedLinesCount, + Integer deletedLinesCount, + Boolean hasConflicts, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.changeType = changeType; + this.objectType = objectType; + this.commitId = commitId; + this.oldPath = oldPath; + this.newPath = newPath; + this.oldId = oldId; + this.newId = newId; + this.addedLinesCount = addedLinesCount; + this.deletedLinesCount = deletedLinesCount; + this.hasConflicts = hasConflicts; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Type of change made to file. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("changeType") + private String changeType; + + /** + * Type of change made to file. + * @param changeType the value to set + * @return this builder + **/ + public Builder changeType(String changeType) { + this.changeType = changeType; + this.__explicitlySet__.add("changeType"); + return this; + } + /** + * The type of the changed object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectType") + private String objectType; + + /** + * The type of the changed object. + * @param objectType the value to set + * @return this builder + **/ + public Builder objectType(String objectType) { + this.objectType = objectType; + this.__explicitlySet__.add("objectType"); + return this; + } + /** + * The ID of the commit where the change is coming from. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitId") + private String commitId; + + /** + * The ID of the commit where the change is coming from. + * @param commitId the value to set + * @return this builder + **/ + public Builder commitId(String commitId) { + this.commitId = commitId; + this.__explicitlySet__.add("commitId"); + return this; + } + /** + * The path on the target to the changed object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("oldPath") + private String oldPath; + + /** + * The path on the target to the changed object. + * @param oldPath the value to set + * @return this builder + **/ + public Builder oldPath(String oldPath) { + this.oldPath = oldPath; + this.__explicitlySet__.add("oldPath"); + return this; + } + /** + * The path on the source to the changed object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("newPath") + private String newPath; + + /** + * The path on the source to the changed object. + * @param newPath the value to set + * @return this builder + **/ + public Builder newPath(String newPath) { + this.newPath = newPath; + this.__explicitlySet__.add("newPath"); + return this; + } + /** + * The ID of the changed object on the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("oldId") + private String oldId; + + /** + * The ID of the changed object on the target. + * @param oldId the value to set + * @return this builder + **/ + public Builder oldId(String oldId) { + this.oldId = oldId; + this.__explicitlySet__.add("oldId"); + return this; + } + /** + * The ID of the changed object on the source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("newId") + private String newId; + + /** + * The ID of the changed object on the source. + * @param newId the value to set + * @return this builder + **/ + public Builder newId(String newId) { + this.newId = newId; + this.__explicitlySet__.add("newId"); + return this; + } + /** + * The number of lines added in whole difference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("addedLinesCount") + private Integer addedLinesCount; + + /** + * The number of lines added in whole difference. + * @param addedLinesCount the value to set + * @return this builder + **/ + public Builder addedLinesCount(Integer addedLinesCount) { + this.addedLinesCount = addedLinesCount; + this.__explicitlySet__.add("addedLinesCount"); + return this; + } + /** + * The number of lines deleted in whole difference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deletedLinesCount") + private Integer deletedLinesCount; + + /** + * The number of lines deleted in whole difference. + * @param deletedLinesCount the value to set + * @return this builder + **/ + public Builder deletedLinesCount(Integer deletedLinesCount) { + this.deletedLinesCount = deletedLinesCount; + this.__explicitlySet__.add("deletedLinesCount"); + return this; + } + /** + * Indicates whether the changed file contains conflicts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hasConflicts") + private Boolean hasConflicts; + + /** + * Indicates whether the changed file contains conflicts. + * @param hasConflicts the value to set + * @return this builder + **/ + public Builder hasConflicts(Boolean hasConflicts) { + this.hasConflicts = hasConflicts; + this.__explicitlySet__.add("hasConflicts"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PullRequestFileChangeSummary build() { + PullRequestFileChangeSummary model = + new PullRequestFileChangeSummary( + this.changeType, + this.objectType, + this.commitId, + this.oldPath, + this.newPath, + this.oldId, + this.newId, + this.addedLinesCount, + this.deletedLinesCount, + this.hasConflicts, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PullRequestFileChangeSummary model) { + if (model.wasPropertyExplicitlySet("changeType")) { + this.changeType(model.getChangeType()); + } + if (model.wasPropertyExplicitlySet("objectType")) { + this.objectType(model.getObjectType()); + } + if (model.wasPropertyExplicitlySet("commitId")) { + this.commitId(model.getCommitId()); + } + if (model.wasPropertyExplicitlySet("oldPath")) { + this.oldPath(model.getOldPath()); + } + if (model.wasPropertyExplicitlySet("newPath")) { + this.newPath(model.getNewPath()); + } + if (model.wasPropertyExplicitlySet("oldId")) { + this.oldId(model.getOldId()); + } + if (model.wasPropertyExplicitlySet("newId")) { + this.newId(model.getNewId()); + } + if (model.wasPropertyExplicitlySet("addedLinesCount")) { + this.addedLinesCount(model.getAddedLinesCount()); + } + if (model.wasPropertyExplicitlySet("deletedLinesCount")) { + this.deletedLinesCount(model.getDeletedLinesCount()); + } + if (model.wasPropertyExplicitlySet("hasConflicts")) { + this.hasConflicts(model.getHasConflicts()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Type of change made to file. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("changeType") + private final String changeType; + + /** + * Type of change made to file. + * @return the value + **/ + public String getChangeType() { + return changeType; + } + + /** + * The type of the changed object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectType") + private final String objectType; + + /** + * The type of the changed object. + * @return the value + **/ + public String getObjectType() { + return objectType; + } + + /** + * The ID of the commit where the change is coming from. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commitId") + private final String commitId; + + /** + * The ID of the commit where the change is coming from. + * @return the value + **/ + public String getCommitId() { + return commitId; + } + + /** + * The path on the target to the changed object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("oldPath") + private final String oldPath; + + /** + * The path on the target to the changed object. + * @return the value + **/ + public String getOldPath() { + return oldPath; + } + + /** + * The path on the source to the changed object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("newPath") + private final String newPath; + + /** + * The path on the source to the changed object. + * @return the value + **/ + public String getNewPath() { + return newPath; + } + + /** + * The ID of the changed object on the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("oldId") + private final String oldId; + + /** + * The ID of the changed object on the target. + * @return the value + **/ + public String getOldId() { + return oldId; + } + + /** + * The ID of the changed object on the source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("newId") + private final String newId; + + /** + * The ID of the changed object on the source. + * @return the value + **/ + public String getNewId() { + return newId; + } + + /** + * The number of lines added in whole difference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("addedLinesCount") + private final Integer addedLinesCount; + + /** + * The number of lines added in whole difference. + * @return the value + **/ + public Integer getAddedLinesCount() { + return addedLinesCount; + } + + /** + * The number of lines deleted in whole difference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deletedLinesCount") + private final Integer deletedLinesCount; + + /** + * The number of lines deleted in whole difference. + * @return the value + **/ + public Integer getDeletedLinesCount() { + return deletedLinesCount; + } + + /** + * Indicates whether the changed file contains conflicts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hasConflicts") + private final Boolean hasConflicts; + + /** + * Indicates whether the changed file contains conflicts. + * @return the value + **/ + public Boolean getHasConflicts() { + return hasConflicts; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PullRequestFileChangeSummary("); + sb.append("super=").append(super.toString()); + sb.append("changeType=").append(String.valueOf(this.changeType)); + sb.append(", objectType=").append(String.valueOf(this.objectType)); + sb.append(", commitId=").append(String.valueOf(this.commitId)); + sb.append(", oldPath=").append(String.valueOf(this.oldPath)); + sb.append(", newPath=").append(String.valueOf(this.newPath)); + sb.append(", oldId=").append(String.valueOf(this.oldId)); + sb.append(", newId=").append(String.valueOf(this.newId)); + sb.append(", addedLinesCount=").append(String.valueOf(this.addedLinesCount)); + sb.append(", deletedLinesCount=").append(String.valueOf(this.deletedLinesCount)); + sb.append(", hasConflicts=").append(String.valueOf(this.hasConflicts)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PullRequestFileChangeSummary)) { + return false; + } + + PullRequestFileChangeSummary other = (PullRequestFileChangeSummary) o; + return java.util.Objects.equals(this.changeType, other.changeType) + && java.util.Objects.equals(this.objectType, other.objectType) + && java.util.Objects.equals(this.commitId, other.commitId) + && java.util.Objects.equals(this.oldPath, other.oldPath) + && java.util.Objects.equals(this.newPath, other.newPath) + && java.util.Objects.equals(this.oldId, other.oldId) + && java.util.Objects.equals(this.newId, other.newId) + && java.util.Objects.equals(this.addedLinesCount, other.addedLinesCount) + && java.util.Objects.equals(this.deletedLinesCount, other.deletedLinesCount) + && java.util.Objects.equals(this.hasConflicts, other.hasConflicts) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.changeType == null ? 43 : this.changeType.hashCode()); + result = (result * PRIME) + (this.objectType == null ? 43 : this.objectType.hashCode()); + result = (result * PRIME) + (this.commitId == null ? 43 : this.commitId.hashCode()); + result = (result * PRIME) + (this.oldPath == null ? 43 : this.oldPath.hashCode()); + result = (result * PRIME) + (this.newPath == null ? 43 : this.newPath.hashCode()); + result = (result * PRIME) + (this.oldId == null ? 43 : this.oldId.hashCode()); + result = (result * PRIME) + (this.newId == null ? 43 : this.newId.hashCode()); + result = + (result * PRIME) + + (this.addedLinesCount == null ? 43 : this.addedLinesCount.hashCode()); + result = + (result * PRIME) + + (this.deletedLinesCount == null ? 43 : this.deletedLinesCount.hashCode()); + result = (result * PRIME) + (this.hasConflicts == null ? 43 : this.hasConflicts.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestLifecycleActivitySummary.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestLifecycleActivitySummary.java new file mode 100644 index 00000000000..c7b6877171f --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestLifecycleActivitySummary.java @@ -0,0 +1,244 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * activity describing a pull request state change + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PullRequestLifecycleActivitySummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "activityType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PullRequestLifecycleActivitySummary extends PullRequestActivitySummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("principal") + private PrincipalDetails principal; + + public Builder principal(PrincipalDetails principal) { + this.principal = principal; + this.__explicitlySet__.add("principal"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("pullRequestId") + private String pullRequestId; + + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + this.__explicitlySet__.add("pullRequestId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeOccurred") + private java.util.Date timeOccurred; + + public Builder timeOccurred(java.util.Date timeOccurred) { + this.timeOccurred = timeOccurred; + this.__explicitlySet__.add("timeOccurred"); + return this; + } + /** + * The state of a pull request after an action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("state") + private State state; + + /** + * The state of a pull request after an action. + * @param state the value to set + * @return this builder + **/ + public Builder state(State state) { + this.state = state; + this.__explicitlySet__.add("state"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PullRequestLifecycleActivitySummary build() { + PullRequestLifecycleActivitySummary model = + new PullRequestLifecycleActivitySummary( + this.id, + this.principal, + this.pullRequestId, + this.timeOccurred, + this.state); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PullRequestLifecycleActivitySummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("principal")) { + this.principal(model.getPrincipal()); + } + if (model.wasPropertyExplicitlySet("pullRequestId")) { + this.pullRequestId(model.getPullRequestId()); + } + if (model.wasPropertyExplicitlySet("timeOccurred")) { + this.timeOccurred(model.getTimeOccurred()); + } + if (model.wasPropertyExplicitlySet("state")) { + this.state(model.getState()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PullRequestLifecycleActivitySummary( + String id, + PrincipalDetails principal, + String pullRequestId, + java.util.Date timeOccurred, + State state) { + super(id, principal, pullRequestId, timeOccurred); + this.state = state; + } + + /** + * The state of a pull request after an action. + **/ + public enum State { + Opened("OPENED"), + Closed("CLOSED"), + Merged("MERGED"), + Reopened("REOPENED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(State.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (State v : State.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + State(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static State create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'State', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The state of a pull request after an action. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("state") + private final State state; + + /** + * The state of a pull request after an action. + * @return the value + **/ + public State getState() { + return state; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PullRequestLifecycleActivitySummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", state=").append(String.valueOf(this.state)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PullRequestLifecycleActivitySummary)) { + return false; + } + + PullRequestLifecycleActivitySummary other = (PullRequestLifecycleActivitySummary) o; + return java.util.Objects.equals(this.state, other.state) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.state == null ? 43 : this.state.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestNotificationPreference.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestNotificationPreference.java new file mode 100644 index 00000000000..c6879fdf404 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestNotificationPreference.java @@ -0,0 +1,269 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The notification preference of the pull request. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PullRequestNotificationPreference.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PullRequestNotificationPreference + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"pullRequestId", "userId", "notificationPreference"}) + public PullRequestNotificationPreference( + String pullRequestId, String userId, NotificationPreference notificationPreference) { + super(); + this.pullRequestId = pullRequestId; + this.userId = userId; + this.notificationPreference = notificationPreference; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The ocid of pull request resource + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pullRequestId") + private String pullRequestId; + + /** + * The ocid of pull request resource + * @param pullRequestId the value to set + * @return this builder + **/ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + this.__explicitlySet__.add("pullRequestId"); + return this; + } + /** + * The ocid of user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userId") + private String userId; + + /** + * The ocid of user. + * @param userId the value to set + * @return this builder + **/ + public Builder userId(String userId) { + this.userId = userId; + this.__explicitlySet__.add("userId"); + return this; + } + /** + * The override value of pull request notification preference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationPreference") + private NotificationPreference notificationPreference; + + /** + * The override value of pull request notification preference. + * @param notificationPreference the value to set + * @return this builder + **/ + public Builder notificationPreference(NotificationPreference notificationPreference) { + this.notificationPreference = notificationPreference; + this.__explicitlySet__.add("notificationPreference"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PullRequestNotificationPreference build() { + PullRequestNotificationPreference model = + new PullRequestNotificationPreference( + this.pullRequestId, this.userId, this.notificationPreference); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PullRequestNotificationPreference model) { + if (model.wasPropertyExplicitlySet("pullRequestId")) { + this.pullRequestId(model.getPullRequestId()); + } + if (model.wasPropertyExplicitlySet("userId")) { + this.userId(model.getUserId()); + } + if (model.wasPropertyExplicitlySet("notificationPreference")) { + this.notificationPreference(model.getNotificationPreference()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The ocid of pull request resource + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pullRequestId") + private final String pullRequestId; + + /** + * The ocid of pull request resource + * @return the value + **/ + public String getPullRequestId() { + return pullRequestId; + } + + /** + * The ocid of user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userId") + private final String userId; + + /** + * The ocid of user. + * @return the value + **/ + public String getUserId() { + return userId; + } + + /** + * The override value of pull request notification preference. + **/ + public enum NotificationPreference { + Watch("WATCH"), + Ignore("IGNORE"), + Mention("MENTION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(NotificationPreference.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (NotificationPreference v : NotificationPreference.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + NotificationPreference(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static NotificationPreference create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'NotificationPreference', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The override value of pull request notification preference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationPreference") + private final NotificationPreference notificationPreference; + + /** + * The override value of pull request notification preference. + * @return the value + **/ + public NotificationPreference getNotificationPreference() { + return notificationPreference; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PullRequestNotificationPreference("); + sb.append("super=").append(super.toString()); + sb.append("pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(", userId=").append(String.valueOf(this.userId)); + sb.append(", notificationPreference=").append(String.valueOf(this.notificationPreference)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PullRequestNotificationPreference)) { + return false; + } + + PullRequestNotificationPreference other = (PullRequestNotificationPreference) o; + return java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.userId, other.userId) + && java.util.Objects.equals( + this.notificationPreference, other.notificationPreference) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.userId == null ? 43 : this.userId.hashCode()); + result = + (result * PRIME) + + (this.notificationPreference == null + ? 43 + : this.notificationPreference.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestSummary.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestSummary.java new file mode 100644 index 00000000000..c7dac99c10c --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/PullRequestSummary.java @@ -0,0 +1,915 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Summary of the Pull Request. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PullRequestSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PullRequestSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "compartmentId", + "description", + "repositoryId", + "sourceRepositoryId", + "sourceBranch", + "destinationBranch", + "sourceCommitIdAtTermination", + "mergeBaseCommitIdAtTermination", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "totalComments", + "totalReviewers", + "createdBy", + "freeformTags", + "definedTags", + "systemTags" + }) + public PullRequestSummary( + String id, + String displayName, + String compartmentId, + String description, + String repositoryId, + String sourceRepositoryId, + String sourceBranch, + String destinationBranch, + String sourceCommitIdAtTermination, + String mergeBaseCommitIdAtTermination, + java.util.Date timeCreated, + java.util.Date timeUpdated, + PullRequest.LifecycleState lifecycleState, + PullRequest.LifecycleDetails lifecycleDetails, + Integer totalComments, + Integer totalReviewers, + PrincipalDetails createdBy, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.compartmentId = compartmentId; + this.description = description; + this.repositoryId = repositoryId; + this.sourceRepositoryId = sourceRepositoryId; + this.sourceBranch = sourceBranch; + this.destinationBranch = destinationBranch; + this.sourceCommitIdAtTermination = sourceCommitIdAtTermination; + this.mergeBaseCommitIdAtTermination = mergeBaseCommitIdAtTermination; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.totalComments = totalComments; + this.totalReviewers = totalReviewers; + this.createdBy = createdBy; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique identifier that is immutable on creation + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique identifier that is immutable on creation + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Pull Request title, can be renamed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Pull Request title, can be renamed + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Compartment Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Compartment Identifier + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Details of the pull request. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Details of the pull request. Avoid entering confidential information. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * DevOps Repository Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("repositoryId") + private String repositoryId; + + /** + * DevOps Repository Identifier + * @param repositoryId the value to set + * @return this builder + **/ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + this.__explicitlySet__.add("repositoryId"); + return this; + } + /** + * The OCID of the forked repository that will act as the source of the changes to be included in the pull request against the parent repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceRepositoryId") + private String sourceRepositoryId; + + /** + * The OCID of the forked repository that will act as the source of the changes to be included in the pull request against the parent repository. + * @param sourceRepositoryId the value to set + * @return this builder + **/ + public Builder sourceRepositoryId(String sourceRepositoryId) { + this.sourceRepositoryId = sourceRepositoryId; + this.__explicitlySet__.add("sourceRepositoryId"); + return this; + } + /** + * The review branch which contains the changes to be reviewed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceBranch") + private String sourceBranch; + + /** + * The review branch which contains the changes to be reviewed. + * @param sourceBranch the value to set + * @return this builder + **/ + public Builder sourceBranch(String sourceBranch) { + this.sourceBranch = sourceBranch; + this.__explicitlySet__.add("sourceBranch"); + return this; + } + /** + * The destination branch against which the changes are to be reviewed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationBranch") + private String destinationBranch; + + /** + * The destination branch against which the changes are to be reviewed. + * @param destinationBranch the value to set + * @return this builder + **/ + public Builder destinationBranch(String destinationBranch) { + this.destinationBranch = destinationBranch; + this.__explicitlySet__.add("destinationBranch"); + return this; + } + /** + * The source branch commit ID when the Pull Request status was last changed to merged or closed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceCommitIdAtTermination") + private String sourceCommitIdAtTermination; + + /** + * The source branch commit ID when the Pull Request status was last changed to merged or closed + * @param sourceCommitIdAtTermination the value to set + * @return this builder + **/ + public Builder sourceCommitIdAtTermination(String sourceCommitIdAtTermination) { + this.sourceCommitIdAtTermination = sourceCommitIdAtTermination; + this.__explicitlySet__.add("sourceCommitIdAtTermination"); + return this; + } + /** + * The merge base commit ID when the Pull Request status was last changed to merged or closed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mergeBaseCommitIdAtTermination") + private String mergeBaseCommitIdAtTermination; + + /** + * The merge base commit ID when the Pull Request status was last changed to merged or closed + * @param mergeBaseCommitIdAtTermination the value to set + * @return this builder + **/ + public Builder mergeBaseCommitIdAtTermination(String mergeBaseCommitIdAtTermination) { + this.mergeBaseCommitIdAtTermination = mergeBaseCommitIdAtTermination; + this.__explicitlySet__.add("mergeBaseCommitIdAtTermination"); + return this; + } + /** + * The time the the Pull Request was created. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time the the Pull Request was created. An RFC3339 formatted datetime string + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time the Pull Request was updated. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time the Pull Request was updated. An RFC3339 formatted datetime string + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of the Pull Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private PullRequest.LifecycleState lifecycleState; + + /** + * The current state of the Pull Request. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(PullRequest.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The status of the Pull Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private PullRequest.LifecycleDetails lifecycleDetails; + + /** + * The status of the Pull Request. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(PullRequest.LifecycleDetails lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The total number of comments on the pull request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalComments") + private Integer totalComments; + + /** + * The total number of comments on the pull request. + * @param totalComments the value to set + * @return this builder + **/ + public Builder totalComments(Integer totalComments) { + this.totalComments = totalComments; + this.__explicitlySet__.add("totalComments"); + return this; + } + /** + * The total number of reviewers on the pull request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalReviewers") + private Integer totalReviewers; + + /** + * The total number of reviewers on the pull request. + * @param totalReviewers the value to set + * @return this builder + **/ + public Builder totalReviewers(Integer totalReviewers) { + this.totalReviewers = totalReviewers; + this.__explicitlySet__.add("totalReviewers"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private PrincipalDetails createdBy; + + public Builder createdBy(PrincipalDetails createdBy) { + this.createdBy = createdBy; + this.__explicitlySet__.add("createdBy"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PullRequestSummary build() { + PullRequestSummary model = + new PullRequestSummary( + this.id, + this.displayName, + this.compartmentId, + this.description, + this.repositoryId, + this.sourceRepositoryId, + this.sourceBranch, + this.destinationBranch, + this.sourceCommitIdAtTermination, + this.mergeBaseCommitIdAtTermination, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.totalComments, + this.totalReviewers, + this.createdBy, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PullRequestSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("repositoryId")) { + this.repositoryId(model.getRepositoryId()); + } + if (model.wasPropertyExplicitlySet("sourceRepositoryId")) { + this.sourceRepositoryId(model.getSourceRepositoryId()); + } + if (model.wasPropertyExplicitlySet("sourceBranch")) { + this.sourceBranch(model.getSourceBranch()); + } + if (model.wasPropertyExplicitlySet("destinationBranch")) { + this.destinationBranch(model.getDestinationBranch()); + } + if (model.wasPropertyExplicitlySet("sourceCommitIdAtTermination")) { + this.sourceCommitIdAtTermination(model.getSourceCommitIdAtTermination()); + } + if (model.wasPropertyExplicitlySet("mergeBaseCommitIdAtTermination")) { + this.mergeBaseCommitIdAtTermination(model.getMergeBaseCommitIdAtTermination()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("totalComments")) { + this.totalComments(model.getTotalComments()); + } + if (model.wasPropertyExplicitlySet("totalReviewers")) { + this.totalReviewers(model.getTotalReviewers()); + } + if (model.wasPropertyExplicitlySet("createdBy")) { + this.createdBy(model.getCreatedBy()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique identifier that is immutable on creation + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique identifier that is immutable on creation + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Pull Request title, can be renamed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Pull Request title, can be renamed + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Compartment Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Compartment Identifier + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Details of the pull request. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Details of the pull request. Avoid entering confidential information. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * DevOps Repository Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("repositoryId") + private final String repositoryId; + + /** + * DevOps Repository Identifier + * @return the value + **/ + public String getRepositoryId() { + return repositoryId; + } + + /** + * The OCID of the forked repository that will act as the source of the changes to be included in the pull request against the parent repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceRepositoryId") + private final String sourceRepositoryId; + + /** + * The OCID of the forked repository that will act as the source of the changes to be included in the pull request against the parent repository. + * @return the value + **/ + public String getSourceRepositoryId() { + return sourceRepositoryId; + } + + /** + * The review branch which contains the changes to be reviewed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceBranch") + private final String sourceBranch; + + /** + * The review branch which contains the changes to be reviewed. + * @return the value + **/ + public String getSourceBranch() { + return sourceBranch; + } + + /** + * The destination branch against which the changes are to be reviewed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationBranch") + private final String destinationBranch; + + /** + * The destination branch against which the changes are to be reviewed. + * @return the value + **/ + public String getDestinationBranch() { + return destinationBranch; + } + + /** + * The source branch commit ID when the Pull Request status was last changed to merged or closed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceCommitIdAtTermination") + private final String sourceCommitIdAtTermination; + + /** + * The source branch commit ID when the Pull Request status was last changed to merged or closed + * @return the value + **/ + public String getSourceCommitIdAtTermination() { + return sourceCommitIdAtTermination; + } + + /** + * The merge base commit ID when the Pull Request status was last changed to merged or closed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mergeBaseCommitIdAtTermination") + private final String mergeBaseCommitIdAtTermination; + + /** + * The merge base commit ID when the Pull Request status was last changed to merged or closed + * @return the value + **/ + public String getMergeBaseCommitIdAtTermination() { + return mergeBaseCommitIdAtTermination; + } + + /** + * The time the the Pull Request was created. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the the Pull Request was created. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the Pull Request was updated. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the Pull Request was updated. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the Pull Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final PullRequest.LifecycleState lifecycleState; + + /** + * The current state of the Pull Request. + * @return the value + **/ + public PullRequest.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The status of the Pull Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final PullRequest.LifecycleDetails lifecycleDetails; + + /** + * The status of the Pull Request. + * @return the value + **/ + public PullRequest.LifecycleDetails getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The total number of comments on the pull request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalComments") + private final Integer totalComments; + + /** + * The total number of comments on the pull request. + * @return the value + **/ + public Integer getTotalComments() { + return totalComments; + } + + /** + * The total number of reviewers on the pull request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalReviewers") + private final Integer totalReviewers; + + /** + * The total number of reviewers on the pull request. + * @return the value + **/ + public Integer getTotalReviewers() { + return totalReviewers; + } + + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private final PrincipalDetails createdBy; + + public PrincipalDetails getCreatedBy() { + return createdBy; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PullRequestSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(", sourceRepositoryId=").append(String.valueOf(this.sourceRepositoryId)); + sb.append(", sourceBranch=").append(String.valueOf(this.sourceBranch)); + sb.append(", destinationBranch=").append(String.valueOf(this.destinationBranch)); + sb.append(", sourceCommitIdAtTermination=") + .append(String.valueOf(this.sourceCommitIdAtTermination)); + sb.append(", mergeBaseCommitIdAtTermination=") + .append(String.valueOf(this.mergeBaseCommitIdAtTermination)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", totalComments=").append(String.valueOf(this.totalComments)); + sb.append(", totalReviewers=").append(String.valueOf(this.totalReviewers)); + sb.append(", createdBy=").append(String.valueOf(this.createdBy)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PullRequestSummary)) { + return false; + } + + PullRequestSummary other = (PullRequestSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals(this.sourceRepositoryId, other.sourceRepositoryId) + && java.util.Objects.equals(this.sourceBranch, other.sourceBranch) + && java.util.Objects.equals(this.destinationBranch, other.destinationBranch) + && java.util.Objects.equals( + this.sourceCommitIdAtTermination, other.sourceCommitIdAtTermination) + && java.util.Objects.equals( + this.mergeBaseCommitIdAtTermination, other.mergeBaseCommitIdAtTermination) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.totalComments, other.totalComments) + && java.util.Objects.equals(this.totalReviewers, other.totalReviewers) + && java.util.Objects.equals(this.createdBy, other.createdBy) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = + (result * PRIME) + + (this.sourceRepositoryId == null + ? 43 + : this.sourceRepositoryId.hashCode()); + result = (result * PRIME) + (this.sourceBranch == null ? 43 : this.sourceBranch.hashCode()); + result = + (result * PRIME) + + (this.destinationBranch == null ? 43 : this.destinationBranch.hashCode()); + result = + (result * PRIME) + + (this.sourceCommitIdAtTermination == null + ? 43 + : this.sourceCommitIdAtTermination.hashCode()); + result = + (result * PRIME) + + (this.mergeBaseCommitIdAtTermination == null + ? 43 + : this.mergeBaseCommitIdAtTermination.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = + (result * PRIME) + + (this.totalComments == null ? 43 : this.totalComments.hashCode()); + result = + (result * PRIME) + + (this.totalReviewers == null ? 43 : this.totalReviewers.hashCode()); + result = (result * PRIME) + (this.createdBy == null ? 43 : this.createdBy.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/Repository.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/Repository.java index c97507a4e2e..1ba77d3a278 100644 --- a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/Repository.java +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/Repository.java @@ -25,6 +25,7 @@ public final class Repository extends com.oracle.bmc.http.internal.ExplicitlySet "compartmentId", "namespace", "projectId", + "parentRepositoryId", "projectName", "sshUrl", "httpUrl", @@ -50,6 +51,7 @@ public Repository( String compartmentId, String namespace, String projectId, + String parentRepositoryId, String projectName, String sshUrl, String httpUrl, @@ -74,6 +76,7 @@ public Repository( this.compartmentId = compartmentId; this.namespace = namespace; this.projectId = projectId; + this.parentRepositoryId = parentRepositoryId; this.projectName = projectName; this.sshUrl = sshUrl; this.httpUrl = httpUrl; @@ -176,6 +179,22 @@ public Builder projectId(String projectId) { this.__explicitlySet__.add("projectId"); return this; } + /** + * The OCID of the parent repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentRepositoryId") + private String parentRepositoryId; + + /** + * The OCID of the parent repository. + * @param parentRepositoryId the value to set + * @return this builder + **/ + public Builder parentRepositoryId(String parentRepositoryId) { + this.parentRepositoryId = parentRepositoryId; + this.__explicitlySet__.add("parentRepositoryId"); + return this; + } /** * Unique project name in a namespace. **/ @@ -260,6 +279,7 @@ public Builder defaultBranch(String defaultBranch) { * Type of repository: * MIRRORED - Repository created by mirroring an existing repository. * HOSTED - Repository created and hosted using OCI DevOps code repository. + * FORKED - Repository created by forking an existing repository. * **/ @com.fasterxml.jackson.annotation.JsonProperty("repositoryType") @@ -269,6 +289,7 @@ public Builder defaultBranch(String defaultBranch) { * Type of repository: * MIRRORED - Repository created by mirroring an existing repository. * HOSTED - Repository created and hosted using OCI DevOps code repository. + * FORKED - Repository created by forking an existing repository. * * @param repositoryType the value to set * @return this builder @@ -486,6 +507,7 @@ public Repository build() { this.compartmentId, this.namespace, this.projectId, + this.parentRepositoryId, this.projectName, this.sshUrl, this.httpUrl, @@ -527,6 +549,9 @@ public Builder copy(Repository model) { if (model.wasPropertyExplicitlySet("projectId")) { this.projectId(model.getProjectId()); } + if (model.wasPropertyExplicitlySet("parentRepositoryId")) { + this.parentRepositoryId(model.getParentRepositoryId()); + } if (model.wasPropertyExplicitlySet("projectName")) { this.projectName(model.getProjectName()); } @@ -666,6 +691,20 @@ public String getProjectId() { return projectId; } + /** + * The OCID of the parent repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentRepositoryId") + private final String parentRepositoryId; + + /** + * The OCID of the parent repository. + * @return the value + **/ + public String getParentRepositoryId() { + return parentRepositoryId; + } + /** * Unique project name in a namespace. **/ @@ -740,11 +779,13 @@ public String getDefaultBranch() { * Type of repository: * MIRRORED - Repository created by mirroring an existing repository. * HOSTED - Repository created and hosted using OCI DevOps code repository. + * FORKED - Repository created by forking an existing repository. * **/ public enum RepositoryType { Mirrored("MIRRORED"), Hosted("HOSTED"), + Forked("FORKED"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -791,6 +832,7 @@ public static RepositoryType create(String key) { * Type of repository: * MIRRORED - Repository created by mirroring an existing repository. * HOSTED - Repository created and hosted using OCI DevOps code repository. + * FORKED - Repository created by forking an existing repository. * **/ @com.fasterxml.jackson.annotation.JsonProperty("repositoryType") @@ -800,6 +842,7 @@ public static RepositoryType create(String key) { * Type of repository: * MIRRORED - Repository created by mirroring an existing repository. * HOSTED - Repository created and hosted using OCI DevOps code repository. + * FORKED - Repository created by forking an existing repository. * * @return the value **/ @@ -849,6 +892,7 @@ public enum LifecycleState { Active("ACTIVE"), Creating("CREATING"), Deleted("DELETED"), + Failed("FAILED"), Deleting("DELETING"), /** @@ -1096,6 +1140,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", namespace=").append(String.valueOf(this.namespace)); sb.append(", projectId=").append(String.valueOf(this.projectId)); + sb.append(", parentRepositoryId=").append(String.valueOf(this.parentRepositoryId)); sb.append(", projectName=").append(String.valueOf(this.projectName)); sb.append(", sshUrl=").append(String.valueOf(this.sshUrl)); sb.append(", httpUrl=").append(String.valueOf(this.httpUrl)); @@ -1133,6 +1178,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.namespace, other.namespace) && java.util.Objects.equals(this.projectId, other.projectId) + && java.util.Objects.equals(this.parentRepositoryId, other.parentRepositoryId) && java.util.Objects.equals(this.projectName, other.projectName) && java.util.Objects.equals(this.sshUrl, other.sshUrl) && java.util.Objects.equals(this.httpUrl, other.httpUrl) @@ -1166,6 +1212,11 @@ public int hashCode() { + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.namespace == null ? 43 : this.namespace.hashCode()); result = (result * PRIME) + (this.projectId == null ? 43 : this.projectId.hashCode()); + result = + (result * PRIME) + + (this.parentRepositoryId == null + ? 43 + : this.parentRepositoryId.hashCode()); result = (result * PRIME) + (this.projectName == null ? 43 : this.projectName.hashCode()); result = (result * PRIME) + (this.sshUrl == null ? 43 : this.sshUrl.hashCode()); result = (result * PRIME) + (this.httpUrl == null ? 43 : this.httpUrl.hashCode()); diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/RepositoryAnalyticsDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/RepositoryAnalyticsDetails.java new file mode 100644 index 00000000000..b2fdb023dc0 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/RepositoryAnalyticsDetails.java @@ -0,0 +1,418 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Details of the user configured settings for viewing the metrics. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RepositoryAnalyticsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RepositoryAnalyticsDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "authorEmail", + "repositoryMetrics", + "aggregationDuration", + "startTime", + "endTime", + "groupBy" + }) + public RepositoryAnalyticsDetails( + String authorEmail, + java.util.List repositoryMetrics, + AggregationDuration aggregationDuration, + java.util.Date startTime, + java.util.Date endTime, + GroupBy groupBy) { + super(); + this.authorEmail = authorEmail; + this.repositoryMetrics = repositoryMetrics; + this.aggregationDuration = aggregationDuration; + this.startTime = startTime; + this.endTime = endTime; + this.groupBy = groupBy; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Email address of the author. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("authorEmail") + private String authorEmail; + + /** + * Email address of the author. + * @param authorEmail the value to set + * @return this builder + **/ + public Builder authorEmail(String authorEmail) { + this.authorEmail = authorEmail; + this.__explicitlySet__.add("authorEmail"); + return this; + } + /** + * The name of the metric to be filtered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("repositoryMetrics") + private java.util.List repositoryMetrics; + + /** + * The name of the metric to be filtered. + * @param repositoryMetrics the value to set + * @return this builder + **/ + public Builder repositoryMetrics(java.util.List repositoryMetrics) { + this.repositoryMetrics = repositoryMetrics; + this.__explicitlySet__.add("repositoryMetrics"); + return this; + } + /** + * Metrics aggregated for the defined period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("aggregationDuration") + private AggregationDuration aggregationDuration; + + /** + * Metrics aggregated for the defined period. + * @param aggregationDuration the value to set + * @return this builder + **/ + public Builder aggregationDuration(AggregationDuration aggregationDuration) { + this.aggregationDuration = aggregationDuration; + this.__explicitlySet__.add("aggregationDuration"); + return this; + } + /** + * The beginning of the metric data query time range. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startTime") + private java.util.Date startTime; + + /** + * The beginning of the metric data query time range. + * @param startTime the value to set + * @return this builder + **/ + public Builder startTime(java.util.Date startTime) { + this.startTime = startTime; + this.__explicitlySet__.add("startTime"); + return this; + } + /** + * The end of the metric data query time range. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("endTime") + private java.util.Date endTime; + + /** + * The end of the metric data query time range. + * @param endTime the value to set + * @return this builder + **/ + public Builder endTime(java.util.Date endTime) { + this.endTime = endTime; + this.__explicitlySet__.add("endTime"); + return this; + } + /** + * Attribute by which metric data has to be grouped + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupBy") + private GroupBy groupBy; + + /** + * Attribute by which metric data has to be grouped + * @param groupBy the value to set + * @return this builder + **/ + public Builder groupBy(GroupBy groupBy) { + this.groupBy = groupBy; + this.__explicitlySet__.add("groupBy"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RepositoryAnalyticsDetails build() { + RepositoryAnalyticsDetails model = + new RepositoryAnalyticsDetails( + this.authorEmail, + this.repositoryMetrics, + this.aggregationDuration, + this.startTime, + this.endTime, + this.groupBy); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RepositoryAnalyticsDetails model) { + if (model.wasPropertyExplicitlySet("authorEmail")) { + this.authorEmail(model.getAuthorEmail()); + } + if (model.wasPropertyExplicitlySet("repositoryMetrics")) { + this.repositoryMetrics(model.getRepositoryMetrics()); + } + if (model.wasPropertyExplicitlySet("aggregationDuration")) { + this.aggregationDuration(model.getAggregationDuration()); + } + if (model.wasPropertyExplicitlySet("startTime")) { + this.startTime(model.getStartTime()); + } + if (model.wasPropertyExplicitlySet("endTime")) { + this.endTime(model.getEndTime()); + } + if (model.wasPropertyExplicitlySet("groupBy")) { + this.groupBy(model.getGroupBy()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Email address of the author. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("authorEmail") + private final String authorEmail; + + /** + * Email address of the author. + * @return the value + **/ + public String getAuthorEmail() { + return authorEmail; + } + + /** + * The name of the metric to be filtered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("repositoryMetrics") + private final java.util.List repositoryMetrics; + + /** + * The name of the metric to be filtered. + * @return the value + **/ + public java.util.List getRepositoryMetrics() { + return repositoryMetrics; + } + + /** + * Metrics aggregated for the defined period. + **/ + public enum AggregationDuration { + Daily("DAILY"), + Weekly("WEEKLY"), + Monthly("MONTHLY"), + Yearly("YEARLY"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (AggregationDuration v : AggregationDuration.values()) { + map.put(v.getValue(), v); + } + } + + AggregationDuration(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AggregationDuration create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid AggregationDuration: " + key); + } + }; + /** + * Metrics aggregated for the defined period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("aggregationDuration") + private final AggregationDuration aggregationDuration; + + /** + * Metrics aggregated for the defined period. + * @return the value + **/ + public AggregationDuration getAggregationDuration() { + return aggregationDuration; + } + + /** + * The beginning of the metric data query time range. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startTime") + private final java.util.Date startTime; + + /** + * The beginning of the metric data query time range. + * @return the value + **/ + public java.util.Date getStartTime() { + return startTime; + } + + /** + * The end of the metric data query time range. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("endTime") + private final java.util.Date endTime; + + /** + * The end of the metric data query time range. + * @return the value + **/ + public java.util.Date getEndTime() { + return endTime; + } + + /** + * Attribute by which metric data has to be grouped + **/ + public enum GroupBy { + Author("AUTHOR"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (GroupBy v : GroupBy.values()) { + map.put(v.getValue(), v); + } + } + + GroupBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static GroupBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid GroupBy: " + key); + } + }; + /** + * Attribute by which metric data has to be grouped + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupBy") + private final GroupBy groupBy; + + /** + * Attribute by which metric data has to be grouped + * @return the value + **/ + public GroupBy getGroupBy() { + return groupBy; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RepositoryAnalyticsDetails("); + sb.append("super=").append(super.toString()); + sb.append("authorEmail=").append(String.valueOf(this.authorEmail)); + sb.append(", repositoryMetrics=").append(String.valueOf(this.repositoryMetrics)); + sb.append(", aggregationDuration=").append(String.valueOf(this.aggregationDuration)); + sb.append(", startTime=").append(String.valueOf(this.startTime)); + sb.append(", endTime=").append(String.valueOf(this.endTime)); + sb.append(", groupBy=").append(String.valueOf(this.groupBy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RepositoryAnalyticsDetails)) { + return false; + } + + RepositoryAnalyticsDetails other = (RepositoryAnalyticsDetails) o; + return java.util.Objects.equals(this.authorEmail, other.authorEmail) + && java.util.Objects.equals(this.repositoryMetrics, other.repositoryMetrics) + && java.util.Objects.equals(this.aggregationDuration, other.aggregationDuration) + && java.util.Objects.equals(this.startTime, other.startTime) + && java.util.Objects.equals(this.endTime, other.endTime) + && java.util.Objects.equals(this.groupBy, other.groupBy) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.authorEmail == null ? 43 : this.authorEmail.hashCode()); + result = + (result * PRIME) + + (this.repositoryMetrics == null ? 43 : this.repositoryMetrics.hashCode()); + result = + (result * PRIME) + + (this.aggregationDuration == null + ? 43 + : this.aggregationDuration.hashCode()); + result = (result * PRIME) + (this.startTime == null ? 43 : this.startTime.hashCode()); + result = (result * PRIME) + (this.endTime == null ? 43 : this.endTime.hashCode()); + result = (result * PRIME) + (this.groupBy == null ? 43 : this.groupBy.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/RepositoryMetricAggregation.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/RepositoryMetricAggregation.java new file mode 100644 index 00000000000..42fb769e375 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/RepositoryMetricAggregation.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The set of aggregated data returned for repository analytics. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RepositoryMetricAggregation.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RepositoryMetricAggregation + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public RepositoryMetricAggregation(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The metric data. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * The metric data. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RepositoryMetricAggregation build() { + RepositoryMetricAggregation model = new RepositoryMetricAggregation(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RepositoryMetricAggregation model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The metric data. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * The metric data. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RepositoryMetricAggregation("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RepositoryMetricAggregation)) { + return false; + } + + RepositoryMetricAggregation other = (RepositoryMetricAggregation) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/RepositoryMetricSummary.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/RepositoryMetricSummary.java new file mode 100644 index 00000000000..1356ca87404 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/RepositoryMetricSummary.java @@ -0,0 +1,357 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The metrics details of a repository resource. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RepositoryMetricSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RepositoryMetricSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "metricName", + "durationInSeconds", + "dimensions", + "startTimestampInEpochSeconds", + "count", + "sum" + }) + public RepositoryMetricSummary( + MetricName metricName, + Long durationInSeconds, + java.util.Map dimensions, + Long startTimestampInEpochSeconds, + Double count, + Double sum) { + super(); + this.metricName = metricName; + this.durationInSeconds = durationInSeconds; + this.dimensions = dimensions; + this.startTimestampInEpochSeconds = startTimestampInEpochSeconds; + this.count = count; + this.sum = sum; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Type of metric + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metricName") + private MetricName metricName; + + /** + * Type of metric + * @param metricName the value to set + * @return this builder + **/ + public Builder metricName(MetricName metricName) { + this.metricName = metricName; + this.__explicitlySet__.add("metricName"); + return this; + } + /** + * The duration of the returned aggregated data in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("durationInSeconds") + private Long durationInSeconds; + + /** + * The duration of the returned aggregated data in seconds. + * @param durationInSeconds the value to set + * @return this builder + **/ + public Builder durationInSeconds(Long durationInSeconds) { + this.durationInSeconds = durationInSeconds; + this.__explicitlySet__.add("durationInSeconds"); + return this; + } + /** + * The qualifiers provided in the definition of the returned metric. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dimensions") + private java.util.Map dimensions; + + /** + * The qualifiers provided in the definition of the returned metric. + * @param dimensions the value to set + * @return this builder + **/ + public Builder dimensions(java.util.Map dimensions) { + this.dimensions = dimensions; + this.__explicitlySet__.add("dimensions"); + return this; + } + /** + * The start time associated with the value of the metric. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startTimestampInEpochSeconds") + private Long startTimestampInEpochSeconds; + + /** + * The start time associated with the value of the metric. + * @param startTimestampInEpochSeconds the value to set + * @return this builder + **/ + public Builder startTimestampInEpochSeconds(Long startTimestampInEpochSeconds) { + this.startTimestampInEpochSeconds = startTimestampInEpochSeconds; + this.__explicitlySet__.add("startTimestampInEpochSeconds"); + return this; + } + /** + * Represents the total number of the metric being calculated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("count") + private Double count; + + /** + * Represents the total number of the metric being calculated. + * @param count the value to set + * @return this builder + **/ + public Builder count(Double count) { + this.count = count; + this.__explicitlySet__.add("count"); + return this; + } + /** + * Represents the total duration in days calculated corresponding to the total no. of PRs. + * This is used only for "PULL_REQUEST_REVIEW_START_DURATION_IN_DAYS" and "PULL_REQUEST_REVIEW_DURATION_IN_DAYS" metrics. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sum") + private Double sum; + + /** + * Represents the total duration in days calculated corresponding to the total no. of PRs. + * This is used only for "PULL_REQUEST_REVIEW_START_DURATION_IN_DAYS" and "PULL_REQUEST_REVIEW_DURATION_IN_DAYS" metrics. + * + * @param sum the value to set + * @return this builder + **/ + public Builder sum(Double sum) { + this.sum = sum; + this.__explicitlySet__.add("sum"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RepositoryMetricSummary build() { + RepositoryMetricSummary model = + new RepositoryMetricSummary( + this.metricName, + this.durationInSeconds, + this.dimensions, + this.startTimestampInEpochSeconds, + this.count, + this.sum); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RepositoryMetricSummary model) { + if (model.wasPropertyExplicitlySet("metricName")) { + this.metricName(model.getMetricName()); + } + if (model.wasPropertyExplicitlySet("durationInSeconds")) { + this.durationInSeconds(model.getDurationInSeconds()); + } + if (model.wasPropertyExplicitlySet("dimensions")) { + this.dimensions(model.getDimensions()); + } + if (model.wasPropertyExplicitlySet("startTimestampInEpochSeconds")) { + this.startTimestampInEpochSeconds(model.getStartTimestampInEpochSeconds()); + } + if (model.wasPropertyExplicitlySet("count")) { + this.count(model.getCount()); + } + if (model.wasPropertyExplicitlySet("sum")) { + this.sum(model.getSum()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Type of metric + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metricName") + private final MetricName metricName; + + /** + * Type of metric + * @return the value + **/ + public MetricName getMetricName() { + return metricName; + } + + /** + * The duration of the returned aggregated data in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("durationInSeconds") + private final Long durationInSeconds; + + /** + * The duration of the returned aggregated data in seconds. + * @return the value + **/ + public Long getDurationInSeconds() { + return durationInSeconds; + } + + /** + * The qualifiers provided in the definition of the returned metric. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dimensions") + private final java.util.Map dimensions; + + /** + * The qualifiers provided in the definition of the returned metric. + * @return the value + **/ + public java.util.Map getDimensions() { + return dimensions; + } + + /** + * The start time associated with the value of the metric. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startTimestampInEpochSeconds") + private final Long startTimestampInEpochSeconds; + + /** + * The start time associated with the value of the metric. + * @return the value + **/ + public Long getStartTimestampInEpochSeconds() { + return startTimestampInEpochSeconds; + } + + /** + * Represents the total number of the metric being calculated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("count") + private final Double count; + + /** + * Represents the total number of the metric being calculated. + * @return the value + **/ + public Double getCount() { + return count; + } + + /** + * Represents the total duration in days calculated corresponding to the total no. of PRs. + * This is used only for "PULL_REQUEST_REVIEW_START_DURATION_IN_DAYS" and "PULL_REQUEST_REVIEW_DURATION_IN_DAYS" metrics. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sum") + private final Double sum; + + /** + * Represents the total duration in days calculated corresponding to the total no. of PRs. + * This is used only for "PULL_REQUEST_REVIEW_START_DURATION_IN_DAYS" and "PULL_REQUEST_REVIEW_DURATION_IN_DAYS" metrics. + * + * @return the value + **/ + public Double getSum() { + return sum; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RepositoryMetricSummary("); + sb.append("super=").append(super.toString()); + sb.append("metricName=").append(String.valueOf(this.metricName)); + sb.append(", durationInSeconds=").append(String.valueOf(this.durationInSeconds)); + sb.append(", dimensions=").append(String.valueOf(this.dimensions)); + sb.append(", startTimestampInEpochSeconds=") + .append(String.valueOf(this.startTimestampInEpochSeconds)); + sb.append(", count=").append(String.valueOf(this.count)); + sb.append(", sum=").append(String.valueOf(this.sum)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RepositoryMetricSummary)) { + return false; + } + + RepositoryMetricSummary other = (RepositoryMetricSummary) o; + return java.util.Objects.equals(this.metricName, other.metricName) + && java.util.Objects.equals(this.durationInSeconds, other.durationInSeconds) + && java.util.Objects.equals(this.dimensions, other.dimensions) + && java.util.Objects.equals( + this.startTimestampInEpochSeconds, other.startTimestampInEpochSeconds) + && java.util.Objects.equals(this.count, other.count) + && java.util.Objects.equals(this.sum, other.sum) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.metricName == null ? 43 : this.metricName.hashCode()); + result = + (result * PRIME) + + (this.durationInSeconds == null ? 43 : this.durationInSeconds.hashCode()); + result = (result * PRIME) + (this.dimensions == null ? 43 : this.dimensions.hashCode()); + result = + (result * PRIME) + + (this.startTimestampInEpochSeconds == null + ? 43 + : this.startTimestampInEpochSeconds.hashCode()); + result = (result * PRIME) + (this.count == null ? 43 : this.count.hashCode()); + result = (result * PRIME) + (this.sum == null ? 43 : this.sum.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/RepositoryNotificationPreference.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/RepositoryNotificationPreference.java new file mode 100644 index 00000000000..7c17b4e8430 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/RepositoryNotificationPreference.java @@ -0,0 +1,268 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The notification preference of the repository. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RepositoryNotificationPreference.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RepositoryNotificationPreference + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"repositoryId", "userId", "notificationPreference"}) + public RepositoryNotificationPreference( + String repositoryId, String userId, NotificationPreference notificationPreference) { + super(); + this.repositoryId = repositoryId; + this.userId = userId; + this.notificationPreference = notificationPreference; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The ocid of repository resource + **/ + @com.fasterxml.jackson.annotation.JsonProperty("repositoryId") + private String repositoryId; + + /** + * The ocid of repository resource + * @param repositoryId the value to set + * @return this builder + **/ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + this.__explicitlySet__.add("repositoryId"); + return this; + } + /** + * The ocid of user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userId") + private String userId; + + /** + * The ocid of user. + * @param userId the value to set + * @return this builder + **/ + public Builder userId(String userId) { + this.userId = userId; + this.__explicitlySet__.add("userId"); + return this; + } + /** + * The override value of repository notification preference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationPreference") + private NotificationPreference notificationPreference; + + /** + * The override value of repository notification preference. + * @param notificationPreference the value to set + * @return this builder + **/ + public Builder notificationPreference(NotificationPreference notificationPreference) { + this.notificationPreference = notificationPreference; + this.__explicitlySet__.add("notificationPreference"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RepositoryNotificationPreference build() { + RepositoryNotificationPreference model = + new RepositoryNotificationPreference( + this.repositoryId, this.userId, this.notificationPreference); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RepositoryNotificationPreference model) { + if (model.wasPropertyExplicitlySet("repositoryId")) { + this.repositoryId(model.getRepositoryId()); + } + if (model.wasPropertyExplicitlySet("userId")) { + this.userId(model.getUserId()); + } + if (model.wasPropertyExplicitlySet("notificationPreference")) { + this.notificationPreference(model.getNotificationPreference()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The ocid of repository resource + **/ + @com.fasterxml.jackson.annotation.JsonProperty("repositoryId") + private final String repositoryId; + + /** + * The ocid of repository resource + * @return the value + **/ + public String getRepositoryId() { + return repositoryId; + } + + /** + * The ocid of user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userId") + private final String userId; + + /** + * The ocid of user. + * @return the value + **/ + public String getUserId() { + return userId; + } + + /** + * The override value of repository notification preference. + **/ + public enum NotificationPreference { + Watch("WATCH"), + Ignore("IGNORE"), + Mention("MENTION"), + Inherited("INHERITED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(NotificationPreference.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (NotificationPreference v : NotificationPreference.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + NotificationPreference(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static NotificationPreference create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'NotificationPreference', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The override value of repository notification preference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationPreference") + private final NotificationPreference notificationPreference; + + /** + * The override value of repository notification preference. + * @return the value + **/ + public NotificationPreference getNotificationPreference() { + return notificationPreference; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RepositoryNotificationPreference("); + sb.append("super=").append(super.toString()); + sb.append("repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(", userId=").append(String.valueOf(this.userId)); + sb.append(", notificationPreference=").append(String.valueOf(this.notificationPreference)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RepositoryNotificationPreference)) { + return false; + } + + RepositoryNotificationPreference other = (RepositoryNotificationPreference) o; + return java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals(this.userId, other.userId) + && java.util.Objects.equals( + this.notificationPreference, other.notificationPreference) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = (result * PRIME) + (this.userId == null ? 43 : this.userId.hashCode()); + result = + (result * PRIME) + + (this.notificationPreference == null + ? 43 + : this.notificationPreference.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/RepositorySettings.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/RepositorySettings.java new file mode 100644 index 00000000000..e9b82a9b571 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/RepositorySettings.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * User configured settings for repository resources + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RepositorySettings.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RepositorySettings extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"mergeChecks", "mergeSettings", "approvalRules"}) + public RepositorySettings( + MergeChecks mergeChecks, + MergeSettings mergeSettings, + ApprovalRuleCollection approvalRules) { + super(); + this.mergeChecks = mergeChecks; + this.mergeSettings = mergeSettings; + this.approvalRules = approvalRules; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("mergeChecks") + private MergeChecks mergeChecks; + + public Builder mergeChecks(MergeChecks mergeChecks) { + this.mergeChecks = mergeChecks; + this.__explicitlySet__.add("mergeChecks"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("mergeSettings") + private MergeSettings mergeSettings; + + public Builder mergeSettings(MergeSettings mergeSettings) { + this.mergeSettings = mergeSettings; + this.__explicitlySet__.add("mergeSettings"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("approvalRules") + private ApprovalRuleCollection approvalRules; + + public Builder approvalRules(ApprovalRuleCollection approvalRules) { + this.approvalRules = approvalRules; + this.__explicitlySet__.add("approvalRules"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RepositorySettings build() { + RepositorySettings model = + new RepositorySettings( + this.mergeChecks, this.mergeSettings, this.approvalRules); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RepositorySettings model) { + if (model.wasPropertyExplicitlySet("mergeChecks")) { + this.mergeChecks(model.getMergeChecks()); + } + if (model.wasPropertyExplicitlySet("mergeSettings")) { + this.mergeSettings(model.getMergeSettings()); + } + if (model.wasPropertyExplicitlySet("approvalRules")) { + this.approvalRules(model.getApprovalRules()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("mergeChecks") + private final MergeChecks mergeChecks; + + public MergeChecks getMergeChecks() { + return mergeChecks; + } + + @com.fasterxml.jackson.annotation.JsonProperty("mergeSettings") + private final MergeSettings mergeSettings; + + public MergeSettings getMergeSettings() { + return mergeSettings; + } + + @com.fasterxml.jackson.annotation.JsonProperty("approvalRules") + private final ApprovalRuleCollection approvalRules; + + public ApprovalRuleCollection getApprovalRules() { + return approvalRules; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RepositorySettings("); + sb.append("super=").append(super.toString()); + sb.append("mergeChecks=").append(String.valueOf(this.mergeChecks)); + sb.append(", mergeSettings=").append(String.valueOf(this.mergeSettings)); + sb.append(", approvalRules=").append(String.valueOf(this.approvalRules)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RepositorySettings)) { + return false; + } + + RepositorySettings other = (RepositorySettings) o; + return java.util.Objects.equals(this.mergeChecks, other.mergeChecks) + && java.util.Objects.equals(this.mergeSettings, other.mergeSettings) + && java.util.Objects.equals(this.approvalRules, other.approvalRules) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.mergeChecks == null ? 43 : this.mergeChecks.hashCode()); + result = + (result * PRIME) + + (this.mergeSettings == null ? 43 : this.mergeSettings.hashCode()); + result = + (result * PRIME) + + (this.approvalRules == null ? 43 : this.approvalRules.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/RepositorySummary.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/RepositorySummary.java index 8b83d6dd003..348734ace5f 100644 --- a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/RepositorySummary.java +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/RepositorySummary.java @@ -26,6 +26,7 @@ public final class RepositorySummary extends com.oracle.bmc.http.internal.Explic "name", "compartmentId", "projectId", + "parentRepositoryId", "namespace", "projectName", "description", @@ -47,6 +48,7 @@ public RepositorySummary( String name, String compartmentId, String projectId, + String parentRepositoryId, String namespace, String projectName, String description, @@ -67,6 +69,7 @@ public RepositorySummary( this.name = name; this.compartmentId = compartmentId; this.projectId = projectId; + this.parentRepositoryId = parentRepositoryId; this.namespace = namespace; this.projectName = projectName; this.description = description; @@ -150,6 +153,22 @@ public Builder projectId(String projectId) { this.__explicitlySet__.add("projectId"); return this; } + /** + * The OCID of the parent repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentRepositoryId") + private String parentRepositoryId; + + /** + * The OCID of the parent repository. + * @param parentRepositoryId the value to set + * @return this builder + **/ + public Builder parentRepositoryId(String parentRepositoryId) { + this.parentRepositoryId = parentRepositoryId; + this.__explicitlySet__.add("parentRepositoryId"); + return this; + } /** * Tenancy unique namespace. **/ @@ -218,6 +237,7 @@ public Builder defaultBranch(String defaultBranch) { * Type of repository. Allowed values: * {@code MIRRORED} * {@code HOSTED} + * {@code FORKED} * **/ @com.fasterxml.jackson.annotation.JsonProperty("repositoryType") @@ -227,6 +247,7 @@ public Builder defaultBranch(String defaultBranch) { * Type of repository. Allowed values: * {@code MIRRORED} * {@code HOSTED} + * {@code FORKED} * * @param repositoryType the value to set * @return this builder @@ -401,6 +422,7 @@ public RepositorySummary build() { this.name, this.compartmentId, this.projectId, + this.parentRepositoryId, this.namespace, this.projectName, this.description, @@ -436,6 +458,9 @@ public Builder copy(RepositorySummary model) { if (model.wasPropertyExplicitlySet("projectId")) { this.projectId(model.getProjectId()); } + if (model.wasPropertyExplicitlySet("parentRepositoryId")) { + this.parentRepositoryId(model.getParentRepositoryId()); + } if (model.wasPropertyExplicitlySet("namespace")) { this.namespace(model.getNamespace()); } @@ -552,6 +577,20 @@ public String getProjectId() { return projectId; } + /** + * The OCID of the parent repository. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentRepositoryId") + private final String parentRepositoryId; + + /** + * The OCID of the parent repository. + * @return the value + **/ + public String getParentRepositoryId() { + return parentRepositoryId; + } + /** * Tenancy unique namespace. **/ @@ -612,6 +651,7 @@ public String getDefaultBranch() { * Type of repository. Allowed values: * {@code MIRRORED} * {@code HOSTED} + * {@code FORKED} * **/ @com.fasterxml.jackson.annotation.JsonProperty("repositoryType") @@ -621,6 +661,7 @@ public String getDefaultBranch() { * Type of repository. Allowed values: * {@code MIRRORED} * {@code HOSTED} + * {@code FORKED} * * @return the value **/ @@ -779,6 +820,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", name=").append(String.valueOf(this.name)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", projectId=").append(String.valueOf(this.projectId)); + sb.append(", parentRepositoryId=").append(String.valueOf(this.parentRepositoryId)); sb.append(", namespace=").append(String.valueOf(this.namespace)); sb.append(", projectName=").append(String.valueOf(this.projectName)); sb.append(", description=").append(String.valueOf(this.description)); @@ -812,6 +854,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.name, other.name) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.projectId, other.projectId) + && java.util.Objects.equals(this.parentRepositoryId, other.parentRepositoryId) && java.util.Objects.equals(this.namespace, other.namespace) && java.util.Objects.equals(this.projectName, other.projectName) && java.util.Objects.equals(this.description, other.description) @@ -841,6 +884,11 @@ public int hashCode() { (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.projectId == null ? 43 : this.projectId.hashCode()); + result = + (result * PRIME) + + (this.parentRepositoryId == null + ? 43 + : this.parentRepositoryId.hashCode()); result = (result * PRIME) + (this.namespace == null ? 43 : this.namespace.hashCode()); result = (result * PRIME) + (this.projectName == null ? 43 : this.projectName.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ReviewPullRequestDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ReviewPullRequestDetails.java new file mode 100644 index 00000000000..8c8023ae297 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ReviewPullRequestDetails.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Details to submit pull request review + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ReviewPullRequestDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ReviewPullRequestDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"action"}) + public ReviewPullRequestDetails(Action action) { + super(); + this.action = action; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The review action taken + **/ + @com.fasterxml.jackson.annotation.JsonProperty("action") + private Action action; + + /** + * The review action taken + * @param action the value to set + * @return this builder + **/ + public Builder action(Action action) { + this.action = action; + this.__explicitlySet__.add("action"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ReviewPullRequestDetails build() { + ReviewPullRequestDetails model = new ReviewPullRequestDetails(this.action); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ReviewPullRequestDetails model) { + if (model.wasPropertyExplicitlySet("action")) { + this.action(model.getAction()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The review action taken + **/ + public enum Action { + Approve("APPROVE"), + Unapprove("UNAPPROVE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Action v : Action.values()) { + map.put(v.getValue(), v); + } + } + + Action(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Action create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Action: " + key); + } + }; + /** + * The review action taken + **/ + @com.fasterxml.jackson.annotation.JsonProperty("action") + private final Action action; + + /** + * The review action taken + * @return the value + **/ + public Action getAction() { + return action; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ReviewPullRequestDetails("); + sb.append("super=").append(super.toString()); + sb.append("action=").append(String.valueOf(this.action)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ReviewPullRequestDetails)) { + return false; + } + + ReviewPullRequestDetails other = (ReviewPullRequestDetails) o; + return java.util.Objects.equals(this.action, other.action) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.action == null ? 43 : this.action.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/Reviewer.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/Reviewer.java new file mode 100644 index 00000000000..1802b4d75dd --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/Reviewer.java @@ -0,0 +1,450 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Reviewer information. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Reviewer.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Reviewer extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "principalId", + "principalName", + "principalType", + "principalState", + "status" + }) + public Reviewer( + String principalId, + String principalName, + PrincipalType principalType, + PrincipalState principalState, + Status status) { + super(); + this.principalId = principalId; + this.principalName = principalName; + this.principalType = principalType; + this.principalState = principalState; + this.status = status; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Pull Request reviewer id + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalId") + private String principalId; + + /** + * Pull Request reviewer id + * @param principalId the value to set + * @return this builder + **/ + public Builder principalId(String principalId) { + this.principalId = principalId; + this.__explicitlySet__.add("principalId"); + return this; + } + /** + * the name of the principal + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalName") + private String principalName; + + /** + * the name of the principal + * @param principalName the value to set + * @return this builder + **/ + public Builder principalName(String principalName) { + this.principalName = principalName; + this.__explicitlySet__.add("principalName"); + return this; + } + /** + * the type of principal + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalType") + private PrincipalType principalType; + + /** + * the type of principal + * @param principalType the value to set + * @return this builder + **/ + public Builder principalType(PrincipalType principalType) { + this.principalType = principalType; + this.__explicitlySet__.add("principalType"); + return this; + } + /** + * The state of the principal, it can be active or inactive or suppressed for emails + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalState") + private PrincipalState principalState; + + /** + * The state of the principal, it can be active or inactive or suppressed for emails + * @param principalState the value to set + * @return this builder + **/ + public Builder principalState(PrincipalState principalState) { + this.principalState = principalState; + this.__explicitlySet__.add("principalState"); + return this; + } + /** + * The current state of the Review. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * The current state of the Review. + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Reviewer build() { + Reviewer model = + new Reviewer( + this.principalId, + this.principalName, + this.principalType, + this.principalState, + this.status); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Reviewer model) { + if (model.wasPropertyExplicitlySet("principalId")) { + this.principalId(model.getPrincipalId()); + } + if (model.wasPropertyExplicitlySet("principalName")) { + this.principalName(model.getPrincipalName()); + } + if (model.wasPropertyExplicitlySet("principalType")) { + this.principalType(model.getPrincipalType()); + } + if (model.wasPropertyExplicitlySet("principalState")) { + this.principalState(model.getPrincipalState()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Pull Request reviewer id + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalId") + private final String principalId; + + /** + * Pull Request reviewer id + * @return the value + **/ + public String getPrincipalId() { + return principalId; + } + + /** + * the name of the principal + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalName") + private final String principalName; + + /** + * the name of the principal + * @return the value + **/ + public String getPrincipalName() { + return principalName; + } + + /** + * the type of principal + **/ + public enum PrincipalType { + Service("SERVICE"), + User("USER"), + Instance("INSTANCE"), + Resource("RESOURCE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PrincipalType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PrincipalType v : PrincipalType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + PrincipalType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PrincipalType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'PrincipalType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * the type of principal + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalType") + private final PrincipalType principalType; + + /** + * the type of principal + * @return the value + **/ + public PrincipalType getPrincipalType() { + return principalType; + } + + /** + * The state of the principal, it can be active or inactive or suppressed for emails + **/ + public enum PrincipalState { + Active("ACTIVE"), + Inactive("INACTIVE"), + Suppressed("SUPPRESSED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PrincipalState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PrincipalState v : PrincipalState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + PrincipalState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PrincipalState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'PrincipalState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The state of the principal, it can be active or inactive or suppressed for emails + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalState") + private final PrincipalState principalState; + + /** + * The state of the principal, it can be active or inactive or suppressed for emails + * @return the value + **/ + public PrincipalState getPrincipalState() { + return principalState; + } + + /** + * The current state of the Review. + **/ + public enum Status { + Approved("APPROVED"), + ReviewPending("REVIEW_PENDING"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the Review. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * The current state of the Review. + * @return the value + **/ + public Status getStatus() { + return status; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Reviewer("); + sb.append("super=").append(super.toString()); + sb.append("principalId=").append(String.valueOf(this.principalId)); + sb.append(", principalName=").append(String.valueOf(this.principalName)); + sb.append(", principalType=").append(String.valueOf(this.principalType)); + sb.append(", principalState=").append(String.valueOf(this.principalState)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Reviewer)) { + return false; + } + + Reviewer other = (Reviewer) o; + return java.util.Objects.equals(this.principalId, other.principalId) + && java.util.Objects.equals(this.principalName, other.principalName) + && java.util.Objects.equals(this.principalType, other.principalType) + && java.util.Objects.equals(this.principalState, other.principalState) + && java.util.Objects.equals(this.status, other.status) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.principalId == null ? 43 : this.principalId.hashCode()); + result = + (result * PRIME) + + (this.principalName == null ? 43 : this.principalName.hashCode()); + result = + (result * PRIME) + + (this.principalType == null ? 43 : this.principalType.hashCode()); + result = + (result * PRIME) + + (this.principalState == null ? 43 : this.principalState.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ReviewerActivitySummary.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ReviewerActivitySummary.java new file mode 100644 index 00000000000..23a4756f28c --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ReviewerActivitySummary.java @@ -0,0 +1,239 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * activity describing reviewer updates to a pull request + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ReviewerActivitySummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "activityType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ReviewerActivitySummary extends PullRequestActivitySummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("principal") + private PrincipalDetails principal; + + public Builder principal(PrincipalDetails principal) { + this.principal = principal; + this.__explicitlySet__.add("principal"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("pullRequestId") + private String pullRequestId; + + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + this.__explicitlySet__.add("pullRequestId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeOccurred") + private java.util.Date timeOccurred; + + public Builder timeOccurred(java.util.Date timeOccurred) { + this.timeOccurred = timeOccurred; + this.__explicitlySet__.add("timeOccurred"); + return this; + } + /** + * list of reviewers added to a pull request + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reviewersAdded") + private java.util.List reviewersAdded; + + /** + * list of reviewers added to a pull request + * @param reviewersAdded the value to set + * @return this builder + **/ + public Builder reviewersAdded(java.util.List reviewersAdded) { + this.reviewersAdded = reviewersAdded; + this.__explicitlySet__.add("reviewersAdded"); + return this; + } + /** + * list of reviewers removed from a pull request + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reviewersRemoved") + private java.util.List reviewersRemoved; + + /** + * list of reviewers removed from a pull request + * @param reviewersRemoved the value to set + * @return this builder + **/ + public Builder reviewersRemoved(java.util.List reviewersRemoved) { + this.reviewersRemoved = reviewersRemoved; + this.__explicitlySet__.add("reviewersRemoved"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ReviewerActivitySummary build() { + ReviewerActivitySummary model = + new ReviewerActivitySummary( + this.id, + this.principal, + this.pullRequestId, + this.timeOccurred, + this.reviewersAdded, + this.reviewersRemoved); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ReviewerActivitySummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("principal")) { + this.principal(model.getPrincipal()); + } + if (model.wasPropertyExplicitlySet("pullRequestId")) { + this.pullRequestId(model.getPullRequestId()); + } + if (model.wasPropertyExplicitlySet("timeOccurred")) { + this.timeOccurred(model.getTimeOccurred()); + } + if (model.wasPropertyExplicitlySet("reviewersAdded")) { + this.reviewersAdded(model.getReviewersAdded()); + } + if (model.wasPropertyExplicitlySet("reviewersRemoved")) { + this.reviewersRemoved(model.getReviewersRemoved()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ReviewerActivitySummary( + String id, + PrincipalDetails principal, + String pullRequestId, + java.util.Date timeOccurred, + java.util.List reviewersAdded, + java.util.List reviewersRemoved) { + super(id, principal, pullRequestId, timeOccurred); + this.reviewersAdded = reviewersAdded; + this.reviewersRemoved = reviewersRemoved; + } + + /** + * list of reviewers added to a pull request + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reviewersAdded") + private final java.util.List reviewersAdded; + + /** + * list of reviewers added to a pull request + * @return the value + **/ + public java.util.List getReviewersAdded() { + return reviewersAdded; + } + + /** + * list of reviewers removed from a pull request + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reviewersRemoved") + private final java.util.List reviewersRemoved; + + /** + * list of reviewers removed from a pull request + * @return the value + **/ + public java.util.List getReviewersRemoved() { + return reviewersRemoved; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ReviewerActivitySummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", reviewersAdded=").append(String.valueOf(this.reviewersAdded)); + sb.append(", reviewersRemoved=").append(String.valueOf(this.reviewersRemoved)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ReviewerActivitySummary)) { + return false; + } + + ReviewerActivitySummary other = (ReviewerActivitySummary) o; + return java.util.Objects.equals(this.reviewersAdded, other.reviewersAdded) + && java.util.Objects.equals(this.reviewersRemoved, other.reviewersRemoved) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.reviewersAdded == null ? 43 : this.reviewersAdded.hashCode()); + result = + (result * PRIME) + + (this.reviewersRemoved == null ? 43 : this.reviewersRemoved.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/StageOutput.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/StageOutput.java new file mode 100644 index 00000000000..7ac19baf0bb --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/StageOutput.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Details of the generated artifact or report. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "outputType", + defaultImpl = StageOutput.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = TestReportOutput.class, + name = "TEST_REPORT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = GenericArtifacts.class, + name = "ARTIFACT" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class StageOutput extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"stepName"}) + protected StageOutput(String stepName) { + super(); + this.stepName = stepName; + } + + /** + * Name of stage step at which this output is generated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private final String stepName; + + /** + * Name of stage step at which this output is generated. + * @return the value + **/ + public String getStepName() { + return stepName; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("StageOutput("); + sb.append("super=").append(super.toString()); + sb.append("stepName=").append(String.valueOf(this.stepName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof StageOutput)) { + return false; + } + + StageOutput other = (StageOutput) o; + return java.util.Objects.equals(this.stepName, other.stepName) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.stepName == null ? 43 : this.stepName.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Type of output generated. + **/ + public enum OutputType { + Artifact("ARTIFACT"), + TestReport("TEST_REPORT"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OutputType v : OutputType.values()) { + map.put(v.getValue(), v); + } + } + + OutputType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OutputType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid OutputType: " + key); + } + }; +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/SummarizeProjectRepositoryAnalyticsDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/SummarizeProjectRepositoryAnalyticsDetails.java new file mode 100644 index 00000000000..496ddb8cfcd --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/SummarizeProjectRepositoryAnalyticsDetails.java @@ -0,0 +1,419 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Details of the user configured settings for viewing the metrics at project level. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SummarizeProjectRepositoryAnalyticsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SummarizeProjectRepositoryAnalyticsDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "authorEmail", + "repositoryMetrics", + "aggregationDuration", + "startTime", + "endTime", + "groupBy" + }) + public SummarizeProjectRepositoryAnalyticsDetails( + String authorEmail, + java.util.List repositoryMetrics, + AggregationDuration aggregationDuration, + java.util.Date startTime, + java.util.Date endTime, + GroupBy groupBy) { + super(); + this.authorEmail = authorEmail; + this.repositoryMetrics = repositoryMetrics; + this.aggregationDuration = aggregationDuration; + this.startTime = startTime; + this.endTime = endTime; + this.groupBy = groupBy; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Email address of the author. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("authorEmail") + private String authorEmail; + + /** + * Email address of the author. + * @param authorEmail the value to set + * @return this builder + **/ + public Builder authorEmail(String authorEmail) { + this.authorEmail = authorEmail; + this.__explicitlySet__.add("authorEmail"); + return this; + } + /** + * The name of the metric to be filtered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("repositoryMetrics") + private java.util.List repositoryMetrics; + + /** + * The name of the metric to be filtered. + * @param repositoryMetrics the value to set + * @return this builder + **/ + public Builder repositoryMetrics(java.util.List repositoryMetrics) { + this.repositoryMetrics = repositoryMetrics; + this.__explicitlySet__.add("repositoryMetrics"); + return this; + } + /** + * Metrics aggregated for the defined period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("aggregationDuration") + private AggregationDuration aggregationDuration; + + /** + * Metrics aggregated for the defined period. + * @param aggregationDuration the value to set + * @return this builder + **/ + public Builder aggregationDuration(AggregationDuration aggregationDuration) { + this.aggregationDuration = aggregationDuration; + this.__explicitlySet__.add("aggregationDuration"); + return this; + } + /** + * The beginning of the metric data query time range. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startTime") + private java.util.Date startTime; + + /** + * The beginning of the metric data query time range. + * @param startTime the value to set + * @return this builder + **/ + public Builder startTime(java.util.Date startTime) { + this.startTime = startTime; + this.__explicitlySet__.add("startTime"); + return this; + } + /** + * The end of the metric data query time range. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("endTime") + private java.util.Date endTime; + + /** + * The end of the metric data query time range. + * @param endTime the value to set + * @return this builder + **/ + public Builder endTime(java.util.Date endTime) { + this.endTime = endTime; + this.__explicitlySet__.add("endTime"); + return this; + } + /** + * Attribute by which metric data has to be grouped + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupBy") + private GroupBy groupBy; + + /** + * Attribute by which metric data has to be grouped + * @param groupBy the value to set + * @return this builder + **/ + public Builder groupBy(GroupBy groupBy) { + this.groupBy = groupBy; + this.__explicitlySet__.add("groupBy"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SummarizeProjectRepositoryAnalyticsDetails build() { + SummarizeProjectRepositoryAnalyticsDetails model = + new SummarizeProjectRepositoryAnalyticsDetails( + this.authorEmail, + this.repositoryMetrics, + this.aggregationDuration, + this.startTime, + this.endTime, + this.groupBy); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SummarizeProjectRepositoryAnalyticsDetails model) { + if (model.wasPropertyExplicitlySet("authorEmail")) { + this.authorEmail(model.getAuthorEmail()); + } + if (model.wasPropertyExplicitlySet("repositoryMetrics")) { + this.repositoryMetrics(model.getRepositoryMetrics()); + } + if (model.wasPropertyExplicitlySet("aggregationDuration")) { + this.aggregationDuration(model.getAggregationDuration()); + } + if (model.wasPropertyExplicitlySet("startTime")) { + this.startTime(model.getStartTime()); + } + if (model.wasPropertyExplicitlySet("endTime")) { + this.endTime(model.getEndTime()); + } + if (model.wasPropertyExplicitlySet("groupBy")) { + this.groupBy(model.getGroupBy()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Email address of the author. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("authorEmail") + private final String authorEmail; + + /** + * Email address of the author. + * @return the value + **/ + public String getAuthorEmail() { + return authorEmail; + } + + /** + * The name of the metric to be filtered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("repositoryMetrics") + private final java.util.List repositoryMetrics; + + /** + * The name of the metric to be filtered. + * @return the value + **/ + public java.util.List getRepositoryMetrics() { + return repositoryMetrics; + } + + /** + * Metrics aggregated for the defined period. + **/ + public enum AggregationDuration { + Daily("DAILY"), + Weekly("WEEKLY"), + Monthly("MONTHLY"), + Yearly("YEARLY"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (AggregationDuration v : AggregationDuration.values()) { + map.put(v.getValue(), v); + } + } + + AggregationDuration(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AggregationDuration create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid AggregationDuration: " + key); + } + }; + /** + * Metrics aggregated for the defined period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("aggregationDuration") + private final AggregationDuration aggregationDuration; + + /** + * Metrics aggregated for the defined period. + * @return the value + **/ + public AggregationDuration getAggregationDuration() { + return aggregationDuration; + } + + /** + * The beginning of the metric data query time range. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startTime") + private final java.util.Date startTime; + + /** + * The beginning of the metric data query time range. + * @return the value + **/ + public java.util.Date getStartTime() { + return startTime; + } + + /** + * The end of the metric data query time range. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("endTime") + private final java.util.Date endTime; + + /** + * The end of the metric data query time range. + * @return the value + **/ + public java.util.Date getEndTime() { + return endTime; + } + + /** + * Attribute by which metric data has to be grouped + **/ + public enum GroupBy { + Author("AUTHOR"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (GroupBy v : GroupBy.values()) { + map.put(v.getValue(), v); + } + } + + GroupBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static GroupBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid GroupBy: " + key); + } + }; + /** + * Attribute by which metric data has to be grouped + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupBy") + private final GroupBy groupBy; + + /** + * Attribute by which metric data has to be grouped + * @return the value + **/ + public GroupBy getGroupBy() { + return groupBy; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SummarizeProjectRepositoryAnalyticsDetails("); + sb.append("super=").append(super.toString()); + sb.append("authorEmail=").append(String.valueOf(this.authorEmail)); + sb.append(", repositoryMetrics=").append(String.valueOf(this.repositoryMetrics)); + sb.append(", aggregationDuration=").append(String.valueOf(this.aggregationDuration)); + sb.append(", startTime=").append(String.valueOf(this.startTime)); + sb.append(", endTime=").append(String.valueOf(this.endTime)); + sb.append(", groupBy=").append(String.valueOf(this.groupBy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SummarizeProjectRepositoryAnalyticsDetails)) { + return false; + } + + SummarizeProjectRepositoryAnalyticsDetails other = + (SummarizeProjectRepositoryAnalyticsDetails) o; + return java.util.Objects.equals(this.authorEmail, other.authorEmail) + && java.util.Objects.equals(this.repositoryMetrics, other.repositoryMetrics) + && java.util.Objects.equals(this.aggregationDuration, other.aggregationDuration) + && java.util.Objects.equals(this.startTime, other.startTime) + && java.util.Objects.equals(this.endTime, other.endTime) + && java.util.Objects.equals(this.groupBy, other.groupBy) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.authorEmail == null ? 43 : this.authorEmail.hashCode()); + result = + (result * PRIME) + + (this.repositoryMetrics == null ? 43 : this.repositoryMetrics.hashCode()); + result = + (result * PRIME) + + (this.aggregationDuration == null + ? 43 + : this.aggregationDuration.hashCode()); + result = (result * PRIME) + (this.startTime == null ? 43 : this.startTime.hashCode()); + result = (result * PRIME) + (this.endTime == null ? 43 : this.endTime.hashCode()); + result = (result * PRIME) + (this.groupBy == null ? 43 : this.groupBy.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/SummarizeRepositoryAnalyticsDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/SummarizeRepositoryAnalyticsDetails.java new file mode 100644 index 00000000000..28adeaaa96d --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/SummarizeRepositoryAnalyticsDetails.java @@ -0,0 +1,418 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Details of the user configured settings for viewing the metrics at repository level. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SummarizeRepositoryAnalyticsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SummarizeRepositoryAnalyticsDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "authorEmail", + "repositoryMetrics", + "aggregationDuration", + "startTime", + "endTime", + "groupBy" + }) + public SummarizeRepositoryAnalyticsDetails( + String authorEmail, + java.util.List repositoryMetrics, + AggregationDuration aggregationDuration, + java.util.Date startTime, + java.util.Date endTime, + GroupBy groupBy) { + super(); + this.authorEmail = authorEmail; + this.repositoryMetrics = repositoryMetrics; + this.aggregationDuration = aggregationDuration; + this.startTime = startTime; + this.endTime = endTime; + this.groupBy = groupBy; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Email address of the author. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("authorEmail") + private String authorEmail; + + /** + * Email address of the author. + * @param authorEmail the value to set + * @return this builder + **/ + public Builder authorEmail(String authorEmail) { + this.authorEmail = authorEmail; + this.__explicitlySet__.add("authorEmail"); + return this; + } + /** + * The name of the metric to be filtered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("repositoryMetrics") + private java.util.List repositoryMetrics; + + /** + * The name of the metric to be filtered. + * @param repositoryMetrics the value to set + * @return this builder + **/ + public Builder repositoryMetrics(java.util.List repositoryMetrics) { + this.repositoryMetrics = repositoryMetrics; + this.__explicitlySet__.add("repositoryMetrics"); + return this; + } + /** + * Metrics aggregated for the defined period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("aggregationDuration") + private AggregationDuration aggregationDuration; + + /** + * Metrics aggregated for the defined period. + * @param aggregationDuration the value to set + * @return this builder + **/ + public Builder aggregationDuration(AggregationDuration aggregationDuration) { + this.aggregationDuration = aggregationDuration; + this.__explicitlySet__.add("aggregationDuration"); + return this; + } + /** + * The beginning of the metric data query time range. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startTime") + private java.util.Date startTime; + + /** + * The beginning of the metric data query time range. + * @param startTime the value to set + * @return this builder + **/ + public Builder startTime(java.util.Date startTime) { + this.startTime = startTime; + this.__explicitlySet__.add("startTime"); + return this; + } + /** + * The end of the metric data query time range. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("endTime") + private java.util.Date endTime; + + /** + * The end of the metric data query time range. + * @param endTime the value to set + * @return this builder + **/ + public Builder endTime(java.util.Date endTime) { + this.endTime = endTime; + this.__explicitlySet__.add("endTime"); + return this; + } + /** + * Attribute by which metric data has to be grouped + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupBy") + private GroupBy groupBy; + + /** + * Attribute by which metric data has to be grouped + * @param groupBy the value to set + * @return this builder + **/ + public Builder groupBy(GroupBy groupBy) { + this.groupBy = groupBy; + this.__explicitlySet__.add("groupBy"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SummarizeRepositoryAnalyticsDetails build() { + SummarizeRepositoryAnalyticsDetails model = + new SummarizeRepositoryAnalyticsDetails( + this.authorEmail, + this.repositoryMetrics, + this.aggregationDuration, + this.startTime, + this.endTime, + this.groupBy); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SummarizeRepositoryAnalyticsDetails model) { + if (model.wasPropertyExplicitlySet("authorEmail")) { + this.authorEmail(model.getAuthorEmail()); + } + if (model.wasPropertyExplicitlySet("repositoryMetrics")) { + this.repositoryMetrics(model.getRepositoryMetrics()); + } + if (model.wasPropertyExplicitlySet("aggregationDuration")) { + this.aggregationDuration(model.getAggregationDuration()); + } + if (model.wasPropertyExplicitlySet("startTime")) { + this.startTime(model.getStartTime()); + } + if (model.wasPropertyExplicitlySet("endTime")) { + this.endTime(model.getEndTime()); + } + if (model.wasPropertyExplicitlySet("groupBy")) { + this.groupBy(model.getGroupBy()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Email address of the author. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("authorEmail") + private final String authorEmail; + + /** + * Email address of the author. + * @return the value + **/ + public String getAuthorEmail() { + return authorEmail; + } + + /** + * The name of the metric to be filtered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("repositoryMetrics") + private final java.util.List repositoryMetrics; + + /** + * The name of the metric to be filtered. + * @return the value + **/ + public java.util.List getRepositoryMetrics() { + return repositoryMetrics; + } + + /** + * Metrics aggregated for the defined period. + **/ + public enum AggregationDuration { + Daily("DAILY"), + Weekly("WEEKLY"), + Monthly("MONTHLY"), + Yearly("YEARLY"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (AggregationDuration v : AggregationDuration.values()) { + map.put(v.getValue(), v); + } + } + + AggregationDuration(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AggregationDuration create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid AggregationDuration: " + key); + } + }; + /** + * Metrics aggregated for the defined period. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("aggregationDuration") + private final AggregationDuration aggregationDuration; + + /** + * Metrics aggregated for the defined period. + * @return the value + **/ + public AggregationDuration getAggregationDuration() { + return aggregationDuration; + } + + /** + * The beginning of the metric data query time range. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startTime") + private final java.util.Date startTime; + + /** + * The beginning of the metric data query time range. + * @return the value + **/ + public java.util.Date getStartTime() { + return startTime; + } + + /** + * The end of the metric data query time range. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("endTime") + private final java.util.Date endTime; + + /** + * The end of the metric data query time range. + * @return the value + **/ + public java.util.Date getEndTime() { + return endTime; + } + + /** + * Attribute by which metric data has to be grouped + **/ + public enum GroupBy { + Author("AUTHOR"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (GroupBy v : GroupBy.values()) { + map.put(v.getValue(), v); + } + } + + GroupBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static GroupBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid GroupBy: " + key); + } + }; + /** + * Attribute by which metric data has to be grouped + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupBy") + private final GroupBy groupBy; + + /** + * Attribute by which metric data has to be grouped + * @return the value + **/ + public GroupBy getGroupBy() { + return groupBy; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SummarizeRepositoryAnalyticsDetails("); + sb.append("super=").append(super.toString()); + sb.append("authorEmail=").append(String.valueOf(this.authorEmail)); + sb.append(", repositoryMetrics=").append(String.valueOf(this.repositoryMetrics)); + sb.append(", aggregationDuration=").append(String.valueOf(this.aggregationDuration)); + sb.append(", startTime=").append(String.valueOf(this.startTime)); + sb.append(", endTime=").append(String.valueOf(this.endTime)); + sb.append(", groupBy=").append(String.valueOf(this.groupBy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SummarizeRepositoryAnalyticsDetails)) { + return false; + } + + SummarizeRepositoryAnalyticsDetails other = (SummarizeRepositoryAnalyticsDetails) o; + return java.util.Objects.equals(this.authorEmail, other.authorEmail) + && java.util.Objects.equals(this.repositoryMetrics, other.repositoryMetrics) + && java.util.Objects.equals(this.aggregationDuration, other.aggregationDuration) + && java.util.Objects.equals(this.startTime, other.startTime) + && java.util.Objects.equals(this.endTime, other.endTime) + && java.util.Objects.equals(this.groupBy, other.groupBy) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.authorEmail == null ? 43 : this.authorEmail.hashCode()); + result = + (result * PRIME) + + (this.repositoryMetrics == null ? 43 : this.repositoryMetrics.hashCode()); + result = + (result * PRIME) + + (this.aggregationDuration == null + ? 43 + : this.aggregationDuration.hashCode()); + result = (result * PRIME) + (this.startTime == null ? 43 : this.startTime.hashCode()); + result = (result * PRIME) + (this.endTime == null ? 43 : this.endTime.hashCode()); + result = (result * PRIME) + (this.groupBy == null ? 43 : this.groupBy.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/SyncRepositoryDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/SyncRepositoryDetails.java new file mode 100644 index 00000000000..0735d3c2645 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/SyncRepositoryDetails.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Details required for syncing a repository with its upstream. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SyncRepositoryDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SyncRepositoryDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"sourceBranch", "destinationBranch"}) + public SyncRepositoryDetails(String sourceBranch, String destinationBranch) { + super(); + this.sourceBranch = sourceBranch; + this.destinationBranch = destinationBranch; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The branch in the upstream repository we want to sync from. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceBranch") + private String sourceBranch; + + /** + * The branch in the upstream repository we want to sync from. + * @param sourceBranch the value to set + * @return this builder + **/ + public Builder sourceBranch(String sourceBranch) { + this.sourceBranch = sourceBranch; + this.__explicitlySet__.add("sourceBranch"); + return this; + } + /** + * The branch in the repository we want to be updated with changes from the upstream. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationBranch") + private String destinationBranch; + + /** + * The branch in the repository we want to be updated with changes from the upstream. + * @param destinationBranch the value to set + * @return this builder + **/ + public Builder destinationBranch(String destinationBranch) { + this.destinationBranch = destinationBranch; + this.__explicitlySet__.add("destinationBranch"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SyncRepositoryDetails build() { + SyncRepositoryDetails model = + new SyncRepositoryDetails(this.sourceBranch, this.destinationBranch); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SyncRepositoryDetails model) { + if (model.wasPropertyExplicitlySet("sourceBranch")) { + this.sourceBranch(model.getSourceBranch()); + } + if (model.wasPropertyExplicitlySet("destinationBranch")) { + this.destinationBranch(model.getDestinationBranch()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The branch in the upstream repository we want to sync from. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceBranch") + private final String sourceBranch; + + /** + * The branch in the upstream repository we want to sync from. + * @return the value + **/ + public String getSourceBranch() { + return sourceBranch; + } + + /** + * The branch in the repository we want to be updated with changes from the upstream. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationBranch") + private final String destinationBranch; + + /** + * The branch in the repository we want to be updated with changes from the upstream. + * @return the value + **/ + public String getDestinationBranch() { + return destinationBranch; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SyncRepositoryDetails("); + sb.append("super=").append(super.toString()); + sb.append("sourceBranch=").append(String.valueOf(this.sourceBranch)); + sb.append(", destinationBranch=").append(String.valueOf(this.destinationBranch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SyncRepositoryDetails)) { + return false; + } + + SyncRepositoryDetails other = (SyncRepositoryDetails) o; + return java.util.Objects.equals(this.sourceBranch, other.sourceBranch) + && java.util.Objects.equals(this.destinationBranch, other.destinationBranch) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.sourceBranch == null ? 43 : this.sourceBranch.hashCode()); + result = + (result * PRIME) + + (this.destinationBranch == null ? 43 : this.destinationBranch.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/TestReportOutput.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/TestReportOutput.java new file mode 100644 index 00000000000..524974c090e --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/TestReportOutput.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Details of test report generated via pipeline run + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = TestReportOutput.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "outputType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class TestReportOutput extends StageOutput { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private String stepName; + + public Builder stepName(String stepName) { + this.stepName = stepName; + this.__explicitlySet__.add("stepName"); + return this; + } + /** + * The OCID of the test report. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the test report. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public TestReportOutput build() { + TestReportOutput model = new TestReportOutput(this.stepName, this.id); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(TestReportOutput model) { + if (model.wasPropertyExplicitlySet("stepName")) { + this.stepName(model.getStepName()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public TestReportOutput(String stepName, String id) { + super(stepName); + this.id = id; + } + + /** + * The OCID of the test report. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the test report. + * @return the value + **/ + public String getId() { + return id; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TestReportOutput("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TestReportOutput)) { + return false; + } + + TestReportOutput other = (TestReportOutput) o; + return java.util.Objects.equals(this.id, other.id) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateApprovalRuleDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateApprovalRuleDetails.java new file mode 100644 index 00000000000..34844d485b5 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateApprovalRuleDetails.java @@ -0,0 +1,265 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * A rule which must be satisfied for matching pull requests before the pull request can be merged + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateApprovalRuleDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateApprovalRuleDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "destinationBranch", + "reviewers", + "minApprovalsCount" + }) + public UpdateApprovalRuleDetails( + String name, + String destinationBranch, + java.util.List reviewers, + Integer minApprovalsCount) { + super(); + this.name = name; + this.destinationBranch = destinationBranch; + this.reviewers = reviewers; + this.minApprovalsCount = minApprovalsCount; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Name which is used to uniquely identify an approval rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Name which is used to uniquely identify an approval rule. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Branch name where pull requests targeting the branch must satisfy the approval rule. This value being null means the rule applies to all pull requests + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationBranch") + private String destinationBranch; + + /** + * Branch name where pull requests targeting the branch must satisfy the approval rule. This value being null means the rule applies to all pull requests + * @param destinationBranch the value to set + * @return this builder + **/ + public Builder destinationBranch(String destinationBranch) { + this.destinationBranch = destinationBranch; + this.__explicitlySet__.add("destinationBranch"); + return this; + } + /** + * List of users who must provide approvals up to the minApprovalsCount specified in the rule. An empty list means the approvals can come from any user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reviewers") + private java.util.List reviewers; + + /** + * List of users who must provide approvals up to the minApprovalsCount specified in the rule. An empty list means the approvals can come from any user. + * @param reviewers the value to set + * @return this builder + **/ + public Builder reviewers(java.util.List reviewers) { + this.reviewers = reviewers; + this.__explicitlySet__.add("reviewers"); + return this; + } + /** + * Minimum number of approvals which must be provided by the reviewers specified in the list before the rule can be satisfied + **/ + @com.fasterxml.jackson.annotation.JsonProperty("minApprovalsCount") + private Integer minApprovalsCount; + + /** + * Minimum number of approvals which must be provided by the reviewers specified in the list before the rule can be satisfied + * @param minApprovalsCount the value to set + * @return this builder + **/ + public Builder minApprovalsCount(Integer minApprovalsCount) { + this.minApprovalsCount = minApprovalsCount; + this.__explicitlySet__.add("minApprovalsCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateApprovalRuleDetails build() { + UpdateApprovalRuleDetails model = + new UpdateApprovalRuleDetails( + this.name, + this.destinationBranch, + this.reviewers, + this.minApprovalsCount); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateApprovalRuleDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("destinationBranch")) { + this.destinationBranch(model.getDestinationBranch()); + } + if (model.wasPropertyExplicitlySet("reviewers")) { + this.reviewers(model.getReviewers()); + } + if (model.wasPropertyExplicitlySet("minApprovalsCount")) { + this.minApprovalsCount(model.getMinApprovalsCount()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Name which is used to uniquely identify an approval rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name which is used to uniquely identify an approval rule. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Branch name where pull requests targeting the branch must satisfy the approval rule. This value being null means the rule applies to all pull requests + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationBranch") + private final String destinationBranch; + + /** + * Branch name where pull requests targeting the branch must satisfy the approval rule. This value being null means the rule applies to all pull requests + * @return the value + **/ + public String getDestinationBranch() { + return destinationBranch; + } + + /** + * List of users who must provide approvals up to the minApprovalsCount specified in the rule. An empty list means the approvals can come from any user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reviewers") + private final java.util.List reviewers; + + /** + * List of users who must provide approvals up to the minApprovalsCount specified in the rule. An empty list means the approvals can come from any user. + * @return the value + **/ + public java.util.List getReviewers() { + return reviewers; + } + + /** + * Minimum number of approvals which must be provided by the reviewers specified in the list before the rule can be satisfied + **/ + @com.fasterxml.jackson.annotation.JsonProperty("minApprovalsCount") + private final Integer minApprovalsCount; + + /** + * Minimum number of approvals which must be provided by the reviewers specified in the list before the rule can be satisfied + * @return the value + **/ + public Integer getMinApprovalsCount() { + return minApprovalsCount; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateApprovalRuleDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", destinationBranch=").append(String.valueOf(this.destinationBranch)); + sb.append(", reviewers=").append(String.valueOf(this.reviewers)); + sb.append(", minApprovalsCount=").append(String.valueOf(this.minApprovalsCount)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateApprovalRuleDetails)) { + return false; + } + + UpdateApprovalRuleDetails other = (UpdateApprovalRuleDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.destinationBranch, other.destinationBranch) + && java.util.Objects.equals(this.reviewers, other.reviewers) + && java.util.Objects.equals(this.minApprovalsCount, other.minApprovalsCount) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = + (result * PRIME) + + (this.destinationBranch == null ? 43 : this.destinationBranch.hashCode()); + result = (result * PRIME) + (this.reviewers == null ? 43 : this.reviewers.hashCode()); + result = + (result * PRIME) + + (this.minApprovalsCount == null ? 43 : this.minApprovalsCount.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateApprovalRuleDetailsCollection.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateApprovalRuleDetailsCollection.java new file mode 100644 index 00000000000..e99c86daaec --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateApprovalRuleDetailsCollection.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * List of approval rules which must be statisfied before pull requests which match the rules can be merged + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateApprovalRuleDetailsCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateApprovalRuleDetailsCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public UpdateApprovalRuleDetailsCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of approval rules. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of approval rules. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateApprovalRuleDetailsCollection build() { + UpdateApprovalRuleDetailsCollection model = + new UpdateApprovalRuleDetailsCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateApprovalRuleDetailsCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of approval rules. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of approval rules. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateApprovalRuleDetailsCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateApprovalRuleDetailsCollection)) { + return false; + } + + UpdateApprovalRuleDetailsCollection other = (UpdateApprovalRuleDetailsCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateProjectNotificationPreferenceDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateProjectNotificationPreferenceDetails.java new file mode 100644 index 00000000000..8beb23dc5cc --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateProjectNotificationPreferenceDetails.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Information to update notification preference settings on project resource + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateProjectNotificationPreferenceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateProjectNotificationPreferenceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"notificationPreference"}) + public UpdateProjectNotificationPreferenceDetails( + ProjectNotificationPreference.NotificationPreference notificationPreference) { + super(); + this.notificationPreference = notificationPreference; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The override value of project notification preference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationPreference") + private ProjectNotificationPreference.NotificationPreference notificationPreference; + + /** + * The override value of project notification preference. + * @param notificationPreference the value to set + * @return this builder + **/ + public Builder notificationPreference( + ProjectNotificationPreference.NotificationPreference notificationPreference) { + this.notificationPreference = notificationPreference; + this.__explicitlySet__.add("notificationPreference"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateProjectNotificationPreferenceDetails build() { + UpdateProjectNotificationPreferenceDetails model = + new UpdateProjectNotificationPreferenceDetails(this.notificationPreference); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateProjectNotificationPreferenceDetails model) { + if (model.wasPropertyExplicitlySet("notificationPreference")) { + this.notificationPreference(model.getNotificationPreference()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The override value of project notification preference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationPreference") + private final ProjectNotificationPreference.NotificationPreference notificationPreference; + + /** + * The override value of project notification preference. + * @return the value + **/ + public ProjectNotificationPreference.NotificationPreference getNotificationPreference() { + return notificationPreference; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateProjectNotificationPreferenceDetails("); + sb.append("super=").append(super.toString()); + sb.append("notificationPreference=").append(String.valueOf(this.notificationPreference)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateProjectNotificationPreferenceDetails)) { + return false; + } + + UpdateProjectNotificationPreferenceDetails other = + (UpdateProjectNotificationPreferenceDetails) o; + return java.util.Objects.equals(this.notificationPreference, other.notificationPreference) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.notificationPreference == null + ? 43 + : this.notificationPreference.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateProjectRepositorySettingsDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateProjectRepositorySettingsDetails.java new file mode 100644 index 00000000000..bcf54bfcba1 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateProjectRepositorySettingsDetails.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Information to update custom project repository settings. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateProjectRepositorySettingsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateProjectRepositorySettingsDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"mergeSettings", "approvalRules"}) + public UpdateProjectRepositorySettingsDetails( + MergeSettings mergeSettings, UpdateApprovalRuleDetailsCollection approvalRules) { + super(); + this.mergeSettings = mergeSettings; + this.approvalRules = approvalRules; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("mergeSettings") + private MergeSettings mergeSettings; + + public Builder mergeSettings(MergeSettings mergeSettings) { + this.mergeSettings = mergeSettings; + this.__explicitlySet__.add("mergeSettings"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("approvalRules") + private UpdateApprovalRuleDetailsCollection approvalRules; + + public Builder approvalRules(UpdateApprovalRuleDetailsCollection approvalRules) { + this.approvalRules = approvalRules; + this.__explicitlySet__.add("approvalRules"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateProjectRepositorySettingsDetails build() { + UpdateProjectRepositorySettingsDetails model = + new UpdateProjectRepositorySettingsDetails( + this.mergeSettings, this.approvalRules); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateProjectRepositorySettingsDetails model) { + if (model.wasPropertyExplicitlySet("mergeSettings")) { + this.mergeSettings(model.getMergeSettings()); + } + if (model.wasPropertyExplicitlySet("approvalRules")) { + this.approvalRules(model.getApprovalRules()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("mergeSettings") + private final MergeSettings mergeSettings; + + public MergeSettings getMergeSettings() { + return mergeSettings; + } + + @com.fasterxml.jackson.annotation.JsonProperty("approvalRules") + private final UpdateApprovalRuleDetailsCollection approvalRules; + + public UpdateApprovalRuleDetailsCollection getApprovalRules() { + return approvalRules; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateProjectRepositorySettingsDetails("); + sb.append("super=").append(super.toString()); + sb.append("mergeSettings=").append(String.valueOf(this.mergeSettings)); + sb.append(", approvalRules=").append(String.valueOf(this.approvalRules)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateProjectRepositorySettingsDetails)) { + return false; + } + + UpdateProjectRepositorySettingsDetails other = (UpdateProjectRepositorySettingsDetails) o; + return java.util.Objects.equals(this.mergeSettings, other.mergeSettings) + && java.util.Objects.equals(this.approvalRules, other.approvalRules) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.mergeSettings == null ? 43 : this.mergeSettings.hashCode()); + result = + (result * PRIME) + + (this.approvalRules == null ? 43 : this.approvalRules.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdatePullRequestCommentDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdatePullRequestCommentDetails.java new file mode 100644 index 00000000000..78df606ac63 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdatePullRequestCommentDetails.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The new comment content to be updated. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdatePullRequestCommentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdatePullRequestCommentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"data"}) + public UpdatePullRequestCommentDetails(String data) { + super(); + this.data = data; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Pull Request comment content + **/ + @com.fasterxml.jackson.annotation.JsonProperty("data") + private String data; + + /** + * Pull Request comment content + * @param data the value to set + * @return this builder + **/ + public Builder data(String data) { + this.data = data; + this.__explicitlySet__.add("data"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdatePullRequestCommentDetails build() { + UpdatePullRequestCommentDetails model = new UpdatePullRequestCommentDetails(this.data); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdatePullRequestCommentDetails model) { + if (model.wasPropertyExplicitlySet("data")) { + this.data(model.getData()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Pull Request comment content + **/ + @com.fasterxml.jackson.annotation.JsonProperty("data") + private final String data; + + /** + * Pull Request comment content + * @return the value + **/ + public String getData() { + return data; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdatePullRequestCommentDetails("); + sb.append("super=").append(super.toString()); + sb.append("data=").append(String.valueOf(this.data)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePullRequestCommentDetails)) { + return false; + } + + UpdatePullRequestCommentDetails other = (UpdatePullRequestCommentDetails) o; + return java.util.Objects.equals(this.data, other.data) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.data == null ? 43 : this.data.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdatePullRequestDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdatePullRequestDetails.java new file mode 100644 index 00000000000..f335a5784f5 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdatePullRequestDetails.java @@ -0,0 +1,344 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The information to be updated. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdatePullRequestDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdatePullRequestDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "destinationBranch", + "reviewers", + "freeformTags", + "definedTags" + }) + public UpdatePullRequestDetails( + String displayName, + String description, + String destinationBranch, + java.util.List reviewers, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.destinationBranch = destinationBranch; + this.reviewers = reviewers; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Pull Request title + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Pull Request title + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Details of the pull request. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Details of the pull request. Avoid entering confidential information. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The destination branch against which the changes are to be reviewed. Example: "main" + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationBranch") + private String destinationBranch; + + /** + * The destination branch against which the changes are to be reviewed. Example: "main" + * @param destinationBranch the value to set + * @return this builder + **/ + public Builder destinationBranch(String destinationBranch) { + this.destinationBranch = destinationBranch; + this.__explicitlySet__.add("destinationBranch"); + return this; + } + /** + * Reviewers for this Review. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reviewers") + private java.util.List reviewers; + + /** + * Reviewers for this Review. + * @param reviewers the value to set + * @return this builder + **/ + public Builder reviewers(java.util.List reviewers) { + this.reviewers = reviewers; + this.__explicitlySet__.add("reviewers"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdatePullRequestDetails build() { + UpdatePullRequestDetails model = + new UpdatePullRequestDetails( + this.displayName, + this.description, + this.destinationBranch, + this.reviewers, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdatePullRequestDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("destinationBranch")) { + this.destinationBranch(model.getDestinationBranch()); + } + if (model.wasPropertyExplicitlySet("reviewers")) { + this.reviewers(model.getReviewers()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Pull Request title + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Pull Request title + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Details of the pull request. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Details of the pull request. Avoid entering confidential information. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The destination branch against which the changes are to be reviewed. Example: "main" + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationBranch") + private final String destinationBranch; + + /** + * The destination branch against which the changes are to be reviewed. Example: "main" + * @return the value + **/ + public String getDestinationBranch() { + return destinationBranch; + } + + /** + * Reviewers for this Review. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reviewers") + private final java.util.List reviewers; + + /** + * Reviewers for this Review. + * @return the value + **/ + public java.util.List getReviewers() { + return reviewers; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"bar-key": "value"}} + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdatePullRequestDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", destinationBranch=").append(String.valueOf(this.destinationBranch)); + sb.append(", reviewers=").append(String.valueOf(this.reviewers)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePullRequestDetails)) { + return false; + } + + UpdatePullRequestDetails other = (UpdatePullRequestDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.destinationBranch, other.destinationBranch) + && java.util.Objects.equals(this.reviewers, other.reviewers) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.destinationBranch == null ? 43 : this.destinationBranch.hashCode()); + result = (result * PRIME) + (this.reviewers == null ? 43 : this.reviewers.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdatePullRequestNotificationPreferenceDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdatePullRequestNotificationPreferenceDetails.java new file mode 100644 index 00000000000..2a08a7ed931 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdatePullRequestNotificationPreferenceDetails.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Information to update notification preference settings on pull request resource + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdatePullRequestNotificationPreferenceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdatePullRequestNotificationPreferenceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"notificationPreference"}) + public UpdatePullRequestNotificationPreferenceDetails( + PullRequestNotificationPreference.NotificationPreference notificationPreference) { + super(); + this.notificationPreference = notificationPreference; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The override value of pull request notification preference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationPreference") + private PullRequestNotificationPreference.NotificationPreference notificationPreference; + + /** + * The override value of pull request notification preference. + * @param notificationPreference the value to set + * @return this builder + **/ + public Builder notificationPreference( + PullRequestNotificationPreference.NotificationPreference notificationPreference) { + this.notificationPreference = notificationPreference; + this.__explicitlySet__.add("notificationPreference"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdatePullRequestNotificationPreferenceDetails build() { + UpdatePullRequestNotificationPreferenceDetails model = + new UpdatePullRequestNotificationPreferenceDetails(this.notificationPreference); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdatePullRequestNotificationPreferenceDetails model) { + if (model.wasPropertyExplicitlySet("notificationPreference")) { + this.notificationPreference(model.getNotificationPreference()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The override value of pull request notification preference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationPreference") + private final PullRequestNotificationPreference.NotificationPreference notificationPreference; + + /** + * The override value of pull request notification preference. + * @return the value + **/ + public PullRequestNotificationPreference.NotificationPreference getNotificationPreference() { + return notificationPreference; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdatePullRequestNotificationPreferenceDetails("); + sb.append("super=").append(super.toString()); + sb.append("notificationPreference=").append(String.valueOf(this.notificationPreference)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePullRequestNotificationPreferenceDetails)) { + return false; + } + + UpdatePullRequestNotificationPreferenceDetails other = + (UpdatePullRequestNotificationPreferenceDetails) o; + return java.util.Objects.equals(this.notificationPreference, other.notificationPreference) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.notificationPreference == null + ? 43 + : this.notificationPreference.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateRepositoryDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateRepositoryDetails.java index 443997f6722..a4265282144 100644 --- a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateRepositoryDetails.java +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateRepositoryDetails.java @@ -103,6 +103,7 @@ public Builder defaultBranch(String defaultBranch) { * Type of repository. Allowed values: * {@code MIRRORED} * {@code HOSTED} + * {@code FORKED} * **/ @com.fasterxml.jackson.annotation.JsonProperty("repositoryType") @@ -112,6 +113,7 @@ public Builder defaultBranch(String defaultBranch) { * Type of repository. Allowed values: * {@code MIRRORED} * {@code HOSTED} + * {@code FORKED} * * @param repositoryType the value to set * @return this builder @@ -267,6 +269,7 @@ public String getDefaultBranch() { * Type of repository. Allowed values: * {@code MIRRORED} * {@code HOSTED} + * {@code FORKED} * **/ @com.fasterxml.jackson.annotation.JsonProperty("repositoryType") @@ -276,6 +279,7 @@ public String getDefaultBranch() { * Type of repository. Allowed values: * {@code MIRRORED} * {@code HOSTED} + * {@code FORKED} * * @return the value **/ diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateRepositoryNotificationPreferenceDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateRepositoryNotificationPreferenceDetails.java new file mode 100644 index 00000000000..6c19f85bafe --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateRepositoryNotificationPreferenceDetails.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Information to update notification preference settings on repository resource + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateRepositoryNotificationPreferenceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateRepositoryNotificationPreferenceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"notificationPreference"}) + public UpdateRepositoryNotificationPreferenceDetails( + RepositoryNotificationPreference.NotificationPreference notificationPreference) { + super(); + this.notificationPreference = notificationPreference; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The override value of repository notification preference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationPreference") + private RepositoryNotificationPreference.NotificationPreference notificationPreference; + + /** + * The override value of repository notification preference. + * @param notificationPreference the value to set + * @return this builder + **/ + public Builder notificationPreference( + RepositoryNotificationPreference.NotificationPreference notificationPreference) { + this.notificationPreference = notificationPreference; + this.__explicitlySet__.add("notificationPreference"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateRepositoryNotificationPreferenceDetails build() { + UpdateRepositoryNotificationPreferenceDetails model = + new UpdateRepositoryNotificationPreferenceDetails(this.notificationPreference); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateRepositoryNotificationPreferenceDetails model) { + if (model.wasPropertyExplicitlySet("notificationPreference")) { + this.notificationPreference(model.getNotificationPreference()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The override value of repository notification preference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationPreference") + private final RepositoryNotificationPreference.NotificationPreference notificationPreference; + + /** + * The override value of repository notification preference. + * @return the value + **/ + public RepositoryNotificationPreference.NotificationPreference getNotificationPreference() { + return notificationPreference; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateRepositoryNotificationPreferenceDetails("); + sb.append("super=").append(super.toString()); + sb.append("notificationPreference=").append(String.valueOf(this.notificationPreference)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateRepositoryNotificationPreferenceDetails)) { + return false; + } + + UpdateRepositoryNotificationPreferenceDetails other = + (UpdateRepositoryNotificationPreferenceDetails) o; + return java.util.Objects.equals(this.notificationPreference, other.notificationPreference) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.notificationPreference == null + ? 43 + : this.notificationPreference.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateRepositorySettingsDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateRepositorySettingsDetails.java new file mode 100644 index 00000000000..4e4c48ad312 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateRepositorySettingsDetails.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * Information to update custom repository settings + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateRepositorySettingsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateRepositorySettingsDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"mergeChecks", "mergeSettings", "approvalRules"}) + public UpdateRepositorySettingsDetails( + MergeChecks mergeChecks, + MergeSettings mergeSettings, + UpdateApprovalRuleDetailsCollection approvalRules) { + super(); + this.mergeChecks = mergeChecks; + this.mergeSettings = mergeSettings; + this.approvalRules = approvalRules; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("mergeChecks") + private MergeChecks mergeChecks; + + public Builder mergeChecks(MergeChecks mergeChecks) { + this.mergeChecks = mergeChecks; + this.__explicitlySet__.add("mergeChecks"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("mergeSettings") + private MergeSettings mergeSettings; + + public Builder mergeSettings(MergeSettings mergeSettings) { + this.mergeSettings = mergeSettings; + this.__explicitlySet__.add("mergeSettings"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("approvalRules") + private UpdateApprovalRuleDetailsCollection approvalRules; + + public Builder approvalRules(UpdateApprovalRuleDetailsCollection approvalRules) { + this.approvalRules = approvalRules; + this.__explicitlySet__.add("approvalRules"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateRepositorySettingsDetails build() { + UpdateRepositorySettingsDetails model = + new UpdateRepositorySettingsDetails( + this.mergeChecks, this.mergeSettings, this.approvalRules); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateRepositorySettingsDetails model) { + if (model.wasPropertyExplicitlySet("mergeChecks")) { + this.mergeChecks(model.getMergeChecks()); + } + if (model.wasPropertyExplicitlySet("mergeSettings")) { + this.mergeSettings(model.getMergeSettings()); + } + if (model.wasPropertyExplicitlySet("approvalRules")) { + this.approvalRules(model.getApprovalRules()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("mergeChecks") + private final MergeChecks mergeChecks; + + public MergeChecks getMergeChecks() { + return mergeChecks; + } + + @com.fasterxml.jackson.annotation.JsonProperty("mergeSettings") + private final MergeSettings mergeSettings; + + public MergeSettings getMergeSettings() { + return mergeSettings; + } + + @com.fasterxml.jackson.annotation.JsonProperty("approvalRules") + private final UpdateApprovalRuleDetailsCollection approvalRules; + + public UpdateApprovalRuleDetailsCollection getApprovalRules() { + return approvalRules; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateRepositorySettingsDetails("); + sb.append("super=").append(super.toString()); + sb.append("mergeChecks=").append(String.valueOf(this.mergeChecks)); + sb.append(", mergeSettings=").append(String.valueOf(this.mergeSettings)); + sb.append(", approvalRules=").append(String.valueOf(this.approvalRules)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateRepositorySettingsDetails)) { + return false; + } + + UpdateRepositorySettingsDetails other = (UpdateRepositorySettingsDetails) o; + return java.util.Objects.equals(this.mergeChecks, other.mergeChecks) + && java.util.Objects.equals(this.mergeSettings, other.mergeSettings) + && java.util.Objects.equals(this.approvalRules, other.approvalRules) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.mergeChecks == null ? 43 : this.mergeChecks.hashCode()); + result = + (result * PRIME) + + (this.mergeSettings == null ? 43 : this.mergeSettings.hashCode()); + result = + (result * PRIME) + + (this.approvalRules == null ? 43 : this.approvalRules.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateReviewerDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateReviewerDetails.java new file mode 100644 index 00000000000..f1df628b168 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/UpdateReviewerDetails.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The reviewer to be updated. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateReviewerDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateReviewerDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"principalId"}) + public UpdateReviewerDetails(String principalId) { + super(); + this.principalId = principalId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Pull Request reviewer id + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalId") + private String principalId; + + /** + * Pull Request reviewer id + * @param principalId the value to set + * @return this builder + **/ + public Builder principalId(String principalId) { + this.principalId = principalId; + this.__explicitlySet__.add("principalId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateReviewerDetails build() { + UpdateReviewerDetails model = new UpdateReviewerDetails(this.principalId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateReviewerDetails model) { + if (model.wasPropertyExplicitlySet("principalId")) { + this.principalId(model.getPrincipalId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Pull Request reviewer id + **/ + @com.fasterxml.jackson.annotation.JsonProperty("principalId") + private final String principalId; + + /** + * Pull Request reviewer id + * @return the value + **/ + public String getPrincipalId() { + return principalId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateReviewerDetails("); + sb.append("super=").append(super.toString()); + sb.append("principalId=").append(String.valueOf(this.principalId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateReviewerDetails)) { + return false; + } + + UpdateReviewerDetails other = (UpdateReviewerDetails) o; + return java.util.Objects.equals(this.principalId, other.principalId) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.principalId == null ? 43 : this.principalId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ValidateMergePullRequestDetails.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ValidateMergePullRequestDetails.java new file mode 100644 index 00000000000..73e059fcb23 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/model/ValidateMergePullRequestDetails.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.model; + +/** + * The information about the merge validation. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ValidateMergePullRequestDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "actionType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ValidateMergePullRequestDetails extends MergePullRequestDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ValidateMergePullRequestDetails build() { + ValidateMergePullRequestDetails model = new ValidateMergePullRequestDetails(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ValidateMergePullRequestDetails model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ValidateMergePullRequestDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ValidateMergePullRequestDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ValidateMergePullRequestDetails)) { + return false; + } + + ValidateMergePullRequestDetails other = (ValidateMergePullRequestDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/CreateOrUpdateGitRefRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/CreateOrUpdateGitRefRequest.java new file mode 100644 index 00000000000..4ea973afa88 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/CreateOrUpdateGitRefRequest.java @@ -0,0 +1,327 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use CreateOrUpdateGitRefRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class CreateOrUpdateGitRefRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.devops.model.CreateOrUpdateGitRefDetails> { + + /** + * Unique repository identifier. + */ + private String repositoryId; + + /** + * Unique repository identifier. + */ + public String getRepositoryId() { + return repositoryId; + } + /** + * The information to create a reference with the type specified in the query. + */ + private com.oracle.bmc.devops.model.CreateOrUpdateGitRefDetails createOrUpdateGitRefDetails; + + /** + * The information to create a reference with the type specified in the query. + */ + public com.oracle.bmc.devops.model.CreateOrUpdateGitRefDetails + getCreateOrUpdateGitRefDetails() { + return createOrUpdateGitRefDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.devops.model.CreateOrUpdateGitRefDetails getBody$() { + return createOrUpdateGitRefDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateOrUpdateGitRefRequest, + com.oracle.bmc.devops.model.CreateOrUpdateGitRefDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique repository identifier. + */ + private String repositoryId = null; + + /** + * Unique repository identifier. + * @param repositoryId the value to set + * @return this builder instance + */ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + return this; + } + + /** + * The information to create a reference with the type specified in the query. + */ + private com.oracle.bmc.devops.model.CreateOrUpdateGitRefDetails + createOrUpdateGitRefDetails = null; + + /** + * The information to create a reference with the type specified in the query. + * @param createOrUpdateGitRefDetails the value to set + * @return this builder instance + */ + public Builder createOrUpdateGitRefDetails( + com.oracle.bmc.devops.model.CreateOrUpdateGitRefDetails + createOrUpdateGitRefDetails) { + this.createOrUpdateGitRefDetails = createOrUpdateGitRefDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateOrUpdateGitRefRequest o) { + repositoryId(o.getRepositoryId()); + createOrUpdateGitRefDetails(o.getCreateOrUpdateGitRefDetails()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateOrUpdateGitRefRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateOrUpdateGitRefRequest + */ + public CreateOrUpdateGitRefRequest build() { + CreateOrUpdateGitRefRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.devops.model.CreateOrUpdateGitRefDetails body) { + createOrUpdateGitRefDetails(body); + return this; + } + + /** + * Build the instance of CreateOrUpdateGitRefRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateOrUpdateGitRefRequest + */ + public CreateOrUpdateGitRefRequest buildWithoutInvocationCallback() { + CreateOrUpdateGitRefRequest request = new CreateOrUpdateGitRefRequest(); + request.repositoryId = repositoryId; + request.createOrUpdateGitRefDetails = createOrUpdateGitRefDetails; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateOrUpdateGitRefRequest(repositoryId, createOrUpdateGitRefDetails, ifMatch, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .repositoryId(repositoryId) + .createOrUpdateGitRefDetails(createOrUpdateGitRefDetails) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(",createOrUpdateGitRefDetails=") + .append(String.valueOf(this.createOrUpdateGitRefDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateOrUpdateGitRefRequest)) { + return false; + } + + CreateOrUpdateGitRefRequest other = (CreateOrUpdateGitRefRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals( + this.createOrUpdateGitRefDetails, other.createOrUpdateGitRefDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = + (result * PRIME) + + (this.createOrUpdateGitRefDetails == null + ? 43 + : this.createOrUpdateGitRefDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/CreateOrUpdateProtectedBranchRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/CreateOrUpdateProtectedBranchRequest.java new file mode 100644 index 00000000000..e149c6f35ed --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/CreateOrUpdateProtectedBranchRequest.java @@ -0,0 +1,331 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use CreateOrUpdateProtectedBranchRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class CreateOrUpdateProtectedBranchRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.devops.model.CreateOrUpdateProtectedBranchDetails> { + + /** + * Unique repository identifier. + */ + private String repositoryId; + + /** + * Unique repository identifier. + */ + public String getRepositoryId() { + return repositoryId; + } + /** + * Details for a protected branch + */ + private com.oracle.bmc.devops.model.CreateOrUpdateProtectedBranchDetails + createOrUpdateProtectedBranchDetails; + + /** + * Details for a protected branch + */ + public com.oracle.bmc.devops.model.CreateOrUpdateProtectedBranchDetails + getCreateOrUpdateProtectedBranchDetails() { + return createOrUpdateProtectedBranchDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.devops.model.CreateOrUpdateProtectedBranchDetails getBody$() { + return createOrUpdateProtectedBranchDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateOrUpdateProtectedBranchRequest, + com.oracle.bmc.devops.model.CreateOrUpdateProtectedBranchDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique repository identifier. + */ + private String repositoryId = null; + + /** + * Unique repository identifier. + * @param repositoryId the value to set + * @return this builder instance + */ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + return this; + } + + /** + * Details for a protected branch + */ + private com.oracle.bmc.devops.model.CreateOrUpdateProtectedBranchDetails + createOrUpdateProtectedBranchDetails = null; + + /** + * Details for a protected branch + * @param createOrUpdateProtectedBranchDetails the value to set + * @return this builder instance + */ + public Builder createOrUpdateProtectedBranchDetails( + com.oracle.bmc.devops.model.CreateOrUpdateProtectedBranchDetails + createOrUpdateProtectedBranchDetails) { + this.createOrUpdateProtectedBranchDetails = createOrUpdateProtectedBranchDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateOrUpdateProtectedBranchRequest o) { + repositoryId(o.getRepositoryId()); + createOrUpdateProtectedBranchDetails(o.getCreateOrUpdateProtectedBranchDetails()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateOrUpdateProtectedBranchRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateOrUpdateProtectedBranchRequest + */ + public CreateOrUpdateProtectedBranchRequest build() { + CreateOrUpdateProtectedBranchRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.devops.model.CreateOrUpdateProtectedBranchDetails body) { + createOrUpdateProtectedBranchDetails(body); + return this; + } + + /** + * Build the instance of CreateOrUpdateProtectedBranchRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateOrUpdateProtectedBranchRequest + */ + public CreateOrUpdateProtectedBranchRequest buildWithoutInvocationCallback() { + CreateOrUpdateProtectedBranchRequest request = + new CreateOrUpdateProtectedBranchRequest(); + request.repositoryId = repositoryId; + request.createOrUpdateProtectedBranchDetails = createOrUpdateProtectedBranchDetails; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateOrUpdateProtectedBranchRequest(repositoryId, createOrUpdateProtectedBranchDetails, ifMatch, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .repositoryId(repositoryId) + .createOrUpdateProtectedBranchDetails(createOrUpdateProtectedBranchDetails) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(",createOrUpdateProtectedBranchDetails=") + .append(String.valueOf(this.createOrUpdateProtectedBranchDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateOrUpdateProtectedBranchRequest)) { + return false; + } + + CreateOrUpdateProtectedBranchRequest other = (CreateOrUpdateProtectedBranchRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals( + this.createOrUpdateProtectedBranchDetails, + other.createOrUpdateProtectedBranchDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = + (result * PRIME) + + (this.createOrUpdateProtectedBranchDetails == null + ? 43 + : this.createOrUpdateProtectedBranchDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/CreatePullRequestAttachmentRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/CreatePullRequestAttachmentRequest.java new file mode 100644 index 00000000000..55161676061 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/CreatePullRequestAttachmentRequest.java @@ -0,0 +1,328 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use CreatePullRequestAttachmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class CreatePullRequestAttachmentRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * The Content-Disposition response-header field has been proposed as a means for the origin server to suggest a default filename if the user requests that the content is saved to a file. + */ + private String contentDisposition; + + /** + * The Content-Disposition response-header field has been proposed as a means for the origin server to suggest a default filename if the user requests that the content is saved to a file. + */ + public String getContentDisposition() { + return contentDisposition; + } + /** + * Uploads the content of the attachment. + */ + private java.io.InputStream createPullRequestAttachmentBody; + + /** + * Uploads the content of the attachment. + */ + public java.io.InputStream getCreatePullRequestAttachmentBody() { + return createPullRequestAttachmentBody; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public java.io.InputStream getBody$() { + return createPullRequestAttachmentBody; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreatePullRequestAttachmentRequest, java.io.InputStream> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * The Content-Disposition response-header field has been proposed as a means for the origin server to suggest a default filename if the user requests that the content is saved to a file. + */ + private String contentDisposition = null; + + /** + * The Content-Disposition response-header field has been proposed as a means for the origin server to suggest a default filename if the user requests that the content is saved to a file. + * @param contentDisposition the value to set + * @return this builder instance + */ + public Builder contentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; + return this; + } + + /** + * Uploads the content of the attachment. + */ + private java.io.InputStream createPullRequestAttachmentBody = null; + + /** + * Uploads the content of the attachment. + * @param createPullRequestAttachmentBody the value to set + * @return this builder instance + */ + public Builder createPullRequestAttachmentBody( + java.io.InputStream createPullRequestAttachmentBody) { + this.createPullRequestAttachmentBody = createPullRequestAttachmentBody; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreatePullRequestAttachmentRequest o) { + pullRequestId(o.getPullRequestId()); + contentDisposition(o.getContentDisposition()); + createPullRequestAttachmentBody(o.getCreatePullRequestAttachmentBody()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreatePullRequestAttachmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreatePullRequestAttachmentRequest + */ + public CreatePullRequestAttachmentRequest build() { + CreatePullRequestAttachmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(java.io.InputStream body) { + createPullRequestAttachmentBody(body); + return this; + } + + /** + * Build the instance of CreatePullRequestAttachmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreatePullRequestAttachmentRequest + */ + public CreatePullRequestAttachmentRequest buildWithoutInvocationCallback() { + CreatePullRequestAttachmentRequest request = new CreatePullRequestAttachmentRequest(); + request.pullRequestId = pullRequestId; + request.contentDisposition = contentDisposition; + request.createPullRequestAttachmentBody = createPullRequestAttachmentBody; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreatePullRequestAttachmentRequest(pullRequestId, contentDisposition, createPullRequestAttachmentBody, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .contentDisposition(contentDisposition) + .createPullRequestAttachmentBody(createPullRequestAttachmentBody) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",contentDisposition=").append(String.valueOf(this.contentDisposition)); + sb.append(",createPullRequestAttachmentBody=") + .append(String.valueOf(this.createPullRequestAttachmentBody)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreatePullRequestAttachmentRequest)) { + return false; + } + + CreatePullRequestAttachmentRequest other = (CreatePullRequestAttachmentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.contentDisposition, other.contentDisposition) + && java.util.Objects.equals( + this.createPullRequestAttachmentBody, other.createPullRequestAttachmentBody) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = + (result * PRIME) + + (this.contentDisposition == null + ? 43 + : this.contentDisposition.hashCode()); + result = + (result * PRIME) + + (this.createPullRequestAttachmentBody == null + ? 43 + : this.createPullRequestAttachmentBody.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/CreatePullRequestCommentRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/CreatePullRequestCommentRequest.java new file mode 100644 index 00000000000..7c546b3735a --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/CreatePullRequestCommentRequest.java @@ -0,0 +1,298 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use CreatePullRequestCommentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class CreatePullRequestCommentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.devops.model.CreatePullRequestCommentDetails> { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * Details for the new PullRequest comment. + */ + private com.oracle.bmc.devops.model.CreatePullRequestCommentDetails + createPullRequestCommentDetails; + + /** + * Details for the new PullRequest comment. + */ + public com.oracle.bmc.devops.model.CreatePullRequestCommentDetails + getCreatePullRequestCommentDetails() { + return createPullRequestCommentDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.devops.model.CreatePullRequestCommentDetails getBody$() { + return createPullRequestCommentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreatePullRequestCommentRequest, + com.oracle.bmc.devops.model.CreatePullRequestCommentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * Details for the new PullRequest comment. + */ + private com.oracle.bmc.devops.model.CreatePullRequestCommentDetails + createPullRequestCommentDetails = null; + + /** + * Details for the new PullRequest comment. + * @param createPullRequestCommentDetails the value to set + * @return this builder instance + */ + public Builder createPullRequestCommentDetails( + com.oracle.bmc.devops.model.CreatePullRequestCommentDetails + createPullRequestCommentDetails) { + this.createPullRequestCommentDetails = createPullRequestCommentDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreatePullRequestCommentRequest o) { + pullRequestId(o.getPullRequestId()); + createPullRequestCommentDetails(o.getCreatePullRequestCommentDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreatePullRequestCommentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreatePullRequestCommentRequest + */ + public CreatePullRequestCommentRequest build() { + CreatePullRequestCommentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.devops.model.CreatePullRequestCommentDetails body) { + createPullRequestCommentDetails(body); + return this; + } + + /** + * Build the instance of CreatePullRequestCommentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreatePullRequestCommentRequest + */ + public CreatePullRequestCommentRequest buildWithoutInvocationCallback() { + CreatePullRequestCommentRequest request = new CreatePullRequestCommentRequest(); + request.pullRequestId = pullRequestId; + request.createPullRequestCommentDetails = createPullRequestCommentDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreatePullRequestCommentRequest(pullRequestId, createPullRequestCommentDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .createPullRequestCommentDetails(createPullRequestCommentDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",createPullRequestCommentDetails=") + .append(String.valueOf(this.createPullRequestCommentDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreatePullRequestCommentRequest)) { + return false; + } + + CreatePullRequestCommentRequest other = (CreatePullRequestCommentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals( + this.createPullRequestCommentDetails, other.createPullRequestCommentDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = + (result * PRIME) + + (this.createPullRequestCommentDetails == null + ? 43 + : this.createPullRequestCommentDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/CreatePullRequestRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/CreatePullRequestRequest.java new file mode 100644 index 00000000000..487f7e27007 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/CreatePullRequestRequest.java @@ -0,0 +1,261 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use CreatePullRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class CreatePullRequestRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.devops.model.CreatePullRequestDetails> { + + /** + * Details for the new PullRequest. + */ + private com.oracle.bmc.devops.model.CreatePullRequestDetails createPullRequestDetails; + + /** + * Details for the new PullRequest. + */ + public com.oracle.bmc.devops.model.CreatePullRequestDetails getCreatePullRequestDetails() { + return createPullRequestDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.devops.model.CreatePullRequestDetails getBody$() { + return createPullRequestDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreatePullRequestRequest, + com.oracle.bmc.devops.model.CreatePullRequestDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new PullRequest. + */ + private com.oracle.bmc.devops.model.CreatePullRequestDetails createPullRequestDetails = + null; + + /** + * Details for the new PullRequest. + * @param createPullRequestDetails the value to set + * @return this builder instance + */ + public Builder createPullRequestDetails( + com.oracle.bmc.devops.model.CreatePullRequestDetails createPullRequestDetails) { + this.createPullRequestDetails = createPullRequestDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreatePullRequestRequest o) { + createPullRequestDetails(o.getCreatePullRequestDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreatePullRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreatePullRequestRequest + */ + public CreatePullRequestRequest build() { + CreatePullRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.devops.model.CreatePullRequestDetails body) { + createPullRequestDetails(body); + return this; + } + + /** + * Build the instance of CreatePullRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreatePullRequestRequest + */ + public CreatePullRequestRequest buildWithoutInvocationCallback() { + CreatePullRequestRequest request = new CreatePullRequestRequest(); + request.createPullRequestDetails = createPullRequestDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreatePullRequestRequest(createPullRequestDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createPullRequestDetails(createPullRequestDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createPullRequestDetails=") + .append(String.valueOf(this.createPullRequestDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreatePullRequestRequest)) { + return false; + } + + CreatePullRequestRequest other = (CreatePullRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createPullRequestDetails, other.createPullRequestDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createPullRequestDetails == null + ? 43 + : this.createPullRequestDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeclinePullRequestRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeclinePullRequestRequest.java new file mode 100644 index 00000000000..2a284a7db26 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeclinePullRequestRequest.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use DeclinePullRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeclinePullRequestRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeclinePullRequestRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeclinePullRequestRequest o) { + pullRequestId(o.getPullRequestId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeclinePullRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeclinePullRequestRequest + */ + public DeclinePullRequestRequest build() { + DeclinePullRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeclinePullRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeclinePullRequestRequest + */ + public DeclinePullRequestRequest buildWithoutInvocationCallback() { + DeclinePullRequestRequest request = new DeclinePullRequestRequest(); + request.pullRequestId = pullRequestId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeclinePullRequestRequest(pullRequestId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeclinePullRequestRequest)) { + return false; + } + + DeclinePullRequestRequest other = (DeclinePullRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeleteGitRefRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeleteGitRefRequest.java new file mode 100644 index 00000000000..9c00d48011a --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeleteGitRefRequest.java @@ -0,0 +1,321 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use DeleteGitRefRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeleteGitRefRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.devops.model.DeleteGitRefDetails> { + + /** + * Unique repository identifier. + */ + private String repositoryId; + + /** + * Unique repository identifier. + */ + public String getRepositoryId() { + return repositoryId; + } + /** + * The information to delete a reference. + */ + private com.oracle.bmc.devops.model.DeleteGitRefDetails deleteGitRefDetails; + + /** + * The information to delete a reference. + */ + public com.oracle.bmc.devops.model.DeleteGitRefDetails getDeleteGitRefDetails() { + return deleteGitRefDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.devops.model.DeleteGitRefDetails getBody$() { + return deleteGitRefDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteGitRefRequest, com.oracle.bmc.devops.model.DeleteGitRefDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique repository identifier. + */ + private String repositoryId = null; + + /** + * Unique repository identifier. + * @param repositoryId the value to set + * @return this builder instance + */ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + return this; + } + + /** + * The information to delete a reference. + */ + private com.oracle.bmc.devops.model.DeleteGitRefDetails deleteGitRefDetails = null; + + /** + * The information to delete a reference. + * @param deleteGitRefDetails the value to set + * @return this builder instance + */ + public Builder deleteGitRefDetails( + com.oracle.bmc.devops.model.DeleteGitRefDetails deleteGitRefDetails) { + this.deleteGitRefDetails = deleteGitRefDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteGitRefRequest o) { + repositoryId(o.getRepositoryId()); + deleteGitRefDetails(o.getDeleteGitRefDetails()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteGitRefRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteGitRefRequest + */ + public DeleteGitRefRequest build() { + DeleteGitRefRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.devops.model.DeleteGitRefDetails body) { + deleteGitRefDetails(body); + return this; + } + + /** + * Build the instance of DeleteGitRefRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteGitRefRequest + */ + public DeleteGitRefRequest buildWithoutInvocationCallback() { + DeleteGitRefRequest request = new DeleteGitRefRequest(); + request.repositoryId = repositoryId; + request.deleteGitRefDetails = deleteGitRefDetails; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new DeleteGitRefRequest(repositoryId, deleteGitRefDetails, ifMatch, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .repositoryId(repositoryId) + .deleteGitRefDetails(deleteGitRefDetails) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(",deleteGitRefDetails=").append(String.valueOf(this.deleteGitRefDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteGitRefRequest)) { + return false; + } + + DeleteGitRefRequest other = (DeleteGitRefRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals(this.deleteGitRefDetails, other.deleteGitRefDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = + (result * PRIME) + + (this.deleteGitRefDetails == null + ? 43 + : this.deleteGitRefDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeleteProjectRepositorySettingsRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeleteProjectRepositorySettingsRequest.java new file mode 100644 index 00000000000..dc02b6a8a96 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeleteProjectRepositorySettingsRequest.java @@ -0,0 +1,263 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use DeleteProjectRepositorySettingsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeleteProjectRepositorySettingsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique project identifier. + */ + private String projectId; + + /** + * Unique project identifier. + */ + public String getProjectId() { + return projectId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteProjectRepositorySettingsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique project identifier. + */ + private String projectId = null; + + /** + * Unique project identifier. + * @param projectId the value to set + * @return this builder instance + */ + public Builder projectId(String projectId) { + this.projectId = projectId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteProjectRepositorySettingsRequest o) { + projectId(o.getProjectId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteProjectRepositorySettingsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteProjectRepositorySettingsRequest + */ + public DeleteProjectRepositorySettingsRequest build() { + DeleteProjectRepositorySettingsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteProjectRepositorySettingsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteProjectRepositorySettingsRequest + */ + public DeleteProjectRepositorySettingsRequest buildWithoutInvocationCallback() { + DeleteProjectRepositorySettingsRequest request = + new DeleteProjectRepositorySettingsRequest(); + request.projectId = projectId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new DeleteProjectRepositorySettingsRequest(projectId, ifMatch, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .projectId(projectId) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",projectId=").append(String.valueOf(this.projectId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteProjectRepositorySettingsRequest)) { + return false; + } + + DeleteProjectRepositorySettingsRequest other = (DeleteProjectRepositorySettingsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.projectId, other.projectId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.projectId == null ? 43 : this.projectId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeleteProtectedBranchRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeleteProtectedBranchRequest.java new file mode 100644 index 00000000000..619b8834f87 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeleteProtectedBranchRequest.java @@ -0,0 +1,327 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use DeleteProtectedBranchRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeleteProtectedBranchRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.devops.model.DeleteProtectedBranchDetails> { + + /** + * Unique repository identifier. + */ + private String repositoryId; + + /** + * Unique repository identifier. + */ + public String getRepositoryId() { + return repositoryId; + } + /** + * Details for a protected branch + */ + private com.oracle.bmc.devops.model.DeleteProtectedBranchDetails deleteProtectedBranchDetails; + + /** + * Details for a protected branch + */ + public com.oracle.bmc.devops.model.DeleteProtectedBranchDetails + getDeleteProtectedBranchDetails() { + return deleteProtectedBranchDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.devops.model.DeleteProtectedBranchDetails getBody$() { + return deleteProtectedBranchDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteProtectedBranchRequest, + com.oracle.bmc.devops.model.DeleteProtectedBranchDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique repository identifier. + */ + private String repositoryId = null; + + /** + * Unique repository identifier. + * @param repositoryId the value to set + * @return this builder instance + */ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + return this; + } + + /** + * Details for a protected branch + */ + private com.oracle.bmc.devops.model.DeleteProtectedBranchDetails + deleteProtectedBranchDetails = null; + + /** + * Details for a protected branch + * @param deleteProtectedBranchDetails the value to set + * @return this builder instance + */ + public Builder deleteProtectedBranchDetails( + com.oracle.bmc.devops.model.DeleteProtectedBranchDetails + deleteProtectedBranchDetails) { + this.deleteProtectedBranchDetails = deleteProtectedBranchDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteProtectedBranchRequest o) { + repositoryId(o.getRepositoryId()); + deleteProtectedBranchDetails(o.getDeleteProtectedBranchDetails()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteProtectedBranchRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteProtectedBranchRequest + */ + public DeleteProtectedBranchRequest build() { + DeleteProtectedBranchRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.devops.model.DeleteProtectedBranchDetails body) { + deleteProtectedBranchDetails(body); + return this; + } + + /** + * Build the instance of DeleteProtectedBranchRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteProtectedBranchRequest + */ + public DeleteProtectedBranchRequest buildWithoutInvocationCallback() { + DeleteProtectedBranchRequest request = new DeleteProtectedBranchRequest(); + request.repositoryId = repositoryId; + request.deleteProtectedBranchDetails = deleteProtectedBranchDetails; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new DeleteProtectedBranchRequest(repositoryId, deleteProtectedBranchDetails, ifMatch, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .repositoryId(repositoryId) + .deleteProtectedBranchDetails(deleteProtectedBranchDetails) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(",deleteProtectedBranchDetails=") + .append(String.valueOf(this.deleteProtectedBranchDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteProtectedBranchRequest)) { + return false; + } + + DeleteProtectedBranchRequest other = (DeleteProtectedBranchRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals( + this.deleteProtectedBranchDetails, other.deleteProtectedBranchDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = + (result * PRIME) + + (this.deleteProtectedBranchDetails == null + ? 43 + : this.deleteProtectedBranchDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeletePullRequestAttachmentRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeletePullRequestAttachmentRequest.java new file mode 100644 index 00000000000..633fe2155cf --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeletePullRequestAttachmentRequest.java @@ -0,0 +1,262 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use DeletePullRequestAttachmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeletePullRequestAttachmentRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * unique PullRequest attachment identifier + */ + private String attachmentId; + + /** + * unique PullRequest attachment identifier + */ + public String getAttachmentId() { + return attachmentId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeletePullRequestAttachmentRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * unique PullRequest attachment identifier + */ + private String attachmentId = null; + + /** + * unique PullRequest attachment identifier + * @param attachmentId the value to set + * @return this builder instance + */ + public Builder attachmentId(String attachmentId) { + this.attachmentId = attachmentId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeletePullRequestAttachmentRequest o) { + pullRequestId(o.getPullRequestId()); + attachmentId(o.getAttachmentId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeletePullRequestAttachmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeletePullRequestAttachmentRequest + */ + public DeletePullRequestAttachmentRequest build() { + DeletePullRequestAttachmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeletePullRequestAttachmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeletePullRequestAttachmentRequest + */ + public DeletePullRequestAttachmentRequest buildWithoutInvocationCallback() { + DeletePullRequestAttachmentRequest request = new DeletePullRequestAttachmentRequest(); + request.pullRequestId = pullRequestId; + request.attachmentId = attachmentId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeletePullRequestAttachmentRequest(pullRequestId, attachmentId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .attachmentId(attachmentId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",attachmentId=").append(String.valueOf(this.attachmentId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeletePullRequestAttachmentRequest)) { + return false; + } + + DeletePullRequestAttachmentRequest other = (DeletePullRequestAttachmentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.attachmentId, other.attachmentId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.attachmentId == null ? 43 : this.attachmentId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeletePullRequestCommentRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeletePullRequestCommentRequest.java new file mode 100644 index 00000000000..ae7f1b4c2cb --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeletePullRequestCommentRequest.java @@ -0,0 +1,262 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use DeletePullRequestCommentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeletePullRequestCommentRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * unique PullRequest Comment identifier + */ + private String commentId; + + /** + * unique PullRequest Comment identifier + */ + public String getCommentId() { + return commentId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeletePullRequestCommentRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * unique PullRequest Comment identifier + */ + private String commentId = null; + + /** + * unique PullRequest Comment identifier + * @param commentId the value to set + * @return this builder instance + */ + public Builder commentId(String commentId) { + this.commentId = commentId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeletePullRequestCommentRequest o) { + pullRequestId(o.getPullRequestId()); + commentId(o.getCommentId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeletePullRequestCommentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeletePullRequestCommentRequest + */ + public DeletePullRequestCommentRequest build() { + DeletePullRequestCommentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeletePullRequestCommentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeletePullRequestCommentRequest + */ + public DeletePullRequestCommentRequest buildWithoutInvocationCallback() { + DeletePullRequestCommentRequest request = new DeletePullRequestCommentRequest(); + request.pullRequestId = pullRequestId; + request.commentId = commentId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeletePullRequestCommentRequest(pullRequestId, commentId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .commentId(commentId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",commentId=").append(String.valueOf(this.commentId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeletePullRequestCommentRequest)) { + return false; + } + + DeletePullRequestCommentRequest other = (DeletePullRequestCommentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.commentId, other.commentId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.commentId == null ? 43 : this.commentId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeletePullRequestRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeletePullRequestRequest.java new file mode 100644 index 00000000000..fdc7aef68e3 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeletePullRequestRequest.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use DeletePullRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeletePullRequestRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeletePullRequestRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeletePullRequestRequest o) { + pullRequestId(o.getPullRequestId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeletePullRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeletePullRequestRequest + */ + public DeletePullRequestRequest build() { + DeletePullRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeletePullRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeletePullRequestRequest + */ + public DeletePullRequestRequest buildWithoutInvocationCallback() { + DeletePullRequestRequest request = new DeletePullRequestRequest(); + request.pullRequestId = pullRequestId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeletePullRequestRequest(pullRequestId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeletePullRequestRequest)) { + return false; + } + + DeletePullRequestRequest other = (DeletePullRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeleteRepositorySettingsRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeleteRepositorySettingsRequest.java new file mode 100644 index 00000000000..1a9809886c1 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/DeleteRepositorySettingsRequest.java @@ -0,0 +1,262 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use DeleteRepositorySettingsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeleteRepositorySettingsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique repository identifier. + */ + private String repositoryId; + + /** + * Unique repository identifier. + */ + public String getRepositoryId() { + return repositoryId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteRepositorySettingsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique repository identifier. + */ + private String repositoryId = null; + + /** + * Unique repository identifier. + * @param repositoryId the value to set + * @return this builder instance + */ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteRepositorySettingsRequest o) { + repositoryId(o.getRepositoryId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteRepositorySettingsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteRepositorySettingsRequest + */ + public DeleteRepositorySettingsRequest build() { + DeleteRepositorySettingsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteRepositorySettingsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteRepositorySettingsRequest + */ + public DeleteRepositorySettingsRequest buildWithoutInvocationCallback() { + DeleteRepositorySettingsRequest request = new DeleteRepositorySettingsRequest(); + request.repositoryId = repositoryId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new DeleteRepositorySettingsRequest(repositoryId, ifMatch, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .repositoryId(repositoryId) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteRepositorySettingsRequest)) { + return false; + } + + DeleteRepositorySettingsRequest other = (DeleteRepositorySettingsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetCommitDiffRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetCommitDiffRequest.java index 3e5d9b3a045..9c3557c67ff 100644 --- a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetCommitDiffRequest.java +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetCommitDiffRequest.java @@ -44,6 +44,17 @@ public String getTargetVersion() { public String getBaseVersion() { return baseVersion; } + /** + * The target repository identifier + */ + private String targetRepositoryId; + + /** + * The target repository identifier + */ + public String getTargetRepositoryId() { + return targetRepositoryId; + } /** * Boolean value to indicate whether to use merge base or most recent revision. */ @@ -119,6 +130,21 @@ public Builder baseVersion(String baseVersion) { return this; } + /** + * The target repository identifier + */ + private String targetRepositoryId = null; + + /** + * The target repository identifier + * @param targetRepositoryId the value to set + * @return this builder instance + */ + public Builder targetRepositoryId(String targetRepositoryId) { + this.targetRepositoryId = targetRepositoryId; + return this; + } + /** * Boolean value to indicate whether to use merge base or most recent revision. */ @@ -180,6 +206,7 @@ public Builder copy(GetCommitDiffRequest o) { repositoryId(o.getRepositoryId()); targetVersion(o.getTargetVersion()); baseVersion(o.getBaseVersion()); + targetRepositoryId(o.getTargetRepositoryId()); isComparisonFromMergeBase(o.getIsComparisonFromMergeBase()); opcRequestId(o.getOpcRequestId()); invocationCallback(o.getInvocationCallback()); @@ -217,10 +244,11 @@ public GetCommitDiffRequest buildWithoutInvocationCallback() { request.repositoryId = repositoryId; request.targetVersion = targetVersion; request.baseVersion = baseVersion; + request.targetRepositoryId = targetRepositoryId; request.isComparisonFromMergeBase = isComparisonFromMergeBase; request.opcRequestId = opcRequestId; return request; - // new GetCommitDiffRequest(repositoryId, targetVersion, baseVersion, isComparisonFromMergeBase, opcRequestId); + // new GetCommitDiffRequest(repositoryId, targetVersion, baseVersion, targetRepositoryId, isComparisonFromMergeBase, opcRequestId); } } @@ -233,6 +261,7 @@ public Builder toBuilder() { .repositoryId(repositoryId) .targetVersion(targetVersion) .baseVersion(baseVersion) + .targetRepositoryId(targetRepositoryId) .isComparisonFromMergeBase(isComparisonFromMergeBase) .opcRequestId(opcRequestId); } @@ -253,6 +282,7 @@ public String toString() { sb.append(",repositoryId=").append(String.valueOf(this.repositoryId)); sb.append(",targetVersion=").append(String.valueOf(this.targetVersion)); sb.append(",baseVersion=").append(String.valueOf(this.baseVersion)); + sb.append(",targetRepositoryId=").append(String.valueOf(this.targetRepositoryId)); sb.append(",isComparisonFromMergeBase=") .append(String.valueOf(this.isComparisonFromMergeBase)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); @@ -274,6 +304,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.repositoryId, other.repositoryId) && java.util.Objects.equals(this.targetVersion, other.targetVersion) && java.util.Objects.equals(this.baseVersion, other.baseVersion) + && java.util.Objects.equals(this.targetRepositoryId, other.targetRepositoryId) && java.util.Objects.equals( this.isComparisonFromMergeBase, other.isComparisonFromMergeBase) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); @@ -288,6 +319,11 @@ public int hashCode() { (result * PRIME) + (this.targetVersion == null ? 43 : this.targetVersion.hashCode()); result = (result * PRIME) + (this.baseVersion == null ? 43 : this.baseVersion.hashCode()); + result = + (result * PRIME) + + (this.targetRepositoryId == null + ? 43 + : this.targetRepositoryId.hashCode()); result = (result * PRIME) + (this.isComparisonFromMergeBase == null diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetProjectNotificationPreferenceRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetProjectNotificationPreferenceRequest.java new file mode 100644 index 00000000000..de0989024c1 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetProjectNotificationPreferenceRequest.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use GetProjectNotificationPreferenceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetProjectNotificationPreferenceRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique project identifier. + */ + private String projectId; + + /** + * Unique project identifier. + */ + public String getProjectId() { + return projectId; + } + /** + * Unique principal identifier. + */ + private String principalId; + + /** + * Unique principal identifier. + */ + public String getPrincipalId() { + return principalId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetProjectNotificationPreferenceRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique project identifier. + */ + private String projectId = null; + + /** + * Unique project identifier. + * @param projectId the value to set + * @return this builder instance + */ + public Builder projectId(String projectId) { + this.projectId = projectId; + return this; + } + + /** + * Unique principal identifier. + */ + private String principalId = null; + + /** + * Unique principal identifier. + * @param principalId the value to set + * @return this builder instance + */ + public Builder principalId(String principalId) { + this.principalId = principalId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetProjectNotificationPreferenceRequest o) { + projectId(o.getProjectId()); + principalId(o.getPrincipalId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetProjectNotificationPreferenceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetProjectNotificationPreferenceRequest + */ + public GetProjectNotificationPreferenceRequest build() { + GetProjectNotificationPreferenceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetProjectNotificationPreferenceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetProjectNotificationPreferenceRequest + */ + public GetProjectNotificationPreferenceRequest buildWithoutInvocationCallback() { + GetProjectNotificationPreferenceRequest request = + new GetProjectNotificationPreferenceRequest(); + request.projectId = projectId; + request.principalId = principalId; + request.opcRequestId = opcRequestId; + return request; + // new GetProjectNotificationPreferenceRequest(projectId, principalId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .projectId(projectId) + .principalId(principalId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",projectId=").append(String.valueOf(this.projectId)); + sb.append(",principalId=").append(String.valueOf(this.principalId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetProjectNotificationPreferenceRequest)) { + return false; + } + + GetProjectNotificationPreferenceRequest other = (GetProjectNotificationPreferenceRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.projectId, other.projectId) + && java.util.Objects.equals(this.principalId, other.principalId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.projectId == null ? 43 : this.projectId.hashCode()); + result = (result * PRIME) + (this.principalId == null ? 43 : this.principalId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetProjectRepositorySettingsRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetProjectRepositorySettingsRequest.java new file mode 100644 index 00000000000..67ecd8a2e60 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetProjectRepositorySettingsRequest.java @@ -0,0 +1,194 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use GetProjectRepositorySettingsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetProjectRepositorySettingsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique project identifier. + */ + private String projectId; + + /** + * Unique project identifier. + */ + public String getProjectId() { + return projectId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetProjectRepositorySettingsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique project identifier. + */ + private String projectId = null; + + /** + * Unique project identifier. + * @param projectId the value to set + * @return this builder instance + */ + public Builder projectId(String projectId) { + this.projectId = projectId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetProjectRepositorySettingsRequest o) { + projectId(o.getProjectId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetProjectRepositorySettingsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetProjectRepositorySettingsRequest + */ + public GetProjectRepositorySettingsRequest build() { + GetProjectRepositorySettingsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetProjectRepositorySettingsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetProjectRepositorySettingsRequest + */ + public GetProjectRepositorySettingsRequest buildWithoutInvocationCallback() { + GetProjectRepositorySettingsRequest request = new GetProjectRepositorySettingsRequest(); + request.projectId = projectId; + request.opcRequestId = opcRequestId; + return request; + // new GetProjectRepositorySettingsRequest(projectId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().projectId(projectId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",projectId=").append(String.valueOf(this.projectId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetProjectRepositorySettingsRequest)) { + return false; + } + + GetProjectRepositorySettingsRequest other = (GetProjectRepositorySettingsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.projectId, other.projectId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.projectId == null ? 43 : this.projectId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetPullRequestAttachmentContentRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetPullRequestAttachmentContentRequest.java new file mode 100644 index 00000000000..5a997a4a437 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetPullRequestAttachmentContentRequest.java @@ -0,0 +1,231 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use GetPullRequestAttachmentContentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetPullRequestAttachmentContentRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * unique PullRequest attachment identifier + */ + private String attachmentId; + + /** + * unique PullRequest attachment identifier + */ + public String getAttachmentId() { + return attachmentId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetPullRequestAttachmentContentRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * unique PullRequest attachment identifier + */ + private String attachmentId = null; + + /** + * unique PullRequest attachment identifier + * @param attachmentId the value to set + * @return this builder instance + */ + public Builder attachmentId(String attachmentId) { + this.attachmentId = attachmentId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetPullRequestAttachmentContentRequest o) { + pullRequestId(o.getPullRequestId()); + attachmentId(o.getAttachmentId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetPullRequestAttachmentContentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetPullRequestAttachmentContentRequest + */ + public GetPullRequestAttachmentContentRequest build() { + GetPullRequestAttachmentContentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetPullRequestAttachmentContentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetPullRequestAttachmentContentRequest + */ + public GetPullRequestAttachmentContentRequest buildWithoutInvocationCallback() { + GetPullRequestAttachmentContentRequest request = + new GetPullRequestAttachmentContentRequest(); + request.pullRequestId = pullRequestId; + request.attachmentId = attachmentId; + request.opcRequestId = opcRequestId; + return request; + // new GetPullRequestAttachmentContentRequest(pullRequestId, attachmentId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .attachmentId(attachmentId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",attachmentId=").append(String.valueOf(this.attachmentId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetPullRequestAttachmentContentRequest)) { + return false; + } + + GetPullRequestAttachmentContentRequest other = (GetPullRequestAttachmentContentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.attachmentId, other.attachmentId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.attachmentId == null ? 43 : this.attachmentId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetPullRequestAttachmentRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetPullRequestAttachmentRequest.java new file mode 100644 index 00000000000..eaf3f7ece83 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetPullRequestAttachmentRequest.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use GetPullRequestAttachmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetPullRequestAttachmentRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * unique PullRequest attachment identifier + */ + private String attachmentId; + + /** + * unique PullRequest attachment identifier + */ + public String getAttachmentId() { + return attachmentId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetPullRequestAttachmentRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * unique PullRequest attachment identifier + */ + private String attachmentId = null; + + /** + * unique PullRequest attachment identifier + * @param attachmentId the value to set + * @return this builder instance + */ + public Builder attachmentId(String attachmentId) { + this.attachmentId = attachmentId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetPullRequestAttachmentRequest o) { + pullRequestId(o.getPullRequestId()); + attachmentId(o.getAttachmentId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetPullRequestAttachmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetPullRequestAttachmentRequest + */ + public GetPullRequestAttachmentRequest build() { + GetPullRequestAttachmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetPullRequestAttachmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetPullRequestAttachmentRequest + */ + public GetPullRequestAttachmentRequest buildWithoutInvocationCallback() { + GetPullRequestAttachmentRequest request = new GetPullRequestAttachmentRequest(); + request.pullRequestId = pullRequestId; + request.attachmentId = attachmentId; + request.opcRequestId = opcRequestId; + return request; + // new GetPullRequestAttachmentRequest(pullRequestId, attachmentId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .attachmentId(attachmentId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",attachmentId=").append(String.valueOf(this.attachmentId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetPullRequestAttachmentRequest)) { + return false; + } + + GetPullRequestAttachmentRequest other = (GetPullRequestAttachmentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.attachmentId, other.attachmentId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.attachmentId == null ? 43 : this.attachmentId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetPullRequestChangeSummaryMetricsRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetPullRequestChangeSummaryMetricsRequest.java new file mode 100644 index 00000000000..a21ff5a2ae0 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetPullRequestChangeSummaryMetricsRequest.java @@ -0,0 +1,198 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use GetPullRequestChangeSummaryMetricsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetPullRequestChangeSummaryMetricsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetPullRequestChangeSummaryMetricsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetPullRequestChangeSummaryMetricsRequest o) { + pullRequestId(o.getPullRequestId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetPullRequestChangeSummaryMetricsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetPullRequestChangeSummaryMetricsRequest + */ + public GetPullRequestChangeSummaryMetricsRequest build() { + GetPullRequestChangeSummaryMetricsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetPullRequestChangeSummaryMetricsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetPullRequestChangeSummaryMetricsRequest + */ + public GetPullRequestChangeSummaryMetricsRequest buildWithoutInvocationCallback() { + GetPullRequestChangeSummaryMetricsRequest request = + new GetPullRequestChangeSummaryMetricsRequest(); + request.pullRequestId = pullRequestId; + request.opcRequestId = opcRequestId; + return request; + // new GetPullRequestChangeSummaryMetricsRequest(pullRequestId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().pullRequestId(pullRequestId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetPullRequestChangeSummaryMetricsRequest)) { + return false; + } + + GetPullRequestChangeSummaryMetricsRequest other = + (GetPullRequestChangeSummaryMetricsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetPullRequestCommentRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetPullRequestCommentRequest.java new file mode 100644 index 00000000000..57741aab3ef --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetPullRequestCommentRequest.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use GetPullRequestCommentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetPullRequestCommentRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * unique PullRequest Comment identifier + */ + private String commentId; + + /** + * unique PullRequest Comment identifier + */ + public String getCommentId() { + return commentId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetPullRequestCommentRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * unique PullRequest Comment identifier + */ + private String commentId = null; + + /** + * unique PullRequest Comment identifier + * @param commentId the value to set + * @return this builder instance + */ + public Builder commentId(String commentId) { + this.commentId = commentId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetPullRequestCommentRequest o) { + pullRequestId(o.getPullRequestId()); + commentId(o.getCommentId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetPullRequestCommentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetPullRequestCommentRequest + */ + public GetPullRequestCommentRequest build() { + GetPullRequestCommentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetPullRequestCommentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetPullRequestCommentRequest + */ + public GetPullRequestCommentRequest buildWithoutInvocationCallback() { + GetPullRequestCommentRequest request = new GetPullRequestCommentRequest(); + request.pullRequestId = pullRequestId; + request.commentId = commentId; + request.opcRequestId = opcRequestId; + return request; + // new GetPullRequestCommentRequest(pullRequestId, commentId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .commentId(commentId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",commentId=").append(String.valueOf(this.commentId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetPullRequestCommentRequest)) { + return false; + } + + GetPullRequestCommentRequest other = (GetPullRequestCommentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.commentId, other.commentId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.commentId == null ? 43 : this.commentId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetPullRequestNotificationPreferenceRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetPullRequestNotificationPreferenceRequest.java new file mode 100644 index 00000000000..f5d434894d6 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetPullRequestNotificationPreferenceRequest.java @@ -0,0 +1,232 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use GetPullRequestNotificationPreferenceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetPullRequestNotificationPreferenceRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * Unique principal identifier. + */ + private String principalId; + + /** + * Unique principal identifier. + */ + public String getPrincipalId() { + return principalId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetPullRequestNotificationPreferenceRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * Unique principal identifier. + */ + private String principalId = null; + + /** + * Unique principal identifier. + * @param principalId the value to set + * @return this builder instance + */ + public Builder principalId(String principalId) { + this.principalId = principalId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetPullRequestNotificationPreferenceRequest o) { + pullRequestId(o.getPullRequestId()); + principalId(o.getPrincipalId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetPullRequestNotificationPreferenceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetPullRequestNotificationPreferenceRequest + */ + public GetPullRequestNotificationPreferenceRequest build() { + GetPullRequestNotificationPreferenceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetPullRequestNotificationPreferenceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetPullRequestNotificationPreferenceRequest + */ + public GetPullRequestNotificationPreferenceRequest buildWithoutInvocationCallback() { + GetPullRequestNotificationPreferenceRequest request = + new GetPullRequestNotificationPreferenceRequest(); + request.pullRequestId = pullRequestId; + request.principalId = principalId; + request.opcRequestId = opcRequestId; + return request; + // new GetPullRequestNotificationPreferenceRequest(pullRequestId, principalId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .principalId(principalId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",principalId=").append(String.valueOf(this.principalId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetPullRequestNotificationPreferenceRequest)) { + return false; + } + + GetPullRequestNotificationPreferenceRequest other = + (GetPullRequestNotificationPreferenceRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.principalId, other.principalId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.principalId == null ? 43 : this.principalId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetPullRequestRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetPullRequestRequest.java new file mode 100644 index 00000000000..70867363b3c --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetPullRequestRequest.java @@ -0,0 +1,195 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use GetPullRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetPullRequestRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetPullRequestRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetPullRequestRequest o) { + pullRequestId(o.getPullRequestId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetPullRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetPullRequestRequest + */ + public GetPullRequestRequest build() { + GetPullRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetPullRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetPullRequestRequest + */ + public GetPullRequestRequest buildWithoutInvocationCallback() { + GetPullRequestRequest request = new GetPullRequestRequest(); + request.pullRequestId = pullRequestId; + request.opcRequestId = opcRequestId; + return request; + // new GetPullRequestRequest(pullRequestId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().pullRequestId(pullRequestId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetPullRequestRequest)) { + return false; + } + + GetPullRequestRequest other = (GetPullRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetRepositoryNotificationPreferenceRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetRepositoryNotificationPreferenceRequest.java new file mode 100644 index 00000000000..d4c59ae084f --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetRepositoryNotificationPreferenceRequest.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use GetRepositoryNotificationPreferenceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetRepositoryNotificationPreferenceRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique repository identifier. + */ + private String repositoryId; + + /** + * Unique repository identifier. + */ + public String getRepositoryId() { + return repositoryId; + } + /** + * Unique principal identifier. + */ + private String principalId; + + /** + * Unique principal identifier. + */ + public String getPrincipalId() { + return principalId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetRepositoryNotificationPreferenceRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique repository identifier. + */ + private String repositoryId = null; + + /** + * Unique repository identifier. + * @param repositoryId the value to set + * @return this builder instance + */ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + return this; + } + + /** + * Unique principal identifier. + */ + private String principalId = null; + + /** + * Unique principal identifier. + * @param principalId the value to set + * @return this builder instance + */ + public Builder principalId(String principalId) { + this.principalId = principalId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetRepositoryNotificationPreferenceRequest o) { + repositoryId(o.getRepositoryId()); + principalId(o.getPrincipalId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetRepositoryNotificationPreferenceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetRepositoryNotificationPreferenceRequest + */ + public GetRepositoryNotificationPreferenceRequest build() { + GetRepositoryNotificationPreferenceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetRepositoryNotificationPreferenceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetRepositoryNotificationPreferenceRequest + */ + public GetRepositoryNotificationPreferenceRequest buildWithoutInvocationCallback() { + GetRepositoryNotificationPreferenceRequest request = + new GetRepositoryNotificationPreferenceRequest(); + request.repositoryId = repositoryId; + request.principalId = principalId; + request.opcRequestId = opcRequestId; + return request; + // new GetRepositoryNotificationPreferenceRequest(repositoryId, principalId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .repositoryId(repositoryId) + .principalId(principalId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(",principalId=").append(String.valueOf(this.principalId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetRepositoryNotificationPreferenceRequest)) { + return false; + } + + GetRepositoryNotificationPreferenceRequest other = + (GetRepositoryNotificationPreferenceRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals(this.principalId, other.principalId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = (result * PRIME) + (this.principalId == null ? 43 : this.principalId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetRepositorySettingsRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetRepositorySettingsRequest.java new file mode 100644 index 00000000000..fdf47f12bb1 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/GetRepositorySettingsRequest.java @@ -0,0 +1,194 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use GetRepositorySettingsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetRepositorySettingsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique repository identifier. + */ + private String repositoryId; + + /** + * Unique repository identifier. + */ + public String getRepositoryId() { + return repositoryId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetRepositorySettingsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique repository identifier. + */ + private String repositoryId = null; + + /** + * Unique repository identifier. + * @param repositoryId the value to set + * @return this builder instance + */ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetRepositorySettingsRequest o) { + repositoryId(o.getRepositoryId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetRepositorySettingsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetRepositorySettingsRequest + */ + public GetRepositorySettingsRequest build() { + GetRepositorySettingsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetRepositorySettingsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetRepositorySettingsRequest + */ + public GetRepositorySettingsRequest buildWithoutInvocationCallback() { + GetRepositorySettingsRequest request = new GetRepositorySettingsRequest(); + request.repositoryId = repositoryId; + request.opcRequestId = opcRequestId; + return request; + // new GetRepositorySettingsRequest(repositoryId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().repositoryId(repositoryId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetRepositorySettingsRequest)) { + return false; + } + + GetRepositorySettingsRequest other = (GetRepositorySettingsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/LikePullRequestCommentRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/LikePullRequestCommentRequest.java new file mode 100644 index 00000000000..b2b7caef4f1 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/LikePullRequestCommentRequest.java @@ -0,0 +1,262 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use LikePullRequestCommentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class LikePullRequestCommentRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * unique PullRequest Comment identifier + */ + private String commentId; + + /** + * unique PullRequest Comment identifier + */ + public String getCommentId() { + return commentId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + LikePullRequestCommentRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * unique PullRequest Comment identifier + */ + private String commentId = null; + + /** + * unique PullRequest Comment identifier + * @param commentId the value to set + * @return this builder instance + */ + public Builder commentId(String commentId) { + this.commentId = commentId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(LikePullRequestCommentRequest o) { + pullRequestId(o.getPullRequestId()); + commentId(o.getCommentId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of LikePullRequestCommentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of LikePullRequestCommentRequest + */ + public LikePullRequestCommentRequest build() { + LikePullRequestCommentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of LikePullRequestCommentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of LikePullRequestCommentRequest + */ + public LikePullRequestCommentRequest buildWithoutInvocationCallback() { + LikePullRequestCommentRequest request = new LikePullRequestCommentRequest(); + request.pullRequestId = pullRequestId; + request.commentId = commentId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new LikePullRequestCommentRequest(pullRequestId, commentId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .commentId(commentId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",commentId=").append(String.valueOf(this.commentId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof LikePullRequestCommentRequest)) { + return false; + } + + LikePullRequestCommentRequest other = (LikePullRequestCommentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.commentId, other.commentId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.commentId == null ? 43 : this.commentId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListBuildRunSnapshotsRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListBuildRunSnapshotsRequest.java new file mode 100644 index 00000000000..d1a196d963c --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListBuildRunSnapshotsRequest.java @@ -0,0 +1,463 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use ListBuildRunSnapshotsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListBuildRunSnapshotsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * Unique build pipeline identifier. + */ + private String pipelineId; + + /** + * Unique build pipeline identifier. + */ + public String getPipelineId() { + return pipelineId; + } + /** + * Unique build run identifier. + */ + private String buildRunId; + + /** + * Unique build run identifier. + */ + public String getBuildRunId() { + return buildRunId; + } + /** + * Commit ID in a repository. + */ + private String commitId; + + /** + * Commit ID in a repository. + */ + public String getCommitId() { + return commitId; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The sort order to use. Use either ascending or descending. + */ + private com.oracle.bmc.devops.model.SortOrder sortOrder; + + /** + * The sort order to use. Use either ascending or descending. + */ + public com.oracle.bmc.devops.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for name is ascending. If no value is specified time created is default. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for name is ascending. If no value is specified time created is default. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + Name("name"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for name is ascending. If no value is specified time created is default. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListBuildRunSnapshotsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * Unique build pipeline identifier. + */ + private String pipelineId = null; + + /** + * Unique build pipeline identifier. + * @param pipelineId the value to set + * @return this builder instance + */ + public Builder pipelineId(String pipelineId) { + this.pipelineId = pipelineId; + return this; + } + + /** + * Unique build run identifier. + */ + private String buildRunId = null; + + /** + * Unique build run identifier. + * @param buildRunId the value to set + * @return this builder instance + */ + public Builder buildRunId(String buildRunId) { + this.buildRunId = buildRunId; + return this; + } + + /** + * Commit ID in a repository. + */ + private String commitId = null; + + /** + * Commit ID in a repository. + * @param commitId the value to set + * @return this builder instance + */ + public Builder commitId(String commitId) { + this.commitId = commitId; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use. Use either ascending or descending. + */ + private com.oracle.bmc.devops.model.SortOrder sortOrder = null; + + /** + * The sort order to use. Use either ascending or descending. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.devops.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for name is ascending. If no value is specified time created is default. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for name is ascending. If no value is specified time created is default. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListBuildRunSnapshotsRequest o) { + pullRequestId(o.getPullRequestId()); + pipelineId(o.getPipelineId()); + buildRunId(o.getBuildRunId()); + commitId(o.getCommitId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListBuildRunSnapshotsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListBuildRunSnapshotsRequest + */ + public ListBuildRunSnapshotsRequest build() { + ListBuildRunSnapshotsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListBuildRunSnapshotsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListBuildRunSnapshotsRequest + */ + public ListBuildRunSnapshotsRequest buildWithoutInvocationCallback() { + ListBuildRunSnapshotsRequest request = new ListBuildRunSnapshotsRequest(); + request.pullRequestId = pullRequestId; + request.pipelineId = pipelineId; + request.buildRunId = buildRunId; + request.commitId = commitId; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListBuildRunSnapshotsRequest(pullRequestId, pipelineId, buildRunId, commitId, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .pipelineId(pipelineId) + .buildRunId(buildRunId) + .commitId(commitId) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",pipelineId=").append(String.valueOf(this.pipelineId)); + sb.append(",buildRunId=").append(String.valueOf(this.buildRunId)); + sb.append(",commitId=").append(String.valueOf(this.commitId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListBuildRunSnapshotsRequest)) { + return false; + } + + ListBuildRunSnapshotsRequest other = (ListBuildRunSnapshotsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.pipelineId, other.pipelineId) + && java.util.Objects.equals(this.buildRunId, other.buildRunId) + && java.util.Objects.equals(this.commitId, other.commitId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.pipelineId == null ? 43 : this.pipelineId.hashCode()); + result = (result * PRIME) + (this.buildRunId == null ? 43 : this.buildRunId.hashCode()); + result = (result * PRIME) + (this.commitId == null ? 43 : this.commitId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListCommitDiffsRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListCommitDiffsRequest.java index 8e4fe72b617..5598fa2e8df 100644 --- a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListCommitDiffsRequest.java +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListCommitDiffsRequest.java @@ -44,6 +44,17 @@ public String getBaseVersion() { public String getTargetVersion() { return targetVersion; } + /** + * The target repository identifier + */ + private String targetRepositoryId; + + /** + * The target repository identifier + */ + public String getTargetRepositoryId() { + return targetRepositoryId; + } /** * Boolean value to indicate whether to use merge base or most recent revision. */ @@ -141,6 +152,21 @@ public Builder targetVersion(String targetVersion) { return this; } + /** + * The target repository identifier + */ + private String targetRepositoryId = null; + + /** + * The target repository identifier + * @param targetRepositoryId the value to set + * @return this builder instance + */ + public Builder targetRepositoryId(String targetRepositoryId) { + this.targetRepositoryId = targetRepositoryId; + return this; + } + /** * Boolean value to indicate whether to use merge base or most recent revision. */ @@ -232,6 +258,7 @@ public Builder copy(ListCommitDiffsRequest o) { repositoryId(o.getRepositoryId()); baseVersion(o.getBaseVersion()); targetVersion(o.getTargetVersion()); + targetRepositoryId(o.getTargetRepositoryId()); isComparisonFromMergeBase(o.getIsComparisonFromMergeBase()); limit(o.getLimit()); page(o.getPage()); @@ -271,12 +298,13 @@ public ListCommitDiffsRequest buildWithoutInvocationCallback() { request.repositoryId = repositoryId; request.baseVersion = baseVersion; request.targetVersion = targetVersion; + request.targetRepositoryId = targetRepositoryId; request.isComparisonFromMergeBase = isComparisonFromMergeBase; request.limit = limit; request.page = page; request.opcRequestId = opcRequestId; return request; - // new ListCommitDiffsRequest(repositoryId, baseVersion, targetVersion, isComparisonFromMergeBase, limit, page, opcRequestId); + // new ListCommitDiffsRequest(repositoryId, baseVersion, targetVersion, targetRepositoryId, isComparisonFromMergeBase, limit, page, opcRequestId); } } @@ -289,6 +317,7 @@ public Builder toBuilder() { .repositoryId(repositoryId) .baseVersion(baseVersion) .targetVersion(targetVersion) + .targetRepositoryId(targetRepositoryId) .isComparisonFromMergeBase(isComparisonFromMergeBase) .limit(limit) .page(page) @@ -311,6 +340,7 @@ public String toString() { sb.append(",repositoryId=").append(String.valueOf(this.repositoryId)); sb.append(",baseVersion=").append(String.valueOf(this.baseVersion)); sb.append(",targetVersion=").append(String.valueOf(this.targetVersion)); + sb.append(",targetRepositoryId=").append(String.valueOf(this.targetRepositoryId)); sb.append(",isComparisonFromMergeBase=") .append(String.valueOf(this.isComparisonFromMergeBase)); sb.append(",limit=").append(String.valueOf(this.limit)); @@ -334,6 +364,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.repositoryId, other.repositoryId) && java.util.Objects.equals(this.baseVersion, other.baseVersion) && java.util.Objects.equals(this.targetVersion, other.targetVersion) + && java.util.Objects.equals(this.targetRepositoryId, other.targetRepositoryId) && java.util.Objects.equals( this.isComparisonFromMergeBase, other.isComparisonFromMergeBase) && java.util.Objects.equals(this.limit, other.limit) @@ -350,6 +381,11 @@ public int hashCode() { result = (result * PRIME) + (this.targetVersion == null ? 43 : this.targetVersion.hashCode()); + result = + (result * PRIME) + + (this.targetRepositoryId == null + ? 43 + : this.targetRepositoryId.hashCode()); result = (result * PRIME) + (this.isComparisonFromMergeBase == null diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListForkSyncStatusesRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListForkSyncStatusesRequest.java new file mode 100644 index 00000000000..e395fb1eeac --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListForkSyncStatusesRequest.java @@ -0,0 +1,264 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use ListForkSyncStatusesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListForkSyncStatusesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique repository identifier. + */ + private String repositoryId; + + /** + * Unique repository identifier. + */ + public String getRepositoryId() { + return repositoryId; + } + /** + * Specifies the branch for which the fork sync status will be checked. + */ + private String branchNameQueryParam; + + /** + * Specifies the branch for which the fork sync status will be checked. + */ + public String getBranchNameQueryParam() { + return branchNameQueryParam; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListForkSyncStatusesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique repository identifier. + */ + private String repositoryId = null; + + /** + * Unique repository identifier. + * @param repositoryId the value to set + * @return this builder instance + */ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + return this; + } + + /** + * Specifies the branch for which the fork sync status will be checked. + */ + private String branchNameQueryParam = null; + + /** + * Specifies the branch for which the fork sync status will be checked. + * @param branchNameQueryParam the value to set + * @return this builder instance + */ + public Builder branchNameQueryParam(String branchNameQueryParam) { + this.branchNameQueryParam = branchNameQueryParam; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListForkSyncStatusesRequest o) { + repositoryId(o.getRepositoryId()); + branchNameQueryParam(o.getBranchNameQueryParam()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListForkSyncStatusesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListForkSyncStatusesRequest + */ + public ListForkSyncStatusesRequest build() { + ListForkSyncStatusesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListForkSyncStatusesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListForkSyncStatusesRequest + */ + public ListForkSyncStatusesRequest buildWithoutInvocationCallback() { + ListForkSyncStatusesRequest request = new ListForkSyncStatusesRequest(); + request.repositoryId = repositoryId; + request.branchNameQueryParam = branchNameQueryParam; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new ListForkSyncStatusesRequest(repositoryId, branchNameQueryParam, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .repositoryId(repositoryId) + .branchNameQueryParam(branchNameQueryParam) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(",branchNameQueryParam=").append(String.valueOf(this.branchNameQueryParam)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListForkSyncStatusesRequest)) { + return false; + } + + ListForkSyncStatusesRequest other = (ListForkSyncStatusesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals(this.branchNameQueryParam, other.branchNameQueryParam) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = + (result * PRIME) + + (this.branchNameQueryParam == null + ? 43 + : this.branchNameQueryParam.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListProjectCommitAnalyticsAuthorsRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListProjectCommitAnalyticsAuthorsRequest.java new file mode 100644 index 00000000000..3854939ac26 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListProjectCommitAnalyticsAuthorsRequest.java @@ -0,0 +1,366 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use ListProjectCommitAnalyticsAuthorsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListProjectCommitAnalyticsAuthorsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique project identifier. + */ + private String projectId; + + /** + * Unique project identifier. + */ + public String getProjectId() { + return projectId; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The sort order to use. Use either ascending or descending. + */ + private com.oracle.bmc.devops.model.SortOrder sortOrder; + + /** + * The sort order to use. Use either ascending or descending. + */ + public com.oracle.bmc.devops.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * The field to sort by. Only one sort by value is supported for this parameter. Default order for author name is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort by value is supported for this parameter. Default order for author name is ascending. + * + **/ + public enum SortBy { + AuthorName("authorName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort by value is supported for this parameter. Default order for author name is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListProjectCommitAnalyticsAuthorsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique project identifier. + */ + private String projectId = null; + + /** + * Unique project identifier. + * @param projectId the value to set + * @return this builder instance + */ + public Builder projectId(String projectId) { + this.projectId = projectId; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use. Use either ascending or descending. + */ + private com.oracle.bmc.devops.model.SortOrder sortOrder = null; + + /** + * The sort order to use. Use either ascending or descending. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.devops.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The field to sort by. Only one sort by value is supported for this parameter. Default order for author name is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort by value is supported for this parameter. Default order for author name is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListProjectCommitAnalyticsAuthorsRequest o) { + projectId(o.getProjectId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + opcRequestId(o.getOpcRequestId()); + sortBy(o.getSortBy()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListProjectCommitAnalyticsAuthorsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListProjectCommitAnalyticsAuthorsRequest + */ + public ListProjectCommitAnalyticsAuthorsRequest build() { + ListProjectCommitAnalyticsAuthorsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListProjectCommitAnalyticsAuthorsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListProjectCommitAnalyticsAuthorsRequest + */ + public ListProjectCommitAnalyticsAuthorsRequest buildWithoutInvocationCallback() { + ListProjectCommitAnalyticsAuthorsRequest request = + new ListProjectCommitAnalyticsAuthorsRequest(); + request.projectId = projectId; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.opcRequestId = opcRequestId; + request.sortBy = sortBy; + return request; + // new ListProjectCommitAnalyticsAuthorsRequest(projectId, limit, page, sortOrder, opcRequestId, sortBy); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .projectId(projectId) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .opcRequestId(opcRequestId) + .sortBy(sortBy); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",projectId=").append(String.valueOf(this.projectId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListProjectCommitAnalyticsAuthorsRequest)) { + return false; + } + + ListProjectCommitAnalyticsAuthorsRequest other = + (ListProjectCommitAnalyticsAuthorsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.projectId, other.projectId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.sortBy, other.sortBy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.projectId == null ? 43 : this.projectId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListProtectedBranchesRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListProtectedBranchesRequest.java new file mode 100644 index 00000000000..a6f4c801484 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListProtectedBranchesRequest.java @@ -0,0 +1,396 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use ListProtectedBranchesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListProtectedBranchesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique repository identifier. + */ + private String repositoryId; + + /** + * Unique repository identifier. + */ + public String getRepositoryId() { + return repositoryId; + } + /** + * A filter to return only resources that match the given branch name. + */ + private String name; + + /** + * A filter to return only resources that match the given branch name. + */ + public String getName() { + return name; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The sort order to use. Use either ascending or descending. + */ + private com.oracle.bmc.devops.model.SortOrder sortOrder; + + /** + * The sort order to use. Use either ascending or descending. + */ + public com.oracle.bmc.devops.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for branch name is ascending. If no value is specified branch name is default. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for branch name is ascending. If no value is specified branch name is default. + * + **/ + public enum SortBy { + BranchName("branchName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for branch name is ascending. If no value is specified branch name is default. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListProtectedBranchesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique repository identifier. + */ + private String repositoryId = null; + + /** + * Unique repository identifier. + * @param repositoryId the value to set + * @return this builder instance + */ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + return this; + } + + /** + * A filter to return only resources that match the given branch name. + */ + private String name = null; + + /** + * A filter to return only resources that match the given branch name. + * @param name the value to set + * @return this builder instance + */ + public Builder name(String name) { + this.name = name; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use. Use either ascending or descending. + */ + private com.oracle.bmc.devops.model.SortOrder sortOrder = null; + + /** + * The sort order to use. Use either ascending or descending. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.devops.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for branch name is ascending. If no value is specified branch name is default. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for branch name is ascending. If no value is specified branch name is default. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListProtectedBranchesRequest o) { + repositoryId(o.getRepositoryId()); + name(o.getName()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListProtectedBranchesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListProtectedBranchesRequest + */ + public ListProtectedBranchesRequest build() { + ListProtectedBranchesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListProtectedBranchesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListProtectedBranchesRequest + */ + public ListProtectedBranchesRequest buildWithoutInvocationCallback() { + ListProtectedBranchesRequest request = new ListProtectedBranchesRequest(); + request.repositoryId = repositoryId; + request.name = name; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListProtectedBranchesRequest(repositoryId, name, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .repositoryId(repositoryId) + .name(name) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(",name=").append(String.valueOf(this.name)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListProtectedBranchesRequest)) { + return false; + } + + ListProtectedBranchesRequest other = (ListProtectedBranchesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestActivitiesRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestActivitiesRequest.java new file mode 100644 index 00000000000..0ee9b121690 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestActivitiesRequest.java @@ -0,0 +1,370 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use ListPullRequestActivitiesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestActivitiesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * An optional filter to list activities based on activity type. If no value is specified, all activity types will returned. + * + */ + private ActivityType activityType; + + /** + * An optional filter to list activities based on activity type. If no value is specified, all activity types will returned. + * + **/ + public enum ActivityType { + Lifecycle("LIFECYCLE"), + Approval("APPROVAL"), + Commit("COMMIT"), + Reviewer("REVIEWER"), + Comment("COMMENT"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActivityType v : ActivityType.values()) { + map.put(v.getValue(), v); + } + } + + ActivityType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ActivityType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ActivityType: " + key); + } + }; + + /** + * An optional filter to list activities based on activity type. If no value is specified, all activity types will returned. + * + */ + public ActivityType getActivityType() { + return activityType; + } + /** + * The sort order to use. Use either ascending or descending. + */ + private com.oracle.bmc.devops.model.SortOrder sortOrder; + + /** + * The sort order to use. Use either ascending or descending. + */ + public com.oracle.bmc.devops.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListPullRequestActivitiesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * An optional filter to list activities based on activity type. If no value is specified, all activity types will returned. + * + */ + private ActivityType activityType = null; + + /** + * An optional filter to list activities based on activity type. If no value is specified, all activity types will returned. + * + * @param activityType the value to set + * @return this builder instance + */ + public Builder activityType(ActivityType activityType) { + this.activityType = activityType; + return this; + } + + /** + * The sort order to use. Use either ascending or descending. + */ + private com.oracle.bmc.devops.model.SortOrder sortOrder = null; + + /** + * The sort order to use. Use either ascending or descending. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.devops.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPullRequestActivitiesRequest o) { + pullRequestId(o.getPullRequestId()); + activityType(o.getActivityType()); + sortOrder(o.getSortOrder()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListPullRequestActivitiesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListPullRequestActivitiesRequest + */ + public ListPullRequestActivitiesRequest build() { + ListPullRequestActivitiesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListPullRequestActivitiesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListPullRequestActivitiesRequest + */ + public ListPullRequestActivitiesRequest buildWithoutInvocationCallback() { + ListPullRequestActivitiesRequest request = new ListPullRequestActivitiesRequest(); + request.pullRequestId = pullRequestId; + request.activityType = activityType; + request.sortOrder = sortOrder; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + return request; + // new ListPullRequestActivitiesRequest(pullRequestId, activityType, sortOrder, limit, page, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .activityType(activityType) + .sortOrder(sortOrder) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",activityType=").append(String.valueOf(this.activityType)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPullRequestActivitiesRequest)) { + return false; + } + + ListPullRequestActivitiesRequest other = (ListPullRequestActivitiesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.activityType, other.activityType) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.activityType == null ? 43 : this.activityType.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestAttachmentsRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestAttachmentsRequest.java new file mode 100644 index 00000000000..061279995bc --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestAttachmentsRequest.java @@ -0,0 +1,434 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use ListPullRequestAttachmentsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestAttachmentsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * The OCID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The OCID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The sort order to use. Use either ascending or descending. + */ + private com.oracle.bmc.devops.model.SortOrder sortOrder; + + /** + * The sort order to use. Use either ascending or descending. + */ + public com.oracle.bmc.devops.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order is ascending. If no value is specified timeCreated is default. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order is ascending. If no value is specified timeCreated is default. + * + **/ + public enum SortBy { + FileName("fileName"), + TimeCreated("timeCreated"), + CreatedBy("createdBy"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order is ascending. If no value is specified timeCreated is default. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * A filter to return only resources that match the entire file name given. + */ + private String fileName; + + /** + * A filter to return only resources that match the entire file name given. + */ + public String getFileName() { + return fileName; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListPullRequestAttachmentsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * The OCID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The OCID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The sort order to use. Use either ascending or descending. + */ + private com.oracle.bmc.devops.model.SortOrder sortOrder = null; + + /** + * The sort order to use. Use either ascending or descending. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.devops.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order is ascending. If no value is specified timeCreated is default. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order is ascending. If no value is specified timeCreated is default. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * A filter to return only resources that match the entire file name given. + */ + private String fileName = null; + + /** + * A filter to return only resources that match the entire file name given. + * @param fileName the value to set + * @return this builder instance + */ + public Builder fileName(String fileName) { + this.fileName = fileName; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPullRequestAttachmentsRequest o) { + pullRequestId(o.getPullRequestId()); + compartmentId(o.getCompartmentId()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + fileName(o.getFileName()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListPullRequestAttachmentsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListPullRequestAttachmentsRequest + */ + public ListPullRequestAttachmentsRequest build() { + ListPullRequestAttachmentsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListPullRequestAttachmentsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListPullRequestAttachmentsRequest + */ + public ListPullRequestAttachmentsRequest buildWithoutInvocationCallback() { + ListPullRequestAttachmentsRequest request = new ListPullRequestAttachmentsRequest(); + request.pullRequestId = pullRequestId; + request.compartmentId = compartmentId; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.fileName = fileName; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + return request; + // new ListPullRequestAttachmentsRequest(pullRequestId, compartmentId, sortOrder, sortBy, fileName, limit, page, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .compartmentId(compartmentId) + .sortOrder(sortOrder) + .sortBy(sortBy) + .fileName(fileName) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",fileName=").append(String.valueOf(this.fileName)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPullRequestAttachmentsRequest)) { + return false; + } + + ListPullRequestAttachmentsRequest other = (ListPullRequestAttachmentsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.fileName, other.fileName) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.fileName == null ? 43 : this.fileName.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestAuthorsRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestAuthorsRequest.java new file mode 100644 index 00000000000..80566fa152b --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestAuthorsRequest.java @@ -0,0 +1,292 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use ListPullRequestAuthorsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestAuthorsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique repository identifier. + */ + private String repositoryId; + + /** + * Unique repository identifier. + */ + public String getRepositoryId() { + return repositoryId; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The sort order to use. Use either ascending or descending. + */ + private com.oracle.bmc.devops.model.SortOrder sortOrder; + + /** + * The sort order to use. Use either ascending or descending. + */ + public com.oracle.bmc.devops.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListPullRequestAuthorsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique repository identifier. + */ + private String repositoryId = null; + + /** + * Unique repository identifier. + * @param repositoryId the value to set + * @return this builder instance + */ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use. Use either ascending or descending. + */ + private com.oracle.bmc.devops.model.SortOrder sortOrder = null; + + /** + * The sort order to use. Use either ascending or descending. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.devops.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPullRequestAuthorsRequest o) { + repositoryId(o.getRepositoryId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListPullRequestAuthorsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListPullRequestAuthorsRequest + */ + public ListPullRequestAuthorsRequest build() { + ListPullRequestAuthorsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListPullRequestAuthorsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListPullRequestAuthorsRequest + */ + public ListPullRequestAuthorsRequest buildWithoutInvocationCallback() { + ListPullRequestAuthorsRequest request = new ListPullRequestAuthorsRequest(); + request.repositoryId = repositoryId; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.opcRequestId = opcRequestId; + return request; + // new ListPullRequestAuthorsRequest(repositoryId, limit, page, sortOrder, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .repositoryId(repositoryId) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPullRequestAuthorsRequest)) { + return false; + } + + ListPullRequestAuthorsRequest other = (ListPullRequestAuthorsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestCommentsRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestCommentsRequest.java new file mode 100644 index 00000000000..681c2729bf7 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestCommentsRequest.java @@ -0,0 +1,497 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use ListPullRequestCommentsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestCommentsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * The OCID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The OCID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The sort order to use. Use either ascending or descending. + */ + private com.oracle.bmc.devops.model.SortOrder sortOrder; + + /** + * The sort order to use. Use either ascending or descending. + */ + public com.oracle.bmc.devops.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order is ascending. If no value is specified timeCreated is default. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order is ascending. If no value is specified timeCreated is default. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + CreatedBy("createdBy"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order is ascending. If no value is specified timeCreated is default. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * unique PullRequest Comment identifier + */ + private String commentId; + + /** + * unique PullRequest Comment identifier + */ + public String getCommentId() { + return commentId; + } + /** + * PullRequest Comment Commit SHA + */ + private String commitId; + + /** + * PullRequest Comment Commit SHA + */ + public String getCommitId() { + return commitId; + } + /** + * PullRequest File Path + */ + private String filePath; + + /** + * PullRequest File Path + */ + public String getFilePath() { + return filePath; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListPullRequestCommentsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * The OCID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The OCID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The sort order to use. Use either ascending or descending. + */ + private com.oracle.bmc.devops.model.SortOrder sortOrder = null; + + /** + * The sort order to use. Use either ascending or descending. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.devops.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order is ascending. If no value is specified timeCreated is default. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order is ascending. If no value is specified timeCreated is default. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * unique PullRequest Comment identifier + */ + private String commentId = null; + + /** + * unique PullRequest Comment identifier + * @param commentId the value to set + * @return this builder instance + */ + public Builder commentId(String commentId) { + this.commentId = commentId; + return this; + } + + /** + * PullRequest Comment Commit SHA + */ + private String commitId = null; + + /** + * PullRequest Comment Commit SHA + * @param commitId the value to set + * @return this builder instance + */ + public Builder commitId(String commitId) { + this.commitId = commitId; + return this; + } + + /** + * PullRequest File Path + */ + private String filePath = null; + + /** + * PullRequest File Path + * @param filePath the value to set + * @return this builder instance + */ + public Builder filePath(String filePath) { + this.filePath = filePath; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPullRequestCommentsRequest o) { + pullRequestId(o.getPullRequestId()); + compartmentId(o.getCompartmentId()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + commentId(o.getCommentId()); + commitId(o.getCommitId()); + filePath(o.getFilePath()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListPullRequestCommentsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListPullRequestCommentsRequest + */ + public ListPullRequestCommentsRequest build() { + ListPullRequestCommentsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListPullRequestCommentsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListPullRequestCommentsRequest + */ + public ListPullRequestCommentsRequest buildWithoutInvocationCallback() { + ListPullRequestCommentsRequest request = new ListPullRequestCommentsRequest(); + request.pullRequestId = pullRequestId; + request.compartmentId = compartmentId; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.commentId = commentId; + request.commitId = commitId; + request.filePath = filePath; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + return request; + // new ListPullRequestCommentsRequest(pullRequestId, compartmentId, sortOrder, sortBy, commentId, commitId, filePath, limit, page, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .compartmentId(compartmentId) + .sortOrder(sortOrder) + .sortBy(sortBy) + .commentId(commentId) + .commitId(commitId) + .filePath(filePath) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",commentId=").append(String.valueOf(this.commentId)); + sb.append(",commitId=").append(String.valueOf(this.commitId)); + sb.append(",filePath=").append(String.valueOf(this.filePath)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPullRequestCommentsRequest)) { + return false; + } + + ListPullRequestCommentsRequest other = (ListPullRequestCommentsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.commentId, other.commentId) + && java.util.Objects.equals(this.commitId, other.commitId) + && java.util.Objects.equals(this.filePath, other.filePath) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.commentId == null ? 43 : this.commentId.hashCode()); + result = (result * PRIME) + (this.commitId == null ? 43 : this.commitId.hashCode()); + result = (result * PRIME) + (this.filePath == null ? 43 : this.filePath.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestCommitsRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestCommitsRequest.java new file mode 100644 index 00000000000..df3b3fbcf86 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestCommitsRequest.java @@ -0,0 +1,262 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use ListPullRequestCommitsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestCommitsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListPullRequestCommitsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPullRequestCommitsRequest o) { + pullRequestId(o.getPullRequestId()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListPullRequestCommitsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListPullRequestCommitsRequest + */ + public ListPullRequestCommitsRequest build() { + ListPullRequestCommitsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListPullRequestCommitsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListPullRequestCommitsRequest + */ + public ListPullRequestCommitsRequest buildWithoutInvocationCallback() { + ListPullRequestCommitsRequest request = new ListPullRequestCommitsRequest(); + request.pullRequestId = pullRequestId; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + return request; + // new ListPullRequestCommitsRequest(pullRequestId, limit, page, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPullRequestCommitsRequest)) { + return false; + } + + ListPullRequestCommitsRequest other = (ListPullRequestCommitsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestFileChangesRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestFileChangesRequest.java new file mode 100644 index 00000000000..0b06beac8c3 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestFileChangesRequest.java @@ -0,0 +1,294 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use ListPullRequestFileChangesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestFileChangesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * PullRequest File Path + */ + private String filePath; + + /** + * PullRequest File Path + */ + public String getFilePath() { + return filePath; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListPullRequestFileChangesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * PullRequest File Path + */ + private String filePath = null; + + /** + * PullRequest File Path + * @param filePath the value to set + * @return this builder instance + */ + public Builder filePath(String filePath) { + this.filePath = filePath; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPullRequestFileChangesRequest o) { + pullRequestId(o.getPullRequestId()); + filePath(o.getFilePath()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListPullRequestFileChangesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListPullRequestFileChangesRequest + */ + public ListPullRequestFileChangesRequest build() { + ListPullRequestFileChangesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListPullRequestFileChangesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListPullRequestFileChangesRequest + */ + public ListPullRequestFileChangesRequest buildWithoutInvocationCallback() { + ListPullRequestFileChangesRequest request = new ListPullRequestFileChangesRequest(); + request.pullRequestId = pullRequestId; + request.filePath = filePath; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + return request; + // new ListPullRequestFileChangesRequest(pullRequestId, filePath, limit, page, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .filePath(filePath) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",filePath=").append(String.valueOf(this.filePath)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPullRequestFileChangesRequest)) { + return false; + } + + ListPullRequestFileChangesRequest other = (ListPullRequestFileChangesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.filePath, other.filePath) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.filePath == null ? 43 : this.filePath.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestsRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestsRequest.java new file mode 100644 index 00000000000..2ad2b7d8517 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListPullRequestsRequest.java @@ -0,0 +1,697 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use ListPullRequestsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The OCID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only pull requests that match the given lifecycle state. + */ + private com.oracle.bmc.devops.model.PullRequest.LifecycleState lifecycleState; + + /** + * A filter to return only pull requests that match the given lifecycle state. + */ + public com.oracle.bmc.devops.model.PullRequest.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only pull requests that match the given lifecycle state. + */ + private com.oracle.bmc.devops.model.PullRequest.LifecycleDetails lifecycleDetails; + + /** + * A filter to return only pull requests that match the given lifecycle state. + */ + public com.oracle.bmc.devops.model.PullRequest.LifecycleDetails getLifecycleDetails() { + return lifecycleDetails; + } + /** + * The OCID of the repository in which to list resources. + */ + private String repositoryId; + + /** + * The OCID of the repository in which to list resources. + */ + public String getRepositoryId() { + return repositoryId; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * Unique identifier or OCID for listing a single resource by ID. + */ + private String id; + + /** + * Unique identifier or OCID for listing a single resource by ID. + */ + public String getId() { + return id; + } + /** + * PullRequest Created By + */ + private String createdBy; + + /** + * PullRequest Created By + */ + public String getCreatedBy() { + return createdBy; + } + /** + * PullRequest Target Branch + */ + private String destinationBranch; + + /** + * PullRequest Target Branch + */ + public String getDestinationBranch() { + return destinationBranch; + } + /** + * PullRequest Source Branch. + */ + private String sourceBranch; + + /** + * PullRequest Source Branch. + */ + public String getSourceBranch() { + return sourceBranch; + } + /** + * PullRequest Reviewer Id + */ + private String reviewerPrincipalId; + + /** + * PullRequest Reviewer Id + */ + public String getReviewerPrincipalId() { + return reviewerPrincipalId; + } + /** + * PullRequest Source Repository Id + */ + private String sourceRepositoryId; + + /** + * PullRequest Source Repository Id + */ + public String getSourceRepositoryId() { + return sourceRepositoryId; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The sort order to use. Use either ascending or descending. + */ + private com.oracle.bmc.devops.model.SortOrder sortOrder; + + /** + * The sort order to use. Use either ascending or descending. + */ + public com.oracle.bmc.devops.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListPullRequestsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The OCID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only pull requests that match the given lifecycle state. + */ + private com.oracle.bmc.devops.model.PullRequest.LifecycleState lifecycleState = null; + + /** + * A filter to return only pull requests that match the given lifecycle state. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.devops.model.PullRequest.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only pull requests that match the given lifecycle state. + */ + private com.oracle.bmc.devops.model.PullRequest.LifecycleDetails lifecycleDetails = null; + + /** + * A filter to return only pull requests that match the given lifecycle state. + * @param lifecycleDetails the value to set + * @return this builder instance + */ + public Builder lifecycleDetails( + com.oracle.bmc.devops.model.PullRequest.LifecycleDetails lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + return this; + } + + /** + * The OCID of the repository in which to list resources. + */ + private String repositoryId = null; + + /** + * The OCID of the repository in which to list resources. + * @param repositoryId the value to set + * @return this builder instance + */ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Unique identifier or OCID for listing a single resource by ID. + */ + private String id = null; + + /** + * Unique identifier or OCID for listing a single resource by ID. + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * PullRequest Created By + */ + private String createdBy = null; + + /** + * PullRequest Created By + * @param createdBy the value to set + * @return this builder instance + */ + public Builder createdBy(String createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * PullRequest Target Branch + */ + private String destinationBranch = null; + + /** + * PullRequest Target Branch + * @param destinationBranch the value to set + * @return this builder instance + */ + public Builder destinationBranch(String destinationBranch) { + this.destinationBranch = destinationBranch; + return this; + } + + /** + * PullRequest Source Branch. + */ + private String sourceBranch = null; + + /** + * PullRequest Source Branch. + * @param sourceBranch the value to set + * @return this builder instance + */ + public Builder sourceBranch(String sourceBranch) { + this.sourceBranch = sourceBranch; + return this; + } + + /** + * PullRequest Reviewer Id + */ + private String reviewerPrincipalId = null; + + /** + * PullRequest Reviewer Id + * @param reviewerPrincipalId the value to set + * @return this builder instance + */ + public Builder reviewerPrincipalId(String reviewerPrincipalId) { + this.reviewerPrincipalId = reviewerPrincipalId; + return this; + } + + /** + * PullRequest Source Repository Id + */ + private String sourceRepositoryId = null; + + /** + * PullRequest Source Repository Id + * @param sourceRepositoryId the value to set + * @return this builder instance + */ + public Builder sourceRepositoryId(String sourceRepositoryId) { + this.sourceRepositoryId = sourceRepositoryId; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use. Use either ascending or descending. + */ + private com.oracle.bmc.devops.model.SortOrder sortOrder = null; + + /** + * The sort order to use. Use either ascending or descending. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.devops.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPullRequestsRequest o) { + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + lifecycleDetails(o.getLifecycleDetails()); + repositoryId(o.getRepositoryId()); + displayName(o.getDisplayName()); + id(o.getId()); + createdBy(o.getCreatedBy()); + destinationBranch(o.getDestinationBranch()); + sourceBranch(o.getSourceBranch()); + reviewerPrincipalId(o.getReviewerPrincipalId()); + sourceRepositoryId(o.getSourceRepositoryId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListPullRequestsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListPullRequestsRequest + */ + public ListPullRequestsRequest build() { + ListPullRequestsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListPullRequestsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListPullRequestsRequest + */ + public ListPullRequestsRequest buildWithoutInvocationCallback() { + ListPullRequestsRequest request = new ListPullRequestsRequest(); + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.lifecycleDetails = lifecycleDetails; + request.repositoryId = repositoryId; + request.displayName = displayName; + request.id = id; + request.createdBy = createdBy; + request.destinationBranch = destinationBranch; + request.sourceBranch = sourceBranch; + request.reviewerPrincipalId = reviewerPrincipalId; + request.sourceRepositoryId = sourceRepositoryId; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListPullRequestsRequest(compartmentId, lifecycleState, lifecycleDetails, repositoryId, displayName, id, createdBy, destinationBranch, sourceBranch, reviewerPrincipalId, sourceRepositoryId, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .lifecycleState(lifecycleState) + .lifecycleDetails(lifecycleDetails) + .repositoryId(repositoryId) + .displayName(displayName) + .id(id) + .createdBy(createdBy) + .destinationBranch(destinationBranch) + .sourceBranch(sourceBranch) + .reviewerPrincipalId(reviewerPrincipalId) + .sourceRepositoryId(sourceRepositoryId) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(",repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",createdBy=").append(String.valueOf(this.createdBy)); + sb.append(",destinationBranch=").append(String.valueOf(this.destinationBranch)); + sb.append(",sourceBranch=").append(String.valueOf(this.sourceBranch)); + sb.append(",reviewerPrincipalId=").append(String.valueOf(this.reviewerPrincipalId)); + sb.append(",sourceRepositoryId=").append(String.valueOf(this.sourceRepositoryId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPullRequestsRequest)) { + return false; + } + + ListPullRequestsRequest other = (ListPullRequestsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.createdBy, other.createdBy) + && java.util.Objects.equals(this.destinationBranch, other.destinationBranch) + && java.util.Objects.equals(this.sourceBranch, other.sourceBranch) + && java.util.Objects.equals(this.reviewerPrincipalId, other.reviewerPrincipalId) + && java.util.Objects.equals(this.sourceRepositoryId, other.sourceRepositoryId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.createdBy == null ? 43 : this.createdBy.hashCode()); + result = + (result * PRIME) + + (this.destinationBranch == null ? 43 : this.destinationBranch.hashCode()); + result = (result * PRIME) + (this.sourceBranch == null ? 43 : this.sourceBranch.hashCode()); + result = + (result * PRIME) + + (this.reviewerPrincipalId == null + ? 43 + : this.reviewerPrincipalId.hashCode()); + result = + (result * PRIME) + + (this.sourceRepositoryId == null + ? 43 + : this.sourceRepositoryId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListRepositoryCommitAnalyticsAuthorsRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListRepositoryCommitAnalyticsAuthorsRequest.java new file mode 100644 index 00000000000..7a7d3b31fc4 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ListRepositoryCommitAnalyticsAuthorsRequest.java @@ -0,0 +1,366 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use ListRepositoryCommitAnalyticsAuthorsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListRepositoryCommitAnalyticsAuthorsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique repository identifier. + */ + private String repositoryId; + + /** + * Unique repository identifier. + */ + public String getRepositoryId() { + return repositoryId; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The sort order to use. Use either ascending or descending. + */ + private com.oracle.bmc.devops.model.SortOrder sortOrder; + + /** + * The sort order to use. Use either ascending or descending. + */ + public com.oracle.bmc.devops.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * The field to sort by. Only one sort by value is supported for this parameter. Default order for author name is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort by value is supported for this parameter. Default order for author name is ascending. + * + **/ + public enum SortBy { + AuthorName("authorName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort by value is supported for this parameter. Default order for author name is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListRepositoryCommitAnalyticsAuthorsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique repository identifier. + */ + private String repositoryId = null; + + /** + * Unique repository identifier. + * @param repositoryId the value to set + * @return this builder instance + */ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use. Use either ascending or descending. + */ + private com.oracle.bmc.devops.model.SortOrder sortOrder = null; + + /** + * The sort order to use. Use either ascending or descending. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.devops.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The field to sort by. Only one sort by value is supported for this parameter. Default order for author name is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort by value is supported for this parameter. Default order for author name is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListRepositoryCommitAnalyticsAuthorsRequest o) { + repositoryId(o.getRepositoryId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + opcRequestId(o.getOpcRequestId()); + sortBy(o.getSortBy()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListRepositoryCommitAnalyticsAuthorsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListRepositoryCommitAnalyticsAuthorsRequest + */ + public ListRepositoryCommitAnalyticsAuthorsRequest build() { + ListRepositoryCommitAnalyticsAuthorsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListRepositoryCommitAnalyticsAuthorsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListRepositoryCommitAnalyticsAuthorsRequest + */ + public ListRepositoryCommitAnalyticsAuthorsRequest buildWithoutInvocationCallback() { + ListRepositoryCommitAnalyticsAuthorsRequest request = + new ListRepositoryCommitAnalyticsAuthorsRequest(); + request.repositoryId = repositoryId; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.opcRequestId = opcRequestId; + request.sortBy = sortBy; + return request; + // new ListRepositoryCommitAnalyticsAuthorsRequest(repositoryId, limit, page, sortOrder, opcRequestId, sortBy); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .repositoryId(repositoryId) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .opcRequestId(opcRequestId) + .sortBy(sortBy); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListRepositoryCommitAnalyticsAuthorsRequest)) { + return false; + } + + ListRepositoryCommitAnalyticsAuthorsRequest other = + (ListRepositoryCommitAnalyticsAuthorsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.sortBy, other.sortBy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/MergePullRequestRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/MergePullRequestRequest.java new file mode 100644 index 00000000000..d93db34e4f7 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/MergePullRequestRequest.java @@ -0,0 +1,324 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use MergePullRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class MergePullRequestRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.devops.model.MergePullRequestDetails> { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * The details about the merge operation. + */ + private com.oracle.bmc.devops.model.MergePullRequestDetails mergePullRequestDetails; + + /** + * The details about the merge operation. + */ + public com.oracle.bmc.devops.model.MergePullRequestDetails getMergePullRequestDetails() { + return mergePullRequestDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.devops.model.MergePullRequestDetails getBody$() { + return mergePullRequestDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + MergePullRequestRequest, com.oracle.bmc.devops.model.MergePullRequestDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * The details about the merge operation. + */ + private com.oracle.bmc.devops.model.MergePullRequestDetails mergePullRequestDetails = null; + + /** + * The details about the merge operation. + * @param mergePullRequestDetails the value to set + * @return this builder instance + */ + public Builder mergePullRequestDetails( + com.oracle.bmc.devops.model.MergePullRequestDetails mergePullRequestDetails) { + this.mergePullRequestDetails = mergePullRequestDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(MergePullRequestRequest o) { + pullRequestId(o.getPullRequestId()); + mergePullRequestDetails(o.getMergePullRequestDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of MergePullRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of MergePullRequestRequest + */ + public MergePullRequestRequest build() { + MergePullRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.devops.model.MergePullRequestDetails body) { + mergePullRequestDetails(body); + return this; + } + + /** + * Build the instance of MergePullRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of MergePullRequestRequest + */ + public MergePullRequestRequest buildWithoutInvocationCallback() { + MergePullRequestRequest request = new MergePullRequestRequest(); + request.pullRequestId = pullRequestId; + request.mergePullRequestDetails = mergePullRequestDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new MergePullRequestRequest(pullRequestId, mergePullRequestDetails, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .mergePullRequestDetails(mergePullRequestDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",mergePullRequestDetails=").append(String.valueOf(this.mergePullRequestDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MergePullRequestRequest)) { + return false; + } + + MergePullRequestRequest other = (MergePullRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals( + this.mergePullRequestDetails, other.mergePullRequestDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = + (result * PRIME) + + (this.mergePullRequestDetails == null + ? 43 + : this.mergePullRequestDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/PatchPullRequestRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/PatchPullRequestRequest.java new file mode 100644 index 00000000000..8ad610cb9a4 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/PatchPullRequestRequest.java @@ -0,0 +1,290 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use PatchPullRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class PatchPullRequestRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.devops.model.PatchPullRequestDetails> { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * Details for the PullRequest update. + */ + private com.oracle.bmc.devops.model.PatchPullRequestDetails patchPullRequestDetails; + + /** + * Details for the PullRequest update. + */ + public com.oracle.bmc.devops.model.PatchPullRequestDetails getPatchPullRequestDetails() { + return patchPullRequestDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.devops.model.PatchPullRequestDetails getBody$() { + return patchPullRequestDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + PatchPullRequestRequest, com.oracle.bmc.devops.model.PatchPullRequestDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * Details for the PullRequest update. + */ + private com.oracle.bmc.devops.model.PatchPullRequestDetails patchPullRequestDetails = null; + + /** + * Details for the PullRequest update. + * @param patchPullRequestDetails the value to set + * @return this builder instance + */ + public Builder patchPullRequestDetails( + com.oracle.bmc.devops.model.PatchPullRequestDetails patchPullRequestDetails) { + this.patchPullRequestDetails = patchPullRequestDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(PatchPullRequestRequest o) { + pullRequestId(o.getPullRequestId()); + patchPullRequestDetails(o.getPatchPullRequestDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of PatchPullRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of PatchPullRequestRequest + */ + public PatchPullRequestRequest build() { + PatchPullRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.devops.model.PatchPullRequestDetails body) { + patchPullRequestDetails(body); + return this; + } + + /** + * Build the instance of PatchPullRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of PatchPullRequestRequest + */ + public PatchPullRequestRequest buildWithoutInvocationCallback() { + PatchPullRequestRequest request = new PatchPullRequestRequest(); + request.pullRequestId = pullRequestId; + request.patchPullRequestDetails = patchPullRequestDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new PatchPullRequestRequest(pullRequestId, patchPullRequestDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .patchPullRequestDetails(patchPullRequestDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",patchPullRequestDetails=").append(String.valueOf(this.patchPullRequestDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchPullRequestRequest)) { + return false; + } + + PatchPullRequestRequest other = (PatchPullRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals( + this.patchPullRequestDetails, other.patchPullRequestDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = + (result * PRIME) + + (this.patchPullRequestDetails == null + ? 43 + : this.patchPullRequestDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ReopenPullRequestRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ReopenPullRequestRequest.java new file mode 100644 index 00000000000..2391918313e --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ReopenPullRequestRequest.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use ReopenPullRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ReopenPullRequestRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ReopenPullRequestRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ReopenPullRequestRequest o) { + pullRequestId(o.getPullRequestId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ReopenPullRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ReopenPullRequestRequest + */ + public ReopenPullRequestRequest build() { + ReopenPullRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ReopenPullRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ReopenPullRequestRequest + */ + public ReopenPullRequestRequest buildWithoutInvocationCallback() { + ReopenPullRequestRequest request = new ReopenPullRequestRequest(); + request.pullRequestId = pullRequestId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new ReopenPullRequestRequest(pullRequestId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ReopenPullRequestRequest)) { + return false; + } + + ReopenPullRequestRequest other = (ReopenPullRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ReviewPullRequestRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ReviewPullRequestRequest.java new file mode 100644 index 00000000000..5fa589fe1da --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/ReviewPullRequestRequest.java @@ -0,0 +1,327 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use ReviewPullRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ReviewPullRequestRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.devops.model.ReviewPullRequestDetails> { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * Details to submit a review. + */ + private com.oracle.bmc.devops.model.ReviewPullRequestDetails reviewPullRequestDetails; + + /** + * Details to submit a review. + */ + public com.oracle.bmc.devops.model.ReviewPullRequestDetails getReviewPullRequestDetails() { + return reviewPullRequestDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.devops.model.ReviewPullRequestDetails getBody$() { + return reviewPullRequestDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ReviewPullRequestRequest, + com.oracle.bmc.devops.model.ReviewPullRequestDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * Details to submit a review. + */ + private com.oracle.bmc.devops.model.ReviewPullRequestDetails reviewPullRequestDetails = + null; + + /** + * Details to submit a review. + * @param reviewPullRequestDetails the value to set + * @return this builder instance + */ + public Builder reviewPullRequestDetails( + com.oracle.bmc.devops.model.ReviewPullRequestDetails reviewPullRequestDetails) { + this.reviewPullRequestDetails = reviewPullRequestDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ReviewPullRequestRequest o) { + pullRequestId(o.getPullRequestId()); + reviewPullRequestDetails(o.getReviewPullRequestDetails()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ReviewPullRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ReviewPullRequestRequest + */ + public ReviewPullRequestRequest build() { + ReviewPullRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.devops.model.ReviewPullRequestDetails body) { + reviewPullRequestDetails(body); + return this; + } + + /** + * Build the instance of ReviewPullRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ReviewPullRequestRequest + */ + public ReviewPullRequestRequest buildWithoutInvocationCallback() { + ReviewPullRequestRequest request = new ReviewPullRequestRequest(); + request.pullRequestId = pullRequestId; + request.reviewPullRequestDetails = reviewPullRequestDetails; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new ReviewPullRequestRequest(pullRequestId, reviewPullRequestDetails, ifMatch, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .reviewPullRequestDetails(reviewPullRequestDetails) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",reviewPullRequestDetails=") + .append(String.valueOf(this.reviewPullRequestDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ReviewPullRequestRequest)) { + return false; + } + + ReviewPullRequestRequest other = (ReviewPullRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals( + this.reviewPullRequestDetails, other.reviewPullRequestDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = + (result * PRIME) + + (this.reviewPullRequestDetails == null + ? 43 + : this.reviewPullRequestDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/SummarizeProjectRepositoryAnalyticsRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/SummarizeProjectRepositoryAnalyticsRequest.java new file mode 100644 index 00000000000..8cd3fe7dc32 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/SummarizeProjectRepositoryAnalyticsRequest.java @@ -0,0 +1,334 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use SummarizeProjectRepositoryAnalyticsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class SummarizeProjectRepositoryAnalyticsRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.devops.model.SummarizeProjectRepositoryAnalyticsDetails> { + + /** + * Unique project identifier. + */ + private String projectId; + + /** + * Unique project identifier. + */ + public String getProjectId() { + return projectId; + } + /** + * Details to fetch the repository analytics. + */ + private com.oracle.bmc.devops.model.SummarizeProjectRepositoryAnalyticsDetails + summarizeProjectRepositoryAnalyticsDetails; + + /** + * Details to fetch the repository analytics. + */ + public com.oracle.bmc.devops.model.SummarizeProjectRepositoryAnalyticsDetails + getSummarizeProjectRepositoryAnalyticsDetails() { + return summarizeProjectRepositoryAnalyticsDetails; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.devops.model.SummarizeProjectRepositoryAnalyticsDetails getBody$() { + return summarizeProjectRepositoryAnalyticsDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + SummarizeProjectRepositoryAnalyticsRequest, + com.oracle.bmc.devops.model.SummarizeProjectRepositoryAnalyticsDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique project identifier. + */ + private String projectId = null; + + /** + * Unique project identifier. + * @param projectId the value to set + * @return this builder instance + */ + public Builder projectId(String projectId) { + this.projectId = projectId; + return this; + } + + /** + * Details to fetch the repository analytics. + */ + private com.oracle.bmc.devops.model.SummarizeProjectRepositoryAnalyticsDetails + summarizeProjectRepositoryAnalyticsDetails = null; + + /** + * Details to fetch the repository analytics. + * @param summarizeProjectRepositoryAnalyticsDetails the value to set + * @return this builder instance + */ + public Builder summarizeProjectRepositoryAnalyticsDetails( + com.oracle.bmc.devops.model.SummarizeProjectRepositoryAnalyticsDetails + summarizeProjectRepositoryAnalyticsDetails) { + this.summarizeProjectRepositoryAnalyticsDetails = + summarizeProjectRepositoryAnalyticsDetails; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SummarizeProjectRepositoryAnalyticsRequest o) { + projectId(o.getProjectId()); + summarizeProjectRepositoryAnalyticsDetails( + o.getSummarizeProjectRepositoryAnalyticsDetails()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of SummarizeProjectRepositoryAnalyticsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of SummarizeProjectRepositoryAnalyticsRequest + */ + public SummarizeProjectRepositoryAnalyticsRequest build() { + SummarizeProjectRepositoryAnalyticsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.devops.model.SummarizeProjectRepositoryAnalyticsDetails body) { + summarizeProjectRepositoryAnalyticsDetails(body); + return this; + } + + /** + * Build the instance of SummarizeProjectRepositoryAnalyticsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of SummarizeProjectRepositoryAnalyticsRequest + */ + public SummarizeProjectRepositoryAnalyticsRequest buildWithoutInvocationCallback() { + SummarizeProjectRepositoryAnalyticsRequest request = + new SummarizeProjectRepositoryAnalyticsRequest(); + request.projectId = projectId; + request.summarizeProjectRepositoryAnalyticsDetails = + summarizeProjectRepositoryAnalyticsDetails; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + return request; + // new SummarizeProjectRepositoryAnalyticsRequest(projectId, summarizeProjectRepositoryAnalyticsDetails, limit, page, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .projectId(projectId) + .summarizeProjectRepositoryAnalyticsDetails( + summarizeProjectRepositoryAnalyticsDetails) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",projectId=").append(String.valueOf(this.projectId)); + sb.append(",summarizeProjectRepositoryAnalyticsDetails=") + .append(String.valueOf(this.summarizeProjectRepositoryAnalyticsDetails)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SummarizeProjectRepositoryAnalyticsRequest)) { + return false; + } + + SummarizeProjectRepositoryAnalyticsRequest other = + (SummarizeProjectRepositoryAnalyticsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.projectId, other.projectId) + && java.util.Objects.equals( + this.summarizeProjectRepositoryAnalyticsDetails, + other.summarizeProjectRepositoryAnalyticsDetails) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.projectId == null ? 43 : this.projectId.hashCode()); + result = + (result * PRIME) + + (this.summarizeProjectRepositoryAnalyticsDetails == null + ? 43 + : this.summarizeProjectRepositoryAnalyticsDetails.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/SummarizeRepositoryAnalyticsRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/SummarizeRepositoryAnalyticsRequest.java new file mode 100644 index 00000000000..306027316b4 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/SummarizeRepositoryAnalyticsRequest.java @@ -0,0 +1,327 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use SummarizeRepositoryAnalyticsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class SummarizeRepositoryAnalyticsRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.devops.model.SummarizeRepositoryAnalyticsDetails> { + + /** + * Unique repository identifier. + */ + private String repositoryId; + + /** + * Unique repository identifier. + */ + public String getRepositoryId() { + return repositoryId; + } + /** + * Details to fetch the repository analytics. + */ + private com.oracle.bmc.devops.model.SummarizeRepositoryAnalyticsDetails + summarizeRepositoryAnalyticsDetails; + + /** + * Details to fetch the repository analytics. + */ + public com.oracle.bmc.devops.model.SummarizeRepositoryAnalyticsDetails + getSummarizeRepositoryAnalyticsDetails() { + return summarizeRepositoryAnalyticsDetails; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.devops.model.SummarizeRepositoryAnalyticsDetails getBody$() { + return summarizeRepositoryAnalyticsDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + SummarizeRepositoryAnalyticsRequest, + com.oracle.bmc.devops.model.SummarizeRepositoryAnalyticsDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique repository identifier. + */ + private String repositoryId = null; + + /** + * Unique repository identifier. + * @param repositoryId the value to set + * @return this builder instance + */ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + return this; + } + + /** + * Details to fetch the repository analytics. + */ + private com.oracle.bmc.devops.model.SummarizeRepositoryAnalyticsDetails + summarizeRepositoryAnalyticsDetails = null; + + /** + * Details to fetch the repository analytics. + * @param summarizeRepositoryAnalyticsDetails the value to set + * @return this builder instance + */ + public Builder summarizeRepositoryAnalyticsDetails( + com.oracle.bmc.devops.model.SummarizeRepositoryAnalyticsDetails + summarizeRepositoryAnalyticsDetails) { + this.summarizeRepositoryAnalyticsDetails = summarizeRepositoryAnalyticsDetails; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SummarizeRepositoryAnalyticsRequest o) { + repositoryId(o.getRepositoryId()); + summarizeRepositoryAnalyticsDetails(o.getSummarizeRepositoryAnalyticsDetails()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of SummarizeRepositoryAnalyticsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of SummarizeRepositoryAnalyticsRequest + */ + public SummarizeRepositoryAnalyticsRequest build() { + SummarizeRepositoryAnalyticsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.devops.model.SummarizeRepositoryAnalyticsDetails body) { + summarizeRepositoryAnalyticsDetails(body); + return this; + } + + /** + * Build the instance of SummarizeRepositoryAnalyticsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of SummarizeRepositoryAnalyticsRequest + */ + public SummarizeRepositoryAnalyticsRequest buildWithoutInvocationCallback() { + SummarizeRepositoryAnalyticsRequest request = new SummarizeRepositoryAnalyticsRequest(); + request.repositoryId = repositoryId; + request.summarizeRepositoryAnalyticsDetails = summarizeRepositoryAnalyticsDetails; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + return request; + // new SummarizeRepositoryAnalyticsRequest(repositoryId, summarizeRepositoryAnalyticsDetails, limit, page, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .repositoryId(repositoryId) + .summarizeRepositoryAnalyticsDetails(summarizeRepositoryAnalyticsDetails) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(",summarizeRepositoryAnalyticsDetails=") + .append(String.valueOf(this.summarizeRepositoryAnalyticsDetails)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SummarizeRepositoryAnalyticsRequest)) { + return false; + } + + SummarizeRepositoryAnalyticsRequest other = (SummarizeRepositoryAnalyticsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals( + this.summarizeRepositoryAnalyticsDetails, + other.summarizeRepositoryAnalyticsDetails) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = + (result * PRIME) + + (this.summarizeRepositoryAnalyticsDetails == null + ? 43 + : this.summarizeRepositoryAnalyticsDetails.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/SyncRepositoryRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/SyncRepositoryRequest.java new file mode 100644 index 00000000000..582c16ff478 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/SyncRepositoryRequest.java @@ -0,0 +1,401 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use SyncRepositoryRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class SyncRepositoryRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.devops.model.SyncRepositoryDetails> { + + /** + * Unique repository identifier. + */ + private String repositoryId; + + /** + * Unique repository identifier. + */ + public String getRepositoryId() { + return repositoryId; + } + /** + * If fetch and merge is passed in, the changes from the upstream will be fetched and merged into the destination branch. + * If discard is passed in, the changes in the fork will be overwritten with the changes brought in from the upstream. + * + */ + private SyncMergeStrategy syncMergeStrategy; + + /** + * If fetch and merge is passed in, the changes from the upstream will be fetched and merged into the destination branch. + * If discard is passed in, the changes in the fork will be overwritten with the changes brought in from the upstream. + * + **/ + public enum SyncMergeStrategy { + FetchAndMerge("FETCH_AND_MERGE"), + Discard("DISCARD"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SyncMergeStrategy v : SyncMergeStrategy.values()) { + map.put(v.getValue(), v); + } + } + + SyncMergeStrategy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SyncMergeStrategy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SyncMergeStrategy: " + key); + } + }; + + /** + * If fetch and merge is passed in, the changes from the upstream will be fetched and merged into the destination branch. + * If discard is passed in, the changes in the fork will be overwritten with the changes brought in from the upstream. + * + */ + public SyncMergeStrategy getSyncMergeStrategy() { + return syncMergeStrategy; + } + /** + * Details required for syncing a repository with its upstream. + */ + private com.oracle.bmc.devops.model.SyncRepositoryDetails syncRepositoryDetails; + + /** + * Details required for syncing a repository with its upstream. + */ + public com.oracle.bmc.devops.model.SyncRepositoryDetails getSyncRepositoryDetails() { + return syncRepositoryDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.devops.model.SyncRepositoryDetails getBody$() { + return syncRepositoryDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + SyncRepositoryRequest, com.oracle.bmc.devops.model.SyncRepositoryDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique repository identifier. + */ + private String repositoryId = null; + + /** + * Unique repository identifier. + * @param repositoryId the value to set + * @return this builder instance + */ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + return this; + } + + /** + * If fetch and merge is passed in, the changes from the upstream will be fetched and merged into the destination branch. + * If discard is passed in, the changes in the fork will be overwritten with the changes brought in from the upstream. + * + */ + private SyncMergeStrategy syncMergeStrategy = null; + + /** + * If fetch and merge is passed in, the changes from the upstream will be fetched and merged into the destination branch. + * If discard is passed in, the changes in the fork will be overwritten with the changes brought in from the upstream. + * + * @param syncMergeStrategy the value to set + * @return this builder instance + */ + public Builder syncMergeStrategy(SyncMergeStrategy syncMergeStrategy) { + this.syncMergeStrategy = syncMergeStrategy; + return this; + } + + /** + * Details required for syncing a repository with its upstream. + */ + private com.oracle.bmc.devops.model.SyncRepositoryDetails syncRepositoryDetails = null; + + /** + * Details required for syncing a repository with its upstream. + * @param syncRepositoryDetails the value to set + * @return this builder instance + */ + public Builder syncRepositoryDetails( + com.oracle.bmc.devops.model.SyncRepositoryDetails syncRepositoryDetails) { + this.syncRepositoryDetails = syncRepositoryDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SyncRepositoryRequest o) { + repositoryId(o.getRepositoryId()); + syncMergeStrategy(o.getSyncMergeStrategy()); + syncRepositoryDetails(o.getSyncRepositoryDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of SyncRepositoryRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of SyncRepositoryRequest + */ + public SyncRepositoryRequest build() { + SyncRepositoryRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.devops.model.SyncRepositoryDetails body) { + syncRepositoryDetails(body); + return this; + } + + /** + * Build the instance of SyncRepositoryRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of SyncRepositoryRequest + */ + public SyncRepositoryRequest buildWithoutInvocationCallback() { + SyncRepositoryRequest request = new SyncRepositoryRequest(); + request.repositoryId = repositoryId; + request.syncMergeStrategy = syncMergeStrategy; + request.syncRepositoryDetails = syncRepositoryDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new SyncRepositoryRequest(repositoryId, syncMergeStrategy, syncRepositoryDetails, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .repositoryId(repositoryId) + .syncMergeStrategy(syncMergeStrategy) + .syncRepositoryDetails(syncRepositoryDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(",syncMergeStrategy=").append(String.valueOf(this.syncMergeStrategy)); + sb.append(",syncRepositoryDetails=").append(String.valueOf(this.syncRepositoryDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SyncRepositoryRequest)) { + return false; + } + + SyncRepositoryRequest other = (SyncRepositoryRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals(this.syncMergeStrategy, other.syncMergeStrategy) + && java.util.Objects.equals(this.syncRepositoryDetails, other.syncRepositoryDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = + (result * PRIME) + + (this.syncMergeStrategy == null ? 43 : this.syncMergeStrategy.hashCode()); + result = + (result * PRIME) + + (this.syncRepositoryDetails == null + ? 43 + : this.syncRepositoryDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UnlikePullRequestCommentRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UnlikePullRequestCommentRequest.java new file mode 100644 index 00000000000..9ebea4bea95 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UnlikePullRequestCommentRequest.java @@ -0,0 +1,262 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use UnlikePullRequestCommentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UnlikePullRequestCommentRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * unique PullRequest Comment identifier + */ + private String commentId; + + /** + * unique PullRequest Comment identifier + */ + public String getCommentId() { + return commentId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UnlikePullRequestCommentRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * unique PullRequest Comment identifier + */ + private String commentId = null; + + /** + * unique PullRequest Comment identifier + * @param commentId the value to set + * @return this builder instance + */ + public Builder commentId(String commentId) { + this.commentId = commentId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UnlikePullRequestCommentRequest o) { + pullRequestId(o.getPullRequestId()); + commentId(o.getCommentId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UnlikePullRequestCommentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UnlikePullRequestCommentRequest + */ + public UnlikePullRequestCommentRequest build() { + UnlikePullRequestCommentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of UnlikePullRequestCommentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UnlikePullRequestCommentRequest + */ + public UnlikePullRequestCommentRequest buildWithoutInvocationCallback() { + UnlikePullRequestCommentRequest request = new UnlikePullRequestCommentRequest(); + request.pullRequestId = pullRequestId; + request.commentId = commentId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UnlikePullRequestCommentRequest(pullRequestId, commentId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .commentId(commentId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",commentId=").append(String.valueOf(this.commentId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UnlikePullRequestCommentRequest)) { + return false; + } + + UnlikePullRequestCommentRequest other = (UnlikePullRequestCommentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.commentId, other.commentId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.commentId == null ? 43 : this.commentId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UnsubscribePullRequestRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UnsubscribePullRequestRequest.java new file mode 100644 index 00000000000..593a28c7ad0 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UnsubscribePullRequestRequest.java @@ -0,0 +1,262 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use UnsubscribePullRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UnsubscribePullRequestRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * The unsubscription token. + */ + private String token; + + /** + * The unsubscription token. + */ + public String getToken() { + return token; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UnsubscribePullRequestRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * The unsubscription token. + */ + private String token = null; + + /** + * The unsubscription token. + * @param token the value to set + * @return this builder instance + */ + public Builder token(String token) { + this.token = token; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UnsubscribePullRequestRequest o) { + pullRequestId(o.getPullRequestId()); + token(o.getToken()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UnsubscribePullRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UnsubscribePullRequestRequest + */ + public UnsubscribePullRequestRequest build() { + UnsubscribePullRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of UnsubscribePullRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UnsubscribePullRequestRequest + */ + public UnsubscribePullRequestRequest buildWithoutInvocationCallback() { + UnsubscribePullRequestRequest request = new UnsubscribePullRequestRequest(); + request.pullRequestId = pullRequestId; + request.token = token; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UnsubscribePullRequestRequest(pullRequestId, token, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .token(token) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",token=").append(String.valueOf(this.token)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UnsubscribePullRequestRequest)) { + return false; + } + + UnsubscribePullRequestRequest other = (UnsubscribePullRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.token, other.token) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.token == null ? 43 : this.token.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdateProjectNotificationPreferenceRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdateProjectNotificationPreferenceRequest.java new file mode 100644 index 00000000000..af752e0f39f --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdateProjectNotificationPreferenceRequest.java @@ -0,0 +1,334 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use UpdateProjectNotificationPreferenceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdateProjectNotificationPreferenceRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.devops.model.UpdateProjectNotificationPreferenceDetails> { + + /** + * The information to be updated. + */ + private com.oracle.bmc.devops.model.UpdateProjectNotificationPreferenceDetails + updateProjectNotificationPreferenceDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.devops.model.UpdateProjectNotificationPreferenceDetails + getUpdateProjectNotificationPreferenceDetails() { + return updateProjectNotificationPreferenceDetails; + } + /** + * Unique project identifier. + */ + private String projectId; + + /** + * Unique project identifier. + */ + public String getProjectId() { + return projectId; + } + /** + * Unique principal identifier. + */ + private String principalId; + + /** + * Unique principal identifier. + */ + public String getPrincipalId() { + return principalId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.devops.model.UpdateProjectNotificationPreferenceDetails getBody$() { + return updateProjectNotificationPreferenceDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateProjectNotificationPreferenceRequest, + com.oracle.bmc.devops.model.UpdateProjectNotificationPreferenceDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The information to be updated. + */ + private com.oracle.bmc.devops.model.UpdateProjectNotificationPreferenceDetails + updateProjectNotificationPreferenceDetails = null; + + /** + * The information to be updated. + * @param updateProjectNotificationPreferenceDetails the value to set + * @return this builder instance + */ + public Builder updateProjectNotificationPreferenceDetails( + com.oracle.bmc.devops.model.UpdateProjectNotificationPreferenceDetails + updateProjectNotificationPreferenceDetails) { + this.updateProjectNotificationPreferenceDetails = + updateProjectNotificationPreferenceDetails; + return this; + } + + /** + * Unique project identifier. + */ + private String projectId = null; + + /** + * Unique project identifier. + * @param projectId the value to set + * @return this builder instance + */ + public Builder projectId(String projectId) { + this.projectId = projectId; + return this; + } + + /** + * Unique principal identifier. + */ + private String principalId = null; + + /** + * Unique principal identifier. + * @param principalId the value to set + * @return this builder instance + */ + public Builder principalId(String principalId) { + this.principalId = principalId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateProjectNotificationPreferenceRequest o) { + updateProjectNotificationPreferenceDetails( + o.getUpdateProjectNotificationPreferenceDetails()); + projectId(o.getProjectId()); + principalId(o.getPrincipalId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateProjectNotificationPreferenceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateProjectNotificationPreferenceRequest + */ + public UpdateProjectNotificationPreferenceRequest build() { + UpdateProjectNotificationPreferenceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.devops.model.UpdateProjectNotificationPreferenceDetails body) { + updateProjectNotificationPreferenceDetails(body); + return this; + } + + /** + * Build the instance of UpdateProjectNotificationPreferenceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateProjectNotificationPreferenceRequest + */ + public UpdateProjectNotificationPreferenceRequest buildWithoutInvocationCallback() { + UpdateProjectNotificationPreferenceRequest request = + new UpdateProjectNotificationPreferenceRequest(); + request.updateProjectNotificationPreferenceDetails = + updateProjectNotificationPreferenceDetails; + request.projectId = projectId; + request.principalId = principalId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateProjectNotificationPreferenceRequest(updateProjectNotificationPreferenceDetails, projectId, principalId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .updateProjectNotificationPreferenceDetails( + updateProjectNotificationPreferenceDetails) + .projectId(projectId) + .principalId(principalId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",updateProjectNotificationPreferenceDetails=") + .append(String.valueOf(this.updateProjectNotificationPreferenceDetails)); + sb.append(",projectId=").append(String.valueOf(this.projectId)); + sb.append(",principalId=").append(String.valueOf(this.principalId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateProjectNotificationPreferenceRequest)) { + return false; + } + + UpdateProjectNotificationPreferenceRequest other = + (UpdateProjectNotificationPreferenceRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.updateProjectNotificationPreferenceDetails, + other.updateProjectNotificationPreferenceDetails) + && java.util.Objects.equals(this.projectId, other.projectId) + && java.util.Objects.equals(this.principalId, other.principalId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.updateProjectNotificationPreferenceDetails == null + ? 43 + : this.updateProjectNotificationPreferenceDetails.hashCode()); + result = (result * PRIME) + (this.projectId == null ? 43 : this.projectId.hashCode()); + result = (result * PRIME) + (this.principalId == null ? 43 : this.principalId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdateProjectRepositorySettingsRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdateProjectRepositorySettingsRequest.java new file mode 100644 index 00000000000..1bb65095ef3 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdateProjectRepositorySettingsRequest.java @@ -0,0 +1,331 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use UpdateProjectRepositorySettingsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdateProjectRepositorySettingsRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.devops.model.UpdateProjectRepositorySettingsDetails> { + + /** + * Unique project identifier. + */ + private String projectId; + + /** + * Unique project identifier. + */ + public String getProjectId() { + return projectId; + } + /** + * Details to update the repository settings for a project. + */ + private com.oracle.bmc.devops.model.UpdateProjectRepositorySettingsDetails + updateProjectRepositorySettingsDetails; + + /** + * Details to update the repository settings for a project. + */ + public com.oracle.bmc.devops.model.UpdateProjectRepositorySettingsDetails + getUpdateProjectRepositorySettingsDetails() { + return updateProjectRepositorySettingsDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.devops.model.UpdateProjectRepositorySettingsDetails getBody$() { + return updateProjectRepositorySettingsDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateProjectRepositorySettingsRequest, + com.oracle.bmc.devops.model.UpdateProjectRepositorySettingsDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique project identifier. + */ + private String projectId = null; + + /** + * Unique project identifier. + * @param projectId the value to set + * @return this builder instance + */ + public Builder projectId(String projectId) { + this.projectId = projectId; + return this; + } + + /** + * Details to update the repository settings for a project. + */ + private com.oracle.bmc.devops.model.UpdateProjectRepositorySettingsDetails + updateProjectRepositorySettingsDetails = null; + + /** + * Details to update the repository settings for a project. + * @param updateProjectRepositorySettingsDetails the value to set + * @return this builder instance + */ + public Builder updateProjectRepositorySettingsDetails( + com.oracle.bmc.devops.model.UpdateProjectRepositorySettingsDetails + updateProjectRepositorySettingsDetails) { + this.updateProjectRepositorySettingsDetails = updateProjectRepositorySettingsDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateProjectRepositorySettingsRequest o) { + projectId(o.getProjectId()); + updateProjectRepositorySettingsDetails(o.getUpdateProjectRepositorySettingsDetails()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateProjectRepositorySettingsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateProjectRepositorySettingsRequest + */ + public UpdateProjectRepositorySettingsRequest build() { + UpdateProjectRepositorySettingsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.devops.model.UpdateProjectRepositorySettingsDetails body) { + updateProjectRepositorySettingsDetails(body); + return this; + } + + /** + * Build the instance of UpdateProjectRepositorySettingsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateProjectRepositorySettingsRequest + */ + public UpdateProjectRepositorySettingsRequest buildWithoutInvocationCallback() { + UpdateProjectRepositorySettingsRequest request = + new UpdateProjectRepositorySettingsRequest(); + request.projectId = projectId; + request.updateProjectRepositorySettingsDetails = updateProjectRepositorySettingsDetails; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new UpdateProjectRepositorySettingsRequest(projectId, updateProjectRepositorySettingsDetails, ifMatch, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .projectId(projectId) + .updateProjectRepositorySettingsDetails(updateProjectRepositorySettingsDetails) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",projectId=").append(String.valueOf(this.projectId)); + sb.append(",updateProjectRepositorySettingsDetails=") + .append(String.valueOf(this.updateProjectRepositorySettingsDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateProjectRepositorySettingsRequest)) { + return false; + } + + UpdateProjectRepositorySettingsRequest other = (UpdateProjectRepositorySettingsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.projectId, other.projectId) + && java.util.Objects.equals( + this.updateProjectRepositorySettingsDetails, + other.updateProjectRepositorySettingsDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.projectId == null ? 43 : this.projectId.hashCode()); + result = + (result * PRIME) + + (this.updateProjectRepositorySettingsDetails == null + ? 43 + : this.updateProjectRepositorySettingsDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdatePullRequestCommentRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdatePullRequestCommentRequest.java new file mode 100644 index 00000000000..53c6598bb2a --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdatePullRequestCommentRequest.java @@ -0,0 +1,328 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use UpdatePullRequestCommentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdatePullRequestCommentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.devops.model.UpdatePullRequestCommentDetails> { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * unique PullRequest Comment identifier + */ + private String commentId; + + /** + * unique PullRequest Comment identifier + */ + public String getCommentId() { + return commentId; + } + /** + * The new comment content to be updated. + */ + private com.oracle.bmc.devops.model.UpdatePullRequestCommentDetails + updatePullRequestCommentDetails; + + /** + * The new comment content to be updated. + */ + public com.oracle.bmc.devops.model.UpdatePullRequestCommentDetails + getUpdatePullRequestCommentDetails() { + return updatePullRequestCommentDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.devops.model.UpdatePullRequestCommentDetails getBody$() { + return updatePullRequestCommentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdatePullRequestCommentRequest, + com.oracle.bmc.devops.model.UpdatePullRequestCommentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * unique PullRequest Comment identifier + */ + private String commentId = null; + + /** + * unique PullRequest Comment identifier + * @param commentId the value to set + * @return this builder instance + */ + public Builder commentId(String commentId) { + this.commentId = commentId; + return this; + } + + /** + * The new comment content to be updated. + */ + private com.oracle.bmc.devops.model.UpdatePullRequestCommentDetails + updatePullRequestCommentDetails = null; + + /** + * The new comment content to be updated. + * @param updatePullRequestCommentDetails the value to set + * @return this builder instance + */ + public Builder updatePullRequestCommentDetails( + com.oracle.bmc.devops.model.UpdatePullRequestCommentDetails + updatePullRequestCommentDetails) { + this.updatePullRequestCommentDetails = updatePullRequestCommentDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdatePullRequestCommentRequest o) { + pullRequestId(o.getPullRequestId()); + commentId(o.getCommentId()); + updatePullRequestCommentDetails(o.getUpdatePullRequestCommentDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdatePullRequestCommentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdatePullRequestCommentRequest + */ + public UpdatePullRequestCommentRequest build() { + UpdatePullRequestCommentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.devops.model.UpdatePullRequestCommentDetails body) { + updatePullRequestCommentDetails(body); + return this; + } + + /** + * Build the instance of UpdatePullRequestCommentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdatePullRequestCommentRequest + */ + public UpdatePullRequestCommentRequest buildWithoutInvocationCallback() { + UpdatePullRequestCommentRequest request = new UpdatePullRequestCommentRequest(); + request.pullRequestId = pullRequestId; + request.commentId = commentId; + request.updatePullRequestCommentDetails = updatePullRequestCommentDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdatePullRequestCommentRequest(pullRequestId, commentId, updatePullRequestCommentDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .commentId(commentId) + .updatePullRequestCommentDetails(updatePullRequestCommentDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",commentId=").append(String.valueOf(this.commentId)); + sb.append(",updatePullRequestCommentDetails=") + .append(String.valueOf(this.updatePullRequestCommentDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePullRequestCommentRequest)) { + return false; + } + + UpdatePullRequestCommentRequest other = (UpdatePullRequestCommentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.commentId, other.commentId) + && java.util.Objects.equals( + this.updatePullRequestCommentDetails, other.updatePullRequestCommentDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.commentId == null ? 43 : this.commentId.hashCode()); + result = + (result * PRIME) + + (this.updatePullRequestCommentDetails == null + ? 43 + : this.updatePullRequestCommentDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdatePullRequestNotificationPreferenceRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdatePullRequestNotificationPreferenceRequest.java new file mode 100644 index 00000000000..04fd0b73c59 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdatePullRequestNotificationPreferenceRequest.java @@ -0,0 +1,337 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use UpdatePullRequestNotificationPreferenceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdatePullRequestNotificationPreferenceRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.devops.model.UpdatePullRequestNotificationPreferenceDetails> { + + /** + * The information to be updated. + */ + private com.oracle.bmc.devops.model.UpdatePullRequestNotificationPreferenceDetails + updatePullRequestNotificationPreferenceDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.devops.model.UpdatePullRequestNotificationPreferenceDetails + getUpdatePullRequestNotificationPreferenceDetails() { + return updatePullRequestNotificationPreferenceDetails; + } + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * Unique principal identifier. + */ + private String principalId; + + /** + * Unique principal identifier. + */ + public String getPrincipalId() { + return principalId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.devops.model.UpdatePullRequestNotificationPreferenceDetails getBody$() { + return updatePullRequestNotificationPreferenceDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdatePullRequestNotificationPreferenceRequest, + com.oracle.bmc.devops.model.UpdatePullRequestNotificationPreferenceDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The information to be updated. + */ + private com.oracle.bmc.devops.model.UpdatePullRequestNotificationPreferenceDetails + updatePullRequestNotificationPreferenceDetails = null; + + /** + * The information to be updated. + * @param updatePullRequestNotificationPreferenceDetails the value to set + * @return this builder instance + */ + public Builder updatePullRequestNotificationPreferenceDetails( + com.oracle.bmc.devops.model.UpdatePullRequestNotificationPreferenceDetails + updatePullRequestNotificationPreferenceDetails) { + this.updatePullRequestNotificationPreferenceDetails = + updatePullRequestNotificationPreferenceDetails; + return this; + } + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * Unique principal identifier. + */ + private String principalId = null; + + /** + * Unique principal identifier. + * @param principalId the value to set + * @return this builder instance + */ + public Builder principalId(String principalId) { + this.principalId = principalId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdatePullRequestNotificationPreferenceRequest o) { + updatePullRequestNotificationPreferenceDetails( + o.getUpdatePullRequestNotificationPreferenceDetails()); + pullRequestId(o.getPullRequestId()); + principalId(o.getPrincipalId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdatePullRequestNotificationPreferenceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdatePullRequestNotificationPreferenceRequest + */ + public UpdatePullRequestNotificationPreferenceRequest build() { + UpdatePullRequestNotificationPreferenceRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.devops.model.UpdatePullRequestNotificationPreferenceDetails body) { + updatePullRequestNotificationPreferenceDetails(body); + return this; + } + + /** + * Build the instance of UpdatePullRequestNotificationPreferenceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdatePullRequestNotificationPreferenceRequest + */ + public UpdatePullRequestNotificationPreferenceRequest buildWithoutInvocationCallback() { + UpdatePullRequestNotificationPreferenceRequest request = + new UpdatePullRequestNotificationPreferenceRequest(); + request.updatePullRequestNotificationPreferenceDetails = + updatePullRequestNotificationPreferenceDetails; + request.pullRequestId = pullRequestId; + request.principalId = principalId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdatePullRequestNotificationPreferenceRequest(updatePullRequestNotificationPreferenceDetails, pullRequestId, principalId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .updatePullRequestNotificationPreferenceDetails( + updatePullRequestNotificationPreferenceDetails) + .pullRequestId(pullRequestId) + .principalId(principalId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",updatePullRequestNotificationPreferenceDetails=") + .append(String.valueOf(this.updatePullRequestNotificationPreferenceDetails)); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",principalId=").append(String.valueOf(this.principalId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePullRequestNotificationPreferenceRequest)) { + return false; + } + + UpdatePullRequestNotificationPreferenceRequest other = + (UpdatePullRequestNotificationPreferenceRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.updatePullRequestNotificationPreferenceDetails, + other.updatePullRequestNotificationPreferenceDetails) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals(this.principalId, other.principalId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.updatePullRequestNotificationPreferenceDetails == null + ? 43 + : this.updatePullRequestNotificationPreferenceDetails.hashCode()); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = (result * PRIME) + (this.principalId == null ? 43 : this.principalId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdatePullRequestRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdatePullRequestRequest.java new file mode 100644 index 00000000000..8033fe44f53 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdatePullRequestRequest.java @@ -0,0 +1,293 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use UpdatePullRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdatePullRequestRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.devops.model.UpdatePullRequestDetails> { + + /** + * unique PullRequest identifier + */ + private String pullRequestId; + + /** + * unique PullRequest identifier + */ + public String getPullRequestId() { + return pullRequestId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.devops.model.UpdatePullRequestDetails updatePullRequestDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.devops.model.UpdatePullRequestDetails getUpdatePullRequestDetails() { + return updatePullRequestDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.devops.model.UpdatePullRequestDetails getBody$() { + return updatePullRequestDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdatePullRequestRequest, + com.oracle.bmc.devops.model.UpdatePullRequestDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PullRequest identifier + */ + private String pullRequestId = null; + + /** + * unique PullRequest identifier + * @param pullRequestId the value to set + * @return this builder instance + */ + public Builder pullRequestId(String pullRequestId) { + this.pullRequestId = pullRequestId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.devops.model.UpdatePullRequestDetails updatePullRequestDetails = + null; + + /** + * The information to be updated. + * @param updatePullRequestDetails the value to set + * @return this builder instance + */ + public Builder updatePullRequestDetails( + com.oracle.bmc.devops.model.UpdatePullRequestDetails updatePullRequestDetails) { + this.updatePullRequestDetails = updatePullRequestDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdatePullRequestRequest o) { + pullRequestId(o.getPullRequestId()); + updatePullRequestDetails(o.getUpdatePullRequestDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdatePullRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdatePullRequestRequest + */ + public UpdatePullRequestRequest build() { + UpdatePullRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.devops.model.UpdatePullRequestDetails body) { + updatePullRequestDetails(body); + return this; + } + + /** + * Build the instance of UpdatePullRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdatePullRequestRequest + */ + public UpdatePullRequestRequest buildWithoutInvocationCallback() { + UpdatePullRequestRequest request = new UpdatePullRequestRequest(); + request.pullRequestId = pullRequestId; + request.updatePullRequestDetails = updatePullRequestDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdatePullRequestRequest(pullRequestId, updatePullRequestDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .pullRequestId(pullRequestId) + .updatePullRequestDetails(updatePullRequestDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",pullRequestId=").append(String.valueOf(this.pullRequestId)); + sb.append(",updatePullRequestDetails=") + .append(String.valueOf(this.updatePullRequestDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePullRequestRequest)) { + return false; + } + + UpdatePullRequestRequest other = (UpdatePullRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.pullRequestId, other.pullRequestId) + && java.util.Objects.equals( + this.updatePullRequestDetails, other.updatePullRequestDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.pullRequestId == null ? 43 : this.pullRequestId.hashCode()); + result = + (result * PRIME) + + (this.updatePullRequestDetails == null + ? 43 + : this.updatePullRequestDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdateRepositoryNotificationPreferenceRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdateRepositoryNotificationPreferenceRequest.java new file mode 100644 index 00000000000..743ba029633 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdateRepositoryNotificationPreferenceRequest.java @@ -0,0 +1,335 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use UpdateRepositoryNotificationPreferenceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdateRepositoryNotificationPreferenceRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.devops.model.UpdateRepositoryNotificationPreferenceDetails> { + + /** + * The information to be updated. + */ + private com.oracle.bmc.devops.model.UpdateRepositoryNotificationPreferenceDetails + updateRepositoryNotificationPreferenceDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.devops.model.UpdateRepositoryNotificationPreferenceDetails + getUpdateRepositoryNotificationPreferenceDetails() { + return updateRepositoryNotificationPreferenceDetails; + } + /** + * Unique repository identifier. + */ + private String repositoryId; + + /** + * Unique repository identifier. + */ + public String getRepositoryId() { + return repositoryId; + } + /** + * Unique principal identifier. + */ + private String principalId; + + /** + * Unique principal identifier. + */ + public String getPrincipalId() { + return principalId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.devops.model.UpdateRepositoryNotificationPreferenceDetails getBody$() { + return updateRepositoryNotificationPreferenceDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateRepositoryNotificationPreferenceRequest, + com.oracle.bmc.devops.model.UpdateRepositoryNotificationPreferenceDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The information to be updated. + */ + private com.oracle.bmc.devops.model.UpdateRepositoryNotificationPreferenceDetails + updateRepositoryNotificationPreferenceDetails = null; + + /** + * The information to be updated. + * @param updateRepositoryNotificationPreferenceDetails the value to set + * @return this builder instance + */ + public Builder updateRepositoryNotificationPreferenceDetails( + com.oracle.bmc.devops.model.UpdateRepositoryNotificationPreferenceDetails + updateRepositoryNotificationPreferenceDetails) { + this.updateRepositoryNotificationPreferenceDetails = + updateRepositoryNotificationPreferenceDetails; + return this; + } + + /** + * Unique repository identifier. + */ + private String repositoryId = null; + + /** + * Unique repository identifier. + * @param repositoryId the value to set + * @return this builder instance + */ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + return this; + } + + /** + * Unique principal identifier. + */ + private String principalId = null; + + /** + * Unique principal identifier. + * @param principalId the value to set + * @return this builder instance + */ + public Builder principalId(String principalId) { + this.principalId = principalId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateRepositoryNotificationPreferenceRequest o) { + updateRepositoryNotificationPreferenceDetails( + o.getUpdateRepositoryNotificationPreferenceDetails()); + repositoryId(o.getRepositoryId()); + principalId(o.getPrincipalId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateRepositoryNotificationPreferenceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateRepositoryNotificationPreferenceRequest + */ + public UpdateRepositoryNotificationPreferenceRequest build() { + UpdateRepositoryNotificationPreferenceRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.devops.model.UpdateRepositoryNotificationPreferenceDetails body) { + updateRepositoryNotificationPreferenceDetails(body); + return this; + } + + /** + * Build the instance of UpdateRepositoryNotificationPreferenceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateRepositoryNotificationPreferenceRequest + */ + public UpdateRepositoryNotificationPreferenceRequest buildWithoutInvocationCallback() { + UpdateRepositoryNotificationPreferenceRequest request = + new UpdateRepositoryNotificationPreferenceRequest(); + request.updateRepositoryNotificationPreferenceDetails = + updateRepositoryNotificationPreferenceDetails; + request.repositoryId = repositoryId; + request.principalId = principalId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateRepositoryNotificationPreferenceRequest(updateRepositoryNotificationPreferenceDetails, repositoryId, principalId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .updateRepositoryNotificationPreferenceDetails( + updateRepositoryNotificationPreferenceDetails) + .repositoryId(repositoryId) + .principalId(principalId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",updateRepositoryNotificationPreferenceDetails=") + .append(String.valueOf(this.updateRepositoryNotificationPreferenceDetails)); + sb.append(",repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(",principalId=").append(String.valueOf(this.principalId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateRepositoryNotificationPreferenceRequest)) { + return false; + } + + UpdateRepositoryNotificationPreferenceRequest other = + (UpdateRepositoryNotificationPreferenceRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.updateRepositoryNotificationPreferenceDetails, + other.updateRepositoryNotificationPreferenceDetails) + && java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals(this.principalId, other.principalId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.updateRepositoryNotificationPreferenceDetails == null + ? 43 + : this.updateRepositoryNotificationPreferenceDetails.hashCode()); + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = (result * PRIME) + (this.principalId == null ? 43 : this.principalId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdateRepositorySettingsRequest.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdateRepositorySettingsRequest.java new file mode 100644 index 00000000000..73c2fffea5c --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/requests/UpdateRepositorySettingsRequest.java @@ -0,0 +1,328 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.requests; + +import com.oracle.bmc.devops.model.*; +/** + * Example: Click here to see how to use UpdateRepositorySettingsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdateRepositorySettingsRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.devops.model.UpdateRepositorySettingsDetails> { + + /** + * Unique repository identifier. + */ + private String repositoryId; + + /** + * Unique repository identifier. + */ + public String getRepositoryId() { + return repositoryId; + } + /** + * Details to update settings for a repository. + */ + private com.oracle.bmc.devops.model.UpdateRepositorySettingsDetails + updateRepositorySettingsDetails; + + /** + * Details to update settings for a repository. + */ + public com.oracle.bmc.devops.model.UpdateRepositorySettingsDetails + getUpdateRepositorySettingsDetails() { + return updateRepositorySettingsDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.devops.model.UpdateRepositorySettingsDetails getBody$() { + return updateRepositorySettingsDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateRepositorySettingsRequest, + com.oracle.bmc.devops.model.UpdateRepositorySettingsDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique repository identifier. + */ + private String repositoryId = null; + + /** + * Unique repository identifier. + * @param repositoryId the value to set + * @return this builder instance + */ + public Builder repositoryId(String repositoryId) { + this.repositoryId = repositoryId; + return this; + } + + /** + * Details to update settings for a repository. + */ + private com.oracle.bmc.devops.model.UpdateRepositorySettingsDetails + updateRepositorySettingsDetails = null; + + /** + * Details to update settings for a repository. + * @param updateRepositorySettingsDetails the value to set + * @return this builder instance + */ + public Builder updateRepositorySettingsDetails( + com.oracle.bmc.devops.model.UpdateRepositorySettingsDetails + updateRepositorySettingsDetails) { + this.updateRepositorySettingsDetails = updateRepositorySettingsDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateRepositorySettingsRequest o) { + repositoryId(o.getRepositoryId()); + updateRepositorySettingsDetails(o.getUpdateRepositorySettingsDetails()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateRepositorySettingsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateRepositorySettingsRequest + */ + public UpdateRepositorySettingsRequest build() { + UpdateRepositorySettingsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.devops.model.UpdateRepositorySettingsDetails body) { + updateRepositorySettingsDetails(body); + return this; + } + + /** + * Build the instance of UpdateRepositorySettingsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateRepositorySettingsRequest + */ + public UpdateRepositorySettingsRequest buildWithoutInvocationCallback() { + UpdateRepositorySettingsRequest request = new UpdateRepositorySettingsRequest(); + request.repositoryId = repositoryId; + request.updateRepositorySettingsDetails = updateRepositorySettingsDetails; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new UpdateRepositorySettingsRequest(repositoryId, updateRepositorySettingsDetails, ifMatch, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .repositoryId(repositoryId) + .updateRepositorySettingsDetails(updateRepositorySettingsDetails) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",repositoryId=").append(String.valueOf(this.repositoryId)); + sb.append(",updateRepositorySettingsDetails=") + .append(String.valueOf(this.updateRepositorySettingsDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateRepositorySettingsRequest)) { + return false; + } + + UpdateRepositorySettingsRequest other = (UpdateRepositorySettingsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.repositoryId, other.repositoryId) + && java.util.Objects.equals( + this.updateRepositorySettingsDetails, other.updateRepositorySettingsDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.repositoryId == null ? 43 : this.repositoryId.hashCode()); + result = + (result * PRIME) + + (this.updateRepositorySettingsDetails == null + ? 43 + : this.updateRepositorySettingsDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/CreateOrUpdateGitRefResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/CreateOrUpdateGitRefResponse.java new file mode 100644 index 00000000000..5e3f85323f5 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/CreateOrUpdateGitRefResponse.java @@ -0,0 +1,278 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class CreateOrUpdateGitRefResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned RepositoryRef instance. + */ + private com.oracle.bmc.devops.model.RepositoryRef repositoryRef; + + /** + * The returned RepositoryRef instance. + * @return the value + */ + public com.oracle.bmc.devops.model.RepositoryRef getRepositoryRef() { + return repositoryRef; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "etag", + "opcWorkRequestId", + "opcRequestId", + "repositoryRef" + }) + private CreateOrUpdateGitRefResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.devops.model.RepositoryRef repositoryRef) { + super(__httpStatusCode__, headers); + this.location = location; + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.repositoryRef = repositoryRef; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned RepositoryRef instance. + */ + private com.oracle.bmc.devops.model.RepositoryRef repositoryRef; + + /** + * The returned RepositoryRef instance. + * @param repositoryRef the value to set + * @return this builder + */ + public Builder repositoryRef(com.oracle.bmc.devops.model.RepositoryRef repositoryRef) { + this.repositoryRef = repositoryRef; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateOrUpdateGitRefResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + repositoryRef(o.getRepositoryRef()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateOrUpdateGitRefResponse build() { + return new CreateOrUpdateGitRefResponse( + __httpStatusCode__, + headers, + location, + etag, + opcWorkRequestId, + opcRequestId, + repositoryRef); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",repositoryRef=").append(String.valueOf(repositoryRef)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateOrUpdateGitRefResponse)) { + return false; + } + + CreateOrUpdateGitRefResponse other = (CreateOrUpdateGitRefResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.repositoryRef, other.repositoryRef); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.repositoryRef == null ? 43 : this.repositoryRef.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/CreateOrUpdateProtectedBranchResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/CreateOrUpdateProtectedBranchResponse.java new file mode 100644 index 00000000000..15a0fa0feeb --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/CreateOrUpdateProtectedBranchResponse.java @@ -0,0 +1,236 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class CreateOrUpdateProtectedBranchResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ProtectedBranch instance. + */ + private com.oracle.bmc.devops.model.ProtectedBranch protectedBranch; + + /** + * The returned ProtectedBranch instance. + * @return the value + */ + public com.oracle.bmc.devops.model.ProtectedBranch getProtectedBranch() { + return protectedBranch; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "etag", + "opcRequestId", + "protectedBranch" + }) + private CreateOrUpdateProtectedBranchResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String etag, + String opcRequestId, + com.oracle.bmc.devops.model.ProtectedBranch protectedBranch) { + super(__httpStatusCode__, headers); + this.location = location; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.protectedBranch = protectedBranch; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ProtectedBranch instance. + */ + private com.oracle.bmc.devops.model.ProtectedBranch protectedBranch; + + /** + * The returned ProtectedBranch instance. + * @param protectedBranch the value to set + * @return this builder + */ + public Builder protectedBranch( + com.oracle.bmc.devops.model.ProtectedBranch protectedBranch) { + this.protectedBranch = protectedBranch; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateOrUpdateProtectedBranchResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + protectedBranch(o.getProtectedBranch()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateOrUpdateProtectedBranchResponse build() { + return new CreateOrUpdateProtectedBranchResponse( + __httpStatusCode__, headers, location, etag, opcRequestId, protectedBranch); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",protectedBranch=").append(String.valueOf(protectedBranch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateOrUpdateProtectedBranchResponse)) { + return false; + } + + CreateOrUpdateProtectedBranchResponse other = (CreateOrUpdateProtectedBranchResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.protectedBranch, other.protectedBranch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.protectedBranch == null ? 43 : this.protectedBranch.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/CreatePullRequestAttachmentResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/CreatePullRequestAttachmentResponse.java new file mode 100644 index 00000000000..26c33271109 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/CreatePullRequestAttachmentResponse.java @@ -0,0 +1,282 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class CreatePullRequestAttachmentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Relative URL of the newly created resource. + */ + private String contentLocation; + + /** + * Relative URL of the newly created resource. + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned PullRequestAttachment instance. + */ + private com.oracle.bmc.devops.model.PullRequestAttachment pullRequestAttachment; + + /** + * The returned PullRequestAttachment instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequestAttachment getPullRequestAttachment() { + return pullRequestAttachment; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "contentLocation", + "location", + "opcRequestId", + "etag", + "pullRequestAttachment" + }) + private CreatePullRequestAttachmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String contentLocation, + String location, + String opcRequestId, + String etag, + com.oracle.bmc.devops.model.PullRequestAttachment pullRequestAttachment) { + super(__httpStatusCode__, headers); + this.contentLocation = contentLocation; + this.location = location; + this.opcRequestId = opcRequestId; + this.etag = etag; + this.pullRequestAttachment = pullRequestAttachment; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Relative URL of the newly created resource. + */ + private String contentLocation; + + /** + * Relative URL of the newly created resource. + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned PullRequestAttachment instance. + */ + private com.oracle.bmc.devops.model.PullRequestAttachment pullRequestAttachment; + + /** + * The returned PullRequestAttachment instance. + * @param pullRequestAttachment the value to set + * @return this builder + */ + public Builder pullRequestAttachment( + com.oracle.bmc.devops.model.PullRequestAttachment pullRequestAttachment) { + this.pullRequestAttachment = pullRequestAttachment; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreatePullRequestAttachmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + contentLocation(o.getContentLocation()); + location(o.getLocation()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + pullRequestAttachment(o.getPullRequestAttachment()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreatePullRequestAttachmentResponse build() { + return new CreatePullRequestAttachmentResponse( + __httpStatusCode__, + headers, + contentLocation, + location, + opcRequestId, + etag, + pullRequestAttachment); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",pullRequestAttachment=").append(String.valueOf(pullRequestAttachment)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreatePullRequestAttachmentResponse)) { + return false; + } + + CreatePullRequestAttachmentResponse other = (CreatePullRequestAttachmentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals( + this.pullRequestAttachment, other.pullRequestAttachment); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.pullRequestAttachment == null + ? 43 + : this.pullRequestAttachment.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/CreatePullRequestCommentResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/CreatePullRequestCommentResponse.java new file mode 100644 index 00000000000..efe42b09211 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/CreatePullRequestCommentResponse.java @@ -0,0 +1,203 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class CreatePullRequestCommentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned PullRequestComment instance. + */ + private com.oracle.bmc.devops.model.PullRequestComment pullRequestComment; + + /** + * The returned PullRequestComment instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequestComment getPullRequestComment() { + return pullRequestComment; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "pullRequestComment" + }) + private CreatePullRequestCommentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.devops.model.PullRequestComment pullRequestComment) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.pullRequestComment = pullRequestComment; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned PullRequestComment instance. + */ + private com.oracle.bmc.devops.model.PullRequestComment pullRequestComment; + + /** + * The returned PullRequestComment instance. + * @param pullRequestComment the value to set + * @return this builder + */ + public Builder pullRequestComment( + com.oracle.bmc.devops.model.PullRequestComment pullRequestComment) { + this.pullRequestComment = pullRequestComment; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreatePullRequestCommentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + pullRequestComment(o.getPullRequestComment()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreatePullRequestCommentResponse build() { + return new CreatePullRequestCommentResponse( + __httpStatusCode__, headers, opcRequestId, etag, pullRequestComment); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",pullRequestComment=").append(String.valueOf(pullRequestComment)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreatePullRequestCommentResponse)) { + return false; + } + + CreatePullRequestCommentResponse other = (CreatePullRequestCommentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.pullRequestComment, other.pullRequestComment); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.pullRequestComment == null + ? 43 + : this.pullRequestComment.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/CreatePullRequestResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/CreatePullRequestResponse.java new file mode 100644 index 00000000000..0a91d8b02a6 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/CreatePullRequestResponse.java @@ -0,0 +1,314 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class CreatePullRequestResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * Relative URL of the newly created resource. + */ + private String contentLocation; + + /** + * Relative URL of the newly created resource. + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned PullRequest instance. + */ + private com.oracle.bmc.devops.model.PullRequest pullRequest; + + /** + * The returned PullRequest instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequest getPullRequest() { + return pullRequest; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "contentLocation", + "opcWorkRequestId", + "opcRequestId", + "etag", + "pullRequest" + }) + private CreatePullRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String contentLocation, + String opcWorkRequestId, + String opcRequestId, + String etag, + com.oracle.bmc.devops.model.PullRequest pullRequest) { + super(__httpStatusCode__, headers); + this.location = location; + this.contentLocation = contentLocation; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.etag = etag; + this.pullRequest = pullRequest; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * Relative URL of the newly created resource. + */ + private String contentLocation; + + /** + * Relative URL of the newly created resource. + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned PullRequest instance. + */ + private com.oracle.bmc.devops.model.PullRequest pullRequest; + + /** + * The returned PullRequest instance. + * @param pullRequest the value to set + * @return this builder + */ + public Builder pullRequest(com.oracle.bmc.devops.model.PullRequest pullRequest) { + this.pullRequest = pullRequest; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreatePullRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + pullRequest(o.getPullRequest()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreatePullRequestResponse build() { + return new CreatePullRequestResponse( + __httpStatusCode__, + headers, + location, + contentLocation, + opcWorkRequestId, + opcRequestId, + etag, + pullRequest); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",pullRequest=").append(String.valueOf(pullRequest)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreatePullRequestResponse)) { + return false; + } + + CreatePullRequestResponse other = (CreatePullRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.pullRequest, other.pullRequest); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.pullRequest == null ? 43 : this.pullRequest.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeclinePullRequestResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeclinePullRequestResponse.java new file mode 100644 index 00000000000..79593ae0ea7 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeclinePullRequestResponse.java @@ -0,0 +1,233 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeclinePullRequestResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned PullRequest instance. + */ + private com.oracle.bmc.devops.model.PullRequest pullRequest; + + /** + * The returned PullRequest instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequest getPullRequest() { + return pullRequest; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "opcRequestId", + "etag", + "pullRequest" + }) + private DeclinePullRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String opcRequestId, + String etag, + com.oracle.bmc.devops.model.PullRequest pullRequest) { + super(__httpStatusCode__, headers); + this.location = location; + this.opcRequestId = opcRequestId; + this.etag = etag; + this.pullRequest = pullRequest; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned PullRequest instance. + */ + private com.oracle.bmc.devops.model.PullRequest pullRequest; + + /** + * The returned PullRequest instance. + * @param pullRequest the value to set + * @return this builder + */ + public Builder pullRequest(com.oracle.bmc.devops.model.PullRequest pullRequest) { + this.pullRequest = pullRequest; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeclinePullRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + pullRequest(o.getPullRequest()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeclinePullRequestResponse build() { + return new DeclinePullRequestResponse( + __httpStatusCode__, headers, location, opcRequestId, etag, pullRequest); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",pullRequest=").append(String.valueOf(pullRequest)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeclinePullRequestResponse)) { + return false; + } + + DeclinePullRequestResponse other = (DeclinePullRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.pullRequest, other.pullRequest); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.pullRequest == null ? 43 : this.pullRequest.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeleteGitRefResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeleteGitRefResponse.java new file mode 100644 index 00000000000..25ed5fbf976 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeleteGitRefResponse.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeleteGitRefResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteGitRefResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteGitRefResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteGitRefResponse build() { + return new DeleteGitRefResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteGitRefResponse)) { + return false; + } + + DeleteGitRefResponse other = (DeleteGitRefResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeleteProjectRepositorySettingsResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeleteProjectRepositorySettingsResponse.java new file mode 100644 index 00000000000..43fd55bd893 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeleteProjectRepositorySettingsResponse.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeleteProjectRepositorySettingsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeleteProjectRepositorySettingsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteProjectRepositorySettingsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteProjectRepositorySettingsResponse build() { + return new DeleteProjectRepositorySettingsResponse( + __httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteProjectRepositorySettingsResponse)) { + return false; + } + + DeleteProjectRepositorySettingsResponse other = (DeleteProjectRepositorySettingsResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeleteProtectedBranchResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeleteProtectedBranchResponse.java new file mode 100644 index 00000000000..571ecee6881 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeleteProtectedBranchResponse.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeleteProtectedBranchResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeleteProtectedBranchResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteProtectedBranchResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteProtectedBranchResponse build() { + return new DeleteProtectedBranchResponse(__httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteProtectedBranchResponse)) { + return false; + } + + DeleteProtectedBranchResponse other = (DeleteProtectedBranchResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeletePullRequestAttachmentResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeletePullRequestAttachmentResponse.java new file mode 100644 index 00000000000..bd154a4c6fd --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeletePullRequestAttachmentResponse.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeletePullRequestAttachmentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeletePullRequestAttachmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeletePullRequestAttachmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeletePullRequestAttachmentResponse build() { + return new DeletePullRequestAttachmentResponse( + __httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeletePullRequestAttachmentResponse)) { + return false; + } + + DeletePullRequestAttachmentResponse other = (DeletePullRequestAttachmentResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeletePullRequestCommentResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeletePullRequestCommentResponse.java new file mode 100644 index 00000000000..a22ed6e2a91 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeletePullRequestCommentResponse.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeletePullRequestCommentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeletePullRequestCommentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeletePullRequestCommentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeletePullRequestCommentResponse build() { + return new DeletePullRequestCommentResponse(__httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeletePullRequestCommentResponse)) { + return false; + } + + DeletePullRequestCommentResponse other = (DeletePullRequestCommentResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeletePullRequestResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeletePullRequestResponse.java new file mode 100644 index 00000000000..ad5955f9a89 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeletePullRequestResponse.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeletePullRequestResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeletePullRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeletePullRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeletePullRequestResponse build() { + return new DeletePullRequestResponse(__httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeletePullRequestResponse)) { + return false; + } + + DeletePullRequestResponse other = (DeletePullRequestResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeleteRepositorySettingsResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeleteRepositorySettingsResponse.java new file mode 100644 index 00000000000..74c00a46db3 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/DeleteRepositorySettingsResponse.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class DeleteRepositorySettingsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeleteRepositorySettingsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteRepositorySettingsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteRepositorySettingsResponse build() { + return new DeleteRepositorySettingsResponse(__httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteRepositorySettingsResponse)) { + return false; + } + + DeleteRepositorySettingsResponse other = (DeleteRepositorySettingsResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetProjectNotificationPreferenceResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetProjectNotificationPreferenceResponse.java new file mode 100644 index 00000000000..a4ace0a670c --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetProjectNotificationPreferenceResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetProjectNotificationPreferenceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ProjectNotificationPreference instance. + */ + private com.oracle.bmc.devops.model.ProjectNotificationPreference projectNotificationPreference; + + /** + * The returned ProjectNotificationPreference instance. + * @return the value + */ + public com.oracle.bmc.devops.model.ProjectNotificationPreference + getProjectNotificationPreference() { + return projectNotificationPreference; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "projectNotificationPreference" + }) + private GetProjectNotificationPreferenceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.devops.model.ProjectNotificationPreference + projectNotificationPreference) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.projectNotificationPreference = projectNotificationPreference; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ProjectNotificationPreference instance. + */ + private com.oracle.bmc.devops.model.ProjectNotificationPreference + projectNotificationPreference; + + /** + * The returned ProjectNotificationPreference instance. + * @param projectNotificationPreference the value to set + * @return this builder + */ + public Builder projectNotificationPreference( + com.oracle.bmc.devops.model.ProjectNotificationPreference + projectNotificationPreference) { + this.projectNotificationPreference = projectNotificationPreference; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetProjectNotificationPreferenceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + projectNotificationPreference(o.getProjectNotificationPreference()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetProjectNotificationPreferenceResponse build() { + return new GetProjectNotificationPreferenceResponse( + __httpStatusCode__, headers, etag, opcRequestId, projectNotificationPreference); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",projectNotificationPreference=") + .append(String.valueOf(projectNotificationPreference)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetProjectNotificationPreferenceResponse)) { + return false; + } + + GetProjectNotificationPreferenceResponse other = + (GetProjectNotificationPreferenceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.projectNotificationPreference, other.projectNotificationPreference); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.projectNotificationPreference == null + ? 43 + : this.projectNotificationPreference.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetProjectRepositorySettingsResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetProjectRepositorySettingsResponse.java new file mode 100644 index 00000000000..7bdf9d4c7f6 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetProjectRepositorySettingsResponse.java @@ -0,0 +1,204 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetProjectRepositorySettingsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ProjectRepositorySettings instance. + */ + private com.oracle.bmc.devops.model.ProjectRepositorySettings projectRepositorySettings; + + /** + * The returned ProjectRepositorySettings instance. + * @return the value + */ + public com.oracle.bmc.devops.model.ProjectRepositorySettings getProjectRepositorySettings() { + return projectRepositorySettings; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "projectRepositorySettings" + }) + private GetProjectRepositorySettingsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.devops.model.ProjectRepositorySettings projectRepositorySettings) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.projectRepositorySettings = projectRepositorySettings; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ProjectRepositorySettings instance. + */ + private com.oracle.bmc.devops.model.ProjectRepositorySettings projectRepositorySettings; + + /** + * The returned ProjectRepositorySettings instance. + * @param projectRepositorySettings the value to set + * @return this builder + */ + public Builder projectRepositorySettings( + com.oracle.bmc.devops.model.ProjectRepositorySettings projectRepositorySettings) { + this.projectRepositorySettings = projectRepositorySettings; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetProjectRepositorySettingsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + projectRepositorySettings(o.getProjectRepositorySettings()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetProjectRepositorySettingsResponse build() { + return new GetProjectRepositorySettingsResponse( + __httpStatusCode__, headers, etag, opcRequestId, projectRepositorySettings); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",projectRepositorySettings=").append(String.valueOf(projectRepositorySettings)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetProjectRepositorySettingsResponse)) { + return false; + } + + GetProjectRepositorySettingsResponse other = (GetProjectRepositorySettingsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.projectRepositorySettings, other.projectRepositorySettings); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.projectRepositorySettings == null + ? 43 + : this.projectRepositorySettings.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetPullRequestAttachmentContentResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetPullRequestAttachmentContentResponse.java new file mode 100644 index 00000000000..f7dede081c2 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetPullRequestAttachmentContentResponse.java @@ -0,0 +1,198 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetPullRequestAttachmentContentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned java.io.InputStream instance. + */ + private java.io.InputStream inputStream; + + /** + * The returned java.io.InputStream instance. + * @return the value + */ + public java.io.InputStream getInputStream() { + return inputStream; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "inputStream" + }) + private GetPullRequestAttachmentContentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + java.io.InputStream inputStream) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.inputStream = inputStream; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned java.io.InputStream instance. + */ + private java.io.InputStream inputStream; + + /** + * The returned java.io.InputStream instance. + * @param inputStream the value to set + * @return this builder + */ + public Builder inputStream(java.io.InputStream inputStream) { + this.inputStream = inputStream; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetPullRequestAttachmentContentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + inputStream(o.getInputStream()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetPullRequestAttachmentContentResponse build() { + return new GetPullRequestAttachmentContentResponse( + __httpStatusCode__, headers, etag, opcRequestId, inputStream); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",inputStream=").append(String.valueOf(inputStream)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetPullRequestAttachmentContentResponse)) { + return false; + } + + GetPullRequestAttachmentContentResponse other = (GetPullRequestAttachmentContentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.inputStream, other.inputStream); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.inputStream == null ? 43 : this.inputStream.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetPullRequestAttachmentResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetPullRequestAttachmentResponse.java new file mode 100644 index 00000000000..3451b935c43 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetPullRequestAttachmentResponse.java @@ -0,0 +1,204 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetPullRequestAttachmentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned PullRequestAttachment instance. + */ + private com.oracle.bmc.devops.model.PullRequestAttachment pullRequestAttachment; + + /** + * The returned PullRequestAttachment instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequestAttachment getPullRequestAttachment() { + return pullRequestAttachment; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "pullRequestAttachment" + }) + private GetPullRequestAttachmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.devops.model.PullRequestAttachment pullRequestAttachment) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.pullRequestAttachment = pullRequestAttachment; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned PullRequestAttachment instance. + */ + private com.oracle.bmc.devops.model.PullRequestAttachment pullRequestAttachment; + + /** + * The returned PullRequestAttachment instance. + * @param pullRequestAttachment the value to set + * @return this builder + */ + public Builder pullRequestAttachment( + com.oracle.bmc.devops.model.PullRequestAttachment pullRequestAttachment) { + this.pullRequestAttachment = pullRequestAttachment; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetPullRequestAttachmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + pullRequestAttachment(o.getPullRequestAttachment()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetPullRequestAttachmentResponse build() { + return new GetPullRequestAttachmentResponse( + __httpStatusCode__, headers, etag, opcRequestId, pullRequestAttachment); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",pullRequestAttachment=").append(String.valueOf(pullRequestAttachment)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetPullRequestAttachmentResponse)) { + return false; + } + + GetPullRequestAttachmentResponse other = (GetPullRequestAttachmentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.pullRequestAttachment, other.pullRequestAttachment); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.pullRequestAttachment == null + ? 43 + : this.pullRequestAttachment.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetPullRequestChangeSummaryMetricsResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetPullRequestChangeSummaryMetricsResponse.java new file mode 100644 index 00000000000..b3862299cd4 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetPullRequestChangeSummaryMetricsResponse.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetPullRequestChangeSummaryMetricsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned PullRequestChangeSummaryMetrics instance. + */ + private com.oracle.bmc.devops.model.PullRequestChangeSummaryMetrics + pullRequestChangeSummaryMetrics; + + /** + * The returned PullRequestChangeSummaryMetrics instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequestChangeSummaryMetrics + getPullRequestChangeSummaryMetrics() { + return pullRequestChangeSummaryMetrics; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "pullRequestChangeSummaryMetrics" + }) + private GetPullRequestChangeSummaryMetricsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + com.oracle.bmc.devops.model.PullRequestChangeSummaryMetrics + pullRequestChangeSummaryMetrics) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.pullRequestChangeSummaryMetrics = pullRequestChangeSummaryMetrics; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned PullRequestChangeSummaryMetrics instance. + */ + private com.oracle.bmc.devops.model.PullRequestChangeSummaryMetrics + pullRequestChangeSummaryMetrics; + + /** + * The returned PullRequestChangeSummaryMetrics instance. + * @param pullRequestChangeSummaryMetrics the value to set + * @return this builder + */ + public Builder pullRequestChangeSummaryMetrics( + com.oracle.bmc.devops.model.PullRequestChangeSummaryMetrics + pullRequestChangeSummaryMetrics) { + this.pullRequestChangeSummaryMetrics = pullRequestChangeSummaryMetrics; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetPullRequestChangeSummaryMetricsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + pullRequestChangeSummaryMetrics(o.getPullRequestChangeSummaryMetrics()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetPullRequestChangeSummaryMetricsResponse build() { + return new GetPullRequestChangeSummaryMetricsResponse( + __httpStatusCode__, headers, opcRequestId, pullRequestChangeSummaryMetrics); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",pullRequestChangeSummaryMetrics=") + .append(String.valueOf(pullRequestChangeSummaryMetrics)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetPullRequestChangeSummaryMetricsResponse)) { + return false; + } + + GetPullRequestChangeSummaryMetricsResponse other = + (GetPullRequestChangeSummaryMetricsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.pullRequestChangeSummaryMetrics, + other.pullRequestChangeSummaryMetrics); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.pullRequestChangeSummaryMetrics == null + ? 43 + : this.pullRequestChangeSummaryMetrics.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetPullRequestCommentResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetPullRequestCommentResponse.java new file mode 100644 index 00000000000..cc23ff6f1b0 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetPullRequestCommentResponse.java @@ -0,0 +1,203 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetPullRequestCommentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned PullRequestComment instance. + */ + private com.oracle.bmc.devops.model.PullRequestComment pullRequestComment; + + /** + * The returned PullRequestComment instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequestComment getPullRequestComment() { + return pullRequestComment; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "pullRequestComment" + }) + private GetPullRequestCommentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.devops.model.PullRequestComment pullRequestComment) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.pullRequestComment = pullRequestComment; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned PullRequestComment instance. + */ + private com.oracle.bmc.devops.model.PullRequestComment pullRequestComment; + + /** + * The returned PullRequestComment instance. + * @param pullRequestComment the value to set + * @return this builder + */ + public Builder pullRequestComment( + com.oracle.bmc.devops.model.PullRequestComment pullRequestComment) { + this.pullRequestComment = pullRequestComment; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetPullRequestCommentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + pullRequestComment(o.getPullRequestComment()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetPullRequestCommentResponse build() { + return new GetPullRequestCommentResponse( + __httpStatusCode__, headers, etag, opcRequestId, pullRequestComment); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",pullRequestComment=").append(String.valueOf(pullRequestComment)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetPullRequestCommentResponse)) { + return false; + } + + GetPullRequestCommentResponse other = (GetPullRequestCommentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.pullRequestComment, other.pullRequestComment); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.pullRequestComment == null + ? 43 + : this.pullRequestComment.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetPullRequestNotificationPreferenceResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetPullRequestNotificationPreferenceResponse.java new file mode 100644 index 00000000000..55ee2e3c5c8 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetPullRequestNotificationPreferenceResponse.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetPullRequestNotificationPreferenceResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned PullRequestNotificationPreference instance. + */ + private com.oracle.bmc.devops.model.PullRequestNotificationPreference + pullRequestNotificationPreference; + + /** + * The returned PullRequestNotificationPreference instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequestNotificationPreference + getPullRequestNotificationPreference() { + return pullRequestNotificationPreference; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "pullRequestNotificationPreference" + }) + private GetPullRequestNotificationPreferenceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.devops.model.PullRequestNotificationPreference + pullRequestNotificationPreference) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.pullRequestNotificationPreference = pullRequestNotificationPreference; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned PullRequestNotificationPreference instance. + */ + private com.oracle.bmc.devops.model.PullRequestNotificationPreference + pullRequestNotificationPreference; + + /** + * The returned PullRequestNotificationPreference instance. + * @param pullRequestNotificationPreference the value to set + * @return this builder + */ + public Builder pullRequestNotificationPreference( + com.oracle.bmc.devops.model.PullRequestNotificationPreference + pullRequestNotificationPreference) { + this.pullRequestNotificationPreference = pullRequestNotificationPreference; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetPullRequestNotificationPreferenceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + pullRequestNotificationPreference(o.getPullRequestNotificationPreference()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetPullRequestNotificationPreferenceResponse build() { + return new GetPullRequestNotificationPreferenceResponse( + __httpStatusCode__, + headers, + etag, + opcRequestId, + pullRequestNotificationPreference); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",pullRequestNotificationPreference=") + .append(String.valueOf(pullRequestNotificationPreference)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetPullRequestNotificationPreferenceResponse)) { + return false; + } + + GetPullRequestNotificationPreferenceResponse other = + (GetPullRequestNotificationPreferenceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.pullRequestNotificationPreference, + other.pullRequestNotificationPreference); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.pullRequestNotificationPreference == null + ? 43 + : this.pullRequestNotificationPreference.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetPullRequestResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetPullRequestResponse.java new file mode 100644 index 00000000000..76767fe5aa6 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetPullRequestResponse.java @@ -0,0 +1,198 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetPullRequestResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned PullRequest instance. + */ + private com.oracle.bmc.devops.model.PullRequest pullRequest; + + /** + * The returned PullRequest instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequest getPullRequest() { + return pullRequest; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "pullRequest" + }) + private GetPullRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.devops.model.PullRequest pullRequest) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.pullRequest = pullRequest; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned PullRequest instance. + */ + private com.oracle.bmc.devops.model.PullRequest pullRequest; + + /** + * The returned PullRequest instance. + * @param pullRequest the value to set + * @return this builder + */ + public Builder pullRequest(com.oracle.bmc.devops.model.PullRequest pullRequest) { + this.pullRequest = pullRequest; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetPullRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + pullRequest(o.getPullRequest()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetPullRequestResponse build() { + return new GetPullRequestResponse( + __httpStatusCode__, headers, etag, opcRequestId, pullRequest); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",pullRequest=").append(String.valueOf(pullRequest)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetPullRequestResponse)) { + return false; + } + + GetPullRequestResponse other = (GetPullRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.pullRequest, other.pullRequest); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.pullRequest == null ? 43 : this.pullRequest.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetRepositoryNotificationPreferenceResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetRepositoryNotificationPreferenceResponse.java new file mode 100644 index 00000000000..48a677baa1c --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetRepositoryNotificationPreferenceResponse.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetRepositoryNotificationPreferenceResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned RepositoryNotificationPreference instance. + */ + private com.oracle.bmc.devops.model.RepositoryNotificationPreference + repositoryNotificationPreference; + + /** + * The returned RepositoryNotificationPreference instance. + * @return the value + */ + public com.oracle.bmc.devops.model.RepositoryNotificationPreference + getRepositoryNotificationPreference() { + return repositoryNotificationPreference; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "repositoryNotificationPreference" + }) + private GetRepositoryNotificationPreferenceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.devops.model.RepositoryNotificationPreference + repositoryNotificationPreference) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.repositoryNotificationPreference = repositoryNotificationPreference; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned RepositoryNotificationPreference instance. + */ + private com.oracle.bmc.devops.model.RepositoryNotificationPreference + repositoryNotificationPreference; + + /** + * The returned RepositoryNotificationPreference instance. + * @param repositoryNotificationPreference the value to set + * @return this builder + */ + public Builder repositoryNotificationPreference( + com.oracle.bmc.devops.model.RepositoryNotificationPreference + repositoryNotificationPreference) { + this.repositoryNotificationPreference = repositoryNotificationPreference; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetRepositoryNotificationPreferenceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + repositoryNotificationPreference(o.getRepositoryNotificationPreference()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetRepositoryNotificationPreferenceResponse build() { + return new GetRepositoryNotificationPreferenceResponse( + __httpStatusCode__, + headers, + etag, + opcRequestId, + repositoryNotificationPreference); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",repositoryNotificationPreference=") + .append(String.valueOf(repositoryNotificationPreference)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetRepositoryNotificationPreferenceResponse)) { + return false; + } + + GetRepositoryNotificationPreferenceResponse other = + (GetRepositoryNotificationPreferenceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.repositoryNotificationPreference, + other.repositoryNotificationPreference); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.repositoryNotificationPreference == null + ? 43 + : this.repositoryNotificationPreference.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetRepositorySettingsResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetRepositorySettingsResponse.java new file mode 100644 index 00000000000..d009398fcd9 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/GetRepositorySettingsResponse.java @@ -0,0 +1,203 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class GetRepositorySettingsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned RepositorySettings instance. + */ + private com.oracle.bmc.devops.model.RepositorySettings repositorySettings; + + /** + * The returned RepositorySettings instance. + * @return the value + */ + public com.oracle.bmc.devops.model.RepositorySettings getRepositorySettings() { + return repositorySettings; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "repositorySettings" + }) + private GetRepositorySettingsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.devops.model.RepositorySettings repositorySettings) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.repositorySettings = repositorySettings; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned RepositorySettings instance. + */ + private com.oracle.bmc.devops.model.RepositorySettings repositorySettings; + + /** + * The returned RepositorySettings instance. + * @param repositorySettings the value to set + * @return this builder + */ + public Builder repositorySettings( + com.oracle.bmc.devops.model.RepositorySettings repositorySettings) { + this.repositorySettings = repositorySettings; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetRepositorySettingsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + repositorySettings(o.getRepositorySettings()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetRepositorySettingsResponse build() { + return new GetRepositorySettingsResponse( + __httpStatusCode__, headers, etag, opcRequestId, repositorySettings); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",repositorySettings=").append(String.valueOf(repositorySettings)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetRepositorySettingsResponse)) { + return false; + } + + GetRepositorySettingsResponse other = (GetRepositorySettingsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.repositorySettings, other.repositorySettings); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.repositorySettings == null + ? 43 + : this.repositorySettings.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/LikePullRequestCommentResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/LikePullRequestCommentResponse.java new file mode 100644 index 00000000000..2d94635a84a --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/LikePullRequestCommentResponse.java @@ -0,0 +1,203 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class LikePullRequestCommentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned PullRequestComment instance. + */ + private com.oracle.bmc.devops.model.PullRequestComment pullRequestComment; + + /** + * The returned PullRequestComment instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequestComment getPullRequestComment() { + return pullRequestComment; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "pullRequestComment" + }) + private LikePullRequestCommentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.devops.model.PullRequestComment pullRequestComment) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.pullRequestComment = pullRequestComment; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned PullRequestComment instance. + */ + private com.oracle.bmc.devops.model.PullRequestComment pullRequestComment; + + /** + * The returned PullRequestComment instance. + * @param pullRequestComment the value to set + * @return this builder + */ + public Builder pullRequestComment( + com.oracle.bmc.devops.model.PullRequestComment pullRequestComment) { + this.pullRequestComment = pullRequestComment; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(LikePullRequestCommentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + pullRequestComment(o.getPullRequestComment()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public LikePullRequestCommentResponse build() { + return new LikePullRequestCommentResponse( + __httpStatusCode__, headers, opcRequestId, etag, pullRequestComment); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",pullRequestComment=").append(String.valueOf(pullRequestComment)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof LikePullRequestCommentResponse)) { + return false; + } + + LikePullRequestCommentResponse other = (LikePullRequestCommentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.pullRequestComment, other.pullRequestComment); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.pullRequestComment == null + ? 43 + : this.pullRequestComment.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListBuildRunSnapshotsResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListBuildRunSnapshotsResponse.java new file mode 100644 index 00000000000..59943dd8974 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListBuildRunSnapshotsResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListBuildRunSnapshotsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned BuildRunSnapshotCollection instance. + */ + private com.oracle.bmc.devops.model.BuildRunSnapshotCollection buildRunSnapshotCollection; + + /** + * The returned BuildRunSnapshotCollection instance. + * @return the value + */ + public com.oracle.bmc.devops.model.BuildRunSnapshotCollection getBuildRunSnapshotCollection() { + return buildRunSnapshotCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "buildRunSnapshotCollection" + }) + private ListBuildRunSnapshotsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.devops.model.BuildRunSnapshotCollection buildRunSnapshotCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.buildRunSnapshotCollection = buildRunSnapshotCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned BuildRunSnapshotCollection instance. + */ + private com.oracle.bmc.devops.model.BuildRunSnapshotCollection buildRunSnapshotCollection; + + /** + * The returned BuildRunSnapshotCollection instance. + * @param buildRunSnapshotCollection the value to set + * @return this builder + */ + public Builder buildRunSnapshotCollection( + com.oracle.bmc.devops.model.BuildRunSnapshotCollection buildRunSnapshotCollection) { + this.buildRunSnapshotCollection = buildRunSnapshotCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListBuildRunSnapshotsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + buildRunSnapshotCollection(o.getBuildRunSnapshotCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListBuildRunSnapshotsResponse build() { + return new ListBuildRunSnapshotsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + buildRunSnapshotCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",buildRunSnapshotCollection=") + .append(String.valueOf(buildRunSnapshotCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListBuildRunSnapshotsResponse)) { + return false; + } + + ListBuildRunSnapshotsResponse other = (ListBuildRunSnapshotsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.buildRunSnapshotCollection, other.buildRunSnapshotCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.buildRunSnapshotCollection == null + ? 43 + : this.buildRunSnapshotCollection.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListForkSyncStatusesResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListForkSyncStatusesResponse.java new file mode 100644 index 00000000000..f51c60a1e17 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListForkSyncStatusesResponse.java @@ -0,0 +1,204 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListForkSyncStatusesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ForkSyncStatusCollection instance. + */ + private com.oracle.bmc.devops.model.ForkSyncStatusCollection forkSyncStatusCollection; + + /** + * The returned ForkSyncStatusCollection instance. + * @return the value + */ + public com.oracle.bmc.devops.model.ForkSyncStatusCollection getForkSyncStatusCollection() { + return forkSyncStatusCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "forkSyncStatusCollection" + }) + private ListForkSyncStatusesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.devops.model.ForkSyncStatusCollection forkSyncStatusCollection) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.forkSyncStatusCollection = forkSyncStatusCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ForkSyncStatusCollection instance. + */ + private com.oracle.bmc.devops.model.ForkSyncStatusCollection forkSyncStatusCollection; + + /** + * The returned ForkSyncStatusCollection instance. + * @param forkSyncStatusCollection the value to set + * @return this builder + */ + public Builder forkSyncStatusCollection( + com.oracle.bmc.devops.model.ForkSyncStatusCollection forkSyncStatusCollection) { + this.forkSyncStatusCollection = forkSyncStatusCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListForkSyncStatusesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + forkSyncStatusCollection(o.getForkSyncStatusCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListForkSyncStatusesResponse build() { + return new ListForkSyncStatusesResponse( + __httpStatusCode__, headers, etag, opcRequestId, forkSyncStatusCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",forkSyncStatusCollection=").append(String.valueOf(forkSyncStatusCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListForkSyncStatusesResponse)) { + return false; + } + + ListForkSyncStatusesResponse other = (ListForkSyncStatusesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.forkSyncStatusCollection, other.forkSyncStatusCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.forkSyncStatusCollection == null + ? 43 + : this.forkSyncStatusCollection.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListProjectCommitAnalyticsAuthorsResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListProjectCommitAnalyticsAuthorsResponse.java new file mode 100644 index 00000000000..c1c50712bfa --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListProjectCommitAnalyticsAuthorsResponse.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListProjectCommitAnalyticsAuthorsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned CommitAnalyticsAuthorCollection instance. + */ + private com.oracle.bmc.devops.model.CommitAnalyticsAuthorCollection + commitAnalyticsAuthorCollection; + + /** + * The returned CommitAnalyticsAuthorCollection instance. + * @return the value + */ + public com.oracle.bmc.devops.model.CommitAnalyticsAuthorCollection + getCommitAnalyticsAuthorCollection() { + return commitAnalyticsAuthorCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "commitAnalyticsAuthorCollection" + }) + private ListProjectCommitAnalyticsAuthorsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.devops.model.CommitAnalyticsAuthorCollection + commitAnalyticsAuthorCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.commitAnalyticsAuthorCollection = commitAnalyticsAuthorCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned CommitAnalyticsAuthorCollection instance. + */ + private com.oracle.bmc.devops.model.CommitAnalyticsAuthorCollection + commitAnalyticsAuthorCollection; + + /** + * The returned CommitAnalyticsAuthorCollection instance. + * @param commitAnalyticsAuthorCollection the value to set + * @return this builder + */ + public Builder commitAnalyticsAuthorCollection( + com.oracle.bmc.devops.model.CommitAnalyticsAuthorCollection + commitAnalyticsAuthorCollection) { + this.commitAnalyticsAuthorCollection = commitAnalyticsAuthorCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListProjectCommitAnalyticsAuthorsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + commitAnalyticsAuthorCollection(o.getCommitAnalyticsAuthorCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListProjectCommitAnalyticsAuthorsResponse build() { + return new ListProjectCommitAnalyticsAuthorsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + commitAnalyticsAuthorCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",commitAnalyticsAuthorCollection=") + .append(String.valueOf(commitAnalyticsAuthorCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListProjectCommitAnalyticsAuthorsResponse)) { + return false; + } + + ListProjectCommitAnalyticsAuthorsResponse other = + (ListProjectCommitAnalyticsAuthorsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.commitAnalyticsAuthorCollection, + other.commitAnalyticsAuthorCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.commitAnalyticsAuthorCollection == null + ? 43 + : this.commitAnalyticsAuthorCollection.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListProtectedBranchesResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListProtectedBranchesResponse.java new file mode 100644 index 00000000000..fcbbecd8783 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListProtectedBranchesResponse.java @@ -0,0 +1,208 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListProtectedBranchesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned ProtectedBranchCollection instance. + */ + private com.oracle.bmc.devops.model.ProtectedBranchCollection protectedBranchCollection; + + /** + * The returned ProtectedBranchCollection instance. + * @return the value + */ + public com.oracle.bmc.devops.model.ProtectedBranchCollection getProtectedBranchCollection() { + return protectedBranchCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "protectedBranchCollection" + }) + private ListProtectedBranchesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.devops.model.ProtectedBranchCollection protectedBranchCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.protectedBranchCollection = protectedBranchCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned ProtectedBranchCollection instance. + */ + private com.oracle.bmc.devops.model.ProtectedBranchCollection protectedBranchCollection; + + /** + * The returned ProtectedBranchCollection instance. + * @param protectedBranchCollection the value to set + * @return this builder + */ + public Builder protectedBranchCollection( + com.oracle.bmc.devops.model.ProtectedBranchCollection protectedBranchCollection) { + this.protectedBranchCollection = protectedBranchCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListProtectedBranchesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + protectedBranchCollection(o.getProtectedBranchCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListProtectedBranchesResponse build() { + return new ListProtectedBranchesResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + protectedBranchCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",protectedBranchCollection=").append(String.valueOf(protectedBranchCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListProtectedBranchesResponse)) { + return false; + } + + ListProtectedBranchesResponse other = (ListProtectedBranchesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.protectedBranchCollection, other.protectedBranchCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.protectedBranchCollection == null + ? 43 + : this.protectedBranchCollection.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestActivitiesResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestActivitiesResponse.java new file mode 100644 index 00000000000..406e2ec6cd2 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestActivitiesResponse.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestActivitiesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned PullRequestActivityCollection instance. + */ + private com.oracle.bmc.devops.model.PullRequestActivityCollection pullRequestActivityCollection; + + /** + * The returned PullRequestActivityCollection instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequestActivityCollection + getPullRequestActivityCollection() { + return pullRequestActivityCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "pullRequestActivityCollection" + }) + private ListPullRequestActivitiesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.devops.model.PullRequestActivityCollection + pullRequestActivityCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.pullRequestActivityCollection = pullRequestActivityCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned PullRequestActivityCollection instance. + */ + private com.oracle.bmc.devops.model.PullRequestActivityCollection + pullRequestActivityCollection; + + /** + * The returned PullRequestActivityCollection instance. + * @param pullRequestActivityCollection the value to set + * @return this builder + */ + public Builder pullRequestActivityCollection( + com.oracle.bmc.devops.model.PullRequestActivityCollection + pullRequestActivityCollection) { + this.pullRequestActivityCollection = pullRequestActivityCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPullRequestActivitiesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + pullRequestActivityCollection(o.getPullRequestActivityCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListPullRequestActivitiesResponse build() { + return new ListPullRequestActivitiesResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + pullRequestActivityCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",pullRequestActivityCollection=") + .append(String.valueOf(pullRequestActivityCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPullRequestActivitiesResponse)) { + return false; + } + + ListPullRequestActivitiesResponse other = (ListPullRequestActivitiesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.pullRequestActivityCollection, other.pullRequestActivityCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.pullRequestActivityCollection == null + ? 43 + : this.pullRequestActivityCollection.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestAttachmentsResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestAttachmentsResponse.java new file mode 100644 index 00000000000..9e3a2b3aedf --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestAttachmentsResponse.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestAttachmentsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned PullRequestAttachmentCollection instance. + */ + private com.oracle.bmc.devops.model.PullRequestAttachmentCollection + pullRequestAttachmentCollection; + + /** + * The returned PullRequestAttachmentCollection instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequestAttachmentCollection + getPullRequestAttachmentCollection() { + return pullRequestAttachmentCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "pullRequestAttachmentCollection" + }) + private ListPullRequestAttachmentsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.devops.model.PullRequestAttachmentCollection + pullRequestAttachmentCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.pullRequestAttachmentCollection = pullRequestAttachmentCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned PullRequestAttachmentCollection instance. + */ + private com.oracle.bmc.devops.model.PullRequestAttachmentCollection + pullRequestAttachmentCollection; + + /** + * The returned PullRequestAttachmentCollection instance. + * @param pullRequestAttachmentCollection the value to set + * @return this builder + */ + public Builder pullRequestAttachmentCollection( + com.oracle.bmc.devops.model.PullRequestAttachmentCollection + pullRequestAttachmentCollection) { + this.pullRequestAttachmentCollection = pullRequestAttachmentCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPullRequestAttachmentsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + pullRequestAttachmentCollection(o.getPullRequestAttachmentCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListPullRequestAttachmentsResponse build() { + return new ListPullRequestAttachmentsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + pullRequestAttachmentCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",pullRequestAttachmentCollection=") + .append(String.valueOf(pullRequestAttachmentCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPullRequestAttachmentsResponse)) { + return false; + } + + ListPullRequestAttachmentsResponse other = (ListPullRequestAttachmentsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.pullRequestAttachmentCollection, + other.pullRequestAttachmentCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.pullRequestAttachmentCollection == null + ? 43 + : this.pullRequestAttachmentCollection.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestAuthorsResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestAuthorsResponse.java new file mode 100644 index 00000000000..e746642514a --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestAuthorsResponse.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestAuthorsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned PullRequestAuthorCollection instance. + */ + private com.oracle.bmc.devops.model.PullRequestAuthorCollection pullRequestAuthorCollection; + + /** + * The returned PullRequestAuthorCollection instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequestAuthorCollection + getPullRequestAuthorCollection() { + return pullRequestAuthorCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "pullRequestAuthorCollection" + }) + private ListPullRequestAuthorsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.devops.model.PullRequestAuthorCollection pullRequestAuthorCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.pullRequestAuthorCollection = pullRequestAuthorCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned PullRequestAuthorCollection instance. + */ + private com.oracle.bmc.devops.model.PullRequestAuthorCollection pullRequestAuthorCollection; + + /** + * The returned PullRequestAuthorCollection instance. + * @param pullRequestAuthorCollection the value to set + * @return this builder + */ + public Builder pullRequestAuthorCollection( + com.oracle.bmc.devops.model.PullRequestAuthorCollection + pullRequestAuthorCollection) { + this.pullRequestAuthorCollection = pullRequestAuthorCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPullRequestAuthorsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + pullRequestAuthorCollection(o.getPullRequestAuthorCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListPullRequestAuthorsResponse build() { + return new ListPullRequestAuthorsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + pullRequestAuthorCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",pullRequestAuthorCollection=") + .append(String.valueOf(pullRequestAuthorCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPullRequestAuthorsResponse)) { + return false; + } + + ListPullRequestAuthorsResponse other = (ListPullRequestAuthorsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.pullRequestAuthorCollection, other.pullRequestAuthorCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.pullRequestAuthorCollection == null + ? 43 + : this.pullRequestAuthorCollection.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestCommentsResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestCommentsResponse.java new file mode 100644 index 00000000000..da75f3ed506 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestCommentsResponse.java @@ -0,0 +1,212 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestCommentsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned PullRequestCommentCollection instance. + */ + private com.oracle.bmc.devops.model.PullRequestCommentCollection pullRequestCommentCollection; + + /** + * The returned PullRequestCommentCollection instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequestCommentCollection + getPullRequestCommentCollection() { + return pullRequestCommentCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "pullRequestCommentCollection" + }) + private ListPullRequestCommentsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.devops.model.PullRequestCommentCollection pullRequestCommentCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.pullRequestCommentCollection = pullRequestCommentCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned PullRequestCommentCollection instance. + */ + private com.oracle.bmc.devops.model.PullRequestCommentCollection + pullRequestCommentCollection; + + /** + * The returned PullRequestCommentCollection instance. + * @param pullRequestCommentCollection the value to set + * @return this builder + */ + public Builder pullRequestCommentCollection( + com.oracle.bmc.devops.model.PullRequestCommentCollection + pullRequestCommentCollection) { + this.pullRequestCommentCollection = pullRequestCommentCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPullRequestCommentsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + pullRequestCommentCollection(o.getPullRequestCommentCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListPullRequestCommentsResponse build() { + return new ListPullRequestCommentsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + pullRequestCommentCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",pullRequestCommentCollection=") + .append(String.valueOf(pullRequestCommentCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPullRequestCommentsResponse)) { + return false; + } + + ListPullRequestCommentsResponse other = (ListPullRequestCommentsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.pullRequestCommentCollection, other.pullRequestCommentCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.pullRequestCommentCollection == null + ? 43 + : this.pullRequestCommentCollection.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestCommitsResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestCommitsResponse.java new file mode 100644 index 00000000000..be651a30faa --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestCommitsResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestCommitsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned RepositoryCommitCollection instance. + */ + private com.oracle.bmc.devops.model.RepositoryCommitCollection repositoryCommitCollection; + + /** + * The returned RepositoryCommitCollection instance. + * @return the value + */ + public com.oracle.bmc.devops.model.RepositoryCommitCollection getRepositoryCommitCollection() { + return repositoryCommitCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "repositoryCommitCollection" + }) + private ListPullRequestCommitsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.devops.model.RepositoryCommitCollection repositoryCommitCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.repositoryCommitCollection = repositoryCommitCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned RepositoryCommitCollection instance. + */ + private com.oracle.bmc.devops.model.RepositoryCommitCollection repositoryCommitCollection; + + /** + * The returned RepositoryCommitCollection instance. + * @param repositoryCommitCollection the value to set + * @return this builder + */ + public Builder repositoryCommitCollection( + com.oracle.bmc.devops.model.RepositoryCommitCollection repositoryCommitCollection) { + this.repositoryCommitCollection = repositoryCommitCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPullRequestCommitsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + repositoryCommitCollection(o.getRepositoryCommitCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListPullRequestCommitsResponse build() { + return new ListPullRequestCommitsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + repositoryCommitCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",repositoryCommitCollection=") + .append(String.valueOf(repositoryCommitCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPullRequestCommitsResponse)) { + return false; + } + + ListPullRequestCommitsResponse other = (ListPullRequestCommitsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.repositoryCommitCollection, other.repositoryCommitCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.repositoryCommitCollection == null + ? 43 + : this.repositoryCommitCollection.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestFileChangesResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestFileChangesResponse.java new file mode 100644 index 00000000000..81b8598e581 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestFileChangesResponse.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestFileChangesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned PullRequestFileChangeCollection instance. + */ + private com.oracle.bmc.devops.model.PullRequestFileChangeCollection + pullRequestFileChangeCollection; + + /** + * The returned PullRequestFileChangeCollection instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequestFileChangeCollection + getPullRequestFileChangeCollection() { + return pullRequestFileChangeCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "pullRequestFileChangeCollection" + }) + private ListPullRequestFileChangesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.devops.model.PullRequestFileChangeCollection + pullRequestFileChangeCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.pullRequestFileChangeCollection = pullRequestFileChangeCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned PullRequestFileChangeCollection instance. + */ + private com.oracle.bmc.devops.model.PullRequestFileChangeCollection + pullRequestFileChangeCollection; + + /** + * The returned PullRequestFileChangeCollection instance. + * @param pullRequestFileChangeCollection the value to set + * @return this builder + */ + public Builder pullRequestFileChangeCollection( + com.oracle.bmc.devops.model.PullRequestFileChangeCollection + pullRequestFileChangeCollection) { + this.pullRequestFileChangeCollection = pullRequestFileChangeCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPullRequestFileChangesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + pullRequestFileChangeCollection(o.getPullRequestFileChangeCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListPullRequestFileChangesResponse build() { + return new ListPullRequestFileChangesResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + pullRequestFileChangeCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",pullRequestFileChangeCollection=") + .append(String.valueOf(pullRequestFileChangeCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPullRequestFileChangesResponse)) { + return false; + } + + ListPullRequestFileChangesResponse other = (ListPullRequestFileChangesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.pullRequestFileChangeCollection, + other.pullRequestFileChangeCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.pullRequestFileChangeCollection == null + ? 43 + : this.pullRequestFileChangeCollection.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestsResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestsResponse.java new file mode 100644 index 00000000000..004714c64c1 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListPullRequestsResponse.java @@ -0,0 +1,204 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListPullRequestsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned PullRequestCollection instance. + */ + private com.oracle.bmc.devops.model.PullRequestCollection pullRequestCollection; + + /** + * The returned PullRequestCollection instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequestCollection getPullRequestCollection() { + return pullRequestCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "pullRequestCollection" + }) + private ListPullRequestsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.devops.model.PullRequestCollection pullRequestCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.pullRequestCollection = pullRequestCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned PullRequestCollection instance. + */ + private com.oracle.bmc.devops.model.PullRequestCollection pullRequestCollection; + + /** + * The returned PullRequestCollection instance. + * @param pullRequestCollection the value to set + * @return this builder + */ + public Builder pullRequestCollection( + com.oracle.bmc.devops.model.PullRequestCollection pullRequestCollection) { + this.pullRequestCollection = pullRequestCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPullRequestsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + pullRequestCollection(o.getPullRequestCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListPullRequestsResponse build() { + return new ListPullRequestsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, pullRequestCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",pullRequestCollection=").append(String.valueOf(pullRequestCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPullRequestsResponse)) { + return false; + } + + ListPullRequestsResponse other = (ListPullRequestsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.pullRequestCollection, other.pullRequestCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.pullRequestCollection == null + ? 43 + : this.pullRequestCollection.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListRepositoryCommitAnalyticsAuthorsResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListRepositoryCommitAnalyticsAuthorsResponse.java new file mode 100644 index 00000000000..837b3a07ae0 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ListRepositoryCommitAnalyticsAuthorsResponse.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ListRepositoryCommitAnalyticsAuthorsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned CommitAnalyticsAuthorCollection instance. + */ + private com.oracle.bmc.devops.model.CommitAnalyticsAuthorCollection + commitAnalyticsAuthorCollection; + + /** + * The returned CommitAnalyticsAuthorCollection instance. + * @return the value + */ + public com.oracle.bmc.devops.model.CommitAnalyticsAuthorCollection + getCommitAnalyticsAuthorCollection() { + return commitAnalyticsAuthorCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "commitAnalyticsAuthorCollection" + }) + private ListRepositoryCommitAnalyticsAuthorsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.devops.model.CommitAnalyticsAuthorCollection + commitAnalyticsAuthorCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.commitAnalyticsAuthorCollection = commitAnalyticsAuthorCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned CommitAnalyticsAuthorCollection instance. + */ + private com.oracle.bmc.devops.model.CommitAnalyticsAuthorCollection + commitAnalyticsAuthorCollection; + + /** + * The returned CommitAnalyticsAuthorCollection instance. + * @param commitAnalyticsAuthorCollection the value to set + * @return this builder + */ + public Builder commitAnalyticsAuthorCollection( + com.oracle.bmc.devops.model.CommitAnalyticsAuthorCollection + commitAnalyticsAuthorCollection) { + this.commitAnalyticsAuthorCollection = commitAnalyticsAuthorCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListRepositoryCommitAnalyticsAuthorsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + commitAnalyticsAuthorCollection(o.getCommitAnalyticsAuthorCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListRepositoryCommitAnalyticsAuthorsResponse build() { + return new ListRepositoryCommitAnalyticsAuthorsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + commitAnalyticsAuthorCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",commitAnalyticsAuthorCollection=") + .append(String.valueOf(commitAnalyticsAuthorCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListRepositoryCommitAnalyticsAuthorsResponse)) { + return false; + } + + ListRepositoryCommitAnalyticsAuthorsResponse other = + (ListRepositoryCommitAnalyticsAuthorsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.commitAnalyticsAuthorCollection, + other.commitAnalyticsAuthorCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.commitAnalyticsAuthorCollection == null + ? 43 + : this.commitAnalyticsAuthorCollection.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/MergePullRequestResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/MergePullRequestResponse.java new file mode 100644 index 00000000000..880aad420ba --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/MergePullRequestResponse.java @@ -0,0 +1,278 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class MergePullRequestResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Relative URL of the newly created resource. + */ + private String contentLocation; + + /** + * Relative URL of the newly created resource. + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned PullRequest instance. + */ + private com.oracle.bmc.devops.model.PullRequest pullRequest; + + /** + * The returned PullRequest instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequest getPullRequest() { + return pullRequest; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "contentLocation", + "etag", + "opcWorkRequestId", + "opcRequestId", + "pullRequest" + }) + private MergePullRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String contentLocation, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.devops.model.PullRequest pullRequest) { + super(__httpStatusCode__, headers); + this.contentLocation = contentLocation; + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.pullRequest = pullRequest; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Relative URL of the newly created resource. + */ + private String contentLocation; + + /** + * Relative URL of the newly created resource. + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned PullRequest instance. + */ + private com.oracle.bmc.devops.model.PullRequest pullRequest; + + /** + * The returned PullRequest instance. + * @param pullRequest the value to set + * @return this builder + */ + public Builder pullRequest(com.oracle.bmc.devops.model.PullRequest pullRequest) { + this.pullRequest = pullRequest; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(MergePullRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + pullRequest(o.getPullRequest()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public MergePullRequestResponse build() { + return new MergePullRequestResponse( + __httpStatusCode__, + headers, + contentLocation, + etag, + opcWorkRequestId, + opcRequestId, + pullRequest); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",pullRequest=").append(String.valueOf(pullRequest)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MergePullRequestResponse)) { + return false; + } + + MergePullRequestResponse other = (MergePullRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.pullRequest, other.pullRequest); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.pullRequest == null ? 43 : this.pullRequest.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/PatchPullRequestResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/PatchPullRequestResponse.java new file mode 100644 index 00000000000..0f22ef9350b --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/PatchPullRequestResponse.java @@ -0,0 +1,233 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class PatchPullRequestResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned PullRequest instance. + */ + private com.oracle.bmc.devops.model.PullRequest pullRequest; + + /** + * The returned PullRequest instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequest getPullRequest() { + return pullRequest; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "opcRequestId", + "etag", + "pullRequest" + }) + private PatchPullRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String opcRequestId, + String etag, + com.oracle.bmc.devops.model.PullRequest pullRequest) { + super(__httpStatusCode__, headers); + this.location = location; + this.opcRequestId = opcRequestId; + this.etag = etag; + this.pullRequest = pullRequest; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned PullRequest instance. + */ + private com.oracle.bmc.devops.model.PullRequest pullRequest; + + /** + * The returned PullRequest instance. + * @param pullRequest the value to set + * @return this builder + */ + public Builder pullRequest(com.oracle.bmc.devops.model.PullRequest pullRequest) { + this.pullRequest = pullRequest; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(PatchPullRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + pullRequest(o.getPullRequest()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public PatchPullRequestResponse build() { + return new PatchPullRequestResponse( + __httpStatusCode__, headers, location, opcRequestId, etag, pullRequest); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",pullRequest=").append(String.valueOf(pullRequest)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchPullRequestResponse)) { + return false; + } + + PatchPullRequestResponse other = (PatchPullRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.pullRequest, other.pullRequest); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.pullRequest == null ? 43 : this.pullRequest.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ReopenPullRequestResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ReopenPullRequestResponse.java new file mode 100644 index 00000000000..a427c8f9b16 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ReopenPullRequestResponse.java @@ -0,0 +1,233 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ReopenPullRequestResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned PullRequest instance. + */ + private com.oracle.bmc.devops.model.PullRequest pullRequest; + + /** + * The returned PullRequest instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequest getPullRequest() { + return pullRequest; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "opcRequestId", + "etag", + "pullRequest" + }) + private ReopenPullRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String opcRequestId, + String etag, + com.oracle.bmc.devops.model.PullRequest pullRequest) { + super(__httpStatusCode__, headers); + this.location = location; + this.opcRequestId = opcRequestId; + this.etag = etag; + this.pullRequest = pullRequest; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned PullRequest instance. + */ + private com.oracle.bmc.devops.model.PullRequest pullRequest; + + /** + * The returned PullRequest instance. + * @param pullRequest the value to set + * @return this builder + */ + public Builder pullRequest(com.oracle.bmc.devops.model.PullRequest pullRequest) { + this.pullRequest = pullRequest; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ReopenPullRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + pullRequest(o.getPullRequest()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ReopenPullRequestResponse build() { + return new ReopenPullRequestResponse( + __httpStatusCode__, headers, location, opcRequestId, etag, pullRequest); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",pullRequest=").append(String.valueOf(pullRequest)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ReopenPullRequestResponse)) { + return false; + } + + ReopenPullRequestResponse other = (ReopenPullRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.pullRequest, other.pullRequest); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.pullRequest == null ? 43 : this.pullRequest.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ReviewPullRequestResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ReviewPullRequestResponse.java new file mode 100644 index 00000000000..2d6702ab533 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/ReviewPullRequestResponse.java @@ -0,0 +1,233 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class ReviewPullRequestResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned PullRequest instance. + */ + private com.oracle.bmc.devops.model.PullRequest pullRequest; + + /** + * The returned PullRequest instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequest getPullRequest() { + return pullRequest; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "opcRequestId", + "etag", + "pullRequest" + }) + private ReviewPullRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String opcRequestId, + String etag, + com.oracle.bmc.devops.model.PullRequest pullRequest) { + super(__httpStatusCode__, headers); + this.location = location; + this.opcRequestId = opcRequestId; + this.etag = etag; + this.pullRequest = pullRequest; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned PullRequest instance. + */ + private com.oracle.bmc.devops.model.PullRequest pullRequest; + + /** + * The returned PullRequest instance. + * @param pullRequest the value to set + * @return this builder + */ + public Builder pullRequest(com.oracle.bmc.devops.model.PullRequest pullRequest) { + this.pullRequest = pullRequest; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ReviewPullRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + pullRequest(o.getPullRequest()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ReviewPullRequestResponse build() { + return new ReviewPullRequestResponse( + __httpStatusCode__, headers, location, opcRequestId, etag, pullRequest); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",pullRequest=").append(String.valueOf(pullRequest)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ReviewPullRequestResponse)) { + return false; + } + + ReviewPullRequestResponse other = (ReviewPullRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.pullRequest, other.pullRequest); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.pullRequest == null ? 43 : this.pullRequest.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/SummarizeProjectRepositoryAnalyticsResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/SummarizeProjectRepositoryAnalyticsResponse.java new file mode 100644 index 00000000000..f49aa48826a --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/SummarizeProjectRepositoryAnalyticsResponse.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class SummarizeProjectRepositoryAnalyticsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned RepositoryMetricAggregation instance. + */ + private com.oracle.bmc.devops.model.RepositoryMetricAggregation repositoryMetricAggregation; + + /** + * The returned RepositoryMetricAggregation instance. + * @return the value + */ + public com.oracle.bmc.devops.model.RepositoryMetricAggregation + getRepositoryMetricAggregation() { + return repositoryMetricAggregation; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "repositoryMetricAggregation" + }) + private SummarizeProjectRepositoryAnalyticsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.devops.model.RepositoryMetricAggregation repositoryMetricAggregation) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.repositoryMetricAggregation = repositoryMetricAggregation; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned RepositoryMetricAggregation instance. + */ + private com.oracle.bmc.devops.model.RepositoryMetricAggregation repositoryMetricAggregation; + + /** + * The returned RepositoryMetricAggregation instance. + * @param repositoryMetricAggregation the value to set + * @return this builder + */ + public Builder repositoryMetricAggregation( + com.oracle.bmc.devops.model.RepositoryMetricAggregation + repositoryMetricAggregation) { + this.repositoryMetricAggregation = repositoryMetricAggregation; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SummarizeProjectRepositoryAnalyticsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + repositoryMetricAggregation(o.getRepositoryMetricAggregation()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public SummarizeProjectRepositoryAnalyticsResponse build() { + return new SummarizeProjectRepositoryAnalyticsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + repositoryMetricAggregation); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",repositoryMetricAggregation=") + .append(String.valueOf(repositoryMetricAggregation)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SummarizeProjectRepositoryAnalyticsResponse)) { + return false; + } + + SummarizeProjectRepositoryAnalyticsResponse other = + (SummarizeProjectRepositoryAnalyticsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.repositoryMetricAggregation, other.repositoryMetricAggregation); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.repositoryMetricAggregation == null + ? 43 + : this.repositoryMetricAggregation.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/SummarizeRepositoryAnalyticsResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/SummarizeRepositoryAnalyticsResponse.java new file mode 100644 index 00000000000..177aa6a8672 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/SummarizeRepositoryAnalyticsResponse.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class SummarizeRepositoryAnalyticsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned RepositoryMetricAggregation instance. + */ + private com.oracle.bmc.devops.model.RepositoryMetricAggregation repositoryMetricAggregation; + + /** + * The returned RepositoryMetricAggregation instance. + * @return the value + */ + public com.oracle.bmc.devops.model.RepositoryMetricAggregation + getRepositoryMetricAggregation() { + return repositoryMetricAggregation; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "repositoryMetricAggregation" + }) + private SummarizeRepositoryAnalyticsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.devops.model.RepositoryMetricAggregation repositoryMetricAggregation) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.repositoryMetricAggregation = repositoryMetricAggregation; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned RepositoryMetricAggregation instance. + */ + private com.oracle.bmc.devops.model.RepositoryMetricAggregation repositoryMetricAggregation; + + /** + * The returned RepositoryMetricAggregation instance. + * @param repositoryMetricAggregation the value to set + * @return this builder + */ + public Builder repositoryMetricAggregation( + com.oracle.bmc.devops.model.RepositoryMetricAggregation + repositoryMetricAggregation) { + this.repositoryMetricAggregation = repositoryMetricAggregation; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SummarizeRepositoryAnalyticsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + repositoryMetricAggregation(o.getRepositoryMetricAggregation()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public SummarizeRepositoryAnalyticsResponse build() { + return new SummarizeRepositoryAnalyticsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + repositoryMetricAggregation); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",repositoryMetricAggregation=") + .append(String.valueOf(repositoryMetricAggregation)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SummarizeRepositoryAnalyticsResponse)) { + return false; + } + + SummarizeRepositoryAnalyticsResponse other = (SummarizeRepositoryAnalyticsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.repositoryMetricAggregation, other.repositoryMetricAggregation); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.repositoryMetricAggregation == null + ? 43 + : this.repositoryMetricAggregation.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/SyncRepositoryResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/SyncRepositoryResponse.java new file mode 100644 index 00000000000..e230f8597be --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/SyncRepositoryResponse.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class SyncRepositoryResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private SyncRepositoryResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SyncRepositoryResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public SyncRepositoryResponse build() { + return new SyncRepositoryResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SyncRepositoryResponse)) { + return false; + } + + SyncRepositoryResponse other = (SyncRepositoryResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UnlikePullRequestCommentResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UnlikePullRequestCommentResponse.java new file mode 100644 index 00000000000..35180ff14ae --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UnlikePullRequestCommentResponse.java @@ -0,0 +1,203 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UnlikePullRequestCommentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned PullRequestComment instance. + */ + private com.oracle.bmc.devops.model.PullRequestComment pullRequestComment; + + /** + * The returned PullRequestComment instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequestComment getPullRequestComment() { + return pullRequestComment; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "pullRequestComment" + }) + private UnlikePullRequestCommentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.devops.model.PullRequestComment pullRequestComment) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.pullRequestComment = pullRequestComment; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned PullRequestComment instance. + */ + private com.oracle.bmc.devops.model.PullRequestComment pullRequestComment; + + /** + * The returned PullRequestComment instance. + * @param pullRequestComment the value to set + * @return this builder + */ + public Builder pullRequestComment( + com.oracle.bmc.devops.model.PullRequestComment pullRequestComment) { + this.pullRequestComment = pullRequestComment; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UnlikePullRequestCommentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + pullRequestComment(o.getPullRequestComment()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UnlikePullRequestCommentResponse build() { + return new UnlikePullRequestCommentResponse( + __httpStatusCode__, headers, opcRequestId, etag, pullRequestComment); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",pullRequestComment=").append(String.valueOf(pullRequestComment)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UnlikePullRequestCommentResponse)) { + return false; + } + + UnlikePullRequestCommentResponse other = (UnlikePullRequestCommentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.pullRequestComment, other.pullRequestComment); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.pullRequestComment == null + ? 43 + : this.pullRequestComment.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UnsubscribePullRequestResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UnsubscribePullRequestResponse.java new file mode 100644 index 00000000000..74812111b27 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UnsubscribePullRequestResponse.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UnsubscribePullRequestResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Relative URL of the newly created resource. + */ + private String contentLocation; + + /** + * Relative URL of the newly created resource. + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned java.io.InputStream instance. + */ + private java.io.InputStream inputStream; + + /** + * The returned java.io.InputStream instance. + * @return the value + */ + public java.io.InputStream getInputStream() { + return inputStream; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "contentLocation", + "etag", + "opcRequestId", + "inputStream" + }) + private UnsubscribePullRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String contentLocation, + String etag, + String opcRequestId, + java.io.InputStream inputStream) { + super(__httpStatusCode__, headers); + this.contentLocation = contentLocation; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.inputStream = inputStream; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Relative URL of the newly created resource. + */ + private String contentLocation; + + /** + * Relative URL of the newly created resource. + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned java.io.InputStream instance. + */ + private java.io.InputStream inputStream; + + /** + * The returned java.io.InputStream instance. + * @param inputStream the value to set + * @return this builder + */ + public Builder inputStream(java.io.InputStream inputStream) { + this.inputStream = inputStream; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UnsubscribePullRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + inputStream(o.getInputStream()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UnsubscribePullRequestResponse build() { + return new UnsubscribePullRequestResponse( + __httpStatusCode__, headers, contentLocation, etag, opcRequestId, inputStream); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",inputStream=").append(String.valueOf(inputStream)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UnsubscribePullRequestResponse)) { + return false; + } + + UnsubscribePullRequestResponse other = (UnsubscribePullRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.inputStream, other.inputStream); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.inputStream == null ? 43 : this.inputStream.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdateProjectNotificationPreferenceResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdateProjectNotificationPreferenceResponse.java new file mode 100644 index 00000000000..c6a9609de23 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdateProjectNotificationPreferenceResponse.java @@ -0,0 +1,251 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdateProjectNotificationPreferenceResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ProjectNotificationPreference instance. + */ + private com.oracle.bmc.devops.model.ProjectNotificationPreference projectNotificationPreference; + + /** + * The returned ProjectNotificationPreference instance. + * @return the value + */ + public com.oracle.bmc.devops.model.ProjectNotificationPreference + getProjectNotificationPreference() { + return projectNotificationPreference; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "etag", + "opcRequestId", + "projectNotificationPreference" + }) + private UpdateProjectNotificationPreferenceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String etag, + String opcRequestId, + com.oracle.bmc.devops.model.ProjectNotificationPreference + projectNotificationPreference) { + super(__httpStatusCode__, headers); + this.location = location; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.projectNotificationPreference = projectNotificationPreference; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ProjectNotificationPreference instance. + */ + private com.oracle.bmc.devops.model.ProjectNotificationPreference + projectNotificationPreference; + + /** + * The returned ProjectNotificationPreference instance. + * @param projectNotificationPreference the value to set + * @return this builder + */ + public Builder projectNotificationPreference( + com.oracle.bmc.devops.model.ProjectNotificationPreference + projectNotificationPreference) { + this.projectNotificationPreference = projectNotificationPreference; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateProjectNotificationPreferenceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + projectNotificationPreference(o.getProjectNotificationPreference()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateProjectNotificationPreferenceResponse build() { + return new UpdateProjectNotificationPreferenceResponse( + __httpStatusCode__, + headers, + location, + etag, + opcRequestId, + projectNotificationPreference); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",projectNotificationPreference=") + .append(String.valueOf(projectNotificationPreference)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateProjectNotificationPreferenceResponse)) { + return false; + } + + UpdateProjectNotificationPreferenceResponse other = + (UpdateProjectNotificationPreferenceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.projectNotificationPreference, other.projectNotificationPreference); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.projectNotificationPreference == null + ? 43 + : this.projectNotificationPreference.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdateProjectRepositorySettingsResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdateProjectRepositorySettingsResponse.java new file mode 100644 index 00000000000..994903b6b13 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdateProjectRepositorySettingsResponse.java @@ -0,0 +1,244 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdateProjectRepositorySettingsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ProjectRepositorySettings instance. + */ + private com.oracle.bmc.devops.model.ProjectRepositorySettings projectRepositorySettings; + + /** + * The returned ProjectRepositorySettings instance. + * @return the value + */ + public com.oracle.bmc.devops.model.ProjectRepositorySettings getProjectRepositorySettings() { + return projectRepositorySettings; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "etag", + "opcRequestId", + "projectRepositorySettings" + }) + private UpdateProjectRepositorySettingsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String etag, + String opcRequestId, + com.oracle.bmc.devops.model.ProjectRepositorySettings projectRepositorySettings) { + super(__httpStatusCode__, headers); + this.location = location; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.projectRepositorySettings = projectRepositorySettings; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ProjectRepositorySettings instance. + */ + private com.oracle.bmc.devops.model.ProjectRepositorySettings projectRepositorySettings; + + /** + * The returned ProjectRepositorySettings instance. + * @param projectRepositorySettings the value to set + * @return this builder + */ + public Builder projectRepositorySettings( + com.oracle.bmc.devops.model.ProjectRepositorySettings projectRepositorySettings) { + this.projectRepositorySettings = projectRepositorySettings; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateProjectRepositorySettingsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + projectRepositorySettings(o.getProjectRepositorySettings()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateProjectRepositorySettingsResponse build() { + return new UpdateProjectRepositorySettingsResponse( + __httpStatusCode__, + headers, + location, + etag, + opcRequestId, + projectRepositorySettings); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",projectRepositorySettings=").append(String.valueOf(projectRepositorySettings)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateProjectRepositorySettingsResponse)) { + return false; + } + + UpdateProjectRepositorySettingsResponse other = (UpdateProjectRepositorySettingsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.projectRepositorySettings, other.projectRepositorySettings); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.projectRepositorySettings == null + ? 43 + : this.projectRepositorySettings.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdatePullRequestCommentResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdatePullRequestCommentResponse.java new file mode 100644 index 00000000000..eab972d8d52 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdatePullRequestCommentResponse.java @@ -0,0 +1,203 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdatePullRequestCommentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned PullRequestComment instance. + */ + private com.oracle.bmc.devops.model.PullRequestComment pullRequestComment; + + /** + * The returned PullRequestComment instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequestComment getPullRequestComment() { + return pullRequestComment; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "pullRequestComment" + }) + private UpdatePullRequestCommentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.devops.model.PullRequestComment pullRequestComment) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.pullRequestComment = pullRequestComment; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned PullRequestComment instance. + */ + private com.oracle.bmc.devops.model.PullRequestComment pullRequestComment; + + /** + * The returned PullRequestComment instance. + * @param pullRequestComment the value to set + * @return this builder + */ + public Builder pullRequestComment( + com.oracle.bmc.devops.model.PullRequestComment pullRequestComment) { + this.pullRequestComment = pullRequestComment; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdatePullRequestCommentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + pullRequestComment(o.getPullRequestComment()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdatePullRequestCommentResponse build() { + return new UpdatePullRequestCommentResponse( + __httpStatusCode__, headers, etag, opcRequestId, pullRequestComment); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",pullRequestComment=").append(String.valueOf(pullRequestComment)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePullRequestCommentResponse)) { + return false; + } + + UpdatePullRequestCommentResponse other = (UpdatePullRequestCommentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.pullRequestComment, other.pullRequestComment); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.pullRequestComment == null + ? 43 + : this.pullRequestComment.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdatePullRequestNotificationPreferenceResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdatePullRequestNotificationPreferenceResponse.java new file mode 100644 index 00000000000..6f9cf6425ef --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdatePullRequestNotificationPreferenceResponse.java @@ -0,0 +1,253 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdatePullRequestNotificationPreferenceResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned PullRequestNotificationPreference instance. + */ + private com.oracle.bmc.devops.model.PullRequestNotificationPreference + pullRequestNotificationPreference; + + /** + * The returned PullRequestNotificationPreference instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequestNotificationPreference + getPullRequestNotificationPreference() { + return pullRequestNotificationPreference; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "etag", + "opcRequestId", + "pullRequestNotificationPreference" + }) + private UpdatePullRequestNotificationPreferenceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String etag, + String opcRequestId, + com.oracle.bmc.devops.model.PullRequestNotificationPreference + pullRequestNotificationPreference) { + super(__httpStatusCode__, headers); + this.location = location; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.pullRequestNotificationPreference = pullRequestNotificationPreference; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned PullRequestNotificationPreference instance. + */ + private com.oracle.bmc.devops.model.PullRequestNotificationPreference + pullRequestNotificationPreference; + + /** + * The returned PullRequestNotificationPreference instance. + * @param pullRequestNotificationPreference the value to set + * @return this builder + */ + public Builder pullRequestNotificationPreference( + com.oracle.bmc.devops.model.PullRequestNotificationPreference + pullRequestNotificationPreference) { + this.pullRequestNotificationPreference = pullRequestNotificationPreference; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdatePullRequestNotificationPreferenceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + pullRequestNotificationPreference(o.getPullRequestNotificationPreference()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdatePullRequestNotificationPreferenceResponse build() { + return new UpdatePullRequestNotificationPreferenceResponse( + __httpStatusCode__, + headers, + location, + etag, + opcRequestId, + pullRequestNotificationPreference); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",pullRequestNotificationPreference=") + .append(String.valueOf(pullRequestNotificationPreference)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePullRequestNotificationPreferenceResponse)) { + return false; + } + + UpdatePullRequestNotificationPreferenceResponse other = + (UpdatePullRequestNotificationPreferenceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.pullRequestNotificationPreference, + other.pullRequestNotificationPreference); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.pullRequestNotificationPreference == null + ? 43 + : this.pullRequestNotificationPreference.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdatePullRequestResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdatePullRequestResponse.java new file mode 100644 index 00000000000..4de2ef50a5c --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdatePullRequestResponse.java @@ -0,0 +1,278 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdatePullRequestResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Relative URL of the newly created resource. + */ + private String contentLocation; + + /** + * Relative URL of the newly created resource. + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned PullRequest instance. + */ + private com.oracle.bmc.devops.model.PullRequest pullRequest; + + /** + * The returned PullRequest instance. + * @return the value + */ + public com.oracle.bmc.devops.model.PullRequest getPullRequest() { + return pullRequest; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "contentLocation", + "etag", + "opcWorkRequestId", + "opcRequestId", + "pullRequest" + }) + private UpdatePullRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String contentLocation, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.devops.model.PullRequest pullRequest) { + super(__httpStatusCode__, headers); + this.contentLocation = contentLocation; + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.pullRequest = pullRequest; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Relative URL of the newly created resource. + */ + private String contentLocation; + + /** + * Relative URL of the newly created resource. + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned PullRequest instance. + */ + private com.oracle.bmc.devops.model.PullRequest pullRequest; + + /** + * The returned PullRequest instance. + * @param pullRequest the value to set + * @return this builder + */ + public Builder pullRequest(com.oracle.bmc.devops.model.PullRequest pullRequest) { + this.pullRequest = pullRequest; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdatePullRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + pullRequest(o.getPullRequest()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdatePullRequestResponse build() { + return new UpdatePullRequestResponse( + __httpStatusCode__, + headers, + contentLocation, + etag, + opcWorkRequestId, + opcRequestId, + pullRequest); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",pullRequest=").append(String.valueOf(pullRequest)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePullRequestResponse)) { + return false; + } + + UpdatePullRequestResponse other = (UpdatePullRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.pullRequest, other.pullRequest); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.pullRequest == null ? 43 : this.pullRequest.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdateRepositoryNotificationPreferenceResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdateRepositoryNotificationPreferenceResponse.java new file mode 100644 index 00000000000..e82e53e8436 --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdateRepositoryNotificationPreferenceResponse.java @@ -0,0 +1,253 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdateRepositoryNotificationPreferenceResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned RepositoryNotificationPreference instance. + */ + private com.oracle.bmc.devops.model.RepositoryNotificationPreference + repositoryNotificationPreference; + + /** + * The returned RepositoryNotificationPreference instance. + * @return the value + */ + public com.oracle.bmc.devops.model.RepositoryNotificationPreference + getRepositoryNotificationPreference() { + return repositoryNotificationPreference; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "etag", + "opcRequestId", + "repositoryNotificationPreference" + }) + private UpdateRepositoryNotificationPreferenceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String etag, + String opcRequestId, + com.oracle.bmc.devops.model.RepositoryNotificationPreference + repositoryNotificationPreference) { + super(__httpStatusCode__, headers); + this.location = location; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.repositoryNotificationPreference = repositoryNotificationPreference; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned RepositoryNotificationPreference instance. + */ + private com.oracle.bmc.devops.model.RepositoryNotificationPreference + repositoryNotificationPreference; + + /** + * The returned RepositoryNotificationPreference instance. + * @param repositoryNotificationPreference the value to set + * @return this builder + */ + public Builder repositoryNotificationPreference( + com.oracle.bmc.devops.model.RepositoryNotificationPreference + repositoryNotificationPreference) { + this.repositoryNotificationPreference = repositoryNotificationPreference; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateRepositoryNotificationPreferenceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + repositoryNotificationPreference(o.getRepositoryNotificationPreference()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateRepositoryNotificationPreferenceResponse build() { + return new UpdateRepositoryNotificationPreferenceResponse( + __httpStatusCode__, + headers, + location, + etag, + opcRequestId, + repositoryNotificationPreference); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",repositoryNotificationPreference=") + .append(String.valueOf(repositoryNotificationPreference)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateRepositoryNotificationPreferenceResponse)) { + return false; + } + + UpdateRepositoryNotificationPreferenceResponse other = + (UpdateRepositoryNotificationPreferenceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.repositoryNotificationPreference, + other.repositoryNotificationPreference); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.repositoryNotificationPreference == null + ? 43 + : this.repositoryNotificationPreference.hashCode()); + return result; + } +} diff --git a/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdateRepositorySettingsResponse.java b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdateRepositorySettingsResponse.java new file mode 100644 index 00000000000..23d6f6a023f --- /dev/null +++ b/bmc-devops/src/main/java/com/oracle/bmc/devops/responses/UpdateRepositorySettingsResponse.java @@ -0,0 +1,238 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.devops.responses; + +import com.oracle.bmc.devops.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210630") +public class UpdateRepositorySettingsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned RepositorySettings instance. + */ + private com.oracle.bmc.devops.model.RepositorySettings repositorySettings; + + /** + * The returned RepositorySettings instance. + * @return the value + */ + public com.oracle.bmc.devops.model.RepositorySettings getRepositorySettings() { + return repositorySettings; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "etag", + "opcRequestId", + "repositorySettings" + }) + private UpdateRepositorySettingsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String etag, + String opcRequestId, + com.oracle.bmc.devops.model.RepositorySettings repositorySettings) { + super(__httpStatusCode__, headers); + this.location = location; + this.etag = etag; + this.opcRequestId = opcRequestId; + this.repositorySettings = repositorySettings; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Relative URL of the newly created resource. + */ + private String location; + + /** + * Relative URL of the newly created resource. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned RepositorySettings instance. + */ + private com.oracle.bmc.devops.model.RepositorySettings repositorySettings; + + /** + * The returned RepositorySettings instance. + * @param repositorySettings the value to set + * @return this builder + */ + public Builder repositorySettings( + com.oracle.bmc.devops.model.RepositorySettings repositorySettings) { + this.repositorySettings = repositorySettings; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateRepositorySettingsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + repositorySettings(o.getRepositorySettings()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateRepositorySettingsResponse build() { + return new UpdateRepositorySettingsResponse( + __httpStatusCode__, headers, location, etag, opcRequestId, repositorySettings); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",repositorySettings=").append(String.valueOf(repositorySettings)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateRepositorySettingsResponse)) { + return false; + } + + UpdateRepositorySettingsResponse other = (UpdateRepositorySettingsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.repositorySettings, other.repositorySettings); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.repositorySettings == null + ? 43 + : this.repositorySettings.hashCode()); + return result; + } +} diff --git a/bmc-disasterrecovery/pom.xml b/bmc-disasterrecovery/pom.xml index b108caf21cf..0419545dfdb 100644 --- a/bmc-disasterrecovery/pom.xml +++ b/bmc-disasterrecovery/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-disasterrecovery @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/DisasterRecovery.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/DisasterRecovery.java index 1b499b2dae6..3d3f44dfc1c 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/DisasterRecovery.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/DisasterRecovery.java @@ -349,6 +349,18 @@ DisassociateDrProtectionGroupResponse disassociateDrProtectionGroup( */ PauseDrPlanExecutionResponse pauseDrPlanExecution(PauseDrPlanExecutionRequest request); + /** + * Refresh DR Plan identified by *drPlanId*. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RefreshDrPlan API. + */ + RefreshDrPlanResponse refreshDrPlan(RefreshDrPlanRequest request); + /** * Resume the DR plan execution identified by *drPlanExecutionId*. * @param request The request object containing the details to send @@ -422,6 +434,18 @@ DisassociateDrProtectionGroupResponse disassociateDrProtectionGroup( UpdateDrProtectionGroupRoleResponse updateDrProtectionGroupRole( UpdateDrProtectionGroupRoleRequest request); + /** + * Verify DR Plan identified by *drPlanId*. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use VerifyDrPlan API. + */ + VerifyDrPlanResponse verifyDrPlan(VerifyDrPlanRequest request); + /** * Gets the pre-configured waiters available for resources for this service. * diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/DisasterRecoveryAsync.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/DisasterRecoveryAsync.java index 41230393484..13bfc5279bb 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/DisasterRecoveryAsync.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/DisasterRecoveryAsync.java @@ -433,6 +433,21 @@ java.util.concurrent.Future pauseDrPlanExecution( PauseDrPlanExecutionRequest, PauseDrPlanExecutionResponse> handler); + /** + * Refresh DR Plan identified by *drPlanId*. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future refreshDrPlan( + RefreshDrPlanRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Resume the DR plan execution identified by *drPlanExecutionId*. * @@ -527,4 +542,19 @@ java.util.concurrent.Future updateDrProtect com.oracle.bmc.responses.AsyncHandler< UpdateDrProtectionGroupRoleRequest, UpdateDrProtectionGroupRoleResponse> handler); + + /** + * Verify DR Plan identified by *drPlanId*. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future verifyDrPlan( + VerifyDrPlanRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); } diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/DisasterRecoveryAsyncClient.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/DisasterRecoveryAsyncClient.java index 226a647eb72..6a500beaa8b 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/DisasterRecoveryAsyncClient.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/DisasterRecoveryAsyncClient.java @@ -1591,6 +1591,56 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future refreshDrPlan( + RefreshDrPlanRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async refreshDrPlan"); + final RefreshDrPlanRequest interceptedRequest = + RefreshDrPlanConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RefreshDrPlanConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DisasterRecovery", + "RefreshDrPlan", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/disaster-recovery/20220125/DrPlan/RefreshDrPlan"); + final java.util.function.Function + transformer = + RefreshDrPlanConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RefreshDrPlanRequest, RefreshDrPlanResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRefreshDrPlanDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RefreshDrPlanRequest, RefreshDrPlanResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future resumeDrPlanExecution( ResumeDrPlanExecutionRequest request, @@ -1907,4 +1957,54 @@ protected void beforeRetryAction() {} return futureSupplier.apply(handlerToUse); } } + + @Override + public java.util.concurrent.Future verifyDrPlan( + VerifyDrPlanRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async verifyDrPlan"); + final VerifyDrPlanRequest interceptedRequest = + VerifyDrPlanConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + VerifyDrPlanConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DisasterRecovery", + "VerifyDrPlan", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/disaster-recovery/20220125/DrPlan/VerifyDrPlan"); + final java.util.function.Function + transformer = + VerifyDrPlanConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + VerifyDrPlanRequest, VerifyDrPlanResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getVerifyDrPlanDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + VerifyDrPlanRequest, VerifyDrPlanResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } } diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/DisasterRecoveryClient.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/DisasterRecoveryClient.java index e9766b21bd2..ba26a00d9b5 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/DisasterRecoveryClient.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/DisasterRecoveryClient.java @@ -1453,6 +1453,46 @@ public PauseDrPlanExecutionResponse pauseDrPlanExecution(PauseDrPlanExecutionReq }); } + @Override + public RefreshDrPlanResponse refreshDrPlan(RefreshDrPlanRequest request) { + LOG.trace("Called refreshDrPlan"); + final RefreshDrPlanRequest interceptedRequest = + RefreshDrPlanConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RefreshDrPlanConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DisasterRecovery", + "RefreshDrPlan", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/disaster-recovery/20220125/DrPlan/RefreshDrPlan"); + java.util.function.Function transformer = + RefreshDrPlanConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getRefreshDrPlanDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ResumeDrPlanExecutionResponse resumeDrPlanExecution( ResumeDrPlanExecutionRequest request) { @@ -1705,6 +1745,46 @@ public UpdateDrProtectionGroupRoleResponse updateDrProtectionGroupRole( }); } + @Override + public VerifyDrPlanResponse verifyDrPlan(VerifyDrPlanRequest request) { + LOG.trace("Called verifyDrPlan"); + final VerifyDrPlanRequest interceptedRequest = + VerifyDrPlanConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + VerifyDrPlanConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DisasterRecovery", + "VerifyDrPlan", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/disaster-recovery/20220125/DrPlan/VerifyDrPlan"); + java.util.function.Function transformer = + VerifyDrPlanConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getVerifyDrPlanDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DisasterRecoveryWaiters getWaiters() { return waiters; diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/internal/http/ListDrPlanExecutionsConverter.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/internal/http/ListDrPlanExecutionsConverter.java index 77a19f09928..02840154585 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/internal/http/ListDrPlanExecutionsConverter.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/internal/http/ListDrPlanExecutionsConverter.java @@ -57,14 +57,6 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getDrPlanExecutionId())); } - if (request.getDrPlanExecutionType() != null) { - target = - target.queryParam( - "drPlanExecutionType", - com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( - request.getDrPlanExecutionType().getValue())); - } - if (request.getDisplayName() != null) { target = target.queryParam( diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/internal/http/ListDrPlansConverter.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/internal/http/ListDrPlansConverter.java index bec035c320c..a980665134d 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/internal/http/ListDrPlansConverter.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/internal/http/ListDrPlansConverter.java @@ -104,6 +104,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getSortBy().getValue())); } + if (request.getLifecycleSubState() != null) { + target = + target.queryParam( + "lifecycleSubState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleSubState().getValue())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/internal/http/RefreshDrPlanConverter.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/internal/http/RefreshDrPlanConverter.java new file mode 100644 index 00000000000..72b1565fd20 --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/internal/http/RefreshDrPlanConverter.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.disasterrecovery.model.*; +import com.oracle.bmc.disasterrecovery.requests.*; +import com.oracle.bmc.disasterrecovery.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +public class RefreshDrPlanConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RefreshDrPlanConverter.class); + + public static com.oracle.bmc.disasterrecovery.requests.RefreshDrPlanRequest interceptRequest( + com.oracle.bmc.disasterrecovery.requests.RefreshDrPlanRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.disasterrecovery.requests.RefreshDrPlanRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getRefreshDrPlanDetails(), "refreshDrPlanDetails is required"); + Validate.notBlank(request.getDrPlanId(), "drPlanId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220125") + .path("drPlans") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDrPlanId())) + .path("actions") + .path("refresh"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.disasterrecovery.responses.RefreshDrPlanResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.disasterrecovery.responses.RefreshDrPlanResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.disasterrecovery.responses.RefreshDrPlanResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.disasterrecovery.responses.RefreshDrPlanResponse>() { + @Override + public com.oracle.bmc.disasterrecovery.responses.RefreshDrPlanResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.disasterrecovery.responses.RefreshDrPlanResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.disasterrecovery.responses.RefreshDrPlanResponse + .Builder + builder = + com.oracle.bmc.disasterrecovery.responses + .RefreshDrPlanResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.disasterrecovery.responses.RefreshDrPlanResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/internal/http/VerifyDrPlanConverter.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/internal/http/VerifyDrPlanConverter.java new file mode 100644 index 00000000000..b50fbcffc14 --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/internal/http/VerifyDrPlanConverter.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.disasterrecovery.model.*; +import com.oracle.bmc.disasterrecovery.requests.*; +import com.oracle.bmc.disasterrecovery.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +public class VerifyDrPlanConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(VerifyDrPlanConverter.class); + + public static com.oracle.bmc.disasterrecovery.requests.VerifyDrPlanRequest interceptRequest( + com.oracle.bmc.disasterrecovery.requests.VerifyDrPlanRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.disasterrecovery.requests.VerifyDrPlanRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getVerifyDrPlanDetails(), "verifyDrPlanDetails is required"); + Validate.notBlank(request.getDrPlanId(), "drPlanId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220125") + .path("drPlans") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDrPlanId())) + .path("actions") + .path("verify"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.disasterrecovery.responses.VerifyDrPlanResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.disasterrecovery.responses.VerifyDrPlanResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.disasterrecovery.responses.VerifyDrPlanResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.disasterrecovery.responses.VerifyDrPlanResponse>() { + @Override + public com.oracle.bmc.disasterrecovery.responses.VerifyDrPlanResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.disasterrecovery.responses.VerifyDrPlanResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.disasterrecovery.responses.VerifyDrPlanResponse + .Builder + builder = + com.oracle.bmc.disasterrecovery.responses + .VerifyDrPlanResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.disasterrecovery.responses.VerifyDrPlanResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/AutonomousContainerDatabaseSnapshotStandbyConnectionStringType.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/AutonomousContainerDatabaseSnapshotStandbyConnectionStringType.java new file mode 100644 index 00000000000..42966e5f1c0 --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/AutonomousContainerDatabaseSnapshotStandbyConnectionStringType.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.model; + +/** + * The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. + * - SNAPSHOT_SERVICE - Connect to the snapshot standby using new services that are active only in snapshot standby mode. + * - PRIMARY_SERVICE - Connect to the snapshot standby database using the same services as the primary database. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +public enum AutonomousContainerDatabaseSnapshotStandbyConnectionStringType { + SnapshotService("SNAPSHOT_SERVICE"), + PrimaryService("PRIMARY_SERVICE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + AutonomousContainerDatabaseSnapshotStandbyConnectionStringType.class); + + private final String value; + private static java.util.Map< + String, AutonomousContainerDatabaseSnapshotStandbyConnectionStringType> + map; + + static { + map = new java.util.HashMap<>(); + for (AutonomousContainerDatabaseSnapshotStandbyConnectionStringType v : + AutonomousContainerDatabaseSnapshotStandbyConnectionStringType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + AutonomousContainerDatabaseSnapshotStandbyConnectionStringType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AutonomousContainerDatabaseSnapshotStandbyConnectionStringType create( + String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'AutonomousContainerDatabaseSnapshotStandbyConnectionStringType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/AutonomousDatabaseStandbyTypeForDrDrills.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/AutonomousDatabaseStandbyTypeForDrDrills.java new file mode 100644 index 00000000000..db3993e98f3 --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/AutonomousDatabaseStandbyTypeForDrDrills.java @@ -0,0 +1,63 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.model; + +/** + * This specifies the mechanism used to create a temporary Autonomous Database instance for DR Drills. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-clone-about.html for information about these clone types. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-data-guard-snapshot-standby.html for information about snapshot standby. + * - FULL_CLONE - Creates a full clone of the source Autonomous Database with read-write access for DR Drill operations. + * - REFRESHABLE_CLONE - Creates a full clone of the source Autonomous Database with read-only access for DR Drill operations. + * - SNAPSHOT_STANDBY - Converts the existing standby Autonomous Database to a snapshot standby for DR Drill operations. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +public enum AutonomousDatabaseStandbyTypeForDrDrills { + FullClone("FULL_CLONE"), + RefreshableClone("REFRESHABLE_CLONE"), + SnapshotStandby("SNAPSHOT_STANDBY"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(AutonomousDatabaseStandbyTypeForDrDrills.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (AutonomousDatabaseStandbyTypeForDrDrills v : + AutonomousDatabaseStandbyTypeForDrDrills.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + AutonomousDatabaseStandbyTypeForDrDrills(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AutonomousDatabaseStandbyTypeForDrDrills create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'AutonomousDatabaseStandbyTypeForDrDrills', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/CreateDrPlanDetails.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/CreateDrPlanDetails.java index b63c4afa866..23363fb8799 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/CreateDrPlanDetails.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/CreateDrPlanDetails.java @@ -25,6 +25,7 @@ public final class CreateDrPlanDetails extends com.oracle.bmc.http.internal.Expl "displayName", "type", "drProtectionGroupId", + "sourcePlanId", "freeformTags", "definedTags" }) @@ -32,12 +33,14 @@ public CreateDrPlanDetails( String displayName, DrPlanType type, String drProtectionGroupId, + String sourcePlanId, java.util.Map freeformTags, java.util.Map> definedTags) { super(); this.displayName = displayName; this.type = type; this.drProtectionGroupId = drProtectionGroupId; + this.sourcePlanId = sourcePlanId; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -106,6 +109,28 @@ public Builder drProtectionGroupId(String drProtectionGroupId) { this.__explicitlySet__.add("drProtectionGroupId"); return this; } + /** + * The OCID of the source DR plan that should be cloned. + *

+ * Example: {@code ocid1.drplan.oc1..uniqueID} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourcePlanId") + private String sourcePlanId; + + /** + * The OCID of the source DR plan that should be cloned. + *

+ * Example: {@code ocid1.drplan.oc1..uniqueID} + * + * @param sourcePlanId the value to set + * @return this builder + **/ + public Builder sourcePlanId(String sourcePlanId) { + this.sourcePlanId = sourcePlanId; + this.__explicitlySet__.add("sourcePlanId"); + return this; + } /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. *

@@ -161,6 +186,7 @@ public CreateDrPlanDetails build() { this.displayName, this.type, this.drProtectionGroupId, + this.sourcePlanId, this.freeformTags, this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -180,6 +206,9 @@ public Builder copy(CreateDrPlanDetails model) { if (model.wasPropertyExplicitlySet("drProtectionGroupId")) { this.drProtectionGroupId(model.getDrProtectionGroupId()); } + if (model.wasPropertyExplicitlySet("sourcePlanId")) { + this.sourcePlanId(model.getSourcePlanId()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -257,6 +286,26 @@ public String getDrProtectionGroupId() { return drProtectionGroupId; } + /** + * The OCID of the source DR plan that should be cloned. + *

+ * Example: {@code ocid1.drplan.oc1..uniqueID} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourcePlanId") + private final String sourcePlanId; + + /** + * The OCID of the source DR plan that should be cloned. + *

+ * Example: {@code ocid1.drplan.oc1..uniqueID} + * + * @return the value + **/ + public String getSourcePlanId() { + return sourcePlanId; + } + /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. *

@@ -314,6 +363,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("displayName=").append(String.valueOf(this.displayName)); sb.append(", type=").append(String.valueOf(this.type)); sb.append(", drProtectionGroupId=").append(String.valueOf(this.drProtectionGroupId)); + sb.append(", sourcePlanId=").append(String.valueOf(this.sourcePlanId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -333,6 +383,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.type, other.type) && java.util.Objects.equals(this.drProtectionGroupId, other.drProtectionGroupId) + && java.util.Objects.equals(this.sourcePlanId, other.sourcePlanId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -349,6 +400,7 @@ public int hashCode() { + (this.drProtectionGroupId == null ? 43 : this.drProtectionGroupId.hashCode()); + result = (result * PRIME) + (this.sourcePlanId == null ? 43 : this.sourcePlanId.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails.java new file mode 100644 index 00000000000..5ad8cfe8ad0 --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.model; + +/** + * Create properties for an Autonomous Container Database member. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "memberType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails + extends CreateDrProtectionGroupMemberDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("memberId") + private String memberId; + + public Builder memberId(String memberId) { + this.memberId = memberId; + this.__explicitlySet__.add("memberId"); + return this; + } + /** + * The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("connectionStringType") + private AutonomousContainerDatabaseSnapshotStandbyConnectionStringType connectionStringType; + + /** + * The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. + * + * @param connectionStringType the value to set + * @return this builder + **/ + public Builder connectionStringType( + AutonomousContainerDatabaseSnapshotStandbyConnectionStringType + connectionStringType) { + this.connectionStringType = connectionStringType; + this.__explicitlySet__.add("connectionStringType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails build() { + CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails model = + new CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails( + this.memberId, this.connectionStringType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails model) { + if (model.wasPropertyExplicitlySet("memberId")) { + this.memberId(model.getMemberId()); + } + if (model.wasPropertyExplicitlySet("connectionStringType")) { + this.connectionStringType(model.getConnectionStringType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails( + String memberId, + AutonomousContainerDatabaseSnapshotStandbyConnectionStringType connectionStringType) { + super(memberId); + this.connectionStringType = connectionStringType; + } + + /** + * The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("connectionStringType") + private final AutonomousContainerDatabaseSnapshotStandbyConnectionStringType + connectionStringType; + + /** + * The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. + * + * @return the value + **/ + public AutonomousContainerDatabaseSnapshotStandbyConnectionStringType + getConnectionStringType() { + return connectionStringType; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", connectionStringType=").append(String.valueOf(this.connectionStringType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails)) { + return false; + } + + CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails other = + (CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails) o; + return java.util.Objects.equals(this.connectionStringType, other.connectionStringType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.connectionStringType == null + ? 43 + : this.connectionStringType.hashCode()); + return result; + } +} diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/CreateDrProtectionGroupMemberAutonomousDatabaseDetails.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/CreateDrProtectionGroupMemberAutonomousDatabaseDetails.java index ad76ae2858a..2d40451209b 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/CreateDrProtectionGroupMemberAutonomousDatabaseDetails.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/CreateDrProtectionGroupMemberAutonomousDatabaseDetails.java @@ -36,13 +36,64 @@ public Builder memberId(String memberId) { this.__explicitlySet__.add("memberId"); return this; } + /** + * This specifies the mechanism used to create a temporary Autonomous Database instance for DR Drills. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-clone-about.html for information about these clone types. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-data-guard-snapshot-standby.html for information about snapshot standby. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDatabaseStandbyTypeForDrDrills") + private AutonomousDatabaseStandbyTypeForDrDrills autonomousDatabaseStandbyTypeForDrDrills; + + /** + * This specifies the mechanism used to create a temporary Autonomous Database instance for DR Drills. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-clone-about.html for information about these clone types. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-data-guard-snapshot-standby.html for information about snapshot standby. + * + * @param autonomousDatabaseStandbyTypeForDrDrills the value to set + * @return this builder + **/ + public Builder autonomousDatabaseStandbyTypeForDrDrills( + AutonomousDatabaseStandbyTypeForDrDrills autonomousDatabaseStandbyTypeForDrDrills) { + this.autonomousDatabaseStandbyTypeForDrDrills = + autonomousDatabaseStandbyTypeForDrDrills; + this.__explicitlySet__.add("autonomousDatabaseStandbyTypeForDrDrills"); + return this; + } + /** + * The OCID of the vault secret where the database SYSDBA password is stored. + * This password is required and used for performing database DR Drill operations when using full clone. + *

+ * Example: {@code ocid1.vaultsecret.oc1..uniqueID} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordVaultSecretId") + private String passwordVaultSecretId; + + /** + * The OCID of the vault secret where the database SYSDBA password is stored. + * This password is required and used for performing database DR Drill operations when using full clone. + *

+ * Example: {@code ocid1.vaultsecret.oc1..uniqueID} + * + * @param passwordVaultSecretId the value to set + * @return this builder + **/ + public Builder passwordVaultSecretId(String passwordVaultSecretId) { + this.passwordVaultSecretId = passwordVaultSecretId; + this.__explicitlySet__.add("passwordVaultSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public CreateDrProtectionGroupMemberAutonomousDatabaseDetails build() { CreateDrProtectionGroupMemberAutonomousDatabaseDetails model = - new CreateDrProtectionGroupMemberAutonomousDatabaseDetails(this.memberId); + new CreateDrProtectionGroupMemberAutonomousDatabaseDetails( + this.memberId, + this.autonomousDatabaseStandbyTypeForDrDrills, + this.passwordVaultSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -54,6 +105,13 @@ public Builder copy(CreateDrProtectionGroupMemberAutonomousDatabaseDetails model if (model.wasPropertyExplicitlySet("memberId")) { this.memberId(model.getMemberId()); } + if (model.wasPropertyExplicitlySet("autonomousDatabaseStandbyTypeForDrDrills")) { + this.autonomousDatabaseStandbyTypeForDrDrills( + model.getAutonomousDatabaseStandbyTypeForDrDrills()); + } + if (model.wasPropertyExplicitlySet("passwordVaultSecretId")) { + this.passwordVaultSecretId(model.getPasswordVaultSecretId()); + } return this; } } @@ -70,8 +128,55 @@ public Builder toBuilder() { } @Deprecated - public CreateDrProtectionGroupMemberAutonomousDatabaseDetails(String memberId) { + public CreateDrProtectionGroupMemberAutonomousDatabaseDetails( + String memberId, + AutonomousDatabaseStandbyTypeForDrDrills autonomousDatabaseStandbyTypeForDrDrills, + String passwordVaultSecretId) { super(memberId); + this.autonomousDatabaseStandbyTypeForDrDrills = autonomousDatabaseStandbyTypeForDrDrills; + this.passwordVaultSecretId = passwordVaultSecretId; + } + + /** + * This specifies the mechanism used to create a temporary Autonomous Database instance for DR Drills. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-clone-about.html for information about these clone types. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-data-guard-snapshot-standby.html for information about snapshot standby. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDatabaseStandbyTypeForDrDrills") + private final AutonomousDatabaseStandbyTypeForDrDrills autonomousDatabaseStandbyTypeForDrDrills; + + /** + * This specifies the mechanism used to create a temporary Autonomous Database instance for DR Drills. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-clone-about.html for information about these clone types. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-data-guard-snapshot-standby.html for information about snapshot standby. + * + * @return the value + **/ + public AutonomousDatabaseStandbyTypeForDrDrills getAutonomousDatabaseStandbyTypeForDrDrills() { + return autonomousDatabaseStandbyTypeForDrDrills; + } + + /** + * The OCID of the vault secret where the database SYSDBA password is stored. + * This password is required and used for performing database DR Drill operations when using full clone. + *

+ * Example: {@code ocid1.vaultsecret.oc1..uniqueID} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordVaultSecretId") + private final String passwordVaultSecretId; + + /** + * The OCID of the vault secret where the database SYSDBA password is stored. + * This password is required and used for performing database DR Drill operations when using full clone. + *

+ * Example: {@code ocid1.vaultsecret.oc1..uniqueID} + * + * @return the value + **/ + public String getPasswordVaultSecretId() { + return passwordVaultSecretId; } @Override @@ -88,6 +193,9 @@ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("CreateDrProtectionGroupMemberAutonomousDatabaseDetails("); sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", autonomousDatabaseStandbyTypeForDrDrills=") + .append(String.valueOf(this.autonomousDatabaseStandbyTypeForDrDrills)); + sb.append(", passwordVaultSecretId=").append(String.valueOf(this.passwordVaultSecretId)); sb.append(")"); return sb.toString(); } @@ -103,13 +211,27 @@ public boolean equals(Object o) { CreateDrProtectionGroupMemberAutonomousDatabaseDetails other = (CreateDrProtectionGroupMemberAutonomousDatabaseDetails) o; - return super.equals(other); + return java.util.Objects.equals( + this.autonomousDatabaseStandbyTypeForDrDrills, + other.autonomousDatabaseStandbyTypeForDrDrills) + && java.util.Objects.equals(this.passwordVaultSecretId, other.passwordVaultSecretId) + && super.equals(other); } @Override public int hashCode() { final int PRIME = 59; int result = super.hashCode(); + result = + (result * PRIME) + + (this.autonomousDatabaseStandbyTypeForDrDrills == null + ? 43 + : this.autonomousDatabaseStandbyTypeForDrDrills.hashCode()); + result = + (result * PRIME) + + (this.passwordVaultSecretId == null + ? 43 + : this.passwordVaultSecretId.hashCode()); return result; } } diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/CreateDrProtectionGroupMemberDetails.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/CreateDrProtectionGroupMemberDetails.java index edd23862b3c..b5ead085f6b 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/CreateDrProtectionGroupMemberDetails.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/CreateDrProtectionGroupMemberDetails.java @@ -26,6 +26,10 @@ value = CreateDrProtectionGroupMemberComputeInstanceMovableDetails.class, name = "COMPUTE_INSTANCE_MOVABLE" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails.class, + name = "AUTONOMOUS_CONTAINER_DATABASE" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = CreateDrProtectionGroupMemberComputeInstanceNonMovableDetails.class, name = "COMPUTE_INSTANCE_NON_MOVABLE" @@ -54,6 +58,10 @@ value = CreateDrProtectionGroupMemberFileSystemDetails.class, name = "FILE_SYSTEM" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateDrProtectionGroupMemberObjectStorageBucketDetails.class, + name = "OBJECT_STORAGE_BUCKET" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = CreateDrProtectionGroupMemberLoadBalancerDetails.class, name = "LOAD_BALANCER" diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/CreateDrProtectionGroupMemberObjectStorageBucketDetails.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/CreateDrProtectionGroupMemberObjectStorageBucketDetails.java new file mode 100644 index 00000000000..03e60389a84 --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/CreateDrProtectionGroupMemberObjectStorageBucketDetails.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.model; + +/** + * Create properties for a object storage bucket member. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDrProtectionGroupMemberObjectStorageBucketDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "memberType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDrProtectionGroupMemberObjectStorageBucketDetails + extends CreateDrProtectionGroupMemberDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("memberId") + private String memberId; + + public Builder memberId(String memberId) { + this.memberId = memberId; + this.__explicitlySet__.add("memberId"); + return this; + } + /** + * The namespace in object storage (Note - this is usually the tenancy name). + *

+ * Example: {@code myocitenancy} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private String namespaceName; + + /** + * The namespace in object storage (Note - this is usually the tenancy name). + *

+ * Example: {@code myocitenancy} + * + * @param namespaceName the value to set + * @return this builder + **/ + public Builder namespaceName(String namespaceName) { + this.namespaceName = namespaceName; + this.__explicitlySet__.add("namespaceName"); + return this; + } + /** + * The bucket name inside the object storage namespace. + *

+ * Example: {@code bucket_name} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private String bucketName; + + /** + * The bucket name inside the object storage namespace. + *

+ * Example: {@code bucket_name} + * + * @param bucketName the value to set + * @return this builder + **/ + public Builder bucketName(String bucketName) { + this.bucketName = bucketName; + this.__explicitlySet__.add("bucketName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDrProtectionGroupMemberObjectStorageBucketDetails build() { + CreateDrProtectionGroupMemberObjectStorageBucketDetails model = + new CreateDrProtectionGroupMemberObjectStorageBucketDetails( + this.memberId, this.namespaceName, this.bucketName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDrProtectionGroupMemberObjectStorageBucketDetails model) { + if (model.wasPropertyExplicitlySet("memberId")) { + this.memberId(model.getMemberId()); + } + if (model.wasPropertyExplicitlySet("namespaceName")) { + this.namespaceName(model.getNamespaceName()); + } + if (model.wasPropertyExplicitlySet("bucketName")) { + this.bucketName(model.getBucketName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateDrProtectionGroupMemberObjectStorageBucketDetails( + String memberId, String namespaceName, String bucketName) { + super(memberId); + this.namespaceName = namespaceName; + this.bucketName = bucketName; + } + + /** + * The namespace in object storage (Note - this is usually the tenancy name). + *

+ * Example: {@code myocitenancy} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private final String namespaceName; + + /** + * The namespace in object storage (Note - this is usually the tenancy name). + *

+ * Example: {@code myocitenancy} + * + * @return the value + **/ + public String getNamespaceName() { + return namespaceName; + } + + /** + * The bucket name inside the object storage namespace. + *

+ * Example: {@code bucket_name} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private final String bucketName; + + /** + * The bucket name inside the object storage namespace. + *

+ * Example: {@code bucket_name} + * + * @return the value + **/ + public String getBucketName() { + return bucketName; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateDrProtectionGroupMemberObjectStorageBucketDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", namespaceName=").append(String.valueOf(this.namespaceName)); + sb.append(", bucketName=").append(String.valueOf(this.bucketName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDrProtectionGroupMemberObjectStorageBucketDetails)) { + return false; + } + + CreateDrProtectionGroupMemberObjectStorageBucketDetails other = + (CreateDrProtectionGroupMemberObjectStorageBucketDetails) o; + return java.util.Objects.equals(this.namespaceName, other.namespaceName) + && java.util.Objects.equals(this.bucketName, other.bucketName) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.namespaceName == null ? 43 : this.namespaceName.hashCode()); + result = (result * PRIME) + (this.bucketName == null ? 43 : this.bucketName.hashCode()); + return result; + } +} diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlan.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlan.java index 28e61e5c8ab..8ba69c37518 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlan.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlan.java @@ -29,8 +29,10 @@ public final class DrPlan extends com.oracle.bmc.http.internal.ExplicitlySetBmcM "drProtectionGroupId", "peerDrProtectionGroupId", "peerRegion", + "sourcePlanId", "planGroups", "lifecycleState", + "lifecycleSubState", "lifeCycleDetails", "freeformTags", "definedTags", @@ -46,8 +48,10 @@ public DrPlan( String drProtectionGroupId, String peerDrProtectionGroupId, String peerRegion, + String sourcePlanId, java.util.List planGroups, DrPlanLifecycleState lifecycleState, + DrPlanLifecycleSubState lifecycleSubState, String lifeCycleDetails, java.util.Map freeformTags, java.util.Map> definedTags, @@ -62,8 +66,10 @@ public DrPlan( this.drProtectionGroupId = drProtectionGroupId; this.peerDrProtectionGroupId = peerDrProtectionGroupId; this.peerRegion = peerRegion; + this.sourcePlanId = sourcePlanId; this.planGroups = planGroups; this.lifecycleState = lifecycleState; + this.lifecycleSubState = lifecycleSubState; this.lifeCycleDetails = lifeCycleDetails; this.freeformTags = freeformTags; this.definedTags = definedTags; @@ -270,6 +276,30 @@ public Builder peerRegion(String peerRegion) { this.__explicitlySet__.add("peerRegion"); return this; } + /** + * If this is a cloned DR plan, the OCID of the source DR plan that was used to clone this DR plan. + * If this DR plan was not cloned, then the value for this will be {@code null}. + *

+ * Example: {@code ocid1.drplan.oc1..uniqueID} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourcePlanId") + private String sourcePlanId; + + /** + * If this is a cloned DR plan, the OCID of the source DR plan that was used to clone this DR plan. + * If this DR plan was not cloned, then the value for this will be {@code null}. + *

+ * Example: {@code ocid1.drplan.oc1..uniqueID} + * + * @param sourcePlanId the value to set + * @return this builder + **/ + public Builder sourcePlanId(String sourcePlanId) { + this.sourcePlanId = sourcePlanId; + this.__explicitlySet__.add("sourcePlanId"); + return this; + } /** * The list of groups in this DR plan. * @@ -306,6 +336,24 @@ public Builder lifecycleState(DrPlanLifecycleState lifecycleState) { this.__explicitlySet__.add("lifecycleState"); return this; } + /** + * The current state of the DR plan. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleSubState") + private DrPlanLifecycleSubState lifecycleSubState; + + /** + * The current state of the DR plan. + * + * @param lifecycleSubState the value to set + * @return this builder + **/ + public Builder lifecycleSubState(DrPlanLifecycleSubState lifecycleSubState) { + this.lifecycleSubState = lifecycleSubState; + this.__explicitlySet__.add("lifecycleSubState"); + return this; + } /** * A message describing the DR plan's current state in more detail. * @@ -407,8 +455,10 @@ public DrPlan build() { this.drProtectionGroupId, this.peerDrProtectionGroupId, this.peerRegion, + this.sourcePlanId, this.planGroups, this.lifecycleState, + this.lifecycleSubState, this.lifeCycleDetails, this.freeformTags, this.definedTags, @@ -448,12 +498,18 @@ public Builder copy(DrPlan model) { if (model.wasPropertyExplicitlySet("peerRegion")) { this.peerRegion(model.getPeerRegion()); } + if (model.wasPropertyExplicitlySet("sourcePlanId")) { + this.sourcePlanId(model.getSourcePlanId()); + } if (model.wasPropertyExplicitlySet("planGroups")) { this.planGroups(model.getPlanGroups()); } if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } + if (model.wasPropertyExplicitlySet("lifecycleSubState")) { + this.lifecycleSubState(model.getLifecycleSubState()); + } if (model.wasPropertyExplicitlySet("lifeCycleDetails")) { this.lifeCycleDetails(model.getLifeCycleDetails()); } @@ -661,6 +717,28 @@ public String getPeerRegion() { return peerRegion; } + /** + * If this is a cloned DR plan, the OCID of the source DR plan that was used to clone this DR plan. + * If this DR plan was not cloned, then the value for this will be {@code null}. + *

+ * Example: {@code ocid1.drplan.oc1..uniqueID} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourcePlanId") + private final String sourcePlanId; + + /** + * If this is a cloned DR plan, the OCID of the source DR plan that was used to clone this DR plan. + * If this DR plan was not cloned, then the value for this will be {@code null}. + *

+ * Example: {@code ocid1.drplan.oc1..uniqueID} + * + * @return the value + **/ + public String getSourcePlanId() { + return sourcePlanId; + } + /** * The list of groups in this DR plan. * @@ -693,6 +771,22 @@ public DrPlanLifecycleState getLifecycleState() { return lifecycleState; } + /** + * The current state of the DR plan. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleSubState") + private final DrPlanLifecycleSubState lifecycleSubState; + + /** + * The current state of the DR plan. + * + * @return the value + **/ + public DrPlanLifecycleSubState getLifecycleSubState() { + return lifecycleSubState; + } + /** * A message describing the DR plan's current state in more detail. * @@ -793,8 +887,10 @@ public String toString(boolean includeByteArrayContents) { sb.append(", peerDrProtectionGroupId=") .append(String.valueOf(this.peerDrProtectionGroupId)); sb.append(", peerRegion=").append(String.valueOf(this.peerRegion)); + sb.append(", sourcePlanId=").append(String.valueOf(this.sourcePlanId)); sb.append(", planGroups=").append(String.valueOf(this.planGroups)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleSubState=").append(String.valueOf(this.lifecycleSubState)); sb.append(", lifeCycleDetails=").append(String.valueOf(this.lifeCycleDetails)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); @@ -823,8 +919,10 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.peerDrProtectionGroupId, other.peerDrProtectionGroupId) && java.util.Objects.equals(this.peerRegion, other.peerRegion) + && java.util.Objects.equals(this.sourcePlanId, other.sourcePlanId) && java.util.Objects.equals(this.planGroups, other.planGroups) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleSubState, other.lifecycleSubState) && java.util.Objects.equals(this.lifeCycleDetails, other.lifeCycleDetails) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) @@ -855,10 +953,14 @@ public int hashCode() { ? 43 : this.peerDrProtectionGroupId.hashCode()); result = (result * PRIME) + (this.peerRegion == null ? 43 : this.peerRegion.hashCode()); + result = (result * PRIME) + (this.sourcePlanId == null ? 43 : this.sourcePlanId.hashCode()); result = (result * PRIME) + (this.planGroups == null ? 43 : this.planGroups.hashCode()); result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleSubState == null ? 43 : this.lifecycleSubState.hashCode()); result = (result * PRIME) + (this.lifeCycleDetails == null ? 43 : this.lifeCycleDetails.hashCode()); diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanGroup.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanGroup.java index e66d10c1c7d..da59e623a1e 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanGroup.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanGroup.java @@ -19,16 +19,25 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class DrPlanGroup extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"id", "type", "displayName", "isPauseEnabled", "steps"}) + @java.beans.ConstructorProperties({ + "id", + "type", + "refreshStatus", + "displayName", + "isPauseEnabled", + "steps" + }) public DrPlanGroup( String id, DrPlanGroupType type, + DrPlanGroupRefreshStatus refreshStatus, String displayName, Boolean isPauseEnabled, java.util.List steps) { super(); this.id = id; this.type = type; + this.refreshStatus = refreshStatus; this.displayName = displayName; this.isPauseEnabled = isPauseEnabled; this.steps = steps; @@ -80,6 +89,28 @@ public Builder type(DrPlanGroupType type) { this.__explicitlySet__.add("type"); return this; } + /** + * The DR plan group refresh status. + *

+ * Example: {@code GROUP_MODIFIED} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("refreshStatus") + private DrPlanGroupRefreshStatus refreshStatus; + + /** + * The DR plan group refresh status. + *

+ * Example: {@code GROUP_MODIFIED} + * + * @param refreshStatus the value to set + * @return this builder + **/ + public Builder refreshStatus(DrPlanGroupRefreshStatus refreshStatus) { + this.refreshStatus = refreshStatus; + this.__explicitlySet__.add("refreshStatus"); + return this; + } /** * The display name of the group. *

@@ -151,7 +182,12 @@ public Builder steps(java.util.List steps) { public DrPlanGroup build() { DrPlanGroup model = new DrPlanGroup( - this.id, this.type, this.displayName, this.isPauseEnabled, this.steps); + this.id, + this.type, + this.refreshStatus, + this.displayName, + this.isPauseEnabled, + this.steps); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -166,6 +202,9 @@ public Builder copy(DrPlanGroup model) { if (model.wasPropertyExplicitlySet("type")) { this.type(model.getType()); } + if (model.wasPropertyExplicitlySet("refreshStatus")) { + this.refreshStatus(model.getRefreshStatus()); + } if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } @@ -230,6 +269,26 @@ public DrPlanGroupType getType() { return type; } + /** + * The DR plan group refresh status. + *

+ * Example: {@code GROUP_MODIFIED} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("refreshStatus") + private final DrPlanGroupRefreshStatus refreshStatus; + + /** + * The DR plan group refresh status. + *

+ * Example: {@code GROUP_MODIFIED} + * + * @return the value + **/ + public DrPlanGroupRefreshStatus getRefreshStatus() { + return refreshStatus; + } + /** * The display name of the group. *

@@ -304,6 +363,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("id=").append(String.valueOf(this.id)); sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", refreshStatus=").append(String.valueOf(this.refreshStatus)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", isPauseEnabled=").append(String.valueOf(this.isPauseEnabled)); sb.append(", steps=").append(String.valueOf(this.steps)); @@ -323,6 +383,7 @@ public boolean equals(Object o) { DrPlanGroup other = (DrPlanGroup) o; return java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.refreshStatus, other.refreshStatus) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.isPauseEnabled, other.isPauseEnabled) && java.util.Objects.equals(this.steps, other.steps) @@ -335,6 +396,9 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.refreshStatus == null ? 43 : this.refreshStatus.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanGroupRefreshStatus.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanGroupRefreshStatus.java new file mode 100644 index 00000000000..488086a8ba5 --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanGroupRefreshStatus.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.model; + +/** + * The refresh status of a DR plan group. + * - GROUP_ADDED - DR plan group was added to the plan. + * - GROUP_DELETED - DR plan group was deleted from the plan. + * - GROUP_MODIFIED - DR plan group was modified. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +public enum DrPlanGroupRefreshStatus { + GroupAdded("GROUP_ADDED"), + GroupDeleted("GROUP_DELETED"), + GroupModified("GROUP_MODIFIED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DrPlanGroupRefreshStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DrPlanGroupRefreshStatus v : DrPlanGroupRefreshStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DrPlanGroupRefreshStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DrPlanGroupRefreshStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DrPlanGroupRefreshStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanLifecycleSubState.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanLifecycleSubState.java new file mode 100644 index 00000000000..c63fc6c7fc5 --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanLifecycleSubState.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.model; + +/** + * The secondary lifecycle states of a DR plan. Provides information in addition to the lifecycle state. + * - NEEDS_REFRESH - The DR plan needs a refresh. + * - NEEDS_VERIFICATION - The DR plan needs verification. + * - REFRESHING - The DR plan is being updated due to a plan refresh. + * - VERIFYING - The DR plan is being updated due to a plan verification. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +public enum DrPlanLifecycleSubState { + NeedsRefresh("NEEDS_REFRESH"), + NeedsVerification("NEEDS_VERIFICATION"), + Refreshing("REFRESHING"), + Verifying("VERIFYING"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DrPlanLifecycleSubState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DrPlanLifecycleSubState v : DrPlanLifecycleSubState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DrPlanLifecycleSubState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DrPlanLifecycleSubState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DrPlanLifecycleSubState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanStep.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanStep.java index 79d6898cb1d..1e14b0fff65 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanStep.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanStep.java @@ -24,6 +24,7 @@ public final class DrPlanStep extends com.oracle.bmc.http.internal.ExplicitlySet "groupId", "memberId", "type", + "refreshStatus", "displayName", "errorMode", "timeout", @@ -35,6 +36,7 @@ public DrPlanStep( String groupId, String memberId, DrPlanStepType type, + DrPlanStepRefreshStatus refreshStatus, String displayName, DrPlanStepErrorMode errorMode, Integer timeout, @@ -45,6 +47,7 @@ public DrPlanStep( this.groupId = groupId; this.memberId = memberId; this.type = type; + this.refreshStatus = refreshStatus; this.displayName = displayName; this.errorMode = errorMode; this.timeout = timeout; @@ -138,6 +141,28 @@ public Builder type(DrPlanStepType type) { this.__explicitlySet__.add("type"); return this; } + /** + * The DR plan step refresh status. + *

+ * Example: {@code STEP_ADDED} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("refreshStatus") + private DrPlanStepRefreshStatus refreshStatus; + + /** + * The DR plan step refresh status. + *

+ * Example: {@code STEP_ADDED} + * + * @param refreshStatus the value to set + * @return this builder + **/ + public Builder refreshStatus(DrPlanStepRefreshStatus refreshStatus) { + this.refreshStatus = refreshStatus; + this.__explicitlySet__.add("refreshStatus"); + return this; + } /** * The display name of the group. *

@@ -242,6 +267,7 @@ public DrPlanStep build() { this.groupId, this.memberId, this.type, + this.refreshStatus, this.displayName, this.errorMode, this.timeout, @@ -267,6 +293,9 @@ public Builder copy(DrPlanStep model) { if (model.wasPropertyExplicitlySet("type")) { this.type(model.getType()); } + if (model.wasPropertyExplicitlySet("refreshStatus")) { + this.refreshStatus(model.getRefreshStatus()); + } if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } @@ -373,6 +402,26 @@ public DrPlanStepType getType() { return type; } + /** + * The DR plan step refresh status. + *

+ * Example: {@code STEP_ADDED} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("refreshStatus") + private final DrPlanStepRefreshStatus refreshStatus; + + /** + * The DR plan step refresh status. + *

+ * Example: {@code STEP_ADDED} + * + * @return the value + **/ + public DrPlanStepRefreshStatus getRefreshStatus() { + return refreshStatus; + } + /** * The display name of the group. *

@@ -474,6 +523,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", groupId=").append(String.valueOf(this.groupId)); sb.append(", memberId=").append(String.valueOf(this.memberId)); sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", refreshStatus=").append(String.valueOf(this.refreshStatus)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", errorMode=").append(String.valueOf(this.errorMode)); sb.append(", timeout=").append(String.valueOf(this.timeout)); @@ -497,6 +547,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.groupId, other.groupId) && java.util.Objects.equals(this.memberId, other.memberId) && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.refreshStatus, other.refreshStatus) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.errorMode, other.errorMode) && java.util.Objects.equals(this.timeout, other.timeout) @@ -513,6 +564,9 @@ public int hashCode() { result = (result * PRIME) + (this.groupId == null ? 43 : this.groupId.hashCode()); result = (result * PRIME) + (this.memberId == null ? 43 : this.memberId.hashCode()); result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.refreshStatus == null ? 43 : this.refreshStatus.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.errorMode == null ? 43 : this.errorMode.hashCode()); result = (result * PRIME) + (this.timeout == null ? 43 : this.timeout.hashCode()); diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanStepRefreshStatus.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanStepRefreshStatus.java new file mode 100644 index 00000000000..7a284d5913b --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanStepRefreshStatus.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.model; + +/** + * The refresh status of a DR plan step. + * - STEP_ADDED - DR plan step was added to the group. + * - STEP_DELETED - DR plan step was deleted from the group. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +public enum DrPlanStepRefreshStatus { + StepAdded("STEP_ADDED"), + StepDeleted("STEP_DELETED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DrPlanStepRefreshStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DrPlanStepRefreshStatus v : DrPlanStepRefreshStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DrPlanStepRefreshStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DrPlanStepRefreshStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DrPlanStepRefreshStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanStepType.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanStepType.java index 15e7038885e..a1173ddbd9d 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanStepType.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanStepType.java @@ -6,6 +6,99 @@ /** * The types of steps in a DR plan. + * - COMPUTE_INSTANCE_STOP_PRECHECK - A precheck step for validating a compute instance stop. + * - COMPUTE_INSTANCE_LAUNCH_PRECHECK - A precheck step for validating a compute instance launch. + * - COMPUTE_INSTANCE_TERMINATE_PRECHECK - A precheck step for validating a compute instance termination. + * - COMPUTE_INSTANCE_REMOVE_PRECHECK - A precheck step for validating a compute instance removal. + * - VOLUME_GROUP_RESTORE_SWITCHOVER_PRECHECK - A precheck step for validating a volume group restoration during a switchover. + * - VOLUME_GROUP_RESTORE_FAILOVER_PRECHECK - A precheck step for validating a volume group restoration during a failover. + * - DATABASE_SWITCHOVER_PRECHECK - A precheck step for validating the database during a switchover. + * - DATABASE_FAILOVER_PRECHECK - A precheck step for validating the database during a failover. + * - AUTONOMOUS_DATABASE_SWITCHOVER_PRECHECK - A precheck step for validating an autonomous database during a switchover. + * - AUTONOMOUS_DATABASE_FAILOVER_PRECHECK - A precheck step for validating an autonomous database during a failover. + * - AUTONOMOUS_CONTAINER_DATABASE_SWITCHOVER_PRECHECK - A precheck step for validating an autonomous container database during a switchover. + * - AUTONOMOUS_CONTAINER_DATABASE_FAILOVER_PRECHECK - A precheck step for validating an autonomous container database during a failover. + * - AUTONOMOUS_CONTAINER_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY_PRECHECK - A precheck step for validating the conversion of an autonomous container database to a snapshot at standby for a start drill. + * - AUTONOMOUS_CONTAINER_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY_PRECHECK - A precheck step for validating the conversion of an autonomous container database to a physical instance at standby for a stop drill. + * - AUTONOMOUS_CONTAINER_DATABASE_SWITCHOVER - A DR plan step to perform an autonomous container database switchover. + * - AUTONOMOUS_CONTAINER_DATABASE_FAILOVER - A DR plan step to perform an autonomous container database failover. + * - AUTONOMOUS_CONTAINER_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY - A DR plan step to convert an autonomous container database to a snapshot at standby during a start drill. + * - AUTONOMOUS_CONTAINER_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY - A DR plan step to convert an autonomous container database to a physical instance at standby during a stop drill. + * - AUTONOMOUS_DATABASE_START_DRILL_CREATE_CLONE_STANDBY_PRECHECK - A precheck step for validating the creation of an autonomous database clone at standby during a start drill. + * - AUTONOMOUS_DATABASE_STOP_DRILL_DELETE_CLONE_STANDBY_PRECHECK - A precheck step for validating the deletion of an autonomous database clone at standby during a stop drill. + * - AUTONOMOUS_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY_PRECHECK - A precheck step for validating the conversion of an autonomous database to snapshot at standby during a start drill. + * - AUTONOMOUS_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY_PRECHECK - A precheck step for validating the conversion of an autonomous database to a physical instance at standby during a start drill. + * - AUTONOMOUS_DATABASE_START_DRILL_CREATE_CLONE_STANDBY - A DR plan step to create an autonomous database clone at standby during a start drill. + * - AUTONOMOUS_DATABASE_STOP_DRILL_DELETE_CLONE_STANDBY - A DR plan step to delete an autonomous database clone at standby during a stop drill. + * - AUTONOMOUS_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY - A DR plan step to convert an autonomous database to a snapshot at standby during a start drill. + * - AUTONOMOUS_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY - A DR plan step to convert an autonomous database to a physical instance at standby during a stop drill. + * - USER_DEFINED_PRECHECK - A precheck step for validating a user-defined step. + * - COMPUTE_INSTANCE_LAUNCH - A DR plan step to launch a compute instance. + * - COMPUTE_INSTANCE_STOP - A DR plan step to stop a compute instance. + * - COMPUTE_INSTANCE_TERMINATE - A DR plan step to terminate a compute instance. + * - COMPUTE_INSTANCE_REMOVE - A DR plan step to remove a compute instance. + * - DATABASE_SWITCHOVER - A DR plan step to perform a database switchover. + * - DATABASE_FAILOVER - A DR plan step to perform a database failover. + * - AUTONOMOUS_DATABASE_SWITCHOVER - A DR plan step to perform an autonomous database switchover. + * - AUTONOMOUS_DATABASE_FAILOVER - A DR plan step to perform an autonomous database failover. + * - VOLUME_GROUP_RESTORE_SWITCHOVER - A DR plan step to perform a volume group restoration during a switchover. + * - VOLUME_GROUP_RESTORE_FAILOVER - A DR plan step to perform a volume group restoration during a failover. + * - VOLUME_GROUP_REVERSE - A DR plan step to reverse a volume group. + * - VOLUME_GROUP_DELETE - A DR plan step to delete a volume group. + * - VOLUME_GROUP_REMOVE - A DR plan step to remove a volume group. + * - VOLUME_GROUP_TERMINATE - A DR plan step to terminate a volume group. + * - USER_DEFINED - User-defined step + * - VOLUME_GROUP_RESTORE_START_DRILL_PRECHECK - A precheck step for validating a volume group restoration during a start drill. + * - VOLUME_GROUP_REMOVE_PRECHECK - A precheck step for validating a volume group removal. + * - VOLUME_GROUP_TERMINATE_PRECHECK - A precheck step for validating a volume group termination. + * - VOLUME_GROUP_RESTORE_START_DRILL - A DR plan step for volume group restoration during a start drill. + * - AUTONOMOUS_DATABASE_CREATE_CLONE_PRECHECK - A precheck step for validating the creation of an autonomous database clone. + * - AUTONOMOUS_DATABASE_DELETE_CLONE_PRECHECK - A precheck step for validating the deletion of an autonomous database clone. + * - LOAD_BALANCER_UPDATE_PRIMARY_BACKEND_SET_PRECHECK - A precheck step for validating the update of primary load balancer backend set. + * - LOAD_BALANCER_UPDATE_STANDBY_BACKEND_SET_PRECHECK - A precheck step for validating the update of standby load balancer backend set. + * - FILE_SYSTEM_SWITCHOVER_PRECHECK - A precheck step for validating a file system during a switchover. + * - FILE_SYSTEM_FAILOVER_PRECHECK - A precheck step for validating a file system during a failover. + * - FILE_SYSTEM_START_DRILL_PRECHECK - A precheck step for validating a file system during a start drill. + * - FILE_SYSTEM_STOP_DRILL_PRECHECK - A precheck step for validating a file system during a stop drill. + * - FILE_SYSTEM_REMOVE_PRECHECK - A precheck step for validating a file system removal. + * - FILE_SYSTEM_TERMINATE_PRECHECK - A precheck step for validating a file system termination. + * - FILE_SYSTEM_MOUNT_PRECHECK - A precheck step for validating a file system to be mounted. + * - FILE_SYSTEM_UNMOUNT_PRECHECK - A precheck step for validating a file system to be unmounted. + * - COMPUTE_INSTANCE_START_PRECHECK - A precheck step for validating the start of a compute instance. + * - COMPUTE_INSTANCE_ATTACH_BLOCK_VOLUMES_PRECHECK - A precheck step for validating the attachment of block volumes to a compute instance. + * - COMPUTE_INSTANCE_DETACH_BLOCK_VOLUMES_PRECHECK - A precheck step for validating the detachment of block volumes from a compute instance. + * - COMPUTE_INSTANCE_MOUNT_BLOCK_VOLUMES_PRECHECK - A precheck step for validating the mounting of block volumes on a compute instance. + * - COMPUTE_INSTANCE_UNMOUNT_BLOCK_VOLUMES_PRECHECK - A precheck step for validating the unmounting of block volumes from a compute instance. + * - COMPUTE_CAPACITY_RESERVATION_START_DRILL_PRECHECK - A precheck step for validating a compute capacity reservation during a start drill. + * - COMPUTE_CAPACITY_AVAILABILITY_START_DRILL_PRECHECK - A precheck step for validating a compute capacity availability during a start drill . + * - AUTONOMOUS_DATABASE_CREATE_CLONE - A DR plan step to create an autonomous database clone. + * - AUTONOMOUS_DATABASE_DELETE_CLONE - A DR plan step to delete an autonomous database clone. + * - LOAD_BALANCER_UPDATE_PRIMARY_BACKEND_SET - A DR plan step to update a primary load balancer backend set. + * - LOAD_BALANCER_UPDATE_STANDBY_BACKEND_SET - A DR plan step to update a standby load balancer backend set. + * - FILE_SYSTEM_SWITCHOVER - A DR plan step to perform a file system switchover. + * - FILE_SYSTEM_FAILOVER - A DR plan step to perform a file system failover. + * - FILE_SYSTEM_REMOVE - A DR plan step to remove a file system. + * - FILE_SYSTEM_REVERSE - A DR plan step to reverse replication in a file system. + * - FILE_SYSTEM_TERMINATE - A DR plan step to terminate a file system. + * - FILE_SYSTEM_START_DRILL - A DR plan step to perform a start drill operation for a file system. + * - FILE_SYSTEM_STOP_DRILL - A DR plan step to perform a stop drill operation for a file system. + * - COMPUTE_INSTANCE_START - A DR plan step to start a compute instance. + * - COMPUTE_INSTANCE_ATTACH_BLOCK_VOLUMES - A DR plan step to attach block volumes to a compute instance. + * - COMPUTE_INSTANCE_DETACH_BLOCK_VOLUMES - A DR plan step to detach block volumes from a compute instance. + * - FILE_SYSTEM_MOUNT - A DR plan step to mount a file system. + * - FILE_SYSTEM_UNMOUNT - A DR plan step to unmount a file system. + * - COMPUTE_CAPACITY_RESERVATION_SWITCHOVER_PRECHECK - A precheck step for validating a compute capacity reservation during a switchover. + * - COMPUTE_CAPACITY_RESERVATION_FAILOVER_PRECHECK - A precheck step for validating a capacity reservation during a failover. + * - COMPUTE_CAPACITY_AVAILABILITY_SWITCHOVER_PRECHECK - A precheck step for validating a compute capacity availability during a switchover. + * - COMPUTE_CAPACITY_AVAILABILITY_FAILOVER_PRECHECK - A precheck step for validating a compute capacity availability during a failover. + * - OBJECT_STORAGE_BUCKET_SWITCHOVER_DELETE_REPLICATION_PRIMARY_PRECHECK - A precheck step for validating the deletion of an object storage bucket replication in the primary region during a switchover. + * - OBJECT_STORAGE_BUCKET_SWITCHOVER_SETUP_REVERSE_REPLICATION_STANDBY_PRECHECK - A precheck step for validating an object storage bucket reverse replication set up in the standby region during a switchover. + * - OBJECT_STORAGE_BUCKET_FAILOVER_DELETE_REPLICATION_STANDBY_PRECHECK - A precheck step for validating the deletion of an object storage bucket replication in the standby region during a failover. + * - OBJECT_STORAGE_BUCKET_FAILOVER_SETUP_REVERSE_REPLICATION_STANDBY_PRECHECK - A precheck step for validating an object storage bucket reverse replication set up in the standby region during a failover. + * - OBJECT_STORAGE_BUCKET_SWITCHOVER_DELETE_REPLICATION_PRIMARY - A DR plan step to delete an object storage bucket replication in the primary region during a switchover. + * - OBJECT_STORAGE_BUCKET_SWITCHOVER_SETUP_REVERSE_REPLICATION_STANDBY - A DR plan step to set up an object storage bucket reverse replication in the standby region during a switchover. + * - OBJECT_STORAGE_BUCKET_FAILOVER_DELETE_REPLICATION_STANDBY - A DR plan step to delete an object storage bucket replication in the standby region during a failover. + * - OBJECT_STORAGE_BUCKET_FAILOVER_SETUP_REVERSE_REPLICATION_STANDBY - A DR plan step to set up an object storage bucket reverse replication in the standby region during a failover. * **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") @@ -20,6 +113,35 @@ public enum DrPlanStepType { DatabaseFailoverPrecheck("DATABASE_FAILOVER_PRECHECK"), AutonomousDatabaseSwitchoverPrecheck("AUTONOMOUS_DATABASE_SWITCHOVER_PRECHECK"), AutonomousDatabaseFailoverPrecheck("AUTONOMOUS_DATABASE_FAILOVER_PRECHECK"), + AutonomousContainerDatabaseSwitchoverPrecheck( + "AUTONOMOUS_CONTAINER_DATABASE_SWITCHOVER_PRECHECK"), + AutonomousContainerDatabaseFailoverPrecheck("AUTONOMOUS_CONTAINER_DATABASE_FAILOVER_PRECHECK"), + AutonomousContainerDatabaseStartDrillConvertToSnapshotStandbyPrecheck( + "AUTONOMOUS_CONTAINER_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY_PRECHECK"), + AutonomousContainerDatabaseStopDrillConvertToPhysicalStandbyPrecheck( + "AUTONOMOUS_CONTAINER_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY_PRECHECK"), + AutonomousContainerDatabaseSwitchover("AUTONOMOUS_CONTAINER_DATABASE_SWITCHOVER"), + AutonomousContainerDatabaseFailover("AUTONOMOUS_CONTAINER_DATABASE_FAILOVER"), + AutonomousContainerDatabaseStartDrillConvertToSnapshotStandby( + "AUTONOMOUS_CONTAINER_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY"), + AutonomousContainerDatabaseStopDrillConvertToPhysicalStandby( + "AUTONOMOUS_CONTAINER_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY"), + AutonomousDatabaseStartDrillCreateCloneStandbyPrecheck( + "AUTONOMOUS_DATABASE_START_DRILL_CREATE_CLONE_STANDBY_PRECHECK"), + AutonomousDatabaseStopDrillDeleteCloneStandbyPrecheck( + "AUTONOMOUS_DATABASE_STOP_DRILL_DELETE_CLONE_STANDBY_PRECHECK"), + AutonomousDatabaseStartDrillConvertToSnapshotStandbyPrecheck( + "AUTONOMOUS_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY_PRECHECK"), + AutonomousDatabaseStopDrillConvertToPhysicalStandbyPrecheck( + "AUTONOMOUS_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY_PRECHECK"), + AutonomousDatabaseStartDrillCreateCloneStandby( + "AUTONOMOUS_DATABASE_START_DRILL_CREATE_CLONE_STANDBY"), + AutonomousDatabaseStopDrillDeleteCloneStandby( + "AUTONOMOUS_DATABASE_STOP_DRILL_DELETE_CLONE_STANDBY"), + AutonomousDatabaseStartDrillConvertToSnapshotStandby( + "AUTONOMOUS_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY"), + AutonomousDatabaseStopDrillConvertToPhysicalStandby( + "AUTONOMOUS_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY"), UserDefinedPrecheck("USER_DEFINED_PRECHECK"), ComputeInstanceLaunch("COMPUTE_INSTANCE_LAUNCH"), ComputeInstanceStop("COMPUTE_INSTANCE_STOP"), @@ -85,6 +207,22 @@ public enum DrPlanStepType { ComputeCapacityAvailabilitySwitchoverPrecheck( "COMPUTE_CAPACITY_AVAILABILITY_SWITCHOVER_PRECHECK"), ComputeCapacityAvailabilityFailoverPrecheck("COMPUTE_CAPACITY_AVAILABILITY_FAILOVER_PRECHECK"), + ObjectStorageBucketSwitchoverDeleteReplicationPrimaryPrecheck( + "OBJECT_STORAGE_BUCKET_SWITCHOVER_DELETE_REPLICATION_PRIMARY_PRECHECK"), + ObjectStorageBucketSwitchoverSetupReverseReplicationStandbyPrecheck( + "OBJECT_STORAGE_BUCKET_SWITCHOVER_SETUP_REVERSE_REPLICATION_STANDBY_PRECHECK"), + ObjectStorageBucketFailoverDeleteReplicationStandbyPrecheck( + "OBJECT_STORAGE_BUCKET_FAILOVER_DELETE_REPLICATION_STANDBY_PRECHECK"), + ObjectStorageBucketFailoverSetupReverseReplicationStandbyPrecheck( + "OBJECT_STORAGE_BUCKET_FAILOVER_SETUP_REVERSE_REPLICATION_STANDBY_PRECHECK"), + ObjectStorageBucketSwitchoverDeleteReplicationPrimary( + "OBJECT_STORAGE_BUCKET_SWITCHOVER_DELETE_REPLICATION_PRIMARY"), + ObjectStorageBucketSwitchoverSetupReverseReplicationStandby( + "OBJECT_STORAGE_BUCKET_SWITCHOVER_SETUP_REVERSE_REPLICATION_STANDBY"), + ObjectStorageBucketFailoverDeleteReplicationStandby( + "OBJECT_STORAGE_BUCKET_FAILOVER_DELETE_REPLICATION_STANDBY"), + ObjectStorageBucketFailoverSetupReverseReplicationStandby( + "OBJECT_STORAGE_BUCKET_FAILOVER_SETUP_REVERSE_REPLICATION_STANDBY"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanSummary.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanSummary.java index ba6fa87e6c6..e4f12ca2591 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanSummary.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrPlanSummary.java @@ -30,6 +30,7 @@ public final class DrPlanSummary extends com.oracle.bmc.http.internal.Explicitly "timeCreated", "timeUpdated", "lifecycleState", + "lifecycleSubState", "lifeCycleDetails", "freeformTags", "definedTags", @@ -46,6 +47,7 @@ public DrPlanSummary( java.util.Date timeCreated, java.util.Date timeUpdated, DrPlanLifecycleState lifecycleState, + DrPlanLifecycleSubState lifecycleSubState, String lifeCycleDetails, java.util.Map freeformTags, java.util.Map> definedTags, @@ -61,6 +63,7 @@ public DrPlanSummary( this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.lifecycleState = lifecycleState; + this.lifecycleSubState = lifecycleSubState; this.lifeCycleDetails = lifeCycleDetails; this.freeformTags = freeformTags; this.definedTags = definedTags; @@ -293,6 +296,28 @@ public Builder lifecycleState(DrPlanLifecycleState lifecycleState) { this.__explicitlySet__.add("lifecycleState"); return this; } + /** + * The current sub state of the DR plan. + *

+ * Example: {@code NEEDS_REFRESH} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleSubState") + private DrPlanLifecycleSubState lifecycleSubState; + + /** + * The current sub state of the DR plan. + *

+ * Example: {@code NEEDS_REFRESH} + * + * @param lifecycleSubState the value to set + * @return this builder + **/ + public Builder lifecycleSubState(DrPlanLifecycleSubState lifecycleSubState) { + this.lifecycleSubState = lifecycleSubState; + this.__explicitlySet__.add("lifecycleSubState"); + return this; + } /** * A message describing the DR plan's current state in more detail. * @@ -395,6 +420,7 @@ public DrPlanSummary build() { this.timeCreated, this.timeUpdated, this.lifecycleState, + this.lifecycleSubState, this.lifeCycleDetails, this.freeformTags, this.definedTags, @@ -437,6 +463,9 @@ public Builder copy(DrPlanSummary model) { if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } + if (model.wasPropertyExplicitlySet("lifecycleSubState")) { + this.lifecycleSubState(model.getLifecycleSubState()); + } if (model.wasPropertyExplicitlySet("lifeCycleDetails")) { this.lifeCycleDetails(model.getLifeCycleDetails()); } @@ -668,6 +697,26 @@ public DrPlanLifecycleState getLifecycleState() { return lifecycleState; } + /** + * The current sub state of the DR plan. + *

+ * Example: {@code NEEDS_REFRESH} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleSubState") + private final DrPlanLifecycleSubState lifecycleSubState; + + /** + * The current sub state of the DR plan. + *

+ * Example: {@code NEEDS_REFRESH} + * + * @return the value + **/ + public DrPlanLifecycleSubState getLifecycleSubState() { + return lifecycleSubState; + } + /** * A message describing the DR plan's current state in more detail. * @@ -769,6 +818,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleSubState=").append(String.valueOf(this.lifecycleSubState)); sb.append(", lifeCycleDetails=").append(String.valueOf(this.lifeCycleDetails)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); @@ -798,6 +848,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleSubState, other.lifecycleSubState) && java.util.Objects.equals(this.lifeCycleDetails, other.lifeCycleDetails) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) @@ -831,6 +882,9 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleSubState == null ? 43 : this.lifecycleSubState.hashCode()); result = (result * PRIME) + (this.lifeCycleDetails == null ? 43 : this.lifeCycleDetails.hashCode()); diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrProtectionGroupMember.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrProtectionGroupMember.java index d22dda5bef1..43c9bad0df3 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrProtectionGroupMember.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrProtectionGroupMember.java @@ -30,6 +30,10 @@ value = DrProtectionGroupMemberNetworkLoadBalancer.class, name = "NETWORK_LOAD_BALANCER" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DrProtectionGroupMemberObjectStorageBucket.class, + name = "OBJECT_STORAGE_BUCKET" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = DrProtectionGroupMemberFileSystem.class, name = "FILE_SYSTEM" @@ -54,6 +58,10 @@ value = DrProtectionGroupMemberComputeInstanceNonMovable.class, name = "COMPUTE_INSTANCE_NON_MOVABLE" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DrProtectionGroupMemberAutonomousContainerDatabase.class, + name = "AUTONOMOUS_CONTAINER_DATABASE" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = DrProtectionGroupMemberDatabase.class, name = "DATABASE" diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrProtectionGroupMemberAutonomousContainerDatabase.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrProtectionGroupMemberAutonomousContainerDatabase.java new file mode 100644 index 00000000000..1d2a5d2c65c --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrProtectionGroupMemberAutonomousContainerDatabase.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.model; + +/** + * The properties for an Autonomous Container Database member of a DR protection group. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DrProtectionGroupMemberAutonomousContainerDatabase.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "memberType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DrProtectionGroupMemberAutonomousContainerDatabase + extends DrProtectionGroupMember { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("memberId") + private String memberId; + + public Builder memberId(String memberId) { + this.memberId = memberId; + this.__explicitlySet__.add("memberId"); + return this; + } + /** + * The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("connectionStringType") + private AutonomousContainerDatabaseSnapshotStandbyConnectionStringType connectionStringType; + + /** + * The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. + * + * @param connectionStringType the value to set + * @return this builder + **/ + public Builder connectionStringType( + AutonomousContainerDatabaseSnapshotStandbyConnectionStringType + connectionStringType) { + this.connectionStringType = connectionStringType; + this.__explicitlySet__.add("connectionStringType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DrProtectionGroupMemberAutonomousContainerDatabase build() { + DrProtectionGroupMemberAutonomousContainerDatabase model = + new DrProtectionGroupMemberAutonomousContainerDatabase( + this.memberId, this.connectionStringType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DrProtectionGroupMemberAutonomousContainerDatabase model) { + if (model.wasPropertyExplicitlySet("memberId")) { + this.memberId(model.getMemberId()); + } + if (model.wasPropertyExplicitlySet("connectionStringType")) { + this.connectionStringType(model.getConnectionStringType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DrProtectionGroupMemberAutonomousContainerDatabase( + String memberId, + AutonomousContainerDatabaseSnapshotStandbyConnectionStringType connectionStringType) { + super(memberId); + this.connectionStringType = connectionStringType; + } + + /** + * The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("connectionStringType") + private final AutonomousContainerDatabaseSnapshotStandbyConnectionStringType + connectionStringType; + + /** + * The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. + * + * @return the value + **/ + public AutonomousContainerDatabaseSnapshotStandbyConnectionStringType + getConnectionStringType() { + return connectionStringType; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DrProtectionGroupMemberAutonomousContainerDatabase("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", connectionStringType=").append(String.valueOf(this.connectionStringType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DrProtectionGroupMemberAutonomousContainerDatabase)) { + return false; + } + + DrProtectionGroupMemberAutonomousContainerDatabase other = + (DrProtectionGroupMemberAutonomousContainerDatabase) o; + return java.util.Objects.equals(this.connectionStringType, other.connectionStringType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.connectionStringType == null + ? 43 + : this.connectionStringType.hashCode()); + return result; + } +} diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrProtectionGroupMemberAutonomousDatabase.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrProtectionGroupMemberAutonomousDatabase.java index e58056263ec..a044504bd32 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrProtectionGroupMemberAutonomousDatabase.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrProtectionGroupMemberAutonomousDatabase.java @@ -36,13 +36,64 @@ public Builder memberId(String memberId) { this.__explicitlySet__.add("memberId"); return this; } + /** + * This specifies the mechanism used to create a temporary Autonomous Database instance for DR Drills. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-clone-about.html for information about these clone types. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-data-guard-snapshot-standby.html for information about snapshot standby. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDatabaseStandbyTypeForDrDrills") + private AutonomousDatabaseStandbyTypeForDrDrills autonomousDatabaseStandbyTypeForDrDrills; + + /** + * This specifies the mechanism used to create a temporary Autonomous Database instance for DR Drills. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-clone-about.html for information about these clone types. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-data-guard-snapshot-standby.html for information about snapshot standby. + * + * @param autonomousDatabaseStandbyTypeForDrDrills the value to set + * @return this builder + **/ + public Builder autonomousDatabaseStandbyTypeForDrDrills( + AutonomousDatabaseStandbyTypeForDrDrills autonomousDatabaseStandbyTypeForDrDrills) { + this.autonomousDatabaseStandbyTypeForDrDrills = + autonomousDatabaseStandbyTypeForDrDrills; + this.__explicitlySet__.add("autonomousDatabaseStandbyTypeForDrDrills"); + return this; + } + /** + * The OCID of the vault secret where the database SYSDBA password is stored. + * This password is required and used for performing database DR Drill operations when using full clone. + *

+ * Example: {@code ocid1.vaultsecret.oc1..uniqueID} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordVaultSecretId") + private String passwordVaultSecretId; + + /** + * The OCID of the vault secret where the database SYSDBA password is stored. + * This password is required and used for performing database DR Drill operations when using full clone. + *

+ * Example: {@code ocid1.vaultsecret.oc1..uniqueID} + * + * @param passwordVaultSecretId the value to set + * @return this builder + **/ + public Builder passwordVaultSecretId(String passwordVaultSecretId) { + this.passwordVaultSecretId = passwordVaultSecretId; + this.__explicitlySet__.add("passwordVaultSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public DrProtectionGroupMemberAutonomousDatabase build() { DrProtectionGroupMemberAutonomousDatabase model = - new DrProtectionGroupMemberAutonomousDatabase(this.memberId); + new DrProtectionGroupMemberAutonomousDatabase( + this.memberId, + this.autonomousDatabaseStandbyTypeForDrDrills, + this.passwordVaultSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -54,6 +105,13 @@ public Builder copy(DrProtectionGroupMemberAutonomousDatabase model) { if (model.wasPropertyExplicitlySet("memberId")) { this.memberId(model.getMemberId()); } + if (model.wasPropertyExplicitlySet("autonomousDatabaseStandbyTypeForDrDrills")) { + this.autonomousDatabaseStandbyTypeForDrDrills( + model.getAutonomousDatabaseStandbyTypeForDrDrills()); + } + if (model.wasPropertyExplicitlySet("passwordVaultSecretId")) { + this.passwordVaultSecretId(model.getPasswordVaultSecretId()); + } return this; } } @@ -70,8 +128,55 @@ public Builder toBuilder() { } @Deprecated - public DrProtectionGroupMemberAutonomousDatabase(String memberId) { + public DrProtectionGroupMemberAutonomousDatabase( + String memberId, + AutonomousDatabaseStandbyTypeForDrDrills autonomousDatabaseStandbyTypeForDrDrills, + String passwordVaultSecretId) { super(memberId); + this.autonomousDatabaseStandbyTypeForDrDrills = autonomousDatabaseStandbyTypeForDrDrills; + this.passwordVaultSecretId = passwordVaultSecretId; + } + + /** + * This specifies the mechanism used to create a temporary Autonomous Database instance for DR Drills. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-clone-about.html for information about these clone types. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-data-guard-snapshot-standby.html for information about snapshot standby. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDatabaseStandbyTypeForDrDrills") + private final AutonomousDatabaseStandbyTypeForDrDrills autonomousDatabaseStandbyTypeForDrDrills; + + /** + * This specifies the mechanism used to create a temporary Autonomous Database instance for DR Drills. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-clone-about.html for information about these clone types. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-data-guard-snapshot-standby.html for information about snapshot standby. + * + * @return the value + **/ + public AutonomousDatabaseStandbyTypeForDrDrills getAutonomousDatabaseStandbyTypeForDrDrills() { + return autonomousDatabaseStandbyTypeForDrDrills; + } + + /** + * The OCID of the vault secret where the database SYSDBA password is stored. + * This password is required and used for performing database DR Drill operations when using full clone. + *

+ * Example: {@code ocid1.vaultsecret.oc1..uniqueID} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordVaultSecretId") + private final String passwordVaultSecretId; + + /** + * The OCID of the vault secret where the database SYSDBA password is stored. + * This password is required and used for performing database DR Drill operations when using full clone. + *

+ * Example: {@code ocid1.vaultsecret.oc1..uniqueID} + * + * @return the value + **/ + public String getPasswordVaultSecretId() { + return passwordVaultSecretId; } @Override @@ -88,6 +193,9 @@ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("DrProtectionGroupMemberAutonomousDatabase("); sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", autonomousDatabaseStandbyTypeForDrDrills=") + .append(String.valueOf(this.autonomousDatabaseStandbyTypeForDrDrills)); + sb.append(", passwordVaultSecretId=").append(String.valueOf(this.passwordVaultSecretId)); sb.append(")"); return sb.toString(); } @@ -103,13 +211,27 @@ public boolean equals(Object o) { DrProtectionGroupMemberAutonomousDatabase other = (DrProtectionGroupMemberAutonomousDatabase) o; - return super.equals(other); + return java.util.Objects.equals( + this.autonomousDatabaseStandbyTypeForDrDrills, + other.autonomousDatabaseStandbyTypeForDrDrills) + && java.util.Objects.equals(this.passwordVaultSecretId, other.passwordVaultSecretId) + && super.equals(other); } @Override public int hashCode() { final int PRIME = 59; int result = super.hashCode(); + result = + (result * PRIME) + + (this.autonomousDatabaseStandbyTypeForDrDrills == null + ? 43 + : this.autonomousDatabaseStandbyTypeForDrDrills.hashCode()); + result = + (result * PRIME) + + (this.passwordVaultSecretId == null + ? 43 + : this.passwordVaultSecretId.hashCode()); return result; } } diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrProtectionGroupMemberObjectStorageBucket.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrProtectionGroupMemberObjectStorageBucket.java new file mode 100644 index 00000000000..d7a2f581166 --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrProtectionGroupMemberObjectStorageBucket.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.model; + +/** + * The properties for a object storage bucket member of a DR protection group. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DrProtectionGroupMemberObjectStorageBucket.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "memberType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DrProtectionGroupMemberObjectStorageBucket extends DrProtectionGroupMember { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("memberId") + private String memberId; + + public Builder memberId(String memberId) { + this.memberId = memberId; + this.__explicitlySet__.add("memberId"); + return this; + } + /** + * The namespace in object storage (Note - this is usually the tenancy name). + *

+ * Example: {@code myocitenancy} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private String namespaceName; + + /** + * The namespace in object storage (Note - this is usually the tenancy name). + *

+ * Example: {@code myocitenancy} + * + * @param namespaceName the value to set + * @return this builder + **/ + public Builder namespaceName(String namespaceName) { + this.namespaceName = namespaceName; + this.__explicitlySet__.add("namespaceName"); + return this; + } + /** + * The bucket name inside the object storage namespace. + *

+ * Example: {@code bucket_name} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private String bucketName; + + /** + * The bucket name inside the object storage namespace. + *

+ * Example: {@code bucket_name} + * + * @param bucketName the value to set + * @return this builder + **/ + public Builder bucketName(String bucketName) { + this.bucketName = bucketName; + this.__explicitlySet__.add("bucketName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DrProtectionGroupMemberObjectStorageBucket build() { + DrProtectionGroupMemberObjectStorageBucket model = + new DrProtectionGroupMemberObjectStorageBucket( + this.memberId, this.namespaceName, this.bucketName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DrProtectionGroupMemberObjectStorageBucket model) { + if (model.wasPropertyExplicitlySet("memberId")) { + this.memberId(model.getMemberId()); + } + if (model.wasPropertyExplicitlySet("namespaceName")) { + this.namespaceName(model.getNamespaceName()); + } + if (model.wasPropertyExplicitlySet("bucketName")) { + this.bucketName(model.getBucketName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DrProtectionGroupMemberObjectStorageBucket( + String memberId, String namespaceName, String bucketName) { + super(memberId); + this.namespaceName = namespaceName; + this.bucketName = bucketName; + } + + /** + * The namespace in object storage (Note - this is usually the tenancy name). + *

+ * Example: {@code myocitenancy} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private final String namespaceName; + + /** + * The namespace in object storage (Note - this is usually the tenancy name). + *

+ * Example: {@code myocitenancy} + * + * @return the value + **/ + public String getNamespaceName() { + return namespaceName; + } + + /** + * The bucket name inside the object storage namespace. + *

+ * Example: {@code bucket_name} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private final String bucketName; + + /** + * The bucket name inside the object storage namespace. + *

+ * Example: {@code bucket_name} + * + * @return the value + **/ + public String getBucketName() { + return bucketName; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DrProtectionGroupMemberObjectStorageBucket("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", namespaceName=").append(String.valueOf(this.namespaceName)); + sb.append(", bucketName=").append(String.valueOf(this.bucketName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DrProtectionGroupMemberObjectStorageBucket)) { + return false; + } + + DrProtectionGroupMemberObjectStorageBucket other = + (DrProtectionGroupMemberObjectStorageBucket) o; + return java.util.Objects.equals(this.namespaceName, other.namespaceName) + && java.util.Objects.equals(this.bucketName, other.bucketName) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.namespaceName == null ? 43 : this.namespaceName.hashCode()); + result = (result * PRIME) + (this.bucketName == null ? 43 : this.bucketName.hashCode()); + return result; + } +} diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrProtectionGroupMemberType.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrProtectionGroupMemberType.java index ba4afca434c..822fe99634b 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrProtectionGroupMemberType.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/DrProtectionGroupMemberType.java @@ -12,6 +12,7 @@ * - VOLUME_GROUP - A volume group. * - DATABASE - An Oracle Database instance from Base Database service, or Exadata Database service. * - AUTONOMOUS_DATABASE - An Oracle Autonomous Database Serverless. + * - AUTONOMOUS_CONTAINER_DATABASE - An Oracle Autonomous Container Database. * - LOAD_BALANCER - A load balancer. * - NETWORK_LOAD_BALANCER - A network load balancer. * - FILE_SYSTEM - A file system. @@ -25,9 +26,11 @@ public enum DrProtectionGroupMemberType { VolumeGroup("VOLUME_GROUP"), Database("DATABASE"), AutonomousDatabase("AUTONOMOUS_DATABASE"), + AutonomousContainerDatabase("AUTONOMOUS_CONTAINER_DATABASE"), LoadBalancer("LOAD_BALANCER"), NetworkLoadBalancer("NETWORK_LOAD_BALANCER"), FileSystem("FILE_SYSTEM"), + ObjectStorageBucket("OBJECT_STORAGE_BUCKET"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/OperationType.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/OperationType.java index fee5252bad6..2d092e0b7af 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/OperationType.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/OperationType.java @@ -19,6 +19,8 @@ public enum OperationType { CreateDrPlan("CREATE_DR_PLAN"), UpdateDrPlan("UPDATE_DR_PLAN"), DeleteDrPlan("DELETE_DR_PLAN"), + RefreshDrPlan("REFRESH_DR_PLAN"), + VerifyDrPlan("VERIFY_DR_PLAN"), CreateDrPlanExecution("CREATE_DR_PLAN_EXECUTION"), UpdateDrPlanExecution("UPDATE_DR_PLAN_EXECUTION"), DeleteDrPlanExecution("DELETE_DR_PLAN_EXECUTION"), diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/RefreshDrPlanDefaultDetails.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/RefreshDrPlanDefaultDetails.java new file mode 100644 index 00000000000..a74708c9f72 --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/RefreshDrPlanDefaultDetails.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.model; + +/** + * The default type. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RefreshDrPlanDefaultDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RefreshDrPlanDefaultDetails extends RefreshDrPlanDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RefreshDrPlanDefaultDetails build() { + RefreshDrPlanDefaultDetails model = new RefreshDrPlanDefaultDetails(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RefreshDrPlanDefaultDetails model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public RefreshDrPlanDefaultDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RefreshDrPlanDefaultDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RefreshDrPlanDefaultDetails)) { + return false; + } + + RefreshDrPlanDefaultDetails other = (RefreshDrPlanDefaultDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/RefreshDrPlanDetails.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/RefreshDrPlanDetails.java new file mode 100644 index 00000000000..e69a612b5b9 --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/RefreshDrPlanDetails.java @@ -0,0 +1,112 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.model; + +/** + * The details for refreshing a DR plan. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type", + defaultImpl = RefreshDrPlanDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = RefreshDrPlanDefaultDetails.class, + name = "DEFAULT" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class RefreshDrPlanDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected RefreshDrPlanDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RefreshDrPlanDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RefreshDrPlanDetails)) { + return false; + } + + RefreshDrPlanDetails other = (RefreshDrPlanDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The default type. + * + **/ + public enum Type { + Default("DEFAULT"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + map.put(v.getValue(), v); + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Type: " + key); + } + }; +} diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails.java new file mode 100644 index 00000000000..618f6054278 --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.model; + +/** + * Update properties for an Autonomous Container Database member. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "memberType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails + extends UpdateDrProtectionGroupMemberDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("memberId") + private String memberId; + + public Builder memberId(String memberId) { + this.memberId = memberId; + this.__explicitlySet__.add("memberId"); + return this; + } + /** + * The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("connectionStringType") + private AutonomousContainerDatabaseSnapshotStandbyConnectionStringType connectionStringType; + + /** + * The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. + * + * @param connectionStringType the value to set + * @return this builder + **/ + public Builder connectionStringType( + AutonomousContainerDatabaseSnapshotStandbyConnectionStringType + connectionStringType) { + this.connectionStringType = connectionStringType; + this.__explicitlySet__.add("connectionStringType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails build() { + UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails model = + new UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails( + this.memberId, this.connectionStringType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails model) { + if (model.wasPropertyExplicitlySet("memberId")) { + this.memberId(model.getMemberId()); + } + if (model.wasPropertyExplicitlySet("connectionStringType")) { + this.connectionStringType(model.getConnectionStringType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails( + String memberId, + AutonomousContainerDatabaseSnapshotStandbyConnectionStringType connectionStringType) { + super(memberId); + this.connectionStringType = connectionStringType; + } + + /** + * The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("connectionStringType") + private final AutonomousContainerDatabaseSnapshotStandbyConnectionStringType + connectionStringType; + + /** + * The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. + * + * @return the value + **/ + public AutonomousContainerDatabaseSnapshotStandbyConnectionStringType + getConnectionStringType() { + return connectionStringType; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", connectionStringType=").append(String.valueOf(this.connectionStringType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails)) { + return false; + } + + UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails other = + (UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails) o; + return java.util.Objects.equals(this.connectionStringType, other.connectionStringType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.connectionStringType == null + ? 43 + : this.connectionStringType.hashCode()); + return result; + } +} diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/UpdateDrProtectionGroupMemberAutonomousDatabaseDetails.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/UpdateDrProtectionGroupMemberAutonomousDatabaseDetails.java index ad99b70b1b4..7c70fef2d8c 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/UpdateDrProtectionGroupMemberAutonomousDatabaseDetails.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/UpdateDrProtectionGroupMemberAutonomousDatabaseDetails.java @@ -36,13 +36,64 @@ public Builder memberId(String memberId) { this.__explicitlySet__.add("memberId"); return this; } + /** + * This specifies the mechanism used to create a temporary Autonomous Database instance for DR Drills. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-clone-about.html for information about these clone types. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-data-guard-snapshot-standby.html for information about snapshot standby. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDatabaseStandbyTypeForDrDrills") + private AutonomousDatabaseStandbyTypeForDrDrills autonomousDatabaseStandbyTypeForDrDrills; + + /** + * This specifies the mechanism used to create a temporary Autonomous Database instance for DR Drills. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-clone-about.html for information about these clone types. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-data-guard-snapshot-standby.html for information about snapshot standby. + * + * @param autonomousDatabaseStandbyTypeForDrDrills the value to set + * @return this builder + **/ + public Builder autonomousDatabaseStandbyTypeForDrDrills( + AutonomousDatabaseStandbyTypeForDrDrills autonomousDatabaseStandbyTypeForDrDrills) { + this.autonomousDatabaseStandbyTypeForDrDrills = + autonomousDatabaseStandbyTypeForDrDrills; + this.__explicitlySet__.add("autonomousDatabaseStandbyTypeForDrDrills"); + return this; + } + /** + * The OCID of the vault secret where the database SYSDBA password is stored. + * This password is required and used for performing database DR Drill operations when using full clone. + *

+ * Example: {@code ocid1.vaultsecret.oc1..uniqueID} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordVaultSecretId") + private String passwordVaultSecretId; + + /** + * The OCID of the vault secret where the database SYSDBA password is stored. + * This password is required and used for performing database DR Drill operations when using full clone. + *

+ * Example: {@code ocid1.vaultsecret.oc1..uniqueID} + * + * @param passwordVaultSecretId the value to set + * @return this builder + **/ + public Builder passwordVaultSecretId(String passwordVaultSecretId) { + this.passwordVaultSecretId = passwordVaultSecretId; + this.__explicitlySet__.add("passwordVaultSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public UpdateDrProtectionGroupMemberAutonomousDatabaseDetails build() { UpdateDrProtectionGroupMemberAutonomousDatabaseDetails model = - new UpdateDrProtectionGroupMemberAutonomousDatabaseDetails(this.memberId); + new UpdateDrProtectionGroupMemberAutonomousDatabaseDetails( + this.memberId, + this.autonomousDatabaseStandbyTypeForDrDrills, + this.passwordVaultSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -54,6 +105,13 @@ public Builder copy(UpdateDrProtectionGroupMemberAutonomousDatabaseDetails model if (model.wasPropertyExplicitlySet("memberId")) { this.memberId(model.getMemberId()); } + if (model.wasPropertyExplicitlySet("autonomousDatabaseStandbyTypeForDrDrills")) { + this.autonomousDatabaseStandbyTypeForDrDrills( + model.getAutonomousDatabaseStandbyTypeForDrDrills()); + } + if (model.wasPropertyExplicitlySet("passwordVaultSecretId")) { + this.passwordVaultSecretId(model.getPasswordVaultSecretId()); + } return this; } } @@ -70,8 +128,55 @@ public Builder toBuilder() { } @Deprecated - public UpdateDrProtectionGroupMemberAutonomousDatabaseDetails(String memberId) { + public UpdateDrProtectionGroupMemberAutonomousDatabaseDetails( + String memberId, + AutonomousDatabaseStandbyTypeForDrDrills autonomousDatabaseStandbyTypeForDrDrills, + String passwordVaultSecretId) { super(memberId); + this.autonomousDatabaseStandbyTypeForDrDrills = autonomousDatabaseStandbyTypeForDrDrills; + this.passwordVaultSecretId = passwordVaultSecretId; + } + + /** + * This specifies the mechanism used to create a temporary Autonomous Database instance for DR Drills. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-clone-about.html for information about these clone types. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-data-guard-snapshot-standby.html for information about snapshot standby. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autonomousDatabaseStandbyTypeForDrDrills") + private final AutonomousDatabaseStandbyTypeForDrDrills autonomousDatabaseStandbyTypeForDrDrills; + + /** + * This specifies the mechanism used to create a temporary Autonomous Database instance for DR Drills. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-clone-about.html for information about these clone types. + * See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-data-guard-snapshot-standby.html for information about snapshot standby. + * + * @return the value + **/ + public AutonomousDatabaseStandbyTypeForDrDrills getAutonomousDatabaseStandbyTypeForDrDrills() { + return autonomousDatabaseStandbyTypeForDrDrills; + } + + /** + * The OCID of the vault secret where the database SYSDBA password is stored. + * This password is required and used for performing database DR Drill operations when using full clone. + *

+ * Example: {@code ocid1.vaultsecret.oc1..uniqueID} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordVaultSecretId") + private final String passwordVaultSecretId; + + /** + * The OCID of the vault secret where the database SYSDBA password is stored. + * This password is required and used for performing database DR Drill operations when using full clone. + *

+ * Example: {@code ocid1.vaultsecret.oc1..uniqueID} + * + * @return the value + **/ + public String getPasswordVaultSecretId() { + return passwordVaultSecretId; } @Override @@ -88,6 +193,9 @@ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("UpdateDrProtectionGroupMemberAutonomousDatabaseDetails("); sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", autonomousDatabaseStandbyTypeForDrDrills=") + .append(String.valueOf(this.autonomousDatabaseStandbyTypeForDrDrills)); + sb.append(", passwordVaultSecretId=").append(String.valueOf(this.passwordVaultSecretId)); sb.append(")"); return sb.toString(); } @@ -103,13 +211,27 @@ public boolean equals(Object o) { UpdateDrProtectionGroupMemberAutonomousDatabaseDetails other = (UpdateDrProtectionGroupMemberAutonomousDatabaseDetails) o; - return super.equals(other); + return java.util.Objects.equals( + this.autonomousDatabaseStandbyTypeForDrDrills, + other.autonomousDatabaseStandbyTypeForDrDrills) + && java.util.Objects.equals(this.passwordVaultSecretId, other.passwordVaultSecretId) + && super.equals(other); } @Override public int hashCode() { final int PRIME = 59; int result = super.hashCode(); + result = + (result * PRIME) + + (this.autonomousDatabaseStandbyTypeForDrDrills == null + ? 43 + : this.autonomousDatabaseStandbyTypeForDrDrills.hashCode()); + result = + (result * PRIME) + + (this.passwordVaultSecretId == null + ? 43 + : this.passwordVaultSecretId.hashCode()); return result; } } diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/UpdateDrProtectionGroupMemberDetails.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/UpdateDrProtectionGroupMemberDetails.java index f412fb8ab99..62fba62f7f1 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/UpdateDrProtectionGroupMemberDetails.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/UpdateDrProtectionGroupMemberDetails.java @@ -46,10 +46,18 @@ value = UpdateDrProtectionGroupMemberComputeInstanceNonMovableDetails.class, name = "COMPUTE_INSTANCE_NON_MOVABLE" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails.class, + name = "AUTONOMOUS_CONTAINER_DATABASE" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = UpdateDrProtectionGroupMemberLoadBalancerDetails.class, name = "LOAD_BALANCER" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = UpdateDrProtectionGroupMemberObjectStorageBucketDetails.class, + name = "OBJECT_STORAGE_BUCKET" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = UpdateDrProtectionGroupMemberComputeInstanceMovableDetails.class, name = "COMPUTE_INSTANCE_MOVABLE" diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/UpdateDrProtectionGroupMemberObjectStorageBucketDetails.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/UpdateDrProtectionGroupMemberObjectStorageBucketDetails.java new file mode 100644 index 00000000000..336269b7a24 --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/UpdateDrProtectionGroupMemberObjectStorageBucketDetails.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.model; + +/** + * Update properties for a object storage bucket member. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateDrProtectionGroupMemberObjectStorageBucketDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "memberType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateDrProtectionGroupMemberObjectStorageBucketDetails + extends UpdateDrProtectionGroupMemberDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("memberId") + private String memberId; + + public Builder memberId(String memberId) { + this.memberId = memberId; + this.__explicitlySet__.add("memberId"); + return this; + } + /** + * The namespace in object storage (Note - this is usually the tenancy name). + *

+ * Example: {@code myocitenancy} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private String namespaceName; + + /** + * The namespace in object storage (Note - this is usually the tenancy name). + *

+ * Example: {@code myocitenancy} + * + * @param namespaceName the value to set + * @return this builder + **/ + public Builder namespaceName(String namespaceName) { + this.namespaceName = namespaceName; + this.__explicitlySet__.add("namespaceName"); + return this; + } + /** + * The bucket name inside the object storage namespace. + *

+ * Example: {@code bucket_name} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private String bucketName; + + /** + * The bucket name inside the object storage namespace. + *

+ * Example: {@code bucket_name} + * + * @param bucketName the value to set + * @return this builder + **/ + public Builder bucketName(String bucketName) { + this.bucketName = bucketName; + this.__explicitlySet__.add("bucketName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateDrProtectionGroupMemberObjectStorageBucketDetails build() { + UpdateDrProtectionGroupMemberObjectStorageBucketDetails model = + new UpdateDrProtectionGroupMemberObjectStorageBucketDetails( + this.memberId, this.namespaceName, this.bucketName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateDrProtectionGroupMemberObjectStorageBucketDetails model) { + if (model.wasPropertyExplicitlySet("memberId")) { + this.memberId(model.getMemberId()); + } + if (model.wasPropertyExplicitlySet("namespaceName")) { + this.namespaceName(model.getNamespaceName()); + } + if (model.wasPropertyExplicitlySet("bucketName")) { + this.bucketName(model.getBucketName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public UpdateDrProtectionGroupMemberObjectStorageBucketDetails( + String memberId, String namespaceName, String bucketName) { + super(memberId); + this.namespaceName = namespaceName; + this.bucketName = bucketName; + } + + /** + * The namespace in object storage (Note - this is usually the tenancy name). + *

+ * Example: {@code myocitenancy} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private final String namespaceName; + + /** + * The namespace in object storage (Note - this is usually the tenancy name). + *

+ * Example: {@code myocitenancy} + * + * @return the value + **/ + public String getNamespaceName() { + return namespaceName; + } + + /** + * The bucket name inside the object storage namespace. + *

+ * Example: {@code bucket_name} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private final String bucketName; + + /** + * The bucket name inside the object storage namespace. + *

+ * Example: {@code bucket_name} + * + * @return the value + **/ + public String getBucketName() { + return bucketName; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateDrProtectionGroupMemberObjectStorageBucketDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", namespaceName=").append(String.valueOf(this.namespaceName)); + sb.append(", bucketName=").append(String.valueOf(this.bucketName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateDrProtectionGroupMemberObjectStorageBucketDetails)) { + return false; + } + + UpdateDrProtectionGroupMemberObjectStorageBucketDetails other = + (UpdateDrProtectionGroupMemberObjectStorageBucketDetails) o; + return java.util.Objects.equals(this.namespaceName, other.namespaceName) + && java.util.Objects.equals(this.bucketName, other.bucketName) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.namespaceName == null ? 43 : this.namespaceName.hashCode()); + result = (result * PRIME) + (this.bucketName == null ? 43 : this.bucketName.hashCode()); + return result; + } +} diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/VerifyDrPlanDefaultDetails.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/VerifyDrPlanDefaultDetails.java new file mode 100644 index 00000000000..283fbfdf219 --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/VerifyDrPlanDefaultDetails.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.model; + +/** + * The default type. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = VerifyDrPlanDefaultDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class VerifyDrPlanDefaultDetails extends VerifyDrPlanDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public VerifyDrPlanDefaultDetails build() { + VerifyDrPlanDefaultDetails model = new VerifyDrPlanDefaultDetails(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(VerifyDrPlanDefaultDetails model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public VerifyDrPlanDefaultDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("VerifyDrPlanDefaultDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof VerifyDrPlanDefaultDetails)) { + return false; + } + + VerifyDrPlanDefaultDetails other = (VerifyDrPlanDefaultDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/VerifyDrPlanDetails.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/VerifyDrPlanDetails.java new file mode 100644 index 00000000000..db43b1eeae6 --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/model/VerifyDrPlanDetails.java @@ -0,0 +1,112 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.model; + +/** + * The details for verifying a DR plan. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type", + defaultImpl = VerifyDrPlanDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = VerifyDrPlanDefaultDetails.class, + name = "DEFAULT" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class VerifyDrPlanDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected VerifyDrPlanDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("VerifyDrPlanDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof VerifyDrPlanDetails)) { + return false; + } + + VerifyDrPlanDetails other = (VerifyDrPlanDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The default type. + * + **/ + public enum Type { + Default("DEFAULT"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + map.put(v.getValue(), v); + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Type: " + key); + } + }; +} diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/requests/ListDrPlanExecutionsRequest.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/requests/ListDrPlanExecutionsRequest.java index f509f804739..f90df20ec56 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/requests/ListDrPlanExecutionsRequest.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/requests/ListDrPlanExecutionsRequest.java @@ -59,17 +59,6 @@ public com.oracle.bmc.disasterrecovery.model.DrPlanExecutionLifecycleState getLi public String getDrPlanExecutionId() { return drPlanExecutionId; } - /** - * The DR plan execution type. - */ - private com.oracle.bmc.disasterrecovery.model.DrPlanExecutionType drPlanExecutionType; - - /** - * The DR plan execution type. - */ - public com.oracle.bmc.disasterrecovery.model.DrPlanExecutionType getDrPlanExecutionType() { - return drPlanExecutionType; - } /** * A filter to return only resources that match the given display name. *

@@ -290,23 +279,6 @@ public Builder drPlanExecutionId(String drPlanExecutionId) { return this; } - /** - * The DR plan execution type. - */ - private com.oracle.bmc.disasterrecovery.model.DrPlanExecutionType drPlanExecutionType = - null; - - /** - * The DR plan execution type. - * @param drPlanExecutionType the value to set - * @return this builder instance - */ - public Builder drPlanExecutionType( - com.oracle.bmc.disasterrecovery.model.DrPlanExecutionType drPlanExecutionType) { - this.drPlanExecutionType = drPlanExecutionType; - return this; - } - /** * A filter to return only resources that match the given display name. *

@@ -472,7 +444,6 @@ public Builder copy(ListDrPlanExecutionsRequest o) { drProtectionGroupId(o.getDrProtectionGroupId()); lifecycleState(o.getLifecycleState()); drPlanExecutionId(o.getDrPlanExecutionId()); - drPlanExecutionType(o.getDrPlanExecutionType()); displayName(o.getDisplayName()); limit(o.getLimit()); page(o.getPage()); @@ -514,7 +485,6 @@ public ListDrPlanExecutionsRequest buildWithoutInvocationCallback() { request.drProtectionGroupId = drProtectionGroupId; request.lifecycleState = lifecycleState; request.drPlanExecutionId = drPlanExecutionId; - request.drPlanExecutionType = drPlanExecutionType; request.displayName = displayName; request.limit = limit; request.page = page; @@ -522,7 +492,7 @@ public ListDrPlanExecutionsRequest buildWithoutInvocationCallback() { request.sortBy = sortBy; request.opcRequestId = opcRequestId; return request; - // new ListDrPlanExecutionsRequest(drProtectionGroupId, lifecycleState, drPlanExecutionId, drPlanExecutionType, displayName, limit, page, sortOrder, sortBy, opcRequestId); + // new ListDrPlanExecutionsRequest(drProtectionGroupId, lifecycleState, drPlanExecutionId, displayName, limit, page, sortOrder, sortBy, opcRequestId); } } @@ -535,7 +505,6 @@ public Builder toBuilder() { .drProtectionGroupId(drProtectionGroupId) .lifecycleState(lifecycleState) .drPlanExecutionId(drPlanExecutionId) - .drPlanExecutionType(drPlanExecutionType) .displayName(displayName) .limit(limit) .page(page) @@ -560,7 +529,6 @@ public String toString() { sb.append(",drProtectionGroupId=").append(String.valueOf(this.drProtectionGroupId)); sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(",drPlanExecutionId=").append(String.valueOf(this.drPlanExecutionId)); - sb.append(",drPlanExecutionType=").append(String.valueOf(this.drPlanExecutionType)); sb.append(",displayName=").append(String.valueOf(this.displayName)); sb.append(",limit=").append(String.valueOf(this.limit)); sb.append(",page=").append(String.valueOf(this.page)); @@ -585,7 +553,6 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.drProtectionGroupId, other.drProtectionGroupId) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.drPlanExecutionId, other.drPlanExecutionId) - && java.util.Objects.equals(this.drPlanExecutionType, other.drPlanExecutionType) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.limit, other.limit) && java.util.Objects.equals(this.page, other.page) @@ -609,11 +576,6 @@ public int hashCode() { result = (result * PRIME) + (this.drPlanExecutionId == null ? 43 : this.drPlanExecutionId.hashCode()); - result = - (result * PRIME) - + (this.drPlanExecutionType == null - ? 43 - : this.drPlanExecutionType.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/requests/ListDrPlansRequest.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/requests/ListDrPlansRequest.java index 53ebb320836..9d5e866d88e 100644 --- a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/requests/ListDrPlansRequest.java +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/requests/ListDrPlansRequest.java @@ -219,6 +219,19 @@ public SortBy getSortBy() { public String getOpcRequestId() { return opcRequestId; } + /** + * A filter to return only DR plans that match the given lifecycle sub-state. + * + */ + private com.oracle.bmc.disasterrecovery.model.DrPlanLifecycleSubState lifecycleSubState; + + /** + * A filter to return only DR plans that match the given lifecycle sub-state. + * + */ + public com.oracle.bmc.disasterrecovery.model.DrPlanLifecycleSubState getLifecycleSubState() { + return lifecycleSubState; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -436,6 +449,25 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * A filter to return only DR plans that match the given lifecycle sub-state. + * + */ + private com.oracle.bmc.disasterrecovery.model.DrPlanLifecycleSubState lifecycleSubState = + null; + + /** + * A filter to return only DR plans that match the given lifecycle sub-state. + * + * @param lifecycleSubState the value to set + * @return this builder instance + */ + public Builder lifecycleSubState( + com.oracle.bmc.disasterrecovery.model.DrPlanLifecycleSubState lifecycleSubState) { + this.lifecycleSubState = lifecycleSubState; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -474,6 +506,7 @@ public Builder copy(ListDrPlansRequest o) { sortOrder(o.getSortOrder()); sortBy(o.getSortBy()); opcRequestId(o.getOpcRequestId()); + lifecycleSubState(o.getLifecycleSubState()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -516,8 +549,9 @@ public ListDrPlansRequest buildWithoutInvocationCallback() { request.sortOrder = sortOrder; request.sortBy = sortBy; request.opcRequestId = opcRequestId; + request.lifecycleSubState = lifecycleSubState; return request; - // new ListDrPlansRequest(drProtectionGroupId, lifecycleState, drPlanId, drPlanType, displayName, limit, page, sortOrder, sortBy, opcRequestId); + // new ListDrPlansRequest(drProtectionGroupId, lifecycleState, drPlanId, drPlanType, displayName, limit, page, sortOrder, sortBy, opcRequestId, lifecycleSubState); } } @@ -536,7 +570,8 @@ public Builder toBuilder() { .page(page) .sortOrder(sortOrder) .sortBy(sortBy) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .lifecycleSubState(lifecycleSubState); } /** @@ -562,6 +597,7 @@ public String toString() { sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); sb.append(",sortBy=").append(String.valueOf(this.sortBy)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",lifecycleSubState=").append(String.valueOf(this.lifecycleSubState)); sb.append(")"); return sb.toString(); } @@ -586,7 +622,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.page, other.page) && java.util.Objects.equals(this.sortOrder, other.sortOrder) && java.util.Objects.equals(this.sortBy, other.sortBy) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.lifecycleSubState, other.lifecycleSubState); } @Override @@ -609,6 +646,9 @@ public int hashCode() { result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleSubState == null ? 43 : this.lifecycleSubState.hashCode()); return result; } } diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/requests/RefreshDrPlanRequest.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/requests/RefreshDrPlanRequest.java new file mode 100644 index 00000000000..4c660bae269 --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/requests/RefreshDrPlanRequest.java @@ -0,0 +1,379 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.requests; + +import com.oracle.bmc.disasterrecovery.model.*; +/** + * Example: Click here to see how to use RefreshDrPlanRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +public class RefreshDrPlanRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.disasterrecovery.model.RefreshDrPlanDetails> { + + /** + * Details for refreshing a DR plan. + */ + private com.oracle.bmc.disasterrecovery.model.RefreshDrPlanDetails refreshDrPlanDetails; + + /** + * Details for refreshing a DR plan. + */ + public com.oracle.bmc.disasterrecovery.model.RefreshDrPlanDetails getRefreshDrPlanDetails() { + return refreshDrPlanDetails; + } + /** + * The OCID of the DR plan. + *

+ * Example: {@code ocid1.drplan.oc1..uniqueID} + * + */ + private String drPlanId; + + /** + * The OCID of the DR plan. + *

+ * Example: {@code ocid1.drplan.oc1..uniqueID} + * + */ + public String getDrPlanId() { + return drPlanId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + * + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.disasterrecovery.model.RefreshDrPlanDetails getBody$() { + return refreshDrPlanDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RefreshDrPlanRequest, + com.oracle.bmc.disasterrecovery.model.RefreshDrPlanDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for refreshing a DR plan. + */ + private com.oracle.bmc.disasterrecovery.model.RefreshDrPlanDetails refreshDrPlanDetails = + null; + + /** + * Details for refreshing a DR plan. + * @param refreshDrPlanDetails the value to set + * @return this builder instance + */ + public Builder refreshDrPlanDetails( + com.oracle.bmc.disasterrecovery.model.RefreshDrPlanDetails refreshDrPlanDetails) { + this.refreshDrPlanDetails = refreshDrPlanDetails; + return this; + } + + /** + * The OCID of the DR plan. + *

+ * Example: {@code ocid1.drplan.oc1..uniqueID} + * + */ + private String drPlanId = null; + + /** + * The OCID of the DR plan. + *

+ * Example: {@code ocid1.drplan.oc1..uniqueID} + * + * @param drPlanId the value to set + * @return this builder instance + */ + public Builder drPlanId(String drPlanId) { + this.drPlanId = drPlanId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + * + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RefreshDrPlanRequest o) { + refreshDrPlanDetails(o.getRefreshDrPlanDetails()); + drPlanId(o.getDrPlanId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RefreshDrPlanRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RefreshDrPlanRequest + */ + public RefreshDrPlanRequest build() { + RefreshDrPlanRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.disasterrecovery.model.RefreshDrPlanDetails body) { + refreshDrPlanDetails(body); + return this; + } + + /** + * Build the instance of RefreshDrPlanRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RefreshDrPlanRequest + */ + public RefreshDrPlanRequest buildWithoutInvocationCallback() { + RefreshDrPlanRequest request = new RefreshDrPlanRequest(); + request.refreshDrPlanDetails = refreshDrPlanDetails; + request.drPlanId = drPlanId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new RefreshDrPlanRequest(refreshDrPlanDetails, drPlanId, ifMatch, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .refreshDrPlanDetails(refreshDrPlanDetails) + .drPlanId(drPlanId) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",refreshDrPlanDetails=").append(String.valueOf(this.refreshDrPlanDetails)); + sb.append(",drPlanId=").append(String.valueOf(this.drPlanId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RefreshDrPlanRequest)) { + return false; + } + + RefreshDrPlanRequest other = (RefreshDrPlanRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.refreshDrPlanDetails, other.refreshDrPlanDetails) + && java.util.Objects.equals(this.drPlanId, other.drPlanId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.refreshDrPlanDetails == null + ? 43 + : this.refreshDrPlanDetails.hashCode()); + result = (result * PRIME) + (this.drPlanId == null ? 43 : this.drPlanId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/requests/VerifyDrPlanRequest.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/requests/VerifyDrPlanRequest.java new file mode 100644 index 00000000000..aeaf4055461 --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/requests/VerifyDrPlanRequest.java @@ -0,0 +1,379 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.requests; + +import com.oracle.bmc.disasterrecovery.model.*; +/** + * Example: Click here to see how to use VerifyDrPlanRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +public class VerifyDrPlanRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.disasterrecovery.model.VerifyDrPlanDetails> { + + /** + * Details for verifying a DR plan. + */ + private com.oracle.bmc.disasterrecovery.model.VerifyDrPlanDetails verifyDrPlanDetails; + + /** + * Details for verifying a DR plan. + */ + public com.oracle.bmc.disasterrecovery.model.VerifyDrPlanDetails getVerifyDrPlanDetails() { + return verifyDrPlanDetails; + } + /** + * The OCID of the DR plan. + *

+ * Example: {@code ocid1.drplan.oc1..uniqueID} + * + */ + private String drPlanId; + + /** + * The OCID of the DR plan. + *

+ * Example: {@code ocid1.drplan.oc1..uniqueID} + * + */ + public String getDrPlanId() { + return drPlanId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + * + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.disasterrecovery.model.VerifyDrPlanDetails getBody$() { + return verifyDrPlanDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + VerifyDrPlanRequest, + com.oracle.bmc.disasterrecovery.model.VerifyDrPlanDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for verifying a DR plan. + */ + private com.oracle.bmc.disasterrecovery.model.VerifyDrPlanDetails verifyDrPlanDetails = + null; + + /** + * Details for verifying a DR plan. + * @param verifyDrPlanDetails the value to set + * @return this builder instance + */ + public Builder verifyDrPlanDetails( + com.oracle.bmc.disasterrecovery.model.VerifyDrPlanDetails verifyDrPlanDetails) { + this.verifyDrPlanDetails = verifyDrPlanDetails; + return this; + } + + /** + * The OCID of the DR plan. + *

+ * Example: {@code ocid1.drplan.oc1..uniqueID} + * + */ + private String drPlanId = null; + + /** + * The OCID of the DR plan. + *

+ * Example: {@code ocid1.drplan.oc1..uniqueID} + * + * @param drPlanId the value to set + * @return this builder instance + */ + public Builder drPlanId(String drPlanId) { + this.drPlanId = drPlanId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + * + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(VerifyDrPlanRequest o) { + verifyDrPlanDetails(o.getVerifyDrPlanDetails()); + drPlanId(o.getDrPlanId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of VerifyDrPlanRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of VerifyDrPlanRequest + */ + public VerifyDrPlanRequest build() { + VerifyDrPlanRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.disasterrecovery.model.VerifyDrPlanDetails body) { + verifyDrPlanDetails(body); + return this; + } + + /** + * Build the instance of VerifyDrPlanRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of VerifyDrPlanRequest + */ + public VerifyDrPlanRequest buildWithoutInvocationCallback() { + VerifyDrPlanRequest request = new VerifyDrPlanRequest(); + request.verifyDrPlanDetails = verifyDrPlanDetails; + request.drPlanId = drPlanId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new VerifyDrPlanRequest(verifyDrPlanDetails, drPlanId, ifMatch, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .verifyDrPlanDetails(verifyDrPlanDetails) + .drPlanId(drPlanId) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",verifyDrPlanDetails=").append(String.valueOf(this.verifyDrPlanDetails)); + sb.append(",drPlanId=").append(String.valueOf(this.drPlanId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof VerifyDrPlanRequest)) { + return false; + } + + VerifyDrPlanRequest other = (VerifyDrPlanRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.verifyDrPlanDetails, other.verifyDrPlanDetails) + && java.util.Objects.equals(this.drPlanId, other.drPlanId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.verifyDrPlanDetails == null + ? 43 + : this.verifyDrPlanDetails.hashCode()); + result = (result * PRIME) + (this.drPlanId == null ? 43 : this.drPlanId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/responses/RefreshDrPlanResponse.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/responses/RefreshDrPlanResponse.java new file mode 100644 index 00000000000..bd74568b3be --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/responses/RefreshDrPlanResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.responses; + +import com.oracle.bmc.disasterrecovery.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +public class RefreshDrPlanResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier (OCID) for the asynchronous request. You can use this to query status of the asynchronous operation. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier (OCID) for the asynchronous request. You can use this to query status of the asynchronous operation. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private RefreshDrPlanResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier (OCID) for the asynchronous request. You can use this to query status of the asynchronous operation. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier (OCID) for the asynchronous request. You can use this to query status of the asynchronous operation. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RefreshDrPlanResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RefreshDrPlanResponse build() { + return new RefreshDrPlanResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RefreshDrPlanResponse)) { + return false; + } + + RefreshDrPlanResponse other = (RefreshDrPlanResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/responses/VerifyDrPlanResponse.java b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/responses/VerifyDrPlanResponse.java new file mode 100644 index 00000000000..8f6c7bcbc31 --- /dev/null +++ b/bmc-disasterrecovery/src/main/java/com/oracle/bmc/disasterrecovery/responses/VerifyDrPlanResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.disasterrecovery.responses; + +import com.oracle.bmc.disasterrecovery.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220125") +public class VerifyDrPlanResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier (OCID) for the asynchronous request. You can use this to query status of the asynchronous operation. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier (OCID) for the asynchronous request. You can use this to query status of the asynchronous operation. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private VerifyDrPlanResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier (OCID) for the asynchronous request. You can use this to query status of the asynchronous operation. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier (OCID) for the asynchronous request. You can use this to query status of the asynchronous operation. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with this OCID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(VerifyDrPlanResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public VerifyDrPlanResponse build() { + return new VerifyDrPlanResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof VerifyDrPlanResponse)) { + return false; + } + + VerifyDrPlanResponse other = (VerifyDrPlanResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-dns/pom.xml b/bmc-dns/pom.xml index b6353ae4b9d..5819e33d331 100644 --- a/bmc-dns/pom.xml +++ b/bmc-dns/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml @@ -19,12 +19,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 com.oracle.oci.sdk oci-java-sdk-workrequests - 2.73.0 + 2.79.0 diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/Dns.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/Dns.java index be225a00e22..406876cfeb3 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/Dns.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/Dns.java @@ -743,6 +743,47 @@ ListSteeringPolicyAttachmentsResponse listSteeringPolicyAttachments( */ PatchZoneRecordsResponse patchZoneRecords(PatchZoneRecordsRequest request); + /** + * Promotes a specified `DnssecKeyVersion` on the zone. + *

+ * If the `DnssecKeyVersion` identified in the request body is a key signing key (KSK) that is replacing + * another `DnssecKeyVersion`, then the old `DnssecKeyVersion` is scheduled for removal from the zone. + *

+ * For key signing keys (KSKs), you must create the DS record with the new key information **before** promoting + * the new key to establish a chain of trust. To avoid a service disruption, remove the old DS record as soon + * as its TTL (time to live) expires. + *

+ * For more information, see [DNSSEC](https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm). + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use PromoteZoneDnssecKeyVersion API. + */ + PromoteZoneDnssecKeyVersionResponse promoteZoneDnssecKeyVersion( + PromoteZoneDnssecKeyVersionRequest request); + + /** + * Stages a new `DnssecKeyVersion` on the zone. Staging is a process that generates a new \"successor\" key version + * that replaces an existing \"predecessor\" key version. + * **Note:** A new key-signing key (KSK) version is inert until you update the parent zone DS records. + *

+ * For more information, see the [DNSSEC](https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm) documentation. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use StageZoneDnssecKeyVersion API. + */ + StageZoneDnssecKeyVersionResponse stageZoneDnssecKeyVersion( + StageZoneDnssecKeyVersionRequest request); + /** * Replaces records in the specified zone at a domain with the records specified in the request body. *

@@ -897,9 +938,21 @@ UpdateSteeringPolicyAttachmentResponse updateSteeringPolicyAttachment( * Gets the pre-configured waiters available for resources for this service. * * @return The service waiters. + * @deprecated use {@link #newWaiters(WorkRequest)} instead. Otherwise, a default one will be provided + * that does not support operations that rely on the {@code WorkRequestClient} for polling. An + * {@code IllegalStateException} will be thrown for such operations. */ + @Deprecated DnsWaiters getWaiters(); + /** + * Creates a new {@code DnsWaiters} for resources for this service. + * + * @param workRequestClient The work request service client used to query for work request status + * @return The service waiters. + */ + DnsWaiters newWaiters(com.oracle.bmc.workrequests.WorkRequest workRequestClient); + /** * Gets the pre-configured paginators available for list operations in this service which may return multiple * pages of data. These paginators provide an {@link java.lang.Iterable} interface so that service responses, or diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/DnsAsync.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/DnsAsync.java index 3b84276fa38..dbe89d4ee49 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/DnsAsync.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/DnsAsync.java @@ -850,6 +850,53 @@ java.util.concurrent.Future patchZoneRecords( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Promotes a specified `DnssecKeyVersion` on the zone. + *

+ * If the `DnssecKeyVersion` identified in the request body is a key signing key (KSK) that is replacing + * another `DnssecKeyVersion`, then the old `DnssecKeyVersion` is scheduled for removal from the zone. + *

+ * For key signing keys (KSKs), you must create the DS record with the new key information **before** promoting + * the new key to establish a chain of trust. To avoid a service disruption, remove the old DS record as soon + * as its TTL (time to live) expires. + *

+ * For more information, see [DNSSEC](https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm). + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future promoteZoneDnssecKeyVersion( + PromoteZoneDnssecKeyVersionRequest request, + com.oracle.bmc.responses.AsyncHandler< + PromoteZoneDnssecKeyVersionRequest, PromoteZoneDnssecKeyVersionResponse> + handler); + + /** + * Stages a new `DnssecKeyVersion` on the zone. Staging is a process that generates a new \"successor\" key version + * that replaces an existing \"predecessor\" key version. + * **Note:** A new key-signing key (KSK) version is inert until you update the parent zone DS records. + *

+ * For more information, see the [DNSSEC](https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm) documentation. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future stageZoneDnssecKeyVersion( + StageZoneDnssecKeyVersionRequest request, + com.oracle.bmc.responses.AsyncHandler< + StageZoneDnssecKeyVersionRequest, StageZoneDnssecKeyVersionResponse> + handler); + /** * Replaces records in the specified zone at a domain with the records specified in the request body. *

diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/DnsAsyncClient.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/DnsAsyncClient.java index 1bacfde46d1..3ebc63423a5 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/DnsAsyncClient.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/DnsAsyncClient.java @@ -2447,6 +2447,118 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + promoteZoneDnssecKeyVersion( + PromoteZoneDnssecKeyVersionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + PromoteZoneDnssecKeyVersionRequest, + PromoteZoneDnssecKeyVersionResponse> + handler) { + LOG.trace("Called async promoteZoneDnssecKeyVersion"); + final PromoteZoneDnssecKeyVersionRequest interceptedRequest = + PromoteZoneDnssecKeyVersionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PromoteZoneDnssecKeyVersionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Dns", + "PromoteZoneDnssecKeyVersion", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/dns/20180115/Zone/PromoteZoneDnssecKeyVersion"); + final java.util.function.Function< + javax.ws.rs.core.Response, PromoteZoneDnssecKeyVersionResponse> + transformer = + PromoteZoneDnssecKeyVersionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + PromoteZoneDnssecKeyVersionRequest, PromoteZoneDnssecKeyVersionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + PromoteZoneDnssecKeyVersionRequest, + PromoteZoneDnssecKeyVersionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getPromoteZoneDnssecKeyVersionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + PromoteZoneDnssecKeyVersionRequest, PromoteZoneDnssecKeyVersionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future stageZoneDnssecKeyVersion( + StageZoneDnssecKeyVersionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + StageZoneDnssecKeyVersionRequest, StageZoneDnssecKeyVersionResponse> + handler) { + LOG.trace("Called async stageZoneDnssecKeyVersion"); + final StageZoneDnssecKeyVersionRequest interceptedRequest = + StageZoneDnssecKeyVersionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StageZoneDnssecKeyVersionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Dns", + "StageZoneDnssecKeyVersion", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/dns/20180115/Zone/StageZoneDnssecKeyVersion"); + final java.util.function.Function< + javax.ws.rs.core.Response, StageZoneDnssecKeyVersionResponse> + transformer = + StageZoneDnssecKeyVersionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + StageZoneDnssecKeyVersionRequest, StageZoneDnssecKeyVersionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + StageZoneDnssecKeyVersionRequest, + StageZoneDnssecKeyVersionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getStageZoneDnssecKeyVersionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + StageZoneDnssecKeyVersionRequest, StageZoneDnssecKeyVersionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateDomainRecords( UpdateDomainRecordsRequest request, diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/DnsClient.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/DnsClient.java index b6651a9c6f3..e6b9d5c8e5e 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/DnsClient.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/DnsClient.java @@ -35,6 +35,7 @@ com.oracle.bmc.http.internal.RestClient getClient() { private final DnsPaginators paginators; private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider; + private final java.util.concurrent.ExecutorService executorService; private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy apacheConnectionClosingStrategy; @@ -351,6 +352,7 @@ protected DnsClient( executorService = threadPoolExecutor; } + this.executorService = executorService; this.waiters = new DnsWaiters(executorService, this); this.paginators = new DnsPaginators(this); @@ -2154,6 +2156,94 @@ public PatchZoneRecordsResponse patchZoneRecords(PatchZoneRecordsRequest request }); } + @Override + public PromoteZoneDnssecKeyVersionResponse promoteZoneDnssecKeyVersion( + PromoteZoneDnssecKeyVersionRequest request) { + LOG.trace("Called promoteZoneDnssecKeyVersion"); + final PromoteZoneDnssecKeyVersionRequest interceptedRequest = + PromoteZoneDnssecKeyVersionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PromoteZoneDnssecKeyVersionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Dns", + "PromoteZoneDnssecKeyVersion", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/dns/20180115/Zone/PromoteZoneDnssecKeyVersion"); + java.util.function.Function + transformer = + PromoteZoneDnssecKeyVersionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getPromoteZoneDnssecKeyVersionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public StageZoneDnssecKeyVersionResponse stageZoneDnssecKeyVersion( + StageZoneDnssecKeyVersionRequest request) { + LOG.trace("Called stageZoneDnssecKeyVersion"); + final StageZoneDnssecKeyVersionRequest interceptedRequest = + StageZoneDnssecKeyVersionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StageZoneDnssecKeyVersionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Dns", + "StageZoneDnssecKeyVersion", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/dns/20180115/Zone/StageZoneDnssecKeyVersion"); + java.util.function.Function + transformer = + StageZoneDnssecKeyVersionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getStageZoneDnssecKeyVersionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateDomainRecordsResponse updateDomainRecords(UpdateDomainRecordsRequest request) { LOG.trace("Called updateDomainRecords"); @@ -2561,6 +2651,11 @@ public DnsWaiters getWaiters() { return waiters; } + @Override + public DnsWaiters newWaiters(com.oracle.bmc.workrequests.WorkRequest workRequestClient) { + return new DnsWaiters(executorService, this, workRequestClient); + } + @Override public DnsPaginators getPaginators() { return paginators; diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/DnsWaiters.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/DnsWaiters.java index 50da5bf60cf..0537163ce4f 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/DnsWaiters.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/DnsWaiters.java @@ -15,12 +15,1071 @@ */ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180115") public class DnsWaiters { - private final java.util.concurrent.ExecutorService executorService; - private final Dns client; + @javax.annotation.Nonnull private final java.util.concurrent.ExecutorService executorService; + @javax.annotation.Nonnull private final Dns client; + private final com.oracle.bmc.workrequests.WorkRequest workRequestClient; - public DnsWaiters(java.util.concurrent.ExecutorService executorService, Dns client) { + @Deprecated + public DnsWaiters( + @javax.annotation.Nonnull java.util.concurrent.ExecutorService executorService, + @javax.annotation.Nonnull Dns client) { + this(executorService, client, null); + } + + public DnsWaiters( + @javax.annotation.Nonnull java.util.concurrent.ExecutorService executorService, + @javax.annotation.Nonnull Dns client, + com.oracle.bmc.workrequests.WorkRequest workRequestClient) { + if (executorService == null) { + throw new NullPointerException("executorService is marked non-null but is null"); + } + if (client == null) { + throw new NullPointerException("client is marked non-null but is null"); + } this.executorService = executorService; this.client = client; + this.workRequestClient = workRequestClient; + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + ChangeResolverCompartmentRequest, ChangeResolverCompartmentResponse> + forChangeResolverCompartment(ChangeResolverCompartmentRequest request) { + return forChangeResolverCompartment( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + ChangeResolverCompartmentRequest, ChangeResolverCompartmentResponse> + forChangeResolverCompartment( + ChangeResolverCompartmentRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public ChangeResolverCompartmentResponse call() throws Exception { + final ChangeResolverCompartmentResponse response = + client.changeResolverCompartment(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + ChangeSteeringPolicyCompartmentRequest, ChangeSteeringPolicyCompartmentResponse> + forChangeSteeringPolicyCompartment(ChangeSteeringPolicyCompartmentRequest request) { + return forChangeSteeringPolicyCompartment( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + ChangeSteeringPolicyCompartmentRequest, ChangeSteeringPolicyCompartmentResponse> + forChangeSteeringPolicyCompartment( + ChangeSteeringPolicyCompartmentRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public ChangeSteeringPolicyCompartmentResponse call() throws Exception { + final ChangeSteeringPolicyCompartmentResponse response = + client.changeSteeringPolicyCompartment(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forChangeViewCompartment(ChangeViewCompartmentRequest request) { + return forChangeViewCompartment( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forChangeViewCompartment( + ChangeViewCompartmentRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public ChangeViewCompartmentResponse call() throws Exception { + final ChangeViewCompartmentResponse response = + client.changeViewCompartment(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forChangeZoneCompartment(ChangeZoneCompartmentRequest request) { + return forChangeZoneCompartment( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forChangeZoneCompartment( + ChangeZoneCompartmentRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public ChangeZoneCompartmentResponse call() throws Exception { + final ChangeZoneCompartmentResponse response = + client.changeZoneCompartment(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + CreateResolverEndpointRequest, CreateResolverEndpointResponse> + forCreateResolverEndpoint(CreateResolverEndpointRequest request) { + return forCreateResolverEndpoint( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + CreateResolverEndpointRequest, CreateResolverEndpointResponse> + forCreateResolverEndpoint( + CreateResolverEndpointRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public CreateResolverEndpointResponse call() throws Exception { + final CreateResolverEndpointResponse response = + client.createResolverEndpoint(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forCreateSteeringPolicy(CreateSteeringPolicyRequest request) { + return forCreateSteeringPolicy( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forCreateSteeringPolicy( + CreateSteeringPolicyRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public CreateSteeringPolicyResponse call() throws Exception { + final CreateSteeringPolicyResponse response = + client.createSteeringPolicy(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + CreateSteeringPolicyAttachmentRequest, CreateSteeringPolicyAttachmentResponse> + forCreateSteeringPolicyAttachment(CreateSteeringPolicyAttachmentRequest request) { + return forCreateSteeringPolicyAttachment( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + CreateSteeringPolicyAttachmentRequest, CreateSteeringPolicyAttachmentResponse> + forCreateSteeringPolicyAttachment( + CreateSteeringPolicyAttachmentRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public CreateSteeringPolicyAttachmentResponse call() throws Exception { + final CreateSteeringPolicyAttachmentResponse response = + client.createSteeringPolicyAttachment(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forCreateTsigKey(CreateTsigKeyRequest request) { + return forCreateTsigKey( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forCreateTsigKey( + CreateTsigKeyRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public CreateTsigKeyResponse call() throws Exception { + final CreateTsigKeyResponse response = client.createTsigKey(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forCreateView( + CreateViewRequest request) { + return forCreateView( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forCreateView( + CreateViewRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public CreateViewResponse call() throws Exception { + final CreateViewResponse response = client.createView(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forCreateZone( + CreateZoneRequest request) { + return forCreateZone( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forCreateZone( + CreateZoneRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public CreateZoneResponse call() throws Exception { + final CreateZoneResponse response = client.createZone(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + CreateZoneFromZoneFileRequest, CreateZoneFromZoneFileResponse> + forCreateZoneFromZoneFile(CreateZoneFromZoneFileRequest request) { + return forCreateZoneFromZoneFile( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + CreateZoneFromZoneFileRequest, CreateZoneFromZoneFileResponse> + forCreateZoneFromZoneFile( + CreateZoneFromZoneFileRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public CreateZoneFromZoneFileResponse call() throws Exception { + final CreateZoneFromZoneFileResponse response = + client.createZoneFromZoneFile(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + DeleteResolverEndpointRequest, DeleteResolverEndpointResponse> + forDeleteResolverEndpoint(DeleteResolverEndpointRequest request) { + return forDeleteResolverEndpoint( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + DeleteResolverEndpointRequest, DeleteResolverEndpointResponse> + forDeleteResolverEndpoint( + DeleteResolverEndpointRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public DeleteResolverEndpointResponse call() throws Exception { + final DeleteResolverEndpointResponse response = + client.deleteResolverEndpoint(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forDeleteSteeringPolicy(DeleteSteeringPolicyRequest request) { + return forDeleteSteeringPolicy( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forDeleteSteeringPolicy( + DeleteSteeringPolicyRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public DeleteSteeringPolicyResponse call() throws Exception { + final DeleteSteeringPolicyResponse response = + client.deleteSteeringPolicy(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + DeleteSteeringPolicyAttachmentRequest, DeleteSteeringPolicyAttachmentResponse> + forDeleteSteeringPolicyAttachment(DeleteSteeringPolicyAttachmentRequest request) { + return forDeleteSteeringPolicyAttachment( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + DeleteSteeringPolicyAttachmentRequest, DeleteSteeringPolicyAttachmentResponse> + forDeleteSteeringPolicyAttachment( + DeleteSteeringPolicyAttachmentRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public DeleteSteeringPolicyAttachmentResponse call() throws Exception { + final DeleteSteeringPolicyAttachmentResponse response = + client.deleteSteeringPolicyAttachment(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forDeleteTsigKey(DeleteTsigKeyRequest request) { + return forDeleteTsigKey( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forDeleteTsigKey( + DeleteTsigKeyRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public DeleteTsigKeyResponse call() throws Exception { + final DeleteTsigKeyResponse response = client.deleteTsigKey(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDeleteView( + DeleteViewRequest request) { + return forDeleteView( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDeleteView( + DeleteViewRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public DeleteViewResponse call() throws Exception { + final DeleteViewResponse response = client.deleteView(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDeleteZone( + DeleteZoneRequest request) { + return forDeleteZone( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDeleteZone( + DeleteZoneRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public DeleteZoneResponse call() throws Exception { + final DeleteZoneResponse response = client.deleteZone(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); } /** @@ -723,4 +1782,555 @@ public boolean test(GetZoneResponse response) { com.oracle.bmc.dns.model.Zone.LifecycleState.Deleted)), request); } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + PromoteZoneDnssecKeyVersionRequest, PromoteZoneDnssecKeyVersionResponse> + forPromoteZoneDnssecKeyVersion(PromoteZoneDnssecKeyVersionRequest request) { + return forPromoteZoneDnssecKeyVersion( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + PromoteZoneDnssecKeyVersionRequest, PromoteZoneDnssecKeyVersionResponse> + forPromoteZoneDnssecKeyVersion( + PromoteZoneDnssecKeyVersionRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public PromoteZoneDnssecKeyVersionResponse call() throws Exception { + final PromoteZoneDnssecKeyVersionResponse response = + client.promoteZoneDnssecKeyVersion(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + StageZoneDnssecKeyVersionRequest, StageZoneDnssecKeyVersionResponse> + forStageZoneDnssecKeyVersion(StageZoneDnssecKeyVersionRequest request) { + return forStageZoneDnssecKeyVersion( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + StageZoneDnssecKeyVersionRequest, StageZoneDnssecKeyVersionResponse> + forStageZoneDnssecKeyVersion( + StageZoneDnssecKeyVersionRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public StageZoneDnssecKeyVersionResponse call() throws Exception { + final StageZoneDnssecKeyVersionResponse response = + client.stageZoneDnssecKeyVersion(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forUpdateResolver(UpdateResolverRequest request) { + return forUpdateResolver( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forUpdateResolver( + UpdateResolverRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public UpdateResolverResponse call() throws Exception { + final UpdateResolverResponse response = client.updateResolver(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + UpdateResolverEndpointRequest, UpdateResolverEndpointResponse> + forUpdateResolverEndpoint(UpdateResolverEndpointRequest request) { + return forUpdateResolverEndpoint( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + UpdateResolverEndpointRequest, UpdateResolverEndpointResponse> + forUpdateResolverEndpoint( + UpdateResolverEndpointRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public UpdateResolverEndpointResponse call() throws Exception { + final UpdateResolverEndpointResponse response = + client.updateResolverEndpoint(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forUpdateSteeringPolicy(UpdateSteeringPolicyRequest request) { + return forUpdateSteeringPolicy( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forUpdateSteeringPolicy( + UpdateSteeringPolicyRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public UpdateSteeringPolicyResponse call() throws Exception { + final UpdateSteeringPolicyResponse response = + client.updateSteeringPolicy(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + UpdateSteeringPolicyAttachmentRequest, UpdateSteeringPolicyAttachmentResponse> + forUpdateSteeringPolicyAttachment(UpdateSteeringPolicyAttachmentRequest request) { + return forUpdateSteeringPolicyAttachment( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + UpdateSteeringPolicyAttachmentRequest, UpdateSteeringPolicyAttachmentResponse> + forUpdateSteeringPolicyAttachment( + UpdateSteeringPolicyAttachmentRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public UpdateSteeringPolicyAttachmentResponse call() throws Exception { + final UpdateSteeringPolicyAttachmentResponse response = + client.updateSteeringPolicyAttachment(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forUpdateTsigKey(UpdateTsigKeyRequest request) { + return forUpdateTsigKey( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forUpdateTsigKey( + UpdateTsigKeyRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public UpdateTsigKeyResponse call() throws Exception { + final UpdateTsigKeyResponse response = client.updateTsigKey(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forUpdateView( + UpdateViewRequest request) { + return forUpdateView( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forUpdateView( + UpdateViewRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public UpdateViewResponse call() throws Exception { + final UpdateViewResponse response = client.updateView(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forUpdateZone( + UpdateZoneRequest request) { + return forUpdateZone( + request, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_TERMINATION_STRATEGY, + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_DELAY_STRATEGY); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@link com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forUpdateZone( + UpdateZoneRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + if (workRequestClient == null) { + throw new IllegalStateException( + "A WorkRequestClient must be supplied to this waiter for this operation"); + } + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + new java.util.concurrent.Callable() { + @Override + public UpdateZoneResponse call() throws Exception { + final UpdateZoneResponse response = client.updateZone(request); + + if (response.getOpcWorkRequestId() != null) { + final com.oracle.bmc.workrequests.requests.GetWorkRequestRequest + getWorkRequestRequest = + com.oracle.bmc.workrequests.requests + .GetWorkRequestRequest.builder() + .workRequestId(response.getOpcWorkRequestId()) + .build(); + workRequestClient + .getWaiters() + .forWorkRequest( + getWorkRequestRequest, + terminationStrategy, + delayStrategy) + .execute(); + } + return response; + } + }, + request); + } } diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/ChangeSteeringPolicyCompartmentConverter.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/ChangeSteeringPolicyCompartmentConverter.java index 22a47b7787a..7c9a6ae7871 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/ChangeSteeringPolicyCompartmentConverter.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/ChangeSteeringPolicyCompartmentConverter.java @@ -137,6 +137,17 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( String.class)); } + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + com.oracle.bmc.dns.responses.ChangeSteeringPolicyCompartmentResponse responseWrapper = builder.build(); diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/CreateSteeringPolicyAttachmentConverter.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/CreateSteeringPolicyAttachmentConverter.java index b6d132ec430..af8ea7c280c 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/CreateSteeringPolicyAttachmentConverter.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/CreateSteeringPolicyAttachmentConverter.java @@ -157,6 +157,17 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( String.class)); } + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + com.oracle.bmc.dns.responses.CreateSteeringPolicyAttachmentResponse responseWrapper = builder.build(); diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/CreateSteeringPolicyConverter.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/CreateSteeringPolicyConverter.java index 0eeade0d0b9..e03617b8eb1 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/CreateSteeringPolicyConverter.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/CreateSteeringPolicyConverter.java @@ -147,6 +147,17 @@ public com.oracle.bmc.dns.responses.CreateSteeringPolicyResponse apply( String.class)); } + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + com.oracle.bmc.dns.responses.CreateSteeringPolicyResponse responseWrapper = builder.build(); diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/DeleteSteeringPolicyAttachmentConverter.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/DeleteSteeringPolicyAttachmentConverter.java index 5991c1b602c..6af5af0f4e8 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/DeleteSteeringPolicyAttachmentConverter.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/DeleteSteeringPolicyAttachmentConverter.java @@ -134,6 +134,17 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( String.class)); } + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + com.oracle.bmc.dns.responses.DeleteSteeringPolicyAttachmentResponse responseWrapper = builder.build(); diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/DeleteSteeringPolicyConverter.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/DeleteSteeringPolicyConverter.java index caf64f89a10..0634b9e6926 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/DeleteSteeringPolicyConverter.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/DeleteSteeringPolicyConverter.java @@ -127,6 +127,17 @@ public com.oracle.bmc.dns.responses.DeleteSteeringPolicyResponse apply( String.class)); } + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + com.oracle.bmc.dns.responses.DeleteSteeringPolicyResponse responseWrapper = builder.build(); diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/ListZonesConverter.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/ListZonesConverter.java index 20fabdf23e5..8cc775a95f2 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/ListZonesConverter.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/ListZonesConverter.java @@ -144,6 +144,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getTsigKeyId())); } + if (request.getDnssecState() != null) { + target = + target.queryParam( + "dnssecState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDnssecState().getValue())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/PromoteZoneDnssecKeyVersionConverter.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/PromoteZoneDnssecKeyVersionConverter.java new file mode 100644 index 00000000000..2a83cf32b17 --- /dev/null +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/PromoteZoneDnssecKeyVersionConverter.java @@ -0,0 +1,162 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dns.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.dns.model.*; +import com.oracle.bmc.dns.requests.*; +import com.oracle.bmc.dns.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180115") +public class PromoteZoneDnssecKeyVersionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PromoteZoneDnssecKeyVersionConverter.class); + + public static com.oracle.bmc.dns.requests.PromoteZoneDnssecKeyVersionRequest interceptRequest( + com.oracle.bmc.dns.requests.PromoteZoneDnssecKeyVersionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.dns.requests.PromoteZoneDnssecKeyVersionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getZoneId(), "zoneId must not be blank"); + Validate.notNull( + request.getPromoteZoneDnssecKeyVersionDetails(), + "promoteZoneDnssecKeyVersionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180115") + .path("zones") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getZoneId())) + .path("actions") + .path("promoteDnssecKeyVersion"); + + if (request.getScope() != null) { + target = + target.queryParam( + "scope", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getScope().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("If-Match", request.getIfMatch()); + } + + if (request.getIfUnmodifiedSince() != null) { + ib.header("If-Unmodified-Since", request.getIfUnmodifiedSince()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.dns.responses.PromoteZoneDnssecKeyVersionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.dns.responses.PromoteZoneDnssecKeyVersionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.dns.responses.PromoteZoneDnssecKeyVersionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.dns.responses + .PromoteZoneDnssecKeyVersionResponse>() { + @Override + public com.oracle.bmc.dns.responses.PromoteZoneDnssecKeyVersionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.dns.responses.PromoteZoneDnssecKeyVersionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.dns.responses.PromoteZoneDnssecKeyVersionResponse + .Builder + builder = + com.oracle.bmc.dns.responses + .PromoteZoneDnssecKeyVersionResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.dns.responses.PromoteZoneDnssecKeyVersionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/StageZoneDnssecKeyVersionConverter.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/StageZoneDnssecKeyVersionConverter.java new file mode 100644 index 00000000000..a3668affe81 --- /dev/null +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/StageZoneDnssecKeyVersionConverter.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dns.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.dns.model.*; +import com.oracle.bmc.dns.requests.*; +import com.oracle.bmc.dns.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180115") +public class StageZoneDnssecKeyVersionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(StageZoneDnssecKeyVersionConverter.class); + + public static com.oracle.bmc.dns.requests.StageZoneDnssecKeyVersionRequest interceptRequest( + com.oracle.bmc.dns.requests.StageZoneDnssecKeyVersionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.dns.requests.StageZoneDnssecKeyVersionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getZoneId(), "zoneId must not be blank"); + Validate.notNull( + request.getStageZoneDnssecKeyVersionDetails(), + "stageZoneDnssecKeyVersionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180115") + .path("zones") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getZoneId())) + .path("actions") + .path("stageDnssecKeyVersion"); + + if (request.getScope() != null) { + target = + target.queryParam( + "scope", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getScope().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("If-Match", request.getIfMatch()); + } + + if (request.getIfUnmodifiedSince() != null) { + ib.header("If-Unmodified-Since", request.getIfUnmodifiedSince()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.dns.responses.StageZoneDnssecKeyVersionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.dns.responses.StageZoneDnssecKeyVersionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.dns.responses.StageZoneDnssecKeyVersionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.dns.responses.StageZoneDnssecKeyVersionResponse>() { + @Override + public com.oracle.bmc.dns.responses.StageZoneDnssecKeyVersionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.dns.responses.StageZoneDnssecKeyVersionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.dns.responses.StageZoneDnssecKeyVersionResponse + .Builder + builder = + com.oracle.bmc.dns.responses + .StageZoneDnssecKeyVersionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.dns.responses.StageZoneDnssecKeyVersionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/UpdateSteeringPolicyAttachmentConverter.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/UpdateSteeringPolicyAttachmentConverter.java index 32f7d22ff23..e292911c366 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/UpdateSteeringPolicyAttachmentConverter.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/UpdateSteeringPolicyAttachmentConverter.java @@ -149,6 +149,17 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( String.class)); } + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + java.util.Optional> eTagHeader = com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( headers, "ETag"); diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/UpdateSteeringPolicyConverter.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/UpdateSteeringPolicyConverter.java index 58f1d7d322e..b9087d6c6de 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/UpdateSteeringPolicyConverter.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/internal/http/UpdateSteeringPolicyConverter.java @@ -137,6 +137,17 @@ public com.oracle.bmc.dns.responses.UpdateSteeringPolicyResponse apply( String.class)); } + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + java.util.Optional> eTagHeader = com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( headers, "ETag"); diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/model/CreateZoneDetails.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/CreateZoneDetails.java index edc009701ac..3130b7e568d 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/model/CreateZoneDetails.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/CreateZoneDetails.java @@ -160,6 +160,72 @@ public Builder externalDownstreams(java.util.List externalDo this.__explicitlySet__.add("externalDownstreams"); return this; } + /** + * The state of DNSSEC on the zone. + *

+ * For DNSSEC to function, every parent zone in the DNS tree up to the top-level domain (or an independent + * trust anchor) must also have DNSSEC correctly set up. + * After enabling DNSSEC, you must add a DS record to the zone's parent zone containing the + * {@code KskDnssecKeyVersion} data. You can find the DS data in the {@code dsData} attribute of the {@code KskDnssecKeyVersion}. + * Then, use the {@code PromoteZoneDnssecKeyVersion} operation to promote the {@code KskDnssecKeyVersion}. + *

+ * New {@code KskDnssecKeyVersion}s are generated annually, a week before the existing {@code KskDnssecKeyVersion}'s expiration. + * To rollover a {@code KskDnssecKeyVersion}, you must replace the parent zone's DS record containing the old + * {@code KskDnssecKeyVersion} data with the data from the new {@code KskDnssecKeyVersion}. + *

+ * To remove the old DS record without causing service disruption, wait until the old DS record's TTL has + * expired, and the new DS record has propagated. After the DS replacement has been completed, then the + * {@code PromoteZoneDnssecKeyVersion} operation must be called. + *

+ * Metrics are emitted in the {@code oci_dns} namespace daily for each {@code KskDnssecKeyVersion} indicating how many + * days are left until expiration. + * We recommend that you set up alarms and notifications for KskDnssecKeyVersion expiration so that the + * necessary parent zone updates can be made and the {@code PromoteZoneDnssecKeyVersion} operation can be called. + *

+ * Enabling DNSSEC results in additional records in DNS responses which increases their size and can + * cause higher response latency. + *

+ * For more information, see [DNSSEC](https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dnssecState") + private ZoneDnssecState dnssecState; + + /** + * The state of DNSSEC on the zone. + *

+ * For DNSSEC to function, every parent zone in the DNS tree up to the top-level domain (or an independent + * trust anchor) must also have DNSSEC correctly set up. + * After enabling DNSSEC, you must add a DS record to the zone's parent zone containing the + * {@code KskDnssecKeyVersion} data. You can find the DS data in the {@code dsData} attribute of the {@code KskDnssecKeyVersion}. + * Then, use the {@code PromoteZoneDnssecKeyVersion} operation to promote the {@code KskDnssecKeyVersion}. + *

+ * New {@code KskDnssecKeyVersion}s are generated annually, a week before the existing {@code KskDnssecKeyVersion}'s expiration. + * To rollover a {@code KskDnssecKeyVersion}, you must replace the parent zone's DS record containing the old + * {@code KskDnssecKeyVersion} data with the data from the new {@code KskDnssecKeyVersion}. + *

+ * To remove the old DS record without causing service disruption, wait until the old DS record's TTL has + * expired, and the new DS record has propagated. After the DS replacement has been completed, then the + * {@code PromoteZoneDnssecKeyVersion} operation must be called. + *

+ * Metrics are emitted in the {@code oci_dns} namespace daily for each {@code KskDnssecKeyVersion} indicating how many + * days are left until expiration. + * We recommend that you set up alarms and notifications for KskDnssecKeyVersion expiration so that the + * necessary parent zone updates can be made and the {@code PromoteZoneDnssecKeyVersion} operation can be called. + *

+ * Enabling DNSSEC results in additional records in DNS responses which increases their size and can + * cause higher response latency. + *

+ * For more information, see [DNSSEC](https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm). + * + * @param dnssecState the value to set + * @return this builder + **/ + public Builder dnssecState(ZoneDnssecState dnssecState) { + this.dnssecState = dnssecState; + this.__explicitlySet__.add("dnssecState"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -175,7 +241,8 @@ public CreateZoneDetails build() { this.viewId, this.scope, this.externalMasters, - this.externalDownstreams); + this.externalDownstreams, + this.dnssecState); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -211,6 +278,9 @@ public Builder copy(CreateZoneDetails model) { if (model.wasPropertyExplicitlySet("externalDownstreams")) { this.externalDownstreams(model.getExternalDownstreams()); } + if (model.wasPropertyExplicitlySet("dnssecState")) { + this.dnssecState(model.getDnssecState()); + } return this; } } @@ -236,13 +306,15 @@ public CreateZoneDetails( String viewId, Scope scope, java.util.List externalMasters, - java.util.List externalDownstreams) { + java.util.List externalDownstreams, + ZoneDnssecState dnssecState) { super(name, compartmentId, freeformTags, definedTags); this.zoneType = zoneType; this.viewId = viewId; this.scope = scope; this.externalMasters = externalMasters; this.externalDownstreams = externalDownstreams; + this.dnssecState = dnssecState; } /** @@ -366,6 +438,70 @@ public java.util.List getExternalDownstreams() { return externalDownstreams; } + /** + * The state of DNSSEC on the zone. + *

+ * For DNSSEC to function, every parent zone in the DNS tree up to the top-level domain (or an independent + * trust anchor) must also have DNSSEC correctly set up. + * After enabling DNSSEC, you must add a DS record to the zone's parent zone containing the + * {@code KskDnssecKeyVersion} data. You can find the DS data in the {@code dsData} attribute of the {@code KskDnssecKeyVersion}. + * Then, use the {@code PromoteZoneDnssecKeyVersion} operation to promote the {@code KskDnssecKeyVersion}. + *

+ * New {@code KskDnssecKeyVersion}s are generated annually, a week before the existing {@code KskDnssecKeyVersion}'s expiration. + * To rollover a {@code KskDnssecKeyVersion}, you must replace the parent zone's DS record containing the old + * {@code KskDnssecKeyVersion} data with the data from the new {@code KskDnssecKeyVersion}. + *

+ * To remove the old DS record without causing service disruption, wait until the old DS record's TTL has + * expired, and the new DS record has propagated. After the DS replacement has been completed, then the + * {@code PromoteZoneDnssecKeyVersion} operation must be called. + *

+ * Metrics are emitted in the {@code oci_dns} namespace daily for each {@code KskDnssecKeyVersion} indicating how many + * days are left until expiration. + * We recommend that you set up alarms and notifications for KskDnssecKeyVersion expiration so that the + * necessary parent zone updates can be made and the {@code PromoteZoneDnssecKeyVersion} operation can be called. + *

+ * Enabling DNSSEC results in additional records in DNS responses which increases their size and can + * cause higher response latency. + *

+ * For more information, see [DNSSEC](https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dnssecState") + private final ZoneDnssecState dnssecState; + + /** + * The state of DNSSEC on the zone. + *

+ * For DNSSEC to function, every parent zone in the DNS tree up to the top-level domain (or an independent + * trust anchor) must also have DNSSEC correctly set up. + * After enabling DNSSEC, you must add a DS record to the zone's parent zone containing the + * {@code KskDnssecKeyVersion} data. You can find the DS data in the {@code dsData} attribute of the {@code KskDnssecKeyVersion}. + * Then, use the {@code PromoteZoneDnssecKeyVersion} operation to promote the {@code KskDnssecKeyVersion}. + *

+ * New {@code KskDnssecKeyVersion}s are generated annually, a week before the existing {@code KskDnssecKeyVersion}'s expiration. + * To rollover a {@code KskDnssecKeyVersion}, you must replace the parent zone's DS record containing the old + * {@code KskDnssecKeyVersion} data with the data from the new {@code KskDnssecKeyVersion}. + *

+ * To remove the old DS record without causing service disruption, wait until the old DS record's TTL has + * expired, and the new DS record has propagated. After the DS replacement has been completed, then the + * {@code PromoteZoneDnssecKeyVersion} operation must be called. + *

+ * Metrics are emitted in the {@code oci_dns} namespace daily for each {@code KskDnssecKeyVersion} indicating how many + * days are left until expiration. + * We recommend that you set up alarms and notifications for KskDnssecKeyVersion expiration so that the + * necessary parent zone updates can be made and the {@code PromoteZoneDnssecKeyVersion} operation can be called. + *

+ * Enabling DNSSEC results in additional records in DNS responses which increases their size and can + * cause higher response latency. + *

+ * For more information, see [DNSSEC](https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm). + * + * @return the value + **/ + public ZoneDnssecState getDnssecState() { + return dnssecState; + } + @Override public String toString() { return this.toString(true); @@ -385,6 +521,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", scope=").append(String.valueOf(this.scope)); sb.append(", externalMasters=").append(String.valueOf(this.externalMasters)); sb.append(", externalDownstreams=").append(String.valueOf(this.externalDownstreams)); + sb.append(", dnssecState=").append(String.valueOf(this.dnssecState)); sb.append(")"); return sb.toString(); } @@ -404,6 +541,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.scope, other.scope) && java.util.Objects.equals(this.externalMasters, other.externalMasters) && java.util.Objects.equals(this.externalDownstreams, other.externalDownstreams) + && java.util.Objects.equals(this.dnssecState, other.dnssecState) && super.equals(other); } @@ -422,6 +560,7 @@ public int hashCode() { + (this.externalDownstreams == null ? 43 : this.externalDownstreams.hashCode()); + result = (result * PRIME) + (this.dnssecState == null ? 43 : this.dnssecState.hashCode()); return result; } } diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/model/DnssecConfig.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/DnssecConfig.java new file mode 100644 index 00000000000..6ed3f926b49 --- /dev/null +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/DnssecConfig.java @@ -0,0 +1,194 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dns.model; + +/** + * DNSSEC configuration data. + *

+ * A zone may have a maximum of 10 {@code DnssecKeyVersions}, regardless of signing key type. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180115") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = DnssecConfig.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DnssecConfig extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"kskDnssecKeyVersions", "zskDnssecKeyVersions"}) + public DnssecConfig( + java.util.List kskDnssecKeyVersions, + java.util.List zskDnssecKeyVersions) { + super(); + this.kskDnssecKeyVersions = kskDnssecKeyVersions; + this.zskDnssecKeyVersions = zskDnssecKeyVersions; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A read-only array of key signing key (KSK) versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kskDnssecKeyVersions") + private java.util.List kskDnssecKeyVersions; + + /** + * A read-only array of key signing key (KSK) versions. + * + * @param kskDnssecKeyVersions the value to set + * @return this builder + **/ + public Builder kskDnssecKeyVersions( + java.util.List kskDnssecKeyVersions) { + this.kskDnssecKeyVersions = kskDnssecKeyVersions; + this.__explicitlySet__.add("kskDnssecKeyVersions"); + return this; + } + /** + * A read-only array of zone signing key (ZSK) versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("zskDnssecKeyVersions") + private java.util.List zskDnssecKeyVersions; + + /** + * A read-only array of zone signing key (ZSK) versions. + * + * @param zskDnssecKeyVersions the value to set + * @return this builder + **/ + public Builder zskDnssecKeyVersions( + java.util.List zskDnssecKeyVersions) { + this.zskDnssecKeyVersions = zskDnssecKeyVersions; + this.__explicitlySet__.add("zskDnssecKeyVersions"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DnssecConfig build() { + DnssecConfig model = + new DnssecConfig(this.kskDnssecKeyVersions, this.zskDnssecKeyVersions); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DnssecConfig model) { + if (model.wasPropertyExplicitlySet("kskDnssecKeyVersions")) { + this.kskDnssecKeyVersions(model.getKskDnssecKeyVersions()); + } + if (model.wasPropertyExplicitlySet("zskDnssecKeyVersions")) { + this.zskDnssecKeyVersions(model.getZskDnssecKeyVersions()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A read-only array of key signing key (KSK) versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kskDnssecKeyVersions") + private final java.util.List kskDnssecKeyVersions; + + /** + * A read-only array of key signing key (KSK) versions. + * + * @return the value + **/ + public java.util.List getKskDnssecKeyVersions() { + return kskDnssecKeyVersions; + } + + /** + * A read-only array of zone signing key (ZSK) versions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("zskDnssecKeyVersions") + private final java.util.List zskDnssecKeyVersions; + + /** + * A read-only array of zone signing key (ZSK) versions. + * + * @return the value + **/ + public java.util.List getZskDnssecKeyVersions() { + return zskDnssecKeyVersions; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DnssecConfig("); + sb.append("super=").append(super.toString()); + sb.append("kskDnssecKeyVersions=").append(String.valueOf(this.kskDnssecKeyVersions)); + sb.append(", zskDnssecKeyVersions=").append(String.valueOf(this.zskDnssecKeyVersions)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DnssecConfig)) { + return false; + } + + DnssecConfig other = (DnssecConfig) o; + return java.util.Objects.equals(this.kskDnssecKeyVersions, other.kskDnssecKeyVersions) + && java.util.Objects.equals(this.zskDnssecKeyVersions, other.zskDnssecKeyVersions) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.kskDnssecKeyVersions == null + ? 43 + : this.kskDnssecKeyVersions.hashCode()); + result = + (result * PRIME) + + (this.zskDnssecKeyVersions == null + ? 43 + : this.zskDnssecKeyVersions.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/model/DnssecDigestType.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/DnssecDigestType.java new file mode 100644 index 00000000000..d3495cfa004 --- /dev/null +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/DnssecDigestType.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dns.model; + +/** + * The digest algorithm used to produce a fingerprint of DNSSEC data. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180115") +public enum DnssecDigestType { + Sha256("SHA_256"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DnssecDigestType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DnssecDigestType v : DnssecDigestType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DnssecDigestType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DnssecDigestType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DnssecDigestType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/model/DnssecKeyVersionDsData.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/DnssecKeyVersionDsData.java new file mode 100644 index 00000000000..41a443de2fc --- /dev/null +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/DnssecKeyVersionDsData.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dns.model; + +/** + * Data for a parent zone DS record corresponding to this key-signing key (KSK). + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180115") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DnssecKeyVersionDsData.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DnssecKeyVersionDsData + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"rdata", "digestType"}) + public DnssecKeyVersionDsData(String rdata, DnssecDigestType digestType) { + super(); + this.rdata = rdata; + this.digestType = digestType; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Presentation-format DS record data that must be added to the parent zone. For more information about RDATA, + * see [Supported DNS Resource Record Types](https://docs.cloud.oracle.com/iaas/Content/DNS/Reference/supporteddnsresource.htm) + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rdata") + private String rdata; + + /** + * Presentation-format DS record data that must be added to the parent zone. For more information about RDATA, + * see [Supported DNS Resource Record Types](https://docs.cloud.oracle.com/iaas/Content/DNS/Reference/supporteddnsresource.htm) + * + * @param rdata the value to set + * @return this builder + **/ + public Builder rdata(String rdata) { + this.rdata = rdata; + this.__explicitlySet__.add("rdata"); + return this; + } + /** + * The type of the digest associated with the rdata. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("digestType") + private DnssecDigestType digestType; + + /** + * The type of the digest associated with the rdata. + * + * @param digestType the value to set + * @return this builder + **/ + public Builder digestType(DnssecDigestType digestType) { + this.digestType = digestType; + this.__explicitlySet__.add("digestType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DnssecKeyVersionDsData build() { + DnssecKeyVersionDsData model = new DnssecKeyVersionDsData(this.rdata, this.digestType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DnssecKeyVersionDsData model) { + if (model.wasPropertyExplicitlySet("rdata")) { + this.rdata(model.getRdata()); + } + if (model.wasPropertyExplicitlySet("digestType")) { + this.digestType(model.getDigestType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Presentation-format DS record data that must be added to the parent zone. For more information about RDATA, + * see [Supported DNS Resource Record Types](https://docs.cloud.oracle.com/iaas/Content/DNS/Reference/supporteddnsresource.htm) + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rdata") + private final String rdata; + + /** + * Presentation-format DS record data that must be added to the parent zone. For more information about RDATA, + * see [Supported DNS Resource Record Types](https://docs.cloud.oracle.com/iaas/Content/DNS/Reference/supporteddnsresource.htm) + * + * @return the value + **/ + public String getRdata() { + return rdata; + } + + /** + * The type of the digest associated with the rdata. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("digestType") + private final DnssecDigestType digestType; + + /** + * The type of the digest associated with the rdata. + * + * @return the value + **/ + public DnssecDigestType getDigestType() { + return digestType; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DnssecKeyVersionDsData("); + sb.append("super=").append(super.toString()); + sb.append("rdata=").append(String.valueOf(this.rdata)); + sb.append(", digestType=").append(String.valueOf(this.digestType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DnssecKeyVersionDsData)) { + return false; + } + + DnssecKeyVersionDsData other = (DnssecKeyVersionDsData) o; + return java.util.Objects.equals(this.rdata, other.rdata) + && java.util.Objects.equals(this.digestType, other.digestType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.rdata == null ? 43 : this.rdata.hashCode()); + result = (result * PRIME) + (this.digestType == null ? 43 : this.digestType.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/model/DnssecSigningAlgorithm.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/DnssecSigningAlgorithm.java new file mode 100644 index 00000000000..c01b5d2d74d --- /dev/null +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/DnssecSigningAlgorithm.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dns.model; + +/** + * The signing algorithm that will be used for a {@code DnssecKeyVersion}. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180115") +public enum DnssecSigningAlgorithm { + Rsasha256("RSASHA256"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DnssecSigningAlgorithm.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DnssecSigningAlgorithm v : DnssecSigningAlgorithm.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DnssecSigningAlgorithm(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DnssecSigningAlgorithm create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DnssecSigningAlgorithm', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/model/KskDnssecKeyVersion.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/KskDnssecKeyVersion.java new file mode 100644 index 00000000000..cdf710f44a3 --- /dev/null +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/KskDnssecKeyVersion.java @@ -0,0 +1,856 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dns.model; + +/** + * A key signing key (KSK) version. The version information contains timing and configuration data corresponding to the KSK that is used to + * apply DNSSEC on the zone. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180115") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = KskDnssecKeyVersion.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class KskDnssecKeyVersion extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "uuid", + "algorithm", + "lengthInBytes", + "timeCreated", + "timePublished", + "timeActivated", + "timeInactivated", + "timeUnpublished", + "timeExpired", + "timePromoted", + "predecessorDnssecKeyVersionUuid", + "successorDnssecKeyVersionUuid", + "keyTag", + "dsData" + }) + public KskDnssecKeyVersion( + String uuid, + DnssecSigningAlgorithm algorithm, + Integer lengthInBytes, + java.util.Date timeCreated, + java.util.Date timePublished, + java.util.Date timeActivated, + java.util.Date timeInactivated, + java.util.Date timeUnpublished, + java.util.Date timeExpired, + java.util.Date timePromoted, + String predecessorDnssecKeyVersionUuid, + String successorDnssecKeyVersionUuid, + Integer keyTag, + java.util.List dsData) { + super(); + this.uuid = uuid; + this.algorithm = algorithm; + this.lengthInBytes = lengthInBytes; + this.timeCreated = timeCreated; + this.timePublished = timePublished; + this.timeActivated = timeActivated; + this.timeInactivated = timeInactivated; + this.timeUnpublished = timeUnpublished; + this.timeExpired = timeExpired; + this.timePromoted = timePromoted; + this.predecessorDnssecKeyVersionUuid = predecessorDnssecKeyVersionUuid; + this.successorDnssecKeyVersionUuid = successorDnssecKeyVersionUuid; + this.keyTag = keyTag; + this.dsData = dsData; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The UUID of the {@code DnssecKeyVersion}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("uuid") + private String uuid; + + /** + * The UUID of the {@code DnssecKeyVersion}. + * + * @param uuid the value to set + * @return this builder + **/ + public Builder uuid(String uuid) { + this.uuid = uuid; + this.__explicitlySet__.add("uuid"); + return this; + } + /** + * The signing algorithm used for the key. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("algorithm") + private DnssecSigningAlgorithm algorithm; + + /** + * The signing algorithm used for the key. + * + * @param algorithm the value to set + * @return this builder + **/ + public Builder algorithm(DnssecSigningAlgorithm algorithm) { + this.algorithm = algorithm; + this.__explicitlySet__.add("algorithm"); + return this; + } + /** + * The length of the corresponding private key in bytes, expressed as an integer. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lengthInBytes") + private Integer lengthInBytes; + + /** + * The length of the corresponding private key in bytes, expressed as an integer. + * + * @param lengthInBytes the value to set + * @return this builder + **/ + public Builder lengthInBytes(Integer lengthInBytes) { + this.lengthInBytes = lengthInBytes; + this.__explicitlySet__.add("lengthInBytes"); + return this; + } + /** + * The date and time the key version was created, expressed in RFC 3339 timestamp format. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the key version was created, expressed in RFC 3339 timestamp format. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the key version was, or will be, published, expressed in RFC 3339 timestamp format. This is + * when the zone contents will include a DNSKEY record corresponding to the key material. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timePublished") + private java.util.Date timePublished; + + /** + * The date and time the key version was, or will be, published, expressed in RFC 3339 timestamp format. This is + * when the zone contents will include a DNSKEY record corresponding to the key material. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @param timePublished the value to set + * @return this builder + **/ + public Builder timePublished(java.util.Date timePublished) { + this.timePublished = timePublished; + this.__explicitlySet__.add("timePublished"); + return this; + } + /** + * The date and time the key version went, or will go, active, expressed in RFC 3339 timestamp format. This is + * when the key material will be used to generate RRSIGs. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeActivated") + private java.util.Date timeActivated; + + /** + * The date and time the key version went, or will go, active, expressed in RFC 3339 timestamp format. This is + * when the key material will be used to generate RRSIGs. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @param timeActivated the value to set + * @return this builder + **/ + public Builder timeActivated(java.util.Date timeActivated) { + this.timeActivated = timeActivated; + this.__explicitlySet__.add("timeActivated"); + return this; + } + /** + * The date and time the key version went, or will go, inactive, expressed in RFC 3339 timestamp format. This + * is when the key material will no longer be used to generate RRSIGs. For a key signing key (KSK) {@code DnssecKeyVersion}, this is + * populated after {@code PromoteZoneDnssecKeyVersion} has been called on its successor {@code DnssecKeyVersion}. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeInactivated") + private java.util.Date timeInactivated; + + /** + * The date and time the key version went, or will go, inactive, expressed in RFC 3339 timestamp format. This + * is when the key material will no longer be used to generate RRSIGs. For a key signing key (KSK) {@code DnssecKeyVersion}, this is + * populated after {@code PromoteZoneDnssecKeyVersion} has been called on its successor {@code DnssecKeyVersion}. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @param timeInactivated the value to set + * @return this builder + **/ + public Builder timeInactivated(java.util.Date timeInactivated) { + this.timeInactivated = timeInactivated; + this.__explicitlySet__.add("timeInactivated"); + return this; + } + /** + * The date and time the key version was, or will be, unpublished, expressed in RFC 3339 timestamp format. This + * is when the corresponding DNSKEY will be removed from zone contents. For a key signing key (KSK) {@code DnssecKeyVersion}, this is + * populated after {@code PromoteZoneDnssecKeyVersion} has been called on its successor {@code DnssecKeyVersion}. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUnpublished") + private java.util.Date timeUnpublished; + + /** + * The date and time the key version was, or will be, unpublished, expressed in RFC 3339 timestamp format. This + * is when the corresponding DNSKEY will be removed from zone contents. For a key signing key (KSK) {@code DnssecKeyVersion}, this is + * populated after {@code PromoteZoneDnssecKeyVersion} has been called on its successor {@code DnssecKeyVersion}. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @param timeUnpublished the value to set + * @return this builder + **/ + public Builder timeUnpublished(java.util.Date timeUnpublished) { + this.timeUnpublished = timeUnpublished; + this.__explicitlySet__.add("timeUnpublished"); + return this; + } + /** + * The date and time at which the recommended key version publication/activation lifetime ends, expressed in RFC + * 3339 timestamp format. This is when the corresponding DNSKEY should no longer exist in zone contents and no + * longer be used to generate RRSIGs. For a key sigining key (KSK), if {@code PromoteZoneDnssecKeyVersion} has not been called on this + * {@code DnssecKeyVersion}'s successor then it will remain active for arbitrarily long past its recommended lifetime. + * This prevents service disruption at the potential increased risk of key compromise. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeExpired") + private java.util.Date timeExpired; + + /** + * The date and time at which the recommended key version publication/activation lifetime ends, expressed in RFC + * 3339 timestamp format. This is when the corresponding DNSKEY should no longer exist in zone contents and no + * longer be used to generate RRSIGs. For a key sigining key (KSK), if {@code PromoteZoneDnssecKeyVersion} has not been called on this + * {@code DnssecKeyVersion}'s successor then it will remain active for arbitrarily long past its recommended lifetime. + * This prevents service disruption at the potential increased risk of key compromise. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @param timeExpired the value to set + * @return this builder + **/ + public Builder timeExpired(java.util.Date timeExpired) { + this.timeExpired = timeExpired; + this.__explicitlySet__.add("timeExpired"); + return this; + } + /** + * The date and time the key version was promoted expressed in RFC 3339 timestamp format. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timePromoted") + private java.util.Date timePromoted; + + /** + * The date and time the key version was promoted expressed in RFC 3339 timestamp format. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @param timePromoted the value to set + * @return this builder + **/ + public Builder timePromoted(java.util.Date timePromoted) { + this.timePromoted = timePromoted; + this.__explicitlySet__.add("timePromoted"); + return this; + } + /** + * When populated, this is the UUID of the {@code DnssecKeyVersion} that this {@code DnssecKeyVersion} will replace or has + * replaced. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("predecessorDnssecKeyVersionUuid") + private String predecessorDnssecKeyVersionUuid; + + /** + * When populated, this is the UUID of the {@code DnssecKeyVersion} that this {@code DnssecKeyVersion} will replace or has + * replaced. + * + * @param predecessorDnssecKeyVersionUuid the value to set + * @return this builder + **/ + public Builder predecessorDnssecKeyVersionUuid(String predecessorDnssecKeyVersionUuid) { + this.predecessorDnssecKeyVersionUuid = predecessorDnssecKeyVersionUuid; + this.__explicitlySet__.add("predecessorDnssecKeyVersionUuid"); + return this; + } + /** + * When populated, this is the UUID of the {@code DnssecKeyVersion} that will replace, or has replaced, this + * {@code DnssecKeyVersion}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("successorDnssecKeyVersionUuid") + private String successorDnssecKeyVersionUuid; + + /** + * When populated, this is the UUID of the {@code DnssecKeyVersion} that will replace, or has replaced, this + * {@code DnssecKeyVersion}. + * + * @param successorDnssecKeyVersionUuid the value to set + * @return this builder + **/ + public Builder successorDnssecKeyVersionUuid(String successorDnssecKeyVersionUuid) { + this.successorDnssecKeyVersionUuid = successorDnssecKeyVersionUuid; + this.__explicitlySet__.add("successorDnssecKeyVersionUuid"); + return this; + } + /** + * The key tag associated with the {@code DnssecKeyVersion}. This key tag will be present in the RRSIG and DS records + * associated with the key material for this {@code DnssecKeyVersion}. For more information about key tags, see + * [RFC 4034](https://tools.ietf.org/html/rfc4034). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyTag") + private Integer keyTag; + + /** + * The key tag associated with the {@code DnssecKeyVersion}. This key tag will be present in the RRSIG and DS records + * associated with the key material for this {@code DnssecKeyVersion}. For more information about key tags, see + * [RFC 4034](https://tools.ietf.org/html/rfc4034). + * + * @param keyTag the value to set + * @return this builder + **/ + public Builder keyTag(Integer keyTag) { + this.keyTag = keyTag; + this.__explicitlySet__.add("keyTag"); + return this; + } + /** + * An array of data for DS records corresponding with this key version. An entry will exist for each + * supported DS digest algorithm. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dsData") + private java.util.List dsData; + + /** + * An array of data for DS records corresponding with this key version. An entry will exist for each + * supported DS digest algorithm. + * + * @param dsData the value to set + * @return this builder + **/ + public Builder dsData(java.util.List dsData) { + this.dsData = dsData; + this.__explicitlySet__.add("dsData"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public KskDnssecKeyVersion build() { + KskDnssecKeyVersion model = + new KskDnssecKeyVersion( + this.uuid, + this.algorithm, + this.lengthInBytes, + this.timeCreated, + this.timePublished, + this.timeActivated, + this.timeInactivated, + this.timeUnpublished, + this.timeExpired, + this.timePromoted, + this.predecessorDnssecKeyVersionUuid, + this.successorDnssecKeyVersionUuid, + this.keyTag, + this.dsData); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(KskDnssecKeyVersion model) { + if (model.wasPropertyExplicitlySet("uuid")) { + this.uuid(model.getUuid()); + } + if (model.wasPropertyExplicitlySet("algorithm")) { + this.algorithm(model.getAlgorithm()); + } + if (model.wasPropertyExplicitlySet("lengthInBytes")) { + this.lengthInBytes(model.getLengthInBytes()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timePublished")) { + this.timePublished(model.getTimePublished()); + } + if (model.wasPropertyExplicitlySet("timeActivated")) { + this.timeActivated(model.getTimeActivated()); + } + if (model.wasPropertyExplicitlySet("timeInactivated")) { + this.timeInactivated(model.getTimeInactivated()); + } + if (model.wasPropertyExplicitlySet("timeUnpublished")) { + this.timeUnpublished(model.getTimeUnpublished()); + } + if (model.wasPropertyExplicitlySet("timeExpired")) { + this.timeExpired(model.getTimeExpired()); + } + if (model.wasPropertyExplicitlySet("timePromoted")) { + this.timePromoted(model.getTimePromoted()); + } + if (model.wasPropertyExplicitlySet("predecessorDnssecKeyVersionUuid")) { + this.predecessorDnssecKeyVersionUuid(model.getPredecessorDnssecKeyVersionUuid()); + } + if (model.wasPropertyExplicitlySet("successorDnssecKeyVersionUuid")) { + this.successorDnssecKeyVersionUuid(model.getSuccessorDnssecKeyVersionUuid()); + } + if (model.wasPropertyExplicitlySet("keyTag")) { + this.keyTag(model.getKeyTag()); + } + if (model.wasPropertyExplicitlySet("dsData")) { + this.dsData(model.getDsData()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The UUID of the {@code DnssecKeyVersion}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("uuid") + private final String uuid; + + /** + * The UUID of the {@code DnssecKeyVersion}. + * + * @return the value + **/ + public String getUuid() { + return uuid; + } + + /** + * The signing algorithm used for the key. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("algorithm") + private final DnssecSigningAlgorithm algorithm; + + /** + * The signing algorithm used for the key. + * + * @return the value + **/ + public DnssecSigningAlgorithm getAlgorithm() { + return algorithm; + } + + /** + * The length of the corresponding private key in bytes, expressed as an integer. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lengthInBytes") + private final Integer lengthInBytes; + + /** + * The length of the corresponding private key in bytes, expressed as an integer. + * + * @return the value + **/ + public Integer getLengthInBytes() { + return lengthInBytes; + } + + /** + * The date and time the key version was created, expressed in RFC 3339 timestamp format. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the key version was created, expressed in RFC 3339 timestamp format. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the key version was, or will be, published, expressed in RFC 3339 timestamp format. This is + * when the zone contents will include a DNSKEY record corresponding to the key material. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timePublished") + private final java.util.Date timePublished; + + /** + * The date and time the key version was, or will be, published, expressed in RFC 3339 timestamp format. This is + * when the zone contents will include a DNSKEY record corresponding to the key material. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @return the value + **/ + public java.util.Date getTimePublished() { + return timePublished; + } + + /** + * The date and time the key version went, or will go, active, expressed in RFC 3339 timestamp format. This is + * when the key material will be used to generate RRSIGs. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeActivated") + private final java.util.Date timeActivated; + + /** + * The date and time the key version went, or will go, active, expressed in RFC 3339 timestamp format. This is + * when the key material will be used to generate RRSIGs. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @return the value + **/ + public java.util.Date getTimeActivated() { + return timeActivated; + } + + /** + * The date and time the key version went, or will go, inactive, expressed in RFC 3339 timestamp format. This + * is when the key material will no longer be used to generate RRSIGs. For a key signing key (KSK) {@code DnssecKeyVersion}, this is + * populated after {@code PromoteZoneDnssecKeyVersion} has been called on its successor {@code DnssecKeyVersion}. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeInactivated") + private final java.util.Date timeInactivated; + + /** + * The date and time the key version went, or will go, inactive, expressed in RFC 3339 timestamp format. This + * is when the key material will no longer be used to generate RRSIGs. For a key signing key (KSK) {@code DnssecKeyVersion}, this is + * populated after {@code PromoteZoneDnssecKeyVersion} has been called on its successor {@code DnssecKeyVersion}. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @return the value + **/ + public java.util.Date getTimeInactivated() { + return timeInactivated; + } + + /** + * The date and time the key version was, or will be, unpublished, expressed in RFC 3339 timestamp format. This + * is when the corresponding DNSKEY will be removed from zone contents. For a key signing key (KSK) {@code DnssecKeyVersion}, this is + * populated after {@code PromoteZoneDnssecKeyVersion} has been called on its successor {@code DnssecKeyVersion}. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUnpublished") + private final java.util.Date timeUnpublished; + + /** + * The date and time the key version was, or will be, unpublished, expressed in RFC 3339 timestamp format. This + * is when the corresponding DNSKEY will be removed from zone contents. For a key signing key (KSK) {@code DnssecKeyVersion}, this is + * populated after {@code PromoteZoneDnssecKeyVersion} has been called on its successor {@code DnssecKeyVersion}. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @return the value + **/ + public java.util.Date getTimeUnpublished() { + return timeUnpublished; + } + + /** + * The date and time at which the recommended key version publication/activation lifetime ends, expressed in RFC + * 3339 timestamp format. This is when the corresponding DNSKEY should no longer exist in zone contents and no + * longer be used to generate RRSIGs. For a key sigining key (KSK), if {@code PromoteZoneDnssecKeyVersion} has not been called on this + * {@code DnssecKeyVersion}'s successor then it will remain active for arbitrarily long past its recommended lifetime. + * This prevents service disruption at the potential increased risk of key compromise. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeExpired") + private final java.util.Date timeExpired; + + /** + * The date and time at which the recommended key version publication/activation lifetime ends, expressed in RFC + * 3339 timestamp format. This is when the corresponding DNSKEY should no longer exist in zone contents and no + * longer be used to generate RRSIGs. For a key sigining key (KSK), if {@code PromoteZoneDnssecKeyVersion} has not been called on this + * {@code DnssecKeyVersion}'s successor then it will remain active for arbitrarily long past its recommended lifetime. + * This prevents service disruption at the potential increased risk of key compromise. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @return the value + **/ + public java.util.Date getTimeExpired() { + return timeExpired; + } + + /** + * The date and time the key version was promoted expressed in RFC 3339 timestamp format. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timePromoted") + private final java.util.Date timePromoted; + + /** + * The date and time the key version was promoted expressed in RFC 3339 timestamp format. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @return the value + **/ + public java.util.Date getTimePromoted() { + return timePromoted; + } + + /** + * When populated, this is the UUID of the {@code DnssecKeyVersion} that this {@code DnssecKeyVersion} will replace or has + * replaced. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("predecessorDnssecKeyVersionUuid") + private final String predecessorDnssecKeyVersionUuid; + + /** + * When populated, this is the UUID of the {@code DnssecKeyVersion} that this {@code DnssecKeyVersion} will replace or has + * replaced. + * + * @return the value + **/ + public String getPredecessorDnssecKeyVersionUuid() { + return predecessorDnssecKeyVersionUuid; + } + + /** + * When populated, this is the UUID of the {@code DnssecKeyVersion} that will replace, or has replaced, this + * {@code DnssecKeyVersion}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("successorDnssecKeyVersionUuid") + private final String successorDnssecKeyVersionUuid; + + /** + * When populated, this is the UUID of the {@code DnssecKeyVersion} that will replace, or has replaced, this + * {@code DnssecKeyVersion}. + * + * @return the value + **/ + public String getSuccessorDnssecKeyVersionUuid() { + return successorDnssecKeyVersionUuid; + } + + /** + * The key tag associated with the {@code DnssecKeyVersion}. This key tag will be present in the RRSIG and DS records + * associated with the key material for this {@code DnssecKeyVersion}. For more information about key tags, see + * [RFC 4034](https://tools.ietf.org/html/rfc4034). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyTag") + private final Integer keyTag; + + /** + * The key tag associated with the {@code DnssecKeyVersion}. This key tag will be present in the RRSIG and DS records + * associated with the key material for this {@code DnssecKeyVersion}. For more information about key tags, see + * [RFC 4034](https://tools.ietf.org/html/rfc4034). + * + * @return the value + **/ + public Integer getKeyTag() { + return keyTag; + } + + /** + * An array of data for DS records corresponding with this key version. An entry will exist for each + * supported DS digest algorithm. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dsData") + private final java.util.List dsData; + + /** + * An array of data for DS records corresponding with this key version. An entry will exist for each + * supported DS digest algorithm. + * + * @return the value + **/ + public java.util.List getDsData() { + return dsData; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("KskDnssecKeyVersion("); + sb.append("super=").append(super.toString()); + sb.append("uuid=").append(String.valueOf(this.uuid)); + sb.append(", algorithm=").append(String.valueOf(this.algorithm)); + sb.append(", lengthInBytes=").append(String.valueOf(this.lengthInBytes)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timePublished=").append(String.valueOf(this.timePublished)); + sb.append(", timeActivated=").append(String.valueOf(this.timeActivated)); + sb.append(", timeInactivated=").append(String.valueOf(this.timeInactivated)); + sb.append(", timeUnpublished=").append(String.valueOf(this.timeUnpublished)); + sb.append(", timeExpired=").append(String.valueOf(this.timeExpired)); + sb.append(", timePromoted=").append(String.valueOf(this.timePromoted)); + sb.append(", predecessorDnssecKeyVersionUuid=") + .append(String.valueOf(this.predecessorDnssecKeyVersionUuid)); + sb.append(", successorDnssecKeyVersionUuid=") + .append(String.valueOf(this.successorDnssecKeyVersionUuid)); + sb.append(", keyTag=").append(String.valueOf(this.keyTag)); + sb.append(", dsData=").append(String.valueOf(this.dsData)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof KskDnssecKeyVersion)) { + return false; + } + + KskDnssecKeyVersion other = (KskDnssecKeyVersion) o; + return java.util.Objects.equals(this.uuid, other.uuid) + && java.util.Objects.equals(this.algorithm, other.algorithm) + && java.util.Objects.equals(this.lengthInBytes, other.lengthInBytes) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timePublished, other.timePublished) + && java.util.Objects.equals(this.timeActivated, other.timeActivated) + && java.util.Objects.equals(this.timeInactivated, other.timeInactivated) + && java.util.Objects.equals(this.timeUnpublished, other.timeUnpublished) + && java.util.Objects.equals(this.timeExpired, other.timeExpired) + && java.util.Objects.equals(this.timePromoted, other.timePromoted) + && java.util.Objects.equals( + this.predecessorDnssecKeyVersionUuid, other.predecessorDnssecKeyVersionUuid) + && java.util.Objects.equals( + this.successorDnssecKeyVersionUuid, other.successorDnssecKeyVersionUuid) + && java.util.Objects.equals(this.keyTag, other.keyTag) + && java.util.Objects.equals(this.dsData, other.dsData) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.uuid == null ? 43 : this.uuid.hashCode()); + result = (result * PRIME) + (this.algorithm == null ? 43 : this.algorithm.hashCode()); + result = + (result * PRIME) + + (this.lengthInBytes == null ? 43 : this.lengthInBytes.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = + (result * PRIME) + + (this.timePublished == null ? 43 : this.timePublished.hashCode()); + result = + (result * PRIME) + + (this.timeActivated == null ? 43 : this.timeActivated.hashCode()); + result = + (result * PRIME) + + (this.timeInactivated == null ? 43 : this.timeInactivated.hashCode()); + result = + (result * PRIME) + + (this.timeUnpublished == null ? 43 : this.timeUnpublished.hashCode()); + result = (result * PRIME) + (this.timeExpired == null ? 43 : this.timeExpired.hashCode()); + result = (result * PRIME) + (this.timePromoted == null ? 43 : this.timePromoted.hashCode()); + result = + (result * PRIME) + + (this.predecessorDnssecKeyVersionUuid == null + ? 43 + : this.predecessorDnssecKeyVersionUuid.hashCode()); + result = + (result * PRIME) + + (this.successorDnssecKeyVersionUuid == null + ? 43 + : this.successorDnssecKeyVersionUuid.hashCode()); + result = (result * PRIME) + (this.keyTag == null ? 43 : this.keyTag.hashCode()); + result = (result * PRIME) + (this.dsData == null ? 43 : this.dsData.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/model/PromoteZoneDnssecKeyVersionDetails.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/PromoteZoneDnssecKeyVersionDetails.java new file mode 100644 index 00000000000..cd693a69392 --- /dev/null +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/PromoteZoneDnssecKeyVersionDetails.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dns.model; + +/** + * Details for promoting a {@code DnssecKeyVersion} on a zone. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180115") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PromoteZoneDnssecKeyVersionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PromoteZoneDnssecKeyVersionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"dnssecKeyVersionUuid"}) + public PromoteZoneDnssecKeyVersionDetails(String dnssecKeyVersionUuid) { + super(); + this.dnssecKeyVersionUuid = dnssecKeyVersionUuid; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The UUID of the {@code DnssecKeyVersion} that is being promoted. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dnssecKeyVersionUuid") + private String dnssecKeyVersionUuid; + + /** + * The UUID of the {@code DnssecKeyVersion} that is being promoted. + * + * @param dnssecKeyVersionUuid the value to set + * @return this builder + **/ + public Builder dnssecKeyVersionUuid(String dnssecKeyVersionUuid) { + this.dnssecKeyVersionUuid = dnssecKeyVersionUuid; + this.__explicitlySet__.add("dnssecKeyVersionUuid"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PromoteZoneDnssecKeyVersionDetails build() { + PromoteZoneDnssecKeyVersionDetails model = + new PromoteZoneDnssecKeyVersionDetails(this.dnssecKeyVersionUuid); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PromoteZoneDnssecKeyVersionDetails model) { + if (model.wasPropertyExplicitlySet("dnssecKeyVersionUuid")) { + this.dnssecKeyVersionUuid(model.getDnssecKeyVersionUuid()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The UUID of the {@code DnssecKeyVersion} that is being promoted. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dnssecKeyVersionUuid") + private final String dnssecKeyVersionUuid; + + /** + * The UUID of the {@code DnssecKeyVersion} that is being promoted. + * + * @return the value + **/ + public String getDnssecKeyVersionUuid() { + return dnssecKeyVersionUuid; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PromoteZoneDnssecKeyVersionDetails("); + sb.append("super=").append(super.toString()); + sb.append("dnssecKeyVersionUuid=").append(String.valueOf(this.dnssecKeyVersionUuid)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PromoteZoneDnssecKeyVersionDetails)) { + return false; + } + + PromoteZoneDnssecKeyVersionDetails other = (PromoteZoneDnssecKeyVersionDetails) o; + return java.util.Objects.equals(this.dnssecKeyVersionUuid, other.dnssecKeyVersionUuid) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.dnssecKeyVersionUuid == null + ? 43 + : this.dnssecKeyVersionUuid.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/model/StageZoneDnssecKeyVersionDetails.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/StageZoneDnssecKeyVersionDetails.java new file mode 100644 index 00000000000..e63511423f9 --- /dev/null +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/StageZoneDnssecKeyVersionDetails.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dns.model; + +/** + * Details for staging a {@code DnssecKeyVersion} on a zone. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180115") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = StageZoneDnssecKeyVersionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class StageZoneDnssecKeyVersionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"predecessorDnssecKeyVersionUuid"}) + public StageZoneDnssecKeyVersionDetails(String predecessorDnssecKeyVersionUuid) { + super(); + this.predecessorDnssecKeyVersionUuid = predecessorDnssecKeyVersionUuid; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The UUID of the {@code DnssecKeyVersion} for which a new successor should be generated. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("predecessorDnssecKeyVersionUuid") + private String predecessorDnssecKeyVersionUuid; + + /** + * The UUID of the {@code DnssecKeyVersion} for which a new successor should be generated. + * + * @param predecessorDnssecKeyVersionUuid the value to set + * @return this builder + **/ + public Builder predecessorDnssecKeyVersionUuid(String predecessorDnssecKeyVersionUuid) { + this.predecessorDnssecKeyVersionUuid = predecessorDnssecKeyVersionUuid; + this.__explicitlySet__.add("predecessorDnssecKeyVersionUuid"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public StageZoneDnssecKeyVersionDetails build() { + StageZoneDnssecKeyVersionDetails model = + new StageZoneDnssecKeyVersionDetails(this.predecessorDnssecKeyVersionUuid); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(StageZoneDnssecKeyVersionDetails model) { + if (model.wasPropertyExplicitlySet("predecessorDnssecKeyVersionUuid")) { + this.predecessorDnssecKeyVersionUuid(model.getPredecessorDnssecKeyVersionUuid()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The UUID of the {@code DnssecKeyVersion} for which a new successor should be generated. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("predecessorDnssecKeyVersionUuid") + private final String predecessorDnssecKeyVersionUuid; + + /** + * The UUID of the {@code DnssecKeyVersion} for which a new successor should be generated. + * + * @return the value + **/ + public String getPredecessorDnssecKeyVersionUuid() { + return predecessorDnssecKeyVersionUuid; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("StageZoneDnssecKeyVersionDetails("); + sb.append("super=").append(super.toString()); + sb.append("predecessorDnssecKeyVersionUuid=") + .append(String.valueOf(this.predecessorDnssecKeyVersionUuid)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof StageZoneDnssecKeyVersionDetails)) { + return false; + } + + StageZoneDnssecKeyVersionDetails other = (StageZoneDnssecKeyVersionDetails) o; + return java.util.Objects.equals( + this.predecessorDnssecKeyVersionUuid, other.predecessorDnssecKeyVersionUuid) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.predecessorDnssecKeyVersionUuid == null + ? 43 + : this.predecessorDnssecKeyVersionUuid.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/model/UpdateZoneDetails.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/UpdateZoneDetails.java index 08771d05587..80f2fee09ca 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/model/UpdateZoneDetails.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/UpdateZoneDetails.java @@ -27,17 +27,20 @@ public final class UpdateZoneDetails extends com.oracle.bmc.http.internal.Explic @java.beans.ConstructorProperties({ "freeformTags", "definedTags", + "dnssecState", "externalMasters", "externalDownstreams" }) public UpdateZoneDetails( java.util.Map freeformTags, java.util.Map> definedTags, + ZoneDnssecState dnssecState, java.util.List externalMasters, java.util.List externalDownstreams) { super(); this.freeformTags = freeformTags; this.definedTags = definedTags; + this.dnssecState = dnssecState; this.externalMasters = externalMasters; this.externalDownstreams = externalDownstreams; } @@ -97,6 +100,72 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * The state of DNSSEC on the zone. + *

+ * For DNSSEC to function, every parent zone in the DNS tree up to the top-level domain (or an independent + * trust anchor) must also have DNSSEC correctly set up. + * After enabling DNSSEC, you must add a DS record to the zone's parent zone containing the + * {@code KskDnssecKeyVersion} data. You can find the DS data in the {@code dsData} attribute of the {@code KskDnssecKeyVersion}. + * Then, use the {@code PromoteZoneDnssecKeyVersion} operation to promote the {@code KskDnssecKeyVersion}. + *

+ * New {@code KskDnssecKeyVersion}s are generated annually, a week before the existing {@code KskDnssecKeyVersion}'s expiration. + * To rollover a {@code KskDnssecKeyVersion}, you must replace the parent zone's DS record containing the old + * {@code KskDnssecKeyVersion} data with the data from the new {@code KskDnssecKeyVersion}. + *

+ * To remove the old DS record without causing service disruption, wait until the old DS record's TTL has + * expired, and the new DS record has propagated. After the DS replacement has been completed, then the + * {@code PromoteZoneDnssecKeyVersion} operation must be called. + *

+ * Metrics are emitted in the {@code oci_dns} namespace daily for each {@code KskDnssecKeyVersion} indicating how many + * days are left until expiration. + * We recommend that you set up alarms and notifications for KskDnssecKeyVersion expiration so that the + * necessary parent zone updates can be made and the {@code PromoteZoneDnssecKeyVersion} operation can be called. + *

+ * Enabling DNSSEC results in additional records in DNS responses which increases their size and can + * cause higher response latency. + *

+ * For more information, see [DNSSEC](https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dnssecState") + private ZoneDnssecState dnssecState; + + /** + * The state of DNSSEC on the zone. + *

+ * For DNSSEC to function, every parent zone in the DNS tree up to the top-level domain (or an independent + * trust anchor) must also have DNSSEC correctly set up. + * After enabling DNSSEC, you must add a DS record to the zone's parent zone containing the + * {@code KskDnssecKeyVersion} data. You can find the DS data in the {@code dsData} attribute of the {@code KskDnssecKeyVersion}. + * Then, use the {@code PromoteZoneDnssecKeyVersion} operation to promote the {@code KskDnssecKeyVersion}. + *

+ * New {@code KskDnssecKeyVersion}s are generated annually, a week before the existing {@code KskDnssecKeyVersion}'s expiration. + * To rollover a {@code KskDnssecKeyVersion}, you must replace the parent zone's DS record containing the old + * {@code KskDnssecKeyVersion} data with the data from the new {@code KskDnssecKeyVersion}. + *

+ * To remove the old DS record without causing service disruption, wait until the old DS record's TTL has + * expired, and the new DS record has propagated. After the DS replacement has been completed, then the + * {@code PromoteZoneDnssecKeyVersion} operation must be called. + *

+ * Metrics are emitted in the {@code oci_dns} namespace daily for each {@code KskDnssecKeyVersion} indicating how many + * days are left until expiration. + * We recommend that you set up alarms and notifications for KskDnssecKeyVersion expiration so that the + * necessary parent zone updates can be made and the {@code PromoteZoneDnssecKeyVersion} operation can be called. + *

+ * Enabling DNSSEC results in additional records in DNS responses which increases their size and can + * cause higher response latency. + *

+ * For more information, see [DNSSEC](https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm). + * + * @param dnssecState the value to set + * @return this builder + **/ + public Builder dnssecState(ZoneDnssecState dnssecState) { + this.dnssecState = dnssecState; + this.__explicitlySet__.add("dnssecState"); + return this; + } /** * External master servers for the zone. {@code externalMasters} becomes a * required parameter when the {@code zoneType} value is {@code SECONDARY}. @@ -146,6 +215,7 @@ public UpdateZoneDetails build() { new UpdateZoneDetails( this.freeformTags, this.definedTags, + this.dnssecState, this.externalMasters, this.externalDownstreams); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -162,6 +232,9 @@ public Builder copy(UpdateZoneDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("dnssecState")) { + this.dnssecState(model.getDnssecState()); + } if (model.wasPropertyExplicitlySet("externalMasters")) { this.externalMasters(model.getExternalMasters()); } @@ -231,6 +304,70 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * The state of DNSSEC on the zone. + *

+ * For DNSSEC to function, every parent zone in the DNS tree up to the top-level domain (or an independent + * trust anchor) must also have DNSSEC correctly set up. + * After enabling DNSSEC, you must add a DS record to the zone's parent zone containing the + * {@code KskDnssecKeyVersion} data. You can find the DS data in the {@code dsData} attribute of the {@code KskDnssecKeyVersion}. + * Then, use the {@code PromoteZoneDnssecKeyVersion} operation to promote the {@code KskDnssecKeyVersion}. + *

+ * New {@code KskDnssecKeyVersion}s are generated annually, a week before the existing {@code KskDnssecKeyVersion}'s expiration. + * To rollover a {@code KskDnssecKeyVersion}, you must replace the parent zone's DS record containing the old + * {@code KskDnssecKeyVersion} data with the data from the new {@code KskDnssecKeyVersion}. + *

+ * To remove the old DS record without causing service disruption, wait until the old DS record's TTL has + * expired, and the new DS record has propagated. After the DS replacement has been completed, then the + * {@code PromoteZoneDnssecKeyVersion} operation must be called. + *

+ * Metrics are emitted in the {@code oci_dns} namespace daily for each {@code KskDnssecKeyVersion} indicating how many + * days are left until expiration. + * We recommend that you set up alarms and notifications for KskDnssecKeyVersion expiration so that the + * necessary parent zone updates can be made and the {@code PromoteZoneDnssecKeyVersion} operation can be called. + *

+ * Enabling DNSSEC results in additional records in DNS responses which increases their size and can + * cause higher response latency. + *

+ * For more information, see [DNSSEC](https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dnssecState") + private final ZoneDnssecState dnssecState; + + /** + * The state of DNSSEC on the zone. + *

+ * For DNSSEC to function, every parent zone in the DNS tree up to the top-level domain (or an independent + * trust anchor) must also have DNSSEC correctly set up. + * After enabling DNSSEC, you must add a DS record to the zone's parent zone containing the + * {@code KskDnssecKeyVersion} data. You can find the DS data in the {@code dsData} attribute of the {@code KskDnssecKeyVersion}. + * Then, use the {@code PromoteZoneDnssecKeyVersion} operation to promote the {@code KskDnssecKeyVersion}. + *

+ * New {@code KskDnssecKeyVersion}s are generated annually, a week before the existing {@code KskDnssecKeyVersion}'s expiration. + * To rollover a {@code KskDnssecKeyVersion}, you must replace the parent zone's DS record containing the old + * {@code KskDnssecKeyVersion} data with the data from the new {@code KskDnssecKeyVersion}. + *

+ * To remove the old DS record without causing service disruption, wait until the old DS record's TTL has + * expired, and the new DS record has propagated. After the DS replacement has been completed, then the + * {@code PromoteZoneDnssecKeyVersion} operation must be called. + *

+ * Metrics are emitted in the {@code oci_dns} namespace daily for each {@code KskDnssecKeyVersion} indicating how many + * days are left until expiration. + * We recommend that you set up alarms and notifications for KskDnssecKeyVersion expiration so that the + * necessary parent zone updates can be made and the {@code PromoteZoneDnssecKeyVersion} operation can be called. + *

+ * Enabling DNSSEC results in additional records in DNS responses which increases their size and can + * cause higher response latency. + *

+ * For more information, see [DNSSEC](https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm). + * + * @return the value + **/ + public ZoneDnssecState getDnssecState() { + return dnssecState; + } + /** * External master servers for the zone. {@code externalMasters} becomes a * required parameter when the {@code zoneType} value is {@code SECONDARY}. @@ -283,6 +420,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", dnssecState=").append(String.valueOf(this.dnssecState)); sb.append(", externalMasters=").append(String.valueOf(this.externalMasters)); sb.append(", externalDownstreams=").append(String.valueOf(this.externalDownstreams)); sb.append(")"); @@ -301,6 +439,7 @@ public boolean equals(Object o) { UpdateZoneDetails other = (UpdateZoneDetails) o; return java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.dnssecState, other.dnssecState) && java.util.Objects.equals(this.externalMasters, other.externalMasters) && java.util.Objects.equals(this.externalDownstreams, other.externalDownstreams) && super.equals(other); @@ -312,6 +451,7 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.dnssecState == null ? 43 : this.dnssecState.hashCode()); result = (result * PRIME) + (this.externalMasters == null ? 43 : this.externalMasters.hashCode()); diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/model/Zone.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/Zone.java index 8ba320abe63..93c7efb7f3a 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/model/Zone.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/Zone.java @@ -30,6 +30,7 @@ public final class Zone extends com.oracle.bmc.http.internal.ExplicitlySetBmcMod "scope", "freeformTags", "definedTags", + "dnssecState", "externalMasters", "externalDownstreams", "self", @@ -39,6 +40,7 @@ public final class Zone extends com.oracle.bmc.http.internal.ExplicitlySetBmcMod "serial", "lifecycleState", "isProtected", + "dnssecConfig", "nameservers", "zoneTransferServers" }) @@ -50,6 +52,7 @@ public Zone( Scope scope, java.util.Map freeformTags, java.util.Map> definedTags, + ZoneDnssecState dnssecState, java.util.List externalMasters, java.util.List externalDownstreams, String self, @@ -59,6 +62,7 @@ public Zone( Long serial, LifecycleState lifecycleState, Boolean isProtected, + DnssecConfig dnssecConfig, java.util.List nameservers, java.util.List zoneTransferServers) { super(); @@ -69,6 +73,7 @@ public Zone( this.scope = scope; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.dnssecState = dnssecState; this.externalMasters = externalMasters; this.externalDownstreams = externalDownstreams; this.self = self; @@ -78,6 +83,7 @@ public Zone( this.serial = serial; this.lifecycleState = lifecycleState; this.isProtected = isProtected; + this.dnssecConfig = dnssecConfig; this.nameservers = nameservers; this.zoneTransferServers = zoneTransferServers; } @@ -225,6 +231,72 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * The state of DNSSEC on the zone. + *

+ * For DNSSEC to function, every parent zone in the DNS tree up to the top-level domain (or an independent + * trust anchor) must also have DNSSEC correctly set up. + * After enabling DNSSEC, you must add a DS record to the zone's parent zone containing the + * {@code KskDnssecKeyVersion} data. You can find the DS data in the {@code dsData} attribute of the {@code KskDnssecKeyVersion}. + * Then, use the {@code PromoteZoneDnssecKeyVersion} operation to promote the {@code KskDnssecKeyVersion}. + *

+ * New {@code KskDnssecKeyVersion}s are generated annually, a week before the existing {@code KskDnssecKeyVersion}'s expiration. + * To rollover a {@code KskDnssecKeyVersion}, you must replace the parent zone's DS record containing the old + * {@code KskDnssecKeyVersion} data with the data from the new {@code KskDnssecKeyVersion}. + *

+ * To remove the old DS record without causing service disruption, wait until the old DS record's TTL has + * expired, and the new DS record has propagated. After the DS replacement has been completed, then the + * {@code PromoteZoneDnssecKeyVersion} operation must be called. + *

+ * Metrics are emitted in the {@code oci_dns} namespace daily for each {@code KskDnssecKeyVersion} indicating how many + * days are left until expiration. + * We recommend that you set up alarms and notifications for KskDnssecKeyVersion expiration so that the + * necessary parent zone updates can be made and the {@code PromoteZoneDnssecKeyVersion} operation can be called. + *

+ * Enabling DNSSEC results in additional records in DNS responses which increases their size and can + * cause higher response latency. + *

+ * For more information, see [DNSSEC](https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dnssecState") + private ZoneDnssecState dnssecState; + + /** + * The state of DNSSEC on the zone. + *

+ * For DNSSEC to function, every parent zone in the DNS tree up to the top-level domain (or an independent + * trust anchor) must also have DNSSEC correctly set up. + * After enabling DNSSEC, you must add a DS record to the zone's parent zone containing the + * {@code KskDnssecKeyVersion} data. You can find the DS data in the {@code dsData} attribute of the {@code KskDnssecKeyVersion}. + * Then, use the {@code PromoteZoneDnssecKeyVersion} operation to promote the {@code KskDnssecKeyVersion}. + *

+ * New {@code KskDnssecKeyVersion}s are generated annually, a week before the existing {@code KskDnssecKeyVersion}'s expiration. + * To rollover a {@code KskDnssecKeyVersion}, you must replace the parent zone's DS record containing the old + * {@code KskDnssecKeyVersion} data with the data from the new {@code KskDnssecKeyVersion}. + *

+ * To remove the old DS record without causing service disruption, wait until the old DS record's TTL has + * expired, and the new DS record has propagated. After the DS replacement has been completed, then the + * {@code PromoteZoneDnssecKeyVersion} operation must be called. + *

+ * Metrics are emitted in the {@code oci_dns} namespace daily for each {@code KskDnssecKeyVersion} indicating how many + * days are left until expiration. + * We recommend that you set up alarms and notifications for KskDnssecKeyVersion expiration so that the + * necessary parent zone updates can be made and the {@code PromoteZoneDnssecKeyVersion} operation can be called. + *

+ * Enabling DNSSEC results in additional records in DNS responses which increases their size and can + * cause higher response latency. + *

+ * For more information, see [DNSSEC](https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm). + * + * @param dnssecState the value to set + * @return this builder + **/ + public Builder dnssecState(ZoneDnssecState dnssecState) { + this.dnssecState = dnssecState; + this.__explicitlySet__.add("dnssecState"); + return this; + } /** * External master servers for the zone. {@code externalMasters} becomes a * required parameter when the {@code zoneType} value is {@code SECONDARY}. @@ -395,6 +467,15 @@ public Builder isProtected(Boolean isProtected) { this.__explicitlySet__.add("isProtected"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("dnssecConfig") + private DnssecConfig dnssecConfig; + + public Builder dnssecConfig(DnssecConfig dnssecConfig) { + this.dnssecConfig = dnssecConfig; + this.__explicitlySet__.add("dnssecConfig"); + return this; + } /** * The authoritative nameservers for the zone. **/ @@ -443,6 +524,7 @@ public Zone build() { this.scope, this.freeformTags, this.definedTags, + this.dnssecState, this.externalMasters, this.externalDownstreams, this.self, @@ -452,6 +534,7 @@ public Zone build() { this.serial, this.lifecycleState, this.isProtected, + this.dnssecConfig, this.nameservers, this.zoneTransferServers); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -483,6 +566,9 @@ public Builder copy(Zone model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("dnssecState")) { + this.dnssecState(model.getDnssecState()); + } if (model.wasPropertyExplicitlySet("externalMasters")) { this.externalMasters(model.getExternalMasters()); } @@ -510,6 +596,9 @@ public Builder copy(Zone model) { if (model.wasPropertyExplicitlySet("isProtected")) { this.isProtected(model.getIsProtected()); } + if (model.wasPropertyExplicitlySet("dnssecConfig")) { + this.dnssecConfig(model.getDnssecConfig()); + } if (model.wasPropertyExplicitlySet("nameservers")) { this.nameservers(model.getNameservers()); } @@ -706,6 +795,70 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * The state of DNSSEC on the zone. + *

+ * For DNSSEC to function, every parent zone in the DNS tree up to the top-level domain (or an independent + * trust anchor) must also have DNSSEC correctly set up. + * After enabling DNSSEC, you must add a DS record to the zone's parent zone containing the + * {@code KskDnssecKeyVersion} data. You can find the DS data in the {@code dsData} attribute of the {@code KskDnssecKeyVersion}. + * Then, use the {@code PromoteZoneDnssecKeyVersion} operation to promote the {@code KskDnssecKeyVersion}. + *

+ * New {@code KskDnssecKeyVersion}s are generated annually, a week before the existing {@code KskDnssecKeyVersion}'s expiration. + * To rollover a {@code KskDnssecKeyVersion}, you must replace the parent zone's DS record containing the old + * {@code KskDnssecKeyVersion} data with the data from the new {@code KskDnssecKeyVersion}. + *

+ * To remove the old DS record without causing service disruption, wait until the old DS record's TTL has + * expired, and the new DS record has propagated. After the DS replacement has been completed, then the + * {@code PromoteZoneDnssecKeyVersion} operation must be called. + *

+ * Metrics are emitted in the {@code oci_dns} namespace daily for each {@code KskDnssecKeyVersion} indicating how many + * days are left until expiration. + * We recommend that you set up alarms and notifications for KskDnssecKeyVersion expiration so that the + * necessary parent zone updates can be made and the {@code PromoteZoneDnssecKeyVersion} operation can be called. + *

+ * Enabling DNSSEC results in additional records in DNS responses which increases their size and can + * cause higher response latency. + *

+ * For more information, see [DNSSEC](https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dnssecState") + private final ZoneDnssecState dnssecState; + + /** + * The state of DNSSEC on the zone. + *

+ * For DNSSEC to function, every parent zone in the DNS tree up to the top-level domain (or an independent + * trust anchor) must also have DNSSEC correctly set up. + * After enabling DNSSEC, you must add a DS record to the zone's parent zone containing the + * {@code KskDnssecKeyVersion} data. You can find the DS data in the {@code dsData} attribute of the {@code KskDnssecKeyVersion}. + * Then, use the {@code PromoteZoneDnssecKeyVersion} operation to promote the {@code KskDnssecKeyVersion}. + *

+ * New {@code KskDnssecKeyVersion}s are generated annually, a week before the existing {@code KskDnssecKeyVersion}'s expiration. + * To rollover a {@code KskDnssecKeyVersion}, you must replace the parent zone's DS record containing the old + * {@code KskDnssecKeyVersion} data with the data from the new {@code KskDnssecKeyVersion}. + *

+ * To remove the old DS record without causing service disruption, wait until the old DS record's TTL has + * expired, and the new DS record has propagated. After the DS replacement has been completed, then the + * {@code PromoteZoneDnssecKeyVersion} operation must be called. + *

+ * Metrics are emitted in the {@code oci_dns} namespace daily for each {@code KskDnssecKeyVersion} indicating how many + * days are left until expiration. + * We recommend that you set up alarms and notifications for KskDnssecKeyVersion expiration so that the + * necessary parent zone updates can be made and the {@code PromoteZoneDnssecKeyVersion} operation can be called. + *

+ * Enabling DNSSEC results in additional records in DNS responses which increases their size and can + * cause higher response latency. + *

+ * For more information, see [DNSSEC](https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm). + * + * @return the value + **/ + public ZoneDnssecState getDnssecState() { + return dnssecState; + } + /** * External master servers for the zone. {@code externalMasters} becomes a * required parameter when the {@code zoneType} value is {@code SECONDARY}. @@ -910,6 +1063,13 @@ public Boolean getIsProtected() { return isProtected; } + @com.fasterxml.jackson.annotation.JsonProperty("dnssecConfig") + private final DnssecConfig dnssecConfig; + + public DnssecConfig getDnssecConfig() { + return dnssecConfig; + } + /** * The authoritative nameservers for the zone. **/ @@ -961,6 +1121,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", scope=").append(String.valueOf(this.scope)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", dnssecState=").append(String.valueOf(this.dnssecState)); sb.append(", externalMasters=").append(String.valueOf(this.externalMasters)); sb.append(", externalDownstreams=").append(String.valueOf(this.externalDownstreams)); sb.append(", self=").append(String.valueOf(this.self)); @@ -970,6 +1131,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", serial=").append(String.valueOf(this.serial)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", isProtected=").append(String.valueOf(this.isProtected)); + sb.append(", dnssecConfig=").append(String.valueOf(this.dnssecConfig)); sb.append(", nameservers=").append(String.valueOf(this.nameservers)); sb.append(", zoneTransferServers=").append(String.valueOf(this.zoneTransferServers)); sb.append(")"); @@ -993,6 +1155,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.scope, other.scope) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.dnssecState, other.dnssecState) && java.util.Objects.equals(this.externalMasters, other.externalMasters) && java.util.Objects.equals(this.externalDownstreams, other.externalDownstreams) && java.util.Objects.equals(this.self, other.self) @@ -1002,6 +1165,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.serial, other.serial) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.isProtected, other.isProtected) + && java.util.Objects.equals(this.dnssecConfig, other.dnssecConfig) && java.util.Objects.equals(this.nameservers, other.nameservers) && java.util.Objects.equals(this.zoneTransferServers, other.zoneTransferServers) && super.equals(other); @@ -1020,6 +1184,7 @@ public int hashCode() { result = (result * PRIME) + (this.scope == null ? 43 : this.scope.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.dnssecState == null ? 43 : this.dnssecState.hashCode()); result = (result * PRIME) + (this.externalMasters == null ? 43 : this.externalMasters.hashCode()); @@ -1037,6 +1202,7 @@ public int hashCode() { (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.isProtected == null ? 43 : this.isProtected.hashCode()); + result = (result * PRIME) + (this.dnssecConfig == null ? 43 : this.dnssecConfig.hashCode()); result = (result * PRIME) + (this.nameservers == null ? 43 : this.nameservers.hashCode()); result = (result * PRIME) diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/model/ZoneDnssecState.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/ZoneDnssecState.java new file mode 100644 index 00000000000..447a13e1f8e --- /dev/null +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/ZoneDnssecState.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dns.model; + +/** + * The state of DNSSEC on the zone. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180115") +public enum ZoneDnssecState { + Enabled("ENABLED"), + Disabled("DISABLED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ZoneDnssecState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ZoneDnssecState v : ZoneDnssecState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ZoneDnssecState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ZoneDnssecState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ZoneDnssecState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/model/ZoneSummary.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/ZoneSummary.java index 20ce7b4d487..481e302751a 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/model/ZoneSummary.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/ZoneSummary.java @@ -30,13 +30,15 @@ public final class ZoneSummary extends com.oracle.bmc.http.internal.ExplicitlySe "scope", "freeformTags", "definedTags", + "dnssecState", "self", "id", "timeCreated", "version", "serial", "lifecycleState", - "isProtected" + "isProtected", + "dnssecConfig" }) public ZoneSummary( String name, @@ -46,13 +48,15 @@ public ZoneSummary( Scope scope, java.util.Map freeformTags, java.util.Map> definedTags, + ZoneDnssecState dnssecState, String self, String id, java.util.Date timeCreated, String version, Long serial, LifecycleState lifecycleState, - Boolean isProtected) { + Boolean isProtected, + DnssecConfig dnssecConfig) { super(); this.name = name; this.zoneType = zoneType; @@ -61,6 +65,7 @@ public ZoneSummary( this.scope = scope; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.dnssecState = dnssecState; this.self = self; this.id = id; this.timeCreated = timeCreated; @@ -68,6 +73,7 @@ public ZoneSummary( this.serial = serial; this.lifecycleState = lifecycleState; this.isProtected = isProtected; + this.dnssecConfig = dnssecConfig; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -213,6 +219,72 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * The state of DNSSEC on the zone. + *

+ * For DNSSEC to function, every parent zone in the DNS tree up to the top-level domain (or an independent + * trust anchor) must also have DNSSEC correctly set up. + * After enabling DNSSEC, you must add a DS record to the zone's parent zone containing the + * {@code KskDnssecKeyVersion} data. You can find the DS data in the {@code dsData} attribute of the {@code KskDnssecKeyVersion}. + * Then, use the {@code PromoteZoneDnssecKeyVersion} operation to promote the {@code KskDnssecKeyVersion}. + *

+ * New {@code KskDnssecKeyVersion}s are generated annually, a week before the existing {@code KskDnssecKeyVersion}'s expiration. + * To rollover a {@code KskDnssecKeyVersion}, you must replace the parent zone's DS record containing the old + * {@code KskDnssecKeyVersion} data with the data from the new {@code KskDnssecKeyVersion}. + *

+ * To remove the old DS record without causing service disruption, wait until the old DS record's TTL has + * expired, and the new DS record has propagated. After the DS replacement has been completed, then the + * {@code PromoteZoneDnssecKeyVersion} operation must be called. + *

+ * Metrics are emitted in the {@code oci_dns} namespace daily for each {@code KskDnssecKeyVersion} indicating how many + * days are left until expiration. + * We recommend that you set up alarms and notifications for KskDnssecKeyVersion expiration so that the + * necessary parent zone updates can be made and the {@code PromoteZoneDnssecKeyVersion} operation can be called. + *

+ * Enabling DNSSEC results in additional records in DNS responses which increases their size and can + * cause higher response latency. + *

+ * For more information, see [DNSSEC](https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dnssecState") + private ZoneDnssecState dnssecState; + + /** + * The state of DNSSEC on the zone. + *

+ * For DNSSEC to function, every parent zone in the DNS tree up to the top-level domain (or an independent + * trust anchor) must also have DNSSEC correctly set up. + * After enabling DNSSEC, you must add a DS record to the zone's parent zone containing the + * {@code KskDnssecKeyVersion} data. You can find the DS data in the {@code dsData} attribute of the {@code KskDnssecKeyVersion}. + * Then, use the {@code PromoteZoneDnssecKeyVersion} operation to promote the {@code KskDnssecKeyVersion}. + *

+ * New {@code KskDnssecKeyVersion}s are generated annually, a week before the existing {@code KskDnssecKeyVersion}'s expiration. + * To rollover a {@code KskDnssecKeyVersion}, you must replace the parent zone's DS record containing the old + * {@code KskDnssecKeyVersion} data with the data from the new {@code KskDnssecKeyVersion}. + *

+ * To remove the old DS record without causing service disruption, wait until the old DS record's TTL has + * expired, and the new DS record has propagated. After the DS replacement has been completed, then the + * {@code PromoteZoneDnssecKeyVersion} operation must be called. + *

+ * Metrics are emitted in the {@code oci_dns} namespace daily for each {@code KskDnssecKeyVersion} indicating how many + * days are left until expiration. + * We recommend that you set up alarms and notifications for KskDnssecKeyVersion expiration so that the + * necessary parent zone updates can be made and the {@code PromoteZoneDnssecKeyVersion} operation can be called. + *

+ * Enabling DNSSEC results in additional records in DNS responses which increases their size and can + * cause higher response latency. + *

+ * For more information, see [DNSSEC](https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm). + * + * @param dnssecState the value to set + * @return this builder + **/ + public Builder dnssecState(ZoneDnssecState dnssecState) { + this.dnssecState = dnssecState; + this.__explicitlySet__.add("dnssecState"); + return this; + } /** * The canonical absolute URL of the resource. **/ @@ -344,6 +416,15 @@ public Builder isProtected(Boolean isProtected) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("dnssecConfig") + private DnssecConfig dnssecConfig; + + public Builder dnssecConfig(DnssecConfig dnssecConfig) { + this.dnssecConfig = dnssecConfig; + this.__explicitlySet__.add("dnssecConfig"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -357,13 +438,15 @@ public ZoneSummary build() { this.scope, this.freeformTags, this.definedTags, + this.dnssecState, this.self, this.id, this.timeCreated, this.version, this.serial, this.lifecycleState, - this.isProtected); + this.isProtected, + this.dnssecConfig); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -393,6 +476,9 @@ public Builder copy(ZoneSummary model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("dnssecState")) { + this.dnssecState(model.getDnssecState()); + } if (model.wasPropertyExplicitlySet("self")) { this.self(model.getSelf()); } @@ -414,6 +500,9 @@ public Builder copy(ZoneSummary model) { if (model.wasPropertyExplicitlySet("isProtected")) { this.isProtected(model.getIsProtected()); } + if (model.wasPropertyExplicitlySet("dnssecConfig")) { + this.dnssecConfig(model.getDnssecConfig()); + } return this; } } @@ -604,6 +693,70 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * The state of DNSSEC on the zone. + *

+ * For DNSSEC to function, every parent zone in the DNS tree up to the top-level domain (or an independent + * trust anchor) must also have DNSSEC correctly set up. + * After enabling DNSSEC, you must add a DS record to the zone's parent zone containing the + * {@code KskDnssecKeyVersion} data. You can find the DS data in the {@code dsData} attribute of the {@code KskDnssecKeyVersion}. + * Then, use the {@code PromoteZoneDnssecKeyVersion} operation to promote the {@code KskDnssecKeyVersion}. + *

+ * New {@code KskDnssecKeyVersion}s are generated annually, a week before the existing {@code KskDnssecKeyVersion}'s expiration. + * To rollover a {@code KskDnssecKeyVersion}, you must replace the parent zone's DS record containing the old + * {@code KskDnssecKeyVersion} data with the data from the new {@code KskDnssecKeyVersion}. + *

+ * To remove the old DS record without causing service disruption, wait until the old DS record's TTL has + * expired, and the new DS record has propagated. After the DS replacement has been completed, then the + * {@code PromoteZoneDnssecKeyVersion} operation must be called. + *

+ * Metrics are emitted in the {@code oci_dns} namespace daily for each {@code KskDnssecKeyVersion} indicating how many + * days are left until expiration. + * We recommend that you set up alarms and notifications for KskDnssecKeyVersion expiration so that the + * necessary parent zone updates can be made and the {@code PromoteZoneDnssecKeyVersion} operation can be called. + *

+ * Enabling DNSSEC results in additional records in DNS responses which increases their size and can + * cause higher response latency. + *

+ * For more information, see [DNSSEC](https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dnssecState") + private final ZoneDnssecState dnssecState; + + /** + * The state of DNSSEC on the zone. + *

+ * For DNSSEC to function, every parent zone in the DNS tree up to the top-level domain (or an independent + * trust anchor) must also have DNSSEC correctly set up. + * After enabling DNSSEC, you must add a DS record to the zone's parent zone containing the + * {@code KskDnssecKeyVersion} data. You can find the DS data in the {@code dsData} attribute of the {@code KskDnssecKeyVersion}. + * Then, use the {@code PromoteZoneDnssecKeyVersion} operation to promote the {@code KskDnssecKeyVersion}. + *

+ * New {@code KskDnssecKeyVersion}s are generated annually, a week before the existing {@code KskDnssecKeyVersion}'s expiration. + * To rollover a {@code KskDnssecKeyVersion}, you must replace the parent zone's DS record containing the old + * {@code KskDnssecKeyVersion} data with the data from the new {@code KskDnssecKeyVersion}. + *

+ * To remove the old DS record without causing service disruption, wait until the old DS record's TTL has + * expired, and the new DS record has propagated. After the DS replacement has been completed, then the + * {@code PromoteZoneDnssecKeyVersion} operation must be called. + *

+ * Metrics are emitted in the {@code oci_dns} namespace daily for each {@code KskDnssecKeyVersion} indicating how many + * days are left until expiration. + * We recommend that you set up alarms and notifications for KskDnssecKeyVersion expiration so that the + * necessary parent zone updates can be made and the {@code PromoteZoneDnssecKeyVersion} operation can be called. + *

+ * Enabling DNSSEC results in additional records in DNS responses which increases their size and can + * cause higher response latency. + *

+ * For more information, see [DNSSEC](https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm). + * + * @return the value + **/ + public ZoneDnssecState getDnssecState() { + return dnssecState; + } + /** * The canonical absolute URL of the resource. **/ @@ -772,6 +925,13 @@ public Boolean getIsProtected() { return isProtected; } + @com.fasterxml.jackson.annotation.JsonProperty("dnssecConfig") + private final DnssecConfig dnssecConfig; + + public DnssecConfig getDnssecConfig() { + return dnssecConfig; + } + @Override public String toString() { return this.toString(true); @@ -793,6 +953,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", scope=").append(String.valueOf(this.scope)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", dnssecState=").append(String.valueOf(this.dnssecState)); sb.append(", self=").append(String.valueOf(this.self)); sb.append(", id=").append(String.valueOf(this.id)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); @@ -800,6 +961,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", serial=").append(String.valueOf(this.serial)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", isProtected=").append(String.valueOf(this.isProtected)); + sb.append(", dnssecConfig=").append(String.valueOf(this.dnssecConfig)); sb.append(")"); return sb.toString(); } @@ -821,6 +983,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.scope, other.scope) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.dnssecState, other.dnssecState) && java.util.Objects.equals(this.self, other.self) && java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.timeCreated, other.timeCreated) @@ -828,6 +991,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.serial, other.serial) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.isProtected, other.isProtected) + && java.util.Objects.equals(this.dnssecConfig, other.dnssecConfig) && super.equals(other); } @@ -844,6 +1008,7 @@ public int hashCode() { result = (result * PRIME) + (this.scope == null ? 43 : this.scope.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.dnssecState == null ? 43 : this.dnssecState.hashCode()); result = (result * PRIME) + (this.self == null ? 43 : this.self.hashCode()); result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); @@ -853,6 +1018,7 @@ public int hashCode() { (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.isProtected == null ? 43 : this.isProtected.hashCode()); + result = (result * PRIME) + (this.dnssecConfig == null ? 43 : this.dnssecConfig.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/model/ZskDnssecKeyVersion.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/ZskDnssecKeyVersion.java new file mode 100644 index 00000000000..4c8a836f5b2 --- /dev/null +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/model/ZskDnssecKeyVersion.java @@ -0,0 +1,808 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dns.model; + +/** + * A zone signing key (ZSK) version. The version information contains timing and configuration data for the ZSK that is used to + * apply DNSSEC on the zone. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180115") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ZskDnssecKeyVersion.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ZskDnssecKeyVersion extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "uuid", + "algorithm", + "lengthInBytes", + "timeCreated", + "timePublished", + "timeActivated", + "timeInactivated", + "timeUnpublished", + "timeExpired", + "timePromoted", + "predecessorDnssecKeyVersionUuid", + "successorDnssecKeyVersionUuid", + "keyTag" + }) + public ZskDnssecKeyVersion( + String uuid, + DnssecSigningAlgorithm algorithm, + Integer lengthInBytes, + java.util.Date timeCreated, + java.util.Date timePublished, + java.util.Date timeActivated, + java.util.Date timeInactivated, + java.util.Date timeUnpublished, + java.util.Date timeExpired, + java.util.Date timePromoted, + String predecessorDnssecKeyVersionUuid, + String successorDnssecKeyVersionUuid, + Integer keyTag) { + super(); + this.uuid = uuid; + this.algorithm = algorithm; + this.lengthInBytes = lengthInBytes; + this.timeCreated = timeCreated; + this.timePublished = timePublished; + this.timeActivated = timeActivated; + this.timeInactivated = timeInactivated; + this.timeUnpublished = timeUnpublished; + this.timeExpired = timeExpired; + this.timePromoted = timePromoted; + this.predecessorDnssecKeyVersionUuid = predecessorDnssecKeyVersionUuid; + this.successorDnssecKeyVersionUuid = successorDnssecKeyVersionUuid; + this.keyTag = keyTag; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The UUID of the {@code DnssecKeyVersion}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("uuid") + private String uuid; + + /** + * The UUID of the {@code DnssecKeyVersion}. + * + * @param uuid the value to set + * @return this builder + **/ + public Builder uuid(String uuid) { + this.uuid = uuid; + this.__explicitlySet__.add("uuid"); + return this; + } + /** + * The signing algorithm used for the key. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("algorithm") + private DnssecSigningAlgorithm algorithm; + + /** + * The signing algorithm used for the key. + * + * @param algorithm the value to set + * @return this builder + **/ + public Builder algorithm(DnssecSigningAlgorithm algorithm) { + this.algorithm = algorithm; + this.__explicitlySet__.add("algorithm"); + return this; + } + /** + * The length of the corresponding private key in bytes, expressed as an integer. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lengthInBytes") + private Integer lengthInBytes; + + /** + * The length of the corresponding private key in bytes, expressed as an integer. + * + * @param lengthInBytes the value to set + * @return this builder + **/ + public Builder lengthInBytes(Integer lengthInBytes) { + this.lengthInBytes = lengthInBytes; + this.__explicitlySet__.add("lengthInBytes"); + return this; + } + /** + * The date and time the key version was created, expressed in RFC 3339 timestamp format. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the key version was created, expressed in RFC 3339 timestamp format. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the key version was, or will be, published, expressed in RFC 3339 timestamp format. This is + * when the zone contents will include a DNSKEY record corresponding to the key material. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timePublished") + private java.util.Date timePublished; + + /** + * The date and time the key version was, or will be, published, expressed in RFC 3339 timestamp format. This is + * when the zone contents will include a DNSKEY record corresponding to the key material. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @param timePublished the value to set + * @return this builder + **/ + public Builder timePublished(java.util.Date timePublished) { + this.timePublished = timePublished; + this.__explicitlySet__.add("timePublished"); + return this; + } + /** + * The date and time the key version went, or will go, active, expressed in RFC 3339 timestamp format. This is + * when the key material will be used to generate RRSIGs. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeActivated") + private java.util.Date timeActivated; + + /** + * The date and time the key version went, or will go, active, expressed in RFC 3339 timestamp format. This is + * when the key material will be used to generate RRSIGs. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @param timeActivated the value to set + * @return this builder + **/ + public Builder timeActivated(java.util.Date timeActivated) { + this.timeActivated = timeActivated; + this.__explicitlySet__.add("timeActivated"); + return this; + } + /** + * The date and time the key version went, or will go, inactive, expressed in RFC 3339 timestamp format. This + * is when the key material will no longer be used to generate RRSIGs. For a key signing key (KSK) {@code DnssecKeyVersion}, this is + * populated after {@code PromoteZoneDnssecKeyVersion} has been called on its successor {@code DnssecKeyVersion}. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeInactivated") + private java.util.Date timeInactivated; + + /** + * The date and time the key version went, or will go, inactive, expressed in RFC 3339 timestamp format. This + * is when the key material will no longer be used to generate RRSIGs. For a key signing key (KSK) {@code DnssecKeyVersion}, this is + * populated after {@code PromoteZoneDnssecKeyVersion} has been called on its successor {@code DnssecKeyVersion}. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @param timeInactivated the value to set + * @return this builder + **/ + public Builder timeInactivated(java.util.Date timeInactivated) { + this.timeInactivated = timeInactivated; + this.__explicitlySet__.add("timeInactivated"); + return this; + } + /** + * The date and time the key version was, or will be, unpublished, expressed in RFC 3339 timestamp format. This + * is when the corresponding DNSKEY will be removed from zone contents. For a key signing key (KSK) {@code DnssecKeyVersion}, this is + * populated after {@code PromoteZoneDnssecKeyVersion} has been called on its successor {@code DnssecKeyVersion}. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUnpublished") + private java.util.Date timeUnpublished; + + /** + * The date and time the key version was, or will be, unpublished, expressed in RFC 3339 timestamp format. This + * is when the corresponding DNSKEY will be removed from zone contents. For a key signing key (KSK) {@code DnssecKeyVersion}, this is + * populated after {@code PromoteZoneDnssecKeyVersion} has been called on its successor {@code DnssecKeyVersion}. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @param timeUnpublished the value to set + * @return this builder + **/ + public Builder timeUnpublished(java.util.Date timeUnpublished) { + this.timeUnpublished = timeUnpublished; + this.__explicitlySet__.add("timeUnpublished"); + return this; + } + /** + * The date and time at which the recommended key version publication/activation lifetime ends, expressed in RFC + * 3339 timestamp format. This is when the corresponding DNSKEY should no longer exist in zone contents and no + * longer be used to generate RRSIGs. For a key sigining key (KSK), if {@code PromoteZoneDnssecKeyVersion} has not been called on this + * {@code DnssecKeyVersion}'s successor then it will remain active for arbitrarily long past its recommended lifetime. + * This prevents service disruption at the potential increased risk of key compromise. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeExpired") + private java.util.Date timeExpired; + + /** + * The date and time at which the recommended key version publication/activation lifetime ends, expressed in RFC + * 3339 timestamp format. This is when the corresponding DNSKEY should no longer exist in zone contents and no + * longer be used to generate RRSIGs. For a key sigining key (KSK), if {@code PromoteZoneDnssecKeyVersion} has not been called on this + * {@code DnssecKeyVersion}'s successor then it will remain active for arbitrarily long past its recommended lifetime. + * This prevents service disruption at the potential increased risk of key compromise. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @param timeExpired the value to set + * @return this builder + **/ + public Builder timeExpired(java.util.Date timeExpired) { + this.timeExpired = timeExpired; + this.__explicitlySet__.add("timeExpired"); + return this; + } + /** + * The date and time the key version was promoted expressed in RFC 3339 timestamp format. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timePromoted") + private java.util.Date timePromoted; + + /** + * The date and time the key version was promoted expressed in RFC 3339 timestamp format. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @param timePromoted the value to set + * @return this builder + **/ + public Builder timePromoted(java.util.Date timePromoted) { + this.timePromoted = timePromoted; + this.__explicitlySet__.add("timePromoted"); + return this; + } + /** + * When populated, this is the UUID of the {@code DnssecKeyVersion} that this {@code DnssecKeyVersion} will replace or has + * replaced. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("predecessorDnssecKeyVersionUuid") + private String predecessorDnssecKeyVersionUuid; + + /** + * When populated, this is the UUID of the {@code DnssecKeyVersion} that this {@code DnssecKeyVersion} will replace or has + * replaced. + * + * @param predecessorDnssecKeyVersionUuid the value to set + * @return this builder + **/ + public Builder predecessorDnssecKeyVersionUuid(String predecessorDnssecKeyVersionUuid) { + this.predecessorDnssecKeyVersionUuid = predecessorDnssecKeyVersionUuid; + this.__explicitlySet__.add("predecessorDnssecKeyVersionUuid"); + return this; + } + /** + * When populated, this is the UUID of the {@code DnssecKeyVersion} that will replace, or has replaced, this + * {@code DnssecKeyVersion}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("successorDnssecKeyVersionUuid") + private String successorDnssecKeyVersionUuid; + + /** + * When populated, this is the UUID of the {@code DnssecKeyVersion} that will replace, or has replaced, this + * {@code DnssecKeyVersion}. + * + * @param successorDnssecKeyVersionUuid the value to set + * @return this builder + **/ + public Builder successorDnssecKeyVersionUuid(String successorDnssecKeyVersionUuid) { + this.successorDnssecKeyVersionUuid = successorDnssecKeyVersionUuid; + this.__explicitlySet__.add("successorDnssecKeyVersionUuid"); + return this; + } + /** + * The key tag associated with the {@code DnssecKeyVersion}. This key tag will be present in the RRSIG and DS records + * associated with the key material for this {@code DnssecKeyVersion}. For more information about key tags, see + * [RFC 4034](https://tools.ietf.org/html/rfc4034). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyTag") + private Integer keyTag; + + /** + * The key tag associated with the {@code DnssecKeyVersion}. This key tag will be present in the RRSIG and DS records + * associated with the key material for this {@code DnssecKeyVersion}. For more information about key tags, see + * [RFC 4034](https://tools.ietf.org/html/rfc4034). + * + * @param keyTag the value to set + * @return this builder + **/ + public Builder keyTag(Integer keyTag) { + this.keyTag = keyTag; + this.__explicitlySet__.add("keyTag"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ZskDnssecKeyVersion build() { + ZskDnssecKeyVersion model = + new ZskDnssecKeyVersion( + this.uuid, + this.algorithm, + this.lengthInBytes, + this.timeCreated, + this.timePublished, + this.timeActivated, + this.timeInactivated, + this.timeUnpublished, + this.timeExpired, + this.timePromoted, + this.predecessorDnssecKeyVersionUuid, + this.successorDnssecKeyVersionUuid, + this.keyTag); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ZskDnssecKeyVersion model) { + if (model.wasPropertyExplicitlySet("uuid")) { + this.uuid(model.getUuid()); + } + if (model.wasPropertyExplicitlySet("algorithm")) { + this.algorithm(model.getAlgorithm()); + } + if (model.wasPropertyExplicitlySet("lengthInBytes")) { + this.lengthInBytes(model.getLengthInBytes()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timePublished")) { + this.timePublished(model.getTimePublished()); + } + if (model.wasPropertyExplicitlySet("timeActivated")) { + this.timeActivated(model.getTimeActivated()); + } + if (model.wasPropertyExplicitlySet("timeInactivated")) { + this.timeInactivated(model.getTimeInactivated()); + } + if (model.wasPropertyExplicitlySet("timeUnpublished")) { + this.timeUnpublished(model.getTimeUnpublished()); + } + if (model.wasPropertyExplicitlySet("timeExpired")) { + this.timeExpired(model.getTimeExpired()); + } + if (model.wasPropertyExplicitlySet("timePromoted")) { + this.timePromoted(model.getTimePromoted()); + } + if (model.wasPropertyExplicitlySet("predecessorDnssecKeyVersionUuid")) { + this.predecessorDnssecKeyVersionUuid(model.getPredecessorDnssecKeyVersionUuid()); + } + if (model.wasPropertyExplicitlySet("successorDnssecKeyVersionUuid")) { + this.successorDnssecKeyVersionUuid(model.getSuccessorDnssecKeyVersionUuid()); + } + if (model.wasPropertyExplicitlySet("keyTag")) { + this.keyTag(model.getKeyTag()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The UUID of the {@code DnssecKeyVersion}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("uuid") + private final String uuid; + + /** + * The UUID of the {@code DnssecKeyVersion}. + * + * @return the value + **/ + public String getUuid() { + return uuid; + } + + /** + * The signing algorithm used for the key. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("algorithm") + private final DnssecSigningAlgorithm algorithm; + + /** + * The signing algorithm used for the key. + * + * @return the value + **/ + public DnssecSigningAlgorithm getAlgorithm() { + return algorithm; + } + + /** + * The length of the corresponding private key in bytes, expressed as an integer. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lengthInBytes") + private final Integer lengthInBytes; + + /** + * The length of the corresponding private key in bytes, expressed as an integer. + * + * @return the value + **/ + public Integer getLengthInBytes() { + return lengthInBytes; + } + + /** + * The date and time the key version was created, expressed in RFC 3339 timestamp format. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the key version was created, expressed in RFC 3339 timestamp format. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the key version was, or will be, published, expressed in RFC 3339 timestamp format. This is + * when the zone contents will include a DNSKEY record corresponding to the key material. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timePublished") + private final java.util.Date timePublished; + + /** + * The date and time the key version was, or will be, published, expressed in RFC 3339 timestamp format. This is + * when the zone contents will include a DNSKEY record corresponding to the key material. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @return the value + **/ + public java.util.Date getTimePublished() { + return timePublished; + } + + /** + * The date and time the key version went, or will go, active, expressed in RFC 3339 timestamp format. This is + * when the key material will be used to generate RRSIGs. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeActivated") + private final java.util.Date timeActivated; + + /** + * The date and time the key version went, or will go, active, expressed in RFC 3339 timestamp format. This is + * when the key material will be used to generate RRSIGs. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @return the value + **/ + public java.util.Date getTimeActivated() { + return timeActivated; + } + + /** + * The date and time the key version went, or will go, inactive, expressed in RFC 3339 timestamp format. This + * is when the key material will no longer be used to generate RRSIGs. For a key signing key (KSK) {@code DnssecKeyVersion}, this is + * populated after {@code PromoteZoneDnssecKeyVersion} has been called on its successor {@code DnssecKeyVersion}. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeInactivated") + private final java.util.Date timeInactivated; + + /** + * The date and time the key version went, or will go, inactive, expressed in RFC 3339 timestamp format. This + * is when the key material will no longer be used to generate RRSIGs. For a key signing key (KSK) {@code DnssecKeyVersion}, this is + * populated after {@code PromoteZoneDnssecKeyVersion} has been called on its successor {@code DnssecKeyVersion}. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @return the value + **/ + public java.util.Date getTimeInactivated() { + return timeInactivated; + } + + /** + * The date and time the key version was, or will be, unpublished, expressed in RFC 3339 timestamp format. This + * is when the corresponding DNSKEY will be removed from zone contents. For a key signing key (KSK) {@code DnssecKeyVersion}, this is + * populated after {@code PromoteZoneDnssecKeyVersion} has been called on its successor {@code DnssecKeyVersion}. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUnpublished") + private final java.util.Date timeUnpublished; + + /** + * The date and time the key version was, or will be, unpublished, expressed in RFC 3339 timestamp format. This + * is when the corresponding DNSKEY will be removed from zone contents. For a key signing key (KSK) {@code DnssecKeyVersion}, this is + * populated after {@code PromoteZoneDnssecKeyVersion} has been called on its successor {@code DnssecKeyVersion}. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @return the value + **/ + public java.util.Date getTimeUnpublished() { + return timeUnpublished; + } + + /** + * The date and time at which the recommended key version publication/activation lifetime ends, expressed in RFC + * 3339 timestamp format. This is when the corresponding DNSKEY should no longer exist in zone contents and no + * longer be used to generate RRSIGs. For a key sigining key (KSK), if {@code PromoteZoneDnssecKeyVersion} has not been called on this + * {@code DnssecKeyVersion}'s successor then it will remain active for arbitrarily long past its recommended lifetime. + * This prevents service disruption at the potential increased risk of key compromise. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeExpired") + private final java.util.Date timeExpired; + + /** + * The date and time at which the recommended key version publication/activation lifetime ends, expressed in RFC + * 3339 timestamp format. This is when the corresponding DNSKEY should no longer exist in zone contents and no + * longer be used to generate RRSIGs. For a key sigining key (KSK), if {@code PromoteZoneDnssecKeyVersion} has not been called on this + * {@code DnssecKeyVersion}'s successor then it will remain active for arbitrarily long past its recommended lifetime. + * This prevents service disruption at the potential increased risk of key compromise. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @return the value + **/ + public java.util.Date getTimeExpired() { + return timeExpired; + } + + /** + * The date and time the key version was promoted expressed in RFC 3339 timestamp format. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timePromoted") + private final java.util.Date timePromoted; + + /** + * The date and time the key version was promoted expressed in RFC 3339 timestamp format. + *

+ **Example:** {@code 2016-07-22T17:23:59:00Z} + * + * @return the value + **/ + public java.util.Date getTimePromoted() { + return timePromoted; + } + + /** + * When populated, this is the UUID of the {@code DnssecKeyVersion} that this {@code DnssecKeyVersion} will replace or has + * replaced. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("predecessorDnssecKeyVersionUuid") + private final String predecessorDnssecKeyVersionUuid; + + /** + * When populated, this is the UUID of the {@code DnssecKeyVersion} that this {@code DnssecKeyVersion} will replace or has + * replaced. + * + * @return the value + **/ + public String getPredecessorDnssecKeyVersionUuid() { + return predecessorDnssecKeyVersionUuid; + } + + /** + * When populated, this is the UUID of the {@code DnssecKeyVersion} that will replace, or has replaced, this + * {@code DnssecKeyVersion}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("successorDnssecKeyVersionUuid") + private final String successorDnssecKeyVersionUuid; + + /** + * When populated, this is the UUID of the {@code DnssecKeyVersion} that will replace, or has replaced, this + * {@code DnssecKeyVersion}. + * + * @return the value + **/ + public String getSuccessorDnssecKeyVersionUuid() { + return successorDnssecKeyVersionUuid; + } + + /** + * The key tag associated with the {@code DnssecKeyVersion}. This key tag will be present in the RRSIG and DS records + * associated with the key material for this {@code DnssecKeyVersion}. For more information about key tags, see + * [RFC 4034](https://tools.ietf.org/html/rfc4034). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyTag") + private final Integer keyTag; + + /** + * The key tag associated with the {@code DnssecKeyVersion}. This key tag will be present in the RRSIG and DS records + * associated with the key material for this {@code DnssecKeyVersion}. For more information about key tags, see + * [RFC 4034](https://tools.ietf.org/html/rfc4034). + * + * @return the value + **/ + public Integer getKeyTag() { + return keyTag; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ZskDnssecKeyVersion("); + sb.append("super=").append(super.toString()); + sb.append("uuid=").append(String.valueOf(this.uuid)); + sb.append(", algorithm=").append(String.valueOf(this.algorithm)); + sb.append(", lengthInBytes=").append(String.valueOf(this.lengthInBytes)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timePublished=").append(String.valueOf(this.timePublished)); + sb.append(", timeActivated=").append(String.valueOf(this.timeActivated)); + sb.append(", timeInactivated=").append(String.valueOf(this.timeInactivated)); + sb.append(", timeUnpublished=").append(String.valueOf(this.timeUnpublished)); + sb.append(", timeExpired=").append(String.valueOf(this.timeExpired)); + sb.append(", timePromoted=").append(String.valueOf(this.timePromoted)); + sb.append(", predecessorDnssecKeyVersionUuid=") + .append(String.valueOf(this.predecessorDnssecKeyVersionUuid)); + sb.append(", successorDnssecKeyVersionUuid=") + .append(String.valueOf(this.successorDnssecKeyVersionUuid)); + sb.append(", keyTag=").append(String.valueOf(this.keyTag)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ZskDnssecKeyVersion)) { + return false; + } + + ZskDnssecKeyVersion other = (ZskDnssecKeyVersion) o; + return java.util.Objects.equals(this.uuid, other.uuid) + && java.util.Objects.equals(this.algorithm, other.algorithm) + && java.util.Objects.equals(this.lengthInBytes, other.lengthInBytes) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timePublished, other.timePublished) + && java.util.Objects.equals(this.timeActivated, other.timeActivated) + && java.util.Objects.equals(this.timeInactivated, other.timeInactivated) + && java.util.Objects.equals(this.timeUnpublished, other.timeUnpublished) + && java.util.Objects.equals(this.timeExpired, other.timeExpired) + && java.util.Objects.equals(this.timePromoted, other.timePromoted) + && java.util.Objects.equals( + this.predecessorDnssecKeyVersionUuid, other.predecessorDnssecKeyVersionUuid) + && java.util.Objects.equals( + this.successorDnssecKeyVersionUuid, other.successorDnssecKeyVersionUuid) + && java.util.Objects.equals(this.keyTag, other.keyTag) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.uuid == null ? 43 : this.uuid.hashCode()); + result = (result * PRIME) + (this.algorithm == null ? 43 : this.algorithm.hashCode()); + result = + (result * PRIME) + + (this.lengthInBytes == null ? 43 : this.lengthInBytes.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = + (result * PRIME) + + (this.timePublished == null ? 43 : this.timePublished.hashCode()); + result = + (result * PRIME) + + (this.timeActivated == null ? 43 : this.timeActivated.hashCode()); + result = + (result * PRIME) + + (this.timeInactivated == null ? 43 : this.timeInactivated.hashCode()); + result = + (result * PRIME) + + (this.timeUnpublished == null ? 43 : this.timeUnpublished.hashCode()); + result = (result * PRIME) + (this.timeExpired == null ? 43 : this.timeExpired.hashCode()); + result = (result * PRIME) + (this.timePromoted == null ? 43 : this.timePromoted.hashCode()); + result = + (result * PRIME) + + (this.predecessorDnssecKeyVersionUuid == null + ? 43 + : this.predecessorDnssecKeyVersionUuid.hashCode()); + result = + (result * PRIME) + + (this.successorDnssecKeyVersionUuid == null + ? 43 + : this.successorDnssecKeyVersionUuid.hashCode()); + result = (result * PRIME) + (this.keyTag == null ? 43 : this.keyTag.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/requests/ListZonesRequest.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/requests/ListZonesRequest.java index f22f8562eff..c019cc126ea 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/requests/ListZonesRequest.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/requests/ListZonesRequest.java @@ -327,6 +327,19 @@ public String getViewId() { public String getTsigKeyId() { return tsigKeyId; } + /** + * Search for zones that have the given {@code DnssecState}. + * + */ + private com.oracle.bmc.dns.model.ZoneDnssecState dnssecState; + + /** + * Search for zones that have the given {@code DnssecState}. + * + */ + public com.oracle.bmc.dns.model.ZoneDnssecState getDnssecState() { + return dnssecState; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -597,6 +610,23 @@ public Builder tsigKeyId(String tsigKeyId) { return this; } + /** + * Search for zones that have the given {@code DnssecState}. + * + */ + private com.oracle.bmc.dns.model.ZoneDnssecState dnssecState = null; + + /** + * Search for zones that have the given {@code DnssecState}. + * + * @param dnssecState the value to set + * @return this builder instance + */ + public Builder dnssecState(com.oracle.bmc.dns.model.ZoneDnssecState dnssecState) { + this.dnssecState = dnssecState; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -640,6 +670,7 @@ public Builder copy(ListZonesRequest o) { scope(o.getScope()); viewId(o.getViewId()); tsigKeyId(o.getTsigKeyId()); + dnssecState(o.getDnssecState()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -687,8 +718,9 @@ public ListZonesRequest buildWithoutInvocationCallback() { request.scope = scope; request.viewId = viewId; request.tsigKeyId = tsigKeyId; + request.dnssecState = dnssecState; return request; - // new ListZonesRequest(compartmentId, opcRequestId, limit, page, name, nameContains, zoneType, timeCreatedGreaterThanOrEqualTo, timeCreatedLessThan, lifecycleState, sortBy, sortOrder, scope, viewId, tsigKeyId); + // new ListZonesRequest(compartmentId, opcRequestId, limit, page, name, nameContains, zoneType, timeCreatedGreaterThanOrEqualTo, timeCreatedLessThan, lifecycleState, sortBy, sortOrder, scope, viewId, tsigKeyId, dnssecState); } } @@ -712,7 +744,8 @@ public Builder toBuilder() { .sortOrder(sortOrder) .scope(scope) .viewId(viewId) - .tsigKeyId(tsigKeyId); + .tsigKeyId(tsigKeyId) + .dnssecState(dnssecState); } /** @@ -744,6 +777,7 @@ public String toString() { sb.append(",scope=").append(String.valueOf(this.scope)); sb.append(",viewId=").append(String.valueOf(this.viewId)); sb.append(",tsigKeyId=").append(String.valueOf(this.tsigKeyId)); + sb.append(",dnssecState=").append(String.valueOf(this.dnssecState)); sb.append(")"); return sb.toString(); } @@ -774,7 +808,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.sortOrder, other.sortOrder) && java.util.Objects.equals(this.scope, other.scope) && java.util.Objects.equals(this.viewId, other.viewId) - && java.util.Objects.equals(this.tsigKeyId, other.tsigKeyId); + && java.util.Objects.equals(this.tsigKeyId, other.tsigKeyId) + && java.util.Objects.equals(this.dnssecState, other.dnssecState); } @Override @@ -808,6 +843,7 @@ public int hashCode() { result = (result * PRIME) + (this.scope == null ? 43 : this.scope.hashCode()); result = (result * PRIME) + (this.viewId == null ? 43 : this.viewId.hashCode()); result = (result * PRIME) + (this.tsigKeyId == null ? 43 : this.tsigKeyId.hashCode()); + result = (result * PRIME) + (this.dnssecState == null ? 43 : this.dnssecState.hashCode()); return result; } } diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/requests/PromoteZoneDnssecKeyVersionRequest.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/requests/PromoteZoneDnssecKeyVersionRequest.java new file mode 100644 index 00000000000..eb806d7f4bb --- /dev/null +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/requests/PromoteZoneDnssecKeyVersionRequest.java @@ -0,0 +1,475 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dns.requests; + +import com.oracle.bmc.dns.model.*; +/** + * Example: Click here to see how to use PromoteZoneDnssecKeyVersionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180115") +public class PromoteZoneDnssecKeyVersionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.dns.model.PromoteZoneDnssecKeyVersionDetails> { + + /** + * The OCID of the target zone. + */ + private String zoneId; + + /** + * The OCID of the target zone. + */ + public String getZoneId() { + return zoneId; + } + /** + * Details for promoting a {@code DnssecKeyVersion}. + */ + private com.oracle.bmc.dns.model.PromoteZoneDnssecKeyVersionDetails + promoteZoneDnssecKeyVersionDetails; + + /** + * Details for promoting a {@code DnssecKeyVersion}. + */ + public com.oracle.bmc.dns.model.PromoteZoneDnssecKeyVersionDetails + getPromoteZoneDnssecKeyVersionDetails() { + return promoteZoneDnssecKeyVersionDetails; + } + /** + * The {@code If-Match} header field makes the request method conditional on the + * existence of at least one current representation of the target resource, + * when the field-value is {@code *}, or having a current representation of the + * target resource that has an entity-tag matching a member of the list of + * entity-tags provided in the field-value. + * + */ + private String ifMatch; + + /** + * The {@code If-Match} header field makes the request method conditional on the + * existence of at least one current representation of the target resource, + * when the field-value is {@code *}, or having a current representation of the + * target resource that has an entity-tag matching a member of the list of + * entity-tags provided in the field-value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The {@code If-Unmodified-Since} header field makes the request method + * conditional on the selected representation's last modification date being + * earlier than or equal to the date provided in the field-value. This + * field accomplishes the same purpose as If-Match for cases where the user + * agent does not have an entity-tag for the representation. + * + */ + private String ifUnmodifiedSince; + + /** + * The {@code If-Unmodified-Since} header field makes the request method + * conditional on the selected representation's last modification date being + * earlier than or equal to the date provided in the field-value. This + * field accomplishes the same purpose as If-Match for cases where the user + * agent does not have an entity-tag for the representation. + * + */ + public String getIfUnmodifiedSince() { + return ifUnmodifiedSince; + } + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations (for example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations (for example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need + * to contact Oracle about a particular request, please provide + * the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need + * to contact Oracle about a particular request, please provide + * the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * Specifies to operate only on resources that have a matching DNS scope. + * + */ + private com.oracle.bmc.dns.model.Scope scope; + + /** + * Specifies to operate only on resources that have a matching DNS scope. + * + */ + public com.oracle.bmc.dns.model.Scope getScope() { + return scope; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.dns.model.PromoteZoneDnssecKeyVersionDetails getBody$() { + return promoteZoneDnssecKeyVersionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + PromoteZoneDnssecKeyVersionRequest, + com.oracle.bmc.dns.model.PromoteZoneDnssecKeyVersionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the target zone. + */ + private String zoneId = null; + + /** + * The OCID of the target zone. + * @param zoneId the value to set + * @return this builder instance + */ + public Builder zoneId(String zoneId) { + this.zoneId = zoneId; + return this; + } + + /** + * Details for promoting a {@code DnssecKeyVersion}. + */ + private com.oracle.bmc.dns.model.PromoteZoneDnssecKeyVersionDetails + promoteZoneDnssecKeyVersionDetails = null; + + /** + * Details for promoting a {@code DnssecKeyVersion}. + * @param promoteZoneDnssecKeyVersionDetails the value to set + * @return this builder instance + */ + public Builder promoteZoneDnssecKeyVersionDetails( + com.oracle.bmc.dns.model.PromoteZoneDnssecKeyVersionDetails + promoteZoneDnssecKeyVersionDetails) { + this.promoteZoneDnssecKeyVersionDetails = promoteZoneDnssecKeyVersionDetails; + return this; + } + + /** + * The {@code If-Match} header field makes the request method conditional on the + * existence of at least one current representation of the target resource, + * when the field-value is {@code *}, or having a current representation of the + * target resource that has an entity-tag matching a member of the list of + * entity-tags provided in the field-value. + * + */ + private String ifMatch = null; + + /** + * The {@code If-Match} header field makes the request method conditional on the + * existence of at least one current representation of the target resource, + * when the field-value is {@code *}, or having a current representation of the + * target resource that has an entity-tag matching a member of the list of + * entity-tags provided in the field-value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The {@code If-Unmodified-Since} header field makes the request method + * conditional on the selected representation's last modification date being + * earlier than or equal to the date provided in the field-value. This + * field accomplishes the same purpose as If-Match for cases where the user + * agent does not have an entity-tag for the representation. + * + */ + private String ifUnmodifiedSince = null; + + /** + * The {@code If-Unmodified-Since} header field makes the request method + * conditional on the selected representation's last modification date being + * earlier than or equal to the date provided in the field-value. This + * field accomplishes the same purpose as If-Match for cases where the user + * agent does not have an entity-tag for the representation. + * + * @param ifUnmodifiedSince the value to set + * @return this builder instance + */ + public Builder ifUnmodifiedSince(String ifUnmodifiedSince) { + this.ifUnmodifiedSince = ifUnmodifiedSince; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations (for example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations (for example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need + * to contact Oracle about a particular request, please provide + * the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need + * to contact Oracle about a particular request, please provide + * the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Specifies to operate only on resources that have a matching DNS scope. + * + */ + private com.oracle.bmc.dns.model.Scope scope = null; + + /** + * Specifies to operate only on resources that have a matching DNS scope. + * + * @param scope the value to set + * @return this builder instance + */ + public Builder scope(com.oracle.bmc.dns.model.Scope scope) { + this.scope = scope; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(PromoteZoneDnssecKeyVersionRequest o) { + zoneId(o.getZoneId()); + promoteZoneDnssecKeyVersionDetails(o.getPromoteZoneDnssecKeyVersionDetails()); + ifMatch(o.getIfMatch()); + ifUnmodifiedSince(o.getIfUnmodifiedSince()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + scope(o.getScope()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of PromoteZoneDnssecKeyVersionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of PromoteZoneDnssecKeyVersionRequest + */ + public PromoteZoneDnssecKeyVersionRequest build() { + PromoteZoneDnssecKeyVersionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.dns.model.PromoteZoneDnssecKeyVersionDetails body) { + promoteZoneDnssecKeyVersionDetails(body); + return this; + } + + /** + * Build the instance of PromoteZoneDnssecKeyVersionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of PromoteZoneDnssecKeyVersionRequest + */ + public PromoteZoneDnssecKeyVersionRequest buildWithoutInvocationCallback() { + PromoteZoneDnssecKeyVersionRequest request = new PromoteZoneDnssecKeyVersionRequest(); + request.zoneId = zoneId; + request.promoteZoneDnssecKeyVersionDetails = promoteZoneDnssecKeyVersionDetails; + request.ifMatch = ifMatch; + request.ifUnmodifiedSince = ifUnmodifiedSince; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.scope = scope; + return request; + // new PromoteZoneDnssecKeyVersionRequest(zoneId, promoteZoneDnssecKeyVersionDetails, ifMatch, ifUnmodifiedSince, opcRetryToken, opcRequestId, scope); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .zoneId(zoneId) + .promoteZoneDnssecKeyVersionDetails(promoteZoneDnssecKeyVersionDetails) + .ifMatch(ifMatch) + .ifUnmodifiedSince(ifUnmodifiedSince) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .scope(scope); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",zoneId=").append(String.valueOf(this.zoneId)); + sb.append(",promoteZoneDnssecKeyVersionDetails=") + .append(String.valueOf(this.promoteZoneDnssecKeyVersionDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",ifUnmodifiedSince=").append(String.valueOf(this.ifUnmodifiedSince)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",scope=").append(String.valueOf(this.scope)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PromoteZoneDnssecKeyVersionRequest)) { + return false; + } + + PromoteZoneDnssecKeyVersionRequest other = (PromoteZoneDnssecKeyVersionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.zoneId, other.zoneId) + && java.util.Objects.equals( + this.promoteZoneDnssecKeyVersionDetails, + other.promoteZoneDnssecKeyVersionDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.ifUnmodifiedSince, other.ifUnmodifiedSince) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.scope, other.scope); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.zoneId == null ? 43 : this.zoneId.hashCode()); + result = + (result * PRIME) + + (this.promoteZoneDnssecKeyVersionDetails == null + ? 43 + : this.promoteZoneDnssecKeyVersionDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.ifUnmodifiedSince == null ? 43 : this.ifUnmodifiedSince.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.scope == null ? 43 : this.scope.hashCode()); + return result; + } +} diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/requests/StageZoneDnssecKeyVersionRequest.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/requests/StageZoneDnssecKeyVersionRequest.java new file mode 100644 index 00000000000..de0d34201e9 --- /dev/null +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/requests/StageZoneDnssecKeyVersionRequest.java @@ -0,0 +1,475 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dns.requests; + +import com.oracle.bmc.dns.model.*; +/** + * Example: Click here to see how to use StageZoneDnssecKeyVersionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180115") +public class StageZoneDnssecKeyVersionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.dns.model.StageZoneDnssecKeyVersionDetails> { + + /** + * The OCID of the target zone. + */ + private String zoneId; + + /** + * The OCID of the target zone. + */ + public String getZoneId() { + return zoneId; + } + /** + * Details for staging a DnssecKeyVersion. + */ + private com.oracle.bmc.dns.model.StageZoneDnssecKeyVersionDetails + stageZoneDnssecKeyVersionDetails; + + /** + * Details for staging a DnssecKeyVersion. + */ + public com.oracle.bmc.dns.model.StageZoneDnssecKeyVersionDetails + getStageZoneDnssecKeyVersionDetails() { + return stageZoneDnssecKeyVersionDetails; + } + /** + * The {@code If-Match} header field makes the request method conditional on the + * existence of at least one current representation of the target resource, + * when the field-value is {@code *}, or having a current representation of the + * target resource that has an entity-tag matching a member of the list of + * entity-tags provided in the field-value. + * + */ + private String ifMatch; + + /** + * The {@code If-Match} header field makes the request method conditional on the + * existence of at least one current representation of the target resource, + * when the field-value is {@code *}, or having a current representation of the + * target resource that has an entity-tag matching a member of the list of + * entity-tags provided in the field-value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The {@code If-Unmodified-Since} header field makes the request method + * conditional on the selected representation's last modification date being + * earlier than or equal to the date provided in the field-value. This + * field accomplishes the same purpose as If-Match for cases where the user + * agent does not have an entity-tag for the representation. + * + */ + private String ifUnmodifiedSince; + + /** + * The {@code If-Unmodified-Since} header field makes the request method + * conditional on the selected representation's last modification date being + * earlier than or equal to the date provided in the field-value. This + * field accomplishes the same purpose as If-Match for cases where the user + * agent does not have an entity-tag for the representation. + * + */ + public String getIfUnmodifiedSince() { + return ifUnmodifiedSince; + } + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations (for example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request may be rejected). + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations (for example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request may be rejected). + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need + * to contact Oracle about a particular request, please provide + * the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need + * to contact Oracle about a particular request, please provide + * the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * Specifies to operate only on resources that have a matching DNS scope. + * + */ + private com.oracle.bmc.dns.model.Scope scope; + + /** + * Specifies to operate only on resources that have a matching DNS scope. + * + */ + public com.oracle.bmc.dns.model.Scope getScope() { + return scope; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.dns.model.StageZoneDnssecKeyVersionDetails getBody$() { + return stageZoneDnssecKeyVersionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + StageZoneDnssecKeyVersionRequest, + com.oracle.bmc.dns.model.StageZoneDnssecKeyVersionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the target zone. + */ + private String zoneId = null; + + /** + * The OCID of the target zone. + * @param zoneId the value to set + * @return this builder instance + */ + public Builder zoneId(String zoneId) { + this.zoneId = zoneId; + return this; + } + + /** + * Details for staging a DnssecKeyVersion. + */ + private com.oracle.bmc.dns.model.StageZoneDnssecKeyVersionDetails + stageZoneDnssecKeyVersionDetails = null; + + /** + * Details for staging a DnssecKeyVersion. + * @param stageZoneDnssecKeyVersionDetails the value to set + * @return this builder instance + */ + public Builder stageZoneDnssecKeyVersionDetails( + com.oracle.bmc.dns.model.StageZoneDnssecKeyVersionDetails + stageZoneDnssecKeyVersionDetails) { + this.stageZoneDnssecKeyVersionDetails = stageZoneDnssecKeyVersionDetails; + return this; + } + + /** + * The {@code If-Match} header field makes the request method conditional on the + * existence of at least one current representation of the target resource, + * when the field-value is {@code *}, or having a current representation of the + * target resource that has an entity-tag matching a member of the list of + * entity-tags provided in the field-value. + * + */ + private String ifMatch = null; + + /** + * The {@code If-Match} header field makes the request method conditional on the + * existence of at least one current representation of the target resource, + * when the field-value is {@code *}, or having a current representation of the + * target resource that has an entity-tag matching a member of the list of + * entity-tags provided in the field-value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The {@code If-Unmodified-Since} header field makes the request method + * conditional on the selected representation's last modification date being + * earlier than or equal to the date provided in the field-value. This + * field accomplishes the same purpose as If-Match for cases where the user + * agent does not have an entity-tag for the representation. + * + */ + private String ifUnmodifiedSince = null; + + /** + * The {@code If-Unmodified-Since} header field makes the request method + * conditional on the selected representation's last modification date being + * earlier than or equal to the date provided in the field-value. This + * field accomplishes the same purpose as If-Match for cases where the user + * agent does not have an entity-tag for the representation. + * + * @param ifUnmodifiedSince the value to set + * @return this builder instance + */ + public Builder ifUnmodifiedSince(String ifUnmodifiedSince) { + this.ifUnmodifiedSince = ifUnmodifiedSince; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations (for example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request may be rejected). + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations (for example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request may be rejected). + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need + * to contact Oracle about a particular request, please provide + * the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need + * to contact Oracle about a particular request, please provide + * the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Specifies to operate only on resources that have a matching DNS scope. + * + */ + private com.oracle.bmc.dns.model.Scope scope = null; + + /** + * Specifies to operate only on resources that have a matching DNS scope. + * + * @param scope the value to set + * @return this builder instance + */ + public Builder scope(com.oracle.bmc.dns.model.Scope scope) { + this.scope = scope; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(StageZoneDnssecKeyVersionRequest o) { + zoneId(o.getZoneId()); + stageZoneDnssecKeyVersionDetails(o.getStageZoneDnssecKeyVersionDetails()); + ifMatch(o.getIfMatch()); + ifUnmodifiedSince(o.getIfUnmodifiedSince()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + scope(o.getScope()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of StageZoneDnssecKeyVersionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of StageZoneDnssecKeyVersionRequest + */ + public StageZoneDnssecKeyVersionRequest build() { + StageZoneDnssecKeyVersionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.dns.model.StageZoneDnssecKeyVersionDetails body) { + stageZoneDnssecKeyVersionDetails(body); + return this; + } + + /** + * Build the instance of StageZoneDnssecKeyVersionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of StageZoneDnssecKeyVersionRequest + */ + public StageZoneDnssecKeyVersionRequest buildWithoutInvocationCallback() { + StageZoneDnssecKeyVersionRequest request = new StageZoneDnssecKeyVersionRequest(); + request.zoneId = zoneId; + request.stageZoneDnssecKeyVersionDetails = stageZoneDnssecKeyVersionDetails; + request.ifMatch = ifMatch; + request.ifUnmodifiedSince = ifUnmodifiedSince; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.scope = scope; + return request; + // new StageZoneDnssecKeyVersionRequest(zoneId, stageZoneDnssecKeyVersionDetails, ifMatch, ifUnmodifiedSince, opcRetryToken, opcRequestId, scope); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .zoneId(zoneId) + .stageZoneDnssecKeyVersionDetails(stageZoneDnssecKeyVersionDetails) + .ifMatch(ifMatch) + .ifUnmodifiedSince(ifUnmodifiedSince) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .scope(scope); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",zoneId=").append(String.valueOf(this.zoneId)); + sb.append(",stageZoneDnssecKeyVersionDetails=") + .append(String.valueOf(this.stageZoneDnssecKeyVersionDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",ifUnmodifiedSince=").append(String.valueOf(this.ifUnmodifiedSince)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",scope=").append(String.valueOf(this.scope)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof StageZoneDnssecKeyVersionRequest)) { + return false; + } + + StageZoneDnssecKeyVersionRequest other = (StageZoneDnssecKeyVersionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.zoneId, other.zoneId) + && java.util.Objects.equals( + this.stageZoneDnssecKeyVersionDetails, + other.stageZoneDnssecKeyVersionDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.ifUnmodifiedSince, other.ifUnmodifiedSince) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.scope, other.scope); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.zoneId == null ? 43 : this.zoneId.hashCode()); + result = + (result * PRIME) + + (this.stageZoneDnssecKeyVersionDetails == null + ? 43 + : this.stageZoneDnssecKeyVersionDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.ifUnmodifiedSince == null ? 43 : this.ifUnmodifiedSince.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.scope == null ? 43 : this.scope.hashCode()); + return result; + } +} diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/ChangeSteeringPolicyCompartmentResponse.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/ChangeSteeringPolicyCompartmentResponse.java index 946d8cce734..6a54ff0aff7 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/ChangeSteeringPolicyCompartmentResponse.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/ChangeSteeringPolicyCompartmentResponse.java @@ -25,13 +25,37 @@ public String getOpcRequestId() { return opcRequestId; } - @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) private ChangeSteeringPolicyCompartmentResponse( int __httpStatusCode__, javax.ws.rs.core.MultivaluedMap headers, - String opcRequestId) { + String opcRequestId, + String opcWorkRequestId) { super(__httpStatusCode__, headers); this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; } public static class Builder { @@ -68,6 +92,25 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + /** * Copy method to populate the builder with values from the given instance. * @return this builder instance @@ -76,6 +119,7 @@ public Builder copy(ChangeSteeringPolicyCompartmentResponse o) { __httpStatusCode__(o.get__httpStatusCode__()); headers(o.getHeaders()); opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); return this; } @@ -86,7 +130,7 @@ public Builder copy(ChangeSteeringPolicyCompartmentResponse o) { */ public ChangeSteeringPolicyCompartmentResponse build() { return new ChangeSteeringPolicyCompartmentResponse( - __httpStatusCode__, headers, opcRequestId); + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); } } @@ -104,6 +148,7 @@ public String toString() { sb.append("("); sb.append("super=").append(super.toString()); sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); sb.append(")"); return sb.toString(); } @@ -118,7 +163,9 @@ public boolean equals(Object o) { } ChangeSteeringPolicyCompartmentResponse other = (ChangeSteeringPolicyCompartmentResponse) o; - return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); } @Override @@ -126,6 +173,9 @@ public int hashCode() { final int PRIME = 59; int result = super.hashCode(); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); return result; } } diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/CreateSteeringPolicyAttachmentResponse.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/CreateSteeringPolicyAttachmentResponse.java index 53ad6d8c60b..47aba86eef1 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/CreateSteeringPolicyAttachmentResponse.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/CreateSteeringPolicyAttachmentResponse.java @@ -59,6 +59,23 @@ public String getOpcRequestId() { return opcRequestId; } + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + /** * The returned SteeringPolicyAttachment instance. */ @@ -78,6 +95,7 @@ public com.oracle.bmc.dns.model.SteeringPolicyAttachment getSteeringPolicyAttach "eTag", "location", "opcRequestId", + "opcWorkRequestId", "steeringPolicyAttachment" }) private CreateSteeringPolicyAttachmentResponse( @@ -86,11 +104,13 @@ private CreateSteeringPolicyAttachmentResponse( String eTag, String location, String opcRequestId, + String opcWorkRequestId, com.oracle.bmc.dns.model.SteeringPolicyAttachment steeringPolicyAttachment) { super(__httpStatusCode__, headers); this.eTag = eTag; this.location = location; this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; this.steeringPolicyAttachment = steeringPolicyAttachment; } @@ -166,6 +186,25 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + /** * The returned SteeringPolicyAttachment instance. */ @@ -192,6 +231,7 @@ public Builder copy(CreateSteeringPolicyAttachmentResponse o) { eTag(o.getETag()); location(o.getLocation()); opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); steeringPolicyAttachment(o.getSteeringPolicyAttachment()); return this; @@ -208,6 +248,7 @@ public CreateSteeringPolicyAttachmentResponse build() { eTag, location, opcRequestId, + opcWorkRequestId, steeringPolicyAttachment); } } @@ -228,6 +269,7 @@ public String toString() { sb.append(",eTag=").append(String.valueOf(eTag)); sb.append(",location=").append(String.valueOf(location)); sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); sb.append(",steeringPolicyAttachment=").append(String.valueOf(steeringPolicyAttachment)); sb.append(")"); return sb.toString(); @@ -247,6 +289,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.eTag, other.eTag) && java.util.Objects.equals(this.location, other.location) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) && java.util.Objects.equals( this.steeringPolicyAttachment, other.steeringPolicyAttachment); } @@ -258,6 +301,9 @@ public int hashCode() { result = (result * PRIME) + (this.eTag == null ? 43 : this.eTag.hashCode()); result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); result = (result * PRIME) + (this.steeringPolicyAttachment == null diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/CreateSteeringPolicyResponse.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/CreateSteeringPolicyResponse.java index 538d2226c00..a59e5c153b7 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/CreateSteeringPolicyResponse.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/CreateSteeringPolicyResponse.java @@ -59,6 +59,23 @@ public String getOpcRequestId() { return opcRequestId; } + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + /** * The returned SteeringPolicy instance. */ @@ -78,6 +95,7 @@ public com.oracle.bmc.dns.model.SteeringPolicy getSteeringPolicy() { "eTag", "location", "opcRequestId", + "opcWorkRequestId", "steeringPolicy" }) private CreateSteeringPolicyResponse( @@ -86,11 +104,13 @@ private CreateSteeringPolicyResponse( String eTag, String location, String opcRequestId, + String opcWorkRequestId, com.oracle.bmc.dns.model.SteeringPolicy steeringPolicy) { super(__httpStatusCode__, headers); this.eTag = eTag; this.location = location; this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; this.steeringPolicy = steeringPolicy; } @@ -166,6 +186,25 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + /** * The returned SteeringPolicy instance. */ @@ -191,6 +230,7 @@ public Builder copy(CreateSteeringPolicyResponse o) { eTag(o.getETag()); location(o.getLocation()); opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); steeringPolicy(o.getSteeringPolicy()); return this; @@ -202,7 +242,13 @@ public Builder copy(CreateSteeringPolicyResponse o) { */ public CreateSteeringPolicyResponse build() { return new CreateSteeringPolicyResponse( - __httpStatusCode__, headers, eTag, location, opcRequestId, steeringPolicy); + __httpStatusCode__, + headers, + eTag, + location, + opcRequestId, + opcWorkRequestId, + steeringPolicy); } } @@ -222,6 +268,7 @@ public String toString() { sb.append(",eTag=").append(String.valueOf(eTag)); sb.append(",location=").append(String.valueOf(location)); sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); sb.append(",steeringPolicy=").append(String.valueOf(steeringPolicy)); sb.append(")"); return sb.toString(); @@ -241,6 +288,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.eTag, other.eTag) && java.util.Objects.equals(this.location, other.location) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) && java.util.Objects.equals(this.steeringPolicy, other.steeringPolicy); } @@ -251,6 +299,9 @@ public int hashCode() { result = (result * PRIME) + (this.eTag == null ? 43 : this.eTag.hashCode()); result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); result = (result * PRIME) + (this.steeringPolicy == null ? 43 : this.steeringPolicy.hashCode()); diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/DeleteSteeringPolicyAttachmentResponse.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/DeleteSteeringPolicyAttachmentResponse.java index cc32dabdaf2..7cf623a0c0f 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/DeleteSteeringPolicyAttachmentResponse.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/DeleteSteeringPolicyAttachmentResponse.java @@ -25,13 +25,37 @@ public String getOpcRequestId() { return opcRequestId; } - @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) private DeleteSteeringPolicyAttachmentResponse( int __httpStatusCode__, javax.ws.rs.core.MultivaluedMap headers, - String opcRequestId) { + String opcRequestId, + String opcWorkRequestId) { super(__httpStatusCode__, headers); this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; } public static class Builder { @@ -68,6 +92,25 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + /** * Copy method to populate the builder with values from the given instance. * @return this builder instance @@ -76,6 +119,7 @@ public Builder copy(DeleteSteeringPolicyAttachmentResponse o) { __httpStatusCode__(o.get__httpStatusCode__()); headers(o.getHeaders()); opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); return this; } @@ -86,7 +130,7 @@ public Builder copy(DeleteSteeringPolicyAttachmentResponse o) { */ public DeleteSteeringPolicyAttachmentResponse build() { return new DeleteSteeringPolicyAttachmentResponse( - __httpStatusCode__, headers, opcRequestId); + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); } } @@ -104,6 +148,7 @@ public String toString() { sb.append("("); sb.append("super=").append(super.toString()); sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); sb.append(")"); return sb.toString(); } @@ -118,7 +163,9 @@ public boolean equals(Object o) { } DeleteSteeringPolicyAttachmentResponse other = (DeleteSteeringPolicyAttachmentResponse) o; - return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); } @Override @@ -126,6 +173,9 @@ public int hashCode() { final int PRIME = 59; int result = super.hashCode(); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); return result; } } diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/DeleteSteeringPolicyResponse.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/DeleteSteeringPolicyResponse.java index 5aaccc37ec0..e855191f475 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/DeleteSteeringPolicyResponse.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/DeleteSteeringPolicyResponse.java @@ -25,13 +25,37 @@ public String getOpcRequestId() { return opcRequestId; } - @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) private DeleteSteeringPolicyResponse( int __httpStatusCode__, javax.ws.rs.core.MultivaluedMap headers, - String opcRequestId) { + String opcRequestId, + String opcWorkRequestId) { super(__httpStatusCode__, headers); this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; } public static class Builder { @@ -68,6 +92,25 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + /** * Copy method to populate the builder with values from the given instance. * @return this builder instance @@ -76,6 +119,7 @@ public Builder copy(DeleteSteeringPolicyResponse o) { __httpStatusCode__(o.get__httpStatusCode__()); headers(o.getHeaders()); opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); return this; } @@ -85,7 +129,8 @@ public Builder copy(DeleteSteeringPolicyResponse o) { * @return the response object */ public DeleteSteeringPolicyResponse build() { - return new DeleteSteeringPolicyResponse(__httpStatusCode__, headers, opcRequestId); + return new DeleteSteeringPolicyResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); } } @@ -103,6 +148,7 @@ public String toString() { sb.append("("); sb.append("super=").append(super.toString()); sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); sb.append(")"); return sb.toString(); } @@ -117,7 +163,9 @@ public boolean equals(Object o) { } DeleteSteeringPolicyResponse other = (DeleteSteeringPolicyResponse) o; - return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); } @Override @@ -125,6 +173,9 @@ public int hashCode() { final int PRIME = 59; int result = super.hashCode(); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); return result; } } diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/PromoteZoneDnssecKeyVersionResponse.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/PromoteZoneDnssecKeyVersionResponse.java new file mode 100644 index 00000000000..ece806f236c --- /dev/null +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/PromoteZoneDnssecKeyVersionResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dns.responses; + +import com.oracle.bmc.dns.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180115") +public class PromoteZoneDnssecKeyVersionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to + * contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to + * contact Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private PromoteZoneDnssecKeyVersionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to + * contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to + * contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(PromoteZoneDnssecKeyVersionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public PromoteZoneDnssecKeyVersionResponse build() { + return new PromoteZoneDnssecKeyVersionResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PromoteZoneDnssecKeyVersionResponse)) { + return false; + } + + PromoteZoneDnssecKeyVersionResponse other = (PromoteZoneDnssecKeyVersionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/StageZoneDnssecKeyVersionResponse.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/StageZoneDnssecKeyVersionResponse.java new file mode 100644 index 00000000000..35bd41f2f04 --- /dev/null +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/StageZoneDnssecKeyVersionResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.dns.responses; + +import com.oracle.bmc.dns.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180115") +public class StageZoneDnssecKeyVersionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to + * contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to + * contact Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private StageZoneDnssecKeyVersionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to + * contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to + * contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(StageZoneDnssecKeyVersionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public StageZoneDnssecKeyVersionResponse build() { + return new StageZoneDnssecKeyVersionResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof StageZoneDnssecKeyVersionResponse)) { + return false; + } + + StageZoneDnssecKeyVersionResponse other = (StageZoneDnssecKeyVersionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/UpdateSteeringPolicyAttachmentResponse.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/UpdateSteeringPolicyAttachmentResponse.java index be634eb96c8..18aac49a5bd 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/UpdateSteeringPolicyAttachmentResponse.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/UpdateSteeringPolicyAttachmentResponse.java @@ -25,6 +25,23 @@ public String getOpcRequestId() { return opcRequestId; } + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + /** * The current version of the resource, ending with a * representation-specific suffix. This value may be used in If-Match @@ -61,6 +78,7 @@ public com.oracle.bmc.dns.model.SteeringPolicyAttachment getSteeringPolicyAttach "__httpStatusCode__", "headers", "opcRequestId", + "opcWorkRequestId", "eTag", "steeringPolicyAttachment" }) @@ -68,10 +86,12 @@ private UpdateSteeringPolicyAttachmentResponse( int __httpStatusCode__, javax.ws.rs.core.MultivaluedMap headers, String opcRequestId, + String opcWorkRequestId, String eTag, com.oracle.bmc.dns.model.SteeringPolicyAttachment steeringPolicyAttachment) { super(__httpStatusCode__, headers); this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; this.eTag = eTag; this.steeringPolicyAttachment = steeringPolicyAttachment; } @@ -110,6 +130,25 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + /** * The current version of the resource, ending with a * representation-specific suffix. This value may be used in If-Match @@ -155,6 +194,7 @@ public Builder copy(UpdateSteeringPolicyAttachmentResponse o) { __httpStatusCode__(o.get__httpStatusCode__()); headers(o.getHeaders()); opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); eTag(o.getETag()); steeringPolicyAttachment(o.getSteeringPolicyAttachment()); @@ -167,7 +207,12 @@ public Builder copy(UpdateSteeringPolicyAttachmentResponse o) { */ public UpdateSteeringPolicyAttachmentResponse build() { return new UpdateSteeringPolicyAttachmentResponse( - __httpStatusCode__, headers, opcRequestId, eTag, steeringPolicyAttachment); + __httpStatusCode__, + headers, + opcRequestId, + opcWorkRequestId, + eTag, + steeringPolicyAttachment); } } @@ -185,6 +230,7 @@ public String toString() { sb.append("("); sb.append("super=").append(super.toString()); sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); sb.append(",eTag=").append(String.valueOf(eTag)); sb.append(",steeringPolicyAttachment=").append(String.valueOf(steeringPolicyAttachment)); sb.append(")"); @@ -203,6 +249,7 @@ public boolean equals(Object o) { UpdateSteeringPolicyAttachmentResponse other = (UpdateSteeringPolicyAttachmentResponse) o; return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) && java.util.Objects.equals(this.eTag, other.eTag) && java.util.Objects.equals( this.steeringPolicyAttachment, other.steeringPolicyAttachment); @@ -213,6 +260,9 @@ public int hashCode() { final int PRIME = 59; int result = super.hashCode(); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); result = (result * PRIME) + (this.eTag == null ? 43 : this.eTag.hashCode()); result = (result * PRIME) diff --git a/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/UpdateSteeringPolicyResponse.java b/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/UpdateSteeringPolicyResponse.java index 49c5f203112..3c2cdb5fa34 100644 --- a/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/UpdateSteeringPolicyResponse.java +++ b/bmc-dns/src/main/java/com/oracle/bmc/dns/responses/UpdateSteeringPolicyResponse.java @@ -25,6 +25,23 @@ public String getOpcRequestId() { return opcRequestId; } + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + /** * The current version of the resource, ending with a * representation-specific suffix. This value may be used in If-Match @@ -61,6 +78,7 @@ public com.oracle.bmc.dns.model.SteeringPolicy getSteeringPolicy() { "__httpStatusCode__", "headers", "opcRequestId", + "opcWorkRequestId", "eTag", "steeringPolicy" }) @@ -68,10 +86,12 @@ private UpdateSteeringPolicyResponse( int __httpStatusCode__, javax.ws.rs.core.MultivaluedMap headers, String opcRequestId, + String opcWorkRequestId, String eTag, com.oracle.bmc.dns.model.SteeringPolicy steeringPolicy) { super(__httpStatusCode__, headers); this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; this.eTag = eTag; this.steeringPolicy = steeringPolicy; } @@ -110,6 +130,25 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + /** * The current version of the resource, ending with a * representation-specific suffix. This value may be used in If-Match @@ -154,6 +193,7 @@ public Builder copy(UpdateSteeringPolicyResponse o) { __httpStatusCode__(o.get__httpStatusCode__()); headers(o.getHeaders()); opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); eTag(o.getETag()); steeringPolicy(o.getSteeringPolicy()); @@ -166,7 +206,12 @@ public Builder copy(UpdateSteeringPolicyResponse o) { */ public UpdateSteeringPolicyResponse build() { return new UpdateSteeringPolicyResponse( - __httpStatusCode__, headers, opcRequestId, eTag, steeringPolicy); + __httpStatusCode__, + headers, + opcRequestId, + opcWorkRequestId, + eTag, + steeringPolicy); } } @@ -184,6 +229,7 @@ public String toString() { sb.append("("); sb.append("super=").append(super.toString()); sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); sb.append(",eTag=").append(String.valueOf(eTag)); sb.append(",steeringPolicy=").append(String.valueOf(steeringPolicy)); sb.append(")"); @@ -202,6 +248,7 @@ public boolean equals(Object o) { UpdateSteeringPolicyResponse other = (UpdateSteeringPolicyResponse) o; return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) && java.util.Objects.equals(this.eTag, other.eTag) && java.util.Objects.equals(this.steeringPolicy, other.steeringPolicy); } @@ -211,6 +258,9 @@ public int hashCode() { final int PRIME = 59; int result = super.hashCode(); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); result = (result * PRIME) + (this.eTag == null ? 43 : this.eTag.hashCode()); result = (result * PRIME) diff --git a/bmc-dts/pom.xml b/bmc-dts/pom.xml index 822e5c021a5..d52ea720d83 100644 --- a/bmc-dts/pom.xml +++ b/bmc-dts/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-dts @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-email/pom.xml b/bmc-email/pom.xml index ecd3192c12d..2b1457e44b8 100644 --- a/bmc-email/pom.xml +++ b/bmc-email/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-emaildataplane/pom.xml b/bmc-emaildataplane/pom.xml index b031943deb9..19b405625a6 100644 --- a/bmc-emaildataplane/pom.xml +++ b/bmc-emaildataplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-emaildataplane @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-emwarehouse/pom.xml b/bmc-emwarehouse/pom.xml index ae84856a74d..8d69dda4551 100644 --- a/bmc-emwarehouse/pom.xml +++ b/bmc-emwarehouse/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-emwarehouse @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-encryption/pom.xml b/bmc-encryption/pom.xml index e73c46d8cf6..4f70e5a854e 100644 --- a/bmc-encryption/pom.xml +++ b/bmc-encryption/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml @@ -19,18 +19,18 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 com.oracle.oci.sdk oci-java-sdk-circuitbreaker - 2.73.0 + 2.79.0 test com.oracle.oci.sdk oci-java-sdk-keymanagement - 2.73.0 + 2.79.0 com.fasterxml.jackson.core diff --git a/bmc-enforcer-rules/README.md b/bmc-enforcer-rules/README.md index 7912bfdafe4..74187a264fd 100644 --- a/bmc-enforcer-rules/README.md +++ b/bmc-enforcer-rules/README.md @@ -9,13 +9,12 @@ Example: org.apache.maven.plugins maven-enforcer-plugin - 3.1.0 + 3.5.0 com.oracle.oci.sdk oci-java-sdk-enforcer-rules - 2.40.1 - false + 2.46.0 @@ -44,7 +43,7 @@ Example output on failure: ``` -[INFO] --- maven-enforcer-plugin:3.1.0:enforce (enforce) @ maven-test --- +[INFO] --- maven-enforcer-plugin:3.4.1:enforce (enforce) @ maven-test --- [ERROR] Rule 0: com.oracle.bmc.enforcer.rule.NoMixedOciJavaSdkVersionsRule failed with message: Multiple different versions of com.oracle.oci.sdk:oci-java-sdk* dependencies have been found. Mixing different versions is not allowedDependencies. @@ -58,3 +57,14 @@ Use 'mvn dependency:tree' to locate the source of the dependencies with the mixe [INFO] ------------------------------------------------------------------------ ``` +## Installation + +If you have access to Maven Central, Maven should automatically download the enforcer rule. If you do not have access to Maven Central, you can install the `oci-java-sdk-enforcer-rules` Maven package in your local repository using the following command line: + +``` +mvn install:install-file -Dfile=buildTools/oci-java-sdk-enforcer-rules/lib/oci-java-sdk-enforcer-rules-2.46.0.jar -DpomFile=buildTools/oci-java-sdk-enforcer-rules/lib/oci-java-sdk-enforcer-rules-2.46.0.pom +``` + +Note that exact version (e.g. `2.46.0`) varies based on what version of the OCI Java SDK you downloaded and are using, and that the paths (i.e. `buildTools/oci-java-sdk-enforcer-rules/lib/`) are taken to be from the root of the ZIP file distributable. + +For more information about installing Maven packages, see [Guide to installing 3rd party JARs](https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html). \ No newline at end of file diff --git a/bmc-enforcer-rules/pom.xml b/bmc-enforcer-rules/pom.xml index 65d5e5ebeb4..e3b39fa72a6 100644 --- a/bmc-enforcer-rules/pom.xml +++ b/bmc-enforcer-rules/pom.xml @@ -6,7 +6,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 oci-java-sdk-enforcer-rules @@ -15,30 +15,52 @@ https://docs.cloud.oracle.com/Content/API/SDKDocs/javasdk.htm - 3.6.1 + 3.9.5 + 3.5.0 + + 1.8 + 1.8 + org.apache.maven.enforcer enforcer-api - 3.1.0 + ${maven.enforcer.version} + true + provided org.apache.maven.enforcer enforcer-rules - 3.1.0 + ${maven.enforcer.version} + true + provided org.apache.maven maven-core ${maven.version} + true + provided - org.apache.maven - maven-plugin-api - ${maven.version} + javax.inject + javax.inject + 1 + provided + + + junit + junit + test + + + org.hamcrest + hamcrest-all + test diff --git a/bmc-enforcer-rules/src/main/assembly/assembly.xml b/bmc-enforcer-rules/src/main/assembly/assembly.xml index c583f5788f2..87dadc123f8 100644 --- a/bmc-enforcer-rules/src/main/assembly/assembly.xml +++ b/bmc-enforcer-rules/src/main/assembly/assembly.xml @@ -13,18 +13,6 @@ zip - - - - - com.oracle.oci.sdk:* - - third-party/lib - false - false - runtime - - @@ -60,5 +48,10 @@ lib ${project.artifactId}-${project.version}.jar + + pom.xml + lib + ${project.artifactId}-${project.version}.pom + \ No newline at end of file diff --git a/bmc-enforcer-rules/src/main/java/com/oracle/bmc/enforcer/rule/ArtifactMatcher.java b/bmc-enforcer-rules/src/main/java/com/oracle/bmc/enforcer/rule/ArtifactMatcher.java new file mode 100644 index 00000000000..6d94bcc7da1 --- /dev/null +++ b/bmc-enforcer-rules/src/main/java/com/oracle/bmc/enforcer/rule/ArtifactMatcher.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.enforcer.rule; + +import java.util.Collection; +import java.util.LinkedList; + +import org.apache.maven.artifact.Artifact; +import org.apache.maven.artifact.versioning.ArtifactVersion; +import org.apache.maven.artifact.versioning.DefaultArtifactVersion; +import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException; +import org.apache.maven.artifact.versioning.VersionRange; + +class ArtifactMatcher { + private final Collection patterns = new LinkedList<>(); + private final Collection ignorePatterns = new LinkedList<>(); + + static class Pattern { + private String pattern; + private String[] parts; + + Pattern(String pattern) { + if (pattern == null) { + throw new NullPointerException("pattern"); + } + + this.pattern = pattern; + + parts = pattern.split(":", 7); + + if (parts.length == 7) { + throw new IllegalArgumentException("Pattern contains too many delimiters."); + } + + for (String part : parts) { + if ("".equals(part)) { + throw new IllegalArgumentException("Pattern or its part is empty."); + } + } + } + + boolean match(Artifact artifact) throws InvalidVersionSpecificationException { + if (artifact == null) { + throw new NullPointerException("artifact"); + } + + switch (parts.length) { + case 6: + String classifier = artifact.getClassifier(); + if (!matches(parts[5], classifier)) { + return false; + } + case 5: + String scope = artifact.getScope(); + if (scope == null || scope.equals("")) { + scope = Artifact.SCOPE_COMPILE; + } + + if (!matches(parts[4], scope)) { + return false; + } + case 4: + String type = artifact.getType(); + if (type == null || type.equals("")) { + type = "jar"; + } + + if (!matches(parts[3], type)) { + return false; + } + + case 3: + if (!matches(parts[2], artifact.getVersion())) { + // CHECKSTYLE_OFF: LineLength + if (!containsVersion( + VersionRange.createFromVersionSpec(parts[2]), + new DefaultArtifactVersion(artifact.getVersion()))) + // CHECKSTYLE_ON: LineLength + { + return false; + } + } + + case 2: + if (!matches(parts[1], artifact.getArtifactId())) { + return false; + } + + case 1: + return matches(parts[0], artifact.getGroupId()); + + default: + throw new AssertionError(); + } + } + + private boolean matches(String expression, String input) { + String regex = + expression + .replace(".", "\\.") + .replace("*", ".*") + .replace(":", "\\:") + .replace('?', '.') + .replace("[", "\\[") + .replace("]", "\\]") + .replace("(", "\\(") + .replace(")", "\\)"); + + if (input == null) { + input = ""; + } + + return java.util.regex.Pattern.matches(regex, input); + } + + @Override + public String toString() { + return pattern; + } + } + + /** + * Construct class by providing patterns as strings. Empty strings are ignored. + * + * @param patterns includes + * @param ignorePatterns excludes + * @throws NullPointerException if any of the arguments is null + */ + ArtifactMatcher(final Collection patterns, final Collection ignorePatterns) { + if (patterns == null) { + throw new NullPointerException("patterns"); + } + if (ignorePatterns == null) { + throw new NullPointerException("ignorePatterns"); + } + for (String pattern : patterns) { + if (pattern != null && !"".equals(pattern)) { + this.patterns.add(new Pattern(pattern)); + } + } + + for (String ignorePattern : ignorePatterns) { + if (ignorePattern != null && !"".equals(ignorePattern)) { + this.ignorePatterns.add(new Pattern(ignorePattern)); + } + } + } + + /** + * Check if artifact matches patterns. + * + * @param artifact the artifact to match + * @return {@code true} if artifact matches any {@link #patterns} and none of the {@link + * #ignorePatterns}, otherwise {@code false} + */ + boolean match(Artifact artifact) throws InvalidVersionSpecificationException { + for (Pattern pattern : patterns) { + if (pattern.match(artifact)) { + for (Pattern ignorePattern : ignorePatterns) { + if (ignorePattern.match(artifact)) { + return false; + } + } + return true; + } + } + return false; + } + + static boolean containsVersion(VersionRange allowedRange, ArtifactVersion theVersion) { + ArtifactVersion recommendedVersion = allowedRange.getRecommendedVersion(); + if (recommendedVersion == null) { + return allowedRange.containsVersion(theVersion); + } else { + int compareTo = recommendedVersion.compareTo(theVersion); + return compareTo <= 0; + } + } +} diff --git a/bmc-enforcer-rules/src/main/java/com/oracle/bmc/enforcer/rule/ArtifactUtils.java b/bmc-enforcer-rules/src/main/java/com/oracle/bmc/enforcer/rule/ArtifactUtils.java new file mode 100644 index 00000000000..285aa53aaf0 --- /dev/null +++ b/bmc-enforcer-rules/src/main/java/com/oracle/bmc/enforcer/rule/ArtifactUtils.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.enforcer.rule; + +import java.util.Collection; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; + +import org.apache.maven.artifact.Artifact; +import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException; + +class ArtifactUtils { + /** + * Returns a subset of dependency artifacts that match the given collection of patterns + * + * @param dependencies dependency artifacts to match against patterns + * @param patterns patterns to match against the artifacts + * @return a set containing artifacts matching one of the patterns or null + */ + static Set filterDependencyArtifacts( + Collection dependencies, Collection patterns) + throws IllegalArgumentException { + return Optional.ofNullable(patterns) + .map( + collection -> + collection + .stream() + .map(p -> p.split(":")) + .map(ArtifactUtils::stripAll) + .map(arr -> String.join(":", arr)) + .flatMap( + pattern -> + dependencies + .stream() + .filter( + artifact -> + compareDependency( + pattern, + artifact))) + .collect(Collectors.toSet())) + .orElse(null); + } + + /** + * Compares the given pattern against the given artifact. The pattern should follow the format + * groupId:artifactId:version:type:scope:classifier. + * + * @param pattern The pattern to compare the artifact with + * @param artifact the artifact + * @return true if the artifact matches one of the patterns + */ + static boolean compareDependency(String pattern, Artifact artifact) { + try { + return new ArtifactMatcher.Pattern(pattern).match(artifact); + } catch (InvalidVersionSpecificationException e) { + throw new IllegalArgumentException(e.getMessage(), e); + } + } + + private static String[] stripAll(String... strs) { + for (int i = 0; i < strs.length; i++) { + strs[i] = strs[i].trim(); + } + return strs; + } +} diff --git a/bmc-enforcer-rules/src/main/java/com/oracle/bmc/enforcer/rule/NewObjectMapperDefinitionDeniedRule.java b/bmc-enforcer-rules/src/main/java/com/oracle/bmc/enforcer/rule/NewObjectMapperDefinitionDeniedRule.java index bd9177e2f0b..dba4a2c5edf 100644 --- a/bmc-enforcer-rules/src/main/java/com/oracle/bmc/enforcer/rule/NewObjectMapperDefinitionDeniedRule.java +++ b/bmc-enforcer-rules/src/main/java/com/oracle/bmc/enforcer/rule/NewObjectMapperDefinitionDeniedRule.java @@ -17,23 +17,36 @@ import java.util.Arrays; import java.util.List; +import javax.inject.Named; + /** - * Enforcer to ensure no new ObjectMapper objects are created in OCI Java SDK except in Serialization.java - * The ObjectMapper defined in Serialization.java should be re-used as com.oracle.bmc.http.Serialization.getObjectMapper() - * Any new ObjectMapper object (including any form of constructors) will cause the build to fail. + * Enforcer to ensure no new ObjectMapper objects are created in OCI Java SDK except in the + * explicitly specified classes. Any new ObjectMapper object (including any form of constructors) + * will cause the build to fail. This is required to avoid incorrectly configured object mappers. + * + *

The ObjectMapper defined in a client choice should be re-used. As an example, use + * JacksonSerializer.getDefaultSerializer() from oci-java-sdk-common-httpclient-jersey to get the + * json mapper. */ +@Named("newObjectMapperDefinitionDeniedRule") public class NewObjectMapperDefinitionDeniedRule implements EnforcerRule { private String excludeClasses; - // This regex will match any string that looks like "new ObjectMapper" or "new com.fasterxml.jackson.databind.ObjectMapper" ignoring all the whitespaces + // This regex will match any string that looks like "new ObjectMapper" or "new + // com.fasterxml.jackson.databind.ObjectMapper" ignoring all the whitespaces private static final String REGEX_TO_FIND_NEW_OBJECT_MAPPER_DEFINITION = ".*new\\s+(ObjectMapper|com\\s?[.]\\s?fasterxml\\s?[.]\\s?jackson\\s?[.]\\s?databind\\s?[.]\\s?ObjectMapper).*"; @Override public void execute(EnforcerRuleHelper helper) throws EnforcerRuleException { Log log = helper.getLog(); - String[] ignoreClasses = excludeClasses.split(","); + String[] ignoreClasses; + if (excludeClasses != null) { + ignoreClasses = excludeClasses.split(","); + } else { + ignoreClasses = new String[0]; + } log.info( "Classes that can create new ObjectMapper objects: " + Arrays.toString(ignoreClasses)); @@ -58,7 +71,7 @@ public void execute(EnforcerRuleHelper helper) throws EnforcerRuleException { throw new EnforcerRuleException( "New ObjectMapper defined in " + javaFile.getAbsolutePath() - + ". Please re-use the ObjectMapper defined in Serialization.java by calling com.oracle.bmc.http.Serialization.getObjectMapper()."); + + ". Please re-use the ObjectMapper defined in a client implementation (e.g. the JacksonSerializer.getDefaultObjectMapper() from oci-java-sdk-common-httpclient-jersey)."); } } } @@ -72,34 +85,35 @@ public void execute(EnforcerRuleHelper helper) throws EnforcerRuleException { } /** - * If your rule is cacheable, you must return a unique id when parameters or conditions - * change that would cause the result to be different. Multiple cached results are stored - * based on their id. - *

- * The easiest way to do this is to return a hash computed from the values of your parameters. - *

- * If your rule is not cacheable, then the result here is not important, you may return anything. + * If your rule is cacheable, you must return a unique id when parameters or conditions change + * that would cause the result to be different. Multiple cached results are stored based on + * their id. + * + *

The easiest way to do this is to return a hash computed from the values of your + * parameters. + * + *

If your rule is not cacheable, then the result here is not important, you may return + * anything. */ public String getCacheId() { return this.getClass().getSimpleName() + "-notCacheable"; } /** - * This tells the system if the results are cacheable at all. Keep in mind that during - * forked builds and other things, a given rule may be executed more than once for the same - * project. This means that even things that change from project to project may still - * be cacheable in certain instances. + * This tells the system if the results are cacheable at all. Keep in mind that during forked + * builds and other things, a given rule may be executed more than once for the same project. + * This means that even things that change from project to project may still be cacheable in + * certain instances. */ public boolean isCacheable() { return false; } /** - * If the rule is cacheable and the same id is found in the cache, the stored results - * are passed to this method to allow double checking of the results. Most of the time - * this can be done by generating unique ids, but sometimes the results of objects returned - * by the helper need to be queried. You may for example, store certain objects in your rule - * and then query them later. + * If the rule is cacheable and the same id is found in the cache, the stored results are passed + * to this method to allow double checking of the results. Most of the time this can be done by + * generating unique ids, but sometimes the results of objects returned by the helper need to be + * queried. You may for example, store certain objects in your rule and then query them later. */ public boolean isResultValid(EnforcerRule rule) { return false; diff --git a/bmc-enforcer-rules/src/main/java/com/oracle/bmc/enforcer/rule/NoMixedOciJavaSdkVersionsException.java b/bmc-enforcer-rules/src/main/java/com/oracle/bmc/enforcer/rule/NoMixedOciJavaSdkVersionsException.java new file mode 100644 index 00000000000..72f26914e76 --- /dev/null +++ b/bmc-enforcer-rules/src/main/java/com/oracle/bmc/enforcer/rule/NoMixedOciJavaSdkVersionsException.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.enforcer.rule; + +import java.util.Collections; +import java.util.Map; +import java.util.Set; + +import org.apache.maven.artifact.Artifact; +import org.apache.maven.enforcer.rule.api.EnforcerRuleException; + +/** See {@link NoMixedOciJavaSdkVersionsRule#execute()}. */ +public class NoMixedOciJavaSdkVersionsException extends EnforcerRuleException { + private final Map> versions; + + public NoMixedOciJavaSdkVersionsException(String message, Map> versions) { + super(message); + this.versions = Collections.unmodifiableMap(versions); + } + + public Map> getVersionsInConflict() { + return versions; + } +} diff --git a/bmc-enforcer-rules/src/main/java/com/oracle/bmc/enforcer/rule/NoMixedOciJavaSdkVersionsRule.java b/bmc-enforcer-rules/src/main/java/com/oracle/bmc/enforcer/rule/NoMixedOciJavaSdkVersionsRule.java index d9e2e325bb7..a0b334054be 100644 --- a/bmc-enforcer-rules/src/main/java/com/oracle/bmc/enforcer/rule/NoMixedOciJavaSdkVersionsRule.java +++ b/bmc-enforcer-rules/src/main/java/com/oracle/bmc/enforcer/rule/NoMixedOciJavaSdkVersionsRule.java @@ -4,36 +4,39 @@ */ package com.oracle.bmc.enforcer.rule; +import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import java.util.stream.Collectors; + +import javax.inject.Inject; +import javax.inject.Named; + import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.resolver.filter.ArtifactFilter; +import org.apache.maven.enforcer.rule.api.AbstractEnforcerRule; +import org.apache.maven.enforcer.rule.api.EnforcerLogger; import org.apache.maven.enforcer.rule.api.EnforcerRuleException; -import org.apache.maven.enforcer.rule.api.EnforcerRuleHelper; import org.apache.maven.execution.MavenSession; -import org.apache.maven.plugin.logging.Log; -import org.apache.maven.plugins.enforcer.AbstractNonCacheableEnforcerRule; -import org.apache.maven.plugins.enforcer.utils.ArtifactUtils; import org.apache.maven.project.DefaultProjectBuildingRequest; import org.apache.maven.project.MavenProject; import org.apache.maven.project.ProjectBuildingRequest; -import org.apache.maven.shared.dependency.graph.DependencyGraphBuilder; -import org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException; -import org.apache.maven.shared.dependency.graph.DependencyNode; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; /** Enforcer to ensure there are no mixed OCI Java SDK versions. */ -public class NoMixedOciJavaSdkVersionsRule extends AbstractNonCacheableEnforcerRule { +@Named("noMixedOciJavaSdkVersionsRule") +@SuppressWarnings("unused") +public class NoMixedOciJavaSdkVersionsRule extends AbstractEnforcerRule { public static final String BANNED_GROUP_ID = "com.oracle.oci.sdk"; public static final String BANNED_ARTIFACT_ID_PREFIX = "oci-java-sdk"; + static final String MIN_MAVEN_VERSION = "3.8.1"; + static final String MIN_ENFORCER_VERSION = "3.4.0"; + /** * Specify the allowedDependencies dependencies. This can be a list of artifacts in the format * @@ -44,58 +47,70 @@ public class NoMixedOciJavaSdkVersionsRule extends AbstractNonCacheableEnforcerR * For example, to allow "com.oracle.oci.sdk:oci-java-sdk-core", allow * "com.oracle.oci.sdk:oci-java-sdk-core" * - * @see {@link #setAllowedDependencies(List)} (List)} - * @see {@link #getAllowedDependencies()} ()} + * @see {@link #setAllowedDependencies(List)} + * @see {@link #getAllowedDependencies()} */ - private List allowedDependencies = null; - - private boolean searchTransitive = true; - - private transient DependencyGraphBuilder graphBuilder; + @Inject private List allowedDependencies; + + @Inject private MavenProject project; + + @Inject private MavenSession session; + + private ProjectBuildingRequest buildingRequest; + + public NoMixedOciJavaSdkVersionsRule() {} + + NoMixedOciJavaSdkVersionsRule( + EnforcerLogger logger, MavenProject project, List allowedDependencies) { + setLog(Objects.requireNonNull(logger)); + this.project = + Objects.requireNonNull( + project, + "'project' was expected to be injected. Are you using maven enforcer v >= " + + MIN_MAVEN_VERSION + + "?"); + this.allowedDependencies = + Objects.requireNonNull( + allowedDependencies, + "'allowedDependencies' was expected to be injected. Are you using maven v >= " + + MIN_ENFORCER_VERSION + + "?"); + } @Override - public void execute(EnforcerRuleHelper helper) throws EnforcerRuleException { - MavenProject project; - try { - project = (MavenProject) helper.evaluate("${project}"); - } catch (ExpressionEvaluationException eee) { - throw new EnforcerRuleException("Unable to retrieve the MavenProject: ", eee); + public void execute() throws EnforcerRuleException { + Objects.requireNonNull( + project, + "'project' was expected to be injected. Are you using maven enforcer v >= " + + MIN_MAVEN_VERSION + + "?"); + Objects.requireNonNull( + allowedDependencies, + "'allowedDependencies' was expected to be injected. Are you using maven v >= " + + MIN_ENFORCER_VERSION + + "?"); + this.allowedDependencies = + allowedDependencies.stream().filter(s -> !s.isEmpty()).collect(Collectors.toList()); + + this.buildingRequest = + (session == null) + ? null + : new DefaultProjectBuildingRequest(session.getProjectBuildingRequest()); + if (buildingRequest != null) { + buildingRequest.setProject(project); } - MavenSession session; - try { - session = (MavenSession) helper.evaluate("${session}"); - } catch (ExpressionEvaluationException eee) { - throw new EnforcerRuleException("Unable to retrieve the MavenSession: ", eee); - } - - try { - this.graphBuilder = helper.getComponent(DependencyGraphBuilder.class); - } catch (ComponentLookupException cle) { - throw new EnforcerRuleException("Unable to lookup DependencyGraphBuilder: ", cle); - } - - ProjectBuildingRequest buildingRequest = - new DefaultProjectBuildingRequest(session.getProjectBuildingRequest()); - buildingRequest.setProject(project); - Set dependencies = this.getDependenciesToCheck(helper, buildingRequest); - Map> versions = this.checkDependencies(dependencies, helper.getLog()); + Set dependencies = getDependenciesToCheck(); + Map> versions = checkDependencies(dependencies); if (versions.size() > 1) { - String message = this.getMessage(); StringBuilder buf = new StringBuilder(); - - if (message != null) { - buf.append(message).append(System.lineSeparator()); - } - buf.append("Multiple different versions of ") .append(BANNED_GROUP_ID) .append(":") .append(BANNED_ARTIFACT_ID_PREFIX) .append("* dependencies have been found.") .append(System.lineSeparator()); - buf.append("Mixing different versions is not allowedDependencies.") - .append(System.lineSeparator()); + buf.append("Mixing different versions is not allowed.").append(System.lineSeparator()); for (String version : versions.keySet()) { buf.append("Using version ") @@ -109,24 +124,23 @@ public void execute(EnforcerRuleHelper helper) throws EnforcerRuleException { buf.append( "Use 'mvn dependency:tree' to locate the source of the dependencies with the mixed versions."); - throw new EnforcerRuleException(buf.toString()); + throw new NoMixedOciJavaSdkVersionsException(buf.toString(), versions); } } - protected Map> checkDependencies(Set dependencies, Log log) - throws EnforcerRuleException { + protected Map> checkDependencies(Set dependencies) { Map> versions = new HashMap<>(); for (Artifact dependency : dependencies) { - log.debug("Checking dependency " + dependency.getId()); + getLog().debug("Checking dependency " + dependency.getId()); if (!BANNED_GROUP_ID.equals(dependency.getGroupId())) { - log.debug("Ignoring, not groupId " + BANNED_GROUP_ID); + getLog().debug("Ignoring, not groupId " + BANNED_GROUP_ID); continue; } if (dependency.getArtifactId() == null || !dependency.getArtifactId().startsWith(BANNED_ARTIFACT_ID_PREFIX)) { - log.debug("Ignoring, artifactId not prefixed by " + BANNED_ARTIFACT_ID_PREFIX); + getLog().debug("Ignoring, artifactId not prefixed by " + BANNED_ARTIFACT_ID_PREFIX); continue; } @@ -136,54 +150,59 @@ protected Map> checkDependencies(Set dependencie artifactSet = new HashSet<>(); versions.put(dependency.getVersion(), artifactSet); } - log.debug("Recording version " + dependency.getVersion()); + getLog().debug("Recording version " + dependency.getVersion()); artifactSet.add(dependency); } } - // anything specifically allowedDependencies should be removed from the ban list. - Set ignored = ArtifactUtils.checkDependencies(dependencies, allowedDependencies); - - if (ignored != null) { - log.debug( - "Dependencies to ignore found: " - + ignored.stream() - .map(a -> a.getId()) - .collect(Collectors.joining(", "))); + // anything in allowedDependencies should be removed from the ban list + Set ignored = ignoredDependencies(dependencies, allowedDependencies); + if (!ignored.isEmpty()) { + getLog().debug( + "Dependencies to ignore found: " + + ignored.stream() + .map(Artifact::getId) + .collect(Collectors.joining(", "))); Iterator versionsIt = versions.keySet().iterator(); while (versionsIt.hasNext()) { String version = versionsIt.next(); - log.debug("Checking version" + version); + getLog().debug("Checking version" + version); Set artifactSet = versions.get(version); if (artifactSet != null) { - log.debug( - "Artifacts in version " - + version - + " before: " - + artifactSet - .stream() - .map(a -> a.getId()) - .collect(Collectors.joining(", "))); + getLog().debug( + "Artifacts in version " + + version + + " before: " + + artifactSet + .stream() + .map(Artifact::getId) + .collect(Collectors.joining(", "))); artifactSet.removeAll(ignored); - log.debug( - "Artifacts in version " - + version - + " after: " - + artifactSet - .stream() - .map(a -> a.getId()) - .collect(Collectors.joining(", "))); + getLog().debug( + "Artifacts in version " + + version + + " after: " + + artifactSet + .stream() + .map(Artifact::getId) + .collect(Collectors.joining(", "))); } if (artifactSet == null || artifactSet.isEmpty()) { - log.debug("Version " + version + " is now empty, removing"); + getLog().debug("Version " + version + " is now empty, removing"); versionsIt.remove(); - ; } } } - log.debug( - "Different versions found: " + versions.keySet().size() + ": " + versions.keySet()); + getLog().debug( + "Unique versions found of " + + BANNED_GROUP_ID + + ":" + + BANNED_ARTIFACT_ID_PREFIX + + ": " + + versions.keySet().size() + + ": " + + versions.keySet()); return versions; } @@ -196,33 +215,21 @@ public void setAllowedDependencies(List allowed) { this.allowedDependencies = allowed; } - private Set getDependenciesToCheck( - EnforcerRuleHelper helper, ProjectBuildingRequest buildingRequest) { - String cacheKey = buildingRequest.getProject().getId() + "_" + this.searchTransitive; - return (Set) helper.getCache(cacheKey, () -> this.getDependenciesToCheck(buildingRequest)); + private Set getDependenciesToCheck() { + // this will be transitive in nature + return project.getArtifacts() + .stream() + .filter( + a -> + a.getScope().isEmpty() + || a.getScope().equalsIgnoreCase("compile") + || a.getScope().equalsIgnoreCase("runtime")) + .filter(a -> !a.isOptional()) + .collect(Collectors.toSet()); } - protected Set getDependenciesToCheck(ProjectBuildingRequest buildingRequest) { - Object dependencies = null; - - try { - DependencyNode node = - this.graphBuilder.buildDependencyGraph(buildingRequest, (ArtifactFilter) null); - if (this.searchTransitive) { - dependencies = ArtifactUtils.getAllDescendants(node); - } else if (node.getChildren() != null) { - dependencies = new HashSet(); - Iterator it = node.getChildren().iterator(); - - while (it.hasNext()) { - DependencyNode depNode = (DependencyNode) it.next(); - ((Set) dependencies).add(depNode.getArtifact()); - } - } - - return (Set) dependencies; - } catch (DependencyGraphBuilderException var6) { - throw new RuntimeException(var6); - } + static Set ignoredDependencies( + Collection dependencies, List allowedDependencies) { + return ArtifactUtils.filterDependencyArtifacts(dependencies, allowedDependencies); } } diff --git a/bmc-enforcer-rules/src/test/java/com/oracle/bmc/enforcer/rule/NoMixedOciJavaSdkVersionsRuleTest.java b/bmc-enforcer-rules/src/test/java/com/oracle/bmc/enforcer/rule/NoMixedOciJavaSdkVersionsRuleTest.java new file mode 100644 index 00000000000..a7fb77cac52 --- /dev/null +++ b/bmc-enforcer-rules/src/test/java/com/oracle/bmc/enforcer/rule/NoMixedOciJavaSdkVersionsRuleTest.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.enforcer.rule; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.function.Supplier; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import org.apache.maven.artifact.Artifact; +import org.apache.maven.artifact.DefaultArtifact; +import org.apache.maven.enforcer.rule.api.EnforcerLogger; +import org.apache.maven.project.MavenProject; +import org.junit.Test; + +import static com.oracle.bmc.enforcer.rule.NoMixedOciJavaSdkVersionsRule.BANNED_ARTIFACT_ID_PREFIX; +import static com.oracle.bmc.enforcer.rule.NoMixedOciJavaSdkVersionsRule.BANNED_GROUP_ID; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.contains; +import static org.hamcrest.Matchers.containsInAnyOrder; +import static org.hamcrest.Matchers.startsWith; +import static org.junit.Assert.assertThrows; + +public class NoMixedOciJavaSdkVersionsRuleTest { + + @Test + public void ignoredDependencies() { + List allowedList = new ArrayList<>(); + allowedList.add("javax.servlet:javax.servlet-api:2.1.0"); + List artifacts = + Stream.of( + "javax.inject:javax.inject:1", + "javax.crypto:javax.crypto:1", + "javax.servlet:javax.servlet-api:2.1.0", + "other.servlet:other.servlet:1") + .map(NoMixedOciJavaSdkVersionsRuleTest::toArtifact) + .collect(Collectors.toList()); + List ignored = + NoMixedOciJavaSdkVersionsRule.ignoredDependencies(artifacts, allowedList) + .stream() + .map(NoMixedOciJavaSdkVersionsRuleTest::toSimpleGav) + .collect(Collectors.toList()); + assertThat(ignored.toString(), ignored, contains("javax.servlet:javax.servlet-api:2.1.0")); + + // try variations on allowedList + allowedList.add("javax.crypto:javax.crypto"); + ignored = + NoMixedOciJavaSdkVersionsRule.ignoredDependencies(artifacts, allowedList) + .stream() + .map(NoMixedOciJavaSdkVersionsRuleTest::toSimpleGav) + .collect(Collectors.toList()); + assertThat( + ignored.toString(), + ignored, + containsInAnyOrder( + "javax.crypto:javax.crypto:1", "javax.servlet:javax.servlet-api:2.1.0")); + + // with wildcards + allowedList.add("*.servlet:*"); + ignored = + NoMixedOciJavaSdkVersionsRule.ignoredDependencies(artifacts, allowedList) + .stream() + .map(NoMixedOciJavaSdkVersionsRuleTest::toSimpleGav) + .collect(Collectors.toList()); + assertThat( + ignored.toString(), + ignored, + containsInAnyOrder( + "javax.crypto:javax.crypto:1", + "javax.servlet:javax.servlet-api:2.1.0", + "other.servlet:other.servlet:1")); + + allowedList.add("*javax.inject*"); + ignored = + NoMixedOciJavaSdkVersionsRule.ignoredDependencies(artifacts, allowedList) + .stream() + .map(NoMixedOciJavaSdkVersionsRuleTest::toSimpleGav) + .collect(Collectors.toList()); + assertThat( + ignored.toString(), + ignored, + containsInAnyOrder( + "javax.inject:javax.inject:1", + "javax.crypto:javax.crypto:1", + "javax.servlet:javax.servlet-api:2.1.0", + "other.servlet:other.servlet:1")); + } + + @Test + public void noAllowedDependenciesSpecified() { + MavenProject project = new MavenProject(); + Set artifacts = + Stream.of( + BANNED_GROUP_ID + ":" + BANNED_ARTIFACT_ID_PREFIX + "-lib1:1.0", + BANNED_GROUP_ID + ":" + BANNED_ARTIFACT_ID_PREFIX + "-lib2:1.0", + BANNED_GROUP_ID + ":" + BANNED_ARTIFACT_ID_PREFIX + "-lib3:2.0", + "javax.inject:javax.inject:1", + "javax.crypto:javax.crypto:1", + "javax.servlet:javax.servlet-api:2.1.0", + "other.servlet:other.servlet:1") + .map(NoMixedOciJavaSdkVersionsRuleTest::toArtifact) + .collect(Collectors.toSet()); + project.setArtifacts(artifacts); + + // this is the way it will come in when someone uses + List allowedList = new ArrayList<>(); + allowedList.add(""); + + TestingLogger logger = new TestingLogger(); + NoMixedOciJavaSdkVersionsRule rule = + new NoMixedOciJavaSdkVersionsRule(logger, project, allowedList); + NoMixedOciJavaSdkVersionsException e = + assertThrows(NoMixedOciJavaSdkVersionsException.class, rule::execute); + assertThat( + e.getMessage(), + startsWith( + "Multiple different versions of com.oracle.oci.sdk:oci-java-sdk* dependencies have been found.\nMixing different versions is not allowed.\n")); + assertThat(e.getVersionsInConflict().keySet(), containsInAnyOrder("1.0", "2.0")); + } + + static Artifact toArtifact(String simpleGav) { + String[] split = simpleGav.split(":"); + return new DefaultArtifact(split[0], split[1], split[2], "", "", "", null); + } + + static String toSimpleGav(Artifact gav) { + return gav.getGroupId() + ":" + gav.getArtifactId() + ":" + gav.getVersion(); + } + + static class TestingLogger implements EnforcerLogger { + static final Logger LOGGER = Logger.getLogger(TestingLogger.class.getName()); + + @Override + public void warnOrError(CharSequence charSequence) { + LOGGER.warning(charSequence.toString()); + } + + @Override + public void warnOrError(Supplier supplier) { + warnOrError(supplier.get()); + } + + @Override + public boolean isDebugEnabled() { + return LOGGER.isLoggable(Level.FINE); + } + + @Override + public void debug(CharSequence charSequence) { + LOGGER.log(Level.FINE, charSequence.toString()); + } + + @Override + public void debug(Supplier supplier) { + debug(supplier.get()); + } + + @Override + public boolean isInfoEnabled() { + return LOGGER.isLoggable(Level.INFO); + } + + @Override + public void info(CharSequence charSequence) { + LOGGER.log(Level.INFO, charSequence.toString()); + } + + @Override + public void info(Supplier supplier) { + info(supplier.get()); + } + + @Override + public boolean isWarnEnabled() { + return LOGGER.isLoggable(Level.WARNING); + } + + @Override + public void warn(CharSequence charSequence) { + LOGGER.log(Level.WARNING, charSequence.toString()); + } + + @Override + public void warn(Supplier supplier) { + warn(supplier.get()); + } + + @Override + public boolean isErrorEnabled() { + return LOGGER.isLoggable(Level.SEVERE); + } + + @Override + public void error(CharSequence charSequence) { + LOGGER.log(Level.SEVERE, charSequence.toString()); + } + + @Override + public void error(Supplier supplier) { + error(supplier.get()); + } + } +} diff --git a/bmc-events/pom.xml b/bmc-events/pom.xml index 35645987766..7d0b27a54fd 100644 --- a/bmc-events/pom.xml +++ b/bmc-events/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-events @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-examples/pom.xml b/bmc-examples/pom.xml index 7399d2f82e6..5b30a16a9c4 100644 --- a/bmc-examples/pom.xml +++ b/bmc-examples/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-examples @@ -28,7 +28,7 @@ com.oracle.oci.sdk oci-java-sdk-bom - 2.73.0 + 2.79.0 pom import @@ -649,5 +649,29 @@ com.oracle.oci.sdk oci-java-sdk-demandsignal + + com.oracle.oci.sdk + oci-java-sdk-fleetappsmanagement + + + com.oracle.oci.sdk + oci-java-sdk-delegateaccesscontrol + + + com.oracle.oci.sdk + oci-java-sdk-generativeaiagent + + + com.oracle.oci.sdk + oci-java-sdk-generativeaiagentruntime + + + com.oracle.oci.sdk + oci-java-sdk-securityattribute + + + com.oracle.oci.sdk + oci-java-sdk-zpr + \ No newline at end of file diff --git a/bmc-filestorage/pom.xml b/bmc-filestorage/pom.xml index 4ab2e981398..86918698f90 100644 --- a/bmc-filestorage/pom.xml +++ b/bmc-filestorage/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorage.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorage.java index e8e7f7d128e..218d2adc987 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorage.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorage.java @@ -61,6 +61,106 @@ public interface FileStorage extends AutoCloseable { */ void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + /** + * Adds a lock to a resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use AddExportLock API. + */ + AddExportLockResponse addExportLock(AddExportLockRequest request); + + /** + * Adds a lock to a resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use AddFileSystemLock API. + */ + AddFileSystemLockResponse addFileSystemLock(AddFileSystemLockRequest request); + + /** + * Adds a lock to a resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use AddFilesystemSnapshotPolicyLock API. + */ + AddFilesystemSnapshotPolicyLockResponse addFilesystemSnapshotPolicyLock( + AddFilesystemSnapshotPolicyLockRequest request); + + /** + * Adds a lock to a resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use AddMountTargetLock API. + */ + AddMountTargetLockResponse addMountTargetLock(AddMountTargetLockRequest request); + + /** + * Adds a lock to a resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use AddOutboundConnectorLock API. + */ + AddOutboundConnectorLockResponse addOutboundConnectorLock( + AddOutboundConnectorLockRequest request); + + /** + * Adds a lock to a resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use AddReplicationLock API. + */ + AddReplicationLockResponse addReplicationLock(AddReplicationLockRequest request); + + /** + * Adds a lock to a resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use AddSnapshotLock API. + */ + AddSnapshotLockResponse addSnapshotLock(AddSnapshotLockRequest request); + + /** + * Cancel scheduled downgrade shape request for mount target. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CancelDowngradeShapeMountTarget API. + */ + CancelDowngradeShapeMountTargetResponse cancelDowngradeShapeMountTarget( + CancelDowngradeShapeMountTargetRequest request); + /** * Moves a file system and its associated snapshots into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes) * @@ -447,6 +547,19 @@ DeleteFilesystemSnapshotPolicyResponse deleteFilesystemSnapshotPolicy( */ DeleteSnapshotResponse deleteSnapshot(DeleteSnapshotRequest request); + /** + * Detaches the file system from its parent file system + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DetachClone API. + */ + DetachCloneResponse detachClone(DetachCloneRequest request); + /** * Provides estimates for replication created using specific file system. * @@ -715,6 +828,106 @@ ListFilesystemSnapshotPoliciesResponse listFilesystemSnapshotPolicies( PauseFilesystemSnapshotPolicyResponse pauseFilesystemSnapshotPolicy( PauseFilesystemSnapshotPolicyRequest request); + /** + * Removes a lock to a resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RemoveExportLock API. + */ + RemoveExportLockResponse removeExportLock(RemoveExportLockRequest request); + + /** + * Removes a lock to a resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RemoveFileSystemLock API. + */ + RemoveFileSystemLockResponse removeFileSystemLock(RemoveFileSystemLockRequest request); + + /** + * Removes a lock to a resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RemoveFilesystemSnapshotPolicyLock API. + */ + RemoveFilesystemSnapshotPolicyLockResponse removeFilesystemSnapshotPolicyLock( + RemoveFilesystemSnapshotPolicyLockRequest request); + + /** + * Removes a lock to a resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RemoveMountTargetLock API. + */ + RemoveMountTargetLockResponse removeMountTargetLock(RemoveMountTargetLockRequest request); + + /** + * Removes a lock to a resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RemoveOutboundConnectorLock API. + */ + RemoveOutboundConnectorLockResponse removeOutboundConnectorLock( + RemoveOutboundConnectorLockRequest request); + + /** + * Removes a lock to a resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RemoveReplicationLock API. + */ + RemoveReplicationLockResponse removeReplicationLock(RemoveReplicationLockRequest request); + + /** + * Removes a lock to a resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RemoveSnapshotLock API. + */ + RemoveSnapshotLockResponse removeSnapshotLock(RemoveSnapshotLockRequest request); + + /** + * Schedule a downgrade shape of the mount target. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ScheduleDowngradeShapeMountTarget API. + */ + ScheduleDowngradeShapeMountTargetResponse scheduleDowngradeShapeMountTarget( + ScheduleDowngradeShapeMountTargetRequest request); + /** * This operation unpauses a paused file system snapshot policy and updates the lifecycle state of the file system snapshot policy from * INACTIVE to ACTIVE. By default, file system snapshot policies are in the ACTIVE state. When a file system snapshot policy is not paused, or in the ACTIVE state, file systems that are associated with the @@ -833,6 +1046,19 @@ UpdateFilesystemSnapshotPolicyResponse updateFilesystemSnapshotPolicy( */ UpdateSnapshotResponse updateSnapshot(UpdateSnapshotRequest request); + /** + * Upgrade shape request for mount target. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpgradeShapeMountTarget API. + */ + UpgradeShapeMountTargetResponse upgradeShapeMountTarget(UpgradeShapeMountTargetRequest request); + /** * Validates keytab contents for the secret details passed on the request or validte keytab contents associated with * the mount target passed in the request. The keytabs are deserialized, the contents are validated for compatibility diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageAsync.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageAsync.java index 954d30ffdeb..e2ba513374c 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageAsync.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageAsync.java @@ -60,6 +60,137 @@ public interface FileStorageAsync extends AutoCloseable { */ void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + /** + * Adds a lock to a resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future addExportLock( + AddExportLockRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Adds a lock to a resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future addFileSystemLock( + AddFileSystemLockRequest request, + com.oracle.bmc.responses.AsyncHandler< + AddFileSystemLockRequest, AddFileSystemLockResponse> + handler); + + /** + * Adds a lock to a resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + addFilesystemSnapshotPolicyLock( + AddFilesystemSnapshotPolicyLockRequest request, + com.oracle.bmc.responses.AsyncHandler< + AddFilesystemSnapshotPolicyLockRequest, + AddFilesystemSnapshotPolicyLockResponse> + handler); + + /** + * Adds a lock to a resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future addMountTargetLock( + AddMountTargetLockRequest request, + com.oracle.bmc.responses.AsyncHandler< + AddMountTargetLockRequest, AddMountTargetLockResponse> + handler); + + /** + * Adds a lock to a resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future addOutboundConnectorLock( + AddOutboundConnectorLockRequest request, + com.oracle.bmc.responses.AsyncHandler< + AddOutboundConnectorLockRequest, AddOutboundConnectorLockResponse> + handler); + + /** + * Adds a lock to a resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future addReplicationLock( + AddReplicationLockRequest request, + com.oracle.bmc.responses.AsyncHandler< + AddReplicationLockRequest, AddReplicationLockResponse> + handler); + + /** + * Adds a lock to a resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future addSnapshotLock( + AddSnapshotLockRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Cancel scheduled downgrade shape request for mount target. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + cancelDowngradeShapeMountTarget( + CancelDowngradeShapeMountTargetRequest request, + com.oracle.bmc.responses.AsyncHandler< + CancelDowngradeShapeMountTargetRequest, + CancelDowngradeShapeMountTargetResponse> + handler); + /** * Moves a file system and its associated snapshots into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes) * @@ -523,6 +654,21 @@ java.util.concurrent.Future deleteSnapshot( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Detaches the file system from its parent file system + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future detachClone( + DetachCloneRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + /** * Provides estimates for replication created using specific file system. * @@ -857,6 +1003,138 @@ java.util.concurrent.Future listSnapshots( PauseFilesystemSnapshotPolicyResponse> handler); + /** + * Removes a lock to a resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future removeExportLock( + RemoveExportLockRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Removes a lock to a resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future removeFileSystemLock( + RemoveFileSystemLockRequest request, + com.oracle.bmc.responses.AsyncHandler< + RemoveFileSystemLockRequest, RemoveFileSystemLockResponse> + handler); + + /** + * Removes a lock to a resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + removeFilesystemSnapshotPolicyLock( + RemoveFilesystemSnapshotPolicyLockRequest request, + com.oracle.bmc.responses.AsyncHandler< + RemoveFilesystemSnapshotPolicyLockRequest, + RemoveFilesystemSnapshotPolicyLockResponse> + handler); + + /** + * Removes a lock to a resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future removeMountTargetLock( + RemoveMountTargetLockRequest request, + com.oracle.bmc.responses.AsyncHandler< + RemoveMountTargetLockRequest, RemoveMountTargetLockResponse> + handler); + + /** + * Removes a lock to a resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future removeOutboundConnectorLock( + RemoveOutboundConnectorLockRequest request, + com.oracle.bmc.responses.AsyncHandler< + RemoveOutboundConnectorLockRequest, RemoveOutboundConnectorLockResponse> + handler); + + /** + * Removes a lock to a resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future removeReplicationLock( + RemoveReplicationLockRequest request, + com.oracle.bmc.responses.AsyncHandler< + RemoveReplicationLockRequest, RemoveReplicationLockResponse> + handler); + + /** + * Removes a lock to a resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future removeSnapshotLock( + RemoveSnapshotLockRequest request, + com.oracle.bmc.responses.AsyncHandler< + RemoveSnapshotLockRequest, RemoveSnapshotLockResponse> + handler); + + /** + * Schedule a downgrade shape of the mount target. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + scheduleDowngradeShapeMountTarget( + ScheduleDowngradeShapeMountTargetRequest request, + com.oracle.bmc.responses.AsyncHandler< + ScheduleDowngradeShapeMountTargetRequest, + ScheduleDowngradeShapeMountTargetResponse> + handler); + /** * This operation unpauses a paused file system snapshot policy and updates the lifecycle state of the file system snapshot policy from * INACTIVE to ACTIVE. By default, file system snapshot policies are in the ACTIVE state. When a file system snapshot policy is not paused, or in the ACTIVE state, file systems that are associated with the @@ -1009,6 +1287,23 @@ java.util.concurrent.Future updateSnapshot( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Upgrade shape request for mount target. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future upgradeShapeMountTarget( + UpgradeShapeMountTargetRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpgradeShapeMountTargetRequest, UpgradeShapeMountTargetResponse> + handler); + /** * Validates keytab contents for the secret details passed on the request or validte keytab contents associated with * the mount target passed in the request. The keytabs are deserialized, the contents are validated for compatibility diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageAsyncClient.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageAsyncClient.java index e98d7d2d54e..18b40b462da 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageAsyncClient.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageAsyncClient.java @@ -458,49 +458,42 @@ public void close() { } @Override - public java.util.concurrent.Future - changeFileSystemCompartment( - ChangeFileSystemCompartmentRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ChangeFileSystemCompartmentRequest, - ChangeFileSystemCompartmentResponse> - handler) { - LOG.trace("Called async changeFileSystemCompartment"); - final ChangeFileSystemCompartmentRequest interceptedRequest = - ChangeFileSystemCompartmentConverter.interceptRequest(request); + public java.util.concurrent.Future addExportLock( + AddExportLockRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async addExportLock"); + final AddExportLockRequest interceptedRequest = + AddExportLockConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ChangeFileSystemCompartmentConverter.fromRequest(client, interceptedRequest); + AddExportLockConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "ChangeFileSystemCompartment", + "AddExportLock", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/ChangeFileSystemCompartment"); - final java.util.function.Function< - javax.ws.rs.core.Response, ChangeFileSystemCompartmentResponse> + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Export/AddExportLock"); + final java.util.function.Function transformer = - ChangeFileSystemCompartmentConverter.fromResponse( - java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler< - ChangeFileSystemCompartmentRequest, ChangeFileSystemCompartmentResponse> + AddExportLockConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ChangeFileSystemCompartmentRequest, - ChangeFileSystemCompartmentResponse>, - java.util.concurrent.Future> + AddExportLockRequest, AddExportLockResponse>, + java.util.concurrent.Future> futureSupplier = client.postFutureSupplier( interceptedRequest, - interceptedRequest.getChangeFileSystemCompartmentDetails(), + interceptedRequest.getAddExportLockDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ChangeFileSystemCompartmentRequest, ChangeFileSystemCompartmentResponse>( + AddExportLockRequest, AddExportLockResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -514,55 +507,44 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - changeFilesystemSnapshotPolicyCompartment( - ChangeFilesystemSnapshotPolicyCompartmentRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ChangeFilesystemSnapshotPolicyCompartmentRequest, - ChangeFilesystemSnapshotPolicyCompartmentResponse> - handler) { - LOG.trace("Called async changeFilesystemSnapshotPolicyCompartment"); - final ChangeFilesystemSnapshotPolicyCompartmentRequest interceptedRequest = - ChangeFilesystemSnapshotPolicyCompartmentConverter.interceptRequest(request); + public java.util.concurrent.Future addFileSystemLock( + AddFileSystemLockRequest request, + final com.oracle.bmc.responses.AsyncHandler< + AddFileSystemLockRequest, AddFileSystemLockResponse> + handler) { + LOG.trace("Called async addFileSystemLock"); + final AddFileSystemLockRequest interceptedRequest = + AddFileSystemLockConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ChangeFilesystemSnapshotPolicyCompartmentConverter.fromRequest( - client, interceptedRequest); + AddFileSystemLockConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "ChangeFilesystemSnapshotPolicyCompartment", + "AddFileSystemLock", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/ChangeFilesystemSnapshotPolicyCompartment"); - final java.util.function.Function< - javax.ws.rs.core.Response, - ChangeFilesystemSnapshotPolicyCompartmentResponse> + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/AddFileSystemLock"); + final java.util.function.Function transformer = - ChangeFilesystemSnapshotPolicyCompartmentConverter.fromResponse( + AddFileSystemLockConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler< - ChangeFilesystemSnapshotPolicyCompartmentRequest, - ChangeFilesystemSnapshotPolicyCompartmentResponse> + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ChangeFilesystemSnapshotPolicyCompartmentRequest, - ChangeFilesystemSnapshotPolicyCompartmentResponse>, - java.util.concurrent.Future< - ChangeFilesystemSnapshotPolicyCompartmentResponse>> + AddFileSystemLockRequest, AddFileSystemLockResponse>, + java.util.concurrent.Future> futureSupplier = client.postFutureSupplier( interceptedRequest, - interceptedRequest - .getChangeFilesystemSnapshotPolicyCompartmentDetails(), + interceptedRequest.getAddFileSystemLockDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ChangeFilesystemSnapshotPolicyCompartmentRequest, - ChangeFilesystemSnapshotPolicyCompartmentResponse>( + AddFileSystemLockRequest, AddFileSystemLockResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -576,49 +558,51 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - changeMountTargetCompartment( - ChangeMountTargetCompartmentRequest request, + public java.util.concurrent.Future + addFilesystemSnapshotPolicyLock( + AddFilesystemSnapshotPolicyLockRequest request, final com.oracle.bmc.responses.AsyncHandler< - ChangeMountTargetCompartmentRequest, - ChangeMountTargetCompartmentResponse> + AddFilesystemSnapshotPolicyLockRequest, + AddFilesystemSnapshotPolicyLockResponse> handler) { - LOG.trace("Called async changeMountTargetCompartment"); - final ChangeMountTargetCompartmentRequest interceptedRequest = - ChangeMountTargetCompartmentConverter.interceptRequest(request); + LOG.trace("Called async addFilesystemSnapshotPolicyLock"); + final AddFilesystemSnapshotPolicyLockRequest interceptedRequest = + AddFilesystemSnapshotPolicyLockConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ChangeMountTargetCompartmentConverter.fromRequest(client, interceptedRequest); + AddFilesystemSnapshotPolicyLockConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "ChangeMountTargetCompartment", + "AddFilesystemSnapshotPolicyLock", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/ChangeMountTargetCompartment"); + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/AddFilesystemSnapshotPolicyLock"); final java.util.function.Function< - javax.ws.rs.core.Response, ChangeMountTargetCompartmentResponse> + javax.ws.rs.core.Response, AddFilesystemSnapshotPolicyLockResponse> transformer = - ChangeMountTargetCompartmentConverter.fromResponse( + AddFilesystemSnapshotPolicyLockConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - ChangeMountTargetCompartmentRequest, ChangeMountTargetCompartmentResponse> + AddFilesystemSnapshotPolicyLockRequest, + AddFilesystemSnapshotPolicyLockResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ChangeMountTargetCompartmentRequest, - ChangeMountTargetCompartmentResponse>, - java.util.concurrent.Future> + AddFilesystemSnapshotPolicyLockRequest, + AddFilesystemSnapshotPolicyLockResponse>, + java.util.concurrent.Future> futureSupplier = client.postFutureSupplier( interceptedRequest, - interceptedRequest.getChangeMountTargetCompartmentDetails(), + interceptedRequest.getAddFilesystemSnapshotPolicyLockDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ChangeMountTargetCompartmentRequest, ChangeMountTargetCompartmentResponse>( + AddFilesystemSnapshotPolicyLockRequest, + AddFilesystemSnapshotPolicyLockResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -632,51 +616,44 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - changeOutboundConnectorCompartment( - ChangeOutboundConnectorCompartmentRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ChangeOutboundConnectorCompartmentRequest, - ChangeOutboundConnectorCompartmentResponse> - handler) { - LOG.trace("Called async changeOutboundConnectorCompartment"); - final ChangeOutboundConnectorCompartmentRequest interceptedRequest = - ChangeOutboundConnectorCompartmentConverter.interceptRequest(request); + public java.util.concurrent.Future addMountTargetLock( + AddMountTargetLockRequest request, + final com.oracle.bmc.responses.AsyncHandler< + AddMountTargetLockRequest, AddMountTargetLockResponse> + handler) { + LOG.trace("Called async addMountTargetLock"); + final AddMountTargetLockRequest interceptedRequest = + AddMountTargetLockConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ChangeOutboundConnectorCompartmentConverter.fromRequest(client, interceptedRequest); + AddMountTargetLockConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "ChangeOutboundConnectorCompartment", + "AddMountTargetLock", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/ChangeOutboundConnectorCompartment"); - final java.util.function.Function< - javax.ws.rs.core.Response, ChangeOutboundConnectorCompartmentResponse> + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/AddMountTargetLock"); + final java.util.function.Function transformer = - ChangeOutboundConnectorCompartmentConverter.fromResponse( + AddMountTargetLockConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler< - ChangeOutboundConnectorCompartmentRequest, - ChangeOutboundConnectorCompartmentResponse> + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ChangeOutboundConnectorCompartmentRequest, - ChangeOutboundConnectorCompartmentResponse>, - java.util.concurrent.Future> + AddMountTargetLockRequest, AddMountTargetLockResponse>, + java.util.concurrent.Future> futureSupplier = client.postFutureSupplier( interceptedRequest, - interceptedRequest.getChangeOutboundConnectorCompartmentDetails(), + interceptedRequest.getAddMountTargetLockDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ChangeOutboundConnectorCompartmentRequest, - ChangeOutboundConnectorCompartmentResponse>( + AddMountTargetLockRequest, AddMountTargetLockResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -690,49 +667,46 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - changeReplicationCompartment( - ChangeReplicationCompartmentRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ChangeReplicationCompartmentRequest, - ChangeReplicationCompartmentResponse> - handler) { - LOG.trace("Called async changeReplicationCompartment"); - final ChangeReplicationCompartmentRequest interceptedRequest = - ChangeReplicationCompartmentConverter.interceptRequest(request); + public java.util.concurrent.Future addOutboundConnectorLock( + AddOutboundConnectorLockRequest request, + final com.oracle.bmc.responses.AsyncHandler< + AddOutboundConnectorLockRequest, AddOutboundConnectorLockResponse> + handler) { + LOG.trace("Called async addOutboundConnectorLock"); + final AddOutboundConnectorLockRequest interceptedRequest = + AddOutboundConnectorLockConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ChangeReplicationCompartmentConverter.fromRequest(client, interceptedRequest); + AddOutboundConnectorLockConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "ChangeReplicationCompartment", + "AddOutboundConnectorLock", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/ChangeReplicationCompartment"); + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/AddOutboundConnectorLock"); final java.util.function.Function< - javax.ws.rs.core.Response, ChangeReplicationCompartmentResponse> + javax.ws.rs.core.Response, AddOutboundConnectorLockResponse> transformer = - ChangeReplicationCompartmentConverter.fromResponse( + AddOutboundConnectorLockConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - ChangeReplicationCompartmentRequest, ChangeReplicationCompartmentResponse> + AddOutboundConnectorLockRequest, AddOutboundConnectorLockResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ChangeReplicationCompartmentRequest, - ChangeReplicationCompartmentResponse>, - java.util.concurrent.Future> + AddOutboundConnectorLockRequest, AddOutboundConnectorLockResponse>, + java.util.concurrent.Future> futureSupplier = client.postFutureSupplier( interceptedRequest, - interceptedRequest.getChangeReplicationCompartmentDetails(), + interceptedRequest.getAddOutboundConnectorLockDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ChangeReplicationCompartmentRequest, ChangeReplicationCompartmentResponse>( + AddOutboundConnectorLockRequest, AddOutboundConnectorLockResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -746,43 +720,44 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future createExport( - CreateExportRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future addReplicationLock( + AddReplicationLockRequest request, + final com.oracle.bmc.responses.AsyncHandler< + AddReplicationLockRequest, AddReplicationLockResponse> handler) { - LOG.trace("Called async createExport"); - final CreateExportRequest interceptedRequest = - CreateExportConverter.interceptRequest(request); + LOG.trace("Called async addReplicationLock"); + final AddReplicationLockRequest interceptedRequest = + AddReplicationLockConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateExportConverter.fromRequest(client, interceptedRequest); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + AddReplicationLockConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "CreateExport", + "AddReplicationLock", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Export/CreateExport"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/AddReplicationLock"); + final java.util.function.Function transformer = - CreateExportConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + AddReplicationLockConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - CreateExportRequest, CreateExportResponse>, - java.util.concurrent.Future> + AddReplicationLockRequest, AddReplicationLockResponse>, + java.util.concurrent.Future> futureSupplier = client.postFutureSupplier( interceptedRequest, - interceptedRequest.getCreateExportDetails(), + interceptedRequest.getAddReplicationLockDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - CreateExportRequest, CreateExportResponse>( + AddReplicationLockRequest, AddReplicationLockResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -796,45 +771,44 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future createFileSystem( - CreateFileSystemRequest request, + public java.util.concurrent.Future addSnapshotLock( + AddSnapshotLockRequest request, final com.oracle.bmc.responses.AsyncHandler< - CreateFileSystemRequest, CreateFileSystemResponse> + AddSnapshotLockRequest, AddSnapshotLockResponse> handler) { - LOG.trace("Called async createFileSystem"); - final CreateFileSystemRequest interceptedRequest = - CreateFileSystemConverter.interceptRequest(request); + LOG.trace("Called async addSnapshotLock"); + final AddSnapshotLockRequest interceptedRequest = + AddSnapshotLockConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateFileSystemConverter.fromRequest(client, interceptedRequest); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + AddSnapshotLockConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "CreateFileSystem", + "AddSnapshotLock", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/CreateFileSystem"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Snapshot/AddSnapshotLock"); + final java.util.function.Function transformer = - CreateFileSystemConverter.fromResponse( + AddSnapshotLockConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - CreateFileSystemRequest, CreateFileSystemResponse>, - java.util.concurrent.Future> + AddSnapshotLockRequest, AddSnapshotLockResponse>, + java.util.concurrent.Future> futureSupplier = client.postFutureSupplier( interceptedRequest, - interceptedRequest.getCreateFileSystemDetails(), + interceptedRequest.getAddSnapshotLockDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - CreateFileSystemRequest, CreateFileSystemResponse>( + AddSnapshotLockRequest, AddSnapshotLockResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -848,51 +822,46 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - createFilesystemSnapshotPolicy( - CreateFilesystemSnapshotPolicyRequest request, + public java.util.concurrent.Future + cancelDowngradeShapeMountTarget( + CancelDowngradeShapeMountTargetRequest request, final com.oracle.bmc.responses.AsyncHandler< - CreateFilesystemSnapshotPolicyRequest, - CreateFilesystemSnapshotPolicyResponse> + CancelDowngradeShapeMountTargetRequest, + CancelDowngradeShapeMountTargetResponse> handler) { - LOG.trace("Called async createFilesystemSnapshotPolicy"); - final CreateFilesystemSnapshotPolicyRequest interceptedRequest = - CreateFilesystemSnapshotPolicyConverter.interceptRequest(request); + LOG.trace("Called async cancelDowngradeShapeMountTarget"); + final CancelDowngradeShapeMountTargetRequest interceptedRequest = + CancelDowngradeShapeMountTargetConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateFilesystemSnapshotPolicyConverter.fromRequest(client, interceptedRequest); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + CancelDowngradeShapeMountTargetConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "CreateFilesystemSnapshotPolicy", + "CancelDowngradeShapeMountTarget", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/CreateFilesystemSnapshotPolicy"); + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/CancelDowngradeShapeMountTarget"); final java.util.function.Function< - javax.ws.rs.core.Response, CreateFilesystemSnapshotPolicyResponse> + javax.ws.rs.core.Response, CancelDowngradeShapeMountTargetResponse> transformer = - CreateFilesystemSnapshotPolicyConverter.fromResponse( + CancelDowngradeShapeMountTargetConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - CreateFilesystemSnapshotPolicyRequest, - CreateFilesystemSnapshotPolicyResponse> + CancelDowngradeShapeMountTargetRequest, + CancelDowngradeShapeMountTargetResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - CreateFilesystemSnapshotPolicyRequest, - CreateFilesystemSnapshotPolicyResponse>, - java.util.concurrent.Future> - futureSupplier = - client.postFutureSupplier( - interceptedRequest, - interceptedRequest.getCreateFilesystemSnapshotPolicyDetails(), - ib, - transformer); + CancelDowngradeShapeMountTargetRequest, + CancelDowngradeShapeMountTargetResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - CreateFilesystemSnapshotPolicyRequest, CreateFilesystemSnapshotPolicyResponse>( + CancelDowngradeShapeMountTargetRequest, + CancelDowngradeShapeMountTargetResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -906,45 +875,49 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future createMountTarget( - CreateMountTargetRequest request, - final com.oracle.bmc.responses.AsyncHandler< - CreateMountTargetRequest, CreateMountTargetResponse> - handler) { - LOG.trace("Called async createMountTarget"); - final CreateMountTargetRequest interceptedRequest = - CreateMountTargetConverter.interceptRequest(request); + public java.util.concurrent.Future + changeFileSystemCompartment( + ChangeFileSystemCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeFileSystemCompartmentRequest, + ChangeFileSystemCompartmentResponse> + handler) { + LOG.trace("Called async changeFileSystemCompartment"); + final ChangeFileSystemCompartmentRequest interceptedRequest = + ChangeFileSystemCompartmentConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateMountTargetConverter.fromRequest(client, interceptedRequest); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + ChangeFileSystemCompartmentConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "CreateMountTarget", + "ChangeFileSystemCompartment", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/CreateMountTarget"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/ChangeFileSystemCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeFileSystemCompartmentResponse> transformer = - CreateMountTargetConverter.fromResponse( + ChangeFileSystemCompartmentConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + ChangeFileSystemCompartmentRequest, ChangeFileSystemCompartmentResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - CreateMountTargetRequest, CreateMountTargetResponse>, - java.util.concurrent.Future> + ChangeFileSystemCompartmentRequest, + ChangeFileSystemCompartmentResponse>, + java.util.concurrent.Future> futureSupplier = client.postFutureSupplier( interceptedRequest, - interceptedRequest.getCreateMountTargetDetails(), + interceptedRequest.getChangeFileSystemCompartmentDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - CreateMountTargetRequest, CreateMountTargetResponse>( + ChangeFileSystemCompartmentRequest, ChangeFileSystemCompartmentResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -958,47 +931,876 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future createOutboundConnector( - CreateOutboundConnectorRequest request, - final com.oracle.bmc.responses.AsyncHandler< - CreateOutboundConnectorRequest, CreateOutboundConnectorResponse> - handler) { - LOG.trace("Called async createOutboundConnector"); - final CreateOutboundConnectorRequest interceptedRequest = - CreateOutboundConnectorConverter.interceptRequest(request); + public java.util.concurrent.Future + changeFilesystemSnapshotPolicyCompartment( + ChangeFilesystemSnapshotPolicyCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeFilesystemSnapshotPolicyCompartmentRequest, + ChangeFilesystemSnapshotPolicyCompartmentResponse> + handler) { + LOG.trace("Called async changeFilesystemSnapshotPolicyCompartment"); + final ChangeFilesystemSnapshotPolicyCompartmentRequest interceptedRequest = + ChangeFilesystemSnapshotPolicyCompartmentConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateOutboundConnectorConverter.fromRequest(client, interceptedRequest); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + ChangeFilesystemSnapshotPolicyCompartmentConverter.fromRequest( + client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "CreateOutboundConnector", + "ChangeFilesystemSnapshotPolicyCompartment", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/CreateOutboundConnector"); + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/ChangeFilesystemSnapshotPolicyCompartment"); final java.util.function.Function< - javax.ws.rs.core.Response, CreateOutboundConnectorResponse> + javax.ws.rs.core.Response, + ChangeFilesystemSnapshotPolicyCompartmentResponse> transformer = - CreateOutboundConnectorConverter.fromResponse( + ChangeFilesystemSnapshotPolicyCompartmentConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - CreateOutboundConnectorRequest, CreateOutboundConnectorResponse> + ChangeFilesystemSnapshotPolicyCompartmentRequest, + ChangeFilesystemSnapshotPolicyCompartmentResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - CreateOutboundConnectorRequest, CreateOutboundConnectorResponse>, - java.util.concurrent.Future> + ChangeFilesystemSnapshotPolicyCompartmentRequest, + ChangeFilesystemSnapshotPolicyCompartmentResponse>, + java.util.concurrent.Future< + ChangeFilesystemSnapshotPolicyCompartmentResponse>> futureSupplier = client.postFutureSupplier( interceptedRequest, - interceptedRequest.getCreateOutboundConnectorDetails(), + interceptedRequest + .getChangeFilesystemSnapshotPolicyCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeFilesystemSnapshotPolicyCompartmentRequest, + ChangeFilesystemSnapshotPolicyCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + changeMountTargetCompartment( + ChangeMountTargetCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeMountTargetCompartmentRequest, + ChangeMountTargetCompartmentResponse> + handler) { + LOG.trace("Called async changeMountTargetCompartment"); + final ChangeMountTargetCompartmentRequest interceptedRequest = + ChangeMountTargetCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeMountTargetCompartmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "ChangeMountTargetCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/ChangeMountTargetCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeMountTargetCompartmentResponse> + transformer = + ChangeMountTargetCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeMountTargetCompartmentRequest, ChangeMountTargetCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeMountTargetCompartmentRequest, + ChangeMountTargetCompartmentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeMountTargetCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeMountTargetCompartmentRequest, ChangeMountTargetCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + changeOutboundConnectorCompartment( + ChangeOutboundConnectorCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeOutboundConnectorCompartmentRequest, + ChangeOutboundConnectorCompartmentResponse> + handler) { + LOG.trace("Called async changeOutboundConnectorCompartment"); + final ChangeOutboundConnectorCompartmentRequest interceptedRequest = + ChangeOutboundConnectorCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeOutboundConnectorCompartmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "ChangeOutboundConnectorCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/ChangeOutboundConnectorCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeOutboundConnectorCompartmentResponse> + transformer = + ChangeOutboundConnectorCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeOutboundConnectorCompartmentRequest, + ChangeOutboundConnectorCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeOutboundConnectorCompartmentRequest, + ChangeOutboundConnectorCompartmentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeOutboundConnectorCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeOutboundConnectorCompartmentRequest, + ChangeOutboundConnectorCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + changeReplicationCompartment( + ChangeReplicationCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeReplicationCompartmentRequest, + ChangeReplicationCompartmentResponse> + handler) { + LOG.trace("Called async changeReplicationCompartment"); + final ChangeReplicationCompartmentRequest interceptedRequest = + ChangeReplicationCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeReplicationCompartmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "ChangeReplicationCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/ChangeReplicationCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeReplicationCompartmentResponse> + transformer = + ChangeReplicationCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeReplicationCompartmentRequest, ChangeReplicationCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeReplicationCompartmentRequest, + ChangeReplicationCompartmentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeReplicationCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeReplicationCompartmentRequest, ChangeReplicationCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createExport( + CreateExportRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async createExport"); + final CreateExportRequest interceptedRequest = + CreateExportConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateExportConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "CreateExport", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Export/CreateExport"); + final java.util.function.Function + transformer = + CreateExportConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateExportRequest, CreateExportResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateExportDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - CreateOutboundConnectorRequest, CreateOutboundConnectorResponse>( + CreateExportRequest, CreateExportResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createFileSystem( + CreateFileSystemRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateFileSystemRequest, CreateFileSystemResponse> + handler) { + LOG.trace("Called async createFileSystem"); + final CreateFileSystemRequest interceptedRequest = + CreateFileSystemConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateFileSystemConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "CreateFileSystem", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/CreateFileSystem"); + final java.util.function.Function + transformer = + CreateFileSystemConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateFileSystemRequest, CreateFileSystemResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateFileSystemDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateFileSystemRequest, CreateFileSystemResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + createFilesystemSnapshotPolicy( + CreateFilesystemSnapshotPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateFilesystemSnapshotPolicyRequest, + CreateFilesystemSnapshotPolicyResponse> + handler) { + LOG.trace("Called async createFilesystemSnapshotPolicy"); + final CreateFilesystemSnapshotPolicyRequest interceptedRequest = + CreateFilesystemSnapshotPolicyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateFilesystemSnapshotPolicyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "CreateFilesystemSnapshotPolicy", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/CreateFilesystemSnapshotPolicy"); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateFilesystemSnapshotPolicyResponse> + transformer = + CreateFilesystemSnapshotPolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateFilesystemSnapshotPolicyRequest, + CreateFilesystemSnapshotPolicyResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateFilesystemSnapshotPolicyRequest, + CreateFilesystemSnapshotPolicyResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateFilesystemSnapshotPolicyDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateFilesystemSnapshotPolicyRequest, CreateFilesystemSnapshotPolicyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createMountTarget( + CreateMountTargetRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateMountTargetRequest, CreateMountTargetResponse> + handler) { + LOG.trace("Called async createMountTarget"); + final CreateMountTargetRequest interceptedRequest = + CreateMountTargetConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateMountTargetConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "CreateMountTarget", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/CreateMountTarget"); + final java.util.function.Function + transformer = + CreateMountTargetConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateMountTargetRequest, CreateMountTargetResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateMountTargetDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateMountTargetRequest, CreateMountTargetResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createOutboundConnector( + CreateOutboundConnectorRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateOutboundConnectorRequest, CreateOutboundConnectorResponse> + handler) { + LOG.trace("Called async createOutboundConnector"); + final CreateOutboundConnectorRequest interceptedRequest = + CreateOutboundConnectorConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateOutboundConnectorConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "CreateOutboundConnector", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/CreateOutboundConnector"); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateOutboundConnectorResponse> + transformer = + CreateOutboundConnectorConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateOutboundConnectorRequest, CreateOutboundConnectorResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateOutboundConnectorRequest, CreateOutboundConnectorResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateOutboundConnectorDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateOutboundConnectorRequest, CreateOutboundConnectorResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createReplication( + CreateReplicationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateReplicationRequest, CreateReplicationResponse> + handler) { + LOG.trace("Called async createReplication"); + final CreateReplicationRequest interceptedRequest = + CreateReplicationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateReplicationConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "CreateReplication", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/CreateReplication"); + final java.util.function.Function + transformer = + CreateReplicationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateReplicationRequest, CreateReplicationResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateReplicationDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateReplicationRequest, CreateReplicationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createSnapshot( + CreateSnapshotRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateSnapshotRequest, CreateSnapshotResponse> + handler) { + LOG.trace("Called async createSnapshot"); + final CreateSnapshotRequest interceptedRequest = + CreateSnapshotConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateSnapshotConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "CreateSnapshot", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Snapshot/CreateSnapshot"); + final java.util.function.Function + transformer = + CreateSnapshotConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateSnapshotRequest, CreateSnapshotResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateSnapshotDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateSnapshotRequest, CreateSnapshotResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteExport( + DeleteExportRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async deleteExport"); + final DeleteExportRequest interceptedRequest = + DeleteExportConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteExportConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "DeleteExport", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Export/DeleteExport"); + final java.util.function.Function + transformer = + DeleteExportConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteExportRequest, DeleteExportResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteExportRequest, DeleteExportResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteFileSystem( + DeleteFileSystemRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteFileSystemRequest, DeleteFileSystemResponse> + handler) { + LOG.trace("Called async deleteFileSystem"); + final DeleteFileSystemRequest interceptedRequest = + DeleteFileSystemConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteFileSystemConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "DeleteFileSystem", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/DeleteFileSystem"); + final java.util.function.Function + transformer = + DeleteFileSystemConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteFileSystemRequest, DeleteFileSystemResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteFileSystemRequest, DeleteFileSystemResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + deleteFilesystemSnapshotPolicy( + DeleteFilesystemSnapshotPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteFilesystemSnapshotPolicyRequest, + DeleteFilesystemSnapshotPolicyResponse> + handler) { + LOG.trace("Called async deleteFilesystemSnapshotPolicy"); + final DeleteFilesystemSnapshotPolicyRequest interceptedRequest = + DeleteFilesystemSnapshotPolicyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteFilesystemSnapshotPolicyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "DeleteFilesystemSnapshotPolicy", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/DeleteFilesystemSnapshotPolicy"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteFilesystemSnapshotPolicyResponse> + transformer = + DeleteFilesystemSnapshotPolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteFilesystemSnapshotPolicyRequest, + DeleteFilesystemSnapshotPolicyResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteFilesystemSnapshotPolicyRequest, + DeleteFilesystemSnapshotPolicyResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteFilesystemSnapshotPolicyRequest, DeleteFilesystemSnapshotPolicyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteMountTarget( + DeleteMountTargetRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteMountTargetRequest, DeleteMountTargetResponse> + handler) { + LOG.trace("Called async deleteMountTarget"); + final DeleteMountTargetRequest interceptedRequest = + DeleteMountTargetConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteMountTargetConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "DeleteMountTarget", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/DeleteMountTarget"); + final java.util.function.Function + transformer = + DeleteMountTargetConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteMountTargetRequest, DeleteMountTargetResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteMountTargetRequest, DeleteMountTargetResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteOutboundConnector( + DeleteOutboundConnectorRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteOutboundConnectorRequest, DeleteOutboundConnectorResponse> + handler) { + LOG.trace("Called async deleteOutboundConnector"); + final DeleteOutboundConnectorRequest interceptedRequest = + DeleteOutboundConnectorConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteOutboundConnectorConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "DeleteOutboundConnector", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/DeleteOutboundConnector"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteOutboundConnectorResponse> + transformer = + DeleteOutboundConnectorConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteOutboundConnectorRequest, DeleteOutboundConnectorResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteOutboundConnectorRequest, DeleteOutboundConnectorResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteOutboundConnectorRequest, DeleteOutboundConnectorResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteReplication( + DeleteReplicationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteReplicationRequest, DeleteReplicationResponse> + handler) { + LOG.trace("Called async deleteReplication"); + final DeleteReplicationRequest interceptedRequest = + DeleteReplicationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteReplicationConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "DeleteReplication", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/DeleteReplication"); + final java.util.function.Function + transformer = + DeleteReplicationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteReplicationRequest, DeleteReplicationResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteReplicationRequest, DeleteReplicationResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1012,45 +1814,41 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future createReplication( - CreateReplicationRequest request, + public java.util.concurrent.Future deleteReplicationTarget( + DeleteReplicationTargetRequest request, final com.oracle.bmc.responses.AsyncHandler< - CreateReplicationRequest, CreateReplicationResponse> + DeleteReplicationTargetRequest, DeleteReplicationTargetResponse> handler) { - LOG.trace("Called async createReplication"); - final CreateReplicationRequest interceptedRequest = - CreateReplicationConverter.interceptRequest(request); + LOG.trace("Called async deleteReplicationTarget"); + final DeleteReplicationTargetRequest interceptedRequest = + DeleteReplicationTargetConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateReplicationConverter.fromRequest(client, interceptedRequest); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + DeleteReplicationTargetConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "CreateReplication", + "DeleteReplicationTarget", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/CreateReplication"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ReplicationTarget/DeleteReplicationTarget"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteReplicationTargetResponse> transformer = - CreateReplicationConverter.fromResponse( + DeleteReplicationTargetConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + DeleteReplicationTargetRequest, DeleteReplicationTargetResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - CreateReplicationRequest, CreateReplicationResponse>, - java.util.concurrent.Future> - futureSupplier = - client.postFutureSupplier( - interceptedRequest, - interceptedRequest.getCreateReplicationDetails(), - ib, - transformer); + DeleteReplicationTargetRequest, DeleteReplicationTargetResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - CreateReplicationRequest, CreateReplicationResponse>( + DeleteReplicationTargetRequest, DeleteReplicationTargetResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1064,44 +1862,38 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future createSnapshot( - CreateSnapshotRequest request, + public java.util.concurrent.Future deleteSnapshot( + DeleteSnapshotRequest request, final com.oracle.bmc.responses.AsyncHandler< - CreateSnapshotRequest, CreateSnapshotResponse> + DeleteSnapshotRequest, DeleteSnapshotResponse> handler) { - LOG.trace("Called async createSnapshot"); - final CreateSnapshotRequest interceptedRequest = - CreateSnapshotConverter.interceptRequest(request); + LOG.trace("Called async deleteSnapshot"); + final DeleteSnapshotRequest interceptedRequest = + DeleteSnapshotConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateSnapshotConverter.fromRequest(client, interceptedRequest); - com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + DeleteSnapshotConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "CreateSnapshot", + "DeleteSnapshot", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Snapshot/CreateSnapshot"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Snapshot/DeleteSnapshot"); + final java.util.function.Function transformer = - CreateSnapshotConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + DeleteSnapshotConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - CreateSnapshotRequest, CreateSnapshotResponse>, - java.util.concurrent.Future> - futureSupplier = - client.postFutureSupplier( - interceptedRequest, - interceptedRequest.getCreateSnapshotDetails(), - ib, - transformer); + DeleteSnapshotRequest, DeleteSnapshotResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - CreateSnapshotRequest, CreateSnapshotResponse>( + DeleteSnapshotRequest, DeleteSnapshotResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1115,37 +1907,37 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future deleteExport( - DeleteExportRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future detachClone( + DetachCloneRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async deleteExport"); - final DeleteExportRequest interceptedRequest = - DeleteExportConverter.interceptRequest(request); + LOG.trace("Called async detachClone"); + final DetachCloneRequest interceptedRequest = + DetachCloneConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteExportConverter.fromRequest(client, interceptedRequest); + DetachCloneConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "DeleteExport", + "DetachClone", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Export/DeleteExport"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/DetachClone"); + final java.util.function.Function transformer = - DeleteExportConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + DetachCloneConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - DeleteExportRequest, DeleteExportResponse>, - java.util.concurrent.Future> - futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + DetachCloneRequest, DetachCloneResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - DeleteExportRequest, DeleteExportResponse>( + DetachCloneRequest, DetachCloneResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1159,39 +1951,40 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future deleteFileSystem( - DeleteFileSystemRequest request, + public java.util.concurrent.Future estimateReplication( + EstimateReplicationRequest request, final com.oracle.bmc.responses.AsyncHandler< - DeleteFileSystemRequest, DeleteFileSystemResponse> + EstimateReplicationRequest, EstimateReplicationResponse> handler) { - LOG.trace("Called async deleteFileSystem"); - final DeleteFileSystemRequest interceptedRequest = - DeleteFileSystemConverter.interceptRequest(request); + LOG.trace("Called async estimateReplication"); + final EstimateReplicationRequest interceptedRequest = + EstimateReplicationConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteFileSystemConverter.fromRequest(client, interceptedRequest); + EstimateReplicationConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "DeleteFileSystem", + "EstimateReplication", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/DeleteFileSystem"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/EstimateReplication"); + final java.util.function.Function transformer = - DeleteFileSystemConverter.fromResponse( + EstimateReplicationConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + EstimateReplicationRequest, EstimateReplicationResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - DeleteFileSystemRequest, DeleteFileSystemResponse>, - java.util.concurrent.Future> - futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + EstimateReplicationRequest, EstimateReplicationResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - DeleteFileSystemRequest, DeleteFileSystemResponse>( + EstimateReplicationRequest, EstimateReplicationResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1205,45 +1998,35 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - deleteFilesystemSnapshotPolicy( - DeleteFilesystemSnapshotPolicyRequest request, - final com.oracle.bmc.responses.AsyncHandler< - DeleteFilesystemSnapshotPolicyRequest, - DeleteFilesystemSnapshotPolicyResponse> - handler) { - LOG.trace("Called async deleteFilesystemSnapshotPolicy"); - final DeleteFilesystemSnapshotPolicyRequest interceptedRequest = - DeleteFilesystemSnapshotPolicyConverter.interceptRequest(request); + public java.util.concurrent.Future getExport( + GetExportRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getExport"); + final GetExportRequest interceptedRequest = GetExportConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteFilesystemSnapshotPolicyConverter.fromRequest(client, interceptedRequest); + GetExportConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "DeleteFilesystemSnapshotPolicy", + "GetExport", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/DeleteFilesystemSnapshotPolicy"); - final java.util.function.Function< - javax.ws.rs.core.Response, DeleteFilesystemSnapshotPolicyResponse> + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Export/GetExport"); + final java.util.function.Function transformer = - DeleteFilesystemSnapshotPolicyConverter.fromResponse( - java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler< - DeleteFilesystemSnapshotPolicyRequest, - DeleteFilesystemSnapshotPolicyResponse> - handlerToUse = handler; + GetExportConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; java.util.function.Function< - com.oracle.bmc.responses.AsyncHandler< - DeleteFilesystemSnapshotPolicyRequest, - DeleteFilesystemSnapshotPolicyResponse>, - java.util.concurrent.Future> - futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + com.oracle.bmc.responses.AsyncHandler, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - DeleteFilesystemSnapshotPolicyRequest, DeleteFilesystemSnapshotPolicyResponse>( + GetExportRequest, GetExportResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1257,39 +2040,37 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future deleteMountTarget( - DeleteMountTargetRequest request, - final com.oracle.bmc.responses.AsyncHandler< - DeleteMountTargetRequest, DeleteMountTargetResponse> + public java.util.concurrent.Future getExportSet( + GetExportSetRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async deleteMountTarget"); - final DeleteMountTargetRequest interceptedRequest = - DeleteMountTargetConverter.interceptRequest(request); + LOG.trace("Called async getExportSet"); + final GetExportSetRequest interceptedRequest = + GetExportSetConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteMountTargetConverter.fromRequest(client, interceptedRequest); + GetExportSetConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "DeleteMountTarget", + "GetExportSet", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/DeleteMountTarget"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ExportSet/GetExportSet"); + final java.util.function.Function transformer = - DeleteMountTargetConverter.fromResponse( - java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + GetExportSetConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - DeleteMountTargetRequest, DeleteMountTargetResponse>, - java.util.concurrent.Future> - futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + GetExportSetRequest, GetExportSetResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - DeleteMountTargetRequest, DeleteMountTargetResponse>( + GetExportSetRequest, GetExportSetResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1303,41 +2084,88 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future deleteOutboundConnector( - DeleteOutboundConnectorRequest request, - final com.oracle.bmc.responses.AsyncHandler< - DeleteOutboundConnectorRequest, DeleteOutboundConnectorResponse> + public java.util.concurrent.Future getFileSystem( + GetFileSystemRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async deleteOutboundConnector"); - final DeleteOutboundConnectorRequest interceptedRequest = - DeleteOutboundConnectorConverter.interceptRequest(request); + LOG.trace("Called async getFileSystem"); + final GetFileSystemRequest interceptedRequest = + GetFileSystemConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetFileSystemConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "GetFileSystem", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/GetFileSystem"); + final java.util.function.Function + transformer = + GetFileSystemConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetFileSystemRequest, GetFileSystemResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetFileSystemRequest, GetFileSystemResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getFilesystemSnapshotPolicy( + GetFilesystemSnapshotPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetFilesystemSnapshotPolicyRequest, + GetFilesystemSnapshotPolicyResponse> + handler) { + LOG.trace("Called async getFilesystemSnapshotPolicy"); + final GetFilesystemSnapshotPolicyRequest interceptedRequest = + GetFilesystemSnapshotPolicyConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteOutboundConnectorConverter.fromRequest(client, interceptedRequest); + GetFilesystemSnapshotPolicyConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "DeleteOutboundConnector", + "GetFilesystemSnapshotPolicy", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/DeleteOutboundConnector"); + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/GetFilesystemSnapshotPolicy"); final java.util.function.Function< - javax.ws.rs.core.Response, DeleteOutboundConnectorResponse> + javax.ws.rs.core.Response, GetFilesystemSnapshotPolicyResponse> transformer = - DeleteOutboundConnectorConverter.fromResponse( + GetFilesystemSnapshotPolicyConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - DeleteOutboundConnectorRequest, DeleteOutboundConnectorResponse> + GetFilesystemSnapshotPolicyRequest, GetFilesystemSnapshotPolicyResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - DeleteOutboundConnectorRequest, DeleteOutboundConnectorResponse>, - java.util.concurrent.Future> - futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + GetFilesystemSnapshotPolicyRequest, + GetFilesystemSnapshotPolicyResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - DeleteOutboundConnectorRequest, DeleteOutboundConnectorResponse>( + GetFilesystemSnapshotPolicyRequest, GetFilesystemSnapshotPolicyResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1351,39 +2179,38 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future deleteReplication( - DeleteReplicationRequest request, + public java.util.concurrent.Future getMountTarget( + GetMountTargetRequest request, final com.oracle.bmc.responses.AsyncHandler< - DeleteReplicationRequest, DeleteReplicationResponse> + GetMountTargetRequest, GetMountTargetResponse> handler) { - LOG.trace("Called async deleteReplication"); - final DeleteReplicationRequest interceptedRequest = - DeleteReplicationConverter.interceptRequest(request); + LOG.trace("Called async getMountTarget"); + final GetMountTargetRequest interceptedRequest = + GetMountTargetConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteReplicationConverter.fromRequest(client, interceptedRequest); + GetMountTargetConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "DeleteReplication", + "GetMountTarget", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/DeleteReplication"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/GetMountTarget"); + final java.util.function.Function transformer = - DeleteReplicationConverter.fromResponse( - java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + GetMountTargetConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - DeleteReplicationRequest, DeleteReplicationResponse>, - java.util.concurrent.Future> - futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + GetMountTargetRequest, GetMountTargetResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - DeleteReplicationRequest, DeleteReplicationResponse>( + GetMountTargetRequest, GetMountTargetResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1397,41 +2224,40 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future deleteReplicationTarget( - DeleteReplicationTargetRequest request, + public java.util.concurrent.Future getOutboundConnector( + GetOutboundConnectorRequest request, final com.oracle.bmc.responses.AsyncHandler< - DeleteReplicationTargetRequest, DeleteReplicationTargetResponse> + GetOutboundConnectorRequest, GetOutboundConnectorResponse> handler) { - LOG.trace("Called async deleteReplicationTarget"); - final DeleteReplicationTargetRequest interceptedRequest = - DeleteReplicationTargetConverter.interceptRequest(request); + LOG.trace("Called async getOutboundConnector"); + final GetOutboundConnectorRequest interceptedRequest = + GetOutboundConnectorConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteReplicationTargetConverter.fromRequest(client, interceptedRequest); + GetOutboundConnectorConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "DeleteReplicationTarget", + "GetOutboundConnector", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ReplicationTarget/DeleteReplicationTarget"); - final java.util.function.Function< - javax.ws.rs.core.Response, DeleteReplicationTargetResponse> + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/GetOutboundConnector"); + final java.util.function.Function transformer = - DeleteReplicationTargetConverter.fromResponse( + GetOutboundConnectorConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - DeleteReplicationTargetRequest, DeleteReplicationTargetResponse> + GetOutboundConnectorRequest, GetOutboundConnectorResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - DeleteReplicationTargetRequest, DeleteReplicationTargetResponse>, - java.util.concurrent.Future> - futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + GetOutboundConnectorRequest, GetOutboundConnectorResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - DeleteReplicationTargetRequest, DeleteReplicationTargetResponse>( + GetOutboundConnectorRequest, GetOutboundConnectorResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1445,38 +2271,38 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future deleteSnapshot( - DeleteSnapshotRequest request, + public java.util.concurrent.Future getReplication( + GetReplicationRequest request, final com.oracle.bmc.responses.AsyncHandler< - DeleteSnapshotRequest, DeleteSnapshotResponse> + GetReplicationRequest, GetReplicationResponse> handler) { - LOG.trace("Called async deleteSnapshot"); - final DeleteSnapshotRequest interceptedRequest = - DeleteSnapshotConverter.interceptRequest(request); + LOG.trace("Called async getReplication"); + final GetReplicationRequest interceptedRequest = + GetReplicationConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteSnapshotConverter.fromRequest(client, interceptedRequest); + GetReplicationConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "DeleteSnapshot", + "GetReplication", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Snapshot/DeleteSnapshot"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/GetReplication"); + final java.util.function.Function transformer = - DeleteSnapshotConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + GetReplicationConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - DeleteSnapshotRequest, DeleteSnapshotResponse>, - java.util.concurrent.Future> - futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + GetReplicationRequest, GetReplicationResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - DeleteSnapshotRequest, DeleteSnapshotResponse>( + GetReplicationRequest, GetReplicationResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1490,40 +2316,40 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future estimateReplication( - EstimateReplicationRequest request, + public java.util.concurrent.Future getReplicationTarget( + GetReplicationTargetRequest request, final com.oracle.bmc.responses.AsyncHandler< - EstimateReplicationRequest, EstimateReplicationResponse> + GetReplicationTargetRequest, GetReplicationTargetResponse> handler) { - LOG.trace("Called async estimateReplication"); - final EstimateReplicationRequest interceptedRequest = - EstimateReplicationConverter.interceptRequest(request); + LOG.trace("Called async getReplicationTarget"); + final GetReplicationTargetRequest interceptedRequest = + GetReplicationTargetConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - EstimateReplicationConverter.fromRequest(client, interceptedRequest); + GetReplicationTargetConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "EstimateReplication", + "GetReplicationTarget", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/EstimateReplication"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ReplicationTarget/GetReplicationTarget"); + final java.util.function.Function transformer = - EstimateReplicationConverter.fromResponse( + GetReplicationTargetConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - EstimateReplicationRequest, EstimateReplicationResponse> + GetReplicationTargetRequest, GetReplicationTargetResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - EstimateReplicationRequest, EstimateReplicationResponse>, - java.util.concurrent.Future> - futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + GetReplicationTargetRequest, GetReplicationTargetResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - EstimateReplicationRequest, EstimateReplicationResponse>( + GetReplicationTargetRequest, GetReplicationTargetResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1537,35 +2363,37 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future getExport( - GetExportRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future getSnapshot( + GetSnapshotRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async getExport"); - final GetExportRequest interceptedRequest = GetExportConverter.interceptRequest(request); + LOG.trace("Called async getSnapshot"); + final GetSnapshotRequest interceptedRequest = + GetSnapshotConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetExportConverter.fromRequest(client, interceptedRequest); + GetSnapshotConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "GetExport", + "GetSnapshot", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Export/GetExport"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Snapshot/GetSnapshot"); + final java.util.function.Function transformer = - GetExportConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler handlerToUse = - handler; + GetSnapshotConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; java.util.function.Function< - com.oracle.bmc.responses.AsyncHandler, - java.util.concurrent.Future> + com.oracle.bmc.responses.AsyncHandler< + GetSnapshotRequest, GetSnapshotResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetExportRequest, GetExportResponse>( + GetSnapshotRequest, GetSnapshotResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1579,37 +2407,38 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future getExportSet( - GetExportSetRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future listExportSets( + ListExportSetsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListExportSetsRequest, ListExportSetsResponse> handler) { - LOG.trace("Called async getExportSet"); - final GetExportSetRequest interceptedRequest = - GetExportSetConverter.interceptRequest(request); + LOG.trace("Called async listExportSets"); + final ListExportSetsRequest interceptedRequest = + ListExportSetsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetExportSetConverter.fromRequest(client, interceptedRequest); + ListExportSetsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "GetExportSet", + "ListExportSets", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ExportSet/GetExportSet"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ExportSetSummary/ListExportSets"); + final java.util.function.Function transformer = - GetExportSetConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + ListExportSetsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetExportSetRequest, GetExportSetResponse>, - java.util.concurrent.Future> + ListExportSetsRequest, ListExportSetsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetExportSetRequest, GetExportSetResponse>( + ListExportSetsRequest, ListExportSetsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1623,37 +2452,37 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future getFileSystem( - GetFileSystemRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future listExports( + ListExportsRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async getFileSystem"); - final GetFileSystemRequest interceptedRequest = - GetFileSystemConverter.interceptRequest(request); + LOG.trace("Called async listExports"); + final ListExportsRequest interceptedRequest = + ListExportsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetFileSystemConverter.fromRequest(client, interceptedRequest); + ListExportsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "GetFileSystem", + "ListExports", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/GetFileSystem"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ExportSummary/ListExports"); + final java.util.function.Function transformer = - GetFileSystemConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + ListExportsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetFileSystemRequest, GetFileSystemResponse>, - java.util.concurrent.Future> + ListExportsRequest, ListExportsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetFileSystemRequest, GetFileSystemResponse>( + ListExportsRequest, ListExportsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1667,44 +2496,39 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - getFilesystemSnapshotPolicy( - GetFilesystemSnapshotPolicyRequest request, - final com.oracle.bmc.responses.AsyncHandler< - GetFilesystemSnapshotPolicyRequest, - GetFilesystemSnapshotPolicyResponse> - handler) { - LOG.trace("Called async getFilesystemSnapshotPolicy"); - final GetFilesystemSnapshotPolicyRequest interceptedRequest = - GetFilesystemSnapshotPolicyConverter.interceptRequest(request); + public java.util.concurrent.Future listFileSystems( + ListFileSystemsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListFileSystemsRequest, ListFileSystemsResponse> + handler) { + LOG.trace("Called async listFileSystems"); + final ListFileSystemsRequest interceptedRequest = + ListFileSystemsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetFilesystemSnapshotPolicyConverter.fromRequest(client, interceptedRequest); + ListFileSystemsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "GetFilesystemSnapshotPolicy", + "ListFileSystems", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/GetFilesystemSnapshotPolicy"); - final java.util.function.Function< - javax.ws.rs.core.Response, GetFilesystemSnapshotPolicyResponse> + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystemSummary/ListFileSystems"); + final java.util.function.Function transformer = - GetFilesystemSnapshotPolicyConverter.fromResponse( + ListFileSystemsConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler< - GetFilesystemSnapshotPolicyRequest, GetFilesystemSnapshotPolicyResponse> + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetFilesystemSnapshotPolicyRequest, - GetFilesystemSnapshotPolicyResponse>, - java.util.concurrent.Future> + ListFileSystemsRequest, ListFileSystemsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetFilesystemSnapshotPolicyRequest, GetFilesystemSnapshotPolicyResponse>( + ListFileSystemsRequest, ListFileSystemsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1718,38 +2542,45 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future getMountTarget( - GetMountTargetRequest request, - final com.oracle.bmc.responses.AsyncHandler< - GetMountTargetRequest, GetMountTargetResponse> - handler) { - LOG.trace("Called async getMountTarget"); - final GetMountTargetRequest interceptedRequest = - GetMountTargetConverter.interceptRequest(request); + public java.util.concurrent.Future + listFilesystemSnapshotPolicies( + ListFilesystemSnapshotPoliciesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListFilesystemSnapshotPoliciesRequest, + ListFilesystemSnapshotPoliciesResponse> + handler) { + LOG.trace("Called async listFilesystemSnapshotPolicies"); + final ListFilesystemSnapshotPoliciesRequest interceptedRequest = + ListFilesystemSnapshotPoliciesConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetMountTargetConverter.fromRequest(client, interceptedRequest); + ListFilesystemSnapshotPoliciesConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "GetMountTarget", + "ListFilesystemSnapshotPolicies", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/GetMountTarget"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicySummary/ListFilesystemSnapshotPolicies"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListFilesystemSnapshotPoliciesResponse> transformer = - GetMountTargetConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + ListFilesystemSnapshotPoliciesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListFilesystemSnapshotPoliciesRequest, + ListFilesystemSnapshotPoliciesResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetMountTargetRequest, GetMountTargetResponse>, - java.util.concurrent.Future> + ListFilesystemSnapshotPoliciesRequest, + ListFilesystemSnapshotPoliciesResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetMountTargetRequest, GetMountTargetResponse>( + ListFilesystemSnapshotPoliciesRequest, ListFilesystemSnapshotPoliciesResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1763,40 +2594,39 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future getOutboundConnector( - GetOutboundConnectorRequest request, + public java.util.concurrent.Future listMountTargets( + ListMountTargetsRequest request, final com.oracle.bmc.responses.AsyncHandler< - GetOutboundConnectorRequest, GetOutboundConnectorResponse> + ListMountTargetsRequest, ListMountTargetsResponse> handler) { - LOG.trace("Called async getOutboundConnector"); - final GetOutboundConnectorRequest interceptedRequest = - GetOutboundConnectorConverter.interceptRequest(request); + LOG.trace("Called async listMountTargets"); + final ListMountTargetsRequest interceptedRequest = + ListMountTargetsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetOutboundConnectorConverter.fromRequest(client, interceptedRequest); + ListMountTargetsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "GetOutboundConnector", + "ListMountTargets", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/GetOutboundConnector"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTargetSummary/ListMountTargets"); + final java.util.function.Function transformer = - GetOutboundConnectorConverter.fromResponse( + ListMountTargetsConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler< - GetOutboundConnectorRequest, GetOutboundConnectorResponse> + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetOutboundConnectorRequest, GetOutboundConnectorResponse>, - java.util.concurrent.Future> + ListMountTargetsRequest, ListMountTargetsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetOutboundConnectorRequest, GetOutboundConnectorResponse>( + ListMountTargetsRequest, ListMountTargetsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1810,38 +2640,40 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future getReplication( - GetReplicationRequest request, + public java.util.concurrent.Future listOutboundConnectors( + ListOutboundConnectorsRequest request, final com.oracle.bmc.responses.AsyncHandler< - GetReplicationRequest, GetReplicationResponse> + ListOutboundConnectorsRequest, ListOutboundConnectorsResponse> handler) { - LOG.trace("Called async getReplication"); - final GetReplicationRequest interceptedRequest = - GetReplicationConverter.interceptRequest(request); + LOG.trace("Called async listOutboundConnectors"); + final ListOutboundConnectorsRequest interceptedRequest = + ListOutboundConnectorsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetReplicationConverter.fromRequest(client, interceptedRequest); + ListOutboundConnectorsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "GetReplication", + "ListOutboundConnectors", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/GetReplication"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnectorSummary/ListOutboundConnectors"); + final java.util.function.Function transformer = - GetReplicationConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + ListOutboundConnectorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListOutboundConnectorsRequest, ListOutboundConnectorsResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetReplicationRequest, GetReplicationResponse>, - java.util.concurrent.Future> + ListOutboundConnectorsRequest, ListOutboundConnectorsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetReplicationRequest, GetReplicationResponse>( + ListOutboundConnectorsRequest, ListOutboundConnectorsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1855,40 +2687,40 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future getReplicationTarget( - GetReplicationTargetRequest request, + public java.util.concurrent.Future listReplicationTargets( + ListReplicationTargetsRequest request, final com.oracle.bmc.responses.AsyncHandler< - GetReplicationTargetRequest, GetReplicationTargetResponse> + ListReplicationTargetsRequest, ListReplicationTargetsResponse> handler) { - LOG.trace("Called async getReplicationTarget"); - final GetReplicationTargetRequest interceptedRequest = - GetReplicationTargetConverter.interceptRequest(request); + LOG.trace("Called async listReplicationTargets"); + final ListReplicationTargetsRequest interceptedRequest = + ListReplicationTargetsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetReplicationTargetConverter.fromRequest(client, interceptedRequest); + ListReplicationTargetsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "GetReplicationTarget", + "ListReplicationTargets", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ReplicationTarget/GetReplicationTarget"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ReplicationTargetSummary/ListReplicationTargets"); + final java.util.function.Function transformer = - GetReplicationTargetConverter.fromResponse( + ListReplicationTargetsConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - GetReplicationTargetRequest, GetReplicationTargetResponse> + ListReplicationTargetsRequest, ListReplicationTargetsResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetReplicationTargetRequest, GetReplicationTargetResponse>, - java.util.concurrent.Future> + ListReplicationTargetsRequest, ListReplicationTargetsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetReplicationTargetRequest, GetReplicationTargetResponse>( + ListReplicationTargetsRequest, ListReplicationTargetsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1902,37 +2734,39 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future getSnapshot( - GetSnapshotRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future listReplications( + ListReplicationsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListReplicationsRequest, ListReplicationsResponse> handler) { - LOG.trace("Called async getSnapshot"); - final GetSnapshotRequest interceptedRequest = - GetSnapshotConverter.interceptRequest(request); + LOG.trace("Called async listReplications"); + final ListReplicationsRequest interceptedRequest = + ListReplicationsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetSnapshotConverter.fromRequest(client, interceptedRequest); + ListReplicationsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "GetSnapshot", + "ListReplications", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Snapshot/GetSnapshot"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ReplicationSummary/ListReplications"); + final java.util.function.Function transformer = - GetSnapshotConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + ListReplicationsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - GetSnapshotRequest, GetSnapshotResponse>, - java.util.concurrent.Future> + ListReplicationsRequest, ListReplicationsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - GetSnapshotRequest, GetSnapshotResponse>( + ListReplicationsRequest, ListReplicationsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1946,38 +2780,37 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listExportSets( - ListExportSetsRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ListExportSetsRequest, ListExportSetsResponse> + public java.util.concurrent.Future listSnapshots( + ListSnapshotsRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async listExportSets"); - final ListExportSetsRequest interceptedRequest = - ListExportSetsConverter.interceptRequest(request); + LOG.trace("Called async listSnapshots"); + final ListSnapshotsRequest interceptedRequest = + ListSnapshotsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListExportSetsConverter.fromRequest(client, interceptedRequest); + ListSnapshotsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "ListExportSets", + "ListSnapshots", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ExportSetSummary/ListExportSets"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/SnapshotSummary/ListSnapshots"); + final java.util.function.Function transformer = - ListExportSetsConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + ListSnapshotsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListExportSetsRequest, ListExportSetsResponse>, - java.util.concurrent.Future> + ListSnapshotsRequest, ListSnapshotsResponse>, + java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListExportSetsRequest, ListExportSetsResponse>( + ListSnapshotsRequest, ListSnapshotsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -1991,37 +2824,44 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listExports( - ListExportsRequest request, - final com.oracle.bmc.responses.AsyncHandler - handler) { - LOG.trace("Called async listExports"); - final ListExportsRequest interceptedRequest = - ListExportsConverter.interceptRequest(request); + public java.util.concurrent.Future + pauseFilesystemSnapshotPolicy( + PauseFilesystemSnapshotPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + PauseFilesystemSnapshotPolicyRequest, + PauseFilesystemSnapshotPolicyResponse> + handler) { + LOG.trace("Called async pauseFilesystemSnapshotPolicy"); + final PauseFilesystemSnapshotPolicyRequest interceptedRequest = + PauseFilesystemSnapshotPolicyConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListExportsConverter.fromRequest(client, interceptedRequest); + PauseFilesystemSnapshotPolicyConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "ListExports", + "PauseFilesystemSnapshotPolicy", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ExportSummary/ListExports"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/PauseFilesystemSnapshotPolicy"); + final java.util.function.Function< + javax.ws.rs.core.Response, PauseFilesystemSnapshotPolicyResponse> transformer = - ListExportsConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + PauseFilesystemSnapshotPolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + PauseFilesystemSnapshotPolicyRequest, PauseFilesystemSnapshotPolicyResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListExportsRequest, ListExportsResponse>, - java.util.concurrent.Future> - futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + PauseFilesystemSnapshotPolicyRequest, + PauseFilesystemSnapshotPolicyResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListExportsRequest, ListExportsResponse>( + PauseFilesystemSnapshotPolicyRequest, PauseFilesystemSnapshotPolicyResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -2035,39 +2875,44 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listFileSystems( - ListFileSystemsRequest request, + public java.util.concurrent.Future removeExportLock( + RemoveExportLockRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListFileSystemsRequest, ListFileSystemsResponse> + RemoveExportLockRequest, RemoveExportLockResponse> handler) { - LOG.trace("Called async listFileSystems"); - final ListFileSystemsRequest interceptedRequest = - ListFileSystemsConverter.interceptRequest(request); + LOG.trace("Called async removeExportLock"); + final RemoveExportLockRequest interceptedRequest = + RemoveExportLockConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListFileSystemsConverter.fromRequest(client, interceptedRequest); + RemoveExportLockConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "ListFileSystems", + "RemoveExportLock", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystemSummary/ListFileSystems"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Export/RemoveExportLock"); + final java.util.function.Function transformer = - ListFileSystemsConverter.fromResponse( + RemoveExportLockConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListFileSystemsRequest, ListFileSystemsResponse>, - java.util.concurrent.Future> - futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + RemoveExportLockRequest, RemoveExportLockResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRemoveExportLockDetails(), + ib, + transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListFileSystemsRequest, ListFileSystemsResponse>( + RemoveExportLockRequest, RemoveExportLockResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -2081,45 +2926,45 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - listFilesystemSnapshotPolicies( - ListFilesystemSnapshotPoliciesRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ListFilesystemSnapshotPoliciesRequest, - ListFilesystemSnapshotPoliciesResponse> - handler) { - LOG.trace("Called async listFilesystemSnapshotPolicies"); - final ListFilesystemSnapshotPoliciesRequest interceptedRequest = - ListFilesystemSnapshotPoliciesConverter.interceptRequest(request); + public java.util.concurrent.Future removeFileSystemLock( + RemoveFileSystemLockRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RemoveFileSystemLockRequest, RemoveFileSystemLockResponse> + handler) { + LOG.trace("Called async removeFileSystemLock"); + final RemoveFileSystemLockRequest interceptedRequest = + RemoveFileSystemLockConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListFilesystemSnapshotPoliciesConverter.fromRequest(client, interceptedRequest); + RemoveFileSystemLockConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "ListFilesystemSnapshotPolicies", + "RemoveFileSystemLock", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicySummary/ListFilesystemSnapshotPolicies"); - final java.util.function.Function< - javax.ws.rs.core.Response, ListFilesystemSnapshotPoliciesResponse> + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/RemoveFileSystemLock"); + final java.util.function.Function transformer = - ListFilesystemSnapshotPoliciesConverter.fromResponse( + RemoveFileSystemLockConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - ListFilesystemSnapshotPoliciesRequest, - ListFilesystemSnapshotPoliciesResponse> + RemoveFileSystemLockRequest, RemoveFileSystemLockResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListFilesystemSnapshotPoliciesRequest, - ListFilesystemSnapshotPoliciesResponse>, - java.util.concurrent.Future> - futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + RemoveFileSystemLockRequest, RemoveFileSystemLockResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRemoveFileSystemLockDetails(), + ib, + transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListFilesystemSnapshotPoliciesRequest, ListFilesystemSnapshotPoliciesResponse>( + RemoveFileSystemLockRequest, RemoveFileSystemLockResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -2133,39 +2978,51 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listMountTargets( - ListMountTargetsRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ListMountTargetsRequest, ListMountTargetsResponse> - handler) { - LOG.trace("Called async listMountTargets"); - final ListMountTargetsRequest interceptedRequest = - ListMountTargetsConverter.interceptRequest(request); + public java.util.concurrent.Future + removeFilesystemSnapshotPolicyLock( + RemoveFilesystemSnapshotPolicyLockRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RemoveFilesystemSnapshotPolicyLockRequest, + RemoveFilesystemSnapshotPolicyLockResponse> + handler) { + LOG.trace("Called async removeFilesystemSnapshotPolicyLock"); + final RemoveFilesystemSnapshotPolicyLockRequest interceptedRequest = + RemoveFilesystemSnapshotPolicyLockConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListMountTargetsConverter.fromRequest(client, interceptedRequest); + RemoveFilesystemSnapshotPolicyLockConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "ListMountTargets", + "RemoveFilesystemSnapshotPolicyLock", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTargetSummary/ListMountTargets"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/RemoveFilesystemSnapshotPolicyLock"); + final java.util.function.Function< + javax.ws.rs.core.Response, RemoveFilesystemSnapshotPolicyLockResponse> transformer = - ListMountTargetsConverter.fromResponse( + RemoveFilesystemSnapshotPolicyLockConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + RemoveFilesystemSnapshotPolicyLockRequest, + RemoveFilesystemSnapshotPolicyLockResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListMountTargetsRequest, ListMountTargetsResponse>, - java.util.concurrent.Future> - futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + RemoveFilesystemSnapshotPolicyLockRequest, + RemoveFilesystemSnapshotPolicyLockResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRemoveFilesystemSnapshotPolicyLockDetails(), + ib, + transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListMountTargetsRequest, ListMountTargetsResponse>( + RemoveFilesystemSnapshotPolicyLockRequest, + RemoveFilesystemSnapshotPolicyLockResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -2179,40 +3036,45 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listOutboundConnectors( - ListOutboundConnectorsRequest request, + public java.util.concurrent.Future removeMountTargetLock( + RemoveMountTargetLockRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListOutboundConnectorsRequest, ListOutboundConnectorsResponse> + RemoveMountTargetLockRequest, RemoveMountTargetLockResponse> handler) { - LOG.trace("Called async listOutboundConnectors"); - final ListOutboundConnectorsRequest interceptedRequest = - ListOutboundConnectorsConverter.interceptRequest(request); + LOG.trace("Called async removeMountTargetLock"); + final RemoveMountTargetLockRequest interceptedRequest = + RemoveMountTargetLockConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListOutboundConnectorsConverter.fromRequest(client, interceptedRequest); + RemoveMountTargetLockConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "ListOutboundConnectors", + "RemoveMountTargetLock", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnectorSummary/ListOutboundConnectors"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/RemoveMountTargetLock"); + final java.util.function.Function transformer = - ListOutboundConnectorsConverter.fromResponse( + RemoveMountTargetLockConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - ListOutboundConnectorsRequest, ListOutboundConnectorsResponse> + RemoveMountTargetLockRequest, RemoveMountTargetLockResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListOutboundConnectorsRequest, ListOutboundConnectorsResponse>, - java.util.concurrent.Future> - futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + RemoveMountTargetLockRequest, RemoveMountTargetLockResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRemoveMountTargetLockDetails(), + ib, + transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListOutboundConnectorsRequest, ListOutboundConnectorsResponse>( + RemoveMountTargetLockRequest, RemoveMountTargetLockResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -2226,40 +3088,49 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listReplicationTargets( - ListReplicationTargetsRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ListReplicationTargetsRequest, ListReplicationTargetsResponse> - handler) { - LOG.trace("Called async listReplicationTargets"); - final ListReplicationTargetsRequest interceptedRequest = - ListReplicationTargetsConverter.interceptRequest(request); + public java.util.concurrent.Future + removeOutboundConnectorLock( + RemoveOutboundConnectorLockRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RemoveOutboundConnectorLockRequest, + RemoveOutboundConnectorLockResponse> + handler) { + LOG.trace("Called async removeOutboundConnectorLock"); + final RemoveOutboundConnectorLockRequest interceptedRequest = + RemoveOutboundConnectorLockConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListReplicationTargetsConverter.fromRequest(client, interceptedRequest); + RemoveOutboundConnectorLockConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "ListReplicationTargets", + "RemoveOutboundConnectorLock", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ReplicationTargetSummary/ListReplicationTargets"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/RemoveOutboundConnectorLock"); + final java.util.function.Function< + javax.ws.rs.core.Response, RemoveOutboundConnectorLockResponse> transformer = - ListReplicationTargetsConverter.fromResponse( + RemoveOutboundConnectorLockConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - ListReplicationTargetsRequest, ListReplicationTargetsResponse> + RemoveOutboundConnectorLockRequest, RemoveOutboundConnectorLockResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListReplicationTargetsRequest, ListReplicationTargetsResponse>, - java.util.concurrent.Future> - futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + RemoveOutboundConnectorLockRequest, + RemoveOutboundConnectorLockResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRemoveOutboundConnectorLockDetails(), + ib, + transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListReplicationTargetsRequest, ListReplicationTargetsResponse>( + RemoveOutboundConnectorLockRequest, RemoveOutboundConnectorLockResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -2273,39 +3144,45 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listReplications( - ListReplicationsRequest request, + public java.util.concurrent.Future removeReplicationLock( + RemoveReplicationLockRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListReplicationsRequest, ListReplicationsResponse> + RemoveReplicationLockRequest, RemoveReplicationLockResponse> handler) { - LOG.trace("Called async listReplications"); - final ListReplicationsRequest interceptedRequest = - ListReplicationsConverter.interceptRequest(request); + LOG.trace("Called async removeReplicationLock"); + final RemoveReplicationLockRequest interceptedRequest = + RemoveReplicationLockConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListReplicationsConverter.fromRequest(client, interceptedRequest); + RemoveReplicationLockConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "ListReplications", + "RemoveReplicationLock", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ReplicationSummary/ListReplications"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/RemoveReplicationLock"); + final java.util.function.Function transformer = - ListReplicationsConverter.fromResponse( + RemoveReplicationLockConverter.fromResponse( java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + RemoveReplicationLockRequest, RemoveReplicationLockResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListReplicationsRequest, ListReplicationsResponse>, - java.util.concurrent.Future> - futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + RemoveReplicationLockRequest, RemoveReplicationLockResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRemoveReplicationLockDetails(), + ib, + transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListReplicationsRequest, ListReplicationsResponse>( + RemoveReplicationLockRequest, RemoveReplicationLockResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -2319,37 +3196,44 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future listSnapshots( - ListSnapshotsRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future removeSnapshotLock( + RemoveSnapshotLockRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RemoveSnapshotLockRequest, RemoveSnapshotLockResponse> handler) { - LOG.trace("Called async listSnapshots"); - final ListSnapshotsRequest interceptedRequest = - ListSnapshotsConverter.interceptRequest(request); + LOG.trace("Called async removeSnapshotLock"); + final RemoveSnapshotLockRequest interceptedRequest = + RemoveSnapshotLockConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListSnapshotsConverter.fromRequest(client, interceptedRequest); + RemoveSnapshotLockConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "ListSnapshots", + "RemoveSnapshotLock", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/SnapshotSummary/ListSnapshots"); - final java.util.function.Function + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Snapshot/RemoveSnapshotLock"); + final java.util.function.Function transformer = - ListSnapshotsConverter.fromResponse(java.util.Optional.of(serviceDetails)); - com.oracle.bmc.responses.AsyncHandler + RemoveSnapshotLockConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - ListSnapshotsRequest, ListSnapshotsResponse>, - java.util.concurrent.Future> - futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + RemoveSnapshotLockRequest, RemoveSnapshotLockResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRemoveSnapshotLockDetails(), + ib, + transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - ListSnapshotsRequest, ListSnapshotsResponse>( + RemoveSnapshotLockRequest, RemoveSnapshotLockResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -2363,44 +3247,51 @@ protected void beforeRetryAction() {} } @Override - public java.util.concurrent.Future - pauseFilesystemSnapshotPolicy( - PauseFilesystemSnapshotPolicyRequest request, + public java.util.concurrent.Future + scheduleDowngradeShapeMountTarget( + ScheduleDowngradeShapeMountTargetRequest request, final com.oracle.bmc.responses.AsyncHandler< - PauseFilesystemSnapshotPolicyRequest, - PauseFilesystemSnapshotPolicyResponse> + ScheduleDowngradeShapeMountTargetRequest, + ScheduleDowngradeShapeMountTargetResponse> handler) { - LOG.trace("Called async pauseFilesystemSnapshotPolicy"); - final PauseFilesystemSnapshotPolicyRequest interceptedRequest = - PauseFilesystemSnapshotPolicyConverter.interceptRequest(request); + LOG.trace("Called async scheduleDowngradeShapeMountTarget"); + final ScheduleDowngradeShapeMountTargetRequest interceptedRequest = + ScheduleDowngradeShapeMountTargetConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - PauseFilesystemSnapshotPolicyConverter.fromRequest(client, interceptedRequest); + ScheduleDowngradeShapeMountTargetConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "PauseFilesystemSnapshotPolicy", + "ScheduleDowngradeShapeMountTarget", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/PauseFilesystemSnapshotPolicy"); + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/ScheduleDowngradeShapeMountTarget"); final java.util.function.Function< - javax.ws.rs.core.Response, PauseFilesystemSnapshotPolicyResponse> + javax.ws.rs.core.Response, ScheduleDowngradeShapeMountTargetResponse> transformer = - PauseFilesystemSnapshotPolicyConverter.fromResponse( + ScheduleDowngradeShapeMountTargetConverter.fromResponse( java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler< - PauseFilesystemSnapshotPolicyRequest, PauseFilesystemSnapshotPolicyResponse> + ScheduleDowngradeShapeMountTargetRequest, + ScheduleDowngradeShapeMountTargetResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< - PauseFilesystemSnapshotPolicyRequest, - PauseFilesystemSnapshotPolicyResponse>, - java.util.concurrent.Future> - futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + ScheduleDowngradeShapeMountTargetRequest, + ScheduleDowngradeShapeMountTargetResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getScheduleDowngradeShapeMountTargetDetails(), + ib, + transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< - PauseFilesystemSnapshotPolicyRequest, PauseFilesystemSnapshotPolicyResponse>( + ScheduleDowngradeShapeMountTargetRequest, + ScheduleDowngradeShapeMountTargetResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, @@ -2879,6 +3770,59 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future upgradeShapeMountTarget( + UpgradeShapeMountTargetRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpgradeShapeMountTargetRequest, UpgradeShapeMountTargetResponse> + handler) { + LOG.trace("Called async upgradeShapeMountTarget"); + final UpgradeShapeMountTargetRequest interceptedRequest = + UpgradeShapeMountTargetConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpgradeShapeMountTargetConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "UpgradeShapeMountTarget", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/UpgradeShapeMountTarget"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpgradeShapeMountTargetResponse> + transformer = + UpgradeShapeMountTargetConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpgradeShapeMountTargetRequest, UpgradeShapeMountTargetResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpgradeShapeMountTargetRequest, UpgradeShapeMountTargetResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getUpgradeShapeMountTargetDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpgradeShapeMountTargetRequest, UpgradeShapeMountTargetResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future validateKeyTabs( ValidateKeyTabsRequest request, diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageClient.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageClient.java index 92f083ba703..1eaa399b176 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageClient.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/FileStorageClient.java @@ -547,6 +547,335 @@ public void close() { client.close(); } + @Override + public AddExportLockResponse addExportLock(AddExportLockRequest request) { + LOG.trace("Called addExportLock"); + final AddExportLockRequest interceptedRequest = + AddExportLockConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + AddExportLockConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "AddExportLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Export/AddExportLock"); + java.util.function.Function transformer = + AddExportLockConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getAddExportLockDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public AddFileSystemLockResponse addFileSystemLock(AddFileSystemLockRequest request) { + LOG.trace("Called addFileSystemLock"); + final AddFileSystemLockRequest interceptedRequest = + AddFileSystemLockConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + AddFileSystemLockConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "AddFileSystemLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/AddFileSystemLock"); + java.util.function.Function + transformer = + AddFileSystemLockConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getAddFileSystemLockDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public AddFilesystemSnapshotPolicyLockResponse addFilesystemSnapshotPolicyLock( + AddFilesystemSnapshotPolicyLockRequest request) { + LOG.trace("Called addFilesystemSnapshotPolicyLock"); + final AddFilesystemSnapshotPolicyLockRequest interceptedRequest = + AddFilesystemSnapshotPolicyLockConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + AddFilesystemSnapshotPolicyLockConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "AddFilesystemSnapshotPolicyLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/AddFilesystemSnapshotPolicyLock"); + java.util.function.Function< + javax.ws.rs.core.Response, AddFilesystemSnapshotPolicyLockResponse> + transformer = + AddFilesystemSnapshotPolicyLockConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getAddFilesystemSnapshotPolicyLockDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public AddMountTargetLockResponse addMountTargetLock(AddMountTargetLockRequest request) { + LOG.trace("Called addMountTargetLock"); + final AddMountTargetLockRequest interceptedRequest = + AddMountTargetLockConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + AddMountTargetLockConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "AddMountTargetLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/AddMountTargetLock"); + java.util.function.Function + transformer = + AddMountTargetLockConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getAddMountTargetLockDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public AddOutboundConnectorLockResponse addOutboundConnectorLock( + AddOutboundConnectorLockRequest request) { + LOG.trace("Called addOutboundConnectorLock"); + final AddOutboundConnectorLockRequest interceptedRequest = + AddOutboundConnectorLockConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + AddOutboundConnectorLockConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "AddOutboundConnectorLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/AddOutboundConnectorLock"); + java.util.function.Function + transformer = + AddOutboundConnectorLockConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getAddOutboundConnectorLockDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public AddReplicationLockResponse addReplicationLock(AddReplicationLockRequest request) { + LOG.trace("Called addReplicationLock"); + final AddReplicationLockRequest interceptedRequest = + AddReplicationLockConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + AddReplicationLockConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "AddReplicationLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/AddReplicationLock"); + java.util.function.Function + transformer = + AddReplicationLockConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getAddReplicationLockDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public AddSnapshotLockResponse addSnapshotLock(AddSnapshotLockRequest request) { + LOG.trace("Called addSnapshotLock"); + final AddSnapshotLockRequest interceptedRequest = + AddSnapshotLockConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + AddSnapshotLockConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "AddSnapshotLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Snapshot/AddSnapshotLock"); + java.util.function.Function + transformer = + AddSnapshotLockConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getAddSnapshotLockDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CancelDowngradeShapeMountTargetResponse cancelDowngradeShapeMountTarget( + CancelDowngradeShapeMountTargetRequest request) { + LOG.trace("Called cancelDowngradeShapeMountTarget"); + final CancelDowngradeShapeMountTargetRequest interceptedRequest = + CancelDowngradeShapeMountTargetConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CancelDowngradeShapeMountTargetConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "CancelDowngradeShapeMountTarget", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/CancelDowngradeShapeMountTarget"); + java.util.function.Function< + javax.ws.rs.core.Response, CancelDowngradeShapeMountTargetResponse> + transformer = + CancelDowngradeShapeMountTargetConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeFileSystemCompartmentResponse changeFileSystemCompartment( ChangeFileSystemCompartmentRequest request) { @@ -1366,12 +1695,12 @@ public DeleteSnapshotResponse deleteSnapshot(DeleteSnapshotRequest request) { } @Override - public EstimateReplicationResponse estimateReplication(EstimateReplicationRequest request) { - LOG.trace("Called estimateReplication"); - final EstimateReplicationRequest interceptedRequest = - EstimateReplicationConverter.interceptRequest(request); + public DetachCloneResponse detachClone(DetachCloneRequest request) { + LOG.trace("Called detachClone"); + final DetachCloneRequest interceptedRequest = + DetachCloneConverter.interceptRequest(request); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - EstimateReplicationConverter.fromRequest(client, interceptedRequest); + DetachCloneConverter.fromRequest(client, interceptedRequest); final com.oracle.bmc.retrier.BmcGenericRetrier retrier = com.oracle.bmc.retrier.Retriers.createPreferredRetrier( @@ -1380,11 +1709,47 @@ public EstimateReplicationResponse estimateReplication(EstimateReplicationReques com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( "FileStorage", - "EstimateReplication", + "DetachClone", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/EstimateReplication"); - java.util.function.Function - transformer = + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/DetachClone"); + java.util.function.Function transformer = + DetachCloneConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public EstimateReplicationResponse estimateReplication(EstimateReplicationRequest request) { + LOG.trace("Called estimateReplication"); + final EstimateReplicationRequest interceptedRequest = + EstimateReplicationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + EstimateReplicationConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "EstimateReplication", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/EstimateReplication"); + java.util.function.Function + transformer = EstimateReplicationConverter.fromResponse( java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -2095,6 +2460,344 @@ public PauseFilesystemSnapshotPolicyResponse pauseFilesystemSnapshotPolicy( }); } + @Override + public RemoveExportLockResponse removeExportLock(RemoveExportLockRequest request) { + LOG.trace("Called removeExportLock"); + final RemoveExportLockRequest interceptedRequest = + RemoveExportLockConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RemoveExportLockConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "RemoveExportLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Export/RemoveExportLock"); + java.util.function.Function + transformer = + RemoveExportLockConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getRemoveExportLockDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public RemoveFileSystemLockResponse removeFileSystemLock(RemoveFileSystemLockRequest request) { + LOG.trace("Called removeFileSystemLock"); + final RemoveFileSystemLockRequest interceptedRequest = + RemoveFileSystemLockConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RemoveFileSystemLockConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "RemoveFileSystemLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/RemoveFileSystemLock"); + java.util.function.Function + transformer = + RemoveFileSystemLockConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getRemoveFileSystemLockDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public RemoveFilesystemSnapshotPolicyLockResponse removeFilesystemSnapshotPolicyLock( + RemoveFilesystemSnapshotPolicyLockRequest request) { + LOG.trace("Called removeFilesystemSnapshotPolicyLock"); + final RemoveFilesystemSnapshotPolicyLockRequest interceptedRequest = + RemoveFilesystemSnapshotPolicyLockConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RemoveFilesystemSnapshotPolicyLockConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "RemoveFilesystemSnapshotPolicyLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/RemoveFilesystemSnapshotPolicyLock"); + java.util.function.Function< + javax.ws.rs.core.Response, RemoveFilesystemSnapshotPolicyLockResponse> + transformer = + RemoveFilesystemSnapshotPolicyLockConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getRemoveFilesystemSnapshotPolicyLockDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public RemoveMountTargetLockResponse removeMountTargetLock( + RemoveMountTargetLockRequest request) { + LOG.trace("Called removeMountTargetLock"); + final RemoveMountTargetLockRequest interceptedRequest = + RemoveMountTargetLockConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RemoveMountTargetLockConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "RemoveMountTargetLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/RemoveMountTargetLock"); + java.util.function.Function + transformer = + RemoveMountTargetLockConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getRemoveMountTargetLockDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public RemoveOutboundConnectorLockResponse removeOutboundConnectorLock( + RemoveOutboundConnectorLockRequest request) { + LOG.trace("Called removeOutboundConnectorLock"); + final RemoveOutboundConnectorLockRequest interceptedRequest = + RemoveOutboundConnectorLockConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RemoveOutboundConnectorLockConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "RemoveOutboundConnectorLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/RemoveOutboundConnectorLock"); + java.util.function.Function + transformer = + RemoveOutboundConnectorLockConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getRemoveOutboundConnectorLockDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public RemoveReplicationLockResponse removeReplicationLock( + RemoveReplicationLockRequest request) { + LOG.trace("Called removeReplicationLock"); + final RemoveReplicationLockRequest interceptedRequest = + RemoveReplicationLockConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RemoveReplicationLockConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "RemoveReplicationLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/RemoveReplicationLock"); + java.util.function.Function + transformer = + RemoveReplicationLockConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getRemoveReplicationLockDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public RemoveSnapshotLockResponse removeSnapshotLock(RemoveSnapshotLockRequest request) { + LOG.trace("Called removeSnapshotLock"); + final RemoveSnapshotLockRequest interceptedRequest = + RemoveSnapshotLockConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RemoveSnapshotLockConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "RemoveSnapshotLock", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Snapshot/RemoveSnapshotLock"); + java.util.function.Function + transformer = + RemoveSnapshotLockConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getRemoveSnapshotLockDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ScheduleDowngradeShapeMountTargetResponse scheduleDowngradeShapeMountTarget( + ScheduleDowngradeShapeMountTargetRequest request) { + LOG.trace("Called scheduleDowngradeShapeMountTarget"); + final ScheduleDowngradeShapeMountTargetRequest interceptedRequest = + ScheduleDowngradeShapeMountTargetConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ScheduleDowngradeShapeMountTargetConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "ScheduleDowngradeShapeMountTarget", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/ScheduleDowngradeShapeMountTarget"); + java.util.function.Function< + javax.ws.rs.core.Response, ScheduleDowngradeShapeMountTargetResponse> + transformer = + ScheduleDowngradeShapeMountTargetConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getScheduleDowngradeShapeMountTargetDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UnpauseFilesystemSnapshotPolicyResponse unpauseFilesystemSnapshotPolicy( UnpauseFilesystemSnapshotPolicyRequest request) { @@ -2463,6 +3166,48 @@ public UpdateSnapshotResponse updateSnapshot(UpdateSnapshotRequest request) { }); } + @Override + public UpgradeShapeMountTargetResponse upgradeShapeMountTarget( + UpgradeShapeMountTargetRequest request) { + LOG.trace("Called upgradeShapeMountTarget"); + final UpgradeShapeMountTargetRequest interceptedRequest = + UpgradeShapeMountTargetConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpgradeShapeMountTargetConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FileStorage", + "UpgradeShapeMountTarget", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/UpgradeShapeMountTarget"); + java.util.function.Function + transformer = + UpgradeShapeMountTargetConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getUpgradeShapeMountTargetDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ValidateKeyTabsResponse validateKeyTabs(ValidateKeyTabsRequest request) { LOG.trace("Called validateKeyTabs"); diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/internal/http/UpdatePluginConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddExportLockConverter.java similarity index 71% rename from bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/internal/http/UpdatePluginConverter.java rename to bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddExportLockConverter.java index bccfb6c4182..b8a198a805e 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/internal/http/UpdatePluginConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddExportLockConverter.java @@ -2,48 +2,45 @@ * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ -package com.oracle.bmc.cloudbridge.internal.http; +package com.oracle.bmc.filestorage.internal.http; import com.oracle.bmc.http.internal.ResponseHelper; -import com.oracle.bmc.cloudbridge.model.*; -import com.oracle.bmc.cloudbridge.requests.*; -import com.oracle.bmc.cloudbridge.responses.*; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; import com.oracle.bmc.util.internal.Validate; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") -public class UpdatePluginConverter { +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddExportLockConverter { private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 RESPONSE_CONVERSION_FACTORY = new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); private static final org.slf4j.Logger LOG = - org.slf4j.LoggerFactory.getLogger(UpdatePluginConverter.class); + org.slf4j.LoggerFactory.getLogger(AddExportLockConverter.class); - public static com.oracle.bmc.cloudbridge.requests.UpdatePluginRequest interceptRequest( - com.oracle.bmc.cloudbridge.requests.UpdatePluginRequest request) { + public static com.oracle.bmc.filestorage.requests.AddExportLockRequest interceptRequest( + com.oracle.bmc.filestorage.requests.AddExportLockRequest request) { return request; } public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.http.internal.RestClient client, - com.oracle.bmc.cloudbridge.requests.UpdatePluginRequest request) { + com.oracle.bmc.filestorage.requests.AddExportLockRequest request) { Validate.notNull(request, "request instance is required"); - Validate.notBlank(request.getAgentId(), "agentId must not be blank"); - Validate.notBlank(request.getPluginName(), "pluginName must not be blank"); - Validate.notNull(request.getUpdatePluginDetails(), "updatePluginDetails is required"); + Validate.notBlank(request.getExportId(), "exportId must not be blank"); + Validate.notNull(request.getAddExportLockDetails(), "addExportLockDetails is required"); com.oracle.bmc.http.internal.WrappedWebTarget target = client.getBaseTarget() - .path("/20220509") - .path("agents") + .path("/20171215") + .path("exports") .path( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( - request.getAgentId())) - .path("plugins") - .path( - com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( - request.getPluginName())); + request.getExportId())) + .path("actions") + .path("addLock"); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); @@ -65,57 +62,57 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( public static java.util.function.Function< javax.ws.rs.core.Response, - com.oracle.bmc.cloudbridge.responses.UpdatePluginResponse> + com.oracle.bmc.filestorage.responses.AddExportLockResponse> fromResponse() { return fromResponse(java.util.Optional.empty()); } public static java.util.function.Function< javax.ws.rs.core.Response, - com.oracle.bmc.cloudbridge.responses.UpdatePluginResponse> + com.oracle.bmc.filestorage.responses.AddExportLockResponse> fromResponse(java.util.Optional serviceDetails) { final java.util.function.Function< javax.ws.rs.core.Response, - com.oracle.bmc.cloudbridge.responses.UpdatePluginResponse> + com.oracle.bmc.filestorage.responses.AddExportLockResponse> transformer = new java.util.function.Function< javax.ws.rs.core.Response, - com.oracle.bmc.cloudbridge.responses.UpdatePluginResponse>() { + com.oracle.bmc.filestorage.responses.AddExportLockResponse>() { @Override - public com.oracle.bmc.cloudbridge.responses.UpdatePluginResponse apply( + public com.oracle.bmc.filestorage.responses.AddExportLockResponse apply( javax.ws.rs.core.Response rawResponse) { LOG.trace( - "Transform function invoked for com.oracle.bmc.cloudbridge.responses.UpdatePluginResponse"); + "Transform function invoked for com.oracle.bmc.filestorage.responses.AddExportLockResponse"); final java.util.function.Function< javax.ws.rs.core.Response, com.oracle.bmc.http.internal.WithHeaders< - com.oracle.bmc.cloudbridge.model.Plugin>> + com.oracle.bmc.filestorage.model.Export>> responseFn; if (serviceDetails.isPresent()) { responseFn = RESPONSE_CONVERSION_FACTORY.create( - com.oracle.bmc.cloudbridge.model.Plugin.class, + com.oracle.bmc.filestorage.model.Export.class, serviceDetails.get()); } else { responseFn = RESPONSE_CONVERSION_FACTORY.create( - com.oracle.bmc.cloudbridge.model.Plugin.class); + com.oracle.bmc.filestorage.model.Export.class); } com.oracle.bmc.http.internal.WithHeaders< - com.oracle.bmc.cloudbridge.model.Plugin> + com.oracle.bmc.filestorage.model.Export> response = responseFn.apply(rawResponse); javax.ws.rs.core.MultivaluedMap headers = response.getHeaders(); - com.oracle.bmc.cloudbridge.responses.UpdatePluginResponse.Builder + com.oracle.bmc.filestorage.responses.AddExportLockResponse.Builder builder = - com.oracle.bmc.cloudbridge.responses - .UpdatePluginResponse.builder() + com.oracle.bmc.filestorage.responses + .AddExportLockResponse.builder() .__httpStatusCode__(rawResponse.getStatus()) .headers(headers); - builder.plugin(response.getItem()); + builder.export(response.getItem()); java.util.Optional> etagHeader = com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( @@ -137,7 +134,7 @@ public com.oracle.bmc.cloudbridge.responses.UpdatePluginResponse apply( String.class)); } - com.oracle.bmc.cloudbridge.responses.UpdatePluginResponse + com.oracle.bmc.filestorage.responses.AddExportLockResponse responseWrapper = builder.build(); ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddFileSystemLockConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddFileSystemLockConverter.java new file mode 100644 index 00000000000..fc30e29c6df --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddFileSystemLockConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddFileSystemLockConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(AddFileSystemLockConverter.class); + + public static com.oracle.bmc.filestorage.requests.AddFileSystemLockRequest interceptRequest( + com.oracle.bmc.filestorage.requests.AddFileSystemLockRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.AddFileSystemLockRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFileSystemId(), "fileSystemId must not be blank"); + Validate.notNull( + request.getAddFileSystemLockDetails(), "addFileSystemLockDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("fileSystems") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFileSystemId())) + .path("actions") + .path("addLock"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddFileSystemLockResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddFileSystemLockResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddFileSystemLockResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddFileSystemLockResponse>() { + @Override + public com.oracle.bmc.filestorage.responses.AddFileSystemLockResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.AddFileSystemLockResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model + .FileSystem>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.FileSystem + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.FileSystem + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.FileSystem> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses.AddFileSystemLockResponse + .Builder + builder = + com.oracle.bmc.filestorage.responses + .AddFileSystemLockResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.fileSystem(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.filestorage.responses.AddFileSystemLockResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddFilesystemSnapshotPolicyLockConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddFilesystemSnapshotPolicyLockConverter.java new file mode 100644 index 00000000000..ab655b00948 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddFilesystemSnapshotPolicyLockConverter.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddFilesystemSnapshotPolicyLockConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(AddFilesystemSnapshotPolicyLockConverter.class); + + public static com.oracle.bmc.filestorage.requests.AddFilesystemSnapshotPolicyLockRequest + interceptRequest( + com.oracle.bmc.filestorage.requests.AddFilesystemSnapshotPolicyLockRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.AddFilesystemSnapshotPolicyLockRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getFilesystemSnapshotPolicyId(), + "filesystemSnapshotPolicyId must not be blank"); + Validate.notNull( + request.getAddFilesystemSnapshotPolicyLockDetails(), + "addFilesystemSnapshotPolicyLockDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("filesystemSnapshotPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFilesystemSnapshotPolicyId())) + .path("actions") + .path("addLock"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddFilesystemSnapshotPolicyLockResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddFilesystemSnapshotPolicyLockResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses + .AddFilesystemSnapshotPolicyLockResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses + .AddFilesystemSnapshotPolicyLockResponse>() { + @Override + public com.oracle.bmc.filestorage.responses + .AddFilesystemSnapshotPolicyLockResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.AddFilesystemSnapshotPolicyLockResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model + .FilesystemSnapshotPolicy>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model + .FilesystemSnapshotPolicy + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model + .FilesystemSnapshotPolicy + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model + .FilesystemSnapshotPolicy> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses + .AddFilesystemSnapshotPolicyLockResponse.Builder + builder = + com.oracle.bmc.filestorage.responses + .AddFilesystemSnapshotPolicyLockResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.filesystemSnapshotPolicy(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.filestorage.responses + .AddFilesystemSnapshotPolicyLockResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddMountTargetLockConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddMountTargetLockConverter.java new file mode 100644 index 00000000000..811ca2e5e9e --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddMountTargetLockConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddMountTargetLockConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(AddMountTargetLockConverter.class); + + public static com.oracle.bmc.filestorage.requests.AddMountTargetLockRequest interceptRequest( + com.oracle.bmc.filestorage.requests.AddMountTargetLockRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.AddMountTargetLockRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getMountTargetId(), "mountTargetId must not be blank"); + Validate.notNull( + request.getAddMountTargetLockDetails(), "addMountTargetLockDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("mountTargets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMountTargetId())) + .path("actions") + .path("addLock"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddMountTargetLockResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddMountTargetLockResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddMountTargetLockResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddMountTargetLockResponse>() { + @Override + public com.oracle.bmc.filestorage.responses.AddMountTargetLockResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.AddMountTargetLockResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model + .MountTarget>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.MountTarget + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.MountTarget + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.MountTarget> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses.AddMountTargetLockResponse + .Builder + builder = + com.oracle.bmc.filestorage.responses + .AddMountTargetLockResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.mountTarget(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.filestorage.responses.AddMountTargetLockResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddOutboundConnectorLockConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddOutboundConnectorLockConverter.java new file mode 100644 index 00000000000..6b3936ae686 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddOutboundConnectorLockConverter.java @@ -0,0 +1,159 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddOutboundConnectorLockConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(AddOutboundConnectorLockConverter.class); + + public static com.oracle.bmc.filestorage.requests.AddOutboundConnectorLockRequest + interceptRequest( + com.oracle.bmc.filestorage.requests.AddOutboundConnectorLockRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.AddOutboundConnectorLockRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getOutboundConnectorId(), "outboundConnectorId must not be blank"); + Validate.notNull( + request.getAddOutboundConnectorLockDetails(), + "addOutboundConnectorLockDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("outboundConnectors") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOutboundConnectorId())) + .path("actions") + .path("addLock"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddOutboundConnectorLockResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddOutboundConnectorLockResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddOutboundConnectorLockResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses + .AddOutboundConnectorLockResponse>() { + @Override + public com.oracle.bmc.filestorage.responses + .AddOutboundConnectorLockResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.AddOutboundConnectorLockResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model + .OutboundConnector>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model + .OutboundConnector + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model + .OutboundConnector + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.OutboundConnector> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses + .AddOutboundConnectorLockResponse.Builder + builder = + com.oracle.bmc.filestorage.responses + .AddOutboundConnectorLockResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.outboundConnector(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.filestorage.responses + .AddOutboundConnectorLockResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddReplicationLockConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddReplicationLockConverter.java new file mode 100644 index 00000000000..e23f4049377 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddReplicationLockConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddReplicationLockConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(AddReplicationLockConverter.class); + + public static com.oracle.bmc.filestorage.requests.AddReplicationLockRequest interceptRequest( + com.oracle.bmc.filestorage.requests.AddReplicationLockRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.AddReplicationLockRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getReplicationId(), "replicationId must not be blank"); + Validate.notNull( + request.getAddReplicationLockDetails(), "addReplicationLockDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("replications") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getReplicationId())) + .path("actions") + .path("addLock"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddReplicationLockResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddReplicationLockResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddReplicationLockResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddReplicationLockResponse>() { + @Override + public com.oracle.bmc.filestorage.responses.AddReplicationLockResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.AddReplicationLockResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model + .Replication>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.Replication + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.Replication + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.Replication> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses.AddReplicationLockResponse + .Builder + builder = + com.oracle.bmc.filestorage.responses + .AddReplicationLockResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.replication(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.filestorage.responses.AddReplicationLockResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddSnapshotLockConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddSnapshotLockConverter.java new file mode 100644 index 00000000000..e44ca057b99 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/AddSnapshotLockConverter.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddSnapshotLockConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(AddSnapshotLockConverter.class); + + public static com.oracle.bmc.filestorage.requests.AddSnapshotLockRequest interceptRequest( + com.oracle.bmc.filestorage.requests.AddSnapshotLockRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.AddSnapshotLockRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSnapshotId(), "snapshotId must not be blank"); + Validate.notNull(request.getAddSnapshotLockDetails(), "addSnapshotLockDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("snapshots") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSnapshotId())) + .path("actions") + .path("addLock"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddSnapshotLockResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddSnapshotLockResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddSnapshotLockResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.AddSnapshotLockResponse>() { + @Override + public com.oracle.bmc.filestorage.responses.AddSnapshotLockResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.AddSnapshotLockResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.Snapshot>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.Snapshot.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.Snapshot + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.Snapshot> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses.AddSnapshotLockResponse.Builder + builder = + com.oracle.bmc.filestorage.responses + .AddSnapshotLockResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.snapshot(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.filestorage.responses.AddSnapshotLockResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/CancelDowngradeShapeMountTargetConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/CancelDowngradeShapeMountTargetConverter.java new file mode 100644 index 00000000000..17c10242c1f --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/CancelDowngradeShapeMountTargetConverter.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class CancelDowngradeShapeMountTargetConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CancelDowngradeShapeMountTargetConverter.class); + + public static com.oracle.bmc.filestorage.requests.CancelDowngradeShapeMountTargetRequest + interceptRequest( + com.oracle.bmc.filestorage.requests.CancelDowngradeShapeMountTargetRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.CancelDowngradeShapeMountTargetRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getMountTargetId(), "mountTargetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("mountTargets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMountTargetId())) + .path("actions") + .path("cancelShapeDowngrade"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.CancelDowngradeShapeMountTargetResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.CancelDowngradeShapeMountTargetResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses + .CancelDowngradeShapeMountTargetResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses + .CancelDowngradeShapeMountTargetResponse>() { + @Override + public com.oracle.bmc.filestorage.responses + .CancelDowngradeShapeMountTargetResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.CancelDowngradeShapeMountTargetResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model + .MountTarget>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.MountTarget + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.MountTarget + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.MountTarget> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses + .CancelDowngradeShapeMountTargetResponse.Builder + builder = + com.oracle.bmc.filestorage.responses + .CancelDowngradeShapeMountTargetResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.mountTarget(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.filestorage.responses + .CancelDowngradeShapeMountTargetResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ChangeFileSystemCompartmentConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ChangeFileSystemCompartmentConverter.java index 868be8c3d4a..3b97173fd34 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ChangeFileSystemCompartmentConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ChangeFileSystemCompartmentConverter.java @@ -46,6 +46,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( .path("actions") .path("changeCompartment"); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ChangeFilesystemSnapshotPolicyCompartmentConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ChangeFilesystemSnapshotPolicyCompartmentConverter.java index 40a0de51766..da89ab28cb3 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ChangeFilesystemSnapshotPolicyCompartmentConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ChangeFilesystemSnapshotPolicyCompartmentConverter.java @@ -52,6 +52,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( .path("actions") .path("changeCompartment"); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ChangeMountTargetCompartmentConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ChangeMountTargetCompartmentConverter.java index caa623efc58..ddb685223fc 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ChangeMountTargetCompartmentConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ChangeMountTargetCompartmentConverter.java @@ -46,6 +46,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( .path("actions") .path("changeCompartment"); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ChangeOutboundConnectorCompartmentConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ChangeOutboundConnectorCompartmentConverter.java index 899a01b6328..2a32976b6cc 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ChangeOutboundConnectorCompartmentConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ChangeOutboundConnectorCompartmentConverter.java @@ -47,6 +47,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( .path("actions") .path("changeCompartment"); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ChangeReplicationCompartmentConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ChangeReplicationCompartmentConverter.java index fb0e04bb0fe..08cb1c6e1b9 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ChangeReplicationCompartmentConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ChangeReplicationCompartmentConverter.java @@ -46,6 +46,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( .path("actions") .path("changeCompartment"); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/CreateMountTargetConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/CreateMountTargetConverter.java index 20e460d824d..0b0b44bb383 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/CreateMountTargetConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/CreateMountTargetConverter.java @@ -35,6 +35,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.http.internal.WrappedWebTarget target = client.getBaseTarget().path("/20171215").path("mountTargets"); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteExportConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteExportConverter.java index 5c071b42c9a..b66b0351fb5 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteExportConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteExportConverter.java @@ -39,6 +39,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getExportId())); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteFileSystemConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteFileSystemConverter.java index 0d619196de9..6444b32c6c5 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteFileSystemConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteFileSystemConverter.java @@ -39,6 +39,22 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getFileSystemId())); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + + if (request.getCanDetachChildFileSystem() != null) { + target = + target.queryParam( + "canDetachChildFileSystem", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCanDetachChildFileSystem())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteFilesystemSnapshotPolicyConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteFilesystemSnapshotPolicyConverter.java index cbce3420d4b..f26e3bb7382 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteFilesystemSnapshotPolicyConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteFilesystemSnapshotPolicyConverter.java @@ -43,6 +43,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getFilesystemSnapshotPolicyId())); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteMountTargetConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteMountTargetConverter.java index 1993c5344dd..acf5ebbb663 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteMountTargetConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteMountTargetConverter.java @@ -39,6 +39,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getMountTargetId())); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteOutboundConnectorConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteOutboundConnectorConverter.java index 6ef0907a3d5..dbc9f51d418 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteOutboundConnectorConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteOutboundConnectorConverter.java @@ -41,6 +41,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getOutboundConnectorId())); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteReplicationConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteReplicationConverter.java index 5f85cd2064c..8509d3fb4a1 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteReplicationConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteReplicationConverter.java @@ -47,6 +47,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getDeleteMode().getValue())); } + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteReplicationTargetConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteReplicationTargetConverter.java index f42cb30f325..4ddf85a69e9 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteReplicationTargetConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteReplicationTargetConverter.java @@ -41,6 +41,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getReplicationTargetId())); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteSnapshotConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteSnapshotConverter.java index 947ed497db0..3618c8b6c21 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteSnapshotConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DeleteSnapshotConverter.java @@ -39,6 +39,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getSnapshotId())); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DetachCloneConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DetachCloneConverter.java new file mode 100644 index 00000000000..48623893e87 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/DetachCloneConverter.java @@ -0,0 +1,129 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class DetachCloneConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DetachCloneConverter.class); + + public static com.oracle.bmc.filestorage.requests.DetachCloneRequest interceptRequest( + com.oracle.bmc.filestorage.requests.DetachCloneRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.DetachCloneRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFileSystemId(), "fileSystemId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("fileSystems") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFileSystemId())) + .path("actions") + .path("detachClone"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.DetachCloneResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.DetachCloneResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.DetachCloneResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.DetachCloneResponse>() { + @Override + public com.oracle.bmc.filestorage.responses.DetachCloneResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.DetachCloneResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses.DetachCloneResponse.Builder + builder = + com.oracle.bmc.filestorage.responses + .DetachCloneResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.filestorage.responses.DetachCloneResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/PauseFilesystemSnapshotPolicyConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/PauseFilesystemSnapshotPolicyConverter.java index abd7af9ae19..48dbc3bdcf2 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/PauseFilesystemSnapshotPolicyConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/PauseFilesystemSnapshotPolicyConverter.java @@ -45,6 +45,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( .path("actions") .path("pause"); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveExportLockConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveExportLockConverter.java new file mode 100644 index 00000000000..81bc013e80a --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveExportLockConverter.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveExportLockConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RemoveExportLockConverter.class); + + public static com.oracle.bmc.filestorage.requests.RemoveExportLockRequest interceptRequest( + com.oracle.bmc.filestorage.requests.RemoveExportLockRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.RemoveExportLockRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getExportId(), "exportId must not be blank"); + Validate.notNull( + request.getRemoveExportLockDetails(), "removeExportLockDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("exports") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExportId())) + .path("actions") + .path("removeLock"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveExportLockResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveExportLockResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveExportLockResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveExportLockResponse>() { + @Override + public com.oracle.bmc.filestorage.responses.RemoveExportLockResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.RemoveExportLockResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.Export>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.Export.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.Export.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.Export> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses.RemoveExportLockResponse + .Builder + builder = + com.oracle.bmc.filestorage.responses + .RemoveExportLockResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.export(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.filestorage.responses.RemoveExportLockResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveFileSystemLockConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveFileSystemLockConverter.java new file mode 100644 index 00000000000..7bc839bf54c --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveFileSystemLockConverter.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveFileSystemLockConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RemoveFileSystemLockConverter.class); + + public static com.oracle.bmc.filestorage.requests.RemoveFileSystemLockRequest interceptRequest( + com.oracle.bmc.filestorage.requests.RemoveFileSystemLockRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.RemoveFileSystemLockRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFileSystemId(), "fileSystemId must not be blank"); + Validate.notNull( + request.getRemoveFileSystemLockDetails(), + "removeFileSystemLockDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("fileSystems") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFileSystemId())) + .path("actions") + .path("removeLock"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveFileSystemLockResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveFileSystemLockResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveFileSystemLockResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses + .RemoveFileSystemLockResponse>() { + @Override + public com.oracle.bmc.filestorage.responses.RemoveFileSystemLockResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.RemoveFileSystemLockResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model + .FileSystem>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.FileSystem + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.FileSystem + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.FileSystem> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses.RemoveFileSystemLockResponse + .Builder + builder = + com.oracle.bmc.filestorage.responses + .RemoveFileSystemLockResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.fileSystem(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.filestorage.responses.RemoveFileSystemLockResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveFilesystemSnapshotPolicyLockConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveFilesystemSnapshotPolicyLockConverter.java new file mode 100644 index 00000000000..c60043eda02 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveFilesystemSnapshotPolicyLockConverter.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveFilesystemSnapshotPolicyLockConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RemoveFilesystemSnapshotPolicyLockConverter.class); + + public static com.oracle.bmc.filestorage.requests.RemoveFilesystemSnapshotPolicyLockRequest + interceptRequest( + com.oracle.bmc.filestorage.requests.RemoveFilesystemSnapshotPolicyLockRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.RemoveFilesystemSnapshotPolicyLockRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getFilesystemSnapshotPolicyId(), + "filesystemSnapshotPolicyId must not be blank"); + Validate.notNull( + request.getRemoveFilesystemSnapshotPolicyLockDetails(), + "removeFilesystemSnapshotPolicyLockDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("filesystemSnapshotPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFilesystemSnapshotPolicyId())) + .path("actions") + .path("removeLock"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveFilesystemSnapshotPolicyLockResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveFilesystemSnapshotPolicyLockResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses + .RemoveFilesystemSnapshotPolicyLockResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses + .RemoveFilesystemSnapshotPolicyLockResponse>() { + @Override + public com.oracle.bmc.filestorage.responses + .RemoveFilesystemSnapshotPolicyLockResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.RemoveFilesystemSnapshotPolicyLockResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model + .FilesystemSnapshotPolicy>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model + .FilesystemSnapshotPolicy + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model + .FilesystemSnapshotPolicy + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model + .FilesystemSnapshotPolicy> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses + .RemoveFilesystemSnapshotPolicyLockResponse.Builder + builder = + com.oracle.bmc.filestorage.responses + .RemoveFilesystemSnapshotPolicyLockResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.filesystemSnapshotPolicy(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.filestorage.responses + .RemoveFilesystemSnapshotPolicyLockResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveMountTargetLockConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveMountTargetLockConverter.java new file mode 100644 index 00000000000..81b82f21c71 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveMountTargetLockConverter.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveMountTargetLockConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RemoveMountTargetLockConverter.class); + + public static com.oracle.bmc.filestorage.requests.RemoveMountTargetLockRequest interceptRequest( + com.oracle.bmc.filestorage.requests.RemoveMountTargetLockRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.RemoveMountTargetLockRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getMountTargetId(), "mountTargetId must not be blank"); + Validate.notNull( + request.getRemoveMountTargetLockDetails(), + "removeMountTargetLockDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("mountTargets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMountTargetId())) + .path("actions") + .path("removeLock"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveMountTargetLockResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveMountTargetLockResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveMountTargetLockResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses + .RemoveMountTargetLockResponse>() { + @Override + public com.oracle.bmc.filestorage.responses + .RemoveMountTargetLockResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.RemoveMountTargetLockResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model + .MountTarget>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.MountTarget + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.MountTarget + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.MountTarget> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses.RemoveMountTargetLockResponse + .Builder + builder = + com.oracle.bmc.filestorage.responses + .RemoveMountTargetLockResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.mountTarget(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.filestorage.responses.RemoveMountTargetLockResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveOutboundConnectorLockConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveOutboundConnectorLockConverter.java new file mode 100644 index 00000000000..7a1a3b3113d --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveOutboundConnectorLockConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveOutboundConnectorLockConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RemoveOutboundConnectorLockConverter.class); + + public static com.oracle.bmc.filestorage.requests.RemoveOutboundConnectorLockRequest + interceptRequest( + com.oracle.bmc.filestorage.requests.RemoveOutboundConnectorLockRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.RemoveOutboundConnectorLockRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getOutboundConnectorId(), "outboundConnectorId must not be blank"); + Validate.notNull( + request.getRemoveOutboundConnectorLockDetails(), + "removeOutboundConnectorLockDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("outboundConnectors") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOutboundConnectorId())) + .path("actions") + .path("removeLock"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveOutboundConnectorLockResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveOutboundConnectorLockResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveOutboundConnectorLockResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses + .RemoveOutboundConnectorLockResponse>() { + @Override + public com.oracle.bmc.filestorage.responses + .RemoveOutboundConnectorLockResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.RemoveOutboundConnectorLockResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model + .OutboundConnector>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model + .OutboundConnector + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model + .OutboundConnector + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.OutboundConnector> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses + .RemoveOutboundConnectorLockResponse.Builder + builder = + com.oracle.bmc.filestorage.responses + .RemoveOutboundConnectorLockResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.outboundConnector(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.filestorage.responses + .RemoveOutboundConnectorLockResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveReplicationLockConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveReplicationLockConverter.java new file mode 100644 index 00000000000..2cb36ec940d --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveReplicationLockConverter.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveReplicationLockConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RemoveReplicationLockConverter.class); + + public static com.oracle.bmc.filestorage.requests.RemoveReplicationLockRequest interceptRequest( + com.oracle.bmc.filestorage.requests.RemoveReplicationLockRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.RemoveReplicationLockRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getReplicationId(), "replicationId must not be blank"); + Validate.notNull( + request.getRemoveReplicationLockDetails(), + "removeReplicationLockDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("replications") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getReplicationId())) + .path("actions") + .path("removeLock"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveReplicationLockResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveReplicationLockResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveReplicationLockResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses + .RemoveReplicationLockResponse>() { + @Override + public com.oracle.bmc.filestorage.responses + .RemoveReplicationLockResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.RemoveReplicationLockResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model + .Replication>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.Replication + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.Replication + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.Replication> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses.RemoveReplicationLockResponse + .Builder + builder = + com.oracle.bmc.filestorage.responses + .RemoveReplicationLockResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.replication(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.filestorage.responses.RemoveReplicationLockResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveSnapshotLockConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveSnapshotLockConverter.java new file mode 100644 index 00000000000..9ab51815bd0 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/RemoveSnapshotLockConverter.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveSnapshotLockConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RemoveSnapshotLockConverter.class); + + public static com.oracle.bmc.filestorage.requests.RemoveSnapshotLockRequest interceptRequest( + com.oracle.bmc.filestorage.requests.RemoveSnapshotLockRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.RemoveSnapshotLockRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSnapshotId(), "snapshotId must not be blank"); + Validate.notNull( + request.getRemoveSnapshotLockDetails(), "removeSnapshotLockDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("snapshots") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSnapshotId())) + .path("actions") + .path("removeLock"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveSnapshotLockResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveSnapshotLockResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveSnapshotLockResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.RemoveSnapshotLockResponse>() { + @Override + public com.oracle.bmc.filestorage.responses.RemoveSnapshotLockResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.RemoveSnapshotLockResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.Snapshot>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.Snapshot.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.Snapshot + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.Snapshot> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses.RemoveSnapshotLockResponse + .Builder + builder = + com.oracle.bmc.filestorage.responses + .RemoveSnapshotLockResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.snapshot(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.filestorage.responses.RemoveSnapshotLockResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ScheduleDowngradeShapeMountTargetConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ScheduleDowngradeShapeMountTargetConverter.java new file mode 100644 index 00000000000..2eca3af08dc --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/ScheduleDowngradeShapeMountTargetConverter.java @@ -0,0 +1,159 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class ScheduleDowngradeShapeMountTargetConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ScheduleDowngradeShapeMountTargetConverter.class); + + public static com.oracle.bmc.filestorage.requests.ScheduleDowngradeShapeMountTargetRequest + interceptRequest( + com.oracle.bmc.filestorage.requests.ScheduleDowngradeShapeMountTargetRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.ScheduleDowngradeShapeMountTargetRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getMountTargetId(), "mountTargetId must not be blank"); + Validate.notNull( + request.getScheduleDowngradeShapeMountTargetDetails(), + "scheduleDowngradeShapeMountTargetDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("mountTargets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMountTargetId())) + .path("actions") + .path("scheduleShapeDowngrade"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.ScheduleDowngradeShapeMountTargetResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.ScheduleDowngradeShapeMountTargetResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses + .ScheduleDowngradeShapeMountTargetResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses + .ScheduleDowngradeShapeMountTargetResponse>() { + @Override + public com.oracle.bmc.filestorage.responses + .ScheduleDowngradeShapeMountTargetResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.ScheduleDowngradeShapeMountTargetResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model + .MountTarget>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.MountTarget + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.MountTarget + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.MountTarget> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses + .ScheduleDowngradeShapeMountTargetResponse.Builder + builder = + com.oracle.bmc.filestorage.responses + .ScheduleDowngradeShapeMountTargetResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.mountTarget(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.filestorage.responses + .ScheduleDowngradeShapeMountTargetResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UnpauseFilesystemSnapshotPolicyConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UnpauseFilesystemSnapshotPolicyConverter.java index 0326253e780..e9ed5db69fd 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UnpauseFilesystemSnapshotPolicyConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UnpauseFilesystemSnapshotPolicyConverter.java @@ -45,6 +45,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( .path("actions") .path("unpause"); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateExportConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateExportConverter.java index 6eb9405bbc8..c8b96e21e16 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateExportConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateExportConverter.java @@ -40,6 +40,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getExportId())); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateFileSystemConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateFileSystemConverter.java index bd26312e9c9..a9a945ef620 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateFileSystemConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateFileSystemConverter.java @@ -41,6 +41,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getFileSystemId())); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateFilesystemSnapshotPolicyConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateFilesystemSnapshotPolicyConverter.java index 5a56bc70df2..bcf25dba37a 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateFilesystemSnapshotPolicyConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateFilesystemSnapshotPolicyConverter.java @@ -46,6 +46,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getFilesystemSnapshotPolicyId())); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateMountTargetConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateMountTargetConverter.java index 43b844fb0c7..0225f17dd2a 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateMountTargetConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateMountTargetConverter.java @@ -41,6 +41,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getMountTargetId())); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateOutboundConnectorConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateOutboundConnectorConverter.java index fa224ee6059..6eb0e316ef5 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateOutboundConnectorConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateOutboundConnectorConverter.java @@ -44,6 +44,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getOutboundConnectorId())); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateReplicationConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateReplicationConverter.java index 89df94b14ac..b4689f09f88 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateReplicationConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateReplicationConverter.java @@ -41,6 +41,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getReplicationId())); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateSnapshotConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateSnapshotConverter.java index 8ab094f9c60..beb4d44fa44 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateSnapshotConverter.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpdateSnapshotConverter.java @@ -40,6 +40,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getSnapshotId())); + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpgradeShapeMountTargetConverter.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpgradeShapeMountTargetConverter.java new file mode 100644 index 00000000000..59c32cefbda --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/internal/http/UpgradeShapeMountTargetConverter.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.filestorage.model.*; +import com.oracle.bmc.filestorage.requests.*; +import com.oracle.bmc.filestorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class UpgradeShapeMountTargetConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpgradeShapeMountTargetConverter.class); + + public static com.oracle.bmc.filestorage.requests.UpgradeShapeMountTargetRequest + interceptRequest( + com.oracle.bmc.filestorage.requests.UpgradeShapeMountTargetRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.filestorage.requests.UpgradeShapeMountTargetRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getMountTargetId(), "mountTargetId must not be blank"); + Validate.notNull( + request.getUpgradeShapeMountTargetDetails(), + "upgradeShapeMountTargetDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20171215") + .path("mountTargets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMountTargetId())) + .path("actions") + .path("upgradeShape"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.UpgradeShapeMountTargetResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.UpgradeShapeMountTargetResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses.UpgradeShapeMountTargetResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.filestorage.responses + .UpgradeShapeMountTargetResponse>() { + @Override + public com.oracle.bmc.filestorage.responses + .UpgradeShapeMountTargetResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.filestorage.responses.UpgradeShapeMountTargetResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model + .MountTarget>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.MountTarget + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.filestorage.model.MountTarget + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.filestorage.model.MountTarget> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.filestorage.responses.UpgradeShapeMountTargetResponse + .Builder + builder = + com.oracle.bmc.filestorage.responses + .UpgradeShapeMountTargetResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.mountTarget(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.filestorage.responses.UpgradeShapeMountTargetResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateExportDetails.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateExportDetails.java index 90e27a10c52..a9dfe5de776 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateExportDetails.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateExportDetails.java @@ -26,6 +26,7 @@ public final class CreateExportDetails extends com.oracle.bmc.http.internal.Expl "exportSetId", "fileSystemId", "path", + "locks", "isIdmapGroupsForSysAuth" }) public CreateExportDetails( @@ -33,20 +34,23 @@ public CreateExportDetails( String exportSetId, String fileSystemId, String path, + java.util.List locks, Boolean isIdmapGroupsForSysAuth) { super(); this.exportOptions = exportOptions; this.exportSetId = exportSetId; this.fileSystemId = fileSystemId; this.path = path; + this.locks = locks; this.isIdmapGroupsForSysAuth = isIdmapGroupsForSysAuth; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * Export options for the new export. If left unspecified, - * defaults to: + * Export options for the new export. For exports of mount targets with + * IPv4 address, if client options are left unspecified, client options + * would default to: *

* [ * { @@ -61,6 +65,10 @@ public static class Builder { * } * ] *

+ * For exports of mount targets with IPv6 address, if client options are + * left unspecified, client options would be an empty array, i.e. export + * would not be visible to any clients. + *

**Note:** Mount targets do not have Internet-routable IP * addresses. Therefore they will not be reachable from the * Internet, even if an associated {@code ClientOptions} item has @@ -77,8 +85,9 @@ public static class Builder { private java.util.List exportOptions; /** - * Export options for the new export. If left unspecified, - * defaults to: + * Export options for the new export. For exports of mount targets with + * IPv4 address, if client options are left unspecified, client options + * would default to: *

* [ * { @@ -93,6 +102,10 @@ public static class Builder { * } * ] *

+ * For exports of mount targets with IPv6 address, if client options are + * left unspecified, client options would be an empty array, i.e. export + * would not be visible to any clients. + *

**Note:** Mount targets do not have Internet-routable IP * addresses. Therefore they will not be reachable from the * Internet, even if an associated {@code ClientOptions} item has @@ -170,6 +183,22 @@ public Builder path(String path) { this.__explicitlySet__.add("path"); return this; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } /** * Whether or not the export should use ID mapping for Unix groups rather than the group list provided within an NFS request's RPC header. When this flag is true the Unix UID from the RPC header is used to retrieve the list of secondary groups from a the ID mapping subsystem. The primary GID is always taken from the RPC header. If ID mapping is not configured, incorrectly configured, unavailable, or cannot be used to determine a list of secondary groups then an empty secondary group list is used for authorization. If the number of groups exceeds the limit of 256 groups, the list retrieved from LDAP is truncated to the first 256 groups read. **/ @@ -197,6 +226,7 @@ public CreateExportDetails build() { this.exportSetId, this.fileSystemId, this.path, + this.locks, this.isIdmapGroupsForSysAuth); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -218,6 +248,9 @@ public Builder copy(CreateExportDetails model) { if (model.wasPropertyExplicitlySet("path")) { this.path(model.getPath()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } if (model.wasPropertyExplicitlySet("isIdmapGroupsForSysAuth")) { this.isIdmapGroupsForSysAuth(model.getIsIdmapGroupsForSysAuth()); } @@ -237,8 +270,9 @@ public Builder toBuilder() { } /** - * Export options for the new export. If left unspecified, - * defaults to: + * Export options for the new export. For exports of mount targets with + * IPv4 address, if client options are left unspecified, client options + * would default to: *

* [ * { @@ -253,6 +287,10 @@ public Builder toBuilder() { * } * ] *

+ * For exports of mount targets with IPv6 address, if client options are + * left unspecified, client options would be an empty array, i.e. export + * would not be visible to any clients. + *

**Note:** Mount targets do not have Internet-routable IP * addresses. Therefore they will not be reachable from the * Internet, even if an associated {@code ClientOptions} item has @@ -269,8 +307,9 @@ public Builder toBuilder() { private final java.util.List exportOptions; /** - * Export options for the new export. If left unspecified, - * defaults to: + * Export options for the new export. For exports of mount targets with + * IPv4 address, if client options are left unspecified, client options + * would default to: *

* [ * { @@ -285,6 +324,10 @@ public Builder toBuilder() { * } * ] *

+ * For exports of mount targets with IPv6 address, if client options are + * left unspecified, client options would be an empty array, i.e. export + * would not be visible to any clients. + *

**Note:** Mount targets do not have Internet-routable IP * addresses. Therefore they will not be reachable from the * Internet, even if an associated {@code ClientOptions} item has @@ -354,6 +397,20 @@ public String getPath() { return path; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + /** * Whether or not the export should use ID mapping for Unix groups rather than the group list provided within an NFS request's RPC header. When this flag is true the Unix UID from the RPC header is used to retrieve the list of secondary groups from a the ID mapping subsystem. The primary GID is always taken from the RPC header. If ID mapping is not configured, incorrectly configured, unavailable, or cannot be used to determine a list of secondary groups then an empty secondary group list is used for authorization. If the number of groups exceeds the limit of 256 groups, the list retrieved from LDAP is truncated to the first 256 groups read. **/ @@ -386,6 +443,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", exportSetId=").append(String.valueOf(this.exportSetId)); sb.append(", fileSystemId=").append(String.valueOf(this.fileSystemId)); sb.append(", path=").append(String.valueOf(this.path)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(", isIdmapGroupsForSysAuth=") .append(String.valueOf(this.isIdmapGroupsForSysAuth)); sb.append(")"); @@ -406,6 +464,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.exportSetId, other.exportSetId) && java.util.Objects.equals(this.fileSystemId, other.fileSystemId) && java.util.Objects.equals(this.path, other.path) + && java.util.Objects.equals(this.locks, other.locks) && java.util.Objects.equals( this.isIdmapGroupsForSysAuth, other.isIdmapGroupsForSysAuth) && super.equals(other); @@ -421,6 +480,7 @@ public int hashCode() { result = (result * PRIME) + (this.exportSetId == null ? 43 : this.exportSetId.hashCode()); result = (result * PRIME) + (this.fileSystemId == null ? 43 : this.fileSystemId.hashCode()); result = (result * PRIME) + (this.path == null ? 43 : this.path.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + (this.isIdmapGroupsForSysAuth == null diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateFileSystemDetails.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateFileSystemDetails.java index e7e872bf31c..7f82c25e8fd 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateFileSystemDetails.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateFileSystemDetails.java @@ -28,8 +28,10 @@ public final class CreateFileSystemDetails "displayName", "freeformTags", "definedTags", + "locks", "kmsKeyId", "sourceSnapshotId", + "cloneAttachStatus", "filesystemSnapshotPolicyId" }) public CreateFileSystemDetails( @@ -38,8 +40,10 @@ public CreateFileSystemDetails( String displayName, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.List locks, String kmsKeyId, String sourceSnapshotId, + CloneAttachStatus cloneAttachStatus, String filesystemSnapshotPolicyId) { super(); this.availabilityDomain = availabilityDomain; @@ -47,8 +51,10 @@ public CreateFileSystemDetails( this.displayName = displayName; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.locks = locks; this.kmsKeyId = kmsKeyId; this.sourceSnapshotId = sourceSnapshotId; + this.cloneAttachStatus = cloneAttachStatus; this.filesystemSnapshotPolicyId = filesystemSnapshotPolicyId; } @@ -163,6 +169,22 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the KMS key used to encrypt the encryption keys associated with this file system. * @@ -201,6 +223,28 @@ public Builder sourceSnapshotId(String sourceSnapshotId) { this.__explicitlySet__.add("sourceSnapshotId"); return this; } + /** + * Specifies whether the clone file system is attached to its parent file system. + * If the value is set to 'DETACH', then the file system will be created, which is deep copied from the snapshot + * specified by sourceSnapshotId, else will remain attached to its parent. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloneAttachStatus") + private CloneAttachStatus cloneAttachStatus; + + /** + * Specifies whether the clone file system is attached to its parent file system. + * If the value is set to 'DETACH', then the file system will be created, which is deep copied from the snapshot + * specified by sourceSnapshotId, else will remain attached to its parent. + * + * @param cloneAttachStatus the value to set + * @return this builder + **/ + public Builder cloneAttachStatus(CloneAttachStatus cloneAttachStatus) { + this.cloneAttachStatus = cloneAttachStatus; + this.__explicitlySet__.add("cloneAttachStatus"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the associated file system snapshot policy, which * controls the frequency of snapshot creation and retention period of the taken snapshots. @@ -237,8 +281,10 @@ public CreateFileSystemDetails build() { this.displayName, this.freeformTags, this.definedTags, + this.locks, this.kmsKeyId, this.sourceSnapshotId, + this.cloneAttachStatus, this.filesystemSnapshotPolicyId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -263,12 +309,18 @@ public Builder copy(CreateFileSystemDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } if (model.wasPropertyExplicitlySet("kmsKeyId")) { this.kmsKeyId(model.getKmsKeyId()); } if (model.wasPropertyExplicitlySet("sourceSnapshotId")) { this.sourceSnapshotId(model.getSourceSnapshotId()); } + if (model.wasPropertyExplicitlySet("cloneAttachStatus")) { + this.cloneAttachStatus(model.getCloneAttachStatus()); + } if (model.wasPropertyExplicitlySet("filesystemSnapshotPolicyId")) { this.filesystemSnapshotPolicyId(model.getFilesystemSnapshotPolicyId()); } @@ -385,6 +437,20 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the KMS key used to encrypt the encryption keys associated with this file system. * @@ -419,6 +485,64 @@ public String getSourceSnapshotId() { return sourceSnapshotId; } + /** + * Specifies whether the clone file system is attached to its parent file system. + * If the value is set to 'DETACH', then the file system will be created, which is deep copied from the snapshot + * specified by sourceSnapshotId, else will remain attached to its parent. + * + **/ + public enum CloneAttachStatus { + Detach("DETACH"), + Attach("ATTACH"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (CloneAttachStatus v : CloneAttachStatus.values()) { + map.put(v.getValue(), v); + } + } + + CloneAttachStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static CloneAttachStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid CloneAttachStatus: " + key); + } + }; + /** + * Specifies whether the clone file system is attached to its parent file system. + * If the value is set to 'DETACH', then the file system will be created, which is deep copied from the snapshot + * specified by sourceSnapshotId, else will remain attached to its parent. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloneAttachStatus") + private final CloneAttachStatus cloneAttachStatus; + + /** + * Specifies whether the clone file system is attached to its parent file system. + * If the value is set to 'DETACH', then the file system will be created, which is deep copied from the snapshot + * specified by sourceSnapshotId, else will remain attached to its parent. + * + * @return the value + **/ + public CloneAttachStatus getCloneAttachStatus() { + return cloneAttachStatus; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the associated file system snapshot policy, which * controls the frequency of snapshot creation and retention period of the taken snapshots. @@ -460,8 +584,10 @@ public String toString(boolean includeByteArrayContents) { sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); sb.append(", sourceSnapshotId=").append(String.valueOf(this.sourceSnapshotId)); + sb.append(", cloneAttachStatus=").append(String.valueOf(this.cloneAttachStatus)); sb.append(", filesystemSnapshotPolicyId=") .append(String.valueOf(this.filesystemSnapshotPolicyId)); sb.append(")"); @@ -483,8 +609,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.locks, other.locks) && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) && java.util.Objects.equals(this.sourceSnapshotId, other.sourceSnapshotId) + && java.util.Objects.equals(this.cloneAttachStatus, other.cloneAttachStatus) && java.util.Objects.equals( this.filesystemSnapshotPolicyId, other.filesystemSnapshotPolicyId) && super.equals(other); @@ -505,10 +633,14 @@ public int hashCode() { result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); result = (result * PRIME) + (this.sourceSnapshotId == null ? 43 : this.sourceSnapshotId.hashCode()); + result = + (result * PRIME) + + (this.cloneAttachStatus == null ? 43 : this.cloneAttachStatus.hashCode()); result = (result * PRIME) + (this.filesystemSnapshotPolicyId == null diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateFilesystemSnapshotPolicyDetails.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateFilesystemSnapshotPolicyDetails.java index 57f9f03aebb..4a94aa551bd 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateFilesystemSnapshotPolicyDetails.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateFilesystemSnapshotPolicyDetails.java @@ -29,7 +29,8 @@ public final class CreateFilesystemSnapshotPolicyDetails "policyPrefix", "schedules", "freeformTags", - "definedTags" + "definedTags", + "locks" }) public CreateFilesystemSnapshotPolicyDetails( String availabilityDomain, @@ -38,7 +39,8 @@ public CreateFilesystemSnapshotPolicyDetails( String policyPrefix, java.util.List schedules, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.List locks) { super(); this.availabilityDomain = availabilityDomain; this.compartmentId = compartmentId; @@ -47,6 +49,7 @@ public CreateFilesystemSnapshotPolicyDetails( this.schedules = schedules; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.locks = locks; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -212,6 +215,22 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -225,7 +244,8 @@ public CreateFilesystemSnapshotPolicyDetails build() { this.policyPrefix, this.schedules, this.freeformTags, - this.definedTags); + this.definedTags, + this.locks); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -255,6 +275,9 @@ public Builder copy(CreateFilesystemSnapshotPolicyDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } return this; } } @@ -416,6 +439,20 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + @Override public String toString() { return this.toString(true); @@ -437,6 +474,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", schedules=").append(String.valueOf(this.schedules)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(")"); return sb.toString(); } @@ -458,6 +496,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.schedules, other.schedules) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.locks, other.locks) && super.equals(other); } @@ -478,6 +517,7 @@ public int hashCode() { result = (result * PRIME) + (this.schedules == null ? 43 : this.schedules.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateLdapBindAccountDetails.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateLdapBindAccountDetails.java index 72a8fb65fbd..36d35874da6 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateLdapBindAccountDetails.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateLdapBindAccountDetails.java @@ -73,6 +73,15 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } /** * Array of server endpoints to use when connecting with the LDAP bind account. * @@ -153,6 +162,7 @@ public CreateLdapBindAccountDetails build() { this.displayName, this.freeformTags, this.definedTags, + this.locks, this.endpoints, this.bindDistinguishedName, this.passwordSecretId, @@ -180,6 +190,9 @@ public Builder copy(CreateLdapBindAccountDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } if (model.wasPropertyExplicitlySet("endpoints")) { this.endpoints(model.getEndpoints()); } @@ -214,11 +227,12 @@ public CreateLdapBindAccountDetails( String displayName, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.List locks, java.util.List endpoints, String bindDistinguishedName, String passwordSecretId, Integer passwordSecretVersion) { - super(availabilityDomain, compartmentId, displayName, freeformTags, definedTags); + super(availabilityDomain, compartmentId, displayName, freeformTags, definedTags, locks); this.endpoints = endpoints; this.bindDistinguishedName = bindDistinguishedName; this.passwordSecretId = passwordSecretId; diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateMountTargetDetails.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateMountTargetDetails.java index a78c98c3017..4222d2ba307 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateMountTargetDetails.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateMountTargetDetails.java @@ -34,7 +34,9 @@ public final class CreateMountTargetDetails "nsgIds", "kerberos", "freeformTags", - "definedTags" + "definedTags", + "locks", + "requestedThroughput" }) public CreateMountTargetDetails( String availabilityDomain, @@ -48,7 +50,9 @@ public CreateMountTargetDetails( java.util.List nsgIds, CreateKerberosDetails kerberos, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.List locks, + Long requestedThroughput) { super(); this.availabilityDomain = availabilityDomain; this.compartmentId = compartmentId; @@ -62,6 +66,8 @@ public CreateMountTargetDetails( this.kerberos = kerberos; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.locks = locks; + this.requestedThroughput = requestedThroughput; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -189,14 +195,6 @@ public Builder hostnameLabel(String hostnameLabel) { * the subnet's CIDR. If you don't specify a value, Oracle automatically * assigns a private IP address from the subnet. *

- * Note: This attribute value is stored in the [PrivateIp](https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/20160918/PrivateIp/) resource, - * not in the {@code mountTarget} resource. - * To update the {@code ipAddress}, use {@code GetMountTarget} to obtain the - * [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target's - * private IPs ({@code privateIpIds}). Then, you can use - * [UpdatePrivateIp](https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/20160918/PrivateIp/UpdatePrivateIp) - * to update the {@code ipAddress} value. - *

* Example: {@code 10.0.3.3} * **/ @@ -208,14 +206,6 @@ public Builder hostnameLabel(String hostnameLabel) { * the subnet's CIDR. If you don't specify a value, Oracle automatically * assigns a private IP address from the subnet. *

- * Note: This attribute value is stored in the [PrivateIp](https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/20160918/PrivateIp/) resource, - * not in the {@code mountTarget} resource. - * To update the {@code ipAddress}, use {@code GetMountTarget} to obtain the - * [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target's - * private IPs ({@code privateIpIds}). Then, you can use - * [UpdatePrivateIp](https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/20160918/PrivateIp/UpdatePrivateIp) - * to update the {@code ipAddress} value. - *

* Example: {@code 10.0.3.3} * * @param ipAddress the value to set @@ -349,6 +339,42 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } + /** + * Throughput for mount target in Gbps. Currently only 1 Gbps of requestedThroughput is supported during create MountTarget. + * Available shapes and corresponding throughput are listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestedThroughput") + private Long requestedThroughput; + + /** + * Throughput for mount target in Gbps. Currently only 1 Gbps of requestedThroughput is supported during create MountTarget. + * Available shapes and corresponding throughput are listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + * @param requestedThroughput the value to set + * @return this builder + **/ + public Builder requestedThroughput(Long requestedThroughput) { + this.requestedThroughput = requestedThroughput; + this.__explicitlySet__.add("requestedThroughput"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -367,7 +393,9 @@ public CreateMountTargetDetails build() { this.nsgIds, this.kerberos, this.freeformTags, - this.definedTags); + this.definedTags, + this.locks, + this.requestedThroughput); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -412,6 +440,12 @@ public Builder copy(CreateMountTargetDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } + if (model.wasPropertyExplicitlySet("requestedThroughput")) { + this.requestedThroughput(model.getRequestedThroughput()); + } return this; } } @@ -542,14 +576,6 @@ public String getHostnameLabel() { * the subnet's CIDR. If you don't specify a value, Oracle automatically * assigns a private IP address from the subnet. *

- * Note: This attribute value is stored in the [PrivateIp](https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/20160918/PrivateIp/) resource, - * not in the {@code mountTarget} resource. - * To update the {@code ipAddress}, use {@code GetMountTarget} to obtain the - * [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target's - * private IPs ({@code privateIpIds}). Then, you can use - * [UpdatePrivateIp](https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/20160918/PrivateIp/UpdatePrivateIp) - * to update the {@code ipAddress} value. - *

* Example: {@code 10.0.3.3} * **/ @@ -561,14 +587,6 @@ public String getHostnameLabel() { * the subnet's CIDR. If you don't specify a value, Oracle automatically * assigns a private IP address from the subnet. *

- * Note: This attribute value is stored in the [PrivateIp](https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/20160918/PrivateIp/) resource, - * not in the {@code mountTarget} resource. - * To update the {@code ipAddress}, use {@code GetMountTarget} to obtain the - * [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target's - * private IPs ({@code privateIpIds}). Then, you can use - * [UpdatePrivateIp](https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/20160918/PrivateIp/UpdatePrivateIp) - * to update the {@code ipAddress} value. - *

* Example: {@code 10.0.3.3} * * @return the value @@ -685,6 +703,38 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + + /** + * Throughput for mount target in Gbps. Currently only 1 Gbps of requestedThroughput is supported during create MountTarget. + * Available shapes and corresponding throughput are listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestedThroughput") + private final Long requestedThroughput; + + /** + * Throughput for mount target in Gbps. Currently only 1 Gbps of requestedThroughput is supported during create MountTarget. + * Available shapes and corresponding throughput are listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + * @return the value + **/ + public Long getRequestedThroughput() { + return requestedThroughput; + } + @Override public String toString() { return this.toString(true); @@ -711,6 +761,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", kerberos=").append(String.valueOf(this.kerberos)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", locks=").append(String.valueOf(this.locks)); + sb.append(", requestedThroughput=").append(String.valueOf(this.requestedThroughput)); sb.append(")"); return sb.toString(); } @@ -737,6 +789,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.kerberos, other.kerberos) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.locks, other.locks) + && java.util.Objects.equals(this.requestedThroughput, other.requestedThroughput) && super.equals(other); } @@ -764,6 +818,12 @@ public int hashCode() { result = (result * PRIME) + (this.kerberos == null ? 43 : this.kerberos.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); + result = + (result * PRIME) + + (this.requestedThroughput == null + ? 43 + : this.requestedThroughput.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateOutboundConnectorDetails.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateOutboundConnectorDetails.java index 3b5e1c2a69c..46b051f0235 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateOutboundConnectorDetails.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateOutboundConnectorDetails.java @@ -36,20 +36,23 @@ public class CreateOutboundConnectorDetails "compartmentId", "displayName", "freeformTags", - "definedTags" + "definedTags", + "locks" }) protected CreateOutboundConnectorDetails( String availabilityDomain, String compartmentId, String displayName, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.List locks) { super(); this.availabilityDomain = availabilityDomain; this.compartmentId = compartmentId; this.displayName = displayName; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.locks = locks; } /** @@ -152,6 +155,20 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + @Override public String toString() { return this.toString(true); @@ -171,6 +188,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(")"); return sb.toString(); } @@ -190,6 +208,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.locks, other.locks) && super.equals(other); } @@ -208,6 +227,7 @@ public int hashCode() { result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateReplicationDetails.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateReplicationDetails.java index 73f07a8246a..309bb2a3f99 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateReplicationDetails.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateReplicationDetails.java @@ -29,7 +29,8 @@ public final class CreateReplicationDetails "displayName", "replicationInterval", "freeformTags", - "definedTags" + "definedTags", + "locks" }) public CreateReplicationDetails( String compartmentId, @@ -38,7 +39,8 @@ public CreateReplicationDetails( String displayName, Long replicationInterval, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.List locks) { super(); this.compartmentId = compartmentId; this.sourceId = sourceId; @@ -47,6 +49,7 @@ public CreateReplicationDetails( this.replicationInterval = replicationInterval; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.locks = locks; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -190,6 +193,22 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -203,7 +222,8 @@ public CreateReplicationDetails build() { this.displayName, this.replicationInterval, this.freeformTags, - this.definedTags); + this.definedTags, + this.locks); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -233,6 +253,9 @@ public Builder copy(CreateReplicationDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } return this; } } @@ -372,6 +395,20 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + @Override public String toString() { return this.toString(true); @@ -393,6 +430,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", replicationInterval=").append(String.valueOf(this.replicationInterval)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(")"); return sb.toString(); } @@ -414,6 +452,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.replicationInterval, other.replicationInterval) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.locks, other.locks) && super.equals(other); } @@ -434,6 +473,7 @@ public int hashCode() { : this.replicationInterval.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateSnapshotDetails.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateSnapshotDetails.java index c67f447124a..9d3d623e461 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateSnapshotDetails.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateSnapshotDetails.java @@ -27,20 +27,23 @@ public final class CreateSnapshotDetails "name", "expirationTime", "freeformTags", - "definedTags" + "definedTags", + "locks" }) public CreateSnapshotDetails( String fileSystemId, String name, java.util.Date expirationTime, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.List locks) { super(); this.fileSystemId = fileSystemId; this.name = name; this.expirationTime = expirationTime; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.locks = locks; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -154,6 +157,22 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -165,7 +184,8 @@ public CreateSnapshotDetails build() { this.name, this.expirationTime, this.freeformTags, - this.definedTags); + this.definedTags, + this.locks); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -189,6 +209,9 @@ public Builder copy(CreateSnapshotDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } return this; } } @@ -302,6 +325,20 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + @Override public String toString() { return this.toString(true); @@ -321,6 +358,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", expirationTime=").append(String.valueOf(this.expirationTime)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(")"); return sb.toString(); } @@ -340,6 +378,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.expirationTime, other.expirationTime) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.locks, other.locks) && super.equals(other); } @@ -354,6 +393,7 @@ public int hashCode() { + (this.expirationTime == null ? 43 : this.expirationTime.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/Export.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/Export.java index 469061b821c..94955b4d26f 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/Export.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/Export.java @@ -60,7 +60,8 @@ public final class Export extends com.oracle.bmc.http.internal.ExplicitlySetBmcM "lifecycleState", "path", "isIdmapGroupsForSysAuth", - "timeCreated" + "timeCreated", + "locks" }) public Export( java.util.List exportOptions, @@ -70,7 +71,8 @@ public Export( LifecycleState lifecycleState, String path, Boolean isIdmapGroupsForSysAuth, - java.util.Date timeCreated) { + java.util.Date timeCreated, + java.util.List locks) { super(); this.exportOptions = exportOptions; this.exportSetId = exportSetId; @@ -80,6 +82,7 @@ public Export( this.path = path; this.isIdmapGroupsForSysAuth = isIdmapGroupsForSysAuth; this.timeCreated = timeCreated; + this.locks = locks; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -280,6 +283,22 @@ public Builder timeCreated(java.util.Date timeCreated) { this.__explicitlySet__.add("timeCreated"); return this; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -294,7 +313,8 @@ public Export build() { this.lifecycleState, this.path, this.isIdmapGroupsForSysAuth, - this.timeCreated); + this.timeCreated, + this.locks); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -327,6 +347,9 @@ public Builder copy(Export model) { if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } return this; } } @@ -572,6 +595,20 @@ public java.util.Date getTimeCreated() { return timeCreated; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + @Override public String toString() { return this.toString(true); @@ -595,6 +632,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isIdmapGroupsForSysAuth=") .append(String.valueOf(this.isIdmapGroupsForSysAuth)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(")"); return sb.toString(); } @@ -618,6 +656,7 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.isIdmapGroupsForSysAuth, other.isIdmapGroupsForSysAuth) && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.locks, other.locks) && super.equals(other); } @@ -641,6 +680,7 @@ public int hashCode() { ? 43 : this.isIdmapGroupsForSysAuth.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/ExportSummary.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/ExportSummary.java index 5a78ae1046a..01699a4bc3c 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/ExportSummary.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/ExportSummary.java @@ -27,7 +27,8 @@ public final class ExportSummary extends com.oracle.bmc.http.internal.Explicitly "lifecycleState", "path", "isIdmapGroupsForSysAuth", - "timeCreated" + "timeCreated", + "locks" }) public ExportSummary( String exportSetId, @@ -36,7 +37,8 @@ public ExportSummary( LifecycleState lifecycleState, String path, Boolean isIdmapGroupsForSysAuth, - java.util.Date timeCreated) { + java.util.Date timeCreated, + java.util.List locks) { super(); this.exportSetId = exportSetId; this.fileSystemId = fileSystemId; @@ -45,6 +47,7 @@ public ExportSummary( this.path = path; this.isIdmapGroupsForSysAuth = isIdmapGroupsForSysAuth; this.timeCreated = timeCreated; + this.locks = locks; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -179,6 +182,22 @@ public Builder timeCreated(java.util.Date timeCreated) { this.__explicitlySet__.add("timeCreated"); return this; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -192,7 +211,8 @@ public ExportSummary build() { this.lifecycleState, this.path, this.isIdmapGroupsForSysAuth, - this.timeCreated); + this.timeCreated, + this.locks); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -222,6 +242,9 @@ public Builder copy(ExportSummary model) { if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } return this; } } @@ -403,6 +426,20 @@ public java.util.Date getTimeCreated() { return timeCreated; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + @Override public String toString() { return this.toString(true); @@ -425,6 +462,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isIdmapGroupsForSysAuth=") .append(String.valueOf(this.isIdmapGroupsForSysAuth)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(")"); return sb.toString(); } @@ -447,6 +485,7 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.isIdmapGroupsForSysAuth, other.isIdmapGroupsForSysAuth) && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.locks, other.locks) && super.equals(other); } @@ -467,6 +506,7 @@ public int hashCode() { ? 43 : this.isIdmapGroupsForSysAuth.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystem.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystem.java index b0d2862e553..509ab11ec9b 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystem.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystem.java @@ -43,6 +43,9 @@ public final class FileSystem extends com.oracle.bmc.http.internal.ExplicitlySet "sourceDetails", "isCloneParent", "isHydrated", + "cloneCount", + "cloneAttachStatus", + "locks", "lifecycleDetails", "isTargetable", "replicationTargetId", @@ -62,6 +65,9 @@ public FileSystem( SourceDetails sourceDetails, Boolean isCloneParent, Boolean isHydrated, + Integer cloneCount, + CloneAttachStatus cloneAttachStatus, + java.util.List locks, String lifecycleDetails, Boolean isTargetable, String replicationTargetId, @@ -80,6 +86,9 @@ public FileSystem( this.sourceDetails = sourceDetails; this.isCloneParent = isCloneParent; this.isHydrated = isHydrated; + this.cloneCount = cloneCount; + this.cloneAttachStatus = cloneAttachStatus; + this.locks = locks; this.lifecycleDetails = lifecycleDetails; this.isTargetable = isTargetable; this.replicationTargetId = replicationTargetId; @@ -352,6 +361,54 @@ public Builder isHydrated(Boolean isHydrated) { this.__explicitlySet__.add("isHydrated"); return this; } + /** + * Specifies the total number of children of a file system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloneCount") + private Integer cloneCount; + + /** + * Specifies the total number of children of a file system. + * @param cloneCount the value to set + * @return this builder + **/ + public Builder cloneCount(Integer cloneCount) { + this.cloneCount = cloneCount; + this.__explicitlySet__.add("cloneCount"); + return this; + } + /** + * Specifies whether the file system is attached to its parent file system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloneAttachStatus") + private CloneAttachStatus cloneAttachStatus; + + /** + * Specifies whether the file system is attached to its parent file system. + * @param cloneAttachStatus the value to set + * @return this builder + **/ + public Builder cloneAttachStatus(CloneAttachStatus cloneAttachStatus) { + this.cloneAttachStatus = cloneAttachStatus; + this.__explicitlySet__.add("cloneAttachStatus"); + return this; + } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } /** * Additional information about the current 'lifecycleState'. **/ @@ -448,6 +505,9 @@ public FileSystem build() { this.sourceDetails, this.isCloneParent, this.isHydrated, + this.cloneCount, + this.cloneAttachStatus, + this.locks, this.lifecycleDetails, this.isTargetable, this.replicationTargetId, @@ -499,6 +559,15 @@ public Builder copy(FileSystem model) { if (model.wasPropertyExplicitlySet("isHydrated")) { this.isHydrated(model.getIsHydrated()); } + if (model.wasPropertyExplicitlySet("cloneCount")) { + this.cloneCount(model.getCloneCount()); + } + if (model.wasPropertyExplicitlySet("cloneAttachStatus")) { + this.cloneAttachStatus(model.getCloneAttachStatus()); + } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } if (model.wasPropertyExplicitlySet("lifecycleDetails")) { this.lifecycleDetails(model.getLifecycleDetails()); } @@ -628,6 +697,7 @@ public String getId() { public enum LifecycleState { Creating("CREATING"), Active("ACTIVE"), + Updating("UPDATING"), Deleting("DELETING"), Deleted("DELETED"), Failed("FAILED"), @@ -814,6 +884,97 @@ public Boolean getIsHydrated() { return isHydrated; } + /** + * Specifies the total number of children of a file system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloneCount") + private final Integer cloneCount; + + /** + * Specifies the total number of children of a file system. + * @return the value + **/ + public Integer getCloneCount() { + return cloneCount; + } + + /** + * Specifies whether the file system is attached to its parent file system. + **/ + public enum CloneAttachStatus { + Attached("ATTACHED"), + Detaching("DETACHING"), + Detached("DETACHED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CloneAttachStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (CloneAttachStatus v : CloneAttachStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + CloneAttachStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static CloneAttachStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'CloneAttachStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Specifies whether the file system is attached to its parent file system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloneAttachStatus") + private final CloneAttachStatus cloneAttachStatus; + + /** + * Specifies whether the file system is attached to its parent file system. + * @return the value + **/ + public CloneAttachStatus getCloneAttachStatus() { + return cloneAttachStatus; + } + + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + /** * Additional information about the current 'lifecycleState'. **/ @@ -909,6 +1070,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", sourceDetails=").append(String.valueOf(this.sourceDetails)); sb.append(", isCloneParent=").append(String.valueOf(this.isCloneParent)); sb.append(", isHydrated=").append(String.valueOf(this.isHydrated)); + sb.append(", cloneCount=").append(String.valueOf(this.cloneCount)); + sb.append(", cloneAttachStatus=").append(String.valueOf(this.cloneAttachStatus)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", isTargetable=").append(String.valueOf(this.isTargetable)); sb.append(", replicationTargetId=").append(String.valueOf(this.replicationTargetId)); @@ -941,6 +1105,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.sourceDetails, other.sourceDetails) && java.util.Objects.equals(this.isCloneParent, other.isCloneParent) && java.util.Objects.equals(this.isHydrated, other.isHydrated) + && java.util.Objects.equals(this.cloneCount, other.cloneCount) + && java.util.Objects.equals(this.cloneAttachStatus, other.cloneAttachStatus) + && java.util.Objects.equals(this.locks, other.locks) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.isTargetable, other.isTargetable) && java.util.Objects.equals(this.replicationTargetId, other.replicationTargetId) @@ -978,6 +1145,11 @@ public int hashCode() { (result * PRIME) + (this.isCloneParent == null ? 43 : this.isCloneParent.hashCode()); result = (result * PRIME) + (this.isHydrated == null ? 43 : this.isHydrated.hashCode()); + result = (result * PRIME) + (this.cloneCount == null ? 43 : this.cloneCount.hashCode()); + result = + (result * PRIME) + + (this.cloneAttachStatus == null ? 43 : this.cloneAttachStatus.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystemSummary.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystemSummary.java index f3114bf32e4..d1a7b63cd7e 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystemSummary.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystemSummary.java @@ -30,13 +30,15 @@ public final class FileSystemSummary extends com.oracle.bmc.http.internal.Explic "id", "lifecycleState", "timeCreated", + "locks", "freeformTags", "definedTags", "kmsKeyId", "sourceDetails", "isCloneParent", "isHydrated", - "lifecycleDetails" + "lifecycleDetails", + "cloneAttachStatus" }) public FileSystemSummary( String availabilityDomain, @@ -46,13 +48,15 @@ public FileSystemSummary( String id, LifecycleState lifecycleState, java.util.Date timeCreated, + java.util.List locks, java.util.Map freeformTags, java.util.Map> definedTags, String kmsKeyId, SourceDetails sourceDetails, Boolean isCloneParent, Boolean isHydrated, - String lifecycleDetails) { + String lifecycleDetails, + CloneAttachStatus cloneAttachStatus) { super(); this.availabilityDomain = availabilityDomain; this.meteredBytes = meteredBytes; @@ -61,6 +65,7 @@ public FileSystemSummary( this.id = id; this.lifecycleState = lifecycleState; this.timeCreated = timeCreated; + this.locks = locks; this.freeformTags = freeformTags; this.definedTags = definedTags; this.kmsKeyId = kmsKeyId; @@ -68,6 +73,7 @@ public FileSystemSummary( this.isCloneParent = isCloneParent; this.isHydrated = isHydrated; this.lifecycleDetails = lifecycleDetails; + this.cloneAttachStatus = cloneAttachStatus; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -216,6 +222,22 @@ public Builder timeCreated(java.util.Date timeCreated) { this.__explicitlySet__.add("timeCreated"); return this; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair * with no predefined name, type, or namespace. @@ -350,6 +372,22 @@ public Builder lifecycleDetails(String lifecycleDetails) { this.__explicitlySet__.add("lifecycleDetails"); return this; } + /** + * Specifies whether the file system is attached to its parent file system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloneAttachStatus") + private CloneAttachStatus cloneAttachStatus; + + /** + * Specifies whether the file system is attached to its parent file system. + * @param cloneAttachStatus the value to set + * @return this builder + **/ + public Builder cloneAttachStatus(CloneAttachStatus cloneAttachStatus) { + this.cloneAttachStatus = cloneAttachStatus; + this.__explicitlySet__.add("cloneAttachStatus"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -364,13 +402,15 @@ public FileSystemSummary build() { this.id, this.lifecycleState, this.timeCreated, + this.locks, this.freeformTags, this.definedTags, this.kmsKeyId, this.sourceDetails, this.isCloneParent, this.isHydrated, - this.lifecycleDetails); + this.lifecycleDetails, + this.cloneAttachStatus); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -400,6 +440,9 @@ public Builder copy(FileSystemSummary model) { if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -421,6 +464,9 @@ public Builder copy(FileSystemSummary model) { if (model.wasPropertyExplicitlySet("lifecycleDetails")) { this.lifecycleDetails(model.getLifecycleDetails()); } + if (model.wasPropertyExplicitlySet("cloneAttachStatus")) { + this.cloneAttachStatus(model.getCloneAttachStatus()); + } return this; } } @@ -536,6 +582,7 @@ public String getId() { public enum LifecycleState { Creating("CREATING"), Active("ACTIVE"), + Updating("UPDATING"), Deleting("DELETING"), Deleted("DELETED"), Failed("FAILED"), @@ -617,6 +664,20 @@ public java.util.Date getTimeCreated() { return timeCreated; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair * with no predefined name, type, or namespace. @@ -736,6 +797,69 @@ public String getLifecycleDetails() { return lifecycleDetails; } + /** + * Specifies whether the file system is attached to its parent file system. + **/ + public enum CloneAttachStatus { + Attached("ATTACHED"), + Detaching("DETACHING"), + Detached("DETACHED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CloneAttachStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (CloneAttachStatus v : CloneAttachStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + CloneAttachStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static CloneAttachStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'CloneAttachStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Specifies whether the file system is attached to its parent file system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cloneAttachStatus") + private final CloneAttachStatus cloneAttachStatus; + + /** + * Specifies whether the file system is attached to its parent file system. + * @return the value + **/ + public CloneAttachStatus getCloneAttachStatus() { + return cloneAttachStatus; + } + @Override public String toString() { return this.toString(true); @@ -757,6 +881,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", id=").append(String.valueOf(this.id)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", kmsKeyId=").append(String.valueOf(this.kmsKeyId)); @@ -764,6 +889,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isCloneParent=").append(String.valueOf(this.isCloneParent)); sb.append(", isHydrated=").append(String.valueOf(this.isHydrated)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", cloneAttachStatus=").append(String.valueOf(this.cloneAttachStatus)); sb.append(")"); return sb.toString(); } @@ -785,6 +911,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.locks, other.locks) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.kmsKeyId, other.kmsKeyId) @@ -792,6 +919,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.isCloneParent, other.isCloneParent) && java.util.Objects.equals(this.isHydrated, other.isHydrated) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.cloneAttachStatus, other.cloneAttachStatus) && super.equals(other); } @@ -814,6 +942,7 @@ public int hashCode() { (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.kmsKeyId == null ? 43 : this.kmsKeyId.hashCode()); @@ -827,6 +956,9 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = + (result * PRIME) + + (this.cloneAttachStatus == null ? 43 : this.cloneAttachStatus.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FilesystemSnapshotPolicy.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FilesystemSnapshotPolicy.java index 6792cb4e1ad..8586ac1efff 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FilesystemSnapshotPolicy.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FilesystemSnapshotPolicy.java @@ -38,6 +38,7 @@ public final class FilesystemSnapshotPolicy "displayName", "policyPrefix", "schedules", + "locks", "freeformTags", "definedTags" }) @@ -50,6 +51,7 @@ public FilesystemSnapshotPolicy( String displayName, String policyPrefix, java.util.List schedules, + java.util.List locks, java.util.Map freeformTags, java.util.Map> definedTags) { super(); @@ -61,6 +63,7 @@ public FilesystemSnapshotPolicy( this.displayName = displayName; this.policyPrefix = policyPrefix; this.schedules = schedules; + this.locks = locks; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -225,6 +228,22 @@ public Builder schedules(java.util.List schedules) { this.__explicitlySet__.add("schedules"); return this; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair * with no predefined name, type, or namespace. @@ -287,6 +306,7 @@ public FilesystemSnapshotPolicy build() { this.displayName, this.policyPrefix, this.schedules, + this.locks, this.freeformTags, this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -321,6 +341,9 @@ public Builder copy(FilesystemSnapshotPolicy model) { if (model.wasPropertyExplicitlySet("schedules")) { this.schedules(model.getSchedules()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -536,6 +559,20 @@ public java.util.List getSchedules() { return schedules; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair * with no predefined name, type, or namespace. @@ -600,6 +637,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", policyPrefix=").append(String.valueOf(this.policyPrefix)); sb.append(", schedules=").append(String.valueOf(this.schedules)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -624,6 +662,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.policyPrefix, other.policyPrefix) && java.util.Objects.equals(this.schedules, other.schedules) + && java.util.Objects.equals(this.locks, other.locks) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -649,6 +688,7 @@ public int hashCode() { result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.policyPrefix == null ? 43 : this.policyPrefix.hashCode()); result = (result * PRIME) + (this.schedules == null ? 43 : this.schedules.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FilesystemSnapshotPolicySummary.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FilesystemSnapshotPolicySummary.java index b6c416c7cde..1a933d1675a 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FilesystemSnapshotPolicySummary.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FilesystemSnapshotPolicySummary.java @@ -30,6 +30,7 @@ public final class FilesystemSnapshotPolicySummary "lifecycleState", "displayName", "timeCreated", + "locks", "policyPrefix", "freeformTags", "definedTags" @@ -41,6 +42,7 @@ public FilesystemSnapshotPolicySummary( LifecycleState lifecycleState, String displayName, java.util.Date timeCreated, + java.util.List locks, String policyPrefix, java.util.Map freeformTags, java.util.Map> definedTags) { @@ -51,6 +53,7 @@ public FilesystemSnapshotPolicySummary( this.lifecycleState = lifecycleState; this.displayName = displayName; this.timeCreated = timeCreated; + this.locks = locks; this.policyPrefix = policyPrefix; this.freeformTags = freeformTags; this.definedTags = definedTags; @@ -174,6 +177,22 @@ public Builder timeCreated(java.util.Date timeCreated) { this.__explicitlySet__.add("timeCreated"); return this; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } /** * The prefix to apply to all snapshots created by this policy. *

@@ -256,6 +275,7 @@ public FilesystemSnapshotPolicySummary build() { this.lifecycleState, this.displayName, this.timeCreated, + this.locks, this.policyPrefix, this.freeformTags, this.definedTags); @@ -285,6 +305,9 @@ public Builder copy(FilesystemSnapshotPolicySummary model) { if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } if (model.wasPropertyExplicitlySet("policyPrefix")) { this.policyPrefix(model.getPolicyPrefix()); } @@ -466,6 +489,20 @@ public java.util.Date getTimeCreated() { return timeCreated; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + /** * The prefix to apply to all snapshots created by this policy. *

@@ -548,6 +585,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(", policyPrefix=").append(String.valueOf(this.policyPrefix)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); @@ -571,6 +609,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.locks, other.locks) && java.util.Objects.equals(this.policyPrefix, other.policyPrefix) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) @@ -595,6 +634,7 @@ public int hashCode() { + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + (this.policyPrefix == null ? 43 : this.policyPrefix.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/LdapBindAccount.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/LdapBindAccount.java index ea5d3d25eaf..8820d2b3b4b 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/LdapBindAccount.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/LdapBindAccount.java @@ -80,6 +80,15 @@ public Builder timeCreated(java.util.Date timeCreated) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") private java.util.Map freeformTags; @@ -177,6 +186,7 @@ public LdapBindAccount build() { this.lifecycleState, this.displayName, this.timeCreated, + this.locks, this.freeformTags, this.definedTags, this.endpoints, @@ -209,6 +219,9 @@ public Builder copy(LdapBindAccount model) { if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -250,6 +263,7 @@ public LdapBindAccount( LifecycleState lifecycleState, String displayName, java.util.Date timeCreated, + java.util.List locks, java.util.Map freeformTags, java.util.Map> definedTags, java.util.List endpoints, @@ -263,6 +277,7 @@ public LdapBindAccount( lifecycleState, displayName, timeCreated, + locks, freeformTags, definedTags); this.endpoints = endpoints; diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/LdapBindAccountSummary.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/LdapBindAccountSummary.java index ab3081ce303..68d4afefc70 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/LdapBindAccountSummary.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/LdapBindAccountSummary.java @@ -82,6 +82,15 @@ public Builder timeCreated(java.util.Date timeCreated) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") private java.util.Map freeformTags; @@ -147,6 +156,7 @@ public LdapBindAccountSummary build() { this.lifecycleState, this.displayName, this.timeCreated, + this.locks, this.freeformTags, this.definedTags, this.endpoints, @@ -177,6 +187,9 @@ public Builder copy(LdapBindAccountSummary model) { if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -212,6 +225,7 @@ public LdapBindAccountSummary( LifecycleState lifecycleState, String displayName, java.util.Date timeCreated, + java.util.List locks, java.util.Map freeformTags, java.util.Map> definedTags, java.util.List endpoints, @@ -223,6 +237,7 @@ public LdapBindAccountSummary( lifecycleState, displayName, timeCreated, + locks, freeformTags, definedTags); this.endpoints = endpoints; diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/MountTarget.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/MountTarget.java index 9ad93cf3272..a8e8f19d771 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/MountTarget.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/MountTarget.java @@ -36,7 +36,12 @@ public final class MountTarget extends com.oracle.bmc.http.internal.ExplicitlySe "ldapIdmap", "nsgIds", "kerberos", + "timeBillingCycleEnd", + "observedThroughput", + "requestedThroughput", + "reservedStorageCapacity", "timeCreated", + "locks", "freeformTags", "definedTags" }) @@ -54,7 +59,12 @@ public MountTarget( LdapIdmap ldapIdmap, java.util.List nsgIds, Kerberos kerberos, + java.util.Date timeBillingCycleEnd, + Long observedThroughput, + Long requestedThroughput, + Long reservedStorageCapacity, java.util.Date timeCreated, + java.util.List locks, java.util.Map freeformTags, java.util.Map> definedTags) { super(); @@ -71,7 +81,12 @@ public MountTarget( this.ldapIdmap = ldapIdmap; this.nsgIds = nsgIds; this.kerberos = kerberos; + this.timeBillingCycleEnd = timeBillingCycleEnd; + this.observedThroughput = observedThroughput; + this.requestedThroughput = requestedThroughput; + this.reservedStorageCapacity = reservedStorageCapacity; this.timeCreated = timeCreated; + this.locks = locks; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -302,6 +317,88 @@ public Builder kerberos(Kerberos kerberos) { this.__explicitlySet__.add("kerberos"); return this; } + /** + * The date and time the mount target current billing cycle will end and next one starts, expressed + * in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBillingCycleEnd") + private java.util.Date timeBillingCycleEnd; + + /** + * The date and time the mount target current billing cycle will end and next one starts, expressed + * in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeBillingCycleEnd the value to set + * @return this builder + **/ + public Builder timeBillingCycleEnd(java.util.Date timeBillingCycleEnd) { + this.timeBillingCycleEnd = timeBillingCycleEnd; + this.__explicitlySet__.add("timeBillingCycleEnd"); + return this; + } + /** + * Current billed throughput for mount target in Gbps. This corresponds to shape of mount target. + * Available shapes and corresponding throughput are listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("observedThroughput") + private Long observedThroughput; + + /** + * Current billed throughput for mount target in Gbps. This corresponds to shape of mount target. + * Available shapes and corresponding throughput are listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + * @param observedThroughput the value to set + * @return this builder + **/ + public Builder observedThroughput(Long observedThroughput) { + this.observedThroughput = observedThroughput; + this.__explicitlySet__.add("observedThroughput"); + return this; + } + /** + * - New throughput for mount target at the end of billing cycle in Gbps. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestedThroughput") + private Long requestedThroughput; + + /** + * - New throughput for mount target at the end of billing cycle in Gbps. + * + * @param requestedThroughput the value to set + * @return this builder + **/ + public Builder requestedThroughput(Long requestedThroughput) { + this.requestedThroughput = requestedThroughput; + this.__explicitlySet__.add("requestedThroughput"); + return this; + } + /** + * - Reserved capacity (GB) associated with this mount target. Reserved capacity depends on observedThroughput value + * of mount target. Value is listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reservedStorageCapacity") + private Long reservedStorageCapacity; + + /** + * - Reserved capacity (GB) associated with this mount target. Reserved capacity depends on observedThroughput value + * of mount target. Value is listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + * @param reservedStorageCapacity the value to set + * @return this builder + **/ + public Builder reservedStorageCapacity(Long reservedStorageCapacity) { + this.reservedStorageCapacity = reservedStorageCapacity; + this.__explicitlySet__.add("reservedStorageCapacity"); + return this; + } /** * The date and time the mount target was created, expressed * in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. @@ -326,6 +423,22 @@ public Builder timeCreated(java.util.Date timeCreated) { this.__explicitlySet__.add("timeCreated"); return this; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair * with no predefined name, type, or namespace. @@ -393,7 +506,12 @@ public MountTarget build() { this.ldapIdmap, this.nsgIds, this.kerberos, + this.timeBillingCycleEnd, + this.observedThroughput, + this.requestedThroughput, + this.reservedStorageCapacity, this.timeCreated, + this.locks, this.freeformTags, this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -443,9 +561,24 @@ public Builder copy(MountTarget model) { if (model.wasPropertyExplicitlySet("kerberos")) { this.kerberos(model.getKerberos()); } + if (model.wasPropertyExplicitlySet("timeBillingCycleEnd")) { + this.timeBillingCycleEnd(model.getTimeBillingCycleEnd()); + } + if (model.wasPropertyExplicitlySet("observedThroughput")) { + this.observedThroughput(model.getObservedThroughput()); + } + if (model.wasPropertyExplicitlySet("requestedThroughput")) { + this.requestedThroughput(model.getRequestedThroughput()); + } + if (model.wasPropertyExplicitlySet("reservedStorageCapacity")) { + this.reservedStorageCapacity(model.getReservedStorageCapacity()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -582,6 +715,7 @@ public enum LifecycleState { Deleting("DELETING"), Deleted("DELETED"), Failed("FAILED"), + Updating("UPDATING"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -764,6 +898,80 @@ public Kerberos getKerberos() { return kerberos; } + /** + * The date and time the mount target current billing cycle will end and next one starts, expressed + * in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBillingCycleEnd") + private final java.util.Date timeBillingCycleEnd; + + /** + * The date and time the mount target current billing cycle will end and next one starts, expressed + * in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeBillingCycleEnd() { + return timeBillingCycleEnd; + } + + /** + * Current billed throughput for mount target in Gbps. This corresponds to shape of mount target. + * Available shapes and corresponding throughput are listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("observedThroughput") + private final Long observedThroughput; + + /** + * Current billed throughput for mount target in Gbps. This corresponds to shape of mount target. + * Available shapes and corresponding throughput are listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + * @return the value + **/ + public Long getObservedThroughput() { + return observedThroughput; + } + + /** + * - New throughput for mount target at the end of billing cycle in Gbps. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestedThroughput") + private final Long requestedThroughput; + + /** + * - New throughput for mount target at the end of billing cycle in Gbps. + * + * @return the value + **/ + public Long getRequestedThroughput() { + return requestedThroughput; + } + + /** + * - Reserved capacity (GB) associated with this mount target. Reserved capacity depends on observedThroughput value + * of mount target. Value is listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reservedStorageCapacity") + private final Long reservedStorageCapacity; + + /** + * - Reserved capacity (GB) associated with this mount target. Reserved capacity depends on observedThroughput value + * of mount target. Value is listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + * @return the value + **/ + public Long getReservedStorageCapacity() { + return reservedStorageCapacity; + } + /** * The date and time the mount target was created, expressed * in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. @@ -786,6 +994,20 @@ public java.util.Date getTimeCreated() { return timeCreated; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair * with no predefined name, type, or namespace. @@ -855,7 +1077,13 @@ public String toString(boolean includeByteArrayContents) { sb.append(", ldapIdmap=").append(String.valueOf(this.ldapIdmap)); sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); sb.append(", kerberos=").append(String.valueOf(this.kerberos)); + sb.append(", timeBillingCycleEnd=").append(String.valueOf(this.timeBillingCycleEnd)); + sb.append(", observedThroughput=").append(String.valueOf(this.observedThroughput)); + sb.append(", requestedThroughput=").append(String.valueOf(this.requestedThroughput)); + sb.append(", reservedStorageCapacity=") + .append(String.valueOf(this.reservedStorageCapacity)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -885,7 +1113,13 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.ldapIdmap, other.ldapIdmap) && java.util.Objects.equals(this.nsgIds, other.nsgIds) && java.util.Objects.equals(this.kerberos, other.kerberos) + && java.util.Objects.equals(this.timeBillingCycleEnd, other.timeBillingCycleEnd) + && java.util.Objects.equals(this.observedThroughput, other.observedThroughput) + && java.util.Objects.equals(this.requestedThroughput, other.requestedThroughput) + && java.util.Objects.equals( + this.reservedStorageCapacity, other.reservedStorageCapacity) && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.locks, other.locks) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -918,7 +1152,28 @@ public int hashCode() { result = (result * PRIME) + (this.ldapIdmap == null ? 43 : this.ldapIdmap.hashCode()); result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); result = (result * PRIME) + (this.kerberos == null ? 43 : this.kerberos.hashCode()); + result = + (result * PRIME) + + (this.timeBillingCycleEnd == null + ? 43 + : this.timeBillingCycleEnd.hashCode()); + result = + (result * PRIME) + + (this.observedThroughput == null + ? 43 + : this.observedThroughput.hashCode()); + result = + (result * PRIME) + + (this.requestedThroughput == null + ? 43 + : this.requestedThroughput.hashCode()); + result = + (result * PRIME) + + (this.reservedStorageCapacity == null + ? 43 + : this.reservedStorageCapacity.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/MountTargetSummary.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/MountTargetSummary.java index 69bf5c619fd..265351a99c7 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/MountTargetSummary.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/MountTargetSummary.java @@ -32,7 +32,12 @@ public final class MountTargetSummary extends com.oracle.bmc.http.internal.Expli "privateIpIds", "subnetId", "nsgIds", + "timeBillingCycleEnd", + "observedThroughput", + "requestedThroughput", + "reservedStorageCapacity", "timeCreated", + "locks", "freeformTags", "definedTags" }) @@ -46,7 +51,12 @@ public MountTargetSummary( java.util.List privateIpIds, String subnetId, java.util.List nsgIds, + java.util.Date timeBillingCycleEnd, + Long observedThroughput, + Long requestedThroughput, + Long reservedStorageCapacity, java.util.Date timeCreated, + java.util.List locks, java.util.Map freeformTags, java.util.Map> definedTags) { super(); @@ -59,7 +69,12 @@ public MountTargetSummary( this.privateIpIds = privateIpIds; this.subnetId = subnetId; this.nsgIds = nsgIds; + this.timeBillingCycleEnd = timeBillingCycleEnd; + this.observedThroughput = observedThroughput; + this.requestedThroughput = requestedThroughput; + this.reservedStorageCapacity = reservedStorageCapacity; this.timeCreated = timeCreated; + this.locks = locks; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -240,6 +255,90 @@ public Builder nsgIds(java.util.List nsgIds) { this.__explicitlySet__.add("nsgIds"); return this; } + /** + * The date and time the mount target current billing cycle will end, expressed in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. Once a cycle ends, it is updated + * automatically to next timestamp which is after 30 days. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBillingCycleEnd") + private java.util.Date timeBillingCycleEnd; + + /** + * The date and time the mount target current billing cycle will end, expressed in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. Once a cycle ends, it is updated + * automatically to next timestamp which is after 30 days. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeBillingCycleEnd the value to set + * @return this builder + **/ + public Builder timeBillingCycleEnd(java.util.Date timeBillingCycleEnd) { + this.timeBillingCycleEnd = timeBillingCycleEnd; + this.__explicitlySet__.add("timeBillingCycleEnd"); + return this; + } + /** + * Current billed throughput for mount target in Gbps. This corresponds to shape of mount target. + * Available shapes and corresponding throughput are listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("observedThroughput") + private Long observedThroughput; + + /** + * Current billed throughput for mount target in Gbps. This corresponds to shape of mount target. + * Available shapes and corresponding throughput are listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + * @param observedThroughput the value to set + * @return this builder + **/ + public Builder observedThroughput(Long observedThroughput) { + this.observedThroughput = observedThroughput; + this.__explicitlySet__.add("observedThroughput"); + return this; + } + /** + * - New throughput for mount target at the end of billing cycle in Gbps. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestedThroughput") + private Long requestedThroughput; + + /** + * - New throughput for mount target at the end of billing cycle in Gbps. + * + * @param requestedThroughput the value to set + * @return this builder + **/ + public Builder requestedThroughput(Long requestedThroughput) { + this.requestedThroughput = requestedThroughput; + this.__explicitlySet__.add("requestedThroughput"); + return this; + } + /** + * - Reserved capacity (GB) associated with this mount target. Reserved capacity depends on observedThroughput value + * of mount target. Value is listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reservedStorageCapacity") + private Long reservedStorageCapacity; + + /** + * - Reserved capacity (GB) associated with this mount target. Reserved capacity depends on observedThroughput value + * of mount target. Value is listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + * @param reservedStorageCapacity the value to set + * @return this builder + **/ + public Builder reservedStorageCapacity(Long reservedStorageCapacity) { + this.reservedStorageCapacity = reservedStorageCapacity; + this.__explicitlySet__.add("reservedStorageCapacity"); + return this; + } /** * The date and time the mount target was created, expressed * in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. @@ -264,6 +363,22 @@ public Builder timeCreated(java.util.Date timeCreated) { this.__explicitlySet__.add("timeCreated"); return this; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair * with no predefined name, type, or namespace. @@ -327,7 +442,12 @@ public MountTargetSummary build() { this.privateIpIds, this.subnetId, this.nsgIds, + this.timeBillingCycleEnd, + this.observedThroughput, + this.requestedThroughput, + this.reservedStorageCapacity, this.timeCreated, + this.locks, this.freeformTags, this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -365,9 +485,24 @@ public Builder copy(MountTargetSummary model) { if (model.wasPropertyExplicitlySet("nsgIds")) { this.nsgIds(model.getNsgIds()); } + if (model.wasPropertyExplicitlySet("timeBillingCycleEnd")) { + this.timeBillingCycleEnd(model.getTimeBillingCycleEnd()); + } + if (model.wasPropertyExplicitlySet("observedThroughput")) { + this.observedThroughput(model.getObservedThroughput()); + } + if (model.wasPropertyExplicitlySet("requestedThroughput")) { + this.requestedThroughput(model.getRequestedThroughput()); + } + if (model.wasPropertyExplicitlySet("reservedStorageCapacity")) { + this.reservedStorageCapacity(model.getReservedStorageCapacity()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -490,6 +625,7 @@ public enum LifecycleState { Deleting("DELETING"), Deleted("DELETED"), Failed("FAILED"), + Updating("UPDATING"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -596,6 +732,82 @@ public java.util.List getNsgIds() { return nsgIds; } + /** + * The date and time the mount target current billing cycle will end, expressed in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. Once a cycle ends, it is updated + * automatically to next timestamp which is after 30 days. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeBillingCycleEnd") + private final java.util.Date timeBillingCycleEnd; + + /** + * The date and time the mount target current billing cycle will end, expressed in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. Once a cycle ends, it is updated + * automatically to next timestamp which is after 30 days. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeBillingCycleEnd() { + return timeBillingCycleEnd; + } + + /** + * Current billed throughput for mount target in Gbps. This corresponds to shape of mount target. + * Available shapes and corresponding throughput are listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("observedThroughput") + private final Long observedThroughput; + + /** + * Current billed throughput for mount target in Gbps. This corresponds to shape of mount target. + * Available shapes and corresponding throughput are listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + * @return the value + **/ + public Long getObservedThroughput() { + return observedThroughput; + } + + /** + * - New throughput for mount target at the end of billing cycle in Gbps. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestedThroughput") + private final Long requestedThroughput; + + /** + * - New throughput for mount target at the end of billing cycle in Gbps. + * + * @return the value + **/ + public Long getRequestedThroughput() { + return requestedThroughput; + } + + /** + * - Reserved capacity (GB) associated with this mount target. Reserved capacity depends on observedThroughput value + * of mount target. Value is listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reservedStorageCapacity") + private final Long reservedStorageCapacity; + + /** + * - Reserved capacity (GB) associated with this mount target. Reserved capacity depends on observedThroughput value + * of mount target. Value is listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + * @return the value + **/ + public Long getReservedStorageCapacity() { + return reservedStorageCapacity; + } + /** * The date and time the mount target was created, expressed * in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. @@ -618,6 +830,20 @@ public java.util.Date getTimeCreated() { return timeCreated; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair * with no predefined name, type, or namespace. @@ -683,7 +909,13 @@ public String toString(boolean includeByteArrayContents) { sb.append(", privateIpIds=").append(String.valueOf(this.privateIpIds)); sb.append(", subnetId=").append(String.valueOf(this.subnetId)); sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); + sb.append(", timeBillingCycleEnd=").append(String.valueOf(this.timeBillingCycleEnd)); + sb.append(", observedThroughput=").append(String.valueOf(this.observedThroughput)); + sb.append(", requestedThroughput=").append(String.valueOf(this.requestedThroughput)); + sb.append(", reservedStorageCapacity=") + .append(String.valueOf(this.reservedStorageCapacity)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -709,7 +941,13 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.privateIpIds, other.privateIpIds) && java.util.Objects.equals(this.subnetId, other.subnetId) && java.util.Objects.equals(this.nsgIds, other.nsgIds) + && java.util.Objects.equals(this.timeBillingCycleEnd, other.timeBillingCycleEnd) + && java.util.Objects.equals(this.observedThroughput, other.observedThroughput) + && java.util.Objects.equals(this.requestedThroughput, other.requestedThroughput) + && java.util.Objects.equals( + this.reservedStorageCapacity, other.reservedStorageCapacity) && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.locks, other.locks) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -736,7 +974,28 @@ public int hashCode() { result = (result * PRIME) + (this.privateIpIds == null ? 43 : this.privateIpIds.hashCode()); result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); + result = + (result * PRIME) + + (this.timeBillingCycleEnd == null + ? 43 + : this.timeBillingCycleEnd.hashCode()); + result = + (result * PRIME) + + (this.observedThroughput == null + ? 43 + : this.observedThroughput.hashCode()); + result = + (result * PRIME) + + (this.requestedThroughput == null + ? 43 + : this.requestedThroughput.hashCode()); + result = + (result * PRIME) + + (this.reservedStorageCapacity == null + ? 43 + : this.reservedStorageCapacity.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/OutboundConnector.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/OutboundConnector.java index 5e8055f99cc..7d2765ad7cb 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/OutboundConnector.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/OutboundConnector.java @@ -39,6 +39,7 @@ public class OutboundConnector extends com.oracle.bmc.http.internal.ExplicitlySe "lifecycleState", "displayName", "timeCreated", + "locks", "freeformTags", "definedTags" }) @@ -49,6 +50,7 @@ protected OutboundConnector( LifecycleState lifecycleState, String displayName, java.util.Date timeCreated, + java.util.List locks, java.util.Map freeformTags, java.util.Map> definedTags) { super(); @@ -58,6 +60,7 @@ protected OutboundConnector( this.lifecycleState = lifecycleState; this.displayName = displayName; this.timeCreated = timeCreated; + this.locks = locks; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -220,6 +223,20 @@ public java.util.Date getTimeCreated() { return timeCreated; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair * with no predefined name, type, or namespace. @@ -282,6 +299,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -304,6 +322,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.locks, other.locks) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -327,6 +346,7 @@ public int hashCode() { + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/OutboundConnectorSummary.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/OutboundConnectorSummary.java index 0a6b8ca3b29..b082ef92bac 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/OutboundConnectorSummary.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/OutboundConnectorSummary.java @@ -38,6 +38,7 @@ public class OutboundConnectorSummary extends com.oracle.bmc.http.internal.Expli "lifecycleState", "displayName", "timeCreated", + "locks", "freeformTags", "definedTags" }) @@ -48,6 +49,7 @@ protected OutboundConnectorSummary( LifecycleState lifecycleState, String displayName, java.util.Date timeCreated, + java.util.List locks, java.util.Map freeformTags, java.util.Map> definedTags) { super(); @@ -57,6 +59,7 @@ protected OutboundConnectorSummary( this.lifecycleState = lifecycleState; this.displayName = displayName; this.timeCreated = timeCreated; + this.locks = locks; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -217,6 +220,20 @@ public java.util.Date getTimeCreated() { return timeCreated; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair * with no predefined name, type, or namespace. @@ -279,6 +296,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -301,6 +319,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.locks, other.locks) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -324,6 +343,7 @@ public int hashCode() { + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/Replication.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/Replication.java index 8e314aabbd5..8131dbb29a3 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/Replication.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/Replication.java @@ -41,6 +41,7 @@ public final class Replication extends com.oracle.bmc.http.internal.ExplicitlySe "deltaStatus", "lifecycleDetails", "deltaProgress", + "locks", "freeformTags", "definedTags" }) @@ -60,6 +61,7 @@ public Replication( DeltaStatus deltaStatus, String lifecycleDetails, Long deltaProgress, + java.util.List locks, java.util.Map freeformTags, java.util.Map> definedTags) { super(); @@ -78,6 +80,7 @@ public Replication( this.deltaStatus = deltaStatus; this.lifecycleDetails = lifecycleDetails; this.deltaProgress = deltaProgress; + this.locks = locks; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -362,6 +365,22 @@ public Builder deltaProgress(Long deltaProgress) { this.__explicitlySet__.add("deltaProgress"); return this; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair * with no predefined name, type, or namespace. @@ -431,6 +450,7 @@ public Replication build() { this.deltaStatus, this.lifecycleDetails, this.deltaProgress, + this.locks, this.freeformTags, this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -486,6 +506,9 @@ public Builder copy(Replication model) { if (model.wasPropertyExplicitlySet("deltaProgress")) { this.deltaProgress(model.getDeltaProgress()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -859,6 +882,20 @@ public Long getDeltaProgress() { return deltaProgress; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair * with no predefined name, type, or namespace. @@ -930,6 +967,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", deltaStatus=").append(String.valueOf(this.deltaStatus)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", deltaProgress=").append(String.valueOf(this.deltaProgress)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -961,6 +999,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.deltaStatus, other.deltaStatus) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.deltaProgress, other.deltaProgress) + && java.util.Objects.equals(this.locks, other.locks) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -1009,6 +1048,7 @@ public int hashCode() { result = (result * PRIME) + (this.deltaProgress == null ? 43 : this.deltaProgress.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/ReplicationSummary.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/ReplicationSummary.java index 4adee847584..34642aa71a2 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/ReplicationSummary.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/ReplicationSummary.java @@ -29,6 +29,7 @@ public final class ReplicationSummary extends com.oracle.bmc.http.internal.Expli "lifecycleState", "displayName", "timeCreated", + "locks", "replicationInterval", "freeformTags", "definedTags", @@ -42,6 +43,7 @@ public ReplicationSummary( LifecycleState lifecycleState, String displayName, java.util.Date timeCreated, + java.util.List locks, Long replicationInterval, java.util.Map freeformTags, java.util.Map> definedTags, @@ -54,6 +56,7 @@ public ReplicationSummary( this.lifecycleState = lifecycleState; this.displayName = displayName; this.timeCreated = timeCreated; + this.locks = locks; this.replicationInterval = replicationInterval; this.freeformTags = freeformTags; this.definedTags = definedTags; @@ -179,6 +182,22 @@ public Builder timeCreated(java.util.Date timeCreated) { this.__explicitlySet__.add("timeCreated"); return this; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } /** * Duration in minutes between replication snapshots. **/ @@ -293,6 +312,7 @@ public ReplicationSummary build() { this.lifecycleState, this.displayName, this.timeCreated, + this.locks, this.replicationInterval, this.freeformTags, this.definedTags, @@ -324,6 +344,9 @@ public Builder copy(ReplicationSummary model) { if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } if (model.wasPropertyExplicitlySet("replicationInterval")) { this.replicationInterval(model.getReplicationInterval()); } @@ -511,6 +534,20 @@ public java.util.Date getTimeCreated() { return timeCreated; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + /** * Duration in minutes between replication snapshots. **/ @@ -621,6 +658,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(", replicationInterval=").append(String.valueOf(this.replicationInterval)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); @@ -646,6 +684,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.locks, other.locks) && java.util.Objects.equals(this.replicationInterval, other.replicationInterval) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) @@ -672,6 +711,7 @@ public int hashCode() { + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + (this.replicationInterval == null diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/ResourceLock.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/ResourceLock.java new file mode 100644 index 00000000000..3d66a2e80a4 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/ResourceLock.java @@ -0,0 +1,310 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.model; + +/** + * Resource locks are used to prevent certain APIs from being called for the resource. + * A full lock prevents both updating the resource and deleting the resource. A delete + * lock prevents deleting the resource. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ResourceLock.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ResourceLock extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"type", "relatedResourceId", "message", "timeCreated"}) + public ResourceLock( + Type type, String relatedResourceId, String message, java.util.Date timeCreated) { + super(); + this.type = type; + this.relatedResourceId = relatedResourceId; + this.message = message; + this.timeCreated = timeCreated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Type of the lock. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * Type of the lock. + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("relatedResourceId") + private String relatedResourceId; + + /** + * The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * + * @param relatedResourceId the value to set + * @return this builder + **/ + public Builder relatedResourceId(String relatedResourceId) { + this.relatedResourceId = relatedResourceId; + this.__explicitlySet__.add("relatedResourceId"); + return this; + } + /** + * A message added by the creator of the lock. This is typically used to give an + * indication of why the resource is locked. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * A message added by the creator of the lock. This is typically used to give an + * indication of why the resource is locked. + * + * @param message the value to set + * @return this builder + **/ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + /** + * When the lock was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * When the lock was created. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ResourceLock build() { + ResourceLock model = + new ResourceLock( + this.type, this.relatedResourceId, this.message, this.timeCreated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ResourceLock model) { + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("relatedResourceId")) { + this.relatedResourceId(model.getRelatedResourceId()); + } + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Type of the lock. + **/ + public enum Type { + Full("FULL"), + Delete("DELETE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * Type of the lock. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * Type of the lock. + * @return the value + **/ + public Type getType() { + return type; + } + + /** + * The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("relatedResourceId") + private final String relatedResourceId; + + /** + * The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * + * @return the value + **/ + public String getRelatedResourceId() { + return relatedResourceId; + } + + /** + * A message added by the creator of the lock. This is typically used to give an + * indication of why the resource is locked. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * A message added by the creator of the lock. This is typically used to give an + * indication of why the resource is locked. + * + * @return the value + **/ + public String getMessage() { + return message; + } + + /** + * When the lock was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * When the lock was created. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ResourceLock("); + sb.append("super=").append(super.toString()); + sb.append("type=").append(String.valueOf(this.type)); + sb.append(", relatedResourceId=").append(String.valueOf(this.relatedResourceId)); + sb.append(", message=").append(String.valueOf(this.message)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ResourceLock)) { + return false; + } + + ResourceLock other = (ResourceLock) o; + return java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.relatedResourceId, other.relatedResourceId) + && java.util.Objects.equals(this.message, other.message) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.relatedResourceId == null ? 43 : this.relatedResourceId.hashCode()); + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/ScheduleDowngradeShapeMountTargetDetails.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/ScheduleDowngradeShapeMountTargetDetails.java new file mode 100644 index 00000000000..436a821ea68 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/ScheduleDowngradeShapeMountTargetDetails.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.model; + +/** + * Shape details about the Mount Target. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ScheduleDowngradeShapeMountTargetDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ScheduleDowngradeShapeMountTargetDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"requestedThroughput"}) + public ScheduleDowngradeShapeMountTargetDetails(Long requestedThroughput) { + super(); + this.requestedThroughput = requestedThroughput; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * New throughput for mount target in Gbps. Available shapes and corresponding throughput are listed at + * [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestedThroughput") + private Long requestedThroughput; + + /** + * New throughput for mount target in Gbps. Available shapes and corresponding throughput are listed at + * [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + * @param requestedThroughput the value to set + * @return this builder + **/ + public Builder requestedThroughput(Long requestedThroughput) { + this.requestedThroughput = requestedThroughput; + this.__explicitlySet__.add("requestedThroughput"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ScheduleDowngradeShapeMountTargetDetails build() { + ScheduleDowngradeShapeMountTargetDetails model = + new ScheduleDowngradeShapeMountTargetDetails(this.requestedThroughput); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ScheduleDowngradeShapeMountTargetDetails model) { + if (model.wasPropertyExplicitlySet("requestedThroughput")) { + this.requestedThroughput(model.getRequestedThroughput()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * New throughput for mount target in Gbps. Available shapes and corresponding throughput are listed at + * [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestedThroughput") + private final Long requestedThroughput; + + /** + * New throughput for mount target in Gbps. Available shapes and corresponding throughput are listed at + * [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + * @return the value + **/ + public Long getRequestedThroughput() { + return requestedThroughput; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ScheduleDowngradeShapeMountTargetDetails("); + sb.append("super=").append(super.toString()); + sb.append("requestedThroughput=").append(String.valueOf(this.requestedThroughput)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ScheduleDowngradeShapeMountTargetDetails)) { + return false; + } + + ScheduleDowngradeShapeMountTargetDetails other = + (ScheduleDowngradeShapeMountTargetDetails) o; + return java.util.Objects.equals(this.requestedThroughput, other.requestedThroughput) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.requestedThroughput == null + ? 43 + : this.requestedThroughput.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/Snapshot.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/Snapshot.java index 93b36673a53..493461be93b 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/Snapshot.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/Snapshot.java @@ -31,6 +31,7 @@ public final class Snapshot extends com.oracle.bmc.http.internal.ExplicitlySetBm "provenanceId", "isCloneSource", "lifecycleDetails", + "locks", "freeformTags", "definedTags", "expirationTime", @@ -47,6 +48,7 @@ public Snapshot( String provenanceId, Boolean isCloneSource, String lifecycleDetails, + java.util.List locks, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Date expirationTime, @@ -62,6 +64,7 @@ public Snapshot( this.provenanceId = provenanceId; this.isCloneSource = isCloneSource; this.lifecycleDetails = lifecycleDetails; + this.locks = locks; this.freeformTags = freeformTags; this.definedTags = definedTags; this.expirationTime = expirationTime; @@ -284,6 +287,22 @@ public Builder lifecycleDetails(String lifecycleDetails) { this.__explicitlySet__.add("lifecycleDetails"); return this; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair * with no predefined name, type, or namespace. @@ -382,6 +401,7 @@ public Snapshot build() { this.provenanceId, this.isCloneSource, this.lifecycleDetails, + this.locks, this.freeformTags, this.definedTags, this.expirationTime, @@ -424,6 +444,9 @@ public Builder copy(Snapshot model) { if (model.wasPropertyExplicitlySet("lifecycleDetails")) { this.lifecycleDetails(model.getLifecycleDetails()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -745,6 +768,20 @@ public String getLifecycleDetails() { return lifecycleDetails; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair * with no predefined name, type, or namespace. @@ -841,6 +878,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", provenanceId=").append(String.valueOf(this.provenanceId)); sb.append(", isCloneSource=").append(String.valueOf(this.isCloneSource)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", expirationTime=").append(String.valueOf(this.expirationTime)); @@ -870,6 +908,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.provenanceId, other.provenanceId) && java.util.Objects.equals(this.isCloneSource, other.isCloneSource) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.locks, other.locks) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.expirationTime, other.expirationTime) @@ -898,6 +937,7 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/SnapshotSchedule.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/SnapshotSchedule.java index 0d5e58fee06..72a9250e48d 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/SnapshotSchedule.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/SnapshotSchedule.java @@ -154,7 +154,7 @@ public Builder timeZone(TimeZone timeZone) { } /** * The hour of the day to create a DAILY, WEEKLY, MONTHLY, or YEARLY snapshot. - * If not set, a value will be chosen at creation time. + * If not set, the system chooses a value at creation time. * **/ @com.fasterxml.jackson.annotation.JsonProperty("hourOfDay") @@ -162,7 +162,7 @@ public Builder timeZone(TimeZone timeZone) { /** * The hour of the day to create a DAILY, WEEKLY, MONTHLY, or YEARLY snapshot. - * If not set, a value will be chosen at creation time. + * If not set, the system chooses a value at creation time. * * @param hourOfDay the value to set * @return this builder @@ -175,6 +175,7 @@ public Builder hourOfDay(Integer hourOfDay) { /** * The day of the week to create a scheduled snapshot. * Used for WEEKLY snapshot schedules. + * If not set, the system chooses a value at creation time. * **/ @com.fasterxml.jackson.annotation.JsonProperty("dayOfWeek") @@ -183,6 +184,7 @@ public Builder hourOfDay(Integer hourOfDay) { /** * The day of the week to create a scheduled snapshot. * Used for WEEKLY snapshot schedules. + * If not set, the system chooses a value at creation time. * * @param dayOfWeek the value to set * @return this builder @@ -196,6 +198,7 @@ public Builder dayOfWeek(DayOfWeek dayOfWeek) { * The day of the month to create a scheduled snapshot. * If the day does not exist for the month, snapshot creation will be skipped. * Used for MONTHLY and YEARLY snapshot schedules. + * If not set, the system chooses a value at creation time. * **/ @com.fasterxml.jackson.annotation.JsonProperty("dayOfMonth") @@ -205,6 +208,7 @@ public Builder dayOfWeek(DayOfWeek dayOfWeek) { * The day of the month to create a scheduled snapshot. * If the day does not exist for the month, snapshot creation will be skipped. * Used for MONTHLY and YEARLY snapshot schedules. + * If not set, the system chooses a value at creation time. * * @param dayOfMonth the value to set * @return this builder @@ -217,6 +221,7 @@ public Builder dayOfMonth(Integer dayOfMonth) { /** * The month to create a scheduled snapshot. * Used only for YEARLY snapshot schedules. + * If not set, the system chooses a value at creation time. * **/ @com.fasterxml.jackson.annotation.JsonProperty("month") @@ -225,6 +230,7 @@ public Builder dayOfMonth(Integer dayOfMonth) { /** * The month to create a scheduled snapshot. * Used only for YEARLY snapshot schedules. + * If not set, the system chooses a value at creation time. * * @param month the value to set * @return this builder @@ -486,7 +492,7 @@ public TimeZone getTimeZone() { /** * The hour of the day to create a DAILY, WEEKLY, MONTHLY, or YEARLY snapshot. - * If not set, a value will be chosen at creation time. + * If not set, the system chooses a value at creation time. * **/ @com.fasterxml.jackson.annotation.JsonProperty("hourOfDay") @@ -494,7 +500,7 @@ public TimeZone getTimeZone() { /** * The hour of the day to create a DAILY, WEEKLY, MONTHLY, or YEARLY snapshot. - * If not set, a value will be chosen at creation time. + * If not set, the system chooses a value at creation time. * * @return the value **/ @@ -505,6 +511,7 @@ public Integer getHourOfDay() { /** * The day of the week to create a scheduled snapshot. * Used for WEEKLY snapshot schedules. + * If not set, the system chooses a value at creation time. * **/ public enum DayOfWeek { @@ -560,6 +567,7 @@ public static DayOfWeek create(String key) { /** * The day of the week to create a scheduled snapshot. * Used for WEEKLY snapshot schedules. + * If not set, the system chooses a value at creation time. * **/ @com.fasterxml.jackson.annotation.JsonProperty("dayOfWeek") @@ -568,6 +576,7 @@ public static DayOfWeek create(String key) { /** * The day of the week to create a scheduled snapshot. * Used for WEEKLY snapshot schedules. + * If not set, the system chooses a value at creation time. * * @return the value **/ @@ -579,6 +588,7 @@ public DayOfWeek getDayOfWeek() { * The day of the month to create a scheduled snapshot. * If the day does not exist for the month, snapshot creation will be skipped. * Used for MONTHLY and YEARLY snapshot schedules. + * If not set, the system chooses a value at creation time. * **/ @com.fasterxml.jackson.annotation.JsonProperty("dayOfMonth") @@ -588,6 +598,7 @@ public DayOfWeek getDayOfWeek() { * The day of the month to create a scheduled snapshot. * If the day does not exist for the month, snapshot creation will be skipped. * Used for MONTHLY and YEARLY snapshot schedules. + * If not set, the system chooses a value at creation time. * * @return the value **/ @@ -598,6 +609,7 @@ public Integer getDayOfMonth() { /** * The month to create a scheduled snapshot. * Used only for YEARLY snapshot schedules. + * If not set, the system chooses a value at creation time. * **/ public enum Month { @@ -657,6 +669,7 @@ public static Month create(String key) { /** * The month to create a scheduled snapshot. * Used only for YEARLY snapshot schedules. + * If not set, the system chooses a value at creation time. * **/ @com.fasterxml.jackson.annotation.JsonProperty("month") @@ -665,6 +678,7 @@ public static Month create(String key) { /** * The month to create a scheduled snapshot. * Used only for YEARLY snapshot schedules. + * If not set, the system chooses a value at creation time. * * @return the value **/ diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/SnapshotSummary.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/SnapshotSummary.java index 7356f7f183d..dc41f8ba77d 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/SnapshotSummary.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/SnapshotSummary.java @@ -26,6 +26,7 @@ public final class SnapshotSummary extends com.oracle.bmc.http.internal.Explicit "lifecycleState", "name", "timeCreated", + "locks", "snapshotType", "snapshotTime", "expirationTime", @@ -41,6 +42,7 @@ public SnapshotSummary( LifecycleState lifecycleState, String name, java.util.Date timeCreated, + java.util.List locks, SnapshotType snapshotType, java.util.Date snapshotTime, java.util.Date expirationTime, @@ -55,6 +57,7 @@ public SnapshotSummary( this.lifecycleState = lifecycleState; this.name = name; this.timeCreated = timeCreated; + this.locks = locks; this.snapshotType = snapshotType; this.snapshotTime = snapshotTime; this.expirationTime = expirationTime; @@ -167,6 +170,22 @@ public Builder timeCreated(java.util.Date timeCreated) { this.__explicitlySet__.add("timeCreated"); return this; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private java.util.List locks; + + /** + * Locks associated with this resource. + * @param locks the value to set + * @return this builder + **/ + public Builder locks(java.util.List locks) { + this.locks = locks; + this.__explicitlySet__.add("locks"); + return this; + } /** * Specifies the generation type of the snapshot. * @@ -354,6 +373,7 @@ public SnapshotSummary build() { this.lifecycleState, this.name, this.timeCreated, + this.locks, this.snapshotType, this.snapshotTime, this.expirationTime, @@ -385,6 +405,9 @@ public Builder copy(SnapshotSummary model) { if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } + if (model.wasPropertyExplicitlySet("locks")) { + this.locks(model.getLocks()); + } if (model.wasPropertyExplicitlySet("snapshotType")) { this.snapshotType(model.getSnapshotType()); } @@ -564,6 +587,20 @@ public java.util.Date getTimeCreated() { return timeCreated; } + /** + * Locks associated with this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("locks") + private final java.util.List locks; + + /** + * Locks associated with this resource. + * @return the value + **/ + public java.util.List getLocks() { + return locks; + } + /** * Specifies the generation type of the snapshot. * @@ -791,6 +828,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", name=").append(String.valueOf(this.name)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(", snapshotType=").append(String.valueOf(this.snapshotType)); sb.append(", snapshotTime=").append(String.valueOf(this.snapshotTime)); sb.append(", expirationTime=").append(String.valueOf(this.expirationTime)); @@ -818,6 +856,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.name, other.name) && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.locks, other.locks) && java.util.Objects.equals(this.snapshotType, other.snapshotType) && java.util.Objects.equals(this.snapshotTime, other.snapshotTime) && java.util.Objects.equals(this.expirationTime, other.expirationTime) @@ -840,6 +879,7 @@ public int hashCode() { + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + (this.snapshotType == null ? 43 : this.snapshotType.hashCode()); result = (result * PRIME) + (this.snapshotTime == null ? 43 : this.snapshotTime.hashCode()); result = diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/UpgradeShapeMountTargetDetails.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/UpgradeShapeMountTargetDetails.java new file mode 100644 index 00000000000..497d639bb3f --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/UpgradeShapeMountTargetDetails.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.model; + +/** + * Shape details about the Mount Target. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpgradeShapeMountTargetDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpgradeShapeMountTargetDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"requestedThroughput"}) + public UpgradeShapeMountTargetDetails(Long requestedThroughput) { + super(); + this.requestedThroughput = requestedThroughput; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * New throughput for mount target in Gbps. Available shapes and corresponding throughput are listed at + * [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestedThroughput") + private Long requestedThroughput; + + /** + * New throughput for mount target in Gbps. Available shapes and corresponding throughput are listed at + * [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + * @param requestedThroughput the value to set + * @return this builder + **/ + public Builder requestedThroughput(Long requestedThroughput) { + this.requestedThroughput = requestedThroughput; + this.__explicitlySet__.add("requestedThroughput"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpgradeShapeMountTargetDetails build() { + UpgradeShapeMountTargetDetails model = + new UpgradeShapeMountTargetDetails(this.requestedThroughput); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpgradeShapeMountTargetDetails model) { + if (model.wasPropertyExplicitlySet("requestedThroughput")) { + this.requestedThroughput(model.getRequestedThroughput()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * New throughput for mount target in Gbps. Available shapes and corresponding throughput are listed at + * [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestedThroughput") + private final Long requestedThroughput; + + /** + * New throughput for mount target in Gbps. Available shapes and corresponding throughput are listed at + * [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). + * + * @return the value + **/ + public Long getRequestedThroughput() { + return requestedThroughput; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpgradeShapeMountTargetDetails("); + sb.append("super=").append(super.toString()); + sb.append("requestedThroughput=").append(String.valueOf(this.requestedThroughput)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpgradeShapeMountTargetDetails)) { + return false; + } + + UpgradeShapeMountTargetDetails other = (UpgradeShapeMountTargetDetails) o; + return java.util.Objects.equals(this.requestedThroughput, other.requestedThroughput) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.requestedThroughput == null + ? 43 + : this.requestedThroughput.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddExportLockRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddExportLockRequest.java new file mode 100644 index 00000000000..6ac8ab8d224 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddExportLockRequest.java @@ -0,0 +1,314 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use AddExportLockRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddExportLockRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the export. + */ + private String exportId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the export. + */ + public String getExportId() { + return exportId; + } + /** + * The details to be updated for the AddLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock addExportLockDetails; + + /** + * The details to be updated for the AddLock. + */ + public com.oracle.bmc.filestorage.model.ResourceLock getAddExportLockDetails() { + return addExportLockDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.filestorage.model.ResourceLock getBody$() { + return addExportLockDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + AddExportLockRequest, com.oracle.bmc.filestorage.model.ResourceLock> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the export. + */ + private String exportId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the export. + * @param exportId the value to set + * @return this builder instance + */ + public Builder exportId(String exportId) { + this.exportId = exportId; + return this; + } + + /** + * The details to be updated for the AddLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock addExportLockDetails = null; + + /** + * The details to be updated for the AddLock. + * @param addExportLockDetails the value to set + * @return this builder instance + */ + public Builder addExportLockDetails( + com.oracle.bmc.filestorage.model.ResourceLock addExportLockDetails) { + this.addExportLockDetails = addExportLockDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddExportLockRequest o) { + exportId(o.getExportId()); + addExportLockDetails(o.getAddExportLockDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of AddExportLockRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of AddExportLockRequest + */ + public AddExportLockRequest build() { + AddExportLockRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.filestorage.model.ResourceLock body) { + addExportLockDetails(body); + return this; + } + + /** + * Build the instance of AddExportLockRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of AddExportLockRequest + */ + public AddExportLockRequest buildWithoutInvocationCallback() { + AddExportLockRequest request = new AddExportLockRequest(); + request.exportId = exportId; + request.addExportLockDetails = addExportLockDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new AddExportLockRequest(exportId, addExportLockDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .exportId(exportId) + .addExportLockDetails(addExportLockDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",exportId=").append(String.valueOf(this.exportId)); + sb.append(",addExportLockDetails=").append(String.valueOf(this.addExportLockDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddExportLockRequest)) { + return false; + } + + AddExportLockRequest other = (AddExportLockRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.exportId, other.exportId) + && java.util.Objects.equals(this.addExportLockDetails, other.addExportLockDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.exportId == null ? 43 : this.exportId.hashCode()); + result = + (result * PRIME) + + (this.addExportLockDetails == null + ? 43 + : this.addExportLockDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddFileSystemLockRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddFileSystemLockRequest.java new file mode 100644 index 00000000000..574f308220d --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddFileSystemLockRequest.java @@ -0,0 +1,316 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use AddFileSystemLockRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddFileSystemLockRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system. + */ + private String fileSystemId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system. + */ + public String getFileSystemId() { + return fileSystemId; + } + /** + * The details to be updated for the AddLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock addFileSystemLockDetails; + + /** + * The details to be updated for the AddLock. + */ + public com.oracle.bmc.filestorage.model.ResourceLock getAddFileSystemLockDetails() { + return addFileSystemLockDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.filestorage.model.ResourceLock getBody$() { + return addFileSystemLockDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + AddFileSystemLockRequest, com.oracle.bmc.filestorage.model.ResourceLock> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system. + */ + private String fileSystemId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system. + * @param fileSystemId the value to set + * @return this builder instance + */ + public Builder fileSystemId(String fileSystemId) { + this.fileSystemId = fileSystemId; + return this; + } + + /** + * The details to be updated for the AddLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock addFileSystemLockDetails = null; + + /** + * The details to be updated for the AddLock. + * @param addFileSystemLockDetails the value to set + * @return this builder instance + */ + public Builder addFileSystemLockDetails( + com.oracle.bmc.filestorage.model.ResourceLock addFileSystemLockDetails) { + this.addFileSystemLockDetails = addFileSystemLockDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddFileSystemLockRequest o) { + fileSystemId(o.getFileSystemId()); + addFileSystemLockDetails(o.getAddFileSystemLockDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of AddFileSystemLockRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of AddFileSystemLockRequest + */ + public AddFileSystemLockRequest build() { + AddFileSystemLockRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.filestorage.model.ResourceLock body) { + addFileSystemLockDetails(body); + return this; + } + + /** + * Build the instance of AddFileSystemLockRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of AddFileSystemLockRequest + */ + public AddFileSystemLockRequest buildWithoutInvocationCallback() { + AddFileSystemLockRequest request = new AddFileSystemLockRequest(); + request.fileSystemId = fileSystemId; + request.addFileSystemLockDetails = addFileSystemLockDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new AddFileSystemLockRequest(fileSystemId, addFileSystemLockDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fileSystemId(fileSystemId) + .addFileSystemLockDetails(addFileSystemLockDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fileSystemId=").append(String.valueOf(this.fileSystemId)); + sb.append(",addFileSystemLockDetails=") + .append(String.valueOf(this.addFileSystemLockDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddFileSystemLockRequest)) { + return false; + } + + AddFileSystemLockRequest other = (AddFileSystemLockRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fileSystemId, other.fileSystemId) + && java.util.Objects.equals( + this.addFileSystemLockDetails, other.addFileSystemLockDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.fileSystemId == null ? 43 : this.fileSystemId.hashCode()); + result = + (result * PRIME) + + (this.addFileSystemLockDetails == null + ? 43 + : this.addFileSystemLockDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddFilesystemSnapshotPolicyLockRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddFilesystemSnapshotPolicyLockRequest.java new file mode 100644 index 00000000000..73b2908ae96 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddFilesystemSnapshotPolicyLockRequest.java @@ -0,0 +1,328 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use AddFilesystemSnapshotPolicyLockRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddFilesystemSnapshotPolicyLockRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system snapshot policy. + */ + private String filesystemSnapshotPolicyId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system snapshot policy. + */ + public String getFilesystemSnapshotPolicyId() { + return filesystemSnapshotPolicyId; + } + /** + * The details to be updated for the AddLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock addFilesystemSnapshotPolicyLockDetails; + + /** + * The details to be updated for the AddLock. + */ + public com.oracle.bmc.filestorage.model.ResourceLock + getAddFilesystemSnapshotPolicyLockDetails() { + return addFilesystemSnapshotPolicyLockDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.filestorage.model.ResourceLock getBody$() { + return addFilesystemSnapshotPolicyLockDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + AddFilesystemSnapshotPolicyLockRequest, + com.oracle.bmc.filestorage.model.ResourceLock> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system snapshot policy. + */ + private String filesystemSnapshotPolicyId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system snapshot policy. + * @param filesystemSnapshotPolicyId the value to set + * @return this builder instance + */ + public Builder filesystemSnapshotPolicyId(String filesystemSnapshotPolicyId) { + this.filesystemSnapshotPolicyId = filesystemSnapshotPolicyId; + return this; + } + + /** + * The details to be updated for the AddLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock + addFilesystemSnapshotPolicyLockDetails = null; + + /** + * The details to be updated for the AddLock. + * @param addFilesystemSnapshotPolicyLockDetails the value to set + * @return this builder instance + */ + public Builder addFilesystemSnapshotPolicyLockDetails( + com.oracle.bmc.filestorage.model.ResourceLock + addFilesystemSnapshotPolicyLockDetails) { + this.addFilesystemSnapshotPolicyLockDetails = addFilesystemSnapshotPolicyLockDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddFilesystemSnapshotPolicyLockRequest o) { + filesystemSnapshotPolicyId(o.getFilesystemSnapshotPolicyId()); + addFilesystemSnapshotPolicyLockDetails(o.getAddFilesystemSnapshotPolicyLockDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of AddFilesystemSnapshotPolicyLockRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of AddFilesystemSnapshotPolicyLockRequest + */ + public AddFilesystemSnapshotPolicyLockRequest build() { + AddFilesystemSnapshotPolicyLockRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.filestorage.model.ResourceLock body) { + addFilesystemSnapshotPolicyLockDetails(body); + return this; + } + + /** + * Build the instance of AddFilesystemSnapshotPolicyLockRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of AddFilesystemSnapshotPolicyLockRequest + */ + public AddFilesystemSnapshotPolicyLockRequest buildWithoutInvocationCallback() { + AddFilesystemSnapshotPolicyLockRequest request = + new AddFilesystemSnapshotPolicyLockRequest(); + request.filesystemSnapshotPolicyId = filesystemSnapshotPolicyId; + request.addFilesystemSnapshotPolicyLockDetails = addFilesystemSnapshotPolicyLockDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new AddFilesystemSnapshotPolicyLockRequest(filesystemSnapshotPolicyId, addFilesystemSnapshotPolicyLockDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .filesystemSnapshotPolicyId(filesystemSnapshotPolicyId) + .addFilesystemSnapshotPolicyLockDetails(addFilesystemSnapshotPolicyLockDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",filesystemSnapshotPolicyId=") + .append(String.valueOf(this.filesystemSnapshotPolicyId)); + sb.append(",addFilesystemSnapshotPolicyLockDetails=") + .append(String.valueOf(this.addFilesystemSnapshotPolicyLockDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddFilesystemSnapshotPolicyLockRequest)) { + return false; + } + + AddFilesystemSnapshotPolicyLockRequest other = (AddFilesystemSnapshotPolicyLockRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.filesystemSnapshotPolicyId, other.filesystemSnapshotPolicyId) + && java.util.Objects.equals( + this.addFilesystemSnapshotPolicyLockDetails, + other.addFilesystemSnapshotPolicyLockDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.filesystemSnapshotPolicyId == null + ? 43 + : this.filesystemSnapshotPolicyId.hashCode()); + result = + (result * PRIME) + + (this.addFilesystemSnapshotPolicyLockDetails == null + ? 43 + : this.addFilesystemSnapshotPolicyLockDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddMountTargetLockRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddMountTargetLockRequest.java new file mode 100644 index 00000000000..1d223564b84 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddMountTargetLockRequest.java @@ -0,0 +1,318 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use AddMountTargetLockRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddMountTargetLockRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + */ + private String mountTargetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + */ + public String getMountTargetId() { + return mountTargetId; + } + /** + * The details to be updated for the AddLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock addMountTargetLockDetails; + + /** + * The details to be updated for the AddLock. + */ + public com.oracle.bmc.filestorage.model.ResourceLock getAddMountTargetLockDetails() { + return addMountTargetLockDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.filestorage.model.ResourceLock getBody$() { + return addMountTargetLockDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + AddMountTargetLockRequest, com.oracle.bmc.filestorage.model.ResourceLock> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + */ + private String mountTargetId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + * @param mountTargetId the value to set + * @return this builder instance + */ + public Builder mountTargetId(String mountTargetId) { + this.mountTargetId = mountTargetId; + return this; + } + + /** + * The details to be updated for the AddLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock addMountTargetLockDetails = null; + + /** + * The details to be updated for the AddLock. + * @param addMountTargetLockDetails the value to set + * @return this builder instance + */ + public Builder addMountTargetLockDetails( + com.oracle.bmc.filestorage.model.ResourceLock addMountTargetLockDetails) { + this.addMountTargetLockDetails = addMountTargetLockDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddMountTargetLockRequest o) { + mountTargetId(o.getMountTargetId()); + addMountTargetLockDetails(o.getAddMountTargetLockDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of AddMountTargetLockRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of AddMountTargetLockRequest + */ + public AddMountTargetLockRequest build() { + AddMountTargetLockRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.filestorage.model.ResourceLock body) { + addMountTargetLockDetails(body); + return this; + } + + /** + * Build the instance of AddMountTargetLockRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of AddMountTargetLockRequest + */ + public AddMountTargetLockRequest buildWithoutInvocationCallback() { + AddMountTargetLockRequest request = new AddMountTargetLockRequest(); + request.mountTargetId = mountTargetId; + request.addMountTargetLockDetails = addMountTargetLockDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new AddMountTargetLockRequest(mountTargetId, addMountTargetLockDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .mountTargetId(mountTargetId) + .addMountTargetLockDetails(addMountTargetLockDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",mountTargetId=").append(String.valueOf(this.mountTargetId)); + sb.append(",addMountTargetLockDetails=") + .append(String.valueOf(this.addMountTargetLockDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddMountTargetLockRequest)) { + return false; + } + + AddMountTargetLockRequest other = (AddMountTargetLockRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.mountTargetId, other.mountTargetId) + && java.util.Objects.equals( + this.addMountTargetLockDetails, other.addMountTargetLockDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.mountTargetId == null ? 43 : this.mountTargetId.hashCode()); + result = + (result * PRIME) + + (this.addMountTargetLockDetails == null + ? 43 + : this.addMountTargetLockDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddOutboundConnectorLockRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddOutboundConnectorLockRequest.java new file mode 100644 index 00000000000..0fecc68fce5 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddOutboundConnectorLockRequest.java @@ -0,0 +1,322 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use AddOutboundConnectorLockRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddOutboundConnectorLockRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the outbound connector. + */ + private String outboundConnectorId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the outbound connector. + */ + public String getOutboundConnectorId() { + return outboundConnectorId; + } + /** + * The details to be updated for the AddLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock addOutboundConnectorLockDetails; + + /** + * The details to be updated for the AddLock. + */ + public com.oracle.bmc.filestorage.model.ResourceLock getAddOutboundConnectorLockDetails() { + return addOutboundConnectorLockDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.filestorage.model.ResourceLock getBody$() { + return addOutboundConnectorLockDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + AddOutboundConnectorLockRequest, + com.oracle.bmc.filestorage.model.ResourceLock> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the outbound connector. + */ + private String outboundConnectorId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the outbound connector. + * @param outboundConnectorId the value to set + * @return this builder instance + */ + public Builder outboundConnectorId(String outboundConnectorId) { + this.outboundConnectorId = outboundConnectorId; + return this; + } + + /** + * The details to be updated for the AddLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock addOutboundConnectorLockDetails = + null; + + /** + * The details to be updated for the AddLock. + * @param addOutboundConnectorLockDetails the value to set + * @return this builder instance + */ + public Builder addOutboundConnectorLockDetails( + com.oracle.bmc.filestorage.model.ResourceLock addOutboundConnectorLockDetails) { + this.addOutboundConnectorLockDetails = addOutboundConnectorLockDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddOutboundConnectorLockRequest o) { + outboundConnectorId(o.getOutboundConnectorId()); + addOutboundConnectorLockDetails(o.getAddOutboundConnectorLockDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of AddOutboundConnectorLockRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of AddOutboundConnectorLockRequest + */ + public AddOutboundConnectorLockRequest build() { + AddOutboundConnectorLockRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.filestorage.model.ResourceLock body) { + addOutboundConnectorLockDetails(body); + return this; + } + + /** + * Build the instance of AddOutboundConnectorLockRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of AddOutboundConnectorLockRequest + */ + public AddOutboundConnectorLockRequest buildWithoutInvocationCallback() { + AddOutboundConnectorLockRequest request = new AddOutboundConnectorLockRequest(); + request.outboundConnectorId = outboundConnectorId; + request.addOutboundConnectorLockDetails = addOutboundConnectorLockDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new AddOutboundConnectorLockRequest(outboundConnectorId, addOutboundConnectorLockDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .outboundConnectorId(outboundConnectorId) + .addOutboundConnectorLockDetails(addOutboundConnectorLockDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",outboundConnectorId=").append(String.valueOf(this.outboundConnectorId)); + sb.append(",addOutboundConnectorLockDetails=") + .append(String.valueOf(this.addOutboundConnectorLockDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddOutboundConnectorLockRequest)) { + return false; + } + + AddOutboundConnectorLockRequest other = (AddOutboundConnectorLockRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.outboundConnectorId, other.outboundConnectorId) + && java.util.Objects.equals( + this.addOutboundConnectorLockDetails, other.addOutboundConnectorLockDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.outboundConnectorId == null + ? 43 + : this.outboundConnectorId.hashCode()); + result = + (result * PRIME) + + (this.addOutboundConnectorLockDetails == null + ? 43 + : this.addOutboundConnectorLockDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddReplicationLockRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddReplicationLockRequest.java new file mode 100644 index 00000000000..eb119c9de12 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddReplicationLockRequest.java @@ -0,0 +1,318 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use AddReplicationLockRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddReplicationLockRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the replication. + */ + private String replicationId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the replication. + */ + public String getReplicationId() { + return replicationId; + } + /** + * The details to be updated for the AddLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock addReplicationLockDetails; + + /** + * The details to be updated for the AddLock. + */ + public com.oracle.bmc.filestorage.model.ResourceLock getAddReplicationLockDetails() { + return addReplicationLockDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.filestorage.model.ResourceLock getBody$() { + return addReplicationLockDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + AddReplicationLockRequest, com.oracle.bmc.filestorage.model.ResourceLock> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the replication. + */ + private String replicationId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the replication. + * @param replicationId the value to set + * @return this builder instance + */ + public Builder replicationId(String replicationId) { + this.replicationId = replicationId; + return this; + } + + /** + * The details to be updated for the AddLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock addReplicationLockDetails = null; + + /** + * The details to be updated for the AddLock. + * @param addReplicationLockDetails the value to set + * @return this builder instance + */ + public Builder addReplicationLockDetails( + com.oracle.bmc.filestorage.model.ResourceLock addReplicationLockDetails) { + this.addReplicationLockDetails = addReplicationLockDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddReplicationLockRequest o) { + replicationId(o.getReplicationId()); + addReplicationLockDetails(o.getAddReplicationLockDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of AddReplicationLockRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of AddReplicationLockRequest + */ + public AddReplicationLockRequest build() { + AddReplicationLockRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.filestorage.model.ResourceLock body) { + addReplicationLockDetails(body); + return this; + } + + /** + * Build the instance of AddReplicationLockRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of AddReplicationLockRequest + */ + public AddReplicationLockRequest buildWithoutInvocationCallback() { + AddReplicationLockRequest request = new AddReplicationLockRequest(); + request.replicationId = replicationId; + request.addReplicationLockDetails = addReplicationLockDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new AddReplicationLockRequest(replicationId, addReplicationLockDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .replicationId(replicationId) + .addReplicationLockDetails(addReplicationLockDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",replicationId=").append(String.valueOf(this.replicationId)); + sb.append(",addReplicationLockDetails=") + .append(String.valueOf(this.addReplicationLockDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddReplicationLockRequest)) { + return false; + } + + AddReplicationLockRequest other = (AddReplicationLockRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.replicationId, other.replicationId) + && java.util.Objects.equals( + this.addReplicationLockDetails, other.addReplicationLockDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.replicationId == null ? 43 : this.replicationId.hashCode()); + result = + (result * PRIME) + + (this.addReplicationLockDetails == null + ? 43 + : this.addReplicationLockDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddSnapshotLockRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddSnapshotLockRequest.java new file mode 100644 index 00000000000..91d78b1543d --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/AddSnapshotLockRequest.java @@ -0,0 +1,315 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use AddSnapshotLockRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddSnapshotLockRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the snapshot. + */ + private String snapshotId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the snapshot. + */ + public String getSnapshotId() { + return snapshotId; + } + /** + * The details to be updated for the AddLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock addSnapshotLockDetails; + + /** + * The details to be updated for the AddLock. + */ + public com.oracle.bmc.filestorage.model.ResourceLock getAddSnapshotLockDetails() { + return addSnapshotLockDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.filestorage.model.ResourceLock getBody$() { + return addSnapshotLockDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + AddSnapshotLockRequest, com.oracle.bmc.filestorage.model.ResourceLock> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the snapshot. + */ + private String snapshotId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the snapshot. + * @param snapshotId the value to set + * @return this builder instance + */ + public Builder snapshotId(String snapshotId) { + this.snapshotId = snapshotId; + return this; + } + + /** + * The details to be updated for the AddLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock addSnapshotLockDetails = null; + + /** + * The details to be updated for the AddLock. + * @param addSnapshotLockDetails the value to set + * @return this builder instance + */ + public Builder addSnapshotLockDetails( + com.oracle.bmc.filestorage.model.ResourceLock addSnapshotLockDetails) { + this.addSnapshotLockDetails = addSnapshotLockDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddSnapshotLockRequest o) { + snapshotId(o.getSnapshotId()); + addSnapshotLockDetails(o.getAddSnapshotLockDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of AddSnapshotLockRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of AddSnapshotLockRequest + */ + public AddSnapshotLockRequest build() { + AddSnapshotLockRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.filestorage.model.ResourceLock body) { + addSnapshotLockDetails(body); + return this; + } + + /** + * Build the instance of AddSnapshotLockRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of AddSnapshotLockRequest + */ + public AddSnapshotLockRequest buildWithoutInvocationCallback() { + AddSnapshotLockRequest request = new AddSnapshotLockRequest(); + request.snapshotId = snapshotId; + request.addSnapshotLockDetails = addSnapshotLockDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new AddSnapshotLockRequest(snapshotId, addSnapshotLockDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .snapshotId(snapshotId) + .addSnapshotLockDetails(addSnapshotLockDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",snapshotId=").append(String.valueOf(this.snapshotId)); + sb.append(",addSnapshotLockDetails=").append(String.valueOf(this.addSnapshotLockDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddSnapshotLockRequest)) { + return false; + } + + AddSnapshotLockRequest other = (AddSnapshotLockRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.snapshotId, other.snapshotId) + && java.util.Objects.equals( + this.addSnapshotLockDetails, other.addSnapshotLockDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.snapshotId == null ? 43 : this.snapshotId.hashCode()); + result = + (result * PRIME) + + (this.addSnapshotLockDetails == null + ? 43 + : this.addSnapshotLockDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/CancelDowngradeShapeMountTargetRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/CancelDowngradeShapeMountTargetRequest.java new file mode 100644 index 00000000000..351c0174576 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/CancelDowngradeShapeMountTargetRequest.java @@ -0,0 +1,259 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use CancelDowngradeShapeMountTargetRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class CancelDowngradeShapeMountTargetRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + */ + private String mountTargetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + */ + public String getMountTargetId() { + return mountTargetId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CancelDowngradeShapeMountTargetRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + */ + private String mountTargetId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + * @param mountTargetId the value to set + * @return this builder instance + */ + public Builder mountTargetId(String mountTargetId) { + this.mountTargetId = mountTargetId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CancelDowngradeShapeMountTargetRequest o) { + mountTargetId(o.getMountTargetId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CancelDowngradeShapeMountTargetRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CancelDowngradeShapeMountTargetRequest + */ + public CancelDowngradeShapeMountTargetRequest build() { + CancelDowngradeShapeMountTargetRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of CancelDowngradeShapeMountTargetRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CancelDowngradeShapeMountTargetRequest + */ + public CancelDowngradeShapeMountTargetRequest buildWithoutInvocationCallback() { + CancelDowngradeShapeMountTargetRequest request = + new CancelDowngradeShapeMountTargetRequest(); + request.mountTargetId = mountTargetId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new CancelDowngradeShapeMountTargetRequest(mountTargetId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .mountTargetId(mountTargetId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",mountTargetId=").append(String.valueOf(this.mountTargetId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CancelDowngradeShapeMountTargetRequest)) { + return false; + } + + CancelDowngradeShapeMountTargetRequest other = (CancelDowngradeShapeMountTargetRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.mountTargetId, other.mountTargetId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.mountTargetId == null ? 43 : this.mountTargetId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ChangeFileSystemCompartmentRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ChangeFileSystemCompartmentRequest.java index 813f7e276bf..1ebfc471e1c 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ChangeFileSystemCompartmentRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ChangeFileSystemCompartmentRequest.java @@ -73,6 +73,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } /** * Alternative accessor for the body parameter. @@ -169,6 +180,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -201,6 +227,7 @@ public Builder copy(ChangeFileSystemCompartmentRequest o) { changeFileSystemCompartmentDetails(o.getChangeFileSystemCompartmentDetails()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -249,8 +276,9 @@ public ChangeFileSystemCompartmentRequest buildWithoutInvocationCallback() { request.changeFileSystemCompartmentDetails = changeFileSystemCompartmentDetails; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new ChangeFileSystemCompartmentRequest(fileSystemId, changeFileSystemCompartmentDetails, ifMatch, opcRequestId); + // new ChangeFileSystemCompartmentRequest(fileSystemId, changeFileSystemCompartmentDetails, ifMatch, opcRequestId, isLockOverride); } } @@ -263,7 +291,8 @@ public Builder toBuilder() { .fileSystemId(fileSystemId) .changeFileSystemCompartmentDetails(changeFileSystemCompartmentDetails) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -284,6 +313,7 @@ public String toString() { .append(String.valueOf(this.changeFileSystemCompartmentDetails)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -304,7 +334,8 @@ public boolean equals(Object o) { this.changeFileSystemCompartmentDetails, other.changeFileSystemCompartmentDetails) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -319,6 +350,9 @@ public int hashCode() { : this.changeFileSystemCompartmentDetails.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ChangeFilesystemSnapshotPolicyCompartmentRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ChangeFilesystemSnapshotPolicyCompartmentRequest.java index bc9873e0456..06ef1069c3b 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ChangeFilesystemSnapshotPolicyCompartmentRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ChangeFilesystemSnapshotPolicyCompartmentRequest.java @@ -73,6 +73,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } /** * Alternative accessor for the body parameter. @@ -172,6 +183,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -205,6 +231,7 @@ public Builder copy(ChangeFilesystemSnapshotPolicyCompartmentRequest o) { o.getChangeFilesystemSnapshotPolicyCompartmentDetails()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -257,8 +284,9 @@ public ChangeFilesystemSnapshotPolicyCompartmentRequest buildWithoutInvocationCa changeFilesystemSnapshotPolicyCompartmentDetails; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new ChangeFilesystemSnapshotPolicyCompartmentRequest(filesystemSnapshotPolicyId, changeFilesystemSnapshotPolicyCompartmentDetails, ifMatch, opcRequestId); + // new ChangeFilesystemSnapshotPolicyCompartmentRequest(filesystemSnapshotPolicyId, changeFilesystemSnapshotPolicyCompartmentDetails, ifMatch, opcRequestId, isLockOverride); } } @@ -272,7 +300,8 @@ public Builder toBuilder() { .changeFilesystemSnapshotPolicyCompartmentDetails( changeFilesystemSnapshotPolicyCompartmentDetails) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -294,6 +323,7 @@ public String toString() { .append(String.valueOf(this.changeFilesystemSnapshotPolicyCompartmentDetails)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -316,7 +346,8 @@ public boolean equals(Object o) { this.changeFilesystemSnapshotPolicyCompartmentDetails, other.changeFilesystemSnapshotPolicyCompartmentDetails) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -335,6 +366,9 @@ public int hashCode() { : this.changeFilesystemSnapshotPolicyCompartmentDetails.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ChangeMountTargetCompartmentRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ChangeMountTargetCompartmentRequest.java index 343c0af9756..61458a2de66 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ChangeMountTargetCompartmentRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ChangeMountTargetCompartmentRequest.java @@ -73,6 +73,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } /** * Alternative accessor for the body parameter. @@ -169,6 +180,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -201,6 +227,7 @@ public Builder copy(ChangeMountTargetCompartmentRequest o) { changeMountTargetCompartmentDetails(o.getChangeMountTargetCompartmentDetails()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -249,8 +276,9 @@ public ChangeMountTargetCompartmentRequest buildWithoutInvocationCallback() { request.changeMountTargetCompartmentDetails = changeMountTargetCompartmentDetails; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new ChangeMountTargetCompartmentRequest(mountTargetId, changeMountTargetCompartmentDetails, ifMatch, opcRequestId); + // new ChangeMountTargetCompartmentRequest(mountTargetId, changeMountTargetCompartmentDetails, ifMatch, opcRequestId, isLockOverride); } } @@ -263,7 +291,8 @@ public Builder toBuilder() { .mountTargetId(mountTargetId) .changeMountTargetCompartmentDetails(changeMountTargetCompartmentDetails) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -284,6 +313,7 @@ public String toString() { .append(String.valueOf(this.changeMountTargetCompartmentDetails)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -304,7 +334,8 @@ public boolean equals(Object o) { this.changeMountTargetCompartmentDetails, other.changeMountTargetCompartmentDetails) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -321,6 +352,9 @@ public int hashCode() { : this.changeMountTargetCompartmentDetails.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ChangeOutboundConnectorCompartmentRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ChangeOutboundConnectorCompartmentRequest.java index b2dfd9fcaf4..e3f5cd9d2eb 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ChangeOutboundConnectorCompartmentRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ChangeOutboundConnectorCompartmentRequest.java @@ -73,6 +73,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } /** * Alternative accessor for the body parameter. @@ -170,6 +181,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -203,6 +229,7 @@ public Builder copy(ChangeOutboundConnectorCompartmentRequest o) { o.getChangeOutboundConnectorCompartmentDetails()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -253,8 +280,9 @@ public ChangeOutboundConnectorCompartmentRequest buildWithoutInvocationCallback( changeOutboundConnectorCompartmentDetails; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new ChangeOutboundConnectorCompartmentRequest(outboundConnectorId, changeOutboundConnectorCompartmentDetails, ifMatch, opcRequestId); + // new ChangeOutboundConnectorCompartmentRequest(outboundConnectorId, changeOutboundConnectorCompartmentDetails, ifMatch, opcRequestId, isLockOverride); } } @@ -268,7 +296,8 @@ public Builder toBuilder() { .changeOutboundConnectorCompartmentDetails( changeOutboundConnectorCompartmentDetails) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -289,6 +318,7 @@ public String toString() { .append(String.valueOf(this.changeOutboundConnectorCompartmentDetails)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -310,7 +340,8 @@ public boolean equals(Object o) { this.changeOutboundConnectorCompartmentDetails, other.changeOutboundConnectorCompartmentDetails) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -329,6 +360,9 @@ public int hashCode() { : this.changeOutboundConnectorCompartmentDetails.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ChangeReplicationCompartmentRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ChangeReplicationCompartmentRequest.java index 62ed1d7f6c3..891cffda301 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ChangeReplicationCompartmentRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ChangeReplicationCompartmentRequest.java @@ -73,6 +73,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } /** * Alternative accessor for the body parameter. @@ -169,6 +180,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -201,6 +227,7 @@ public Builder copy(ChangeReplicationCompartmentRequest o) { changeReplicationCompartmentDetails(o.getChangeReplicationCompartmentDetails()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -249,8 +276,9 @@ public ChangeReplicationCompartmentRequest buildWithoutInvocationCallback() { request.changeReplicationCompartmentDetails = changeReplicationCompartmentDetails; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new ChangeReplicationCompartmentRequest(replicationId, changeReplicationCompartmentDetails, ifMatch, opcRequestId); + // new ChangeReplicationCompartmentRequest(replicationId, changeReplicationCompartmentDetails, ifMatch, opcRequestId, isLockOverride); } } @@ -263,7 +291,8 @@ public Builder toBuilder() { .replicationId(replicationId) .changeReplicationCompartmentDetails(changeReplicationCompartmentDetails) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -284,6 +313,7 @@ public String toString() { .append(String.valueOf(this.changeReplicationCompartmentDetails)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -304,7 +334,8 @@ public boolean equals(Object o) { this.changeReplicationCompartmentDetails, other.changeReplicationCompartmentDetails) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -321,6 +352,9 @@ public int hashCode() { : this.changeReplicationCompartmentDetails.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/CreateMountTargetRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/CreateMountTargetRequest.java index 52dfbcdc94f..a47e34f4bb6 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/CreateMountTargetRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/CreateMountTargetRequest.java @@ -60,6 +60,17 @@ public String getOpcRetryToken() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } /** * Alternative accessor for the body parameter. @@ -141,6 +152,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -172,6 +198,7 @@ public Builder copy(CreateMountTargetRequest o) { createMountTargetDetails(o.getCreateMountTargetDetails()); opcRetryToken(o.getOpcRetryToken()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -218,8 +245,9 @@ public CreateMountTargetRequest buildWithoutInvocationCallback() { request.createMountTargetDetails = createMountTargetDetails; request.opcRetryToken = opcRetryToken; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new CreateMountTargetRequest(createMountTargetDetails, opcRetryToken, opcRequestId); + // new CreateMountTargetRequest(createMountTargetDetails, opcRetryToken, opcRequestId, isLockOverride); } } @@ -231,7 +259,8 @@ public Builder toBuilder() { return new Builder() .createMountTargetDetails(createMountTargetDetails) .opcRetryToken(opcRetryToken) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -251,6 +280,7 @@ public String toString() { .append(String.valueOf(this.createMountTargetDetails)); sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -269,7 +299,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.createMountTargetDetails, other.createMountTargetDetails) && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -285,6 +316,9 @@ public int hashCode() { (result * PRIME) + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteExportRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteExportRequest.java index adf2e394265..244a5f746e8 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteExportRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteExportRequest.java @@ -58,6 +58,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -125,6 +136,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -156,6 +182,7 @@ public Builder copy(DeleteExportRequest o) { exportId(o.getExportId()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -191,8 +218,9 @@ public DeleteExportRequest buildWithoutInvocationCallback() { request.exportId = exportId; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new DeleteExportRequest(exportId, ifMatch, opcRequestId); + // new DeleteExportRequest(exportId, ifMatch, opcRequestId, isLockOverride); } } @@ -201,7 +229,11 @@ public DeleteExportRequest buildWithoutInvocationCallback() { * @return instance of {@link Builder} that allows you to modify request properties. */ public Builder toBuilder() { - return new Builder().exportId(exportId).ifMatch(ifMatch).opcRequestId(opcRequestId); + return new Builder() + .exportId(exportId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -220,6 +252,7 @@ public String toString() { sb.append(",exportId=").append(String.valueOf(this.exportId)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -237,7 +270,8 @@ public boolean equals(Object o) { return super.equals(o) && java.util.Objects.equals(this.exportId, other.exportId) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -247,6 +281,9 @@ public int hashCode() { result = (result * PRIME) + (this.exportId == null ? 43 : this.exportId.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteFileSystemRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteFileSystemRequest.java index 1785ed703c9..7a655ae9b0e 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteFileSystemRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteFileSystemRequest.java @@ -58,6 +58,32 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } + /** + * If the value is set to true, then the file system will be deleted by detaching its child file system, turning + * the child file system into an independent File System. + * + */ + private Boolean canDetachChildFileSystem; + + /** + * If the value is set to true, then the file system will be deleted by detaching its child file system, turning + * the child file system into an independent File System. + * + */ + public Boolean getCanDetachChildFileSystem() { + return canDetachChildFileSystem; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -125,6 +151,40 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + + /** + * If the value is set to true, then the file system will be deleted by detaching its child file system, turning + * the child file system into an independent File System. + * + */ + private Boolean canDetachChildFileSystem = null; + + /** + * If the value is set to true, then the file system will be deleted by detaching its child file system, turning + * the child file system into an independent File System. + * + * @param canDetachChildFileSystem the value to set + * @return this builder instance + */ + public Builder canDetachChildFileSystem(Boolean canDetachChildFileSystem) { + this.canDetachChildFileSystem = canDetachChildFileSystem; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -156,6 +216,8 @@ public Builder copy(DeleteFileSystemRequest o) { fileSystemId(o.getFileSystemId()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); + canDetachChildFileSystem(o.getCanDetachChildFileSystem()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -191,8 +253,10 @@ public DeleteFileSystemRequest buildWithoutInvocationCallback() { request.fileSystemId = fileSystemId; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; + request.canDetachChildFileSystem = canDetachChildFileSystem; return request; - // new DeleteFileSystemRequest(fileSystemId, ifMatch, opcRequestId); + // new DeleteFileSystemRequest(fileSystemId, ifMatch, opcRequestId, isLockOverride, canDetachChildFileSystem); } } @@ -201,7 +265,12 @@ public DeleteFileSystemRequest buildWithoutInvocationCallback() { * @return instance of {@link Builder} that allows you to modify request properties. */ public Builder toBuilder() { - return new Builder().fileSystemId(fileSystemId).ifMatch(ifMatch).opcRequestId(opcRequestId); + return new Builder() + .fileSystemId(fileSystemId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride) + .canDetachChildFileSystem(canDetachChildFileSystem); } /** @@ -220,6 +289,9 @@ public String toString() { sb.append(",fileSystemId=").append(String.valueOf(this.fileSystemId)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); + sb.append(",canDetachChildFileSystem=") + .append(String.valueOf(this.canDetachChildFileSystem)); sb.append(")"); return sb.toString(); } @@ -237,7 +309,10 @@ public boolean equals(Object o) { return super.equals(o) && java.util.Objects.equals(this.fileSystemId, other.fileSystemId) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride) + && java.util.Objects.equals( + this.canDetachChildFileSystem, other.canDetachChildFileSystem); } @Override @@ -247,6 +322,14 @@ public int hashCode() { result = (result * PRIME) + (this.fileSystemId == null ? 43 : this.fileSystemId.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); + result = + (result * PRIME) + + (this.canDetachChildFileSystem == null + ? 43 + : this.canDetachChildFileSystem.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteFilesystemSnapshotPolicyRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteFilesystemSnapshotPolicyRequest.java index 0a57ab416ac..9ed581e4809 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteFilesystemSnapshotPolicyRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteFilesystemSnapshotPolicyRequest.java @@ -59,6 +59,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -126,6 +137,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -157,6 +183,7 @@ public Builder copy(DeleteFilesystemSnapshotPolicyRequest o) { filesystemSnapshotPolicyId(o.getFilesystemSnapshotPolicyId()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -193,8 +220,9 @@ public DeleteFilesystemSnapshotPolicyRequest buildWithoutInvocationCallback() { request.filesystemSnapshotPolicyId = filesystemSnapshotPolicyId; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new DeleteFilesystemSnapshotPolicyRequest(filesystemSnapshotPolicyId, ifMatch, opcRequestId); + // new DeleteFilesystemSnapshotPolicyRequest(filesystemSnapshotPolicyId, ifMatch, opcRequestId, isLockOverride); } } @@ -206,7 +234,8 @@ public Builder toBuilder() { return new Builder() .filesystemSnapshotPolicyId(filesystemSnapshotPolicyId) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -226,6 +255,7 @@ public String toString() { .append(String.valueOf(this.filesystemSnapshotPolicyId)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -244,7 +274,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.filesystemSnapshotPolicyId, other.filesystemSnapshotPolicyId) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -258,6 +289,9 @@ public int hashCode() { : this.filesystemSnapshotPolicyId.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteMountTargetRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteMountTargetRequest.java index 51cfa4244cb..f63f46562bd 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteMountTargetRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteMountTargetRequest.java @@ -58,6 +58,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -125,6 +136,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -156,6 +182,7 @@ public Builder copy(DeleteMountTargetRequest o) { mountTargetId(o.getMountTargetId()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -191,8 +218,9 @@ public DeleteMountTargetRequest buildWithoutInvocationCallback() { request.mountTargetId = mountTargetId; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new DeleteMountTargetRequest(mountTargetId, ifMatch, opcRequestId); + // new DeleteMountTargetRequest(mountTargetId, ifMatch, opcRequestId, isLockOverride); } } @@ -204,7 +232,8 @@ public Builder toBuilder() { return new Builder() .mountTargetId(mountTargetId) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -223,6 +252,7 @@ public String toString() { sb.append(",mountTargetId=").append(String.valueOf(this.mountTargetId)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -240,7 +270,8 @@ public boolean equals(Object o) { return super.equals(o) && java.util.Objects.equals(this.mountTargetId, other.mountTargetId) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -252,6 +283,9 @@ public int hashCode() { + (this.mountTargetId == null ? 43 : this.mountTargetId.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteOutboundConnectorRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteOutboundConnectorRequest.java index 31795ef901d..48f2319b4c9 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteOutboundConnectorRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteOutboundConnectorRequest.java @@ -59,6 +59,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -126,6 +137,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -157,6 +183,7 @@ public Builder copy(DeleteOutboundConnectorRequest o) { outboundConnectorId(o.getOutboundConnectorId()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -192,8 +219,9 @@ public DeleteOutboundConnectorRequest buildWithoutInvocationCallback() { request.outboundConnectorId = outboundConnectorId; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new DeleteOutboundConnectorRequest(outboundConnectorId, ifMatch, opcRequestId); + // new DeleteOutboundConnectorRequest(outboundConnectorId, ifMatch, opcRequestId, isLockOverride); } } @@ -205,7 +233,8 @@ public Builder toBuilder() { return new Builder() .outboundConnectorId(outboundConnectorId) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -224,6 +253,7 @@ public String toString() { sb.append(",outboundConnectorId=").append(String.valueOf(this.outboundConnectorId)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -241,7 +271,8 @@ public boolean equals(Object o) { return super.equals(o) && java.util.Objects.equals(this.outboundConnectorId, other.outboundConnectorId) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -255,6 +286,9 @@ public int hashCode() { : this.outboundConnectorId.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteReplicationRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteReplicationRequest.java index 163d9b29c4c..c3b8210d3b2 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteReplicationRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteReplicationRequest.java @@ -118,6 +118,17 @@ public static DeleteMode create(String key) { public DeleteMode getDeleteMode() { return deleteMode; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -208,6 +219,21 @@ public Builder deleteMode(DeleteMode deleteMode) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -240,6 +266,7 @@ public Builder copy(DeleteReplicationRequest o) { ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); deleteMode(o.getDeleteMode()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -276,8 +303,9 @@ public DeleteReplicationRequest buildWithoutInvocationCallback() { request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; request.deleteMode = deleteMode; + request.isLockOverride = isLockOverride; return request; - // new DeleteReplicationRequest(replicationId, ifMatch, opcRequestId, deleteMode); + // new DeleteReplicationRequest(replicationId, ifMatch, opcRequestId, deleteMode, isLockOverride); } } @@ -290,7 +318,8 @@ public Builder toBuilder() { .replicationId(replicationId) .ifMatch(ifMatch) .opcRequestId(opcRequestId) - .deleteMode(deleteMode); + .deleteMode(deleteMode) + .isLockOverride(isLockOverride); } /** @@ -310,6 +339,7 @@ public String toString() { sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); sb.append(",deleteMode=").append(String.valueOf(this.deleteMode)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -328,7 +358,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.replicationId, other.replicationId) && java.util.Objects.equals(this.ifMatch, other.ifMatch) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) - && java.util.Objects.equals(this.deleteMode, other.deleteMode); + && java.util.Objects.equals(this.deleteMode, other.deleteMode) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -341,6 +372,9 @@ public int hashCode() { result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); result = (result * PRIME) + (this.deleteMode == null ? 43 : this.deleteMode.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteReplicationTargetRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteReplicationTargetRequest.java index dce579c61ca..e60cccd8189 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteReplicationTargetRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteReplicationTargetRequest.java @@ -59,6 +59,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -126,6 +137,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -157,6 +183,7 @@ public Builder copy(DeleteReplicationTargetRequest o) { replicationTargetId(o.getReplicationTargetId()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -192,8 +219,9 @@ public DeleteReplicationTargetRequest buildWithoutInvocationCallback() { request.replicationTargetId = replicationTargetId; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new DeleteReplicationTargetRequest(replicationTargetId, ifMatch, opcRequestId); + // new DeleteReplicationTargetRequest(replicationTargetId, ifMatch, opcRequestId, isLockOverride); } } @@ -205,7 +233,8 @@ public Builder toBuilder() { return new Builder() .replicationTargetId(replicationTargetId) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -224,6 +253,7 @@ public String toString() { sb.append(",replicationTargetId=").append(String.valueOf(this.replicationTargetId)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -241,7 +271,8 @@ public boolean equals(Object o) { return super.equals(o) && java.util.Objects.equals(this.replicationTargetId, other.replicationTargetId) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -255,6 +286,9 @@ public int hashCode() { : this.replicationTargetId.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteSnapshotRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteSnapshotRequest.java index 3742173bd44..c5e231e5033 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteSnapshotRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DeleteSnapshotRequest.java @@ -58,6 +58,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -125,6 +136,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -156,6 +182,7 @@ public Builder copy(DeleteSnapshotRequest o) { snapshotId(o.getSnapshotId()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -191,8 +218,9 @@ public DeleteSnapshotRequest buildWithoutInvocationCallback() { request.snapshotId = snapshotId; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new DeleteSnapshotRequest(snapshotId, ifMatch, opcRequestId); + // new DeleteSnapshotRequest(snapshotId, ifMatch, opcRequestId, isLockOverride); } } @@ -201,7 +229,11 @@ public DeleteSnapshotRequest buildWithoutInvocationCallback() { * @return instance of {@link Builder} that allows you to modify request properties. */ public Builder toBuilder() { - return new Builder().snapshotId(snapshotId).ifMatch(ifMatch).opcRequestId(opcRequestId); + return new Builder() + .snapshotId(snapshotId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -220,6 +252,7 @@ public String toString() { sb.append(",snapshotId=").append(String.valueOf(this.snapshotId)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -237,7 +270,8 @@ public boolean equals(Object o) { return super.equals(o) && java.util.Objects.equals(this.snapshotId, other.snapshotId) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -247,6 +281,9 @@ public int hashCode() { result = (result * PRIME) + (this.snapshotId == null ? 43 : this.snapshotId.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DetachCloneRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DetachCloneRequest.java new file mode 100644 index 00000000000..48e851c7aae --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/DetachCloneRequest.java @@ -0,0 +1,252 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use DetachCloneRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class DetachCloneRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system. + */ + private String fileSystemId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system. + */ + public String getFileSystemId() { + return fileSystemId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DetachCloneRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system. + */ + private String fileSystemId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system. + * @param fileSystemId the value to set + * @return this builder instance + */ + public Builder fileSystemId(String fileSystemId) { + this.fileSystemId = fileSystemId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DetachCloneRequest o) { + fileSystemId(o.getFileSystemId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DetachCloneRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DetachCloneRequest + */ + public DetachCloneRequest build() { + DetachCloneRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DetachCloneRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DetachCloneRequest + */ + public DetachCloneRequest buildWithoutInvocationCallback() { + DetachCloneRequest request = new DetachCloneRequest(); + request.fileSystemId = fileSystemId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DetachCloneRequest(fileSystemId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().fileSystemId(fileSystemId).ifMatch(ifMatch).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fileSystemId=").append(String.valueOf(this.fileSystemId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DetachCloneRequest)) { + return false; + } + + DetachCloneRequest other = (DetachCloneRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fileSystemId, other.fileSystemId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.fileSystemId == null ? 43 : this.fileSystemId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListExportSetsRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListExportSetsRequest.java index c744e53e53c..fa9ead0b1f3 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListExportSetsRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListExportSetsRequest.java @@ -42,7 +42,7 @@ public String getAvailabilityDomain() { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -55,7 +55,7 @@ public String getAvailabilityDomain() { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -119,6 +119,7 @@ public String getDisplayName() { public enum LifecycleState { Creating("CREATING"), Active("ACTIVE"), + Updating("UPDATING"), Deleting("DELETING"), Deleted("DELETED"), Failed("FAILED"), @@ -352,7 +353,7 @@ public Builder availabilityDomain(String availabilityDomain) { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -365,7 +366,7 @@ public Builder availabilityDomain(String availabilityDomain) { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListExportsRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListExportsRequest.java index 0f2ce9d8a79..d83c88b9e03 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListExportsRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListExportsRequest.java @@ -25,7 +25,7 @@ public String getCompartmentId() { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -38,7 +38,7 @@ public String getCompartmentId() { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -107,6 +107,7 @@ public String getFileSystemId() { public enum LifecycleState { Creating("CREATING"), Active("ACTIVE"), + Updating("UPDATING"), Deleting("DELETING"), Deleted("DELETED"), Failed("FAILED"), @@ -319,7 +320,7 @@ public Builder compartmentId(String compartmentId) { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -332,7 +333,7 @@ public Builder compartmentId(String compartmentId) { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListFileSystemsRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListFileSystemsRequest.java index ad9fe7a120f..5b684858ac9 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListFileSystemsRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListFileSystemsRequest.java @@ -42,7 +42,7 @@ public String getAvailabilityDomain() { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -55,7 +55,7 @@ public String getAvailabilityDomain() { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -119,6 +119,7 @@ public String getDisplayName() { public enum LifecycleState { Creating("CREATING"), Active("ACTIVE"), + Updating("UPDATING"), Deleting("DELETING"), Deleted("DELETED"), Failed("FAILED"), @@ -389,7 +390,7 @@ public Builder availabilityDomain(String availabilityDomain) { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -402,7 +403,7 @@ public Builder availabilityDomain(String availabilityDomain) { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListFilesystemSnapshotPoliciesRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListFilesystemSnapshotPoliciesRequest.java index 670c9af57a1..e0a0d099202 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListFilesystemSnapshotPoliciesRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListFilesystemSnapshotPoliciesRequest.java @@ -43,7 +43,7 @@ public String getAvailabilityDomain() { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -56,7 +56,7 @@ public String getAvailabilityDomain() { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -354,7 +354,7 @@ public Builder availabilityDomain(String availabilityDomain) { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -367,7 +367,7 @@ public Builder availabilityDomain(String availabilityDomain) { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListMountTargetsRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListMountTargetsRequest.java index c3b80836f5c..3941e641f25 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListMountTargetsRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListMountTargetsRequest.java @@ -42,7 +42,7 @@ public String getAvailabilityDomain() { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -55,7 +55,7 @@ public String getAvailabilityDomain() { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -130,6 +130,7 @@ public String getExportSetId() { public enum LifecycleState { Creating("CREATING"), Active("ACTIVE"), + Updating("UPDATING"), Deleting("DELETING"), Deleted("DELETED"), Failed("FAILED"), @@ -363,7 +364,7 @@ public Builder availabilityDomain(String availabilityDomain) { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -376,7 +377,7 @@ public Builder availabilityDomain(String availabilityDomain) { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListOutboundConnectorsRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListOutboundConnectorsRequest.java index 1d1dd181150..45e9edc14ff 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListOutboundConnectorsRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListOutboundConnectorsRequest.java @@ -43,7 +43,7 @@ public String getAvailabilityDomain() { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -56,7 +56,7 @@ public String getAvailabilityDomain() { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -103,6 +103,7 @@ public String getPage() { public enum LifecycleState { Creating("CREATING"), Active("ACTIVE"), + Updating("UPDATING"), Deleting("DELETING"), Deleted("DELETED"), Failed("FAILED"), @@ -353,7 +354,7 @@ public Builder availabilityDomain(String availabilityDomain) { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -366,7 +367,7 @@ public Builder availabilityDomain(String availabilityDomain) { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListReplicationTargetsRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListReplicationTargetsRequest.java index 9ed8dd1c088..5d45074c5fb 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListReplicationTargetsRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListReplicationTargetsRequest.java @@ -43,7 +43,7 @@ public String getAvailabilityDomain() { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -56,7 +56,7 @@ public String getAvailabilityDomain() { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -103,6 +103,7 @@ public String getPage() { public enum LifecycleState { Creating("CREATING"), Active("ACTIVE"), + Updating("UPDATING"), Deleting("DELETING"), Deleted("DELETED"), Failed("FAILED"), @@ -353,7 +354,7 @@ public Builder availabilityDomain(String availabilityDomain) { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -366,7 +367,7 @@ public Builder availabilityDomain(String availabilityDomain) { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListReplicationsRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListReplicationsRequest.java index 8431e87c3d0..46995153de8 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListReplicationsRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListReplicationsRequest.java @@ -42,7 +42,7 @@ public String getAvailabilityDomain() { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -55,7 +55,7 @@ public String getAvailabilityDomain() { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -102,6 +102,7 @@ public String getPage() { public enum LifecycleState { Creating("CREATING"), Active("ACTIVE"), + Updating("UPDATING"), Deleting("DELETING"), Deleted("DELETED"), Failed("FAILED"), @@ -363,7 +364,7 @@ public Builder availabilityDomain(String availabilityDomain) { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -376,7 +377,7 @@ public Builder availabilityDomain(String availabilityDomain) { /** * For list pagination. The maximum number of results per page, * or items to return in a paginated "List" call. - * 1 is the minimum, 1000 is the maximum. + * 1 is the minimum, 4096 is the maximum. *

* For important details about how pagination works, * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListSnapshotsRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListSnapshotsRequest.java index d284cb1d27e..281005d01ef 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListSnapshotsRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ListSnapshotsRequest.java @@ -74,6 +74,7 @@ public String getPage() { public enum LifecycleState { Creating("CREATING"), Active("ACTIVE"), + Updating("UPDATING"), Deleting("DELETING"), Deleted("DELETED"), Failed("FAILED"), diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/PauseFilesystemSnapshotPolicyRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/PauseFilesystemSnapshotPolicyRequest.java index f3d5a71c683..62d5cd94573 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/PauseFilesystemSnapshotPolicyRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/PauseFilesystemSnapshotPolicyRequest.java @@ -59,6 +59,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -126,6 +137,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -157,6 +183,7 @@ public Builder copy(PauseFilesystemSnapshotPolicyRequest o) { filesystemSnapshotPolicyId(o.getFilesystemSnapshotPolicyId()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -193,8 +220,9 @@ public PauseFilesystemSnapshotPolicyRequest buildWithoutInvocationCallback() { request.filesystemSnapshotPolicyId = filesystemSnapshotPolicyId; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new PauseFilesystemSnapshotPolicyRequest(filesystemSnapshotPolicyId, ifMatch, opcRequestId); + // new PauseFilesystemSnapshotPolicyRequest(filesystemSnapshotPolicyId, ifMatch, opcRequestId, isLockOverride); } } @@ -206,7 +234,8 @@ public Builder toBuilder() { return new Builder() .filesystemSnapshotPolicyId(filesystemSnapshotPolicyId) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -226,6 +255,7 @@ public String toString() { .append(String.valueOf(this.filesystemSnapshotPolicyId)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -244,7 +274,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.filesystemSnapshotPolicyId, other.filesystemSnapshotPolicyId) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -258,6 +289,9 @@ public int hashCode() { : this.filesystemSnapshotPolicyId.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveExportLockRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveExportLockRequest.java new file mode 100644 index 00000000000..4135aa6e528 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveExportLockRequest.java @@ -0,0 +1,315 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use RemoveExportLockRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveExportLockRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the export. + */ + private String exportId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the export. + */ + public String getExportId() { + return exportId; + } + /** + * The details to be updated for the RemoveLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock removeExportLockDetails; + + /** + * The details to be updated for the RemoveLock. + */ + public com.oracle.bmc.filestorage.model.ResourceLock getRemoveExportLockDetails() { + return removeExportLockDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.filestorage.model.ResourceLock getBody$() { + return removeExportLockDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RemoveExportLockRequest, com.oracle.bmc.filestorage.model.ResourceLock> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the export. + */ + private String exportId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the export. + * @param exportId the value to set + * @return this builder instance + */ + public Builder exportId(String exportId) { + this.exportId = exportId; + return this; + } + + /** + * The details to be updated for the RemoveLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock removeExportLockDetails = null; + + /** + * The details to be updated for the RemoveLock. + * @param removeExportLockDetails the value to set + * @return this builder instance + */ + public Builder removeExportLockDetails( + com.oracle.bmc.filestorage.model.ResourceLock removeExportLockDetails) { + this.removeExportLockDetails = removeExportLockDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveExportLockRequest o) { + exportId(o.getExportId()); + removeExportLockDetails(o.getRemoveExportLockDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RemoveExportLockRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RemoveExportLockRequest + */ + public RemoveExportLockRequest build() { + RemoveExportLockRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.filestorage.model.ResourceLock body) { + removeExportLockDetails(body); + return this; + } + + /** + * Build the instance of RemoveExportLockRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RemoveExportLockRequest + */ + public RemoveExportLockRequest buildWithoutInvocationCallback() { + RemoveExportLockRequest request = new RemoveExportLockRequest(); + request.exportId = exportId; + request.removeExportLockDetails = removeExportLockDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new RemoveExportLockRequest(exportId, removeExportLockDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .exportId(exportId) + .removeExportLockDetails(removeExportLockDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",exportId=").append(String.valueOf(this.exportId)); + sb.append(",removeExportLockDetails=").append(String.valueOf(this.removeExportLockDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveExportLockRequest)) { + return false; + } + + RemoveExportLockRequest other = (RemoveExportLockRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.exportId, other.exportId) + && java.util.Objects.equals( + this.removeExportLockDetails, other.removeExportLockDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.exportId == null ? 43 : this.exportId.hashCode()); + result = + (result * PRIME) + + (this.removeExportLockDetails == null + ? 43 + : this.removeExportLockDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveFileSystemLockRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveFileSystemLockRequest.java new file mode 100644 index 00000000000..a2260ff8fe0 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveFileSystemLockRequest.java @@ -0,0 +1,316 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use RemoveFileSystemLockRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveFileSystemLockRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system. + */ + private String fileSystemId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system. + */ + public String getFileSystemId() { + return fileSystemId; + } + /** + * The details to be updated for the RemoveLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock removeFileSystemLockDetails; + + /** + * The details to be updated for the RemoveLock. + */ + public com.oracle.bmc.filestorage.model.ResourceLock getRemoveFileSystemLockDetails() { + return removeFileSystemLockDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.filestorage.model.ResourceLock getBody$() { + return removeFileSystemLockDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RemoveFileSystemLockRequest, com.oracle.bmc.filestorage.model.ResourceLock> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system. + */ + private String fileSystemId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system. + * @param fileSystemId the value to set + * @return this builder instance + */ + public Builder fileSystemId(String fileSystemId) { + this.fileSystemId = fileSystemId; + return this; + } + + /** + * The details to be updated for the RemoveLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock removeFileSystemLockDetails = null; + + /** + * The details to be updated for the RemoveLock. + * @param removeFileSystemLockDetails the value to set + * @return this builder instance + */ + public Builder removeFileSystemLockDetails( + com.oracle.bmc.filestorage.model.ResourceLock removeFileSystemLockDetails) { + this.removeFileSystemLockDetails = removeFileSystemLockDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveFileSystemLockRequest o) { + fileSystemId(o.getFileSystemId()); + removeFileSystemLockDetails(o.getRemoveFileSystemLockDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RemoveFileSystemLockRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RemoveFileSystemLockRequest + */ + public RemoveFileSystemLockRequest build() { + RemoveFileSystemLockRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.filestorage.model.ResourceLock body) { + removeFileSystemLockDetails(body); + return this; + } + + /** + * Build the instance of RemoveFileSystemLockRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RemoveFileSystemLockRequest + */ + public RemoveFileSystemLockRequest buildWithoutInvocationCallback() { + RemoveFileSystemLockRequest request = new RemoveFileSystemLockRequest(); + request.fileSystemId = fileSystemId; + request.removeFileSystemLockDetails = removeFileSystemLockDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new RemoveFileSystemLockRequest(fileSystemId, removeFileSystemLockDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fileSystemId(fileSystemId) + .removeFileSystemLockDetails(removeFileSystemLockDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fileSystemId=").append(String.valueOf(this.fileSystemId)); + sb.append(",removeFileSystemLockDetails=") + .append(String.valueOf(this.removeFileSystemLockDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveFileSystemLockRequest)) { + return false; + } + + RemoveFileSystemLockRequest other = (RemoveFileSystemLockRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fileSystemId, other.fileSystemId) + && java.util.Objects.equals( + this.removeFileSystemLockDetails, other.removeFileSystemLockDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.fileSystemId == null ? 43 : this.fileSystemId.hashCode()); + result = + (result * PRIME) + + (this.removeFileSystemLockDetails == null + ? 43 + : this.removeFileSystemLockDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveFilesystemSnapshotPolicyLockRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveFilesystemSnapshotPolicyLockRequest.java new file mode 100644 index 00000000000..8027d22405d --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveFilesystemSnapshotPolicyLockRequest.java @@ -0,0 +1,333 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use RemoveFilesystemSnapshotPolicyLockRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveFilesystemSnapshotPolicyLockRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system snapshot policy. + */ + private String filesystemSnapshotPolicyId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system snapshot policy. + */ + public String getFilesystemSnapshotPolicyId() { + return filesystemSnapshotPolicyId; + } + /** + * The details to be updated for the RemoveLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock removeFilesystemSnapshotPolicyLockDetails; + + /** + * The details to be updated for the RemoveLock. + */ + public com.oracle.bmc.filestorage.model.ResourceLock + getRemoveFilesystemSnapshotPolicyLockDetails() { + return removeFilesystemSnapshotPolicyLockDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.filestorage.model.ResourceLock getBody$() { + return removeFilesystemSnapshotPolicyLockDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RemoveFilesystemSnapshotPolicyLockRequest, + com.oracle.bmc.filestorage.model.ResourceLock> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system snapshot policy. + */ + private String filesystemSnapshotPolicyId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system snapshot policy. + * @param filesystemSnapshotPolicyId the value to set + * @return this builder instance + */ + public Builder filesystemSnapshotPolicyId(String filesystemSnapshotPolicyId) { + this.filesystemSnapshotPolicyId = filesystemSnapshotPolicyId; + return this; + } + + /** + * The details to be updated for the RemoveLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock + removeFilesystemSnapshotPolicyLockDetails = null; + + /** + * The details to be updated for the RemoveLock. + * @param removeFilesystemSnapshotPolicyLockDetails the value to set + * @return this builder instance + */ + public Builder removeFilesystemSnapshotPolicyLockDetails( + com.oracle.bmc.filestorage.model.ResourceLock + removeFilesystemSnapshotPolicyLockDetails) { + this.removeFilesystemSnapshotPolicyLockDetails = + removeFilesystemSnapshotPolicyLockDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveFilesystemSnapshotPolicyLockRequest o) { + filesystemSnapshotPolicyId(o.getFilesystemSnapshotPolicyId()); + removeFilesystemSnapshotPolicyLockDetails( + o.getRemoveFilesystemSnapshotPolicyLockDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RemoveFilesystemSnapshotPolicyLockRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RemoveFilesystemSnapshotPolicyLockRequest + */ + public RemoveFilesystemSnapshotPolicyLockRequest build() { + RemoveFilesystemSnapshotPolicyLockRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.filestorage.model.ResourceLock body) { + removeFilesystemSnapshotPolicyLockDetails(body); + return this; + } + + /** + * Build the instance of RemoveFilesystemSnapshotPolicyLockRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RemoveFilesystemSnapshotPolicyLockRequest + */ + public RemoveFilesystemSnapshotPolicyLockRequest buildWithoutInvocationCallback() { + RemoveFilesystemSnapshotPolicyLockRequest request = + new RemoveFilesystemSnapshotPolicyLockRequest(); + request.filesystemSnapshotPolicyId = filesystemSnapshotPolicyId; + request.removeFilesystemSnapshotPolicyLockDetails = + removeFilesystemSnapshotPolicyLockDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new RemoveFilesystemSnapshotPolicyLockRequest(filesystemSnapshotPolicyId, removeFilesystemSnapshotPolicyLockDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .filesystemSnapshotPolicyId(filesystemSnapshotPolicyId) + .removeFilesystemSnapshotPolicyLockDetails( + removeFilesystemSnapshotPolicyLockDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",filesystemSnapshotPolicyId=") + .append(String.valueOf(this.filesystemSnapshotPolicyId)); + sb.append(",removeFilesystemSnapshotPolicyLockDetails=") + .append(String.valueOf(this.removeFilesystemSnapshotPolicyLockDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveFilesystemSnapshotPolicyLockRequest)) { + return false; + } + + RemoveFilesystemSnapshotPolicyLockRequest other = + (RemoveFilesystemSnapshotPolicyLockRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.filesystemSnapshotPolicyId, other.filesystemSnapshotPolicyId) + && java.util.Objects.equals( + this.removeFilesystemSnapshotPolicyLockDetails, + other.removeFilesystemSnapshotPolicyLockDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.filesystemSnapshotPolicyId == null + ? 43 + : this.filesystemSnapshotPolicyId.hashCode()); + result = + (result * PRIME) + + (this.removeFilesystemSnapshotPolicyLockDetails == null + ? 43 + : this.removeFilesystemSnapshotPolicyLockDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveMountTargetLockRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveMountTargetLockRequest.java new file mode 100644 index 00000000000..9e17735ee4c --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveMountTargetLockRequest.java @@ -0,0 +1,318 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use RemoveMountTargetLockRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveMountTargetLockRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + */ + private String mountTargetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + */ + public String getMountTargetId() { + return mountTargetId; + } + /** + * The details to be updated for the RemoveLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock removeMountTargetLockDetails; + + /** + * The details to be updated for the RemoveLock. + */ + public com.oracle.bmc.filestorage.model.ResourceLock getRemoveMountTargetLockDetails() { + return removeMountTargetLockDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.filestorage.model.ResourceLock getBody$() { + return removeMountTargetLockDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RemoveMountTargetLockRequest, com.oracle.bmc.filestorage.model.ResourceLock> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + */ + private String mountTargetId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + * @param mountTargetId the value to set + * @return this builder instance + */ + public Builder mountTargetId(String mountTargetId) { + this.mountTargetId = mountTargetId; + return this; + } + + /** + * The details to be updated for the RemoveLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock removeMountTargetLockDetails = null; + + /** + * The details to be updated for the RemoveLock. + * @param removeMountTargetLockDetails the value to set + * @return this builder instance + */ + public Builder removeMountTargetLockDetails( + com.oracle.bmc.filestorage.model.ResourceLock removeMountTargetLockDetails) { + this.removeMountTargetLockDetails = removeMountTargetLockDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveMountTargetLockRequest o) { + mountTargetId(o.getMountTargetId()); + removeMountTargetLockDetails(o.getRemoveMountTargetLockDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RemoveMountTargetLockRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RemoveMountTargetLockRequest + */ + public RemoveMountTargetLockRequest build() { + RemoveMountTargetLockRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.filestorage.model.ResourceLock body) { + removeMountTargetLockDetails(body); + return this; + } + + /** + * Build the instance of RemoveMountTargetLockRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RemoveMountTargetLockRequest + */ + public RemoveMountTargetLockRequest buildWithoutInvocationCallback() { + RemoveMountTargetLockRequest request = new RemoveMountTargetLockRequest(); + request.mountTargetId = mountTargetId; + request.removeMountTargetLockDetails = removeMountTargetLockDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new RemoveMountTargetLockRequest(mountTargetId, removeMountTargetLockDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .mountTargetId(mountTargetId) + .removeMountTargetLockDetails(removeMountTargetLockDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",mountTargetId=").append(String.valueOf(this.mountTargetId)); + sb.append(",removeMountTargetLockDetails=") + .append(String.valueOf(this.removeMountTargetLockDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveMountTargetLockRequest)) { + return false; + } + + RemoveMountTargetLockRequest other = (RemoveMountTargetLockRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.mountTargetId, other.mountTargetId) + && java.util.Objects.equals( + this.removeMountTargetLockDetails, other.removeMountTargetLockDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.mountTargetId == null ? 43 : this.mountTargetId.hashCode()); + result = + (result * PRIME) + + (this.removeMountTargetLockDetails == null + ? 43 + : this.removeMountTargetLockDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveOutboundConnectorLockRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveOutboundConnectorLockRequest.java new file mode 100644 index 00000000000..ba3d9f1676f --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveOutboundConnectorLockRequest.java @@ -0,0 +1,323 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use RemoveOutboundConnectorLockRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveOutboundConnectorLockRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the outbound connector. + */ + private String outboundConnectorId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the outbound connector. + */ + public String getOutboundConnectorId() { + return outboundConnectorId; + } + /** + * The details to be updated for the RemoveLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock removeOutboundConnectorLockDetails; + + /** + * The details to be updated for the RemoveLock. + */ + public com.oracle.bmc.filestorage.model.ResourceLock getRemoveOutboundConnectorLockDetails() { + return removeOutboundConnectorLockDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.filestorage.model.ResourceLock getBody$() { + return removeOutboundConnectorLockDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RemoveOutboundConnectorLockRequest, + com.oracle.bmc.filestorage.model.ResourceLock> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the outbound connector. + */ + private String outboundConnectorId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the outbound connector. + * @param outboundConnectorId the value to set + * @return this builder instance + */ + public Builder outboundConnectorId(String outboundConnectorId) { + this.outboundConnectorId = outboundConnectorId; + return this; + } + + /** + * The details to be updated for the RemoveLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock removeOutboundConnectorLockDetails = + null; + + /** + * The details to be updated for the RemoveLock. + * @param removeOutboundConnectorLockDetails the value to set + * @return this builder instance + */ + public Builder removeOutboundConnectorLockDetails( + com.oracle.bmc.filestorage.model.ResourceLock removeOutboundConnectorLockDetails) { + this.removeOutboundConnectorLockDetails = removeOutboundConnectorLockDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveOutboundConnectorLockRequest o) { + outboundConnectorId(o.getOutboundConnectorId()); + removeOutboundConnectorLockDetails(o.getRemoveOutboundConnectorLockDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RemoveOutboundConnectorLockRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RemoveOutboundConnectorLockRequest + */ + public RemoveOutboundConnectorLockRequest build() { + RemoveOutboundConnectorLockRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.filestorage.model.ResourceLock body) { + removeOutboundConnectorLockDetails(body); + return this; + } + + /** + * Build the instance of RemoveOutboundConnectorLockRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RemoveOutboundConnectorLockRequest + */ + public RemoveOutboundConnectorLockRequest buildWithoutInvocationCallback() { + RemoveOutboundConnectorLockRequest request = new RemoveOutboundConnectorLockRequest(); + request.outboundConnectorId = outboundConnectorId; + request.removeOutboundConnectorLockDetails = removeOutboundConnectorLockDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new RemoveOutboundConnectorLockRequest(outboundConnectorId, removeOutboundConnectorLockDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .outboundConnectorId(outboundConnectorId) + .removeOutboundConnectorLockDetails(removeOutboundConnectorLockDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",outboundConnectorId=").append(String.valueOf(this.outboundConnectorId)); + sb.append(",removeOutboundConnectorLockDetails=") + .append(String.valueOf(this.removeOutboundConnectorLockDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveOutboundConnectorLockRequest)) { + return false; + } + + RemoveOutboundConnectorLockRequest other = (RemoveOutboundConnectorLockRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.outboundConnectorId, other.outboundConnectorId) + && java.util.Objects.equals( + this.removeOutboundConnectorLockDetails, + other.removeOutboundConnectorLockDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.outboundConnectorId == null + ? 43 + : this.outboundConnectorId.hashCode()); + result = + (result * PRIME) + + (this.removeOutboundConnectorLockDetails == null + ? 43 + : this.removeOutboundConnectorLockDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveReplicationLockRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveReplicationLockRequest.java new file mode 100644 index 00000000000..33c8c04766d --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveReplicationLockRequest.java @@ -0,0 +1,318 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use RemoveReplicationLockRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveReplicationLockRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the replication. + */ + private String replicationId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the replication. + */ + public String getReplicationId() { + return replicationId; + } + /** + * The details to be updated for the RemoveLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock removeReplicationLockDetails; + + /** + * The details to be updated for the RemoveLock. + */ + public com.oracle.bmc.filestorage.model.ResourceLock getRemoveReplicationLockDetails() { + return removeReplicationLockDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.filestorage.model.ResourceLock getBody$() { + return removeReplicationLockDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RemoveReplicationLockRequest, com.oracle.bmc.filestorage.model.ResourceLock> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the replication. + */ + private String replicationId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the replication. + * @param replicationId the value to set + * @return this builder instance + */ + public Builder replicationId(String replicationId) { + this.replicationId = replicationId; + return this; + } + + /** + * The details to be updated for the RemoveLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock removeReplicationLockDetails = null; + + /** + * The details to be updated for the RemoveLock. + * @param removeReplicationLockDetails the value to set + * @return this builder instance + */ + public Builder removeReplicationLockDetails( + com.oracle.bmc.filestorage.model.ResourceLock removeReplicationLockDetails) { + this.removeReplicationLockDetails = removeReplicationLockDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveReplicationLockRequest o) { + replicationId(o.getReplicationId()); + removeReplicationLockDetails(o.getRemoveReplicationLockDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RemoveReplicationLockRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RemoveReplicationLockRequest + */ + public RemoveReplicationLockRequest build() { + RemoveReplicationLockRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.filestorage.model.ResourceLock body) { + removeReplicationLockDetails(body); + return this; + } + + /** + * Build the instance of RemoveReplicationLockRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RemoveReplicationLockRequest + */ + public RemoveReplicationLockRequest buildWithoutInvocationCallback() { + RemoveReplicationLockRequest request = new RemoveReplicationLockRequest(); + request.replicationId = replicationId; + request.removeReplicationLockDetails = removeReplicationLockDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new RemoveReplicationLockRequest(replicationId, removeReplicationLockDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .replicationId(replicationId) + .removeReplicationLockDetails(removeReplicationLockDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",replicationId=").append(String.valueOf(this.replicationId)); + sb.append(",removeReplicationLockDetails=") + .append(String.valueOf(this.removeReplicationLockDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveReplicationLockRequest)) { + return false; + } + + RemoveReplicationLockRequest other = (RemoveReplicationLockRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.replicationId, other.replicationId) + && java.util.Objects.equals( + this.removeReplicationLockDetails, other.removeReplicationLockDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.replicationId == null ? 43 : this.replicationId.hashCode()); + result = + (result * PRIME) + + (this.removeReplicationLockDetails == null + ? 43 + : this.removeReplicationLockDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveSnapshotLockRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveSnapshotLockRequest.java new file mode 100644 index 00000000000..7aff1322840 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/RemoveSnapshotLockRequest.java @@ -0,0 +1,316 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use RemoveSnapshotLockRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveSnapshotLockRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the snapshot. + */ + private String snapshotId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the snapshot. + */ + public String getSnapshotId() { + return snapshotId; + } + /** + * The details to be updated for the RemoveLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock removeSnapshotLockDetails; + + /** + * The details to be updated for the RemoveLock. + */ + public com.oracle.bmc.filestorage.model.ResourceLock getRemoveSnapshotLockDetails() { + return removeSnapshotLockDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.filestorage.model.ResourceLock getBody$() { + return removeSnapshotLockDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RemoveSnapshotLockRequest, com.oracle.bmc.filestorage.model.ResourceLock> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the snapshot. + */ + private String snapshotId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the snapshot. + * @param snapshotId the value to set + * @return this builder instance + */ + public Builder snapshotId(String snapshotId) { + this.snapshotId = snapshotId; + return this; + } + + /** + * The details to be updated for the RemoveLock. + */ + private com.oracle.bmc.filestorage.model.ResourceLock removeSnapshotLockDetails = null; + + /** + * The details to be updated for the RemoveLock. + * @param removeSnapshotLockDetails the value to set + * @return this builder instance + */ + public Builder removeSnapshotLockDetails( + com.oracle.bmc.filestorage.model.ResourceLock removeSnapshotLockDetails) { + this.removeSnapshotLockDetails = removeSnapshotLockDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveSnapshotLockRequest o) { + snapshotId(o.getSnapshotId()); + removeSnapshotLockDetails(o.getRemoveSnapshotLockDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RemoveSnapshotLockRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RemoveSnapshotLockRequest + */ + public RemoveSnapshotLockRequest build() { + RemoveSnapshotLockRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.filestorage.model.ResourceLock body) { + removeSnapshotLockDetails(body); + return this; + } + + /** + * Build the instance of RemoveSnapshotLockRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RemoveSnapshotLockRequest + */ + public RemoveSnapshotLockRequest buildWithoutInvocationCallback() { + RemoveSnapshotLockRequest request = new RemoveSnapshotLockRequest(); + request.snapshotId = snapshotId; + request.removeSnapshotLockDetails = removeSnapshotLockDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new RemoveSnapshotLockRequest(snapshotId, removeSnapshotLockDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .snapshotId(snapshotId) + .removeSnapshotLockDetails(removeSnapshotLockDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",snapshotId=").append(String.valueOf(this.snapshotId)); + sb.append(",removeSnapshotLockDetails=") + .append(String.valueOf(this.removeSnapshotLockDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveSnapshotLockRequest)) { + return false; + } + + RemoveSnapshotLockRequest other = (RemoveSnapshotLockRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.snapshotId, other.snapshotId) + && java.util.Objects.equals( + this.removeSnapshotLockDetails, other.removeSnapshotLockDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.snapshotId == null ? 43 : this.snapshotId.hashCode()); + result = + (result * PRIME) + + (this.removeSnapshotLockDetails == null + ? 43 + : this.removeSnapshotLockDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ScheduleDowngradeShapeMountTargetRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ScheduleDowngradeShapeMountTargetRequest.java new file mode 100644 index 00000000000..749b0c37e3d --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/ScheduleDowngradeShapeMountTargetRequest.java @@ -0,0 +1,331 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use ScheduleDowngradeShapeMountTargetRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class ScheduleDowngradeShapeMountTargetRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.filestorage.model.ScheduleDowngradeShapeMountTargetDetails> { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + */ + private String mountTargetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + */ + public String getMountTargetId() { + return mountTargetId; + } + /** + * Details for changing the shape of mount target. + */ + private com.oracle.bmc.filestorage.model.ScheduleDowngradeShapeMountTargetDetails + scheduleDowngradeShapeMountTargetDetails; + + /** + * Details for changing the shape of mount target. + */ + public com.oracle.bmc.filestorage.model.ScheduleDowngradeShapeMountTargetDetails + getScheduleDowngradeShapeMountTargetDetails() { + return scheduleDowngradeShapeMountTargetDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.filestorage.model.ScheduleDowngradeShapeMountTargetDetails getBody$() { + return scheduleDowngradeShapeMountTargetDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ScheduleDowngradeShapeMountTargetRequest, + com.oracle.bmc.filestorage.model.ScheduleDowngradeShapeMountTargetDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + */ + private String mountTargetId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + * @param mountTargetId the value to set + * @return this builder instance + */ + public Builder mountTargetId(String mountTargetId) { + this.mountTargetId = mountTargetId; + return this; + } + + /** + * Details for changing the shape of mount target. + */ + private com.oracle.bmc.filestorage.model.ScheduleDowngradeShapeMountTargetDetails + scheduleDowngradeShapeMountTargetDetails = null; + + /** + * Details for changing the shape of mount target. + * @param scheduleDowngradeShapeMountTargetDetails the value to set + * @return this builder instance + */ + public Builder scheduleDowngradeShapeMountTargetDetails( + com.oracle.bmc.filestorage.model.ScheduleDowngradeShapeMountTargetDetails + scheduleDowngradeShapeMountTargetDetails) { + this.scheduleDowngradeShapeMountTargetDetails = + scheduleDowngradeShapeMountTargetDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ScheduleDowngradeShapeMountTargetRequest o) { + mountTargetId(o.getMountTargetId()); + scheduleDowngradeShapeMountTargetDetails( + o.getScheduleDowngradeShapeMountTargetDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ScheduleDowngradeShapeMountTargetRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ScheduleDowngradeShapeMountTargetRequest + */ + public ScheduleDowngradeShapeMountTargetRequest build() { + ScheduleDowngradeShapeMountTargetRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.filestorage.model.ScheduleDowngradeShapeMountTargetDetails body) { + scheduleDowngradeShapeMountTargetDetails(body); + return this; + } + + /** + * Build the instance of ScheduleDowngradeShapeMountTargetRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ScheduleDowngradeShapeMountTargetRequest + */ + public ScheduleDowngradeShapeMountTargetRequest buildWithoutInvocationCallback() { + ScheduleDowngradeShapeMountTargetRequest request = + new ScheduleDowngradeShapeMountTargetRequest(); + request.mountTargetId = mountTargetId; + request.scheduleDowngradeShapeMountTargetDetails = + scheduleDowngradeShapeMountTargetDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new ScheduleDowngradeShapeMountTargetRequest(mountTargetId, scheduleDowngradeShapeMountTargetDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .mountTargetId(mountTargetId) + .scheduleDowngradeShapeMountTargetDetails(scheduleDowngradeShapeMountTargetDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",mountTargetId=").append(String.valueOf(this.mountTargetId)); + sb.append(",scheduleDowngradeShapeMountTargetDetails=") + .append(String.valueOf(this.scheduleDowngradeShapeMountTargetDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ScheduleDowngradeShapeMountTargetRequest)) { + return false; + } + + ScheduleDowngradeShapeMountTargetRequest other = + (ScheduleDowngradeShapeMountTargetRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.mountTargetId, other.mountTargetId) + && java.util.Objects.equals( + this.scheduleDowngradeShapeMountTargetDetails, + other.scheduleDowngradeShapeMountTargetDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.mountTargetId == null ? 43 : this.mountTargetId.hashCode()); + result = + (result * PRIME) + + (this.scheduleDowngradeShapeMountTargetDetails == null + ? 43 + : this.scheduleDowngradeShapeMountTargetDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UnpauseFilesystemSnapshotPolicyRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UnpauseFilesystemSnapshotPolicyRequest.java index 85ff82eaeae..b4559e44eb8 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UnpauseFilesystemSnapshotPolicyRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UnpauseFilesystemSnapshotPolicyRequest.java @@ -59,6 +59,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -126,6 +137,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -157,6 +183,7 @@ public Builder copy(UnpauseFilesystemSnapshotPolicyRequest o) { filesystemSnapshotPolicyId(o.getFilesystemSnapshotPolicyId()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -193,8 +220,9 @@ public UnpauseFilesystemSnapshotPolicyRequest buildWithoutInvocationCallback() { request.filesystemSnapshotPolicyId = filesystemSnapshotPolicyId; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new UnpauseFilesystemSnapshotPolicyRequest(filesystemSnapshotPolicyId, ifMatch, opcRequestId); + // new UnpauseFilesystemSnapshotPolicyRequest(filesystemSnapshotPolicyId, ifMatch, opcRequestId, isLockOverride); } } @@ -206,7 +234,8 @@ public Builder toBuilder() { return new Builder() .filesystemSnapshotPolicyId(filesystemSnapshotPolicyId) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -226,6 +255,7 @@ public String toString() { .append(String.valueOf(this.filesystemSnapshotPolicyId)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -244,7 +274,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.filesystemSnapshotPolicyId, other.filesystemSnapshotPolicyId) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -258,6 +289,9 @@ public int hashCode() { : this.filesystemSnapshotPolicyId.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateExportRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateExportRequest.java index ab98caecdde..a68b257de28 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateExportRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateExportRequest.java @@ -71,6 +71,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } /** * Alternative accessor for the body parameter. @@ -164,6 +175,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -196,6 +222,7 @@ public Builder copy(UpdateExportRequest o) { updateExportDetails(o.getUpdateExportDetails()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -243,8 +270,9 @@ public UpdateExportRequest buildWithoutInvocationCallback() { request.updateExportDetails = updateExportDetails; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new UpdateExportRequest(exportId, updateExportDetails, ifMatch, opcRequestId); + // new UpdateExportRequest(exportId, updateExportDetails, ifMatch, opcRequestId, isLockOverride); } } @@ -257,7 +285,8 @@ public Builder toBuilder() { .exportId(exportId) .updateExportDetails(updateExportDetails) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -277,6 +306,7 @@ public String toString() { sb.append(",updateExportDetails=").append(String.valueOf(this.updateExportDetails)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -295,7 +325,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.exportId, other.exportId) && java.util.Objects.equals(this.updateExportDetails, other.updateExportDetails) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -310,6 +341,9 @@ public int hashCode() { : this.updateExportDetails.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateFileSystemRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateFileSystemRequest.java index 8f7ac3f12d3..b3ed84839a4 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateFileSystemRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateFileSystemRequest.java @@ -71,6 +71,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } /** * Alternative accessor for the body parameter. @@ -166,6 +177,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -198,6 +224,7 @@ public Builder copy(UpdateFileSystemRequest o) { updateFileSystemDetails(o.getUpdateFileSystemDetails()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -245,8 +272,9 @@ public UpdateFileSystemRequest buildWithoutInvocationCallback() { request.updateFileSystemDetails = updateFileSystemDetails; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new UpdateFileSystemRequest(fileSystemId, updateFileSystemDetails, ifMatch, opcRequestId); + // new UpdateFileSystemRequest(fileSystemId, updateFileSystemDetails, ifMatch, opcRequestId, isLockOverride); } } @@ -259,7 +287,8 @@ public Builder toBuilder() { .fileSystemId(fileSystemId) .updateFileSystemDetails(updateFileSystemDetails) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -279,6 +308,7 @@ public String toString() { sb.append(",updateFileSystemDetails=").append(String.valueOf(this.updateFileSystemDetails)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -298,7 +328,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.updateFileSystemDetails, other.updateFileSystemDetails) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -313,6 +344,9 @@ public int hashCode() { : this.updateFileSystemDetails.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateFilesystemSnapshotPolicyRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateFilesystemSnapshotPolicyRequest.java index a43597063d0..ae5373c78e2 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateFilesystemSnapshotPolicyRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateFilesystemSnapshotPolicyRequest.java @@ -73,6 +73,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } /** * Alternative accessor for the body parameter. @@ -169,6 +180,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -201,6 +227,7 @@ public Builder copy(UpdateFilesystemSnapshotPolicyRequest o) { updateFilesystemSnapshotPolicyDetails(o.getUpdateFilesystemSnapshotPolicyDetails()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -250,8 +277,9 @@ public UpdateFilesystemSnapshotPolicyRequest buildWithoutInvocationCallback() { request.updateFilesystemSnapshotPolicyDetails = updateFilesystemSnapshotPolicyDetails; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new UpdateFilesystemSnapshotPolicyRequest(filesystemSnapshotPolicyId, updateFilesystemSnapshotPolicyDetails, ifMatch, opcRequestId); + // new UpdateFilesystemSnapshotPolicyRequest(filesystemSnapshotPolicyId, updateFilesystemSnapshotPolicyDetails, ifMatch, opcRequestId, isLockOverride); } } @@ -264,7 +292,8 @@ public Builder toBuilder() { .filesystemSnapshotPolicyId(filesystemSnapshotPolicyId) .updateFilesystemSnapshotPolicyDetails(updateFilesystemSnapshotPolicyDetails) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -286,6 +315,7 @@ public String toString() { .append(String.valueOf(this.updateFilesystemSnapshotPolicyDetails)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -307,7 +337,8 @@ public boolean equals(Object o) { this.updateFilesystemSnapshotPolicyDetails, other.updateFilesystemSnapshotPolicyDetails) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -326,6 +357,9 @@ public int hashCode() { : this.updateFilesystemSnapshotPolicyDetails.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateMountTargetRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateMountTargetRequest.java index f2d2aa75d4f..d446df61525 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateMountTargetRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateMountTargetRequest.java @@ -71,6 +71,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } /** * Alternative accessor for the body parameter. @@ -167,6 +178,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -199,6 +225,7 @@ public Builder copy(UpdateMountTargetRequest o) { updateMountTargetDetails(o.getUpdateMountTargetDetails()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -246,8 +273,9 @@ public UpdateMountTargetRequest buildWithoutInvocationCallback() { request.updateMountTargetDetails = updateMountTargetDetails; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new UpdateMountTargetRequest(mountTargetId, updateMountTargetDetails, ifMatch, opcRequestId); + // new UpdateMountTargetRequest(mountTargetId, updateMountTargetDetails, ifMatch, opcRequestId, isLockOverride); } } @@ -260,7 +288,8 @@ public Builder toBuilder() { .mountTargetId(mountTargetId) .updateMountTargetDetails(updateMountTargetDetails) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -281,6 +310,7 @@ public String toString() { .append(String.valueOf(this.updateMountTargetDetails)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -300,7 +330,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.updateMountTargetDetails, other.updateMountTargetDetails) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -317,6 +348,9 @@ public int hashCode() { : this.updateMountTargetDetails.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateOutboundConnectorRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateOutboundConnectorRequest.java index 12ccf6040df..42a32b2c6f8 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateOutboundConnectorRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateOutboundConnectorRequest.java @@ -73,6 +73,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } /** * Alternative accessor for the body parameter. @@ -169,6 +180,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -201,6 +227,7 @@ public Builder copy(UpdateOutboundConnectorRequest o) { updateOutboundConnectorDetails(o.getUpdateOutboundConnectorDetails()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -248,8 +275,9 @@ public UpdateOutboundConnectorRequest buildWithoutInvocationCallback() { request.updateOutboundConnectorDetails = updateOutboundConnectorDetails; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new UpdateOutboundConnectorRequest(outboundConnectorId, updateOutboundConnectorDetails, ifMatch, opcRequestId); + // new UpdateOutboundConnectorRequest(outboundConnectorId, updateOutboundConnectorDetails, ifMatch, opcRequestId, isLockOverride); } } @@ -262,7 +290,8 @@ public Builder toBuilder() { .outboundConnectorId(outboundConnectorId) .updateOutboundConnectorDetails(updateOutboundConnectorDetails) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -283,6 +312,7 @@ public String toString() { .append(String.valueOf(this.updateOutboundConnectorDetails)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -302,7 +332,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.updateOutboundConnectorDetails, other.updateOutboundConnectorDetails) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -321,6 +352,9 @@ public int hashCode() { : this.updateOutboundConnectorDetails.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateReplicationRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateReplicationRequest.java index e3c01c71d45..15d0319e3fb 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateReplicationRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateReplicationRequest.java @@ -71,6 +71,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } /** * Alternative accessor for the body parameter. @@ -167,6 +178,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -199,6 +225,7 @@ public Builder copy(UpdateReplicationRequest o) { updateReplicationDetails(o.getUpdateReplicationDetails()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -246,8 +273,9 @@ public UpdateReplicationRequest buildWithoutInvocationCallback() { request.updateReplicationDetails = updateReplicationDetails; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new UpdateReplicationRequest(replicationId, updateReplicationDetails, ifMatch, opcRequestId); + // new UpdateReplicationRequest(replicationId, updateReplicationDetails, ifMatch, opcRequestId, isLockOverride); } } @@ -260,7 +288,8 @@ public Builder toBuilder() { .replicationId(replicationId) .updateReplicationDetails(updateReplicationDetails) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -281,6 +310,7 @@ public String toString() { .append(String.valueOf(this.updateReplicationDetails)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -300,7 +330,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.updateReplicationDetails, other.updateReplicationDetails) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -317,6 +348,9 @@ public int hashCode() { : this.updateReplicationDetails.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateSnapshotRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateSnapshotRequest.java index 1d67870934d..9f081b65b8d 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateSnapshotRequest.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpdateSnapshotRequest.java @@ -71,6 +71,17 @@ public String getIfMatch() { public String getOpcRequestId() { return opcRequestId; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } /** * Alternative accessor for the body parameter. @@ -164,6 +175,21 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -196,6 +222,7 @@ public Builder copy(UpdateSnapshotRequest o) { updateSnapshotDetails(o.getUpdateSnapshotDetails()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -243,8 +270,9 @@ public UpdateSnapshotRequest buildWithoutInvocationCallback() { request.updateSnapshotDetails = updateSnapshotDetails; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; return request; - // new UpdateSnapshotRequest(snapshotId, updateSnapshotDetails, ifMatch, opcRequestId); + // new UpdateSnapshotRequest(snapshotId, updateSnapshotDetails, ifMatch, opcRequestId, isLockOverride); } } @@ -257,7 +285,8 @@ public Builder toBuilder() { .snapshotId(snapshotId) .updateSnapshotDetails(updateSnapshotDetails) .ifMatch(ifMatch) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); } /** @@ -277,6 +306,7 @@ public String toString() { sb.append(",updateSnapshotDetails=").append(String.valueOf(this.updateSnapshotDetails)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); sb.append(")"); return sb.toString(); } @@ -295,7 +325,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.snapshotId, other.snapshotId) && java.util.Objects.equals(this.updateSnapshotDetails, other.updateSnapshotDetails) && java.util.Objects.equals(this.ifMatch, other.ifMatch) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); } @Override @@ -310,6 +341,9 @@ public int hashCode() { : this.updateSnapshotDetails.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); return result; } } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpgradeShapeMountTargetRequest.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpgradeShapeMountTargetRequest.java new file mode 100644 index 00000000000..b0f2605b6a4 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/requests/UpgradeShapeMountTargetRequest.java @@ -0,0 +1,324 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.requests; + +import com.oracle.bmc.filestorage.model.*; +/** + * Example: Click here to see how to use UpgradeShapeMountTargetRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class UpgradeShapeMountTargetRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.filestorage.model.UpgradeShapeMountTargetDetails> { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + */ + private String mountTargetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + */ + public String getMountTargetId() { + return mountTargetId; + } + /** + * Details for changing the shape of mount target. + */ + private com.oracle.bmc.filestorage.model.UpgradeShapeMountTargetDetails + upgradeShapeMountTargetDetails; + + /** + * Details for changing the shape of mount target. + */ + public com.oracle.bmc.filestorage.model.UpgradeShapeMountTargetDetails + getUpgradeShapeMountTargetDetails() { + return upgradeShapeMountTargetDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.filestorage.model.UpgradeShapeMountTargetDetails getBody$() { + return upgradeShapeMountTargetDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpgradeShapeMountTargetRequest, + com.oracle.bmc.filestorage.model.UpgradeShapeMountTargetDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + */ + private String mountTargetId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + * @param mountTargetId the value to set + * @return this builder instance + */ + public Builder mountTargetId(String mountTargetId) { + this.mountTargetId = mountTargetId; + return this; + } + + /** + * Details for changing the shape of mount target. + */ + private com.oracle.bmc.filestorage.model.UpgradeShapeMountTargetDetails + upgradeShapeMountTargetDetails = null; + + /** + * Details for changing the shape of mount target. + * @param upgradeShapeMountTargetDetails the value to set + * @return this builder instance + */ + public Builder upgradeShapeMountTargetDetails( + com.oracle.bmc.filestorage.model.UpgradeShapeMountTargetDetails + upgradeShapeMountTargetDetails) { + this.upgradeShapeMountTargetDetails = upgradeShapeMountTargetDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpgradeShapeMountTargetRequest o) { + mountTargetId(o.getMountTargetId()); + upgradeShapeMountTargetDetails(o.getUpgradeShapeMountTargetDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpgradeShapeMountTargetRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpgradeShapeMountTargetRequest + */ + public UpgradeShapeMountTargetRequest build() { + UpgradeShapeMountTargetRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.filestorage.model.UpgradeShapeMountTargetDetails body) { + upgradeShapeMountTargetDetails(body); + return this; + } + + /** + * Build the instance of UpgradeShapeMountTargetRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpgradeShapeMountTargetRequest + */ + public UpgradeShapeMountTargetRequest buildWithoutInvocationCallback() { + UpgradeShapeMountTargetRequest request = new UpgradeShapeMountTargetRequest(); + request.mountTargetId = mountTargetId; + request.upgradeShapeMountTargetDetails = upgradeShapeMountTargetDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpgradeShapeMountTargetRequest(mountTargetId, upgradeShapeMountTargetDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .mountTargetId(mountTargetId) + .upgradeShapeMountTargetDetails(upgradeShapeMountTargetDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",mountTargetId=").append(String.valueOf(this.mountTargetId)); + sb.append(",upgradeShapeMountTargetDetails=") + .append(String.valueOf(this.upgradeShapeMountTargetDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpgradeShapeMountTargetRequest)) { + return false; + } + + UpgradeShapeMountTargetRequest other = (UpgradeShapeMountTargetRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.mountTargetId, other.mountTargetId) + && java.util.Objects.equals( + this.upgradeShapeMountTargetDetails, other.upgradeShapeMountTargetDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.mountTargetId == null ? 43 : this.mountTargetId.hashCode()); + result = + (result * PRIME) + + (this.upgradeShapeMountTargetDetails == null + ? 43 + : this.upgradeShapeMountTargetDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddExportLockResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddExportLockResponse.java new file mode 100644 index 00000000000..4a8b3e79f03 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddExportLockResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddExportLockResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Export instance. + */ + private com.oracle.bmc.filestorage.model.Export export; + + /** + * The returned Export instance. + * @return the value + */ + public com.oracle.bmc.filestorage.model.Export getExport() { + return export; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "export" + }) + private AddExportLockResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.filestorage.model.Export export) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.export = export; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Export instance. + */ + private com.oracle.bmc.filestorage.model.Export export; + + /** + * The returned Export instance. + * @param export the value to set + * @return this builder + */ + public Builder export(com.oracle.bmc.filestorage.model.Export export) { + this.export = export; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddExportLockResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + export(o.getExport()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public AddExportLockResponse build() { + return new AddExportLockResponse( + __httpStatusCode__, headers, etag, opcRequestId, export); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",export=").append(String.valueOf(export)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddExportLockResponse)) { + return false; + } + + AddExportLockResponse other = (AddExportLockResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.export, other.export); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.export == null ? 43 : this.export.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddFileSystemLockResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddFileSystemLockResponse.java new file mode 100644 index 00000000000..332c13b154f --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddFileSystemLockResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddFileSystemLockResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned FileSystem instance. + */ + private com.oracle.bmc.filestorage.model.FileSystem fileSystem; + + /** + * The returned FileSystem instance. + * @return the value + */ + public com.oracle.bmc.filestorage.model.FileSystem getFileSystem() { + return fileSystem; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "fileSystem" + }) + private AddFileSystemLockResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.filestorage.model.FileSystem fileSystem) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.fileSystem = fileSystem; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned FileSystem instance. + */ + private com.oracle.bmc.filestorage.model.FileSystem fileSystem; + + /** + * The returned FileSystem instance. + * @param fileSystem the value to set + * @return this builder + */ + public Builder fileSystem(com.oracle.bmc.filestorage.model.FileSystem fileSystem) { + this.fileSystem = fileSystem; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddFileSystemLockResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + fileSystem(o.getFileSystem()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public AddFileSystemLockResponse build() { + return new AddFileSystemLockResponse( + __httpStatusCode__, headers, etag, opcRequestId, fileSystem); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",fileSystem=").append(String.valueOf(fileSystem)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddFileSystemLockResponse)) { + return false; + } + + AddFileSystemLockResponse other = (AddFileSystemLockResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.fileSystem, other.fileSystem); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.fileSystem == null ? 43 : this.fileSystem.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddFilesystemSnapshotPolicyLockResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddFilesystemSnapshotPolicyLockResponse.java new file mode 100644 index 00000000000..1264affdb02 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddFilesystemSnapshotPolicyLockResponse.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddFilesystemSnapshotPolicyLockResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned FilesystemSnapshotPolicy instance. + */ + private com.oracle.bmc.filestorage.model.FilesystemSnapshotPolicy filesystemSnapshotPolicy; + + /** + * The returned FilesystemSnapshotPolicy instance. + * @return the value + */ + public com.oracle.bmc.filestorage.model.FilesystemSnapshotPolicy getFilesystemSnapshotPolicy() { + return filesystemSnapshotPolicy; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "filesystemSnapshotPolicy" + }) + private AddFilesystemSnapshotPolicyLockResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.filestorage.model.FilesystemSnapshotPolicy filesystemSnapshotPolicy) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.filesystemSnapshotPolicy = filesystemSnapshotPolicy; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned FilesystemSnapshotPolicy instance. + */ + private com.oracle.bmc.filestorage.model.FilesystemSnapshotPolicy filesystemSnapshotPolicy; + + /** + * The returned FilesystemSnapshotPolicy instance. + * @param filesystemSnapshotPolicy the value to set + * @return this builder + */ + public Builder filesystemSnapshotPolicy( + com.oracle.bmc.filestorage.model.FilesystemSnapshotPolicy + filesystemSnapshotPolicy) { + this.filesystemSnapshotPolicy = filesystemSnapshotPolicy; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddFilesystemSnapshotPolicyLockResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + filesystemSnapshotPolicy(o.getFilesystemSnapshotPolicy()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public AddFilesystemSnapshotPolicyLockResponse build() { + return new AddFilesystemSnapshotPolicyLockResponse( + __httpStatusCode__, headers, etag, opcRequestId, filesystemSnapshotPolicy); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",filesystemSnapshotPolicy=").append(String.valueOf(filesystemSnapshotPolicy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddFilesystemSnapshotPolicyLockResponse)) { + return false; + } + + AddFilesystemSnapshotPolicyLockResponse other = (AddFilesystemSnapshotPolicyLockResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.filesystemSnapshotPolicy, other.filesystemSnapshotPolicy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.filesystemSnapshotPolicy == null + ? 43 + : this.filesystemSnapshotPolicy.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddMountTargetLockResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddMountTargetLockResponse.java new file mode 100644 index 00000000000..c20bfc9eed9 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddMountTargetLockResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddMountTargetLockResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned MountTarget instance. + */ + private com.oracle.bmc.filestorage.model.MountTarget mountTarget; + + /** + * The returned MountTarget instance. + * @return the value + */ + public com.oracle.bmc.filestorage.model.MountTarget getMountTarget() { + return mountTarget; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "mountTarget" + }) + private AddMountTargetLockResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.filestorage.model.MountTarget mountTarget) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.mountTarget = mountTarget; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned MountTarget instance. + */ + private com.oracle.bmc.filestorage.model.MountTarget mountTarget; + + /** + * The returned MountTarget instance. + * @param mountTarget the value to set + * @return this builder + */ + public Builder mountTarget(com.oracle.bmc.filestorage.model.MountTarget mountTarget) { + this.mountTarget = mountTarget; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddMountTargetLockResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + mountTarget(o.getMountTarget()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public AddMountTargetLockResponse build() { + return new AddMountTargetLockResponse( + __httpStatusCode__, headers, etag, opcRequestId, mountTarget); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",mountTarget=").append(String.valueOf(mountTarget)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddMountTargetLockResponse)) { + return false; + } + + AddMountTargetLockResponse other = (AddMountTargetLockResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.mountTarget, other.mountTarget); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.mountTarget == null ? 43 : this.mountTarget.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddOutboundConnectorLockResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddOutboundConnectorLockResponse.java new file mode 100644 index 00000000000..bb131eda6e3 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddOutboundConnectorLockResponse.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddOutboundConnectorLockResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned OutboundConnector instance. + */ + private com.oracle.bmc.filestorage.model.OutboundConnector outboundConnector; + + /** + * The returned OutboundConnector instance. + * @return the value + */ + public com.oracle.bmc.filestorage.model.OutboundConnector getOutboundConnector() { + return outboundConnector; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "outboundConnector" + }) + private AddOutboundConnectorLockResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.filestorage.model.OutboundConnector outboundConnector) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.outboundConnector = outboundConnector; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned OutboundConnector instance. + */ + private com.oracle.bmc.filestorage.model.OutboundConnector outboundConnector; + + /** + * The returned OutboundConnector instance. + * @param outboundConnector the value to set + * @return this builder + */ + public Builder outboundConnector( + com.oracle.bmc.filestorage.model.OutboundConnector outboundConnector) { + this.outboundConnector = outboundConnector; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddOutboundConnectorLockResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + outboundConnector(o.getOutboundConnector()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public AddOutboundConnectorLockResponse build() { + return new AddOutboundConnectorLockResponse( + __httpStatusCode__, headers, etag, opcRequestId, outboundConnector); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",outboundConnector=").append(String.valueOf(outboundConnector)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddOutboundConnectorLockResponse)) { + return false; + } + + AddOutboundConnectorLockResponse other = (AddOutboundConnectorLockResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.outboundConnector, other.outboundConnector); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.outboundConnector == null ? 43 : this.outboundConnector.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddReplicationLockResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddReplicationLockResponse.java new file mode 100644 index 00000000000..713bfc6aa5e --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddReplicationLockResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddReplicationLockResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Replication instance. + */ + private com.oracle.bmc.filestorage.model.Replication replication; + + /** + * The returned Replication instance. + * @return the value + */ + public com.oracle.bmc.filestorage.model.Replication getReplication() { + return replication; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "replication" + }) + private AddReplicationLockResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.filestorage.model.Replication replication) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.replication = replication; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Replication instance. + */ + private com.oracle.bmc.filestorage.model.Replication replication; + + /** + * The returned Replication instance. + * @param replication the value to set + * @return this builder + */ + public Builder replication(com.oracle.bmc.filestorage.model.Replication replication) { + this.replication = replication; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddReplicationLockResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + replication(o.getReplication()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public AddReplicationLockResponse build() { + return new AddReplicationLockResponse( + __httpStatusCode__, headers, etag, opcRequestId, replication); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",replication=").append(String.valueOf(replication)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddReplicationLockResponse)) { + return false; + } + + AddReplicationLockResponse other = (AddReplicationLockResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.replication, other.replication); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.replication == null ? 43 : this.replication.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddSnapshotLockResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddSnapshotLockResponse.java new file mode 100644 index 00000000000..09ddd7ea191 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/AddSnapshotLockResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class AddSnapshotLockResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Snapshot instance. + */ + private com.oracle.bmc.filestorage.model.Snapshot snapshot; + + /** + * The returned Snapshot instance. + * @return the value + */ + public com.oracle.bmc.filestorage.model.Snapshot getSnapshot() { + return snapshot; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "snapshot" + }) + private AddSnapshotLockResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.filestorage.model.Snapshot snapshot) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.snapshot = snapshot; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Snapshot instance. + */ + private com.oracle.bmc.filestorage.model.Snapshot snapshot; + + /** + * The returned Snapshot instance. + * @param snapshot the value to set + * @return this builder + */ + public Builder snapshot(com.oracle.bmc.filestorage.model.Snapshot snapshot) { + this.snapshot = snapshot; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddSnapshotLockResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + snapshot(o.getSnapshot()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public AddSnapshotLockResponse build() { + return new AddSnapshotLockResponse( + __httpStatusCode__, headers, etag, opcRequestId, snapshot); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",snapshot=").append(String.valueOf(snapshot)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddSnapshotLockResponse)) { + return false; + } + + AddSnapshotLockResponse other = (AddSnapshotLockResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.snapshot, other.snapshot); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.snapshot == null ? 43 : this.snapshot.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/CancelDowngradeShapeMountTargetResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/CancelDowngradeShapeMountTargetResponse.java new file mode 100644 index 00000000000..01c1704610e --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/CancelDowngradeShapeMountTargetResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class CancelDowngradeShapeMountTargetResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned MountTarget instance. + */ + private com.oracle.bmc.filestorage.model.MountTarget mountTarget; + + /** + * The returned MountTarget instance. + * @return the value + */ + public com.oracle.bmc.filestorage.model.MountTarget getMountTarget() { + return mountTarget; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "mountTarget" + }) + private CancelDowngradeShapeMountTargetResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.filestorage.model.MountTarget mountTarget) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.mountTarget = mountTarget; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned MountTarget instance. + */ + private com.oracle.bmc.filestorage.model.MountTarget mountTarget; + + /** + * The returned MountTarget instance. + * @param mountTarget the value to set + * @return this builder + */ + public Builder mountTarget(com.oracle.bmc.filestorage.model.MountTarget mountTarget) { + this.mountTarget = mountTarget; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CancelDowngradeShapeMountTargetResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + mountTarget(o.getMountTarget()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CancelDowngradeShapeMountTargetResponse build() { + return new CancelDowngradeShapeMountTargetResponse( + __httpStatusCode__, headers, etag, opcRequestId, mountTarget); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",mountTarget=").append(String.valueOf(mountTarget)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CancelDowngradeShapeMountTargetResponse)) { + return false; + } + + CancelDowngradeShapeMountTargetResponse other = (CancelDowngradeShapeMountTargetResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.mountTarget, other.mountTarget); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.mountTarget == null ? 43 : this.mountTarget.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/DetachCloneResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/DetachCloneResponse.java new file mode 100644 index 00000000000..abca294ec61 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/DetachCloneResponse.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class DetachCloneResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DetachCloneResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DetachCloneResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DetachCloneResponse build() { + return new DetachCloneResponse(__httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DetachCloneResponse)) { + return false; + } + + DetachCloneResponse other = (DetachCloneResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveExportLockResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveExportLockResponse.java new file mode 100644 index 00000000000..067b3e8e21a --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveExportLockResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveExportLockResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Export instance. + */ + private com.oracle.bmc.filestorage.model.Export export; + + /** + * The returned Export instance. + * @return the value + */ + public com.oracle.bmc.filestorage.model.Export getExport() { + return export; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "export" + }) + private RemoveExportLockResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.filestorage.model.Export export) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.export = export; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Export instance. + */ + private com.oracle.bmc.filestorage.model.Export export; + + /** + * The returned Export instance. + * @param export the value to set + * @return this builder + */ + public Builder export(com.oracle.bmc.filestorage.model.Export export) { + this.export = export; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveExportLockResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + export(o.getExport()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RemoveExportLockResponse build() { + return new RemoveExportLockResponse( + __httpStatusCode__, headers, etag, opcRequestId, export); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",export=").append(String.valueOf(export)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveExportLockResponse)) { + return false; + } + + RemoveExportLockResponse other = (RemoveExportLockResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.export, other.export); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.export == null ? 43 : this.export.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveFileSystemLockResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveFileSystemLockResponse.java new file mode 100644 index 00000000000..cdc4f623d11 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveFileSystemLockResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveFileSystemLockResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned FileSystem instance. + */ + private com.oracle.bmc.filestorage.model.FileSystem fileSystem; + + /** + * The returned FileSystem instance. + * @return the value + */ + public com.oracle.bmc.filestorage.model.FileSystem getFileSystem() { + return fileSystem; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "fileSystem" + }) + private RemoveFileSystemLockResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.filestorage.model.FileSystem fileSystem) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.fileSystem = fileSystem; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned FileSystem instance. + */ + private com.oracle.bmc.filestorage.model.FileSystem fileSystem; + + /** + * The returned FileSystem instance. + * @param fileSystem the value to set + * @return this builder + */ + public Builder fileSystem(com.oracle.bmc.filestorage.model.FileSystem fileSystem) { + this.fileSystem = fileSystem; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveFileSystemLockResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + fileSystem(o.getFileSystem()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RemoveFileSystemLockResponse build() { + return new RemoveFileSystemLockResponse( + __httpStatusCode__, headers, etag, opcRequestId, fileSystem); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",fileSystem=").append(String.valueOf(fileSystem)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveFileSystemLockResponse)) { + return false; + } + + RemoveFileSystemLockResponse other = (RemoveFileSystemLockResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.fileSystem, other.fileSystem); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.fileSystem == null ? 43 : this.fileSystem.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveFilesystemSnapshotPolicyLockResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveFilesystemSnapshotPolicyLockResponse.java new file mode 100644 index 00000000000..718a37740ad --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveFilesystemSnapshotPolicyLockResponse.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveFilesystemSnapshotPolicyLockResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned FilesystemSnapshotPolicy instance. + */ + private com.oracle.bmc.filestorage.model.FilesystemSnapshotPolicy filesystemSnapshotPolicy; + + /** + * The returned FilesystemSnapshotPolicy instance. + * @return the value + */ + public com.oracle.bmc.filestorage.model.FilesystemSnapshotPolicy getFilesystemSnapshotPolicy() { + return filesystemSnapshotPolicy; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "filesystemSnapshotPolicy" + }) + private RemoveFilesystemSnapshotPolicyLockResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.filestorage.model.FilesystemSnapshotPolicy filesystemSnapshotPolicy) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.filesystemSnapshotPolicy = filesystemSnapshotPolicy; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned FilesystemSnapshotPolicy instance. + */ + private com.oracle.bmc.filestorage.model.FilesystemSnapshotPolicy filesystemSnapshotPolicy; + + /** + * The returned FilesystemSnapshotPolicy instance. + * @param filesystemSnapshotPolicy the value to set + * @return this builder + */ + public Builder filesystemSnapshotPolicy( + com.oracle.bmc.filestorage.model.FilesystemSnapshotPolicy + filesystemSnapshotPolicy) { + this.filesystemSnapshotPolicy = filesystemSnapshotPolicy; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveFilesystemSnapshotPolicyLockResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + filesystemSnapshotPolicy(o.getFilesystemSnapshotPolicy()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RemoveFilesystemSnapshotPolicyLockResponse build() { + return new RemoveFilesystemSnapshotPolicyLockResponse( + __httpStatusCode__, headers, etag, opcRequestId, filesystemSnapshotPolicy); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",filesystemSnapshotPolicy=").append(String.valueOf(filesystemSnapshotPolicy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveFilesystemSnapshotPolicyLockResponse)) { + return false; + } + + RemoveFilesystemSnapshotPolicyLockResponse other = + (RemoveFilesystemSnapshotPolicyLockResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.filesystemSnapshotPolicy, other.filesystemSnapshotPolicy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.filesystemSnapshotPolicy == null + ? 43 + : this.filesystemSnapshotPolicy.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveMountTargetLockResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveMountTargetLockResponse.java new file mode 100644 index 00000000000..a7714c2e634 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveMountTargetLockResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveMountTargetLockResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned MountTarget instance. + */ + private com.oracle.bmc.filestorage.model.MountTarget mountTarget; + + /** + * The returned MountTarget instance. + * @return the value + */ + public com.oracle.bmc.filestorage.model.MountTarget getMountTarget() { + return mountTarget; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "mountTarget" + }) + private RemoveMountTargetLockResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.filestorage.model.MountTarget mountTarget) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.mountTarget = mountTarget; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned MountTarget instance. + */ + private com.oracle.bmc.filestorage.model.MountTarget mountTarget; + + /** + * The returned MountTarget instance. + * @param mountTarget the value to set + * @return this builder + */ + public Builder mountTarget(com.oracle.bmc.filestorage.model.MountTarget mountTarget) { + this.mountTarget = mountTarget; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveMountTargetLockResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + mountTarget(o.getMountTarget()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RemoveMountTargetLockResponse build() { + return new RemoveMountTargetLockResponse( + __httpStatusCode__, headers, etag, opcRequestId, mountTarget); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",mountTarget=").append(String.valueOf(mountTarget)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveMountTargetLockResponse)) { + return false; + } + + RemoveMountTargetLockResponse other = (RemoveMountTargetLockResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.mountTarget, other.mountTarget); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.mountTarget == null ? 43 : this.mountTarget.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveOutboundConnectorLockResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveOutboundConnectorLockResponse.java new file mode 100644 index 00000000000..3e9ad46abe4 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveOutboundConnectorLockResponse.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveOutboundConnectorLockResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned OutboundConnector instance. + */ + private com.oracle.bmc.filestorage.model.OutboundConnector outboundConnector; + + /** + * The returned OutboundConnector instance. + * @return the value + */ + public com.oracle.bmc.filestorage.model.OutboundConnector getOutboundConnector() { + return outboundConnector; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "outboundConnector" + }) + private RemoveOutboundConnectorLockResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.filestorage.model.OutboundConnector outboundConnector) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.outboundConnector = outboundConnector; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned OutboundConnector instance. + */ + private com.oracle.bmc.filestorage.model.OutboundConnector outboundConnector; + + /** + * The returned OutboundConnector instance. + * @param outboundConnector the value to set + * @return this builder + */ + public Builder outboundConnector( + com.oracle.bmc.filestorage.model.OutboundConnector outboundConnector) { + this.outboundConnector = outboundConnector; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveOutboundConnectorLockResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + outboundConnector(o.getOutboundConnector()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RemoveOutboundConnectorLockResponse build() { + return new RemoveOutboundConnectorLockResponse( + __httpStatusCode__, headers, etag, opcRequestId, outboundConnector); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",outboundConnector=").append(String.valueOf(outboundConnector)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveOutboundConnectorLockResponse)) { + return false; + } + + RemoveOutboundConnectorLockResponse other = (RemoveOutboundConnectorLockResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.outboundConnector, other.outboundConnector); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.outboundConnector == null ? 43 : this.outboundConnector.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveReplicationLockResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveReplicationLockResponse.java new file mode 100644 index 00000000000..bd2a1ff92a3 --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveReplicationLockResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveReplicationLockResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Replication instance. + */ + private com.oracle.bmc.filestorage.model.Replication replication; + + /** + * The returned Replication instance. + * @return the value + */ + public com.oracle.bmc.filestorage.model.Replication getReplication() { + return replication; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "replication" + }) + private RemoveReplicationLockResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.filestorage.model.Replication replication) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.replication = replication; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Replication instance. + */ + private com.oracle.bmc.filestorage.model.Replication replication; + + /** + * The returned Replication instance. + * @param replication the value to set + * @return this builder + */ + public Builder replication(com.oracle.bmc.filestorage.model.Replication replication) { + this.replication = replication; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveReplicationLockResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + replication(o.getReplication()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RemoveReplicationLockResponse build() { + return new RemoveReplicationLockResponse( + __httpStatusCode__, headers, etag, opcRequestId, replication); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",replication=").append(String.valueOf(replication)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveReplicationLockResponse)) { + return false; + } + + RemoveReplicationLockResponse other = (RemoveReplicationLockResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.replication, other.replication); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.replication == null ? 43 : this.replication.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveSnapshotLockResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveSnapshotLockResponse.java new file mode 100644 index 00000000000..7d0fde7312f --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/RemoveSnapshotLockResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class RemoveSnapshotLockResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Snapshot instance. + */ + private com.oracle.bmc.filestorage.model.Snapshot snapshot; + + /** + * The returned Snapshot instance. + * @return the value + */ + public com.oracle.bmc.filestorage.model.Snapshot getSnapshot() { + return snapshot; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "snapshot" + }) + private RemoveSnapshotLockResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.filestorage.model.Snapshot snapshot) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.snapshot = snapshot; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Snapshot instance. + */ + private com.oracle.bmc.filestorage.model.Snapshot snapshot; + + /** + * The returned Snapshot instance. + * @param snapshot the value to set + * @return this builder + */ + public Builder snapshot(com.oracle.bmc.filestorage.model.Snapshot snapshot) { + this.snapshot = snapshot; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveSnapshotLockResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + snapshot(o.getSnapshot()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RemoveSnapshotLockResponse build() { + return new RemoveSnapshotLockResponse( + __httpStatusCode__, headers, etag, opcRequestId, snapshot); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",snapshot=").append(String.valueOf(snapshot)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveSnapshotLockResponse)) { + return false; + } + + RemoveSnapshotLockResponse other = (RemoveSnapshotLockResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.snapshot, other.snapshot); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.snapshot == null ? 43 : this.snapshot.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/ScheduleDowngradeShapeMountTargetResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/ScheduleDowngradeShapeMountTargetResponse.java new file mode 100644 index 00000000000..36405c6a0fa --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/ScheduleDowngradeShapeMountTargetResponse.java @@ -0,0 +1,212 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class ScheduleDowngradeShapeMountTargetResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned MountTarget instance. + */ + private com.oracle.bmc.filestorage.model.MountTarget mountTarget; + + /** + * The returned MountTarget instance. + * @return the value + */ + public com.oracle.bmc.filestorage.model.MountTarget getMountTarget() { + return mountTarget; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "mountTarget" + }) + private ScheduleDowngradeShapeMountTargetResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.filestorage.model.MountTarget mountTarget) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.mountTarget = mountTarget; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned MountTarget instance. + */ + private com.oracle.bmc.filestorage.model.MountTarget mountTarget; + + /** + * The returned MountTarget instance. + * @param mountTarget the value to set + * @return this builder + */ + public Builder mountTarget(com.oracle.bmc.filestorage.model.MountTarget mountTarget) { + this.mountTarget = mountTarget; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ScheduleDowngradeShapeMountTargetResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + mountTarget(o.getMountTarget()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ScheduleDowngradeShapeMountTargetResponse build() { + return new ScheduleDowngradeShapeMountTargetResponse( + __httpStatusCode__, headers, etag, opcRequestId, mountTarget); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",mountTarget=").append(String.valueOf(mountTarget)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ScheduleDowngradeShapeMountTargetResponse)) { + return false; + } + + ScheduleDowngradeShapeMountTargetResponse other = + (ScheduleDowngradeShapeMountTargetResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.mountTarget, other.mountTarget); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.mountTarget == null ? 43 : this.mountTarget.hashCode()); + return result; + } +} diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/UpgradeShapeMountTargetResponse.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/UpgradeShapeMountTargetResponse.java new file mode 100644 index 00000000000..75e546c955c --- /dev/null +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/responses/UpgradeShapeMountTargetResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.filestorage.responses; + +import com.oracle.bmc.filestorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20171215") +public class UpgradeShapeMountTargetResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned MountTarget instance. + */ + private com.oracle.bmc.filestorage.model.MountTarget mountTarget; + + /** + * The returned MountTarget instance. + * @return the value + */ + public com.oracle.bmc.filestorage.model.MountTarget getMountTarget() { + return mountTarget; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "mountTarget" + }) + private UpgradeShapeMountTargetResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.filestorage.model.MountTarget mountTarget) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.mountTarget = mountTarget; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned MountTarget instance. + */ + private com.oracle.bmc.filestorage.model.MountTarget mountTarget; + + /** + * The returned MountTarget instance. + * @param mountTarget the value to set + * @return this builder + */ + public Builder mountTarget(com.oracle.bmc.filestorage.model.MountTarget mountTarget) { + this.mountTarget = mountTarget; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpgradeShapeMountTargetResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + mountTarget(o.getMountTarget()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpgradeShapeMountTargetResponse build() { + return new UpgradeShapeMountTargetResponse( + __httpStatusCode__, headers, etag, opcRequestId, mountTarget); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",mountTarget=").append(String.valueOf(mountTarget)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpgradeShapeMountTargetResponse)) { + return false; + } + + UpgradeShapeMountTargetResponse other = (UpgradeShapeMountTargetResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.mountTarget, other.mountTarget); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.mountTarget == null ? 43 : this.mountTarget.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/pom.xml b/bmc-fleetappsmanagement/pom.xml new file mode 100644 index 00000000000..1908f42854b --- /dev/null +++ b/bmc-fleetappsmanagement/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + com.oracle.oci.sdk + oci-java-sdk + 2.79.0 + ../pom.xml + + oci-java-sdk-fleetappsmanagement + Oracle Cloud Infrastructure SDK - Fleet Apps Management + This project contains the SDK used for Oracle Cloud Infrastructure Fleet Apps Management + https://docs.cloud.oracle.com/Content/API/SDKDocs/javasdk.htm + + + com.oracle.oci.sdk + oci-java-sdk-common + 2.79.0 + + + \ No newline at end of file diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagement.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagement.java new file mode 100644 index 00000000000..111d7a8465e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagement.java @@ -0,0 +1,523 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. + * + * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public interface FleetAppsManagement extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the service. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this Region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Check if Fleet Application Management tags can be added to the resources. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CheckResourceTagging API. + */ + CheckResourceTaggingResponse checkResourceTagging(CheckResourceTaggingRequest request); + + /** + * Confirm targets to be managed for a Fleet. + * Only targets that are confirmed will be managed by Fleet Application Management + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ConfirmTargets API. + */ + ConfirmTargetsResponse confirmTargets(ConfirmTargetsRequest request); + + /** + * Create a product, environment, group, or generic type of fleet in Fleet Application Management. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateFleet API. + */ + CreateFleetResponse createFleet(CreateFleetRequest request); + + /** + * Add credentials to a fleet in Fleet Application Management. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateFleetCredential API. + */ + CreateFleetCredentialResponse createFleetCredential(CreateFleetCredentialRequest request); + + /** + * Add an existing global property to a fleet in Fleet Application Management. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateFleetProperty API. + */ + CreateFleetPropertyResponse createFleetProperty(CreateFleetPropertyRequest request); + + /** + * Add resource to a fleet in\u00A0Fleet Application Management. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateFleetResource API. + */ + CreateFleetResourceResponse createFleetResource(CreateFleetResourceRequest request); + + /** + * Delete a fleet in Fleet Application Management. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteFleet API. + */ + DeleteFleetResponse deleteFleet(DeleteFleetRequest request); + + /** + * Delete a credential associated with a fleet product or application in\u00A0Fleet Application Management. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteFleetCredential API. + */ + DeleteFleetCredentialResponse deleteFleetCredential(DeleteFleetCredentialRequest request); + + /** + * Delete a property associated with a fleet in Fleet Application Management. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteFleetProperty API. + */ + DeleteFleetPropertyResponse deleteFleetProperty(DeleteFleetPropertyRequest request); + + /** + * Removes a resource from the fleet in Fleet Application Management. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteFleetResource API. + */ + DeleteFleetResourceResponse deleteFleetResource(DeleteFleetResourceRequest request); + + /** + * Generate compliance reports for a Fleet. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GenerateComplianceReport API. + */ + GenerateComplianceReportResponse generateComplianceReport( + GenerateComplianceReportRequest request); + + /** + * Retrieve compliance report for a fleet. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetComplianceReport API. + */ + GetComplianceReportResponse getComplianceReport(GetComplianceReportRequest request); + + /** + * Get the details of a fleet in Fleet Application Management. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetFleet API. + */ + GetFleetResponse getFleet(GetFleetRequest request); + + /** + * Gets a FleetCredential by identifier. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetFleetCredential API. + */ + GetFleetCredentialResponse getFleetCredential(GetFleetCredentialRequest request); + + /** + * Gets a Fleet Property by identifier. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetFleetProperty API. + */ + GetFleetPropertyResponse getFleetProperty(GetFleetPropertyRequest request); + + /** + * Gets a Fleet Resource by identifier. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetFleetResource API. + */ + GetFleetResourceResponse getFleetResource(GetFleetResourceRequest request); + + /** + * Gets details of the work request with the given ID. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetWorkRequest API. + */ + GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request); + + /** + * Return a list of AnnouncementSummary items. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListAnnouncements API. + */ + ListAnnouncementsResponse listAnnouncements(ListAnnouncementsRequest request); + + /** + * List credentials in Fleet Application Management. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListFleetCredentials API. + */ + ListFleetCredentialsResponse listFleetCredentials(ListFleetCredentialsRequest request); + + /** + * Returns a list of products associated with the confirmed targets. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListFleetProducts API. + */ + ListFleetProductsResponse listFleetProducts(ListFleetProductsRequest request); + + /** + * List fleet properties in Fleet Application Management. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListFleetProperties API. + */ + ListFleetPropertiesResponse listFleetProperties(ListFleetPropertiesRequest request); + + /** + * List resources for a fleet in Fleet Application Management. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListFleetResources API. + */ + ListFleetResourcesResponse listFleetResources(ListFleetResourcesRequest request); + + /** + * Returns the list of all confirmed targets within a fleet. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListFleetTargets API. + */ + ListFleetTargetsResponse listFleetTargets(ListFleetTargetsRequest request); + + /** + * Returns a list of Fleets in the specified Tenancy. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListFleets API. + */ + ListFleetsResponse listFleets(ListFleetsRequest request); + + /** + * Returns a list of InventoryResources. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListInventoryResources API. + */ + ListInventoryResourcesResponse listInventoryResources(ListInventoryResourcesRequest request); + + /** + * Return all targets belonging to the resources within a fleet. + * It will include both confirmed and unconfirmed targets. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListTargets API. + */ + ListTargetsResponse listTargets(ListTargetsRequest request); + + /** + * Returns a (paginated) list of errors for the work request with the given ID. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListWorkRequestErrors API. + */ + ListWorkRequestErrorsResponse listWorkRequestErrors(ListWorkRequestErrorsRequest request); + + /** + * Returns a (paginated) list of logs for the work request with the given ID. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListWorkRequestLogs API. + */ + ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsRequest request); + + /** + * Lists the work requests in a compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListWorkRequests API. + */ + ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request); + + /** + * Request validation for resources within a fleet. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RequestResourceValidation API. + */ + RequestResourceValidationResponse requestResourceValidation( + RequestResourceValidationRequest request); + + /** + * Confirm targets to be managed for a Fleet. + * Only targets that are confirmed will be managed by Fleet Application Management + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RequestTargetDiscovery API. + */ + RequestTargetDiscoveryResponse requestTargetDiscovery(RequestTargetDiscoveryRequest request); + + /** + * Update fleet information in Fleet Application Management. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateFleet API. + */ + UpdateFleetResponse updateFleet(UpdateFleetRequest request); + + /** + * Edit credentials associated with a product or application in\u00A0Fleet Application Management. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateFleetCredential API. + */ + UpdateFleetCredentialResponse updateFleetCredential(UpdateFleetCredentialRequest request); + + /** + * Edit a property associated with a fleet in Fleet Application Management. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateFleetProperty API. + */ + UpdateFleetPropertyResponse updateFleetProperty(UpdateFleetPropertyRequest request); + + /** + * Updates the FleetResource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateFleetResource API. + */ + UpdateFleetResourceResponse updateFleetResource(UpdateFleetResourceRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + FleetAppsManagementWaiters getWaiters(); + + /** + * Gets the pre-configured paginators available for list operations in this service which may return multiple + * pages of data. These paginators provide an {@link java.lang.Iterable} interface so that service responses, or + * resources/records, can be iterated through without having to manually deal with pagination and page tokens. + * + * @return The service paginators. + */ + FleetAppsManagementPaginators getPaginators(); +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAdmin.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAdmin.java new file mode 100644 index 00000000000..e84a96a90a0 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAdmin.java @@ -0,0 +1,398 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. + * + * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public interface FleetAppsManagementAdmin extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the service. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this Region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Creates a CompliancePolicyRule. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateCompliancePolicyRule API. + */ + CreateCompliancePolicyRuleResponse createCompliancePolicyRule( + CreateCompliancePolicyRuleRequest request); + + /** + * Onboard a tenant to Fleet Application Management. + * The onboarding process lets Fleet Application Management create a few required policies that you need to start using it and its features. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateOnboarding API. + */ + CreateOnboardingResponse createOnboarding(CreateOnboardingRequest request); + + /** + * Creates a new PlatformConfiguration. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreatePlatformConfiguration API. + */ + CreatePlatformConfigurationResponse createPlatformConfiguration( + CreatePlatformConfigurationRequest request); + + /** + * Create a business-specific metadata property in Fleet Application Management and capture the business metadata classifications. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateProperty API. + */ + CreatePropertyResponse createProperty(CreatePropertyRequest request); + + /** + * Deletes a CompliancePolicyRule. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteCompliancePolicyRule API. + */ + DeleteCompliancePolicyRuleResponse deleteCompliancePolicyRule( + DeleteCompliancePolicyRuleRequest request); + + /** + * Deletes Fleet Application Management onboarding resource by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteOnboarding API. + */ + DeleteOnboardingResponse deleteOnboarding(DeleteOnboardingRequest request); + + /** + * Deletes a PlatformConfiguration resource by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeletePlatformConfiguration API. + */ + DeletePlatformConfigurationResponse deletePlatformConfiguration( + DeletePlatformConfigurationRequest request); + + /** + * Delete a property in Fleet Application Management. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteProperty API. + */ + DeletePropertyResponse deleteProperty(DeletePropertyRequest request); + + /** + * Enable Policies for a newer version of Fleet Application Management + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use EnableLatestPolicy API. + */ + EnableLatestPolicyResponse enableLatestPolicy(EnableLatestPolicyRequest request); + + /** + * Gets information about a CompliancePolicy. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetCompliancePolicy API. + */ + GetCompliancePolicyResponse getCompliancePolicy(GetCompliancePolicyRequest request); + + /** + * Gets information about a CompliancePolicyRule. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetCompliancePolicyRule API. + */ + GetCompliancePolicyRuleResponse getCompliancePolicyRule(GetCompliancePolicyRuleRequest request); + + /** + * Gets a Fleet Application Management Onboarding by identifier. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetOnboarding API. + */ + GetOnboardingResponse getOnboarding(GetOnboardingRequest request); + + /** + * Gets a PlatformConfiguration by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetPlatformConfiguration API. + */ + GetPlatformConfigurationResponse getPlatformConfiguration( + GetPlatformConfigurationRequest request); + + /** + * Gets a Property by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetProperty API. + */ + GetPropertyResponse getProperty(GetPropertyRequest request); + + /** + * Gets a list of compliancePolicies. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListCompliancePolicies API. + */ + ListCompliancePoliciesResponse listCompliancePolicies(ListCompliancePoliciesRequest request); + + /** + * Gets a list of CompliancePolicyRules. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListCompliancePolicyRules API. + */ + ListCompliancePolicyRulesResponse listCompliancePolicyRules( + ListCompliancePolicyRulesRequest request); + + /** + * Returns a list of onboarding policy information for Fleet Application Management. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListOnboardingPolicies API. + */ + ListOnboardingPoliciesResponse listOnboardingPolicies(ListOnboardingPoliciesRequest request); + + /** + * Returns a list of onboarding information for the Tenancy. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListOnboardings API. + */ + ListOnboardingsResponse listOnboardings(ListOnboardingsRequest request); + + /** + * Returns a list of PlatformConfiguration for Tenancy. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListPlatformConfigurations API. + */ + ListPlatformConfigurationsResponse listPlatformConfigurations( + ListPlatformConfigurationsRequest request); + + /** + * List properties and their values for a tenancy in Fleet Application Management. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListProperties API. + */ + ListPropertiesResponse listProperties(ListPropertiesRequest request); + + /** + * Updates the Onboarding setting + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ManageSettings API. + */ + ManageSettingsResponse manageSettings(ManageSettingsRequest request); + + /** + * Updates a CompliancePolicyRule. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateCompliancePolicyRule API. + */ + UpdateCompliancePolicyRuleResponse updateCompliancePolicyRule( + UpdateCompliancePolicyRuleRequest request); + + /** + * Updates the Onboarding + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateOnboarding API. + */ + UpdateOnboardingResponse updateOnboarding(UpdateOnboardingRequest request); + + /** + * Updates the PlatformConfiguration + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdatePlatformConfiguration API. + */ + UpdatePlatformConfigurationResponse updatePlatformConfiguration( + UpdatePlatformConfigurationRequest request); + + /** + * Update a property in Fleet Application Management. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateProperty API. + */ + UpdatePropertyResponse updateProperty(UpdatePropertyRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + FleetAppsManagementAdminWaiters getWaiters(); + + /** + * Gets the pre-configured paginators available for list operations in this service which may return multiple + * pages of data. These paginators provide an {@link java.lang.Iterable} interface so that service responses, or + * resources/records, can be iterated through without having to manually deal with pagination and page tokens. + * + * @return The service paginators. + */ + FleetAppsManagementAdminPaginators getPaginators(); +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAdminAsync.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAdminAsync.java new file mode 100644 index 00000000000..4d7c9d909bf --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAdminAsync.java @@ -0,0 +1,460 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. + * + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public interface FleetAppsManagementAdminAsync extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the serice. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Creates a CompliancePolicyRule. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createCompliancePolicyRule( + CreateCompliancePolicyRuleRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateCompliancePolicyRuleRequest, CreateCompliancePolicyRuleResponse> + handler); + + /** + * Onboard a tenant to Fleet Application Management. + * The onboarding process lets Fleet Application Management create a few required policies that you need to start using it and its features. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createOnboarding( + CreateOnboardingRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Creates a new PlatformConfiguration. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createPlatformConfiguration( + CreatePlatformConfigurationRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreatePlatformConfigurationRequest, CreatePlatformConfigurationResponse> + handler); + + /** + * Create a business-specific metadata property in Fleet Application Management and capture the business metadata classifications. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createProperty( + CreatePropertyRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Deletes a CompliancePolicyRule. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteCompliancePolicyRule( + DeleteCompliancePolicyRuleRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteCompliancePolicyRuleRequest, DeleteCompliancePolicyRuleResponse> + handler); + + /** + * Deletes Fleet Application Management onboarding resource by identifier + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteOnboarding( + DeleteOnboardingRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Deletes a PlatformConfiguration resource by identifier + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deletePlatformConfiguration( + DeletePlatformConfigurationRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeletePlatformConfigurationRequest, DeletePlatformConfigurationResponse> + handler); + + /** + * Delete a property in Fleet Application Management. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteProperty( + DeletePropertyRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Enable Policies for a newer version of Fleet Application Management + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future enableLatestPolicy( + EnableLatestPolicyRequest request, + com.oracle.bmc.responses.AsyncHandler< + EnableLatestPolicyRequest, EnableLatestPolicyResponse> + handler); + + /** + * Gets information about a CompliancePolicy. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getCompliancePolicy( + GetCompliancePolicyRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetCompliancePolicyRequest, GetCompliancePolicyResponse> + handler); + + /** + * Gets information about a CompliancePolicyRule. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getCompliancePolicyRule( + GetCompliancePolicyRuleRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetCompliancePolicyRuleRequest, GetCompliancePolicyRuleResponse> + handler); + + /** + * Gets a Fleet Application Management Onboarding by identifier. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getOnboarding( + GetOnboardingRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Gets a PlatformConfiguration by identifier + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getPlatformConfiguration( + GetPlatformConfigurationRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetPlatformConfigurationRequest, GetPlatformConfigurationResponse> + handler); + + /** + * Gets a Property by identifier + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getProperty( + GetPropertyRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Gets a list of compliancePolicies. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listCompliancePolicies( + ListCompliancePoliciesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListCompliancePoliciesRequest, ListCompliancePoliciesResponse> + handler); + + /** + * Gets a list of CompliancePolicyRules. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listCompliancePolicyRules( + ListCompliancePolicyRulesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListCompliancePolicyRulesRequest, ListCompliancePolicyRulesResponse> + handler); + + /** + * Returns a list of onboarding policy information for Fleet Application Management. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listOnboardingPolicies( + ListOnboardingPoliciesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListOnboardingPoliciesRequest, ListOnboardingPoliciesResponse> + handler); + + /** + * Returns a list of onboarding information for the Tenancy. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listOnboardings( + ListOnboardingsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Returns a list of PlatformConfiguration for Tenancy. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listPlatformConfigurations( + ListPlatformConfigurationsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListPlatformConfigurationsRequest, ListPlatformConfigurationsResponse> + handler); + + /** + * List properties and their values for a tenancy in Fleet Application Management. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listProperties( + ListPropertiesRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Updates the Onboarding setting + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future manageSettings( + ManageSettingsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Updates a CompliancePolicyRule. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateCompliancePolicyRule( + UpdateCompliancePolicyRuleRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateCompliancePolicyRuleRequest, UpdateCompliancePolicyRuleResponse> + handler); + + /** + * Updates the Onboarding + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateOnboarding( + UpdateOnboardingRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Updates the PlatformConfiguration + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updatePlatformConfiguration( + UpdatePlatformConfigurationRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdatePlatformConfigurationRequest, UpdatePlatformConfigurationResponse> + handler); + + /** + * Update a property in Fleet Application Management. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateProperty( + UpdatePropertyRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAdminAsyncClient.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAdminAsyncClient.java new file mode 100644 index 00000000000..a23c499c067 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAdminAsyncClient.java @@ -0,0 +1,1702 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.internal.http.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Async client implementation for FleetAppsManagementAdmin service.
+ * There are two ways to use async client: + * 1. Use AsyncHandler: using AsyncHandler, if the response to the call is an {@link java.io.InputStream}, like + * getObject Api in object storage service, developers need to process the stream in AsyncHandler, and not anywhere else, + * because the stream will be closed right after the AsyncHandler is invoked.
+ * 2. Use Java Future: using Java Future, developers need to close the stream after they are done with the Java Future.
+ * Accessing the result should be done in a mutually exclusive manner, either through the Future or the AsyncHandler, + * but not both. If the Future is used, the caller should pass in null as the AsyncHandler. If the AsyncHandler + * is used, it is still safe to use the Future to determine whether or not the request was completed via + * Future.isDone/isCancelled.
+ * Please refer to https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class FleetAppsManagementAdminAsyncClient implements FleetAppsManagementAdminAsync { + /** + * Service instance for FleetAppsManagementAdmin. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("FLEETAPPSMANAGEMENTADMIN") + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://fams.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(FleetAppsManagementAdminAsyncClient.class); + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public FleetAppsManagementAdminAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public FleetAppsManagementAdminAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public FleetAppsManagementAdminAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public FleetAppsManagementAdminAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public FleetAppsManagementAdminAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public FleetAppsManagementAdminAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public FleetAppsManagementAdminAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + public FleetAppsManagementAdminAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.clientConfigurationToUse = configuration; + + this.refreshClient(); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder< + Builder, FleetAppsManagementAdminAsyncClient> { + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public FleetAppsManagementAdminAsyncClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new FleetAppsManagementAdminAsyncClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint); + } + } + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public java.util.concurrent.Future + createCompliancePolicyRule( + CreateCompliancePolicyRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateCompliancePolicyRuleRequest, + CreateCompliancePolicyRuleResponse> + handler) { + LOG.trace("Called async createCompliancePolicyRule"); + final CreateCompliancePolicyRuleRequest interceptedRequest = + CreateCompliancePolicyRuleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateCompliancePolicyRuleConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "CreateCompliancePolicyRule", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateCompliancePolicyRuleResponse> + transformer = + CreateCompliancePolicyRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateCompliancePolicyRuleRequest, CreateCompliancePolicyRuleResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateCompliancePolicyRuleRequest, + CreateCompliancePolicyRuleResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateCompliancePolicyRuleDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateCompliancePolicyRuleRequest, CreateCompliancePolicyRuleResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createOnboarding( + CreateOnboardingRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateOnboardingRequest, CreateOnboardingResponse> + handler) { + LOG.trace("Called async createOnboarding"); + final CreateOnboardingRequest interceptedRequest = + CreateOnboardingConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateOnboardingConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "CreateOnboarding", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + CreateOnboardingConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateOnboardingRequest, CreateOnboardingResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateOnboardingDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateOnboardingRequest, CreateOnboardingResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + createPlatformConfiguration( + CreatePlatformConfigurationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreatePlatformConfigurationRequest, + CreatePlatformConfigurationResponse> + handler) { + LOG.trace("Called async createPlatformConfiguration"); + final CreatePlatformConfigurationRequest interceptedRequest = + CreatePlatformConfigurationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreatePlatformConfigurationConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "CreatePlatformConfiguration", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, CreatePlatformConfigurationResponse> + transformer = + CreatePlatformConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreatePlatformConfigurationRequest, CreatePlatformConfigurationResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreatePlatformConfigurationRequest, + CreatePlatformConfigurationResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreatePlatformConfigurationDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreatePlatformConfigurationRequest, CreatePlatformConfigurationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createProperty( + CreatePropertyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreatePropertyRequest, CreatePropertyResponse> + handler) { + LOG.trace("Called async createProperty"); + final CreatePropertyRequest interceptedRequest = + CreatePropertyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreatePropertyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "CreateProperty", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + CreatePropertyConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreatePropertyRequest, CreatePropertyResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreatePropertyDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreatePropertyRequest, CreatePropertyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + deleteCompliancePolicyRule( + DeleteCompliancePolicyRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteCompliancePolicyRuleRequest, + DeleteCompliancePolicyRuleResponse> + handler) { + LOG.trace("Called async deleteCompliancePolicyRule"); + final DeleteCompliancePolicyRuleRequest interceptedRequest = + DeleteCompliancePolicyRuleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteCompliancePolicyRuleConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "DeleteCompliancePolicyRule", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteCompliancePolicyRuleResponse> + transformer = + DeleteCompliancePolicyRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteCompliancePolicyRuleRequest, DeleteCompliancePolicyRuleResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteCompliancePolicyRuleRequest, + DeleteCompliancePolicyRuleResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteCompliancePolicyRuleRequest, DeleteCompliancePolicyRuleResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteOnboarding( + DeleteOnboardingRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteOnboardingRequest, DeleteOnboardingResponse> + handler) { + LOG.trace("Called async deleteOnboarding"); + final DeleteOnboardingRequest interceptedRequest = + DeleteOnboardingConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteOnboardingConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "DeleteOnboarding", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + DeleteOnboardingConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteOnboardingRequest, DeleteOnboardingResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteOnboardingRequest, DeleteOnboardingResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + deletePlatformConfiguration( + DeletePlatformConfigurationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeletePlatformConfigurationRequest, + DeletePlatformConfigurationResponse> + handler) { + LOG.trace("Called async deletePlatformConfiguration"); + final DeletePlatformConfigurationRequest interceptedRequest = + DeletePlatformConfigurationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeletePlatformConfigurationConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "DeletePlatformConfiguration", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, DeletePlatformConfigurationResponse> + transformer = + DeletePlatformConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeletePlatformConfigurationRequest, DeletePlatformConfigurationResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeletePlatformConfigurationRequest, + DeletePlatformConfigurationResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeletePlatformConfigurationRequest, DeletePlatformConfigurationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteProperty( + DeletePropertyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeletePropertyRequest, DeletePropertyResponse> + handler) { + LOG.trace("Called async deleteProperty"); + final DeletePropertyRequest interceptedRequest = + DeletePropertyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeletePropertyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "DeleteProperty", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + DeletePropertyConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeletePropertyRequest, DeletePropertyResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeletePropertyRequest, DeletePropertyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future enableLatestPolicy( + EnableLatestPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + EnableLatestPolicyRequest, EnableLatestPolicyResponse> + handler) { + LOG.trace("Called async enableLatestPolicy"); + final EnableLatestPolicyRequest interceptedRequest = + EnableLatestPolicyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + EnableLatestPolicyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "EnableLatestPolicy", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + EnableLatestPolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + EnableLatestPolicyRequest, EnableLatestPolicyResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getEnableLatestPolicyDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + EnableLatestPolicyRequest, EnableLatestPolicyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getCompliancePolicy( + GetCompliancePolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetCompliancePolicyRequest, GetCompliancePolicyResponse> + handler) { + LOG.trace("Called async getCompliancePolicy"); + final GetCompliancePolicyRequest interceptedRequest = + GetCompliancePolicyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetCompliancePolicyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "GetCompliancePolicy", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + GetCompliancePolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetCompliancePolicyRequest, GetCompliancePolicyResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetCompliancePolicyRequest, GetCompliancePolicyResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetCompliancePolicyRequest, GetCompliancePolicyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getCompliancePolicyRule( + GetCompliancePolicyRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetCompliancePolicyRuleRequest, GetCompliancePolicyRuleResponse> + handler) { + LOG.trace("Called async getCompliancePolicyRule"); + final GetCompliancePolicyRuleRequest interceptedRequest = + GetCompliancePolicyRuleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetCompliancePolicyRuleConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "GetCompliancePolicyRule", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, GetCompliancePolicyRuleResponse> + transformer = + GetCompliancePolicyRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetCompliancePolicyRuleRequest, GetCompliancePolicyRuleResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetCompliancePolicyRuleRequest, GetCompliancePolicyRuleResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetCompliancePolicyRuleRequest, GetCompliancePolicyRuleResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getOnboarding( + GetOnboardingRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getOnboarding"); + final GetOnboardingRequest interceptedRequest = + GetOnboardingConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetOnboardingConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "GetOnboarding", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + GetOnboardingConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetOnboardingRequest, GetOnboardingResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetOnboardingRequest, GetOnboardingResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getPlatformConfiguration( + GetPlatformConfigurationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetPlatformConfigurationRequest, GetPlatformConfigurationResponse> + handler) { + LOG.trace("Called async getPlatformConfiguration"); + final GetPlatformConfigurationRequest interceptedRequest = + GetPlatformConfigurationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetPlatformConfigurationConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "GetPlatformConfiguration", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, GetPlatformConfigurationResponse> + transformer = + GetPlatformConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetPlatformConfigurationRequest, GetPlatformConfigurationResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetPlatformConfigurationRequest, GetPlatformConfigurationResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetPlatformConfigurationRequest, GetPlatformConfigurationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getProperty( + GetPropertyRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getProperty"); + final GetPropertyRequest interceptedRequest = + GetPropertyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetPropertyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "GetProperty", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + GetPropertyConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetPropertyRequest, GetPropertyResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetPropertyRequest, GetPropertyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listCompliancePolicies( + ListCompliancePoliciesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListCompliancePoliciesRequest, ListCompliancePoliciesResponse> + handler) { + LOG.trace("Called async listCompliancePolicies"); + final ListCompliancePoliciesRequest interceptedRequest = + ListCompliancePoliciesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListCompliancePoliciesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "ListCompliancePolicies", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListCompliancePoliciesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListCompliancePoliciesRequest, ListCompliancePoliciesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListCompliancePoliciesRequest, ListCompliancePoliciesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListCompliancePoliciesRequest, ListCompliancePoliciesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listCompliancePolicyRules( + ListCompliancePolicyRulesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListCompliancePolicyRulesRequest, ListCompliancePolicyRulesResponse> + handler) { + LOG.trace("Called async listCompliancePolicyRules"); + final ListCompliancePolicyRulesRequest interceptedRequest = + ListCompliancePolicyRulesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListCompliancePolicyRulesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "ListCompliancePolicyRules", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ListCompliancePolicyRulesResponse> + transformer = + ListCompliancePolicyRulesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListCompliancePolicyRulesRequest, ListCompliancePolicyRulesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListCompliancePolicyRulesRequest, + ListCompliancePolicyRulesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListCompliancePolicyRulesRequest, ListCompliancePolicyRulesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listOnboardingPolicies( + ListOnboardingPoliciesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListOnboardingPoliciesRequest, ListOnboardingPoliciesResponse> + handler) { + LOG.trace("Called async listOnboardingPolicies"); + final ListOnboardingPoliciesRequest interceptedRequest = + ListOnboardingPoliciesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListOnboardingPoliciesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "ListOnboardingPolicies", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListOnboardingPoliciesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListOnboardingPoliciesRequest, ListOnboardingPoliciesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListOnboardingPoliciesRequest, ListOnboardingPoliciesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListOnboardingPoliciesRequest, ListOnboardingPoliciesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listOnboardings( + ListOnboardingsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListOnboardingsRequest, ListOnboardingsResponse> + handler) { + LOG.trace("Called async listOnboardings"); + final ListOnboardingsRequest interceptedRequest = + ListOnboardingsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListOnboardingsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "ListOnboardings", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListOnboardingsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListOnboardingsRequest, ListOnboardingsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListOnboardingsRequest, ListOnboardingsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listPlatformConfigurations( + ListPlatformConfigurationsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListPlatformConfigurationsRequest, + ListPlatformConfigurationsResponse> + handler) { + LOG.trace("Called async listPlatformConfigurations"); + final ListPlatformConfigurationsRequest interceptedRequest = + ListPlatformConfigurationsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPlatformConfigurationsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "ListPlatformConfigurations", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ListPlatformConfigurationsResponse> + transformer = + ListPlatformConfigurationsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListPlatformConfigurationsRequest, ListPlatformConfigurationsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListPlatformConfigurationsRequest, + ListPlatformConfigurationsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListPlatformConfigurationsRequest, ListPlatformConfigurationsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listProperties( + ListPropertiesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListPropertiesRequest, ListPropertiesResponse> + handler) { + LOG.trace("Called async listProperties"); + final ListPropertiesRequest interceptedRequest = + ListPropertiesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPropertiesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "ListProperties", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListPropertiesConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListPropertiesRequest, ListPropertiesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListPropertiesRequest, ListPropertiesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future manageSettings( + ManageSettingsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ManageSettingsRequest, ManageSettingsResponse> + handler) { + LOG.trace("Called async manageSettings"); + final ManageSettingsRequest interceptedRequest = + ManageSettingsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ManageSettingsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "ManageSettings", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ManageSettingsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ManageSettingsRequest, ManageSettingsResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getManageSettingsDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ManageSettingsRequest, ManageSettingsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + updateCompliancePolicyRule( + UpdateCompliancePolicyRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateCompliancePolicyRuleRequest, + UpdateCompliancePolicyRuleResponse> + handler) { + LOG.trace("Called async updateCompliancePolicyRule"); + final UpdateCompliancePolicyRuleRequest interceptedRequest = + UpdateCompliancePolicyRuleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateCompliancePolicyRuleConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "UpdateCompliancePolicyRule", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateCompliancePolicyRuleResponse> + transformer = + UpdateCompliancePolicyRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateCompliancePolicyRuleRequest, UpdateCompliancePolicyRuleResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateCompliancePolicyRuleRequest, + UpdateCompliancePolicyRuleResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateCompliancePolicyRuleDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateCompliancePolicyRuleRequest, UpdateCompliancePolicyRuleResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateOnboarding( + UpdateOnboardingRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateOnboardingRequest, UpdateOnboardingResponse> + handler) { + LOG.trace("Called async updateOnboarding"); + final UpdateOnboardingRequest interceptedRequest = + UpdateOnboardingConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateOnboardingConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "UpdateOnboarding", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + UpdateOnboardingConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateOnboardingRequest, UpdateOnboardingResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateOnboardingDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateOnboardingRequest, UpdateOnboardingResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + updatePlatformConfiguration( + UpdatePlatformConfigurationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdatePlatformConfigurationRequest, + UpdatePlatformConfigurationResponse> + handler) { + LOG.trace("Called async updatePlatformConfiguration"); + final UpdatePlatformConfigurationRequest interceptedRequest = + UpdatePlatformConfigurationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdatePlatformConfigurationConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "UpdatePlatformConfiguration", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdatePlatformConfigurationResponse> + transformer = + UpdatePlatformConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdatePlatformConfigurationRequest, UpdatePlatformConfigurationResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdatePlatformConfigurationRequest, + UpdatePlatformConfigurationResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdatePlatformConfigurationDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdatePlatformConfigurationRequest, UpdatePlatformConfigurationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateProperty( + UpdatePropertyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdatePropertyRequest, UpdatePropertyResponse> + handler) { + LOG.trace("Called async updateProperty"); + final UpdatePropertyRequest interceptedRequest = + UpdatePropertyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdatePropertyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "UpdateProperty", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + UpdatePropertyConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdatePropertyRequest, UpdatePropertyResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdatePropertyDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdatePropertyRequest, UpdatePropertyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAdminClient.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAdminClient.java new file mode 100644 index 00000000000..1467b6cfff6 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAdminClient.java @@ -0,0 +1,1537 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.internal.http.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration; +import com.oracle.bmc.util.CircuitBreakerUtils; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class FleetAppsManagementAdminClient implements FleetAppsManagementAdmin { + /** + * Service instance for FleetAppsManagementAdmin. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("FLEETAPPSMANAGEMENTADMIN") + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://fams.{region}.oci.{secondLevelDomain}") + .build(); + // attempt twice if it's instance principals, immediately failures will try to refresh the token + private static final int MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS = 2; + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(FleetAppsManagementAdminClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final FleetAppsManagementAdminWaiters waiters; + + private final FleetAppsManagementAdminPaginators paginators; + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + circuitBreakerConfiguration; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public FleetAppsManagementAdminClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public FleetAppsManagementAdminClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public FleetAppsManagementAdminClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public FleetAppsManagementAdminClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public FleetAppsManagementAdminClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public FleetAppsManagementAdminClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public FleetAppsManagementAdminClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + */ + public FleetAppsManagementAdminClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * Use the {@link Builder} to get access to all these parameters. + * + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + protected FleetAppsManagementAdminClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + this.restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + + this.clientConfigurationToUse = + (configuration != null) + ? configuration + : com.oracle.bmc.ClientConfiguration.builder().build(); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.retryConfiguration = clientConfigurationToUse.getRetryConfiguration(); + final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + userCircuitBreakerConfiguration = + CircuitBreakerUtils.getUserDefinedCircuitBreakerConfiguration( + configuration); + if (userCircuitBreakerConfiguration == null) { + this.circuitBreakerConfiguration = + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION; + } else { + this.circuitBreakerConfiguration = userCircuitBreakerConfiguration; + } + + this.refreshClient(); + + if (executorService == null) { + // up to 50 (core) threads, time out after 60s idle, all daemon + java.util.concurrent.ThreadPoolExecutor threadPoolExecutor = + new java.util.concurrent.ThreadPoolExecutor( + 50, + 50, + 60L, + java.util.concurrent.TimeUnit.SECONDS, + new java.util.concurrent.LinkedBlockingQueue(), + com.oracle.bmc.internal.ClientThreadFactory.builder() + .isDaemon(true) + .nameFormat("FleetAppsManagementAdmin-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new FleetAppsManagementAdminWaiters(executorService, this); + + this.paginators = new FleetAppsManagementAdminPaginators(this); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder< + Builder, FleetAppsManagementAdminClient> { + private java.util.concurrent.ExecutorService executorService; + + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Set the ExecutorService for the client to be created. + * @param executorService executorService + * @return this builder + */ + public Builder executorService(java.util.concurrent.ExecutorService executorService) { + this.executorService = executorService; + return this; + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public FleetAppsManagementAdminClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new FleetAppsManagementAdminClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + restClientFactoryBuilder); + } + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, this.authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient, + null, + this.circuitBreakerConfiguration); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public CreateCompliancePolicyRuleResponse createCompliancePolicyRule( + CreateCompliancePolicyRuleRequest request) { + LOG.trace("Called createCompliancePolicyRule"); + final CreateCompliancePolicyRuleRequest interceptedRequest = + CreateCompliancePolicyRuleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateCompliancePolicyRuleConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "CreateCompliancePolicyRule", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + CreateCompliancePolicyRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getCreateCompliancePolicyRuleDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateOnboardingResponse createOnboarding(CreateOnboardingRequest request) { + LOG.trace("Called createOnboarding"); + final CreateOnboardingRequest interceptedRequest = + CreateOnboardingConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateOnboardingConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "CreateOnboarding", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + CreateOnboardingConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateOnboardingDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreatePlatformConfigurationResponse createPlatformConfiguration( + CreatePlatformConfigurationRequest request) { + LOG.trace("Called createPlatformConfiguration"); + final CreatePlatformConfigurationRequest interceptedRequest = + CreatePlatformConfigurationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreatePlatformConfigurationConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "CreatePlatformConfiguration", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + CreatePlatformConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getCreatePlatformConfigurationDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreatePropertyResponse createProperty(CreatePropertyRequest request) { + LOG.trace("Called createProperty"); + final CreatePropertyRequest interceptedRequest = + CreatePropertyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreatePropertyConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "CreateProperty", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + CreatePropertyConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreatePropertyDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteCompliancePolicyRuleResponse deleteCompliancePolicyRule( + DeleteCompliancePolicyRuleRequest request) { + LOG.trace("Called deleteCompliancePolicyRule"); + final DeleteCompliancePolicyRuleRequest interceptedRequest = + DeleteCompliancePolicyRuleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteCompliancePolicyRuleConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "DeleteCompliancePolicyRule", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + DeleteCompliancePolicyRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteOnboardingResponse deleteOnboarding(DeleteOnboardingRequest request) { + LOG.trace("Called deleteOnboarding"); + final DeleteOnboardingRequest interceptedRequest = + DeleteOnboardingConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteOnboardingConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "DeleteOnboarding", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + DeleteOnboardingConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeletePlatformConfigurationResponse deletePlatformConfiguration( + DeletePlatformConfigurationRequest request) { + LOG.trace("Called deletePlatformConfiguration"); + final DeletePlatformConfigurationRequest interceptedRequest = + DeletePlatformConfigurationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeletePlatformConfigurationConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "DeletePlatformConfiguration", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + DeletePlatformConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeletePropertyResponse deleteProperty(DeletePropertyRequest request) { + LOG.trace("Called deleteProperty"); + final DeletePropertyRequest interceptedRequest = + DeletePropertyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeletePropertyConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "DeleteProperty", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + DeletePropertyConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public EnableLatestPolicyResponse enableLatestPolicy(EnableLatestPolicyRequest request) { + LOG.trace("Called enableLatestPolicy"); + final EnableLatestPolicyRequest interceptedRequest = + EnableLatestPolicyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + EnableLatestPolicyConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "EnableLatestPolicy", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + EnableLatestPolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getEnableLatestPolicyDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetCompliancePolicyResponse getCompliancePolicy(GetCompliancePolicyRequest request) { + LOG.trace("Called getCompliancePolicy"); + final GetCompliancePolicyRequest interceptedRequest = + GetCompliancePolicyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetCompliancePolicyConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "GetCompliancePolicy", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + GetCompliancePolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetCompliancePolicyRuleResponse getCompliancePolicyRule( + GetCompliancePolicyRuleRequest request) { + LOG.trace("Called getCompliancePolicyRule"); + final GetCompliancePolicyRuleRequest interceptedRequest = + GetCompliancePolicyRuleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetCompliancePolicyRuleConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "GetCompliancePolicyRule", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + GetCompliancePolicyRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetOnboardingResponse getOnboarding(GetOnboardingRequest request) { + LOG.trace("Called getOnboarding"); + final GetOnboardingRequest interceptedRequest = + GetOnboardingConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetOnboardingConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "GetOnboarding", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + GetOnboardingConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetPlatformConfigurationResponse getPlatformConfiguration( + GetPlatformConfigurationRequest request) { + LOG.trace("Called getPlatformConfiguration"); + final GetPlatformConfigurationRequest interceptedRequest = + GetPlatformConfigurationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetPlatformConfigurationConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "GetPlatformConfiguration", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + GetPlatformConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetPropertyResponse getProperty(GetPropertyRequest request) { + LOG.trace("Called getProperty"); + final GetPropertyRequest interceptedRequest = + GetPropertyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetPropertyConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "GetProperty", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + GetPropertyConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListCompliancePoliciesResponse listCompliancePolicies( + ListCompliancePoliciesRequest request) { + LOG.trace("Called listCompliancePolicies"); + final ListCompliancePoliciesRequest interceptedRequest = + ListCompliancePoliciesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListCompliancePoliciesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "ListCompliancePolicies", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListCompliancePoliciesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListCompliancePolicyRulesResponse listCompliancePolicyRules( + ListCompliancePolicyRulesRequest request) { + LOG.trace("Called listCompliancePolicyRules"); + final ListCompliancePolicyRulesRequest interceptedRequest = + ListCompliancePolicyRulesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListCompliancePolicyRulesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "ListCompliancePolicyRules", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListCompliancePolicyRulesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListOnboardingPoliciesResponse listOnboardingPolicies( + ListOnboardingPoliciesRequest request) { + LOG.trace("Called listOnboardingPolicies"); + final ListOnboardingPoliciesRequest interceptedRequest = + ListOnboardingPoliciesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListOnboardingPoliciesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "ListOnboardingPolicies", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListOnboardingPoliciesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListOnboardingsResponse listOnboardings(ListOnboardingsRequest request) { + LOG.trace("Called listOnboardings"); + final ListOnboardingsRequest interceptedRequest = + ListOnboardingsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListOnboardingsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "ListOnboardings", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListOnboardingsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListPlatformConfigurationsResponse listPlatformConfigurations( + ListPlatformConfigurationsRequest request) { + LOG.trace("Called listPlatformConfigurations"); + final ListPlatformConfigurationsRequest interceptedRequest = + ListPlatformConfigurationsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPlatformConfigurationsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "ListPlatformConfigurations", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListPlatformConfigurationsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListPropertiesResponse listProperties(ListPropertiesRequest request) { + LOG.trace("Called listProperties"); + final ListPropertiesRequest interceptedRequest = + ListPropertiesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPropertiesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "ListProperties", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + ListPropertiesConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ManageSettingsResponse manageSettings(ManageSettingsRequest request) { + LOG.trace("Called manageSettings"); + final ManageSettingsRequest interceptedRequest = + ManageSettingsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ManageSettingsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "ManageSettings", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + ManageSettingsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getManageSettingsDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateCompliancePolicyRuleResponse updateCompliancePolicyRule( + UpdateCompliancePolicyRuleRequest request) { + LOG.trace("Called updateCompliancePolicyRule"); + final UpdateCompliancePolicyRuleRequest interceptedRequest = + UpdateCompliancePolicyRuleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateCompliancePolicyRuleConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "UpdateCompliancePolicyRule", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + UpdateCompliancePolicyRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest + .getUpdateCompliancePolicyRuleDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateOnboardingResponse updateOnboarding(UpdateOnboardingRequest request) { + LOG.trace("Called updateOnboarding"); + final UpdateOnboardingRequest interceptedRequest = + UpdateOnboardingConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateOnboardingConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "UpdateOnboarding", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + UpdateOnboardingConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateOnboardingDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdatePlatformConfigurationResponse updatePlatformConfiguration( + UpdatePlatformConfigurationRequest request) { + LOG.trace("Called updatePlatformConfiguration"); + final UpdatePlatformConfigurationRequest interceptedRequest = + UpdatePlatformConfigurationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdatePlatformConfigurationConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "UpdatePlatformConfiguration", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + UpdatePlatformConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest + .getUpdatePlatformConfigurationDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdatePropertyResponse updateProperty(UpdatePropertyRequest request) { + LOG.trace("Called updateProperty"); + final UpdatePropertyRequest interceptedRequest = + UpdatePropertyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdatePropertyConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementAdmin", + "UpdateProperty", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + UpdatePropertyConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdatePropertyDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public FleetAppsManagementAdminWaiters getWaiters() { + return waiters; + } + + @Override + public FleetAppsManagementAdminPaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAdminPaginators.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAdminPaginators.java new file mode 100644 index 00000000000..6efbb724eac --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAdminPaginators.java @@ -0,0 +1,740 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of FleetAppsManagementAdmin where multiple pages of data may be fetched. + * Two styles of iteration are supported: + * + *

    + *
  • Iterating over the Response objects returned by the list operation. These are referred to as ResponseIterators, and the methods are suffixed with ResponseIterator. For example: listUsersResponseIterator
  • + *
  • Iterating over the resources/records being listed. These are referred to as RecordIterators, and the methods are suffixed with RecordIterator. For example: listUsersRecordIterator
  • + *
+ * + * These iterables abstract away the need to write code to manually handle pagination via looping and using the page tokens. + * They will automatically fetch more data from the service when required. + * + * As an example, if we were using the ListUsers operation in IdentityService, then the {@link java.lang.Iterable} returned by calling a + * ResponseIterator method would iterate over the ListUsersResponse objects returned by each ListUsers call, whereas the {@link java.lang.Iterable} + * returned by calling a RecordIterator method would iterate over the User records and we don't have to deal with ListUsersResponse objects at all. + * In either case, pagination will be automatically handled so we can iterate until there are no more responses or no more resources/records available. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class FleetAppsManagementAdminPaginators { + private final FleetAppsManagementAdmin client; + + public FleetAppsManagementAdminPaginators(FleetAppsManagementAdmin client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listCompliancePolicies operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listCompliancePoliciesResponseIterator( + final ListCompliancePoliciesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListCompliancePoliciesRequest.Builder, ListCompliancePoliciesRequest, + ListCompliancePoliciesResponse>( + new java.util.function.Supplier() { + @Override + public ListCompliancePoliciesRequest.Builder get() { + return ListCompliancePoliciesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListCompliancePoliciesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListCompliancePoliciesRequest.Builder>, + ListCompliancePoliciesRequest>() { + @Override + public ListCompliancePoliciesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListCompliancePoliciesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListCompliancePoliciesRequest, ListCompliancePoliciesResponse>() { + @Override + public ListCompliancePoliciesResponse apply( + ListCompliancePoliciesRequest request) { + return client.listCompliancePolicies(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.CompliancePolicySummary} objects + * contained in responses from the listCompliancePolicies operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.CompliancePolicySummary} objects + * contained in responses received from the service. + */ + public Iterable + listCompliancePoliciesRecordIterator(final ListCompliancePoliciesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListCompliancePoliciesRequest.Builder, ListCompliancePoliciesRequest, + ListCompliancePoliciesResponse, + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicySummary>( + new java.util.function.Supplier() { + @Override + public ListCompliancePoliciesRequest.Builder get() { + return ListCompliancePoliciesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListCompliancePoliciesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListCompliancePoliciesRequest.Builder>, + ListCompliancePoliciesRequest>() { + @Override + public ListCompliancePoliciesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListCompliancePoliciesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListCompliancePoliciesRequest, ListCompliancePoliciesResponse>() { + @Override + public ListCompliancePoliciesResponse apply( + ListCompliancePoliciesRequest request) { + return client.listCompliancePolicies(request); + } + }, + new java.util.function.Function< + ListCompliancePoliciesResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicySummary>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicySummary> + apply(ListCompliancePoliciesResponse response) { + return response.getCompliancePolicyCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listCompliancePolicyRules operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listCompliancePolicyRulesResponseIterator( + final ListCompliancePolicyRulesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListCompliancePolicyRulesRequest.Builder, ListCompliancePolicyRulesRequest, + ListCompliancePolicyRulesResponse>( + new java.util.function.Supplier() { + @Override + public ListCompliancePolicyRulesRequest.Builder get() { + return ListCompliancePolicyRulesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListCompliancePolicyRulesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListCompliancePolicyRulesRequest.Builder>, + ListCompliancePolicyRulesRequest>() { + @Override + public ListCompliancePolicyRulesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListCompliancePolicyRulesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListCompliancePolicyRulesRequest, ListCompliancePolicyRulesResponse>() { + @Override + public ListCompliancePolicyRulesResponse apply( + ListCompliancePolicyRulesRequest request) { + return client.listCompliancePolicyRules(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRuleSummary} objects + * contained in responses from the listCompliancePolicyRules operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRuleSummary} objects + * contained in responses received from the service. + */ + public Iterable + listCompliancePolicyRulesRecordIterator( + final ListCompliancePolicyRulesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListCompliancePolicyRulesRequest.Builder, ListCompliancePolicyRulesRequest, + ListCompliancePolicyRulesResponse, + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRuleSummary>( + new java.util.function.Supplier() { + @Override + public ListCompliancePolicyRulesRequest.Builder get() { + return ListCompliancePolicyRulesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListCompliancePolicyRulesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListCompliancePolicyRulesRequest.Builder>, + ListCompliancePolicyRulesRequest>() { + @Override + public ListCompliancePolicyRulesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListCompliancePolicyRulesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListCompliancePolicyRulesRequest, ListCompliancePolicyRulesResponse>() { + @Override + public ListCompliancePolicyRulesResponse apply( + ListCompliancePolicyRulesRequest request) { + return client.listCompliancePolicyRules(request); + } + }, + new java.util.function.Function< + ListCompliancePolicyRulesResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicyRuleSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicyRuleSummary> + apply(ListCompliancePolicyRulesResponse response) { + return response.getCompliancePolicyRuleCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listOnboardingPolicies operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listOnboardingPoliciesResponseIterator( + final ListOnboardingPoliciesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListOnboardingPoliciesRequest.Builder, ListOnboardingPoliciesRequest, + ListOnboardingPoliciesResponse>( + new java.util.function.Supplier() { + @Override + public ListOnboardingPoliciesRequest.Builder get() { + return ListOnboardingPoliciesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListOnboardingPoliciesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOnboardingPoliciesRequest.Builder>, + ListOnboardingPoliciesRequest>() { + @Override + public ListOnboardingPoliciesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOnboardingPoliciesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListOnboardingPoliciesRequest, ListOnboardingPoliciesResponse>() { + @Override + public ListOnboardingPoliciesResponse apply( + ListOnboardingPoliciesRequest request) { + return client.listOnboardingPolicies(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.OnboardingPolicySummary} objects + * contained in responses from the listOnboardingPolicies operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.OnboardingPolicySummary} objects + * contained in responses received from the service. + */ + public Iterable + listOnboardingPoliciesRecordIterator(final ListOnboardingPoliciesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListOnboardingPoliciesRequest.Builder, ListOnboardingPoliciesRequest, + ListOnboardingPoliciesResponse, + com.oracle.bmc.fleetappsmanagement.model.OnboardingPolicySummary>( + new java.util.function.Supplier() { + @Override + public ListOnboardingPoliciesRequest.Builder get() { + return ListOnboardingPoliciesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListOnboardingPoliciesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOnboardingPoliciesRequest.Builder>, + ListOnboardingPoliciesRequest>() { + @Override + public ListOnboardingPoliciesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOnboardingPoliciesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListOnboardingPoliciesRequest, ListOnboardingPoliciesResponse>() { + @Override + public ListOnboardingPoliciesResponse apply( + ListOnboardingPoliciesRequest request) { + return client.listOnboardingPolicies(request); + } + }, + new java.util.function.Function< + ListOnboardingPoliciesResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model + .OnboardingPolicySummary>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model + .OnboardingPolicySummary> + apply(ListOnboardingPoliciesResponse response) { + return response.getOnboardingPolicyCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listOnboardings operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listOnboardingsResponseIterator( + final ListOnboardingsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListOnboardingsRequest.Builder, ListOnboardingsRequest, ListOnboardingsResponse>( + new java.util.function.Supplier() { + @Override + public ListOnboardingsRequest.Builder get() { + return ListOnboardingsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListOnboardingsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOnboardingsRequest.Builder>, + ListOnboardingsRequest>() { + @Override + public ListOnboardingsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOnboardingsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListOnboardingsResponse apply(ListOnboardingsRequest request) { + return client.listOnboardings(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.OnboardingSummary} objects + * contained in responses from the listOnboardings operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.OnboardingSummary} objects + * contained in responses received from the service. + */ + public Iterable + listOnboardingsRecordIterator(final ListOnboardingsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListOnboardingsRequest.Builder, ListOnboardingsRequest, ListOnboardingsResponse, + com.oracle.bmc.fleetappsmanagement.model.OnboardingSummary>( + new java.util.function.Supplier() { + @Override + public ListOnboardingsRequest.Builder get() { + return ListOnboardingsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListOnboardingsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOnboardingsRequest.Builder>, + ListOnboardingsRequest>() { + @Override + public ListOnboardingsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListOnboardingsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListOnboardingsResponse apply(ListOnboardingsRequest request) { + return client.listOnboardings(request); + } + }, + new java.util.function.Function< + ListOnboardingsResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model.OnboardingSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model.OnboardingSummary> + apply(ListOnboardingsResponse response) { + return response.getOnboardingCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listPlatformConfigurations operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listPlatformConfigurationsResponseIterator( + final ListPlatformConfigurationsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListPlatformConfigurationsRequest.Builder, ListPlatformConfigurationsRequest, + ListPlatformConfigurationsResponse>( + new java.util.function.Supplier() { + @Override + public ListPlatformConfigurationsRequest.Builder get() { + return ListPlatformConfigurationsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPlatformConfigurationsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPlatformConfigurationsRequest.Builder>, + ListPlatformConfigurationsRequest>() { + @Override + public ListPlatformConfigurationsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPlatformConfigurationsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListPlatformConfigurationsRequest, ListPlatformConfigurationsResponse>() { + @Override + public ListPlatformConfigurationsResponse apply( + ListPlatformConfigurationsRequest request) { + return client.listPlatformConfigurations(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.PlatformConfigurationSummary} objects + * contained in responses from the listPlatformConfigurations operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.PlatformConfigurationSummary} objects + * contained in responses received from the service. + */ + public Iterable + listPlatformConfigurationsRecordIterator( + final ListPlatformConfigurationsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListPlatformConfigurationsRequest.Builder, ListPlatformConfigurationsRequest, + ListPlatformConfigurationsResponse, + com.oracle.bmc.fleetappsmanagement.model.PlatformConfigurationSummary>( + new java.util.function.Supplier() { + @Override + public ListPlatformConfigurationsRequest.Builder get() { + return ListPlatformConfigurationsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPlatformConfigurationsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPlatformConfigurationsRequest.Builder>, + ListPlatformConfigurationsRequest>() { + @Override + public ListPlatformConfigurationsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPlatformConfigurationsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListPlatformConfigurationsRequest, ListPlatformConfigurationsResponse>() { + @Override + public ListPlatformConfigurationsResponse apply( + ListPlatformConfigurationsRequest request) { + return client.listPlatformConfigurations(request); + } + }, + new java.util.function.Function< + ListPlatformConfigurationsResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model + .PlatformConfigurationSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model + .PlatformConfigurationSummary> + apply(ListPlatformConfigurationsResponse response) { + return response.getPlatformConfigurationCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listProperties operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listPropertiesResponseIterator( + final ListPropertiesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListPropertiesRequest.Builder, ListPropertiesRequest, ListPropertiesResponse>( + new java.util.function.Supplier() { + @Override + public ListPropertiesRequest.Builder get() { + return ListPropertiesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPropertiesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPropertiesRequest.Builder>, + ListPropertiesRequest>() { + @Override + public ListPropertiesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPropertiesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListPropertiesResponse apply(ListPropertiesRequest request) { + return client.listProperties(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.PropertySummary} objects + * contained in responses from the listProperties operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.PropertySummary} objects + * contained in responses received from the service. + */ + public Iterable + listPropertiesRecordIterator(final ListPropertiesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListPropertiesRequest.Builder, ListPropertiesRequest, ListPropertiesResponse, + com.oracle.bmc.fleetappsmanagement.model.PropertySummary>( + new java.util.function.Supplier() { + @Override + public ListPropertiesRequest.Builder get() { + return ListPropertiesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPropertiesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPropertiesRequest.Builder>, + ListPropertiesRequest>() { + @Override + public ListPropertiesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPropertiesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListPropertiesResponse apply(ListPropertiesRequest request) { + return client.listProperties(request); + } + }, + new java.util.function.Function< + ListPropertiesResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model.PropertySummary>>() { + @Override + public java.util.List + apply(ListPropertiesResponse response) { + return response.getPropertyCollection().getItems(); + } + }); + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAdminWaiters.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAdminWaiters.java new file mode 100644 index 00000000000..ebf7ec63517 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAdminWaiters.java @@ -0,0 +1,566 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of FleetAppsManagementAdmin. + *

+ * The default configuration used is defined by {@link com.oracle.bmc.waiter.Waiters.Waiters#DEFAULT_POLLING_WAITER}. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class FleetAppsManagementAdminWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final FleetAppsManagementAdmin client; + + public FleetAppsManagementAdminWaiters( + java.util.concurrent.ExecutorService executorService, FleetAppsManagementAdmin client) { + this.executorService = executorService; + this.client = client; + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forCompliancePolicy( + GetCompliancePolicyRequest request, + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicy.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forCompliancePolicy( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forCompliancePolicy( + GetCompliancePolicyRequest request, + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicy.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forCompliancePolicy( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forCompliancePolicy( + GetCompliancePolicyRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicy.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forCompliancePolicy( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for CompliancePolicy. + private com.oracle.bmc.waiter.Waiter + forCompliancePolicy( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetCompliancePolicyRequest request, + final com.oracle.bmc.fleetappsmanagement.model.CompliancePolicy + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicy.LifecycleState> + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetCompliancePolicyRequest, GetCompliancePolicyResponse>() { + @Override + public GetCompliancePolicyResponse apply( + GetCompliancePolicyRequest request) { + return client.getCompliancePolicy(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetCompliancePolicyResponse response) { + return targetStatesSet.contains( + response.getCompliancePolicy().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicy + .LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetCompliancePolicyRuleRequest, GetCompliancePolicyRuleResponse> + forCompliancePolicyRule( + GetCompliancePolicyRuleRequest request, + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRule.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forCompliancePolicyRule( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetCompliancePolicyRuleRequest, GetCompliancePolicyRuleResponse> + forCompliancePolicyRule( + GetCompliancePolicyRuleRequest request, + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRule.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forCompliancePolicyRule( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetCompliancePolicyRuleRequest, GetCompliancePolicyRuleResponse> + forCompliancePolicyRule( + GetCompliancePolicyRuleRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRule.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forCompliancePolicyRule( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for CompliancePolicyRule. + private com.oracle.bmc.waiter.Waiter< + GetCompliancePolicyRuleRequest, GetCompliancePolicyRuleResponse> + forCompliancePolicyRule( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetCompliancePolicyRuleRequest request, + final com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRule + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRule + .LifecycleState> + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetCompliancePolicyRuleRequest, GetCompliancePolicyRuleResponse>() { + @Override + public GetCompliancePolicyRuleResponse apply( + GetCompliancePolicyRuleRequest request) { + return client.getCompliancePolicyRule(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetCompliancePolicyRuleResponse response) { + return targetStatesSet.contains( + response.getCompliancePolicyRule().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRule + .LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forOnboarding( + GetOnboardingRequest request, + com.oracle.bmc.fleetappsmanagement.model.Onboarding.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forOnboarding( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forOnboarding( + GetOnboardingRequest request, + com.oracle.bmc.fleetappsmanagement.model.Onboarding.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forOnboarding( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forOnboarding( + GetOnboardingRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.fleetappsmanagement.model.Onboarding.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forOnboarding( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for Onboarding. + private com.oracle.bmc.waiter.Waiter forOnboarding( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetOnboardingRequest request, + final com.oracle.bmc.fleetappsmanagement.model.Onboarding.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetOnboardingRequest, GetOnboardingResponse>() { + @Override + public GetOnboardingResponse apply(GetOnboardingRequest request) { + return client.getOnboarding(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetOnboardingResponse response) { + return targetStatesSet.contains( + response.getOnboarding().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.fleetappsmanagement.model.Onboarding.LifecycleState + .Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetPlatformConfigurationRequest, GetPlatformConfigurationResponse> + forPlatformConfiguration( + GetPlatformConfigurationRequest request, + com.oracle.bmc.fleetappsmanagement.model.PlatformConfiguration.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forPlatformConfiguration( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetPlatformConfigurationRequest, GetPlatformConfigurationResponse> + forPlatformConfiguration( + GetPlatformConfigurationRequest request, + com.oracle.bmc.fleetappsmanagement.model.PlatformConfiguration.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forPlatformConfiguration( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetPlatformConfigurationRequest, GetPlatformConfigurationResponse> + forPlatformConfiguration( + GetPlatformConfigurationRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.fleetappsmanagement.model.PlatformConfiguration.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forPlatformConfiguration( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for PlatformConfiguration. + private com.oracle.bmc.waiter.Waiter< + GetPlatformConfigurationRequest, GetPlatformConfigurationResponse> + forPlatformConfiguration( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetPlatformConfigurationRequest request, + final com.oracle.bmc.fleetappsmanagement.model.PlatformConfiguration + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.fleetappsmanagement.model.PlatformConfiguration + .LifecycleState> + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetPlatformConfigurationRequest, + GetPlatformConfigurationResponse>() { + @Override + public GetPlatformConfigurationResponse apply( + GetPlatformConfigurationRequest request) { + return client.getPlatformConfiguration(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetPlatformConfigurationResponse response) { + return targetStatesSet.contains( + response.getPlatformConfiguration().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.fleetappsmanagement.model.PlatformConfiguration + .LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forProperty( + GetPropertyRequest request, + com.oracle.bmc.fleetappsmanagement.model.Property.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forProperty( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forProperty( + GetPropertyRequest request, + com.oracle.bmc.fleetappsmanagement.model.Property.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forProperty( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forProperty( + GetPropertyRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.fleetappsmanagement.model.Property.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forProperty( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for Property. + private com.oracle.bmc.waiter.Waiter forProperty( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetPropertyRequest request, + final com.oracle.bmc.fleetappsmanagement.model.Property.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function() { + @Override + public GetPropertyResponse apply(GetPropertyRequest request) { + return client.getProperty(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetPropertyResponse response) { + return targetStatesSet.contains( + response.getProperty().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.fleetappsmanagement.model.Property.LifecycleState + .Deleted)), + request); + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAsync.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAsync.java new file mode 100644 index 00000000000..f7e588889ba --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAsync.java @@ -0,0 +1,626 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. + * + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public interface FleetAppsManagementAsync extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the serice. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Check if Fleet Application Management tags can be added to the resources. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future checkResourceTagging( + CheckResourceTaggingRequest request, + com.oracle.bmc.responses.AsyncHandler< + CheckResourceTaggingRequest, CheckResourceTaggingResponse> + handler); + + /** + * Confirm targets to be managed for a Fleet. + * Only targets that are confirmed will be managed by Fleet Application Management + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future confirmTargets( + ConfirmTargetsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Create a product, environment, group, or generic type of fleet in Fleet Application Management. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createFleet( + CreateFleetRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Add credentials to a fleet in Fleet Application Management. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createFleetCredential( + CreateFleetCredentialRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateFleetCredentialRequest, CreateFleetCredentialResponse> + handler); + + /** + * Add an existing global property to a fleet in Fleet Application Management. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createFleetProperty( + CreateFleetPropertyRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateFleetPropertyRequest, CreateFleetPropertyResponse> + handler); + + /** + * Add resource to a fleet in\u00A0Fleet Application Management. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createFleetResource( + CreateFleetResourceRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateFleetResourceRequest, CreateFleetResourceResponse> + handler); + + /** + * Delete a fleet in Fleet Application Management. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteFleet( + DeleteFleetRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Delete a credential associated with a fleet product or application in\u00A0Fleet Application Management. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteFleetCredential( + DeleteFleetCredentialRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteFleetCredentialRequest, DeleteFleetCredentialResponse> + handler); + + /** + * Delete a property associated with a fleet in Fleet Application Management. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteFleetProperty( + DeleteFleetPropertyRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteFleetPropertyRequest, DeleteFleetPropertyResponse> + handler); + + /** + * Removes a resource from the fleet in Fleet Application Management. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteFleetResource( + DeleteFleetResourceRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteFleetResourceRequest, DeleteFleetResourceResponse> + handler); + + /** + * Generate compliance reports for a Fleet. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future generateComplianceReport( + GenerateComplianceReportRequest request, + com.oracle.bmc.responses.AsyncHandler< + GenerateComplianceReportRequest, GenerateComplianceReportResponse> + handler); + + /** + * Retrieve compliance report for a fleet. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getComplianceReport( + GetComplianceReportRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetComplianceReportRequest, GetComplianceReportResponse> + handler); + + /** + * Get the details of a fleet in Fleet Application Management. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getFleet( + GetFleetRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Gets a FleetCredential by identifier. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getFleetCredential( + GetFleetCredentialRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetFleetCredentialRequest, GetFleetCredentialResponse> + handler); + + /** + * Gets a Fleet Property by identifier. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getFleetProperty( + GetFleetPropertyRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Gets a Fleet Resource by identifier. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getFleetResource( + GetFleetResourceRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Gets details of the work request with the given ID. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getWorkRequest( + GetWorkRequestRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Return a list of AnnouncementSummary items. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listAnnouncements( + ListAnnouncementsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListAnnouncementsRequest, ListAnnouncementsResponse> + handler); + + /** + * List credentials in Fleet Application Management. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listFleetCredentials( + ListFleetCredentialsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListFleetCredentialsRequest, ListFleetCredentialsResponse> + handler); + + /** + * Returns a list of products associated with the confirmed targets. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listFleetProducts( + ListFleetProductsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListFleetProductsRequest, ListFleetProductsResponse> + handler); + + /** + * List fleet properties in Fleet Application Management. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listFleetProperties( + ListFleetPropertiesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListFleetPropertiesRequest, ListFleetPropertiesResponse> + handler); + + /** + * List resources for a fleet in Fleet Application Management. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listFleetResources( + ListFleetResourcesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListFleetResourcesRequest, ListFleetResourcesResponse> + handler); + + /** + * Returns the list of all confirmed targets within a fleet. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listFleetTargets( + ListFleetTargetsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Returns a list of Fleets in the specified Tenancy. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listFleets( + ListFleetsRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Returns a list of InventoryResources. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listInventoryResources( + ListInventoryResourcesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListInventoryResourcesRequest, ListInventoryResourcesResponse> + handler); + + /** + * Return all targets belonging to the resources within a fleet. + * It will include both confirmed and unconfirmed targets. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listTargets( + ListTargetsRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Returns a (paginated) list of errors for the work request with the given ID. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listWorkRequestErrors( + ListWorkRequestErrorsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + handler); + + /** + * Returns a (paginated) list of logs for the work request with the given ID. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listWorkRequestLogs( + ListWorkRequestLogsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + handler); + + /** + * Lists the work requests in a compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listWorkRequests( + ListWorkRequestsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Request validation for resources within a fleet. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future requestResourceValidation( + RequestResourceValidationRequest request, + com.oracle.bmc.responses.AsyncHandler< + RequestResourceValidationRequest, RequestResourceValidationResponse> + handler); + + /** + * Confirm targets to be managed for a Fleet. + * Only targets that are confirmed will be managed by Fleet Application Management + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future requestTargetDiscovery( + RequestTargetDiscoveryRequest request, + com.oracle.bmc.responses.AsyncHandler< + RequestTargetDiscoveryRequest, RequestTargetDiscoveryResponse> + handler); + + /** + * Update fleet information in Fleet Application Management. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateFleet( + UpdateFleetRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Edit credentials associated with a product or application in\u00A0Fleet Application Management. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateFleetCredential( + UpdateFleetCredentialRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateFleetCredentialRequest, UpdateFleetCredentialResponse> + handler); + + /** + * Edit a property associated with a fleet in Fleet Application Management. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateFleetProperty( + UpdateFleetPropertyRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateFleetPropertyRequest, UpdateFleetPropertyResponse> + handler); + + /** + * Updates the FleetResource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateFleetResource( + UpdateFleetResourceRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateFleetResourceRequest, UpdateFleetResourceResponse> + handler); +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAsyncClient.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAsyncClient.java new file mode 100644 index 00000000000..796004795f7 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementAsyncClient.java @@ -0,0 +1,2124 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.internal.http.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Async client implementation for FleetAppsManagement service.
+ * There are two ways to use async client: + * 1. Use AsyncHandler: using AsyncHandler, if the response to the call is an {@link java.io.InputStream}, like + * getObject Api in object storage service, developers need to process the stream in AsyncHandler, and not anywhere else, + * because the stream will be closed right after the AsyncHandler is invoked.
+ * 2. Use Java Future: using Java Future, developers need to close the stream after they are done with the Java Future.
+ * Accessing the result should be done in a mutually exclusive manner, either through the Future or the AsyncHandler, + * but not both. If the Future is used, the caller should pass in null as the AsyncHandler. If the AsyncHandler + * is used, it is still safe to use the Future to determine whether or not the request was completed via + * Future.isDone/isCancelled.
+ * Please refer to https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class FleetAppsManagementAsyncClient implements FleetAppsManagementAsync { + /** + * Service instance for FleetAppsManagement. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("FLEETAPPSMANAGEMENT") + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://fams.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(FleetAppsManagementAsyncClient.class); + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public FleetAppsManagementAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public FleetAppsManagementAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public FleetAppsManagementAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public FleetAppsManagementAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public FleetAppsManagementAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public FleetAppsManagementAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public FleetAppsManagementAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + public FleetAppsManagementAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.clientConfigurationToUse = configuration; + + this.refreshClient(); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder< + Builder, FleetAppsManagementAsyncClient> { + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public FleetAppsManagementAsyncClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new FleetAppsManagementAsyncClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint); + } + } + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public java.util.concurrent.Future checkResourceTagging( + CheckResourceTaggingRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CheckResourceTaggingRequest, CheckResourceTaggingResponse> + handler) { + LOG.trace("Called async checkResourceTagging"); + final CheckResourceTaggingRequest interceptedRequest = + CheckResourceTaggingConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CheckResourceTaggingConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "CheckResourceTagging", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + CheckResourceTaggingConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CheckResourceTaggingRequest, CheckResourceTaggingResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CheckResourceTaggingRequest, CheckResourceTaggingResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCheckResourceTaggingDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CheckResourceTaggingRequest, CheckResourceTaggingResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future confirmTargets( + ConfirmTargetsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ConfirmTargetsRequest, ConfirmTargetsResponse> + handler) { + LOG.trace("Called async confirmTargets"); + final ConfirmTargetsRequest interceptedRequest = + ConfirmTargetsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConfirmTargetsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", "ConfirmTargets", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + ConfirmTargetsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ConfirmTargetsRequest, ConfirmTargetsResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getConfirmTargetsDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ConfirmTargetsRequest, ConfirmTargetsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createFleet( + CreateFleetRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async createFleet"); + final CreateFleetRequest interceptedRequest = + CreateFleetConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateFleetConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", "CreateFleet", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + CreateFleetConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateFleetRequest, CreateFleetResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateFleetDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateFleetRequest, CreateFleetResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createFleetCredential( + CreateFleetCredentialRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateFleetCredentialRequest, CreateFleetCredentialResponse> + handler) { + LOG.trace("Called async createFleetCredential"); + final CreateFleetCredentialRequest interceptedRequest = + CreateFleetCredentialConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateFleetCredentialConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "CreateFleetCredential", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + CreateFleetCredentialConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateFleetCredentialRequest, CreateFleetCredentialResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateFleetCredentialRequest, CreateFleetCredentialResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateFleetCredentialDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateFleetCredentialRequest, CreateFleetCredentialResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createFleetProperty( + CreateFleetPropertyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateFleetPropertyRequest, CreateFleetPropertyResponse> + handler) { + LOG.trace("Called async createFleetProperty"); + final CreateFleetPropertyRequest interceptedRequest = + CreateFleetPropertyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateFleetPropertyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "CreateFleetProperty", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + CreateFleetPropertyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateFleetPropertyRequest, CreateFleetPropertyResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateFleetPropertyRequest, CreateFleetPropertyResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateFleetPropertyDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateFleetPropertyRequest, CreateFleetPropertyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createFleetResource( + CreateFleetResourceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateFleetResourceRequest, CreateFleetResourceResponse> + handler) { + LOG.trace("Called async createFleetResource"); + final CreateFleetResourceRequest interceptedRequest = + CreateFleetResourceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateFleetResourceConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "CreateFleetResource", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + CreateFleetResourceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateFleetResourceRequest, CreateFleetResourceResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateFleetResourceRequest, CreateFleetResourceResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateFleetResourceDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateFleetResourceRequest, CreateFleetResourceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteFleet( + DeleteFleetRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async deleteFleet"); + final DeleteFleetRequest interceptedRequest = + DeleteFleetConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteFleetConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", "DeleteFleet", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + DeleteFleetConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteFleetRequest, DeleteFleetResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteFleetRequest, DeleteFleetResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteFleetCredential( + DeleteFleetCredentialRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteFleetCredentialRequest, DeleteFleetCredentialResponse> + handler) { + LOG.trace("Called async deleteFleetCredential"); + final DeleteFleetCredentialRequest interceptedRequest = + DeleteFleetCredentialConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteFleetCredentialConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "DeleteFleetCredential", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + DeleteFleetCredentialConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteFleetCredentialRequest, DeleteFleetCredentialResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteFleetCredentialRequest, DeleteFleetCredentialResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteFleetCredentialRequest, DeleteFleetCredentialResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteFleetProperty( + DeleteFleetPropertyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteFleetPropertyRequest, DeleteFleetPropertyResponse> + handler) { + LOG.trace("Called async deleteFleetProperty"); + final DeleteFleetPropertyRequest interceptedRequest = + DeleteFleetPropertyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteFleetPropertyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "DeleteFleetProperty", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + DeleteFleetPropertyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteFleetPropertyRequest, DeleteFleetPropertyResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteFleetPropertyRequest, DeleteFleetPropertyResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteFleetPropertyRequest, DeleteFleetPropertyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteFleetResource( + DeleteFleetResourceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteFleetResourceRequest, DeleteFleetResourceResponse> + handler) { + LOG.trace("Called async deleteFleetResource"); + final DeleteFleetResourceRequest interceptedRequest = + DeleteFleetResourceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteFleetResourceConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "DeleteFleetResource", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + DeleteFleetResourceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteFleetResourceRequest, DeleteFleetResourceResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteFleetResourceRequest, DeleteFleetResourceResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteFleetResourceRequest, DeleteFleetResourceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future generateComplianceReport( + GenerateComplianceReportRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GenerateComplianceReportRequest, GenerateComplianceReportResponse> + handler) { + LOG.trace("Called async generateComplianceReport"); + final GenerateComplianceReportRequest interceptedRequest = + GenerateComplianceReportConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GenerateComplianceReportConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "GenerateComplianceReport", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, GenerateComplianceReportResponse> + transformer = + GenerateComplianceReportConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GenerateComplianceReportRequest, GenerateComplianceReportResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GenerateComplianceReportRequest, GenerateComplianceReportResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getGenerateComplianceReportDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GenerateComplianceReportRequest, GenerateComplianceReportResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getComplianceReport( + GetComplianceReportRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetComplianceReportRequest, GetComplianceReportResponse> + handler) { + LOG.trace("Called async getComplianceReport"); + final GetComplianceReportRequest interceptedRequest = + GetComplianceReportConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetComplianceReportConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "GetComplianceReport", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + GetComplianceReportConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetComplianceReportRequest, GetComplianceReportResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetComplianceReportRequest, GetComplianceReportResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetComplianceReportRequest, GetComplianceReportResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getFleet( + GetFleetRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getFleet"); + final GetFleetRequest interceptedRequest = GetFleetConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetFleetConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", "GetFleet", ib.getRequestUri().toString(), ""); + final java.util.function.Function transformer = + GetFleetConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetFleetRequest, GetFleetResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getFleetCredential( + GetFleetCredentialRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetFleetCredentialRequest, GetFleetCredentialResponse> + handler) { + LOG.trace("Called async getFleetCredential"); + final GetFleetCredentialRequest interceptedRequest = + GetFleetCredentialConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetFleetCredentialConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "GetFleetCredential", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + GetFleetCredentialConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetFleetCredentialRequest, GetFleetCredentialResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetFleetCredentialRequest, GetFleetCredentialResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getFleetProperty( + GetFleetPropertyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetFleetPropertyRequest, GetFleetPropertyResponse> + handler) { + LOG.trace("Called async getFleetProperty"); + final GetFleetPropertyRequest interceptedRequest = + GetFleetPropertyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetFleetPropertyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "GetFleetProperty", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + GetFleetPropertyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetFleetPropertyRequest, GetFleetPropertyResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetFleetPropertyRequest, GetFleetPropertyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getFleetResource( + GetFleetResourceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetFleetResourceRequest, GetFleetResourceResponse> + handler) { + LOG.trace("Called async getFleetResource"); + final GetFleetResourceRequest interceptedRequest = + GetFleetResourceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetFleetResourceConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "GetFleetResource", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + GetFleetResourceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetFleetResourceRequest, GetFleetResourceResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetFleetResourceRequest, GetFleetResourceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getWorkRequest( + GetWorkRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetWorkRequestRequest, GetWorkRequestResponse> + handler) { + LOG.trace("Called async getWorkRequest"); + final GetWorkRequestRequest interceptedRequest = + GetWorkRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetWorkRequestConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", "GetWorkRequest", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetWorkRequestRequest, GetWorkRequestResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetWorkRequestRequest, GetWorkRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listAnnouncements( + ListAnnouncementsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListAnnouncementsRequest, ListAnnouncementsResponse> + handler) { + LOG.trace("Called async listAnnouncements"); + final ListAnnouncementsRequest interceptedRequest = + ListAnnouncementsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAnnouncementsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "ListAnnouncements", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListAnnouncementsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListAnnouncementsRequest, ListAnnouncementsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListAnnouncementsRequest, ListAnnouncementsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listFleetCredentials( + ListFleetCredentialsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListFleetCredentialsRequest, ListFleetCredentialsResponse> + handler) { + LOG.trace("Called async listFleetCredentials"); + final ListFleetCredentialsRequest interceptedRequest = + ListFleetCredentialsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListFleetCredentialsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "ListFleetCredentials", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListFleetCredentialsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListFleetCredentialsRequest, ListFleetCredentialsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListFleetCredentialsRequest, ListFleetCredentialsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListFleetCredentialsRequest, ListFleetCredentialsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listFleetProducts( + ListFleetProductsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListFleetProductsRequest, ListFleetProductsResponse> + handler) { + LOG.trace("Called async listFleetProducts"); + final ListFleetProductsRequest interceptedRequest = + ListFleetProductsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListFleetProductsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "ListFleetProducts", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListFleetProductsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListFleetProductsRequest, ListFleetProductsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListFleetProductsRequest, ListFleetProductsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listFleetProperties( + ListFleetPropertiesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListFleetPropertiesRequest, ListFleetPropertiesResponse> + handler) { + LOG.trace("Called async listFleetProperties"); + final ListFleetPropertiesRequest interceptedRequest = + ListFleetPropertiesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListFleetPropertiesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "ListFleetProperties", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListFleetPropertiesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListFleetPropertiesRequest, ListFleetPropertiesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListFleetPropertiesRequest, ListFleetPropertiesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListFleetPropertiesRequest, ListFleetPropertiesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listFleetResources( + ListFleetResourcesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListFleetResourcesRequest, ListFleetResourcesResponse> + handler) { + LOG.trace("Called async listFleetResources"); + final ListFleetResourcesRequest interceptedRequest = + ListFleetResourcesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListFleetResourcesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "ListFleetResources", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListFleetResourcesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListFleetResourcesRequest, ListFleetResourcesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListFleetResourcesRequest, ListFleetResourcesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listFleetTargets( + ListFleetTargetsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListFleetTargetsRequest, ListFleetTargetsResponse> + handler) { + LOG.trace("Called async listFleetTargets"); + final ListFleetTargetsRequest interceptedRequest = + ListFleetTargetsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListFleetTargetsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "ListFleetTargets", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListFleetTargetsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListFleetTargetsRequest, ListFleetTargetsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListFleetTargetsRequest, ListFleetTargetsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listFleets( + ListFleetsRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listFleets"); + final ListFleetsRequest interceptedRequest = ListFleetsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListFleetsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", "ListFleets", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + ListFleetsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListFleetsRequest, ListFleetsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListFleetsRequest, ListFleetsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listInventoryResources( + ListInventoryResourcesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListInventoryResourcesRequest, ListInventoryResourcesResponse> + handler) { + LOG.trace("Called async listInventoryResources"); + final ListInventoryResourcesRequest interceptedRequest = + ListInventoryResourcesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListInventoryResourcesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "ListInventoryResources", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListInventoryResourcesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListInventoryResourcesRequest, ListInventoryResourcesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListInventoryResourcesRequest, ListInventoryResourcesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListInventoryResourcesRequest, ListInventoryResourcesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listTargets( + ListTargetsRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listTargets"); + final ListTargetsRequest interceptedRequest = + ListTargetsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListTargetsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", "ListTargets", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + ListTargetsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListTargetsRequest, ListTargetsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListTargetsRequest, ListTargetsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listWorkRequestErrors( + ListWorkRequestErrorsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + handler) { + LOG.trace("Called async listWorkRequestErrors"); + final ListWorkRequestErrorsRequest interceptedRequest = + ListWorkRequestErrorsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestErrorsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "ListWorkRequestErrors", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListWorkRequestErrorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listWorkRequestLogs( + ListWorkRequestLogsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + handler) { + LOG.trace("Called async listWorkRequestLogs"); + final ListWorkRequestLogsRequest interceptedRequest = + ListWorkRequestLogsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestLogsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "ListWorkRequestLogs", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListWorkRequestLogsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listWorkRequests( + ListWorkRequestsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestsRequest, ListWorkRequestsResponse> + handler) { + LOG.trace("Called async listWorkRequests"); + final ListWorkRequestsRequest interceptedRequest = + ListWorkRequestsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "ListWorkRequests", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListWorkRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestsRequest, ListWorkRequestsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListWorkRequestsRequest, ListWorkRequestsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future requestResourceValidation( + RequestResourceValidationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RequestResourceValidationRequest, RequestResourceValidationResponse> + handler) { + LOG.trace("Called async requestResourceValidation"); + final RequestResourceValidationRequest interceptedRequest = + RequestResourceValidationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RequestResourceValidationConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "RequestResourceValidation", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, RequestResourceValidationResponse> + transformer = + RequestResourceValidationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + RequestResourceValidationRequest, RequestResourceValidationResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RequestResourceValidationRequest, + RequestResourceValidationResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRequestResourceValidationDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RequestResourceValidationRequest, RequestResourceValidationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future requestTargetDiscovery( + RequestTargetDiscoveryRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RequestTargetDiscoveryRequest, RequestTargetDiscoveryResponse> + handler) { + LOG.trace("Called async requestTargetDiscovery"); + final RequestTargetDiscoveryRequest interceptedRequest = + RequestTargetDiscoveryConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RequestTargetDiscoveryConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "RequestTargetDiscovery", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + RequestTargetDiscoveryConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + RequestTargetDiscoveryRequest, RequestTargetDiscoveryResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RequestTargetDiscoveryRequest, RequestTargetDiscoveryResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRequestTargetDiscoveryDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RequestTargetDiscoveryRequest, RequestTargetDiscoveryResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateFleet( + UpdateFleetRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async updateFleet"); + final UpdateFleetRequest interceptedRequest = + UpdateFleetConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateFleetConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", "UpdateFleet", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + UpdateFleetConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateFleetRequest, UpdateFleetResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateFleetDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateFleetRequest, UpdateFleetResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateFleetCredential( + UpdateFleetCredentialRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateFleetCredentialRequest, UpdateFleetCredentialResponse> + handler) { + LOG.trace("Called async updateFleetCredential"); + final UpdateFleetCredentialRequest interceptedRequest = + UpdateFleetCredentialConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateFleetCredentialConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "UpdateFleetCredential", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + UpdateFleetCredentialConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateFleetCredentialRequest, UpdateFleetCredentialResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateFleetCredentialRequest, UpdateFleetCredentialResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateFleetCredentialDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateFleetCredentialRequest, UpdateFleetCredentialResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateFleetProperty( + UpdateFleetPropertyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateFleetPropertyRequest, UpdateFleetPropertyResponse> + handler) { + LOG.trace("Called async updateFleetProperty"); + final UpdateFleetPropertyRequest interceptedRequest = + UpdateFleetPropertyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateFleetPropertyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "UpdateFleetProperty", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + UpdateFleetPropertyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateFleetPropertyRequest, UpdateFleetPropertyResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateFleetPropertyRequest, UpdateFleetPropertyResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateFleetPropertyDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateFleetPropertyRequest, UpdateFleetPropertyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateFleetResource( + UpdateFleetResourceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateFleetResourceRequest, UpdateFleetResourceResponse> + handler) { + LOG.trace("Called async updateFleetResource"); + final UpdateFleetResourceRequest interceptedRequest = + UpdateFleetResourceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateFleetResourceConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "UpdateFleetResource", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + UpdateFleetResourceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateFleetResourceRequest, UpdateFleetResourceResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateFleetResourceRequest, UpdateFleetResourceResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateFleetResourceDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateFleetResourceRequest, UpdateFleetResourceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementClient.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementClient.java new file mode 100644 index 00000000000..6ecbbd5cc8f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementClient.java @@ -0,0 +1,1887 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.internal.http.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration; +import com.oracle.bmc.util.CircuitBreakerUtils; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class FleetAppsManagementClient implements FleetAppsManagement { + /** + * Service instance for FleetAppsManagement. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("FLEETAPPSMANAGEMENT") + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://fams.{region}.oci.{secondLevelDomain}") + .build(); + // attempt twice if it's instance principals, immediately failures will try to refresh the token + private static final int MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS = 2; + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(FleetAppsManagementClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final FleetAppsManagementWaiters waiters; + + private final FleetAppsManagementPaginators paginators; + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + circuitBreakerConfiguration; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public FleetAppsManagementClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public FleetAppsManagementClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public FleetAppsManagementClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public FleetAppsManagementClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public FleetAppsManagementClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public FleetAppsManagementClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public FleetAppsManagementClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + */ + public FleetAppsManagementClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * Use the {@link Builder} to get access to all these parameters. + * + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + protected FleetAppsManagementClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + this.restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + + this.clientConfigurationToUse = + (configuration != null) + ? configuration + : com.oracle.bmc.ClientConfiguration.builder().build(); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.retryConfiguration = clientConfigurationToUse.getRetryConfiguration(); + final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + userCircuitBreakerConfiguration = + CircuitBreakerUtils.getUserDefinedCircuitBreakerConfiguration( + configuration); + if (userCircuitBreakerConfiguration == null) { + this.circuitBreakerConfiguration = + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION; + } else { + this.circuitBreakerConfiguration = userCircuitBreakerConfiguration; + } + + this.refreshClient(); + + if (executorService == null) { + // up to 50 (core) threads, time out after 60s idle, all daemon + java.util.concurrent.ThreadPoolExecutor threadPoolExecutor = + new java.util.concurrent.ThreadPoolExecutor( + 50, + 50, + 60L, + java.util.concurrent.TimeUnit.SECONDS, + new java.util.concurrent.LinkedBlockingQueue(), + com.oracle.bmc.internal.ClientThreadFactory.builder() + .isDaemon(true) + .nameFormat("FleetAppsManagement-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new FleetAppsManagementWaiters(executorService, this); + + this.paginators = new FleetAppsManagementPaginators(this); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder< + Builder, FleetAppsManagementClient> { + private java.util.concurrent.ExecutorService executorService; + + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Set the ExecutorService for the client to be created. + * @param executorService executorService + * @return this builder + */ + public Builder executorService(java.util.concurrent.ExecutorService executorService) { + this.executorService = executorService; + return this; + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public FleetAppsManagementClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new FleetAppsManagementClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + restClientFactoryBuilder); + } + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, this.authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient, + null, + this.circuitBreakerConfiguration); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public CheckResourceTaggingResponse checkResourceTagging(CheckResourceTaggingRequest request) { + LOG.trace("Called checkResourceTagging"); + final CheckResourceTaggingRequest interceptedRequest = + CheckResourceTaggingConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CheckResourceTaggingConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "CheckResourceTagging", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + CheckResourceTaggingConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCheckResourceTaggingDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ConfirmTargetsResponse confirmTargets(ConfirmTargetsRequest request) { + LOG.trace("Called confirmTargets"); + final ConfirmTargetsRequest interceptedRequest = + ConfirmTargetsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ConfirmTargetsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", "ConfirmTargets", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + ConfirmTargetsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getConfirmTargetsDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateFleetResponse createFleet(CreateFleetRequest request) { + LOG.trace("Called createFleet"); + final CreateFleetRequest interceptedRequest = + CreateFleetConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateFleetConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", "CreateFleet", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + CreateFleetConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateFleetDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateFleetCredentialResponse createFleetCredential( + CreateFleetCredentialRequest request) { + LOG.trace("Called createFleetCredential"); + final CreateFleetCredentialRequest interceptedRequest = + CreateFleetCredentialConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateFleetCredentialConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "CreateFleetCredential", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + CreateFleetCredentialConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateFleetCredentialDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateFleetPropertyResponse createFleetProperty(CreateFleetPropertyRequest request) { + LOG.trace("Called createFleetProperty"); + final CreateFleetPropertyRequest interceptedRequest = + CreateFleetPropertyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateFleetPropertyConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "CreateFleetProperty", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + CreateFleetPropertyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateFleetPropertyDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateFleetResourceResponse createFleetResource(CreateFleetResourceRequest request) { + LOG.trace("Called createFleetResource"); + final CreateFleetResourceRequest interceptedRequest = + CreateFleetResourceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateFleetResourceConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "CreateFleetResource", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + CreateFleetResourceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateFleetResourceDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteFleetResponse deleteFleet(DeleteFleetRequest request) { + LOG.trace("Called deleteFleet"); + final DeleteFleetRequest interceptedRequest = + DeleteFleetConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteFleetConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", "DeleteFleet", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + DeleteFleetConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteFleetCredentialResponse deleteFleetCredential( + DeleteFleetCredentialRequest request) { + LOG.trace("Called deleteFleetCredential"); + final DeleteFleetCredentialRequest interceptedRequest = + DeleteFleetCredentialConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteFleetCredentialConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "DeleteFleetCredential", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + DeleteFleetCredentialConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteFleetPropertyResponse deleteFleetProperty(DeleteFleetPropertyRequest request) { + LOG.trace("Called deleteFleetProperty"); + final DeleteFleetPropertyRequest interceptedRequest = + DeleteFleetPropertyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteFleetPropertyConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "DeleteFleetProperty", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + DeleteFleetPropertyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteFleetResourceResponse deleteFleetResource(DeleteFleetResourceRequest request) { + LOG.trace("Called deleteFleetResource"); + final DeleteFleetResourceRequest interceptedRequest = + DeleteFleetResourceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteFleetResourceConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "DeleteFleetResource", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + DeleteFleetResourceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GenerateComplianceReportResponse generateComplianceReport( + GenerateComplianceReportRequest request) { + LOG.trace("Called generateComplianceReport"); + final GenerateComplianceReportRequest interceptedRequest = + GenerateComplianceReportConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GenerateComplianceReportConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "GenerateComplianceReport", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + GenerateComplianceReportConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getGenerateComplianceReportDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetComplianceReportResponse getComplianceReport(GetComplianceReportRequest request) { + LOG.trace("Called getComplianceReport"); + final GetComplianceReportRequest interceptedRequest = + GetComplianceReportConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetComplianceReportConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "GetComplianceReport", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + GetComplianceReportConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetFleetResponse getFleet(GetFleetRequest request) { + LOG.trace("Called getFleet"); + final GetFleetRequest interceptedRequest = GetFleetConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetFleetConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", "GetFleet", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + GetFleetConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetFleetCredentialResponse getFleetCredential(GetFleetCredentialRequest request) { + LOG.trace("Called getFleetCredential"); + final GetFleetCredentialRequest interceptedRequest = + GetFleetCredentialConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetFleetCredentialConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "GetFleetCredential", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + GetFleetCredentialConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetFleetPropertyResponse getFleetProperty(GetFleetPropertyRequest request) { + LOG.trace("Called getFleetProperty"); + final GetFleetPropertyRequest interceptedRequest = + GetFleetPropertyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetFleetPropertyConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "GetFleetProperty", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + GetFleetPropertyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetFleetResourceResponse getFleetResource(GetFleetResourceRequest request) { + LOG.trace("Called getFleetResource"); + final GetFleetResourceRequest interceptedRequest = + GetFleetResourceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetFleetResourceConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "GetFleetResource", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + GetFleetResourceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) { + LOG.trace("Called getWorkRequest"); + final GetWorkRequestRequest interceptedRequest = + GetWorkRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetWorkRequestConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", "GetWorkRequest", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListAnnouncementsResponse listAnnouncements(ListAnnouncementsRequest request) { + LOG.trace("Called listAnnouncements"); + final ListAnnouncementsRequest interceptedRequest = + ListAnnouncementsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAnnouncementsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "ListAnnouncements", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListAnnouncementsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListFleetCredentialsResponse listFleetCredentials(ListFleetCredentialsRequest request) { + LOG.trace("Called listFleetCredentials"); + final ListFleetCredentialsRequest interceptedRequest = + ListFleetCredentialsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListFleetCredentialsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "ListFleetCredentials", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListFleetCredentialsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListFleetProductsResponse listFleetProducts(ListFleetProductsRequest request) { + LOG.trace("Called listFleetProducts"); + final ListFleetProductsRequest interceptedRequest = + ListFleetProductsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListFleetProductsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "ListFleetProducts", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListFleetProductsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListFleetPropertiesResponse listFleetProperties(ListFleetPropertiesRequest request) { + LOG.trace("Called listFleetProperties"); + final ListFleetPropertiesRequest interceptedRequest = + ListFleetPropertiesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListFleetPropertiesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "ListFleetProperties", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListFleetPropertiesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListFleetResourcesResponse listFleetResources(ListFleetResourcesRequest request) { + LOG.trace("Called listFleetResources"); + final ListFleetResourcesRequest interceptedRequest = + ListFleetResourcesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListFleetResourcesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "ListFleetResources", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListFleetResourcesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListFleetTargetsResponse listFleetTargets(ListFleetTargetsRequest request) { + LOG.trace("Called listFleetTargets"); + final ListFleetTargetsRequest interceptedRequest = + ListFleetTargetsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListFleetTargetsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "ListFleetTargets", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListFleetTargetsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListFleetsResponse listFleets(ListFleetsRequest request) { + LOG.trace("Called listFleets"); + final ListFleetsRequest interceptedRequest = ListFleetsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListFleetsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", "ListFleets", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + ListFleetsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListInventoryResourcesResponse listInventoryResources( + ListInventoryResourcesRequest request) { + LOG.trace("Called listInventoryResources"); + final ListInventoryResourcesRequest interceptedRequest = + ListInventoryResourcesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListInventoryResourcesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "ListInventoryResources", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListInventoryResourcesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListTargetsResponse listTargets(ListTargetsRequest request) { + LOG.trace("Called listTargets"); + final ListTargetsRequest interceptedRequest = + ListTargetsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListTargetsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", "ListTargets", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + ListTargetsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListWorkRequestErrorsResponse listWorkRequestErrors( + ListWorkRequestErrorsRequest request) { + LOG.trace("Called listWorkRequestErrors"); + final ListWorkRequestErrorsRequest interceptedRequest = + ListWorkRequestErrorsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestErrorsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "ListWorkRequestErrors", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListWorkRequestErrorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsRequest request) { + LOG.trace("Called listWorkRequestLogs"); + final ListWorkRequestLogsRequest interceptedRequest = + ListWorkRequestLogsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestLogsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "ListWorkRequestLogs", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListWorkRequestLogsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request) { + LOG.trace("Called listWorkRequests"); + final ListWorkRequestsRequest interceptedRequest = + ListWorkRequestsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "ListWorkRequests", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListWorkRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public RequestResourceValidationResponse requestResourceValidation( + RequestResourceValidationRequest request) { + LOG.trace("Called requestResourceValidation"); + final RequestResourceValidationRequest interceptedRequest = + RequestResourceValidationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RequestResourceValidationConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "RequestResourceValidation", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + RequestResourceValidationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getRequestResourceValidationDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public RequestTargetDiscoveryResponse requestTargetDiscovery( + RequestTargetDiscoveryRequest request) { + LOG.trace("Called requestTargetDiscovery"); + final RequestTargetDiscoveryRequest interceptedRequest = + RequestTargetDiscoveryConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RequestTargetDiscoveryConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "RequestTargetDiscovery", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + RequestTargetDiscoveryConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getRequestTargetDiscoveryDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateFleetResponse updateFleet(UpdateFleetRequest request) { + LOG.trace("Called updateFleet"); + final UpdateFleetRequest interceptedRequest = + UpdateFleetConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateFleetConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", "UpdateFleet", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + UpdateFleetConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateFleetDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateFleetCredentialResponse updateFleetCredential( + UpdateFleetCredentialRequest request) { + LOG.trace("Called updateFleetCredential"); + final UpdateFleetCredentialRequest interceptedRequest = + UpdateFleetCredentialConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateFleetCredentialConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "UpdateFleetCredential", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + UpdateFleetCredentialConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateFleetCredentialDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateFleetPropertyResponse updateFleetProperty(UpdateFleetPropertyRequest request) { + LOG.trace("Called updateFleetProperty"); + final UpdateFleetPropertyRequest interceptedRequest = + UpdateFleetPropertyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateFleetPropertyConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "UpdateFleetProperty", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + UpdateFleetPropertyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateFleetPropertyDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateFleetResourceResponse updateFleetResource(UpdateFleetResourceRequest request) { + LOG.trace("Called updateFleetResource"); + final UpdateFleetResourceRequest interceptedRequest = + UpdateFleetResourceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateFleetResourceConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagement", + "UpdateFleetResource", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + UpdateFleetResourceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateFleetResourceDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public FleetAppsManagementWaiters getWaiters() { + return waiters; + } + + @Override + public FleetAppsManagementPaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementMaintenanceWindow.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementMaintenanceWindow.java new file mode 100644 index 00000000000..8f2bc6a389f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementMaintenanceWindow.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. + * + * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public interface FleetAppsManagementMaintenanceWindow extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the service. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this Region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Create a maintenance window in Fleet Application Management. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateMaintenanceWindow API. + */ + CreateMaintenanceWindowResponse createMaintenanceWindow(CreateMaintenanceWindowRequest request); + + /** + * Delete a maintenance window in Fleet Application Management. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteMaintenanceWindow API. + */ + DeleteMaintenanceWindowResponse deleteMaintenanceWindow(DeleteMaintenanceWindowRequest request); + + /** + * Get the details for a maintenance window in Fleet Application Management. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetMaintenanceWindow API. + */ + GetMaintenanceWindowResponse getMaintenanceWindow(GetMaintenanceWindowRequest request); + + /** + * List maintenance windows for a specified tenancy in\u00A0Fleet Application Management. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListMaintenanceWindows API. + */ + ListMaintenanceWindowsResponse listMaintenanceWindows(ListMaintenanceWindowsRequest request); + + /** + * Update a maintenance window in Fleet Application Management. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateMaintenanceWindow API. + */ + UpdateMaintenanceWindowResponse updateMaintenanceWindow(UpdateMaintenanceWindowRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + FleetAppsManagementMaintenanceWindowWaiters getWaiters(); + + /** + * Gets the pre-configured paginators available for list operations in this service which may return multiple + * pages of data. These paginators provide an {@link java.lang.Iterable} interface so that service responses, or + * resources/records, can be iterated through without having to manually deal with pagination and page tokens. + * + * @return The service paginators. + */ + FleetAppsManagementMaintenanceWindowPaginators getPaginators(); +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementMaintenanceWindowAsync.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementMaintenanceWindowAsync.java new file mode 100644 index 00000000000..e63776a43f5 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementMaintenanceWindowAsync.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. + * + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public interface FleetAppsManagementMaintenanceWindowAsync extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the serice. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Create a maintenance window in Fleet Application Management. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createMaintenanceWindow( + CreateMaintenanceWindowRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateMaintenanceWindowRequest, CreateMaintenanceWindowResponse> + handler); + + /** + * Delete a maintenance window in Fleet Application Management. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteMaintenanceWindow( + DeleteMaintenanceWindowRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteMaintenanceWindowRequest, DeleteMaintenanceWindowResponse> + handler); + + /** + * Get the details for a maintenance window in Fleet Application Management. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getMaintenanceWindow( + GetMaintenanceWindowRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetMaintenanceWindowRequest, GetMaintenanceWindowResponse> + handler); + + /** + * List maintenance windows for a specified tenancy in\u00A0Fleet Application Management. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listMaintenanceWindows( + ListMaintenanceWindowsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListMaintenanceWindowsRequest, ListMaintenanceWindowsResponse> + handler); + + /** + * Update a maintenance window in Fleet Application Management. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateMaintenanceWindow( + UpdateMaintenanceWindowRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateMaintenanceWindowRequest, UpdateMaintenanceWindowResponse> + handler); +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementMaintenanceWindowAsyncClient.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementMaintenanceWindowAsyncClient.java new file mode 100644 index 00000000000..c3fd559189b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementMaintenanceWindowAsyncClient.java @@ -0,0 +1,711 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.internal.http.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Async client implementation for FleetAppsManagementMaintenanceWindow service.
+ * There are two ways to use async client: + * 1. Use AsyncHandler: using AsyncHandler, if the response to the call is an {@link java.io.InputStream}, like + * getObject Api in object storage service, developers need to process the stream in AsyncHandler, and not anywhere else, + * because the stream will be closed right after the AsyncHandler is invoked.
+ * 2. Use Java Future: using Java Future, developers need to close the stream after they are done with the Java Future.
+ * Accessing the result should be done in a mutually exclusive manner, either through the Future or the AsyncHandler, + * but not both. If the Future is used, the caller should pass in null as the AsyncHandler. If the AsyncHandler + * is used, it is still safe to use the Future to determine whether or not the request was completed via + * Future.isDone/isCancelled.
+ * Please refer to https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class FleetAppsManagementMaintenanceWindowAsyncClient + implements FleetAppsManagementMaintenanceWindowAsync { + /** + * Service instance for FleetAppsManagementMaintenanceWindow. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("FLEETAPPSMANAGEMENTMAINTENANCEWINDOW") + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://fams.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + FleetAppsManagementMaintenanceWindowAsyncClient.class); + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public FleetAppsManagementMaintenanceWindowAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public FleetAppsManagementMaintenanceWindowAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public FleetAppsManagementMaintenanceWindowAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public FleetAppsManagementMaintenanceWindowAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public FleetAppsManagementMaintenanceWindowAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public FleetAppsManagementMaintenanceWindowAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public FleetAppsManagementMaintenanceWindowAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + public FleetAppsManagementMaintenanceWindowAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.clientConfigurationToUse = configuration; + + this.refreshClient(); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder< + Builder, FleetAppsManagementMaintenanceWindowAsyncClient> { + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public FleetAppsManagementMaintenanceWindowAsyncClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new FleetAppsManagementMaintenanceWindowAsyncClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint); + } + } + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public java.util.concurrent.Future createMaintenanceWindow( + CreateMaintenanceWindowRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateMaintenanceWindowRequest, CreateMaintenanceWindowResponse> + handler) { + LOG.trace("Called async createMaintenanceWindow"); + final CreateMaintenanceWindowRequest interceptedRequest = + CreateMaintenanceWindowConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateMaintenanceWindowConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementMaintenanceWindow", + "CreateMaintenanceWindow", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateMaintenanceWindowResponse> + transformer = + CreateMaintenanceWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateMaintenanceWindowRequest, CreateMaintenanceWindowResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateMaintenanceWindowRequest, CreateMaintenanceWindowResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateMaintenanceWindowDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateMaintenanceWindowRequest, CreateMaintenanceWindowResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteMaintenanceWindow( + DeleteMaintenanceWindowRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteMaintenanceWindowRequest, DeleteMaintenanceWindowResponse> + handler) { + LOG.trace("Called async deleteMaintenanceWindow"); + final DeleteMaintenanceWindowRequest interceptedRequest = + DeleteMaintenanceWindowConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteMaintenanceWindowConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementMaintenanceWindow", + "DeleteMaintenanceWindow", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteMaintenanceWindowResponse> + transformer = + DeleteMaintenanceWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteMaintenanceWindowRequest, DeleteMaintenanceWindowResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteMaintenanceWindowRequest, DeleteMaintenanceWindowResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteMaintenanceWindowRequest, DeleteMaintenanceWindowResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getMaintenanceWindow( + GetMaintenanceWindowRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetMaintenanceWindowRequest, GetMaintenanceWindowResponse> + handler) { + LOG.trace("Called async getMaintenanceWindow"); + final GetMaintenanceWindowRequest interceptedRequest = + GetMaintenanceWindowConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetMaintenanceWindowConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementMaintenanceWindow", + "GetMaintenanceWindow", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + GetMaintenanceWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetMaintenanceWindowRequest, GetMaintenanceWindowResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetMaintenanceWindowRequest, GetMaintenanceWindowResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetMaintenanceWindowRequest, GetMaintenanceWindowResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listMaintenanceWindows( + ListMaintenanceWindowsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListMaintenanceWindowsRequest, ListMaintenanceWindowsResponse> + handler) { + LOG.trace("Called async listMaintenanceWindows"); + final ListMaintenanceWindowsRequest interceptedRequest = + ListMaintenanceWindowsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListMaintenanceWindowsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementMaintenanceWindow", + "ListMaintenanceWindows", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListMaintenanceWindowsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListMaintenanceWindowsRequest, ListMaintenanceWindowsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListMaintenanceWindowsRequest, ListMaintenanceWindowsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListMaintenanceWindowsRequest, ListMaintenanceWindowsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateMaintenanceWindow( + UpdateMaintenanceWindowRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateMaintenanceWindowRequest, UpdateMaintenanceWindowResponse> + handler) { + LOG.trace("Called async updateMaintenanceWindow"); + final UpdateMaintenanceWindowRequest interceptedRequest = + UpdateMaintenanceWindowConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateMaintenanceWindowConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementMaintenanceWindow", + "UpdateMaintenanceWindow", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateMaintenanceWindowResponse> + transformer = + UpdateMaintenanceWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateMaintenanceWindowRequest, UpdateMaintenanceWindowResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateMaintenanceWindowRequest, UpdateMaintenanceWindowResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateMaintenanceWindowDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateMaintenanceWindowRequest, UpdateMaintenanceWindowResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementMaintenanceWindowClient.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementMaintenanceWindowClient.java new file mode 100644 index 00000000000..78b6d255a4a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementMaintenanceWindowClient.java @@ -0,0 +1,760 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.internal.http.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration; +import com.oracle.bmc.util.CircuitBreakerUtils; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class FleetAppsManagementMaintenanceWindowClient + implements FleetAppsManagementMaintenanceWindow { + /** + * Service instance for FleetAppsManagementMaintenanceWindow. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("FLEETAPPSMANAGEMENTMAINTENANCEWINDOW") + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://fams.{region}.oci.{secondLevelDomain}") + .build(); + // attempt twice if it's instance principals, immediately failures will try to refresh the token + private static final int MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS = 2; + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(FleetAppsManagementMaintenanceWindowClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final FleetAppsManagementMaintenanceWindowWaiters waiters; + + private final FleetAppsManagementMaintenanceWindowPaginators paginators; + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + circuitBreakerConfiguration; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public FleetAppsManagementMaintenanceWindowClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public FleetAppsManagementMaintenanceWindowClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public FleetAppsManagementMaintenanceWindowClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public FleetAppsManagementMaintenanceWindowClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public FleetAppsManagementMaintenanceWindowClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public FleetAppsManagementMaintenanceWindowClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public FleetAppsManagementMaintenanceWindowClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + */ + public FleetAppsManagementMaintenanceWindowClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * Use the {@link Builder} to get access to all these parameters. + * + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + protected FleetAppsManagementMaintenanceWindowClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + this.restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + + this.clientConfigurationToUse = + (configuration != null) + ? configuration + : com.oracle.bmc.ClientConfiguration.builder().build(); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.retryConfiguration = clientConfigurationToUse.getRetryConfiguration(); + final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + userCircuitBreakerConfiguration = + CircuitBreakerUtils.getUserDefinedCircuitBreakerConfiguration( + configuration); + if (userCircuitBreakerConfiguration == null) { + this.circuitBreakerConfiguration = + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION; + } else { + this.circuitBreakerConfiguration = userCircuitBreakerConfiguration; + } + + this.refreshClient(); + + if (executorService == null) { + // up to 50 (core) threads, time out after 60s idle, all daemon + java.util.concurrent.ThreadPoolExecutor threadPoolExecutor = + new java.util.concurrent.ThreadPoolExecutor( + 50, + 50, + 60L, + java.util.concurrent.TimeUnit.SECONDS, + new java.util.concurrent.LinkedBlockingQueue(), + com.oracle.bmc.internal.ClientThreadFactory.builder() + .isDaemon(true) + .nameFormat("FleetAppsManagementMaintenanceWindow-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new FleetAppsManagementMaintenanceWindowWaiters(executorService, this); + + this.paginators = new FleetAppsManagementMaintenanceWindowPaginators(this); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder< + Builder, FleetAppsManagementMaintenanceWindowClient> { + private java.util.concurrent.ExecutorService executorService; + + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Set the ExecutorService for the client to be created. + * @param executorService executorService + * @return this builder + */ + public Builder executorService(java.util.concurrent.ExecutorService executorService) { + this.executorService = executorService; + return this; + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public FleetAppsManagementMaintenanceWindowClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new FleetAppsManagementMaintenanceWindowClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + restClientFactoryBuilder); + } + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, this.authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient, + null, + this.circuitBreakerConfiguration); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public CreateMaintenanceWindowResponse createMaintenanceWindow( + CreateMaintenanceWindowRequest request) { + LOG.trace("Called createMaintenanceWindow"); + final CreateMaintenanceWindowRequest interceptedRequest = + CreateMaintenanceWindowConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateMaintenanceWindowConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementMaintenanceWindow", + "CreateMaintenanceWindow", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + CreateMaintenanceWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateMaintenanceWindowDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteMaintenanceWindowResponse deleteMaintenanceWindow( + DeleteMaintenanceWindowRequest request) { + LOG.trace("Called deleteMaintenanceWindow"); + final DeleteMaintenanceWindowRequest interceptedRequest = + DeleteMaintenanceWindowConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteMaintenanceWindowConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementMaintenanceWindow", + "DeleteMaintenanceWindow", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + DeleteMaintenanceWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetMaintenanceWindowResponse getMaintenanceWindow(GetMaintenanceWindowRequest request) { + LOG.trace("Called getMaintenanceWindow"); + final GetMaintenanceWindowRequest interceptedRequest = + GetMaintenanceWindowConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetMaintenanceWindowConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementMaintenanceWindow", + "GetMaintenanceWindow", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + GetMaintenanceWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListMaintenanceWindowsResponse listMaintenanceWindows( + ListMaintenanceWindowsRequest request) { + LOG.trace("Called listMaintenanceWindows"); + final ListMaintenanceWindowsRequest interceptedRequest = + ListMaintenanceWindowsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListMaintenanceWindowsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementMaintenanceWindow", + "ListMaintenanceWindows", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListMaintenanceWindowsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateMaintenanceWindowResponse updateMaintenanceWindow( + UpdateMaintenanceWindowRequest request) { + LOG.trace("Called updateMaintenanceWindow"); + final UpdateMaintenanceWindowRequest interceptedRequest = + UpdateMaintenanceWindowConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateMaintenanceWindowConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementMaintenanceWindow", + "UpdateMaintenanceWindow", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + UpdateMaintenanceWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateMaintenanceWindowDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public FleetAppsManagementMaintenanceWindowWaiters getWaiters() { + return waiters; + } + + @Override + public FleetAppsManagementMaintenanceWindowPaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementMaintenanceWindowPaginators.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementMaintenanceWindowPaginators.java new file mode 100644 index 00000000000..42109cba997 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementMaintenanceWindowPaginators.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of FleetAppsManagementMaintenanceWindow where multiple pages of data may be fetched. + * Two styles of iteration are supported: + * + *

    + *
  • Iterating over the Response objects returned by the list operation. These are referred to as ResponseIterators, and the methods are suffixed with ResponseIterator. For example: listUsersResponseIterator
  • + *
  • Iterating over the resources/records being listed. These are referred to as RecordIterators, and the methods are suffixed with RecordIterator. For example: listUsersRecordIterator
  • + *
+ * + * These iterables abstract away the need to write code to manually handle pagination via looping and using the page tokens. + * They will automatically fetch more data from the service when required. + * + * As an example, if we were using the ListUsers operation in IdentityService, then the {@link java.lang.Iterable} returned by calling a + * ResponseIterator method would iterate over the ListUsersResponse objects returned by each ListUsers call, whereas the {@link java.lang.Iterable} + * returned by calling a RecordIterator method would iterate over the User records and we don't have to deal with ListUsersResponse objects at all. + * In either case, pagination will be automatically handled so we can iterate until there are no more responses or no more resources/records available. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class FleetAppsManagementMaintenanceWindowPaginators { + private final FleetAppsManagementMaintenanceWindow client; + + public FleetAppsManagementMaintenanceWindowPaginators( + FleetAppsManagementMaintenanceWindow client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listMaintenanceWindows operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listMaintenanceWindowsResponseIterator( + final ListMaintenanceWindowsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListMaintenanceWindowsRequest.Builder, ListMaintenanceWindowsRequest, + ListMaintenanceWindowsResponse>( + new java.util.function.Supplier() { + @Override + public ListMaintenanceWindowsRequest.Builder get() { + return ListMaintenanceWindowsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListMaintenanceWindowsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMaintenanceWindowsRequest.Builder>, + ListMaintenanceWindowsRequest>() { + @Override + public ListMaintenanceWindowsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMaintenanceWindowsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListMaintenanceWindowsRequest, ListMaintenanceWindowsResponse>() { + @Override + public ListMaintenanceWindowsResponse apply( + ListMaintenanceWindowsRequest request) { + return client.listMaintenanceWindows(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindowSummary} objects + * contained in responses from the listMaintenanceWindows operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindowSummary} objects + * contained in responses received from the service. + */ + public Iterable + listMaintenanceWindowsRecordIterator(final ListMaintenanceWindowsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListMaintenanceWindowsRequest.Builder, ListMaintenanceWindowsRequest, + ListMaintenanceWindowsResponse, + com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindowSummary>( + new java.util.function.Supplier() { + @Override + public ListMaintenanceWindowsRequest.Builder get() { + return ListMaintenanceWindowsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListMaintenanceWindowsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMaintenanceWindowsRequest.Builder>, + ListMaintenanceWindowsRequest>() { + @Override + public ListMaintenanceWindowsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMaintenanceWindowsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListMaintenanceWindowsRequest, ListMaintenanceWindowsResponse>() { + @Override + public ListMaintenanceWindowsResponse apply( + ListMaintenanceWindowsRequest request) { + return client.listMaintenanceWindows(request); + } + }, + new java.util.function.Function< + ListMaintenanceWindowsResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model + .MaintenanceWindowSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model + .MaintenanceWindowSummary> + apply(ListMaintenanceWindowsResponse response) { + return response.getMaintenanceWindowCollection().getItems(); + } + }); + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementMaintenanceWindowWaiters.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementMaintenanceWindowWaiters.java new file mode 100644 index 00000000000..f786cbcc6aa --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementMaintenanceWindowWaiters.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of FleetAppsManagementMaintenanceWindow. + *

+ * The default configuration used is defined by {@link com.oracle.bmc.waiter.Waiters.Waiters#DEFAULT_POLLING_WAITER}. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class FleetAppsManagementMaintenanceWindowWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final FleetAppsManagementMaintenanceWindow client; + + public FleetAppsManagementMaintenanceWindowWaiters( + java.util.concurrent.ExecutorService executorService, + FleetAppsManagementMaintenanceWindow client) { + this.executorService = executorService; + this.client = client; + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forMaintenanceWindow( + GetMaintenanceWindowRequest request, + com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindow.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forMaintenanceWindow( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forMaintenanceWindow( + GetMaintenanceWindowRequest request, + com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindow.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forMaintenanceWindow( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forMaintenanceWindow( + GetMaintenanceWindowRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindow.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forMaintenanceWindow( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for MaintenanceWindow. + private com.oracle.bmc.waiter.Waiter + forMaintenanceWindow( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetMaintenanceWindowRequest request, + final com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindow + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindow.LifecycleState> + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetMaintenanceWindowRequest, GetMaintenanceWindowResponse>() { + @Override + public GetMaintenanceWindowResponse apply( + GetMaintenanceWindowRequest request) { + return client.getMaintenanceWindow(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetMaintenanceWindowResponse response) { + return targetStatesSet.contains( + response.getMaintenanceWindow().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindow + .LifecycleState.Deleted)), + request); + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementOperations.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementOperations.java new file mode 100644 index 00000000000..4e35448fd99 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementOperations.java @@ -0,0 +1,409 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. + * + * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public interface FleetAppsManagementOperations extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the service. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this Region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Creates a new Patch. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreatePatch API. + */ + CreatePatchResponse createPatch(CreatePatchRequest request); + + /** + * Create a SchedulerDefinition to perform lifecycle operations. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateSchedulerDefinition API. + */ + CreateSchedulerDefinitionResponse createSchedulerDefinition( + CreateSchedulerDefinitionRequest request); + + /** + * Deletes a Patch resource by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeletePatch API. + */ + DeletePatchResponse deletePatch(DeletePatchRequest request); + + /** + * Deletes a SchedulerDefinition resource by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteSchedulerDefinition API. + */ + DeleteSchedulerDefinitionResponse deleteSchedulerDefinition( + DeleteSchedulerDefinitionRequest request); + + /** + * Delete a lifecycle operation schedule in Fleet Application Management. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteSchedulerJob API. + */ + DeleteSchedulerJobResponse deleteSchedulerJob(DeleteSchedulerJobRequest request); + + /** + * Generate Compliance Report + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ExportComplianceReport API. + */ + ExportComplianceReportResponse exportComplianceReport(ExportComplianceReportRequest request); + + /** + * Get Task Execution by Identifier for a Resource within an action group. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetExecution API. + */ + GetExecutionResponse getExecution(GetExecutionRequest request); + + /** + * Gets activity details by identifier for a job. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetJobActivity API. + */ + GetJobActivityResponse getJobActivity(GetJobActivityRequest request); + + /** + * Gets a Patch by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetPatch API. + */ + GetPatchResponse getPatch(GetPatchRequest request); + + /** + * Get the details of a SchedulerDefinition that performs lifecycle management operations. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetSchedulerDefinition API. + */ + GetSchedulerDefinitionResponse getSchedulerDefinition(GetSchedulerDefinitionRequest request); + + /** + * Get the details of a lifecycle management operations job in Fleet Application Management. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetSchedulerJob API. + */ + GetSchedulerJobResponse getSchedulerJob(GetSchedulerJobRequest request); + + /** + * Gets a list of complianceDetails. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListComplianceRecords API. + */ + ListComplianceRecordsResponse listComplianceRecords(ListComplianceRecordsRequest request); + + /** + * Returns a list of Task Executions for a Resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListExecutions API. + */ + ListExecutionsResponse listExecutions(ListExecutionsRequest request); + + /** + * Returns a list of Patches. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListPatches API. + */ + ListPatchesResponse listPatches(ListPatchesRequest request); + + /** + * Returns a list of resources for an Activity Execution. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListResources API. + */ + ListResourcesResponse listResources(ListResourcesRequest request); + + /** + * Returns a list of ScheduledFleets. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListScheduledFleets API. + */ + ListScheduledFleetsResponse listScheduledFleets(ListScheduledFleetsRequest request); + + /** + * List all lifecycle management schedules in Fleet Application Management. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListSchedulerDefinitions API. + */ + ListSchedulerDefinitionsResponse listSchedulerDefinitions( + ListSchedulerDefinitionsRequest request); + + /** + * List scheduled lifecycle operation jobs in Fleet Application Management. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListSchedulerJobs API. + */ + ListSchedulerJobsResponse listSchedulerJobs(ListSchedulerJobsRequest request); + + /** + * Returns a list of Steps for an Activity Execution. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListSteps API. + */ + ListStepsResponse listSteps(ListStepsRequest request); + + /** + * Manage execution actions for a Job like retrying or pausing a task. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ManageJobExecution API. + */ + ManageJobExecutionResponse manageJobExecution(ManageJobExecutionRequest request); + + /** + * Retrieve aggregated summary information of ComplianceRecords within a Tenancy. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use SummarizeComplianceRecordCounts API. + */ + SummarizeComplianceRecordCountsResponse summarizeComplianceRecordCounts( + SummarizeComplianceRecordCountsRequest request); + + /** + * Retrieve aggregated summary information of Managed Entities within a Tenancy. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use SummarizeManagedEntityCounts API. + */ + SummarizeManagedEntityCountsResponse summarizeManagedEntityCounts( + SummarizeManagedEntityCountsRequest request); + + /** + * Retrieve aggregated summary information of Scheduler Jobs within a Tenancy. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use SummarizeSchedulerJobCounts API. + */ + SummarizeSchedulerJobCountsResponse summarizeSchedulerJobCounts( + SummarizeSchedulerJobCountsRequest request); + + /** + * Updates the Patch + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdatePatch API. + */ + UpdatePatchResponse updatePatch(UpdatePatchRequest request); + + /** + * Update the details of a SchedulerDefinition that performs lifecycle management operations. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateSchedulerDefinition API. + */ + UpdateSchedulerDefinitionResponse updateSchedulerDefinition( + UpdateSchedulerDefinitionRequest request); + + /** + * Update a lifecycle operation job schedule in Fleet Application Management. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateSchedulerJob API. + */ + UpdateSchedulerJobResponse updateSchedulerJob(UpdateSchedulerJobRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + FleetAppsManagementOperationsWaiters getWaiters(); + + /** + * Gets the pre-configured paginators available for list operations in this service which may return multiple + * pages of data. These paginators provide an {@link java.lang.Iterable} interface so that service responses, or + * resources/records, can be iterated through without having to manually deal with pagination and page tokens. + * + * @return The service paginators. + */ + FleetAppsManagementOperationsPaginators getPaginators(); +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementOperationsAsync.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementOperationsAsync.java new file mode 100644 index 00000000000..f2770cd6c9d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementOperationsAsync.java @@ -0,0 +1,475 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. + * + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public interface FleetAppsManagementOperationsAsync extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the serice. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Creates a new Patch. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createPatch( + CreatePatchRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Create a SchedulerDefinition to perform lifecycle operations. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createSchedulerDefinition( + CreateSchedulerDefinitionRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateSchedulerDefinitionRequest, CreateSchedulerDefinitionResponse> + handler); + + /** + * Deletes a Patch resource by identifier + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deletePatch( + DeletePatchRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Deletes a SchedulerDefinition resource by identifier + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteSchedulerDefinition( + DeleteSchedulerDefinitionRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteSchedulerDefinitionRequest, DeleteSchedulerDefinitionResponse> + handler); + + /** + * Delete a lifecycle operation schedule in Fleet Application Management. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteSchedulerJob( + DeleteSchedulerJobRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteSchedulerJobRequest, DeleteSchedulerJobResponse> + handler); + + /** + * Generate Compliance Report + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future exportComplianceReport( + ExportComplianceReportRequest request, + com.oracle.bmc.responses.AsyncHandler< + ExportComplianceReportRequest, ExportComplianceReportResponse> + handler); + + /** + * Get Task Execution by Identifier for a Resource within an action group. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getExecution( + GetExecutionRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Gets activity details by identifier for a job. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getJobActivity( + GetJobActivityRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Gets a Patch by identifier + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getPatch( + GetPatchRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Get the details of a SchedulerDefinition that performs lifecycle management operations. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getSchedulerDefinition( + GetSchedulerDefinitionRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetSchedulerDefinitionRequest, GetSchedulerDefinitionResponse> + handler); + + /** + * Get the details of a lifecycle management operations job in Fleet Application Management. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getSchedulerJob( + GetSchedulerJobRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Gets a list of complianceDetails. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listComplianceRecords( + ListComplianceRecordsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListComplianceRecordsRequest, ListComplianceRecordsResponse> + handler); + + /** + * Returns a list of Task Executions for a Resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listExecutions( + ListExecutionsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Returns a list of Patches. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listPatches( + ListPatchesRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Returns a list of resources for an Activity Execution. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listResources( + ListResourcesRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Returns a list of ScheduledFleets. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listScheduledFleets( + ListScheduledFleetsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListScheduledFleetsRequest, ListScheduledFleetsResponse> + handler); + + /** + * List all lifecycle management schedules in Fleet Application Management. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listSchedulerDefinitions( + ListSchedulerDefinitionsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListSchedulerDefinitionsRequest, ListSchedulerDefinitionsResponse> + handler); + + /** + * List scheduled lifecycle operation jobs in Fleet Application Management. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listSchedulerJobs( + ListSchedulerJobsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListSchedulerJobsRequest, ListSchedulerJobsResponse> + handler); + + /** + * Returns a list of Steps for an Activity Execution. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listSteps( + ListStepsRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Manage execution actions for a Job like retrying or pausing a task. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future manageJobExecution( + ManageJobExecutionRequest request, + com.oracle.bmc.responses.AsyncHandler< + ManageJobExecutionRequest, ManageJobExecutionResponse> + handler); + + /** + * Retrieve aggregated summary information of ComplianceRecords within a Tenancy. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + summarizeComplianceRecordCounts( + SummarizeComplianceRecordCountsRequest request, + com.oracle.bmc.responses.AsyncHandler< + SummarizeComplianceRecordCountsRequest, + SummarizeComplianceRecordCountsResponse> + handler); + + /** + * Retrieve aggregated summary information of Managed Entities within a Tenancy. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future summarizeManagedEntityCounts( + SummarizeManagedEntityCountsRequest request, + com.oracle.bmc.responses.AsyncHandler< + SummarizeManagedEntityCountsRequest, + SummarizeManagedEntityCountsResponse> + handler); + + /** + * Retrieve aggregated summary information of Scheduler Jobs within a Tenancy. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future summarizeSchedulerJobCounts( + SummarizeSchedulerJobCountsRequest request, + com.oracle.bmc.responses.AsyncHandler< + SummarizeSchedulerJobCountsRequest, SummarizeSchedulerJobCountsResponse> + handler); + + /** + * Updates the Patch + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updatePatch( + UpdatePatchRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Update the details of a SchedulerDefinition that performs lifecycle management operations. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateSchedulerDefinition( + UpdateSchedulerDefinitionRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateSchedulerDefinitionRequest, UpdateSchedulerDefinitionResponse> + handler); + + /** + * Update a lifecycle operation job schedule in Fleet Application Management. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateSchedulerJob( + UpdateSchedulerJobRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateSchedulerJobRequest, UpdateSchedulerJobResponse> + handler); +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementOperationsAsyncClient.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementOperationsAsyncClient.java new file mode 100644 index 00000000000..8c1975a66ad --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementOperationsAsyncClient.java @@ -0,0 +1,1710 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.internal.http.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Async client implementation for FleetAppsManagementOperations service.
+ * There are two ways to use async client: + * 1. Use AsyncHandler: using AsyncHandler, if the response to the call is an {@link java.io.InputStream}, like + * getObject Api in object storage service, developers need to process the stream in AsyncHandler, and not anywhere else, + * because the stream will be closed right after the AsyncHandler is invoked.
+ * 2. Use Java Future: using Java Future, developers need to close the stream after they are done with the Java Future.
+ * Accessing the result should be done in a mutually exclusive manner, either through the Future or the AsyncHandler, + * but not both. If the Future is used, the caller should pass in null as the AsyncHandler. If the AsyncHandler + * is used, it is still safe to use the Future to determine whether or not the request was completed via + * Future.isDone/isCancelled.
+ * Please refer to https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class FleetAppsManagementOperationsAsyncClient + implements FleetAppsManagementOperationsAsync { + /** + * Service instance for FleetAppsManagementOperations. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("FLEETAPPSMANAGEMENTOPERATIONS") + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://fams.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(FleetAppsManagementOperationsAsyncClient.class); + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public FleetAppsManagementOperationsAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public FleetAppsManagementOperationsAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public FleetAppsManagementOperationsAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public FleetAppsManagementOperationsAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public FleetAppsManagementOperationsAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public FleetAppsManagementOperationsAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public FleetAppsManagementOperationsAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + public FleetAppsManagementOperationsAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.clientConfigurationToUse = configuration; + + this.refreshClient(); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + if (com.oracle.bmc.http.ApacheUtils.isExtraStreamLogsEnabled()) { + LOG.warn( + com.oracle.bmc.http.ApacheUtils.getStreamWarningMessage( + "FleetAppsManagementOperationsAsyncClient", "exportComplianceReport")); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder< + Builder, FleetAppsManagementOperationsAsyncClient> { + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public FleetAppsManagementOperationsAsyncClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new FleetAppsManagementOperationsAsyncClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint); + } + } + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public java.util.concurrent.Future createPatch( + CreatePatchRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async createPatch"); + final CreatePatchRequest interceptedRequest = + CreatePatchConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreatePatchConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "CreatePatch", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + CreatePatchConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreatePatchRequest, CreatePatchResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreatePatchDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreatePatchRequest, CreatePatchResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createSchedulerDefinition( + CreateSchedulerDefinitionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateSchedulerDefinitionRequest, CreateSchedulerDefinitionResponse> + handler) { + LOG.trace("Called async createSchedulerDefinition"); + final CreateSchedulerDefinitionRequest interceptedRequest = + CreateSchedulerDefinitionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateSchedulerDefinitionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "CreateSchedulerDefinition", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateSchedulerDefinitionResponse> + transformer = + CreateSchedulerDefinitionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateSchedulerDefinitionRequest, CreateSchedulerDefinitionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateSchedulerDefinitionRequest, + CreateSchedulerDefinitionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateSchedulerDefinitionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateSchedulerDefinitionRequest, CreateSchedulerDefinitionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deletePatch( + DeletePatchRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async deletePatch"); + final DeletePatchRequest interceptedRequest = + DeletePatchConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeletePatchConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "DeletePatch", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + DeletePatchConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeletePatchRequest, DeletePatchResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeletePatchRequest, DeletePatchResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteSchedulerDefinition( + DeleteSchedulerDefinitionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteSchedulerDefinitionRequest, DeleteSchedulerDefinitionResponse> + handler) { + LOG.trace("Called async deleteSchedulerDefinition"); + final DeleteSchedulerDefinitionRequest interceptedRequest = + DeleteSchedulerDefinitionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteSchedulerDefinitionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "DeleteSchedulerDefinition", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteSchedulerDefinitionResponse> + transformer = + DeleteSchedulerDefinitionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteSchedulerDefinitionRequest, DeleteSchedulerDefinitionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteSchedulerDefinitionRequest, + DeleteSchedulerDefinitionResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteSchedulerDefinitionRequest, DeleteSchedulerDefinitionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteSchedulerJob( + DeleteSchedulerJobRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteSchedulerJobRequest, DeleteSchedulerJobResponse> + handler) { + LOG.trace("Called async deleteSchedulerJob"); + final DeleteSchedulerJobRequest interceptedRequest = + DeleteSchedulerJobConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteSchedulerJobConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "DeleteSchedulerJob", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + DeleteSchedulerJobConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteSchedulerJobRequest, DeleteSchedulerJobResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteSchedulerJobRequest, DeleteSchedulerJobResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future exportComplianceReport( + ExportComplianceReportRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ExportComplianceReportRequest, ExportComplianceReportResponse> + handler) { + LOG.trace("Called async exportComplianceReport"); + final ExportComplianceReportRequest interceptedRequest = + ExportComplianceReportConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ExportComplianceReportConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "ExportComplianceReport", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ExportComplianceReportConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ExportComplianceReportRequest, ExportComplianceReportResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ExportComplianceReportRequest, ExportComplianceReportResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getExportComplianceReportDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ExportComplianceReportRequest, ExportComplianceReportResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getExecution( + GetExecutionRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getExecution"); + final GetExecutionRequest interceptedRequest = + GetExecutionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetExecutionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "GetExecution", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + GetExecutionConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetExecutionRequest, GetExecutionResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetExecutionRequest, GetExecutionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getJobActivity( + GetJobActivityRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetJobActivityRequest, GetJobActivityResponse> + handler) { + LOG.trace("Called async getJobActivity"); + final GetJobActivityRequest interceptedRequest = + GetJobActivityConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetJobActivityConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "GetJobActivity", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + GetJobActivityConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetJobActivityRequest, GetJobActivityResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetJobActivityRequest, GetJobActivityResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getPatch( + GetPatchRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getPatch"); + final GetPatchRequest interceptedRequest = GetPatchConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetPatchConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "GetPatch", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function transformer = + GetPatchConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetPatchRequest, GetPatchResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getSchedulerDefinition( + GetSchedulerDefinitionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetSchedulerDefinitionRequest, GetSchedulerDefinitionResponse> + handler) { + LOG.trace("Called async getSchedulerDefinition"); + final GetSchedulerDefinitionRequest interceptedRequest = + GetSchedulerDefinitionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetSchedulerDefinitionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "GetSchedulerDefinition", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + GetSchedulerDefinitionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetSchedulerDefinitionRequest, GetSchedulerDefinitionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetSchedulerDefinitionRequest, GetSchedulerDefinitionResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetSchedulerDefinitionRequest, GetSchedulerDefinitionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getSchedulerJob( + GetSchedulerJobRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetSchedulerJobRequest, GetSchedulerJobResponse> + handler) { + LOG.trace("Called async getSchedulerJob"); + final GetSchedulerJobRequest interceptedRequest = + GetSchedulerJobConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetSchedulerJobConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "GetSchedulerJob", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + GetSchedulerJobConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetSchedulerJobRequest, GetSchedulerJobResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetSchedulerJobRequest, GetSchedulerJobResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listComplianceRecords( + ListComplianceRecordsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListComplianceRecordsRequest, ListComplianceRecordsResponse> + handler) { + LOG.trace("Called async listComplianceRecords"); + final ListComplianceRecordsRequest interceptedRequest = + ListComplianceRecordsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListComplianceRecordsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "ListComplianceRecords", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListComplianceRecordsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListComplianceRecordsRequest, ListComplianceRecordsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListComplianceRecordsRequest, ListComplianceRecordsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListComplianceRecordsRequest, ListComplianceRecordsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listExecutions( + ListExecutionsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListExecutionsRequest, ListExecutionsResponse> + handler) { + LOG.trace("Called async listExecutions"); + final ListExecutionsRequest interceptedRequest = + ListExecutionsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListExecutionsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "ListExecutions", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListExecutionsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListExecutionsRequest, ListExecutionsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListExecutionsRequest, ListExecutionsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listPatches( + ListPatchesRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listPatches"); + final ListPatchesRequest interceptedRequest = + ListPatchesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPatchesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "ListPatches", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListPatchesConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListPatchesRequest, ListPatchesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListPatchesRequest, ListPatchesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listResources( + ListResourcesRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listResources"); + final ListResourcesRequest interceptedRequest = + ListResourcesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListResourcesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "ListResources", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListResourcesConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListResourcesRequest, ListResourcesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListResourcesRequest, ListResourcesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listScheduledFleets( + ListScheduledFleetsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListScheduledFleetsRequest, ListScheduledFleetsResponse> + handler) { + LOG.trace("Called async listScheduledFleets"); + final ListScheduledFleetsRequest interceptedRequest = + ListScheduledFleetsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListScheduledFleetsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "ListScheduledFleets", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListScheduledFleetsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListScheduledFleetsRequest, ListScheduledFleetsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListScheduledFleetsRequest, ListScheduledFleetsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListScheduledFleetsRequest, ListScheduledFleetsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listSchedulerDefinitions( + ListSchedulerDefinitionsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListSchedulerDefinitionsRequest, ListSchedulerDefinitionsResponse> + handler) { + LOG.trace("Called async listSchedulerDefinitions"); + final ListSchedulerDefinitionsRequest interceptedRequest = + ListSchedulerDefinitionsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSchedulerDefinitionsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "ListSchedulerDefinitions", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ListSchedulerDefinitionsResponse> + transformer = + ListSchedulerDefinitionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListSchedulerDefinitionsRequest, ListSchedulerDefinitionsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListSchedulerDefinitionsRequest, ListSchedulerDefinitionsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListSchedulerDefinitionsRequest, ListSchedulerDefinitionsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listSchedulerJobs( + ListSchedulerJobsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListSchedulerJobsRequest, ListSchedulerJobsResponse> + handler) { + LOG.trace("Called async listSchedulerJobs"); + final ListSchedulerJobsRequest interceptedRequest = + ListSchedulerJobsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSchedulerJobsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "ListSchedulerJobs", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListSchedulerJobsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListSchedulerJobsRequest, ListSchedulerJobsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListSchedulerJobsRequest, ListSchedulerJobsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listSteps( + ListStepsRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listSteps"); + final ListStepsRequest interceptedRequest = ListStepsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListStepsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "ListSteps", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListStepsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListStepsRequest, ListStepsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future manageJobExecution( + ManageJobExecutionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ManageJobExecutionRequest, ManageJobExecutionResponse> + handler) { + LOG.trace("Called async manageJobExecution"); + final ManageJobExecutionRequest interceptedRequest = + ManageJobExecutionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ManageJobExecutionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "ManageJobExecution", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ManageJobExecutionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ManageJobExecutionRequest, ManageJobExecutionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getManageJobExecutionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ManageJobExecutionRequest, ManageJobExecutionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + summarizeComplianceRecordCounts( + SummarizeComplianceRecordCountsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + SummarizeComplianceRecordCountsRequest, + SummarizeComplianceRecordCountsResponse> + handler) { + LOG.trace("Called async summarizeComplianceRecordCounts"); + final SummarizeComplianceRecordCountsRequest interceptedRequest = + SummarizeComplianceRecordCountsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SummarizeComplianceRecordCountsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "SummarizeComplianceRecordCounts", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, SummarizeComplianceRecordCountsResponse> + transformer = + SummarizeComplianceRecordCountsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + SummarizeComplianceRecordCountsRequest, + SummarizeComplianceRecordCountsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + SummarizeComplianceRecordCountsRequest, + SummarizeComplianceRecordCountsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + SummarizeComplianceRecordCountsRequest, + SummarizeComplianceRecordCountsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + summarizeManagedEntityCounts( + SummarizeManagedEntityCountsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + SummarizeManagedEntityCountsRequest, + SummarizeManagedEntityCountsResponse> + handler) { + LOG.trace("Called async summarizeManagedEntityCounts"); + final SummarizeManagedEntityCountsRequest interceptedRequest = + SummarizeManagedEntityCountsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SummarizeManagedEntityCountsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "SummarizeManagedEntityCounts", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, SummarizeManagedEntityCountsResponse> + transformer = + SummarizeManagedEntityCountsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + SummarizeManagedEntityCountsRequest, SummarizeManagedEntityCountsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + SummarizeManagedEntityCountsRequest, + SummarizeManagedEntityCountsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + SummarizeManagedEntityCountsRequest, SummarizeManagedEntityCountsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + summarizeSchedulerJobCounts( + SummarizeSchedulerJobCountsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + SummarizeSchedulerJobCountsRequest, + SummarizeSchedulerJobCountsResponse> + handler) { + LOG.trace("Called async summarizeSchedulerJobCounts"); + final SummarizeSchedulerJobCountsRequest interceptedRequest = + SummarizeSchedulerJobCountsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SummarizeSchedulerJobCountsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "SummarizeSchedulerJobCounts", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, SummarizeSchedulerJobCountsResponse> + transformer = + SummarizeSchedulerJobCountsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + SummarizeSchedulerJobCountsRequest, SummarizeSchedulerJobCountsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + SummarizeSchedulerJobCountsRequest, + SummarizeSchedulerJobCountsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + SummarizeSchedulerJobCountsRequest, SummarizeSchedulerJobCountsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updatePatch( + UpdatePatchRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async updatePatch"); + final UpdatePatchRequest interceptedRequest = + UpdatePatchConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdatePatchConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "UpdatePatch", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + UpdatePatchConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdatePatchRequest, UpdatePatchResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdatePatchDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdatePatchRequest, UpdatePatchResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateSchedulerDefinition( + UpdateSchedulerDefinitionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateSchedulerDefinitionRequest, UpdateSchedulerDefinitionResponse> + handler) { + LOG.trace("Called async updateSchedulerDefinition"); + final UpdateSchedulerDefinitionRequest interceptedRequest = + UpdateSchedulerDefinitionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateSchedulerDefinitionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "UpdateSchedulerDefinition", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateSchedulerDefinitionResponse> + transformer = + UpdateSchedulerDefinitionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateSchedulerDefinitionRequest, UpdateSchedulerDefinitionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateSchedulerDefinitionRequest, + UpdateSchedulerDefinitionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateSchedulerDefinitionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateSchedulerDefinitionRequest, UpdateSchedulerDefinitionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateSchedulerJob( + UpdateSchedulerJobRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateSchedulerJobRequest, UpdateSchedulerJobResponse> + handler) { + LOG.trace("Called async updateSchedulerJob"); + final UpdateSchedulerJobRequest interceptedRequest = + UpdateSchedulerJobConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateSchedulerJobConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "UpdateSchedulerJob", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + UpdateSchedulerJobConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateSchedulerJobRequest, UpdateSchedulerJobResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateSchedulerJobDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateSchedulerJobRequest, UpdateSchedulerJobResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementOperationsClient.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementOperationsClient.java new file mode 100644 index 00000000000..277d4a1fd4a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementOperationsClient.java @@ -0,0 +1,1553 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.internal.http.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration; +import com.oracle.bmc.util.CircuitBreakerUtils; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class FleetAppsManagementOperationsClient implements FleetAppsManagementOperations { + /** + * Service instance for FleetAppsManagementOperations. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("FLEETAPPSMANAGEMENTOPERATIONS") + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://fams.{region}.oci.{secondLevelDomain}") + .build(); + // attempt twice if it's instance principals, immediately failures will try to refresh the token + private static final int MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS = 2; + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(FleetAppsManagementOperationsClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final FleetAppsManagementOperationsWaiters waiters; + + private final FleetAppsManagementOperationsPaginators paginators; + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + circuitBreakerConfiguration; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public FleetAppsManagementOperationsClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public FleetAppsManagementOperationsClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public FleetAppsManagementOperationsClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public FleetAppsManagementOperationsClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public FleetAppsManagementOperationsClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public FleetAppsManagementOperationsClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public FleetAppsManagementOperationsClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + */ + public FleetAppsManagementOperationsClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * Use the {@link Builder} to get access to all these parameters. + * + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + protected FleetAppsManagementOperationsClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + this.restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + + this.clientConfigurationToUse = + (configuration != null) + ? configuration + : com.oracle.bmc.ClientConfiguration.builder().build(); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.retryConfiguration = clientConfigurationToUse.getRetryConfiguration(); + final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + userCircuitBreakerConfiguration = + CircuitBreakerUtils.getUserDefinedCircuitBreakerConfiguration( + configuration); + if (userCircuitBreakerConfiguration == null) { + this.circuitBreakerConfiguration = + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION; + } else { + this.circuitBreakerConfiguration = userCircuitBreakerConfiguration; + } + + this.refreshClient(); + + if (executorService == null) { + // up to 50 (core) threads, time out after 60s idle, all daemon + java.util.concurrent.ThreadPoolExecutor threadPoolExecutor = + new java.util.concurrent.ThreadPoolExecutor( + 50, + 50, + 60L, + java.util.concurrent.TimeUnit.SECONDS, + new java.util.concurrent.LinkedBlockingQueue(), + com.oracle.bmc.internal.ClientThreadFactory.builder() + .isDaemon(true) + .nameFormat("FleetAppsManagementOperations-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new FleetAppsManagementOperationsWaiters(executorService, this); + + this.paginators = new FleetAppsManagementOperationsPaginators(this); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + if (com.oracle.bmc.http.ApacheUtils.isExtraStreamLogsEnabled()) { + LOG.warn( + com.oracle.bmc.http.ApacheUtils.getStreamWarningMessage( + "FleetAppsManagementOperationsClient", "exportComplianceReport")); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder< + Builder, FleetAppsManagementOperationsClient> { + private java.util.concurrent.ExecutorService executorService; + + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Set the ExecutorService for the client to be created. + * @param executorService executorService + * @return this builder + */ + public Builder executorService(java.util.concurrent.ExecutorService executorService) { + this.executorService = executorService; + return this; + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public FleetAppsManagementOperationsClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new FleetAppsManagementOperationsClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + restClientFactoryBuilder); + } + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, this.authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient, + null, + this.circuitBreakerConfiguration); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public CreatePatchResponse createPatch(CreatePatchRequest request) { + LOG.trace("Called createPatch"); + final CreatePatchRequest interceptedRequest = + CreatePatchConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreatePatchConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "CreatePatch", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + CreatePatchConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreatePatchDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateSchedulerDefinitionResponse createSchedulerDefinition( + CreateSchedulerDefinitionRequest request) { + LOG.trace("Called createSchedulerDefinition"); + final CreateSchedulerDefinitionRequest interceptedRequest = + CreateSchedulerDefinitionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateSchedulerDefinitionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "CreateSchedulerDefinition", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + CreateSchedulerDefinitionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getCreateSchedulerDefinitionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeletePatchResponse deletePatch(DeletePatchRequest request) { + LOG.trace("Called deletePatch"); + final DeletePatchRequest interceptedRequest = + DeletePatchConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeletePatchConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "DeletePatch", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + DeletePatchConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteSchedulerDefinitionResponse deleteSchedulerDefinition( + DeleteSchedulerDefinitionRequest request) { + LOG.trace("Called deleteSchedulerDefinition"); + final DeleteSchedulerDefinitionRequest interceptedRequest = + DeleteSchedulerDefinitionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteSchedulerDefinitionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "DeleteSchedulerDefinition", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + DeleteSchedulerDefinitionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteSchedulerJobResponse deleteSchedulerJob(DeleteSchedulerJobRequest request) { + LOG.trace("Called deleteSchedulerJob"); + final DeleteSchedulerJobRequest interceptedRequest = + DeleteSchedulerJobConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteSchedulerJobConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "DeleteSchedulerJob", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + DeleteSchedulerJobConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ExportComplianceReportResponse exportComplianceReport( + ExportComplianceReportRequest request) { + LOG.trace("Called exportComplianceReport"); + final ExportComplianceReportRequest interceptedRequest = + ExportComplianceReportConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ExportComplianceReportConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "ExportComplianceReport", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ExportComplianceReportConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getExportComplianceReportDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetExecutionResponse getExecution(GetExecutionRequest request) { + LOG.trace("Called getExecution"); + final GetExecutionRequest interceptedRequest = + GetExecutionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetExecutionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "GetExecution", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + GetExecutionConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetJobActivityResponse getJobActivity(GetJobActivityRequest request) { + LOG.trace("Called getJobActivity"); + final GetJobActivityRequest interceptedRequest = + GetJobActivityConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetJobActivityConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "GetJobActivity", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + GetJobActivityConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetPatchResponse getPatch(GetPatchRequest request) { + LOG.trace("Called getPatch"); + final GetPatchRequest interceptedRequest = GetPatchConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetPatchConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "GetPatch", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + GetPatchConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetSchedulerDefinitionResponse getSchedulerDefinition( + GetSchedulerDefinitionRequest request) { + LOG.trace("Called getSchedulerDefinition"); + final GetSchedulerDefinitionRequest interceptedRequest = + GetSchedulerDefinitionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetSchedulerDefinitionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "GetSchedulerDefinition", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + GetSchedulerDefinitionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetSchedulerJobResponse getSchedulerJob(GetSchedulerJobRequest request) { + LOG.trace("Called getSchedulerJob"); + final GetSchedulerJobRequest interceptedRequest = + GetSchedulerJobConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetSchedulerJobConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "GetSchedulerJob", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + GetSchedulerJobConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListComplianceRecordsResponse listComplianceRecords( + ListComplianceRecordsRequest request) { + LOG.trace("Called listComplianceRecords"); + final ListComplianceRecordsRequest interceptedRequest = + ListComplianceRecordsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListComplianceRecordsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "ListComplianceRecords", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListComplianceRecordsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListExecutionsResponse listExecutions(ListExecutionsRequest request) { + LOG.trace("Called listExecutions"); + final ListExecutionsRequest interceptedRequest = + ListExecutionsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListExecutionsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "ListExecutions", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + ListExecutionsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListPatchesResponse listPatches(ListPatchesRequest request) { + LOG.trace("Called listPatches"); + final ListPatchesRequest interceptedRequest = + ListPatchesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPatchesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "ListPatches", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + ListPatchesConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListResourcesResponse listResources(ListResourcesRequest request) { + LOG.trace("Called listResources"); + final ListResourcesRequest interceptedRequest = + ListResourcesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListResourcesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "ListResources", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + ListResourcesConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListScheduledFleetsResponse listScheduledFleets(ListScheduledFleetsRequest request) { + LOG.trace("Called listScheduledFleets"); + final ListScheduledFleetsRequest interceptedRequest = + ListScheduledFleetsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListScheduledFleetsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "ListScheduledFleets", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListScheduledFleetsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListSchedulerDefinitionsResponse listSchedulerDefinitions( + ListSchedulerDefinitionsRequest request) { + LOG.trace("Called listSchedulerDefinitions"); + final ListSchedulerDefinitionsRequest interceptedRequest = + ListSchedulerDefinitionsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSchedulerDefinitionsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "ListSchedulerDefinitions", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListSchedulerDefinitionsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListSchedulerJobsResponse listSchedulerJobs(ListSchedulerJobsRequest request) { + LOG.trace("Called listSchedulerJobs"); + final ListSchedulerJobsRequest interceptedRequest = + ListSchedulerJobsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSchedulerJobsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "ListSchedulerJobs", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListSchedulerJobsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListStepsResponse listSteps(ListStepsRequest request) { + LOG.trace("Called listSteps"); + final ListStepsRequest interceptedRequest = ListStepsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListStepsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "ListSteps", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + ListStepsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ManageJobExecutionResponse manageJobExecution(ManageJobExecutionRequest request) { + LOG.trace("Called manageJobExecution"); + final ManageJobExecutionRequest interceptedRequest = + ManageJobExecutionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ManageJobExecutionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "ManageJobExecution", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ManageJobExecutionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getManageJobExecutionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public SummarizeComplianceRecordCountsResponse summarizeComplianceRecordCounts( + SummarizeComplianceRecordCountsRequest request) { + LOG.trace("Called summarizeComplianceRecordCounts"); + final SummarizeComplianceRecordCountsRequest interceptedRequest = + SummarizeComplianceRecordCountsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SummarizeComplianceRecordCountsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "SummarizeComplianceRecordCounts", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, SummarizeComplianceRecordCountsResponse> + transformer = + SummarizeComplianceRecordCountsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public SummarizeManagedEntityCountsResponse summarizeManagedEntityCounts( + SummarizeManagedEntityCountsRequest request) { + LOG.trace("Called summarizeManagedEntityCounts"); + final SummarizeManagedEntityCountsRequest interceptedRequest = + SummarizeManagedEntityCountsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SummarizeManagedEntityCountsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "SummarizeManagedEntityCounts", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + SummarizeManagedEntityCountsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public SummarizeSchedulerJobCountsResponse summarizeSchedulerJobCounts( + SummarizeSchedulerJobCountsRequest request) { + LOG.trace("Called summarizeSchedulerJobCounts"); + final SummarizeSchedulerJobCountsRequest interceptedRequest = + SummarizeSchedulerJobCountsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SummarizeSchedulerJobCountsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "SummarizeSchedulerJobCounts", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + SummarizeSchedulerJobCountsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdatePatchResponse updatePatch(UpdatePatchRequest request) { + LOG.trace("Called updatePatch"); + final UpdatePatchRequest interceptedRequest = + UpdatePatchConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdatePatchConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "UpdatePatch", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + UpdatePatchConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdatePatchDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateSchedulerDefinitionResponse updateSchedulerDefinition( + UpdateSchedulerDefinitionRequest request) { + LOG.trace("Called updateSchedulerDefinition"); + final UpdateSchedulerDefinitionRequest interceptedRequest = + UpdateSchedulerDefinitionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateSchedulerDefinitionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "UpdateSchedulerDefinition", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + UpdateSchedulerDefinitionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest + .getUpdateSchedulerDefinitionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateSchedulerJobResponse updateSchedulerJob(UpdateSchedulerJobRequest request) { + LOG.trace("Called updateSchedulerJob"); + final UpdateSchedulerJobRequest interceptedRequest = + UpdateSchedulerJobConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateSchedulerJobConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementOperations", + "UpdateSchedulerJob", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + UpdateSchedulerJobConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateSchedulerJobDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public FleetAppsManagementOperationsWaiters getWaiters() { + return waiters; + } + + @Override + public FleetAppsManagementOperationsPaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementOperationsPaginators.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementOperationsPaginators.java new file mode 100644 index 00000000000..6e0f8a60bf9 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementOperationsPaginators.java @@ -0,0 +1,948 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of FleetAppsManagementOperations where multiple pages of data may be fetched. + * Two styles of iteration are supported: + * + *

    + *
  • Iterating over the Response objects returned by the list operation. These are referred to as ResponseIterators, and the methods are suffixed with ResponseIterator. For example: listUsersResponseIterator
  • + *
  • Iterating over the resources/records being listed. These are referred to as RecordIterators, and the methods are suffixed with RecordIterator. For example: listUsersRecordIterator
  • + *
+ * + * These iterables abstract away the need to write code to manually handle pagination via looping and using the page tokens. + * They will automatically fetch more data from the service when required. + * + * As an example, if we were using the ListUsers operation in IdentityService, then the {@link java.lang.Iterable} returned by calling a + * ResponseIterator method would iterate over the ListUsersResponse objects returned by each ListUsers call, whereas the {@link java.lang.Iterable} + * returned by calling a RecordIterator method would iterate over the User records and we don't have to deal with ListUsersResponse objects at all. + * In either case, pagination will be automatically handled so we can iterate until there are no more responses or no more resources/records available. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class FleetAppsManagementOperationsPaginators { + private final FleetAppsManagementOperations client; + + public FleetAppsManagementOperationsPaginators(FleetAppsManagementOperations client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listComplianceRecords operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listComplianceRecordsResponseIterator( + final ListComplianceRecordsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListComplianceRecordsRequest.Builder, ListComplianceRecordsRequest, + ListComplianceRecordsResponse>( + new java.util.function.Supplier() { + @Override + public ListComplianceRecordsRequest.Builder get() { + return ListComplianceRecordsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListComplianceRecordsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListComplianceRecordsRequest.Builder>, + ListComplianceRecordsRequest>() { + @Override + public ListComplianceRecordsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListComplianceRecordsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListComplianceRecordsRequest, ListComplianceRecordsResponse>() { + @Override + public ListComplianceRecordsResponse apply( + ListComplianceRecordsRequest request) { + return client.listComplianceRecords(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.ComplianceRecordSummary} objects + * contained in responses from the listComplianceRecords operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.ComplianceRecordSummary} objects + * contained in responses received from the service. + */ + public Iterable + listComplianceRecordsRecordIterator(final ListComplianceRecordsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListComplianceRecordsRequest.Builder, ListComplianceRecordsRequest, + ListComplianceRecordsResponse, + com.oracle.bmc.fleetappsmanagement.model.ComplianceRecordSummary>( + new java.util.function.Supplier() { + @Override + public ListComplianceRecordsRequest.Builder get() { + return ListComplianceRecordsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListComplianceRecordsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListComplianceRecordsRequest.Builder>, + ListComplianceRecordsRequest>() { + @Override + public ListComplianceRecordsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListComplianceRecordsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListComplianceRecordsRequest, ListComplianceRecordsResponse>() { + @Override + public ListComplianceRecordsResponse apply( + ListComplianceRecordsRequest request) { + return client.listComplianceRecords(request); + } + }, + new java.util.function.Function< + ListComplianceRecordsResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model + .ComplianceRecordSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model + .ComplianceRecordSummary> + apply(ListComplianceRecordsResponse response) { + return response.getComplianceRecordCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listExecutions operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listExecutionsResponseIterator( + final ListExecutionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListExecutionsRequest.Builder, ListExecutionsRequest, ListExecutionsResponse>( + new java.util.function.Supplier() { + @Override + public ListExecutionsRequest.Builder get() { + return ListExecutionsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListExecutionsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExecutionsRequest.Builder>, + ListExecutionsRequest>() { + @Override + public ListExecutionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExecutionsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListExecutionsResponse apply(ListExecutionsRequest request) { + return client.listExecutions(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.ExecutionSummary} objects + * contained in responses from the listExecutions operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.ExecutionSummary} objects + * contained in responses received from the service. + */ + public Iterable + listExecutionsRecordIterator(final ListExecutionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListExecutionsRequest.Builder, ListExecutionsRequest, ListExecutionsResponse, + com.oracle.bmc.fleetappsmanagement.model.ExecutionSummary>( + new java.util.function.Supplier() { + @Override + public ListExecutionsRequest.Builder get() { + return ListExecutionsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListExecutionsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExecutionsRequest.Builder>, + ListExecutionsRequest>() { + @Override + public ListExecutionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListExecutionsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListExecutionsResponse apply(ListExecutionsRequest request) { + return client.listExecutions(request); + } + }, + new java.util.function.Function< + ListExecutionsResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model.ExecutionSummary>>() { + @Override + public java.util.List + apply(ListExecutionsResponse response) { + return response.getExecutionCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listPatches operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listPatchesResponseIterator( + final ListPatchesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListPatchesRequest.Builder, ListPatchesRequest, ListPatchesResponse>( + new java.util.function.Supplier() { + @Override + public ListPatchesRequest.Builder get() { + return ListPatchesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPatchesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPatchesRequest.Builder>, + ListPatchesRequest>() { + @Override + public ListPatchesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPatchesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListPatchesResponse apply(ListPatchesRequest request) { + return client.listPatches(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.PatchSummary} objects + * contained in responses from the listPatches operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.PatchSummary} objects + * contained in responses received from the service. + */ + public Iterable + listPatchesRecordIterator(final ListPatchesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListPatchesRequest.Builder, ListPatchesRequest, ListPatchesResponse, + com.oracle.bmc.fleetappsmanagement.model.PatchSummary>( + new java.util.function.Supplier() { + @Override + public ListPatchesRequest.Builder get() { + return ListPatchesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPatchesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPatchesRequest.Builder>, + ListPatchesRequest>() { + @Override + public ListPatchesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPatchesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListPatchesResponse apply(ListPatchesRequest request) { + return client.listPatches(request); + } + }, + new java.util.function.Function< + ListPatchesResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListPatchesResponse response) { + return response.getPatchCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listResources operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listResourcesResponseIterator( + final ListResourcesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListResourcesRequest.Builder, ListResourcesRequest, ListResourcesResponse>( + new java.util.function.Supplier() { + @Override + public ListResourcesRequest.Builder get() { + return ListResourcesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListResourcesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListResourcesRequest.Builder>, + ListResourcesRequest>() { + @Override + public ListResourcesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListResourcesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListResourcesResponse apply(ListResourcesRequest request) { + return client.listResources(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.ResourceSummary} objects + * contained in responses from the listResources operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.ResourceSummary} objects + * contained in responses received from the service. + */ + public Iterable + listResourcesRecordIterator(final ListResourcesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListResourcesRequest.Builder, ListResourcesRequest, ListResourcesResponse, + com.oracle.bmc.fleetappsmanagement.model.ResourceSummary>( + new java.util.function.Supplier() { + @Override + public ListResourcesRequest.Builder get() { + return ListResourcesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListResourcesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListResourcesRequest.Builder>, + ListResourcesRequest>() { + @Override + public ListResourcesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListResourcesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListResourcesResponse apply(ListResourcesRequest request) { + return client.listResources(request); + } + }, + new java.util.function.Function< + ListResourcesResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model.ResourceSummary>>() { + @Override + public java.util.List + apply(ListResourcesResponse response) { + return response.getResourceCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listScheduledFleets operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listScheduledFleetsResponseIterator( + final ListScheduledFleetsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListScheduledFleetsRequest.Builder, ListScheduledFleetsRequest, + ListScheduledFleetsResponse>( + new java.util.function.Supplier() { + @Override + public ListScheduledFleetsRequest.Builder get() { + return ListScheduledFleetsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListScheduledFleetsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListScheduledFleetsRequest.Builder>, + ListScheduledFleetsRequest>() { + @Override + public ListScheduledFleetsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListScheduledFleetsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListScheduledFleetsRequest, ListScheduledFleetsResponse>() { + @Override + public ListScheduledFleetsResponse apply(ListScheduledFleetsRequest request) { + return client.listScheduledFleets(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.ScheduledFleetSummary} objects + * contained in responses from the listScheduledFleets operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.ScheduledFleetSummary} objects + * contained in responses received from the service. + */ + public Iterable + listScheduledFleetsRecordIterator(final ListScheduledFleetsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListScheduledFleetsRequest.Builder, ListScheduledFleetsRequest, + ListScheduledFleetsResponse, + com.oracle.bmc.fleetappsmanagement.model.ScheduledFleetSummary>( + new java.util.function.Supplier() { + @Override + public ListScheduledFleetsRequest.Builder get() { + return ListScheduledFleetsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListScheduledFleetsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListScheduledFleetsRequest.Builder>, + ListScheduledFleetsRequest>() { + @Override + public ListScheduledFleetsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListScheduledFleetsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListScheduledFleetsRequest, ListScheduledFleetsResponse>() { + @Override + public ListScheduledFleetsResponse apply(ListScheduledFleetsRequest request) { + return client.listScheduledFleets(request); + } + }, + new java.util.function.Function< + ListScheduledFleetsResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model.ScheduledFleetSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model.ScheduledFleetSummary> + apply(ListScheduledFleetsResponse response) { + return response.getScheduledFleetCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listSchedulerDefinitions operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listSchedulerDefinitionsResponseIterator( + final ListSchedulerDefinitionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListSchedulerDefinitionsRequest.Builder, ListSchedulerDefinitionsRequest, + ListSchedulerDefinitionsResponse>( + new java.util.function.Supplier() { + @Override + public ListSchedulerDefinitionsRequest.Builder get() { + return ListSchedulerDefinitionsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListSchedulerDefinitionsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSchedulerDefinitionsRequest.Builder>, + ListSchedulerDefinitionsRequest>() { + @Override + public ListSchedulerDefinitionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSchedulerDefinitionsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSchedulerDefinitionsRequest, ListSchedulerDefinitionsResponse>() { + @Override + public ListSchedulerDefinitionsResponse apply( + ListSchedulerDefinitionsRequest request) { + return client.listSchedulerDefinitions(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinitionSummary} objects + * contained in responses from the listSchedulerDefinitions operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinitionSummary} objects + * contained in responses received from the service. + */ + public Iterable + listSchedulerDefinitionsRecordIterator(final ListSchedulerDefinitionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListSchedulerDefinitionsRequest.Builder, ListSchedulerDefinitionsRequest, + ListSchedulerDefinitionsResponse, + com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinitionSummary>( + new java.util.function.Supplier() { + @Override + public ListSchedulerDefinitionsRequest.Builder get() { + return ListSchedulerDefinitionsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListSchedulerDefinitionsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSchedulerDefinitionsRequest.Builder>, + ListSchedulerDefinitionsRequest>() { + @Override + public ListSchedulerDefinitionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSchedulerDefinitionsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSchedulerDefinitionsRequest, ListSchedulerDefinitionsResponse>() { + @Override + public ListSchedulerDefinitionsResponse apply( + ListSchedulerDefinitionsRequest request) { + return client.listSchedulerDefinitions(request); + } + }, + new java.util.function.Function< + ListSchedulerDefinitionsResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model + .SchedulerDefinitionSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model + .SchedulerDefinitionSummary> + apply(ListSchedulerDefinitionsResponse response) { + return response.getSchedulerDefinitionCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listSchedulerJobs operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listSchedulerJobsResponseIterator( + final ListSchedulerJobsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListSchedulerJobsRequest.Builder, ListSchedulerJobsRequest, + ListSchedulerJobsResponse>( + new java.util.function.Supplier() { + @Override + public ListSchedulerJobsRequest.Builder get() { + return ListSchedulerJobsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListSchedulerJobsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSchedulerJobsRequest.Builder>, + ListSchedulerJobsRequest>() { + @Override + public ListSchedulerJobsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSchedulerJobsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSchedulerJobsRequest, ListSchedulerJobsResponse>() { + @Override + public ListSchedulerJobsResponse apply(ListSchedulerJobsRequest request) { + return client.listSchedulerJobs(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.SchedulerJobSummary} objects + * contained in responses from the listSchedulerJobs operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.SchedulerJobSummary} objects + * contained in responses received from the service. + */ + public Iterable + listSchedulerJobsRecordIterator(final ListSchedulerJobsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListSchedulerJobsRequest.Builder, ListSchedulerJobsRequest, + ListSchedulerJobsResponse, + com.oracle.bmc.fleetappsmanagement.model.SchedulerJobSummary>( + new java.util.function.Supplier() { + @Override + public ListSchedulerJobsRequest.Builder get() { + return ListSchedulerJobsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListSchedulerJobsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSchedulerJobsRequest.Builder>, + ListSchedulerJobsRequest>() { + @Override + public ListSchedulerJobsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSchedulerJobsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSchedulerJobsRequest, ListSchedulerJobsResponse>() { + @Override + public ListSchedulerJobsResponse apply(ListSchedulerJobsRequest request) { + return client.listSchedulerJobs(request); + } + }, + new java.util.function.Function< + ListSchedulerJobsResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model.SchedulerJobSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model.SchedulerJobSummary> + apply(ListSchedulerJobsResponse response) { + return response.getSchedulerJobCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listSteps operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listStepsResponseIterator(final ListStepsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListStepsRequest.Builder, ListStepsRequest, ListStepsResponse>( + new java.util.function.Supplier() { + @Override + public ListStepsRequest.Builder get() { + return ListStepsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListStepsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListStepsRequest.Builder>, + ListStepsRequest>() { + @Override + public ListStepsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListStepsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListStepsResponse apply(ListStepsRequest request) { + return client.listSteps(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.StepSummary} objects + * contained in responses from the listSteps operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.StepSummary} objects + * contained in responses received from the service. + */ + public Iterable listStepsRecordIterator( + final ListStepsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListStepsRequest.Builder, ListStepsRequest, ListStepsResponse, + com.oracle.bmc.fleetappsmanagement.model.StepSummary>( + new java.util.function.Supplier() { + @Override + public ListStepsRequest.Builder get() { + return ListStepsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListStepsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListStepsRequest.Builder>, + ListStepsRequest>() { + @Override + public ListStepsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListStepsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListStepsResponse apply(ListStepsRequest request) { + return client.listSteps(request); + } + }, + new java.util.function.Function< + ListStepsResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListStepsResponse response) { + return response.getStepCollection().getItems(); + } + }); + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementOperationsWaiters.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementOperationsWaiters.java new file mode 100644 index 00000000000..967a1ccb7f1 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementOperationsWaiters.java @@ -0,0 +1,346 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of FleetAppsManagementOperations. + *

+ * The default configuration used is defined by {@link com.oracle.bmc.waiter.Waiters.Waiters#DEFAULT_POLLING_WAITER}. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class FleetAppsManagementOperationsWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final FleetAppsManagementOperations client; + + public FleetAppsManagementOperationsWaiters( + java.util.concurrent.ExecutorService executorService, + FleetAppsManagementOperations client) { + this.executorService = executorService; + this.client = client; + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forPatch( + GetPatchRequest request, + com.oracle.bmc.fleetappsmanagement.model.Patch.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forPatch( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forPatch( + GetPatchRequest request, + com.oracle.bmc.fleetappsmanagement.model.Patch.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forPatch( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forPatch( + GetPatchRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.fleetappsmanagement.model.Patch.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forPatch( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for Patch. + private com.oracle.bmc.waiter.Waiter forPatch( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetPatchRequest request, + final com.oracle.bmc.fleetappsmanagement.model.Patch.LifecycleState... targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function() { + @Override + public GetPatchResponse apply(GetPatchRequest request) { + return client.getPatch(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetPatchResponse response) { + return targetStatesSet.contains( + response.getPatch().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.fleetappsmanagement.model.Patch.LifecycleState + .Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetSchedulerDefinitionRequest, GetSchedulerDefinitionResponse> + forSchedulerDefinition( + GetSchedulerDefinitionRequest request, + com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinition.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forSchedulerDefinition( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetSchedulerDefinitionRequest, GetSchedulerDefinitionResponse> + forSchedulerDefinition( + GetSchedulerDefinitionRequest request, + com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinition.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forSchedulerDefinition( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetSchedulerDefinitionRequest, GetSchedulerDefinitionResponse> + forSchedulerDefinition( + GetSchedulerDefinitionRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinition.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forSchedulerDefinition( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for SchedulerDefinition. + private com.oracle.bmc.waiter.Waiter< + GetSchedulerDefinitionRequest, GetSchedulerDefinitionResponse> + forSchedulerDefinition( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetSchedulerDefinitionRequest request, + final com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinition + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinition.LifecycleState> + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetSchedulerDefinitionRequest, GetSchedulerDefinitionResponse>() { + @Override + public GetSchedulerDefinitionResponse apply( + GetSchedulerDefinitionRequest request) { + return client.getSchedulerDefinition(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetSchedulerDefinitionResponse response) { + return targetStatesSet.contains( + response.getSchedulerDefinition().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinition + .LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forSchedulerJob( + GetSchedulerJobRequest request, + com.oracle.bmc.fleetappsmanagement.model.SchedulerJob.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forSchedulerJob( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forSchedulerJob( + GetSchedulerJobRequest request, + com.oracle.bmc.fleetappsmanagement.model.SchedulerJob.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forSchedulerJob( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forSchedulerJob( + GetSchedulerJobRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.fleetappsmanagement.model.SchedulerJob.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forSchedulerJob( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for SchedulerJob. + private com.oracle.bmc.waiter.Waiter + forSchedulerJob( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetSchedulerJobRequest request, + final com.oracle.bmc.fleetappsmanagement.model.SchedulerJob.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetSchedulerJobRequest, GetSchedulerJobResponse>() { + @Override + public GetSchedulerJobResponse apply(GetSchedulerJobRequest request) { + return client.getSchedulerJob(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetSchedulerJobResponse response) { + return targetStatesSet.contains( + response.getSchedulerJob().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.fleetappsmanagement.model.SchedulerJob.LifecycleState + .Deleted)), + request); + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementPaginators.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementPaginators.java new file mode 100644 index 00000000000..8398a69307c --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementPaginators.java @@ -0,0 +1,1419 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of FleetAppsManagement where multiple pages of data may be fetched. + * Two styles of iteration are supported: + * + *

    + *
  • Iterating over the Response objects returned by the list operation. These are referred to as ResponseIterators, and the methods are suffixed with ResponseIterator. For example: listUsersResponseIterator
  • + *
  • Iterating over the resources/records being listed. These are referred to as RecordIterators, and the methods are suffixed with RecordIterator. For example: listUsersRecordIterator
  • + *
+ * + * These iterables abstract away the need to write code to manually handle pagination via looping and using the page tokens. + * They will automatically fetch more data from the service when required. + * + * As an example, if we were using the ListUsers operation in IdentityService, then the {@link java.lang.Iterable} returned by calling a + * ResponseIterator method would iterate over the ListUsersResponse objects returned by each ListUsers call, whereas the {@link java.lang.Iterable} + * returned by calling a RecordIterator method would iterate over the User records and we don't have to deal with ListUsersResponse objects at all. + * In either case, pagination will be automatically handled so we can iterate until there are no more responses or no more resources/records available. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class FleetAppsManagementPaginators { + private final FleetAppsManagement client; + + public FleetAppsManagementPaginators(FleetAppsManagement client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listAnnouncements operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listAnnouncementsResponseIterator( + final ListAnnouncementsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListAnnouncementsRequest.Builder, ListAnnouncementsRequest, + ListAnnouncementsResponse>( + new java.util.function.Supplier() { + @Override + public ListAnnouncementsRequest.Builder get() { + return ListAnnouncementsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListAnnouncementsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAnnouncementsRequest.Builder>, + ListAnnouncementsRequest>() { + @Override + public ListAnnouncementsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAnnouncementsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListAnnouncementsRequest, ListAnnouncementsResponse>() { + @Override + public ListAnnouncementsResponse apply(ListAnnouncementsRequest request) { + return client.listAnnouncements(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.AnnouncementSummary} objects + * contained in responses from the listAnnouncements operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.AnnouncementSummary} objects + * contained in responses received from the service. + */ + public Iterable + listAnnouncementsRecordIterator(final ListAnnouncementsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListAnnouncementsRequest.Builder, ListAnnouncementsRequest, + ListAnnouncementsResponse, + com.oracle.bmc.fleetappsmanagement.model.AnnouncementSummary>( + new java.util.function.Supplier() { + @Override + public ListAnnouncementsRequest.Builder get() { + return ListAnnouncementsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListAnnouncementsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAnnouncementsRequest.Builder>, + ListAnnouncementsRequest>() { + @Override + public ListAnnouncementsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAnnouncementsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListAnnouncementsRequest, ListAnnouncementsResponse>() { + @Override + public ListAnnouncementsResponse apply(ListAnnouncementsRequest request) { + return client.listAnnouncements(request); + } + }, + new java.util.function.Function< + ListAnnouncementsResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model.AnnouncementSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model.AnnouncementSummary> + apply(ListAnnouncementsResponse response) { + return response.getAnnouncementCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listFleetCredentials operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listFleetCredentialsResponseIterator( + final ListFleetCredentialsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListFleetCredentialsRequest.Builder, ListFleetCredentialsRequest, + ListFleetCredentialsResponse>( + new java.util.function.Supplier() { + @Override + public ListFleetCredentialsRequest.Builder get() { + return ListFleetCredentialsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListFleetCredentialsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetCredentialsRequest.Builder>, + ListFleetCredentialsRequest>() { + @Override + public ListFleetCredentialsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetCredentialsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListFleetCredentialsRequest, ListFleetCredentialsResponse>() { + @Override + public ListFleetCredentialsResponse apply(ListFleetCredentialsRequest request) { + return client.listFleetCredentials(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.FleetCredentialSummary} objects + * contained in responses from the listFleetCredentials operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.FleetCredentialSummary} objects + * contained in responses received from the service. + */ + public Iterable + listFleetCredentialsRecordIterator(final ListFleetCredentialsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListFleetCredentialsRequest.Builder, ListFleetCredentialsRequest, + ListFleetCredentialsResponse, + com.oracle.bmc.fleetappsmanagement.model.FleetCredentialSummary>( + new java.util.function.Supplier() { + @Override + public ListFleetCredentialsRequest.Builder get() { + return ListFleetCredentialsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListFleetCredentialsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetCredentialsRequest.Builder>, + ListFleetCredentialsRequest>() { + @Override + public ListFleetCredentialsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetCredentialsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListFleetCredentialsRequest, ListFleetCredentialsResponse>() { + @Override + public ListFleetCredentialsResponse apply(ListFleetCredentialsRequest request) { + return client.listFleetCredentials(request); + } + }, + new java.util.function.Function< + ListFleetCredentialsResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model + .FleetCredentialSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model.FleetCredentialSummary> + apply(ListFleetCredentialsResponse response) { + return response.getFleetCredentialCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listFleetProducts operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listFleetProductsResponseIterator( + final ListFleetProductsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListFleetProductsRequest.Builder, ListFleetProductsRequest, + ListFleetProductsResponse>( + new java.util.function.Supplier() { + @Override + public ListFleetProductsRequest.Builder get() { + return ListFleetProductsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListFleetProductsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetProductsRequest.Builder>, + ListFleetProductsRequest>() { + @Override + public ListFleetProductsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetProductsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListFleetProductsRequest, ListFleetProductsResponse>() { + @Override + public ListFleetProductsResponse apply(ListFleetProductsRequest request) { + return client.listFleetProducts(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.FleetProductSummary} objects + * contained in responses from the listFleetProducts operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.FleetProductSummary} objects + * contained in responses received from the service. + */ + public Iterable + listFleetProductsRecordIterator(final ListFleetProductsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListFleetProductsRequest.Builder, ListFleetProductsRequest, + ListFleetProductsResponse, + com.oracle.bmc.fleetappsmanagement.model.FleetProductSummary>( + new java.util.function.Supplier() { + @Override + public ListFleetProductsRequest.Builder get() { + return ListFleetProductsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListFleetProductsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetProductsRequest.Builder>, + ListFleetProductsRequest>() { + @Override + public ListFleetProductsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetProductsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListFleetProductsRequest, ListFleetProductsResponse>() { + @Override + public ListFleetProductsResponse apply(ListFleetProductsRequest request) { + return client.listFleetProducts(request); + } + }, + new java.util.function.Function< + ListFleetProductsResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model.FleetProductSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model.FleetProductSummary> + apply(ListFleetProductsResponse response) { + return response.getFleetProductCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listFleetProperties operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listFleetPropertiesResponseIterator( + final ListFleetPropertiesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListFleetPropertiesRequest.Builder, ListFleetPropertiesRequest, + ListFleetPropertiesResponse>( + new java.util.function.Supplier() { + @Override + public ListFleetPropertiesRequest.Builder get() { + return ListFleetPropertiesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListFleetPropertiesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetPropertiesRequest.Builder>, + ListFleetPropertiesRequest>() { + @Override + public ListFleetPropertiesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetPropertiesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListFleetPropertiesRequest, ListFleetPropertiesResponse>() { + @Override + public ListFleetPropertiesResponse apply(ListFleetPropertiesRequest request) { + return client.listFleetProperties(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.FleetPropertySummary} objects + * contained in responses from the listFleetProperties operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.FleetPropertySummary} objects + * contained in responses received from the service. + */ + public Iterable + listFleetPropertiesRecordIterator(final ListFleetPropertiesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListFleetPropertiesRequest.Builder, ListFleetPropertiesRequest, + ListFleetPropertiesResponse, + com.oracle.bmc.fleetappsmanagement.model.FleetPropertySummary>( + new java.util.function.Supplier() { + @Override + public ListFleetPropertiesRequest.Builder get() { + return ListFleetPropertiesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListFleetPropertiesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetPropertiesRequest.Builder>, + ListFleetPropertiesRequest>() { + @Override + public ListFleetPropertiesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetPropertiesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListFleetPropertiesRequest, ListFleetPropertiesResponse>() { + @Override + public ListFleetPropertiesResponse apply(ListFleetPropertiesRequest request) { + return client.listFleetProperties(request); + } + }, + new java.util.function.Function< + ListFleetPropertiesResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model.FleetPropertySummary>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model.FleetPropertySummary> + apply(ListFleetPropertiesResponse response) { + return response.getFleetPropertyCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listFleetResources operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listFleetResourcesResponseIterator( + final ListFleetResourcesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListFleetResourcesRequest.Builder, ListFleetResourcesRequest, + ListFleetResourcesResponse>( + new java.util.function.Supplier() { + @Override + public ListFleetResourcesRequest.Builder get() { + return ListFleetResourcesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListFleetResourcesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetResourcesRequest.Builder>, + ListFleetResourcesRequest>() { + @Override + public ListFleetResourcesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetResourcesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListFleetResourcesRequest, ListFleetResourcesResponse>() { + @Override + public ListFleetResourcesResponse apply(ListFleetResourcesRequest request) { + return client.listFleetResources(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.FleetResourceSummary} objects + * contained in responses from the listFleetResources operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.FleetResourceSummary} objects + * contained in responses received from the service. + */ + public Iterable + listFleetResourcesRecordIterator(final ListFleetResourcesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListFleetResourcesRequest.Builder, ListFleetResourcesRequest, + ListFleetResourcesResponse, + com.oracle.bmc.fleetappsmanagement.model.FleetResourceSummary>( + new java.util.function.Supplier() { + @Override + public ListFleetResourcesRequest.Builder get() { + return ListFleetResourcesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListFleetResourcesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetResourcesRequest.Builder>, + ListFleetResourcesRequest>() { + @Override + public ListFleetResourcesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetResourcesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListFleetResourcesRequest, ListFleetResourcesResponse>() { + @Override + public ListFleetResourcesResponse apply(ListFleetResourcesRequest request) { + return client.listFleetResources(request); + } + }, + new java.util.function.Function< + ListFleetResourcesResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model.FleetResourceSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model.FleetResourceSummary> + apply(ListFleetResourcesResponse response) { + return response.getFleetResourceCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listFleetTargets operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listFleetTargetsResponseIterator( + final ListFleetTargetsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListFleetTargetsRequest.Builder, ListFleetTargetsRequest, ListFleetTargetsResponse>( + new java.util.function.Supplier() { + @Override + public ListFleetTargetsRequest.Builder get() { + return ListFleetTargetsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListFleetTargetsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetTargetsRequest.Builder>, + ListFleetTargetsRequest>() { + @Override + public ListFleetTargetsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetTargetsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListFleetTargetsRequest, ListFleetTargetsResponse>() { + @Override + public ListFleetTargetsResponse apply(ListFleetTargetsRequest request) { + return client.listFleetTargets(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.FleetTargetSummary} objects + * contained in responses from the listFleetTargets operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.FleetTargetSummary} objects + * contained in responses received from the service. + */ + public Iterable + listFleetTargetsRecordIterator(final ListFleetTargetsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListFleetTargetsRequest.Builder, ListFleetTargetsRequest, ListFleetTargetsResponse, + com.oracle.bmc.fleetappsmanagement.model.FleetTargetSummary>( + new java.util.function.Supplier() { + @Override + public ListFleetTargetsRequest.Builder get() { + return ListFleetTargetsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListFleetTargetsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetTargetsRequest.Builder>, + ListFleetTargetsRequest>() { + @Override + public ListFleetTargetsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetTargetsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListFleetTargetsRequest, ListFleetTargetsResponse>() { + @Override + public ListFleetTargetsResponse apply(ListFleetTargetsRequest request) { + return client.listFleetTargets(request); + } + }, + new java.util.function.Function< + ListFleetTargetsResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model.FleetTargetSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model.FleetTargetSummary> + apply(ListFleetTargetsResponse response) { + return response.getFleetTargetCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listFleets operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listFleetsResponseIterator( + final ListFleetsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListFleetsRequest.Builder, ListFleetsRequest, ListFleetsResponse>( + new java.util.function.Supplier() { + @Override + public ListFleetsRequest.Builder get() { + return ListFleetsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListFleetsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetsRequest.Builder>, + ListFleetsRequest>() { + @Override + public ListFleetsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListFleetsResponse apply(ListFleetsRequest request) { + return client.listFleets(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.FleetSummary} objects + * contained in responses from the listFleets operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.FleetSummary} objects + * contained in responses received from the service. + */ + public Iterable listFleetsRecordIterator( + final ListFleetsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListFleetsRequest.Builder, ListFleetsRequest, ListFleetsResponse, + com.oracle.bmc.fleetappsmanagement.model.FleetSummary>( + new java.util.function.Supplier() { + @Override + public ListFleetsRequest.Builder get() { + return ListFleetsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListFleetsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetsRequest.Builder>, + ListFleetsRequest>() { + @Override + public ListFleetsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListFleetsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListFleetsResponse apply(ListFleetsRequest request) { + return client.listFleets(request); + } + }, + new java.util.function.Function< + ListFleetsResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListFleetsResponse response) { + return response.getFleetCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listInventoryResources operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listInventoryResourcesResponseIterator( + final ListInventoryResourcesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListInventoryResourcesRequest.Builder, ListInventoryResourcesRequest, + ListInventoryResourcesResponse>( + new java.util.function.Supplier() { + @Override + public ListInventoryResourcesRequest.Builder get() { + return ListInventoryResourcesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListInventoryResourcesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListInventoryResourcesRequest.Builder>, + ListInventoryResourcesRequest>() { + @Override + public ListInventoryResourcesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListInventoryResourcesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListInventoryResourcesRequest, ListInventoryResourcesResponse>() { + @Override + public ListInventoryResourcesResponse apply( + ListInventoryResourcesRequest request) { + return client.listInventoryResources(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.InventoryResourceSummary} objects + * contained in responses from the listInventoryResources operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.InventoryResourceSummary} objects + * contained in responses received from the service. + */ + public Iterable + listInventoryResourcesRecordIterator(final ListInventoryResourcesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListInventoryResourcesRequest.Builder, ListInventoryResourcesRequest, + ListInventoryResourcesResponse, + com.oracle.bmc.fleetappsmanagement.model.InventoryResourceSummary>( + new java.util.function.Supplier() { + @Override + public ListInventoryResourcesRequest.Builder get() { + return ListInventoryResourcesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListInventoryResourcesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListInventoryResourcesRequest.Builder>, + ListInventoryResourcesRequest>() { + @Override + public ListInventoryResourcesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListInventoryResourcesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListInventoryResourcesRequest, ListInventoryResourcesResponse>() { + @Override + public ListInventoryResourcesResponse apply( + ListInventoryResourcesRequest request) { + return client.listInventoryResources(request); + } + }, + new java.util.function.Function< + ListInventoryResourcesResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model + .InventoryResourceSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model + .InventoryResourceSummary> + apply(ListInventoryResourcesResponse response) { + return response.getInventoryResourceCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listTargets operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listTargetsResponseIterator( + final ListTargetsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListTargetsRequest.Builder, ListTargetsRequest, ListTargetsResponse>( + new java.util.function.Supplier() { + @Override + public ListTargetsRequest.Builder get() { + return ListTargetsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListTargetsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListTargetsRequest.Builder>, + ListTargetsRequest>() { + @Override + public ListTargetsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListTargetsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListTargetsResponse apply(ListTargetsRequest request) { + return client.listTargets(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.FleetTargetSummary} objects + * contained in responses from the listTargets operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.FleetTargetSummary} objects + * contained in responses received from the service. + */ + public Iterable + listTargetsRecordIterator(final ListTargetsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListTargetsRequest.Builder, ListTargetsRequest, ListTargetsResponse, + com.oracle.bmc.fleetappsmanagement.model.FleetTargetSummary>( + new java.util.function.Supplier() { + @Override + public ListTargetsRequest.Builder get() { + return ListTargetsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListTargetsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListTargetsRequest.Builder>, + ListTargetsRequest>() { + @Override + public ListTargetsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListTargetsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListTargetsResponse apply(ListTargetsRequest request) { + return client.listTargets(request); + } + }, + new java.util.function.Function< + ListTargetsResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model.FleetTargetSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model.FleetTargetSummary> + apply(ListTargetsResponse response) { + return response.getFleetTargetCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listWorkRequestErrors operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listWorkRequestErrorsResponseIterator( + final ListWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListWorkRequestErrorsRequest.Builder, ListWorkRequestErrorsRequest, + ListWorkRequestErrorsResponse>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestErrorsRequest.Builder get() { + return ListWorkRequestErrorsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.Builder>, + ListWorkRequestErrorsRequest>() { + @Override + public ListWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>() { + @Override + public ListWorkRequestErrorsResponse apply( + ListWorkRequestErrorsRequest request) { + return client.listWorkRequestErrors(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.WorkRequestError} objects + * contained in responses from the listWorkRequestErrors operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.WorkRequestError} objects + * contained in responses received from the service. + */ + public Iterable + listWorkRequestErrorsRecordIterator(final ListWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListWorkRequestErrorsRequest.Builder, ListWorkRequestErrorsRequest, + ListWorkRequestErrorsResponse, + com.oracle.bmc.fleetappsmanagement.model.WorkRequestError>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestErrorsRequest.Builder get() { + return ListWorkRequestErrorsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.Builder>, + ListWorkRequestErrorsRequest>() { + @Override + public ListWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>() { + @Override + public ListWorkRequestErrorsResponse apply( + ListWorkRequestErrorsRequest request) { + return client.listWorkRequestErrors(request); + } + }, + new java.util.function.Function< + ListWorkRequestErrorsResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model.WorkRequestError>>() { + @Override + public java.util.List + apply(ListWorkRequestErrorsResponse response) { + return response.getWorkRequestErrorCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listWorkRequestLogs operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listWorkRequestLogsResponseIterator( + final ListWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListWorkRequestLogsRequest.Builder, ListWorkRequestLogsRequest, + ListWorkRequestLogsResponse>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestLogsRequest.Builder get() { + return ListWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.Builder>, + ListWorkRequestLogsRequest>() { + @Override + public ListWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>() { + @Override + public ListWorkRequestLogsResponse apply(ListWorkRequestLogsRequest request) { + return client.listWorkRequestLogs(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.WorkRequestLogEntry} objects + * contained in responses from the listWorkRequestLogs operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.WorkRequestLogEntry} objects + * contained in responses received from the service. + */ + public Iterable + listWorkRequestLogsRecordIterator(final ListWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListWorkRequestLogsRequest.Builder, ListWorkRequestLogsRequest, + ListWorkRequestLogsResponse, + com.oracle.bmc.fleetappsmanagement.model.WorkRequestLogEntry>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestLogsRequest.Builder get() { + return ListWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.Builder>, + ListWorkRequestLogsRequest>() { + @Override + public ListWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>() { + @Override + public ListWorkRequestLogsResponse apply(ListWorkRequestLogsRequest request) { + return client.listWorkRequestLogs(request); + } + }, + new java.util.function.Function< + ListWorkRequestLogsResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model.WorkRequestLogEntry>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model.WorkRequestLogEntry> + apply(ListWorkRequestLogsResponse response) { + return response.getWorkRequestLogEntryCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listWorkRequests operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listWorkRequestsResponseIterator( + final ListWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListWorkRequestsRequest.Builder, ListWorkRequestsRequest, ListWorkRequestsResponse>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestsRequest.Builder get() { + return ListWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.Builder>, + ListWorkRequestsRequest>() { + @Override + public ListWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListWorkRequestsRequest, ListWorkRequestsResponse>() { + @Override + public ListWorkRequestsResponse apply(ListWorkRequestsRequest request) { + return client.listWorkRequests(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.WorkRequestSummary} objects + * contained in responses from the listWorkRequests operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.WorkRequestSummary} objects + * contained in responses received from the service. + */ + public Iterable + listWorkRequestsRecordIterator(final ListWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListWorkRequestsRequest.Builder, ListWorkRequestsRequest, ListWorkRequestsResponse, + com.oracle.bmc.fleetappsmanagement.model.WorkRequestSummary>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestsRequest.Builder get() { + return ListWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.Builder>, + ListWorkRequestsRequest>() { + @Override + public ListWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListWorkRequestsRequest, ListWorkRequestsResponse>() { + @Override + public ListWorkRequestsResponse apply(ListWorkRequestsRequest request) { + return client.listWorkRequests(request); + } + }, + new java.util.function.Function< + ListWorkRequestsResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model.WorkRequestSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model.WorkRequestSummary> + apply(ListWorkRequestsResponse response) { + return response.getWorkRequestSummaryCollection().getItems(); + } + }); + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementRunbooks.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementRunbooks.java new file mode 100644 index 00000000000..6d539a2a23d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementRunbooks.java @@ -0,0 +1,228 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. + * + * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public interface FleetAppsManagementRunbooks extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the service. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this Region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Creates a new Runbook. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateRunbook API. + */ + CreateRunbookResponse createRunbook(CreateRunbookRequest request); + + /** + * Creates a new Task. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateTaskRecord API. + */ + CreateTaskRecordResponse createTaskRecord(CreateTaskRecordRequest request); + + /** + * Deletes a Runbook resource by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteRunbook API. + */ + DeleteRunbookResponse deleteRunbook(DeleteRunbookRequest request); + + /** + * Deletes a Task Record resource by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteTaskRecord API. + */ + DeleteTaskRecordResponse deleteTaskRecord(DeleteTaskRecordRequest request); + + /** + * Get the details of a runbook in Fleet Application Management. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetRunbook API. + */ + GetRunbookResponse getRunbook(GetRunbookRequest request); + + /** + * Gets a Task by identifier + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetTaskRecord API. + */ + GetTaskRecordResponse getTaskRecord(GetTaskRecordRequest request); + + /** + * List runbooks in Fleet Application Management. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListRunbooks API. + */ + ListRunbooksResponse listRunbooks(ListRunbooksRequest request); + + /** + * Returns a list of TaskRecords. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListTaskRecords API. + */ + ListTaskRecordsResponse listTaskRecords(ListTaskRecordsRequest request); + + /** + * Publish a Runbook. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use PublishRunbook API. + */ + PublishRunbookResponse publishRunbook(PublishRunbookRequest request); + + /** + * Publish a Runbook. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use SetDefaultRunbook API. + */ + SetDefaultRunbookResponse setDefaultRunbook(SetDefaultRunbookRequest request); + + /** + * Updates the Ronbook + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateRunbook API. + */ + UpdateRunbookResponse updateRunbook(UpdateRunbookRequest request); + + /** + * Updates the Task + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateTaskRecord API. + */ + UpdateTaskRecordResponse updateTaskRecord(UpdateTaskRecordRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + FleetAppsManagementRunbooksWaiters getWaiters(); + + /** + * Gets the pre-configured paginators available for list operations in this service which may return multiple + * pages of data. These paginators provide an {@link java.lang.Iterable} interface so that service responses, or + * resources/records, can be iterated through without having to manually deal with pagination and page tokens. + * + * @return The service paginators. + */ + FleetAppsManagementRunbooksPaginators getPaginators(); +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementRunbooksAsync.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementRunbooksAsync.java new file mode 100644 index 00000000000..9810c4cfc01 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementRunbooksAsync.java @@ -0,0 +1,247 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. + * + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public interface FleetAppsManagementRunbooksAsync extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the serice. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Creates a new Runbook. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createRunbook( + CreateRunbookRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Creates a new Task. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createTaskRecord( + CreateTaskRecordRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Deletes a Runbook resource by identifier + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteRunbook( + DeleteRunbookRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Deletes a Task Record resource by identifier + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteTaskRecord( + DeleteTaskRecordRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Get the details of a runbook in Fleet Application Management. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getRunbook( + GetRunbookRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Gets a Task by identifier + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getTaskRecord( + GetTaskRecordRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * List runbooks in Fleet Application Management. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listRunbooks( + ListRunbooksRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Returns a list of TaskRecords. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listTaskRecords( + ListTaskRecordsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Publish a Runbook. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future publishRunbook( + PublishRunbookRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Publish a Runbook. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future setDefaultRunbook( + SetDefaultRunbookRequest request, + com.oracle.bmc.responses.AsyncHandler< + SetDefaultRunbookRequest, SetDefaultRunbookResponse> + handler); + + /** + * Updates the Ronbook + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateRunbook( + UpdateRunbookRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Updates the Task + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateTaskRecord( + UpdateTaskRecordRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementRunbooksAsyncClient.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementRunbooksAsyncClient.java new file mode 100644 index 00000000000..94e39aef599 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementRunbooksAsyncClient.java @@ -0,0 +1,1032 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.internal.http.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Async client implementation for FleetAppsManagementRunbooks service.
+ * There are two ways to use async client: + * 1. Use AsyncHandler: using AsyncHandler, if the response to the call is an {@link java.io.InputStream}, like + * getObject Api in object storage service, developers need to process the stream in AsyncHandler, and not anywhere else, + * because the stream will be closed right after the AsyncHandler is invoked.
+ * 2. Use Java Future: using Java Future, developers need to close the stream after they are done with the Java Future.
+ * Accessing the result should be done in a mutually exclusive manner, either through the Future or the AsyncHandler, + * but not both. If the Future is used, the caller should pass in null as the AsyncHandler. If the AsyncHandler + * is used, it is still safe to use the Future to determine whether or not the request was completed via + * Future.isDone/isCancelled.
+ * Please refer to https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class FleetAppsManagementRunbooksAsyncClient implements FleetAppsManagementRunbooksAsync { + /** + * Service instance for FleetAppsManagementRunbooks. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("FLEETAPPSMANAGEMENTRUNBOOKS") + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://fams.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(FleetAppsManagementRunbooksAsyncClient.class); + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public FleetAppsManagementRunbooksAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public FleetAppsManagementRunbooksAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public FleetAppsManagementRunbooksAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public FleetAppsManagementRunbooksAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public FleetAppsManagementRunbooksAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public FleetAppsManagementRunbooksAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public FleetAppsManagementRunbooksAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + public FleetAppsManagementRunbooksAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.clientConfigurationToUse = configuration; + + this.refreshClient(); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder< + Builder, FleetAppsManagementRunbooksAsyncClient> { + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public FleetAppsManagementRunbooksAsyncClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new FleetAppsManagementRunbooksAsyncClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint); + } + } + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public java.util.concurrent.Future createRunbook( + CreateRunbookRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async createRunbook"); + final CreateRunbookRequest interceptedRequest = + CreateRunbookConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateRunbookConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "CreateRunbook", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + CreateRunbookConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateRunbookRequest, CreateRunbookResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateRunbookDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateRunbookRequest, CreateRunbookResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createTaskRecord( + CreateTaskRecordRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateTaskRecordRequest, CreateTaskRecordResponse> + handler) { + LOG.trace("Called async createTaskRecord"); + final CreateTaskRecordRequest interceptedRequest = + CreateTaskRecordConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateTaskRecordConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "CreateTaskRecord", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + CreateTaskRecordConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateTaskRecordRequest, CreateTaskRecordResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateTaskRecordDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateTaskRecordRequest, CreateTaskRecordResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteRunbook( + DeleteRunbookRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async deleteRunbook"); + final DeleteRunbookRequest interceptedRequest = + DeleteRunbookConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteRunbookConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "DeleteRunbook", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + DeleteRunbookConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteRunbookRequest, DeleteRunbookResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteRunbookRequest, DeleteRunbookResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteTaskRecord( + DeleteTaskRecordRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteTaskRecordRequest, DeleteTaskRecordResponse> + handler) { + LOG.trace("Called async deleteTaskRecord"); + final DeleteTaskRecordRequest interceptedRequest = + DeleteTaskRecordConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteTaskRecordConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "DeleteTaskRecord", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + DeleteTaskRecordConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteTaskRecordRequest, DeleteTaskRecordResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteTaskRecordRequest, DeleteTaskRecordResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getRunbook( + GetRunbookRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getRunbook"); + final GetRunbookRequest interceptedRequest = GetRunbookConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetRunbookConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "GetRunbook", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + GetRunbookConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetRunbookRequest, GetRunbookResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetRunbookRequest, GetRunbookResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getTaskRecord( + GetTaskRecordRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getTaskRecord"); + final GetTaskRecordRequest interceptedRequest = + GetTaskRecordConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetTaskRecordConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "GetTaskRecord", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + GetTaskRecordConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetTaskRecordRequest, GetTaskRecordResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetTaskRecordRequest, GetTaskRecordResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listRunbooks( + ListRunbooksRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listRunbooks"); + final ListRunbooksRequest interceptedRequest = + ListRunbooksConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListRunbooksConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "ListRunbooks", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListRunbooksConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListRunbooksRequest, ListRunbooksResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListRunbooksRequest, ListRunbooksResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listTaskRecords( + ListTaskRecordsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListTaskRecordsRequest, ListTaskRecordsResponse> + handler) { + LOG.trace("Called async listTaskRecords"); + final ListTaskRecordsRequest interceptedRequest = + ListTaskRecordsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListTaskRecordsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "ListTaskRecords", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListTaskRecordsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListTaskRecordsRequest, ListTaskRecordsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListTaskRecordsRequest, ListTaskRecordsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future publishRunbook( + PublishRunbookRequest request, + final com.oracle.bmc.responses.AsyncHandler< + PublishRunbookRequest, PublishRunbookResponse> + handler) { + LOG.trace("Called async publishRunbook"); + final PublishRunbookRequest interceptedRequest = + PublishRunbookConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PublishRunbookConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "PublishRunbook", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + PublishRunbookConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + PublishRunbookRequest, PublishRunbookResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getPublishRunbookDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + PublishRunbookRequest, PublishRunbookResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future setDefaultRunbook( + SetDefaultRunbookRequest request, + final com.oracle.bmc.responses.AsyncHandler< + SetDefaultRunbookRequest, SetDefaultRunbookResponse> + handler) { + LOG.trace("Called async setDefaultRunbook"); + final SetDefaultRunbookRequest interceptedRequest = + SetDefaultRunbookConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SetDefaultRunbookConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "SetDefaultRunbook", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + SetDefaultRunbookConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + SetDefaultRunbookRequest, SetDefaultRunbookResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getSetDefaultRunbookDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + SetDefaultRunbookRequest, SetDefaultRunbookResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateRunbook( + UpdateRunbookRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async updateRunbook"); + final UpdateRunbookRequest interceptedRequest = + UpdateRunbookConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateRunbookConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "UpdateRunbook", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + UpdateRunbookConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateRunbookRequest, UpdateRunbookResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateRunbookDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateRunbookRequest, UpdateRunbookResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateTaskRecord( + UpdateTaskRecordRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateTaskRecordRequest, UpdateTaskRecordResponse> + handler) { + LOG.trace("Called async updateTaskRecord"); + final UpdateTaskRecordRequest interceptedRequest = + UpdateTaskRecordConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateTaskRecordConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "UpdateTaskRecord", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + UpdateTaskRecordConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateTaskRecordRequest, UpdateTaskRecordResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateTaskRecordDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateTaskRecordRequest, UpdateTaskRecordResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementRunbooksClient.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementRunbooksClient.java new file mode 100644 index 00000000000..33ffde217a2 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementRunbooksClient.java @@ -0,0 +1,1019 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.internal.http.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration; +import com.oracle.bmc.util.CircuitBreakerUtils; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class FleetAppsManagementRunbooksClient implements FleetAppsManagementRunbooks { + /** + * Service instance for FleetAppsManagementRunbooks. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("FLEETAPPSMANAGEMENTRUNBOOKS") + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://fams.{region}.oci.{secondLevelDomain}") + .build(); + // attempt twice if it's instance principals, immediately failures will try to refresh the token + private static final int MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS = 2; + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(FleetAppsManagementRunbooksClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final FleetAppsManagementRunbooksWaiters waiters; + + private final FleetAppsManagementRunbooksPaginators paginators; + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + circuitBreakerConfiguration; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public FleetAppsManagementRunbooksClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public FleetAppsManagementRunbooksClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public FleetAppsManagementRunbooksClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public FleetAppsManagementRunbooksClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public FleetAppsManagementRunbooksClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public FleetAppsManagementRunbooksClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public FleetAppsManagementRunbooksClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + */ + public FleetAppsManagementRunbooksClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * Use the {@link Builder} to get access to all these parameters. + * + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + protected FleetAppsManagementRunbooksClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + this.restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + + this.clientConfigurationToUse = + (configuration != null) + ? configuration + : com.oracle.bmc.ClientConfiguration.builder().build(); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.retryConfiguration = clientConfigurationToUse.getRetryConfiguration(); + final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + userCircuitBreakerConfiguration = + CircuitBreakerUtils.getUserDefinedCircuitBreakerConfiguration( + configuration); + if (userCircuitBreakerConfiguration == null) { + this.circuitBreakerConfiguration = + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION; + } else { + this.circuitBreakerConfiguration = userCircuitBreakerConfiguration; + } + + this.refreshClient(); + + if (executorService == null) { + // up to 50 (core) threads, time out after 60s idle, all daemon + java.util.concurrent.ThreadPoolExecutor threadPoolExecutor = + new java.util.concurrent.ThreadPoolExecutor( + 50, + 50, + 60L, + java.util.concurrent.TimeUnit.SECONDS, + new java.util.concurrent.LinkedBlockingQueue(), + com.oracle.bmc.internal.ClientThreadFactory.builder() + .isDaemon(true) + .nameFormat("FleetAppsManagementRunbooks-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new FleetAppsManagementRunbooksWaiters(executorService, this); + + this.paginators = new FleetAppsManagementRunbooksPaginators(this); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder< + Builder, FleetAppsManagementRunbooksClient> { + private java.util.concurrent.ExecutorService executorService; + + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Set the ExecutorService for the client to be created. + * @param executorService executorService + * @return this builder + */ + public Builder executorService(java.util.concurrent.ExecutorService executorService) { + this.executorService = executorService; + return this; + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public FleetAppsManagementRunbooksClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new FleetAppsManagementRunbooksClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + restClientFactoryBuilder); + } + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, this.authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient, + null, + this.circuitBreakerConfiguration); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public CreateRunbookResponse createRunbook(CreateRunbookRequest request) { + LOG.trace("Called createRunbook"); + final CreateRunbookRequest interceptedRequest = + CreateRunbookConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateRunbookConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "CreateRunbook", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + CreateRunbookConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateRunbookDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateTaskRecordResponse createTaskRecord(CreateTaskRecordRequest request) { + LOG.trace("Called createTaskRecord"); + final CreateTaskRecordRequest interceptedRequest = + CreateTaskRecordConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateTaskRecordConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "CreateTaskRecord", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + CreateTaskRecordConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateTaskRecordDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteRunbookResponse deleteRunbook(DeleteRunbookRequest request) { + LOG.trace("Called deleteRunbook"); + final DeleteRunbookRequest interceptedRequest = + DeleteRunbookConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteRunbookConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "DeleteRunbook", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + DeleteRunbookConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteTaskRecordResponse deleteTaskRecord(DeleteTaskRecordRequest request) { + LOG.trace("Called deleteTaskRecord"); + final DeleteTaskRecordRequest interceptedRequest = + DeleteTaskRecordConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteTaskRecordConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "DeleteTaskRecord", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + DeleteTaskRecordConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetRunbookResponse getRunbook(GetRunbookRequest request) { + LOG.trace("Called getRunbook"); + final GetRunbookRequest interceptedRequest = GetRunbookConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetRunbookConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "GetRunbook", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + GetRunbookConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetTaskRecordResponse getTaskRecord(GetTaskRecordRequest request) { + LOG.trace("Called getTaskRecord"); + final GetTaskRecordRequest interceptedRequest = + GetTaskRecordConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetTaskRecordConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "GetTaskRecord", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + GetTaskRecordConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListRunbooksResponse listRunbooks(ListRunbooksRequest request) { + LOG.trace("Called listRunbooks"); + final ListRunbooksRequest interceptedRequest = + ListRunbooksConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListRunbooksConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "ListRunbooks", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + ListRunbooksConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListTaskRecordsResponse listTaskRecords(ListTaskRecordsRequest request) { + LOG.trace("Called listTaskRecords"); + final ListTaskRecordsRequest interceptedRequest = + ListTaskRecordsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListTaskRecordsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "ListTaskRecords", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListTaskRecordsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public PublishRunbookResponse publishRunbook(PublishRunbookRequest request) { + LOG.trace("Called publishRunbook"); + final PublishRunbookRequest interceptedRequest = + PublishRunbookConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PublishRunbookConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "PublishRunbook", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + PublishRunbookConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getPublishRunbookDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public SetDefaultRunbookResponse setDefaultRunbook(SetDefaultRunbookRequest request) { + LOG.trace("Called setDefaultRunbook"); + final SetDefaultRunbookRequest interceptedRequest = + SetDefaultRunbookConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SetDefaultRunbookConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "SetDefaultRunbook", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + SetDefaultRunbookConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getSetDefaultRunbookDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateRunbookResponse updateRunbook(UpdateRunbookRequest request) { + LOG.trace("Called updateRunbook"); + final UpdateRunbookRequest interceptedRequest = + UpdateRunbookConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateRunbookConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "UpdateRunbook", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + UpdateRunbookConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateRunbookDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateTaskRecordResponse updateTaskRecord(UpdateTaskRecordRequest request) { + LOG.trace("Called updateTaskRecord"); + final UpdateTaskRecordRequest interceptedRequest = + UpdateTaskRecordConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateTaskRecordConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetAppsManagementRunbooks", + "UpdateTaskRecord", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + UpdateTaskRecordConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateTaskRecordDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public FleetAppsManagementRunbooksWaiters getWaiters() { + return waiters; + } + + @Override + public FleetAppsManagementRunbooksPaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementRunbooksPaginators.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementRunbooksPaginators.java new file mode 100644 index 00000000000..09814bec86e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementRunbooksPaginators.java @@ -0,0 +1,257 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of FleetAppsManagementRunbooks where multiple pages of data may be fetched. + * Two styles of iteration are supported: + * + *

    + *
  • Iterating over the Response objects returned by the list operation. These are referred to as ResponseIterators, and the methods are suffixed with ResponseIterator. For example: listUsersResponseIterator
  • + *
  • Iterating over the resources/records being listed. These are referred to as RecordIterators, and the methods are suffixed with RecordIterator. For example: listUsersRecordIterator
  • + *
+ * + * These iterables abstract away the need to write code to manually handle pagination via looping and using the page tokens. + * They will automatically fetch more data from the service when required. + * + * As an example, if we were using the ListUsers operation in IdentityService, then the {@link java.lang.Iterable} returned by calling a + * ResponseIterator method would iterate over the ListUsersResponse objects returned by each ListUsers call, whereas the {@link java.lang.Iterable} + * returned by calling a RecordIterator method would iterate over the User records and we don't have to deal with ListUsersResponse objects at all. + * In either case, pagination will be automatically handled so we can iterate until there are no more responses or no more resources/records available. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class FleetAppsManagementRunbooksPaginators { + private final FleetAppsManagementRunbooks client; + + public FleetAppsManagementRunbooksPaginators(FleetAppsManagementRunbooks client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listRunbooks operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listRunbooksResponseIterator( + final ListRunbooksRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListRunbooksRequest.Builder, ListRunbooksRequest, ListRunbooksResponse>( + new java.util.function.Supplier() { + @Override + public ListRunbooksRequest.Builder get() { + return ListRunbooksRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListRunbooksResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListRunbooksRequest.Builder>, + ListRunbooksRequest>() { + @Override + public ListRunbooksRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListRunbooksRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListRunbooksResponse apply(ListRunbooksRequest request) { + return client.listRunbooks(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.RunbookSummary} objects + * contained in responses from the listRunbooks operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.RunbookSummary} objects + * contained in responses received from the service. + */ + public Iterable + listRunbooksRecordIterator(final ListRunbooksRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListRunbooksRequest.Builder, ListRunbooksRequest, ListRunbooksResponse, + com.oracle.bmc.fleetappsmanagement.model.RunbookSummary>( + new java.util.function.Supplier() { + @Override + public ListRunbooksRequest.Builder get() { + return ListRunbooksRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListRunbooksResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListRunbooksRequest.Builder>, + ListRunbooksRequest>() { + @Override + public ListRunbooksRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListRunbooksRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListRunbooksResponse apply(ListRunbooksRequest request) { + return client.listRunbooks(request); + } + }, + new java.util.function.Function< + ListRunbooksResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListRunbooksResponse response) { + return response.getRunbookCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listTaskRecords operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listTaskRecordsResponseIterator( + final ListTaskRecordsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListTaskRecordsRequest.Builder, ListTaskRecordsRequest, ListTaskRecordsResponse>( + new java.util.function.Supplier() { + @Override + public ListTaskRecordsRequest.Builder get() { + return ListTaskRecordsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListTaskRecordsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListTaskRecordsRequest.Builder>, + ListTaskRecordsRequest>() { + @Override + public ListTaskRecordsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListTaskRecordsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListTaskRecordsResponse apply(ListTaskRecordsRequest request) { + return client.listTaskRecords(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.TaskRecordSummary} objects + * contained in responses from the listTaskRecords operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.fleetappsmanagement.model.TaskRecordSummary} objects + * contained in responses received from the service. + */ + public Iterable + listTaskRecordsRecordIterator(final ListTaskRecordsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListTaskRecordsRequest.Builder, ListTaskRecordsRequest, ListTaskRecordsResponse, + com.oracle.bmc.fleetappsmanagement.model.TaskRecordSummary>( + new java.util.function.Supplier() { + @Override + public ListTaskRecordsRequest.Builder get() { + return ListTaskRecordsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListTaskRecordsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListTaskRecordsRequest.Builder>, + ListTaskRecordsRequest>() { + @Override + public ListTaskRecordsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListTaskRecordsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListTaskRecordsResponse apply(ListTaskRecordsRequest request) { + return client.listTaskRecords(request); + } + }, + new java.util.function.Function< + ListTaskRecordsResponse, + java.util.List< + com.oracle.bmc.fleetappsmanagement.model.TaskRecordSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.fleetappsmanagement.model.TaskRecordSummary> + apply(ListTaskRecordsResponse response) { + return response.getTaskRecordCollection().getItems(); + } + }); + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementRunbooksWaiters.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementRunbooksWaiters.java new file mode 100644 index 00000000000..67381915508 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementRunbooksWaiters.java @@ -0,0 +1,225 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of FleetAppsManagementRunbooks. + *

+ * The default configuration used is defined by {@link com.oracle.bmc.waiter.Waiters.Waiters#DEFAULT_POLLING_WAITER}. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class FleetAppsManagementRunbooksWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final FleetAppsManagementRunbooks client; + + public FleetAppsManagementRunbooksWaiters( + java.util.concurrent.ExecutorService executorService, + FleetAppsManagementRunbooks client) { + this.executorService = executorService; + this.client = client; + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forRunbook( + GetRunbookRequest request, + com.oracle.bmc.fleetappsmanagement.model.Runbook.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forRunbook( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forRunbook( + GetRunbookRequest request, + com.oracle.bmc.fleetappsmanagement.model.Runbook.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forRunbook( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forRunbook( + GetRunbookRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.fleetappsmanagement.model.Runbook.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forRunbook( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for Runbook. + private com.oracle.bmc.waiter.Waiter forRunbook( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetRunbookRequest request, + final com.oracle.bmc.fleetappsmanagement.model.Runbook.LifecycleState... targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function() { + @Override + public GetRunbookResponse apply(GetRunbookRequest request) { + return client.getRunbook(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetRunbookResponse response) { + return targetStatesSet.contains( + response.getRunbook().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.fleetappsmanagement.model.Runbook.LifecycleState + .Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forTaskRecord( + GetTaskRecordRequest request, + com.oracle.bmc.fleetappsmanagement.model.TaskRecord.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forTaskRecord( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forTaskRecord( + GetTaskRecordRequest request, + com.oracle.bmc.fleetappsmanagement.model.TaskRecord.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forTaskRecord( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forTaskRecord( + GetTaskRecordRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.fleetappsmanagement.model.TaskRecord.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forTaskRecord( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for TaskRecord. + private com.oracle.bmc.waiter.Waiter forTaskRecord( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetTaskRecordRequest request, + final com.oracle.bmc.fleetappsmanagement.model.TaskRecord.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetTaskRecordRequest, GetTaskRecordResponse>() { + @Override + public GetTaskRecordResponse apply(GetTaskRecordRequest request) { + return client.getTaskRecord(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetTaskRecordResponse response) { + return targetStatesSet.contains( + response.getTaskRecord().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.fleetappsmanagement.model.TaskRecord.LifecycleState + .Deleted)), + request); + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementWaiters.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementWaiters.java new file mode 100644 index 00000000000..4688499180b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/FleetAppsManagementWaiters.java @@ -0,0 +1,502 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of FleetAppsManagement. + *

+ * The default configuration used is defined by {@link com.oracle.bmc.waiter.Waiters.Waiters#DEFAULT_POLLING_WAITER}. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class FleetAppsManagementWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final FleetAppsManagement client; + + public FleetAppsManagementWaiters( + java.util.concurrent.ExecutorService executorService, FleetAppsManagement client) { + this.executorService = executorService; + this.client = client; + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forFleet( + GetFleetRequest request, + com.oracle.bmc.fleetappsmanagement.model.Fleet.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forFleet( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forFleet( + GetFleetRequest request, + com.oracle.bmc.fleetappsmanagement.model.Fleet.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forFleet( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forFleet( + GetFleetRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.fleetappsmanagement.model.Fleet.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forFleet( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for Fleet. + private com.oracle.bmc.waiter.Waiter forFleet( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetFleetRequest request, + final com.oracle.bmc.fleetappsmanagement.model.Fleet.LifecycleState... targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function() { + @Override + public GetFleetResponse apply(GetFleetRequest request) { + return client.getFleet(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetFleetResponse response) { + return targetStatesSet.contains( + response.getFleet().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.fleetappsmanagement.model.Fleet.LifecycleState + .Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forFleetCredential( + GetFleetCredentialRequest request, + com.oracle.bmc.fleetappsmanagement.model.FleetCredential.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forFleetCredential( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forFleetCredential( + GetFleetCredentialRequest request, + com.oracle.bmc.fleetappsmanagement.model.FleetCredential.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forFleetCredential( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forFleetCredential( + GetFleetCredentialRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.fleetappsmanagement.model.FleetCredential.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forFleetCredential( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for FleetCredential. + private com.oracle.bmc.waiter.Waiter + forFleetCredential( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetFleetCredentialRequest request, + final com.oracle.bmc.fleetappsmanagement.model.FleetCredential.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetFleetCredentialRequest, GetFleetCredentialResponse>() { + @Override + public GetFleetCredentialResponse apply( + GetFleetCredentialRequest request) { + return client.getFleetCredential(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetFleetCredentialResponse response) { + return targetStatesSet.contains( + response.getFleetCredential().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.fleetappsmanagement.model.FleetCredential + .LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forFleetProperty( + GetFleetPropertyRequest request, + com.oracle.bmc.fleetappsmanagement.model.FleetProperty.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forFleetProperty( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forFleetProperty( + GetFleetPropertyRequest request, + com.oracle.bmc.fleetappsmanagement.model.FleetProperty.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forFleetProperty( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forFleetProperty( + GetFleetPropertyRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.fleetappsmanagement.model.FleetProperty.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forFleetProperty( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for FleetProperty. + private com.oracle.bmc.waiter.Waiter + forFleetProperty( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetFleetPropertyRequest request, + final com.oracle.bmc.fleetappsmanagement.model.FleetProperty.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetFleetPropertyRequest, GetFleetPropertyResponse>() { + @Override + public GetFleetPropertyResponse apply(GetFleetPropertyRequest request) { + return client.getFleetProperty(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetFleetPropertyResponse response) { + return targetStatesSet.contains( + response.getFleetProperty().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.fleetappsmanagement.model.FleetProperty + .LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forFleetResource( + GetFleetResourceRequest request, + com.oracle.bmc.fleetappsmanagement.model.FleetResource.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forFleetResource( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forFleetResource( + GetFleetResourceRequest request, + com.oracle.bmc.fleetappsmanagement.model.FleetResource.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forFleetResource( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forFleetResource( + GetFleetResourceRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.fleetappsmanagement.model.FleetResource.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forFleetResource( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for FleetResource. + private com.oracle.bmc.waiter.Waiter + forFleetResource( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetFleetResourceRequest request, + final com.oracle.bmc.fleetappsmanagement.model.FleetResource.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetFleetResourceRequest, GetFleetResourceResponse>() { + @Override + public GetFleetResourceResponse apply(GetFleetResourceRequest request) { + return client.getFleetResource(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetFleetResourceResponse response) { + return targetStatesSet.contains( + response.getFleetResource().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.fleetappsmanagement.model.FleetResource + .LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using default configuration. + * + * @param request the request to send + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forWorkRequest(GetWorkRequestRequest request) { + return forWorkRequest(com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@linkcom.oracle.bmc.waiter. DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forWorkRequest( + GetWorkRequestRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + return forWorkRequest( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request); + } + + // Helper method to create a new Waiter for WorkRequest. + private com.oracle.bmc.waiter.Waiter + forWorkRequest( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetWorkRequestRequest request) { + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetWorkRequestRequest, GetWorkRequestResponse>() { + @Override + public GetWorkRequestResponse apply(GetWorkRequestRequest request) { + return client.getWorkRequest(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetWorkRequestResponse response) { + // work requests are complete once the time finished is available + return response.getWorkRequest().getTimeFinished() != null; + } + }, + false), + request); + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/SdkClientsMetadata.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/SdkClientsMetadata.java new file mode 100644 index 00000000000..595a961767b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/SdkClientsMetadata.java @@ -0,0 +1,22 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement; + +import com.oracle.bmc.SdkClients; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@SdkClients({ + FleetAppsManagementAdminAsyncClient.class, + FleetAppsManagementAdminClient.class, + FleetAppsManagementAsyncClient.class, + FleetAppsManagementClient.class, + FleetAppsManagementMaintenanceWindowAsyncClient.class, + FleetAppsManagementMaintenanceWindowClient.class, + FleetAppsManagementOperationsAsyncClient.class, + FleetAppsManagementOperationsClient.class, + FleetAppsManagementRunbooksAsyncClient.class, + FleetAppsManagementRunbooksClient.class +}) +public final class SdkClientsMetadata {} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CheckResourceTaggingConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CheckResourceTaggingConverter.java new file mode 100644 index 00000000000..08e17654aa4 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CheckResourceTaggingConverter.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CheckResourceTaggingConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CheckResourceTaggingConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.CheckResourceTaggingRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.CheckResourceTaggingRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.CheckResourceTaggingRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCheckResourceTaggingDetails(), + "checkResourceTaggingDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path("actions") + .path("checkResourceTagging"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CheckResourceTaggingResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CheckResourceTaggingResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CheckResourceTaggingResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .CheckResourceTaggingResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .CheckResourceTaggingResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.CheckResourceTaggingResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .ResourceTagCheckDetails>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .ResourceTagCheckDetails + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .ResourceTagCheckDetails + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .ResourceTagCheckDetails> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .CheckResourceTaggingResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .CheckResourceTaggingResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.resourceTagCheckDetails(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .CheckResourceTaggingResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ConfirmTargetsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ConfirmTargetsConverter.java new file mode 100644 index 00000000000..f50d2405940 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ConfirmTargetsConverter.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ConfirmTargetsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ConfirmTargetsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ConfirmTargetsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ConfirmTargetsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ConfirmTargetsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getConfirmTargetsDetails(), "confirmTargetsDetails is required"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("actions") + .path("confirmTargets"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ConfirmTargetsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ConfirmTargetsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ConfirmTargetsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ConfirmTargetsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ConfirmTargetsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ConfirmTargetsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.ConfirmTargetsResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ConfirmTargetsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.ConfirmTargetsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateCompliancePolicyRuleConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateCompliancePolicyRuleConverter.java new file mode 100644 index 00000000000..c920bd0d580 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateCompliancePolicyRuleConverter.java @@ -0,0 +1,187 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateCompliancePolicyRuleConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateCompliancePolicyRuleConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.CreateCompliancePolicyRuleRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.CreateCompliancePolicyRuleRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.CreateCompliancePolicyRuleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateCompliancePolicyRuleDetails(), + "createCompliancePolicyRuleDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("compliancePolicyRules"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateCompliancePolicyRuleResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateCompliancePolicyRuleResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .CreateCompliancePolicyRuleResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .CreateCompliancePolicyRuleResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .CreateCompliancePolicyRuleResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.CreateCompliancePolicyRuleResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicyRule>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicyRule + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicyRule + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicyRule> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .CreateCompliancePolicyRuleResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .CreateCompliancePolicyRuleResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.compliancePolicyRule(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .CreateCompliancePolicyRuleResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateFleetConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateFleetConverter.java new file mode 100644 index 00000000000..93b3c7ef9b4 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateFleetConverter.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateFleetConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateFleetConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.CreateFleetRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.CreateFleetRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.CreateFleetRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCreateFleetDetails(), "createFleetDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("fleets"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateFleetResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateFleetResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateFleetResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .CreateFleetResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses.CreateFleetResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.CreateFleetResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .Fleet>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model.Fleet + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model.Fleet + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model.Fleet> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.CreateFleetResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .CreateFleetResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.fleet(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.CreateFleetResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateFleetCredentialConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateFleetCredentialConverter.java new file mode 100644 index 00000000000..3d8191466ce --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateFleetCredentialConverter.java @@ -0,0 +1,192 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateFleetCredentialConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateFleetCredentialConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.CreateFleetCredentialRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.CreateFleetCredentialRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.CreateFleetCredentialRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateFleetCredentialDetails(), + "createFleetCredentialDetails is required"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("fleetCredentials"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateFleetCredentialResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateFleetCredentialResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateFleetCredentialResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .CreateFleetCredentialResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .CreateFleetCredentialResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.CreateFleetCredentialResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetCredential>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetCredential + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetCredential + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetCredential> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .CreateFleetCredentialResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .CreateFleetCredentialResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.fleetCredential(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .CreateFleetCredentialResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateFleetPropertyConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateFleetPropertyConverter.java new file mode 100644 index 00000000000..9bbaa349fce --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateFleetPropertyConverter.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateFleetPropertyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateFleetPropertyConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.CreateFleetPropertyRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.CreateFleetPropertyRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.CreateFleetPropertyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateFleetPropertyDetails(), "createFleetPropertyDetails is required"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("fleetProperties"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateFleetPropertyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateFleetPropertyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateFleetPropertyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .CreateFleetPropertyResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .CreateFleetPropertyResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.CreateFleetPropertyResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetProperty>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetProperty + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetProperty + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetProperty> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .CreateFleetPropertyResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .CreateFleetPropertyResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.fleetProperty(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .CreateFleetPropertyResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateFleetResourceConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateFleetResourceConverter.java new file mode 100644 index 00000000000..847d9d82462 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateFleetResourceConverter.java @@ -0,0 +1,191 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateFleetResourceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateFleetResourceConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.CreateFleetResourceRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.CreateFleetResourceRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.CreateFleetResourceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateFleetResourceDetails(), "createFleetResourceDetails is required"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("fleetResources"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateFleetResourceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateFleetResourceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateFleetResourceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .CreateFleetResourceResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .CreateFleetResourceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.CreateFleetResourceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetResource>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetResource + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetResource + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetResource> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .CreateFleetResourceResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .CreateFleetResourceResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.fleetResource(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .CreateFleetResourceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateMaintenanceWindowConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateMaintenanceWindowConverter.java new file mode 100644 index 00000000000..e005302cbd6 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateMaintenanceWindowConverter.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateMaintenanceWindowConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateMaintenanceWindowConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.CreateMaintenanceWindowRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.CreateMaintenanceWindowRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.CreateMaintenanceWindowRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateMaintenanceWindowDetails(), + "createMaintenanceWindowDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("maintenanceWindows"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateMaintenanceWindowResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateMaintenanceWindowResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .CreateMaintenanceWindowResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .CreateMaintenanceWindowResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .CreateMaintenanceWindowResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.CreateMaintenanceWindowResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .MaintenanceWindow>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .MaintenanceWindow + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .MaintenanceWindow + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .MaintenanceWindow> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .CreateMaintenanceWindowResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .CreateMaintenanceWindowResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.maintenanceWindow(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .CreateMaintenanceWindowResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateOnboardingConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateOnboardingConverter.java new file mode 100644 index 00000000000..a96495649a3 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateOnboardingConverter.java @@ -0,0 +1,182 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateOnboardingConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateOnboardingConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.CreateOnboardingRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.CreateOnboardingRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.CreateOnboardingRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateOnboardingDetails(), "createOnboardingDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("Onboardings"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateOnboardingResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateOnboardingResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateOnboardingResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .CreateOnboardingResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .CreateOnboardingResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.CreateOnboardingResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .Onboarding>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .Onboarding + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .Onboarding + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model.Onboarding> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .CreateOnboardingResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .CreateOnboardingResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.onboarding(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .CreateOnboardingResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreatePatchConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreatePatchConverter.java new file mode 100644 index 00000000000..14927c901af --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreatePatchConverter.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreatePatchConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreatePatchConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.CreatePatchRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.CreatePatchRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.CreatePatchRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCreatePatchDetails(), "createPatchDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("patches"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreatePatchResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreatePatchResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreatePatchResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .CreatePatchResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses.CreatePatchResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.CreatePatchResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .Patch>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model.Patch + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model.Patch + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model.Patch> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.CreatePatchResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .CreatePatchResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.patch(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.CreatePatchResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreatePlatformConfigurationConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreatePlatformConfigurationConverter.java new file mode 100644 index 00000000000..929f383714f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreatePlatformConfigurationConverter.java @@ -0,0 +1,157 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreatePlatformConfigurationConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreatePlatformConfigurationConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.CreatePlatformConfigurationRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.CreatePlatformConfigurationRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.CreatePlatformConfigurationRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreatePlatformConfigurationDetails(), + "createPlatformConfigurationDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("platformConfigurations"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .CreatePlatformConfigurationResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .CreatePlatformConfigurationResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .CreatePlatformConfigurationResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .CreatePlatformConfigurationResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .CreatePlatformConfigurationResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.CreatePlatformConfigurationResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .PlatformConfiguration>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .PlatformConfiguration + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .PlatformConfiguration + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .PlatformConfiguration> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .CreatePlatformConfigurationResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .CreatePlatformConfigurationResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.platformConfiguration(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .CreatePlatformConfigurationResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreatePropertyConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreatePropertyConverter.java new file mode 100644 index 00000000000..cf11ac82ad1 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreatePropertyConverter.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreatePropertyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreatePropertyConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.CreatePropertyRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.CreatePropertyRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.CreatePropertyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCreatePropertyDetails(), "createPropertyDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("properties"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreatePropertyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreatePropertyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreatePropertyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .CreatePropertyResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .CreatePropertyResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.CreatePropertyResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .Property>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .Property + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .Property + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model.Property> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.CreatePropertyResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .CreatePropertyResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.property(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.CreatePropertyResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateRunbookConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateRunbookConverter.java new file mode 100644 index 00000000000..ab9ad28ae81 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateRunbookConverter.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateRunbookConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateRunbookConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.CreateRunbookRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.CreateRunbookRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.CreateRunbookRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCreateRunbookDetails(), "createRunbookDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("runbooks"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateRunbookResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateRunbookResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateRunbookResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .CreateRunbookResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .CreateRunbookResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.CreateRunbookResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .Runbook>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model.Runbook + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model.Runbook + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model.Runbook> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.CreateRunbookResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .CreateRunbookResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.runbook(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.CreateRunbookResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateSchedulerDefinitionConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateSchedulerDefinitionConverter.java new file mode 100644 index 00000000000..d856d8db820 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateSchedulerDefinitionConverter.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateSchedulerDefinitionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateSchedulerDefinitionConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.CreateSchedulerDefinitionRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.CreateSchedulerDefinitionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.CreateSchedulerDefinitionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateSchedulerDefinitionDetails(), + "createSchedulerDefinitionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("schedulerDefinitions"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateSchedulerDefinitionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateSchedulerDefinitionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .CreateSchedulerDefinitionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .CreateSchedulerDefinitionResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .CreateSchedulerDefinitionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.CreateSchedulerDefinitionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .SchedulerDefinition>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .SchedulerDefinition + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .SchedulerDefinition + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .SchedulerDefinition> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .CreateSchedulerDefinitionResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .CreateSchedulerDefinitionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.schedulerDefinition(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .CreateSchedulerDefinitionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateTaskRecordConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateTaskRecordConverter.java new file mode 100644 index 00000000000..a0024ffe11f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/CreateTaskRecordConverter.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateTaskRecordConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateTaskRecordConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.CreateTaskRecordRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.CreateTaskRecordRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.CreateTaskRecordRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateTaskRecordDetails(), "createTaskRecordDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("taskRecords"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateTaskRecordResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateTaskRecordResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.CreateTaskRecordResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .CreateTaskRecordResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .CreateTaskRecordResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.CreateTaskRecordResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .TaskRecord>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .TaskRecord + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .TaskRecord + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model.TaskRecord> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .CreateTaskRecordResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .CreateTaskRecordResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.taskRecord(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .CreateTaskRecordResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteCompliancePolicyRuleConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteCompliancePolicyRuleConverter.java new file mode 100644 index 00000000000..27e9140cede --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteCompliancePolicyRuleConverter.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteCompliancePolicyRuleConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteCompliancePolicyRuleConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.DeleteCompliancePolicyRuleRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.DeleteCompliancePolicyRuleRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.DeleteCompliancePolicyRuleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getCompliancePolicyRuleId(), "compliancePolicyRuleId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("compliancePolicyRules") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCompliancePolicyRuleId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteCompliancePolicyRuleResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteCompliancePolicyRuleResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .DeleteCompliancePolicyRuleResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .DeleteCompliancePolicyRuleResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .DeleteCompliancePolicyRuleResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.DeleteCompliancePolicyRuleResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .DeleteCompliancePolicyRuleResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .DeleteCompliancePolicyRuleResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .DeleteCompliancePolicyRuleResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteFleetConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteFleetConverter.java new file mode 100644 index 00000000000..6760c890fbb --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteFleetConverter.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteFleetConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteFleetConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.DeleteFleetRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.DeleteFleetRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.DeleteFleetRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteFleetResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteFleetResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteFleetResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .DeleteFleetResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses.DeleteFleetResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.DeleteFleetResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.DeleteFleetResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .DeleteFleetResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.DeleteFleetResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteFleetCredentialConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteFleetCredentialConverter.java new file mode 100644 index 00000000000..9fd31a9a606 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteFleetCredentialConverter.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteFleetCredentialConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteFleetCredentialConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.DeleteFleetCredentialRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.DeleteFleetCredentialRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.DeleteFleetCredentialRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetCredentialId(), "fleetCredentialId must not be blank"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("fleetCredentials") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetCredentialId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteFleetCredentialResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteFleetCredentialResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteFleetCredentialResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .DeleteFleetCredentialResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .DeleteFleetCredentialResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.DeleteFleetCredentialResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .DeleteFleetCredentialResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .DeleteFleetCredentialResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .DeleteFleetCredentialResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteFleetPropertyConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteFleetPropertyConverter.java new file mode 100644 index 00000000000..11144ae61c9 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteFleetPropertyConverter.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteFleetPropertyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteFleetPropertyConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.DeleteFleetPropertyRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.DeleteFleetPropertyRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.DeleteFleetPropertyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetPropertyId(), "fleetPropertyId must not be blank"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("fleetProperties") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetPropertyId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteFleetPropertyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteFleetPropertyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteFleetPropertyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .DeleteFleetPropertyResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .DeleteFleetPropertyResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.DeleteFleetPropertyResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .DeleteFleetPropertyResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .DeleteFleetPropertyResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .DeleteFleetPropertyResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteFleetResourceConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteFleetResourceConverter.java new file mode 100644 index 00000000000..fb7314731b1 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteFleetResourceConverter.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteFleetResourceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteFleetResourceConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.DeleteFleetResourceRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.DeleteFleetResourceRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.DeleteFleetResourceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetResourceId(), "fleetResourceId must not be blank"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("fleetResources") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetResourceId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteFleetResourceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteFleetResourceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteFleetResourceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .DeleteFleetResourceResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .DeleteFleetResourceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.DeleteFleetResourceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .DeleteFleetResourceResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .DeleteFleetResourceResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .DeleteFleetResourceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteMaintenanceWindowConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteMaintenanceWindowConverter.java new file mode 100644 index 00000000000..1c3e1f701ec --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteMaintenanceWindowConverter.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteMaintenanceWindowConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteMaintenanceWindowConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.DeleteMaintenanceWindowRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.DeleteMaintenanceWindowRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.DeleteMaintenanceWindowRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getMaintenanceWindowId(), "maintenanceWindowId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("maintenanceWindows") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMaintenanceWindowId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteMaintenanceWindowResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteMaintenanceWindowResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .DeleteMaintenanceWindowResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .DeleteMaintenanceWindowResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .DeleteMaintenanceWindowResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.DeleteMaintenanceWindowResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .DeleteMaintenanceWindowResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .DeleteMaintenanceWindowResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .DeleteMaintenanceWindowResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteOnboardingConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteOnboardingConverter.java new file mode 100644 index 00000000000..da56b1d3286 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteOnboardingConverter.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteOnboardingConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteOnboardingConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.DeleteOnboardingRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.DeleteOnboardingRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.DeleteOnboardingRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOnboardingId(), "onboardingId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("Onboardings") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOnboardingId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteOnboardingResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteOnboardingResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteOnboardingResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .DeleteOnboardingResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .DeleteOnboardingResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.DeleteOnboardingResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .DeleteOnboardingResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .DeleteOnboardingResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .DeleteOnboardingResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeletePatchConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeletePatchConverter.java new file mode 100644 index 00000000000..acfb862aa70 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeletePatchConverter.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeletePatchConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeletePatchConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.DeletePatchRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.DeletePatchRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.DeletePatchRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPatchId(), "patchId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("patches") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPatchId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeletePatchResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeletePatchResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeletePatchResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .DeletePatchResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses.DeletePatchResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.DeletePatchResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.DeletePatchResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .DeletePatchResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.DeletePatchResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeletePlatformConfigurationConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeletePlatformConfigurationConverter.java new file mode 100644 index 00000000000..c00d20ee51c --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeletePlatformConfigurationConverter.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeletePlatformConfigurationConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeletePlatformConfigurationConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.DeletePlatformConfigurationRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.DeletePlatformConfigurationRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.DeletePlatformConfigurationRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getPlatformConfigurationId(), "platformConfigurationId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("platformConfigurations") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPlatformConfigurationId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .DeletePlatformConfigurationResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .DeletePlatformConfigurationResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .DeletePlatformConfigurationResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .DeletePlatformConfigurationResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .DeletePlatformConfigurationResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.DeletePlatformConfigurationResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .DeletePlatformConfigurationResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .DeletePlatformConfigurationResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .DeletePlatformConfigurationResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeletePropertyConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeletePropertyConverter.java new file mode 100644 index 00000000000..dafe1632cf8 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeletePropertyConverter.java @@ -0,0 +1,131 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeletePropertyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeletePropertyConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.DeletePropertyRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.DeletePropertyRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.DeletePropertyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPropertyId(), "propertyId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("properties") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPropertyId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeletePropertyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeletePropertyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeletePropertyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .DeletePropertyResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .DeletePropertyResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.DeletePropertyResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.DeletePropertyResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .DeletePropertyResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.DeletePropertyResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteRunbookConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteRunbookConverter.java new file mode 100644 index 00000000000..05ebc705cda --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteRunbookConverter.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteRunbookConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteRunbookConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.DeleteRunbookRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.DeleteRunbookRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.DeleteRunbookRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getRunbookId(), "runbookId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("runbooks") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRunbookId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteRunbookResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteRunbookResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteRunbookResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .DeleteRunbookResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .DeleteRunbookResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.DeleteRunbookResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.DeleteRunbookResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .DeleteRunbookResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.DeleteRunbookResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteSchedulerDefinitionConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteSchedulerDefinitionConverter.java new file mode 100644 index 00000000000..1affed94bbf --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteSchedulerDefinitionConverter.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteSchedulerDefinitionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteSchedulerDefinitionConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.DeleteSchedulerDefinitionRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.DeleteSchedulerDefinitionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.DeleteSchedulerDefinitionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSchedulerDefinitionId(), "schedulerDefinitionId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("schedulerDefinitions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulerDefinitionId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteSchedulerDefinitionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteSchedulerDefinitionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .DeleteSchedulerDefinitionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .DeleteSchedulerDefinitionResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .DeleteSchedulerDefinitionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.DeleteSchedulerDefinitionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .DeleteSchedulerDefinitionResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .DeleteSchedulerDefinitionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .DeleteSchedulerDefinitionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteSchedulerJobConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteSchedulerJobConverter.java new file mode 100644 index 00000000000..696b65a6681 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteSchedulerJobConverter.java @@ -0,0 +1,132 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteSchedulerJobConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteSchedulerJobConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.DeleteSchedulerJobRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.DeleteSchedulerJobRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.DeleteSchedulerJobRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSchedulerJobId(), "schedulerJobId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("schedulerJobs") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulerJobId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteSchedulerJobResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteSchedulerJobResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteSchedulerJobResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .DeleteSchedulerJobResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .DeleteSchedulerJobResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.DeleteSchedulerJobResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .DeleteSchedulerJobResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .DeleteSchedulerJobResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .DeleteSchedulerJobResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteTaskRecordConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteTaskRecordConverter.java new file mode 100644 index 00000000000..42d9e180602 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/DeleteTaskRecordConverter.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteTaskRecordConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteTaskRecordConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.DeleteTaskRecordRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.DeleteTaskRecordRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.DeleteTaskRecordRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getTaskRecordId(), "taskRecordId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("taskRecords") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getTaskRecordId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteTaskRecordResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteTaskRecordResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.DeleteTaskRecordResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .DeleteTaskRecordResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .DeleteTaskRecordResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.DeleteTaskRecordResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .DeleteTaskRecordResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .DeleteTaskRecordResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .DeleteTaskRecordResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/EnableLatestPolicyConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/EnableLatestPolicyConverter.java new file mode 100644 index 00000000000..eff8c6bb74d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/EnableLatestPolicyConverter.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class EnableLatestPolicyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(EnableLatestPolicyConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.EnableLatestPolicyRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.EnableLatestPolicyRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.EnableLatestPolicyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOnboardingId(), "onboardingId must not be blank"); + Validate.notNull( + request.getEnableLatestPolicyDetails(), "enableLatestPolicyDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("Onboardings") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOnboardingId())) + .path("actions") + .path("enableLatestPolicy"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.EnableLatestPolicyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.EnableLatestPolicyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.EnableLatestPolicyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .EnableLatestPolicyResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .EnableLatestPolicyResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.EnableLatestPolicyResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .EnableLatestPolicyResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .EnableLatestPolicyResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .EnableLatestPolicyResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ExportComplianceReportConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ExportComplianceReportConverter.java new file mode 100644 index 00000000000..8943978f788 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ExportComplianceReportConverter.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ExportComplianceReportConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ExportComplianceReportConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ExportComplianceReportRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ExportComplianceReportRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ExportComplianceReportRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getExportComplianceReportDetails(), + "exportComplianceReportDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("complianceRecords") + .path("actions") + .path("exportComplianceReport"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ExportComplianceReportResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ExportComplianceReportResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ExportComplianceReportResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ExportComplianceReportResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ExportComplianceReportResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ExportComplianceReportResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.io.InputStream>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + java.io.InputStream.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + java.io.InputStream.class); + } + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ExportComplianceReportResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ExportComplianceReportResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.inputStream(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLengthHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-length"); + if (contentLengthHeader.isPresent()) { + builder.contentLength( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-length", + contentLengthHeader.get().get(0), + Long.class)); + } + + java.util.Optional> contentTypeHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-type"); + if (contentTypeHeader.isPresent()) { + builder.contentType( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-type", + contentTypeHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ExportComplianceReportResponse + responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GenerateComplianceReportConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GenerateComplianceReportConverter.java new file mode 100644 index 00000000000..26e530d86a0 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GenerateComplianceReportConverter.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GenerateComplianceReportConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GenerateComplianceReportConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.GenerateComplianceReportRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.GenerateComplianceReportRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.GenerateComplianceReportRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getGenerateComplianceReportDetails(), + "generateComplianceReportDetails is required"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("actions") + .path("generateComplianceReport"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GenerateComplianceReportResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GenerateComplianceReportResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .GenerateComplianceReportResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .GenerateComplianceReportResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .GenerateComplianceReportResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.GenerateComplianceReportResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .GenerateComplianceReportResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .GenerateComplianceReportResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .GenerateComplianceReportResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetCompliancePolicyConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetCompliancePolicyConverter.java new file mode 100644 index 00000000000..e56370394d3 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetCompliancePolicyConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetCompliancePolicyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetCompliancePolicyConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.GetCompliancePolicyRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.GetCompliancePolicyRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.GetCompliancePolicyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getCompliancePolicyId(), "compliancePolicyId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("compliancePolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCompliancePolicyId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetCompliancePolicyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetCompliancePolicyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetCompliancePolicyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .GetCompliancePolicyResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .GetCompliancePolicyResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.GetCompliancePolicyResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicy>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicy + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicy + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicy> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .GetCompliancePolicyResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .GetCompliancePolicyResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.compliancePolicy(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .GetCompliancePolicyResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetCompliancePolicyRuleConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetCompliancePolicyRuleConverter.java new file mode 100644 index 00000000000..aa341187f01 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetCompliancePolicyRuleConverter.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetCompliancePolicyRuleConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetCompliancePolicyRuleConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.GetCompliancePolicyRuleRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.GetCompliancePolicyRuleRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.GetCompliancePolicyRuleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getCompliancePolicyRuleId(), "compliancePolicyRuleId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("compliancePolicyRules") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCompliancePolicyRuleId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetCompliancePolicyRuleResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetCompliancePolicyRuleResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .GetCompliancePolicyRuleResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .GetCompliancePolicyRuleResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .GetCompliancePolicyRuleResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.GetCompliancePolicyRuleResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicyRule>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicyRule + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicyRule + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicyRule> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .GetCompliancePolicyRuleResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .GetCompliancePolicyRuleResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.compliancePolicyRule(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .GetCompliancePolicyRuleResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetComplianceReportConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetComplianceReportConverter.java new file mode 100644 index 00000000000..fdc09f7d83f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetComplianceReportConverter.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetComplianceReportConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetComplianceReportConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.GetComplianceReportRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.GetComplianceReportRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.GetComplianceReportRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + Validate.notBlank(request.getComplianceReportId(), "complianceReportId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("complianceReports") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getComplianceReportId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetComplianceReportResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetComplianceReportResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetComplianceReportResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .GetComplianceReportResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .GetComplianceReportResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.GetComplianceReportResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .ComplianceReport>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .ComplianceReport + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .ComplianceReport + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .ComplianceReport> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .GetComplianceReportResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .GetComplianceReportResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.complianceReport(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .GetComplianceReportResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetExecutionConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetExecutionConverter.java new file mode 100644 index 00000000000..f71e9cf2a4f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetExecutionConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetExecutionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetExecutionConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.GetExecutionRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.GetExecutionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.GetExecutionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSchedulerJobId(), "schedulerJobId must not be blank"); + Validate.notBlank(request.getJobActivityId(), "jobActivityId must not be blank"); + Validate.notBlank(request.getResourceId(), "resourceId must not be blank"); + Validate.notBlank(request.getExecutionId(), "executionId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("schedulerJobs") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulerJobId())) + .path("jobActivities") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getJobActivityId())) + .path("resources") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getResourceId())) + .path("executions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getExecutionId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetExecutionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetExecutionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetExecutionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .GetExecutionResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses.GetExecutionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.GetExecutionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .Execution>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .Execution + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .Execution + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model.Execution> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.GetExecutionResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .GetExecutionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.execution(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.GetExecutionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetFleetConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetFleetConverter.java new file mode 100644 index 00000000000..714f3aa5701 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetFleetConverter.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetFleetConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetFleetConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.GetFleetRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.GetFleetRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.GetFleetRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetFleetResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetFleetResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetFleetResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetFleetResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses.GetFleetResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.GetFleetResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .Fleet>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model.Fleet + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model.Fleet + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model.Fleet> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.GetFleetResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .GetFleetResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.fleet(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.GetFleetResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetFleetCredentialConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetFleetCredentialConverter.java new file mode 100644 index 00000000000..867d4509bb7 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetFleetCredentialConverter.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetFleetCredentialConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetFleetCredentialConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.GetFleetCredentialRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.GetFleetCredentialRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.GetFleetCredentialRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetCredentialId(), "fleetCredentialId must not be blank"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("fleetCredentials") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetCredentialId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetFleetCredentialResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetFleetCredentialResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetFleetCredentialResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .GetFleetCredentialResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .GetFleetCredentialResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.GetFleetCredentialResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetCredential>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetCredential + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetCredential + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetCredential> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .GetFleetCredentialResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .GetFleetCredentialResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.fleetCredential(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .GetFleetCredentialResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetFleetPropertyConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetFleetPropertyConverter.java new file mode 100644 index 00000000000..a0aee334eb9 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetFleetPropertyConverter.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetFleetPropertyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetFleetPropertyConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.GetFleetPropertyRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.GetFleetPropertyRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.GetFleetPropertyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetPropertyId(), "fleetPropertyId must not be blank"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("fleetProperties") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetPropertyId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetFleetPropertyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetFleetPropertyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetFleetPropertyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .GetFleetPropertyResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .GetFleetPropertyResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.GetFleetPropertyResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetProperty>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetProperty + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetProperty + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetProperty> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .GetFleetPropertyResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .GetFleetPropertyResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.fleetProperty(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .GetFleetPropertyResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetFleetResourceConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetFleetResourceConverter.java new file mode 100644 index 00000000000..969507735fe --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetFleetResourceConverter.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetFleetResourceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetFleetResourceConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.GetFleetResourceRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.GetFleetResourceRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.GetFleetResourceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetResourceId(), "fleetResourceId must not be blank"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("fleetResources") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetResourceId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetFleetResourceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetFleetResourceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetFleetResourceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .GetFleetResourceResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .GetFleetResourceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.GetFleetResourceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetResource>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetResource + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetResource + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetResource> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .GetFleetResourceResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .GetFleetResourceResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.fleetResource(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .GetFleetResourceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetJobActivityConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetJobActivityConverter.java new file mode 100644 index 00000000000..28d42b2d9e7 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetJobActivityConverter.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetJobActivityConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetJobActivityConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.GetJobActivityRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.GetJobActivityRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.GetJobActivityRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSchedulerJobId(), "schedulerJobId must not be blank"); + Validate.notBlank(request.getJobActivityId(), "jobActivityId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("schedulerJobs") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulerJobId())) + .path("jobActivities") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getJobActivityId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetJobActivityResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetJobActivityResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetJobActivityResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .GetJobActivityResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .GetJobActivityResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.GetJobActivityResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .JobActivity>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .JobActivity + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .JobActivity + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .JobActivity> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.GetJobActivityResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .GetJobActivityResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.jobActivity(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.GetJobActivityResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetMaintenanceWindowConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetMaintenanceWindowConverter.java new file mode 100644 index 00000000000..84e523c57d1 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetMaintenanceWindowConverter.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetMaintenanceWindowConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetMaintenanceWindowConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.GetMaintenanceWindowRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.GetMaintenanceWindowRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.GetMaintenanceWindowRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getMaintenanceWindowId(), "maintenanceWindowId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("maintenanceWindows") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMaintenanceWindowId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetMaintenanceWindowResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetMaintenanceWindowResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetMaintenanceWindowResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .GetMaintenanceWindowResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .GetMaintenanceWindowResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.GetMaintenanceWindowResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .MaintenanceWindow>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .MaintenanceWindow + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .MaintenanceWindow + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .MaintenanceWindow> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .GetMaintenanceWindowResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .GetMaintenanceWindowResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.maintenanceWindow(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .GetMaintenanceWindowResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetOnboardingConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetOnboardingConverter.java new file mode 100644 index 00000000000..2bf31b912d9 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetOnboardingConverter.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetOnboardingConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetOnboardingConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.GetOnboardingRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.GetOnboardingRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.GetOnboardingRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOnboardingId(), "onboardingId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("Onboardings") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOnboardingId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetOnboardingResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetOnboardingResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetOnboardingResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .GetOnboardingResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .GetOnboardingResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.GetOnboardingResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .Onboarding>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .Onboarding + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .Onboarding + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model.Onboarding> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.GetOnboardingResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .GetOnboardingResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.onboarding(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.GetOnboardingResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetPatchConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetPatchConverter.java new file mode 100644 index 00000000000..2411e22a70b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetPatchConverter.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetPatchConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetPatchConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.GetPatchRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.GetPatchRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.GetPatchRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPatchId(), "patchId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("patches") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPatchId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetPatchResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetPatchResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetPatchResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetPatchResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses.GetPatchResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.GetPatchResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .Patch>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model.Patch + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model.Patch + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model.Patch> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.GetPatchResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .GetPatchResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.patch(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.GetPatchResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetPlatformConfigurationConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetPlatformConfigurationConverter.java new file mode 100644 index 00000000000..8e1d71fa51f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetPlatformConfigurationConverter.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetPlatformConfigurationConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetPlatformConfigurationConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.GetPlatformConfigurationRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.GetPlatformConfigurationRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.GetPlatformConfigurationRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getPlatformConfigurationId(), "platformConfigurationId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("platformConfigurations") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPlatformConfigurationId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetPlatformConfigurationResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetPlatformConfigurationResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .GetPlatformConfigurationResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .GetPlatformConfigurationResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .GetPlatformConfigurationResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.GetPlatformConfigurationResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .PlatformConfiguration>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .PlatformConfiguration + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .PlatformConfiguration + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .PlatformConfiguration> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .GetPlatformConfigurationResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .GetPlatformConfigurationResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.platformConfiguration(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .GetPlatformConfigurationResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetPropertyConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetPropertyConverter.java new file mode 100644 index 00000000000..5247869a618 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetPropertyConverter.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetPropertyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetPropertyConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.GetPropertyRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.GetPropertyRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.GetPropertyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPropertyId(), "propertyId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("properties") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPropertyId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetPropertyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetPropertyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetPropertyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .GetPropertyResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses.GetPropertyResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.GetPropertyResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .Property>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .Property + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .Property + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model.Property> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.GetPropertyResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .GetPropertyResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.property(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.GetPropertyResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetRunbookConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetRunbookConverter.java new file mode 100644 index 00000000000..8677fac4c69 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetRunbookConverter.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetRunbookConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetRunbookConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.GetRunbookRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.GetRunbookRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.GetRunbookRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getRunbookId(), "runbookId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("runbooks") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRunbookId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetRunbookResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetRunbookResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetRunbookResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetRunbookResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses.GetRunbookResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.GetRunbookResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .Runbook>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model.Runbook + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model.Runbook + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model.Runbook> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.GetRunbookResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .GetRunbookResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.runbook(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.GetRunbookResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetSchedulerDefinitionConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetSchedulerDefinitionConverter.java new file mode 100644 index 00000000000..656d2308f2a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetSchedulerDefinitionConverter.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetSchedulerDefinitionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetSchedulerDefinitionConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.GetSchedulerDefinitionRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.GetSchedulerDefinitionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.GetSchedulerDefinitionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSchedulerDefinitionId(), "schedulerDefinitionId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("schedulerDefinitions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulerDefinitionId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetSchedulerDefinitionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetSchedulerDefinitionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetSchedulerDefinitionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .GetSchedulerDefinitionResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .GetSchedulerDefinitionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.GetSchedulerDefinitionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .SchedulerDefinition>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .SchedulerDefinition + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .SchedulerDefinition + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .SchedulerDefinition> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .GetSchedulerDefinitionResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .GetSchedulerDefinitionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.schedulerDefinition(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .GetSchedulerDefinitionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetSchedulerJobConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetSchedulerJobConverter.java new file mode 100644 index 00000000000..7d9bcb9cb74 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetSchedulerJobConverter.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetSchedulerJobConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetSchedulerJobConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.GetSchedulerJobRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.GetSchedulerJobRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.GetSchedulerJobRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSchedulerJobId(), "schedulerJobId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("schedulerJobs") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulerJobId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetSchedulerJobResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetSchedulerJobResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetSchedulerJobResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .GetSchedulerJobResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .GetSchedulerJobResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.GetSchedulerJobResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .SchedulerJob>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .SchedulerJob + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .SchedulerJob + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .SchedulerJob> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.GetSchedulerJobResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .GetSchedulerJobResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.schedulerJob(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.GetSchedulerJobResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetTaskRecordConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetTaskRecordConverter.java new file mode 100644 index 00000000000..5bee91b3e1e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetTaskRecordConverter.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetTaskRecordConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetTaskRecordConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.GetTaskRecordRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.GetTaskRecordRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.GetTaskRecordRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getTaskRecordId(), "taskRecordId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("taskRecords") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getTaskRecordId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetTaskRecordResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetTaskRecordResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetTaskRecordResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .GetTaskRecordResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .GetTaskRecordResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.GetTaskRecordResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .TaskRecord>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .TaskRecord + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .TaskRecord + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model.TaskRecord> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.GetTaskRecordResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .GetTaskRecordResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.taskRecord(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.GetTaskRecordResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetWorkRequestConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetWorkRequestConverter.java new file mode 100644 index 00000000000..b6caabe224d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/GetWorkRequestConverter.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetWorkRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetWorkRequestConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.GetWorkRequestRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.GetWorkRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.GetWorkRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetWorkRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetWorkRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.GetWorkRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .GetWorkRequestResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .GetWorkRequestResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.GetWorkRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .WorkRequest>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .WorkRequest + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .WorkRequest + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .WorkRequest> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.GetWorkRequestResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .GetWorkRequestResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequest(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> retryAfterHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "retry-after"); + if (retryAfterHeader.isPresent()) { + builder.retryAfter( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "retry-after", + retryAfterHeader.get().get(0), + Integer.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.GetWorkRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListAnnouncementsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListAnnouncementsConverter.java new file mode 100644 index 00000000000..a8bc4b17d7b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListAnnouncementsConverter.java @@ -0,0 +1,194 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListAnnouncementsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListAnnouncementsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListAnnouncementsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListAnnouncementsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListAnnouncementsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("announcements"); + + if (request.getSummaryContains() != null) { + target = + target.queryParam( + "summaryContains", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSummaryContains())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListAnnouncementsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListAnnouncementsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListAnnouncementsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListAnnouncementsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListAnnouncementsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListAnnouncementsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .AnnouncementCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .AnnouncementCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .AnnouncementCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .AnnouncementCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ListAnnouncementsResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListAnnouncementsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.announcementCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ListAnnouncementsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListCompliancePoliciesConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListCompliancePoliciesConverter.java new file mode 100644 index 00000000000..f70546c9f77 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListCompliancePoliciesConverter.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListCompliancePoliciesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListCompliancePoliciesConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListCompliancePoliciesRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListCompliancePoliciesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListCompliancePoliciesRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("compliancePolicies"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListCompliancePoliciesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListCompliancePoliciesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListCompliancePoliciesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListCompliancePoliciesResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListCompliancePoliciesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListCompliancePoliciesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicyCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicyCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicyCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicyCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ListCompliancePoliciesResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListCompliancePoliciesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.compliancePolicyCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ListCompliancePoliciesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListCompliancePolicyRulesConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListCompliancePolicyRulesConverter.java new file mode 100644 index 00000000000..2650bd21455 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListCompliancePolicyRulesConverter.java @@ -0,0 +1,228 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListCompliancePolicyRulesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListCompliancePolicyRulesConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListCompliancePolicyRulesRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListCompliancePolicyRulesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListCompliancePolicyRulesRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("compliancePolicyRules"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getPatchName() != null) { + target = + target.queryParam( + "patchName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPatchName())); + } + + if (request.getCompliancePolicyId() != null) { + target = + target.queryParam( + "compliancePolicyId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompliancePolicyId())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListCompliancePolicyRulesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListCompliancePolicyRulesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListCompliancePolicyRulesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListCompliancePolicyRulesResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListCompliancePolicyRulesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListCompliancePolicyRulesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicyRuleCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicyRuleCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicyRuleCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .CompliancePolicyRuleCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ListCompliancePolicyRulesResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListCompliancePolicyRulesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.compliancePolicyRuleCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ListCompliancePolicyRulesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListComplianceRecordsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListComplianceRecordsConverter.java new file mode 100644 index 00000000000..8b0fce1ed69 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListComplianceRecordsConverter.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListComplianceRecordsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListComplianceRecordsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListComplianceRecordsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListComplianceRecordsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListComplianceRecordsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("complianceRecords"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getResourceId() != null) { + target = + target.queryParam( + "resourceId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceId())); + } + + if (request.getEntityId() != null) { + target = + target.queryParam( + "entityId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getEntityId())); + } + + if (request.getProductName() != null) { + target = + target.queryParam( + "productName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getProductName())); + } + + if (request.getProductStack() != null) { + target = + target.queryParam( + "productStack", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getProductStack())); + } + + if (request.getTargetName() != null) { + target = + target.queryParam( + "targetName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTargetName())); + } + + if (request.getComplianceState() != null) { + target = + target.queryParam( + "complianceState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getComplianceState())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListComplianceRecordsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListComplianceRecordsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListComplianceRecordsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListComplianceRecordsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListComplianceRecordsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListComplianceRecordsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .ComplianceRecordCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .ComplianceRecordCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .ComplianceRecordCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .ComplianceRecordCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ListComplianceRecordsResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListComplianceRecordsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.complianceRecordCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ListComplianceRecordsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListExecutionsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListExecutionsConverter.java new file mode 100644 index 00000000000..501c3f00b2d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListExecutionsConverter.java @@ -0,0 +1,226 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListExecutionsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListExecutionsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListExecutionsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListExecutionsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListExecutionsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSchedulerJobId(), "schedulerJobId must not be blank"); + Validate.notBlank(request.getJobActivityId(), "jobActivityId must not be blank"); + Validate.notBlank(request.getResourceId(), "resourceId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("schedulerJobs") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulerJobId())) + .path("jobActivities") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getJobActivityId())) + .path("resources") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getResourceId())) + .path("executions"); + + if (request.getResourceTaskId() != null) { + target = + target.queryParam( + "resourceTaskId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceTaskId())); + } + + if (request.getStepName() != null) { + target = + target.queryParam( + "stepName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getStepName())); + } + + if (request.getTargetName() != null) { + target = + target.queryParam( + "targetName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTargetName())); + } + + if (request.getSequence() != null) { + target = + target.queryParam( + "sequence", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSequence())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListExecutionsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListExecutionsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListExecutionsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListExecutionsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListExecutionsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListExecutionsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .ExecutionCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .ExecutionCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .ExecutionCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .ExecutionCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.ListExecutionsResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListExecutionsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.executionCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.ListExecutionsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListFleetCredentialsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListFleetCredentialsConverter.java new file mode 100644 index 00000000000..d591d6d4c76 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListFleetCredentialsConverter.java @@ -0,0 +1,242 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListFleetCredentialsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListFleetCredentialsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListFleetCredentialsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListFleetCredentialsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListFleetCredentialsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("fleetCredentials"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getResourceId() != null) { + target = + target.queryParam( + "resourceId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceId())); + } + + if (request.getTarget() != null) { + target = + target.queryParam( + "target", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTarget())); + } + + if (request.getCredentialLevel() != null) { + target = + target.queryParam( + "credentialLevel", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCredentialLevel().getValue())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListFleetCredentialsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListFleetCredentialsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListFleetCredentialsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetCredentialsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListFleetCredentialsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListFleetCredentialsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetCredentialCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetCredentialCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetCredentialCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetCredentialCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetCredentialsResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetCredentialsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.fleetCredentialCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetCredentialsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListFleetProductsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListFleetProductsConverter.java new file mode 100644 index 00000000000..88a8331fee6 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListFleetProductsConverter.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListFleetProductsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListFleetProductsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListFleetProductsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListFleetProductsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListFleetProductsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("fleetProducts"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getResourceId() != null) { + target = + target.queryParam( + "resourceId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceId())); + } + + if (request.getResourceDisplayName() != null) { + target = + target.queryParam( + "resourceDisplayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceDisplayName())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListFleetProductsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListFleetProductsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListFleetProductsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetProductsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListFleetProductsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListFleetProductsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetProductCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetProductCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetProductCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetProductCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetProductsResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetProductsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.fleetProductCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetProductsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListFleetPropertiesConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListFleetPropertiesConverter.java new file mode 100644 index 00000000000..d19bf8c0a1b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListFleetPropertiesConverter.java @@ -0,0 +1,218 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListFleetPropertiesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListFleetPropertiesConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListFleetPropertiesRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListFleetPropertiesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListFleetPropertiesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("fleetProperties"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListFleetPropertiesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListFleetPropertiesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListFleetPropertiesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetPropertiesResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListFleetPropertiesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListFleetPropertiesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetPropertyCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetPropertyCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetPropertyCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetPropertyCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetPropertiesResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetPropertiesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.fleetPropertyCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetPropertiesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListFleetResourcesConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListFleetResourcesConverter.java new file mode 100644 index 00000000000..455cdbede03 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListFleetResourcesConverter.java @@ -0,0 +1,225 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListFleetResourcesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListFleetResourcesConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListFleetResourcesRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListFleetResourcesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListFleetResourcesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("fleetResources"); + + if (request.getTenancyId() != null) { + target = + target.queryParam( + "tenancyId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTenancyId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getFleetResourceType() != null) { + target = + target.queryParam( + "fleetResourceType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getFleetResourceType())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListFleetResourcesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListFleetResourcesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListFleetResourcesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetResourcesResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListFleetResourcesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListFleetResourcesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetResourceCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetResourceCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetResourceCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetResourceCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetResourcesResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetResourcesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.fleetResourceCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetResourcesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListFleetTargetsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListFleetTargetsConverter.java new file mode 100644 index 00000000000..2d5ad33fd88 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListFleetTargetsConverter.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListFleetTargetsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListFleetTargetsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListFleetTargetsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListFleetTargetsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListFleetTargetsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("fleetTargets"); + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getProduct() != null) { + target = + target.queryParam( + "product", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getProduct())); + } + + if (request.getResourceId() != null) { + target = + target.queryParam( + "resourceId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceId())); + } + + if (request.getResourceDisplayName() != null) { + target = + target.queryParam( + "resourceDisplayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceDisplayName())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListFleetTargetsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListFleetTargetsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListFleetTargetsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetTargetsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListFleetTargetsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListFleetTargetsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetTargetCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetTargetCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetTargetCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetTargetCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetTargetsResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetTargetsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.fleetTargetCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetTargetsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListFleetsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListFleetsConverter.java new file mode 100644 index 00000000000..68fa97803bd --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListFleetsConverter.java @@ -0,0 +1,249 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListFleetsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListFleetsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListFleetsRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListFleetsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListFleetsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("fleets"); + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getFleetType() != null) { + target = + target.queryParam( + "fleetType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getFleetType().getValue())); + } + + if (request.getApplicationType() != null) { + target = + target.queryParam( + "applicationType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getApplicationType())); + } + + if (request.getProduct() != null) { + target = + target.queryParam( + "product", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getProduct())); + } + + if (request.getEnvironmentType() != null) { + target = + target.queryParam( + "environmentType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getEnvironmentType())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListFleetsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListFleetsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListFleetsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListFleetsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses.ListFleetsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListFleetsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.ListFleetsResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListFleetsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.fleetCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcTotalItemsHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-total-items"); + if (opcTotalItemsHeader.isPresent()) { + builder.opcTotalItems( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-total-items", + opcTotalItemsHeader.get().get(0), + Integer.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.ListFleetsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListInventoryResourcesConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListInventoryResourcesConverter.java new file mode 100644 index 00000000000..c6c02208552 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListInventoryResourcesConverter.java @@ -0,0 +1,252 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListInventoryResourcesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListInventoryResourcesConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListInventoryResourcesRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListInventoryResourcesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListInventoryResourcesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + Validate.notNull(request.getResourceCompartmentId(), "resourceCompartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("inventoryResources"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getResourceRegion() != null) { + target = + target.queryParam( + "resourceRegion", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceRegion())); + } + + target = + target.queryParam( + "resourceCompartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceCompartmentId())); + + if (request.getDefinedTagEquals() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "definedTagEquals", + request.getDefinedTagEquals(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + if (request.getFreeformTagEquals() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "freeformTagEquals", + request.getFreeformTagEquals(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + if (request.getInventoryProperties() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "inventoryProperties", + request.getInventoryProperties(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + if (request.getMatchingCriteria() != null) { + target = + target.queryParam( + "matchingCriteria", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getMatchingCriteria())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListInventoryResourcesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListInventoryResourcesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListInventoryResourcesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListInventoryResourcesResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListInventoryResourcesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListInventoryResourcesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .InventoryResourceCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .InventoryResourceCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .InventoryResourceCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .InventoryResourceCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ListInventoryResourcesResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListInventoryResourcesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.inventoryResourceCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ListInventoryResourcesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListMaintenanceWindowsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListMaintenanceWindowsConverter.java new file mode 100644 index 00000000000..c333a3758de --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListMaintenanceWindowsConverter.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListMaintenanceWindowsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListMaintenanceWindowsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListMaintenanceWindowsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListMaintenanceWindowsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListMaintenanceWindowsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("maintenanceWindows"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getTimeScheduleStartGreaterThanOrEqualTo() != null) { + target = + target.queryParam( + "timeScheduleStartGreaterThanOrEqualTo", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeScheduleStartGreaterThanOrEqualTo())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListMaintenanceWindowsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListMaintenanceWindowsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListMaintenanceWindowsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListMaintenanceWindowsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListMaintenanceWindowsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListMaintenanceWindowsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .MaintenanceWindowCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .MaintenanceWindowCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .MaintenanceWindowCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .MaintenanceWindowCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ListMaintenanceWindowsResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListMaintenanceWindowsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.maintenanceWindowCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcTotalItemsHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-total-items"); + if (opcTotalItemsHeader.isPresent()) { + builder.opcTotalItems( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-total-items", + opcTotalItemsHeader.get().get(0), + Integer.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ListMaintenanceWindowsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListOnboardingPoliciesConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListOnboardingPoliciesConverter.java new file mode 100644 index 00000000000..aa4b45a0d36 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListOnboardingPoliciesConverter.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListOnboardingPoliciesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListOnboardingPoliciesConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListOnboardingPoliciesRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListOnboardingPoliciesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListOnboardingPoliciesRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("OnboardingPolicies"); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListOnboardingPoliciesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListOnboardingPoliciesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListOnboardingPoliciesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListOnboardingPoliciesResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListOnboardingPoliciesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListOnboardingPoliciesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .OnboardingPolicyCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .OnboardingPolicyCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .OnboardingPolicyCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .OnboardingPolicyCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ListOnboardingPoliciesResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListOnboardingPoliciesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.onboardingPolicyCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ListOnboardingPoliciesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListOnboardingsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListOnboardingsConverter.java new file mode 100644 index 00000000000..b18560362bb --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListOnboardingsConverter.java @@ -0,0 +1,201 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListOnboardingsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListOnboardingsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListOnboardingsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListOnboardingsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListOnboardingsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("Onboardings"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListOnboardingsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListOnboardingsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListOnboardingsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListOnboardingsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListOnboardingsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListOnboardingsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .OnboardingCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .OnboardingCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .OnboardingCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .OnboardingCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.ListOnboardingsResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListOnboardingsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.onboardingCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.ListOnboardingsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListPatchesConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListPatchesConverter.java new file mode 100644 index 00000000000..c8451380f4f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListPatchesConverter.java @@ -0,0 +1,263 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListPatchesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListPatchesConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListPatchesRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListPatchesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListPatchesRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("patches"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getProductId() != null) { + target = + target.queryParam( + "productId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getProductId())); + } + + if (request.getVersion() != null) { + target = + target.queryParam( + "version", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getVersion())); + } + + if (request.getType() != null) { + target = + target.queryParam( + "type", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getType().getValue())); + } + + if (request.getPatchTypeId() != null) { + target = + target.queryParam( + "patchTypeId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPatchTypeId())); + } + + if (request.getName() != null) { + target = + target.queryParam( + "name", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getName())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getTimeReleasedGreaterThanOrEqualTo() != null) { + target = + target.queryParam( + "timeReleasedGreaterThanOrEqualTo", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeReleasedGreaterThanOrEqualTo())); + } + + if (request.getTimeReleasedLessThan() != null) { + target = + target.queryParam( + "timeReleasedLessThan", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeReleasedLessThan())); + } + + if (request.getShouldCompliancePolicyRulesBeApplied() != null) { + target = + target.queryParam( + "shouldCompliancePolicyRulesBeApplied", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getShouldCompliancePolicyRulesBeApplied())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListPatchesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListPatchesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListPatchesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListPatchesResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses.ListPatchesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListPatchesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .PatchCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .PatchCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .PatchCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .PatchCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.ListPatchesResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListPatchesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.patchCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.ListPatchesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListPlatformConfigurationsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListPlatformConfigurationsConverter.java new file mode 100644 index 00000000000..15f31477a32 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListPlatformConfigurationsConverter.java @@ -0,0 +1,221 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListPlatformConfigurationsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListPlatformConfigurationsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListPlatformConfigurationsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListPlatformConfigurationsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListPlatformConfigurationsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("platformConfigurations"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getConfigCategory() != null) { + target = + target.queryParam( + "configCategory", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getConfigCategory().getValue())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListPlatformConfigurationsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListPlatformConfigurationsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListPlatformConfigurationsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListPlatformConfigurationsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListPlatformConfigurationsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListPlatformConfigurationsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .PlatformConfigurationCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .PlatformConfigurationCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .PlatformConfigurationCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .PlatformConfigurationCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ListPlatformConfigurationsResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListPlatformConfigurationsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.platformConfigurationCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ListPlatformConfigurationsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListPropertiesConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListPropertiesConverter.java new file mode 100644 index 00000000000..e12272d86b4 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListPropertiesConverter.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListPropertiesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListPropertiesConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListPropertiesRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListPropertiesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListPropertiesRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("properties"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getScope() != null) { + target = + target.queryParam( + "scope", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getScope().getValue())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListPropertiesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListPropertiesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListPropertiesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListPropertiesResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListPropertiesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListPropertiesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .PropertyCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .PropertyCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .PropertyCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .PropertyCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.ListPropertiesResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListPropertiesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.propertyCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.ListPropertiesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListResourcesConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListResourcesConverter.java new file mode 100644 index 00000000000..45147966a5e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListResourcesConverter.java @@ -0,0 +1,220 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListResourcesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListResourcesConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListResourcesRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListResourcesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListResourcesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSchedulerJobId(), "schedulerJobId must not be blank"); + Validate.notBlank(request.getJobActivityId(), "jobActivityId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("schedulerJobs") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulerJobId())) + .path("jobActivities") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getJobActivityId())) + .path("resources"); + + if (request.getResourceTaskId() != null) { + target = + target.queryParam( + "resourceTaskId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceTaskId())); + } + + if (request.getStepName() != null) { + target = + target.queryParam( + "stepName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getStepName())); + } + + if (request.getTargetName() != null) { + target = + target.queryParam( + "targetName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTargetName())); + } + + if (request.getSequence() != null) { + target = + target.queryParam( + "sequence", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSequence())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListResourcesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListResourcesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListResourcesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListResourcesResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListResourcesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListResourcesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .ResourceCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .ResourceCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .ResourceCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .ResourceCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.ListResourcesResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListResourcesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.resourceCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.ListResourcesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListRunbooksConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListRunbooksConverter.java new file mode 100644 index 00000000000..3258bf179c6 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListRunbooksConverter.java @@ -0,0 +1,239 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListRunbooksConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListRunbooksConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListRunbooksRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListRunbooksRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListRunbooksRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("runbooks"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getType() != null) { + target = + target.queryParam( + "type", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getType().getValue())); + } + + if (request.getRunbookRelevance() != null) { + target = + target.queryParam( + "runbookRelevance", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getRunbookRelevance().getValue())); + } + + if (request.getPlatform() != null) { + target = + target.queryParam( + "platform", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPlatform())); + } + + if (request.getOperation() != null) { + target = + target.queryParam( + "operation", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getOperation())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListRunbooksResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListRunbooksResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListRunbooksResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListRunbooksResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses.ListRunbooksResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListRunbooksResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .RunbookCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .RunbookCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .RunbookCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .RunbookCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.ListRunbooksResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListRunbooksResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.runbookCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.ListRunbooksResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListScheduledFleetsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListScheduledFleetsConverter.java new file mode 100644 index 00000000000..510f68ff038 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListScheduledFleetsConverter.java @@ -0,0 +1,203 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListScheduledFleetsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListScheduledFleetsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListScheduledFleetsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListScheduledFleetsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListScheduledFleetsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSchedulerDefinitionId(), "schedulerDefinitionId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("schedulerDefinitions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulerDefinitionId())) + .path("scheduledFleets"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListScheduledFleetsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListScheduledFleetsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListScheduledFleetsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListScheduledFleetsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListScheduledFleetsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListScheduledFleetsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .ScheduledFleetCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .ScheduledFleetCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .ScheduledFleetCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .ScheduledFleetCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ListScheduledFleetsResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListScheduledFleetsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.scheduledFleetCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ListScheduledFleetsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListSchedulerDefinitionsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListSchedulerDefinitionsConverter.java new file mode 100644 index 00000000000..41412cef3ea --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListSchedulerDefinitionsConverter.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListSchedulerDefinitionsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListSchedulerDefinitionsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListSchedulerDefinitionsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListSchedulerDefinitionsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListSchedulerDefinitionsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("schedulerDefinitions"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getProduct() != null) { + target = + target.queryParam( + "product", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getProduct())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getMaintenanceWindowId() != null) { + target = + target.queryParam( + "maintenanceWindowId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getMaintenanceWindowId())); + } + + if (request.getRunbookId() != null) { + target = + target.queryParam( + "runbookId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getRunbookId())); + } + + if (request.getFleetId() != null) { + target = + target.queryParam( + "fleetId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getFleetId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListSchedulerDefinitionsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListSchedulerDefinitionsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListSchedulerDefinitionsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListSchedulerDefinitionsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListSchedulerDefinitionsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListSchedulerDefinitionsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .SchedulerDefinitionCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .SchedulerDefinitionCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .SchedulerDefinitionCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .SchedulerDefinitionCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ListSchedulerDefinitionsResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListSchedulerDefinitionsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.schedulerDefinitionCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcTotalItemsHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-total-items"); + if (opcTotalItemsHeader.isPresent()) { + builder.opcTotalItems( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-total-items", + opcTotalItemsHeader.get().get(0), + Integer.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ListSchedulerDefinitionsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListSchedulerJobsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListSchedulerJobsConverter.java new file mode 100644 index 00000000000..a228c394656 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListSchedulerJobsConverter.java @@ -0,0 +1,258 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListSchedulerJobsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListSchedulerJobsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListSchedulerJobsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListSchedulerJobsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListSchedulerJobsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("schedulerJobs"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getFleetId() != null) { + target = + target.queryParam( + "fleetId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getFleetId())); + } + + if (request.getTimeScheduledGreaterThanOrEqualTo() != null) { + target = + target.queryParam( + "timeScheduledGreaterThanOrEqualTo", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeScheduledGreaterThanOrEqualTo())); + } + + if (request.getTimeScheduledLessThan() != null) { + target = + target.queryParam( + "timeScheduledLessThan", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeScheduledLessThan())); + } + + if (request.getIsRemediationJobNeeded() != null) { + target = + target.queryParam( + "isRemediationJobNeeded", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsRemediationJobNeeded())); + } + + if (request.getSubState() != null) { + target = + target.queryParam( + "subState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSubState())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getDefintionId() != null) { + target = + target.queryParam( + "defintionId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDefintionId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListSchedulerJobsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListSchedulerJobsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListSchedulerJobsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListSchedulerJobsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListSchedulerJobsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListSchedulerJobsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .SchedulerJobCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .SchedulerJobCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .SchedulerJobCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .SchedulerJobCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ListSchedulerJobsResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListSchedulerJobsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.schedulerJobCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ListSchedulerJobsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListStepsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListStepsConverter.java new file mode 100644 index 00000000000..bf070682c8c --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListStepsConverter.java @@ -0,0 +1,218 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListStepsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListStepsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListStepsRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListStepsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListStepsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSchedulerJobId(), "schedulerJobId must not be blank"); + Validate.notBlank(request.getJobActivityId(), "jobActivityId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("schedulerJobs") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulerJobId())) + .path("jobActivities") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getJobActivityId())) + .path("steps"); + + if (request.getResourceTaskId() != null) { + target = + target.queryParam( + "resourceTaskId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceTaskId())); + } + + if (request.getStepName() != null) { + target = + target.queryParam( + "stepName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getStepName())); + } + + if (request.getTargetName() != null) { + target = + target.queryParam( + "targetName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTargetName())); + } + + if (request.getSequence() != null) { + target = + target.queryParam( + "sequence", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSequence())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListStepsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListStepsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListStepsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListStepsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses.ListStepsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListStepsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .StepCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .StepCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .StepCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .StepCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.ListStepsResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListStepsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.stepCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.ListStepsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListTargetsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListTargetsConverter.java new file mode 100644 index 00000000000..11b36ff518d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListTargetsConverter.java @@ -0,0 +1,190 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListTargetsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListTargetsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListTargetsRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListTargetsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListTargetsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("targets"); + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListTargetsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListTargetsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListTargetsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListTargetsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses.ListTargetsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListTargetsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetTargetCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetTargetCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetTargetCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetTargetCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.ListTargetsResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListTargetsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.fleetTargetCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.ListTargetsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListTaskRecordsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListTaskRecordsConverter.java new file mode 100644 index 00000000000..02d778cbe44 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListTaskRecordsConverter.java @@ -0,0 +1,225 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListTaskRecordsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListTaskRecordsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListTaskRecordsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListTaskRecordsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListTaskRecordsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("taskRecords"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getPlatform() != null) { + target = + target.queryParam( + "platform", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPlatform())); + } + + if (request.getType() != null) { + target = + target.queryParam( + "type", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getType().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListTaskRecordsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListTaskRecordsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListTaskRecordsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListTaskRecordsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListTaskRecordsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListTaskRecordsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .TaskRecordCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .TaskRecordCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .TaskRecordCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .TaskRecordCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.ListTaskRecordsResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListTaskRecordsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.taskRecordCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.ListTaskRecordsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListWorkRequestErrorsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListWorkRequestErrorsConverter.java new file mode 100644 index 00000000000..a7f34b93c81 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListWorkRequestErrorsConverter.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListWorkRequestErrorsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListWorkRequestErrorsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListWorkRequestErrorsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListWorkRequestErrorsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListWorkRequestErrorsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())) + .path("errors"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListWorkRequestErrorsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListWorkRequestErrorsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListWorkRequestErrorsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListWorkRequestErrorsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListWorkRequestErrorsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListWorkRequestErrorsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .WorkRequestErrorCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .WorkRequestErrorCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .WorkRequestErrorCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .WorkRequestErrorCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ListWorkRequestErrorsResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListWorkRequestErrorsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestErrorCollection(response.getItem()); + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ListWorkRequestErrorsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListWorkRequestLogsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListWorkRequestLogsConverter.java new file mode 100644 index 00000000000..085867de982 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListWorkRequestLogsConverter.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListWorkRequestLogsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListWorkRequestLogsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListWorkRequestLogsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListWorkRequestLogsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListWorkRequestLogsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())) + .path("logs"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListWorkRequestLogsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListWorkRequestLogsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListWorkRequestLogsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListWorkRequestLogsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListWorkRequestLogsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListWorkRequestLogsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .WorkRequestLogEntryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .WorkRequestLogEntryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .WorkRequestLogEntryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .WorkRequestLogEntryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ListWorkRequestLogsResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListWorkRequestLogsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestLogEntryCollection(response.getItem()); + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ListWorkRequestLogsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListWorkRequestsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListWorkRequestsConverter.java new file mode 100644 index 00000000000..1ae342f00e3 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ListWorkRequestsConverter.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListWorkRequestsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListWorkRequestsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ListWorkRequestsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ListWorkRequestsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ListWorkRequestsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("workRequests"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getWorkRequestId() != null) { + target = + target.queryParam( + "workRequestId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getWorkRequestId())); + } + + if (request.getStatus() != null) { + target = + target.queryParam( + "status", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getStatus().getValue())); + } + + if (request.getResourceId() != null) { + target = + target.queryParam( + "resourceId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceId())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListWorkRequestsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListWorkRequestsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ListWorkRequestsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ListWorkRequestsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ListWorkRequestsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ListWorkRequestsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .WorkRequestSummaryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .WorkRequestSummaryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .WorkRequestSummaryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .WorkRequestSummaryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ListWorkRequestsResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ListWorkRequestsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestSummaryCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ListWorkRequestsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ManageJobExecutionConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ManageJobExecutionConverter.java new file mode 100644 index 00000000000..832b2e2a37f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ManageJobExecutionConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ManageJobExecutionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ManageJobExecutionConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ManageJobExecutionRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ManageJobExecutionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ManageJobExecutionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getManageJobExecutionDetails(), "manageJobExecutionDetails is required"); + Validate.notBlank(request.getSchedulerJobId(), "schedulerJobId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("schedulerJobs") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulerJobId())) + .path("actions") + .path("manageJobExecution"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ManageJobExecutionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ManageJobExecutionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ManageJobExecutionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ManageJobExecutionResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ManageJobExecutionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ManageJobExecutionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .ManageJobExecutionResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ManageJobExecutionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .ManageJobExecutionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ManageSettingsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ManageSettingsConverter.java new file mode 100644 index 00000000000..eb8147b8376 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/ManageSettingsConverter.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ManageSettingsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ManageSettingsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.ManageSettingsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.ManageSettingsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.ManageSettingsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOnboardingId(), "onboardingId must not be blank"); + Validate.notNull(request.getManageSettingsDetails(), "manageSettingsDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("Onboardings") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOnboardingId())) + .path("actions") + .path("manageSettings"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ManageSettingsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ManageSettingsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.ManageSettingsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .ManageSettingsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .ManageSettingsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.ManageSettingsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.ManageSettingsResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .ManageSettingsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.ManageSettingsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/PublishRunbookConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/PublishRunbookConverter.java new file mode 100644 index 00000000000..dfa30898838 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/PublishRunbookConverter.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class PublishRunbookConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PublishRunbookConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.PublishRunbookRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.PublishRunbookRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.PublishRunbookRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getPublishRunbookDetails(), "publishRunbookDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("runbooks") + .path("actions") + .path("publishRunbook"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.PublishRunbookResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.PublishRunbookResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.PublishRunbookResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .PublishRunbookResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .PublishRunbookResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.PublishRunbookResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.PublishRunbookResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .PublishRunbookResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.PublishRunbookResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/RequestResourceValidationConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/RequestResourceValidationConverter.java new file mode 100644 index 00000000000..17e6c8d44bb --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/RequestResourceValidationConverter.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class RequestResourceValidationConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RequestResourceValidationConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.RequestResourceValidationRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.RequestResourceValidationRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.RequestResourceValidationRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getRequestResourceValidationDetails(), + "requestResourceValidationDetails is required"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("actions") + .path("requestResourceValidation"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.RequestResourceValidationResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.RequestResourceValidationResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .RequestResourceValidationResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .RequestResourceValidationResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .RequestResourceValidationResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.RequestResourceValidationResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .RequestResourceValidationResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .RequestResourceValidationResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .RequestResourceValidationResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/RequestTargetDiscoveryConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/RequestTargetDiscoveryConverter.java new file mode 100644 index 00000000000..7f5563d7fa7 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/RequestTargetDiscoveryConverter.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class RequestTargetDiscoveryConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RequestTargetDiscoveryConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.RequestTargetDiscoveryRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.RequestTargetDiscoveryRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.RequestTargetDiscoveryRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getRequestTargetDiscoveryDetails(), + "requestTargetDiscoveryDetails is required"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("actions") + .path("requestTargetDiscovery"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.RequestTargetDiscoveryResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.RequestTargetDiscoveryResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.RequestTargetDiscoveryResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .RequestTargetDiscoveryResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .RequestTargetDiscoveryResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.RequestTargetDiscoveryResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .RequestTargetDiscoveryResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .RequestTargetDiscoveryResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .RequestTargetDiscoveryResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/SetDefaultRunbookConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/SetDefaultRunbookConverter.java new file mode 100644 index 00000000000..68ff865e482 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/SetDefaultRunbookConverter.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class SetDefaultRunbookConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SetDefaultRunbookConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.SetDefaultRunbookRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.SetDefaultRunbookRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.SetDefaultRunbookRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getSetDefaultRunbookDetails(), "setDefaultRunbookDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("runbooks") + .path("actions") + .path("setDefaultRunbook"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.SetDefaultRunbookResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.SetDefaultRunbookResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.SetDefaultRunbookResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .SetDefaultRunbookResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .SetDefaultRunbookResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.SetDefaultRunbookResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .Runbook>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model.Runbook + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model.Runbook + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model.Runbook> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .SetDefaultRunbookResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .SetDefaultRunbookResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.runbook(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .SetDefaultRunbookResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/SummarizeComplianceRecordCountsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/SummarizeComplianceRecordCountsConverter.java new file mode 100644 index 00000000000..51457bf5cf7 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/SummarizeComplianceRecordCountsConverter.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class SummarizeComplianceRecordCountsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SummarizeComplianceRecordCountsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.SummarizeComplianceRecordCountsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests + .SummarizeComplianceRecordCountsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.SummarizeComplianceRecordCountsRequest + request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("complianceRecordCounts"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeComplianceRecordCountsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeComplianceRecordCountsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeComplianceRecordCountsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeComplianceRecordCountsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .SummarizeComplianceRecordCountsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.SummarizeComplianceRecordCountsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .ComplianceRecordAggregationCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .ComplianceRecordAggregationCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .ComplianceRecordAggregationCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .ComplianceRecordAggregationCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeComplianceRecordCountsResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeComplianceRecordCountsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.complianceRecordAggregationCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeComplianceRecordCountsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/SummarizeManagedEntityCountsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/SummarizeManagedEntityCountsConverter.java new file mode 100644 index 00000000000..f1b1c3eedeb --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/SummarizeManagedEntityCountsConverter.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class SummarizeManagedEntityCountsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SummarizeManagedEntityCountsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.SummarizeManagedEntityCountsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.SummarizeManagedEntityCountsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.SummarizeManagedEntityCountsRequest + request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("managedEntityCounts"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeManagedEntityCountsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeManagedEntityCountsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeManagedEntityCountsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeManagedEntityCountsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .SummarizeManagedEntityCountsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.SummarizeManagedEntityCountsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .ManagedEntityAggregationCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .ManagedEntityAggregationCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .ManagedEntityAggregationCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .ManagedEntityAggregationCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeManagedEntityCountsResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeManagedEntityCountsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.managedEntityAggregationCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeManagedEntityCountsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/SummarizeSchedulerJobCountsConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/SummarizeSchedulerJobCountsConverter.java new file mode 100644 index 00000000000..e373f76caa7 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/SummarizeSchedulerJobCountsConverter.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class SummarizeSchedulerJobCountsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SummarizeSchedulerJobCountsConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.SummarizeSchedulerJobCountsRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.SummarizeSchedulerJobCountsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.SummarizeSchedulerJobCountsRequest + request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20230831").path("schedulerJobCounts"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeSchedulerJobCountsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeSchedulerJobCountsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeSchedulerJobCountsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeSchedulerJobCountsResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .SummarizeSchedulerJobCountsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.SummarizeSchedulerJobCountsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .SchedulerJobAggregationCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .SchedulerJobAggregationCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .SchedulerJobAggregationCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .SchedulerJobAggregationCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeSchedulerJobCountsResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeSchedulerJobCountsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.schedulerJobAggregationCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .SummarizeSchedulerJobCountsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateCompliancePolicyRuleConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateCompliancePolicyRuleConverter.java new file mode 100644 index 00000000000..e0a0783da09 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateCompliancePolicyRuleConverter.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateCompliancePolicyRuleConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateCompliancePolicyRuleConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.UpdateCompliancePolicyRuleRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.UpdateCompliancePolicyRuleRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.UpdateCompliancePolicyRuleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getCompliancePolicyRuleId(), "compliancePolicyRuleId must not be blank"); + Validate.notNull( + request.getUpdateCompliancePolicyRuleDetails(), + "updateCompliancePolicyRuleDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("compliancePolicyRules") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCompliancePolicyRuleId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateCompliancePolicyRuleResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateCompliancePolicyRuleResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .UpdateCompliancePolicyRuleResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .UpdateCompliancePolicyRuleResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .UpdateCompliancePolicyRuleResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.UpdateCompliancePolicyRuleResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .UpdateCompliancePolicyRuleResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .UpdateCompliancePolicyRuleResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .UpdateCompliancePolicyRuleResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateFleetConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateFleetConverter.java new file mode 100644 index 00000000000..2b1ecdff437 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateFleetConverter.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateFleetConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateFleetConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.UpdateFleetRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.UpdateFleetRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.UpdateFleetRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + Validate.notNull(request.getUpdateFleetDetails(), "updateFleetDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateFleetResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateFleetResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateFleetResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .UpdateFleetResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses.UpdateFleetResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.UpdateFleetResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .Fleet>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model.Fleet + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model.Fleet + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model.Fleet> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.UpdateFleetResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .UpdateFleetResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.fleet(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.UpdateFleetResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateFleetCredentialConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateFleetCredentialConverter.java new file mode 100644 index 00000000000..88ebaa41acd --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateFleetCredentialConverter.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateFleetCredentialConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateFleetCredentialConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.UpdateFleetCredentialRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.UpdateFleetCredentialRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.UpdateFleetCredentialRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetCredentialId(), "fleetCredentialId must not be blank"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + Validate.notNull( + request.getUpdateFleetCredentialDetails(), + "updateFleetCredentialDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("fleetCredentials") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetCredentialId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateFleetCredentialResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateFleetCredentialResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateFleetCredentialResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .UpdateFleetCredentialResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .UpdateFleetCredentialResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.UpdateFleetCredentialResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .UpdateFleetCredentialResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .UpdateFleetCredentialResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .UpdateFleetCredentialResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateFleetPropertyConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateFleetPropertyConverter.java new file mode 100644 index 00000000000..3c352cff355 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateFleetPropertyConverter.java @@ -0,0 +1,162 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateFleetPropertyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateFleetPropertyConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.UpdateFleetPropertyRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.UpdateFleetPropertyRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.UpdateFleetPropertyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetPropertyId(), "fleetPropertyId must not be blank"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + Validate.notNull( + request.getUpdateFleetPropertyDetails(), "updateFleetPropertyDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("fleetProperties") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetPropertyId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateFleetPropertyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateFleetPropertyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateFleetPropertyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .UpdateFleetPropertyResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .UpdateFleetPropertyResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.UpdateFleetPropertyResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetProperty>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetProperty + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .FleetProperty + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .FleetProperty> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .UpdateFleetPropertyResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .UpdateFleetPropertyResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.fleetProperty(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .UpdateFleetPropertyResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateFleetResourceConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateFleetResourceConverter.java new file mode 100644 index 00000000000..9a54636a990 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateFleetResourceConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateFleetResourceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateFleetResourceConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.UpdateFleetResourceRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.UpdateFleetResourceRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.UpdateFleetResourceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetResourceId(), "fleetResourceId must not be blank"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + Validate.notNull( + request.getUpdateFleetResourceDetails(), "updateFleetResourceDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("fleetResources") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetResourceId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateFleetResourceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateFleetResourceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateFleetResourceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .UpdateFleetResourceResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .UpdateFleetResourceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.UpdateFleetResourceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .UpdateFleetResourceResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .UpdateFleetResourceResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .UpdateFleetResourceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateMaintenanceWindowConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateMaintenanceWindowConverter.java new file mode 100644 index 00000000000..8630ce9818a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateMaintenanceWindowConverter.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateMaintenanceWindowConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateMaintenanceWindowConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.UpdateMaintenanceWindowRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.UpdateMaintenanceWindowRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.UpdateMaintenanceWindowRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getMaintenanceWindowId(), "maintenanceWindowId must not be blank"); + Validate.notNull( + request.getUpdateMaintenanceWindowDetails(), + "updateMaintenanceWindowDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("maintenanceWindows") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMaintenanceWindowId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateMaintenanceWindowResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateMaintenanceWindowResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .UpdateMaintenanceWindowResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .UpdateMaintenanceWindowResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .UpdateMaintenanceWindowResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.UpdateMaintenanceWindowResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .UpdateMaintenanceWindowResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .UpdateMaintenanceWindowResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .UpdateMaintenanceWindowResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateOnboardingConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateOnboardingConverter.java new file mode 100644 index 00000000000..a6dcf841983 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateOnboardingConverter.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateOnboardingConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateOnboardingConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.UpdateOnboardingRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.UpdateOnboardingRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.UpdateOnboardingRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getOnboardingId(), "onboardingId must not be blank"); + Validate.notNull( + request.getUpdateOnboardingDetails(), "updateOnboardingDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("Onboardings") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOnboardingId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateOnboardingResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateOnboardingResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateOnboardingResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .UpdateOnboardingResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .UpdateOnboardingResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.UpdateOnboardingResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .UpdateOnboardingResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .UpdateOnboardingResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .UpdateOnboardingResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdatePatchConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdatePatchConverter.java new file mode 100644 index 00000000000..5519bea6a05 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdatePatchConverter.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdatePatchConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdatePatchConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.UpdatePatchRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.UpdatePatchRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.UpdatePatchRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPatchId(), "patchId must not be blank"); + Validate.notNull(request.getUpdatePatchDetails(), "updatePatchDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("patches") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPatchId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdatePatchResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdatePatchResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdatePatchResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .UpdatePatchResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses.UpdatePatchResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.UpdatePatchResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.UpdatePatchResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .UpdatePatchResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.UpdatePatchResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdatePlatformConfigurationConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdatePlatformConfigurationConverter.java new file mode 100644 index 00000000000..e12d65d1052 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdatePlatformConfigurationConverter.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdatePlatformConfigurationConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdatePlatformConfigurationConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.UpdatePlatformConfigurationRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.UpdatePlatformConfigurationRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.UpdatePlatformConfigurationRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getPlatformConfigurationId(), "platformConfigurationId must not be blank"); + Validate.notNull( + request.getUpdatePlatformConfigurationDetails(), + "updatePlatformConfigurationDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("platformConfigurations") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPlatformConfigurationId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .UpdatePlatformConfigurationResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .UpdatePlatformConfigurationResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .UpdatePlatformConfigurationResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .UpdatePlatformConfigurationResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .UpdatePlatformConfigurationResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.UpdatePlatformConfigurationResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .UpdatePlatformConfigurationResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .UpdatePlatformConfigurationResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .UpdatePlatformConfigurationResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdatePropertyConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdatePropertyConverter.java new file mode 100644 index 00000000000..6fb2faa3931 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdatePropertyConverter.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdatePropertyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdatePropertyConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.UpdatePropertyRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.UpdatePropertyRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.UpdatePropertyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPropertyId(), "propertyId must not be blank"); + Validate.notNull(request.getUpdatePropertyDetails(), "updatePropertyDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("properties") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPropertyId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdatePropertyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdatePropertyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdatePropertyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .UpdatePropertyResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .UpdatePropertyResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.UpdatePropertyResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .Property>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .Property + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .Property + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model.Property> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.UpdatePropertyResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .UpdatePropertyResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.property(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.UpdatePropertyResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateRunbookConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateRunbookConverter.java new file mode 100644 index 00000000000..e5d52136df3 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateRunbookConverter.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateRunbookConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateRunbookConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.UpdateRunbookRequest interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.UpdateRunbookRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.UpdateRunbookRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getRunbookId(), "runbookId must not be blank"); + Validate.notNull(request.getUpdateRunbookDetails(), "updateRunbookDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("runbooks") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRunbookId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateRunbookResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateRunbookResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateRunbookResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .UpdateRunbookResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .UpdateRunbookResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.UpdateRunbookResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses.UpdateRunbookResponse + .Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .UpdateRunbookResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses.UpdateRunbookResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateSchedulerDefinitionConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateSchedulerDefinitionConverter.java new file mode 100644 index 00000000000..5ba4d180fd2 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateSchedulerDefinitionConverter.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateSchedulerDefinitionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateSchedulerDefinitionConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.UpdateSchedulerDefinitionRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.UpdateSchedulerDefinitionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.UpdateSchedulerDefinitionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSchedulerDefinitionId(), "schedulerDefinitionId must not be blank"); + Validate.notNull( + request.getUpdateSchedulerDefinitionDetails(), + "updateSchedulerDefinitionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("schedulerDefinitions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulerDefinitionId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateSchedulerDefinitionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateSchedulerDefinitionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .UpdateSchedulerDefinitionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .UpdateSchedulerDefinitionResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .UpdateSchedulerDefinitionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.UpdateSchedulerDefinitionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .UpdateSchedulerDefinitionResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .UpdateSchedulerDefinitionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .UpdateSchedulerDefinitionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateSchedulerJobConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateSchedulerJobConverter.java new file mode 100644 index 00000000000..968916f5efa --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateSchedulerJobConverter.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateSchedulerJobConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateSchedulerJobConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.UpdateSchedulerJobRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.UpdateSchedulerJobRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.UpdateSchedulerJobRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getSchedulerJobId(), "schedulerJobId must not be blank"); + Validate.notNull( + request.getUpdateSchedulerJobDetails(), "updateSchedulerJobDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("schedulerJobs") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSchedulerJobId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateSchedulerJobResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateSchedulerJobResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateSchedulerJobResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .UpdateSchedulerJobResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .UpdateSchedulerJobResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.UpdateSchedulerJobResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .SchedulerJob>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .SchedulerJob + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetappsmanagement.model + .SchedulerJob + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetappsmanagement.model + .SchedulerJob> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .UpdateSchedulerJobResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .UpdateSchedulerJobResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.schedulerJob(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .UpdateSchedulerJobResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateTaskRecordConverter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateTaskRecordConverter.java new file mode 100644 index 00000000000..3530693381e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/internal/http/UpdateTaskRecordConverter.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetappsmanagement.model.*; +import com.oracle.bmc.fleetappsmanagement.requests.*; +import com.oracle.bmc.fleetappsmanagement.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateTaskRecordConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateTaskRecordConverter.class); + + public static com.oracle.bmc.fleetappsmanagement.requests.UpdateTaskRecordRequest + interceptRequest( + com.oracle.bmc.fleetappsmanagement.requests.UpdateTaskRecordRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetappsmanagement.requests.UpdateTaskRecordRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getTaskRecordId(), "taskRecordId must not be blank"); + Validate.notNull( + request.getUpdateTaskRecordDetails(), "updateTaskRecordDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230831") + .path("taskRecords") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getTaskRecordId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateTaskRecordResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateTaskRecordResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses.UpdateTaskRecordResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetappsmanagement.responses + .UpdateTaskRecordResponse>() { + @Override + public com.oracle.bmc.fleetappsmanagement.responses + .UpdateTaskRecordResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetappsmanagement.responses.UpdateTaskRecordResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetappsmanagement.responses + .UpdateTaskRecordResponse.Builder + builder = + com.oracle.bmc.fleetappsmanagement.responses + .UpdateTaskRecordResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetappsmanagement.responses + .UpdateTaskRecordResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ActionGroup.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ActionGroup.java new file mode 100644 index 00000000000..9a6d1c524ec --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ActionGroup.java @@ -0,0 +1,440 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Action Group. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ActionGroup.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ActionGroup extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "resourceId", + "type", + "applicationType", + "product", + "lifecycleOperation", + "runbookId", + "targetId", + "subjects" + }) + public ActionGroup( + String resourceId, + LifeCycleActionGroupType type, + String applicationType, + String product, + String lifecycleOperation, + String runbookId, + String targetId, + java.util.List subjects) { + super(); + this.resourceId = resourceId; + this.type = type; + this.applicationType = applicationType; + this.product = product; + this.lifecycleOperation = lifecycleOperation; + this.runbookId = runbookId; + this.targetId = targetId; + this.subjects = subjects; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Provide the ID of the resource. Example fleet ID. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * Provide the ID of the resource. Example fleet ID. + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * ActionGroup Type associated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private LifeCycleActionGroupType type; + + /** + * ActionGroup Type associated. + * @param type the value to set + * @return this builder + **/ + public Builder type(LifeCycleActionGroupType type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * Application Type associated. + * Only applicable if type is ENVIRONMENT. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationType") + private String applicationType; + + /** + * Application Type associated. + * Only applicable if type is ENVIRONMENT. + * + * @param applicationType the value to set + * @return this builder + **/ + public Builder applicationType(String applicationType) { + this.applicationType = applicationType; + this.__explicitlySet__.add("applicationType"); + return this; + } + /** + * Product associated. + * Only applicable if type is PRODUCT. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("product") + private String product; + + /** + * Product associated. + * Only applicable if type is PRODUCT. + * + * @param product the value to set + * @return this builder + **/ + public Builder product(String product) { + this.product = product; + this.__explicitlySet__.add("product"); + return this; + } + /** + * LifeCycle Operation + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleOperation") + private String lifecycleOperation; + + /** + * LifeCycle Operation + * @param lifecycleOperation the value to set + * @return this builder + **/ + public Builder lifecycleOperation(String lifecycleOperation) { + this.lifecycleOperation = lifecycleOperation; + this.__explicitlySet__.add("lifecycleOperation"); + return this; + } + /** + * ID of the runbook + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runbookId") + private String runbookId; + + /** + * ID of the runbook + * @param runbookId the value to set + * @return this builder + **/ + public Builder runbookId(String runbookId) { + this.runbookId = runbookId; + this.__explicitlySet__.add("runbookId"); + return this; + } + /** + * Provide the target if schedule is created against the target + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetId") + private String targetId; + + /** + * Provide the target if schedule is created against the target + * @param targetId the value to set + * @return this builder + **/ + public Builder targetId(String targetId) { + this.targetId = targetId; + this.__explicitlySet__.add("targetId"); + return this; + } + /** + * Provide subjects that need to be considered for the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subjects") + private java.util.List subjects; + + /** + * Provide subjects that need to be considered for the schedule. + * @param subjects the value to set + * @return this builder + **/ + public Builder subjects(java.util.List subjects) { + this.subjects = subjects; + this.__explicitlySet__.add("subjects"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ActionGroup build() { + ActionGroup model = + new ActionGroup( + this.resourceId, + this.type, + this.applicationType, + this.product, + this.lifecycleOperation, + this.runbookId, + this.targetId, + this.subjects); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ActionGroup model) { + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("applicationType")) { + this.applicationType(model.getApplicationType()); + } + if (model.wasPropertyExplicitlySet("product")) { + this.product(model.getProduct()); + } + if (model.wasPropertyExplicitlySet("lifecycleOperation")) { + this.lifecycleOperation(model.getLifecycleOperation()); + } + if (model.wasPropertyExplicitlySet("runbookId")) { + this.runbookId(model.getRunbookId()); + } + if (model.wasPropertyExplicitlySet("targetId")) { + this.targetId(model.getTargetId()); + } + if (model.wasPropertyExplicitlySet("subjects")) { + this.subjects(model.getSubjects()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Provide the ID of the resource. Example fleet ID. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * Provide the ID of the resource. Example fleet ID. + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * ActionGroup Type associated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final LifeCycleActionGroupType type; + + /** + * ActionGroup Type associated. + * @return the value + **/ + public LifeCycleActionGroupType getType() { + return type; + } + + /** + * Application Type associated. + * Only applicable if type is ENVIRONMENT. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationType") + private final String applicationType; + + /** + * Application Type associated. + * Only applicable if type is ENVIRONMENT. + * + * @return the value + **/ + public String getApplicationType() { + return applicationType; + } + + /** + * Product associated. + * Only applicable if type is PRODUCT. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("product") + private final String product; + + /** + * Product associated. + * Only applicable if type is PRODUCT. + * + * @return the value + **/ + public String getProduct() { + return product; + } + + /** + * LifeCycle Operation + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleOperation") + private final String lifecycleOperation; + + /** + * LifeCycle Operation + * @return the value + **/ + public String getLifecycleOperation() { + return lifecycleOperation; + } + + /** + * ID of the runbook + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runbookId") + private final String runbookId; + + /** + * ID of the runbook + * @return the value + **/ + public String getRunbookId() { + return runbookId; + } + + /** + * Provide the target if schedule is created against the target + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetId") + private final String targetId; + + /** + * Provide the target if schedule is created against the target + * @return the value + **/ + public String getTargetId() { + return targetId; + } + + /** + * Provide subjects that need to be considered for the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subjects") + private final java.util.List subjects; + + /** + * Provide subjects that need to be considered for the schedule. + * @return the value + **/ + public java.util.List getSubjects() { + return subjects; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ActionGroup("); + sb.append("super=").append(super.toString()); + sb.append("resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", applicationType=").append(String.valueOf(this.applicationType)); + sb.append(", product=").append(String.valueOf(this.product)); + sb.append(", lifecycleOperation=").append(String.valueOf(this.lifecycleOperation)); + sb.append(", runbookId=").append(String.valueOf(this.runbookId)); + sb.append(", targetId=").append(String.valueOf(this.targetId)); + sb.append(", subjects=").append(String.valueOf(this.subjects)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ActionGroup)) { + return false; + } + + ActionGroup other = (ActionGroup) o; + return java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.applicationType, other.applicationType) + && java.util.Objects.equals(this.product, other.product) + && java.util.Objects.equals(this.lifecycleOperation, other.lifecycleOperation) + && java.util.Objects.equals(this.runbookId, other.runbookId) + && java.util.Objects.equals(this.targetId, other.targetId) + && java.util.Objects.equals(this.subjects, other.subjects) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.applicationType == null ? 43 : this.applicationType.hashCode()); + result = (result * PRIME) + (this.product == null ? 43 : this.product.hashCode()); + result = + (result * PRIME) + + (this.lifecycleOperation == null + ? 43 + : this.lifecycleOperation.hashCode()); + result = (result * PRIME) + (this.runbookId == null ? 43 : this.runbookId.hashCode()); + result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); + result = (result * PRIME) + (this.subjects == null ? 43 : this.subjects.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ActionGroupBasedUserActionDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ActionGroupBasedUserActionDetails.java new file mode 100644 index 00000000000..4966805e25c --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ActionGroupBasedUserActionDetails.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details for a user action to be performed on an action group. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ActionGroupBasedUserActionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "level" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ActionGroupBasedUserActionDetails extends UserActionDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("action") + private Action action; + + public Builder action(Action action) { + this.action = action; + this.__explicitlySet__.add("action"); + return this; + } + /** + * Unique identifier for the action group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroupId") + private String actionGroupId; + + /** + * Unique identifier for the action group. + * @param actionGroupId the value to set + * @return this builder + **/ + public Builder actionGroupId(String actionGroupId) { + this.actionGroupId = actionGroupId; + this.__explicitlySet__.add("actionGroupId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ActionGroupBasedUserActionDetails build() { + ActionGroupBasedUserActionDetails model = + new ActionGroupBasedUserActionDetails(this.action, this.actionGroupId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ActionGroupBasedUserActionDetails model) { + if (model.wasPropertyExplicitlySet("action")) { + this.action(model.getAction()); + } + if (model.wasPropertyExplicitlySet("actionGroupId")) { + this.actionGroupId(model.getActionGroupId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ActionGroupBasedUserActionDetails(Action action, String actionGroupId) { + super(action); + this.actionGroupId = actionGroupId; + } + + /** + * Unique identifier for the action group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroupId") + private final String actionGroupId; + + /** + * Unique identifier for the action group. + * @return the value + **/ + public String getActionGroupId() { + return actionGroupId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ActionGroupBasedUserActionDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", actionGroupId=").append(String.valueOf(this.actionGroupId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ActionGroupBasedUserActionDetails)) { + return false; + } + + ActionGroupBasedUserActionDetails other = (ActionGroupBasedUserActionDetails) o; + return java.util.Objects.equals(this.actionGroupId, other.actionGroupId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.actionGroupId == null ? 43 : this.actionGroupId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ActionGroupDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ActionGroupDetails.java new file mode 100644 index 00000000000..d9ed4a6b1f8 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ActionGroupDetails.java @@ -0,0 +1,570 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Action Group details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ActionGroupDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ActionGroupDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "resourceId", + "name", + "type", + "applicationType", + "product", + "lifecycleOperation", + "activityId", + "status", + "timeStarted", + "timeEnded", + "runbookId" + }) + public ActionGroupDetails( + String resourceId, + String name, + LifeCycleActionGroupType type, + String applicationType, + String product, + String lifecycleOperation, + String activityId, + JobStatus status, + java.util.Date timeStarted, + java.util.Date timeEnded, + String runbookId) { + super(); + this.resourceId = resourceId; + this.name = name; + this.type = type; + this.applicationType = applicationType; + this.product = product; + this.lifecycleOperation = lifecycleOperation; + this.activityId = activityId; + this.status = status; + this.timeStarted = timeStarted; + this.timeEnded = timeEnded; + this.runbookId = runbookId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The ID of the ActionGroup resource. + * Ex:fleetId. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * The ID of the ActionGroup resource. + * Ex:fleetId. + * + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * Name of the ActionGroup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Name of the ActionGroup. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Type of the ActionGroup + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private LifeCycleActionGroupType type; + + /** + * Type of the ActionGroup + * @param type the value to set + * @return this builder + **/ + public Builder type(LifeCycleActionGroupType type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * Application Type associated. + * Only applicable if actionGroup type is ENVIRONMENT. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationType") + private String applicationType; + + /** + * Application Type associated. + * Only applicable if actionGroup type is ENVIRONMENT. + * + * @param applicationType the value to set + * @return this builder + **/ + public Builder applicationType(String applicationType) { + this.applicationType = applicationType; + this.__explicitlySet__.add("applicationType"); + return this; + } + /** + * Product associated. + * Only applicable if actionGroup type is PRODUCT. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("product") + private String product; + + /** + * Product associated. + * Only applicable if actionGroup type is PRODUCT. + * + * @param product the value to set + * @return this builder + **/ + public Builder product(String product) { + this.product = product; + this.__explicitlySet__.add("product"); + return this; + } + /** + * LifeCycle Operation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleOperation") + private String lifecycleOperation; + + /** + * LifeCycle Operation. + * @param lifecycleOperation the value to set + * @return this builder + **/ + public Builder lifecycleOperation(String lifecycleOperation) { + this.lifecycleOperation = lifecycleOperation; + this.__explicitlySet__.add("lifecycleOperation"); + return this; + } + /** + * Unique producer Id at Action Group Level + **/ + @com.fasterxml.jackson.annotation.JsonProperty("activityId") + private String activityId; + + /** + * Unique producer Id at Action Group Level + * @param activityId the value to set + * @return this builder + **/ + public Builder activityId(String activityId) { + this.activityId = activityId; + this.__explicitlySet__.add("activityId"); + return this; + } + /** + * Status of the Job at Action Group Level. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private JobStatus status; + + /** + * Status of the Job at Action Group Level. + * @param status the value to set + * @return this builder + **/ + public Builder status(JobStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The time the Scheduler Job started. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The time the Scheduler Job started. An RFC3339 formatted datetime string. + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The time the Scheduler Job ended. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + private java.util.Date timeEnded; + + /** + * The time the Scheduler Job ended. An RFC3339 formatted datetime string. + * @param timeEnded the value to set + * @return this builder + **/ + public Builder timeEnded(java.util.Date timeEnded) { + this.timeEnded = timeEnded; + this.__explicitlySet__.add("timeEnded"); + return this; + } + /** + * OCID of the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runbookId") + private String runbookId; + + /** + * OCID of the runbook. + * @param runbookId the value to set + * @return this builder + **/ + public Builder runbookId(String runbookId) { + this.runbookId = runbookId; + this.__explicitlySet__.add("runbookId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ActionGroupDetails build() { + ActionGroupDetails model = + new ActionGroupDetails( + this.resourceId, + this.name, + this.type, + this.applicationType, + this.product, + this.lifecycleOperation, + this.activityId, + this.status, + this.timeStarted, + this.timeEnded, + this.runbookId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ActionGroupDetails model) { + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("applicationType")) { + this.applicationType(model.getApplicationType()); + } + if (model.wasPropertyExplicitlySet("product")) { + this.product(model.getProduct()); + } + if (model.wasPropertyExplicitlySet("lifecycleOperation")) { + this.lifecycleOperation(model.getLifecycleOperation()); + } + if (model.wasPropertyExplicitlySet("activityId")) { + this.activityId(model.getActivityId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeEnded")) { + this.timeEnded(model.getTimeEnded()); + } + if (model.wasPropertyExplicitlySet("runbookId")) { + this.runbookId(model.getRunbookId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The ID of the ActionGroup resource. + * Ex:fleetId. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * The ID of the ActionGroup resource. + * Ex:fleetId. + * + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * Name of the ActionGroup. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name of the ActionGroup. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Type of the ActionGroup + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final LifeCycleActionGroupType type; + + /** + * Type of the ActionGroup + * @return the value + **/ + public LifeCycleActionGroupType getType() { + return type; + } + + /** + * Application Type associated. + * Only applicable if actionGroup type is ENVIRONMENT. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationType") + private final String applicationType; + + /** + * Application Type associated. + * Only applicable if actionGroup type is ENVIRONMENT. + * + * @return the value + **/ + public String getApplicationType() { + return applicationType; + } + + /** + * Product associated. + * Only applicable if actionGroup type is PRODUCT. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("product") + private final String product; + + /** + * Product associated. + * Only applicable if actionGroup type is PRODUCT. + * + * @return the value + **/ + public String getProduct() { + return product; + } + + /** + * LifeCycle Operation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleOperation") + private final String lifecycleOperation; + + /** + * LifeCycle Operation. + * @return the value + **/ + public String getLifecycleOperation() { + return lifecycleOperation; + } + + /** + * Unique producer Id at Action Group Level + **/ + @com.fasterxml.jackson.annotation.JsonProperty("activityId") + private final String activityId; + + /** + * Unique producer Id at Action Group Level + * @return the value + **/ + public String getActivityId() { + return activityId; + } + + /** + * Status of the Job at Action Group Level. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final JobStatus status; + + /** + * Status of the Job at Action Group Level. + * @return the value + **/ + public JobStatus getStatus() { + return status; + } + + /** + * The time the Scheduler Job started. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The time the Scheduler Job started. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The time the Scheduler Job ended. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + private final java.util.Date timeEnded; + + /** + * The time the Scheduler Job ended. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeEnded() { + return timeEnded; + } + + /** + * OCID of the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runbookId") + private final String runbookId; + + /** + * OCID of the runbook. + * @return the value + **/ + public String getRunbookId() { + return runbookId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ActionGroupDetails("); + sb.append("super=").append(super.toString()); + sb.append("resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", applicationType=").append(String.valueOf(this.applicationType)); + sb.append(", product=").append(String.valueOf(this.product)); + sb.append(", lifecycleOperation=").append(String.valueOf(this.lifecycleOperation)); + sb.append(", activityId=").append(String.valueOf(this.activityId)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeEnded=").append(String.valueOf(this.timeEnded)); + sb.append(", runbookId=").append(String.valueOf(this.runbookId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ActionGroupDetails)) { + return false; + } + + ActionGroupDetails other = (ActionGroupDetails) o; + return java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.applicationType, other.applicationType) + && java.util.Objects.equals(this.product, other.product) + && java.util.Objects.equals(this.lifecycleOperation, other.lifecycleOperation) + && java.util.Objects.equals(this.activityId, other.activityId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeEnded, other.timeEnded) + && java.util.Objects.equals(this.runbookId, other.runbookId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.applicationType == null ? 43 : this.applicationType.hashCode()); + result = (result * PRIME) + (this.product == null ? 43 : this.product.hashCode()); + result = + (result * PRIME) + + (this.lifecycleOperation == null + ? 43 + : this.lifecycleOperation.hashCode()); + result = (result * PRIME) + (this.activityId == null ? 43 : this.activityId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeEnded == null ? 43 : this.timeEnded.hashCode()); + result = (result * PRIME) + (this.runbookId == null ? 43 : this.runbookId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ActionType.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ActionType.java new file mode 100644 index 00000000000..e6ca945df2b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ActionType.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Possible types of actions. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public enum ActionType { + Created("CREATED"), + Updated("UPDATED"), + Deleted("DELETED"), + InProgress("IN_PROGRESS"), + Related("RELATED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(ActionType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActionType v : ActionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ActionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ActionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ActionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ActivityResourceTarget.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ActivityResourceTarget.java new file mode 100644 index 00000000000..cece6ea8af2 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ActivityResourceTarget.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Activity Resource Target. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ActivityResourceTarget.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ActivityResourceTarget + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"targetName", "status", "description"}) + public ActivityResourceTarget(String targetName, JobStatus status, String description) { + super(); + this.targetName = targetName; + this.status = status; + this.description = description; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Target Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetName") + private String targetName; + + /** + * Target Name. + * @param targetName the value to set + * @return this builder + **/ + public Builder targetName(String targetName) { + this.targetName = targetName; + this.__explicitlySet__.add("targetName"); + return this; + } + /** + * Status of the Job at target Level. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private JobStatus status; + + /** + * Status of the Job at target Level. + * @param status the value to set + * @return this builder + **/ + public Builder status(JobStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * Description of the Execution status. + * If there are any errors, this can also include a short error message. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the Execution status. + * If there are any errors, this can also include a short error message. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ActivityResourceTarget build() { + ActivityResourceTarget model = + new ActivityResourceTarget(this.targetName, this.status, this.description); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ActivityResourceTarget model) { + if (model.wasPropertyExplicitlySet("targetName")) { + this.targetName(model.getTargetName()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Target Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetName") + private final String targetName; + + /** + * Target Name. + * @return the value + **/ + public String getTargetName() { + return targetName; + } + + /** + * Status of the Job at target Level. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final JobStatus status; + + /** + * Status of the Job at target Level. + * @return the value + **/ + public JobStatus getStatus() { + return status; + } + + /** + * Description of the Execution status. + * If there are any errors, this can also include a short error message. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the Execution status. + * If there are any errors, this can also include a short error message. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ActivityResourceTarget("); + sb.append("super=").append(super.toString()); + sb.append("targetName=").append(String.valueOf(this.targetName)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ActivityResourceTarget)) { + return false; + } + + ActivityResourceTarget other = (ActivityResourceTarget) o; + return java.util.Objects.equals(this.targetName, other.targetName) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.description, other.description) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.targetName == null ? 43 : this.targetName.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AnnouncementCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AnnouncementCollection.java new file mode 100644 index 00000000000..df9d753fda4 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AnnouncementCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of list announcements. Contains AnnouncementSummary items. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AnnouncementCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AnnouncementCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public AnnouncementCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of AnnouncementSummary items + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of AnnouncementSummary items + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AnnouncementCollection build() { + AnnouncementCollection model = new AnnouncementCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AnnouncementCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of AnnouncementSummary items + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of AnnouncementSummary items + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AnnouncementCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AnnouncementCollection)) { + return false; + } + + AnnouncementCollection other = (AnnouncementCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AnnouncementSortBy.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AnnouncementSortBy.java new file mode 100644 index 00000000000..1c620ac4403 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AnnouncementSortBy.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The field to sort AnnouncementSummary. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public enum AnnouncementSortBy { + TimeReleased("timeReleased"), + Summary("summary"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (AnnouncementSortBy v : AnnouncementSortBy.values()) { + map.put(v.getValue(), v); + } + } + + AnnouncementSortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AnnouncementSortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid AnnouncementSortBy: " + key); + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AnnouncementSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AnnouncementSummary.java new file mode 100644 index 00000000000..200c85120c9 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AnnouncementSummary.java @@ -0,0 +1,889 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * A summary of announcements for Fleet Application Management. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AnnouncementSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AnnouncementSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "resourceRegion", + "displayName", + "description", + "timeCreated", + "timeUpdated", + "type", + "summary", + "details", + "url", + "announcementStart", + "announcementEnd", + "lifecycleState", + "freeformTags", + "definedTags", + "systemTags" + }) + public AnnouncementSummary( + String id, + String compartmentId, + String resourceRegion, + String displayName, + String description, + java.util.Date timeCreated, + java.util.Date timeUpdated, + String type, + String summary, + String details, + String url, + java.util.Date announcementStart, + java.util.Date announcementEnd, + LifecycleState lifecycleState, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.resourceRegion = resourceRegion; + this.displayName = displayName; + this.description = description; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.type = type; + this.summary = summary; + this.details = details; + this.url = url; + this.announcementStart = announcementStart; + this.announcementEnd = announcementEnd; + this.lifecycleState = lifecycleState; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Type of announcement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private String type; + + /** + * Type of announcement. + * @param type the value to set + * @return this builder + **/ + public Builder type(String type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * Summary of the announcement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("summary") + private String summary; + + /** + * Summary of the announcement. + * @param summary the value to set + * @return this builder + **/ + public Builder summary(String summary) { + this.summary = summary; + this.__explicitlySet__.add("summary"); + return this; + } + /** + * Announcement Details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("details") + private String details; + + /** + * Announcement Details. + * @param details the value to set + * @return this builder + **/ + public Builder details(String details) { + this.details = details; + this.__explicitlySet__.add("details"); + return this; + } + /** + * URL to the announcement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("url") + private String url; + + /** + * URL to the announcement. + * @param url the value to set + * @return this builder + **/ + public Builder url(String url) { + this.url = url; + this.__explicitlySet__.add("url"); + return this; + } + /** + * Announcement start date. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("announcementStart") + private java.util.Date announcementStart; + + /** + * Announcement start date. + * @param announcementStart the value to set + * @return this builder + **/ + public Builder announcementStart(java.util.Date announcementStart) { + this.announcementStart = announcementStart; + this.__explicitlySet__.add("announcementStart"); + return this; + } + /** + * Announcement end date + **/ + @com.fasterxml.jackson.annotation.JsonProperty("announcementEnd") + private java.util.Date announcementEnd; + + /** + * Announcement end date + * @param announcementEnd the value to set + * @return this builder + **/ + public Builder announcementEnd(java.util.Date announcementEnd) { + this.announcementEnd = announcementEnd; + this.__explicitlySet__.add("announcementEnd"); + return this; + } + /** + * The lifecycle state of the announcement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The lifecycle state of the announcement. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AnnouncementSummary build() { + AnnouncementSummary model = + new AnnouncementSummary( + this.id, + this.compartmentId, + this.resourceRegion, + this.displayName, + this.description, + this.timeCreated, + this.timeUpdated, + this.type, + this.summary, + this.details, + this.url, + this.announcementStart, + this.announcementEnd, + this.lifecycleState, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AnnouncementSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("summary")) { + this.summary(model.getSummary()); + } + if (model.wasPropertyExplicitlySet("details")) { + this.details(model.getDetails()); + } + if (model.wasPropertyExplicitlySet("url")) { + this.url(model.getUrl()); + } + if (model.wasPropertyExplicitlySet("announcementStart")) { + this.announcementStart(model.getAnnouncementStart()); + } + if (model.wasPropertyExplicitlySet("announcementEnd")) { + this.announcementEnd(model.getAnnouncementEnd()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Type of announcement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final String type; + + /** + * Type of announcement. + * @return the value + **/ + public String getType() { + return type; + } + + /** + * Summary of the announcement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("summary") + private final String summary; + + /** + * Summary of the announcement. + * @return the value + **/ + public String getSummary() { + return summary; + } + + /** + * Announcement Details. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("details") + private final String details; + + /** + * Announcement Details. + * @return the value + **/ + public String getDetails() { + return details; + } + + /** + * URL to the announcement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("url") + private final String url; + + /** + * URL to the announcement. + * @return the value + **/ + public String getUrl() { + return url; + } + + /** + * Announcement start date. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("announcementStart") + private final java.util.Date announcementStart; + + /** + * Announcement start date. + * @return the value + **/ + public java.util.Date getAnnouncementStart() { + return announcementStart; + } + + /** + * Announcement end date + **/ + @com.fasterxml.jackson.annotation.JsonProperty("announcementEnd") + private final java.util.Date announcementEnd; + + /** + * Announcement end date + * @return the value + **/ + public java.util.Date getAnnouncementEnd() { + return announcementEnd; + } + + /** + * The lifecycle state of the announcement. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Inactive("INACTIVE"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The lifecycle state of the announcement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The lifecycle state of the announcement. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AnnouncementSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", summary=").append(String.valueOf(this.summary)); + sb.append(", details=").append(String.valueOf(this.details)); + sb.append(", url=").append(String.valueOf(this.url)); + sb.append(", announcementStart=").append(String.valueOf(this.announcementStart)); + sb.append(", announcementEnd=").append(String.valueOf(this.announcementEnd)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AnnouncementSummary)) { + return false; + } + + AnnouncementSummary other = (AnnouncementSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.summary, other.summary) + && java.util.Objects.equals(this.details, other.details) + && java.util.Objects.equals(this.url, other.url) + && java.util.Objects.equals(this.announcementStart, other.announcementStart) + && java.util.Objects.equals(this.announcementEnd, other.announcementEnd) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + (this.summary == null ? 43 : this.summary.hashCode()); + result = (result * PRIME) + (this.details == null ? 43 : this.details.hashCode()); + result = (result * PRIME) + (this.url == null ? 43 : this.url.hashCode()); + result = + (result * PRIME) + + (this.announcementStart == null ? 43 : this.announcementStart.hashCode()); + result = + (result * PRIME) + + (this.announcementEnd == null ? 43 : this.announcementEnd.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ApiBasedExecutionDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ApiBasedExecutionDetails.java new file mode 100644 index 00000000000..8944141710e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ApiBasedExecutionDetails.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details for API-based execution. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ApiBasedExecutionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "executionType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ApiBasedExecutionDetails extends ExecutionDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Endpoint to be invoked. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("endpoint") + private String endpoint; + + /** + * Endpoint to be invoked. + * @param endpoint the value to set + * @return this builder + **/ + public Builder endpoint(String endpoint) { + this.endpoint = endpoint; + this.__explicitlySet__.add("endpoint"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ApiBasedExecutionDetails build() { + ApiBasedExecutionDetails model = new ApiBasedExecutionDetails(this.endpoint); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ApiBasedExecutionDetails model) { + if (model.wasPropertyExplicitlySet("endpoint")) { + this.endpoint(model.getEndpoint()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ApiBasedExecutionDetails(String endpoint) { + super(); + this.endpoint = endpoint; + } + + /** + * Endpoint to be invoked. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("endpoint") + private final String endpoint; + + /** + * Endpoint to be invoked. + * @return the value + **/ + public String getEndpoint() { + return endpoint; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ApiBasedExecutionDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", endpoint=").append(String.valueOf(this.endpoint)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ApiBasedExecutionDetails)) { + return false; + } + + ApiBasedExecutionDetails other = (ApiBasedExecutionDetails) o; + return java.util.Objects.equals(this.endpoint, other.endpoint) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.endpoint == null ? 43 : this.endpoint.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ArtifactDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ArtifactDetails.java new file mode 100644 index 00000000000..7c885930d21 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ArtifactDetails.java @@ -0,0 +1,129 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Patch artifact description and content details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "category", + defaultImpl = ArtifactDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PlatformSpecificArtifactDetails.class, + name = "PLATFORM_SPECIFIC" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = GenericArtifactDetails.class, + name = "GENERIC" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ArtifactDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected ArtifactDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ArtifactDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ArtifactDetails)) { + return false; + } + + ArtifactDetails other = (ArtifactDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Artifact category details. + **/ + public enum Category { + Generic("GENERIC"), + PlatformSpecific("PLATFORM_SPECIFIC"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(Category.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Category v : Category.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Category(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Category create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Category', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedFleetCredentialDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedFleetCredentialDetails.java new file mode 100644 index 00000000000..50fdb7ddff0 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedFleetCredentialDetails.java @@ -0,0 +1,279 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information about associated FleetCredential. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AssociatedFleetCredentialDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AssociatedFleetCredentialDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "compartmentId", + "entitySpecifics", + "user", + "password" + }) + public AssociatedFleetCredentialDetails( + String displayName, + String compartmentId, + CredentialEntitySpecificDetails entitySpecifics, + CredentialDetails user, + CredentialDetails password) { + super(); + this.displayName = displayName; + this.compartmentId = compartmentId; + this.entitySpecifics = entitySpecifics; + this.user = user; + this.password = password; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("entitySpecifics") + private CredentialEntitySpecificDetails entitySpecifics; + + public Builder entitySpecifics(CredentialEntitySpecificDetails entitySpecifics) { + this.entitySpecifics = entitySpecifics; + this.__explicitlySet__.add("entitySpecifics"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("user") + private CredentialDetails user; + + public Builder user(CredentialDetails user) { + this.user = user; + this.__explicitlySet__.add("user"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("password") + private CredentialDetails password; + + public Builder password(CredentialDetails password) { + this.password = password; + this.__explicitlySet__.add("password"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AssociatedFleetCredentialDetails build() { + AssociatedFleetCredentialDetails model = + new AssociatedFleetCredentialDetails( + this.displayName, + this.compartmentId, + this.entitySpecifics, + this.user, + this.password); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AssociatedFleetCredentialDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("entitySpecifics")) { + this.entitySpecifics(model.getEntitySpecifics()); + } + if (model.wasPropertyExplicitlySet("user")) { + this.user(model.getUser()); + } + if (model.wasPropertyExplicitlySet("password")) { + this.password(model.getPassword()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("entitySpecifics") + private final CredentialEntitySpecificDetails entitySpecifics; + + public CredentialEntitySpecificDetails getEntitySpecifics() { + return entitySpecifics; + } + + @com.fasterxml.jackson.annotation.JsonProperty("user") + private final CredentialDetails user; + + public CredentialDetails getUser() { + return user; + } + + @com.fasterxml.jackson.annotation.JsonProperty("password") + private final CredentialDetails password; + + public CredentialDetails getPassword() { + return password; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AssociatedFleetCredentialDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", entitySpecifics=").append(String.valueOf(this.entitySpecifics)); + sb.append(", user=").append(String.valueOf(this.user)); + sb.append(", password=").append(String.valueOf(this.password)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AssociatedFleetCredentialDetails)) { + return false; + } + + AssociatedFleetCredentialDetails other = (AssociatedFleetCredentialDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.entitySpecifics, other.entitySpecifics) + && java.util.Objects.equals(this.user, other.user) + && java.util.Objects.equals(this.password, other.password) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.entitySpecifics == null ? 43 : this.entitySpecifics.hashCode()); + result = (result * PRIME) + (this.user == null ? 43 : this.user.hashCode()); + result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedFleetPropertyDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedFleetPropertyDetails.java new file mode 100644 index 00000000000..effe4d88fe5 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedFleetPropertyDetails.java @@ -0,0 +1,369 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information about associated FleetProperty. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AssociatedFleetPropertyDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AssociatedFleetPropertyDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "displayName", + "fleetPropertyType", + "value", + "isRequired" + }) + public AssociatedFleetPropertyDetails( + String compartmentId, + String displayName, + FleetPropertyType fleetPropertyType, + String value, + Boolean isRequired) { + super(); + this.compartmentId = compartmentId; + this.displayName = displayName; + this.fleetPropertyType = fleetPropertyType; + this.value = value; + this.isRequired = isRequired; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Type of the FleetProperty. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetPropertyType") + private FleetPropertyType fleetPropertyType; + + /** + * Type of the FleetProperty. + * @param fleetPropertyType the value to set + * @return this builder + **/ + public Builder fleetPropertyType(FleetPropertyType fleetPropertyType) { + this.fleetPropertyType = fleetPropertyType; + this.__explicitlySet__.add("fleetPropertyType"); + return this; + } + /** + * Value of the Property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + /** + * Value of the Property. + * @param value the value to set + * @return this builder + **/ + public Builder value(String value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + /** + * Property is required or not. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRequired") + private Boolean isRequired; + + /** + * Property is required or not. + * @param isRequired the value to set + * @return this builder + **/ + public Builder isRequired(Boolean isRequired) { + this.isRequired = isRequired; + this.__explicitlySet__.add("isRequired"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AssociatedFleetPropertyDetails build() { + AssociatedFleetPropertyDetails model = + new AssociatedFleetPropertyDetails( + this.compartmentId, + this.displayName, + this.fleetPropertyType, + this.value, + this.isRequired); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AssociatedFleetPropertyDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("fleetPropertyType")) { + this.fleetPropertyType(model.getFleetPropertyType()); + } + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + if (model.wasPropertyExplicitlySet("isRequired")) { + this.isRequired(model.getIsRequired()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Type of the FleetProperty. + **/ + public enum FleetPropertyType { + String("STRING"), + Number("NUMBER"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(FleetPropertyType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (FleetPropertyType v : FleetPropertyType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + FleetPropertyType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static FleetPropertyType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'FleetPropertyType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Type of the FleetProperty. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetPropertyType") + private final FleetPropertyType fleetPropertyType; + + /** + * Type of the FleetProperty. + * @return the value + **/ + public FleetPropertyType getFleetPropertyType() { + return fleetPropertyType; + } + + /** + * Value of the Property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final String value; + + /** + * Value of the Property. + * @return the value + **/ + public String getValue() { + return value; + } + + /** + * Property is required or not. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRequired") + private final Boolean isRequired; + + /** + * Property is required or not. + * @return the value + **/ + public Boolean getIsRequired() { + return isRequired; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AssociatedFleetPropertyDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", fleetPropertyType=").append(String.valueOf(this.fleetPropertyType)); + sb.append(", value=").append(String.valueOf(this.value)); + sb.append(", isRequired=").append(String.valueOf(this.isRequired)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AssociatedFleetPropertyDetails)) { + return false; + } + + AssociatedFleetPropertyDetails other = (AssociatedFleetPropertyDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.fleetPropertyType, other.fleetPropertyType) + && java.util.Objects.equals(this.value, other.value) + && java.util.Objects.equals(this.isRequired, other.isRequired) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.fleetPropertyType == null ? 43 : this.fleetPropertyType.hashCode()); + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + result = (result * PRIME) + (this.isRequired == null ? 43 : this.isRequired.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedFleetResourceDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedFleetResourceDetails.java new file mode 100644 index 00000000000..0c6d09adf61 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedFleetResourceDetails.java @@ -0,0 +1,262 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information about associated FleetResource. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AssociatedFleetResourceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AssociatedFleetResourceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "resourceId", + "fleetResourceType", + "compartmentId", + "tenancyId" + }) + public AssociatedFleetResourceDetails( + String resourceId, String fleetResourceType, String compartmentId, String tenancyId) { + super(); + this.resourceId = resourceId; + this.fleetResourceType = fleetResourceType; + this.compartmentId = compartmentId; + this.tenancyId = tenancyId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * OCID of the resource. + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * Type of the FleetResource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetResourceType") + private String fleetResourceType; + + /** + * Type of the FleetResource. + * @param fleetResourceType the value to set + * @return this builder + **/ + public Builder fleetResourceType(String fleetResourceType) { + this.fleetResourceType = fleetResourceType; + this.__explicitlySet__.add("fleetResourceType"); + return this; + } + /** + * Compartment Identifier[OCID]. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Compartment Identifier[OCID]. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Tenancy Identifier[OCID]. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private String tenancyId; + + /** + * Tenancy Identifier[OCID]. + * @param tenancyId the value to set + * @return this builder + **/ + public Builder tenancyId(String tenancyId) { + this.tenancyId = tenancyId; + this.__explicitlySet__.add("tenancyId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AssociatedFleetResourceDetails build() { + AssociatedFleetResourceDetails model = + new AssociatedFleetResourceDetails( + this.resourceId, + this.fleetResourceType, + this.compartmentId, + this.tenancyId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AssociatedFleetResourceDetails model) { + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("fleetResourceType")) { + this.fleetResourceType(model.getFleetResourceType()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("tenancyId")) { + this.tenancyId(model.getTenancyId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * OCID of the resource. + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * Type of the FleetResource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetResourceType") + private final String fleetResourceType; + + /** + * Type of the FleetResource. + * @return the value + **/ + public String getFleetResourceType() { + return fleetResourceType; + } + + /** + * Compartment Identifier[OCID]. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Compartment Identifier[OCID]. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Tenancy Identifier[OCID]. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private final String tenancyId; + + /** + * Tenancy Identifier[OCID]. + * @return the value + **/ + public String getTenancyId() { + return tenancyId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AssociatedFleetResourceDetails("); + sb.append("super=").append(super.toString()); + sb.append("resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", fleetResourceType=").append(String.valueOf(this.fleetResourceType)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", tenancyId=").append(String.valueOf(this.tenancyId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AssociatedFleetResourceDetails)) { + return false; + } + + AssociatedFleetResourceDetails other = (AssociatedFleetResourceDetails) o; + return java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.fleetResourceType, other.fleetResourceType) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.tenancyId, other.tenancyId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = + (result * PRIME) + + (this.fleetResourceType == null ? 43 : this.fleetResourceType.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.tenancyId == null ? 43 : this.tenancyId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedLocalTaskDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedLocalTaskDetails.java new file mode 100644 index 00000000000..a97bb2a797a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedLocalTaskDetails.java @@ -0,0 +1,442 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The details of the local task. + * The local tasks are specific to a single runbook. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AssociatedLocalTaskDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "scope" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AssociatedLocalTaskDetails extends AssociatedTaskDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("executionDetails") + private ExecutionDetails executionDetails; + + public Builder executionDetails(ExecutionDetails executionDetails) { + this.executionDetails = executionDetails; + this.__explicitlySet__.add("executionDetails"); + return this; + } + /** + * The description of the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description of the task. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The platform of the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platform") + private String platform; + + /** + * The platform of the runbook. + * @param platform the value to set + * @return this builder + **/ + public Builder platform(String platform) { + this.platform = platform; + this.__explicitlySet__.add("platform"); + return this; + } + /** + * Make a copy of this task in Library + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCopyToLibraryEnabled") + private Boolean isCopyToLibraryEnabled; + + /** + * Make a copy of this task in Library + * @param isCopyToLibraryEnabled the value to set + * @return this builder + **/ + public Builder isCopyToLibraryEnabled(Boolean isCopyToLibraryEnabled) { + this.isCopyToLibraryEnabled = isCopyToLibraryEnabled; + this.__explicitlySet__.add("isCopyToLibraryEnabled"); + return this; + } + /** + * The OS for the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osType") + private OsType osType; + + /** + * The OS for the task. + * @param osType the value to set + * @return this builder + **/ + public Builder osType(OsType osType) { + this.osType = osType; + this.__explicitlySet__.add("osType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("properties") + private Properties properties; + + public Builder properties(Properties properties) { + this.properties = properties; + this.__explicitlySet__.add("properties"); + return this; + } + /** + * Is this a discovery output task? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDiscoveryOutputTask") + private Boolean isDiscoveryOutputTask; + + /** + * Is this a discovery output task? + * @param isDiscoveryOutputTask the value to set + * @return this builder + **/ + public Builder isDiscoveryOutputTask(Boolean isDiscoveryOutputTask) { + this.isDiscoveryOutputTask = isDiscoveryOutputTask; + this.__explicitlySet__.add("isDiscoveryOutputTask"); + return this; + } + /** + * Is this an Apply Subject Task? Ex. Patch Execution Task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isApplySubjectTask") + private Boolean isApplySubjectTask; + + /** + * Is this an Apply Subject Task? Ex. Patch Execution Task + * @param isApplySubjectTask the value to set + * @return this builder + **/ + public Builder isApplySubjectTask(Boolean isApplySubjectTask) { + this.isApplySubjectTask = isApplySubjectTask; + this.__explicitlySet__.add("isApplySubjectTask"); + return this; + } + /** + * The name of the task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of the task + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AssociatedLocalTaskDetails build() { + AssociatedLocalTaskDetails model = + new AssociatedLocalTaskDetails( + this.executionDetails, + this.description, + this.platform, + this.isCopyToLibraryEnabled, + this.osType, + this.properties, + this.isDiscoveryOutputTask, + this.isApplySubjectTask, + this.name); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AssociatedLocalTaskDetails model) { + if (model.wasPropertyExplicitlySet("executionDetails")) { + this.executionDetails(model.getExecutionDetails()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("platform")) { + this.platform(model.getPlatform()); + } + if (model.wasPropertyExplicitlySet("isCopyToLibraryEnabled")) { + this.isCopyToLibraryEnabled(model.getIsCopyToLibraryEnabled()); + } + if (model.wasPropertyExplicitlySet("osType")) { + this.osType(model.getOsType()); + } + if (model.wasPropertyExplicitlySet("properties")) { + this.properties(model.getProperties()); + } + if (model.wasPropertyExplicitlySet("isDiscoveryOutputTask")) { + this.isDiscoveryOutputTask(model.getIsDiscoveryOutputTask()); + } + if (model.wasPropertyExplicitlySet("isApplySubjectTask")) { + this.isApplySubjectTask(model.getIsApplySubjectTask()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public AssociatedLocalTaskDetails( + ExecutionDetails executionDetails, + String description, + String platform, + Boolean isCopyToLibraryEnabled, + OsType osType, + Properties properties, + Boolean isDiscoveryOutputTask, + Boolean isApplySubjectTask, + String name) { + super(); + this.executionDetails = executionDetails; + this.description = description; + this.platform = platform; + this.isCopyToLibraryEnabled = isCopyToLibraryEnabled; + this.osType = osType; + this.properties = properties; + this.isDiscoveryOutputTask = isDiscoveryOutputTask; + this.isApplySubjectTask = isApplySubjectTask; + this.name = name; + } + + @com.fasterxml.jackson.annotation.JsonProperty("executionDetails") + private final ExecutionDetails executionDetails; + + public ExecutionDetails getExecutionDetails() { + return executionDetails; + } + + /** + * The description of the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description of the task. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The platform of the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platform") + private final String platform; + + /** + * The platform of the runbook. + * @return the value + **/ + public String getPlatform() { + return platform; + } + + /** + * Make a copy of this task in Library + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCopyToLibraryEnabled") + private final Boolean isCopyToLibraryEnabled; + + /** + * Make a copy of this task in Library + * @return the value + **/ + public Boolean getIsCopyToLibraryEnabled() { + return isCopyToLibraryEnabled; + } + + /** + * The OS for the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osType") + private final OsType osType; + + /** + * The OS for the task. + * @return the value + **/ + public OsType getOsType() { + return osType; + } + + @com.fasterxml.jackson.annotation.JsonProperty("properties") + private final Properties properties; + + public Properties getProperties() { + return properties; + } + + /** + * Is this a discovery output task? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDiscoveryOutputTask") + private final Boolean isDiscoveryOutputTask; + + /** + * Is this a discovery output task? + * @return the value + **/ + public Boolean getIsDiscoveryOutputTask() { + return isDiscoveryOutputTask; + } + + /** + * Is this an Apply Subject Task? Ex. Patch Execution Task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isApplySubjectTask") + private final Boolean isApplySubjectTask; + + /** + * Is this an Apply Subject Task? Ex. Patch Execution Task + * @return the value + **/ + public Boolean getIsApplySubjectTask() { + return isApplySubjectTask; + } + + /** + * The name of the task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the task + * @return the value + **/ + public String getName() { + return name; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AssociatedLocalTaskDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", executionDetails=").append(String.valueOf(this.executionDetails)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", platform=").append(String.valueOf(this.platform)); + sb.append(", isCopyToLibraryEnabled=").append(String.valueOf(this.isCopyToLibraryEnabled)); + sb.append(", osType=").append(String.valueOf(this.osType)); + sb.append(", properties=").append(String.valueOf(this.properties)); + sb.append(", isDiscoveryOutputTask=").append(String.valueOf(this.isDiscoveryOutputTask)); + sb.append(", isApplySubjectTask=").append(String.valueOf(this.isApplySubjectTask)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AssociatedLocalTaskDetails)) { + return false; + } + + AssociatedLocalTaskDetails other = (AssociatedLocalTaskDetails) o; + return java.util.Objects.equals(this.executionDetails, other.executionDetails) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.platform, other.platform) + && java.util.Objects.equals( + this.isCopyToLibraryEnabled, other.isCopyToLibraryEnabled) + && java.util.Objects.equals(this.osType, other.osType) + && java.util.Objects.equals(this.properties, other.properties) + && java.util.Objects.equals(this.isDiscoveryOutputTask, other.isDiscoveryOutputTask) + && java.util.Objects.equals(this.isApplySubjectTask, other.isApplySubjectTask) + && java.util.Objects.equals(this.name, other.name) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.executionDetails == null ? 43 : this.executionDetails.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.platform == null ? 43 : this.platform.hashCode()); + result = + (result * PRIME) + + (this.isCopyToLibraryEnabled == null + ? 43 + : this.isCopyToLibraryEnabled.hashCode()); + result = (result * PRIME) + (this.osType == null ? 43 : this.osType.hashCode()); + result = (result * PRIME) + (this.properties == null ? 43 : this.properties.hashCode()); + result = + (result * PRIME) + + (this.isDiscoveryOutputTask == null + ? 43 + : this.isDiscoveryOutputTask.hashCode()); + result = + (result * PRIME) + + (this.isApplySubjectTask == null + ? 43 + : this.isApplySubjectTask.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedSchedulerDefinition.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedSchedulerDefinition.java new file mode 100644 index 00000000000..2ee92b2e6c1 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedSchedulerDefinition.java @@ -0,0 +1,266 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * SchedulerDefinition associated with the job. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AssociatedSchedulerDefinition.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AssociatedSchedulerDefinition + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"id", "displayName", "tenancyId", "isRecurring"}) + public AssociatedSchedulerDefinition( + String id, String displayName, String tenancyId, Boolean isRecurring) { + super(); + this.id = id; + this.displayName = displayName; + this.tenancyId = tenancyId; + this.isRecurring = isRecurring; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * OCID of the tenancy to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private String tenancyId; + + /** + * OCID of the tenancy to which the resource belongs to. + * @param tenancyId the value to set + * @return this builder + **/ + public Builder tenancyId(String tenancyId) { + this.tenancyId = tenancyId; + this.__explicitlySet__.add("tenancyId"); + return this; + } + /** + * Is this a recurring schedule? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRecurring") + private Boolean isRecurring; + + /** + * Is this a recurring schedule? + * @param isRecurring the value to set + * @return this builder + **/ + public Builder isRecurring(Boolean isRecurring) { + this.isRecurring = isRecurring; + this.__explicitlySet__.add("isRecurring"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AssociatedSchedulerDefinition build() { + AssociatedSchedulerDefinition model = + new AssociatedSchedulerDefinition( + this.id, this.displayName, this.tenancyId, this.isRecurring); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AssociatedSchedulerDefinition model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("tenancyId")) { + this.tenancyId(model.getTenancyId()); + } + if (model.wasPropertyExplicitlySet("isRecurring")) { + this.isRecurring(model.getIsRecurring()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * OCID of the tenancy to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private final String tenancyId; + + /** + * OCID of the tenancy to which the resource belongs to. + * @return the value + **/ + public String getTenancyId() { + return tenancyId; + } + + /** + * Is this a recurring schedule? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRecurring") + private final Boolean isRecurring; + + /** + * Is this a recurring schedule? + * @return the value + **/ + public Boolean getIsRecurring() { + return isRecurring; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AssociatedSchedulerDefinition("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", tenancyId=").append(String.valueOf(this.tenancyId)); + sb.append(", isRecurring=").append(String.valueOf(this.isRecurring)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AssociatedSchedulerDefinition)) { + return false; + } + + AssociatedSchedulerDefinition other = (AssociatedSchedulerDefinition) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.tenancyId, other.tenancyId) + && java.util.Objects.equals(this.isRecurring, other.isRecurring) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.tenancyId == null ? 43 : this.tenancyId.hashCode()); + result = (result * PRIME) + (this.isRecurring == null ? 43 : this.isRecurring.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedSharedTaskDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedSharedTaskDetails.java new file mode 100644 index 00000000000..912fdb9f53f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedSharedTaskDetails.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The details of the shared task. + * Tasks that are part of the task library and can be reused across runbooks. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AssociatedSharedTaskDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "scope" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AssociatedSharedTaskDetails extends AssociatedTaskDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The ID of taskRecord. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("taskRecordId") + private String taskRecordId; + + /** + * The ID of taskRecord. + * @param taskRecordId the value to set + * @return this builder + **/ + public Builder taskRecordId(String taskRecordId) { + this.taskRecordId = taskRecordId; + this.__explicitlySet__.add("taskRecordId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AssociatedSharedTaskDetails build() { + AssociatedSharedTaskDetails model = new AssociatedSharedTaskDetails(this.taskRecordId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AssociatedSharedTaskDetails model) { + if (model.wasPropertyExplicitlySet("taskRecordId")) { + this.taskRecordId(model.getTaskRecordId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public AssociatedSharedTaskDetails(String taskRecordId) { + super(); + this.taskRecordId = taskRecordId; + } + + /** + * The ID of taskRecord. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("taskRecordId") + private final String taskRecordId; + + /** + * The ID of taskRecord. + * @return the value + **/ + public String getTaskRecordId() { + return taskRecordId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AssociatedSharedTaskDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", taskRecordId=").append(String.valueOf(this.taskRecordId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AssociatedSharedTaskDetails)) { + return false; + } + + AssociatedSharedTaskDetails other = (AssociatedSharedTaskDetails) o; + return java.util.Objects.equals(this.taskRecordId, other.taskRecordId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.taskRecordId == null ? 43 : this.taskRecordId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedTaskDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedTaskDetails.java new file mode 100644 index 00000000000..acaf5f425a2 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/AssociatedTaskDetails.java @@ -0,0 +1,80 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The details of the task. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "scope", + defaultImpl = AssociatedTaskDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = AssociatedLocalTaskDetails.class, + name = "LOCAL" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = AssociatedSharedTaskDetails.class, + name = "SHARED" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AssociatedTaskDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected AssociatedTaskDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AssociatedTaskDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AssociatedTaskDetails)) { + return false; + } + + AssociatedTaskDetails other = (AssociatedTaskDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Associations.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Associations.java new file mode 100644 index 00000000000..fa5bc23e957 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Associations.java @@ -0,0 +1,286 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Associations for the runbook. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Associations.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Associations extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "tasks", + "groups", + "executionWorkflowDetails", + "rollbackWorkflowDetails", + "version" + }) + public Associations( + java.util.List tasks, + java.util.List groups, + ExecutionWorkflowDetails executionWorkflowDetails, + RollbackWorkflowDetails rollbackWorkflowDetails, + String version) { + super(); + this.tasks = tasks; + this.groups = groups; + this.executionWorkflowDetails = executionWorkflowDetails; + this.rollbackWorkflowDetails = rollbackWorkflowDetails; + this.version = version; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A set of tasks to execute in the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tasks") + private java.util.List tasks; + + /** + * A set of tasks to execute in the runbook. + * @param tasks the value to set + * @return this builder + **/ + public Builder tasks(java.util.List tasks) { + this.tasks = tasks; + this.__explicitlySet__.add("tasks"); + return this; + } + /** + * The groups of the runbook. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groups") + private java.util.List groups; + + /** + * The groups of the runbook. + * + * @param groups the value to set + * @return this builder + **/ + public Builder groups(java.util.List groups) { + this.groups = groups; + this.__explicitlySet__.add("groups"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("executionWorkflowDetails") + private ExecutionWorkflowDetails executionWorkflowDetails; + + public Builder executionWorkflowDetails(ExecutionWorkflowDetails executionWorkflowDetails) { + this.executionWorkflowDetails = executionWorkflowDetails; + this.__explicitlySet__.add("executionWorkflowDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("rollbackWorkflowDetails") + private RollbackWorkflowDetails rollbackWorkflowDetails; + + public Builder rollbackWorkflowDetails(RollbackWorkflowDetails rollbackWorkflowDetails) { + this.rollbackWorkflowDetails = rollbackWorkflowDetails; + this.__explicitlySet__.add("rollbackWorkflowDetails"); + return this; + } + /** + * The version of the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * The version of the runbook. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Associations build() { + Associations model = + new Associations( + this.tasks, + this.groups, + this.executionWorkflowDetails, + this.rollbackWorkflowDetails, + this.version); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Associations model) { + if (model.wasPropertyExplicitlySet("tasks")) { + this.tasks(model.getTasks()); + } + if (model.wasPropertyExplicitlySet("groups")) { + this.groups(model.getGroups()); + } + if (model.wasPropertyExplicitlySet("executionWorkflowDetails")) { + this.executionWorkflowDetails(model.getExecutionWorkflowDetails()); + } + if (model.wasPropertyExplicitlySet("rollbackWorkflowDetails")) { + this.rollbackWorkflowDetails(model.getRollbackWorkflowDetails()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A set of tasks to execute in the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tasks") + private final java.util.List tasks; + + /** + * A set of tasks to execute in the runbook. + * @return the value + **/ + public java.util.List getTasks() { + return tasks; + } + + /** + * The groups of the runbook. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groups") + private final java.util.List groups; + + /** + * The groups of the runbook. + * + * @return the value + **/ + public java.util.List getGroups() { + return groups; + } + + @com.fasterxml.jackson.annotation.JsonProperty("executionWorkflowDetails") + private final ExecutionWorkflowDetails executionWorkflowDetails; + + public ExecutionWorkflowDetails getExecutionWorkflowDetails() { + return executionWorkflowDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("rollbackWorkflowDetails") + private final RollbackWorkflowDetails rollbackWorkflowDetails; + + public RollbackWorkflowDetails getRollbackWorkflowDetails() { + return rollbackWorkflowDetails; + } + + /** + * The version of the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * The version of the runbook. + * @return the value + **/ + public String getVersion() { + return version; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Associations("); + sb.append("super=").append(super.toString()); + sb.append("tasks=").append(String.valueOf(this.tasks)); + sb.append(", groups=").append(String.valueOf(this.groups)); + sb.append(", executionWorkflowDetails=") + .append(String.valueOf(this.executionWorkflowDetails)); + sb.append(", rollbackWorkflowDetails=") + .append(String.valueOf(this.rollbackWorkflowDetails)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Associations)) { + return false; + } + + Associations other = (Associations) o; + return java.util.Objects.equals(this.tasks, other.tasks) + && java.util.Objects.equals(this.groups, other.groups) + && java.util.Objects.equals( + this.executionWorkflowDetails, other.executionWorkflowDetails) + && java.util.Objects.equals( + this.rollbackWorkflowDetails, other.rollbackWorkflowDetails) + && java.util.Objects.equals(this.version, other.version) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.tasks == null ? 43 : this.tasks.hashCode()); + result = (result * PRIME) + (this.groups == null ? 43 : this.groups.hashCode()); + result = + (result * PRIME) + + (this.executionWorkflowDetails == null + ? 43 + : this.executionWorkflowDetails.hashCode()); + result = + (result * PRIME) + + (this.rollbackWorkflowDetails == null + ? 43 + : this.rollbackWorkflowDetails.hashCode()); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CheckResourceTaggingDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CheckResourceTaggingDetails.java new file mode 100644 index 00000000000..e54c79b550d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CheckResourceTaggingDetails.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Request to check resource tagging. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CheckResourceTaggingDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CheckResourceTaggingDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId", "fleetDisplayName", "resourceIds"}) + public CheckResourceTaggingDetails( + String compartmentId, String fleetDisplayName, java.util.List resourceIds) { + super(); + this.compartmentId = compartmentId; + this.fleetDisplayName = fleetDisplayName; + this.resourceIds = resourceIds; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Fleet Display Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetDisplayName") + private String fleetDisplayName; + + /** + * Fleet Display Name. + * @param fleetDisplayName the value to set + * @return this builder + **/ + public Builder fleetDisplayName(String fleetDisplayName) { + this.fleetDisplayName = fleetDisplayName; + this.__explicitlySet__.add("fleetDisplayName"); + return this; + } + /** + * Resource OCIDS that need to be verified if a tag can be enabled for them. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceIds") + private java.util.List resourceIds; + + /** + * Resource OCIDS that need to be verified if a tag can be enabled for them. + * @param resourceIds the value to set + * @return this builder + **/ + public Builder resourceIds(java.util.List resourceIds) { + this.resourceIds = resourceIds; + this.__explicitlySet__.add("resourceIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CheckResourceTaggingDetails build() { + CheckResourceTaggingDetails model = + new CheckResourceTaggingDetails( + this.compartmentId, this.fleetDisplayName, this.resourceIds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CheckResourceTaggingDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("fleetDisplayName")) { + this.fleetDisplayName(model.getFleetDisplayName()); + } + if (model.wasPropertyExplicitlySet("resourceIds")) { + this.resourceIds(model.getResourceIds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Fleet Display Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetDisplayName") + private final String fleetDisplayName; + + /** + * Fleet Display Name. + * @return the value + **/ + public String getFleetDisplayName() { + return fleetDisplayName; + } + + /** + * Resource OCIDS that need to be verified if a tag can be enabled for them. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceIds") + private final java.util.List resourceIds; + + /** + * Resource OCIDS that need to be verified if a tag can be enabled for them. + * @return the value + **/ + public java.util.List getResourceIds() { + return resourceIds; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CheckResourceTaggingDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", fleetDisplayName=").append(String.valueOf(this.fleetDisplayName)); + sb.append(", resourceIds=").append(String.valueOf(this.resourceIds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CheckResourceTaggingDetails)) { + return false; + } + + CheckResourceTaggingDetails other = (CheckResourceTaggingDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.fleetDisplayName, other.fleetDisplayName) + && java.util.Objects.equals(this.resourceIds, other.resourceIds) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.fleetDisplayName == null ? 43 : this.fleetDisplayName.hashCode()); + result = (result * PRIME) + (this.resourceIds == null ? 43 : this.resourceIds.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceDetailPolicy.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceDetailPolicy.java new file mode 100644 index 00000000000..beb7eefa405 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceDetailPolicy.java @@ -0,0 +1,350 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details of the Policy associated + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ComplianceDetailPolicy.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComplianceDetailPolicy + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compliancePolicyId", + "compliancePolicyDisplayName", + "compliancePolicyRuleId", + "compliancePolicyRuleDisplayName", + "gracePeriod", + "patchSelection" + }) + public ComplianceDetailPolicy( + String compliancePolicyId, + String compliancePolicyDisplayName, + String compliancePolicyRuleId, + String compliancePolicyRuleDisplayName, + String gracePeriod, + PatchSelectionDetails patchSelection) { + super(); + this.compliancePolicyId = compliancePolicyId; + this.compliancePolicyDisplayName = compliancePolicyDisplayName; + this.compliancePolicyRuleId = compliancePolicyRuleId; + this.compliancePolicyRuleDisplayName = compliancePolicyRuleDisplayName; + this.gracePeriod = gracePeriod; + this.patchSelection = patchSelection; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Compliance Policy Id + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compliancePolicyId") + private String compliancePolicyId; + + /** + * Compliance Policy Id + * @param compliancePolicyId the value to set + * @return this builder + **/ + public Builder compliancePolicyId(String compliancePolicyId) { + this.compliancePolicyId = compliancePolicyId; + this.__explicitlySet__.add("compliancePolicyId"); + return this; + } + /** + * Compliane Policy DisplayName + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compliancePolicyDisplayName") + private String compliancePolicyDisplayName; + + /** + * Compliane Policy DisplayName + * @param compliancePolicyDisplayName the value to set + * @return this builder + **/ + public Builder compliancePolicyDisplayName(String compliancePolicyDisplayName) { + this.compliancePolicyDisplayName = compliancePolicyDisplayName; + this.__explicitlySet__.add("compliancePolicyDisplayName"); + return this; + } + /** + * Compliane Policy Rule Id + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compliancePolicyRuleId") + private String compliancePolicyRuleId; + + /** + * Compliane Policy Rule Id + * @param compliancePolicyRuleId the value to set + * @return this builder + **/ + public Builder compliancePolicyRuleId(String compliancePolicyRuleId) { + this.compliancePolicyRuleId = compliancePolicyRuleId; + this.__explicitlySet__.add("compliancePolicyRuleId"); + return this; + } + /** + * Product Name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compliancePolicyRuleDisplayName") + private String compliancePolicyRuleDisplayName; + + /** + * Product Name + * @param compliancePolicyRuleDisplayName the value to set + * @return this builder + **/ + public Builder compliancePolicyRuleDisplayName(String compliancePolicyRuleDisplayName) { + this.compliancePolicyRuleDisplayName = compliancePolicyRuleDisplayName; + this.__explicitlySet__.add("compliancePolicyRuleDisplayName"); + return this; + } + /** + * Grace period in days,weeks,months or years the exemption is applicable for the rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gracePeriod") + private String gracePeriod; + + /** + * Grace period in days,weeks,months or years the exemption is applicable for the rule. + * @param gracePeriod the value to set + * @return this builder + **/ + public Builder gracePeriod(String gracePeriod) { + this.gracePeriod = gracePeriod; + this.__explicitlySet__.add("gracePeriod"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patchSelection") + private PatchSelectionDetails patchSelection; + + public Builder patchSelection(PatchSelectionDetails patchSelection) { + this.patchSelection = patchSelection; + this.__explicitlySet__.add("patchSelection"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComplianceDetailPolicy build() { + ComplianceDetailPolicy model = + new ComplianceDetailPolicy( + this.compliancePolicyId, + this.compliancePolicyDisplayName, + this.compliancePolicyRuleId, + this.compliancePolicyRuleDisplayName, + this.gracePeriod, + this.patchSelection); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComplianceDetailPolicy model) { + if (model.wasPropertyExplicitlySet("compliancePolicyId")) { + this.compliancePolicyId(model.getCompliancePolicyId()); + } + if (model.wasPropertyExplicitlySet("compliancePolicyDisplayName")) { + this.compliancePolicyDisplayName(model.getCompliancePolicyDisplayName()); + } + if (model.wasPropertyExplicitlySet("compliancePolicyRuleId")) { + this.compliancePolicyRuleId(model.getCompliancePolicyRuleId()); + } + if (model.wasPropertyExplicitlySet("compliancePolicyRuleDisplayName")) { + this.compliancePolicyRuleDisplayName(model.getCompliancePolicyRuleDisplayName()); + } + if (model.wasPropertyExplicitlySet("gracePeriod")) { + this.gracePeriod(model.getGracePeriod()); + } + if (model.wasPropertyExplicitlySet("patchSelection")) { + this.patchSelection(model.getPatchSelection()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Compliance Policy Id + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compliancePolicyId") + private final String compliancePolicyId; + + /** + * Compliance Policy Id + * @return the value + **/ + public String getCompliancePolicyId() { + return compliancePolicyId; + } + + /** + * Compliane Policy DisplayName + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compliancePolicyDisplayName") + private final String compliancePolicyDisplayName; + + /** + * Compliane Policy DisplayName + * @return the value + **/ + public String getCompliancePolicyDisplayName() { + return compliancePolicyDisplayName; + } + + /** + * Compliane Policy Rule Id + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compliancePolicyRuleId") + private final String compliancePolicyRuleId; + + /** + * Compliane Policy Rule Id + * @return the value + **/ + public String getCompliancePolicyRuleId() { + return compliancePolicyRuleId; + } + + /** + * Product Name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compliancePolicyRuleDisplayName") + private final String compliancePolicyRuleDisplayName; + + /** + * Product Name + * @return the value + **/ + public String getCompliancePolicyRuleDisplayName() { + return compliancePolicyRuleDisplayName; + } + + /** + * Grace period in days,weeks,months or years the exemption is applicable for the rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gracePeriod") + private final String gracePeriod; + + /** + * Grace period in days,weeks,months or years the exemption is applicable for the rule. + * @return the value + **/ + public String getGracePeriod() { + return gracePeriod; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patchSelection") + private final PatchSelectionDetails patchSelection; + + public PatchSelectionDetails getPatchSelection() { + return patchSelection; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ComplianceDetailPolicy("); + sb.append("super=").append(super.toString()); + sb.append("compliancePolicyId=").append(String.valueOf(this.compliancePolicyId)); + sb.append(", compliancePolicyDisplayName=") + .append(String.valueOf(this.compliancePolicyDisplayName)); + sb.append(", compliancePolicyRuleId=").append(String.valueOf(this.compliancePolicyRuleId)); + sb.append(", compliancePolicyRuleDisplayName=") + .append(String.valueOf(this.compliancePolicyRuleDisplayName)); + sb.append(", gracePeriod=").append(String.valueOf(this.gracePeriod)); + sb.append(", patchSelection=").append(String.valueOf(this.patchSelection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComplianceDetailPolicy)) { + return false; + } + + ComplianceDetailPolicy other = (ComplianceDetailPolicy) o; + return java.util.Objects.equals(this.compliancePolicyId, other.compliancePolicyId) + && java.util.Objects.equals( + this.compliancePolicyDisplayName, other.compliancePolicyDisplayName) + && java.util.Objects.equals( + this.compliancePolicyRuleId, other.compliancePolicyRuleId) + && java.util.Objects.equals( + this.compliancePolicyRuleDisplayName, other.compliancePolicyRuleDisplayName) + && java.util.Objects.equals(this.gracePeriod, other.gracePeriod) + && java.util.Objects.equals(this.patchSelection, other.patchSelection) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compliancePolicyId == null + ? 43 + : this.compliancePolicyId.hashCode()); + result = + (result * PRIME) + + (this.compliancePolicyDisplayName == null + ? 43 + : this.compliancePolicyDisplayName.hashCode()); + result = + (result * PRIME) + + (this.compliancePolicyRuleId == null + ? 43 + : this.compliancePolicyRuleId.hashCode()); + result = + (result * PRIME) + + (this.compliancePolicyRuleDisplayName == null + ? 43 + : this.compliancePolicyRuleDisplayName.hashCode()); + result = (result * PRIME) + (this.gracePeriod == null ? 43 : this.gracePeriod.hashCode()); + result = + (result * PRIME) + + (this.patchSelection == null ? 43 : this.patchSelection.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceDetailProduct.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceDetailProduct.java new file mode 100644 index 00000000000..3137e45a83b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceDetailProduct.java @@ -0,0 +1,214 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details of the Product + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ComplianceDetailProduct.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComplianceDetailProduct + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"productStack", "productName", "productVersion"}) + public ComplianceDetailProduct(String productStack, String productName, String productVersion) { + super(); + this.productStack = productStack; + this.productName = productName; + this.productVersion = productVersion; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Product Stack. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productStack") + private String productStack; + + /** + * Product Stack. + * @param productStack the value to set + * @return this builder + **/ + public Builder productStack(String productStack) { + this.productStack = productStack; + this.__explicitlySet__.add("productStack"); + return this; + } + /** + * Product Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productName") + private String productName; + + /** + * Product Name. + * @param productName the value to set + * @return this builder + **/ + public Builder productName(String productName) { + this.productName = productName; + this.__explicitlySet__.add("productName"); + return this; + } + /** + * Product Version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productVersion") + private String productVersion; + + /** + * Product Version. + * @param productVersion the value to set + * @return this builder + **/ + public Builder productVersion(String productVersion) { + this.productVersion = productVersion; + this.__explicitlySet__.add("productVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComplianceDetailProduct build() { + ComplianceDetailProduct model = + new ComplianceDetailProduct( + this.productStack, this.productName, this.productVersion); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComplianceDetailProduct model) { + if (model.wasPropertyExplicitlySet("productStack")) { + this.productStack(model.getProductStack()); + } + if (model.wasPropertyExplicitlySet("productName")) { + this.productName(model.getProductName()); + } + if (model.wasPropertyExplicitlySet("productVersion")) { + this.productVersion(model.getProductVersion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Product Stack. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productStack") + private final String productStack; + + /** + * Product Stack. + * @return the value + **/ + public String getProductStack() { + return productStack; + } + + /** + * Product Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productName") + private final String productName; + + /** + * Product Name. + * @return the value + **/ + public String getProductName() { + return productName; + } + + /** + * Product Version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productVersion") + private final String productVersion; + + /** + * Product Version. + * @return the value + **/ + public String getProductVersion() { + return productVersion; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ComplianceDetailProduct("); + sb.append("super=").append(super.toString()); + sb.append("productStack=").append(String.valueOf(this.productStack)); + sb.append(", productName=").append(String.valueOf(this.productName)); + sb.append(", productVersion=").append(String.valueOf(this.productVersion)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComplianceDetailProduct)) { + return false; + } + + ComplianceDetailProduct other = (ComplianceDetailProduct) o; + return java.util.Objects.equals(this.productStack, other.productStack) + && java.util.Objects.equals(this.productName, other.productName) + && java.util.Objects.equals(this.productVersion, other.productVersion) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.productStack == null ? 43 : this.productStack.hashCode()); + result = (result * PRIME) + (this.productName == null ? 43 : this.productName.hashCode()); + result = + (result * PRIME) + + (this.productVersion == null ? 43 : this.productVersion.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceDetailResource.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceDetailResource.java new file mode 100644 index 00000000000..a0efd686543 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceDetailResource.java @@ -0,0 +1,305 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details of the Resource + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ComplianceDetailResource.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComplianceDetailResource + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "resourceId", + "resourceName", + "compartmentId", + "compartment", + "resourceRegion" + }) + public ComplianceDetailResource( + String resourceId, + String resourceName, + String compartmentId, + String compartment, + String resourceRegion) { + super(); + this.resourceId = resourceId; + this.resourceName = resourceName; + this.compartmentId = compartmentId; + this.compartment = compartment; + this.resourceRegion = resourceRegion; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID to identify the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * The OCID to identify the resource. + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * Name of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceName") + private String resourceName; + + /** + * Name of the resource. + * @param resourceName the value to set + * @return this builder + **/ + public Builder resourceName(String resourceName) { + this.resourceName = resourceName; + this.__explicitlySet__.add("resourceName"); + return this; + } + /** + * TenancyId of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * TenancyId of the resource. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Compartment the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartment") + private String compartment; + + /** + * Compartment the resource belongs to. + * @param compartment the value to set + * @return this builder + **/ + public Builder compartment(String compartment) { + this.compartment = compartment; + this.__explicitlySet__.add("compartment"); + return this; + } + /** + * Region the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Region the resource belongs to. + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComplianceDetailResource build() { + ComplianceDetailResource model = + new ComplianceDetailResource( + this.resourceId, + this.resourceName, + this.compartmentId, + this.compartment, + this.resourceRegion); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComplianceDetailResource model) { + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("resourceName")) { + this.resourceName(model.getResourceName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("compartment")) { + this.compartment(model.getCompartment()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID to identify the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * The OCID to identify the resource. + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * Name of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceName") + private final String resourceName; + + /** + * Name of the resource. + * @return the value + **/ + public String getResourceName() { + return resourceName; + } + + /** + * TenancyId of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * TenancyId of the resource. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Compartment the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartment") + private final String compartment; + + /** + * Compartment the resource belongs to. + * @return the value + **/ + public String getCompartment() { + return compartment; + } + + /** + * Region the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Region the resource belongs to. + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ComplianceDetailResource("); + sb.append("super=").append(super.toString()); + sb.append("resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", resourceName=").append(String.valueOf(this.resourceName)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", compartment=").append(String.valueOf(this.compartment)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComplianceDetailResource)) { + return false; + } + + ComplianceDetailResource other = (ComplianceDetailResource) o; + return java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.resourceName, other.resourceName) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.compartment, other.compartment) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.resourceName == null ? 43 : this.resourceName.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.compartment == null ? 43 : this.compartment.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceDetailTarget.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceDetailTarget.java new file mode 100644 index 00000000000..9c515292212 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceDetailTarget.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details of the Target + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ComplianceDetailTarget.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComplianceDetailTarget + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"targetId", "targetName", "version"}) + public ComplianceDetailTarget(String targetId, String targetName, String version) { + super(); + this.targetId = targetId; + this.targetName = targetName; + this.version = version; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Target Identifier. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetId") + private String targetId; + + /** + * Target Identifier. + * @param targetId the value to set + * @return this builder + **/ + public Builder targetId(String targetId) { + this.targetId = targetId; + this.__explicitlySet__.add("targetId"); + return this; + } + /** + * Target Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetName") + private String targetName; + + /** + * Target Name. + * @param targetName the value to set + * @return this builder + **/ + public Builder targetName(String targetName) { + this.targetName = targetName; + this.__explicitlySet__.add("targetName"); + return this; + } + /** + * Current version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * Current version. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComplianceDetailTarget build() { + ComplianceDetailTarget model = + new ComplianceDetailTarget(this.targetId, this.targetName, this.version); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComplianceDetailTarget model) { + if (model.wasPropertyExplicitlySet("targetId")) { + this.targetId(model.getTargetId()); + } + if (model.wasPropertyExplicitlySet("targetName")) { + this.targetName(model.getTargetName()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Target Identifier. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetId") + private final String targetId; + + /** + * Target Identifier. + * @return the value + **/ + public String getTargetId() { + return targetId; + } + + /** + * Target Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetName") + private final String targetName; + + /** + * Target Name. + * @return the value + **/ + public String getTargetName() { + return targetName; + } + + /** + * Current version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * Current version. + * @return the value + **/ + public String getVersion() { + return version; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ComplianceDetailTarget("); + sb.append("super=").append(super.toString()); + sb.append("targetId=").append(String.valueOf(this.targetId)); + sb.append(", targetName=").append(String.valueOf(this.targetName)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComplianceDetailTarget)) { + return false; + } + + ComplianceDetailTarget other = (ComplianceDetailTarget) o; + return java.util.Objects.equals(this.targetId, other.targetId) + && java.util.Objects.equals(this.targetName, other.targetName) + && java.util.Objects.equals(this.version, other.version) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); + result = (result * PRIME) + (this.targetName == null ? 43 : this.targetName.hashCode()); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceLevel.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceLevel.java new file mode 100644 index 00000000000..c4944313d51 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceLevel.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Possible values for compliance level. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public enum ComplianceLevel { + Fleet("FLEET"), + Target("TARGET"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ComplianceLevel.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ComplianceLevel v : ComplianceLevel.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ComplianceLevel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ComplianceLevel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ComplianceLevel', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePatchDetail.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePatchDetail.java new file mode 100644 index 00000000000..a160108bcd5 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePatchDetail.java @@ -0,0 +1,369 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details of the Patch + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CompliancePatchDetail.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CompliancePatchDetail + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "patchId", + "patchName", + "patchDescription", + "timeReleased", + "patchType", + "severity", + "product" + }) + public CompliancePatchDetail( + String patchId, + String patchName, + String patchDescription, + java.util.Date timeReleased, + String patchType, + PatchSeverity severity, + ComplianceDetailProduct product) { + super(); + this.patchId = patchId; + this.patchName = patchName; + this.patchDescription = patchDescription; + this.timeReleased = timeReleased; + this.patchType = patchType; + this.severity = severity; + this.product = product; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * patch OCID. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchId") + private String patchId; + + /** + * patch OCID. + * @param patchId the value to set + * @return this builder + **/ + public Builder patchId(String patchId) { + this.patchId = patchId; + this.__explicitlySet__.add("patchId"); + return this; + } + /** + * patch Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchName") + private String patchName; + + /** + * patch Name. + * @param patchName the value to set + * @return this builder + **/ + public Builder patchName(String patchName) { + this.patchName = patchName; + this.__explicitlySet__.add("patchName"); + return this; + } + /** + * Patch Description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchDescription") + private String patchDescription; + + /** + * Patch Description. + * @param patchDescription the value to set + * @return this builder + **/ + public Builder patchDescription(String patchDescription) { + this.patchDescription = patchDescription; + this.__explicitlySet__.add("patchDescription"); + return this; + } + /** + * Date on which patch was released + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeReleased") + private java.util.Date timeReleased; + + /** + * Date on which patch was released + * @param timeReleased the value to set + * @return this builder + **/ + public Builder timeReleased(java.util.Date timeReleased) { + this.timeReleased = timeReleased; + this.__explicitlySet__.add("timeReleased"); + return this; + } + /** + * Type of patch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchType") + private String patchType; + + /** + * Type of patch. + * @param patchType the value to set + * @return this builder + **/ + public Builder patchType(String patchType) { + this.patchType = patchType; + this.__explicitlySet__.add("patchType"); + return this; + } + /** + * Patch Severity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private PatchSeverity severity; + + /** + * Patch Severity. + * @param severity the value to set + * @return this builder + **/ + public Builder severity(PatchSeverity severity) { + this.severity = severity; + this.__explicitlySet__.add("severity"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("product") + private ComplianceDetailProduct product; + + public Builder product(ComplianceDetailProduct product) { + this.product = product; + this.__explicitlySet__.add("product"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CompliancePatchDetail build() { + CompliancePatchDetail model = + new CompliancePatchDetail( + this.patchId, + this.patchName, + this.patchDescription, + this.timeReleased, + this.patchType, + this.severity, + this.product); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CompliancePatchDetail model) { + if (model.wasPropertyExplicitlySet("patchId")) { + this.patchId(model.getPatchId()); + } + if (model.wasPropertyExplicitlySet("patchName")) { + this.patchName(model.getPatchName()); + } + if (model.wasPropertyExplicitlySet("patchDescription")) { + this.patchDescription(model.getPatchDescription()); + } + if (model.wasPropertyExplicitlySet("timeReleased")) { + this.timeReleased(model.getTimeReleased()); + } + if (model.wasPropertyExplicitlySet("patchType")) { + this.patchType(model.getPatchType()); + } + if (model.wasPropertyExplicitlySet("severity")) { + this.severity(model.getSeverity()); + } + if (model.wasPropertyExplicitlySet("product")) { + this.product(model.getProduct()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * patch OCID. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchId") + private final String patchId; + + /** + * patch OCID. + * @return the value + **/ + public String getPatchId() { + return patchId; + } + + /** + * patch Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchName") + private final String patchName; + + /** + * patch Name. + * @return the value + **/ + public String getPatchName() { + return patchName; + } + + /** + * Patch Description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchDescription") + private final String patchDescription; + + /** + * Patch Description. + * @return the value + **/ + public String getPatchDescription() { + return patchDescription; + } + + /** + * Date on which patch was released + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeReleased") + private final java.util.Date timeReleased; + + /** + * Date on which patch was released + * @return the value + **/ + public java.util.Date getTimeReleased() { + return timeReleased; + } + + /** + * Type of patch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchType") + private final String patchType; + + /** + * Type of patch. + * @return the value + **/ + public String getPatchType() { + return patchType; + } + + /** + * Patch Severity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private final PatchSeverity severity; + + /** + * Patch Severity. + * @return the value + **/ + public PatchSeverity getSeverity() { + return severity; + } + + @com.fasterxml.jackson.annotation.JsonProperty("product") + private final ComplianceDetailProduct product; + + public ComplianceDetailProduct getProduct() { + return product; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CompliancePatchDetail("); + sb.append("super=").append(super.toString()); + sb.append("patchId=").append(String.valueOf(this.patchId)); + sb.append(", patchName=").append(String.valueOf(this.patchName)); + sb.append(", patchDescription=").append(String.valueOf(this.patchDescription)); + sb.append(", timeReleased=").append(String.valueOf(this.timeReleased)); + sb.append(", patchType=").append(String.valueOf(this.patchType)); + sb.append(", severity=").append(String.valueOf(this.severity)); + sb.append(", product=").append(String.valueOf(this.product)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CompliancePatchDetail)) { + return false; + } + + CompliancePatchDetail other = (CompliancePatchDetail) o; + return java.util.Objects.equals(this.patchId, other.patchId) + && java.util.Objects.equals(this.patchName, other.patchName) + && java.util.Objects.equals(this.patchDescription, other.patchDescription) + && java.util.Objects.equals(this.timeReleased, other.timeReleased) + && java.util.Objects.equals(this.patchType, other.patchType) + && java.util.Objects.equals(this.severity, other.severity) + && java.util.Objects.equals(this.product, other.product) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.patchId == null ? 43 : this.patchId.hashCode()); + result = (result * PRIME) + (this.patchName == null ? 43 : this.patchName.hashCode()); + result = + (result * PRIME) + + (this.patchDescription == null ? 43 : this.patchDescription.hashCode()); + result = (result * PRIME) + (this.timeReleased == null ? 43 : this.timeReleased.hashCode()); + result = (result * PRIME) + (this.patchType == null ? 43 : this.patchType.hashCode()); + result = (result * PRIME) + (this.severity == null ? 43 : this.severity.hashCode()); + result = (result * PRIME) + (this.product == null ? 43 : this.product.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePolicy.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePolicy.java new file mode 100644 index 00000000000..352b5eb258e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePolicy.java @@ -0,0 +1,655 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Define software patch compliance policies for various products running in OCI resources. + * A compliance policy is a configuration you set up for various products to report compliance by defining the schedule and patch baseline + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = CompliancePolicy.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CompliancePolicy extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "productId", + "compartmentId", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public CompliancePolicy( + String id, + String displayName, + String productId, + String compartmentId, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.productId = productId; + this.compartmentId = compartmentId; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the CompliancePolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the CompliancePolicy. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Display name for the CompliancePolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Display name for the CompliancePolicy. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * platformConfiguration OCID corresponding to the Product. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productId") + private String productId; + + /** + * platformConfiguration OCID corresponding to the Product. + * @param productId the value to set + * @return this builder + **/ + public Builder productId(String productId) { + this.productId = productId; + this.__explicitlySet__.add("productId"); + return this; + } + /** + * The OCID of the compartment the CompliancePolicy belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment the CompliancePolicy belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The date and time the CompliancePolicy was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the CompliancePolicy was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the CompliancePolicy was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the CompliancePolicy was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of the CompliancePolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the CompliancePolicy. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message that describes the current state of the CompliancePolicy in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of the CompliancePolicy in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CompliancePolicy build() { + CompliancePolicy model = + new CompliancePolicy( + this.id, + this.displayName, + this.productId, + this.compartmentId, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CompliancePolicy model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("productId")) { + this.productId(model.getProductId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the CompliancePolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the CompliancePolicy. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Display name for the CompliancePolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Display name for the CompliancePolicy. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * platformConfiguration OCID corresponding to the Product. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productId") + private final String productId; + + /** + * platformConfiguration OCID corresponding to the Product. + * @return the value + **/ + public String getProductId() { + return productId; + } + + /** + * The OCID of the compartment the CompliancePolicy belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment the CompliancePolicy belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The date and time the CompliancePolicy was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the CompliancePolicy was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the CompliancePolicy was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the CompliancePolicy was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the CompliancePolicy. + **/ + public enum LifecycleState { + Creating("CREATING"), + Updating("UPDATING"), + Active("ACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the CompliancePolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the CompliancePolicy. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message that describes the current state of the CompliancePolicy in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of the CompliancePolicy in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CompliancePolicy("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", productId=").append(String.valueOf(this.productId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CompliancePolicy)) { + return false; + } + + CompliancePolicy other = (CompliancePolicy) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.productId, other.productId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.productId == null ? 43 : this.productId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePolicyCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePolicyCollection.java new file mode 100644 index 00000000000..b4904936252 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePolicyCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a compliancePolicy search. Contains both CompliancePolicySummary items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CompliancePolicyCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CompliancePolicyCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public CompliancePolicyCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of compliancePolicys. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of compliancePolicys. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CompliancePolicyCollection build() { + CompliancePolicyCollection model = new CompliancePolicyCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CompliancePolicyCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of compliancePolicys. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of compliancePolicys. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CompliancePolicyCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CompliancePolicyCollection)) { + return false; + } + + CompliancePolicyCollection other = (CompliancePolicyCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePolicyRule.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePolicyRule.java new file mode 100644 index 00000000000..0e1b2a60f7f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePolicyRule.java @@ -0,0 +1,861 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Set of rules that are used to calculate the compliance status of the product. + * Specific rules will take precedence over broader rules. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CompliancePolicyRule.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CompliancePolicyRule extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "compliancePolicyId", + "productVersion", + "patchType", + "severity", + "patchSelection", + "gracePeriod", + "compartmentId", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public CompliancePolicyRule( + String id, + String displayName, + String compliancePolicyId, + ProductVersionDetails productVersion, + java.util.List patchType, + java.util.List severity, + PatchSelectionDetails patchSelection, + String gracePeriod, + String compartmentId, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.compliancePolicyId = compliancePolicyId; + this.productVersion = productVersion; + this.patchType = patchType; + this.severity = severity; + this.patchSelection = patchSelection; + this.gracePeriod = gracePeriod; + this.compartmentId = compartmentId; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique OCID of the CompliancePolicyRule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique OCID of the CompliancePolicyRule. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Unique OCID of the CompliancePolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compliancePolicyId") + private String compliancePolicyId; + + /** + * Unique OCID of the CompliancePolicy. + * @param compliancePolicyId the value to set + * @return this builder + **/ + public Builder compliancePolicyId(String compliancePolicyId) { + this.compliancePolicyId = compliancePolicyId; + this.__explicitlySet__.add("compliancePolicyId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("productVersion") + private ProductVersionDetails productVersion; + + public Builder productVersion(ProductVersionDetails productVersion) { + this.productVersion = productVersion; + this.__explicitlySet__.add("productVersion"); + return this; + } + /** + * PlatformConfiguration OCID for the patch type to which this CompliancePolicyRule applies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchType") + private java.util.List patchType; + + /** + * PlatformConfiguration OCID for the patch type to which this CompliancePolicyRule applies. + * @param patchType the value to set + * @return this builder + **/ + public Builder patchType(java.util.List patchType) { + this.patchType = patchType; + this.__explicitlySet__.add("patchType"); + return this; + } + /** + * Severity to which this CompliancePolicyRule applies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private java.util.List severity; + + /** + * Severity to which this CompliancePolicyRule applies. + * @param severity the value to set + * @return this builder + **/ + public Builder severity(java.util.List severity) { + this.severity = severity; + this.__explicitlySet__.add("severity"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patchSelection") + private PatchSelectionDetails patchSelection; + + public Builder patchSelection(PatchSelectionDetails patchSelection) { + this.patchSelection = patchSelection; + this.__explicitlySet__.add("patchSelection"); + return this; + } + /** + * Grace period in days,weeks,months or years the exemption is applicable for the rule. + * This enables a grace period when Fleet Application Management doesn't report the product as noncompliant when patch is not applied. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gracePeriod") + private String gracePeriod; + + /** + * Grace period in days,weeks,months or years the exemption is applicable for the rule. + * This enables a grace period when Fleet Application Management doesn't report the product as noncompliant when patch is not applied. + * + * @param gracePeriod the value to set + * @return this builder + **/ + public Builder gracePeriod(String gracePeriod) { + this.gracePeriod = gracePeriod; + this.__explicitlySet__.add("gracePeriod"); + return this; + } + /** + * The OCID of the compartment the CompliancePolicyRule belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment the CompliancePolicyRule belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The date and time the CompliancePolicyRule was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the CompliancePolicyRule was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the CompliancePolicyRule was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the CompliancePolicyRule was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of the CompliancePolicyRule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the CompliancePolicyRule. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message that describes the current state of the CompliancePolicyRule in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of the CompliancePolicyRule in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CompliancePolicyRule build() { + CompliancePolicyRule model = + new CompliancePolicyRule( + this.id, + this.displayName, + this.compliancePolicyId, + this.productVersion, + this.patchType, + this.severity, + this.patchSelection, + this.gracePeriod, + this.compartmentId, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CompliancePolicyRule model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compliancePolicyId")) { + this.compliancePolicyId(model.getCompliancePolicyId()); + } + if (model.wasPropertyExplicitlySet("productVersion")) { + this.productVersion(model.getProductVersion()); + } + if (model.wasPropertyExplicitlySet("patchType")) { + this.patchType(model.getPatchType()); + } + if (model.wasPropertyExplicitlySet("severity")) { + this.severity(model.getSeverity()); + } + if (model.wasPropertyExplicitlySet("patchSelection")) { + this.patchSelection(model.getPatchSelection()); + } + if (model.wasPropertyExplicitlySet("gracePeriod")) { + this.gracePeriod(model.getGracePeriod()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique OCID of the CompliancePolicyRule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique OCID of the CompliancePolicyRule. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Unique OCID of the CompliancePolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compliancePolicyId") + private final String compliancePolicyId; + + /** + * Unique OCID of the CompliancePolicy. + * @return the value + **/ + public String getCompliancePolicyId() { + return compliancePolicyId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("productVersion") + private final ProductVersionDetails productVersion; + + public ProductVersionDetails getProductVersion() { + return productVersion; + } + + /** + * PlatformConfiguration OCID for the patch type to which this CompliancePolicyRule applies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchType") + private final java.util.List patchType; + + /** + * PlatformConfiguration OCID for the patch type to which this CompliancePolicyRule applies. + * @return the value + **/ + public java.util.List getPatchType() { + return patchType; + } + + /** + * Severity to which this CompliancePolicyRule applies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private final java.util.List severity; + + /** + * Severity to which this CompliancePolicyRule applies. + * @return the value + **/ + public java.util.List getSeverity() { + return severity; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patchSelection") + private final PatchSelectionDetails patchSelection; + + public PatchSelectionDetails getPatchSelection() { + return patchSelection; + } + + /** + * Grace period in days,weeks,months or years the exemption is applicable for the rule. + * This enables a grace period when Fleet Application Management doesn't report the product as noncompliant when patch is not applied. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gracePeriod") + private final String gracePeriod; + + /** + * Grace period in days,weeks,months or years the exemption is applicable for the rule. + * This enables a grace period when Fleet Application Management doesn't report the product as noncompliant when patch is not applied. + * + * @return the value + **/ + public String getGracePeriod() { + return gracePeriod; + } + + /** + * The OCID of the compartment the CompliancePolicyRule belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment the CompliancePolicyRule belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The date and time the CompliancePolicyRule was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the CompliancePolicyRule was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the CompliancePolicyRule was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the CompliancePolicyRule was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the CompliancePolicyRule. + **/ + public enum LifecycleState { + Creating("CREATING"), + Updating("UPDATING"), + Active("ACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the CompliancePolicyRule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the CompliancePolicyRule. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message that describes the current state of the CompliancePolicyRule in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of the CompliancePolicyRule in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CompliancePolicyRule("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", compliancePolicyId=").append(String.valueOf(this.compliancePolicyId)); + sb.append(", productVersion=").append(String.valueOf(this.productVersion)); + sb.append(", patchType=").append(String.valueOf(this.patchType)); + sb.append(", severity=").append(String.valueOf(this.severity)); + sb.append(", patchSelection=").append(String.valueOf(this.patchSelection)); + sb.append(", gracePeriod=").append(String.valueOf(this.gracePeriod)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CompliancePolicyRule)) { + return false; + } + + CompliancePolicyRule other = (CompliancePolicyRule) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.compliancePolicyId, other.compliancePolicyId) + && java.util.Objects.equals(this.productVersion, other.productVersion) + && java.util.Objects.equals(this.patchType, other.patchType) + && java.util.Objects.equals(this.severity, other.severity) + && java.util.Objects.equals(this.patchSelection, other.patchSelection) + && java.util.Objects.equals(this.gracePeriod, other.gracePeriod) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.compliancePolicyId == null + ? 43 + : this.compliancePolicyId.hashCode()); + result = + (result * PRIME) + + (this.productVersion == null ? 43 : this.productVersion.hashCode()); + result = (result * PRIME) + (this.patchType == null ? 43 : this.patchType.hashCode()); + result = (result * PRIME) + (this.severity == null ? 43 : this.severity.hashCode()); + result = + (result * PRIME) + + (this.patchSelection == null ? 43 : this.patchSelection.hashCode()); + result = (result * PRIME) + (this.gracePeriod == null ? 43 : this.gracePeriod.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePolicyRuleCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePolicyRuleCollection.java new file mode 100644 index 00000000000..081769a40b0 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePolicyRuleCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a compliancePolicyRule search. Contains both CompliancePolicyRuleSummary items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CompliancePolicyRuleCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CompliancePolicyRuleCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public CompliancePolicyRuleCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of complianePolicyRules. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of complianePolicyRules. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CompliancePolicyRuleCollection build() { + CompliancePolicyRuleCollection model = new CompliancePolicyRuleCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CompliancePolicyRuleCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of complianePolicyRules. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of complianePolicyRules. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CompliancePolicyRuleCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CompliancePolicyRuleCollection)) { + return false; + } + + CompliancePolicyRuleCollection other = (CompliancePolicyRuleCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePolicyRuleSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePolicyRuleSummary.java new file mode 100644 index 00000000000..6fc8bfcb1dd --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePolicyRuleSummary.java @@ -0,0 +1,808 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Summary information about a CompliancePolicyRule. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CompliancePolicyRuleSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CompliancePolicyRuleSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "compliancePolicyId", + "productVersion", + "patchType", + "severity", + "patchSelection", + "gracePeriod", + "compartmentId", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public CompliancePolicyRuleSummary( + String id, + String displayName, + String compliancePolicyId, + ProductVersionDetails productVersion, + java.util.List patchType, + java.util.List severity, + PatchSelectionDetails patchSelection, + String gracePeriod, + String compartmentId, + java.util.Date timeCreated, + java.util.Date timeUpdated, + CompliancePolicyRule.LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.compliancePolicyId = compliancePolicyId; + this.productVersion = productVersion; + this.patchType = patchType; + this.severity = severity; + this.patchSelection = patchSelection; + this.gracePeriod = gracePeriod; + this.compartmentId = compartmentId; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique OCID of the CompliancePolicyRule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique OCID of the CompliancePolicyRule. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Unique OCID of the CompliancePolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compliancePolicyId") + private String compliancePolicyId; + + /** + * Unique OCID of the CompliancePolicy. + * @param compliancePolicyId the value to set + * @return this builder + **/ + public Builder compliancePolicyId(String compliancePolicyId) { + this.compliancePolicyId = compliancePolicyId; + this.__explicitlySet__.add("compliancePolicyId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("productVersion") + private ProductVersionDetails productVersion; + + public Builder productVersion(ProductVersionDetails productVersion) { + this.productVersion = productVersion; + this.__explicitlySet__.add("productVersion"); + return this; + } + /** + * PlatformConfiguration OCID for the patch type to which this CompliancePolicyRule applies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchType") + private java.util.List patchType; + + /** + * PlatformConfiguration OCID for the patch type to which this CompliancePolicyRule applies. + * @param patchType the value to set + * @return this builder + **/ + public Builder patchType(java.util.List patchType) { + this.patchType = patchType; + this.__explicitlySet__.add("patchType"); + return this; + } + /** + * Severity to which this CompliancePolicyRule applies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private java.util.List severity; + + /** + * Severity to which this CompliancePolicyRule applies. + * @param severity the value to set + * @return this builder + **/ + public Builder severity(java.util.List severity) { + this.severity = severity; + this.__explicitlySet__.add("severity"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patchSelection") + private PatchSelectionDetails patchSelection; + + public Builder patchSelection(PatchSelectionDetails patchSelection) { + this.patchSelection = patchSelection; + this.__explicitlySet__.add("patchSelection"); + return this; + } + /** + * Grace period in days,weeks,months or years the exemption is applicable for the rule. + * This enables a grace period when Fleet Application Management doesn't report the product as noncompliant when patch is not applied. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gracePeriod") + private String gracePeriod; + + /** + * Grace period in days,weeks,months or years the exemption is applicable for the rule. + * This enables a grace period when Fleet Application Management doesn't report the product as noncompliant when patch is not applied. + * + * @param gracePeriod the value to set + * @return this builder + **/ + public Builder gracePeriod(String gracePeriod) { + this.gracePeriod = gracePeriod; + this.__explicitlySet__.add("gracePeriod"); + return this; + } + /** + * The OCID of the compartment the CompliancePolicyRule belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment the CompliancePolicyRule belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The date and time the CompliancePolicyRule was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the CompliancePolicyRule was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the CompliancePolicyRule was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the CompliancePolicyRule was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of the CompliancePolicyRule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private CompliancePolicyRule.LifecycleState lifecycleState; + + /** + * The current state of the CompliancePolicyRule. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(CompliancePolicyRule.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message that describes the current state of the CompliancePolicyRule in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of the CompliancePolicyRule in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CompliancePolicyRuleSummary build() { + CompliancePolicyRuleSummary model = + new CompliancePolicyRuleSummary( + this.id, + this.displayName, + this.compliancePolicyId, + this.productVersion, + this.patchType, + this.severity, + this.patchSelection, + this.gracePeriod, + this.compartmentId, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CompliancePolicyRuleSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compliancePolicyId")) { + this.compliancePolicyId(model.getCompliancePolicyId()); + } + if (model.wasPropertyExplicitlySet("productVersion")) { + this.productVersion(model.getProductVersion()); + } + if (model.wasPropertyExplicitlySet("patchType")) { + this.patchType(model.getPatchType()); + } + if (model.wasPropertyExplicitlySet("severity")) { + this.severity(model.getSeverity()); + } + if (model.wasPropertyExplicitlySet("patchSelection")) { + this.patchSelection(model.getPatchSelection()); + } + if (model.wasPropertyExplicitlySet("gracePeriod")) { + this.gracePeriod(model.getGracePeriod()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique OCID of the CompliancePolicyRule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique OCID of the CompliancePolicyRule. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Unique OCID of the CompliancePolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compliancePolicyId") + private final String compliancePolicyId; + + /** + * Unique OCID of the CompliancePolicy. + * @return the value + **/ + public String getCompliancePolicyId() { + return compliancePolicyId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("productVersion") + private final ProductVersionDetails productVersion; + + public ProductVersionDetails getProductVersion() { + return productVersion; + } + + /** + * PlatformConfiguration OCID for the patch type to which this CompliancePolicyRule applies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchType") + private final java.util.List patchType; + + /** + * PlatformConfiguration OCID for the patch type to which this CompliancePolicyRule applies. + * @return the value + **/ + public java.util.List getPatchType() { + return patchType; + } + + /** + * Severity to which this CompliancePolicyRule applies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private final java.util.List severity; + + /** + * Severity to which this CompliancePolicyRule applies. + * @return the value + **/ + public java.util.List getSeverity() { + return severity; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patchSelection") + private final PatchSelectionDetails patchSelection; + + public PatchSelectionDetails getPatchSelection() { + return patchSelection; + } + + /** + * Grace period in days,weeks,months or years the exemption is applicable for the rule. + * This enables a grace period when Fleet Application Management doesn't report the product as noncompliant when patch is not applied. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gracePeriod") + private final String gracePeriod; + + /** + * Grace period in days,weeks,months or years the exemption is applicable for the rule. + * This enables a grace period when Fleet Application Management doesn't report the product as noncompliant when patch is not applied. + * + * @return the value + **/ + public String getGracePeriod() { + return gracePeriod; + } + + /** + * The OCID of the compartment the CompliancePolicyRule belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment the CompliancePolicyRule belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The date and time the CompliancePolicyRule was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the CompliancePolicyRule was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the CompliancePolicyRule was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the CompliancePolicyRule was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the CompliancePolicyRule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final CompliancePolicyRule.LifecycleState lifecycleState; + + /** + * The current state of the CompliancePolicyRule. + * @return the value + **/ + public CompliancePolicyRule.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message that describes the current state of the CompliancePolicyRule in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of the CompliancePolicyRule in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CompliancePolicyRuleSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", compliancePolicyId=").append(String.valueOf(this.compliancePolicyId)); + sb.append(", productVersion=").append(String.valueOf(this.productVersion)); + sb.append(", patchType=").append(String.valueOf(this.patchType)); + sb.append(", severity=").append(String.valueOf(this.severity)); + sb.append(", patchSelection=").append(String.valueOf(this.patchSelection)); + sb.append(", gracePeriod=").append(String.valueOf(this.gracePeriod)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CompliancePolicyRuleSummary)) { + return false; + } + + CompliancePolicyRuleSummary other = (CompliancePolicyRuleSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.compliancePolicyId, other.compliancePolicyId) + && java.util.Objects.equals(this.productVersion, other.productVersion) + && java.util.Objects.equals(this.patchType, other.patchType) + && java.util.Objects.equals(this.severity, other.severity) + && java.util.Objects.equals(this.patchSelection, other.patchSelection) + && java.util.Objects.equals(this.gracePeriod, other.gracePeriod) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.compliancePolicyId == null + ? 43 + : this.compliancePolicyId.hashCode()); + result = + (result * PRIME) + + (this.productVersion == null ? 43 : this.productVersion.hashCode()); + result = (result * PRIME) + (this.patchType == null ? 43 : this.patchType.hashCode()); + result = (result * PRIME) + (this.severity == null ? 43 : this.severity.hashCode()); + result = + (result * PRIME) + + (this.patchSelection == null ? 43 : this.patchSelection.hashCode()); + result = (result * PRIME) + (this.gracePeriod == null ? 43 : this.gracePeriod.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePolicySummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePolicySummary.java new file mode 100644 index 00000000000..7aee95af7aa --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CompliancePolicySummary.java @@ -0,0 +1,604 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Summary information about a CompliancePolicy. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CompliancePolicySummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CompliancePolicySummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "productId", + "compartmentId", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public CompliancePolicySummary( + String id, + String displayName, + String productId, + String compartmentId, + java.util.Date timeCreated, + java.util.Date timeUpdated, + CompliancePolicy.LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.productId = productId; + this.compartmentId = compartmentId; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the CompliancePolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the CompliancePolicy. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Display name for the CompliancePolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Display name for the CompliancePolicy. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * platformConfiguration OCID corresponding to the Product. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productId") + private String productId; + + /** + * platformConfiguration OCID corresponding to the Product. + * @param productId the value to set + * @return this builder + **/ + public Builder productId(String productId) { + this.productId = productId; + this.__explicitlySet__.add("productId"); + return this; + } + /** + * The OCID of the compartment the CompliancePolicy belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment the CompliancePolicy belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The date and time the CompliancePolicy was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the CompliancePolicy was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the CompliancePolicy was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the CompliancePolicy was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of the CompliancePolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private CompliancePolicy.LifecycleState lifecycleState; + + /** + * The current state of the CompliancePolicy. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(CompliancePolicy.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message that describes the current state of the CompliancePolicy in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of the CompliancePolicy in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CompliancePolicySummary build() { + CompliancePolicySummary model = + new CompliancePolicySummary( + this.id, + this.displayName, + this.productId, + this.compartmentId, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CompliancePolicySummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("productId")) { + this.productId(model.getProductId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the CompliancePolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the CompliancePolicy. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Display name for the CompliancePolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Display name for the CompliancePolicy. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * platformConfiguration OCID corresponding to the Product. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productId") + private final String productId; + + /** + * platformConfiguration OCID corresponding to the Product. + * @return the value + **/ + public String getProductId() { + return productId; + } + + /** + * The OCID of the compartment the CompliancePolicy belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment the CompliancePolicy belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The date and time the CompliancePolicy was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the CompliancePolicy was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the CompliancePolicy was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the CompliancePolicy was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the CompliancePolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final CompliancePolicy.LifecycleState lifecycleState; + + /** + * The current state of the CompliancePolicy. + * @return the value + **/ + public CompliancePolicy.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message that describes the current state of the CompliancePolicy in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of the CompliancePolicy in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CompliancePolicySummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", productId=").append(String.valueOf(this.productId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CompliancePolicySummary)) { + return false; + } + + CompliancePolicySummary other = (CompliancePolicySummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.productId, other.productId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.productId == null ? 43 : this.productId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRecord.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRecord.java new file mode 100644 index 00000000000..4c5154e0176 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRecord.java @@ -0,0 +1,591 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The compliance status reports. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ComplianceRecord.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComplianceRecord extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "entityId", + "entityDisplayName", + "compartmentId", + "policy", + "resource", + "target", + "patch", + "complianceState", + "timeCreated", + "timeUpdated", + "lifecycleState" + }) + public ComplianceRecord( + String id, + String entityId, + String entityDisplayName, + String compartmentId, + ComplianceDetailPolicy policy, + ComplianceDetailResource resource, + ComplianceDetailTarget target, + CompliancePatchDetail patch, + ComplianceState complianceState, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState) { + super(); + this.id = id; + this.entityId = entityId; + this.entityDisplayName = entityDisplayName; + this.compartmentId = compartmentId; + this.policy = policy; + this.resource = resource; + this.target = target; + this.patch = patch; + this.complianceState = complianceState; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the ComplianceRecord. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the ComplianceRecord. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The OCID of the entity for which the compliance is calculated.Ex.FleetId + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityId") + private String entityId; + + /** + * The OCID of the entity for which the compliance is calculated.Ex.FleetId + * @param entityId the value to set + * @return this builder + **/ + public Builder entityId(String entityId) { + this.entityId = entityId; + this.__explicitlySet__.add("entityId"); + return this; + } + /** + * The displayName of the entity for which the compliance is calculated.Ex.DisplayName for the Fleet + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityDisplayName") + private String entityDisplayName; + + /** + * The displayName of the entity for which the compliance is calculated.Ex.DisplayName for the Fleet + * @param entityDisplayName the value to set + * @return this builder + **/ + public Builder entityDisplayName(String entityDisplayName) { + this.entityDisplayName = entityDisplayName; + this.__explicitlySet__.add("entityDisplayName"); + return this; + } + /** + * The OCID of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("policy") + private ComplianceDetailPolicy policy; + + public Builder policy(ComplianceDetailPolicy policy) { + this.policy = policy; + this.__explicitlySet__.add("policy"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resource") + private ComplianceDetailResource resource; + + public Builder resource(ComplianceDetailResource resource) { + this.resource = resource; + this.__explicitlySet__.add("resource"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("target") + private ComplianceDetailTarget target; + + public Builder target(ComplianceDetailTarget target) { + this.target = target; + this.__explicitlySet__.add("target"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patch") + private CompliancePatchDetail patch; + + public Builder patch(CompliancePatchDetail patch) { + this.patch = patch; + this.__explicitlySet__.add("patch"); + return this; + } + /** + * Last known compliance state of target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private ComplianceState complianceState; + + /** + * Last known compliance state of target. + * @param complianceState the value to set + * @return this builder + **/ + public Builder complianceState(ComplianceState complianceState) { + this.complianceState = complianceState; + this.__explicitlySet__.add("complianceState"); + return this; + } + /** + * The date and time the ComplianceRecord was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the ComplianceRecord was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the ComplianceRecord was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the ComplianceRecord was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of the ComplianceRecord. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the ComplianceRecord. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComplianceRecord build() { + ComplianceRecord model = + new ComplianceRecord( + this.id, + this.entityId, + this.entityDisplayName, + this.compartmentId, + this.policy, + this.resource, + this.target, + this.patch, + this.complianceState, + this.timeCreated, + this.timeUpdated, + this.lifecycleState); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComplianceRecord model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("entityId")) { + this.entityId(model.getEntityId()); + } + if (model.wasPropertyExplicitlySet("entityDisplayName")) { + this.entityDisplayName(model.getEntityDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("policy")) { + this.policy(model.getPolicy()); + } + if (model.wasPropertyExplicitlySet("resource")) { + this.resource(model.getResource()); + } + if (model.wasPropertyExplicitlySet("target")) { + this.target(model.getTarget()); + } + if (model.wasPropertyExplicitlySet("patch")) { + this.patch(model.getPatch()); + } + if (model.wasPropertyExplicitlySet("complianceState")) { + this.complianceState(model.getComplianceState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the ComplianceRecord. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the ComplianceRecord. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of the entity for which the compliance is calculated.Ex.FleetId + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityId") + private final String entityId; + + /** + * The OCID of the entity for which the compliance is calculated.Ex.FleetId + * @return the value + **/ + public String getEntityId() { + return entityId; + } + + /** + * The displayName of the entity for which the compliance is calculated.Ex.DisplayName for the Fleet + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityDisplayName") + private final String entityDisplayName; + + /** + * The displayName of the entity for which the compliance is calculated.Ex.DisplayName for the Fleet + * @return the value + **/ + public String getEntityDisplayName() { + return entityDisplayName; + } + + /** + * The OCID of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("policy") + private final ComplianceDetailPolicy policy; + + public ComplianceDetailPolicy getPolicy() { + return policy; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resource") + private final ComplianceDetailResource resource; + + public ComplianceDetailResource getResource() { + return resource; + } + + @com.fasterxml.jackson.annotation.JsonProperty("target") + private final ComplianceDetailTarget target; + + public ComplianceDetailTarget getTarget() { + return target; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patch") + private final CompliancePatchDetail patch; + + public CompliancePatchDetail getPatch() { + return patch; + } + + /** + * Last known compliance state of target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private final ComplianceState complianceState; + + /** + * Last known compliance state of target. + * @return the value + **/ + public ComplianceState getComplianceState() { + return complianceState; + } + + /** + * The date and time the ComplianceRecord was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the ComplianceRecord was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the ComplianceRecord was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the ComplianceRecord was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the ComplianceRecord. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Deleted("DELETED"), + Failed("FAILED"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + map.put(v.getValue(), v); + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid LifecycleState: " + key); + } + }; + /** + * The current state of the ComplianceRecord. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the ComplianceRecord. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ComplianceRecord("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", entityId=").append(String.valueOf(this.entityId)); + sb.append(", entityDisplayName=").append(String.valueOf(this.entityDisplayName)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", policy=").append(String.valueOf(this.policy)); + sb.append(", resource=").append(String.valueOf(this.resource)); + sb.append(", target=").append(String.valueOf(this.target)); + sb.append(", patch=").append(String.valueOf(this.patch)); + sb.append(", complianceState=").append(String.valueOf(this.complianceState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComplianceRecord)) { + return false; + } + + ComplianceRecord other = (ComplianceRecord) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.entityId, other.entityId) + && java.util.Objects.equals(this.entityDisplayName, other.entityDisplayName) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.policy, other.policy) + && java.util.Objects.equals(this.resource, other.resource) + && java.util.Objects.equals(this.target, other.target) + && java.util.Objects.equals(this.patch, other.patch) + && java.util.Objects.equals(this.complianceState, other.complianceState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.entityId == null ? 43 : this.entityId.hashCode()); + result = + (result * PRIME) + + (this.entityDisplayName == null ? 43 : this.entityDisplayName.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.policy == null ? 43 : this.policy.hashCode()); + result = (result * PRIME) + (this.resource == null ? 43 : this.resource.hashCode()); + result = (result * PRIME) + (this.target == null ? 43 : this.target.hashCode()); + result = (result * PRIME) + (this.patch == null ? 43 : this.patch.hashCode()); + result = + (result * PRIME) + + (this.complianceState == null ? 43 : this.complianceState.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRecordAggregation.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRecordAggregation.java new file mode 100644 index 00000000000..e0ecd007026 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRecordAggregation.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Aggregated summary information for ComplianceRecord + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ComplianceRecordAggregation.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComplianceRecordAggregation + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"count", "dimensions"}) + public ComplianceRecordAggregation(Integer count, ComplianceRecordDimension dimensions) { + super(); + this.count = count; + this.dimensions = dimensions; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * count of ComplianceRecord in a Tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("count") + private Integer count; + + /** + * count of ComplianceRecord in a Tenancy. + * @param count the value to set + * @return this builder + **/ + public Builder count(Integer count) { + this.count = count; + this.__explicitlySet__.add("count"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dimensions") + private ComplianceRecordDimension dimensions; + + public Builder dimensions(ComplianceRecordDimension dimensions) { + this.dimensions = dimensions; + this.__explicitlySet__.add("dimensions"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComplianceRecordAggregation build() { + ComplianceRecordAggregation model = + new ComplianceRecordAggregation(this.count, this.dimensions); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComplianceRecordAggregation model) { + if (model.wasPropertyExplicitlySet("count")) { + this.count(model.getCount()); + } + if (model.wasPropertyExplicitlySet("dimensions")) { + this.dimensions(model.getDimensions()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * count of ComplianceRecord in a Tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("count") + private final Integer count; + + /** + * count of ComplianceRecord in a Tenancy. + * @return the value + **/ + public Integer getCount() { + return count; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dimensions") + private final ComplianceRecordDimension dimensions; + + public ComplianceRecordDimension getDimensions() { + return dimensions; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ComplianceRecordAggregation("); + sb.append("super=").append(super.toString()); + sb.append("count=").append(String.valueOf(this.count)); + sb.append(", dimensions=").append(String.valueOf(this.dimensions)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComplianceRecordAggregation)) { + return false; + } + + ComplianceRecordAggregation other = (ComplianceRecordAggregation) o; + return java.util.Objects.equals(this.count, other.count) + && java.util.Objects.equals(this.dimensions, other.dimensions) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.count == null ? 43 : this.count.hashCode()); + result = (result * PRIME) + (this.dimensions == null ? 43 : this.dimensions.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRecordAggregationCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRecordAggregationCollection.java new file mode 100644 index 00000000000..33af3612bec --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRecordAggregationCollection.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * An array of ComplianceRecord objects + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ComplianceRecordAggregationCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComplianceRecordAggregationCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ComplianceRecordAggregationCollection( + java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of ComplianceRecordAggregation objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of ComplianceRecordAggregation objects. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComplianceRecordAggregationCollection build() { + ComplianceRecordAggregationCollection model = + new ComplianceRecordAggregationCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComplianceRecordAggregationCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of ComplianceRecordAggregation objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of ComplianceRecordAggregation objects. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ComplianceRecordAggregationCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComplianceRecordAggregationCollection)) { + return false; + } + + ComplianceRecordAggregationCollection other = (ComplianceRecordAggregationCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRecordCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRecordCollection.java new file mode 100644 index 00000000000..b888a7ff788 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRecordCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a compliancePolicy search. Contains both CompliancePolicySummary items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ComplianceRecordCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComplianceRecordCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ComplianceRecordCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of compliancePolicys. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of compliancePolicys. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComplianceRecordCollection build() { + ComplianceRecordCollection model = new ComplianceRecordCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComplianceRecordCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of compliancePolicys. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of compliancePolicys. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ComplianceRecordCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComplianceRecordCollection)) { + return false; + } + + ComplianceRecordCollection other = (ComplianceRecordCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRecordDimension.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRecordDimension.java new file mode 100644 index 00000000000..2e20bc08eca --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRecordDimension.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Aggregated summary information for ComplianceRecord + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ComplianceRecordDimension.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComplianceRecordDimension + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"complianceState", "complianceLevel"}) + public ComplianceRecordDimension( + ComplianceState complianceState, ComplianceLevel complianceLevel) { + super(); + this.complianceState = complianceState; + this.complianceLevel = complianceLevel; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Last known compliance state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private ComplianceState complianceState; + + /** + * Last known compliance state. + * @param complianceState the value to set + * @return this builder + **/ + public Builder complianceState(ComplianceState complianceState) { + this.complianceState = complianceState; + this.__explicitlySet__.add("complianceState"); + return this; + } + /** + * Level at which the compliance is calculated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceLevel") + private ComplianceLevel complianceLevel; + + /** + * Level at which the compliance is calculated. + * @param complianceLevel the value to set + * @return this builder + **/ + public Builder complianceLevel(ComplianceLevel complianceLevel) { + this.complianceLevel = complianceLevel; + this.__explicitlySet__.add("complianceLevel"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComplianceRecordDimension build() { + ComplianceRecordDimension model = + new ComplianceRecordDimension(this.complianceState, this.complianceLevel); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComplianceRecordDimension model) { + if (model.wasPropertyExplicitlySet("complianceState")) { + this.complianceState(model.getComplianceState()); + } + if (model.wasPropertyExplicitlySet("complianceLevel")) { + this.complianceLevel(model.getComplianceLevel()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Last known compliance state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private final ComplianceState complianceState; + + /** + * Last known compliance state. + * @return the value + **/ + public ComplianceState getComplianceState() { + return complianceState; + } + + /** + * Level at which the compliance is calculated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceLevel") + private final ComplianceLevel complianceLevel; + + /** + * Level at which the compliance is calculated. + * @return the value + **/ + public ComplianceLevel getComplianceLevel() { + return complianceLevel; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ComplianceRecordDimension("); + sb.append("super=").append(super.toString()); + sb.append("complianceState=").append(String.valueOf(this.complianceState)); + sb.append(", complianceLevel=").append(String.valueOf(this.complianceLevel)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComplianceRecordDimension)) { + return false; + } + + ComplianceRecordDimension other = (ComplianceRecordDimension) o; + return java.util.Objects.equals(this.complianceState, other.complianceState) + && java.util.Objects.equals(this.complianceLevel, other.complianceLevel) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.complianceState == null ? 43 : this.complianceState.hashCode()); + result = + (result * PRIME) + + (this.complianceLevel == null ? 43 : this.complianceLevel.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRecordSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRecordSummary.java new file mode 100644 index 00000000000..785515fdce6 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRecordSummary.java @@ -0,0 +1,557 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Summary information about a ComplianceDetail. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ComplianceRecordSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComplianceRecordSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "entityId", + "entityDisplayName", + "compartmentId", + "policy", + "resource", + "target", + "patch", + "complianceState", + "timeCreated", + "timeUpdated", + "lifecycleState" + }) + public ComplianceRecordSummary( + String id, + String entityId, + String entityDisplayName, + String compartmentId, + ComplianceDetailPolicy policy, + ComplianceDetailResource resource, + ComplianceDetailTarget target, + CompliancePatchDetail patch, + ComplianceState complianceState, + java.util.Date timeCreated, + java.util.Date timeUpdated, + ComplianceRecord.LifecycleState lifecycleState) { + super(); + this.id = id; + this.entityId = entityId; + this.entityDisplayName = entityDisplayName; + this.compartmentId = compartmentId; + this.policy = policy; + this.resource = resource; + this.target = target; + this.patch = patch; + this.complianceState = complianceState; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the ComplianceRecord. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the ComplianceRecord. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The OCID of the entity for which the compliance is calculated.Ex.FleetId + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityId") + private String entityId; + + /** + * The OCID of the entity for which the compliance is calculated.Ex.FleetId + * @param entityId the value to set + * @return this builder + **/ + public Builder entityId(String entityId) { + this.entityId = entityId; + this.__explicitlySet__.add("entityId"); + return this; + } + /** + * The displayName of the entity for which the compliance is calculated.Ex.DisplayName for the Fleet + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityDisplayName") + private String entityDisplayName; + + /** + * The displayName of the entity for which the compliance is calculated.Ex.DisplayName for the Fleet + * @param entityDisplayName the value to set + * @return this builder + **/ + public Builder entityDisplayName(String entityDisplayName) { + this.entityDisplayName = entityDisplayName; + this.__explicitlySet__.add("entityDisplayName"); + return this; + } + /** + * The OCID of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("policy") + private ComplianceDetailPolicy policy; + + public Builder policy(ComplianceDetailPolicy policy) { + this.policy = policy; + this.__explicitlySet__.add("policy"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resource") + private ComplianceDetailResource resource; + + public Builder resource(ComplianceDetailResource resource) { + this.resource = resource; + this.__explicitlySet__.add("resource"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("target") + private ComplianceDetailTarget target; + + public Builder target(ComplianceDetailTarget target) { + this.target = target; + this.__explicitlySet__.add("target"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patch") + private CompliancePatchDetail patch; + + public Builder patch(CompliancePatchDetail patch) { + this.patch = patch; + this.__explicitlySet__.add("patch"); + return this; + } + /** + * Last known compliance state of target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private ComplianceState complianceState; + + /** + * Last known compliance state of target. + * @param complianceState the value to set + * @return this builder + **/ + public Builder complianceState(ComplianceState complianceState) { + this.complianceState = complianceState; + this.__explicitlySet__.add("complianceState"); + return this; + } + /** + * The date and time the ComplianceRecord was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the ComplianceRecord was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the ComplianceRecord was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the ComplianceRecord was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of the ComplianceRecord. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private ComplianceRecord.LifecycleState lifecycleState; + + /** + * The current state of the ComplianceRecord. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(ComplianceRecord.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComplianceRecordSummary build() { + ComplianceRecordSummary model = + new ComplianceRecordSummary( + this.id, + this.entityId, + this.entityDisplayName, + this.compartmentId, + this.policy, + this.resource, + this.target, + this.patch, + this.complianceState, + this.timeCreated, + this.timeUpdated, + this.lifecycleState); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComplianceRecordSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("entityId")) { + this.entityId(model.getEntityId()); + } + if (model.wasPropertyExplicitlySet("entityDisplayName")) { + this.entityDisplayName(model.getEntityDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("policy")) { + this.policy(model.getPolicy()); + } + if (model.wasPropertyExplicitlySet("resource")) { + this.resource(model.getResource()); + } + if (model.wasPropertyExplicitlySet("target")) { + this.target(model.getTarget()); + } + if (model.wasPropertyExplicitlySet("patch")) { + this.patch(model.getPatch()); + } + if (model.wasPropertyExplicitlySet("complianceState")) { + this.complianceState(model.getComplianceState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the ComplianceRecord. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the ComplianceRecord. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of the entity for which the compliance is calculated.Ex.FleetId + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityId") + private final String entityId; + + /** + * The OCID of the entity for which the compliance is calculated.Ex.FleetId + * @return the value + **/ + public String getEntityId() { + return entityId; + } + + /** + * The displayName of the entity for which the compliance is calculated.Ex.DisplayName for the Fleet + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityDisplayName") + private final String entityDisplayName; + + /** + * The displayName of the entity for which the compliance is calculated.Ex.DisplayName for the Fleet + * @return the value + **/ + public String getEntityDisplayName() { + return entityDisplayName; + } + + /** + * The OCID of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("policy") + private final ComplianceDetailPolicy policy; + + public ComplianceDetailPolicy getPolicy() { + return policy; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resource") + private final ComplianceDetailResource resource; + + public ComplianceDetailResource getResource() { + return resource; + } + + @com.fasterxml.jackson.annotation.JsonProperty("target") + private final ComplianceDetailTarget target; + + public ComplianceDetailTarget getTarget() { + return target; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patch") + private final CompliancePatchDetail patch; + + public CompliancePatchDetail getPatch() { + return patch; + } + + /** + * Last known compliance state of target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private final ComplianceState complianceState; + + /** + * Last known compliance state of target. + * @return the value + **/ + public ComplianceState getComplianceState() { + return complianceState; + } + + /** + * The date and time the ComplianceRecord was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the ComplianceRecord was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the ComplianceRecord was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the ComplianceRecord was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the ComplianceRecord. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final ComplianceRecord.LifecycleState lifecycleState; + + /** + * The current state of the ComplianceRecord. + * @return the value + **/ + public ComplianceRecord.LifecycleState getLifecycleState() { + return lifecycleState; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ComplianceRecordSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", entityId=").append(String.valueOf(this.entityId)); + sb.append(", entityDisplayName=").append(String.valueOf(this.entityDisplayName)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", policy=").append(String.valueOf(this.policy)); + sb.append(", resource=").append(String.valueOf(this.resource)); + sb.append(", target=").append(String.valueOf(this.target)); + sb.append(", patch=").append(String.valueOf(this.patch)); + sb.append(", complianceState=").append(String.valueOf(this.complianceState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComplianceRecordSummary)) { + return false; + } + + ComplianceRecordSummary other = (ComplianceRecordSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.entityId, other.entityId) + && java.util.Objects.equals(this.entityDisplayName, other.entityDisplayName) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.policy, other.policy) + && java.util.Objects.equals(this.resource, other.resource) + && java.util.Objects.equals(this.target, other.target) + && java.util.Objects.equals(this.patch, other.patch) + && java.util.Objects.equals(this.complianceState, other.complianceState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.entityId == null ? 43 : this.entityId.hashCode()); + result = + (result * PRIME) + + (this.entityDisplayName == null ? 43 : this.entityDisplayName.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.policy == null ? 43 : this.policy.hashCode()); + result = (result * PRIME) + (this.resource == null ? 43 : this.resource.hashCode()); + result = (result * PRIME) + (this.target == null ? 43 : this.target.hashCode()); + result = (result * PRIME) + (this.patch == null ? 43 : this.patch.hashCode()); + result = + (result * PRIME) + + (this.complianceState == null ? 43 : this.complianceState.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceReport.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceReport.java new file mode 100644 index 00000000000..92a4cb630e0 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceReport.java @@ -0,0 +1,252 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Compliance details for a fleet in Fleet Application Management. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ComplianceReport.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComplianceReport extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"id", "fleetId", "complianceState", "resources"}) + public ComplianceReport( + String id, + String fleetId, + ComplianceState complianceState, + java.util.List resources) { + super(); + this.id = id; + this.fleetId = fleetId; + this.complianceState = complianceState; + this.resources = resources; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Compliance Report Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Compliance Report Identifier + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The fleet OCID. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetId") + private String fleetId; + + /** + * The fleet OCID. + * @param fleetId the value to set + * @return this builder + **/ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + this.__explicitlySet__.add("fleetId"); + return this; + } + /** + * The last known compliance state of the fleet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private ComplianceState complianceState; + + /** + * The last known compliance state of the fleet. + * @param complianceState the value to set + * @return this builder + **/ + public Builder complianceState(ComplianceState complianceState) { + this.complianceState = complianceState; + this.__explicitlySet__.add("complianceState"); + return this; + } + /** + * Resources associated with the Fleet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * Resources associated with the Fleet. + * @param resources the value to set + * @return this builder + **/ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComplianceReport build() { + ComplianceReport model = + new ComplianceReport( + this.id, this.fleetId, this.complianceState, this.resources); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComplianceReport model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("fleetId")) { + this.fleetId(model.getFleetId()); + } + if (model.wasPropertyExplicitlySet("complianceState")) { + this.complianceState(model.getComplianceState()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Compliance Report Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Compliance Report Identifier + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The fleet OCID. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetId") + private final String fleetId; + + /** + * The fleet OCID. + * @return the value + **/ + public String getFleetId() { + return fleetId; + } + + /** + * The last known compliance state of the fleet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private final ComplianceState complianceState; + + /** + * The last known compliance state of the fleet. + * @return the value + **/ + public ComplianceState getComplianceState() { + return complianceState; + } + + /** + * Resources associated with the Fleet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * Resources associated with the Fleet. + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ComplianceReport("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", fleetId=").append(String.valueOf(this.fleetId)); + sb.append(", complianceState=").append(String.valueOf(this.complianceState)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComplianceReport)) { + return false; + } + + ComplianceReport other = (ComplianceReport) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.complianceState, other.complianceState) + && java.util.Objects.equals(this.resources, other.resources) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.complianceState == null ? 43 : this.complianceState.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceReportPatchDetail.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceReportPatchDetail.java new file mode 100644 index 00000000000..d4e33ba19cb --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceReportPatchDetail.java @@ -0,0 +1,303 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details of the Patch. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ComplianceReportPatchDetail.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComplianceReportPatchDetail + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "patchName", + "patchDescription", + "timeApplied", + "timeReleased", + "patchType" + }) + public ComplianceReportPatchDetail( + String patchName, + String patchDescription, + java.util.Date timeApplied, + java.util.Date timeReleased, + String patchType) { + super(); + this.patchName = patchName; + this.patchDescription = patchDescription; + this.timeApplied = timeApplied; + this.timeReleased = timeReleased; + this.patchType = patchType; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Patch name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchName") + private String patchName; + + /** + * Patch name. + * @param patchName the value to set + * @return this builder + **/ + public Builder patchName(String patchName) { + this.patchName = patchName; + this.__explicitlySet__.add("patchName"); + return this; + } + /** + * Patch description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchDescription") + private String patchDescription; + + /** + * Patch description. + * @param patchDescription the value to set + * @return this builder + **/ + public Builder patchDescription(String patchDescription) { + this.patchDescription = patchDescription; + this.__explicitlySet__.add("patchDescription"); + return this; + } + /** + * Time the patch was applied. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeApplied") + private java.util.Date timeApplied; + + /** + * Time the patch was applied. + * @param timeApplied the value to set + * @return this builder + **/ + public Builder timeApplied(java.util.Date timeApplied) { + this.timeApplied = timeApplied; + this.__explicitlySet__.add("timeApplied"); + return this; + } + /** + * The date on which patch was released. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeReleased") + private java.util.Date timeReleased; + + /** + * The date on which patch was released. + * @param timeReleased the value to set + * @return this builder + **/ + public Builder timeReleased(java.util.Date timeReleased) { + this.timeReleased = timeReleased; + this.__explicitlySet__.add("timeReleased"); + return this; + } + /** + * Type of patch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchType") + private String patchType; + + /** + * Type of patch. + * @param patchType the value to set + * @return this builder + **/ + public Builder patchType(String patchType) { + this.patchType = patchType; + this.__explicitlySet__.add("patchType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComplianceReportPatchDetail build() { + ComplianceReportPatchDetail model = + new ComplianceReportPatchDetail( + this.patchName, + this.patchDescription, + this.timeApplied, + this.timeReleased, + this.patchType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComplianceReportPatchDetail model) { + if (model.wasPropertyExplicitlySet("patchName")) { + this.patchName(model.getPatchName()); + } + if (model.wasPropertyExplicitlySet("patchDescription")) { + this.patchDescription(model.getPatchDescription()); + } + if (model.wasPropertyExplicitlySet("timeApplied")) { + this.timeApplied(model.getTimeApplied()); + } + if (model.wasPropertyExplicitlySet("timeReleased")) { + this.timeReleased(model.getTimeReleased()); + } + if (model.wasPropertyExplicitlySet("patchType")) { + this.patchType(model.getPatchType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Patch name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchName") + private final String patchName; + + /** + * Patch name. + * @return the value + **/ + public String getPatchName() { + return patchName; + } + + /** + * Patch description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchDescription") + private final String patchDescription; + + /** + * Patch description. + * @return the value + **/ + public String getPatchDescription() { + return patchDescription; + } + + /** + * Time the patch was applied. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeApplied") + private final java.util.Date timeApplied; + + /** + * Time the patch was applied. + * @return the value + **/ + public java.util.Date getTimeApplied() { + return timeApplied; + } + + /** + * The date on which patch was released. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeReleased") + private final java.util.Date timeReleased; + + /** + * The date on which patch was released. + * @return the value + **/ + public java.util.Date getTimeReleased() { + return timeReleased; + } + + /** + * Type of patch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchType") + private final String patchType; + + /** + * Type of patch. + * @return the value + **/ + public String getPatchType() { + return patchType; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ComplianceReportPatchDetail("); + sb.append("super=").append(super.toString()); + sb.append("patchName=").append(String.valueOf(this.patchName)); + sb.append(", patchDescription=").append(String.valueOf(this.patchDescription)); + sb.append(", timeApplied=").append(String.valueOf(this.timeApplied)); + sb.append(", timeReleased=").append(String.valueOf(this.timeReleased)); + sb.append(", patchType=").append(String.valueOf(this.patchType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComplianceReportPatchDetail)) { + return false; + } + + ComplianceReportPatchDetail other = (ComplianceReportPatchDetail) o; + return java.util.Objects.equals(this.patchName, other.patchName) + && java.util.Objects.equals(this.patchDescription, other.patchDescription) + && java.util.Objects.equals(this.timeApplied, other.timeApplied) + && java.util.Objects.equals(this.timeReleased, other.timeReleased) + && java.util.Objects.equals(this.patchType, other.patchType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.patchName == null ? 43 : this.patchName.hashCode()); + result = + (result * PRIME) + + (this.patchDescription == null ? 43 : this.patchDescription.hashCode()); + result = (result * PRIME) + (this.timeApplied == null ? 43 : this.timeApplied.hashCode()); + result = (result * PRIME) + (this.timeReleased == null ? 43 : this.timeReleased.hashCode()); + result = (result * PRIME) + (this.patchType == null ? 43 : this.patchType.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceReportProduct.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceReportProduct.java new file mode 100644 index 00000000000..6168c7b666a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceReportProduct.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details of the Product. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ComplianceReportProduct.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComplianceReportProduct + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"productName", "targets"}) + public ComplianceReportProduct( + String productName, java.util.List targets) { + super(); + this.productName = productName; + this.targets = targets; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Product Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productName") + private String productName; + + /** + * Product Name. + * @param productName the value to set + * @return this builder + **/ + public Builder productName(String productName) { + this.productName = productName; + this.__explicitlySet__.add("productName"); + return this; + } + /** + * Managed Targets associated with the Product. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targets") + private java.util.List targets; + + /** + * Managed Targets associated with the Product. + * @param targets the value to set + * @return this builder + **/ + public Builder targets(java.util.List targets) { + this.targets = targets; + this.__explicitlySet__.add("targets"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComplianceReportProduct build() { + ComplianceReportProduct model = + new ComplianceReportProduct(this.productName, this.targets); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComplianceReportProduct model) { + if (model.wasPropertyExplicitlySet("productName")) { + this.productName(model.getProductName()); + } + if (model.wasPropertyExplicitlySet("targets")) { + this.targets(model.getTargets()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Product Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productName") + private final String productName; + + /** + * Product Name. + * @return the value + **/ + public String getProductName() { + return productName; + } + + /** + * Managed Targets associated with the Product. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targets") + private final java.util.List targets; + + /** + * Managed Targets associated with the Product. + * @return the value + **/ + public java.util.List getTargets() { + return targets; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ComplianceReportProduct("); + sb.append("super=").append(super.toString()); + sb.append("productName=").append(String.valueOf(this.productName)); + sb.append(", targets=").append(String.valueOf(this.targets)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComplianceReportProduct)) { + return false; + } + + ComplianceReportProduct other = (ComplianceReportProduct) o; + return java.util.Objects.equals(this.productName, other.productName) + && java.util.Objects.equals(this.targets, other.targets) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.productName == null ? 43 : this.productName.hashCode()); + result = (result * PRIME) + (this.targets == null ? 43 : this.targets.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceReportResource.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceReportResource.java new file mode 100644 index 00000000000..90bf609108d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceReportResource.java @@ -0,0 +1,473 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details of the Resource + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ComplianceReportResource.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComplianceReportResource + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "resourceId", + "resourceName", + "resourceType", + "tenancyId", + "tenancyName", + "compartment", + "resourceRegion", + "complianceState", + "products" + }) + public ComplianceReportResource( + String resourceId, + String resourceName, + String resourceType, + String tenancyId, + String tenancyName, + String compartment, + String resourceRegion, + ComplianceState complianceState, + java.util.List products) { + super(); + this.resourceId = resourceId; + this.resourceName = resourceName; + this.resourceType = resourceType; + this.tenancyId = tenancyId; + this.tenancyName = tenancyName; + this.compartment = compartment; + this.resourceRegion = resourceRegion; + this.complianceState = complianceState; + this.products = products; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID to identify the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * The OCID to identify the resource. + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * Display name of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceName") + private String resourceName; + + /** + * Display name of the resource. + * @param resourceName the value to set + * @return this builder + **/ + public Builder resourceName(String resourceName) { + this.resourceName = resourceName; + this.__explicitlySet__.add("resourceName"); + return this; + } + /** + * Type of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private String resourceType; + + /** + * Type of the resource. + * @param resourceType the value to set + * @return this builder + **/ + public Builder resourceType(String resourceType) { + this.resourceType = resourceType; + this.__explicitlySet__.add("resourceType"); + return this; + } + /** + * TenancyId of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private String tenancyId; + + /** + * TenancyId of the resource. + * @param tenancyId the value to set + * @return this builder + **/ + public Builder tenancyId(String tenancyId) { + this.tenancyId = tenancyId; + this.__explicitlySet__.add("tenancyId"); + return this; + } + /** + * Tenancy the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyName") + private String tenancyName; + + /** + * Tenancy the resource belongs to. + * @param tenancyName the value to set + * @return this builder + **/ + public Builder tenancyName(String tenancyName) { + this.tenancyName = tenancyName; + this.__explicitlySet__.add("tenancyName"); + return this; + } + /** + * Compartment the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartment") + private String compartment; + + /** + * Compartment the resource belongs to. + * @param compartment the value to set + * @return this builder + **/ + public Builder compartment(String compartment) { + this.compartment = compartment; + this.__explicitlySet__.add("compartment"); + return this; + } + /** + * The region the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * The region the resource belongs to. + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * The last known compliance state of the fleet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private ComplianceState complianceState; + + /** + * The last known compliance state of the fleet. + * @param complianceState the value to set + * @return this builder + **/ + public Builder complianceState(ComplianceState complianceState) { + this.complianceState = complianceState; + this.__explicitlySet__.add("complianceState"); + return this; + } + /** + * Products associated with the Fleet. + * Only the products belonging to managed targets will be shown. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("products") + private java.util.List products; + + /** + * Products associated with the Fleet. + * Only the products belonging to managed targets will be shown. + * + * @param products the value to set + * @return this builder + **/ + public Builder products(java.util.List products) { + this.products = products; + this.__explicitlySet__.add("products"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComplianceReportResource build() { + ComplianceReportResource model = + new ComplianceReportResource( + this.resourceId, + this.resourceName, + this.resourceType, + this.tenancyId, + this.tenancyName, + this.compartment, + this.resourceRegion, + this.complianceState, + this.products); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComplianceReportResource model) { + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("resourceName")) { + this.resourceName(model.getResourceName()); + } + if (model.wasPropertyExplicitlySet("resourceType")) { + this.resourceType(model.getResourceType()); + } + if (model.wasPropertyExplicitlySet("tenancyId")) { + this.tenancyId(model.getTenancyId()); + } + if (model.wasPropertyExplicitlySet("tenancyName")) { + this.tenancyName(model.getTenancyName()); + } + if (model.wasPropertyExplicitlySet("compartment")) { + this.compartment(model.getCompartment()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("complianceState")) { + this.complianceState(model.getComplianceState()); + } + if (model.wasPropertyExplicitlySet("products")) { + this.products(model.getProducts()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID to identify the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * The OCID to identify the resource. + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * Display name of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceName") + private final String resourceName; + + /** + * Display name of the resource. + * @return the value + **/ + public String getResourceName() { + return resourceName; + } + + /** + * Type of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private final String resourceType; + + /** + * Type of the resource. + * @return the value + **/ + public String getResourceType() { + return resourceType; + } + + /** + * TenancyId of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private final String tenancyId; + + /** + * TenancyId of the resource. + * @return the value + **/ + public String getTenancyId() { + return tenancyId; + } + + /** + * Tenancy the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyName") + private final String tenancyName; + + /** + * Tenancy the resource belongs to. + * @return the value + **/ + public String getTenancyName() { + return tenancyName; + } + + /** + * Compartment the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartment") + private final String compartment; + + /** + * Compartment the resource belongs to. + * @return the value + **/ + public String getCompartment() { + return compartment; + } + + /** + * The region the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * The region the resource belongs to. + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * The last known compliance state of the fleet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private final ComplianceState complianceState; + + /** + * The last known compliance state of the fleet. + * @return the value + **/ + public ComplianceState getComplianceState() { + return complianceState; + } + + /** + * Products associated with the Fleet. + * Only the products belonging to managed targets will be shown. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("products") + private final java.util.List products; + + /** + * Products associated with the Fleet. + * Only the products belonging to managed targets will be shown. + * + * @return the value + **/ + public java.util.List getProducts() { + return products; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ComplianceReportResource("); + sb.append("super=").append(super.toString()); + sb.append("resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", resourceName=").append(String.valueOf(this.resourceName)); + sb.append(", resourceType=").append(String.valueOf(this.resourceType)); + sb.append(", tenancyId=").append(String.valueOf(this.tenancyId)); + sb.append(", tenancyName=").append(String.valueOf(this.tenancyName)); + sb.append(", compartment=").append(String.valueOf(this.compartment)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", complianceState=").append(String.valueOf(this.complianceState)); + sb.append(", products=").append(String.valueOf(this.products)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComplianceReportResource)) { + return false; + } + + ComplianceReportResource other = (ComplianceReportResource) o; + return java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.resourceName, other.resourceName) + && java.util.Objects.equals(this.resourceType, other.resourceType) + && java.util.Objects.equals(this.tenancyId, other.tenancyId) + && java.util.Objects.equals(this.tenancyName, other.tenancyName) + && java.util.Objects.equals(this.compartment, other.compartment) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.complianceState, other.complianceState) + && java.util.Objects.equals(this.products, other.products) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.resourceName == null ? 43 : this.resourceName.hashCode()); + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); + result = (result * PRIME) + (this.tenancyId == null ? 43 : this.tenancyId.hashCode()); + result = (result * PRIME) + (this.tenancyName == null ? 43 : this.tenancyName.hashCode()); + result = (result * PRIME) + (this.compartment == null ? 43 : this.compartment.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = + (result * PRIME) + + (this.complianceState == null ? 43 : this.complianceState.hashCode()); + result = (result * PRIME) + (this.products == null ? 43 : this.products.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceReportTarget.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceReportTarget.java new file mode 100644 index 00000000000..9fca9fbbce4 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceReportTarget.java @@ -0,0 +1,351 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details of the target and patches. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ComplianceReportTarget.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComplianceReportTarget + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "targetId", + "targetName", + "version", + "complianceState", + "installedPatches", + "recommendedPatches" + }) + public ComplianceReportTarget( + String targetId, + String targetName, + String version, + ComplianceState complianceState, + java.util.List installedPatches, + java.util.List recommendedPatches) { + super(); + this.targetId = targetId; + this.targetName = targetName; + this.version = version; + this.complianceState = complianceState; + this.installedPatches = installedPatches; + this.recommendedPatches = recommendedPatches; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Target Identifier.Can be the target name if a separate ID is not available. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetId") + private String targetId; + + /** + * Target Identifier.Can be the target name if a separate ID is not available. + * @param targetId the value to set + * @return this builder + **/ + public Builder targetId(String targetId) { + this.targetId = targetId; + this.__explicitlySet__.add("targetId"); + return this; + } + /** + * Target Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetName") + private String targetName; + + /** + * Target Name. + * @param targetName the value to set + * @return this builder + **/ + public Builder targetName(String targetName) { + this.targetName = targetName; + this.__explicitlySet__.add("targetName"); + return this; + } + /** + * Current version of the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * Current version of the target. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + /** + * The last known compliance state of the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private ComplianceState complianceState; + + /** + * The last known compliance state of the target. + * @param complianceState the value to set + * @return this builder + **/ + public Builder complianceState(ComplianceState complianceState) { + this.complianceState = complianceState; + this.__explicitlySet__.add("complianceState"); + return this; + } + /** + * Installed Patches for the Target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("installedPatches") + private java.util.List installedPatches; + + /** + * Installed Patches for the Target. + * @param installedPatches the value to set + * @return this builder + **/ + public Builder installedPatches( + java.util.List installedPatches) { + this.installedPatches = installedPatches; + this.__explicitlySet__.add("installedPatches"); + return this; + } + /** + * Recommended Patches for the Target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recommendedPatches") + private java.util.List recommendedPatches; + + /** + * Recommended Patches for the Target. + * @param recommendedPatches the value to set + * @return this builder + **/ + public Builder recommendedPatches( + java.util.List recommendedPatches) { + this.recommendedPatches = recommendedPatches; + this.__explicitlySet__.add("recommendedPatches"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComplianceReportTarget build() { + ComplianceReportTarget model = + new ComplianceReportTarget( + this.targetId, + this.targetName, + this.version, + this.complianceState, + this.installedPatches, + this.recommendedPatches); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComplianceReportTarget model) { + if (model.wasPropertyExplicitlySet("targetId")) { + this.targetId(model.getTargetId()); + } + if (model.wasPropertyExplicitlySet("targetName")) { + this.targetName(model.getTargetName()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + if (model.wasPropertyExplicitlySet("complianceState")) { + this.complianceState(model.getComplianceState()); + } + if (model.wasPropertyExplicitlySet("installedPatches")) { + this.installedPatches(model.getInstalledPatches()); + } + if (model.wasPropertyExplicitlySet("recommendedPatches")) { + this.recommendedPatches(model.getRecommendedPatches()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Target Identifier.Can be the target name if a separate ID is not available. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetId") + private final String targetId; + + /** + * Target Identifier.Can be the target name if a separate ID is not available. + * @return the value + **/ + public String getTargetId() { + return targetId; + } + + /** + * Target Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetName") + private final String targetName; + + /** + * Target Name. + * @return the value + **/ + public String getTargetName() { + return targetName; + } + + /** + * Current version of the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * Current version of the target. + * @return the value + **/ + public String getVersion() { + return version; + } + + /** + * The last known compliance state of the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private final ComplianceState complianceState; + + /** + * The last known compliance state of the target. + * @return the value + **/ + public ComplianceState getComplianceState() { + return complianceState; + } + + /** + * Installed Patches for the Target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("installedPatches") + private final java.util.List installedPatches; + + /** + * Installed Patches for the Target. + * @return the value + **/ + public java.util.List getInstalledPatches() { + return installedPatches; + } + + /** + * Recommended Patches for the Target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recommendedPatches") + private final java.util.List recommendedPatches; + + /** + * Recommended Patches for the Target. + * @return the value + **/ + public java.util.List getRecommendedPatches() { + return recommendedPatches; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ComplianceReportTarget("); + sb.append("super=").append(super.toString()); + sb.append("targetId=").append(String.valueOf(this.targetId)); + sb.append(", targetName=").append(String.valueOf(this.targetName)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(", complianceState=").append(String.valueOf(this.complianceState)); + sb.append(", installedPatches=").append(String.valueOf(this.installedPatches)); + sb.append(", recommendedPatches=").append(String.valueOf(this.recommendedPatches)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComplianceReportTarget)) { + return false; + } + + ComplianceReportTarget other = (ComplianceReportTarget) o; + return java.util.Objects.equals(this.targetId, other.targetId) + && java.util.Objects.equals(this.targetName, other.targetName) + && java.util.Objects.equals(this.version, other.version) + && java.util.Objects.equals(this.complianceState, other.complianceState) + && java.util.Objects.equals(this.installedPatches, other.installedPatches) + && java.util.Objects.equals(this.recommendedPatches, other.recommendedPatches) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); + result = (result * PRIME) + (this.targetName == null ? 43 : this.targetName.hashCode()); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = + (result * PRIME) + + (this.complianceState == null ? 43 : this.complianceState.hashCode()); + result = + (result * PRIME) + + (this.installedPatches == null ? 43 : this.installedPatches.hashCode()); + result = + (result * PRIME) + + (this.recommendedPatches == null + ? 43 + : this.recommendedPatches.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRuleSeverity.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRuleSeverity.java new file mode 100644 index 00000000000..faad45c9631 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceRuleSeverity.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Possible Compliance Rule severities. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public enum ComplianceRuleSeverity { + Critical("CRITICAL"), + High("HIGH"), + Medium("MEDIUM"), + Low("LOW"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ComplianceRuleSeverity.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ComplianceRuleSeverity v : ComplianceRuleSeverity.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ComplianceRuleSeverity(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ComplianceRuleSeverity create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ComplianceRuleSeverity', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceState.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceState.java new file mode 100644 index 00000000000..69aabd20b58 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComplianceState.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Possible values for the compliance state. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public enum ComplianceState { + Unknown("UNKNOWN"), + Compliant("COMPLIANT"), + NonCompliant("NON_COMPLIANT"), + Warning("WARNING"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ComplianceState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ComplianceState v : ComplianceState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ComplianceState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ComplianceState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ComplianceState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComponentProperties.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComponentProperties.java new file mode 100644 index 00000000000..ef25642fec5 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ComponentProperties.java @@ -0,0 +1,350 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The properties of the component. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ComponentProperties.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ComponentProperties extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "runOn", + "condition", + "actionOnFailure", + "pauseDetails", + "notificationPreferences" + }) + public ComponentProperties( + String runOn, + String condition, + ActionOnFailure actionOnFailure, + PauseDetails pauseDetails, + TaskNotificationPreferences notificationPreferences) { + super(); + this.runOn = runOn; + this.condition = condition; + this.actionOnFailure = actionOnFailure; + this.pauseDetails = pauseDetails; + this.notificationPreferences = notificationPreferences; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The runOn condition for the task/group/container. + * Build task execution conditions if applicable to product and product-specific components. + * This condition is relevant when handling product stack workflows. + * Example: target.product.name = Oracle WebLogic Server OR target.product.name = Oracle HTTP Server + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runOn") + private String runOn; + + /** + * The runOn condition for the task/group/container. + * Build task execution conditions if applicable to product and product-specific components. + * This condition is relevant when handling product stack workflows. + * Example: target.product.name = Oracle WebLogic Server OR target.product.name = Oracle HTTP Server + * + * @param runOn the value to set + * @return this builder + **/ + public Builder runOn(String runOn) { + this.runOn = runOn; + this.__explicitlySet__.add("runOn"); + return this; + } + /** + * Build control flow conditions that determine the relevance of the task execution. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("condition") + private String condition; + + /** + * Build control flow conditions that determine the relevance of the task execution. + * + * @param condition the value to set + * @return this builder + **/ + public Builder condition(String condition) { + this.condition = condition; + this.__explicitlySet__.add("condition"); + return this; + } + /** + * The action to be taken in case of a failure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionOnFailure") + private ActionOnFailure actionOnFailure; + + /** + * The action to be taken in case of a failure. + * @param actionOnFailure the value to set + * @return this builder + **/ + public Builder actionOnFailure(ActionOnFailure actionOnFailure) { + this.actionOnFailure = actionOnFailure; + this.__explicitlySet__.add("actionOnFailure"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("pauseDetails") + private PauseDetails pauseDetails; + + public Builder pauseDetails(PauseDetails pauseDetails) { + this.pauseDetails = pauseDetails; + this.__explicitlySet__.add("pauseDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("notificationPreferences") + private TaskNotificationPreferences notificationPreferences; + + public Builder notificationPreferences( + TaskNotificationPreferences notificationPreferences) { + this.notificationPreferences = notificationPreferences; + this.__explicitlySet__.add("notificationPreferences"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ComponentProperties build() { + ComponentProperties model = + new ComponentProperties( + this.runOn, + this.condition, + this.actionOnFailure, + this.pauseDetails, + this.notificationPreferences); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ComponentProperties model) { + if (model.wasPropertyExplicitlySet("runOn")) { + this.runOn(model.getRunOn()); + } + if (model.wasPropertyExplicitlySet("condition")) { + this.condition(model.getCondition()); + } + if (model.wasPropertyExplicitlySet("actionOnFailure")) { + this.actionOnFailure(model.getActionOnFailure()); + } + if (model.wasPropertyExplicitlySet("pauseDetails")) { + this.pauseDetails(model.getPauseDetails()); + } + if (model.wasPropertyExplicitlySet("notificationPreferences")) { + this.notificationPreferences(model.getNotificationPreferences()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The runOn condition for the task/group/container. + * Build task execution conditions if applicable to product and product-specific components. + * This condition is relevant when handling product stack workflows. + * Example: target.product.name = Oracle WebLogic Server OR target.product.name = Oracle HTTP Server + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runOn") + private final String runOn; + + /** + * The runOn condition for the task/group/container. + * Build task execution conditions if applicable to product and product-specific components. + * This condition is relevant when handling product stack workflows. + * Example: target.product.name = Oracle WebLogic Server OR target.product.name = Oracle HTTP Server + * + * @return the value + **/ + public String getRunOn() { + return runOn; + } + + /** + * Build control flow conditions that determine the relevance of the task execution. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("condition") + private final String condition; + + /** + * Build control flow conditions that determine the relevance of the task execution. + * + * @return the value + **/ + public String getCondition() { + return condition; + } + + /** + * The action to be taken in case of a failure. + **/ + public enum ActionOnFailure { + Abort("ABORT"), + Continue("CONTINUE"), + Rollback("ROLLBACK"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ActionOnFailure.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActionOnFailure v : ActionOnFailure.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ActionOnFailure(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ActionOnFailure create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ActionOnFailure', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The action to be taken in case of a failure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionOnFailure") + private final ActionOnFailure actionOnFailure; + + /** + * The action to be taken in case of a failure. + * @return the value + **/ + public ActionOnFailure getActionOnFailure() { + return actionOnFailure; + } + + @com.fasterxml.jackson.annotation.JsonProperty("pauseDetails") + private final PauseDetails pauseDetails; + + public PauseDetails getPauseDetails() { + return pauseDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("notificationPreferences") + private final TaskNotificationPreferences notificationPreferences; + + public TaskNotificationPreferences getNotificationPreferences() { + return notificationPreferences; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ComponentProperties("); + sb.append("super=").append(super.toString()); + sb.append("runOn=").append(String.valueOf(this.runOn)); + sb.append(", condition=").append(String.valueOf(this.condition)); + sb.append(", actionOnFailure=").append(String.valueOf(this.actionOnFailure)); + sb.append(", pauseDetails=").append(String.valueOf(this.pauseDetails)); + sb.append(", notificationPreferences=") + .append(String.valueOf(this.notificationPreferences)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ComponentProperties)) { + return false; + } + + ComponentProperties other = (ComponentProperties) o; + return java.util.Objects.equals(this.runOn, other.runOn) + && java.util.Objects.equals(this.condition, other.condition) + && java.util.Objects.equals(this.actionOnFailure, other.actionOnFailure) + && java.util.Objects.equals(this.pauseDetails, other.pauseDetails) + && java.util.Objects.equals( + this.notificationPreferences, other.notificationPreferences) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.runOn == null ? 43 : this.runOn.hashCode()); + result = (result * PRIME) + (this.condition == null ? 43 : this.condition.hashCode()); + result = + (result * PRIME) + + (this.actionOnFailure == null ? 43 : this.actionOnFailure.hashCode()); + result = (result * PRIME) + (this.pauseDetails == null ? 43 : this.pauseDetails.hashCode()); + result = + (result * PRIME) + + (this.notificationPreferences == null + ? 43 + : this.notificationPreferences.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Condition.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Condition.java new file mode 100644 index 00000000000..9e1dbb44095 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Condition.java @@ -0,0 +1,231 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Rule condition + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Condition.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Condition extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"attrGroup", "attrKey", "attrValue"}) + public Condition(String attrGroup, String attrKey, String attrValue) { + super(); + this.attrGroup = attrGroup; + this.attrKey = attrKey; + this.attrValue = attrValue; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Attribute Group. Provide a Tag namespace if the rule is based on a tag. + * Provide resource type if the rule is based on a resource property. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attrGroup") + private String attrGroup; + + /** + * Attribute Group. Provide a Tag namespace if the rule is based on a tag. + * Provide resource type if the rule is based on a resource property. + * + * @param attrGroup the value to set + * @return this builder + **/ + public Builder attrGroup(String attrGroup) { + this.attrGroup = attrGroup; + this.__explicitlySet__.add("attrGroup"); + return this; + } + /** + * Attribute Key.Provide Tag key if the rule is based on a tag. + * Provide resource property name if the rule is based on a resource property. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attrKey") + private String attrKey; + + /** + * Attribute Key.Provide Tag key if the rule is based on a tag. + * Provide resource property name if the rule is based on a resource property. + * + * @param attrKey the value to set + * @return this builder + **/ + public Builder attrKey(String attrKey) { + this.attrKey = attrKey; + this.__explicitlySet__.add("attrKey"); + return this; + } + /** + * Attribute Value.Provide Tag value if the rule is based on a tag. + * Provide resource property value if the rule is based on a resource property. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attrValue") + private String attrValue; + + /** + * Attribute Value.Provide Tag value if the rule is based on a tag. + * Provide resource property value if the rule is based on a resource property. + * + * @param attrValue the value to set + * @return this builder + **/ + public Builder attrValue(String attrValue) { + this.attrValue = attrValue; + this.__explicitlySet__.add("attrValue"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Condition build() { + Condition model = new Condition(this.attrGroup, this.attrKey, this.attrValue); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Condition model) { + if (model.wasPropertyExplicitlySet("attrGroup")) { + this.attrGroup(model.getAttrGroup()); + } + if (model.wasPropertyExplicitlySet("attrKey")) { + this.attrKey(model.getAttrKey()); + } + if (model.wasPropertyExplicitlySet("attrValue")) { + this.attrValue(model.getAttrValue()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Attribute Group. Provide a Tag namespace if the rule is based on a tag. + * Provide resource type if the rule is based on a resource property. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attrGroup") + private final String attrGroup; + + /** + * Attribute Group. Provide a Tag namespace if the rule is based on a tag. + * Provide resource type if the rule is based on a resource property. + * + * @return the value + **/ + public String getAttrGroup() { + return attrGroup; + } + + /** + * Attribute Key.Provide Tag key if the rule is based on a tag. + * Provide resource property name if the rule is based on a resource property. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attrKey") + private final String attrKey; + + /** + * Attribute Key.Provide Tag key if the rule is based on a tag. + * Provide resource property name if the rule is based on a resource property. + * + * @return the value + **/ + public String getAttrKey() { + return attrKey; + } + + /** + * Attribute Value.Provide Tag value if the rule is based on a tag. + * Provide resource property value if the rule is based on a resource property. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attrValue") + private final String attrValue; + + /** + * Attribute Value.Provide Tag value if the rule is based on a tag. + * Provide resource property value if the rule is based on a resource property. + * + * @return the value + **/ + public String getAttrValue() { + return attrValue; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Condition("); + sb.append("super=").append(super.toString()); + sb.append("attrGroup=").append(String.valueOf(this.attrGroup)); + sb.append(", attrKey=").append(String.valueOf(this.attrKey)); + sb.append(", attrValue=").append(String.valueOf(this.attrValue)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Condition)) { + return false; + } + + Condition other = (Condition) o; + return java.util.Objects.equals(this.attrGroup, other.attrGroup) + && java.util.Objects.equals(this.attrKey, other.attrKey) + && java.util.Objects.equals(this.attrValue, other.attrValue) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.attrGroup == null ? 43 : this.attrGroup.hashCode()); + result = (result * PRIME) + (this.attrKey == null ? 43 : this.attrKey.hashCode()); + result = (result * PRIME) + (this.attrValue == null ? 43 : this.attrValue.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ConfigAssociationDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ConfigAssociationDetails.java new file mode 100644 index 00000000000..5eca76e1ac7 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ConfigAssociationDetails.java @@ -0,0 +1,190 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Associated Configuration details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ConfigAssociationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ConfigAssociationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"id", "displayName"}) + public ConfigAssociationDetails(String id, String displayName) { + super(); + this.id = id; + this.displayName = displayName; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ConfigAssociationDetails build() { + ConfigAssociationDetails model = + new ConfigAssociationDetails(this.id, this.displayName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ConfigAssociationDetails model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ConfigAssociationDetails("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfigAssociationDetails)) { + return false; + } + + ConfigAssociationDetails other = (ConfigAssociationDetails) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ConfigCategoryDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ConfigCategoryDetails.java new file mode 100644 index 00000000000..0838d3e0f0e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ConfigCategoryDetails.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Config Category Details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "configCategory", + defaultImpl = ConfigCategoryDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ProductStackConfigCategoryDetails.class, + name = "PRODUCT_STACK" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = EnvironmentConfigCategoryDetails.class, + name = "ENVIRONMENT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CredentialConfigCategoryDetails.class, + name = "CREDENTIAL" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PatchTypeConfigCategoryDetails.class, + name = "PATCH_TYPE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ProductConfigCategoryDetails.class, + name = "PRODUCT" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ConfigCategoryDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected ConfigCategoryDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ConfigCategoryDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfigCategoryDetails)) { + return false; + } + + ConfigCategoryDetails other = (ConfigCategoryDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Category of configuration + **/ + public enum ConfigCategory { + Product("PRODUCT"), + ProductStack("PRODUCT_STACK"), + Environment("ENVIRONMENT"), + PatchType("PATCH_TYPE"), + Credential("CREDENTIAL"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ConfigCategory.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ConfigCategory v : ConfigCategory.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ConfigCategory(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ConfigCategory create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ConfigCategory', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ConfirmTargetsDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ConfirmTargetsDetails.java new file mode 100644 index 00000000000..4482d286fcb --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ConfirmTargetsDetails.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details of the targets to be confirmed for Fleet Application Management. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ConfirmTargetsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ConfirmTargetsDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"targets"}) + public ConfirmTargetsDetails(java.util.List targets) { + super(); + this.targets = targets; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The targets to confirm. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targets") + private java.util.List targets; + + /** + * The targets to confirm. + * @param targets the value to set + * @return this builder + **/ + public Builder targets(java.util.List targets) { + this.targets = targets; + this.__explicitlySet__.add("targets"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ConfirmTargetsDetails build() { + ConfirmTargetsDetails model = new ConfirmTargetsDetails(this.targets); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ConfirmTargetsDetails model) { + if (model.wasPropertyExplicitlySet("targets")) { + this.targets(model.getTargets()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The targets to confirm. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targets") + private final java.util.List targets; + + /** + * The targets to confirm. + * @return the value + **/ + public java.util.List getTargets() { + return targets; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ConfirmTargetsDetails("); + sb.append("super=").append(super.toString()); + sb.append("targets=").append(String.valueOf(this.targets)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfirmTargetsDetails)) { + return false; + } + + ConfirmTargetsDetails other = (ConfirmTargetsDetails) o; + return java.util.Objects.equals(this.targets, other.targets) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.targets == null ? 43 : this.targets.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ContentDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ContentDetails.java new file mode 100644 index 00000000000..b946118f584 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ContentDetails.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Content Source details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "sourceType", + defaultImpl = ContentDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ObjectStorageBucketContentDetails.class, + name = "OBJECT_STORAGE_BUCKET" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ContentDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected ContentDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ContentDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ContentDetails)) { + return false; + } + + ContentDetails other = (ContentDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Content Source type details. + * + **/ + public enum SourceType { + ObjectStorageBucket("OBJECT_STORAGE_BUCKET"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SourceType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SourceType v : SourceType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + SourceType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SourceType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'SourceType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateCompliancePolicyRuleDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateCompliancePolicyRuleDetails.java new file mode 100644 index 00000000000..9188d141f0c --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateCompliancePolicyRuleDetails.java @@ -0,0 +1,524 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The data to create a CompliancePolicyRule. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateCompliancePolicyRuleDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateCompliancePolicyRuleDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "compliancePolicyId", + "productVersion", + "patchType", + "severity", + "patchSelection", + "gracePeriod", + "compartmentId", + "freeformTags", + "definedTags" + }) + public CreateCompliancePolicyRuleDetails( + String displayName, + String compliancePolicyId, + ProductVersionDetails productVersion, + java.util.List patchType, + java.util.List severity, + PatchSelectionDetails patchSelection, + String gracePeriod, + String compartmentId, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.compliancePolicyId = compliancePolicyId; + this.productVersion = productVersion; + this.patchType = patchType; + this.severity = severity; + this.patchSelection = patchSelection; + this.gracePeriod = gracePeriod; + this.compartmentId = compartmentId; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Unique OCID of the CompliancePolicy this CompliancePolicyRule belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compliancePolicyId") + private String compliancePolicyId; + + /** + * Unique OCID of the CompliancePolicy this CompliancePolicyRule belongs to. + * @param compliancePolicyId the value to set + * @return this builder + **/ + public Builder compliancePolicyId(String compliancePolicyId) { + this.compliancePolicyId = compliancePolicyId; + this.__explicitlySet__.add("compliancePolicyId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("productVersion") + private ProductVersionDetails productVersion; + + public Builder productVersion(ProductVersionDetails productVersion) { + this.productVersion = productVersion; + this.__explicitlySet__.add("productVersion"); + return this; + } + /** + * PlatformConfiguration OCID for the patch type to which this CompliancePolicyRule applies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchType") + private java.util.List patchType; + + /** + * PlatformConfiguration OCID for the patch type to which this CompliancePolicyRule applies. + * @param patchType the value to set + * @return this builder + **/ + public Builder patchType(java.util.List patchType) { + this.patchType = patchType; + this.__explicitlySet__.add("patchType"); + return this; + } + /** + * Severity to which this CompliancePolicyRule applies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private java.util.List severity; + + /** + * Severity to which this CompliancePolicyRule applies. + * @param severity the value to set + * @return this builder + **/ + public Builder severity(java.util.List severity) { + this.severity = severity; + this.__explicitlySet__.add("severity"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patchSelection") + private PatchSelectionDetails patchSelection; + + public Builder patchSelection(PatchSelectionDetails patchSelection) { + this.patchSelection = patchSelection; + this.__explicitlySet__.add("patchSelection"); + return this; + } + /** + * Grace period in days,weeks,months or years the exemption is applicable for the rule. + * This enables a grace period when Fleet Application Management doesn't report the product as noncompliant when patch is not applied. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gracePeriod") + private String gracePeriod; + + /** + * Grace period in days,weeks,months or years the exemption is applicable for the rule. + * This enables a grace period when Fleet Application Management doesn't report the product as noncompliant when patch is not applied. + * + * @param gracePeriod the value to set + * @return this builder + **/ + public Builder gracePeriod(String gracePeriod) { + this.gracePeriod = gracePeriod; + this.__explicitlySet__.add("gracePeriod"); + return this; + } + /** + * The OCID of the compartment the CompliancePolicyRule belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment the CompliancePolicyRule belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateCompliancePolicyRuleDetails build() { + CreateCompliancePolicyRuleDetails model = + new CreateCompliancePolicyRuleDetails( + this.displayName, + this.compliancePolicyId, + this.productVersion, + this.patchType, + this.severity, + this.patchSelection, + this.gracePeriod, + this.compartmentId, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateCompliancePolicyRuleDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compliancePolicyId")) { + this.compliancePolicyId(model.getCompliancePolicyId()); + } + if (model.wasPropertyExplicitlySet("productVersion")) { + this.productVersion(model.getProductVersion()); + } + if (model.wasPropertyExplicitlySet("patchType")) { + this.patchType(model.getPatchType()); + } + if (model.wasPropertyExplicitlySet("severity")) { + this.severity(model.getSeverity()); + } + if (model.wasPropertyExplicitlySet("patchSelection")) { + this.patchSelection(model.getPatchSelection()); + } + if (model.wasPropertyExplicitlySet("gracePeriod")) { + this.gracePeriod(model.getGracePeriod()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Unique OCID of the CompliancePolicy this CompliancePolicyRule belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compliancePolicyId") + private final String compliancePolicyId; + + /** + * Unique OCID of the CompliancePolicy this CompliancePolicyRule belongs to. + * @return the value + **/ + public String getCompliancePolicyId() { + return compliancePolicyId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("productVersion") + private final ProductVersionDetails productVersion; + + public ProductVersionDetails getProductVersion() { + return productVersion; + } + + /** + * PlatformConfiguration OCID for the patch type to which this CompliancePolicyRule applies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchType") + private final java.util.List patchType; + + /** + * PlatformConfiguration OCID for the patch type to which this CompliancePolicyRule applies. + * @return the value + **/ + public java.util.List getPatchType() { + return patchType; + } + + /** + * Severity to which this CompliancePolicyRule applies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private final java.util.List severity; + + /** + * Severity to which this CompliancePolicyRule applies. + * @return the value + **/ + public java.util.List getSeverity() { + return severity; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patchSelection") + private final PatchSelectionDetails patchSelection; + + public PatchSelectionDetails getPatchSelection() { + return patchSelection; + } + + /** + * Grace period in days,weeks,months or years the exemption is applicable for the rule. + * This enables a grace period when Fleet Application Management doesn't report the product as noncompliant when patch is not applied. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gracePeriod") + private final String gracePeriod; + + /** + * Grace period in days,weeks,months or years the exemption is applicable for the rule. + * This enables a grace period when Fleet Application Management doesn't report the product as noncompliant when patch is not applied. + * + * @return the value + **/ + public String getGracePeriod() { + return gracePeriod; + } + + /** + * The OCID of the compartment the CompliancePolicyRule belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment the CompliancePolicyRule belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateCompliancePolicyRuleDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", compliancePolicyId=").append(String.valueOf(this.compliancePolicyId)); + sb.append(", productVersion=").append(String.valueOf(this.productVersion)); + sb.append(", patchType=").append(String.valueOf(this.patchType)); + sb.append(", severity=").append(String.valueOf(this.severity)); + sb.append(", patchSelection=").append(String.valueOf(this.patchSelection)); + sb.append(", gracePeriod=").append(String.valueOf(this.gracePeriod)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateCompliancePolicyRuleDetails)) { + return false; + } + + CreateCompliancePolicyRuleDetails other = (CreateCompliancePolicyRuleDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.compliancePolicyId, other.compliancePolicyId) + && java.util.Objects.equals(this.productVersion, other.productVersion) + && java.util.Objects.equals(this.patchType, other.patchType) + && java.util.Objects.equals(this.severity, other.severity) + && java.util.Objects.equals(this.patchSelection, other.patchSelection) + && java.util.Objects.equals(this.gracePeriod, other.gracePeriod) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.compliancePolicyId == null + ? 43 + : this.compliancePolicyId.hashCode()); + result = + (result * PRIME) + + (this.productVersion == null ? 43 : this.productVersion.hashCode()); + result = (result * PRIME) + (this.patchType == null ? 43 : this.patchType.hashCode()); + result = (result * PRIME) + (this.severity == null ? 43 : this.severity.hashCode()); + result = + (result * PRIME) + + (this.patchSelection == null ? 43 : this.patchSelection.hashCode()); + result = (result * PRIME) + (this.gracePeriod == null ? 43 : this.gracePeriod.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateFleetCredentialDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateFleetCredentialDetails.java new file mode 100644 index 00000000000..3ecb1b89755 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateFleetCredentialDetails.java @@ -0,0 +1,279 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information about new FleetCredential. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateFleetCredentialDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateFleetCredentialDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "compartmentId", + "entitySpecifics", + "user", + "password" + }) + public CreateFleetCredentialDetails( + String displayName, + String compartmentId, + CredentialEntitySpecificDetails entitySpecifics, + CredentialDetails user, + CredentialDetails password) { + super(); + this.displayName = displayName; + this.compartmentId = compartmentId; + this.entitySpecifics = entitySpecifics; + this.user = user; + this.password = password; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("entitySpecifics") + private CredentialEntitySpecificDetails entitySpecifics; + + public Builder entitySpecifics(CredentialEntitySpecificDetails entitySpecifics) { + this.entitySpecifics = entitySpecifics; + this.__explicitlySet__.add("entitySpecifics"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("user") + private CredentialDetails user; + + public Builder user(CredentialDetails user) { + this.user = user; + this.__explicitlySet__.add("user"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("password") + private CredentialDetails password; + + public Builder password(CredentialDetails password) { + this.password = password; + this.__explicitlySet__.add("password"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateFleetCredentialDetails build() { + CreateFleetCredentialDetails model = + new CreateFleetCredentialDetails( + this.displayName, + this.compartmentId, + this.entitySpecifics, + this.user, + this.password); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateFleetCredentialDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("entitySpecifics")) { + this.entitySpecifics(model.getEntitySpecifics()); + } + if (model.wasPropertyExplicitlySet("user")) { + this.user(model.getUser()); + } + if (model.wasPropertyExplicitlySet("password")) { + this.password(model.getPassword()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("entitySpecifics") + private final CredentialEntitySpecificDetails entitySpecifics; + + public CredentialEntitySpecificDetails getEntitySpecifics() { + return entitySpecifics; + } + + @com.fasterxml.jackson.annotation.JsonProperty("user") + private final CredentialDetails user; + + public CredentialDetails getUser() { + return user; + } + + @com.fasterxml.jackson.annotation.JsonProperty("password") + private final CredentialDetails password; + + public CredentialDetails getPassword() { + return password; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateFleetCredentialDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", entitySpecifics=").append(String.valueOf(this.entitySpecifics)); + sb.append(", user=").append(String.valueOf(this.user)); + sb.append(", password=").append(String.valueOf(this.password)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateFleetCredentialDetails)) { + return false; + } + + CreateFleetCredentialDetails other = (CreateFleetCredentialDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.entitySpecifics, other.entitySpecifics) + && java.util.Objects.equals(this.user, other.user) + && java.util.Objects.equals(this.password, other.password) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.entitySpecifics == null ? 43 : this.entitySpecifics.hashCode()); + result = (result * PRIME) + (this.user == null ? 43 : this.user.hashCode()); + result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateFleetDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateFleetDetails.java new file mode 100644 index 00000000000..d86cfd57d27 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateFleetDetails.java @@ -0,0 +1,833 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information about new Fleet. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateFleetDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateFleetDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "compartmentId", + "fleetType", + "products", + "applicationType", + "environmentType", + "groupType", + "resourceSelectionType", + "ruleSelectionCriteria", + "notificationPreferences", + "resources", + "credentials", + "isTargetAutoConfirm", + "freeformTags", + "definedTags" + }) + public CreateFleetDetails( + String displayName, + String description, + String compartmentId, + Fleet.FleetType fleetType, + java.util.List products, + String applicationType, + String environmentType, + Fleet.GroupType groupType, + Fleet.ResourceSelectionType resourceSelectionType, + SelectionCriteria ruleSelectionCriteria, + NotificationPreferences notificationPreferences, + java.util.List resources, + java.util.List credentials, + Boolean isTargetAutoConfirm, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.compartmentId = compartmentId; + this.fleetType = fleetType; + this.products = products; + this.applicationType = applicationType; + this.environmentType = environmentType; + this.groupType = groupType; + this.resourceSelectionType = resourceSelectionType; + this.ruleSelectionCriteria = ruleSelectionCriteria; + this.notificationPreferences = notificationPreferences; + this.resources = resources; + this.credentials = credentials; + this.isTargetAutoConfirm = isTargetAutoConfirm; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Type of the Fleet. + * PRODUCT - A fleet of product-specific resources for a product type. + * ENVIRONMENT - A fleet of environment-specific resources for a product stack. + * GROUP - A fleet of a fleet of either environment or product fleets. + * GENERIC - A fleet of resources selected dynamically or manually for reporting purposes + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetType") + private Fleet.FleetType fleetType; + + /** + * Type of the Fleet. + * PRODUCT - A fleet of product-specific resources for a product type. + * ENVIRONMENT - A fleet of environment-specific resources for a product stack. + * GROUP - A fleet of a fleet of either environment or product fleets. + * GENERIC - A fleet of resources selected dynamically or manually for reporting purposes + * + * @param fleetType the value to set + * @return this builder + **/ + public Builder fleetType(Fleet.FleetType fleetType) { + this.fleetType = fleetType; + this.__explicitlySet__.add("fleetType"); + return this; + } + /** + * Products associated with the Fleet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("products") + private java.util.List products; + + /** + * Products associated with the Fleet. + * @param products the value to set + * @return this builder + **/ + public Builder products(java.util.List products) { + this.products = products; + this.__explicitlySet__.add("products"); + return this; + } + /** + * Product stack associated with the Fleet. + * Applicable for ENVIRONMENT fleet types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationType") + private String applicationType; + + /** + * Product stack associated with the Fleet. + * Applicable for ENVIRONMENT fleet types. + * + * @param applicationType the value to set + * @return this builder + **/ + public Builder applicationType(String applicationType) { + this.applicationType = applicationType; + this.__explicitlySet__.add("applicationType"); + return this; + } + /** + * Environment Type associated with the Fleet. + * Applicable for ENVIRONMENT fleet types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("environmentType") + private String environmentType; + + /** + * Environment Type associated with the Fleet. + * Applicable for ENVIRONMENT fleet types. + * + * @param environmentType the value to set + * @return this builder + **/ + public Builder environmentType(String environmentType) { + this.environmentType = environmentType; + this.__explicitlySet__.add("environmentType"); + return this; + } + /** + * Group Type associated with Group Fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupType") + private Fleet.GroupType groupType; + + /** + * Group Type associated with Group Fleet. + * + * @param groupType the value to set + * @return this builder + **/ + public Builder groupType(Fleet.GroupType groupType) { + this.groupType = groupType; + this.__explicitlySet__.add("groupType"); + return this; + } + /** + * Type of resource selection in a Fleet. + * Select resources manually or select resources based on rules. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceSelectionType") + private Fleet.ResourceSelectionType resourceSelectionType; + + /** + * Type of resource selection in a Fleet. + * Select resources manually or select resources based on rules. + * + * @param resourceSelectionType the value to set + * @return this builder + **/ + public Builder resourceSelectionType(Fleet.ResourceSelectionType resourceSelectionType) { + this.resourceSelectionType = resourceSelectionType; + this.__explicitlySet__.add("resourceSelectionType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("ruleSelectionCriteria") + private SelectionCriteria ruleSelectionCriteria; + + public Builder ruleSelectionCriteria(SelectionCriteria ruleSelectionCriteria) { + this.ruleSelectionCriteria = ruleSelectionCriteria; + this.__explicitlySet__.add("ruleSelectionCriteria"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("notificationPreferences") + private NotificationPreferences notificationPreferences; + + public Builder notificationPreferences(NotificationPreferences notificationPreferences) { + this.notificationPreferences = notificationPreferences; + this.__explicitlySet__.add("notificationPreferences"); + return this; + } + /** + * Resources associated with the Fleet if resourceSelectionType is MANUAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * Resources associated with the Fleet if resourceSelectionType is MANUAL. + * @param resources the value to set + * @return this builder + **/ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** + * Credentials associated with the Fleet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("credentials") + private java.util.List credentials; + + /** + * Credentials associated with the Fleet. + * @param credentials the value to set + * @return this builder + **/ + public Builder credentials(java.util.List credentials) { + this.credentials = credentials; + this.__explicitlySet__.add("credentials"); + return this; + } + /** + * A value that represents if auto-confirming of the targets can be enabled. + * This will allow targets to be auto-confirmed in the fleet without manual intervention. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isTargetAutoConfirm") + private Boolean isTargetAutoConfirm; + + /** + * A value that represents if auto-confirming of the targets can be enabled. + * This will allow targets to be auto-confirmed in the fleet without manual intervention. + * + * @param isTargetAutoConfirm the value to set + * @return this builder + **/ + public Builder isTargetAutoConfirm(Boolean isTargetAutoConfirm) { + this.isTargetAutoConfirm = isTargetAutoConfirm; + this.__explicitlySet__.add("isTargetAutoConfirm"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateFleetDetails build() { + CreateFleetDetails model = + new CreateFleetDetails( + this.displayName, + this.description, + this.compartmentId, + this.fleetType, + this.products, + this.applicationType, + this.environmentType, + this.groupType, + this.resourceSelectionType, + this.ruleSelectionCriteria, + this.notificationPreferences, + this.resources, + this.credentials, + this.isTargetAutoConfirm, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateFleetDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("fleetType")) { + this.fleetType(model.getFleetType()); + } + if (model.wasPropertyExplicitlySet("products")) { + this.products(model.getProducts()); + } + if (model.wasPropertyExplicitlySet("applicationType")) { + this.applicationType(model.getApplicationType()); + } + if (model.wasPropertyExplicitlySet("environmentType")) { + this.environmentType(model.getEnvironmentType()); + } + if (model.wasPropertyExplicitlySet("groupType")) { + this.groupType(model.getGroupType()); + } + if (model.wasPropertyExplicitlySet("resourceSelectionType")) { + this.resourceSelectionType(model.getResourceSelectionType()); + } + if (model.wasPropertyExplicitlySet("ruleSelectionCriteria")) { + this.ruleSelectionCriteria(model.getRuleSelectionCriteria()); + } + if (model.wasPropertyExplicitlySet("notificationPreferences")) { + this.notificationPreferences(model.getNotificationPreferences()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("credentials")) { + this.credentials(model.getCredentials()); + } + if (model.wasPropertyExplicitlySet("isTargetAutoConfirm")) { + this.isTargetAutoConfirm(model.getIsTargetAutoConfirm()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Type of the Fleet. + * PRODUCT - A fleet of product-specific resources for a product type. + * ENVIRONMENT - A fleet of environment-specific resources for a product stack. + * GROUP - A fleet of a fleet of either environment or product fleets. + * GENERIC - A fleet of resources selected dynamically or manually for reporting purposes + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetType") + private final Fleet.FleetType fleetType; + + /** + * Type of the Fleet. + * PRODUCT - A fleet of product-specific resources for a product type. + * ENVIRONMENT - A fleet of environment-specific resources for a product stack. + * GROUP - A fleet of a fleet of either environment or product fleets. + * GENERIC - A fleet of resources selected dynamically or manually for reporting purposes + * + * @return the value + **/ + public Fleet.FleetType getFleetType() { + return fleetType; + } + + /** + * Products associated with the Fleet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("products") + private final java.util.List products; + + /** + * Products associated with the Fleet. + * @return the value + **/ + public java.util.List getProducts() { + return products; + } + + /** + * Product stack associated with the Fleet. + * Applicable for ENVIRONMENT fleet types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationType") + private final String applicationType; + + /** + * Product stack associated with the Fleet. + * Applicable for ENVIRONMENT fleet types. + * + * @return the value + **/ + public String getApplicationType() { + return applicationType; + } + + /** + * Environment Type associated with the Fleet. + * Applicable for ENVIRONMENT fleet types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("environmentType") + private final String environmentType; + + /** + * Environment Type associated with the Fleet. + * Applicable for ENVIRONMENT fleet types. + * + * @return the value + **/ + public String getEnvironmentType() { + return environmentType; + } + + /** + * Group Type associated with Group Fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupType") + private final Fleet.GroupType groupType; + + /** + * Group Type associated with Group Fleet. + * + * @return the value + **/ + public Fleet.GroupType getGroupType() { + return groupType; + } + + /** + * Type of resource selection in a Fleet. + * Select resources manually or select resources based on rules. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceSelectionType") + private final Fleet.ResourceSelectionType resourceSelectionType; + + /** + * Type of resource selection in a Fleet. + * Select resources manually or select resources based on rules. + * + * @return the value + **/ + public Fleet.ResourceSelectionType getResourceSelectionType() { + return resourceSelectionType; + } + + @com.fasterxml.jackson.annotation.JsonProperty("ruleSelectionCriteria") + private final SelectionCriteria ruleSelectionCriteria; + + public SelectionCriteria getRuleSelectionCriteria() { + return ruleSelectionCriteria; + } + + @com.fasterxml.jackson.annotation.JsonProperty("notificationPreferences") + private final NotificationPreferences notificationPreferences; + + public NotificationPreferences getNotificationPreferences() { + return notificationPreferences; + } + + /** + * Resources associated with the Fleet if resourceSelectionType is MANUAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * Resources associated with the Fleet if resourceSelectionType is MANUAL. + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + /** + * Credentials associated with the Fleet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("credentials") + private final java.util.List credentials; + + /** + * Credentials associated with the Fleet. + * @return the value + **/ + public java.util.List getCredentials() { + return credentials; + } + + /** + * A value that represents if auto-confirming of the targets can be enabled. + * This will allow targets to be auto-confirmed in the fleet without manual intervention. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isTargetAutoConfirm") + private final Boolean isTargetAutoConfirm; + + /** + * A value that represents if auto-confirming of the targets can be enabled. + * This will allow targets to be auto-confirmed in the fleet without manual intervention. + * + * @return the value + **/ + public Boolean getIsTargetAutoConfirm() { + return isTargetAutoConfirm; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateFleetDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", fleetType=").append(String.valueOf(this.fleetType)); + sb.append(", products=").append(String.valueOf(this.products)); + sb.append(", applicationType=").append(String.valueOf(this.applicationType)); + sb.append(", environmentType=").append(String.valueOf(this.environmentType)); + sb.append(", groupType=").append(String.valueOf(this.groupType)); + sb.append(", resourceSelectionType=").append(String.valueOf(this.resourceSelectionType)); + sb.append(", ruleSelectionCriteria=").append(String.valueOf(this.ruleSelectionCriteria)); + sb.append(", notificationPreferences=") + .append(String.valueOf(this.notificationPreferences)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", credentials=").append(String.valueOf(this.credentials)); + sb.append(", isTargetAutoConfirm=").append(String.valueOf(this.isTargetAutoConfirm)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateFleetDetails)) { + return false; + } + + CreateFleetDetails other = (CreateFleetDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.fleetType, other.fleetType) + && java.util.Objects.equals(this.products, other.products) + && java.util.Objects.equals(this.applicationType, other.applicationType) + && java.util.Objects.equals(this.environmentType, other.environmentType) + && java.util.Objects.equals(this.groupType, other.groupType) + && java.util.Objects.equals(this.resourceSelectionType, other.resourceSelectionType) + && java.util.Objects.equals(this.ruleSelectionCriteria, other.ruleSelectionCriteria) + && java.util.Objects.equals( + this.notificationPreferences, other.notificationPreferences) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.credentials, other.credentials) + && java.util.Objects.equals(this.isTargetAutoConfirm, other.isTargetAutoConfirm) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.fleetType == null ? 43 : this.fleetType.hashCode()); + result = (result * PRIME) + (this.products == null ? 43 : this.products.hashCode()); + result = + (result * PRIME) + + (this.applicationType == null ? 43 : this.applicationType.hashCode()); + result = + (result * PRIME) + + (this.environmentType == null ? 43 : this.environmentType.hashCode()); + result = (result * PRIME) + (this.groupType == null ? 43 : this.groupType.hashCode()); + result = + (result * PRIME) + + (this.resourceSelectionType == null + ? 43 + : this.resourceSelectionType.hashCode()); + result = + (result * PRIME) + + (this.ruleSelectionCriteria == null + ? 43 + : this.ruleSelectionCriteria.hashCode()); + result = + (result * PRIME) + + (this.notificationPreferences == null + ? 43 + : this.notificationPreferences.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = (result * PRIME) + (this.credentials == null ? 43 : this.credentials.hashCode()); + result = + (result * PRIME) + + (this.isTargetAutoConfirm == null + ? 43 + : this.isTargetAutoConfirm.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateFleetPropertyDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateFleetPropertyDetails.java new file mode 100644 index 00000000000..7b9dd248d31 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateFleetPropertyDetails.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information about new Property to manage fleet metadata details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateFleetPropertyDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateFleetPropertyDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId", "value", "propertyId"}) + public CreateFleetPropertyDetails(String compartmentId, String value, String propertyId) { + super(); + this.compartmentId = compartmentId; + this.value = value; + this.propertyId = propertyId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Value of the Property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + /** + * Value of the Property. + * @param value the value to set + * @return this builder + **/ + public Builder value(String value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + /** + * OCID referring to global level metadata property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("propertyId") + private String propertyId; + + /** + * OCID referring to global level metadata property. + * @param propertyId the value to set + * @return this builder + **/ + public Builder propertyId(String propertyId) { + this.propertyId = propertyId; + this.__explicitlySet__.add("propertyId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateFleetPropertyDetails build() { + CreateFleetPropertyDetails model = + new CreateFleetPropertyDetails(this.compartmentId, this.value, this.propertyId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateFleetPropertyDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + if (model.wasPropertyExplicitlySet("propertyId")) { + this.propertyId(model.getPropertyId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Value of the Property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final String value; + + /** + * Value of the Property. + * @return the value + **/ + public String getValue() { + return value; + } + + /** + * OCID referring to global level metadata property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("propertyId") + private final String propertyId; + + /** + * OCID referring to global level metadata property. + * @return the value + **/ + public String getPropertyId() { + return propertyId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateFleetPropertyDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", value=").append(String.valueOf(this.value)); + sb.append(", propertyId=").append(String.valueOf(this.propertyId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateFleetPropertyDetails)) { + return false; + } + + CreateFleetPropertyDetails other = (CreateFleetPropertyDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.value, other.value) + && java.util.Objects.equals(this.propertyId, other.propertyId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + result = (result * PRIME) + (this.propertyId == null ? 43 : this.propertyId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateFleetResourceDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateFleetResourceDetails.java new file mode 100644 index 00000000000..1d70ceda81f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateFleetResourceDetails.java @@ -0,0 +1,305 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information about the resource to be added to the fleet. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateFleetResourceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateFleetResourceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "resourceId", + "tenancyId", + "compartmentId", + "resourceRegion", + "resourceType" + }) + public CreateFleetResourceDetails( + String resourceId, + String tenancyId, + String compartmentId, + String resourceRegion, + String resourceType) { + super(); + this.resourceId = resourceId; + this.tenancyId = tenancyId; + this.compartmentId = compartmentId; + this.resourceRegion = resourceRegion; + this.resourceType = resourceType; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * The OCID of the resource. + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * OCID of the tenancy to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private String tenancyId; + + /** + * OCID of the tenancy to which the resource belongs to. + * @param tenancyId the value to set + * @return this builder + **/ + public Builder tenancyId(String tenancyId) { + this.tenancyId = tenancyId; + this.__explicitlySet__.add("tenancyId"); + return this; + } + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * Type of the Resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private String resourceType; + + /** + * Type of the Resource. + * @param resourceType the value to set + * @return this builder + **/ + public Builder resourceType(String resourceType) { + this.resourceType = resourceType; + this.__explicitlySet__.add("resourceType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateFleetResourceDetails build() { + CreateFleetResourceDetails model = + new CreateFleetResourceDetails( + this.resourceId, + this.tenancyId, + this.compartmentId, + this.resourceRegion, + this.resourceType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateFleetResourceDetails model) { + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("tenancyId")) { + this.tenancyId(model.getTenancyId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("resourceType")) { + this.resourceType(model.getResourceType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * OCID of the tenancy to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private final String tenancyId; + + /** + * OCID of the tenancy to which the resource belongs to. + * @return the value + **/ + public String getTenancyId() { + return tenancyId; + } + + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * Type of the Resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private final String resourceType; + + /** + * Type of the Resource. + * @return the value + **/ + public String getResourceType() { + return resourceType; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateFleetResourceDetails("); + sb.append("super=").append(super.toString()); + sb.append("resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", tenancyId=").append(String.valueOf(this.tenancyId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", resourceType=").append(String.valueOf(this.resourceType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateFleetResourceDetails)) { + return false; + } + + CreateFleetResourceDetails other = (CreateFleetResourceDetails) o; + return java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.tenancyId, other.tenancyId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.resourceType, other.resourceType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.tenancyId == null ? 43 : this.tenancyId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateMaintenanceWindowDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateMaintenanceWindowDetails.java new file mode 100644 index 00000000000..bfa3f90b2af --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateMaintenanceWindowDetails.java @@ -0,0 +1,662 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information about the new MaintenanceWindow. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateMaintenanceWindowDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateMaintenanceWindowDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "displayName", + "description", + "isOutage", + "maintenanceWindowType", + "timeScheduleStart", + "duration", + "isRecurring", + "recurrences", + "taskInitiationCutoff", + "freeformTags", + "definedTags" + }) + public CreateMaintenanceWindowDetails( + String compartmentId, + String displayName, + String description, + Boolean isOutage, + MaintenanceWindowType maintenanceWindowType, + java.util.Date timeScheduleStart, + String duration, + Boolean isRecurring, + String recurrences, + Integer taskInitiationCutoff, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.compartmentId = compartmentId; + this.displayName = displayName; + this.description = description; + this.isOutage = isOutage; + this.maintenanceWindowType = maintenanceWindowType; + this.timeScheduleStart = timeScheduleStart; + this.duration = duration; + this.isRecurring = isRecurring; + this.recurrences = recurrences; + this.taskInitiationCutoff = taskInitiationCutoff; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Does the maintenenace window cause outage? + * An outage indicates whether a maintenance window can consider operations that require downtime. + * It means a period when the application is not accessible. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isOutage") + private Boolean isOutage; + + /** + * Does the maintenenace window cause outage? + * An outage indicates whether a maintenance window can consider operations that require downtime. + * It means a period when the application is not accessible. + * + * @param isOutage the value to set + * @return this builder + **/ + public Builder isOutage(Boolean isOutage) { + this.isOutage = isOutage; + this.__explicitlySet__.add("isOutage"); + return this; + } + /** + * Type of maintenenace window + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceWindowType") + private MaintenanceWindowType maintenanceWindowType; + + /** + * Type of maintenenace window + * @param maintenanceWindowType the value to set + * @return this builder + **/ + public Builder maintenanceWindowType(MaintenanceWindowType maintenanceWindowType) { + this.maintenanceWindowType = maintenanceWindowType; + this.__explicitlySet__.add("maintenanceWindowType"); + return this; + } + /** + * Specify the date and time of the day that the maintenance window starts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduleStart") + private java.util.Date timeScheduleStart; + + /** + * Specify the date and time of the day that the maintenance window starts. + * @param timeScheduleStart the value to set + * @return this builder + **/ + public Builder timeScheduleStart(java.util.Date timeScheduleStart) { + this.timeScheduleStart = timeScheduleStart; + this.__explicitlySet__.add("timeScheduleStart"); + return this; + } + /** + * Duration of the maintenance window. + * Specify how long the maintenance window remains open. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("duration") + private String duration; + + /** + * Duration of the maintenance window. + * Specify how long the maintenance window remains open. + * + * @param duration the value to set + * @return this builder + **/ + public Builder duration(String duration) { + this.duration = duration; + this.__explicitlySet__.add("duration"); + return this; + } + /** + * Is this a recurring maintenance window? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRecurring") + private Boolean isRecurring; + + /** + * Is this a recurring maintenance window? + * @param isRecurring the value to set + * @return this builder + **/ + public Builder isRecurring(Boolean isRecurring) { + this.isRecurring = isRecurring; + this.__explicitlySet__.add("isRecurring"); + return this; + } + /** + * Recurrence rule specification if maintenance window recurring. + * Specify the frequency of running the maintenance window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recurrences") + private String recurrences; + + /** + * Recurrence rule specification if maintenance window recurring. + * Specify the frequency of running the maintenance window. + * + * @param recurrences the value to set + * @return this builder + **/ + public Builder recurrences(String recurrences) { + this.recurrences = recurrences; + this.__explicitlySet__.add("recurrences"); + return this; + } + /** + * Task initiation cutoff time for the maintenance window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("taskInitiationCutoff") + private Integer taskInitiationCutoff; + + /** + * Task initiation cutoff time for the maintenance window. + * @param taskInitiationCutoff the value to set + * @return this builder + **/ + public Builder taskInitiationCutoff(Integer taskInitiationCutoff) { + this.taskInitiationCutoff = taskInitiationCutoff; + this.__explicitlySet__.add("taskInitiationCutoff"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateMaintenanceWindowDetails build() { + CreateMaintenanceWindowDetails model = + new CreateMaintenanceWindowDetails( + this.compartmentId, + this.displayName, + this.description, + this.isOutage, + this.maintenanceWindowType, + this.timeScheduleStart, + this.duration, + this.isRecurring, + this.recurrences, + this.taskInitiationCutoff, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateMaintenanceWindowDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("isOutage")) { + this.isOutage(model.getIsOutage()); + } + if (model.wasPropertyExplicitlySet("maintenanceWindowType")) { + this.maintenanceWindowType(model.getMaintenanceWindowType()); + } + if (model.wasPropertyExplicitlySet("timeScheduleStart")) { + this.timeScheduleStart(model.getTimeScheduleStart()); + } + if (model.wasPropertyExplicitlySet("duration")) { + this.duration(model.getDuration()); + } + if (model.wasPropertyExplicitlySet("isRecurring")) { + this.isRecurring(model.getIsRecurring()); + } + if (model.wasPropertyExplicitlySet("recurrences")) { + this.recurrences(model.getRecurrences()); + } + if (model.wasPropertyExplicitlySet("taskInitiationCutoff")) { + this.taskInitiationCutoff(model.getTaskInitiationCutoff()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Does the maintenenace window cause outage? + * An outage indicates whether a maintenance window can consider operations that require downtime. + * It means a period when the application is not accessible. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isOutage") + private final Boolean isOutage; + + /** + * Does the maintenenace window cause outage? + * An outage indicates whether a maintenance window can consider operations that require downtime. + * It means a period when the application is not accessible. + * + * @return the value + **/ + public Boolean getIsOutage() { + return isOutage; + } + + /** + * Type of maintenenace window + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceWindowType") + private final MaintenanceWindowType maintenanceWindowType; + + /** + * Type of maintenenace window + * @return the value + **/ + public MaintenanceWindowType getMaintenanceWindowType() { + return maintenanceWindowType; + } + + /** + * Specify the date and time of the day that the maintenance window starts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduleStart") + private final java.util.Date timeScheduleStart; + + /** + * Specify the date and time of the day that the maintenance window starts. + * @return the value + **/ + public java.util.Date getTimeScheduleStart() { + return timeScheduleStart; + } + + /** + * Duration of the maintenance window. + * Specify how long the maintenance window remains open. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("duration") + private final String duration; + + /** + * Duration of the maintenance window. + * Specify how long the maintenance window remains open. + * + * @return the value + **/ + public String getDuration() { + return duration; + } + + /** + * Is this a recurring maintenance window? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRecurring") + private final Boolean isRecurring; + + /** + * Is this a recurring maintenance window? + * @return the value + **/ + public Boolean getIsRecurring() { + return isRecurring; + } + + /** + * Recurrence rule specification if maintenance window recurring. + * Specify the frequency of running the maintenance window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recurrences") + private final String recurrences; + + /** + * Recurrence rule specification if maintenance window recurring. + * Specify the frequency of running the maintenance window. + * + * @return the value + **/ + public String getRecurrences() { + return recurrences; + } + + /** + * Task initiation cutoff time for the maintenance window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("taskInitiationCutoff") + private final Integer taskInitiationCutoff; + + /** + * Task initiation cutoff time for the maintenance window. + * @return the value + **/ + public Integer getTaskInitiationCutoff() { + return taskInitiationCutoff; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateMaintenanceWindowDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", isOutage=").append(String.valueOf(this.isOutage)); + sb.append(", maintenanceWindowType=").append(String.valueOf(this.maintenanceWindowType)); + sb.append(", timeScheduleStart=").append(String.valueOf(this.timeScheduleStart)); + sb.append(", duration=").append(String.valueOf(this.duration)); + sb.append(", isRecurring=").append(String.valueOf(this.isRecurring)); + sb.append(", recurrences=").append(String.valueOf(this.recurrences)); + sb.append(", taskInitiationCutoff=").append(String.valueOf(this.taskInitiationCutoff)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateMaintenanceWindowDetails)) { + return false; + } + + CreateMaintenanceWindowDetails other = (CreateMaintenanceWindowDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.isOutage, other.isOutage) + && java.util.Objects.equals(this.maintenanceWindowType, other.maintenanceWindowType) + && java.util.Objects.equals(this.timeScheduleStart, other.timeScheduleStart) + && java.util.Objects.equals(this.duration, other.duration) + && java.util.Objects.equals(this.isRecurring, other.isRecurring) + && java.util.Objects.equals(this.recurrences, other.recurrences) + && java.util.Objects.equals(this.taskInitiationCutoff, other.taskInitiationCutoff) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.isOutage == null ? 43 : this.isOutage.hashCode()); + result = + (result * PRIME) + + (this.maintenanceWindowType == null + ? 43 + : this.maintenanceWindowType.hashCode()); + result = + (result * PRIME) + + (this.timeScheduleStart == null ? 43 : this.timeScheduleStart.hashCode()); + result = (result * PRIME) + (this.duration == null ? 43 : this.duration.hashCode()); + result = (result * PRIME) + (this.isRecurring == null ? 43 : this.isRecurring.hashCode()); + result = (result * PRIME) + (this.recurrences == null ? 43 : this.recurrences.hashCode()); + result = + (result * PRIME) + + (this.taskInitiationCutoff == null + ? 43 + : this.taskInitiationCutoff.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateOnboardingDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateOnboardingDetails.java new file mode 100644 index 00000000000..eb92889a11e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateOnboardingDetails.java @@ -0,0 +1,245 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information about enabling onboarding. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateOnboardingDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateOnboardingDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "isFamsTagEnabled", + "isCostTrackingTagEnabled" + }) + public CreateOnboardingDetails( + String compartmentId, Boolean isFamsTagEnabled, Boolean isCostTrackingTagEnabled) { + super(); + this.compartmentId = compartmentId; + this.isFamsTagEnabled = isFamsTagEnabled; + this.isCostTrackingTagEnabled = isCostTrackingTagEnabled; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * A value determining if the Fleet Application Management tagging is enabled or not. + * Allow Fleet Application Management to tag resources with fleet name using "Oracle$FAMS-Tags.FleetName" tag. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFamsTagEnabled") + private Boolean isFamsTagEnabled; + + /** + * A value determining if the Fleet Application Management tagging is enabled or not. + * Allow Fleet Application Management to tag resources with fleet name using "Oracle$FAMS-Tags.FleetName" tag. + * + * @param isFamsTagEnabled the value to set + * @return this builder + **/ + public Builder isFamsTagEnabled(Boolean isFamsTagEnabled) { + this.isFamsTagEnabled = isFamsTagEnabled; + this.__explicitlySet__.add("isFamsTagEnabled"); + return this; + } + /** + * A value determining if the cost tracking tag is enabled or not. + * Allow Fleet Application Management to tag resources with cost tracking tag using "Oracle$FAMS-Tags.FAMSManaged" tag. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCostTrackingTagEnabled") + private Boolean isCostTrackingTagEnabled; + + /** + * A value determining if the cost tracking tag is enabled or not. + * Allow Fleet Application Management to tag resources with cost tracking tag using "Oracle$FAMS-Tags.FAMSManaged" tag. + * + * @param isCostTrackingTagEnabled the value to set + * @return this builder + **/ + public Builder isCostTrackingTagEnabled(Boolean isCostTrackingTagEnabled) { + this.isCostTrackingTagEnabled = isCostTrackingTagEnabled; + this.__explicitlySet__.add("isCostTrackingTagEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateOnboardingDetails build() { + CreateOnboardingDetails model = + new CreateOnboardingDetails( + this.compartmentId, + this.isFamsTagEnabled, + this.isCostTrackingTagEnabled); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateOnboardingDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("isFamsTagEnabled")) { + this.isFamsTagEnabled(model.getIsFamsTagEnabled()); + } + if (model.wasPropertyExplicitlySet("isCostTrackingTagEnabled")) { + this.isCostTrackingTagEnabled(model.getIsCostTrackingTagEnabled()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * A value determining if the Fleet Application Management tagging is enabled or not. + * Allow Fleet Application Management to tag resources with fleet name using "Oracle$FAMS-Tags.FleetName" tag. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFamsTagEnabled") + private final Boolean isFamsTagEnabled; + + /** + * A value determining if the Fleet Application Management tagging is enabled or not. + * Allow Fleet Application Management to tag resources with fleet name using "Oracle$FAMS-Tags.FleetName" tag. + * + * @return the value + **/ + public Boolean getIsFamsTagEnabled() { + return isFamsTagEnabled; + } + + /** + * A value determining if the cost tracking tag is enabled or not. + * Allow Fleet Application Management to tag resources with cost tracking tag using "Oracle$FAMS-Tags.FAMSManaged" tag. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCostTrackingTagEnabled") + private final Boolean isCostTrackingTagEnabled; + + /** + * A value determining if the cost tracking tag is enabled or not. + * Allow Fleet Application Management to tag resources with cost tracking tag using "Oracle$FAMS-Tags.FAMSManaged" tag. + * + * @return the value + **/ + public Boolean getIsCostTrackingTagEnabled() { + return isCostTrackingTagEnabled; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateOnboardingDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", isFamsTagEnabled=").append(String.valueOf(this.isFamsTagEnabled)); + sb.append(", isCostTrackingTagEnabled=") + .append(String.valueOf(this.isCostTrackingTagEnabled)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateOnboardingDetails)) { + return false; + } + + CreateOnboardingDetails other = (CreateOnboardingDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.isFamsTagEnabled, other.isFamsTagEnabled) + && java.util.Objects.equals( + this.isCostTrackingTagEnabled, other.isCostTrackingTagEnabled) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.isFamsTagEnabled == null ? 43 : this.isFamsTagEnabled.hashCode()); + result = + (result * PRIME) + + (this.isCostTrackingTagEnabled == null + ? 43 + : this.isCostTrackingTagEnabled.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreatePatchDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreatePatchDetails.java new file mode 100644 index 00000000000..a0c0fb37972 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreatePatchDetails.java @@ -0,0 +1,541 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information about new Patch. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreatePatchDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreatePatchDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "description", + "patchType", + "severity", + "timeReleased", + "artifactDetails", + "product", + "dependentPatches", + "compartmentId", + "freeformTags", + "definedTags" + }) + public CreatePatchDetails( + String name, + String description, + PatchType patchType, + PatchSeverity severity, + java.util.Date timeReleased, + ArtifactDetails artifactDetails, + PatchProduct product, + java.util.List dependentPatches, + String compartmentId, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.name = name; + this.description = description; + this.patchType = patchType; + this.severity = severity; + this.timeReleased = timeReleased; + this.artifactDetails = artifactDetails; + this.product = product; + this.dependentPatches = dependentPatches; + this.compartmentId = compartmentId; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Should be unique within the tenancy, and cannot be changed after creation. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * A user-friendly name. Should be unique within the tenancy, and cannot be changed after creation. + * Avoid entering confidential information. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patchType") + private PatchType patchType; + + public Builder patchType(PatchType patchType) { + this.patchType = patchType; + this.__explicitlySet__.add("patchType"); + return this; + } + /** + * Patch Severity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private PatchSeverity severity; + + /** + * Patch Severity. + * @param severity the value to set + * @return this builder + **/ + public Builder severity(PatchSeverity severity) { + this.severity = severity; + this.__explicitlySet__.add("severity"); + return this; + } + /** + * Date when the patch was released. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeReleased") + private java.util.Date timeReleased; + + /** + * Date when the patch was released. + * @param timeReleased the value to set + * @return this builder + **/ + public Builder timeReleased(java.util.Date timeReleased) { + this.timeReleased = timeReleased; + this.__explicitlySet__.add("timeReleased"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("artifactDetails") + private ArtifactDetails artifactDetails; + + public Builder artifactDetails(ArtifactDetails artifactDetails) { + this.artifactDetails = artifactDetails; + this.__explicitlySet__.add("artifactDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("product") + private PatchProduct product; + + public Builder product(PatchProduct product) { + this.product = product; + this.__explicitlySet__.add("product"); + return this; + } + /** + * Dependent Patches for this patch. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dependentPatches") + private java.util.List dependentPatches; + + /** + * Dependent Patches for this patch. + * + * @param dependentPatches the value to set + * @return this builder + **/ + public Builder dependentPatches(java.util.List dependentPatches) { + this.dependentPatches = dependentPatches; + this.__explicitlySet__.add("dependentPatches"); + return this; + } + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreatePatchDetails build() { + CreatePatchDetails model = + new CreatePatchDetails( + this.name, + this.description, + this.patchType, + this.severity, + this.timeReleased, + this.artifactDetails, + this.product, + this.dependentPatches, + this.compartmentId, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreatePatchDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("patchType")) { + this.patchType(model.getPatchType()); + } + if (model.wasPropertyExplicitlySet("severity")) { + this.severity(model.getSeverity()); + } + if (model.wasPropertyExplicitlySet("timeReleased")) { + this.timeReleased(model.getTimeReleased()); + } + if (model.wasPropertyExplicitlySet("artifactDetails")) { + this.artifactDetails(model.getArtifactDetails()); + } + if (model.wasPropertyExplicitlySet("product")) { + this.product(model.getProduct()); + } + if (model.wasPropertyExplicitlySet("dependentPatches")) { + this.dependentPatches(model.getDependentPatches()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Should be unique within the tenancy, and cannot be changed after creation. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * A user-friendly name. Should be unique within the tenancy, and cannot be changed after creation. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patchType") + private final PatchType patchType; + + public PatchType getPatchType() { + return patchType; + } + + /** + * Patch Severity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private final PatchSeverity severity; + + /** + * Patch Severity. + * @return the value + **/ + public PatchSeverity getSeverity() { + return severity; + } + + /** + * Date when the patch was released. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeReleased") + private final java.util.Date timeReleased; + + /** + * Date when the patch was released. + * @return the value + **/ + public java.util.Date getTimeReleased() { + return timeReleased; + } + + @com.fasterxml.jackson.annotation.JsonProperty("artifactDetails") + private final ArtifactDetails artifactDetails; + + public ArtifactDetails getArtifactDetails() { + return artifactDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("product") + private final PatchProduct product; + + public PatchProduct getProduct() { + return product; + } + + /** + * Dependent Patches for this patch. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dependentPatches") + private final java.util.List dependentPatches; + + /** + * Dependent Patches for this patch. + * + * @return the value + **/ + public java.util.List getDependentPatches() { + return dependentPatches; + } + + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreatePatchDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", patchType=").append(String.valueOf(this.patchType)); + sb.append(", severity=").append(String.valueOf(this.severity)); + sb.append(", timeReleased=").append(String.valueOf(this.timeReleased)); + sb.append(", artifactDetails=").append(String.valueOf(this.artifactDetails)); + sb.append(", product=").append(String.valueOf(this.product)); + sb.append(", dependentPatches=").append(String.valueOf(this.dependentPatches)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreatePatchDetails)) { + return false; + } + + CreatePatchDetails other = (CreatePatchDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.patchType, other.patchType) + && java.util.Objects.equals(this.severity, other.severity) + && java.util.Objects.equals(this.timeReleased, other.timeReleased) + && java.util.Objects.equals(this.artifactDetails, other.artifactDetails) + && java.util.Objects.equals(this.product, other.product) + && java.util.Objects.equals(this.dependentPatches, other.dependentPatches) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.patchType == null ? 43 : this.patchType.hashCode()); + result = (result * PRIME) + (this.severity == null ? 43 : this.severity.hashCode()); + result = (result * PRIME) + (this.timeReleased == null ? 43 : this.timeReleased.hashCode()); + result = + (result * PRIME) + + (this.artifactDetails == null ? 43 : this.artifactDetails.hashCode()); + result = (result * PRIME) + (this.product == null ? 43 : this.product.hashCode()); + result = + (result * PRIME) + + (this.dependentPatches == null ? 43 : this.dependentPatches.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreatePlatformConfigurationDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreatePlatformConfigurationDetails.java new file mode 100644 index 00000000000..e50be1cdfbd --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreatePlatformConfigurationDetails.java @@ -0,0 +1,277 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information about new PlatformConfiguration. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreatePlatformConfigurationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreatePlatformConfigurationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "displayName", + "description", + "configCategoryDetails" + }) + public CreatePlatformConfigurationDetails( + String compartmentId, + String displayName, + String description, + ConfigCategoryDetails configCategoryDetails) { + super(); + this.compartmentId = compartmentId; + this.displayName = displayName; + this.description = description; + this.configCategoryDetails = configCategoryDetails; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("configCategoryDetails") + private ConfigCategoryDetails configCategoryDetails; + + public Builder configCategoryDetails(ConfigCategoryDetails configCategoryDetails) { + this.configCategoryDetails = configCategoryDetails; + this.__explicitlySet__.add("configCategoryDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreatePlatformConfigurationDetails build() { + CreatePlatformConfigurationDetails model = + new CreatePlatformConfigurationDetails( + this.compartmentId, + this.displayName, + this.description, + this.configCategoryDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreatePlatformConfigurationDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("configCategoryDetails")) { + this.configCategoryDetails(model.getConfigCategoryDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + @com.fasterxml.jackson.annotation.JsonProperty("configCategoryDetails") + private final ConfigCategoryDetails configCategoryDetails; + + public ConfigCategoryDetails getConfigCategoryDetails() { + return configCategoryDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreatePlatformConfigurationDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", configCategoryDetails=").append(String.valueOf(this.configCategoryDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreatePlatformConfigurationDetails)) { + return false; + } + + CreatePlatformConfigurationDetails other = (CreatePlatformConfigurationDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.configCategoryDetails, other.configCategoryDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.configCategoryDetails == null + ? 43 + : this.configCategoryDetails.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreatePropertyDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreatePropertyDetails.java new file mode 100644 index 00000000000..07289706e21 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreatePropertyDetails.java @@ -0,0 +1,319 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information about new Property. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreatePropertyDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreatePropertyDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "displayName", + "selection", + "valueType", + "values" + }) + public CreatePropertyDetails( + String compartmentId, + String displayName, + Selection selection, + ValueType valueType, + java.util.List values) { + super(); + this.compartmentId = compartmentId; + this.displayName = displayName; + this.selection = selection; + this.valueType = valueType; + this.values = values; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Text selection of the property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private Selection selection; + + /** + * Text selection of the property. + * @param selection the value to set + * @return this builder + **/ + public Builder selection(Selection selection) { + this.selection = selection; + this.__explicitlySet__.add("selection"); + return this; + } + /** + * Format of the value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("valueType") + private ValueType valueType; + + /** + * Format of the value. + * @param valueType the value to set + * @return this builder + **/ + public Builder valueType(ValueType valueType) { + this.valueType = valueType; + this.__explicitlySet__.add("valueType"); + return this; + } + /** + * Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("values") + private java.util.List values; + + /** + * Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). + * @param values the value to set + * @return this builder + **/ + public Builder values(java.util.List values) { + this.values = values; + this.__explicitlySet__.add("values"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreatePropertyDetails build() { + CreatePropertyDetails model = + new CreatePropertyDetails( + this.compartmentId, + this.displayName, + this.selection, + this.valueType, + this.values); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreatePropertyDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("selection")) { + this.selection(model.getSelection()); + } + if (model.wasPropertyExplicitlySet("valueType")) { + this.valueType(model.getValueType()); + } + if (model.wasPropertyExplicitlySet("values")) { + this.values(model.getValues()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Text selection of the property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private final Selection selection; + + /** + * Text selection of the property. + * @return the value + **/ + public Selection getSelection() { + return selection; + } + + /** + * Format of the value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("valueType") + private final ValueType valueType; + + /** + * Format of the value. + * @return the value + **/ + public ValueType getValueType() { + return valueType; + } + + /** + * Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("values") + private final java.util.List values; + + /** + * Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). + * @return the value + **/ + public java.util.List getValues() { + return values; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreatePropertyDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", selection=").append(String.valueOf(this.selection)); + sb.append(", valueType=").append(String.valueOf(this.valueType)); + sb.append(", values=").append(String.valueOf(this.values)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreatePropertyDetails)) { + return false; + } + + CreatePropertyDetails other = (CreatePropertyDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.selection, other.selection) + && java.util.Objects.equals(this.valueType, other.valueType) + && java.util.Objects.equals(this.values, other.values) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.selection == null ? 43 : this.selection.hashCode()); + result = (result * PRIME) + (this.valueType == null ? 43 : this.valueType.hashCode()); + result = (result * PRIME) + (this.values == null ? 43 : this.values.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateRunbookDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateRunbookDetails.java new file mode 100644 index 00000000000..b26b2ef608c --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateRunbookDetails.java @@ -0,0 +1,613 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information about new Runbook. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateRunbookDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateRunbookDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "runbookRelevance", + "operation", + "osType", + "platform", + "isDefault", + "estimatedTime", + "associations", + "compartmentId", + "freeformTags", + "definedTags" + }) + public CreateRunbookDetails( + String displayName, + String description, + Runbook.RunbookRelevance runbookRelevance, + String operation, + OsType osType, + String platform, + Boolean isDefault, + String estimatedTime, + Associations associations, + String compartmentId, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.runbookRelevance = runbookRelevance; + this.operation = operation; + this.osType = osType; + this.platform = platform; + this.isDefault = isDefault; + this.estimatedTime = estimatedTime; + this.associations = associations; + this.compartmentId = compartmentId; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Type of runbook structure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runbookRelevance") + private Runbook.RunbookRelevance runbookRelevance; + + /** + * Type of runbook structure. + * @param runbookRelevance the value to set + * @return this builder + **/ + public Builder runbookRelevance(Runbook.RunbookRelevance runbookRelevance) { + this.runbookRelevance = runbookRelevance; + this.__explicitlySet__.add("runbookRelevance"); + return this; + } + /** + * The lifecycle operation performed by the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operation") + private String operation; + + /** + * The lifecycle operation performed by the task. + * @param operation the value to set + * @return this builder + **/ + public Builder operation(String operation) { + this.operation = operation; + this.__explicitlySet__.add("operation"); + return this; + } + /** + * The OS type for the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osType") + private OsType osType; + + /** + * The OS type for the runbook. + * @param osType the value to set + * @return this builder + **/ + public Builder osType(OsType osType) { + this.osType = osType; + this.__explicitlySet__.add("osType"); + return this; + } + /** + * The platform of the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platform") + private String platform; + + /** + * The platform of the runbook. + * @param platform the value to set + * @return this builder + **/ + public Builder platform(String platform) { + this.platform = platform; + this.__explicitlySet__.add("platform"); + return this; + } + /** + * Is the runbook default? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private Boolean isDefault; + + /** + * Is the runbook default? + * @param isDefault the value to set + * @return this builder + **/ + public Builder isDefault(Boolean isDefault) { + this.isDefault = isDefault; + this.__explicitlySet__.add("isDefault"); + return this; + } + /** + * Estimated time to successfully complete the runbook execution + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTime") + private String estimatedTime; + + /** + * Estimated time to successfully complete the runbook execution + * @param estimatedTime the value to set + * @return this builder + **/ + public Builder estimatedTime(String estimatedTime) { + this.estimatedTime = estimatedTime; + this.__explicitlySet__.add("estimatedTime"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("associations") + private Associations associations; + + public Builder associations(Associations associations) { + this.associations = associations; + this.__explicitlySet__.add("associations"); + return this; + } + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateRunbookDetails build() { + CreateRunbookDetails model = + new CreateRunbookDetails( + this.displayName, + this.description, + this.runbookRelevance, + this.operation, + this.osType, + this.platform, + this.isDefault, + this.estimatedTime, + this.associations, + this.compartmentId, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateRunbookDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("runbookRelevance")) { + this.runbookRelevance(model.getRunbookRelevance()); + } + if (model.wasPropertyExplicitlySet("operation")) { + this.operation(model.getOperation()); + } + if (model.wasPropertyExplicitlySet("osType")) { + this.osType(model.getOsType()); + } + if (model.wasPropertyExplicitlySet("platform")) { + this.platform(model.getPlatform()); + } + if (model.wasPropertyExplicitlySet("isDefault")) { + this.isDefault(model.getIsDefault()); + } + if (model.wasPropertyExplicitlySet("estimatedTime")) { + this.estimatedTime(model.getEstimatedTime()); + } + if (model.wasPropertyExplicitlySet("associations")) { + this.associations(model.getAssociations()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Type of runbook structure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runbookRelevance") + private final Runbook.RunbookRelevance runbookRelevance; + + /** + * Type of runbook structure. + * @return the value + **/ + public Runbook.RunbookRelevance getRunbookRelevance() { + return runbookRelevance; + } + + /** + * The lifecycle operation performed by the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operation") + private final String operation; + + /** + * The lifecycle operation performed by the task. + * @return the value + **/ + public String getOperation() { + return operation; + } + + /** + * The OS type for the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osType") + private final OsType osType; + + /** + * The OS type for the runbook. + * @return the value + **/ + public OsType getOsType() { + return osType; + } + + /** + * The platform of the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platform") + private final String platform; + + /** + * The platform of the runbook. + * @return the value + **/ + public String getPlatform() { + return platform; + } + + /** + * Is the runbook default? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private final Boolean isDefault; + + /** + * Is the runbook default? + * @return the value + **/ + public Boolean getIsDefault() { + return isDefault; + } + + /** + * Estimated time to successfully complete the runbook execution + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTime") + private final String estimatedTime; + + /** + * Estimated time to successfully complete the runbook execution + * @return the value + **/ + public String getEstimatedTime() { + return estimatedTime; + } + + @com.fasterxml.jackson.annotation.JsonProperty("associations") + private final Associations associations; + + public Associations getAssociations() { + return associations; + } + + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateRunbookDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", runbookRelevance=").append(String.valueOf(this.runbookRelevance)); + sb.append(", operation=").append(String.valueOf(this.operation)); + sb.append(", osType=").append(String.valueOf(this.osType)); + sb.append(", platform=").append(String.valueOf(this.platform)); + sb.append(", isDefault=").append(String.valueOf(this.isDefault)); + sb.append(", estimatedTime=").append(String.valueOf(this.estimatedTime)); + sb.append(", associations=").append(String.valueOf(this.associations)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateRunbookDetails)) { + return false; + } + + CreateRunbookDetails other = (CreateRunbookDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.runbookRelevance, other.runbookRelevance) + && java.util.Objects.equals(this.operation, other.operation) + && java.util.Objects.equals(this.osType, other.osType) + && java.util.Objects.equals(this.platform, other.platform) + && java.util.Objects.equals(this.isDefault, other.isDefault) + && java.util.Objects.equals(this.estimatedTime, other.estimatedTime) + && java.util.Objects.equals(this.associations, other.associations) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.runbookRelevance == null ? 43 : this.runbookRelevance.hashCode()); + result = (result * PRIME) + (this.operation == null ? 43 : this.operation.hashCode()); + result = (result * PRIME) + (this.osType == null ? 43 : this.osType.hashCode()); + result = (result * PRIME) + (this.platform == null ? 43 : this.platform.hashCode()); + result = (result * PRIME) + (this.isDefault == null ? 43 : this.isDefault.hashCode()); + result = + (result * PRIME) + + (this.estimatedTime == null ? 43 : this.estimatedTime.hashCode()); + result = (result * PRIME) + (this.associations == null ? 43 : this.associations.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateSchedulerDefinitionDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateSchedulerDefinitionDetails.java new file mode 100644 index 00000000000..b211deb0845 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateSchedulerDefinitionDetails.java @@ -0,0 +1,496 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information about new SchedulerDefinition. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateSchedulerDefinitionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateSchedulerDefinitionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "compartmentId", + "activityInitiationCutOff", + "schedule", + "actionGroups", + "runBooks", + "freeformTags", + "definedTags" + }) + public CreateSchedulerDefinitionDetails( + String displayName, + String description, + String compartmentId, + Integer activityInitiationCutOff, + Schedule schedule, + java.util.List actionGroups, + java.util.List runBooks, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.compartmentId = compartmentId; + this.activityInitiationCutOff = activityInitiationCutOff; + this.schedule = schedule; + this.actionGroups = actionGroups; + this.runBooks = runBooks; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Activity Initiation Cut Off + **/ + @com.fasterxml.jackson.annotation.JsonProperty("activityInitiationCutOff") + private Integer activityInitiationCutOff; + + /** + * Activity Initiation Cut Off + * @param activityInitiationCutOff the value to set + * @return this builder + **/ + public Builder activityInitiationCutOff(Integer activityInitiationCutOff) { + this.activityInitiationCutOff = activityInitiationCutOff; + this.__explicitlySet__.add("activityInitiationCutOff"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("schedule") + private Schedule schedule; + + public Builder schedule(Schedule schedule) { + this.schedule = schedule; + this.__explicitlySet__.add("schedule"); + return this; + } + /** + * Action Groups associated with the Schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroups") + private java.util.List actionGroups; + + /** + * Action Groups associated with the Schedule. + * @param actionGroups the value to set + * @return this builder + **/ + public Builder actionGroups(java.util.List actionGroups) { + this.actionGroups = actionGroups; + this.__explicitlySet__.add("actionGroups"); + return this; + } + /** + * Runbooks. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runBooks") + private java.util.List runBooks; + + /** + * Runbooks. + * @param runBooks the value to set + * @return this builder + **/ + public Builder runBooks(java.util.List runBooks) { + this.runBooks = runBooks; + this.__explicitlySet__.add("runBooks"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateSchedulerDefinitionDetails build() { + CreateSchedulerDefinitionDetails model = + new CreateSchedulerDefinitionDetails( + this.displayName, + this.description, + this.compartmentId, + this.activityInitiationCutOff, + this.schedule, + this.actionGroups, + this.runBooks, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateSchedulerDefinitionDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("activityInitiationCutOff")) { + this.activityInitiationCutOff(model.getActivityInitiationCutOff()); + } + if (model.wasPropertyExplicitlySet("schedule")) { + this.schedule(model.getSchedule()); + } + if (model.wasPropertyExplicitlySet("actionGroups")) { + this.actionGroups(model.getActionGroups()); + } + if (model.wasPropertyExplicitlySet("runBooks")) { + this.runBooks(model.getRunBooks()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Activity Initiation Cut Off + **/ + @com.fasterxml.jackson.annotation.JsonProperty("activityInitiationCutOff") + private final Integer activityInitiationCutOff; + + /** + * Activity Initiation Cut Off + * @return the value + **/ + public Integer getActivityInitiationCutOff() { + return activityInitiationCutOff; + } + + @com.fasterxml.jackson.annotation.JsonProperty("schedule") + private final Schedule schedule; + + public Schedule getSchedule() { + return schedule; + } + + /** + * Action Groups associated with the Schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroups") + private final java.util.List actionGroups; + + /** + * Action Groups associated with the Schedule. + * @return the value + **/ + public java.util.List getActionGroups() { + return actionGroups; + } + + /** + * Runbooks. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runBooks") + private final java.util.List runBooks; + + /** + * Runbooks. + * @return the value + **/ + public java.util.List getRunBooks() { + return runBooks; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateSchedulerDefinitionDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", activityInitiationCutOff=") + .append(String.valueOf(this.activityInitiationCutOff)); + sb.append(", schedule=").append(String.valueOf(this.schedule)); + sb.append(", actionGroups=").append(String.valueOf(this.actionGroups)); + sb.append(", runBooks=").append(String.valueOf(this.runBooks)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSchedulerDefinitionDetails)) { + return false; + } + + CreateSchedulerDefinitionDetails other = (CreateSchedulerDefinitionDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals( + this.activityInitiationCutOff, other.activityInitiationCutOff) + && java.util.Objects.equals(this.schedule, other.schedule) + && java.util.Objects.equals(this.actionGroups, other.actionGroups) + && java.util.Objects.equals(this.runBooks, other.runBooks) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.activityInitiationCutOff == null + ? 43 + : this.activityInitiationCutOff.hashCode()); + result = (result * PRIME) + (this.schedule == null ? 43 : this.schedule.hashCode()); + result = (result * PRIME) + (this.actionGroups == null ? 43 : this.actionGroups.hashCode()); + result = (result * PRIME) + (this.runBooks == null ? 43 : this.runBooks.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateTaskRecordDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateTaskRecordDetails.java new file mode 100644 index 00000000000..752ce2430a4 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CreateTaskRecordDetails.java @@ -0,0 +1,370 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information about new Task. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateTaskRecordDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateTaskRecordDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "details", + "compartmentId", + "freeformTags", + "definedTags" + }) + public CreateTaskRecordDetails( + String displayName, + String description, + Details details, + String compartmentId, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.details = details; + this.compartmentId = compartmentId; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("details") + private Details details; + + public Builder details(Details details) { + this.details = details; + this.__explicitlySet__.add("details"); + return this; + } + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateTaskRecordDetails build() { + CreateTaskRecordDetails model = + new CreateTaskRecordDetails( + this.displayName, + this.description, + this.details, + this.compartmentId, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateTaskRecordDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("details")) { + this.details(model.getDetails()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + @com.fasterxml.jackson.annotation.JsonProperty("details") + private final Details details; + + public Details getDetails() { + return details; + } + + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateTaskRecordDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", details=").append(String.valueOf(this.details)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateTaskRecordDetails)) { + return false; + } + + CreateTaskRecordDetails other = (CreateTaskRecordDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.details, other.details) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.details == null ? 43 : this.details.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CredentialConfigCategoryDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CredentialConfigCategoryDetails.java new file mode 100644 index 00000000000..61e4caa710c --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CredentialConfigCategoryDetails.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Credential Config Category Details. + * Defines credential placeholders deemed necessary by product standards later mapped and used by lifecycle management operations for the supported products. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CredentialConfigCategoryDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "configCategory" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CredentialConfigCategoryDetails extends ConfigCategoryDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CredentialConfigCategoryDetails build() { + CredentialConfigCategoryDetails model = new CredentialConfigCategoryDetails(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CredentialConfigCategoryDetails model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CredentialConfigCategoryDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CredentialConfigCategoryDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CredentialConfigCategoryDetails)) { + return false; + } + + CredentialConfigCategoryDetails other = (CredentialConfigCategoryDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CredentialDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CredentialDetails.java new file mode 100644 index 00000000000..4028d45045f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CredentialDetails.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Credential Details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "credentialType", + defaultImpl = CredentialDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PlainTextCredentialDetails.class, + name = "PLAIN_TEXT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = KeyEncryptionCredentialDetails.class, + name = "KEY_ENCRYPTION" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = VaultSecretCredentialDetails.class, + name = "VAULT_SECRET" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CredentialDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected CredentialDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CredentialDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CredentialDetails)) { + return false; + } + + CredentialDetails other = (CredentialDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Credential Type. + **/ + public enum CredentialType { + PlainText("PLAIN_TEXT"), + VaultSecret("VAULT_SECRET"), + KeyEncryption("KEY_ENCRYPTION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CredentialType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (CredentialType v : CredentialType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + CredentialType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static CredentialType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'CredentialType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CredentialEntitySpecificDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CredentialEntitySpecificDetails.java new file mode 100644 index 00000000000..6f73f88494d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/CredentialEntitySpecificDetails.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Credential specific Details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "credentialLevel", + defaultImpl = CredentialEntitySpecificDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = TargetCredentialEntitySpecificDetails.class, + name = "TARGET" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = FleetCredentialEntitySpecificDetails.class, + name = "FLEET" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ResourceCredentialEntitySpecificDetails.class, + name = "RESOURCE" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CredentialEntitySpecificDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected CredentialEntitySpecificDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CredentialEntitySpecificDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CredentialEntitySpecificDetails)) { + return false; + } + + CredentialEntitySpecificDetails other = (CredentialEntitySpecificDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * At what level the credential is provided? + **/ + public enum CredentialLevel { + Fleet("FLEET"), + Resource("RESOURCE"), + Target("TARGET"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CredentialLevel.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (CredentialLevel v : CredentialLevel.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + CredentialLevel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static CredentialLevel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'CredentialLevel', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/DependentPatchDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/DependentPatchDetails.java new file mode 100644 index 00000000000..86225db76df --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/DependentPatchDetails.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Dependent Patch Details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DependentPatchDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DependentPatchDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"id"}) + public DependentPatchDetails(String id) { + super(); + this.id = id; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DependentPatchDetails build() { + DependentPatchDetails model = new DependentPatchDetails(this.id); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DependentPatchDetails model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DependentPatchDetails("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DependentPatchDetails)) { + return false; + } + + DependentPatchDetails other = (DependentPatchDetails) o; + return java.util.Objects.equals(this.id, other.id) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Details.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Details.java new file mode 100644 index 00000000000..939b1a06844 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Details.java @@ -0,0 +1,368 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The details of the task. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Details.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Details extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "executionDetails", + "platform", + "osType", + "scope", + "properties", + "isDiscoveryOutputTask", + "isApplySubjectTask" + }) + public Details( + ExecutionDetails executionDetails, + String platform, + OsType osType, + TaskScope scope, + Properties properties, + Boolean isDiscoveryOutputTask, + Boolean isApplySubjectTask) { + super(); + this.executionDetails = executionDetails; + this.platform = platform; + this.osType = osType; + this.scope = scope; + this.properties = properties; + this.isDiscoveryOutputTask = isDiscoveryOutputTask; + this.isApplySubjectTask = isApplySubjectTask; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("executionDetails") + private ExecutionDetails executionDetails; + + public Builder executionDetails(ExecutionDetails executionDetails) { + this.executionDetails = executionDetails; + this.__explicitlySet__.add("executionDetails"); + return this; + } + /** + * The platform of the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platform") + private String platform; + + /** + * The platform of the runbook. + * @param platform the value to set + * @return this builder + **/ + public Builder platform(String platform) { + this.platform = platform; + this.__explicitlySet__.add("platform"); + return this; + } + /** + * The OS for the task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osType") + private OsType osType; + + /** + * The OS for the task + * @param osType the value to set + * @return this builder + **/ + public Builder osType(OsType osType) { + this.osType = osType; + this.__explicitlySet__.add("osType"); + return this; + } + /** + * The scope of the task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scope") + private TaskScope scope; + + /** + * The scope of the task + * @param scope the value to set + * @return this builder + **/ + public Builder scope(TaskScope scope) { + this.scope = scope; + this.__explicitlySet__.add("scope"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("properties") + private Properties properties; + + public Builder properties(Properties properties) { + this.properties = properties; + this.__explicitlySet__.add("properties"); + return this; + } + /** + * Is this a discovery output task? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDiscoveryOutputTask") + private Boolean isDiscoveryOutputTask; + + /** + * Is this a discovery output task? + * @param isDiscoveryOutputTask the value to set + * @return this builder + **/ + public Builder isDiscoveryOutputTask(Boolean isDiscoveryOutputTask) { + this.isDiscoveryOutputTask = isDiscoveryOutputTask; + this.__explicitlySet__.add("isDiscoveryOutputTask"); + return this; + } + /** + * Is this an Apply Subject Task? + * Set this to true for a Patch Execution Task which applies patches(subjects) on a target. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isApplySubjectTask") + private Boolean isApplySubjectTask; + + /** + * Is this an Apply Subject Task? + * Set this to true for a Patch Execution Task which applies patches(subjects) on a target. + * + * @param isApplySubjectTask the value to set + * @return this builder + **/ + public Builder isApplySubjectTask(Boolean isApplySubjectTask) { + this.isApplySubjectTask = isApplySubjectTask; + this.__explicitlySet__.add("isApplySubjectTask"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Details build() { + Details model = + new Details( + this.executionDetails, + this.platform, + this.osType, + this.scope, + this.properties, + this.isDiscoveryOutputTask, + this.isApplySubjectTask); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Details model) { + if (model.wasPropertyExplicitlySet("executionDetails")) { + this.executionDetails(model.getExecutionDetails()); + } + if (model.wasPropertyExplicitlySet("platform")) { + this.platform(model.getPlatform()); + } + if (model.wasPropertyExplicitlySet("osType")) { + this.osType(model.getOsType()); + } + if (model.wasPropertyExplicitlySet("scope")) { + this.scope(model.getScope()); + } + if (model.wasPropertyExplicitlySet("properties")) { + this.properties(model.getProperties()); + } + if (model.wasPropertyExplicitlySet("isDiscoveryOutputTask")) { + this.isDiscoveryOutputTask(model.getIsDiscoveryOutputTask()); + } + if (model.wasPropertyExplicitlySet("isApplySubjectTask")) { + this.isApplySubjectTask(model.getIsApplySubjectTask()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("executionDetails") + private final ExecutionDetails executionDetails; + + public ExecutionDetails getExecutionDetails() { + return executionDetails; + } + + /** + * The platform of the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platform") + private final String platform; + + /** + * The platform of the runbook. + * @return the value + **/ + public String getPlatform() { + return platform; + } + + /** + * The OS for the task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osType") + private final OsType osType; + + /** + * The OS for the task + * @return the value + **/ + public OsType getOsType() { + return osType; + } + + /** + * The scope of the task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scope") + private final TaskScope scope; + + /** + * The scope of the task + * @return the value + **/ + public TaskScope getScope() { + return scope; + } + + @com.fasterxml.jackson.annotation.JsonProperty("properties") + private final Properties properties; + + public Properties getProperties() { + return properties; + } + + /** + * Is this a discovery output task? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDiscoveryOutputTask") + private final Boolean isDiscoveryOutputTask; + + /** + * Is this a discovery output task? + * @return the value + **/ + public Boolean getIsDiscoveryOutputTask() { + return isDiscoveryOutputTask; + } + + /** + * Is this an Apply Subject Task? + * Set this to true for a Patch Execution Task which applies patches(subjects) on a target. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isApplySubjectTask") + private final Boolean isApplySubjectTask; + + /** + * Is this an Apply Subject Task? + * Set this to true for a Patch Execution Task which applies patches(subjects) on a target. + * + * @return the value + **/ + public Boolean getIsApplySubjectTask() { + return isApplySubjectTask; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Details("); + sb.append("super=").append(super.toString()); + sb.append("executionDetails=").append(String.valueOf(this.executionDetails)); + sb.append(", platform=").append(String.valueOf(this.platform)); + sb.append(", osType=").append(String.valueOf(this.osType)); + sb.append(", scope=").append(String.valueOf(this.scope)); + sb.append(", properties=").append(String.valueOf(this.properties)); + sb.append(", isDiscoveryOutputTask=").append(String.valueOf(this.isDiscoveryOutputTask)); + sb.append(", isApplySubjectTask=").append(String.valueOf(this.isApplySubjectTask)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Details)) { + return false; + } + + Details other = (Details) o; + return java.util.Objects.equals(this.executionDetails, other.executionDetails) + && java.util.Objects.equals(this.platform, other.platform) + && java.util.Objects.equals(this.osType, other.osType) + && java.util.Objects.equals(this.scope, other.scope) + && java.util.Objects.equals(this.properties, other.properties) + && java.util.Objects.equals(this.isDiscoveryOutputTask, other.isDiscoveryOutputTask) + && java.util.Objects.equals(this.isApplySubjectTask, other.isApplySubjectTask) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.executionDetails == null ? 43 : this.executionDetails.hashCode()); + result = (result * PRIME) + (this.platform == null ? 43 : this.platform.hashCode()); + result = (result * PRIME) + (this.osType == null ? 43 : this.osType.hashCode()); + result = (result * PRIME) + (this.scope == null ? 43 : this.scope.hashCode()); + result = (result * PRIME) + (this.properties == null ? 43 : this.properties.hashCode()); + result = + (result * PRIME) + + (this.isDiscoveryOutputTask == null + ? 43 + : this.isDiscoveryOutputTask.hashCode()); + result = + (result * PRIME) + + (this.isApplySubjectTask == null + ? 43 + : this.isApplySubjectTask.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/DiscoveredTarget.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/DiscoveredTarget.java new file mode 100644 index 00000000000..514b27448de --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/DiscoveredTarget.java @@ -0,0 +1,295 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * A target that is discovered by the Software discovery process. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = DiscoveredTarget.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DiscoveredTarget extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "targetId", + "targetName", + "product", + "resourceId", + "version" + }) + public DiscoveredTarget( + String targetId, String targetName, String product, String resourceId, String version) { + super(); + this.targetId = targetId; + this.targetName = targetName; + this.product = product; + this.resourceId = resourceId; + this.version = version; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * ID of the Target. Can be the target name if a separate ID is not available. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetId") + private String targetId; + + /** + * ID of the Target. Can be the target name if a separate ID is not available. + * @param targetId the value to set + * @return this builder + **/ + public Builder targetId(String targetId) { + this.targetId = targetId; + this.__explicitlySet__.add("targetId"); + return this; + } + /** + * Target Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetName") + private String targetName; + + /** + * Target Name. + * @param targetName the value to set + * @return this builder + **/ + public Builder targetName(String targetName) { + this.targetName = targetName; + this.__explicitlySet__.add("targetName"); + return this; + } + /** + * Product that the target belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("product") + private String product; + + /** + * Product that the target belongs to. + * @param product the value to set + * @return this builder + **/ + public Builder product(String product) { + this.product = product; + this.__explicitlySet__.add("product"); + return this; + } + /** + * Unique key that identifies the resource that the target belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * Unique key that identifies the resource that the target belongs to. + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * Current version of the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * Current version of the target. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DiscoveredTarget build() { + DiscoveredTarget model = + new DiscoveredTarget( + this.targetId, + this.targetName, + this.product, + this.resourceId, + this.version); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DiscoveredTarget model) { + if (model.wasPropertyExplicitlySet("targetId")) { + this.targetId(model.getTargetId()); + } + if (model.wasPropertyExplicitlySet("targetName")) { + this.targetName(model.getTargetName()); + } + if (model.wasPropertyExplicitlySet("product")) { + this.product(model.getProduct()); + } + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * ID of the Target. Can be the target name if a separate ID is not available. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetId") + private final String targetId; + + /** + * ID of the Target. Can be the target name if a separate ID is not available. + * @return the value + **/ + public String getTargetId() { + return targetId; + } + + /** + * Target Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetName") + private final String targetName; + + /** + * Target Name. + * @return the value + **/ + public String getTargetName() { + return targetName; + } + + /** + * Product that the target belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("product") + private final String product; + + /** + * Product that the target belongs to. + * @return the value + **/ + public String getProduct() { + return product; + } + + /** + * Unique key that identifies the resource that the target belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * Unique key that identifies the resource that the target belongs to. + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * Current version of the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * Current version of the target. + * @return the value + **/ + public String getVersion() { + return version; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DiscoveredTarget("); + sb.append("super=").append(super.toString()); + sb.append("targetId=").append(String.valueOf(this.targetId)); + sb.append(", targetName=").append(String.valueOf(this.targetName)); + sb.append(", product=").append(String.valueOf(this.product)); + sb.append(", resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DiscoveredTarget)) { + return false; + } + + DiscoveredTarget other = (DiscoveredTarget) o; + return java.util.Objects.equals(this.targetId, other.targetId) + && java.util.Objects.equals(this.targetName, other.targetName) + && java.util.Objects.equals(this.product, other.product) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.version, other.version) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); + result = (result * PRIME) + (this.targetName == null ? 43 : this.targetName.hashCode()); + result = (result * PRIME) + (this.product == null ? 43 : this.product.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/EnableLatestPolicyDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/EnableLatestPolicyDetails.java new file mode 100644 index 00000000000..d4f8608ac10 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/EnableLatestPolicyDetails.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information to be updated. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = EnableLatestPolicyDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class EnableLatestPolicyDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"canLatestFamsPoliciesBeEnabled"}) + public EnableLatestPolicyDetails(Boolean canLatestFamsPoliciesBeEnabled) { + super(); + this.canLatestFamsPoliciesBeEnabled = canLatestFamsPoliciesBeEnabled; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A value determining if latest Fleet Application Management policies should be enabled + **/ + @com.fasterxml.jackson.annotation.JsonProperty("canLatestFamsPoliciesBeEnabled") + private Boolean canLatestFamsPoliciesBeEnabled; + + /** + * A value determining if latest Fleet Application Management policies should be enabled + * @param canLatestFamsPoliciesBeEnabled the value to set + * @return this builder + **/ + public Builder canLatestFamsPoliciesBeEnabled(Boolean canLatestFamsPoliciesBeEnabled) { + this.canLatestFamsPoliciesBeEnabled = canLatestFamsPoliciesBeEnabled; + this.__explicitlySet__.add("canLatestFamsPoliciesBeEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public EnableLatestPolicyDetails build() { + EnableLatestPolicyDetails model = + new EnableLatestPolicyDetails(this.canLatestFamsPoliciesBeEnabled); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(EnableLatestPolicyDetails model) { + if (model.wasPropertyExplicitlySet("canLatestFamsPoliciesBeEnabled")) { + this.canLatestFamsPoliciesBeEnabled(model.getCanLatestFamsPoliciesBeEnabled()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A value determining if latest Fleet Application Management policies should be enabled + **/ + @com.fasterxml.jackson.annotation.JsonProperty("canLatestFamsPoliciesBeEnabled") + private final Boolean canLatestFamsPoliciesBeEnabled; + + /** + * A value determining if latest Fleet Application Management policies should be enabled + * @return the value + **/ + public Boolean getCanLatestFamsPoliciesBeEnabled() { + return canLatestFamsPoliciesBeEnabled; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("EnableLatestPolicyDetails("); + sb.append("super=").append(super.toString()); + sb.append("canLatestFamsPoliciesBeEnabled=") + .append(String.valueOf(this.canLatestFamsPoliciesBeEnabled)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof EnableLatestPolicyDetails)) { + return false; + } + + EnableLatestPolicyDetails other = (EnableLatestPolicyDetails) o; + return java.util.Objects.equals( + this.canLatestFamsPoliciesBeEnabled, other.canLatestFamsPoliciesBeEnabled) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.canLatestFamsPoliciesBeEnabled == null + ? 43 + : this.canLatestFamsPoliciesBeEnabled.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/EntityExecutionDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/EntityExecutionDetails.java new file mode 100644 index 00000000000..9fe7fe12f70 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/EntityExecutionDetails.java @@ -0,0 +1,433 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Resource level execution status and target associations. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = EntityExecutionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class EntityExecutionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "resourceId", + "resourceDisplayName", + "description", + "sequence", + "targets", + "status", + "timeStarted", + "timeEnded" + }) + public EntityExecutionDetails( + String resourceId, + String resourceDisplayName, + String description, + String sequence, + java.util.List targets, + JobStatus status, + java.util.Date timeStarted, + java.util.Date timeEnded) { + super(); + this.resourceId = resourceId; + this.resourceDisplayName = resourceDisplayName; + this.description = description; + this.sequence = sequence; + this.targets = targets; + this.status = status; + this.timeStarted = timeStarted; + this.timeEnded = timeEnded; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Resource Identifier associated with the Work Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * Resource Identifier associated with the Work Request. + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * Resource Display Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceDisplayName") + private String resourceDisplayName; + + /** + * Resource Display Name. + * @param resourceDisplayName the value to set + * @return this builder + **/ + public Builder resourceDisplayName(String resourceDisplayName) { + this.resourceDisplayName = resourceDisplayName; + this.__explicitlySet__.add("resourceDisplayName"); + return this; + } + /** + * Description of the Resource Execution status. + * If there are any errors, this can also include a short error message. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the Resource Execution status. + * If there are any errors, this can also include a short error message. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The sequence of the Resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sequence") + private String sequence; + + /** + * The sequence of the Resource. + * @param sequence the value to set + * @return this builder + **/ + public Builder sequence(String sequence) { + this.sequence = sequence; + this.__explicitlySet__.add("sequence"); + return this; + } + /** + * Targets associated with the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targets") + private java.util.List targets; + + /** + * Targets associated with the resource. + * @param targets the value to set + * @return this builder + **/ + public Builder targets(java.util.List targets) { + this.targets = targets; + this.__explicitlySet__.add("targets"); + return this; + } + /** + * Status of the Job at Resource Level. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private JobStatus status; + + /** + * Status of the Job at Resource Level. + * @param status the value to set + * @return this builder + **/ + public Builder status(JobStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The time the task started for the resource. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The time the task started for the resource. An RFC3339 formatted datetime string + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The time the task ended for the resource. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + private java.util.Date timeEnded; + + /** + * The time the task ended for the resource. An RFC3339 formatted datetime string + * @param timeEnded the value to set + * @return this builder + **/ + public Builder timeEnded(java.util.Date timeEnded) { + this.timeEnded = timeEnded; + this.__explicitlySet__.add("timeEnded"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public EntityExecutionDetails build() { + EntityExecutionDetails model = + new EntityExecutionDetails( + this.resourceId, + this.resourceDisplayName, + this.description, + this.sequence, + this.targets, + this.status, + this.timeStarted, + this.timeEnded); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(EntityExecutionDetails model) { + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("resourceDisplayName")) { + this.resourceDisplayName(model.getResourceDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("sequence")) { + this.sequence(model.getSequence()); + } + if (model.wasPropertyExplicitlySet("targets")) { + this.targets(model.getTargets()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeEnded")) { + this.timeEnded(model.getTimeEnded()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Resource Identifier associated with the Work Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * Resource Identifier associated with the Work Request. + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * Resource Display Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceDisplayName") + private final String resourceDisplayName; + + /** + * Resource Display Name. + * @return the value + **/ + public String getResourceDisplayName() { + return resourceDisplayName; + } + + /** + * Description of the Resource Execution status. + * If there are any errors, this can also include a short error message. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the Resource Execution status. + * If there are any errors, this can also include a short error message. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The sequence of the Resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sequence") + private final String sequence; + + /** + * The sequence of the Resource. + * @return the value + **/ + public String getSequence() { + return sequence; + } + + /** + * Targets associated with the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targets") + private final java.util.List targets; + + /** + * Targets associated with the resource. + * @return the value + **/ + public java.util.List getTargets() { + return targets; + } + + /** + * Status of the Job at Resource Level. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final JobStatus status; + + /** + * Status of the Job at Resource Level. + * @return the value + **/ + public JobStatus getStatus() { + return status; + } + + /** + * The time the task started for the resource. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The time the task started for the resource. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The time the task ended for the resource. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + private final java.util.Date timeEnded; + + /** + * The time the task ended for the resource. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeEnded() { + return timeEnded; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("EntityExecutionDetails("); + sb.append("super=").append(super.toString()); + sb.append("resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", resourceDisplayName=").append(String.valueOf(this.resourceDisplayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", sequence=").append(String.valueOf(this.sequence)); + sb.append(", targets=").append(String.valueOf(this.targets)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeEnded=").append(String.valueOf(this.timeEnded)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof EntityExecutionDetails)) { + return false; + } + + EntityExecutionDetails other = (EntityExecutionDetails) o; + return java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.resourceDisplayName, other.resourceDisplayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.sequence, other.sequence) + && java.util.Objects.equals(this.targets, other.targets) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeEnded, other.timeEnded) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = + (result * PRIME) + + (this.resourceDisplayName == null + ? 43 + : this.resourceDisplayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.sequence == null ? 43 : this.sequence.hashCode()); + result = (result * PRIME) + (this.targets == null ? 43 : this.targets.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeEnded == null ? 43 : this.timeEnded.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/EnvironmentConfigCategoryDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/EnvironmentConfigCategoryDetails.java new file mode 100644 index 00000000000..408c51b596e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/EnvironmentConfigCategoryDetails.java @@ -0,0 +1,104 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Environment Config Category Details. + * Defines the supported prioritization associated with resources based on the implementation phase of the applications hosted by them. + * For example, your organization might support development, beta, or production environment types. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = EnvironmentConfigCategoryDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "configCategory" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class EnvironmentConfigCategoryDetails extends ConfigCategoryDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public EnvironmentConfigCategoryDetails build() { + EnvironmentConfigCategoryDetails model = new EnvironmentConfigCategoryDetails(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(EnvironmentConfigCategoryDetails model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public EnvironmentConfigCategoryDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("EnvironmentConfigCategoryDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof EnvironmentConfigCategoryDetails)) { + return false; + } + + EnvironmentConfigCategoryDetails other = (EnvironmentConfigCategoryDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Execution.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Execution.java new file mode 100644 index 00000000000..37abf36dd02 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Execution.java @@ -0,0 +1,714 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Task Execution associated with the Job. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Execution.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Execution extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "taskRecordId", + "stepName", + "processReferenceId", + "sequence", + "subjects", + "status", + "outcome", + "targetId", + "timeStarted", + "timeEnded", + "isRollbackTask", + "description", + "resourceId", + "systemTags" + }) + public Execution( + String id, + String taskRecordId, + String stepName, + String processReferenceId, + String sequence, + java.util.List subjects, + JobStatus status, + Outcome outcome, + String targetId, + java.util.Date timeStarted, + java.util.Date timeEnded, + Boolean isRollbackTask, + String description, + String resourceId, + java.util.Map> systemTags) { + super(); + this.id = id; + this.taskRecordId = taskRecordId; + this.stepName = stepName; + this.processReferenceId = processReferenceId; + this.sequence = sequence; + this.subjects = subjects; + this.status = status; + this.outcome = outcome; + this.targetId = targetId; + this.timeStarted = timeStarted; + this.timeEnded = timeEnded; + this.isRollbackTask = isRollbackTask; + this.description = description; + this.resourceId = resourceId; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique Id associated with the task execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique Id associated with the task execution. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The OCID of taskRecord. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("taskRecordId") + private String taskRecordId; + + /** + * The OCID of taskRecord. + * @param taskRecordId the value to set + * @return this builder + **/ + public Builder taskRecordId(String taskRecordId) { + this.taskRecordId = taskRecordId; + this.__explicitlySet__.add("taskRecordId"); + return this; + } + /** + * Name of the step. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private String stepName; + + /** + * Name of the step. + * @param stepName the value to set + * @return this builder + **/ + public Builder stepName(String stepName) { + this.stepName = stepName; + this.__explicitlySet__.add("stepName"); + return this; + } + /** + * Unique process-reference identifier returned by the execution client. + * In some cases, this can be a runcommand OCID. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("processReferenceId") + private String processReferenceId; + + /** + * Unique process-reference identifier returned by the execution client. + * In some cases, this can be a runcommand OCID. + * + * @param processReferenceId the value to set + * @return this builder + **/ + public Builder processReferenceId(String processReferenceId) { + this.processReferenceId = processReferenceId; + this.__explicitlySet__.add("processReferenceId"); + return this; + } + /** + * The sequence of the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sequence") + private String sequence; + + /** + * The sequence of the task. + * @param sequence the value to set + * @return this builder + **/ + public Builder sequence(String sequence) { + this.sequence = sequence; + this.__explicitlySet__.add("sequence"); + return this; + } + /** + * Subjects that are tied to the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subjects") + private java.util.List subjects; + + /** + * Subjects that are tied to the task. + * @param subjects the value to set + * @return this builder + **/ + public Builder subjects(java.util.List subjects) { + this.subjects = subjects; + this.__explicitlySet__.add("subjects"); + return this; + } + /** + * Status of the Task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private JobStatus status; + + /** + * Status of the Task + * @param status the value to set + * @return this builder + **/ + public Builder status(JobStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("outcome") + private Outcome outcome; + + public Builder outcome(Outcome outcome) { + this.outcome = outcome; + this.__explicitlySet__.add("outcome"); + return this; + } + /** + * Target associated with the execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetId") + private String targetId; + + /** + * Target associated with the execution. + * @param targetId the value to set + * @return this builder + **/ + public Builder targetId(String targetId) { + this.targetId = targetId; + this.__explicitlySet__.add("targetId"); + return this; + } + /** + * The time the task started. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The time the task started. An RFC3339 formatted datetime string. + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The time the task ended. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + private java.util.Date timeEnded; + + /** + * The time the task ended. An RFC3339 formatted datetime string. + * @param timeEnded the value to set + * @return this builder + **/ + public Builder timeEnded(java.util.Date timeEnded) { + this.timeEnded = timeEnded; + this.__explicitlySet__.add("timeEnded"); + return this; + } + /** + * Is this a rollback task? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRollbackTask") + private Boolean isRollbackTask; + + /** + * Is this a rollback task? + * @param isRollbackTask the value to set + * @return this builder + **/ + public Builder isRollbackTask(Boolean isRollbackTask) { + this.isRollbackTask = isRollbackTask; + this.__explicitlySet__.add("isRollbackTask"); + return this; + } + /** + * Description of the Execution status. + * If there are any errors, this can also include a short error message. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the Execution status. + * If there are any errors, this can also include a short error message. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Resource Identifier associated with the Work Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * Resource Identifier associated with the Work Request. + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Execution build() { + Execution model = + new Execution( + this.id, + this.taskRecordId, + this.stepName, + this.processReferenceId, + this.sequence, + this.subjects, + this.status, + this.outcome, + this.targetId, + this.timeStarted, + this.timeEnded, + this.isRollbackTask, + this.description, + this.resourceId, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Execution model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("taskRecordId")) { + this.taskRecordId(model.getTaskRecordId()); + } + if (model.wasPropertyExplicitlySet("stepName")) { + this.stepName(model.getStepName()); + } + if (model.wasPropertyExplicitlySet("processReferenceId")) { + this.processReferenceId(model.getProcessReferenceId()); + } + if (model.wasPropertyExplicitlySet("sequence")) { + this.sequence(model.getSequence()); + } + if (model.wasPropertyExplicitlySet("subjects")) { + this.subjects(model.getSubjects()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("outcome")) { + this.outcome(model.getOutcome()); + } + if (model.wasPropertyExplicitlySet("targetId")) { + this.targetId(model.getTargetId()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeEnded")) { + this.timeEnded(model.getTimeEnded()); + } + if (model.wasPropertyExplicitlySet("isRollbackTask")) { + this.isRollbackTask(model.getIsRollbackTask()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique Id associated with the task execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique Id associated with the task execution. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of taskRecord. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("taskRecordId") + private final String taskRecordId; + + /** + * The OCID of taskRecord. + * @return the value + **/ + public String getTaskRecordId() { + return taskRecordId; + } + + /** + * Name of the step. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private final String stepName; + + /** + * Name of the step. + * @return the value + **/ + public String getStepName() { + return stepName; + } + + /** + * Unique process-reference identifier returned by the execution client. + * In some cases, this can be a runcommand OCID. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("processReferenceId") + private final String processReferenceId; + + /** + * Unique process-reference identifier returned by the execution client. + * In some cases, this can be a runcommand OCID. + * + * @return the value + **/ + public String getProcessReferenceId() { + return processReferenceId; + } + + /** + * The sequence of the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sequence") + private final String sequence; + + /** + * The sequence of the task. + * @return the value + **/ + public String getSequence() { + return sequence; + } + + /** + * Subjects that are tied to the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subjects") + private final java.util.List subjects; + + /** + * Subjects that are tied to the task. + * @return the value + **/ + public java.util.List getSubjects() { + return subjects; + } + + /** + * Status of the Task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final JobStatus status; + + /** + * Status of the Task + * @return the value + **/ + public JobStatus getStatus() { + return status; + } + + @com.fasterxml.jackson.annotation.JsonProperty("outcome") + private final Outcome outcome; + + public Outcome getOutcome() { + return outcome; + } + + /** + * Target associated with the execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetId") + private final String targetId; + + /** + * Target associated with the execution. + * @return the value + **/ + public String getTargetId() { + return targetId; + } + + /** + * The time the task started. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The time the task started. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The time the task ended. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + private final java.util.Date timeEnded; + + /** + * The time the task ended. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeEnded() { + return timeEnded; + } + + /** + * Is this a rollback task? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRollbackTask") + private final Boolean isRollbackTask; + + /** + * Is this a rollback task? + * @return the value + **/ + public Boolean getIsRollbackTask() { + return isRollbackTask; + } + + /** + * Description of the Execution status. + * If there are any errors, this can also include a short error message. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the Execution status. + * If there are any errors, this can also include a short error message. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Resource Identifier associated with the Work Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * Resource Identifier associated with the Work Request. + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Execution("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", taskRecordId=").append(String.valueOf(this.taskRecordId)); + sb.append(", stepName=").append(String.valueOf(this.stepName)); + sb.append(", processReferenceId=").append(String.valueOf(this.processReferenceId)); + sb.append(", sequence=").append(String.valueOf(this.sequence)); + sb.append(", subjects=").append(String.valueOf(this.subjects)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", outcome=").append(String.valueOf(this.outcome)); + sb.append(", targetId=").append(String.valueOf(this.targetId)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeEnded=").append(String.valueOf(this.timeEnded)); + sb.append(", isRollbackTask=").append(String.valueOf(this.isRollbackTask)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Execution)) { + return false; + } + + Execution other = (Execution) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.taskRecordId, other.taskRecordId) + && java.util.Objects.equals(this.stepName, other.stepName) + && java.util.Objects.equals(this.processReferenceId, other.processReferenceId) + && java.util.Objects.equals(this.sequence, other.sequence) + && java.util.Objects.equals(this.subjects, other.subjects) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.outcome, other.outcome) + && java.util.Objects.equals(this.targetId, other.targetId) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeEnded, other.timeEnded) + && java.util.Objects.equals(this.isRollbackTask, other.isRollbackTask) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.taskRecordId == null ? 43 : this.taskRecordId.hashCode()); + result = (result * PRIME) + (this.stepName == null ? 43 : this.stepName.hashCode()); + result = + (result * PRIME) + + (this.processReferenceId == null + ? 43 + : this.processReferenceId.hashCode()); + result = (result * PRIME) + (this.sequence == null ? 43 : this.sequence.hashCode()); + result = (result * PRIME) + (this.subjects == null ? 43 : this.subjects.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.outcome == null ? 43 : this.outcome.hashCode()); + result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeEnded == null ? 43 : this.timeEnded.hashCode()); + result = + (result * PRIME) + + (this.isRollbackTask == null ? 43 : this.isRollbackTask.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ExecutionCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ExecutionCollection.java new file mode 100644 index 00000000000..7f59e2cfee3 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ExecutionCollection.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * A collection of ExecutionSummary. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExecutionCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExecutionCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ExecutionCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of Resource Level Executions. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of Resource Level Executions. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExecutionCollection build() { + ExecutionCollection model = new ExecutionCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExecutionCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of Resource Level Executions. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of Resource Level Executions. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExecutionCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExecutionCollection)) { + return false; + } + + ExecutionCollection other = (ExecutionCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ExecutionDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ExecutionDetails.java new file mode 100644 index 00000000000..b4dfafe0363 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ExecutionDetails.java @@ -0,0 +1,80 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Execution details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "executionType", + defaultImpl = ExecutionDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ScriptBasedExecutionDetails.class, + name = "SCRIPT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ApiBasedExecutionDetails.class, + name = "API" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ExecutionDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected ExecutionDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExecutionDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExecutionDetails)) { + return false; + } + + ExecutionDetails other = (ExecutionDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ExecutionSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ExecutionSummary.java new file mode 100644 index 00000000000..e4582974a0c --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ExecutionSummary.java @@ -0,0 +1,648 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * A task associated with the Job. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ExecutionSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExecutionSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "taskRecordId", + "stepName", + "processReferenceId", + "sequence", + "status", + "targetId", + "timeStarted", + "timeEnded", + "isRollbackTask", + "description", + "resourceId", + "systemTags" + }) + public ExecutionSummary( + String id, + String taskRecordId, + String stepName, + String processReferenceId, + String sequence, + JobStatus status, + String targetId, + java.util.Date timeStarted, + java.util.Date timeEnded, + Boolean isRollbackTask, + String description, + String resourceId, + java.util.Map> systemTags) { + super(); + this.id = id; + this.taskRecordId = taskRecordId; + this.stepName = stepName; + this.processReferenceId = processReferenceId; + this.sequence = sequence; + this.status = status; + this.targetId = targetId; + this.timeStarted = timeStarted; + this.timeEnded = timeEnded; + this.isRollbackTask = isRollbackTask; + this.description = description; + this.resourceId = resourceId; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique Id associated with the task execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique Id associated with the task execution. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The OCID of taskRecord. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("taskRecordId") + private String taskRecordId; + + /** + * The OCID of taskRecord. + * @param taskRecordId the value to set + * @return this builder + **/ + public Builder taskRecordId(String taskRecordId) { + this.taskRecordId = taskRecordId; + this.__explicitlySet__.add("taskRecordId"); + return this; + } + /** + * Name of the Step. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private String stepName; + + /** + * Name of the Step. + * @param stepName the value to set + * @return this builder + **/ + public Builder stepName(String stepName) { + this.stepName = stepName; + this.__explicitlySet__.add("stepName"); + return this; + } + /** + * Unique process-reference identifier returned by the execution client. + * In some cases, this can be a runcommand OCID. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("processReferenceId") + private String processReferenceId; + + /** + * Unique process-reference identifier returned by the execution client. + * In some cases, this can be a runcommand OCID. + * + * @param processReferenceId the value to set + * @return this builder + **/ + public Builder processReferenceId(String processReferenceId) { + this.processReferenceId = processReferenceId; + this.__explicitlySet__.add("processReferenceId"); + return this; + } + /** + * The sequence of the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sequence") + private String sequence; + + /** + * The sequence of the task. + * @param sequence the value to set + * @return this builder + **/ + public Builder sequence(String sequence) { + this.sequence = sequence; + this.__explicitlySet__.add("sequence"); + return this; + } + /** + * Status of the Task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private JobStatus status; + + /** + * Status of the Task. + * @param status the value to set + * @return this builder + **/ + public Builder status(JobStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * Target associated with the execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetId") + private String targetId; + + /** + * Target associated with the execution. + * @param targetId the value to set + * @return this builder + **/ + public Builder targetId(String targetId) { + this.targetId = targetId; + this.__explicitlySet__.add("targetId"); + return this; + } + /** + * The time the task started. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The time the task started. An RFC3339 formatted datetime string. + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The time the task ended. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + private java.util.Date timeEnded; + + /** + * The time the task ended. An RFC3339 formatted datetime string. + * @param timeEnded the value to set + * @return this builder + **/ + public Builder timeEnded(java.util.Date timeEnded) { + this.timeEnded = timeEnded; + this.__explicitlySet__.add("timeEnded"); + return this; + } + /** + * Is this a rollback task? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRollbackTask") + private Boolean isRollbackTask; + + /** + * Is this a rollback task? + * @param isRollbackTask the value to set + * @return this builder + **/ + public Builder isRollbackTask(Boolean isRollbackTask) { + this.isRollbackTask = isRollbackTask; + this.__explicitlySet__.add("isRollbackTask"); + return this; + } + /** + * Description of the Execution status. + * If there are any errors, this can also include a short error message. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the Execution status. + * If there are any errors, this can also include a short error message. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Resource Identifier associated with the Work Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * Resource Identifier associated with the Work Request. + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExecutionSummary build() { + ExecutionSummary model = + new ExecutionSummary( + this.id, + this.taskRecordId, + this.stepName, + this.processReferenceId, + this.sequence, + this.status, + this.targetId, + this.timeStarted, + this.timeEnded, + this.isRollbackTask, + this.description, + this.resourceId, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExecutionSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("taskRecordId")) { + this.taskRecordId(model.getTaskRecordId()); + } + if (model.wasPropertyExplicitlySet("stepName")) { + this.stepName(model.getStepName()); + } + if (model.wasPropertyExplicitlySet("processReferenceId")) { + this.processReferenceId(model.getProcessReferenceId()); + } + if (model.wasPropertyExplicitlySet("sequence")) { + this.sequence(model.getSequence()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("targetId")) { + this.targetId(model.getTargetId()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeEnded")) { + this.timeEnded(model.getTimeEnded()); + } + if (model.wasPropertyExplicitlySet("isRollbackTask")) { + this.isRollbackTask(model.getIsRollbackTask()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique Id associated with the task execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique Id associated with the task execution. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of taskRecord. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("taskRecordId") + private final String taskRecordId; + + /** + * The OCID of taskRecord. + * @return the value + **/ + public String getTaskRecordId() { + return taskRecordId; + } + + /** + * Name of the Step. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private final String stepName; + + /** + * Name of the Step. + * @return the value + **/ + public String getStepName() { + return stepName; + } + + /** + * Unique process-reference identifier returned by the execution client. + * In some cases, this can be a runcommand OCID. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("processReferenceId") + private final String processReferenceId; + + /** + * Unique process-reference identifier returned by the execution client. + * In some cases, this can be a runcommand OCID. + * + * @return the value + **/ + public String getProcessReferenceId() { + return processReferenceId; + } + + /** + * The sequence of the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sequence") + private final String sequence; + + /** + * The sequence of the task. + * @return the value + **/ + public String getSequence() { + return sequence; + } + + /** + * Status of the Task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final JobStatus status; + + /** + * Status of the Task. + * @return the value + **/ + public JobStatus getStatus() { + return status; + } + + /** + * Target associated with the execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetId") + private final String targetId; + + /** + * Target associated with the execution. + * @return the value + **/ + public String getTargetId() { + return targetId; + } + + /** + * The time the task started. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The time the task started. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The time the task ended. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + private final java.util.Date timeEnded; + + /** + * The time the task ended. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeEnded() { + return timeEnded; + } + + /** + * Is this a rollback task? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRollbackTask") + private final Boolean isRollbackTask; + + /** + * Is this a rollback task? + * @return the value + **/ + public Boolean getIsRollbackTask() { + return isRollbackTask; + } + + /** + * Description of the Execution status. + * If there are any errors, this can also include a short error message. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the Execution status. + * If there are any errors, this can also include a short error message. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Resource Identifier associated with the Work Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * Resource Identifier associated with the Work Request. + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExecutionSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", taskRecordId=").append(String.valueOf(this.taskRecordId)); + sb.append(", stepName=").append(String.valueOf(this.stepName)); + sb.append(", processReferenceId=").append(String.valueOf(this.processReferenceId)); + sb.append(", sequence=").append(String.valueOf(this.sequence)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", targetId=").append(String.valueOf(this.targetId)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeEnded=").append(String.valueOf(this.timeEnded)); + sb.append(", isRollbackTask=").append(String.valueOf(this.isRollbackTask)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExecutionSummary)) { + return false; + } + + ExecutionSummary other = (ExecutionSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.taskRecordId, other.taskRecordId) + && java.util.Objects.equals(this.stepName, other.stepName) + && java.util.Objects.equals(this.processReferenceId, other.processReferenceId) + && java.util.Objects.equals(this.sequence, other.sequence) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.targetId, other.targetId) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeEnded, other.timeEnded) + && java.util.Objects.equals(this.isRollbackTask, other.isRollbackTask) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.taskRecordId == null ? 43 : this.taskRecordId.hashCode()); + result = (result * PRIME) + (this.stepName == null ? 43 : this.stepName.hashCode()); + result = + (result * PRIME) + + (this.processReferenceId == null + ? 43 + : this.processReferenceId.hashCode()); + result = (result * PRIME) + (this.sequence == null ? 43 : this.sequence.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeEnded == null ? 43 : this.timeEnded.hashCode()); + result = + (result * PRIME) + + (this.isRollbackTask == null ? 43 : this.isRollbackTask.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ExecutionWorkflowDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ExecutionWorkflowDetails.java new file mode 100644 index 00000000000..a2268665f53 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ExecutionWorkflowDetails.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Execution Workflow details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExecutionWorkflowDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExecutionWorkflowDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"workflow"}) + public ExecutionWorkflowDetails(java.util.List workflow) { + super(); + this.workflow = workflow; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Execution Workflow for the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("workflow") + private java.util.List workflow; + + /** + * Execution Workflow for the runbook. + * @param workflow the value to set + * @return this builder + **/ + public Builder workflow(java.util.List workflow) { + this.workflow = workflow; + this.__explicitlySet__.add("workflow"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExecutionWorkflowDetails build() { + ExecutionWorkflowDetails model = new ExecutionWorkflowDetails(this.workflow); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExecutionWorkflowDetails model) { + if (model.wasPropertyExplicitlySet("workflow")) { + this.workflow(model.getWorkflow()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Execution Workflow for the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("workflow") + private final java.util.List workflow; + + /** + * Execution Workflow for the runbook. + * @return the value + **/ + public java.util.List getWorkflow() { + return workflow; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExecutionWorkflowDetails("); + sb.append("super=").append(super.toString()); + sb.append("workflow=").append(String.valueOf(this.workflow)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExecutionWorkflowDetails)) { + return false; + } + + ExecutionWorkflowDetails other = (ExecutionWorkflowDetails) o; + return java.util.Objects.equals(this.workflow, other.workflow) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.workflow == null ? 43 : this.workflow.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ExportComplianceReportDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ExportComplianceReportDetails.java new file mode 100644 index 00000000000..a4633a98401 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ExportComplianceReportDetails.java @@ -0,0 +1,345 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details for generating Compliance Report + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExportComplianceReportDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExportComplianceReportDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "entityId", + "resourceId", + "productStack", + "productName", + "complianceState" + }) + public ExportComplianceReportDetails( + String compartmentId, + String entityId, + String resourceId, + String productStack, + String productName, + ComplianceState complianceState) { + super(); + this.compartmentId = compartmentId; + this.entityId = entityId; + this.resourceId = resourceId; + this.productStack = productStack; + this.productName = productName; + this.complianceState = complianceState; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The OCID of the entity for which the compliance is calculated.Ex.FleetId + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityId") + private String entityId; + + /** + * The OCID of the entity for which the compliance is calculated.Ex.FleetId + * @param entityId the value to set + * @return this builder + **/ + public Builder entityId(String entityId) { + this.entityId = entityId; + this.__explicitlySet__.add("entityId"); + return this; + } + /** + * The OCID to identify the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * The OCID to identify the resource. + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * Product Stack. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productStack") + private String productStack; + + /** + * Product Stack. + * @param productStack the value to set + * @return this builder + **/ + public Builder productStack(String productStack) { + this.productStack = productStack; + this.__explicitlySet__.add("productStack"); + return this; + } + /** + * Product Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productName") + private String productName; + + /** + * Product Name. + * @param productName the value to set + * @return this builder + **/ + public Builder productName(String productName) { + this.productName = productName; + this.__explicitlySet__.add("productName"); + return this; + } + /** + * Last known compliance state of target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private ComplianceState complianceState; + + /** + * Last known compliance state of target. + * @param complianceState the value to set + * @return this builder + **/ + public Builder complianceState(ComplianceState complianceState) { + this.complianceState = complianceState; + this.__explicitlySet__.add("complianceState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExportComplianceReportDetails build() { + ExportComplianceReportDetails model = + new ExportComplianceReportDetails( + this.compartmentId, + this.entityId, + this.resourceId, + this.productStack, + this.productName, + this.complianceState); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExportComplianceReportDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("entityId")) { + this.entityId(model.getEntityId()); + } + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("productStack")) { + this.productStack(model.getProductStack()); + } + if (model.wasPropertyExplicitlySet("productName")) { + this.productName(model.getProductName()); + } + if (model.wasPropertyExplicitlySet("complianceState")) { + this.complianceState(model.getComplianceState()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The OCID of the entity for which the compliance is calculated.Ex.FleetId + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityId") + private final String entityId; + + /** + * The OCID of the entity for which the compliance is calculated.Ex.FleetId + * @return the value + **/ + public String getEntityId() { + return entityId; + } + + /** + * The OCID to identify the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * The OCID to identify the resource. + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * Product Stack. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productStack") + private final String productStack; + + /** + * Product Stack. + * @return the value + **/ + public String getProductStack() { + return productStack; + } + + /** + * Product Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productName") + private final String productName; + + /** + * Product Name. + * @return the value + **/ + public String getProductName() { + return productName; + } + + /** + * Last known compliance state of target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private final ComplianceState complianceState; + + /** + * Last known compliance state of target. + * @return the value + **/ + public ComplianceState getComplianceState() { + return complianceState; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExportComplianceReportDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", entityId=").append(String.valueOf(this.entityId)); + sb.append(", resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", productStack=").append(String.valueOf(this.productStack)); + sb.append(", productName=").append(String.valueOf(this.productName)); + sb.append(", complianceState=").append(String.valueOf(this.complianceState)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExportComplianceReportDetails)) { + return false; + } + + ExportComplianceReportDetails other = (ExportComplianceReportDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.entityId, other.entityId) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.productStack, other.productStack) + && java.util.Objects.equals(this.productName, other.productName) + && java.util.Objects.equals(this.complianceState, other.complianceState) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.entityId == null ? 43 : this.entityId.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.productStack == null ? 43 : this.productStack.hashCode()); + result = (result * PRIME) + (this.productName == null ? 43 : this.productName.hashCode()); + result = + (result * PRIME) + + (this.complianceState == null ? 43 : this.complianceState.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Fleet.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Fleet.java new file mode 100644 index 00000000000..ea4a3651970 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Fleet.java @@ -0,0 +1,1379 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * A fleet is a collection or grouping of resources based on criteria. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Fleet.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Fleet extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "resourceRegion", + "displayName", + "description", + "timeCreated", + "timeUpdated", + "fleetType", + "products", + "applicationType", + "environmentType", + "groupType", + "resourceSelectionType", + "ruleSelectionCriteria", + "notificationPreferences", + "resources", + "properties", + "credentials", + "isTargetAutoConfirm", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public Fleet( + String id, + String compartmentId, + String resourceRegion, + String displayName, + String description, + java.util.Date timeCreated, + java.util.Date timeUpdated, + FleetType fleetType, + java.util.List products, + String applicationType, + String environmentType, + GroupType groupType, + ResourceSelectionType resourceSelectionType, + SelectionCriteria ruleSelectionCriteria, + NotificationPreferences notificationPreferences, + java.util.List resources, + java.util.List properties, + java.util.List credentials, + Boolean isTargetAutoConfirm, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.resourceRegion = resourceRegion; + this.displayName = displayName; + this.description = description; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.fleetType = fleetType; + this.products = products; + this.applicationType = applicationType; + this.environmentType = environmentType; + this.groupType = groupType; + this.resourceSelectionType = resourceSelectionType; + this.ruleSelectionCriteria = ruleSelectionCriteria; + this.notificationPreferences = notificationPreferences; + this.resources = resources; + this.properties = properties; + this.credentials = credentials; + this.isTargetAutoConfirm = isTargetAutoConfirm; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Type of the Fleet. + * PRODUCT - A fleet of product-specific resources for a product type. + * ENVIRONMENT - A fleet of environment-specific resources for a product stack. + * GROUP - A fleet of a fleet of either environment or product fleets. + * GENERIC - A fleet of resources selected dynamically or manually for reporting purposes + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetType") + private FleetType fleetType; + + /** + * Type of the Fleet. + * PRODUCT - A fleet of product-specific resources for a product type. + * ENVIRONMENT - A fleet of environment-specific resources for a product stack. + * GROUP - A fleet of a fleet of either environment or product fleets. + * GENERIC - A fleet of resources selected dynamically or manually for reporting purposes + * + * @param fleetType the value to set + * @return this builder + **/ + public Builder fleetType(FleetType fleetType) { + this.fleetType = fleetType; + this.__explicitlySet__.add("fleetType"); + return this; + } + /** + * Products associated with the Fleet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("products") + private java.util.List products; + + /** + * Products associated with the Fleet. + * @param products the value to set + * @return this builder + **/ + public Builder products(java.util.List products) { + this.products = products; + this.__explicitlySet__.add("products"); + return this; + } + /** + * Product stack associated with the Fleet. + * Applicable for ENVIRONMENT fleet types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationType") + private String applicationType; + + /** + * Product stack associated with the Fleet. + * Applicable for ENVIRONMENT fleet types. + * + * @param applicationType the value to set + * @return this builder + **/ + public Builder applicationType(String applicationType) { + this.applicationType = applicationType; + this.__explicitlySet__.add("applicationType"); + return this; + } + /** + * Environment Type associated with the Fleet. + * Applicable for ENVIRONMENT fleet types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("environmentType") + private String environmentType; + + /** + * Environment Type associated with the Fleet. + * Applicable for ENVIRONMENT fleet types. + * + * @param environmentType the value to set + * @return this builder + **/ + public Builder environmentType(String environmentType) { + this.environmentType = environmentType; + this.__explicitlySet__.add("environmentType"); + return this; + } + /** + * Group Type associated with Group Fleet. + * Applicable for GROUP fleet types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupType") + private GroupType groupType; + + /** + * Group Type associated with Group Fleet. + * Applicable for GROUP fleet types. + * + * @param groupType the value to set + * @return this builder + **/ + public Builder groupType(GroupType groupType) { + this.groupType = groupType; + this.__explicitlySet__.add("groupType"); + return this; + } + /** + * Type of resource selection in a Fleet. + * Select resources manually or select resources based on rules. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceSelectionType") + private ResourceSelectionType resourceSelectionType; + + /** + * Type of resource selection in a Fleet. + * Select resources manually or select resources based on rules. + * + * @param resourceSelectionType the value to set + * @return this builder + **/ + public Builder resourceSelectionType(ResourceSelectionType resourceSelectionType) { + this.resourceSelectionType = resourceSelectionType; + this.__explicitlySet__.add("resourceSelectionType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("ruleSelectionCriteria") + private SelectionCriteria ruleSelectionCriteria; + + public Builder ruleSelectionCriteria(SelectionCriteria ruleSelectionCriteria) { + this.ruleSelectionCriteria = ruleSelectionCriteria; + this.__explicitlySet__.add("ruleSelectionCriteria"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("notificationPreferences") + private NotificationPreferences notificationPreferences; + + public Builder notificationPreferences(NotificationPreferences notificationPreferences) { + this.notificationPreferences = notificationPreferences; + this.__explicitlySet__.add("notificationPreferences"); + return this; + } + /** + * Resources associated with the Fleet if resourceSelectionType is MANUAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * Resources associated with the Fleet if resourceSelectionType is MANUAL. + * @param resources the value to set + * @return this builder + **/ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** + * Properties associated with the Fleet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("properties") + private java.util.List properties; + + /** + * Properties associated with the Fleet. + * @param properties the value to set + * @return this builder + **/ + public Builder properties(java.util.List properties) { + this.properties = properties; + this.__explicitlySet__.add("properties"); + return this; + } + /** + * Credentials associated with the Fleet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("credentials") + private java.util.List credentials; + + /** + * Credentials associated with the Fleet. + * @param credentials the value to set + * @return this builder + **/ + public Builder credentials(java.util.List credentials) { + this.credentials = credentials; + this.__explicitlySet__.add("credentials"); + return this; + } + /** + * A value that represents if auto-confirming of the targets can be enabled. + * This will allow targets to be auto-confirmed in the fleet without manual intervention. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isTargetAutoConfirm") + private Boolean isTargetAutoConfirm; + + /** + * A value that represents if auto-confirming of the targets can be enabled. + * This will allow targets to be auto-confirmed in the fleet without manual intervention. + * + * @param isTargetAutoConfirm the value to set + * @return this builder + **/ + public Builder isTargetAutoConfirm(Boolean isTargetAutoConfirm) { + this.isTargetAutoConfirm = isTargetAutoConfirm; + this.__explicitlySet__.add("isTargetAutoConfirm"); + return this; + } + /** + * The lifecycle state of the Fleet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The lifecycle state of the Fleet. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Fleet build() { + Fleet model = + new Fleet( + this.id, + this.compartmentId, + this.resourceRegion, + this.displayName, + this.description, + this.timeCreated, + this.timeUpdated, + this.fleetType, + this.products, + this.applicationType, + this.environmentType, + this.groupType, + this.resourceSelectionType, + this.ruleSelectionCriteria, + this.notificationPreferences, + this.resources, + this.properties, + this.credentials, + this.isTargetAutoConfirm, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Fleet model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("fleetType")) { + this.fleetType(model.getFleetType()); + } + if (model.wasPropertyExplicitlySet("products")) { + this.products(model.getProducts()); + } + if (model.wasPropertyExplicitlySet("applicationType")) { + this.applicationType(model.getApplicationType()); + } + if (model.wasPropertyExplicitlySet("environmentType")) { + this.environmentType(model.getEnvironmentType()); + } + if (model.wasPropertyExplicitlySet("groupType")) { + this.groupType(model.getGroupType()); + } + if (model.wasPropertyExplicitlySet("resourceSelectionType")) { + this.resourceSelectionType(model.getResourceSelectionType()); + } + if (model.wasPropertyExplicitlySet("ruleSelectionCriteria")) { + this.ruleSelectionCriteria(model.getRuleSelectionCriteria()); + } + if (model.wasPropertyExplicitlySet("notificationPreferences")) { + this.notificationPreferences(model.getNotificationPreferences()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("properties")) { + this.properties(model.getProperties()); + } + if (model.wasPropertyExplicitlySet("credentials")) { + this.credentials(model.getCredentials()); + } + if (model.wasPropertyExplicitlySet("isTargetAutoConfirm")) { + this.isTargetAutoConfirm(model.getIsTargetAutoConfirm()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Type of the Fleet. + * PRODUCT - A fleet of product-specific resources for a product type. + * ENVIRONMENT - A fleet of environment-specific resources for a product stack. + * GROUP - A fleet of a fleet of either environment or product fleets. + * GENERIC - A fleet of resources selected dynamically or manually for reporting purposes + * + **/ + public enum FleetType { + Product("PRODUCT"), + Environment("ENVIRONMENT"), + Generic("GENERIC"), + Group("GROUP"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(FleetType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (FleetType v : FleetType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + FleetType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static FleetType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'FleetType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Type of the Fleet. + * PRODUCT - A fleet of product-specific resources for a product type. + * ENVIRONMENT - A fleet of environment-specific resources for a product stack. + * GROUP - A fleet of a fleet of either environment or product fleets. + * GENERIC - A fleet of resources selected dynamically or manually for reporting purposes + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetType") + private final FleetType fleetType; + + /** + * Type of the Fleet. + * PRODUCT - A fleet of product-specific resources for a product type. + * ENVIRONMENT - A fleet of environment-specific resources for a product stack. + * GROUP - A fleet of a fleet of either environment or product fleets. + * GENERIC - A fleet of resources selected dynamically or manually for reporting purposes + * + * @return the value + **/ + public FleetType getFleetType() { + return fleetType; + } + + /** + * Products associated with the Fleet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("products") + private final java.util.List products; + + /** + * Products associated with the Fleet. + * @return the value + **/ + public java.util.List getProducts() { + return products; + } + + /** + * Product stack associated with the Fleet. + * Applicable for ENVIRONMENT fleet types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationType") + private final String applicationType; + + /** + * Product stack associated with the Fleet. + * Applicable for ENVIRONMENT fleet types. + * + * @return the value + **/ + public String getApplicationType() { + return applicationType; + } + + /** + * Environment Type associated with the Fleet. + * Applicable for ENVIRONMENT fleet types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("environmentType") + private final String environmentType; + + /** + * Environment Type associated with the Fleet. + * Applicable for ENVIRONMENT fleet types. + * + * @return the value + **/ + public String getEnvironmentType() { + return environmentType; + } + + /** + * Group Type associated with Group Fleet. + * Applicable for GROUP fleet types. + * + **/ + public enum GroupType { + Environment("ENVIRONMENT"), + Product("PRODUCT"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GroupType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (GroupType v : GroupType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + GroupType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static GroupType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'GroupType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Group Type associated with Group Fleet. + * Applicable for GROUP fleet types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupType") + private final GroupType groupType; + + /** + * Group Type associated with Group Fleet. + * Applicable for GROUP fleet types. + * + * @return the value + **/ + public GroupType getGroupType() { + return groupType; + } + + /** + * Type of resource selection in a Fleet. + * Select resources manually or select resources based on rules. + * + **/ + public enum ResourceSelectionType { + Dynamic("DYNAMIC"), + Manual("MANUAL"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ResourceSelectionType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ResourceSelectionType v : ResourceSelectionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ResourceSelectionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ResourceSelectionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ResourceSelectionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Type of resource selection in a Fleet. + * Select resources manually or select resources based on rules. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceSelectionType") + private final ResourceSelectionType resourceSelectionType; + + /** + * Type of resource selection in a Fleet. + * Select resources manually or select resources based on rules. + * + * @return the value + **/ + public ResourceSelectionType getResourceSelectionType() { + return resourceSelectionType; + } + + @com.fasterxml.jackson.annotation.JsonProperty("ruleSelectionCriteria") + private final SelectionCriteria ruleSelectionCriteria; + + public SelectionCriteria getRuleSelectionCriteria() { + return ruleSelectionCriteria; + } + + @com.fasterxml.jackson.annotation.JsonProperty("notificationPreferences") + private final NotificationPreferences notificationPreferences; + + public NotificationPreferences getNotificationPreferences() { + return notificationPreferences; + } + + /** + * Resources associated with the Fleet if resourceSelectionType is MANUAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * Resources associated with the Fleet if resourceSelectionType is MANUAL. + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + /** + * Properties associated with the Fleet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("properties") + private final java.util.List properties; + + /** + * Properties associated with the Fleet. + * @return the value + **/ + public java.util.List getProperties() { + return properties; + } + + /** + * Credentials associated with the Fleet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("credentials") + private final java.util.List credentials; + + /** + * Credentials associated with the Fleet. + * @return the value + **/ + public java.util.List getCredentials() { + return credentials; + } + + /** + * A value that represents if auto-confirming of the targets can be enabled. + * This will allow targets to be auto-confirmed in the fleet without manual intervention. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isTargetAutoConfirm") + private final Boolean isTargetAutoConfirm; + + /** + * A value that represents if auto-confirming of the targets can be enabled. + * This will allow targets to be auto-confirmed in the fleet without manual intervention. + * + * @return the value + **/ + public Boolean getIsTargetAutoConfirm() { + return isTargetAutoConfirm; + } + + /** + * The lifecycle state of the Fleet. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Inactive("INACTIVE"), + Creating("CREATING"), + Deleted("DELETED"), + Deleting("DELETING"), + Failed("FAILED"), + Updating("UPDATING"), + NeedsAttention("NEEDS_ATTENTION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The lifecycle state of the Fleet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The lifecycle state of the Fleet. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Fleet("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", fleetType=").append(String.valueOf(this.fleetType)); + sb.append(", products=").append(String.valueOf(this.products)); + sb.append(", applicationType=").append(String.valueOf(this.applicationType)); + sb.append(", environmentType=").append(String.valueOf(this.environmentType)); + sb.append(", groupType=").append(String.valueOf(this.groupType)); + sb.append(", resourceSelectionType=").append(String.valueOf(this.resourceSelectionType)); + sb.append(", ruleSelectionCriteria=").append(String.valueOf(this.ruleSelectionCriteria)); + sb.append(", notificationPreferences=") + .append(String.valueOf(this.notificationPreferences)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", properties=").append(String.valueOf(this.properties)); + sb.append(", credentials=").append(String.valueOf(this.credentials)); + sb.append(", isTargetAutoConfirm=").append(String.valueOf(this.isTargetAutoConfirm)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Fleet)) { + return false; + } + + Fleet other = (Fleet) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.fleetType, other.fleetType) + && java.util.Objects.equals(this.products, other.products) + && java.util.Objects.equals(this.applicationType, other.applicationType) + && java.util.Objects.equals(this.environmentType, other.environmentType) + && java.util.Objects.equals(this.groupType, other.groupType) + && java.util.Objects.equals(this.resourceSelectionType, other.resourceSelectionType) + && java.util.Objects.equals(this.ruleSelectionCriteria, other.ruleSelectionCriteria) + && java.util.Objects.equals( + this.notificationPreferences, other.notificationPreferences) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.properties, other.properties) + && java.util.Objects.equals(this.credentials, other.credentials) + && java.util.Objects.equals(this.isTargetAutoConfirm, other.isTargetAutoConfirm) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.fleetType == null ? 43 : this.fleetType.hashCode()); + result = (result * PRIME) + (this.products == null ? 43 : this.products.hashCode()); + result = + (result * PRIME) + + (this.applicationType == null ? 43 : this.applicationType.hashCode()); + result = + (result * PRIME) + + (this.environmentType == null ? 43 : this.environmentType.hashCode()); + result = (result * PRIME) + (this.groupType == null ? 43 : this.groupType.hashCode()); + result = + (result * PRIME) + + (this.resourceSelectionType == null + ? 43 + : this.resourceSelectionType.hashCode()); + result = + (result * PRIME) + + (this.ruleSelectionCriteria == null + ? 43 + : this.ruleSelectionCriteria.hashCode()); + result = + (result * PRIME) + + (this.notificationPreferences == null + ? 43 + : this.notificationPreferences.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = (result * PRIME) + (this.properties == null ? 43 : this.properties.hashCode()); + result = (result * PRIME) + (this.credentials == null ? 43 : this.credentials.hashCode()); + result = + (result * PRIME) + + (this.isTargetAutoConfirm == null + ? 43 + : this.isTargetAutoConfirm.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetCollection.java new file mode 100644 index 00000000000..00870f83916 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetCollection.java @@ -0,0 +1,132 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a fleet search. Contains both FleetSummary items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = FleetCollection.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FleetCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public FleetCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of fleets. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of fleets. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FleetCollection build() { + FleetCollection model = new FleetCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FleetCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of fleets. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of fleets. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("FleetCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FleetCollection)) { + return false; + } + + FleetCollection other = (FleetCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetCredential.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetCredential.java new file mode 100644 index 00000000000..4f8f2b1bb1e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetCredential.java @@ -0,0 +1,577 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Credential in Fleet Application Management. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = FleetCredential.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FleetCredential extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "compartmentId", + "timeCreated", + "timeUpdated", + "entitySpecifics", + "user", + "password", + "lifecycleState", + "lifecycleDetails", + "systemTags" + }) + public FleetCredential( + String id, + String displayName, + String compartmentId, + java.util.Date timeCreated, + java.util.Date timeUpdated, + CredentialEntitySpecificDetails entitySpecifics, + CredentialDetails user, + CredentialDetails password, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.compartmentId = compartmentId; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.entitySpecifics = entitySpecifics; + this.user = user; + this.password = password; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The unique id of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The unique id of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("entitySpecifics") + private CredentialEntitySpecificDetails entitySpecifics; + + public Builder entitySpecifics(CredentialEntitySpecificDetails entitySpecifics) { + this.entitySpecifics = entitySpecifics; + this.__explicitlySet__.add("entitySpecifics"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("user") + private CredentialDetails user; + + public Builder user(CredentialDetails user) { + this.user = user; + this.__explicitlySet__.add("user"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("password") + private CredentialDetails password; + + public Builder password(CredentialDetails password) { + this.password = password; + this.__explicitlySet__.add("password"); + return this; + } + /** + * The current state of the FleetCredential. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the FleetCredential. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FleetCredential build() { + FleetCredential model = + new FleetCredential( + this.id, + this.displayName, + this.compartmentId, + this.timeCreated, + this.timeUpdated, + this.entitySpecifics, + this.user, + this.password, + this.lifecycleState, + this.lifecycleDetails, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FleetCredential model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("entitySpecifics")) { + this.entitySpecifics(model.getEntitySpecifics()); + } + if (model.wasPropertyExplicitlySet("user")) { + this.user(model.getUser()); + } + if (model.wasPropertyExplicitlySet("password")) { + this.password(model.getPassword()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The unique id of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The unique id of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("entitySpecifics") + private final CredentialEntitySpecificDetails entitySpecifics; + + public CredentialEntitySpecificDetails getEntitySpecifics() { + return entitySpecifics; + } + + @com.fasterxml.jackson.annotation.JsonProperty("user") + private final CredentialDetails user; + + public CredentialDetails getUser() { + return user; + } + + @com.fasterxml.jackson.annotation.JsonProperty("password") + private final CredentialDetails password; + + public CredentialDetails getPassword() { + return password; + } + + /** + * The current state of the FleetCredential. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the FleetCredential. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the FleetCredential. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("FleetCredential("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", entitySpecifics=").append(String.valueOf(this.entitySpecifics)); + sb.append(", user=").append(String.valueOf(this.user)); + sb.append(", password=").append(String.valueOf(this.password)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FleetCredential)) { + return false; + } + + FleetCredential other = (FleetCredential) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.entitySpecifics, other.entitySpecifics) + && java.util.Objects.equals(this.user, other.user) + && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.entitySpecifics == null ? 43 : this.entitySpecifics.hashCode()); + result = (result * PRIME) + (this.user == null ? 43 : this.user.hashCode()); + result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetCredentialCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetCredentialCollection.java new file mode 100644 index 00000000000..7e7fd5a77f9 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetCredentialCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a fleetCredential search. Contains boh FleetCredentialSummary items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = FleetCredentialCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FleetCredentialCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public FleetCredentialCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of fleetCredentials. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of fleetCredentials. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FleetCredentialCollection build() { + FleetCredentialCollection model = new FleetCredentialCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FleetCredentialCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of fleetCredentials. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of fleetCredentials. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("FleetCredentialCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FleetCredentialCollection)) { + return false; + } + + FleetCredentialCollection other = (FleetCredentialCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetCredentialEntitySpecificDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetCredentialEntitySpecificDetails.java new file mode 100644 index 00000000000..b37dff593a1 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetCredentialEntitySpecificDetails.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Fleet credential details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = FleetCredentialEntitySpecificDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "credentialLevel" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FleetCredentialEntitySpecificDetails extends CredentialEntitySpecificDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of fleet credential variables. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("variables") + private java.util.List variables; + + /** + * List of fleet credential variables. + * @param variables the value to set + * @return this builder + **/ + public Builder variables(java.util.List variables) { + this.variables = variables; + this.__explicitlySet__.add("variables"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FleetCredentialEntitySpecificDetails build() { + FleetCredentialEntitySpecificDetails model = + new FleetCredentialEntitySpecificDetails(this.variables); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FleetCredentialEntitySpecificDetails model) { + if (model.wasPropertyExplicitlySet("variables")) { + this.variables(model.getVariables()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public FleetCredentialEntitySpecificDetails(java.util.List variables) { + super(); + this.variables = variables; + } + + /** + * List of fleet credential variables. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("variables") + private final java.util.List variables; + + /** + * List of fleet credential variables. + * @return the value + **/ + public java.util.List getVariables() { + return variables; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("FleetCredentialEntitySpecificDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", variables=").append(String.valueOf(this.variables)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FleetCredentialEntitySpecificDetails)) { + return false; + } + + FleetCredentialEntitySpecificDetails other = (FleetCredentialEntitySpecificDetails) o; + return java.util.Objects.equals(this.variables, other.variables) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.variables == null ? 43 : this.variables.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetCredentialSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetCredentialSummary.java new file mode 100644 index 00000000000..9f1e450299d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetCredentialSummary.java @@ -0,0 +1,531 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Summary of the FleetCredential. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = FleetCredentialSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FleetCredentialSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "compartmentId", + "timeCreated", + "timeUpdated", + "entitySpecifics", + "user", + "password", + "lifecycleState", + "lifecycleDetails", + "systemTags" + }) + public FleetCredentialSummary( + String id, + String displayName, + String compartmentId, + java.util.Date timeCreated, + java.util.Date timeUpdated, + CredentialEntitySpecificDetails entitySpecifics, + CredentialDetails user, + CredentialDetails password, + FleetCredential.LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.compartmentId = compartmentId; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.entitySpecifics = entitySpecifics; + this.user = user; + this.password = password; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The unique id of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The unique id of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("entitySpecifics") + private CredentialEntitySpecificDetails entitySpecifics; + + public Builder entitySpecifics(CredentialEntitySpecificDetails entitySpecifics) { + this.entitySpecifics = entitySpecifics; + this.__explicitlySet__.add("entitySpecifics"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("user") + private CredentialDetails user; + + public Builder user(CredentialDetails user) { + this.user = user; + this.__explicitlySet__.add("user"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("password") + private CredentialDetails password; + + public Builder password(CredentialDetails password) { + this.password = password; + this.__explicitlySet__.add("password"); + return this; + } + /** + * The current state of the FleetCredential. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private FleetCredential.LifecycleState lifecycleState; + + /** + * The current state of the FleetCredential. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(FleetCredential.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FleetCredentialSummary build() { + FleetCredentialSummary model = + new FleetCredentialSummary( + this.id, + this.displayName, + this.compartmentId, + this.timeCreated, + this.timeUpdated, + this.entitySpecifics, + this.user, + this.password, + this.lifecycleState, + this.lifecycleDetails, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FleetCredentialSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("entitySpecifics")) { + this.entitySpecifics(model.getEntitySpecifics()); + } + if (model.wasPropertyExplicitlySet("user")) { + this.user(model.getUser()); + } + if (model.wasPropertyExplicitlySet("password")) { + this.password(model.getPassword()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The unique id of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The unique id of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("entitySpecifics") + private final CredentialEntitySpecificDetails entitySpecifics; + + public CredentialEntitySpecificDetails getEntitySpecifics() { + return entitySpecifics; + } + + @com.fasterxml.jackson.annotation.JsonProperty("user") + private final CredentialDetails user; + + public CredentialDetails getUser() { + return user; + } + + @com.fasterxml.jackson.annotation.JsonProperty("password") + private final CredentialDetails password; + + public CredentialDetails getPassword() { + return password; + } + + /** + * The current state of the FleetCredential. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final FleetCredential.LifecycleState lifecycleState; + + /** + * The current state of the FleetCredential. + * @return the value + **/ + public FleetCredential.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("FleetCredentialSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", entitySpecifics=").append(String.valueOf(this.entitySpecifics)); + sb.append(", user=").append(String.valueOf(this.user)); + sb.append(", password=").append(String.valueOf(this.password)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FleetCredentialSummary)) { + return false; + } + + FleetCredentialSummary other = (FleetCredentialSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.entitySpecifics, other.entitySpecifics) + && java.util.Objects.equals(this.user, other.user) + && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.entitySpecifics == null ? 43 : this.entitySpecifics.hashCode()); + result = (result * PRIME) + (this.user == null ? 43 : this.user.hashCode()); + result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetProductCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetProductCollection.java new file mode 100644 index 00000000000..b168fd97c29 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetProductCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a fleetProduct search. Contains boh FleetProductSummary items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = FleetProductCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FleetProductCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public FleetProductCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of fleetProducts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of fleetProducts. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FleetProductCollection build() { + FleetProductCollection model = new FleetProductCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FleetProductCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of fleetProducts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of fleetProducts. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("FleetProductCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FleetProductCollection)) { + return false; + } + + FleetProductCollection other = (FleetProductCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetProductSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetProductSummary.java new file mode 100644 index 00000000000..9b2dd29274b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetProductSummary.java @@ -0,0 +1,312 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Summary of a product associated with a Fleet. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = FleetProductSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FleetProductSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "displayName", + "targetCount", + "resource", + "systemTags" + }) + public FleetProductSummary( + String compartmentId, + String displayName, + Integer targetCount, + TargetResource resource, + java.util.Map> systemTags) { + super(); + this.compartmentId = compartmentId; + this.displayName = displayName; + this.targetCount = targetCount; + this.resource = resource; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Root Compartment Id. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Root Compartment Id. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Count of the targets associated with the Product. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetCount") + private Integer targetCount; + + /** + * Count of the targets associated with the Product. + * @param targetCount the value to set + * @return this builder + **/ + public Builder targetCount(Integer targetCount) { + this.targetCount = targetCount; + this.__explicitlySet__.add("targetCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resource") + private TargetResource resource; + + public Builder resource(TargetResource resource) { + this.resource = resource; + this.__explicitlySet__.add("resource"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FleetProductSummary build() { + FleetProductSummary model = + new FleetProductSummary( + this.compartmentId, + this.displayName, + this.targetCount, + this.resource, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FleetProductSummary model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("targetCount")) { + this.targetCount(model.getTargetCount()); + } + if (model.wasPropertyExplicitlySet("resource")) { + this.resource(model.getResource()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Root Compartment Id. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Root Compartment Id. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Count of the targets associated with the Product. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetCount") + private final Integer targetCount; + + /** + * Count of the targets associated with the Product. + * @return the value + **/ + public Integer getTargetCount() { + return targetCount; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resource") + private final TargetResource resource; + + public TargetResource getResource() { + return resource; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("FleetProductSummary("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", targetCount=").append(String.valueOf(this.targetCount)); + sb.append(", resource=").append(String.valueOf(this.resource)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FleetProductSummary)) { + return false; + } + + FleetProductSummary other = (FleetProductSummary) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.targetCount, other.targetCount) + && java.util.Objects.equals(this.resource, other.resource) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.targetCount == null ? 43 : this.targetCount.hashCode()); + result = (result * PRIME) + (this.resource == null ? 43 : this.resource.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetProperty.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetProperty.java new file mode 100644 index 00000000000..0dc16c9a9b2 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetProperty.java @@ -0,0 +1,659 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Property to manage fleet metadata details in\u00A0Fleet Application Management. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = FleetProperty.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FleetProperty extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "timeCreated", + "timeUpdated", + "value", + "propertyId", + "selectionType", + "valueType", + "allowedValues", + "lifecycleState", + "systemTags" + }) + public FleetProperty( + String id, + String compartmentId, + String displayName, + java.util.Date timeCreated, + java.util.Date timeUpdated, + String value, + String propertyId, + Selection selectionType, + ValueType valueType, + java.util.List allowedValues, + LifecycleState lifecycleState, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.value = value; + this.propertyId = propertyId; + this.selectionType = selectionType; + this.valueType = valueType; + this.allowedValues = allowedValues; + this.lifecycleState = lifecycleState; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The unique id of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The unique id of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Value of the Property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + /** + * Value of the Property. + * @param value the value to set + * @return this builder + **/ + public Builder value(String value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + /** + * OCID referring to global level metadata property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("propertyId") + private String propertyId; + + /** + * OCID referring to global level metadata property. + * @param propertyId the value to set + * @return this builder + **/ + public Builder propertyId(String propertyId) { + this.propertyId = propertyId; + this.__explicitlySet__.add("propertyId"); + return this; + } + /** + * Text selection of the property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selectionType") + private Selection selectionType; + + /** + * Text selection of the property. + * @param selectionType the value to set + * @return this builder + **/ + public Builder selectionType(Selection selectionType) { + this.selectionType = selectionType; + this.__explicitlySet__.add("selectionType"); + return this; + } + /** + * Format of the value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("valueType") + private ValueType valueType; + + /** + * Format of the value. + * @param valueType the value to set + * @return this builder + **/ + public Builder valueType(ValueType valueType) { + this.valueType = valueType; + this.__explicitlySet__.add("valueType"); + return this; + } + /** + * Values of the property (must be a single value if selectionType = 'SINGLE_CHOICE'). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("allowedValues") + private java.util.List allowedValues; + + /** + * Values of the property (must be a single value if selectionType = 'SINGLE_CHOICE'). + * @param allowedValues the value to set + * @return this builder + **/ + public Builder allowedValues(java.util.List allowedValues) { + this.allowedValues = allowedValues; + this.__explicitlySet__.add("allowedValues"); + return this; + } + /** + * The current state of the FleetProperty. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the FleetProperty. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FleetProperty build() { + FleetProperty model = + new FleetProperty( + this.id, + this.compartmentId, + this.displayName, + this.timeCreated, + this.timeUpdated, + this.value, + this.propertyId, + this.selectionType, + this.valueType, + this.allowedValues, + this.lifecycleState, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FleetProperty model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + if (model.wasPropertyExplicitlySet("propertyId")) { + this.propertyId(model.getPropertyId()); + } + if (model.wasPropertyExplicitlySet("selectionType")) { + this.selectionType(model.getSelectionType()); + } + if (model.wasPropertyExplicitlySet("valueType")) { + this.valueType(model.getValueType()); + } + if (model.wasPropertyExplicitlySet("allowedValues")) { + this.allowedValues(model.getAllowedValues()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The unique id of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The unique id of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Value of the Property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final String value; + + /** + * Value of the Property. + * @return the value + **/ + public String getValue() { + return value; + } + + /** + * OCID referring to global level metadata property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("propertyId") + private final String propertyId; + + /** + * OCID referring to global level metadata property. + * @return the value + **/ + public String getPropertyId() { + return propertyId; + } + + /** + * Text selection of the property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selectionType") + private final Selection selectionType; + + /** + * Text selection of the property. + * @return the value + **/ + public Selection getSelectionType() { + return selectionType; + } + + /** + * Format of the value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("valueType") + private final ValueType valueType; + + /** + * Format of the value. + * @return the value + **/ + public ValueType getValueType() { + return valueType; + } + + /** + * Values of the property (must be a single value if selectionType = 'SINGLE_CHOICE'). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("allowedValues") + private final java.util.List allowedValues; + + /** + * Values of the property (must be a single value if selectionType = 'SINGLE_CHOICE'). + * @return the value + **/ + public java.util.List getAllowedValues() { + return allowedValues; + } + + /** + * The current state of the FleetProperty. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the FleetProperty. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the FleetProperty. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("FleetProperty("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", value=").append(String.valueOf(this.value)); + sb.append(", propertyId=").append(String.valueOf(this.propertyId)); + sb.append(", selectionType=").append(String.valueOf(this.selectionType)); + sb.append(", valueType=").append(String.valueOf(this.valueType)); + sb.append(", allowedValues=").append(String.valueOf(this.allowedValues)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FleetProperty)) { + return false; + } + + FleetProperty other = (FleetProperty) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.value, other.value) + && java.util.Objects.equals(this.propertyId, other.propertyId) + && java.util.Objects.equals(this.selectionType, other.selectionType) + && java.util.Objects.equals(this.valueType, other.valueType) + && java.util.Objects.equals(this.allowedValues, other.allowedValues) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + result = (result * PRIME) + (this.propertyId == null ? 43 : this.propertyId.hashCode()); + result = + (result * PRIME) + + (this.selectionType == null ? 43 : this.selectionType.hashCode()); + result = (result * PRIME) + (this.valueType == null ? 43 : this.valueType.hashCode()); + result = + (result * PRIME) + + (this.allowedValues == null ? 43 : this.allowedValues.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetPropertyCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetPropertyCollection.java new file mode 100644 index 00000000000..b0cf23772e6 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetPropertyCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a fleetProperty search. Contains both FleetPropertySummary items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = FleetPropertyCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FleetPropertyCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public FleetPropertyCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of fleet properties in Fleet Application Management. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of fleet properties in Fleet Application Management. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FleetPropertyCollection build() { + FleetPropertyCollection model = new FleetPropertyCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FleetPropertyCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of fleet properties in Fleet Application Management. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of fleet properties in Fleet Application Management. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("FleetPropertyCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FleetPropertyCollection)) { + return false; + } + + FleetPropertyCollection other = (FleetPropertyCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetPropertySummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetPropertySummary.java new file mode 100644 index 00000000000..1b8af99aecc --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetPropertySummary.java @@ -0,0 +1,528 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Summary of the FleetProperty. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = FleetPropertySummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FleetPropertySummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "propertyId", + "displayName", + "timeCreated", + "timeUpdated", + "value", + "valueType", + "lifecycleState", + "systemTags" + }) + public FleetPropertySummary( + String id, + String compartmentId, + String propertyId, + String displayName, + java.util.Date timeCreated, + java.util.Date timeUpdated, + String value, + ValueType valueType, + FleetProperty.LifecycleState lifecycleState, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.propertyId = propertyId; + this.displayName = displayName; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.value = value; + this.valueType = valueType; + this.lifecycleState = lifecycleState; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The unique id of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The unique id of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * OCID referring to global level metadata property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("propertyId") + private String propertyId; + + /** + * OCID referring to global level metadata property. + * @param propertyId the value to set + * @return this builder + **/ + public Builder propertyId(String propertyId) { + this.propertyId = propertyId; + this.__explicitlySet__.add("propertyId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Value of the Property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + /** + * Value of the Property. + * @param value the value to set + * @return this builder + **/ + public Builder value(String value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + /** + * Format of the value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("valueType") + private ValueType valueType; + + /** + * Format of the value. + * @param valueType the value to set + * @return this builder + **/ + public Builder valueType(ValueType valueType) { + this.valueType = valueType; + this.__explicitlySet__.add("valueType"); + return this; + } + /** + * The current state of the FleetProperty. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private FleetProperty.LifecycleState lifecycleState; + + /** + * The current state of the FleetProperty. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(FleetProperty.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FleetPropertySummary build() { + FleetPropertySummary model = + new FleetPropertySummary( + this.id, + this.compartmentId, + this.propertyId, + this.displayName, + this.timeCreated, + this.timeUpdated, + this.value, + this.valueType, + this.lifecycleState, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FleetPropertySummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("propertyId")) { + this.propertyId(model.getPropertyId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + if (model.wasPropertyExplicitlySet("valueType")) { + this.valueType(model.getValueType()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The unique id of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The unique id of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * OCID referring to global level metadata property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("propertyId") + private final String propertyId; + + /** + * OCID referring to global level metadata property. + * @return the value + **/ + public String getPropertyId() { + return propertyId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Value of the Property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final String value; + + /** + * Value of the Property. + * @return the value + **/ + public String getValue() { + return value; + } + + /** + * Format of the value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("valueType") + private final ValueType valueType; + + /** + * Format of the value. + * @return the value + **/ + public ValueType getValueType() { + return valueType; + } + + /** + * The current state of the FleetProperty. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final FleetProperty.LifecycleState lifecycleState; + + /** + * The current state of the FleetProperty. + * @return the value + **/ + public FleetProperty.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("FleetPropertySummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", propertyId=").append(String.valueOf(this.propertyId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", value=").append(String.valueOf(this.value)); + sb.append(", valueType=").append(String.valueOf(this.valueType)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FleetPropertySummary)) { + return false; + } + + FleetPropertySummary other = (FleetPropertySummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.propertyId, other.propertyId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.value, other.value) + && java.util.Objects.equals(this.valueType, other.valueType) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.propertyId == null ? 43 : this.propertyId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + result = (result * PRIME) + (this.valueType == null ? 43 : this.valueType.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetResource.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetResource.java new file mode 100644 index 00000000000..7067a62c5ae --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetResource.java @@ -0,0 +1,1010 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Resource added to a fleet in Fleet Application Management. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = FleetResource.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FleetResource extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "tenancyId", + "resourceRegion", + "timeCreated", + "timeUpdated", + "compartmentId", + "displayName", + "resourceId", + "compartment", + "complianceState", + "tenancyName", + "resourceType", + "productCount", + "targetCount", + "product", + "applicationType", + "environmentType", + "lifecycleState", + "lifecycleDetails", + "systemTags" + }) + public FleetResource( + String id, + String tenancyId, + String resourceRegion, + java.util.Date timeCreated, + java.util.Date timeUpdated, + String compartmentId, + String displayName, + String resourceId, + String compartment, + ComplianceState complianceState, + String tenancyName, + String resourceType, + Integer productCount, + Integer targetCount, + String product, + String applicationType, + String environmentType, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map> systemTags) { + super(); + this.id = id; + this.tenancyId = tenancyId; + this.resourceRegion = resourceRegion; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.resourceId = resourceId; + this.compartment = compartment; + this.complianceState = complianceState; + this.tenancyName = tenancyName; + this.resourceType = resourceType; + this.productCount = productCount; + this.targetCount = targetCount; + this.product = product; + this.applicationType = applicationType; + this.environmentType = environmentType; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The unique id of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The unique id of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * OCID of the tenancy to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private String tenancyId; + + /** + * OCID of the tenancy to which the resource belongs to. + * @param tenancyId the value to set + * @return this builder + **/ + public Builder tenancyId(String tenancyId) { + this.tenancyId = tenancyId; + this.__explicitlySet__.add("tenancyId"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * The OCID of the resource. + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * Resource Compartment name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartment") + private String compartment; + + /** + * Resource Compartment name. + * @param compartment the value to set + * @return this builder + **/ + public Builder compartment(String compartment) { + this.compartment = compartment; + this.__explicitlySet__.add("compartment"); + return this; + } + /** + * Compliance State of the Resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private ComplianceState complianceState; + + /** + * Compliance State of the Resource. + * @param complianceState the value to set + * @return this builder + **/ + public Builder complianceState(ComplianceState complianceState) { + this.complianceState = complianceState; + this.__explicitlySet__.add("complianceState"); + return this; + } + /** + * Resource Tenancy Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyName") + private String tenancyName; + + /** + * Resource Tenancy Name. + * @param tenancyName the value to set + * @return this builder + **/ + public Builder tenancyName(String tenancyName) { + this.tenancyName = tenancyName; + this.__explicitlySet__.add("tenancyName"); + return this; + } + /** + * Type of the Resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private String resourceType; + + /** + * Type of the Resource. + * @param resourceType the value to set + * @return this builder + **/ + public Builder resourceType(String resourceType) { + this.resourceType = resourceType; + this.__explicitlySet__.add("resourceType"); + return this; + } + /** + * Count of products within the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productCount") + private Integer productCount; + + /** + * Count of products within the resource. + * @param productCount the value to set + * @return this builder + **/ + public Builder productCount(Integer productCount) { + this.productCount = productCount; + this.__explicitlySet__.add("productCount"); + return this; + } + /** + * Count of targets within the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetCount") + private Integer targetCount; + + /** + * Count of targets within the resource. + * @param targetCount the value to set + * @return this builder + **/ + public Builder targetCount(Integer targetCount) { + this.targetCount = targetCount; + this.__explicitlySet__.add("targetCount"); + return this; + } + /** + * Product associated with the resource when the resource type is fleet. + * Will only be returned for PRODUCT fleets that are part of a GROUP Fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("product") + private String product; + + /** + * Product associated with the resource when the resource type is fleet. + * Will only be returned for PRODUCT fleets that are part of a GROUP Fleet. + * + * @param product the value to set + * @return this builder + **/ + public Builder product(String product) { + this.product = product; + this.__explicitlySet__.add("product"); + return this; + } + /** + * Application Type associated with the resource when the resource type is fleet. + * Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationType") + private String applicationType; + + /** + * Application Type associated with the resource when the resource type is fleet. + * Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + * + * @param applicationType the value to set + * @return this builder + **/ + public Builder applicationType(String applicationType) { + this.applicationType = applicationType; + this.__explicitlySet__.add("applicationType"); + return this; + } + /** + * Environment Type associated with the Fleet when the resource type is fleet. + * Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("environmentType") + private String environmentType; + + /** + * Environment Type associated with the Fleet when the resource type is fleet. + * Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + * + * @param environmentType the value to set + * @return this builder + **/ + public Builder environmentType(String environmentType) { + this.environmentType = environmentType; + this.__explicitlySet__.add("environmentType"); + return this; + } + /** + * The current state of the FleetResource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the FleetResource. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FleetResource build() { + FleetResource model = + new FleetResource( + this.id, + this.tenancyId, + this.resourceRegion, + this.timeCreated, + this.timeUpdated, + this.compartmentId, + this.displayName, + this.resourceId, + this.compartment, + this.complianceState, + this.tenancyName, + this.resourceType, + this.productCount, + this.targetCount, + this.product, + this.applicationType, + this.environmentType, + this.lifecycleState, + this.lifecycleDetails, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FleetResource model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("tenancyId")) { + this.tenancyId(model.getTenancyId()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("compartment")) { + this.compartment(model.getCompartment()); + } + if (model.wasPropertyExplicitlySet("complianceState")) { + this.complianceState(model.getComplianceState()); + } + if (model.wasPropertyExplicitlySet("tenancyName")) { + this.tenancyName(model.getTenancyName()); + } + if (model.wasPropertyExplicitlySet("resourceType")) { + this.resourceType(model.getResourceType()); + } + if (model.wasPropertyExplicitlySet("productCount")) { + this.productCount(model.getProductCount()); + } + if (model.wasPropertyExplicitlySet("targetCount")) { + this.targetCount(model.getTargetCount()); + } + if (model.wasPropertyExplicitlySet("product")) { + this.product(model.getProduct()); + } + if (model.wasPropertyExplicitlySet("applicationType")) { + this.applicationType(model.getApplicationType()); + } + if (model.wasPropertyExplicitlySet("environmentType")) { + this.environmentType(model.getEnvironmentType()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The unique id of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The unique id of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * OCID of the tenancy to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private final String tenancyId; + + /** + * OCID of the tenancy to which the resource belongs to. + * @return the value + **/ + public String getTenancyId() { + return tenancyId; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * Resource Compartment name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartment") + private final String compartment; + + /** + * Resource Compartment name. + * @return the value + **/ + public String getCompartment() { + return compartment; + } + + /** + * Compliance State of the Resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private final ComplianceState complianceState; + + /** + * Compliance State of the Resource. + * @return the value + **/ + public ComplianceState getComplianceState() { + return complianceState; + } + + /** + * Resource Tenancy Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyName") + private final String tenancyName; + + /** + * Resource Tenancy Name. + * @return the value + **/ + public String getTenancyName() { + return tenancyName; + } + + /** + * Type of the Resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private final String resourceType; + + /** + * Type of the Resource. + * @return the value + **/ + public String getResourceType() { + return resourceType; + } + + /** + * Count of products within the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productCount") + private final Integer productCount; + + /** + * Count of products within the resource. + * @return the value + **/ + public Integer getProductCount() { + return productCount; + } + + /** + * Count of targets within the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetCount") + private final Integer targetCount; + + /** + * Count of targets within the resource. + * @return the value + **/ + public Integer getTargetCount() { + return targetCount; + } + + /** + * Product associated with the resource when the resource type is fleet. + * Will only be returned for PRODUCT fleets that are part of a GROUP Fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("product") + private final String product; + + /** + * Product associated with the resource when the resource type is fleet. + * Will only be returned for PRODUCT fleets that are part of a GROUP Fleet. + * + * @return the value + **/ + public String getProduct() { + return product; + } + + /** + * Application Type associated with the resource when the resource type is fleet. + * Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationType") + private final String applicationType; + + /** + * Application Type associated with the resource when the resource type is fleet. + * Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + * + * @return the value + **/ + public String getApplicationType() { + return applicationType; + } + + /** + * Environment Type associated with the Fleet when the resource type is fleet. + * Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("environmentType") + private final String environmentType; + + /** + * Environment Type associated with the Fleet when the resource type is fleet. + * Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + * + * @return the value + **/ + public String getEnvironmentType() { + return environmentType; + } + + /** + * The current state of the FleetResource. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Deleted("DELETED"), + Failed("FAILED"), + NeedsAttention("NEEDS_ATTENTION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the FleetResource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the FleetResource. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("FleetResource("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", tenancyId=").append(String.valueOf(this.tenancyId)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", compartment=").append(String.valueOf(this.compartment)); + sb.append(", complianceState=").append(String.valueOf(this.complianceState)); + sb.append(", tenancyName=").append(String.valueOf(this.tenancyName)); + sb.append(", resourceType=").append(String.valueOf(this.resourceType)); + sb.append(", productCount=").append(String.valueOf(this.productCount)); + sb.append(", targetCount=").append(String.valueOf(this.targetCount)); + sb.append(", product=").append(String.valueOf(this.product)); + sb.append(", applicationType=").append(String.valueOf(this.applicationType)); + sb.append(", environmentType=").append(String.valueOf(this.environmentType)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FleetResource)) { + return false; + } + + FleetResource other = (FleetResource) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.tenancyId, other.tenancyId) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.compartment, other.compartment) + && java.util.Objects.equals(this.complianceState, other.complianceState) + && java.util.Objects.equals(this.tenancyName, other.tenancyName) + && java.util.Objects.equals(this.resourceType, other.resourceType) + && java.util.Objects.equals(this.productCount, other.productCount) + && java.util.Objects.equals(this.targetCount, other.targetCount) + && java.util.Objects.equals(this.product, other.product) + && java.util.Objects.equals(this.applicationType, other.applicationType) + && java.util.Objects.equals(this.environmentType, other.environmentType) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.tenancyId == null ? 43 : this.tenancyId.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.compartment == null ? 43 : this.compartment.hashCode()); + result = + (result * PRIME) + + (this.complianceState == null ? 43 : this.complianceState.hashCode()); + result = (result * PRIME) + (this.tenancyName == null ? 43 : this.tenancyName.hashCode()); + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); + result = (result * PRIME) + (this.productCount == null ? 43 : this.productCount.hashCode()); + result = (result * PRIME) + (this.targetCount == null ? 43 : this.targetCount.hashCode()); + result = (result * PRIME) + (this.product == null ? 43 : this.product.hashCode()); + result = + (result * PRIME) + + (this.applicationType == null ? 43 : this.applicationType.hashCode()); + result = + (result * PRIME) + + (this.environmentType == null ? 43 : this.environmentType.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetResourceCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetResourceCollection.java new file mode 100644 index 00000000000..672379928ba --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetResourceCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a fleetResource search. Contains both FleetResourceSummary items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = FleetResourceCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FleetResourceCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public FleetResourceCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of fleetResources. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of fleetResources. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FleetResourceCollection build() { + FleetResourceCollection model = new FleetResourceCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FleetResourceCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of fleetResources. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of fleetResources. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("FleetResourceCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FleetResourceCollection)) { + return false; + } + + FleetResourceCollection other = (FleetResourceCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetResourceSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetResourceSummary.java new file mode 100644 index 00000000000..5b6caea50ec --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetResourceSummary.java @@ -0,0 +1,962 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Summary of the FleetResource. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = FleetResourceSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FleetResourceSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "tenancyId", + "resourceRegion", + "timeCreated", + "timeUpdated", + "compartmentId", + "displayName", + "resourceId", + "complianceState", + "tenancyName", + "compartment", + "resourceType", + "productCount", + "targetCount", + "product", + "applicationType", + "environmentType", + "lifecycleState", + "lifecycleDetails", + "systemTags" + }) + public FleetResourceSummary( + String id, + String tenancyId, + String resourceRegion, + java.util.Date timeCreated, + java.util.Date timeUpdated, + String compartmentId, + String displayName, + String resourceId, + ComplianceState complianceState, + String tenancyName, + String compartment, + String resourceType, + Integer productCount, + Integer targetCount, + String product, + String applicationType, + String environmentType, + FleetResource.LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map> systemTags) { + super(); + this.id = id; + this.tenancyId = tenancyId; + this.resourceRegion = resourceRegion; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.resourceId = resourceId; + this.complianceState = complianceState; + this.tenancyName = tenancyName; + this.compartment = compartment; + this.resourceType = resourceType; + this.productCount = productCount; + this.targetCount = targetCount; + this.product = product; + this.applicationType = applicationType; + this.environmentType = environmentType; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The unique id of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The unique id of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * OCID of the tenancy to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private String tenancyId; + + /** + * OCID of the tenancy to which the resource belongs to. + * @param tenancyId the value to set + * @return this builder + **/ + public Builder tenancyId(String tenancyId) { + this.tenancyId = tenancyId; + this.__explicitlySet__.add("tenancyId"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * The OCID of the resource. + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * Compliance State of the Resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private ComplianceState complianceState; + + /** + * Compliance State of the Resource. + * @param complianceState the value to set + * @return this builder + **/ + public Builder complianceState(ComplianceState complianceState) { + this.complianceState = complianceState; + this.__explicitlySet__.add("complianceState"); + return this; + } + /** + * Resource Tenancy Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyName") + private String tenancyName; + + /** + * Resource Tenancy Name. + * @param tenancyName the value to set + * @return this builder + **/ + public Builder tenancyName(String tenancyName) { + this.tenancyName = tenancyName; + this.__explicitlySet__.add("tenancyName"); + return this; + } + /** + * Resource Compartment name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartment") + private String compartment; + + /** + * Resource Compartment name. + * @param compartment the value to set + * @return this builder + **/ + public Builder compartment(String compartment) { + this.compartment = compartment; + this.__explicitlySet__.add("compartment"); + return this; + } + /** + * Type of the Resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private String resourceType; + + /** + * Type of the Resource. + * @param resourceType the value to set + * @return this builder + **/ + public Builder resourceType(String resourceType) { + this.resourceType = resourceType; + this.__explicitlySet__.add("resourceType"); + return this; + } + /** + * Count of products within the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productCount") + private Integer productCount; + + /** + * Count of products within the resource. + * @param productCount the value to set + * @return this builder + **/ + public Builder productCount(Integer productCount) { + this.productCount = productCount; + this.__explicitlySet__.add("productCount"); + return this; + } + /** + * Count of targets within the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetCount") + private Integer targetCount; + + /** + * Count of targets within the resource. + * @param targetCount the value to set + * @return this builder + **/ + public Builder targetCount(Integer targetCount) { + this.targetCount = targetCount; + this.__explicitlySet__.add("targetCount"); + return this; + } + /** + * Product associated with the resource when the resource type is fleet. + * Will only be returned for PRODUCT fleets that are part of a GROUP Fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("product") + private String product; + + /** + * Product associated with the resource when the resource type is fleet. + * Will only be returned for PRODUCT fleets that are part of a GROUP Fleet. + * + * @param product the value to set + * @return this builder + **/ + public Builder product(String product) { + this.product = product; + this.__explicitlySet__.add("product"); + return this; + } + /** + * Application Type associated with the resource when the resource type is fleet. + * Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationType") + private String applicationType; + + /** + * Application Type associated with the resource when the resource type is fleet. + * Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + * + * @param applicationType the value to set + * @return this builder + **/ + public Builder applicationType(String applicationType) { + this.applicationType = applicationType; + this.__explicitlySet__.add("applicationType"); + return this; + } + /** + * Environment Type associated with the Fleet when the resource type is fleet. + * Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("environmentType") + private String environmentType; + + /** + * Environment Type associated with the Fleet when the resource type is fleet. + * Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + * + * @param environmentType the value to set + * @return this builder + **/ + public Builder environmentType(String environmentType) { + this.environmentType = environmentType; + this.__explicitlySet__.add("environmentType"); + return this; + } + /** + * The current state of the FleetResource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private FleetResource.LifecycleState lifecycleState; + + /** + * The current state of the FleetResource. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(FleetResource.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FleetResourceSummary build() { + FleetResourceSummary model = + new FleetResourceSummary( + this.id, + this.tenancyId, + this.resourceRegion, + this.timeCreated, + this.timeUpdated, + this.compartmentId, + this.displayName, + this.resourceId, + this.complianceState, + this.tenancyName, + this.compartment, + this.resourceType, + this.productCount, + this.targetCount, + this.product, + this.applicationType, + this.environmentType, + this.lifecycleState, + this.lifecycleDetails, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FleetResourceSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("tenancyId")) { + this.tenancyId(model.getTenancyId()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("complianceState")) { + this.complianceState(model.getComplianceState()); + } + if (model.wasPropertyExplicitlySet("tenancyName")) { + this.tenancyName(model.getTenancyName()); + } + if (model.wasPropertyExplicitlySet("compartment")) { + this.compartment(model.getCompartment()); + } + if (model.wasPropertyExplicitlySet("resourceType")) { + this.resourceType(model.getResourceType()); + } + if (model.wasPropertyExplicitlySet("productCount")) { + this.productCount(model.getProductCount()); + } + if (model.wasPropertyExplicitlySet("targetCount")) { + this.targetCount(model.getTargetCount()); + } + if (model.wasPropertyExplicitlySet("product")) { + this.product(model.getProduct()); + } + if (model.wasPropertyExplicitlySet("applicationType")) { + this.applicationType(model.getApplicationType()); + } + if (model.wasPropertyExplicitlySet("environmentType")) { + this.environmentType(model.getEnvironmentType()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The unique id of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The unique id of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * OCID of the tenancy to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private final String tenancyId; + + /** + * OCID of the tenancy to which the resource belongs to. + * @return the value + **/ + public String getTenancyId() { + return tenancyId; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * Compliance State of the Resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private final ComplianceState complianceState; + + /** + * Compliance State of the Resource. + * @return the value + **/ + public ComplianceState getComplianceState() { + return complianceState; + } + + /** + * Resource Tenancy Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyName") + private final String tenancyName; + + /** + * Resource Tenancy Name. + * @return the value + **/ + public String getTenancyName() { + return tenancyName; + } + + /** + * Resource Compartment name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartment") + private final String compartment; + + /** + * Resource Compartment name. + * @return the value + **/ + public String getCompartment() { + return compartment; + } + + /** + * Type of the Resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private final String resourceType; + + /** + * Type of the Resource. + * @return the value + **/ + public String getResourceType() { + return resourceType; + } + + /** + * Count of products within the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productCount") + private final Integer productCount; + + /** + * Count of products within the resource. + * @return the value + **/ + public Integer getProductCount() { + return productCount; + } + + /** + * Count of targets within the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetCount") + private final Integer targetCount; + + /** + * Count of targets within the resource. + * @return the value + **/ + public Integer getTargetCount() { + return targetCount; + } + + /** + * Product associated with the resource when the resource type is fleet. + * Will only be returned for PRODUCT fleets that are part of a GROUP Fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("product") + private final String product; + + /** + * Product associated with the resource when the resource type is fleet. + * Will only be returned for PRODUCT fleets that are part of a GROUP Fleet. + * + * @return the value + **/ + public String getProduct() { + return product; + } + + /** + * Application Type associated with the resource when the resource type is fleet. + * Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationType") + private final String applicationType; + + /** + * Application Type associated with the resource when the resource type is fleet. + * Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + * + * @return the value + **/ + public String getApplicationType() { + return applicationType; + } + + /** + * Environment Type associated with the Fleet when the resource type is fleet. + * Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("environmentType") + private final String environmentType; + + /** + * Environment Type associated with the Fleet when the resource type is fleet. + * Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + * + * @return the value + **/ + public String getEnvironmentType() { + return environmentType; + } + + /** + * The current state of the FleetResource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final FleetResource.LifecycleState lifecycleState; + + /** + * The current state of the FleetResource. + * @return the value + **/ + public FleetResource.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("FleetResourceSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", tenancyId=").append(String.valueOf(this.tenancyId)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", complianceState=").append(String.valueOf(this.complianceState)); + sb.append(", tenancyName=").append(String.valueOf(this.tenancyName)); + sb.append(", compartment=").append(String.valueOf(this.compartment)); + sb.append(", resourceType=").append(String.valueOf(this.resourceType)); + sb.append(", productCount=").append(String.valueOf(this.productCount)); + sb.append(", targetCount=").append(String.valueOf(this.targetCount)); + sb.append(", product=").append(String.valueOf(this.product)); + sb.append(", applicationType=").append(String.valueOf(this.applicationType)); + sb.append(", environmentType=").append(String.valueOf(this.environmentType)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FleetResourceSummary)) { + return false; + } + + FleetResourceSummary other = (FleetResourceSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.tenancyId, other.tenancyId) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.complianceState, other.complianceState) + && java.util.Objects.equals(this.tenancyName, other.tenancyName) + && java.util.Objects.equals(this.compartment, other.compartment) + && java.util.Objects.equals(this.resourceType, other.resourceType) + && java.util.Objects.equals(this.productCount, other.productCount) + && java.util.Objects.equals(this.targetCount, other.targetCount) + && java.util.Objects.equals(this.product, other.product) + && java.util.Objects.equals(this.applicationType, other.applicationType) + && java.util.Objects.equals(this.environmentType, other.environmentType) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.tenancyId == null ? 43 : this.tenancyId.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = + (result * PRIME) + + (this.complianceState == null ? 43 : this.complianceState.hashCode()); + result = (result * PRIME) + (this.tenancyName == null ? 43 : this.tenancyName.hashCode()); + result = (result * PRIME) + (this.compartment == null ? 43 : this.compartment.hashCode()); + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); + result = (result * PRIME) + (this.productCount == null ? 43 : this.productCount.hashCode()); + result = (result * PRIME) + (this.targetCount == null ? 43 : this.targetCount.hashCode()); + result = (result * PRIME) + (this.product == null ? 43 : this.product.hashCode()); + result = + (result * PRIME) + + (this.applicationType == null ? 43 : this.applicationType.hashCode()); + result = + (result * PRIME) + + (this.environmentType == null ? 43 : this.environmentType.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetSummary.java new file mode 100644 index 00000000000..3415eee1bc9 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetSummary.java @@ -0,0 +1,698 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Summary of a Fleet.A fleet is a collection or grouping of resources based on criteria. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = FleetSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FleetSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "resourceRegion", + "displayName", + "timeCreated", + "timeUpdated", + "fleetType", + "environmentType", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public FleetSummary( + String id, + String compartmentId, + String resourceRegion, + String displayName, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Fleet.FleetType fleetType, + String environmentType, + Fleet.LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.resourceRegion = resourceRegion; + this.displayName = displayName; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.fleetType = fleetType; + this.environmentType = environmentType; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Type of the Fleet. + * PRODUCT - A fleet of product-specific resources for a product type. + * ENVIRONMENT - A fleet of environment-specific resources for a product stack. + * GROUP - A fleet of a fleet of either environment or product fleets. + * GENERIC - A fleet of resources selected dynamically or manually for reporting purposes + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetType") + private Fleet.FleetType fleetType; + + /** + * Type of the Fleet. + * PRODUCT - A fleet of product-specific resources for a product type. + * ENVIRONMENT - A fleet of environment-specific resources for a product stack. + * GROUP - A fleet of a fleet of either environment or product fleets. + * GENERIC - A fleet of resources selected dynamically or manually for reporting purposes + * + * @param fleetType the value to set + * @return this builder + **/ + public Builder fleetType(Fleet.FleetType fleetType) { + this.fleetType = fleetType; + this.__explicitlySet__.add("fleetType"); + return this; + } + /** + * Environment Type associated with the Fleet. + * Applicable for ENVIRONMENT fleet types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("environmentType") + private String environmentType; + + /** + * Environment Type associated with the Fleet. + * Applicable for ENVIRONMENT fleet types. + * + * @param environmentType the value to set + * @return this builder + **/ + public Builder environmentType(String environmentType) { + this.environmentType = environmentType; + this.__explicitlySet__.add("environmentType"); + return this; + } + /** + * The lifecycle state of the Fleet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private Fleet.LifecycleState lifecycleState; + + /** + * The lifecycle state of the Fleet. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(Fleet.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FleetSummary build() { + FleetSummary model = + new FleetSummary( + this.id, + this.compartmentId, + this.resourceRegion, + this.displayName, + this.timeCreated, + this.timeUpdated, + this.fleetType, + this.environmentType, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FleetSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("fleetType")) { + this.fleetType(model.getFleetType()); + } + if (model.wasPropertyExplicitlySet("environmentType")) { + this.environmentType(model.getEnvironmentType()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Type of the Fleet. + * PRODUCT - A fleet of product-specific resources for a product type. + * ENVIRONMENT - A fleet of environment-specific resources for a product stack. + * GROUP - A fleet of a fleet of either environment or product fleets. + * GENERIC - A fleet of resources selected dynamically or manually for reporting purposes + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetType") + private final Fleet.FleetType fleetType; + + /** + * Type of the Fleet. + * PRODUCT - A fleet of product-specific resources for a product type. + * ENVIRONMENT - A fleet of environment-specific resources for a product stack. + * GROUP - A fleet of a fleet of either environment or product fleets. + * GENERIC - A fleet of resources selected dynamically or manually for reporting purposes + * + * @return the value + **/ + public Fleet.FleetType getFleetType() { + return fleetType; + } + + /** + * Environment Type associated with the Fleet. + * Applicable for ENVIRONMENT fleet types. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("environmentType") + private final String environmentType; + + /** + * Environment Type associated with the Fleet. + * Applicable for ENVIRONMENT fleet types. + * + * @return the value + **/ + public String getEnvironmentType() { + return environmentType; + } + + /** + * The lifecycle state of the Fleet. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final Fleet.LifecycleState lifecycleState; + + /** + * The lifecycle state of the Fleet. + * @return the value + **/ + public Fleet.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("FleetSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", fleetType=").append(String.valueOf(this.fleetType)); + sb.append(", environmentType=").append(String.valueOf(this.environmentType)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FleetSummary)) { + return false; + } + + FleetSummary other = (FleetSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.fleetType, other.fleetType) + && java.util.Objects.equals(this.environmentType, other.environmentType) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.fleetType == null ? 43 : this.fleetType.hashCode()); + result = + (result * PRIME) + + (this.environmentType == null ? 43 : this.environmentType.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetTarget.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetTarget.java new file mode 100644 index 00000000000..6e34c4befb1 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetTarget.java @@ -0,0 +1,689 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * A confirmed target within a fleet. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = FleetTarget.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FleetTarget extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "timeCreated", + "version", + "product", + "resource", + "complianceState", + "timeOfLastSuccessfulDiscovery", + "timeOfLastDiscoveryAttempt", + "isLastDiscoveryAttemptSuccessful", + "lifecycleState", + "systemTags" + }) + public FleetTarget( + String id, + String compartmentId, + String displayName, + java.util.Date timeCreated, + String version, + String product, + TargetResource resource, + ComplianceState complianceState, + java.util.Date timeOfLastSuccessfulDiscovery, + java.util.Date timeOfLastDiscoveryAttempt, + Boolean isLastDiscoveryAttemptSuccessful, + LifecycleState lifecycleState, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.timeCreated = timeCreated; + this.version = version; + this.product = product; + this.resource = resource; + this.complianceState = complianceState; + this.timeOfLastSuccessfulDiscovery = timeOfLastSuccessfulDiscovery; + this.timeOfLastDiscoveryAttempt = timeOfLastDiscoveryAttempt; + this.isLastDiscoveryAttemptSuccessful = isLastDiscoveryAttemptSuccessful; + this.lifecycleState = lifecycleState; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * Current version of target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * Current version of target. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + /** + * Product to which the target belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("product") + private String product; + + /** + * Product to which the target belongs to. + * @param product the value to set + * @return this builder + **/ + public Builder product(String product) { + this.product = product; + this.__explicitlySet__.add("product"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resource") + private TargetResource resource; + + public Builder resource(TargetResource resource) { + this.resource = resource; + this.__explicitlySet__.add("resource"); + return this; + } + /** + * The last known compliance state of the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private ComplianceState complianceState; + + /** + * The last known compliance state of the target. + * @param complianceState the value to set + * @return this builder + **/ + public Builder complianceState(ComplianceState complianceState) { + this.complianceState = complianceState; + this.__explicitlySet__.add("complianceState"); + return this; + } + /** + * The time when the last successful discovery was made. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeOfLastSuccessfulDiscovery") + private java.util.Date timeOfLastSuccessfulDiscovery; + + /** + * The time when the last successful discovery was made. + * @param timeOfLastSuccessfulDiscovery the value to set + * @return this builder + **/ + public Builder timeOfLastSuccessfulDiscovery(java.util.Date timeOfLastSuccessfulDiscovery) { + this.timeOfLastSuccessfulDiscovery = timeOfLastSuccessfulDiscovery; + this.__explicitlySet__.add("timeOfLastSuccessfulDiscovery"); + return this; + } + /** + * The time when last discovery was attempted. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeOfLastDiscoveryAttempt") + private java.util.Date timeOfLastDiscoveryAttempt; + + /** + * The time when last discovery was attempted. + * @param timeOfLastDiscoveryAttempt the value to set + * @return this builder + **/ + public Builder timeOfLastDiscoveryAttempt(java.util.Date timeOfLastDiscoveryAttempt) { + this.timeOfLastDiscoveryAttempt = timeOfLastDiscoveryAttempt; + this.__explicitlySet__.add("timeOfLastDiscoveryAttempt"); + return this; + } + /** + * A boolean flag that represents whether the last discovery attempt was successful. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isLastDiscoveryAttemptSuccessful") + private Boolean isLastDiscoveryAttemptSuccessful; + + /** + * A boolean flag that represents whether the last discovery attempt was successful. + * @param isLastDiscoveryAttemptSuccessful the value to set + * @return this builder + **/ + public Builder isLastDiscoveryAttemptSuccessful(Boolean isLastDiscoveryAttemptSuccessful) { + this.isLastDiscoveryAttemptSuccessful = isLastDiscoveryAttemptSuccessful; + this.__explicitlySet__.add("isLastDiscoveryAttemptSuccessful"); + return this; + } + /** + * The current state of the FleetTarget. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the FleetTarget. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FleetTarget build() { + FleetTarget model = + new FleetTarget( + this.id, + this.compartmentId, + this.displayName, + this.timeCreated, + this.version, + this.product, + this.resource, + this.complianceState, + this.timeOfLastSuccessfulDiscovery, + this.timeOfLastDiscoveryAttempt, + this.isLastDiscoveryAttemptSuccessful, + this.lifecycleState, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FleetTarget model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + if (model.wasPropertyExplicitlySet("product")) { + this.product(model.getProduct()); + } + if (model.wasPropertyExplicitlySet("resource")) { + this.resource(model.getResource()); + } + if (model.wasPropertyExplicitlySet("complianceState")) { + this.complianceState(model.getComplianceState()); + } + if (model.wasPropertyExplicitlySet("timeOfLastSuccessfulDiscovery")) { + this.timeOfLastSuccessfulDiscovery(model.getTimeOfLastSuccessfulDiscovery()); + } + if (model.wasPropertyExplicitlySet("timeOfLastDiscoveryAttempt")) { + this.timeOfLastDiscoveryAttempt(model.getTimeOfLastDiscoveryAttempt()); + } + if (model.wasPropertyExplicitlySet("isLastDiscoveryAttemptSuccessful")) { + this.isLastDiscoveryAttemptSuccessful(model.getIsLastDiscoveryAttemptSuccessful()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * Current version of target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * Current version of target. + * @return the value + **/ + public String getVersion() { + return version; + } + + /** + * Product to which the target belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("product") + private final String product; + + /** + * Product to which the target belongs to. + * @return the value + **/ + public String getProduct() { + return product; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resource") + private final TargetResource resource; + + public TargetResource getResource() { + return resource; + } + + /** + * The last known compliance state of the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private final ComplianceState complianceState; + + /** + * The last known compliance state of the target. + * @return the value + **/ + public ComplianceState getComplianceState() { + return complianceState; + } + + /** + * The time when the last successful discovery was made. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeOfLastSuccessfulDiscovery") + private final java.util.Date timeOfLastSuccessfulDiscovery; + + /** + * The time when the last successful discovery was made. + * @return the value + **/ + public java.util.Date getTimeOfLastSuccessfulDiscovery() { + return timeOfLastSuccessfulDiscovery; + } + + /** + * The time when last discovery was attempted. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeOfLastDiscoveryAttempt") + private final java.util.Date timeOfLastDiscoveryAttempt; + + /** + * The time when last discovery was attempted. + * @return the value + **/ + public java.util.Date getTimeOfLastDiscoveryAttempt() { + return timeOfLastDiscoveryAttempt; + } + + /** + * A boolean flag that represents whether the last discovery attempt was successful. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isLastDiscoveryAttemptSuccessful") + private final Boolean isLastDiscoveryAttemptSuccessful; + + /** + * A boolean flag that represents whether the last discovery attempt was successful. + * @return the value + **/ + public Boolean getIsLastDiscoveryAttemptSuccessful() { + return isLastDiscoveryAttemptSuccessful; + } + + /** + * The current state of the FleetTarget. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Deleted("DELETED"), + Failed("FAILED"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + map.put(v.getValue(), v); + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid LifecycleState: " + key); + } + }; + /** + * The current state of the FleetTarget. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the FleetTarget. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("FleetTarget("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(", product=").append(String.valueOf(this.product)); + sb.append(", resource=").append(String.valueOf(this.resource)); + sb.append(", complianceState=").append(String.valueOf(this.complianceState)); + sb.append(", timeOfLastSuccessfulDiscovery=") + .append(String.valueOf(this.timeOfLastSuccessfulDiscovery)); + sb.append(", timeOfLastDiscoveryAttempt=") + .append(String.valueOf(this.timeOfLastDiscoveryAttempt)); + sb.append(", isLastDiscoveryAttemptSuccessful=") + .append(String.valueOf(this.isLastDiscoveryAttemptSuccessful)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FleetTarget)) { + return false; + } + + FleetTarget other = (FleetTarget) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.version, other.version) + && java.util.Objects.equals(this.product, other.product) + && java.util.Objects.equals(this.resource, other.resource) + && java.util.Objects.equals(this.complianceState, other.complianceState) + && java.util.Objects.equals( + this.timeOfLastSuccessfulDiscovery, other.timeOfLastSuccessfulDiscovery) + && java.util.Objects.equals( + this.timeOfLastDiscoveryAttempt, other.timeOfLastDiscoveryAttempt) + && java.util.Objects.equals( + this.isLastDiscoveryAttemptSuccessful, + other.isLastDiscoveryAttemptSuccessful) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = (result * PRIME) + (this.product == null ? 43 : this.product.hashCode()); + result = (result * PRIME) + (this.resource == null ? 43 : this.resource.hashCode()); + result = + (result * PRIME) + + (this.complianceState == null ? 43 : this.complianceState.hashCode()); + result = + (result * PRIME) + + (this.timeOfLastSuccessfulDiscovery == null + ? 43 + : this.timeOfLastSuccessfulDiscovery.hashCode()); + result = + (result * PRIME) + + (this.timeOfLastDiscoveryAttempt == null + ? 43 + : this.timeOfLastDiscoveryAttempt.hashCode()); + result = + (result * PRIME) + + (this.isLastDiscoveryAttemptSuccessful == null + ? 43 + : this.isLastDiscoveryAttemptSuccessful.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetTargetCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetTargetCollection.java new file mode 100644 index 00000000000..a7e9ed4a133 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetTargetCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a fleetTarget search. Contains both FleetTargetSummary items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = FleetTargetCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FleetTargetCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public FleetTargetCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of fleetTargets. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of fleetTargets. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FleetTargetCollection build() { + FleetTargetCollection model = new FleetTargetCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FleetTargetCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of fleetTargets. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of fleetTargets. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("FleetTargetCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FleetTargetCollection)) { + return false; + } + + FleetTargetCollection other = (FleetTargetCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetTargetSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetTargetSummary.java new file mode 100644 index 00000000000..f778a42ba1b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/FleetTargetSummary.java @@ -0,0 +1,615 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Summary of a confirmed target within a fleet. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = FleetTargetSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FleetTargetSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "version", + "product", + "resource", + "complianceState", + "timeOfLastSuccessfulDiscovery", + "timeOfLastDiscoveryAttempt", + "isLastDiscoveryAttemptSuccessful", + "lifecycleState", + "systemTags" + }) + public FleetTargetSummary( + String id, + String compartmentId, + String displayName, + String version, + String product, + TargetResource resource, + ComplianceState complianceState, + java.util.Date timeOfLastSuccessfulDiscovery, + java.util.Date timeOfLastDiscoveryAttempt, + Boolean isLastDiscoveryAttemptSuccessful, + FleetTarget.LifecycleState lifecycleState, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.version = version; + this.product = product; + this.resource = resource; + this.complianceState = complianceState; + this.timeOfLastSuccessfulDiscovery = timeOfLastSuccessfulDiscovery; + this.timeOfLastDiscoveryAttempt = timeOfLastDiscoveryAttempt; + this.isLastDiscoveryAttemptSuccessful = isLastDiscoveryAttemptSuccessful; + this.lifecycleState = lifecycleState; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Current version of target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * Current version of target. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + /** + * Product to which the target belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("product") + private String product; + + /** + * Product to which the target belongs to. + * @param product the value to set + * @return this builder + **/ + public Builder product(String product) { + this.product = product; + this.__explicitlySet__.add("product"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resource") + private TargetResource resource; + + public Builder resource(TargetResource resource) { + this.resource = resource; + this.__explicitlySet__.add("resource"); + return this; + } + /** + * The last known compliance state of the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private ComplianceState complianceState; + + /** + * The last known compliance state of the target. + * @param complianceState the value to set + * @return this builder + **/ + public Builder complianceState(ComplianceState complianceState) { + this.complianceState = complianceState; + this.__explicitlySet__.add("complianceState"); + return this; + } + /** + * The time when the last successful discovery was made. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeOfLastSuccessfulDiscovery") + private java.util.Date timeOfLastSuccessfulDiscovery; + + /** + * The time when the last successful discovery was made. + * @param timeOfLastSuccessfulDiscovery the value to set + * @return this builder + **/ + public Builder timeOfLastSuccessfulDiscovery(java.util.Date timeOfLastSuccessfulDiscovery) { + this.timeOfLastSuccessfulDiscovery = timeOfLastSuccessfulDiscovery; + this.__explicitlySet__.add("timeOfLastSuccessfulDiscovery"); + return this; + } + /** + * The time when last discovery was attempted. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeOfLastDiscoveryAttempt") + private java.util.Date timeOfLastDiscoveryAttempt; + + /** + * The time when last discovery was attempted. + * @param timeOfLastDiscoveryAttempt the value to set + * @return this builder + **/ + public Builder timeOfLastDiscoveryAttempt(java.util.Date timeOfLastDiscoveryAttempt) { + this.timeOfLastDiscoveryAttempt = timeOfLastDiscoveryAttempt; + this.__explicitlySet__.add("timeOfLastDiscoveryAttempt"); + return this; + } + /** + * A boolean flag that represents whether the last discovery attempt was successful. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isLastDiscoveryAttemptSuccessful") + private Boolean isLastDiscoveryAttemptSuccessful; + + /** + * A boolean flag that represents whether the last discovery attempt was successful. + * @param isLastDiscoveryAttemptSuccessful the value to set + * @return this builder + **/ + public Builder isLastDiscoveryAttemptSuccessful(Boolean isLastDiscoveryAttemptSuccessful) { + this.isLastDiscoveryAttemptSuccessful = isLastDiscoveryAttemptSuccessful; + this.__explicitlySet__.add("isLastDiscoveryAttemptSuccessful"); + return this; + } + /** + * The current state of the FleetTarget. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private FleetTarget.LifecycleState lifecycleState; + + /** + * The current state of the FleetTarget. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(FleetTarget.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FleetTargetSummary build() { + FleetTargetSummary model = + new FleetTargetSummary( + this.id, + this.compartmentId, + this.displayName, + this.version, + this.product, + this.resource, + this.complianceState, + this.timeOfLastSuccessfulDiscovery, + this.timeOfLastDiscoveryAttempt, + this.isLastDiscoveryAttemptSuccessful, + this.lifecycleState, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FleetTargetSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + if (model.wasPropertyExplicitlySet("product")) { + this.product(model.getProduct()); + } + if (model.wasPropertyExplicitlySet("resource")) { + this.resource(model.getResource()); + } + if (model.wasPropertyExplicitlySet("complianceState")) { + this.complianceState(model.getComplianceState()); + } + if (model.wasPropertyExplicitlySet("timeOfLastSuccessfulDiscovery")) { + this.timeOfLastSuccessfulDiscovery(model.getTimeOfLastSuccessfulDiscovery()); + } + if (model.wasPropertyExplicitlySet("timeOfLastDiscoveryAttempt")) { + this.timeOfLastDiscoveryAttempt(model.getTimeOfLastDiscoveryAttempt()); + } + if (model.wasPropertyExplicitlySet("isLastDiscoveryAttemptSuccessful")) { + this.isLastDiscoveryAttemptSuccessful(model.getIsLastDiscoveryAttemptSuccessful()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Current version of target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * Current version of target. + * @return the value + **/ + public String getVersion() { + return version; + } + + /** + * Product to which the target belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("product") + private final String product; + + /** + * Product to which the target belongs to. + * @return the value + **/ + public String getProduct() { + return product; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resource") + private final TargetResource resource; + + public TargetResource getResource() { + return resource; + } + + /** + * The last known compliance state of the target. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("complianceState") + private final ComplianceState complianceState; + + /** + * The last known compliance state of the target. + * @return the value + **/ + public ComplianceState getComplianceState() { + return complianceState; + } + + /** + * The time when the last successful discovery was made. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeOfLastSuccessfulDiscovery") + private final java.util.Date timeOfLastSuccessfulDiscovery; + + /** + * The time when the last successful discovery was made. + * @return the value + **/ + public java.util.Date getTimeOfLastSuccessfulDiscovery() { + return timeOfLastSuccessfulDiscovery; + } + + /** + * The time when last discovery was attempted. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeOfLastDiscoveryAttempt") + private final java.util.Date timeOfLastDiscoveryAttempt; + + /** + * The time when last discovery was attempted. + * @return the value + **/ + public java.util.Date getTimeOfLastDiscoveryAttempt() { + return timeOfLastDiscoveryAttempt; + } + + /** + * A boolean flag that represents whether the last discovery attempt was successful. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isLastDiscoveryAttemptSuccessful") + private final Boolean isLastDiscoveryAttemptSuccessful; + + /** + * A boolean flag that represents whether the last discovery attempt was successful. + * @return the value + **/ + public Boolean getIsLastDiscoveryAttemptSuccessful() { + return isLastDiscoveryAttemptSuccessful; + } + + /** + * The current state of the FleetTarget. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final FleetTarget.LifecycleState lifecycleState; + + /** + * The current state of the FleetTarget. + * @return the value + **/ + public FleetTarget.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("FleetTargetSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(", product=").append(String.valueOf(this.product)); + sb.append(", resource=").append(String.valueOf(this.resource)); + sb.append(", complianceState=").append(String.valueOf(this.complianceState)); + sb.append(", timeOfLastSuccessfulDiscovery=") + .append(String.valueOf(this.timeOfLastSuccessfulDiscovery)); + sb.append(", timeOfLastDiscoveryAttempt=") + .append(String.valueOf(this.timeOfLastDiscoveryAttempt)); + sb.append(", isLastDiscoveryAttemptSuccessful=") + .append(String.valueOf(this.isLastDiscoveryAttemptSuccessful)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FleetTargetSummary)) { + return false; + } + + FleetTargetSummary other = (FleetTargetSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.version, other.version) + && java.util.Objects.equals(this.product, other.product) + && java.util.Objects.equals(this.resource, other.resource) + && java.util.Objects.equals(this.complianceState, other.complianceState) + && java.util.Objects.equals( + this.timeOfLastSuccessfulDiscovery, other.timeOfLastSuccessfulDiscovery) + && java.util.Objects.equals( + this.timeOfLastDiscoveryAttempt, other.timeOfLastDiscoveryAttempt) + && java.util.Objects.equals( + this.isLastDiscoveryAttemptSuccessful, + other.isLastDiscoveryAttemptSuccessful) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = (result * PRIME) + (this.product == null ? 43 : this.product.hashCode()); + result = (result * PRIME) + (this.resource == null ? 43 : this.resource.hashCode()); + result = + (result * PRIME) + + (this.complianceState == null ? 43 : this.complianceState.hashCode()); + result = + (result * PRIME) + + (this.timeOfLastSuccessfulDiscovery == null + ? 43 + : this.timeOfLastSuccessfulDiscovery.hashCode()); + result = + (result * PRIME) + + (this.timeOfLastDiscoveryAttempt == null + ? 43 + : this.timeOfLastDiscoveryAttempt.hashCode()); + result = + (result * PRIME) + + (this.isLastDiscoveryAttemptSuccessful == null + ? 43 + : this.isLastDiscoveryAttemptSuccessful.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/GenerateComplianceReportDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/GenerateComplianceReportDetails.java new file mode 100644 index 00000000000..aea06246ee8 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/GenerateComplianceReportDetails.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Request to generate compliance report for the fleet. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = GenerateComplianceReportDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class GenerateComplianceReportDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"areDetailsRequired"}) + public GenerateComplianceReportDetails(String areDetailsRequired) { + super(); + this.areDetailsRequired = areDetailsRequired; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A value that specifies if compliance details are required at the target level also? + * Allowed values are N and Y. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areDetailsRequired") + private String areDetailsRequired; + + /** + * A value that specifies if compliance details are required at the target level also? + * Allowed values are N and Y. + * + * @param areDetailsRequired the value to set + * @return this builder + **/ + public Builder areDetailsRequired(String areDetailsRequired) { + this.areDetailsRequired = areDetailsRequired; + this.__explicitlySet__.add("areDetailsRequired"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public GenerateComplianceReportDetails build() { + GenerateComplianceReportDetails model = + new GenerateComplianceReportDetails(this.areDetailsRequired); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(GenerateComplianceReportDetails model) { + if (model.wasPropertyExplicitlySet("areDetailsRequired")) { + this.areDetailsRequired(model.getAreDetailsRequired()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A value that specifies if compliance details are required at the target level also? + * Allowed values are N and Y. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areDetailsRequired") + private final String areDetailsRequired; + + /** + * A value that specifies if compliance details are required at the target level also? + * Allowed values are N and Y. + * + * @return the value + **/ + public String getAreDetailsRequired() { + return areDetailsRequired; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("GenerateComplianceReportDetails("); + sb.append("super=").append(super.toString()); + sb.append("areDetailsRequired=").append(String.valueOf(this.areDetailsRequired)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GenerateComplianceReportDetails)) { + return false; + } + + GenerateComplianceReportDetails other = (GenerateComplianceReportDetails) o; + return java.util.Objects.equals(this.areDetailsRequired, other.areDetailsRequired) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.areDetailsRequired == null + ? 43 + : this.areDetailsRequired.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/GenericArtifact.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/GenericArtifact.java new file mode 100644 index 00000000000..9224c4190cb --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/GenericArtifact.java @@ -0,0 +1,119 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Patch artifact metadata Details which is common for all platforms. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = GenericArtifact.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class GenericArtifact extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"content"}) + public GenericArtifact(ContentDetails content) { + super(); + this.content = content; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("content") + private ContentDetails content; + + public Builder content(ContentDetails content) { + this.content = content; + this.__explicitlySet__.add("content"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public GenericArtifact build() { + GenericArtifact model = new GenericArtifact(this.content); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(GenericArtifact model) { + if (model.wasPropertyExplicitlySet("content")) { + this.content(model.getContent()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("content") + private final ContentDetails content; + + public ContentDetails getContent() { + return content; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("GenericArtifact("); + sb.append("super=").append(super.toString()); + sb.append("content=").append(String.valueOf(this.content)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GenericArtifact)) { + return false; + } + + GenericArtifact other = (GenericArtifact) o; + return java.util.Objects.equals(this.content, other.content) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.content == null ? 43 : this.content.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/GenericArtifactDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/GenericArtifactDetails.java new file mode 100644 index 00000000000..f686cd85d0f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/GenericArtifactDetails.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Patch artifact description and content details if common for all platforms. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = GenericArtifactDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "category" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class GenericArtifactDetails extends ArtifactDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("artifact") + private GenericArtifact artifact; + + public Builder artifact(GenericArtifact artifact) { + this.artifact = artifact; + this.__explicitlySet__.add("artifact"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public GenericArtifactDetails build() { + GenericArtifactDetails model = new GenericArtifactDetails(this.artifact); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(GenericArtifactDetails model) { + if (model.wasPropertyExplicitlySet("artifact")) { + this.artifact(model.getArtifact()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public GenericArtifactDetails(GenericArtifact artifact) { + super(); + this.artifact = artifact; + } + + @com.fasterxml.jackson.annotation.JsonProperty("artifact") + private final GenericArtifact artifact; + + public GenericArtifact getArtifact() { + return artifact; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("GenericArtifactDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", artifact=").append(String.valueOf(this.artifact)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GenericArtifactDetails)) { + return false; + } + + GenericArtifactDetails other = (GenericArtifactDetails) o; + return java.util.Objects.equals(this.artifact, other.artifact) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.artifact == null ? 43 : this.artifact.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Group.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Group.java new file mode 100644 index 00000000000..7e3b28674e5 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Group.java @@ -0,0 +1,261 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The group of the runbook. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Group.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Group extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"type", "name", "properties"}) + public Group(Type type, String name, ComponentProperties properties) { + super(); + this.type = type; + this.name = name; + this.properties = properties; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The type of the group. + * PARALLEL_TASK_GROUP : Helps to execute tasks parallelly inside a resource. + * PARALLEL_RESOURCE_GROUP : Executes tasks across resources parallelly. + * ROLLING_RESOURCE_GROUP : Executes tasks across resources in a rolling order. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * The type of the group. + * PARALLEL_TASK_GROUP : Helps to execute tasks parallelly inside a resource. + * PARALLEL_RESOURCE_GROUP : Executes tasks across resources parallelly. + * ROLLING_RESOURCE_GROUP : Executes tasks across resources in a rolling order. + * + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * The name of the group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of the group. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("properties") + private ComponentProperties properties; + + public Builder properties(ComponentProperties properties) { + this.properties = properties; + this.__explicitlySet__.add("properties"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Group build() { + Group model = new Group(this.type, this.name, this.properties); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Group model) { + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("properties")) { + this.properties(model.getProperties()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The type of the group. + * PARALLEL_TASK_GROUP : Helps to execute tasks parallelly inside a resource. + * PARALLEL_RESOURCE_GROUP : Executes tasks across resources parallelly. + * ROLLING_RESOURCE_GROUP : Executes tasks across resources in a rolling order. + * + **/ + public enum Type { + ParallelTaskGroup("PARALLEL_TASK_GROUP"), + ParallelResourceGroup("PARALLEL_RESOURCE_GROUP"), + RollingResourceGroup("ROLLING_RESOURCE_GROUP"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * The type of the group. + * PARALLEL_TASK_GROUP : Helps to execute tasks parallelly inside a resource. + * PARALLEL_RESOURCE_GROUP : Executes tasks across resources parallelly. + * ROLLING_RESOURCE_GROUP : Executes tasks across resources in a rolling order. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * The type of the group. + * PARALLEL_TASK_GROUP : Helps to execute tasks parallelly inside a resource. + * PARALLEL_RESOURCE_GROUP : Executes tasks across resources parallelly. + * ROLLING_RESOURCE_GROUP : Executes tasks across resources in a rolling order. + * + * @return the value + **/ + public Type getType() { + return type; + } + + /** + * The name of the group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the group. + * @return the value + **/ + public String getName() { + return name; + } + + @com.fasterxml.jackson.annotation.JsonProperty("properties") + private final ComponentProperties properties; + + public ComponentProperties getProperties() { + return properties; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Group("); + sb.append("super=").append(super.toString()); + sb.append("type=").append(String.valueOf(this.type)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", properties=").append(String.valueOf(this.properties)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Group)) { + return false; + } + + Group other = (Group) o; + return java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.properties, other.properties) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.properties == null ? 43 : this.properties.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/InputArgument.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/InputArgument.java new file mode 100644 index 00000000000..5129903ffe5 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/InputArgument.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The details of the Input argument. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type", + defaultImpl = InputArgument.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = OutputVariableInputArgument.class, + name = "OUTPUT_VARIABLE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = StringInputArgument.class, + name = "STRING" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class InputArgument extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "description"}) + protected InputArgument(String name, String description) { + super(); + this.name = name; + this.description = description; + } + + /** + * The name of the argument. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the argument. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The description of the argument. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description of the argument. + * @return the value + **/ + public String getDescription() { + return description; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("InputArgument("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof InputArgument)) { + return false; + } + + InputArgument other = (InputArgument) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Input argument Type. + * + **/ + public enum Type { + String("STRING"), + OutputVariable("OUTPUT_VARIABLE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/InputParameter.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/InputParameter.java new file mode 100644 index 00000000000..6906c41fbba --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/InputParameter.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Input Parameters for the Task + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = InputParameter.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class InputParameter extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"stepName", "arguments"}) + public InputParameter(String stepName, java.util.List arguments) { + super(); + this.stepName = stepName; + this.arguments = arguments; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * stepName for which the input parameters are provided + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private String stepName; + + /** + * stepName for which the input parameters are provided + * @param stepName the value to set + * @return this builder + **/ + public Builder stepName(String stepName) { + this.stepName = stepName; + this.__explicitlySet__.add("stepName"); + return this; + } + /** + * Arguments for the Task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("arguments") + private java.util.List arguments; + + /** + * Arguments for the Task + * @param arguments the value to set + * @return this builder + **/ + public Builder arguments(java.util.List arguments) { + this.arguments = arguments; + this.__explicitlySet__.add("arguments"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public InputParameter build() { + InputParameter model = new InputParameter(this.stepName, this.arguments); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(InputParameter model) { + if (model.wasPropertyExplicitlySet("stepName")) { + this.stepName(model.getStepName()); + } + if (model.wasPropertyExplicitlySet("arguments")) { + this.arguments(model.getArguments()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * stepName for which the input parameters are provided + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private final String stepName; + + /** + * stepName for which the input parameters are provided + * @return the value + **/ + public String getStepName() { + return stepName; + } + + /** + * Arguments for the Task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("arguments") + private final java.util.List arguments; + + /** + * Arguments for the Task + * @return the value + **/ + public java.util.List getArguments() { + return arguments; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("InputParameter("); + sb.append("super=").append(super.toString()); + sb.append("stepName=").append(String.valueOf(this.stepName)); + sb.append(", arguments=").append(String.valueOf(this.arguments)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof InputParameter)) { + return false; + } + + InputParameter other = (InputParameter) o; + return java.util.Objects.equals(this.stepName, other.stepName) + && java.util.Objects.equals(this.arguments, other.arguments) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.stepName == null ? 43 : this.stepName.hashCode()); + result = (result * PRIME) + (this.arguments == null ? 43 : this.arguments.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/InventoryResourceCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/InventoryResourceCollection.java new file mode 100644 index 00000000000..78cdb975cf8 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/InventoryResourceCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a inventoryResource search. Contains both InventoryResourceSummary items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = InventoryResourceCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class InventoryResourceCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public InventoryResourceCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of InventoryResources. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of InventoryResources. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public InventoryResourceCollection build() { + InventoryResourceCollection model = new InventoryResourceCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(InventoryResourceCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of InventoryResources. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of InventoryResources. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("InventoryResourceCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof InventoryResourceCollection)) { + return false; + } + + InventoryResourceCollection other = (InventoryResourceCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/InventoryResourceSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/InventoryResourceSummary.java new file mode 100644 index 00000000000..de89d3b1ee0 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/InventoryResourceSummary.java @@ -0,0 +1,638 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * InventoryResource Search Summary. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = InventoryResourceSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class InventoryResourceSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "type", + "resourceCompartmentId", + "availabilityDomain", + "resourceRegion", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public InventoryResourceSummary( + String id, + String compartmentId, + String displayName, + String type, + String resourceCompartmentId, + String availabilityDomain, + String resourceRegion, + String lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.type = type; + this.resourceCompartmentId = resourceCompartmentId; + this.availabilityDomain = availabilityDomain; + this.resourceRegion = resourceRegion; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Type of the Resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private String type; + + /** + * Type of the Resource. + * @param type the value to set + * @return this builder + **/ + public Builder type(String type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * Compartment Id of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceCompartmentId") + private String resourceCompartmentId; + + /** + * Compartment Id of the resource. + * @param resourceCompartmentId the value to set + * @return this builder + **/ + public Builder resourceCompartmentId(String resourceCompartmentId) { + this.resourceCompartmentId = resourceCompartmentId; + this.__explicitlySet__.add("resourceCompartmentId"); + return this; + } + /** + * Availability Domain of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + /** + * Availability Domain of the resource. + * @param availabilityDomain the value to set + * @return this builder + **/ + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + /** + * The region the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * The region the resource belongs to. + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * The current state of the Resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private String lifecycleState; + + /** + * The current state of the Resource. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(String lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public InventoryResourceSummary build() { + InventoryResourceSummary model = + new InventoryResourceSummary( + this.id, + this.compartmentId, + this.displayName, + this.type, + this.resourceCompartmentId, + this.availabilityDomain, + this.resourceRegion, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(InventoryResourceSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("resourceCompartmentId")) { + this.resourceCompartmentId(model.getResourceCompartmentId()); + } + if (model.wasPropertyExplicitlySet("availabilityDomain")) { + this.availabilityDomain(model.getAvailabilityDomain()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Type of the Resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final String type; + + /** + * Type of the Resource. + * @return the value + **/ + public String getType() { + return type; + } + + /** + * Compartment Id of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceCompartmentId") + private final String resourceCompartmentId; + + /** + * Compartment Id of the resource. + * @return the value + **/ + public String getResourceCompartmentId() { + return resourceCompartmentId; + } + + /** + * Availability Domain of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private final String availabilityDomain; + + /** + * Availability Domain of the resource. + * @return the value + **/ + public String getAvailabilityDomain() { + return availabilityDomain; + } + + /** + * The region the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * The region the resource belongs to. + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * The current state of the Resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final String lifecycleState; + + /** + * The current state of the Resource. + * @return the value + **/ + public String getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("InventoryResourceSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", resourceCompartmentId=").append(String.valueOf(this.resourceCompartmentId)); + sb.append(", availabilityDomain=").append(String.valueOf(this.availabilityDomain)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof InventoryResourceSummary)) { + return false; + } + + InventoryResourceSummary other = (InventoryResourceSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.resourceCompartmentId, other.resourceCompartmentId) + && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.resourceCompartmentId == null + ? 43 + : this.resourceCompartmentId.hashCode()); + result = + (result * PRIME) + + (this.availabilityDomain == null + ? 43 + : this.availabilityDomain.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/JobActivity.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/JobActivity.java new file mode 100644 index 00000000000..8680a63642d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/JobActivity.java @@ -0,0 +1,441 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Activity details including status corresponding to an Action Group. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = JobActivity.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class JobActivity extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "status", + "timeStarted", + "timeEnded", + "runbookId", + "runbookName", + "description", + "resourceLevelExecutions" + }) + public JobActivity( + String id, + JobStatus status, + java.util.Date timeStarted, + java.util.Date timeEnded, + String runbookId, + String runbookName, + String description, + java.util.List resourceLevelExecutions) { + super(); + this.id = id; + this.status = status; + this.timeStarted = timeStarted; + this.timeEnded = timeEnded; + this.runbookId = runbookId; + this.runbookName = runbookName; + this.description = description; + this.resourceLevelExecutions = resourceLevelExecutions; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique activity id at the action group level. + * In most cases, this would be a generated ActionGroupId. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique activity id at the action group level. + * In most cases, this would be a generated ActionGroupId. + * + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Status of the Job at Action Group Level. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private JobStatus status; + + /** + * Status of the Job at Action Group Level. + * @param status the value to set + * @return this builder + **/ + public Builder status(JobStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The time the execution for the Action Group started. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The time the execution for the Action Group started. An RFC3339 formatted datetime string. + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The time the execution for the Action Group ended. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + private java.util.Date timeEnded; + + /** + * The time the execution for the Action Group ended. An RFC3339 formatted datetime string + * @param timeEnded the value to set + * @return this builder + **/ + public Builder timeEnded(java.util.Date timeEnded) { + this.timeEnded = timeEnded; + this.__explicitlySet__.add("timeEnded"); + return this; + } + /** + * OCID of the runbook associated with the Action Group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runbookId") + private String runbookId; + + /** + * OCID of the runbook associated with the Action Group. + * @param runbookId the value to set + * @return this builder + **/ + public Builder runbookId(String runbookId) { + this.runbookId = runbookId; + this.__explicitlySet__.add("runbookId"); + return this; + } + /** + * Name of the runbook associated with the Action Group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runbookName") + private String runbookName; + + /** + * Name of the runbook associated with the Action Group. + * @param runbookName the value to set + * @return this builder + **/ + public Builder runbookName(String runbookName) { + this.runbookName = runbookName; + this.__explicitlySet__.add("runbookName"); + return this; + } + /** + * A description of the Job Activity status. + * If there are any errors, this can also include a short error message. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A description of the Job Activity status. + * If there are any errors, this can also include a short error message. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * List of Resource executions associated with the Action Group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceLevelExecutions") + private java.util.List resourceLevelExecutions; + + /** + * List of Resource executions associated with the Action Group. + * @param resourceLevelExecutions the value to set + * @return this builder + **/ + public Builder resourceLevelExecutions( + java.util.List resourceLevelExecutions) { + this.resourceLevelExecutions = resourceLevelExecutions; + this.__explicitlySet__.add("resourceLevelExecutions"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public JobActivity build() { + JobActivity model = + new JobActivity( + this.id, + this.status, + this.timeStarted, + this.timeEnded, + this.runbookId, + this.runbookName, + this.description, + this.resourceLevelExecutions); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(JobActivity model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeEnded")) { + this.timeEnded(model.getTimeEnded()); + } + if (model.wasPropertyExplicitlySet("runbookId")) { + this.runbookId(model.getRunbookId()); + } + if (model.wasPropertyExplicitlySet("runbookName")) { + this.runbookName(model.getRunbookName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("resourceLevelExecutions")) { + this.resourceLevelExecutions(model.getResourceLevelExecutions()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique activity id at the action group level. + * In most cases, this would be a generated ActionGroupId. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique activity id at the action group level. + * In most cases, this would be a generated ActionGroupId. + * + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Status of the Job at Action Group Level. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final JobStatus status; + + /** + * Status of the Job at Action Group Level. + * @return the value + **/ + public JobStatus getStatus() { + return status; + } + + /** + * The time the execution for the Action Group started. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The time the execution for the Action Group started. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The time the execution for the Action Group ended. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + private final java.util.Date timeEnded; + + /** + * The time the execution for the Action Group ended. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeEnded() { + return timeEnded; + } + + /** + * OCID of the runbook associated with the Action Group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runbookId") + private final String runbookId; + + /** + * OCID of the runbook associated with the Action Group. + * @return the value + **/ + public String getRunbookId() { + return runbookId; + } + + /** + * Name of the runbook associated with the Action Group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runbookName") + private final String runbookName; + + /** + * Name of the runbook associated with the Action Group. + * @return the value + **/ + public String getRunbookName() { + return runbookName; + } + + /** + * A description of the Job Activity status. + * If there are any errors, this can also include a short error message. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A description of the Job Activity status. + * If there are any errors, this can also include a short error message. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * List of Resource executions associated with the Action Group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceLevelExecutions") + private final java.util.List resourceLevelExecutions; + + /** + * List of Resource executions associated with the Action Group. + * @return the value + **/ + public java.util.List getResourceLevelExecutions() { + return resourceLevelExecutions; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("JobActivity("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeEnded=").append(String.valueOf(this.timeEnded)); + sb.append(", runbookId=").append(String.valueOf(this.runbookId)); + sb.append(", runbookName=").append(String.valueOf(this.runbookName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", resourceLevelExecutions=") + .append(String.valueOf(this.resourceLevelExecutions)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof JobActivity)) { + return false; + } + + JobActivity other = (JobActivity) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeEnded, other.timeEnded) + && java.util.Objects.equals(this.runbookId, other.runbookId) + && java.util.Objects.equals(this.runbookName, other.runbookName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals( + this.resourceLevelExecutions, other.resourceLevelExecutions) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeEnded == null ? 43 : this.timeEnded.hashCode()); + result = (result * PRIME) + (this.runbookId == null ? 43 : this.runbookId.hashCode()); + result = (result * PRIME) + (this.runbookName == null ? 43 : this.runbookName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.resourceLevelExecutions == null + ? 43 + : this.resourceLevelExecutions.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/JobStatus.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/JobStatus.java new file mode 100644 index 00000000000..45d68f6effe --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/JobStatus.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Possible Job status. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public enum JobStatus { + Accepted("ACCEPTED"), + Waiting("WAITING"), + InProgress("IN_PROGRESS"), + Failed("FAILED"), + Succeeded("SUCCEEDED"), + Canceled("CANCELED"), + Skipped("SKIPPED"), + Ignored("IGNORED"), + NotApplicable("NOT_APPLICABLE"), + Aborted("ABORTED"), + TimedOut("TIMED_OUT"), + Paused("PAUSED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(JobStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (JobStatus v : JobStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + JobStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static JobStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'JobStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/KeyEncryptionCredentialDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/KeyEncryptionCredentialDetails.java new file mode 100644 index 00000000000..83001141cf3 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/KeyEncryptionCredentialDetails.java @@ -0,0 +1,252 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details for the Credentials that use key encryption. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = KeyEncryptionCredentialDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "credentialType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class KeyEncryptionCredentialDetails extends CredentialDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The value corresponding to the credential. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + /** + * The value corresponding to the credential. + * @param value the value to set + * @return this builder + **/ + public Builder value(String value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + /** + * OCID for the Vault Key that will be used to encrypt/decrypt the value given. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyId") + private String keyId; + + /** + * OCID for the Vault Key that will be used to encrypt/decrypt the value given. + * @param keyId the value to set + * @return this builder + **/ + public Builder keyId(String keyId) { + this.keyId = keyId; + this.__explicitlySet__.add("keyId"); + return this; + } + /** + * The Vault Key version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyVersion") + private String keyVersion; + + /** + * The Vault Key version. + * @param keyVersion the value to set + * @return this builder + **/ + public Builder keyVersion(String keyVersion) { + this.keyVersion = keyVersion; + this.__explicitlySet__.add("keyVersion"); + return this; + } + /** + * OCID for the Vault that will be used to fetch the key to encrypt/decrypt the value given. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private String vaultId; + + /** + * OCID for the Vault that will be used to fetch the key to encrypt/decrypt the value given. + * @param vaultId the value to set + * @return this builder + **/ + public Builder vaultId(String vaultId) { + this.vaultId = vaultId; + this.__explicitlySet__.add("vaultId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public KeyEncryptionCredentialDetails build() { + KeyEncryptionCredentialDetails model = + new KeyEncryptionCredentialDetails( + this.value, this.keyId, this.keyVersion, this.vaultId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(KeyEncryptionCredentialDetails model) { + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + if (model.wasPropertyExplicitlySet("keyId")) { + this.keyId(model.getKeyId()); + } + if (model.wasPropertyExplicitlySet("keyVersion")) { + this.keyVersion(model.getKeyVersion()); + } + if (model.wasPropertyExplicitlySet("vaultId")) { + this.vaultId(model.getVaultId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public KeyEncryptionCredentialDetails( + String value, String keyId, String keyVersion, String vaultId) { + super(); + this.value = value; + this.keyId = keyId; + this.keyVersion = keyVersion; + this.vaultId = vaultId; + } + + /** + * The value corresponding to the credential. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final String value; + + /** + * The value corresponding to the credential. + * @return the value + **/ + public String getValue() { + return value; + } + + /** + * OCID for the Vault Key that will be used to encrypt/decrypt the value given. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyId") + private final String keyId; + + /** + * OCID for the Vault Key that will be used to encrypt/decrypt the value given. + * @return the value + **/ + public String getKeyId() { + return keyId; + } + + /** + * The Vault Key version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyVersion") + private final String keyVersion; + + /** + * The Vault Key version. + * @return the value + **/ + public String getKeyVersion() { + return keyVersion; + } + + /** + * OCID for the Vault that will be used to fetch the key to encrypt/decrypt the value given. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultId") + private final String vaultId; + + /** + * OCID for the Vault that will be used to fetch the key to encrypt/decrypt the value given. + * @return the value + **/ + public String getVaultId() { + return vaultId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("KeyEncryptionCredentialDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", value=").append(String.valueOf(this.value)); + sb.append(", keyId=").append(String.valueOf(this.keyId)); + sb.append(", keyVersion=").append(String.valueOf(this.keyVersion)); + sb.append(", vaultId=").append(String.valueOf(this.vaultId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof KeyEncryptionCredentialDetails)) { + return false; + } + + KeyEncryptionCredentialDetails other = (KeyEncryptionCredentialDetails) o; + return java.util.Objects.equals(this.value, other.value) + && java.util.Objects.equals(this.keyId, other.keyId) + && java.util.Objects.equals(this.keyVersion, other.keyVersion) + && java.util.Objects.equals(this.vaultId, other.vaultId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + result = (result * PRIME) + (this.keyId == null ? 43 : this.keyId.hashCode()); + result = (result * PRIME) + (this.keyVersion == null ? 43 : this.keyVersion.hashCode()); + result = (result * PRIME) + (this.vaultId == null ? 43 : this.vaultId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/LifeCycleActionGroupType.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/LifeCycleActionGroupType.java new file mode 100644 index 00000000000..48845bcd021 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/LifeCycleActionGroupType.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Possible Action Group types. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public enum LifeCycleActionGroupType { + Product("PRODUCT"), + Environment("ENVIRONMENT"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifeCycleActionGroupType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifeCycleActionGroupType v : LifeCycleActionGroupType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifeCycleActionGroupType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifeCycleActionGroupType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifeCycleActionGroupType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/MaintenanceWindow.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/MaintenanceWindow.java new file mode 100644 index 00000000000..ff8f4e75d8b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/MaintenanceWindow.java @@ -0,0 +1,1007 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details of Maintenance Window in Fleet Application Management. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MaintenanceWindow.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MaintenanceWindow extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "resourceRegion", + "displayName", + "description", + "timeCreated", + "timeUpdated", + "maintenanceWindowType", + "isOutage", + "timeScheduleStart", + "duration", + "isRecurring", + "recurrences", + "taskInitiationCutoff", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public MaintenanceWindow( + String id, + String compartmentId, + String resourceRegion, + String displayName, + String description, + java.util.Date timeCreated, + java.util.Date timeUpdated, + MaintenanceWindowType maintenanceWindowType, + Boolean isOutage, + java.util.Date timeScheduleStart, + String duration, + Boolean isRecurring, + String recurrences, + Integer taskInitiationCutoff, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.resourceRegion = resourceRegion; + this.displayName = displayName; + this.description = description; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.maintenanceWindowType = maintenanceWindowType; + this.isOutage = isOutage; + this.timeScheduleStart = timeScheduleStart; + this.duration = duration; + this.isRecurring = isRecurring; + this.recurrences = recurrences; + this.taskInitiationCutoff = taskInitiationCutoff; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Type of the MaintenanceWindow. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceWindowType") + private MaintenanceWindowType maintenanceWindowType; + + /** + * Type of the MaintenanceWindow. + * @param maintenanceWindowType the value to set + * @return this builder + **/ + public Builder maintenanceWindowType(MaintenanceWindowType maintenanceWindowType) { + this.maintenanceWindowType = maintenanceWindowType; + this.__explicitlySet__.add("maintenanceWindowType"); + return this; + } + /** + * Does the maintenenace window cause outage? + * An outage indicates whether a maintenance window can consider operations that require downtime. + * It means a period when the application is not accessible. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isOutage") + private Boolean isOutage; + + /** + * Does the maintenenace window cause outage? + * An outage indicates whether a maintenance window can consider operations that require downtime. + * It means a period when the application is not accessible. + * + * @param isOutage the value to set + * @return this builder + **/ + public Builder isOutage(Boolean isOutage) { + this.isOutage = isOutage; + this.__explicitlySet__.add("isOutage"); + return this; + } + /** + * Specify the date and time of the day that the maintenance window starts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduleStart") + private java.util.Date timeScheduleStart; + + /** + * Specify the date and time of the day that the maintenance window starts. + * @param timeScheduleStart the value to set + * @return this builder + **/ + public Builder timeScheduleStart(java.util.Date timeScheduleStart) { + this.timeScheduleStart = timeScheduleStart; + this.__explicitlySet__.add("timeScheduleStart"); + return this; + } + /** + * Duration of the maintenance window. + * Specify how long the maintenance window remains open. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("duration") + private String duration; + + /** + * Duration of the maintenance window. + * Specify how long the maintenance window remains open. + * + * @param duration the value to set + * @return this builder + **/ + public Builder duration(String duration) { + this.duration = duration; + this.__explicitlySet__.add("duration"); + return this; + } + /** + * Is this a recurring maintenance window? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRecurring") + private Boolean isRecurring; + + /** + * Is this a recurring maintenance window? + * @param isRecurring the value to set + * @return this builder + **/ + public Builder isRecurring(Boolean isRecurring) { + this.isRecurring = isRecurring; + this.__explicitlySet__.add("isRecurring"); + return this; + } + /** + * Recurrence rule specification if maintenance window recurring. + * Specify the frequency of running the maintenance window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recurrences") + private String recurrences; + + /** + * Recurrence rule specification if maintenance window recurring. + * Specify the frequency of running the maintenance window. + * + * @param recurrences the value to set + * @return this builder + **/ + public Builder recurrences(String recurrences) { + this.recurrences = recurrences; + this.__explicitlySet__.add("recurrences"); + return this; + } + /** + * Task initiation cutoff time for the maintenance window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("taskInitiationCutoff") + private Integer taskInitiationCutoff; + + /** + * Task initiation cutoff time for the maintenance window. + * @param taskInitiationCutoff the value to set + * @return this builder + **/ + public Builder taskInitiationCutoff(Integer taskInitiationCutoff) { + this.taskInitiationCutoff = taskInitiationCutoff; + this.__explicitlySet__.add("taskInitiationCutoff"); + return this; + } + /** + * The current state of the MaintenanceWindow. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the MaintenanceWindow. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MaintenanceWindow build() { + MaintenanceWindow model = + new MaintenanceWindow( + this.id, + this.compartmentId, + this.resourceRegion, + this.displayName, + this.description, + this.timeCreated, + this.timeUpdated, + this.maintenanceWindowType, + this.isOutage, + this.timeScheduleStart, + this.duration, + this.isRecurring, + this.recurrences, + this.taskInitiationCutoff, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MaintenanceWindow model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("maintenanceWindowType")) { + this.maintenanceWindowType(model.getMaintenanceWindowType()); + } + if (model.wasPropertyExplicitlySet("isOutage")) { + this.isOutage(model.getIsOutage()); + } + if (model.wasPropertyExplicitlySet("timeScheduleStart")) { + this.timeScheduleStart(model.getTimeScheduleStart()); + } + if (model.wasPropertyExplicitlySet("duration")) { + this.duration(model.getDuration()); + } + if (model.wasPropertyExplicitlySet("isRecurring")) { + this.isRecurring(model.getIsRecurring()); + } + if (model.wasPropertyExplicitlySet("recurrences")) { + this.recurrences(model.getRecurrences()); + } + if (model.wasPropertyExplicitlySet("taskInitiationCutoff")) { + this.taskInitiationCutoff(model.getTaskInitiationCutoff()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Type of the MaintenanceWindow. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceWindowType") + private final MaintenanceWindowType maintenanceWindowType; + + /** + * Type of the MaintenanceWindow. + * @return the value + **/ + public MaintenanceWindowType getMaintenanceWindowType() { + return maintenanceWindowType; + } + + /** + * Does the maintenenace window cause outage? + * An outage indicates whether a maintenance window can consider operations that require downtime. + * It means a period when the application is not accessible. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isOutage") + private final Boolean isOutage; + + /** + * Does the maintenenace window cause outage? + * An outage indicates whether a maintenance window can consider operations that require downtime. + * It means a period when the application is not accessible. + * + * @return the value + **/ + public Boolean getIsOutage() { + return isOutage; + } + + /** + * Specify the date and time of the day that the maintenance window starts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduleStart") + private final java.util.Date timeScheduleStart; + + /** + * Specify the date and time of the day that the maintenance window starts. + * @return the value + **/ + public java.util.Date getTimeScheduleStart() { + return timeScheduleStart; + } + + /** + * Duration of the maintenance window. + * Specify how long the maintenance window remains open. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("duration") + private final String duration; + + /** + * Duration of the maintenance window. + * Specify how long the maintenance window remains open. + * + * @return the value + **/ + public String getDuration() { + return duration; + } + + /** + * Is this a recurring maintenance window? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRecurring") + private final Boolean isRecurring; + + /** + * Is this a recurring maintenance window? + * @return the value + **/ + public Boolean getIsRecurring() { + return isRecurring; + } + + /** + * Recurrence rule specification if maintenance window recurring. + * Specify the frequency of running the maintenance window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recurrences") + private final String recurrences; + + /** + * Recurrence rule specification if maintenance window recurring. + * Specify the frequency of running the maintenance window. + * + * @return the value + **/ + public String getRecurrences() { + return recurrences; + } + + /** + * Task initiation cutoff time for the maintenance window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("taskInitiationCutoff") + private final Integer taskInitiationCutoff; + + /** + * Task initiation cutoff time for the maintenance window. + * @return the value + **/ + public Integer getTaskInitiationCutoff() { + return taskInitiationCutoff; + } + + /** + * The current state of the MaintenanceWindow. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Deleted("DELETED"), + Failed("FAILED"), + Deleting("DELETING"), + Updating("UPDATING"), + NeedsAttention("NEEDS_ATTENTION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the MaintenanceWindow. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the MaintenanceWindow. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MaintenanceWindow("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", maintenanceWindowType=").append(String.valueOf(this.maintenanceWindowType)); + sb.append(", isOutage=").append(String.valueOf(this.isOutage)); + sb.append(", timeScheduleStart=").append(String.valueOf(this.timeScheduleStart)); + sb.append(", duration=").append(String.valueOf(this.duration)); + sb.append(", isRecurring=").append(String.valueOf(this.isRecurring)); + sb.append(", recurrences=").append(String.valueOf(this.recurrences)); + sb.append(", taskInitiationCutoff=").append(String.valueOf(this.taskInitiationCutoff)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MaintenanceWindow)) { + return false; + } + + MaintenanceWindow other = (MaintenanceWindow) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.maintenanceWindowType, other.maintenanceWindowType) + && java.util.Objects.equals(this.isOutage, other.isOutage) + && java.util.Objects.equals(this.timeScheduleStart, other.timeScheduleStart) + && java.util.Objects.equals(this.duration, other.duration) + && java.util.Objects.equals(this.isRecurring, other.isRecurring) + && java.util.Objects.equals(this.recurrences, other.recurrences) + && java.util.Objects.equals(this.taskInitiationCutoff, other.taskInitiationCutoff) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.maintenanceWindowType == null + ? 43 + : this.maintenanceWindowType.hashCode()); + result = (result * PRIME) + (this.isOutage == null ? 43 : this.isOutage.hashCode()); + result = + (result * PRIME) + + (this.timeScheduleStart == null ? 43 : this.timeScheduleStart.hashCode()); + result = (result * PRIME) + (this.duration == null ? 43 : this.duration.hashCode()); + result = (result * PRIME) + (this.isRecurring == null ? 43 : this.isRecurring.hashCode()); + result = (result * PRIME) + (this.recurrences == null ? 43 : this.recurrences.hashCode()); + result = + (result * PRIME) + + (this.taskInitiationCutoff == null + ? 43 + : this.taskInitiationCutoff.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/MaintenanceWindowCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/MaintenanceWindowCollection.java new file mode 100644 index 00000000000..cd7bf12df44 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/MaintenanceWindowCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a maintenanceWindow search. Contains both MaintenanceWindowSummary items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MaintenanceWindowCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MaintenanceWindowCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public MaintenanceWindowCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of maintenanceWindows. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of maintenanceWindows. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MaintenanceWindowCollection build() { + MaintenanceWindowCollection model = new MaintenanceWindowCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MaintenanceWindowCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of maintenanceWindows. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of maintenanceWindows. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MaintenanceWindowCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MaintenanceWindowCollection)) { + return false; + } + + MaintenanceWindowCollection other = (MaintenanceWindowCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/MaintenanceWindowSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/MaintenanceWindowSummary.java new file mode 100644 index 00000000000..fa3698af2f9 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/MaintenanceWindowSummary.java @@ -0,0 +1,956 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Summary of the MaintenanceWindow. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MaintenanceWindowSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MaintenanceWindowSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "resourceRegion", + "displayName", + "description", + "timeCreated", + "timeUpdated", + "maintenanceWindowType", + "isOutage", + "timeScheduleStart", + "duration", + "isRecurring", + "recurrences", + "taskInitiationCutoff", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public MaintenanceWindowSummary( + String id, + String compartmentId, + String resourceRegion, + String displayName, + String description, + java.util.Date timeCreated, + java.util.Date timeUpdated, + MaintenanceWindowType maintenanceWindowType, + Boolean isOutage, + java.util.Date timeScheduleStart, + String duration, + Boolean isRecurring, + String recurrences, + Integer taskInitiationCutoff, + MaintenanceWindow.LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.resourceRegion = resourceRegion; + this.displayName = displayName; + this.description = description; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.maintenanceWindowType = maintenanceWindowType; + this.isOutage = isOutage; + this.timeScheduleStart = timeScheduleStart; + this.duration = duration; + this.isRecurring = isRecurring; + this.recurrences = recurrences; + this.taskInitiationCutoff = taskInitiationCutoff; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Type of the MaintenanceWindow. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceWindowType") + private MaintenanceWindowType maintenanceWindowType; + + /** + * Type of the MaintenanceWindow. + * @param maintenanceWindowType the value to set + * @return this builder + **/ + public Builder maintenanceWindowType(MaintenanceWindowType maintenanceWindowType) { + this.maintenanceWindowType = maintenanceWindowType; + this.__explicitlySet__.add("maintenanceWindowType"); + return this; + } + /** + * Does the maintenenace window cause outage? + * An outage indicates whether a maintenance window can consider operations that require downtime. + * It means a period when the application is not accessible. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isOutage") + private Boolean isOutage; + + /** + * Does the maintenenace window cause outage? + * An outage indicates whether a maintenance window can consider operations that require downtime. + * It means a period when the application is not accessible. + * + * @param isOutage the value to set + * @return this builder + **/ + public Builder isOutage(Boolean isOutage) { + this.isOutage = isOutage; + this.__explicitlySet__.add("isOutage"); + return this; + } + /** + * Specify the date and time of the day that the maintenance window starts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduleStart") + private java.util.Date timeScheduleStart; + + /** + * Specify the date and time of the day that the maintenance window starts. + * @param timeScheduleStart the value to set + * @return this builder + **/ + public Builder timeScheduleStart(java.util.Date timeScheduleStart) { + this.timeScheduleStart = timeScheduleStart; + this.__explicitlySet__.add("timeScheduleStart"); + return this; + } + /** + * Duration of the maintenance window. + * Specify how long the maintenance window remains open. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("duration") + private String duration; + + /** + * Duration of the maintenance window. + * Specify how long the maintenance window remains open. + * + * @param duration the value to set + * @return this builder + **/ + public Builder duration(String duration) { + this.duration = duration; + this.__explicitlySet__.add("duration"); + return this; + } + /** + * Is this a recurring maintenance window? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRecurring") + private Boolean isRecurring; + + /** + * Is this a recurring maintenance window? + * @param isRecurring the value to set + * @return this builder + **/ + public Builder isRecurring(Boolean isRecurring) { + this.isRecurring = isRecurring; + this.__explicitlySet__.add("isRecurring"); + return this; + } + /** + * Recurrence rule specification if maintenance window recurring. + * Specify the frequency of running the maintenance window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recurrences") + private String recurrences; + + /** + * Recurrence rule specification if maintenance window recurring. + * Specify the frequency of running the maintenance window. + * + * @param recurrences the value to set + * @return this builder + **/ + public Builder recurrences(String recurrences) { + this.recurrences = recurrences; + this.__explicitlySet__.add("recurrences"); + return this; + } + /** + * Task initiation cutoff time for the maintenance window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("taskInitiationCutoff") + private Integer taskInitiationCutoff; + + /** + * Task initiation cutoff time for the maintenance window. + * @param taskInitiationCutoff the value to set + * @return this builder + **/ + public Builder taskInitiationCutoff(Integer taskInitiationCutoff) { + this.taskInitiationCutoff = taskInitiationCutoff; + this.__explicitlySet__.add("taskInitiationCutoff"); + return this; + } + /** + * The current state of the MaintenanceWindow. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private MaintenanceWindow.LifecycleState lifecycleState; + + /** + * The current state of the MaintenanceWindow. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(MaintenanceWindow.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MaintenanceWindowSummary build() { + MaintenanceWindowSummary model = + new MaintenanceWindowSummary( + this.id, + this.compartmentId, + this.resourceRegion, + this.displayName, + this.description, + this.timeCreated, + this.timeUpdated, + this.maintenanceWindowType, + this.isOutage, + this.timeScheduleStart, + this.duration, + this.isRecurring, + this.recurrences, + this.taskInitiationCutoff, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MaintenanceWindowSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("maintenanceWindowType")) { + this.maintenanceWindowType(model.getMaintenanceWindowType()); + } + if (model.wasPropertyExplicitlySet("isOutage")) { + this.isOutage(model.getIsOutage()); + } + if (model.wasPropertyExplicitlySet("timeScheduleStart")) { + this.timeScheduleStart(model.getTimeScheduleStart()); + } + if (model.wasPropertyExplicitlySet("duration")) { + this.duration(model.getDuration()); + } + if (model.wasPropertyExplicitlySet("isRecurring")) { + this.isRecurring(model.getIsRecurring()); + } + if (model.wasPropertyExplicitlySet("recurrences")) { + this.recurrences(model.getRecurrences()); + } + if (model.wasPropertyExplicitlySet("taskInitiationCutoff")) { + this.taskInitiationCutoff(model.getTaskInitiationCutoff()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Type of the MaintenanceWindow. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceWindowType") + private final MaintenanceWindowType maintenanceWindowType; + + /** + * Type of the MaintenanceWindow. + * @return the value + **/ + public MaintenanceWindowType getMaintenanceWindowType() { + return maintenanceWindowType; + } + + /** + * Does the maintenenace window cause outage? + * An outage indicates whether a maintenance window can consider operations that require downtime. + * It means a period when the application is not accessible. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isOutage") + private final Boolean isOutage; + + /** + * Does the maintenenace window cause outage? + * An outage indicates whether a maintenance window can consider operations that require downtime. + * It means a period when the application is not accessible. + * + * @return the value + **/ + public Boolean getIsOutage() { + return isOutage; + } + + /** + * Specify the date and time of the day that the maintenance window starts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduleStart") + private final java.util.Date timeScheduleStart; + + /** + * Specify the date and time of the day that the maintenance window starts. + * @return the value + **/ + public java.util.Date getTimeScheduleStart() { + return timeScheduleStart; + } + + /** + * Duration of the maintenance window. + * Specify how long the maintenance window remains open. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("duration") + private final String duration; + + /** + * Duration of the maintenance window. + * Specify how long the maintenance window remains open. + * + * @return the value + **/ + public String getDuration() { + return duration; + } + + /** + * Is this a recurring maintenance window? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRecurring") + private final Boolean isRecurring; + + /** + * Is this a recurring maintenance window? + * @return the value + **/ + public Boolean getIsRecurring() { + return isRecurring; + } + + /** + * Recurrence rule specification if maintenance window recurring. + * Specify the frequency of running the maintenance window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recurrences") + private final String recurrences; + + /** + * Recurrence rule specification if maintenance window recurring. + * Specify the frequency of running the maintenance window. + * + * @return the value + **/ + public String getRecurrences() { + return recurrences; + } + + /** + * Task initiation cutoff time for the maintenance window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("taskInitiationCutoff") + private final Integer taskInitiationCutoff; + + /** + * Task initiation cutoff time for the maintenance window. + * @return the value + **/ + public Integer getTaskInitiationCutoff() { + return taskInitiationCutoff; + } + + /** + * The current state of the MaintenanceWindow. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final MaintenanceWindow.LifecycleState lifecycleState; + + /** + * The current state of the MaintenanceWindow. + * @return the value + **/ + public MaintenanceWindow.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MaintenanceWindowSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", maintenanceWindowType=").append(String.valueOf(this.maintenanceWindowType)); + sb.append(", isOutage=").append(String.valueOf(this.isOutage)); + sb.append(", timeScheduleStart=").append(String.valueOf(this.timeScheduleStart)); + sb.append(", duration=").append(String.valueOf(this.duration)); + sb.append(", isRecurring=").append(String.valueOf(this.isRecurring)); + sb.append(", recurrences=").append(String.valueOf(this.recurrences)); + sb.append(", taskInitiationCutoff=").append(String.valueOf(this.taskInitiationCutoff)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MaintenanceWindowSummary)) { + return false; + } + + MaintenanceWindowSummary other = (MaintenanceWindowSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.maintenanceWindowType, other.maintenanceWindowType) + && java.util.Objects.equals(this.isOutage, other.isOutage) + && java.util.Objects.equals(this.timeScheduleStart, other.timeScheduleStart) + && java.util.Objects.equals(this.duration, other.duration) + && java.util.Objects.equals(this.isRecurring, other.isRecurring) + && java.util.Objects.equals(this.recurrences, other.recurrences) + && java.util.Objects.equals(this.taskInitiationCutoff, other.taskInitiationCutoff) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.maintenanceWindowType == null + ? 43 + : this.maintenanceWindowType.hashCode()); + result = (result * PRIME) + (this.isOutage == null ? 43 : this.isOutage.hashCode()); + result = + (result * PRIME) + + (this.timeScheduleStart == null ? 43 : this.timeScheduleStart.hashCode()); + result = (result * PRIME) + (this.duration == null ? 43 : this.duration.hashCode()); + result = (result * PRIME) + (this.isRecurring == null ? 43 : this.isRecurring.hashCode()); + result = (result * PRIME) + (this.recurrences == null ? 43 : this.recurrences.hashCode()); + result = + (result * PRIME) + + (this.taskInitiationCutoff == null + ? 43 + : this.taskInitiationCutoff.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/MaintenanceWindowType.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/MaintenanceWindowType.java new file mode 100644 index 00000000000..d25f46c717e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/MaintenanceWindowType.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Possible maintenance window types + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public enum MaintenanceWindowType { + OpenEnded("OPEN_ENDED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(MaintenanceWindowType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (MaintenanceWindowType v : MaintenanceWindowType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + MaintenanceWindowType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static MaintenanceWindowType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'MaintenanceWindowType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ManageJobExecutionDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ManageJobExecutionDetails.java new file mode 100644 index 00000000000..4d88fa34bcb --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ManageJobExecutionDetails.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details of the Job Execution actions. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ManageJobExecutionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ManageJobExecutionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"actionDetails"}) + public ManageJobExecutionDetails(UserActionDetails actionDetails) { + super(); + this.actionDetails = actionDetails; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("actionDetails") + private UserActionDetails actionDetails; + + public Builder actionDetails(UserActionDetails actionDetails) { + this.actionDetails = actionDetails; + this.__explicitlySet__.add("actionDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ManageJobExecutionDetails build() { + ManageJobExecutionDetails model = new ManageJobExecutionDetails(this.actionDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ManageJobExecutionDetails model) { + if (model.wasPropertyExplicitlySet("actionDetails")) { + this.actionDetails(model.getActionDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("actionDetails") + private final UserActionDetails actionDetails; + + public UserActionDetails getActionDetails() { + return actionDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ManageJobExecutionDetails("); + sb.append("super=").append(super.toString()); + sb.append("actionDetails=").append(String.valueOf(this.actionDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ManageJobExecutionDetails)) { + return false; + } + + ManageJobExecutionDetails other = (ManageJobExecutionDetails) o; + return java.util.Objects.equals(this.actionDetails, other.actionDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.actionDetails == null ? 43 : this.actionDetails.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ManageSettingsDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ManageSettingsDetails.java new file mode 100644 index 00000000000..9a6257c980a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ManageSettingsDetails.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information to be updated. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ManageSettingsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ManageSettingsDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"discoveryFrequency"}) + public ManageSettingsDetails(String discoveryFrequency) { + super(); + this.discoveryFrequency = discoveryFrequency; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Provide discovery frequency. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("discoveryFrequency") + private String discoveryFrequency; + + /** + * Provide discovery frequency. + * @param discoveryFrequency the value to set + * @return this builder + **/ + public Builder discoveryFrequency(String discoveryFrequency) { + this.discoveryFrequency = discoveryFrequency; + this.__explicitlySet__.add("discoveryFrequency"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ManageSettingsDetails build() { + ManageSettingsDetails model = new ManageSettingsDetails(this.discoveryFrequency); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ManageSettingsDetails model) { + if (model.wasPropertyExplicitlySet("discoveryFrequency")) { + this.discoveryFrequency(model.getDiscoveryFrequency()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Provide discovery frequency. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("discoveryFrequency") + private final String discoveryFrequency; + + /** + * Provide discovery frequency. + * @return the value + **/ + public String getDiscoveryFrequency() { + return discoveryFrequency; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ManageSettingsDetails("); + sb.append("super=").append(super.toString()); + sb.append("discoveryFrequency=").append(String.valueOf(this.discoveryFrequency)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ManageSettingsDetails)) { + return false; + } + + ManageSettingsDetails other = (ManageSettingsDetails) o; + return java.util.Objects.equals(this.discoveryFrequency, other.discoveryFrequency) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.discoveryFrequency == null + ? 43 + : this.discoveryFrequency.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ManagedEntity.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ManagedEntity.java new file mode 100644 index 00000000000..239ab3212ee --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ManagedEntity.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Possible values for Managed Entities. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public enum ManagedEntity { + Resource("RESOURCE"), + Target("TARGET"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ManagedEntity.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ManagedEntity v : ManagedEntity.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ManagedEntity(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ManagedEntity create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ManagedEntity', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ManagedEntityAggregation.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ManagedEntityAggregation.java new file mode 100644 index 00000000000..c0587fc3883 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ManagedEntityAggregation.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Aggregated summary information for ManagedEntity + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ManagedEntityAggregation.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ManagedEntityAggregation + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"count", "dimensions"}) + public ManagedEntityAggregation(Integer count, ManagedEntityDimension dimensions) { + super(); + this.count = count; + this.dimensions = dimensions; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * count of Managed Entities in a Tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("count") + private Integer count; + + /** + * count of Managed Entities in a Tenancy. + * @param count the value to set + * @return this builder + **/ + public Builder count(Integer count) { + this.count = count; + this.__explicitlySet__.add("count"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dimensions") + private ManagedEntityDimension dimensions; + + public Builder dimensions(ManagedEntityDimension dimensions) { + this.dimensions = dimensions; + this.__explicitlySet__.add("dimensions"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ManagedEntityAggregation build() { + ManagedEntityAggregation model = + new ManagedEntityAggregation(this.count, this.dimensions); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ManagedEntityAggregation model) { + if (model.wasPropertyExplicitlySet("count")) { + this.count(model.getCount()); + } + if (model.wasPropertyExplicitlySet("dimensions")) { + this.dimensions(model.getDimensions()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * count of Managed Entities in a Tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("count") + private final Integer count; + + /** + * count of Managed Entities in a Tenancy. + * @return the value + **/ + public Integer getCount() { + return count; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dimensions") + private final ManagedEntityDimension dimensions; + + public ManagedEntityDimension getDimensions() { + return dimensions; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ManagedEntityAggregation("); + sb.append("super=").append(super.toString()); + sb.append("count=").append(String.valueOf(this.count)); + sb.append(", dimensions=").append(String.valueOf(this.dimensions)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ManagedEntityAggregation)) { + return false; + } + + ManagedEntityAggregation other = (ManagedEntityAggregation) o; + return java.util.Objects.equals(this.count, other.count) + && java.util.Objects.equals(this.dimensions, other.dimensions) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.count == null ? 43 : this.count.hashCode()); + result = (result * PRIME) + (this.dimensions == null ? 43 : this.dimensions.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ManagedEntityAggregationCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ManagedEntityAggregationCollection.java new file mode 100644 index 00000000000..16cf83f0b4d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ManagedEntityAggregationCollection.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * An array of Managed Entity objects + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ManagedEntityAggregationCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ManagedEntityAggregationCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ManagedEntityAggregationCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of ManagedEntityAggregation objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of ManagedEntityAggregation objects. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ManagedEntityAggregationCollection build() { + ManagedEntityAggregationCollection model = + new ManagedEntityAggregationCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ManagedEntityAggregationCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of ManagedEntityAggregation objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of ManagedEntityAggregation objects. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ManagedEntityAggregationCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ManagedEntityAggregationCollection)) { + return false; + } + + ManagedEntityAggregationCollection other = (ManagedEntityAggregationCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ManagedEntityDimension.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ManagedEntityDimension.java new file mode 100644 index 00000000000..0d473caf326 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ManagedEntityDimension.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Aggregated summary information for ComplianceRecord + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ManagedEntityDimension.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ManagedEntityDimension + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"entity"}) + public ManagedEntityDimension(ManagedEntity entity) { + super(); + this.entity = entity; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Level at which the compliance is calculated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entity") + private ManagedEntity entity; + + /** + * Level at which the compliance is calculated. + * @param entity the value to set + * @return this builder + **/ + public Builder entity(ManagedEntity entity) { + this.entity = entity; + this.__explicitlySet__.add("entity"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ManagedEntityDimension build() { + ManagedEntityDimension model = new ManagedEntityDimension(this.entity); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ManagedEntityDimension model) { + if (model.wasPropertyExplicitlySet("entity")) { + this.entity(model.getEntity()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Level at which the compliance is calculated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entity") + private final ManagedEntity entity; + + /** + * Level at which the compliance is calculated. + * @return the value + **/ + public ManagedEntity getEntity() { + return entity; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ManagedEntityDimension("); + sb.append("super=").append(super.toString()); + sb.append("entity=").append(String.valueOf(this.entity)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ManagedEntityDimension)) { + return false; + } + + ManagedEntityDimension other = (ManagedEntityDimension) o; + return java.util.Objects.equals(this.entity, other.entity) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.entity == null ? 43 : this.entity.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/NotificationPreferences.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/NotificationPreferences.java new file mode 100644 index 00000000000..a2152d1c616 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/NotificationPreferences.java @@ -0,0 +1,207 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Notification information to get notified when the fleet status changes. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = NotificationPreferences.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class NotificationPreferences + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"topicId", "compartmentId", "preferences"}) + public NotificationPreferences(String topicId, String compartmentId, Preferences preferences) { + super(); + this.topicId = topicId; + this.compartmentId = compartmentId; + this.preferences = preferences; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Topic Id where the notifications will be directed. + * A topic is a communication channel for sending messages on chosen events to subscriptions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("topicId") + private String topicId; + + /** + * Topic Id where the notifications will be directed. + * A topic is a communication channel for sending messages on chosen events to subscriptions. + * + * @param topicId the value to set + * @return this builder + **/ + public Builder topicId(String topicId) { + this.topicId = topicId; + this.__explicitlySet__.add("topicId"); + return this; + } + /** + * Compartment ID the topic belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Compartment ID the topic belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("preferences") + private Preferences preferences; + + public Builder preferences(Preferences preferences) { + this.preferences = preferences; + this.__explicitlySet__.add("preferences"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public NotificationPreferences build() { + NotificationPreferences model = + new NotificationPreferences(this.topicId, this.compartmentId, this.preferences); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(NotificationPreferences model) { + if (model.wasPropertyExplicitlySet("topicId")) { + this.topicId(model.getTopicId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("preferences")) { + this.preferences(model.getPreferences()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Topic Id where the notifications will be directed. + * A topic is a communication channel for sending messages on chosen events to subscriptions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("topicId") + private final String topicId; + + /** + * Topic Id where the notifications will be directed. + * A topic is a communication channel for sending messages on chosen events to subscriptions. + * + * @return the value + **/ + public String getTopicId() { + return topicId; + } + + /** + * Compartment ID the topic belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Compartment ID the topic belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("preferences") + private final Preferences preferences; + + public Preferences getPreferences() { + return preferences; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("NotificationPreferences("); + sb.append("super=").append(super.toString()); + sb.append("topicId=").append(String.valueOf(this.topicId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", preferences=").append(String.valueOf(this.preferences)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof NotificationPreferences)) { + return false; + } + + NotificationPreferences other = (NotificationPreferences) o; + return java.util.Objects.equals(this.topicId, other.topicId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.preferences, other.preferences) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.topicId == null ? 43 : this.topicId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.preferences == null ? 43 : this.preferences.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ObjectStorageBucketContentDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ObjectStorageBucketContentDetails.java new file mode 100644 index 00000000000..9f78d41d6a2 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ObjectStorageBucketContentDetails.java @@ -0,0 +1,256 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details about Object Storage Bucket source. + * Restricted to the region this is called. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ObjectStorageBucketContentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "sourceType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ObjectStorageBucketContentDetails extends ContentDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Namespace. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private String namespaceName; + + /** + * Namespace. + * @param namespaceName the value to set + * @return this builder + **/ + public Builder namespaceName(String namespaceName) { + this.namespaceName = namespaceName; + this.__explicitlySet__.add("namespaceName"); + return this; + } + /** + * Bucket Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private String bucketName; + + /** + * Bucket Name. + * @param bucketName the value to set + * @return this builder + **/ + public Builder bucketName(String bucketName) { + this.bucketName = bucketName; + this.__explicitlySet__.add("bucketName"); + return this; + } + /** + * Object Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectName") + private String objectName; + + /** + * Object Name. + * @param objectName the value to set + * @return this builder + **/ + public Builder objectName(String objectName) { + this.objectName = objectName; + this.__explicitlySet__.add("objectName"); + return this; + } + /** + * md5 checksum of the artifact. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("checksum") + private String checksum; + + /** + * md5 checksum of the artifact. + * @param checksum the value to set + * @return this builder + **/ + public Builder checksum(String checksum) { + this.checksum = checksum; + this.__explicitlySet__.add("checksum"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ObjectStorageBucketContentDetails build() { + ObjectStorageBucketContentDetails model = + new ObjectStorageBucketContentDetails( + this.namespaceName, this.bucketName, this.objectName, this.checksum); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ObjectStorageBucketContentDetails model) { + if (model.wasPropertyExplicitlySet("namespaceName")) { + this.namespaceName(model.getNamespaceName()); + } + if (model.wasPropertyExplicitlySet("bucketName")) { + this.bucketName(model.getBucketName()); + } + if (model.wasPropertyExplicitlySet("objectName")) { + this.objectName(model.getObjectName()); + } + if (model.wasPropertyExplicitlySet("checksum")) { + this.checksum(model.getChecksum()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ObjectStorageBucketContentDetails( + String namespaceName, String bucketName, String objectName, String checksum) { + super(); + this.namespaceName = namespaceName; + this.bucketName = bucketName; + this.objectName = objectName; + this.checksum = checksum; + } + + /** + * Namespace. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private final String namespaceName; + + /** + * Namespace. + * @return the value + **/ + public String getNamespaceName() { + return namespaceName; + } + + /** + * Bucket Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private final String bucketName; + + /** + * Bucket Name. + * @return the value + **/ + public String getBucketName() { + return bucketName; + } + + /** + * Object Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectName") + private final String objectName; + + /** + * Object Name. + * @return the value + **/ + public String getObjectName() { + return objectName; + } + + /** + * md5 checksum of the artifact. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("checksum") + private final String checksum; + + /** + * md5 checksum of the artifact. + * @return the value + **/ + public String getChecksum() { + return checksum; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ObjectStorageBucketContentDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", namespaceName=").append(String.valueOf(this.namespaceName)); + sb.append(", bucketName=").append(String.valueOf(this.bucketName)); + sb.append(", objectName=").append(String.valueOf(this.objectName)); + sb.append(", checksum=").append(String.valueOf(this.checksum)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ObjectStorageBucketContentDetails)) { + return false; + } + + ObjectStorageBucketContentDetails other = (ObjectStorageBucketContentDetails) o; + return java.util.Objects.equals(this.namespaceName, other.namespaceName) + && java.util.Objects.equals(this.bucketName, other.bucketName) + && java.util.Objects.equals(this.objectName, other.objectName) + && java.util.Objects.equals(this.checksum, other.checksum) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.namespaceName == null ? 43 : this.namespaceName.hashCode()); + result = (result * PRIME) + (this.bucketName == null ? 43 : this.bucketName.hashCode()); + result = (result * PRIME) + (this.objectName == null ? 43 : this.objectName.hashCode()); + result = (result * PRIME) + (this.checksum == null ? 43 : this.checksum.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Onboarding.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Onboarding.java new file mode 100644 index 00000000000..20baf89a5a2 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Onboarding.java @@ -0,0 +1,664 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Fleet Application Management onboarding resource. + * The onboarding process lets\u00A0Fleet Application Management\u00A0create a few required policies that you need to start using it and its features. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Onboarding.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Onboarding extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "resourceRegion", + "timeCreated", + "timeUpdated", + "isFamsTagEnabled", + "version", + "isCostTrackingTagEnabled", + "appliedPolicies", + "discoveryFrequency", + "lifecycleState", + "systemTags" + }) + public Onboarding( + String id, + String compartmentId, + String resourceRegion, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Boolean isFamsTagEnabled, + String version, + Boolean isCostTrackingTagEnabled, + OnboardingPolicySummary appliedPolicies, + String discoveryFrequency, + LifecycleState lifecycleState, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.resourceRegion = resourceRegion; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.isFamsTagEnabled = isFamsTagEnabled; + this.version = version; + this.isCostTrackingTagEnabled = isCostTrackingTagEnabled; + this.appliedPolicies = appliedPolicies; + this.discoveryFrequency = discoveryFrequency; + this.lifecycleState = lifecycleState; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The unique id of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The unique id of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * A value determining if the Fleet Application Management tagging is enabled or not. + * Allow Fleet Application Management to tag resources with fleet name using "Oracle$FAMS-Tags.FleetName" tag. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFamsTagEnabled") + private Boolean isFamsTagEnabled; + + /** + * A value determining if the Fleet Application Management tagging is enabled or not. + * Allow Fleet Application Management to tag resources with fleet name using "Oracle$FAMS-Tags.FleetName" tag. + * + * @param isFamsTagEnabled the value to set + * @return this builder + **/ + public Builder isFamsTagEnabled(Boolean isFamsTagEnabled) { + this.isFamsTagEnabled = isFamsTagEnabled; + this.__explicitlySet__.add("isFamsTagEnabled"); + return this; + } + /** + * The version of Fleet Application Management that the tenant is onboarded to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * The version of Fleet Application Management that the tenant is onboarded to. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + /** + * A value determining if the cost tracking tag is enabled or not. + * Allow Fleet Application Management to tag resources with cost tracking tag using "Oracle$FAMS-Tags.FAMSManaged" tag. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCostTrackingTagEnabled") + private Boolean isCostTrackingTagEnabled; + + /** + * A value determining if the cost tracking tag is enabled or not. + * Allow Fleet Application Management to tag resources with cost tracking tag using "Oracle$FAMS-Tags.FAMSManaged" tag. + * + * @param isCostTrackingTagEnabled the value to set + * @return this builder + **/ + public Builder isCostTrackingTagEnabled(Boolean isCostTrackingTagEnabled) { + this.isCostTrackingTagEnabled = isCostTrackingTagEnabled; + this.__explicitlySet__.add("isCostTrackingTagEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("appliedPolicies") + private OnboardingPolicySummary appliedPolicies; + + public Builder appliedPolicies(OnboardingPolicySummary appliedPolicies) { + this.appliedPolicies = appliedPolicies; + this.__explicitlySet__.add("appliedPolicies"); + return this; + } + /** + * Provide discovery frequency. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("discoveryFrequency") + private String discoveryFrequency; + + /** + * Provide discovery frequency. + * @param discoveryFrequency the value to set + * @return this builder + **/ + public Builder discoveryFrequency(String discoveryFrequency) { + this.discoveryFrequency = discoveryFrequency; + this.__explicitlySet__.add("discoveryFrequency"); + return this; + } + /** + * The current state of the Onboarding. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Onboarding. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Onboarding build() { + Onboarding model = + new Onboarding( + this.id, + this.compartmentId, + this.resourceRegion, + this.timeCreated, + this.timeUpdated, + this.isFamsTagEnabled, + this.version, + this.isCostTrackingTagEnabled, + this.appliedPolicies, + this.discoveryFrequency, + this.lifecycleState, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Onboarding model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("isFamsTagEnabled")) { + this.isFamsTagEnabled(model.getIsFamsTagEnabled()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + if (model.wasPropertyExplicitlySet("isCostTrackingTagEnabled")) { + this.isCostTrackingTagEnabled(model.getIsCostTrackingTagEnabled()); + } + if (model.wasPropertyExplicitlySet("appliedPolicies")) { + this.appliedPolicies(model.getAppliedPolicies()); + } + if (model.wasPropertyExplicitlySet("discoveryFrequency")) { + this.discoveryFrequency(model.getDiscoveryFrequency()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The unique id of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The unique id of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * A value determining if the Fleet Application Management tagging is enabled or not. + * Allow Fleet Application Management to tag resources with fleet name using "Oracle$FAMS-Tags.FleetName" tag. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFamsTagEnabled") + private final Boolean isFamsTagEnabled; + + /** + * A value determining if the Fleet Application Management tagging is enabled or not. + * Allow Fleet Application Management to tag resources with fleet name using "Oracle$FAMS-Tags.FleetName" tag. + * + * @return the value + **/ + public Boolean getIsFamsTagEnabled() { + return isFamsTagEnabled; + } + + /** + * The version of Fleet Application Management that the tenant is onboarded to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * The version of Fleet Application Management that the tenant is onboarded to. + * @return the value + **/ + public String getVersion() { + return version; + } + + /** + * A value determining if the cost tracking tag is enabled or not. + * Allow Fleet Application Management to tag resources with cost tracking tag using "Oracle$FAMS-Tags.FAMSManaged" tag. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCostTrackingTagEnabled") + private final Boolean isCostTrackingTagEnabled; + + /** + * A value determining if the cost tracking tag is enabled or not. + * Allow Fleet Application Management to tag resources with cost tracking tag using "Oracle$FAMS-Tags.FAMSManaged" tag. + * + * @return the value + **/ + public Boolean getIsCostTrackingTagEnabled() { + return isCostTrackingTagEnabled; + } + + @com.fasterxml.jackson.annotation.JsonProperty("appliedPolicies") + private final OnboardingPolicySummary appliedPolicies; + + public OnboardingPolicySummary getAppliedPolicies() { + return appliedPolicies; + } + + /** + * Provide discovery frequency. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("discoveryFrequency") + private final String discoveryFrequency; + + /** + * Provide discovery frequency. + * @return the value + **/ + public String getDiscoveryFrequency() { + return discoveryFrequency; + } + + /** + * The current state of the Onboarding. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Inactive("INACTIVE"), + Creating("CREATING"), + Deleted("DELETED"), + Deleting("DELETING"), + Failed("FAILED"), + Updating("UPDATING"), + NeedsAttention("NEEDS_ATTENTION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the Onboarding. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Onboarding. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Onboarding("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", isFamsTagEnabled=").append(String.valueOf(this.isFamsTagEnabled)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(", isCostTrackingTagEnabled=") + .append(String.valueOf(this.isCostTrackingTagEnabled)); + sb.append(", appliedPolicies=").append(String.valueOf(this.appliedPolicies)); + sb.append(", discoveryFrequency=").append(String.valueOf(this.discoveryFrequency)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Onboarding)) { + return false; + } + + Onboarding other = (Onboarding) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.isFamsTagEnabled, other.isFamsTagEnabled) + && java.util.Objects.equals(this.version, other.version) + && java.util.Objects.equals( + this.isCostTrackingTagEnabled, other.isCostTrackingTagEnabled) + && java.util.Objects.equals(this.appliedPolicies, other.appliedPolicies) + && java.util.Objects.equals(this.discoveryFrequency, other.discoveryFrequency) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.isFamsTagEnabled == null ? 43 : this.isFamsTagEnabled.hashCode()); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = + (result * PRIME) + + (this.isCostTrackingTagEnabled == null + ? 43 + : this.isCostTrackingTagEnabled.hashCode()); + result = + (result * PRIME) + + (this.appliedPolicies == null ? 43 : this.appliedPolicies.hashCode()); + result = + (result * PRIME) + + (this.discoveryFrequency == null + ? 43 + : this.discoveryFrequency.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OnboardingCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OnboardingCollection.java new file mode 100644 index 00000000000..3f2cf81c79a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OnboardingCollection.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * List of Fleet Application Management Onboardings. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OnboardingCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OnboardingCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public OnboardingCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of Fleet Application Management Onboardings. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of Fleet Application Management Onboardings. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OnboardingCollection build() { + OnboardingCollection model = new OnboardingCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OnboardingCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of Fleet Application Management Onboardings. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of Fleet Application Management Onboardings. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OnboardingCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OnboardingCollection)) { + return false; + } + + OnboardingCollection other = (OnboardingCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OnboardingPolicyCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OnboardingPolicyCollection.java new file mode 100644 index 00000000000..7c83d75d0f3 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OnboardingPolicyCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * List of Fleet Application Management Onboard policies. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OnboardingPolicyCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OnboardingPolicyCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public OnboardingPolicyCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of Fleet Application Management Onboard policies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of Fleet Application Management Onboard policies. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OnboardingPolicyCollection build() { + OnboardingPolicyCollection model = new OnboardingPolicyCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OnboardingPolicyCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of Fleet Application Management Onboard policies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of Fleet Application Management Onboard policies. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OnboardingPolicyCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OnboardingPolicyCollection)) { + return false; + } + + OnboardingPolicyCollection other = (OnboardingPolicyCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OnboardingPolicySummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OnboardingPolicySummary.java new file mode 100644 index 00000000000..8288fc5b29d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OnboardingPolicySummary.java @@ -0,0 +1,309 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Summary of the Fleet Application Management Onboard Policy. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OnboardingPolicySummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OnboardingPolicySummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "timeCreated", + "timeUpdated", + "statements", + "systemTags" + }) + public OnboardingPolicySummary( + String id, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.List statements, + java.util.Map> systemTags) { + super(); + this.id = id; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.statements = statements; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The unique id of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The unique id of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Policy statements. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("statements") + private java.util.List statements; + + /** + * Policy statements. + * @param statements the value to set + * @return this builder + **/ + public Builder statements(java.util.List statements) { + this.statements = statements; + this.__explicitlySet__.add("statements"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OnboardingPolicySummary build() { + OnboardingPolicySummary model = + new OnboardingPolicySummary( + this.id, + this.timeCreated, + this.timeUpdated, + this.statements, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OnboardingPolicySummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("statements")) { + this.statements(model.getStatements()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The unique id of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The unique id of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Policy statements. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("statements") + private final java.util.List statements; + + /** + * Policy statements. + * @return the value + **/ + public java.util.List getStatements() { + return statements; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OnboardingPolicySummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", statements=").append(String.valueOf(this.statements)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OnboardingPolicySummary)) { + return false; + } + + OnboardingPolicySummary other = (OnboardingPolicySummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.statements, other.statements) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.statements == null ? 43 : this.statements.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OnboardingSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OnboardingSummary.java new file mode 100644 index 00000000000..cc8b2447a21 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OnboardingSummary.java @@ -0,0 +1,610 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Summary of the Fleet Application Management Onboarding. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OnboardingSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OnboardingSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "resourceRegion", + "timeCreated", + "timeUpdated", + "isFamsTagEnabled", + "version", + "isCostTrackingTagEnabled", + "appliedPolicies", + "discoveryFrequency", + "lifecycleState", + "systemTags" + }) + public OnboardingSummary( + String id, + String compartmentId, + String resourceRegion, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Boolean isFamsTagEnabled, + String version, + Boolean isCostTrackingTagEnabled, + OnboardingPolicySummary appliedPolicies, + String discoveryFrequency, + Onboarding.LifecycleState lifecycleState, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.resourceRegion = resourceRegion; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.isFamsTagEnabled = isFamsTagEnabled; + this.version = version; + this.isCostTrackingTagEnabled = isCostTrackingTagEnabled; + this.appliedPolicies = appliedPolicies; + this.discoveryFrequency = discoveryFrequency; + this.lifecycleState = lifecycleState; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The unique id of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The unique id of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * A value determining if the Fleet Application Management tagging is enabled or not. + * Allow Fleet Application Management to tag resources with fleet name using "Oracle$FAMS-Tags.FleetName" tag. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFamsTagEnabled") + private Boolean isFamsTagEnabled; + + /** + * A value determining if the Fleet Application Management tagging is enabled or not. + * Allow Fleet Application Management to tag resources with fleet name using "Oracle$FAMS-Tags.FleetName" tag. + * + * @param isFamsTagEnabled the value to set + * @return this builder + **/ + public Builder isFamsTagEnabled(Boolean isFamsTagEnabled) { + this.isFamsTagEnabled = isFamsTagEnabled; + this.__explicitlySet__.add("isFamsTagEnabled"); + return this; + } + /** + * The version of Fleet Application Management that the tenant is onboarded to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * The version of Fleet Application Management that the tenant is onboarded to. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + /** + * A value determining if the cost tracking tag is enabled or not. + * Allow Fleet Application Management to tag resources with cost tracking tag using "Oracle$FAMS-Tags.FAMSManaged" tag. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCostTrackingTagEnabled") + private Boolean isCostTrackingTagEnabled; + + /** + * A value determining if the cost tracking tag is enabled or not. + * Allow Fleet Application Management to tag resources with cost tracking tag using "Oracle$FAMS-Tags.FAMSManaged" tag. + * + * @param isCostTrackingTagEnabled the value to set + * @return this builder + **/ + public Builder isCostTrackingTagEnabled(Boolean isCostTrackingTagEnabled) { + this.isCostTrackingTagEnabled = isCostTrackingTagEnabled; + this.__explicitlySet__.add("isCostTrackingTagEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("appliedPolicies") + private OnboardingPolicySummary appliedPolicies; + + public Builder appliedPolicies(OnboardingPolicySummary appliedPolicies) { + this.appliedPolicies = appliedPolicies; + this.__explicitlySet__.add("appliedPolicies"); + return this; + } + /** + * Provide discovery frequency. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("discoveryFrequency") + private String discoveryFrequency; + + /** + * Provide discovery frequency. + * @param discoveryFrequency the value to set + * @return this builder + **/ + public Builder discoveryFrequency(String discoveryFrequency) { + this.discoveryFrequency = discoveryFrequency; + this.__explicitlySet__.add("discoveryFrequency"); + return this; + } + /** + * The current state of the Onboarding. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private Onboarding.LifecycleState lifecycleState; + + /** + * The current state of the Onboarding. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(Onboarding.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OnboardingSummary build() { + OnboardingSummary model = + new OnboardingSummary( + this.id, + this.compartmentId, + this.resourceRegion, + this.timeCreated, + this.timeUpdated, + this.isFamsTagEnabled, + this.version, + this.isCostTrackingTagEnabled, + this.appliedPolicies, + this.discoveryFrequency, + this.lifecycleState, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OnboardingSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("isFamsTagEnabled")) { + this.isFamsTagEnabled(model.getIsFamsTagEnabled()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + if (model.wasPropertyExplicitlySet("isCostTrackingTagEnabled")) { + this.isCostTrackingTagEnabled(model.getIsCostTrackingTagEnabled()); + } + if (model.wasPropertyExplicitlySet("appliedPolicies")) { + this.appliedPolicies(model.getAppliedPolicies()); + } + if (model.wasPropertyExplicitlySet("discoveryFrequency")) { + this.discoveryFrequency(model.getDiscoveryFrequency()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The unique id of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The unique id of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * A value determining if the Fleet Application Management tagging is enabled or not. + * Allow Fleet Application Management to tag resources with fleet name using "Oracle$FAMS-Tags.FleetName" tag. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFamsTagEnabled") + private final Boolean isFamsTagEnabled; + + /** + * A value determining if the Fleet Application Management tagging is enabled or not. + * Allow Fleet Application Management to tag resources with fleet name using "Oracle$FAMS-Tags.FleetName" tag. + * + * @return the value + **/ + public Boolean getIsFamsTagEnabled() { + return isFamsTagEnabled; + } + + /** + * The version of Fleet Application Management that the tenant is onboarded to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * The version of Fleet Application Management that the tenant is onboarded to. + * @return the value + **/ + public String getVersion() { + return version; + } + + /** + * A value determining if the cost tracking tag is enabled or not. + * Allow Fleet Application Management to tag resources with cost tracking tag using "Oracle$FAMS-Tags.FAMSManaged" tag. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCostTrackingTagEnabled") + private final Boolean isCostTrackingTagEnabled; + + /** + * A value determining if the cost tracking tag is enabled or not. + * Allow Fleet Application Management to tag resources with cost tracking tag using "Oracle$FAMS-Tags.FAMSManaged" tag. + * + * @return the value + **/ + public Boolean getIsCostTrackingTagEnabled() { + return isCostTrackingTagEnabled; + } + + @com.fasterxml.jackson.annotation.JsonProperty("appliedPolicies") + private final OnboardingPolicySummary appliedPolicies; + + public OnboardingPolicySummary getAppliedPolicies() { + return appliedPolicies; + } + + /** + * Provide discovery frequency. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("discoveryFrequency") + private final String discoveryFrequency; + + /** + * Provide discovery frequency. + * @return the value + **/ + public String getDiscoveryFrequency() { + return discoveryFrequency; + } + + /** + * The current state of the Onboarding. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final Onboarding.LifecycleState lifecycleState; + + /** + * The current state of the Onboarding. + * @return the value + **/ + public Onboarding.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OnboardingSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", isFamsTagEnabled=").append(String.valueOf(this.isFamsTagEnabled)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(", isCostTrackingTagEnabled=") + .append(String.valueOf(this.isCostTrackingTagEnabled)); + sb.append(", appliedPolicies=").append(String.valueOf(this.appliedPolicies)); + sb.append(", discoveryFrequency=").append(String.valueOf(this.discoveryFrequency)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OnboardingSummary)) { + return false; + } + + OnboardingSummary other = (OnboardingSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.isFamsTagEnabled, other.isFamsTagEnabled) + && java.util.Objects.equals(this.version, other.version) + && java.util.Objects.equals( + this.isCostTrackingTagEnabled, other.isCostTrackingTagEnabled) + && java.util.Objects.equals(this.appliedPolicies, other.appliedPolicies) + && java.util.Objects.equals(this.discoveryFrequency, other.discoveryFrequency) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.isFamsTagEnabled == null ? 43 : this.isFamsTagEnabled.hashCode()); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = + (result * PRIME) + + (this.isCostTrackingTagEnabled == null + ? 43 + : this.isCostTrackingTagEnabled.hashCode()); + result = + (result * PRIME) + + (this.appliedPolicies == null ? 43 : this.appliedPolicies.hashCode()); + result = + (result * PRIME) + + (this.discoveryFrequency == null + ? 43 + : this.discoveryFrequency.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OperationRunbook.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OperationRunbook.java new file mode 100644 index 00000000000..4c8fbb77d31 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OperationRunbook.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Runbook + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = OperationRunbook.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OperationRunbook extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"id", "inputParameters"}) + public OperationRunbook(String id, java.util.List inputParameters) { + super(); + this.id = id; + this.inputParameters = inputParameters; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The ID of the Runbook + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The ID of the Runbook + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Input Parameters for the Task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("inputParameters") + private java.util.List inputParameters; + + /** + * Input Parameters for the Task + * @param inputParameters the value to set + * @return this builder + **/ + public Builder inputParameters(java.util.List inputParameters) { + this.inputParameters = inputParameters; + this.__explicitlySet__.add("inputParameters"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OperationRunbook build() { + OperationRunbook model = new OperationRunbook(this.id, this.inputParameters); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OperationRunbook model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("inputParameters")) { + this.inputParameters(model.getInputParameters()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The ID of the Runbook + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The ID of the Runbook + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Input Parameters for the Task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("inputParameters") + private final java.util.List inputParameters; + + /** + * Input Parameters for the Task + * @return the value + **/ + public java.util.List getInputParameters() { + return inputParameters; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OperationRunbook("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", inputParameters=").append(String.valueOf(this.inputParameters)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OperationRunbook)) { + return false; + } + + OperationRunbook other = (OperationRunbook) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.inputParameters, other.inputParameters) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.inputParameters == null ? 43 : this.inputParameters.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OperationStatus.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OperationStatus.java new file mode 100644 index 00000000000..ed0d40e1187 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OperationStatus.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Possible operation status. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public enum OperationStatus { + Accepted("ACCEPTED"), + InProgress("IN_PROGRESS"), + Waiting("WAITING"), + NeedsAttention("NEEDS_ATTENTION"), + Failed("FAILED"), + Succeeded("SUCCEEDED"), + Canceling("CANCELING"), + Canceled("CANCELED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(OperationStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OperationStatus v : OperationStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + OperationStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OperationStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'OperationStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OperationType.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OperationType.java new file mode 100644 index 00000000000..d5207905909 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OperationType.java @@ -0,0 +1,87 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Possible operation types. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public enum OperationType { + CreateFleet("CREATE_FLEET"), + UpdateFleet("UPDATE_FLEET"), + DeleteFleet("DELETE_FLEET"), + ConfirmTarget("CONFIRM_TARGET"), + GenerateCompliance("GENERATE_COMPLIANCE"), + RequestTargetDiscovery("REQUEST_TARGET_DISCOVERY"), + ValidateResource("VALIDATE_RESOURCE"), + CreateCredential("CREATE_CREDENTIAL"), + UpdateCredential("UPDATE_CREDENTIAL"), + DeleteCredential("DELETE_CREDENTIAL"), + CreateSchedule("CREATE_SCHEDULE"), + UpdateSchedule("UPDATE_SCHEDULE"), + UpdateMaintenanceWindow("UPDATE_MAINTENANCE_WINDOW"), + DeleteMaintenanceWindow("DELETE_MAINTENANCE_WINDOW"), + CreateFleetResource("CREATE_FLEET_RESOURCE"), + UpdateFleetResource("UPDATE_FLEET_RESOURCE"), + DeleteFleetResource("DELETE_FLEET_RESOURCE"), + CreateFamsOnboarding("CREATE_FAMS_ONBOARDING"), + CreateRunbook("CREATE_RUNBOOK"), + UpdateRunbook("UPDATE_RUNBOOK"), + DeleteRunbook("DELETE_RUNBOOK"), + PublishRunbook("PUBLISH_RUNBOOK"), + UpdateTask("UPDATE_TASK"), + DeleteTask("DELETE_TASK"), + UpdateFamsOnboarding("UPDATE_FAMS_ONBOARDING"), + DeleteFamsOnboarding("DELETE_FAMS_ONBOARDING"), + CreateCompliancePolicyRule("CREATE_COMPLIANCE_POLICY_RULE"), + UpdateCompliancePolicyRule("UPDATE_COMPLIANCE_POLICY_RULE"), + DeleteCompliancePolicyRule("DELETE_COMPLIANCE_POLICY_RULE"), + UpdatePatch("UPDATE_PATCH"), + DeletePatch("DELETE_PATCH"), + ManageJobExecution("MANAGE_JOB_EXECUTION"), + DeletePlatformConfiguration("DELETE_PLATFORM_CONFIGURATION"), + UpdatePlatformConfiguration("UPDATE_PLATFORM_CONFIGURATION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(OperationType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OperationType v : OperationType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + OperationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OperationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'OperationType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OsType.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OsType.java new file mode 100644 index 00000000000..f5c09a1df41 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OsType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Possible OS type values. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public enum OsType { + Windows("WINDOWS"), + Linux("LINUX"), + Generic("GENERIC"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(OsType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OsType v : OsType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + OsType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OsType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn("Received unknown value '{}' for enum 'OsType', returning UnknownEnumValue", key); + return UnknownEnumValue; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Outcome.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Outcome.java new file mode 100644 index 00000000000..2e864035f14 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Outcome.java @@ -0,0 +1,207 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Execution Outcome. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Outcome.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Outcome extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"output", "error", "exitCode"}) + public Outcome(String output, String error, String exitCode) { + super(); + this.output = output; + this.error = error; + this.exitCode = exitCode; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A shortened version of Execution output. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("output") + private String output; + + /** + * A shortened version of Execution output. + * @param output the value to set + * @return this builder + **/ + public Builder output(String output) { + this.output = output; + this.__explicitlySet__.add("output"); + return this; + } + /** + * Errors if any, associated with the execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("error") + private String error; + + /** + * Errors if any, associated with the execution. + * @param error the value to set + * @return this builder + **/ + public Builder error(String error) { + this.error = error; + this.__explicitlySet__.add("error"); + return this; + } + /** + * Exit Code. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exitCode") + private String exitCode; + + /** + * Exit Code. + * @param exitCode the value to set + * @return this builder + **/ + public Builder exitCode(String exitCode) { + this.exitCode = exitCode; + this.__explicitlySet__.add("exitCode"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Outcome build() { + Outcome model = new Outcome(this.output, this.error, this.exitCode); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Outcome model) { + if (model.wasPropertyExplicitlySet("output")) { + this.output(model.getOutput()); + } + if (model.wasPropertyExplicitlySet("error")) { + this.error(model.getError()); + } + if (model.wasPropertyExplicitlySet("exitCode")) { + this.exitCode(model.getExitCode()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A shortened version of Execution output. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("output") + private final String output; + + /** + * A shortened version of Execution output. + * @return the value + **/ + public String getOutput() { + return output; + } + + /** + * Errors if any, associated with the execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("error") + private final String error; + + /** + * Errors if any, associated with the execution. + * @return the value + **/ + public String getError() { + return error; + } + + /** + * Exit Code. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exitCode") + private final String exitCode; + + /** + * Exit Code. + * @return the value + **/ + public String getExitCode() { + return exitCode; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Outcome("); + sb.append("super=").append(super.toString()); + sb.append("output=").append(String.valueOf(this.output)); + sb.append(", error=").append(String.valueOf(this.error)); + sb.append(", exitCode=").append(String.valueOf(this.exitCode)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Outcome)) { + return false; + } + + Outcome other = (Outcome) o; + return java.util.Objects.equals(this.output, other.output) + && java.util.Objects.equals(this.error, other.error) + && java.util.Objects.equals(this.exitCode, other.exitCode) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.output == null ? 43 : this.output.hashCode()); + result = (result * PRIME) + (this.error == null ? 43 : this.error.hashCode()); + result = (result * PRIME) + (this.exitCode == null ? 43 : this.exitCode.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OutputVariableDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OutputVariableDetails.java new file mode 100644 index 00000000000..ff3ee040bfa --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OutputVariableDetails.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The details of the output variable that will be used for mapping. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OutputVariableDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OutputVariableDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"stepName", "outputVariableName"}) + public OutputVariableDetails(String stepName, String outputVariableName) { + super(); + this.stepName = stepName; + this.outputVariableName = outputVariableName; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the task step the output variable belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private String stepName; + + /** + * The name of the task step the output variable belongs to. + * @param stepName the value to set + * @return this builder + **/ + public Builder stepName(String stepName) { + this.stepName = stepName; + this.__explicitlySet__.add("stepName"); + return this; + } + /** + * The name of the output variable whose value has to be mapped. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("outputVariableName") + private String outputVariableName; + + /** + * The name of the output variable whose value has to be mapped. + * @param outputVariableName the value to set + * @return this builder + **/ + public Builder outputVariableName(String outputVariableName) { + this.outputVariableName = outputVariableName; + this.__explicitlySet__.add("outputVariableName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OutputVariableDetails build() { + OutputVariableDetails model = + new OutputVariableDetails(this.stepName, this.outputVariableName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OutputVariableDetails model) { + if (model.wasPropertyExplicitlySet("stepName")) { + this.stepName(model.getStepName()); + } + if (model.wasPropertyExplicitlySet("outputVariableName")) { + this.outputVariableName(model.getOutputVariableName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the task step the output variable belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private final String stepName; + + /** + * The name of the task step the output variable belongs to. + * @return the value + **/ + public String getStepName() { + return stepName; + } + + /** + * The name of the output variable whose value has to be mapped. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("outputVariableName") + private final String outputVariableName; + + /** + * The name of the output variable whose value has to be mapped. + * @return the value + **/ + public String getOutputVariableName() { + return outputVariableName; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OutputVariableDetails("); + sb.append("super=").append(super.toString()); + sb.append("stepName=").append(String.valueOf(this.stepName)); + sb.append(", outputVariableName=").append(String.valueOf(this.outputVariableName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OutputVariableDetails)) { + return false; + } + + OutputVariableDetails other = (OutputVariableDetails) o; + return java.util.Objects.equals(this.stepName, other.stepName) + && java.util.Objects.equals(this.outputVariableName, other.outputVariableName) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.stepName == null ? 43 : this.stepName.hashCode()); + result = + (result * PRIME) + + (this.outputVariableName == null + ? 43 + : this.outputVariableName.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OutputVariableInputArgument.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OutputVariableInputArgument.java new file mode 100644 index 00000000000..93c939b32c9 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OutputVariableInputArgument.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The details of the output variable that will be used as the Input argument. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OutputVariableInputArgument.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OutputVariableInputArgument extends InputArgument { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OutputVariableInputArgument build() { + OutputVariableInputArgument model = + new OutputVariableInputArgument(this.name, this.description); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OutputVariableInputArgument model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public OutputVariableInputArgument(String name, String description) { + super(name, description); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OutputVariableInputArgument("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OutputVariableInputArgument)) { + return false; + } + + OutputVariableInputArgument other = (OutputVariableInputArgument) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OutputVariableMapping.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OutputVariableMapping.java new file mode 100644 index 00000000000..66a62f85c87 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/OutputVariableMapping.java @@ -0,0 +1,166 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Output variable to Input variable mapping details. + * Output variable of a task can be used as an input variable for a subsequent task. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OutputVariableMapping.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OutputVariableMapping + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "outputVariableDetails"}) + public OutputVariableMapping(String name, OutputVariableDetails outputVariableDetails) { + super(); + this.name = name; + this.outputVariableDetails = outputVariableDetails; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the input variable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of the input variable. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("outputVariableDetails") + private OutputVariableDetails outputVariableDetails; + + public Builder outputVariableDetails(OutputVariableDetails outputVariableDetails) { + this.outputVariableDetails = outputVariableDetails; + this.__explicitlySet__.add("outputVariableDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OutputVariableMapping build() { + OutputVariableMapping model = + new OutputVariableMapping(this.name, this.outputVariableDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OutputVariableMapping model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("outputVariableDetails")) { + this.outputVariableDetails(model.getOutputVariableDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the input variable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the input variable. + * @return the value + **/ + public String getName() { + return name; + } + + @com.fasterxml.jackson.annotation.JsonProperty("outputVariableDetails") + private final OutputVariableDetails outputVariableDetails; + + public OutputVariableDetails getOutputVariableDetails() { + return outputVariableDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OutputVariableMapping("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", outputVariableDetails=").append(String.valueOf(this.outputVariableDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OutputVariableMapping)) { + return false; + } + + OutputVariableMapping other = (OutputVariableMapping) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.outputVariableDetails, other.outputVariableDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = + (result * PRIME) + + (this.outputVariableDetails == null + ? 43 + : this.outputVariableDetails.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Patch.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Patch.java new file mode 100644 index 00000000000..4f6df69b515 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Patch.java @@ -0,0 +1,986 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Patch metadata for Custom and Oracle patches. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Patch.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Patch extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "name", + "description", + "type", + "patchType", + "severity", + "timeReleased", + "artifactDetails", + "product", + "dependentPatches", + "lifecycleState", + "timeCreated", + "timeUpdated", + "lifecycleDetails", + "compartmentId", + "resourceRegion", + "freeformTags", + "definedTags", + "systemTags" + }) + public Patch( + String id, + String name, + String description, + Type type, + PatchType patchType, + PatchSeverity severity, + java.util.Date timeReleased, + ArtifactDetails artifactDetails, + PatchProduct product, + java.util.List dependentPatches, + LifecycleState lifecycleState, + java.util.Date timeCreated, + java.util.Date timeUpdated, + String lifecycleDetails, + String compartmentId, + String resourceRegion, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.name = name; + this.description = description; + this.type = type; + this.patchType = patchType; + this.severity = severity; + this.timeReleased = timeReleased; + this.artifactDetails = artifactDetails; + this.product = product; + this.dependentPatches = dependentPatches; + this.lifecycleState = lifecycleState; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleDetails = lifecycleDetails; + this.compartmentId = compartmentId; + this.resourceRegion = resourceRegion; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Should be unique within the tenancy, and cannot be changed after creation. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * A user-friendly name. Should be unique within the tenancy, and cannot be changed after creation. + * Avoid entering confidential information. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Provide information on who defined the patch. + * Example: For Custom Patches the value will be USER_DEFINED + * For Oracle Defined Patches the value will be ORACLE_DEFINED + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * Provide information on who defined the patch. + * Example: For Custom Patches the value will be USER_DEFINED + * For Oracle Defined Patches the value will be ORACLE_DEFINED + * + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patchType") + private PatchType patchType; + + public Builder patchType(PatchType patchType) { + this.patchType = patchType; + this.__explicitlySet__.add("patchType"); + return this; + } + /** + * Patch Severity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private PatchSeverity severity; + + /** + * Patch Severity. + * @param severity the value to set + * @return this builder + **/ + public Builder severity(PatchSeverity severity) { + this.severity = severity; + this.__explicitlySet__.add("severity"); + return this; + } + /** + * Date when the patch was released. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeReleased") + private java.util.Date timeReleased; + + /** + * Date when the patch was released. + * @param timeReleased the value to set + * @return this builder + **/ + public Builder timeReleased(java.util.Date timeReleased) { + this.timeReleased = timeReleased; + this.__explicitlySet__.add("timeReleased"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("artifactDetails") + private ArtifactDetails artifactDetails; + + public Builder artifactDetails(ArtifactDetails artifactDetails) { + this.artifactDetails = artifactDetails; + this.__explicitlySet__.add("artifactDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("product") + private PatchProduct product; + + public Builder product(PatchProduct product) { + this.product = product; + this.__explicitlySet__.add("product"); + return this; + } + /** + * Dependent Patches for this patch. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dependentPatches") + private java.util.List dependentPatches; + + /** + * Dependent Patches for this patch. + * + * @param dependentPatches the value to set + * @return this builder + **/ + public Builder dependentPatches(java.util.List dependentPatches) { + this.dependentPatches = dependentPatches; + this.__explicitlySet__.add("dependentPatches"); + return this; + } + /** + * The current state of the Patch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Patch. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Patch build() { + Patch model = + new Patch( + this.id, + this.name, + this.description, + this.type, + this.patchType, + this.severity, + this.timeReleased, + this.artifactDetails, + this.product, + this.dependentPatches, + this.lifecycleState, + this.timeCreated, + this.timeUpdated, + this.lifecycleDetails, + this.compartmentId, + this.resourceRegion, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Patch model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("patchType")) { + this.patchType(model.getPatchType()); + } + if (model.wasPropertyExplicitlySet("severity")) { + this.severity(model.getSeverity()); + } + if (model.wasPropertyExplicitlySet("timeReleased")) { + this.timeReleased(model.getTimeReleased()); + } + if (model.wasPropertyExplicitlySet("artifactDetails")) { + this.artifactDetails(model.getArtifactDetails()); + } + if (model.wasPropertyExplicitlySet("product")) { + this.product(model.getProduct()); + } + if (model.wasPropertyExplicitlySet("dependentPatches")) { + this.dependentPatches(model.getDependentPatches()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Should be unique within the tenancy, and cannot be changed after creation. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * A user-friendly name. Should be unique within the tenancy, and cannot be changed after creation. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Provide information on who defined the patch. + * Example: For Custom Patches the value will be USER_DEFINED + * For Oracle Defined Patches the value will be ORACLE_DEFINED + * + **/ + public enum Type { + UserDefined("USER_DEFINED"), + OracleDefined("ORACLE_DEFINED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * Provide information on who defined the patch. + * Example: For Custom Patches the value will be USER_DEFINED + * For Oracle Defined Patches the value will be ORACLE_DEFINED + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * Provide information on who defined the patch. + * Example: For Custom Patches the value will be USER_DEFINED + * For Oracle Defined Patches the value will be ORACLE_DEFINED + * + * @return the value + **/ + public Type getType() { + return type; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patchType") + private final PatchType patchType; + + public PatchType getPatchType() { + return patchType; + } + + /** + * Patch Severity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private final PatchSeverity severity; + + /** + * Patch Severity. + * @return the value + **/ + public PatchSeverity getSeverity() { + return severity; + } + + /** + * Date when the patch was released. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeReleased") + private final java.util.Date timeReleased; + + /** + * Date when the patch was released. + * @return the value + **/ + public java.util.Date getTimeReleased() { + return timeReleased; + } + + @com.fasterxml.jackson.annotation.JsonProperty("artifactDetails") + private final ArtifactDetails artifactDetails; + + public ArtifactDetails getArtifactDetails() { + return artifactDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("product") + private final PatchProduct product; + + public PatchProduct getProduct() { + return product; + } + + /** + * Dependent Patches for this patch. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dependentPatches") + private final java.util.List dependentPatches; + + /** + * Dependent Patches for this patch. + * + * @return the value + **/ + public java.util.List getDependentPatches() { + return dependentPatches; + } + + /** + * The current state of the Patch. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Inactive("INACTIVE"), + Deleted("DELETED"), + Deleting("DELETING"), + Failed("FAILED"), + Updating("UPDATING"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the Patch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Patch. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Patch("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", patchType=").append(String.valueOf(this.patchType)); + sb.append(", severity=").append(String.valueOf(this.severity)); + sb.append(", timeReleased=").append(String.valueOf(this.timeReleased)); + sb.append(", artifactDetails=").append(String.valueOf(this.artifactDetails)); + sb.append(", product=").append(String.valueOf(this.product)); + sb.append(", dependentPatches=").append(String.valueOf(this.dependentPatches)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Patch)) { + return false; + } + + Patch other = (Patch) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.patchType, other.patchType) + && java.util.Objects.equals(this.severity, other.severity) + && java.util.Objects.equals(this.timeReleased, other.timeReleased) + && java.util.Objects.equals(this.artifactDetails, other.artifactDetails) + && java.util.Objects.equals(this.product, other.product) + && java.util.Objects.equals(this.dependentPatches, other.dependentPatches) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + (this.patchType == null ? 43 : this.patchType.hashCode()); + result = (result * PRIME) + (this.severity == null ? 43 : this.severity.hashCode()); + result = (result * PRIME) + (this.timeReleased == null ? 43 : this.timeReleased.hashCode()); + result = + (result * PRIME) + + (this.artifactDetails == null ? 43 : this.artifactDetails.hashCode()); + result = (result * PRIME) + (this.product == null ? 43 : this.product.hashCode()); + result = + (result * PRIME) + + (this.dependentPatches == null ? 43 : this.dependentPatches.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchCollection.java new file mode 100644 index 00000000000..a42ebc135f7 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchCollection.java @@ -0,0 +1,132 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a patch search. Contains both PatchSummary items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = PatchCollection.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public PatchCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of patches. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of patches. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PatchCollection build() { + PatchCollection model = new PatchCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of patches. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of patches. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PatchCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchCollection)) { + return false; + } + + PatchCollection other = (PatchCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchLevelSelectionDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchLevelSelectionDetails.java new file mode 100644 index 00000000000..2a2884a7aa1 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchLevelSelectionDetails.java @@ -0,0 +1,190 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Patch Level Details. + * If you set the policy rule by selecting this option and provide the Patch level as Latest, Fleet Application Management calculates the compliance status of the product in the following ways: + * - Reports the patch process as compliant for the software identified or targets discovered at the Latest and Latest-1 version. + * - Reports the patch process as noncompliant for the software identified or targets discovered at the Latest-2 version. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PatchLevelSelectionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "selectionType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchLevelSelectionDetails extends PatchSelectionDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Patch Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchLevel") + private PatchLevel patchLevel; + + /** + * Patch Name. + * @param patchLevel the value to set + * @return this builder + **/ + public Builder patchLevel(PatchLevel patchLevel) { + this.patchLevel = patchLevel; + this.__explicitlySet__.add("patchLevel"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PatchLevelSelectionDetails build() { + PatchLevelSelectionDetails model = new PatchLevelSelectionDetails(this.patchLevel); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchLevelSelectionDetails model) { + if (model.wasPropertyExplicitlySet("patchLevel")) { + this.patchLevel(model.getPatchLevel()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PatchLevelSelectionDetails(PatchLevel patchLevel) { + super(); + this.patchLevel = patchLevel; + } + + /** + * Patch Name. + **/ + public enum PatchLevel { + Latest("LATEST"), + LatestMinusOne("LATEST_MINUS_ONE"), + LatestMinusTwo("LATEST_MINUS_TWO"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PatchLevel.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PatchLevel v : PatchLevel.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + PatchLevel(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PatchLevel create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'PatchLevel', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Patch Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchLevel") + private final PatchLevel patchLevel; + + /** + * Patch Name. + * @return the value + **/ + public PatchLevel getPatchLevel() { + return patchLevel; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PatchLevelSelectionDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", patchLevel=").append(String.valueOf(this.patchLevel)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchLevelSelectionDetails)) { + return false; + } + + PatchLevelSelectionDetails other = (PatchLevelSelectionDetails) o; + return java.util.Objects.equals(this.patchLevel, other.patchLevel) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.patchLevel == null ? 43 : this.patchLevel.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchNameSelectionDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchNameSelectionDetails.java new file mode 100644 index 00000000000..73ced6a140f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchNameSelectionDetails.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Patch Name Details. + * If you set the policy rule by selecting this option, provide a specific patch name. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PatchNameSelectionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "selectionType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchNameSelectionDetails extends PatchSelectionDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Patch Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchName") + private String patchName; + + /** + * Patch Name. + * @param patchName the value to set + * @return this builder + **/ + public Builder patchName(String patchName) { + this.patchName = patchName; + this.__explicitlySet__.add("patchName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PatchNameSelectionDetails build() { + PatchNameSelectionDetails model = new PatchNameSelectionDetails(this.patchName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchNameSelectionDetails model) { + if (model.wasPropertyExplicitlySet("patchName")) { + this.patchName(model.getPatchName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PatchNameSelectionDetails(String patchName) { + super(); + this.patchName = patchName; + } + + /** + * Patch Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchName") + private final String patchName; + + /** + * Patch Name. + * @return the value + **/ + public String getPatchName() { + return patchName; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PatchNameSelectionDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", patchName=").append(String.valueOf(this.patchName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchNameSelectionDetails)) { + return false; + } + + PatchNameSelectionDetails other = (PatchNameSelectionDetails) o; + return java.util.Objects.equals(this.patchName, other.patchName) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.patchName == null ? 43 : this.patchName.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchProduct.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchProduct.java new file mode 100644 index 00000000000..9b3b516807b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchProduct.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Product + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = PatchProduct.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchProduct extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"platformConfigurationId", "version"}) + public PatchProduct(String platformConfigurationId, String version) { + super(); + this.platformConfigurationId = platformConfigurationId; + this.version = version; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * PlatformConfiguration Id corresponding to the Product + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platformConfigurationId") + private String platformConfigurationId; + + /** + * PlatformConfiguration Id corresponding to the Product + * @param platformConfigurationId the value to set + * @return this builder + **/ + public Builder platformConfigurationId(String platformConfigurationId) { + this.platformConfigurationId = platformConfigurationId; + this.__explicitlySet__.add("platformConfigurationId"); + return this; + } + /** + * product version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * product version. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PatchProduct build() { + PatchProduct model = new PatchProduct(this.platformConfigurationId, this.version); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchProduct model) { + if (model.wasPropertyExplicitlySet("platformConfigurationId")) { + this.platformConfigurationId(model.getPlatformConfigurationId()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * PlatformConfiguration Id corresponding to the Product + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platformConfigurationId") + private final String platformConfigurationId; + + /** + * PlatformConfiguration Id corresponding to the Product + * @return the value + **/ + public String getPlatformConfigurationId() { + return platformConfigurationId; + } + + /** + * product version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * product version. + * @return the value + **/ + public String getVersion() { + return version; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PatchProduct("); + sb.append("super=").append(super.toString()); + sb.append("platformConfigurationId=").append(String.valueOf(this.platformConfigurationId)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchProduct)) { + return false; + } + + PatchProduct other = (PatchProduct) o; + return java.util.Objects.equals(this.platformConfigurationId, other.platformConfigurationId) + && java.util.Objects.equals(this.version, other.version) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.platformConfigurationId == null + ? 43 + : this.platformConfigurationId.hashCode()); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchReleaseDateSelectionDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchReleaseDateSelectionDetails.java new file mode 100644 index 00000000000..81cb2c839fd --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchReleaseDateSelectionDetails.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Days since patch release date details. + * If you set the policy rule by selecting this option and entering the number of days since release, Fleet Application Management calculates the number of days passed after the release date and reports the product as noncompliant if the days exceed the number provided in Days since release + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PatchReleaseDateSelectionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "selectionType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchReleaseDateSelectionDetails extends PatchSelectionDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Days passed since patch release. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("daysSinceRelease") + private Integer daysSinceRelease; + + /** + * Days passed since patch release. + * @param daysSinceRelease the value to set + * @return this builder + **/ + public Builder daysSinceRelease(Integer daysSinceRelease) { + this.daysSinceRelease = daysSinceRelease; + this.__explicitlySet__.add("daysSinceRelease"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PatchReleaseDateSelectionDetails build() { + PatchReleaseDateSelectionDetails model = + new PatchReleaseDateSelectionDetails(this.daysSinceRelease); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchReleaseDateSelectionDetails model) { + if (model.wasPropertyExplicitlySet("daysSinceRelease")) { + this.daysSinceRelease(model.getDaysSinceRelease()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PatchReleaseDateSelectionDetails(Integer daysSinceRelease) { + super(); + this.daysSinceRelease = daysSinceRelease; + } + + /** + * Days passed since patch release. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("daysSinceRelease") + private final Integer daysSinceRelease; + + /** + * Days passed since patch release. + * @return the value + **/ + public Integer getDaysSinceRelease() { + return daysSinceRelease; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PatchReleaseDateSelectionDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", daysSinceRelease=").append(String.valueOf(this.daysSinceRelease)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchReleaseDateSelectionDetails)) { + return false; + } + + PatchReleaseDateSelectionDetails other = (PatchReleaseDateSelectionDetails) o; + return java.util.Objects.equals(this.daysSinceRelease, other.daysSinceRelease) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.daysSinceRelease == null ? 43 : this.daysSinceRelease.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchSelectionDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchSelectionDetails.java new file mode 100644 index 00000000000..62f2a53e1da --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchSelectionDetails.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Patch Selection Details + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "selectionType", + defaultImpl = PatchSelectionDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PatchLevelSelectionDetails.class, + name = "PATCH_LEVEL" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PatchReleaseDateSelectionDetails.class, + name = "PATCH_RELEASE_DATE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PatchNameSelectionDetails.class, + name = "PATCH_NAME" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class PatchSelectionDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected PatchSelectionDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PatchSelectionDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchSelectionDetails)) { + return false; + } + + PatchSelectionDetails other = (PatchSelectionDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Selection type for the Patch. + * + **/ + public enum SelectionType { + PatchLevel("PATCH_LEVEL"), + PatchName("PATCH_NAME"), + PatchReleaseDate("PATCH_RELEASE_DATE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SelectionType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SelectionType v : SelectionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + SelectionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SelectionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'SelectionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchSeverity.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchSeverity.java new file mode 100644 index 00000000000..42d74e4219b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchSeverity.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Possible Patch severities. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public enum PatchSeverity { + Critical("CRITICAL"), + High("HIGH"), + Medium("MEDIUM"), + Low("LOW"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PatchSeverity.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PatchSeverity v : PatchSeverity.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + PatchSeverity(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PatchSeverity create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'PatchSeverity', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchSummary.java new file mode 100644 index 00000000000..7f04e9db3ac --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchSummary.java @@ -0,0 +1,839 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Summary of the Patch. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = PatchSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "name", + "description", + "type", + "patchType", + "severity", + "timeReleased", + "artifactDetails", + "product", + "compartmentId", + "lifecycleState", + "lifecycleDetails", + "timeCreated", + "timeUpdated", + "resourceRegion", + "freeformTags", + "definedTags", + "systemTags" + }) + public PatchSummary( + String id, + String name, + String description, + Patch.Type type, + PatchType patchType, + PatchSeverity severity, + java.util.Date timeReleased, + ArtifactDetails artifactDetails, + PatchProduct product, + String compartmentId, + Patch.LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated, + String resourceRegion, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.name = name; + this.description = description; + this.type = type; + this.patchType = patchType; + this.severity = severity; + this.timeReleased = timeReleased; + this.artifactDetails = artifactDetails; + this.product = product; + this.compartmentId = compartmentId; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.resourceRegion = resourceRegion; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Should be unique within the tenancy, and cannot be changed after creation. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * A user-friendly name. Should be unique within the tenancy, and cannot be changed after creation. + * Avoid entering confidential information. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Provide information on who defined the patch. + * Example: For Custom Patches the value will be USER_DEFINED + * For Oracle Defined Patches the value will be ORACLE_DEFINED + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Patch.Type type; + + /** + * Provide information on who defined the patch. + * Example: For Custom Patches the value will be USER_DEFINED + * For Oracle Defined Patches the value will be ORACLE_DEFINED + * + * @param type the value to set + * @return this builder + **/ + public Builder type(Patch.Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patchType") + private PatchType patchType; + + public Builder patchType(PatchType patchType) { + this.patchType = patchType; + this.__explicitlySet__.add("patchType"); + return this; + } + /** + * Patch Severity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private PatchSeverity severity; + + /** + * Patch Severity. + * @param severity the value to set + * @return this builder + **/ + public Builder severity(PatchSeverity severity) { + this.severity = severity; + this.__explicitlySet__.add("severity"); + return this; + } + /** + * Date when the patch was released. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeReleased") + private java.util.Date timeReleased; + + /** + * Date when the patch was released. + * @param timeReleased the value to set + * @return this builder + **/ + public Builder timeReleased(java.util.Date timeReleased) { + this.timeReleased = timeReleased; + this.__explicitlySet__.add("timeReleased"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("artifactDetails") + private ArtifactDetails artifactDetails; + + public Builder artifactDetails(ArtifactDetails artifactDetails) { + this.artifactDetails = artifactDetails; + this.__explicitlySet__.add("artifactDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("product") + private PatchProduct product; + + public Builder product(PatchProduct product) { + this.product = product; + this.__explicitlySet__.add("product"); + return this; + } + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The current state of the Patch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private Patch.LifecycleState lifecycleState; + + /** + * The current state of the Patch. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(Patch.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PatchSummary build() { + PatchSummary model = + new PatchSummary( + this.id, + this.name, + this.description, + this.type, + this.patchType, + this.severity, + this.timeReleased, + this.artifactDetails, + this.product, + this.compartmentId, + this.lifecycleState, + this.lifecycleDetails, + this.timeCreated, + this.timeUpdated, + this.resourceRegion, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("patchType")) { + this.patchType(model.getPatchType()); + } + if (model.wasPropertyExplicitlySet("severity")) { + this.severity(model.getSeverity()); + } + if (model.wasPropertyExplicitlySet("timeReleased")) { + this.timeReleased(model.getTimeReleased()); + } + if (model.wasPropertyExplicitlySet("artifactDetails")) { + this.artifactDetails(model.getArtifactDetails()); + } + if (model.wasPropertyExplicitlySet("product")) { + this.product(model.getProduct()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Should be unique within the tenancy, and cannot be changed after creation. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * A user-friendly name. Should be unique within the tenancy, and cannot be changed after creation. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Provide information on who defined the patch. + * Example: For Custom Patches the value will be USER_DEFINED + * For Oracle Defined Patches the value will be ORACLE_DEFINED + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Patch.Type type; + + /** + * Provide information on who defined the patch. + * Example: For Custom Patches the value will be USER_DEFINED + * For Oracle Defined Patches the value will be ORACLE_DEFINED + * + * @return the value + **/ + public Patch.Type getType() { + return type; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patchType") + private final PatchType patchType; + + public PatchType getPatchType() { + return patchType; + } + + /** + * Patch Severity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private final PatchSeverity severity; + + /** + * Patch Severity. + * @return the value + **/ + public PatchSeverity getSeverity() { + return severity; + } + + /** + * Date when the patch was released. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeReleased") + private final java.util.Date timeReleased; + + /** + * Date when the patch was released. + * @return the value + **/ + public java.util.Date getTimeReleased() { + return timeReleased; + } + + @com.fasterxml.jackson.annotation.JsonProperty("artifactDetails") + private final ArtifactDetails artifactDetails; + + public ArtifactDetails getArtifactDetails() { + return artifactDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("product") + private final PatchProduct product; + + public PatchProduct getProduct() { + return product; + } + + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The current state of the Patch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final Patch.LifecycleState lifecycleState; + + /** + * The current state of the Patch. + * @return the value + **/ + public Patch.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PatchSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", patchType=").append(String.valueOf(this.patchType)); + sb.append(", severity=").append(String.valueOf(this.severity)); + sb.append(", timeReleased=").append(String.valueOf(this.timeReleased)); + sb.append(", artifactDetails=").append(String.valueOf(this.artifactDetails)); + sb.append(", product=").append(String.valueOf(this.product)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchSummary)) { + return false; + } + + PatchSummary other = (PatchSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.patchType, other.patchType) + && java.util.Objects.equals(this.severity, other.severity) + && java.util.Objects.equals(this.timeReleased, other.timeReleased) + && java.util.Objects.equals(this.artifactDetails, other.artifactDetails) + && java.util.Objects.equals(this.product, other.product) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + (this.patchType == null ? 43 : this.patchType.hashCode()); + result = (result * PRIME) + (this.severity == null ? 43 : this.severity.hashCode()); + result = (result * PRIME) + (this.timeReleased == null ? 43 : this.timeReleased.hashCode()); + result = + (result * PRIME) + + (this.artifactDetails == null ? 43 : this.artifactDetails.hashCode()); + result = (result * PRIME) + (this.product == null ? 43 : this.product.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchType.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchType.java new file mode 100644 index 00000000000..a9c1269d511 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchType.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Patch Type + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = PatchType.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchType extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"platformConfigurationId"}) + public PatchType(String platformConfigurationId) { + super(); + this.platformConfigurationId = platformConfigurationId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * PlatformConfiguration Id corresponding to the Patch Type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platformConfigurationId") + private String platformConfigurationId; + + /** + * PlatformConfiguration Id corresponding to the Patch Type + * @param platformConfigurationId the value to set + * @return this builder + **/ + public Builder platformConfigurationId(String platformConfigurationId) { + this.platformConfigurationId = platformConfigurationId; + this.__explicitlySet__.add("platformConfigurationId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PatchType build() { + PatchType model = new PatchType(this.platformConfigurationId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchType model) { + if (model.wasPropertyExplicitlySet("platformConfigurationId")) { + this.platformConfigurationId(model.getPlatformConfigurationId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * PlatformConfiguration Id corresponding to the Patch Type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platformConfigurationId") + private final String platformConfigurationId; + + /** + * PlatformConfiguration Id corresponding to the Patch Type + * @return the value + **/ + public String getPlatformConfigurationId() { + return platformConfigurationId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PatchType("); + sb.append("super=").append(super.toString()); + sb.append("platformConfigurationId=").append(String.valueOf(this.platformConfigurationId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchType)) { + return false; + } + + PatchType other = (PatchType) o; + return java.util.Objects.equals(this.platformConfigurationId, other.platformConfigurationId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.platformConfigurationId == null + ? 43 + : this.platformConfigurationId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchTypeConfigCategoryDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchTypeConfigCategoryDetails.java new file mode 100644 index 00000000000..c9f34f7cd41 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PatchTypeConfigCategoryDetails.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Patch Type Config Category Details. + * Defines software patch types as per product standards referred under available Patches for supported products. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PatchTypeConfigCategoryDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "configCategory" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PatchTypeConfigCategoryDetails extends ConfigCategoryDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PatchTypeConfigCategoryDetails build() { + PatchTypeConfigCategoryDetails model = new PatchTypeConfigCategoryDetails(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PatchTypeConfigCategoryDetails model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PatchTypeConfigCategoryDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PatchTypeConfigCategoryDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchTypeConfigCategoryDetails)) { + return false; + } + + PatchTypeConfigCategoryDetails other = (PatchTypeConfigCategoryDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PauseDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PauseDetails.java new file mode 100644 index 00000000000..595373dd8bf --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PauseDetails.java @@ -0,0 +1,128 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Pause Details + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "kind", + defaultImpl = PauseDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = UserActionBasedPauseDetails.class, + name = "USER_ACTION" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = TimeBasedPauseDetails.class, + name = "TIME_BASED" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class PauseDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected PauseDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PauseDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PauseDetails)) { + return false; + } + + PauseDetails other = (PauseDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Pause based On. + * + **/ + public enum Kind { + UserAction("USER_ACTION"), + TimeBased("TIME_BASED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Kind.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Kind v : Kind.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Kind(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Kind create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Kind', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PlainTextCredentialDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PlainTextCredentialDetails.java new file mode 100644 index 00000000000..08c2eb85aaf --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PlainTextCredentialDetails.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details for plain text credentials. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PlainTextCredentialDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "credentialType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PlainTextCredentialDetails extends CredentialDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The value corresponding to the credential. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + /** + * The value corresponding to the credential. + * @param value the value to set + * @return this builder + **/ + public Builder value(String value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PlainTextCredentialDetails build() { + PlainTextCredentialDetails model = new PlainTextCredentialDetails(this.value); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PlainTextCredentialDetails model) { + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PlainTextCredentialDetails(String value) { + super(); + this.value = value; + } + + /** + * The value corresponding to the credential. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final String value; + + /** + * The value corresponding to the credential. + * @return the value + **/ + public String getValue() { + return value; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PlainTextCredentialDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", value=").append(String.valueOf(this.value)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PlainTextCredentialDetails)) { + return false; + } + + PlainTextCredentialDetails other = (PlainTextCredentialDetails) o; + return java.util.Objects.equals(this.value, other.value) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PlatformConfiguration.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PlatformConfiguration.java new file mode 100644 index 00000000000..40a3c3feb5c --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PlatformConfiguration.java @@ -0,0 +1,805 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Fleet Application Management Platform Configuration . + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PlatformConfiguration.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PlatformConfiguration + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "description", + "timeCreated", + "timeUpdated", + "resourceRegion", + "type", + "configCategoryDetails", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public PlatformConfiguration( + String id, + String compartmentId, + String displayName, + String description, + java.util.Date timeCreated, + java.util.Date timeUpdated, + String resourceRegion, + Type type, + ConfigCategoryDetails configCategoryDetails, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.description = description; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.resourceRegion = resourceRegion; + this.type = type; + this.configCategoryDetails = configCategoryDetails; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * The type of the configuration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * The type of the configuration. + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("configCategoryDetails") + private ConfigCategoryDetails configCategoryDetails; + + public Builder configCategoryDetails(ConfigCategoryDetails configCategoryDetails) { + this.configCategoryDetails = configCategoryDetails; + this.__explicitlySet__.add("configCategoryDetails"); + return this; + } + /** + * The current state of the PlatformConfiguration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the PlatformConfiguration. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PlatformConfiguration build() { + PlatformConfiguration model = + new PlatformConfiguration( + this.id, + this.compartmentId, + this.displayName, + this.description, + this.timeCreated, + this.timeUpdated, + this.resourceRegion, + this.type, + this.configCategoryDetails, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PlatformConfiguration model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("configCategoryDetails")) { + this.configCategoryDetails(model.getConfigCategoryDetails()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * The type of the configuration. + **/ + public enum Type { + UserDefined("USER_DEFINED"), + OracleDefined("ORACLE_DEFINED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * The type of the configuration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * The type of the configuration. + * @return the value + **/ + public Type getType() { + return type; + } + + @com.fasterxml.jackson.annotation.JsonProperty("configCategoryDetails") + private final ConfigCategoryDetails configCategoryDetails; + + public ConfigCategoryDetails getConfigCategoryDetails() { + return configCategoryDetails; + } + + /** + * The current state of the PlatformConfiguration. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Deleted("DELETED"), + Failed("FAILED"), + Deleting("DELETING"), + Updating("UPDATING"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the PlatformConfiguration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the PlatformConfiguration. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PlatformConfiguration("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", configCategoryDetails=").append(String.valueOf(this.configCategoryDetails)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PlatformConfiguration)) { + return false; + } + + PlatformConfiguration other = (PlatformConfiguration) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.configCategoryDetails, other.configCategoryDetails) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.configCategoryDetails == null + ? 43 + : this.configCategoryDetails.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PlatformConfigurationCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PlatformConfigurationCollection.java new file mode 100644 index 00000000000..c6de0c924d9 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PlatformConfigurationCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a platform configuration search. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PlatformConfigurationCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PlatformConfigurationCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public PlatformConfigurationCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of configurations + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of configurations + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PlatformConfigurationCollection build() { + PlatformConfigurationCollection model = new PlatformConfigurationCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PlatformConfigurationCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of configurations + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of configurations + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PlatformConfigurationCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PlatformConfigurationCollection)) { + return false; + } + + PlatformConfigurationCollection other = (PlatformConfigurationCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PlatformConfigurationSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PlatformConfigurationSummary.java new file mode 100644 index 00000000000..9845c52c12e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PlatformConfigurationSummary.java @@ -0,0 +1,708 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Summary of the PlatformConfiguration. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PlatformConfigurationSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PlatformConfigurationSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "description", + "timeCreated", + "timeUpdated", + "resourceRegion", + "type", + "configCategoryDetails", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public PlatformConfigurationSummary( + String id, + String compartmentId, + String displayName, + String description, + java.util.Date timeCreated, + java.util.Date timeUpdated, + String resourceRegion, + PlatformConfiguration.Type type, + ConfigCategoryDetails configCategoryDetails, + PlatformConfiguration.LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.description = description; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.resourceRegion = resourceRegion; + this.type = type; + this.configCategoryDetails = configCategoryDetails; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * The type of the configuration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private PlatformConfiguration.Type type; + + /** + * The type of the configuration. + * @param type the value to set + * @return this builder + **/ + public Builder type(PlatformConfiguration.Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("configCategoryDetails") + private ConfigCategoryDetails configCategoryDetails; + + public Builder configCategoryDetails(ConfigCategoryDetails configCategoryDetails) { + this.configCategoryDetails = configCategoryDetails; + this.__explicitlySet__.add("configCategoryDetails"); + return this; + } + /** + * The current state of the PlatformConfiguration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private PlatformConfiguration.LifecycleState lifecycleState; + + /** + * The current state of the PlatformConfiguration. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(PlatformConfiguration.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PlatformConfigurationSummary build() { + PlatformConfigurationSummary model = + new PlatformConfigurationSummary( + this.id, + this.compartmentId, + this.displayName, + this.description, + this.timeCreated, + this.timeUpdated, + this.resourceRegion, + this.type, + this.configCategoryDetails, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PlatformConfigurationSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("configCategoryDetails")) { + this.configCategoryDetails(model.getConfigCategoryDetails()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * The type of the configuration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final PlatformConfiguration.Type type; + + /** + * The type of the configuration. + * @return the value + **/ + public PlatformConfiguration.Type getType() { + return type; + } + + @com.fasterxml.jackson.annotation.JsonProperty("configCategoryDetails") + private final ConfigCategoryDetails configCategoryDetails; + + public ConfigCategoryDetails getConfigCategoryDetails() { + return configCategoryDetails; + } + + /** + * The current state of the PlatformConfiguration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final PlatformConfiguration.LifecycleState lifecycleState; + + /** + * The current state of the PlatformConfiguration. + * @return the value + **/ + public PlatformConfiguration.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PlatformConfigurationSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", configCategoryDetails=").append(String.valueOf(this.configCategoryDetails)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PlatformConfigurationSummary)) { + return false; + } + + PlatformConfigurationSummary other = (PlatformConfigurationSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.configCategoryDetails, other.configCategoryDetails) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.configCategoryDetails == null + ? 43 + : this.configCategoryDetails.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PlatformSpecificArtifact.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PlatformSpecificArtifact.java new file mode 100644 index 00000000000..3be0b46a456 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PlatformSpecificArtifact.java @@ -0,0 +1,294 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Patch artifact metadata Details which is platform specific. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PlatformSpecificArtifact.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PlatformSpecificArtifact + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"content", "osType", "architecture"}) + public PlatformSpecificArtifact( + ContentDetails content, OsType osType, Architecture architecture) { + super(); + this.content = content; + this.osType = osType; + this.architecture = architecture; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("content") + private ContentDetails content; + + public Builder content(ContentDetails content) { + this.content = content; + this.__explicitlySet__.add("content"); + return this; + } + /** + * The OS type the patch is applicable for. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osType") + private OsType osType; + + /** + * The OS type the patch is applicable for. + * @param osType the value to set + * @return this builder + **/ + public Builder osType(OsType osType) { + this.osType = osType; + this.__explicitlySet__.add("osType"); + return this; + } + /** + * System architecture. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("architecture") + private Architecture architecture; + + /** + * System architecture. + * @param architecture the value to set + * @return this builder + **/ + public Builder architecture(Architecture architecture) { + this.architecture = architecture; + this.__explicitlySet__.add("architecture"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PlatformSpecificArtifact build() { + PlatformSpecificArtifact model = + new PlatformSpecificArtifact(this.content, this.osType, this.architecture); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PlatformSpecificArtifact model) { + if (model.wasPropertyExplicitlySet("content")) { + this.content(model.getContent()); + } + if (model.wasPropertyExplicitlySet("osType")) { + this.osType(model.getOsType()); + } + if (model.wasPropertyExplicitlySet("architecture")) { + this.architecture(model.getArchitecture()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("content") + private final ContentDetails content; + + public ContentDetails getContent() { + return content; + } + + /** + * The OS type the patch is applicable for. + **/ + public enum OsType { + Windows("WINDOWS"), + Linux("LINUX"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(OsType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OsType v : OsType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + OsType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OsType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'OsType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The OS type the patch is applicable for. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osType") + private final OsType osType; + + /** + * The OS type the patch is applicable for. + * @return the value + **/ + public OsType getOsType() { + return osType; + } + + /** + * System architecture. + **/ + public enum Architecture { + Arm64("ARM_64"), + X64("X64"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(Architecture.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Architecture v : Architecture.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Architecture(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Architecture create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Architecture', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * System architecture. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("architecture") + private final Architecture architecture; + + /** + * System architecture. + * @return the value + **/ + public Architecture getArchitecture() { + return architecture; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PlatformSpecificArtifact("); + sb.append("super=").append(super.toString()); + sb.append("content=").append(String.valueOf(this.content)); + sb.append(", osType=").append(String.valueOf(this.osType)); + sb.append(", architecture=").append(String.valueOf(this.architecture)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PlatformSpecificArtifact)) { + return false; + } + + PlatformSpecificArtifact other = (PlatformSpecificArtifact) o; + return java.util.Objects.equals(this.content, other.content) + && java.util.Objects.equals(this.osType, other.osType) + && java.util.Objects.equals(this.architecture, other.architecture) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.content == null ? 43 : this.content.hashCode()); + result = (result * PRIME) + (this.osType == null ? 43 : this.osType.hashCode()); + result = (result * PRIME) + (this.architecture == null ? 43 : this.architecture.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PlatformSpecificArtifactDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PlatformSpecificArtifactDetails.java new file mode 100644 index 00000000000..a1d354f5f46 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PlatformSpecificArtifactDetails.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Patch artifact description and content details which is platform specific + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PlatformSpecificArtifactDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "category" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PlatformSpecificArtifactDetails extends ArtifactDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Artifacts. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("artifacts") + private java.util.List artifacts; + + /** + * Artifacts. + * + * @param artifacts the value to set + * @return this builder + **/ + public Builder artifacts(java.util.List artifacts) { + this.artifacts = artifacts; + this.__explicitlySet__.add("artifacts"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PlatformSpecificArtifactDetails build() { + PlatformSpecificArtifactDetails model = + new PlatformSpecificArtifactDetails(this.artifacts); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PlatformSpecificArtifactDetails model) { + if (model.wasPropertyExplicitlySet("artifacts")) { + this.artifacts(model.getArtifacts()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PlatformSpecificArtifactDetails(java.util.List artifacts) { + super(); + this.artifacts = artifacts; + } + + /** + * Artifacts. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("artifacts") + private final java.util.List artifacts; + + /** + * Artifacts. + * + * @return the value + **/ + public java.util.List getArtifacts() { + return artifacts; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PlatformSpecificArtifactDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", artifacts=").append(String.valueOf(this.artifacts)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PlatformSpecificArtifactDetails)) { + return false; + } + + PlatformSpecificArtifactDetails other = (PlatformSpecificArtifactDetails) o; + return java.util.Objects.equals(this.artifacts, other.artifacts) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.artifacts == null ? 43 : this.artifacts.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Preferences.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Preferences.java new file mode 100644 index 00000000000..813abeaf821 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Preferences.java @@ -0,0 +1,225 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Preferences to send notifications on the fleet activities. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Preferences.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Preferences extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "onUpcomingSchedule", + "onJobFailure", + "onTopologyModification" + }) + public Preferences( + Boolean onUpcomingSchedule, Boolean onJobFailure, Boolean onTopologyModification) { + super(); + this.onUpcomingSchedule = onUpcomingSchedule; + this.onJobFailure = onJobFailure; + this.onTopologyModification = onTopologyModification; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Enables notification on upcoming schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onUpcomingSchedule") + private Boolean onUpcomingSchedule; + + /** + * Enables notification on upcoming schedule. + * @param onUpcomingSchedule the value to set + * @return this builder + **/ + public Builder onUpcomingSchedule(Boolean onUpcomingSchedule) { + this.onUpcomingSchedule = onUpcomingSchedule; + this.__explicitlySet__.add("onUpcomingSchedule"); + return this; + } + /** + * Enables or disables notification on Job Failures. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onJobFailure") + private Boolean onJobFailure; + + /** + * Enables or disables notification on Job Failures. + * @param onJobFailure the value to set + * @return this builder + **/ + public Builder onJobFailure(Boolean onJobFailure) { + this.onJobFailure = onJobFailure; + this.__explicitlySet__.add("onJobFailure"); + return this; + } + /** + * Enables or disables notification on Environment Fleet Topology Modification. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onTopologyModification") + private Boolean onTopologyModification; + + /** + * Enables or disables notification on Environment Fleet Topology Modification. + * @param onTopologyModification the value to set + * @return this builder + **/ + public Builder onTopologyModification(Boolean onTopologyModification) { + this.onTopologyModification = onTopologyModification; + this.__explicitlySet__.add("onTopologyModification"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Preferences build() { + Preferences model = + new Preferences( + this.onUpcomingSchedule, + this.onJobFailure, + this.onTopologyModification); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Preferences model) { + if (model.wasPropertyExplicitlySet("onUpcomingSchedule")) { + this.onUpcomingSchedule(model.getOnUpcomingSchedule()); + } + if (model.wasPropertyExplicitlySet("onJobFailure")) { + this.onJobFailure(model.getOnJobFailure()); + } + if (model.wasPropertyExplicitlySet("onTopologyModification")) { + this.onTopologyModification(model.getOnTopologyModification()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Enables notification on upcoming schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onUpcomingSchedule") + private final Boolean onUpcomingSchedule; + + /** + * Enables notification on upcoming schedule. + * @return the value + **/ + public Boolean getOnUpcomingSchedule() { + return onUpcomingSchedule; + } + + /** + * Enables or disables notification on Job Failures. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onJobFailure") + private final Boolean onJobFailure; + + /** + * Enables or disables notification on Job Failures. + * @return the value + **/ + public Boolean getOnJobFailure() { + return onJobFailure; + } + + /** + * Enables or disables notification on Environment Fleet Topology Modification. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("onTopologyModification") + private final Boolean onTopologyModification; + + /** + * Enables or disables notification on Environment Fleet Topology Modification. + * @return the value + **/ + public Boolean getOnTopologyModification() { + return onTopologyModification; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Preferences("); + sb.append("super=").append(super.toString()); + sb.append("onUpcomingSchedule=").append(String.valueOf(this.onUpcomingSchedule)); + sb.append(", onJobFailure=").append(String.valueOf(this.onJobFailure)); + sb.append(", onTopologyModification=").append(String.valueOf(this.onTopologyModification)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Preferences)) { + return false; + } + + Preferences other = (Preferences) o; + return java.util.Objects.equals(this.onUpcomingSchedule, other.onUpcomingSchedule) + && java.util.Objects.equals(this.onJobFailure, other.onJobFailure) + && java.util.Objects.equals( + this.onTopologyModification, other.onTopologyModification) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.onUpcomingSchedule == null + ? 43 + : this.onUpcomingSchedule.hashCode()); + result = (result * PRIME) + (this.onJobFailure == null ? 43 : this.onJobFailure.hashCode()); + result = + (result * PRIME) + + (this.onTopologyModification == null + ? 43 + : this.onTopologyModification.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ProductConfigCategoryDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ProductConfigCategoryDetails.java new file mode 100644 index 00000000000..161d649d665 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ProductConfigCategoryDetails.java @@ -0,0 +1,340 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Product Config Category Details. + * Defines individual products which contribute to the applications hosting on the resources that are to be managed. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ProductConfigCategoryDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "configCategory" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ProductConfigCategoryDetails extends ConfigCategoryDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Versions associated with the PRODUCT . + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("versions") + private java.util.List versions; + + /** + * Versions associated with the PRODUCT . + * + * @param versions the value to set + * @return this builder + **/ + public Builder versions(java.util.List versions) { + this.versions = versions; + this.__explicitlySet__.add("versions"); + return this; + } + /** + * OCID for the Credential name to be associated with the Product. + * These are useful for target discovery or lifecycle management activities, for example, Oracle WebLogic admin credentials for Oracle WebLogic Application server. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("credentials") + private java.util.List credentials; + + /** + * OCID for the Credential name to be associated with the Product. + * These are useful for target discovery or lifecycle management activities, for example, Oracle WebLogic admin credentials for Oracle WebLogic Application server. + * + * @param credentials the value to set + * @return this builder + **/ + public Builder credentials(java.util.List credentials) { + this.credentials = credentials; + this.__explicitlySet__.add("credentials"); + return this; + } + /** + * Various components of the Product. + * For example:The administration server or node manager can be the components of the Oracle WebLogic Application server. + * Forms server or concurrent manager can be the components of the Oracle E-Business Suite. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("components") + private java.util.List components; + + /** + * Various components of the Product. + * For example:The administration server or node manager can be the components of the Oracle WebLogic Application server. + * Forms server or concurrent manager can be the components of the Oracle E-Business Suite. + * + * @param components the value to set + * @return this builder + **/ + public Builder components(java.util.List components) { + this.components = components; + this.__explicitlySet__.add("components"); + return this; + } + /** + * Products compatible with this Product. + * Provide products from the list of other products you have created that are compatible with the present one + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compatibleProducts") + private java.util.List compatibleProducts; + + /** + * Products compatible with this Product. + * Provide products from the list of other products you have created that are compatible with the present one + * + * @param compatibleProducts the value to set + * @return this builder + **/ + public Builder compatibleProducts( + java.util.List compatibleProducts) { + this.compatibleProducts = compatibleProducts; + this.__explicitlySet__.add("compatibleProducts"); + return this; + } + /** + * Patch Types associated with this Product. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchTypes") + private java.util.List patchTypes; + + /** + * Patch Types associated with this Product. + * + * @param patchTypes the value to set + * @return this builder + **/ + public Builder patchTypes(java.util.List patchTypes) { + this.patchTypes = patchTypes; + this.__explicitlySet__.add("patchTypes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ProductConfigCategoryDetails build() { + ProductConfigCategoryDetails model = + new ProductConfigCategoryDetails( + this.versions, + this.credentials, + this.components, + this.compatibleProducts, + this.patchTypes); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ProductConfigCategoryDetails model) { + if (model.wasPropertyExplicitlySet("versions")) { + this.versions(model.getVersions()); + } + if (model.wasPropertyExplicitlySet("credentials")) { + this.credentials(model.getCredentials()); + } + if (model.wasPropertyExplicitlySet("components")) { + this.components(model.getComponents()); + } + if (model.wasPropertyExplicitlySet("compatibleProducts")) { + this.compatibleProducts(model.getCompatibleProducts()); + } + if (model.wasPropertyExplicitlySet("patchTypes")) { + this.patchTypes(model.getPatchTypes()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ProductConfigCategoryDetails( + java.util.List versions, + java.util.List credentials, + java.util.List components, + java.util.List compatibleProducts, + java.util.List patchTypes) { + super(); + this.versions = versions; + this.credentials = credentials; + this.components = components; + this.compatibleProducts = compatibleProducts; + this.patchTypes = patchTypes; + } + + /** + * Versions associated with the PRODUCT . + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("versions") + private final java.util.List versions; + + /** + * Versions associated with the PRODUCT . + * + * @return the value + **/ + public java.util.List getVersions() { + return versions; + } + + /** + * OCID for the Credential name to be associated with the Product. + * These are useful for target discovery or lifecycle management activities, for example, Oracle WebLogic admin credentials for Oracle WebLogic Application server. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("credentials") + private final java.util.List credentials; + + /** + * OCID for the Credential name to be associated with the Product. + * These are useful for target discovery or lifecycle management activities, for example, Oracle WebLogic admin credentials for Oracle WebLogic Application server. + * + * @return the value + **/ + public java.util.List getCredentials() { + return credentials; + } + + /** + * Various components of the Product. + * For example:The administration server or node manager can be the components of the Oracle WebLogic Application server. + * Forms server or concurrent manager can be the components of the Oracle E-Business Suite. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("components") + private final java.util.List components; + + /** + * Various components of the Product. + * For example:The administration server or node manager can be the components of the Oracle WebLogic Application server. + * Forms server or concurrent manager can be the components of the Oracle E-Business Suite. + * + * @return the value + **/ + public java.util.List getComponents() { + return components; + } + + /** + * Products compatible with this Product. + * Provide products from the list of other products you have created that are compatible with the present one + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compatibleProducts") + private final java.util.List compatibleProducts; + + /** + * Products compatible with this Product. + * Provide products from the list of other products you have created that are compatible with the present one + * + * @return the value + **/ + public java.util.List getCompatibleProducts() { + return compatibleProducts; + } + + /** + * Patch Types associated with this Product. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchTypes") + private final java.util.List patchTypes; + + /** + * Patch Types associated with this Product. + * + * @return the value + **/ + public java.util.List getPatchTypes() { + return patchTypes; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ProductConfigCategoryDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", versions=").append(String.valueOf(this.versions)); + sb.append(", credentials=").append(String.valueOf(this.credentials)); + sb.append(", components=").append(String.valueOf(this.components)); + sb.append(", compatibleProducts=").append(String.valueOf(this.compatibleProducts)); + sb.append(", patchTypes=").append(String.valueOf(this.patchTypes)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ProductConfigCategoryDetails)) { + return false; + } + + ProductConfigCategoryDetails other = (ProductConfigCategoryDetails) o; + return java.util.Objects.equals(this.versions, other.versions) + && java.util.Objects.equals(this.credentials, other.credentials) + && java.util.Objects.equals(this.components, other.components) + && java.util.Objects.equals(this.compatibleProducts, other.compatibleProducts) + && java.util.Objects.equals(this.patchTypes, other.patchTypes) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.versions == null ? 43 : this.versions.hashCode()); + result = (result * PRIME) + (this.credentials == null ? 43 : this.credentials.hashCode()); + result = (result * PRIME) + (this.components == null ? 43 : this.components.hashCode()); + result = + (result * PRIME) + + (this.compatibleProducts == null + ? 43 + : this.compatibleProducts.hashCode()); + result = (result * PRIME) + (this.patchTypes == null ? 43 : this.patchTypes.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ProductStackAsProductSubCategoryDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ProductStackAsProductSubCategoryDetails.java new file mode 100644 index 00000000000..c2e36f0c4c6 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ProductStackAsProductSubCategoryDetails.java @@ -0,0 +1,285 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Consider Product stack as product.To be provided if the product stack should be considered as a Product also. + * Allows compliance reporting and patching against the product stack target. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ProductStackAsProductSubCategoryDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "subCategory" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ProductStackAsProductSubCategoryDetails extends ProductStackSubCategoryDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Versions associated with the PRODUCT . + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("versions") + private java.util.List versions; + + /** + * Versions associated with the PRODUCT . + * + * @param versions the value to set + * @return this builder + **/ + public Builder versions(java.util.List versions) { + this.versions = versions; + this.__explicitlySet__.add("versions"); + return this; + } + /** + * OCID for the Credential name to be associated with the Product Stack. + * These are useful for target discovery or lifecycle management activities, for example, Oracle WebLogic admin credentials for Oracle WebLogic Application server. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("credentials") + private java.util.List credentials; + + /** + * OCID for the Credential name to be associated with the Product Stack. + * These are useful for target discovery or lifecycle management activities, for example, Oracle WebLogic admin credentials for Oracle WebLogic Application server. + * + * @param credentials the value to set + * @return this builder + **/ + public Builder credentials(java.util.List credentials) { + this.credentials = credentials; + this.__explicitlySet__.add("credentials"); + return this; + } + /** + * Various components of the Product. + * For example:The administration server or node manager can be the components of the Oracle WebLogic Application server. + * Forms server or concurrent manager can be the components of the Oracle E-Business Suite. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("components") + private java.util.List components; + + /** + * Various components of the Product. + * For example:The administration server or node manager can be the components of the Oracle WebLogic Application server. + * Forms server or concurrent manager can be the components of the Oracle E-Business Suite. + * + * @param components the value to set + * @return this builder + **/ + public Builder components(java.util.List components) { + this.components = components; + this.__explicitlySet__.add("components"); + return this; + } + /** + * Patch Types associated with this Product Stack which will be considered as Product. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchTypes") + private java.util.List patchTypes; + + /** + * Patch Types associated with this Product Stack which will be considered as Product. + * + * @param patchTypes the value to set + * @return this builder + **/ + public Builder patchTypes(java.util.List patchTypes) { + this.patchTypes = patchTypes; + this.__explicitlySet__.add("patchTypes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ProductStackAsProductSubCategoryDetails build() { + ProductStackAsProductSubCategoryDetails model = + new ProductStackAsProductSubCategoryDetails( + this.versions, this.credentials, this.components, this.patchTypes); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ProductStackAsProductSubCategoryDetails model) { + if (model.wasPropertyExplicitlySet("versions")) { + this.versions(model.getVersions()); + } + if (model.wasPropertyExplicitlySet("credentials")) { + this.credentials(model.getCredentials()); + } + if (model.wasPropertyExplicitlySet("components")) { + this.components(model.getComponents()); + } + if (model.wasPropertyExplicitlySet("patchTypes")) { + this.patchTypes(model.getPatchTypes()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ProductStackAsProductSubCategoryDetails( + java.util.List versions, + java.util.List credentials, + java.util.List components, + java.util.List patchTypes) { + super(); + this.versions = versions; + this.credentials = credentials; + this.components = components; + this.patchTypes = patchTypes; + } + + /** + * Versions associated with the PRODUCT . + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("versions") + private final java.util.List versions; + + /** + * Versions associated with the PRODUCT . + * + * @return the value + **/ + public java.util.List getVersions() { + return versions; + } + + /** + * OCID for the Credential name to be associated with the Product Stack. + * These are useful for target discovery or lifecycle management activities, for example, Oracle WebLogic admin credentials for Oracle WebLogic Application server. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("credentials") + private final java.util.List credentials; + + /** + * OCID for the Credential name to be associated with the Product Stack. + * These are useful for target discovery or lifecycle management activities, for example, Oracle WebLogic admin credentials for Oracle WebLogic Application server. + * + * @return the value + **/ + public java.util.List getCredentials() { + return credentials; + } + + /** + * Various components of the Product. + * For example:The administration server or node manager can be the components of the Oracle WebLogic Application server. + * Forms server or concurrent manager can be the components of the Oracle E-Business Suite. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("components") + private final java.util.List components; + + /** + * Various components of the Product. + * For example:The administration server or node manager can be the components of the Oracle WebLogic Application server. + * Forms server or concurrent manager can be the components of the Oracle E-Business Suite. + * + * @return the value + **/ + public java.util.List getComponents() { + return components; + } + + /** + * Patch Types associated with this Product Stack which will be considered as Product. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchTypes") + private final java.util.List patchTypes; + + /** + * Patch Types associated with this Product Stack which will be considered as Product. + * + * @return the value + **/ + public java.util.List getPatchTypes() { + return patchTypes; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ProductStackAsProductSubCategoryDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", versions=").append(String.valueOf(this.versions)); + sb.append(", credentials=").append(String.valueOf(this.credentials)); + sb.append(", components=").append(String.valueOf(this.components)); + sb.append(", patchTypes=").append(String.valueOf(this.patchTypes)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ProductStackAsProductSubCategoryDetails)) { + return false; + } + + ProductStackAsProductSubCategoryDetails other = (ProductStackAsProductSubCategoryDetails) o; + return java.util.Objects.equals(this.versions, other.versions) + && java.util.Objects.equals(this.credentials, other.credentials) + && java.util.Objects.equals(this.components, other.components) + && java.util.Objects.equals(this.patchTypes, other.patchTypes) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.versions == null ? 43 : this.versions.hashCode()); + result = (result * PRIME) + (this.credentials == null ? 43 : this.credentials.hashCode()); + result = (result * PRIME) + (this.components == null ? 43 : this.components.hashCode()); + result = (result * PRIME) + (this.patchTypes == null ? 43 : this.patchTypes.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ProductStackConfigCategoryDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ProductStackConfigCategoryDetails.java new file mode 100644 index 00000000000..c4137a514b7 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ProductStackConfigCategoryDetails.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * ProductStack Config Category Details. + * Defines suite or stack of products on which applications hosted by the resources are built and need to be managed. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ProductStackConfigCategoryDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "configCategory" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ProductStackConfigCategoryDetails extends ConfigCategoryDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Products that belong to the stack. + * For example, Oracle WebLogic and Java for the Oracle Fusion Middleware product stack. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("products") + private java.util.List products; + + /** + * Products that belong to the stack. + * For example, Oracle WebLogic and Java for the Oracle Fusion Middleware product stack. + * + * @param products the value to set + * @return this builder + **/ + public Builder products(java.util.List products) { + this.products = products; + this.__explicitlySet__.add("products"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("subCategoryDetails") + private ProductStackSubCategoryDetails subCategoryDetails; + + public Builder subCategoryDetails(ProductStackSubCategoryDetails subCategoryDetails) { + this.subCategoryDetails = subCategoryDetails; + this.__explicitlySet__.add("subCategoryDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ProductStackConfigCategoryDetails build() { + ProductStackConfigCategoryDetails model = + new ProductStackConfigCategoryDetails(this.products, this.subCategoryDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ProductStackConfigCategoryDetails model) { + if (model.wasPropertyExplicitlySet("products")) { + this.products(model.getProducts()); + } + if (model.wasPropertyExplicitlySet("subCategoryDetails")) { + this.subCategoryDetails(model.getSubCategoryDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ProductStackConfigCategoryDetails( + java.util.List products, + ProductStackSubCategoryDetails subCategoryDetails) { + super(); + this.products = products; + this.subCategoryDetails = subCategoryDetails; + } + + /** + * Products that belong to the stack. + * For example, Oracle WebLogic and Java for the Oracle Fusion Middleware product stack. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("products") + private final java.util.List products; + + /** + * Products that belong to the stack. + * For example, Oracle WebLogic and Java for the Oracle Fusion Middleware product stack. + * + * @return the value + **/ + public java.util.List getProducts() { + return products; + } + + @com.fasterxml.jackson.annotation.JsonProperty("subCategoryDetails") + private final ProductStackSubCategoryDetails subCategoryDetails; + + public ProductStackSubCategoryDetails getSubCategoryDetails() { + return subCategoryDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ProductStackConfigCategoryDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", products=").append(String.valueOf(this.products)); + sb.append(", subCategoryDetails=").append(String.valueOf(this.subCategoryDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ProductStackConfigCategoryDetails)) { + return false; + } + + ProductStackConfigCategoryDetails other = (ProductStackConfigCategoryDetails) o; + return java.util.Objects.equals(this.products, other.products) + && java.util.Objects.equals(this.subCategoryDetails, other.subCategoryDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.products == null ? 43 : this.products.hashCode()); + result = + (result * PRIME) + + (this.subCategoryDetails == null + ? 43 + : this.subCategoryDetails.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ProductStackGenericSubCategoryDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ProductStackGenericSubCategoryDetails.java new file mode 100644 index 00000000000..b755c57051a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ProductStackGenericSubCategoryDetails.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Generic Product Stack.Can be used for grouping Products. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ProductStackGenericSubCategoryDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "subCategory" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ProductStackGenericSubCategoryDetails extends ProductStackSubCategoryDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ProductStackGenericSubCategoryDetails build() { + ProductStackGenericSubCategoryDetails model = + new ProductStackGenericSubCategoryDetails(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ProductStackGenericSubCategoryDetails model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ProductStackGenericSubCategoryDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ProductStackGenericSubCategoryDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ProductStackGenericSubCategoryDetails)) { + return false; + } + + ProductStackGenericSubCategoryDetails other = (ProductStackGenericSubCategoryDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ProductStackSubCategoryDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ProductStackSubCategoryDetails.java new file mode 100644 index 00000000000..c6c4e1eaccf --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ProductStackSubCategoryDetails.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * ProductStack Config Category Details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "subCategory", + defaultImpl = ProductStackSubCategoryDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ProductStackAsProductSubCategoryDetails.class, + name = "PRODUCT_STACK_AS_PRODUCT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ProductStackGenericSubCategoryDetails.class, + name = "PRODUCT_STACK_GENERIC" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ProductStackSubCategoryDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected ProductStackSubCategoryDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ProductStackSubCategoryDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ProductStackSubCategoryDetails)) { + return false; + } + + ProductStackSubCategoryDetails other = (ProductStackSubCategoryDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * SubCategory of Product Stack. + **/ + public enum SubCategory { + ProductStackGeneric("PRODUCT_STACK_GENERIC"), + ProductStackAsProduct("PRODUCT_STACK_AS_PRODUCT"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SubCategory.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SubCategory v : SubCategory.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + SubCategory(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SubCategory create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'SubCategory', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ProductVersionDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ProductVersionDetails.java new file mode 100644 index 00000000000..6630365befb --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ProductVersionDetails.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * A specific product version or a specific version and succeeding. + * Example: 12.1 or 12.1 and above for Oracle WebLogic Application server. + * The policy applies to the next version only, and not to other versions such as, 12.1.x. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ProductVersionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ProductVersionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"version", "isApplicableForAllHigherVersions"}) + public ProductVersionDetails(String version, Boolean isApplicableForAllHigherVersions) { + super(); + this.version = version; + this.isApplicableForAllHigherVersions = isApplicableForAllHigherVersions; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Product version the rule is applicable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * Product version the rule is applicable. + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + /** + * Is rule applicable to all higher versions also + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isApplicableForAllHigherVersions") + private Boolean isApplicableForAllHigherVersions; + + /** + * Is rule applicable to all higher versions also + * @param isApplicableForAllHigherVersions the value to set + * @return this builder + **/ + public Builder isApplicableForAllHigherVersions(Boolean isApplicableForAllHigherVersions) { + this.isApplicableForAllHigherVersions = isApplicableForAllHigherVersions; + this.__explicitlySet__.add("isApplicableForAllHigherVersions"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ProductVersionDetails build() { + ProductVersionDetails model = + new ProductVersionDetails(this.version, this.isApplicableForAllHigherVersions); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ProductVersionDetails model) { + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + if (model.wasPropertyExplicitlySet("isApplicableForAllHigherVersions")) { + this.isApplicableForAllHigherVersions(model.getIsApplicableForAllHigherVersions()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Product version the rule is applicable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * Product version the rule is applicable. + * @return the value + **/ + public String getVersion() { + return version; + } + + /** + * Is rule applicable to all higher versions also + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isApplicableForAllHigherVersions") + private final Boolean isApplicableForAllHigherVersions; + + /** + * Is rule applicable to all higher versions also + * @return the value + **/ + public Boolean getIsApplicableForAllHigherVersions() { + return isApplicableForAllHigherVersions; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ProductVersionDetails("); + sb.append("super=").append(super.toString()); + sb.append("version=").append(String.valueOf(this.version)); + sb.append(", isApplicableForAllHigherVersions=") + .append(String.valueOf(this.isApplicableForAllHigherVersions)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ProductVersionDetails)) { + return false; + } + + ProductVersionDetails other = (ProductVersionDetails) o; + return java.util.Objects.equals(this.version, other.version) + && java.util.Objects.equals( + this.isApplicableForAllHigherVersions, + other.isApplicableForAllHigherVersions) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = + (result * PRIME) + + (this.isApplicableForAllHigherVersions == null + ? 43 + : this.isApplicableForAllHigherVersions.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Properties.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Properties.java new file mode 100644 index 00000000000..76add93e5ba --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Properties.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The properties of the task. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Properties.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Properties extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"numRetries", "timeoutInSeconds"}) + public Properties(Integer numRetries, Integer timeoutInSeconds) { + super(); + this.numRetries = numRetries; + this.timeoutInSeconds = timeoutInSeconds; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The number of retries allowed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numRetries") + private Integer numRetries; + + /** + * The number of retries allowed. + * @param numRetries the value to set + * @return this builder + **/ + public Builder numRetries(Integer numRetries) { + this.numRetries = numRetries; + this.__explicitlySet__.add("numRetries"); + return this; + } + /** + * The timeout in seconds for the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeoutInSeconds") + private Integer timeoutInSeconds; + + /** + * The timeout in seconds for the task. + * @param timeoutInSeconds the value to set + * @return this builder + **/ + public Builder timeoutInSeconds(Integer timeoutInSeconds) { + this.timeoutInSeconds = timeoutInSeconds; + this.__explicitlySet__.add("timeoutInSeconds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Properties build() { + Properties model = new Properties(this.numRetries, this.timeoutInSeconds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Properties model) { + if (model.wasPropertyExplicitlySet("numRetries")) { + this.numRetries(model.getNumRetries()); + } + if (model.wasPropertyExplicitlySet("timeoutInSeconds")) { + this.timeoutInSeconds(model.getTimeoutInSeconds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The number of retries allowed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numRetries") + private final Integer numRetries; + + /** + * The number of retries allowed. + * @return the value + **/ + public Integer getNumRetries() { + return numRetries; + } + + /** + * The timeout in seconds for the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeoutInSeconds") + private final Integer timeoutInSeconds; + + /** + * The timeout in seconds for the task. + * @return the value + **/ + public Integer getTimeoutInSeconds() { + return timeoutInSeconds; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Properties("); + sb.append("super=").append(super.toString()); + sb.append("numRetries=").append(String.valueOf(this.numRetries)); + sb.append(", timeoutInSeconds=").append(String.valueOf(this.timeoutInSeconds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Properties)) { + return false; + } + + Properties other = (Properties) o; + return java.util.Objects.equals(this.numRetries, other.numRetries) + && java.util.Objects.equals(this.timeoutInSeconds, other.timeoutInSeconds) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.numRetries == null ? 43 : this.numRetries.hashCode()); + result = + (result * PRIME) + + (this.timeoutInSeconds == null ? 43 : this.timeoutInSeconds.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Property.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Property.java new file mode 100644 index 00000000000..2aa15b1f965 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Property.java @@ -0,0 +1,883 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Global metadata element details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Property.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Property extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "timeCreated", + "timeUpdated", + "resourceRegion", + "lifecycleState", + "lifecycleDetails", + "selection", + "valueType", + "values", + "scope", + "type", + "freeformTags", + "definedTags", + "systemTags" + }) + public Property( + String id, + String compartmentId, + String displayName, + java.util.Date timeCreated, + java.util.Date timeUpdated, + String resourceRegion, + LifecycleState lifecycleState, + String lifecycleDetails, + Selection selection, + ValueType valueType, + java.util.List values, + Scope scope, + Type type, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.resourceRegion = resourceRegion; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.selection = selection; + this.valueType = valueType; + this.values = values; + this.scope = scope; + this.type = type; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * The current state of the Property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Property. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Text selection of the property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private Selection selection; + + /** + * Text selection of the property. + * @param selection the value to set + * @return this builder + **/ + public Builder selection(Selection selection) { + this.selection = selection; + this.__explicitlySet__.add("selection"); + return this; + } + /** + * Format of the value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("valueType") + private ValueType valueType; + + /** + * Format of the value. + * @param valueType the value to set + * @return this builder + **/ + public Builder valueType(ValueType valueType) { + this.valueType = valueType; + this.__explicitlySet__.add("valueType"); + return this; + } + /** + * Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("values") + private java.util.List values; + + /** + * Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). + * @param values the value to set + * @return this builder + **/ + public Builder values(java.util.List values) { + this.values = values; + this.__explicitlySet__.add("values"); + return this; + } + /** + * The scope of the property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scope") + private Scope scope; + + /** + * The scope of the property. + * @param scope the value to set + * @return this builder + **/ + public Builder scope(Scope scope) { + this.scope = scope; + this.__explicitlySet__.add("scope"); + return this; + } + /** + * The type of the property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * The type of the property. + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Property build() { + Property model = + new Property( + this.id, + this.compartmentId, + this.displayName, + this.timeCreated, + this.timeUpdated, + this.resourceRegion, + this.lifecycleState, + this.lifecycleDetails, + this.selection, + this.valueType, + this.values, + this.scope, + this.type, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Property model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("selection")) { + this.selection(model.getSelection()); + } + if (model.wasPropertyExplicitlySet("valueType")) { + this.valueType(model.getValueType()); + } + if (model.wasPropertyExplicitlySet("values")) { + this.values(model.getValues()); + } + if (model.wasPropertyExplicitlySet("scope")) { + this.scope(model.getScope()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * The current state of the Property. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the Property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Property. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Text selection of the property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private final Selection selection; + + /** + * Text selection of the property. + * @return the value + **/ + public Selection getSelection() { + return selection; + } + + /** + * Format of the value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("valueType") + private final ValueType valueType; + + /** + * Format of the value. + * @return the value + **/ + public ValueType getValueType() { + return valueType; + } + + /** + * Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("values") + private final java.util.List values; + + /** + * Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). + * @return the value + **/ + public java.util.List getValues() { + return values; + } + + /** + * The scope of the property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scope") + private final Scope scope; + + /** + * The scope of the property. + * @return the value + **/ + public Scope getScope() { + return scope; + } + + /** + * The type of the property. + **/ + public enum Type { + UserDefined("USER_DEFINED"), + OracleDefined("ORACLE_DEFINED"), + SystemDefined("SYSTEM_DEFINED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * The type of the property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * The type of the property. + * @return the value + **/ + public Type getType() { + return type; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Property("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", selection=").append(String.valueOf(this.selection)); + sb.append(", valueType=").append(String.valueOf(this.valueType)); + sb.append(", values=").append(String.valueOf(this.values)); + sb.append(", scope=").append(String.valueOf(this.scope)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Property)) { + return false; + } + + Property other = (Property) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.selection, other.selection) + && java.util.Objects.equals(this.valueType, other.valueType) + && java.util.Objects.equals(this.values, other.values) + && java.util.Objects.equals(this.scope, other.scope) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.selection == null ? 43 : this.selection.hashCode()); + result = (result * PRIME) + (this.valueType == null ? 43 : this.valueType.hashCode()); + result = (result * PRIME) + (this.values == null ? 43 : this.values.hashCode()); + result = (result * PRIME) + (this.scope == null ? 43 : this.scope.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PropertyCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PropertyCollection.java new file mode 100644 index 00000000000..5475b7b6ede --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PropertyCollection.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a property search. Contains both PropertySummary items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PropertyCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PropertyCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public PropertyCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of properties. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of properties. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PropertyCollection build() { + PropertyCollection model = new PropertyCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PropertyCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of properties. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of properties. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PropertyCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PropertyCollection)) { + return false; + } + + PropertyCollection other = (PropertyCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PropertySummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PropertySummary.java new file mode 100644 index 00000000000..12e148e13a0 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PropertySummary.java @@ -0,0 +1,787 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Summary of the Property. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = PropertySummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PropertySummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "displayName", + "timeCreated", + "timeUpdated", + "resourceRegion", + "lifecycleState", + "lifecycleDetails", + "selection", + "valueType", + "values", + "scope", + "type", + "freeformTags", + "definedTags", + "systemTags" + }) + public PropertySummary( + String id, + String compartmentId, + String displayName, + java.util.Date timeCreated, + java.util.Date timeUpdated, + String resourceRegion, + Property.LifecycleState lifecycleState, + String lifecycleDetails, + Selection selection, + ValueType valueType, + java.util.List values, + Scope scope, + Property.Type type, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.displayName = displayName; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.resourceRegion = resourceRegion; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.selection = selection; + this.valueType = valueType; + this.values = values; + this.scope = scope; + this.type = type; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * The current state of the Property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private Property.LifecycleState lifecycleState; + + /** + * The current state of the Property. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(Property.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Text selection of the property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private Selection selection; + + /** + * Text selection of the property. + * @param selection the value to set + * @return this builder + **/ + public Builder selection(Selection selection) { + this.selection = selection; + this.__explicitlySet__.add("selection"); + return this; + } + /** + * Format of the value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("valueType") + private ValueType valueType; + + /** + * Format of the value. + * @param valueType the value to set + * @return this builder + **/ + public Builder valueType(ValueType valueType) { + this.valueType = valueType; + this.__explicitlySet__.add("valueType"); + return this; + } + /** + * Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("values") + private java.util.List values; + + /** + * Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). + * @param values the value to set + * @return this builder + **/ + public Builder values(java.util.List values) { + this.values = values; + this.__explicitlySet__.add("values"); + return this; + } + /** + * The scope of the property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scope") + private Scope scope; + + /** + * The scope of the property. + * @param scope the value to set + * @return this builder + **/ + public Builder scope(Scope scope) { + this.scope = scope; + this.__explicitlySet__.add("scope"); + return this; + } + /** + * The type of the property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Property.Type type; + + /** + * The type of the property. + * @param type the value to set + * @return this builder + **/ + public Builder type(Property.Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PropertySummary build() { + PropertySummary model = + new PropertySummary( + this.id, + this.compartmentId, + this.displayName, + this.timeCreated, + this.timeUpdated, + this.resourceRegion, + this.lifecycleState, + this.lifecycleDetails, + this.selection, + this.valueType, + this.values, + this.scope, + this.type, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PropertySummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("selection")) { + this.selection(model.getSelection()); + } + if (model.wasPropertyExplicitlySet("valueType")) { + this.valueType(model.getValueType()); + } + if (model.wasPropertyExplicitlySet("values")) { + this.values(model.getValues()); + } + if (model.wasPropertyExplicitlySet("scope")) { + this.scope(model.getScope()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * The current state of the Property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final Property.LifecycleState lifecycleState; + + /** + * The current state of the Property. + * @return the value + **/ + public Property.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Text selection of the property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private final Selection selection; + + /** + * Text selection of the property. + * @return the value + **/ + public Selection getSelection() { + return selection; + } + + /** + * Format of the value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("valueType") + private final ValueType valueType; + + /** + * Format of the value. + * @return the value + **/ + public ValueType getValueType() { + return valueType; + } + + /** + * Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("values") + private final java.util.List values; + + /** + * Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). + * @return the value + **/ + public java.util.List getValues() { + return values; + } + + /** + * The scope of the property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scope") + private final Scope scope; + + /** + * The scope of the property. + * @return the value + **/ + public Scope getScope() { + return scope; + } + + /** + * The type of the property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Property.Type type; + + /** + * The type of the property. + * @return the value + **/ + public Property.Type getType() { + return type; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PropertySummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", selection=").append(String.valueOf(this.selection)); + sb.append(", valueType=").append(String.valueOf(this.valueType)); + sb.append(", values=").append(String.valueOf(this.values)); + sb.append(", scope=").append(String.valueOf(this.scope)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PropertySummary)) { + return false; + } + + PropertySummary other = (PropertySummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.selection, other.selection) + && java.util.Objects.equals(this.valueType, other.valueType) + && java.util.Objects.equals(this.values, other.values) + && java.util.Objects.equals(this.scope, other.scope) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.selection == null ? 43 : this.selection.hashCode()); + result = (result * PRIME) + (this.valueType == null ? 43 : this.valueType.hashCode()); + result = (result * PRIME) + (this.values == null ? 43 : this.values.hashCode()); + result = (result * PRIME) + (this.scope == null ? 43 : this.scope.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PublishRunbookDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PublishRunbookDetails.java new file mode 100644 index 00000000000..28c2501044a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/PublishRunbookDetails.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Request to publish Runbook. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PublishRunbookDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PublishRunbookDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"runbookId"}) + public PublishRunbookDetails(String runbookId) { + super(); + this.runbookId = runbookId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runbookId") + private String runbookId; + + /** + * The OCID of the resource. + * @param runbookId the value to set + * @return this builder + **/ + public Builder runbookId(String runbookId) { + this.runbookId = runbookId; + this.__explicitlySet__.add("runbookId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PublishRunbookDetails build() { + PublishRunbookDetails model = new PublishRunbookDetails(this.runbookId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PublishRunbookDetails model) { + if (model.wasPropertyExplicitlySet("runbookId")) { + this.runbookId(model.getRunbookId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runbookId") + private final String runbookId; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getRunbookId() { + return runbookId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PublishRunbookDetails("); + sb.append("super=").append(super.toString()); + sb.append("runbookId=").append(String.valueOf(this.runbookId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PublishRunbookDetails)) { + return false; + } + + PublishRunbookDetails other = (PublishRunbookDetails) o; + return java.util.Objects.equals(this.runbookId, other.runbookId) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.runbookId == null ? 43 : this.runbookId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/RequestResourceValidationDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/RequestResourceValidationDetails.java new file mode 100644 index 00000000000..705964948ef --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/RequestResourceValidationDetails.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Request to initiate resource validation. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RequestResourceValidationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RequestResourceValidationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"isApplicableToAllResources", "resourceIds"}) + public RequestResourceValidationDetails( + Boolean isApplicableToAllResources, java.util.List resourceIds) { + super(); + this.isApplicableToAllResources = isApplicableToAllResources; + this.resourceIds = resourceIds; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A boolean flag that decides if all resources within the fleet should be part of the validation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isApplicableToAllResources") + private Boolean isApplicableToAllResources; + + /** + * A boolean flag that decides if all resources within the fleet should be part of the validation. + * @param isApplicableToAllResources the value to set + * @return this builder + **/ + public Builder isApplicableToAllResources(Boolean isApplicableToAllResources) { + this.isApplicableToAllResources = isApplicableToAllResources; + this.__explicitlySet__.add("isApplicableToAllResources"); + return this; + } + /** + * Resource OCIDS to be included for validation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceIds") + private java.util.List resourceIds; + + /** + * Resource OCIDS to be included for validation. + * @param resourceIds the value to set + * @return this builder + **/ + public Builder resourceIds(java.util.List resourceIds) { + this.resourceIds = resourceIds; + this.__explicitlySet__.add("resourceIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RequestResourceValidationDetails build() { + RequestResourceValidationDetails model = + new RequestResourceValidationDetails( + this.isApplicableToAllResources, this.resourceIds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RequestResourceValidationDetails model) { + if (model.wasPropertyExplicitlySet("isApplicableToAllResources")) { + this.isApplicableToAllResources(model.getIsApplicableToAllResources()); + } + if (model.wasPropertyExplicitlySet("resourceIds")) { + this.resourceIds(model.getResourceIds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A boolean flag that decides if all resources within the fleet should be part of the validation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isApplicableToAllResources") + private final Boolean isApplicableToAllResources; + + /** + * A boolean flag that decides if all resources within the fleet should be part of the validation. + * @return the value + **/ + public Boolean getIsApplicableToAllResources() { + return isApplicableToAllResources; + } + + /** + * Resource OCIDS to be included for validation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceIds") + private final java.util.List resourceIds; + + /** + * Resource OCIDS to be included for validation. + * @return the value + **/ + public java.util.List getResourceIds() { + return resourceIds; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RequestResourceValidationDetails("); + sb.append("super=").append(super.toString()); + sb.append("isApplicableToAllResources=") + .append(String.valueOf(this.isApplicableToAllResources)); + sb.append(", resourceIds=").append(String.valueOf(this.resourceIds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RequestResourceValidationDetails)) { + return false; + } + + RequestResourceValidationDetails other = (RequestResourceValidationDetails) o; + return java.util.Objects.equals( + this.isApplicableToAllResources, other.isApplicableToAllResources) + && java.util.Objects.equals(this.resourceIds, other.resourceIds) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.isApplicableToAllResources == null + ? 43 + : this.isApplicableToAllResources.hashCode()); + result = (result * PRIME) + (this.resourceIds == null ? 43 : this.resourceIds.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/RequestTargetDiscoveryDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/RequestTargetDiscoveryDetails.java new file mode 100644 index 00000000000..dd51b594a92 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/RequestTargetDiscoveryDetails.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Request to initiate target discovery. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RequestTargetDiscoveryDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RequestTargetDiscoveryDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"isApplicableToAllResources", "resourceIds"}) + public RequestTargetDiscoveryDetails( + Boolean isApplicableToAllResources, java.util.List resourceIds) { + super(); + this.isApplicableToAllResources = isApplicableToAllResources; + this.resourceIds = resourceIds; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A boolean flag that decides if all resources within the fleet should be part of discovery. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isApplicableToAllResources") + private Boolean isApplicableToAllResources; + + /** + * A boolean flag that decides if all resources within the fleet should be part of discovery. + * @param isApplicableToAllResources the value to set + * @return this builder + **/ + public Builder isApplicableToAllResources(Boolean isApplicableToAllResources) { + this.isApplicableToAllResources = isApplicableToAllResources; + this.__explicitlySet__.add("isApplicableToAllResources"); + return this; + } + /** + * Resource OCIDS to be included for discovery. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceIds") + private java.util.List resourceIds; + + /** + * Resource OCIDS to be included for discovery. + * @param resourceIds the value to set + * @return this builder + **/ + public Builder resourceIds(java.util.List resourceIds) { + this.resourceIds = resourceIds; + this.__explicitlySet__.add("resourceIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RequestTargetDiscoveryDetails build() { + RequestTargetDiscoveryDetails model = + new RequestTargetDiscoveryDetails( + this.isApplicableToAllResources, this.resourceIds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RequestTargetDiscoveryDetails model) { + if (model.wasPropertyExplicitlySet("isApplicableToAllResources")) { + this.isApplicableToAllResources(model.getIsApplicableToAllResources()); + } + if (model.wasPropertyExplicitlySet("resourceIds")) { + this.resourceIds(model.getResourceIds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A boolean flag that decides if all resources within the fleet should be part of discovery. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isApplicableToAllResources") + private final Boolean isApplicableToAllResources; + + /** + * A boolean flag that decides if all resources within the fleet should be part of discovery. + * @return the value + **/ + public Boolean getIsApplicableToAllResources() { + return isApplicableToAllResources; + } + + /** + * Resource OCIDS to be included for discovery. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceIds") + private final java.util.List resourceIds; + + /** + * Resource OCIDS to be included for discovery. + * @return the value + **/ + public java.util.List getResourceIds() { + return resourceIds; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RequestTargetDiscoveryDetails("); + sb.append("super=").append(super.toString()); + sb.append("isApplicableToAllResources=") + .append(String.valueOf(this.isApplicableToAllResources)); + sb.append(", resourceIds=").append(String.valueOf(this.resourceIds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RequestTargetDiscoveryDetails)) { + return false; + } + + RequestTargetDiscoveryDetails other = (RequestTargetDiscoveryDetails) o; + return java.util.Objects.equals( + this.isApplicableToAllResources, other.isApplicableToAllResources) + && java.util.Objects.equals(this.resourceIds, other.resourceIds) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.isApplicableToAllResources == null + ? 43 + : this.isApplicableToAllResources.hashCode()); + result = (result * PRIME) + (this.resourceIds == null ? 43 : this.resourceIds.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ResourceCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ResourceCollection.java new file mode 100644 index 00000000000..5c8e1c5e56f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ResourceCollection.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a ResourceSummary Search. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ResourceCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ResourceCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ResourceCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of Execution Resources. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of Execution Resources. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ResourceCollection build() { + ResourceCollection model = new ResourceCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ResourceCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of Execution Resources. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of Execution Resources. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ResourceCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ResourceCollection)) { + return false; + } + + ResourceCollection other = (ResourceCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ResourceCredentialEntitySpecificDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ResourceCredentialEntitySpecificDetails.java new file mode 100644 index 00000000000..cd57885a38a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ResourceCredentialEntitySpecificDetails.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Resource credential details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ResourceCredentialEntitySpecificDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "credentialLevel" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ResourceCredentialEntitySpecificDetails extends CredentialEntitySpecificDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * OCID of the resource for which the credential is created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * OCID of the resource for which the credential is created. + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ResourceCredentialEntitySpecificDetails build() { + ResourceCredentialEntitySpecificDetails model = + new ResourceCredentialEntitySpecificDetails(this.resourceId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ResourceCredentialEntitySpecificDetails model) { + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ResourceCredentialEntitySpecificDetails(String resourceId) { + super(); + this.resourceId = resourceId; + } + + /** + * OCID of the resource for which the credential is created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * OCID of the resource for which the credential is created. + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ResourceCredentialEntitySpecificDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", resourceId=").append(String.valueOf(this.resourceId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ResourceCredentialEntitySpecificDetails)) { + return false; + } + + ResourceCredentialEntitySpecificDetails other = (ResourceCredentialEntitySpecificDetails) o; + return java.util.Objects.equals(this.resourceId, other.resourceId) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ResourceSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ResourceSummary.java new file mode 100644 index 00000000000..a78fe700d6d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ResourceSummary.java @@ -0,0 +1,430 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Execution Resource Summary + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ResourceSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ResourceSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "resourceId", + "resourceDisplayName", + "description", + "sequence", + "targets", + "status", + "timeStarted", + "timeEnded" + }) + public ResourceSummary( + String resourceId, + String resourceDisplayName, + String description, + String sequence, + java.util.List targets, + JobStatus status, + java.util.Date timeStarted, + java.util.Date timeEnded) { + super(); + this.resourceId = resourceId; + this.resourceDisplayName = resourceDisplayName; + this.description = description; + this.sequence = sequence; + this.targets = targets; + this.status = status; + this.timeStarted = timeStarted; + this.timeEnded = timeEnded; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Resource Identifier associated with the Work Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * Resource Identifier associated with the Work Request. + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * Resource Display Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceDisplayName") + private String resourceDisplayName; + + /** + * Resource Display Name. + * @param resourceDisplayName the value to set + * @return this builder + **/ + public Builder resourceDisplayName(String resourceDisplayName) { + this.resourceDisplayName = resourceDisplayName; + this.__explicitlySet__.add("resourceDisplayName"); + return this; + } + /** + * Description of the Resource Execution status. + * If there are any errors, this can also include a short error message. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the Resource Execution status. + * If there are any errors, this can also include a short error message. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The sequence of the Resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sequence") + private String sequence; + + /** + * The sequence of the Resource. + * @param sequence the value to set + * @return this builder + **/ + public Builder sequence(String sequence) { + this.sequence = sequence; + this.__explicitlySet__.add("sequence"); + return this; + } + /** + * Targets associated with the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targets") + private java.util.List targets; + + /** + * Targets associated with the resource. + * @param targets the value to set + * @return this builder + **/ + public Builder targets(java.util.List targets) { + this.targets = targets; + this.__explicitlySet__.add("targets"); + return this; + } + /** + * Status of the Job at Resource Level. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private JobStatus status; + + /** + * Status of the Job at Resource Level. + * @param status the value to set + * @return this builder + **/ + public Builder status(JobStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The time the task started for the resource. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The time the task started for the resource. An RFC3339 formatted datetime string + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The time the task ended for the resource. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + private java.util.Date timeEnded; + + /** + * The time the task ended for the resource. An RFC3339 formatted datetime string + * @param timeEnded the value to set + * @return this builder + **/ + public Builder timeEnded(java.util.Date timeEnded) { + this.timeEnded = timeEnded; + this.__explicitlySet__.add("timeEnded"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ResourceSummary build() { + ResourceSummary model = + new ResourceSummary( + this.resourceId, + this.resourceDisplayName, + this.description, + this.sequence, + this.targets, + this.status, + this.timeStarted, + this.timeEnded); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ResourceSummary model) { + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("resourceDisplayName")) { + this.resourceDisplayName(model.getResourceDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("sequence")) { + this.sequence(model.getSequence()); + } + if (model.wasPropertyExplicitlySet("targets")) { + this.targets(model.getTargets()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeEnded")) { + this.timeEnded(model.getTimeEnded()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Resource Identifier associated with the Work Request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * Resource Identifier associated with the Work Request. + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * Resource Display Name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceDisplayName") + private final String resourceDisplayName; + + /** + * Resource Display Name. + * @return the value + **/ + public String getResourceDisplayName() { + return resourceDisplayName; + } + + /** + * Description of the Resource Execution status. + * If there are any errors, this can also include a short error message. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the Resource Execution status. + * If there are any errors, this can also include a short error message. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The sequence of the Resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sequence") + private final String sequence; + + /** + * The sequence of the Resource. + * @return the value + **/ + public String getSequence() { + return sequence; + } + + /** + * Targets associated with the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targets") + private final java.util.List targets; + + /** + * Targets associated with the resource. + * @return the value + **/ + public java.util.List getTargets() { + return targets; + } + + /** + * Status of the Job at Resource Level. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final JobStatus status; + + /** + * Status of the Job at Resource Level. + * @return the value + **/ + public JobStatus getStatus() { + return status; + } + + /** + * The time the task started for the resource. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The time the task started for the resource. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The time the task ended for the resource. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + private final java.util.Date timeEnded; + + /** + * The time the task ended for the resource. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeEnded() { + return timeEnded; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ResourceSummary("); + sb.append("super=").append(super.toString()); + sb.append("resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", resourceDisplayName=").append(String.valueOf(this.resourceDisplayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", sequence=").append(String.valueOf(this.sequence)); + sb.append(", targets=").append(String.valueOf(this.targets)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeEnded=").append(String.valueOf(this.timeEnded)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ResourceSummary)) { + return false; + } + + ResourceSummary other = (ResourceSummary) o; + return java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.resourceDisplayName, other.resourceDisplayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.sequence, other.sequence) + && java.util.Objects.equals(this.targets, other.targets) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeEnded, other.timeEnded) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = + (result * PRIME) + + (this.resourceDisplayName == null + ? 43 + : this.resourceDisplayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.sequence == null ? 43 : this.sequence.hashCode()); + result = (result * PRIME) + (this.targets == null ? 43 : this.targets.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeEnded == null ? 43 : this.timeEnded.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ResourceTagCheckDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ResourceTagCheckDetails.java new file mode 100644 index 00000000000..9ff4464bbd1 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ResourceTagCheckDetails.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Request to check resource tagging. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ResourceTagCheckDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ResourceTagCheckDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"tagEnablementInfo"}) + public ResourceTagCheckDetails(java.util.List tagEnablementInfo) { + super(); + this.tagEnablementInfo = tagEnablementInfo; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Tag enablement Information for the resources. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tagEnablementInfo") + private java.util.List tagEnablementInfo; + + /** + * Tag enablement Information for the resources. + * @param tagEnablementInfo the value to set + * @return this builder + **/ + public Builder tagEnablementInfo( + java.util.List tagEnablementInfo) { + this.tagEnablementInfo = tagEnablementInfo; + this.__explicitlySet__.add("tagEnablementInfo"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ResourceTagCheckDetails build() { + ResourceTagCheckDetails model = new ResourceTagCheckDetails(this.tagEnablementInfo); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ResourceTagCheckDetails model) { + if (model.wasPropertyExplicitlySet("tagEnablementInfo")) { + this.tagEnablementInfo(model.getTagEnablementInfo()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Tag enablement Information for the resources. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tagEnablementInfo") + private final java.util.List tagEnablementInfo; + + /** + * Tag enablement Information for the resources. + * @return the value + **/ + public java.util.List getTagEnablementInfo() { + return tagEnablementInfo; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ResourceTagCheckDetails("); + sb.append("super=").append(super.toString()); + sb.append("tagEnablementInfo=").append(String.valueOf(this.tagEnablementInfo)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ResourceTagCheckDetails)) { + return false; + } + + ResourceTagCheckDetails other = (ResourceTagCheckDetails) o; + return java.util.Objects.equals(this.tagEnablementInfo, other.tagEnablementInfo) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.tagEnablementInfo == null ? 43 : this.tagEnablementInfo.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ResourceTagEnablementInfo.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ResourceTagEnablementInfo.java new file mode 100644 index 00000000000..51ea2cbb4f4 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ResourceTagEnablementInfo.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Resource tag enablement Information. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ResourceTagEnablementInfo.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ResourceTagEnablementInfo + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"resourceId", "isTaggingPossible"}) + public ResourceTagEnablementInfo(String resourceId, Boolean isTaggingPossible) { + super(); + this.resourceId = resourceId; + this.isTaggingPossible = isTaggingPossible; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * The OCID of the resource. + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * A value that represents if the resource can be tagged with a Fleet name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isTaggingPossible") + private Boolean isTaggingPossible; + + /** + * A value that represents if the resource can be tagged with a Fleet name. + * @param isTaggingPossible the value to set + * @return this builder + **/ + public Builder isTaggingPossible(Boolean isTaggingPossible) { + this.isTaggingPossible = isTaggingPossible; + this.__explicitlySet__.add("isTaggingPossible"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ResourceTagEnablementInfo build() { + ResourceTagEnablementInfo model = + new ResourceTagEnablementInfo(this.resourceId, this.isTaggingPossible); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ResourceTagEnablementInfo model) { + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("isTaggingPossible")) { + this.isTaggingPossible(model.getIsTaggingPossible()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * A value that represents if the resource can be tagged with a Fleet name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isTaggingPossible") + private final Boolean isTaggingPossible; + + /** + * A value that represents if the resource can be tagged with a Fleet name. + * @return the value + **/ + public Boolean getIsTaggingPossible() { + return isTaggingPossible; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ResourceTagEnablementInfo("); + sb.append("super=").append(super.toString()); + sb.append("resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", isTaggingPossible=").append(String.valueOf(this.isTaggingPossible)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ResourceTagEnablementInfo)) { + return false; + } + + ResourceTagEnablementInfo other = (ResourceTagEnablementInfo) o; + return java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.isTaggingPossible, other.isTaggingPossible) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = + (result * PRIME) + + (this.isTaggingPossible == null ? 43 : this.isTaggingPossible.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/RollbackWorkflowDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/RollbackWorkflowDetails.java new file mode 100644 index 00000000000..d1740cbc5ed --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/RollbackWorkflowDetails.java @@ -0,0 +1,225 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Rollback Workflow details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RollbackWorkflowDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RollbackWorkflowDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"scope", "workflow"}) + public RollbackWorkflowDetails(Scope scope, java.util.List workflow) { + super(); + this.scope = scope; + this.workflow = workflow; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * rollback Scope + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scope") + private Scope scope; + + /** + * rollback Scope + * + * @param scope the value to set + * @return this builder + **/ + public Builder scope(Scope scope) { + this.scope = scope; + this.__explicitlySet__.add("scope"); + return this; + } + /** + * Rollback Workflow for the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("workflow") + private java.util.List workflow; + + /** + * Rollback Workflow for the runbook. + * @param workflow the value to set + * @return this builder + **/ + public Builder workflow(java.util.List workflow) { + this.workflow = workflow; + this.__explicitlySet__.add("workflow"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RollbackWorkflowDetails build() { + RollbackWorkflowDetails model = new RollbackWorkflowDetails(this.scope, this.workflow); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RollbackWorkflowDetails model) { + if (model.wasPropertyExplicitlySet("scope")) { + this.scope(model.getScope()); + } + if (model.wasPropertyExplicitlySet("workflow")) { + this.workflow(model.getWorkflow()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * rollback Scope + * + **/ + public enum Scope { + ActionGroup("ACTION_GROUP"), + Target("TARGET"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Scope.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Scope v : Scope.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Scope(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Scope create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Scope', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * rollback Scope + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scope") + private final Scope scope; + + /** + * rollback Scope + * + * @return the value + **/ + public Scope getScope() { + return scope; + } + + /** + * Rollback Workflow for the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("workflow") + private final java.util.List workflow; + + /** + * Rollback Workflow for the runbook. + * @return the value + **/ + public java.util.List getWorkflow() { + return workflow; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RollbackWorkflowDetails("); + sb.append("super=").append(super.toString()); + sb.append("scope=").append(String.valueOf(this.scope)); + sb.append(", workflow=").append(String.valueOf(this.workflow)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RollbackWorkflowDetails)) { + return false; + } + + RollbackWorkflowDetails other = (RollbackWorkflowDetails) o; + return java.util.Objects.equals(this.scope, other.scope) + && java.util.Objects.equals(this.workflow, other.workflow) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.scope == null ? 43 : this.scope.hashCode()); + result = (result * PRIME) + (this.workflow == null ? 43 : this.workflow.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Rule.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Rule.java new file mode 100644 index 00000000000..84dbf567cf6 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Rule.java @@ -0,0 +1,293 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Rule for DYNAMIC selection. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Rule.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Rule extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "basis", + "compartmentId", + "resourceCompartmentId", + "conditions" + }) + public Rule( + String basis, + String compartmentId, + String resourceCompartmentId, + java.util.List conditions) { + super(); + this.basis = basis; + this.compartmentId = compartmentId; + this.resourceCompartmentId = resourceCompartmentId; + this.conditions = conditions; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Based on what the rule is created. + * It can be based on a resourceProperty or a tag. + * If based on a tag, basis will be 'definedTagEquals' + * If based on a resource property, basis will be 'inventoryProperties' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("basis") + private String basis; + + /** + * Based on what the rule is created. + * It can be based on a resourceProperty or a tag. + * If based on a tag, basis will be 'definedTagEquals' + * If based on a resource property, basis will be 'inventoryProperties' + * + * @param basis the value to set + * @return this builder + **/ + public Builder basis(String basis) { + this.basis = basis; + this.__explicitlySet__.add("basis"); + return this; + } + /** + * Tenancy Id (Root Compartment Id)for which the rule is created. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy Id (Root Compartment Id)for which the rule is created. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The Compartment ID to dynamically search resources. + * Provide the compartment ID to which the rule is applicable. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceCompartmentId") + private String resourceCompartmentId; + + /** + * The Compartment ID to dynamically search resources. + * Provide the compartment ID to which the rule is applicable. + * + * @param resourceCompartmentId the value to set + * @return this builder + **/ + public Builder resourceCompartmentId(String resourceCompartmentId) { + this.resourceCompartmentId = resourceCompartmentId; + this.__explicitlySet__.add("resourceCompartmentId"); + return this; + } + /** + * Rule Conditions + **/ + @com.fasterxml.jackson.annotation.JsonProperty("conditions") + private java.util.List conditions; + + /** + * Rule Conditions + * @param conditions the value to set + * @return this builder + **/ + public Builder conditions(java.util.List conditions) { + this.conditions = conditions; + this.__explicitlySet__.add("conditions"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Rule build() { + Rule model = + new Rule( + this.basis, + this.compartmentId, + this.resourceCompartmentId, + this.conditions); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Rule model) { + if (model.wasPropertyExplicitlySet("basis")) { + this.basis(model.getBasis()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resourceCompartmentId")) { + this.resourceCompartmentId(model.getResourceCompartmentId()); + } + if (model.wasPropertyExplicitlySet("conditions")) { + this.conditions(model.getConditions()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Based on what the rule is created. + * It can be based on a resourceProperty or a tag. + * If based on a tag, basis will be 'definedTagEquals' + * If based on a resource property, basis will be 'inventoryProperties' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("basis") + private final String basis; + + /** + * Based on what the rule is created. + * It can be based on a resourceProperty or a tag. + * If based on a tag, basis will be 'definedTagEquals' + * If based on a resource property, basis will be 'inventoryProperties' + * + * @return the value + **/ + public String getBasis() { + return basis; + } + + /** + * Tenancy Id (Root Compartment Id)for which the rule is created. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy Id (Root Compartment Id)for which the rule is created. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The Compartment ID to dynamically search resources. + * Provide the compartment ID to which the rule is applicable. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceCompartmentId") + private final String resourceCompartmentId; + + /** + * The Compartment ID to dynamically search resources. + * Provide the compartment ID to which the rule is applicable. + * + * @return the value + **/ + public String getResourceCompartmentId() { + return resourceCompartmentId; + } + + /** + * Rule Conditions + **/ + @com.fasterxml.jackson.annotation.JsonProperty("conditions") + private final java.util.List conditions; + + /** + * Rule Conditions + * @return the value + **/ + public java.util.List getConditions() { + return conditions; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Rule("); + sb.append("super=").append(super.toString()); + sb.append("basis=").append(String.valueOf(this.basis)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resourceCompartmentId=").append(String.valueOf(this.resourceCompartmentId)); + sb.append(", conditions=").append(String.valueOf(this.conditions)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Rule)) { + return false; + } + + Rule other = (Rule) o; + return java.util.Objects.equals(this.basis, other.basis) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resourceCompartmentId, other.resourceCompartmentId) + && java.util.Objects.equals(this.conditions, other.conditions) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.basis == null ? 43 : this.basis.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.resourceCompartmentId == null + ? 43 + : this.resourceCompartmentId.hashCode()); + result = (result * PRIME) + (this.conditions == null ? 43 : this.conditions.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Runbook.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Runbook.java new file mode 100644 index 00000000000..2fd3f31bc22 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Runbook.java @@ -0,0 +1,1108 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Runbook definition. + * Runbooks allow you to capture procedural tasks for handling a workflow. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Runbook.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Runbook extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "description", + "type", + "runbookRelevance", + "operation", + "osType", + "platform", + "isDefault", + "estimatedTime", + "lifecycleState", + "lifecycleDetails", + "timeCreated", + "timeUpdated", + "associations", + "compartmentId", + "resourceRegion", + "freeformTags", + "definedTags", + "systemTags" + }) + public Runbook( + String id, + String displayName, + String description, + Type type, + RunbookRelevance runbookRelevance, + String operation, + OsType osType, + String platform, + Boolean isDefault, + String estimatedTime, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Associations associations, + String compartmentId, + String resourceRegion, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.description = description; + this.type = type; + this.runbookRelevance = runbookRelevance; + this.operation = operation; + this.osType = osType; + this.platform = platform; + this.isDefault = isDefault; + this.estimatedTime = estimatedTime; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.associations = associations; + this.compartmentId = compartmentId; + this.resourceRegion = resourceRegion; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The type of the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * The type of the runbook. + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * Relevance of the runbook. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runbookRelevance") + private RunbookRelevance runbookRelevance; + + /** + * Relevance of the runbook. + * + * @param runbookRelevance the value to set + * @return this builder + **/ + public Builder runbookRelevance(RunbookRelevance runbookRelevance) { + this.runbookRelevance = runbookRelevance; + this.__explicitlySet__.add("runbookRelevance"); + return this; + } + /** + * The lifecycle operation performed by the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operation") + private String operation; + + /** + * The lifecycle operation performed by the runbook. + * @param operation the value to set + * @return this builder + **/ + public Builder operation(String operation) { + this.operation = operation; + this.__explicitlySet__.add("operation"); + return this; + } + /** + * The OS type for the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osType") + private OsType osType; + + /** + * The OS type for the runbook. + * @param osType the value to set + * @return this builder + **/ + public Builder osType(OsType osType) { + this.osType = osType; + this.__explicitlySet__.add("osType"); + return this; + } + /** + * The platform of the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platform") + private String platform; + + /** + * The platform of the runbook. + * @param platform the value to set + * @return this builder + **/ + public Builder platform(String platform) { + this.platform = platform; + this.__explicitlySet__.add("platform"); + return this; + } + /** + * Is the runbook default? + * Sets this runbook as the default for the chosen product/product stack for the specified lifecycle operation. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private Boolean isDefault; + + /** + * Is the runbook default? + * Sets this runbook as the default for the chosen product/product stack for the specified lifecycle operation. + * + * @param isDefault the value to set + * @return this builder + **/ + public Builder isDefault(Boolean isDefault) { + this.isDefault = isDefault; + this.__explicitlySet__.add("isDefault"); + return this; + } + /** + * Estimated time to successfully complete the runbook execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTime") + private String estimatedTime; + + /** + * Estimated time to successfully complete the runbook execution. + * @param estimatedTime the value to set + * @return this builder + **/ + public Builder estimatedTime(String estimatedTime) { + this.estimatedTime = estimatedTime; + this.__explicitlySet__.add("estimatedTime"); + return this; + } + /** + * The current state of the Runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the Runbook. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("associations") + private Associations associations; + + public Builder associations(Associations associations) { + this.associations = associations; + this.__explicitlySet__.add("associations"); + return this; + } + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Runbook build() { + Runbook model = + new Runbook( + this.id, + this.displayName, + this.description, + this.type, + this.runbookRelevance, + this.operation, + this.osType, + this.platform, + this.isDefault, + this.estimatedTime, + this.lifecycleState, + this.lifecycleDetails, + this.timeCreated, + this.timeUpdated, + this.associations, + this.compartmentId, + this.resourceRegion, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Runbook model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("runbookRelevance")) { + this.runbookRelevance(model.getRunbookRelevance()); + } + if (model.wasPropertyExplicitlySet("operation")) { + this.operation(model.getOperation()); + } + if (model.wasPropertyExplicitlySet("osType")) { + this.osType(model.getOsType()); + } + if (model.wasPropertyExplicitlySet("platform")) { + this.platform(model.getPlatform()); + } + if (model.wasPropertyExplicitlySet("isDefault")) { + this.isDefault(model.getIsDefault()); + } + if (model.wasPropertyExplicitlySet("estimatedTime")) { + this.estimatedTime(model.getEstimatedTime()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("associations")) { + this.associations(model.getAssociations()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The type of the runbook. + **/ + public enum Type { + UserDefined("USER_DEFINED"), + OracleDefined("ORACLE_DEFINED"), + SystemDefined("SYSTEM_DEFINED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * The type of the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * The type of the runbook. + * @return the value + **/ + public Type getType() { + return type; + } + + /** + * Relevance of the runbook. + * + **/ + public enum RunbookRelevance { + ProductGroup("PRODUCT_GROUP"), + Product("PRODUCT"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RunbookRelevance.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (RunbookRelevance v : RunbookRelevance.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + RunbookRelevance(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static RunbookRelevance create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'RunbookRelevance', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Relevance of the runbook. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runbookRelevance") + private final RunbookRelevance runbookRelevance; + + /** + * Relevance of the runbook. + * + * @return the value + **/ + public RunbookRelevance getRunbookRelevance() { + return runbookRelevance; + } + + /** + * The lifecycle operation performed by the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operation") + private final String operation; + + /** + * The lifecycle operation performed by the runbook. + * @return the value + **/ + public String getOperation() { + return operation; + } + + /** + * The OS type for the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osType") + private final OsType osType; + + /** + * The OS type for the runbook. + * @return the value + **/ + public OsType getOsType() { + return osType; + } + + /** + * The platform of the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platform") + private final String platform; + + /** + * The platform of the runbook. + * @return the value + **/ + public String getPlatform() { + return platform; + } + + /** + * Is the runbook default? + * Sets this runbook as the default for the chosen product/product stack for the specified lifecycle operation. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private final Boolean isDefault; + + /** + * Is the runbook default? + * Sets this runbook as the default for the chosen product/product stack for the specified lifecycle operation. + * + * @return the value + **/ + public Boolean getIsDefault() { + return isDefault; + } + + /** + * Estimated time to successfully complete the runbook execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTime") + private final String estimatedTime; + + /** + * Estimated time to successfully complete the runbook execution. + * @return the value + **/ + public String getEstimatedTime() { + return estimatedTime; + } + + /** + * The current state of the Runbook. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Deleted("DELETED"), + Failed("FAILED"), + Inactive("INACTIVE"), + Creating("CREATING"), + Deleting("DELETING"), + Updating("UPDATING"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the Runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the Runbook. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("associations") + private final Associations associations; + + public Associations getAssociations() { + return associations; + } + + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Runbook("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", runbookRelevance=").append(String.valueOf(this.runbookRelevance)); + sb.append(", operation=").append(String.valueOf(this.operation)); + sb.append(", osType=").append(String.valueOf(this.osType)); + sb.append(", platform=").append(String.valueOf(this.platform)); + sb.append(", isDefault=").append(String.valueOf(this.isDefault)); + sb.append(", estimatedTime=").append(String.valueOf(this.estimatedTime)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", associations=").append(String.valueOf(this.associations)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Runbook)) { + return false; + } + + Runbook other = (Runbook) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.runbookRelevance, other.runbookRelevance) + && java.util.Objects.equals(this.operation, other.operation) + && java.util.Objects.equals(this.osType, other.osType) + && java.util.Objects.equals(this.platform, other.platform) + && java.util.Objects.equals(this.isDefault, other.isDefault) + && java.util.Objects.equals(this.estimatedTime, other.estimatedTime) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.associations, other.associations) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.runbookRelevance == null ? 43 : this.runbookRelevance.hashCode()); + result = (result * PRIME) + (this.operation == null ? 43 : this.operation.hashCode()); + result = (result * PRIME) + (this.osType == null ? 43 : this.osType.hashCode()); + result = (result * PRIME) + (this.platform == null ? 43 : this.platform.hashCode()); + result = (result * PRIME) + (this.isDefault == null ? 43 : this.isDefault.hashCode()); + result = + (result * PRIME) + + (this.estimatedTime == null ? 43 : this.estimatedTime.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.associations == null ? 43 : this.associations.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/RunbookCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/RunbookCollection.java new file mode 100644 index 00000000000..67dfdb7529a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/RunbookCollection.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a runbook search. Contains RunbookSummary items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RunbookCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RunbookCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public RunbookCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of runbooks. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of runbooks. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RunbookCollection build() { + RunbookCollection model = new RunbookCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RunbookCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of runbooks. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of runbooks. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RunbookCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RunbookCollection)) { + return false; + } + + RunbookCollection other = (RunbookCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/RunbookSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/RunbookSummary.java new file mode 100644 index 00000000000..28c3382b21f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/RunbookSummary.java @@ -0,0 +1,927 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Summary of the Runbook. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = RunbookSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RunbookSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "description", + "type", + "runbookRelevance", + "operation", + "osType", + "platform", + "isDefault", + "estimatedTime", + "lifecycleState", + "lifecycleDetails", + "timeCreated", + "timeUpdated", + "compartmentId", + "resourceRegion", + "freeformTags", + "definedTags", + "systemTags" + }) + public RunbookSummary( + String id, + String displayName, + String description, + Runbook.Type type, + Runbook.RunbookRelevance runbookRelevance, + String operation, + OsType osType, + String platform, + Boolean isDefault, + String estimatedTime, + Runbook.LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Date timeCreated, + java.util.Date timeUpdated, + String compartmentId, + String resourceRegion, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.description = description; + this.type = type; + this.runbookRelevance = runbookRelevance; + this.operation = operation; + this.osType = osType; + this.platform = platform; + this.isDefault = isDefault; + this.estimatedTime = estimatedTime; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.compartmentId = compartmentId; + this.resourceRegion = resourceRegion; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The type of the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Runbook.Type type; + + /** + * The type of the runbook. + * @param type the value to set + * @return this builder + **/ + public Builder type(Runbook.Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * Type of runbook structure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runbookRelevance") + private Runbook.RunbookRelevance runbookRelevance; + + /** + * Type of runbook structure. + * @param runbookRelevance the value to set + * @return this builder + **/ + public Builder runbookRelevance(Runbook.RunbookRelevance runbookRelevance) { + this.runbookRelevance = runbookRelevance; + this.__explicitlySet__.add("runbookRelevance"); + return this; + } + /** + * The lifecycle operation performed by the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operation") + private String operation; + + /** + * The lifecycle operation performed by the runbook. + * @param operation the value to set + * @return this builder + **/ + public Builder operation(String operation) { + this.operation = operation; + this.__explicitlySet__.add("operation"); + return this; + } + /** + * The OS type for the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osType") + private OsType osType; + + /** + * The OS type for the runbook. + * @param osType the value to set + * @return this builder + **/ + public Builder osType(OsType osType) { + this.osType = osType; + this.__explicitlySet__.add("osType"); + return this; + } + /** + * The platform of the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platform") + private String platform; + + /** + * The platform of the runbook. + * @param platform the value to set + * @return this builder + **/ + public Builder platform(String platform) { + this.platform = platform; + this.__explicitlySet__.add("platform"); + return this; + } + /** + * Is the runbook default? + * Sets this runbook as the default for the chosen product/product stack for the specified lifecycle operation. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private Boolean isDefault; + + /** + * Is the runbook default? + * Sets this runbook as the default for the chosen product/product stack for the specified lifecycle operation. + * + * @param isDefault the value to set + * @return this builder + **/ + public Builder isDefault(Boolean isDefault) { + this.isDefault = isDefault; + this.__explicitlySet__.add("isDefault"); + return this; + } + /** + * Estimated time to successfully complete the runbook execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTime") + private String estimatedTime; + + /** + * Estimated time to successfully complete the runbook execution. + * @param estimatedTime the value to set + * @return this builder + **/ + public Builder estimatedTime(String estimatedTime) { + this.estimatedTime = estimatedTime; + this.__explicitlySet__.add("estimatedTime"); + return this; + } + /** + * The current state of the Runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private Runbook.LifecycleState lifecycleState; + + /** + * The current state of the Runbook. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(Runbook.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RunbookSummary build() { + RunbookSummary model = + new RunbookSummary( + this.id, + this.displayName, + this.description, + this.type, + this.runbookRelevance, + this.operation, + this.osType, + this.platform, + this.isDefault, + this.estimatedTime, + this.lifecycleState, + this.lifecycleDetails, + this.timeCreated, + this.timeUpdated, + this.compartmentId, + this.resourceRegion, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RunbookSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("runbookRelevance")) { + this.runbookRelevance(model.getRunbookRelevance()); + } + if (model.wasPropertyExplicitlySet("operation")) { + this.operation(model.getOperation()); + } + if (model.wasPropertyExplicitlySet("osType")) { + this.osType(model.getOsType()); + } + if (model.wasPropertyExplicitlySet("platform")) { + this.platform(model.getPlatform()); + } + if (model.wasPropertyExplicitlySet("isDefault")) { + this.isDefault(model.getIsDefault()); + } + if (model.wasPropertyExplicitlySet("estimatedTime")) { + this.estimatedTime(model.getEstimatedTime()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The type of the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Runbook.Type type; + + /** + * The type of the runbook. + * @return the value + **/ + public Runbook.Type getType() { + return type; + } + + /** + * Type of runbook structure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runbookRelevance") + private final Runbook.RunbookRelevance runbookRelevance; + + /** + * Type of runbook structure. + * @return the value + **/ + public Runbook.RunbookRelevance getRunbookRelevance() { + return runbookRelevance; + } + + /** + * The lifecycle operation performed by the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operation") + private final String operation; + + /** + * The lifecycle operation performed by the runbook. + * @return the value + **/ + public String getOperation() { + return operation; + } + + /** + * The OS type for the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osType") + private final OsType osType; + + /** + * The OS type for the runbook. + * @return the value + **/ + public OsType getOsType() { + return osType; + } + + /** + * The platform of the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platform") + private final String platform; + + /** + * The platform of the runbook. + * @return the value + **/ + public String getPlatform() { + return platform; + } + + /** + * Is the runbook default? + * Sets this runbook as the default for the chosen product/product stack for the specified lifecycle operation. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private final Boolean isDefault; + + /** + * Is the runbook default? + * Sets this runbook as the default for the chosen product/product stack for the specified lifecycle operation. + * + * @return the value + **/ + public Boolean getIsDefault() { + return isDefault; + } + + /** + * Estimated time to successfully complete the runbook execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTime") + private final String estimatedTime; + + /** + * Estimated time to successfully complete the runbook execution. + * @return the value + **/ + public String getEstimatedTime() { + return estimatedTime; + } + + /** + * The current state of the Runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final Runbook.LifecycleState lifecycleState; + + /** + * The current state of the Runbook. + * @return the value + **/ + public Runbook.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RunbookSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", runbookRelevance=").append(String.valueOf(this.runbookRelevance)); + sb.append(", operation=").append(String.valueOf(this.operation)); + sb.append(", osType=").append(String.valueOf(this.osType)); + sb.append(", platform=").append(String.valueOf(this.platform)); + sb.append(", isDefault=").append(String.valueOf(this.isDefault)); + sb.append(", estimatedTime=").append(String.valueOf(this.estimatedTime)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RunbookSummary)) { + return false; + } + + RunbookSummary other = (RunbookSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.runbookRelevance, other.runbookRelevance) + && java.util.Objects.equals(this.operation, other.operation) + && java.util.Objects.equals(this.osType, other.osType) + && java.util.Objects.equals(this.platform, other.platform) + && java.util.Objects.equals(this.isDefault, other.isDefault) + && java.util.Objects.equals(this.estimatedTime, other.estimatedTime) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.runbookRelevance == null ? 43 : this.runbookRelevance.hashCode()); + result = (result * PRIME) + (this.operation == null ? 43 : this.operation.hashCode()); + result = (result * PRIME) + (this.osType == null ? 43 : this.osType.hashCode()); + result = (result * PRIME) + (this.platform == null ? 43 : this.platform.hashCode()); + result = (result * PRIME) + (this.isDefault == null ? 43 : this.isDefault.hashCode()); + result = + (result * PRIME) + + (this.estimatedTime == null ? 43 : this.estimatedTime.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Schedule.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Schedule.java new file mode 100644 index 00000000000..15e6735af5e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Schedule.java @@ -0,0 +1,352 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Schedule Information. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Schedule.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Schedule extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "type", + "executionStartdate", + "maintenanceWindowId", + "recurrences", + "duration" + }) + public Schedule( + Type type, + java.util.Date executionStartdate, + String maintenanceWindowId, + String recurrences, + String duration) { + super(); + this.type = type; + this.executionStartdate = executionStartdate; + this.maintenanceWindowId = maintenanceWindowId; + this.recurrences = recurrences; + this.duration = duration; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Schedule Type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * Schedule Type + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * Start Date for the schedule. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionStartdate") + private java.util.Date executionStartdate; + + /** + * Start Date for the schedule. An RFC3339 formatted datetime string + * @param executionStartdate the value to set + * @return this builder + **/ + public Builder executionStartdate(java.util.Date executionStartdate) { + this.executionStartdate = executionStartdate; + this.__explicitlySet__.add("executionStartdate"); + return this; + } + /** + * Provide MaintenanceWindowId if Schedule Type is Maintenance Window + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceWindowId") + private String maintenanceWindowId; + + /** + * Provide MaintenanceWindowId if Schedule Type is Maintenance Window + * @param maintenanceWindowId the value to set + * @return this builder + **/ + public Builder maintenanceWindowId(String maintenanceWindowId) { + this.maintenanceWindowId = maintenanceWindowId; + this.__explicitlySet__.add("maintenanceWindowId"); + return this; + } + /** + * Recurrence rule specification if Schedule Type is Custom and Recurring + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recurrences") + private String recurrences; + + /** + * Recurrence rule specification if Schedule Type is Custom and Recurring + * @param recurrences the value to set + * @return this builder + **/ + public Builder recurrences(String recurrences) { + this.recurrences = recurrences; + this.__explicitlySet__.add("recurrences"); + return this; + } + /** + * Duration if schedule type is Custom + **/ + @com.fasterxml.jackson.annotation.JsonProperty("duration") + private String duration; + + /** + * Duration if schedule type is Custom + * @param duration the value to set + * @return this builder + **/ + public Builder duration(String duration) { + this.duration = duration; + this.__explicitlySet__.add("duration"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Schedule build() { + Schedule model = + new Schedule( + this.type, + this.executionStartdate, + this.maintenanceWindowId, + this.recurrences, + this.duration); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Schedule model) { + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("executionStartdate")) { + this.executionStartdate(model.getExecutionStartdate()); + } + if (model.wasPropertyExplicitlySet("maintenanceWindowId")) { + this.maintenanceWindowId(model.getMaintenanceWindowId()); + } + if (model.wasPropertyExplicitlySet("recurrences")) { + this.recurrences(model.getRecurrences()); + } + if (model.wasPropertyExplicitlySet("duration")) { + this.duration(model.getDuration()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Schedule Type + **/ + public enum Type { + Custom("CUSTOM"), + MaintenanceWindow("MAINTENANCE_WINDOW"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * Schedule Type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * Schedule Type + * @return the value + **/ + public Type getType() { + return type; + } + + /** + * Start Date for the schedule. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executionStartdate") + private final java.util.Date executionStartdate; + + /** + * Start Date for the schedule. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getExecutionStartdate() { + return executionStartdate; + } + + /** + * Provide MaintenanceWindowId if Schedule Type is Maintenance Window + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceWindowId") + private final String maintenanceWindowId; + + /** + * Provide MaintenanceWindowId if Schedule Type is Maintenance Window + * @return the value + **/ + public String getMaintenanceWindowId() { + return maintenanceWindowId; + } + + /** + * Recurrence rule specification if Schedule Type is Custom and Recurring + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recurrences") + private final String recurrences; + + /** + * Recurrence rule specification if Schedule Type is Custom and Recurring + * @return the value + **/ + public String getRecurrences() { + return recurrences; + } + + /** + * Duration if schedule type is Custom + **/ + @com.fasterxml.jackson.annotation.JsonProperty("duration") + private final String duration; + + /** + * Duration if schedule type is Custom + * @return the value + **/ + public String getDuration() { + return duration; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Schedule("); + sb.append("super=").append(super.toString()); + sb.append("type=").append(String.valueOf(this.type)); + sb.append(", executionStartdate=").append(String.valueOf(this.executionStartdate)); + sb.append(", maintenanceWindowId=").append(String.valueOf(this.maintenanceWindowId)); + sb.append(", recurrences=").append(String.valueOf(this.recurrences)); + sb.append(", duration=").append(String.valueOf(this.duration)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Schedule)) { + return false; + } + + Schedule other = (Schedule) o; + return java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.executionStartdate, other.executionStartdate) + && java.util.Objects.equals(this.maintenanceWindowId, other.maintenanceWindowId) + && java.util.Objects.equals(this.recurrences, other.recurrences) + && java.util.Objects.equals(this.duration, other.duration) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.executionStartdate == null + ? 43 + : this.executionStartdate.hashCode()); + result = + (result * PRIME) + + (this.maintenanceWindowId == null + ? 43 + : this.maintenanceWindowId.hashCode()); + result = (result * PRIME) + (this.recurrences == null ? 43 : this.recurrences.hashCode()); + result = (result * PRIME) + (this.duration == null ? 43 : this.duration.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ScheduledFleetCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ScheduledFleetCollection.java new file mode 100644 index 00000000000..63a76d479cf --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ScheduledFleetCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a Scheduled ActionGroup search. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ScheduledFleetCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ScheduledFleetCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ScheduledFleetCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of ScheduledFleets. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of ScheduledFleets. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ScheduledFleetCollection build() { + ScheduledFleetCollection model = new ScheduledFleetCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ScheduledFleetCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of ScheduledFleets. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of ScheduledFleets. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ScheduledFleetCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ScheduledFleetCollection)) { + return false; + } + + ScheduledFleetCollection other = (ScheduledFleetCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ScheduledFleetSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ScheduledFleetSummary.java new file mode 100644 index 00000000000..06d7f262b44 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ScheduledFleetSummary.java @@ -0,0 +1,460 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Summary of Fleet part of the Schedule. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ScheduledFleetSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ScheduledFleetSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "tenancyId", + "displayName", + "countOfAffectedResources", + "countOfAffectedTargets", + "actionGroupTypes", + "applicationTypes", + "systemTags" + }) + public ScheduledFleetSummary( + String id, + String tenancyId, + String displayName, + Integer countOfAffectedResources, + Integer countOfAffectedTargets, + java.util.List actionGroupTypes, + java.util.List applicationTypes, + java.util.Map> systemTags) { + super(); + this.id = id; + this.tenancyId = tenancyId; + this.displayName = displayName; + this.countOfAffectedResources = countOfAffectedResources; + this.countOfAffectedTargets = countOfAffectedTargets; + this.actionGroupTypes = actionGroupTypes; + this.applicationTypes = applicationTypes; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * OCID of the tenancy to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private String tenancyId; + + /** + * OCID of the tenancy to which the resource belongs to. + * @param tenancyId the value to set + * @return this builder + **/ + public Builder tenancyId(String tenancyId) { + this.tenancyId = tenancyId; + this.__explicitlySet__.add("tenancyId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Count of Resources affected by the Schedule + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedResources") + private Integer countOfAffectedResources; + + /** + * Count of Resources affected by the Schedule + * @param countOfAffectedResources the value to set + * @return this builder + **/ + public Builder countOfAffectedResources(Integer countOfAffectedResources) { + this.countOfAffectedResources = countOfAffectedResources; + this.__explicitlySet__.add("countOfAffectedResources"); + return this; + } + /** + * Count of Targets affected by the Schedule + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedTargets") + private Integer countOfAffectedTargets; + + /** + * Count of Targets affected by the Schedule + * @param countOfAffectedTargets the value to set + * @return this builder + **/ + public Builder countOfAffectedTargets(Integer countOfAffectedTargets) { + this.countOfAffectedTargets = countOfAffectedTargets; + this.__explicitlySet__.add("countOfAffectedTargets"); + return this; + } + /** + * All ActionGroup Types part of the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroupTypes") + private java.util.List actionGroupTypes; + + /** + * All ActionGroup Types part of the schedule. + * @param actionGroupTypes the value to set + * @return this builder + **/ + public Builder actionGroupTypes(java.util.List actionGroupTypes) { + this.actionGroupTypes = actionGroupTypes; + this.__explicitlySet__.add("actionGroupTypes"); + return this; + } + /** + * All application types part of the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationTypes") + private java.util.List applicationTypes; + + /** + * All application types part of the schedule. + * @param applicationTypes the value to set + * @return this builder + **/ + public Builder applicationTypes(java.util.List applicationTypes) { + this.applicationTypes = applicationTypes; + this.__explicitlySet__.add("applicationTypes"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ScheduledFleetSummary build() { + ScheduledFleetSummary model = + new ScheduledFleetSummary( + this.id, + this.tenancyId, + this.displayName, + this.countOfAffectedResources, + this.countOfAffectedTargets, + this.actionGroupTypes, + this.applicationTypes, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ScheduledFleetSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("tenancyId")) { + this.tenancyId(model.getTenancyId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("countOfAffectedResources")) { + this.countOfAffectedResources(model.getCountOfAffectedResources()); + } + if (model.wasPropertyExplicitlySet("countOfAffectedTargets")) { + this.countOfAffectedTargets(model.getCountOfAffectedTargets()); + } + if (model.wasPropertyExplicitlySet("actionGroupTypes")) { + this.actionGroupTypes(model.getActionGroupTypes()); + } + if (model.wasPropertyExplicitlySet("applicationTypes")) { + this.applicationTypes(model.getApplicationTypes()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * OCID of the tenancy to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private final String tenancyId; + + /** + * OCID of the tenancy to which the resource belongs to. + * @return the value + **/ + public String getTenancyId() { + return tenancyId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Count of Resources affected by the Schedule + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedResources") + private final Integer countOfAffectedResources; + + /** + * Count of Resources affected by the Schedule + * @return the value + **/ + public Integer getCountOfAffectedResources() { + return countOfAffectedResources; + } + + /** + * Count of Targets affected by the Schedule + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedTargets") + private final Integer countOfAffectedTargets; + + /** + * Count of Targets affected by the Schedule + * @return the value + **/ + public Integer getCountOfAffectedTargets() { + return countOfAffectedTargets; + } + + /** + * All ActionGroup Types part of the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroupTypes") + private final java.util.List actionGroupTypes; + + /** + * All ActionGroup Types part of the schedule. + * @return the value + **/ + public java.util.List getActionGroupTypes() { + return actionGroupTypes; + } + + /** + * All application types part of the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationTypes") + private final java.util.List applicationTypes; + + /** + * All application types part of the schedule. + * @return the value + **/ + public java.util.List getApplicationTypes() { + return applicationTypes; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ScheduledFleetSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", tenancyId=").append(String.valueOf(this.tenancyId)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", countOfAffectedResources=") + .append(String.valueOf(this.countOfAffectedResources)); + sb.append(", countOfAffectedTargets=").append(String.valueOf(this.countOfAffectedTargets)); + sb.append(", actionGroupTypes=").append(String.valueOf(this.actionGroupTypes)); + sb.append(", applicationTypes=").append(String.valueOf(this.applicationTypes)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ScheduledFleetSummary)) { + return false; + } + + ScheduledFleetSummary other = (ScheduledFleetSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.tenancyId, other.tenancyId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals( + this.countOfAffectedResources, other.countOfAffectedResources) + && java.util.Objects.equals( + this.countOfAffectedTargets, other.countOfAffectedTargets) + && java.util.Objects.equals(this.actionGroupTypes, other.actionGroupTypes) + && java.util.Objects.equals(this.applicationTypes, other.applicationTypes) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.tenancyId == null ? 43 : this.tenancyId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.countOfAffectedResources == null + ? 43 + : this.countOfAffectedResources.hashCode()); + result = + (result * PRIME) + + (this.countOfAffectedTargets == null + ? 43 + : this.countOfAffectedTargets.hashCode()); + result = + (result * PRIME) + + (this.actionGroupTypes == null ? 43 : this.actionGroupTypes.hashCode()); + result = + (result * PRIME) + + (this.applicationTypes == null ? 43 : this.applicationTypes.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerDefinition.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerDefinition.java new file mode 100644 index 00000000000..51bb3bcb277 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerDefinition.java @@ -0,0 +1,1193 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Definition of a Schedule. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SchedulerDefinition.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SchedulerDefinition extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "description", + "compartmentId", + "resourceRegion", + "timeCreated", + "timeUpdated", + "timeOfNextRun", + "activityInitiationCutOff", + "schedule", + "countOfAffectedActionGroups", + "countOfAffectedResources", + "countOfAffectedTargets", + "actionGroupTypes", + "applicationTypes", + "products", + "lifecycleOperations", + "actionGroups", + "runBooks", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public SchedulerDefinition( + String id, + String displayName, + String description, + String compartmentId, + String resourceRegion, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.Date timeOfNextRun, + Integer activityInitiationCutOff, + Schedule schedule, + Integer countOfAffectedActionGroups, + Integer countOfAffectedResources, + Integer countOfAffectedTargets, + java.util.List actionGroupTypes, + java.util.List applicationTypes, + java.util.List products, + java.util.List lifecycleOperations, + java.util.List actionGroups, + java.util.List runBooks, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.description = description; + this.compartmentId = compartmentId; + this.resourceRegion = resourceRegion; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.timeOfNextRun = timeOfNextRun; + this.activityInitiationCutOff = activityInitiationCutOff; + this.schedule = schedule; + this.countOfAffectedActionGroups = countOfAffectedActionGroups; + this.countOfAffectedResources = countOfAffectedResources; + this.countOfAffectedTargets = countOfAffectedTargets; + this.actionGroupTypes = actionGroupTypes; + this.applicationTypes = applicationTypes; + this.products = products; + this.lifecycleOperations = lifecycleOperations; + this.actionGroups = actionGroups; + this.runBooks = runBooks; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The scheduled date for the next run of the Job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeOfNextRun") + private java.util.Date timeOfNextRun; + + /** + * The scheduled date for the next run of the Job. + * @param timeOfNextRun the value to set + * @return this builder + **/ + public Builder timeOfNextRun(java.util.Date timeOfNextRun) { + this.timeOfNextRun = timeOfNextRun; + this.__explicitlySet__.add("timeOfNextRun"); + return this; + } + /** + * Activity Initiation Cut Off. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("activityInitiationCutOff") + private Integer activityInitiationCutOff; + + /** + * Activity Initiation Cut Off. + * @param activityInitiationCutOff the value to set + * @return this builder + **/ + public Builder activityInitiationCutOff(Integer activityInitiationCutOff) { + this.activityInitiationCutOff = activityInitiationCutOff; + this.__explicitlySet__.add("activityInitiationCutOff"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("schedule") + private Schedule schedule; + + public Builder schedule(Schedule schedule) { + this.schedule = schedule; + this.__explicitlySet__.add("schedule"); + return this; + } + /** + * Count of Action Groups affected by the Schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedActionGroups") + private Integer countOfAffectedActionGroups; + + /** + * Count of Action Groups affected by the Schedule. + * @param countOfAffectedActionGroups the value to set + * @return this builder + **/ + public Builder countOfAffectedActionGroups(Integer countOfAffectedActionGroups) { + this.countOfAffectedActionGroups = countOfAffectedActionGroups; + this.__explicitlySet__.add("countOfAffectedActionGroups"); + return this; + } + /** + * Count of Resources affected by the Schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedResources") + private Integer countOfAffectedResources; + + /** + * Count of Resources affected by the Schedule. + * @param countOfAffectedResources the value to set + * @return this builder + **/ + public Builder countOfAffectedResources(Integer countOfAffectedResources) { + this.countOfAffectedResources = countOfAffectedResources; + this.__explicitlySet__.add("countOfAffectedResources"); + return this; + } + /** + * Count of Targets affected by the Schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedTargets") + private Integer countOfAffectedTargets; + + /** + * Count of Targets affected by the Schedule. + * @param countOfAffectedTargets the value to set + * @return this builder + **/ + public Builder countOfAffectedTargets(Integer countOfAffectedTargets) { + this.countOfAffectedTargets = countOfAffectedTargets; + this.__explicitlySet__.add("countOfAffectedTargets"); + return this; + } + /** + * All ActionGroup Types that are part of the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroupTypes") + private java.util.List actionGroupTypes; + + /** + * All ActionGroup Types that are part of the schedule. + * @param actionGroupTypes the value to set + * @return this builder + **/ + public Builder actionGroupTypes(java.util.List actionGroupTypes) { + this.actionGroupTypes = actionGroupTypes; + this.__explicitlySet__.add("actionGroupTypes"); + return this; + } + /** + * All application types that are part of the schedule for ENVIRONMENT ActionGroup Type. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationTypes") + private java.util.List applicationTypes; + + /** + * All application types that are part of the schedule for ENVIRONMENT ActionGroup Type. + * + * @param applicationTypes the value to set + * @return this builder + **/ + public Builder applicationTypes(java.util.List applicationTypes) { + this.applicationTypes = applicationTypes; + this.__explicitlySet__.add("applicationTypes"); + return this; + } + /** + * All products that are part of the schedule for PRODUCT ActionGroup Type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("products") + private java.util.List products; + + /** + * All products that are part of the schedule for PRODUCT ActionGroup Type. + * @param products the value to set + * @return this builder + **/ + public Builder products(java.util.List products) { + this.products = products; + this.__explicitlySet__.add("products"); + return this; + } + /** + * All LifeCycle Operations that are part of the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleOperations") + private java.util.List lifecycleOperations; + + /** + * All LifeCycle Operations that are part of the schedule. + * @param lifecycleOperations the value to set + * @return this builder + **/ + public Builder lifecycleOperations(java.util.List lifecycleOperations) { + this.lifecycleOperations = lifecycleOperations; + this.__explicitlySet__.add("lifecycleOperations"); + return this; + } + /** + * Action Groups associated with the Schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroups") + private java.util.List actionGroups; + + /** + * Action Groups associated with the Schedule. + * @param actionGroups the value to set + * @return this builder + **/ + public Builder actionGroups(java.util.List actionGroups) { + this.actionGroups = actionGroups; + this.__explicitlySet__.add("actionGroups"); + return this; + } + /** + * Runbooks. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runBooks") + private java.util.List runBooks; + + /** + * Runbooks. + * @param runBooks the value to set + * @return this builder + **/ + public Builder runBooks(java.util.List runBooks) { + this.runBooks = runBooks; + this.__explicitlySet__.add("runBooks"); + return this; + } + /** + * The current state of the SchedulerDefinition. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the SchedulerDefinition. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SchedulerDefinition build() { + SchedulerDefinition model = + new SchedulerDefinition( + this.id, + this.displayName, + this.description, + this.compartmentId, + this.resourceRegion, + this.timeCreated, + this.timeUpdated, + this.timeOfNextRun, + this.activityInitiationCutOff, + this.schedule, + this.countOfAffectedActionGroups, + this.countOfAffectedResources, + this.countOfAffectedTargets, + this.actionGroupTypes, + this.applicationTypes, + this.products, + this.lifecycleOperations, + this.actionGroups, + this.runBooks, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SchedulerDefinition model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("timeOfNextRun")) { + this.timeOfNextRun(model.getTimeOfNextRun()); + } + if (model.wasPropertyExplicitlySet("activityInitiationCutOff")) { + this.activityInitiationCutOff(model.getActivityInitiationCutOff()); + } + if (model.wasPropertyExplicitlySet("schedule")) { + this.schedule(model.getSchedule()); + } + if (model.wasPropertyExplicitlySet("countOfAffectedActionGroups")) { + this.countOfAffectedActionGroups(model.getCountOfAffectedActionGroups()); + } + if (model.wasPropertyExplicitlySet("countOfAffectedResources")) { + this.countOfAffectedResources(model.getCountOfAffectedResources()); + } + if (model.wasPropertyExplicitlySet("countOfAffectedTargets")) { + this.countOfAffectedTargets(model.getCountOfAffectedTargets()); + } + if (model.wasPropertyExplicitlySet("actionGroupTypes")) { + this.actionGroupTypes(model.getActionGroupTypes()); + } + if (model.wasPropertyExplicitlySet("applicationTypes")) { + this.applicationTypes(model.getApplicationTypes()); + } + if (model.wasPropertyExplicitlySet("products")) { + this.products(model.getProducts()); + } + if (model.wasPropertyExplicitlySet("lifecycleOperations")) { + this.lifecycleOperations(model.getLifecycleOperations()); + } + if (model.wasPropertyExplicitlySet("actionGroups")) { + this.actionGroups(model.getActionGroups()); + } + if (model.wasPropertyExplicitlySet("runBooks")) { + this.runBooks(model.getRunBooks()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The scheduled date for the next run of the Job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeOfNextRun") + private final java.util.Date timeOfNextRun; + + /** + * The scheduled date for the next run of the Job. + * @return the value + **/ + public java.util.Date getTimeOfNextRun() { + return timeOfNextRun; + } + + /** + * Activity Initiation Cut Off. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("activityInitiationCutOff") + private final Integer activityInitiationCutOff; + + /** + * Activity Initiation Cut Off. + * @return the value + **/ + public Integer getActivityInitiationCutOff() { + return activityInitiationCutOff; + } + + @com.fasterxml.jackson.annotation.JsonProperty("schedule") + private final Schedule schedule; + + public Schedule getSchedule() { + return schedule; + } + + /** + * Count of Action Groups affected by the Schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedActionGroups") + private final Integer countOfAffectedActionGroups; + + /** + * Count of Action Groups affected by the Schedule. + * @return the value + **/ + public Integer getCountOfAffectedActionGroups() { + return countOfAffectedActionGroups; + } + + /** + * Count of Resources affected by the Schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedResources") + private final Integer countOfAffectedResources; + + /** + * Count of Resources affected by the Schedule. + * @return the value + **/ + public Integer getCountOfAffectedResources() { + return countOfAffectedResources; + } + + /** + * Count of Targets affected by the Schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedTargets") + private final Integer countOfAffectedTargets; + + /** + * Count of Targets affected by the Schedule. + * @return the value + **/ + public Integer getCountOfAffectedTargets() { + return countOfAffectedTargets; + } + + /** + * All ActionGroup Types that are part of the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroupTypes") + private final java.util.List actionGroupTypes; + + /** + * All ActionGroup Types that are part of the schedule. + * @return the value + **/ + public java.util.List getActionGroupTypes() { + return actionGroupTypes; + } + + /** + * All application types that are part of the schedule for ENVIRONMENT ActionGroup Type. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationTypes") + private final java.util.List applicationTypes; + + /** + * All application types that are part of the schedule for ENVIRONMENT ActionGroup Type. + * + * @return the value + **/ + public java.util.List getApplicationTypes() { + return applicationTypes; + } + + /** + * All products that are part of the schedule for PRODUCT ActionGroup Type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("products") + private final java.util.List products; + + /** + * All products that are part of the schedule for PRODUCT ActionGroup Type. + * @return the value + **/ + public java.util.List getProducts() { + return products; + } + + /** + * All LifeCycle Operations that are part of the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleOperations") + private final java.util.List lifecycleOperations; + + /** + * All LifeCycle Operations that are part of the schedule. + * @return the value + **/ + public java.util.List getLifecycleOperations() { + return lifecycleOperations; + } + + /** + * Action Groups associated with the Schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroups") + private final java.util.List actionGroups; + + /** + * Action Groups associated with the Schedule. + * @return the value + **/ + public java.util.List getActionGroups() { + return actionGroups; + } + + /** + * Runbooks. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runBooks") + private final java.util.List runBooks; + + /** + * Runbooks. + * @return the value + **/ + public java.util.List getRunBooks() { + return runBooks; + } + + /** + * The current state of the SchedulerDefinition. + **/ + public enum LifecycleState { + Creating("CREATING"), + Updating("UPDATING"), + Active("ACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + Inactive("INACTIVE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the SchedulerDefinition. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the SchedulerDefinition. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SchedulerDefinition("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", timeOfNextRun=").append(String.valueOf(this.timeOfNextRun)); + sb.append(", activityInitiationCutOff=") + .append(String.valueOf(this.activityInitiationCutOff)); + sb.append(", schedule=").append(String.valueOf(this.schedule)); + sb.append(", countOfAffectedActionGroups=") + .append(String.valueOf(this.countOfAffectedActionGroups)); + sb.append(", countOfAffectedResources=") + .append(String.valueOf(this.countOfAffectedResources)); + sb.append(", countOfAffectedTargets=").append(String.valueOf(this.countOfAffectedTargets)); + sb.append(", actionGroupTypes=").append(String.valueOf(this.actionGroupTypes)); + sb.append(", applicationTypes=").append(String.valueOf(this.applicationTypes)); + sb.append(", products=").append(String.valueOf(this.products)); + sb.append(", lifecycleOperations=").append(String.valueOf(this.lifecycleOperations)); + sb.append(", actionGroups=").append(String.valueOf(this.actionGroups)); + sb.append(", runBooks=").append(String.valueOf(this.runBooks)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SchedulerDefinition)) { + return false; + } + + SchedulerDefinition other = (SchedulerDefinition) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.timeOfNextRun, other.timeOfNextRun) + && java.util.Objects.equals( + this.activityInitiationCutOff, other.activityInitiationCutOff) + && java.util.Objects.equals(this.schedule, other.schedule) + && java.util.Objects.equals( + this.countOfAffectedActionGroups, other.countOfAffectedActionGroups) + && java.util.Objects.equals( + this.countOfAffectedResources, other.countOfAffectedResources) + && java.util.Objects.equals( + this.countOfAffectedTargets, other.countOfAffectedTargets) + && java.util.Objects.equals(this.actionGroupTypes, other.actionGroupTypes) + && java.util.Objects.equals(this.applicationTypes, other.applicationTypes) + && java.util.Objects.equals(this.products, other.products) + && java.util.Objects.equals(this.lifecycleOperations, other.lifecycleOperations) + && java.util.Objects.equals(this.actionGroups, other.actionGroups) + && java.util.Objects.equals(this.runBooks, other.runBooks) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.timeOfNextRun == null ? 43 : this.timeOfNextRun.hashCode()); + result = + (result * PRIME) + + (this.activityInitiationCutOff == null + ? 43 + : this.activityInitiationCutOff.hashCode()); + result = (result * PRIME) + (this.schedule == null ? 43 : this.schedule.hashCode()); + result = + (result * PRIME) + + (this.countOfAffectedActionGroups == null + ? 43 + : this.countOfAffectedActionGroups.hashCode()); + result = + (result * PRIME) + + (this.countOfAffectedResources == null + ? 43 + : this.countOfAffectedResources.hashCode()); + result = + (result * PRIME) + + (this.countOfAffectedTargets == null + ? 43 + : this.countOfAffectedTargets.hashCode()); + result = + (result * PRIME) + + (this.actionGroupTypes == null ? 43 : this.actionGroupTypes.hashCode()); + result = + (result * PRIME) + + (this.applicationTypes == null ? 43 : this.applicationTypes.hashCode()); + result = (result * PRIME) + (this.products == null ? 43 : this.products.hashCode()); + result = + (result * PRIME) + + (this.lifecycleOperations == null + ? 43 + : this.lifecycleOperations.hashCode()); + result = (result * PRIME) + (this.actionGroups == null ? 43 : this.actionGroups.hashCode()); + result = (result * PRIME) + (this.runBooks == null ? 43 : this.runBooks.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerDefinitionCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerDefinitionCollection.java new file mode 100644 index 00000000000..988b3e83374 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerDefinitionCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a schedulerDefinition search. Contains boh SchedulerDefinitionSummary items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SchedulerDefinitionCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SchedulerDefinitionCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public SchedulerDefinitionCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of schedulerDefinitions. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of schedulerDefinitions. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SchedulerDefinitionCollection build() { + SchedulerDefinitionCollection model = new SchedulerDefinitionCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SchedulerDefinitionCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of schedulerDefinitions. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of schedulerDefinitions. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SchedulerDefinitionCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SchedulerDefinitionCollection)) { + return false; + } + + SchedulerDefinitionCollection other = (SchedulerDefinitionCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerDefinitionSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerDefinitionSummary.java new file mode 100644 index 00000000000..acf49f43626 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerDefinitionSummary.java @@ -0,0 +1,1011 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Summary of the SchedulerDefinition. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SchedulerDefinitionSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SchedulerDefinitionSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "description", + "compartmentId", + "resourceRegion", + "timeCreated", + "timeUpdated", + "timeOfNextRun", + "schedule", + "countOfAffectedActionGroups", + "countOfAffectedResources", + "countOfAffectedTargets", + "actionGroupTypes", + "applicationTypes", + "products", + "lifecycleOperations", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public SchedulerDefinitionSummary( + String id, + String displayName, + String description, + String compartmentId, + String resourceRegion, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.Date timeOfNextRun, + Schedule schedule, + Integer countOfAffectedActionGroups, + Integer countOfAffectedResources, + Integer countOfAffectedTargets, + java.util.List actionGroupTypes, + java.util.List applicationTypes, + java.util.List products, + java.util.List lifecycleOperations, + SchedulerDefinition.LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.description = description; + this.compartmentId = compartmentId; + this.resourceRegion = resourceRegion; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.timeOfNextRun = timeOfNextRun; + this.schedule = schedule; + this.countOfAffectedActionGroups = countOfAffectedActionGroups; + this.countOfAffectedResources = countOfAffectedResources; + this.countOfAffectedTargets = countOfAffectedTargets; + this.actionGroupTypes = actionGroupTypes; + this.applicationTypes = applicationTypes; + this.products = products; + this.lifecycleOperations = lifecycleOperations; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * Scheduled date for the next run of the Job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeOfNextRun") + private java.util.Date timeOfNextRun; + + /** + * Scheduled date for the next run of the Job. + * @param timeOfNextRun the value to set + * @return this builder + **/ + public Builder timeOfNextRun(java.util.Date timeOfNextRun) { + this.timeOfNextRun = timeOfNextRun; + this.__explicitlySet__.add("timeOfNextRun"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("schedule") + private Schedule schedule; + + public Builder schedule(Schedule schedule) { + this.schedule = schedule; + this.__explicitlySet__.add("schedule"); + return this; + } + /** + * Count of Action Groups affected by the Schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedActionGroups") + private Integer countOfAffectedActionGroups; + + /** + * Count of Action Groups affected by the Schedule. + * @param countOfAffectedActionGroups the value to set + * @return this builder + **/ + public Builder countOfAffectedActionGroups(Integer countOfAffectedActionGroups) { + this.countOfAffectedActionGroups = countOfAffectedActionGroups; + this.__explicitlySet__.add("countOfAffectedActionGroups"); + return this; + } + /** + * Count of Resources affected by the Schedule + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedResources") + private Integer countOfAffectedResources; + + /** + * Count of Resources affected by the Schedule + * @param countOfAffectedResources the value to set + * @return this builder + **/ + public Builder countOfAffectedResources(Integer countOfAffectedResources) { + this.countOfAffectedResources = countOfAffectedResources; + this.__explicitlySet__.add("countOfAffectedResources"); + return this; + } + /** + * Count of Targets affected by the Schedule + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedTargets") + private Integer countOfAffectedTargets; + + /** + * Count of Targets affected by the Schedule + * @param countOfAffectedTargets the value to set + * @return this builder + **/ + public Builder countOfAffectedTargets(Integer countOfAffectedTargets) { + this.countOfAffectedTargets = countOfAffectedTargets; + this.__explicitlySet__.add("countOfAffectedTargets"); + return this; + } + /** + * All ActionGroup Types part of the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroupTypes") + private java.util.List actionGroupTypes; + + /** + * All ActionGroup Types part of the schedule. + * @param actionGroupTypes the value to set + * @return this builder + **/ + public Builder actionGroupTypes(java.util.List actionGroupTypes) { + this.actionGroupTypes = actionGroupTypes; + this.__explicitlySet__.add("actionGroupTypes"); + return this; + } + /** + * All application types part of the schedule for ENVIRONMENT ActionGroup Type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationTypes") + private java.util.List applicationTypes; + + /** + * All application types part of the schedule for ENVIRONMENT ActionGroup Type. + * @param applicationTypes the value to set + * @return this builder + **/ + public Builder applicationTypes(java.util.List applicationTypes) { + this.applicationTypes = applicationTypes; + this.__explicitlySet__.add("applicationTypes"); + return this; + } + /** + * All products part of the schedule for PRODUCT ActionGroup Type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("products") + private java.util.List products; + + /** + * All products part of the schedule for PRODUCT ActionGroup Type. + * @param products the value to set + * @return this builder + **/ + public Builder products(java.util.List products) { + this.products = products; + this.__explicitlySet__.add("products"); + return this; + } + /** + * All LifeCycle Operations part of the schedule + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleOperations") + private java.util.List lifecycleOperations; + + /** + * All LifeCycle Operations part of the schedule + * @param lifecycleOperations the value to set + * @return this builder + **/ + public Builder lifecycleOperations(java.util.List lifecycleOperations) { + this.lifecycleOperations = lifecycleOperations; + this.__explicitlySet__.add("lifecycleOperations"); + return this; + } + /** + * The current state of the SchedulerDefinition. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private SchedulerDefinition.LifecycleState lifecycleState; + + /** + * The current state of the SchedulerDefinition. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(SchedulerDefinition.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SchedulerDefinitionSummary build() { + SchedulerDefinitionSummary model = + new SchedulerDefinitionSummary( + this.id, + this.displayName, + this.description, + this.compartmentId, + this.resourceRegion, + this.timeCreated, + this.timeUpdated, + this.timeOfNextRun, + this.schedule, + this.countOfAffectedActionGroups, + this.countOfAffectedResources, + this.countOfAffectedTargets, + this.actionGroupTypes, + this.applicationTypes, + this.products, + this.lifecycleOperations, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SchedulerDefinitionSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("timeOfNextRun")) { + this.timeOfNextRun(model.getTimeOfNextRun()); + } + if (model.wasPropertyExplicitlySet("schedule")) { + this.schedule(model.getSchedule()); + } + if (model.wasPropertyExplicitlySet("countOfAffectedActionGroups")) { + this.countOfAffectedActionGroups(model.getCountOfAffectedActionGroups()); + } + if (model.wasPropertyExplicitlySet("countOfAffectedResources")) { + this.countOfAffectedResources(model.getCountOfAffectedResources()); + } + if (model.wasPropertyExplicitlySet("countOfAffectedTargets")) { + this.countOfAffectedTargets(model.getCountOfAffectedTargets()); + } + if (model.wasPropertyExplicitlySet("actionGroupTypes")) { + this.actionGroupTypes(model.getActionGroupTypes()); + } + if (model.wasPropertyExplicitlySet("applicationTypes")) { + this.applicationTypes(model.getApplicationTypes()); + } + if (model.wasPropertyExplicitlySet("products")) { + this.products(model.getProducts()); + } + if (model.wasPropertyExplicitlySet("lifecycleOperations")) { + this.lifecycleOperations(model.getLifecycleOperations()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * Scheduled date for the next run of the Job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeOfNextRun") + private final java.util.Date timeOfNextRun; + + /** + * Scheduled date for the next run of the Job. + * @return the value + **/ + public java.util.Date getTimeOfNextRun() { + return timeOfNextRun; + } + + @com.fasterxml.jackson.annotation.JsonProperty("schedule") + private final Schedule schedule; + + public Schedule getSchedule() { + return schedule; + } + + /** + * Count of Action Groups affected by the Schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedActionGroups") + private final Integer countOfAffectedActionGroups; + + /** + * Count of Action Groups affected by the Schedule. + * @return the value + **/ + public Integer getCountOfAffectedActionGroups() { + return countOfAffectedActionGroups; + } + + /** + * Count of Resources affected by the Schedule + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedResources") + private final Integer countOfAffectedResources; + + /** + * Count of Resources affected by the Schedule + * @return the value + **/ + public Integer getCountOfAffectedResources() { + return countOfAffectedResources; + } + + /** + * Count of Targets affected by the Schedule + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedTargets") + private final Integer countOfAffectedTargets; + + /** + * Count of Targets affected by the Schedule + * @return the value + **/ + public Integer getCountOfAffectedTargets() { + return countOfAffectedTargets; + } + + /** + * All ActionGroup Types part of the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroupTypes") + private final java.util.List actionGroupTypes; + + /** + * All ActionGroup Types part of the schedule. + * @return the value + **/ + public java.util.List getActionGroupTypes() { + return actionGroupTypes; + } + + /** + * All application types part of the schedule for ENVIRONMENT ActionGroup Type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationTypes") + private final java.util.List applicationTypes; + + /** + * All application types part of the schedule for ENVIRONMENT ActionGroup Type. + * @return the value + **/ + public java.util.List getApplicationTypes() { + return applicationTypes; + } + + /** + * All products part of the schedule for PRODUCT ActionGroup Type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("products") + private final java.util.List products; + + /** + * All products part of the schedule for PRODUCT ActionGroup Type. + * @return the value + **/ + public java.util.List getProducts() { + return products; + } + + /** + * All LifeCycle Operations part of the schedule + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleOperations") + private final java.util.List lifecycleOperations; + + /** + * All LifeCycle Operations part of the schedule + * @return the value + **/ + public java.util.List getLifecycleOperations() { + return lifecycleOperations; + } + + /** + * The current state of the SchedulerDefinition. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final SchedulerDefinition.LifecycleState lifecycleState; + + /** + * The current state of the SchedulerDefinition. + * @return the value + **/ + public SchedulerDefinition.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SchedulerDefinitionSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", timeOfNextRun=").append(String.valueOf(this.timeOfNextRun)); + sb.append(", schedule=").append(String.valueOf(this.schedule)); + sb.append(", countOfAffectedActionGroups=") + .append(String.valueOf(this.countOfAffectedActionGroups)); + sb.append(", countOfAffectedResources=") + .append(String.valueOf(this.countOfAffectedResources)); + sb.append(", countOfAffectedTargets=").append(String.valueOf(this.countOfAffectedTargets)); + sb.append(", actionGroupTypes=").append(String.valueOf(this.actionGroupTypes)); + sb.append(", applicationTypes=").append(String.valueOf(this.applicationTypes)); + sb.append(", products=").append(String.valueOf(this.products)); + sb.append(", lifecycleOperations=").append(String.valueOf(this.lifecycleOperations)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SchedulerDefinitionSummary)) { + return false; + } + + SchedulerDefinitionSummary other = (SchedulerDefinitionSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.timeOfNextRun, other.timeOfNextRun) + && java.util.Objects.equals(this.schedule, other.schedule) + && java.util.Objects.equals( + this.countOfAffectedActionGroups, other.countOfAffectedActionGroups) + && java.util.Objects.equals( + this.countOfAffectedResources, other.countOfAffectedResources) + && java.util.Objects.equals( + this.countOfAffectedTargets, other.countOfAffectedTargets) + && java.util.Objects.equals(this.actionGroupTypes, other.actionGroupTypes) + && java.util.Objects.equals(this.applicationTypes, other.applicationTypes) + && java.util.Objects.equals(this.products, other.products) + && java.util.Objects.equals(this.lifecycleOperations, other.lifecycleOperations) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.timeOfNextRun == null ? 43 : this.timeOfNextRun.hashCode()); + result = (result * PRIME) + (this.schedule == null ? 43 : this.schedule.hashCode()); + result = + (result * PRIME) + + (this.countOfAffectedActionGroups == null + ? 43 + : this.countOfAffectedActionGroups.hashCode()); + result = + (result * PRIME) + + (this.countOfAffectedResources == null + ? 43 + : this.countOfAffectedResources.hashCode()); + result = + (result * PRIME) + + (this.countOfAffectedTargets == null + ? 43 + : this.countOfAffectedTargets.hashCode()); + result = + (result * PRIME) + + (this.actionGroupTypes == null ? 43 : this.actionGroupTypes.hashCode()); + result = + (result * PRIME) + + (this.applicationTypes == null ? 43 : this.applicationTypes.hashCode()); + result = (result * PRIME) + (this.products == null ? 43 : this.products.hashCode()); + result = + (result * PRIME) + + (this.lifecycleOperations == null + ? 43 + : this.lifecycleOperations.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerJob.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerJob.java new file mode 100644 index 00000000000..ce801a8dfa4 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerJob.java @@ -0,0 +1,1106 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * A SchedulerJob resource. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = SchedulerJob.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SchedulerJob extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "compartmentId", + "timeCreated", + "timeUpdated", + "timeScheduled", + "timeStarted", + "timeEnded", + "countOfAffectedActionGroups", + "countOfAffectedResources", + "countOfAffectedTargets", + "actionGroupTypes", + "applicationTypes", + "products", + "lifecycleOperations", + "actionGroups", + "associatedScheduleDefinition", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public SchedulerJob( + String id, + String displayName, + String compartmentId, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.Date timeScheduled, + java.util.Date timeStarted, + java.util.Date timeEnded, + Integer countOfAffectedActionGroups, + Integer countOfAffectedResources, + Integer countOfAffectedTargets, + java.util.List actionGroupTypes, + java.util.List applicationTypes, + java.util.List products, + java.util.List lifecycleOperations, + java.util.List actionGroups, + AssociatedSchedulerDefinition associatedScheduleDefinition, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.compartmentId = compartmentId; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.timeScheduled = timeScheduled; + this.timeStarted = timeStarted; + this.timeEnded = timeEnded; + this.countOfAffectedActionGroups = countOfAffectedActionGroups; + this.countOfAffectedResources = countOfAffectedResources; + this.countOfAffectedTargets = countOfAffectedTargets; + this.actionGroupTypes = actionGroupTypes; + this.applicationTypes = applicationTypes; + this.products = products; + this.lifecycleOperations = lifecycleOperations; + this.actionGroups = actionGroups; + this.associatedScheduleDefinition = associatedScheduleDefinition; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The scheduled date and time for the Job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduled") + private java.util.Date timeScheduled; + + /** + * The scheduled date and time for the Job. + * @param timeScheduled the value to set + * @return this builder + **/ + public Builder timeScheduled(java.util.Date timeScheduled) { + this.timeScheduled = timeScheduled; + this.__explicitlySet__.add("timeScheduled"); + return this; + } + /** + * Actual start date and time for the Job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * Actual start date and time for the Job. + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * Actual end date and time for the Job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + private java.util.Date timeEnded; + + /** + * Actual end date and time for the Job. + * @param timeEnded the value to set + * @return this builder + **/ + public Builder timeEnded(java.util.Date timeEnded) { + this.timeEnded = timeEnded; + this.__explicitlySet__.add("timeEnded"); + return this; + } + /** + * Count of Action Groups affected by the Schedule. + * An action group is a group of entities grouped for a lifecycle activity. + * Example - A Fleet will be considered an Action Group for any lifecycle activity. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedActionGroups") + private Integer countOfAffectedActionGroups; + + /** + * Count of Action Groups affected by the Schedule. + * An action group is a group of entities grouped for a lifecycle activity. + * Example - A Fleet will be considered an Action Group for any lifecycle activity. + * + * @param countOfAffectedActionGroups the value to set + * @return this builder + **/ + public Builder countOfAffectedActionGroups(Integer countOfAffectedActionGroups) { + this.countOfAffectedActionGroups = countOfAffectedActionGroups; + this.__explicitlySet__.add("countOfAffectedActionGroups"); + return this; + } + /** + * Count of resources affected by the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedResources") + private Integer countOfAffectedResources; + + /** + * Count of resources affected by the schedule. + * @param countOfAffectedResources the value to set + * @return this builder + **/ + public Builder countOfAffectedResources(Integer countOfAffectedResources) { + this.countOfAffectedResources = countOfAffectedResources; + this.__explicitlySet__.add("countOfAffectedResources"); + return this; + } + /** + * Count of targets affected by the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedTargets") + private Integer countOfAffectedTargets; + + /** + * Count of targets affected by the schedule. + * @param countOfAffectedTargets the value to set + * @return this builder + **/ + public Builder countOfAffectedTargets(Integer countOfAffectedTargets) { + this.countOfAffectedTargets = countOfAffectedTargets; + this.__explicitlySet__.add("countOfAffectedTargets"); + return this; + } + /** + * All Action Group types are part of the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroupTypes") + private java.util.List actionGroupTypes; + + /** + * All Action Group types are part of the schedule. + * @param actionGroupTypes the value to set + * @return this builder + **/ + public Builder actionGroupTypes(java.util.List actionGroupTypes) { + this.actionGroupTypes = actionGroupTypes; + this.__explicitlySet__.add("actionGroupTypes"); + return this; + } + /** + * All application types that are part of the schedule for an ENVIRONMENT action group Type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationTypes") + private java.util.List applicationTypes; + + /** + * All application types that are part of the schedule for an ENVIRONMENT action group Type. + * @param applicationTypes the value to set + * @return this builder + **/ + public Builder applicationTypes(java.util.List applicationTypes) { + this.applicationTypes = applicationTypes; + this.__explicitlySet__.add("applicationTypes"); + return this; + } + /** + * All products that are part of the schedule for a PRODUCT action group type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("products") + private java.util.List products; + + /** + * All products that are part of the schedule for a PRODUCT action group type. + * @param products the value to set + * @return this builder + **/ + public Builder products(java.util.List products) { + this.products = products; + this.__explicitlySet__.add("products"); + return this; + } + /** + * All LifeCycle Operations that are part of the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleOperations") + private java.util.List lifecycleOperations; + + /** + * All LifeCycle Operations that are part of the schedule. + * @param lifecycleOperations the value to set + * @return this builder + **/ + public Builder lifecycleOperations(java.util.List lifecycleOperations) { + this.lifecycleOperations = lifecycleOperations; + this.__explicitlySet__.add("lifecycleOperations"); + return this; + } + /** + * Action Groups associated with the Schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroups") + private java.util.List actionGroups; + + /** + * Action Groups associated with the Schedule. + * @param actionGroups the value to set + * @return this builder + **/ + public Builder actionGroups(java.util.List actionGroups) { + this.actionGroups = actionGroups; + this.__explicitlySet__.add("actionGroups"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("associatedScheduleDefinition") + private AssociatedSchedulerDefinition associatedScheduleDefinition; + + public Builder associatedScheduleDefinition( + AssociatedSchedulerDefinition associatedScheduleDefinition) { + this.associatedScheduleDefinition = associatedScheduleDefinition; + this.__explicitlySet__.add("associatedScheduleDefinition"); + return this; + } + /** + * The current state of the SchedulerJob. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the SchedulerJob. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SchedulerJob build() { + SchedulerJob model = + new SchedulerJob( + this.id, + this.displayName, + this.compartmentId, + this.timeCreated, + this.timeUpdated, + this.timeScheduled, + this.timeStarted, + this.timeEnded, + this.countOfAffectedActionGroups, + this.countOfAffectedResources, + this.countOfAffectedTargets, + this.actionGroupTypes, + this.applicationTypes, + this.products, + this.lifecycleOperations, + this.actionGroups, + this.associatedScheduleDefinition, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SchedulerJob model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("timeScheduled")) { + this.timeScheduled(model.getTimeScheduled()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeEnded")) { + this.timeEnded(model.getTimeEnded()); + } + if (model.wasPropertyExplicitlySet("countOfAffectedActionGroups")) { + this.countOfAffectedActionGroups(model.getCountOfAffectedActionGroups()); + } + if (model.wasPropertyExplicitlySet("countOfAffectedResources")) { + this.countOfAffectedResources(model.getCountOfAffectedResources()); + } + if (model.wasPropertyExplicitlySet("countOfAffectedTargets")) { + this.countOfAffectedTargets(model.getCountOfAffectedTargets()); + } + if (model.wasPropertyExplicitlySet("actionGroupTypes")) { + this.actionGroupTypes(model.getActionGroupTypes()); + } + if (model.wasPropertyExplicitlySet("applicationTypes")) { + this.applicationTypes(model.getApplicationTypes()); + } + if (model.wasPropertyExplicitlySet("products")) { + this.products(model.getProducts()); + } + if (model.wasPropertyExplicitlySet("lifecycleOperations")) { + this.lifecycleOperations(model.getLifecycleOperations()); + } + if (model.wasPropertyExplicitlySet("actionGroups")) { + this.actionGroups(model.getActionGroups()); + } + if (model.wasPropertyExplicitlySet("associatedScheduleDefinition")) { + this.associatedScheduleDefinition(model.getAssociatedScheduleDefinition()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The scheduled date and time for the Job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduled") + private final java.util.Date timeScheduled; + + /** + * The scheduled date and time for the Job. + * @return the value + **/ + public java.util.Date getTimeScheduled() { + return timeScheduled; + } + + /** + * Actual start date and time for the Job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * Actual start date and time for the Job. + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * Actual end date and time for the Job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + private final java.util.Date timeEnded; + + /** + * Actual end date and time for the Job. + * @return the value + **/ + public java.util.Date getTimeEnded() { + return timeEnded; + } + + /** + * Count of Action Groups affected by the Schedule. + * An action group is a group of entities grouped for a lifecycle activity. + * Example - A Fleet will be considered an Action Group for any lifecycle activity. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedActionGroups") + private final Integer countOfAffectedActionGroups; + + /** + * Count of Action Groups affected by the Schedule. + * An action group is a group of entities grouped for a lifecycle activity. + * Example - A Fleet will be considered an Action Group for any lifecycle activity. + * + * @return the value + **/ + public Integer getCountOfAffectedActionGroups() { + return countOfAffectedActionGroups; + } + + /** + * Count of resources affected by the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedResources") + private final Integer countOfAffectedResources; + + /** + * Count of resources affected by the schedule. + * @return the value + **/ + public Integer getCountOfAffectedResources() { + return countOfAffectedResources; + } + + /** + * Count of targets affected by the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedTargets") + private final Integer countOfAffectedTargets; + + /** + * Count of targets affected by the schedule. + * @return the value + **/ + public Integer getCountOfAffectedTargets() { + return countOfAffectedTargets; + } + + /** + * All Action Group types are part of the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroupTypes") + private final java.util.List actionGroupTypes; + + /** + * All Action Group types are part of the schedule. + * @return the value + **/ + public java.util.List getActionGroupTypes() { + return actionGroupTypes; + } + + /** + * All application types that are part of the schedule for an ENVIRONMENT action group Type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationTypes") + private final java.util.List applicationTypes; + + /** + * All application types that are part of the schedule for an ENVIRONMENT action group Type. + * @return the value + **/ + public java.util.List getApplicationTypes() { + return applicationTypes; + } + + /** + * All products that are part of the schedule for a PRODUCT action group type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("products") + private final java.util.List products; + + /** + * All products that are part of the schedule for a PRODUCT action group type. + * @return the value + **/ + public java.util.List getProducts() { + return products; + } + + /** + * All LifeCycle Operations that are part of the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleOperations") + private final java.util.List lifecycleOperations; + + /** + * All LifeCycle Operations that are part of the schedule. + * @return the value + **/ + public java.util.List getLifecycleOperations() { + return lifecycleOperations; + } + + /** + * Action Groups associated with the Schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroups") + private final java.util.List actionGroups; + + /** + * Action Groups associated with the Schedule. + * @return the value + **/ + public java.util.List getActionGroups() { + return actionGroups; + } + + @com.fasterxml.jackson.annotation.JsonProperty("associatedScheduleDefinition") + private final AssociatedSchedulerDefinition associatedScheduleDefinition; + + public AssociatedSchedulerDefinition getAssociatedScheduleDefinition() { + return associatedScheduleDefinition; + } + + /** + * The current state of the SchedulerJob. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the SchedulerJob. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the SchedulerJob. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SchedulerJob("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", timeScheduled=").append(String.valueOf(this.timeScheduled)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeEnded=").append(String.valueOf(this.timeEnded)); + sb.append(", countOfAffectedActionGroups=") + .append(String.valueOf(this.countOfAffectedActionGroups)); + sb.append(", countOfAffectedResources=") + .append(String.valueOf(this.countOfAffectedResources)); + sb.append(", countOfAffectedTargets=").append(String.valueOf(this.countOfAffectedTargets)); + sb.append(", actionGroupTypes=").append(String.valueOf(this.actionGroupTypes)); + sb.append(", applicationTypes=").append(String.valueOf(this.applicationTypes)); + sb.append(", products=").append(String.valueOf(this.products)); + sb.append(", lifecycleOperations=").append(String.valueOf(this.lifecycleOperations)); + sb.append(", actionGroups=").append(String.valueOf(this.actionGroups)); + sb.append(", associatedScheduleDefinition=") + .append(String.valueOf(this.associatedScheduleDefinition)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SchedulerJob)) { + return false; + } + + SchedulerJob other = (SchedulerJob) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.timeScheduled, other.timeScheduled) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeEnded, other.timeEnded) + && java.util.Objects.equals( + this.countOfAffectedActionGroups, other.countOfAffectedActionGroups) + && java.util.Objects.equals( + this.countOfAffectedResources, other.countOfAffectedResources) + && java.util.Objects.equals( + this.countOfAffectedTargets, other.countOfAffectedTargets) + && java.util.Objects.equals(this.actionGroupTypes, other.actionGroupTypes) + && java.util.Objects.equals(this.applicationTypes, other.applicationTypes) + && java.util.Objects.equals(this.products, other.products) + && java.util.Objects.equals(this.lifecycleOperations, other.lifecycleOperations) + && java.util.Objects.equals(this.actionGroups, other.actionGroups) + && java.util.Objects.equals( + this.associatedScheduleDefinition, other.associatedScheduleDefinition) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.timeScheduled == null ? 43 : this.timeScheduled.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeEnded == null ? 43 : this.timeEnded.hashCode()); + result = + (result * PRIME) + + (this.countOfAffectedActionGroups == null + ? 43 + : this.countOfAffectedActionGroups.hashCode()); + result = + (result * PRIME) + + (this.countOfAffectedResources == null + ? 43 + : this.countOfAffectedResources.hashCode()); + result = + (result * PRIME) + + (this.countOfAffectedTargets == null + ? 43 + : this.countOfAffectedTargets.hashCode()); + result = + (result * PRIME) + + (this.actionGroupTypes == null ? 43 : this.actionGroupTypes.hashCode()); + result = + (result * PRIME) + + (this.applicationTypes == null ? 43 : this.applicationTypes.hashCode()); + result = (result * PRIME) + (this.products == null ? 43 : this.products.hashCode()); + result = + (result * PRIME) + + (this.lifecycleOperations == null + ? 43 + : this.lifecycleOperations.hashCode()); + result = (result * PRIME) + (this.actionGroups == null ? 43 : this.actionGroups.hashCode()); + result = + (result * PRIME) + + (this.associatedScheduleDefinition == null + ? 43 + : this.associatedScheduleDefinition.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerJobAggregation.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerJobAggregation.java new file mode 100644 index 00000000000..62ac4b8db9f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerJobAggregation.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Aggregated summary information for SchedulerJob. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SchedulerJobAggregation.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SchedulerJobAggregation + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"count", "dimensions"}) + public SchedulerJobAggregation(Integer count, SchedulerJobDimension dimensions) { + super(); + this.count = count; + this.dimensions = dimensions; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Count of jobs in a Tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("count") + private Integer count; + + /** + * Count of jobs in a Tenancy. + * @param count the value to set + * @return this builder + **/ + public Builder count(Integer count) { + this.count = count; + this.__explicitlySet__.add("count"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dimensions") + private SchedulerJobDimension dimensions; + + public Builder dimensions(SchedulerJobDimension dimensions) { + this.dimensions = dimensions; + this.__explicitlySet__.add("dimensions"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SchedulerJobAggregation build() { + SchedulerJobAggregation model = + new SchedulerJobAggregation(this.count, this.dimensions); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SchedulerJobAggregation model) { + if (model.wasPropertyExplicitlySet("count")) { + this.count(model.getCount()); + } + if (model.wasPropertyExplicitlySet("dimensions")) { + this.dimensions(model.getDimensions()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Count of jobs in a Tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("count") + private final Integer count; + + /** + * Count of jobs in a Tenancy. + * @return the value + **/ + public Integer getCount() { + return count; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dimensions") + private final SchedulerJobDimension dimensions; + + public SchedulerJobDimension getDimensions() { + return dimensions; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SchedulerJobAggregation("); + sb.append("super=").append(super.toString()); + sb.append("count=").append(String.valueOf(this.count)); + sb.append(", dimensions=").append(String.valueOf(this.dimensions)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SchedulerJobAggregation)) { + return false; + } + + SchedulerJobAggregation other = (SchedulerJobAggregation) o; + return java.util.Objects.equals(this.count, other.count) + && java.util.Objects.equals(this.dimensions, other.dimensions) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.count == null ? 43 : this.count.hashCode()); + result = (result * PRIME) + (this.dimensions == null ? 43 : this.dimensions.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerJobAggregationCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerJobAggregationCollection.java new file mode 100644 index 00000000000..ba7624034fe --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerJobAggregationCollection.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * An array of SchedulerJob objects. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SchedulerJobAggregationCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SchedulerJobAggregationCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public SchedulerJobAggregationCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of SchedulerJobAggregation objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of SchedulerJobAggregation objects. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SchedulerJobAggregationCollection build() { + SchedulerJobAggregationCollection model = + new SchedulerJobAggregationCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SchedulerJobAggregationCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of SchedulerJobAggregation objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of SchedulerJobAggregation objects. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SchedulerJobAggregationCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SchedulerJobAggregationCollection)) { + return false; + } + + SchedulerJobAggregationCollection other = (SchedulerJobAggregationCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerJobCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerJobCollection.java new file mode 100644 index 00000000000..464c668b855 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerJobCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a schedulerJob search. Contains SchedulerJobSummary items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SchedulerJobCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SchedulerJobCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public SchedulerJobCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of schedulerJobs. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of schedulerJobs. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SchedulerJobCollection build() { + SchedulerJobCollection model = new SchedulerJobCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SchedulerJobCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of schedulerJobs. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of schedulerJobs. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SchedulerJobCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SchedulerJobCollection)) { + return false; + } + + SchedulerJobCollection other = (SchedulerJobCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerJobDimension.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerJobDimension.java new file mode 100644 index 00000000000..ed0efdaaa9e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerJobDimension.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Aggregated summary information for a SchedulerJob. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SchedulerJobDimension.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SchedulerJobDimension + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"lifecycleDetails"}) + public SchedulerJobDimension(String lifecycleDetails) { + super(); + this.lifecycleDetails = lifecycleDetails; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SchedulerJobDimension build() { + SchedulerJobDimension model = new SchedulerJobDimension(this.lifecycleDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SchedulerJobDimension model) { + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SchedulerJobDimension("); + sb.append("super=").append(super.toString()); + sb.append("lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SchedulerJobDimension)) { + return false; + } + + SchedulerJobDimension other = (SchedulerJobDimension) o; + return java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerJobSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerJobSummary.java new file mode 100644 index 00000000000..d74e70e5474 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SchedulerJobSummary.java @@ -0,0 +1,979 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Summary of the SchedulerJob. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SchedulerJobSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SchedulerJobSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "compartmentId", + "timeCreated", + "timeUpdated", + "timeScheduled", + "countOfAffectedActionGroups", + "countOfAffectedResources", + "countOfAffectedTargets", + "actionGroupTypes", + "applicationTypes", + "products", + "lifecycleOperations", + "actionGroups", + "associatedScheduleDefinition", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public SchedulerJobSummary( + String id, + String displayName, + String compartmentId, + java.util.Date timeCreated, + java.util.Date timeUpdated, + java.util.Date timeScheduled, + Integer countOfAffectedActionGroups, + Integer countOfAffectedResources, + Integer countOfAffectedTargets, + java.util.List actionGroupTypes, + java.util.List applicationTypes, + java.util.List products, + java.util.List lifecycleOperations, + java.util.List actionGroups, + AssociatedSchedulerDefinition associatedScheduleDefinition, + SchedulerJob.LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.compartmentId = compartmentId; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.timeScheduled = timeScheduled; + this.countOfAffectedActionGroups = countOfAffectedActionGroups; + this.countOfAffectedResources = countOfAffectedResources; + this.countOfAffectedTargets = countOfAffectedTargets; + this.actionGroupTypes = actionGroupTypes; + this.applicationTypes = applicationTypes; + this.products = products; + this.lifecycleOperations = lifecycleOperations; + this.actionGroups = actionGroups; + this.associatedScheduleDefinition = associatedScheduleDefinition; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Tenancy OCID + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The scheduled date and time for the Job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduled") + private java.util.Date timeScheduled; + + /** + * The scheduled date and time for the Job. + * @param timeScheduled the value to set + * @return this builder + **/ + public Builder timeScheduled(java.util.Date timeScheduled) { + this.timeScheduled = timeScheduled; + this.__explicitlySet__.add("timeScheduled"); + return this; + } + /** + * Count of Action Groups affected by the Schedule. + * An action group is a group of entities grouped for a lifecycle activity. + * Example - A Fleet will be considered an Action Group for any lifecycle activity. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedActionGroups") + private Integer countOfAffectedActionGroups; + + /** + * Count of Action Groups affected by the Schedule. + * An action group is a group of entities grouped for a lifecycle activity. + * Example - A Fleet will be considered an Action Group for any lifecycle activity. + * + * @param countOfAffectedActionGroups the value to set + * @return this builder + **/ + public Builder countOfAffectedActionGroups(Integer countOfAffectedActionGroups) { + this.countOfAffectedActionGroups = countOfAffectedActionGroups; + this.__explicitlySet__.add("countOfAffectedActionGroups"); + return this; + } + /** + * Count of resources affected by the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedResources") + private Integer countOfAffectedResources; + + /** + * Count of resources affected by the schedule. + * @param countOfAffectedResources the value to set + * @return this builder + **/ + public Builder countOfAffectedResources(Integer countOfAffectedResources) { + this.countOfAffectedResources = countOfAffectedResources; + this.__explicitlySet__.add("countOfAffectedResources"); + return this; + } + /** + * Count of targets affected by the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedTargets") + private Integer countOfAffectedTargets; + + /** + * Count of targets affected by the schedule. + * @param countOfAffectedTargets the value to set + * @return this builder + **/ + public Builder countOfAffectedTargets(Integer countOfAffectedTargets) { + this.countOfAffectedTargets = countOfAffectedTargets; + this.__explicitlySet__.add("countOfAffectedTargets"); + return this; + } + /** + * All Action Group types are part of the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroupTypes") + private java.util.List actionGroupTypes; + + /** + * All Action Group types are part of the schedule. + * @param actionGroupTypes the value to set + * @return this builder + **/ + public Builder actionGroupTypes(java.util.List actionGroupTypes) { + this.actionGroupTypes = actionGroupTypes; + this.__explicitlySet__.add("actionGroupTypes"); + return this; + } + /** + * All application types that are part of the schedule for an ENVIRONMENT action group Type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationTypes") + private java.util.List applicationTypes; + + /** + * All application types that are part of the schedule for an ENVIRONMENT action group Type. + * @param applicationTypes the value to set + * @return this builder + **/ + public Builder applicationTypes(java.util.List applicationTypes) { + this.applicationTypes = applicationTypes; + this.__explicitlySet__.add("applicationTypes"); + return this; + } + /** + * All products that are part of the schedule for a PRODUCT action group type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("products") + private java.util.List products; + + /** + * All products that are part of the schedule for a PRODUCT action group type. + * @param products the value to set + * @return this builder + **/ + public Builder products(java.util.List products) { + this.products = products; + this.__explicitlySet__.add("products"); + return this; + } + /** + * All LifeCycle Operations that are part of the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleOperations") + private java.util.List lifecycleOperations; + + /** + * All LifeCycle Operations that are part of the schedule. + * @param lifecycleOperations the value to set + * @return this builder + **/ + public Builder lifecycleOperations(java.util.List lifecycleOperations) { + this.lifecycleOperations = lifecycleOperations; + this.__explicitlySet__.add("lifecycleOperations"); + return this; + } + /** + * Action Groups associated with the Schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroups") + private java.util.List actionGroups; + + /** + * Action Groups associated with the Schedule. + * @param actionGroups the value to set + * @return this builder + **/ + public Builder actionGroups(java.util.List actionGroups) { + this.actionGroups = actionGroups; + this.__explicitlySet__.add("actionGroups"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("associatedScheduleDefinition") + private AssociatedSchedulerDefinition associatedScheduleDefinition; + + public Builder associatedScheduleDefinition( + AssociatedSchedulerDefinition associatedScheduleDefinition) { + this.associatedScheduleDefinition = associatedScheduleDefinition; + this.__explicitlySet__.add("associatedScheduleDefinition"); + return this; + } + /** + * The current state of the SchedulerJob. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private SchedulerJob.LifecycleState lifecycleState; + + /** + * The current state of the SchedulerJob. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(SchedulerJob.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SchedulerJobSummary build() { + SchedulerJobSummary model = + new SchedulerJobSummary( + this.id, + this.displayName, + this.compartmentId, + this.timeCreated, + this.timeUpdated, + this.timeScheduled, + this.countOfAffectedActionGroups, + this.countOfAffectedResources, + this.countOfAffectedTargets, + this.actionGroupTypes, + this.applicationTypes, + this.products, + this.lifecycleOperations, + this.actionGroups, + this.associatedScheduleDefinition, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SchedulerJobSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("timeScheduled")) { + this.timeScheduled(model.getTimeScheduled()); + } + if (model.wasPropertyExplicitlySet("countOfAffectedActionGroups")) { + this.countOfAffectedActionGroups(model.getCountOfAffectedActionGroups()); + } + if (model.wasPropertyExplicitlySet("countOfAffectedResources")) { + this.countOfAffectedResources(model.getCountOfAffectedResources()); + } + if (model.wasPropertyExplicitlySet("countOfAffectedTargets")) { + this.countOfAffectedTargets(model.getCountOfAffectedTargets()); + } + if (model.wasPropertyExplicitlySet("actionGroupTypes")) { + this.actionGroupTypes(model.getActionGroupTypes()); + } + if (model.wasPropertyExplicitlySet("applicationTypes")) { + this.applicationTypes(model.getApplicationTypes()); + } + if (model.wasPropertyExplicitlySet("products")) { + this.products(model.getProducts()); + } + if (model.wasPropertyExplicitlySet("lifecycleOperations")) { + this.lifecycleOperations(model.getLifecycleOperations()); + } + if (model.wasPropertyExplicitlySet("actionGroups")) { + this.actionGroups(model.getActionGroups()); + } + if (model.wasPropertyExplicitlySet("associatedScheduleDefinition")) { + this.associatedScheduleDefinition(model.getAssociatedScheduleDefinition()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Tenancy OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Tenancy OCID + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The scheduled date and time for the Job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduled") + private final java.util.Date timeScheduled; + + /** + * The scheduled date and time for the Job. + * @return the value + **/ + public java.util.Date getTimeScheduled() { + return timeScheduled; + } + + /** + * Count of Action Groups affected by the Schedule. + * An action group is a group of entities grouped for a lifecycle activity. + * Example - A Fleet will be considered an Action Group for any lifecycle activity. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedActionGroups") + private final Integer countOfAffectedActionGroups; + + /** + * Count of Action Groups affected by the Schedule. + * An action group is a group of entities grouped for a lifecycle activity. + * Example - A Fleet will be considered an Action Group for any lifecycle activity. + * + * @return the value + **/ + public Integer getCountOfAffectedActionGroups() { + return countOfAffectedActionGroups; + } + + /** + * Count of resources affected by the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedResources") + private final Integer countOfAffectedResources; + + /** + * Count of resources affected by the schedule. + * @return the value + **/ + public Integer getCountOfAffectedResources() { + return countOfAffectedResources; + } + + /** + * Count of targets affected by the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("countOfAffectedTargets") + private final Integer countOfAffectedTargets; + + /** + * Count of targets affected by the schedule. + * @return the value + **/ + public Integer getCountOfAffectedTargets() { + return countOfAffectedTargets; + } + + /** + * All Action Group types are part of the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroupTypes") + private final java.util.List actionGroupTypes; + + /** + * All Action Group types are part of the schedule. + * @return the value + **/ + public java.util.List getActionGroupTypes() { + return actionGroupTypes; + } + + /** + * All application types that are part of the schedule for an ENVIRONMENT action group Type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationTypes") + private final java.util.List applicationTypes; + + /** + * All application types that are part of the schedule for an ENVIRONMENT action group Type. + * @return the value + **/ + public java.util.List getApplicationTypes() { + return applicationTypes; + } + + /** + * All products that are part of the schedule for a PRODUCT action group type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("products") + private final java.util.List products; + + /** + * All products that are part of the schedule for a PRODUCT action group type. + * @return the value + **/ + public java.util.List getProducts() { + return products; + } + + /** + * All LifeCycle Operations that are part of the schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleOperations") + private final java.util.List lifecycleOperations; + + /** + * All LifeCycle Operations that are part of the schedule. + * @return the value + **/ + public java.util.List getLifecycleOperations() { + return lifecycleOperations; + } + + /** + * Action Groups associated with the Schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroups") + private final java.util.List actionGroups; + + /** + * Action Groups associated with the Schedule. + * @return the value + **/ + public java.util.List getActionGroups() { + return actionGroups; + } + + @com.fasterxml.jackson.annotation.JsonProperty("associatedScheduleDefinition") + private final AssociatedSchedulerDefinition associatedScheduleDefinition; + + public AssociatedSchedulerDefinition getAssociatedScheduleDefinition() { + return associatedScheduleDefinition; + } + + /** + * The current state of the SchedulerJob. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final SchedulerJob.LifecycleState lifecycleState; + + /** + * The current state of the SchedulerJob. + * @return the value + **/ + public SchedulerJob.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SchedulerJobSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", timeScheduled=").append(String.valueOf(this.timeScheduled)); + sb.append(", countOfAffectedActionGroups=") + .append(String.valueOf(this.countOfAffectedActionGroups)); + sb.append(", countOfAffectedResources=") + .append(String.valueOf(this.countOfAffectedResources)); + sb.append(", countOfAffectedTargets=").append(String.valueOf(this.countOfAffectedTargets)); + sb.append(", actionGroupTypes=").append(String.valueOf(this.actionGroupTypes)); + sb.append(", applicationTypes=").append(String.valueOf(this.applicationTypes)); + sb.append(", products=").append(String.valueOf(this.products)); + sb.append(", lifecycleOperations=").append(String.valueOf(this.lifecycleOperations)); + sb.append(", actionGroups=").append(String.valueOf(this.actionGroups)); + sb.append(", associatedScheduleDefinition=") + .append(String.valueOf(this.associatedScheduleDefinition)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SchedulerJobSummary)) { + return false; + } + + SchedulerJobSummary other = (SchedulerJobSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.timeScheduled, other.timeScheduled) + && java.util.Objects.equals( + this.countOfAffectedActionGroups, other.countOfAffectedActionGroups) + && java.util.Objects.equals( + this.countOfAffectedResources, other.countOfAffectedResources) + && java.util.Objects.equals( + this.countOfAffectedTargets, other.countOfAffectedTargets) + && java.util.Objects.equals(this.actionGroupTypes, other.actionGroupTypes) + && java.util.Objects.equals(this.applicationTypes, other.applicationTypes) + && java.util.Objects.equals(this.products, other.products) + && java.util.Objects.equals(this.lifecycleOperations, other.lifecycleOperations) + && java.util.Objects.equals(this.actionGroups, other.actionGroups) + && java.util.Objects.equals( + this.associatedScheduleDefinition, other.associatedScheduleDefinition) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.timeScheduled == null ? 43 : this.timeScheduled.hashCode()); + result = + (result * PRIME) + + (this.countOfAffectedActionGroups == null + ? 43 + : this.countOfAffectedActionGroups.hashCode()); + result = + (result * PRIME) + + (this.countOfAffectedResources == null + ? 43 + : this.countOfAffectedResources.hashCode()); + result = + (result * PRIME) + + (this.countOfAffectedTargets == null + ? 43 + : this.countOfAffectedTargets.hashCode()); + result = + (result * PRIME) + + (this.actionGroupTypes == null ? 43 : this.actionGroupTypes.hashCode()); + result = + (result * PRIME) + + (this.applicationTypes == null ? 43 : this.applicationTypes.hashCode()); + result = (result * PRIME) + (this.products == null ? 43 : this.products.hashCode()); + result = + (result * PRIME) + + (this.lifecycleOperations == null + ? 43 + : this.lifecycleOperations.hashCode()); + result = (result * PRIME) + (this.actionGroups == null ? 43 : this.actionGroups.hashCode()); + result = + (result * PRIME) + + (this.associatedScheduleDefinition == null + ? 43 + : this.associatedScheduleDefinition.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Scope.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Scope.java new file mode 100644 index 00000000000..20b09d45661 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Scope.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Possible scopes for Property + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public enum Scope { + Taxonomy("TAXONOMY"), + PlatformConfig("PLATFORM_CONFIG"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Scope.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Scope v : Scope.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Scope(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Scope create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn("Received unknown value '{}' for enum 'Scope', returning UnknownEnumValue", key); + return UnknownEnumValue; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ScriptBasedExecutionDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ScriptBasedExecutionDetails.java new file mode 100644 index 00000000000..9de19b49a69 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ScriptBasedExecutionDetails.java @@ -0,0 +1,239 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details for script-based execution. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ScriptBasedExecutionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "executionType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ScriptBasedExecutionDetails extends ExecutionDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("variables") + private TaskVariable variables; + + public Builder variables(TaskVariable variables) { + this.variables = variables; + this.__explicitlySet__.add("variables"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("content") + private ContentDetails content; + + public Builder content(ContentDetails content) { + this.content = content; + this.__explicitlySet__.add("content"); + return this; + } + /** + * Optional command to execute the content. + * You can provide any commands/arguments that can't be part of the script. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("command") + private String command; + + /** + * Optional command to execute the content. + * You can provide any commands/arguments that can't be part of the script. + * + * @param command the value to set + * @return this builder + **/ + public Builder command(String command) { + this.command = command; + this.__explicitlySet__.add("command"); + return this; + } + /** + * Credentials required for executing the task. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("credentials") + private java.util.List credentials; + + /** + * Credentials required for executing the task. + * + * @param credentials the value to set + * @return this builder + **/ + public Builder credentials(java.util.List credentials) { + this.credentials = credentials; + this.__explicitlySet__.add("credentials"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ScriptBasedExecutionDetails build() { + ScriptBasedExecutionDetails model = + new ScriptBasedExecutionDetails( + this.variables, this.content, this.command, this.credentials); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ScriptBasedExecutionDetails model) { + if (model.wasPropertyExplicitlySet("variables")) { + this.variables(model.getVariables()); + } + if (model.wasPropertyExplicitlySet("content")) { + this.content(model.getContent()); + } + if (model.wasPropertyExplicitlySet("command")) { + this.command(model.getCommand()); + } + if (model.wasPropertyExplicitlySet("credentials")) { + this.credentials(model.getCredentials()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ScriptBasedExecutionDetails( + TaskVariable variables, + ContentDetails content, + String command, + java.util.List credentials) { + super(); + this.variables = variables; + this.content = content; + this.command = command; + this.credentials = credentials; + } + + @com.fasterxml.jackson.annotation.JsonProperty("variables") + private final TaskVariable variables; + + public TaskVariable getVariables() { + return variables; + } + + @com.fasterxml.jackson.annotation.JsonProperty("content") + private final ContentDetails content; + + public ContentDetails getContent() { + return content; + } + + /** + * Optional command to execute the content. + * You can provide any commands/arguments that can't be part of the script. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("command") + private final String command; + + /** + * Optional command to execute the content. + * You can provide any commands/arguments that can't be part of the script. + * + * @return the value + **/ + public String getCommand() { + return command; + } + + /** + * Credentials required for executing the task. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("credentials") + private final java.util.List credentials; + + /** + * Credentials required for executing the task. + * + * @return the value + **/ + public java.util.List getCredentials() { + return credentials; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ScriptBasedExecutionDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", variables=").append(String.valueOf(this.variables)); + sb.append(", content=").append(String.valueOf(this.content)); + sb.append(", command=").append(String.valueOf(this.command)); + sb.append(", credentials=").append(String.valueOf(this.credentials)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ScriptBasedExecutionDetails)) { + return false; + } + + ScriptBasedExecutionDetails other = (ScriptBasedExecutionDetails) o; + return java.util.Objects.equals(this.variables, other.variables) + && java.util.Objects.equals(this.content, other.content) + && java.util.Objects.equals(this.command, other.command) + && java.util.Objects.equals(this.credentials, other.credentials) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.variables == null ? 43 : this.variables.hashCode()); + result = (result * PRIME) + (this.content == null ? 43 : this.content.hashCode()); + result = (result * PRIME) + (this.command == null ? 43 : this.command.hashCode()); + result = (result * PRIME) + (this.credentials == null ? 43 : this.credentials.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Selection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Selection.java new file mode 100644 index 00000000000..59871878ad0 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Selection.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Text selection of the category. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public enum Selection { + SingleChoice("SINGLE_CHOICE"), + MultiChoice("MULTI_CHOICE"), + DefaultText("DEFAULT_TEXT"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Selection.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Selection v : Selection.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Selection(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Selection create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Selection', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SelectionCriteria.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SelectionCriteria.java new file mode 100644 index 00000000000..c3a12661987 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SelectionCriteria.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Rule Selection Criteria for DYNAMIC resource selection for a GENERIC fleet. + * Rules define what resources are members of this fleet. All resources that meet the criteria are added automatically. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SelectionCriteria.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SelectionCriteria extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"matchCondition", "rules"}) + public SelectionCriteria(MatchCondition matchCondition, java.util.List rules) { + super(); + this.matchCondition = matchCondition; + this.rules = rules; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Match condition for the rule selection. + * Include resources that match all rules or any of the rules. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("matchCondition") + private MatchCondition matchCondition; + + /** + * Match condition for the rule selection. + * Include resources that match all rules or any of the rules. + * + * @param matchCondition the value to set + * @return this builder + **/ + public Builder matchCondition(MatchCondition matchCondition) { + this.matchCondition = matchCondition; + this.__explicitlySet__.add("matchCondition"); + return this; + } + /** + * Rules. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rules") + private java.util.List rules; + + /** + * Rules. + * @param rules the value to set + * @return this builder + **/ + public Builder rules(java.util.List rules) { + this.rules = rules; + this.__explicitlySet__.add("rules"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SelectionCriteria build() { + SelectionCriteria model = new SelectionCriteria(this.matchCondition, this.rules); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SelectionCriteria model) { + if (model.wasPropertyExplicitlySet("matchCondition")) { + this.matchCondition(model.getMatchCondition()); + } + if (model.wasPropertyExplicitlySet("rules")) { + this.rules(model.getRules()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Match condition for the rule selection. + * Include resources that match all rules or any of the rules. + * + **/ + public enum MatchCondition { + MatchAll("MATCH_ALL"), + Any("ANY"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(MatchCondition.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (MatchCondition v : MatchCondition.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + MatchCondition(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static MatchCondition create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'MatchCondition', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Match condition for the rule selection. + * Include resources that match all rules or any of the rules. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("matchCondition") + private final MatchCondition matchCondition; + + /** + * Match condition for the rule selection. + * Include resources that match all rules or any of the rules. + * + * @return the value + **/ + public MatchCondition getMatchCondition() { + return matchCondition; + } + + /** + * Rules. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rules") + private final java.util.List rules; + + /** + * Rules. + * @return the value + **/ + public java.util.List getRules() { + return rules; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SelectionCriteria("); + sb.append("super=").append(super.toString()); + sb.append("matchCondition=").append(String.valueOf(this.matchCondition)); + sb.append(", rules=").append(String.valueOf(this.rules)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SelectionCriteria)) { + return false; + } + + SelectionCriteria other = (SelectionCriteria) o; + return java.util.Objects.equals(this.matchCondition, other.matchCondition) + && java.util.Objects.equals(this.rules, other.rules) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.matchCondition == null ? 43 : this.matchCondition.hashCode()); + result = (result * PRIME) + (this.rules == null ? 43 : this.rules.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SetDefaultRunbookDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SetDefaultRunbookDetails.java new file mode 100644 index 00000000000..da851b5a051 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SetDefaultRunbookDetails.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Request to set default Runbook + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SetDefaultRunbookDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SetDefaultRunbookDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"runbookId"}) + public SetDefaultRunbookDetails(String runbookId) { + super(); + this.runbookId = runbookId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runbookId") + private String runbookId; + + /** + * The OCID of the resource. + * @param runbookId the value to set + * @return this builder + **/ + public Builder runbookId(String runbookId) { + this.runbookId = runbookId; + this.__explicitlySet__.add("runbookId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SetDefaultRunbookDetails build() { + SetDefaultRunbookDetails model = new SetDefaultRunbookDetails(this.runbookId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SetDefaultRunbookDetails model) { + if (model.wasPropertyExplicitlySet("runbookId")) { + this.runbookId(model.getRunbookId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runbookId") + private final String runbookId; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getRunbookId() { + return runbookId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SetDefaultRunbookDetails("); + sb.append("super=").append(super.toString()); + sb.append("runbookId=").append(String.valueOf(this.runbookId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SetDefaultRunbookDetails)) { + return false; + } + + SetDefaultRunbookDetails other = (SetDefaultRunbookDetails) o; + return java.util.Objects.equals(this.runbookId, other.runbookId) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.runbookId == null ? 43 : this.runbookId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SortOrder.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SortOrder.java new file mode 100644 index 00000000000..9a987493855 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/SortOrder.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Sort orders. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortOrder: " + key); + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/StepBasedUserActionDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/StepBasedUserActionDetails.java new file mode 100644 index 00000000000..89ea0207824 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/StepBasedUserActionDetails.java @@ -0,0 +1,277 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details for a user action to be performed on a step. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = StepBasedUserActionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "level" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class StepBasedUserActionDetails extends UserActionDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("action") + private Action action; + + public Builder action(Action action) { + this.action = action; + this.__explicitlySet__.add("action"); + return this; + } + /** + * Unique identifier for the action group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroupId") + private String actionGroupId; + + /** + * Unique identifier for the action group. + * @param actionGroupId the value to set + * @return this builder + **/ + public Builder actionGroupId(String actionGroupId) { + this.actionGroupId = actionGroupId; + this.__explicitlySet__.add("actionGroupId"); + return this; + } + /** + * Resource OCID + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * Resource OCID + * + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * Target associated with the execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetId") + private String targetId; + + /** + * Target associated with the execution. + * @param targetId the value to set + * @return this builder + **/ + public Builder targetId(String targetId) { + this.targetId = targetId; + this.__explicitlySet__.add("targetId"); + return this; + } + /** + * Name of the step on which user action needs to be performed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private String stepName; + + /** + * Name of the step on which user action needs to be performed. + * @param stepName the value to set + * @return this builder + **/ + public Builder stepName(String stepName) { + this.stepName = stepName; + this.__explicitlySet__.add("stepName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public StepBasedUserActionDetails build() { + StepBasedUserActionDetails model = + new StepBasedUserActionDetails( + this.action, + this.actionGroupId, + this.resourceId, + this.targetId, + this.stepName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(StepBasedUserActionDetails model) { + if (model.wasPropertyExplicitlySet("action")) { + this.action(model.getAction()); + } + if (model.wasPropertyExplicitlySet("actionGroupId")) { + this.actionGroupId(model.getActionGroupId()); + } + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("targetId")) { + this.targetId(model.getTargetId()); + } + if (model.wasPropertyExplicitlySet("stepName")) { + this.stepName(model.getStepName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public StepBasedUserActionDetails( + Action action, + String actionGroupId, + String resourceId, + String targetId, + String stepName) { + super(action); + this.actionGroupId = actionGroupId; + this.resourceId = resourceId; + this.targetId = targetId; + this.stepName = stepName; + } + + /** + * Unique identifier for the action group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroupId") + private final String actionGroupId; + + /** + * Unique identifier for the action group. + * @return the value + **/ + public String getActionGroupId() { + return actionGroupId; + } + + /** + * Resource OCID + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * Resource OCID + * + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * Target associated with the execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetId") + private final String targetId; + + /** + * Target associated with the execution. + * @return the value + **/ + public String getTargetId() { + return targetId; + } + + /** + * Name of the step on which user action needs to be performed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private final String stepName; + + /** + * Name of the step on which user action needs to be performed. + * @return the value + **/ + public String getStepName() { + return stepName; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("StepBasedUserActionDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", actionGroupId=").append(String.valueOf(this.actionGroupId)); + sb.append(", resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", targetId=").append(String.valueOf(this.targetId)); + sb.append(", stepName=").append(String.valueOf(this.stepName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof StepBasedUserActionDetails)) { + return false; + } + + StepBasedUserActionDetails other = (StepBasedUserActionDetails) o; + return java.util.Objects.equals(this.actionGroupId, other.actionGroupId) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.targetId, other.targetId) + && java.util.Objects.equals(this.stepName, other.stepName) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.actionGroupId == null ? 43 : this.actionGroupId.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); + result = (result * PRIME) + (this.stepName == null ? 43 : this.stepName.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/StepCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/StepCollection.java new file mode 100644 index 00000000000..d976197cc77 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/StepCollection.java @@ -0,0 +1,132 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a StepSummary search. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = StepCollection.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class StepCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public StepCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of Execution steps. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of Execution steps. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public StepCollection build() { + StepCollection model = new StepCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(StepCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of Execution steps. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of Execution steps. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("StepCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof StepCollection)) { + return false; + } + + StepCollection other = (StepCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/StepSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/StepSummary.java new file mode 100644 index 00000000000..3ed26fe4f78 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/StepSummary.java @@ -0,0 +1,468 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Task associated with the Job. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = StepSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class StepSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "taskRecordId", + "stepName", + "sequence", + "status", + "timeStarted", + "timeEnded", + "isRollbackTask", + "description", + "systemTags" + }) + public StepSummary( + String taskRecordId, + String stepName, + String sequence, + JobStatus status, + java.util.Date timeStarted, + java.util.Date timeEnded, + Boolean isRollbackTask, + String description, + java.util.Map> systemTags) { + super(); + this.taskRecordId = taskRecordId; + this.stepName = stepName; + this.sequence = sequence; + this.status = status; + this.timeStarted = timeStarted; + this.timeEnded = timeEnded; + this.isRollbackTask = isRollbackTask; + this.description = description; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of taskRecord assocaited with the step + **/ + @com.fasterxml.jackson.annotation.JsonProperty("taskRecordId") + private String taskRecordId; + + /** + * The OCID of taskRecord assocaited with the step + * @param taskRecordId the value to set + * @return this builder + **/ + public Builder taskRecordId(String taskRecordId) { + this.taskRecordId = taskRecordId; + this.__explicitlySet__.add("taskRecordId"); + return this; + } + /** + * Name of the Step + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private String stepName; + + /** + * Name of the Step + * @param stepName the value to set + * @return this builder + **/ + public Builder stepName(String stepName) { + this.stepName = stepName; + this.__explicitlySet__.add("stepName"); + return this; + } + /** + * The sequence of the step + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sequence") + private String sequence; + + /** + * The sequence of the step + * @param sequence the value to set + * @return this builder + **/ + public Builder sequence(String sequence) { + this.sequence = sequence; + this.__explicitlySet__.add("sequence"); + return this; + } + /** + * Status of the Task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private JobStatus status; + + /** + * Status of the Task + * @param status the value to set + * @return this builder + **/ + public Builder status(JobStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The time the task started. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The time the task started. An RFC3339 formatted datetime string + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The time the task ended. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + private java.util.Date timeEnded; + + /** + * The time the task ended. An RFC3339 formatted datetime string + * @param timeEnded the value to set + * @return this builder + **/ + public Builder timeEnded(java.util.Date timeEnded) { + this.timeEnded = timeEnded; + this.__explicitlySet__.add("timeEnded"); + return this; + } + /** + * Is this a rollback task? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRollbackTask") + private Boolean isRollbackTask; + + /** + * Is this a rollback task? + * @param isRollbackTask the value to set + * @return this builder + **/ + public Builder isRollbackTask(Boolean isRollbackTask) { + this.isRollbackTask = isRollbackTask; + this.__explicitlySet__.add("isRollbackTask"); + return this; + } + /** + * Description of the step Execution + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description of the step Execution + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public StepSummary build() { + StepSummary model = + new StepSummary( + this.taskRecordId, + this.stepName, + this.sequence, + this.status, + this.timeStarted, + this.timeEnded, + this.isRollbackTask, + this.description, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(StepSummary model) { + if (model.wasPropertyExplicitlySet("taskRecordId")) { + this.taskRecordId(model.getTaskRecordId()); + } + if (model.wasPropertyExplicitlySet("stepName")) { + this.stepName(model.getStepName()); + } + if (model.wasPropertyExplicitlySet("sequence")) { + this.sequence(model.getSequence()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeEnded")) { + this.timeEnded(model.getTimeEnded()); + } + if (model.wasPropertyExplicitlySet("isRollbackTask")) { + this.isRollbackTask(model.getIsRollbackTask()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of taskRecord assocaited with the step + **/ + @com.fasterxml.jackson.annotation.JsonProperty("taskRecordId") + private final String taskRecordId; + + /** + * The OCID of taskRecord assocaited with the step + * @return the value + **/ + public String getTaskRecordId() { + return taskRecordId; + } + + /** + * Name of the Step + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private final String stepName; + + /** + * Name of the Step + * @return the value + **/ + public String getStepName() { + return stepName; + } + + /** + * The sequence of the step + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sequence") + private final String sequence; + + /** + * The sequence of the step + * @return the value + **/ + public String getSequence() { + return sequence; + } + + /** + * Status of the Task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final JobStatus status; + + /** + * Status of the Task + * @return the value + **/ + public JobStatus getStatus() { + return status; + } + + /** + * The time the task started. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The time the task started. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The time the task ended. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeEnded") + private final java.util.Date timeEnded; + + /** + * The time the task ended. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimeEnded() { + return timeEnded; + } + + /** + * Is this a rollback task? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRollbackTask") + private final Boolean isRollbackTask; + + /** + * Is this a rollback task? + * @return the value + **/ + public Boolean getIsRollbackTask() { + return isRollbackTask; + } + + /** + * Description of the step Execution + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description of the step Execution + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("StepSummary("); + sb.append("super=").append(super.toString()); + sb.append("taskRecordId=").append(String.valueOf(this.taskRecordId)); + sb.append(", stepName=").append(String.valueOf(this.stepName)); + sb.append(", sequence=").append(String.valueOf(this.sequence)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeEnded=").append(String.valueOf(this.timeEnded)); + sb.append(", isRollbackTask=").append(String.valueOf(this.isRollbackTask)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof StepSummary)) { + return false; + } + + StepSummary other = (StepSummary) o; + return java.util.Objects.equals(this.taskRecordId, other.taskRecordId) + && java.util.Objects.equals(this.stepName, other.stepName) + && java.util.Objects.equals(this.sequence, other.sequence) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeEnded, other.timeEnded) + && java.util.Objects.equals(this.isRollbackTask, other.isRollbackTask) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.taskRecordId == null ? 43 : this.taskRecordId.hashCode()); + result = (result * PRIME) + (this.stepName == null ? 43 : this.stepName.hashCode()); + result = (result * PRIME) + (this.sequence == null ? 43 : this.sequence.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeEnded == null ? 43 : this.timeEnded.hashCode()); + result = + (result * PRIME) + + (this.isRollbackTask == null ? 43 : this.isRollbackTask.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/StringInputArgument.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/StringInputArgument.java new file mode 100644 index 00000000000..c33270a538d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/StringInputArgument.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The details of the String Input argument. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = StringInputArgument.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class StringInputArgument extends InputArgument { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public StringInputArgument build() { + StringInputArgument model = new StringInputArgument(this.name, this.description); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(StringInputArgument model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public StringInputArgument(String name, String description) { + super(name, description); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("StringInputArgument("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof StringInputArgument)) { + return false; + } + + StringInputArgument other = (StringInputArgument) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TargetCredentialEntitySpecificDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TargetCredentialEntitySpecificDetails.java new file mode 100644 index 00000000000..5aecb9ef058 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TargetCredentialEntitySpecificDetails.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Target credential details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = TargetCredentialEntitySpecificDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "credentialLevel" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class TargetCredentialEntitySpecificDetails extends CredentialEntitySpecificDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * OCID of the resource associated with the target for which the credential is created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * OCID of the resource associated with the target for which the credential is created. + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * Target name for which the credential is provided. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("target") + private String target; + + /** + * Target name for which the credential is provided. + * @param target the value to set + * @return this builder + **/ + public Builder target(String target) { + this.target = target; + this.__explicitlySet__.add("target"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public TargetCredentialEntitySpecificDetails build() { + TargetCredentialEntitySpecificDetails model = + new TargetCredentialEntitySpecificDetails(this.resourceId, this.target); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(TargetCredentialEntitySpecificDetails model) { + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("target")) { + this.target(model.getTarget()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public TargetCredentialEntitySpecificDetails(String resourceId, String target) { + super(); + this.resourceId = resourceId; + this.target = target; + } + + /** + * OCID of the resource associated with the target for which the credential is created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * OCID of the resource associated with the target for which the credential is created. + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * Target name for which the credential is provided. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("target") + private final String target; + + /** + * Target name for which the credential is provided. + * @return the value + **/ + public String getTarget() { + return target; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TargetCredentialEntitySpecificDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", target=").append(String.valueOf(this.target)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TargetCredentialEntitySpecificDetails)) { + return false; + } + + TargetCredentialEntitySpecificDetails other = (TargetCredentialEntitySpecificDetails) o; + return java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.target, other.target) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.target == null ? 43 : this.target.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TargetResource.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TargetResource.java new file mode 100644 index 00000000000..819817de28b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TargetResource.java @@ -0,0 +1,190 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Resource Information for the Target. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = TargetResource.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class TargetResource extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"resourceId", "resourceDisplayName"}) + public TargetResource(String resourceId, String resourceDisplayName) { + super(); + this.resourceId = resourceId; + this.resourceDisplayName = resourceDisplayName; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * The OCID of the resource. + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceDisplayName") + private String resourceDisplayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param resourceDisplayName the value to set + * @return this builder + **/ + public Builder resourceDisplayName(String resourceDisplayName) { + this.resourceDisplayName = resourceDisplayName; + this.__explicitlySet__.add("resourceDisplayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public TargetResource build() { + TargetResource model = new TargetResource(this.resourceId, this.resourceDisplayName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(TargetResource model) { + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("resourceDisplayName")) { + this.resourceDisplayName(model.getResourceDisplayName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceDisplayName") + private final String resourceDisplayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getResourceDisplayName() { + return resourceDisplayName; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TargetResource("); + sb.append("super=").append(super.toString()); + sb.append("resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", resourceDisplayName=").append(String.valueOf(this.resourceDisplayName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TargetResource)) { + return false; + } + + TargetResource other = (TargetResource) o; + return java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.resourceDisplayName, other.resourceDisplayName) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = + (result * PRIME) + + (this.resourceDisplayName == null + ? 43 + : this.resourceDisplayName.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Task.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Task.java new file mode 100644 index 00000000000..6c329be86eb --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Task.java @@ -0,0 +1,329 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The details of the task + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Task.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Task extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "stepName", + "associationType", + "taskRecordDetails", + "stepProperties", + "outputVariableMappings" + }) + public Task( + String stepName, + AssociationType associationType, + AssociatedTaskDetails taskRecordDetails, + ComponentProperties stepProperties, + java.util.List outputVariableMappings) { + super(); + this.stepName = stepName; + this.associationType = associationType; + this.taskRecordDetails = taskRecordDetails; + this.stepProperties = stepProperties; + this.outputVariableMappings = outputVariableMappings; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the task step. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private String stepName; + + /** + * The name of the task step. + * @param stepName the value to set + * @return this builder + **/ + public Builder stepName(String stepName) { + this.stepName = stepName; + this.__explicitlySet__.add("stepName"); + return this; + } + /** + * The association type of the task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("associationType") + private AssociationType associationType; + + /** + * The association type of the task + * @param associationType the value to set + * @return this builder + **/ + public Builder associationType(AssociationType associationType) { + this.associationType = associationType; + this.__explicitlySet__.add("associationType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("taskRecordDetails") + private AssociatedTaskDetails taskRecordDetails; + + public Builder taskRecordDetails(AssociatedTaskDetails taskRecordDetails) { + this.taskRecordDetails = taskRecordDetails; + this.__explicitlySet__.add("taskRecordDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("stepProperties") + private ComponentProperties stepProperties; + + public Builder stepProperties(ComponentProperties stepProperties) { + this.stepProperties = stepProperties; + this.__explicitlySet__.add("stepProperties"); + return this; + } + /** + * Mapping output variables of previous tasks to the input variables of the current task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("outputVariableMappings") + private java.util.List outputVariableMappings; + + /** + * Mapping output variables of previous tasks to the input variables of the current task. + * @param outputVariableMappings the value to set + * @return this builder + **/ + public Builder outputVariableMappings( + java.util.List outputVariableMappings) { + this.outputVariableMappings = outputVariableMappings; + this.__explicitlySet__.add("outputVariableMappings"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Task build() { + Task model = + new Task( + this.stepName, + this.associationType, + this.taskRecordDetails, + this.stepProperties, + this.outputVariableMappings); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Task model) { + if (model.wasPropertyExplicitlySet("stepName")) { + this.stepName(model.getStepName()); + } + if (model.wasPropertyExplicitlySet("associationType")) { + this.associationType(model.getAssociationType()); + } + if (model.wasPropertyExplicitlySet("taskRecordDetails")) { + this.taskRecordDetails(model.getTaskRecordDetails()); + } + if (model.wasPropertyExplicitlySet("stepProperties")) { + this.stepProperties(model.getStepProperties()); + } + if (model.wasPropertyExplicitlySet("outputVariableMappings")) { + this.outputVariableMappings(model.getOutputVariableMappings()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the task step. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private final String stepName; + + /** + * The name of the task step. + * @return the value + **/ + public String getStepName() { + return stepName; + } + + /** + * The association type of the task + **/ + public enum AssociationType { + Task("TASK"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(AssociationType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (AssociationType v : AssociationType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + AssociationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AssociationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'AssociationType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The association type of the task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("associationType") + private final AssociationType associationType; + + /** + * The association type of the task + * @return the value + **/ + public AssociationType getAssociationType() { + return associationType; + } + + @com.fasterxml.jackson.annotation.JsonProperty("taskRecordDetails") + private final AssociatedTaskDetails taskRecordDetails; + + public AssociatedTaskDetails getTaskRecordDetails() { + return taskRecordDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("stepProperties") + private final ComponentProperties stepProperties; + + public ComponentProperties getStepProperties() { + return stepProperties; + } + + /** + * Mapping output variables of previous tasks to the input variables of the current task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("outputVariableMappings") + private final java.util.List outputVariableMappings; + + /** + * Mapping output variables of previous tasks to the input variables of the current task. + * @return the value + **/ + public java.util.List getOutputVariableMappings() { + return outputVariableMappings; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Task("); + sb.append("super=").append(super.toString()); + sb.append("stepName=").append(String.valueOf(this.stepName)); + sb.append(", associationType=").append(String.valueOf(this.associationType)); + sb.append(", taskRecordDetails=").append(String.valueOf(this.taskRecordDetails)); + sb.append(", stepProperties=").append(String.valueOf(this.stepProperties)); + sb.append(", outputVariableMappings=").append(String.valueOf(this.outputVariableMappings)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Task)) { + return false; + } + + Task other = (Task) o; + return java.util.Objects.equals(this.stepName, other.stepName) + && java.util.Objects.equals(this.associationType, other.associationType) + && java.util.Objects.equals(this.taskRecordDetails, other.taskRecordDetails) + && java.util.Objects.equals(this.stepProperties, other.stepProperties) + && java.util.Objects.equals( + this.outputVariableMappings, other.outputVariableMappings) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.stepName == null ? 43 : this.stepName.hashCode()); + result = + (result * PRIME) + + (this.associationType == null ? 43 : this.associationType.hashCode()); + result = + (result * PRIME) + + (this.taskRecordDetails == null ? 43 : this.taskRecordDetails.hashCode()); + result = + (result * PRIME) + + (this.stepProperties == null ? 43 : this.stepProperties.hashCode()); + result = + (result * PRIME) + + (this.outputVariableMappings == null + ? 43 + : this.outputVariableMappings.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskArgument.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskArgument.java new file mode 100644 index 00000000000..47dc3e48eb0 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskArgument.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * A variable that holds a value + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = TaskArgument.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class TaskArgument extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "value"}) + public TaskArgument(String name, String value) { + super(); + this.name = name; + this.value = value; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Name of the output variable + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Name of the output variable + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The task output + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + /** + * The task output + * @param value the value to set + * @return this builder + **/ + public Builder value(String value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public TaskArgument build() { + TaskArgument model = new TaskArgument(this.name, this.value); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(TaskArgument model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Name of the output variable + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name of the output variable + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The task output + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final String value; + + /** + * The task output + * @return the value + **/ + public String getValue() { + return value; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TaskArgument("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", value=").append(String.valueOf(this.value)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TaskArgument)) { + return false; + } + + TaskArgument other = (TaskArgument) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.value, other.value) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskExecutionType.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskExecutionType.java new file mode 100644 index 00000000000..daa561fa110 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskExecutionType.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The action type of the task. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public enum TaskExecutionType { + Script("SCRIPT"), + Api("API"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(TaskExecutionType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (TaskExecutionType v : TaskExecutionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + TaskExecutionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static TaskExecutionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'TaskExecutionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskNotificationPreferences.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskNotificationPreferences.java new file mode 100644 index 00000000000..2876add6ed9 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskNotificationPreferences.java @@ -0,0 +1,237 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Preferences to send notifications on the task activities. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = TaskNotificationPreferences.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class TaskNotificationPreferences + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "shouldNotifyOnPause", + "shouldNotifyOnTaskFailure", + "shouldNotifyOnTaskSuccess" + }) + public TaskNotificationPreferences( + Boolean shouldNotifyOnPause, + Boolean shouldNotifyOnTaskFailure, + Boolean shouldNotifyOnTaskSuccess) { + super(); + this.shouldNotifyOnPause = shouldNotifyOnPause; + this.shouldNotifyOnTaskFailure = shouldNotifyOnTaskFailure; + this.shouldNotifyOnTaskSuccess = shouldNotifyOnTaskSuccess; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Enables notification on pause. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldNotifyOnPause") + private Boolean shouldNotifyOnPause; + + /** + * Enables notification on pause. + * @param shouldNotifyOnPause the value to set + * @return this builder + **/ + public Builder shouldNotifyOnPause(Boolean shouldNotifyOnPause) { + this.shouldNotifyOnPause = shouldNotifyOnPause; + this.__explicitlySet__.add("shouldNotifyOnPause"); + return this; + } + /** + * Enables or disables notification on Task Failures. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldNotifyOnTaskFailure") + private Boolean shouldNotifyOnTaskFailure; + + /** + * Enables or disables notification on Task Failures. + * @param shouldNotifyOnTaskFailure the value to set + * @return this builder + **/ + public Builder shouldNotifyOnTaskFailure(Boolean shouldNotifyOnTaskFailure) { + this.shouldNotifyOnTaskFailure = shouldNotifyOnTaskFailure; + this.__explicitlySet__.add("shouldNotifyOnTaskFailure"); + return this; + } + /** + * Enables or disables notification on Task Success. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldNotifyOnTaskSuccess") + private Boolean shouldNotifyOnTaskSuccess; + + /** + * Enables or disables notification on Task Success. + * @param shouldNotifyOnTaskSuccess the value to set + * @return this builder + **/ + public Builder shouldNotifyOnTaskSuccess(Boolean shouldNotifyOnTaskSuccess) { + this.shouldNotifyOnTaskSuccess = shouldNotifyOnTaskSuccess; + this.__explicitlySet__.add("shouldNotifyOnTaskSuccess"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public TaskNotificationPreferences build() { + TaskNotificationPreferences model = + new TaskNotificationPreferences( + this.shouldNotifyOnPause, + this.shouldNotifyOnTaskFailure, + this.shouldNotifyOnTaskSuccess); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(TaskNotificationPreferences model) { + if (model.wasPropertyExplicitlySet("shouldNotifyOnPause")) { + this.shouldNotifyOnPause(model.getShouldNotifyOnPause()); + } + if (model.wasPropertyExplicitlySet("shouldNotifyOnTaskFailure")) { + this.shouldNotifyOnTaskFailure(model.getShouldNotifyOnTaskFailure()); + } + if (model.wasPropertyExplicitlySet("shouldNotifyOnTaskSuccess")) { + this.shouldNotifyOnTaskSuccess(model.getShouldNotifyOnTaskSuccess()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Enables notification on pause. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldNotifyOnPause") + private final Boolean shouldNotifyOnPause; + + /** + * Enables notification on pause. + * @return the value + **/ + public Boolean getShouldNotifyOnPause() { + return shouldNotifyOnPause; + } + + /** + * Enables or disables notification on Task Failures. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldNotifyOnTaskFailure") + private final Boolean shouldNotifyOnTaskFailure; + + /** + * Enables or disables notification on Task Failures. + * @return the value + **/ + public Boolean getShouldNotifyOnTaskFailure() { + return shouldNotifyOnTaskFailure; + } + + /** + * Enables or disables notification on Task Success. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldNotifyOnTaskSuccess") + private final Boolean shouldNotifyOnTaskSuccess; + + /** + * Enables or disables notification on Task Success. + * @return the value + **/ + public Boolean getShouldNotifyOnTaskSuccess() { + return shouldNotifyOnTaskSuccess; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TaskNotificationPreferences("); + sb.append("super=").append(super.toString()); + sb.append("shouldNotifyOnPause=").append(String.valueOf(this.shouldNotifyOnPause)); + sb.append(", shouldNotifyOnTaskFailure=") + .append(String.valueOf(this.shouldNotifyOnTaskFailure)); + sb.append(", shouldNotifyOnTaskSuccess=") + .append(String.valueOf(this.shouldNotifyOnTaskSuccess)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TaskNotificationPreferences)) { + return false; + } + + TaskNotificationPreferences other = (TaskNotificationPreferences) o; + return java.util.Objects.equals(this.shouldNotifyOnPause, other.shouldNotifyOnPause) + && java.util.Objects.equals( + this.shouldNotifyOnTaskFailure, other.shouldNotifyOnTaskFailure) + && java.util.Objects.equals( + this.shouldNotifyOnTaskSuccess, other.shouldNotifyOnTaskSuccess) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.shouldNotifyOnPause == null + ? 43 + : this.shouldNotifyOnPause.hashCode()); + result = + (result * PRIME) + + (this.shouldNotifyOnTaskFailure == null + ? 43 + : this.shouldNotifyOnTaskFailure.hashCode()); + result = + (result * PRIME) + + (this.shouldNotifyOnTaskSuccess == null + ? 43 + : this.shouldNotifyOnTaskSuccess.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskRecord.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskRecord.java new file mode 100644 index 00000000000..e92f63e7da2 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskRecord.java @@ -0,0 +1,840 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Details of a task. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = TaskRecord.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class TaskRecord extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "description", + "type", + "lifecycleState", + "timeCreated", + "timeUpdated", + "details", + "lifecycleDetails", + "version", + "compartmentId", + "resourceRegion", + "freeformTags", + "definedTags", + "systemTags" + }) + public TaskRecord( + String id, + String displayName, + String description, + Type type, + LifecycleState lifecycleState, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Details details, + String lifecycleDetails, + String version, + String compartmentId, + String resourceRegion, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.description = description; + this.type = type; + this.lifecycleState = lifecycleState; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.details = details; + this.lifecycleDetails = lifecycleDetails; + this.version = version; + this.compartmentId = compartmentId; + this.resourceRegion = resourceRegion; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Task type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * Task type. + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * The current state of the TaskRecord. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the TaskRecord. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("details") + private Details details; + + public Builder details(Details details) { + this.details = details; + this.__explicitlySet__.add("details"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The version of the task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * The version of the task + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public TaskRecord build() { + TaskRecord model = + new TaskRecord( + this.id, + this.displayName, + this.description, + this.type, + this.lifecycleState, + this.timeCreated, + this.timeUpdated, + this.details, + this.lifecycleDetails, + this.version, + this.compartmentId, + this.resourceRegion, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(TaskRecord model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("details")) { + this.details(model.getDetails()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Task type. + **/ + public enum Type { + UserDefined("USER_DEFINED"), + OracleDefined("ORACLE_DEFINED"), + SystemDefined("SYSTEM_DEFINED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * Task type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * Task type. + * @return the value + **/ + public Type getType() { + return type; + } + + /** + * The current state of the TaskRecord. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Inactive("INACTIVE"), + Deleted("DELETED"), + Deleting("DELETING"), + Failed("FAILED"), + Updating("UPDATING"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the TaskRecord. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the TaskRecord. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("details") + private final Details details; + + public Details getDetails() { + return details; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The version of the task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * The version of the task + * @return the value + **/ + public String getVersion() { + return version; + } + + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TaskRecord("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", details=").append(String.valueOf(this.details)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TaskRecord)) { + return false; + } + + TaskRecord other = (TaskRecord) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.details, other.details) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.version, other.version) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.details == null ? 43 : this.details.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskRecordCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskRecordCollection.java new file mode 100644 index 00000000000..e07e96d0070 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskRecordCollection.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a taskRecord search. Contains boh TaskRecordSummary items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = TaskRecordCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class TaskRecordCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public TaskRecordCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of taskRecords. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of taskRecords. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public TaskRecordCollection build() { + TaskRecordCollection model = new TaskRecordCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(TaskRecordCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of taskRecords. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of taskRecords. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TaskRecordCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TaskRecordCollection)) { + return false; + } + + TaskRecordCollection other = (TaskRecordCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskRecordSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskRecordSummary.java new file mode 100644 index 00000000000..33ba1c95f9c --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskRecordSummary.java @@ -0,0 +1,743 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Summary of the TaskRecord. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = TaskRecordSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class TaskRecordSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "description", + "type", + "lifecycleState", + "timeCreated", + "timeUpdated", + "details", + "lifecycleDetails", + "version", + "compartmentId", + "resourceRegion", + "freeformTags", + "definedTags", + "systemTags" + }) + public TaskRecordSummary( + String id, + String displayName, + String description, + TaskRecord.Type type, + TaskRecord.LifecycleState lifecycleState, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Details details, + String lifecycleDetails, + String version, + String compartmentId, + String resourceRegion, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.description = description; + this.type = type; + this.lifecycleState = lifecycleState; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.details = details; + this.lifecycleDetails = lifecycleDetails; + this.version = version; + this.compartmentId = compartmentId; + this.resourceRegion = resourceRegion; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Task type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private TaskRecord.Type type; + + /** + * Task type. + * @param type the value to set + * @return this builder + **/ + public Builder type(TaskRecord.Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * The current state of the TaskRecord. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private TaskRecord.LifecycleState lifecycleState; + + /** + * The current state of the TaskRecord. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(TaskRecord.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("details") + private Details details; + + public Builder details(Details details) { + this.details = details; + this.__explicitlySet__.add("details"); + return this; + } + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The version of the task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private String version; + + /** + * The version of the task + * @param version the value to set + * @return this builder + **/ + public Builder version(String version) { + this.version = version; + this.__explicitlySet__.add("version"); + return this; + } + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private String resourceRegion; + + /** + * Associated region + * @param resourceRegion the value to set + * @return this builder + **/ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + this.__explicitlySet__.add("resourceRegion"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public TaskRecordSummary build() { + TaskRecordSummary model = + new TaskRecordSummary( + this.id, + this.displayName, + this.description, + this.type, + this.lifecycleState, + this.timeCreated, + this.timeUpdated, + this.details, + this.lifecycleDetails, + this.version, + this.compartmentId, + this.resourceRegion, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(TaskRecordSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("details")) { + this.details(model.getDetails()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("version")) { + this.version(model.getVersion()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resourceRegion")) { + this.resourceRegion(model.getResourceRegion()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Task type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final TaskRecord.Type type; + + /** + * Task type. + * @return the value + **/ + public TaskRecord.Type getType() { + return type; + } + + /** + * The current state of the TaskRecord. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final TaskRecord.LifecycleState lifecycleState; + + /** + * The current state of the TaskRecord. + * @return the value + **/ + public TaskRecord.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time this resource was created. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time this resource was last updated. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("details") + private final Details details; + + public Details getDetails() { + return details; + } + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The version of the task + **/ + @com.fasterxml.jackson.annotation.JsonProperty("version") + private final String version; + + /** + * The version of the task + * @return the value + **/ + public String getVersion() { + return version; + } + + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Associated region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceRegion") + private final String resourceRegion; + + /** + * Associated region + * @return the value + **/ + public String getResourceRegion() { + return resourceRegion; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TaskRecordSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", details=").append(String.valueOf(this.details)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", version=").append(String.valueOf(this.version)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TaskRecordSummary)) { + return false; + } + + TaskRecordSummary other = (TaskRecordSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.details, other.details) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.version, other.version) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.details == null ? 43 : this.details.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskScope.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskScope.java new file mode 100644 index 00000000000..134b2d4834e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskScope.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The scope of the task. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public enum TaskScope { + Local("LOCAL"), + Shared("SHARED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(TaskScope.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (TaskScope v : TaskScope.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + TaskScope(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static TaskScope create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'TaskScope', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskVariable.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskVariable.java new file mode 100644 index 00000000000..668c8b71fc3 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TaskVariable.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The variable of the task. + * At least one of the dynamicArguments or output needs to be provided. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = TaskVariable.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class TaskVariable extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"inputVariables", "outputVariables"}) + public TaskVariable( + java.util.List inputVariables, java.util.List outputVariables) { + super(); + this.inputVariables = inputVariables; + this.outputVariables = outputVariables; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The input variables for the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("inputVariables") + private java.util.List inputVariables; + + /** + * The input variables for the task. + * @param inputVariables the value to set + * @return this builder + **/ + public Builder inputVariables(java.util.List inputVariables) { + this.inputVariables = inputVariables; + this.__explicitlySet__.add("inputVariables"); + return this; + } + /** + * The list of output variables. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("outputVariables") + private java.util.List outputVariables; + + /** + * The list of output variables. + * @param outputVariables the value to set + * @return this builder + **/ + public Builder outputVariables(java.util.List outputVariables) { + this.outputVariables = outputVariables; + this.__explicitlySet__.add("outputVariables"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public TaskVariable build() { + TaskVariable model = new TaskVariable(this.inputVariables, this.outputVariables); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(TaskVariable model) { + if (model.wasPropertyExplicitlySet("inputVariables")) { + this.inputVariables(model.getInputVariables()); + } + if (model.wasPropertyExplicitlySet("outputVariables")) { + this.outputVariables(model.getOutputVariables()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The input variables for the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("inputVariables") + private final java.util.List inputVariables; + + /** + * The input variables for the task. + * @return the value + **/ + public java.util.List getInputVariables() { + return inputVariables; + } + + /** + * The list of output variables. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("outputVariables") + private final java.util.List outputVariables; + + /** + * The list of output variables. + * @return the value + **/ + public java.util.List getOutputVariables() { + return outputVariables; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TaskVariable("); + sb.append("super=").append(super.toString()); + sb.append("inputVariables=").append(String.valueOf(this.inputVariables)); + sb.append(", outputVariables=").append(String.valueOf(this.outputVariables)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TaskVariable)) { + return false; + } + + TaskVariable other = (TaskVariable) o; + return java.util.Objects.equals(this.inputVariables, other.inputVariables) + && java.util.Objects.equals(this.outputVariables, other.outputVariables) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.inputVariables == null ? 43 : this.inputVariables.hashCode()); + result = + (result * PRIME) + + (this.outputVariables == null ? 43 : this.outputVariables.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TimeBasedPauseDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TimeBasedPauseDetails.java new file mode 100644 index 00000000000..36d1607477a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/TimeBasedPauseDetails.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Time-based pause details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = TimeBasedPauseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "kind" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class TimeBasedPauseDetails extends PauseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Time in minutes to apply Pause. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("durationInMinutes") + private Integer durationInMinutes; + + /** + * Time in minutes to apply Pause. + * @param durationInMinutes the value to set + * @return this builder + **/ + public Builder durationInMinutes(Integer durationInMinutes) { + this.durationInMinutes = durationInMinutes; + this.__explicitlySet__.add("durationInMinutes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public TimeBasedPauseDetails build() { + TimeBasedPauseDetails model = new TimeBasedPauseDetails(this.durationInMinutes); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(TimeBasedPauseDetails model) { + if (model.wasPropertyExplicitlySet("durationInMinutes")) { + this.durationInMinutes(model.getDurationInMinutes()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public TimeBasedPauseDetails(Integer durationInMinutes) { + super(); + this.durationInMinutes = durationInMinutes; + } + + /** + * Time in minutes to apply Pause. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("durationInMinutes") + private final Integer durationInMinutes; + + /** + * Time in minutes to apply Pause. + * @return the value + **/ + public Integer getDurationInMinutes() { + return durationInMinutes; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TimeBasedPauseDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", durationInMinutes=").append(String.valueOf(this.durationInMinutes)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TimeBasedPauseDetails)) { + return false; + } + + TimeBasedPauseDetails other = (TimeBasedPauseDetails) o; + return java.util.Objects.equals(this.durationInMinutes, other.durationInMinutes) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.durationInMinutes == null ? 43 : this.durationInMinutes.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateCompliancePolicyRuleDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateCompliancePolicyRuleDetails.java new file mode 100644 index 00000000000..d36d26d5faf --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateCompliancePolicyRuleDetails.java @@ -0,0 +1,382 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The data to update a CompliancePolicyRule. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateCompliancePolicyRuleDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateCompliancePolicyRuleDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "productVersion", + "patchType", + "severity", + "patchSelection", + "gracePeriod", + "freeformTags", + "definedTags" + }) + public UpdateCompliancePolicyRuleDetails( + ProductVersionDetails productVersion, + java.util.List patchType, + java.util.List severity, + PatchSelectionDetails patchSelection, + String gracePeriod, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.productVersion = productVersion; + this.patchType = patchType; + this.severity = severity; + this.patchSelection = patchSelection; + this.gracePeriod = gracePeriod; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("productVersion") + private ProductVersionDetails productVersion; + + public Builder productVersion(ProductVersionDetails productVersion) { + this.productVersion = productVersion; + this.__explicitlySet__.add("productVersion"); + return this; + } + /** + * PlatformConfiguration OCID for the patch type to which this CompliancePolicyRule applies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchType") + private java.util.List patchType; + + /** + * PlatformConfiguration OCID for the patch type to which this CompliancePolicyRule applies. + * @param patchType the value to set + * @return this builder + **/ + public Builder patchType(java.util.List patchType) { + this.patchType = patchType; + this.__explicitlySet__.add("patchType"); + return this; + } + /** + * Severity to which this CompliancePolicyRule applies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private java.util.List severity; + + /** + * Severity to which this CompliancePolicyRule applies. + * @param severity the value to set + * @return this builder + **/ + public Builder severity(java.util.List severity) { + this.severity = severity; + this.__explicitlySet__.add("severity"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patchSelection") + private PatchSelectionDetails patchSelection; + + public Builder patchSelection(PatchSelectionDetails patchSelection) { + this.patchSelection = patchSelection; + this.__explicitlySet__.add("patchSelection"); + return this; + } + /** + * Grace period in days,weeks,months or years the exemption is applicable for the rule. + * This enables a grace period when Fleet Application Management doesn't report the product as noncompliant when patch is not applied. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gracePeriod") + private String gracePeriod; + + /** + * Grace period in days,weeks,months or years the exemption is applicable for the rule. + * This enables a grace period when Fleet Application Management doesn't report the product as noncompliant when patch is not applied. + * + * @param gracePeriod the value to set + * @return this builder + **/ + public Builder gracePeriod(String gracePeriod) { + this.gracePeriod = gracePeriod; + this.__explicitlySet__.add("gracePeriod"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateCompliancePolicyRuleDetails build() { + UpdateCompliancePolicyRuleDetails model = + new UpdateCompliancePolicyRuleDetails( + this.productVersion, + this.patchType, + this.severity, + this.patchSelection, + this.gracePeriod, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateCompliancePolicyRuleDetails model) { + if (model.wasPropertyExplicitlySet("productVersion")) { + this.productVersion(model.getProductVersion()); + } + if (model.wasPropertyExplicitlySet("patchType")) { + this.patchType(model.getPatchType()); + } + if (model.wasPropertyExplicitlySet("severity")) { + this.severity(model.getSeverity()); + } + if (model.wasPropertyExplicitlySet("patchSelection")) { + this.patchSelection(model.getPatchSelection()); + } + if (model.wasPropertyExplicitlySet("gracePeriod")) { + this.gracePeriod(model.getGracePeriod()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("productVersion") + private final ProductVersionDetails productVersion; + + public ProductVersionDetails getProductVersion() { + return productVersion; + } + + /** + * PlatformConfiguration OCID for the patch type to which this CompliancePolicyRule applies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("patchType") + private final java.util.List patchType; + + /** + * PlatformConfiguration OCID for the patch type to which this CompliancePolicyRule applies. + * @return the value + **/ + public java.util.List getPatchType() { + return patchType; + } + + /** + * Severity to which this CompliancePolicyRule applies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private final java.util.List severity; + + /** + * Severity to which this CompliancePolicyRule applies. + * @return the value + **/ + public java.util.List getSeverity() { + return severity; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patchSelection") + private final PatchSelectionDetails patchSelection; + + public PatchSelectionDetails getPatchSelection() { + return patchSelection; + } + + /** + * Grace period in days,weeks,months or years the exemption is applicable for the rule. + * This enables a grace period when Fleet Application Management doesn't report the product as noncompliant when patch is not applied. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gracePeriod") + private final String gracePeriod; + + /** + * Grace period in days,weeks,months or years the exemption is applicable for the rule. + * This enables a grace period when Fleet Application Management doesn't report the product as noncompliant when patch is not applied. + * + * @return the value + **/ + public String getGracePeriod() { + return gracePeriod; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateCompliancePolicyRuleDetails("); + sb.append("super=").append(super.toString()); + sb.append("productVersion=").append(String.valueOf(this.productVersion)); + sb.append(", patchType=").append(String.valueOf(this.patchType)); + sb.append(", severity=").append(String.valueOf(this.severity)); + sb.append(", patchSelection=").append(String.valueOf(this.patchSelection)); + sb.append(", gracePeriod=").append(String.valueOf(this.gracePeriod)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateCompliancePolicyRuleDetails)) { + return false; + } + + UpdateCompliancePolicyRuleDetails other = (UpdateCompliancePolicyRuleDetails) o; + return java.util.Objects.equals(this.productVersion, other.productVersion) + && java.util.Objects.equals(this.patchType, other.patchType) + && java.util.Objects.equals(this.severity, other.severity) + && java.util.Objects.equals(this.patchSelection, other.patchSelection) + && java.util.Objects.equals(this.gracePeriod, other.gracePeriod) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.productVersion == null ? 43 : this.productVersion.hashCode()); + result = (result * PRIME) + (this.patchType == null ? 43 : this.patchType.hashCode()); + result = (result * PRIME) + (this.severity == null ? 43 : this.severity.hashCode()); + result = + (result * PRIME) + + (this.patchSelection == null ? 43 : this.patchSelection.hashCode()); + result = (result * PRIME) + (this.gracePeriod == null ? 43 : this.gracePeriod.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateFleetCredentialDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateFleetCredentialDetails.java new file mode 100644 index 00000000000..22b0556ca94 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateFleetCredentialDetails.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information to be updated. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateFleetCredentialDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateFleetCredentialDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"displayName", "entitySpecifics", "user", "password"}) + public UpdateFleetCredentialDetails( + String displayName, + CredentialEntitySpecificDetails entitySpecifics, + CredentialDetails user, + CredentialDetails password) { + super(); + this.displayName = displayName; + this.entitySpecifics = entitySpecifics; + this.user = user; + this.password = password; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("entitySpecifics") + private CredentialEntitySpecificDetails entitySpecifics; + + public Builder entitySpecifics(CredentialEntitySpecificDetails entitySpecifics) { + this.entitySpecifics = entitySpecifics; + this.__explicitlySet__.add("entitySpecifics"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("user") + private CredentialDetails user; + + public Builder user(CredentialDetails user) { + this.user = user; + this.__explicitlySet__.add("user"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("password") + private CredentialDetails password; + + public Builder password(CredentialDetails password) { + this.password = password; + this.__explicitlySet__.add("password"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateFleetCredentialDetails build() { + UpdateFleetCredentialDetails model = + new UpdateFleetCredentialDetails( + this.displayName, this.entitySpecifics, this.user, this.password); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateFleetCredentialDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("entitySpecifics")) { + this.entitySpecifics(model.getEntitySpecifics()); + } + if (model.wasPropertyExplicitlySet("user")) { + this.user(model.getUser()); + } + if (model.wasPropertyExplicitlySet("password")) { + this.password(model.getPassword()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + @com.fasterxml.jackson.annotation.JsonProperty("entitySpecifics") + private final CredentialEntitySpecificDetails entitySpecifics; + + public CredentialEntitySpecificDetails getEntitySpecifics() { + return entitySpecifics; + } + + @com.fasterxml.jackson.annotation.JsonProperty("user") + private final CredentialDetails user; + + public CredentialDetails getUser() { + return user; + } + + @com.fasterxml.jackson.annotation.JsonProperty("password") + private final CredentialDetails password; + + public CredentialDetails getPassword() { + return password; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateFleetCredentialDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", entitySpecifics=").append(String.valueOf(this.entitySpecifics)); + sb.append(", user=").append(String.valueOf(this.user)); + sb.append(", password=").append(String.valueOf(this.password)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateFleetCredentialDetails)) { + return false; + } + + UpdateFleetCredentialDetails other = (UpdateFleetCredentialDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.entitySpecifics, other.entitySpecifics) + && java.util.Objects.equals(this.user, other.user) + && java.util.Objects.equals(this.password, other.password) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.entitySpecifics == null ? 43 : this.entitySpecifics.hashCode()); + result = (result * PRIME) + (this.user == null ? 43 : this.user.hashCode()); + result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateFleetDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateFleetDetails.java new file mode 100644 index 00000000000..868c3f422dd --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateFleetDetails.java @@ -0,0 +1,415 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information to be updated. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateFleetDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateFleetDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "notificationPreferences", + "ruleSelectionCriteria", + "isTargetAutoConfirm", + "freeformTags", + "definedTags" + }) + public UpdateFleetDetails( + String displayName, + String description, + NotificationPreferences notificationPreferences, + SelectionCriteria ruleSelectionCriteria, + Boolean isTargetAutoConfirm, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.notificationPreferences = notificationPreferences; + this.ruleSelectionCriteria = ruleSelectionCriteria; + this.isTargetAutoConfirm = isTargetAutoConfirm; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("notificationPreferences") + private NotificationPreferences notificationPreferences; + + public Builder notificationPreferences(NotificationPreferences notificationPreferences) { + this.notificationPreferences = notificationPreferences; + this.__explicitlySet__.add("notificationPreferences"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("ruleSelectionCriteria") + private SelectionCriteria ruleSelectionCriteria; + + public Builder ruleSelectionCriteria(SelectionCriteria ruleSelectionCriteria) { + this.ruleSelectionCriteria = ruleSelectionCriteria; + this.__explicitlySet__.add("ruleSelectionCriteria"); + return this; + } + /** + * A value that represents if auto-confirming of the targets can be enabled. + * This will allow targets to be auto-confirmed in the fleet without manual intervention. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isTargetAutoConfirm") + private Boolean isTargetAutoConfirm; + + /** + * A value that represents if auto-confirming of the targets can be enabled. + * This will allow targets to be auto-confirmed in the fleet without manual intervention. + * + * @param isTargetAutoConfirm the value to set + * @return this builder + **/ + public Builder isTargetAutoConfirm(Boolean isTargetAutoConfirm) { + this.isTargetAutoConfirm = isTargetAutoConfirm; + this.__explicitlySet__.add("isTargetAutoConfirm"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateFleetDetails build() { + UpdateFleetDetails model = + new UpdateFleetDetails( + this.displayName, + this.description, + this.notificationPreferences, + this.ruleSelectionCriteria, + this.isTargetAutoConfirm, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateFleetDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("notificationPreferences")) { + this.notificationPreferences(model.getNotificationPreferences()); + } + if (model.wasPropertyExplicitlySet("ruleSelectionCriteria")) { + this.ruleSelectionCriteria(model.getRuleSelectionCriteria()); + } + if (model.wasPropertyExplicitlySet("isTargetAutoConfirm")) { + this.isTargetAutoConfirm(model.getIsTargetAutoConfirm()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + @com.fasterxml.jackson.annotation.JsonProperty("notificationPreferences") + private final NotificationPreferences notificationPreferences; + + public NotificationPreferences getNotificationPreferences() { + return notificationPreferences; + } + + @com.fasterxml.jackson.annotation.JsonProperty("ruleSelectionCriteria") + private final SelectionCriteria ruleSelectionCriteria; + + public SelectionCriteria getRuleSelectionCriteria() { + return ruleSelectionCriteria; + } + + /** + * A value that represents if auto-confirming of the targets can be enabled. + * This will allow targets to be auto-confirmed in the fleet without manual intervention. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isTargetAutoConfirm") + private final Boolean isTargetAutoConfirm; + + /** + * A value that represents if auto-confirming of the targets can be enabled. + * This will allow targets to be auto-confirmed in the fleet without manual intervention. + * + * @return the value + **/ + public Boolean getIsTargetAutoConfirm() { + return isTargetAutoConfirm; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateFleetDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", notificationPreferences=") + .append(String.valueOf(this.notificationPreferences)); + sb.append(", ruleSelectionCriteria=").append(String.valueOf(this.ruleSelectionCriteria)); + sb.append(", isTargetAutoConfirm=").append(String.valueOf(this.isTargetAutoConfirm)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateFleetDetails)) { + return false; + } + + UpdateFleetDetails other = (UpdateFleetDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals( + this.notificationPreferences, other.notificationPreferences) + && java.util.Objects.equals(this.ruleSelectionCriteria, other.ruleSelectionCriteria) + && java.util.Objects.equals(this.isTargetAutoConfirm, other.isTargetAutoConfirm) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.notificationPreferences == null + ? 43 + : this.notificationPreferences.hashCode()); + result = + (result * PRIME) + + (this.ruleSelectionCriteria == null + ? 43 + : this.ruleSelectionCriteria.hashCode()); + result = + (result * PRIME) + + (this.isTargetAutoConfirm == null + ? 43 + : this.isTargetAutoConfirm.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateFleetPropertyDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateFleetPropertyDetails.java new file mode 100644 index 00000000000..104f565b00e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateFleetPropertyDetails.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information to be updated for the fleet property. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateFleetPropertyDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateFleetPropertyDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"value"}) + public UpdateFleetPropertyDetails(String value) { + super(); + this.value = value; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Value of the Property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + /** + * Value of the Property. + * @param value the value to set + * @return this builder + **/ + public Builder value(String value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateFleetPropertyDetails build() { + UpdateFleetPropertyDetails model = new UpdateFleetPropertyDetails(this.value); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateFleetPropertyDetails model) { + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Value of the Property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final String value; + + /** + * Value of the Property. + * @return the value + **/ + public String getValue() { + return value; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateFleetPropertyDetails("); + sb.append("super=").append(super.toString()); + sb.append("value=").append(String.valueOf(this.value)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateFleetPropertyDetails)) { + return false; + } + + UpdateFleetPropertyDetails other = (UpdateFleetPropertyDetails) o; + return java.util.Objects.equals(this.value, other.value) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateFleetResourceDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateFleetResourceDetails.java new file mode 100644 index 00000000000..68ddbed5bfa --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateFleetResourceDetails.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information to be updated for the resource. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateFleetResourceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateFleetResourceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"tenancyId", "compartmentId"}) + public UpdateFleetResourceDetails(String tenancyId, String compartmentId) { + super(); + this.tenancyId = tenancyId; + this.compartmentId = compartmentId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * OCID of the tenancy to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private String tenancyId; + + /** + * OCID of the tenancy to which the resource belongs to. + * @param tenancyId the value to set + * @return this builder + **/ + public Builder tenancyId(String tenancyId) { + this.tenancyId = tenancyId; + this.__explicitlySet__.add("tenancyId"); + return this; + } + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateFleetResourceDetails build() { + UpdateFleetResourceDetails model = + new UpdateFleetResourceDetails(this.tenancyId, this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateFleetResourceDetails model) { + if (model.wasPropertyExplicitlySet("tenancyId")) { + this.tenancyId(model.getTenancyId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * OCID of the tenancy to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyId") + private final String tenancyId; + + /** + * OCID of the tenancy to which the resource belongs to. + * @return the value + **/ + public String getTenancyId() { + return tenancyId; + } + + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateFleetResourceDetails("); + sb.append("super=").append(super.toString()); + sb.append("tenancyId=").append(String.valueOf(this.tenancyId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateFleetResourceDetails)) { + return false; + } + + UpdateFleetResourceDetails other = (UpdateFleetResourceDetails) o; + return java.util.Objects.equals(this.tenancyId, other.tenancyId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.tenancyId == null ? 43 : this.tenancyId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateMaintenanceWindowDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateMaintenanceWindowDetails.java new file mode 100644 index 00000000000..bf650330b6e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateMaintenanceWindowDetails.java @@ -0,0 +1,620 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Maintenance Window information to be updated. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateMaintenanceWindowDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateMaintenanceWindowDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "maintenanceWindowType", + "isOutage", + "timeScheduleStart", + "duration", + "isRecurring", + "recurrences", + "taskInitiationCutoff", + "freeformTags", + "definedTags" + }) + public UpdateMaintenanceWindowDetails( + String displayName, + String description, + MaintenanceWindowType maintenanceWindowType, + Boolean isOutage, + java.util.Date timeScheduleStart, + String duration, + Boolean isRecurring, + String recurrences, + Integer taskInitiationCutoff, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.maintenanceWindowType = maintenanceWindowType; + this.isOutage = isOutage; + this.timeScheduleStart = timeScheduleStart; + this.duration = duration; + this.isRecurring = isRecurring; + this.recurrences = recurrences; + this.taskInitiationCutoff = taskInitiationCutoff; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * MaintenanceWindow Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceWindowType") + private MaintenanceWindowType maintenanceWindowType; + + /** + * MaintenanceWindow Identifier + * @param maintenanceWindowType the value to set + * @return this builder + **/ + public Builder maintenanceWindowType(MaintenanceWindowType maintenanceWindowType) { + this.maintenanceWindowType = maintenanceWindowType; + this.__explicitlySet__.add("maintenanceWindowType"); + return this; + } + /** + * Does the maintenenace window cause outage? + * An outage indicates whether a maintenance window can consider operations that require downtime. + * It means a period when the application is not accessible. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isOutage") + private Boolean isOutage; + + /** + * Does the maintenenace window cause outage? + * An outage indicates whether a maintenance window can consider operations that require downtime. + * It means a period when the application is not accessible. + * + * @param isOutage the value to set + * @return this builder + **/ + public Builder isOutage(Boolean isOutage) { + this.isOutage = isOutage; + this.__explicitlySet__.add("isOutage"); + return this; + } + /** + * Specify the date and time of the day that the maintenance window starts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduleStart") + private java.util.Date timeScheduleStart; + + /** + * Specify the date and time of the day that the maintenance window starts. + * @param timeScheduleStart the value to set + * @return this builder + **/ + public Builder timeScheduleStart(java.util.Date timeScheduleStart) { + this.timeScheduleStart = timeScheduleStart; + this.__explicitlySet__.add("timeScheduleStart"); + return this; + } + /** + * Duration of the maintenance window. + * Specify how long the maintenance window remains open. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("duration") + private String duration; + + /** + * Duration of the maintenance window. + * Specify how long the maintenance window remains open. + * + * @param duration the value to set + * @return this builder + **/ + public Builder duration(String duration) { + this.duration = duration; + this.__explicitlySet__.add("duration"); + return this; + } + /** + * Is this a recurring maintenance window? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRecurring") + private Boolean isRecurring; + + /** + * Is this a recurring maintenance window? + * @param isRecurring the value to set + * @return this builder + **/ + public Builder isRecurring(Boolean isRecurring) { + this.isRecurring = isRecurring; + this.__explicitlySet__.add("isRecurring"); + return this; + } + /** + * Recurrence rule specification if maintenance window recurring. + * Specify the frequency of running the maintenance window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recurrences") + private String recurrences; + + /** + * Recurrence rule specification if maintenance window recurring. + * Specify the frequency of running the maintenance window. + * + * @param recurrences the value to set + * @return this builder + **/ + public Builder recurrences(String recurrences) { + this.recurrences = recurrences; + this.__explicitlySet__.add("recurrences"); + return this; + } + /** + * Task initiation cutoff time for the maintenance window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("taskInitiationCutoff") + private Integer taskInitiationCutoff; + + /** + * Task initiation cutoff time for the maintenance window. + * @param taskInitiationCutoff the value to set + * @return this builder + **/ + public Builder taskInitiationCutoff(Integer taskInitiationCutoff) { + this.taskInitiationCutoff = taskInitiationCutoff; + this.__explicitlySet__.add("taskInitiationCutoff"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateMaintenanceWindowDetails build() { + UpdateMaintenanceWindowDetails model = + new UpdateMaintenanceWindowDetails( + this.displayName, + this.description, + this.maintenanceWindowType, + this.isOutage, + this.timeScheduleStart, + this.duration, + this.isRecurring, + this.recurrences, + this.taskInitiationCutoff, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateMaintenanceWindowDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("maintenanceWindowType")) { + this.maintenanceWindowType(model.getMaintenanceWindowType()); + } + if (model.wasPropertyExplicitlySet("isOutage")) { + this.isOutage(model.getIsOutage()); + } + if (model.wasPropertyExplicitlySet("timeScheduleStart")) { + this.timeScheduleStart(model.getTimeScheduleStart()); + } + if (model.wasPropertyExplicitlySet("duration")) { + this.duration(model.getDuration()); + } + if (model.wasPropertyExplicitlySet("isRecurring")) { + this.isRecurring(model.getIsRecurring()); + } + if (model.wasPropertyExplicitlySet("recurrences")) { + this.recurrences(model.getRecurrences()); + } + if (model.wasPropertyExplicitlySet("taskInitiationCutoff")) { + this.taskInitiationCutoff(model.getTaskInitiationCutoff()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * MaintenanceWindow Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceWindowType") + private final MaintenanceWindowType maintenanceWindowType; + + /** + * MaintenanceWindow Identifier + * @return the value + **/ + public MaintenanceWindowType getMaintenanceWindowType() { + return maintenanceWindowType; + } + + /** + * Does the maintenenace window cause outage? + * An outage indicates whether a maintenance window can consider operations that require downtime. + * It means a period when the application is not accessible. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isOutage") + private final Boolean isOutage; + + /** + * Does the maintenenace window cause outage? + * An outage indicates whether a maintenance window can consider operations that require downtime. + * It means a period when the application is not accessible. + * + * @return the value + **/ + public Boolean getIsOutage() { + return isOutage; + } + + /** + * Specify the date and time of the day that the maintenance window starts. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduleStart") + private final java.util.Date timeScheduleStart; + + /** + * Specify the date and time of the day that the maintenance window starts. + * @return the value + **/ + public java.util.Date getTimeScheduleStart() { + return timeScheduleStart; + } + + /** + * Duration of the maintenance window. + * Specify how long the maintenance window remains open. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("duration") + private final String duration; + + /** + * Duration of the maintenance window. + * Specify how long the maintenance window remains open. + * + * @return the value + **/ + public String getDuration() { + return duration; + } + + /** + * Is this a recurring maintenance window? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRecurring") + private final Boolean isRecurring; + + /** + * Is this a recurring maintenance window? + * @return the value + **/ + public Boolean getIsRecurring() { + return isRecurring; + } + + /** + * Recurrence rule specification if maintenance window recurring. + * Specify the frequency of running the maintenance window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("recurrences") + private final String recurrences; + + /** + * Recurrence rule specification if maintenance window recurring. + * Specify the frequency of running the maintenance window. + * + * @return the value + **/ + public String getRecurrences() { + return recurrences; + } + + /** + * Task initiation cutoff time for the maintenance window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("taskInitiationCutoff") + private final Integer taskInitiationCutoff; + + /** + * Task initiation cutoff time for the maintenance window. + * @return the value + **/ + public Integer getTaskInitiationCutoff() { + return taskInitiationCutoff; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateMaintenanceWindowDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", maintenanceWindowType=").append(String.valueOf(this.maintenanceWindowType)); + sb.append(", isOutage=").append(String.valueOf(this.isOutage)); + sb.append(", timeScheduleStart=").append(String.valueOf(this.timeScheduleStart)); + sb.append(", duration=").append(String.valueOf(this.duration)); + sb.append(", isRecurring=").append(String.valueOf(this.isRecurring)); + sb.append(", recurrences=").append(String.valueOf(this.recurrences)); + sb.append(", taskInitiationCutoff=").append(String.valueOf(this.taskInitiationCutoff)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateMaintenanceWindowDetails)) { + return false; + } + + UpdateMaintenanceWindowDetails other = (UpdateMaintenanceWindowDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.maintenanceWindowType, other.maintenanceWindowType) + && java.util.Objects.equals(this.isOutage, other.isOutage) + && java.util.Objects.equals(this.timeScheduleStart, other.timeScheduleStart) + && java.util.Objects.equals(this.duration, other.duration) + && java.util.Objects.equals(this.isRecurring, other.isRecurring) + && java.util.Objects.equals(this.recurrences, other.recurrences) + && java.util.Objects.equals(this.taskInitiationCutoff, other.taskInitiationCutoff) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.maintenanceWindowType == null + ? 43 + : this.maintenanceWindowType.hashCode()); + result = (result * PRIME) + (this.isOutage == null ? 43 : this.isOutage.hashCode()); + result = + (result * PRIME) + + (this.timeScheduleStart == null ? 43 : this.timeScheduleStart.hashCode()); + result = (result * PRIME) + (this.duration == null ? 43 : this.duration.hashCode()); + result = (result * PRIME) + (this.isRecurring == null ? 43 : this.isRecurring.hashCode()); + result = (result * PRIME) + (this.recurrences == null ? 43 : this.recurrences.hashCode()); + result = + (result * PRIME) + + (this.taskInitiationCutoff == null + ? 43 + : this.taskInitiationCutoff.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateOnboardingDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateOnboardingDetails.java new file mode 100644 index 00000000000..f0d9be551a2 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateOnboardingDetails.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information about updating onboarding. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateOnboardingDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateOnboardingDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"isFamsTagEnabled", "isCostTrackingTagEnabled"}) + public UpdateOnboardingDetails(Boolean isFamsTagEnabled, Boolean isCostTrackingTagEnabled) { + super(); + this.isFamsTagEnabled = isFamsTagEnabled; + this.isCostTrackingTagEnabled = isCostTrackingTagEnabled; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A value determining Fleet Application Management tag is enabled or not + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFamsTagEnabled") + private Boolean isFamsTagEnabled; + + /** + * A value determining Fleet Application Management tag is enabled or not + * @param isFamsTagEnabled the value to set + * @return this builder + **/ + public Builder isFamsTagEnabled(Boolean isFamsTagEnabled) { + this.isFamsTagEnabled = isFamsTagEnabled; + this.__explicitlySet__.add("isFamsTagEnabled"); + return this; + } + /** + * A value determining if cost tracking tag is enabled or not + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCostTrackingTagEnabled") + private Boolean isCostTrackingTagEnabled; + + /** + * A value determining if cost tracking tag is enabled or not + * @param isCostTrackingTagEnabled the value to set + * @return this builder + **/ + public Builder isCostTrackingTagEnabled(Boolean isCostTrackingTagEnabled) { + this.isCostTrackingTagEnabled = isCostTrackingTagEnabled; + this.__explicitlySet__.add("isCostTrackingTagEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateOnboardingDetails build() { + UpdateOnboardingDetails model = + new UpdateOnboardingDetails( + this.isFamsTagEnabled, this.isCostTrackingTagEnabled); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateOnboardingDetails model) { + if (model.wasPropertyExplicitlySet("isFamsTagEnabled")) { + this.isFamsTagEnabled(model.getIsFamsTagEnabled()); + } + if (model.wasPropertyExplicitlySet("isCostTrackingTagEnabled")) { + this.isCostTrackingTagEnabled(model.getIsCostTrackingTagEnabled()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A value determining Fleet Application Management tag is enabled or not + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFamsTagEnabled") + private final Boolean isFamsTagEnabled; + + /** + * A value determining Fleet Application Management tag is enabled or not + * @return the value + **/ + public Boolean getIsFamsTagEnabled() { + return isFamsTagEnabled; + } + + /** + * A value determining if cost tracking tag is enabled or not + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCostTrackingTagEnabled") + private final Boolean isCostTrackingTagEnabled; + + /** + * A value determining if cost tracking tag is enabled or not + * @return the value + **/ + public Boolean getIsCostTrackingTagEnabled() { + return isCostTrackingTagEnabled; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateOnboardingDetails("); + sb.append("super=").append(super.toString()); + sb.append("isFamsTagEnabled=").append(String.valueOf(this.isFamsTagEnabled)); + sb.append(", isCostTrackingTagEnabled=") + .append(String.valueOf(this.isCostTrackingTagEnabled)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateOnboardingDetails)) { + return false; + } + + UpdateOnboardingDetails other = (UpdateOnboardingDetails) o; + return java.util.Objects.equals(this.isFamsTagEnabled, other.isFamsTagEnabled) + && java.util.Objects.equals( + this.isCostTrackingTagEnabled, other.isCostTrackingTagEnabled) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.isFamsTagEnabled == null ? 43 : this.isFamsTagEnabled.hashCode()); + result = + (result * PRIME) + + (this.isCostTrackingTagEnabled == null + ? 43 + : this.isCostTrackingTagEnabled.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdatePatchDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdatePatchDetails.java new file mode 100644 index 00000000000..39d7748dc80 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdatePatchDetails.java @@ -0,0 +1,493 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The patch information to be updated. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdatePatchDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdatePatchDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "description", + "patchType", + "severity", + "timeReleased", + "artifactDetails", + "product", + "dependentPatches", + "compartmentId", + "freeformTags", + "definedTags" + }) + public UpdatePatchDetails( + String description, + PatchType patchType, + PatchSeverity severity, + java.util.Date timeReleased, + ArtifactDetails artifactDetails, + PatchProduct product, + java.util.List dependentPatches, + String compartmentId, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.description = description; + this.patchType = patchType; + this.severity = severity; + this.timeReleased = timeReleased; + this.artifactDetails = artifactDetails; + this.product = product; + this.dependentPatches = dependentPatches; + this.compartmentId = compartmentId; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patchType") + private PatchType patchType; + + public Builder patchType(PatchType patchType) { + this.patchType = patchType; + this.__explicitlySet__.add("patchType"); + return this; + } + /** + * Patch Severity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private PatchSeverity severity; + + /** + * Patch Severity. + * @param severity the value to set + * @return this builder + **/ + public Builder severity(PatchSeverity severity) { + this.severity = severity; + this.__explicitlySet__.add("severity"); + return this; + } + /** + * Date when the patch was released. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeReleased") + private java.util.Date timeReleased; + + /** + * Date when the patch was released. + * @param timeReleased the value to set + * @return this builder + **/ + public Builder timeReleased(java.util.Date timeReleased) { + this.timeReleased = timeReleased; + this.__explicitlySet__.add("timeReleased"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("artifactDetails") + private ArtifactDetails artifactDetails; + + public Builder artifactDetails(ArtifactDetails artifactDetails) { + this.artifactDetails = artifactDetails; + this.__explicitlySet__.add("artifactDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("product") + private PatchProduct product; + + public Builder product(PatchProduct product) { + this.product = product; + this.__explicitlySet__.add("product"); + return this; + } + /** + * Dependent Patches. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dependentPatches") + private java.util.List dependentPatches; + + /** + * Dependent Patches. + * + * @param dependentPatches the value to set + * @return this builder + **/ + public Builder dependentPatches(java.util.List dependentPatches) { + this.dependentPatches = dependentPatches; + this.__explicitlySet__.add("dependentPatches"); + return this; + } + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdatePatchDetails build() { + UpdatePatchDetails model = + new UpdatePatchDetails( + this.description, + this.patchType, + this.severity, + this.timeReleased, + this.artifactDetails, + this.product, + this.dependentPatches, + this.compartmentId, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdatePatchDetails model) { + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("patchType")) { + this.patchType(model.getPatchType()); + } + if (model.wasPropertyExplicitlySet("severity")) { + this.severity(model.getSeverity()); + } + if (model.wasPropertyExplicitlySet("timeReleased")) { + this.timeReleased(model.getTimeReleased()); + } + if (model.wasPropertyExplicitlySet("artifactDetails")) { + this.artifactDetails(model.getArtifactDetails()); + } + if (model.wasPropertyExplicitlySet("product")) { + this.product(model.getProduct()); + } + if (model.wasPropertyExplicitlySet("dependentPatches")) { + this.dependentPatches(model.getDependentPatches()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + @com.fasterxml.jackson.annotation.JsonProperty("patchType") + private final PatchType patchType; + + public PatchType getPatchType() { + return patchType; + } + + /** + * Patch Severity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("severity") + private final PatchSeverity severity; + + /** + * Patch Severity. + * @return the value + **/ + public PatchSeverity getSeverity() { + return severity; + } + + /** + * Date when the patch was released. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeReleased") + private final java.util.Date timeReleased; + + /** + * Date when the patch was released. + * @return the value + **/ + public java.util.Date getTimeReleased() { + return timeReleased; + } + + @com.fasterxml.jackson.annotation.JsonProperty("artifactDetails") + private final ArtifactDetails artifactDetails; + + public ArtifactDetails getArtifactDetails() { + return artifactDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("product") + private final PatchProduct product; + + public PatchProduct getProduct() { + return product; + } + + /** + * Dependent Patches. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dependentPatches") + private final java.util.List dependentPatches; + + /** + * Dependent Patches. + * + * @return the value + **/ + public java.util.List getDependentPatches() { + return dependentPatches; + } + + /** + * OCID of the compartment to which the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * OCID of the compartment to which the resource belongs to. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdatePatchDetails("); + sb.append("super=").append(super.toString()); + sb.append("description=").append(String.valueOf(this.description)); + sb.append(", patchType=").append(String.valueOf(this.patchType)); + sb.append(", severity=").append(String.valueOf(this.severity)); + sb.append(", timeReleased=").append(String.valueOf(this.timeReleased)); + sb.append(", artifactDetails=").append(String.valueOf(this.artifactDetails)); + sb.append(", product=").append(String.valueOf(this.product)); + sb.append(", dependentPatches=").append(String.valueOf(this.dependentPatches)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePatchDetails)) { + return false; + } + + UpdatePatchDetails other = (UpdatePatchDetails) o; + return java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.patchType, other.patchType) + && java.util.Objects.equals(this.severity, other.severity) + && java.util.Objects.equals(this.timeReleased, other.timeReleased) + && java.util.Objects.equals(this.artifactDetails, other.artifactDetails) + && java.util.Objects.equals(this.product, other.product) + && java.util.Objects.equals(this.dependentPatches, other.dependentPatches) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.patchType == null ? 43 : this.patchType.hashCode()); + result = (result * PRIME) + (this.severity == null ? 43 : this.severity.hashCode()); + result = (result * PRIME) + (this.timeReleased == null ? 43 : this.timeReleased.hashCode()); + result = + (result * PRIME) + + (this.artifactDetails == null ? 43 : this.artifactDetails.hashCode()); + result = (result * PRIME) + (this.product == null ? 43 : this.product.hashCode()); + result = + (result * PRIME) + + (this.dependentPatches == null ? 43 : this.dependentPatches.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdatePlatformConfigurationDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdatePlatformConfigurationDetails.java new file mode 100644 index 00000000000..a9c37cde02d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdatePlatformConfigurationDetails.java @@ -0,0 +1,227 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information to be updated. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdatePlatformConfigurationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdatePlatformConfigurationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"displayName", "description", "configCategoryDetails"}) + public UpdatePlatformConfigurationDetails( + String displayName, String description, ConfigCategoryDetails configCategoryDetails) { + super(); + this.displayName = displayName; + this.description = description; + this.configCategoryDetails = configCategoryDetails; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("configCategoryDetails") + private ConfigCategoryDetails configCategoryDetails; + + public Builder configCategoryDetails(ConfigCategoryDetails configCategoryDetails) { + this.configCategoryDetails = configCategoryDetails; + this.__explicitlySet__.add("configCategoryDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdatePlatformConfigurationDetails build() { + UpdatePlatformConfigurationDetails model = + new UpdatePlatformConfigurationDetails( + this.displayName, this.description, this.configCategoryDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdatePlatformConfigurationDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("configCategoryDetails")) { + this.configCategoryDetails(model.getConfigCategoryDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + @com.fasterxml.jackson.annotation.JsonProperty("configCategoryDetails") + private final ConfigCategoryDetails configCategoryDetails; + + public ConfigCategoryDetails getConfigCategoryDetails() { + return configCategoryDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdatePlatformConfigurationDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", configCategoryDetails=").append(String.valueOf(this.configCategoryDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePlatformConfigurationDetails)) { + return false; + } + + UpdatePlatformConfigurationDetails other = (UpdatePlatformConfigurationDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.configCategoryDetails, other.configCategoryDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.configCategoryDetails == null + ? 43 + : this.configCategoryDetails.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdatePropertyDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdatePropertyDetails.java new file mode 100644 index 00000000000..09accccab3f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdatePropertyDetails.java @@ -0,0 +1,269 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information to be updated. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdatePropertyDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdatePropertyDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"displayName", "selection", "valueType", "values"}) + public UpdatePropertyDetails( + String displayName, + Selection selection, + ValueType valueType, + java.util.List values) { + super(); + this.displayName = displayName; + this.selection = selection; + this.valueType = valueType; + this.values = values; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Text selection of the property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private Selection selection; + + /** + * Text selection of the property. + * @param selection the value to set + * @return this builder + **/ + public Builder selection(Selection selection) { + this.selection = selection; + this.__explicitlySet__.add("selection"); + return this; + } + /** + * Format of the value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("valueType") + private ValueType valueType; + + /** + * Format of the value. + * @param valueType the value to set + * @return this builder + **/ + public Builder valueType(ValueType valueType) { + this.valueType = valueType; + this.__explicitlySet__.add("valueType"); + return this; + } + /** + * Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("values") + private java.util.List values; + + /** + * Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). + * @param values the value to set + * @return this builder + **/ + public Builder values(java.util.List values) { + this.values = values; + this.__explicitlySet__.add("values"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdatePropertyDetails build() { + UpdatePropertyDetails model = + new UpdatePropertyDetails( + this.displayName, this.selection, this.valueType, this.values); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdatePropertyDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("selection")) { + this.selection(model.getSelection()); + } + if (model.wasPropertyExplicitlySet("valueType")) { + this.valueType(model.getValueType()); + } + if (model.wasPropertyExplicitlySet("values")) { + this.values(model.getValues()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Text selection of the property. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selection") + private final Selection selection; + + /** + * Text selection of the property. + * @return the value + **/ + public Selection getSelection() { + return selection; + } + + /** + * Format of the value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("valueType") + private final ValueType valueType; + + /** + * Format of the value. + * @return the value + **/ + public ValueType getValueType() { + return valueType; + } + + /** + * Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("values") + private final java.util.List values; + + /** + * Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). + * @return the value + **/ + public java.util.List getValues() { + return values; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdatePropertyDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", selection=").append(String.valueOf(this.selection)); + sb.append(", valueType=").append(String.valueOf(this.valueType)); + sb.append(", values=").append(String.valueOf(this.values)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePropertyDetails)) { + return false; + } + + UpdatePropertyDetails other = (UpdatePropertyDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.selection, other.selection) + && java.util.Objects.equals(this.valueType, other.valueType) + && java.util.Objects.equals(this.values, other.values) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.selection == null ? 43 : this.selection.hashCode()); + result = (result * PRIME) + (this.valueType == null ? 43 : this.valueType.hashCode()); + result = (result * PRIME) + (this.values == null ? 43 : this.values.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateRunbookDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateRunbookDetails.java new file mode 100644 index 00000000000..0f9edebf027 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateRunbookDetails.java @@ -0,0 +1,571 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information to be updated. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateRunbookDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateRunbookDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "runbookRelevance", + "operation", + "osType", + "platform", + "isDefault", + "estimatedTime", + "associations", + "freeformTags", + "definedTags" + }) + public UpdateRunbookDetails( + String displayName, + String description, + Runbook.RunbookRelevance runbookRelevance, + String operation, + OsType osType, + String platform, + Boolean isDefault, + String estimatedTime, + Associations associations, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.runbookRelevance = runbookRelevance; + this.operation = operation; + this.osType = osType; + this.platform = platform; + this.isDefault = isDefault; + this.estimatedTime = estimatedTime; + this.associations = associations; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Type of runbook structure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runbookRelevance") + private Runbook.RunbookRelevance runbookRelevance; + + /** + * Type of runbook structure. + * @param runbookRelevance the value to set + * @return this builder + **/ + public Builder runbookRelevance(Runbook.RunbookRelevance runbookRelevance) { + this.runbookRelevance = runbookRelevance; + this.__explicitlySet__.add("runbookRelevance"); + return this; + } + /** + * The lifecycle operation performed by the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operation") + private String operation; + + /** + * The lifecycle operation performed by the task. + * @param operation the value to set + * @return this builder + **/ + public Builder operation(String operation) { + this.operation = operation; + this.__explicitlySet__.add("operation"); + return this; + } + /** + * The OS type for the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osType") + private OsType osType; + + /** + * The OS type for the runbook. + * @param osType the value to set + * @return this builder + **/ + public Builder osType(OsType osType) { + this.osType = osType; + this.__explicitlySet__.add("osType"); + return this; + } + /** + * The platform of the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platform") + private String platform; + + /** + * The platform of the runbook. + * @param platform the value to set + * @return this builder + **/ + public Builder platform(String platform) { + this.platform = platform; + this.__explicitlySet__.add("platform"); + return this; + } + /** + * Is the runbook default? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private Boolean isDefault; + + /** + * Is the runbook default? + * @param isDefault the value to set + * @return this builder + **/ + public Builder isDefault(Boolean isDefault) { + this.isDefault = isDefault; + this.__explicitlySet__.add("isDefault"); + return this; + } + /** + * Estimated time to successfully complete the runbook execution + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTime") + private String estimatedTime; + + /** + * Estimated time to successfully complete the runbook execution + * @param estimatedTime the value to set + * @return this builder + **/ + public Builder estimatedTime(String estimatedTime) { + this.estimatedTime = estimatedTime; + this.__explicitlySet__.add("estimatedTime"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("associations") + private Associations associations; + + public Builder associations(Associations associations) { + this.associations = associations; + this.__explicitlySet__.add("associations"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateRunbookDetails build() { + UpdateRunbookDetails model = + new UpdateRunbookDetails( + this.displayName, + this.description, + this.runbookRelevance, + this.operation, + this.osType, + this.platform, + this.isDefault, + this.estimatedTime, + this.associations, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateRunbookDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("runbookRelevance")) { + this.runbookRelevance(model.getRunbookRelevance()); + } + if (model.wasPropertyExplicitlySet("operation")) { + this.operation(model.getOperation()); + } + if (model.wasPropertyExplicitlySet("osType")) { + this.osType(model.getOsType()); + } + if (model.wasPropertyExplicitlySet("platform")) { + this.platform(model.getPlatform()); + } + if (model.wasPropertyExplicitlySet("isDefault")) { + this.isDefault(model.getIsDefault()); + } + if (model.wasPropertyExplicitlySet("estimatedTime")) { + this.estimatedTime(model.getEstimatedTime()); + } + if (model.wasPropertyExplicitlySet("associations")) { + this.associations(model.getAssociations()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Type of runbook structure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runbookRelevance") + private final Runbook.RunbookRelevance runbookRelevance; + + /** + * Type of runbook structure. + * @return the value + **/ + public Runbook.RunbookRelevance getRunbookRelevance() { + return runbookRelevance; + } + + /** + * The lifecycle operation performed by the task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operation") + private final String operation; + + /** + * The lifecycle operation performed by the task. + * @return the value + **/ + public String getOperation() { + return operation; + } + + /** + * The OS type for the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osType") + private final OsType osType; + + /** + * The OS type for the runbook. + * @return the value + **/ + public OsType getOsType() { + return osType; + } + + /** + * The platform of the runbook. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platform") + private final String platform; + + /** + * The platform of the runbook. + * @return the value + **/ + public String getPlatform() { + return platform; + } + + /** + * Is the runbook default? + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private final Boolean isDefault; + + /** + * Is the runbook default? + * @return the value + **/ + public Boolean getIsDefault() { + return isDefault; + } + + /** + * Estimated time to successfully complete the runbook execution + **/ + @com.fasterxml.jackson.annotation.JsonProperty("estimatedTime") + private final String estimatedTime; + + /** + * Estimated time to successfully complete the runbook execution + * @return the value + **/ + public String getEstimatedTime() { + return estimatedTime; + } + + @com.fasterxml.jackson.annotation.JsonProperty("associations") + private final Associations associations; + + public Associations getAssociations() { + return associations; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateRunbookDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", runbookRelevance=").append(String.valueOf(this.runbookRelevance)); + sb.append(", operation=").append(String.valueOf(this.operation)); + sb.append(", osType=").append(String.valueOf(this.osType)); + sb.append(", platform=").append(String.valueOf(this.platform)); + sb.append(", isDefault=").append(String.valueOf(this.isDefault)); + sb.append(", estimatedTime=").append(String.valueOf(this.estimatedTime)); + sb.append(", associations=").append(String.valueOf(this.associations)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateRunbookDetails)) { + return false; + } + + UpdateRunbookDetails other = (UpdateRunbookDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.runbookRelevance, other.runbookRelevance) + && java.util.Objects.equals(this.operation, other.operation) + && java.util.Objects.equals(this.osType, other.osType) + && java.util.Objects.equals(this.platform, other.platform) + && java.util.Objects.equals(this.isDefault, other.isDefault) + && java.util.Objects.equals(this.estimatedTime, other.estimatedTime) + && java.util.Objects.equals(this.associations, other.associations) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.runbookRelevance == null ? 43 : this.runbookRelevance.hashCode()); + result = (result * PRIME) + (this.operation == null ? 43 : this.operation.hashCode()); + result = (result * PRIME) + (this.osType == null ? 43 : this.osType.hashCode()); + result = (result * PRIME) + (this.platform == null ? 43 : this.platform.hashCode()); + result = (result * PRIME) + (this.isDefault == null ? 43 : this.isDefault.hashCode()); + result = + (result * PRIME) + + (this.estimatedTime == null ? 43 : this.estimatedTime.hashCode()); + result = (result * PRIME) + (this.associations == null ? 43 : this.associations.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateSchedulerDefinitionDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateSchedulerDefinitionDetails.java new file mode 100644 index 00000000000..67148d9aeae --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateSchedulerDefinitionDetails.java @@ -0,0 +1,454 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information to be updated. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateSchedulerDefinitionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateSchedulerDefinitionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "activityInitiationCutOff", + "schedule", + "actionGroups", + "runBooks", + "freeformTags", + "definedTags" + }) + public UpdateSchedulerDefinitionDetails( + String displayName, + String description, + Integer activityInitiationCutOff, + Schedule schedule, + java.util.List actionGroups, + java.util.List runBooks, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.activityInitiationCutOff = activityInitiationCutOff; + this.schedule = schedule; + this.actionGroups = actionGroups; + this.runBooks = runBooks; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Activity Initiation Cut Off + **/ + @com.fasterxml.jackson.annotation.JsonProperty("activityInitiationCutOff") + private Integer activityInitiationCutOff; + + /** + * Activity Initiation Cut Off + * @param activityInitiationCutOff the value to set + * @return this builder + **/ + public Builder activityInitiationCutOff(Integer activityInitiationCutOff) { + this.activityInitiationCutOff = activityInitiationCutOff; + this.__explicitlySet__.add("activityInitiationCutOff"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("schedule") + private Schedule schedule; + + public Builder schedule(Schedule schedule) { + this.schedule = schedule; + this.__explicitlySet__.add("schedule"); + return this; + } + /** + * Action Groups associated with the Schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroups") + private java.util.List actionGroups; + + /** + * Action Groups associated with the Schedule. + * @param actionGroups the value to set + * @return this builder + **/ + public Builder actionGroups(java.util.List actionGroups) { + this.actionGroups = actionGroups; + this.__explicitlySet__.add("actionGroups"); + return this; + } + /** + * Runbooks. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runBooks") + private java.util.List runBooks; + + /** + * Runbooks. + * @param runBooks the value to set + * @return this builder + **/ + public Builder runBooks(java.util.List runBooks) { + this.runBooks = runBooks; + this.__explicitlySet__.add("runBooks"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateSchedulerDefinitionDetails build() { + UpdateSchedulerDefinitionDetails model = + new UpdateSchedulerDefinitionDetails( + this.displayName, + this.description, + this.activityInitiationCutOff, + this.schedule, + this.actionGroups, + this.runBooks, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateSchedulerDefinitionDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("activityInitiationCutOff")) { + this.activityInitiationCutOff(model.getActivityInitiationCutOff()); + } + if (model.wasPropertyExplicitlySet("schedule")) { + this.schedule(model.getSchedule()); + } + if (model.wasPropertyExplicitlySet("actionGroups")) { + this.actionGroups(model.getActionGroups()); + } + if (model.wasPropertyExplicitlySet("runBooks")) { + this.runBooks(model.getRunBooks()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Activity Initiation Cut Off + **/ + @com.fasterxml.jackson.annotation.JsonProperty("activityInitiationCutOff") + private final Integer activityInitiationCutOff; + + /** + * Activity Initiation Cut Off + * @return the value + **/ + public Integer getActivityInitiationCutOff() { + return activityInitiationCutOff; + } + + @com.fasterxml.jackson.annotation.JsonProperty("schedule") + private final Schedule schedule; + + public Schedule getSchedule() { + return schedule; + } + + /** + * Action Groups associated with the Schedule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionGroups") + private final java.util.List actionGroups; + + /** + * Action Groups associated with the Schedule. + * @return the value + **/ + public java.util.List getActionGroups() { + return actionGroups; + } + + /** + * Runbooks. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("runBooks") + private final java.util.List runBooks; + + /** + * Runbooks. + * @return the value + **/ + public java.util.List getRunBooks() { + return runBooks; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateSchedulerDefinitionDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", activityInitiationCutOff=") + .append(String.valueOf(this.activityInitiationCutOff)); + sb.append(", schedule=").append(String.valueOf(this.schedule)); + sb.append(", actionGroups=").append(String.valueOf(this.actionGroups)); + sb.append(", runBooks=").append(String.valueOf(this.runBooks)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSchedulerDefinitionDetails)) { + return false; + } + + UpdateSchedulerDefinitionDetails other = (UpdateSchedulerDefinitionDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals( + this.activityInitiationCutOff, other.activityInitiationCutOff) + && java.util.Objects.equals(this.schedule, other.schedule) + && java.util.Objects.equals(this.actionGroups, other.actionGroups) + && java.util.Objects.equals(this.runBooks, other.runBooks) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.activityInitiationCutOff == null + ? 43 + : this.activityInitiationCutOff.hashCode()); + result = (result * PRIME) + (this.schedule == null ? 43 : this.schedule.hashCode()); + result = (result * PRIME) + (this.actionGroups == null ? 43 : this.actionGroups.hashCode()); + result = (result * PRIME) + (this.runBooks == null ? 43 : this.runBooks.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateSchedulerJobDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateSchedulerJobDetails.java new file mode 100644 index 00000000000..031628d9f40 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateSchedulerJobDetails.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information to be updated for the job. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateSchedulerJobDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateSchedulerJobDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"timeScheduled", "freeformTags", "definedTags"}) + public UpdateSchedulerJobDetails( + java.util.Date timeScheduled, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.timeScheduled = timeScheduled; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The scheduled date and time for the Job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduled") + private java.util.Date timeScheduled; + + /** + * The scheduled date and time for the Job. + * @param timeScheduled the value to set + * @return this builder + **/ + public Builder timeScheduled(java.util.Date timeScheduled) { + this.timeScheduled = timeScheduled; + this.__explicitlySet__.add("timeScheduled"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateSchedulerJobDetails build() { + UpdateSchedulerJobDetails model = + new UpdateSchedulerJobDetails( + this.timeScheduled, this.freeformTags, this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateSchedulerJobDetails model) { + if (model.wasPropertyExplicitlySet("timeScheduled")) { + this.timeScheduled(model.getTimeScheduled()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The scheduled date and time for the Job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeScheduled") + private final java.util.Date timeScheduled; + + /** + * The scheduled date and time for the Job. + * @return the value + **/ + public java.util.Date getTimeScheduled() { + return timeScheduled; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateSchedulerJobDetails("); + sb.append("super=").append(super.toString()); + sb.append("timeScheduled=").append(String.valueOf(this.timeScheduled)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSchedulerJobDetails)) { + return false; + } + + UpdateSchedulerJobDetails other = (UpdateSchedulerJobDetails) o; + return java.util.Objects.equals(this.timeScheduled, other.timeScheduled) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.timeScheduled == null ? 43 : this.timeScheduled.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateTaskRecordDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateTaskRecordDetails.java new file mode 100644 index 00000000000..199941cfe83 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UpdateTaskRecordDetails.java @@ -0,0 +1,328 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * The information to be updated. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateTaskRecordDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateTaskRecordDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "details", + "freeformTags", + "definedTags" + }) + public UpdateTaskRecordDetails( + String displayName, + String description, + Details details, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.details = details; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("details") + private Details details; + + public Builder details(Details details) { + this.details = details; + this.__explicitlySet__.add("details"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateTaskRecordDetails build() { + UpdateTaskRecordDetails model = + new UpdateTaskRecordDetails( + this.displayName, + this.description, + this.details, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateTaskRecordDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("details")) { + this.details(model.getDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + *

+ * Example: {@code My new resource} + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description. To provide some insight about the resource. + * Avoid entering confidential information. + * + * @return the value + **/ + public String getDescription() { + return description; + } + + @com.fasterxml.jackson.annotation.JsonProperty("details") + private final Details details; + + public Details getDetails() { + return details; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateTaskRecordDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", details=").append(String.valueOf(this.details)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateTaskRecordDetails)) { + return false; + } + + UpdateTaskRecordDetails other = (UpdateTaskRecordDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.details, other.details) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.details == null ? 43 : this.details.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UserActionBasedPauseDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UserActionBasedPauseDetails.java new file mode 100644 index 00000000000..a7bae534755 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UserActionBasedPauseDetails.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * User action-based pause details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UserActionBasedPauseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "kind" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UserActionBasedPauseDetails extends PauseDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UserActionBasedPauseDetails build() { + UserActionBasedPauseDetails model = new UserActionBasedPauseDetails(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UserActionBasedPauseDetails model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public UserActionBasedPauseDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UserActionBasedPauseDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UserActionBasedPauseDetails)) { + return false; + } + + UserActionBasedPauseDetails other = (UserActionBasedPauseDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UserActionDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UserActionDetails.java new file mode 100644 index 00000000000..c0bbb351f1b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/UserActionDetails.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * User action details. + * This can be performed on a failed/paused task or action group. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "level", + defaultImpl = UserActionDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = StepBasedUserActionDetails.class, + name = "STEP_NAME" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ActionGroupBasedUserActionDetails.class, + name = "ACTION_GROUP" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class UserActionDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"action"}) + protected UserActionDetails(Action action) { + super(); + this.action = action; + } + + /** + * Action to be Performed. + * + **/ + public enum Action { + Retry("RETRY"), + Resume("RESUME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Action v : Action.values()) { + map.put(v.getValue(), v); + } + } + + Action(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Action create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Action: " + key); + } + }; + /** + * Action to be Performed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("action") + private final Action action; + + /** + * Action to be Performed. + * + * @return the value + **/ + public Action getAction() { + return action; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UserActionDetails("); + sb.append("super=").append(super.toString()); + sb.append("action=").append(String.valueOf(this.action)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UserActionDetails)) { + return false; + } + + UserActionDetails other = (UserActionDetails) o; + return java.util.Objects.equals(this.action, other.action) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.action == null ? 43 : this.action.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * User action based On. + * + **/ + public enum Level { + ActionGroup("ACTION_GROUP"), + StepName("STEP_NAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Level v : Level.values()) { + map.put(v.getValue(), v); + } + } + + Level(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Level create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Level: " + key); + } + }; +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ValueType.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ValueType.java new file mode 100644 index 00000000000..990776b76bf --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/ValueType.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Possible value types. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public enum ValueType { + String("STRING"), + Numeric("NUMERIC"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(ValueType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ValueType v : ValueType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ValueType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ValueType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ValueType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Variable.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Variable.java new file mode 100644 index 00000000000..f46ea40683a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/Variable.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Credential Variable. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Variable.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Variable extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "value"}) + public Variable(String name, String value) { + super(); + this.name = name; + this.value = value; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Name of the variable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Name of the variable. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The value corresponding to the variable name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + /** + * The value corresponding to the variable name. + * @param value the value to set + * @return this builder + **/ + public Builder value(String value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Variable build() { + Variable model = new Variable(this.name, this.value); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Variable model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Name of the variable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name of the variable. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The value corresponding to the variable name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final String value; + + /** + * The value corresponding to the variable name. + * @return the value + **/ + public String getValue() { + return value; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Variable("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", value=").append(""); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Variable)) { + return false; + } + + Variable other = (Variable) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.value, other.value) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/VaultSecretCredentialDetails.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/VaultSecretCredentialDetails.java new file mode 100644 index 00000000000..4bd2e0fee3c --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/VaultSecretCredentialDetails.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Secret details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = VaultSecretCredentialDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "credentialType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class VaultSecretCredentialDetails extends CredentialDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the secret. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretId") + private String secretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the secret. + * @param secretId the value to set + * @return this builder + **/ + public Builder secretId(String secretId) { + this.secretId = secretId; + this.__explicitlySet__.add("secretId"); + return this; + } + /** + * The secret version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretVersion") + private String secretVersion; + + /** + * The secret version. + * @param secretVersion the value to set + * @return this builder + **/ + public Builder secretVersion(String secretVersion) { + this.secretVersion = secretVersion; + this.__explicitlySet__.add("secretVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public VaultSecretCredentialDetails build() { + VaultSecretCredentialDetails model = + new VaultSecretCredentialDetails(this.secretId, this.secretVersion); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(VaultSecretCredentialDetails model) { + if (model.wasPropertyExplicitlySet("secretId")) { + this.secretId(model.getSecretId()); + } + if (model.wasPropertyExplicitlySet("secretVersion")) { + this.secretVersion(model.getSecretVersion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public VaultSecretCredentialDetails(String secretId, String secretVersion) { + super(); + this.secretId = secretId; + this.secretVersion = secretVersion; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the secret. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretId") + private final String secretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the secret. + * @return the value + **/ + public String getSecretId() { + return secretId; + } + + /** + * The secret version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretVersion") + private final String secretVersion; + + /** + * The secret version. + * @return the value + **/ + public String getSecretVersion() { + return secretVersion; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("VaultSecretCredentialDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", secretId=").append(String.valueOf(this.secretId)); + sb.append(", secretVersion=").append(String.valueOf(this.secretVersion)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof VaultSecretCredentialDetails)) { + return false; + } + + VaultSecretCredentialDetails other = (VaultSecretCredentialDetails) o; + return java.util.Objects.equals(this.secretId, other.secretId) + && java.util.Objects.equals(this.secretVersion, other.secretVersion) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.secretId == null ? 43 : this.secretId.hashCode()); + result = + (result * PRIME) + + (this.secretVersion == null ? 43 : this.secretVersion.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequest.java new file mode 100644 index 00000000000..ba1745724d6 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequest.java @@ -0,0 +1,544 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * A description of workrequest status + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = WorkRequest.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequest extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "operationType", + "status", + "id", + "compartmentId", + "resources", + "percentComplete", + "timeAccepted", + "timeStarted", + "timeFinished", + "timeUpdated" + }) + public WorkRequest( + OperationType operationType, + OperationStatus status, + String id, + String compartmentId, + java.util.List resources, + Float percentComplete, + java.util.Date timeAccepted, + java.util.Date timeStarted, + java.util.Date timeFinished, + java.util.Date timeUpdated) { + super(); + this.operationType = operationType; + this.status = status; + this.id = id; + this.compartmentId = compartmentId; + this.resources = resources; + this.percentComplete = percentComplete; + this.timeAccepted = timeAccepted; + this.timeStarted = timeStarted; + this.timeFinished = timeFinished; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Type of the work request + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private OperationType operationType; + + /** + * Type of the work request + * @param operationType the value to set + * @return this builder + **/ + public Builder operationType(OperationType operationType) { + this.operationType = operationType; + this.__explicitlySet__.add("operationType"); + return this; + } + /** + * Status of current work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private OperationStatus status; + + /** + * Status of current work request. + * @param status the value to set + * @return this builder + **/ + public Builder status(OperationStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The id of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The id of the work request. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The OCID of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The resources affected by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * The resources affected by this work request. + * @param resources the value to set + * @return this builder + **/ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** + * Percentage of the request completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private Float percentComplete; + + /** + * Percentage of the request completed. + * @param percentComplete the value to set + * @return this builder + **/ + public Builder percentComplete(Float percentComplete) { + this.percentComplete = percentComplete; + this.__explicitlySet__.add("percentComplete"); + return this; + } + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private java.util.Date timeAccepted; + + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + * @param timeAccepted the value to set + * @return this builder + **/ + public Builder timeAccepted(java.util.Date timeAccepted) { + this.timeAccepted = timeAccepted; + this.__explicitlySet__.add("timeAccepted"); + return this; + } + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + /** + * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @param timeFinished the value to set + * @return this builder + **/ + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + /** + * The date and time the object was updated, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the object was updated, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequest build() { + WorkRequest model = + new WorkRequest( + this.operationType, + this.status, + this.id, + this.compartmentId, + this.resources, + this.percentComplete, + this.timeAccepted, + this.timeStarted, + this.timeFinished, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequest model) { + if (model.wasPropertyExplicitlySet("operationType")) { + this.operationType(model.getOperationType()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("percentComplete")) { + this.percentComplete(model.getPercentComplete()); + } + if (model.wasPropertyExplicitlySet("timeAccepted")) { + this.timeAccepted(model.getTimeAccepted()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Type of the work request + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private final OperationType operationType; + + /** + * Type of the work request + * @return the value + **/ + public OperationType getOperationType() { + return operationType; + } + + /** + * Status of current work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final OperationStatus status; + + /** + * Status of current work request. + * @return the value + **/ + public OperationStatus getStatus() { + return status; + } + + /** + * The id of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The id of the work request. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The resources affected by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * The resources affected by this work request. + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + /** + * Percentage of the request completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private final Float percentComplete; + + /** + * Percentage of the request completed. + * @return the value + **/ + public Float getPercentComplete() { + return percentComplete; + } + + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private final java.util.Date timeAccepted; + + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + * @return the value + **/ + public java.util.Date getTimeAccepted() { + return timeAccepted; + } + + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private final java.util.Date timeFinished; + + /** + * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeFinished() { + return timeFinished; + } + + /** + * The date and time the object was updated, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the object was updated, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequest("); + sb.append("super=").append(super.toString()); + sb.append("operationType=").append(String.valueOf(this.operationType)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", percentComplete=").append(String.valueOf(this.percentComplete)); + sb.append(", timeAccepted=").append(String.valueOf(this.timeAccepted)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequest)) { + return false; + } + + WorkRequest other = (WorkRequest) o; + return java.util.Objects.equals(this.operationType, other.operationType) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.percentComplete, other.percentComplete) + && java.util.Objects.equals(this.timeAccepted, other.timeAccepted) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeFinished, other.timeFinished) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.operationType == null ? 43 : this.operationType.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = + (result * PRIME) + + (this.percentComplete == null ? 43 : this.percentComplete.hashCode()); + result = (result * PRIME) + (this.timeAccepted == null ? 43 : this.timeAccepted.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestError.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestError.java new file mode 100644 index 00000000000..cd7242580a3 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestError.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * An error encountered while executing a work request. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = WorkRequestError.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestError extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"code", "message", "timestamp"}) + public WorkRequestError(String code, String message, java.util.Date timestamp) { + super(); + this.code = code; + this.message = message; + this.timestamp = timestamp; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A machine-usable code for the error that occured. Error codes are listed on + * (https://docs.cloud.oracle.com/Content/API/References/apierrors.htm) + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("code") + private String code; + + /** + * A machine-usable code for the error that occured. Error codes are listed on + * (https://docs.cloud.oracle.com/Content/API/References/apierrors.htm) + * + * @param code the value to set + * @return this builder + **/ + public Builder code(String code) { + this.code = code; + this.__explicitlySet__.add("code"); + return this; + } + /** + * A human readable description of the issue encountered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * A human readable description of the issue encountered. + * @param message the value to set + * @return this builder + **/ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + /** + * The time the error occured. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + /** + * The time the error occured. An RFC3339 formatted datetime string. + * @param timestamp the value to set + * @return this builder + **/ + public Builder timestamp(java.util.Date timestamp) { + this.timestamp = timestamp; + this.__explicitlySet__.add("timestamp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestError build() { + WorkRequestError model = new WorkRequestError(this.code, this.message, this.timestamp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestError model) { + if (model.wasPropertyExplicitlySet("code")) { + this.code(model.getCode()); + } + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + if (model.wasPropertyExplicitlySet("timestamp")) { + this.timestamp(model.getTimestamp()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A machine-usable code for the error that occured. Error codes are listed on + * (https://docs.cloud.oracle.com/Content/API/References/apierrors.htm) + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("code") + private final String code; + + /** + * A machine-usable code for the error that occured. Error codes are listed on + * (https://docs.cloud.oracle.com/Content/API/References/apierrors.htm) + * + * @return the value + **/ + public String getCode() { + return code; + } + + /** + * A human readable description of the issue encountered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * A human readable description of the issue encountered. + * @return the value + **/ + public String getMessage() { + return message; + } + + /** + * The time the error occured. An RFC3339 formatted datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private final java.util.Date timestamp; + + /** + * The time the error occured. An RFC3339 formatted datetime string. + * @return the value + **/ + public java.util.Date getTimestamp() { + return timestamp; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestError("); + sb.append("super=").append(super.toString()); + sb.append("code=").append(String.valueOf(this.code)); + sb.append(", message=").append(String.valueOf(this.message)); + sb.append(", timestamp=").append(String.valueOf(this.timestamp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestError)) { + return false; + } + + WorkRequestError other = (WorkRequestError) o; + return java.util.Objects.equals(this.code, other.code) + && java.util.Objects.equals(this.message, other.message) + && java.util.Objects.equals(this.timestamp, other.timestamp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.code == null ? 43 : this.code.hashCode()); + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + (this.timestamp == null ? 43 : this.timestamp.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestErrorCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestErrorCollection.java new file mode 100644 index 00000000000..17248738da4 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestErrorCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a workRequestError search. Contains both WorkRequestError items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestErrorCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestErrorCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public WorkRequestErrorCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of workRequestError objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of workRequestError objects. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestErrorCollection build() { + WorkRequestErrorCollection model = new WorkRequestErrorCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestErrorCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of workRequestError objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of workRequestError objects. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestErrorCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestErrorCollection)) { + return false; + } + + WorkRequestErrorCollection other = (WorkRequestErrorCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestLogEntry.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestLogEntry.java new file mode 100644 index 00000000000..304fdad297b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestLogEntry.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * A log message from the execution of a work request. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestLogEntry.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestLogEntry extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"message", "timestamp"}) + public WorkRequestLogEntry(String message, java.util.Date timestamp) { + super(); + this.message = message; + this.timestamp = timestamp; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Human-readable log message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * Human-readable log message. + * @param message the value to set + * @return this builder + **/ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + /** + * The time the log message was written. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + /** + * The time the log message was written. An RFC3339 formatted datetime string + * @param timestamp the value to set + * @return this builder + **/ + public Builder timestamp(java.util.Date timestamp) { + this.timestamp = timestamp; + this.__explicitlySet__.add("timestamp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestLogEntry build() { + WorkRequestLogEntry model = new WorkRequestLogEntry(this.message, this.timestamp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestLogEntry model) { + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + if (model.wasPropertyExplicitlySet("timestamp")) { + this.timestamp(model.getTimestamp()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Human-readable log message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * Human-readable log message. + * @return the value + **/ + public String getMessage() { + return message; + } + + /** + * The time the log message was written. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private final java.util.Date timestamp; + + /** + * The time the log message was written. An RFC3339 formatted datetime string + * @return the value + **/ + public java.util.Date getTimestamp() { + return timestamp; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestLogEntry("); + sb.append("super=").append(super.toString()); + sb.append("message=").append(String.valueOf(this.message)); + sb.append(", timestamp=").append(String.valueOf(this.timestamp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestLogEntry)) { + return false; + } + + WorkRequestLogEntry other = (WorkRequestLogEntry) o; + return java.util.Objects.equals(this.message, other.message) + && java.util.Objects.equals(this.timestamp, other.timestamp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + (this.timestamp == null ? 43 : this.timestamp.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestLogEntryCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestLogEntryCollection.java new file mode 100644 index 00000000000..b86455b9b06 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestLogEntryCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a workRequestLog search. Contains both workRequestLog items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestLogEntryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestLogEntryCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public WorkRequestLogEntryCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of workRequestLogEntries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of workRequestLogEntries. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestLogEntryCollection build() { + WorkRequestLogEntryCollection model = new WorkRequestLogEntryCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestLogEntryCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of workRequestLogEntries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of workRequestLogEntries. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestLogEntryCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestLogEntryCollection)) { + return false; + } + + WorkRequestLogEntryCollection other = (WorkRequestLogEntryCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestResource.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestResource.java new file mode 100644 index 00000000000..651ec7a69de --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestResource.java @@ -0,0 +1,316 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * A resource created or operated on by a work request. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestResource.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestResource extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "entityType", + "actionType", + "identifier", + "entityUri", + "metadata" + }) + public WorkRequestResource( + String entityType, + ActionType actionType, + String identifier, + String entityUri, + java.util.Map metadata) { + super(); + this.entityType = entityType; + this.actionType = actionType; + this.identifier = identifier; + this.entityUri = entityUri; + this.metadata = metadata; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The resource type the work request affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private String entityType; + + /** + * The resource type the work request affects. + * @param entityType the value to set + * @return this builder + **/ + public Builder entityType(String entityType) { + this.entityType = entityType; + this.__explicitlySet__.add("entityType"); + return this; + } + /** + * The way in which this resource is affected by the work tracked in the work request. + * A resource being created, updated, or deleted will remain in the IN_PROGRESS state until + * work is complete for that resource at which point it will transition to CREATED, UPDATED, + * or DELETED, respectively. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + /** + * The way in which this resource is affected by the work tracked in the work request. + * A resource being created, updated, or deleted will remain in the IN_PROGRESS state until + * work is complete for that resource at which point it will transition to CREATED, UPDATED, + * or DELETED, respectively. + * + * @param actionType the value to set + * @return this builder + **/ + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + /** + * The identifier of the resource the work request affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("identifier") + private String identifier; + + /** + * The identifier of the resource the work request affects. + * @param identifier the value to set + * @return this builder + **/ + public Builder identifier(String identifier) { + this.identifier = identifier; + this.__explicitlySet__.add("identifier"); + return this; + } + /** + * The URI path that the user can do a GET on to access the resource metadata + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityUri") + private String entityUri; + + /** + * The URI path that the user can do a GET on to access the resource metadata + * @param entityUri the value to set + * @return this builder + **/ + public Builder entityUri(String entityUri) { + this.entityUri = entityUri; + this.__explicitlySet__.add("entityUri"); + return this; + } + /** + * Additional information that helps to explain the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private java.util.Map metadata; + + /** + * Additional information that helps to explain the resource. + * @param metadata the value to set + * @return this builder + **/ + public Builder metadata(java.util.Map metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestResource build() { + WorkRequestResource model = + new WorkRequestResource( + this.entityType, + this.actionType, + this.identifier, + this.entityUri, + this.metadata); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestResource model) { + if (model.wasPropertyExplicitlySet("entityType")) { + this.entityType(model.getEntityType()); + } + if (model.wasPropertyExplicitlySet("actionType")) { + this.actionType(model.getActionType()); + } + if (model.wasPropertyExplicitlySet("identifier")) { + this.identifier(model.getIdentifier()); + } + if (model.wasPropertyExplicitlySet("entityUri")) { + this.entityUri(model.getEntityUri()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The resource type the work request affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private final String entityType; + + /** + * The resource type the work request affects. + * @return the value + **/ + public String getEntityType() { + return entityType; + } + + /** + * The way in which this resource is affected by the work tracked in the work request. + * A resource being created, updated, or deleted will remain in the IN_PROGRESS state until + * work is complete for that resource at which point it will transition to CREATED, UPDATED, + * or DELETED, respectively. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private final ActionType actionType; + + /** + * The way in which this resource is affected by the work tracked in the work request. + * A resource being created, updated, or deleted will remain in the IN_PROGRESS state until + * work is complete for that resource at which point it will transition to CREATED, UPDATED, + * or DELETED, respectively. + * + * @return the value + **/ + public ActionType getActionType() { + return actionType; + } + + /** + * The identifier of the resource the work request affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("identifier") + private final String identifier; + + /** + * The identifier of the resource the work request affects. + * @return the value + **/ + public String getIdentifier() { + return identifier; + } + + /** + * The URI path that the user can do a GET on to access the resource metadata + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityUri") + private final String entityUri; + + /** + * The URI path that the user can do a GET on to access the resource metadata + * @return the value + **/ + public String getEntityUri() { + return entityUri; + } + + /** + * Additional information that helps to explain the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final java.util.Map metadata; + + /** + * Additional information that helps to explain the resource. + * @return the value + **/ + public java.util.Map getMetadata() { + return metadata; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestResource("); + sb.append("super=").append(super.toString()); + sb.append("entityType=").append(String.valueOf(this.entityType)); + sb.append(", actionType=").append(String.valueOf(this.actionType)); + sb.append(", identifier=").append(String.valueOf(this.identifier)); + sb.append(", entityUri=").append(String.valueOf(this.entityUri)); + sb.append(", metadata=").append(String.valueOf(this.metadata)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestResource)) { + return false; + } + + WorkRequestResource other = (WorkRequestResource) o; + return java.util.Objects.equals(this.entityType, other.entityType) + && java.util.Objects.equals(this.actionType, other.actionType) + && java.util.Objects.equals(this.identifier, other.identifier) + && java.util.Objects.equals(this.entityUri, other.entityUri) + && java.util.Objects.equals(this.metadata, other.metadata) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.entityType == null ? 43 : this.entityType.hashCode()); + result = (result * PRIME) + (this.actionType == null ? 43 : this.actionType.hashCode()); + result = (result * PRIME) + (this.identifier == null ? 43 : this.identifier.hashCode()); + result = (result * PRIME) + (this.entityUri == null ? 43 : this.entityUri.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestResourceMetadataKey.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestResourceMetadataKey.java new file mode 100644 index 00000000000..7b96e3a66d1 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestResourceMetadataKey.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Possible Metadata keys for workRequest resource metadata + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public enum WorkRequestResourceMetadataKey { + IsDryRun("IS_DRY_RUN"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(WorkRequestResourceMetadataKey.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (WorkRequestResourceMetadataKey v : WorkRequestResourceMetadataKey.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + WorkRequestResourceMetadataKey(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static WorkRequestResourceMetadataKey create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'WorkRequestResourceMetadataKey', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestSummary.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestSummary.java new file mode 100644 index 00000000000..e6958ada298 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestSummary.java @@ -0,0 +1,546 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * A summary of the status of a work request. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "operationType", + "status", + "id", + "compartmentId", + "resources", + "percentComplete", + "timeAccepted", + "timeStarted", + "timeFinished", + "timeUpdated" + }) + public WorkRequestSummary( + OperationType operationType, + OperationStatus status, + String id, + String compartmentId, + java.util.List resources, + Float percentComplete, + java.util.Date timeAccepted, + java.util.Date timeStarted, + java.util.Date timeFinished, + java.util.Date timeUpdated) { + super(); + this.operationType = operationType; + this.status = status; + this.id = id; + this.compartmentId = compartmentId; + this.resources = resources; + this.percentComplete = percentComplete; + this.timeAccepted = timeAccepted; + this.timeStarted = timeStarted; + this.timeFinished = timeFinished; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Type of the work request + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private OperationType operationType; + + /** + * Type of the work request + * @param operationType the value to set + * @return this builder + **/ + public Builder operationType(OperationType operationType) { + this.operationType = operationType; + this.__explicitlySet__.add("operationType"); + return this; + } + /** + * Status of current work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private OperationStatus status; + + /** + * Status of current work request. + * @param status the value to set + * @return this builder + **/ + public Builder status(OperationStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The id of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The id of the work request. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The OCID of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The resources affected by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * The resources affected by this work request. + * @param resources the value to set + * @return this builder + **/ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** + * Percentage of the request completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private Float percentComplete; + + /** + * Percentage of the request completed. + * @param percentComplete the value to set + * @return this builder + **/ + public Builder percentComplete(Float percentComplete) { + this.percentComplete = percentComplete; + this.__explicitlySet__.add("percentComplete"); + return this; + } + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private java.util.Date timeAccepted; + + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + * @param timeAccepted the value to set + * @return this builder + **/ + public Builder timeAccepted(java.util.Date timeAccepted) { + this.timeAccepted = timeAccepted; + this.__explicitlySet__.add("timeAccepted"); + return this; + } + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + /** + * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @param timeFinished the value to set + * @return this builder + **/ + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + /** + * The date and time the object was updated, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the object was updated, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestSummary build() { + WorkRequestSummary model = + new WorkRequestSummary( + this.operationType, + this.status, + this.id, + this.compartmentId, + this.resources, + this.percentComplete, + this.timeAccepted, + this.timeStarted, + this.timeFinished, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestSummary model) { + if (model.wasPropertyExplicitlySet("operationType")) { + this.operationType(model.getOperationType()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("percentComplete")) { + this.percentComplete(model.getPercentComplete()); + } + if (model.wasPropertyExplicitlySet("timeAccepted")) { + this.timeAccepted(model.getTimeAccepted()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Type of the work request + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private final OperationType operationType; + + /** + * Type of the work request + * @return the value + **/ + public OperationType getOperationType() { + return operationType; + } + + /** + * Status of current work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final OperationStatus status; + + /** + * Status of current work request. + * @return the value + **/ + public OperationStatus getStatus() { + return status; + } + + /** + * The id of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The id of the work request. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The resources affected by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * The resources affected by this work request. + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + /** + * Percentage of the request completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private final Float percentComplete; + + /** + * Percentage of the request completed. + * @return the value + **/ + public Float getPercentComplete() { + return percentComplete; + } + + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private final java.util.Date timeAccepted; + + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + * @return the value + **/ + public java.util.Date getTimeAccepted() { + return timeAccepted; + } + + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private final java.util.Date timeFinished; + + /** + * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeFinished() { + return timeFinished; + } + + /** + * The date and time the object was updated, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the object was updated, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestSummary("); + sb.append("super=").append(super.toString()); + sb.append("operationType=").append(String.valueOf(this.operationType)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", percentComplete=").append(String.valueOf(this.percentComplete)); + sb.append(", timeAccepted=").append(String.valueOf(this.timeAccepted)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestSummary)) { + return false; + } + + WorkRequestSummary other = (WorkRequestSummary) o; + return java.util.Objects.equals(this.operationType, other.operationType) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.percentComplete, other.percentComplete) + && java.util.Objects.equals(this.timeAccepted, other.timeAccepted) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeFinished, other.timeFinished) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.operationType == null ? 43 : this.operationType.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = + (result * PRIME) + + (this.percentComplete == null ? 43 : this.percentComplete.hashCode()); + result = (result * PRIME) + (this.timeAccepted == null ? 43 : this.timeAccepted.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestSummaryCollection.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestSummaryCollection.java new file mode 100644 index 00000000000..5f8794a6a79 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkRequestSummaryCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Results of a workRequest search. Contains both WorkRequest items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestSummaryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestSummaryCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public WorkRequestSummaryCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of workRequestSummary objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of workRequestSummary objects. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestSummaryCollection build() { + WorkRequestSummaryCollection model = new WorkRequestSummaryCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestSummaryCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of workRequestSummary objects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of workRequestSummary objects. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestSummaryCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestSummaryCollection)) { + return false; + } + + WorkRequestSummaryCollection other = (WorkRequestSummaryCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkflowComponent.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkflowComponent.java new file mode 100644 index 00000000000..b3f3e8c5d7f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkflowComponent.java @@ -0,0 +1,128 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Workflow Component Details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type", + defaultImpl = WorkflowComponent.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = WorkflowGroupComponent.class, + name = "PARALLEL_TASK_GROUP" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = WorkflowTaskComponent.class, + name = "TASK" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class WorkflowComponent extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected WorkflowComponent() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkflowComponent("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkflowComponent)) { + return false; + } + + WorkflowComponent other = (WorkflowComponent) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Content Source Details. + * + **/ + public enum Type { + Task("TASK"), + ParallelTaskGroup("PARALLEL_TASK_GROUP"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkflowGroup.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkflowGroup.java new file mode 100644 index 00000000000..2d0c6008523 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkflowGroup.java @@ -0,0 +1,258 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Workflow Group Layout. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = WorkflowGroup.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkflowGroup extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"groupName", "type", "steps"}) + public WorkflowGroup(String groupName, Type type, java.util.List steps) { + super(); + this.groupName = groupName; + this.type = type; + this.steps = steps; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Name of the group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupName") + private String groupName; + + /** + * Name of the group. + * @param groupName the value to set + * @return this builder + **/ + public Builder groupName(String groupName) { + this.groupName = groupName; + this.__explicitlySet__.add("groupName"); + return this; + } + /** + * Workflow Group Details. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * Workflow Group Details. + * + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * Steps within the Group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("steps") + private java.util.List steps; + + /** + * Steps within the Group. + * @param steps the value to set + * @return this builder + **/ + public Builder steps(java.util.List steps) { + this.steps = steps; + this.__explicitlySet__.add("steps"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkflowGroup build() { + WorkflowGroup model = new WorkflowGroup(this.groupName, this.type, this.steps); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkflowGroup model) { + if (model.wasPropertyExplicitlySet("groupName")) { + this.groupName(model.getGroupName()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("steps")) { + this.steps(model.getSteps()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Name of the group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupName") + private final String groupName; + + /** + * Name of the group. + * @return the value + **/ + public String getGroupName() { + return groupName; + } + + /** + * Workflow Group Details. + * + **/ + public enum Type { + ParallelResourceGroup("PARALLEL_RESOURCE_GROUP"), + RollingResourceGroup("ROLLING_RESOURCE_GROUP"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * Workflow Group Details. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * Workflow Group Details. + * + * @return the value + **/ + public Type getType() { + return type; + } + + /** + * Steps within the Group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("steps") + private final java.util.List steps; + + /** + * Steps within the Group. + * @return the value + **/ + public java.util.List getSteps() { + return steps; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkflowGroup("); + sb.append("super=").append(super.toString()); + sb.append("groupName=").append(String.valueOf(this.groupName)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", steps=").append(String.valueOf(this.steps)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkflowGroup)) { + return false; + } + + WorkflowGroup other = (WorkflowGroup) o; + return java.util.Objects.equals(this.groupName, other.groupName) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.steps, other.steps) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.groupName == null ? 43 : this.groupName.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + (this.steps == null ? 43 : this.steps.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkflowGroupComponent.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkflowGroupComponent.java new file mode 100644 index 00000000000..d8336ffad9a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkflowGroupComponent.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Workflow Group Component Details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkflowGroupComponent.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkflowGroupComponent extends WorkflowComponent { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Name of the group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupName") + private String groupName; + + /** + * Name of the group. + * @param groupName the value to set + * @return this builder + **/ + public Builder groupName(String groupName) { + this.groupName = groupName; + this.__explicitlySet__.add("groupName"); + return this; + } + /** + * Tasks within the Group. + * Provide the stepName for all applicable tasks. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("steps") + private java.util.List steps; + + /** + * Tasks within the Group. + * Provide the stepName for all applicable tasks. + * + * @param steps the value to set + * @return this builder + **/ + public Builder steps(java.util.List steps) { + this.steps = steps; + this.__explicitlySet__.add("steps"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkflowGroupComponent build() { + WorkflowGroupComponent model = new WorkflowGroupComponent(this.groupName, this.steps); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkflowGroupComponent model) { + if (model.wasPropertyExplicitlySet("groupName")) { + this.groupName(model.getGroupName()); + } + if (model.wasPropertyExplicitlySet("steps")) { + this.steps(model.getSteps()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public WorkflowGroupComponent(String groupName, java.util.List steps) { + super(); + this.groupName = groupName; + this.steps = steps; + } + + /** + * Name of the group. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("groupName") + private final String groupName; + + /** + * Name of the group. + * @return the value + **/ + public String getGroupName() { + return groupName; + } + + /** + * Tasks within the Group. + * Provide the stepName for all applicable tasks. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("steps") + private final java.util.List steps; + + /** + * Tasks within the Group. + * Provide the stepName for all applicable tasks. + * + * @return the value + **/ + public java.util.List getSteps() { + return steps; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkflowGroupComponent("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", groupName=").append(String.valueOf(this.groupName)); + sb.append(", steps=").append(String.valueOf(this.steps)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkflowGroupComponent)) { + return false; + } + + WorkflowGroupComponent other = (WorkflowGroupComponent) o; + return java.util.Objects.equals(this.groupName, other.groupName) + && java.util.Objects.equals(this.steps, other.steps) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.groupName == null ? 43 : this.groupName.hashCode()); + result = (result * PRIME) + (this.steps == null ? 43 : this.steps.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkflowTaskComponent.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkflowTaskComponent.java new file mode 100644 index 00000000000..54e7e310e5d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/model/WorkflowTaskComponent.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.model; + +/** + * Workflow Task Component Details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkflowTaskComponent.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkflowTaskComponent extends WorkflowComponent { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Provide StepName for the Task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private String stepName; + + /** + * Provide StepName for the Task. + * @param stepName the value to set + * @return this builder + **/ + public Builder stepName(String stepName) { + this.stepName = stepName; + this.__explicitlySet__.add("stepName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkflowTaskComponent build() { + WorkflowTaskComponent model = new WorkflowTaskComponent(this.stepName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkflowTaskComponent model) { + if (model.wasPropertyExplicitlySet("stepName")) { + this.stepName(model.getStepName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public WorkflowTaskComponent(String stepName) { + super(); + this.stepName = stepName; + } + + /** + * Provide StepName for the Task. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("stepName") + private final String stepName; + + /** + * Provide StepName for the Task. + * @return the value + **/ + public String getStepName() { + return stepName; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkflowTaskComponent("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", stepName=").append(String.valueOf(this.stepName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkflowTaskComponent)) { + return false; + } + + WorkflowTaskComponent other = (WorkflowTaskComponent) o; + return java.util.Objects.equals(this.stepName, other.stepName) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.stepName == null ? 43 : this.stepName.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CheckResourceTaggingRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CheckResourceTaggingRequest.java new file mode 100644 index 00000000000..e48f5a5774b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CheckResourceTaggingRequest.java @@ -0,0 +1,285 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use CheckResourceTaggingRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CheckResourceTaggingRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.CheckResourceTaggingDetails> { + + /** + * Details for checking if Fleet Application Management tags can be added to the resources. + */ + private com.oracle.bmc.fleetappsmanagement.model.CheckResourceTaggingDetails + checkResourceTaggingDetails; + + /** + * Details for checking if Fleet Application Management tags can be added to the resources. + */ + public com.oracle.bmc.fleetappsmanagement.model.CheckResourceTaggingDetails + getCheckResourceTaggingDetails() { + return checkResourceTaggingDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.CheckResourceTaggingDetails getBody$() { + return checkResourceTaggingDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CheckResourceTaggingRequest, + com.oracle.bmc.fleetappsmanagement.model.CheckResourceTaggingDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for checking if Fleet Application Management tags can be added to the resources. + */ + private com.oracle.bmc.fleetappsmanagement.model.CheckResourceTaggingDetails + checkResourceTaggingDetails = null; + + /** + * Details for checking if Fleet Application Management tags can be added to the resources. + * @param checkResourceTaggingDetails the value to set + * @return this builder instance + */ + public Builder checkResourceTaggingDetails( + com.oracle.bmc.fleetappsmanagement.model.CheckResourceTaggingDetails + checkResourceTaggingDetails) { + this.checkResourceTaggingDetails = checkResourceTaggingDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CheckResourceTaggingRequest o) { + checkResourceTaggingDetails(o.getCheckResourceTaggingDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CheckResourceTaggingRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CheckResourceTaggingRequest + */ + public CheckResourceTaggingRequest build() { + CheckResourceTaggingRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.CheckResourceTaggingDetails body) { + checkResourceTaggingDetails(body); + return this; + } + + /** + * Build the instance of CheckResourceTaggingRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CheckResourceTaggingRequest + */ + public CheckResourceTaggingRequest buildWithoutInvocationCallback() { + CheckResourceTaggingRequest request = new CheckResourceTaggingRequest(); + request.checkResourceTaggingDetails = checkResourceTaggingDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CheckResourceTaggingRequest(checkResourceTaggingDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .checkResourceTaggingDetails(checkResourceTaggingDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",checkResourceTaggingDetails=") + .append(String.valueOf(this.checkResourceTaggingDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CheckResourceTaggingRequest)) { + return false; + } + + CheckResourceTaggingRequest other = (CheckResourceTaggingRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.checkResourceTaggingDetails, other.checkResourceTaggingDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.checkResourceTaggingDetails == null + ? 43 + : this.checkResourceTaggingDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ConfirmTargetsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ConfirmTargetsRequest.java new file mode 100644 index 00000000000..67dd9dd5481 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ConfirmTargetsRequest.java @@ -0,0 +1,313 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ConfirmTargetsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ConfirmTargetsRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.ConfirmTargetsDetails> { + + /** + * Details for confirming Targets. + */ + private com.oracle.bmc.fleetappsmanagement.model.ConfirmTargetsDetails confirmTargetsDetails; + + /** + * Details for confirming Targets. + */ + public com.oracle.bmc.fleetappsmanagement.model.ConfirmTargetsDetails + getConfirmTargetsDetails() { + return confirmTargetsDetails; + } + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.ConfirmTargetsDetails getBody$() { + return confirmTargetsDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ConfirmTargetsRequest, + com.oracle.bmc.fleetappsmanagement.model.ConfirmTargetsDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for confirming Targets. + */ + private com.oracle.bmc.fleetappsmanagement.model.ConfirmTargetsDetails + confirmTargetsDetails = null; + + /** + * Details for confirming Targets. + * @param confirmTargetsDetails the value to set + * @return this builder instance + */ + public Builder confirmTargetsDetails( + com.oracle.bmc.fleetappsmanagement.model.ConfirmTargetsDetails + confirmTargetsDetails) { + this.confirmTargetsDetails = confirmTargetsDetails; + return this; + } + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ConfirmTargetsRequest o) { + confirmTargetsDetails(o.getConfirmTargetsDetails()); + fleetId(o.getFleetId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ConfirmTargetsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ConfirmTargetsRequest + */ + public ConfirmTargetsRequest build() { + ConfirmTargetsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.fleetappsmanagement.model.ConfirmTargetsDetails body) { + confirmTargetsDetails(body); + return this; + } + + /** + * Build the instance of ConfirmTargetsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ConfirmTargetsRequest + */ + public ConfirmTargetsRequest buildWithoutInvocationCallback() { + ConfirmTargetsRequest request = new ConfirmTargetsRequest(); + request.confirmTargetsDetails = confirmTargetsDetails; + request.fleetId = fleetId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new ConfirmTargetsRequest(confirmTargetsDetails, fleetId, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .confirmTargetsDetails(confirmTargetsDetails) + .fleetId(fleetId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",confirmTargetsDetails=").append(String.valueOf(this.confirmTargetsDetails)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfirmTargetsRequest)) { + return false; + } + + ConfirmTargetsRequest other = (ConfirmTargetsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.confirmTargetsDetails, other.confirmTargetsDetails) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.confirmTargetsDetails == null + ? 43 + : this.confirmTargetsDetails.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateCompliancePolicyRuleRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateCompliancePolicyRuleRequest.java new file mode 100644 index 00000000000..53342827bc6 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateCompliancePolicyRuleRequest.java @@ -0,0 +1,286 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use CreateCompliancePolicyRuleRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateCompliancePolicyRuleRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.CreateCompliancePolicyRuleDetails> { + + /** + * Details for the new CompliancePolicyRule. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreateCompliancePolicyRuleDetails + createCompliancePolicyRuleDetails; + + /** + * Details for the new CompliancePolicyRule. + */ + public com.oracle.bmc.fleetappsmanagement.model.CreateCompliancePolicyRuleDetails + getCreateCompliancePolicyRuleDetails() { + return createCompliancePolicyRuleDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.CreateCompliancePolicyRuleDetails getBody$() { + return createCompliancePolicyRuleDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateCompliancePolicyRuleRequest, + com.oracle.bmc.fleetappsmanagement.model.CreateCompliancePolicyRuleDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new CompliancePolicyRule. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreateCompliancePolicyRuleDetails + createCompliancePolicyRuleDetails = null; + + /** + * Details for the new CompliancePolicyRule. + * @param createCompliancePolicyRuleDetails the value to set + * @return this builder instance + */ + public Builder createCompliancePolicyRuleDetails( + com.oracle.bmc.fleetappsmanagement.model.CreateCompliancePolicyRuleDetails + createCompliancePolicyRuleDetails) { + this.createCompliancePolicyRuleDetails = createCompliancePolicyRuleDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateCompliancePolicyRuleRequest o) { + createCompliancePolicyRuleDetails(o.getCreateCompliancePolicyRuleDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateCompliancePolicyRuleRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateCompliancePolicyRuleRequest + */ + public CreateCompliancePolicyRuleRequest build() { + CreateCompliancePolicyRuleRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.CreateCompliancePolicyRuleDetails body) { + createCompliancePolicyRuleDetails(body); + return this; + } + + /** + * Build the instance of CreateCompliancePolicyRuleRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateCompliancePolicyRuleRequest + */ + public CreateCompliancePolicyRuleRequest buildWithoutInvocationCallback() { + CreateCompliancePolicyRuleRequest request = new CreateCompliancePolicyRuleRequest(); + request.createCompliancePolicyRuleDetails = createCompliancePolicyRuleDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateCompliancePolicyRuleRequest(createCompliancePolicyRuleDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createCompliancePolicyRuleDetails(createCompliancePolicyRuleDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createCompliancePolicyRuleDetails=") + .append(String.valueOf(this.createCompliancePolicyRuleDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateCompliancePolicyRuleRequest)) { + return false; + } + + CreateCompliancePolicyRuleRequest other = (CreateCompliancePolicyRuleRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createCompliancePolicyRuleDetails, + other.createCompliancePolicyRuleDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createCompliancePolicyRuleDetails == null + ? 43 + : this.createCompliancePolicyRuleDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateFleetCredentialRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateFleetCredentialRequest.java new file mode 100644 index 00000000000..3125f3b26dd --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateFleetCredentialRequest.java @@ -0,0 +1,317 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use CreateFleetCredentialRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateFleetCredentialRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.CreateFleetCredentialDetails> { + + /** + * Details for the new FleetCredential. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreateFleetCredentialDetails + createFleetCredentialDetails; + + /** + * Details for the new FleetCredential. + */ + public com.oracle.bmc.fleetappsmanagement.model.CreateFleetCredentialDetails + getCreateFleetCredentialDetails() { + return createFleetCredentialDetails; + } + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.CreateFleetCredentialDetails getBody$() { + return createFleetCredentialDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateFleetCredentialRequest, + com.oracle.bmc.fleetappsmanagement.model.CreateFleetCredentialDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new FleetCredential. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreateFleetCredentialDetails + createFleetCredentialDetails = null; + + /** + * Details for the new FleetCredential. + * @param createFleetCredentialDetails the value to set + * @return this builder instance + */ + public Builder createFleetCredentialDetails( + com.oracle.bmc.fleetappsmanagement.model.CreateFleetCredentialDetails + createFleetCredentialDetails) { + this.createFleetCredentialDetails = createFleetCredentialDetails; + return this; + } + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateFleetCredentialRequest o) { + createFleetCredentialDetails(o.getCreateFleetCredentialDetails()); + fleetId(o.getFleetId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateFleetCredentialRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateFleetCredentialRequest + */ + public CreateFleetCredentialRequest build() { + CreateFleetCredentialRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.CreateFleetCredentialDetails body) { + createFleetCredentialDetails(body); + return this; + } + + /** + * Build the instance of CreateFleetCredentialRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateFleetCredentialRequest + */ + public CreateFleetCredentialRequest buildWithoutInvocationCallback() { + CreateFleetCredentialRequest request = new CreateFleetCredentialRequest(); + request.createFleetCredentialDetails = createFleetCredentialDetails; + request.fleetId = fleetId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateFleetCredentialRequest(createFleetCredentialDetails, fleetId, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createFleetCredentialDetails(createFleetCredentialDetails) + .fleetId(fleetId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createFleetCredentialDetails=") + .append(String.valueOf(this.createFleetCredentialDetails)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateFleetCredentialRequest)) { + return false; + } + + CreateFleetCredentialRequest other = (CreateFleetCredentialRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createFleetCredentialDetails, other.createFleetCredentialDetails) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createFleetCredentialDetails == null + ? 43 + : this.createFleetCredentialDetails.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateFleetPropertyRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateFleetPropertyRequest.java new file mode 100644 index 00000000000..b9a29cf0ab5 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateFleetPropertyRequest.java @@ -0,0 +1,317 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use CreateFleetPropertyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateFleetPropertyRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.CreateFleetPropertyDetails> { + + /** + * Details for the new FleetProperty. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreateFleetPropertyDetails + createFleetPropertyDetails; + + /** + * Details for the new FleetProperty. + */ + public com.oracle.bmc.fleetappsmanagement.model.CreateFleetPropertyDetails + getCreateFleetPropertyDetails() { + return createFleetPropertyDetails; + } + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.CreateFleetPropertyDetails getBody$() { + return createFleetPropertyDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateFleetPropertyRequest, + com.oracle.bmc.fleetappsmanagement.model.CreateFleetPropertyDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new FleetProperty. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreateFleetPropertyDetails + createFleetPropertyDetails = null; + + /** + * Details for the new FleetProperty. + * @param createFleetPropertyDetails the value to set + * @return this builder instance + */ + public Builder createFleetPropertyDetails( + com.oracle.bmc.fleetappsmanagement.model.CreateFleetPropertyDetails + createFleetPropertyDetails) { + this.createFleetPropertyDetails = createFleetPropertyDetails; + return this; + } + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateFleetPropertyRequest o) { + createFleetPropertyDetails(o.getCreateFleetPropertyDetails()); + fleetId(o.getFleetId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateFleetPropertyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateFleetPropertyRequest + */ + public CreateFleetPropertyRequest build() { + CreateFleetPropertyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.CreateFleetPropertyDetails body) { + createFleetPropertyDetails(body); + return this; + } + + /** + * Build the instance of CreateFleetPropertyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateFleetPropertyRequest + */ + public CreateFleetPropertyRequest buildWithoutInvocationCallback() { + CreateFleetPropertyRequest request = new CreateFleetPropertyRequest(); + request.createFleetPropertyDetails = createFleetPropertyDetails; + request.fleetId = fleetId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateFleetPropertyRequest(createFleetPropertyDetails, fleetId, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createFleetPropertyDetails(createFleetPropertyDetails) + .fleetId(fleetId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createFleetPropertyDetails=") + .append(String.valueOf(this.createFleetPropertyDetails)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateFleetPropertyRequest)) { + return false; + } + + CreateFleetPropertyRequest other = (CreateFleetPropertyRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createFleetPropertyDetails, other.createFleetPropertyDetails) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createFleetPropertyDetails == null + ? 43 + : this.createFleetPropertyDetails.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateFleetRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateFleetRequest.java new file mode 100644 index 00000000000..05e53eba44f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateFleetRequest.java @@ -0,0 +1,279 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use CreateFleetRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateFleetRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.CreateFleetDetails> { + + /** + * Details for the new Fleet. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreateFleetDetails createFleetDetails; + + /** + * Details for the new Fleet. + */ + public com.oracle.bmc.fleetappsmanagement.model.CreateFleetDetails getCreateFleetDetails() { + return createFleetDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.CreateFleetDetails getBody$() { + return createFleetDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateFleetRequest, + com.oracle.bmc.fleetappsmanagement.model.CreateFleetDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new Fleet. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreateFleetDetails createFleetDetails = + null; + + /** + * Details for the new Fleet. + * @param createFleetDetails the value to set + * @return this builder instance + */ + public Builder createFleetDetails( + com.oracle.bmc.fleetappsmanagement.model.CreateFleetDetails createFleetDetails) { + this.createFleetDetails = createFleetDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateFleetRequest o) { + createFleetDetails(o.getCreateFleetDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateFleetRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateFleetRequest + */ + public CreateFleetRequest build() { + CreateFleetRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.fleetappsmanagement.model.CreateFleetDetails body) { + createFleetDetails(body); + return this; + } + + /** + * Build the instance of CreateFleetRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateFleetRequest + */ + public CreateFleetRequest buildWithoutInvocationCallback() { + CreateFleetRequest request = new CreateFleetRequest(); + request.createFleetDetails = createFleetDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateFleetRequest(createFleetDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createFleetDetails(createFleetDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createFleetDetails=").append(String.valueOf(this.createFleetDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateFleetRequest)) { + return false; + } + + CreateFleetRequest other = (CreateFleetRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.createFleetDetails, other.createFleetDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createFleetDetails == null + ? 43 + : this.createFleetDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateFleetResourceRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateFleetResourceRequest.java new file mode 100644 index 00000000000..6dea224f8ce --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateFleetResourceRequest.java @@ -0,0 +1,317 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use CreateFleetResourceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateFleetResourceRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.CreateFleetResourceDetails> { + + /** + * Details for the new FleetResource. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreateFleetResourceDetails + createFleetResourceDetails; + + /** + * Details for the new FleetResource. + */ + public com.oracle.bmc.fleetappsmanagement.model.CreateFleetResourceDetails + getCreateFleetResourceDetails() { + return createFleetResourceDetails; + } + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.CreateFleetResourceDetails getBody$() { + return createFleetResourceDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateFleetResourceRequest, + com.oracle.bmc.fleetappsmanagement.model.CreateFleetResourceDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new FleetResource. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreateFleetResourceDetails + createFleetResourceDetails = null; + + /** + * Details for the new FleetResource. + * @param createFleetResourceDetails the value to set + * @return this builder instance + */ + public Builder createFleetResourceDetails( + com.oracle.bmc.fleetappsmanagement.model.CreateFleetResourceDetails + createFleetResourceDetails) { + this.createFleetResourceDetails = createFleetResourceDetails; + return this; + } + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateFleetResourceRequest o) { + createFleetResourceDetails(o.getCreateFleetResourceDetails()); + fleetId(o.getFleetId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateFleetResourceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateFleetResourceRequest + */ + public CreateFleetResourceRequest build() { + CreateFleetResourceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.CreateFleetResourceDetails body) { + createFleetResourceDetails(body); + return this; + } + + /** + * Build the instance of CreateFleetResourceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateFleetResourceRequest + */ + public CreateFleetResourceRequest buildWithoutInvocationCallback() { + CreateFleetResourceRequest request = new CreateFleetResourceRequest(); + request.createFleetResourceDetails = createFleetResourceDetails; + request.fleetId = fleetId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateFleetResourceRequest(createFleetResourceDetails, fleetId, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createFleetResourceDetails(createFleetResourceDetails) + .fleetId(fleetId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createFleetResourceDetails=") + .append(String.valueOf(this.createFleetResourceDetails)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateFleetResourceRequest)) { + return false; + } + + CreateFleetResourceRequest other = (CreateFleetResourceRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createFleetResourceDetails, other.createFleetResourceDetails) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createFleetResourceDetails == null + ? 43 + : this.createFleetResourceDetails.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateMaintenanceWindowRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateMaintenanceWindowRequest.java new file mode 100644 index 00000000000..61b38deae22 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateMaintenanceWindowRequest.java @@ -0,0 +1,285 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use CreateMaintenanceWindowRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateMaintenanceWindowRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.CreateMaintenanceWindowDetails> { + + /** + * Details for the new MaintenanceWindow. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreateMaintenanceWindowDetails + createMaintenanceWindowDetails; + + /** + * Details for the new MaintenanceWindow. + */ + public com.oracle.bmc.fleetappsmanagement.model.CreateMaintenanceWindowDetails + getCreateMaintenanceWindowDetails() { + return createMaintenanceWindowDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.CreateMaintenanceWindowDetails getBody$() { + return createMaintenanceWindowDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateMaintenanceWindowRequest, + com.oracle.bmc.fleetappsmanagement.model.CreateMaintenanceWindowDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new MaintenanceWindow. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreateMaintenanceWindowDetails + createMaintenanceWindowDetails = null; + + /** + * Details for the new MaintenanceWindow. + * @param createMaintenanceWindowDetails the value to set + * @return this builder instance + */ + public Builder createMaintenanceWindowDetails( + com.oracle.bmc.fleetappsmanagement.model.CreateMaintenanceWindowDetails + createMaintenanceWindowDetails) { + this.createMaintenanceWindowDetails = createMaintenanceWindowDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateMaintenanceWindowRequest o) { + createMaintenanceWindowDetails(o.getCreateMaintenanceWindowDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateMaintenanceWindowRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateMaintenanceWindowRequest + */ + public CreateMaintenanceWindowRequest build() { + CreateMaintenanceWindowRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.CreateMaintenanceWindowDetails body) { + createMaintenanceWindowDetails(body); + return this; + } + + /** + * Build the instance of CreateMaintenanceWindowRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateMaintenanceWindowRequest + */ + public CreateMaintenanceWindowRequest buildWithoutInvocationCallback() { + CreateMaintenanceWindowRequest request = new CreateMaintenanceWindowRequest(); + request.createMaintenanceWindowDetails = createMaintenanceWindowDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateMaintenanceWindowRequest(createMaintenanceWindowDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createMaintenanceWindowDetails(createMaintenanceWindowDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createMaintenanceWindowDetails=") + .append(String.valueOf(this.createMaintenanceWindowDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateMaintenanceWindowRequest)) { + return false; + } + + CreateMaintenanceWindowRequest other = (CreateMaintenanceWindowRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createMaintenanceWindowDetails, other.createMaintenanceWindowDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createMaintenanceWindowDetails == null + ? 43 + : this.createMaintenanceWindowDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateOnboardingRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateOnboardingRequest.java new file mode 100644 index 00000000000..2ca10ccc4bb --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateOnboardingRequest.java @@ -0,0 +1,284 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use CreateOnboardingRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateOnboardingRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.CreateOnboardingDetails> { + + /** + * Details for onboarding Fleet Application Management. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreateOnboardingDetails + createOnboardingDetails; + + /** + * Details for onboarding Fleet Application Management. + */ + public com.oracle.bmc.fleetappsmanagement.model.CreateOnboardingDetails + getCreateOnboardingDetails() { + return createOnboardingDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.CreateOnboardingDetails getBody$() { + return createOnboardingDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateOnboardingRequest, + com.oracle.bmc.fleetappsmanagement.model.CreateOnboardingDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for onboarding Fleet Application Management. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreateOnboardingDetails + createOnboardingDetails = null; + + /** + * Details for onboarding Fleet Application Management. + * @param createOnboardingDetails the value to set + * @return this builder instance + */ + public Builder createOnboardingDetails( + com.oracle.bmc.fleetappsmanagement.model.CreateOnboardingDetails + createOnboardingDetails) { + this.createOnboardingDetails = createOnboardingDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateOnboardingRequest o) { + createOnboardingDetails(o.getCreateOnboardingDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateOnboardingRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateOnboardingRequest + */ + public CreateOnboardingRequest build() { + CreateOnboardingRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.CreateOnboardingDetails body) { + createOnboardingDetails(body); + return this; + } + + /** + * Build the instance of CreateOnboardingRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateOnboardingRequest + */ + public CreateOnboardingRequest buildWithoutInvocationCallback() { + CreateOnboardingRequest request = new CreateOnboardingRequest(); + request.createOnboardingDetails = createOnboardingDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateOnboardingRequest(createOnboardingDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createOnboardingDetails(createOnboardingDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createOnboardingDetails=").append(String.valueOf(this.createOnboardingDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateOnboardingRequest)) { + return false; + } + + CreateOnboardingRequest other = (CreateOnboardingRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createOnboardingDetails, other.createOnboardingDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createOnboardingDetails == null + ? 43 + : this.createOnboardingDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreatePatchRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreatePatchRequest.java new file mode 100644 index 00000000000..f8fbd71a675 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreatePatchRequest.java @@ -0,0 +1,279 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use CreatePatchRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreatePatchRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.CreatePatchDetails> { + + /** + * Details for the new Patch. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreatePatchDetails createPatchDetails; + + /** + * Details for the new Patch. + */ + public com.oracle.bmc.fleetappsmanagement.model.CreatePatchDetails getCreatePatchDetails() { + return createPatchDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.CreatePatchDetails getBody$() { + return createPatchDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreatePatchRequest, + com.oracle.bmc.fleetappsmanagement.model.CreatePatchDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new Patch. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreatePatchDetails createPatchDetails = + null; + + /** + * Details for the new Patch. + * @param createPatchDetails the value to set + * @return this builder instance + */ + public Builder createPatchDetails( + com.oracle.bmc.fleetappsmanagement.model.CreatePatchDetails createPatchDetails) { + this.createPatchDetails = createPatchDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreatePatchRequest o) { + createPatchDetails(o.getCreatePatchDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreatePatchRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreatePatchRequest + */ + public CreatePatchRequest build() { + CreatePatchRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.fleetappsmanagement.model.CreatePatchDetails body) { + createPatchDetails(body); + return this; + } + + /** + * Build the instance of CreatePatchRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreatePatchRequest + */ + public CreatePatchRequest buildWithoutInvocationCallback() { + CreatePatchRequest request = new CreatePatchRequest(); + request.createPatchDetails = createPatchDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreatePatchRequest(createPatchDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createPatchDetails(createPatchDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createPatchDetails=").append(String.valueOf(this.createPatchDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreatePatchRequest)) { + return false; + } + + CreatePatchRequest other = (CreatePatchRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.createPatchDetails, other.createPatchDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createPatchDetails == null + ? 43 + : this.createPatchDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreatePlatformConfigurationRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreatePlatformConfigurationRequest.java new file mode 100644 index 00000000000..a8a2c4489b8 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreatePlatformConfigurationRequest.java @@ -0,0 +1,286 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use CreatePlatformConfigurationRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreatePlatformConfigurationRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.CreatePlatformConfigurationDetails> { + + /** + * Details for the new PlatformConfiguration. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreatePlatformConfigurationDetails + createPlatformConfigurationDetails; + + /** + * Details for the new PlatformConfiguration. + */ + public com.oracle.bmc.fleetappsmanagement.model.CreatePlatformConfigurationDetails + getCreatePlatformConfigurationDetails() { + return createPlatformConfigurationDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.CreatePlatformConfigurationDetails getBody$() { + return createPlatformConfigurationDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreatePlatformConfigurationRequest, + com.oracle.bmc.fleetappsmanagement.model.CreatePlatformConfigurationDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new PlatformConfiguration. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreatePlatformConfigurationDetails + createPlatformConfigurationDetails = null; + + /** + * Details for the new PlatformConfiguration. + * @param createPlatformConfigurationDetails the value to set + * @return this builder instance + */ + public Builder createPlatformConfigurationDetails( + com.oracle.bmc.fleetappsmanagement.model.CreatePlatformConfigurationDetails + createPlatformConfigurationDetails) { + this.createPlatformConfigurationDetails = createPlatformConfigurationDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreatePlatformConfigurationRequest o) { + createPlatformConfigurationDetails(o.getCreatePlatformConfigurationDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreatePlatformConfigurationRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreatePlatformConfigurationRequest + */ + public CreatePlatformConfigurationRequest build() { + CreatePlatformConfigurationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.CreatePlatformConfigurationDetails body) { + createPlatformConfigurationDetails(body); + return this; + } + + /** + * Build the instance of CreatePlatformConfigurationRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreatePlatformConfigurationRequest + */ + public CreatePlatformConfigurationRequest buildWithoutInvocationCallback() { + CreatePlatformConfigurationRequest request = new CreatePlatformConfigurationRequest(); + request.createPlatformConfigurationDetails = createPlatformConfigurationDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreatePlatformConfigurationRequest(createPlatformConfigurationDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createPlatformConfigurationDetails(createPlatformConfigurationDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createPlatformConfigurationDetails=") + .append(String.valueOf(this.createPlatformConfigurationDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreatePlatformConfigurationRequest)) { + return false; + } + + CreatePlatformConfigurationRequest other = (CreatePlatformConfigurationRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createPlatformConfigurationDetails, + other.createPlatformConfigurationDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createPlatformConfigurationDetails == null + ? 43 + : this.createPlatformConfigurationDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreatePropertyRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreatePropertyRequest.java new file mode 100644 index 00000000000..0b4eb776756 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreatePropertyRequest.java @@ -0,0 +1,281 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use CreatePropertyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreatePropertyRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.CreatePropertyDetails> { + + /** + * Details for the new Property. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreatePropertyDetails createPropertyDetails; + + /** + * Details for the new Property. + */ + public com.oracle.bmc.fleetappsmanagement.model.CreatePropertyDetails + getCreatePropertyDetails() { + return createPropertyDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.CreatePropertyDetails getBody$() { + return createPropertyDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreatePropertyRequest, + com.oracle.bmc.fleetappsmanagement.model.CreatePropertyDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new Property. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreatePropertyDetails + createPropertyDetails = null; + + /** + * Details for the new Property. + * @param createPropertyDetails the value to set + * @return this builder instance + */ + public Builder createPropertyDetails( + com.oracle.bmc.fleetappsmanagement.model.CreatePropertyDetails + createPropertyDetails) { + this.createPropertyDetails = createPropertyDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreatePropertyRequest o) { + createPropertyDetails(o.getCreatePropertyDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreatePropertyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreatePropertyRequest + */ + public CreatePropertyRequest build() { + CreatePropertyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.fleetappsmanagement.model.CreatePropertyDetails body) { + createPropertyDetails(body); + return this; + } + + /** + * Build the instance of CreatePropertyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreatePropertyRequest + */ + public CreatePropertyRequest buildWithoutInvocationCallback() { + CreatePropertyRequest request = new CreatePropertyRequest(); + request.createPropertyDetails = createPropertyDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreatePropertyRequest(createPropertyDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createPropertyDetails(createPropertyDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createPropertyDetails=").append(String.valueOf(this.createPropertyDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreatePropertyRequest)) { + return false; + } + + CreatePropertyRequest other = (CreatePropertyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.createPropertyDetails, other.createPropertyDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createPropertyDetails == null + ? 43 + : this.createPropertyDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateRunbookRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateRunbookRequest.java new file mode 100644 index 00000000000..089bc823d47 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateRunbookRequest.java @@ -0,0 +1,280 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use CreateRunbookRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateRunbookRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.CreateRunbookDetails> { + + /** + * Details for the new Runbook. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreateRunbookDetails createRunbookDetails; + + /** + * Details for the new Runbook. + */ + public com.oracle.bmc.fleetappsmanagement.model.CreateRunbookDetails getCreateRunbookDetails() { + return createRunbookDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.CreateRunbookDetails getBody$() { + return createRunbookDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateRunbookRequest, + com.oracle.bmc.fleetappsmanagement.model.CreateRunbookDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new Runbook. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreateRunbookDetails createRunbookDetails = + null; + + /** + * Details for the new Runbook. + * @param createRunbookDetails the value to set + * @return this builder instance + */ + public Builder createRunbookDetails( + com.oracle.bmc.fleetappsmanagement.model.CreateRunbookDetails + createRunbookDetails) { + this.createRunbookDetails = createRunbookDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateRunbookRequest o) { + createRunbookDetails(o.getCreateRunbookDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateRunbookRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateRunbookRequest + */ + public CreateRunbookRequest build() { + CreateRunbookRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.fleetappsmanagement.model.CreateRunbookDetails body) { + createRunbookDetails(body); + return this; + } + + /** + * Build the instance of CreateRunbookRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateRunbookRequest + */ + public CreateRunbookRequest buildWithoutInvocationCallback() { + CreateRunbookRequest request = new CreateRunbookRequest(); + request.createRunbookDetails = createRunbookDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateRunbookRequest(createRunbookDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createRunbookDetails(createRunbookDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createRunbookDetails=").append(String.valueOf(this.createRunbookDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateRunbookRequest)) { + return false; + } + + CreateRunbookRequest other = (CreateRunbookRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.createRunbookDetails, other.createRunbookDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createRunbookDetails == null + ? 43 + : this.createRunbookDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateSchedulerDefinitionRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateSchedulerDefinitionRequest.java new file mode 100644 index 00000000000..6ece54d58d2 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateSchedulerDefinitionRequest.java @@ -0,0 +1,286 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use CreateSchedulerDefinitionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateSchedulerDefinitionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.CreateSchedulerDefinitionDetails> { + + /** + * Details for the new SchedulerDefinition. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreateSchedulerDefinitionDetails + createSchedulerDefinitionDetails; + + /** + * Details for the new SchedulerDefinition. + */ + public com.oracle.bmc.fleetappsmanagement.model.CreateSchedulerDefinitionDetails + getCreateSchedulerDefinitionDetails() { + return createSchedulerDefinitionDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.CreateSchedulerDefinitionDetails getBody$() { + return createSchedulerDefinitionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateSchedulerDefinitionRequest, + com.oracle.bmc.fleetappsmanagement.model.CreateSchedulerDefinitionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new SchedulerDefinition. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreateSchedulerDefinitionDetails + createSchedulerDefinitionDetails = null; + + /** + * Details for the new SchedulerDefinition. + * @param createSchedulerDefinitionDetails the value to set + * @return this builder instance + */ + public Builder createSchedulerDefinitionDetails( + com.oracle.bmc.fleetappsmanagement.model.CreateSchedulerDefinitionDetails + createSchedulerDefinitionDetails) { + this.createSchedulerDefinitionDetails = createSchedulerDefinitionDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateSchedulerDefinitionRequest o) { + createSchedulerDefinitionDetails(o.getCreateSchedulerDefinitionDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateSchedulerDefinitionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateSchedulerDefinitionRequest + */ + public CreateSchedulerDefinitionRequest build() { + CreateSchedulerDefinitionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.CreateSchedulerDefinitionDetails body) { + createSchedulerDefinitionDetails(body); + return this; + } + + /** + * Build the instance of CreateSchedulerDefinitionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateSchedulerDefinitionRequest + */ + public CreateSchedulerDefinitionRequest buildWithoutInvocationCallback() { + CreateSchedulerDefinitionRequest request = new CreateSchedulerDefinitionRequest(); + request.createSchedulerDefinitionDetails = createSchedulerDefinitionDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateSchedulerDefinitionRequest(createSchedulerDefinitionDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createSchedulerDefinitionDetails(createSchedulerDefinitionDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createSchedulerDefinitionDetails=") + .append(String.valueOf(this.createSchedulerDefinitionDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSchedulerDefinitionRequest)) { + return false; + } + + CreateSchedulerDefinitionRequest other = (CreateSchedulerDefinitionRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createSchedulerDefinitionDetails, + other.createSchedulerDefinitionDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createSchedulerDefinitionDetails == null + ? 43 + : this.createSchedulerDefinitionDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateTaskRecordRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateTaskRecordRequest.java new file mode 100644 index 00000000000..453c2c50c59 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/CreateTaskRecordRequest.java @@ -0,0 +1,284 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use CreateTaskRecordRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateTaskRecordRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.CreateTaskRecordDetails> { + + /** + * Details for the new TaskRecord. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreateTaskRecordDetails + createTaskRecordDetails; + + /** + * Details for the new TaskRecord. + */ + public com.oracle.bmc.fleetappsmanagement.model.CreateTaskRecordDetails + getCreateTaskRecordDetails() { + return createTaskRecordDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.CreateTaskRecordDetails getBody$() { + return createTaskRecordDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateTaskRecordRequest, + com.oracle.bmc.fleetappsmanagement.model.CreateTaskRecordDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new TaskRecord. + */ + private com.oracle.bmc.fleetappsmanagement.model.CreateTaskRecordDetails + createTaskRecordDetails = null; + + /** + * Details for the new TaskRecord. + * @param createTaskRecordDetails the value to set + * @return this builder instance + */ + public Builder createTaskRecordDetails( + com.oracle.bmc.fleetappsmanagement.model.CreateTaskRecordDetails + createTaskRecordDetails) { + this.createTaskRecordDetails = createTaskRecordDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateTaskRecordRequest o) { + createTaskRecordDetails(o.getCreateTaskRecordDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateTaskRecordRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateTaskRecordRequest + */ + public CreateTaskRecordRequest build() { + CreateTaskRecordRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.CreateTaskRecordDetails body) { + createTaskRecordDetails(body); + return this; + } + + /** + * Build the instance of CreateTaskRecordRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateTaskRecordRequest + */ + public CreateTaskRecordRequest buildWithoutInvocationCallback() { + CreateTaskRecordRequest request = new CreateTaskRecordRequest(); + request.createTaskRecordDetails = createTaskRecordDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateTaskRecordRequest(createTaskRecordDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createTaskRecordDetails(createTaskRecordDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createTaskRecordDetails=").append(String.valueOf(this.createTaskRecordDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateTaskRecordRequest)) { + return false; + } + + CreateTaskRecordRequest other = (CreateTaskRecordRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createTaskRecordDetails, other.createTaskRecordDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createTaskRecordDetails == null + ? 43 + : this.createTaskRecordDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteCompliancePolicyRuleRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteCompliancePolicyRuleRequest.java new file mode 100644 index 00000000000..77fbfc9ca58 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteCompliancePolicyRuleRequest.java @@ -0,0 +1,253 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use DeleteCompliancePolicyRuleRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteCompliancePolicyRuleRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique CompliancePolicyRule identifier. + */ + private String compliancePolicyRuleId; + + /** + * unique CompliancePolicyRule identifier. + */ + public String getCompliancePolicyRuleId() { + return compliancePolicyRuleId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteCompliancePolicyRuleRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique CompliancePolicyRule identifier. + */ + private String compliancePolicyRuleId = null; + + /** + * unique CompliancePolicyRule identifier. + * @param compliancePolicyRuleId the value to set + * @return this builder instance + */ + public Builder compliancePolicyRuleId(String compliancePolicyRuleId) { + this.compliancePolicyRuleId = compliancePolicyRuleId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteCompliancePolicyRuleRequest o) { + compliancePolicyRuleId(o.getCompliancePolicyRuleId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteCompliancePolicyRuleRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteCompliancePolicyRuleRequest + */ + public DeleteCompliancePolicyRuleRequest build() { + DeleteCompliancePolicyRuleRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteCompliancePolicyRuleRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteCompliancePolicyRuleRequest + */ + public DeleteCompliancePolicyRuleRequest buildWithoutInvocationCallback() { + DeleteCompliancePolicyRuleRequest request = new DeleteCompliancePolicyRuleRequest(); + request.compliancePolicyRuleId = compliancePolicyRuleId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteCompliancePolicyRuleRequest(compliancePolicyRuleId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compliancePolicyRuleId(compliancePolicyRuleId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compliancePolicyRuleId=").append(String.valueOf(this.compliancePolicyRuleId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteCompliancePolicyRuleRequest)) { + return false; + } + + DeleteCompliancePolicyRuleRequest other = (DeleteCompliancePolicyRuleRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.compliancePolicyRuleId, other.compliancePolicyRuleId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compliancePolicyRuleId == null + ? 43 + : this.compliancePolicyRuleId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteFleetCredentialRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteFleetCredentialRequest.java new file mode 100644 index 00000000000..2d5aa21aac9 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteFleetCredentialRequest.java @@ -0,0 +1,282 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use DeleteFleetCredentialRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteFleetCredentialRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique FleetCredential identifier + */ + private String fleetCredentialId; + + /** + * unique FleetCredential identifier + */ + public String getFleetCredentialId() { + return fleetCredentialId; + } + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteFleetCredentialRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique FleetCredential identifier + */ + private String fleetCredentialId = null; + + /** + * unique FleetCredential identifier + * @param fleetCredentialId the value to set + * @return this builder instance + */ + public Builder fleetCredentialId(String fleetCredentialId) { + this.fleetCredentialId = fleetCredentialId; + return this; + } + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteFleetCredentialRequest o) { + fleetCredentialId(o.getFleetCredentialId()); + fleetId(o.getFleetId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteFleetCredentialRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteFleetCredentialRequest + */ + public DeleteFleetCredentialRequest build() { + DeleteFleetCredentialRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteFleetCredentialRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteFleetCredentialRequest + */ + public DeleteFleetCredentialRequest buildWithoutInvocationCallback() { + DeleteFleetCredentialRequest request = new DeleteFleetCredentialRequest(); + request.fleetCredentialId = fleetCredentialId; + request.fleetId = fleetId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteFleetCredentialRequest(fleetCredentialId, fleetId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fleetCredentialId(fleetCredentialId) + .fleetId(fleetId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fleetCredentialId=").append(String.valueOf(this.fleetCredentialId)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteFleetCredentialRequest)) { + return false; + } + + DeleteFleetCredentialRequest other = (DeleteFleetCredentialRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fleetCredentialId, other.fleetCredentialId) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.fleetCredentialId == null ? 43 : this.fleetCredentialId.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteFleetPropertyRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteFleetPropertyRequest.java new file mode 100644 index 00000000000..00474dd9515 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteFleetPropertyRequest.java @@ -0,0 +1,281 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use DeleteFleetPropertyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteFleetPropertyRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique FleetProperty identifier. + */ + private String fleetPropertyId; + + /** + * unique FleetProperty identifier. + */ + public String getFleetPropertyId() { + return fleetPropertyId; + } + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteFleetPropertyRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique FleetProperty identifier. + */ + private String fleetPropertyId = null; + + /** + * unique FleetProperty identifier. + * @param fleetPropertyId the value to set + * @return this builder instance + */ + public Builder fleetPropertyId(String fleetPropertyId) { + this.fleetPropertyId = fleetPropertyId; + return this; + } + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteFleetPropertyRequest o) { + fleetPropertyId(o.getFleetPropertyId()); + fleetId(o.getFleetId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteFleetPropertyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteFleetPropertyRequest + */ + public DeleteFleetPropertyRequest build() { + DeleteFleetPropertyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteFleetPropertyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteFleetPropertyRequest + */ + public DeleteFleetPropertyRequest buildWithoutInvocationCallback() { + DeleteFleetPropertyRequest request = new DeleteFleetPropertyRequest(); + request.fleetPropertyId = fleetPropertyId; + request.fleetId = fleetId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteFleetPropertyRequest(fleetPropertyId, fleetId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fleetPropertyId(fleetPropertyId) + .fleetId(fleetId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fleetPropertyId=").append(String.valueOf(this.fleetPropertyId)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteFleetPropertyRequest)) { + return false; + } + + DeleteFleetPropertyRequest other = (DeleteFleetPropertyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fleetPropertyId, other.fleetPropertyId) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.fleetPropertyId == null ? 43 : this.fleetPropertyId.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteFleetRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteFleetRequest.java new file mode 100644 index 00000000000..da9dd9681b6 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteFleetRequest.java @@ -0,0 +1,244 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use DeleteFleetRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteFleetRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteFleetRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteFleetRequest o) { + fleetId(o.getFleetId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteFleetRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteFleetRequest + */ + public DeleteFleetRequest build() { + DeleteFleetRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteFleetRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteFleetRequest + */ + public DeleteFleetRequest buildWithoutInvocationCallback() { + DeleteFleetRequest request = new DeleteFleetRequest(); + request.fleetId = fleetId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteFleetRequest(fleetId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().fleetId(fleetId).ifMatch(ifMatch).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteFleetRequest)) { + return false; + } + + DeleteFleetRequest other = (DeleteFleetRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteFleetResourceRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteFleetResourceRequest.java new file mode 100644 index 00000000000..5e8b3af5c06 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteFleetResourceRequest.java @@ -0,0 +1,281 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use DeleteFleetResourceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteFleetResourceRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique FleetResource identifier + */ + private String fleetResourceId; + + /** + * unique FleetResource identifier + */ + public String getFleetResourceId() { + return fleetResourceId; + } + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteFleetResourceRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique FleetResource identifier + */ + private String fleetResourceId = null; + + /** + * unique FleetResource identifier + * @param fleetResourceId the value to set + * @return this builder instance + */ + public Builder fleetResourceId(String fleetResourceId) { + this.fleetResourceId = fleetResourceId; + return this; + } + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteFleetResourceRequest o) { + fleetResourceId(o.getFleetResourceId()); + fleetId(o.getFleetId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteFleetResourceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteFleetResourceRequest + */ + public DeleteFleetResourceRequest build() { + DeleteFleetResourceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteFleetResourceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteFleetResourceRequest + */ + public DeleteFleetResourceRequest buildWithoutInvocationCallback() { + DeleteFleetResourceRequest request = new DeleteFleetResourceRequest(); + request.fleetResourceId = fleetResourceId; + request.fleetId = fleetId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteFleetResourceRequest(fleetResourceId, fleetId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fleetResourceId(fleetResourceId) + .fleetId(fleetId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fleetResourceId=").append(String.valueOf(this.fleetResourceId)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteFleetResourceRequest)) { + return false; + } + + DeleteFleetResourceRequest other = (DeleteFleetResourceRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fleetResourceId, other.fleetResourceId) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.fleetResourceId == null ? 43 : this.fleetResourceId.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteMaintenanceWindowRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteMaintenanceWindowRequest.java new file mode 100644 index 00000000000..e259d4eef21 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteMaintenanceWindowRequest.java @@ -0,0 +1,252 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use DeleteMaintenanceWindowRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteMaintenanceWindowRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique MaintenanceWindow identifier + */ + private String maintenanceWindowId; + + /** + * unique MaintenanceWindow identifier + */ + public String getMaintenanceWindowId() { + return maintenanceWindowId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteMaintenanceWindowRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique MaintenanceWindow identifier + */ + private String maintenanceWindowId = null; + + /** + * unique MaintenanceWindow identifier + * @param maintenanceWindowId the value to set + * @return this builder instance + */ + public Builder maintenanceWindowId(String maintenanceWindowId) { + this.maintenanceWindowId = maintenanceWindowId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteMaintenanceWindowRequest o) { + maintenanceWindowId(o.getMaintenanceWindowId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteMaintenanceWindowRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteMaintenanceWindowRequest + */ + public DeleteMaintenanceWindowRequest build() { + DeleteMaintenanceWindowRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteMaintenanceWindowRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteMaintenanceWindowRequest + */ + public DeleteMaintenanceWindowRequest buildWithoutInvocationCallback() { + DeleteMaintenanceWindowRequest request = new DeleteMaintenanceWindowRequest(); + request.maintenanceWindowId = maintenanceWindowId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteMaintenanceWindowRequest(maintenanceWindowId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .maintenanceWindowId(maintenanceWindowId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",maintenanceWindowId=").append(String.valueOf(this.maintenanceWindowId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteMaintenanceWindowRequest)) { + return false; + } + + DeleteMaintenanceWindowRequest other = (DeleteMaintenanceWindowRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.maintenanceWindowId, other.maintenanceWindowId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.maintenanceWindowId == null + ? 43 + : this.maintenanceWindowId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteOnboardingRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteOnboardingRequest.java new file mode 100644 index 00000000000..4b59f46d9e2 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteOnboardingRequest.java @@ -0,0 +1,244 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use DeleteOnboardingRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteOnboardingRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * A filter to return resources whose Onboarding identifier matches the given identifier. + */ + private String onboardingId; + + /** + * A filter to return resources whose Onboarding identifier matches the given identifier. + */ + public String getOnboardingId() { + return onboardingId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteOnboardingRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * A filter to return resources whose Onboarding identifier matches the given identifier. + */ + private String onboardingId = null; + + /** + * A filter to return resources whose Onboarding identifier matches the given identifier. + * @param onboardingId the value to set + * @return this builder instance + */ + public Builder onboardingId(String onboardingId) { + this.onboardingId = onboardingId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteOnboardingRequest o) { + onboardingId(o.getOnboardingId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteOnboardingRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteOnboardingRequest + */ + public DeleteOnboardingRequest build() { + DeleteOnboardingRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteOnboardingRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteOnboardingRequest + */ + public DeleteOnboardingRequest buildWithoutInvocationCallback() { + DeleteOnboardingRequest request = new DeleteOnboardingRequest(); + request.onboardingId = onboardingId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteOnboardingRequest(onboardingId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().onboardingId(onboardingId).ifMatch(ifMatch).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",onboardingId=").append(String.valueOf(this.onboardingId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteOnboardingRequest)) { + return false; + } + + DeleteOnboardingRequest other = (DeleteOnboardingRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.onboardingId, other.onboardingId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.onboardingId == null ? 43 : this.onboardingId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeletePatchRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeletePatchRequest.java new file mode 100644 index 00000000000..ec3b1e53df9 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeletePatchRequest.java @@ -0,0 +1,244 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use DeletePatchRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeletePatchRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique Patch identifier + */ + private String patchId; + + /** + * unique Patch identifier + */ + public String getPatchId() { + return patchId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeletePatchRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique Patch identifier + */ + private String patchId = null; + + /** + * unique Patch identifier + * @param patchId the value to set + * @return this builder instance + */ + public Builder patchId(String patchId) { + this.patchId = patchId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeletePatchRequest o) { + patchId(o.getPatchId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeletePatchRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeletePatchRequest + */ + public DeletePatchRequest build() { + DeletePatchRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeletePatchRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeletePatchRequest + */ + public DeletePatchRequest buildWithoutInvocationCallback() { + DeletePatchRequest request = new DeletePatchRequest(); + request.patchId = patchId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeletePatchRequest(patchId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().patchId(patchId).ifMatch(ifMatch).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",patchId=").append(String.valueOf(this.patchId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeletePatchRequest)) { + return false; + } + + DeletePatchRequest other = (DeletePatchRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.patchId, other.patchId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.patchId == null ? 43 : this.patchId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeletePlatformConfigurationRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeletePlatformConfigurationRequest.java new file mode 100644 index 00000000000..869a7c9f208 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeletePlatformConfigurationRequest.java @@ -0,0 +1,253 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use DeletePlatformConfigurationRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeletePlatformConfigurationRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PlatformConfiguration identifier + */ + private String platformConfigurationId; + + /** + * unique PlatformConfiguration identifier + */ + public String getPlatformConfigurationId() { + return platformConfigurationId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeletePlatformConfigurationRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PlatformConfiguration identifier + */ + private String platformConfigurationId = null; + + /** + * unique PlatformConfiguration identifier + * @param platformConfigurationId the value to set + * @return this builder instance + */ + public Builder platformConfigurationId(String platformConfigurationId) { + this.platformConfigurationId = platformConfigurationId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeletePlatformConfigurationRequest o) { + platformConfigurationId(o.getPlatformConfigurationId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeletePlatformConfigurationRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeletePlatformConfigurationRequest + */ + public DeletePlatformConfigurationRequest build() { + DeletePlatformConfigurationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeletePlatformConfigurationRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeletePlatformConfigurationRequest + */ + public DeletePlatformConfigurationRequest buildWithoutInvocationCallback() { + DeletePlatformConfigurationRequest request = new DeletePlatformConfigurationRequest(); + request.platformConfigurationId = platformConfigurationId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeletePlatformConfigurationRequest(platformConfigurationId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .platformConfigurationId(platformConfigurationId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",platformConfigurationId=").append(String.valueOf(this.platformConfigurationId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeletePlatformConfigurationRequest)) { + return false; + } + + DeletePlatformConfigurationRequest other = (DeletePlatformConfigurationRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.platformConfigurationId, other.platformConfigurationId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.platformConfigurationId == null + ? 43 + : this.platformConfigurationId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeletePropertyRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeletePropertyRequest.java new file mode 100644 index 00000000000..d794eda2868 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeletePropertyRequest.java @@ -0,0 +1,244 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use DeletePropertyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeletePropertyRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique Property identifier + */ + private String propertyId; + + /** + * unique Property identifier + */ + public String getPropertyId() { + return propertyId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeletePropertyRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique Property identifier + */ + private String propertyId = null; + + /** + * unique Property identifier + * @param propertyId the value to set + * @return this builder instance + */ + public Builder propertyId(String propertyId) { + this.propertyId = propertyId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeletePropertyRequest o) { + propertyId(o.getPropertyId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeletePropertyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeletePropertyRequest + */ + public DeletePropertyRequest build() { + DeletePropertyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeletePropertyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeletePropertyRequest + */ + public DeletePropertyRequest buildWithoutInvocationCallback() { + DeletePropertyRequest request = new DeletePropertyRequest(); + request.propertyId = propertyId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeletePropertyRequest(propertyId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().propertyId(propertyId).ifMatch(ifMatch).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",propertyId=").append(String.valueOf(this.propertyId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeletePropertyRequest)) { + return false; + } + + DeletePropertyRequest other = (DeletePropertyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.propertyId, other.propertyId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.propertyId == null ? 43 : this.propertyId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteRunbookRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteRunbookRequest.java new file mode 100644 index 00000000000..5e08c87f354 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteRunbookRequest.java @@ -0,0 +1,244 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use DeleteRunbookRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteRunbookRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Runbook identifier + */ + private String runbookId; + + /** + * Unique Runbook identifier + */ + public String getRunbookId() { + return runbookId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteRunbookRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Runbook identifier + */ + private String runbookId = null; + + /** + * Unique Runbook identifier + * @param runbookId the value to set + * @return this builder instance + */ + public Builder runbookId(String runbookId) { + this.runbookId = runbookId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteRunbookRequest o) { + runbookId(o.getRunbookId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteRunbookRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteRunbookRequest + */ + public DeleteRunbookRequest build() { + DeleteRunbookRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteRunbookRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteRunbookRequest + */ + public DeleteRunbookRequest buildWithoutInvocationCallback() { + DeleteRunbookRequest request = new DeleteRunbookRequest(); + request.runbookId = runbookId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteRunbookRequest(runbookId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().runbookId(runbookId).ifMatch(ifMatch).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",runbookId=").append(String.valueOf(this.runbookId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteRunbookRequest)) { + return false; + } + + DeleteRunbookRequest other = (DeleteRunbookRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.runbookId, other.runbookId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.runbookId == null ? 43 : this.runbookId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteSchedulerDefinitionRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteSchedulerDefinitionRequest.java new file mode 100644 index 00000000000..ac2437b4d09 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteSchedulerDefinitionRequest.java @@ -0,0 +1,252 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use DeleteSchedulerDefinitionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteSchedulerDefinitionRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique SchedulerDefinition identifier + */ + private String schedulerDefinitionId; + + /** + * unique SchedulerDefinition identifier + */ + public String getSchedulerDefinitionId() { + return schedulerDefinitionId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteSchedulerDefinitionRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique SchedulerDefinition identifier + */ + private String schedulerDefinitionId = null; + + /** + * unique SchedulerDefinition identifier + * @param schedulerDefinitionId the value to set + * @return this builder instance + */ + public Builder schedulerDefinitionId(String schedulerDefinitionId) { + this.schedulerDefinitionId = schedulerDefinitionId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteSchedulerDefinitionRequest o) { + schedulerDefinitionId(o.getSchedulerDefinitionId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteSchedulerDefinitionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteSchedulerDefinitionRequest + */ + public DeleteSchedulerDefinitionRequest build() { + DeleteSchedulerDefinitionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteSchedulerDefinitionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteSchedulerDefinitionRequest + */ + public DeleteSchedulerDefinitionRequest buildWithoutInvocationCallback() { + DeleteSchedulerDefinitionRequest request = new DeleteSchedulerDefinitionRequest(); + request.schedulerDefinitionId = schedulerDefinitionId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteSchedulerDefinitionRequest(schedulerDefinitionId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulerDefinitionId(schedulerDefinitionId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulerDefinitionId=").append(String.valueOf(this.schedulerDefinitionId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSchedulerDefinitionRequest)) { + return false; + } + + DeleteSchedulerDefinitionRequest other = (DeleteSchedulerDefinitionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulerDefinitionId, other.schedulerDefinitionId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulerDefinitionId == null + ? 43 + : this.schedulerDefinitionId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteSchedulerJobRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteSchedulerJobRequest.java new file mode 100644 index 00000000000..28e47f916dd --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteSchedulerJobRequest.java @@ -0,0 +1,249 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use DeleteSchedulerJobRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteSchedulerJobRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique SchedulerJob identifier + */ + private String schedulerJobId; + + /** + * unique SchedulerJob identifier + */ + public String getSchedulerJobId() { + return schedulerJobId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteSchedulerJobRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique SchedulerJob identifier + */ + private String schedulerJobId = null; + + /** + * unique SchedulerJob identifier + * @param schedulerJobId the value to set + * @return this builder instance + */ + public Builder schedulerJobId(String schedulerJobId) { + this.schedulerJobId = schedulerJobId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteSchedulerJobRequest o) { + schedulerJobId(o.getSchedulerJobId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteSchedulerJobRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteSchedulerJobRequest + */ + public DeleteSchedulerJobRequest build() { + DeleteSchedulerJobRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteSchedulerJobRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteSchedulerJobRequest + */ + public DeleteSchedulerJobRequest buildWithoutInvocationCallback() { + DeleteSchedulerJobRequest request = new DeleteSchedulerJobRequest(); + request.schedulerJobId = schedulerJobId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteSchedulerJobRequest(schedulerJobId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulerJobId(schedulerJobId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulerJobId=").append(String.valueOf(this.schedulerJobId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSchedulerJobRequest)) { + return false; + } + + DeleteSchedulerJobRequest other = (DeleteSchedulerJobRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulerJobId, other.schedulerJobId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulerJobId == null ? 43 : this.schedulerJobId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteTaskRecordRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteTaskRecordRequest.java new file mode 100644 index 00000000000..7e8e79f5afa --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/DeleteTaskRecordRequest.java @@ -0,0 +1,244 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use DeleteTaskRecordRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteTaskRecordRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique TaskDetail identifier + */ + private String taskRecordId; + + /** + * unique TaskDetail identifier + */ + public String getTaskRecordId() { + return taskRecordId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteTaskRecordRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique TaskDetail identifier + */ + private String taskRecordId = null; + + /** + * unique TaskDetail identifier + * @param taskRecordId the value to set + * @return this builder instance + */ + public Builder taskRecordId(String taskRecordId) { + this.taskRecordId = taskRecordId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteTaskRecordRequest o) { + taskRecordId(o.getTaskRecordId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteTaskRecordRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteTaskRecordRequest + */ + public DeleteTaskRecordRequest build() { + DeleteTaskRecordRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteTaskRecordRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteTaskRecordRequest + */ + public DeleteTaskRecordRequest buildWithoutInvocationCallback() { + DeleteTaskRecordRequest request = new DeleteTaskRecordRequest(); + request.taskRecordId = taskRecordId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteTaskRecordRequest(taskRecordId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().taskRecordId(taskRecordId).ifMatch(ifMatch).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",taskRecordId=").append(String.valueOf(this.taskRecordId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteTaskRecordRequest)) { + return false; + } + + DeleteTaskRecordRequest other = (DeleteTaskRecordRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.taskRecordId, other.taskRecordId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.taskRecordId == null ? 43 : this.taskRecordId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/EnableLatestPolicyRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/EnableLatestPolicyRequest.java new file mode 100644 index 00000000000..088ed3dd762 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/EnableLatestPolicyRequest.java @@ -0,0 +1,369 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use EnableLatestPolicyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class EnableLatestPolicyRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.EnableLatestPolicyDetails> { + + /** + * A filter to return resources whose Onboarding identifier matches the given identifier. + */ + private String onboardingId; + + /** + * A filter to return resources whose Onboarding identifier matches the given identifier. + */ + public String getOnboardingId() { + return onboardingId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.EnableLatestPolicyDetails + enableLatestPolicyDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.fleetappsmanagement.model.EnableLatestPolicyDetails + getEnableLatestPolicyDetails() { + return enableLatestPolicyDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.EnableLatestPolicyDetails getBody$() { + return enableLatestPolicyDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + EnableLatestPolicyRequest, + com.oracle.bmc.fleetappsmanagement.model.EnableLatestPolicyDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * A filter to return resources whose Onboarding identifier matches the given identifier. + */ + private String onboardingId = null; + + /** + * A filter to return resources whose Onboarding identifier matches the given identifier. + * @param onboardingId the value to set + * @return this builder instance + */ + public Builder onboardingId(String onboardingId) { + this.onboardingId = onboardingId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.EnableLatestPolicyDetails + enableLatestPolicyDetails = null; + + /** + * The information to be updated. + * @param enableLatestPolicyDetails the value to set + * @return this builder instance + */ + public Builder enableLatestPolicyDetails( + com.oracle.bmc.fleetappsmanagement.model.EnableLatestPolicyDetails + enableLatestPolicyDetails) { + this.enableLatestPolicyDetails = enableLatestPolicyDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(EnableLatestPolicyRequest o) { + onboardingId(o.getOnboardingId()); + enableLatestPolicyDetails(o.getEnableLatestPolicyDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of EnableLatestPolicyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of EnableLatestPolicyRequest + */ + public EnableLatestPolicyRequest build() { + EnableLatestPolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.EnableLatestPolicyDetails body) { + enableLatestPolicyDetails(body); + return this; + } + + /** + * Build the instance of EnableLatestPolicyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of EnableLatestPolicyRequest + */ + public EnableLatestPolicyRequest buildWithoutInvocationCallback() { + EnableLatestPolicyRequest request = new EnableLatestPolicyRequest(); + request.onboardingId = onboardingId; + request.enableLatestPolicyDetails = enableLatestPolicyDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new EnableLatestPolicyRequest(onboardingId, enableLatestPolicyDetails, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .onboardingId(onboardingId) + .enableLatestPolicyDetails(enableLatestPolicyDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",onboardingId=").append(String.valueOf(this.onboardingId)); + sb.append(",enableLatestPolicyDetails=") + .append(String.valueOf(this.enableLatestPolicyDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof EnableLatestPolicyRequest)) { + return false; + } + + EnableLatestPolicyRequest other = (EnableLatestPolicyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.onboardingId, other.onboardingId) + && java.util.Objects.equals( + this.enableLatestPolicyDetails, other.enableLatestPolicyDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.onboardingId == null ? 43 : this.onboardingId.hashCode()); + result = + (result * PRIME) + + (this.enableLatestPolicyDetails == null + ? 43 + : this.enableLatestPolicyDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ExportComplianceReportRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ExportComplianceReportRequest.java new file mode 100644 index 00000000000..4d66c05c802 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ExportComplianceReportRequest.java @@ -0,0 +1,337 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ExportComplianceReportRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ExportComplianceReportRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.ExportComplianceReportDetails> { + + /** + * Details for generating compliance report + */ + private com.oracle.bmc.fleetappsmanagement.model.ExportComplianceReportDetails + exportComplianceReportDetails; + + /** + * Details for generating compliance report + */ + public com.oracle.bmc.fleetappsmanagement.model.ExportComplianceReportDetails + getExportComplianceReportDetails() { + return exportComplianceReportDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.ExportComplianceReportDetails getBody$() { + return exportComplianceReportDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ExportComplianceReportRequest, + com.oracle.bmc.fleetappsmanagement.model.ExportComplianceReportDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for generating compliance report + */ + private com.oracle.bmc.fleetappsmanagement.model.ExportComplianceReportDetails + exportComplianceReportDetails = null; + + /** + * Details for generating compliance report + * @param exportComplianceReportDetails the value to set + * @return this builder instance + */ + public Builder exportComplianceReportDetails( + com.oracle.bmc.fleetappsmanagement.model.ExportComplianceReportDetails + exportComplianceReportDetails) { + this.exportComplianceReportDetails = exportComplianceReportDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ExportComplianceReportRequest o) { + exportComplianceReportDetails(o.getExportComplianceReportDetails()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ExportComplianceReportRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ExportComplianceReportRequest + */ + public ExportComplianceReportRequest build() { + ExportComplianceReportRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.ExportComplianceReportDetails body) { + exportComplianceReportDetails(body); + return this; + } + + /** + * Build the instance of ExportComplianceReportRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ExportComplianceReportRequest + */ + public ExportComplianceReportRequest buildWithoutInvocationCallback() { + ExportComplianceReportRequest request = new ExportComplianceReportRequest(); + request.exportComplianceReportDetails = exportComplianceReportDetails; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new ExportComplianceReportRequest(exportComplianceReportDetails, opcRetryToken, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .exportComplianceReportDetails(exportComplianceReportDetails) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",exportComplianceReportDetails=") + .append(String.valueOf(this.exportComplianceReportDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExportComplianceReportRequest)) { + return false; + } + + ExportComplianceReportRequest other = (ExportComplianceReportRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.exportComplianceReportDetails, other.exportComplianceReportDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.exportComplianceReportDetails == null + ? 43 + : this.exportComplianceReportDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GenerateComplianceReportRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GenerateComplianceReportRequest.java new file mode 100644 index 00000000000..cff0e65d4ab --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GenerateComplianceReportRequest.java @@ -0,0 +1,317 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use GenerateComplianceReportRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GenerateComplianceReportRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.GenerateComplianceReportDetails> { + + /** + * Details for generating Compliance Report for the Fleet. + */ + private com.oracle.bmc.fleetappsmanagement.model.GenerateComplianceReportDetails + generateComplianceReportDetails; + + /** + * Details for generating Compliance Report for the Fleet. + */ + public com.oracle.bmc.fleetappsmanagement.model.GenerateComplianceReportDetails + getGenerateComplianceReportDetails() { + return generateComplianceReportDetails; + } + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.GenerateComplianceReportDetails getBody$() { + return generateComplianceReportDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GenerateComplianceReportRequest, + com.oracle.bmc.fleetappsmanagement.model.GenerateComplianceReportDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for generating Compliance Report for the Fleet. + */ + private com.oracle.bmc.fleetappsmanagement.model.GenerateComplianceReportDetails + generateComplianceReportDetails = null; + + /** + * Details for generating Compliance Report for the Fleet. + * @param generateComplianceReportDetails the value to set + * @return this builder instance + */ + public Builder generateComplianceReportDetails( + com.oracle.bmc.fleetappsmanagement.model.GenerateComplianceReportDetails + generateComplianceReportDetails) { + this.generateComplianceReportDetails = generateComplianceReportDetails; + return this; + } + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GenerateComplianceReportRequest o) { + generateComplianceReportDetails(o.getGenerateComplianceReportDetails()); + fleetId(o.getFleetId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GenerateComplianceReportRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GenerateComplianceReportRequest + */ + public GenerateComplianceReportRequest build() { + GenerateComplianceReportRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.GenerateComplianceReportDetails body) { + generateComplianceReportDetails(body); + return this; + } + + /** + * Build the instance of GenerateComplianceReportRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GenerateComplianceReportRequest + */ + public GenerateComplianceReportRequest buildWithoutInvocationCallback() { + GenerateComplianceReportRequest request = new GenerateComplianceReportRequest(); + request.generateComplianceReportDetails = generateComplianceReportDetails; + request.fleetId = fleetId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new GenerateComplianceReportRequest(generateComplianceReportDetails, fleetId, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .generateComplianceReportDetails(generateComplianceReportDetails) + .fleetId(fleetId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",generateComplianceReportDetails=") + .append(String.valueOf(this.generateComplianceReportDetails)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GenerateComplianceReportRequest)) { + return false; + } + + GenerateComplianceReportRequest other = (GenerateComplianceReportRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.generateComplianceReportDetails, other.generateComplianceReportDetails) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.generateComplianceReportDetails == null + ? 43 + : this.generateComplianceReportDetails.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetCompliancePolicyRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetCompliancePolicyRequest.java new file mode 100644 index 00000000000..7c6ce7cfe8c --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetCompliancePolicyRequest.java @@ -0,0 +1,197 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use GetCompliancePolicyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetCompliancePolicyRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique CompliancePolicy identifier. + */ + private String compliancePolicyId; + + /** + * unique CompliancePolicy identifier. + */ + public String getCompliancePolicyId() { + return compliancePolicyId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetCompliancePolicyRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique CompliancePolicy identifier. + */ + private String compliancePolicyId = null; + + /** + * unique CompliancePolicy identifier. + * @param compliancePolicyId the value to set + * @return this builder instance + */ + public Builder compliancePolicyId(String compliancePolicyId) { + this.compliancePolicyId = compliancePolicyId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetCompliancePolicyRequest o) { + compliancePolicyId(o.getCompliancePolicyId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetCompliancePolicyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetCompliancePolicyRequest + */ + public GetCompliancePolicyRequest build() { + GetCompliancePolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetCompliancePolicyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetCompliancePolicyRequest + */ + public GetCompliancePolicyRequest buildWithoutInvocationCallback() { + GetCompliancePolicyRequest request = new GetCompliancePolicyRequest(); + request.compliancePolicyId = compliancePolicyId; + request.opcRequestId = opcRequestId; + return request; + // new GetCompliancePolicyRequest(compliancePolicyId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().compliancePolicyId(compliancePolicyId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compliancePolicyId=").append(String.valueOf(this.compliancePolicyId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetCompliancePolicyRequest)) { + return false; + } + + GetCompliancePolicyRequest other = (GetCompliancePolicyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compliancePolicyId, other.compliancePolicyId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compliancePolicyId == null + ? 43 + : this.compliancePolicyId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetCompliancePolicyRuleRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetCompliancePolicyRuleRequest.java new file mode 100644 index 00000000000..8b4aa41d8dd --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetCompliancePolicyRuleRequest.java @@ -0,0 +1,201 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use GetCompliancePolicyRuleRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetCompliancePolicyRuleRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique CompliancePolicyRule identifier. + */ + private String compliancePolicyRuleId; + + /** + * unique CompliancePolicyRule identifier. + */ + public String getCompliancePolicyRuleId() { + return compliancePolicyRuleId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetCompliancePolicyRuleRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique CompliancePolicyRule identifier. + */ + private String compliancePolicyRuleId = null; + + /** + * unique CompliancePolicyRule identifier. + * @param compliancePolicyRuleId the value to set + * @return this builder instance + */ + public Builder compliancePolicyRuleId(String compliancePolicyRuleId) { + this.compliancePolicyRuleId = compliancePolicyRuleId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetCompliancePolicyRuleRequest o) { + compliancePolicyRuleId(o.getCompliancePolicyRuleId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetCompliancePolicyRuleRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetCompliancePolicyRuleRequest + */ + public GetCompliancePolicyRuleRequest build() { + GetCompliancePolicyRuleRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetCompliancePolicyRuleRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetCompliancePolicyRuleRequest + */ + public GetCompliancePolicyRuleRequest buildWithoutInvocationCallback() { + GetCompliancePolicyRuleRequest request = new GetCompliancePolicyRuleRequest(); + request.compliancePolicyRuleId = compliancePolicyRuleId; + request.opcRequestId = opcRequestId; + return request; + // new GetCompliancePolicyRuleRequest(compliancePolicyRuleId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compliancePolicyRuleId(compliancePolicyRuleId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compliancePolicyRuleId=").append(String.valueOf(this.compliancePolicyRuleId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetCompliancePolicyRuleRequest)) { + return false; + } + + GetCompliancePolicyRuleRequest other = (GetCompliancePolicyRuleRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.compliancePolicyRuleId, other.compliancePolicyRuleId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compliancePolicyRuleId == null + ? 43 + : this.compliancePolicyRuleId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetComplianceReportRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetComplianceReportRequest.java new file mode 100644 index 00000000000..08acfe9e814 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetComplianceReportRequest.java @@ -0,0 +1,231 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use GetComplianceReportRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetComplianceReportRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * compliance report identifier. + */ + private String complianceReportId; + + /** + * compliance report identifier. + */ + public String getComplianceReportId() { + return complianceReportId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetComplianceReportRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * compliance report identifier. + */ + private String complianceReportId = null; + + /** + * compliance report identifier. + * @param complianceReportId the value to set + * @return this builder instance + */ + public Builder complianceReportId(String complianceReportId) { + this.complianceReportId = complianceReportId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetComplianceReportRequest o) { + fleetId(o.getFleetId()); + complianceReportId(o.getComplianceReportId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetComplianceReportRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetComplianceReportRequest + */ + public GetComplianceReportRequest build() { + GetComplianceReportRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetComplianceReportRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetComplianceReportRequest + */ + public GetComplianceReportRequest buildWithoutInvocationCallback() { + GetComplianceReportRequest request = new GetComplianceReportRequest(); + request.fleetId = fleetId; + request.complianceReportId = complianceReportId; + request.opcRequestId = opcRequestId; + return request; + // new GetComplianceReportRequest(fleetId, complianceReportId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fleetId(fleetId) + .complianceReportId(complianceReportId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",complianceReportId=").append(String.valueOf(this.complianceReportId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetComplianceReportRequest)) { + return false; + } + + GetComplianceReportRequest other = (GetComplianceReportRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.complianceReportId, other.complianceReportId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.complianceReportId == null + ? 43 + : this.complianceReportId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetExecutionRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetExecutionRequest.java new file mode 100644 index 00000000000..606cc62a860 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetExecutionRequest.java @@ -0,0 +1,295 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use GetExecutionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetExecutionRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique SchedulerJob identifier + */ + private String schedulerJobId; + + /** + * unique SchedulerJob identifier + */ + public String getSchedulerJobId() { + return schedulerJobId; + } + /** + * unique jobActivity identifier + */ + private String jobActivityId; + + /** + * unique jobActivity identifier + */ + public String getJobActivityId() { + return jobActivityId; + } + /** + * unique Resource identifier + */ + private String resourceId; + + /** + * unique Resource identifier + */ + public String getResourceId() { + return resourceId; + } + /** + * Execution Id + */ + private String executionId; + + /** + * Execution Id + */ + public String getExecutionId() { + return executionId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetExecutionRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique SchedulerJob identifier + */ + private String schedulerJobId = null; + + /** + * unique SchedulerJob identifier + * @param schedulerJobId the value to set + * @return this builder instance + */ + public Builder schedulerJobId(String schedulerJobId) { + this.schedulerJobId = schedulerJobId; + return this; + } + + /** + * unique jobActivity identifier + */ + private String jobActivityId = null; + + /** + * unique jobActivity identifier + * @param jobActivityId the value to set + * @return this builder instance + */ + public Builder jobActivityId(String jobActivityId) { + this.jobActivityId = jobActivityId; + return this; + } + + /** + * unique Resource identifier + */ + private String resourceId = null; + + /** + * unique Resource identifier + * @param resourceId the value to set + * @return this builder instance + */ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Execution Id + */ + private String executionId = null; + + /** + * Execution Id + * @param executionId the value to set + * @return this builder instance + */ + public Builder executionId(String executionId) { + this.executionId = executionId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetExecutionRequest o) { + schedulerJobId(o.getSchedulerJobId()); + jobActivityId(o.getJobActivityId()); + resourceId(o.getResourceId()); + executionId(o.getExecutionId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetExecutionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetExecutionRequest + */ + public GetExecutionRequest build() { + GetExecutionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetExecutionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetExecutionRequest + */ + public GetExecutionRequest buildWithoutInvocationCallback() { + GetExecutionRequest request = new GetExecutionRequest(); + request.schedulerJobId = schedulerJobId; + request.jobActivityId = jobActivityId; + request.resourceId = resourceId; + request.executionId = executionId; + request.opcRequestId = opcRequestId; + return request; + // new GetExecutionRequest(schedulerJobId, jobActivityId, resourceId, executionId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulerJobId(schedulerJobId) + .jobActivityId(jobActivityId) + .resourceId(resourceId) + .executionId(executionId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulerJobId=").append(String.valueOf(this.schedulerJobId)); + sb.append(",jobActivityId=").append(String.valueOf(this.jobActivityId)); + sb.append(",resourceId=").append(String.valueOf(this.resourceId)); + sb.append(",executionId=").append(String.valueOf(this.executionId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetExecutionRequest)) { + return false; + } + + GetExecutionRequest other = (GetExecutionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulerJobId, other.schedulerJobId) + && java.util.Objects.equals(this.jobActivityId, other.jobActivityId) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.executionId, other.executionId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulerJobId == null ? 43 : this.schedulerJobId.hashCode()); + result = + (result * PRIME) + + (this.jobActivityId == null ? 43 : this.jobActivityId.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.executionId == null ? 43 : this.executionId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetFleetCredentialRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetFleetCredentialRequest.java new file mode 100644 index 00000000000..6307cda7754 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetFleetCredentialRequest.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use GetFleetCredentialRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetFleetCredentialRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique FleetCredential identifier + */ + private String fleetCredentialId; + + /** + * unique FleetCredential identifier + */ + public String getFleetCredentialId() { + return fleetCredentialId; + } + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetFleetCredentialRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique FleetCredential identifier + */ + private String fleetCredentialId = null; + + /** + * unique FleetCredential identifier + * @param fleetCredentialId the value to set + * @return this builder instance + */ + public Builder fleetCredentialId(String fleetCredentialId) { + this.fleetCredentialId = fleetCredentialId; + return this; + } + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetFleetCredentialRequest o) { + fleetCredentialId(o.getFleetCredentialId()); + fleetId(o.getFleetId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetFleetCredentialRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetFleetCredentialRequest + */ + public GetFleetCredentialRequest build() { + GetFleetCredentialRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetFleetCredentialRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetFleetCredentialRequest + */ + public GetFleetCredentialRequest buildWithoutInvocationCallback() { + GetFleetCredentialRequest request = new GetFleetCredentialRequest(); + request.fleetCredentialId = fleetCredentialId; + request.fleetId = fleetId; + request.opcRequestId = opcRequestId; + return request; + // new GetFleetCredentialRequest(fleetCredentialId, fleetId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fleetCredentialId(fleetCredentialId) + .fleetId(fleetId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fleetCredentialId=").append(String.valueOf(this.fleetCredentialId)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetFleetCredentialRequest)) { + return false; + } + + GetFleetCredentialRequest other = (GetFleetCredentialRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fleetCredentialId, other.fleetCredentialId) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.fleetCredentialId == null ? 43 : this.fleetCredentialId.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetFleetPropertyRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetFleetPropertyRequest.java new file mode 100644 index 00000000000..f3f0424e616 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetFleetPropertyRequest.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use GetFleetPropertyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetFleetPropertyRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique FleetProperty identifier. + */ + private String fleetPropertyId; + + /** + * unique FleetProperty identifier. + */ + public String getFleetPropertyId() { + return fleetPropertyId; + } + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetFleetPropertyRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique FleetProperty identifier. + */ + private String fleetPropertyId = null; + + /** + * unique FleetProperty identifier. + * @param fleetPropertyId the value to set + * @return this builder instance + */ + public Builder fleetPropertyId(String fleetPropertyId) { + this.fleetPropertyId = fleetPropertyId; + return this; + } + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetFleetPropertyRequest o) { + fleetPropertyId(o.getFleetPropertyId()); + fleetId(o.getFleetId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetFleetPropertyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetFleetPropertyRequest + */ + public GetFleetPropertyRequest build() { + GetFleetPropertyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetFleetPropertyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetFleetPropertyRequest + */ + public GetFleetPropertyRequest buildWithoutInvocationCallback() { + GetFleetPropertyRequest request = new GetFleetPropertyRequest(); + request.fleetPropertyId = fleetPropertyId; + request.fleetId = fleetId; + request.opcRequestId = opcRequestId; + return request; + // new GetFleetPropertyRequest(fleetPropertyId, fleetId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fleetPropertyId(fleetPropertyId) + .fleetId(fleetId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fleetPropertyId=").append(String.valueOf(this.fleetPropertyId)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetFleetPropertyRequest)) { + return false; + } + + GetFleetPropertyRequest other = (GetFleetPropertyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fleetPropertyId, other.fleetPropertyId) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.fleetPropertyId == null ? 43 : this.fleetPropertyId.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetFleetRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetFleetRequest.java new file mode 100644 index 00000000000..35c931bf55d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetFleetRequest.java @@ -0,0 +1,192 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use GetFleetRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetFleetRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetFleetRequest o) { + fleetId(o.getFleetId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetFleetRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetFleetRequest + */ + public GetFleetRequest build() { + GetFleetRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetFleetRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetFleetRequest + */ + public GetFleetRequest buildWithoutInvocationCallback() { + GetFleetRequest request = new GetFleetRequest(); + request.fleetId = fleetId; + request.opcRequestId = opcRequestId; + return request; + // new GetFleetRequest(fleetId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().fleetId(fleetId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetFleetRequest)) { + return false; + } + + GetFleetRequest other = (GetFleetRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetFleetResourceRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetFleetResourceRequest.java new file mode 100644 index 00000000000..50f9678b017 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetFleetResourceRequest.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use GetFleetResourceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetFleetResourceRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique FleetResource identifier + */ + private String fleetResourceId; + + /** + * unique FleetResource identifier + */ + public String getFleetResourceId() { + return fleetResourceId; + } + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetFleetResourceRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique FleetResource identifier + */ + private String fleetResourceId = null; + + /** + * unique FleetResource identifier + * @param fleetResourceId the value to set + * @return this builder instance + */ + public Builder fleetResourceId(String fleetResourceId) { + this.fleetResourceId = fleetResourceId; + return this; + } + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetFleetResourceRequest o) { + fleetResourceId(o.getFleetResourceId()); + fleetId(o.getFleetId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetFleetResourceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetFleetResourceRequest + */ + public GetFleetResourceRequest build() { + GetFleetResourceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetFleetResourceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetFleetResourceRequest + */ + public GetFleetResourceRequest buildWithoutInvocationCallback() { + GetFleetResourceRequest request = new GetFleetResourceRequest(); + request.fleetResourceId = fleetResourceId; + request.fleetId = fleetId; + request.opcRequestId = opcRequestId; + return request; + // new GetFleetResourceRequest(fleetResourceId, fleetId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fleetResourceId(fleetResourceId) + .fleetId(fleetId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fleetResourceId=").append(String.valueOf(this.fleetResourceId)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetFleetResourceRequest)) { + return false; + } + + GetFleetResourceRequest other = (GetFleetResourceRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fleetResourceId, other.fleetResourceId) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.fleetResourceId == null ? 43 : this.fleetResourceId.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetJobActivityRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetJobActivityRequest.java new file mode 100644 index 00000000000..3f9cde32bf1 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetJobActivityRequest.java @@ -0,0 +1,231 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use GetJobActivityRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetJobActivityRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique SchedulerJob identifier + */ + private String schedulerJobId; + + /** + * unique SchedulerJob identifier + */ + public String getSchedulerJobId() { + return schedulerJobId; + } + /** + * unique jobActivity identifier + */ + private String jobActivityId; + + /** + * unique jobActivity identifier + */ + public String getJobActivityId() { + return jobActivityId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetJobActivityRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique SchedulerJob identifier + */ + private String schedulerJobId = null; + + /** + * unique SchedulerJob identifier + * @param schedulerJobId the value to set + * @return this builder instance + */ + public Builder schedulerJobId(String schedulerJobId) { + this.schedulerJobId = schedulerJobId; + return this; + } + + /** + * unique jobActivity identifier + */ + private String jobActivityId = null; + + /** + * unique jobActivity identifier + * @param jobActivityId the value to set + * @return this builder instance + */ + public Builder jobActivityId(String jobActivityId) { + this.jobActivityId = jobActivityId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetJobActivityRequest o) { + schedulerJobId(o.getSchedulerJobId()); + jobActivityId(o.getJobActivityId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetJobActivityRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetJobActivityRequest + */ + public GetJobActivityRequest build() { + GetJobActivityRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetJobActivityRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetJobActivityRequest + */ + public GetJobActivityRequest buildWithoutInvocationCallback() { + GetJobActivityRequest request = new GetJobActivityRequest(); + request.schedulerJobId = schedulerJobId; + request.jobActivityId = jobActivityId; + request.opcRequestId = opcRequestId; + return request; + // new GetJobActivityRequest(schedulerJobId, jobActivityId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulerJobId(schedulerJobId) + .jobActivityId(jobActivityId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulerJobId=").append(String.valueOf(this.schedulerJobId)); + sb.append(",jobActivityId=").append(String.valueOf(this.jobActivityId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetJobActivityRequest)) { + return false; + } + + GetJobActivityRequest other = (GetJobActivityRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulerJobId, other.schedulerJobId) + && java.util.Objects.equals(this.jobActivityId, other.jobActivityId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulerJobId == null ? 43 : this.schedulerJobId.hashCode()); + result = + (result * PRIME) + + (this.jobActivityId == null ? 43 : this.jobActivityId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetMaintenanceWindowRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetMaintenanceWindowRequest.java new file mode 100644 index 00000000000..1a3f000d5c6 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetMaintenanceWindowRequest.java @@ -0,0 +1,198 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use GetMaintenanceWindowRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetMaintenanceWindowRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique MaintenanceWindow identifier + */ + private String maintenanceWindowId; + + /** + * unique MaintenanceWindow identifier + */ + public String getMaintenanceWindowId() { + return maintenanceWindowId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetMaintenanceWindowRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique MaintenanceWindow identifier + */ + private String maintenanceWindowId = null; + + /** + * unique MaintenanceWindow identifier + * @param maintenanceWindowId the value to set + * @return this builder instance + */ + public Builder maintenanceWindowId(String maintenanceWindowId) { + this.maintenanceWindowId = maintenanceWindowId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetMaintenanceWindowRequest o) { + maintenanceWindowId(o.getMaintenanceWindowId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetMaintenanceWindowRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetMaintenanceWindowRequest + */ + public GetMaintenanceWindowRequest build() { + GetMaintenanceWindowRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetMaintenanceWindowRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetMaintenanceWindowRequest + */ + public GetMaintenanceWindowRequest buildWithoutInvocationCallback() { + GetMaintenanceWindowRequest request = new GetMaintenanceWindowRequest(); + request.maintenanceWindowId = maintenanceWindowId; + request.opcRequestId = opcRequestId; + return request; + // new GetMaintenanceWindowRequest(maintenanceWindowId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().maintenanceWindowId(maintenanceWindowId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",maintenanceWindowId=").append(String.valueOf(this.maintenanceWindowId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetMaintenanceWindowRequest)) { + return false; + } + + GetMaintenanceWindowRequest other = (GetMaintenanceWindowRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.maintenanceWindowId, other.maintenanceWindowId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.maintenanceWindowId == null + ? 43 + : this.maintenanceWindowId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetOnboardingRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetOnboardingRequest.java new file mode 100644 index 00000000000..c8f8feed4ac --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetOnboardingRequest.java @@ -0,0 +1,193 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use GetOnboardingRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetOnboardingRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * A filter to return resources whose Onboarding identifier matches the given identifier. + */ + private String onboardingId; + + /** + * A filter to return resources whose Onboarding identifier matches the given identifier. + */ + public String getOnboardingId() { + return onboardingId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetOnboardingRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * A filter to return resources whose Onboarding identifier matches the given identifier. + */ + private String onboardingId = null; + + /** + * A filter to return resources whose Onboarding identifier matches the given identifier. + * @param onboardingId the value to set + * @return this builder instance + */ + public Builder onboardingId(String onboardingId) { + this.onboardingId = onboardingId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetOnboardingRequest o) { + onboardingId(o.getOnboardingId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetOnboardingRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetOnboardingRequest + */ + public GetOnboardingRequest build() { + GetOnboardingRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetOnboardingRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetOnboardingRequest + */ + public GetOnboardingRequest buildWithoutInvocationCallback() { + GetOnboardingRequest request = new GetOnboardingRequest(); + request.onboardingId = onboardingId; + request.opcRequestId = opcRequestId; + return request; + // new GetOnboardingRequest(onboardingId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().onboardingId(onboardingId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",onboardingId=").append(String.valueOf(this.onboardingId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetOnboardingRequest)) { + return false; + } + + GetOnboardingRequest other = (GetOnboardingRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.onboardingId, other.onboardingId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.onboardingId == null ? 43 : this.onboardingId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetPatchRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetPatchRequest.java new file mode 100644 index 00000000000..8d6d5845f2c --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetPatchRequest.java @@ -0,0 +1,192 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use GetPatchRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetPatchRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique Patch identifier + */ + private String patchId; + + /** + * unique Patch identifier + */ + public String getPatchId() { + return patchId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique Patch identifier + */ + private String patchId = null; + + /** + * unique Patch identifier + * @param patchId the value to set + * @return this builder instance + */ + public Builder patchId(String patchId) { + this.patchId = patchId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetPatchRequest o) { + patchId(o.getPatchId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetPatchRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetPatchRequest + */ + public GetPatchRequest build() { + GetPatchRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetPatchRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetPatchRequest + */ + public GetPatchRequest buildWithoutInvocationCallback() { + GetPatchRequest request = new GetPatchRequest(); + request.patchId = patchId; + request.opcRequestId = opcRequestId; + return request; + // new GetPatchRequest(patchId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().patchId(patchId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",patchId=").append(String.valueOf(this.patchId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetPatchRequest)) { + return false; + } + + GetPatchRequest other = (GetPatchRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.patchId, other.patchId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.patchId == null ? 43 : this.patchId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetPlatformConfigurationRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetPlatformConfigurationRequest.java new file mode 100644 index 00000000000..bcda86d44fe --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetPlatformConfigurationRequest.java @@ -0,0 +1,201 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use GetPlatformConfigurationRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetPlatformConfigurationRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique PlatformConfiguration identifier + */ + private String platformConfigurationId; + + /** + * unique PlatformConfiguration identifier + */ + public String getPlatformConfigurationId() { + return platformConfigurationId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetPlatformConfigurationRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PlatformConfiguration identifier + */ + private String platformConfigurationId = null; + + /** + * unique PlatformConfiguration identifier + * @param platformConfigurationId the value to set + * @return this builder instance + */ + public Builder platformConfigurationId(String platformConfigurationId) { + this.platformConfigurationId = platformConfigurationId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetPlatformConfigurationRequest o) { + platformConfigurationId(o.getPlatformConfigurationId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetPlatformConfigurationRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetPlatformConfigurationRequest + */ + public GetPlatformConfigurationRequest build() { + GetPlatformConfigurationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetPlatformConfigurationRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetPlatformConfigurationRequest + */ + public GetPlatformConfigurationRequest buildWithoutInvocationCallback() { + GetPlatformConfigurationRequest request = new GetPlatformConfigurationRequest(); + request.platformConfigurationId = platformConfigurationId; + request.opcRequestId = opcRequestId; + return request; + // new GetPlatformConfigurationRequest(platformConfigurationId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .platformConfigurationId(platformConfigurationId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",platformConfigurationId=").append(String.valueOf(this.platformConfigurationId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetPlatformConfigurationRequest)) { + return false; + } + + GetPlatformConfigurationRequest other = (GetPlatformConfigurationRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.platformConfigurationId, other.platformConfigurationId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.platformConfigurationId == null + ? 43 + : this.platformConfigurationId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetPropertyRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetPropertyRequest.java new file mode 100644 index 00000000000..5bc12c1db6e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetPropertyRequest.java @@ -0,0 +1,193 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use GetPropertyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetPropertyRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique Property identifier + */ + private String propertyId; + + /** + * unique Property identifier + */ + public String getPropertyId() { + return propertyId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetPropertyRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique Property identifier + */ + private String propertyId = null; + + /** + * unique Property identifier + * @param propertyId the value to set + * @return this builder instance + */ + public Builder propertyId(String propertyId) { + this.propertyId = propertyId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetPropertyRequest o) { + propertyId(o.getPropertyId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetPropertyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetPropertyRequest + */ + public GetPropertyRequest build() { + GetPropertyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetPropertyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetPropertyRequest + */ + public GetPropertyRequest buildWithoutInvocationCallback() { + GetPropertyRequest request = new GetPropertyRequest(); + request.propertyId = propertyId; + request.opcRequestId = opcRequestId; + return request; + // new GetPropertyRequest(propertyId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().propertyId(propertyId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",propertyId=").append(String.valueOf(this.propertyId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetPropertyRequest)) { + return false; + } + + GetPropertyRequest other = (GetPropertyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.propertyId, other.propertyId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.propertyId == null ? 43 : this.propertyId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetRunbookRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetRunbookRequest.java new file mode 100644 index 00000000000..fde4a4b8e85 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetRunbookRequest.java @@ -0,0 +1,193 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use GetRunbookRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetRunbookRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Runbook identifier + */ + private String runbookId; + + /** + * Unique Runbook identifier + */ + public String getRunbookId() { + return runbookId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetRunbookRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Runbook identifier + */ + private String runbookId = null; + + /** + * Unique Runbook identifier + * @param runbookId the value to set + * @return this builder instance + */ + public Builder runbookId(String runbookId) { + this.runbookId = runbookId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetRunbookRequest o) { + runbookId(o.getRunbookId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetRunbookRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetRunbookRequest + */ + public GetRunbookRequest build() { + GetRunbookRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetRunbookRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetRunbookRequest + */ + public GetRunbookRequest buildWithoutInvocationCallback() { + GetRunbookRequest request = new GetRunbookRequest(); + request.runbookId = runbookId; + request.opcRequestId = opcRequestId; + return request; + // new GetRunbookRequest(runbookId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().runbookId(runbookId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",runbookId=").append(String.valueOf(this.runbookId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetRunbookRequest)) { + return false; + } + + GetRunbookRequest other = (GetRunbookRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.runbookId, other.runbookId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.runbookId == null ? 43 : this.runbookId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetSchedulerDefinitionRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetSchedulerDefinitionRequest.java new file mode 100644 index 00000000000..6f39f11f329 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetSchedulerDefinitionRequest.java @@ -0,0 +1,200 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use GetSchedulerDefinitionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetSchedulerDefinitionRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique SchedulerDefinition identifier + */ + private String schedulerDefinitionId; + + /** + * unique SchedulerDefinition identifier + */ + public String getSchedulerDefinitionId() { + return schedulerDefinitionId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetSchedulerDefinitionRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique SchedulerDefinition identifier + */ + private String schedulerDefinitionId = null; + + /** + * unique SchedulerDefinition identifier + * @param schedulerDefinitionId the value to set + * @return this builder instance + */ + public Builder schedulerDefinitionId(String schedulerDefinitionId) { + this.schedulerDefinitionId = schedulerDefinitionId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSchedulerDefinitionRequest o) { + schedulerDefinitionId(o.getSchedulerDefinitionId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetSchedulerDefinitionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetSchedulerDefinitionRequest + */ + public GetSchedulerDefinitionRequest build() { + GetSchedulerDefinitionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetSchedulerDefinitionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetSchedulerDefinitionRequest + */ + public GetSchedulerDefinitionRequest buildWithoutInvocationCallback() { + GetSchedulerDefinitionRequest request = new GetSchedulerDefinitionRequest(); + request.schedulerDefinitionId = schedulerDefinitionId; + request.opcRequestId = opcRequestId; + return request; + // new GetSchedulerDefinitionRequest(schedulerDefinitionId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulerDefinitionId(schedulerDefinitionId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulerDefinitionId=").append(String.valueOf(this.schedulerDefinitionId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSchedulerDefinitionRequest)) { + return false; + } + + GetSchedulerDefinitionRequest other = (GetSchedulerDefinitionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulerDefinitionId, other.schedulerDefinitionId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulerDefinitionId == null + ? 43 + : this.schedulerDefinitionId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetSchedulerJobRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetSchedulerJobRequest.java new file mode 100644 index 00000000000..d3ca86ba18f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetSchedulerJobRequest.java @@ -0,0 +1,195 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use GetSchedulerJobRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetSchedulerJobRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique SchedulerJob identifier + */ + private String schedulerJobId; + + /** + * unique SchedulerJob identifier + */ + public String getSchedulerJobId() { + return schedulerJobId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetSchedulerJobRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique SchedulerJob identifier + */ + private String schedulerJobId = null; + + /** + * unique SchedulerJob identifier + * @param schedulerJobId the value to set + * @return this builder instance + */ + public Builder schedulerJobId(String schedulerJobId) { + this.schedulerJobId = schedulerJobId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSchedulerJobRequest o) { + schedulerJobId(o.getSchedulerJobId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetSchedulerJobRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetSchedulerJobRequest + */ + public GetSchedulerJobRequest build() { + GetSchedulerJobRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetSchedulerJobRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetSchedulerJobRequest + */ + public GetSchedulerJobRequest buildWithoutInvocationCallback() { + GetSchedulerJobRequest request = new GetSchedulerJobRequest(); + request.schedulerJobId = schedulerJobId; + request.opcRequestId = opcRequestId; + return request; + // new GetSchedulerJobRequest(schedulerJobId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().schedulerJobId(schedulerJobId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulerJobId=").append(String.valueOf(this.schedulerJobId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSchedulerJobRequest)) { + return false; + } + + GetSchedulerJobRequest other = (GetSchedulerJobRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulerJobId, other.schedulerJobId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulerJobId == null ? 43 : this.schedulerJobId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetTaskRecordRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetTaskRecordRequest.java new file mode 100644 index 00000000000..4e76cf897a7 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetTaskRecordRequest.java @@ -0,0 +1,193 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use GetTaskRecordRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetTaskRecordRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique TaskDetail identifier + */ + private String taskRecordId; + + /** + * unique TaskDetail identifier + */ + public String getTaskRecordId() { + return taskRecordId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetTaskRecordRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique TaskDetail identifier + */ + private String taskRecordId = null; + + /** + * unique TaskDetail identifier + * @param taskRecordId the value to set + * @return this builder instance + */ + public Builder taskRecordId(String taskRecordId) { + this.taskRecordId = taskRecordId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetTaskRecordRequest o) { + taskRecordId(o.getTaskRecordId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetTaskRecordRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetTaskRecordRequest + */ + public GetTaskRecordRequest build() { + GetTaskRecordRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetTaskRecordRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetTaskRecordRequest + */ + public GetTaskRecordRequest buildWithoutInvocationCallback() { + GetTaskRecordRequest request = new GetTaskRecordRequest(); + request.taskRecordId = taskRecordId; + request.opcRequestId = opcRequestId; + return request; + // new GetTaskRecordRequest(taskRecordId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().taskRecordId(taskRecordId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",taskRecordId=").append(String.valueOf(this.taskRecordId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetTaskRecordRequest)) { + return false; + } + + GetTaskRecordRequest other = (GetTaskRecordRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.taskRecordId, other.taskRecordId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.taskRecordId == null ? 43 : this.taskRecordId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetWorkRequestRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetWorkRequestRequest.java new file mode 100644 index 00000000000..b0b74bb964c --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/GetWorkRequestRequest.java @@ -0,0 +1,195 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use GetWorkRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetWorkRequestRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the asynchronous request. + */ + private String workRequestId; + + /** + * The ID of the asynchronous request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetWorkRequestRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the asynchronous request. + */ + private String workRequestId = null; + + /** + * The ID of the asynchronous request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetWorkRequestRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetWorkRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetWorkRequestRequest + */ + public GetWorkRequestRequest build() { + GetWorkRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetWorkRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetWorkRequestRequest + */ + public GetWorkRequestRequest buildWithoutInvocationCallback() { + GetWorkRequestRequest request = new GetWorkRequestRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + return request; + // new GetWorkRequestRequest(workRequestId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().workRequestId(workRequestId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetWorkRequestRequest)) { + return false; + } + + GetWorkRequestRequest other = (GetWorkRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListAnnouncementsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListAnnouncementsRequest.java new file mode 100644 index 00000000000..257640d6aab --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListAnnouncementsRequest.java @@ -0,0 +1,369 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListAnnouncementsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListAnnouncementsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Filter the list of announcements that contains the given summary value. + * + */ + private String summaryContains; + + /** + * Filter the list of announcements that contains the given summary value. + * + */ + public String getSummaryContains() { + return summaryContains; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort AnnouncementSummary by. Only one sort order may be provided. + * If no value is specified timeReleased is default. + * + */ + private com.oracle.bmc.fleetappsmanagement.model.AnnouncementSortBy sortBy; + + /** + * The field to sort AnnouncementSummary by. Only one sort order may be provided. + * If no value is specified timeReleased is default. + * + */ + public com.oracle.bmc.fleetappsmanagement.model.AnnouncementSortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListAnnouncementsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Filter the list of announcements that contains the given summary value. + * + */ + private String summaryContains = null; + + /** + * Filter the list of announcements that contains the given summary value. + * + * @param summaryContains the value to set + * @return this builder instance + */ + public Builder summaryContains(String summaryContains) { + this.summaryContains = summaryContains; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort AnnouncementSummary by. Only one sort order may be provided. + * If no value is specified timeReleased is default. + * + */ + private com.oracle.bmc.fleetappsmanagement.model.AnnouncementSortBy sortBy = null; + + /** + * The field to sort AnnouncementSummary by. Only one sort order may be provided. + * If no value is specified timeReleased is default. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(com.oracle.bmc.fleetappsmanagement.model.AnnouncementSortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAnnouncementsRequest o) { + summaryContains(o.getSummaryContains()); + displayName(o.getDisplayName()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListAnnouncementsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListAnnouncementsRequest + */ + public ListAnnouncementsRequest build() { + ListAnnouncementsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListAnnouncementsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListAnnouncementsRequest + */ + public ListAnnouncementsRequest buildWithoutInvocationCallback() { + ListAnnouncementsRequest request = new ListAnnouncementsRequest(); + request.summaryContains = summaryContains; + request.displayName = displayName; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListAnnouncementsRequest(summaryContains, displayName, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .summaryContains(summaryContains) + .displayName(displayName) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",summaryContains=").append(String.valueOf(this.summaryContains)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListAnnouncementsRequest)) { + return false; + } + + ListAnnouncementsRequest other = (ListAnnouncementsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.summaryContains, other.summaryContains) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.summaryContains == null ? 43 : this.summaryContains.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListCompliancePoliciesRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListCompliancePoliciesRequest.java new file mode 100644 index 00000000000..443db939ed8 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListCompliancePoliciesRequest.java @@ -0,0 +1,477 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListCompliancePoliciesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListCompliancePoliciesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + private com.oracle.bmc.fleetappsmanagement.model.CompliancePolicy.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + public com.oracle.bmc.fleetappsmanagement.model.CompliancePolicy.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * unique CompliancePolicy identifier. + */ + private String id; + + /** + * unique CompliancePolicy identifier. + */ + public String getId() { + return id; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListCompliancePoliciesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + private com.oracle.bmc.fleetappsmanagement.model.CompliancePolicy.LifecycleState + lifecycleState = null; + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicy.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * unique CompliancePolicy identifier. + */ + private String id = null; + + /** + * unique CompliancePolicy identifier. + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListCompliancePoliciesRequest o) { + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + id(o.getId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListCompliancePoliciesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListCompliancePoliciesRequest + */ + public ListCompliancePoliciesRequest build() { + ListCompliancePoliciesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListCompliancePoliciesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListCompliancePoliciesRequest + */ + public ListCompliancePoliciesRequest buildWithoutInvocationCallback() { + ListCompliancePoliciesRequest request = new ListCompliancePoliciesRequest(); + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.id = id; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListCompliancePoliciesRequest(compartmentId, lifecycleState, displayName, id, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .lifecycleState(lifecycleState) + .displayName(displayName) + .id(id) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListCompliancePoliciesRequest)) { + return false; + } + + ListCompliancePoliciesRequest other = (ListCompliancePoliciesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListCompliancePolicyRulesRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListCompliancePolicyRulesRequest.java new file mode 100644 index 00000000000..282c1d3486a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListCompliancePolicyRulesRequest.java @@ -0,0 +1,546 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListCompliancePolicyRulesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListCompliancePolicyRulesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + private com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRule.LifecycleState + lifecycleState; + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + public com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRule.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the patch selection against the given patch name. + */ + private String patchName; + + /** + * A filter to return only resources that match the patch selection against the given patch name. + */ + public String getPatchName() { + return patchName; + } + /** + * unique CompliancePolicy identifier. + */ + private String compliancePolicyId; + + /** + * unique CompliancePolicy identifier. + */ + public String getCompliancePolicyId() { + return compliancePolicyId; + } + /** + * unique CompliancePolicyRule identifier. + */ + private String id; + + /** + * unique CompliancePolicyRule identifier. + */ + public String getId() { + return id; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListCompliancePolicyRulesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + private com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRule.LifecycleState + lifecycleState = null; + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRule.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the patch selection against the given patch name. + */ + private String patchName = null; + + /** + * A filter to return only resources that match the patch selection against the given patch name. + * @param patchName the value to set + * @return this builder instance + */ + public Builder patchName(String patchName) { + this.patchName = patchName; + return this; + } + + /** + * unique CompliancePolicy identifier. + */ + private String compliancePolicyId = null; + + /** + * unique CompliancePolicy identifier. + * @param compliancePolicyId the value to set + * @return this builder instance + */ + public Builder compliancePolicyId(String compliancePolicyId) { + this.compliancePolicyId = compliancePolicyId; + return this; + } + + /** + * unique CompliancePolicyRule identifier. + */ + private String id = null; + + /** + * unique CompliancePolicyRule identifier. + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListCompliancePolicyRulesRequest o) { + compartmentId(o.getCompartmentId()); + displayName(o.getDisplayName()); + lifecycleState(o.getLifecycleState()); + patchName(o.getPatchName()); + compliancePolicyId(o.getCompliancePolicyId()); + id(o.getId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListCompliancePolicyRulesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListCompliancePolicyRulesRequest + */ + public ListCompliancePolicyRulesRequest build() { + ListCompliancePolicyRulesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListCompliancePolicyRulesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListCompliancePolicyRulesRequest + */ + public ListCompliancePolicyRulesRequest buildWithoutInvocationCallback() { + ListCompliancePolicyRulesRequest request = new ListCompliancePolicyRulesRequest(); + request.compartmentId = compartmentId; + request.displayName = displayName; + request.lifecycleState = lifecycleState; + request.patchName = patchName; + request.compliancePolicyId = compliancePolicyId; + request.id = id; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListCompliancePolicyRulesRequest(compartmentId, displayName, lifecycleState, patchName, compliancePolicyId, id, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .displayName(displayName) + .lifecycleState(lifecycleState) + .patchName(patchName) + .compliancePolicyId(compliancePolicyId) + .id(id) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",patchName=").append(String.valueOf(this.patchName)); + sb.append(",compliancePolicyId=").append(String.valueOf(this.compliancePolicyId)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListCompliancePolicyRulesRequest)) { + return false; + } + + ListCompliancePolicyRulesRequest other = (ListCompliancePolicyRulesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.patchName, other.patchName) + && java.util.Objects.equals(this.compliancePolicyId, other.compliancePolicyId) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.patchName == null ? 43 : this.patchName.hashCode()); + result = + (result * PRIME) + + (this.compliancePolicyId == null + ? 43 + : this.compliancePolicyId.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListComplianceRecordsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListComplianceRecordsRequest.java new file mode 100644 index 00000000000..11f94fc1045 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListComplianceRecordsRequest.java @@ -0,0 +1,561 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListComplianceRecordsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListComplianceRecordsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * Resource identifier. + */ + private String resourceId; + + /** + * Resource identifier. + */ + public String getResourceId() { + return resourceId; + } + /** + * Entity identifier.Ex:FleetId + */ + private String entityId; + + /** + * Entity identifier.Ex:FleetId + */ + public String getEntityId() { + return entityId; + } + /** + * Product Name. + */ + private String productName; + + /** + * Product Name. + */ + public String getProductName() { + return productName; + } + /** + * ProductStack name. + */ + private String productStack; + + /** + * ProductStack name. + */ + public String getProductStack() { + return productStack; + } + /** + * Unique target name + */ + private String targetName; + + /** + * Unique target name + */ + public String getTargetName() { + return targetName; + } + /** + * Target Compliance State. + */ + private String complianceState; + + /** + * Target Compliance State. + */ + public String getComplianceState() { + return complianceState; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListComplianceRecordsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * Resource identifier. + */ + private String resourceId = null; + + /** + * Resource identifier. + * @param resourceId the value to set + * @return this builder instance + */ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Entity identifier.Ex:FleetId + */ + private String entityId = null; + + /** + * Entity identifier.Ex:FleetId + * @param entityId the value to set + * @return this builder instance + */ + public Builder entityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * Product Name. + */ + private String productName = null; + + /** + * Product Name. + * @param productName the value to set + * @return this builder instance + */ + public Builder productName(String productName) { + this.productName = productName; + return this; + } + + /** + * ProductStack name. + */ + private String productStack = null; + + /** + * ProductStack name. + * @param productStack the value to set + * @return this builder instance + */ + public Builder productStack(String productStack) { + this.productStack = productStack; + return this; + } + + /** + * Unique target name + */ + private String targetName = null; + + /** + * Unique target name + * @param targetName the value to set + * @return this builder instance + */ + public Builder targetName(String targetName) { + this.targetName = targetName; + return this; + } + + /** + * Target Compliance State. + */ + private String complianceState = null; + + /** + * Target Compliance State. + * @param complianceState the value to set + * @return this builder instance + */ + public Builder complianceState(String complianceState) { + this.complianceState = complianceState; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListComplianceRecordsRequest o) { + compartmentId(o.getCompartmentId()); + resourceId(o.getResourceId()); + entityId(o.getEntityId()); + productName(o.getProductName()); + productStack(o.getProductStack()); + targetName(o.getTargetName()); + complianceState(o.getComplianceState()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListComplianceRecordsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListComplianceRecordsRequest + */ + public ListComplianceRecordsRequest build() { + ListComplianceRecordsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListComplianceRecordsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListComplianceRecordsRequest + */ + public ListComplianceRecordsRequest buildWithoutInvocationCallback() { + ListComplianceRecordsRequest request = new ListComplianceRecordsRequest(); + request.compartmentId = compartmentId; + request.resourceId = resourceId; + request.entityId = entityId; + request.productName = productName; + request.productStack = productStack; + request.targetName = targetName; + request.complianceState = complianceState; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListComplianceRecordsRequest(compartmentId, resourceId, entityId, productName, productStack, targetName, complianceState, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .resourceId(resourceId) + .entityId(entityId) + .productName(productName) + .productStack(productStack) + .targetName(targetName) + .complianceState(complianceState) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",resourceId=").append(String.valueOf(this.resourceId)); + sb.append(",entityId=").append(String.valueOf(this.entityId)); + sb.append(",productName=").append(String.valueOf(this.productName)); + sb.append(",productStack=").append(String.valueOf(this.productStack)); + sb.append(",targetName=").append(String.valueOf(this.targetName)); + sb.append(",complianceState=").append(String.valueOf(this.complianceState)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListComplianceRecordsRequest)) { + return false; + } + + ListComplianceRecordsRequest other = (ListComplianceRecordsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.entityId, other.entityId) + && java.util.Objects.equals(this.productName, other.productName) + && java.util.Objects.equals(this.productStack, other.productStack) + && java.util.Objects.equals(this.targetName, other.targetName) + && java.util.Objects.equals(this.complianceState, other.complianceState) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.entityId == null ? 43 : this.entityId.hashCode()); + result = (result * PRIME) + (this.productName == null ? 43 : this.productName.hashCode()); + result = (result * PRIME) + (this.productStack == null ? 43 : this.productStack.hashCode()); + result = (result * PRIME) + (this.targetName == null ? 43 : this.targetName.hashCode()); + result = + (result * PRIME) + + (this.complianceState == null ? 43 : this.complianceState.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListExecutionsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListExecutionsRequest.java new file mode 100644 index 00000000000..3bb9591d965 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListExecutionsRequest.java @@ -0,0 +1,561 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListExecutionsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListExecutionsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique SchedulerJob identifier + */ + private String schedulerJobId; + + /** + * unique SchedulerJob identifier + */ + public String getSchedulerJobId() { + return schedulerJobId; + } + /** + * unique jobActivity identifier + */ + private String jobActivityId; + + /** + * unique jobActivity identifier + */ + public String getJobActivityId() { + return jobActivityId; + } + /** + * unique Resource identifier + */ + private String resourceId; + + /** + * unique Resource identifier + */ + public String getResourceId() { + return resourceId; + } + /** + * Task Id + */ + private String resourceTaskId; + + /** + * Task Id + */ + public String getResourceTaskId() { + return resourceTaskId; + } + /** + * Unique step name + */ + private String stepName; + + /** + * Unique step name + */ + public String getStepName() { + return stepName; + } + /** + * Unique target name + */ + private String targetName; + + /** + * Unique target name + */ + public String getTargetName() { + return targetName; + } + /** + * Task Order Sequence + */ + private String sequence; + + /** + * Task Order Sequence + */ + public String getSequence() { + return sequence; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeStarted is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeStarted is descending. + * + **/ + public enum SortBy { + TimeStarted("timeStarted"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeStarted is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListExecutionsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique SchedulerJob identifier + */ + private String schedulerJobId = null; + + /** + * unique SchedulerJob identifier + * @param schedulerJobId the value to set + * @return this builder instance + */ + public Builder schedulerJobId(String schedulerJobId) { + this.schedulerJobId = schedulerJobId; + return this; + } + + /** + * unique jobActivity identifier + */ + private String jobActivityId = null; + + /** + * unique jobActivity identifier + * @param jobActivityId the value to set + * @return this builder instance + */ + public Builder jobActivityId(String jobActivityId) { + this.jobActivityId = jobActivityId; + return this; + } + + /** + * unique Resource identifier + */ + private String resourceId = null; + + /** + * unique Resource identifier + * @param resourceId the value to set + * @return this builder instance + */ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Task Id + */ + private String resourceTaskId = null; + + /** + * Task Id + * @param resourceTaskId the value to set + * @return this builder instance + */ + public Builder resourceTaskId(String resourceTaskId) { + this.resourceTaskId = resourceTaskId; + return this; + } + + /** + * Unique step name + */ + private String stepName = null; + + /** + * Unique step name + * @param stepName the value to set + * @return this builder instance + */ + public Builder stepName(String stepName) { + this.stepName = stepName; + return this; + } + + /** + * Unique target name + */ + private String targetName = null; + + /** + * Unique target name + * @param targetName the value to set + * @return this builder instance + */ + public Builder targetName(String targetName) { + this.targetName = targetName; + return this; + } + + /** + * Task Order Sequence + */ + private String sequence = null; + + /** + * Task Order Sequence + * @param sequence the value to set + * @return this builder instance + */ + public Builder sequence(String sequence) { + this.sequence = sequence; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeStarted is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeStarted is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListExecutionsRequest o) { + schedulerJobId(o.getSchedulerJobId()); + jobActivityId(o.getJobActivityId()); + resourceId(o.getResourceId()); + resourceTaskId(o.getResourceTaskId()); + stepName(o.getStepName()); + targetName(o.getTargetName()); + sequence(o.getSequence()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListExecutionsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListExecutionsRequest + */ + public ListExecutionsRequest build() { + ListExecutionsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListExecutionsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListExecutionsRequest + */ + public ListExecutionsRequest buildWithoutInvocationCallback() { + ListExecutionsRequest request = new ListExecutionsRequest(); + request.schedulerJobId = schedulerJobId; + request.jobActivityId = jobActivityId; + request.resourceId = resourceId; + request.resourceTaskId = resourceTaskId; + request.stepName = stepName; + request.targetName = targetName; + request.sequence = sequence; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListExecutionsRequest(schedulerJobId, jobActivityId, resourceId, resourceTaskId, stepName, targetName, sequence, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulerJobId(schedulerJobId) + .jobActivityId(jobActivityId) + .resourceId(resourceId) + .resourceTaskId(resourceTaskId) + .stepName(stepName) + .targetName(targetName) + .sequence(sequence) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulerJobId=").append(String.valueOf(this.schedulerJobId)); + sb.append(",jobActivityId=").append(String.valueOf(this.jobActivityId)); + sb.append(",resourceId=").append(String.valueOf(this.resourceId)); + sb.append(",resourceTaskId=").append(String.valueOf(this.resourceTaskId)); + sb.append(",stepName=").append(String.valueOf(this.stepName)); + sb.append(",targetName=").append(String.valueOf(this.targetName)); + sb.append(",sequence=").append(String.valueOf(this.sequence)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListExecutionsRequest)) { + return false; + } + + ListExecutionsRequest other = (ListExecutionsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulerJobId, other.schedulerJobId) + && java.util.Objects.equals(this.jobActivityId, other.jobActivityId) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.resourceTaskId, other.resourceTaskId) + && java.util.Objects.equals(this.stepName, other.stepName) + && java.util.Objects.equals(this.targetName, other.targetName) + && java.util.Objects.equals(this.sequence, other.sequence) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulerJobId == null ? 43 : this.schedulerJobId.hashCode()); + result = + (result * PRIME) + + (this.jobActivityId == null ? 43 : this.jobActivityId.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = + (result * PRIME) + + (this.resourceTaskId == null ? 43 : this.resourceTaskId.hashCode()); + result = (result * PRIME) + (this.stepName == null ? 43 : this.stepName.hashCode()); + result = (result * PRIME) + (this.targetName == null ? 43 : this.targetName.hashCode()); + result = (result * PRIME) + (this.sequence == null ? 43 : this.sequence.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListFleetCredentialsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListFleetCredentialsRequest.java new file mode 100644 index 00000000000..aea0dfdb22a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListFleetCredentialsRequest.java @@ -0,0 +1,606 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListFleetCredentialsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListFleetCredentialsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetCredential.LifecycleState lifecycleState; + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + public com.oracle.bmc.fleetappsmanagement.model.FleetCredential.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * Resource Identifier + */ + private String resourceId; + + /** + * Resource Identifier + */ + public String getResourceId() { + return resourceId; + } + /** + * A filter to return only resources whose target matches the given target name. + */ + private String target; + + /** + * A filter to return only resources whose target matches the given target name. + */ + public String getTarget() { + return target; + } + /** + * A filter to return only resources whose credentialLevel matches the given credentialLevel. + */ + private com.oracle.bmc.fleetappsmanagement.model.CredentialEntitySpecificDetails.CredentialLevel + credentialLevel; + + /** + * A filter to return only resources whose credentialLevel matches the given credentialLevel. + */ + public com.oracle.bmc.fleetappsmanagement.model.CredentialEntitySpecificDetails.CredentialLevel + getCredentialLevel() { + return credentialLevel; + } + /** + * A filter to return only resources whose credential identifier matches the given identifier. + */ + private String id; + + /** + * A filter to return only resources whose credential identifier matches the given identifier. + */ + public String getId() { + return id; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListFleetCredentialsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetCredential.LifecycleState + lifecycleState = null; + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.fleetappsmanagement.model.FleetCredential.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Resource Identifier + */ + private String resourceId = null; + + /** + * Resource Identifier + * @param resourceId the value to set + * @return this builder instance + */ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * A filter to return only resources whose target matches the given target name. + */ + private String target = null; + + /** + * A filter to return only resources whose target matches the given target name. + * @param target the value to set + * @return this builder instance + */ + public Builder target(String target) { + this.target = target; + return this; + } + + /** + * A filter to return only resources whose credentialLevel matches the given credentialLevel. + */ + private com.oracle.bmc.fleetappsmanagement.model.CredentialEntitySpecificDetails + .CredentialLevel + credentialLevel = null; + + /** + * A filter to return only resources whose credentialLevel matches the given credentialLevel. + * @param credentialLevel the value to set + * @return this builder instance + */ + public Builder credentialLevel( + com.oracle.bmc.fleetappsmanagement.model.CredentialEntitySpecificDetails + .CredentialLevel + credentialLevel) { + this.credentialLevel = credentialLevel; + return this; + } + + /** + * A filter to return only resources whose credential identifier matches the given identifier. + */ + private String id = null; + + /** + * A filter to return only resources whose credential identifier matches the given identifier. + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListFleetCredentialsRequest o) { + fleetId(o.getFleetId()); + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + resourceId(o.getResourceId()); + target(o.getTarget()); + credentialLevel(o.getCredentialLevel()); + id(o.getId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListFleetCredentialsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListFleetCredentialsRequest + */ + public ListFleetCredentialsRequest build() { + ListFleetCredentialsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListFleetCredentialsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListFleetCredentialsRequest + */ + public ListFleetCredentialsRequest buildWithoutInvocationCallback() { + ListFleetCredentialsRequest request = new ListFleetCredentialsRequest(); + request.fleetId = fleetId; + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.resourceId = resourceId; + request.target = target; + request.credentialLevel = credentialLevel; + request.id = id; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListFleetCredentialsRequest(fleetId, compartmentId, lifecycleState, displayName, resourceId, target, credentialLevel, id, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fleetId(fleetId) + .compartmentId(compartmentId) + .lifecycleState(lifecycleState) + .displayName(displayName) + .resourceId(resourceId) + .target(target) + .credentialLevel(credentialLevel) + .id(id) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",resourceId=").append(String.valueOf(this.resourceId)); + sb.append(",target=").append(String.valueOf(this.target)); + sb.append(",credentialLevel=").append(String.valueOf(this.credentialLevel)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListFleetCredentialsRequest)) { + return false; + } + + ListFleetCredentialsRequest other = (ListFleetCredentialsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.target, other.target) + && java.util.Objects.equals(this.credentialLevel, other.credentialLevel) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.target == null ? 43 : this.target.hashCode()); + result = + (result * PRIME) + + (this.credentialLevel == null ? 43 : this.credentialLevel.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListFleetProductsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListFleetProductsRequest.java new file mode 100644 index 00000000000..77da4781066 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListFleetProductsRequest.java @@ -0,0 +1,498 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListFleetProductsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListFleetProductsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * Resource Identifier + */ + private String resourceId; + + /** + * Resource Identifier + */ + public String getResourceId() { + return resourceId; + } + /** + * Resource Display Name. + */ + private String resourceDisplayName; + + /** + * Resource Display Name. + */ + public String getResourceDisplayName() { + return resourceDisplayName; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for displayName and resourceDisplayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for displayName and resourceDisplayName is ascending. + * + **/ + public enum SortBy { + DisplayName("displayName"), + ResourceDisplayName("resourceDisplayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for displayName and resourceDisplayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListFleetProductsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * Resource Identifier + */ + private String resourceId = null; + + /** + * Resource Identifier + * @param resourceId the value to set + * @return this builder instance + */ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Resource Display Name. + */ + private String resourceDisplayName = null; + + /** + * Resource Display Name. + * @param resourceDisplayName the value to set + * @return this builder instance + */ + public Builder resourceDisplayName(String resourceDisplayName) { + this.resourceDisplayName = resourceDisplayName; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for displayName and resourceDisplayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for displayName and resourceDisplayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListFleetProductsRequest o) { + fleetId(o.getFleetId()); + compartmentId(o.getCompartmentId()); + resourceId(o.getResourceId()); + resourceDisplayName(o.getResourceDisplayName()); + displayName(o.getDisplayName()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListFleetProductsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListFleetProductsRequest + */ + public ListFleetProductsRequest build() { + ListFleetProductsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListFleetProductsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListFleetProductsRequest + */ + public ListFleetProductsRequest buildWithoutInvocationCallback() { + ListFleetProductsRequest request = new ListFleetProductsRequest(); + request.fleetId = fleetId; + request.compartmentId = compartmentId; + request.resourceId = resourceId; + request.resourceDisplayName = resourceDisplayName; + request.displayName = displayName; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListFleetProductsRequest(fleetId, compartmentId, resourceId, resourceDisplayName, displayName, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fleetId(fleetId) + .compartmentId(compartmentId) + .resourceId(resourceId) + .resourceDisplayName(resourceDisplayName) + .displayName(displayName) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",resourceId=").append(String.valueOf(this.resourceId)); + sb.append(",resourceDisplayName=").append(String.valueOf(this.resourceDisplayName)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListFleetProductsRequest)) { + return false; + } + + ListFleetProductsRequest other = (ListFleetProductsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.resourceDisplayName, other.resourceDisplayName) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = + (result * PRIME) + + (this.resourceDisplayName == null + ? 43 + : this.resourceDisplayName.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListFleetPropertiesRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListFleetPropertiesRequest.java new file mode 100644 index 00000000000..53408282edd --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListFleetPropertiesRequest.java @@ -0,0 +1,500 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListFleetPropertiesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListFleetPropertiesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetProperty.LifecycleState lifecycleState; + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + public com.oracle.bmc.fleetappsmanagement.model.FleetProperty.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * A filter to return only resources whose fleetProperty identifier matches the given identifier. + */ + private String id; + + /** + * A filter to return only resources whose fleetProperty identifier matches the given identifier. + */ + public String getId() { + return id; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListFleetPropertiesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetProperty.LifecycleState + lifecycleState = null; + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.fleetappsmanagement.model.FleetProperty.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A filter to return only resources whose fleetProperty identifier matches the given identifier. + */ + private String id = null; + + /** + * A filter to return only resources whose fleetProperty identifier matches the given identifier. + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListFleetPropertiesRequest o) { + fleetId(o.getFleetId()); + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + id(o.getId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListFleetPropertiesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListFleetPropertiesRequest + */ + public ListFleetPropertiesRequest build() { + ListFleetPropertiesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListFleetPropertiesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListFleetPropertiesRequest + */ + public ListFleetPropertiesRequest buildWithoutInvocationCallback() { + ListFleetPropertiesRequest request = new ListFleetPropertiesRequest(); + request.fleetId = fleetId; + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.id = id; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListFleetPropertiesRequest(fleetId, compartmentId, lifecycleState, displayName, id, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fleetId(fleetId) + .compartmentId(compartmentId) + .lifecycleState(lifecycleState) + .displayName(displayName) + .id(id) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListFleetPropertiesRequest)) { + return false; + } + + ListFleetPropertiesRequest other = (ListFleetPropertiesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListFleetResourcesRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListFleetResourcesRequest.java new file mode 100644 index 00000000000..40782e7cca6 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListFleetResourcesRequest.java @@ -0,0 +1,532 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListFleetResourcesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListFleetResourcesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * Resource Tenancy Id + */ + private String tenancyId; + + /** + * Resource Tenancy Id + */ + public String getTenancyId() { + return tenancyId; + } + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetResource.LifecycleState lifecycleState; + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + public com.oracle.bmc.fleetappsmanagement.model.FleetResource.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * A filter to return only resources whose identifier matches the given identifier. + */ + private String id; + + /** + * A filter to return only resources whose identifier matches the given identifier. + */ + public String getId() { + return id; + } + /** + * A filter to return only resources whose resourceType matches the given resourceType. + */ + private String fleetResourceType; + + /** + * A filter to return only resources whose resourceType matches the given resourceType. + */ + public String getFleetResourceType() { + return fleetResourceType; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListFleetResourcesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * Resource Tenancy Id + */ + private String tenancyId = null; + + /** + * Resource Tenancy Id + * @param tenancyId the value to set + * @return this builder instance + */ + public Builder tenancyId(String tenancyId) { + this.tenancyId = tenancyId; + return this; + } + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetResource.LifecycleState + lifecycleState = null; + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.fleetappsmanagement.model.FleetResource.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A filter to return only resources whose identifier matches the given identifier. + */ + private String id = null; + + /** + * A filter to return only resources whose identifier matches the given identifier. + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * A filter to return only resources whose resourceType matches the given resourceType. + */ + private String fleetResourceType = null; + + /** + * A filter to return only resources whose resourceType matches the given resourceType. + * @param fleetResourceType the value to set + * @return this builder instance + */ + public Builder fleetResourceType(String fleetResourceType) { + this.fleetResourceType = fleetResourceType; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListFleetResourcesRequest o) { + fleetId(o.getFleetId()); + tenancyId(o.getTenancyId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + id(o.getId()); + fleetResourceType(o.getFleetResourceType()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListFleetResourcesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListFleetResourcesRequest + */ + public ListFleetResourcesRequest build() { + ListFleetResourcesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListFleetResourcesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListFleetResourcesRequest + */ + public ListFleetResourcesRequest buildWithoutInvocationCallback() { + ListFleetResourcesRequest request = new ListFleetResourcesRequest(); + request.fleetId = fleetId; + request.tenancyId = tenancyId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.id = id; + request.fleetResourceType = fleetResourceType; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListFleetResourcesRequest(fleetId, tenancyId, lifecycleState, displayName, id, fleetResourceType, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fleetId(fleetId) + .tenancyId(tenancyId) + .lifecycleState(lifecycleState) + .displayName(displayName) + .id(id) + .fleetResourceType(fleetResourceType) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",tenancyId=").append(String.valueOf(this.tenancyId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",fleetResourceType=").append(String.valueOf(this.fleetResourceType)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListFleetResourcesRequest)) { + return false; + } + + ListFleetResourcesRequest other = (ListFleetResourcesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.tenancyId, other.tenancyId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.fleetResourceType, other.fleetResourceType) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = (result * PRIME) + (this.tenancyId == null ? 43 : this.tenancyId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.fleetResourceType == null ? 43 : this.fleetResourceType.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListFleetTargetsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListFleetTargetsRequest.java new file mode 100644 index 00000000000..5d088c4f85e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListFleetTargetsRequest.java @@ -0,0 +1,497 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListFleetTargetsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListFleetTargetsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * Product Name. + */ + private String product; + + /** + * Product Name. + */ + public String getProduct() { + return product; + } + /** + * Resource Identifier + */ + private String resourceId; + + /** + * Resource Identifier + */ + public String getResourceId() { + return resourceId; + } + /** + * Resource Display Name. + */ + private String resourceDisplayName; + + /** + * Resource Display Name. + */ + public String getResourceDisplayName() { + return resourceDisplayName; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for displayName,product and resourceDisplayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for displayName,product and resourceDisplayName is ascending. + * + **/ + public enum SortBy { + DisplayName("displayName"), + Product("product"), + ResourceDisplayName("resourceDisplayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for displayName,product and resourceDisplayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListFleetTargetsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Product Name. + */ + private String product = null; + + /** + * Product Name. + * @param product the value to set + * @return this builder instance + */ + public Builder product(String product) { + this.product = product; + return this; + } + + /** + * Resource Identifier + */ + private String resourceId = null; + + /** + * Resource Identifier + * @param resourceId the value to set + * @return this builder instance + */ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Resource Display Name. + */ + private String resourceDisplayName = null; + + /** + * Resource Display Name. + * @param resourceDisplayName the value to set + * @return this builder instance + */ + public Builder resourceDisplayName(String resourceDisplayName) { + this.resourceDisplayName = resourceDisplayName; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for displayName,product and resourceDisplayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for displayName,product and resourceDisplayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListFleetTargetsRequest o) { + fleetId(o.getFleetId()); + displayName(o.getDisplayName()); + product(o.getProduct()); + resourceId(o.getResourceId()); + resourceDisplayName(o.getResourceDisplayName()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListFleetTargetsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListFleetTargetsRequest + */ + public ListFleetTargetsRequest build() { + ListFleetTargetsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListFleetTargetsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListFleetTargetsRequest + */ + public ListFleetTargetsRequest buildWithoutInvocationCallback() { + ListFleetTargetsRequest request = new ListFleetTargetsRequest(); + request.fleetId = fleetId; + request.displayName = displayName; + request.product = product; + request.resourceId = resourceId; + request.resourceDisplayName = resourceDisplayName; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListFleetTargetsRequest(fleetId, displayName, product, resourceId, resourceDisplayName, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fleetId(fleetId) + .displayName(displayName) + .product(product) + .resourceId(resourceId) + .resourceDisplayName(resourceDisplayName) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",product=").append(String.valueOf(this.product)); + sb.append(",resourceId=").append(String.valueOf(this.resourceId)); + sb.append(",resourceDisplayName=").append(String.valueOf(this.resourceDisplayName)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListFleetTargetsRequest)) { + return false; + } + + ListFleetTargetsRequest other = (ListFleetTargetsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.product, other.product) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.resourceDisplayName, other.resourceDisplayName) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.product == null ? 43 : this.product.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = + (result * PRIME) + + (this.resourceDisplayName == null + ? 43 + : this.resourceDisplayName.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListFleetsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListFleetsRequest.java new file mode 100644 index 00000000000..c4c6e54bae3 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListFleetsRequest.java @@ -0,0 +1,598 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListFleetsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListFleetsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * A filter to return fleets whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.Fleet.LifecycleState lifecycleState; + + /** + * A filter to return fleets whose lifecycleState matches the given lifecycleState. + */ + public com.oracle.bmc.fleetappsmanagement.model.Fleet.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return fleets whose fleetType matches the given fleetType. + */ + private com.oracle.bmc.fleetappsmanagement.model.Fleet.FleetType fleetType; + + /** + * A filter to return fleets whose fleetType matches the given fleetType. + */ + public com.oracle.bmc.fleetappsmanagement.model.Fleet.FleetType getFleetType() { + return fleetType; + } + /** + * A filter to return resources that match the Application Type/Product Stack given.. + */ + private String applicationType; + + /** + * A filter to return resources that match the Application Type/Product Stack given.. + */ + public String getApplicationType() { + return applicationType; + } + /** + * A filter to return resources that match the Product given. + */ + private String product; + + /** + * A filter to return resources that match the Product given. + */ + public String getProduct() { + return product; + } + /** + * A filter to return resources that match the Environment Type given. + */ + private String environmentType; + + /** + * A filter to return resources that match the Environment Type given. + */ + public String getEnvironmentType() { + return environmentType; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * A filter to return fleets whose id matches the given Fleet identifier + */ + private String id; + + /** + * A filter to return fleets whose id matches the given Fleet identifier + */ + public String getId() { + return id; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListFleetsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * A filter to return fleets whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.Fleet.LifecycleState lifecycleState = null; + + /** + * A filter to return fleets whose lifecycleState matches the given lifecycleState. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.fleetappsmanagement.model.Fleet.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return fleets whose fleetType matches the given fleetType. + */ + private com.oracle.bmc.fleetappsmanagement.model.Fleet.FleetType fleetType = null; + + /** + * A filter to return fleets whose fleetType matches the given fleetType. + * @param fleetType the value to set + * @return this builder instance + */ + public Builder fleetType( + com.oracle.bmc.fleetappsmanagement.model.Fleet.FleetType fleetType) { + this.fleetType = fleetType; + return this; + } + + /** + * A filter to return resources that match the Application Type/Product Stack given.. + */ + private String applicationType = null; + + /** + * A filter to return resources that match the Application Type/Product Stack given.. + * @param applicationType the value to set + * @return this builder instance + */ + public Builder applicationType(String applicationType) { + this.applicationType = applicationType; + return this; + } + + /** + * A filter to return resources that match the Product given. + */ + private String product = null; + + /** + * A filter to return resources that match the Product given. + * @param product the value to set + * @return this builder instance + */ + public Builder product(String product) { + this.product = product; + return this; + } + + /** + * A filter to return resources that match the Environment Type given. + */ + private String environmentType = null; + + /** + * A filter to return resources that match the Environment Type given. + * @param environmentType the value to set + * @return this builder instance + */ + public Builder environmentType(String environmentType) { + this.environmentType = environmentType; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A filter to return fleets whose id matches the given Fleet identifier + */ + private String id = null; + + /** + * A filter to return fleets whose id matches the given Fleet identifier + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListFleetsRequest o) { + lifecycleState(o.getLifecycleState()); + compartmentId(o.getCompartmentId()); + fleetType(o.getFleetType()); + applicationType(o.getApplicationType()); + product(o.getProduct()); + environmentType(o.getEnvironmentType()); + displayName(o.getDisplayName()); + id(o.getId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListFleetsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListFleetsRequest + */ + public ListFleetsRequest build() { + ListFleetsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListFleetsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListFleetsRequest + */ + public ListFleetsRequest buildWithoutInvocationCallback() { + ListFleetsRequest request = new ListFleetsRequest(); + request.lifecycleState = lifecycleState; + request.compartmentId = compartmentId; + request.fleetType = fleetType; + request.applicationType = applicationType; + request.product = product; + request.environmentType = environmentType; + request.displayName = displayName; + request.id = id; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListFleetsRequest(lifecycleState, compartmentId, fleetType, applicationType, product, environmentType, displayName, id, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .lifecycleState(lifecycleState) + .compartmentId(compartmentId) + .fleetType(fleetType) + .applicationType(applicationType) + .product(product) + .environmentType(environmentType) + .displayName(displayName) + .id(id) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",fleetType=").append(String.valueOf(this.fleetType)); + sb.append(",applicationType=").append(String.valueOf(this.applicationType)); + sb.append(",product=").append(String.valueOf(this.product)); + sb.append(",environmentType=").append(String.valueOf(this.environmentType)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListFleetsRequest)) { + return false; + } + + ListFleetsRequest other = (ListFleetsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.fleetType, other.fleetType) + && java.util.Objects.equals(this.applicationType, other.applicationType) + && java.util.Objects.equals(this.product, other.product) + && java.util.Objects.equals(this.environmentType, other.environmentType) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.fleetType == null ? 43 : this.fleetType.hashCode()); + result = + (result * PRIME) + + (this.applicationType == null ? 43 : this.applicationType.hashCode()); + result = (result * PRIME) + (this.product == null ? 43 : this.product.hashCode()); + result = + (result * PRIME) + + (this.environmentType == null ? 43 : this.environmentType.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListInventoryResourcesRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListInventoryResourcesRequest.java new file mode 100644 index 00000000000..1eb6ca6689d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListInventoryResourcesRequest.java @@ -0,0 +1,731 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListInventoryResourcesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListInventoryResourcesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * A filter to return only resources whose base Compartment ID(TenancyId) matches the given base Compartment ID. + */ + private String compartmentId; + + /** + * A filter to return only resources whose base Compartment ID(TenancyId) matches the given base Compartment ID. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only resources whose resource Compartment ID matches the given resource Compartment ID. + */ + private String resourceCompartmentId; + + /** + * A filter to return only resources whose resource Compartment ID matches the given resource Compartment ID. + */ + public String getResourceCompartmentId() { + return resourceCompartmentId; + } + /** + * A filter to return only resources their lifecycleState matches the given lifecycleState. + */ + private String lifecycleState; + + /** + * A filter to return only resources their lifecycleState matches the given lifecycleState. + */ + public String getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * Resource Region + */ + private String resourceRegion; + + /** + * Resource Region + */ + public String getResourceRegion() { + return resourceRegion; + } + /** + * A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + * Each item in the list has the format "{namespace}.{tagName}={value}". All inputs are case-insensitive. + * Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + * Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + * Example: Identification.Development=Yes + * + */ + private java.util.List definedTagEquals; + + /** + * A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + * Each item in the list has the format "{namespace}.{tagName}={value}". All inputs are case-insensitive. + * Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + * Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + * Example: Identification.Development=Yes + * + */ + public java.util.List getDefinedTagEquals() { + return definedTagEquals; + } + /** + * A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + * The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + * Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + * + */ + private java.util.List freeformTagEquals; + + /** + * A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + * The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + * Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + * + */ + public java.util.List getFreeformTagEquals() { + return freeformTagEquals; + } + /** + * A list of inventory properties filters to apply. + * The key for each inventory property and value for each resource type is "{resourceType}.{inventoryProperty}={value}". + * Example: Instance.displayName=TEST_INSTANCE + * + */ + private java.util.List inventoryProperties; + + /** + * A list of inventory properties filters to apply. + * The key for each inventory property and value for each resource type is "{resourceType}.{inventoryProperty}={value}". + * Example: Instance.displayName=TEST_INSTANCE + * + */ + public java.util.List getInventoryProperties() { + return inventoryProperties; + } + /** + * Fetch resources matching ANY or ALL criteria passed as params in "tags" and "inventoryProperties". + * Example: matchingCriteria=ANY + * + */ + private String matchingCriteria; + + /** + * Fetch resources matching ANY or ALL criteria passed as params in "tags" and "inventoryProperties". + * Example: matchingCriteria=ANY + * + */ + public String getMatchingCriteria() { + return matchingCriteria; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListInventoryResourcesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * A filter to return only resources whose base Compartment ID(TenancyId) matches the given base Compartment ID. + */ + private String compartmentId = null; + + /** + * A filter to return only resources whose base Compartment ID(TenancyId) matches the given base Compartment ID. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only resources whose resource Compartment ID matches the given resource Compartment ID. + */ + private String resourceCompartmentId = null; + + /** + * A filter to return only resources whose resource Compartment ID matches the given resource Compartment ID. + * @param resourceCompartmentId the value to set + * @return this builder instance + */ + public Builder resourceCompartmentId(String resourceCompartmentId) { + this.resourceCompartmentId = resourceCompartmentId; + return this; + } + + /** + * A filter to return only resources their lifecycleState matches the given lifecycleState. + */ + private String lifecycleState = null; + + /** + * A filter to return only resources their lifecycleState matches the given lifecycleState. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState(String lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Resource Region + */ + private String resourceRegion = null; + + /** + * Resource Region + * @param resourceRegion the value to set + * @return this builder instance + */ + public Builder resourceRegion(String resourceRegion) { + this.resourceRegion = resourceRegion; + return this; + } + + /** + * A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + * Each item in the list has the format "{namespace}.{tagName}={value}". All inputs are case-insensitive. + * Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + * Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + * Example: Identification.Development=Yes + * + */ + private java.util.List definedTagEquals = null; + + /** + * A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + * Each item in the list has the format "{namespace}.{tagName}={value}". All inputs are case-insensitive. + * Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + * Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + * Example: Identification.Development=Yes + * + * @param definedTagEquals the value to set + * @return this builder instance + */ + public Builder definedTagEquals(java.util.List definedTagEquals) { + this.definedTagEquals = definedTagEquals; + return this; + } + + /** + * Singular setter. A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + * Each item in the list has the format "{namespace}.{tagName}={value}". All inputs are case-insensitive. + * Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + * Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + * Example: Identification.Development=Yes + * + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder definedTagEquals(String singularValue) { + return this.definedTagEquals(java.util.Arrays.asList(singularValue)); + } + + /** + * A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + * The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + * Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + * + */ + private java.util.List freeformTagEquals = null; + + /** + * A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + * The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + * Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + * + * @param freeformTagEquals the value to set + * @return this builder instance + */ + public Builder freeformTagEquals(java.util.List freeformTagEquals) { + this.freeformTagEquals = freeformTagEquals; + return this; + } + + /** + * Singular setter. A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + * The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + * Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + * + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder freeformTagEquals(String singularValue) { + return this.freeformTagEquals(java.util.Arrays.asList(singularValue)); + } + + /** + * A list of inventory properties filters to apply. + * The key for each inventory property and value for each resource type is "{resourceType}.{inventoryProperty}={value}". + * Example: Instance.displayName=TEST_INSTANCE + * + */ + private java.util.List inventoryProperties = null; + + /** + * A list of inventory properties filters to apply. + * The key for each inventory property and value for each resource type is "{resourceType}.{inventoryProperty}={value}". + * Example: Instance.displayName=TEST_INSTANCE + * + * @param inventoryProperties the value to set + * @return this builder instance + */ + public Builder inventoryProperties(java.util.List inventoryProperties) { + this.inventoryProperties = inventoryProperties; + return this; + } + + /** + * Singular setter. A list of inventory properties filters to apply. + * The key for each inventory property and value for each resource type is "{resourceType}.{inventoryProperty}={value}". + * Example: Instance.displayName=TEST_INSTANCE + * + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder inventoryProperties(String singularValue) { + return this.inventoryProperties(java.util.Arrays.asList(singularValue)); + } + + /** + * Fetch resources matching ANY or ALL criteria passed as params in "tags" and "inventoryProperties". + * Example: matchingCriteria=ANY + * + */ + private String matchingCriteria = null; + + /** + * Fetch resources matching ANY or ALL criteria passed as params in "tags" and "inventoryProperties". + * Example: matchingCriteria=ANY + * + * @param matchingCriteria the value to set + * @return this builder instance + */ + public Builder matchingCriteria(String matchingCriteria) { + this.matchingCriteria = matchingCriteria; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListInventoryResourcesRequest o) { + compartmentId(o.getCompartmentId()); + resourceCompartmentId(o.getResourceCompartmentId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + resourceRegion(o.getResourceRegion()); + definedTagEquals(o.getDefinedTagEquals()); + freeformTagEquals(o.getFreeformTagEquals()); + inventoryProperties(o.getInventoryProperties()); + matchingCriteria(o.getMatchingCriteria()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListInventoryResourcesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListInventoryResourcesRequest + */ + public ListInventoryResourcesRequest build() { + ListInventoryResourcesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListInventoryResourcesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListInventoryResourcesRequest + */ + public ListInventoryResourcesRequest buildWithoutInvocationCallback() { + ListInventoryResourcesRequest request = new ListInventoryResourcesRequest(); + request.compartmentId = compartmentId; + request.resourceCompartmentId = resourceCompartmentId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.resourceRegion = resourceRegion; + request.definedTagEquals = definedTagEquals; + request.freeformTagEquals = freeformTagEquals; + request.inventoryProperties = inventoryProperties; + request.matchingCriteria = matchingCriteria; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListInventoryResourcesRequest(compartmentId, resourceCompartmentId, lifecycleState, displayName, resourceRegion, definedTagEquals, freeformTagEquals, inventoryProperties, matchingCriteria, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .resourceCompartmentId(resourceCompartmentId) + .lifecycleState(lifecycleState) + .displayName(displayName) + .resourceRegion(resourceRegion) + .definedTagEquals(definedTagEquals) + .freeformTagEquals(freeformTagEquals) + .inventoryProperties(inventoryProperties) + .matchingCriteria(matchingCriteria) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",resourceCompartmentId=").append(String.valueOf(this.resourceCompartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",resourceRegion=").append(String.valueOf(this.resourceRegion)); + sb.append(",definedTagEquals=").append(String.valueOf(this.definedTagEquals)); + sb.append(",freeformTagEquals=").append(String.valueOf(this.freeformTagEquals)); + sb.append(",inventoryProperties=").append(String.valueOf(this.inventoryProperties)); + sb.append(",matchingCriteria=").append(String.valueOf(this.matchingCriteria)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListInventoryResourcesRequest)) { + return false; + } + + ListInventoryResourcesRequest other = (ListInventoryResourcesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resourceCompartmentId, other.resourceCompartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.resourceRegion, other.resourceRegion) + && java.util.Objects.equals(this.definedTagEquals, other.definedTagEquals) + && java.util.Objects.equals(this.freeformTagEquals, other.freeformTagEquals) + && java.util.Objects.equals(this.inventoryProperties, other.inventoryProperties) + && java.util.Objects.equals(this.matchingCriteria, other.matchingCriteria) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.resourceCompartmentId == null + ? 43 + : this.resourceCompartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.resourceRegion == null ? 43 : this.resourceRegion.hashCode()); + result = + (result * PRIME) + + (this.definedTagEquals == null ? 43 : this.definedTagEquals.hashCode()); + result = + (result * PRIME) + + (this.freeformTagEquals == null ? 43 : this.freeformTagEquals.hashCode()); + result = + (result * PRIME) + + (this.inventoryProperties == null + ? 43 + : this.inventoryProperties.hashCode()); + result = + (result * PRIME) + + (this.matchingCriteria == null ? 43 : this.matchingCriteria.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListMaintenanceWindowsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListMaintenanceWindowsRequest.java new file mode 100644 index 00000000000..2e4c868b60a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListMaintenanceWindowsRequest.java @@ -0,0 +1,510 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListMaintenanceWindowsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListMaintenanceWindowsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindow.LifecycleState + lifecycleState; + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + public com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindow.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * A filter to return only resources whose timeScheduleStart is greater than or equal to the provided date and time. + */ + private java.util.Date timeScheduleStartGreaterThanOrEqualTo; + + /** + * A filter to return only resources whose timeScheduleStart is greater than or equal to the provided date and time. + */ + public java.util.Date getTimeScheduleStartGreaterThanOrEqualTo() { + return timeScheduleStartGreaterThanOrEqualTo; + } + /** + * A filter to return only the Maintenance Windows whose identifier matches the given identifier. + */ + private String id; + + /** + * A filter to return only the Maintenance Windows whose identifier matches the given identifier. + */ + public String getId() { + return id; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListMaintenanceWindowsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindow.LifecycleState + lifecycleState = null; + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindow.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A filter to return only resources whose timeScheduleStart is greater than or equal to the provided date and time. + */ + private java.util.Date timeScheduleStartGreaterThanOrEqualTo = null; + + /** + * A filter to return only resources whose timeScheduleStart is greater than or equal to the provided date and time. + * @param timeScheduleStartGreaterThanOrEqualTo the value to set + * @return this builder instance + */ + public Builder timeScheduleStartGreaterThanOrEqualTo( + java.util.Date timeScheduleStartGreaterThanOrEqualTo) { + this.timeScheduleStartGreaterThanOrEqualTo = timeScheduleStartGreaterThanOrEqualTo; + return this; + } + + /** + * A filter to return only the Maintenance Windows whose identifier matches the given identifier. + */ + private String id = null; + + /** + * A filter to return only the Maintenance Windows whose identifier matches the given identifier. + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListMaintenanceWindowsRequest o) { + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + timeScheduleStartGreaterThanOrEqualTo(o.getTimeScheduleStartGreaterThanOrEqualTo()); + id(o.getId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListMaintenanceWindowsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListMaintenanceWindowsRequest + */ + public ListMaintenanceWindowsRequest build() { + ListMaintenanceWindowsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListMaintenanceWindowsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListMaintenanceWindowsRequest + */ + public ListMaintenanceWindowsRequest buildWithoutInvocationCallback() { + ListMaintenanceWindowsRequest request = new ListMaintenanceWindowsRequest(); + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.timeScheduleStartGreaterThanOrEqualTo = timeScheduleStartGreaterThanOrEqualTo; + request.id = id; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListMaintenanceWindowsRequest(compartmentId, lifecycleState, displayName, timeScheduleStartGreaterThanOrEqualTo, id, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .lifecycleState(lifecycleState) + .displayName(displayName) + .timeScheduleStartGreaterThanOrEqualTo(timeScheduleStartGreaterThanOrEqualTo) + .id(id) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",timeScheduleStartGreaterThanOrEqualTo=") + .append(String.valueOf(this.timeScheduleStartGreaterThanOrEqualTo)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListMaintenanceWindowsRequest)) { + return false; + } + + ListMaintenanceWindowsRequest other = (ListMaintenanceWindowsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals( + this.timeScheduleStartGreaterThanOrEqualTo, + other.timeScheduleStartGreaterThanOrEqualTo) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.timeScheduleStartGreaterThanOrEqualTo == null + ? 43 + : this.timeScheduleStartGreaterThanOrEqualTo.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListOnboardingPoliciesRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListOnboardingPoliciesRequest.java new file mode 100644 index 00000000000..f590b48798b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListOnboardingPoliciesRequest.java @@ -0,0 +1,332 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListOnboardingPoliciesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListOnboardingPoliciesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListOnboardingPoliciesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListOnboardingPoliciesRequest o) { + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListOnboardingPoliciesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListOnboardingPoliciesRequest + */ + public ListOnboardingPoliciesRequest build() { + ListOnboardingPoliciesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListOnboardingPoliciesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListOnboardingPoliciesRequest + */ + public ListOnboardingPoliciesRequest buildWithoutInvocationCallback() { + ListOnboardingPoliciesRequest request = new ListOnboardingPoliciesRequest(); + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListOnboardingPoliciesRequest(limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListOnboardingPoliciesRequest)) { + return false; + } + + ListOnboardingPoliciesRequest other = (ListOnboardingPoliciesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListOnboardingsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListOnboardingsRequest.java new file mode 100644 index 00000000000..c9fe1bf9bef --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListOnboardingsRequest.java @@ -0,0 +1,434 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListOnboardingsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListOnboardingsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.Onboarding.LifecycleState lifecycleState; + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + public com.oracle.bmc.fleetappsmanagement.model.Onboarding.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * unique onboarding identifier + */ + private String id; + + /** + * unique onboarding identifier + */ + public String getId() { + return id; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListOnboardingsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.Onboarding.LifecycleState lifecycleState = + null; + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.fleetappsmanagement.model.Onboarding.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * unique onboarding identifier + */ + private String id = null; + + /** + * unique onboarding identifier + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListOnboardingsRequest o) { + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + id(o.getId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListOnboardingsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListOnboardingsRequest + */ + public ListOnboardingsRequest build() { + ListOnboardingsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListOnboardingsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListOnboardingsRequest + */ + public ListOnboardingsRequest buildWithoutInvocationCallback() { + ListOnboardingsRequest request = new ListOnboardingsRequest(); + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.id = id; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListOnboardingsRequest(compartmentId, lifecycleState, id, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .lifecycleState(lifecycleState) + .id(id) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListOnboardingsRequest)) { + return false; + } + + ListOnboardingsRequest other = (ListOnboardingsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListPatchesRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListPatchesRequest.java new file mode 100644 index 00000000000..9843533c823 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListPatchesRequest.java @@ -0,0 +1,709 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListPatchesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListPatchesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * Product platformConfigurationId associated with the Patch. + */ + private String productId; + + /** + * Product platformConfigurationId associated with the Patch. + */ + public String getProductId() { + return productId; + } + /** + * Product version + */ + private String version; + + /** + * Product version + */ + public String getVersion() { + return version; + } + /** + * DefinedBy type. + */ + private com.oracle.bmc.fleetappsmanagement.model.Patch.Type type; + + /** + * DefinedBy type. + */ + public com.oracle.bmc.fleetappsmanagement.model.Patch.Type getType() { + return type; + } + /** + * Patch Type platformConfigurationId associated with the Patch. + */ + private String patchTypeId; + + /** + * Patch Type platformConfigurationId associated with the Patch. + */ + public String getPatchTypeId() { + return patchTypeId; + } + /** + * A filter to return only resources that match the entire name given. + */ + private String name; + + /** + * A filter to return only resources that match the entire name given. + */ + public String getName() { + return name; + } + /** + * unique Patch identifier + */ + private String id; + + /** + * unique Patch identifier + */ + public String getId() { + return id; + } + /** + * Patch Released Date + */ + private java.util.Date timeReleasedGreaterThanOrEqualTo; + + /** + * Patch Released Date + */ + public java.util.Date getTimeReleasedGreaterThanOrEqualTo() { + return timeReleasedGreaterThanOrEqualTo; + } + /** + * Patch Released Date + */ + private java.util.Date timeReleasedLessThan; + + /** + * Patch Released Date + */ + public java.util.Date getTimeReleasedLessThan() { + return timeReleasedLessThan; + } + /** + * Filter patch based on compliance policy rules for the Product + */ + private Boolean shouldCompliancePolicyRulesBeApplied; + + /** + * Filter patch based on compliance policy rules for the Product + */ + public Boolean getShouldCompliancePolicyRulesBeApplied() { + return shouldCompliancePolicyRulesBeApplied; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The current state of the Patch. + */ + private com.oracle.bmc.fleetappsmanagement.model.Patch.LifecycleState lifecycleState; + + /** + * The current state of the Patch. + */ + public com.oracle.bmc.fleetappsmanagement.model.Patch.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListPatchesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * Product platformConfigurationId associated with the Patch. + */ + private String productId = null; + + /** + * Product platformConfigurationId associated with the Patch. + * @param productId the value to set + * @return this builder instance + */ + public Builder productId(String productId) { + this.productId = productId; + return this; + } + + /** + * Product version + */ + private String version = null; + + /** + * Product version + * @param version the value to set + * @return this builder instance + */ + public Builder version(String version) { + this.version = version; + return this; + } + + /** + * DefinedBy type. + */ + private com.oracle.bmc.fleetappsmanagement.model.Patch.Type type = null; + + /** + * DefinedBy type. + * @param type the value to set + * @return this builder instance + */ + public Builder type(com.oracle.bmc.fleetappsmanagement.model.Patch.Type type) { + this.type = type; + return this; + } + + /** + * Patch Type platformConfigurationId associated with the Patch. + */ + private String patchTypeId = null; + + /** + * Patch Type platformConfigurationId associated with the Patch. + * @param patchTypeId the value to set + * @return this builder instance + */ + public Builder patchTypeId(String patchTypeId) { + this.patchTypeId = patchTypeId; + return this; + } + + /** + * A filter to return only resources that match the entire name given. + */ + private String name = null; + + /** + * A filter to return only resources that match the entire name given. + * @param name the value to set + * @return this builder instance + */ + public Builder name(String name) { + this.name = name; + return this; + } + + /** + * unique Patch identifier + */ + private String id = null; + + /** + * unique Patch identifier + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * Patch Released Date + */ + private java.util.Date timeReleasedGreaterThanOrEqualTo = null; + + /** + * Patch Released Date + * @param timeReleasedGreaterThanOrEqualTo the value to set + * @return this builder instance + */ + public Builder timeReleasedGreaterThanOrEqualTo( + java.util.Date timeReleasedGreaterThanOrEqualTo) { + this.timeReleasedGreaterThanOrEqualTo = timeReleasedGreaterThanOrEqualTo; + return this; + } + + /** + * Patch Released Date + */ + private java.util.Date timeReleasedLessThan = null; + + /** + * Patch Released Date + * @param timeReleasedLessThan the value to set + * @return this builder instance + */ + public Builder timeReleasedLessThan(java.util.Date timeReleasedLessThan) { + this.timeReleasedLessThan = timeReleasedLessThan; + return this; + } + + /** + * Filter patch based on compliance policy rules for the Product + */ + private Boolean shouldCompliancePolicyRulesBeApplied = null; + + /** + * Filter patch based on compliance policy rules for the Product + * @param shouldCompliancePolicyRulesBeApplied the value to set + * @return this builder instance + */ + public Builder shouldCompliancePolicyRulesBeApplied( + Boolean shouldCompliancePolicyRulesBeApplied) { + this.shouldCompliancePolicyRulesBeApplied = shouldCompliancePolicyRulesBeApplied; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The current state of the Patch. + */ + private com.oracle.bmc.fleetappsmanagement.model.Patch.LifecycleState lifecycleState = null; + + /** + * The current state of the Patch. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.fleetappsmanagement.model.Patch.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPatchesRequest o) { + compartmentId(o.getCompartmentId()); + productId(o.getProductId()); + version(o.getVersion()); + type(o.getType()); + patchTypeId(o.getPatchTypeId()); + name(o.getName()); + id(o.getId()); + timeReleasedGreaterThanOrEqualTo(o.getTimeReleasedGreaterThanOrEqualTo()); + timeReleasedLessThan(o.getTimeReleasedLessThan()); + shouldCompliancePolicyRulesBeApplied(o.getShouldCompliancePolicyRulesBeApplied()); + limit(o.getLimit()); + page(o.getPage()); + lifecycleState(o.getLifecycleState()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListPatchesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListPatchesRequest + */ + public ListPatchesRequest build() { + ListPatchesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListPatchesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListPatchesRequest + */ + public ListPatchesRequest buildWithoutInvocationCallback() { + ListPatchesRequest request = new ListPatchesRequest(); + request.compartmentId = compartmentId; + request.productId = productId; + request.version = version; + request.type = type; + request.patchTypeId = patchTypeId; + request.name = name; + request.id = id; + request.timeReleasedGreaterThanOrEqualTo = timeReleasedGreaterThanOrEqualTo; + request.timeReleasedLessThan = timeReleasedLessThan; + request.shouldCompliancePolicyRulesBeApplied = shouldCompliancePolicyRulesBeApplied; + request.limit = limit; + request.page = page; + request.lifecycleState = lifecycleState; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.opcRequestId = opcRequestId; + return request; + // new ListPatchesRequest(compartmentId, productId, version, type, patchTypeId, name, id, timeReleasedGreaterThanOrEqualTo, timeReleasedLessThan, shouldCompliancePolicyRulesBeApplied, limit, page, lifecycleState, sortBy, sortOrder, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .productId(productId) + .version(version) + .type(type) + .patchTypeId(patchTypeId) + .name(name) + .id(id) + .timeReleasedGreaterThanOrEqualTo(timeReleasedGreaterThanOrEqualTo) + .timeReleasedLessThan(timeReleasedLessThan) + .shouldCompliancePolicyRulesBeApplied(shouldCompliancePolicyRulesBeApplied) + .limit(limit) + .page(page) + .lifecycleState(lifecycleState) + .sortBy(sortBy) + .sortOrder(sortOrder) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",productId=").append(String.valueOf(this.productId)); + sb.append(",version=").append(String.valueOf(this.version)); + sb.append(",type=").append(String.valueOf(this.type)); + sb.append(",patchTypeId=").append(String.valueOf(this.patchTypeId)); + sb.append(",name=").append(String.valueOf(this.name)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",timeReleasedGreaterThanOrEqualTo=") + .append(String.valueOf(this.timeReleasedGreaterThanOrEqualTo)); + sb.append(",timeReleasedLessThan=").append(String.valueOf(this.timeReleasedLessThan)); + sb.append(",shouldCompliancePolicyRulesBeApplied=") + .append(String.valueOf(this.shouldCompliancePolicyRulesBeApplied)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPatchesRequest)) { + return false; + } + + ListPatchesRequest other = (ListPatchesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.productId, other.productId) + && java.util.Objects.equals(this.version, other.version) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.patchTypeId, other.patchTypeId) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals( + this.timeReleasedGreaterThanOrEqualTo, + other.timeReleasedGreaterThanOrEqualTo) + && java.util.Objects.equals(this.timeReleasedLessThan, other.timeReleasedLessThan) + && java.util.Objects.equals( + this.shouldCompliancePolicyRulesBeApplied, + other.shouldCompliancePolicyRulesBeApplied) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.productId == null ? 43 : this.productId.hashCode()); + result = (result * PRIME) + (this.version == null ? 43 : this.version.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + (this.patchTypeId == null ? 43 : this.patchTypeId.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.timeReleasedGreaterThanOrEqualTo == null + ? 43 + : this.timeReleasedGreaterThanOrEqualTo.hashCode()); + result = + (result * PRIME) + + (this.timeReleasedLessThan == null + ? 43 + : this.timeReleasedLessThan.hashCode()); + result = + (result * PRIME) + + (this.shouldCompliancePolicyRulesBeApplied == null + ? 43 + : this.shouldCompliancePolicyRulesBeApplied.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListPlatformConfigurationsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListPlatformConfigurationsRequest.java new file mode 100644 index 00000000000..d9e0937a6eb --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListPlatformConfigurationsRequest.java @@ -0,0 +1,509 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListPlatformConfigurationsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListPlatformConfigurationsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only resources their lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.PlatformConfiguration.LifecycleState + lifecycleState; + + /** + * A filter to return only resources their lifecycleState matches the given lifecycleState. + */ + public com.oracle.bmc.fleetappsmanagement.model.PlatformConfiguration.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * unique PlatformConfiguration identifier + */ + private String id; + + /** + * unique PlatformConfiguration identifier + */ + public String getId() { + return id; + } + /** + * Config Category + */ + private com.oracle.bmc.fleetappsmanagement.model.ConfigCategoryDetails.ConfigCategory + configCategory; + + /** + * Config Category + */ + public com.oracle.bmc.fleetappsmanagement.model.ConfigCategoryDetails.ConfigCategory + getConfigCategory() { + return configCategory; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListPlatformConfigurationsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only resources their lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.PlatformConfiguration.LifecycleState + lifecycleState = null; + + /** + * A filter to return only resources their lifecycleState matches the given lifecycleState. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.fleetappsmanagement.model.PlatformConfiguration.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * unique PlatformConfiguration identifier + */ + private String id = null; + + /** + * unique PlatformConfiguration identifier + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * Config Category + */ + private com.oracle.bmc.fleetappsmanagement.model.ConfigCategoryDetails.ConfigCategory + configCategory = null; + + /** + * Config Category + * @param configCategory the value to set + * @return this builder instance + */ + public Builder configCategory( + com.oracle.bmc.fleetappsmanagement.model.ConfigCategoryDetails.ConfigCategory + configCategory) { + this.configCategory = configCategory; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPlatformConfigurationsRequest o) { + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + id(o.getId()); + configCategory(o.getConfigCategory()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListPlatformConfigurationsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListPlatformConfigurationsRequest + */ + public ListPlatformConfigurationsRequest build() { + ListPlatformConfigurationsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListPlatformConfigurationsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListPlatformConfigurationsRequest + */ + public ListPlatformConfigurationsRequest buildWithoutInvocationCallback() { + ListPlatformConfigurationsRequest request = new ListPlatformConfigurationsRequest(); + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.id = id; + request.configCategory = configCategory; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListPlatformConfigurationsRequest(compartmentId, lifecycleState, displayName, id, configCategory, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .lifecycleState(lifecycleState) + .displayName(displayName) + .id(id) + .configCategory(configCategory) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",configCategory=").append(String.valueOf(this.configCategory)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPlatformConfigurationsRequest)) { + return false; + } + + ListPlatformConfigurationsRequest other = (ListPlatformConfigurationsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.configCategory, other.configCategory) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.configCategory == null ? 43 : this.configCategory.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListPropertiesRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListPropertiesRequest.java new file mode 100644 index 00000000000..20b2f372044 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListPropertiesRequest.java @@ -0,0 +1,498 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListPropertiesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListPropertiesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.Property.LifecycleState lifecycleState; + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + public com.oracle.bmc.fleetappsmanagement.model.Property.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * A filter to return only resources whose Property identifier matches the given identifier. + */ + private String id; + + /** + * A filter to return only resources whose Property identifier matches the given identifier. + */ + public String getId() { + return id; + } + /** + * A filter to return only resources their scope matches the given scope. + */ + private com.oracle.bmc.fleetappsmanagement.model.Scope scope; + + /** + * A filter to return only resources their scope matches the given scope. + */ + public com.oracle.bmc.fleetappsmanagement.model.Scope getScope() { + return scope; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListPropertiesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.Property.LifecycleState lifecycleState = + null; + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.fleetappsmanagement.model.Property.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A filter to return only resources whose Property identifier matches the given identifier. + */ + private String id = null; + + /** + * A filter to return only resources whose Property identifier matches the given identifier. + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * A filter to return only resources their scope matches the given scope. + */ + private com.oracle.bmc.fleetappsmanagement.model.Scope scope = null; + + /** + * A filter to return only resources their scope matches the given scope. + * @param scope the value to set + * @return this builder instance + */ + public Builder scope(com.oracle.bmc.fleetappsmanagement.model.Scope scope) { + this.scope = scope; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPropertiesRequest o) { + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + id(o.getId()); + scope(o.getScope()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListPropertiesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListPropertiesRequest + */ + public ListPropertiesRequest build() { + ListPropertiesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListPropertiesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListPropertiesRequest + */ + public ListPropertiesRequest buildWithoutInvocationCallback() { + ListPropertiesRequest request = new ListPropertiesRequest(); + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.id = id; + request.scope = scope; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListPropertiesRequest(compartmentId, lifecycleState, displayName, id, scope, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .lifecycleState(lifecycleState) + .displayName(displayName) + .id(id) + .scope(scope) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",scope=").append(String.valueOf(this.scope)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPropertiesRequest)) { + return false; + } + + ListPropertiesRequest other = (ListPropertiesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.scope, other.scope) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.scope == null ? 43 : this.scope.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListResourcesRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListResourcesRequest.java new file mode 100644 index 00000000000..048edc40a52 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListResourcesRequest.java @@ -0,0 +1,529 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListResourcesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListResourcesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique SchedulerJob identifier + */ + private String schedulerJobId; + + /** + * unique SchedulerJob identifier + */ + public String getSchedulerJobId() { + return schedulerJobId; + } + /** + * unique jobActivity identifier + */ + private String jobActivityId; + + /** + * unique jobActivity identifier + */ + public String getJobActivityId() { + return jobActivityId; + } + /** + * Task Id + */ + private String resourceTaskId; + + /** + * Task Id + */ + public String getResourceTaskId() { + return resourceTaskId; + } + /** + * Unique step name + */ + private String stepName; + + /** + * Unique step name + */ + public String getStepName() { + return stepName; + } + /** + * Unique target name + */ + private String targetName; + + /** + * Unique target name + */ + public String getTargetName() { + return targetName; + } + /** + * Task Order Sequence + */ + private String sequence; + + /** + * Task Order Sequence + */ + public String getSequence() { + return sequence; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeStarted is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeStarted is descending. + * + **/ + public enum SortBy { + TimeStarted("timeStarted"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeStarted is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListResourcesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique SchedulerJob identifier + */ + private String schedulerJobId = null; + + /** + * unique SchedulerJob identifier + * @param schedulerJobId the value to set + * @return this builder instance + */ + public Builder schedulerJobId(String schedulerJobId) { + this.schedulerJobId = schedulerJobId; + return this; + } + + /** + * unique jobActivity identifier + */ + private String jobActivityId = null; + + /** + * unique jobActivity identifier + * @param jobActivityId the value to set + * @return this builder instance + */ + public Builder jobActivityId(String jobActivityId) { + this.jobActivityId = jobActivityId; + return this; + } + + /** + * Task Id + */ + private String resourceTaskId = null; + + /** + * Task Id + * @param resourceTaskId the value to set + * @return this builder instance + */ + public Builder resourceTaskId(String resourceTaskId) { + this.resourceTaskId = resourceTaskId; + return this; + } + + /** + * Unique step name + */ + private String stepName = null; + + /** + * Unique step name + * @param stepName the value to set + * @return this builder instance + */ + public Builder stepName(String stepName) { + this.stepName = stepName; + return this; + } + + /** + * Unique target name + */ + private String targetName = null; + + /** + * Unique target name + * @param targetName the value to set + * @return this builder instance + */ + public Builder targetName(String targetName) { + this.targetName = targetName; + return this; + } + + /** + * Task Order Sequence + */ + private String sequence = null; + + /** + * Task Order Sequence + * @param sequence the value to set + * @return this builder instance + */ + public Builder sequence(String sequence) { + this.sequence = sequence; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeStarted is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeStarted is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListResourcesRequest o) { + schedulerJobId(o.getSchedulerJobId()); + jobActivityId(o.getJobActivityId()); + resourceTaskId(o.getResourceTaskId()); + stepName(o.getStepName()); + targetName(o.getTargetName()); + sequence(o.getSequence()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListResourcesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListResourcesRequest + */ + public ListResourcesRequest build() { + ListResourcesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListResourcesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListResourcesRequest + */ + public ListResourcesRequest buildWithoutInvocationCallback() { + ListResourcesRequest request = new ListResourcesRequest(); + request.schedulerJobId = schedulerJobId; + request.jobActivityId = jobActivityId; + request.resourceTaskId = resourceTaskId; + request.stepName = stepName; + request.targetName = targetName; + request.sequence = sequence; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListResourcesRequest(schedulerJobId, jobActivityId, resourceTaskId, stepName, targetName, sequence, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulerJobId(schedulerJobId) + .jobActivityId(jobActivityId) + .resourceTaskId(resourceTaskId) + .stepName(stepName) + .targetName(targetName) + .sequence(sequence) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulerJobId=").append(String.valueOf(this.schedulerJobId)); + sb.append(",jobActivityId=").append(String.valueOf(this.jobActivityId)); + sb.append(",resourceTaskId=").append(String.valueOf(this.resourceTaskId)); + sb.append(",stepName=").append(String.valueOf(this.stepName)); + sb.append(",targetName=").append(String.valueOf(this.targetName)); + sb.append(",sequence=").append(String.valueOf(this.sequence)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListResourcesRequest)) { + return false; + } + + ListResourcesRequest other = (ListResourcesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulerJobId, other.schedulerJobId) + && java.util.Objects.equals(this.jobActivityId, other.jobActivityId) + && java.util.Objects.equals(this.resourceTaskId, other.resourceTaskId) + && java.util.Objects.equals(this.stepName, other.stepName) + && java.util.Objects.equals(this.targetName, other.targetName) + && java.util.Objects.equals(this.sequence, other.sequence) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulerJobId == null ? 43 : this.schedulerJobId.hashCode()); + result = + (result * PRIME) + + (this.jobActivityId == null ? 43 : this.jobActivityId.hashCode()); + result = + (result * PRIME) + + (this.resourceTaskId == null ? 43 : this.resourceTaskId.hashCode()); + result = (result * PRIME) + (this.stepName == null ? 43 : this.stepName.hashCode()); + result = (result * PRIME) + (this.targetName == null ? 43 : this.targetName.hashCode()); + result = (result * PRIME) + (this.sequence == null ? 43 : this.sequence.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListRunbooksRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListRunbooksRequest.java new file mode 100644 index 00000000000..12c96d0b0a3 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListRunbooksRequest.java @@ -0,0 +1,599 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListRunbooksRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListRunbooksRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.Runbook.LifecycleState lifecycleState; + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + public com.oracle.bmc.fleetappsmanagement.model.Runbook.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * A filter to return runbooks whose identifier matches the given identifier. + */ + private String id; + + /** + * A filter to return runbooks whose identifier matches the given identifier. + */ + public String getId() { + return id; + } + /** + * A filter to return runbooks whose type matches the given type. + */ + private com.oracle.bmc.fleetappsmanagement.model.Runbook.Type type; + + /** + * A filter to return runbooks whose type matches the given type. + */ + public com.oracle.bmc.fleetappsmanagement.model.Runbook.Type getType() { + return type; + } + /** + * A filter to return runbooks whose runbookRelevance matches the given runbookRelevance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Runbook.RunbookRelevance runbookRelevance; + + /** + * A filter to return runbooks whose runbookRelevance matches the given runbookRelevance. + */ + public com.oracle.bmc.fleetappsmanagement.model.Runbook.RunbookRelevance getRunbookRelevance() { + return runbookRelevance; + } + /** + * A filter to return runbooks whose platform matches the given platform. + */ + private String platform; + + /** + * A filter to return runbooks whose platform matches the given platform. + */ + public String getPlatform() { + return platform; + } + /** + * A filter to return runbooks whose operation matches the given lifecycle operation. + */ + private String operation; + + /** + * A filter to return runbooks whose operation matches the given lifecycle operation. + */ + public String getOperation() { + return operation; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListRunbooksRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.Runbook.LifecycleState lifecycleState = + null; + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.fleetappsmanagement.model.Runbook.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A filter to return runbooks whose identifier matches the given identifier. + */ + private String id = null; + + /** + * A filter to return runbooks whose identifier matches the given identifier. + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * A filter to return runbooks whose type matches the given type. + */ + private com.oracle.bmc.fleetappsmanagement.model.Runbook.Type type = null; + + /** + * A filter to return runbooks whose type matches the given type. + * @param type the value to set + * @return this builder instance + */ + public Builder type(com.oracle.bmc.fleetappsmanagement.model.Runbook.Type type) { + this.type = type; + return this; + } + + /** + * A filter to return runbooks whose runbookRelevance matches the given runbookRelevance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Runbook.RunbookRelevance runbookRelevance = + null; + + /** + * A filter to return runbooks whose runbookRelevance matches the given runbookRelevance. + * @param runbookRelevance the value to set + * @return this builder instance + */ + public Builder runbookRelevance( + com.oracle.bmc.fleetappsmanagement.model.Runbook.RunbookRelevance + runbookRelevance) { + this.runbookRelevance = runbookRelevance; + return this; + } + + /** + * A filter to return runbooks whose platform matches the given platform. + */ + private String platform = null; + + /** + * A filter to return runbooks whose platform matches the given platform. + * @param platform the value to set + * @return this builder instance + */ + public Builder platform(String platform) { + this.platform = platform; + return this; + } + + /** + * A filter to return runbooks whose operation matches the given lifecycle operation. + */ + private String operation = null; + + /** + * A filter to return runbooks whose operation matches the given lifecycle operation. + * @param operation the value to set + * @return this builder instance + */ + public Builder operation(String operation) { + this.operation = operation; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListRunbooksRequest o) { + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + id(o.getId()); + type(o.getType()); + runbookRelevance(o.getRunbookRelevance()); + platform(o.getPlatform()); + operation(o.getOperation()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListRunbooksRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListRunbooksRequest + */ + public ListRunbooksRequest build() { + ListRunbooksRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListRunbooksRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListRunbooksRequest + */ + public ListRunbooksRequest buildWithoutInvocationCallback() { + ListRunbooksRequest request = new ListRunbooksRequest(); + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.id = id; + request.type = type; + request.runbookRelevance = runbookRelevance; + request.platform = platform; + request.operation = operation; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListRunbooksRequest(compartmentId, lifecycleState, displayName, id, type, runbookRelevance, platform, operation, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .lifecycleState(lifecycleState) + .displayName(displayName) + .id(id) + .type(type) + .runbookRelevance(runbookRelevance) + .platform(platform) + .operation(operation) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",type=").append(String.valueOf(this.type)); + sb.append(",runbookRelevance=").append(String.valueOf(this.runbookRelevance)); + sb.append(",platform=").append(String.valueOf(this.platform)); + sb.append(",operation=").append(String.valueOf(this.operation)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListRunbooksRequest)) { + return false; + } + + ListRunbooksRequest other = (ListRunbooksRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.runbookRelevance, other.runbookRelevance) + && java.util.Objects.equals(this.platform, other.platform) + && java.util.Objects.equals(this.operation, other.operation) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.runbookRelevance == null ? 43 : this.runbookRelevance.hashCode()); + result = (result * PRIME) + (this.platform == null ? 43 : this.platform.hashCode()); + result = (result * PRIME) + (this.operation == null ? 43 : this.operation.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListScheduledFleetsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListScheduledFleetsRequest.java new file mode 100644 index 00000000000..d5b6e7094b7 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListScheduledFleetsRequest.java @@ -0,0 +1,433 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListScheduledFleetsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListScheduledFleetsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique SchedulerDefinition identifier + */ + private String schedulerDefinitionId; + + /** + * unique SchedulerDefinition identifier + */ + public String getSchedulerDefinitionId() { + return schedulerDefinitionId; + } + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for displayName is ascending. + * + **/ + public enum SortBy { + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListScheduledFleetsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique SchedulerDefinition identifier + */ + private String schedulerDefinitionId = null; + + /** + * unique SchedulerDefinition identifier + * @param schedulerDefinitionId the value to set + * @return this builder instance + */ + public Builder schedulerDefinitionId(String schedulerDefinitionId) { + this.schedulerDefinitionId = schedulerDefinitionId; + return this; + } + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListScheduledFleetsRequest o) { + schedulerDefinitionId(o.getSchedulerDefinitionId()); + compartmentId(o.getCompartmentId()); + displayName(o.getDisplayName()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListScheduledFleetsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListScheduledFleetsRequest + */ + public ListScheduledFleetsRequest build() { + ListScheduledFleetsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListScheduledFleetsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListScheduledFleetsRequest + */ + public ListScheduledFleetsRequest buildWithoutInvocationCallback() { + ListScheduledFleetsRequest request = new ListScheduledFleetsRequest(); + request.schedulerDefinitionId = schedulerDefinitionId; + request.compartmentId = compartmentId; + request.displayName = displayName; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListScheduledFleetsRequest(schedulerDefinitionId, compartmentId, displayName, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulerDefinitionId(schedulerDefinitionId) + .compartmentId(compartmentId) + .displayName(displayName) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulerDefinitionId=").append(String.valueOf(this.schedulerDefinitionId)); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListScheduledFleetsRequest)) { + return false; + } + + ListScheduledFleetsRequest other = (ListScheduledFleetsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulerDefinitionId, other.schedulerDefinitionId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulerDefinitionId == null + ? 43 + : this.schedulerDefinitionId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListSchedulerDefinitionsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListSchedulerDefinitionsRequest.java new file mode 100644 index 00000000000..e8976c5f6e8 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListSchedulerDefinitionsRequest.java @@ -0,0 +1,603 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListSchedulerDefinitionsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListSchedulerDefinitionsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only scheduleDefinitions whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinition.LifecycleState + lifecycleState; + + /** + * A filter to return only scheduleDefinitions whose lifecycleState matches the given lifecycleState. + */ + public com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinition.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * A filter to return only dchedule definitions whose assocaited product matches the given product + */ + private String product; + + /** + * A filter to return only dchedule definitions whose assocaited product matches the given product + */ + public String getProduct() { + return product; + } + /** + * A filter to return only schedule definitions whose identifier matches the given identifier. + */ + private String id; + + /** + * A filter to return only schedule definitions whose identifier matches the given identifier. + */ + public String getId() { + return id; + } + /** + * A filter to return only schedule definitions whose associated maintenanceWindowId matches the given maintenanceWindowId. + */ + private String maintenanceWindowId; + + /** + * A filter to return only schedule definitions whose associated maintenanceWindowId matches the given maintenanceWindowId. + */ + public String getMaintenanceWindowId() { + return maintenanceWindowId; + } + /** + * A filter to return only schedule definitions whose associated runbookId matches the given runbookId. + */ + private String runbookId; + + /** + * A filter to return only schedule definitions whose associated runbookId matches the given runbookId. + */ + public String getRunbookId() { + return runbookId; + } + /** + * unique Fleet identifier + */ + private String fleetId; + + /** + * unique Fleet identifier + */ + public String getFleetId() { + return fleetId; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated and timeOfNextRun is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated and timeOfNextRun is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + TimeOfNextRun("timeOfNextRun"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated and timeOfNextRun is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListSchedulerDefinitionsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only scheduleDefinitions whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinition.LifecycleState + lifecycleState = null; + + /** + * A filter to return only scheduleDefinitions whose lifecycleState matches the given lifecycleState. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinition.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A filter to return only dchedule definitions whose assocaited product matches the given product + */ + private String product = null; + + /** + * A filter to return only dchedule definitions whose assocaited product matches the given product + * @param product the value to set + * @return this builder instance + */ + public Builder product(String product) { + this.product = product; + return this; + } + + /** + * A filter to return only schedule definitions whose identifier matches the given identifier. + */ + private String id = null; + + /** + * A filter to return only schedule definitions whose identifier matches the given identifier. + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * A filter to return only schedule definitions whose associated maintenanceWindowId matches the given maintenanceWindowId. + */ + private String maintenanceWindowId = null; + + /** + * A filter to return only schedule definitions whose associated maintenanceWindowId matches the given maintenanceWindowId. + * @param maintenanceWindowId the value to set + * @return this builder instance + */ + public Builder maintenanceWindowId(String maintenanceWindowId) { + this.maintenanceWindowId = maintenanceWindowId; + return this; + } + + /** + * A filter to return only schedule definitions whose associated runbookId matches the given runbookId. + */ + private String runbookId = null; + + /** + * A filter to return only schedule definitions whose associated runbookId matches the given runbookId. + * @param runbookId the value to set + * @return this builder instance + */ + public Builder runbookId(String runbookId) { + this.runbookId = runbookId; + return this; + } + + /** + * unique Fleet identifier + */ + private String fleetId = null; + + /** + * unique Fleet identifier + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated and timeOfNextRun is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated and timeOfNextRun is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSchedulerDefinitionsRequest o) { + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + product(o.getProduct()); + id(o.getId()); + maintenanceWindowId(o.getMaintenanceWindowId()); + runbookId(o.getRunbookId()); + fleetId(o.getFleetId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListSchedulerDefinitionsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListSchedulerDefinitionsRequest + */ + public ListSchedulerDefinitionsRequest build() { + ListSchedulerDefinitionsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListSchedulerDefinitionsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListSchedulerDefinitionsRequest + */ + public ListSchedulerDefinitionsRequest buildWithoutInvocationCallback() { + ListSchedulerDefinitionsRequest request = new ListSchedulerDefinitionsRequest(); + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.product = product; + request.id = id; + request.maintenanceWindowId = maintenanceWindowId; + request.runbookId = runbookId; + request.fleetId = fleetId; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListSchedulerDefinitionsRequest(compartmentId, lifecycleState, displayName, product, id, maintenanceWindowId, runbookId, fleetId, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .lifecycleState(lifecycleState) + .displayName(displayName) + .product(product) + .id(id) + .maintenanceWindowId(maintenanceWindowId) + .runbookId(runbookId) + .fleetId(fleetId) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",product=").append(String.valueOf(this.product)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",maintenanceWindowId=").append(String.valueOf(this.maintenanceWindowId)); + sb.append(",runbookId=").append(String.valueOf(this.runbookId)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSchedulerDefinitionsRequest)) { + return false; + } + + ListSchedulerDefinitionsRequest other = (ListSchedulerDefinitionsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.product, other.product) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.maintenanceWindowId, other.maintenanceWindowId) + && java.util.Objects.equals(this.runbookId, other.runbookId) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.product == null ? 43 : this.product.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.maintenanceWindowId == null + ? 43 + : this.maintenanceWindowId.hashCode()); + result = (result * PRIME) + (this.runbookId == null ? 43 : this.runbookId.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListSchedulerJobsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListSchedulerJobsRequest.java new file mode 100644 index 00000000000..2a8a9060cca --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListSchedulerJobsRequest.java @@ -0,0 +1,678 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListSchedulerJobsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListSchedulerJobsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.SchedulerJob.LifecycleState lifecycleState; + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + public com.oracle.bmc.fleetappsmanagement.model.SchedulerJob.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * unique Fleet identifier + */ + private String fleetId; + + /** + * unique Fleet identifier + */ + public String getFleetId() { + return fleetId; + } + /** + * Scheduled Time + */ + private java.util.Date timeScheduledGreaterThanOrEqualTo; + + /** + * Scheduled Time + */ + public java.util.Date getTimeScheduledGreaterThanOrEqualTo() { + return timeScheduledGreaterThanOrEqualTo; + } + /** + * Scheduled Time + */ + private java.util.Date timeScheduledLessThan; + + /** + * Scheduled Time + */ + public java.util.Date getTimeScheduledLessThan() { + return timeScheduledLessThan; + } + /** + * Fetch next remediation Job + */ + private Boolean isRemediationJobNeeded; + + /** + * Fetch next remediation Job + */ + public Boolean getIsRemediationJobNeeded() { + return isRemediationJobNeeded; + } + /** + * A filter to return only resources their subState matches the given subState. + */ + private String subState; + + /** + * A filter to return only resources their subState matches the given subState. + */ + public String getSubState() { + return subState; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * unique SchedulerJob identifier + */ + private String id; + + /** + * unique SchedulerJob identifier + */ + public String getId() { + return id; + } + /** + * SchedulerJob Definition identifier + */ + private String defintionId; + + /** + * SchedulerJob Definition identifier + */ + public String getDefintionId() { + return defintionId; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated and timeScheduled is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated and timeScheduled is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + TimeScheduled("timeScheduled"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated and timeScheduled is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListSchedulerJobsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + */ + private com.oracle.bmc.fleetappsmanagement.model.SchedulerJob.LifecycleState + lifecycleState = null; + + /** + * A filter to return only resources whose lifecycleState matches the given lifecycleState. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.fleetappsmanagement.model.SchedulerJob.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * unique Fleet identifier + */ + private String fleetId = null; + + /** + * unique Fleet identifier + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * Scheduled Time + */ + private java.util.Date timeScheduledGreaterThanOrEqualTo = null; + + /** + * Scheduled Time + * @param timeScheduledGreaterThanOrEqualTo the value to set + * @return this builder instance + */ + public Builder timeScheduledGreaterThanOrEqualTo( + java.util.Date timeScheduledGreaterThanOrEqualTo) { + this.timeScheduledGreaterThanOrEqualTo = timeScheduledGreaterThanOrEqualTo; + return this; + } + + /** + * Scheduled Time + */ + private java.util.Date timeScheduledLessThan = null; + + /** + * Scheduled Time + * @param timeScheduledLessThan the value to set + * @return this builder instance + */ + public Builder timeScheduledLessThan(java.util.Date timeScheduledLessThan) { + this.timeScheduledLessThan = timeScheduledLessThan; + return this; + } + + /** + * Fetch next remediation Job + */ + private Boolean isRemediationJobNeeded = null; + + /** + * Fetch next remediation Job + * @param isRemediationJobNeeded the value to set + * @return this builder instance + */ + public Builder isRemediationJobNeeded(Boolean isRemediationJobNeeded) { + this.isRemediationJobNeeded = isRemediationJobNeeded; + return this; + } + + /** + * A filter to return only resources their subState matches the given subState. + */ + private String subState = null; + + /** + * A filter to return only resources their subState matches the given subState. + * @param subState the value to set + * @return this builder instance + */ + public Builder subState(String subState) { + this.subState = subState; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * unique SchedulerJob identifier + */ + private String id = null; + + /** + * unique SchedulerJob identifier + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * SchedulerJob Definition identifier + */ + private String defintionId = null; + + /** + * SchedulerJob Definition identifier + * @param defintionId the value to set + * @return this builder instance + */ + public Builder defintionId(String defintionId) { + this.defintionId = defintionId; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated and timeScheduled is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated and timeScheduled is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSchedulerJobsRequest o) { + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + fleetId(o.getFleetId()); + timeScheduledGreaterThanOrEqualTo(o.getTimeScheduledGreaterThanOrEqualTo()); + timeScheduledLessThan(o.getTimeScheduledLessThan()); + isRemediationJobNeeded(o.getIsRemediationJobNeeded()); + subState(o.getSubState()); + displayName(o.getDisplayName()); + id(o.getId()); + defintionId(o.getDefintionId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListSchedulerJobsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListSchedulerJobsRequest + */ + public ListSchedulerJobsRequest build() { + ListSchedulerJobsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListSchedulerJobsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListSchedulerJobsRequest + */ + public ListSchedulerJobsRequest buildWithoutInvocationCallback() { + ListSchedulerJobsRequest request = new ListSchedulerJobsRequest(); + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.fleetId = fleetId; + request.timeScheduledGreaterThanOrEqualTo = timeScheduledGreaterThanOrEqualTo; + request.timeScheduledLessThan = timeScheduledLessThan; + request.isRemediationJobNeeded = isRemediationJobNeeded; + request.subState = subState; + request.displayName = displayName; + request.id = id; + request.defintionId = defintionId; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListSchedulerJobsRequest(compartmentId, lifecycleState, fleetId, timeScheduledGreaterThanOrEqualTo, timeScheduledLessThan, isRemediationJobNeeded, subState, displayName, id, defintionId, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .lifecycleState(lifecycleState) + .fleetId(fleetId) + .timeScheduledGreaterThanOrEqualTo(timeScheduledGreaterThanOrEqualTo) + .timeScheduledLessThan(timeScheduledLessThan) + .isRemediationJobNeeded(isRemediationJobNeeded) + .subState(subState) + .displayName(displayName) + .id(id) + .defintionId(defintionId) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",timeScheduledGreaterThanOrEqualTo=") + .append(String.valueOf(this.timeScheduledGreaterThanOrEqualTo)); + sb.append(",timeScheduledLessThan=").append(String.valueOf(this.timeScheduledLessThan)); + sb.append(",isRemediationJobNeeded=").append(String.valueOf(this.isRemediationJobNeeded)); + sb.append(",subState=").append(String.valueOf(this.subState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",defintionId=").append(String.valueOf(this.defintionId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSchedulerJobsRequest)) { + return false; + } + + ListSchedulerJobsRequest other = (ListSchedulerJobsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals( + this.timeScheduledGreaterThanOrEqualTo, + other.timeScheduledGreaterThanOrEqualTo) + && java.util.Objects.equals(this.timeScheduledLessThan, other.timeScheduledLessThan) + && java.util.Objects.equals( + this.isRemediationJobNeeded, other.isRemediationJobNeeded) + && java.util.Objects.equals(this.subState, other.subState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.defintionId, other.defintionId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.timeScheduledGreaterThanOrEqualTo == null + ? 43 + : this.timeScheduledGreaterThanOrEqualTo.hashCode()); + result = + (result * PRIME) + + (this.timeScheduledLessThan == null + ? 43 + : this.timeScheduledLessThan.hashCode()); + result = + (result * PRIME) + + (this.isRemediationJobNeeded == null + ? 43 + : this.isRemediationJobNeeded.hashCode()); + result = (result * PRIME) + (this.subState == null ? 43 : this.subState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.defintionId == null ? 43 : this.defintionId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListStepsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListStepsRequest.java new file mode 100644 index 00000000000..6ebbbef0205 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListStepsRequest.java @@ -0,0 +1,529 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListStepsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListStepsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * unique SchedulerJob identifier + */ + private String schedulerJobId; + + /** + * unique SchedulerJob identifier + */ + public String getSchedulerJobId() { + return schedulerJobId; + } + /** + * unique jobActivity identifier + */ + private String jobActivityId; + + /** + * unique jobActivity identifier + */ + public String getJobActivityId() { + return jobActivityId; + } + /** + * Task Id + */ + private String resourceTaskId; + + /** + * Task Id + */ + public String getResourceTaskId() { + return resourceTaskId; + } + /** + * Unique step name + */ + private String stepName; + + /** + * Unique step name + */ + public String getStepName() { + return stepName; + } + /** + * Unique target name + */ + private String targetName; + + /** + * Unique target name + */ + public String getTargetName() { + return targetName; + } + /** + * Task Order Sequence + */ + private String sequence; + + /** + * Task Order Sequence + */ + public String getSequence() { + return sequence; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeStarted is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeStarted is descending. + * + **/ + public enum SortBy { + TimeStarted("timeStarted"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeStarted is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListStepsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique SchedulerJob identifier + */ + private String schedulerJobId = null; + + /** + * unique SchedulerJob identifier + * @param schedulerJobId the value to set + * @return this builder instance + */ + public Builder schedulerJobId(String schedulerJobId) { + this.schedulerJobId = schedulerJobId; + return this; + } + + /** + * unique jobActivity identifier + */ + private String jobActivityId = null; + + /** + * unique jobActivity identifier + * @param jobActivityId the value to set + * @return this builder instance + */ + public Builder jobActivityId(String jobActivityId) { + this.jobActivityId = jobActivityId; + return this; + } + + /** + * Task Id + */ + private String resourceTaskId = null; + + /** + * Task Id + * @param resourceTaskId the value to set + * @return this builder instance + */ + public Builder resourceTaskId(String resourceTaskId) { + this.resourceTaskId = resourceTaskId; + return this; + } + + /** + * Unique step name + */ + private String stepName = null; + + /** + * Unique step name + * @param stepName the value to set + * @return this builder instance + */ + public Builder stepName(String stepName) { + this.stepName = stepName; + return this; + } + + /** + * Unique target name + */ + private String targetName = null; + + /** + * Unique target name + * @param targetName the value to set + * @return this builder instance + */ + public Builder targetName(String targetName) { + this.targetName = targetName; + return this; + } + + /** + * Task Order Sequence + */ + private String sequence = null; + + /** + * Task Order Sequence + * @param sequence the value to set + * @return this builder instance + */ + public Builder sequence(String sequence) { + this.sequence = sequence; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeStarted is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeStarted is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListStepsRequest o) { + schedulerJobId(o.getSchedulerJobId()); + jobActivityId(o.getJobActivityId()); + resourceTaskId(o.getResourceTaskId()); + stepName(o.getStepName()); + targetName(o.getTargetName()); + sequence(o.getSequence()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListStepsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListStepsRequest + */ + public ListStepsRequest build() { + ListStepsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListStepsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListStepsRequest + */ + public ListStepsRequest buildWithoutInvocationCallback() { + ListStepsRequest request = new ListStepsRequest(); + request.schedulerJobId = schedulerJobId; + request.jobActivityId = jobActivityId; + request.resourceTaskId = resourceTaskId; + request.stepName = stepName; + request.targetName = targetName; + request.sequence = sequence; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListStepsRequest(schedulerJobId, jobActivityId, resourceTaskId, stepName, targetName, sequence, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulerJobId(schedulerJobId) + .jobActivityId(jobActivityId) + .resourceTaskId(resourceTaskId) + .stepName(stepName) + .targetName(targetName) + .sequence(sequence) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulerJobId=").append(String.valueOf(this.schedulerJobId)); + sb.append(",jobActivityId=").append(String.valueOf(this.jobActivityId)); + sb.append(",resourceTaskId=").append(String.valueOf(this.resourceTaskId)); + sb.append(",stepName=").append(String.valueOf(this.stepName)); + sb.append(",targetName=").append(String.valueOf(this.targetName)); + sb.append(",sequence=").append(String.valueOf(this.sequence)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListStepsRequest)) { + return false; + } + + ListStepsRequest other = (ListStepsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulerJobId, other.schedulerJobId) + && java.util.Objects.equals(this.jobActivityId, other.jobActivityId) + && java.util.Objects.equals(this.resourceTaskId, other.resourceTaskId) + && java.util.Objects.equals(this.stepName, other.stepName) + && java.util.Objects.equals(this.targetName, other.targetName) + && java.util.Objects.equals(this.sequence, other.sequence) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulerJobId == null ? 43 : this.schedulerJobId.hashCode()); + result = + (result * PRIME) + + (this.jobActivityId == null ? 43 : this.jobActivityId.hashCode()); + result = + (result * PRIME) + + (this.resourceTaskId == null ? 43 : this.resourceTaskId.hashCode()); + result = (result * PRIME) + (this.stepName == null ? 43 : this.stepName.hashCode()); + result = (result * PRIME) + (this.targetName == null ? 43 : this.targetName.hashCode()); + result = (result * PRIME) + (this.sequence == null ? 43 : this.sequence.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListTargetsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListTargetsRequest.java new file mode 100644 index 00000000000..b9275f32226 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListTargetsRequest.java @@ -0,0 +1,396 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListTargetsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListTargetsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListTargetsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListTargetsRequest o) { + fleetId(o.getFleetId()); + displayName(o.getDisplayName()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListTargetsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListTargetsRequest + */ + public ListTargetsRequest build() { + ListTargetsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListTargetsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListTargetsRequest + */ + public ListTargetsRequest buildWithoutInvocationCallback() { + ListTargetsRequest request = new ListTargetsRequest(); + request.fleetId = fleetId; + request.displayName = displayName; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListTargetsRequest(fleetId, displayName, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fleetId(fleetId) + .displayName(displayName) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListTargetsRequest)) { + return false; + } + + ListTargetsRequest other = (ListTargetsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListTaskRecordsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListTaskRecordsRequest.java new file mode 100644 index 00000000000..866be4d61aa --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListTaskRecordsRequest.java @@ -0,0 +1,530 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListTaskRecordsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListTaskRecordsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The platform for the Task. + */ + private String platform; + + /** + * The platform for the Task. + */ + public String getPlatform() { + return platform; + } + /** + * The type of the Task. + */ + private com.oracle.bmc.fleetappsmanagement.model.TaskRecord.Type type; + + /** + * The type of the Task. + */ + public com.oracle.bmc.fleetappsmanagement.model.TaskRecord.Type getType() { + return type; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * unique TaskDetail identifier + */ + private String id; + + /** + * unique TaskDetail identifier + */ + public String getId() { + return id; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The current state of the Task. + */ + private com.oracle.bmc.fleetappsmanagement.model.TaskRecord.LifecycleState lifecycleState; + + /** + * The current state of the Task. + */ + public com.oracle.bmc.fleetappsmanagement.model.TaskRecord.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListTaskRecordsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The platform for the Task. + */ + private String platform = null; + + /** + * The platform for the Task. + * @param platform the value to set + * @return this builder instance + */ + public Builder platform(String platform) { + this.platform = platform; + return this; + } + + /** + * The type of the Task. + */ + private com.oracle.bmc.fleetappsmanagement.model.TaskRecord.Type type = null; + + /** + * The type of the Task. + * @param type the value to set + * @return this builder instance + */ + public Builder type(com.oracle.bmc.fleetappsmanagement.model.TaskRecord.Type type) { + this.type = type; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * unique TaskDetail identifier + */ + private String id = null; + + /** + * unique TaskDetail identifier + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The current state of the Task. + */ + private com.oracle.bmc.fleetappsmanagement.model.TaskRecord.LifecycleState lifecycleState = + null; + + /** + * The current state of the Task. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.fleetappsmanagement.model.TaskRecord.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListTaskRecordsRequest o) { + compartmentId(o.getCompartmentId()); + platform(o.getPlatform()); + type(o.getType()); + displayName(o.getDisplayName()); + id(o.getId()); + limit(o.getLimit()); + page(o.getPage()); + lifecycleState(o.getLifecycleState()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListTaskRecordsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListTaskRecordsRequest + */ + public ListTaskRecordsRequest build() { + ListTaskRecordsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListTaskRecordsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListTaskRecordsRequest + */ + public ListTaskRecordsRequest buildWithoutInvocationCallback() { + ListTaskRecordsRequest request = new ListTaskRecordsRequest(); + request.compartmentId = compartmentId; + request.platform = platform; + request.type = type; + request.displayName = displayName; + request.id = id; + request.limit = limit; + request.page = page; + request.lifecycleState = lifecycleState; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.opcRequestId = opcRequestId; + return request; + // new ListTaskRecordsRequest(compartmentId, platform, type, displayName, id, limit, page, lifecycleState, sortBy, sortOrder, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .platform(platform) + .type(type) + .displayName(displayName) + .id(id) + .limit(limit) + .page(page) + .lifecycleState(lifecycleState) + .sortBy(sortBy) + .sortOrder(sortOrder) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",platform=").append(String.valueOf(this.platform)); + sb.append(",type=").append(String.valueOf(this.type)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListTaskRecordsRequest)) { + return false; + } + + ListTaskRecordsRequest other = (ListTaskRecordsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.platform, other.platform) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.platform == null ? 43 : this.platform.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListWorkRequestErrorsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListWorkRequestErrorsRequest.java new file mode 100644 index 00000000000..b4c7638afb4 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListWorkRequestErrorsRequest.java @@ -0,0 +1,366 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListWorkRequestErrorsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListWorkRequestErrorsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the asynchronous request. + */ + private String workRequestId; + + /** + * The ID of the asynchronous request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + **/ + public enum SortBy { + Timestamp("timestamp"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListWorkRequestErrorsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the asynchronous request. + */ + private String workRequestId = null; + + /** + * The ID of the asynchronous request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestErrorsRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListWorkRequestErrorsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListWorkRequestErrorsRequest + */ + public ListWorkRequestErrorsRequest build() { + ListWorkRequestErrorsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListWorkRequestErrorsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListWorkRequestErrorsRequest + */ + public ListWorkRequestErrorsRequest buildWithoutInvocationCallback() { + ListWorkRequestErrorsRequest request = new ListWorkRequestErrorsRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListWorkRequestErrorsRequest(workRequestId, opcRequestId, page, limit, sortBy, sortOrder); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .workRequestId(workRequestId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortBy(sortBy) + .sortOrder(sortOrder); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListWorkRequestErrorsRequest)) { + return false; + } + + ListWorkRequestErrorsRequest other = (ListWorkRequestErrorsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListWorkRequestLogsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListWorkRequestLogsRequest.java new file mode 100644 index 00000000000..21baf039a55 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListWorkRequestLogsRequest.java @@ -0,0 +1,365 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListWorkRequestLogsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListWorkRequestLogsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the asynchronous request. + */ + private String workRequestId; + + /** + * The ID of the asynchronous request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + **/ + public enum SortBy { + Timestamp("timestamp"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListWorkRequestLogsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the asynchronous request. + */ + private String workRequestId = null; + + /** + * The ID of the asynchronous request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestLogsRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListWorkRequestLogsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListWorkRequestLogsRequest + */ + public ListWorkRequestLogsRequest build() { + ListWorkRequestLogsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListWorkRequestLogsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListWorkRequestLogsRequest + */ + public ListWorkRequestLogsRequest buildWithoutInvocationCallback() { + ListWorkRequestLogsRequest request = new ListWorkRequestLogsRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListWorkRequestLogsRequest(workRequestId, opcRequestId, page, limit, sortBy, sortOrder); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .workRequestId(workRequestId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortBy(sortBy) + .sortOrder(sortOrder); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListWorkRequestLogsRequest)) { + return false; + } + + ListWorkRequestLogsRequest other = (ListWorkRequestLogsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListWorkRequestsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListWorkRequestsRequest.java new file mode 100644 index 00000000000..c3837e34253 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ListWorkRequestsRequest.java @@ -0,0 +1,463 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ListWorkRequestsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListWorkRequestsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The ID of the asynchronous work request. + */ + private String workRequestId; + + /** + * The ID of the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * A filter to return only resources their lifecycleState matches the given OperationStatus. + */ + private com.oracle.bmc.fleetappsmanagement.model.OperationStatus status; + + /** + * A filter to return only resources their lifecycleState matches the given OperationStatus. + */ + public com.oracle.bmc.fleetappsmanagement.model.OperationStatus getStatus() { + return status; + } + /** + * Resource Identifier + */ + private String resourceId; + + /** + * Resource Identifier + */ + public String getResourceId() { + return resourceId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + * + **/ + public enum SortBy { + TimeAccepted("timeAccepted"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListWorkRequestsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The ID of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The ID of the asynchronous work request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * A filter to return only resources their lifecycleState matches the given OperationStatus. + */ + private com.oracle.bmc.fleetappsmanagement.model.OperationStatus status = null; + + /** + * A filter to return only resources their lifecycleState matches the given OperationStatus. + * @param status the value to set + * @return this builder instance + */ + public Builder status(com.oracle.bmc.fleetappsmanagement.model.OperationStatus status) { + this.status = status; + return this; + } + + /** + * Resource Identifier + */ + private String resourceId = null; + + /** + * Resource Identifier + * @param resourceId the value to set + * @return this builder instance + */ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestsRequest o) { + compartmentId(o.getCompartmentId()); + workRequestId(o.getWorkRequestId()); + status(o.getStatus()); + resourceId(o.getResourceId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListWorkRequestsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListWorkRequestsRequest + */ + public ListWorkRequestsRequest build() { + ListWorkRequestsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListWorkRequestsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListWorkRequestsRequest + */ + public ListWorkRequestsRequest buildWithoutInvocationCallback() { + ListWorkRequestsRequest request = new ListWorkRequestsRequest(); + request.compartmentId = compartmentId; + request.workRequestId = workRequestId; + request.status = status; + request.resourceId = resourceId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + return request; + // new ListWorkRequestsRequest(compartmentId, workRequestId, status, resourceId, opcRequestId, page, limit, sortOrder, sortBy); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .workRequestId(workRequestId) + .status(status) + .resourceId(resourceId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortOrder(sortOrder) + .sortBy(sortBy); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",status=").append(String.valueOf(this.status)); + sb.append(",resourceId=").append(String.valueOf(this.resourceId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListWorkRequestsRequest)) { + return false; + } + + ListWorkRequestsRequest other = (ListWorkRequestsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ManageJobExecutionRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ManageJobExecutionRequest.java new file mode 100644 index 00000000000..f4c210c4c57 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ManageJobExecutionRequest.java @@ -0,0 +1,371 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ManageJobExecutionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ManageJobExecutionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.ManageJobExecutionDetails> { + + /** + * Details for confirming Targets. + */ + private com.oracle.bmc.fleetappsmanagement.model.ManageJobExecutionDetails + manageJobExecutionDetails; + + /** + * Details for confirming Targets. + */ + public com.oracle.bmc.fleetappsmanagement.model.ManageJobExecutionDetails + getManageJobExecutionDetails() { + return manageJobExecutionDetails; + } + /** + * unique SchedulerJob identifier + */ + private String schedulerJobId; + + /** + * unique SchedulerJob identifier + */ + public String getSchedulerJobId() { + return schedulerJobId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.ManageJobExecutionDetails getBody$() { + return manageJobExecutionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ManageJobExecutionRequest, + com.oracle.bmc.fleetappsmanagement.model.ManageJobExecutionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for confirming Targets. + */ + private com.oracle.bmc.fleetappsmanagement.model.ManageJobExecutionDetails + manageJobExecutionDetails = null; + + /** + * Details for confirming Targets. + * @param manageJobExecutionDetails the value to set + * @return this builder instance + */ + public Builder manageJobExecutionDetails( + com.oracle.bmc.fleetappsmanagement.model.ManageJobExecutionDetails + manageJobExecutionDetails) { + this.manageJobExecutionDetails = manageJobExecutionDetails; + return this; + } + + /** + * unique SchedulerJob identifier + */ + private String schedulerJobId = null; + + /** + * unique SchedulerJob identifier + * @param schedulerJobId the value to set + * @return this builder instance + */ + public Builder schedulerJobId(String schedulerJobId) { + this.schedulerJobId = schedulerJobId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ManageJobExecutionRequest o) { + manageJobExecutionDetails(o.getManageJobExecutionDetails()); + schedulerJobId(o.getSchedulerJobId()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ManageJobExecutionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ManageJobExecutionRequest + */ + public ManageJobExecutionRequest build() { + ManageJobExecutionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.ManageJobExecutionDetails body) { + manageJobExecutionDetails(body); + return this; + } + + /** + * Build the instance of ManageJobExecutionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ManageJobExecutionRequest + */ + public ManageJobExecutionRequest buildWithoutInvocationCallback() { + ManageJobExecutionRequest request = new ManageJobExecutionRequest(); + request.manageJobExecutionDetails = manageJobExecutionDetails; + request.schedulerJobId = schedulerJobId; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new ManageJobExecutionRequest(manageJobExecutionDetails, schedulerJobId, opcRetryToken, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .manageJobExecutionDetails(manageJobExecutionDetails) + .schedulerJobId(schedulerJobId) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",manageJobExecutionDetails=") + .append(String.valueOf(this.manageJobExecutionDetails)); + sb.append(",schedulerJobId=").append(String.valueOf(this.schedulerJobId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ManageJobExecutionRequest)) { + return false; + } + + ManageJobExecutionRequest other = (ManageJobExecutionRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.manageJobExecutionDetails, other.manageJobExecutionDetails) + && java.util.Objects.equals(this.schedulerJobId, other.schedulerJobId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.manageJobExecutionDetails == null + ? 43 + : this.manageJobExecutionDetails.hashCode()); + result = + (result * PRIME) + + (this.schedulerJobId == null ? 43 : this.schedulerJobId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ManageSettingsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ManageSettingsRequest.java new file mode 100644 index 00000000000..8a87a0a7db4 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/ManageSettingsRequest.java @@ -0,0 +1,365 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use ManageSettingsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ManageSettingsRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.ManageSettingsDetails> { + + /** + * A filter to return resources whose Onboarding identifier matches the given identifier. + */ + private String onboardingId; + + /** + * A filter to return resources whose Onboarding identifier matches the given identifier. + */ + public String getOnboardingId() { + return onboardingId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.ManageSettingsDetails manageSettingsDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.fleetappsmanagement.model.ManageSettingsDetails + getManageSettingsDetails() { + return manageSettingsDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.ManageSettingsDetails getBody$() { + return manageSettingsDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ManageSettingsRequest, + com.oracle.bmc.fleetappsmanagement.model.ManageSettingsDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * A filter to return resources whose Onboarding identifier matches the given identifier. + */ + private String onboardingId = null; + + /** + * A filter to return resources whose Onboarding identifier matches the given identifier. + * @param onboardingId the value to set + * @return this builder instance + */ + public Builder onboardingId(String onboardingId) { + this.onboardingId = onboardingId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.ManageSettingsDetails + manageSettingsDetails = null; + + /** + * The information to be updated. + * @param manageSettingsDetails the value to set + * @return this builder instance + */ + public Builder manageSettingsDetails( + com.oracle.bmc.fleetappsmanagement.model.ManageSettingsDetails + manageSettingsDetails) { + this.manageSettingsDetails = manageSettingsDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ManageSettingsRequest o) { + onboardingId(o.getOnboardingId()); + manageSettingsDetails(o.getManageSettingsDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ManageSettingsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ManageSettingsRequest + */ + public ManageSettingsRequest build() { + ManageSettingsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.fleetappsmanagement.model.ManageSettingsDetails body) { + manageSettingsDetails(body); + return this; + } + + /** + * Build the instance of ManageSettingsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ManageSettingsRequest + */ + public ManageSettingsRequest buildWithoutInvocationCallback() { + ManageSettingsRequest request = new ManageSettingsRequest(); + request.onboardingId = onboardingId; + request.manageSettingsDetails = manageSettingsDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new ManageSettingsRequest(onboardingId, manageSettingsDetails, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .onboardingId(onboardingId) + .manageSettingsDetails(manageSettingsDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",onboardingId=").append(String.valueOf(this.onboardingId)); + sb.append(",manageSettingsDetails=").append(String.valueOf(this.manageSettingsDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ManageSettingsRequest)) { + return false; + } + + ManageSettingsRequest other = (ManageSettingsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.onboardingId, other.onboardingId) + && java.util.Objects.equals(this.manageSettingsDetails, other.manageSettingsDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.onboardingId == null ? 43 : this.onboardingId.hashCode()); + result = + (result * PRIME) + + (this.manageSettingsDetails == null + ? 43 + : this.manageSettingsDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/PublishRunbookRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/PublishRunbookRequest.java new file mode 100644 index 00000000000..0aeb98ee097 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/PublishRunbookRequest.java @@ -0,0 +1,333 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use PublishRunbookRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class PublishRunbookRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.PublishRunbookDetails> { + + /** + * Details for publishing the Runbook. + */ + private com.oracle.bmc.fleetappsmanagement.model.PublishRunbookDetails publishRunbookDetails; + + /** + * Details for publishing the Runbook. + */ + public com.oracle.bmc.fleetappsmanagement.model.PublishRunbookDetails + getPublishRunbookDetails() { + return publishRunbookDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.PublishRunbookDetails getBody$() { + return publishRunbookDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + PublishRunbookRequest, + com.oracle.bmc.fleetappsmanagement.model.PublishRunbookDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for publishing the Runbook. + */ + private com.oracle.bmc.fleetappsmanagement.model.PublishRunbookDetails + publishRunbookDetails = null; + + /** + * Details for publishing the Runbook. + * @param publishRunbookDetails the value to set + * @return this builder instance + */ + public Builder publishRunbookDetails( + com.oracle.bmc.fleetappsmanagement.model.PublishRunbookDetails + publishRunbookDetails) { + this.publishRunbookDetails = publishRunbookDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(PublishRunbookRequest o) { + publishRunbookDetails(o.getPublishRunbookDetails()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of PublishRunbookRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of PublishRunbookRequest + */ + public PublishRunbookRequest build() { + PublishRunbookRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.fleetappsmanagement.model.PublishRunbookDetails body) { + publishRunbookDetails(body); + return this; + } + + /** + * Build the instance of PublishRunbookRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of PublishRunbookRequest + */ + public PublishRunbookRequest buildWithoutInvocationCallback() { + PublishRunbookRequest request = new PublishRunbookRequest(); + request.publishRunbookDetails = publishRunbookDetails; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new PublishRunbookRequest(publishRunbookDetails, opcRetryToken, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .publishRunbookDetails(publishRunbookDetails) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",publishRunbookDetails=").append(String.valueOf(this.publishRunbookDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PublishRunbookRequest)) { + return false; + } + + PublishRunbookRequest other = (PublishRunbookRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.publishRunbookDetails, other.publishRunbookDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.publishRunbookDetails == null + ? 43 + : this.publishRunbookDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/RequestResourceValidationRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/RequestResourceValidationRequest.java new file mode 100644 index 00000000000..d52edc8dcbe --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/RequestResourceValidationRequest.java @@ -0,0 +1,318 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use RequestResourceValidationRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class RequestResourceValidationRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.RequestResourceValidationDetails> { + + /** + * Details for requesting resource validation. + */ + private com.oracle.bmc.fleetappsmanagement.model.RequestResourceValidationDetails + requestResourceValidationDetails; + + /** + * Details for requesting resource validation. + */ + public com.oracle.bmc.fleetappsmanagement.model.RequestResourceValidationDetails + getRequestResourceValidationDetails() { + return requestResourceValidationDetails; + } + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.RequestResourceValidationDetails getBody$() { + return requestResourceValidationDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RequestResourceValidationRequest, + com.oracle.bmc.fleetappsmanagement.model.RequestResourceValidationDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for requesting resource validation. + */ + private com.oracle.bmc.fleetappsmanagement.model.RequestResourceValidationDetails + requestResourceValidationDetails = null; + + /** + * Details for requesting resource validation. + * @param requestResourceValidationDetails the value to set + * @return this builder instance + */ + public Builder requestResourceValidationDetails( + com.oracle.bmc.fleetappsmanagement.model.RequestResourceValidationDetails + requestResourceValidationDetails) { + this.requestResourceValidationDetails = requestResourceValidationDetails; + return this; + } + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RequestResourceValidationRequest o) { + requestResourceValidationDetails(o.getRequestResourceValidationDetails()); + fleetId(o.getFleetId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RequestResourceValidationRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RequestResourceValidationRequest + */ + public RequestResourceValidationRequest build() { + RequestResourceValidationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.RequestResourceValidationDetails body) { + requestResourceValidationDetails(body); + return this; + } + + /** + * Build the instance of RequestResourceValidationRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RequestResourceValidationRequest + */ + public RequestResourceValidationRequest buildWithoutInvocationCallback() { + RequestResourceValidationRequest request = new RequestResourceValidationRequest(); + request.requestResourceValidationDetails = requestResourceValidationDetails; + request.fleetId = fleetId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new RequestResourceValidationRequest(requestResourceValidationDetails, fleetId, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .requestResourceValidationDetails(requestResourceValidationDetails) + .fleetId(fleetId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",requestResourceValidationDetails=") + .append(String.valueOf(this.requestResourceValidationDetails)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RequestResourceValidationRequest)) { + return false; + } + + RequestResourceValidationRequest other = (RequestResourceValidationRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.requestResourceValidationDetails, + other.requestResourceValidationDetails) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.requestResourceValidationDetails == null + ? 43 + : this.requestResourceValidationDetails.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/RequestTargetDiscoveryRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/RequestTargetDiscoveryRequest.java new file mode 100644 index 00000000000..4bce9ba3922 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/RequestTargetDiscoveryRequest.java @@ -0,0 +1,317 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use RequestTargetDiscoveryRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class RequestTargetDiscoveryRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.RequestTargetDiscoveryDetails> { + + /** + * Details for requesting target discovery. + */ + private com.oracle.bmc.fleetappsmanagement.model.RequestTargetDiscoveryDetails + requestTargetDiscoveryDetails; + + /** + * Details for requesting target discovery. + */ + public com.oracle.bmc.fleetappsmanagement.model.RequestTargetDiscoveryDetails + getRequestTargetDiscoveryDetails() { + return requestTargetDiscoveryDetails; + } + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.RequestTargetDiscoveryDetails getBody$() { + return requestTargetDiscoveryDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RequestTargetDiscoveryRequest, + com.oracle.bmc.fleetappsmanagement.model.RequestTargetDiscoveryDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for requesting target discovery. + */ + private com.oracle.bmc.fleetappsmanagement.model.RequestTargetDiscoveryDetails + requestTargetDiscoveryDetails = null; + + /** + * Details for requesting target discovery. + * @param requestTargetDiscoveryDetails the value to set + * @return this builder instance + */ + public Builder requestTargetDiscoveryDetails( + com.oracle.bmc.fleetappsmanagement.model.RequestTargetDiscoveryDetails + requestTargetDiscoveryDetails) { + this.requestTargetDiscoveryDetails = requestTargetDiscoveryDetails; + return this; + } + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RequestTargetDiscoveryRequest o) { + requestTargetDiscoveryDetails(o.getRequestTargetDiscoveryDetails()); + fleetId(o.getFleetId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RequestTargetDiscoveryRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RequestTargetDiscoveryRequest + */ + public RequestTargetDiscoveryRequest build() { + RequestTargetDiscoveryRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.RequestTargetDiscoveryDetails body) { + requestTargetDiscoveryDetails(body); + return this; + } + + /** + * Build the instance of RequestTargetDiscoveryRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RequestTargetDiscoveryRequest + */ + public RequestTargetDiscoveryRequest buildWithoutInvocationCallback() { + RequestTargetDiscoveryRequest request = new RequestTargetDiscoveryRequest(); + request.requestTargetDiscoveryDetails = requestTargetDiscoveryDetails; + request.fleetId = fleetId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new RequestTargetDiscoveryRequest(requestTargetDiscoveryDetails, fleetId, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .requestTargetDiscoveryDetails(requestTargetDiscoveryDetails) + .fleetId(fleetId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",requestTargetDiscoveryDetails=") + .append(String.valueOf(this.requestTargetDiscoveryDetails)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RequestTargetDiscoveryRequest)) { + return false; + } + + RequestTargetDiscoveryRequest other = (RequestTargetDiscoveryRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.requestTargetDiscoveryDetails, other.requestTargetDiscoveryDetails) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.requestTargetDiscoveryDetails == null + ? 43 + : this.requestTargetDiscoveryDetails.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/SetDefaultRunbookRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/SetDefaultRunbookRequest.java new file mode 100644 index 00000000000..5ef354bab02 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/SetDefaultRunbookRequest.java @@ -0,0 +1,337 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use SetDefaultRunbookRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class SetDefaultRunbookRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.SetDefaultRunbookDetails> { + + /** + * Details for setting the Runbook as default. + */ + private com.oracle.bmc.fleetappsmanagement.model.SetDefaultRunbookDetails + setDefaultRunbookDetails; + + /** + * Details for setting the Runbook as default. + */ + public com.oracle.bmc.fleetappsmanagement.model.SetDefaultRunbookDetails + getSetDefaultRunbookDetails() { + return setDefaultRunbookDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.SetDefaultRunbookDetails getBody$() { + return setDefaultRunbookDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + SetDefaultRunbookRequest, + com.oracle.bmc.fleetappsmanagement.model.SetDefaultRunbookDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for setting the Runbook as default. + */ + private com.oracle.bmc.fleetappsmanagement.model.SetDefaultRunbookDetails + setDefaultRunbookDetails = null; + + /** + * Details for setting the Runbook as default. + * @param setDefaultRunbookDetails the value to set + * @return this builder instance + */ + public Builder setDefaultRunbookDetails( + com.oracle.bmc.fleetappsmanagement.model.SetDefaultRunbookDetails + setDefaultRunbookDetails) { + this.setDefaultRunbookDetails = setDefaultRunbookDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SetDefaultRunbookRequest o) { + setDefaultRunbookDetails(o.getSetDefaultRunbookDetails()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of SetDefaultRunbookRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of SetDefaultRunbookRequest + */ + public SetDefaultRunbookRequest build() { + SetDefaultRunbookRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.SetDefaultRunbookDetails body) { + setDefaultRunbookDetails(body); + return this; + } + + /** + * Build the instance of SetDefaultRunbookRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of SetDefaultRunbookRequest + */ + public SetDefaultRunbookRequest buildWithoutInvocationCallback() { + SetDefaultRunbookRequest request = new SetDefaultRunbookRequest(); + request.setDefaultRunbookDetails = setDefaultRunbookDetails; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new SetDefaultRunbookRequest(setDefaultRunbookDetails, opcRetryToken, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .setDefaultRunbookDetails(setDefaultRunbookDetails) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",setDefaultRunbookDetails=") + .append(String.valueOf(this.setDefaultRunbookDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SetDefaultRunbookRequest)) { + return false; + } + + SetDefaultRunbookRequest other = (SetDefaultRunbookRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.setDefaultRunbookDetails, other.setDefaultRunbookDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.setDefaultRunbookDetails == null + ? 43 + : this.setDefaultRunbookDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/SummarizeComplianceRecordCountsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/SummarizeComplianceRecordCountsRequest.java new file mode 100644 index 00000000000..e589553d9fd --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/SummarizeComplianceRecordCountsRequest.java @@ -0,0 +1,295 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use SummarizeComplianceRecordCountsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class SummarizeComplianceRecordCountsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + SummarizeComplianceRecordCountsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SummarizeComplianceRecordCountsRequest o) { + compartmentId(o.getCompartmentId()); + opcRequestId(o.getOpcRequestId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of SummarizeComplianceRecordCountsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of SummarizeComplianceRecordCountsRequest + */ + public SummarizeComplianceRecordCountsRequest build() { + SummarizeComplianceRecordCountsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of SummarizeComplianceRecordCountsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of SummarizeComplianceRecordCountsRequest + */ + public SummarizeComplianceRecordCountsRequest buildWithoutInvocationCallback() { + SummarizeComplianceRecordCountsRequest request = + new SummarizeComplianceRecordCountsRequest(); + request.compartmentId = compartmentId; + request.opcRequestId = opcRequestId; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + return request; + // new SummarizeComplianceRecordCountsRequest(compartmentId, opcRequestId, limit, page, sortOrder); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .opcRequestId(opcRequestId) + .limit(limit) + .page(page) + .sortOrder(sortOrder); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SummarizeComplianceRecordCountsRequest)) { + return false; + } + + SummarizeComplianceRecordCountsRequest other = (SummarizeComplianceRecordCountsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/SummarizeManagedEntityCountsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/SummarizeManagedEntityCountsRequest.java new file mode 100644 index 00000000000..8dbbea06e3a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/SummarizeManagedEntityCountsRequest.java @@ -0,0 +1,294 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use SummarizeManagedEntityCountsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class SummarizeManagedEntityCountsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + SummarizeManagedEntityCountsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SummarizeManagedEntityCountsRequest o) { + compartmentId(o.getCompartmentId()); + opcRequestId(o.getOpcRequestId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of SummarizeManagedEntityCountsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of SummarizeManagedEntityCountsRequest + */ + public SummarizeManagedEntityCountsRequest build() { + SummarizeManagedEntityCountsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of SummarizeManagedEntityCountsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of SummarizeManagedEntityCountsRequest + */ + public SummarizeManagedEntityCountsRequest buildWithoutInvocationCallback() { + SummarizeManagedEntityCountsRequest request = new SummarizeManagedEntityCountsRequest(); + request.compartmentId = compartmentId; + request.opcRequestId = opcRequestId; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + return request; + // new SummarizeManagedEntityCountsRequest(compartmentId, opcRequestId, limit, page, sortOrder); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .opcRequestId(opcRequestId) + .limit(limit) + .page(page) + .sortOrder(sortOrder); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SummarizeManagedEntityCountsRequest)) { + return false; + } + + SummarizeManagedEntityCountsRequest other = (SummarizeManagedEntityCountsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/SummarizeSchedulerJobCountsRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/SummarizeSchedulerJobCountsRequest.java new file mode 100644 index 00000000000..99409b8e605 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/SummarizeSchedulerJobCountsRequest.java @@ -0,0 +1,294 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use SummarizeSchedulerJobCountsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class SummarizeSchedulerJobCountsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.fleetappsmanagement.model.SortOrder getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + SummarizeSchedulerJobCountsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.fleetappsmanagement.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SummarizeSchedulerJobCountsRequest o) { + compartmentId(o.getCompartmentId()); + opcRequestId(o.getOpcRequestId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of SummarizeSchedulerJobCountsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of SummarizeSchedulerJobCountsRequest + */ + public SummarizeSchedulerJobCountsRequest build() { + SummarizeSchedulerJobCountsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of SummarizeSchedulerJobCountsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of SummarizeSchedulerJobCountsRequest + */ + public SummarizeSchedulerJobCountsRequest buildWithoutInvocationCallback() { + SummarizeSchedulerJobCountsRequest request = new SummarizeSchedulerJobCountsRequest(); + request.compartmentId = compartmentId; + request.opcRequestId = opcRequestId; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + return request; + // new SummarizeSchedulerJobCountsRequest(compartmentId, opcRequestId, limit, page, sortOrder); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .opcRequestId(opcRequestId) + .limit(limit) + .page(page) + .sortOrder(sortOrder); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SummarizeSchedulerJobCountsRequest)) { + return false; + } + + SummarizeSchedulerJobCountsRequest other = (SummarizeSchedulerJobCountsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateCompliancePolicyRuleRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateCompliancePolicyRuleRequest.java new file mode 100644 index 00000000000..ce84fb33174 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateCompliancePolicyRuleRequest.java @@ -0,0 +1,321 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use UpdateCompliancePolicyRuleRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateCompliancePolicyRuleRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.UpdateCompliancePolicyRuleDetails> { + + /** + * unique CompliancePolicyRule identifier. + */ + private String compliancePolicyRuleId; + + /** + * unique CompliancePolicyRule identifier. + */ + public String getCompliancePolicyRuleId() { + return compliancePolicyRuleId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdateCompliancePolicyRuleDetails + updateCompliancePolicyRuleDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.fleetappsmanagement.model.UpdateCompliancePolicyRuleDetails + getUpdateCompliancePolicyRuleDetails() { + return updateCompliancePolicyRuleDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.UpdateCompliancePolicyRuleDetails getBody$() { + return updateCompliancePolicyRuleDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateCompliancePolicyRuleRequest, + com.oracle.bmc.fleetappsmanagement.model.UpdateCompliancePolicyRuleDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique CompliancePolicyRule identifier. + */ + private String compliancePolicyRuleId = null; + + /** + * unique CompliancePolicyRule identifier. + * @param compliancePolicyRuleId the value to set + * @return this builder instance + */ + public Builder compliancePolicyRuleId(String compliancePolicyRuleId) { + this.compliancePolicyRuleId = compliancePolicyRuleId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdateCompliancePolicyRuleDetails + updateCompliancePolicyRuleDetails = null; + + /** + * The information to be updated. + * @param updateCompliancePolicyRuleDetails the value to set + * @return this builder instance + */ + public Builder updateCompliancePolicyRuleDetails( + com.oracle.bmc.fleetappsmanagement.model.UpdateCompliancePolicyRuleDetails + updateCompliancePolicyRuleDetails) { + this.updateCompliancePolicyRuleDetails = updateCompliancePolicyRuleDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateCompliancePolicyRuleRequest o) { + compliancePolicyRuleId(o.getCompliancePolicyRuleId()); + updateCompliancePolicyRuleDetails(o.getUpdateCompliancePolicyRuleDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateCompliancePolicyRuleRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateCompliancePolicyRuleRequest + */ + public UpdateCompliancePolicyRuleRequest build() { + UpdateCompliancePolicyRuleRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.UpdateCompliancePolicyRuleDetails body) { + updateCompliancePolicyRuleDetails(body); + return this; + } + + /** + * Build the instance of UpdateCompliancePolicyRuleRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateCompliancePolicyRuleRequest + */ + public UpdateCompliancePolicyRuleRequest buildWithoutInvocationCallback() { + UpdateCompliancePolicyRuleRequest request = new UpdateCompliancePolicyRuleRequest(); + request.compliancePolicyRuleId = compliancePolicyRuleId; + request.updateCompliancePolicyRuleDetails = updateCompliancePolicyRuleDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateCompliancePolicyRuleRequest(compliancePolicyRuleId, updateCompliancePolicyRuleDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compliancePolicyRuleId(compliancePolicyRuleId) + .updateCompliancePolicyRuleDetails(updateCompliancePolicyRuleDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compliancePolicyRuleId=").append(String.valueOf(this.compliancePolicyRuleId)); + sb.append(",updateCompliancePolicyRuleDetails=") + .append(String.valueOf(this.updateCompliancePolicyRuleDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateCompliancePolicyRuleRequest)) { + return false; + } + + UpdateCompliancePolicyRuleRequest other = (UpdateCompliancePolicyRuleRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.compliancePolicyRuleId, other.compliancePolicyRuleId) + && java.util.Objects.equals( + this.updateCompliancePolicyRuleDetails, + other.updateCompliancePolicyRuleDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compliancePolicyRuleId == null + ? 43 + : this.compliancePolicyRuleId.hashCode()); + result = + (result * PRIME) + + (this.updateCompliancePolicyRuleDetails == null + ? 43 + : this.updateCompliancePolicyRuleDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateFleetCredentialRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateFleetCredentialRequest.java new file mode 100644 index 00000000000..3ef8919040a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateFleetCredentialRequest.java @@ -0,0 +1,349 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use UpdateFleetCredentialRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateFleetCredentialRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.UpdateFleetCredentialDetails> { + + /** + * unique FleetCredential identifier + */ + private String fleetCredentialId; + + /** + * unique FleetCredential identifier + */ + public String getFleetCredentialId() { + return fleetCredentialId; + } + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * The credential information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdateFleetCredentialDetails + updateFleetCredentialDetails; + + /** + * The credential information to be updated. + */ + public com.oracle.bmc.fleetappsmanagement.model.UpdateFleetCredentialDetails + getUpdateFleetCredentialDetails() { + return updateFleetCredentialDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.UpdateFleetCredentialDetails getBody$() { + return updateFleetCredentialDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateFleetCredentialRequest, + com.oracle.bmc.fleetappsmanagement.model.UpdateFleetCredentialDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique FleetCredential identifier + */ + private String fleetCredentialId = null; + + /** + * unique FleetCredential identifier + * @param fleetCredentialId the value to set + * @return this builder instance + */ + public Builder fleetCredentialId(String fleetCredentialId) { + this.fleetCredentialId = fleetCredentialId; + return this; + } + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * The credential information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdateFleetCredentialDetails + updateFleetCredentialDetails = null; + + /** + * The credential information to be updated. + * @param updateFleetCredentialDetails the value to set + * @return this builder instance + */ + public Builder updateFleetCredentialDetails( + com.oracle.bmc.fleetappsmanagement.model.UpdateFleetCredentialDetails + updateFleetCredentialDetails) { + this.updateFleetCredentialDetails = updateFleetCredentialDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateFleetCredentialRequest o) { + fleetCredentialId(o.getFleetCredentialId()); + fleetId(o.getFleetId()); + updateFleetCredentialDetails(o.getUpdateFleetCredentialDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateFleetCredentialRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateFleetCredentialRequest + */ + public UpdateFleetCredentialRequest build() { + UpdateFleetCredentialRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.UpdateFleetCredentialDetails body) { + updateFleetCredentialDetails(body); + return this; + } + + /** + * Build the instance of UpdateFleetCredentialRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateFleetCredentialRequest + */ + public UpdateFleetCredentialRequest buildWithoutInvocationCallback() { + UpdateFleetCredentialRequest request = new UpdateFleetCredentialRequest(); + request.fleetCredentialId = fleetCredentialId; + request.fleetId = fleetId; + request.updateFleetCredentialDetails = updateFleetCredentialDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateFleetCredentialRequest(fleetCredentialId, fleetId, updateFleetCredentialDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fleetCredentialId(fleetCredentialId) + .fleetId(fleetId) + .updateFleetCredentialDetails(updateFleetCredentialDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fleetCredentialId=").append(String.valueOf(this.fleetCredentialId)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",updateFleetCredentialDetails=") + .append(String.valueOf(this.updateFleetCredentialDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateFleetCredentialRequest)) { + return false; + } + + UpdateFleetCredentialRequest other = (UpdateFleetCredentialRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fleetCredentialId, other.fleetCredentialId) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals( + this.updateFleetCredentialDetails, other.updateFleetCredentialDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.fleetCredentialId == null ? 43 : this.fleetCredentialId.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.updateFleetCredentialDetails == null + ? 43 + : this.updateFleetCredentialDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateFleetPropertyRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateFleetPropertyRequest.java new file mode 100644 index 00000000000..004163cba30 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateFleetPropertyRequest.java @@ -0,0 +1,349 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use UpdateFleetPropertyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateFleetPropertyRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.UpdateFleetPropertyDetails> { + + /** + * unique FleetProperty identifier. + */ + private String fleetPropertyId; + + /** + * unique FleetProperty identifier. + */ + public String getFleetPropertyId() { + return fleetPropertyId; + } + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdateFleetPropertyDetails + updateFleetPropertyDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.fleetappsmanagement.model.UpdateFleetPropertyDetails + getUpdateFleetPropertyDetails() { + return updateFleetPropertyDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.UpdateFleetPropertyDetails getBody$() { + return updateFleetPropertyDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateFleetPropertyRequest, + com.oracle.bmc.fleetappsmanagement.model.UpdateFleetPropertyDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique FleetProperty identifier. + */ + private String fleetPropertyId = null; + + /** + * unique FleetProperty identifier. + * @param fleetPropertyId the value to set + * @return this builder instance + */ + public Builder fleetPropertyId(String fleetPropertyId) { + this.fleetPropertyId = fleetPropertyId; + return this; + } + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdateFleetPropertyDetails + updateFleetPropertyDetails = null; + + /** + * The information to be updated. + * @param updateFleetPropertyDetails the value to set + * @return this builder instance + */ + public Builder updateFleetPropertyDetails( + com.oracle.bmc.fleetappsmanagement.model.UpdateFleetPropertyDetails + updateFleetPropertyDetails) { + this.updateFleetPropertyDetails = updateFleetPropertyDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateFleetPropertyRequest o) { + fleetPropertyId(o.getFleetPropertyId()); + fleetId(o.getFleetId()); + updateFleetPropertyDetails(o.getUpdateFleetPropertyDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateFleetPropertyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateFleetPropertyRequest + */ + public UpdateFleetPropertyRequest build() { + UpdateFleetPropertyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.UpdateFleetPropertyDetails body) { + updateFleetPropertyDetails(body); + return this; + } + + /** + * Build the instance of UpdateFleetPropertyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateFleetPropertyRequest + */ + public UpdateFleetPropertyRequest buildWithoutInvocationCallback() { + UpdateFleetPropertyRequest request = new UpdateFleetPropertyRequest(); + request.fleetPropertyId = fleetPropertyId; + request.fleetId = fleetId; + request.updateFleetPropertyDetails = updateFleetPropertyDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateFleetPropertyRequest(fleetPropertyId, fleetId, updateFleetPropertyDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fleetPropertyId(fleetPropertyId) + .fleetId(fleetId) + .updateFleetPropertyDetails(updateFleetPropertyDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fleetPropertyId=").append(String.valueOf(this.fleetPropertyId)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",updateFleetPropertyDetails=") + .append(String.valueOf(this.updateFleetPropertyDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateFleetPropertyRequest)) { + return false; + } + + UpdateFleetPropertyRequest other = (UpdateFleetPropertyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fleetPropertyId, other.fleetPropertyId) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals( + this.updateFleetPropertyDetails, other.updateFleetPropertyDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.fleetPropertyId == null ? 43 : this.fleetPropertyId.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.updateFleetPropertyDetails == null + ? 43 + : this.updateFleetPropertyDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/requests/UpdatePluginRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateFleetRequest.java similarity index 64% rename from bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/requests/UpdatePluginRequest.java rename to bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateFleetRequest.java index fefa0b04ed6..886bf5938ef 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/requests/UpdatePluginRequest.java +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateFleetRequest.java @@ -2,49 +2,38 @@ * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ -package com.oracle.bmc.cloudbridge.requests; +package com.oracle.bmc.fleetappsmanagement.requests; -import com.oracle.bmc.cloudbridge.model.*; +import com.oracle.bmc.fleetappsmanagement.model.*; /** - * Example: Click here to see how to use UpdatePluginRequest. + * Example: Click here to see how to use UpdateFleetRequest. */ -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") -public class UpdatePluginRequest +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateFleetRequest extends com.oracle.bmc.requests.BmcRequest< - com.oracle.bmc.cloudbridge.model.UpdatePluginDetails> { + com.oracle.bmc.fleetappsmanagement.model.UpdateFleetDetails> { /** - * Unique Agent identifier path parameter. + * Unique Fleet identifier. */ - private String agentId; + private String fleetId; /** - * Unique Agent identifier path parameter. + * Unique Fleet identifier. */ - public String getAgentId() { - return agentId; - } - /** - * Unique plugin identifier path parameter. - */ - private String pluginName; - - /** - * Unique plugin identifier path parameter. - */ - public String getPluginName() { - return pluginName; + public String getFleetId() { + return fleetId; } /** * The information to be updated. */ - private com.oracle.bmc.cloudbridge.model.UpdatePluginDetails updatePluginDetails; + private com.oracle.bmc.fleetappsmanagement.model.UpdateFleetDetails updateFleetDetails; /** * The information to be updated. */ - public com.oracle.bmc.cloudbridge.model.UpdatePluginDetails getUpdatePluginDetails() { - return updatePluginDetails; + public com.oracle.bmc.fleetappsmanagement.model.UpdateFleetDetails getUpdateFleetDetails() { + return updateFleetDetails; } /** * For optimistic concurrency control. In the PUT or DELETE call @@ -85,60 +74,47 @@ public String getOpcRequestId() { */ @Override @com.oracle.bmc.InternalSdk - public com.oracle.bmc.cloudbridge.model.UpdatePluginDetails getBody$() { - return updatePluginDetails; + public com.oracle.bmc.fleetappsmanagement.model.UpdateFleetDetails getBody$() { + return updateFleetDetails; } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< - UpdatePluginRequest, com.oracle.bmc.cloudbridge.model.UpdatePluginDetails> { + UpdateFleetRequest, + com.oracle.bmc.fleetappsmanagement.model.UpdateFleetDetails> { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * Unique Agent identifier path parameter. - */ - private String agentId = null; - - /** - * Unique Agent identifier path parameter. - * @param agentId the value to set - * @return this builder instance - */ - public Builder agentId(String agentId) { - this.agentId = agentId; - return this; - } - - /** - * Unique plugin identifier path parameter. + * Unique Fleet identifier. */ - private String pluginName = null; + private String fleetId = null; /** - * Unique plugin identifier path parameter. - * @param pluginName the value to set + * Unique Fleet identifier. + * @param fleetId the value to set * @return this builder instance */ - public Builder pluginName(String pluginName) { - this.pluginName = pluginName; + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; return this; } /** * The information to be updated. */ - private com.oracle.bmc.cloudbridge.model.UpdatePluginDetails updatePluginDetails = null; + private com.oracle.bmc.fleetappsmanagement.model.UpdateFleetDetails updateFleetDetails = + null; /** * The information to be updated. - * @param updatePluginDetails the value to set + * @param updateFleetDetails the value to set * @return this builder instance */ - public Builder updatePluginDetails( - com.oracle.bmc.cloudbridge.model.UpdatePluginDetails updatePluginDetails) { - this.updatePluginDetails = updatePluginDetails; + public Builder updateFleetDetails( + com.oracle.bmc.fleetappsmanagement.model.UpdateFleetDetails updateFleetDetails) { + this.updateFleetDetails = updateFleetDetails; return this; } @@ -209,10 +185,9 @@ public Builder retryConfiguration( * Copy method to populate the builder with values from the given instance. * @return this builder instance */ - public Builder copy(UpdatePluginRequest o) { - agentId(o.getAgentId()); - pluginName(o.getPluginName()); - updatePluginDetails(o.getUpdatePluginDetails()); + public Builder copy(UpdateFleetRequest o) { + fleetId(o.getFleetId()); + updateFleetDetails(o.getUpdateFleetDetails()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); invocationCallback(o.getInvocationCallback()); @@ -221,17 +196,17 @@ public Builder copy(UpdatePluginRequest o) { } /** - * Build the instance of UpdatePluginRequest as configured by this builder + * Build the instance of UpdateFleetRequest as configured by this builder * * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, * while the method {@link Builder#buildWithoutInvocationCallback} does not. * * This is the preferred method to build an instance. * - * @return instance of UpdatePluginRequest + * @return instance of UpdateFleetRequest */ - public UpdatePluginRequest build() { - UpdatePluginRequest request = buildWithoutInvocationCallback(); + public UpdateFleetRequest build() { + UpdateFleetRequest request = buildWithoutInvocationCallback(); request.setInvocationCallback(invocationCallback); request.setRetryConfiguration(retryConfiguration); return request; @@ -243,28 +218,27 @@ public UpdatePluginRequest build() { * @return this builder instance */ @com.oracle.bmc.InternalSdk - public Builder body$(com.oracle.bmc.cloudbridge.model.UpdatePluginDetails body) { - updatePluginDetails(body); + public Builder body$(com.oracle.bmc.fleetappsmanagement.model.UpdateFleetDetails body) { + updateFleetDetails(body); return this; } /** - * Build the instance of UpdatePluginRequest as configured by this builder + * Build the instance of UpdateFleetRequest as configured by this builder * * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, * while the method {@link Builder#build} does * - * @return instance of UpdatePluginRequest + * @return instance of UpdateFleetRequest */ - public UpdatePluginRequest buildWithoutInvocationCallback() { - UpdatePluginRequest request = new UpdatePluginRequest(); - request.agentId = agentId; - request.pluginName = pluginName; - request.updatePluginDetails = updatePluginDetails; + public UpdateFleetRequest buildWithoutInvocationCallback() { + UpdateFleetRequest request = new UpdateFleetRequest(); + request.fleetId = fleetId; + request.updateFleetDetails = updateFleetDetails; request.ifMatch = ifMatch; request.opcRequestId = opcRequestId; return request; - // new UpdatePluginRequest(agentId, pluginName, updatePluginDetails, ifMatch, opcRequestId); + // new UpdateFleetRequest(fleetId, updateFleetDetails, ifMatch, opcRequestId); } } @@ -274,9 +248,8 @@ public UpdatePluginRequest buildWithoutInvocationCallback() { */ public Builder toBuilder() { return new Builder() - .agentId(agentId) - .pluginName(pluginName) - .updatePluginDetails(updatePluginDetails) + .fleetId(fleetId) + .updateFleetDetails(updateFleetDetails) .ifMatch(ifMatch) .opcRequestId(opcRequestId); } @@ -294,9 +267,8 @@ public String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("("); sb.append("super=").append(super.toString()); - sb.append(",agentId=").append(String.valueOf(this.agentId)); - sb.append(",pluginName=").append(String.valueOf(this.pluginName)); - sb.append(",updatePluginDetails=").append(String.valueOf(this.updatePluginDetails)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",updateFleetDetails=").append(String.valueOf(this.updateFleetDetails)); sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); sb.append(")"); @@ -308,15 +280,14 @@ public boolean equals(Object o) { if (this == o) { return true; } - if (!(o instanceof UpdatePluginRequest)) { + if (!(o instanceof UpdateFleetRequest)) { return false; } - UpdatePluginRequest other = (UpdatePluginRequest) o; + UpdateFleetRequest other = (UpdateFleetRequest) o; return super.equals(o) - && java.util.Objects.equals(this.agentId, other.agentId) - && java.util.Objects.equals(this.pluginName, other.pluginName) - && java.util.Objects.equals(this.updatePluginDetails, other.updatePluginDetails) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.updateFleetDetails, other.updateFleetDetails) && java.util.Objects.equals(this.ifMatch, other.ifMatch) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); } @@ -325,13 +296,12 @@ public boolean equals(Object o) { public int hashCode() { final int PRIME = 59; int result = super.hashCode(); - result = (result * PRIME) + (this.agentId == null ? 43 : this.agentId.hashCode()); - result = (result * PRIME) + (this.pluginName == null ? 43 : this.pluginName.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); result = (result * PRIME) - + (this.updatePluginDetails == null + + (this.updateFleetDetails == null ? 43 - : this.updatePluginDetails.hashCode()); + : this.updateFleetDetails.hashCode()); result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); return result; diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateFleetResourceRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateFleetResourceRequest.java new file mode 100644 index 00000000000..7145ef77035 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateFleetResourceRequest.java @@ -0,0 +1,349 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use UpdateFleetResourceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateFleetResourceRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.UpdateFleetResourceDetails> { + + /** + * unique FleetResource identifier + */ + private String fleetResourceId; + + /** + * unique FleetResource identifier + */ + public String getFleetResourceId() { + return fleetResourceId; + } + /** + * Unique Fleet identifier. + */ + private String fleetId; + + /** + * Unique Fleet identifier. + */ + public String getFleetId() { + return fleetId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdateFleetResourceDetails + updateFleetResourceDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.fleetappsmanagement.model.UpdateFleetResourceDetails + getUpdateFleetResourceDetails() { + return updateFleetResourceDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.UpdateFleetResourceDetails getBody$() { + return updateFleetResourceDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateFleetResourceRequest, + com.oracle.bmc.fleetappsmanagement.model.UpdateFleetResourceDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique FleetResource identifier + */ + private String fleetResourceId = null; + + /** + * unique FleetResource identifier + * @param fleetResourceId the value to set + * @return this builder instance + */ + public Builder fleetResourceId(String fleetResourceId) { + this.fleetResourceId = fleetResourceId; + return this; + } + + /** + * Unique Fleet identifier. + */ + private String fleetId = null; + + /** + * Unique Fleet identifier. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdateFleetResourceDetails + updateFleetResourceDetails = null; + + /** + * The information to be updated. + * @param updateFleetResourceDetails the value to set + * @return this builder instance + */ + public Builder updateFleetResourceDetails( + com.oracle.bmc.fleetappsmanagement.model.UpdateFleetResourceDetails + updateFleetResourceDetails) { + this.updateFleetResourceDetails = updateFleetResourceDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateFleetResourceRequest o) { + fleetResourceId(o.getFleetResourceId()); + fleetId(o.getFleetId()); + updateFleetResourceDetails(o.getUpdateFleetResourceDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateFleetResourceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateFleetResourceRequest + */ + public UpdateFleetResourceRequest build() { + UpdateFleetResourceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.UpdateFleetResourceDetails body) { + updateFleetResourceDetails(body); + return this; + } + + /** + * Build the instance of UpdateFleetResourceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateFleetResourceRequest + */ + public UpdateFleetResourceRequest buildWithoutInvocationCallback() { + UpdateFleetResourceRequest request = new UpdateFleetResourceRequest(); + request.fleetResourceId = fleetResourceId; + request.fleetId = fleetId; + request.updateFleetResourceDetails = updateFleetResourceDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateFleetResourceRequest(fleetResourceId, fleetId, updateFleetResourceDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fleetResourceId(fleetResourceId) + .fleetId(fleetId) + .updateFleetResourceDetails(updateFleetResourceDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fleetResourceId=").append(String.valueOf(this.fleetResourceId)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",updateFleetResourceDetails=") + .append(String.valueOf(this.updateFleetResourceDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateFleetResourceRequest)) { + return false; + } + + UpdateFleetResourceRequest other = (UpdateFleetResourceRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fleetResourceId, other.fleetResourceId) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals( + this.updateFleetResourceDetails, other.updateFleetResourceDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.fleetResourceId == null ? 43 : this.fleetResourceId.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.updateFleetResourceDetails == null + ? 43 + : this.updateFleetResourceDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateMaintenanceWindowRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateMaintenanceWindowRequest.java new file mode 100644 index 00000000000..a20c43b778a --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateMaintenanceWindowRequest.java @@ -0,0 +1,319 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use UpdateMaintenanceWindowRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateMaintenanceWindowRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.UpdateMaintenanceWindowDetails> { + + /** + * unique MaintenanceWindow identifier + */ + private String maintenanceWindowId; + + /** + * unique MaintenanceWindow identifier + */ + public String getMaintenanceWindowId() { + return maintenanceWindowId; + } + /** + * The information to be updated for the maintenance window. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdateMaintenanceWindowDetails + updateMaintenanceWindowDetails; + + /** + * The information to be updated for the maintenance window. + */ + public com.oracle.bmc.fleetappsmanagement.model.UpdateMaintenanceWindowDetails + getUpdateMaintenanceWindowDetails() { + return updateMaintenanceWindowDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.UpdateMaintenanceWindowDetails getBody$() { + return updateMaintenanceWindowDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateMaintenanceWindowRequest, + com.oracle.bmc.fleetappsmanagement.model.UpdateMaintenanceWindowDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique MaintenanceWindow identifier + */ + private String maintenanceWindowId = null; + + /** + * unique MaintenanceWindow identifier + * @param maintenanceWindowId the value to set + * @return this builder instance + */ + public Builder maintenanceWindowId(String maintenanceWindowId) { + this.maintenanceWindowId = maintenanceWindowId; + return this; + } + + /** + * The information to be updated for the maintenance window. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdateMaintenanceWindowDetails + updateMaintenanceWindowDetails = null; + + /** + * The information to be updated for the maintenance window. + * @param updateMaintenanceWindowDetails the value to set + * @return this builder instance + */ + public Builder updateMaintenanceWindowDetails( + com.oracle.bmc.fleetappsmanagement.model.UpdateMaintenanceWindowDetails + updateMaintenanceWindowDetails) { + this.updateMaintenanceWindowDetails = updateMaintenanceWindowDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateMaintenanceWindowRequest o) { + maintenanceWindowId(o.getMaintenanceWindowId()); + updateMaintenanceWindowDetails(o.getUpdateMaintenanceWindowDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateMaintenanceWindowRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateMaintenanceWindowRequest + */ + public UpdateMaintenanceWindowRequest build() { + UpdateMaintenanceWindowRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.UpdateMaintenanceWindowDetails body) { + updateMaintenanceWindowDetails(body); + return this; + } + + /** + * Build the instance of UpdateMaintenanceWindowRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateMaintenanceWindowRequest + */ + public UpdateMaintenanceWindowRequest buildWithoutInvocationCallback() { + UpdateMaintenanceWindowRequest request = new UpdateMaintenanceWindowRequest(); + request.maintenanceWindowId = maintenanceWindowId; + request.updateMaintenanceWindowDetails = updateMaintenanceWindowDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateMaintenanceWindowRequest(maintenanceWindowId, updateMaintenanceWindowDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .maintenanceWindowId(maintenanceWindowId) + .updateMaintenanceWindowDetails(updateMaintenanceWindowDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",maintenanceWindowId=").append(String.valueOf(this.maintenanceWindowId)); + sb.append(",updateMaintenanceWindowDetails=") + .append(String.valueOf(this.updateMaintenanceWindowDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateMaintenanceWindowRequest)) { + return false; + } + + UpdateMaintenanceWindowRequest other = (UpdateMaintenanceWindowRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.maintenanceWindowId, other.maintenanceWindowId) + && java.util.Objects.equals( + this.updateMaintenanceWindowDetails, other.updateMaintenanceWindowDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.maintenanceWindowId == null + ? 43 + : this.maintenanceWindowId.hashCode()); + result = + (result * PRIME) + + (this.updateMaintenanceWindowDetails == null + ? 43 + : this.updateMaintenanceWindowDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateOnboardingRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateOnboardingRequest.java new file mode 100644 index 00000000000..f2851723213 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateOnboardingRequest.java @@ -0,0 +1,314 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use UpdateOnboardingRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateOnboardingRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.UpdateOnboardingDetails> { + + /** + * A filter to return resources whose Onboarding identifier matches the given identifier. + */ + private String onboardingId; + + /** + * A filter to return resources whose Onboarding identifier matches the given identifier. + */ + public String getOnboardingId() { + return onboardingId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdateOnboardingDetails + updateOnboardingDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.fleetappsmanagement.model.UpdateOnboardingDetails + getUpdateOnboardingDetails() { + return updateOnboardingDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.UpdateOnboardingDetails getBody$() { + return updateOnboardingDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateOnboardingRequest, + com.oracle.bmc.fleetappsmanagement.model.UpdateOnboardingDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * A filter to return resources whose Onboarding identifier matches the given identifier. + */ + private String onboardingId = null; + + /** + * A filter to return resources whose Onboarding identifier matches the given identifier. + * @param onboardingId the value to set + * @return this builder instance + */ + public Builder onboardingId(String onboardingId) { + this.onboardingId = onboardingId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdateOnboardingDetails + updateOnboardingDetails = null; + + /** + * The information to be updated. + * @param updateOnboardingDetails the value to set + * @return this builder instance + */ + public Builder updateOnboardingDetails( + com.oracle.bmc.fleetappsmanagement.model.UpdateOnboardingDetails + updateOnboardingDetails) { + this.updateOnboardingDetails = updateOnboardingDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateOnboardingRequest o) { + onboardingId(o.getOnboardingId()); + updateOnboardingDetails(o.getUpdateOnboardingDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateOnboardingRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateOnboardingRequest + */ + public UpdateOnboardingRequest build() { + UpdateOnboardingRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.UpdateOnboardingDetails body) { + updateOnboardingDetails(body); + return this; + } + + /** + * Build the instance of UpdateOnboardingRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateOnboardingRequest + */ + public UpdateOnboardingRequest buildWithoutInvocationCallback() { + UpdateOnboardingRequest request = new UpdateOnboardingRequest(); + request.onboardingId = onboardingId; + request.updateOnboardingDetails = updateOnboardingDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateOnboardingRequest(onboardingId, updateOnboardingDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .onboardingId(onboardingId) + .updateOnboardingDetails(updateOnboardingDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",onboardingId=").append(String.valueOf(this.onboardingId)); + sb.append(",updateOnboardingDetails=").append(String.valueOf(this.updateOnboardingDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateOnboardingRequest)) { + return false; + } + + UpdateOnboardingRequest other = (UpdateOnboardingRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.onboardingId, other.onboardingId) + && java.util.Objects.equals( + this.updateOnboardingDetails, other.updateOnboardingDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.onboardingId == null ? 43 : this.onboardingId.hashCode()); + result = + (result * PRIME) + + (this.updateOnboardingDetails == null + ? 43 + : this.updateOnboardingDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdatePatchRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdatePatchRequest.java new file mode 100644 index 00000000000..d81f9228216 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdatePatchRequest.java @@ -0,0 +1,309 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use UpdatePatchRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdatePatchRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.UpdatePatchDetails> { + + /** + * unique Patch identifier + */ + private String patchId; + + /** + * unique Patch identifier + */ + public String getPatchId() { + return patchId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdatePatchDetails updatePatchDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.fleetappsmanagement.model.UpdatePatchDetails getUpdatePatchDetails() { + return updatePatchDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.UpdatePatchDetails getBody$() { + return updatePatchDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdatePatchRequest, + com.oracle.bmc.fleetappsmanagement.model.UpdatePatchDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique Patch identifier + */ + private String patchId = null; + + /** + * unique Patch identifier + * @param patchId the value to set + * @return this builder instance + */ + public Builder patchId(String patchId) { + this.patchId = patchId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdatePatchDetails updatePatchDetails = + null; + + /** + * The information to be updated. + * @param updatePatchDetails the value to set + * @return this builder instance + */ + public Builder updatePatchDetails( + com.oracle.bmc.fleetappsmanagement.model.UpdatePatchDetails updatePatchDetails) { + this.updatePatchDetails = updatePatchDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdatePatchRequest o) { + patchId(o.getPatchId()); + updatePatchDetails(o.getUpdatePatchDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdatePatchRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdatePatchRequest + */ + public UpdatePatchRequest build() { + UpdatePatchRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.fleetappsmanagement.model.UpdatePatchDetails body) { + updatePatchDetails(body); + return this; + } + + /** + * Build the instance of UpdatePatchRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdatePatchRequest + */ + public UpdatePatchRequest buildWithoutInvocationCallback() { + UpdatePatchRequest request = new UpdatePatchRequest(); + request.patchId = patchId; + request.updatePatchDetails = updatePatchDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdatePatchRequest(patchId, updatePatchDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .patchId(patchId) + .updatePatchDetails(updatePatchDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",patchId=").append(String.valueOf(this.patchId)); + sb.append(",updatePatchDetails=").append(String.valueOf(this.updatePatchDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePatchRequest)) { + return false; + } + + UpdatePatchRequest other = (UpdatePatchRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.patchId, other.patchId) + && java.util.Objects.equals(this.updatePatchDetails, other.updatePatchDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.patchId == null ? 43 : this.patchId.hashCode()); + result = + (result * PRIME) + + (this.updatePatchDetails == null + ? 43 + : this.updatePatchDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdatePlatformConfigurationRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdatePlatformConfigurationRequest.java new file mode 100644 index 00000000000..f8ba9a6c65b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdatePlatformConfigurationRequest.java @@ -0,0 +1,321 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use UpdatePlatformConfigurationRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdatePlatformConfigurationRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.UpdatePlatformConfigurationDetails> { + + /** + * unique PlatformConfiguration identifier + */ + private String platformConfigurationId; + + /** + * unique PlatformConfiguration identifier + */ + public String getPlatformConfigurationId() { + return platformConfigurationId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdatePlatformConfigurationDetails + updatePlatformConfigurationDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.fleetappsmanagement.model.UpdatePlatformConfigurationDetails + getUpdatePlatformConfigurationDetails() { + return updatePlatformConfigurationDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.UpdatePlatformConfigurationDetails getBody$() { + return updatePlatformConfigurationDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdatePlatformConfigurationRequest, + com.oracle.bmc.fleetappsmanagement.model.UpdatePlatformConfigurationDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique PlatformConfiguration identifier + */ + private String platformConfigurationId = null; + + /** + * unique PlatformConfiguration identifier + * @param platformConfigurationId the value to set + * @return this builder instance + */ + public Builder platformConfigurationId(String platformConfigurationId) { + this.platformConfigurationId = platformConfigurationId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdatePlatformConfigurationDetails + updatePlatformConfigurationDetails = null; + + /** + * The information to be updated. + * @param updatePlatformConfigurationDetails the value to set + * @return this builder instance + */ + public Builder updatePlatformConfigurationDetails( + com.oracle.bmc.fleetappsmanagement.model.UpdatePlatformConfigurationDetails + updatePlatformConfigurationDetails) { + this.updatePlatformConfigurationDetails = updatePlatformConfigurationDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdatePlatformConfigurationRequest o) { + platformConfigurationId(o.getPlatformConfigurationId()); + updatePlatformConfigurationDetails(o.getUpdatePlatformConfigurationDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdatePlatformConfigurationRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdatePlatformConfigurationRequest + */ + public UpdatePlatformConfigurationRequest build() { + UpdatePlatformConfigurationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.UpdatePlatformConfigurationDetails body) { + updatePlatformConfigurationDetails(body); + return this; + } + + /** + * Build the instance of UpdatePlatformConfigurationRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdatePlatformConfigurationRequest + */ + public UpdatePlatformConfigurationRequest buildWithoutInvocationCallback() { + UpdatePlatformConfigurationRequest request = new UpdatePlatformConfigurationRequest(); + request.platformConfigurationId = platformConfigurationId; + request.updatePlatformConfigurationDetails = updatePlatformConfigurationDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdatePlatformConfigurationRequest(platformConfigurationId, updatePlatformConfigurationDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .platformConfigurationId(platformConfigurationId) + .updatePlatformConfigurationDetails(updatePlatformConfigurationDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",platformConfigurationId=").append(String.valueOf(this.platformConfigurationId)); + sb.append(",updatePlatformConfigurationDetails=") + .append(String.valueOf(this.updatePlatformConfigurationDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePlatformConfigurationRequest)) { + return false; + } + + UpdatePlatformConfigurationRequest other = (UpdatePlatformConfigurationRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.platformConfigurationId, other.platformConfigurationId) + && java.util.Objects.equals( + this.updatePlatformConfigurationDetails, + other.updatePlatformConfigurationDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.platformConfigurationId == null + ? 43 + : this.platformConfigurationId.hashCode()); + result = + (result * PRIME) + + (this.updatePlatformConfigurationDetails == null + ? 43 + : this.updatePlatformConfigurationDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdatePropertyRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdatePropertyRequest.java new file mode 100644 index 00000000000..7b40b2b807c --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdatePropertyRequest.java @@ -0,0 +1,311 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use UpdatePropertyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdatePropertyRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.UpdatePropertyDetails> { + + /** + * unique Property identifier + */ + private String propertyId; + + /** + * unique Property identifier + */ + public String getPropertyId() { + return propertyId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdatePropertyDetails updatePropertyDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.fleetappsmanagement.model.UpdatePropertyDetails + getUpdatePropertyDetails() { + return updatePropertyDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.UpdatePropertyDetails getBody$() { + return updatePropertyDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdatePropertyRequest, + com.oracle.bmc.fleetappsmanagement.model.UpdatePropertyDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique Property identifier + */ + private String propertyId = null; + + /** + * unique Property identifier + * @param propertyId the value to set + * @return this builder instance + */ + public Builder propertyId(String propertyId) { + this.propertyId = propertyId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdatePropertyDetails + updatePropertyDetails = null; + + /** + * The information to be updated. + * @param updatePropertyDetails the value to set + * @return this builder instance + */ + public Builder updatePropertyDetails( + com.oracle.bmc.fleetappsmanagement.model.UpdatePropertyDetails + updatePropertyDetails) { + this.updatePropertyDetails = updatePropertyDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdatePropertyRequest o) { + propertyId(o.getPropertyId()); + updatePropertyDetails(o.getUpdatePropertyDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdatePropertyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdatePropertyRequest + */ + public UpdatePropertyRequest build() { + UpdatePropertyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.fleetappsmanagement.model.UpdatePropertyDetails body) { + updatePropertyDetails(body); + return this; + } + + /** + * Build the instance of UpdatePropertyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdatePropertyRequest + */ + public UpdatePropertyRequest buildWithoutInvocationCallback() { + UpdatePropertyRequest request = new UpdatePropertyRequest(); + request.propertyId = propertyId; + request.updatePropertyDetails = updatePropertyDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdatePropertyRequest(propertyId, updatePropertyDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .propertyId(propertyId) + .updatePropertyDetails(updatePropertyDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",propertyId=").append(String.valueOf(this.propertyId)); + sb.append(",updatePropertyDetails=").append(String.valueOf(this.updatePropertyDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePropertyRequest)) { + return false; + } + + UpdatePropertyRequest other = (UpdatePropertyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.propertyId, other.propertyId) + && java.util.Objects.equals(this.updatePropertyDetails, other.updatePropertyDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.propertyId == null ? 43 : this.propertyId.hashCode()); + result = + (result * PRIME) + + (this.updatePropertyDetails == null + ? 43 + : this.updatePropertyDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateRunbookRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateRunbookRequest.java new file mode 100644 index 00000000000..25b3206e695 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateRunbookRequest.java @@ -0,0 +1,310 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use UpdateRunbookRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateRunbookRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.UpdateRunbookDetails> { + + /** + * Unique Runbook identifier + */ + private String runbookId; + + /** + * Unique Runbook identifier + */ + public String getRunbookId() { + return runbookId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdateRunbookDetails updateRunbookDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.fleetappsmanagement.model.UpdateRunbookDetails getUpdateRunbookDetails() { + return updateRunbookDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.UpdateRunbookDetails getBody$() { + return updateRunbookDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateRunbookRequest, + com.oracle.bmc.fleetappsmanagement.model.UpdateRunbookDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Runbook identifier + */ + private String runbookId = null; + + /** + * Unique Runbook identifier + * @param runbookId the value to set + * @return this builder instance + */ + public Builder runbookId(String runbookId) { + this.runbookId = runbookId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdateRunbookDetails updateRunbookDetails = + null; + + /** + * The information to be updated. + * @param updateRunbookDetails the value to set + * @return this builder instance + */ + public Builder updateRunbookDetails( + com.oracle.bmc.fleetappsmanagement.model.UpdateRunbookDetails + updateRunbookDetails) { + this.updateRunbookDetails = updateRunbookDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateRunbookRequest o) { + runbookId(o.getRunbookId()); + updateRunbookDetails(o.getUpdateRunbookDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateRunbookRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateRunbookRequest + */ + public UpdateRunbookRequest build() { + UpdateRunbookRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.fleetappsmanagement.model.UpdateRunbookDetails body) { + updateRunbookDetails(body); + return this; + } + + /** + * Build the instance of UpdateRunbookRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateRunbookRequest + */ + public UpdateRunbookRequest buildWithoutInvocationCallback() { + UpdateRunbookRequest request = new UpdateRunbookRequest(); + request.runbookId = runbookId; + request.updateRunbookDetails = updateRunbookDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateRunbookRequest(runbookId, updateRunbookDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .runbookId(runbookId) + .updateRunbookDetails(updateRunbookDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",runbookId=").append(String.valueOf(this.runbookId)); + sb.append(",updateRunbookDetails=").append(String.valueOf(this.updateRunbookDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateRunbookRequest)) { + return false; + } + + UpdateRunbookRequest other = (UpdateRunbookRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.runbookId, other.runbookId) + && java.util.Objects.equals(this.updateRunbookDetails, other.updateRunbookDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.runbookId == null ? 43 : this.runbookId.hashCode()); + result = + (result * PRIME) + + (this.updateRunbookDetails == null + ? 43 + : this.updateRunbookDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateSchedulerDefinitionRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateSchedulerDefinitionRequest.java new file mode 100644 index 00000000000..de938d2284d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateSchedulerDefinitionRequest.java @@ -0,0 +1,320 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use UpdateSchedulerDefinitionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateSchedulerDefinitionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.UpdateSchedulerDefinitionDetails> { + + /** + * unique SchedulerDefinition identifier + */ + private String schedulerDefinitionId; + + /** + * unique SchedulerDefinition identifier + */ + public String getSchedulerDefinitionId() { + return schedulerDefinitionId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdateSchedulerDefinitionDetails + updateSchedulerDefinitionDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.fleetappsmanagement.model.UpdateSchedulerDefinitionDetails + getUpdateSchedulerDefinitionDetails() { + return updateSchedulerDefinitionDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.UpdateSchedulerDefinitionDetails getBody$() { + return updateSchedulerDefinitionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateSchedulerDefinitionRequest, + com.oracle.bmc.fleetappsmanagement.model.UpdateSchedulerDefinitionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique SchedulerDefinition identifier + */ + private String schedulerDefinitionId = null; + + /** + * unique SchedulerDefinition identifier + * @param schedulerDefinitionId the value to set + * @return this builder instance + */ + public Builder schedulerDefinitionId(String schedulerDefinitionId) { + this.schedulerDefinitionId = schedulerDefinitionId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdateSchedulerDefinitionDetails + updateSchedulerDefinitionDetails = null; + + /** + * The information to be updated. + * @param updateSchedulerDefinitionDetails the value to set + * @return this builder instance + */ + public Builder updateSchedulerDefinitionDetails( + com.oracle.bmc.fleetappsmanagement.model.UpdateSchedulerDefinitionDetails + updateSchedulerDefinitionDetails) { + this.updateSchedulerDefinitionDetails = updateSchedulerDefinitionDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateSchedulerDefinitionRequest o) { + schedulerDefinitionId(o.getSchedulerDefinitionId()); + updateSchedulerDefinitionDetails(o.getUpdateSchedulerDefinitionDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateSchedulerDefinitionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateSchedulerDefinitionRequest + */ + public UpdateSchedulerDefinitionRequest build() { + UpdateSchedulerDefinitionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.UpdateSchedulerDefinitionDetails body) { + updateSchedulerDefinitionDetails(body); + return this; + } + + /** + * Build the instance of UpdateSchedulerDefinitionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateSchedulerDefinitionRequest + */ + public UpdateSchedulerDefinitionRequest buildWithoutInvocationCallback() { + UpdateSchedulerDefinitionRequest request = new UpdateSchedulerDefinitionRequest(); + request.schedulerDefinitionId = schedulerDefinitionId; + request.updateSchedulerDefinitionDetails = updateSchedulerDefinitionDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateSchedulerDefinitionRequest(schedulerDefinitionId, updateSchedulerDefinitionDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulerDefinitionId(schedulerDefinitionId) + .updateSchedulerDefinitionDetails(updateSchedulerDefinitionDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulerDefinitionId=").append(String.valueOf(this.schedulerDefinitionId)); + sb.append(",updateSchedulerDefinitionDetails=") + .append(String.valueOf(this.updateSchedulerDefinitionDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSchedulerDefinitionRequest)) { + return false; + } + + UpdateSchedulerDefinitionRequest other = (UpdateSchedulerDefinitionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulerDefinitionId, other.schedulerDefinitionId) + && java.util.Objects.equals( + this.updateSchedulerDefinitionDetails, + other.updateSchedulerDefinitionDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulerDefinitionId == null + ? 43 + : this.schedulerDefinitionId.hashCode()); + result = + (result * PRIME) + + (this.updateSchedulerDefinitionDetails == null + ? 43 + : this.updateSchedulerDefinitionDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateSchedulerJobRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateSchedulerJobRequest.java new file mode 100644 index 00000000000..3ec7063d742 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateSchedulerJobRequest.java @@ -0,0 +1,317 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use UpdateSchedulerJobRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateSchedulerJobRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.UpdateSchedulerJobDetails> { + + /** + * unique SchedulerJob identifier + */ + private String schedulerJobId; + + /** + * unique SchedulerJob identifier + */ + public String getSchedulerJobId() { + return schedulerJobId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdateSchedulerJobDetails + updateSchedulerJobDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.fleetappsmanagement.model.UpdateSchedulerJobDetails + getUpdateSchedulerJobDetails() { + return updateSchedulerJobDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.UpdateSchedulerJobDetails getBody$() { + return updateSchedulerJobDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateSchedulerJobRequest, + com.oracle.bmc.fleetappsmanagement.model.UpdateSchedulerJobDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique SchedulerJob identifier + */ + private String schedulerJobId = null; + + /** + * unique SchedulerJob identifier + * @param schedulerJobId the value to set + * @return this builder instance + */ + public Builder schedulerJobId(String schedulerJobId) { + this.schedulerJobId = schedulerJobId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdateSchedulerJobDetails + updateSchedulerJobDetails = null; + + /** + * The information to be updated. + * @param updateSchedulerJobDetails the value to set + * @return this builder instance + */ + public Builder updateSchedulerJobDetails( + com.oracle.bmc.fleetappsmanagement.model.UpdateSchedulerJobDetails + updateSchedulerJobDetails) { + this.updateSchedulerJobDetails = updateSchedulerJobDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateSchedulerJobRequest o) { + schedulerJobId(o.getSchedulerJobId()); + updateSchedulerJobDetails(o.getUpdateSchedulerJobDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateSchedulerJobRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateSchedulerJobRequest + */ + public UpdateSchedulerJobRequest build() { + UpdateSchedulerJobRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.UpdateSchedulerJobDetails body) { + updateSchedulerJobDetails(body); + return this; + } + + /** + * Build the instance of UpdateSchedulerJobRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateSchedulerJobRequest + */ + public UpdateSchedulerJobRequest buildWithoutInvocationCallback() { + UpdateSchedulerJobRequest request = new UpdateSchedulerJobRequest(); + request.schedulerJobId = schedulerJobId; + request.updateSchedulerJobDetails = updateSchedulerJobDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateSchedulerJobRequest(schedulerJobId, updateSchedulerJobDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .schedulerJobId(schedulerJobId) + .updateSchedulerJobDetails(updateSchedulerJobDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",schedulerJobId=").append(String.valueOf(this.schedulerJobId)); + sb.append(",updateSchedulerJobDetails=") + .append(String.valueOf(this.updateSchedulerJobDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSchedulerJobRequest)) { + return false; + } + + UpdateSchedulerJobRequest other = (UpdateSchedulerJobRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.schedulerJobId, other.schedulerJobId) + && java.util.Objects.equals( + this.updateSchedulerJobDetails, other.updateSchedulerJobDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.schedulerJobId == null ? 43 : this.schedulerJobId.hashCode()); + result = + (result * PRIME) + + (this.updateSchedulerJobDetails == null + ? 43 + : this.updateSchedulerJobDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateTaskRecordRequest.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateTaskRecordRequest.java new file mode 100644 index 00000000000..c97b23542d5 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/requests/UpdateTaskRecordRequest.java @@ -0,0 +1,314 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.requests; + +import com.oracle.bmc.fleetappsmanagement.model.*; +/** + * Example: Click here to see how to use UpdateTaskRecordRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateTaskRecordRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.fleetappsmanagement.model.UpdateTaskRecordDetails> { + + /** + * unique TaskDetail identifier + */ + private String taskRecordId; + + /** + * unique TaskDetail identifier + */ + public String getTaskRecordId() { + return taskRecordId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdateTaskRecordDetails + updateTaskRecordDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.fleetappsmanagement.model.UpdateTaskRecordDetails + getUpdateTaskRecordDetails() { + return updateTaskRecordDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.fleetappsmanagement.model.UpdateTaskRecordDetails getBody$() { + return updateTaskRecordDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateTaskRecordRequest, + com.oracle.bmc.fleetappsmanagement.model.UpdateTaskRecordDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * unique TaskDetail identifier + */ + private String taskRecordId = null; + + /** + * unique TaskDetail identifier + * @param taskRecordId the value to set + * @return this builder instance + */ + public Builder taskRecordId(String taskRecordId) { + this.taskRecordId = taskRecordId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.fleetappsmanagement.model.UpdateTaskRecordDetails + updateTaskRecordDetails = null; + + /** + * The information to be updated. + * @param updateTaskRecordDetails the value to set + * @return this builder instance + */ + public Builder updateTaskRecordDetails( + com.oracle.bmc.fleetappsmanagement.model.UpdateTaskRecordDetails + updateTaskRecordDetails) { + this.updateTaskRecordDetails = updateTaskRecordDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateTaskRecordRequest o) { + taskRecordId(o.getTaskRecordId()); + updateTaskRecordDetails(o.getUpdateTaskRecordDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateTaskRecordRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateTaskRecordRequest + */ + public UpdateTaskRecordRequest build() { + UpdateTaskRecordRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.fleetappsmanagement.model.UpdateTaskRecordDetails body) { + updateTaskRecordDetails(body); + return this; + } + + /** + * Build the instance of UpdateTaskRecordRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateTaskRecordRequest + */ + public UpdateTaskRecordRequest buildWithoutInvocationCallback() { + UpdateTaskRecordRequest request = new UpdateTaskRecordRequest(); + request.taskRecordId = taskRecordId; + request.updateTaskRecordDetails = updateTaskRecordDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateTaskRecordRequest(taskRecordId, updateTaskRecordDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .taskRecordId(taskRecordId) + .updateTaskRecordDetails(updateTaskRecordDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",taskRecordId=").append(String.valueOf(this.taskRecordId)); + sb.append(",updateTaskRecordDetails=").append(String.valueOf(this.updateTaskRecordDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateTaskRecordRequest)) { + return false; + } + + UpdateTaskRecordRequest other = (UpdateTaskRecordRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.taskRecordId, other.taskRecordId) + && java.util.Objects.equals( + this.updateTaskRecordDetails, other.updateTaskRecordDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.taskRecordId == null ? 43 : this.taskRecordId.hashCode()); + result = + (result * PRIME) + + (this.updateTaskRecordDetails == null + ? 43 + : this.updateTaskRecordDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CheckResourceTaggingResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CheckResourceTaggingResponse.java new file mode 100644 index 00000000000..92f721a126e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CheckResourceTaggingResponse.java @@ -0,0 +1,221 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CheckResourceTaggingResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ResourceTagCheckDetails instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.ResourceTagCheckDetails + resourceTagCheckDetails; + + /** + * The returned ResourceTagCheckDetails instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.ResourceTagCheckDetails + getResourceTagCheckDetails() { + return resourceTagCheckDetails; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "resourceTagCheckDetails" + }) + private CheckResourceTaggingResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.ResourceTagCheckDetails + resourceTagCheckDetails) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.resourceTagCheckDetails = resourceTagCheckDetails; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ResourceTagCheckDetails instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.ResourceTagCheckDetails + resourceTagCheckDetails; + + /** + * The returned ResourceTagCheckDetails instance. + * @param resourceTagCheckDetails the value to set + * @return this builder + */ + public Builder resourceTagCheckDetails( + com.oracle.bmc.fleetappsmanagement.model.ResourceTagCheckDetails + resourceTagCheckDetails) { + this.resourceTagCheckDetails = resourceTagCheckDetails; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CheckResourceTaggingResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + resourceTagCheckDetails(o.getResourceTagCheckDetails()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CheckResourceTaggingResponse build() { + return new CheckResourceTaggingResponse( + __httpStatusCode__, headers, etag, opcRequestId, resourceTagCheckDetails); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",resourceTagCheckDetails=").append(String.valueOf(resourceTagCheckDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CheckResourceTaggingResponse)) { + return false; + } + + CheckResourceTaggingResponse other = (CheckResourceTaggingResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.resourceTagCheckDetails, other.resourceTagCheckDetails); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.resourceTagCheckDetails == null + ? 43 + : this.resourceTagCheckDetails.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ConfirmTargetsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ConfirmTargetsResponse.java new file mode 100644 index 00000000000..8f6d797d438 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ConfirmTargetsResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ConfirmTargetsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private ConfirmTargetsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ConfirmTargetsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ConfirmTargetsResponse build() { + return new ConfirmTargetsResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConfirmTargetsResponse)) { + return false; + } + + ConfirmTargetsResponse other = (ConfirmTargetsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateCompliancePolicyRuleResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateCompliancePolicyRuleResponse.java new file mode 100644 index 00000000000..718ac1b762c --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateCompliancePolicyRuleResponse.java @@ -0,0 +1,336 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateCompliancePolicyRuleResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * URL for the created CompliancePolicyRule. The CompliancePolicyRule OCID is generated after this request is sent. + */ + private String location; + + /** + * URL for the created CompliancePolicyRule. The CompliancePolicyRule OCID is generated after this request is sent. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * Same as location. + */ + private String contentLocation; + + /** + * Same as location. + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned CompliancePolicyRule instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRule compliancePolicyRule; + + /** + * The returned CompliancePolicyRule instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRule getCompliancePolicyRule() { + return compliancePolicyRule; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "contentLocation", + "etag", + "opcWorkRequestId", + "opcRequestId", + "compliancePolicyRule" + }) + private CreateCompliancePolicyRuleResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String contentLocation, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRule compliancePolicyRule) { + super(__httpStatusCode__, headers); + this.location = location; + this.contentLocation = contentLocation; + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.compliancePolicyRule = compliancePolicyRule; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * URL for the created CompliancePolicyRule. The CompliancePolicyRule OCID is generated after this request is sent. + */ + private String location; + + /** + * URL for the created CompliancePolicyRule. The CompliancePolicyRule OCID is generated after this request is sent. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * Same as location. + */ + private String contentLocation; + + /** + * Same as location. + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned CompliancePolicyRule instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRule compliancePolicyRule; + + /** + * The returned CompliancePolicyRule instance. + * @param compliancePolicyRule the value to set + * @return this builder + */ + public Builder compliancePolicyRule( + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRule + compliancePolicyRule) { + this.compliancePolicyRule = compliancePolicyRule; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateCompliancePolicyRuleResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + compliancePolicyRule(o.getCompliancePolicyRule()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateCompliancePolicyRuleResponse build() { + return new CreateCompliancePolicyRuleResponse( + __httpStatusCode__, + headers, + location, + contentLocation, + etag, + opcWorkRequestId, + opcRequestId, + compliancePolicyRule); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",compliancePolicyRule=").append(String.valueOf(compliancePolicyRule)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateCompliancePolicyRuleResponse)) { + return false; + } + + CreateCompliancePolicyRuleResponse other = (CreateCompliancePolicyRuleResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.compliancePolicyRule, other.compliancePolicyRule); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.compliancePolicyRule == null + ? 43 + : this.compliancePolicyRule.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateFleetCredentialResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateFleetCredentialResponse.java new file mode 100644 index 00000000000..34e22676d97 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateFleetCredentialResponse.java @@ -0,0 +1,333 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateFleetCredentialResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * URL for the created fleetCredential, the fleetCredential id will be generated after this request is sent. + */ + private String location; + + /** + * URL for the created fleetCredential, the fleetCredential id will be generated after this request is sent. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * Same as location + */ + private String contentLocation; + + /** + * Same as location + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned FleetCredential instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetCredential fleetCredential; + + /** + * The returned FleetCredential instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.FleetCredential getFleetCredential() { + return fleetCredential; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "contentLocation", + "etag", + "opcWorkRequestId", + "opcRequestId", + "fleetCredential" + }) + private CreateFleetCredentialResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String contentLocation, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.FleetCredential fleetCredential) { + super(__httpStatusCode__, headers); + this.location = location; + this.contentLocation = contentLocation; + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.fleetCredential = fleetCredential; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * URL for the created fleetCredential, the fleetCredential id will be generated after this request is sent. + */ + private String location; + + /** + * URL for the created fleetCredential, the fleetCredential id will be generated after this request is sent. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * Same as location + */ + private String contentLocation; + + /** + * Same as location + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned FleetCredential instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetCredential fleetCredential; + + /** + * The returned FleetCredential instance. + * @param fleetCredential the value to set + * @return this builder + */ + public Builder fleetCredential( + com.oracle.bmc.fleetappsmanagement.model.FleetCredential fleetCredential) { + this.fleetCredential = fleetCredential; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateFleetCredentialResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + fleetCredential(o.getFleetCredential()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateFleetCredentialResponse build() { + return new CreateFleetCredentialResponse( + __httpStatusCode__, + headers, + location, + contentLocation, + etag, + opcWorkRequestId, + opcRequestId, + fleetCredential); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",fleetCredential=").append(String.valueOf(fleetCredential)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateFleetCredentialResponse)) { + return false; + } + + CreateFleetCredentialResponse other = (CreateFleetCredentialResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.fleetCredential, other.fleetCredential); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.fleetCredential == null ? 43 : this.fleetCredential.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateFleetPropertyResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateFleetPropertyResponse.java new file mode 100644 index 00000000000..0505b6c491e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateFleetPropertyResponse.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateFleetPropertyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned FleetProperty instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetProperty fleetProperty; + + /** + * The returned FleetProperty instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.FleetProperty getFleetProperty() { + return fleetProperty; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "fleetProperty" + }) + private CreateFleetPropertyResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.FleetProperty fleetProperty) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.fleetProperty = fleetProperty; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned FleetProperty instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetProperty fleetProperty; + + /** + * The returned FleetProperty instance. + * @param fleetProperty the value to set + * @return this builder + */ + public Builder fleetProperty( + com.oracle.bmc.fleetappsmanagement.model.FleetProperty fleetProperty) { + this.fleetProperty = fleetProperty; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateFleetPropertyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + fleetProperty(o.getFleetProperty()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateFleetPropertyResponse build() { + return new CreateFleetPropertyResponse( + __httpStatusCode__, headers, etag, opcRequestId, fleetProperty); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",fleetProperty=").append(String.valueOf(fleetProperty)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateFleetPropertyResponse)) { + return false; + } + + CreateFleetPropertyResponse other = (CreateFleetPropertyResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.fleetProperty, other.fleetProperty); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.fleetProperty == null ? 43 : this.fleetProperty.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateFleetResourceResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateFleetResourceResponse.java new file mode 100644 index 00000000000..028164c8ef0 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateFleetResourceResponse.java @@ -0,0 +1,333 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateFleetResourceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * URL for the created fleetResource, the fleetResource id will be generated after this request is sent. + */ + private String location; + + /** + * URL for the created fleetResource, the fleetResource id will be generated after this request is sent. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * Same as location + */ + private String contentLocation; + + /** + * Same as location + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned FleetResource instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetResource fleetResource; + + /** + * The returned FleetResource instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.FleetResource getFleetResource() { + return fleetResource; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "contentLocation", + "etag", + "opcWorkRequestId", + "opcRequestId", + "fleetResource" + }) + private CreateFleetResourceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String contentLocation, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.FleetResource fleetResource) { + super(__httpStatusCode__, headers); + this.location = location; + this.contentLocation = contentLocation; + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.fleetResource = fleetResource; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * URL for the created fleetResource, the fleetResource id will be generated after this request is sent. + */ + private String location; + + /** + * URL for the created fleetResource, the fleetResource id will be generated after this request is sent. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * Same as location + */ + private String contentLocation; + + /** + * Same as location + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned FleetResource instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetResource fleetResource; + + /** + * The returned FleetResource instance. + * @param fleetResource the value to set + * @return this builder + */ + public Builder fleetResource( + com.oracle.bmc.fleetappsmanagement.model.FleetResource fleetResource) { + this.fleetResource = fleetResource; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateFleetResourceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + fleetResource(o.getFleetResource()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateFleetResourceResponse build() { + return new CreateFleetResourceResponse( + __httpStatusCode__, + headers, + location, + contentLocation, + etag, + opcWorkRequestId, + opcRequestId, + fleetResource); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",fleetResource=").append(String.valueOf(fleetResource)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateFleetResourceResponse)) { + return false; + } + + CreateFleetResourceResponse other = (CreateFleetResourceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.fleetResource, other.fleetResource); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.fleetResource == null ? 43 : this.fleetResource.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateFleetResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateFleetResponse.java new file mode 100644 index 00000000000..539dd8cba43 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateFleetResponse.java @@ -0,0 +1,330 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateFleetResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * URL for the created fleet, the fleet id will be generated after this request is sent. + */ + private String location; + + /** + * URL for the created fleet, the fleet id will be generated after this request is sent. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * Same as location + */ + private String contentLocation; + + /** + * Same as location + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Fleet instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Fleet fleet; + + /** + * The returned Fleet instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.Fleet getFleet() { + return fleet; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "contentLocation", + "etag", + "opcWorkRequestId", + "opcRequestId", + "fleet" + }) + private CreateFleetResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String contentLocation, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.Fleet fleet) { + super(__httpStatusCode__, headers); + this.location = location; + this.contentLocation = contentLocation; + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.fleet = fleet; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * URL for the created fleet, the fleet id will be generated after this request is sent. + */ + private String location; + + /** + * URL for the created fleet, the fleet id will be generated after this request is sent. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * Same as location + */ + private String contentLocation; + + /** + * Same as location + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Fleet instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Fleet fleet; + + /** + * The returned Fleet instance. + * @param fleet the value to set + * @return this builder + */ + public Builder fleet(com.oracle.bmc.fleetappsmanagement.model.Fleet fleet) { + this.fleet = fleet; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateFleetResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + fleet(o.getFleet()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateFleetResponse build() { + return new CreateFleetResponse( + __httpStatusCode__, + headers, + location, + contentLocation, + etag, + opcWorkRequestId, + opcRequestId, + fleet); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",fleet=").append(String.valueOf(fleet)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateFleetResponse)) { + return false; + } + + CreateFleetResponse other = (CreateFleetResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.fleet, other.fleet); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.fleet == null ? 43 : this.fleet.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateMaintenanceWindowResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateMaintenanceWindowResponse.java new file mode 100644 index 00000000000..88686b318e5 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateMaintenanceWindowResponse.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateMaintenanceWindowResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned MaintenanceWindow instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindow maintenanceWindow; + + /** + * The returned MaintenanceWindow instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindow getMaintenanceWindow() { + return maintenanceWindow; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "maintenanceWindow" + }) + private CreateMaintenanceWindowResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindow maintenanceWindow) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.maintenanceWindow = maintenanceWindow; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned MaintenanceWindow instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindow maintenanceWindow; + + /** + * The returned MaintenanceWindow instance. + * @param maintenanceWindow the value to set + * @return this builder + */ + public Builder maintenanceWindow( + com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindow maintenanceWindow) { + this.maintenanceWindow = maintenanceWindow; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateMaintenanceWindowResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + maintenanceWindow(o.getMaintenanceWindow()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateMaintenanceWindowResponse build() { + return new CreateMaintenanceWindowResponse( + __httpStatusCode__, headers, etag, opcRequestId, maintenanceWindow); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",maintenanceWindow=").append(String.valueOf(maintenanceWindow)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateMaintenanceWindowResponse)) { + return false; + } + + CreateMaintenanceWindowResponse other = (CreateMaintenanceWindowResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.maintenanceWindow, other.maintenanceWindow); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.maintenanceWindow == null ? 43 : this.maintenanceWindow.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateOnboardingResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateOnboardingResponse.java new file mode 100644 index 00000000000..f38eb6be0e4 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateOnboardingResponse.java @@ -0,0 +1,330 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateOnboardingResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * URL for the created Onboarding, the Onboarding id will be generated after this request is sent. + */ + private String location; + + /** + * URL for the created Onboarding, the Onboarding id will be generated after this request is sent. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * Same as location + */ + private String contentLocation; + + /** + * Same as location + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Onboarding instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Onboarding onboarding; + + /** + * The returned Onboarding instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.Onboarding getOnboarding() { + return onboarding; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "contentLocation", + "etag", + "opcWorkRequestId", + "opcRequestId", + "onboarding" + }) + private CreateOnboardingResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String contentLocation, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.Onboarding onboarding) { + super(__httpStatusCode__, headers); + this.location = location; + this.contentLocation = contentLocation; + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.onboarding = onboarding; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * URL for the created Onboarding, the Onboarding id will be generated after this request is sent. + */ + private String location; + + /** + * URL for the created Onboarding, the Onboarding id will be generated after this request is sent. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * Same as location + */ + private String contentLocation; + + /** + * Same as location + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Onboarding instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Onboarding onboarding; + + /** + * The returned Onboarding instance. + * @param onboarding the value to set + * @return this builder + */ + public Builder onboarding(com.oracle.bmc.fleetappsmanagement.model.Onboarding onboarding) { + this.onboarding = onboarding; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateOnboardingResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + onboarding(o.getOnboarding()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateOnboardingResponse build() { + return new CreateOnboardingResponse( + __httpStatusCode__, + headers, + location, + contentLocation, + etag, + opcWorkRequestId, + opcRequestId, + onboarding); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",onboarding=").append(String.valueOf(onboarding)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateOnboardingResponse)) { + return false; + } + + CreateOnboardingResponse other = (CreateOnboardingResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.onboarding, other.onboarding); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.onboarding == null ? 43 : this.onboarding.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreatePatchResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreatePatchResponse.java new file mode 100644 index 00000000000..5c16f93ef5b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreatePatchResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreatePatchResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Patch instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Patch patch; + + /** + * The returned Patch instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.Patch getPatch() { + return patch; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "patch" + }) + private CreatePatchResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.Patch patch) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.patch = patch; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Patch instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Patch patch; + + /** + * The returned Patch instance. + * @param patch the value to set + * @return this builder + */ + public Builder patch(com.oracle.bmc.fleetappsmanagement.model.Patch patch) { + this.patch = patch; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreatePatchResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + patch(o.getPatch()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreatePatchResponse build() { + return new CreatePatchResponse(__httpStatusCode__, headers, etag, opcRequestId, patch); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",patch=").append(String.valueOf(patch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreatePatchResponse)) { + return false; + } + + CreatePatchResponse other = (CreatePatchResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.patch, other.patch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.patch == null ? 43 : this.patch.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreatePlatformConfigurationResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreatePlatformConfigurationResponse.java new file mode 100644 index 00000000000..17ab280dfd6 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreatePlatformConfigurationResponse.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreatePlatformConfigurationResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned PlatformConfiguration instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.PlatformConfiguration platformConfiguration; + + /** + * The returned PlatformConfiguration instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.PlatformConfiguration + getPlatformConfiguration() { + return platformConfiguration; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "platformConfiguration" + }) + private CreatePlatformConfigurationResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.PlatformConfiguration platformConfiguration) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.platformConfiguration = platformConfiguration; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned PlatformConfiguration instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.PlatformConfiguration + platformConfiguration; + + /** + * The returned PlatformConfiguration instance. + * @param platformConfiguration the value to set + * @return this builder + */ + public Builder platformConfiguration( + com.oracle.bmc.fleetappsmanagement.model.PlatformConfiguration + platformConfiguration) { + this.platformConfiguration = platformConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreatePlatformConfigurationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + platformConfiguration(o.getPlatformConfiguration()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreatePlatformConfigurationResponse build() { + return new CreatePlatformConfigurationResponse( + __httpStatusCode__, headers, etag, opcRequestId, platformConfiguration); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",platformConfiguration=").append(String.valueOf(platformConfiguration)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreatePlatformConfigurationResponse)) { + return false; + } + + CreatePlatformConfigurationResponse other = (CreatePlatformConfigurationResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.platformConfiguration, other.platformConfiguration); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.platformConfiguration == null + ? 43 + : this.platformConfiguration.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreatePropertyResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreatePropertyResponse.java new file mode 100644 index 00000000000..3de9a70e17f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreatePropertyResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreatePropertyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Property instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Property property; + + /** + * The returned Property instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.Property getProperty() { + return property; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "property" + }) + private CreatePropertyResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.Property property) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.property = property; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Property instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Property property; + + /** + * The returned Property instance. + * @param property the value to set + * @return this builder + */ + public Builder property(com.oracle.bmc.fleetappsmanagement.model.Property property) { + this.property = property; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreatePropertyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + property(o.getProperty()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreatePropertyResponse build() { + return new CreatePropertyResponse( + __httpStatusCode__, headers, etag, opcRequestId, property); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",property=").append(String.valueOf(property)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreatePropertyResponse)) { + return false; + } + + CreatePropertyResponse other = (CreatePropertyResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.property, other.property); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.property == null ? 43 : this.property.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateRunbookResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateRunbookResponse.java new file mode 100644 index 00000000000..fda0d3faaa9 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateRunbookResponse.java @@ -0,0 +1,330 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateRunbookResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * URL for the created runbook, the runbook id will be generated after this request is sent. + */ + private String location; + + /** + * URL for the created runbook, the runbook id will be generated after this request is sent. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * Same as location + */ + private String contentLocation; + + /** + * Same as location + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Runbook instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Runbook runbook; + + /** + * The returned Runbook instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.Runbook getRunbook() { + return runbook; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "contentLocation", + "etag", + "opcWorkRequestId", + "opcRequestId", + "runbook" + }) + private CreateRunbookResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String contentLocation, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.Runbook runbook) { + super(__httpStatusCode__, headers); + this.location = location; + this.contentLocation = contentLocation; + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.runbook = runbook; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * URL for the created runbook, the runbook id will be generated after this request is sent. + */ + private String location; + + /** + * URL for the created runbook, the runbook id will be generated after this request is sent. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * Same as location + */ + private String contentLocation; + + /** + * Same as location + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Runbook instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Runbook runbook; + + /** + * The returned Runbook instance. + * @param runbook the value to set + * @return this builder + */ + public Builder runbook(com.oracle.bmc.fleetappsmanagement.model.Runbook runbook) { + this.runbook = runbook; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateRunbookResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + runbook(o.getRunbook()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateRunbookResponse build() { + return new CreateRunbookResponse( + __httpStatusCode__, + headers, + location, + contentLocation, + etag, + opcWorkRequestId, + opcRequestId, + runbook); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",runbook=").append(String.valueOf(runbook)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateRunbookResponse)) { + return false; + } + + CreateRunbookResponse other = (CreateRunbookResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.runbook, other.runbook); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.runbook == null ? 43 : this.runbook.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateSchedulerDefinitionResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateSchedulerDefinitionResponse.java new file mode 100644 index 00000000000..289cc97ff2f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateSchedulerDefinitionResponse.java @@ -0,0 +1,335 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateSchedulerDefinitionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * URL for the created schedulerDefinition, the schedulerDefinition id will be generated after this request is sent. + */ + private String location; + + /** + * URL for the created schedulerDefinition, the schedulerDefinition id will be generated after this request is sent. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * Same as location + */ + private String contentLocation; + + /** + * Same as location + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned SchedulerDefinition instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinition schedulerDefinition; + + /** + * The returned SchedulerDefinition instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinition getSchedulerDefinition() { + return schedulerDefinition; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "contentLocation", + "etag", + "opcWorkRequestId", + "opcRequestId", + "schedulerDefinition" + }) + private CreateSchedulerDefinitionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String contentLocation, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinition schedulerDefinition) { + super(__httpStatusCode__, headers); + this.location = location; + this.contentLocation = contentLocation; + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.schedulerDefinition = schedulerDefinition; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * URL for the created schedulerDefinition, the schedulerDefinition id will be generated after this request is sent. + */ + private String location; + + /** + * URL for the created schedulerDefinition, the schedulerDefinition id will be generated after this request is sent. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * Same as location + */ + private String contentLocation; + + /** + * Same as location + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned SchedulerDefinition instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinition schedulerDefinition; + + /** + * The returned SchedulerDefinition instance. + * @param schedulerDefinition the value to set + * @return this builder + */ + public Builder schedulerDefinition( + com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinition schedulerDefinition) { + this.schedulerDefinition = schedulerDefinition; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateSchedulerDefinitionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + schedulerDefinition(o.getSchedulerDefinition()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateSchedulerDefinitionResponse build() { + return new CreateSchedulerDefinitionResponse( + __httpStatusCode__, + headers, + location, + contentLocation, + etag, + opcWorkRequestId, + opcRequestId, + schedulerDefinition); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",schedulerDefinition=").append(String.valueOf(schedulerDefinition)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSchedulerDefinitionResponse)) { + return false; + } + + CreateSchedulerDefinitionResponse other = (CreateSchedulerDefinitionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.schedulerDefinition, other.schedulerDefinition); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.schedulerDefinition == null + ? 43 + : this.schedulerDefinition.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateTaskRecordResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateTaskRecordResponse.java new file mode 100644 index 00000000000..32633643116 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/CreateTaskRecordResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class CreateTaskRecordResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned TaskRecord instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.TaskRecord taskRecord; + + /** + * The returned TaskRecord instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.TaskRecord getTaskRecord() { + return taskRecord; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "taskRecord" + }) + private CreateTaskRecordResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.TaskRecord taskRecord) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.taskRecord = taskRecord; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned TaskRecord instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.TaskRecord taskRecord; + + /** + * The returned TaskRecord instance. + * @param taskRecord the value to set + * @return this builder + */ + public Builder taskRecord(com.oracle.bmc.fleetappsmanagement.model.TaskRecord taskRecord) { + this.taskRecord = taskRecord; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateTaskRecordResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + taskRecord(o.getTaskRecord()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateTaskRecordResponse build() { + return new CreateTaskRecordResponse( + __httpStatusCode__, headers, etag, opcRequestId, taskRecord); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",taskRecord=").append(String.valueOf(taskRecord)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateTaskRecordResponse)) { + return false; + } + + CreateTaskRecordResponse other = (CreateTaskRecordResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.taskRecord, other.taskRecord); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.taskRecord == null ? 43 : this.taskRecord.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteCompliancePolicyRuleResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteCompliancePolicyRuleResponse.java new file mode 100644 index 00000000000..a2bc74af0d8 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteCompliancePolicyRuleResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteCompliancePolicyRuleResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteCompliancePolicyRuleResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteCompliancePolicyRuleResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteCompliancePolicyRuleResponse build() { + return new DeleteCompliancePolicyRuleResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteCompliancePolicyRuleResponse)) { + return false; + } + + DeleteCompliancePolicyRuleResponse other = (DeleteCompliancePolicyRuleResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteFleetCredentialResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteFleetCredentialResponse.java new file mode 100644 index 00000000000..848d5dae8bd --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteFleetCredentialResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteFleetCredentialResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteFleetCredentialResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteFleetCredentialResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteFleetCredentialResponse build() { + return new DeleteFleetCredentialResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteFleetCredentialResponse)) { + return false; + } + + DeleteFleetCredentialResponse other = (DeleteFleetCredentialResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteFleetPropertyResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteFleetPropertyResponse.java new file mode 100644 index 00000000000..80b346229e4 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteFleetPropertyResponse.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteFleetPropertyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeleteFleetPropertyResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteFleetPropertyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteFleetPropertyResponse build() { + return new DeleteFleetPropertyResponse(__httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteFleetPropertyResponse)) { + return false; + } + + DeleteFleetPropertyResponse other = (DeleteFleetPropertyResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteFleetResourceResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteFleetResourceResponse.java new file mode 100644 index 00000000000..5af88573b9d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteFleetResourceResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteFleetResourceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteFleetResourceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteFleetResourceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteFleetResourceResponse build() { + return new DeleteFleetResourceResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteFleetResourceResponse)) { + return false; + } + + DeleteFleetResourceResponse other = (DeleteFleetResourceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteFleetResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteFleetResponse.java new file mode 100644 index 00000000000..50443d7d6ea --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteFleetResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteFleetResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteFleetResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteFleetResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteFleetResponse build() { + return new DeleteFleetResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteFleetResponse)) { + return false; + } + + DeleteFleetResponse other = (DeleteFleetResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteMaintenanceWindowResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteMaintenanceWindowResponse.java new file mode 100644 index 00000000000..d00ec938726 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteMaintenanceWindowResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteMaintenanceWindowResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteMaintenanceWindowResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteMaintenanceWindowResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteMaintenanceWindowResponse build() { + return new DeleteMaintenanceWindowResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteMaintenanceWindowResponse)) { + return false; + } + + DeleteMaintenanceWindowResponse other = (DeleteMaintenanceWindowResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteOnboardingResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteOnboardingResponse.java new file mode 100644 index 00000000000..b195e3b9347 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteOnboardingResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteOnboardingResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteOnboardingResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteOnboardingResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteOnboardingResponse build() { + return new DeleteOnboardingResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteOnboardingResponse)) { + return false; + } + + DeleteOnboardingResponse other = (DeleteOnboardingResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeletePatchResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeletePatchResponse.java new file mode 100644 index 00000000000..691a662bd14 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeletePatchResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeletePatchResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeletePatchResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeletePatchResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeletePatchResponse build() { + return new DeletePatchResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeletePatchResponse)) { + return false; + } + + DeletePatchResponse other = (DeletePatchResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeletePlatformConfigurationResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeletePlatformConfigurationResponse.java new file mode 100644 index 00000000000..4832ab1e0b6 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeletePlatformConfigurationResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeletePlatformConfigurationResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeletePlatformConfigurationResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeletePlatformConfigurationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeletePlatformConfigurationResponse build() { + return new DeletePlatformConfigurationResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeletePlatformConfigurationResponse)) { + return false; + } + + DeletePlatformConfigurationResponse other = (DeletePlatformConfigurationResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeletePropertyResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeletePropertyResponse.java new file mode 100644 index 00000000000..881b6e3298f --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeletePropertyResponse.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeletePropertyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeletePropertyResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeletePropertyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeletePropertyResponse build() { + return new DeletePropertyResponse(__httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeletePropertyResponse)) { + return false; + } + + DeletePropertyResponse other = (DeletePropertyResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteRunbookResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteRunbookResponse.java new file mode 100644 index 00000000000..f000b489a53 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteRunbookResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteRunbookResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteRunbookResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteRunbookResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteRunbookResponse build() { + return new DeleteRunbookResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteRunbookResponse)) { + return false; + } + + DeleteRunbookResponse other = (DeleteRunbookResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteSchedulerDefinitionResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteSchedulerDefinitionResponse.java new file mode 100644 index 00000000000..eb049534860 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteSchedulerDefinitionResponse.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteSchedulerDefinitionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeleteSchedulerDefinitionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteSchedulerDefinitionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteSchedulerDefinitionResponse build() { + return new DeleteSchedulerDefinitionResponse(__httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSchedulerDefinitionResponse)) { + return false; + } + + DeleteSchedulerDefinitionResponse other = (DeleteSchedulerDefinitionResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteSchedulerJobResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteSchedulerJobResponse.java new file mode 100644 index 00000000000..52241d7e4a3 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteSchedulerJobResponse.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteSchedulerJobResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeleteSchedulerJobResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteSchedulerJobResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteSchedulerJobResponse build() { + return new DeleteSchedulerJobResponse(__httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSchedulerJobResponse)) { + return false; + } + + DeleteSchedulerJobResponse other = (DeleteSchedulerJobResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteTaskRecordResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteTaskRecordResponse.java new file mode 100644 index 00000000000..655d03bcdb4 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/DeleteTaskRecordResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class DeleteTaskRecordResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteTaskRecordResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteTaskRecordResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteTaskRecordResponse build() { + return new DeleteTaskRecordResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteTaskRecordResponse)) { + return false; + } + + DeleteTaskRecordResponse other = (DeleteTaskRecordResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/EnableLatestPolicyResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/EnableLatestPolicyResponse.java new file mode 100644 index 00000000000..45b44f8d941 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/EnableLatestPolicyResponse.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class EnableLatestPolicyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private EnableLatestPolicyResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(EnableLatestPolicyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public EnableLatestPolicyResponse build() { + return new EnableLatestPolicyResponse(__httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof EnableLatestPolicyResponse)) { + return false; + } + + EnableLatestPolicyResponse other = (EnableLatestPolicyResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ExportComplianceReportResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ExportComplianceReportResponse.java new file mode 100644 index 00000000000..19913ce4dd3 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ExportComplianceReportResponse.java @@ -0,0 +1,288 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ExportComplianceReportResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The content size of the body in bytes. + */ + private Long contentLength; + + /** + * The content size of the body in bytes. + * @return the value + */ + public Long getContentLength() { + return contentLength; + } + + /** + * The content type of the body. + */ + private String contentType; + + /** + * The content type of the body. + * @return the value + */ + public String getContentType() { + return contentType; + } + + /** + * The returned java.io.InputStream instance. + */ + private java.io.InputStream inputStream; + + /** + * The returned java.io.InputStream instance. + * @return the value + */ + public java.io.InputStream getInputStream() { + return inputStream; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "contentLength", + "contentType", + "inputStream" + }) + private ExportComplianceReportResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + Long contentLength, + String contentType, + java.io.InputStream inputStream) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.contentLength = contentLength; + this.contentType = contentType; + this.inputStream = inputStream; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The content size of the body in bytes. + */ + private Long contentLength; + + /** + * The content size of the body in bytes. + * @param contentLength the value to set + * @return this builder + */ + public Builder contentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + + /** + * The content type of the body. + */ + private String contentType; + + /** + * The content type of the body. + * @param contentType the value to set + * @return this builder + */ + public Builder contentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * The returned java.io.InputStream instance. + */ + private java.io.InputStream inputStream; + + /** + * The returned java.io.InputStream instance. + * @param inputStream the value to set + * @return this builder + */ + public Builder inputStream(java.io.InputStream inputStream) { + this.inputStream = inputStream; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ExportComplianceReportResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + contentLength(o.getContentLength()); + contentType(o.getContentType()); + inputStream(o.getInputStream()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ExportComplianceReportResponse build() { + return new ExportComplianceReportResponse( + __httpStatusCode__, + headers, + etag, + opcRequestId, + contentLength, + contentType, + inputStream); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",contentLength=").append(String.valueOf(contentLength)); + sb.append(",contentType=").append(String.valueOf(contentType)); + sb.append(",inputStream=").append(String.valueOf(inputStream)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExportComplianceReportResponse)) { + return false; + } + + ExportComplianceReportResponse other = (ExportComplianceReportResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.contentLength, other.contentLength) + && java.util.Objects.equals(this.contentType, other.contentType) + && java.util.Objects.equals(this.inputStream, other.inputStream); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.contentLength == null ? 43 : this.contentLength.hashCode()); + result = (result * PRIME) + (this.contentType == null ? 43 : this.contentType.hashCode()); + result = (result * PRIME) + (this.inputStream == null ? 43 : this.inputStream.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GenerateComplianceReportResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GenerateComplianceReportResponse.java new file mode 100644 index 00000000000..3884badc6fd --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GenerateComplianceReportResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GenerateComplianceReportResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private GenerateComplianceReportResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GenerateComplianceReportResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GenerateComplianceReportResponse build() { + return new GenerateComplianceReportResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GenerateComplianceReportResponse)) { + return false; + } + + GenerateComplianceReportResponse other = (GenerateComplianceReportResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetCompliancePolicyResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetCompliancePolicyResponse.java new file mode 100644 index 00000000000..98df7996eda --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetCompliancePolicyResponse.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetCompliancePolicyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned CompliancePolicy instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.CompliancePolicy compliancePolicy; + + /** + * The returned CompliancePolicy instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.CompliancePolicy getCompliancePolicy() { + return compliancePolicy; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "compliancePolicy" + }) + private GetCompliancePolicyResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicy compliancePolicy) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.compliancePolicy = compliancePolicy; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned CompliancePolicy instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.CompliancePolicy compliancePolicy; + + /** + * The returned CompliancePolicy instance. + * @param compliancePolicy the value to set + * @return this builder + */ + public Builder compliancePolicy( + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicy compliancePolicy) { + this.compliancePolicy = compliancePolicy; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetCompliancePolicyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + compliancePolicy(o.getCompliancePolicy()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetCompliancePolicyResponse build() { + return new GetCompliancePolicyResponse( + __httpStatusCode__, headers, etag, opcRequestId, compliancePolicy); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",compliancePolicy=").append(String.valueOf(compliancePolicy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetCompliancePolicyResponse)) { + return false; + } + + GetCompliancePolicyResponse other = (GetCompliancePolicyResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.compliancePolicy, other.compliancePolicy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.compliancePolicy == null ? 43 : this.compliancePolicy.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetCompliancePolicyRuleResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetCompliancePolicyRuleResponse.java new file mode 100644 index 00000000000..1072bea58a1 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetCompliancePolicyRuleResponse.java @@ -0,0 +1,216 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetCompliancePolicyRuleResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned CompliancePolicyRule instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRule compliancePolicyRule; + + /** + * The returned CompliancePolicyRule instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRule getCompliancePolicyRule() { + return compliancePolicyRule; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "compliancePolicyRule" + }) + private GetCompliancePolicyRuleResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRule compliancePolicyRule) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.compliancePolicyRule = compliancePolicyRule; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned CompliancePolicyRule instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRule compliancePolicyRule; + + /** + * The returned CompliancePolicyRule instance. + * @param compliancePolicyRule the value to set + * @return this builder + */ + public Builder compliancePolicyRule( + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRule + compliancePolicyRule) { + this.compliancePolicyRule = compliancePolicyRule; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetCompliancePolicyRuleResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + compliancePolicyRule(o.getCompliancePolicyRule()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetCompliancePolicyRuleResponse build() { + return new GetCompliancePolicyRuleResponse( + __httpStatusCode__, headers, etag, opcRequestId, compliancePolicyRule); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",compliancePolicyRule=").append(String.valueOf(compliancePolicyRule)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetCompliancePolicyRuleResponse)) { + return false; + } + + GetCompliancePolicyRuleResponse other = (GetCompliancePolicyRuleResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.compliancePolicyRule, other.compliancePolicyRule); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.compliancePolicyRule == null + ? 43 + : this.compliancePolicyRule.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetComplianceReportResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetComplianceReportResponse.java new file mode 100644 index 00000000000..d6893b1bf46 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetComplianceReportResponse.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetComplianceReportResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ComplianceReport instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.ComplianceReport complianceReport; + + /** + * The returned ComplianceReport instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.ComplianceReport getComplianceReport() { + return complianceReport; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "complianceReport" + }) + private GetComplianceReportResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.ComplianceReport complianceReport) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.complianceReport = complianceReport; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ComplianceReport instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.ComplianceReport complianceReport; + + /** + * The returned ComplianceReport instance. + * @param complianceReport the value to set + * @return this builder + */ + public Builder complianceReport( + com.oracle.bmc.fleetappsmanagement.model.ComplianceReport complianceReport) { + this.complianceReport = complianceReport; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetComplianceReportResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + complianceReport(o.getComplianceReport()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetComplianceReportResponse build() { + return new GetComplianceReportResponse( + __httpStatusCode__, headers, etag, opcRequestId, complianceReport); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",complianceReport=").append(String.valueOf(complianceReport)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetComplianceReportResponse)) { + return false; + } + + GetComplianceReportResponse other = (GetComplianceReportResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.complianceReport, other.complianceReport); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.complianceReport == null ? 43 : this.complianceReport.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetExecutionResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetExecutionResponse.java new file mode 100644 index 00000000000..d26fd3d38f1 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetExecutionResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetExecutionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Execution instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Execution execution; + + /** + * The returned Execution instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.Execution getExecution() { + return execution; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "execution" + }) + private GetExecutionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.Execution execution) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.execution = execution; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Execution instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Execution execution; + + /** + * The returned Execution instance. + * @param execution the value to set + * @return this builder + */ + public Builder execution(com.oracle.bmc.fleetappsmanagement.model.Execution execution) { + this.execution = execution; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetExecutionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + execution(o.getExecution()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetExecutionResponse build() { + return new GetExecutionResponse( + __httpStatusCode__, headers, etag, opcRequestId, execution); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",execution=").append(String.valueOf(execution)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetExecutionResponse)) { + return false; + } + + GetExecutionResponse other = (GetExecutionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.execution, other.execution); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.execution == null ? 43 : this.execution.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetFleetCredentialResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetFleetCredentialResponse.java new file mode 100644 index 00000000000..acdfa0786ea --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetFleetCredentialResponse.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetFleetCredentialResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned FleetCredential instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetCredential fleetCredential; + + /** + * The returned FleetCredential instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.FleetCredential getFleetCredential() { + return fleetCredential; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "fleetCredential" + }) + private GetFleetCredentialResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.FleetCredential fleetCredential) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.fleetCredential = fleetCredential; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned FleetCredential instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetCredential fleetCredential; + + /** + * The returned FleetCredential instance. + * @param fleetCredential the value to set + * @return this builder + */ + public Builder fleetCredential( + com.oracle.bmc.fleetappsmanagement.model.FleetCredential fleetCredential) { + this.fleetCredential = fleetCredential; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetFleetCredentialResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + fleetCredential(o.getFleetCredential()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetFleetCredentialResponse build() { + return new GetFleetCredentialResponse( + __httpStatusCode__, headers, etag, opcRequestId, fleetCredential); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",fleetCredential=").append(String.valueOf(fleetCredential)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetFleetCredentialResponse)) { + return false; + } + + GetFleetCredentialResponse other = (GetFleetCredentialResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.fleetCredential, other.fleetCredential); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.fleetCredential == null ? 43 : this.fleetCredential.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetFleetPropertyResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetFleetPropertyResponse.java new file mode 100644 index 00000000000..c9937f2c9cb --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetFleetPropertyResponse.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetFleetPropertyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned FleetProperty instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetProperty fleetProperty; + + /** + * The returned FleetProperty instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.FleetProperty getFleetProperty() { + return fleetProperty; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "fleetProperty" + }) + private GetFleetPropertyResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.FleetProperty fleetProperty) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.fleetProperty = fleetProperty; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned FleetProperty instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetProperty fleetProperty; + + /** + * The returned FleetProperty instance. + * @param fleetProperty the value to set + * @return this builder + */ + public Builder fleetProperty( + com.oracle.bmc.fleetappsmanagement.model.FleetProperty fleetProperty) { + this.fleetProperty = fleetProperty; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetFleetPropertyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + fleetProperty(o.getFleetProperty()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetFleetPropertyResponse build() { + return new GetFleetPropertyResponse( + __httpStatusCode__, headers, etag, opcRequestId, fleetProperty); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",fleetProperty=").append(String.valueOf(fleetProperty)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetFleetPropertyResponse)) { + return false; + } + + GetFleetPropertyResponse other = (GetFleetPropertyResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.fleetProperty, other.fleetProperty); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.fleetProperty == null ? 43 : this.fleetProperty.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetFleetResourceResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetFleetResourceResponse.java new file mode 100644 index 00000000000..a49a007d3f2 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetFleetResourceResponse.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetFleetResourceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned FleetResource instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetResource fleetResource; + + /** + * The returned FleetResource instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.FleetResource getFleetResource() { + return fleetResource; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "fleetResource" + }) + private GetFleetResourceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.FleetResource fleetResource) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.fleetResource = fleetResource; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned FleetResource instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetResource fleetResource; + + /** + * The returned FleetResource instance. + * @param fleetResource the value to set + * @return this builder + */ + public Builder fleetResource( + com.oracle.bmc.fleetappsmanagement.model.FleetResource fleetResource) { + this.fleetResource = fleetResource; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetFleetResourceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + fleetResource(o.getFleetResource()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetFleetResourceResponse build() { + return new GetFleetResourceResponse( + __httpStatusCode__, headers, etag, opcRequestId, fleetResource); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",fleetResource=").append(String.valueOf(fleetResource)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetFleetResourceResponse)) { + return false; + } + + GetFleetResourceResponse other = (GetFleetResourceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.fleetResource, other.fleetResource); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.fleetResource == null ? 43 : this.fleetResource.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetFleetResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetFleetResponse.java new file mode 100644 index 00000000000..3b411f702a7 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetFleetResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetFleetResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Fleet instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Fleet fleet; + + /** + * The returned Fleet instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.Fleet getFleet() { + return fleet; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "fleet" + }) + private GetFleetResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.Fleet fleet) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.fleet = fleet; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Fleet instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Fleet fleet; + + /** + * The returned Fleet instance. + * @param fleet the value to set + * @return this builder + */ + public Builder fleet(com.oracle.bmc.fleetappsmanagement.model.Fleet fleet) { + this.fleet = fleet; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetFleetResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + fleet(o.getFleet()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetFleetResponse build() { + return new GetFleetResponse(__httpStatusCode__, headers, etag, opcRequestId, fleet); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",fleet=").append(String.valueOf(fleet)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetFleetResponse)) { + return false; + } + + GetFleetResponse other = (GetFleetResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.fleet, other.fleet); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.fleet == null ? 43 : this.fleet.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetJobActivityResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetJobActivityResponse.java new file mode 100644 index 00000000000..4726942afc1 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetJobActivityResponse.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetJobActivityResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned JobActivity instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.JobActivity jobActivity; + + /** + * The returned JobActivity instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.JobActivity getJobActivity() { + return jobActivity; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "jobActivity" + }) + private GetJobActivityResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.JobActivity jobActivity) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.jobActivity = jobActivity; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned JobActivity instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.JobActivity jobActivity; + + /** + * The returned JobActivity instance. + * @param jobActivity the value to set + * @return this builder + */ + public Builder jobActivity( + com.oracle.bmc.fleetappsmanagement.model.JobActivity jobActivity) { + this.jobActivity = jobActivity; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetJobActivityResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + jobActivity(o.getJobActivity()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetJobActivityResponse build() { + return new GetJobActivityResponse( + __httpStatusCode__, headers, etag, opcRequestId, jobActivity); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",jobActivity=").append(String.valueOf(jobActivity)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetJobActivityResponse)) { + return false; + } + + GetJobActivityResponse other = (GetJobActivityResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.jobActivity, other.jobActivity); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.jobActivity == null ? 43 : this.jobActivity.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetMaintenanceWindowResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetMaintenanceWindowResponse.java new file mode 100644 index 00000000000..3e2b4664dd9 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetMaintenanceWindowResponse.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetMaintenanceWindowResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned MaintenanceWindow instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindow maintenanceWindow; + + /** + * The returned MaintenanceWindow instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindow getMaintenanceWindow() { + return maintenanceWindow; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "maintenanceWindow" + }) + private GetMaintenanceWindowResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindow maintenanceWindow) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.maintenanceWindow = maintenanceWindow; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned MaintenanceWindow instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindow maintenanceWindow; + + /** + * The returned MaintenanceWindow instance. + * @param maintenanceWindow the value to set + * @return this builder + */ + public Builder maintenanceWindow( + com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindow maintenanceWindow) { + this.maintenanceWindow = maintenanceWindow; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetMaintenanceWindowResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + maintenanceWindow(o.getMaintenanceWindow()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetMaintenanceWindowResponse build() { + return new GetMaintenanceWindowResponse( + __httpStatusCode__, headers, etag, opcRequestId, maintenanceWindow); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",maintenanceWindow=").append(String.valueOf(maintenanceWindow)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetMaintenanceWindowResponse)) { + return false; + } + + GetMaintenanceWindowResponse other = (GetMaintenanceWindowResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.maintenanceWindow, other.maintenanceWindow); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.maintenanceWindow == null ? 43 : this.maintenanceWindow.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetOnboardingResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetOnboardingResponse.java new file mode 100644 index 00000000000..f2b6eaa1d31 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetOnboardingResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetOnboardingResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Onboarding instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Onboarding onboarding; + + /** + * The returned Onboarding instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.Onboarding getOnboarding() { + return onboarding; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "onboarding" + }) + private GetOnboardingResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.Onboarding onboarding) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.onboarding = onboarding; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Onboarding instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Onboarding onboarding; + + /** + * The returned Onboarding instance. + * @param onboarding the value to set + * @return this builder + */ + public Builder onboarding(com.oracle.bmc.fleetappsmanagement.model.Onboarding onboarding) { + this.onboarding = onboarding; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetOnboardingResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + onboarding(o.getOnboarding()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetOnboardingResponse build() { + return new GetOnboardingResponse( + __httpStatusCode__, headers, etag, opcRequestId, onboarding); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",onboarding=").append(String.valueOf(onboarding)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetOnboardingResponse)) { + return false; + } + + GetOnboardingResponse other = (GetOnboardingResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.onboarding, other.onboarding); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.onboarding == null ? 43 : this.onboarding.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetPatchResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetPatchResponse.java new file mode 100644 index 00000000000..95c7b28a56d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetPatchResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetPatchResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Patch instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Patch patch; + + /** + * The returned Patch instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.Patch getPatch() { + return patch; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "patch" + }) + private GetPatchResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.Patch patch) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.patch = patch; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Patch instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Patch patch; + + /** + * The returned Patch instance. + * @param patch the value to set + * @return this builder + */ + public Builder patch(com.oracle.bmc.fleetappsmanagement.model.Patch patch) { + this.patch = patch; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetPatchResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + patch(o.getPatch()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetPatchResponse build() { + return new GetPatchResponse(__httpStatusCode__, headers, etag, opcRequestId, patch); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",patch=").append(String.valueOf(patch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetPatchResponse)) { + return false; + } + + GetPatchResponse other = (GetPatchResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.patch, other.patch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.patch == null ? 43 : this.patch.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetPlatformConfigurationResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetPlatformConfigurationResponse.java new file mode 100644 index 00000000000..893e67ba128 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetPlatformConfigurationResponse.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetPlatformConfigurationResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned PlatformConfiguration instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.PlatformConfiguration platformConfiguration; + + /** + * The returned PlatformConfiguration instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.PlatformConfiguration + getPlatformConfiguration() { + return platformConfiguration; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "platformConfiguration" + }) + private GetPlatformConfigurationResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.PlatformConfiguration platformConfiguration) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.platformConfiguration = platformConfiguration; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned PlatformConfiguration instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.PlatformConfiguration + platformConfiguration; + + /** + * The returned PlatformConfiguration instance. + * @param platformConfiguration the value to set + * @return this builder + */ + public Builder platformConfiguration( + com.oracle.bmc.fleetappsmanagement.model.PlatformConfiguration + platformConfiguration) { + this.platformConfiguration = platformConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetPlatformConfigurationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + platformConfiguration(o.getPlatformConfiguration()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetPlatformConfigurationResponse build() { + return new GetPlatformConfigurationResponse( + __httpStatusCode__, headers, etag, opcRequestId, platformConfiguration); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",platformConfiguration=").append(String.valueOf(platformConfiguration)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetPlatformConfigurationResponse)) { + return false; + } + + GetPlatformConfigurationResponse other = (GetPlatformConfigurationResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.platformConfiguration, other.platformConfiguration); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.platformConfiguration == null + ? 43 + : this.platformConfiguration.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetPropertyResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetPropertyResponse.java new file mode 100644 index 00000000000..70892c011a4 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetPropertyResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetPropertyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Property instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Property property; + + /** + * The returned Property instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.Property getProperty() { + return property; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "property" + }) + private GetPropertyResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.Property property) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.property = property; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Property instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Property property; + + /** + * The returned Property instance. + * @param property the value to set + * @return this builder + */ + public Builder property(com.oracle.bmc.fleetappsmanagement.model.Property property) { + this.property = property; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetPropertyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + property(o.getProperty()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetPropertyResponse build() { + return new GetPropertyResponse( + __httpStatusCode__, headers, etag, opcRequestId, property); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",property=").append(String.valueOf(property)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetPropertyResponse)) { + return false; + } + + GetPropertyResponse other = (GetPropertyResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.property, other.property); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.property == null ? 43 : this.property.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetRunbookResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetRunbookResponse.java new file mode 100644 index 00000000000..58a55e5ca80 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetRunbookResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetRunbookResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Runbook instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Runbook runbook; + + /** + * The returned Runbook instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.Runbook getRunbook() { + return runbook; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "runbook" + }) + private GetRunbookResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.Runbook runbook) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.runbook = runbook; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Runbook instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Runbook runbook; + + /** + * The returned Runbook instance. + * @param runbook the value to set + * @return this builder + */ + public Builder runbook(com.oracle.bmc.fleetappsmanagement.model.Runbook runbook) { + this.runbook = runbook; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetRunbookResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + runbook(o.getRunbook()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetRunbookResponse build() { + return new GetRunbookResponse(__httpStatusCode__, headers, etag, opcRequestId, runbook); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",runbook=").append(String.valueOf(runbook)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetRunbookResponse)) { + return false; + } + + GetRunbookResponse other = (GetRunbookResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.runbook, other.runbook); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.runbook == null ? 43 : this.runbook.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetSchedulerDefinitionResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetSchedulerDefinitionResponse.java new file mode 100644 index 00000000000..96c5b0da371 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetSchedulerDefinitionResponse.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetSchedulerDefinitionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned SchedulerDefinition instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinition schedulerDefinition; + + /** + * The returned SchedulerDefinition instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinition getSchedulerDefinition() { + return schedulerDefinition; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "schedulerDefinition" + }) + private GetSchedulerDefinitionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinition schedulerDefinition) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.schedulerDefinition = schedulerDefinition; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned SchedulerDefinition instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinition schedulerDefinition; + + /** + * The returned SchedulerDefinition instance. + * @param schedulerDefinition the value to set + * @return this builder + */ + public Builder schedulerDefinition( + com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinition schedulerDefinition) { + this.schedulerDefinition = schedulerDefinition; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSchedulerDefinitionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + schedulerDefinition(o.getSchedulerDefinition()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetSchedulerDefinitionResponse build() { + return new GetSchedulerDefinitionResponse( + __httpStatusCode__, headers, etag, opcRequestId, schedulerDefinition); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",schedulerDefinition=").append(String.valueOf(schedulerDefinition)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSchedulerDefinitionResponse)) { + return false; + } + + GetSchedulerDefinitionResponse other = (GetSchedulerDefinitionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.schedulerDefinition, other.schedulerDefinition); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.schedulerDefinition == null + ? 43 + : this.schedulerDefinition.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetSchedulerJobResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetSchedulerJobResponse.java new file mode 100644 index 00000000000..a0132d9ecb8 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetSchedulerJobResponse.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetSchedulerJobResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned SchedulerJob instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.SchedulerJob schedulerJob; + + /** + * The returned SchedulerJob instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.SchedulerJob getSchedulerJob() { + return schedulerJob; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "schedulerJob" + }) + private GetSchedulerJobResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.SchedulerJob schedulerJob) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.schedulerJob = schedulerJob; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned SchedulerJob instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.SchedulerJob schedulerJob; + + /** + * The returned SchedulerJob instance. + * @param schedulerJob the value to set + * @return this builder + */ + public Builder schedulerJob( + com.oracle.bmc.fleetappsmanagement.model.SchedulerJob schedulerJob) { + this.schedulerJob = schedulerJob; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSchedulerJobResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + schedulerJob(o.getSchedulerJob()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetSchedulerJobResponse build() { + return new GetSchedulerJobResponse( + __httpStatusCode__, headers, etag, opcRequestId, schedulerJob); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",schedulerJob=").append(String.valueOf(schedulerJob)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSchedulerJobResponse)) { + return false; + } + + GetSchedulerJobResponse other = (GetSchedulerJobResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.schedulerJob, other.schedulerJob); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.schedulerJob == null ? 43 : this.schedulerJob.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetTaskRecordResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetTaskRecordResponse.java new file mode 100644 index 00000000000..86dc0b8a0e4 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetTaskRecordResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetTaskRecordResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned TaskRecord instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.TaskRecord taskRecord; + + /** + * The returned TaskRecord instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.TaskRecord getTaskRecord() { + return taskRecord; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "taskRecord" + }) + private GetTaskRecordResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.TaskRecord taskRecord) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.taskRecord = taskRecord; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned TaskRecord instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.TaskRecord taskRecord; + + /** + * The returned TaskRecord instance. + * @param taskRecord the value to set + * @return this builder + */ + public Builder taskRecord(com.oracle.bmc.fleetappsmanagement.model.TaskRecord taskRecord) { + this.taskRecord = taskRecord; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetTaskRecordResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + taskRecord(o.getTaskRecord()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetTaskRecordResponse build() { + return new GetTaskRecordResponse( + __httpStatusCode__, headers, etag, opcRequestId, taskRecord); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",taskRecord=").append(String.valueOf(taskRecord)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetTaskRecordResponse)) { + return false; + } + + GetTaskRecordResponse other = (GetTaskRecordResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.taskRecord, other.taskRecord); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.taskRecord == null ? 43 : this.taskRecord.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetWorkRequestResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetWorkRequestResponse.java new file mode 100644 index 00000000000..875851d19ea --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/GetWorkRequestResponse.java @@ -0,0 +1,246 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class GetWorkRequestResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @return the value + */ + public Integer getRetryAfter() { + return retryAfter; + } + + /** + * The returned WorkRequest instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.WorkRequest workRequest; + + /** + * The returned WorkRequest instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.WorkRequest getWorkRequest() { + return workRequest; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "retryAfter", + "workRequest" + }) + private GetWorkRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + Integer retryAfter, + com.oracle.bmc.fleetappsmanagement.model.WorkRequest workRequest) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + this.workRequest = workRequest; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @param retryAfter the value to set + * @return this builder + */ + public Builder retryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * The returned WorkRequest instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.WorkRequest workRequest; + + /** + * The returned WorkRequest instance. + * @param workRequest the value to set + * @return this builder + */ + public Builder workRequest( + com.oracle.bmc.fleetappsmanagement.model.WorkRequest workRequest) { + this.workRequest = workRequest; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetWorkRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + workRequest(o.getWorkRequest()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetWorkRequestResponse build() { + return new GetWorkRequestResponse( + __httpStatusCode__, headers, etag, opcRequestId, retryAfter, workRequest); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",retryAfter=").append(String.valueOf(retryAfter)); + sb.append(",workRequest=").append(String.valueOf(workRequest)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetWorkRequestResponse)) { + return false; + } + + GetWorkRequestResponse other = (GetWorkRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.retryAfter, other.retryAfter) + && java.util.Objects.equals(this.workRequest, other.workRequest); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.retryAfter == null ? 43 : this.retryAfter.hashCode()); + result = (result * PRIME) + (this.workRequest == null ? 43 : this.workRequest.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListAnnouncementsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListAnnouncementsResponse.java new file mode 100644 index 00000000000..70794b0c639 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListAnnouncementsResponse.java @@ -0,0 +1,228 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListAnnouncementsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned AnnouncementCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.AnnouncementCollection announcementCollection; + + /** + * The returned AnnouncementCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.AnnouncementCollection + getAnnouncementCollection() { + return announcementCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "announcementCollection" + }) + private ListAnnouncementsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.AnnouncementCollection + announcementCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.announcementCollection = announcementCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned AnnouncementCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.AnnouncementCollection + announcementCollection; + + /** + * The returned AnnouncementCollection instance. + * @param announcementCollection the value to set + * @return this builder + */ + public Builder announcementCollection( + com.oracle.bmc.fleetappsmanagement.model.AnnouncementCollection + announcementCollection) { + this.announcementCollection = announcementCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAnnouncementsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + announcementCollection(o.getAnnouncementCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListAnnouncementsResponse build() { + return new ListAnnouncementsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, announcementCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",announcementCollection=").append(String.valueOf(announcementCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListAnnouncementsResponse)) { + return false; + } + + ListAnnouncementsResponse other = (ListAnnouncementsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.announcementCollection, other.announcementCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.announcementCollection == null + ? 43 + : this.announcementCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListCompliancePoliciesResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListCompliancePoliciesResponse.java new file mode 100644 index 00000000000..1638b272717 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListCompliancePoliciesResponse.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListCompliancePoliciesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned CompliancePolicyCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyCollection + compliancePolicyCollection; + + /** + * The returned CompliancePolicyCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyCollection + getCompliancePolicyCollection() { + return compliancePolicyCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "compliancePolicyCollection" + }) + private ListCompliancePoliciesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyCollection + compliancePolicyCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.compliancePolicyCollection = compliancePolicyCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned CompliancePolicyCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyCollection + compliancePolicyCollection; + + /** + * The returned CompliancePolicyCollection instance. + * @param compliancePolicyCollection the value to set + * @return this builder + */ + public Builder compliancePolicyCollection( + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyCollection + compliancePolicyCollection) { + this.compliancePolicyCollection = compliancePolicyCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListCompliancePoliciesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + compliancePolicyCollection(o.getCompliancePolicyCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListCompliancePoliciesResponse build() { + return new ListCompliancePoliciesResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + compliancePolicyCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",compliancePolicyCollection=") + .append(String.valueOf(compliancePolicyCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListCompliancePoliciesResponse)) { + return false; + } + + ListCompliancePoliciesResponse other = (ListCompliancePoliciesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.compliancePolicyCollection, other.compliancePolicyCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.compliancePolicyCollection == null + ? 43 + : this.compliancePolicyCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListCompliancePolicyRulesResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListCompliancePolicyRulesResponse.java new file mode 100644 index 00000000000..6e1111fd79b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListCompliancePolicyRulesResponse.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListCompliancePolicyRulesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned CompliancePolicyRuleCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRuleCollection + compliancePolicyRuleCollection; + + /** + * The returned CompliancePolicyRuleCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRuleCollection + getCompliancePolicyRuleCollection() { + return compliancePolicyRuleCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "compliancePolicyRuleCollection" + }) + private ListCompliancePolicyRulesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRuleCollection + compliancePolicyRuleCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.compliancePolicyRuleCollection = compliancePolicyRuleCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned CompliancePolicyRuleCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRuleCollection + compliancePolicyRuleCollection; + + /** + * The returned CompliancePolicyRuleCollection instance. + * @param compliancePolicyRuleCollection the value to set + * @return this builder + */ + public Builder compliancePolicyRuleCollection( + com.oracle.bmc.fleetappsmanagement.model.CompliancePolicyRuleCollection + compliancePolicyRuleCollection) { + this.compliancePolicyRuleCollection = compliancePolicyRuleCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListCompliancePolicyRulesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + compliancePolicyRuleCollection(o.getCompliancePolicyRuleCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListCompliancePolicyRulesResponse build() { + return new ListCompliancePolicyRulesResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + compliancePolicyRuleCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",compliancePolicyRuleCollection=") + .append(String.valueOf(compliancePolicyRuleCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListCompliancePolicyRulesResponse)) { + return false; + } + + ListCompliancePolicyRulesResponse other = (ListCompliancePolicyRulesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.compliancePolicyRuleCollection, other.compliancePolicyRuleCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.compliancePolicyRuleCollection == null + ? 43 + : this.compliancePolicyRuleCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListComplianceRecordsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListComplianceRecordsResponse.java new file mode 100644 index 00000000000..f4785409e0c --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListComplianceRecordsResponse.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListComplianceRecordsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned ComplianceRecordCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.ComplianceRecordCollection + complianceRecordCollection; + + /** + * The returned ComplianceRecordCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.ComplianceRecordCollection + getComplianceRecordCollection() { + return complianceRecordCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "complianceRecordCollection" + }) + private ListComplianceRecordsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.ComplianceRecordCollection + complianceRecordCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.complianceRecordCollection = complianceRecordCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned ComplianceRecordCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.ComplianceRecordCollection + complianceRecordCollection; + + /** + * The returned ComplianceRecordCollection instance. + * @param complianceRecordCollection the value to set + * @return this builder + */ + public Builder complianceRecordCollection( + com.oracle.bmc.fleetappsmanagement.model.ComplianceRecordCollection + complianceRecordCollection) { + this.complianceRecordCollection = complianceRecordCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListComplianceRecordsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + complianceRecordCollection(o.getComplianceRecordCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListComplianceRecordsResponse build() { + return new ListComplianceRecordsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + complianceRecordCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",complianceRecordCollection=") + .append(String.valueOf(complianceRecordCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListComplianceRecordsResponse)) { + return false; + } + + ListComplianceRecordsResponse other = (ListComplianceRecordsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.complianceRecordCollection, other.complianceRecordCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.complianceRecordCollection == null + ? 43 + : this.complianceRecordCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListExecutionsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListExecutionsResponse.java new file mode 100644 index 00000000000..9dd5a524735 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListExecutionsResponse.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListExecutionsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned ExecutionCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.ExecutionCollection executionCollection; + + /** + * The returned ExecutionCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.ExecutionCollection getExecutionCollection() { + return executionCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "executionCollection" + }) + private ListExecutionsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.ExecutionCollection executionCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.executionCollection = executionCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned ExecutionCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.ExecutionCollection executionCollection; + + /** + * The returned ExecutionCollection instance. + * @param executionCollection the value to set + * @return this builder + */ + public Builder executionCollection( + com.oracle.bmc.fleetappsmanagement.model.ExecutionCollection executionCollection) { + this.executionCollection = executionCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListExecutionsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + executionCollection(o.getExecutionCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListExecutionsResponse build() { + return new ListExecutionsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, executionCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",executionCollection=").append(String.valueOf(executionCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListExecutionsResponse)) { + return false; + } + + ListExecutionsResponse other = (ListExecutionsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.executionCollection, other.executionCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.executionCollection == null + ? 43 + : this.executionCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListFleetCredentialsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListFleetCredentialsResponse.java new file mode 100644 index 00000000000..508b80cda42 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListFleetCredentialsResponse.java @@ -0,0 +1,233 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListFleetCredentialsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned FleetCredentialCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetCredentialCollection + fleetCredentialCollection; + + /** + * The returned FleetCredentialCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.FleetCredentialCollection + getFleetCredentialCollection() { + return fleetCredentialCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "fleetCredentialCollection" + }) + private ListFleetCredentialsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.FleetCredentialCollection + fleetCredentialCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.fleetCredentialCollection = fleetCredentialCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned FleetCredentialCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetCredentialCollection + fleetCredentialCollection; + + /** + * The returned FleetCredentialCollection instance. + * @param fleetCredentialCollection the value to set + * @return this builder + */ + public Builder fleetCredentialCollection( + com.oracle.bmc.fleetappsmanagement.model.FleetCredentialCollection + fleetCredentialCollection) { + this.fleetCredentialCollection = fleetCredentialCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListFleetCredentialsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + fleetCredentialCollection(o.getFleetCredentialCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListFleetCredentialsResponse build() { + return new ListFleetCredentialsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + fleetCredentialCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",fleetCredentialCollection=").append(String.valueOf(fleetCredentialCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListFleetCredentialsResponse)) { + return false; + } + + ListFleetCredentialsResponse other = (ListFleetCredentialsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.fleetCredentialCollection, other.fleetCredentialCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.fleetCredentialCollection == null + ? 43 + : this.fleetCredentialCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListFleetProductsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListFleetProductsResponse.java new file mode 100644 index 00000000000..65e06fc3267 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListFleetProductsResponse.java @@ -0,0 +1,228 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListFleetProductsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned FleetProductCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetProductCollection fleetProductCollection; + + /** + * The returned FleetProductCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.FleetProductCollection + getFleetProductCollection() { + return fleetProductCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "fleetProductCollection" + }) + private ListFleetProductsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.FleetProductCollection + fleetProductCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.fleetProductCollection = fleetProductCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned FleetProductCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetProductCollection + fleetProductCollection; + + /** + * The returned FleetProductCollection instance. + * @param fleetProductCollection the value to set + * @return this builder + */ + public Builder fleetProductCollection( + com.oracle.bmc.fleetappsmanagement.model.FleetProductCollection + fleetProductCollection) { + this.fleetProductCollection = fleetProductCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListFleetProductsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + fleetProductCollection(o.getFleetProductCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListFleetProductsResponse build() { + return new ListFleetProductsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, fleetProductCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",fleetProductCollection=").append(String.valueOf(fleetProductCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListFleetProductsResponse)) { + return false; + } + + ListFleetProductsResponse other = (ListFleetProductsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.fleetProductCollection, other.fleetProductCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.fleetProductCollection == null + ? 43 + : this.fleetProductCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListFleetPropertiesResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListFleetPropertiesResponse.java new file mode 100644 index 00000000000..bdd790c802b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListFleetPropertiesResponse.java @@ -0,0 +1,233 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListFleetPropertiesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned FleetPropertyCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetPropertyCollection + fleetPropertyCollection; + + /** + * The returned FleetPropertyCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.FleetPropertyCollection + getFleetPropertyCollection() { + return fleetPropertyCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "fleetPropertyCollection" + }) + private ListFleetPropertiesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.FleetPropertyCollection + fleetPropertyCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.fleetPropertyCollection = fleetPropertyCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned FleetPropertyCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetPropertyCollection + fleetPropertyCollection; + + /** + * The returned FleetPropertyCollection instance. + * @param fleetPropertyCollection the value to set + * @return this builder + */ + public Builder fleetPropertyCollection( + com.oracle.bmc.fleetappsmanagement.model.FleetPropertyCollection + fleetPropertyCollection) { + this.fleetPropertyCollection = fleetPropertyCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListFleetPropertiesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + fleetPropertyCollection(o.getFleetPropertyCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListFleetPropertiesResponse build() { + return new ListFleetPropertiesResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + fleetPropertyCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",fleetPropertyCollection=").append(String.valueOf(fleetPropertyCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListFleetPropertiesResponse)) { + return false; + } + + ListFleetPropertiesResponse other = (ListFleetPropertiesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.fleetPropertyCollection, other.fleetPropertyCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.fleetPropertyCollection == null + ? 43 + : this.fleetPropertyCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListFleetResourcesResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListFleetResourcesResponse.java new file mode 100644 index 00000000000..ded073a2e9d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListFleetResourcesResponse.java @@ -0,0 +1,233 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListFleetResourcesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned FleetResourceCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetResourceCollection + fleetResourceCollection; + + /** + * The returned FleetResourceCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.FleetResourceCollection + getFleetResourceCollection() { + return fleetResourceCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "fleetResourceCollection" + }) + private ListFleetResourcesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.FleetResourceCollection + fleetResourceCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.fleetResourceCollection = fleetResourceCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned FleetResourceCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetResourceCollection + fleetResourceCollection; + + /** + * The returned FleetResourceCollection instance. + * @param fleetResourceCollection the value to set + * @return this builder + */ + public Builder fleetResourceCollection( + com.oracle.bmc.fleetappsmanagement.model.FleetResourceCollection + fleetResourceCollection) { + this.fleetResourceCollection = fleetResourceCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListFleetResourcesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + fleetResourceCollection(o.getFleetResourceCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListFleetResourcesResponse build() { + return new ListFleetResourcesResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + fleetResourceCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",fleetResourceCollection=").append(String.valueOf(fleetResourceCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListFleetResourcesResponse)) { + return false; + } + + ListFleetResourcesResponse other = (ListFleetResourcesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.fleetResourceCollection, other.fleetResourceCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.fleetResourceCollection == null + ? 43 + : this.fleetResourceCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListFleetTargetsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListFleetTargetsResponse.java new file mode 100644 index 00000000000..d27b2c2ce29 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListFleetTargetsResponse.java @@ -0,0 +1,227 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListFleetTargetsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned FleetTargetCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetTargetCollection fleetTargetCollection; + + /** + * The returned FleetTargetCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.FleetTargetCollection + getFleetTargetCollection() { + return fleetTargetCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "fleetTargetCollection" + }) + private ListFleetTargetsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.FleetTargetCollection fleetTargetCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.fleetTargetCollection = fleetTargetCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned FleetTargetCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetTargetCollection + fleetTargetCollection; + + /** + * The returned FleetTargetCollection instance. + * @param fleetTargetCollection the value to set + * @return this builder + */ + public Builder fleetTargetCollection( + com.oracle.bmc.fleetappsmanagement.model.FleetTargetCollection + fleetTargetCollection) { + this.fleetTargetCollection = fleetTargetCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListFleetTargetsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + fleetTargetCollection(o.getFleetTargetCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListFleetTargetsResponse build() { + return new ListFleetTargetsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, fleetTargetCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",fleetTargetCollection=").append(String.valueOf(fleetTargetCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListFleetTargetsResponse)) { + return false; + } + + ListFleetTargetsResponse other = (ListFleetTargetsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.fleetTargetCollection, other.fleetTargetCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.fleetTargetCollection == null + ? 43 + : this.fleetTargetCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListFleetsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListFleetsResponse.java new file mode 100644 index 00000000000..74aeaf5e389 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListFleetsResponse.java @@ -0,0 +1,263 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListFleetsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A number representing the the total number of results available. + */ + private Integer opcTotalItems; + + /** + * A number representing the the total number of results available. + * @return the value + */ + public Integer getOpcTotalItems() { + return opcTotalItems; + } + + /** + * The returned FleetCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetCollection fleetCollection; + + /** + * The returned FleetCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.FleetCollection getFleetCollection() { + return fleetCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "opcTotalItems", + "fleetCollection" + }) + private ListFleetsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + Integer opcTotalItems, + com.oracle.bmc.fleetappsmanagement.model.FleetCollection fleetCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.opcTotalItems = opcTotalItems; + this.fleetCollection = fleetCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A number representing the the total number of results available. + */ + private Integer opcTotalItems; + + /** + * A number representing the the total number of results available. + * @param opcTotalItems the value to set + * @return this builder + */ + public Builder opcTotalItems(Integer opcTotalItems) { + this.opcTotalItems = opcTotalItems; + return this; + } + + /** + * The returned FleetCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetCollection fleetCollection; + + /** + * The returned FleetCollection instance. + * @param fleetCollection the value to set + * @return this builder + */ + public Builder fleetCollection( + com.oracle.bmc.fleetappsmanagement.model.FleetCollection fleetCollection) { + this.fleetCollection = fleetCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListFleetsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + opcTotalItems(o.getOpcTotalItems()); + fleetCollection(o.getFleetCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListFleetsResponse build() { + return new ListFleetsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + opcTotalItems, + fleetCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcTotalItems=").append(String.valueOf(opcTotalItems)); + sb.append(",fleetCollection=").append(String.valueOf(fleetCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListFleetsResponse)) { + return false; + } + + ListFleetsResponse other = (ListFleetsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcTotalItems, other.opcTotalItems) + && java.util.Objects.equals(this.fleetCollection, other.fleetCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.opcTotalItems == null ? 43 : this.opcTotalItems.hashCode()); + result = + (result * PRIME) + + (this.fleetCollection == null ? 43 : this.fleetCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListInventoryResourcesResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListInventoryResourcesResponse.java new file mode 100644 index 00000000000..bcb2634eb51 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListInventoryResourcesResponse.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListInventoryResourcesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned InventoryResourceCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.InventoryResourceCollection + inventoryResourceCollection; + + /** + * The returned InventoryResourceCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.InventoryResourceCollection + getInventoryResourceCollection() { + return inventoryResourceCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "inventoryResourceCollection" + }) + private ListInventoryResourcesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.InventoryResourceCollection + inventoryResourceCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.inventoryResourceCollection = inventoryResourceCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned InventoryResourceCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.InventoryResourceCollection + inventoryResourceCollection; + + /** + * The returned InventoryResourceCollection instance. + * @param inventoryResourceCollection the value to set + * @return this builder + */ + public Builder inventoryResourceCollection( + com.oracle.bmc.fleetappsmanagement.model.InventoryResourceCollection + inventoryResourceCollection) { + this.inventoryResourceCollection = inventoryResourceCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListInventoryResourcesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + inventoryResourceCollection(o.getInventoryResourceCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListInventoryResourcesResponse build() { + return new ListInventoryResourcesResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + inventoryResourceCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",inventoryResourceCollection=") + .append(String.valueOf(inventoryResourceCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListInventoryResourcesResponse)) { + return false; + } + + ListInventoryResourcesResponse other = (ListInventoryResourcesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.inventoryResourceCollection, other.inventoryResourceCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.inventoryResourceCollection == null + ? 43 + : this.inventoryResourceCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListMaintenanceWindowsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListMaintenanceWindowsResponse.java new file mode 100644 index 00000000000..1b83a6953e5 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListMaintenanceWindowsResponse.java @@ -0,0 +1,272 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListMaintenanceWindowsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A number representing the the total number of results available. + */ + private Integer opcTotalItems; + + /** + * A number representing the the total number of results available. + * @return the value + */ + public Integer getOpcTotalItems() { + return opcTotalItems; + } + + /** + * The returned MaintenanceWindowCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindowCollection + maintenanceWindowCollection; + + /** + * The returned MaintenanceWindowCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindowCollection + getMaintenanceWindowCollection() { + return maintenanceWindowCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "opcTotalItems", + "maintenanceWindowCollection" + }) + private ListMaintenanceWindowsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + Integer opcTotalItems, + com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindowCollection + maintenanceWindowCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.opcTotalItems = opcTotalItems; + this.maintenanceWindowCollection = maintenanceWindowCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A number representing the the total number of results available. + */ + private Integer opcTotalItems; + + /** + * A number representing the the total number of results available. + * @param opcTotalItems the value to set + * @return this builder + */ + public Builder opcTotalItems(Integer opcTotalItems) { + this.opcTotalItems = opcTotalItems; + return this; + } + + /** + * The returned MaintenanceWindowCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindowCollection + maintenanceWindowCollection; + + /** + * The returned MaintenanceWindowCollection instance. + * @param maintenanceWindowCollection the value to set + * @return this builder + */ + public Builder maintenanceWindowCollection( + com.oracle.bmc.fleetappsmanagement.model.MaintenanceWindowCollection + maintenanceWindowCollection) { + this.maintenanceWindowCollection = maintenanceWindowCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListMaintenanceWindowsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + opcTotalItems(o.getOpcTotalItems()); + maintenanceWindowCollection(o.getMaintenanceWindowCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListMaintenanceWindowsResponse build() { + return new ListMaintenanceWindowsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + opcTotalItems, + maintenanceWindowCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcTotalItems=").append(String.valueOf(opcTotalItems)); + sb.append(",maintenanceWindowCollection=") + .append(String.valueOf(maintenanceWindowCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListMaintenanceWindowsResponse)) { + return false; + } + + ListMaintenanceWindowsResponse other = (ListMaintenanceWindowsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcTotalItems, other.opcTotalItems) + && java.util.Objects.equals( + this.maintenanceWindowCollection, other.maintenanceWindowCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.opcTotalItems == null ? 43 : this.opcTotalItems.hashCode()); + result = + (result * PRIME) + + (this.maintenanceWindowCollection == null + ? 43 + : this.maintenanceWindowCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListOnboardingPoliciesResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListOnboardingPoliciesResponse.java new file mode 100644 index 00000000000..e2d128fc5a1 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListOnboardingPoliciesResponse.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListOnboardingPoliciesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned OnboardingPolicyCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.OnboardingPolicyCollection + onboardingPolicyCollection; + + /** + * The returned OnboardingPolicyCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.OnboardingPolicyCollection + getOnboardingPolicyCollection() { + return onboardingPolicyCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "onboardingPolicyCollection" + }) + private ListOnboardingPoliciesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.OnboardingPolicyCollection + onboardingPolicyCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.onboardingPolicyCollection = onboardingPolicyCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned OnboardingPolicyCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.OnboardingPolicyCollection + onboardingPolicyCollection; + + /** + * The returned OnboardingPolicyCollection instance. + * @param onboardingPolicyCollection the value to set + * @return this builder + */ + public Builder onboardingPolicyCollection( + com.oracle.bmc.fleetappsmanagement.model.OnboardingPolicyCollection + onboardingPolicyCollection) { + this.onboardingPolicyCollection = onboardingPolicyCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListOnboardingPoliciesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + onboardingPolicyCollection(o.getOnboardingPolicyCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListOnboardingPoliciesResponse build() { + return new ListOnboardingPoliciesResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + onboardingPolicyCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",onboardingPolicyCollection=") + .append(String.valueOf(onboardingPolicyCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListOnboardingPoliciesResponse)) { + return false; + } + + ListOnboardingPoliciesResponse other = (ListOnboardingPoliciesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.onboardingPolicyCollection, other.onboardingPolicyCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.onboardingPolicyCollection == null + ? 43 + : this.onboardingPolicyCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListOnboardingsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListOnboardingsResponse.java new file mode 100644 index 00000000000..e313176fdc8 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListOnboardingsResponse.java @@ -0,0 +1,224 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListOnboardingsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned OnboardingCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.OnboardingCollection onboardingCollection; + + /** + * The returned OnboardingCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.OnboardingCollection getOnboardingCollection() { + return onboardingCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "onboardingCollection" + }) + private ListOnboardingsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.OnboardingCollection onboardingCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.onboardingCollection = onboardingCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned OnboardingCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.OnboardingCollection onboardingCollection; + + /** + * The returned OnboardingCollection instance. + * @param onboardingCollection the value to set + * @return this builder + */ + public Builder onboardingCollection( + com.oracle.bmc.fleetappsmanagement.model.OnboardingCollection + onboardingCollection) { + this.onboardingCollection = onboardingCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListOnboardingsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + onboardingCollection(o.getOnboardingCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListOnboardingsResponse build() { + return new ListOnboardingsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, onboardingCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",onboardingCollection=").append(String.valueOf(onboardingCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListOnboardingsResponse)) { + return false; + } + + ListOnboardingsResponse other = (ListOnboardingsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.onboardingCollection, other.onboardingCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.onboardingCollection == null + ? 43 + : this.onboardingCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListPatchesResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListPatchesResponse.java new file mode 100644 index 00000000000..e3096d423f0 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListPatchesResponse.java @@ -0,0 +1,221 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListPatchesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned PatchCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.PatchCollection patchCollection; + + /** + * The returned PatchCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.PatchCollection getPatchCollection() { + return patchCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "patchCollection" + }) + private ListPatchesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.PatchCollection patchCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.patchCollection = patchCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned PatchCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.PatchCollection patchCollection; + + /** + * The returned PatchCollection instance. + * @param patchCollection the value to set + * @return this builder + */ + public Builder patchCollection( + com.oracle.bmc.fleetappsmanagement.model.PatchCollection patchCollection) { + this.patchCollection = patchCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPatchesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + patchCollection(o.getPatchCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListPatchesResponse build() { + return new ListPatchesResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, patchCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",patchCollection=").append(String.valueOf(patchCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPatchesResponse)) { + return false; + } + + ListPatchesResponse other = (ListPatchesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.patchCollection, other.patchCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.patchCollection == null ? 43 : this.patchCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListPlatformConfigurationsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListPlatformConfigurationsResponse.java new file mode 100644 index 00000000000..3bcd47e0f89 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListPlatformConfigurationsResponse.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListPlatformConfigurationsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned PlatformConfigurationCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.PlatformConfigurationCollection + platformConfigurationCollection; + + /** + * The returned PlatformConfigurationCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.PlatformConfigurationCollection + getPlatformConfigurationCollection() { + return platformConfigurationCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "platformConfigurationCollection" + }) + private ListPlatformConfigurationsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.PlatformConfigurationCollection + platformConfigurationCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.platformConfigurationCollection = platformConfigurationCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned PlatformConfigurationCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.PlatformConfigurationCollection + platformConfigurationCollection; + + /** + * The returned PlatformConfigurationCollection instance. + * @param platformConfigurationCollection the value to set + * @return this builder + */ + public Builder platformConfigurationCollection( + com.oracle.bmc.fleetappsmanagement.model.PlatformConfigurationCollection + platformConfigurationCollection) { + this.platformConfigurationCollection = platformConfigurationCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPlatformConfigurationsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + platformConfigurationCollection(o.getPlatformConfigurationCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListPlatformConfigurationsResponse build() { + return new ListPlatformConfigurationsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + platformConfigurationCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",platformConfigurationCollection=") + .append(String.valueOf(platformConfigurationCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPlatformConfigurationsResponse)) { + return false; + } + + ListPlatformConfigurationsResponse other = (ListPlatformConfigurationsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.platformConfigurationCollection, + other.platformConfigurationCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.platformConfigurationCollection == null + ? 43 + : this.platformConfigurationCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListPropertiesResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListPropertiesResponse.java new file mode 100644 index 00000000000..56360df6020 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListPropertiesResponse.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListPropertiesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned PropertyCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.PropertyCollection propertyCollection; + + /** + * The returned PropertyCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.PropertyCollection getPropertyCollection() { + return propertyCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "propertyCollection" + }) + private ListPropertiesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.PropertyCollection propertyCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.propertyCollection = propertyCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned PropertyCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.PropertyCollection propertyCollection; + + /** + * The returned PropertyCollection instance. + * @param propertyCollection the value to set + * @return this builder + */ + public Builder propertyCollection( + com.oracle.bmc.fleetappsmanagement.model.PropertyCollection propertyCollection) { + this.propertyCollection = propertyCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPropertiesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + propertyCollection(o.getPropertyCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListPropertiesResponse build() { + return new ListPropertiesResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, propertyCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",propertyCollection=").append(String.valueOf(propertyCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPropertiesResponse)) { + return false; + } + + ListPropertiesResponse other = (ListPropertiesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.propertyCollection, other.propertyCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.propertyCollection == null + ? 43 + : this.propertyCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListResourcesResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListResourcesResponse.java new file mode 100644 index 00000000000..4a418141e48 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListResourcesResponse.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListResourcesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned ResourceCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.ResourceCollection resourceCollection; + + /** + * The returned ResourceCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.ResourceCollection getResourceCollection() { + return resourceCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "resourceCollection" + }) + private ListResourcesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.ResourceCollection resourceCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.resourceCollection = resourceCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned ResourceCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.ResourceCollection resourceCollection; + + /** + * The returned ResourceCollection instance. + * @param resourceCollection the value to set + * @return this builder + */ + public Builder resourceCollection( + com.oracle.bmc.fleetappsmanagement.model.ResourceCollection resourceCollection) { + this.resourceCollection = resourceCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListResourcesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + resourceCollection(o.getResourceCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListResourcesResponse build() { + return new ListResourcesResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, resourceCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",resourceCollection=").append(String.valueOf(resourceCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListResourcesResponse)) { + return false; + } + + ListResourcesResponse other = (ListResourcesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.resourceCollection, other.resourceCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.resourceCollection == null + ? 43 + : this.resourceCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListRunbooksResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListRunbooksResponse.java new file mode 100644 index 00000000000..b4e9e900f9d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListRunbooksResponse.java @@ -0,0 +1,221 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListRunbooksResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned RunbookCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.RunbookCollection runbookCollection; + + /** + * The returned RunbookCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.RunbookCollection getRunbookCollection() { + return runbookCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "runbookCollection" + }) + private ListRunbooksResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.RunbookCollection runbookCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.runbookCollection = runbookCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned RunbookCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.RunbookCollection runbookCollection; + + /** + * The returned RunbookCollection instance. + * @param runbookCollection the value to set + * @return this builder + */ + public Builder runbookCollection( + com.oracle.bmc.fleetappsmanagement.model.RunbookCollection runbookCollection) { + this.runbookCollection = runbookCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListRunbooksResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + runbookCollection(o.getRunbookCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListRunbooksResponse build() { + return new ListRunbooksResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, runbookCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",runbookCollection=").append(String.valueOf(runbookCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListRunbooksResponse)) { + return false; + } + + ListRunbooksResponse other = (ListRunbooksResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.runbookCollection, other.runbookCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.runbookCollection == null ? 43 : this.runbookCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListScheduledFleetsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListScheduledFleetsResponse.java new file mode 100644 index 00000000000..dfc1b433b38 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListScheduledFleetsResponse.java @@ -0,0 +1,233 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListScheduledFleetsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned ScheduledFleetCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.ScheduledFleetCollection + scheduledFleetCollection; + + /** + * The returned ScheduledFleetCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.ScheduledFleetCollection + getScheduledFleetCollection() { + return scheduledFleetCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "scheduledFleetCollection" + }) + private ListScheduledFleetsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.ScheduledFleetCollection + scheduledFleetCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.scheduledFleetCollection = scheduledFleetCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned ScheduledFleetCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.ScheduledFleetCollection + scheduledFleetCollection; + + /** + * The returned ScheduledFleetCollection instance. + * @param scheduledFleetCollection the value to set + * @return this builder + */ + public Builder scheduledFleetCollection( + com.oracle.bmc.fleetappsmanagement.model.ScheduledFleetCollection + scheduledFleetCollection) { + this.scheduledFleetCollection = scheduledFleetCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListScheduledFleetsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + scheduledFleetCollection(o.getScheduledFleetCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListScheduledFleetsResponse build() { + return new ListScheduledFleetsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + scheduledFleetCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",scheduledFleetCollection=").append(String.valueOf(scheduledFleetCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListScheduledFleetsResponse)) { + return false; + } + + ListScheduledFleetsResponse other = (ListScheduledFleetsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.scheduledFleetCollection, other.scheduledFleetCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.scheduledFleetCollection == null + ? 43 + : this.scheduledFleetCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListSchedulerDefinitionsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListSchedulerDefinitionsResponse.java new file mode 100644 index 00000000000..4eaf9f40a3b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListSchedulerDefinitionsResponse.java @@ -0,0 +1,272 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListSchedulerDefinitionsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A number representing the the total number of results available. + */ + private Integer opcTotalItems; + + /** + * A number representing the the total number of results available. + * @return the value + */ + public Integer getOpcTotalItems() { + return opcTotalItems; + } + + /** + * The returned SchedulerDefinitionCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinitionCollection + schedulerDefinitionCollection; + + /** + * The returned SchedulerDefinitionCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinitionCollection + getSchedulerDefinitionCollection() { + return schedulerDefinitionCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "opcTotalItems", + "schedulerDefinitionCollection" + }) + private ListSchedulerDefinitionsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + Integer opcTotalItems, + com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinitionCollection + schedulerDefinitionCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.opcTotalItems = opcTotalItems; + this.schedulerDefinitionCollection = schedulerDefinitionCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A number representing the the total number of results available. + */ + private Integer opcTotalItems; + + /** + * A number representing the the total number of results available. + * @param opcTotalItems the value to set + * @return this builder + */ + public Builder opcTotalItems(Integer opcTotalItems) { + this.opcTotalItems = opcTotalItems; + return this; + } + + /** + * The returned SchedulerDefinitionCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinitionCollection + schedulerDefinitionCollection; + + /** + * The returned SchedulerDefinitionCollection instance. + * @param schedulerDefinitionCollection the value to set + * @return this builder + */ + public Builder schedulerDefinitionCollection( + com.oracle.bmc.fleetappsmanagement.model.SchedulerDefinitionCollection + schedulerDefinitionCollection) { + this.schedulerDefinitionCollection = schedulerDefinitionCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSchedulerDefinitionsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + opcTotalItems(o.getOpcTotalItems()); + schedulerDefinitionCollection(o.getSchedulerDefinitionCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListSchedulerDefinitionsResponse build() { + return new ListSchedulerDefinitionsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + opcTotalItems, + schedulerDefinitionCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcTotalItems=").append(String.valueOf(opcTotalItems)); + sb.append(",schedulerDefinitionCollection=") + .append(String.valueOf(schedulerDefinitionCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSchedulerDefinitionsResponse)) { + return false; + } + + ListSchedulerDefinitionsResponse other = (ListSchedulerDefinitionsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcTotalItems, other.opcTotalItems) + && java.util.Objects.equals( + this.schedulerDefinitionCollection, other.schedulerDefinitionCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.opcTotalItems == null ? 43 : this.opcTotalItems.hashCode()); + result = + (result * PRIME) + + (this.schedulerDefinitionCollection == null + ? 43 + : this.schedulerDefinitionCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListSchedulerJobsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListSchedulerJobsResponse.java new file mode 100644 index 00000000000..12c03921f55 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListSchedulerJobsResponse.java @@ -0,0 +1,228 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListSchedulerJobsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned SchedulerJobCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.SchedulerJobCollection schedulerJobCollection; + + /** + * The returned SchedulerJobCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.SchedulerJobCollection + getSchedulerJobCollection() { + return schedulerJobCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "schedulerJobCollection" + }) + private ListSchedulerJobsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.SchedulerJobCollection + schedulerJobCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.schedulerJobCollection = schedulerJobCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned SchedulerJobCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.SchedulerJobCollection + schedulerJobCollection; + + /** + * The returned SchedulerJobCollection instance. + * @param schedulerJobCollection the value to set + * @return this builder + */ + public Builder schedulerJobCollection( + com.oracle.bmc.fleetappsmanagement.model.SchedulerJobCollection + schedulerJobCollection) { + this.schedulerJobCollection = schedulerJobCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSchedulerJobsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + schedulerJobCollection(o.getSchedulerJobCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListSchedulerJobsResponse build() { + return new ListSchedulerJobsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, schedulerJobCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",schedulerJobCollection=").append(String.valueOf(schedulerJobCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSchedulerJobsResponse)) { + return false; + } + + ListSchedulerJobsResponse other = (ListSchedulerJobsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.schedulerJobCollection, other.schedulerJobCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.schedulerJobCollection == null + ? 43 + : this.schedulerJobCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListStepsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListStepsResponse.java new file mode 100644 index 00000000000..32ca817a9a5 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListStepsResponse.java @@ -0,0 +1,221 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListStepsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned StepCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.StepCollection stepCollection; + + /** + * The returned StepCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.StepCollection getStepCollection() { + return stepCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "stepCollection" + }) + private ListStepsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.StepCollection stepCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.stepCollection = stepCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned StepCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.StepCollection stepCollection; + + /** + * The returned StepCollection instance. + * @param stepCollection the value to set + * @return this builder + */ + public Builder stepCollection( + com.oracle.bmc.fleetappsmanagement.model.StepCollection stepCollection) { + this.stepCollection = stepCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListStepsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + stepCollection(o.getStepCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListStepsResponse build() { + return new ListStepsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, stepCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",stepCollection=").append(String.valueOf(stepCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListStepsResponse)) { + return false; + } + + ListStepsResponse other = (ListStepsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.stepCollection, other.stepCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.stepCollection == null ? 43 : this.stepCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListTargetsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListTargetsResponse.java new file mode 100644 index 00000000000..3427880da87 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListTargetsResponse.java @@ -0,0 +1,227 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListTargetsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned FleetTargetCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetTargetCollection fleetTargetCollection; + + /** + * The returned FleetTargetCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.FleetTargetCollection + getFleetTargetCollection() { + return fleetTargetCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "fleetTargetCollection" + }) + private ListTargetsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.FleetTargetCollection fleetTargetCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.fleetTargetCollection = fleetTargetCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned FleetTargetCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetTargetCollection + fleetTargetCollection; + + /** + * The returned FleetTargetCollection instance. + * @param fleetTargetCollection the value to set + * @return this builder + */ + public Builder fleetTargetCollection( + com.oracle.bmc.fleetappsmanagement.model.FleetTargetCollection + fleetTargetCollection) { + this.fleetTargetCollection = fleetTargetCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListTargetsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + fleetTargetCollection(o.getFleetTargetCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListTargetsResponse build() { + return new ListTargetsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, fleetTargetCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",fleetTargetCollection=").append(String.valueOf(fleetTargetCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListTargetsResponse)) { + return false; + } + + ListTargetsResponse other = (ListTargetsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.fleetTargetCollection, other.fleetTargetCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.fleetTargetCollection == null + ? 43 + : this.fleetTargetCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListTaskRecordsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListTaskRecordsResponse.java new file mode 100644 index 00000000000..455d3566412 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListTaskRecordsResponse.java @@ -0,0 +1,224 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListTaskRecordsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned TaskRecordCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.TaskRecordCollection taskRecordCollection; + + /** + * The returned TaskRecordCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.TaskRecordCollection getTaskRecordCollection() { + return taskRecordCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "taskRecordCollection" + }) + private ListTaskRecordsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.TaskRecordCollection taskRecordCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.taskRecordCollection = taskRecordCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned TaskRecordCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.TaskRecordCollection taskRecordCollection; + + /** + * The returned TaskRecordCollection instance. + * @param taskRecordCollection the value to set + * @return this builder + */ + public Builder taskRecordCollection( + com.oracle.bmc.fleetappsmanagement.model.TaskRecordCollection + taskRecordCollection) { + this.taskRecordCollection = taskRecordCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListTaskRecordsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + taskRecordCollection(o.getTaskRecordCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListTaskRecordsResponse build() { + return new ListTaskRecordsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, taskRecordCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",taskRecordCollection=").append(String.valueOf(taskRecordCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListTaskRecordsResponse)) { + return false; + } + + ListTaskRecordsResponse other = (ListTaskRecordsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.taskRecordCollection, other.taskRecordCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.taskRecordCollection == null + ? 43 + : this.taskRecordCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListWorkRequestErrorsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListWorkRequestErrorsResponse.java new file mode 100644 index 00000000000..4b34afa81b4 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListWorkRequestErrorsResponse.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListWorkRequestErrorsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned WorkRequestErrorCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.WorkRequestErrorCollection + workRequestErrorCollection; + + /** + * The returned WorkRequestErrorCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.WorkRequestErrorCollection + getWorkRequestErrorCollection() { + return workRequestErrorCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "workRequestErrorCollection" + }) + private ListWorkRequestErrorsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.WorkRequestErrorCollection + workRequestErrorCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.workRequestErrorCollection = workRequestErrorCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned WorkRequestErrorCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.WorkRequestErrorCollection + workRequestErrorCollection; + + /** + * The returned WorkRequestErrorCollection instance. + * @param workRequestErrorCollection the value to set + * @return this builder + */ + public Builder workRequestErrorCollection( + com.oracle.bmc.fleetappsmanagement.model.WorkRequestErrorCollection + workRequestErrorCollection) { + this.workRequestErrorCollection = workRequestErrorCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestErrorsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + workRequestErrorCollection(o.getWorkRequestErrorCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListWorkRequestErrorsResponse build() { + return new ListWorkRequestErrorsResponse( + __httpStatusCode__, + headers, + opcNextPage, + opcRequestId, + workRequestErrorCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",workRequestErrorCollection=") + .append(String.valueOf(workRequestErrorCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListWorkRequestErrorsResponse)) { + return false; + } + + ListWorkRequestErrorsResponse other = (ListWorkRequestErrorsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.workRequestErrorCollection, other.workRequestErrorCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.workRequestErrorCollection == null + ? 43 + : this.workRequestErrorCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListWorkRequestLogsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListWorkRequestLogsResponse.java new file mode 100644 index 00000000000..a35c2368dfd --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListWorkRequestLogsResponse.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListWorkRequestLogsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned WorkRequestLogEntryCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection; + + /** + * The returned WorkRequestLogEntryCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.WorkRequestLogEntryCollection + getWorkRequestLogEntryCollection() { + return workRequestLogEntryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "workRequestLogEntryCollection" + }) + private ListWorkRequestLogsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.workRequestLogEntryCollection = workRequestLogEntryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned WorkRequestLogEntryCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection; + + /** + * The returned WorkRequestLogEntryCollection instance. + * @param workRequestLogEntryCollection the value to set + * @return this builder + */ + public Builder workRequestLogEntryCollection( + com.oracle.bmc.fleetappsmanagement.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection) { + this.workRequestLogEntryCollection = workRequestLogEntryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestLogsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + workRequestLogEntryCollection(o.getWorkRequestLogEntryCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListWorkRequestLogsResponse build() { + return new ListWorkRequestLogsResponse( + __httpStatusCode__, + headers, + opcNextPage, + opcRequestId, + workRequestLogEntryCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",workRequestLogEntryCollection=") + .append(String.valueOf(workRequestLogEntryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListWorkRequestLogsResponse)) { + return false; + } + + ListWorkRequestLogsResponse other = (ListWorkRequestLogsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.workRequestLogEntryCollection, other.workRequestLogEntryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.workRequestLogEntryCollection == null + ? 43 + : this.workRequestLogEntryCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListWorkRequestsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListWorkRequestsResponse.java new file mode 100644 index 00000000000..a6ae2459213 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ListWorkRequestsResponse.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ListWorkRequestsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned WorkRequestSummaryCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.WorkRequestSummaryCollection + workRequestSummaryCollection; + + /** + * The returned WorkRequestSummaryCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.WorkRequestSummaryCollection + getWorkRequestSummaryCollection() { + return workRequestSummaryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "workRequestSummaryCollection" + }) + private ListWorkRequestsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.WorkRequestSummaryCollection + workRequestSummaryCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.workRequestSummaryCollection = workRequestSummaryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned WorkRequestSummaryCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.WorkRequestSummaryCollection + workRequestSummaryCollection; + + /** + * The returned WorkRequestSummaryCollection instance. + * @param workRequestSummaryCollection the value to set + * @return this builder + */ + public Builder workRequestSummaryCollection( + com.oracle.bmc.fleetappsmanagement.model.WorkRequestSummaryCollection + workRequestSummaryCollection) { + this.workRequestSummaryCollection = workRequestSummaryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + workRequestSummaryCollection(o.getWorkRequestSummaryCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListWorkRequestsResponse build() { + return new ListWorkRequestsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + workRequestSummaryCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",workRequestSummaryCollection=") + .append(String.valueOf(workRequestSummaryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListWorkRequestsResponse)) { + return false; + } + + ListWorkRequestsResponse other = (ListWorkRequestsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.workRequestSummaryCollection, other.workRequestSummaryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.workRequestSummaryCollection == null + ? 43 + : this.workRequestSummaryCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ManageJobExecutionResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ManageJobExecutionResponse.java new file mode 100644 index 00000000000..e076189b078 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ManageJobExecutionResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ManageJobExecutionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private ManageJobExecutionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ManageJobExecutionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ManageJobExecutionResponse build() { + return new ManageJobExecutionResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ManageJobExecutionResponse)) { + return false; + } + + ManageJobExecutionResponse other = (ManageJobExecutionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ManageSettingsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ManageSettingsResponse.java new file mode 100644 index 00000000000..9e2ece43236 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/ManageSettingsResponse.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class ManageSettingsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private ManageSettingsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ManageSettingsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ManageSettingsResponse build() { + return new ManageSettingsResponse(__httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ManageSettingsResponse)) { + return false; + } + + ManageSettingsResponse other = (ManageSettingsResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/PublishRunbookResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/PublishRunbookResponse.java new file mode 100644 index 00000000000..fc5b38c1caa --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/PublishRunbookResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class PublishRunbookResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private PublishRunbookResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(PublishRunbookResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public PublishRunbookResponse build() { + return new PublishRunbookResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PublishRunbookResponse)) { + return false; + } + + PublishRunbookResponse other = (PublishRunbookResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/RequestResourceValidationResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/RequestResourceValidationResponse.java new file mode 100644 index 00000000000..4033dd554c8 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/RequestResourceValidationResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class RequestResourceValidationResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private RequestResourceValidationResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RequestResourceValidationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RequestResourceValidationResponse build() { + return new RequestResourceValidationResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RequestResourceValidationResponse)) { + return false; + } + + RequestResourceValidationResponse other = (RequestResourceValidationResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/RequestTargetDiscoveryResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/RequestTargetDiscoveryResponse.java new file mode 100644 index 00000000000..48f2f6a656e --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/RequestTargetDiscoveryResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class RequestTargetDiscoveryResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private RequestTargetDiscoveryResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RequestTargetDiscoveryResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RequestTargetDiscoveryResponse build() { + return new RequestTargetDiscoveryResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RequestTargetDiscoveryResponse)) { + return false; + } + + RequestTargetDiscoveryResponse other = (RequestTargetDiscoveryResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/SetDefaultRunbookResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/SetDefaultRunbookResponse.java new file mode 100644 index 00000000000..55e670ec9dc --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/SetDefaultRunbookResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class SetDefaultRunbookResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Runbook instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Runbook runbook; + + /** + * The returned Runbook instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.Runbook getRunbook() { + return runbook; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "runbook" + }) + private SetDefaultRunbookResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.Runbook runbook) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.runbook = runbook; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Runbook instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Runbook runbook; + + /** + * The returned Runbook instance. + * @param runbook the value to set + * @return this builder + */ + public Builder runbook(com.oracle.bmc.fleetappsmanagement.model.Runbook runbook) { + this.runbook = runbook; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SetDefaultRunbookResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + runbook(o.getRunbook()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public SetDefaultRunbookResponse build() { + return new SetDefaultRunbookResponse( + __httpStatusCode__, headers, etag, opcRequestId, runbook); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",runbook=").append(String.valueOf(runbook)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SetDefaultRunbookResponse)) { + return false; + } + + SetDefaultRunbookResponse other = (SetDefaultRunbookResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.runbook, other.runbook); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.runbook == null ? 43 : this.runbook.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/SummarizeComplianceRecordCountsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/SummarizeComplianceRecordCountsResponse.java new file mode 100644 index 00000000000..b6183db67db --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/SummarizeComplianceRecordCountsResponse.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class SummarizeComplianceRecordCountsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned ComplianceRecordAggregationCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.ComplianceRecordAggregationCollection + complianceRecordAggregationCollection; + + /** + * The returned ComplianceRecordAggregationCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.ComplianceRecordAggregationCollection + getComplianceRecordAggregationCollection() { + return complianceRecordAggregationCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "complianceRecordAggregationCollection" + }) + private SummarizeComplianceRecordCountsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.ComplianceRecordAggregationCollection + complianceRecordAggregationCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.complianceRecordAggregationCollection = complianceRecordAggregationCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned ComplianceRecordAggregationCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.ComplianceRecordAggregationCollection + complianceRecordAggregationCollection; + + /** + * The returned ComplianceRecordAggregationCollection instance. + * @param complianceRecordAggregationCollection the value to set + * @return this builder + */ + public Builder complianceRecordAggregationCollection( + com.oracle.bmc.fleetappsmanagement.model.ComplianceRecordAggregationCollection + complianceRecordAggregationCollection) { + this.complianceRecordAggregationCollection = complianceRecordAggregationCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SummarizeComplianceRecordCountsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + complianceRecordAggregationCollection(o.getComplianceRecordAggregationCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public SummarizeComplianceRecordCountsResponse build() { + return new SummarizeComplianceRecordCountsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + complianceRecordAggregationCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",complianceRecordAggregationCollection=") + .append(String.valueOf(complianceRecordAggregationCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SummarizeComplianceRecordCountsResponse)) { + return false; + } + + SummarizeComplianceRecordCountsResponse other = (SummarizeComplianceRecordCountsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.complianceRecordAggregationCollection, + other.complianceRecordAggregationCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.complianceRecordAggregationCollection == null + ? 43 + : this.complianceRecordAggregationCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/SummarizeManagedEntityCountsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/SummarizeManagedEntityCountsResponse.java new file mode 100644 index 00000000000..bb34cbf2ab9 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/SummarizeManagedEntityCountsResponse.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class SummarizeManagedEntityCountsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned ManagedEntityAggregationCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.ManagedEntityAggregationCollection + managedEntityAggregationCollection; + + /** + * The returned ManagedEntityAggregationCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.ManagedEntityAggregationCollection + getManagedEntityAggregationCollection() { + return managedEntityAggregationCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "managedEntityAggregationCollection" + }) + private SummarizeManagedEntityCountsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.ManagedEntityAggregationCollection + managedEntityAggregationCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.managedEntityAggregationCollection = managedEntityAggregationCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned ManagedEntityAggregationCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.ManagedEntityAggregationCollection + managedEntityAggregationCollection; + + /** + * The returned ManagedEntityAggregationCollection instance. + * @param managedEntityAggregationCollection the value to set + * @return this builder + */ + public Builder managedEntityAggregationCollection( + com.oracle.bmc.fleetappsmanagement.model.ManagedEntityAggregationCollection + managedEntityAggregationCollection) { + this.managedEntityAggregationCollection = managedEntityAggregationCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SummarizeManagedEntityCountsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + managedEntityAggregationCollection(o.getManagedEntityAggregationCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public SummarizeManagedEntityCountsResponse build() { + return new SummarizeManagedEntityCountsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + managedEntityAggregationCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",managedEntityAggregationCollection=") + .append(String.valueOf(managedEntityAggregationCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SummarizeManagedEntityCountsResponse)) { + return false; + } + + SummarizeManagedEntityCountsResponse other = (SummarizeManagedEntityCountsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.managedEntityAggregationCollection, + other.managedEntityAggregationCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.managedEntityAggregationCollection == null + ? 43 + : this.managedEntityAggregationCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/SummarizeSchedulerJobCountsResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/SummarizeSchedulerJobCountsResponse.java new file mode 100644 index 00000000000..efa10f77f8b --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/SummarizeSchedulerJobCountsResponse.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class SummarizeSchedulerJobCountsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned SchedulerJobAggregationCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.SchedulerJobAggregationCollection + schedulerJobAggregationCollection; + + /** + * The returned SchedulerJobAggregationCollection instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.SchedulerJobAggregationCollection + getSchedulerJobAggregationCollection() { + return schedulerJobAggregationCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "schedulerJobAggregationCollection" + }) + private SummarizeSchedulerJobCountsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.fleetappsmanagement.model.SchedulerJobAggregationCollection + schedulerJobAggregationCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.schedulerJobAggregationCollection = schedulerJobAggregationCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned SchedulerJobAggregationCollection instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.SchedulerJobAggregationCollection + schedulerJobAggregationCollection; + + /** + * The returned SchedulerJobAggregationCollection instance. + * @param schedulerJobAggregationCollection the value to set + * @return this builder + */ + public Builder schedulerJobAggregationCollection( + com.oracle.bmc.fleetappsmanagement.model.SchedulerJobAggregationCollection + schedulerJobAggregationCollection) { + this.schedulerJobAggregationCollection = schedulerJobAggregationCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SummarizeSchedulerJobCountsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + schedulerJobAggregationCollection(o.getSchedulerJobAggregationCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public SummarizeSchedulerJobCountsResponse build() { + return new SummarizeSchedulerJobCountsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + schedulerJobAggregationCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",schedulerJobAggregationCollection=") + .append(String.valueOf(schedulerJobAggregationCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SummarizeSchedulerJobCountsResponse)) { + return false; + } + + SummarizeSchedulerJobCountsResponse other = (SummarizeSchedulerJobCountsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.schedulerJobAggregationCollection, + other.schedulerJobAggregationCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.schedulerJobAggregationCollection == null + ? 43 + : this.schedulerJobAggregationCollection.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateCompliancePolicyRuleResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateCompliancePolicyRuleResponse.java new file mode 100644 index 00000000000..246a840ada3 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateCompliancePolicyRuleResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateCompliancePolicyRuleResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private UpdateCompliancePolicyRuleResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateCompliancePolicyRuleResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateCompliancePolicyRuleResponse build() { + return new UpdateCompliancePolicyRuleResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateCompliancePolicyRuleResponse)) { + return false; + } + + UpdateCompliancePolicyRuleResponse other = (UpdateCompliancePolicyRuleResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateFleetCredentialResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateFleetCredentialResponse.java new file mode 100644 index 00000000000..333b1c70cd9 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateFleetCredentialResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateFleetCredentialResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private UpdateFleetCredentialResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateFleetCredentialResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateFleetCredentialResponse build() { + return new UpdateFleetCredentialResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateFleetCredentialResponse)) { + return false; + } + + UpdateFleetCredentialResponse other = (UpdateFleetCredentialResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateFleetPropertyResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateFleetPropertyResponse.java new file mode 100644 index 00000000000..a1ca6e422a2 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateFleetPropertyResponse.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateFleetPropertyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned FleetProperty instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetProperty fleetProperty; + + /** + * The returned FleetProperty instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.FleetProperty getFleetProperty() { + return fleetProperty; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "fleetProperty" + }) + private UpdateFleetPropertyResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.FleetProperty fleetProperty) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.fleetProperty = fleetProperty; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned FleetProperty instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.FleetProperty fleetProperty; + + /** + * The returned FleetProperty instance. + * @param fleetProperty the value to set + * @return this builder + */ + public Builder fleetProperty( + com.oracle.bmc.fleetappsmanagement.model.FleetProperty fleetProperty) { + this.fleetProperty = fleetProperty; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateFleetPropertyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + fleetProperty(o.getFleetProperty()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateFleetPropertyResponse build() { + return new UpdateFleetPropertyResponse( + __httpStatusCode__, headers, etag, opcRequestId, fleetProperty); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",fleetProperty=").append(String.valueOf(fleetProperty)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateFleetPropertyResponse)) { + return false; + } + + UpdateFleetPropertyResponse other = (UpdateFleetPropertyResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.fleetProperty, other.fleetProperty); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.fleetProperty == null ? 43 : this.fleetProperty.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateFleetResourceResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateFleetResourceResponse.java new file mode 100644 index 00000000000..c0390231f94 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateFleetResourceResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateFleetResourceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private UpdateFleetResourceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateFleetResourceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateFleetResourceResponse build() { + return new UpdateFleetResourceResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateFleetResourceResponse)) { + return false; + } + + UpdateFleetResourceResponse other = (UpdateFleetResourceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateFleetResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateFleetResponse.java new file mode 100644 index 00000000000..d82b66ab428 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateFleetResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateFleetResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Fleet instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Fleet fleet; + + /** + * The returned Fleet instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.Fleet getFleet() { + return fleet; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "fleet" + }) + private UpdateFleetResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.Fleet fleet) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.fleet = fleet; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Fleet instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Fleet fleet; + + /** + * The returned Fleet instance. + * @param fleet the value to set + * @return this builder + */ + public Builder fleet(com.oracle.bmc.fleetappsmanagement.model.Fleet fleet) { + this.fleet = fleet; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateFleetResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + fleet(o.getFleet()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateFleetResponse build() { + return new UpdateFleetResponse(__httpStatusCode__, headers, etag, opcRequestId, fleet); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",fleet=").append(String.valueOf(fleet)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateFleetResponse)) { + return false; + } + + UpdateFleetResponse other = (UpdateFleetResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.fleet, other.fleet); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.fleet == null ? 43 : this.fleet.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateMaintenanceWindowResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateMaintenanceWindowResponse.java new file mode 100644 index 00000000000..9c115aebaa0 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateMaintenanceWindowResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateMaintenanceWindowResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private UpdateMaintenanceWindowResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateMaintenanceWindowResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateMaintenanceWindowResponse build() { + return new UpdateMaintenanceWindowResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateMaintenanceWindowResponse)) { + return false; + } + + UpdateMaintenanceWindowResponse other = (UpdateMaintenanceWindowResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateOnboardingResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateOnboardingResponse.java new file mode 100644 index 00000000000..cf7c4a6f7f6 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateOnboardingResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateOnboardingResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private UpdateOnboardingResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateOnboardingResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateOnboardingResponse build() { + return new UpdateOnboardingResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateOnboardingResponse)) { + return false; + } + + UpdateOnboardingResponse other = (UpdateOnboardingResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdatePatchResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdatePatchResponse.java new file mode 100644 index 00000000000..dc720c0c8cb --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdatePatchResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdatePatchResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private UpdatePatchResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdatePatchResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdatePatchResponse build() { + return new UpdatePatchResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePatchResponse)) { + return false; + } + + UpdatePatchResponse other = (UpdatePatchResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdatePlatformConfigurationResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdatePlatformConfigurationResponse.java new file mode 100644 index 00000000000..b5e33d94d58 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdatePlatformConfigurationResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdatePlatformConfigurationResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private UpdatePlatformConfigurationResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdatePlatformConfigurationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdatePlatformConfigurationResponse build() { + return new UpdatePlatformConfigurationResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePlatformConfigurationResponse)) { + return false; + } + + UpdatePlatformConfigurationResponse other = (UpdatePlatformConfigurationResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdatePropertyResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdatePropertyResponse.java new file mode 100644 index 00000000000..34f72d349b5 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdatePropertyResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdatePropertyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Property instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Property property; + + /** + * The returned Property instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.Property getProperty() { + return property; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "property" + }) + private UpdatePropertyResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.Property property) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.property = property; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Property instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.Property property; + + /** + * The returned Property instance. + * @param property the value to set + * @return this builder + */ + public Builder property(com.oracle.bmc.fleetappsmanagement.model.Property property) { + this.property = property; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdatePropertyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + property(o.getProperty()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdatePropertyResponse build() { + return new UpdatePropertyResponse( + __httpStatusCode__, headers, etag, opcRequestId, property); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",property=").append(String.valueOf(property)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePropertyResponse)) { + return false; + } + + UpdatePropertyResponse other = (UpdatePropertyResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.property, other.property); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.property == null ? 43 : this.property.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateRunbookResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateRunbookResponse.java new file mode 100644 index 00000000000..2a4586c5d7d --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateRunbookResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateRunbookResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private UpdateRunbookResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateRunbookResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateRunbookResponse build() { + return new UpdateRunbookResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateRunbookResponse)) { + return false; + } + + UpdateRunbookResponse other = (UpdateRunbookResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateSchedulerDefinitionResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateSchedulerDefinitionResponse.java new file mode 100644 index 00000000000..33ddc76c381 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateSchedulerDefinitionResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateSchedulerDefinitionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private UpdateSchedulerDefinitionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateSchedulerDefinitionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateSchedulerDefinitionResponse build() { + return new UpdateSchedulerDefinitionResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSchedulerDefinitionResponse)) { + return false; + } + + UpdateSchedulerDefinitionResponse other = (UpdateSchedulerDefinitionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateSchedulerJobResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateSchedulerJobResponse.java new file mode 100644 index 00000000000..3f4788499d0 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateSchedulerJobResponse.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateSchedulerJobResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned SchedulerJob instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.SchedulerJob schedulerJob; + + /** + * The returned SchedulerJob instance. + * @return the value + */ + public com.oracle.bmc.fleetappsmanagement.model.SchedulerJob getSchedulerJob() { + return schedulerJob; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "schedulerJob" + }) + private UpdateSchedulerJobResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetappsmanagement.model.SchedulerJob schedulerJob) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.schedulerJob = schedulerJob; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned SchedulerJob instance. + */ + private com.oracle.bmc.fleetappsmanagement.model.SchedulerJob schedulerJob; + + /** + * The returned SchedulerJob instance. + * @param schedulerJob the value to set + * @return this builder + */ + public Builder schedulerJob( + com.oracle.bmc.fleetappsmanagement.model.SchedulerJob schedulerJob) { + this.schedulerJob = schedulerJob; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateSchedulerJobResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + schedulerJob(o.getSchedulerJob()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateSchedulerJobResponse build() { + return new UpdateSchedulerJobResponse( + __httpStatusCode__, headers, etag, opcRequestId, schedulerJob); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",schedulerJob=").append(String.valueOf(schedulerJob)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSchedulerJobResponse)) { + return false; + } + + UpdateSchedulerJobResponse other = (UpdateSchedulerJobResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.schedulerJob, other.schedulerJob); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.schedulerJob == null ? 43 : this.schedulerJob.hashCode()); + return result; + } +} diff --git a/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateTaskRecordResponse.java b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateTaskRecordResponse.java new file mode 100644 index 00000000000..9860162aa64 --- /dev/null +++ b/bmc-fleetappsmanagement/src/main/java/com/oracle/bmc/fleetappsmanagement/responses/UpdateTaskRecordResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetappsmanagement.responses; + +import com.oracle.bmc.fleetappsmanagement.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230831") +public class UpdateTaskRecordResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private UpdateTaskRecordResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateTaskRecordResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateTaskRecordResponse build() { + return new UpdateTaskRecordResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateTaskRecordResponse)) { + return false; + } + + UpdateTaskRecordResponse other = (UpdateTaskRecordResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetsoftwareupdate/pom.xml b/bmc-fleetsoftwareupdate/pom.xml index e46ed8b5e89..f4faa48a8ad 100644 --- a/bmc-fleetsoftwareupdate/pom.xml +++ b/bmc-fleetsoftwareupdate/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-fleetsoftwareupdate @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/FleetSoftwareUpdate.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/FleetSoftwareUpdate.java index 31d8bc66a4c..5ce3a1a2e90 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/FleetSoftwareUpdate.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/FleetSoftwareUpdate.java @@ -254,6 +254,22 @@ ChangeFsuDiscoveryCompartmentResponse changeFsuDiscoveryCompartment( */ DeleteFsuCollectionResponse deleteFsuCollection(DeleteFsuCollectionRequest request); + /** + * Removes a target from an existing Exadata Fleet Update Collection. + * This operation can only be performed on Collections that do not have an Action executing under an active Fleet Software Update Cycle. + * Additionally, during an active Fleet Software Update Cycle, a target can be removed only prior to executing an Apply Action. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteFsuCollectionTarget API. + */ + DeleteFsuCollectionTargetResponse deleteFsuCollectionTarget( + DeleteFsuCollectionTargetRequest request); + /** * Deletes a Exadata Fleet Update Cycle resource by identifier. * @@ -334,6 +350,19 @@ GetFsuActionOutputContentResponse getFsuActionOutputContent( */ GetFsuCollectionResponse getFsuCollection(GetFsuCollectionRequest request); + /** + * Gets a Exadata Fleet Update Collection Target by identifier. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetFsuCollectionTarget API. + */ + GetFsuCollectionTargetResponse getFsuCollectionTarget(GetFsuCollectionTargetRequest request); + /** * Gets a Exadata Fleet Update Cycle by identifier. * diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/FleetSoftwareUpdateAsync.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/FleetSoftwareUpdateAsync.java index 62565a24d4f..083183759a1 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/FleetSoftwareUpdateAsync.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/FleetSoftwareUpdateAsync.java @@ -304,6 +304,25 @@ java.util.concurrent.Future deleteFsuCollection( DeleteFsuCollectionRequest, DeleteFsuCollectionResponse> handler); + /** + * Removes a target from an existing Exadata Fleet Update Collection. + * This operation can only be performed on Collections that do not have an Action executing under an active Fleet Software Update Cycle. + * Additionally, during an active Fleet Software Update Cycle, a target can be removed only prior to executing an Apply Action. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteFsuCollectionTarget( + DeleteFsuCollectionTargetRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteFsuCollectionTargetRequest, DeleteFsuCollectionTargetResponse> + handler); + /** * Deletes a Exadata Fleet Update Cycle resource by identifier. * @@ -403,6 +422,23 @@ java.util.concurrent.Future getFsuCollection( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets a Exadata Fleet Update Collection Target by identifier. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getFsuCollectionTarget( + GetFsuCollectionTargetRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetFsuCollectionTargetRequest, GetFsuCollectionTargetResponse> + handler); + /** * Gets a Exadata Fleet Update Cycle by identifier. * diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/FleetSoftwareUpdateAsyncClient.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/FleetSoftwareUpdateAsyncClient.java index feffa3a97e4..7e5a85eb860 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/FleetSoftwareUpdateAsyncClient.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/FleetSoftwareUpdateAsyncClient.java @@ -1188,6 +1188,55 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future deleteFsuCollectionTarget( + DeleteFsuCollectionTargetRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteFsuCollectionTargetRequest, DeleteFsuCollectionTargetResponse> + handler) { + LOG.trace("Called async deleteFsuCollectionTarget"); + final DeleteFsuCollectionTargetRequest interceptedRequest = + DeleteFsuCollectionTargetConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteFsuCollectionTargetConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetSoftwareUpdate", + "DeleteFsuCollectionTarget", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/edsfu/20220528/FsuCollection/DeleteFsuCollectionTarget"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteFsuCollectionTargetResponse> + transformer = + DeleteFsuCollectionTargetConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteFsuCollectionTargetRequest, DeleteFsuCollectionTargetResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteFsuCollectionTargetRequest, + DeleteFsuCollectionTargetResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteFsuCollectionTargetRequest, DeleteFsuCollectionTargetResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteFsuCycle( DeleteFsuCycleRequest request, @@ -1462,6 +1511,53 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future getFsuCollectionTarget( + GetFsuCollectionTargetRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetFsuCollectionTargetRequest, GetFsuCollectionTargetResponse> + handler) { + LOG.trace("Called async getFsuCollectionTarget"); + final GetFsuCollectionTargetRequest interceptedRequest = + GetFsuCollectionTargetConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetFsuCollectionTargetConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetSoftwareUpdate", + "GetFsuCollectionTarget", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/edsfu/20220528/FsuCollectionTarget/GetFsuCollectionTarget"); + final java.util.function.Function + transformer = + GetFsuCollectionTargetConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetFsuCollectionTargetRequest, GetFsuCollectionTargetResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetFsuCollectionTargetRequest, GetFsuCollectionTargetResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetFsuCollectionTargetRequest, GetFsuCollectionTargetResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getFsuCycle( GetFsuCycleRequest request, diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/FleetSoftwareUpdateClient.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/FleetSoftwareUpdateClient.java index 3552dbcacb8..8a4bb9ba6c9 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/FleetSoftwareUpdateClient.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/FleetSoftwareUpdateClient.java @@ -1133,6 +1133,45 @@ public DeleteFsuCollectionResponse deleteFsuCollection(DeleteFsuCollectionReques }); } + @Override + public DeleteFsuCollectionTargetResponse deleteFsuCollectionTarget( + DeleteFsuCollectionTargetRequest request) { + LOG.trace("Called deleteFsuCollectionTarget"); + final DeleteFsuCollectionTargetRequest interceptedRequest = + DeleteFsuCollectionTargetConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteFsuCollectionTargetConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetSoftwareUpdate", + "DeleteFsuCollectionTarget", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/edsfu/20220528/FsuCollection/DeleteFsuCollectionTarget"); + java.util.function.Function + transformer = + DeleteFsuCollectionTargetConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DeleteFsuCycleResponse deleteFsuCycle(DeleteFsuCycleRequest request) { LOG.trace("Called deleteFsuCycle"); @@ -1353,6 +1392,44 @@ public GetFsuCollectionResponse getFsuCollection(GetFsuCollectionRequest request }); } + @Override + public GetFsuCollectionTargetResponse getFsuCollectionTarget( + GetFsuCollectionTargetRequest request) { + LOG.trace("Called getFsuCollectionTarget"); + final GetFsuCollectionTargetRequest interceptedRequest = + GetFsuCollectionTargetConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetFsuCollectionTargetConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "FleetSoftwareUpdate", + "GetFsuCollectionTarget", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/edsfu/20220528/FsuCollectionTarget/GetFsuCollectionTarget"); + java.util.function.Function + transformer = + GetFsuCollectionTargetConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetFsuCycleResponse getFsuCycle(GetFsuCycleRequest request) { LOG.trace("Called getFsuCycle"); diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/internal/http/DeleteFsuCollectionTargetConverter.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/internal/http/DeleteFsuCollectionTargetConverter.java new file mode 100644 index 00000000000..a0c96ad4253 --- /dev/null +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/internal/http/DeleteFsuCollectionTargetConverter.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetsoftwareupdate.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetsoftwareupdate.model.*; +import com.oracle.bmc.fleetsoftwareupdate.requests.*; +import com.oracle.bmc.fleetsoftwareupdate.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220528") +public class DeleteFsuCollectionTargetConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteFsuCollectionTargetConverter.class); + + public static com.oracle.bmc.fleetsoftwareupdate.requests.DeleteFsuCollectionTargetRequest + interceptRequest( + com.oracle.bmc.fleetsoftwareupdate.requests.DeleteFsuCollectionTargetRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetsoftwareupdate.requests.DeleteFsuCollectionTargetRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFsuCollectionId(), "fsuCollectionId must not be blank"); + Validate.notBlank(request.getTargetId(), "targetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220528") + .path("fsuCollections") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFsuCollectionId())) + .path("targets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getTargetId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetsoftwareupdate.responses.DeleteFsuCollectionTargetResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetsoftwareupdate.responses.DeleteFsuCollectionTargetResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetsoftwareupdate.responses + .DeleteFsuCollectionTargetResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetsoftwareupdate.responses + .DeleteFsuCollectionTargetResponse>() { + @Override + public com.oracle.bmc.fleetsoftwareupdate.responses + .DeleteFsuCollectionTargetResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetsoftwareupdate.responses.DeleteFsuCollectionTargetResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetsoftwareupdate.responses + .DeleteFsuCollectionTargetResponse.Builder + builder = + com.oracle.bmc.fleetsoftwareupdate.responses + .DeleteFsuCollectionTargetResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetsoftwareupdate.responses + .DeleteFsuCollectionTargetResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/internal/http/GetFsuCollectionTargetConverter.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/internal/http/GetFsuCollectionTargetConverter.java new file mode 100644 index 00000000000..9f30291f3d0 --- /dev/null +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/internal/http/GetFsuCollectionTargetConverter.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetsoftwareupdate.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.fleetsoftwareupdate.model.*; +import com.oracle.bmc.fleetsoftwareupdate.requests.*; +import com.oracle.bmc.fleetsoftwareupdate.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220528") +public class GetFsuCollectionTargetConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetFsuCollectionTargetConverter.class); + + public static com.oracle.bmc.fleetsoftwareupdate.requests.GetFsuCollectionTargetRequest + interceptRequest( + com.oracle.bmc.fleetsoftwareupdate.requests.GetFsuCollectionTargetRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.fleetsoftwareupdate.requests.GetFsuCollectionTargetRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFsuCollectionId(), "fsuCollectionId must not be blank"); + Validate.notBlank(request.getTargetId(), "targetId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220528") + .path("fsuCollections") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFsuCollectionId())) + .path("targets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getTargetId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetsoftwareupdate.responses.GetFsuCollectionTargetResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetsoftwareupdate.responses.GetFsuCollectionTargetResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetsoftwareupdate.responses.GetFsuCollectionTargetResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.fleetsoftwareupdate.responses + .GetFsuCollectionTargetResponse>() { + @Override + public com.oracle.bmc.fleetsoftwareupdate.responses + .GetFsuCollectionTargetResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.fleetsoftwareupdate.responses.GetFsuCollectionTargetResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetsoftwareupdate.model + .FsuCollectionTarget>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetsoftwareupdate.model + .FsuCollectionTarget + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.fleetsoftwareupdate.model + .FsuCollectionTarget + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.fleetsoftwareupdate.model + .FsuCollectionTarget> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.fleetsoftwareupdate.responses + .GetFsuCollectionTargetResponse.Builder + builder = + com.oracle.bmc.fleetsoftwareupdate.responses + .GetFsuCollectionTargetResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.fsuCollectionTarget(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.fleetsoftwareupdate.responses + .GetFsuCollectionTargetResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/ActionTypes.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/ActionTypes.java index 26fa5ee70c1..9359b9bf34b 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/ActionTypes.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/ActionTypes.java @@ -15,6 +15,7 @@ public enum ActionTypes { Apply("APPLY"), RollbackAndRemoveTarget("ROLLBACK_AND_REMOVE_TARGET"), Cleanup("CLEANUP"), + RollbackMaintenanceCycle("ROLLBACK_MAINTENANCE_CYCLE"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/CloudVmClusterTargetSummary.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/CloudVmClusterTargetSummary.java index df0fd2b83f0..154040f8878 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/CloudVmClusterTargetSummary.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/CloudVmClusterTargetSummary.java @@ -65,6 +65,24 @@ public Builder infrastructureId(String infrastructureId) { this.__explicitlySet__.add("infrastructureId"); return this; } + /** + * OCID of the Grid Infrastructure software image. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("softwareImageId") + private String softwareImageId; + + /** + * OCID of the Grid Infrastructure software image. + * + * @param softwareImageId the value to set + * @return this builder + **/ + public Builder softwareImageId(String softwareImageId) { + this.softwareImageId = softwareImageId; + this.__explicitlySet__.add("softwareImageId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -72,7 +90,10 @@ public Builder infrastructureId(String infrastructureId) { public CloudVmClusterTargetSummary build() { CloudVmClusterTargetSummary model = new CloudVmClusterTargetSummary( - this.id, this.compartmentId, this.infrastructureId); + this.id, + this.compartmentId, + this.infrastructureId, + this.softwareImageId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -90,6 +111,9 @@ public Builder copy(CloudVmClusterTargetSummary model) { if (model.wasPropertyExplicitlySet("infrastructureId")) { this.infrastructureId(model.getInfrastructureId()); } + if (model.wasPropertyExplicitlySet("softwareImageId")) { + this.softwareImageId(model.getSoftwareImageId()); + } return this; } } @@ -106,9 +130,11 @@ public Builder toBuilder() { } @Deprecated - public CloudVmClusterTargetSummary(String id, String compartmentId, String infrastructureId) { + public CloudVmClusterTargetSummary( + String id, String compartmentId, String infrastructureId, String softwareImageId) { super(id, compartmentId); this.infrastructureId = infrastructureId; + this.softwareImageId = softwareImageId; } /** @@ -127,6 +153,22 @@ public String getInfrastructureId() { return infrastructureId; } + /** + * OCID of the Grid Infrastructure software image. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("softwareImageId") + private final String softwareImageId; + + /** + * OCID of the Grid Infrastructure software image. + * + * @return the value + **/ + public String getSoftwareImageId() { + return softwareImageId; + } + @Override public String toString() { return this.toString(true); @@ -142,6 +184,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("CloudVmClusterTargetSummary("); sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", infrastructureId=").append(String.valueOf(this.infrastructureId)); + sb.append(", softwareImageId=").append(String.valueOf(this.softwareImageId)); sb.append(")"); return sb.toString(); } @@ -157,6 +200,7 @@ public boolean equals(Object o) { CloudVmClusterTargetSummary other = (CloudVmClusterTargetSummary) o; return java.util.Objects.equals(this.infrastructureId, other.infrastructureId) + && java.util.Objects.equals(this.softwareImageId, other.softwareImageId) && super.equals(other); } @@ -167,6 +211,9 @@ public int hashCode() { result = (result * PRIME) + (this.infrastructureId == null ? 43 : this.infrastructureId.hashCode()); + result = + (result * PRIME) + + (this.softwareImageId == null ? 43 : this.softwareImageId.hashCode()); return result; } } diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/CreateFsuActionDetails.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/CreateFsuActionDetails.java index b816df0d65b..e96eb431e82 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/CreateFsuActionDetails.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/CreateFsuActionDetails.java @@ -23,6 +23,10 @@ defaultImpl = CreateFsuActionDetails.class ) @com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateRollbackCycleApplyActionDetails.class, + name = "ROLLBACK_MAINTENANCE_CYCLE" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = CreateApplyActionDetails.class, name = "APPLY" diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/CreateFsuCycleDetails.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/CreateFsuCycleDetails.java index 89d0793fe6c..a81fa5c4f4b 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/CreateFsuCycleDetails.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/CreateFsuCycleDetails.java @@ -39,6 +39,7 @@ public class CreateFsuCycleDetails extends com.oracle.bmc.http.internal.Explicit "batchingStrategy", "stageActionSchedule", "applyActionSchedule", + "diagnosticsCollection", "freeformTags", "definedTags" }) @@ -50,6 +51,7 @@ protected CreateFsuCycleDetails( CreateBatchingStrategyDetails batchingStrategy, CreateScheduleDetails stageActionSchedule, CreateScheduleDetails applyActionSchedule, + DiagnosticsCollectionDetails diagnosticsCollection, java.util.Map freeformTags, java.util.Map> definedTags) { super(); @@ -60,6 +62,7 @@ protected CreateFsuCycleDetails( this.batchingStrategy = batchingStrategy; this.stageActionSchedule = stageActionSchedule; this.applyActionSchedule = applyActionSchedule; + this.diagnosticsCollection = diagnosticsCollection; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -140,6 +143,13 @@ public CreateScheduleDetails getApplyActionSchedule() { return applyActionSchedule; } + @com.fasterxml.jackson.annotation.JsonProperty("diagnosticsCollection") + private final DiagnosticsCollectionDetails diagnosticsCollection; + + public DiagnosticsCollectionDetails getDiagnosticsCollection() { + return diagnosticsCollection; + } + /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -197,6 +207,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", batchingStrategy=").append(String.valueOf(this.batchingStrategy)); sb.append(", stageActionSchedule=").append(String.valueOf(this.stageActionSchedule)); sb.append(", applyActionSchedule=").append(String.valueOf(this.applyActionSchedule)); + sb.append(", diagnosticsCollection=").append(String.valueOf(this.diagnosticsCollection)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -220,6 +231,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.batchingStrategy, other.batchingStrategy) && java.util.Objects.equals(this.stageActionSchedule, other.stageActionSchedule) && java.util.Objects.equals(this.applyActionSchedule, other.applyActionSchedule) + && java.util.Objects.equals(this.diagnosticsCollection, other.diagnosticsCollection) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -254,6 +266,11 @@ public int hashCode() { + (this.applyActionSchedule == null ? 43 : this.applyActionSchedule.hashCode()); + result = + (result * PRIME) + + (this.diagnosticsCollection == null + ? 43 + : this.diagnosticsCollection.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/CreatePatchFsuCycle.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/CreatePatchFsuCycle.java index 8e4a5395f77..b0fbdbaa969 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/CreatePatchFsuCycle.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/CreatePatchFsuCycle.java @@ -91,6 +91,15 @@ public Builder applyActionSchedule(CreateScheduleDetails applyActionSchedule) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("diagnosticsCollection") + private DiagnosticsCollectionDetails diagnosticsCollection; + + public Builder diagnosticsCollection(DiagnosticsCollectionDetails diagnosticsCollection) { + this.diagnosticsCollection = diagnosticsCollection; + this.__explicitlySet__.add("diagnosticsCollection"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") private java.util.Map freeformTags; @@ -197,6 +206,7 @@ public CreatePatchFsuCycle build() { this.batchingStrategy, this.stageActionSchedule, this.applyActionSchedule, + this.diagnosticsCollection, this.freeformTags, this.definedTags, this.isIgnorePatches, @@ -232,6 +242,9 @@ public Builder copy(CreatePatchFsuCycle model) { if (model.wasPropertyExplicitlySet("applyActionSchedule")) { this.applyActionSchedule(model.getApplyActionSchedule()); } + if (model.wasPropertyExplicitlySet("diagnosticsCollection")) { + this.diagnosticsCollection(model.getDiagnosticsCollection()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -274,6 +287,7 @@ public CreatePatchFsuCycle( CreateBatchingStrategyDetails batchingStrategy, CreateScheduleDetails stageActionSchedule, CreateScheduleDetails applyActionSchedule, + DiagnosticsCollectionDetails diagnosticsCollection, java.util.Map freeformTags, java.util.Map> definedTags, Boolean isIgnorePatches, @@ -288,6 +302,7 @@ public CreatePatchFsuCycle( batchingStrategy, stageActionSchedule, applyActionSchedule, + diagnosticsCollection, freeformTags, definedTags); this.isIgnorePatches = isIgnorePatches; diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/CreateRollbackCycleApplyActionDetails.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/CreateRollbackCycleApplyActionDetails.java new file mode 100644 index 00000000000..21d616ede80 --- /dev/null +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/CreateRollbackCycleApplyActionDetails.java @@ -0,0 +1,202 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetsoftwareupdate.model; + +/** + * Exadata Fleet Update Rollback Action creation details. This action will rollback + * the maintenance cycle to the source home after a successful apply FSUAction. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220528") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateRollbackCycleApplyActionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateRollbackCycleApplyActionDetails extends CreateFsuActionDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * OCID identifier for the Exadata Fleet Update Cycle the Action will be part of. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fsuCycleId") + private String fsuCycleId; + + /** + * OCID identifier for the Exadata Fleet Update Cycle the Action will be part of. + * + * @param fsuCycleId the value to set + * @return this builder + **/ + public Builder fsuCycleId(String fsuCycleId) { + this.fsuCycleId = fsuCycleId; + this.__explicitlySet__.add("fsuCycleId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateRollbackCycleApplyActionDetails build() { + CreateRollbackCycleApplyActionDetails model = + new CreateRollbackCycleApplyActionDetails( + this.displayName, + this.compartmentId, + this.freeformTags, + this.definedTags, + this.fsuCycleId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateRollbackCycleApplyActionDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("fsuCycleId")) { + this.fsuCycleId(model.getFsuCycleId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateRollbackCycleApplyActionDetails( + String displayName, + String compartmentId, + java.util.Map freeformTags, + java.util.Map> definedTags, + String fsuCycleId) { + super(displayName, compartmentId, freeformTags, definedTags); + this.fsuCycleId = fsuCycleId; + } + + /** + * OCID identifier for the Exadata Fleet Update Cycle the Action will be part of. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fsuCycleId") + private final String fsuCycleId; + + /** + * OCID identifier for the Exadata Fleet Update Cycle the Action will be part of. + * + * @return the value + **/ + public String getFsuCycleId() { + return fsuCycleId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateRollbackCycleApplyActionDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", fsuCycleId=").append(String.valueOf(this.fsuCycleId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateRollbackCycleApplyActionDetails)) { + return false; + } + + CreateRollbackCycleApplyActionDetails other = (CreateRollbackCycleApplyActionDetails) o; + return java.util.Objects.equals(this.fsuCycleId, other.fsuCycleId) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.fsuCycleId == null ? 43 : this.fsuCycleId.hashCode()); + return result; + } +} diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DataCollectionModes.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DataCollectionModes.java new file mode 100644 index 00000000000..b0f10e0bc2a --- /dev/null +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DataCollectionModes.java @@ -0,0 +1,63 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetsoftwareupdate.model; + +/** + * Exadata Fleet Update Maintenance Cycle incident logs and trace collection operation modes. + * ENABLE: Enable diagnostics log collection for all targets for easy troubleshooting and Oracle support for + * this Exadata Fleet Update Maintenance Cycle and future Exadata Fleet Update Actions. + * ENABLE_AND_RESTORE: Enable diagnostic log collection for all targets only for the current Exadata Fleet Update Maintenance Cycle. + * After cycle finishes, log collection settings will go back to the settings prior to the start of the Exadata Fleet Update Maintenance Cycle. + * NO_CHANGE: Use existing diagnostic log collection settings on each VM Cluster. + * Collect logs for targets with diagnostic log collection for targets with log collection already enabled. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220528") +public enum DataCollectionModes { + Enable("ENABLE"), + EnableAndRestore("ENABLE_AND_RESTORE"), + NoChange("NO_CHANGE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DataCollectionModes.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DataCollectionModes v : DataCollectionModes.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DataCollectionModes(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DataCollectionModes create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DataCollectionModes', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DbCollection.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DbCollection.java index dfa381006b8..a74dbe9bffd 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DbCollection.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DbCollection.java @@ -116,6 +116,15 @@ public Builder lifecycleDetails(String lifecycleDetails) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("lastCompletedFsuCycleId") + private String lastCompletedFsuCycleId; + + public Builder lastCompletedFsuCycleId(String lastCompletedFsuCycleId) { + this.lastCompletedFsuCycleId = lastCompletedFsuCycleId; + this.__explicitlySet__.add("lastCompletedFsuCycleId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") private java.util.Map freeformTags; @@ -191,6 +200,7 @@ public DbCollection build() { this.timeUpdated, this.lifecycleState, this.lifecycleDetails, + this.lastCompletedFsuCycleId, this.freeformTags, this.definedTags, this.systemTags, @@ -234,6 +244,9 @@ public Builder copy(DbCollection model) { if (model.wasPropertyExplicitlySet("lifecycleDetails")) { this.lifecycleDetails(model.getLifecycleDetails()); } + if (model.wasPropertyExplicitlySet("lastCompletedFsuCycleId")) { + this.lastCompletedFsuCycleId(model.getLastCompletedFsuCycleId()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -276,6 +289,7 @@ public DbCollection( java.util.Date timeUpdated, CollectionLifecycleStates lifecycleState, String lifecycleDetails, + String lastCompletedFsuCycleId, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags, @@ -292,6 +306,7 @@ public DbCollection( timeUpdated, lifecycleState, lifecycleDetails, + lastCompletedFsuCycleId, freeformTags, definedTags, systemTags); diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DbFsuCollectionSummary.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DbFsuCollectionSummary.java index bee03944200..d6e8612031d 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DbFsuCollectionSummary.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DbFsuCollectionSummary.java @@ -118,6 +118,15 @@ public Builder lifecycleDetails(String lifecycleDetails) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("lastCompletedFsuCycleId") + private String lastCompletedFsuCycleId; + + public Builder lastCompletedFsuCycleId(String lastCompletedFsuCycleId) { + this.lastCompletedFsuCycleId = lastCompletedFsuCycleId; + this.__explicitlySet__.add("lastCompletedFsuCycleId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") private java.util.Map freeformTags; @@ -184,6 +193,7 @@ public DbFsuCollectionSummary build() { this.timeUpdated, this.lifecycleState, this.lifecycleDetails, + this.lastCompletedFsuCycleId, this.freeformTags, this.definedTags, this.systemTags, @@ -226,6 +236,9 @@ public Builder copy(DbFsuCollectionSummary model) { if (model.wasPropertyExplicitlySet("lifecycleDetails")) { this.lifecycleDetails(model.getLifecycleDetails()); } + if (model.wasPropertyExplicitlySet("lastCompletedFsuCycleId")) { + this.lastCompletedFsuCycleId(model.getLastCompletedFsuCycleId()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -265,6 +278,7 @@ public DbFsuCollectionSummary( java.util.Date timeUpdated, CollectionLifecycleStates lifecycleState, String lifecycleDetails, + String lastCompletedFsuCycleId, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags, @@ -280,6 +294,7 @@ public DbFsuCollectionSummary( timeUpdated, lifecycleState, lifecycleDetails, + lastCompletedFsuCycleId, freeformTags, definedTags, systemTags); diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DbSourceMajorVersions.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DbSourceMajorVersions.java index 8dd861ac8df..d83e456b023 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DbSourceMajorVersions.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DbSourceMajorVersions.java @@ -15,6 +15,7 @@ public enum DbSourceMajorVersions { Db122("DB_122"), Db18("DB_18"), Db19("DB_19"), + Db23("DB_23"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DetailedActionTypes.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DetailedActionTypes.java index d623cd8bc78..594d4553254 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DetailedActionTypes.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DetailedActionTypes.java @@ -16,6 +16,7 @@ public enum DetailedActionTypes { Apply("APPLY"), RollbackAndRemoveTarget("ROLLBACK_AND_REMOVE_TARGET"), Cleanup("CLEANUP"), + RollbackMaintenanceCycle("ROLLBACK_MAINTENANCE_CYCLE"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DiagnosticsCollectionDetails.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DiagnosticsCollectionDetails.java new file mode 100644 index 00000000000..ecd5bc0a620 --- /dev/null +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/DiagnosticsCollectionDetails.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetsoftwareupdate.model; + +/** + * Details to configure diagnostics collection for targets affected by this Exadata Fleet Update Maintenance Cycle. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220528") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DiagnosticsCollectionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DiagnosticsCollectionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"logCollectionMode"}) + public DiagnosticsCollectionDetails(DataCollectionModes logCollectionMode) { + super(); + this.logCollectionMode = logCollectionMode; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Enable incident logs and trace collection. + * Allow Oracle to collect incident logs and traces to enable fault diagnosis and issue resolution according to the selected mode. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("logCollectionMode") + private DataCollectionModes logCollectionMode; + + /** + * Enable incident logs and trace collection. + * Allow Oracle to collect incident logs and traces to enable fault diagnosis and issue resolution according to the selected mode. + * + * @param logCollectionMode the value to set + * @return this builder + **/ + public Builder logCollectionMode(DataCollectionModes logCollectionMode) { + this.logCollectionMode = logCollectionMode; + this.__explicitlySet__.add("logCollectionMode"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DiagnosticsCollectionDetails build() { + DiagnosticsCollectionDetails model = + new DiagnosticsCollectionDetails(this.logCollectionMode); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DiagnosticsCollectionDetails model) { + if (model.wasPropertyExplicitlySet("logCollectionMode")) { + this.logCollectionMode(model.getLogCollectionMode()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Enable incident logs and trace collection. + * Allow Oracle to collect incident logs and traces to enable fault diagnosis and issue resolution according to the selected mode. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("logCollectionMode") + private final DataCollectionModes logCollectionMode; + + /** + * Enable incident logs and trace collection. + * Allow Oracle to collect incident logs and traces to enable fault diagnosis and issue resolution according to the selected mode. + * + * @return the value + **/ + public DataCollectionModes getLogCollectionMode() { + return logCollectionMode; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DiagnosticsCollectionDetails("); + sb.append("super=").append(super.toString()); + sb.append("logCollectionMode=").append(String.valueOf(this.logCollectionMode)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DiagnosticsCollectionDetails)) { + return false; + } + + DiagnosticsCollectionDetails other = (DiagnosticsCollectionDetails) o; + return java.util.Objects.equals(this.logCollectionMode, other.logCollectionMode) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.logCollectionMode == null ? 43 : this.logCollectionMode.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuAction.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuAction.java index 753184d30f4..e8c2c2aa773 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuAction.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuAction.java @@ -31,6 +31,10 @@ value = PrecheckAction.class, name = "PRECHECK" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = RollbackCycleAction.class, + name = "ROLLBACK_MAINTENANCE_CYCLE" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = StageAction.class, name = "STAGE"), @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = ApplyAction.class, name = "APPLY"), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuActionSummary.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuActionSummary.java index b89805d5d94..b541774ac44 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuActionSummary.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuActionSummary.java @@ -23,6 +23,10 @@ defaultImpl = FsuActionSummary.class ) @com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = RollbackCycleActionSummary.class, + name = "ROLLBACK_MAINTENANCE_CYCLE" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = StageActionSummary.class, name = "STAGE" diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuCollection.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuCollection.java index b598ba92995..c1d76053f16 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuCollection.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuCollection.java @@ -40,6 +40,7 @@ public class FsuCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmc "timeUpdated", "lifecycleState", "lifecycleDetails", + "lastCompletedFsuCycleId", "freeformTags", "definedTags", "systemTags" @@ -55,6 +56,7 @@ protected FsuCollection( java.util.Date timeUpdated, CollectionLifecycleStates lifecycleState, String lifecycleDetails, + String lastCompletedFsuCycleId, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags) { @@ -69,6 +71,7 @@ protected FsuCollection( this.timeUpdated = timeUpdated; this.lifecycleState = lifecycleState; this.lifecycleDetails = lifecycleDetails; + this.lastCompletedFsuCycleId = lastCompletedFsuCycleId; this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; @@ -225,6 +228,22 @@ public String getLifecycleDetails() { return lifecycleDetails; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of last completed FSU Cycle. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastCompletedFsuCycleId") + private final String lastCompletedFsuCycleId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of last completed FSU Cycle. + * + * @return the value + **/ + public String getLastCompletedFsuCycleId() { + return lastCompletedFsuCycleId; + } + /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -303,6 +322,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", lastCompletedFsuCycleId=") + .append(String.valueOf(this.lastCompletedFsuCycleId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); @@ -330,6 +351,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals( + this.lastCompletedFsuCycleId, other.lastCompletedFsuCycleId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) @@ -358,6 +381,11 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = + (result * PRIME) + + (this.lastCompletedFsuCycleId == null + ? 43 + : this.lastCompletedFsuCycleId.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuCollectionSummary.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuCollectionSummary.java index 71b99d6f747..db508477b06 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuCollectionSummary.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuCollectionSummary.java @@ -46,6 +46,7 @@ public class FsuCollectionSummary extends com.oracle.bmc.http.internal.Explicitl "timeUpdated", "lifecycleState", "lifecycleDetails", + "lastCompletedFsuCycleId", "freeformTags", "definedTags", "systemTags" @@ -61,6 +62,7 @@ protected FsuCollectionSummary( java.util.Date timeUpdated, CollectionLifecycleStates lifecycleState, String lifecycleDetails, + String lastCompletedFsuCycleId, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags) { @@ -75,6 +77,7 @@ protected FsuCollectionSummary( this.timeUpdated = timeUpdated; this.lifecycleState = lifecycleState; this.lifecycleDetails = lifecycleDetails; + this.lastCompletedFsuCycleId = lastCompletedFsuCycleId; this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; @@ -233,6 +236,22 @@ public String getLifecycleDetails() { return lifecycleDetails; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of last completed FSU Cycle. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastCompletedFsuCycleId") + private final String lastCompletedFsuCycleId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of last completed FSU Cycle. + * + * @return the value + **/ + public String getLastCompletedFsuCycleId() { + return lastCompletedFsuCycleId; + } + /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -311,6 +330,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", lastCompletedFsuCycleId=") + .append(String.valueOf(this.lastCompletedFsuCycleId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); @@ -338,6 +359,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals( + this.lastCompletedFsuCycleId, other.lastCompletedFsuCycleId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) @@ -366,6 +389,11 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = + (result * PRIME) + + (this.lastCompletedFsuCycleId == null + ? 43 + : this.lastCompletedFsuCycleId.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuCollectionTarget.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuCollectionTarget.java new file mode 100644 index 00000000000..ec103591736 --- /dev/null +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuCollectionTarget.java @@ -0,0 +1,384 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetsoftwareupdate.model; + +/** + * Details of a target member of a Exadata Fleet Update Collection. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220528") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = FsuCollectionTarget.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class FsuCollectionTarget extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "target", + "currentVersion", + "status", + "executingFsuJobId", + "activeFsuCycleId", + "progress" + }) + public FsuCollectionTarget( + TargetDetails target, + String currentVersion, + Status status, + String executingFsuJobId, + String activeFsuCycleId, + TargetProgressSummary progress) { + super(); + this.target = target; + this.currentVersion = currentVersion; + this.status = status; + this.executingFsuJobId = executingFsuJobId; + this.activeFsuCycleId = activeFsuCycleId; + this.progress = progress; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("target") + private TargetDetails target; + + public Builder target(TargetDetails target) { + this.target = target; + this.__explicitlySet__.add("target"); + return this; + } + /** + * Current version of the target. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("currentVersion") + private String currentVersion; + + /** + * Current version of the target. + * + * @param currentVersion the value to set + * @return this builder + **/ + public Builder currentVersion(String currentVersion) { + this.currentVersion = currentVersion; + this.__explicitlySet__.add("currentVersion"); + return this; + } + /** + * Status of the target in the Exadata Fleet Update Collection. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * Status of the target in the Exadata Fleet Update Collection. + * + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * Exadata Fleet Update Job OCID executing an action in the target. Null if no job is being executed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executingFsuJobId") + private String executingFsuJobId; + + /** + * Exadata Fleet Update Job OCID executing an action in the target. Null if no job is being executed. + * + * @param executingFsuJobId the value to set + * @return this builder + **/ + public Builder executingFsuJobId(String executingFsuJobId) { + this.executingFsuJobId = executingFsuJobId; + this.__explicitlySet__.add("executingFsuJobId"); + return this; + } + /** + * Active Exadata Fleet Update Cycle OCID. Null if no Cycle is active that has this target as member. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("activeFsuCycleId") + private String activeFsuCycleId; + + /** + * Active Exadata Fleet Update Cycle OCID. Null if no Cycle is active that has this target as member. + * + * @param activeFsuCycleId the value to set + * @return this builder + **/ + public Builder activeFsuCycleId(String activeFsuCycleId) { + this.activeFsuCycleId = activeFsuCycleId; + this.__explicitlySet__.add("activeFsuCycleId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("progress") + private TargetProgressSummary progress; + + public Builder progress(TargetProgressSummary progress) { + this.progress = progress; + this.__explicitlySet__.add("progress"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public FsuCollectionTarget build() { + FsuCollectionTarget model = + new FsuCollectionTarget( + this.target, + this.currentVersion, + this.status, + this.executingFsuJobId, + this.activeFsuCycleId, + this.progress); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(FsuCollectionTarget model) { + if (model.wasPropertyExplicitlySet("target")) { + this.target(model.getTarget()); + } + if (model.wasPropertyExplicitlySet("currentVersion")) { + this.currentVersion(model.getCurrentVersion()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("executingFsuJobId")) { + this.executingFsuJobId(model.getExecutingFsuJobId()); + } + if (model.wasPropertyExplicitlySet("activeFsuCycleId")) { + this.activeFsuCycleId(model.getActiveFsuCycleId()); + } + if (model.wasPropertyExplicitlySet("progress")) { + this.progress(model.getProgress()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("target") + private final TargetDetails target; + + public TargetDetails getTarget() { + return target; + } + + /** + * Current version of the target. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("currentVersion") + private final String currentVersion; + + /** + * Current version of the target. + * + * @return the value + **/ + public String getCurrentVersion() { + return currentVersion; + } + + /** + * Status of the target in the Exadata Fleet Update Collection. + * + **/ + public enum Status { + Idle("IDLE"), + ExecutingJob("EXECUTING_JOB"), + JobFailed("JOB_FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Status of the target in the Exadata Fleet Update Collection. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * Status of the target in the Exadata Fleet Update Collection. + * + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * Exadata Fleet Update Job OCID executing an action in the target. Null if no job is being executed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("executingFsuJobId") + private final String executingFsuJobId; + + /** + * Exadata Fleet Update Job OCID executing an action in the target. Null if no job is being executed. + * + * @return the value + **/ + public String getExecutingFsuJobId() { + return executingFsuJobId; + } + + /** + * Active Exadata Fleet Update Cycle OCID. Null if no Cycle is active that has this target as member. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("activeFsuCycleId") + private final String activeFsuCycleId; + + /** + * Active Exadata Fleet Update Cycle OCID. Null if no Cycle is active that has this target as member. + * + * @return the value + **/ + public String getActiveFsuCycleId() { + return activeFsuCycleId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("progress") + private final TargetProgressSummary progress; + + public TargetProgressSummary getProgress() { + return progress; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("FsuCollectionTarget("); + sb.append("super=").append(super.toString()); + sb.append("target=").append(String.valueOf(this.target)); + sb.append(", currentVersion=").append(String.valueOf(this.currentVersion)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", executingFsuJobId=").append(String.valueOf(this.executingFsuJobId)); + sb.append(", activeFsuCycleId=").append(String.valueOf(this.activeFsuCycleId)); + sb.append(", progress=").append(String.valueOf(this.progress)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof FsuCollectionTarget)) { + return false; + } + + FsuCollectionTarget other = (FsuCollectionTarget) o; + return java.util.Objects.equals(this.target, other.target) + && java.util.Objects.equals(this.currentVersion, other.currentVersion) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.executingFsuJobId, other.executingFsuJobId) + && java.util.Objects.equals(this.activeFsuCycleId, other.activeFsuCycleId) + && java.util.Objects.equals(this.progress, other.progress) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.target == null ? 43 : this.target.hashCode()); + result = + (result * PRIME) + + (this.currentVersion == null ? 43 : this.currentVersion.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = + (result * PRIME) + + (this.executingFsuJobId == null ? 43 : this.executingFsuJobId.hashCode()); + result = + (result * PRIME) + + (this.activeFsuCycleId == null ? 43 : this.activeFsuCycleId.hashCode()); + result = (result * PRIME) + (this.progress == null ? 43 : this.progress.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuCycle.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuCycle.java index 87cc0ee758c..c0fea4d1a0e 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuCycle.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuCycle.java @@ -36,11 +36,14 @@ public class FsuCycle extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel "collectionType", "executingFsuActionId", "nextActionToExecute", + "lastCompletedActionId", + "rollbackCycleState", "lastCompletedAction", "goalVersionDetails", "batchingStrategy", "stageActionSchedule", "applyActionSchedule", + "diagnosticsCollection", "timeCreated", "timeUpdated", "timeFinished", @@ -58,11 +61,14 @@ protected FsuCycle( CollectionTypes collectionType, String executingFsuActionId, java.util.List nextActionToExecute, + String lastCompletedActionId, + RollbackCycleStates rollbackCycleState, DetailedActionTypes lastCompletedAction, FsuGoalVersionDetails goalVersionDetails, BatchingStrategyDetails batchingStrategy, ScheduleDetails stageActionSchedule, ScheduleDetails applyActionSchedule, + DiagnosticsCollectionDetails diagnosticsCollection, java.util.Date timeCreated, java.util.Date timeUpdated, java.util.Date timeFinished, @@ -79,11 +85,14 @@ protected FsuCycle( this.collectionType = collectionType; this.executingFsuActionId = executingFsuActionId; this.nextActionToExecute = nextActionToExecute; + this.lastCompletedActionId = lastCompletedActionId; + this.rollbackCycleState = rollbackCycleState; this.lastCompletedAction = lastCompletedAction; this.goalVersionDetails = goalVersionDetails; this.batchingStrategy = batchingStrategy; this.stageActionSchedule = stageActionSchedule; this.applyActionSchedule = applyActionSchedule; + this.diagnosticsCollection = diagnosticsCollection; this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.timeFinished = timeFinished; @@ -206,6 +215,42 @@ public java.util.List getNextActionToExecute() { return nextActionToExecute; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the latest Action + * in the Exadata Fleet Update Cycle. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastCompletedActionId") + private final String lastCompletedActionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the latest Action + * in the Exadata Fleet Update Cycle. + * + * @return the value + **/ + public String getLastCompletedActionId() { + return lastCompletedActionId; + } + + /** + * Current rollback cycle state if rollback maintenance cycle action has been attempted. + * No value would indicate that the Cycle has not run a rollback maintenance cycle action before. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rollbackCycleState") + private final RollbackCycleStates rollbackCycleState; + + /** + * Current rollback cycle state if rollback maintenance cycle action has been attempted. + * No value would indicate that the Cycle has not run a rollback maintenance cycle action before. + * + * @return the value + **/ + public RollbackCycleStates getRollbackCycleState() { + return rollbackCycleState; + } + /** * The latest Action type that was completed in the Exadata Fleet Update Cycle. * No value would indicate that the Cycle has not completed any Action yet. @@ -252,6 +297,13 @@ public ScheduleDetails getApplyActionSchedule() { return applyActionSchedule; } + @com.fasterxml.jackson.annotation.JsonProperty("diagnosticsCollection") + private final DiagnosticsCollectionDetails diagnosticsCollection; + + public DiagnosticsCollectionDetails getDiagnosticsCollection() { + return diagnosticsCollection; + } + /** * The date and time the Exadata Fleet Update Cycle was created, as described in * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. @@ -415,11 +467,14 @@ public String toString(boolean includeByteArrayContents) { sb.append(", collectionType=").append(String.valueOf(this.collectionType)); sb.append(", executingFsuActionId=").append(String.valueOf(this.executingFsuActionId)); sb.append(", nextActionToExecute=").append(String.valueOf(this.nextActionToExecute)); + sb.append(", lastCompletedActionId=").append(String.valueOf(this.lastCompletedActionId)); + sb.append(", rollbackCycleState=").append(String.valueOf(this.rollbackCycleState)); sb.append(", lastCompletedAction=").append(String.valueOf(this.lastCompletedAction)); sb.append(", goalVersionDetails=").append(String.valueOf(this.goalVersionDetails)); sb.append(", batchingStrategy=").append(String.valueOf(this.batchingStrategy)); sb.append(", stageActionSchedule=").append(String.valueOf(this.stageActionSchedule)); sb.append(", applyActionSchedule=").append(String.valueOf(this.applyActionSchedule)); + sb.append(", diagnosticsCollection=").append(String.valueOf(this.diagnosticsCollection)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); @@ -449,11 +504,14 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.collectionType, other.collectionType) && java.util.Objects.equals(this.executingFsuActionId, other.executingFsuActionId) && java.util.Objects.equals(this.nextActionToExecute, other.nextActionToExecute) + && java.util.Objects.equals(this.lastCompletedActionId, other.lastCompletedActionId) + && java.util.Objects.equals(this.rollbackCycleState, other.rollbackCycleState) && java.util.Objects.equals(this.lastCompletedAction, other.lastCompletedAction) && java.util.Objects.equals(this.goalVersionDetails, other.goalVersionDetails) && java.util.Objects.equals(this.batchingStrategy, other.batchingStrategy) && java.util.Objects.equals(this.stageActionSchedule, other.stageActionSchedule) && java.util.Objects.equals(this.applyActionSchedule, other.applyActionSchedule) + && java.util.Objects.equals(this.diagnosticsCollection, other.diagnosticsCollection) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.timeFinished, other.timeFinished) @@ -490,6 +548,16 @@ public int hashCode() { + (this.nextActionToExecute == null ? 43 : this.nextActionToExecute.hashCode()); + result = + (result * PRIME) + + (this.lastCompletedActionId == null + ? 43 + : this.lastCompletedActionId.hashCode()); + result = + (result * PRIME) + + (this.rollbackCycleState == null + ? 43 + : this.rollbackCycleState.hashCode()); result = (result * PRIME) + (this.lastCompletedAction == null @@ -513,6 +581,11 @@ public int hashCode() { + (this.applyActionSchedule == null ? 43 : this.applyActionSchedule.hashCode()); + result = + (result * PRIME) + + (this.diagnosticsCollection == null + ? 43 + : this.diagnosticsCollection.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuCycleSummary.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuCycleSummary.java index f337e6d6e1e..bce11eb4a40 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuCycleSummary.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuCycleSummary.java @@ -29,8 +29,11 @@ public final class FsuCycleSummary extends com.oracle.bmc.http.internal.Explicit "collectionType", "executingFsuActionId", "nextActionToExecute", + "lastCompletedActionId", + "rollbackCycleState", "lastCompletedAction", "goalVersionDetails", + "diagnosticsCollection", "timeCreated", "timeUpdated", "timeFinished", @@ -49,8 +52,11 @@ public FsuCycleSummary( CollectionTypes collectionType, String executingFsuActionId, java.util.List nextActionToExecute, + String lastCompletedActionId, + RollbackCycleStates rollbackCycleState, DetailedActionTypes lastCompletedAction, FsuGoalVersionDetails goalVersionDetails, + DiagnosticsCollectionDetails diagnosticsCollection, java.util.Date timeCreated, java.util.Date timeUpdated, java.util.Date timeFinished, @@ -68,8 +74,11 @@ public FsuCycleSummary( this.collectionType = collectionType; this.executingFsuActionId = executingFsuActionId; this.nextActionToExecute = nextActionToExecute; + this.lastCompletedActionId = lastCompletedActionId; + this.rollbackCycleState = rollbackCycleState; this.lastCompletedAction = lastCompletedAction; this.goalVersionDetails = goalVersionDetails; + this.diagnosticsCollection = diagnosticsCollection; this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.timeFinished = timeFinished; @@ -227,6 +236,46 @@ public Builder nextActionToExecute( this.__explicitlySet__.add("nextActionToExecute"); return this; } + /** + * OCID identifier for the latest Action the Exadata Fleet Update Cycle. + * No value would indicate that the Cycle has not completed any Action yet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastCompletedActionId") + private String lastCompletedActionId; + + /** + * OCID identifier for the latest Action the Exadata Fleet Update Cycle. + * No value would indicate that the Cycle has not completed any Action yet. + * + * @param lastCompletedActionId the value to set + * @return this builder + **/ + public Builder lastCompletedActionId(String lastCompletedActionId) { + this.lastCompletedActionId = lastCompletedActionId; + this.__explicitlySet__.add("lastCompletedActionId"); + return this; + } + /** + * Current rollback cycle state if rollback maintenance cycle action has been attempted. + * No value would indicate that the Cycle has not run a rollback maintenance cycle action before. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rollbackCycleState") + private RollbackCycleStates rollbackCycleState; + + /** + * Current rollback cycle state if rollback maintenance cycle action has been attempted. + * No value would indicate that the Cycle has not run a rollback maintenance cycle action before. + * + * @param rollbackCycleState the value to set + * @return this builder + **/ + public Builder rollbackCycleState(RollbackCycleStates rollbackCycleState) { + this.rollbackCycleState = rollbackCycleState; + this.__explicitlySet__.add("rollbackCycleState"); + return this; + } /** * The latest Action type that was completed in the Exadata Fleet Update Cycle. * No value would indicate that the Cycle has not completed any Action yet. @@ -256,6 +305,15 @@ public Builder goalVersionDetails(FsuGoalVersionDetails goalVersionDetails) { this.__explicitlySet__.add("goalVersionDetails"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("diagnosticsCollection") + private DiagnosticsCollectionDetails diagnosticsCollection; + + public Builder diagnosticsCollection(DiagnosticsCollectionDetails diagnosticsCollection) { + this.diagnosticsCollection = diagnosticsCollection; + this.__explicitlySet__.add("diagnosticsCollection"); + return this; + } /** * The date and time the Exadata Fleet Update Cycle was created, as described in * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. @@ -430,8 +488,11 @@ public FsuCycleSummary build() { this.collectionType, this.executingFsuActionId, this.nextActionToExecute, + this.lastCompletedActionId, + this.rollbackCycleState, this.lastCompletedAction, this.goalVersionDetails, + this.diagnosticsCollection, this.timeCreated, this.timeUpdated, this.timeFinished, @@ -472,12 +533,21 @@ public Builder copy(FsuCycleSummary model) { if (model.wasPropertyExplicitlySet("nextActionToExecute")) { this.nextActionToExecute(model.getNextActionToExecute()); } + if (model.wasPropertyExplicitlySet("lastCompletedActionId")) { + this.lastCompletedActionId(model.getLastCompletedActionId()); + } + if (model.wasPropertyExplicitlySet("rollbackCycleState")) { + this.rollbackCycleState(model.getRollbackCycleState()); + } if (model.wasPropertyExplicitlySet("lastCompletedAction")) { this.lastCompletedAction(model.getLastCompletedAction()); } if (model.wasPropertyExplicitlySet("goalVersionDetails")) { this.goalVersionDetails(model.getGoalVersionDetails()); } + if (model.wasPropertyExplicitlySet("diagnosticsCollection")) { + this.diagnosticsCollection(model.getDiagnosticsCollection()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -645,6 +715,42 @@ public java.util.List getNextActionToExecute() { return nextActionToExecute; } + /** + * OCID identifier for the latest Action the Exadata Fleet Update Cycle. + * No value would indicate that the Cycle has not completed any Action yet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastCompletedActionId") + private final String lastCompletedActionId; + + /** + * OCID identifier for the latest Action the Exadata Fleet Update Cycle. + * No value would indicate that the Cycle has not completed any Action yet. + * + * @return the value + **/ + public String getLastCompletedActionId() { + return lastCompletedActionId; + } + + /** + * Current rollback cycle state if rollback maintenance cycle action has been attempted. + * No value would indicate that the Cycle has not run a rollback maintenance cycle action before. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rollbackCycleState") + private final RollbackCycleStates rollbackCycleState; + + /** + * Current rollback cycle state if rollback maintenance cycle action has been attempted. + * No value would indicate that the Cycle has not run a rollback maintenance cycle action before. + * + * @return the value + **/ + public RollbackCycleStates getRollbackCycleState() { + return rollbackCycleState; + } + /** * The latest Action type that was completed in the Exadata Fleet Update Cycle. * No value would indicate that the Cycle has not completed any Action yet. @@ -670,6 +776,13 @@ public FsuGoalVersionDetails getGoalVersionDetails() { return goalVersionDetails; } + @com.fasterxml.jackson.annotation.JsonProperty("diagnosticsCollection") + private final DiagnosticsCollectionDetails diagnosticsCollection; + + public DiagnosticsCollectionDetails getDiagnosticsCollection() { + return diagnosticsCollection; + } + /** * The date and time the Exadata Fleet Update Cycle was created, as described in * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. @@ -834,8 +947,11 @@ public String toString(boolean includeByteArrayContents) { sb.append(", collectionType=").append(String.valueOf(this.collectionType)); sb.append(", executingFsuActionId=").append(String.valueOf(this.executingFsuActionId)); sb.append(", nextActionToExecute=").append(String.valueOf(this.nextActionToExecute)); + sb.append(", lastCompletedActionId=").append(String.valueOf(this.lastCompletedActionId)); + sb.append(", rollbackCycleState=").append(String.valueOf(this.rollbackCycleState)); sb.append(", lastCompletedAction=").append(String.valueOf(this.lastCompletedAction)); sb.append(", goalVersionDetails=").append(String.valueOf(this.goalVersionDetails)); + sb.append(", diagnosticsCollection=").append(String.valueOf(this.diagnosticsCollection)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); @@ -866,8 +982,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.collectionType, other.collectionType) && java.util.Objects.equals(this.executingFsuActionId, other.executingFsuActionId) && java.util.Objects.equals(this.nextActionToExecute, other.nextActionToExecute) + && java.util.Objects.equals(this.lastCompletedActionId, other.lastCompletedActionId) + && java.util.Objects.equals(this.rollbackCycleState, other.rollbackCycleState) && java.util.Objects.equals(this.lastCompletedAction, other.lastCompletedAction) && java.util.Objects.equals(this.goalVersionDetails, other.goalVersionDetails) + && java.util.Objects.equals(this.diagnosticsCollection, other.diagnosticsCollection) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.timeFinished, other.timeFinished) @@ -905,6 +1024,16 @@ public int hashCode() { + (this.nextActionToExecute == null ? 43 : this.nextActionToExecute.hashCode()); + result = + (result * PRIME) + + (this.lastCompletedActionId == null + ? 43 + : this.lastCompletedActionId.hashCode()); + result = + (result * PRIME) + + (this.rollbackCycleState == null + ? 43 + : this.rollbackCycleState.hashCode()); result = (result * PRIME) + (this.lastCompletedAction == null @@ -915,6 +1044,11 @@ public int hashCode() { + (this.goalVersionDetails == null ? 43 : this.goalVersionDetails.hashCode()); + result = + (result * PRIME) + + (this.diagnosticsCollection == null + ? 43 + : this.diagnosticsCollection.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuJob.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuJob.java index 3fac624e315..27373bf75d4 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuJob.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuJob.java @@ -24,6 +24,10 @@ ) @com.fasterxml.jackson.annotation.JsonSubTypes({ @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = ApplyFsuJob.class, name = "APPLY"), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = RollbackCycleFsuJob.class, + name = "ROLLBACK_MAINTENANCE_CYCLE" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = StageFsuJob.class, name = "STAGE"), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = PrecheckFsuJob.class, diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuJobSummary.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuJobSummary.java index e882b29bd9e..b384783df45 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuJobSummary.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/FsuJobSummary.java @@ -35,6 +35,10 @@ value = ApplyFsuJobSummary.class, name = "APPLY" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = RollbackCycleFsuJobSummary.class, + name = "ROLLBACK_MAINTENANCE_CYCLE" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = CleanupFsuJobSummary.class, name = "CLEANUP" diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/GiCollection.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/GiCollection.java index a66169e4323..b381d0e9640 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/GiCollection.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/GiCollection.java @@ -116,6 +116,15 @@ public Builder lifecycleDetails(String lifecycleDetails) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("lastCompletedFsuCycleId") + private String lastCompletedFsuCycleId; + + public Builder lastCompletedFsuCycleId(String lastCompletedFsuCycleId) { + this.lastCompletedFsuCycleId = lastCompletedFsuCycleId; + this.__explicitlySet__.add("lastCompletedFsuCycleId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") private java.util.Map freeformTags; @@ -189,6 +198,7 @@ public GiCollection build() { this.timeUpdated, this.lifecycleState, this.lifecycleDetails, + this.lastCompletedFsuCycleId, this.freeformTags, this.definedTags, this.systemTags, @@ -232,6 +242,9 @@ public Builder copy(GiCollection model) { if (model.wasPropertyExplicitlySet("lifecycleDetails")) { this.lifecycleDetails(model.getLifecycleDetails()); } + if (model.wasPropertyExplicitlySet("lastCompletedFsuCycleId")) { + this.lastCompletedFsuCycleId(model.getLastCompletedFsuCycleId()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -274,6 +287,7 @@ public GiCollection( java.util.Date timeUpdated, CollectionLifecycleStates lifecycleState, String lifecycleDetails, + String lastCompletedFsuCycleId, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags, @@ -290,6 +304,7 @@ public GiCollection( timeUpdated, lifecycleState, lifecycleDetails, + lastCompletedFsuCycleId, freeformTags, definedTags, systemTags); diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/GiFsuCollectionSummary.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/GiFsuCollectionSummary.java index 99274b127c7..52a0e042fed 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/GiFsuCollectionSummary.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/GiFsuCollectionSummary.java @@ -118,6 +118,15 @@ public Builder lifecycleDetails(String lifecycleDetails) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("lastCompletedFsuCycleId") + private String lastCompletedFsuCycleId; + + public Builder lastCompletedFsuCycleId(String lastCompletedFsuCycleId) { + this.lastCompletedFsuCycleId = lastCompletedFsuCycleId; + this.__explicitlySet__.add("lastCompletedFsuCycleId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") private java.util.Map freeformTags; @@ -182,6 +191,7 @@ public GiFsuCollectionSummary build() { this.timeUpdated, this.lifecycleState, this.lifecycleDetails, + this.lastCompletedFsuCycleId, this.freeformTags, this.definedTags, this.systemTags, @@ -224,6 +234,9 @@ public Builder copy(GiFsuCollectionSummary model) { if (model.wasPropertyExplicitlySet("lifecycleDetails")) { this.lifecycleDetails(model.getLifecycleDetails()); } + if (model.wasPropertyExplicitlySet("lastCompletedFsuCycleId")) { + this.lastCompletedFsuCycleId(model.getLastCompletedFsuCycleId()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -263,6 +276,7 @@ public GiFsuCollectionSummary( java.util.Date timeUpdated, CollectionLifecycleStates lifecycleState, String lifecycleDetails, + String lastCompletedFsuCycleId, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags, @@ -278,6 +292,7 @@ public GiFsuCollectionSummary( timeUpdated, lifecycleState, lifecycleDetails, + lastCompletedFsuCycleId, freeformTags, definedTags, systemTags); diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/GiResourceIdFilter.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/GiResourceIdFilter.java index 1b2f89672d2..a7dc5826537 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/GiResourceIdFilter.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/GiResourceIdFilter.java @@ -152,6 +152,7 @@ public GiResourceIdFilter( * **/ public enum EntityType { + Databasesoftwareimage("DATABASESOFTWAREIMAGE"), Exadatainfrastructure("EXADATAINFRASTRUCTURE"), Cloudexadatainfrastructure("CLOUDEXADATAINFRASTRUCTURE"), Vmcluster("VMCLUSTER"), diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/GiSourceMajorVersions.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/GiSourceMajorVersions.java index 7c8ef60311b..b3395bf6e0e 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/GiSourceMajorVersions.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/GiSourceMajorVersions.java @@ -12,6 +12,7 @@ public enum GiSourceMajorVersions { Gi18("GI_18"), Gi19("GI_19"), + Gi23("GI_23"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/ImageIdFsuTargetDetails.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/ImageIdFsuTargetDetails.java index 35e4c264a4f..5b1870571d7 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/ImageIdFsuTargetDetails.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/ImageIdFsuTargetDetails.java @@ -5,7 +5,10 @@ package com.oracle.bmc.fleetsoftwareupdate.model; /** - * Exadata Fleet Update Cycle Target Image Id details. + * The Database service Database Software Image resource is required as goal version for the Exadata Fleet Update Maintenance Cycle + * when IMAGE_ID type is selected. + * Specify a Database Software Image of type DATABASE_IMAGE for a DB Collection. + * Specify a Database Software Image of type GRID_IMAGE for a GI Collection. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/JobTypes.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/JobTypes.java index 8c6015ce106..b41b48758f7 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/JobTypes.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/JobTypes.java @@ -14,6 +14,7 @@ public enum JobTypes { Precheck("PRECHECK"), Apply("APPLY"), RollbackAndRemoveTarget("ROLLBACK_AND_REMOVE_TARGET"), + RollbackMaintenanceCycle("ROLLBACK_MAINTENANCE_CYCLE"), Cleanup("CLEANUP"), /** diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/OperationStatus.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/OperationStatus.java index ed3434b6c47..ec25e104724 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/OperationStatus.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/OperationStatus.java @@ -16,6 +16,7 @@ public enum OperationStatus { Succeeded("SUCCEEDED"), Canceling("CANCELING"), Canceled("CANCELED"), + NeedsAttention("NEEDS_ATTENTION"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/OperationType.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/OperationType.java index 73c00e3278f..c5dc9ae04ae 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/OperationType.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/OperationType.java @@ -22,6 +22,7 @@ public enum OperationType { DeleteMaintenanceCycle("DELETE_MAINTENANCE_CYCLE"), MoveMaintenanceCycle("MOVE_MAINTENANCE_CYCLE"), CloneMaintenanceCycle("CLONE_MAINTENANCE_CYCLE"), + RollbackMaintenanceCycleAction("ROLLBACK_MAINTENANCE_CYCLE_ACTION"), CreateAction("CREATE_ACTION"), UpdateAction("UPDATE_ACTION"), DeleteAction("DELETE_ACTION"), diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/PatchFsuCycle.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/PatchFsuCycle.java index 0e9f879875c..448a912a671 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/PatchFsuCycle.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/PatchFsuCycle.java @@ -90,6 +90,24 @@ public Builder nextActionToExecute( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("lastCompletedActionId") + private String lastCompletedActionId; + + public Builder lastCompletedActionId(String lastCompletedActionId) { + this.lastCompletedActionId = lastCompletedActionId; + this.__explicitlySet__.add("lastCompletedActionId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("rollbackCycleState") + private RollbackCycleStates rollbackCycleState; + + public Builder rollbackCycleState(RollbackCycleStates rollbackCycleState) { + this.rollbackCycleState = rollbackCycleState; + this.__explicitlySet__.add("rollbackCycleState"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("lastCompletedAction") private DetailedActionTypes lastCompletedAction; @@ -135,6 +153,15 @@ public Builder applyActionSchedule(ScheduleDetails applyActionSchedule) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("diagnosticsCollection") + private DiagnosticsCollectionDetails diagnosticsCollection; + + public Builder diagnosticsCollection(DiagnosticsCollectionDetails diagnosticsCollection) { + this.diagnosticsCollection = diagnosticsCollection; + this.__explicitlySet__.add("diagnosticsCollection"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") private java.util.Date timeCreated; @@ -295,11 +322,14 @@ public PatchFsuCycle build() { this.collectionType, this.executingFsuActionId, this.nextActionToExecute, + this.lastCompletedActionId, + this.rollbackCycleState, this.lastCompletedAction, this.goalVersionDetails, this.batchingStrategy, this.stageActionSchedule, this.applyActionSchedule, + this.diagnosticsCollection, this.timeCreated, this.timeUpdated, this.timeFinished, @@ -341,6 +371,12 @@ public Builder copy(PatchFsuCycle model) { if (model.wasPropertyExplicitlySet("nextActionToExecute")) { this.nextActionToExecute(model.getNextActionToExecute()); } + if (model.wasPropertyExplicitlySet("lastCompletedActionId")) { + this.lastCompletedActionId(model.getLastCompletedActionId()); + } + if (model.wasPropertyExplicitlySet("rollbackCycleState")) { + this.rollbackCycleState(model.getRollbackCycleState()); + } if (model.wasPropertyExplicitlySet("lastCompletedAction")) { this.lastCompletedAction(model.getLastCompletedAction()); } @@ -356,6 +392,9 @@ public Builder copy(PatchFsuCycle model) { if (model.wasPropertyExplicitlySet("applyActionSchedule")) { this.applyActionSchedule(model.getApplyActionSchedule()); } + if (model.wasPropertyExplicitlySet("diagnosticsCollection")) { + this.diagnosticsCollection(model.getDiagnosticsCollection()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -416,11 +455,14 @@ public PatchFsuCycle( CollectionTypes collectionType, String executingFsuActionId, java.util.List nextActionToExecute, + String lastCompletedActionId, + RollbackCycleStates rollbackCycleState, DetailedActionTypes lastCompletedAction, FsuGoalVersionDetails goalVersionDetails, BatchingStrategyDetails batchingStrategy, ScheduleDetails stageActionSchedule, ScheduleDetails applyActionSchedule, + DiagnosticsCollectionDetails diagnosticsCollection, java.util.Date timeCreated, java.util.Date timeUpdated, java.util.Date timeFinished, @@ -441,11 +483,14 @@ public PatchFsuCycle( collectionType, executingFsuActionId, nextActionToExecute, + lastCompletedActionId, + rollbackCycleState, lastCompletedAction, goalVersionDetails, batchingStrategy, stageActionSchedule, applyActionSchedule, + diagnosticsCollection, timeCreated, timeUpdated, timeFinished, diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/RollbackCycleAction.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/RollbackCycleAction.java new file mode 100644 index 00000000000..f2d4269a471 --- /dev/null +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/RollbackCycleAction.java @@ -0,0 +1,399 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetsoftwareupdate.model; + +/** + * Rollback Cycle Exadata Fleet Update Action details. + * This will rollback all the targets in the maintenance cycle with the Collection in place. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220528") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RollbackCycleAction.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RollbackCycleAction extends FsuAction { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private ActionLifecycleStates lifecycleState; + + public Builder lifecycleState(ActionLifecycleStates lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * OCID identifier for the Exadata Fleet Update Cycle the Action will be part of. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fsuCycleId") + private String fsuCycleId; + + /** + * OCID identifier for the Exadata Fleet Update Cycle the Action will be part of. + * + * @param fsuCycleId the value to set + * @return this builder + **/ + public Builder fsuCycleId(String fsuCycleId) { + this.fsuCycleId = fsuCycleId; + this.__explicitlySet__.add("fsuCycleId"); + return this; + } + /** + * OCID identifier for the Exadata Fleet Update Action. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("relatedFsuActionId") + private String relatedFsuActionId; + + /** + * OCID identifier for the Exadata Fleet Update Action. + * + * @param relatedFsuActionId the value to set + * @return this builder + **/ + public Builder relatedFsuActionId(String relatedFsuActionId) { + this.relatedFsuActionId = relatedFsuActionId; + this.__explicitlySet__.add("relatedFsuActionId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("progress") + private FsuActionProgressDetails progress; + + public Builder progress(FsuActionProgressDetails progress) { + this.progress = progress; + this.__explicitlySet__.add("progress"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RollbackCycleAction build() { + RollbackCycleAction model = + new RollbackCycleAction( + this.id, + this.displayName, + this.compartmentId, + this.timeCreated, + this.timeStarted, + this.timeFinished, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags, + this.fsuCycleId, + this.relatedFsuActionId, + this.progress); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RollbackCycleAction model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("fsuCycleId")) { + this.fsuCycleId(model.getFsuCycleId()); + } + if (model.wasPropertyExplicitlySet("relatedFsuActionId")) { + this.relatedFsuActionId(model.getRelatedFsuActionId()); + } + if (model.wasPropertyExplicitlySet("progress")) { + this.progress(model.getProgress()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public RollbackCycleAction( + String id, + String displayName, + String compartmentId, + java.util.Date timeCreated, + java.util.Date timeStarted, + java.util.Date timeFinished, + java.util.Date timeUpdated, + ActionLifecycleStates lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + String fsuCycleId, + String relatedFsuActionId, + FsuActionProgressDetails progress) { + super( + id, + displayName, + compartmentId, + timeCreated, + timeStarted, + timeFinished, + timeUpdated, + lifecycleState, + lifecycleDetails, + freeformTags, + definedTags, + systemTags); + this.fsuCycleId = fsuCycleId; + this.relatedFsuActionId = relatedFsuActionId; + this.progress = progress; + } + + /** + * OCID identifier for the Exadata Fleet Update Cycle the Action will be part of. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fsuCycleId") + private final String fsuCycleId; + + /** + * OCID identifier for the Exadata Fleet Update Cycle the Action will be part of. + * + * @return the value + **/ + public String getFsuCycleId() { + return fsuCycleId; + } + + /** + * OCID identifier for the Exadata Fleet Update Action. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("relatedFsuActionId") + private final String relatedFsuActionId; + + /** + * OCID identifier for the Exadata Fleet Update Action. + * + * @return the value + **/ + public String getRelatedFsuActionId() { + return relatedFsuActionId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("progress") + private final FsuActionProgressDetails progress; + + public FsuActionProgressDetails getProgress() { + return progress; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RollbackCycleAction("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", fsuCycleId=").append(String.valueOf(this.fsuCycleId)); + sb.append(", relatedFsuActionId=").append(String.valueOf(this.relatedFsuActionId)); + sb.append(", progress=").append(String.valueOf(this.progress)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RollbackCycleAction)) { + return false; + } + + RollbackCycleAction other = (RollbackCycleAction) o; + return java.util.Objects.equals(this.fsuCycleId, other.fsuCycleId) + && java.util.Objects.equals(this.relatedFsuActionId, other.relatedFsuActionId) + && java.util.Objects.equals(this.progress, other.progress) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.fsuCycleId == null ? 43 : this.fsuCycleId.hashCode()); + result = + (result * PRIME) + + (this.relatedFsuActionId == null + ? 43 + : this.relatedFsuActionId.hashCode()); + result = (result * PRIME) + (this.progress == null ? 43 : this.progress.hashCode()); + return result; + } +} diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/RollbackCycleActionSummary.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/RollbackCycleActionSummary.java new file mode 100644 index 00000000000..40131b95b58 --- /dev/null +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/RollbackCycleActionSummary.java @@ -0,0 +1,398 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetsoftwareupdate.model; + +/** + * Rollback Cycle Exadata Fleet Update Action summary. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220528") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RollbackCycleActionSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RollbackCycleActionSummary extends FsuActionSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private ActionLifecycleStates lifecycleState; + + public Builder lifecycleState(ActionLifecycleStates lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * OCID identifier for the Exadata Fleet Update Cycle the Action will be part of. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fsuCycleId") + private String fsuCycleId; + + /** + * OCID identifier for the Exadata Fleet Update Cycle the Action will be part of. + * + * @param fsuCycleId the value to set + * @return this builder + **/ + public Builder fsuCycleId(String fsuCycleId) { + this.fsuCycleId = fsuCycleId; + this.__explicitlySet__.add("fsuCycleId"); + return this; + } + /** + * OCID identifier for the Exadata Fleet Update Action. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("relatedFsuActionId") + private String relatedFsuActionId; + + /** + * OCID identifier for the Exadata Fleet Update Action. + * + * @param relatedFsuActionId the value to set + * @return this builder + **/ + public Builder relatedFsuActionId(String relatedFsuActionId) { + this.relatedFsuActionId = relatedFsuActionId; + this.__explicitlySet__.add("relatedFsuActionId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("progress") + private FsuActionProgressDetails progress; + + public Builder progress(FsuActionProgressDetails progress) { + this.progress = progress; + this.__explicitlySet__.add("progress"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RollbackCycleActionSummary build() { + RollbackCycleActionSummary model = + new RollbackCycleActionSummary( + this.id, + this.displayName, + this.compartmentId, + this.timeCreated, + this.timeStarted, + this.timeFinished, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags, + this.fsuCycleId, + this.relatedFsuActionId, + this.progress); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RollbackCycleActionSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("fsuCycleId")) { + this.fsuCycleId(model.getFsuCycleId()); + } + if (model.wasPropertyExplicitlySet("relatedFsuActionId")) { + this.relatedFsuActionId(model.getRelatedFsuActionId()); + } + if (model.wasPropertyExplicitlySet("progress")) { + this.progress(model.getProgress()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public RollbackCycleActionSummary( + String id, + String displayName, + String compartmentId, + java.util.Date timeCreated, + java.util.Date timeStarted, + java.util.Date timeFinished, + java.util.Date timeUpdated, + ActionLifecycleStates lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + String fsuCycleId, + String relatedFsuActionId, + FsuActionProgressDetails progress) { + super( + id, + displayName, + compartmentId, + timeCreated, + timeStarted, + timeFinished, + timeUpdated, + lifecycleState, + lifecycleDetails, + freeformTags, + definedTags, + systemTags); + this.fsuCycleId = fsuCycleId; + this.relatedFsuActionId = relatedFsuActionId; + this.progress = progress; + } + + /** + * OCID identifier for the Exadata Fleet Update Cycle the Action will be part of. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fsuCycleId") + private final String fsuCycleId; + + /** + * OCID identifier for the Exadata Fleet Update Cycle the Action will be part of. + * + * @return the value + **/ + public String getFsuCycleId() { + return fsuCycleId; + } + + /** + * OCID identifier for the Exadata Fleet Update Action. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("relatedFsuActionId") + private final String relatedFsuActionId; + + /** + * OCID identifier for the Exadata Fleet Update Action. + * + * @return the value + **/ + public String getRelatedFsuActionId() { + return relatedFsuActionId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("progress") + private final FsuActionProgressDetails progress; + + public FsuActionProgressDetails getProgress() { + return progress; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RollbackCycleActionSummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", fsuCycleId=").append(String.valueOf(this.fsuCycleId)); + sb.append(", relatedFsuActionId=").append(String.valueOf(this.relatedFsuActionId)); + sb.append(", progress=").append(String.valueOf(this.progress)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RollbackCycleActionSummary)) { + return false; + } + + RollbackCycleActionSummary other = (RollbackCycleActionSummary) o; + return java.util.Objects.equals(this.fsuCycleId, other.fsuCycleId) + && java.util.Objects.equals(this.relatedFsuActionId, other.relatedFsuActionId) + && java.util.Objects.equals(this.progress, other.progress) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.fsuCycleId == null ? 43 : this.fsuCycleId.hashCode()); + result = + (result * PRIME) + + (this.relatedFsuActionId == null + ? 43 + : this.relatedFsuActionId.hashCode()); + result = (result * PRIME) + (this.progress == null ? 43 : this.progress.hashCode()); + return result; + } +} diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/RollbackCycleFsuJob.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/RollbackCycleFsuJob.java new file mode 100644 index 00000000000..0e6daaeb85a --- /dev/null +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/RollbackCycleFsuJob.java @@ -0,0 +1,469 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetsoftwareupdate.model; + +/** + * Rollback Maintenance Cycle Exadata Fleet Update Job resource. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220528") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RollbackCycleFsuJob.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RollbackCycleFsuJob extends FsuJob { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("fsuActionId") + private String fsuActionId; + + public Builder fsuActionId(String fsuActionId) { + this.fsuActionId = fsuActionId; + this.__explicitlySet__.add("fsuActionId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("progress") + private JobProgressDetails progress; + + public Builder progress(JobProgressDetails progress) { + this.progress = progress; + this.__explicitlySet__.add("progress"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private JobLifecycleStates lifecycleState; + + public Builder lifecycleState(JobLifecycleStates lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Fleet Update Collection that the job is executing on. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fsuCollectionId") + private String fsuCollectionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Fleet Update Collection that the job is executing on. + * + * @param fsuCollectionId the value to set + * @return this builder + **/ + public Builder fsuCollectionId(String fsuCollectionId) { + this.fsuCollectionId = fsuCollectionId; + this.__explicitlySet__.add("fsuCollectionId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Fleet Update Cycle that this job is part of. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fsuCycleId") + private String fsuCycleId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Fleet Update Cycle that this job is part of. + * + * @param fsuCycleId the value to set + * @return this builder + **/ + public Builder fsuCycleId(String fsuCycleId) { + this.fsuCycleId = fsuCycleId; + this.__explicitlySet__.add("fsuCycleId"); + return this; + } + /** + * OCID of Target resource on which the job is executing the action. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetId") + private String targetId; + + /** + * OCID of Target resource on which the job is executing the action. + * + * @param targetId the value to set + * @return this builder + **/ + public Builder targetId(String targetId) { + this.targetId = targetId; + this.__explicitlySet__.add("targetId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("schedule") + private ScheduleDetails schedule; + + public Builder schedule(ScheduleDetails schedule) { + this.schedule = schedule; + this.__explicitlySet__.add("schedule"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RollbackCycleFsuJob build() { + RollbackCycleFsuJob model = + new RollbackCycleFsuJob( + this.id, + this.displayName, + this.compartmentId, + this.fsuActionId, + this.progress, + this.timeCreated, + this.timeStarted, + this.timeUpdated, + this.timeFinished, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags, + this.fsuCollectionId, + this.fsuCycleId, + this.targetId, + this.schedule); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RollbackCycleFsuJob model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("fsuActionId")) { + this.fsuActionId(model.getFsuActionId()); + } + if (model.wasPropertyExplicitlySet("progress")) { + this.progress(model.getProgress()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("fsuCollectionId")) { + this.fsuCollectionId(model.getFsuCollectionId()); + } + if (model.wasPropertyExplicitlySet("fsuCycleId")) { + this.fsuCycleId(model.getFsuCycleId()); + } + if (model.wasPropertyExplicitlySet("targetId")) { + this.targetId(model.getTargetId()); + } + if (model.wasPropertyExplicitlySet("schedule")) { + this.schedule(model.getSchedule()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public RollbackCycleFsuJob( + String id, + String displayName, + String compartmentId, + String fsuActionId, + JobProgressDetails progress, + java.util.Date timeCreated, + java.util.Date timeStarted, + java.util.Date timeUpdated, + java.util.Date timeFinished, + JobLifecycleStates lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + String fsuCollectionId, + String fsuCycleId, + String targetId, + ScheduleDetails schedule) { + super( + id, + displayName, + compartmentId, + fsuActionId, + progress, + timeCreated, + timeStarted, + timeUpdated, + timeFinished, + lifecycleState, + lifecycleDetails, + freeformTags, + definedTags, + systemTags); + this.fsuCollectionId = fsuCollectionId; + this.fsuCycleId = fsuCycleId; + this.targetId = targetId; + this.schedule = schedule; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Fleet Update Collection that the job is executing on. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fsuCollectionId") + private final String fsuCollectionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Fleet Update Collection that the job is executing on. + * + * @return the value + **/ + public String getFsuCollectionId() { + return fsuCollectionId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Fleet Update Cycle that this job is part of. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fsuCycleId") + private final String fsuCycleId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Fleet Update Cycle that this job is part of. + * + * @return the value + **/ + public String getFsuCycleId() { + return fsuCycleId; + } + + /** + * OCID of Target resource on which the job is executing the action. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetId") + private final String targetId; + + /** + * OCID of Target resource on which the job is executing the action. + * + * @return the value + **/ + public String getTargetId() { + return targetId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("schedule") + private final ScheduleDetails schedule; + + public ScheduleDetails getSchedule() { + return schedule; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RollbackCycleFsuJob("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", fsuCollectionId=").append(String.valueOf(this.fsuCollectionId)); + sb.append(", fsuCycleId=").append(String.valueOf(this.fsuCycleId)); + sb.append(", targetId=").append(String.valueOf(this.targetId)); + sb.append(", schedule=").append(String.valueOf(this.schedule)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RollbackCycleFsuJob)) { + return false; + } + + RollbackCycleFsuJob other = (RollbackCycleFsuJob) o; + return java.util.Objects.equals(this.fsuCollectionId, other.fsuCollectionId) + && java.util.Objects.equals(this.fsuCycleId, other.fsuCycleId) + && java.util.Objects.equals(this.targetId, other.targetId) + && java.util.Objects.equals(this.schedule, other.schedule) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.fsuCollectionId == null ? 43 : this.fsuCollectionId.hashCode()); + result = (result * PRIME) + (this.fsuCycleId == null ? 43 : this.fsuCycleId.hashCode()); + result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); + result = (result * PRIME) + (this.schedule == null ? 43 : this.schedule.hashCode()); + return result; + } +} diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/RollbackCycleFsuJobSummary.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/RollbackCycleFsuJobSummary.java new file mode 100644 index 00000000000..1b308145d53 --- /dev/null +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/RollbackCycleFsuJobSummary.java @@ -0,0 +1,444 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetsoftwareupdate.model; + +/** + * Summary of Rollback Cycle Targets Exadata Fleet Update Job resource. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220528") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RollbackCycleFsuJobSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RollbackCycleFsuJobSummary extends FsuJobSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("fsuActionId") + private String fsuActionId; + + public Builder fsuActionId(String fsuActionId) { + this.fsuActionId = fsuActionId; + this.__explicitlySet__.add("fsuActionId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("progress") + private JobProgress progress; + + public Builder progress(JobProgress progress) { + this.progress = progress; + this.__explicitlySet__.add("progress"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private JobLifecycleStates lifecycleState; + + public Builder lifecycleState(JobLifecycleStates lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Fleet Update Collection that the job is executing on. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fsuCollectionId") + private String fsuCollectionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Fleet Update Collection that the job is executing on. + * + * @param fsuCollectionId the value to set + * @return this builder + **/ + public Builder fsuCollectionId(String fsuCollectionId) { + this.fsuCollectionId = fsuCollectionId; + this.__explicitlySet__.add("fsuCollectionId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Fleet Update Cycle that this job is part of. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fsuCycleId") + private String fsuCycleId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Fleet Update Cycle that this job is part of. + * + * @param fsuCycleId the value to set + * @return this builder + **/ + public Builder fsuCycleId(String fsuCycleId) { + this.fsuCycleId = fsuCycleId; + this.__explicitlySet__.add("fsuCycleId"); + return this; + } + /** + * OCID of Target resource on which the job is executing the action. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetId") + private String targetId; + + /** + * OCID of Target resource on which the job is executing the action. + * + * @param targetId the value to set + * @return this builder + **/ + public Builder targetId(String targetId) { + this.targetId = targetId; + this.__explicitlySet__.add("targetId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RollbackCycleFsuJobSummary build() { + RollbackCycleFsuJobSummary model = + new RollbackCycleFsuJobSummary( + this.id, + this.displayName, + this.compartmentId, + this.fsuActionId, + this.progress, + this.timeCreated, + this.timeStarted, + this.timeUpdated, + this.timeFinished, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags, + this.fsuCollectionId, + this.fsuCycleId, + this.targetId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RollbackCycleFsuJobSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("fsuActionId")) { + this.fsuActionId(model.getFsuActionId()); + } + if (model.wasPropertyExplicitlySet("progress")) { + this.progress(model.getProgress()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("fsuCollectionId")) { + this.fsuCollectionId(model.getFsuCollectionId()); + } + if (model.wasPropertyExplicitlySet("fsuCycleId")) { + this.fsuCycleId(model.getFsuCycleId()); + } + if (model.wasPropertyExplicitlySet("targetId")) { + this.targetId(model.getTargetId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public RollbackCycleFsuJobSummary( + String id, + String displayName, + String compartmentId, + String fsuActionId, + JobProgress progress, + java.util.Date timeCreated, + java.util.Date timeStarted, + java.util.Date timeUpdated, + java.util.Date timeFinished, + JobLifecycleStates lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + String fsuCollectionId, + String fsuCycleId, + String targetId) { + super( + id, + displayName, + compartmentId, + fsuActionId, + progress, + timeCreated, + timeStarted, + timeUpdated, + timeFinished, + lifecycleState, + lifecycleDetails, + freeformTags, + definedTags, + systemTags); + this.fsuCollectionId = fsuCollectionId; + this.fsuCycleId = fsuCycleId; + this.targetId = targetId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Fleet Update Collection that the job is executing on. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fsuCollectionId") + private final String fsuCollectionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Fleet Update Collection that the job is executing on. + * + * @return the value + **/ + public String getFsuCollectionId() { + return fsuCollectionId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Fleet Update Cycle that this job is part of. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fsuCycleId") + private final String fsuCycleId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Exadata Fleet Update Cycle that this job is part of. + * + * @return the value + **/ + public String getFsuCycleId() { + return fsuCycleId; + } + + /** + * OCID of Target resource on which the job is executing the action. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetId") + private final String targetId; + + /** + * OCID of Target resource on which the job is executing the action. + * + * @return the value + **/ + public String getTargetId() { + return targetId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RollbackCycleFsuJobSummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", fsuCollectionId=").append(String.valueOf(this.fsuCollectionId)); + sb.append(", fsuCycleId=").append(String.valueOf(this.fsuCycleId)); + sb.append(", targetId=").append(String.valueOf(this.targetId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RollbackCycleFsuJobSummary)) { + return false; + } + + RollbackCycleFsuJobSummary other = (RollbackCycleFsuJobSummary) o; + return java.util.Objects.equals(this.fsuCollectionId, other.fsuCollectionId) + && java.util.Objects.equals(this.fsuCycleId, other.fsuCycleId) + && java.util.Objects.equals(this.targetId, other.targetId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.fsuCollectionId == null ? 43 : this.fsuCollectionId.hashCode()); + result = (result * PRIME) + (this.fsuCycleId == null ? 43 : this.fsuCycleId.hashCode()); + result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); + return result; + } +} diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/RollbackCycleStates.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/RollbackCycleStates.java new file mode 100644 index 00000000000..2015dca32b3 --- /dev/null +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/RollbackCycleStates.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetsoftwareupdate.model; + +/** + * Possible rollback cycle states for the Exadata Fleet Update Cycle resource. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220528") +public enum RollbackCycleStates { + AbleToExecute("ABLE_TO_EXECUTE"), + InProgress("IN_PROGRESS"), + Failed("FAILED"), + NeedsAttention("NEEDS_ATTENTION"), + Succeeded("SUCCEEDED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RollbackCycleStates.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (RollbackCycleStates v : RollbackCycleStates.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + RollbackCycleStates(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static RollbackCycleStates create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'RollbackCycleStates', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/UpdateFsuActionDetails.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/UpdateFsuActionDetails.java index 43447f79f60..88c34765e1a 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/UpdateFsuActionDetails.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/UpdateFsuActionDetails.java @@ -23,6 +23,10 @@ defaultImpl = UpdateFsuActionDetails.class ) @com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = UpdateRollbackCycleActionDetails.class, + name = "ROLLBACK_MAINTENANCE_CYCLE" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = UpdateStageActionDetails.class, name = "STAGE" diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/UpdateFsuCycleDetails.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/UpdateFsuCycleDetails.java index 5461515af1d..4638b142ca1 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/UpdateFsuCycleDetails.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/UpdateFsuCycleDetails.java @@ -35,6 +35,7 @@ public class UpdateFsuCycleDetails extends com.oracle.bmc.http.internal.Explicit "displayName", "goalVersionDetails", "batchingStrategy", + "diagnosticsCollection", "freeformTags", "definedTags" }) @@ -42,12 +43,14 @@ protected UpdateFsuCycleDetails( String displayName, FsuGoalVersionDetails goalVersionDetails, UpdateBatchingStrategyDetails batchingStrategy, + DiagnosticsCollectionDetails diagnosticsCollection, java.util.Map freeformTags, java.util.Map> definedTags) { super(); this.displayName = displayName; this.goalVersionDetails = goalVersionDetails; this.batchingStrategy = batchingStrategy; + this.diagnosticsCollection = diagnosticsCollection; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -82,6 +85,13 @@ public UpdateBatchingStrategyDetails getBatchingStrategy() { return batchingStrategy; } + @com.fasterxml.jackson.annotation.JsonProperty("diagnosticsCollection") + private final DiagnosticsCollectionDetails diagnosticsCollection; + + public DiagnosticsCollectionDetails getDiagnosticsCollection() { + return diagnosticsCollection; + } + /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -135,6 +145,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("displayName=").append(String.valueOf(this.displayName)); sb.append(", goalVersionDetails=").append(String.valueOf(this.goalVersionDetails)); sb.append(", batchingStrategy=").append(String.valueOf(this.batchingStrategy)); + sb.append(", diagnosticsCollection=").append(String.valueOf(this.diagnosticsCollection)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -154,6 +165,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.goalVersionDetails, other.goalVersionDetails) && java.util.Objects.equals(this.batchingStrategy, other.batchingStrategy) + && java.util.Objects.equals(this.diagnosticsCollection, other.diagnosticsCollection) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -172,6 +184,11 @@ public int hashCode() { result = (result * PRIME) + (this.batchingStrategy == null ? 43 : this.batchingStrategy.hashCode()); + result = + (result * PRIME) + + (this.diagnosticsCollection == null + ? 43 + : this.diagnosticsCollection.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/UpdatePatchFsuCycle.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/UpdatePatchFsuCycle.java index 0475f1c79dd..4a90c73a04c 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/UpdatePatchFsuCycle.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/UpdatePatchFsuCycle.java @@ -55,6 +55,15 @@ public Builder batchingStrategy(UpdateBatchingStrategyDetails batchingStrategy) return this; } + @com.fasterxml.jackson.annotation.JsonProperty("diagnosticsCollection") + private DiagnosticsCollectionDetails diagnosticsCollection; + + public Builder diagnosticsCollection(DiagnosticsCollectionDetails diagnosticsCollection) { + this.diagnosticsCollection = diagnosticsCollection; + this.__explicitlySet__.add("diagnosticsCollection"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") private java.util.Map freeformTags; @@ -159,6 +168,7 @@ public UpdatePatchFsuCycle build() { this.displayName, this.goalVersionDetails, this.batchingStrategy, + this.diagnosticsCollection, this.freeformTags, this.definedTags, this.isIgnorePatches, @@ -182,6 +192,9 @@ public Builder copy(UpdatePatchFsuCycle model) { if (model.wasPropertyExplicitlySet("batchingStrategy")) { this.batchingStrategy(model.getBatchingStrategy()); } + if (model.wasPropertyExplicitlySet("diagnosticsCollection")) { + this.diagnosticsCollection(model.getDiagnosticsCollection()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -220,13 +233,20 @@ public UpdatePatchFsuCycle( String displayName, FsuGoalVersionDetails goalVersionDetails, UpdateBatchingStrategyDetails batchingStrategy, + DiagnosticsCollectionDetails diagnosticsCollection, java.util.Map freeformTags, java.util.Map> definedTags, Boolean isIgnorePatches, java.util.List isIgnoreMissingPatches, Integer maxDrainTimeoutInSeconds, Boolean isKeepPlacement) { - super(displayName, goalVersionDetails, batchingStrategy, freeformTags, definedTags); + super( + displayName, + goalVersionDetails, + batchingStrategy, + diagnosticsCollection, + freeformTags, + definedTags); this.isIgnorePatches = isIgnorePatches; this.isIgnoreMissingPatches = isIgnoreMissingPatches; this.maxDrainTimeoutInSeconds = maxDrainTimeoutInSeconds; diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/UpdateRollbackCycleActionDetails.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/UpdateRollbackCycleActionDetails.java new file mode 100644 index 00000000000..71e9a34b59b --- /dev/null +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/UpdateRollbackCycleActionDetails.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetsoftwareupdate.model; + +/** + * Rollback Cycle Exadata Fleet Update Action update details. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220528") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateRollbackCycleActionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateRollbackCycleActionDetails extends UpdateFsuActionDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateRollbackCycleActionDetails build() { + UpdateRollbackCycleActionDetails model = + new UpdateRollbackCycleActionDetails( + this.displayName, this.freeformTags, this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateRollbackCycleActionDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public UpdateRollbackCycleActionDetails( + String displayName, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(displayName, freeformTags, definedTags); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateRollbackCycleActionDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateRollbackCycleActionDetails)) { + return false; + } + + UpdateRollbackCycleActionDetails other = (UpdateRollbackCycleActionDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/VmClusterTargetSummary.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/VmClusterTargetSummary.java index e776ccd519c..62fc9afb7dd 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/VmClusterTargetSummary.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/model/VmClusterTargetSummary.java @@ -65,13 +65,35 @@ public Builder infrastructureId(String infrastructureId) { this.__explicitlySet__.add("infrastructureId"); return this; } + /** + * OCID of the Grid Infrastructure software image. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("softwareImageId") + private String softwareImageId; + + /** + * OCID of the Grid Infrastructure software image. + * + * @param softwareImageId the value to set + * @return this builder + **/ + public Builder softwareImageId(String softwareImageId) { + this.softwareImageId = softwareImageId; + this.__explicitlySet__.add("softwareImageId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public VmClusterTargetSummary build() { VmClusterTargetSummary model = - new VmClusterTargetSummary(this.id, this.compartmentId, this.infrastructureId); + new VmClusterTargetSummary( + this.id, + this.compartmentId, + this.infrastructureId, + this.softwareImageId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -89,6 +111,9 @@ public Builder copy(VmClusterTargetSummary model) { if (model.wasPropertyExplicitlySet("infrastructureId")) { this.infrastructureId(model.getInfrastructureId()); } + if (model.wasPropertyExplicitlySet("softwareImageId")) { + this.softwareImageId(model.getSoftwareImageId()); + } return this; } } @@ -105,9 +130,11 @@ public Builder toBuilder() { } @Deprecated - public VmClusterTargetSummary(String id, String compartmentId, String infrastructureId) { + public VmClusterTargetSummary( + String id, String compartmentId, String infrastructureId, String softwareImageId) { super(id, compartmentId); this.infrastructureId = infrastructureId; + this.softwareImageId = softwareImageId; } /** @@ -126,6 +153,22 @@ public String getInfrastructureId() { return infrastructureId; } + /** + * OCID of the Grid Infrastructure software image. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("softwareImageId") + private final String softwareImageId; + + /** + * OCID of the Grid Infrastructure software image. + * + * @return the value + **/ + public String getSoftwareImageId() { + return softwareImageId; + } + @Override public String toString() { return this.toString(true); @@ -141,6 +184,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("VmClusterTargetSummary("); sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", infrastructureId=").append(String.valueOf(this.infrastructureId)); + sb.append(", softwareImageId=").append(String.valueOf(this.softwareImageId)); sb.append(")"); return sb.toString(); } @@ -156,6 +200,7 @@ public boolean equals(Object o) { VmClusterTargetSummary other = (VmClusterTargetSummary) o; return java.util.Objects.equals(this.infrastructureId, other.infrastructureId) + && java.util.Objects.equals(this.softwareImageId, other.softwareImageId) && super.equals(other); } @@ -166,6 +211,9 @@ public int hashCode() { result = (result * PRIME) + (this.infrastructureId == null ? 43 : this.infrastructureId.hashCode()); + result = + (result * PRIME) + + (this.softwareImageId == null ? 43 : this.softwareImageId.hashCode()); return result; } } diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/requests/CreateFsuCycleRequest.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/requests/CreateFsuCycleRequest.java index ad6ca192508..bc7e1a3dc34 100644 --- a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/requests/CreateFsuCycleRequest.java +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/requests/CreateFsuCycleRequest.java @@ -14,13 +14,15 @@ public class CreateFsuCycleRequest com.oracle.bmc.fleetsoftwareupdate.model.CreateFsuCycleDetails> { /** - * Details for the new Exadata Fleet Update Cycle. + * Details for the new Exadata Fleet Update Maintenance Cycle. + * Targets can only exist in one active Fleet Software Update Maintenance Cycle. * */ private com.oracle.bmc.fleetsoftwareupdate.model.CreateFsuCycleDetails createFsuCycleDetails; /** - * Details for the new Exadata Fleet Update Cycle. + * Details for the new Exadata Fleet Update Maintenance Cycle. + * Targets can only exist in one active Fleet Software Update Maintenance Cycle. * */ public com.oracle.bmc.fleetsoftwareupdate.model.CreateFsuCycleDetails @@ -81,14 +83,16 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * Details for the new Exadata Fleet Update Cycle. + * Details for the new Exadata Fleet Update Maintenance Cycle. + * Targets can only exist in one active Fleet Software Update Maintenance Cycle. * */ private com.oracle.bmc.fleetsoftwareupdate.model.CreateFsuCycleDetails createFsuCycleDetails = null; /** - * Details for the new Exadata Fleet Update Cycle. + * Details for the new Exadata Fleet Update Maintenance Cycle. + * Targets can only exist in one active Fleet Software Update Maintenance Cycle. * * @param createFsuCycleDetails the value to set * @return this builder instance diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/requests/DeleteFsuCollectionTargetRequest.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/requests/DeleteFsuCollectionTargetRequest.java new file mode 100644 index 00000000000..3226b004e35 --- /dev/null +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/requests/DeleteFsuCollectionTargetRequest.java @@ -0,0 +1,294 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetsoftwareupdate.requests; + +import com.oracle.bmc.fleetsoftwareupdate.model.*; +/** + * Example: Click here to see how to use DeleteFsuCollectionTargetRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220528") +public class DeleteFsuCollectionTargetRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Exadata Fleet Update Collection identifier. + * + */ + private String fsuCollectionId; + + /** + * Unique Exadata Fleet Update Collection identifier. + * + */ + public String getFsuCollectionId() { + return fsuCollectionId; + } + /** + * Target resource OCID. + * + */ + private String targetId; + + /** + * Target resource OCID. + * + */ + public String getTargetId() { + return targetId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + * + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteFsuCollectionTargetRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Exadata Fleet Update Collection identifier. + * + */ + private String fsuCollectionId = null; + + /** + * Unique Exadata Fleet Update Collection identifier. + * + * @param fsuCollectionId the value to set + * @return this builder instance + */ + public Builder fsuCollectionId(String fsuCollectionId) { + this.fsuCollectionId = fsuCollectionId; + return this; + } + + /** + * Target resource OCID. + * + */ + private String targetId = null; + + /** + * Target resource OCID. + * + * @param targetId the value to set + * @return this builder instance + */ + public Builder targetId(String targetId) { + this.targetId = targetId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + * + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteFsuCollectionTargetRequest o) { + fsuCollectionId(o.getFsuCollectionId()); + targetId(o.getTargetId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteFsuCollectionTargetRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteFsuCollectionTargetRequest + */ + public DeleteFsuCollectionTargetRequest build() { + DeleteFsuCollectionTargetRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteFsuCollectionTargetRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteFsuCollectionTargetRequest + */ + public DeleteFsuCollectionTargetRequest buildWithoutInvocationCallback() { + DeleteFsuCollectionTargetRequest request = new DeleteFsuCollectionTargetRequest(); + request.fsuCollectionId = fsuCollectionId; + request.targetId = targetId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteFsuCollectionTargetRequest(fsuCollectionId, targetId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fsuCollectionId(fsuCollectionId) + .targetId(targetId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fsuCollectionId=").append(String.valueOf(this.fsuCollectionId)); + sb.append(",targetId=").append(String.valueOf(this.targetId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteFsuCollectionTargetRequest)) { + return false; + } + + DeleteFsuCollectionTargetRequest other = (DeleteFsuCollectionTargetRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fsuCollectionId, other.fsuCollectionId) + && java.util.Objects.equals(this.targetId, other.targetId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.fsuCollectionId == null ? 43 : this.fsuCollectionId.hashCode()); + result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/requests/GetFsuCollectionTargetRequest.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/requests/GetFsuCollectionTargetRequest.java new file mode 100644 index 00000000000..60cd05b0e00 --- /dev/null +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/requests/GetFsuCollectionTargetRequest.java @@ -0,0 +1,242 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetsoftwareupdate.requests; + +import com.oracle.bmc.fleetsoftwareupdate.model.*; +/** + * Example: Click here to see how to use GetFsuCollectionTargetRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220528") +public class GetFsuCollectionTargetRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Exadata Fleet Update Collection identifier. + * + */ + private String fsuCollectionId; + + /** + * Unique Exadata Fleet Update Collection identifier. + * + */ + public String getFsuCollectionId() { + return fsuCollectionId; + } + /** + * Target resource OCID. + * + */ + private String targetId; + + /** + * Target resource OCID. + * + */ + public String getTargetId() { + return targetId; + } + /** + * The client request ID for tracing. + * + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetFsuCollectionTargetRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Exadata Fleet Update Collection identifier. + * + */ + private String fsuCollectionId = null; + + /** + * Unique Exadata Fleet Update Collection identifier. + * + * @param fsuCollectionId the value to set + * @return this builder instance + */ + public Builder fsuCollectionId(String fsuCollectionId) { + this.fsuCollectionId = fsuCollectionId; + return this; + } + + /** + * Target resource OCID. + * + */ + private String targetId = null; + + /** + * Target resource OCID. + * + * @param targetId the value to set + * @return this builder instance + */ + public Builder targetId(String targetId) { + this.targetId = targetId; + return this; + } + + /** + * The client request ID for tracing. + * + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetFsuCollectionTargetRequest o) { + fsuCollectionId(o.getFsuCollectionId()); + targetId(o.getTargetId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetFsuCollectionTargetRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetFsuCollectionTargetRequest + */ + public GetFsuCollectionTargetRequest build() { + GetFsuCollectionTargetRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetFsuCollectionTargetRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetFsuCollectionTargetRequest + */ + public GetFsuCollectionTargetRequest buildWithoutInvocationCallback() { + GetFsuCollectionTargetRequest request = new GetFsuCollectionTargetRequest(); + request.fsuCollectionId = fsuCollectionId; + request.targetId = targetId; + request.opcRequestId = opcRequestId; + return request; + // new GetFsuCollectionTargetRequest(fsuCollectionId, targetId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fsuCollectionId(fsuCollectionId) + .targetId(targetId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fsuCollectionId=").append(String.valueOf(this.fsuCollectionId)); + sb.append(",targetId=").append(String.valueOf(this.targetId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetFsuCollectionTargetRequest)) { + return false; + } + + GetFsuCollectionTargetRequest other = (GetFsuCollectionTargetRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fsuCollectionId, other.fsuCollectionId) + && java.util.Objects.equals(this.targetId, other.targetId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.fsuCollectionId == null ? 43 : this.fsuCollectionId.hashCode()); + result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/responses/DeleteFsuCollectionTargetResponse.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/responses/DeleteFsuCollectionTargetResponse.java new file mode 100644 index 00000000000..eb7f48bf18e --- /dev/null +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/responses/DeleteFsuCollectionTargetResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetsoftwareupdate.responses; + +import com.oracle.bmc.fleetsoftwareupdate.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220528") +public class DeleteFsuCollectionTargetResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteFsuCollectionTargetResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteFsuCollectionTargetResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteFsuCollectionTargetResponse build() { + return new DeleteFsuCollectionTargetResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteFsuCollectionTargetResponse)) { + return false; + } + + DeleteFsuCollectionTargetResponse other = (DeleteFsuCollectionTargetResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/responses/GetFsuCollectionTargetResponse.java b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/responses/GetFsuCollectionTargetResponse.java new file mode 100644 index 00000000000..5363efb5dd0 --- /dev/null +++ b/bmc-fleetsoftwareupdate/src/main/java/com/oracle/bmc/fleetsoftwareupdate/responses/GetFsuCollectionTargetResponse.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.fleetsoftwareupdate.responses; + +import com.oracle.bmc.fleetsoftwareupdate.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220528") +public class GetFsuCollectionTargetResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned FsuCollectionTarget instance. + */ + private com.oracle.bmc.fleetsoftwareupdate.model.FsuCollectionTarget fsuCollectionTarget; + + /** + * The returned FsuCollectionTarget instance. + * @return the value + */ + public com.oracle.bmc.fleetsoftwareupdate.model.FsuCollectionTarget getFsuCollectionTarget() { + return fsuCollectionTarget; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "fsuCollectionTarget" + }) + private GetFsuCollectionTargetResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.fleetsoftwareupdate.model.FsuCollectionTarget fsuCollectionTarget) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.fsuCollectionTarget = fsuCollectionTarget; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned FsuCollectionTarget instance. + */ + private com.oracle.bmc.fleetsoftwareupdate.model.FsuCollectionTarget fsuCollectionTarget; + + /** + * The returned FsuCollectionTarget instance. + * @param fsuCollectionTarget the value to set + * @return this builder + */ + public Builder fsuCollectionTarget( + com.oracle.bmc.fleetsoftwareupdate.model.FsuCollectionTarget fsuCollectionTarget) { + this.fsuCollectionTarget = fsuCollectionTarget; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetFsuCollectionTargetResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + fsuCollectionTarget(o.getFsuCollectionTarget()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetFsuCollectionTargetResponse build() { + return new GetFsuCollectionTargetResponse( + __httpStatusCode__, headers, etag, opcRequestId, fsuCollectionTarget); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",fsuCollectionTarget=").append(String.valueOf(fsuCollectionTarget)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetFsuCollectionTargetResponse)) { + return false; + } + + GetFsuCollectionTargetResponse other = (GetFsuCollectionTargetResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.fsuCollectionTarget, other.fsuCollectionTarget); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.fsuCollectionTarget == null + ? 43 + : this.fsuCollectionTarget.hashCode()); + return result; + } +} diff --git a/bmc-full/pom.xml b/bmc-full/pom.xml index f8a5a40f296..54c857aad96 100644 --- a/bmc-full/pom.xml +++ b/bmc-full/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-full @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-bom - 2.73.0 + 2.79.0 pom import @@ -595,5 +595,29 @@ com.oracle.oci.sdk oci-java-sdk-demandsignal + + com.oracle.oci.sdk + oci-java-sdk-fleetappsmanagement + + + com.oracle.oci.sdk + oci-java-sdk-delegateaccesscontrol + + + com.oracle.oci.sdk + oci-java-sdk-generativeaiagent + + + com.oracle.oci.sdk + oci-java-sdk-generativeaiagentruntime + + + com.oracle.oci.sdk + oci-java-sdk-securityattribute + + + com.oracle.oci.sdk + oci-java-sdk-zpr + \ No newline at end of file diff --git a/bmc-functions/pom.xml b/bmc-functions/pom.xml index fc0eb544d7d..e58a77e1179 100644 --- a/bmc-functions/pom.xml +++ b/bmc-functions/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-functions @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-fusionapps/pom.xml b/bmc-fusionapps/pom.xml index 92eca9fef43..240a5595ea4 100644 --- a/bmc-fusionapps/pom.xml +++ b/bmc-fusionapps/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-fusionapps @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/FusionApplications.java b/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/FusionApplications.java index a5665c47197..0794d2c6227 100644 --- a/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/FusionApplications.java +++ b/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/FusionApplications.java @@ -527,7 +527,7 @@ ListTimeAvailableForRefreshesResponse listTimeAvailableForRefreshes( ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request); /** - * Resets the password of the Fusion Environment Administrator. + * Reset FusionEnvironment admin password. This API will be deprecated on Mon, 15 Jan 2024 01:00:00 GMT. Users can reset password themselves, FAaaS will no longer provide an API for this. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. diff --git a/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/FusionApplicationsAsync.java b/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/FusionApplicationsAsync.java index 0ba66c35d8b..81578956c7e 100644 --- a/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/FusionApplicationsAsync.java +++ b/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/FusionApplicationsAsync.java @@ -671,7 +671,7 @@ java.util.concurrent.Future listWorkRequests( handler); /** - * Resets the password of the Fusion Environment Administrator. + * Reset FusionEnvironment admin password. This API will be deprecated on Mon, 15 Jan 2024 01:00:00 GMT. Users can reset password themselves, FAaaS will no longer provide an API for this. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. diff --git a/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/model/AllowRule.java b/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/model/AllowRule.java index 358efd81554..bcf29c44e29 100644 --- a/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/model/AllowRule.java +++ b/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/model/AllowRule.java @@ -14,7 +14,7 @@ * * You can specify this rule only with the following {@code RuleCondition} combinations: * * {@code SOURCE_IP_ADDRESS} * * {@code SOURCE_VCN_ID} - * * {@code SOURCE_VCN_ID", "SOURCE_VCN_IP_ADDRESS} + * * {@code SOURCE_VCN_ID}, {@code SOURCE_VCN_IP_ADDRESS} * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields diff --git a/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/model/CreateRefreshActivityDetails.java b/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/model/CreateRefreshActivityDetails.java index e2eee2543a6..f2335fe9184 100644 --- a/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/model/CreateRefreshActivityDetails.java +++ b/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/model/CreateRefreshActivityDetails.java @@ -22,11 +22,18 @@ public final class CreateRefreshActivityDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"sourceFusionEnvironmentId", "timeScheduledStart"}) + @java.beans.ConstructorProperties({ + "sourceFusionEnvironmentId", + "isDataMaskingOpted", + "timeScheduledStart" + }) public CreateRefreshActivityDetails( - String sourceFusionEnvironmentId, java.util.Date timeScheduledStart) { + String sourceFusionEnvironmentId, + Boolean isDataMaskingOpted, + java.util.Date timeScheduledStart) { super(); this.sourceFusionEnvironmentId = sourceFusionEnvironmentId; + this.isDataMaskingOpted = isDataMaskingOpted; this.timeScheduledStart = timeScheduledStart; } @@ -50,6 +57,22 @@ public Builder sourceFusionEnvironmentId(String sourceFusionEnvironmentId) { this.__explicitlySet__.add("sourceFusionEnvironmentId"); return this; } + /** + * Represents if the customer opted for Data Masking or not during refreshActivity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDataMaskingOpted") + private Boolean isDataMaskingOpted; + + /** + * Represents if the customer opted for Data Masking or not during refreshActivity. + * @param isDataMaskingOpted the value to set + * @return this builder + **/ + public Builder isDataMaskingOpted(Boolean isDataMaskingOpted) { + this.isDataMaskingOpted = isDataMaskingOpted; + this.__explicitlySet__.add("isDataMaskingOpted"); + return this; + } /** * Current time the refresh activity is scheduled to start. An RFC3339 formatted datetime string. **/ @@ -73,7 +96,9 @@ public Builder timeScheduledStart(java.util.Date timeScheduledStart) { public CreateRefreshActivityDetails build() { CreateRefreshActivityDetails model = new CreateRefreshActivityDetails( - this.sourceFusionEnvironmentId, this.timeScheduledStart); + this.sourceFusionEnvironmentId, + this.isDataMaskingOpted, + this.timeScheduledStart); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -85,6 +110,9 @@ public Builder copy(CreateRefreshActivityDetails model) { if (model.wasPropertyExplicitlySet("sourceFusionEnvironmentId")) { this.sourceFusionEnvironmentId(model.getSourceFusionEnvironmentId()); } + if (model.wasPropertyExplicitlySet("isDataMaskingOpted")) { + this.isDataMaskingOpted(model.getIsDataMaskingOpted()); + } if (model.wasPropertyExplicitlySet("timeScheduledStart")) { this.timeScheduledStart(model.getTimeScheduledStart()); } @@ -119,6 +147,20 @@ public String getSourceFusionEnvironmentId() { return sourceFusionEnvironmentId; } + /** + * Represents if the customer opted for Data Masking or not during refreshActivity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDataMaskingOpted") + private final Boolean isDataMaskingOpted; + + /** + * Represents if the customer opted for Data Masking or not during refreshActivity. + * @return the value + **/ + public Boolean getIsDataMaskingOpted() { + return isDataMaskingOpted; + } + /** * Current time the refresh activity is scheduled to start. An RFC3339 formatted datetime string. **/ @@ -149,6 +191,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("sourceFusionEnvironmentId=") .append(String.valueOf(this.sourceFusionEnvironmentId)); + sb.append(", isDataMaskingOpted=").append(String.valueOf(this.isDataMaskingOpted)); sb.append(", timeScheduledStart=").append(String.valueOf(this.timeScheduledStart)); sb.append(")"); return sb.toString(); @@ -166,6 +209,7 @@ public boolean equals(Object o) { CreateRefreshActivityDetails other = (CreateRefreshActivityDetails) o; return java.util.Objects.equals( this.sourceFusionEnvironmentId, other.sourceFusionEnvironmentId) + && java.util.Objects.equals(this.isDataMaskingOpted, other.isDataMaskingOpted) && java.util.Objects.equals(this.timeScheduledStart, other.timeScheduledStart) && super.equals(other); } @@ -179,6 +223,11 @@ public int hashCode() { + (this.sourceFusionEnvironmentId == null ? 43 : this.sourceFusionEnvironmentId.hashCode()); + result = + (result * PRIME) + + (this.isDataMaskingOpted == null + ? 43 + : this.isDataMaskingOpted.hashCode()); result = (result * PRIME) + (this.timeScheduledStart == null diff --git a/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/model/FusionEnvironmentFamily.java b/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/model/FusionEnvironmentFamily.java index a2da6264b6e..45a21d2e316 100644 --- a/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/model/FusionEnvironmentFamily.java +++ b/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/model/FusionEnvironmentFamily.java @@ -34,7 +34,8 @@ public final class FusionEnvironmentFamily "lifecycleDetails", "systemName", "freeformTags", - "definedTags" + "definedTags", + "timeLastSubscriptionUpdate" }) public FusionEnvironmentFamily( String id, @@ -48,7 +49,8 @@ public FusionEnvironmentFamily( String lifecycleDetails, String systemName, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Date timeLastSubscriptionUpdate) { super(); this.id = id; this.displayName = displayName; @@ -62,6 +64,7 @@ public FusionEnvironmentFamily( this.systemName = systemName; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.timeLastSubscriptionUpdate = timeLastSubscriptionUpdate; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -260,6 +263,22 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Indicates when the family received the last subscription update + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLastSubscriptionUpdate") + private java.util.Date timeLastSubscriptionUpdate; + + /** + * Indicates when the family received the last subscription update + * @param timeLastSubscriptionUpdate the value to set + * @return this builder + **/ + public Builder timeLastSubscriptionUpdate(java.util.Date timeLastSubscriptionUpdate) { + this.timeLastSubscriptionUpdate = timeLastSubscriptionUpdate; + this.__explicitlySet__.add("timeLastSubscriptionUpdate"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -278,7 +297,8 @@ public FusionEnvironmentFamily build() { this.lifecycleDetails, this.systemName, this.freeformTags, - this.definedTags); + this.definedTags, + this.timeLastSubscriptionUpdate); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -323,6 +343,9 @@ public Builder copy(FusionEnvironmentFamily model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("timeLastSubscriptionUpdate")) { + this.timeLastSubscriptionUpdate(model.getTimeLastSubscriptionUpdate()); + } return this; } } @@ -559,6 +582,20 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Indicates when the family received the last subscription update + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLastSubscriptionUpdate") + private final java.util.Date timeLastSubscriptionUpdate; + + /** + * Indicates when the family received the last subscription update + * @return the value + **/ + public java.util.Date getTimeLastSubscriptionUpdate() { + return timeLastSubscriptionUpdate; + } + @Override public String toString() { return this.toString(true); @@ -587,6 +624,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", systemName=").append(String.valueOf(this.systemName)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", timeLastSubscriptionUpdate=") + .append(String.valueOf(this.timeLastSubscriptionUpdate)); sb.append(")"); return sb.toString(); } @@ -615,6 +654,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.systemName, other.systemName) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals( + this.timeLastSubscriptionUpdate, other.timeLastSubscriptionUpdate) && super.equals(other); } @@ -650,6 +691,11 @@ public int hashCode() { result = (result * PRIME) + (this.systemName == null ? 43 : this.systemName.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.timeLastSubscriptionUpdate == null + ? 43 + : this.timeLastSubscriptionUpdate.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/model/RefreshActivity.java b/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/model/RefreshActivity.java index 248fd632d71..406d41dd60b 100644 --- a/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/model/RefreshActivity.java +++ b/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/model/RefreshActivity.java @@ -31,6 +31,7 @@ public final class RefreshActivity extends com.oracle.bmc.http.internal.Explicit "timeFinished", "timeAccepted", "timeUpdated", + "isDataMaskingOpted", "refreshIssueDetailsList", "lifecycleDetails" }) @@ -46,6 +47,7 @@ public RefreshActivity( java.util.Date timeFinished, java.util.Date timeAccepted, java.util.Date timeUpdated, + Boolean isDataMaskingOpted, java.util.List refreshIssueDetailsList, LifecycleDetails lifecycleDetails) { super(); @@ -60,6 +62,7 @@ public RefreshActivity( this.timeFinished = timeFinished; this.timeAccepted = timeAccepted; this.timeUpdated = timeUpdated; + this.isDataMaskingOpted = isDataMaskingOpted; this.refreshIssueDetailsList = refreshIssueDetailsList; this.lifecycleDetails = lifecycleDetails; } @@ -242,6 +245,22 @@ public Builder timeUpdated(java.util.Date timeUpdated) { this.__explicitlySet__.add("timeUpdated"); return this; } + /** + * Represents if the customer opted for Data Masking or not during refreshActivity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDataMaskingOpted") + private Boolean isDataMaskingOpted; + + /** + * Represents if the customer opted for Data Masking or not during refreshActivity. + * @param isDataMaskingOpted the value to set + * @return this builder + **/ + public Builder isDataMaskingOpted(Boolean isDataMaskingOpted) { + this.isDataMaskingOpted = isDataMaskingOpted; + this.__explicitlySet__.add("isDataMaskingOpted"); + return this; + } /** * Details of refresh investigation information, each item represents a different issue. **/ @@ -293,6 +312,7 @@ public RefreshActivity build() { this.timeFinished, this.timeAccepted, this.timeUpdated, + this.isDataMaskingOpted, this.refreshIssueDetailsList, this.lifecycleDetails); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -336,6 +356,9 @@ public Builder copy(RefreshActivity model) { if (model.wasPropertyExplicitlySet("timeUpdated")) { this.timeUpdated(model.getTimeUpdated()); } + if (model.wasPropertyExplicitlySet("isDataMaskingOpted")) { + this.isDataMaskingOpted(model.getIsDataMaskingOpted()); + } if (model.wasPropertyExplicitlySet("refreshIssueDetailsList")) { this.refreshIssueDetailsList(model.getRefreshIssueDetailsList()); } @@ -611,6 +634,20 @@ public java.util.Date getTimeUpdated() { return timeUpdated; } + /** + * Represents if the customer opted for Data Masking or not during refreshActivity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDataMaskingOpted") + private final Boolean isDataMaskingOpted; + + /** + * Represents if the customer opted for Data Masking or not during refreshActivity. + * @return the value + **/ + public Boolean getIsDataMaskingOpted() { + return isDataMaskingOpted; + } + /** * Details of refresh investigation information, each item represents a different issue. **/ @@ -716,6 +753,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); sb.append(", timeAccepted=").append(String.valueOf(this.timeAccepted)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", isDataMaskingOpted=").append(String.valueOf(this.isDataMaskingOpted)); sb.append(", refreshIssueDetailsList=") .append(String.valueOf(this.refreshIssueDetailsList)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); @@ -746,6 +784,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeFinished, other.timeFinished) && java.util.Objects.equals(this.timeAccepted, other.timeAccepted) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.isDataMaskingOpted, other.isDataMaskingOpted) && java.util.Objects.equals( this.refreshIssueDetailsList, other.refreshIssueDetailsList) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) @@ -789,6 +828,11 @@ public int hashCode() { result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); result = (result * PRIME) + (this.timeAccepted == null ? 43 : this.timeAccepted.hashCode()); result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.isDataMaskingOpted == null + ? 43 + : this.isDataMaskingOpted.hashCode()); result = (result * PRIME) + (this.refreshIssueDetailsList == null diff --git a/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/model/RefreshActivitySummary.java b/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/model/RefreshActivitySummary.java index 26ee4838a65..c2480001b16 100644 --- a/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/model/RefreshActivitySummary.java +++ b/bmc-fusionapps/src/main/java/com/oracle/bmc/fusionapps/model/RefreshActivitySummary.java @@ -34,6 +34,7 @@ public final class RefreshActivitySummary "serviceAvailability", "timeAccepted", "timeUpdated", + "isDataMaskingOpted", "lifecycleDetails", "refreshIssueDetailsList" }) @@ -49,6 +50,7 @@ public RefreshActivitySummary( RefreshActivity.ServiceAvailability serviceAvailability, java.util.Date timeAccepted, java.util.Date timeUpdated, + Boolean isDataMaskingOpted, RefreshActivity.LifecycleDetails lifecycleDetails, java.util.List refreshIssueDetailsList) { super(); @@ -63,6 +65,7 @@ public RefreshActivitySummary( this.serviceAvailability = serviceAvailability; this.timeAccepted = timeAccepted; this.timeUpdated = timeUpdated; + this.isDataMaskingOpted = isDataMaskingOpted; this.lifecycleDetails = lifecycleDetails; this.refreshIssueDetailsList = refreshIssueDetailsList; } @@ -246,6 +249,22 @@ public Builder timeUpdated(java.util.Date timeUpdated) { this.__explicitlySet__.add("timeUpdated"); return this; } + /** + * Represents if the customer opted for Data Masking or not during refreshActivity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDataMaskingOpted") + private Boolean isDataMaskingOpted; + + /** + * Represents if the customer opted for Data Masking or not during refreshActivity. + * @param isDataMaskingOpted the value to set + * @return this builder + **/ + public Builder isDataMaskingOpted(Boolean isDataMaskingOpted) { + this.isDataMaskingOpted = isDataMaskingOpted; + this.__explicitlySet__.add("isDataMaskingOpted"); + return this; + } /** * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. **/ @@ -297,6 +316,7 @@ public RefreshActivitySummary build() { this.serviceAvailability, this.timeAccepted, this.timeUpdated, + this.isDataMaskingOpted, this.lifecycleDetails, this.refreshIssueDetailsList); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -340,6 +360,9 @@ public Builder copy(RefreshActivitySummary model) { if (model.wasPropertyExplicitlySet("timeUpdated")) { this.timeUpdated(model.getTimeUpdated()); } + if (model.wasPropertyExplicitlySet("isDataMaskingOpted")) { + this.isDataMaskingOpted(model.getIsDataMaskingOpted()); + } if (model.wasPropertyExplicitlySet("lifecycleDetails")) { this.lifecycleDetails(model.getLifecycleDetails()); } @@ -515,6 +538,20 @@ public java.util.Date getTimeUpdated() { return timeUpdated; } + /** + * Represents if the customer opted for Data Masking or not during refreshActivity. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDataMaskingOpted") + private final Boolean isDataMaskingOpted; + + /** + * Represents if the customer opted for Data Masking or not during refreshActivity. + * @return the value + **/ + public Boolean getIsDataMaskingOpted() { + return isDataMaskingOpted; + } + /** * A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. **/ @@ -569,6 +606,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", serviceAvailability=").append(String.valueOf(this.serviceAvailability)); sb.append(", timeAccepted=").append(String.valueOf(this.timeAccepted)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", isDataMaskingOpted=").append(String.valueOf(this.isDataMaskingOpted)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", refreshIssueDetailsList=") .append(String.valueOf(this.refreshIssueDetailsList)); @@ -599,6 +637,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.serviceAvailability, other.serviceAvailability) && java.util.Objects.equals(this.timeAccepted, other.timeAccepted) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.isDataMaskingOpted, other.isDataMaskingOpted) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals( this.refreshIssueDetailsList, other.refreshIssueDetailsList) @@ -642,6 +681,11 @@ public int hashCode() { : this.serviceAvailability.hashCode()); result = (result * PRIME) + (this.timeAccepted == null ? 43 : this.timeAccepted.hashCode()); result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.isDataMaskingOpted == null + ? 43 + : this.isDataMaskingOpted.hashCode()); result = (result * PRIME) + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); diff --git a/bmc-generativeai/pom.xml b/bmc-generativeai/pom.xml index dd7e1767d09..e13ee0964db 100644 --- a/bmc-generativeai/pom.xml +++ b/bmc-generativeai/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-generativeai @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/GenerativeAi.java b/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/GenerativeAi.java index a66cef4dfa6..9560eb78c21 100644 --- a/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/GenerativeAi.java +++ b/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/GenerativeAi.java @@ -12,7 +12,7 @@ * * Use the Generative AI service management API to create and manage {@link DedicatedAiCluster}, {@link Endpoint}, {@link Model}, and {@link WorkRequest} in the Generative AI service. For example, create a custom model by fine-tuning an out-of-the-box model using your own data, on a fine-tuning dedicated AI cluster. Then, create a hosting dedicated AI cluster with an endpoint to host your custom model. * - * To access your custom model endpoints, or to try the out-of-the-box models to generate text, summarize, and create text embeddings see the [Generative AI Inference API](https://docs.cloud.oracle.com/#/en/generative-ai-inference/latest/). + * To access your custom model endpoints, or to try the out-of-the-box models to generate text, summarize, and create text embeddings see the [Generative AI Inference API](https://docs.cloud.oracle.com/iaas/api/#/en/generative-ai-inference/latest/). * * To learn more about the service, see the [Generative AI documentation](https://docs.cloud.oracle.com/iaas/Content/generative-ai/home.htm). * diff --git a/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/GenerativeAiAsync.java b/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/GenerativeAiAsync.java index ceb3fef88c6..7ace5cb8135 100644 --- a/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/GenerativeAiAsync.java +++ b/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/GenerativeAiAsync.java @@ -12,7 +12,7 @@ * * Use the Generative AI service management API to create and manage {@link DedicatedAiCluster}, {@link Endpoint}, {@link Model}, and {@link WorkRequest} in the Generative AI service. For example, create a custom model by fine-tuning an out-of-the-box model using your own data, on a fine-tuning dedicated AI cluster. Then, create a hosting dedicated AI cluster with an endpoint to host your custom model. * - * To access your custom model endpoints, or to try the out-of-the-box models to generate text, summarize, and create text embeddings see the [Generative AI Inference API](https://docs.cloud.oracle.com/#/en/generative-ai-inference/latest/). + * To access your custom model endpoints, or to try the out-of-the-box models to generate text, summarize, and create text embeddings see the [Generative AI Inference API](https://docs.cloud.oracle.com/iaas/api/#/en/generative-ai-inference/latest/). * * To learn more about the service, see the [Generative AI documentation](https://docs.cloud.oracle.com/iaas/Content/generative-ai/home.htm). * diff --git a/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/CreateDedicatedAiClusterDetails.java b/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/CreateDedicatedAiClusterDetails.java index 1af049f1acd..4fb8fcfa27b 100644 --- a/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/CreateDedicatedAiClusterDetails.java +++ b/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/CreateDedicatedAiClusterDetails.java @@ -152,10 +152,14 @@ public Builder unitCount(Integer unitCount) { * - LARGE_COHERE_V2 * - SMALL_COHERE * - SMALL_COHERE_V2 + * - SMALL_COHERE_4 * - EMBED_COHERE * - LLAMA2_70 * - LARGE_GENERIC * - LARGE_COHERE_V2_2 + * - LARGE_GENERIC_4 + * - SMALL_GENERIC_V2 + * - LARGE_GENERIC_2 * **/ @com.fasterxml.jackson.annotation.JsonProperty("unitShape") @@ -169,10 +173,14 @@ public Builder unitCount(Integer unitCount) { * - LARGE_COHERE_V2 * - SMALL_COHERE * - SMALL_COHERE_V2 + * - SMALL_COHERE_4 * - EMBED_COHERE * - LLAMA2_70 * - LARGE_GENERIC * - LARGE_COHERE_V2_2 + * - LARGE_GENERIC_4 + * - SMALL_GENERIC_V2 + * - LARGE_GENERIC_2 * * @param unitShape the value to set * @return this builder @@ -381,10 +389,14 @@ public Integer getUnitCount() { * - LARGE_COHERE_V2 * - SMALL_COHERE * - SMALL_COHERE_V2 + * - SMALL_COHERE_4 * - EMBED_COHERE * - LLAMA2_70 * - LARGE_GENERIC * - LARGE_COHERE_V2_2 + * - LARGE_GENERIC_4 + * - SMALL_GENERIC_V2 + * - LARGE_GENERIC_2 * **/ @com.fasterxml.jackson.annotation.JsonProperty("unitShape") @@ -398,10 +410,14 @@ public Integer getUnitCount() { * - LARGE_COHERE_V2 * - SMALL_COHERE * - SMALL_COHERE_V2 + * - SMALL_COHERE_4 * - EMBED_COHERE * - LLAMA2_70 * - LARGE_GENERIC * - LARGE_COHERE_V2_2 + * - LARGE_GENERIC_4 + * - SMALL_GENERIC_V2 + * - LARGE_GENERIC_2 * * @return the value **/ diff --git a/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/CreateEndpointDetails.java b/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/CreateEndpointDetails.java index 8a88646ccc2..dec4cbb479a 100644 --- a/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/CreateEndpointDetails.java +++ b/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/CreateEndpointDetails.java @@ -103,13 +103,13 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * The ID of the model that's used to create this endpoint. + * The OCID of the model that's used to create this endpoint. **/ @com.fasterxml.jackson.annotation.JsonProperty("modelId") private String modelId; /** - * The ID of the model that's used to create this endpoint. + * The OCID of the model that's used to create this endpoint. * @param modelId the value to set * @return this builder **/ @@ -297,13 +297,13 @@ public String getCompartmentId() { } /** - * The ID of the model that's used to create this endpoint. + * The OCID of the model that's used to create this endpoint. **/ @com.fasterxml.jackson.annotation.JsonProperty("modelId") private final String modelId; /** - * The ID of the model that's used to create this endpoint. + * The OCID of the model that's used to create this endpoint. * @return the value **/ public String getModelId() { diff --git a/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/DedicatedAiCluster.java b/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/DedicatedAiCluster.java index 465b7fd4521..97f8553a421 100644 --- a/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/DedicatedAiCluster.java +++ b/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/DedicatedAiCluster.java @@ -8,7 +8,7 @@ * Dedicated AI clusters are compute resources that you can use for fine-tuning custom models or for hosting endpoints for custom models. The clusters are dedicated to your models and not shared with users in other tenancies. *

* To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator who gives OCI resource access to users. See - * [Getting Started with Policies](https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm) and [Getting Access to Generative AI Resouces](https://docs.cloud.oracle.com/iaas/Content/generative-ai/iam-policies.htm). + * [Getting Started with Policies](https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm) and [Getting Access to Generative AI Resources](https://docs.cloud.oracle.com/iaas/Content/generative-ai/iam-policies.htm). * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -687,10 +687,15 @@ public enum UnitShape { LargeCohereV2("LARGE_COHERE_V2"), SmallCohere("SMALL_COHERE"), SmallCohereV2("SMALL_COHERE_V2"), + SmallCohere4("SMALL_COHERE_4"), EmbedCohere("EMBED_COHERE"), Llama270("LLAMA2_70"), LargeGeneric("LARGE_GENERIC"), LargeCohereV22("LARGE_COHERE_V2_2"), + LargeGeneric4("LARGE_GENERIC_4"), + SmallGenericV2("SMALL_GENERIC_V2"), + LargeGeneric2("LARGE_GENERIC_2"), + LargeGenericV2("LARGE_GENERIC_V2"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/Endpoint.java b/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/Endpoint.java index 920dd73dbec..2ca69584c07 100644 --- a/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/Endpoint.java +++ b/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/Endpoint.java @@ -8,7 +8,7 @@ * To host a custom model for inference, create an endpoint for that model on a dedicated AI cluster of type HOSTING. *

* To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator who gives OCI resource access to users. See - * [Getting Started with Policies](https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm) and [Getting Access to Generative AI Resouces](https://docs.cloud.oracle.com/iaas/Content/generative-ai/iam-policies.htm). + * [Getting Started with Policies](https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm) and [Getting Access to Generative AI Resources](https://docs.cloud.oracle.com/iaas/Content/generative-ai/iam-policies.htm). * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields diff --git a/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/Model.java b/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/Model.java index 4ec6c11e1b6..efe58bca995 100644 --- a/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/Model.java +++ b/bmc-generativeai/src/main/java/com/oracle/bmc/generativeai/model/Model.java @@ -8,7 +8,7 @@ * You can create a custom model by using your dataset to fine-tune an out-of-the-box text generation base model. Have your dataset ready before you create a custom model. See [Training Data Requirements](https://docs.cloud.oracle.com/iaas/Content/generative-ai/training-data-requirements.htm). *

* To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator who gives OCI resource access to users. See - * [Getting Started with Policies](https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm) and [Getting Access to Generative AI Resouces](https://docs.cloud.oracle.com/iaas/Content/generative-ai/iam-policies.htm). + * [Getting Started with Policies](https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm) and [Getting Access to Generative AI Resources](https://docs.cloud.oracle.com/iaas/Content/generative-ai/iam-policies.htm). * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields diff --git a/bmc-generativeaiagent/pom.xml b/bmc-generativeaiagent/pom.xml new file mode 100644 index 00000000000..9b90db53317 --- /dev/null +++ b/bmc-generativeaiagent/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + com.oracle.oci.sdk + oci-java-sdk + 2.79.0 + ../pom.xml + + oci-java-sdk-generativeaiagent + Oracle Cloud Infrastructure SDK - Generative Ai Agent + This project contains the SDK used for Oracle Cloud Infrastructure Generative Ai Agent + https://docs.cloud.oracle.com/Content/API/SDKDocs/javasdk.htm + + + com.oracle.oci.sdk + oci-java-sdk-common + 2.79.0 + + + \ No newline at end of file diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgent.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgent.java new file mode 100644 index 00000000000..176cc8090c4 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgent.java @@ -0,0 +1,590 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent; + +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; + +/** + * **Generative AI Agents API** + * + * + * OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. + * + * OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. + * + * Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. + * + * For creating and managing client chat sessions see the {@link #eNGenerative-ai-agents-clientLatest(ENGenerative-ai-agents-clientLatestRequest) eNGenerative-ai-agents-clientLatest}. + * + * To learn more about the service, see the [Generative AI Agents documentation](https://docs.cloud.oracle.com/iaas/Content/generative-ai-agents/home.htm). + * + * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public interface GenerativeAiAgent extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the service. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this Region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * **CancelWorkRequest** + *

+ * Cancels a work request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CancelWorkRequest API. + */ + CancelWorkRequestResponse cancelWorkRequest(CancelWorkRequestRequest request); + + /** + * **ChangeAgentCompartment** + *

+ * Moves an agent into a different compartment within the same tenancy. For information about moving resources between + * compartments, see [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ChangeAgentCompartment API. + */ + ChangeAgentCompartmentResponse changeAgentCompartment(ChangeAgentCompartmentRequest request); + + /** + * **ChangeAgentEndpointCompartment** + *

+ * Moves an endpoint into a different compartment within the same tenancy. For information about moving resources between + * compartments, see [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ChangeAgentEndpointCompartment API. + */ + ChangeAgentEndpointCompartmentResponse changeAgentEndpointCompartment( + ChangeAgentEndpointCompartmentRequest request); + + /** + * **ChangeKnowledgeBaseCompartment** + *

+ * Moves a knowledge base into a different compartment within the same tenancy. For information about moving resources between + * compartments, see [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ChangeKnowledgeBaseCompartment API. + */ + ChangeKnowledgeBaseCompartmentResponse changeKnowledgeBaseCompartment( + ChangeKnowledgeBaseCompartmentRequest request); + + /** + * **CreateAgent** + *

+ * Creates an agent. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateAgent API. + */ + CreateAgentResponse createAgent(CreateAgentRequest request); + + /** + * **CreateAgentEndpoint** + *

+ * Creates an endpoint. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateAgentEndpoint API. + */ + CreateAgentEndpointResponse createAgentEndpoint(CreateAgentEndpointRequest request); + + /** + * **CreateDataIngestionJob** + *

+ * Creates a data ingestion job. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateDataIngestionJob API. + */ + CreateDataIngestionJobResponse createDataIngestionJob(CreateDataIngestionJobRequest request); + + /** + * **CreateDataSource** + *

+ * Creates a data source. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateDataSource API. + */ + CreateDataSourceResponse createDataSource(CreateDataSourceRequest request); + + /** + * **CreateKnowledgeBase** + *

+ * Creates a knowledge base. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateKnowledgeBase API. + */ + CreateKnowledgeBaseResponse createKnowledgeBase(CreateKnowledgeBaseRequest request); + + /** + * **DeleteAgent** + *

+ * Deletes an agent. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteAgent API. + */ + DeleteAgentResponse deleteAgent(DeleteAgentRequest request); + + /** + * **DeleteAgentEndpoint** + *

+ * Deletes an endpoint. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteAgentEndpoint API. + */ + DeleteAgentEndpointResponse deleteAgentEndpoint(DeleteAgentEndpointRequest request); + + /** + * **DeleteDataIngestionJob** + *

+ * Deletes a data ingestion job. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteDataIngestionJob API. + */ + DeleteDataIngestionJobResponse deleteDataIngestionJob(DeleteDataIngestionJobRequest request); + + /** + * **DeleteDataSource** + *

+ * Deletes a data source. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteDataSource API. + */ + DeleteDataSourceResponse deleteDataSource(DeleteDataSourceRequest request); + + /** + * **DeleteKnowledgeBase** + *

+ * Deletes a knowledge base. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteKnowledgeBase API. + */ + DeleteKnowledgeBaseResponse deleteKnowledgeBase(DeleteKnowledgeBaseRequest request); + + /** + * **GetAgent** + *

+ * Gets information about an agent. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetAgent API. + */ + GetAgentResponse getAgent(GetAgentRequest request); + + /** + * **GetAgentEndpoint** + *

+ * Gets information about an endpoint. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetAgentEndpoint API. + */ + GetAgentEndpointResponse getAgentEndpoint(GetAgentEndpointRequest request); + + /** + * **GetDataIngestionJob** + *

+ * Gets information about a data ingestion job. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetDataIngestionJob API. + */ + GetDataIngestionJobResponse getDataIngestionJob(GetDataIngestionJobRequest request); + + /** + * **GetDataIngestionJobLogContent** + *

+ * Returns the raw log file for the specified data ingestion job in text format. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetDataIngestionJobLogContent API. + */ + GetDataIngestionJobLogContentResponse getDataIngestionJobLogContent( + GetDataIngestionJobLogContentRequest request); + + /** + * **GetDataSource** + *

+ * Gets information about a data source. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetDataSource API. + */ + GetDataSourceResponse getDataSource(GetDataSourceRequest request); + + /** + * **GetKnowledgeBase** + *

+ * Gets information about a knowledge base. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetKnowledgeBase API. + */ + GetKnowledgeBaseResponse getKnowledgeBase(GetKnowledgeBaseRequest request); + + /** + * **GetWorkRequest** + *

+ * Gets the details of a work request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetWorkRequest API. + */ + GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request); + + /** + * **ListAgentEndpoints** + *

+ * Gets a list of endpoints. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListAgentEndpoints API. + */ + ListAgentEndpointsResponse listAgentEndpoints(ListAgentEndpointsRequest request); + + /** + * **ListAgents** + *

+ * Gets a list of agents. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListAgents API. + */ + ListAgentsResponse listAgents(ListAgentsRequest request); + + /** + * **ListDataIngestionJobs** + *

+ * Gets a list of data ingestion jobs. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListDataIngestionJobs API. + */ + ListDataIngestionJobsResponse listDataIngestionJobs(ListDataIngestionJobsRequest request); + + /** + * **ListDataSources** + *

+ * Gets a list of data sources. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListDataSources API. + */ + ListDataSourcesResponse listDataSources(ListDataSourcesRequest request); + + /** + * **ListKnowledgeBases** + *

+ * Gets a list of knowledge bases. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListKnowledgeBases API. + */ + ListKnowledgeBasesResponse listKnowledgeBases(ListKnowledgeBasesRequest request); + + /** + * **ListWorkRequestErrors** + *

+ * Lists the errors for a work request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListWorkRequestErrors API. + */ + ListWorkRequestErrorsResponse listWorkRequestErrors(ListWorkRequestErrorsRequest request); + + /** + * **ListWorkRequestLogs** + *

+ * Lists the logs for a work request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListWorkRequestLogs API. + */ + ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsRequest request); + + /** + * **ListWorkRequests** + *

+ * Lists the work requests in a compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListWorkRequests API. + */ + ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request); + + /** + * **UpdateAgent** + *

+ * Updates an agent. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateAgent API. + */ + UpdateAgentResponse updateAgent(UpdateAgentRequest request); + + /** + * **UpdateAgentEndpoint** + *

+ * Updates an endpoint. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateAgentEndpoint API. + */ + UpdateAgentEndpointResponse updateAgentEndpoint(UpdateAgentEndpointRequest request); + + /** + * **UpdateDataSource** + *

+ * Updates a data source. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateDataSource API. + */ + UpdateDataSourceResponse updateDataSource(UpdateDataSourceRequest request); + + /** + * **UpdateKnowledgeBase** + *

+ * Updates a knowledge base. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateKnowledgeBase API. + */ + UpdateKnowledgeBaseResponse updateKnowledgeBase(UpdateKnowledgeBaseRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + GenerativeAiAgentWaiters getWaiters(); + + /** + * Gets the pre-configured paginators available for list operations in this service which may return multiple + * pages of data. These paginators provide an {@link java.lang.Iterable} interface so that service responses, or + * resources/records, can be iterated through without having to manually deal with pagination and page tokens. + * + * @return The service paginators. + */ + GenerativeAiAgentPaginators getPaginators(); +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentAsync.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentAsync.java new file mode 100644 index 00000000000..8969b963d94 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentAsync.java @@ -0,0 +1,689 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent; + +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; + +/** + * **Generative AI Agents API** + * + * + * OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. + * + * OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. + * + * Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. + * + * For creating and managing client chat sessions see the {@link #eNGenerative-ai-agents-clientLatest(ENGenerative-ai-agents-clientLatestRequest) eNGenerative-ai-agents-clientLatest}. + * + * To learn more about the service, see the [Generative AI Agents documentation](https://docs.cloud.oracle.com/iaas/Content/generative-ai-agents/home.htm). + * + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public interface GenerativeAiAgentAsync extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the serice. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * **CancelWorkRequest** + *

+ * Cancels a work request. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future cancelWorkRequest( + CancelWorkRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + CancelWorkRequestRequest, CancelWorkRequestResponse> + handler); + + /** + * **ChangeAgentCompartment** + *

+ * Moves an agent into a different compartment within the same tenancy. For information about moving resources between + * compartments, see [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future changeAgentCompartment( + ChangeAgentCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeAgentCompartmentRequest, ChangeAgentCompartmentResponse> + handler); + + /** + * **ChangeAgentEndpointCompartment** + *

+ * Moves an endpoint into a different compartment within the same tenancy. For information about moving resources between + * compartments, see [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + changeAgentEndpointCompartment( + ChangeAgentEndpointCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeAgentEndpointCompartmentRequest, + ChangeAgentEndpointCompartmentResponse> + handler); + + /** + * **ChangeKnowledgeBaseCompartment** + *

+ * Moves a knowledge base into a different compartment within the same tenancy. For information about moving resources between + * compartments, see [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + changeKnowledgeBaseCompartment( + ChangeKnowledgeBaseCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeKnowledgeBaseCompartmentRequest, + ChangeKnowledgeBaseCompartmentResponse> + handler); + + /** + * **CreateAgent** + *

+ * Creates an agent. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createAgent( + CreateAgentRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * **CreateAgentEndpoint** + *

+ * Creates an endpoint. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createAgentEndpoint( + CreateAgentEndpointRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateAgentEndpointRequest, CreateAgentEndpointResponse> + handler); + + /** + * **CreateDataIngestionJob** + *

+ * Creates a data ingestion job. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createDataIngestionJob( + CreateDataIngestionJobRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateDataIngestionJobRequest, CreateDataIngestionJobResponse> + handler); + + /** + * **CreateDataSource** + *

+ * Creates a data source. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createDataSource( + CreateDataSourceRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * **CreateKnowledgeBase** + *

+ * Creates a knowledge base. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createKnowledgeBase( + CreateKnowledgeBaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateKnowledgeBaseRequest, CreateKnowledgeBaseResponse> + handler); + + /** + * **DeleteAgent** + *

+ * Deletes an agent. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteAgent( + DeleteAgentRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * **DeleteAgentEndpoint** + *

+ * Deletes an endpoint. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteAgentEndpoint( + DeleteAgentEndpointRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteAgentEndpointRequest, DeleteAgentEndpointResponse> + handler); + + /** + * **DeleteDataIngestionJob** + *

+ * Deletes a data ingestion job. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteDataIngestionJob( + DeleteDataIngestionJobRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteDataIngestionJobRequest, DeleteDataIngestionJobResponse> + handler); + + /** + * **DeleteDataSource** + *

+ * Deletes a data source. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteDataSource( + DeleteDataSourceRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * **DeleteKnowledgeBase** + *

+ * Deletes a knowledge base. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteKnowledgeBase( + DeleteKnowledgeBaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteKnowledgeBaseRequest, DeleteKnowledgeBaseResponse> + handler); + + /** + * **GetAgent** + *

+ * Gets information about an agent. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getAgent( + GetAgentRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * **GetAgentEndpoint** + *

+ * Gets information about an endpoint. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getAgentEndpoint( + GetAgentEndpointRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * **GetDataIngestionJob** + *

+ * Gets information about a data ingestion job. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getDataIngestionJob( + GetDataIngestionJobRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetDataIngestionJobRequest, GetDataIngestionJobResponse> + handler); + + /** + * **GetDataIngestionJobLogContent** + *

+ * Returns the raw log file for the specified data ingestion job in text format. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + getDataIngestionJobLogContent( + GetDataIngestionJobLogContentRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetDataIngestionJobLogContentRequest, + GetDataIngestionJobLogContentResponse> + handler); + + /** + * **GetDataSource** + *

+ * Gets information about a data source. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getDataSource( + GetDataSourceRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * **GetKnowledgeBase** + *

+ * Gets information about a knowledge base. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getKnowledgeBase( + GetKnowledgeBaseRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * **GetWorkRequest** + *

+ * Gets the details of a work request. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getWorkRequest( + GetWorkRequestRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * **ListAgentEndpoints** + *

+ * Gets a list of endpoints. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listAgentEndpoints( + ListAgentEndpointsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListAgentEndpointsRequest, ListAgentEndpointsResponse> + handler); + + /** + * **ListAgents** + *

+ * Gets a list of agents. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listAgents( + ListAgentsRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * **ListDataIngestionJobs** + *

+ * Gets a list of data ingestion jobs. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listDataIngestionJobs( + ListDataIngestionJobsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListDataIngestionJobsRequest, ListDataIngestionJobsResponse> + handler); + + /** + * **ListDataSources** + *

+ * Gets a list of data sources. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listDataSources( + ListDataSourcesRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * **ListKnowledgeBases** + *

+ * Gets a list of knowledge bases. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listKnowledgeBases( + ListKnowledgeBasesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListKnowledgeBasesRequest, ListKnowledgeBasesResponse> + handler); + + /** + * **ListWorkRequestErrors** + *

+ * Lists the errors for a work request. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listWorkRequestErrors( + ListWorkRequestErrorsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + handler); + + /** + * **ListWorkRequestLogs** + *

+ * Lists the logs for a work request. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listWorkRequestLogs( + ListWorkRequestLogsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + handler); + + /** + * **ListWorkRequests** + *

+ * Lists the work requests in a compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listWorkRequests( + ListWorkRequestsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * **UpdateAgent** + *

+ * Updates an agent. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateAgent( + UpdateAgentRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * **UpdateAgentEndpoint** + *

+ * Updates an endpoint. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateAgentEndpoint( + UpdateAgentEndpointRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateAgentEndpointRequest, UpdateAgentEndpointResponse> + handler); + + /** + * **UpdateDataSource** + *

+ * Updates a data source. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateDataSource( + UpdateDataSourceRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * **UpdateKnowledgeBase** + *

+ * Updates a knowledge base. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateKnowledgeBase( + UpdateKnowledgeBaseRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateKnowledgeBaseRequest, UpdateKnowledgeBaseResponse> + handler); +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentAsyncClient.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentAsyncClient.java new file mode 100644 index 00000000000..aca334ad122 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentAsyncClient.java @@ -0,0 +1,2065 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent; + +import com.oracle.bmc.generativeaiagent.internal.http.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; + +/** + * Async client implementation for GenerativeAiAgent service.
+ * There are two ways to use async client: + * 1. Use AsyncHandler: using AsyncHandler, if the response to the call is an {@link java.io.InputStream}, like + * getObject Api in object storage service, developers need to process the stream in AsyncHandler, and not anywhere else, + * because the stream will be closed right after the AsyncHandler is invoked.
+ * 2. Use Java Future: using Java Future, developers need to close the stream after they are done with the Java Future.
+ * Accessing the result should be done in a mutually exclusive manner, either through the Future or the AsyncHandler, + * but not both. If the Future is used, the caller should pass in null as the AsyncHandler. If the AsyncHandler + * is used, it is still safe to use the Future to determine whether or not the request was completed via + * Future.isDone/isCancelled.
+ * Please refer to https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GenerativeAiAgentAsyncClient implements GenerativeAiAgentAsync { + /** + * Service instance for GenerativeAiAgent. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("GENERATIVEAIAGENT") + .serviceEndpointPrefix("") + .serviceEndpointTemplate( + "https://agent.generativeai.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GenerativeAiAgentAsyncClient.class); + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public GenerativeAiAgentAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public GenerativeAiAgentAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public GenerativeAiAgentAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public GenerativeAiAgentAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public GenerativeAiAgentAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public GenerativeAiAgentAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public GenerativeAiAgentAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + public GenerativeAiAgentAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.clientConfigurationToUse = configuration; + + this.refreshClient(); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + if (com.oracle.bmc.http.ApacheUtils.isExtraStreamLogsEnabled()) { + LOG.warn( + com.oracle.bmc.http.ApacheUtils.getStreamWarningMessage( + "GenerativeAiAgentAsyncClient", "getDataIngestionJobLogContent")); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder< + Builder, GenerativeAiAgentAsyncClient> { + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public GenerativeAiAgentAsyncClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new GenerativeAiAgentAsyncClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint); + } + } + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public java.util.concurrent.Future cancelWorkRequest( + CancelWorkRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CancelWorkRequestRequest, CancelWorkRequestResponse> + handler) { + LOG.trace("Called async cancelWorkRequest"); + final CancelWorkRequestRequest interceptedRequest = + CancelWorkRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CancelWorkRequestConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "CancelWorkRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/WorkRequest/CancelWorkRequest"); + final java.util.function.Function + transformer = + CancelWorkRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CancelWorkRequestRequest, CancelWorkRequestResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CancelWorkRequestRequest, CancelWorkRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future changeAgentCompartment( + ChangeAgentCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeAgentCompartmentRequest, ChangeAgentCompartmentResponse> + handler) { + LOG.trace("Called async changeAgentCompartment"); + final ChangeAgentCompartmentRequest interceptedRequest = + ChangeAgentCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeAgentCompartmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ChangeAgentCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Agent/ChangeAgentCompartment"); + final java.util.function.Function + transformer = + ChangeAgentCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeAgentCompartmentRequest, ChangeAgentCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeAgentCompartmentRequest, ChangeAgentCompartmentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeAgentCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeAgentCompartmentRequest, ChangeAgentCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + changeAgentEndpointCompartment( + ChangeAgentEndpointCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeAgentEndpointCompartmentRequest, + ChangeAgentEndpointCompartmentResponse> + handler) { + LOG.trace("Called async changeAgentEndpointCompartment"); + final ChangeAgentEndpointCompartmentRequest interceptedRequest = + ChangeAgentEndpointCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeAgentEndpointCompartmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ChangeAgentEndpointCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/AgentEndpoint/ChangeAgentEndpointCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeAgentEndpointCompartmentResponse> + transformer = + ChangeAgentEndpointCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeAgentEndpointCompartmentRequest, + ChangeAgentEndpointCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeAgentEndpointCompartmentRequest, + ChangeAgentEndpointCompartmentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeAgentEndpointCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeAgentEndpointCompartmentRequest, ChangeAgentEndpointCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + changeKnowledgeBaseCompartment( + ChangeKnowledgeBaseCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeKnowledgeBaseCompartmentRequest, + ChangeKnowledgeBaseCompartmentResponse> + handler) { + LOG.trace("Called async changeKnowledgeBaseCompartment"); + final ChangeKnowledgeBaseCompartmentRequest interceptedRequest = + ChangeKnowledgeBaseCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeKnowledgeBaseCompartmentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ChangeKnowledgeBaseCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/KnowledgeBase/ChangeKnowledgeBaseCompartment"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeKnowledgeBaseCompartmentResponse> + transformer = + ChangeKnowledgeBaseCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeKnowledgeBaseCompartmentRequest, + ChangeKnowledgeBaseCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeKnowledgeBaseCompartmentRequest, + ChangeKnowledgeBaseCompartmentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeKnowledgeBaseCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeKnowledgeBaseCompartmentRequest, ChangeKnowledgeBaseCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createAgent( + CreateAgentRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async createAgent"); + final CreateAgentRequest interceptedRequest = + CreateAgentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateAgentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "CreateAgent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Agent/CreateAgent"); + final java.util.function.Function + transformer = + CreateAgentConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateAgentRequest, CreateAgentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateAgentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateAgentRequest, CreateAgentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createAgentEndpoint( + CreateAgentEndpointRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateAgentEndpointRequest, CreateAgentEndpointResponse> + handler) { + LOG.trace("Called async createAgentEndpoint"); + final CreateAgentEndpointRequest interceptedRequest = + CreateAgentEndpointConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateAgentEndpointConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "CreateAgentEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/AgentEndpoint/CreateAgentEndpoint"); + final java.util.function.Function + transformer = + CreateAgentEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateAgentEndpointRequest, CreateAgentEndpointResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateAgentEndpointRequest, CreateAgentEndpointResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateAgentEndpointDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateAgentEndpointRequest, CreateAgentEndpointResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createDataIngestionJob( + CreateDataIngestionJobRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateDataIngestionJobRequest, CreateDataIngestionJobResponse> + handler) { + LOG.trace("Called async createDataIngestionJob"); + final CreateDataIngestionJobRequest interceptedRequest = + CreateDataIngestionJobConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateDataIngestionJobConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "CreateDataIngestionJob", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/DataIngestionJob/CreateDataIngestionJob"); + final java.util.function.Function + transformer = + CreateDataIngestionJobConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateDataIngestionJobRequest, CreateDataIngestionJobResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateDataIngestionJobRequest, CreateDataIngestionJobResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateDataIngestionJobDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateDataIngestionJobRequest, CreateDataIngestionJobResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createDataSource( + CreateDataSourceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateDataSourceRequest, CreateDataSourceResponse> + handler) { + LOG.trace("Called async createDataSource"); + final CreateDataSourceRequest interceptedRequest = + CreateDataSourceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateDataSourceConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "CreateDataSource", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/DataSource/CreateDataSource"); + final java.util.function.Function + transformer = + CreateDataSourceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateDataSourceRequest, CreateDataSourceResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateDataSourceDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateDataSourceRequest, CreateDataSourceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createKnowledgeBase( + CreateKnowledgeBaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateKnowledgeBaseRequest, CreateKnowledgeBaseResponse> + handler) { + LOG.trace("Called async createKnowledgeBase"); + final CreateKnowledgeBaseRequest interceptedRequest = + CreateKnowledgeBaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateKnowledgeBaseConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "CreateKnowledgeBase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/KnowledgeBase/CreateKnowledgeBase"); + final java.util.function.Function + transformer = + CreateKnowledgeBaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateKnowledgeBaseRequest, CreateKnowledgeBaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateKnowledgeBaseRequest, CreateKnowledgeBaseResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateKnowledgeBaseDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateKnowledgeBaseRequest, CreateKnowledgeBaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteAgent( + DeleteAgentRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async deleteAgent"); + final DeleteAgentRequest interceptedRequest = + DeleteAgentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteAgentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "DeleteAgent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Agent/DeleteAgent"); + final java.util.function.Function + transformer = + DeleteAgentConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteAgentRequest, DeleteAgentResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteAgentRequest, DeleteAgentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteAgentEndpoint( + DeleteAgentEndpointRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteAgentEndpointRequest, DeleteAgentEndpointResponse> + handler) { + LOG.trace("Called async deleteAgentEndpoint"); + final DeleteAgentEndpointRequest interceptedRequest = + DeleteAgentEndpointConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteAgentEndpointConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "DeleteAgentEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/AgentEndpoint/DeleteAgentEndpoint"); + final java.util.function.Function + transformer = + DeleteAgentEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteAgentEndpointRequest, DeleteAgentEndpointResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteAgentEndpointRequest, DeleteAgentEndpointResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteAgentEndpointRequest, DeleteAgentEndpointResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteDataIngestionJob( + DeleteDataIngestionJobRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteDataIngestionJobRequest, DeleteDataIngestionJobResponse> + handler) { + LOG.trace("Called async deleteDataIngestionJob"); + final DeleteDataIngestionJobRequest interceptedRequest = + DeleteDataIngestionJobConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteDataIngestionJobConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "DeleteDataIngestionJob", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/DataIngestionJob/DeleteDataIngestionJob"); + final java.util.function.Function + transformer = + DeleteDataIngestionJobConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteDataIngestionJobRequest, DeleteDataIngestionJobResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteDataIngestionJobRequest, DeleteDataIngestionJobResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteDataIngestionJobRequest, DeleteDataIngestionJobResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteDataSource( + DeleteDataSourceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteDataSourceRequest, DeleteDataSourceResponse> + handler) { + LOG.trace("Called async deleteDataSource"); + final DeleteDataSourceRequest interceptedRequest = + DeleteDataSourceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteDataSourceConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "DeleteDataSource", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/DataSource/DeleteDataSource"); + final java.util.function.Function + transformer = + DeleteDataSourceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteDataSourceRequest, DeleteDataSourceResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteDataSourceRequest, DeleteDataSourceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteKnowledgeBase( + DeleteKnowledgeBaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteKnowledgeBaseRequest, DeleteKnowledgeBaseResponse> + handler) { + LOG.trace("Called async deleteKnowledgeBase"); + final DeleteKnowledgeBaseRequest interceptedRequest = + DeleteKnowledgeBaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteKnowledgeBaseConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "DeleteKnowledgeBase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/KnowledgeBase/DeleteKnowledgeBase"); + final java.util.function.Function + transformer = + DeleteKnowledgeBaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteKnowledgeBaseRequest, DeleteKnowledgeBaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteKnowledgeBaseRequest, DeleteKnowledgeBaseResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteKnowledgeBaseRequest, DeleteKnowledgeBaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getAgent( + GetAgentRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getAgent"); + final GetAgentRequest interceptedRequest = GetAgentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAgentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "GetAgent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Agent/GetAgent"); + final java.util.function.Function transformer = + GetAgentConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetAgentRequest, GetAgentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getAgentEndpoint( + GetAgentEndpointRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetAgentEndpointRequest, GetAgentEndpointResponse> + handler) { + LOG.trace("Called async getAgentEndpoint"); + final GetAgentEndpointRequest interceptedRequest = + GetAgentEndpointConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAgentEndpointConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "GetAgentEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/AgentEndpoint/GetAgentEndpoint"); + final java.util.function.Function + transformer = + GetAgentEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetAgentEndpointRequest, GetAgentEndpointResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetAgentEndpointRequest, GetAgentEndpointResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getDataIngestionJob( + GetDataIngestionJobRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetDataIngestionJobRequest, GetDataIngestionJobResponse> + handler) { + LOG.trace("Called async getDataIngestionJob"); + final GetDataIngestionJobRequest interceptedRequest = + GetDataIngestionJobConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDataIngestionJobConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "GetDataIngestionJob", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/DataIngestionJob/GetDataIngestionJob"); + final java.util.function.Function + transformer = + GetDataIngestionJobConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetDataIngestionJobRequest, GetDataIngestionJobResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetDataIngestionJobRequest, GetDataIngestionJobResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetDataIngestionJobRequest, GetDataIngestionJobResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getDataIngestionJobLogContent( + GetDataIngestionJobLogContentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetDataIngestionJobLogContentRequest, + GetDataIngestionJobLogContentResponse> + handler) { + LOG.trace("Called async getDataIngestionJobLogContent"); + final GetDataIngestionJobLogContentRequest interceptedRequest = + GetDataIngestionJobLogContentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDataIngestionJobLogContentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "GetDataIngestionJobLogContent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/DataIngestionJob/GetDataIngestionJobLogContent"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetDataIngestionJobLogContentResponse> + transformer = + GetDataIngestionJobLogContentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetDataIngestionJobLogContentRequest, GetDataIngestionJobLogContentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetDataIngestionJobLogContentRequest, + GetDataIngestionJobLogContentResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetDataIngestionJobLogContentRequest, GetDataIngestionJobLogContentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getDataSource( + GetDataSourceRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getDataSource"); + final GetDataSourceRequest interceptedRequest = + GetDataSourceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDataSourceConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "GetDataSource", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/DataSource/GetDataSource"); + final java.util.function.Function + transformer = + GetDataSourceConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetDataSourceRequest, GetDataSourceResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetDataSourceRequest, GetDataSourceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getKnowledgeBase( + GetKnowledgeBaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetKnowledgeBaseRequest, GetKnowledgeBaseResponse> + handler) { + LOG.trace("Called async getKnowledgeBase"); + final GetKnowledgeBaseRequest interceptedRequest = + GetKnowledgeBaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetKnowledgeBaseConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "GetKnowledgeBase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/KnowledgeBase/GetKnowledgeBase"); + final java.util.function.Function + transformer = + GetKnowledgeBaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetKnowledgeBaseRequest, GetKnowledgeBaseResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetKnowledgeBaseRequest, GetKnowledgeBaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getWorkRequest( + GetWorkRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetWorkRequestRequest, GetWorkRequestResponse> + handler) { + LOG.trace("Called async getWorkRequest"); + final GetWorkRequestRequest interceptedRequest = + GetWorkRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetWorkRequestConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "GetWorkRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/WorkRequest/GetWorkRequest"); + final java.util.function.Function + transformer = + GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetWorkRequestRequest, GetWorkRequestResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetWorkRequestRequest, GetWorkRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listAgentEndpoints( + ListAgentEndpointsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListAgentEndpointsRequest, ListAgentEndpointsResponse> + handler) { + LOG.trace("Called async listAgentEndpoints"); + final ListAgentEndpointsRequest interceptedRequest = + ListAgentEndpointsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAgentEndpointsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ListAgentEndpoints", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/AgentEndpoint/ListAgentEndpoints"); + final java.util.function.Function + transformer = + ListAgentEndpointsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListAgentEndpointsRequest, ListAgentEndpointsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListAgentEndpointsRequest, ListAgentEndpointsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listAgents( + ListAgentsRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listAgents"); + final ListAgentsRequest interceptedRequest = ListAgentsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAgentsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ListAgents", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Agent/ListAgents"); + final java.util.function.Function + transformer = + ListAgentsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListAgentsRequest, ListAgentsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListAgentsRequest, ListAgentsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listDataIngestionJobs( + ListDataIngestionJobsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListDataIngestionJobsRequest, ListDataIngestionJobsResponse> + handler) { + LOG.trace("Called async listDataIngestionJobs"); + final ListDataIngestionJobsRequest interceptedRequest = + ListDataIngestionJobsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDataIngestionJobsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ListDataIngestionJobs", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/DataIngestionJob/ListDataIngestionJobs"); + final java.util.function.Function + transformer = + ListDataIngestionJobsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListDataIngestionJobsRequest, ListDataIngestionJobsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListDataIngestionJobsRequest, ListDataIngestionJobsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListDataIngestionJobsRequest, ListDataIngestionJobsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listDataSources( + ListDataSourcesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListDataSourcesRequest, ListDataSourcesResponse> + handler) { + LOG.trace("Called async listDataSources"); + final ListDataSourcesRequest interceptedRequest = + ListDataSourcesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDataSourcesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ListDataSources", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/DataSource/ListDataSources"); + final java.util.function.Function + transformer = + ListDataSourcesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListDataSourcesRequest, ListDataSourcesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListDataSourcesRequest, ListDataSourcesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listKnowledgeBases( + ListKnowledgeBasesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListKnowledgeBasesRequest, ListKnowledgeBasesResponse> + handler) { + LOG.trace("Called async listKnowledgeBases"); + final ListKnowledgeBasesRequest interceptedRequest = + ListKnowledgeBasesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListKnowledgeBasesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ListKnowledgeBases", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/KnowledgeBase/ListKnowledgeBases"); + final java.util.function.Function + transformer = + ListKnowledgeBasesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListKnowledgeBasesRequest, ListKnowledgeBasesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListKnowledgeBasesRequest, ListKnowledgeBasesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listWorkRequestErrors( + ListWorkRequestErrorsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + handler) { + LOG.trace("Called async listWorkRequestErrors"); + final ListWorkRequestErrorsRequest interceptedRequest = + ListWorkRequestErrorsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestErrorsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ListWorkRequestErrors", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/WorkRequestError/ListWorkRequestErrors"); + final java.util.function.Function + transformer = + ListWorkRequestErrorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listWorkRequestLogs( + ListWorkRequestLogsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + handler) { + LOG.trace("Called async listWorkRequestLogs"); + final ListWorkRequestLogsRequest interceptedRequest = + ListWorkRequestLogsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestLogsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ListWorkRequestLogs", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/WorkRequestLogEntry/ListWorkRequestLogs"); + final java.util.function.Function + transformer = + ListWorkRequestLogsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listWorkRequests( + ListWorkRequestsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestsRequest, ListWorkRequestsResponse> + handler) { + LOG.trace("Called async listWorkRequests"); + final ListWorkRequestsRequest interceptedRequest = + ListWorkRequestsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ListWorkRequests", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/WorkRequest/ListWorkRequests"); + final java.util.function.Function + transformer = + ListWorkRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestsRequest, ListWorkRequestsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListWorkRequestsRequest, ListWorkRequestsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateAgent( + UpdateAgentRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async updateAgent"); + final UpdateAgentRequest interceptedRequest = + UpdateAgentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateAgentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "UpdateAgent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Agent/UpdateAgent"); + final java.util.function.Function + transformer = + UpdateAgentConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateAgentRequest, UpdateAgentResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateAgentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateAgentRequest, UpdateAgentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateAgentEndpoint( + UpdateAgentEndpointRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateAgentEndpointRequest, UpdateAgentEndpointResponse> + handler) { + LOG.trace("Called async updateAgentEndpoint"); + final UpdateAgentEndpointRequest interceptedRequest = + UpdateAgentEndpointConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateAgentEndpointConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "UpdateAgentEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/AgentEndpoint/UpdateAgentEndpoint"); + final java.util.function.Function + transformer = + UpdateAgentEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateAgentEndpointRequest, UpdateAgentEndpointResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateAgentEndpointRequest, UpdateAgentEndpointResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateAgentEndpointDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateAgentEndpointRequest, UpdateAgentEndpointResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateDataSource( + UpdateDataSourceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateDataSourceRequest, UpdateDataSourceResponse> + handler) { + LOG.trace("Called async updateDataSource"); + final UpdateDataSourceRequest interceptedRequest = + UpdateDataSourceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateDataSourceConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "UpdateDataSource", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/DataSource/UpdateDataSource"); + final java.util.function.Function + transformer = + UpdateDataSourceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateDataSourceRequest, UpdateDataSourceResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateDataSourceDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateDataSourceRequest, UpdateDataSourceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateKnowledgeBase( + UpdateKnowledgeBaseRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateKnowledgeBaseRequest, UpdateKnowledgeBaseResponse> + handler) { + LOG.trace("Called async updateKnowledgeBase"); + final UpdateKnowledgeBaseRequest interceptedRequest = + UpdateKnowledgeBaseConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateKnowledgeBaseConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "UpdateKnowledgeBase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/KnowledgeBase/UpdateKnowledgeBase"); + final java.util.function.Function + transformer = + UpdateKnowledgeBaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateKnowledgeBaseRequest, UpdateKnowledgeBaseResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateKnowledgeBaseRequest, UpdateKnowledgeBaseResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateKnowledgeBaseDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateKnowledgeBaseRequest, UpdateKnowledgeBaseResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentClient.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentClient.java new file mode 100644 index 00000000000..885b0aa703b --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentClient.java @@ -0,0 +1,1845 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent; + +import com.oracle.bmc.generativeaiagent.internal.http.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration; +import com.oracle.bmc.util.CircuitBreakerUtils; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GenerativeAiAgentClient implements GenerativeAiAgent { + /** + * Service instance for GenerativeAiAgent. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("GENERATIVEAIAGENT") + .serviceEndpointPrefix("") + .serviceEndpointTemplate( + "https://agent.generativeai.{region}.oci.{secondLevelDomain}") + .build(); + // attempt twice if it's instance principals, immediately failures will try to refresh the token + private static final int MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS = 2; + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GenerativeAiAgentClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final GenerativeAiAgentWaiters waiters; + + private final GenerativeAiAgentPaginators paginators; + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + circuitBreakerConfiguration; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public GenerativeAiAgentClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public GenerativeAiAgentClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public GenerativeAiAgentClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public GenerativeAiAgentClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public GenerativeAiAgentClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public GenerativeAiAgentClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public GenerativeAiAgentClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + */ + public GenerativeAiAgentClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * Use the {@link Builder} to get access to all these parameters. + * + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + protected GenerativeAiAgentClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + this.restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + + this.clientConfigurationToUse = + (configuration != null) + ? configuration + : com.oracle.bmc.ClientConfiguration.builder().build(); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.retryConfiguration = clientConfigurationToUse.getRetryConfiguration(); + final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + userCircuitBreakerConfiguration = + CircuitBreakerUtils.getUserDefinedCircuitBreakerConfiguration( + configuration); + if (userCircuitBreakerConfiguration == null) { + this.circuitBreakerConfiguration = + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION; + } else { + this.circuitBreakerConfiguration = userCircuitBreakerConfiguration; + } + + this.refreshClient(); + + if (executorService == null) { + // up to 50 (core) threads, time out after 60s idle, all daemon + java.util.concurrent.ThreadPoolExecutor threadPoolExecutor = + new java.util.concurrent.ThreadPoolExecutor( + 50, + 50, + 60L, + java.util.concurrent.TimeUnit.SECONDS, + new java.util.concurrent.LinkedBlockingQueue(), + com.oracle.bmc.internal.ClientThreadFactory.builder() + .isDaemon(true) + .nameFormat("GenerativeAiAgent-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new GenerativeAiAgentWaiters(executorService, this); + + this.paginators = new GenerativeAiAgentPaginators(this); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + if (com.oracle.bmc.http.ApacheUtils.isExtraStreamLogsEnabled()) { + LOG.warn( + com.oracle.bmc.http.ApacheUtils.getStreamWarningMessage( + "GenerativeAiAgentClient", "getDataIngestionJobLogContent")); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder { + private java.util.concurrent.ExecutorService executorService; + + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Set the ExecutorService for the client to be created. + * @param executorService executorService + * @return this builder + */ + public Builder executorService(java.util.concurrent.ExecutorService executorService) { + this.executorService = executorService; + return this; + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public GenerativeAiAgentClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new GenerativeAiAgentClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + restClientFactoryBuilder); + } + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, this.authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient, + null, + this.circuitBreakerConfiguration); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public CancelWorkRequestResponse cancelWorkRequest(CancelWorkRequestRequest request) { + LOG.trace("Called cancelWorkRequest"); + final CancelWorkRequestRequest interceptedRequest = + CancelWorkRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CancelWorkRequestConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "CancelWorkRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/WorkRequest/CancelWorkRequest"); + java.util.function.Function + transformer = + CancelWorkRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ChangeAgentCompartmentResponse changeAgentCompartment( + ChangeAgentCompartmentRequest request) { + LOG.trace("Called changeAgentCompartment"); + final ChangeAgentCompartmentRequest interceptedRequest = + ChangeAgentCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeAgentCompartmentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ChangeAgentCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Agent/ChangeAgentCompartment"); + java.util.function.Function + transformer = + ChangeAgentCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getChangeAgentCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ChangeAgentEndpointCompartmentResponse changeAgentEndpointCompartment( + ChangeAgentEndpointCompartmentRequest request) { + LOG.trace("Called changeAgentEndpointCompartment"); + final ChangeAgentEndpointCompartmentRequest interceptedRequest = + ChangeAgentEndpointCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeAgentEndpointCompartmentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ChangeAgentEndpointCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/AgentEndpoint/ChangeAgentEndpointCompartment"); + java.util.function.Function< + javax.ws.rs.core.Response, ChangeAgentEndpointCompartmentResponse> + transformer = + ChangeAgentEndpointCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeAgentEndpointCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ChangeKnowledgeBaseCompartmentResponse changeKnowledgeBaseCompartment( + ChangeKnowledgeBaseCompartmentRequest request) { + LOG.trace("Called changeKnowledgeBaseCompartment"); + final ChangeKnowledgeBaseCompartmentRequest interceptedRequest = + ChangeKnowledgeBaseCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeKnowledgeBaseCompartmentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ChangeKnowledgeBaseCompartment", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/KnowledgeBase/ChangeKnowledgeBaseCompartment"); + java.util.function.Function< + javax.ws.rs.core.Response, ChangeKnowledgeBaseCompartmentResponse> + transformer = + ChangeKnowledgeBaseCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeKnowledgeBaseCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateAgentResponse createAgent(CreateAgentRequest request) { + LOG.trace("Called createAgent"); + final CreateAgentRequest interceptedRequest = + CreateAgentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateAgentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "CreateAgent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Agent/CreateAgent"); + java.util.function.Function transformer = + CreateAgentConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateAgentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateAgentEndpointResponse createAgentEndpoint(CreateAgentEndpointRequest request) { + LOG.trace("Called createAgentEndpoint"); + final CreateAgentEndpointRequest interceptedRequest = + CreateAgentEndpointConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateAgentEndpointConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "CreateAgentEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/AgentEndpoint/CreateAgentEndpoint"); + java.util.function.Function + transformer = + CreateAgentEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateAgentEndpointDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateDataIngestionJobResponse createDataIngestionJob( + CreateDataIngestionJobRequest request) { + LOG.trace("Called createDataIngestionJob"); + final CreateDataIngestionJobRequest interceptedRequest = + CreateDataIngestionJobConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateDataIngestionJobConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "CreateDataIngestionJob", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/DataIngestionJob/CreateDataIngestionJob"); + java.util.function.Function + transformer = + CreateDataIngestionJobConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateDataIngestionJobDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateDataSourceResponse createDataSource(CreateDataSourceRequest request) { + LOG.trace("Called createDataSource"); + final CreateDataSourceRequest interceptedRequest = + CreateDataSourceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateDataSourceConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "CreateDataSource", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/DataSource/CreateDataSource"); + java.util.function.Function + transformer = + CreateDataSourceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateDataSourceDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateKnowledgeBaseResponse createKnowledgeBase(CreateKnowledgeBaseRequest request) { + LOG.trace("Called createKnowledgeBase"); + final CreateKnowledgeBaseRequest interceptedRequest = + CreateKnowledgeBaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateKnowledgeBaseConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "CreateKnowledgeBase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/KnowledgeBase/CreateKnowledgeBase"); + java.util.function.Function + transformer = + CreateKnowledgeBaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateKnowledgeBaseDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteAgentResponse deleteAgent(DeleteAgentRequest request) { + LOG.trace("Called deleteAgent"); + final DeleteAgentRequest interceptedRequest = + DeleteAgentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteAgentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "DeleteAgent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Agent/DeleteAgent"); + java.util.function.Function transformer = + DeleteAgentConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteAgentEndpointResponse deleteAgentEndpoint(DeleteAgentEndpointRequest request) { + LOG.trace("Called deleteAgentEndpoint"); + final DeleteAgentEndpointRequest interceptedRequest = + DeleteAgentEndpointConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteAgentEndpointConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "DeleteAgentEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/AgentEndpoint/DeleteAgentEndpoint"); + java.util.function.Function + transformer = + DeleteAgentEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteDataIngestionJobResponse deleteDataIngestionJob( + DeleteDataIngestionJobRequest request) { + LOG.trace("Called deleteDataIngestionJob"); + final DeleteDataIngestionJobRequest interceptedRequest = + DeleteDataIngestionJobConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteDataIngestionJobConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "DeleteDataIngestionJob", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/DataIngestionJob/DeleteDataIngestionJob"); + java.util.function.Function + transformer = + DeleteDataIngestionJobConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteDataSourceResponse deleteDataSource(DeleteDataSourceRequest request) { + LOG.trace("Called deleteDataSource"); + final DeleteDataSourceRequest interceptedRequest = + DeleteDataSourceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteDataSourceConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "DeleteDataSource", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/DataSource/DeleteDataSource"); + java.util.function.Function + transformer = + DeleteDataSourceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteKnowledgeBaseResponse deleteKnowledgeBase(DeleteKnowledgeBaseRequest request) { + LOG.trace("Called deleteKnowledgeBase"); + final DeleteKnowledgeBaseRequest interceptedRequest = + DeleteKnowledgeBaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteKnowledgeBaseConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "DeleteKnowledgeBase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/KnowledgeBase/DeleteKnowledgeBase"); + java.util.function.Function + transformer = + DeleteKnowledgeBaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetAgentResponse getAgent(GetAgentRequest request) { + LOG.trace("Called getAgent"); + final GetAgentRequest interceptedRequest = GetAgentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAgentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "GetAgent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Agent/GetAgent"); + java.util.function.Function transformer = + GetAgentConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetAgentEndpointResponse getAgentEndpoint(GetAgentEndpointRequest request) { + LOG.trace("Called getAgentEndpoint"); + final GetAgentEndpointRequest interceptedRequest = + GetAgentEndpointConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAgentEndpointConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "GetAgentEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/AgentEndpoint/GetAgentEndpoint"); + java.util.function.Function + transformer = + GetAgentEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetDataIngestionJobResponse getDataIngestionJob(GetDataIngestionJobRequest request) { + LOG.trace("Called getDataIngestionJob"); + final GetDataIngestionJobRequest interceptedRequest = + GetDataIngestionJobConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDataIngestionJobConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "GetDataIngestionJob", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/DataIngestionJob/GetDataIngestionJob"); + java.util.function.Function + transformer = + GetDataIngestionJobConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetDataIngestionJobLogContentResponse getDataIngestionJobLogContent( + GetDataIngestionJobLogContentRequest request) { + LOG.trace("Called getDataIngestionJobLogContent"); + final GetDataIngestionJobLogContentRequest interceptedRequest = + GetDataIngestionJobLogContentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDataIngestionJobLogContentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "GetDataIngestionJobLogContent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/DataIngestionJob/GetDataIngestionJobLogContent"); + java.util.function.Function< + javax.ws.rs.core.Response, GetDataIngestionJobLogContentResponse> + transformer = + GetDataIngestionJobLogContentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetDataSourceResponse getDataSource(GetDataSourceRequest request) { + LOG.trace("Called getDataSource"); + final GetDataSourceRequest interceptedRequest = + GetDataSourceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDataSourceConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "GetDataSource", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/DataSource/GetDataSource"); + java.util.function.Function transformer = + GetDataSourceConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetKnowledgeBaseResponse getKnowledgeBase(GetKnowledgeBaseRequest request) { + LOG.trace("Called getKnowledgeBase"); + final GetKnowledgeBaseRequest interceptedRequest = + GetKnowledgeBaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetKnowledgeBaseConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "GetKnowledgeBase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/KnowledgeBase/GetKnowledgeBase"); + java.util.function.Function + transformer = + GetKnowledgeBaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) { + LOG.trace("Called getWorkRequest"); + final GetWorkRequestRequest interceptedRequest = + GetWorkRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetWorkRequestConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "GetWorkRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/WorkRequest/GetWorkRequest"); + java.util.function.Function transformer = + GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListAgentEndpointsResponse listAgentEndpoints(ListAgentEndpointsRequest request) { + LOG.trace("Called listAgentEndpoints"); + final ListAgentEndpointsRequest interceptedRequest = + ListAgentEndpointsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAgentEndpointsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ListAgentEndpoints", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/AgentEndpoint/ListAgentEndpoints"); + java.util.function.Function + transformer = + ListAgentEndpointsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListAgentsResponse listAgents(ListAgentsRequest request) { + LOG.trace("Called listAgents"); + final ListAgentsRequest interceptedRequest = ListAgentsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAgentsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ListAgents", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Agent/ListAgents"); + java.util.function.Function transformer = + ListAgentsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListDataIngestionJobsResponse listDataIngestionJobs( + ListDataIngestionJobsRequest request) { + LOG.trace("Called listDataIngestionJobs"); + final ListDataIngestionJobsRequest interceptedRequest = + ListDataIngestionJobsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDataIngestionJobsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ListDataIngestionJobs", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/DataIngestionJob/ListDataIngestionJobs"); + java.util.function.Function + transformer = + ListDataIngestionJobsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListDataSourcesResponse listDataSources(ListDataSourcesRequest request) { + LOG.trace("Called listDataSources"); + final ListDataSourcesRequest interceptedRequest = + ListDataSourcesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDataSourcesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ListDataSources", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/DataSource/ListDataSources"); + java.util.function.Function + transformer = + ListDataSourcesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListKnowledgeBasesResponse listKnowledgeBases(ListKnowledgeBasesRequest request) { + LOG.trace("Called listKnowledgeBases"); + final ListKnowledgeBasesRequest interceptedRequest = + ListKnowledgeBasesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListKnowledgeBasesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ListKnowledgeBases", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/KnowledgeBase/ListKnowledgeBases"); + java.util.function.Function + transformer = + ListKnowledgeBasesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListWorkRequestErrorsResponse listWorkRequestErrors( + ListWorkRequestErrorsRequest request) { + LOG.trace("Called listWorkRequestErrors"); + final ListWorkRequestErrorsRequest interceptedRequest = + ListWorkRequestErrorsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestErrorsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ListWorkRequestErrors", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/WorkRequestError/ListWorkRequestErrors"); + java.util.function.Function + transformer = + ListWorkRequestErrorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsRequest request) { + LOG.trace("Called listWorkRequestLogs"); + final ListWorkRequestLogsRequest interceptedRequest = + ListWorkRequestLogsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestLogsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ListWorkRequestLogs", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/WorkRequestLogEntry/ListWorkRequestLogs"); + java.util.function.Function + transformer = + ListWorkRequestLogsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request) { + LOG.trace("Called listWorkRequests"); + final ListWorkRequestsRequest interceptedRequest = + ListWorkRequestsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "ListWorkRequests", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/WorkRequest/ListWorkRequests"); + java.util.function.Function + transformer = + ListWorkRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateAgentResponse updateAgent(UpdateAgentRequest request) { + LOG.trace("Called updateAgent"); + final UpdateAgentRequest interceptedRequest = + UpdateAgentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateAgentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "UpdateAgent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/Agent/UpdateAgent"); + java.util.function.Function transformer = + UpdateAgentConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateAgentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateAgentEndpointResponse updateAgentEndpoint(UpdateAgentEndpointRequest request) { + LOG.trace("Called updateAgentEndpoint"); + final UpdateAgentEndpointRequest interceptedRequest = + UpdateAgentEndpointConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateAgentEndpointConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "UpdateAgentEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/AgentEndpoint/UpdateAgentEndpoint"); + java.util.function.Function + transformer = + UpdateAgentEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateAgentEndpointDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateDataSourceResponse updateDataSource(UpdateDataSourceRequest request) { + LOG.trace("Called updateDataSource"); + final UpdateDataSourceRequest interceptedRequest = + UpdateDataSourceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateDataSourceConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "UpdateDataSource", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/DataSource/UpdateDataSource"); + java.util.function.Function + transformer = + UpdateDataSourceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateDataSourceDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateKnowledgeBaseResponse updateKnowledgeBase(UpdateKnowledgeBaseRequest request) { + LOG.trace("Called updateKnowledgeBase"); + final UpdateKnowledgeBaseRequest interceptedRequest = + UpdateKnowledgeBaseConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateKnowledgeBaseConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgent", + "UpdateKnowledgeBase", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents/20240531/KnowledgeBase/UpdateKnowledgeBase"); + java.util.function.Function + transformer = + UpdateKnowledgeBaseConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateKnowledgeBaseDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GenerativeAiAgentWaiters getWaiters() { + return waiters; + } + + @Override + public GenerativeAiAgentPaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentPaginators.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentPaginators.java new file mode 100644 index 00000000000..21db6b230e6 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentPaginators.java @@ -0,0 +1,951 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent; + +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of GenerativeAiAgent where multiple pages of data may be fetched. + * Two styles of iteration are supported: + * + *

    + *
  • Iterating over the Response objects returned by the list operation. These are referred to as ResponseIterators, and the methods are suffixed with ResponseIterator. For example: listUsersResponseIterator
  • + *
  • Iterating over the resources/records being listed. These are referred to as RecordIterators, and the methods are suffixed with RecordIterator. For example: listUsersRecordIterator
  • + *
+ * + * These iterables abstract away the need to write code to manually handle pagination via looping and using the page tokens. + * They will automatically fetch more data from the service when required. + * + * As an example, if we were using the ListUsers operation in IdentityService, then the {@link java.lang.Iterable} returned by calling a + * ResponseIterator method would iterate over the ListUsersResponse objects returned by each ListUsers call, whereas the {@link java.lang.Iterable} + * returned by calling a RecordIterator method would iterate over the User records and we don't have to deal with ListUsersResponse objects at all. + * In either case, pagination will be automatically handled so we can iterate until there are no more responses or no more resources/records available. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GenerativeAiAgentPaginators { + private final GenerativeAiAgent client; + + public GenerativeAiAgentPaginators(GenerativeAiAgent client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listAgentEndpoints operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listAgentEndpointsResponseIterator( + final ListAgentEndpointsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListAgentEndpointsRequest.Builder, ListAgentEndpointsRequest, + ListAgentEndpointsResponse>( + new java.util.function.Supplier() { + @Override + public ListAgentEndpointsRequest.Builder get() { + return ListAgentEndpointsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListAgentEndpointsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAgentEndpointsRequest.Builder>, + ListAgentEndpointsRequest>() { + @Override + public ListAgentEndpointsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAgentEndpointsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListAgentEndpointsRequest, ListAgentEndpointsResponse>() { + @Override + public ListAgentEndpointsResponse apply(ListAgentEndpointsRequest request) { + return client.listAgentEndpoints(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.generativeaiagent.model.AgentEndpointSummary} objects + * contained in responses from the listAgentEndpoints operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.generativeaiagent.model.AgentEndpointSummary} objects + * contained in responses received from the service. + */ + public Iterable + listAgentEndpointsRecordIterator(final ListAgentEndpointsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListAgentEndpointsRequest.Builder, ListAgentEndpointsRequest, + ListAgentEndpointsResponse, + com.oracle.bmc.generativeaiagent.model.AgentEndpointSummary>( + new java.util.function.Supplier() { + @Override + public ListAgentEndpointsRequest.Builder get() { + return ListAgentEndpointsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListAgentEndpointsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAgentEndpointsRequest.Builder>, + ListAgentEndpointsRequest>() { + @Override + public ListAgentEndpointsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAgentEndpointsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListAgentEndpointsRequest, ListAgentEndpointsResponse>() { + @Override + public ListAgentEndpointsResponse apply(ListAgentEndpointsRequest request) { + return client.listAgentEndpoints(request); + } + }, + new java.util.function.Function< + ListAgentEndpointsResponse, + java.util.List< + com.oracle.bmc.generativeaiagent.model.AgentEndpointSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.generativeaiagent.model.AgentEndpointSummary> + apply(ListAgentEndpointsResponse response) { + return response.getAgentEndpointCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listAgents operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listAgentsResponseIterator( + final ListAgentsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListAgentsRequest.Builder, ListAgentsRequest, ListAgentsResponse>( + new java.util.function.Supplier() { + @Override + public ListAgentsRequest.Builder get() { + return ListAgentsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListAgentsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAgentsRequest.Builder>, + ListAgentsRequest>() { + @Override + public ListAgentsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAgentsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListAgentsResponse apply(ListAgentsRequest request) { + return client.listAgents(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.generativeaiagent.model.AgentSummary} objects + * contained in responses from the listAgents operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.generativeaiagent.model.AgentSummary} objects + * contained in responses received from the service. + */ + public Iterable listAgentsRecordIterator( + final ListAgentsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListAgentsRequest.Builder, ListAgentsRequest, ListAgentsResponse, + com.oracle.bmc.generativeaiagent.model.AgentSummary>( + new java.util.function.Supplier() { + @Override + public ListAgentsRequest.Builder get() { + return ListAgentsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListAgentsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAgentsRequest.Builder>, + ListAgentsRequest>() { + @Override + public ListAgentsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAgentsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListAgentsResponse apply(ListAgentsRequest request) { + return client.listAgents(request); + } + }, + new java.util.function.Function< + ListAgentsResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListAgentsResponse response) { + return response.getAgentCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listDataIngestionJobs operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listDataIngestionJobsResponseIterator( + final ListDataIngestionJobsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListDataIngestionJobsRequest.Builder, ListDataIngestionJobsRequest, + ListDataIngestionJobsResponse>( + new java.util.function.Supplier() { + @Override + public ListDataIngestionJobsRequest.Builder get() { + return ListDataIngestionJobsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListDataIngestionJobsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDataIngestionJobsRequest.Builder>, + ListDataIngestionJobsRequest>() { + @Override + public ListDataIngestionJobsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDataIngestionJobsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListDataIngestionJobsRequest, ListDataIngestionJobsResponse>() { + @Override + public ListDataIngestionJobsResponse apply( + ListDataIngestionJobsRequest request) { + return client.listDataIngestionJobs(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.generativeaiagent.model.DataIngestionJobSummary} objects + * contained in responses from the listDataIngestionJobs operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.generativeaiagent.model.DataIngestionJobSummary} objects + * contained in responses received from the service. + */ + public Iterable + listDataIngestionJobsRecordIterator(final ListDataIngestionJobsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListDataIngestionJobsRequest.Builder, ListDataIngestionJobsRequest, + ListDataIngestionJobsResponse, + com.oracle.bmc.generativeaiagent.model.DataIngestionJobSummary>( + new java.util.function.Supplier() { + @Override + public ListDataIngestionJobsRequest.Builder get() { + return ListDataIngestionJobsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListDataIngestionJobsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDataIngestionJobsRequest.Builder>, + ListDataIngestionJobsRequest>() { + @Override + public ListDataIngestionJobsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDataIngestionJobsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListDataIngestionJobsRequest, ListDataIngestionJobsResponse>() { + @Override + public ListDataIngestionJobsResponse apply( + ListDataIngestionJobsRequest request) { + return client.listDataIngestionJobs(request); + } + }, + new java.util.function.Function< + ListDataIngestionJobsResponse, + java.util.List< + com.oracle.bmc.generativeaiagent.model.DataIngestionJobSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.generativeaiagent.model.DataIngestionJobSummary> + apply(ListDataIngestionJobsResponse response) { + return response.getDataIngestionJobCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listDataSources operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listDataSourcesResponseIterator( + final ListDataSourcesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListDataSourcesRequest.Builder, ListDataSourcesRequest, ListDataSourcesResponse>( + new java.util.function.Supplier() { + @Override + public ListDataSourcesRequest.Builder get() { + return ListDataSourcesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListDataSourcesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDataSourcesRequest.Builder>, + ListDataSourcesRequest>() { + @Override + public ListDataSourcesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDataSourcesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListDataSourcesResponse apply(ListDataSourcesRequest request) { + return client.listDataSources(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.generativeaiagent.model.DataSourceSummary} objects + * contained in responses from the listDataSources operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.generativeaiagent.model.DataSourceSummary} objects + * contained in responses received from the service. + */ + public Iterable + listDataSourcesRecordIterator(final ListDataSourcesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListDataSourcesRequest.Builder, ListDataSourcesRequest, ListDataSourcesResponse, + com.oracle.bmc.generativeaiagent.model.DataSourceSummary>( + new java.util.function.Supplier() { + @Override + public ListDataSourcesRequest.Builder get() { + return ListDataSourcesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListDataSourcesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDataSourcesRequest.Builder>, + ListDataSourcesRequest>() { + @Override + public ListDataSourcesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDataSourcesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListDataSourcesResponse apply(ListDataSourcesRequest request) { + return client.listDataSources(request); + } + }, + new java.util.function.Function< + ListDataSourcesResponse, + java.util.List< + com.oracle.bmc.generativeaiagent.model.DataSourceSummary>>() { + @Override + public java.util.List + apply(ListDataSourcesResponse response) { + return response.getDataSourceCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listKnowledgeBases operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listKnowledgeBasesResponseIterator( + final ListKnowledgeBasesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListKnowledgeBasesRequest.Builder, ListKnowledgeBasesRequest, + ListKnowledgeBasesResponse>( + new java.util.function.Supplier() { + @Override + public ListKnowledgeBasesRequest.Builder get() { + return ListKnowledgeBasesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListKnowledgeBasesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListKnowledgeBasesRequest.Builder>, + ListKnowledgeBasesRequest>() { + @Override + public ListKnowledgeBasesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListKnowledgeBasesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListKnowledgeBasesRequest, ListKnowledgeBasesResponse>() { + @Override + public ListKnowledgeBasesResponse apply(ListKnowledgeBasesRequest request) { + return client.listKnowledgeBases(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.generativeaiagent.model.KnowledgeBaseSummary} objects + * contained in responses from the listKnowledgeBases operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.generativeaiagent.model.KnowledgeBaseSummary} objects + * contained in responses received from the service. + */ + public Iterable + listKnowledgeBasesRecordIterator(final ListKnowledgeBasesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListKnowledgeBasesRequest.Builder, ListKnowledgeBasesRequest, + ListKnowledgeBasesResponse, + com.oracle.bmc.generativeaiagent.model.KnowledgeBaseSummary>( + new java.util.function.Supplier() { + @Override + public ListKnowledgeBasesRequest.Builder get() { + return ListKnowledgeBasesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListKnowledgeBasesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListKnowledgeBasesRequest.Builder>, + ListKnowledgeBasesRequest>() { + @Override + public ListKnowledgeBasesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListKnowledgeBasesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListKnowledgeBasesRequest, ListKnowledgeBasesResponse>() { + @Override + public ListKnowledgeBasesResponse apply(ListKnowledgeBasesRequest request) { + return client.listKnowledgeBases(request); + } + }, + new java.util.function.Function< + ListKnowledgeBasesResponse, + java.util.List< + com.oracle.bmc.generativeaiagent.model.KnowledgeBaseSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.generativeaiagent.model.KnowledgeBaseSummary> + apply(ListKnowledgeBasesResponse response) { + return response.getKnowledgeBaseCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listWorkRequestErrors operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listWorkRequestErrorsResponseIterator( + final ListWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListWorkRequestErrorsRequest.Builder, ListWorkRequestErrorsRequest, + ListWorkRequestErrorsResponse>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestErrorsRequest.Builder get() { + return ListWorkRequestErrorsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.Builder>, + ListWorkRequestErrorsRequest>() { + @Override + public ListWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>() { + @Override + public ListWorkRequestErrorsResponse apply( + ListWorkRequestErrorsRequest request) { + return client.listWorkRequestErrors(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.generativeaiagent.model.WorkRequestError} objects + * contained in responses from the listWorkRequestErrors operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.generativeaiagent.model.WorkRequestError} objects + * contained in responses received from the service. + */ + public Iterable + listWorkRequestErrorsRecordIterator(final ListWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListWorkRequestErrorsRequest.Builder, ListWorkRequestErrorsRequest, + ListWorkRequestErrorsResponse, + com.oracle.bmc.generativeaiagent.model.WorkRequestError>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestErrorsRequest.Builder get() { + return ListWorkRequestErrorsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.Builder>, + ListWorkRequestErrorsRequest>() { + @Override + public ListWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>() { + @Override + public ListWorkRequestErrorsResponse apply( + ListWorkRequestErrorsRequest request) { + return client.listWorkRequestErrors(request); + } + }, + new java.util.function.Function< + ListWorkRequestErrorsResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListWorkRequestErrorsResponse response) { + return response.getWorkRequestErrorCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listWorkRequestLogs operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listWorkRequestLogsResponseIterator( + final ListWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListWorkRequestLogsRequest.Builder, ListWorkRequestLogsRequest, + ListWorkRequestLogsResponse>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestLogsRequest.Builder get() { + return ListWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.Builder>, + ListWorkRequestLogsRequest>() { + @Override + public ListWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>() { + @Override + public ListWorkRequestLogsResponse apply(ListWorkRequestLogsRequest request) { + return client.listWorkRequestLogs(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.generativeaiagent.model.WorkRequestLogEntry} objects + * contained in responses from the listWorkRequestLogs operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.generativeaiagent.model.WorkRequestLogEntry} objects + * contained in responses received from the service. + */ + public Iterable + listWorkRequestLogsRecordIterator(final ListWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListWorkRequestLogsRequest.Builder, ListWorkRequestLogsRequest, + ListWorkRequestLogsResponse, + com.oracle.bmc.generativeaiagent.model.WorkRequestLogEntry>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestLogsRequest.Builder get() { + return ListWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.Builder>, + ListWorkRequestLogsRequest>() { + @Override + public ListWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>() { + @Override + public ListWorkRequestLogsResponse apply(ListWorkRequestLogsRequest request) { + return client.listWorkRequestLogs(request); + } + }, + new java.util.function.Function< + ListWorkRequestLogsResponse, + java.util.List< + com.oracle.bmc.generativeaiagent.model.WorkRequestLogEntry>>() { + @Override + public java.util.List< + com.oracle.bmc.generativeaiagent.model.WorkRequestLogEntry> + apply(ListWorkRequestLogsResponse response) { + return response.getWorkRequestLogEntryCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listWorkRequests operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listWorkRequestsResponseIterator( + final ListWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListWorkRequestsRequest.Builder, ListWorkRequestsRequest, ListWorkRequestsResponse>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestsRequest.Builder get() { + return ListWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.Builder>, + ListWorkRequestsRequest>() { + @Override + public ListWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListWorkRequestsRequest, ListWorkRequestsResponse>() { + @Override + public ListWorkRequestsResponse apply(ListWorkRequestsRequest request) { + return client.listWorkRequests(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.generativeaiagent.model.WorkRequestSummary} objects + * contained in responses from the listWorkRequests operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.generativeaiagent.model.WorkRequestSummary} objects + * contained in responses received from the service. + */ + public Iterable + listWorkRequestsRecordIterator(final ListWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListWorkRequestsRequest.Builder, ListWorkRequestsRequest, ListWorkRequestsResponse, + com.oracle.bmc.generativeaiagent.model.WorkRequestSummary>( + new java.util.function.Supplier() { + @Override + public ListWorkRequestsRequest.Builder get() { + return ListWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.Builder>, + ListWorkRequestsRequest>() { + @Override + public ListWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListWorkRequestsRequest, ListWorkRequestsResponse>() { + @Override + public ListWorkRequestsResponse apply(ListWorkRequestsRequest request) { + return client.listWorkRequests(request); + } + }, + new java.util.function.Function< + ListWorkRequestsResponse, + java.util.List< + com.oracle.bmc.generativeaiagent.model.WorkRequestSummary>>() { + @Override + public java.util.List + apply(ListWorkRequestsResponse response) { + return response.getWorkRequestSummaryCollection().getItems(); + } + }); + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentWaiters.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentWaiters.java new file mode 100644 index 00000000000..35f18bb6657 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/GenerativeAiAgentWaiters.java @@ -0,0 +1,600 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent; + +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of GenerativeAiAgent. + *

+ * The default configuration used is defined by {@link com.oracle.bmc.waiter.Waiters.Waiters#DEFAULT_POLLING_WAITER}. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GenerativeAiAgentWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final GenerativeAiAgent client; + + public GenerativeAiAgentWaiters( + java.util.concurrent.ExecutorService executorService, GenerativeAiAgent client) { + this.executorService = executorService; + this.client = client; + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forAgent( + GetAgentRequest request, + com.oracle.bmc.generativeaiagent.model.Agent.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forAgent( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forAgent( + GetAgentRequest request, + com.oracle.bmc.generativeaiagent.model.Agent.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forAgent( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forAgent( + GetAgentRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.generativeaiagent.model.Agent.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forAgent( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for Agent. + private com.oracle.bmc.waiter.Waiter forAgent( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetAgentRequest request, + final com.oracle.bmc.generativeaiagent.model.Agent.LifecycleState... targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function() { + @Override + public GetAgentResponse apply(GetAgentRequest request) { + return client.getAgent(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetAgentResponse response) { + return targetStatesSet.contains( + response.getAgent().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.generativeaiagent.model.Agent.LifecycleState + .Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forAgentEndpoint( + GetAgentEndpointRequest request, + com.oracle.bmc.generativeaiagent.model.AgentEndpoint.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forAgentEndpoint( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forAgentEndpoint( + GetAgentEndpointRequest request, + com.oracle.bmc.generativeaiagent.model.AgentEndpoint.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forAgentEndpoint( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forAgentEndpoint( + GetAgentEndpointRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.generativeaiagent.model.AgentEndpoint.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forAgentEndpoint( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for AgentEndpoint. + private com.oracle.bmc.waiter.Waiter + forAgentEndpoint( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetAgentEndpointRequest request, + final com.oracle.bmc.generativeaiagent.model.AgentEndpoint.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetAgentEndpointRequest, GetAgentEndpointResponse>() { + @Override + public GetAgentEndpointResponse apply(GetAgentEndpointRequest request) { + return client.getAgentEndpoint(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetAgentEndpointResponse response) { + return targetStatesSet.contains( + response.getAgentEndpoint().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.generativeaiagent.model.AgentEndpoint.LifecycleState + .Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forDataIngestionJob( + GetDataIngestionJobRequest request, + com.oracle.bmc.generativeaiagent.model.DataIngestionJob.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forDataIngestionJob( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forDataIngestionJob( + GetDataIngestionJobRequest request, + com.oracle.bmc.generativeaiagent.model.DataIngestionJob.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forDataIngestionJob( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forDataIngestionJob( + GetDataIngestionJobRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.generativeaiagent.model.DataIngestionJob.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forDataIngestionJob( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for DataIngestionJob. + private com.oracle.bmc.waiter.Waiter + forDataIngestionJob( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetDataIngestionJobRequest request, + final com.oracle.bmc.generativeaiagent.model.DataIngestionJob.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetDataIngestionJobRequest, GetDataIngestionJobResponse>() { + @Override + public GetDataIngestionJobResponse apply( + GetDataIngestionJobRequest request) { + return client.getDataIngestionJob(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetDataIngestionJobResponse response) { + return targetStatesSet.contains( + response.getDataIngestionJob().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.generativeaiagent.model.DataIngestionJob + .LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDataSource( + GetDataSourceRequest request, + com.oracle.bmc.generativeaiagent.model.DataSource.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forDataSource( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDataSource( + GetDataSourceRequest request, + com.oracle.bmc.generativeaiagent.model.DataSource.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forDataSource( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forDataSource( + GetDataSourceRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.generativeaiagent.model.DataSource.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forDataSource( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for DataSource. + private com.oracle.bmc.waiter.Waiter forDataSource( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetDataSourceRequest request, + final com.oracle.bmc.generativeaiagent.model.DataSource.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetDataSourceRequest, GetDataSourceResponse>() { + @Override + public GetDataSourceResponse apply(GetDataSourceRequest request) { + return client.getDataSource(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetDataSourceResponse response) { + return targetStatesSet.contains( + response.getDataSource().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.generativeaiagent.model.DataSource.LifecycleState + .Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forKnowledgeBase( + GetKnowledgeBaseRequest request, + com.oracle.bmc.generativeaiagent.model.KnowledgeBase.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forKnowledgeBase( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forKnowledgeBase( + GetKnowledgeBaseRequest request, + com.oracle.bmc.generativeaiagent.model.KnowledgeBase.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forKnowledgeBase( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forKnowledgeBase( + GetKnowledgeBaseRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.generativeaiagent.model.KnowledgeBase.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forKnowledgeBase( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for KnowledgeBase. + private com.oracle.bmc.waiter.Waiter + forKnowledgeBase( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetKnowledgeBaseRequest request, + final com.oracle.bmc.generativeaiagent.model.KnowledgeBase.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetKnowledgeBaseRequest, GetKnowledgeBaseResponse>() { + @Override + public GetKnowledgeBaseResponse apply(GetKnowledgeBaseRequest request) { + return client.getKnowledgeBase(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetKnowledgeBaseResponse response) { + return targetStatesSet.contains( + response.getKnowledgeBase().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.generativeaiagent.model.KnowledgeBase.LifecycleState + .Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using default configuration. + * + * @param request the request to send + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forWorkRequest(GetWorkRequestRequest request) { + return forWorkRequest(com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@linkcom.oracle.bmc.waiter. DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forWorkRequest( + GetWorkRequestRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + return forWorkRequest( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request); + } + + // Helper method to create a new Waiter for WorkRequest. + private com.oracle.bmc.waiter.Waiter + forWorkRequest( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetWorkRequestRequest request) { + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetWorkRequestRequest, GetWorkRequestResponse>() { + @Override + public GetWorkRequestResponse apply(GetWorkRequestRequest request) { + return client.getWorkRequest(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetWorkRequestResponse response) { + // work requests are complete once the time finished is available + return response.getWorkRequest().getTimeFinished() != null; + } + }, + false), + request); + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/SdkClientsMetadata.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/SdkClientsMetadata.java new file mode 100644 index 00000000000..4bf2964dd96 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/SdkClientsMetadata.java @@ -0,0 +1,11 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent; + +import com.oracle.bmc.SdkClients; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@SdkClients({GenerativeAiAgentAsyncClient.class, GenerativeAiAgentClient.class}) +public final class SdkClientsMetadata {} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CancelWorkRequestConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CancelWorkRequestConverter.java new file mode 100644 index 00000000000..f6f9d732ee5 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CancelWorkRequestConverter.java @@ -0,0 +1,131 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CancelWorkRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CancelWorkRequestConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.CancelWorkRequestRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.CancelWorkRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.CancelWorkRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CancelWorkRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CancelWorkRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CancelWorkRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .CancelWorkRequestResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .CancelWorkRequestResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.CancelWorkRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses.CancelWorkRequestResponse + .Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .CancelWorkRequestResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses.CancelWorkRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ChangeAgentCompartmentConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ChangeAgentCompartmentConverter.java new file mode 100644 index 00000000000..bfc782d6457 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ChangeAgentCompartmentConverter.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ChangeAgentCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ChangeAgentCompartmentConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.ChangeAgentCompartmentRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.ChangeAgentCompartmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.ChangeAgentCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAgentId(), "agentId must not be blank"); + Validate.notNull( + request.getChangeAgentCompartmentDetails(), + "changeAgentCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("agents") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAgentId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ChangeAgentCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ChangeAgentCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ChangeAgentCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .ChangeAgentCompartmentResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .ChangeAgentCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.ChangeAgentCompartmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses + .ChangeAgentCompartmentResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .ChangeAgentCompartmentResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses + .ChangeAgentCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ChangeAgentEndpointCompartmentConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ChangeAgentEndpointCompartmentConverter.java new file mode 100644 index 00000000000..41d89b49463 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ChangeAgentEndpointCompartmentConverter.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ChangeAgentEndpointCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ChangeAgentEndpointCompartmentConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.ChangeAgentEndpointCompartmentRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.ChangeAgentEndpointCompartmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.ChangeAgentEndpointCompartmentRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAgentEndpointId(), "agentEndpointId must not be blank"); + Validate.notNull( + request.getChangeAgentEndpointCompartmentDetails(), + "changeAgentEndpointCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("agentEndpoints") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAgentEndpointId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .ChangeAgentEndpointCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .ChangeAgentEndpointCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .ChangeAgentEndpointCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .ChangeAgentEndpointCompartmentResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .ChangeAgentEndpointCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.ChangeAgentEndpointCompartmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses + .ChangeAgentEndpointCompartmentResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .ChangeAgentEndpointCompartmentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses + .ChangeAgentEndpointCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ChangeKnowledgeBaseCompartmentConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ChangeKnowledgeBaseCompartmentConverter.java new file mode 100644 index 00000000000..c8a797d117f --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ChangeKnowledgeBaseCompartmentConverter.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ChangeKnowledgeBaseCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ChangeKnowledgeBaseCompartmentConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.ChangeKnowledgeBaseCompartmentRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.ChangeKnowledgeBaseCompartmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.ChangeKnowledgeBaseCompartmentRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getKnowledgeBaseId(), "knowledgeBaseId must not be blank"); + Validate.notNull( + request.getChangeKnowledgeBaseCompartmentDetails(), + "changeKnowledgeBaseCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("knowledgeBases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getKnowledgeBaseId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .ChangeKnowledgeBaseCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .ChangeKnowledgeBaseCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .ChangeKnowledgeBaseCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .ChangeKnowledgeBaseCompartmentResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .ChangeKnowledgeBaseCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.ChangeKnowledgeBaseCompartmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses + .ChangeKnowledgeBaseCompartmentResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .ChangeKnowledgeBaseCompartmentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses + .ChangeKnowledgeBaseCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CreateAgentConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CreateAgentConverter.java new file mode 100644 index 00000000000..106c9831ea3 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CreateAgentConverter.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateAgentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateAgentConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.CreateAgentRequest interceptRequest( + com.oracle.bmc.generativeaiagent.requests.CreateAgentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.CreateAgentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCreateAgentDetails(), "createAgentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240531").path("agents"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CreateAgentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CreateAgentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CreateAgentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CreateAgentResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses.CreateAgentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.CreateAgentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .Agent>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model.Agent + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model.Agent + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model.Agent> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses.CreateAgentResponse + .Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .CreateAgentResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.agent(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses.CreateAgentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CreateAgentEndpointConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CreateAgentEndpointConverter.java new file mode 100644 index 00000000000..1cfd64a4d25 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CreateAgentEndpointConverter.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateAgentEndpointConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateAgentEndpointConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.CreateAgentEndpointRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.CreateAgentEndpointRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.CreateAgentEndpointRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateAgentEndpointDetails(), "createAgentEndpointDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240531").path("agentEndpoints"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CreateAgentEndpointResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CreateAgentEndpointResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CreateAgentEndpointResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .CreateAgentEndpointResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .CreateAgentEndpointResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.CreateAgentEndpointResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .AgentEndpoint>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .AgentEndpoint + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .AgentEndpoint + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .AgentEndpoint> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses + .CreateAgentEndpointResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .CreateAgentEndpointResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.agentEndpoint(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses + .CreateAgentEndpointResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CreateDataIngestionJobConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CreateDataIngestionJobConverter.java new file mode 100644 index 00000000000..fa97b189b78 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CreateDataIngestionJobConverter.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateDataIngestionJobConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateDataIngestionJobConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.CreateDataIngestionJobRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.CreateDataIngestionJobRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.CreateDataIngestionJobRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateDataIngestionJobDetails(), + "createDataIngestionJobDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240531").path("dataIngestionJobs"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CreateDataIngestionJobResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CreateDataIngestionJobResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CreateDataIngestionJobResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .CreateDataIngestionJobResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .CreateDataIngestionJobResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.CreateDataIngestionJobResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .DataIngestionJob>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .DataIngestionJob + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .DataIngestionJob + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .DataIngestionJob> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses + .CreateDataIngestionJobResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .CreateDataIngestionJobResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.dataIngestionJob(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses + .CreateDataIngestionJobResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CreateDataSourceConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CreateDataSourceConverter.java new file mode 100644 index 00000000000..919588f7fea --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CreateDataSourceConverter.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateDataSourceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateDataSourceConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.CreateDataSourceRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.CreateDataSourceRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.CreateDataSourceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateDataSourceDetails(), "createDataSourceDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240531").path("dataSources"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CreateDataSourceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CreateDataSourceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CreateDataSourceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .CreateDataSourceResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .CreateDataSourceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.CreateDataSourceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .DataSource>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .DataSource + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .DataSource + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model.DataSource> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses.CreateDataSourceResponse + .Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .CreateDataSourceResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.dataSource(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses.CreateDataSourceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CreateKnowledgeBaseConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CreateKnowledgeBaseConverter.java new file mode 100644 index 00000000000..e7e41560aac --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/CreateKnowledgeBaseConverter.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateKnowledgeBaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateKnowledgeBaseConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.CreateKnowledgeBaseRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.CreateKnowledgeBaseRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.CreateKnowledgeBaseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateKnowledgeBaseDetails(), "createKnowledgeBaseDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240531").path("knowledgeBases"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CreateKnowledgeBaseResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CreateKnowledgeBaseResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.CreateKnowledgeBaseResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .CreateKnowledgeBaseResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .CreateKnowledgeBaseResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.CreateKnowledgeBaseResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .KnowledgeBase>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .KnowledgeBase + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .KnowledgeBase + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .KnowledgeBase> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses + .CreateKnowledgeBaseResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .CreateKnowledgeBaseResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.knowledgeBase(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses + .CreateKnowledgeBaseResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/DeleteAgentConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/DeleteAgentConverter.java new file mode 100644 index 00000000000..6f20ceaa957 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/DeleteAgentConverter.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteAgentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteAgentConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.DeleteAgentRequest interceptRequest( + com.oracle.bmc.generativeaiagent.requests.DeleteAgentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.DeleteAgentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAgentId(), "agentId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("agents") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAgentId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.DeleteAgentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.DeleteAgentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.DeleteAgentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.DeleteAgentResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses.DeleteAgentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.DeleteAgentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses.DeleteAgentResponse + .Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .DeleteAgentResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses.DeleteAgentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/DeleteAgentEndpointConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/DeleteAgentEndpointConverter.java new file mode 100644 index 00000000000..4bec3515a17 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/DeleteAgentEndpointConverter.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteAgentEndpointConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteAgentEndpointConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.DeleteAgentEndpointRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.DeleteAgentEndpointRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.DeleteAgentEndpointRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAgentEndpointId(), "agentEndpointId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("agentEndpoints") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAgentEndpointId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.DeleteAgentEndpointResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.DeleteAgentEndpointResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.DeleteAgentEndpointResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .DeleteAgentEndpointResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .DeleteAgentEndpointResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.DeleteAgentEndpointResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses + .DeleteAgentEndpointResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .DeleteAgentEndpointResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses + .DeleteAgentEndpointResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/DeleteDataIngestionJobConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/DeleteDataIngestionJobConverter.java new file mode 100644 index 00000000000..180048b1a65 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/DeleteDataIngestionJobConverter.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteDataIngestionJobConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteDataIngestionJobConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.DeleteDataIngestionJobRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.DeleteDataIngestionJobRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.DeleteDataIngestionJobRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getDataIngestionJobId(), "dataIngestionJobId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("dataIngestionJobs") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDataIngestionJobId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.DeleteDataIngestionJobResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.DeleteDataIngestionJobResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.DeleteDataIngestionJobResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .DeleteDataIngestionJobResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .DeleteDataIngestionJobResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.DeleteDataIngestionJobResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses + .DeleteDataIngestionJobResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .DeleteDataIngestionJobResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses + .DeleteDataIngestionJobResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/DeleteDataSourceConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/DeleteDataSourceConverter.java new file mode 100644 index 00000000000..91f7d6e8ffa --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/DeleteDataSourceConverter.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteDataSourceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteDataSourceConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.DeleteDataSourceRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.DeleteDataSourceRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.DeleteDataSourceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getDataSourceId(), "dataSourceId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("dataSources") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDataSourceId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.DeleteDataSourceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.DeleteDataSourceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.DeleteDataSourceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .DeleteDataSourceResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .DeleteDataSourceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.DeleteDataSourceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses.DeleteDataSourceResponse + .Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .DeleteDataSourceResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses.DeleteDataSourceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/DeleteKnowledgeBaseConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/DeleteKnowledgeBaseConverter.java new file mode 100644 index 00000000000..4c325279874 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/DeleteKnowledgeBaseConverter.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteKnowledgeBaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteKnowledgeBaseConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.DeleteKnowledgeBaseRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.DeleteKnowledgeBaseRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.DeleteKnowledgeBaseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getKnowledgeBaseId(), "knowledgeBaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("knowledgeBases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getKnowledgeBaseId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.DeleteKnowledgeBaseResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.DeleteKnowledgeBaseResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.DeleteKnowledgeBaseResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .DeleteKnowledgeBaseResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .DeleteKnowledgeBaseResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.DeleteKnowledgeBaseResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses + .DeleteKnowledgeBaseResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .DeleteKnowledgeBaseResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses + .DeleteKnowledgeBaseResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetAgentConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetAgentConverter.java new file mode 100644 index 00000000000..a16c3a9a0b9 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetAgentConverter.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetAgentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetAgentConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.GetAgentRequest interceptRequest( + com.oracle.bmc.generativeaiagent.requests.GetAgentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.GetAgentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAgentId(), "agentId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("agents") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAgentId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetAgentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetAgentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetAgentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetAgentResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses.GetAgentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.GetAgentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .Agent>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model.Agent + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model.Agent + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model.Agent> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses.GetAgentResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .GetAgentResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.agent(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses.GetAgentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetAgentEndpointConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetAgentEndpointConverter.java new file mode 100644 index 00000000000..0f221da912e --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetAgentEndpointConverter.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetAgentEndpointConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetAgentEndpointConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.GetAgentEndpointRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.GetAgentEndpointRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.GetAgentEndpointRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAgentEndpointId(), "agentEndpointId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("agentEndpoints") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAgentEndpointId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetAgentEndpointResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetAgentEndpointResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetAgentEndpointResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .GetAgentEndpointResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .GetAgentEndpointResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.GetAgentEndpointResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .AgentEndpoint>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .AgentEndpoint + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .AgentEndpoint + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .AgentEndpoint> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses.GetAgentEndpointResponse + .Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .GetAgentEndpointResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.agentEndpoint(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses.GetAgentEndpointResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetDataIngestionJobConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetDataIngestionJobConverter.java new file mode 100644 index 00000000000..bd8d7b410bf --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetDataIngestionJobConverter.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetDataIngestionJobConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetDataIngestionJobConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.GetDataIngestionJobRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.GetDataIngestionJobRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.GetDataIngestionJobRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getDataIngestionJobId(), "dataIngestionJobId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("dataIngestionJobs") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDataIngestionJobId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetDataIngestionJobResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetDataIngestionJobResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetDataIngestionJobResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .GetDataIngestionJobResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .GetDataIngestionJobResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.GetDataIngestionJobResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .DataIngestionJob>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .DataIngestionJob + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .DataIngestionJob + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .DataIngestionJob> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses + .GetDataIngestionJobResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .GetDataIngestionJobResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.dataIngestionJob(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses + .GetDataIngestionJobResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetDataIngestionJobLogContentConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetDataIngestionJobLogContentConverter.java new file mode 100644 index 00000000000..c7b95dc7dc3 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetDataIngestionJobLogContentConverter.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetDataIngestionJobLogContentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetDataIngestionJobLogContentConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.GetDataIngestionJobLogContentRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.GetDataIngestionJobLogContentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.GetDataIngestionJobLogContentRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getDataIngestionJobId(), "dataIngestionJobId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("dataIngestionJobs") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDataIngestionJobId())) + .path("logs") + .path("content"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept("text/plain; charset=utf-8"); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .GetDataIngestionJobLogContentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .GetDataIngestionJobLogContentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .GetDataIngestionJobLogContentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .GetDataIngestionJobLogContentResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .GetDataIngestionJobLogContentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.GetDataIngestionJobLogContentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.io.InputStream>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + java.io.InputStream.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + java.io.InputStream.class); + } + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses + .GetDataIngestionJobLogContentResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .GetDataIngestionJobLogContentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.inputStream(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses + .GetDataIngestionJobLogContentResponse + responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetDataSourceConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetDataSourceConverter.java new file mode 100644 index 00000000000..0007ec4be67 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetDataSourceConverter.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetDataSourceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetDataSourceConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.GetDataSourceRequest interceptRequest( + com.oracle.bmc.generativeaiagent.requests.GetDataSourceRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.GetDataSourceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getDataSourceId(), "dataSourceId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("dataSources") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDataSourceId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetDataSourceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetDataSourceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetDataSourceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .GetDataSourceResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses.GetDataSourceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.GetDataSourceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .DataSource>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .DataSource + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .DataSource + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model.DataSource> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses.GetDataSourceResponse + .Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .GetDataSourceResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.dataSource(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses.GetDataSourceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetKnowledgeBaseConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetKnowledgeBaseConverter.java new file mode 100644 index 00000000000..a124bb52aaf --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetKnowledgeBaseConverter.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetKnowledgeBaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetKnowledgeBaseConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.GetKnowledgeBaseRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.GetKnowledgeBaseRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.GetKnowledgeBaseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getKnowledgeBaseId(), "knowledgeBaseId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("knowledgeBases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getKnowledgeBaseId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetKnowledgeBaseResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetKnowledgeBaseResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetKnowledgeBaseResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .GetKnowledgeBaseResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .GetKnowledgeBaseResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.GetKnowledgeBaseResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .KnowledgeBase>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .KnowledgeBase + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .KnowledgeBase + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .KnowledgeBase> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses.GetKnowledgeBaseResponse + .Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .GetKnowledgeBaseResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.knowledgeBase(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses.GetKnowledgeBaseResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetWorkRequestConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetWorkRequestConverter.java new file mode 100644 index 00000000000..1134c169173 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/GetWorkRequestConverter.java @@ -0,0 +1,157 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetWorkRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetWorkRequestConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.GetWorkRequestRequest interceptRequest( + com.oracle.bmc.generativeaiagent.requests.GetWorkRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.GetWorkRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetWorkRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetWorkRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.GetWorkRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .GetWorkRequestResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses.GetWorkRequestResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.GetWorkRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .WorkRequest>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .WorkRequest + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .WorkRequest + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model.WorkRequest> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses.GetWorkRequestResponse + .Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .GetWorkRequestResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequest(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> retryAfterHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "retry-after"); + if (retryAfterHeader.isPresent()) { + builder.retryAfter( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "retry-after", + retryAfterHeader.get().get(0), + Integer.class)); + } + + com.oracle.bmc.generativeaiagent.responses.GetWorkRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListAgentEndpointsConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListAgentEndpointsConverter.java new file mode 100644 index 00000000000..5ad33439d4d --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListAgentEndpointsConverter.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListAgentEndpointsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListAgentEndpointsConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.ListAgentEndpointsRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.ListAgentEndpointsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.ListAgentEndpointsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240531").path("agentEndpoints"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getAgentId() != null) { + target = + target.queryParam( + "agentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAgentId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListAgentEndpointsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListAgentEndpointsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListAgentEndpointsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .ListAgentEndpointsResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .ListAgentEndpointsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.ListAgentEndpointsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .AgentEndpointCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .AgentEndpointCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .AgentEndpointCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .AgentEndpointCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses + .ListAgentEndpointsResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .ListAgentEndpointsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.agentEndpointCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses + .ListAgentEndpointsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListAgentsConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListAgentsConverter.java new file mode 100644 index 00000000000..3e11767f85a --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListAgentsConverter.java @@ -0,0 +1,198 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListAgentsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListAgentsConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.ListAgentsRequest interceptRequest( + com.oracle.bmc.generativeaiagent.requests.ListAgentsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.ListAgentsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240531").path("agents"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListAgentsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListAgentsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListAgentsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListAgentsResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses.ListAgentsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.ListAgentsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .AgentCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .AgentCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .AgentCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .AgentCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses.ListAgentsResponse + .Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .ListAgentsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.agentCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses.ListAgentsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListDataIngestionJobsConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListDataIngestionJobsConverter.java new file mode 100644 index 00000000000..9c4960ac54f --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListDataIngestionJobsConverter.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListDataIngestionJobsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListDataIngestionJobsConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.ListDataIngestionJobsRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.ListDataIngestionJobsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.ListDataIngestionJobsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240531").path("dataIngestionJobs"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getDataSourceId() != null) { + target = + target.queryParam( + "dataSourceId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDataSourceId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListDataIngestionJobsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListDataIngestionJobsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListDataIngestionJobsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .ListDataIngestionJobsResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .ListDataIngestionJobsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.ListDataIngestionJobsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .DataIngestionJobCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .DataIngestionJobCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .DataIngestionJobCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .DataIngestionJobCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses + .ListDataIngestionJobsResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .ListDataIngestionJobsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.dataIngestionJobCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses + .ListDataIngestionJobsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListDataSourcesConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListDataSourcesConverter.java new file mode 100644 index 00000000000..b6b36a971f7 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListDataSourcesConverter.java @@ -0,0 +1,208 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListDataSourcesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListDataSourcesConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.ListDataSourcesRequest interceptRequest( + com.oracle.bmc.generativeaiagent.requests.ListDataSourcesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.ListDataSourcesRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240531").path("dataSources"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getKnowledgeBaseId() != null) { + target = + target.queryParam( + "knowledgeBaseId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getKnowledgeBaseId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListDataSourcesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListDataSourcesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListDataSourcesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .ListDataSourcesResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .ListDataSourcesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.ListDataSourcesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .DataSourceCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .DataSourceCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .DataSourceCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .DataSourceCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses.ListDataSourcesResponse + .Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .ListDataSourcesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.dataSourceCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses.ListDataSourcesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListKnowledgeBasesConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListKnowledgeBasesConverter.java new file mode 100644 index 00000000000..95ac6767cd2 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListKnowledgeBasesConverter.java @@ -0,0 +1,202 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListKnowledgeBasesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListKnowledgeBasesConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.ListKnowledgeBasesRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.ListKnowledgeBasesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.ListKnowledgeBasesRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240531").path("knowledgeBases"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListKnowledgeBasesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListKnowledgeBasesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListKnowledgeBasesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .ListKnowledgeBasesResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .ListKnowledgeBasesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.ListKnowledgeBasesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .KnowledgeBaseCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .KnowledgeBaseCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .KnowledgeBaseCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .KnowledgeBaseCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses + .ListKnowledgeBasesResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .ListKnowledgeBasesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.knowledgeBaseCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses + .ListKnowledgeBasesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListWorkRequestErrorsConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListWorkRequestErrorsConverter.java new file mode 100644 index 00000000000..535ac2aa58c --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListWorkRequestErrorsConverter.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListWorkRequestErrorsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListWorkRequestErrorsConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.ListWorkRequestErrorsRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.ListWorkRequestErrorsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.ListWorkRequestErrorsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())) + .path("errors"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListWorkRequestErrorsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListWorkRequestErrorsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListWorkRequestErrorsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .ListWorkRequestErrorsResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .ListWorkRequestErrorsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.ListWorkRequestErrorsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .WorkRequestErrorCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .WorkRequestErrorCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .WorkRequestErrorCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .WorkRequestErrorCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses + .ListWorkRequestErrorsResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .ListWorkRequestErrorsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestErrorCollection(response.getItem()); + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses + .ListWorkRequestErrorsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListWorkRequestLogsConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListWorkRequestLogsConverter.java new file mode 100644 index 00000000000..5260ecde19c --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListWorkRequestLogsConverter.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListWorkRequestLogsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListWorkRequestLogsConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.ListWorkRequestLogsRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.ListWorkRequestLogsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.ListWorkRequestLogsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())) + .path("logs"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListWorkRequestLogsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListWorkRequestLogsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListWorkRequestLogsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .ListWorkRequestLogsResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .ListWorkRequestLogsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.ListWorkRequestLogsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .WorkRequestLogEntryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .WorkRequestLogEntryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .WorkRequestLogEntryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .WorkRequestLogEntryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses + .ListWorkRequestLogsResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .ListWorkRequestLogsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestLogEntryCollection(response.getItem()); + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses + .ListWorkRequestLogsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListWorkRequestsConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListWorkRequestsConverter.java new file mode 100644 index 00000000000..5f53246523a --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/ListWorkRequestsConverter.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListWorkRequestsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListWorkRequestsConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.ListWorkRequestsRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.ListWorkRequestsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.ListWorkRequestsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240531").path("workRequests"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getWorkRequestId() != null) { + target = + target.queryParam( + "workRequestId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getWorkRequestId())); + } + + if (request.getStatus() != null) { + target = + target.queryParam( + "status", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getStatus().getValue())); + } + + if (request.getResourceId() != null) { + target = + target.queryParam( + "resourceId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceId())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListWorkRequestsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListWorkRequestsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.ListWorkRequestsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .ListWorkRequestsResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .ListWorkRequestsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.ListWorkRequestsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .WorkRequestSummaryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .WorkRequestSummaryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagent.model + .WorkRequestSummaryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagent.model + .WorkRequestSummaryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses.ListWorkRequestsResponse + .Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .ListWorkRequestsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestSummaryCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses.ListWorkRequestsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/UpdateAgentConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/UpdateAgentConverter.java new file mode 100644 index 00000000000..6d308cbf22d --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/UpdateAgentConverter.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class UpdateAgentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateAgentConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.UpdateAgentRequest interceptRequest( + com.oracle.bmc.generativeaiagent.requests.UpdateAgentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.UpdateAgentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAgentId(), "agentId must not be blank"); + Validate.notNull(request.getUpdateAgentDetails(), "updateAgentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("agents") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAgentId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.UpdateAgentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.UpdateAgentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.UpdateAgentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.UpdateAgentResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses.UpdateAgentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.UpdateAgentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses.UpdateAgentResponse + .Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .UpdateAgentResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses.UpdateAgentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/UpdateAgentEndpointConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/UpdateAgentEndpointConverter.java new file mode 100644 index 00000000000..9a601b37219 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/UpdateAgentEndpointConverter.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class UpdateAgentEndpointConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateAgentEndpointConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.UpdateAgentEndpointRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.UpdateAgentEndpointRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.UpdateAgentEndpointRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAgentEndpointId(), "agentEndpointId must not be blank"); + Validate.notNull( + request.getUpdateAgentEndpointDetails(), "updateAgentEndpointDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("agentEndpoints") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAgentEndpointId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.UpdateAgentEndpointResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.UpdateAgentEndpointResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.UpdateAgentEndpointResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .UpdateAgentEndpointResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .UpdateAgentEndpointResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.UpdateAgentEndpointResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses + .UpdateAgentEndpointResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .UpdateAgentEndpointResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses + .UpdateAgentEndpointResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/UpdateDataSourceConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/UpdateDataSourceConverter.java new file mode 100644 index 00000000000..f7695cfb64b --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/UpdateDataSourceConverter.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class UpdateDataSourceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateDataSourceConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.UpdateDataSourceRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.UpdateDataSourceRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.UpdateDataSourceRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getDataSourceId(), "dataSourceId must not be blank"); + Validate.notNull( + request.getUpdateDataSourceDetails(), "updateDataSourceDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("dataSources") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDataSourceId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.UpdateDataSourceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.UpdateDataSourceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.UpdateDataSourceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .UpdateDataSourceResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .UpdateDataSourceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.UpdateDataSourceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses.UpdateDataSourceResponse + .Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .UpdateDataSourceResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses.UpdateDataSourceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/UpdateKnowledgeBaseConverter.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/UpdateKnowledgeBaseConverter.java new file mode 100644 index 00000000000..b0087612e55 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/internal/http/UpdateKnowledgeBaseConverter.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagent.model.*; +import com.oracle.bmc.generativeaiagent.requests.*; +import com.oracle.bmc.generativeaiagent.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class UpdateKnowledgeBaseConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateKnowledgeBaseConverter.class); + + public static com.oracle.bmc.generativeaiagent.requests.UpdateKnowledgeBaseRequest + interceptRequest( + com.oracle.bmc.generativeaiagent.requests.UpdateKnowledgeBaseRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagent.requests.UpdateKnowledgeBaseRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getKnowledgeBaseId(), "knowledgeBaseId must not be blank"); + Validate.notNull( + request.getUpdateKnowledgeBaseDetails(), "updateKnowledgeBaseDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("knowledgeBases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getKnowledgeBaseId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.UpdateKnowledgeBaseResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.UpdateKnowledgeBaseResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses.UpdateKnowledgeBaseResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagent.responses + .UpdateKnowledgeBaseResponse>() { + @Override + public com.oracle.bmc.generativeaiagent.responses + .UpdateKnowledgeBaseResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagent.responses.UpdateKnowledgeBaseResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagent.responses + .UpdateKnowledgeBaseResponse.Builder + builder = + com.oracle.bmc.generativeaiagent.responses + .UpdateKnowledgeBaseResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagent.responses + .UpdateKnowledgeBaseResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ActionType.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ActionType.java new file mode 100644 index 00000000000..535d35ce622 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ActionType.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * Possible types of actions. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public enum ActionType { + Created("CREATED"), + Updated("UPDATED"), + Deleted("DELETED"), + InProgress("IN_PROGRESS"), + Related("RELATED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(ActionType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActionType v : ActionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ActionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ActionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ActionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/Agent.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/Agent.java new file mode 100644 index 00000000000..1178ae8c659 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/Agent.java @@ -0,0 +1,762 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **Agent** + *

+ * An agent is an LLM-based autonomous system that understands and generates human-like text, enabling natural-language processing interactions. OCI Generative AI Agents supports retrieval-augmented generation (RAG) agents. A RAG agent connects to a data source, retrieves data, and augments model responses with the information from the data sources to generate more relevant responses. + *

+ * To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see [Getting Started with Policies](https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm). + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Agent.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Agent extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "description", + "compartmentId", + "knowledgeBaseIds", + "welcomeMessage", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public Agent( + String id, + String displayName, + String description, + String compartmentId, + java.util.List knowledgeBaseIds, + String welcomeMessage, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.description = description; + this.compartmentId = compartmentId; + this.knowledgeBaseIds = knowledgeBaseIds; + this.welcomeMessage = welcomeMessage; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Description about the agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description about the agent. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * List of [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseIds") + private java.util.List knowledgeBaseIds; + + /** + * List of [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * @param knowledgeBaseIds the value to set + * @return this builder + **/ + public Builder knowledgeBaseIds(java.util.List knowledgeBaseIds) { + this.knowledgeBaseIds = knowledgeBaseIds; + this.__explicitlySet__.add("knowledgeBaseIds"); + return this; + } + /** + * Details about purpose and responsibility of the agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("welcomeMessage") + private String welcomeMessage; + + /** + * Details about purpose and responsibility of the agent + * @param welcomeMessage the value to set + * @return this builder + **/ + public Builder welcomeMessage(String welcomeMessage) { + this.welcomeMessage = welcomeMessage; + this.__explicitlySet__.add("welcomeMessage"); + return this; + } + /** + * The date and time the agent was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the agent was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the agent was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the agent was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of the agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the agent. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message that describes the current state of the agent in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of the agent in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Agent build() { + Agent model = + new Agent( + this.id, + this.displayName, + this.description, + this.compartmentId, + this.knowledgeBaseIds, + this.welcomeMessage, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Agent model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("knowledgeBaseIds")) { + this.knowledgeBaseIds(model.getKnowledgeBaseIds()); + } + if (model.wasPropertyExplicitlySet("welcomeMessage")) { + this.welcomeMessage(model.getWelcomeMessage()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Description about the agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description about the agent. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * List of [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseIds") + private final java.util.List knowledgeBaseIds; + + /** + * List of [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * @return the value + **/ + public java.util.List getKnowledgeBaseIds() { + return knowledgeBaseIds; + } + + /** + * Details about purpose and responsibility of the agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("welcomeMessage") + private final String welcomeMessage; + + /** + * Details about purpose and responsibility of the agent + * @return the value + **/ + public String getWelcomeMessage() { + return welcomeMessage; + } + + /** + * The date and time the agent was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the agent was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the agent was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the agent was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the agent. + **/ + public enum LifecycleState { + Creating("CREATING"), + Updating("UPDATING"), + Active("ACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the agent. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message that describes the current state of the agent in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of the agent in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Agent("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", knowledgeBaseIds=").append(String.valueOf(this.knowledgeBaseIds)); + sb.append(", welcomeMessage=").append(String.valueOf(this.welcomeMessage)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Agent)) { + return false; + } + + Agent other = (Agent) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.knowledgeBaseIds, other.knowledgeBaseIds) + && java.util.Objects.equals(this.welcomeMessage, other.welcomeMessage) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.knowledgeBaseIds == null ? 43 : this.knowledgeBaseIds.hashCode()); + result = + (result * PRIME) + + (this.welcomeMessage == null ? 43 : this.welcomeMessage.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentCollection.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentCollection.java new file mode 100644 index 00000000000..a34804fb4ce --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **AgentCollection** + *

+ * Results of an agent search. Contains both AgentSummary items and other information, such as metadata. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = AgentCollection.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AgentCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public AgentCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of agents. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of agents. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AgentCollection build() { + AgentCollection model = new AgentCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AgentCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of agents. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of agents. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AgentCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AgentCollection)) { + return false; + } + + AgentCollection other = (AgentCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentEndpoint.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentEndpoint.java new file mode 100644 index 00000000000..df5617173d6 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentEndpoint.java @@ -0,0 +1,908 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **AgentEndpoint** + *

+ * The endpoint to access a deployed agent. + *

+ * To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see [Getting Started with Policies](https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm). + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = AgentEndpoint.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AgentEndpoint extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "description", + "compartmentId", + "agentId", + "contentModerationConfig", + "shouldEnableTrace", + "shouldEnableCitation", + "shouldEnableSession", + "sessionConfig", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public AgentEndpoint( + String id, + String displayName, + String description, + String compartmentId, + String agentId, + ContentModerationConfig contentModerationConfig, + Boolean shouldEnableTrace, + Boolean shouldEnableCitation, + Boolean shouldEnableSession, + SessionConfig sessionConfig, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.description = description; + this.compartmentId = compartmentId; + this.agentId = agentId; + this.contentModerationConfig = contentModerationConfig; + this.shouldEnableTrace = shouldEnableTrace; + this.shouldEnableCitation = shouldEnableCitation; + this.shouldEnableSession = shouldEnableSession; + this.sessionConfig = sessionConfig; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * An optional description of the endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * An optional description of the endpoint. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The OCID of the agent that this endpoint is associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentId") + private String agentId; + + /** + * The OCID of the agent that this endpoint is associated with. + * @param agentId the value to set + * @return this builder + **/ + public Builder agentId(String agentId) { + this.agentId = agentId; + this.__explicitlySet__.add("agentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("contentModerationConfig") + private ContentModerationConfig contentModerationConfig; + + public Builder contentModerationConfig(ContentModerationConfig contentModerationConfig) { + this.contentModerationConfig = contentModerationConfig; + this.__explicitlySet__.add("contentModerationConfig"); + return this; + } + /** + * Whether to show traces in the chat result. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableTrace") + private Boolean shouldEnableTrace; + + /** + * Whether to show traces in the chat result. + * @param shouldEnableTrace the value to set + * @return this builder + **/ + public Builder shouldEnableTrace(Boolean shouldEnableTrace) { + this.shouldEnableTrace = shouldEnableTrace; + this.__explicitlySet__.add("shouldEnableTrace"); + return this; + } + /** + * Whether to show citations in the chat result. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableCitation") + private Boolean shouldEnableCitation; + + /** + * Whether to show citations in the chat result. + * @param shouldEnableCitation the value to set + * @return this builder + **/ + public Builder shouldEnableCitation(Boolean shouldEnableCitation) { + this.shouldEnableCitation = shouldEnableCitation; + this.__explicitlySet__.add("shouldEnableCitation"); + return this; + } + /** + * Whether or not to enable Session-based chat. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableSession") + private Boolean shouldEnableSession; + + /** + * Whether or not to enable Session-based chat. + * @param shouldEnableSession the value to set + * @return this builder + **/ + public Builder shouldEnableSession(Boolean shouldEnableSession) { + this.shouldEnableSession = shouldEnableSession; + this.__explicitlySet__.add("shouldEnableSession"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("sessionConfig") + private SessionConfig sessionConfig; + + public Builder sessionConfig(SessionConfig sessionConfig) { + this.sessionConfig = sessionConfig; + this.__explicitlySet__.add("sessionConfig"); + return this; + } + /** + * The date and time the AgentEndpoint was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the AgentEndpoint was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the endpoint was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the endpoint was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of the endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the endpoint. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message that describes the current state of the endpoint in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of the endpoint in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AgentEndpoint build() { + AgentEndpoint model = + new AgentEndpoint( + this.id, + this.displayName, + this.description, + this.compartmentId, + this.agentId, + this.contentModerationConfig, + this.shouldEnableTrace, + this.shouldEnableCitation, + this.shouldEnableSession, + this.sessionConfig, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AgentEndpoint model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("agentId")) { + this.agentId(model.getAgentId()); + } + if (model.wasPropertyExplicitlySet("contentModerationConfig")) { + this.contentModerationConfig(model.getContentModerationConfig()); + } + if (model.wasPropertyExplicitlySet("shouldEnableTrace")) { + this.shouldEnableTrace(model.getShouldEnableTrace()); + } + if (model.wasPropertyExplicitlySet("shouldEnableCitation")) { + this.shouldEnableCitation(model.getShouldEnableCitation()); + } + if (model.wasPropertyExplicitlySet("shouldEnableSession")) { + this.shouldEnableSession(model.getShouldEnableSession()); + } + if (model.wasPropertyExplicitlySet("sessionConfig")) { + this.sessionConfig(model.getSessionConfig()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * An optional description of the endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * An optional description of the endpoint. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The OCID of the agent that this endpoint is associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentId") + private final String agentId; + + /** + * The OCID of the agent that this endpoint is associated with. + * @return the value + **/ + public String getAgentId() { + return agentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("contentModerationConfig") + private final ContentModerationConfig contentModerationConfig; + + public ContentModerationConfig getContentModerationConfig() { + return contentModerationConfig; + } + + /** + * Whether to show traces in the chat result. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableTrace") + private final Boolean shouldEnableTrace; + + /** + * Whether to show traces in the chat result. + * @return the value + **/ + public Boolean getShouldEnableTrace() { + return shouldEnableTrace; + } + + /** + * Whether to show citations in the chat result. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableCitation") + private final Boolean shouldEnableCitation; + + /** + * Whether to show citations in the chat result. + * @return the value + **/ + public Boolean getShouldEnableCitation() { + return shouldEnableCitation; + } + + /** + * Whether or not to enable Session-based chat. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableSession") + private final Boolean shouldEnableSession; + + /** + * Whether or not to enable Session-based chat. + * @return the value + **/ + public Boolean getShouldEnableSession() { + return shouldEnableSession; + } + + @com.fasterxml.jackson.annotation.JsonProperty("sessionConfig") + private final SessionConfig sessionConfig; + + public SessionConfig getSessionConfig() { + return sessionConfig; + } + + /** + * The date and time the AgentEndpoint was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the AgentEndpoint was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the endpoint was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the endpoint was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the endpoint. + **/ + public enum LifecycleState { + Creating("CREATING"), + Updating("UPDATING"), + Active("ACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the endpoint. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message that describes the current state of the endpoint in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of the endpoint in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AgentEndpoint("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", agentId=").append(String.valueOf(this.agentId)); + sb.append(", contentModerationConfig=") + .append(String.valueOf(this.contentModerationConfig)); + sb.append(", shouldEnableTrace=").append(String.valueOf(this.shouldEnableTrace)); + sb.append(", shouldEnableCitation=").append(String.valueOf(this.shouldEnableCitation)); + sb.append(", shouldEnableSession=").append(String.valueOf(this.shouldEnableSession)); + sb.append(", sessionConfig=").append(String.valueOf(this.sessionConfig)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AgentEndpoint)) { + return false; + } + + AgentEndpoint other = (AgentEndpoint) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.agentId, other.agentId) + && java.util.Objects.equals( + this.contentModerationConfig, other.contentModerationConfig) + && java.util.Objects.equals(this.shouldEnableTrace, other.shouldEnableTrace) + && java.util.Objects.equals(this.shouldEnableCitation, other.shouldEnableCitation) + && java.util.Objects.equals(this.shouldEnableSession, other.shouldEnableSession) + && java.util.Objects.equals(this.sessionConfig, other.sessionConfig) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.agentId == null ? 43 : this.agentId.hashCode()); + result = + (result * PRIME) + + (this.contentModerationConfig == null + ? 43 + : this.contentModerationConfig.hashCode()); + result = + (result * PRIME) + + (this.shouldEnableTrace == null ? 43 : this.shouldEnableTrace.hashCode()); + result = + (result * PRIME) + + (this.shouldEnableCitation == null + ? 43 + : this.shouldEnableCitation.hashCode()); + result = + (result * PRIME) + + (this.shouldEnableSession == null + ? 43 + : this.shouldEnableSession.hashCode()); + result = + (result * PRIME) + + (this.sessionConfig == null ? 43 : this.sessionConfig.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentEndpointCollection.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentEndpointCollection.java new file mode 100644 index 00000000000..956e9ca411c --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentEndpointCollection.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **AgentEndpointCollection** + *

+ * Results of an agentEndpoint search. Contains both AgentEndpointSummary items and other information, such as metadata. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AgentEndpointCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AgentEndpointCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public AgentEndpointCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of endpoints. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of endpoints. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AgentEndpointCollection build() { + AgentEndpointCollection model = new AgentEndpointCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AgentEndpointCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of endpoints. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of endpoints. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AgentEndpointCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AgentEndpointCollection)) { + return false; + } + + AgentEndpointCollection other = (AgentEndpointCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentEndpointSummary.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentEndpointSummary.java new file mode 100644 index 00000000000..6709ed6c6b0 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentEndpointSummary.java @@ -0,0 +1,856 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **AgentEndpointSummary** + *

+ * Summary information about an endpoint. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AgentEndpointSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AgentEndpointSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "description", + "compartmentId", + "agentId", + "contentModerationConfig", + "shouldEnableTrace", + "shouldEnableCitation", + "shouldEnableSession", + "sessionConfig", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public AgentEndpointSummary( + String id, + String displayName, + String description, + String compartmentId, + String agentId, + ContentModerationConfig contentModerationConfig, + Boolean shouldEnableTrace, + Boolean shouldEnableCitation, + Boolean shouldEnableSession, + SessionConfig sessionConfig, + java.util.Date timeCreated, + java.util.Date timeUpdated, + AgentEndpoint.LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.description = description; + this.compartmentId = compartmentId; + this.agentId = agentId; + this.contentModerationConfig = contentModerationConfig; + this.shouldEnableTrace = shouldEnableTrace; + this.shouldEnableCitation = shouldEnableCitation; + this.shouldEnableSession = shouldEnableSession; + this.sessionConfig = sessionConfig; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the AgentEndpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the AgentEndpoint. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * An optional description of the endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * An optional description of the endpoint. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The OCID of the agent that this AgentEndpoint is associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentId") + private String agentId; + + /** + * The OCID of the agent that this AgentEndpoint is associated with. + * @param agentId the value to set + * @return this builder + **/ + public Builder agentId(String agentId) { + this.agentId = agentId; + this.__explicitlySet__.add("agentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("contentModerationConfig") + private ContentModerationConfig contentModerationConfig; + + public Builder contentModerationConfig(ContentModerationConfig contentModerationConfig) { + this.contentModerationConfig = contentModerationConfig; + this.__explicitlySet__.add("contentModerationConfig"); + return this; + } + /** + * Whether to show traces in the chat result. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableTrace") + private Boolean shouldEnableTrace; + + /** + * Whether to show traces in the chat result. + * @param shouldEnableTrace the value to set + * @return this builder + **/ + public Builder shouldEnableTrace(Boolean shouldEnableTrace) { + this.shouldEnableTrace = shouldEnableTrace; + this.__explicitlySet__.add("shouldEnableTrace"); + return this; + } + /** + * Whether to show citations in the chat result. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableCitation") + private Boolean shouldEnableCitation; + + /** + * Whether to show citations in the chat result. + * @param shouldEnableCitation the value to set + * @return this builder + **/ + public Builder shouldEnableCitation(Boolean shouldEnableCitation) { + this.shouldEnableCitation = shouldEnableCitation; + this.__explicitlySet__.add("shouldEnableCitation"); + return this; + } + /** + * Whether or not to enable Session-based chat. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableSession") + private Boolean shouldEnableSession; + + /** + * Whether or not to enable Session-based chat. + * @param shouldEnableSession the value to set + * @return this builder + **/ + public Builder shouldEnableSession(Boolean shouldEnableSession) { + this.shouldEnableSession = shouldEnableSession; + this.__explicitlySet__.add("shouldEnableSession"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("sessionConfig") + private SessionConfig sessionConfig; + + public Builder sessionConfig(SessionConfig sessionConfig) { + this.sessionConfig = sessionConfig; + this.__explicitlySet__.add("sessionConfig"); + return this; + } + /** + * The date and time the endpoint was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the endpoint was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the AgentEndpoint was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the AgentEndpoint was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of the endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private AgentEndpoint.LifecycleState lifecycleState; + + /** + * The current state of the endpoint. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(AgentEndpoint.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message that describes the current state of the endpoint in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of the endpoint in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AgentEndpointSummary build() { + AgentEndpointSummary model = + new AgentEndpointSummary( + this.id, + this.displayName, + this.description, + this.compartmentId, + this.agentId, + this.contentModerationConfig, + this.shouldEnableTrace, + this.shouldEnableCitation, + this.shouldEnableSession, + this.sessionConfig, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AgentEndpointSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("agentId")) { + this.agentId(model.getAgentId()); + } + if (model.wasPropertyExplicitlySet("contentModerationConfig")) { + this.contentModerationConfig(model.getContentModerationConfig()); + } + if (model.wasPropertyExplicitlySet("shouldEnableTrace")) { + this.shouldEnableTrace(model.getShouldEnableTrace()); + } + if (model.wasPropertyExplicitlySet("shouldEnableCitation")) { + this.shouldEnableCitation(model.getShouldEnableCitation()); + } + if (model.wasPropertyExplicitlySet("shouldEnableSession")) { + this.shouldEnableSession(model.getShouldEnableSession()); + } + if (model.wasPropertyExplicitlySet("sessionConfig")) { + this.sessionConfig(model.getSessionConfig()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the AgentEndpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the AgentEndpoint. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * An optional description of the endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * An optional description of the endpoint. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The OCID of the agent that this AgentEndpoint is associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentId") + private final String agentId; + + /** + * The OCID of the agent that this AgentEndpoint is associated with. + * @return the value + **/ + public String getAgentId() { + return agentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("contentModerationConfig") + private final ContentModerationConfig contentModerationConfig; + + public ContentModerationConfig getContentModerationConfig() { + return contentModerationConfig; + } + + /** + * Whether to show traces in the chat result. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableTrace") + private final Boolean shouldEnableTrace; + + /** + * Whether to show traces in the chat result. + * @return the value + **/ + public Boolean getShouldEnableTrace() { + return shouldEnableTrace; + } + + /** + * Whether to show citations in the chat result. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableCitation") + private final Boolean shouldEnableCitation; + + /** + * Whether to show citations in the chat result. + * @return the value + **/ + public Boolean getShouldEnableCitation() { + return shouldEnableCitation; + } + + /** + * Whether or not to enable Session-based chat. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableSession") + private final Boolean shouldEnableSession; + + /** + * Whether or not to enable Session-based chat. + * @return the value + **/ + public Boolean getShouldEnableSession() { + return shouldEnableSession; + } + + @com.fasterxml.jackson.annotation.JsonProperty("sessionConfig") + private final SessionConfig sessionConfig; + + public SessionConfig getSessionConfig() { + return sessionConfig; + } + + /** + * The date and time the endpoint was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the endpoint was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the AgentEndpoint was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the AgentEndpoint was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final AgentEndpoint.LifecycleState lifecycleState; + + /** + * The current state of the endpoint. + * @return the value + **/ + public AgentEndpoint.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message that describes the current state of the endpoint in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of the endpoint in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AgentEndpointSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", agentId=").append(String.valueOf(this.agentId)); + sb.append(", contentModerationConfig=") + .append(String.valueOf(this.contentModerationConfig)); + sb.append(", shouldEnableTrace=").append(String.valueOf(this.shouldEnableTrace)); + sb.append(", shouldEnableCitation=").append(String.valueOf(this.shouldEnableCitation)); + sb.append(", shouldEnableSession=").append(String.valueOf(this.shouldEnableSession)); + sb.append(", sessionConfig=").append(String.valueOf(this.sessionConfig)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AgentEndpointSummary)) { + return false; + } + + AgentEndpointSummary other = (AgentEndpointSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.agentId, other.agentId) + && java.util.Objects.equals( + this.contentModerationConfig, other.contentModerationConfig) + && java.util.Objects.equals(this.shouldEnableTrace, other.shouldEnableTrace) + && java.util.Objects.equals(this.shouldEnableCitation, other.shouldEnableCitation) + && java.util.Objects.equals(this.shouldEnableSession, other.shouldEnableSession) + && java.util.Objects.equals(this.sessionConfig, other.sessionConfig) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.agentId == null ? 43 : this.agentId.hashCode()); + result = + (result * PRIME) + + (this.contentModerationConfig == null + ? 43 + : this.contentModerationConfig.hashCode()); + result = + (result * PRIME) + + (this.shouldEnableTrace == null ? 43 : this.shouldEnableTrace.hashCode()); + result = + (result * PRIME) + + (this.shouldEnableCitation == null + ? 43 + : this.shouldEnableCitation.hashCode()); + result = + (result * PRIME) + + (this.shouldEnableSession == null + ? 43 + : this.shouldEnableSession.hashCode()); + result = + (result * PRIME) + + (this.sessionConfig == null ? 43 : this.sessionConfig.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentSummary.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentSummary.java new file mode 100644 index 00000000000..b73da6a6ee0 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/AgentSummary.java @@ -0,0 +1,708 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **AgentSummary** + *

+ * Summary information about an agent. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = AgentSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AgentSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "description", + "compartmentId", + "knowledgeBaseIds", + "welcomeMessage", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public AgentSummary( + String id, + String displayName, + String description, + String compartmentId, + java.util.List knowledgeBaseIds, + String welcomeMessage, + java.util.Date timeCreated, + java.util.Date timeUpdated, + Agent.LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.description = description; + this.compartmentId = compartmentId; + this.knowledgeBaseIds = knowledgeBaseIds; + this.welcomeMessage = welcomeMessage; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Agent. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Description about the agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description about the agent. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * List of [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseIds") + private java.util.List knowledgeBaseIds; + + /** + * List of [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * @param knowledgeBaseIds the value to set + * @return this builder + **/ + public Builder knowledgeBaseIds(java.util.List knowledgeBaseIds) { + this.knowledgeBaseIds = knowledgeBaseIds; + this.__explicitlySet__.add("knowledgeBaseIds"); + return this; + } + /** + * Details about purpose and responsibility of the agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("welcomeMessage") + private String welcomeMessage; + + /** + * Details about purpose and responsibility of the agent + * @param welcomeMessage the value to set + * @return this builder + **/ + public Builder welcomeMessage(String welcomeMessage) { + this.welcomeMessage = welcomeMessage; + this.__explicitlySet__.add("welcomeMessage"); + return this; + } + /** + * The date and time the agent was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the agent was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the agent was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the agent was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of the agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private Agent.LifecycleState lifecycleState; + + /** + * The current state of the agent. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(Agent.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message that describes the current state of the agent in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of the agent in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AgentSummary build() { + AgentSummary model = + new AgentSummary( + this.id, + this.displayName, + this.description, + this.compartmentId, + this.knowledgeBaseIds, + this.welcomeMessage, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AgentSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("knowledgeBaseIds")) { + this.knowledgeBaseIds(model.getKnowledgeBaseIds()); + } + if (model.wasPropertyExplicitlySet("welcomeMessage")) { + this.welcomeMessage(model.getWelcomeMessage()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Agent. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Description about the agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description about the agent. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * List of [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseIds") + private final java.util.List knowledgeBaseIds; + + /** + * List of [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * @return the value + **/ + public java.util.List getKnowledgeBaseIds() { + return knowledgeBaseIds; + } + + /** + * Details about purpose and responsibility of the agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("welcomeMessage") + private final String welcomeMessage; + + /** + * Details about purpose and responsibility of the agent + * @return the value + **/ + public String getWelcomeMessage() { + return welcomeMessage; + } + + /** + * The date and time the agent was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the agent was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the agent was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the agent was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final Agent.LifecycleState lifecycleState; + + /** + * The current state of the agent. + * @return the value + **/ + public Agent.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message that describes the current state of the agent in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of the agent in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AgentSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", knowledgeBaseIds=").append(String.valueOf(this.knowledgeBaseIds)); + sb.append(", welcomeMessage=").append(String.valueOf(this.welcomeMessage)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AgentSummary)) { + return false; + } + + AgentSummary other = (AgentSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.knowledgeBaseIds, other.knowledgeBaseIds) + && java.util.Objects.equals(this.welcomeMessage, other.welcomeMessage) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.knowledgeBaseIds == null ? 43 : this.knowledgeBaseIds.hashCode()); + result = + (result * PRIME) + + (this.welcomeMessage == null ? 43 : this.welcomeMessage.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/BasicAuthSecret.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/BasicAuthSecret.java new file mode 100644 index 00000000000..1ac401c2e65 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/BasicAuthSecret.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **BasicAuthSecret** + *

+ * The details of Basic authentication configured as in OpenSearch. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = BasicAuthSecret.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class BasicAuthSecret extends SecretDetail { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the secret for basic authentication. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultSecretId") + private String vaultSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the secret for basic authentication. + * @param vaultSecretId the value to set + * @return this builder + **/ + public Builder vaultSecretId(String vaultSecretId) { + this.vaultSecretId = vaultSecretId; + this.__explicitlySet__.add("vaultSecretId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BasicAuthSecret build() { + BasicAuthSecret model = new BasicAuthSecret(this.vaultSecretId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BasicAuthSecret model) { + if (model.wasPropertyExplicitlySet("vaultSecretId")) { + this.vaultSecretId(model.getVaultSecretId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public BasicAuthSecret(String vaultSecretId) { + super(); + this.vaultSecretId = vaultSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the secret for basic authentication. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultSecretId") + private final String vaultSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the secret for basic authentication. + * @return the value + **/ + public String getVaultSecretId() { + return vaultSecretId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BasicAuthSecret("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", vaultSecretId=").append(String.valueOf(this.vaultSecretId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BasicAuthSecret)) { + return false; + } + + BasicAuthSecret other = (BasicAuthSecret) o; + return java.util.Objects.equals(this.vaultSecretId, other.vaultSecretId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.vaultSecretId == null ? 43 : this.vaultSecretId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ChangeAgentCompartmentDetails.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ChangeAgentCompartmentDetails.java new file mode 100644 index 00000000000..64825c856d7 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ChangeAgentCompartmentDetails.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **ChangeAgentCompartmentDetails** + *

+ * The configuration details for the move operation. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeAgentCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeAgentCompartmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeAgentCompartmentDetails(String compartmentId) { + super(); + this.compartmentId = compartmentId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the agent to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the agent to. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeAgentCompartmentDetails build() { + ChangeAgentCompartmentDetails model = + new ChangeAgentCompartmentDetails(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeAgentCompartmentDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the agent to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the agent to. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ChangeAgentCompartmentDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeAgentCompartmentDetails)) { + return false; + } + + ChangeAgentCompartmentDetails other = (ChangeAgentCompartmentDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ChangeAgentEndpointCompartmentDetails.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ChangeAgentEndpointCompartmentDetails.java new file mode 100644 index 00000000000..a24133e2cbd --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ChangeAgentEndpointCompartmentDetails.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **ChangeAgentEndpointCompartmentDetails** + *

+ * The configuration details for the move operation. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeAgentEndpointCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeAgentEndpointCompartmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeAgentEndpointCompartmentDetails(String compartmentId) { + super(); + this.compartmentId = compartmentId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the endpoint to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the endpoint to. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeAgentEndpointCompartmentDetails build() { + ChangeAgentEndpointCompartmentDetails model = + new ChangeAgentEndpointCompartmentDetails(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeAgentEndpointCompartmentDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the endpoint to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the endpoint to. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ChangeAgentEndpointCompartmentDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeAgentEndpointCompartmentDetails)) { + return false; + } + + ChangeAgentEndpointCompartmentDetails other = (ChangeAgentEndpointCompartmentDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ChangeKnowledgeBaseCompartmentDetails.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ChangeKnowledgeBaseCompartmentDetails.java new file mode 100644 index 00000000000..8af22cef148 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ChangeKnowledgeBaseCompartmentDetails.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **ChangeKnowledgeBaseCompartmentDetails** + *

+ * The configuration details for the move operation. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeKnowledgeBaseCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeKnowledgeBaseCompartmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeKnowledgeBaseCompartmentDetails(String compartmentId) { + super(); + this.compartmentId = compartmentId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the KnowledgeBase to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the KnowledgeBase to. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeKnowledgeBaseCompartmentDetails build() { + ChangeKnowledgeBaseCompartmentDetails model = + new ChangeKnowledgeBaseCompartmentDetails(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeKnowledgeBaseCompartmentDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the KnowledgeBase to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the KnowledgeBase to. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ChangeKnowledgeBaseCompartmentDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeKnowledgeBaseCompartmentDetails)) { + return false; + } + + ChangeKnowledgeBaseCompartmentDetails other = (ChangeKnowledgeBaseCompartmentDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ContentModerationConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ContentModerationConfig.java new file mode 100644 index 00000000000..ff27453d2e9 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ContentModerationConfig.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The configuration details about whether to apply the content moderation feature to input and output. Content moderation removes toxic and biased content from responses. It is recommended to use content moderation. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ContentModerationConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ContentModerationConfig + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"shouldEnableOnInput", "shouldEnableOnOutput"}) + public ContentModerationConfig(Boolean shouldEnableOnInput, Boolean shouldEnableOnOutput) { + super(); + this.shouldEnableOnInput = shouldEnableOnInput; + this.shouldEnableOnOutput = shouldEnableOnOutput; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A flag to enable or disable content moderation on input. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableOnInput") + private Boolean shouldEnableOnInput; + + /** + * A flag to enable or disable content moderation on input. + * @param shouldEnableOnInput the value to set + * @return this builder + **/ + public Builder shouldEnableOnInput(Boolean shouldEnableOnInput) { + this.shouldEnableOnInput = shouldEnableOnInput; + this.__explicitlySet__.add("shouldEnableOnInput"); + return this; + } + /** + * A flag to enable or disable content moderation on output. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableOnOutput") + private Boolean shouldEnableOnOutput; + + /** + * A flag to enable or disable content moderation on output. + * @param shouldEnableOnOutput the value to set + * @return this builder + **/ + public Builder shouldEnableOnOutput(Boolean shouldEnableOnOutput) { + this.shouldEnableOnOutput = shouldEnableOnOutput; + this.__explicitlySet__.add("shouldEnableOnOutput"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ContentModerationConfig build() { + ContentModerationConfig model = + new ContentModerationConfig( + this.shouldEnableOnInput, this.shouldEnableOnOutput); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ContentModerationConfig model) { + if (model.wasPropertyExplicitlySet("shouldEnableOnInput")) { + this.shouldEnableOnInput(model.getShouldEnableOnInput()); + } + if (model.wasPropertyExplicitlySet("shouldEnableOnOutput")) { + this.shouldEnableOnOutput(model.getShouldEnableOnOutput()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A flag to enable or disable content moderation on input. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableOnInput") + private final Boolean shouldEnableOnInput; + + /** + * A flag to enable or disable content moderation on input. + * @return the value + **/ + public Boolean getShouldEnableOnInput() { + return shouldEnableOnInput; + } + + /** + * A flag to enable or disable content moderation on output. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableOnOutput") + private final Boolean shouldEnableOnOutput; + + /** + * A flag to enable or disable content moderation on output. + * @return the value + **/ + public Boolean getShouldEnableOnOutput() { + return shouldEnableOnOutput; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ContentModerationConfig("); + sb.append("super=").append(super.toString()); + sb.append("shouldEnableOnInput=").append(String.valueOf(this.shouldEnableOnInput)); + sb.append(", shouldEnableOnOutput=").append(String.valueOf(this.shouldEnableOnOutput)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ContentModerationConfig)) { + return false; + } + + ContentModerationConfig other = (ContentModerationConfig) o; + return java.util.Objects.equals(this.shouldEnableOnInput, other.shouldEnableOnInput) + && java.util.Objects.equals(this.shouldEnableOnOutput, other.shouldEnableOnOutput) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.shouldEnableOnInput == null + ? 43 + : this.shouldEnableOnInput.hashCode()); + result = + (result * PRIME) + + (this.shouldEnableOnOutput == null + ? 43 + : this.shouldEnableOnOutput.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateAgentDetails.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateAgentDetails.java new file mode 100644 index 00000000000..db4b04231a2 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateAgentDetails.java @@ -0,0 +1,426 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **CreateAgentDetails** + *

+ * The data to create an agent. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAgentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateAgentDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "compartmentId", + "knowledgeBaseIds", + "welcomeMessage", + "freeformTags", + "definedTags" + }) + public CreateAgentDetails( + String displayName, + String description, + String compartmentId, + java.util.List knowledgeBaseIds, + String welcomeMessage, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.compartmentId = compartmentId; + this.knowledgeBaseIds = knowledgeBaseIds; + this.welcomeMessage = welcomeMessage; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Description about the agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description about the agent. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the agent in. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the agent in. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * List of [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseIds") + private java.util.List knowledgeBaseIds; + + /** + * List of [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * @param knowledgeBaseIds the value to set + * @return this builder + **/ + public Builder knowledgeBaseIds(java.util.List knowledgeBaseIds) { + this.knowledgeBaseIds = knowledgeBaseIds; + this.__explicitlySet__.add("knowledgeBaseIds"); + return this; + } + /** + * Details about purpose and responsibility of the agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("welcomeMessage") + private String welcomeMessage; + + /** + * Details about purpose and responsibility of the agent + * @param welcomeMessage the value to set + * @return this builder + **/ + public Builder welcomeMessage(String welcomeMessage) { + this.welcomeMessage = welcomeMessage; + this.__explicitlySet__.add("welcomeMessage"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAgentDetails build() { + CreateAgentDetails model = + new CreateAgentDetails( + this.displayName, + this.description, + this.compartmentId, + this.knowledgeBaseIds, + this.welcomeMessage, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAgentDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("knowledgeBaseIds")) { + this.knowledgeBaseIds(model.getKnowledgeBaseIds()); + } + if (model.wasPropertyExplicitlySet("welcomeMessage")) { + this.welcomeMessage(model.getWelcomeMessage()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Description about the agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description about the agent. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the agent in. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the agent in. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * List of [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseIds") + private final java.util.List knowledgeBaseIds; + + /** + * List of [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * @return the value + **/ + public java.util.List getKnowledgeBaseIds() { + return knowledgeBaseIds; + } + + /** + * Details about purpose and responsibility of the agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("welcomeMessage") + private final String welcomeMessage; + + /** + * Details about purpose and responsibility of the agent + * @return the value + **/ + public String getWelcomeMessage() { + return welcomeMessage; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateAgentDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", knowledgeBaseIds=").append(String.valueOf(this.knowledgeBaseIds)); + sb.append(", welcomeMessage=").append(String.valueOf(this.welcomeMessage)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAgentDetails)) { + return false; + } + + CreateAgentDetails other = (CreateAgentDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.knowledgeBaseIds, other.knowledgeBaseIds) + && java.util.Objects.equals(this.welcomeMessage, other.welcomeMessage) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.knowledgeBaseIds == null ? 43 : this.knowledgeBaseIds.hashCode()); + result = + (result * PRIME) + + (this.welcomeMessage == null ? 43 : this.welcomeMessage.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateAgentEndpointDetails.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateAgentEndpointDetails.java new file mode 100644 index 00000000000..62003a98b97 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateAgentEndpointDetails.java @@ -0,0 +1,573 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **CreateAgentEndpointDetails** + *

+ * The data to create an endpoint. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAgentEndpointDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateAgentEndpointDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "agentId", + "contentModerationConfig", + "shouldEnableTrace", + "shouldEnableCitation", + "shouldEnableSession", + "sessionConfig", + "compartmentId", + "freeformTags", + "definedTags" + }) + public CreateAgentEndpointDetails( + String displayName, + String description, + String agentId, + ContentModerationConfig contentModerationConfig, + Boolean shouldEnableTrace, + Boolean shouldEnableCitation, + Boolean shouldEnableSession, + SessionConfig sessionConfig, + String compartmentId, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.agentId = agentId; + this.contentModerationConfig = contentModerationConfig; + this.shouldEnableTrace = shouldEnableTrace; + this.shouldEnableCitation = shouldEnableCitation; + this.shouldEnableSession = shouldEnableSession; + this.sessionConfig = sessionConfig; + this.compartmentId = compartmentId; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * An optional description of the endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * An optional description of the endpoint. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The OCID of the agent that this endpoint is associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentId") + private String agentId; + + /** + * The OCID of the agent that this endpoint is associated with. + * @param agentId the value to set + * @return this builder + **/ + public Builder agentId(String agentId) { + this.agentId = agentId; + this.__explicitlySet__.add("agentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("contentModerationConfig") + private ContentModerationConfig contentModerationConfig; + + public Builder contentModerationConfig(ContentModerationConfig contentModerationConfig) { + this.contentModerationConfig = contentModerationConfig; + this.__explicitlySet__.add("contentModerationConfig"); + return this; + } + /** + * Whether to show traces in the chat result. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableTrace") + private Boolean shouldEnableTrace; + + /** + * Whether to show traces in the chat result. + * @param shouldEnableTrace the value to set + * @return this builder + **/ + public Builder shouldEnableTrace(Boolean shouldEnableTrace) { + this.shouldEnableTrace = shouldEnableTrace; + this.__explicitlySet__.add("shouldEnableTrace"); + return this; + } + /** + * Whether to show citations in the chat result. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableCitation") + private Boolean shouldEnableCitation; + + /** + * Whether to show citations in the chat result. + * @param shouldEnableCitation the value to set + * @return this builder + **/ + public Builder shouldEnableCitation(Boolean shouldEnableCitation) { + this.shouldEnableCitation = shouldEnableCitation; + this.__explicitlySet__.add("shouldEnableCitation"); + return this; + } + /** + * Whether or not to enable Session-based chat. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableSession") + private Boolean shouldEnableSession; + + /** + * Whether or not to enable Session-based chat. + * @param shouldEnableSession the value to set + * @return this builder + **/ + public Builder shouldEnableSession(Boolean shouldEnableSession) { + this.shouldEnableSession = shouldEnableSession; + this.__explicitlySet__.add("shouldEnableSession"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("sessionConfig") + private SessionConfig sessionConfig; + + public Builder sessionConfig(SessionConfig sessionConfig) { + this.sessionConfig = sessionConfig; + this.__explicitlySet__.add("sessionConfig"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the endpoint in. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the endpoint in. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAgentEndpointDetails build() { + CreateAgentEndpointDetails model = + new CreateAgentEndpointDetails( + this.displayName, + this.description, + this.agentId, + this.contentModerationConfig, + this.shouldEnableTrace, + this.shouldEnableCitation, + this.shouldEnableSession, + this.sessionConfig, + this.compartmentId, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAgentEndpointDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("agentId")) { + this.agentId(model.getAgentId()); + } + if (model.wasPropertyExplicitlySet("contentModerationConfig")) { + this.contentModerationConfig(model.getContentModerationConfig()); + } + if (model.wasPropertyExplicitlySet("shouldEnableTrace")) { + this.shouldEnableTrace(model.getShouldEnableTrace()); + } + if (model.wasPropertyExplicitlySet("shouldEnableCitation")) { + this.shouldEnableCitation(model.getShouldEnableCitation()); + } + if (model.wasPropertyExplicitlySet("shouldEnableSession")) { + this.shouldEnableSession(model.getShouldEnableSession()); + } + if (model.wasPropertyExplicitlySet("sessionConfig")) { + this.sessionConfig(model.getSessionConfig()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * An optional description of the endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * An optional description of the endpoint. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The OCID of the agent that this endpoint is associated with. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentId") + private final String agentId; + + /** + * The OCID of the agent that this endpoint is associated with. + * @return the value + **/ + public String getAgentId() { + return agentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("contentModerationConfig") + private final ContentModerationConfig contentModerationConfig; + + public ContentModerationConfig getContentModerationConfig() { + return contentModerationConfig; + } + + /** + * Whether to show traces in the chat result. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableTrace") + private final Boolean shouldEnableTrace; + + /** + * Whether to show traces in the chat result. + * @return the value + **/ + public Boolean getShouldEnableTrace() { + return shouldEnableTrace; + } + + /** + * Whether to show citations in the chat result. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableCitation") + private final Boolean shouldEnableCitation; + + /** + * Whether to show citations in the chat result. + * @return the value + **/ + public Boolean getShouldEnableCitation() { + return shouldEnableCitation; + } + + /** + * Whether or not to enable Session-based chat. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableSession") + private final Boolean shouldEnableSession; + + /** + * Whether or not to enable Session-based chat. + * @return the value + **/ + public Boolean getShouldEnableSession() { + return shouldEnableSession; + } + + @com.fasterxml.jackson.annotation.JsonProperty("sessionConfig") + private final SessionConfig sessionConfig; + + public SessionConfig getSessionConfig() { + return sessionConfig; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the endpoint in. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the endpoint in. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateAgentEndpointDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", agentId=").append(String.valueOf(this.agentId)); + sb.append(", contentModerationConfig=") + .append(String.valueOf(this.contentModerationConfig)); + sb.append(", shouldEnableTrace=").append(String.valueOf(this.shouldEnableTrace)); + sb.append(", shouldEnableCitation=").append(String.valueOf(this.shouldEnableCitation)); + sb.append(", shouldEnableSession=").append(String.valueOf(this.shouldEnableSession)); + sb.append(", sessionConfig=").append(String.valueOf(this.sessionConfig)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAgentEndpointDetails)) { + return false; + } + + CreateAgentEndpointDetails other = (CreateAgentEndpointDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.agentId, other.agentId) + && java.util.Objects.equals( + this.contentModerationConfig, other.contentModerationConfig) + && java.util.Objects.equals(this.shouldEnableTrace, other.shouldEnableTrace) + && java.util.Objects.equals(this.shouldEnableCitation, other.shouldEnableCitation) + && java.util.Objects.equals(this.shouldEnableSession, other.shouldEnableSession) + && java.util.Objects.equals(this.sessionConfig, other.sessionConfig) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.agentId == null ? 43 : this.agentId.hashCode()); + result = + (result * PRIME) + + (this.contentModerationConfig == null + ? 43 + : this.contentModerationConfig.hashCode()); + result = + (result * PRIME) + + (this.shouldEnableTrace == null ? 43 : this.shouldEnableTrace.hashCode()); + result = + (result * PRIME) + + (this.shouldEnableCitation == null + ? 43 + : this.shouldEnableCitation.hashCode()); + result = + (result * PRIME) + + (this.shouldEnableSession == null + ? 43 + : this.shouldEnableSession.hashCode()); + result = + (result * PRIME) + + (this.sessionConfig == null ? 43 : this.sessionConfig.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateDataIngestionJobDetails.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateDataIngestionJobDetails.java new file mode 100644 index 00000000000..05ec3706229 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateDataIngestionJobDetails.java @@ -0,0 +1,383 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **CreateDataIngestionJobDetails** + *

+ * The data to create a data ingestion job. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDataIngestionJobDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDataIngestionJobDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "dataSourceId", + "compartmentId", + "freeformTags", + "definedTags" + }) + public CreateDataIngestionJobDetails( + String displayName, + String description, + String dataSourceId, + String compartmentId, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.dataSourceId = dataSourceId; + this.compartmentId = compartmentId; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description of the data ingestion job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description of the data ingestion job. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent DataSource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataSourceId") + private String dataSourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent DataSource. + * @param dataSourceId the value to set + * @return this builder + **/ + public Builder dataSourceId(String dataSourceId) { + this.dataSourceId = dataSourceId; + this.__explicitlySet__.add("dataSourceId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the data ingestion job in. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the data ingestion job in. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDataIngestionJobDetails build() { + CreateDataIngestionJobDetails model = + new CreateDataIngestionJobDetails( + this.displayName, + this.description, + this.dataSourceId, + this.compartmentId, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDataIngestionJobDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("dataSourceId")) { + this.dataSourceId(model.getDataSourceId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description of the data ingestion job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description of the data ingestion job. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent DataSource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataSourceId") + private final String dataSourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent DataSource. + * @return the value + **/ + public String getDataSourceId() { + return dataSourceId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the data ingestion job in. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the data ingestion job in. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateDataIngestionJobDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", dataSourceId=").append(String.valueOf(this.dataSourceId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDataIngestionJobDetails)) { + return false; + } + + CreateDataIngestionJobDetails other = (CreateDataIngestionJobDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.dataSourceId, other.dataSourceId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.dataSourceId == null ? 43 : this.dataSourceId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateDataSourceDetails.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateDataSourceDetails.java new file mode 100644 index 00000000000..65dcb2f01dc --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateDataSourceDetails.java @@ -0,0 +1,413 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **CreateDataSourceDetails** + *

+ * The data to create a data source. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateDataSourceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateDataSourceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "knowledgeBaseId", + "dataSourceConfig", + "compartmentId", + "freeformTags", + "definedTags" + }) + public CreateDataSourceDetails( + String displayName, + String description, + String knowledgeBaseId, + DataSourceConfig dataSourceConfig, + String compartmentId, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.knowledgeBaseId = knowledgeBaseId; + this.dataSourceConfig = dataSourceConfig; + this.compartmentId = compartmentId; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A description of the data source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A description of the data source. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent KnowledgeBase. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseId") + private String knowledgeBaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent KnowledgeBase. + * @param knowledgeBaseId the value to set + * @return this builder + **/ + public Builder knowledgeBaseId(String knowledgeBaseId) { + this.knowledgeBaseId = knowledgeBaseId; + this.__explicitlySet__.add("knowledgeBaseId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataSourceConfig") + private DataSourceConfig dataSourceConfig; + + public Builder dataSourceConfig(DataSourceConfig dataSourceConfig) { + this.dataSourceConfig = dataSourceConfig; + this.__explicitlySet__.add("dataSourceConfig"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the data source in. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the data source in. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateDataSourceDetails build() { + CreateDataSourceDetails model = + new CreateDataSourceDetails( + this.displayName, + this.description, + this.knowledgeBaseId, + this.dataSourceConfig, + this.compartmentId, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateDataSourceDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("knowledgeBaseId")) { + this.knowledgeBaseId(model.getKnowledgeBaseId()); + } + if (model.wasPropertyExplicitlySet("dataSourceConfig")) { + this.dataSourceConfig(model.getDataSourceConfig()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A description of the data source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A description of the data source. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent KnowledgeBase. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseId") + private final String knowledgeBaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent KnowledgeBase. + * @return the value + **/ + public String getKnowledgeBaseId() { + return knowledgeBaseId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataSourceConfig") + private final DataSourceConfig dataSourceConfig; + + public DataSourceConfig getDataSourceConfig() { + return dataSourceConfig; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the data source in. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the data source in. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateDataSourceDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", knowledgeBaseId=").append(String.valueOf(this.knowledgeBaseId)); + sb.append(", dataSourceConfig=").append(String.valueOf(this.dataSourceConfig)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDataSourceDetails)) { + return false; + } + + CreateDataSourceDetails other = (CreateDataSourceDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.knowledgeBaseId, other.knowledgeBaseId) + && java.util.Objects.equals(this.dataSourceConfig, other.dataSourceConfig) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.knowledgeBaseId == null ? 43 : this.knowledgeBaseId.hashCode()); + result = + (result * PRIME) + + (this.dataSourceConfig == null ? 43 : this.dataSourceConfig.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateKnowledgeBaseDetails.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateKnowledgeBaseDetails.java new file mode 100644 index 00000000000..0d05d202bb2 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/CreateKnowledgeBaseDetails.java @@ -0,0 +1,369 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **CreateKnowledgeBaseDetails** + *

+ * The data to create a knowledge base. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateKnowledgeBaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateKnowledgeBaseDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "indexConfig", + "compartmentId", + "freeformTags", + "definedTags" + }) + public CreateKnowledgeBaseDetails( + String displayName, + String description, + IndexConfig indexConfig, + String compartmentId, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.indexConfig = indexConfig; + this.compartmentId = compartmentId; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description of the knowledge base. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description of the knowledge base. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("indexConfig") + private IndexConfig indexConfig; + + public Builder indexConfig(IndexConfig indexConfig) { + this.indexConfig = indexConfig; + this.__explicitlySet__.add("indexConfig"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the knowledge base in. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the knowledge base in. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateKnowledgeBaseDetails build() { + CreateKnowledgeBaseDetails model = + new CreateKnowledgeBaseDetails( + this.displayName, + this.description, + this.indexConfig, + this.compartmentId, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateKnowledgeBaseDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("indexConfig")) { + this.indexConfig(model.getIndexConfig()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description of the knowledge base. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description of the knowledge base. + * @return the value + **/ + public String getDescription() { + return description; + } + + @com.fasterxml.jackson.annotation.JsonProperty("indexConfig") + private final IndexConfig indexConfig; + + public IndexConfig getIndexConfig() { + return indexConfig; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the knowledge base in. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the knowledge base in. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateKnowledgeBaseDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", indexConfig=").append(String.valueOf(this.indexConfig)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateKnowledgeBaseDetails)) { + return false; + } + + CreateKnowledgeBaseDetails other = (CreateKnowledgeBaseDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.indexConfig, other.indexConfig) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.indexConfig == null ? 43 : this.indexConfig.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataIngestionJob.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataIngestionJob.java new file mode 100644 index 00000000000..c47282fcad5 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataIngestionJob.java @@ -0,0 +1,752 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **DataIngestionJob** + *

+ * When you create a data source, you specify the location of the data files. To make those files usable by an agent, you must download them into the agent's associated knowledge base, a process known as data ingestion. Data ingestion is a process that extracts data from data source documents, converts it into a structured format suitable for analysis, and then stores it in a knowledge base. + *

+ * To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see [Getting Started with Policies](https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm). + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = DataIngestionJob.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DataIngestionJob extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "description", + "compartmentId", + "dataSourceId", + "dataIngestionJobStatistics", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public DataIngestionJob( + String id, + String displayName, + String description, + String compartmentId, + String dataSourceId, + DataIngestionJobStatistics dataIngestionJobStatistics, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.description = description; + this.compartmentId = compartmentId; + this.dataSourceId = dataSourceId; + this.dataIngestionJobStatistics = dataIngestionJobStatistics; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DataIngestionJob. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DataIngestionJob. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent DataSource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataSourceId") + private String dataSourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent DataSource. + * @param dataSourceId the value to set + * @return this builder + **/ + public Builder dataSourceId(String dataSourceId) { + this.dataSourceId = dataSourceId; + this.__explicitlySet__.add("dataSourceId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataIngestionJobStatistics") + private DataIngestionJobStatistics dataIngestionJobStatistics; + + public Builder dataIngestionJobStatistics( + DataIngestionJobStatistics dataIngestionJobStatistics) { + this.dataIngestionJobStatistics = dataIngestionJobStatistics; + this.__explicitlySet__.add("dataIngestionJobStatistics"); + return this; + } + /** + * The date and time the data ingestion job was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the data ingestion job was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the data ingestion job was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the data ingestion job was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of the data ingestion job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the data ingestion job. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message that describes the current state of the data ingestion job in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of the data ingestion job in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DataIngestionJob build() { + DataIngestionJob model = + new DataIngestionJob( + this.id, + this.displayName, + this.description, + this.compartmentId, + this.dataSourceId, + this.dataIngestionJobStatistics, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DataIngestionJob model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("dataSourceId")) { + this.dataSourceId(model.getDataSourceId()); + } + if (model.wasPropertyExplicitlySet("dataIngestionJobStatistics")) { + this.dataIngestionJobStatistics(model.getDataIngestionJobStatistics()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DataIngestionJob. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DataIngestionJob. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent DataSource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataSourceId") + private final String dataSourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent DataSource. + * @return the value + **/ + public String getDataSourceId() { + return dataSourceId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataIngestionJobStatistics") + private final DataIngestionJobStatistics dataIngestionJobStatistics; + + public DataIngestionJobStatistics getDataIngestionJobStatistics() { + return dataIngestionJobStatistics; + } + + /** + * The date and time the data ingestion job was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the data ingestion job was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the data ingestion job was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the data ingestion job was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the data ingestion job. + **/ + public enum LifecycleState { + Accepted("ACCEPTED"), + InProgress("IN_PROGRESS"), + Waiting("WAITING"), + Failed("FAILED"), + Succeeded("SUCCEEDED"), + Deleting("DELETING"), + Deleted("DELETED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the data ingestion job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the data ingestion job. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message that describes the current state of the data ingestion job in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of the data ingestion job in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DataIngestionJob("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", dataSourceId=").append(String.valueOf(this.dataSourceId)); + sb.append(", dataIngestionJobStatistics=") + .append(String.valueOf(this.dataIngestionJobStatistics)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DataIngestionJob)) { + return false; + } + + DataIngestionJob other = (DataIngestionJob) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.dataSourceId, other.dataSourceId) + && java.util.Objects.equals( + this.dataIngestionJobStatistics, other.dataIngestionJobStatistics) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.dataSourceId == null ? 43 : this.dataSourceId.hashCode()); + result = + (result * PRIME) + + (this.dataIngestionJobStatistics == null + ? 43 + : this.dataIngestionJobStatistics.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataIngestionJobCollection.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataIngestionJobCollection.java new file mode 100644 index 00000000000..99d3cae17dc --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataIngestionJobCollection.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **DataIngestionJobCollection** + *

+ * Results of a data ingestion job search. Contains both DataIngestionJobSummary items and other information, such as metadata. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DataIngestionJobCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DataIngestionJobCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public DataIngestionJobCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of data ingestion jobs. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of data ingestion jobs. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DataIngestionJobCollection build() { + DataIngestionJobCollection model = new DataIngestionJobCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DataIngestionJobCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of data ingestion jobs. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of data ingestion jobs. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DataIngestionJobCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DataIngestionJobCollection)) { + return false; + } + + DataIngestionJobCollection other = (DataIngestionJobCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataIngestionJobStatistics.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataIngestionJobStatistics.java new file mode 100644 index 00000000000..4cdf8263585 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataIngestionJobStatistics.java @@ -0,0 +1,232 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **DataIngestionJobStatistics** + *

+ * The statistics of data ingestion job. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DataIngestionJobStatistics.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DataIngestionJobStatistics + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "numberOfFailedFiles", + "numberOfIngestedFiles", + "durationInSeconds" + }) + public DataIngestionJobStatistics( + Integer numberOfFailedFiles, Integer numberOfIngestedFiles, Integer durationInSeconds) { + super(); + this.numberOfFailedFiles = numberOfFailedFiles; + this.numberOfIngestedFiles = numberOfIngestedFiles; + this.durationInSeconds = durationInSeconds; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The number of files that have failed during the ingestion. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numberOfFailedFiles") + private Integer numberOfFailedFiles; + + /** + * The number of files that have failed during the ingestion. + * @param numberOfFailedFiles the value to set + * @return this builder + **/ + public Builder numberOfFailedFiles(Integer numberOfFailedFiles) { + this.numberOfFailedFiles = numberOfFailedFiles; + this.__explicitlySet__.add("numberOfFailedFiles"); + return this; + } + /** + * The number of files that have been successfully ingested during the ingestion. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numberOfIngestedFiles") + private Integer numberOfIngestedFiles; + + /** + * The number of files that have been successfully ingested during the ingestion. + * @param numberOfIngestedFiles the value to set + * @return this builder + **/ + public Builder numberOfIngestedFiles(Integer numberOfIngestedFiles) { + this.numberOfIngestedFiles = numberOfIngestedFiles; + this.__explicitlySet__.add("numberOfIngestedFiles"); + return this; + } + /** + * The duration of this ingestion job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("durationInSeconds") + private Integer durationInSeconds; + + /** + * The duration of this ingestion job. + * @param durationInSeconds the value to set + * @return this builder + **/ + public Builder durationInSeconds(Integer durationInSeconds) { + this.durationInSeconds = durationInSeconds; + this.__explicitlySet__.add("durationInSeconds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DataIngestionJobStatistics build() { + DataIngestionJobStatistics model = + new DataIngestionJobStatistics( + this.numberOfFailedFiles, + this.numberOfIngestedFiles, + this.durationInSeconds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DataIngestionJobStatistics model) { + if (model.wasPropertyExplicitlySet("numberOfFailedFiles")) { + this.numberOfFailedFiles(model.getNumberOfFailedFiles()); + } + if (model.wasPropertyExplicitlySet("numberOfIngestedFiles")) { + this.numberOfIngestedFiles(model.getNumberOfIngestedFiles()); + } + if (model.wasPropertyExplicitlySet("durationInSeconds")) { + this.durationInSeconds(model.getDurationInSeconds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The number of files that have failed during the ingestion. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numberOfFailedFiles") + private final Integer numberOfFailedFiles; + + /** + * The number of files that have failed during the ingestion. + * @return the value + **/ + public Integer getNumberOfFailedFiles() { + return numberOfFailedFiles; + } + + /** + * The number of files that have been successfully ingested during the ingestion. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numberOfIngestedFiles") + private final Integer numberOfIngestedFiles; + + /** + * The number of files that have been successfully ingested during the ingestion. + * @return the value + **/ + public Integer getNumberOfIngestedFiles() { + return numberOfIngestedFiles; + } + + /** + * The duration of this ingestion job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("durationInSeconds") + private final Integer durationInSeconds; + + /** + * The duration of this ingestion job. + * @return the value + **/ + public Integer getDurationInSeconds() { + return durationInSeconds; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DataIngestionJobStatistics("); + sb.append("super=").append(super.toString()); + sb.append("numberOfFailedFiles=").append(String.valueOf(this.numberOfFailedFiles)); + sb.append(", numberOfIngestedFiles=").append(String.valueOf(this.numberOfIngestedFiles)); + sb.append(", durationInSeconds=").append(String.valueOf(this.durationInSeconds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DataIngestionJobStatistics)) { + return false; + } + + DataIngestionJobStatistics other = (DataIngestionJobStatistics) o; + return java.util.Objects.equals(this.numberOfFailedFiles, other.numberOfFailedFiles) + && java.util.Objects.equals(this.numberOfIngestedFiles, other.numberOfIngestedFiles) + && java.util.Objects.equals(this.durationInSeconds, other.durationInSeconds) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.numberOfFailedFiles == null + ? 43 + : this.numberOfFailedFiles.hashCode()); + result = + (result * PRIME) + + (this.numberOfIngestedFiles == null + ? 43 + : this.numberOfIngestedFiles.hashCode()); + result = + (result * PRIME) + + (this.durationInSeconds == null ? 43 : this.durationInSeconds.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataIngestionJobSummary.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataIngestionJobSummary.java new file mode 100644 index 00000000000..1bed5a19009 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataIngestionJobSummary.java @@ -0,0 +1,667 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **DataIngestionJobSummary** + *

+ * Summary information about a data ingestion job. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DataIngestionJobSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DataIngestionJobSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "description", + "dataSourceId", + "compartmentId", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public DataIngestionJobSummary( + String id, + String displayName, + String description, + String dataSourceId, + String compartmentId, + java.util.Date timeCreated, + java.util.Date timeUpdated, + DataIngestionJob.LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.description = description; + this.dataSourceId = dataSourceId; + this.compartmentId = compartmentId; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data ingestion job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data ingestion job. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description of the DataSource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description of the DataSource. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent DataSource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataSourceId") + private String dataSourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent DataSource. + * @param dataSourceId the value to set + * @return this builder + **/ + public Builder dataSourceId(String dataSourceId) { + this.dataSourceId = dataSourceId; + this.__explicitlySet__.add("dataSourceId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The date and time the data ingestion job was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the data ingestion job was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the data ingestion job was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the data ingestion job was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of the data ingestion job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private DataIngestionJob.LifecycleState lifecycleState; + + /** + * The current state of the data ingestion job. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(DataIngestionJob.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message that describes the current state of the data ingestion job in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of the data ingestion job in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DataIngestionJobSummary build() { + DataIngestionJobSummary model = + new DataIngestionJobSummary( + this.id, + this.displayName, + this.description, + this.dataSourceId, + this.compartmentId, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DataIngestionJobSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("dataSourceId")) { + this.dataSourceId(model.getDataSourceId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data ingestion job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data ingestion job. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description of the DataSource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description of the DataSource. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent DataSource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataSourceId") + private final String dataSourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent DataSource. + * @return the value + **/ + public String getDataSourceId() { + return dataSourceId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The date and time the data ingestion job was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the data ingestion job was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the data ingestion job was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the data ingestion job was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the data ingestion job. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final DataIngestionJob.LifecycleState lifecycleState; + + /** + * The current state of the data ingestion job. + * @return the value + **/ + public DataIngestionJob.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message that describes the current state of the data ingestion job in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of the data ingestion job in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DataIngestionJobSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", dataSourceId=").append(String.valueOf(this.dataSourceId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DataIngestionJobSummary)) { + return false; + } + + DataIngestionJobSummary other = (DataIngestionJobSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.dataSourceId, other.dataSourceId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.dataSourceId == null ? 43 : this.dataSourceId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataSource.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataSource.java new file mode 100644 index 00000000000..b570b090d04 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataSource.java @@ -0,0 +1,749 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **DataSource** + *

+ * A data source points to the source of your data. After you add a data source to a knowledge base, you must ingest the data source's data, so that agents using the knowledge base can refer to the data. + *

+ * To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see [Getting Started with Policies](https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm). + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = DataSource.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DataSource extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "description", + "compartmentId", + "knowledgeBaseId", + "dataSourceConfig", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public DataSource( + String id, + String displayName, + String description, + String compartmentId, + String knowledgeBaseId, + DataSourceConfig dataSourceConfig, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.description = description; + this.compartmentId = compartmentId; + this.knowledgeBaseId = knowledgeBaseId; + this.dataSourceConfig = dataSourceConfig; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A description of the data source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A description of the data source. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent KnowledgeBase. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseId") + private String knowledgeBaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent KnowledgeBase. + * @param knowledgeBaseId the value to set + * @return this builder + **/ + public Builder knowledgeBaseId(String knowledgeBaseId) { + this.knowledgeBaseId = knowledgeBaseId; + this.__explicitlySet__.add("knowledgeBaseId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataSourceConfig") + private DataSourceConfig dataSourceConfig; + + public Builder dataSourceConfig(DataSourceConfig dataSourceConfig) { + this.dataSourceConfig = dataSourceConfig; + this.__explicitlySet__.add("dataSourceConfig"); + return this; + } + /** + * The date and time the data source was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the data source was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the data source was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the data source was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of the data source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the data source. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message that describes the current state of the data source in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of the data source in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DataSource build() { + DataSource model = + new DataSource( + this.id, + this.displayName, + this.description, + this.compartmentId, + this.knowledgeBaseId, + this.dataSourceConfig, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DataSource model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("knowledgeBaseId")) { + this.knowledgeBaseId(model.getKnowledgeBaseId()); + } + if (model.wasPropertyExplicitlySet("dataSourceConfig")) { + this.dataSourceConfig(model.getDataSourceConfig()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A description of the data source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A description of the data source. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent KnowledgeBase. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseId") + private final String knowledgeBaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent KnowledgeBase. + * @return the value + **/ + public String getKnowledgeBaseId() { + return knowledgeBaseId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataSourceConfig") + private final DataSourceConfig dataSourceConfig; + + public DataSourceConfig getDataSourceConfig() { + return dataSourceConfig; + } + + /** + * The date and time the data source was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the data source was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the data source was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the data source was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the data source. + **/ + public enum LifecycleState { + Creating("CREATING"), + Active("ACTIVE"), + Inactive("INACTIVE"), + Updating("UPDATING"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the data source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the data source. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message that describes the current state of the data source in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of the data source in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DataSource("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", knowledgeBaseId=").append(String.valueOf(this.knowledgeBaseId)); + sb.append(", dataSourceConfig=").append(String.valueOf(this.dataSourceConfig)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DataSource)) { + return false; + } + + DataSource other = (DataSource) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.knowledgeBaseId, other.knowledgeBaseId) + && java.util.Objects.equals(this.dataSourceConfig, other.dataSourceConfig) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.knowledgeBaseId == null ? 43 : this.knowledgeBaseId.hashCode()); + result = + (result * PRIME) + + (this.dataSourceConfig == null ? 43 : this.dataSourceConfig.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataSourceCollection.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataSourceCollection.java new file mode 100644 index 00000000000..d8d1ac4e35d --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataSourceCollection.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **DataSourceCollection** + *

+ * Results of a dataSource search. Contains both DataSourceSummary items and other information, such as metadata. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DataSourceCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DataSourceCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public DataSourceCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of data sources. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of data sources. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DataSourceCollection build() { + DataSourceCollection model = new DataSourceCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DataSourceCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of data sources. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of data sources. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DataSourceCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DataSourceCollection)) { + return false; + } + + DataSourceCollection other = (DataSourceCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataSourceConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataSourceConfig.java new file mode 100644 index 00000000000..92337179aff --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataSourceConfig.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **DataSourceConfig** + *

+ * The details of data source. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "dataSourceConfigType", + defaultImpl = DataSourceConfig.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = OciObjectStorageDataSourceConfig.class, + name = "OCI_OBJECT_STORAGE" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class DataSourceConfig extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected DataSourceConfig() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DataSourceConfig("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DataSourceConfig)) { + return false; + } + + DataSourceConfig other = (DataSourceConfig) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The type of the tool. + * The allowed values are: + * - {@code OCI_OBJECT_STORAGE}: The data source is OCI Object Storage. + * + **/ + public enum DataSourceConfigType { + OciObjectStorage("OCI_OBJECT_STORAGE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DataSourceConfigType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DataSourceConfigType v : DataSourceConfigType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DataSourceConfigType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DataSourceConfigType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DataSourceConfigType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataSourceSummary.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataSourceSummary.java new file mode 100644 index 00000000000..115d0327660 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DataSourceSummary.java @@ -0,0 +1,668 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **DataSourceSummary** + *

+ * Summary information about a data source. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DataSourceSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DataSourceSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "description", + "knowledgeBaseId", + "compartmentId", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public DataSourceSummary( + String id, + String displayName, + String description, + String knowledgeBaseId, + String compartmentId, + java.util.Date timeCreated, + java.util.Date timeUpdated, + DataSource.LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.description = description; + this.knowledgeBaseId = knowledgeBaseId; + this.compartmentId = compartmentId; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A description of the data source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A description of the data source. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent KnowledgeBase. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseId") + private String knowledgeBaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent KnowledgeBase. + * @param knowledgeBaseId the value to set + * @return this builder + **/ + public Builder knowledgeBaseId(String knowledgeBaseId) { + this.knowledgeBaseId = knowledgeBaseId; + this.__explicitlySet__.add("knowledgeBaseId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The date and time the data source was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the data source was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the DataSource was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the DataSource was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of the data source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private DataSource.LifecycleState lifecycleState; + + /** + * The current state of the data source. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(DataSource.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message that describes the current state of the data source in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of the data source in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DataSourceSummary build() { + DataSourceSummary model = + new DataSourceSummary( + this.id, + this.displayName, + this.description, + this.knowledgeBaseId, + this.compartmentId, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DataSourceSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("knowledgeBaseId")) { + this.knowledgeBaseId(model.getKnowledgeBaseId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A description of the data source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A description of the data source. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent KnowledgeBase. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseId") + private final String knowledgeBaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent KnowledgeBase. + * @return the value + **/ + public String getKnowledgeBaseId() { + return knowledgeBaseId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The date and time the data source was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the data source was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the DataSource was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the DataSource was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the data source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final DataSource.LifecycleState lifecycleState; + + /** + * The current state of the data source. + * @return the value + **/ + public DataSource.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message that describes the current state of the data source in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of the data source in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DataSourceSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", knowledgeBaseId=").append(String.valueOf(this.knowledgeBaseId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DataSourceSummary)) { + return false; + } + + DataSourceSummary other = (DataSourceSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.knowledgeBaseId, other.knowledgeBaseId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.knowledgeBaseId == null ? 43 : this.knowledgeBaseId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DatabaseConnection.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DatabaseConnection.java new file mode 100644 index 00000000000..ebdd1d0d53c --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DatabaseConnection.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **DatabaseConnection** + *

+ * The connection type for Databases. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "connectionType", + defaultImpl = DatabaseConnection.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DatabaseToolConnection.class, + name = "DATABASE_TOOL_CONNECTION" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class DatabaseConnection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected DatabaseConnection() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DatabaseConnection("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DatabaseConnection)) { + return false; + } + + DatabaseConnection other = (DatabaseConnection) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The type of Database connection. + * The allowed values are: + * - {@code DATABASE_TOOL_CONNECTION}: This allows the service to connect to a vector store via a Database Tools Connection. + * + **/ + public enum ConnectionType { + DatabaseToolConnection("DATABASE_TOOL_CONNECTION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ConnectionType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ConnectionType v : ConnectionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ConnectionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ConnectionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ConnectionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DatabaseFunction.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DatabaseFunction.java new file mode 100644 index 00000000000..035b1e8286f --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DatabaseFunction.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **DatabaseFunction** + *

+ * The details of Database function. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = DatabaseFunction.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DatabaseFunction extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name"}) + public DatabaseFunction(String name) { + super(); + this.name = name; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the Database function. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of the Database function. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DatabaseFunction build() { + DatabaseFunction model = new DatabaseFunction(this.name); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DatabaseFunction model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the Database function. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the Database function. + * + * @return the value + **/ + public String getName() { + return name; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DatabaseFunction("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DatabaseFunction)) { + return false; + } + + DatabaseFunction other = (DatabaseFunction) o; + return java.util.Objects.equals(this.name, other.name) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DatabaseToolConnection.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DatabaseToolConnection.java new file mode 100644 index 00000000000..4639215a237 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DatabaseToolConnection.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **DatabaseToolConnection** + *

+ * The details of the customer Database Tools Connection. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DatabaseToolConnection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "connectionType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DatabaseToolConnection extends DatabaseConnection { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Tools Connection. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("connectionId") + private String connectionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Tools Connection. + * @param connectionId the value to set + * @return this builder + **/ + public Builder connectionId(String connectionId) { + this.connectionId = connectionId; + this.__explicitlySet__.add("connectionId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DatabaseToolConnection build() { + DatabaseToolConnection model = new DatabaseToolConnection(this.connectionId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DatabaseToolConnection model) { + if (model.wasPropertyExplicitlySet("connectionId")) { + this.connectionId(model.getConnectionId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DatabaseToolConnection(String connectionId) { + super(); + this.connectionId = connectionId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Tools Connection. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("connectionId") + private final String connectionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Tools Connection. + * @return the value + **/ + public String getConnectionId() { + return connectionId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DatabaseToolConnection("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", connectionId=").append(String.valueOf(this.connectionId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DatabaseToolConnection)) { + return false; + } + + DatabaseToolConnection other = (DatabaseToolConnection) o; + return java.util.Objects.equals(this.connectionId, other.connectionId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.connectionId == null ? 43 : this.connectionId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DefaultIndexConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DefaultIndexConfig.java new file mode 100644 index 00000000000..0e51c0de38e --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/DefaultIndexConfig.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **DefaultIndexConfig** + *

+ * The default index is service managed vector store on behalf of the customer. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DefaultIndexConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "indexConfigType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DefaultIndexConfig extends IndexConfig { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Whether to enable Hybrid search in service managed OpenSearch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableHybridSearch") + private Boolean shouldEnableHybridSearch; + + /** + * Whether to enable Hybrid search in service managed OpenSearch. + * @param shouldEnableHybridSearch the value to set + * @return this builder + **/ + public Builder shouldEnableHybridSearch(Boolean shouldEnableHybridSearch) { + this.shouldEnableHybridSearch = shouldEnableHybridSearch; + this.__explicitlySet__.add("shouldEnableHybridSearch"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DefaultIndexConfig build() { + DefaultIndexConfig model = new DefaultIndexConfig(this.shouldEnableHybridSearch); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DefaultIndexConfig model) { + if (model.wasPropertyExplicitlySet("shouldEnableHybridSearch")) { + this.shouldEnableHybridSearch(model.getShouldEnableHybridSearch()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DefaultIndexConfig(Boolean shouldEnableHybridSearch) { + super(); + this.shouldEnableHybridSearch = shouldEnableHybridSearch; + } + + /** + * Whether to enable Hybrid search in service managed OpenSearch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableHybridSearch") + private final Boolean shouldEnableHybridSearch; + + /** + * Whether to enable Hybrid search in service managed OpenSearch. + * @return the value + **/ + public Boolean getShouldEnableHybridSearch() { + return shouldEnableHybridSearch; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DefaultIndexConfig("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", shouldEnableHybridSearch=") + .append(String.valueOf(this.shouldEnableHybridSearch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DefaultIndexConfig)) { + return false; + } + + DefaultIndexConfig other = (DefaultIndexConfig) o; + return java.util.Objects.equals( + this.shouldEnableHybridSearch, other.shouldEnableHybridSearch) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.shouldEnableHybridSearch == null + ? 43 + : this.shouldEnableHybridSearch.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/IdcsSecret.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/IdcsSecret.java new file mode 100644 index 00000000000..593227004ab --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/IdcsSecret.java @@ -0,0 +1,253 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **IdcsSecret** + *

+ * The details of IDCS configured as OpenID setting in OpenSearch. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = IdcsSecret.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class IdcsSecret extends SecretDetail { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The URL represent authentication url of the IDCS. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idcsUrl") + private String idcsUrl; + + /** + * The URL represent authentication url of the IDCS. + * @param idcsUrl the value to set + * @return this builder + **/ + public Builder idcsUrl(String idcsUrl) { + this.idcsUrl = idcsUrl; + this.__explicitlySet__.add("idcsUrl"); + return this; + } + /** + * The IDCS Connect clientId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clientId") + private String clientId; + + /** + * The IDCS Connect clientId. + * @param clientId the value to set + * @return this builder + **/ + public Builder clientId(String clientId) { + this.clientId = clientId; + this.__explicitlySet__.add("clientId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the secret for client secret. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultSecretId") + private String vaultSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the secret for client secret. + * @param vaultSecretId the value to set + * @return this builder + **/ + public Builder vaultSecretId(String vaultSecretId) { + this.vaultSecretId = vaultSecretId; + this.__explicitlySet__.add("vaultSecretId"); + return this; + } + /** + * Fully qualified scope url + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scopeUrl") + private String scopeUrl; + + /** + * Fully qualified scope url + * @param scopeUrl the value to set + * @return this builder + **/ + public Builder scopeUrl(String scopeUrl) { + this.scopeUrl = scopeUrl; + this.__explicitlySet__.add("scopeUrl"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public IdcsSecret build() { + IdcsSecret model = + new IdcsSecret(this.idcsUrl, this.clientId, this.vaultSecretId, this.scopeUrl); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(IdcsSecret model) { + if (model.wasPropertyExplicitlySet("idcsUrl")) { + this.idcsUrl(model.getIdcsUrl()); + } + if (model.wasPropertyExplicitlySet("clientId")) { + this.clientId(model.getClientId()); + } + if (model.wasPropertyExplicitlySet("vaultSecretId")) { + this.vaultSecretId(model.getVaultSecretId()); + } + if (model.wasPropertyExplicitlySet("scopeUrl")) { + this.scopeUrl(model.getScopeUrl()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public IdcsSecret(String idcsUrl, String clientId, String vaultSecretId, String scopeUrl) { + super(); + this.idcsUrl = idcsUrl; + this.clientId = clientId; + this.vaultSecretId = vaultSecretId; + this.scopeUrl = scopeUrl; + } + + /** + * The URL represent authentication url of the IDCS. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idcsUrl") + private final String idcsUrl; + + /** + * The URL represent authentication url of the IDCS. + * @return the value + **/ + public String getIdcsUrl() { + return idcsUrl; + } + + /** + * The IDCS Connect clientId. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clientId") + private final String clientId; + + /** + * The IDCS Connect clientId. + * @return the value + **/ + public String getClientId() { + return clientId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the secret for client secret. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vaultSecretId") + private final String vaultSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the secret for client secret. + * @return the value + **/ + public String getVaultSecretId() { + return vaultSecretId; + } + + /** + * Fully qualified scope url + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scopeUrl") + private final String scopeUrl; + + /** + * Fully qualified scope url + * @return the value + **/ + public String getScopeUrl() { + return scopeUrl; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("IdcsSecret("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", idcsUrl=").append(String.valueOf(this.idcsUrl)); + sb.append(", clientId=").append(String.valueOf(this.clientId)); + sb.append(", vaultSecretId=").append(String.valueOf(this.vaultSecretId)); + sb.append(", scopeUrl=").append(String.valueOf(this.scopeUrl)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof IdcsSecret)) { + return false; + } + + IdcsSecret other = (IdcsSecret) o; + return java.util.Objects.equals(this.idcsUrl, other.idcsUrl) + && java.util.Objects.equals(this.clientId, other.clientId) + && java.util.Objects.equals(this.vaultSecretId, other.vaultSecretId) + && java.util.Objects.equals(this.scopeUrl, other.scopeUrl) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.idcsUrl == null ? 43 : this.idcsUrl.hashCode()); + result = (result * PRIME) + (this.clientId == null ? 43 : this.clientId.hashCode()); + result = + (result * PRIME) + + (this.vaultSecretId == null ? 43 : this.vaultSecretId.hashCode()); + result = (result * PRIME) + (this.scopeUrl == null ? 43 : this.scopeUrl.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/Index.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/Index.java new file mode 100644 index 00000000000..e0beb75e01f --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/Index.java @@ -0,0 +1,159 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **Index** + *

+ * OCI OpenSearch index details. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Index.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Index extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "schema"}) + public Index(String name, IndexSchema schema) { + super(); + this.name = name; + this.schema = schema; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The index name in opensearch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The index name in opensearch. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("schema") + private IndexSchema schema; + + public Builder schema(IndexSchema schema) { + this.schema = schema; + this.__explicitlySet__.add("schema"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Index build() { + Index model = new Index(this.name, this.schema); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Index model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("schema")) { + this.schema(model.getSchema()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The index name in opensearch. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The index name in opensearch. + * @return the value + **/ + public String getName() { + return name; + } + + @com.fasterxml.jackson.annotation.JsonProperty("schema") + private final IndexSchema schema; + + public IndexSchema getSchema() { + return schema; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Index("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", schema=").append(String.valueOf(this.schema)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Index)) { + return false; + } + + Index other = (Index) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.schema, other.schema) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.schema == null ? 43 : this.schema.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/IndexConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/IndexConfig.java new file mode 100644 index 00000000000..3cea7fb191e --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/IndexConfig.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **IndexConfig** + *

+ * The index configuration of Knowledge bases. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "indexConfigType", + defaultImpl = IndexConfig.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DefaultIndexConfig.class, + name = "DEFAULT_INDEX_CONFIG" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = OciDatabaseConfig.class, + name = "OCI_DATABASE_CONFIG" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = OciOpenSearchIndexConfig.class, + name = "OCI_OPEN_SEARCH_INDEX_CONFIG" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class IndexConfig extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected IndexConfig() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("IndexConfig("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof IndexConfig)) { + return false; + } + + IndexConfig other = (IndexConfig) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The type of index. + * The allowed values are: + * - {@code DEFAULT_INDEX_CONFIG}: DefaultIndexConfig allows the service to create and manage vector store on behalf of the customer. + * - {@code OCI_OPEN_SEARCH_INDEX_CONFIG}: OciOpenSearchIndexConfig allows customer to configure their OpenSearch cluster. + * - {@code OCI_DATABASE_CONFIG}: OciDatabaseConfig allows customer to configure their Database. + * + **/ + public enum IndexConfigType { + DefaultIndexConfig("DEFAULT_INDEX_CONFIG"), + OciOpenSearchIndexConfig("OCI_OPEN_SEARCH_INDEX_CONFIG"), + OciDatabaseConfig("OCI_DATABASE_CONFIG"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(IndexConfigType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (IndexConfigType v : IndexConfigType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + IndexConfigType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static IndexConfigType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'IndexConfigType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/IndexSchema.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/IndexSchema.java new file mode 100644 index 00000000000..e29263fbea9 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/IndexSchema.java @@ -0,0 +1,251 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **IndexSchema** + *

+ * The index schema details. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = IndexSchema.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class IndexSchema extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"bodyKey", "urlKey", "titleKey", "embeddingBodyKey"}) + public IndexSchema(String bodyKey, String urlKey, String titleKey, String embeddingBodyKey) { + super(); + this.bodyKey = bodyKey; + this.urlKey = urlKey; + this.titleKey = titleKey; + this.embeddingBodyKey = embeddingBodyKey; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Body key name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bodyKey") + private String bodyKey; + + /** + * Body key name. + * @param bodyKey the value to set + * @return this builder + **/ + public Builder bodyKey(String bodyKey) { + this.bodyKey = bodyKey; + this.__explicitlySet__.add("bodyKey"); + return this; + } + /** + * URL key that stores the URL of a document, if available. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("urlKey") + private String urlKey; + + /** + * URL key that stores the URL of a document, if available. + * @param urlKey the value to set + * @return this builder + **/ + public Builder urlKey(String urlKey) { + this.urlKey = urlKey; + this.__explicitlySet__.add("urlKey"); + return this; + } + /** + * Title key that stores the Title of a document, if available. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("titleKey") + private String titleKey; + + /** + * Title key that stores the Title of a document, if available. + * @param titleKey the value to set + * @return this builder + **/ + public Builder titleKey(String titleKey) { + this.titleKey = titleKey; + this.__explicitlySet__.add("titleKey"); + return this; + } + /** + * Field within customer managed OCI OpenSearch document containing the vector embedding for queries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("embeddingBodyKey") + private String embeddingBodyKey; + + /** + * Field within customer managed OCI OpenSearch document containing the vector embedding for queries. + * @param embeddingBodyKey the value to set + * @return this builder + **/ + public Builder embeddingBodyKey(String embeddingBodyKey) { + this.embeddingBodyKey = embeddingBodyKey; + this.__explicitlySet__.add("embeddingBodyKey"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public IndexSchema build() { + IndexSchema model = + new IndexSchema( + this.bodyKey, this.urlKey, this.titleKey, this.embeddingBodyKey); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(IndexSchema model) { + if (model.wasPropertyExplicitlySet("bodyKey")) { + this.bodyKey(model.getBodyKey()); + } + if (model.wasPropertyExplicitlySet("urlKey")) { + this.urlKey(model.getUrlKey()); + } + if (model.wasPropertyExplicitlySet("titleKey")) { + this.titleKey(model.getTitleKey()); + } + if (model.wasPropertyExplicitlySet("embeddingBodyKey")) { + this.embeddingBodyKey(model.getEmbeddingBodyKey()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Body key name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bodyKey") + private final String bodyKey; + + /** + * Body key name. + * @return the value + **/ + public String getBodyKey() { + return bodyKey; + } + + /** + * URL key that stores the URL of a document, if available. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("urlKey") + private final String urlKey; + + /** + * URL key that stores the URL of a document, if available. + * @return the value + **/ + public String getUrlKey() { + return urlKey; + } + + /** + * Title key that stores the Title of a document, if available. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("titleKey") + private final String titleKey; + + /** + * Title key that stores the Title of a document, if available. + * @return the value + **/ + public String getTitleKey() { + return titleKey; + } + + /** + * Field within customer managed OCI OpenSearch document containing the vector embedding for queries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("embeddingBodyKey") + private final String embeddingBodyKey; + + /** + * Field within customer managed OCI OpenSearch document containing the vector embedding for queries. + * @return the value + **/ + public String getEmbeddingBodyKey() { + return embeddingBodyKey; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("IndexSchema("); + sb.append("super=").append(super.toString()); + sb.append("bodyKey=").append(String.valueOf(this.bodyKey)); + sb.append(", urlKey=").append(String.valueOf(this.urlKey)); + sb.append(", titleKey=").append(String.valueOf(this.titleKey)); + sb.append(", embeddingBodyKey=").append(String.valueOf(this.embeddingBodyKey)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof IndexSchema)) { + return false; + } + + IndexSchema other = (IndexSchema) o; + return java.util.Objects.equals(this.bodyKey, other.bodyKey) + && java.util.Objects.equals(this.urlKey, other.urlKey) + && java.util.Objects.equals(this.titleKey, other.titleKey) + && java.util.Objects.equals(this.embeddingBodyKey, other.embeddingBodyKey) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.bodyKey == null ? 43 : this.bodyKey.hashCode()); + result = (result * PRIME) + (this.urlKey == null ? 43 : this.urlKey.hashCode()); + result = (result * PRIME) + (this.titleKey == null ? 43 : this.titleKey.hashCode()); + result = + (result * PRIME) + + (this.embeddingBodyKey == null ? 43 : this.embeddingBodyKey.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/KnowledgeBase.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/KnowledgeBase.java new file mode 100644 index 00000000000..693f328f0ed --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/KnowledgeBase.java @@ -0,0 +1,705 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **KnowledgeBase** + *

+ * A knowledge base is the base for all the data sources that an agent can use to retrieve information for its responses. + *

+ * To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see [Getting Started with Policies](https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm). + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = KnowledgeBase.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class KnowledgeBase extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "description", + "compartmentId", + "indexConfig", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public KnowledgeBase( + String id, + String displayName, + String description, + String compartmentId, + IndexConfig indexConfig, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.description = description; + this.compartmentId = compartmentId; + this.indexConfig = indexConfig; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A description of the knowledge base. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A description of the knowledge base. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("indexConfig") + private IndexConfig indexConfig; + + public Builder indexConfig(IndexConfig indexConfig) { + this.indexConfig = indexConfig; + this.__explicitlySet__.add("indexConfig"); + return this; + } + /** + * The date and time the knowledge base was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the knowledge base was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the knowledge base was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the knowledge base was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of the knowledge base. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the knowledge base. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message that describes the current state of the knowledge base in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of the knowledge base in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public KnowledgeBase build() { + KnowledgeBase model = + new KnowledgeBase( + this.id, + this.displayName, + this.description, + this.compartmentId, + this.indexConfig, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(KnowledgeBase model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("indexConfig")) { + this.indexConfig(model.getIndexConfig()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A description of the knowledge base. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A description of the knowledge base. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("indexConfig") + private final IndexConfig indexConfig; + + public IndexConfig getIndexConfig() { + return indexConfig; + } + + /** + * The date and time the knowledge base was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the knowledge base was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the knowledge base was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the knowledge base was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the knowledge base. + **/ + public enum LifecycleState { + Creating("CREATING"), + Updating("UPDATING"), + Active("ACTIVE"), + Inactive("INACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the knowledge base. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the knowledge base. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message that describes the current state of the knowledge base in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of the knowledge base in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("KnowledgeBase("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", indexConfig=").append(String.valueOf(this.indexConfig)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof KnowledgeBase)) { + return false; + } + + KnowledgeBase other = (KnowledgeBase) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.indexConfig, other.indexConfig) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.indexConfig == null ? 43 : this.indexConfig.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/KnowledgeBaseCollection.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/KnowledgeBaseCollection.java new file mode 100644 index 00000000000..fdcee53d659 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/KnowledgeBaseCollection.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **KnowledgeBaseCollection** + *

+ * Results of a knowledge base search. Contains both KnowledgeBaseSummary items and other information, such as metadata. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = KnowledgeBaseCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class KnowledgeBaseCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public KnowledgeBaseCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of knowledge bases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of knowledge bases. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public KnowledgeBaseCollection build() { + KnowledgeBaseCollection model = new KnowledgeBaseCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(KnowledgeBaseCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of knowledge bases. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of knowledge bases. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("KnowledgeBaseCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof KnowledgeBaseCollection)) { + return false; + } + + KnowledgeBaseCollection other = (KnowledgeBaseCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/KnowledgeBaseSummary.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/KnowledgeBaseSummary.java new file mode 100644 index 00000000000..479f0d9ed05 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/KnowledgeBaseSummary.java @@ -0,0 +1,626 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **KnowledgeBaseSummary** + *

+ * Summary information about a knowledge base. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = KnowledgeBaseSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class KnowledgeBaseSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "description", + "compartmentId", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public KnowledgeBaseSummary( + String id, + String displayName, + String description, + String compartmentId, + java.util.Date timeCreated, + java.util.Date timeUpdated, + KnowledgeBase.LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.displayName = displayName; + this.description = description; + this.compartmentId = compartmentId; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description of the knowledge base. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description of the knowledge base. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The date and time the knowledge base was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the knowledge base was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the knowledge base was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the knowledge base was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of the knowledge base. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private KnowledgeBase.LifecycleState lifecycleState; + + /** + * The current state of the knowledge base. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(KnowledgeBase.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message that describes the current state of the knowledge base in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of the knowledge base in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public KnowledgeBaseSummary build() { + KnowledgeBaseSummary model = + new KnowledgeBaseSummary( + this.id, + this.displayName, + this.description, + this.compartmentId, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(KnowledgeBaseSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description of the knowledge base. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description of the knowledge base. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The date and time the knowledge base was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the knowledge base was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the knowledge base was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the knowledge base was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of the knowledge base. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final KnowledgeBase.LifecycleState lifecycleState; + + /** + * The current state of the knowledge base. + * @return the value + **/ + public KnowledgeBase.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message that describes the current state of the knowledge base in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of the knowledge base in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("KnowledgeBaseSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof KnowledgeBaseSummary)) { + return false; + } + + KnowledgeBaseSummary other = (KnowledgeBaseSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ObjectStoragePrefix.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ObjectStoragePrefix.java new file mode 100644 index 00000000000..2df5c673e35 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/ObjectStoragePrefix.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **ObjectStoragePrefix** + *

+ * The details of OCI Object Storage object. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ObjectStoragePrefix.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ObjectStoragePrefix extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"namespaceName", "bucketName", "prefix"}) + public ObjectStoragePrefix(String namespaceName, String bucketName, String prefix) { + super(); + this.namespaceName = namespaceName; + this.bucketName = bucketName; + this.prefix = prefix; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The namespace name of an object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private String namespaceName; + + /** + * The namespace name of an object. + * @param namespaceName the value to set + * @return this builder + **/ + public Builder namespaceName(String namespaceName) { + this.namespaceName = namespaceName; + this.__explicitlySet__.add("namespaceName"); + return this; + } + /** + * The bucket name of an object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private String bucketName; + + /** + * The bucket name of an object. + * @param bucketName the value to set + * @return this builder + **/ + public Builder bucketName(String bucketName) { + this.bucketName = bucketName; + this.__explicitlySet__.add("bucketName"); + return this; + } + /** + * The name of the object (file) or prefix (folder). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private String prefix; + + /** + * The name of the object (file) or prefix (folder). + * @param prefix the value to set + * @return this builder + **/ + public Builder prefix(String prefix) { + this.prefix = prefix; + this.__explicitlySet__.add("prefix"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ObjectStoragePrefix build() { + ObjectStoragePrefix model = + new ObjectStoragePrefix(this.namespaceName, this.bucketName, this.prefix); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ObjectStoragePrefix model) { + if (model.wasPropertyExplicitlySet("namespaceName")) { + this.namespaceName(model.getNamespaceName()); + } + if (model.wasPropertyExplicitlySet("bucketName")) { + this.bucketName(model.getBucketName()); + } + if (model.wasPropertyExplicitlySet("prefix")) { + this.prefix(model.getPrefix()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The namespace name of an object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespaceName") + private final String namespaceName; + + /** + * The namespace name of an object. + * @return the value + **/ + public String getNamespaceName() { + return namespaceName; + } + + /** + * The bucket name of an object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private final String bucketName; + + /** + * The bucket name of an object. + * @return the value + **/ + public String getBucketName() { + return bucketName; + } + + /** + * The name of the object (file) or prefix (folder). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private final String prefix; + + /** + * The name of the object (file) or prefix (folder). + * @return the value + **/ + public String getPrefix() { + return prefix; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ObjectStoragePrefix("); + sb.append("super=").append(super.toString()); + sb.append("namespaceName=").append(String.valueOf(this.namespaceName)); + sb.append(", bucketName=").append(String.valueOf(this.bucketName)); + sb.append(", prefix=").append(String.valueOf(this.prefix)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ObjectStoragePrefix)) { + return false; + } + + ObjectStoragePrefix other = (ObjectStoragePrefix) o; + return java.util.Objects.equals(this.namespaceName, other.namespaceName) + && java.util.Objects.equals(this.bucketName, other.bucketName) + && java.util.Objects.equals(this.prefix, other.prefix) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.namespaceName == null ? 43 : this.namespaceName.hashCode()); + result = (result * PRIME) + (this.bucketName == null ? 43 : this.bucketName.hashCode()); + result = (result * PRIME) + (this.prefix == null ? 43 : this.prefix.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OciDatabaseConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OciDatabaseConfig.java new file mode 100644 index 00000000000..cadcfe0435c --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OciDatabaseConfig.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **OciDatabaseConfig** + *

+ * The details of the customer Database Connection. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OciDatabaseConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "indexConfigType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OciDatabaseConfig extends IndexConfig { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("databaseConnection") + private DatabaseConnection databaseConnection; + + public Builder databaseConnection(DatabaseConnection databaseConnection) { + this.databaseConnection = databaseConnection; + this.__explicitlySet__.add("databaseConnection"); + return this; + } + /** + * Array of Database functions to be used. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseFunctions") + private java.util.List databaseFunctions; + + /** + * Array of Database functions to be used. + * @param databaseFunctions the value to set + * @return this builder + **/ + public Builder databaseFunctions(java.util.List databaseFunctions) { + this.databaseFunctions = databaseFunctions; + this.__explicitlySet__.add("databaseFunctions"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OciDatabaseConfig build() { + OciDatabaseConfig model = + new OciDatabaseConfig(this.databaseConnection, this.databaseFunctions); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OciDatabaseConfig model) { + if (model.wasPropertyExplicitlySet("databaseConnection")) { + this.databaseConnection(model.getDatabaseConnection()); + } + if (model.wasPropertyExplicitlySet("databaseFunctions")) { + this.databaseFunctions(model.getDatabaseFunctions()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public OciDatabaseConfig( + DatabaseConnection databaseConnection, + java.util.List databaseFunctions) { + super(); + this.databaseConnection = databaseConnection; + this.databaseFunctions = databaseFunctions; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseConnection") + private final DatabaseConnection databaseConnection; + + public DatabaseConnection getDatabaseConnection() { + return databaseConnection; + } + + /** + * Array of Database functions to be used. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseFunctions") + private final java.util.List databaseFunctions; + + /** + * Array of Database functions to be used. + * @return the value + **/ + public java.util.List getDatabaseFunctions() { + return databaseFunctions; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OciDatabaseConfig("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", databaseConnection=").append(String.valueOf(this.databaseConnection)); + sb.append(", databaseFunctions=").append(String.valueOf(this.databaseFunctions)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OciDatabaseConfig)) { + return false; + } + + OciDatabaseConfig other = (OciDatabaseConfig) o; + return java.util.Objects.equals(this.databaseConnection, other.databaseConnection) + && java.util.Objects.equals(this.databaseFunctions, other.databaseFunctions) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.databaseConnection == null + ? 43 + : this.databaseConnection.hashCode()); + result = + (result * PRIME) + + (this.databaseFunctions == null ? 43 : this.databaseFunctions.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OciObjectStorageDataSourceConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OciObjectStorageDataSourceConfig.java new file mode 100644 index 00000000000..cb437571b80 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OciObjectStorageDataSourceConfig.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **OciObjectStorageDataSourceConfig** + *

+ * The details of OCI Search with OpenSearch data source information. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OciObjectStorageDataSourceConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "dataSourceConfigType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OciObjectStorageDataSourceConfig extends DataSourceConfig { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The locations of data items in Object Storage, can either be an object (File) or a prefix (folder). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectStoragePrefixes") + private java.util.List objectStoragePrefixes; + + /** + * The locations of data items in Object Storage, can either be an object (File) or a prefix (folder). + * @param objectStoragePrefixes the value to set + * @return this builder + **/ + public Builder objectStoragePrefixes( + java.util.List objectStoragePrefixes) { + this.objectStoragePrefixes = objectStoragePrefixes; + this.__explicitlySet__.add("objectStoragePrefixes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OciObjectStorageDataSourceConfig build() { + OciObjectStorageDataSourceConfig model = + new OciObjectStorageDataSourceConfig(this.objectStoragePrefixes); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OciObjectStorageDataSourceConfig model) { + if (model.wasPropertyExplicitlySet("objectStoragePrefixes")) { + this.objectStoragePrefixes(model.getObjectStoragePrefixes()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public OciObjectStorageDataSourceConfig( + java.util.List objectStoragePrefixes) { + super(); + this.objectStoragePrefixes = objectStoragePrefixes; + } + + /** + * The locations of data items in Object Storage, can either be an object (File) or a prefix (folder). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectStoragePrefixes") + private final java.util.List objectStoragePrefixes; + + /** + * The locations of data items in Object Storage, can either be an object (File) or a prefix (folder). + * @return the value + **/ + public java.util.List getObjectStoragePrefixes() { + return objectStoragePrefixes; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OciObjectStorageDataSourceConfig("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", objectStoragePrefixes=").append(String.valueOf(this.objectStoragePrefixes)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OciObjectStorageDataSourceConfig)) { + return false; + } + + OciObjectStorageDataSourceConfig other = (OciObjectStorageDataSourceConfig) o; + return java.util.Objects.equals(this.objectStoragePrefixes, other.objectStoragePrefixes) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.objectStoragePrefixes == null + ? 43 + : this.objectStoragePrefixes.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OciOpenSearchIndexConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OciOpenSearchIndexConfig.java new file mode 100644 index 00000000000..7e97d674bf9 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OciOpenSearchIndexConfig.java @@ -0,0 +1,203 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **OciOpenSearchIndexConfig** + *

+ * The details of customer managed OCI OpenSearch. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OciOpenSearchIndexConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "indexConfigType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OciOpenSearchIndexConfig extends IndexConfig { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OpenSearch Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterId") + private String clusterId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OpenSearch Cluster. + * @param clusterId the value to set + * @return this builder + **/ + public Builder clusterId(String clusterId) { + this.clusterId = clusterId; + this.__explicitlySet__.add("clusterId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("secretDetail") + private SecretDetail secretDetail; + + public Builder secretDetail(SecretDetail secretDetail) { + this.secretDetail = secretDetail; + this.__explicitlySet__.add("secretDetail"); + return this; + } + /** + * Index configuration for open search. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("indexes") + private java.util.List indexes; + + /** + * Index configuration for open search. + * @param indexes the value to set + * @return this builder + **/ + public Builder indexes(java.util.List indexes) { + this.indexes = indexes; + this.__explicitlySet__.add("indexes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OciOpenSearchIndexConfig build() { + OciOpenSearchIndexConfig model = + new OciOpenSearchIndexConfig(this.clusterId, this.secretDetail, this.indexes); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OciOpenSearchIndexConfig model) { + if (model.wasPropertyExplicitlySet("clusterId")) { + this.clusterId(model.getClusterId()); + } + if (model.wasPropertyExplicitlySet("secretDetail")) { + this.secretDetail(model.getSecretDetail()); + } + if (model.wasPropertyExplicitlySet("indexes")) { + this.indexes(model.getIndexes()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public OciOpenSearchIndexConfig( + String clusterId, SecretDetail secretDetail, java.util.List indexes) { + super(); + this.clusterId = clusterId; + this.secretDetail = secretDetail; + this.indexes = indexes; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OpenSearch Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterId") + private final String clusterId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OpenSearch Cluster. + * @return the value + **/ + public String getClusterId() { + return clusterId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("secretDetail") + private final SecretDetail secretDetail; + + public SecretDetail getSecretDetail() { + return secretDetail; + } + + /** + * Index configuration for open search. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("indexes") + private final java.util.List indexes; + + /** + * Index configuration for open search. + * @return the value + **/ + public java.util.List getIndexes() { + return indexes; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OciOpenSearchIndexConfig("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", clusterId=").append(String.valueOf(this.clusterId)); + sb.append(", secretDetail=").append(String.valueOf(this.secretDetail)); + sb.append(", indexes=").append(String.valueOf(this.indexes)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OciOpenSearchIndexConfig)) { + return false; + } + + OciOpenSearchIndexConfig other = (OciOpenSearchIndexConfig) o; + return java.util.Objects.equals(this.clusterId, other.clusterId) + && java.util.Objects.equals(this.secretDetail, other.secretDetail) + && java.util.Objects.equals(this.indexes, other.indexes) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.clusterId == null ? 43 : this.clusterId.hashCode()); + result = (result * PRIME) + (this.secretDetail == null ? 43 : this.secretDetail.hashCode()); + result = (result * PRIME) + (this.indexes == null ? 43 : this.indexes.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OperationStatus.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OperationStatus.java new file mode 100644 index 00000000000..2635b4c9ea9 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OperationStatus.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The status of the work request. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public enum OperationStatus { + Accepted("ACCEPTED"), + InProgress("IN_PROGRESS"), + Waiting("WAITING"), + NeedsAttention("NEEDS_ATTENTION"), + Failed("FAILED"), + Succeeded("SUCCEEDED"), + Canceling("CANCELING"), + Canceled("CANCELED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(OperationStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OperationStatus v : OperationStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + OperationStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OperationStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'OperationStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OperationType.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OperationType.java new file mode 100644 index 00000000000..28bc4be382b --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/OperationType.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * The asynchronous operation tracked by the work request. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public enum OperationType { + CreateAgent("CREATE_AGENT"), + UpdateAgent("UPDATE_AGENT"), + DeleteAgent("DELETE_AGENT"), + MoveAgent("MOVE_AGENT"), + CreateAgentEndpoint("CREATE_AGENT_ENDPOINT"), + UpdateAgentEndpoint("UPDATE_AGENT_ENDPOINT"), + DeleteAgentEndpoint("DELETE_AGENT_ENDPOINT"), + MoveAgentEndpoint("MOVE_AGENT_ENDPOINT"), + CreateDataSource("CREATE_DATA_SOURCE"), + UpdateDataSource("UPDATE_DATA_SOURCE"), + DeleteDataSource("DELETE_DATA_SOURCE"), + CreateKnowledgeBase("CREATE_KNOWLEDGE_BASE"), + UpdateKnowledgeBase("UPDATE_KNOWLEDGE_BASE"), + DeleteKnowledgeBase("DELETE_KNOWLEDGE_BASE"), + MoveKnowledgeBase("MOVE_KNOWLEDGE_BASE"), + CreateDataIngestionJob("CREATE_DATA_INGESTION_JOB"), + DeleteDataIngestionJob("DELETE_DATA_INGESTION_JOB"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(OperationType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OperationType v : OperationType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + OperationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OperationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'OperationType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/SecretDetail.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/SecretDetail.java new file mode 100644 index 00000000000..041550818ca --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/SecretDetail.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **SecretDetail** + *

+ * The details of configured security configuration on OpenSearch. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type", + defaultImpl = SecretDetail.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = IdcsSecret.class, + name = "IDCS_SECRET" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = BasicAuthSecret.class, + name = "BASIC_AUTH_SECRET" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class SecretDetail extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected SecretDetail() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SecretDetail("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SecretDetail)) { + return false; + } + + SecretDetail other = (SecretDetail) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The type of OpenID. + * The allowed values are: + * - {@code IDCS_SECRET}: The OpenID configuration used is OpenSearch is IDCS. + * - {@code BASIC_AUTH_SECRET}: Basic authentication use for OpenSearch + * + **/ + public enum Type { + IdcsSecret("IDCS_SECRET"), + BasicAuthSecret("BASIC_AUTH_SECRET"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/SessionConfig.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/SessionConfig.java new file mode 100644 index 00000000000..35bd8594ac6 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/SessionConfig.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **SessionConfig** + *

+ * Session Configuration on AgentEndpoint. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = SessionConfig.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SessionConfig extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"idleTimeoutInSeconds"}) + public SessionConfig(Integer idleTimeoutInSeconds) { + super(); + this.idleTimeoutInSeconds = idleTimeoutInSeconds; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The session will become inactive after this timeout. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idleTimeoutInSeconds") + private Integer idleTimeoutInSeconds; + + /** + * The session will become inactive after this timeout. + * @param idleTimeoutInSeconds the value to set + * @return this builder + **/ + public Builder idleTimeoutInSeconds(Integer idleTimeoutInSeconds) { + this.idleTimeoutInSeconds = idleTimeoutInSeconds; + this.__explicitlySet__.add("idleTimeoutInSeconds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SessionConfig build() { + SessionConfig model = new SessionConfig(this.idleTimeoutInSeconds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SessionConfig model) { + if (model.wasPropertyExplicitlySet("idleTimeoutInSeconds")) { + this.idleTimeoutInSeconds(model.getIdleTimeoutInSeconds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The session will become inactive after this timeout. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idleTimeoutInSeconds") + private final Integer idleTimeoutInSeconds; + + /** + * The session will become inactive after this timeout. + * @return the value + **/ + public Integer getIdleTimeoutInSeconds() { + return idleTimeoutInSeconds; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SessionConfig("); + sb.append("super=").append(super.toString()); + sb.append("idleTimeoutInSeconds=").append(String.valueOf(this.idleTimeoutInSeconds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SessionConfig)) { + return false; + } + + SessionConfig other = (SessionConfig) o; + return java.util.Objects.equals(this.idleTimeoutInSeconds, other.idleTimeoutInSeconds) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.idleTimeoutInSeconds == null + ? 43 + : this.idleTimeoutInSeconds.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/SortOrder.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/SortOrder.java new file mode 100644 index 00000000000..22b814d1484 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/SortOrder.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **SortOrder** + *

+ * + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The {@code displayName} + * sort order is case sensitive. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortOrder: " + key); + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateAgentDetails.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateAgentDetails.java new file mode 100644 index 00000000000..8c52aeb1e4b --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateAgentDetails.java @@ -0,0 +1,380 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **UpdateAgentDetails** + *

+ * The data to update an agent. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateAgentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateAgentDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "knowledgeBaseIds", + "welcomeMessage", + "freeformTags", + "definedTags" + }) + public UpdateAgentDetails( + String displayName, + String description, + java.util.List knowledgeBaseIds, + String welcomeMessage, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.knowledgeBaseIds = knowledgeBaseIds; + this.welcomeMessage = welcomeMessage; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Description about the agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Description about the agent. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * List of [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseIds") + private java.util.List knowledgeBaseIds; + + /** + * List of [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * @param knowledgeBaseIds the value to set + * @return this builder + **/ + public Builder knowledgeBaseIds(java.util.List knowledgeBaseIds) { + this.knowledgeBaseIds = knowledgeBaseIds; + this.__explicitlySet__.add("knowledgeBaseIds"); + return this; + } + /** + * Details about purpose and responsibility of the agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("welcomeMessage") + private String welcomeMessage; + + /** + * Details about purpose and responsibility of the agent + * @param welcomeMessage the value to set + * @return this builder + **/ + public Builder welcomeMessage(String welcomeMessage) { + this.welcomeMessage = welcomeMessage; + this.__explicitlySet__.add("welcomeMessage"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateAgentDetails build() { + UpdateAgentDetails model = + new UpdateAgentDetails( + this.displayName, + this.description, + this.knowledgeBaseIds, + this.welcomeMessage, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateAgentDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("knowledgeBaseIds")) { + this.knowledgeBaseIds(model.getKnowledgeBaseIds()); + } + if (model.wasPropertyExplicitlySet("welcomeMessage")) { + this.welcomeMessage(model.getWelcomeMessage()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Description about the agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Description about the agent. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * List of [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("knowledgeBaseIds") + private final java.util.List knowledgeBaseIds; + + /** + * List of [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledgeBases associated with agent. + * @return the value + **/ + public java.util.List getKnowledgeBaseIds() { + return knowledgeBaseIds; + } + + /** + * Details about purpose and responsibility of the agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("welcomeMessage") + private final String welcomeMessage; + + /** + * Details about purpose and responsibility of the agent + * @return the value + **/ + public String getWelcomeMessage() { + return welcomeMessage; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateAgentDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", knowledgeBaseIds=").append(String.valueOf(this.knowledgeBaseIds)); + sb.append(", welcomeMessage=").append(String.valueOf(this.welcomeMessage)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateAgentDetails)) { + return false; + } + + UpdateAgentDetails other = (UpdateAgentDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.knowledgeBaseIds, other.knowledgeBaseIds) + && java.util.Objects.equals(this.welcomeMessage, other.welcomeMessage) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.knowledgeBaseIds == null ? 43 : this.knowledgeBaseIds.hashCode()); + result = + (result * PRIME) + + (this.welcomeMessage == null ? 43 : this.welcomeMessage.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateAgentEndpointDetails.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateAgentEndpointDetails.java new file mode 100644 index 00000000000..072b1880be1 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateAgentEndpointDetails.java @@ -0,0 +1,443 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **UpdateAgentEndpointDetails** + *

+ * The data to update an endpoint. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateAgentEndpointDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateAgentEndpointDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "contentModerationConfig", + "shouldEnableTrace", + "shouldEnableCitation", + "sessionConfig", + "freeformTags", + "definedTags" + }) + public UpdateAgentEndpointDetails( + String displayName, + String description, + ContentModerationConfig contentModerationConfig, + Boolean shouldEnableTrace, + Boolean shouldEnableCitation, + SessionConfig sessionConfig, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.contentModerationConfig = contentModerationConfig; + this.shouldEnableTrace = shouldEnableTrace; + this.shouldEnableCitation = shouldEnableCitation; + this.sessionConfig = sessionConfig; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * An optional description of the AgentEndpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * An optional description of the AgentEndpoint. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("contentModerationConfig") + private ContentModerationConfig contentModerationConfig; + + public Builder contentModerationConfig(ContentModerationConfig contentModerationConfig) { + this.contentModerationConfig = contentModerationConfig; + this.__explicitlySet__.add("contentModerationConfig"); + return this; + } + /** + * Whether to show traces in the chat result. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableTrace") + private Boolean shouldEnableTrace; + + /** + * Whether to show traces in the chat result. + * @param shouldEnableTrace the value to set + * @return this builder + **/ + public Builder shouldEnableTrace(Boolean shouldEnableTrace) { + this.shouldEnableTrace = shouldEnableTrace; + this.__explicitlySet__.add("shouldEnableTrace"); + return this; + } + /** + * Whether to show citations in the chat result. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableCitation") + private Boolean shouldEnableCitation; + + /** + * Whether to show citations in the chat result. + * @param shouldEnableCitation the value to set + * @return this builder + **/ + public Builder shouldEnableCitation(Boolean shouldEnableCitation) { + this.shouldEnableCitation = shouldEnableCitation; + this.__explicitlySet__.add("shouldEnableCitation"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("sessionConfig") + private SessionConfig sessionConfig; + + public Builder sessionConfig(SessionConfig sessionConfig) { + this.sessionConfig = sessionConfig; + this.__explicitlySet__.add("sessionConfig"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateAgentEndpointDetails build() { + UpdateAgentEndpointDetails model = + new UpdateAgentEndpointDetails( + this.displayName, + this.description, + this.contentModerationConfig, + this.shouldEnableTrace, + this.shouldEnableCitation, + this.sessionConfig, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateAgentEndpointDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("contentModerationConfig")) { + this.contentModerationConfig(model.getContentModerationConfig()); + } + if (model.wasPropertyExplicitlySet("shouldEnableTrace")) { + this.shouldEnableTrace(model.getShouldEnableTrace()); + } + if (model.wasPropertyExplicitlySet("shouldEnableCitation")) { + this.shouldEnableCitation(model.getShouldEnableCitation()); + } + if (model.wasPropertyExplicitlySet("sessionConfig")) { + this.sessionConfig(model.getSessionConfig()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * An optional description of the AgentEndpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * An optional description of the AgentEndpoint. + * @return the value + **/ + public String getDescription() { + return description; + } + + @com.fasterxml.jackson.annotation.JsonProperty("contentModerationConfig") + private final ContentModerationConfig contentModerationConfig; + + public ContentModerationConfig getContentModerationConfig() { + return contentModerationConfig; + } + + /** + * Whether to show traces in the chat result. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableTrace") + private final Boolean shouldEnableTrace; + + /** + * Whether to show traces in the chat result. + * @return the value + **/ + public Boolean getShouldEnableTrace() { + return shouldEnableTrace; + } + + /** + * Whether to show citations in the chat result. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldEnableCitation") + private final Boolean shouldEnableCitation; + + /** + * Whether to show citations in the chat result. + * @return the value + **/ + public Boolean getShouldEnableCitation() { + return shouldEnableCitation; + } + + @com.fasterxml.jackson.annotation.JsonProperty("sessionConfig") + private final SessionConfig sessionConfig; + + public SessionConfig getSessionConfig() { + return sessionConfig; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateAgentEndpointDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", contentModerationConfig=") + .append(String.valueOf(this.contentModerationConfig)); + sb.append(", shouldEnableTrace=").append(String.valueOf(this.shouldEnableTrace)); + sb.append(", shouldEnableCitation=").append(String.valueOf(this.shouldEnableCitation)); + sb.append(", sessionConfig=").append(String.valueOf(this.sessionConfig)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateAgentEndpointDetails)) { + return false; + } + + UpdateAgentEndpointDetails other = (UpdateAgentEndpointDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals( + this.contentModerationConfig, other.contentModerationConfig) + && java.util.Objects.equals(this.shouldEnableTrace, other.shouldEnableTrace) + && java.util.Objects.equals(this.shouldEnableCitation, other.shouldEnableCitation) + && java.util.Objects.equals(this.sessionConfig, other.sessionConfig) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.contentModerationConfig == null + ? 43 + : this.contentModerationConfig.hashCode()); + result = + (result * PRIME) + + (this.shouldEnableTrace == null ? 43 : this.shouldEnableTrace.hashCode()); + result = + (result * PRIME) + + (this.shouldEnableCitation == null + ? 43 + : this.shouldEnableCitation.hashCode()); + result = + (result * PRIME) + + (this.sessionConfig == null ? 43 : this.sessionConfig.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateDataSourceDetails.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateDataSourceDetails.java new file mode 100644 index 00000000000..18ebf55ea89 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateDataSourceDetails.java @@ -0,0 +1,325 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **UpdateDataSourceDetails** + *

+ * The data to update a data source. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateDataSourceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateDataSourceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "dataSourceConfig", + "freeformTags", + "definedTags" + }) + public UpdateDataSourceDetails( + String displayName, + String description, + DataSourceConfig dataSourceConfig, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.dataSourceConfig = dataSourceConfig; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A user-friendly description of the data source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A user-friendly description of the data source. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataSourceConfig") + private DataSourceConfig dataSourceConfig; + + public Builder dataSourceConfig(DataSourceConfig dataSourceConfig) { + this.dataSourceConfig = dataSourceConfig; + this.__explicitlySet__.add("dataSourceConfig"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateDataSourceDetails build() { + UpdateDataSourceDetails model = + new UpdateDataSourceDetails( + this.displayName, + this.description, + this.dataSourceConfig, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateDataSourceDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("dataSourceConfig")) { + this.dataSourceConfig(model.getDataSourceConfig()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A user-friendly description of the data source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A user-friendly description of the data source. + * @return the value + **/ + public String getDescription() { + return description; + } + + @com.fasterxml.jackson.annotation.JsonProperty("dataSourceConfig") + private final DataSourceConfig dataSourceConfig; + + public DataSourceConfig getDataSourceConfig() { + return dataSourceConfig; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateDataSourceDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", dataSourceConfig=").append(String.valueOf(this.dataSourceConfig)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateDataSourceDetails)) { + return false; + } + + UpdateDataSourceDetails other = (UpdateDataSourceDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.dataSourceConfig, other.dataSourceConfig) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.dataSourceConfig == null ? 43 : this.dataSourceConfig.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateKnowledgeBaseDetails.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateKnowledgeBaseDetails.java new file mode 100644 index 00000000000..8c99f21bfce --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/UpdateKnowledgeBaseDetails.java @@ -0,0 +1,323 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **UpdateKnowledgeBaseDetails** + *

+ * The data to update a knowledge base. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateKnowledgeBaseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateKnowledgeBaseDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "displayName", + "description", + "indexConfig", + "freeformTags", + "definedTags" + }) + public UpdateKnowledgeBaseDetails( + String displayName, + String description, + IndexConfig indexConfig, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.displayName = displayName; + this.description = description; + this.indexConfig = indexConfig; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A description of the knowledge base. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A description of the knowledge base. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("indexConfig") + private IndexConfig indexConfig; + + public Builder indexConfig(IndexConfig indexConfig) { + this.indexConfig = indexConfig; + this.__explicitlySet__.add("indexConfig"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateKnowledgeBaseDetails build() { + UpdateKnowledgeBaseDetails model = + new UpdateKnowledgeBaseDetails( + this.displayName, + this.description, + this.indexConfig, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateKnowledgeBaseDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("indexConfig")) { + this.indexConfig(model.getIndexConfig()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A description of the knowledge base. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A description of the knowledge base. + * @return the value + **/ + public String getDescription() { + return description; + } + + @com.fasterxml.jackson.annotation.JsonProperty("indexConfig") + private final IndexConfig indexConfig; + + public IndexConfig getIndexConfig() { + return indexConfig; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateKnowledgeBaseDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", indexConfig=").append(String.valueOf(this.indexConfig)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateKnowledgeBaseDetails)) { + return false; + } + + UpdateKnowledgeBaseDetails other = (UpdateKnowledgeBaseDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.indexConfig, other.indexConfig) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.indexConfig == null ? 43 : this.indexConfig.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequest.java new file mode 100644 index 00000000000..7f4170bf74b --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequest.java @@ -0,0 +1,553 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **WorkRequest** + *

+ * An asynchronous work request. Work requests help you monitor long-running operations. When you start a long-running operation, + * the service creates a work request. A work request is an activity log that lets you track each step in the operation's + * progress. Each work request has an OCID that lets you interact with it programmatically and use it for automation. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = WorkRequest.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequest extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "operationType", + "status", + "id", + "compartmentId", + "resources", + "percentComplete", + "timeAccepted", + "timeStarted", + "timeFinished", + "timeUpdated" + }) + public WorkRequest( + OperationType operationType, + OperationStatus status, + String id, + String compartmentId, + java.util.List resources, + Float percentComplete, + java.util.Date timeAccepted, + java.util.Date timeStarted, + java.util.Date timeFinished, + java.util.Date timeUpdated) { + super(); + this.operationType = operationType; + this.status = status; + this.id = id; + this.compartmentId = compartmentId; + this.resources = resources; + this.percentComplete = percentComplete; + this.timeAccepted = timeAccepted; + this.timeStarted = timeStarted; + this.timeFinished = timeFinished; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The asynchronous operation tracked by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private OperationType operationType; + + /** + * The asynchronous operation tracked by this work request. + * @param operationType the value to set + * @return this builder + **/ + public Builder operationType(OperationType operationType) { + this.operationType = operationType; + this.__explicitlySet__.add("operationType"); + return this; + } + /** + * The status of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private OperationStatus status; + + /** + * The status of the work request. + * @param status the value to set + * @return this builder + **/ + public Builder status(OperationStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The resources that are affected by the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * The resources that are affected by the work request. + * @param resources the value to set + * @return this builder + **/ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the total work + * that must be performed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private Float percentComplete; + + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the total work + * that must be performed. + * + * @param percentComplete the value to set + * @return this builder + **/ + public Builder percentComplete(Float percentComplete) { + this.percentComplete = percentComplete; + this.__explicitlySet__.add("percentComplete"); + return this; + } + /** + * The date and time the work request was created, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private java.util.Date timeAccepted; + + /** + * The date and time the work request was created, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @param timeAccepted the value to set + * @return this builder + **/ + public Builder timeAccepted(java.util.Date timeAccepted) { + this.timeAccepted = timeAccepted; + this.__explicitlySet__.add("timeAccepted"); + return this; + } + /** + * The date and time the work request was started, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The date and time the work request was started, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The date and time the work request was finished, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + /** + * The date and time the work request was finished, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @param timeFinished the value to set + * @return this builder + **/ + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + /** + * The date and time the work request was updated, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the work request was updated, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequest build() { + WorkRequest model = + new WorkRequest( + this.operationType, + this.status, + this.id, + this.compartmentId, + this.resources, + this.percentComplete, + this.timeAccepted, + this.timeStarted, + this.timeFinished, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequest model) { + if (model.wasPropertyExplicitlySet("operationType")) { + this.operationType(model.getOperationType()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("percentComplete")) { + this.percentComplete(model.getPercentComplete()); + } + if (model.wasPropertyExplicitlySet("timeAccepted")) { + this.timeAccepted(model.getTimeAccepted()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The asynchronous operation tracked by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private final OperationType operationType; + + /** + * The asynchronous operation tracked by this work request. + * @return the value + **/ + public OperationType getOperationType() { + return operationType; + } + + /** + * The status of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final OperationStatus status; + + /** + * The status of the work request. + * @return the value + **/ + public OperationStatus getStatus() { + return status; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The resources that are affected by the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * The resources that are affected by the work request. + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the total work + * that must be performed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private final Float percentComplete; + + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the total work + * that must be performed. + * + * @return the value + **/ + public Float getPercentComplete() { + return percentComplete; + } + + /** + * The date and time the work request was created, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private final java.util.Date timeAccepted; + + /** + * The date and time the work request was created, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeAccepted() { + return timeAccepted; + } + + /** + * The date and time the work request was started, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The date and time the work request was started, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The date and time the work request was finished, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private final java.util.Date timeFinished; + + /** + * The date and time the work request was finished, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeFinished() { + return timeFinished; + } + + /** + * The date and time the work request was updated, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the work request was updated, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequest("); + sb.append("super=").append(super.toString()); + sb.append("operationType=").append(String.valueOf(this.operationType)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", percentComplete=").append(String.valueOf(this.percentComplete)); + sb.append(", timeAccepted=").append(String.valueOf(this.timeAccepted)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequest)) { + return false; + } + + WorkRequest other = (WorkRequest) o; + return java.util.Objects.equals(this.operationType, other.operationType) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.percentComplete, other.percentComplete) + && java.util.Objects.equals(this.timeAccepted, other.timeAccepted) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeFinished, other.timeFinished) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.operationType == null ? 43 : this.operationType.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = + (result * PRIME) + + (this.percentComplete == null ? 43 : this.percentComplete.hashCode()); + result = (result * PRIME) + (this.timeAccepted == null ? 43 : this.timeAccepted.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestError.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestError.java new file mode 100644 index 00000000000..7ad2ce74757 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestError.java @@ -0,0 +1,226 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **WorkRequestError** + *

+ * An error encountered while performing an operation that is tracked by a work request. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = WorkRequestError.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestError extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"code", "message", "timestamp"}) + public WorkRequestError(String code, String message, java.util.Date timestamp) { + super(); + this.code = code; + this.message = message; + this.timestamp = timestamp; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A machine-usable code for the error that occurred. For a list of error codes, see + * [API Errors](https://docs.cloud.oracle.com/iaas/Content/API/References/apierrors.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("code") + private String code; + + /** + * A machine-usable code for the error that occurred. For a list of error codes, see + * [API Errors](https://docs.cloud.oracle.com/iaas/Content/API/References/apierrors.htm). + * + * @param code the value to set + * @return this builder + **/ + public Builder code(String code) { + this.code = code; + this.__explicitlySet__.add("code"); + return this; + } + /** + * A human-readable error message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * A human-readable error message. + * @param message the value to set + * @return this builder + **/ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + /** + * The date and time the error occurred, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + /** + * The date and time the error occurred, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @param timestamp the value to set + * @return this builder + **/ + public Builder timestamp(java.util.Date timestamp) { + this.timestamp = timestamp; + this.__explicitlySet__.add("timestamp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestError build() { + WorkRequestError model = new WorkRequestError(this.code, this.message, this.timestamp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestError model) { + if (model.wasPropertyExplicitlySet("code")) { + this.code(model.getCode()); + } + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + if (model.wasPropertyExplicitlySet("timestamp")) { + this.timestamp(model.getTimestamp()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A machine-usable code for the error that occurred. For a list of error codes, see + * [API Errors](https://docs.cloud.oracle.com/iaas/Content/API/References/apierrors.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("code") + private final String code; + + /** + * A machine-usable code for the error that occurred. For a list of error codes, see + * [API Errors](https://docs.cloud.oracle.com/iaas/Content/API/References/apierrors.htm). + * + * @return the value + **/ + public String getCode() { + return code; + } + + /** + * A human-readable error message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * A human-readable error message. + * @return the value + **/ + public String getMessage() { + return message; + } + + /** + * The date and time the error occurred, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private final java.util.Date timestamp; + + /** + * The date and time the error occurred, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimestamp() { + return timestamp; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestError("); + sb.append("super=").append(super.toString()); + sb.append("code=").append(String.valueOf(this.code)); + sb.append(", message=").append(String.valueOf(this.message)); + sb.append(", timestamp=").append(String.valueOf(this.timestamp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestError)) { + return false; + } + + WorkRequestError other = (WorkRequestError) o; + return java.util.Objects.equals(this.code, other.code) + && java.util.Objects.equals(this.message, other.message) + && java.util.Objects.equals(this.timestamp, other.timestamp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.code == null ? 43 : this.code.hashCode()); + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + (this.timestamp == null ? 43 : this.timestamp.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestErrorCollection.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestErrorCollection.java new file mode 100644 index 00000000000..67385a86770 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestErrorCollection.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **WorkRequestErrorCollection** + *

+ * A list of work request errors. Can contain both errors and other information, such as metadata. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestErrorCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestErrorCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public WorkRequestErrorCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A list of work request errors. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * A list of work request errors. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestErrorCollection build() { + WorkRequestErrorCollection model = new WorkRequestErrorCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestErrorCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A list of work request errors. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * A list of work request errors. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestErrorCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestErrorCollection)) { + return false; + } + + WorkRequestErrorCollection other = (WorkRequestErrorCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestLogEntry.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestLogEntry.java new file mode 100644 index 00000000000..4b4ac31a19b --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestLogEntry.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **WorkRequestLogEntry** + *

+ * A log message from performing an operation that is tracked by a work request. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestLogEntry.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestLogEntry extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"message", "timestamp"}) + public WorkRequestLogEntry(String message, java.util.Date timestamp) { + super(); + this.message = message; + this.timestamp = timestamp; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A human-readable log message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * A human-readable log message. + * @param message the value to set + * @return this builder + **/ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + /** + * The date and time the log message was written, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + /** + * The date and time the log message was written, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @param timestamp the value to set + * @return this builder + **/ + public Builder timestamp(java.util.Date timestamp) { + this.timestamp = timestamp; + this.__explicitlySet__.add("timestamp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestLogEntry build() { + WorkRequestLogEntry model = new WorkRequestLogEntry(this.message, this.timestamp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestLogEntry model) { + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + if (model.wasPropertyExplicitlySet("timestamp")) { + this.timestamp(model.getTimestamp()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A human-readable log message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * A human-readable log message. + * @return the value + **/ + public String getMessage() { + return message; + } + + /** + * The date and time the log message was written, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private final java.util.Date timestamp; + + /** + * The date and time the log message was written, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimestamp() { + return timestamp; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestLogEntry("); + sb.append("super=").append(super.toString()); + sb.append("message=").append(String.valueOf(this.message)); + sb.append(", timestamp=").append(String.valueOf(this.timestamp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestLogEntry)) { + return false; + } + + WorkRequestLogEntry other = (WorkRequestLogEntry) o; + return java.util.Objects.equals(this.message, other.message) + && java.util.Objects.equals(this.timestamp, other.timestamp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + (this.timestamp == null ? 43 : this.timestamp.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestLogEntryCollection.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestLogEntryCollection.java new file mode 100644 index 00000000000..d18826b90da --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestLogEntryCollection.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **WorkRequestLogEntryCollection** + *

+ * A list of work request logs. Can contain both logs and other information, such as metadata. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestLogEntryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestLogEntryCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public WorkRequestLogEntryCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A list of work request log entries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * A list of work request log entries. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestLogEntryCollection build() { + WorkRequestLogEntryCollection model = new WorkRequestLogEntryCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestLogEntryCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A list of work request log entries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * A list of work request log entries. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestLogEntryCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestLogEntryCollection)) { + return false; + } + + WorkRequestLogEntryCollection other = (WorkRequestLogEntryCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestResource.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestResource.java new file mode 100644 index 00000000000..e6f2658073a --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestResource.java @@ -0,0 +1,319 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **WorkRequestResource** + *

+ * A resource created or operated on by a work request. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestResource.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestResource extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "entityType", + "actionType", + "identifier", + "entityUri", + "metadata" + }) + public WorkRequestResource( + String entityType, + ActionType actionType, + String identifier, + String entityUri, + java.util.Map metadata) { + super(); + this.entityType = entityType; + this.actionType = actionType; + this.identifier = identifier; + this.entityUri = entityUri; + this.metadata = metadata; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The resource type that the work request affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private String entityType; + + /** + * The resource type that the work request affects. + * @param entityType the value to set + * @return this builder + **/ + public Builder entityType(String entityType) { + this.entityType = entityType; + this.__explicitlySet__.add("entityType"); + return this; + } + /** + * The way in which this resource is affected by the operation tracked in the work request. + * A resource being created, updated, or deleted remains in the IN_PROGRESS state until + * work is complete for that resource, at which point it transitions to CREATED, UPDATED, + * or DELETED, respectively. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + /** + * The way in which this resource is affected by the operation tracked in the work request. + * A resource being created, updated, or deleted remains in the IN_PROGRESS state until + * work is complete for that resource, at which point it transitions to CREATED, UPDATED, + * or DELETED, respectively. + * + * @param actionType the value to set + * @return this builder + **/ + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + /** + * An [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) or other unique identifier for the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("identifier") + private String identifier; + + /** + * An [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) or other unique identifier for the resource. + * @param identifier the value to set + * @return this builder + **/ + public Builder identifier(String identifier) { + this.identifier = identifier; + this.__explicitlySet__.add("identifier"); + return this; + } + /** + * The URI path that you can use for a GET request to access the resource metadata. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityUri") + private String entityUri; + + /** + * The URI path that you can use for a GET request to access the resource metadata. + * @param entityUri the value to set + * @return this builder + **/ + public Builder entityUri(String entityUri) { + this.entityUri = entityUri; + this.__explicitlySet__.add("entityUri"); + return this; + } + /** + * Additional information that helps to explain the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private java.util.Map metadata; + + /** + * Additional information that helps to explain the resource. + * @param metadata the value to set + * @return this builder + **/ + public Builder metadata(java.util.Map metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestResource build() { + WorkRequestResource model = + new WorkRequestResource( + this.entityType, + this.actionType, + this.identifier, + this.entityUri, + this.metadata); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestResource model) { + if (model.wasPropertyExplicitlySet("entityType")) { + this.entityType(model.getEntityType()); + } + if (model.wasPropertyExplicitlySet("actionType")) { + this.actionType(model.getActionType()); + } + if (model.wasPropertyExplicitlySet("identifier")) { + this.identifier(model.getIdentifier()); + } + if (model.wasPropertyExplicitlySet("entityUri")) { + this.entityUri(model.getEntityUri()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The resource type that the work request affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private final String entityType; + + /** + * The resource type that the work request affects. + * @return the value + **/ + public String getEntityType() { + return entityType; + } + + /** + * The way in which this resource is affected by the operation tracked in the work request. + * A resource being created, updated, or deleted remains in the IN_PROGRESS state until + * work is complete for that resource, at which point it transitions to CREATED, UPDATED, + * or DELETED, respectively. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private final ActionType actionType; + + /** + * The way in which this resource is affected by the operation tracked in the work request. + * A resource being created, updated, or deleted remains in the IN_PROGRESS state until + * work is complete for that resource, at which point it transitions to CREATED, UPDATED, + * or DELETED, respectively. + * + * @return the value + **/ + public ActionType getActionType() { + return actionType; + } + + /** + * An [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) or other unique identifier for the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("identifier") + private final String identifier; + + /** + * An [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) or other unique identifier for the resource. + * @return the value + **/ + public String getIdentifier() { + return identifier; + } + + /** + * The URI path that you can use for a GET request to access the resource metadata. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityUri") + private final String entityUri; + + /** + * The URI path that you can use for a GET request to access the resource metadata. + * @return the value + **/ + public String getEntityUri() { + return entityUri; + } + + /** + * Additional information that helps to explain the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final java.util.Map metadata; + + /** + * Additional information that helps to explain the resource. + * @return the value + **/ + public java.util.Map getMetadata() { + return metadata; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestResource("); + sb.append("super=").append(super.toString()); + sb.append("entityType=").append(String.valueOf(this.entityType)); + sb.append(", actionType=").append(String.valueOf(this.actionType)); + sb.append(", identifier=").append(String.valueOf(this.identifier)); + sb.append(", entityUri=").append(String.valueOf(this.entityUri)); + sb.append(", metadata=").append(String.valueOf(this.metadata)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestResource)) { + return false; + } + + WorkRequestResource other = (WorkRequestResource) o; + return java.util.Objects.equals(this.entityType, other.entityType) + && java.util.Objects.equals(this.actionType, other.actionType) + && java.util.Objects.equals(this.identifier, other.identifier) + && java.util.Objects.equals(this.entityUri, other.entityUri) + && java.util.Objects.equals(this.metadata, other.metadata) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.entityType == null ? 43 : this.entityType.hashCode()); + result = (result * PRIME) + (this.actionType == null ? 43 : this.actionType.hashCode()); + result = (result * PRIME) + (this.identifier == null ? 43 : this.identifier.hashCode()); + result = (result * PRIME) + (this.entityUri == null ? 43 : this.entityUri.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestResourceMetadataKey.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestResourceMetadataKey.java new file mode 100644 index 00000000000..07c25f209d5 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestResourceMetadataKey.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * Possible metadata keys for work request resource metadata. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public enum WorkRequestResourceMetadataKey { + IsDryRun("IS_DRY_RUN"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(WorkRequestResourceMetadataKey.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (WorkRequestResourceMetadataKey v : WorkRequestResourceMetadataKey.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + WorkRequestResourceMetadataKey(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static WorkRequestResourceMetadataKey create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'WorkRequestResourceMetadataKey', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestSummary.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestSummary.java new file mode 100644 index 00000000000..1adcd8df111 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestSummary.java @@ -0,0 +1,553 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **WorkRequestSummary** + *

+ * Summary information about an asynchronous work request. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "operationType", + "status", + "id", + "compartmentId", + "resources", + "percentComplete", + "timeAccepted", + "timeStarted", + "timeFinished", + "timeUpdated" + }) + public WorkRequestSummary( + OperationType operationType, + OperationStatus status, + String id, + String compartmentId, + java.util.List resources, + Float percentComplete, + java.util.Date timeAccepted, + java.util.Date timeStarted, + java.util.Date timeFinished, + java.util.Date timeUpdated) { + super(); + this.operationType = operationType; + this.status = status; + this.id = id; + this.compartmentId = compartmentId; + this.resources = resources; + this.percentComplete = percentComplete; + this.timeAccepted = timeAccepted; + this.timeStarted = timeStarted; + this.timeFinished = timeFinished; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The asynchronous operation tracked by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private OperationType operationType; + + /** + * The asynchronous operation tracked by this work request. + * @param operationType the value to set + * @return this builder + **/ + public Builder operationType(OperationType operationType) { + this.operationType = operationType; + this.__explicitlySet__.add("operationType"); + return this; + } + /** + * The status of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private OperationStatus status; + + /** + * The status of the work request. + * @param status the value to set + * @return this builder + **/ + public Builder status(OperationStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The resources that are affected by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * The resources that are affected by this work request. + * @param resources the value to set + * @return this builder + **/ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the total work + * that must be performed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private Float percentComplete; + + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the total work + * that must be performed. + * + * @param percentComplete the value to set + * @return this builder + **/ + public Builder percentComplete(Float percentComplete) { + this.percentComplete = percentComplete; + this.__explicitlySet__.add("percentComplete"); + return this; + } + /** + * The date and time the work request was created, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private java.util.Date timeAccepted; + + /** + * The date and time the work request was created, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @param timeAccepted the value to set + * @return this builder + **/ + public Builder timeAccepted(java.util.Date timeAccepted) { + this.timeAccepted = timeAccepted; + this.__explicitlySet__.add("timeAccepted"); + return this; + } + /** + * The date and time the work request was started, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The date and time the work request was started, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The date and time the work request was finished, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + /** + * The date and time the work request was finished, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @param timeFinished the value to set + * @return this builder + **/ + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + /** + * The date and time the work request was updated, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the work request was updated, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestSummary build() { + WorkRequestSummary model = + new WorkRequestSummary( + this.operationType, + this.status, + this.id, + this.compartmentId, + this.resources, + this.percentComplete, + this.timeAccepted, + this.timeStarted, + this.timeFinished, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestSummary model) { + if (model.wasPropertyExplicitlySet("operationType")) { + this.operationType(model.getOperationType()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("percentComplete")) { + this.percentComplete(model.getPercentComplete()); + } + if (model.wasPropertyExplicitlySet("timeAccepted")) { + this.timeAccepted(model.getTimeAccepted()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The asynchronous operation tracked by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private final OperationType operationType; + + /** + * The asynchronous operation tracked by this work request. + * @return the value + **/ + public OperationType getOperationType() { + return operationType; + } + + /** + * The status of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final OperationStatus status; + + /** + * The status of the work request. + * @return the value + **/ + public OperationStatus getStatus() { + return status; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The resources that are affected by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * The resources that are affected by this work request. + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the total work + * that must be performed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private final Float percentComplete; + + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the total work + * that must be performed. + * + * @return the value + **/ + public Float getPercentComplete() { + return percentComplete; + } + + /** + * The date and time the work request was created, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private final java.util.Date timeAccepted; + + /** + * The date and time the work request was created, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeAccepted() { + return timeAccepted; + } + + /** + * The date and time the work request was started, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The date and time the work request was started, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The date and time the work request was finished, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private final java.util.Date timeFinished; + + /** + * The date and time the work request was finished, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeFinished() { + return timeFinished; + } + + /** + * The date and time the work request was updated, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the work request was updated, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestSummary("); + sb.append("super=").append(super.toString()); + sb.append("operationType=").append(String.valueOf(this.operationType)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", percentComplete=").append(String.valueOf(this.percentComplete)); + sb.append(", timeAccepted=").append(String.valueOf(this.timeAccepted)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestSummary)) { + return false; + } + + WorkRequestSummary other = (WorkRequestSummary) o; + return java.util.Objects.equals(this.operationType, other.operationType) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.percentComplete, other.percentComplete) + && java.util.Objects.equals(this.timeAccepted, other.timeAccepted) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeFinished, other.timeFinished) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.operationType == null ? 43 : this.operationType.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = + (result * PRIME) + + (this.percentComplete == null ? 43 : this.percentComplete.hashCode()); + result = (result * PRIME) + (this.timeAccepted == null ? 43 : this.timeAccepted.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestSummaryCollection.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestSummaryCollection.java new file mode 100644 index 00000000000..a02a87d65f7 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/model/WorkRequestSummaryCollection.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.model; + +/** + * **WorkRequestSummaryCollection** + *

+ * A list of work requests. Can contain both work requests and other information, such as metadata. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestSummaryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestSummaryCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public WorkRequestSummaryCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A list of work requests. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * A list of work requests. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestSummaryCollection build() { + WorkRequestSummaryCollection model = new WorkRequestSummaryCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestSummaryCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A list of work requests. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * A list of work requests. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestSummaryCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestSummaryCollection)) { + return false; + } + + WorkRequestSummaryCollection other = (WorkRequestSummaryCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CancelWorkRequestRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CancelWorkRequestRequest.java new file mode 100644 index 00000000000..2e7de2b3996 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CancelWorkRequestRequest.java @@ -0,0 +1,261 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use CancelWorkRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CancelWorkRequestRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CancelWorkRequestRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CancelWorkRequestRequest o) { + workRequestId(o.getWorkRequestId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CancelWorkRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CancelWorkRequestRequest + */ + public CancelWorkRequestRequest build() { + CancelWorkRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of CancelWorkRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CancelWorkRequestRequest + */ + public CancelWorkRequestRequest buildWithoutInvocationCallback() { + CancelWorkRequestRequest request = new CancelWorkRequestRequest(); + request.workRequestId = workRequestId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new CancelWorkRequestRequest(workRequestId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .workRequestId(workRequestId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CancelWorkRequestRequest)) { + return false; + } + + CancelWorkRequestRequest other = (CancelWorkRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ChangeAgentCompartmentRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ChangeAgentCompartmentRequest.java new file mode 100644 index 00000000000..50ee6661a55 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ChangeAgentCompartmentRequest.java @@ -0,0 +1,381 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use ChangeAgentCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ChangeAgentCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.generativeaiagent.model.ChangeAgentCompartmentDetails> { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + */ + private String agentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + */ + public String getAgentId() { + return agentId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.generativeaiagent.model.ChangeAgentCompartmentDetails + changeAgentCompartmentDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.generativeaiagent.model.ChangeAgentCompartmentDetails + getChangeAgentCompartmentDetails() { + return changeAgentCompartmentDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.generativeaiagent.model.ChangeAgentCompartmentDetails getBody$() { + return changeAgentCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeAgentCompartmentRequest, + com.oracle.bmc.generativeaiagent.model.ChangeAgentCompartmentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + */ + private String agentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + * @param agentId the value to set + * @return this builder instance + */ + public Builder agentId(String agentId) { + this.agentId = agentId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.generativeaiagent.model.ChangeAgentCompartmentDetails + changeAgentCompartmentDetails = null; + + /** + * The information to be updated. + * @param changeAgentCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeAgentCompartmentDetails( + com.oracle.bmc.generativeaiagent.model.ChangeAgentCompartmentDetails + changeAgentCompartmentDetails) { + this.changeAgentCompartmentDetails = changeAgentCompartmentDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeAgentCompartmentRequest o) { + agentId(o.getAgentId()); + changeAgentCompartmentDetails(o.getChangeAgentCompartmentDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeAgentCompartmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeAgentCompartmentRequest + */ + public ChangeAgentCompartmentRequest build() { + ChangeAgentCompartmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.generativeaiagent.model.ChangeAgentCompartmentDetails body) { + changeAgentCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeAgentCompartmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeAgentCompartmentRequest + */ + public ChangeAgentCompartmentRequest buildWithoutInvocationCallback() { + ChangeAgentCompartmentRequest request = new ChangeAgentCompartmentRequest(); + request.agentId = agentId; + request.changeAgentCompartmentDetails = changeAgentCompartmentDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new ChangeAgentCompartmentRequest(agentId, changeAgentCompartmentDetails, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .agentId(agentId) + .changeAgentCompartmentDetails(changeAgentCompartmentDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",agentId=").append(String.valueOf(this.agentId)); + sb.append(",changeAgentCompartmentDetails=") + .append(String.valueOf(this.changeAgentCompartmentDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeAgentCompartmentRequest)) { + return false; + } + + ChangeAgentCompartmentRequest other = (ChangeAgentCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.agentId, other.agentId) + && java.util.Objects.equals( + this.changeAgentCompartmentDetails, other.changeAgentCompartmentDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.agentId == null ? 43 : this.agentId.hashCode()); + result = + (result * PRIME) + + (this.changeAgentCompartmentDetails == null + ? 43 + : this.changeAgentCompartmentDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ChangeAgentEndpointCompartmentRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ChangeAgentEndpointCompartmentRequest.java new file mode 100644 index 00000000000..26f5f228a31 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ChangeAgentEndpointCompartmentRequest.java @@ -0,0 +1,385 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use ChangeAgentEndpointCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ChangeAgentEndpointCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.generativeaiagent.model.ChangeAgentEndpointCompartmentDetails> { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + */ + private String agentEndpointId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + */ + public String getAgentEndpointId() { + return agentEndpointId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.generativeaiagent.model.ChangeAgentEndpointCompartmentDetails + changeAgentEndpointCompartmentDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.generativeaiagent.model.ChangeAgentEndpointCompartmentDetails + getChangeAgentEndpointCompartmentDetails() { + return changeAgentEndpointCompartmentDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.generativeaiagent.model.ChangeAgentEndpointCompartmentDetails getBody$() { + return changeAgentEndpointCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeAgentEndpointCompartmentRequest, + com.oracle.bmc.generativeaiagent.model.ChangeAgentEndpointCompartmentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + */ + private String agentEndpointId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + * @param agentEndpointId the value to set + * @return this builder instance + */ + public Builder agentEndpointId(String agentEndpointId) { + this.agentEndpointId = agentEndpointId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.generativeaiagent.model.ChangeAgentEndpointCompartmentDetails + changeAgentEndpointCompartmentDetails = null; + + /** + * The information to be updated. + * @param changeAgentEndpointCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeAgentEndpointCompartmentDetails( + com.oracle.bmc.generativeaiagent.model.ChangeAgentEndpointCompartmentDetails + changeAgentEndpointCompartmentDetails) { + this.changeAgentEndpointCompartmentDetails = changeAgentEndpointCompartmentDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeAgentEndpointCompartmentRequest o) { + agentEndpointId(o.getAgentEndpointId()); + changeAgentEndpointCompartmentDetails(o.getChangeAgentEndpointCompartmentDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeAgentEndpointCompartmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeAgentEndpointCompartmentRequest + */ + public ChangeAgentEndpointCompartmentRequest build() { + ChangeAgentEndpointCompartmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.generativeaiagent.model.ChangeAgentEndpointCompartmentDetails body) { + changeAgentEndpointCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeAgentEndpointCompartmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeAgentEndpointCompartmentRequest + */ + public ChangeAgentEndpointCompartmentRequest buildWithoutInvocationCallback() { + ChangeAgentEndpointCompartmentRequest request = + new ChangeAgentEndpointCompartmentRequest(); + request.agentEndpointId = agentEndpointId; + request.changeAgentEndpointCompartmentDetails = changeAgentEndpointCompartmentDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new ChangeAgentEndpointCompartmentRequest(agentEndpointId, changeAgentEndpointCompartmentDetails, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .agentEndpointId(agentEndpointId) + .changeAgentEndpointCompartmentDetails(changeAgentEndpointCompartmentDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",agentEndpointId=").append(String.valueOf(this.agentEndpointId)); + sb.append(",changeAgentEndpointCompartmentDetails=") + .append(String.valueOf(this.changeAgentEndpointCompartmentDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeAgentEndpointCompartmentRequest)) { + return false; + } + + ChangeAgentEndpointCompartmentRequest other = (ChangeAgentEndpointCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.agentEndpointId, other.agentEndpointId) + && java.util.Objects.equals( + this.changeAgentEndpointCompartmentDetails, + other.changeAgentEndpointCompartmentDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.agentEndpointId == null ? 43 : this.agentEndpointId.hashCode()); + result = + (result * PRIME) + + (this.changeAgentEndpointCompartmentDetails == null + ? 43 + : this.changeAgentEndpointCompartmentDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ChangeKnowledgeBaseCompartmentRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ChangeKnowledgeBaseCompartmentRequest.java new file mode 100644 index 00000000000..27cdff47702 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ChangeKnowledgeBaseCompartmentRequest.java @@ -0,0 +1,385 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use ChangeKnowledgeBaseCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ChangeKnowledgeBaseCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.generativeaiagent.model.ChangeKnowledgeBaseCompartmentDetails> { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + */ + private String knowledgeBaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + */ + public String getKnowledgeBaseId() { + return knowledgeBaseId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.generativeaiagent.model.ChangeKnowledgeBaseCompartmentDetails + changeKnowledgeBaseCompartmentDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.generativeaiagent.model.ChangeKnowledgeBaseCompartmentDetails + getChangeKnowledgeBaseCompartmentDetails() { + return changeKnowledgeBaseCompartmentDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.generativeaiagent.model.ChangeKnowledgeBaseCompartmentDetails getBody$() { + return changeKnowledgeBaseCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeKnowledgeBaseCompartmentRequest, + com.oracle.bmc.generativeaiagent.model.ChangeKnowledgeBaseCompartmentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + */ + private String knowledgeBaseId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + * @param knowledgeBaseId the value to set + * @return this builder instance + */ + public Builder knowledgeBaseId(String knowledgeBaseId) { + this.knowledgeBaseId = knowledgeBaseId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.generativeaiagent.model.ChangeKnowledgeBaseCompartmentDetails + changeKnowledgeBaseCompartmentDetails = null; + + /** + * The information to be updated. + * @param changeKnowledgeBaseCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeKnowledgeBaseCompartmentDetails( + com.oracle.bmc.generativeaiagent.model.ChangeKnowledgeBaseCompartmentDetails + changeKnowledgeBaseCompartmentDetails) { + this.changeKnowledgeBaseCompartmentDetails = changeKnowledgeBaseCompartmentDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeKnowledgeBaseCompartmentRequest o) { + knowledgeBaseId(o.getKnowledgeBaseId()); + changeKnowledgeBaseCompartmentDetails(o.getChangeKnowledgeBaseCompartmentDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeKnowledgeBaseCompartmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeKnowledgeBaseCompartmentRequest + */ + public ChangeKnowledgeBaseCompartmentRequest build() { + ChangeKnowledgeBaseCompartmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.generativeaiagent.model.ChangeKnowledgeBaseCompartmentDetails body) { + changeKnowledgeBaseCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeKnowledgeBaseCompartmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeKnowledgeBaseCompartmentRequest + */ + public ChangeKnowledgeBaseCompartmentRequest buildWithoutInvocationCallback() { + ChangeKnowledgeBaseCompartmentRequest request = + new ChangeKnowledgeBaseCompartmentRequest(); + request.knowledgeBaseId = knowledgeBaseId; + request.changeKnowledgeBaseCompartmentDetails = changeKnowledgeBaseCompartmentDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new ChangeKnowledgeBaseCompartmentRequest(knowledgeBaseId, changeKnowledgeBaseCompartmentDetails, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .knowledgeBaseId(knowledgeBaseId) + .changeKnowledgeBaseCompartmentDetails(changeKnowledgeBaseCompartmentDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",knowledgeBaseId=").append(String.valueOf(this.knowledgeBaseId)); + sb.append(",changeKnowledgeBaseCompartmentDetails=") + .append(String.valueOf(this.changeKnowledgeBaseCompartmentDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeKnowledgeBaseCompartmentRequest)) { + return false; + } + + ChangeKnowledgeBaseCompartmentRequest other = (ChangeKnowledgeBaseCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.knowledgeBaseId, other.knowledgeBaseId) + && java.util.Objects.equals( + this.changeKnowledgeBaseCompartmentDetails, + other.changeKnowledgeBaseCompartmentDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.knowledgeBaseId == null ? 43 : this.knowledgeBaseId.hashCode()); + result = + (result * PRIME) + + (this.changeKnowledgeBaseCompartmentDetails == null + ? 43 + : this.changeKnowledgeBaseCompartmentDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CreateAgentEndpointRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CreateAgentEndpointRequest.java new file mode 100644 index 00000000000..9e16f755e05 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CreateAgentEndpointRequest.java @@ -0,0 +1,301 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use CreateAgentEndpointRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateAgentEndpointRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.generativeaiagent.model.CreateAgentEndpointDetails> { + + /** + * Details for the new endpoint. + */ + private com.oracle.bmc.generativeaiagent.model.CreateAgentEndpointDetails + createAgentEndpointDetails; + + /** + * Details for the new endpoint. + */ + public com.oracle.bmc.generativeaiagent.model.CreateAgentEndpointDetails + getCreateAgentEndpointDetails() { + return createAgentEndpointDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.generativeaiagent.model.CreateAgentEndpointDetails getBody$() { + return createAgentEndpointDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateAgentEndpointRequest, + com.oracle.bmc.generativeaiagent.model.CreateAgentEndpointDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new endpoint. + */ + private com.oracle.bmc.generativeaiagent.model.CreateAgentEndpointDetails + createAgentEndpointDetails = null; + + /** + * Details for the new endpoint. + * @param createAgentEndpointDetails the value to set + * @return this builder instance + */ + public Builder createAgentEndpointDetails( + com.oracle.bmc.generativeaiagent.model.CreateAgentEndpointDetails + createAgentEndpointDetails) { + this.createAgentEndpointDetails = createAgentEndpointDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateAgentEndpointRequest o) { + createAgentEndpointDetails(o.getCreateAgentEndpointDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateAgentEndpointRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateAgentEndpointRequest + */ + public CreateAgentEndpointRequest build() { + CreateAgentEndpointRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.generativeaiagent.model.CreateAgentEndpointDetails body) { + createAgentEndpointDetails(body); + return this; + } + + /** + * Build the instance of CreateAgentEndpointRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateAgentEndpointRequest + */ + public CreateAgentEndpointRequest buildWithoutInvocationCallback() { + CreateAgentEndpointRequest request = new CreateAgentEndpointRequest(); + request.createAgentEndpointDetails = createAgentEndpointDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateAgentEndpointRequest(createAgentEndpointDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createAgentEndpointDetails(createAgentEndpointDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createAgentEndpointDetails=") + .append(String.valueOf(this.createAgentEndpointDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAgentEndpointRequest)) { + return false; + } + + CreateAgentEndpointRequest other = (CreateAgentEndpointRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createAgentEndpointDetails, other.createAgentEndpointDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createAgentEndpointDetails == null + ? 43 + : this.createAgentEndpointDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CreateAgentRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CreateAgentRequest.java new file mode 100644 index 00000000000..6564de45700 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CreateAgentRequest.java @@ -0,0 +1,293 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use CreateAgentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateAgentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.generativeaiagent.model.CreateAgentDetails> { + + /** + * Details for the new agent. + */ + private com.oracle.bmc.generativeaiagent.model.CreateAgentDetails createAgentDetails; + + /** + * Details for the new agent. + */ + public com.oracle.bmc.generativeaiagent.model.CreateAgentDetails getCreateAgentDetails() { + return createAgentDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.generativeaiagent.model.CreateAgentDetails getBody$() { + return createAgentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateAgentRequest, com.oracle.bmc.generativeaiagent.model.CreateAgentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new agent. + */ + private com.oracle.bmc.generativeaiagent.model.CreateAgentDetails createAgentDetails = null; + + /** + * Details for the new agent. + * @param createAgentDetails the value to set + * @return this builder instance + */ + public Builder createAgentDetails( + com.oracle.bmc.generativeaiagent.model.CreateAgentDetails createAgentDetails) { + this.createAgentDetails = createAgentDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateAgentRequest o) { + createAgentDetails(o.getCreateAgentDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateAgentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateAgentRequest + */ + public CreateAgentRequest build() { + CreateAgentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.generativeaiagent.model.CreateAgentDetails body) { + createAgentDetails(body); + return this; + } + + /** + * Build the instance of CreateAgentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateAgentRequest + */ + public CreateAgentRequest buildWithoutInvocationCallback() { + CreateAgentRequest request = new CreateAgentRequest(); + request.createAgentDetails = createAgentDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateAgentRequest(createAgentDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createAgentDetails(createAgentDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createAgentDetails=").append(String.valueOf(this.createAgentDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAgentRequest)) { + return false; + } + + CreateAgentRequest other = (CreateAgentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.createAgentDetails, other.createAgentDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createAgentDetails == null + ? 43 + : this.createAgentDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CreateDataIngestionJobRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CreateDataIngestionJobRequest.java new file mode 100644 index 00000000000..8a0e7af1dfc --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CreateDataIngestionJobRequest.java @@ -0,0 +1,301 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use CreateDataIngestionJobRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateDataIngestionJobRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.generativeaiagent.model.CreateDataIngestionJobDetails> { + + /** + * Details for the new data ingestion job. + */ + private com.oracle.bmc.generativeaiagent.model.CreateDataIngestionJobDetails + createDataIngestionJobDetails; + + /** + * Details for the new data ingestion job. + */ + public com.oracle.bmc.generativeaiagent.model.CreateDataIngestionJobDetails + getCreateDataIngestionJobDetails() { + return createDataIngestionJobDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.generativeaiagent.model.CreateDataIngestionJobDetails getBody$() { + return createDataIngestionJobDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateDataIngestionJobRequest, + com.oracle.bmc.generativeaiagent.model.CreateDataIngestionJobDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new data ingestion job. + */ + private com.oracle.bmc.generativeaiagent.model.CreateDataIngestionJobDetails + createDataIngestionJobDetails = null; + + /** + * Details for the new data ingestion job. + * @param createDataIngestionJobDetails the value to set + * @return this builder instance + */ + public Builder createDataIngestionJobDetails( + com.oracle.bmc.generativeaiagent.model.CreateDataIngestionJobDetails + createDataIngestionJobDetails) { + this.createDataIngestionJobDetails = createDataIngestionJobDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateDataIngestionJobRequest o) { + createDataIngestionJobDetails(o.getCreateDataIngestionJobDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateDataIngestionJobRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateDataIngestionJobRequest + */ + public CreateDataIngestionJobRequest build() { + CreateDataIngestionJobRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.generativeaiagent.model.CreateDataIngestionJobDetails body) { + createDataIngestionJobDetails(body); + return this; + } + + /** + * Build the instance of CreateDataIngestionJobRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateDataIngestionJobRequest + */ + public CreateDataIngestionJobRequest buildWithoutInvocationCallback() { + CreateDataIngestionJobRequest request = new CreateDataIngestionJobRequest(); + request.createDataIngestionJobDetails = createDataIngestionJobDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateDataIngestionJobRequest(createDataIngestionJobDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createDataIngestionJobDetails(createDataIngestionJobDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createDataIngestionJobDetails=") + .append(String.valueOf(this.createDataIngestionJobDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDataIngestionJobRequest)) { + return false; + } + + CreateDataIngestionJobRequest other = (CreateDataIngestionJobRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createDataIngestionJobDetails, other.createDataIngestionJobDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createDataIngestionJobDetails == null + ? 43 + : this.createDataIngestionJobDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CreateDataSourceRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CreateDataSourceRequest.java new file mode 100644 index 00000000000..4123f2d6f0e --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CreateDataSourceRequest.java @@ -0,0 +1,298 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use CreateDataSourceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateDataSourceRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.generativeaiagent.model.CreateDataSourceDetails> { + + /** + * Details for the new data source. + */ + private com.oracle.bmc.generativeaiagent.model.CreateDataSourceDetails createDataSourceDetails; + + /** + * Details for the new data source. + */ + public com.oracle.bmc.generativeaiagent.model.CreateDataSourceDetails + getCreateDataSourceDetails() { + return createDataSourceDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.generativeaiagent.model.CreateDataSourceDetails getBody$() { + return createDataSourceDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateDataSourceRequest, + com.oracle.bmc.generativeaiagent.model.CreateDataSourceDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new data source. + */ + private com.oracle.bmc.generativeaiagent.model.CreateDataSourceDetails + createDataSourceDetails = null; + + /** + * Details for the new data source. + * @param createDataSourceDetails the value to set + * @return this builder instance + */ + public Builder createDataSourceDetails( + com.oracle.bmc.generativeaiagent.model.CreateDataSourceDetails + createDataSourceDetails) { + this.createDataSourceDetails = createDataSourceDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateDataSourceRequest o) { + createDataSourceDetails(o.getCreateDataSourceDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateDataSourceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateDataSourceRequest + */ + public CreateDataSourceRequest build() { + CreateDataSourceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.generativeaiagent.model.CreateDataSourceDetails body) { + createDataSourceDetails(body); + return this; + } + + /** + * Build the instance of CreateDataSourceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateDataSourceRequest + */ + public CreateDataSourceRequest buildWithoutInvocationCallback() { + CreateDataSourceRequest request = new CreateDataSourceRequest(); + request.createDataSourceDetails = createDataSourceDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateDataSourceRequest(createDataSourceDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createDataSourceDetails(createDataSourceDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createDataSourceDetails=").append(String.valueOf(this.createDataSourceDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDataSourceRequest)) { + return false; + } + + CreateDataSourceRequest other = (CreateDataSourceRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createDataSourceDetails, other.createDataSourceDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createDataSourceDetails == null + ? 43 + : this.createDataSourceDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CreateKnowledgeBaseRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CreateKnowledgeBaseRequest.java new file mode 100644 index 00000000000..62c1ea6f90e --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/CreateKnowledgeBaseRequest.java @@ -0,0 +1,301 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use CreateKnowledgeBaseRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateKnowledgeBaseRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.generativeaiagent.model.CreateKnowledgeBaseDetails> { + + /** + * Details for the new knowledge base. + */ + private com.oracle.bmc.generativeaiagent.model.CreateKnowledgeBaseDetails + createKnowledgeBaseDetails; + + /** + * Details for the new knowledge base. + */ + public com.oracle.bmc.generativeaiagent.model.CreateKnowledgeBaseDetails + getCreateKnowledgeBaseDetails() { + return createKnowledgeBaseDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.generativeaiagent.model.CreateKnowledgeBaseDetails getBody$() { + return createKnowledgeBaseDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateKnowledgeBaseRequest, + com.oracle.bmc.generativeaiagent.model.CreateKnowledgeBaseDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new knowledge base. + */ + private com.oracle.bmc.generativeaiagent.model.CreateKnowledgeBaseDetails + createKnowledgeBaseDetails = null; + + /** + * Details for the new knowledge base. + * @param createKnowledgeBaseDetails the value to set + * @return this builder instance + */ + public Builder createKnowledgeBaseDetails( + com.oracle.bmc.generativeaiagent.model.CreateKnowledgeBaseDetails + createKnowledgeBaseDetails) { + this.createKnowledgeBaseDetails = createKnowledgeBaseDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateKnowledgeBaseRequest o) { + createKnowledgeBaseDetails(o.getCreateKnowledgeBaseDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateKnowledgeBaseRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateKnowledgeBaseRequest + */ + public CreateKnowledgeBaseRequest build() { + CreateKnowledgeBaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.generativeaiagent.model.CreateKnowledgeBaseDetails body) { + createKnowledgeBaseDetails(body); + return this; + } + + /** + * Build the instance of CreateKnowledgeBaseRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateKnowledgeBaseRequest + */ + public CreateKnowledgeBaseRequest buildWithoutInvocationCallback() { + CreateKnowledgeBaseRequest request = new CreateKnowledgeBaseRequest(); + request.createKnowledgeBaseDetails = createKnowledgeBaseDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateKnowledgeBaseRequest(createKnowledgeBaseDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createKnowledgeBaseDetails(createKnowledgeBaseDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createKnowledgeBaseDetails=") + .append(String.valueOf(this.createKnowledgeBaseDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateKnowledgeBaseRequest)) { + return false; + } + + CreateKnowledgeBaseRequest other = (CreateKnowledgeBaseRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createKnowledgeBaseDetails, other.createKnowledgeBaseDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createKnowledgeBaseDetails == null + ? 43 + : this.createKnowledgeBaseDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/DeleteAgentEndpointRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/DeleteAgentEndpointRequest.java new file mode 100644 index 00000000000..0ec0080001a --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/DeleteAgentEndpointRequest.java @@ -0,0 +1,261 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use DeleteAgentEndpointRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteAgentEndpointRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + */ + private String agentEndpointId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + */ + public String getAgentEndpointId() { + return agentEndpointId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteAgentEndpointRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + */ + private String agentEndpointId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + * @param agentEndpointId the value to set + * @return this builder instance + */ + public Builder agentEndpointId(String agentEndpointId) { + this.agentEndpointId = agentEndpointId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteAgentEndpointRequest o) { + agentEndpointId(o.getAgentEndpointId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteAgentEndpointRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteAgentEndpointRequest + */ + public DeleteAgentEndpointRequest build() { + DeleteAgentEndpointRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteAgentEndpointRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteAgentEndpointRequest + */ + public DeleteAgentEndpointRequest buildWithoutInvocationCallback() { + DeleteAgentEndpointRequest request = new DeleteAgentEndpointRequest(); + request.agentEndpointId = agentEndpointId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteAgentEndpointRequest(agentEndpointId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .agentEndpointId(agentEndpointId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",agentEndpointId=").append(String.valueOf(this.agentEndpointId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteAgentEndpointRequest)) { + return false; + } + + DeleteAgentEndpointRequest other = (DeleteAgentEndpointRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.agentEndpointId, other.agentEndpointId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.agentEndpointId == null ? 43 : this.agentEndpointId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/DeleteAgentRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/DeleteAgentRequest.java new file mode 100644 index 00000000000..df12eaab54d --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/DeleteAgentRequest.java @@ -0,0 +1,256 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use DeleteAgentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteAgentRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + */ + private String agentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + */ + public String getAgentId() { + return agentId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteAgentRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + */ + private String agentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + * @param agentId the value to set + * @return this builder instance + */ + public Builder agentId(String agentId) { + this.agentId = agentId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteAgentRequest o) { + agentId(o.getAgentId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteAgentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteAgentRequest + */ + public DeleteAgentRequest build() { + DeleteAgentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteAgentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteAgentRequest + */ + public DeleteAgentRequest buildWithoutInvocationCallback() { + DeleteAgentRequest request = new DeleteAgentRequest(); + request.agentId = agentId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteAgentRequest(agentId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().agentId(agentId).ifMatch(ifMatch).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",agentId=").append(String.valueOf(this.agentId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteAgentRequest)) { + return false; + } + + DeleteAgentRequest other = (DeleteAgentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.agentId, other.agentId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.agentId == null ? 43 : this.agentId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/DeleteDataIngestionJobRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/DeleteDataIngestionJobRequest.java new file mode 100644 index 00000000000..c0a26735d44 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/DeleteDataIngestionJobRequest.java @@ -0,0 +1,264 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use DeleteDataIngestionJobRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteDataIngestionJobRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data ingestion job. + */ + private String dataIngestionJobId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data ingestion job. + */ + public String getDataIngestionJobId() { + return dataIngestionJobId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteDataIngestionJobRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data ingestion job. + */ + private String dataIngestionJobId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data ingestion job. + * @param dataIngestionJobId the value to set + * @return this builder instance + */ + public Builder dataIngestionJobId(String dataIngestionJobId) { + this.dataIngestionJobId = dataIngestionJobId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteDataIngestionJobRequest o) { + dataIngestionJobId(o.getDataIngestionJobId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteDataIngestionJobRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteDataIngestionJobRequest + */ + public DeleteDataIngestionJobRequest build() { + DeleteDataIngestionJobRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteDataIngestionJobRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteDataIngestionJobRequest + */ + public DeleteDataIngestionJobRequest buildWithoutInvocationCallback() { + DeleteDataIngestionJobRequest request = new DeleteDataIngestionJobRequest(); + request.dataIngestionJobId = dataIngestionJobId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteDataIngestionJobRequest(dataIngestionJobId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .dataIngestionJobId(dataIngestionJobId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",dataIngestionJobId=").append(String.valueOf(this.dataIngestionJobId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteDataIngestionJobRequest)) { + return false; + } + + DeleteDataIngestionJobRequest other = (DeleteDataIngestionJobRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.dataIngestionJobId, other.dataIngestionJobId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.dataIngestionJobId == null + ? 43 + : this.dataIngestionJobId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/DeleteDataSourceRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/DeleteDataSourceRequest.java new file mode 100644 index 00000000000..a5e4551259d --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/DeleteDataSourceRequest.java @@ -0,0 +1,256 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use DeleteDataSourceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteDataSourceRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + */ + private String dataSourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + */ + public String getDataSourceId() { + return dataSourceId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteDataSourceRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + */ + private String dataSourceId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + * @param dataSourceId the value to set + * @return this builder instance + */ + public Builder dataSourceId(String dataSourceId) { + this.dataSourceId = dataSourceId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteDataSourceRequest o) { + dataSourceId(o.getDataSourceId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteDataSourceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteDataSourceRequest + */ + public DeleteDataSourceRequest build() { + DeleteDataSourceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteDataSourceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteDataSourceRequest + */ + public DeleteDataSourceRequest buildWithoutInvocationCallback() { + DeleteDataSourceRequest request = new DeleteDataSourceRequest(); + request.dataSourceId = dataSourceId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteDataSourceRequest(dataSourceId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().dataSourceId(dataSourceId).ifMatch(ifMatch).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",dataSourceId=").append(String.valueOf(this.dataSourceId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteDataSourceRequest)) { + return false; + } + + DeleteDataSourceRequest other = (DeleteDataSourceRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.dataSourceId, other.dataSourceId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.dataSourceId == null ? 43 : this.dataSourceId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/DeleteKnowledgeBaseRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/DeleteKnowledgeBaseRequest.java new file mode 100644 index 00000000000..3be65fbd84e --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/DeleteKnowledgeBaseRequest.java @@ -0,0 +1,261 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use DeleteKnowledgeBaseRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteKnowledgeBaseRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + */ + private String knowledgeBaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + */ + public String getKnowledgeBaseId() { + return knowledgeBaseId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteKnowledgeBaseRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + */ + private String knowledgeBaseId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + * @param knowledgeBaseId the value to set + * @return this builder instance + */ + public Builder knowledgeBaseId(String knowledgeBaseId) { + this.knowledgeBaseId = knowledgeBaseId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteKnowledgeBaseRequest o) { + knowledgeBaseId(o.getKnowledgeBaseId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteKnowledgeBaseRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteKnowledgeBaseRequest + */ + public DeleteKnowledgeBaseRequest build() { + DeleteKnowledgeBaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteKnowledgeBaseRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteKnowledgeBaseRequest + */ + public DeleteKnowledgeBaseRequest buildWithoutInvocationCallback() { + DeleteKnowledgeBaseRequest request = new DeleteKnowledgeBaseRequest(); + request.knowledgeBaseId = knowledgeBaseId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteKnowledgeBaseRequest(knowledgeBaseId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .knowledgeBaseId(knowledgeBaseId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",knowledgeBaseId=").append(String.valueOf(this.knowledgeBaseId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteKnowledgeBaseRequest)) { + return false; + } + + DeleteKnowledgeBaseRequest other = (DeleteKnowledgeBaseRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.knowledgeBaseId, other.knowledgeBaseId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.knowledgeBaseId == null ? 43 : this.knowledgeBaseId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetAgentEndpointRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetAgentEndpointRequest.java new file mode 100644 index 00000000000..8b31182a382 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetAgentEndpointRequest.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use GetAgentEndpointRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetAgentEndpointRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + */ + private String agentEndpointId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + */ + public String getAgentEndpointId() { + return agentEndpointId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetAgentEndpointRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + */ + private String agentEndpointId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + * @param agentEndpointId the value to set + * @return this builder instance + */ + public Builder agentEndpointId(String agentEndpointId) { + this.agentEndpointId = agentEndpointId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAgentEndpointRequest o) { + agentEndpointId(o.getAgentEndpointId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetAgentEndpointRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetAgentEndpointRequest + */ + public GetAgentEndpointRequest build() { + GetAgentEndpointRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetAgentEndpointRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetAgentEndpointRequest + */ + public GetAgentEndpointRequest buildWithoutInvocationCallback() { + GetAgentEndpointRequest request = new GetAgentEndpointRequest(); + request.agentEndpointId = agentEndpointId; + request.opcRequestId = opcRequestId; + return request; + // new GetAgentEndpointRequest(agentEndpointId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().agentEndpointId(agentEndpointId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",agentEndpointId=").append(String.valueOf(this.agentEndpointId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetAgentEndpointRequest)) { + return false; + } + + GetAgentEndpointRequest other = (GetAgentEndpointRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.agentEndpointId, other.agentEndpointId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.agentEndpointId == null ? 43 : this.agentEndpointId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetAgentRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetAgentRequest.java new file mode 100644 index 00000000000..f86e8e93d62 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetAgentRequest.java @@ -0,0 +1,208 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use GetAgentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetAgentRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + */ + private String agentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + */ + public String getAgentId() { + return agentId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + */ + private String agentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + * @param agentId the value to set + * @return this builder instance + */ + public Builder agentId(String agentId) { + this.agentId = agentId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAgentRequest o) { + agentId(o.getAgentId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetAgentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetAgentRequest + */ + public GetAgentRequest build() { + GetAgentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetAgentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetAgentRequest + */ + public GetAgentRequest buildWithoutInvocationCallback() { + GetAgentRequest request = new GetAgentRequest(); + request.agentId = agentId; + request.opcRequestId = opcRequestId; + return request; + // new GetAgentRequest(agentId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().agentId(agentId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",agentId=").append(String.valueOf(this.agentId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetAgentRequest)) { + return false; + } + + GetAgentRequest other = (GetAgentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.agentId, other.agentId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.agentId == null ? 43 : this.agentId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetDataIngestionJobLogContentRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetDataIngestionJobLogContentRequest.java new file mode 100644 index 00000000000..e7e6ac1d685 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetDataIngestionJobLogContentRequest.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use GetDataIngestionJobLogContentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetDataIngestionJobLogContentRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data ingestion job. + */ + private String dataIngestionJobId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data ingestion job. + */ + public String getDataIngestionJobId() { + return dataIngestionJobId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetDataIngestionJobLogContentRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data ingestion job. + */ + private String dataIngestionJobId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data ingestion job. + * @param dataIngestionJobId the value to set + * @return this builder instance + */ + public Builder dataIngestionJobId(String dataIngestionJobId) { + this.dataIngestionJobId = dataIngestionJobId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDataIngestionJobLogContentRequest o) { + dataIngestionJobId(o.getDataIngestionJobId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetDataIngestionJobLogContentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetDataIngestionJobLogContentRequest + */ + public GetDataIngestionJobLogContentRequest build() { + GetDataIngestionJobLogContentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetDataIngestionJobLogContentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetDataIngestionJobLogContentRequest + */ + public GetDataIngestionJobLogContentRequest buildWithoutInvocationCallback() { + GetDataIngestionJobLogContentRequest request = + new GetDataIngestionJobLogContentRequest(); + request.dataIngestionJobId = dataIngestionJobId; + request.opcRequestId = opcRequestId; + return request; + // new GetDataIngestionJobLogContentRequest(dataIngestionJobId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().dataIngestionJobId(dataIngestionJobId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",dataIngestionJobId=").append(String.valueOf(this.dataIngestionJobId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDataIngestionJobLogContentRequest)) { + return false; + } + + GetDataIngestionJobLogContentRequest other = (GetDataIngestionJobLogContentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.dataIngestionJobId, other.dataIngestionJobId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.dataIngestionJobId == null + ? 43 + : this.dataIngestionJobId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetDataIngestionJobRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetDataIngestionJobRequest.java new file mode 100644 index 00000000000..e81f17d6bba --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetDataIngestionJobRequest.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use GetDataIngestionJobRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetDataIngestionJobRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data ingestion job. + */ + private String dataIngestionJobId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data ingestion job. + */ + public String getDataIngestionJobId() { + return dataIngestionJobId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetDataIngestionJobRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data ingestion job. + */ + private String dataIngestionJobId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data ingestion job. + * @param dataIngestionJobId the value to set + * @return this builder instance + */ + public Builder dataIngestionJobId(String dataIngestionJobId) { + this.dataIngestionJobId = dataIngestionJobId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDataIngestionJobRequest o) { + dataIngestionJobId(o.getDataIngestionJobId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetDataIngestionJobRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetDataIngestionJobRequest + */ + public GetDataIngestionJobRequest build() { + GetDataIngestionJobRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetDataIngestionJobRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetDataIngestionJobRequest + */ + public GetDataIngestionJobRequest buildWithoutInvocationCallback() { + GetDataIngestionJobRequest request = new GetDataIngestionJobRequest(); + request.dataIngestionJobId = dataIngestionJobId; + request.opcRequestId = opcRequestId; + return request; + // new GetDataIngestionJobRequest(dataIngestionJobId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().dataIngestionJobId(dataIngestionJobId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",dataIngestionJobId=").append(String.valueOf(this.dataIngestionJobId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDataIngestionJobRequest)) { + return false; + } + + GetDataIngestionJobRequest other = (GetDataIngestionJobRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.dataIngestionJobId, other.dataIngestionJobId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.dataIngestionJobId == null + ? 43 + : this.dataIngestionJobId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetDataSourceRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetDataSourceRequest.java new file mode 100644 index 00000000000..943a9cf0012 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetDataSourceRequest.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use GetDataSourceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetDataSourceRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + */ + private String dataSourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + */ + public String getDataSourceId() { + return dataSourceId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetDataSourceRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + */ + private String dataSourceId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + * @param dataSourceId the value to set + * @return this builder instance + */ + public Builder dataSourceId(String dataSourceId) { + this.dataSourceId = dataSourceId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDataSourceRequest o) { + dataSourceId(o.getDataSourceId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetDataSourceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetDataSourceRequest + */ + public GetDataSourceRequest build() { + GetDataSourceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetDataSourceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetDataSourceRequest + */ + public GetDataSourceRequest buildWithoutInvocationCallback() { + GetDataSourceRequest request = new GetDataSourceRequest(); + request.dataSourceId = dataSourceId; + request.opcRequestId = opcRequestId; + return request; + // new GetDataSourceRequest(dataSourceId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().dataSourceId(dataSourceId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",dataSourceId=").append(String.valueOf(this.dataSourceId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDataSourceRequest)) { + return false; + } + + GetDataSourceRequest other = (GetDataSourceRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.dataSourceId, other.dataSourceId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.dataSourceId == null ? 43 : this.dataSourceId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetKnowledgeBaseRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetKnowledgeBaseRequest.java new file mode 100644 index 00000000000..844ec78d818 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetKnowledgeBaseRequest.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use GetKnowledgeBaseRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetKnowledgeBaseRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + */ + private String knowledgeBaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + */ + public String getKnowledgeBaseId() { + return knowledgeBaseId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetKnowledgeBaseRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + */ + private String knowledgeBaseId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + * @param knowledgeBaseId the value to set + * @return this builder instance + */ + public Builder knowledgeBaseId(String knowledgeBaseId) { + this.knowledgeBaseId = knowledgeBaseId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetKnowledgeBaseRequest o) { + knowledgeBaseId(o.getKnowledgeBaseId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetKnowledgeBaseRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetKnowledgeBaseRequest + */ + public GetKnowledgeBaseRequest build() { + GetKnowledgeBaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetKnowledgeBaseRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetKnowledgeBaseRequest + */ + public GetKnowledgeBaseRequest buildWithoutInvocationCallback() { + GetKnowledgeBaseRequest request = new GetKnowledgeBaseRequest(); + request.knowledgeBaseId = knowledgeBaseId; + request.opcRequestId = opcRequestId; + return request; + // new GetKnowledgeBaseRequest(knowledgeBaseId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().knowledgeBaseId(knowledgeBaseId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",knowledgeBaseId=").append(String.valueOf(this.knowledgeBaseId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetKnowledgeBaseRequest)) { + return false; + } + + GetKnowledgeBaseRequest other = (GetKnowledgeBaseRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.knowledgeBaseId, other.knowledgeBaseId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.knowledgeBaseId == null ? 43 : this.knowledgeBaseId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetWorkRequestRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetWorkRequestRequest.java new file mode 100644 index 00000000000..fd7e2a99233 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/GetWorkRequestRequest.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use GetWorkRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetWorkRequestRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetWorkRequestRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetWorkRequestRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetWorkRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetWorkRequestRequest + */ + public GetWorkRequestRequest build() { + GetWorkRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetWorkRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetWorkRequestRequest + */ + public GetWorkRequestRequest buildWithoutInvocationCallback() { + GetWorkRequestRequest request = new GetWorkRequestRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + return request; + // new GetWorkRequestRequest(workRequestId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().workRequestId(workRequestId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetWorkRequestRequest)) { + return false; + } + + GetWorkRequestRequest other = (GetWorkRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListAgentEndpointsRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListAgentEndpointsRequest.java new file mode 100644 index 00000000000..5e6868142fa --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListAgentEndpointsRequest.java @@ -0,0 +1,520 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use ListAgentEndpointsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListAgentEndpointsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + */ + private String agentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + */ + public String getAgentId() { + return agentId; + } + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + private com.oracle.bmc.generativeaiagent.model.AgentEndpoint.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + public com.oracle.bmc.generativeaiagent.model.AgentEndpoint.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the given display name exactly. + */ + private String displayName; + + /** + * A filter to return only resources that match the given display name exactly. + */ + public String getDisplayName() { + return displayName; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public Integer getLimit() { + return limit; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.generativeaiagent.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListAgentEndpointsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + */ + private String agentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + * @param agentId the value to set + * @return this builder instance + */ + public Builder agentId(String agentId) { + this.agentId = agentId; + return this; + } + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + private com.oracle.bmc.generativeaiagent.model.AgentEndpoint.LifecycleState lifecycleState = + null; + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.generativeaiagent.model.AgentEndpoint.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the given display name exactly. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the given display name exactly. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAgentEndpointsRequest o) { + compartmentId(o.getCompartmentId()); + agentId(o.getAgentId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListAgentEndpointsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListAgentEndpointsRequest + */ + public ListAgentEndpointsRequest build() { + ListAgentEndpointsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListAgentEndpointsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListAgentEndpointsRequest + */ + public ListAgentEndpointsRequest buildWithoutInvocationCallback() { + ListAgentEndpointsRequest request = new ListAgentEndpointsRequest(); + request.compartmentId = compartmentId; + request.agentId = agentId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListAgentEndpointsRequest(compartmentId, agentId, lifecycleState, displayName, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .agentId(agentId) + .lifecycleState(lifecycleState) + .displayName(displayName) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",agentId=").append(String.valueOf(this.agentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListAgentEndpointsRequest)) { + return false; + } + + ListAgentEndpointsRequest other = (ListAgentEndpointsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.agentId, other.agentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.agentId == null ? 43 : this.agentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListAgentsRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListAgentsRequest.java new file mode 100644 index 00000000000..a02b6e0f062 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListAgentsRequest.java @@ -0,0 +1,486 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use ListAgentsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListAgentsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + private com.oracle.bmc.generativeaiagent.model.Agent.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + public com.oracle.bmc.generativeaiagent.model.Agent.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the given display name exactly. + */ + private String displayName; + + /** + * A filter to return only resources that match the given display name exactly. + */ + public String getDisplayName() { + return displayName; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public Integer getLimit() { + return limit; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.generativeaiagent.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListAgentsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + private com.oracle.bmc.generativeaiagent.model.Agent.LifecycleState lifecycleState = null; + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.generativeaiagent.model.Agent.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the given display name exactly. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the given display name exactly. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAgentsRequest o) { + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListAgentsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListAgentsRequest + */ + public ListAgentsRequest build() { + ListAgentsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListAgentsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListAgentsRequest + */ + public ListAgentsRequest buildWithoutInvocationCallback() { + ListAgentsRequest request = new ListAgentsRequest(); + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListAgentsRequest(compartmentId, lifecycleState, displayName, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .lifecycleState(lifecycleState) + .displayName(displayName) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListAgentsRequest)) { + return false; + } + + ListAgentsRequest other = (ListAgentsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListDataIngestionJobsRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListDataIngestionJobsRequest.java new file mode 100644 index 00000000000..2c81dd793ce --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListDataIngestionJobsRequest.java @@ -0,0 +1,522 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use ListDataIngestionJobsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListDataIngestionJobsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + */ + private String dataSourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + */ + public String getDataSourceId() { + return dataSourceId; + } + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + private com.oracle.bmc.generativeaiagent.model.DataIngestionJob.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + public com.oracle.bmc.generativeaiagent.model.DataIngestionJob.LifecycleState + getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the given display name exactly. + */ + private String displayName; + + /** + * A filter to return only resources that match the given display name exactly. + */ + public String getDisplayName() { + return displayName; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public Integer getLimit() { + return limit; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.generativeaiagent.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListDataIngestionJobsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + */ + private String dataSourceId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + * @param dataSourceId the value to set + * @return this builder instance + */ + public Builder dataSourceId(String dataSourceId) { + this.dataSourceId = dataSourceId; + return this; + } + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + private com.oracle.bmc.generativeaiagent.model.DataIngestionJob.LifecycleState + lifecycleState = null; + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.generativeaiagent.model.DataIngestionJob.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the given display name exactly. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the given display name exactly. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListDataIngestionJobsRequest o) { + compartmentId(o.getCompartmentId()); + dataSourceId(o.getDataSourceId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListDataIngestionJobsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListDataIngestionJobsRequest + */ + public ListDataIngestionJobsRequest build() { + ListDataIngestionJobsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListDataIngestionJobsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListDataIngestionJobsRequest + */ + public ListDataIngestionJobsRequest buildWithoutInvocationCallback() { + ListDataIngestionJobsRequest request = new ListDataIngestionJobsRequest(); + request.compartmentId = compartmentId; + request.dataSourceId = dataSourceId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListDataIngestionJobsRequest(compartmentId, dataSourceId, lifecycleState, displayName, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .dataSourceId(dataSourceId) + .lifecycleState(lifecycleState) + .displayName(displayName) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",dataSourceId=").append(String.valueOf(this.dataSourceId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListDataIngestionJobsRequest)) { + return false; + } + + ListDataIngestionJobsRequest other = (ListDataIngestionJobsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.dataSourceId, other.dataSourceId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.dataSourceId == null ? 43 : this.dataSourceId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListDataSourcesRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListDataSourcesRequest.java new file mode 100644 index 00000000000..c69522978ec --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListDataSourcesRequest.java @@ -0,0 +1,521 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use ListDataSourcesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListDataSourcesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + */ + private String knowledgeBaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + */ + public String getKnowledgeBaseId() { + return knowledgeBaseId; + } + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + private com.oracle.bmc.generativeaiagent.model.DataSource.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + public com.oracle.bmc.generativeaiagent.model.DataSource.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the given display name exactly. + */ + private String displayName; + + /** + * A filter to return only resources that match the given display name exactly. + */ + public String getDisplayName() { + return displayName; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public Integer getLimit() { + return limit; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.generativeaiagent.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListDataSourcesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + */ + private String knowledgeBaseId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + * @param knowledgeBaseId the value to set + * @return this builder instance + */ + public Builder knowledgeBaseId(String knowledgeBaseId) { + this.knowledgeBaseId = knowledgeBaseId; + return this; + } + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + private com.oracle.bmc.generativeaiagent.model.DataSource.LifecycleState lifecycleState = + null; + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.generativeaiagent.model.DataSource.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the given display name exactly. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the given display name exactly. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListDataSourcesRequest o) { + compartmentId(o.getCompartmentId()); + knowledgeBaseId(o.getKnowledgeBaseId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListDataSourcesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListDataSourcesRequest + */ + public ListDataSourcesRequest build() { + ListDataSourcesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListDataSourcesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListDataSourcesRequest + */ + public ListDataSourcesRequest buildWithoutInvocationCallback() { + ListDataSourcesRequest request = new ListDataSourcesRequest(); + request.compartmentId = compartmentId; + request.knowledgeBaseId = knowledgeBaseId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListDataSourcesRequest(compartmentId, knowledgeBaseId, lifecycleState, displayName, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .knowledgeBaseId(knowledgeBaseId) + .lifecycleState(lifecycleState) + .displayName(displayName) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",knowledgeBaseId=").append(String.valueOf(this.knowledgeBaseId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListDataSourcesRequest)) { + return false; + } + + ListDataSourcesRequest other = (ListDataSourcesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.knowledgeBaseId, other.knowledgeBaseId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.knowledgeBaseId == null ? 43 : this.knowledgeBaseId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListKnowledgeBasesRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListKnowledgeBasesRequest.java new file mode 100644 index 00000000000..6632920c909 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListKnowledgeBasesRequest.java @@ -0,0 +1,488 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use ListKnowledgeBasesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListKnowledgeBasesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + private com.oracle.bmc.generativeaiagent.model.KnowledgeBase.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + public com.oracle.bmc.generativeaiagent.model.KnowledgeBase.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the given display name exactly. + */ + private String displayName; + + /** + * A filter to return only resources that match the given display name exactly. + */ + public String getDisplayName() { + return displayName; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public Integer getLimit() { + return limit; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.generativeaiagent.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListKnowledgeBasesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + private com.oracle.bmc.generativeaiagent.model.KnowledgeBase.LifecycleState lifecycleState = + null; + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.generativeaiagent.model.KnowledgeBase.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the given display name exactly. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the given display name exactly. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code displayName} is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListKnowledgeBasesRequest o) { + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + displayName(o.getDisplayName()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListKnowledgeBasesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListKnowledgeBasesRequest + */ + public ListKnowledgeBasesRequest build() { + ListKnowledgeBasesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListKnowledgeBasesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListKnowledgeBasesRequest + */ + public ListKnowledgeBasesRequest buildWithoutInvocationCallback() { + ListKnowledgeBasesRequest request = new ListKnowledgeBasesRequest(); + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.displayName = displayName; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListKnowledgeBasesRequest(compartmentId, lifecycleState, displayName, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .lifecycleState(lifecycleState) + .displayName(displayName) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListKnowledgeBasesRequest)) { + return false; + } + + ListKnowledgeBasesRequest other = (ListKnowledgeBasesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListWorkRequestErrorsRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListWorkRequestErrorsRequest.java new file mode 100644 index 00000000000..325da0d4745 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListWorkRequestErrorsRequest.java @@ -0,0 +1,406 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use ListWorkRequestErrorsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListWorkRequestErrorsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public Integer getLimit() { + return limit; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + **/ + public enum SortBy { + Timestamp("timestamp"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.generativeaiagent.model.SortOrder getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListWorkRequestErrorsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestErrorsRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListWorkRequestErrorsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListWorkRequestErrorsRequest + */ + public ListWorkRequestErrorsRequest build() { + ListWorkRequestErrorsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListWorkRequestErrorsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListWorkRequestErrorsRequest + */ + public ListWorkRequestErrorsRequest buildWithoutInvocationCallback() { + ListWorkRequestErrorsRequest request = new ListWorkRequestErrorsRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListWorkRequestErrorsRequest(workRequestId, opcRequestId, page, limit, sortBy, sortOrder); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .workRequestId(workRequestId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortBy(sortBy) + .sortOrder(sortOrder); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListWorkRequestErrorsRequest)) { + return false; + } + + ListWorkRequestErrorsRequest other = (ListWorkRequestErrorsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListWorkRequestLogsRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListWorkRequestLogsRequest.java new file mode 100644 index 00000000000..7e9edf60d13 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListWorkRequestLogsRequest.java @@ -0,0 +1,405 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use ListWorkRequestLogsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListWorkRequestLogsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public Integer getLimit() { + return limit; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + **/ + public enum SortBy { + Timestamp("timestamp"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.generativeaiagent.model.SortOrder getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListWorkRequestLogsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestLogsRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListWorkRequestLogsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListWorkRequestLogsRequest + */ + public ListWorkRequestLogsRequest build() { + ListWorkRequestLogsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListWorkRequestLogsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListWorkRequestLogsRequest + */ + public ListWorkRequestLogsRequest buildWithoutInvocationCallback() { + ListWorkRequestLogsRequest request = new ListWorkRequestLogsRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListWorkRequestLogsRequest(workRequestId, opcRequestId, page, limit, sortBy, sortOrder); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .workRequestId(workRequestId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortBy(sortBy) + .sortOrder(sortOrder); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListWorkRequestLogsRequest)) { + return false; + } + + ListWorkRequestLogsRequest other = (ListWorkRequestLogsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListWorkRequestsRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListWorkRequestsRequest.java new file mode 100644 index 00000000000..ae5ac379f24 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/ListWorkRequestsRequest.java @@ -0,0 +1,503 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use ListWorkRequestsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListWorkRequestsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * A filter to return only the resources that match the given lifecycle state. + */ + private com.oracle.bmc.generativeaiagent.model.OperationStatus status; + + /** + * A filter to return only the resources that match the given lifecycle state. + */ + public com.oracle.bmc.generativeaiagent.model.OperationStatus getStatus() { + return status; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource affected by the work request. + */ + private String resourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource affected by the work request. + */ + public String getResourceId() { + return resourceId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public Integer getLimit() { + return limit; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.generativeaiagent.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timeAccepted} is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timeAccepted} is descending. + * + **/ + public enum SortBy { + TimeAccepted("timeAccepted"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timeAccepted} is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListWorkRequestsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * A filter to return only the resources that match the given lifecycle state. + */ + private com.oracle.bmc.generativeaiagent.model.OperationStatus status = null; + + /** + * A filter to return only the resources that match the given lifecycle state. + * @param status the value to set + * @return this builder instance + */ + public Builder status(com.oracle.bmc.generativeaiagent.model.OperationStatus status) { + this.status = status; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource affected by the work request. + */ + private String resourceId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource affected by the work request. + * @param resourceId the value to set + * @return this builder instance + */ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.generativeaiagent.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timeAccepted} is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timeAccepted} is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestsRequest o) { + compartmentId(o.getCompartmentId()); + workRequestId(o.getWorkRequestId()); + status(o.getStatus()); + resourceId(o.getResourceId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListWorkRequestsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListWorkRequestsRequest + */ + public ListWorkRequestsRequest build() { + ListWorkRequestsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListWorkRequestsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListWorkRequestsRequest + */ + public ListWorkRequestsRequest buildWithoutInvocationCallback() { + ListWorkRequestsRequest request = new ListWorkRequestsRequest(); + request.compartmentId = compartmentId; + request.workRequestId = workRequestId; + request.status = status; + request.resourceId = resourceId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + return request; + // new ListWorkRequestsRequest(compartmentId, workRequestId, status, resourceId, opcRequestId, page, limit, sortOrder, sortBy); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .workRequestId(workRequestId) + .status(status) + .resourceId(resourceId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortOrder(sortOrder) + .sortBy(sortBy); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",status=").append(String.valueOf(this.status)); + sb.append(",resourceId=").append(String.valueOf(this.resourceId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListWorkRequestsRequest)) { + return false; + } + + ListWorkRequestsRequest other = (ListWorkRequestsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/UpdateAgentEndpointRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/UpdateAgentEndpointRequest.java new file mode 100644 index 00000000000..2186d5c1eee --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/UpdateAgentEndpointRequest.java @@ -0,0 +1,329 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use UpdateAgentEndpointRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class UpdateAgentEndpointRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.generativeaiagent.model.UpdateAgentEndpointDetails> { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + */ + private String agentEndpointId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + */ + public String getAgentEndpointId() { + return agentEndpointId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.generativeaiagent.model.UpdateAgentEndpointDetails + updateAgentEndpointDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.generativeaiagent.model.UpdateAgentEndpointDetails + getUpdateAgentEndpointDetails() { + return updateAgentEndpointDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.generativeaiagent.model.UpdateAgentEndpointDetails getBody$() { + return updateAgentEndpointDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateAgentEndpointRequest, + com.oracle.bmc.generativeaiagent.model.UpdateAgentEndpointDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + */ + private String agentEndpointId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + * @param agentEndpointId the value to set + * @return this builder instance + */ + public Builder agentEndpointId(String agentEndpointId) { + this.agentEndpointId = agentEndpointId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.generativeaiagent.model.UpdateAgentEndpointDetails + updateAgentEndpointDetails = null; + + /** + * The information to be updated. + * @param updateAgentEndpointDetails the value to set + * @return this builder instance + */ + public Builder updateAgentEndpointDetails( + com.oracle.bmc.generativeaiagent.model.UpdateAgentEndpointDetails + updateAgentEndpointDetails) { + this.updateAgentEndpointDetails = updateAgentEndpointDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateAgentEndpointRequest o) { + agentEndpointId(o.getAgentEndpointId()); + updateAgentEndpointDetails(o.getUpdateAgentEndpointDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateAgentEndpointRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateAgentEndpointRequest + */ + public UpdateAgentEndpointRequest build() { + UpdateAgentEndpointRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.generativeaiagent.model.UpdateAgentEndpointDetails body) { + updateAgentEndpointDetails(body); + return this; + } + + /** + * Build the instance of UpdateAgentEndpointRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateAgentEndpointRequest + */ + public UpdateAgentEndpointRequest buildWithoutInvocationCallback() { + UpdateAgentEndpointRequest request = new UpdateAgentEndpointRequest(); + request.agentEndpointId = agentEndpointId; + request.updateAgentEndpointDetails = updateAgentEndpointDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateAgentEndpointRequest(agentEndpointId, updateAgentEndpointDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .agentEndpointId(agentEndpointId) + .updateAgentEndpointDetails(updateAgentEndpointDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",agentEndpointId=").append(String.valueOf(this.agentEndpointId)); + sb.append(",updateAgentEndpointDetails=") + .append(String.valueOf(this.updateAgentEndpointDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateAgentEndpointRequest)) { + return false; + } + + UpdateAgentEndpointRequest other = (UpdateAgentEndpointRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.agentEndpointId, other.agentEndpointId) + && java.util.Objects.equals( + this.updateAgentEndpointDetails, other.updateAgentEndpointDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.agentEndpointId == null ? 43 : this.agentEndpointId.hashCode()); + result = + (result * PRIME) + + (this.updateAgentEndpointDetails == null + ? 43 + : this.updateAgentEndpointDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/UpdateAgentRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/UpdateAgentRequest.java new file mode 100644 index 00000000000..3ce7d33fe93 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/UpdateAgentRequest.java @@ -0,0 +1,319 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use UpdateAgentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class UpdateAgentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.generativeaiagent.model.UpdateAgentDetails> { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + */ + private String agentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + */ + public String getAgentId() { + return agentId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.generativeaiagent.model.UpdateAgentDetails updateAgentDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.generativeaiagent.model.UpdateAgentDetails getUpdateAgentDetails() { + return updateAgentDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.generativeaiagent.model.UpdateAgentDetails getBody$() { + return updateAgentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateAgentRequest, com.oracle.bmc.generativeaiagent.model.UpdateAgentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + */ + private String agentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the agent. + * @param agentId the value to set + * @return this builder instance + */ + public Builder agentId(String agentId) { + this.agentId = agentId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.generativeaiagent.model.UpdateAgentDetails updateAgentDetails = null; + + /** + * The information to be updated. + * @param updateAgentDetails the value to set + * @return this builder instance + */ + public Builder updateAgentDetails( + com.oracle.bmc.generativeaiagent.model.UpdateAgentDetails updateAgentDetails) { + this.updateAgentDetails = updateAgentDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateAgentRequest o) { + agentId(o.getAgentId()); + updateAgentDetails(o.getUpdateAgentDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateAgentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateAgentRequest + */ + public UpdateAgentRequest build() { + UpdateAgentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.generativeaiagent.model.UpdateAgentDetails body) { + updateAgentDetails(body); + return this; + } + + /** + * Build the instance of UpdateAgentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateAgentRequest + */ + public UpdateAgentRequest buildWithoutInvocationCallback() { + UpdateAgentRequest request = new UpdateAgentRequest(); + request.agentId = agentId; + request.updateAgentDetails = updateAgentDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateAgentRequest(agentId, updateAgentDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .agentId(agentId) + .updateAgentDetails(updateAgentDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",agentId=").append(String.valueOf(this.agentId)); + sb.append(",updateAgentDetails=").append(String.valueOf(this.updateAgentDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateAgentRequest)) { + return false; + } + + UpdateAgentRequest other = (UpdateAgentRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.agentId, other.agentId) + && java.util.Objects.equals(this.updateAgentDetails, other.updateAgentDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.agentId == null ? 43 : this.agentId.hashCode()); + result = + (result * PRIME) + + (this.updateAgentDetails == null + ? 43 + : this.updateAgentDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/UpdateDataSourceRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/UpdateDataSourceRequest.java new file mode 100644 index 00000000000..d6685c484ef --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/UpdateDataSourceRequest.java @@ -0,0 +1,324 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use UpdateDataSourceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class UpdateDataSourceRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.generativeaiagent.model.UpdateDataSourceDetails> { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + */ + private String dataSourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + */ + public String getDataSourceId() { + return dataSourceId; + } + /** + * The data source information to be updated. + */ + private com.oracle.bmc.generativeaiagent.model.UpdateDataSourceDetails updateDataSourceDetails; + + /** + * The data source information to be updated. + */ + public com.oracle.bmc.generativeaiagent.model.UpdateDataSourceDetails + getUpdateDataSourceDetails() { + return updateDataSourceDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.generativeaiagent.model.UpdateDataSourceDetails getBody$() { + return updateDataSourceDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateDataSourceRequest, + com.oracle.bmc.generativeaiagent.model.UpdateDataSourceDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + */ + private String dataSourceId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. + * @param dataSourceId the value to set + * @return this builder instance + */ + public Builder dataSourceId(String dataSourceId) { + this.dataSourceId = dataSourceId; + return this; + } + + /** + * The data source information to be updated. + */ + private com.oracle.bmc.generativeaiagent.model.UpdateDataSourceDetails + updateDataSourceDetails = null; + + /** + * The data source information to be updated. + * @param updateDataSourceDetails the value to set + * @return this builder instance + */ + public Builder updateDataSourceDetails( + com.oracle.bmc.generativeaiagent.model.UpdateDataSourceDetails + updateDataSourceDetails) { + this.updateDataSourceDetails = updateDataSourceDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateDataSourceRequest o) { + dataSourceId(o.getDataSourceId()); + updateDataSourceDetails(o.getUpdateDataSourceDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateDataSourceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateDataSourceRequest + */ + public UpdateDataSourceRequest build() { + UpdateDataSourceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.generativeaiagent.model.UpdateDataSourceDetails body) { + updateDataSourceDetails(body); + return this; + } + + /** + * Build the instance of UpdateDataSourceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateDataSourceRequest + */ + public UpdateDataSourceRequest buildWithoutInvocationCallback() { + UpdateDataSourceRequest request = new UpdateDataSourceRequest(); + request.dataSourceId = dataSourceId; + request.updateDataSourceDetails = updateDataSourceDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateDataSourceRequest(dataSourceId, updateDataSourceDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .dataSourceId(dataSourceId) + .updateDataSourceDetails(updateDataSourceDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",dataSourceId=").append(String.valueOf(this.dataSourceId)); + sb.append(",updateDataSourceDetails=").append(String.valueOf(this.updateDataSourceDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateDataSourceRequest)) { + return false; + } + + UpdateDataSourceRequest other = (UpdateDataSourceRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.dataSourceId, other.dataSourceId) + && java.util.Objects.equals( + this.updateDataSourceDetails, other.updateDataSourceDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.dataSourceId == null ? 43 : this.dataSourceId.hashCode()); + result = + (result * PRIME) + + (this.updateDataSourceDetails == null + ? 43 + : this.updateDataSourceDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/UpdateKnowledgeBaseRequest.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/UpdateKnowledgeBaseRequest.java new file mode 100644 index 00000000000..2c9f75befad --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/requests/UpdateKnowledgeBaseRequest.java @@ -0,0 +1,329 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.requests; + +import com.oracle.bmc.generativeaiagent.model.*; +/** + * Example: Click here to see how to use UpdateKnowledgeBaseRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class UpdateKnowledgeBaseRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.generativeaiagent.model.UpdateKnowledgeBaseDetails> { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + */ + private String knowledgeBaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + */ + public String getKnowledgeBaseId() { + return knowledgeBaseId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.generativeaiagent.model.UpdateKnowledgeBaseDetails + updateKnowledgeBaseDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.generativeaiagent.model.UpdateKnowledgeBaseDetails + getUpdateKnowledgeBaseDetails() { + return updateKnowledgeBaseDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.generativeaiagent.model.UpdateKnowledgeBaseDetails getBody$() { + return updateKnowledgeBaseDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateKnowledgeBaseRequest, + com.oracle.bmc.generativeaiagent.model.UpdateKnowledgeBaseDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + */ + private String knowledgeBaseId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. + * @param knowledgeBaseId the value to set + * @return this builder instance + */ + public Builder knowledgeBaseId(String knowledgeBaseId) { + this.knowledgeBaseId = knowledgeBaseId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.generativeaiagent.model.UpdateKnowledgeBaseDetails + updateKnowledgeBaseDetails = null; + + /** + * The information to be updated. + * @param updateKnowledgeBaseDetails the value to set + * @return this builder instance + */ + public Builder updateKnowledgeBaseDetails( + com.oracle.bmc.generativeaiagent.model.UpdateKnowledgeBaseDetails + updateKnowledgeBaseDetails) { + this.updateKnowledgeBaseDetails = updateKnowledgeBaseDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateKnowledgeBaseRequest o) { + knowledgeBaseId(o.getKnowledgeBaseId()); + updateKnowledgeBaseDetails(o.getUpdateKnowledgeBaseDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateKnowledgeBaseRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateKnowledgeBaseRequest + */ + public UpdateKnowledgeBaseRequest build() { + UpdateKnowledgeBaseRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.generativeaiagent.model.UpdateKnowledgeBaseDetails body) { + updateKnowledgeBaseDetails(body); + return this; + } + + /** + * Build the instance of UpdateKnowledgeBaseRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateKnowledgeBaseRequest + */ + public UpdateKnowledgeBaseRequest buildWithoutInvocationCallback() { + UpdateKnowledgeBaseRequest request = new UpdateKnowledgeBaseRequest(); + request.knowledgeBaseId = knowledgeBaseId; + request.updateKnowledgeBaseDetails = updateKnowledgeBaseDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateKnowledgeBaseRequest(knowledgeBaseId, updateKnowledgeBaseDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .knowledgeBaseId(knowledgeBaseId) + .updateKnowledgeBaseDetails(updateKnowledgeBaseDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",knowledgeBaseId=").append(String.valueOf(this.knowledgeBaseId)); + sb.append(",updateKnowledgeBaseDetails=") + .append(String.valueOf(this.updateKnowledgeBaseDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateKnowledgeBaseRequest)) { + return false; + } + + UpdateKnowledgeBaseRequest other = (UpdateKnowledgeBaseRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.knowledgeBaseId, other.knowledgeBaseId) + && java.util.Objects.equals( + this.updateKnowledgeBaseDetails, other.updateKnowledgeBaseDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.knowledgeBaseId == null ? 43 : this.knowledgeBaseId.hashCode()); + result = + (result * PRIME) + + (this.updateKnowledgeBaseDetails == null + ? 43 + : this.updateKnowledgeBaseDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CancelWorkRequestResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CancelWorkRequestResponse.java new file mode 100644 index 00000000000..a1734692c60 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CancelWorkRequestResponse.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CancelWorkRequestResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private CancelWorkRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CancelWorkRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CancelWorkRequestResponse build() { + return new CancelWorkRequestResponse(__httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CancelWorkRequestResponse)) { + return false; + } + + CancelWorkRequestResponse other = (CancelWorkRequestResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ChangeAgentCompartmentResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ChangeAgentCompartmentResponse.java new file mode 100644 index 00000000000..8794a3d7224 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ChangeAgentCompartmentResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ChangeAgentCompartmentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private ChangeAgentCompartmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeAgentCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeAgentCompartmentResponse build() { + return new ChangeAgentCompartmentResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeAgentCompartmentResponse)) { + return false; + } + + ChangeAgentCompartmentResponse other = (ChangeAgentCompartmentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ChangeAgentEndpointCompartmentResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ChangeAgentEndpointCompartmentResponse.java new file mode 100644 index 00000000000..94f4b9a67f7 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ChangeAgentEndpointCompartmentResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ChangeAgentEndpointCompartmentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private ChangeAgentEndpointCompartmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeAgentEndpointCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeAgentEndpointCompartmentResponse build() { + return new ChangeAgentEndpointCompartmentResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeAgentEndpointCompartmentResponse)) { + return false; + } + + ChangeAgentEndpointCompartmentResponse other = (ChangeAgentEndpointCompartmentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ChangeKnowledgeBaseCompartmentResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ChangeKnowledgeBaseCompartmentResponse.java new file mode 100644 index 00000000000..02c439c23b4 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ChangeKnowledgeBaseCompartmentResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ChangeKnowledgeBaseCompartmentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private ChangeKnowledgeBaseCompartmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeKnowledgeBaseCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeKnowledgeBaseCompartmentResponse build() { + return new ChangeKnowledgeBaseCompartmentResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeKnowledgeBaseCompartmentResponse)) { + return false; + } + + ChangeKnowledgeBaseCompartmentResponse other = (ChangeKnowledgeBaseCompartmentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CreateAgentEndpointResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CreateAgentEndpointResponse.java new file mode 100644 index 00000000000..cb4bb8e4c6c --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CreateAgentEndpointResponse.java @@ -0,0 +1,337 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateAgentEndpointResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The URL for the created endpoint. The endpoint OCID is generated after this request is sent. + */ + private String location; + + /** + * The URL for the created endpoint. The endpoint OCID is generated after this request is sent. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * The location for the content. + */ + private String contentLocation; + + /** + * The location for the content. + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned AgentEndpoint instance. + */ + private com.oracle.bmc.generativeaiagent.model.AgentEndpoint agentEndpoint; + + /** + * The returned AgentEndpoint instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.AgentEndpoint getAgentEndpoint() { + return agentEndpoint; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "contentLocation", + "etag", + "opcWorkRequestId", + "opcRequestId", + "agentEndpoint" + }) + private CreateAgentEndpointResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String contentLocation, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.generativeaiagent.model.AgentEndpoint agentEndpoint) { + super(__httpStatusCode__, headers); + this.location = location; + this.contentLocation = contentLocation; + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.agentEndpoint = agentEndpoint; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The URL for the created endpoint. The endpoint OCID is generated after this request is sent. + */ + private String location; + + /** + * The URL for the created endpoint. The endpoint OCID is generated after this request is sent. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * The location for the content. + */ + private String contentLocation; + + /** + * The location for the content. + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned AgentEndpoint instance. + */ + private com.oracle.bmc.generativeaiagent.model.AgentEndpoint agentEndpoint; + + /** + * The returned AgentEndpoint instance. + * @param agentEndpoint the value to set + * @return this builder + */ + public Builder agentEndpoint( + com.oracle.bmc.generativeaiagent.model.AgentEndpoint agentEndpoint) { + this.agentEndpoint = agentEndpoint; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateAgentEndpointResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + agentEndpoint(o.getAgentEndpoint()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateAgentEndpointResponse build() { + return new CreateAgentEndpointResponse( + __httpStatusCode__, + headers, + location, + contentLocation, + etag, + opcWorkRequestId, + opcRequestId, + agentEndpoint); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",agentEndpoint=").append(String.valueOf(agentEndpoint)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAgentEndpointResponse)) { + return false; + } + + CreateAgentEndpointResponse other = (CreateAgentEndpointResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.agentEndpoint, other.agentEndpoint); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.agentEndpoint == null ? 43 : this.agentEndpoint.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CreateAgentResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CreateAgentResponse.java new file mode 100644 index 00000000000..0879701fa79 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CreateAgentResponse.java @@ -0,0 +1,334 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateAgentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * URL for the created agent. The agent OCID is generated after this request is sent. + */ + private String location; + + /** + * URL for the created agent. The agent OCID is generated after this request is sent. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * Same as location. + */ + private String contentLocation; + + /** + * Same as location. + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Agent instance. + */ + private com.oracle.bmc.generativeaiagent.model.Agent agent; + + /** + * The returned Agent instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.Agent getAgent() { + return agent; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "contentLocation", + "etag", + "opcWorkRequestId", + "opcRequestId", + "agent" + }) + private CreateAgentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String contentLocation, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.generativeaiagent.model.Agent agent) { + super(__httpStatusCode__, headers); + this.location = location; + this.contentLocation = contentLocation; + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.agent = agent; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * URL for the created agent. The agent OCID is generated after this request is sent. + */ + private String location; + + /** + * URL for the created agent. The agent OCID is generated after this request is sent. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * Same as location. + */ + private String contentLocation; + + /** + * Same as location. + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Agent instance. + */ + private com.oracle.bmc.generativeaiagent.model.Agent agent; + + /** + * The returned Agent instance. + * @param agent the value to set + * @return this builder + */ + public Builder agent(com.oracle.bmc.generativeaiagent.model.Agent agent) { + this.agent = agent; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateAgentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + agent(o.getAgent()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateAgentResponse build() { + return new CreateAgentResponse( + __httpStatusCode__, + headers, + location, + contentLocation, + etag, + opcWorkRequestId, + opcRequestId, + agent); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",agent=").append(String.valueOf(agent)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAgentResponse)) { + return false; + } + + CreateAgentResponse other = (CreateAgentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.agent, other.agent); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.agent == null ? 43 : this.agent.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CreateDataIngestionJobResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CreateDataIngestionJobResponse.java new file mode 100644 index 00000000000..f82aa16c2f7 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CreateDataIngestionJobResponse.java @@ -0,0 +1,337 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateDataIngestionJobResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The URL for the created data ingestion job. The data ingestion job OCID is generated after this request is sent. + */ + private String location; + + /** + * The URL for the created data ingestion job. The data ingestion job OCID is generated after this request is sent. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * Same as location. + */ + private String contentLocation; + + /** + * Same as location. + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned DataIngestionJob instance. + */ + private com.oracle.bmc.generativeaiagent.model.DataIngestionJob dataIngestionJob; + + /** + * The returned DataIngestionJob instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.DataIngestionJob getDataIngestionJob() { + return dataIngestionJob; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "contentLocation", + "etag", + "opcWorkRequestId", + "opcRequestId", + "dataIngestionJob" + }) + private CreateDataIngestionJobResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String contentLocation, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.generativeaiagent.model.DataIngestionJob dataIngestionJob) { + super(__httpStatusCode__, headers); + this.location = location; + this.contentLocation = contentLocation; + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.dataIngestionJob = dataIngestionJob; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The URL for the created data ingestion job. The data ingestion job OCID is generated after this request is sent. + */ + private String location; + + /** + * The URL for the created data ingestion job. The data ingestion job OCID is generated after this request is sent. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * Same as location. + */ + private String contentLocation; + + /** + * Same as location. + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned DataIngestionJob instance. + */ + private com.oracle.bmc.generativeaiagent.model.DataIngestionJob dataIngestionJob; + + /** + * The returned DataIngestionJob instance. + * @param dataIngestionJob the value to set + * @return this builder + */ + public Builder dataIngestionJob( + com.oracle.bmc.generativeaiagent.model.DataIngestionJob dataIngestionJob) { + this.dataIngestionJob = dataIngestionJob; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateDataIngestionJobResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + dataIngestionJob(o.getDataIngestionJob()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateDataIngestionJobResponse build() { + return new CreateDataIngestionJobResponse( + __httpStatusCode__, + headers, + location, + contentLocation, + etag, + opcWorkRequestId, + opcRequestId, + dataIngestionJob); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",dataIngestionJob=").append(String.valueOf(dataIngestionJob)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDataIngestionJobResponse)) { + return false; + } + + CreateDataIngestionJobResponse other = (CreateDataIngestionJobResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.dataIngestionJob, other.dataIngestionJob); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.dataIngestionJob == null ? 43 : this.dataIngestionJob.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CreateDataSourceResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CreateDataSourceResponse.java new file mode 100644 index 00000000000..abb2af95e8d --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CreateDataSourceResponse.java @@ -0,0 +1,334 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateDataSourceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * URL for the created data source. The data source OCID is generated after this request is sent. + */ + private String location; + + /** + * URL for the created data source. The data source OCID is generated after this request is sent. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * Same as location. + */ + private String contentLocation; + + /** + * Same as location. + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned DataSource instance. + */ + private com.oracle.bmc.generativeaiagent.model.DataSource dataSource; + + /** + * The returned DataSource instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.DataSource getDataSource() { + return dataSource; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "contentLocation", + "etag", + "opcWorkRequestId", + "opcRequestId", + "dataSource" + }) + private CreateDataSourceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String contentLocation, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.generativeaiagent.model.DataSource dataSource) { + super(__httpStatusCode__, headers); + this.location = location; + this.contentLocation = contentLocation; + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.dataSource = dataSource; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * URL for the created data source. The data source OCID is generated after this request is sent. + */ + private String location; + + /** + * URL for the created data source. The data source OCID is generated after this request is sent. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * Same as location. + */ + private String contentLocation; + + /** + * Same as location. + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned DataSource instance. + */ + private com.oracle.bmc.generativeaiagent.model.DataSource dataSource; + + /** + * The returned DataSource instance. + * @param dataSource the value to set + * @return this builder + */ + public Builder dataSource(com.oracle.bmc.generativeaiagent.model.DataSource dataSource) { + this.dataSource = dataSource; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateDataSourceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + dataSource(o.getDataSource()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateDataSourceResponse build() { + return new CreateDataSourceResponse( + __httpStatusCode__, + headers, + location, + contentLocation, + etag, + opcWorkRequestId, + opcRequestId, + dataSource); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",dataSource=").append(String.valueOf(dataSource)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateDataSourceResponse)) { + return false; + } + + CreateDataSourceResponse other = (CreateDataSourceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.dataSource, other.dataSource); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.dataSource == null ? 43 : this.dataSource.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CreateKnowledgeBaseResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CreateKnowledgeBaseResponse.java new file mode 100644 index 00000000000..9db7940e776 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/CreateKnowledgeBaseResponse.java @@ -0,0 +1,337 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateKnowledgeBaseResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * URL for the created knowledge base. The knowledge base OCID is generated after this request is sent. + */ + private String location; + + /** + * URL for the created knowledge base. The knowledge base OCID is generated after this request is sent. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * Same as location. + */ + private String contentLocation; + + /** + * Same as location. + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned KnowledgeBase instance. + */ + private com.oracle.bmc.generativeaiagent.model.KnowledgeBase knowledgeBase; + + /** + * The returned KnowledgeBase instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.KnowledgeBase getKnowledgeBase() { + return knowledgeBase; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "contentLocation", + "etag", + "opcWorkRequestId", + "opcRequestId", + "knowledgeBase" + }) + private CreateKnowledgeBaseResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String contentLocation, + String etag, + String opcWorkRequestId, + String opcRequestId, + com.oracle.bmc.generativeaiagent.model.KnowledgeBase knowledgeBase) { + super(__httpStatusCode__, headers); + this.location = location; + this.contentLocation = contentLocation; + this.etag = etag; + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.knowledgeBase = knowledgeBase; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * URL for the created knowledge base. The knowledge base OCID is generated after this request is sent. + */ + private String location; + + /** + * URL for the created knowledge base. The knowledge base OCID is generated after this request is sent. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * Same as location. + */ + private String contentLocation; + + /** + * Same as location. + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned KnowledgeBase instance. + */ + private com.oracle.bmc.generativeaiagent.model.KnowledgeBase knowledgeBase; + + /** + * The returned KnowledgeBase instance. + * @param knowledgeBase the value to set + * @return this builder + */ + public Builder knowledgeBase( + com.oracle.bmc.generativeaiagent.model.KnowledgeBase knowledgeBase) { + this.knowledgeBase = knowledgeBase; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateKnowledgeBaseResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + etag(o.getEtag()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + knowledgeBase(o.getKnowledgeBase()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateKnowledgeBaseResponse build() { + return new CreateKnowledgeBaseResponse( + __httpStatusCode__, + headers, + location, + contentLocation, + etag, + opcWorkRequestId, + opcRequestId, + knowledgeBase); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",knowledgeBase=").append(String.valueOf(knowledgeBase)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateKnowledgeBaseResponse)) { + return false; + } + + CreateKnowledgeBaseResponse other = (CreateKnowledgeBaseResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.knowledgeBase, other.knowledgeBase); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.knowledgeBase == null ? 43 : this.knowledgeBase.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/DeleteAgentEndpointResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/DeleteAgentEndpointResponse.java new file mode 100644 index 00000000000..c226219869a --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/DeleteAgentEndpointResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteAgentEndpointResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteAgentEndpointResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteAgentEndpointResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteAgentEndpointResponse build() { + return new DeleteAgentEndpointResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteAgentEndpointResponse)) { + return false; + } + + DeleteAgentEndpointResponse other = (DeleteAgentEndpointResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/DeleteAgentResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/DeleteAgentResponse.java new file mode 100644 index 00000000000..e51a23b2f02 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/DeleteAgentResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteAgentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteAgentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteAgentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteAgentResponse build() { + return new DeleteAgentResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteAgentResponse)) { + return false; + } + + DeleteAgentResponse other = (DeleteAgentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/DeleteDataIngestionJobResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/DeleteDataIngestionJobResponse.java new file mode 100644 index 00000000000..4df6657adad --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/DeleteDataIngestionJobResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteDataIngestionJobResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteDataIngestionJobResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteDataIngestionJobResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteDataIngestionJobResponse build() { + return new DeleteDataIngestionJobResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteDataIngestionJobResponse)) { + return false; + } + + DeleteDataIngestionJobResponse other = (DeleteDataIngestionJobResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/DeleteDataSourceResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/DeleteDataSourceResponse.java new file mode 100644 index 00000000000..e2624ed14ba --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/DeleteDataSourceResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteDataSourceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteDataSourceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteDataSourceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteDataSourceResponse build() { + return new DeleteDataSourceResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteDataSourceResponse)) { + return false; + } + + DeleteDataSourceResponse other = (DeleteDataSourceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/DeleteKnowledgeBaseResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/DeleteKnowledgeBaseResponse.java new file mode 100644 index 00000000000..80f057c805b --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/DeleteKnowledgeBaseResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteKnowledgeBaseResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteKnowledgeBaseResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteKnowledgeBaseResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteKnowledgeBaseResponse build() { + return new DeleteKnowledgeBaseResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteKnowledgeBaseResponse)) { + return false; + } + + DeleteKnowledgeBaseResponse other = (DeleteKnowledgeBaseResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetAgentEndpointResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetAgentEndpointResponse.java new file mode 100644 index 00000000000..2fee91a76cf --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetAgentEndpointResponse.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetAgentEndpointResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned AgentEndpoint instance. + */ + private com.oracle.bmc.generativeaiagent.model.AgentEndpoint agentEndpoint; + + /** + * The returned AgentEndpoint instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.AgentEndpoint getAgentEndpoint() { + return agentEndpoint; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "agentEndpoint" + }) + private GetAgentEndpointResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.generativeaiagent.model.AgentEndpoint agentEndpoint) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.agentEndpoint = agentEndpoint; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned AgentEndpoint instance. + */ + private com.oracle.bmc.generativeaiagent.model.AgentEndpoint agentEndpoint; + + /** + * The returned AgentEndpoint instance. + * @param agentEndpoint the value to set + * @return this builder + */ + public Builder agentEndpoint( + com.oracle.bmc.generativeaiagent.model.AgentEndpoint agentEndpoint) { + this.agentEndpoint = agentEndpoint; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAgentEndpointResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + agentEndpoint(o.getAgentEndpoint()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetAgentEndpointResponse build() { + return new GetAgentEndpointResponse( + __httpStatusCode__, headers, etag, opcRequestId, agentEndpoint); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",agentEndpoint=").append(String.valueOf(agentEndpoint)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetAgentEndpointResponse)) { + return false; + } + + GetAgentEndpointResponse other = (GetAgentEndpointResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.agentEndpoint, other.agentEndpoint); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.agentEndpoint == null ? 43 : this.agentEndpoint.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetAgentResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetAgentResponse.java new file mode 100644 index 00000000000..c8c6704c271 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetAgentResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetAgentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Agent instance. + */ + private com.oracle.bmc.generativeaiagent.model.Agent agent; + + /** + * The returned Agent instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.Agent getAgent() { + return agent; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "agent" + }) + private GetAgentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.generativeaiagent.model.Agent agent) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.agent = agent; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Agent instance. + */ + private com.oracle.bmc.generativeaiagent.model.Agent agent; + + /** + * The returned Agent instance. + * @param agent the value to set + * @return this builder + */ + public Builder agent(com.oracle.bmc.generativeaiagent.model.Agent agent) { + this.agent = agent; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAgentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + agent(o.getAgent()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetAgentResponse build() { + return new GetAgentResponse(__httpStatusCode__, headers, etag, opcRequestId, agent); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",agent=").append(String.valueOf(agent)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetAgentResponse)) { + return false; + } + + GetAgentResponse other = (GetAgentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.agent, other.agent); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.agent == null ? 43 : this.agent.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetDataIngestionJobLogContentResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetDataIngestionJobLogContentResponse.java new file mode 100644 index 00000000000..f72f6d96051 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetDataIngestionJobLogContentResponse.java @@ -0,0 +1,163 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetDataIngestionJobLogContentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique identifier for the request + */ + private String opcRequestId; + + /** + * Unique identifier for the request + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned java.io.InputStream instance. + */ + private java.io.InputStream inputStream; + + /** + * The returned java.io.InputStream instance. + * @return the value + */ + public java.io.InputStream getInputStream() { + return inputStream; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "inputStream" + }) + private GetDataIngestionJobLogContentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + java.io.InputStream inputStream) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.inputStream = inputStream; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique identifier for the request + */ + private String opcRequestId; + + /** + * Unique identifier for the request + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned java.io.InputStream instance. + */ + private java.io.InputStream inputStream; + + /** + * The returned java.io.InputStream instance. + * @param inputStream the value to set + * @return this builder + */ + public Builder inputStream(java.io.InputStream inputStream) { + this.inputStream = inputStream; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDataIngestionJobLogContentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + inputStream(o.getInputStream()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetDataIngestionJobLogContentResponse build() { + return new GetDataIngestionJobLogContentResponse( + __httpStatusCode__, headers, opcRequestId, inputStream); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",inputStream=").append(String.valueOf(inputStream)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDataIngestionJobLogContentResponse)) { + return false; + } + + GetDataIngestionJobLogContentResponse other = (GetDataIngestionJobLogContentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.inputStream, other.inputStream); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.inputStream == null ? 43 : this.inputStream.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetDataIngestionJobResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetDataIngestionJobResponse.java new file mode 100644 index 00000000000..50be9129b91 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetDataIngestionJobResponse.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetDataIngestionJobResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned DataIngestionJob instance. + */ + private com.oracle.bmc.generativeaiagent.model.DataIngestionJob dataIngestionJob; + + /** + * The returned DataIngestionJob instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.DataIngestionJob getDataIngestionJob() { + return dataIngestionJob; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "dataIngestionJob" + }) + private GetDataIngestionJobResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.generativeaiagent.model.DataIngestionJob dataIngestionJob) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.dataIngestionJob = dataIngestionJob; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned DataIngestionJob instance. + */ + private com.oracle.bmc.generativeaiagent.model.DataIngestionJob dataIngestionJob; + + /** + * The returned DataIngestionJob instance. + * @param dataIngestionJob the value to set + * @return this builder + */ + public Builder dataIngestionJob( + com.oracle.bmc.generativeaiagent.model.DataIngestionJob dataIngestionJob) { + this.dataIngestionJob = dataIngestionJob; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDataIngestionJobResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + dataIngestionJob(o.getDataIngestionJob()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetDataIngestionJobResponse build() { + return new GetDataIngestionJobResponse( + __httpStatusCode__, headers, etag, opcRequestId, dataIngestionJob); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",dataIngestionJob=").append(String.valueOf(dataIngestionJob)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDataIngestionJobResponse)) { + return false; + } + + GetDataIngestionJobResponse other = (GetDataIngestionJobResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.dataIngestionJob, other.dataIngestionJob); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.dataIngestionJob == null ? 43 : this.dataIngestionJob.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetDataSourceResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetDataSourceResponse.java new file mode 100644 index 00000000000..02bde96cb61 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetDataSourceResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetDataSourceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned DataSource instance. + */ + private com.oracle.bmc.generativeaiagent.model.DataSource dataSource; + + /** + * The returned DataSource instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.DataSource getDataSource() { + return dataSource; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "dataSource" + }) + private GetDataSourceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.generativeaiagent.model.DataSource dataSource) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.dataSource = dataSource; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned DataSource instance. + */ + private com.oracle.bmc.generativeaiagent.model.DataSource dataSource; + + /** + * The returned DataSource instance. + * @param dataSource the value to set + * @return this builder + */ + public Builder dataSource(com.oracle.bmc.generativeaiagent.model.DataSource dataSource) { + this.dataSource = dataSource; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetDataSourceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + dataSource(o.getDataSource()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetDataSourceResponse build() { + return new GetDataSourceResponse( + __httpStatusCode__, headers, etag, opcRequestId, dataSource); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",dataSource=").append(String.valueOf(dataSource)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetDataSourceResponse)) { + return false; + } + + GetDataSourceResponse other = (GetDataSourceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.dataSource, other.dataSource); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.dataSource == null ? 43 : this.dataSource.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetKnowledgeBaseResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetKnowledgeBaseResponse.java new file mode 100644 index 00000000000..cdf4a5ed096 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetKnowledgeBaseResponse.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetKnowledgeBaseResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned KnowledgeBase instance. + */ + private com.oracle.bmc.generativeaiagent.model.KnowledgeBase knowledgeBase; + + /** + * The returned KnowledgeBase instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.KnowledgeBase getKnowledgeBase() { + return knowledgeBase; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "knowledgeBase" + }) + private GetKnowledgeBaseResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.generativeaiagent.model.KnowledgeBase knowledgeBase) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.knowledgeBase = knowledgeBase; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned KnowledgeBase instance. + */ + private com.oracle.bmc.generativeaiagent.model.KnowledgeBase knowledgeBase; + + /** + * The returned KnowledgeBase instance. + * @param knowledgeBase the value to set + * @return this builder + */ + public Builder knowledgeBase( + com.oracle.bmc.generativeaiagent.model.KnowledgeBase knowledgeBase) { + this.knowledgeBase = knowledgeBase; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetKnowledgeBaseResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + knowledgeBase(o.getKnowledgeBase()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetKnowledgeBaseResponse build() { + return new GetKnowledgeBaseResponse( + __httpStatusCode__, headers, etag, opcRequestId, knowledgeBase); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",knowledgeBase=").append(String.valueOf(knowledgeBase)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetKnowledgeBaseResponse)) { + return false; + } + + GetKnowledgeBaseResponse other = (GetKnowledgeBaseResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.knowledgeBase, other.knowledgeBase); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.knowledgeBase == null ? 43 : this.knowledgeBase.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetWorkRequestResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetWorkRequestResponse.java new file mode 100644 index 00000000000..d4525403127 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/GetWorkRequestResponse.java @@ -0,0 +1,245 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetWorkRequestResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @return the value + */ + public Integer getRetryAfter() { + return retryAfter; + } + + /** + * The returned WorkRequest instance. + */ + private com.oracle.bmc.generativeaiagent.model.WorkRequest workRequest; + + /** + * The returned WorkRequest instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.WorkRequest getWorkRequest() { + return workRequest; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "retryAfter", + "workRequest" + }) + private GetWorkRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + Integer retryAfter, + com.oracle.bmc.generativeaiagent.model.WorkRequest workRequest) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + this.workRequest = workRequest; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @param retryAfter the value to set + * @return this builder + */ + public Builder retryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * The returned WorkRequest instance. + */ + private com.oracle.bmc.generativeaiagent.model.WorkRequest workRequest; + + /** + * The returned WorkRequest instance. + * @param workRequest the value to set + * @return this builder + */ + public Builder workRequest(com.oracle.bmc.generativeaiagent.model.WorkRequest workRequest) { + this.workRequest = workRequest; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetWorkRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + workRequest(o.getWorkRequest()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetWorkRequestResponse build() { + return new GetWorkRequestResponse( + __httpStatusCode__, headers, etag, opcRequestId, retryAfter, workRequest); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",retryAfter=").append(String.valueOf(retryAfter)); + sb.append(",workRequest=").append(String.valueOf(workRequest)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetWorkRequestResponse)) { + return false; + } + + GetWorkRequestResponse other = (GetWorkRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.retryAfter, other.retryAfter) + && java.util.Objects.equals(this.workRequest, other.workRequest); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.retryAfter == null ? 43 : this.retryAfter.hashCode()); + result = (result * PRIME) + (this.workRequest == null ? 43 : this.workRequest.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListAgentEndpointsResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListAgentEndpointsResponse.java new file mode 100644 index 00000000000..7f7f50b6af4 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListAgentEndpointsResponse.java @@ -0,0 +1,228 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListAgentEndpointsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned AgentEndpointCollection instance. + */ + private com.oracle.bmc.generativeaiagent.model.AgentEndpointCollection agentEndpointCollection; + + /** + * The returned AgentEndpointCollection instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.AgentEndpointCollection + getAgentEndpointCollection() { + return agentEndpointCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "agentEndpointCollection" + }) + private ListAgentEndpointsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.generativeaiagent.model.AgentEndpointCollection + agentEndpointCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.agentEndpointCollection = agentEndpointCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned AgentEndpointCollection instance. + */ + private com.oracle.bmc.generativeaiagent.model.AgentEndpointCollection + agentEndpointCollection; + + /** + * The returned AgentEndpointCollection instance. + * @param agentEndpointCollection the value to set + * @return this builder + */ + public Builder agentEndpointCollection( + com.oracle.bmc.generativeaiagent.model.AgentEndpointCollection + agentEndpointCollection) { + this.agentEndpointCollection = agentEndpointCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAgentEndpointsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + agentEndpointCollection(o.getAgentEndpointCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListAgentEndpointsResponse build() { + return new ListAgentEndpointsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + agentEndpointCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",agentEndpointCollection=").append(String.valueOf(agentEndpointCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListAgentEndpointsResponse)) { + return false; + } + + ListAgentEndpointsResponse other = (ListAgentEndpointsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.agentEndpointCollection, other.agentEndpointCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.agentEndpointCollection == null + ? 43 + : this.agentEndpointCollection.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListAgentsResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListAgentsResponse.java new file mode 100644 index 00000000000..d3e354cb117 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListAgentsResponse.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListAgentsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned AgentCollection instance. + */ + private com.oracle.bmc.generativeaiagent.model.AgentCollection agentCollection; + + /** + * The returned AgentCollection instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.AgentCollection getAgentCollection() { + return agentCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "agentCollection" + }) + private ListAgentsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.generativeaiagent.model.AgentCollection agentCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.agentCollection = agentCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned AgentCollection instance. + */ + private com.oracle.bmc.generativeaiagent.model.AgentCollection agentCollection; + + /** + * The returned AgentCollection instance. + * @param agentCollection the value to set + * @return this builder + */ + public Builder agentCollection( + com.oracle.bmc.generativeaiagent.model.AgentCollection agentCollection) { + this.agentCollection = agentCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAgentsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + agentCollection(o.getAgentCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListAgentsResponse build() { + return new ListAgentsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, agentCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",agentCollection=").append(String.valueOf(agentCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListAgentsResponse)) { + return false; + } + + ListAgentsResponse other = (ListAgentsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.agentCollection, other.agentCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.agentCollection == null ? 43 : this.agentCollection.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListDataIngestionJobsResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListDataIngestionJobsResponse.java new file mode 100644 index 00000000000..76f21c53a17 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListDataIngestionJobsResponse.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListDataIngestionJobsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned DataIngestionJobCollection instance. + */ + private com.oracle.bmc.generativeaiagent.model.DataIngestionJobCollection + dataIngestionJobCollection; + + /** + * The returned DataIngestionJobCollection instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.DataIngestionJobCollection + getDataIngestionJobCollection() { + return dataIngestionJobCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "dataIngestionJobCollection" + }) + private ListDataIngestionJobsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.generativeaiagent.model.DataIngestionJobCollection + dataIngestionJobCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.dataIngestionJobCollection = dataIngestionJobCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned DataIngestionJobCollection instance. + */ + private com.oracle.bmc.generativeaiagent.model.DataIngestionJobCollection + dataIngestionJobCollection; + + /** + * The returned DataIngestionJobCollection instance. + * @param dataIngestionJobCollection the value to set + * @return this builder + */ + public Builder dataIngestionJobCollection( + com.oracle.bmc.generativeaiagent.model.DataIngestionJobCollection + dataIngestionJobCollection) { + this.dataIngestionJobCollection = dataIngestionJobCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListDataIngestionJobsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + dataIngestionJobCollection(o.getDataIngestionJobCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListDataIngestionJobsResponse build() { + return new ListDataIngestionJobsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + dataIngestionJobCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",dataIngestionJobCollection=") + .append(String.valueOf(dataIngestionJobCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListDataIngestionJobsResponse)) { + return false; + } + + ListDataIngestionJobsResponse other = (ListDataIngestionJobsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.dataIngestionJobCollection, other.dataIngestionJobCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.dataIngestionJobCollection == null + ? 43 + : this.dataIngestionJobCollection.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListDataSourcesResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListDataSourcesResponse.java new file mode 100644 index 00000000000..bba271807a6 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListDataSourcesResponse.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListDataSourcesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned DataSourceCollection instance. + */ + private com.oracle.bmc.generativeaiagent.model.DataSourceCollection dataSourceCollection; + + /** + * The returned DataSourceCollection instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.DataSourceCollection getDataSourceCollection() { + return dataSourceCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "dataSourceCollection" + }) + private ListDataSourcesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.generativeaiagent.model.DataSourceCollection dataSourceCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.dataSourceCollection = dataSourceCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned DataSourceCollection instance. + */ + private com.oracle.bmc.generativeaiagent.model.DataSourceCollection dataSourceCollection; + + /** + * The returned DataSourceCollection instance. + * @param dataSourceCollection the value to set + * @return this builder + */ + public Builder dataSourceCollection( + com.oracle.bmc.generativeaiagent.model.DataSourceCollection dataSourceCollection) { + this.dataSourceCollection = dataSourceCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListDataSourcesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + dataSourceCollection(o.getDataSourceCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListDataSourcesResponse build() { + return new ListDataSourcesResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, dataSourceCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",dataSourceCollection=").append(String.valueOf(dataSourceCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListDataSourcesResponse)) { + return false; + } + + ListDataSourcesResponse other = (ListDataSourcesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.dataSourceCollection, other.dataSourceCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.dataSourceCollection == null + ? 43 + : this.dataSourceCollection.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListKnowledgeBasesResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListKnowledgeBasesResponse.java new file mode 100644 index 00000000000..ce0f06b6589 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListKnowledgeBasesResponse.java @@ -0,0 +1,228 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListKnowledgeBasesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned KnowledgeBaseCollection instance. + */ + private com.oracle.bmc.generativeaiagent.model.KnowledgeBaseCollection knowledgeBaseCollection; + + /** + * The returned KnowledgeBaseCollection instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.KnowledgeBaseCollection + getKnowledgeBaseCollection() { + return knowledgeBaseCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "knowledgeBaseCollection" + }) + private ListKnowledgeBasesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.generativeaiagent.model.KnowledgeBaseCollection + knowledgeBaseCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.knowledgeBaseCollection = knowledgeBaseCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned KnowledgeBaseCollection instance. + */ + private com.oracle.bmc.generativeaiagent.model.KnowledgeBaseCollection + knowledgeBaseCollection; + + /** + * The returned KnowledgeBaseCollection instance. + * @param knowledgeBaseCollection the value to set + * @return this builder + */ + public Builder knowledgeBaseCollection( + com.oracle.bmc.generativeaiagent.model.KnowledgeBaseCollection + knowledgeBaseCollection) { + this.knowledgeBaseCollection = knowledgeBaseCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListKnowledgeBasesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + knowledgeBaseCollection(o.getKnowledgeBaseCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListKnowledgeBasesResponse build() { + return new ListKnowledgeBasesResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + knowledgeBaseCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",knowledgeBaseCollection=").append(String.valueOf(knowledgeBaseCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListKnowledgeBasesResponse)) { + return false; + } + + ListKnowledgeBasesResponse other = (ListKnowledgeBasesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.knowledgeBaseCollection, other.knowledgeBaseCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.knowledgeBaseCollection == null + ? 43 + : this.knowledgeBaseCollection.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListWorkRequestErrorsResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListWorkRequestErrorsResponse.java new file mode 100644 index 00000000000..1a467bb68c7 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListWorkRequestErrorsResponse.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListWorkRequestErrorsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned WorkRequestErrorCollection instance. + */ + private com.oracle.bmc.generativeaiagent.model.WorkRequestErrorCollection + workRequestErrorCollection; + + /** + * The returned WorkRequestErrorCollection instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.WorkRequestErrorCollection + getWorkRequestErrorCollection() { + return workRequestErrorCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "workRequestErrorCollection" + }) + private ListWorkRequestErrorsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.generativeaiagent.model.WorkRequestErrorCollection + workRequestErrorCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.workRequestErrorCollection = workRequestErrorCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned WorkRequestErrorCollection instance. + */ + private com.oracle.bmc.generativeaiagent.model.WorkRequestErrorCollection + workRequestErrorCollection; + + /** + * The returned WorkRequestErrorCollection instance. + * @param workRequestErrorCollection the value to set + * @return this builder + */ + public Builder workRequestErrorCollection( + com.oracle.bmc.generativeaiagent.model.WorkRequestErrorCollection + workRequestErrorCollection) { + this.workRequestErrorCollection = workRequestErrorCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestErrorsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + workRequestErrorCollection(o.getWorkRequestErrorCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListWorkRequestErrorsResponse build() { + return new ListWorkRequestErrorsResponse( + __httpStatusCode__, + headers, + opcNextPage, + opcRequestId, + workRequestErrorCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",workRequestErrorCollection=") + .append(String.valueOf(workRequestErrorCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListWorkRequestErrorsResponse)) { + return false; + } + + ListWorkRequestErrorsResponse other = (ListWorkRequestErrorsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.workRequestErrorCollection, other.workRequestErrorCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.workRequestErrorCollection == null + ? 43 + : this.workRequestErrorCollection.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListWorkRequestLogsResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListWorkRequestLogsResponse.java new file mode 100644 index 00000000000..017a24d35b4 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListWorkRequestLogsResponse.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListWorkRequestLogsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned WorkRequestLogEntryCollection instance. + */ + private com.oracle.bmc.generativeaiagent.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection; + + /** + * The returned WorkRequestLogEntryCollection instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.WorkRequestLogEntryCollection + getWorkRequestLogEntryCollection() { + return workRequestLogEntryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "workRequestLogEntryCollection" + }) + private ListWorkRequestLogsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.generativeaiagent.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.workRequestLogEntryCollection = workRequestLogEntryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned WorkRequestLogEntryCollection instance. + */ + private com.oracle.bmc.generativeaiagent.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection; + + /** + * The returned WorkRequestLogEntryCollection instance. + * @param workRequestLogEntryCollection the value to set + * @return this builder + */ + public Builder workRequestLogEntryCollection( + com.oracle.bmc.generativeaiagent.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection) { + this.workRequestLogEntryCollection = workRequestLogEntryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestLogsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + workRequestLogEntryCollection(o.getWorkRequestLogEntryCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListWorkRequestLogsResponse build() { + return new ListWorkRequestLogsResponse( + __httpStatusCode__, + headers, + opcNextPage, + opcRequestId, + workRequestLogEntryCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",workRequestLogEntryCollection=") + .append(String.valueOf(workRequestLogEntryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListWorkRequestLogsResponse)) { + return false; + } + + ListWorkRequestLogsResponse other = (ListWorkRequestLogsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.workRequestLogEntryCollection, other.workRequestLogEntryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.workRequestLogEntryCollection == null + ? 43 + : this.workRequestLogEntryCollection.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListWorkRequestsResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListWorkRequestsResponse.java new file mode 100644 index 00000000000..1ab73ce7e1f --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/ListWorkRequestsResponse.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ListWorkRequestsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned WorkRequestSummaryCollection instance. + */ + private com.oracle.bmc.generativeaiagent.model.WorkRequestSummaryCollection + workRequestSummaryCollection; + + /** + * The returned WorkRequestSummaryCollection instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagent.model.WorkRequestSummaryCollection + getWorkRequestSummaryCollection() { + return workRequestSummaryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "workRequestSummaryCollection" + }) + private ListWorkRequestsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.generativeaiagent.model.WorkRequestSummaryCollection + workRequestSummaryCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.workRequestSummaryCollection = workRequestSummaryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned WorkRequestSummaryCollection instance. + */ + private com.oracle.bmc.generativeaiagent.model.WorkRequestSummaryCollection + workRequestSummaryCollection; + + /** + * The returned WorkRequestSummaryCollection instance. + * @param workRequestSummaryCollection the value to set + * @return this builder + */ + public Builder workRequestSummaryCollection( + com.oracle.bmc.generativeaiagent.model.WorkRequestSummaryCollection + workRequestSummaryCollection) { + this.workRequestSummaryCollection = workRequestSummaryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + workRequestSummaryCollection(o.getWorkRequestSummaryCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListWorkRequestsResponse build() { + return new ListWorkRequestsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + workRequestSummaryCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",workRequestSummaryCollection=") + .append(String.valueOf(workRequestSummaryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListWorkRequestsResponse)) { + return false; + } + + ListWorkRequestsResponse other = (ListWorkRequestsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.workRequestSummaryCollection, other.workRequestSummaryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.workRequestSummaryCollection == null + ? 43 + : this.workRequestSummaryCollection.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/UpdateAgentEndpointResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/UpdateAgentEndpointResponse.java new file mode 100644 index 00000000000..a8ae4448f52 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/UpdateAgentEndpointResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class UpdateAgentEndpointResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private UpdateAgentEndpointResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateAgentEndpointResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateAgentEndpointResponse build() { + return new UpdateAgentEndpointResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateAgentEndpointResponse)) { + return false; + } + + UpdateAgentEndpointResponse other = (UpdateAgentEndpointResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/UpdateAgentResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/UpdateAgentResponse.java new file mode 100644 index 00000000000..1bb66099c19 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/UpdateAgentResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class UpdateAgentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private UpdateAgentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateAgentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateAgentResponse build() { + return new UpdateAgentResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateAgentResponse)) { + return false; + } + + UpdateAgentResponse other = (UpdateAgentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/UpdateDataSourceResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/UpdateDataSourceResponse.java new file mode 100644 index 00000000000..3427baf4460 --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/UpdateDataSourceResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class UpdateDataSourceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private UpdateDataSourceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateDataSourceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateDataSourceResponse build() { + return new UpdateDataSourceResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateDataSourceResponse)) { + return false; + } + + UpdateDataSourceResponse other = (UpdateDataSourceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/UpdateKnowledgeBaseResponse.java b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/UpdateKnowledgeBaseResponse.java new file mode 100644 index 00000000000..f2ef77ff84f --- /dev/null +++ b/bmc-generativeaiagent/src/main/java/com/oracle/bmc/generativeaiagent/responses/UpdateKnowledgeBaseResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagent.responses; + +import com.oracle.bmc.generativeaiagent.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class UpdateKnowledgeBaseResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private UpdateKnowledgeBaseResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * Use GetWorkRequest with this ID to track the status of the request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateKnowledgeBaseResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateKnowledgeBaseResponse build() { + return new UpdateKnowledgeBaseResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateKnowledgeBaseResponse)) { + return false; + } + + UpdateKnowledgeBaseResponse other = (UpdateKnowledgeBaseResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/pom.xml b/bmc-generativeaiagentruntime/pom.xml new file mode 100644 index 00000000000..6ede28ac6c0 --- /dev/null +++ b/bmc-generativeaiagentruntime/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + com.oracle.oci.sdk + oci-java-sdk + 2.79.0 + ../pom.xml + + oci-java-sdk-generativeaiagentruntime + Oracle Cloud Infrastructure SDK - Generative Ai Agent Runtime + This project contains the SDK used for Oracle Cloud Infrastructure Generative Ai Agent Runtime + https://docs.cloud.oracle.com/Content/API/SDKDocs/javasdk.htm + + + com.oracle.oci.sdk + oci-java-sdk-common + 2.79.0 + + + \ No newline at end of file diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntime.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntime.java new file mode 100644 index 00000000000..75e9c7766d9 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntime.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime; + +import com.oracle.bmc.generativeaiagentruntime.requests.*; +import com.oracle.bmc.generativeaiagentruntime.responses.*; + +/** + * OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. + * + * OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. + * + * Use the Generative AI Agents Client API to create and manage client chat sessions. A session represents an interactive conversation initiated by a user through an API to engage with an agent. It involves a series of exchanges where the user sends queries or prompts, and the agent responds with relevant information, actions, or assistance based on the user's input. The session persists for the duration of the interaction, maintaining context and continuity to provide coherent and meaningful responses throughout the conversation. + * + * For creating and managing agents, knowledge bases, data sources, endpoints, and data ingestion jobs see the {@link #eNGenerative-ai-agentsLatest(ENGenerative-ai-agentsLatestRequest) eNGenerative-ai-agentsLatest}. + * + * To learn more about the service, see the [Generative AI Agents documentation](https://docs.cloud.oracle.com/iaas/Content/generative-ai-agents/home.htm). + * + * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public interface GenerativeAiAgentRuntime extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the service. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this Region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Chat on endpoint with provided messages. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use Chat API. + */ + ChatResponse chat(ChatRequest request); + + /** + * A session represents an interactive conversation initiated by a user through an API to engage with an agent. It involves a series of exchanges where the user sends queries or prompts, and the agent responds with relevant information, actions, or assistance based on the user's input. The session persists for the duration of the interaction, maintaining context and continuity to provide coherent and meaningful responses throughout the conversation.Creates an agent session. + *

+ * Use this API to create an agent session. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateSession API. + */ + CreateSessionResponse createSession(CreateSessionRequest request); + + /** + * Delete a session and all its associated information. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteSession API. + */ + DeleteSessionResponse deleteSession(DeleteSessionRequest request); + + /** + * Return the session resource identified by the session ID. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetSession API. + */ + GetSessionResponse getSession(GetSessionRequest request); + + /** + * Update session metadata, including but not limited to description, tags. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateSession API. + */ + UpdateSessionResponse updateSession(UpdateSessionRequest request); +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeAsync.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeAsync.java new file mode 100644 index 00000000000..6993945138e --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeAsync.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime; + +import com.oracle.bmc.generativeaiagentruntime.requests.*; +import com.oracle.bmc.generativeaiagentruntime.responses.*; + +/** + * OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. + * + * OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. + * + * Use the Generative AI Agents Client API to create and manage client chat sessions. A session represents an interactive conversation initiated by a user through an API to engage with an agent. It involves a series of exchanges where the user sends queries or prompts, and the agent responds with relevant information, actions, or assistance based on the user's input. The session persists for the duration of the interaction, maintaining context and continuity to provide coherent and meaningful responses throughout the conversation. + * + * For creating and managing agents, knowledge bases, data sources, endpoints, and data ingestion jobs see the {@link #eNGenerative-ai-agentsLatest(ENGenerative-ai-agentsLatestRequest) eNGenerative-ai-agentsLatest}. + * + * To learn more about the service, see the [Generative AI Agents documentation](https://docs.cloud.oracle.com/iaas/Content/generative-ai-agents/home.htm). + * + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public interface GenerativeAiAgentRuntimeAsync extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the serice. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Chat on endpoint with provided messages. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future chat( + ChatRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * A session represents an interactive conversation initiated by a user through an API to engage with an agent. It involves a series of exchanges where the user sends queries or prompts, and the agent responds with relevant information, actions, or assistance based on the user's input. The session persists for the duration of the interaction, maintaining context and continuity to provide coherent and meaningful responses throughout the conversation.Creates an agent session. + *

+ * Use this API to create an agent session. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createSession( + CreateSessionRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Delete a session and all its associated information. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteSession( + DeleteSessionRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Return the session resource identified by the session ID. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getSession( + GetSessionRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Update session metadata, including but not limited to description, tags. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateSession( + UpdateSessionRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeAsyncClient.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeAsyncClient.java new file mode 100644 index 00000000000..3bab193cb72 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeAsyncClient.java @@ -0,0 +1,692 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime; + +import com.oracle.bmc.generativeaiagentruntime.internal.http.*; +import com.oracle.bmc.generativeaiagentruntime.requests.*; +import com.oracle.bmc.generativeaiagentruntime.responses.*; + +/** + * Async client implementation for GenerativeAiAgentRuntime service.
+ * There are two ways to use async client: + * 1. Use AsyncHandler: using AsyncHandler, if the response to the call is an {@link java.io.InputStream}, like + * getObject Api in object storage service, developers need to process the stream in AsyncHandler, and not anywhere else, + * because the stream will be closed right after the AsyncHandler is invoked.
+ * 2. Use Java Future: using Java Future, developers need to close the stream after they are done with the Java Future.
+ * Accessing the result should be done in a mutually exclusive manner, either through the Future or the AsyncHandler, + * but not both. If the Future is used, the caller should pass in null as the AsyncHandler. If the AsyncHandler + * is used, it is still safe to use the Future to determine whether or not the request was completed via + * Future.isDone/isCancelled.
+ * Please refer to https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GenerativeAiAgentRuntimeAsyncClient implements GenerativeAiAgentRuntimeAsync { + /** + * Service instance for GenerativeAiAgentRuntime. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("GENERATIVEAIAGENTRUNTIME") + .serviceEndpointPrefix("") + .serviceEndpointTemplate( + "https://genai-agent-service.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GenerativeAiAgentRuntimeAsyncClient.class); + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public GenerativeAiAgentRuntimeAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public GenerativeAiAgentRuntimeAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public GenerativeAiAgentRuntimeAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public GenerativeAiAgentRuntimeAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public GenerativeAiAgentRuntimeAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public GenerativeAiAgentRuntimeAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public GenerativeAiAgentRuntimeAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + public GenerativeAiAgentRuntimeAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.clientConfigurationToUse = configuration; + + this.refreshClient(); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder< + Builder, GenerativeAiAgentRuntimeAsyncClient> { + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public GenerativeAiAgentRuntimeAsyncClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new GenerativeAiAgentRuntimeAsyncClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint); + } + } + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public java.util.concurrent.Future chat( + ChatRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { + LOG.trace("Called async chat"); + final ChatRequest interceptedRequest = ChatConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChatConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgentRuntime", + "Chat", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents-client/20240531/Session/Chat"); + final java.util.function.Function transformer = + ChatConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChatDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChatRequest, ChatResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createSession( + CreateSessionRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async createSession"); + final CreateSessionRequest interceptedRequest = + CreateSessionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateSessionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgentRuntime", + "CreateSession", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents-client/20240531/Session/CreateSession"); + final java.util.function.Function + transformer = + CreateSessionConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateSessionRequest, CreateSessionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateSessionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateSessionRequest, CreateSessionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteSession( + DeleteSessionRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async deleteSession"); + final DeleteSessionRequest interceptedRequest = + DeleteSessionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteSessionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgentRuntime", + "DeleteSession", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents-client/20240531/Session/DeleteSession"); + final java.util.function.Function + transformer = + DeleteSessionConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteSessionRequest, DeleteSessionResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteSessionRequest, DeleteSessionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getSession( + GetSessionRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getSession"); + final GetSessionRequest interceptedRequest = GetSessionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetSessionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgentRuntime", + "GetSession", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents-client/20240531/Session/GetSession"); + final java.util.function.Function + transformer = + GetSessionConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetSessionRequest, GetSessionResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetSessionRequest, GetSessionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateSession( + UpdateSessionRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async updateSession"); + final UpdateSessionRequest interceptedRequest = + UpdateSessionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateSessionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgentRuntime", + "UpdateSession", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents-client/20240531/Session/UpdateSession"); + final java.util.function.Function + transformer = + UpdateSessionConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateSessionRequest, UpdateSessionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateSessionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateSessionRequest, UpdateSessionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeClient.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeClient.java new file mode 100644 index 00000000000..f12d1127640 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/GenerativeAiAgentRuntimeClient.java @@ -0,0 +1,662 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime; + +import com.oracle.bmc.generativeaiagentruntime.internal.http.*; +import com.oracle.bmc.generativeaiagentruntime.requests.*; +import com.oracle.bmc.generativeaiagentruntime.responses.*; +import com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration; +import com.oracle.bmc.util.CircuitBreakerUtils; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GenerativeAiAgentRuntimeClient implements GenerativeAiAgentRuntime { + /** + * Service instance for GenerativeAiAgentRuntime. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("GENERATIVEAIAGENTRUNTIME") + .serviceEndpointPrefix("") + .serviceEndpointTemplate( + "https://genai-agent-service.{region}.oci.{secondLevelDomain}") + .build(); + // attempt twice if it's instance principals, immediately failures will try to refresh the token + private static final int MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS = 2; + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GenerativeAiAgentRuntimeClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + circuitBreakerConfiguration; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public GenerativeAiAgentRuntimeClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public GenerativeAiAgentRuntimeClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public GenerativeAiAgentRuntimeClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public GenerativeAiAgentRuntimeClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public GenerativeAiAgentRuntimeClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public GenerativeAiAgentRuntimeClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public GenerativeAiAgentRuntimeClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * Use the {@link Builder} to get access to all these parameters. + * + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + protected GenerativeAiAgentRuntimeClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + this.restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + + this.clientConfigurationToUse = + (configuration != null) + ? configuration + : com.oracle.bmc.ClientConfiguration.builder().build(); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.retryConfiguration = clientConfigurationToUse.getRetryConfiguration(); + final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + userCircuitBreakerConfiguration = + CircuitBreakerUtils.getUserDefinedCircuitBreakerConfiguration( + configuration); + if (userCircuitBreakerConfiguration == null) { + this.circuitBreakerConfiguration = + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION; + } else { + this.circuitBreakerConfiguration = userCircuitBreakerConfiguration; + } + + this.refreshClient(); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder< + Builder, GenerativeAiAgentRuntimeClient> { + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public GenerativeAiAgentRuntimeClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new GenerativeAiAgentRuntimeClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + restClientFactoryBuilder); + } + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, this.authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient, + null, + this.circuitBreakerConfiguration); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public ChatResponse chat(ChatRequest request) { + LOG.trace("Called chat"); + final ChatRequest interceptedRequest = ChatConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChatConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgentRuntime", + "Chat", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents-client/20240531/Session/Chat"); + java.util.function.Function transformer = + ChatConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getChatDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateSessionResponse createSession(CreateSessionRequest request) { + LOG.trace("Called createSession"); + final CreateSessionRequest interceptedRequest = + CreateSessionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateSessionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgentRuntime", + "CreateSession", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents-client/20240531/Session/CreateSession"); + java.util.function.Function transformer = + CreateSessionConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateSessionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteSessionResponse deleteSession(DeleteSessionRequest request) { + LOG.trace("Called deleteSession"); + final DeleteSessionRequest interceptedRequest = + DeleteSessionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteSessionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgentRuntime", + "DeleteSession", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents-client/20240531/Session/DeleteSession"); + java.util.function.Function transformer = + DeleteSessionConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetSessionResponse getSession(GetSessionRequest request) { + LOG.trace("Called getSession"); + final GetSessionRequest interceptedRequest = GetSessionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetSessionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgentRuntime", + "GetSession", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents-client/20240531/Session/GetSession"); + java.util.function.Function transformer = + GetSessionConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateSessionResponse updateSession(UpdateSessionRequest request) { + LOG.trace("Called updateSession"); + final UpdateSessionRequest interceptedRequest = + UpdateSessionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateSessionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GenerativeAiAgentRuntime", + "UpdateSession", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/generative-ai-agents-client/20240531/Session/UpdateSession"); + java.util.function.Function transformer = + UpdateSessionConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateSessionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/SdkClientsMetadata.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/SdkClientsMetadata.java new file mode 100644 index 00000000000..1f05d442536 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/SdkClientsMetadata.java @@ -0,0 +1,11 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime; + +import com.oracle.bmc.SdkClients; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@SdkClients({GenerativeAiAgentRuntimeAsyncClient.class, GenerativeAiAgentRuntimeClient.class}) +public final class SdkClientsMetadata {} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/internal/http/ChatConverter.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/internal/http/ChatConverter.java new file mode 100644 index 00000000000..b4b17b88cbb --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/internal/http/ChatConverter.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagentruntime.model.*; +import com.oracle.bmc.generativeaiagentruntime.requests.*; +import com.oracle.bmc.generativeaiagentruntime.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ChatConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ChatConverter.class); + + public static com.oracle.bmc.generativeaiagentruntime.requests.ChatRequest interceptRequest( + com.oracle.bmc.generativeaiagentruntime.requests.ChatRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagentruntime.requests.ChatRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAgentEndpointId(), "agentEndpointId must not be blank"); + Validate.notNull(request.getChatDetails(), "chatDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("agentEndpoints") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAgentEndpointId())) + .path("actions") + .path("chat"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses.ChatResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses.ChatResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses.ChatResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses.ChatResponse>() { + @Override + public com.oracle.bmc.generativeaiagentruntime.responses.ChatResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagentruntime.responses.ChatResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagentruntime + .model.ChatResult>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagentruntime.model + .ChatResult + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagentruntime.model + .ChatResult + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagentruntime.model + .ChatResult> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagentruntime.responses.ChatResponse + .Builder + builder = + com.oracle.bmc.generativeaiagentruntime.responses + .ChatResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.chatResult(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagentruntime.responses.ChatResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/internal/http/CreateSessionConverter.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/internal/http/CreateSessionConverter.java new file mode 100644 index 00000000000..3bce7b46293 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/internal/http/CreateSessionConverter.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagentruntime.model.*; +import com.oracle.bmc.generativeaiagentruntime.requests.*; +import com.oracle.bmc.generativeaiagentruntime.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateSessionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateSessionConverter.class); + + public static com.oracle.bmc.generativeaiagentruntime.requests.CreateSessionRequest + interceptRequest( + com.oracle.bmc.generativeaiagentruntime.requests.CreateSessionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagentruntime.requests.CreateSessionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCreateSessionDetails(), "createSessionDetails is required"); + Validate.notBlank(request.getAgentEndpointId(), "agentEndpointId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("agentEndpoints") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAgentEndpointId())) + .path("sessions"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses.CreateSessionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses.CreateSessionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses.CreateSessionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses + .CreateSessionResponse>() { + @Override + public com.oracle.bmc.generativeaiagentruntime.responses + .CreateSessionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagentruntime.responses.CreateSessionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagentruntime + .model.Session>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagentruntime.model + .Session + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagentruntime.model + .Session + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagentruntime.model + .Session> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagentruntime.responses + .CreateSessionResponse.Builder + builder = + com.oracle.bmc.generativeaiagentruntime.responses + .CreateSessionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.session(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagentruntime.responses + .CreateSessionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/internal/http/DeleteSessionConverter.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/internal/http/DeleteSessionConverter.java new file mode 100644 index 00000000000..9e784e731a3 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/internal/http/DeleteSessionConverter.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagentruntime.model.*; +import com.oracle.bmc.generativeaiagentruntime.requests.*; +import com.oracle.bmc.generativeaiagentruntime.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteSessionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteSessionConverter.class); + + public static com.oracle.bmc.generativeaiagentruntime.requests.DeleteSessionRequest + interceptRequest( + com.oracle.bmc.generativeaiagentruntime.requests.DeleteSessionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagentruntime.requests.DeleteSessionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAgentEndpointId(), "agentEndpointId must not be blank"); + Validate.notBlank(request.getSessionId(), "sessionId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("agentEndpoints") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAgentEndpointId())) + .path("sessions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSessionId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses.DeleteSessionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses.DeleteSessionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses.DeleteSessionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses + .DeleteSessionResponse>() { + @Override + public com.oracle.bmc.generativeaiagentruntime.responses + .DeleteSessionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagentruntime.responses.DeleteSessionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagentruntime.responses + .DeleteSessionResponse.Builder + builder = + com.oracle.bmc.generativeaiagentruntime.responses + .DeleteSessionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagentruntime.responses + .DeleteSessionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/internal/http/GetSessionConverter.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/internal/http/GetSessionConverter.java new file mode 100644 index 00000000000..3d2b9731edf --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/internal/http/GetSessionConverter.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagentruntime.model.*; +import com.oracle.bmc.generativeaiagentruntime.requests.*; +import com.oracle.bmc.generativeaiagentruntime.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetSessionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetSessionConverter.class); + + public static com.oracle.bmc.generativeaiagentruntime.requests.GetSessionRequest + interceptRequest( + com.oracle.bmc.generativeaiagentruntime.requests.GetSessionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagentruntime.requests.GetSessionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAgentEndpointId(), "agentEndpointId must not be blank"); + Validate.notBlank(request.getSessionId(), "sessionId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("agentEndpoints") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAgentEndpointId())) + .path("sessions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSessionId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses.GetSessionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses.GetSessionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses.GetSessionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses + .GetSessionResponse>() { + @Override + public com.oracle.bmc.generativeaiagentruntime.responses + .GetSessionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagentruntime.responses.GetSessionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagentruntime + .model.Session>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagentruntime.model + .Session + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagentruntime.model + .Session + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagentruntime.model + .Session> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagentruntime.responses.GetSessionResponse + .Builder + builder = + com.oracle.bmc.generativeaiagentruntime.responses + .GetSessionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.session(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagentruntime.responses.GetSessionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/internal/http/UpdateSessionConverter.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/internal/http/UpdateSessionConverter.java new file mode 100644 index 00000000000..efb6120afbb --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/internal/http/UpdateSessionConverter.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.generativeaiagentruntime.model.*; +import com.oracle.bmc.generativeaiagentruntime.requests.*; +import com.oracle.bmc.generativeaiagentruntime.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class UpdateSessionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateSessionConverter.class); + + public static com.oracle.bmc.generativeaiagentruntime.requests.UpdateSessionRequest + interceptRequest( + com.oracle.bmc.generativeaiagentruntime.requests.UpdateSessionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.generativeaiagentruntime.requests.UpdateSessionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAgentEndpointId(), "agentEndpointId must not be blank"); + Validate.notBlank(request.getSessionId(), "sessionId must not be blank"); + Validate.notNull(request.getUpdateSessionDetails(), "updateSessionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240531") + .path("agentEndpoints") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAgentEndpointId())) + .path("sessions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSessionId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses.UpdateSessionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses.UpdateSessionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses.UpdateSessionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.generativeaiagentruntime.responses + .UpdateSessionResponse>() { + @Override + public com.oracle.bmc.generativeaiagentruntime.responses + .UpdateSessionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.generativeaiagentruntime.responses.UpdateSessionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagentruntime + .model.Session>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagentruntime.model + .Session + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.generativeaiagentruntime.model + .Session + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.generativeaiagentruntime.model + .Session> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.generativeaiagentruntime.responses + .UpdateSessionResponse.Builder + builder = + com.oracle.bmc.generativeaiagentruntime.responses + .UpdateSessionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.session(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.generativeaiagentruntime.responses + .UpdateSessionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/ChatDetails.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/ChatDetails.java new file mode 100644 index 00000000000..47696636af3 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/ChatDetails.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * Chat details. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ChatDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChatDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"userMessage", "shouldStream", "sessionId"}) + public ChatDetails(String userMessage, Boolean shouldStream, String sessionId) { + super(); + this.userMessage = userMessage; + this.shouldStream = shouldStream; + this.sessionId = sessionId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The input user message content for the chat. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userMessage") + private String userMessage; + + /** + * The input user message content for the chat. + * @param userMessage the value to set + * @return this builder + **/ + public Builder userMessage(String userMessage) { + this.userMessage = userMessage; + this.__explicitlySet__.add("userMessage"); + return this; + } + /** + * Whether to stream the response. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldStream") + private Boolean shouldStream; + + /** + * Whether to stream the response. + * @param shouldStream the value to set + * @return this builder + **/ + public Builder shouldStream(Boolean shouldStream) { + this.shouldStream = shouldStream; + this.__explicitlySet__.add("shouldStream"); + return this; + } + /** + * Optional sessionId. If not provided, will chat without any prior context. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sessionId") + private String sessionId; + + /** + * Optional sessionId. If not provided, will chat without any prior context. + * @param sessionId the value to set + * @return this builder + **/ + public Builder sessionId(String sessionId) { + this.sessionId = sessionId; + this.__explicitlySet__.add("sessionId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChatDetails build() { + ChatDetails model = + new ChatDetails(this.userMessage, this.shouldStream, this.sessionId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChatDetails model) { + if (model.wasPropertyExplicitlySet("userMessage")) { + this.userMessage(model.getUserMessage()); + } + if (model.wasPropertyExplicitlySet("shouldStream")) { + this.shouldStream(model.getShouldStream()); + } + if (model.wasPropertyExplicitlySet("sessionId")) { + this.sessionId(model.getSessionId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The input user message content for the chat. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userMessage") + private final String userMessage; + + /** + * The input user message content for the chat. + * @return the value + **/ + public String getUserMessage() { + return userMessage; + } + + /** + * Whether to stream the response. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shouldStream") + private final Boolean shouldStream; + + /** + * Whether to stream the response. + * @return the value + **/ + public Boolean getShouldStream() { + return shouldStream; + } + + /** + * Optional sessionId. If not provided, will chat without any prior context. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sessionId") + private final String sessionId; + + /** + * Optional sessionId. If not provided, will chat without any prior context. + * @return the value + **/ + public String getSessionId() { + return sessionId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ChatDetails("); + sb.append("super=").append(super.toString()); + sb.append("userMessage=").append(String.valueOf(this.userMessage)); + sb.append(", shouldStream=").append(String.valueOf(this.shouldStream)); + sb.append(", sessionId=").append(String.valueOf(this.sessionId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChatDetails)) { + return false; + } + + ChatDetails other = (ChatDetails) o; + return java.util.Objects.equals(this.userMessage, other.userMessage) + && java.util.Objects.equals(this.shouldStream, other.shouldStream) + && java.util.Objects.equals(this.sessionId, other.sessionId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.userMessage == null ? 43 : this.userMessage.hashCode()); + result = (result * PRIME) + (this.shouldStream == null ? 43 : this.shouldStream.hashCode()); + result = (result * PRIME) + (this.sessionId == null ? 43 : this.sessionId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/ChatResult.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/ChatResult.java new file mode 100644 index 00000000000..ff80644181b --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/ChatResult.java @@ -0,0 +1,157 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * The response of a chat request. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ChatResult.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChatResult extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"message", "traces"}) + public ChatResult(Message message, java.util.List traces) { + super(); + this.message = message; + this.traces = traces; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("message") + private Message message; + + public Builder message(Message message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + /** + * The trace that displays the internal progression, such as reasoning and actions during an execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("traces") + private java.util.List traces; + + /** + * The trace that displays the internal progression, such as reasoning and actions during an execution. + * @param traces the value to set + * @return this builder + **/ + public Builder traces(java.util.List traces) { + this.traces = traces; + this.__explicitlySet__.add("traces"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChatResult build() { + ChatResult model = new ChatResult(this.message, this.traces); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChatResult model) { + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + if (model.wasPropertyExplicitlySet("traces")) { + this.traces(model.getTraces()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final Message message; + + public Message getMessage() { + return message; + } + + /** + * The trace that displays the internal progression, such as reasoning and actions during an execution. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("traces") + private final java.util.List traces; + + /** + * The trace that displays the internal progression, such as reasoning and actions during an execution. + * @return the value + **/ + public java.util.List getTraces() { + return traces; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ChatResult("); + sb.append("super=").append(super.toString()); + sb.append("message=").append(String.valueOf(this.message)); + sb.append(", traces=").append(String.valueOf(this.traces)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChatResult)) { + return false; + } + + ChatResult other = (ChatResult) o; + return java.util.Objects.equals(this.message, other.message) + && java.util.Objects.equals(this.traces, other.traces) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + (this.traces == null ? 43 : this.traces.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/Citation.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/Citation.java new file mode 100644 index 00000000000..ef9505ebfc7 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/Citation.java @@ -0,0 +1,159 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * The citation displays the location of source text that is the agent uses to create the responses. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Citation.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Citation extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"sourceText", "sourceLocation"}) + public Citation(String sourceText, SourceLocation sourceLocation) { + super(); + this.sourceText = sourceText; + this.sourceLocation = sourceLocation; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The text that's the source for the agent's response. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceText") + private String sourceText; + + /** + * The text that's the source for the agent's response. + * @param sourceText the value to set + * @return this builder + **/ + public Builder sourceText(String sourceText) { + this.sourceText = sourceText; + this.__explicitlySet__.add("sourceText"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("sourceLocation") + private SourceLocation sourceLocation; + + public Builder sourceLocation(SourceLocation sourceLocation) { + this.sourceLocation = sourceLocation; + this.__explicitlySet__.add("sourceLocation"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Citation build() { + Citation model = new Citation(this.sourceText, this.sourceLocation); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Citation model) { + if (model.wasPropertyExplicitlySet("sourceText")) { + this.sourceText(model.getSourceText()); + } + if (model.wasPropertyExplicitlySet("sourceLocation")) { + this.sourceLocation(model.getSourceLocation()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The text that's the source for the agent's response. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceText") + private final String sourceText; + + /** + * The text that's the source for the agent's response. + * @return the value + **/ + public String getSourceText() { + return sourceText; + } + + @com.fasterxml.jackson.annotation.JsonProperty("sourceLocation") + private final SourceLocation sourceLocation; + + public SourceLocation getSourceLocation() { + return sourceLocation; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Citation("); + sb.append("super=").append(super.toString()); + sb.append("sourceText=").append(String.valueOf(this.sourceText)); + sb.append(", sourceLocation=").append(String.valueOf(this.sourceLocation)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Citation)) { + return false; + } + + Citation other = (Citation) o; + return java.util.Objects.equals(this.sourceText, other.sourceText) + && java.util.Objects.equals(this.sourceLocation, other.sourceLocation) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.sourceText == null ? 43 : this.sourceText.hashCode()); + result = + (result * PRIME) + + (this.sourceLocation == null ? 43 : this.sourceLocation.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/CreateSessionDetails.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/CreateSessionDetails.java new file mode 100644 index 00000000000..2465320d41b --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/CreateSessionDetails.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * Information about the new session. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateSessionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateSessionDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"displayName", "description"}) + public CreateSessionDetails(String displayName, String description) { + super(); + this.displayName = displayName; + this.description = description; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the session. A session names doesn't have to be unique and you can change the session name later. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The name of the session. A session names doesn't have to be unique and you can change the session name later. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * An optional description of the session. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * An optional description of the session. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateSessionDetails build() { + CreateSessionDetails model = + new CreateSessionDetails(this.displayName, this.description); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateSessionDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the session. A session names doesn't have to be unique and you can change the session name later. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The name of the session. A session names doesn't have to be unique and you can change the session name later. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * An optional description of the session. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * An optional description of the session. + * @return the value + **/ + public String getDescription() { + return description; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateSessionDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSessionDetails)) { + return false; + } + + CreateSessionDetails other = (CreateSessionDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/ErrorTrace.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/ErrorTrace.java new file mode 100644 index 00000000000..1535da24a00 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/ErrorTrace.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * The trace information about the error. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ErrorTrace.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "traceType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ErrorTrace extends Trace { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The error message in this trace. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("errorMessage") + private String errorMessage; + + /** + * The error message in this trace. + * @param errorMessage the value to set + * @return this builder + **/ + public Builder errorMessage(String errorMessage) { + this.errorMessage = errorMessage; + this.__explicitlySet__.add("errorMessage"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ErrorTrace build() { + ErrorTrace model = new ErrorTrace(this.timeCreated, this.errorMessage); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ErrorTrace model) { + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("errorMessage")) { + this.errorMessage(model.getErrorMessage()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ErrorTrace(java.util.Date timeCreated, String errorMessage) { + super(timeCreated); + this.errorMessage = errorMessage; + } + + /** + * The error message in this trace. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("errorMessage") + private final String errorMessage; + + /** + * The error message in this trace. + * @return the value + **/ + public String getErrorMessage() { + return errorMessage; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ErrorTrace("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", errorMessage=").append(String.valueOf(this.errorMessage)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ErrorTrace)) { + return false; + } + + ErrorTrace other = (ErrorTrace) o; + return java.util.Objects.equals(this.errorMessage, other.errorMessage) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.errorMessage == null ? 43 : this.errorMessage.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/GenerationTrace.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/GenerationTrace.java new file mode 100644 index 00000000000..50c0c39bcbc --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/GenerationTrace.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * The trace information about the generated response. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = GenerationTrace.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "traceType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class GenerationTrace extends Trace { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The generated response that's returned to the user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("generation") + private String generation; + + /** + * The generated response that's returned to the user. + * @param generation the value to set + * @return this builder + **/ + public Builder generation(String generation) { + this.generation = generation; + this.__explicitlySet__.add("generation"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public GenerationTrace build() { + GenerationTrace model = new GenerationTrace(this.timeCreated, this.generation); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(GenerationTrace model) { + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("generation")) { + this.generation(model.getGeneration()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public GenerationTrace(java.util.Date timeCreated, String generation) { + super(timeCreated); + this.generation = generation; + } + + /** + * The generated response that's returned to the user. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("generation") + private final String generation; + + /** + * The generated response that's returned to the user. + * @return the value + **/ + public String getGeneration() { + return generation; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("GenerationTrace("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", generation=").append(String.valueOf(this.generation)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GenerationTrace)) { + return false; + } + + GenerationTrace other = (GenerationTrace) o; + return java.util.Objects.equals(this.generation, other.generation) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.generation == null ? 43 : this.generation.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/Message.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/Message.java new file mode 100644 index 00000000000..03d4660c7ec --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/Message.java @@ -0,0 +1,240 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * The Message resource generated by the agent. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Message.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Message extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"role", "content", "timeCreated"}) + public Message(Role role, MessageContent content, java.util.Date timeCreated) { + super(); + this.role = role; + this.content = content; + this.timeCreated = timeCreated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The role of the sender of this message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("role") + private Role role; + + /** + * The role of the sender of this message. + * @param role the value to set + * @return this builder + **/ + public Builder role(Role role) { + this.role = role; + this.__explicitlySet__.add("role"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("content") + private MessageContent content; + + public Builder content(MessageContent content) { + this.content = content; + this.__explicitlySet__.add("content"); + return this; + } + /** + * The date and time that the message was created in the format of an RFC3339 datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time that the message was created in the format of an RFC3339 datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Message build() { + Message model = new Message(this.role, this.content, this.timeCreated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Message model) { + if (model.wasPropertyExplicitlySet("role")) { + this.role(model.getRole()); + } + if (model.wasPropertyExplicitlySet("content")) { + this.content(model.getContent()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The role of the sender of this message. + **/ + public enum Role { + User("USER"), + Agent("AGENT"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Role.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Role v : Role.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Role(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Role create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Role', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * The role of the sender of this message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("role") + private final Role role; + + /** + * The role of the sender of this message. + * @return the value + **/ + public Role getRole() { + return role; + } + + @com.fasterxml.jackson.annotation.JsonProperty("content") + private final MessageContent content; + + public MessageContent getContent() { + return content; + } + + /** + * The date and time that the message was created in the format of an RFC3339 datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time that the message was created in the format of an RFC3339 datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Message("); + sb.append("super=").append(super.toString()); + sb.append("role=").append(String.valueOf(this.role)); + sb.append(", content=").append(String.valueOf(this.content)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Message)) { + return false; + } + + Message other = (Message) o; + return java.util.Objects.equals(this.role, other.role) + && java.util.Objects.equals(this.content, other.content) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.role == null ? 43 : this.role.hashCode()); + result = (result * PRIME) + (this.content == null ? 43 : this.content.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/MessageContent.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/MessageContent.java new file mode 100644 index 00000000000..a1aef8bf815 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/MessageContent.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * The content of the message. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = MessageContent.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MessageContent extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"text", "citations"}) + public MessageContent(String text, java.util.List citations) { + super(); + this.text = text; + this.citations = citations; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The content of the message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("text") + private String text; + + /** + * The content of the message. + * @param text the value to set + * @return this builder + **/ + public Builder text(String text) { + this.text = text; + this.__explicitlySet__.add("text"); + return this; + } + /** + * Citations to data sources used for generating an agent's message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("citations") + private java.util.List citations; + + /** + * Citations to data sources used for generating an agent's message. + * @param citations the value to set + * @return this builder + **/ + public Builder citations(java.util.List citations) { + this.citations = citations; + this.__explicitlySet__.add("citations"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MessageContent build() { + MessageContent model = new MessageContent(this.text, this.citations); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MessageContent model) { + if (model.wasPropertyExplicitlySet("text")) { + this.text(model.getText()); + } + if (model.wasPropertyExplicitlySet("citations")) { + this.citations(model.getCitations()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The content of the message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("text") + private final String text; + + /** + * The content of the message. + * @return the value + **/ + public String getText() { + return text; + } + + /** + * Citations to data sources used for generating an agent's message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("citations") + private final java.util.List citations; + + /** + * Citations to data sources used for generating an agent's message. + * @return the value + **/ + public java.util.List getCitations() { + return citations; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MessageContent("); + sb.append("super=").append(super.toString()); + sb.append("text=").append(String.valueOf(this.text)); + sb.append(", citations=").append(String.valueOf(this.citations)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MessageContent)) { + return false; + } + + MessageContent other = (MessageContent) o; + return java.util.Objects.equals(this.text, other.text) + && java.util.Objects.equals(this.citations, other.citations) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.text == null ? 43 : this.text.hashCode()); + result = (result * PRIME) + (this.citations == null ? 43 : this.citations.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/OciDatabaseSourceLocation.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/OciDatabaseSourceLocation.java new file mode 100644 index 00000000000..8e734c38655 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/OciDatabaseSourceLocation.java @@ -0,0 +1,214 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * The location of the OCI Database that the agent will use. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OciDatabaseSourceLocation.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "sourceLocationType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OciDatabaseSourceLocation extends SourceLocation { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the [OCI Database Tools Connection](https://docs.cloud.oracle.com/iaas/database-tools/home.htm). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the [OCI Database Tools Connection](https://docs.cloud.oracle.com/iaas/database-tools/home.htm). + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The name of the function that returns source text. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("functionName") + private String functionName; + + /** + * The name of the function that returns source text. + * @param functionName the value to set + * @return this builder + **/ + public Builder functionName(String functionName) { + this.functionName = functionName; + this.__explicitlySet__.add("functionName"); + return this; + } + /** + * The URL of the retrieved document, if available. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("url") + private String url; + + /** + * The URL of the retrieved document, if available. + * @param url the value to set + * @return this builder + **/ + public Builder url(String url) { + this.url = url; + this.__explicitlySet__.add("url"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OciDatabaseSourceLocation build() { + OciDatabaseSourceLocation model = + new OciDatabaseSourceLocation(this.id, this.functionName, this.url); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OciDatabaseSourceLocation model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("functionName")) { + this.functionName(model.getFunctionName()); + } + if (model.wasPropertyExplicitlySet("url")) { + this.url(model.getUrl()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public OciDatabaseSourceLocation(String id, String functionName, String url) { + super(); + this.id = id; + this.functionName = functionName; + this.url = url; + } + + /** + * The OCID of the [OCI Database Tools Connection](https://docs.cloud.oracle.com/iaas/database-tools/home.htm). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the [OCI Database Tools Connection](https://docs.cloud.oracle.com/iaas/database-tools/home.htm). + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The name of the function that returns source text. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("functionName") + private final String functionName; + + /** + * The name of the function that returns source text. + * @return the value + **/ + public String getFunctionName() { + return functionName; + } + + /** + * The URL of the retrieved document, if available. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("url") + private final String url; + + /** + * The URL of the retrieved document, if available. + * @return the value + **/ + public String getUrl() { + return url; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OciDatabaseSourceLocation("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", functionName=").append(String.valueOf(this.functionName)); + sb.append(", url=").append(String.valueOf(this.url)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OciDatabaseSourceLocation)) { + return false; + } + + OciDatabaseSourceLocation other = (OciDatabaseSourceLocation) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.functionName, other.functionName) + && java.util.Objects.equals(this.url, other.url) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.functionName == null ? 43 : this.functionName.hashCode()); + result = (result * PRIME) + (this.url == null ? 43 : this.url.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/OciObjectStorageSourceLocation.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/OciObjectStorageSourceLocation.java new file mode 100644 index 00000000000..633694a05f7 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/OciObjectStorageSourceLocation.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * The OCI Object Storage that contains the data files. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OciObjectStorageSourceLocation.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "sourceLocationType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OciObjectStorageSourceLocation extends SourceLocation { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The URL of the OCI Object Storage data source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("url") + private String url; + + /** + * The URL of the OCI Object Storage data source. + * @param url the value to set + * @return this builder + **/ + public Builder url(String url) { + this.url = url; + this.__explicitlySet__.add("url"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OciObjectStorageSourceLocation build() { + OciObjectStorageSourceLocation model = new OciObjectStorageSourceLocation(this.url); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OciObjectStorageSourceLocation model) { + if (model.wasPropertyExplicitlySet("url")) { + this.url(model.getUrl()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public OciObjectStorageSourceLocation(String url) { + super(); + this.url = url; + } + + /** + * The URL of the OCI Object Storage data source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("url") + private final String url; + + /** + * The URL of the OCI Object Storage data source. + * @return the value + **/ + public String getUrl() { + return url; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OciObjectStorageSourceLocation("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", url=").append(String.valueOf(this.url)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OciObjectStorageSourceLocation)) { + return false; + } + + OciObjectStorageSourceLocation other = (OciObjectStorageSourceLocation) o; + return java.util.Objects.equals(this.url, other.url) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.url == null ? 43 : this.url.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/OciOpenSearchSourceLocation.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/OciOpenSearchSourceLocation.java new file mode 100644 index 00000000000..3c8b451281e --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/OciOpenSearchSourceLocation.java @@ -0,0 +1,214 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * The location of the OCI Search with OpenSearch that the agent will use. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OciOpenSearchSourceLocation.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "sourceLocationType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OciOpenSearchSourceLocation extends SourceLocation { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the OCI OpenSearch cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the OCI OpenSearch cluster. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The name of the index in OpenSearch that contains the source text. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("indexName") + private String indexName; + + /** + * The name of the index in OpenSearch that contains the source text. + * @param indexName the value to set + * @return this builder + **/ + public Builder indexName(String indexName) { + this.indexName = indexName; + this.__explicitlySet__.add("indexName"); + return this; + } + /** + * The URL of the retrieved document, if available. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("url") + private String url; + + /** + * The URL of the retrieved document, if available. + * @param url the value to set + * @return this builder + **/ + public Builder url(String url) { + this.url = url; + this.__explicitlySet__.add("url"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OciOpenSearchSourceLocation build() { + OciOpenSearchSourceLocation model = + new OciOpenSearchSourceLocation(this.id, this.indexName, this.url); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OciOpenSearchSourceLocation model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("indexName")) { + this.indexName(model.getIndexName()); + } + if (model.wasPropertyExplicitlySet("url")) { + this.url(model.getUrl()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public OciOpenSearchSourceLocation(String id, String indexName, String url) { + super(); + this.id = id; + this.indexName = indexName; + this.url = url; + } + + /** + * The OCID of the OCI OpenSearch cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the OCI OpenSearch cluster. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The name of the index in OpenSearch that contains the source text. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("indexName") + private final String indexName; + + /** + * The name of the index in OpenSearch that contains the source text. + * @return the value + **/ + public String getIndexName() { + return indexName; + } + + /** + * The URL of the retrieved document, if available. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("url") + private final String url; + + /** + * The URL of the retrieved document, if available. + * @return the value + **/ + public String getUrl() { + return url; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OciOpenSearchSourceLocation("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", indexName=").append(String.valueOf(this.indexName)); + sb.append(", url=").append(String.valueOf(this.url)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OciOpenSearchSourceLocation)) { + return false; + } + + OciOpenSearchSourceLocation other = (OciOpenSearchSourceLocation) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.indexName, other.indexName) + && java.util.Objects.equals(this.url, other.url) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.indexName == null ? 43 : this.indexName.hashCode()); + result = (result * PRIME) + (this.url == null ? 43 : this.url.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/RetrievalTrace.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/RetrievalTrace.java new file mode 100644 index 00000000000..8c80f3cd554 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/RetrievalTrace.java @@ -0,0 +1,189 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * The trace that displays the retrieval information. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = RetrievalTrace.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "traceType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RetrievalTrace extends Trace { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The agent's search string for getting the displayed information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retrievalInput") + private String retrievalInput; + + /** + * The agent's search string for getting the displayed information. + * @param retrievalInput the value to set + * @return this builder + **/ + public Builder retrievalInput(String retrievalInput) { + this.retrievalInput = retrievalInput; + this.__explicitlySet__.add("retrievalInput"); + return this; + } + /** + * A list of citations retrieved from data sources. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("citations") + private java.util.List citations; + + /** + * A list of citations retrieved from data sources. + * @param citations the value to set + * @return this builder + **/ + public Builder citations(java.util.List citations) { + this.citations = citations; + this.__explicitlySet__.add("citations"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RetrievalTrace build() { + RetrievalTrace model = + new RetrievalTrace(this.timeCreated, this.retrievalInput, this.citations); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RetrievalTrace model) { + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("retrievalInput")) { + this.retrievalInput(model.getRetrievalInput()); + } + if (model.wasPropertyExplicitlySet("citations")) { + this.citations(model.getCitations()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public RetrievalTrace( + java.util.Date timeCreated, String retrievalInput, java.util.List citations) { + super(timeCreated); + this.retrievalInput = retrievalInput; + this.citations = citations; + } + + /** + * The agent's search string for getting the displayed information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("retrievalInput") + private final String retrievalInput; + + /** + * The agent's search string for getting the displayed information. + * @return the value + **/ + public String getRetrievalInput() { + return retrievalInput; + } + + /** + * A list of citations retrieved from data sources. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("citations") + private final java.util.List citations; + + /** + * A list of citations retrieved from data sources. + * @return the value + **/ + public java.util.List getCitations() { + return citations; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RetrievalTrace("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", retrievalInput=").append(String.valueOf(this.retrievalInput)); + sb.append(", citations=").append(String.valueOf(this.citations)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RetrievalTrace)) { + return false; + } + + RetrievalTrace other = (RetrievalTrace) o; + return java.util.Objects.equals(this.retrievalInput, other.retrievalInput) + && java.util.Objects.equals(this.citations, other.citations) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.retrievalInput == null ? 43 : this.retrievalInput.hashCode()); + result = (result * PRIME) + (this.citations == null ? 43 : this.citations.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/Session.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/Session.java new file mode 100644 index 00000000000..db8d8ff4425 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/Session.java @@ -0,0 +1,341 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * A session represents an interactive conversation initiated by a user through an API to engage with an agent. It involves a series of exchanges where the user sends queries or prompts, and the agent responds with relevant information, actions, or assistance based on the user's input. The session persists for the duration of the interaction, maintaining context and continuity to provide coherent and meaningful responses throughout the conversation. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Session.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Session extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "displayName", + "description", + "welcomeMessage", + "timeCreated", + "timeUpdated" + }) + public Session( + String id, + String displayName, + String description, + String welcomeMessage, + java.util.Date timeCreated, + java.util.Date timeUpdated) { + super(); + this.id = id; + this.displayName = displayName; + this.description = description; + this.welcomeMessage = welcomeMessage; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A unique ID for the session. This ID is immutable on creation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * A unique ID for the session. This ID is immutable on creation. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A description of the session. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A description of the session. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * A greeting message that the you receive when you start of a session. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("welcomeMessage") + private String welcomeMessage; + + /** + * A greeting message that the you receive when you start of a session. + * @param welcomeMessage the value to set + * @return this builder + **/ + public Builder welcomeMessage(String welcomeMessage) { + this.welcomeMessage = welcomeMessage; + this.__explicitlySet__.add("welcomeMessage"); + return this; + } + /** + * The date and time that the session started in the format of an RFC3339 datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time that the session started in the format of an RFC3339 datetime string. + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time that the session was last updated in the format of an RFC3339 datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time that the session was last updated in the format of an RFC3339 datetime string. + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Session build() { + Session model = + new Session( + this.id, + this.displayName, + this.description, + this.welcomeMessage, + this.timeCreated, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Session model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("welcomeMessage")) { + this.welcomeMessage(model.getWelcomeMessage()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A unique ID for the session. This ID is immutable on creation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * A unique ID for the session. This ID is immutable on creation. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A description of the session. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A description of the session. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * A greeting message that the you receive when you start of a session. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("welcomeMessage") + private final String welcomeMessage; + + /** + * A greeting message that the you receive when you start of a session. + * @return the value + **/ + public String getWelcomeMessage() { + return welcomeMessage; + } + + /** + * The date and time that the session started in the format of an RFC3339 datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time that the session started in the format of an RFC3339 datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time that the session was last updated in the format of an RFC3339 datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time that the session was last updated in the format of an RFC3339 datetime string. + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Session("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", welcomeMessage=").append(String.valueOf(this.welcomeMessage)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Session)) { + return false; + } + + Session other = (Session) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.welcomeMessage, other.welcomeMessage) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.welcomeMessage == null ? 43 : this.welcomeMessage.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/SourceLocation.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/SourceLocation.java new file mode 100644 index 00000000000..622dcb1438f --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/SourceLocation.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * The location of the data files that the agent will use. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "sourceLocationType", + defaultImpl = SourceLocation.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = OciObjectStorageSourceLocation.class, + name = "OCI_OBJECT_STORAGE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = OciOpenSearchSourceLocation.class, + name = "OCI_OPEN_SEARCH" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = OciDatabaseSourceLocation.class, + name = "OCI_DATABASE" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class SourceLocation extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected SourceLocation() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SourceLocation("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SourceLocation)) { + return false; + } + + SourceLocation other = (SourceLocation) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The type of the data source that contains data files for the agent. + **/ + public enum SourceLocationType { + OciObjectStorage("OCI_OBJECT_STORAGE"), + OciOpenSearch("OCI_OPEN_SEARCH"), + OciDatabase("OCI_DATABASE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SourceLocationType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SourceLocationType v : SourceLocationType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + SourceLocationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SourceLocationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'SourceLocationType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/Trace.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/Trace.java new file mode 100644 index 00000000000..400fa5ade2d --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/Trace.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * The trace that displays the internal progression, such as reasoning and actions during an execution. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "traceType", + defaultImpl = Trace.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ErrorTrace.class, + name = "ERROR_TRACE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = RetrievalTrace.class, + name = "RETRIEVAL_TRACE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = GenerationTrace.class, + name = "GENERATION_TRACE" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class Trace extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"timeCreated"}) + protected Trace(java.util.Date timeCreated) { + super(); + this.timeCreated = timeCreated; + } + + /** + * The date and time that the trace was created in the format of an RFC3339 datetime string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time that the trace was created in the format of an RFC3339 datetime string. + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Trace("); + sb.append("super=").append(super.toString()); + sb.append("timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Trace)) { + return false; + } + + Trace other = (Trace) o; + return java.util.Objects.equals(this.timeCreated, other.timeCreated) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The type of the trace. + **/ + public enum TraceType { + ErrorTrace("ERROR_TRACE"), + RetrievalTrace("RETRIEVAL_TRACE"), + GenerationTrace("GENERATION_TRACE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(TraceType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (TraceType v : TraceType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + TraceType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static TraceType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'TraceType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/UpdateSessionDetails.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/UpdateSessionDetails.java new file mode 100644 index 00000000000..595ce44f456 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/model/UpdateSessionDetails.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.model; + +/** + * Information about the updated session. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateSessionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateSessionDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"displayName", "description"}) + public UpdateSessionDetails(String displayName, String description) { + super(); + this.displayName = displayName; + this.description = description; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the session. A session names doesn't have to be unique and you can change the session name later. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * The name of the session. A session names doesn't have to be unique and you can change the session name later. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * A description of the session. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A description of the session. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateSessionDetails build() { + UpdateSessionDetails model = + new UpdateSessionDetails(this.displayName, this.description); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateSessionDetails model) { + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the session. A session names doesn't have to be unique and you can change the session name later. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * The name of the session. A session names doesn't have to be unique and you can change the session name later. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * A description of the session. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A description of the session. + * @return the value + **/ + public String getDescription() { + return description; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateSessionDetails("); + sb.append("super=").append(super.toString()); + sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSessionDetails)) { + return false; + } + + UpdateSessionDetails other = (UpdateSessionDetails) o; + return java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.description, other.description) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/requests/ChatRequest.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/requests/ChatRequest.java new file mode 100644 index 00000000000..d61f2a57c59 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/requests/ChatRequest.java @@ -0,0 +1,359 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.requests; + +import com.oracle.bmc.generativeaiagentruntime.model.*; +/** + * Example: Click here to see how to use ChatRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ChatRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.generativeaiagentruntime.model.ChatDetails> { + + /** + * A unique ID for the endpoint. + */ + private String agentEndpointId; + + /** + * A unique ID for the endpoint. + */ + public String getAgentEndpointId() { + return agentEndpointId; + } + /** + * Input for chat. + */ + private com.oracle.bmc.generativeaiagentruntime.model.ChatDetails chatDetails; + + /** + * Input for chat. + */ + public com.oracle.bmc.generativeaiagentruntime.model.ChatDetails getChatDetails() { + return chatDetails; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.generativeaiagentruntime.model.ChatDetails getBody$() { + return chatDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChatRequest, com.oracle.bmc.generativeaiagentruntime.model.ChatDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * A unique ID for the endpoint. + */ + private String agentEndpointId = null; + + /** + * A unique ID for the endpoint. + * @param agentEndpointId the value to set + * @return this builder instance + */ + public Builder agentEndpointId(String agentEndpointId) { + this.agentEndpointId = agentEndpointId; + return this; + } + + /** + * Input for chat. + */ + private com.oracle.bmc.generativeaiagentruntime.model.ChatDetails chatDetails = null; + + /** + * Input for chat. + * @param chatDetails the value to set + * @return this builder instance + */ + public Builder chatDetails( + com.oracle.bmc.generativeaiagentruntime.model.ChatDetails chatDetails) { + this.chatDetails = chatDetails; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChatRequest o) { + agentEndpointId(o.getAgentEndpointId()); + chatDetails(o.getChatDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChatRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChatRequest + */ + public ChatRequest build() { + ChatRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.generativeaiagentruntime.model.ChatDetails body) { + chatDetails(body); + return this; + } + + /** + * Build the instance of ChatRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChatRequest + */ + public ChatRequest buildWithoutInvocationCallback() { + ChatRequest request = new ChatRequest(); + request.agentEndpointId = agentEndpointId; + request.chatDetails = chatDetails; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new ChatRequest(agentEndpointId, chatDetails, opcRequestId, ifMatch, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .agentEndpointId(agentEndpointId) + .chatDetails(chatDetails) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",agentEndpointId=").append(String.valueOf(this.agentEndpointId)); + sb.append(",chatDetails=").append(String.valueOf(this.chatDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChatRequest)) { + return false; + } + + ChatRequest other = (ChatRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.agentEndpointId, other.agentEndpointId) + && java.util.Objects.equals(this.chatDetails, other.chatDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.agentEndpointId == null ? 43 : this.agentEndpointId.hashCode()); + result = (result * PRIME) + (this.chatDetails == null ? 43 : this.chatDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/requests/CreateSessionRequest.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/requests/CreateSessionRequest.java new file mode 100644 index 00000000000..f17081be091 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/requests/CreateSessionRequest.java @@ -0,0 +1,316 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.requests; + +import com.oracle.bmc.generativeaiagentruntime.model.*; +/** + * Example: Click here to see how to use CreateSessionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateSessionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.generativeaiagentruntime.model.CreateSessionDetails> { + + /** + * Details for the new agent session. + */ + private com.oracle.bmc.generativeaiagentruntime.model.CreateSessionDetails createSessionDetails; + + /** + * Details for the new agent session. + */ + public com.oracle.bmc.generativeaiagentruntime.model.CreateSessionDetails + getCreateSessionDetails() { + return createSessionDetails; + } + /** + * A unique ID for the endpoint. + */ + private String agentEndpointId; + + /** + * A unique ID for the endpoint. + */ + public String getAgentEndpointId() { + return agentEndpointId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.generativeaiagentruntime.model.CreateSessionDetails getBody$() { + return createSessionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateSessionRequest, + com.oracle.bmc.generativeaiagentruntime.model.CreateSessionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new agent session. + */ + private com.oracle.bmc.generativeaiagentruntime.model.CreateSessionDetails + createSessionDetails = null; + + /** + * Details for the new agent session. + * @param createSessionDetails the value to set + * @return this builder instance + */ + public Builder createSessionDetails( + com.oracle.bmc.generativeaiagentruntime.model.CreateSessionDetails + createSessionDetails) { + this.createSessionDetails = createSessionDetails; + return this; + } + + /** + * A unique ID for the endpoint. + */ + private String agentEndpointId = null; + + /** + * A unique ID for the endpoint. + * @param agentEndpointId the value to set + * @return this builder instance + */ + public Builder agentEndpointId(String agentEndpointId) { + this.agentEndpointId = agentEndpointId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateSessionRequest o) { + createSessionDetails(o.getCreateSessionDetails()); + agentEndpointId(o.getAgentEndpointId()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateSessionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateSessionRequest + */ + public CreateSessionRequest build() { + CreateSessionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.generativeaiagentruntime.model.CreateSessionDetails body) { + createSessionDetails(body); + return this; + } + + /** + * Build the instance of CreateSessionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateSessionRequest + */ + public CreateSessionRequest buildWithoutInvocationCallback() { + CreateSessionRequest request = new CreateSessionRequest(); + request.createSessionDetails = createSessionDetails; + request.agentEndpointId = agentEndpointId; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateSessionRequest(createSessionDetails, agentEndpointId, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createSessionDetails(createSessionDetails) + .agentEndpointId(agentEndpointId) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createSessionDetails=").append(String.valueOf(this.createSessionDetails)); + sb.append(",agentEndpointId=").append(String.valueOf(this.agentEndpointId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSessionRequest)) { + return false; + } + + CreateSessionRequest other = (CreateSessionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.createSessionDetails, other.createSessionDetails) + && java.util.Objects.equals(this.agentEndpointId, other.agentEndpointId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createSessionDetails == null + ? 43 + : this.createSessionDetails.hashCode()); + result = + (result * PRIME) + + (this.agentEndpointId == null ? 43 : this.agentEndpointId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/requests/DeleteSessionRequest.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/requests/DeleteSessionRequest.java new file mode 100644 index 00000000000..f4ec1404f3f --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/requests/DeleteSessionRequest.java @@ -0,0 +1,281 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.requests; + +import com.oracle.bmc.generativeaiagentruntime.model.*; +/** + * Example: Click here to see how to use DeleteSessionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteSessionRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * A unique ID for the endpoint. + */ + private String agentEndpointId; + + /** + * A unique ID for the endpoint. + */ + public String getAgentEndpointId() { + return agentEndpointId; + } + /** + * A unique ID for the session. + */ + private String sessionId; + + /** + * A unique ID for the session. + */ + public String getSessionId() { + return sessionId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteSessionRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * A unique ID for the endpoint. + */ + private String agentEndpointId = null; + + /** + * A unique ID for the endpoint. + * @param agentEndpointId the value to set + * @return this builder instance + */ + public Builder agentEndpointId(String agentEndpointId) { + this.agentEndpointId = agentEndpointId; + return this; + } + + /** + * A unique ID for the session. + */ + private String sessionId = null; + + /** + * A unique ID for the session. + * @param sessionId the value to set + * @return this builder instance + */ + public Builder sessionId(String sessionId) { + this.sessionId = sessionId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteSessionRequest o) { + agentEndpointId(o.getAgentEndpointId()); + sessionId(o.getSessionId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteSessionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteSessionRequest + */ + public DeleteSessionRequest build() { + DeleteSessionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteSessionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteSessionRequest + */ + public DeleteSessionRequest buildWithoutInvocationCallback() { + DeleteSessionRequest request = new DeleteSessionRequest(); + request.agentEndpointId = agentEndpointId; + request.sessionId = sessionId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteSessionRequest(agentEndpointId, sessionId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .agentEndpointId(agentEndpointId) + .sessionId(sessionId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",agentEndpointId=").append(String.valueOf(this.agentEndpointId)); + sb.append(",sessionId=").append(String.valueOf(this.sessionId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSessionRequest)) { + return false; + } + + DeleteSessionRequest other = (DeleteSessionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.agentEndpointId, other.agentEndpointId) + && java.util.Objects.equals(this.sessionId, other.sessionId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.agentEndpointId == null ? 43 : this.agentEndpointId.hashCode()); + result = (result * PRIME) + (this.sessionId == null ? 43 : this.sessionId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/requests/GetSessionRequest.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/requests/GetSessionRequest.java new file mode 100644 index 00000000000..accea896ea0 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/requests/GetSessionRequest.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.requests; + +import com.oracle.bmc.generativeaiagentruntime.model.*; +/** + * Example: Click here to see how to use GetSessionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetSessionRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * A unique ID for the endpoint. + */ + private String agentEndpointId; + + /** + * A unique ID for the endpoint. + */ + public String getAgentEndpointId() { + return agentEndpointId; + } + /** + * A unique ID for the session. + */ + private String sessionId; + + /** + * A unique ID for the session. + */ + public String getSessionId() { + return sessionId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetSessionRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * A unique ID for the endpoint. + */ + private String agentEndpointId = null; + + /** + * A unique ID for the endpoint. + * @param agentEndpointId the value to set + * @return this builder instance + */ + public Builder agentEndpointId(String agentEndpointId) { + this.agentEndpointId = agentEndpointId; + return this; + } + + /** + * A unique ID for the session. + */ + private String sessionId = null; + + /** + * A unique ID for the session. + * @param sessionId the value to set + * @return this builder instance + */ + public Builder sessionId(String sessionId) { + this.sessionId = sessionId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSessionRequest o) { + agentEndpointId(o.getAgentEndpointId()); + sessionId(o.getSessionId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetSessionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetSessionRequest + */ + public GetSessionRequest build() { + GetSessionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetSessionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetSessionRequest + */ + public GetSessionRequest buildWithoutInvocationCallback() { + GetSessionRequest request = new GetSessionRequest(); + request.agentEndpointId = agentEndpointId; + request.sessionId = sessionId; + request.opcRequestId = opcRequestId; + return request; + // new GetSessionRequest(agentEndpointId, sessionId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .agentEndpointId(agentEndpointId) + .sessionId(sessionId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",agentEndpointId=").append(String.valueOf(this.agentEndpointId)); + sb.append(",sessionId=").append(String.valueOf(this.sessionId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSessionRequest)) { + return false; + } + + GetSessionRequest other = (GetSessionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.agentEndpointId, other.agentEndpointId) + && java.util.Objects.equals(this.sessionId, other.sessionId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.agentEndpointId == null ? 43 : this.agentEndpointId.hashCode()); + result = (result * PRIME) + (this.sessionId == null ? 43 : this.sessionId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/requests/UpdateSessionRequest.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/requests/UpdateSessionRequest.java new file mode 100644 index 00000000000..01b3507cc32 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/requests/UpdateSessionRequest.java @@ -0,0 +1,346 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.requests; + +import com.oracle.bmc.generativeaiagentruntime.model.*; +/** + * Example: Click here to see how to use UpdateSessionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class UpdateSessionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.generativeaiagentruntime.model.UpdateSessionDetails> { + + /** + * A unique ID for the endpoint. + */ + private String agentEndpointId; + + /** + * A unique ID for the endpoint. + */ + public String getAgentEndpointId() { + return agentEndpointId; + } + /** + * A unique ID for the session. + */ + private String sessionId; + + /** + * A unique ID for the session. + */ + public String getSessionId() { + return sessionId; + } + /** + * Details to update an agent session. + */ + private com.oracle.bmc.generativeaiagentruntime.model.UpdateSessionDetails updateSessionDetails; + + /** + * Details to update an agent session. + */ + public com.oracle.bmc.generativeaiagentruntime.model.UpdateSessionDetails + getUpdateSessionDetails() { + return updateSessionDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.generativeaiagentruntime.model.UpdateSessionDetails getBody$() { + return updateSessionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateSessionRequest, + com.oracle.bmc.generativeaiagentruntime.model.UpdateSessionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * A unique ID for the endpoint. + */ + private String agentEndpointId = null; + + /** + * A unique ID for the endpoint. + * @param agentEndpointId the value to set + * @return this builder instance + */ + public Builder agentEndpointId(String agentEndpointId) { + this.agentEndpointId = agentEndpointId; + return this; + } + + /** + * A unique ID for the session. + */ + private String sessionId = null; + + /** + * A unique ID for the session. + * @param sessionId the value to set + * @return this builder instance + */ + public Builder sessionId(String sessionId) { + this.sessionId = sessionId; + return this; + } + + /** + * Details to update an agent session. + */ + private com.oracle.bmc.generativeaiagentruntime.model.UpdateSessionDetails + updateSessionDetails = null; + + /** + * Details to update an agent session. + * @param updateSessionDetails the value to set + * @return this builder instance + */ + public Builder updateSessionDetails( + com.oracle.bmc.generativeaiagentruntime.model.UpdateSessionDetails + updateSessionDetails) { + this.updateSessionDetails = updateSessionDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateSessionRequest o) { + agentEndpointId(o.getAgentEndpointId()); + sessionId(o.getSessionId()); + updateSessionDetails(o.getUpdateSessionDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateSessionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateSessionRequest + */ + public UpdateSessionRequest build() { + UpdateSessionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.generativeaiagentruntime.model.UpdateSessionDetails body) { + updateSessionDetails(body); + return this; + } + + /** + * Build the instance of UpdateSessionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateSessionRequest + */ + public UpdateSessionRequest buildWithoutInvocationCallback() { + UpdateSessionRequest request = new UpdateSessionRequest(); + request.agentEndpointId = agentEndpointId; + request.sessionId = sessionId; + request.updateSessionDetails = updateSessionDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateSessionRequest(agentEndpointId, sessionId, updateSessionDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .agentEndpointId(agentEndpointId) + .sessionId(sessionId) + .updateSessionDetails(updateSessionDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",agentEndpointId=").append(String.valueOf(this.agentEndpointId)); + sb.append(",sessionId=").append(String.valueOf(this.sessionId)); + sb.append(",updateSessionDetails=").append(String.valueOf(this.updateSessionDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSessionRequest)) { + return false; + } + + UpdateSessionRequest other = (UpdateSessionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.agentEndpointId, other.agentEndpointId) + && java.util.Objects.equals(this.sessionId, other.sessionId) + && java.util.Objects.equals(this.updateSessionDetails, other.updateSessionDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.agentEndpointId == null ? 43 : this.agentEndpointId.hashCode()); + result = (result * PRIME) + (this.sessionId == null ? 43 : this.sessionId.hashCode()); + result = + (result * PRIME) + + (this.updateSessionDetails == null + ? 43 + : this.updateSessionDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/responses/ChatResponse.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/responses/ChatResponse.java new file mode 100644 index 00000000000..11179862f68 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/responses/ChatResponse.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.responses; + +import com.oracle.bmc.generativeaiagentruntime.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class ChatResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned ChatResult instance. + */ + private com.oracle.bmc.generativeaiagentruntime.model.ChatResult chatResult; + + /** + * The returned ChatResult instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagentruntime.model.ChatResult getChatResult() { + return chatResult; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "chatResult" + }) + private ChatResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + com.oracle.bmc.generativeaiagentruntime.model.ChatResult chatResult) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.chatResult = chatResult; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned ChatResult instance. + */ + private com.oracle.bmc.generativeaiagentruntime.model.ChatResult chatResult; + + /** + * The returned ChatResult instance. + * @param chatResult the value to set + * @return this builder + */ + public Builder chatResult( + com.oracle.bmc.generativeaiagentruntime.model.ChatResult chatResult) { + this.chatResult = chatResult; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChatResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + chatResult(o.getChatResult()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChatResponse build() { + return new ChatResponse(__httpStatusCode__, headers, opcRequestId, chatResult); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",chatResult=").append(String.valueOf(chatResult)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChatResponse)) { + return false; + } + + ChatResponse other = (ChatResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.chatResult, other.chatResult); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.chatResult == null ? 43 : this.chatResult.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/responses/CreateSessionResponse.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/responses/CreateSessionResponse.java new file mode 100644 index 00000000000..a2f1a7b1c56 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/responses/CreateSessionResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.responses; + +import com.oracle.bmc.generativeaiagentruntime.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class CreateSessionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Session instance. + */ + private com.oracle.bmc.generativeaiagentruntime.model.Session session; + + /** + * The returned Session instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagentruntime.model.Session getSession() { + return session; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "session" + }) + private CreateSessionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.generativeaiagentruntime.model.Session session) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.session = session; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Session instance. + */ + private com.oracle.bmc.generativeaiagentruntime.model.Session session; + + /** + * The returned Session instance. + * @param session the value to set + * @return this builder + */ + public Builder session(com.oracle.bmc.generativeaiagentruntime.model.Session session) { + this.session = session; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateSessionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + session(o.getSession()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateSessionResponse build() { + return new CreateSessionResponse( + __httpStatusCode__, headers, etag, opcRequestId, session); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",session=").append(String.valueOf(session)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSessionResponse)) { + return false; + } + + CreateSessionResponse other = (CreateSessionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.session, other.session); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.session == null ? 43 : this.session.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/responses/DeleteSessionResponse.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/responses/DeleteSessionResponse.java new file mode 100644 index 00000000000..e09ffcde80f --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/responses/DeleteSessionResponse.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.responses; + +import com.oracle.bmc.generativeaiagentruntime.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class DeleteSessionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeleteSessionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteSessionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteSessionResponse build() { + return new DeleteSessionResponse(__httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSessionResponse)) { + return false; + } + + DeleteSessionResponse other = (DeleteSessionResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/responses/GetSessionResponse.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/responses/GetSessionResponse.java new file mode 100644 index 00000000000..c9c7f968a71 --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/responses/GetSessionResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.responses; + +import com.oracle.bmc.generativeaiagentruntime.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class GetSessionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Session instance. + */ + private com.oracle.bmc.generativeaiagentruntime.model.Session session; + + /** + * The returned Session instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagentruntime.model.Session getSession() { + return session; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "session" + }) + private GetSessionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.generativeaiagentruntime.model.Session session) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.session = session; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Session instance. + */ + private com.oracle.bmc.generativeaiagentruntime.model.Session session; + + /** + * The returned Session instance. + * @param session the value to set + * @return this builder + */ + public Builder session(com.oracle.bmc.generativeaiagentruntime.model.Session session) { + this.session = session; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSessionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + session(o.getSession()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetSessionResponse build() { + return new GetSessionResponse(__httpStatusCode__, headers, etag, opcRequestId, session); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",session=").append(String.valueOf(session)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSessionResponse)) { + return false; + } + + GetSessionResponse other = (GetSessionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.session, other.session); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.session == null ? 43 : this.session.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/responses/UpdateSessionResponse.java b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/responses/UpdateSessionResponse.java new file mode 100644 index 00000000000..a04a3c5de1e --- /dev/null +++ b/bmc-generativeaiagentruntime/src/main/java/com/oracle/bmc/generativeaiagentruntime/responses/UpdateSessionResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiagentruntime.responses; + +import com.oracle.bmc.generativeaiagentruntime.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240531") +public class UpdateSessionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Session instance. + */ + private com.oracle.bmc.generativeaiagentruntime.model.Session session; + + /** + * The returned Session instance. + * @return the value + */ + public com.oracle.bmc.generativeaiagentruntime.model.Session getSession() { + return session; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "session" + }) + private UpdateSessionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.generativeaiagentruntime.model.Session session) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.session = session; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Session instance. + */ + private com.oracle.bmc.generativeaiagentruntime.model.Session session; + + /** + * The returned Session instance. + * @param session the value to set + * @return this builder + */ + public Builder session(com.oracle.bmc.generativeaiagentruntime.model.Session session) { + this.session = session; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateSessionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + session(o.getSession()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateSessionResponse build() { + return new UpdateSessionResponse( + __httpStatusCode__, headers, etag, opcRequestId, session); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",session=").append(String.valueOf(session)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSessionResponse)) { + return false; + } + + UpdateSessionResponse other = (UpdateSessionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.session, other.session); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.session == null ? 43 : this.session.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiinference/pom.xml b/bmc-generativeaiinference/pom.xml index 709f94c13a6..8d18f049dff 100644 --- a/bmc-generativeaiinference/pom.xml +++ b/bmc-generativeaiinference/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-generativeaiinference @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/GenerativeAiInference.java b/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/GenerativeAiInference.java index 7efdd0586ed..2c6d6ec4cba 100644 --- a/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/GenerativeAiInference.java +++ b/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/GenerativeAiInference.java @@ -10,9 +10,9 @@ /** * OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings. * - * Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to {@link #chat(ChatRequest) chat}, {@link #generateText(GenerateTextRequest) generateText}, {@link #summarizeText(SummarizeTextRequest) summarizeText}, and {@link #embedText(EmbedTextRequest) embedText}. + * Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to {@link #eNGenerative-ai-inferenceLatestChatResultChat(ENGenerative-ai-inferenceLatestChatResultChatRequest) eNGenerative-ai-inferenceLatestChatResultChat}, {@link #eNGenerative-ai-inferenceLatestGenerateTextResultGenerateText(ENGenerative-ai-inferenceLatestGenerateTextResultGenerateTextRequest) eNGenerative-ai-inferenceLatestGenerateTextResultGenerateText}, {@link #eNGenerative-ai-inferenceLatestSummarizeTextResultSummarizeText(ENGenerative-ai-inferenceLatestSummarizeTextResultSummarizeTextRequest) eNGenerative-ai-inferenceLatestSummarizeTextResultSummarizeText}, and {@link #eNGenerative-ai-inferenceLatestEmbedTextResultEmbedText(ENGenerative-ai-inferenceLatestEmbedTextResultEmbedTextRequest) eNGenerative-ai-inferenceLatestEmbedTextResultEmbedText}. * - * To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](https://docs.cloud.oracle.com/#/en/generative-ai/latest/) to {@link Model} by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a {@link DedicatedAiCluster}. Then, create a {@link DedicatedAiCluster} with an {@link Endpoint} to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](https://docs.cloud.oracle.com/#/en/generative-ai/latest/). + * To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the {@link #eNGenerative-aiLatest(ENGenerative-aiLatestRequest) eNGenerative-aiLatest} to {@link #eNGenerative-aiLatestModel(ENGenerative-aiLatestModelRequest) eNGenerative-aiLatestModel} by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a {@link #eNGenerative-aiLatestDedicatedAiCluster(ENGenerative-aiLatestDedicatedAiClusterRequest) eNGenerative-aiLatestDedicatedAiCluster}. Then, create a {@link #eNGenerative-aiLatestDedicatedAiCluster(ENGenerative-aiLatestDedicatedAiClusterRequest) eNGenerative-aiLatestDedicatedAiCluster} with an {@link Endpoint} to host your custom model. For resource management in the Generative AI service, use the {@link #eNGenerative-aiLatest(ENGenerative-aiLatestRequest) eNGenerative-aiLatest}. * * To learn more about the service, see the [Generative AI documentation](https://docs.cloud.oracle.com/iaas/Content/generative-ai/home.htm). * diff --git a/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/GenerativeAiInferenceAsync.java b/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/GenerativeAiInferenceAsync.java index 406e082624e..115139fbf18 100644 --- a/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/GenerativeAiInferenceAsync.java +++ b/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/GenerativeAiInferenceAsync.java @@ -10,9 +10,9 @@ /** * OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings. * - * Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to {@link #chat(ChatRequest) chat}, {@link #generateText(GenerateTextRequest) generateText}, {@link #summarizeText(SummarizeTextRequest) summarizeText}, and {@link #embedText(EmbedTextRequest) embedText}. + * Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to {@link #eNGenerative-ai-inferenceLatestChatResultChat(ENGenerative-ai-inferenceLatestChatResultChatRequest) eNGenerative-ai-inferenceLatestChatResultChat}, {@link #eNGenerative-ai-inferenceLatestGenerateTextResultGenerateText(ENGenerative-ai-inferenceLatestGenerateTextResultGenerateTextRequest) eNGenerative-ai-inferenceLatestGenerateTextResultGenerateText}, {@link #eNGenerative-ai-inferenceLatestSummarizeTextResultSummarizeText(ENGenerative-ai-inferenceLatestSummarizeTextResultSummarizeTextRequest) eNGenerative-ai-inferenceLatestSummarizeTextResultSummarizeText}, and {@link #eNGenerative-ai-inferenceLatestEmbedTextResultEmbedText(ENGenerative-ai-inferenceLatestEmbedTextResultEmbedTextRequest) eNGenerative-ai-inferenceLatestEmbedTextResultEmbedText}. * - * To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](https://docs.cloud.oracle.com/#/en/generative-ai/latest/) to {@link Model} by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a {@link DedicatedAiCluster}. Then, create a {@link DedicatedAiCluster} with an {@link Endpoint} to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](https://docs.cloud.oracle.com/#/en/generative-ai/latest/). + * To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the {@link #eNGenerative-aiLatest(ENGenerative-aiLatestRequest) eNGenerative-aiLatest} to {@link #eNGenerative-aiLatestModel(ENGenerative-aiLatestModelRequest) eNGenerative-aiLatestModel} by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a {@link #eNGenerative-aiLatestDedicatedAiCluster(ENGenerative-aiLatestDedicatedAiClusterRequest) eNGenerative-aiLatestDedicatedAiCluster}. Then, create a {@link #eNGenerative-aiLatestDedicatedAiCluster(ENGenerative-aiLatestDedicatedAiClusterRequest) eNGenerative-aiLatestDedicatedAiCluster} with an {@link Endpoint} to host your custom model. For resource management in the Generative AI service, use the {@link #eNGenerative-aiLatest(ENGenerative-aiLatestRequest) eNGenerative-aiLatest}. * * To learn more about the service, see the [Generative AI documentation](https://docs.cloud.oracle.com/iaas/Content/generative-ai/home.htm). * diff --git a/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/BaseChatRequest.java b/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/BaseChatRequest.java index 0e8b233fc07..625ac5925e4 100644 --- a/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/BaseChatRequest.java +++ b/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/BaseChatRequest.java @@ -79,7 +79,10 @@ public int hashCode() { } /** - * The API format for the model's request. + * The API format for the model's family group. + * COHERE is for the Cohere family models such as the cohere.command-r-16k and cohere.command-r-plus models. + * GENERIC is for other model families such as the meta.llama-3-70b-instruct model. + * **/ public enum ApiFormat { Cohere("COHERE"), diff --git a/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/ChatContent.java b/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/ChatContent.java index 97d122ac6c0..fe4cf49d69c 100644 --- a/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/ChatContent.java +++ b/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/ChatContent.java @@ -22,6 +22,7 @@ defaultImpl = ChatContent.class ) @com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = ImageContent.class, name = "IMAGE"), @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = TextContent.class, name = "TEXT") }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) @@ -76,6 +77,7 @@ public int hashCode() { **/ public enum Type { Text("TEXT"), + Image("IMAGE"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/CohereChatRequest.java b/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/CohereChatRequest.java index 8b3c1f7cf73..8695628ccbc 100644 --- a/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/CohereChatRequest.java +++ b/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/CohereChatRequest.java @@ -91,6 +91,15 @@ public Builder documents(java.util.List documents) { this.__explicitlySet__.add("documents"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("responseFormat") + private CohereResponseFormat responseFormat; + + public Builder responseFormat(CohereResponseFormat responseFormat) { + this.responseFormat = responseFormat; + this.__explicitlySet__.add("responseFormat"); + return this; + } /** * When set to true, the response contains only a list of generated search queries without the search results and the model will not respond to the user's message. * @@ -163,6 +172,22 @@ public Builder maxTokens(Integer maxTokens) { this.__explicitlySet__.add("maxTokens"); return this; } + /** + * The maximum number of input tokens to send to the model. If not specified, max_input_tokens is the model's context length limit minus a small buffer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxInputTokens") + private Integer maxInputTokens; + + /** + * The maximum number of input tokens to send to the model. If not specified, max_input_tokens is the model's context length limit minus a small buffer. + * @param maxInputTokens the value to set + * @return this builder + **/ + public Builder maxInputTokens(Integer maxInputTokens) { + this.maxInputTokens = maxInputTokens; + this.__explicitlySet__.add("maxInputTokens"); + return this; + } /** * A number that sets the randomness of the generated output. A lower temperature means less random generations. * Use lower numbers for tasks such as question answering or summarizing. High temperatures can generate hallucinations or factually incorrect information. Start with temperatures lower than 1.0 and increase the temperature for more creative outputs, as you regenerate the prompts to refine the outputs. @@ -228,14 +253,14 @@ public Builder topP(Double topP) { return this; } /** - * Defaults to OFF. Dictates how the prompt will be constructed. With {@code prompt_truncation} set to AUTO_PRESERVE_ORDER, some elements from {@code chat_history} and {@code documents} will be dropped to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved. With {@code prompt_truncation} set to OFF, no elements will be dropped. + * Defaults to OFF. Dictates how the prompt will be constructed. With {@code promptTruncation} set to AUTO_PRESERVE_ORDER, some elements from {@code chatHistory} and {@code documents} will be dropped to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved. With {@code prompt_truncation} set to OFF, no elements will be dropped. * **/ @com.fasterxml.jackson.annotation.JsonProperty("promptTruncation") private PromptTruncation promptTruncation; /** - * Defaults to OFF. Dictates how the prompt will be constructed. With {@code prompt_truncation} set to AUTO_PRESERVE_ORDER, some elements from {@code chat_history} and {@code documents} will be dropped to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved. With {@code prompt_truncation} set to OFF, no elements will be dropped. + * Defaults to OFF. Dictates how the prompt will be constructed. With {@code promptTruncation} set to AUTO_PRESERVE_ORDER, some elements from {@code chatHistory} and {@code documents} will be dropped to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved. With {@code prompt_truncation} set to OFF, no elements will be dropped. * * @param promptTruncation the value to set * @return this builder @@ -429,10 +454,12 @@ public CohereChatRequest build() { this.message, this.chatHistory, this.documents, + this.responseFormat, this.isSearchQueriesOnly, this.preambleOverride, this.isStream, this.maxTokens, + this.maxInputTokens, this.temperature, this.topK, this.topP, @@ -464,6 +491,9 @@ public Builder copy(CohereChatRequest model) { if (model.wasPropertyExplicitlySet("documents")) { this.documents(model.getDocuments()); } + if (model.wasPropertyExplicitlySet("responseFormat")) { + this.responseFormat(model.getResponseFormat()); + } if (model.wasPropertyExplicitlySet("isSearchQueriesOnly")) { this.isSearchQueriesOnly(model.getIsSearchQueriesOnly()); } @@ -476,6 +506,9 @@ public Builder copy(CohereChatRequest model) { if (model.wasPropertyExplicitlySet("maxTokens")) { this.maxTokens(model.getMaxTokens()); } + if (model.wasPropertyExplicitlySet("maxInputTokens")) { + this.maxInputTokens(model.getMaxInputTokens()); + } if (model.wasPropertyExplicitlySet("temperature")) { this.temperature(model.getTemperature()); } @@ -538,10 +571,12 @@ public CohereChatRequest( String message, java.util.List chatHistory, java.util.List documents, + CohereResponseFormat responseFormat, Boolean isSearchQueriesOnly, String preambleOverride, Boolean isStream, Integer maxTokens, + Integer maxInputTokens, Double temperature, Integer topK, Double topP, @@ -560,10 +595,12 @@ public CohereChatRequest( this.message = message; this.chatHistory = chatHistory; this.documents = documents; + this.responseFormat = responseFormat; this.isSearchQueriesOnly = isSearchQueriesOnly; this.preambleOverride = preambleOverride; this.isStream = isStream; this.maxTokens = maxTokens; + this.maxInputTokens = maxInputTokens; this.temperature = temperature; this.topK = topK; this.topP = topP; @@ -638,6 +675,13 @@ public java.util.List getDocuments() { return documents; } + @com.fasterxml.jackson.annotation.JsonProperty("responseFormat") + private final CohereResponseFormat responseFormat; + + public CohereResponseFormat getResponseFormat() { + return responseFormat; + } + /** * When set to true, the response contains only a list of generated search queries without the search results and the model will not respond to the user's message. * @@ -702,6 +746,20 @@ public Integer getMaxTokens() { return maxTokens; } + /** + * The maximum number of input tokens to send to the model. If not specified, max_input_tokens is the model's context length limit minus a small buffer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxInputTokens") + private final Integer maxInputTokens; + + /** + * The maximum number of input tokens to send to the model. If not specified, max_input_tokens is the model's context length limit minus a small buffer. + * @return the value + **/ + public Integer getMaxInputTokens() { + return maxInputTokens; + } + /** * A number that sets the randomness of the generated output. A lower temperature means less random generations. * Use lower numbers for tasks such as question answering or summarizing. High temperatures can generate hallucinations or factually incorrect information. Start with temperatures lower than 1.0 and increase the temperature for more creative outputs, as you regenerate the prompts to refine the outputs. @@ -761,7 +819,7 @@ public Double getTopP() { } /** - * Defaults to OFF. Dictates how the prompt will be constructed. With {@code prompt_truncation} set to AUTO_PRESERVE_ORDER, some elements from {@code chat_history} and {@code documents} will be dropped to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved. With {@code prompt_truncation} set to OFF, no elements will be dropped. + * Defaults to OFF. Dictates how the prompt will be constructed. With {@code promptTruncation} set to AUTO_PRESERVE_ORDER, some elements from {@code chatHistory} and {@code documents} will be dropped to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved. With {@code prompt_truncation} set to OFF, no elements will be dropped. * **/ public enum PromptTruncation { @@ -797,14 +855,14 @@ public static PromptTruncation create(String key) { } }; /** - * Defaults to OFF. Dictates how the prompt will be constructed. With {@code prompt_truncation} set to AUTO_PRESERVE_ORDER, some elements from {@code chat_history} and {@code documents} will be dropped to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved. With {@code prompt_truncation} set to OFF, no elements will be dropped. + * Defaults to OFF. Dictates how the prompt will be constructed. With {@code promptTruncation} set to AUTO_PRESERVE_ORDER, some elements from {@code chatHistory} and {@code documents} will be dropped to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved. With {@code prompt_truncation} set to OFF, no elements will be dropped. * **/ @com.fasterxml.jackson.annotation.JsonProperty("promptTruncation") private final PromptTruncation promptTruncation; /** - * Defaults to OFF. Dictates how the prompt will be constructed. With {@code prompt_truncation} set to AUTO_PRESERVE_ORDER, some elements from {@code chat_history} and {@code documents} will be dropped to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved. With {@code prompt_truncation} set to OFF, no elements will be dropped. + * Defaults to OFF. Dictates how the prompt will be constructed. With {@code promptTruncation} set to AUTO_PRESERVE_ORDER, some elements from {@code chatHistory} and {@code documents} will be dropped to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved. With {@code prompt_truncation} set to OFF, no elements will be dropped. * * @return the value **/ @@ -1019,10 +1077,12 @@ public String toString(boolean includeByteArrayContents) { sb.append(", message=").append(String.valueOf(this.message)); sb.append(", chatHistory=").append(String.valueOf(this.chatHistory)); sb.append(", documents=").append(String.valueOf(this.documents)); + sb.append(", responseFormat=").append(String.valueOf(this.responseFormat)); sb.append(", isSearchQueriesOnly=").append(String.valueOf(this.isSearchQueriesOnly)); sb.append(", preambleOverride=").append(String.valueOf(this.preambleOverride)); sb.append(", isStream=").append(String.valueOf(this.isStream)); sb.append(", maxTokens=").append(String.valueOf(this.maxTokens)); + sb.append(", maxInputTokens=").append(String.valueOf(this.maxInputTokens)); sb.append(", temperature=").append(String.valueOf(this.temperature)); sb.append(", topK=").append(String.valueOf(this.topK)); sb.append(", topP=").append(String.valueOf(this.topP)); @@ -1054,10 +1114,12 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.message, other.message) && java.util.Objects.equals(this.chatHistory, other.chatHistory) && java.util.Objects.equals(this.documents, other.documents) + && java.util.Objects.equals(this.responseFormat, other.responseFormat) && java.util.Objects.equals(this.isSearchQueriesOnly, other.isSearchQueriesOnly) && java.util.Objects.equals(this.preambleOverride, other.preambleOverride) && java.util.Objects.equals(this.isStream, other.isStream) && java.util.Objects.equals(this.maxTokens, other.maxTokens) + && java.util.Objects.equals(this.maxInputTokens, other.maxInputTokens) && java.util.Objects.equals(this.temperature, other.temperature) && java.util.Objects.equals(this.topK, other.topK) && java.util.Objects.equals(this.topP, other.topP) @@ -1082,6 +1144,9 @@ public int hashCode() { result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); result = (result * PRIME) + (this.chatHistory == null ? 43 : this.chatHistory.hashCode()); result = (result * PRIME) + (this.documents == null ? 43 : this.documents.hashCode()); + result = + (result * PRIME) + + (this.responseFormat == null ? 43 : this.responseFormat.hashCode()); result = (result * PRIME) + (this.isSearchQueriesOnly == null @@ -1092,6 +1157,9 @@ public int hashCode() { + (this.preambleOverride == null ? 43 : this.preambleOverride.hashCode()); result = (result * PRIME) + (this.isStream == null ? 43 : this.isStream.hashCode()); result = (result * PRIME) + (this.maxTokens == null ? 43 : this.maxTokens.hashCode()); + result = + (result * PRIME) + + (this.maxInputTokens == null ? 43 : this.maxInputTokens.hashCode()); result = (result * PRIME) + (this.temperature == null ? 43 : this.temperature.hashCode()); result = (result * PRIME) + (this.topK == null ? 43 : this.topK.hashCode()); result = (result * PRIME) + (this.topP == null ? 43 : this.topP.hashCode()); diff --git a/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/CohereResponseFormat.java b/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/CohereResponseFormat.java new file mode 100644 index 00000000000..6569469692b --- /dev/null +++ b/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/CohereResponseFormat.java @@ -0,0 +1,116 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiinference.model; + +/** + * Specify the format the model output is guaranteed to be of + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231130") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type", + defaultImpl = CohereResponseFormat.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CohereResponseTextFormat.class, + name = "TEXT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CohereResponseJsonFormat.class, + name = "JSON_OBJECT" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CohereResponseFormat extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected CohereResponseFormat() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CohereResponseFormat("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CohereResponseFormat)) { + return false; + } + + CohereResponseFormat other = (CohereResponseFormat) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * The format type + **/ + public enum Type { + JsonObject("JSON_OBJECT"), + Text("TEXT"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + map.put(v.getValue(), v); + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Type: " + key); + } + }; +} diff --git a/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/CohereResponseJsonFormat.java b/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/CohereResponseJsonFormat.java new file mode 100644 index 00000000000..1236d7611b3 --- /dev/null +++ b/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/CohereResponseJsonFormat.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiinference.model; + +/** + * The json object format for the model structured output + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231130") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CohereResponseJsonFormat.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CohereResponseJsonFormat extends CohereResponseFormat { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The schema used by the structured output, described as a JSON Schema object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schema") + private Object schema; + + /** + * The schema used by the structured output, described as a JSON Schema object. + * @param schema the value to set + * @return this builder + **/ + public Builder schema(Object schema) { + this.schema = schema; + this.__explicitlySet__.add("schema"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CohereResponseJsonFormat build() { + CohereResponseJsonFormat model = new CohereResponseJsonFormat(this.schema); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CohereResponseJsonFormat model) { + if (model.wasPropertyExplicitlySet("schema")) { + this.schema(model.getSchema()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CohereResponseJsonFormat(Object schema) { + super(); + this.schema = schema; + } + + /** + * The schema used by the structured output, described as a JSON Schema object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schema") + private final Object schema; + + /** + * The schema used by the structured output, described as a JSON Schema object. + * @return the value + **/ + public Object getSchema() { + return schema; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CohereResponseJsonFormat("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", schema=").append(String.valueOf(this.schema)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CohereResponseJsonFormat)) { + return false; + } + + CohereResponseJsonFormat other = (CohereResponseJsonFormat) o; + return java.util.Objects.equals(this.schema, other.schema) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.schema == null ? 43 : this.schema.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/CohereResponseTextFormat.java b/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/CohereResponseTextFormat.java new file mode 100644 index 00000000000..7314ac15d66 --- /dev/null +++ b/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/CohereResponseTextFormat.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiinference.model; + +/** + * The text format for cohere model response + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231130") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CohereResponseTextFormat.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CohereResponseTextFormat extends CohereResponseFormat { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CohereResponseTextFormat build() { + CohereResponseTextFormat model = new CohereResponseTextFormat(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CohereResponseTextFormat model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CohereResponseTextFormat() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CohereResponseTextFormat("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CohereResponseTextFormat)) { + return false; + } + + CohereResponseTextFormat other = (CohereResponseTextFormat) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/ImageContent.java b/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/ImageContent.java new file mode 100644 index 00000000000..fff79895e9b --- /dev/null +++ b/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/ImageContent.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiinference.model; + +/** + * Represents a single instance of chat image content. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231130") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ImageContent.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ImageContent extends ChatContent { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("imageUrl") + private ImageUrl imageUrl; + + public Builder imageUrl(ImageUrl imageUrl) { + this.imageUrl = imageUrl; + this.__explicitlySet__.add("imageUrl"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ImageContent build() { + ImageContent model = new ImageContent(this.imageUrl); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ImageContent model) { + if (model.wasPropertyExplicitlySet("imageUrl")) { + this.imageUrl(model.getImageUrl()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ImageContent(ImageUrl imageUrl) { + super(); + this.imageUrl = imageUrl; + } + + @com.fasterxml.jackson.annotation.JsonProperty("imageUrl") + private final ImageUrl imageUrl; + + public ImageUrl getImageUrl() { + return imageUrl; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ImageContent("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", imageUrl=").append(String.valueOf(this.imageUrl)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ImageContent)) { + return false; + } + + ImageContent other = (ImageContent) o; + return java.util.Objects.equals(this.imageUrl, other.imageUrl) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.imageUrl == null ? 43 : this.imageUrl.hashCode()); + return result; + } +} diff --git a/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/ImageUrl.java b/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/ImageUrl.java new file mode 100644 index 00000000000..cdeffdef993 --- /dev/null +++ b/bmc-generativeaiinference/src/main/java/com/oracle/bmc/generativeaiinference/model/ImageUrl.java @@ -0,0 +1,218 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.generativeaiinference.model; + +/** + * Represents a single instance of chat image url. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231130") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ImageUrl.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ImageUrl extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"url", "detail"}) + public ImageUrl(String url, Detail detail) { + super(); + this.url = url; + this.detail = detail; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The URL of the image. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("url") + private String url; + + /** + * The URL of the image. + * @param url the value to set + * @return this builder + **/ + public Builder url(String url) { + this.url = url; + this.__explicitlySet__.add("url"); + return this; + } + /** + * The level of the detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("detail") + private Detail detail; + + /** + * The level of the detail. + * @param detail the value to set + * @return this builder + **/ + public Builder detail(Detail detail) { + this.detail = detail; + this.__explicitlySet__.add("detail"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ImageUrl build() { + ImageUrl model = new ImageUrl(this.url, this.detail); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ImageUrl model) { + if (model.wasPropertyExplicitlySet("url")) { + this.url(model.getUrl()); + } + if (model.wasPropertyExplicitlySet("detail")) { + this.detail(model.getDetail()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The URL of the image. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("url") + private final String url; + + /** + * The URL of the image. + * @return the value + **/ + public String getUrl() { + return url; + } + + /** + * The level of the detail. + **/ + public enum Detail { + Auto("AUTO"), + High("HIGH"), + Low("LOW"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Detail.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Detail v : Detail.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Detail(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Detail create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Detail', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The level of the detail. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("detail") + private final Detail detail; + + /** + * The level of the detail. + * @return the value + **/ + public Detail getDetail() { + return detail; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ImageUrl("); + sb.append("super=").append(super.toString()); + sb.append("url=").append(String.valueOf(this.url)); + sb.append(", detail=").append(String.valueOf(this.detail)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ImageUrl)) { + return false; + } + + ImageUrl other = (ImageUrl) o; + return java.util.Objects.equals(this.url, other.url) + && java.util.Objects.equals(this.detail, other.detail) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.url == null ? 43 : this.url.hashCode()); + result = (result * PRIME) + (this.detail == null ? 43 : this.detail.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-genericartifactscontent/pom.xml b/bmc-genericartifactscontent/pom.xml index b2f614d673b..2f4fa2e091e 100644 --- a/bmc-genericartifactscontent/pom.xml +++ b/bmc-genericartifactscontent/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-genericartifactscontent @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-globallydistributeddatabase/pom.xml b/bmc-globallydistributeddatabase/pom.xml index d1c33b2058b..1c8808e1ddb 100644 --- a/bmc-globallydistributeddatabase/pom.xml +++ b/bmc-globallydistributeddatabase/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-globallydistributeddatabase @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-goldengate/pom.xml b/bmc-goldengate/pom.xml index 9dabeaddbda..7b4b70be147 100644 --- a/bmc-goldengate/pom.xml +++ b/bmc-goldengate/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-goldengate @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/GoldenGate.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/GoldenGate.java index 3e6f48bc80d..0d75bedb628 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/GoldenGate.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/GoldenGate.java @@ -612,6 +612,20 @@ ListDatabaseRegistrationsResponse listDatabaseRegistrations( */ ListDeploymentBackupsResponse listDeploymentBackups(ListDeploymentBackupsRequest request); + /** + * Returns an array of DeploymentEnvironmentDescriptor + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListDeploymentEnvironments API. + */ + ListDeploymentEnvironmentsResponse listDeploymentEnvironments( + ListDeploymentEnvironmentsRequest request); + /** * Returns an array of DeploymentTypeDescriptor * @@ -756,6 +770,19 @@ ListDeploymentWalletsOperationsResponse listDeploymentWalletsOperations( */ ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request); + /** + * Refresh the external Connection attributes. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RefreshConnection API. + */ + RefreshConnectionResponse refreshConnection(RefreshConnectionRequest request); + /** * Removes a lock from a Connection resource. * @param request The request object containing the details to send diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/GoldenGateAsync.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/GoldenGateAsync.java index da564be07ef..e599494e5e1 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/GoldenGateAsync.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/GoldenGateAsync.java @@ -759,6 +759,23 @@ java.util.concurrent.Future listDeploymentBackups ListDeploymentBackupsRequest, ListDeploymentBackupsResponse> handler); + /** + * Returns an array of DeploymentEnvironmentDescriptor + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listDeploymentEnvironments( + ListDeploymentEnvironmentsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListDeploymentEnvironmentsRequest, ListDeploymentEnvironmentsResponse> + handler); + /** * Returns an array of DeploymentTypeDescriptor * @@ -944,6 +961,23 @@ java.util.concurrent.Future listWorkRequests( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Refresh the external Connection attributes. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future refreshConnection( + RefreshConnectionRequest request, + com.oracle.bmc.responses.AsyncHandler< + RefreshConnectionRequest, RefreshConnectionResponse> + handler); + /** * Removes a lock from a Connection resource. * diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/GoldenGateAsyncClient.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/GoldenGateAsyncClient.java index 32885c21362..887eec81512 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/GoldenGateAsyncClient.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/GoldenGateAsyncClient.java @@ -2545,6 +2545,57 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + listDeploymentEnvironments( + ListDeploymentEnvironmentsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListDeploymentEnvironmentsRequest, + ListDeploymentEnvironmentsResponse> + handler) { + LOG.trace("Called async listDeploymentEnvironments"); + final ListDeploymentEnvironmentsRequest interceptedRequest = + ListDeploymentEnvironmentsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDeploymentEnvironmentsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GoldenGate", + "ListDeploymentEnvironments", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/DeploymentEnvironmentCollection/ListDeploymentEnvironments"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListDeploymentEnvironmentsResponse> + transformer = + ListDeploymentEnvironmentsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListDeploymentEnvironmentsRequest, ListDeploymentEnvironmentsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListDeploymentEnvironmentsRequest, + ListDeploymentEnvironmentsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListDeploymentEnvironmentsRequest, ListDeploymentEnvironmentsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listDeploymentTypes( ListDeploymentTypesRequest request, @@ -3060,6 +3111,57 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future refreshConnection( + RefreshConnectionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RefreshConnectionRequest, RefreshConnectionResponse> + handler) { + LOG.trace("Called async refreshConnection"); + final RefreshConnectionRequest interceptedRequest = + RefreshConnectionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RefreshConnectionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GoldenGate", + "RefreshConnection", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/Connection/RefreshConnection"); + final java.util.function.Function + transformer = + RefreshConnectionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RefreshConnectionRequest, RefreshConnectionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRefreshConnectionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RefreshConnectionRequest, RefreshConnectionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future removeConnectionLock( RemoveConnectionLockRequest request, diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/GoldenGateClient.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/GoldenGateClient.java index 9d9ed17b9cb..125fac9a8f7 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/GoldenGateClient.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/GoldenGateClient.java @@ -2203,6 +2203,44 @@ public ListDeploymentBackupsResponse listDeploymentBackups( }); } + @Override + public ListDeploymentEnvironmentsResponse listDeploymentEnvironments( + ListDeploymentEnvironmentsRequest request) { + LOG.trace("Called listDeploymentEnvironments"); + final ListDeploymentEnvironmentsRequest interceptedRequest = + ListDeploymentEnvironmentsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListDeploymentEnvironmentsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GoldenGate", + "ListDeploymentEnvironments", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/DeploymentEnvironmentCollection/ListDeploymentEnvironments"); + java.util.function.Function + transformer = + ListDeploymentEnvironmentsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListDeploymentTypesResponse listDeploymentTypes(ListDeploymentTypesRequest request) { LOG.trace("Called listDeploymentTypes"); @@ -2611,6 +2649,47 @@ public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request }); } + @Override + public RefreshConnectionResponse refreshConnection(RefreshConnectionRequest request) { + LOG.trace("Called refreshConnection"); + final RefreshConnectionRequest interceptedRequest = + RefreshConnectionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RefreshConnectionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "GoldenGate", + "RefreshConnection", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/Connection/RefreshConnection"); + java.util.function.Function + transformer = + RefreshConnectionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getRefreshConnectionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public RemoveConnectionLockResponse removeConnectionLock(RemoveConnectionLockRequest request) { LOG.trace("Called removeConnectionLock"); diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/GoldenGatePaginators.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/GoldenGatePaginators.java index c9e8d3705d1..ff2cfb22a9b 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/GoldenGatePaginators.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/GoldenGatePaginators.java @@ -609,6 +609,125 @@ public ListDeploymentBackupsResponse apply( }); } + /** + * Creates a new iterable which will iterate over the responses received from the listDeploymentEnvironments operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listDeploymentEnvironmentsResponseIterator( + final ListDeploymentEnvironmentsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListDeploymentEnvironmentsRequest.Builder, ListDeploymentEnvironmentsRequest, + ListDeploymentEnvironmentsResponse>( + new java.util.function.Supplier() { + @Override + public ListDeploymentEnvironmentsRequest.Builder get() { + return ListDeploymentEnvironmentsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListDeploymentEnvironmentsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDeploymentEnvironmentsRequest.Builder>, + ListDeploymentEnvironmentsRequest>() { + @Override + public ListDeploymentEnvironmentsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDeploymentEnvironmentsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListDeploymentEnvironmentsRequest, ListDeploymentEnvironmentsResponse>() { + @Override + public ListDeploymentEnvironmentsResponse apply( + ListDeploymentEnvironmentsRequest request) { + return client.listDeploymentEnvironments(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.goldengate.model.DeploymentEnvironmentSummary} objects + * contained in responses from the listDeploymentEnvironments operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.goldengate.model.DeploymentEnvironmentSummary} objects + * contained in responses received from the service. + */ + public Iterable + listDeploymentEnvironmentsRecordIterator( + final ListDeploymentEnvironmentsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListDeploymentEnvironmentsRequest.Builder, ListDeploymentEnvironmentsRequest, + ListDeploymentEnvironmentsResponse, + com.oracle.bmc.goldengate.model.DeploymentEnvironmentSummary>( + new java.util.function.Supplier() { + @Override + public ListDeploymentEnvironmentsRequest.Builder get() { + return ListDeploymentEnvironmentsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListDeploymentEnvironmentsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDeploymentEnvironmentsRequest.Builder>, + ListDeploymentEnvironmentsRequest>() { + @Override + public ListDeploymentEnvironmentsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListDeploymentEnvironmentsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListDeploymentEnvironmentsRequest, ListDeploymentEnvironmentsResponse>() { + @Override + public ListDeploymentEnvironmentsResponse apply( + ListDeploymentEnvironmentsRequest request) { + return client.listDeploymentEnvironments(request); + } + }, + new java.util.function.Function< + ListDeploymentEnvironmentsResponse, + java.util.List< + com.oracle.bmc.goldengate.model.DeploymentEnvironmentSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.goldengate.model.DeploymentEnvironmentSummary> + apply(ListDeploymentEnvironmentsResponse response) { + return response.getDeploymentEnvironmentCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listDeploymentTypes operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/internal/http/CopyDeploymentBackupConverter.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/internal/http/CopyDeploymentBackupConverter.java index aebfb6020c4..0695b9dcad1 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/internal/http/CopyDeploymentBackupConverter.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/internal/http/CopyDeploymentBackupConverter.java @@ -92,18 +92,26 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( "Transform function invoked for com.oracle.bmc.goldengate.responses.CopyDeploymentBackupResponse"); final java.util.function.Function< javax.ws.rs.core.Response, - com.oracle.bmc.http.internal.WithHeaders> + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.goldengate.model + .DeploymentBackup>> responseFn; if (serviceDetails.isPresent()) { responseFn = RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.goldengate.model.DeploymentBackup + .class, serviceDetails.get()); } else { - responseFn = RESPONSE_CONVERSION_FACTORY.create(); + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.goldengate.model.DeploymentBackup + .class); } - com.oracle.bmc.http.internal.WithHeaders response = - responseFn.apply(rawResponse); + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.goldengate.model.DeploymentBackup> + response = responseFn.apply(rawResponse); javax.ws.rs.core.MultivaluedMap headers = response.getHeaders(); @@ -115,6 +123,8 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( .__httpStatusCode__(rawResponse.getStatus()) .headers(headers); + builder.deploymentBackup(response.getItem()); + java.util.Optional> opcWorkRequestIdHeader = com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( headers, "opc-work-request-id"); @@ -137,6 +147,15 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( String.class)); } + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + com.oracle.bmc.goldengate.responses.CopyDeploymentBackupResponse responseWrapper = builder.build(); diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/internal/http/CreateDeploymentBackupConverter.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/internal/http/CreateDeploymentBackupConverter.java index cccabac9a88..bf15dc4df3f 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/internal/http/CreateDeploymentBackupConverter.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/internal/http/CreateDeploymentBackupConverter.java @@ -81,18 +81,26 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( "Transform function invoked for com.oracle.bmc.goldengate.responses.CreateDeploymentBackupResponse"); final java.util.function.Function< javax.ws.rs.core.Response, - com.oracle.bmc.http.internal.WithHeaders> + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.goldengate.model + .DeploymentBackup>> responseFn; if (serviceDetails.isPresent()) { responseFn = RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.goldengate.model.DeploymentBackup + .class, serviceDetails.get()); } else { - responseFn = RESPONSE_CONVERSION_FACTORY.create(); + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.goldengate.model.DeploymentBackup + .class); } - com.oracle.bmc.http.internal.WithHeaders response = - responseFn.apply(rawResponse); + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.goldengate.model.DeploymentBackup> + response = responseFn.apply(rawResponse); javax.ws.rs.core.MultivaluedMap headers = response.getHeaders(); @@ -104,6 +112,8 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( .__httpStatusCode__(rawResponse.getStatus()) .headers(headers); + builder.deploymentBackup(response.getItem()); + java.util.Optional> opcWorkRequestIdHeader = com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( headers, "opc-work-request-id"); @@ -126,6 +136,15 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( String.class)); } + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + com.oracle.bmc.goldengate.responses.CreateDeploymentBackupResponse responseWrapper = builder.build(); diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/internal/http/ListDeploymentEnvironmentsConverter.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/internal/http/ListDeploymentEnvironmentsConverter.java new file mode 100644 index 00000000000..600ec269856 --- /dev/null +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/internal/http/ListDeploymentEnvironmentsConverter.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.goldengate.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.goldengate.model.*; +import com.oracle.bmc.goldengate.requests.*; +import com.oracle.bmc.goldengate.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200407") +public class ListDeploymentEnvironmentsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListDeploymentEnvironmentsConverter.class); + + public static com.oracle.bmc.goldengate.requests.ListDeploymentEnvironmentsRequest + interceptRequest( + com.oracle.bmc.goldengate.requests.ListDeploymentEnvironmentsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.goldengate.requests.ListDeploymentEnvironmentsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20200407").path("deploymentEnvironments"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.goldengate.responses.ListDeploymentEnvironmentsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.goldengate.responses.ListDeploymentEnvironmentsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.goldengate.responses.ListDeploymentEnvironmentsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.goldengate.responses + .ListDeploymentEnvironmentsResponse>() { + @Override + public com.oracle.bmc.goldengate.responses + .ListDeploymentEnvironmentsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.goldengate.responses.ListDeploymentEnvironmentsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.goldengate.model + .DeploymentEnvironmentCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.goldengate.model + .DeploymentEnvironmentCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.goldengate.model + .DeploymentEnvironmentCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.goldengate.model + .DeploymentEnvironmentCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.goldengate.responses + .ListDeploymentEnvironmentsResponse.Builder + builder = + com.oracle.bmc.goldengate.responses + .ListDeploymentEnvironmentsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.deploymentEnvironmentCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.goldengate.responses + .ListDeploymentEnvironmentsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/internal/http/RefreshConnectionConverter.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/internal/http/RefreshConnectionConverter.java new file mode 100644 index 00000000000..9aded41f678 --- /dev/null +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/internal/http/RefreshConnectionConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.goldengate.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.goldengate.model.*; +import com.oracle.bmc.goldengate.requests.*; +import com.oracle.bmc.goldengate.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200407") +public class RefreshConnectionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RefreshConnectionConverter.class); + + public static com.oracle.bmc.goldengate.requests.RefreshConnectionRequest interceptRequest( + com.oracle.bmc.goldengate.requests.RefreshConnectionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.goldengate.requests.RefreshConnectionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getConnectionId(), "connectionId must not be blank"); + Validate.notNull( + request.getRefreshConnectionDetails(), "refreshConnectionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20200407") + .path("connections") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getConnectionId())) + .path("actions") + .path("refresh"); + + if (request.getIsLockOverride() != null) { + target = + target.queryParam( + "isLockOverride", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsLockOverride())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.goldengate.responses.RefreshConnectionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.goldengate.responses.RefreshConnectionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.goldengate.responses.RefreshConnectionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.goldengate.responses.RefreshConnectionResponse>() { + @Override + public com.oracle.bmc.goldengate.responses.RefreshConnectionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.goldengate.responses.RefreshConnectionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.goldengate.responses.RefreshConnectionResponse + .Builder + builder = + com.oracle.bmc.goldengate.responses + .RefreshConnectionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.goldengate.responses.RefreshConnectionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonKinesisConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonKinesisConnection.java index 512974e8dac..edaecbf6c4c 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonKinesisConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonKinesisConnection.java @@ -190,6 +190,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Amazon Kinesis technology type. **/ @@ -224,6 +233,26 @@ public Builder accessKeyId(String accessKeyId) { this.__explicitlySet__.add("accessKeyId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the secret access key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretAccessKeySecretId") + private String secretAccessKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the secret access key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + * @param secretAccessKeySecretId the value to set + * @return this builder + **/ + public Builder secretAccessKeySecretId(String secretAccessKeySecretId) { + this.secretAccessKeySecretId = secretAccessKeySecretId; + this.__explicitlySet__.add("secretAccessKeySecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -249,8 +278,10 @@ public AmazonKinesisConnection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, - this.accessKeyId); + this.accessKeyId, + this.secretAccessKeySecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -313,12 +344,18 @@ public Builder copy(AmazonKinesisConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } if (model.wasPropertyExplicitlySet("accessKeyId")) { this.accessKeyId(model.getAccessKeyId()); } + if (model.wasPropertyExplicitlySet("secretAccessKeySecretId")) { + this.secretAccessKeySecretId(model.getSecretAccessKeySecretId()); + } return this; } } @@ -354,8 +391,10 @@ public AmazonKinesisConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, - String accessKeyId) { + String accessKeyId, + String secretAccessKeySecretId) { super( id, displayName, @@ -374,9 +413,11 @@ public AmazonKinesisConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.accessKeyId = accessKeyId; + this.secretAccessKeySecretId = secretAccessKeySecretId; } /** @@ -456,6 +497,24 @@ public String getAccessKeyId() { return accessKeyId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the secret access key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretAccessKeySecretId") + private final String secretAccessKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the secret access key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + * @return the value + **/ + public String getSecretAccessKeySecretId() { + return secretAccessKeySecretId; + } + @Override public String toString() { return this.toString(true); @@ -472,6 +531,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", technologyType=").append(String.valueOf(this.technologyType)); sb.append(", accessKeyId=").append(String.valueOf(this.accessKeyId)); + sb.append(", secretAccessKeySecretId=") + .append(String.valueOf(this.secretAccessKeySecretId)); sb.append(")"); return sb.toString(); } @@ -488,6 +549,8 @@ public boolean equals(Object o) { AmazonKinesisConnection other = (AmazonKinesisConnection) o; return java.util.Objects.equals(this.technologyType, other.technologyType) && java.util.Objects.equals(this.accessKeyId, other.accessKeyId) + && java.util.Objects.equals( + this.secretAccessKeySecretId, other.secretAccessKeySecretId) && super.equals(other); } @@ -499,6 +562,11 @@ public int hashCode() { (result * PRIME) + (this.technologyType == null ? 43 : this.technologyType.hashCode()); result = (result * PRIME) + (this.accessKeyId == null ? 43 : this.accessKeyId.hashCode()); + result = + (result * PRIME) + + (this.secretAccessKeySecretId == null + ? 43 + : this.secretAccessKeySecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonKinesisConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonKinesisConnectionSummary.java index a61ab40e8a6..60063397a89 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonKinesisConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonKinesisConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Amazon Kinesis technology type. **/ @@ -224,6 +233,26 @@ public Builder accessKeyId(String accessKeyId) { this.__explicitlySet__.add("accessKeyId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the secret access key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretAccessKeySecretId") + private String secretAccessKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the secret access key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + * @param secretAccessKeySecretId the value to set + * @return this builder + **/ + public Builder secretAccessKeySecretId(String secretAccessKeySecretId) { + this.secretAccessKeySecretId = secretAccessKeySecretId; + this.__explicitlySet__.add("secretAccessKeySecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -249,8 +278,10 @@ public AmazonKinesisConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, - this.accessKeyId); + this.accessKeyId, + this.secretAccessKeySecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -313,12 +344,18 @@ public Builder copy(AmazonKinesisConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } if (model.wasPropertyExplicitlySet("accessKeyId")) { this.accessKeyId(model.getAccessKeyId()); } + if (model.wasPropertyExplicitlySet("secretAccessKeySecretId")) { + this.secretAccessKeySecretId(model.getSecretAccessKeySecretId()); + } return this; } } @@ -354,8 +391,10 @@ public AmazonKinesisConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, AmazonKinesisConnection.TechnologyType technologyType, - String accessKeyId) { + String accessKeyId, + String secretAccessKeySecretId) { super( id, displayName, @@ -374,9 +413,11 @@ public AmazonKinesisConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.accessKeyId = accessKeyId; + this.secretAccessKeySecretId = secretAccessKeySecretId; } /** @@ -409,6 +450,24 @@ public String getAccessKeyId() { return accessKeyId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the secret access key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretAccessKeySecretId") + private final String secretAccessKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the secret access key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + * @return the value + **/ + public String getSecretAccessKeySecretId() { + return secretAccessKeySecretId; + } + @Override public String toString() { return this.toString(true); @@ -425,6 +484,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", technologyType=").append(String.valueOf(this.technologyType)); sb.append(", accessKeyId=").append(String.valueOf(this.accessKeyId)); + sb.append(", secretAccessKeySecretId=") + .append(String.valueOf(this.secretAccessKeySecretId)); sb.append(")"); return sb.toString(); } @@ -441,6 +502,8 @@ public boolean equals(Object o) { AmazonKinesisConnectionSummary other = (AmazonKinesisConnectionSummary) o; return java.util.Objects.equals(this.technologyType, other.technologyType) && java.util.Objects.equals(this.accessKeyId, other.accessKeyId) + && java.util.Objects.equals( + this.secretAccessKeySecretId, other.secretAccessKeySecretId) && super.equals(other); } @@ -452,6 +515,11 @@ public int hashCode() { (result * PRIME) + (this.technologyType == null ? 43 : this.technologyType.hashCode()); result = (result * PRIME) + (this.accessKeyId == null ? 43 : this.accessKeyId.hashCode()); + result = + (result * PRIME) + + (this.secretAccessKeySecretId == null + ? 43 + : this.secretAccessKeySecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonRedshiftConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonRedshiftConnection.java index 2db3e238bad..4e2fd5d7e39 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonRedshiftConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonRedshiftConnection.java @@ -190,6 +190,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Amazon Redshift technology type. **/ @@ -248,6 +257,32 @@ public Builder username(String username) { this.__explicitlySet__.add("username"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -273,9 +308,11 @@ public AmazonRedshiftConnection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.connectionUrl, - this.username); + this.username, + this.passwordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -338,6 +375,9 @@ public Builder copy(AmazonRedshiftConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -347,6 +387,9 @@ public Builder copy(AmazonRedshiftConnection model) { if (model.wasPropertyExplicitlySet("username")) { this.username(model.getUsername()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } return this; } } @@ -382,9 +425,11 @@ public AmazonRedshiftConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, String connectionUrl, - String username) { + String username, + String passwordSecretId) { super( id, displayName, @@ -403,10 +448,12 @@ public AmazonRedshiftConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.connectionUrl = connectionUrl; this.username = username; + this.passwordSecretId = passwordSecretId; } /** @@ -508,6 +555,30 @@ public String getUsername() { return username; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -525,6 +596,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", technologyType=").append(String.valueOf(this.technologyType)); sb.append(", connectionUrl=").append(String.valueOf(this.connectionUrl)); sb.append(", username=").append(String.valueOf(this.username)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(")"); return sb.toString(); } @@ -542,6 +614,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.technologyType, other.technologyType) && java.util.Objects.equals(this.connectionUrl, other.connectionUrl) && java.util.Objects.equals(this.username, other.username) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && super.equals(other); } @@ -556,6 +629,9 @@ public int hashCode() { (result * PRIME) + (this.connectionUrl == null ? 43 : this.connectionUrl.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonRedshiftConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonRedshiftConnectionSummary.java index 7c3f3402a23..cdb9f409084 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonRedshiftConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonRedshiftConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Amazon Redshift technology type. **/ @@ -248,6 +257,32 @@ public Builder username(String username) { this.__explicitlySet__.add("username"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -273,9 +308,11 @@ public AmazonRedshiftConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, this.connectionUrl, - this.username); + this.username, + this.passwordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -338,6 +375,9 @@ public Builder copy(AmazonRedshiftConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -347,6 +387,9 @@ public Builder copy(AmazonRedshiftConnectionSummary model) { if (model.wasPropertyExplicitlySet("username")) { this.username(model.getUsername()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } return this; } } @@ -382,9 +425,11 @@ public AmazonRedshiftConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, AmazonRedshiftConnection.TechnologyType technologyType, String connectionUrl, - String username) { + String username, + String passwordSecretId) { super( id, displayName, @@ -403,10 +448,12 @@ public AmazonRedshiftConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.connectionUrl = connectionUrl; this.username = username; + this.passwordSecretId = passwordSecretId; } /** @@ -461,6 +508,30 @@ public String getUsername() { return username; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -478,6 +549,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", technologyType=").append(String.valueOf(this.technologyType)); sb.append(", connectionUrl=").append(String.valueOf(this.connectionUrl)); sb.append(", username=").append(String.valueOf(this.username)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(")"); return sb.toString(); } @@ -495,6 +567,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.technologyType, other.technologyType) && java.util.Objects.equals(this.connectionUrl, other.connectionUrl) && java.util.Objects.equals(this.username, other.username) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && super.equals(other); } @@ -509,6 +582,9 @@ public int hashCode() { (result * PRIME) + (this.connectionUrl == null ? 43 : this.connectionUrl.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonS3Connection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonS3Connection.java index ad6aa805435..db9e526be66 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonS3Connection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonS3Connection.java @@ -190,6 +190,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Amazon S3 technology type. **/ @@ -226,6 +235,26 @@ public Builder accessKeyId(String accessKeyId) { this.__explicitlySet__.add("accessKeyId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Secret Access Key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretAccessKeySecretId") + private String secretAccessKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Secret Access Key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + * @param secretAccessKeySecretId the value to set + * @return this builder + **/ + public Builder secretAccessKeySecretId(String secretAccessKeySecretId) { + this.secretAccessKeySecretId = secretAccessKeySecretId; + this.__explicitlySet__.add("secretAccessKeySecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -251,8 +280,10 @@ public AmazonS3Connection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, - this.accessKeyId); + this.accessKeyId, + this.secretAccessKeySecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -315,12 +346,18 @@ public Builder copy(AmazonS3Connection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } if (model.wasPropertyExplicitlySet("accessKeyId")) { this.accessKeyId(model.getAccessKeyId()); } + if (model.wasPropertyExplicitlySet("secretAccessKeySecretId")) { + this.secretAccessKeySecretId(model.getSecretAccessKeySecretId()); + } return this; } } @@ -356,8 +393,10 @@ public AmazonS3Connection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, - String accessKeyId) { + String accessKeyId, + String secretAccessKeySecretId) { super( id, displayName, @@ -376,9 +415,11 @@ public AmazonS3Connection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.accessKeyId = accessKeyId; + this.secretAccessKeySecretId = secretAccessKeySecretId; } /** @@ -460,6 +501,24 @@ public String getAccessKeyId() { return accessKeyId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Secret Access Key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretAccessKeySecretId") + private final String secretAccessKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Secret Access Key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + * @return the value + **/ + public String getSecretAccessKeySecretId() { + return secretAccessKeySecretId; + } + @Override public String toString() { return this.toString(true); @@ -476,6 +535,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", technologyType=").append(String.valueOf(this.technologyType)); sb.append(", accessKeyId=").append(String.valueOf(this.accessKeyId)); + sb.append(", secretAccessKeySecretId=") + .append(String.valueOf(this.secretAccessKeySecretId)); sb.append(")"); return sb.toString(); } @@ -492,6 +553,8 @@ public boolean equals(Object o) { AmazonS3Connection other = (AmazonS3Connection) o; return java.util.Objects.equals(this.technologyType, other.technologyType) && java.util.Objects.equals(this.accessKeyId, other.accessKeyId) + && java.util.Objects.equals( + this.secretAccessKeySecretId, other.secretAccessKeySecretId) && super.equals(other); } @@ -503,6 +566,11 @@ public int hashCode() { (result * PRIME) + (this.technologyType == null ? 43 : this.technologyType.hashCode()); result = (result * PRIME) + (this.accessKeyId == null ? 43 : this.accessKeyId.hashCode()); + result = + (result * PRIME) + + (this.secretAccessKeySecretId == null + ? 43 + : this.secretAccessKeySecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonS3ConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonS3ConnectionSummary.java index 5f9bce7f3ce..7d20972561a 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonS3ConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AmazonS3ConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Amazon S3 technology type. **/ @@ -226,6 +235,26 @@ public Builder accessKeyId(String accessKeyId) { this.__explicitlySet__.add("accessKeyId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Secret Access Key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretAccessKeySecretId") + private String secretAccessKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Secret Access Key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + * @param secretAccessKeySecretId the value to set + * @return this builder + **/ + public Builder secretAccessKeySecretId(String secretAccessKeySecretId) { + this.secretAccessKeySecretId = secretAccessKeySecretId; + this.__explicitlySet__.add("secretAccessKeySecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -251,8 +280,10 @@ public AmazonS3ConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, - this.accessKeyId); + this.accessKeyId, + this.secretAccessKeySecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -315,12 +346,18 @@ public Builder copy(AmazonS3ConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } if (model.wasPropertyExplicitlySet("accessKeyId")) { this.accessKeyId(model.getAccessKeyId()); } + if (model.wasPropertyExplicitlySet("secretAccessKeySecretId")) { + this.secretAccessKeySecretId(model.getSecretAccessKeySecretId()); + } return this; } } @@ -356,8 +393,10 @@ public AmazonS3ConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, AmazonS3Connection.TechnologyType technologyType, - String accessKeyId) { + String accessKeyId, + String secretAccessKeySecretId) { super( id, displayName, @@ -376,9 +415,11 @@ public AmazonS3ConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.accessKeyId = accessKeyId; + this.secretAccessKeySecretId = secretAccessKeySecretId; } /** @@ -413,6 +454,24 @@ public String getAccessKeyId() { return accessKeyId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Secret Access Key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretAccessKeySecretId") + private final String secretAccessKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Secret Access Key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + * @return the value + **/ + public String getSecretAccessKeySecretId() { + return secretAccessKeySecretId; + } + @Override public String toString() { return this.toString(true); @@ -429,6 +488,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", technologyType=").append(String.valueOf(this.technologyType)); sb.append(", accessKeyId=").append(String.valueOf(this.accessKeyId)); + sb.append(", secretAccessKeySecretId=") + .append(String.valueOf(this.secretAccessKeySecretId)); sb.append(")"); return sb.toString(); } @@ -445,6 +506,8 @@ public boolean equals(Object o) { AmazonS3ConnectionSummary other = (AmazonS3ConnectionSummary) o; return java.util.Objects.equals(this.technologyType, other.technologyType) && java.util.Objects.equals(this.accessKeyId, other.accessKeyId) + && java.util.Objects.equals( + this.secretAccessKeySecretId, other.secretAccessKeySecretId) && super.equals(other); } @@ -456,6 +519,11 @@ public int hashCode() { (result * PRIME) + (this.technologyType == null ? 43 : this.technologyType.hashCode()); result = (result * PRIME) + (this.accessKeyId == null ? 43 : this.accessKeyId.hashCode()); + result = + (result * PRIME) + + (this.secretAccessKeySecretId == null + ? 43 + : this.secretAccessKeySecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AzureDataLakeStorageConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AzureDataLakeStorageConnection.java index 6ea1890ce04..0f2a517b1c8 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AzureDataLakeStorageConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AzureDataLakeStorageConnection.java @@ -190,6 +190,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Azure Data Lake Storage technology type. **/ @@ -302,6 +311,66 @@ public Builder endpoint(String endpoint) { this.__explicitlySet__.add("endpoint"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the account key is stored. + * Note: When provided, 'accountKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("accountKeySecretId") + private String accountKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the account key is stored. + * Note: When provided, 'accountKey' field must not be provided. + * + * @param accountKeySecretId the value to set + * @return this builder + **/ + public Builder accountKeySecretId(String accountKeySecretId) { + this.accountKeySecretId = accountKeySecretId; + this.__explicitlySet__.add("accountKeySecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the sas token is stored. + * Note: When provided, 'sasToken' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sasTokenSecretId") + private String sasTokenSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the sas token is stored. + * Note: When provided, 'sasToken' field must not be provided. + * + * @param sasTokenSecretId the value to set + * @return this builder + **/ + public Builder sasTokenSecretId(String sasTokenSecretId) { + this.sasTokenSecretId = sasTokenSecretId; + this.__explicitlySet__.add("sasTokenSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the client secret is stored. + * Note: When provided, 'clientSecret' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clientSecretSecretId") + private String clientSecretSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the client secret is stored. + * Note: When provided, 'clientSecret' field must not be provided. + * + * @param clientSecretSecretId the value to set + * @return this builder + **/ + public Builder clientSecretSecretId(String clientSecretSecretId) { + this.clientSecretSecretId = clientSecretSecretId; + this.__explicitlySet__.add("clientSecretSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -327,12 +396,16 @@ public AzureDataLakeStorageConnection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.authenticationType, this.accountName, this.azureTenantId, this.clientId, - this.endpoint); + this.endpoint, + this.accountKeySecretId, + this.sasTokenSecretId, + this.clientSecretSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -395,6 +468,9 @@ public Builder copy(AzureDataLakeStorageConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -413,6 +489,15 @@ public Builder copy(AzureDataLakeStorageConnection model) { if (model.wasPropertyExplicitlySet("endpoint")) { this.endpoint(model.getEndpoint()); } + if (model.wasPropertyExplicitlySet("accountKeySecretId")) { + this.accountKeySecretId(model.getAccountKeySecretId()); + } + if (model.wasPropertyExplicitlySet("sasTokenSecretId")) { + this.sasTokenSecretId(model.getSasTokenSecretId()); + } + if (model.wasPropertyExplicitlySet("clientSecretSecretId")) { + this.clientSecretSecretId(model.getClientSecretSecretId()); + } return this; } } @@ -448,12 +533,16 @@ public AzureDataLakeStorageConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, AuthenticationType authenticationType, String accountName, String azureTenantId, String clientId, - String endpoint) { + String endpoint, + String accountKeySecretId, + String sasTokenSecretId, + String clientSecretSecretId) { super( id, displayName, @@ -472,13 +561,17 @@ public AzureDataLakeStorageConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.authenticationType = authenticationType; this.accountName = accountName; this.azureTenantId = azureTenantId; this.clientId = clientId; this.endpoint = endpoint; + this.accountKeySecretId = accountKeySecretId; + this.sasTokenSecretId = sasTokenSecretId; + this.clientSecretSecretId = clientSecretSecretId; } /** @@ -678,6 +771,60 @@ public String getEndpoint() { return endpoint; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the account key is stored. + * Note: When provided, 'accountKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("accountKeySecretId") + private final String accountKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the account key is stored. + * Note: When provided, 'accountKey' field must not be provided. + * + * @return the value + **/ + public String getAccountKeySecretId() { + return accountKeySecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the sas token is stored. + * Note: When provided, 'sasToken' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sasTokenSecretId") + private final String sasTokenSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the sas token is stored. + * Note: When provided, 'sasToken' field must not be provided. + * + * @return the value + **/ + public String getSasTokenSecretId() { + return sasTokenSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the client secret is stored. + * Note: When provided, 'clientSecret' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clientSecretSecretId") + private final String clientSecretSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the client secret is stored. + * Note: When provided, 'clientSecret' field must not be provided. + * + * @return the value + **/ + public String getClientSecretSecretId() { + return clientSecretSecretId; + } + @Override public String toString() { return this.toString(true); @@ -698,6 +845,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", azureTenantId=").append(String.valueOf(this.azureTenantId)); sb.append(", clientId=").append(String.valueOf(this.clientId)); sb.append(", endpoint=").append(String.valueOf(this.endpoint)); + sb.append(", accountKeySecretId=").append(String.valueOf(this.accountKeySecretId)); + sb.append(", sasTokenSecretId=").append(String.valueOf(this.sasTokenSecretId)); + sb.append(", clientSecretSecretId=").append(String.valueOf(this.clientSecretSecretId)); sb.append(")"); return sb.toString(); } @@ -718,6 +868,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.azureTenantId, other.azureTenantId) && java.util.Objects.equals(this.clientId, other.clientId) && java.util.Objects.equals(this.endpoint, other.endpoint) + && java.util.Objects.equals(this.accountKeySecretId, other.accountKeySecretId) + && java.util.Objects.equals(this.sasTokenSecretId, other.sasTokenSecretId) + && java.util.Objects.equals(this.clientSecretSecretId, other.clientSecretSecretId) && super.equals(other); } @@ -739,6 +892,19 @@ public int hashCode() { + (this.azureTenantId == null ? 43 : this.azureTenantId.hashCode()); result = (result * PRIME) + (this.clientId == null ? 43 : this.clientId.hashCode()); result = (result * PRIME) + (this.endpoint == null ? 43 : this.endpoint.hashCode()); + result = + (result * PRIME) + + (this.accountKeySecretId == null + ? 43 + : this.accountKeySecretId.hashCode()); + result = + (result * PRIME) + + (this.sasTokenSecretId == null ? 43 : this.sasTokenSecretId.hashCode()); + result = + (result * PRIME) + + (this.clientSecretSecretId == null + ? 43 + : this.clientSecretSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AzureDataLakeStorageConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AzureDataLakeStorageConnectionSummary.java index 462db6af268..259f713a948 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AzureDataLakeStorageConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AzureDataLakeStorageConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Azure Data Lake Storage technology type. **/ @@ -304,6 +313,66 @@ public Builder endpoint(String endpoint) { this.__explicitlySet__.add("endpoint"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the account key is stored. + * Note: When provided, 'accountKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("accountKeySecretId") + private String accountKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the account key is stored. + * Note: When provided, 'accountKey' field must not be provided. + * + * @param accountKeySecretId the value to set + * @return this builder + **/ + public Builder accountKeySecretId(String accountKeySecretId) { + this.accountKeySecretId = accountKeySecretId; + this.__explicitlySet__.add("accountKeySecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the sas token is stored. + * Note: When provided, 'sasToken' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sasTokenSecretId") + private String sasTokenSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the sas token is stored. + * Note: When provided, 'sasToken' field must not be provided. + * + * @param sasTokenSecretId the value to set + * @return this builder + **/ + public Builder sasTokenSecretId(String sasTokenSecretId) { + this.sasTokenSecretId = sasTokenSecretId; + this.__explicitlySet__.add("sasTokenSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the client secret is stored. + * Note: When provided, 'clientSecret' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clientSecretSecretId") + private String clientSecretSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the client secret is stored. + * Note: When provided, 'clientSecret' field must not be provided. + * + * @param clientSecretSecretId the value to set + * @return this builder + **/ + public Builder clientSecretSecretId(String clientSecretSecretId) { + this.clientSecretSecretId = clientSecretSecretId; + this.__explicitlySet__.add("clientSecretSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -329,12 +398,16 @@ public AzureDataLakeStorageConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, this.authenticationType, this.accountName, this.azureTenantId, this.clientId, - this.endpoint); + this.endpoint, + this.accountKeySecretId, + this.sasTokenSecretId, + this.clientSecretSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -397,6 +470,9 @@ public Builder copy(AzureDataLakeStorageConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -415,6 +491,15 @@ public Builder copy(AzureDataLakeStorageConnectionSummary model) { if (model.wasPropertyExplicitlySet("endpoint")) { this.endpoint(model.getEndpoint()); } + if (model.wasPropertyExplicitlySet("accountKeySecretId")) { + this.accountKeySecretId(model.getAccountKeySecretId()); + } + if (model.wasPropertyExplicitlySet("sasTokenSecretId")) { + this.sasTokenSecretId(model.getSasTokenSecretId()); + } + if (model.wasPropertyExplicitlySet("clientSecretSecretId")) { + this.clientSecretSecretId(model.getClientSecretSecretId()); + } return this; } } @@ -450,12 +535,16 @@ public AzureDataLakeStorageConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, AzureDataLakeStorageConnection.TechnologyType technologyType, AzureDataLakeStorageConnection.AuthenticationType authenticationType, String accountName, String azureTenantId, String clientId, - String endpoint) { + String endpoint, + String accountKeySecretId, + String sasTokenSecretId, + String clientSecretSecretId) { super( id, displayName, @@ -474,13 +563,17 @@ public AzureDataLakeStorageConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.authenticationType = authenticationType; this.accountName = accountName; this.azureTenantId = azureTenantId; this.clientId = clientId; this.endpoint = endpoint; + this.accountKeySecretId = accountKeySecretId; + this.sasTokenSecretId = sasTokenSecretId; + this.clientSecretSecretId = clientSecretSecretId; } /** @@ -583,6 +676,60 @@ public String getEndpoint() { return endpoint; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the account key is stored. + * Note: When provided, 'accountKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("accountKeySecretId") + private final String accountKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the account key is stored. + * Note: When provided, 'accountKey' field must not be provided. + * + * @return the value + **/ + public String getAccountKeySecretId() { + return accountKeySecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the sas token is stored. + * Note: When provided, 'sasToken' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sasTokenSecretId") + private final String sasTokenSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the sas token is stored. + * Note: When provided, 'sasToken' field must not be provided. + * + * @return the value + **/ + public String getSasTokenSecretId() { + return sasTokenSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the client secret is stored. + * Note: When provided, 'clientSecret' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clientSecretSecretId") + private final String clientSecretSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the client secret is stored. + * Note: When provided, 'clientSecret' field must not be provided. + * + * @return the value + **/ + public String getClientSecretSecretId() { + return clientSecretSecretId; + } + @Override public String toString() { return this.toString(true); @@ -603,6 +750,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", azureTenantId=").append(String.valueOf(this.azureTenantId)); sb.append(", clientId=").append(String.valueOf(this.clientId)); sb.append(", endpoint=").append(String.valueOf(this.endpoint)); + sb.append(", accountKeySecretId=").append(String.valueOf(this.accountKeySecretId)); + sb.append(", sasTokenSecretId=").append(String.valueOf(this.sasTokenSecretId)); + sb.append(", clientSecretSecretId=").append(String.valueOf(this.clientSecretSecretId)); sb.append(")"); return sb.toString(); } @@ -623,6 +773,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.azureTenantId, other.azureTenantId) && java.util.Objects.equals(this.clientId, other.clientId) && java.util.Objects.equals(this.endpoint, other.endpoint) + && java.util.Objects.equals(this.accountKeySecretId, other.accountKeySecretId) + && java.util.Objects.equals(this.sasTokenSecretId, other.sasTokenSecretId) + && java.util.Objects.equals(this.clientSecretSecretId, other.clientSecretSecretId) && super.equals(other); } @@ -644,6 +797,19 @@ public int hashCode() { + (this.azureTenantId == null ? 43 : this.azureTenantId.hashCode()); result = (result * PRIME) + (this.clientId == null ? 43 : this.clientId.hashCode()); result = (result * PRIME) + (this.endpoint == null ? 43 : this.endpoint.hashCode()); + result = + (result * PRIME) + + (this.accountKeySecretId == null + ? 43 + : this.accountKeySecretId.hashCode()); + result = + (result * PRIME) + + (this.sasTokenSecretId == null ? 43 : this.sasTokenSecretId.hashCode()); + result = + (result * PRIME) + + (this.clientSecretSecretId == null + ? 43 + : this.clientSecretSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AzureSynapseConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AzureSynapseConnection.java index 5aaf05b8ad7..9bbeb9fce0f 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AzureSynapseConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AzureSynapseConnection.java @@ -190,6 +190,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Azure Synapse Analytics technology type. **/ @@ -248,6 +257,32 @@ public Builder username(String username) { this.__explicitlySet__.add("username"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -273,9 +308,11 @@ public AzureSynapseConnection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.connectionString, - this.username); + this.username, + this.passwordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -338,6 +375,9 @@ public Builder copy(AzureSynapseConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -347,6 +387,9 @@ public Builder copy(AzureSynapseConnection model) { if (model.wasPropertyExplicitlySet("username")) { this.username(model.getUsername()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } return this; } } @@ -382,9 +425,11 @@ public AzureSynapseConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, String connectionString, - String username) { + String username, + String passwordSecretId) { super( id, displayName, @@ -403,10 +448,12 @@ public AzureSynapseConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.connectionString = connectionString; this.username = username; + this.passwordSecretId = passwordSecretId; } /** @@ -508,6 +555,30 @@ public String getUsername() { return username; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -525,6 +596,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", technologyType=").append(String.valueOf(this.technologyType)); sb.append(", connectionString=").append(String.valueOf(this.connectionString)); sb.append(", username=").append(String.valueOf(this.username)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(")"); return sb.toString(); } @@ -542,6 +614,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.technologyType, other.technologyType) && java.util.Objects.equals(this.connectionString, other.connectionString) && java.util.Objects.equals(this.username, other.username) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && super.equals(other); } @@ -556,6 +629,9 @@ public int hashCode() { (result * PRIME) + (this.connectionString == null ? 43 : this.connectionString.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AzureSynapseConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AzureSynapseConnectionSummary.java index c1a995ab369..797cde5fbfb 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AzureSynapseConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/AzureSynapseConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Azure Synapse Analytics technology type. **/ @@ -248,6 +257,32 @@ public Builder username(String username) { this.__explicitlySet__.add("username"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -273,9 +308,11 @@ public AzureSynapseConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, this.connectionString, - this.username); + this.username, + this.passwordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -338,6 +375,9 @@ public Builder copy(AzureSynapseConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -347,6 +387,9 @@ public Builder copy(AzureSynapseConnectionSummary model) { if (model.wasPropertyExplicitlySet("username")) { this.username(model.getUsername()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } return this; } } @@ -382,9 +425,11 @@ public AzureSynapseConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, AzureSynapseConnection.TechnologyType technologyType, String connectionString, - String username) { + String username, + String passwordSecretId) { super( id, displayName, @@ -403,10 +448,12 @@ public AzureSynapseConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.connectionString = connectionString; this.username = username; + this.passwordSecretId = passwordSecretId; } /** @@ -461,6 +508,30 @@ public String getUsername() { return username; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -478,6 +549,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", technologyType=").append(String.valueOf(this.technologyType)); sb.append(", connectionString=").append(String.valueOf(this.connectionString)); sb.append(", username=").append(String.valueOf(this.username)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(")"); return sb.toString(); } @@ -495,6 +567,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.technologyType, other.technologyType) && java.util.Objects.equals(this.connectionString, other.connectionString) && java.util.Objects.equals(this.username, other.username) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && super.equals(other); } @@ -509,6 +582,9 @@ public int hashCode() { (result * PRIME) + (this.connectionString == null ? 43 : this.connectionString.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/Connection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/Connection.java index 2b62b14c321..7c3ba55bddd 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/Connection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/Connection.java @@ -138,7 +138,8 @@ public class Connection extends com.oracle.bmc.http.internal.ExplicitlySetBmcMod "ingressIps", "nsgIds", "subnetId", - "routingMethod" + "routingMethod", + "doesUseSecretIds" }) protected Connection( String id, @@ -158,7 +159,8 @@ protected Connection( java.util.List ingressIps, java.util.List nsgIds, String subnetId, - RoutingMethod routingMethod) { + RoutingMethod routingMethod, + Boolean doesUseSecretIds) { super(); this.id = id; this.displayName = displayName; @@ -178,6 +180,7 @@ protected Connection( this.nsgIds = nsgIds; this.subnetId = subnetId; this.routingMethod = routingMethod; + this.doesUseSecretIds = doesUseSecretIds; } /** @@ -559,6 +562,22 @@ public RoutingMethod getRoutingMethod() { return routingMethod; } + /** + * Indicates that sensitive attributes are provided via Secrets. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private final Boolean doesUseSecretIds; + + /** + * Indicates that sensitive attributes are provided via Secrets. + * + * @return the value + **/ + public Boolean getDoesUseSecretIds() { + return doesUseSecretIds; + } + @Override public String toString() { return this.toString(true); @@ -591,6 +610,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); sb.append(", subnetId=").append(String.valueOf(this.subnetId)); sb.append(", routingMethod=").append(String.valueOf(this.routingMethod)); + sb.append(", doesUseSecretIds=").append(String.valueOf(this.doesUseSecretIds)); sb.append(")"); return sb.toString(); } @@ -623,6 +643,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.nsgIds, other.nsgIds) && java.util.Objects.equals(this.subnetId, other.subnetId) && java.util.Objects.equals(this.routingMethod, other.routingMethod) + && java.util.Objects.equals(this.doesUseSecretIds, other.doesUseSecretIds) && super.equals(other); } @@ -656,6 +677,9 @@ public int hashCode() { result = (result * PRIME) + (this.routingMethod == null ? 43 : this.routingMethod.hashCode()); + result = + (result * PRIME) + + (this.doesUseSecretIds == null ? 43 : this.doesUseSecretIds.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/ConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/ConnectionSummary.java index 109913d46b9..1b105e6c171 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/ConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/ConnectionSummary.java @@ -141,7 +141,8 @@ public class ConnectionSummary extends com.oracle.bmc.http.internal.ExplicitlySe "nsgIds", "subnetId", "routingMethod", - "locks" + "locks", + "doesUseSecretIds" }) protected ConnectionSummary( String id, @@ -161,7 +162,8 @@ protected ConnectionSummary( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, - java.util.List locks) { + java.util.List locks, + Boolean doesUseSecretIds) { super(); this.id = id; this.displayName = displayName; @@ -181,6 +183,7 @@ protected ConnectionSummary( this.subnetId = subnetId; this.routingMethod = routingMethod; this.locks = locks; + this.doesUseSecretIds = doesUseSecretIds; } /** @@ -509,6 +512,22 @@ public java.util.List getLocks() { return locks; } + /** + * Indicates that sensitive attributes are provided via Secrets. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private final Boolean doesUseSecretIds; + + /** + * Indicates that sensitive attributes are provided via Secrets. + * + * @return the value + **/ + public Boolean getDoesUseSecretIds() { + return doesUseSecretIds; + } + @Override public String toString() { return this.toString(true); @@ -541,6 +560,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", subnetId=").append(String.valueOf(this.subnetId)); sb.append(", routingMethod=").append(String.valueOf(this.routingMethod)); sb.append(", locks=").append(String.valueOf(this.locks)); + sb.append(", doesUseSecretIds=").append(String.valueOf(this.doesUseSecretIds)); sb.append(")"); return sb.toString(); } @@ -573,6 +593,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.subnetId, other.subnetId) && java.util.Objects.equals(this.routingMethod, other.routingMethod) && java.util.Objects.equals(this.locks, other.locks) + && java.util.Objects.equals(this.doesUseSecretIds, other.doesUseSecretIds) && super.equals(other); } @@ -606,6 +627,9 @@ public int hashCode() { (result * PRIME) + (this.routingMethod == null ? 43 : this.routingMethod.hashCode()); result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); + result = + (result * PRIME) + + (this.doesUseSecretIds == null ? 43 : this.doesUseSecretIds.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateAmazonKinesisConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateAmazonKinesisConnectionDetails.java index 5cf03f546e5..fbb48f1b4d9 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateAmazonKinesisConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateAmazonKinesisConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Amazon Kinesis technology type. **/ @@ -179,6 +188,26 @@ public Builder secretAccessKey(String secretAccessKey) { this.__explicitlySet__.add("secretAccessKey"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the secret access key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretAccessKeySecretId") + private String secretAccessKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the secret access key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + * @param secretAccessKeySecretId the value to set + * @return this builder + **/ + public Builder secretAccessKeySecretId(String secretAccessKeySecretId) { + this.secretAccessKeySecretId = secretAccessKeySecretId; + this.__explicitlySet__.add("secretAccessKeySecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -197,9 +226,11 @@ public CreateAmazonKinesisConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.accessKeyId, - this.secretAccessKey); + this.secretAccessKey, + this.secretAccessKeySecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -241,6 +272,9 @@ public Builder copy(CreateAmazonKinesisConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -250,6 +284,9 @@ public Builder copy(CreateAmazonKinesisConnectionDetails model) { if (model.wasPropertyExplicitlySet("secretAccessKey")) { this.secretAccessKey(model.getSecretAccessKey()); } + if (model.wasPropertyExplicitlySet("secretAccessKeySecretId")) { + this.secretAccessKeySecretId(model.getSecretAccessKeySecretId()); + } return this; } } @@ -278,9 +315,11 @@ public CreateAmazonKinesisConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, AmazonKinesisConnection.TechnologyType technologyType, String accessKeyId, - String secretAccessKey) { + String secretAccessKey, + String secretAccessKeySecretId) { super( displayName, description, @@ -292,10 +331,12 @@ public CreateAmazonKinesisConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.accessKeyId = accessKeyId; this.secretAccessKey = secretAccessKey; + this.secretAccessKeySecretId = secretAccessKeySecretId; } /** @@ -344,6 +385,24 @@ public String getSecretAccessKey() { return secretAccessKey; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the secret access key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretAccessKeySecretId") + private final String secretAccessKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the secret access key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + * @return the value + **/ + public String getSecretAccessKeySecretId() { + return secretAccessKeySecretId; + } + @Override public String toString() { return this.toString(true); @@ -361,6 +420,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", technologyType=").append(String.valueOf(this.technologyType)); sb.append(", accessKeyId=").append(String.valueOf(this.accessKeyId)); sb.append(", secretAccessKey=").append(""); + sb.append(", secretAccessKeySecretId=") + .append(String.valueOf(this.secretAccessKeySecretId)); sb.append(")"); return sb.toString(); } @@ -378,6 +439,8 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.technologyType, other.technologyType) && java.util.Objects.equals(this.accessKeyId, other.accessKeyId) && java.util.Objects.equals(this.secretAccessKey, other.secretAccessKey) + && java.util.Objects.equals( + this.secretAccessKeySecretId, other.secretAccessKeySecretId) && super.equals(other); } @@ -392,6 +455,11 @@ public int hashCode() { result = (result * PRIME) + (this.secretAccessKey == null ? 43 : this.secretAccessKey.hashCode()); + result = + (result * PRIME) + + (this.secretAccessKeySecretId == null + ? 43 + : this.secretAccessKeySecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateAmazonRedshiftConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateAmazonRedshiftConnectionDetails.java index 30be96f2bff..b43699677a4 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateAmazonRedshiftConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateAmazonRedshiftConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Amazon Redshift technology type. **/ @@ -205,6 +214,32 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -223,10 +258,12 @@ public CreateAmazonRedshiftConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.connectionUrl, this.username, - this.password); + this.password, + this.passwordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -268,6 +305,9 @@ public Builder copy(CreateAmazonRedshiftConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -280,6 +320,9 @@ public Builder copy(CreateAmazonRedshiftConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } return this; } } @@ -308,10 +351,12 @@ public CreateAmazonRedshiftConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, AmazonRedshiftConnection.TechnologyType technologyType, String connectionUrl, String username, - String password) { + String password, + String passwordSecretId) { super( displayName, description, @@ -323,11 +368,13 @@ public CreateAmazonRedshiftConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.connectionUrl = connectionUrl; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; } /** @@ -400,6 +447,30 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -418,6 +489,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", connectionUrl=").append(String.valueOf(this.connectionUrl)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(")"); return sb.toString(); } @@ -436,6 +508,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.connectionUrl, other.connectionUrl) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && super.equals(other); } @@ -451,6 +524,9 @@ public int hashCode() { + (this.connectionUrl == null ? 43 : this.connectionUrl.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateAmazonS3ConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateAmazonS3ConnectionDetails.java index 3da8afc91d5..a7fd7e0c0da 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateAmazonS3ConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateAmazonS3ConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Amazon S3 technology type. **/ @@ -183,6 +192,26 @@ public Builder secretAccessKey(String secretAccessKey) { this.__explicitlySet__.add("secretAccessKey"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Secret Access Key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretAccessKeySecretId") + private String secretAccessKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Secret Access Key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + * @param secretAccessKeySecretId the value to set + * @return this builder + **/ + public Builder secretAccessKeySecretId(String secretAccessKeySecretId) { + this.secretAccessKeySecretId = secretAccessKeySecretId; + this.__explicitlySet__.add("secretAccessKeySecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -201,9 +230,11 @@ public CreateAmazonS3ConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.accessKeyId, - this.secretAccessKey); + this.secretAccessKey, + this.secretAccessKeySecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -245,6 +276,9 @@ public Builder copy(CreateAmazonS3ConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -254,6 +288,9 @@ public Builder copy(CreateAmazonS3ConnectionDetails model) { if (model.wasPropertyExplicitlySet("secretAccessKey")) { this.secretAccessKey(model.getSecretAccessKey()); } + if (model.wasPropertyExplicitlySet("secretAccessKeySecretId")) { + this.secretAccessKeySecretId(model.getSecretAccessKeySecretId()); + } return this; } } @@ -282,9 +319,11 @@ public CreateAmazonS3ConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, AmazonS3Connection.TechnologyType technologyType, String accessKeyId, - String secretAccessKey) { + String secretAccessKey, + String secretAccessKeySecretId) { super( displayName, description, @@ -296,10 +335,12 @@ public CreateAmazonS3ConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.accessKeyId = accessKeyId; this.secretAccessKey = secretAccessKey; + this.secretAccessKeySecretId = secretAccessKeySecretId; } /** @@ -352,6 +393,24 @@ public String getSecretAccessKey() { return secretAccessKey; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Secret Access Key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretAccessKeySecretId") + private final String secretAccessKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Secret Access Key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + * @return the value + **/ + public String getSecretAccessKeySecretId() { + return secretAccessKeySecretId; + } + @Override public String toString() { return this.toString(true); @@ -369,6 +428,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", technologyType=").append(String.valueOf(this.technologyType)); sb.append(", accessKeyId=").append(String.valueOf(this.accessKeyId)); sb.append(", secretAccessKey=").append(""); + sb.append(", secretAccessKeySecretId=") + .append(String.valueOf(this.secretAccessKeySecretId)); sb.append(")"); return sb.toString(); } @@ -386,6 +447,8 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.technologyType, other.technologyType) && java.util.Objects.equals(this.accessKeyId, other.accessKeyId) && java.util.Objects.equals(this.secretAccessKey, other.secretAccessKey) + && java.util.Objects.equals( + this.secretAccessKeySecretId, other.secretAccessKeySecretId) && super.equals(other); } @@ -400,6 +463,11 @@ public int hashCode() { result = (result * PRIME) + (this.secretAccessKey == null ? 43 : this.secretAccessKey.hashCode()); + result = + (result * PRIME) + + (this.secretAccessKeySecretId == null + ? 43 + : this.secretAccessKeySecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateAzureDataLakeStorageConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateAzureDataLakeStorageConnectionDetails.java index 84bd2ab40f8..907feb6fa3d 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateAzureDataLakeStorageConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateAzureDataLakeStorageConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Azure Data Lake Storage technology type. **/ @@ -201,6 +210,26 @@ public Builder accountKey(String accountKey) { this.__explicitlySet__.add("accountKey"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the account key is stored. + * Note: When provided, 'accountKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("accountKeySecretId") + private String accountKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the account key is stored. + * Note: When provided, 'accountKey' field must not be provided. + * + * @param accountKeySecretId the value to set + * @return this builder + **/ + public Builder accountKeySecretId(String accountKeySecretId) { + this.accountKeySecretId = accountKeySecretId; + this.__explicitlySet__.add("accountKeySecretId"); + return this; + } /** * Credential that uses a shared access signature (SAS) to authenticate to an Azure Service. This property is * required when 'authenticationType' is set to 'SHARED_ACCESS_SIGNATURE'. @@ -223,6 +252,26 @@ public Builder sasToken(String sasToken) { this.__explicitlySet__.add("sasToken"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the sas token is stored. + * Note: When provided, 'sasToken' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sasTokenSecretId") + private String sasTokenSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the sas token is stored. + * Note: When provided, 'sasToken' field must not be provided. + * + * @param sasTokenSecretId the value to set + * @return this builder + **/ + public Builder sasTokenSecretId(String sasTokenSecretId) { + this.sasTokenSecretId = sasTokenSecretId; + this.__explicitlySet__.add("sasTokenSecretId"); + return this; + } /** * Azure tenant ID of the application. This property is required when 'authenticationType' is set to 'AZURE_ACTIVE_DIRECTORY'. * e.g.: 14593954-d337-4a61-a364-9f758c64f97f @@ -283,6 +332,26 @@ public Builder clientSecret(String clientSecret) { this.__explicitlySet__.add("clientSecret"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the client secret is stored. + * Note: When provided, 'clientSecret' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clientSecretSecretId") + private String clientSecretSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the client secret is stored. + * Note: When provided, 'clientSecret' field must not be provided. + * + * @param clientSecretSecretId the value to set + * @return this builder + **/ + public Builder clientSecretSecretId(String clientSecretSecretId) { + this.clientSecretSecretId = clientSecretSecretId; + this.__explicitlySet__.add("clientSecretSecretId"); + return this; + } /** * Azure Storage service endpoint. * e.g: https://test.blob.core.windows.net @@ -321,14 +390,18 @@ public CreateAzureDataLakeStorageConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.authenticationType, this.accountName, this.accountKey, + this.accountKeySecretId, this.sasToken, + this.sasTokenSecretId, this.azureTenantId, this.clientId, this.clientSecret, + this.clientSecretSecretId, this.endpoint); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -371,6 +444,9 @@ public Builder copy(CreateAzureDataLakeStorageConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -383,9 +459,15 @@ public Builder copy(CreateAzureDataLakeStorageConnectionDetails model) { if (model.wasPropertyExplicitlySet("accountKey")) { this.accountKey(model.getAccountKey()); } + if (model.wasPropertyExplicitlySet("accountKeySecretId")) { + this.accountKeySecretId(model.getAccountKeySecretId()); + } if (model.wasPropertyExplicitlySet("sasToken")) { this.sasToken(model.getSasToken()); } + if (model.wasPropertyExplicitlySet("sasTokenSecretId")) { + this.sasTokenSecretId(model.getSasTokenSecretId()); + } if (model.wasPropertyExplicitlySet("azureTenantId")) { this.azureTenantId(model.getAzureTenantId()); } @@ -395,6 +477,9 @@ public Builder copy(CreateAzureDataLakeStorageConnectionDetails model) { if (model.wasPropertyExplicitlySet("clientSecret")) { this.clientSecret(model.getClientSecret()); } + if (model.wasPropertyExplicitlySet("clientSecretSecretId")) { + this.clientSecretSecretId(model.getClientSecretSecretId()); + } if (model.wasPropertyExplicitlySet("endpoint")) { this.endpoint(model.getEndpoint()); } @@ -426,14 +511,18 @@ public CreateAzureDataLakeStorageConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, AzureDataLakeStorageConnection.TechnologyType technologyType, AzureDataLakeStorageConnection.AuthenticationType authenticationType, String accountName, String accountKey, + String accountKeySecretId, String sasToken, + String sasTokenSecretId, String azureTenantId, String clientId, String clientSecret, + String clientSecretSecretId, String endpoint) { super( displayName, @@ -446,15 +535,19 @@ public CreateAzureDataLakeStorageConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.authenticationType = authenticationType; this.accountName = accountName; this.accountKey = accountKey; + this.accountKeySecretId = accountKeySecretId; this.sasToken = sasToken; + this.sasTokenSecretId = sasTokenSecretId; this.azureTenantId = azureTenantId; this.clientId = clientId; this.clientSecret = clientSecret; + this.clientSecretSecretId = clientSecretSecretId; this.endpoint = endpoint; } @@ -522,6 +615,24 @@ public String getAccountKey() { return accountKey; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the account key is stored. + * Note: When provided, 'accountKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("accountKeySecretId") + private final String accountKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the account key is stored. + * Note: When provided, 'accountKey' field must not be provided. + * + * @return the value + **/ + public String getAccountKeySecretId() { + return accountKeySecretId; + } + /** * Credential that uses a shared access signature (SAS) to authenticate to an Azure Service. This property is * required when 'authenticationType' is set to 'SHARED_ACCESS_SIGNATURE'. @@ -542,6 +653,24 @@ public String getSasToken() { return sasToken; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the sas token is stored. + * Note: When provided, 'sasToken' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sasTokenSecretId") + private final String sasTokenSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the sas token is stored. + * Note: When provided, 'sasToken' field must not be provided. + * + * @return the value + **/ + public String getSasTokenSecretId() { + return sasTokenSecretId; + } + /** * Azure tenant ID of the application. This property is required when 'authenticationType' is set to 'AZURE_ACTIVE_DIRECTORY'. * e.g.: 14593954-d337-4a61-a364-9f758c64f97f @@ -596,6 +725,24 @@ public String getClientSecret() { return clientSecret; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the client secret is stored. + * Note: When provided, 'clientSecret' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clientSecretSecretId") + private final String clientSecretSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the client secret is stored. + * Note: When provided, 'clientSecret' field must not be provided. + * + * @return the value + **/ + public String getClientSecretSecretId() { + return clientSecretSecretId; + } + /** * Azure Storage service endpoint. * e.g: https://test.blob.core.windows.net @@ -632,10 +779,13 @@ public String toString(boolean includeByteArrayContents) { sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", accountName=").append(String.valueOf(this.accountName)); sb.append(", accountKey=").append(""); + sb.append(", accountKeySecretId=").append(String.valueOf(this.accountKeySecretId)); sb.append(", sasToken=").append(""); + sb.append(", sasTokenSecretId=").append(String.valueOf(this.sasTokenSecretId)); sb.append(", azureTenantId=").append(String.valueOf(this.azureTenantId)); sb.append(", clientId=").append(String.valueOf(this.clientId)); sb.append(", clientSecret=").append(""); + sb.append(", clientSecretSecretId=").append(String.valueOf(this.clientSecretSecretId)); sb.append(", endpoint=").append(String.valueOf(this.endpoint)); sb.append(")"); return sb.toString(); @@ -656,10 +806,13 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.accountName, other.accountName) && java.util.Objects.equals(this.accountKey, other.accountKey) + && java.util.Objects.equals(this.accountKeySecretId, other.accountKeySecretId) && java.util.Objects.equals(this.sasToken, other.sasToken) + && java.util.Objects.equals(this.sasTokenSecretId, other.sasTokenSecretId) && java.util.Objects.equals(this.azureTenantId, other.azureTenantId) && java.util.Objects.equals(this.clientId, other.clientId) && java.util.Objects.equals(this.clientSecret, other.clientSecret) + && java.util.Objects.equals(this.clientSecretSecretId, other.clientSecretSecretId) && java.util.Objects.equals(this.endpoint, other.endpoint) && super.equals(other); } @@ -678,12 +831,25 @@ public int hashCode() { : this.authenticationType.hashCode()); result = (result * PRIME) + (this.accountName == null ? 43 : this.accountName.hashCode()); result = (result * PRIME) + (this.accountKey == null ? 43 : this.accountKey.hashCode()); + result = + (result * PRIME) + + (this.accountKeySecretId == null + ? 43 + : this.accountKeySecretId.hashCode()); result = (result * PRIME) + (this.sasToken == null ? 43 : this.sasToken.hashCode()); + result = + (result * PRIME) + + (this.sasTokenSecretId == null ? 43 : this.sasTokenSecretId.hashCode()); result = (result * PRIME) + (this.azureTenantId == null ? 43 : this.azureTenantId.hashCode()); result = (result * PRIME) + (this.clientId == null ? 43 : this.clientId.hashCode()); result = (result * PRIME) + (this.clientSecret == null ? 43 : this.clientSecret.hashCode()); + result = + (result * PRIME) + + (this.clientSecretSecretId == null + ? 43 + : this.clientSecretSecretId.hashCode()); result = (result * PRIME) + (this.endpoint == null ? 43 : this.endpoint.hashCode()); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateAzureSynapseConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateAzureSynapseConnectionDetails.java index 98b93fc4a74..3105694456e 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateAzureSynapseConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateAzureSynapseConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Azure Synapse Analytics technology type. **/ @@ -205,6 +214,32 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -223,10 +258,12 @@ public CreateAzureSynapseConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.connectionString, this.username, - this.password); + this.password, + this.passwordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -268,6 +305,9 @@ public Builder copy(CreateAzureSynapseConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -280,6 +320,9 @@ public Builder copy(CreateAzureSynapseConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } return this; } } @@ -308,10 +351,12 @@ public CreateAzureSynapseConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, AzureSynapseConnection.TechnologyType technologyType, String connectionString, String username, - String password) { + String password, + String passwordSecretId) { super( displayName, description, @@ -323,11 +368,13 @@ public CreateAzureSynapseConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.connectionString = connectionString; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; } /** @@ -400,6 +447,30 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -418,6 +489,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", connectionString=").append(String.valueOf(this.connectionString)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(")"); return sb.toString(); } @@ -436,6 +508,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.connectionString, other.connectionString) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && super.equals(other); } @@ -451,6 +524,9 @@ public int hashCode() { + (this.connectionString == null ? 43 : this.connectionString.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateConnectionDetails.java index c8358d6b540..a1525cfb5b6 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateConnectionDetails.java @@ -134,7 +134,8 @@ public class CreateConnectionDetails extends com.oracle.bmc.http.internal.Explic "keyId", "nsgIds", "subnetId", - "routingMethod" + "routingMethod", + "doesUseSecretIds" }) protected CreateConnectionDetails( String displayName, @@ -147,7 +148,8 @@ protected CreateConnectionDetails( String keyId, java.util.List nsgIds, String subnetId, - RoutingMethod routingMethod) { + RoutingMethod routingMethod, + Boolean doesUseSecretIds) { super(); this.displayName = displayName; this.description = description; @@ -160,6 +162,7 @@ protected CreateConnectionDetails( this.nsgIds = nsgIds; this.subnetId = subnetId; this.routingMethod = routingMethod; + this.doesUseSecretIds = doesUseSecretIds; } /** @@ -358,6 +361,22 @@ public RoutingMethod getRoutingMethod() { return routingMethod; } + /** + * Indicates that sensitive attributes are provided via Secrets. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private final Boolean doesUseSecretIds; + + /** + * Indicates that sensitive attributes are provided via Secrets. + * + * @return the value + **/ + public Boolean getDoesUseSecretIds() { + return doesUseSecretIds; + } + @Override public String toString() { return this.toString(true); @@ -383,6 +402,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); sb.append(", subnetId=").append(String.valueOf(this.subnetId)); sb.append(", routingMethod=").append(String.valueOf(this.routingMethod)); + sb.append(", doesUseSecretIds=").append(String.valueOf(this.doesUseSecretIds)); sb.append(")"); return sb.toString(); } @@ -408,6 +428,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.nsgIds, other.nsgIds) && java.util.Objects.equals(this.subnetId, other.subnetId) && java.util.Objects.equals(this.routingMethod, other.routingMethod) + && java.util.Objects.equals(this.doesUseSecretIds, other.doesUseSecretIds) && super.equals(other); } @@ -430,6 +451,9 @@ public int hashCode() { result = (result * PRIME) + (this.routingMethod == null ? 43 : this.routingMethod.hashCode()); + result = + (result * PRIME) + + (this.doesUseSecretIds == null ? 43 : this.doesUseSecretIds.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateDatabaseRegistrationDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateDatabaseRegistrationDetails.java index 4e67f5c4cd4..198aede8916 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateDatabaseRegistrationDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateDatabaseRegistrationDetails.java @@ -345,16 +345,16 @@ public Builder sessionMode(SessionMode sessionMode) { return this; } /** - * The wallet contents Oracle GoldenGate uses to make connections to a database. This - * attribute is expected to be base64 encoded. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * This attribute is expected to be base64 encoded. * **/ @com.fasterxml.jackson.annotation.JsonProperty("wallet") private String wallet; /** - * The wallet contents Oracle GoldenGate uses to make connections to a database. This - * attribute is expected to be base64 encoded. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * This attribute is expected to be base64 encoded. * * @param wallet the value to set * @return this builder @@ -818,16 +818,16 @@ public SessionMode getSessionMode() { } /** - * The wallet contents Oracle GoldenGate uses to make connections to a database. This - * attribute is expected to be base64 encoded. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * This attribute is expected to be base64 encoded. * **/ @com.fasterxml.jackson.annotation.JsonProperty("wallet") private final String wallet; /** - * The wallet contents Oracle GoldenGate uses to make connections to a database. This - * attribute is expected to be base64 encoded. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * This attribute is expected to be base64 encoded. * * @return the value **/ diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateDb2ConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateDb2ConnectionDetails.java index 41de0ade7cf..456bc92672e 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateDb2ConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateDb2ConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The DB2 technology type. **/ @@ -235,6 +244,28 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated DB2 database. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated DB2 database. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * An array of name-value pair attribute entries. * Used as additional parameters in connection string. @@ -289,6 +320,28 @@ public Builder sslClientKeystoredb(String sslClientKeystoredb) { this.__explicitlySet__.add("sslClientKeystoredb"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystore file stored, + * which created at the client containing the server certificate / CA root certificate. + * Note: When provided, 'sslClientKeystoredb' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslClientKeystoredbSecretId") + private String sslClientKeystoredbSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystore file stored, + * which created at the client containing the server certificate / CA root certificate. + * Note: When provided, 'sslClientKeystoredb' field must not be provided. + * + * @param sslClientKeystoredbSecretId the value to set + * @return this builder + **/ + public Builder sslClientKeystoredbSecretId(String sslClientKeystoredbSecretId) { + this.sslClientKeystoredbSecretId = sslClientKeystoredbSecretId; + this.__explicitlySet__.add("sslClientKeystoredbSecretId"); + return this; + } /** * The base64 encoded keystash file which contains the encrypted password to the key database file. * @@ -307,6 +360,28 @@ public Builder sslClientKeystash(String sslClientKeystash) { this.__explicitlySet__.add("sslClientKeystash"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystash file is stored, + * which contains the encrypted password to the key database file. + * Note: When provided, 'sslClientKeystash' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslClientKeystashSecretId") + private String sslClientKeystashSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystash file is stored, + * which contains the encrypted password to the key database file. + * Note: When provided, 'sslClientKeystash' field must not be provided. + * + * @param sslClientKeystashSecretId the value to set + * @return this builder + **/ + public Builder sslClientKeystashSecretId(String sslClientKeystashSecretId) { + this.sslClientKeystashSecretId = sslClientKeystashSecretId; + this.__explicitlySet__.add("sslClientKeystashSecretId"); + return this; + } /** * The base64 encoded file which contains the self-signed server certificate / Certificate Authority (CA) certificate. * @@ -343,16 +418,20 @@ public CreateDb2ConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.databaseName, this.host, this.port, this.username, this.password, + this.passwordSecretId, this.additionalAttributes, this.securityProtocol, this.sslClientKeystoredb, + this.sslClientKeystoredbSecretId, this.sslClientKeystash, + this.sslClientKeystashSecretId, this.sslServerCertificate); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -395,6 +474,9 @@ public Builder copy(CreateDb2ConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -413,6 +495,9 @@ public Builder copy(CreateDb2ConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("additionalAttributes")) { this.additionalAttributes(model.getAdditionalAttributes()); } @@ -422,9 +507,15 @@ public Builder copy(CreateDb2ConnectionDetails model) { if (model.wasPropertyExplicitlySet("sslClientKeystoredb")) { this.sslClientKeystoredb(model.getSslClientKeystoredb()); } + if (model.wasPropertyExplicitlySet("sslClientKeystoredbSecretId")) { + this.sslClientKeystoredbSecretId(model.getSslClientKeystoredbSecretId()); + } if (model.wasPropertyExplicitlySet("sslClientKeystash")) { this.sslClientKeystash(model.getSslClientKeystash()); } + if (model.wasPropertyExplicitlySet("sslClientKeystashSecretId")) { + this.sslClientKeystashSecretId(model.getSslClientKeystashSecretId()); + } if (model.wasPropertyExplicitlySet("sslServerCertificate")) { this.sslServerCertificate(model.getSslServerCertificate()); } @@ -456,16 +547,20 @@ public CreateDb2ConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, Db2Connection.TechnologyType technologyType, String databaseName, String host, Integer port, String username, String password, + String passwordSecretId, java.util.List additionalAttributes, Db2Connection.SecurityProtocol securityProtocol, String sslClientKeystoredb, + String sslClientKeystoredbSecretId, String sslClientKeystash, + String sslClientKeystashSecretId, String sslServerCertificate) { super( displayName, @@ -478,17 +573,21 @@ public CreateDb2ConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.databaseName = databaseName; this.host = host; this.port = port; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.additionalAttributes = additionalAttributes; this.securityProtocol = securityProtocol; this.sslClientKeystoredb = sslClientKeystoredb; + this.sslClientKeystoredbSecretId = sslClientKeystoredbSecretId; this.sslClientKeystash = sslClientKeystash; + this.sslClientKeystashSecretId = sslClientKeystashSecretId; this.sslServerCertificate = sslServerCertificate; } @@ -588,6 +687,26 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated DB2 database. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated DB2 database. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * An array of name-value pair attribute entries. * Used as additional parameters in connection string. @@ -636,6 +755,26 @@ public String getSslClientKeystoredb() { return sslClientKeystoredb; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystore file stored, + * which created at the client containing the server certificate / CA root certificate. + * Note: When provided, 'sslClientKeystoredb' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslClientKeystoredbSecretId") + private final String sslClientKeystoredbSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystore file stored, + * which created at the client containing the server certificate / CA root certificate. + * Note: When provided, 'sslClientKeystoredb' field must not be provided. + * + * @return the value + **/ + public String getSslClientKeystoredbSecretId() { + return sslClientKeystoredbSecretId; + } + /** * The base64 encoded keystash file which contains the encrypted password to the key database file. * @@ -652,6 +791,26 @@ public String getSslClientKeystash() { return sslClientKeystash; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystash file is stored, + * which contains the encrypted password to the key database file. + * Note: When provided, 'sslClientKeystash' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslClientKeystashSecretId") + private final String sslClientKeystashSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystash file is stored, + * which contains the encrypted password to the key database file. + * Note: When provided, 'sslClientKeystash' field must not be provided. + * + * @return the value + **/ + public String getSslClientKeystashSecretId() { + return sslClientKeystashSecretId; + } + /** * The base64 encoded file which contains the self-signed server certificate / Certificate Authority (CA) certificate. * @@ -688,10 +847,15 @@ public String toString(boolean includeByteArrayContents) { sb.append(", port=").append(String.valueOf(this.port)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", additionalAttributes=").append(String.valueOf(this.additionalAttributes)); sb.append(", securityProtocol=").append(String.valueOf(this.securityProtocol)); sb.append(", sslClientKeystoredb=").append(String.valueOf(this.sslClientKeystoredb)); + sb.append(", sslClientKeystoredbSecretId=") + .append(String.valueOf(this.sslClientKeystoredbSecretId)); sb.append(", sslClientKeystash=").append(String.valueOf(this.sslClientKeystash)); + sb.append(", sslClientKeystashSecretId=") + .append(String.valueOf(this.sslClientKeystashSecretId)); sb.append(", sslServerCertificate=").append(String.valueOf(this.sslServerCertificate)); sb.append(")"); return sb.toString(); @@ -713,10 +877,15 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.port, other.port) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.additionalAttributes, other.additionalAttributes) && java.util.Objects.equals(this.securityProtocol, other.securityProtocol) && java.util.Objects.equals(this.sslClientKeystoredb, other.sslClientKeystoredb) + && java.util.Objects.equals( + this.sslClientKeystoredbSecretId, other.sslClientKeystoredbSecretId) && java.util.Objects.equals(this.sslClientKeystash, other.sslClientKeystash) + && java.util.Objects.equals( + this.sslClientKeystashSecretId, other.sslClientKeystashSecretId) && java.util.Objects.equals(this.sslServerCertificate, other.sslServerCertificate) && super.equals(other); } @@ -733,6 +902,9 @@ public int hashCode() { result = (result * PRIME) + (this.port == null ? 43 : this.port.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.additionalAttributes == null @@ -746,9 +918,19 @@ public int hashCode() { + (this.sslClientKeystoredb == null ? 43 : this.sslClientKeystoredb.hashCode()); + result = + (result * PRIME) + + (this.sslClientKeystoredbSecretId == null + ? 43 + : this.sslClientKeystoredbSecretId.hashCode()); result = (result * PRIME) + (this.sslClientKeystash == null ? 43 : this.sslClientKeystash.hashCode()); + result = + (result * PRIME) + + (this.sslClientKeystashSecretId == null + ? 43 + : this.sslClientKeystashSecretId.hashCode()); result = (result * PRIME) + (this.sslServerCertificate == null diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateDeploymentBackupDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateDeploymentBackupDetails.java index 073a2dbe3cd..5cb609bcf32 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateDeploymentBackupDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateDeploymentBackupDetails.java @@ -32,6 +32,7 @@ public final class CreateDeploymentBackupDetails "objectName", "freeformTags", "definedTags", + "isMetadataOnly", "locks" }) public CreateDeploymentBackupDetails( @@ -43,6 +44,7 @@ public CreateDeploymentBackupDetails( String objectName, java.util.Map freeformTags, java.util.Map> definedTags, + Boolean isMetadataOnly, java.util.List locks) { super(); this.displayName = displayName; @@ -53,6 +55,7 @@ public CreateDeploymentBackupDetails( this.objectName = objectName; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.isMetadataOnly = isMetadataOnly; this.locks = locks; } @@ -207,6 +210,22 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Parameter to allow users to create backup without trails + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMetadataOnly") + private Boolean isMetadataOnly; + + /** + * Parameter to allow users to create backup without trails + * @param isMetadataOnly the value to set + * @return this builder + **/ + public Builder isMetadataOnly(Boolean isMetadataOnly) { + this.isMetadataOnly = isMetadataOnly; + this.__explicitlySet__.add("isMetadataOnly"); + return this; + } /** * Locks associated with this resource. **/ @@ -238,6 +257,7 @@ public CreateDeploymentBackupDetails build() { this.objectName, this.freeformTags, this.definedTags, + this.isMetadataOnly, this.locks); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -271,6 +291,9 @@ public Builder copy(CreateDeploymentBackupDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("isMetadataOnly")) { + this.isMetadataOnly(model.getIsMetadataOnly()); + } if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } @@ -421,6 +444,20 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Parameter to allow users to create backup without trails + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMetadataOnly") + private final Boolean isMetadataOnly; + + /** + * Parameter to allow users to create backup without trails + * @return the value + **/ + public Boolean getIsMetadataOnly() { + return isMetadataOnly; + } + /** * Locks associated with this resource. **/ @@ -457,6 +494,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", objectName=").append(String.valueOf(this.objectName)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", isMetadataOnly=").append(String.valueOf(this.isMetadataOnly)); sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(")"); return sb.toString(); @@ -480,6 +518,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.objectName, other.objectName) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.isMetadataOnly, other.isMetadataOnly) && java.util.Objects.equals(this.locks, other.locks) && super.equals(other); } @@ -500,6 +539,9 @@ public int hashCode() { result = (result * PRIME) + (this.objectName == null ? 43 : this.objectName.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.isMetadataOnly == null ? 43 : this.isMetadataOnly.hashCode()); result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + super.hashCode(); return result; diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateDeploymentDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateDeploymentDetails.java index 1ae275cb562..57938efbe9e 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateDeploymentDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateDeploymentDetails.java @@ -26,6 +26,7 @@ public final class CreateDeploymentDetails @java.beans.ConstructorProperties({ "displayName", "licenseModel", + "environmentType", "description", "compartmentId", "freeformTags", @@ -47,6 +48,7 @@ public final class CreateDeploymentDetails public CreateDeploymentDetails( String displayName, LicenseModel licenseModel, + EnvironmentType environmentType, String description, String compartmentId, java.util.Map freeformTags, @@ -67,6 +69,7 @@ public CreateDeploymentDetails( super(); this.displayName = displayName; this.licenseModel = licenseModel; + this.environmentType = environmentType; this.description = description; this.compartmentId = compartmentId; this.freeformTags = freeformTags; @@ -124,6 +127,24 @@ public Builder licenseModel(LicenseModel licenseModel) { this.__explicitlySet__.add("licenseModel"); return this; } + /** + * Specifies whether the deployment is used in a production or development/testing environment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("environmentType") + private EnvironmentType environmentType; + + /** + * Specifies whether the deployment is used in a production or development/testing environment. + * + * @param environmentType the value to set + * @return this builder + **/ + public Builder environmentType(EnvironmentType environmentType) { + this.environmentType = environmentType; + this.__explicitlySet__.add("environmentType"); + return this; + } /** * Metadata about this specific object. * @@ -434,6 +455,7 @@ public CreateDeploymentDetails build() { new CreateDeploymentDetails( this.displayName, this.licenseModel, + this.environmentType, this.description, this.compartmentId, this.freeformTags, @@ -465,6 +487,9 @@ public Builder copy(CreateDeploymentDetails model) { if (model.wasPropertyExplicitlySet("licenseModel")) { this.licenseModel(model.getLicenseModel()); } + if (model.wasPropertyExplicitlySet("environmentType")) { + this.environmentType(model.getEnvironmentType()); + } if (model.wasPropertyExplicitlySet("description")) { this.description(model.getDescription()); } @@ -563,6 +588,22 @@ public LicenseModel getLicenseModel() { return licenseModel; } + /** + * Specifies whether the deployment is used in a production or development/testing environment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("environmentType") + private final EnvironmentType environmentType; + + /** + * Specifies whether the deployment is used in a production or development/testing environment. + * + * @return the value + **/ + public EnvironmentType getEnvironmentType() { + return environmentType; + } + /** * Metadata about this specific object. * @@ -844,6 +885,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("displayName=").append(String.valueOf(this.displayName)); sb.append(", licenseModel=").append(String.valueOf(this.licenseModel)); + sb.append(", environmentType=").append(String.valueOf(this.environmentType)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); @@ -878,6 +920,7 @@ public boolean equals(Object o) { CreateDeploymentDetails other = (CreateDeploymentDetails) o; return java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.licenseModel, other.licenseModel) + && java.util.Objects.equals(this.environmentType, other.environmentType) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) @@ -905,6 +948,9 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.licenseModel == null ? 43 : this.licenseModel.hashCode()); + result = + (result * PRIME) + + (this.environmentType == null ? 43 : this.environmentType.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); result = (result * PRIME) diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateElasticsearchConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateElasticsearchConnectionDetails.java index f57c9d08cd5..e288122bb07 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateElasticsearchConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateElasticsearchConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Elasticsearch technology type. **/ @@ -242,6 +251,32 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * Fingerprint required by TLS security protocol. * Eg.: '6152b2dfbff200f973c5074a5b91d06ab3b472c07c09a1ea57bb7fd406cdce9c' @@ -280,12 +315,14 @@ public CreateElasticsearchConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.servers, this.securityProtocol, this.authenticationType, this.username, this.password, + this.passwordSecretId, this.fingerprint); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -328,6 +365,9 @@ public Builder copy(CreateElasticsearchConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -346,6 +386,9 @@ public Builder copy(CreateElasticsearchConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("fingerprint")) { this.fingerprint(model.getFingerprint()); } @@ -377,12 +420,14 @@ public CreateElasticsearchConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, ElasticsearchConnection.TechnologyType technologyType, String servers, ElasticsearchConnection.SecurityProtocol securityProtocol, ElasticsearchConnection.AuthenticationType authenticationType, String username, String password, + String passwordSecretId, String fingerprint) { super( displayName, @@ -395,13 +440,15 @@ public CreateElasticsearchConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.servers = servers; this.securityProtocol = securityProtocol; this.authenticationType = authenticationType; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.fingerprint = fingerprint; } @@ -507,6 +554,30 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * Fingerprint required by TLS security protocol. * Eg.: '6152b2dfbff200f973c5074a5b91d06ab3b472c07c09a1ea57bb7fd406cdce9c' @@ -545,6 +616,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", fingerprint=").append(String.valueOf(this.fingerprint)); sb.append(")"); return sb.toString(); @@ -566,6 +638,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.fingerprint, other.fingerprint) && super.equals(other); } @@ -588,6 +661,9 @@ public int hashCode() { : this.authenticationType.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.fingerprint == null ? 43 : this.fingerprint.hashCode()); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateGenericConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateGenericConnectionDetails.java index 9b5db5aac07..ad4ab8ea5db 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateGenericConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateGenericConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Generic technology type. **/ @@ -187,6 +196,7 @@ public CreateGenericConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.host); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -230,6 +240,9 @@ public Builder copy(CreateGenericConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -264,6 +277,7 @@ public CreateGenericConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, GenericConnection.TechnologyType technologyType, String host) { super( @@ -277,7 +291,8 @@ public CreateGenericConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.host = host; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateGoldenGateConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateGoldenGateConnectionDetails.java index 826d449c7c7..989100b89a9 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateGoldenGateConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateGoldenGateConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The GoldenGate technology type. **/ @@ -233,6 +242,28 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * which is used to connect to the Oracle GoldenGate accessed trough this connection. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * which is used to connect to the Oracle GoldenGate accessed trough this connection. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host * field, or make sure the host name is resolvable in the target VCN. @@ -283,12 +314,14 @@ public CreateGoldenGateConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.deploymentId, this.host, this.port, this.username, this.password, + this.passwordSecretId, this.privateIp); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -331,6 +364,9 @@ public Builder copy(CreateGoldenGateConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -349,6 +385,9 @@ public Builder copy(CreateGoldenGateConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } @@ -380,12 +419,14 @@ public CreateGoldenGateConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, GoldenGateConnection.TechnologyType technologyType, String deploymentId, String host, Integer port, String username, String password, + String passwordSecretId, String privateIp) { super( displayName, @@ -398,13 +439,15 @@ public CreateGoldenGateConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.deploymentId = deploymentId; this.host = host; this.port = port; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.privateIp = privateIp; } @@ -502,6 +545,26 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * which is used to connect to the Oracle GoldenGate accessed trough this connection. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * which is used to connect to the Oracle GoldenGate accessed trough this connection. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host * field, or make sure the host name is resolvable in the target VCN. @@ -552,6 +615,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", port=").append(String.valueOf(this.port)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(")"); return sb.toString(); @@ -573,6 +637,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.port, other.port) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.privateIp, other.privateIp) && super.equals(other); } @@ -589,6 +654,9 @@ public int hashCode() { result = (result * PRIME) + (this.port == null ? 43 : this.port.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateGoogleBigQueryConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateGoogleBigQueryConnectionDetails.java index 4a688950cf0..2ff99bb62c2 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateGoogleBigQueryConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateGoogleBigQueryConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Google BigQuery technology type. **/ @@ -163,6 +172,28 @@ public Builder serviceAccountKeyFile(String serviceAccountKeyFile) { this.__explicitlySet__.add("serviceAccountKeyFile"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google BigQuery. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceAccountKeyFileSecretId") + private String serviceAccountKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google BigQuery. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + * @param serviceAccountKeyFileSecretId the value to set + * @return this builder + **/ + public Builder serviceAccountKeyFileSecretId(String serviceAccountKeyFileSecretId) { + this.serviceAccountKeyFileSecretId = serviceAccountKeyFileSecretId; + this.__explicitlySet__.add("serviceAccountKeyFileSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -181,8 +212,10 @@ public CreateGoogleBigQueryConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, - this.serviceAccountKeyFile); + this.serviceAccountKeyFile, + this.serviceAccountKeyFileSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -224,12 +257,18 @@ public Builder copy(CreateGoogleBigQueryConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } if (model.wasPropertyExplicitlySet("serviceAccountKeyFile")) { this.serviceAccountKeyFile(model.getServiceAccountKeyFile()); } + if (model.wasPropertyExplicitlySet("serviceAccountKeyFileSecretId")) { + this.serviceAccountKeyFileSecretId(model.getServiceAccountKeyFileSecretId()); + } return this; } } @@ -258,8 +297,10 @@ public CreateGoogleBigQueryConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, GoogleBigQueryConnection.TechnologyType technologyType, - String serviceAccountKeyFile) { + String serviceAccountKeyFile, + String serviceAccountKeyFileSecretId) { super( displayName, description, @@ -271,9 +312,11 @@ public CreateGoogleBigQueryConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.serviceAccountKeyFile = serviceAccountKeyFile; + this.serviceAccountKeyFileSecretId = serviceAccountKeyFileSecretId; } /** @@ -308,6 +351,26 @@ public String getServiceAccountKeyFile() { return serviceAccountKeyFile; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google BigQuery. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceAccountKeyFileSecretId") + private final String serviceAccountKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google BigQuery. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + * @return the value + **/ + public String getServiceAccountKeyFileSecretId() { + return serviceAccountKeyFileSecretId; + } + @Override public String toString() { return this.toString(true); @@ -324,6 +387,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", technologyType=").append(String.valueOf(this.technologyType)); sb.append(", serviceAccountKeyFile=").append(String.valueOf(this.serviceAccountKeyFile)); + sb.append(", serviceAccountKeyFileSecretId=") + .append(String.valueOf(this.serviceAccountKeyFileSecretId)); sb.append(")"); return sb.toString(); } @@ -340,6 +405,8 @@ public boolean equals(Object o) { CreateGoogleBigQueryConnectionDetails other = (CreateGoogleBigQueryConnectionDetails) o; return java.util.Objects.equals(this.technologyType, other.technologyType) && java.util.Objects.equals(this.serviceAccountKeyFile, other.serviceAccountKeyFile) + && java.util.Objects.equals( + this.serviceAccountKeyFileSecretId, other.serviceAccountKeyFileSecretId) && super.equals(other); } @@ -355,6 +422,11 @@ public int hashCode() { + (this.serviceAccountKeyFile == null ? 43 : this.serviceAccountKeyFile.hashCode()); + result = + (result * PRIME) + + (this.serviceAccountKeyFileSecretId == null + ? 43 + : this.serviceAccountKeyFileSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateGoogleCloudStorageConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateGoogleCloudStorageConnectionDetails.java index 3730dbabe26..6dd926c1512 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateGoogleCloudStorageConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateGoogleCloudStorageConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Google Cloud Storage technology type. **/ @@ -163,6 +172,28 @@ public Builder serviceAccountKeyFile(String serviceAccountKeyFile) { this.__explicitlySet__.add("serviceAccountKeyFile"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google Cloud Storage. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceAccountKeyFileSecretId") + private String serviceAccountKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google Cloud Storage. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + * @param serviceAccountKeyFileSecretId the value to set + * @return this builder + **/ + public Builder serviceAccountKeyFileSecretId(String serviceAccountKeyFileSecretId) { + this.serviceAccountKeyFileSecretId = serviceAccountKeyFileSecretId; + this.__explicitlySet__.add("serviceAccountKeyFileSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -181,8 +212,10 @@ public CreateGoogleCloudStorageConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, - this.serviceAccountKeyFile); + this.serviceAccountKeyFile, + this.serviceAccountKeyFileSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -224,12 +257,18 @@ public Builder copy(CreateGoogleCloudStorageConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } if (model.wasPropertyExplicitlySet("serviceAccountKeyFile")) { this.serviceAccountKeyFile(model.getServiceAccountKeyFile()); } + if (model.wasPropertyExplicitlySet("serviceAccountKeyFileSecretId")) { + this.serviceAccountKeyFileSecretId(model.getServiceAccountKeyFileSecretId()); + } return this; } } @@ -258,8 +297,10 @@ public CreateGoogleCloudStorageConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, GoogleCloudStorageConnection.TechnologyType technologyType, - String serviceAccountKeyFile) { + String serviceAccountKeyFile, + String serviceAccountKeyFileSecretId) { super( displayName, description, @@ -271,9 +312,11 @@ public CreateGoogleCloudStorageConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.serviceAccountKeyFile = serviceAccountKeyFile; + this.serviceAccountKeyFileSecretId = serviceAccountKeyFileSecretId; } /** @@ -308,6 +351,26 @@ public String getServiceAccountKeyFile() { return serviceAccountKeyFile; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google Cloud Storage. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceAccountKeyFileSecretId") + private final String serviceAccountKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google Cloud Storage. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + * @return the value + **/ + public String getServiceAccountKeyFileSecretId() { + return serviceAccountKeyFileSecretId; + } + @Override public String toString() { return this.toString(true); @@ -324,6 +387,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", technologyType=").append(String.valueOf(this.technologyType)); sb.append(", serviceAccountKeyFile=").append(String.valueOf(this.serviceAccountKeyFile)); + sb.append(", serviceAccountKeyFileSecretId=") + .append(String.valueOf(this.serviceAccountKeyFileSecretId)); sb.append(")"); return sb.toString(); } @@ -341,6 +406,8 @@ public boolean equals(Object o) { (CreateGoogleCloudStorageConnectionDetails) o; return java.util.Objects.equals(this.technologyType, other.technologyType) && java.util.Objects.equals(this.serviceAccountKeyFile, other.serviceAccountKeyFile) + && java.util.Objects.equals( + this.serviceAccountKeyFileSecretId, other.serviceAccountKeyFileSecretId) && super.equals(other); } @@ -356,6 +423,11 @@ public int hashCode() { + (this.serviceAccountKeyFile == null ? 43 : this.serviceAccountKeyFile.hashCode()); + result = + (result * PRIME) + + (this.serviceAccountKeyFileSecretId == null + ? 43 + : this.serviceAccountKeyFileSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateHdfsConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateHdfsConnectionDetails.java index 273ae6ad7ab..5879a9d2235 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateHdfsConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateHdfsConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Hadoop Distributed File System technology type. **/ @@ -179,6 +188,7 @@ public CreateHdfsConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.coreSiteXml); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -222,6 +232,9 @@ public Builder copy(CreateHdfsConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -256,6 +269,7 @@ public CreateHdfsConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, HdfsConnection.TechnologyType technologyType, String coreSiteXml) { super( @@ -269,7 +283,8 @@ public CreateHdfsConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.coreSiteXml = coreSiteXml; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateJavaMessageServiceConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateJavaMessageServiceConnectionDetails.java index cf8cc3a0b06..1654dcfef08 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateJavaMessageServiceConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateJavaMessageServiceConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Java Message Service technology type. * @@ -263,6 +272,26 @@ public Builder jndiSecurityCredentials(String jndiSecurityCredentials) { this.__explicitlySet__.add("jndiSecurityCredentials"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the security credentials are stored associated to the principal. + * Note: When provided, 'jndiSecurityCredentials' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("jndiSecurityCredentialsSecretId") + private String jndiSecurityCredentialsSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the security credentials are stored associated to the principal. + * Note: When provided, 'jndiSecurityCredentials' field must not be provided. + * + * @param jndiSecurityCredentialsSecretId the value to set + * @return this builder + **/ + public Builder jndiSecurityCredentialsSecretId(String jndiSecurityCredentialsSecretId) { + this.jndiSecurityCredentialsSecretId = jndiSecurityCredentialsSecretId; + this.__explicitlySet__.add("jndiSecurityCredentialsSecretId"); + return this; + } /** * Connectin URL of the Java Message Service, specifying the protocol, host, and port. * e.g.: 'mq://myjms.host.domain:7676' @@ -343,6 +372,28 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated Java Message Service. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated Java Message Service. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * Security protocol for Java Message Service. If not provided, default is PLAIN. * Optional until 2024-06-27, in the release after it will be made required. @@ -403,6 +454,26 @@ public Builder trustStore(String trustStore) { this.__explicitlySet__.add("trustStore"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + * @param trustStoreSecretId the value to set + * @return this builder + **/ + public Builder trustStoreSecretId(String trustStoreSecretId) { + this.trustStoreSecretId = trustStoreSecretId; + this.__explicitlySet__.add("trustStoreSecretId"); + return this; + } /** * The TrustStore password. * @@ -421,6 +492,26 @@ public Builder trustStorePassword(String trustStorePassword) { this.__explicitlySet__.add("trustStorePassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @param trustStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder trustStorePasswordSecretId(String trustStorePasswordSecretId) { + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.__explicitlySet__.add("trustStorePasswordSecretId"); + return this; + } /** * The base64 encoded content of the KeyStore file. * @@ -439,6 +530,26 @@ public Builder keyStore(String keyStore) { this.__explicitlySet__.add("keyStore"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + * @param keyStoreSecretId the value to set + * @return this builder + **/ + public Builder keyStoreSecretId(String keyStoreSecretId) { + this.keyStoreSecretId = keyStoreSecretId; + this.__explicitlySet__.add("keyStoreSecretId"); + return this; + } /** * The KeyStore password. * @@ -457,6 +568,26 @@ public Builder keyStorePassword(String keyStorePassword) { this.__explicitlySet__.add("keyStorePassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @param keyStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder keyStorePasswordSecretId(String keyStorePasswordSecretId) { + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.__explicitlySet__.add("keyStorePasswordSecretId"); + return this; + } /** * The password for the cert inside of the KeyStore. * In case it differs from the KeyStore password, it should be provided. @@ -477,6 +608,28 @@ public Builder sslKeyPassword(String sslKeyPassword) { this.__explicitlySet__.add("sslKeyPassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored for the cert inside of the Keystore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored for the cert inside of the Keystore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @param sslKeyPasswordSecretId the value to set + * @return this builder + **/ + public Builder sslKeyPasswordSecretId(String sslKeyPasswordSecretId) { + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; + this.__explicitlySet__.add("sslKeyPasswordSecretId"); + return this; + } /** * Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host * field, or make sure the host name is resolvable in the target VCN. @@ -527,6 +680,7 @@ public CreateJavaMessageServiceConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.shouldUseJndi, this.jndiConnectionFactory, @@ -534,17 +688,24 @@ public CreateJavaMessageServiceConnectionDetails build() { this.jndiInitialContextFactory, this.jndiSecurityPrincipal, this.jndiSecurityCredentials, + this.jndiSecurityCredentialsSecretId, this.connectionUrl, this.connectionFactory, this.username, this.password, + this.passwordSecretId, this.securityProtocol, this.authenticationType, this.trustStore, + this.trustStoreSecretId, this.trustStorePassword, + this.trustStorePasswordSecretId, this.keyStore, + this.keyStoreSecretId, this.keyStorePassword, + this.keyStorePasswordSecretId, this.sslKeyPassword, + this.sslKeyPasswordSecretId, this.privateIp); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -587,6 +748,9 @@ public Builder copy(CreateJavaMessageServiceConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -608,6 +772,9 @@ public Builder copy(CreateJavaMessageServiceConnectionDetails model) { if (model.wasPropertyExplicitlySet("jndiSecurityCredentials")) { this.jndiSecurityCredentials(model.getJndiSecurityCredentials()); } + if (model.wasPropertyExplicitlySet("jndiSecurityCredentialsSecretId")) { + this.jndiSecurityCredentialsSecretId(model.getJndiSecurityCredentialsSecretId()); + } if (model.wasPropertyExplicitlySet("connectionUrl")) { this.connectionUrl(model.getConnectionUrl()); } @@ -620,6 +787,9 @@ public Builder copy(CreateJavaMessageServiceConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("securityProtocol")) { this.securityProtocol(model.getSecurityProtocol()); } @@ -629,18 +799,33 @@ public Builder copy(CreateJavaMessageServiceConnectionDetails model) { if (model.wasPropertyExplicitlySet("trustStore")) { this.trustStore(model.getTrustStore()); } + if (model.wasPropertyExplicitlySet("trustStoreSecretId")) { + this.trustStoreSecretId(model.getTrustStoreSecretId()); + } if (model.wasPropertyExplicitlySet("trustStorePassword")) { this.trustStorePassword(model.getTrustStorePassword()); } + if (model.wasPropertyExplicitlySet("trustStorePasswordSecretId")) { + this.trustStorePasswordSecretId(model.getTrustStorePasswordSecretId()); + } if (model.wasPropertyExplicitlySet("keyStore")) { this.keyStore(model.getKeyStore()); } + if (model.wasPropertyExplicitlySet("keyStoreSecretId")) { + this.keyStoreSecretId(model.getKeyStoreSecretId()); + } if (model.wasPropertyExplicitlySet("keyStorePassword")) { this.keyStorePassword(model.getKeyStorePassword()); } + if (model.wasPropertyExplicitlySet("keyStorePasswordSecretId")) { + this.keyStorePasswordSecretId(model.getKeyStorePasswordSecretId()); + } if (model.wasPropertyExplicitlySet("sslKeyPassword")) { this.sslKeyPassword(model.getSslKeyPassword()); } + if (model.wasPropertyExplicitlySet("sslKeyPasswordSecretId")) { + this.sslKeyPasswordSecretId(model.getSslKeyPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } @@ -672,6 +857,7 @@ public CreateJavaMessageServiceConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, JavaMessageServiceConnection.TechnologyType technologyType, Boolean shouldUseJndi, String jndiConnectionFactory, @@ -679,17 +865,24 @@ public CreateJavaMessageServiceConnectionDetails( String jndiInitialContextFactory, String jndiSecurityPrincipal, String jndiSecurityCredentials, + String jndiSecurityCredentialsSecretId, String connectionUrl, String connectionFactory, String username, String password, + String passwordSecretId, JavaMessageServiceConnection.SecurityProtocol securityProtocol, JavaMessageServiceConnection.AuthenticationType authenticationType, String trustStore, + String trustStoreSecretId, String trustStorePassword, + String trustStorePasswordSecretId, String keyStore, + String keyStoreSecretId, String keyStorePassword, + String keyStorePasswordSecretId, String sslKeyPassword, + String sslKeyPasswordSecretId, String privateIp) { super( displayName, @@ -702,7 +895,8 @@ public CreateJavaMessageServiceConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.shouldUseJndi = shouldUseJndi; this.jndiConnectionFactory = jndiConnectionFactory; @@ -710,17 +904,24 @@ public CreateJavaMessageServiceConnectionDetails( this.jndiInitialContextFactory = jndiInitialContextFactory; this.jndiSecurityPrincipal = jndiSecurityPrincipal; this.jndiSecurityCredentials = jndiSecurityCredentials; + this.jndiSecurityCredentialsSecretId = jndiSecurityCredentialsSecretId; this.connectionUrl = connectionUrl; this.connectionFactory = connectionFactory; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.securityProtocol = securityProtocol; this.authenticationType = authenticationType; this.trustStore = trustStore; + this.trustStoreSecretId = trustStoreSecretId; this.trustStorePassword = trustStorePassword; + this.trustStorePasswordSecretId = trustStorePasswordSecretId; this.keyStore = keyStore; + this.keyStoreSecretId = keyStoreSecretId; this.keyStorePassword = keyStorePassword; + this.keyStorePasswordSecretId = keyStorePasswordSecretId; this.sslKeyPassword = sslKeyPassword; + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; this.privateIp = privateIp; } @@ -846,6 +1047,24 @@ public String getJndiSecurityCredentials() { return jndiSecurityCredentials; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the security credentials are stored associated to the principal. + * Note: When provided, 'jndiSecurityCredentials' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("jndiSecurityCredentialsSecretId") + private final String jndiSecurityCredentialsSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the security credentials are stored associated to the principal. + * Note: When provided, 'jndiSecurityCredentials' field must not be provided. + * + * @return the value + **/ + public String getJndiSecurityCredentialsSecretId() { + return jndiSecurityCredentialsSecretId; + } + /** * Connectin URL of the Java Message Service, specifying the protocol, host, and port. * e.g.: 'mq://myjms.host.domain:7676' @@ -918,6 +1137,26 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated Java Message Service. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated Java Message Service. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * Security protocol for Java Message Service. If not provided, default is PLAIN. * Optional until 2024-06-27, in the release after it will be made required. @@ -970,6 +1209,24 @@ public String getTrustStore() { return trustStore; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private final String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + * @return the value + **/ + public String getTrustStoreSecretId() { + return trustStoreSecretId; + } + /** * The TrustStore password. * @@ -986,6 +1243,24 @@ public String getTrustStorePassword() { return trustStorePassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private final String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @return the value + **/ + public String getTrustStorePasswordSecretId() { + return trustStorePasswordSecretId; + } + /** * The base64 encoded content of the KeyStore file. * @@ -1002,6 +1277,24 @@ public String getKeyStore() { return keyStore; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private final String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + * @return the value + **/ + public String getKeyStoreSecretId() { + return keyStoreSecretId; + } + /** * The KeyStore password. * @@ -1018,6 +1311,24 @@ public String getKeyStorePassword() { return keyStorePassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private final String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @return the value + **/ + public String getKeyStorePasswordSecretId() { + return keyStorePasswordSecretId; + } + /** * The password for the cert inside of the KeyStore. * In case it differs from the KeyStore password, it should be provided. @@ -1036,6 +1347,26 @@ public String getSslKeyPassword() { return sslKeyPassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored for the cert inside of the Keystore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private final String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored for the cert inside of the Keystore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @return the value + **/ + public String getSslKeyPasswordSecretId() { + return sslKeyPasswordSecretId; + } + /** * Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host * field, or make sure the host name is resolvable in the target VCN. @@ -1088,17 +1419,27 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.jndiInitialContextFactory)); sb.append(", jndiSecurityPrincipal=").append(String.valueOf(this.jndiSecurityPrincipal)); sb.append(", jndiSecurityCredentials=").append(""); + sb.append(", jndiSecurityCredentialsSecretId=") + .append(String.valueOf(this.jndiSecurityCredentialsSecretId)); sb.append(", connectionUrl=").append(String.valueOf(this.connectionUrl)); sb.append(", connectionFactory=").append(String.valueOf(this.connectionFactory)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", securityProtocol=").append(String.valueOf(this.securityProtocol)); sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", trustStore=").append(String.valueOf(this.trustStore)); + sb.append(", trustStoreSecretId=").append(String.valueOf(this.trustStoreSecretId)); sb.append(", trustStorePassword=").append(""); + sb.append(", trustStorePasswordSecretId=") + .append(String.valueOf(this.trustStorePasswordSecretId)); sb.append(", keyStore=").append(String.valueOf(this.keyStore)); + sb.append(", keyStoreSecretId=").append(String.valueOf(this.keyStoreSecretId)); sb.append(", keyStorePassword=").append(""); + sb.append(", keyStorePasswordSecretId=") + .append(String.valueOf(this.keyStorePasswordSecretId)); sb.append(", sslKeyPassword=").append(""); + sb.append(", sslKeyPasswordSecretId=").append(String.valueOf(this.sslKeyPasswordSecretId)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(")"); return sb.toString(); @@ -1124,17 +1465,28 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.jndiSecurityPrincipal, other.jndiSecurityPrincipal) && java.util.Objects.equals( this.jndiSecurityCredentials, other.jndiSecurityCredentials) + && java.util.Objects.equals( + this.jndiSecurityCredentialsSecretId, other.jndiSecurityCredentialsSecretId) && java.util.Objects.equals(this.connectionUrl, other.connectionUrl) && java.util.Objects.equals(this.connectionFactory, other.connectionFactory) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.securityProtocol, other.securityProtocol) && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.trustStore, other.trustStore) + && java.util.Objects.equals(this.trustStoreSecretId, other.trustStoreSecretId) && java.util.Objects.equals(this.trustStorePassword, other.trustStorePassword) + && java.util.Objects.equals( + this.trustStorePasswordSecretId, other.trustStorePasswordSecretId) && java.util.Objects.equals(this.keyStore, other.keyStore) + && java.util.Objects.equals(this.keyStoreSecretId, other.keyStoreSecretId) && java.util.Objects.equals(this.keyStorePassword, other.keyStorePassword) + && java.util.Objects.equals( + this.keyStorePasswordSecretId, other.keyStorePasswordSecretId) && java.util.Objects.equals(this.sslKeyPassword, other.sslKeyPassword) + && java.util.Objects.equals( + this.sslKeyPasswordSecretId, other.sslKeyPasswordSecretId) && java.util.Objects.equals(this.privateIp, other.privateIp) && super.equals(other); } @@ -1172,6 +1524,11 @@ public int hashCode() { + (this.jndiSecurityCredentials == null ? 43 : this.jndiSecurityCredentials.hashCode()); + result = + (result * PRIME) + + (this.jndiSecurityCredentialsSecretId == null + ? 43 + : this.jndiSecurityCredentialsSecretId.hashCode()); result = (result * PRIME) + (this.connectionUrl == null ? 43 : this.connectionUrl.hashCode()); @@ -1180,6 +1537,9 @@ public int hashCode() { + (this.connectionFactory == null ? 43 : this.connectionFactory.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.securityProtocol == null ? 43 : this.securityProtocol.hashCode()); @@ -1189,18 +1549,41 @@ public int hashCode() { ? 43 : this.authenticationType.hashCode()); result = (result * PRIME) + (this.trustStore == null ? 43 : this.trustStore.hashCode()); + result = + (result * PRIME) + + (this.trustStoreSecretId == null + ? 43 + : this.trustStoreSecretId.hashCode()); result = (result * PRIME) + (this.trustStorePassword == null ? 43 : this.trustStorePassword.hashCode()); + result = + (result * PRIME) + + (this.trustStorePasswordSecretId == null + ? 43 + : this.trustStorePasswordSecretId.hashCode()); result = (result * PRIME) + (this.keyStore == null ? 43 : this.keyStore.hashCode()); + result = + (result * PRIME) + + (this.keyStoreSecretId == null ? 43 : this.keyStoreSecretId.hashCode()); result = (result * PRIME) + (this.keyStorePassword == null ? 43 : this.keyStorePassword.hashCode()); + result = + (result * PRIME) + + (this.keyStorePasswordSecretId == null + ? 43 + : this.keyStorePasswordSecretId.hashCode()); result = (result * PRIME) + (this.sslKeyPassword == null ? 43 : this.sslKeyPassword.hashCode()); + result = + (result * PRIME) + + (this.sslKeyPasswordSecretId == null + ? 43 + : this.sslKeyPasswordSecretId.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateKafkaConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateKafkaConnectionDetails.java index bc13092ead8..082e02bda8b 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateKafkaConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateKafkaConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Kafka technology type. * @@ -247,6 +256,32 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * The base64 encoded content of the TrustStore file. * @@ -265,6 +300,26 @@ public Builder trustStore(String trustStore) { this.__explicitlySet__.add("trustStore"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + * @param trustStoreSecretId the value to set + * @return this builder + **/ + public Builder trustStoreSecretId(String trustStoreSecretId) { + this.trustStoreSecretId = trustStoreSecretId; + this.__explicitlySet__.add("trustStoreSecretId"); + return this; + } /** * The TrustStore password. * @@ -283,6 +338,26 @@ public Builder trustStorePassword(String trustStorePassword) { this.__explicitlySet__.add("trustStorePassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @param trustStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder trustStorePasswordSecretId(String trustStorePasswordSecretId) { + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.__explicitlySet__.add("trustStorePasswordSecretId"); + return this; + } /** * The base64 encoded content of the KeyStore file. * @@ -301,6 +376,26 @@ public Builder keyStore(String keyStore) { this.__explicitlySet__.add("keyStore"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + * @param keyStoreSecretId the value to set + * @return this builder + **/ + public Builder keyStoreSecretId(String keyStoreSecretId) { + this.keyStoreSecretId = keyStoreSecretId; + this.__explicitlySet__.add("keyStoreSecretId"); + return this; + } /** * The KeyStore password. * @@ -319,6 +414,26 @@ public Builder keyStorePassword(String keyStorePassword) { this.__explicitlySet__.add("keyStorePassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @param keyStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder keyStorePasswordSecretId(String keyStorePasswordSecretId) { + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.__explicitlySet__.add("keyStorePasswordSecretId"); + return this; + } /** * The password for the cert inside of the KeyStore. * In case it differs from the KeyStore password, it should be provided. @@ -339,6 +454,26 @@ public Builder sslKeyPassword(String sslKeyPassword) { this.__explicitlySet__.add("sslKeyPassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl Key password is stored. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl Key password is stored. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @param sslKeyPasswordSecretId the value to set + * @return this builder + **/ + public Builder sslKeyPasswordSecretId(String sslKeyPasswordSecretId) { + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; + this.__explicitlySet__.add("sslKeyPasswordSecretId"); + return this; + } /** * The base64 encoded content of the consumer.properties file. * @@ -393,17 +528,24 @@ public CreateKafkaConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.streamPoolId, this.bootstrapServers, this.securityProtocol, this.username, this.password, + this.passwordSecretId, this.trustStore, + this.trustStoreSecretId, this.trustStorePassword, + this.trustStorePasswordSecretId, this.keyStore, + this.keyStoreSecretId, this.keyStorePassword, + this.keyStorePasswordSecretId, this.sslKeyPassword, + this.sslKeyPasswordSecretId, this.consumerProperties, this.producerProperties); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -447,6 +589,9 @@ public Builder copy(CreateKafkaConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -465,21 +610,39 @@ public Builder copy(CreateKafkaConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("trustStore")) { this.trustStore(model.getTrustStore()); } + if (model.wasPropertyExplicitlySet("trustStoreSecretId")) { + this.trustStoreSecretId(model.getTrustStoreSecretId()); + } if (model.wasPropertyExplicitlySet("trustStorePassword")) { this.trustStorePassword(model.getTrustStorePassword()); } + if (model.wasPropertyExplicitlySet("trustStorePasswordSecretId")) { + this.trustStorePasswordSecretId(model.getTrustStorePasswordSecretId()); + } if (model.wasPropertyExplicitlySet("keyStore")) { this.keyStore(model.getKeyStore()); } + if (model.wasPropertyExplicitlySet("keyStoreSecretId")) { + this.keyStoreSecretId(model.getKeyStoreSecretId()); + } if (model.wasPropertyExplicitlySet("keyStorePassword")) { this.keyStorePassword(model.getKeyStorePassword()); } + if (model.wasPropertyExplicitlySet("keyStorePasswordSecretId")) { + this.keyStorePasswordSecretId(model.getKeyStorePasswordSecretId()); + } if (model.wasPropertyExplicitlySet("sslKeyPassword")) { this.sslKeyPassword(model.getSslKeyPassword()); } + if (model.wasPropertyExplicitlySet("sslKeyPasswordSecretId")) { + this.sslKeyPasswordSecretId(model.getSslKeyPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("consumerProperties")) { this.consumerProperties(model.getConsumerProperties()); } @@ -514,17 +677,24 @@ public CreateKafkaConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, KafkaConnection.TechnologyType technologyType, String streamPoolId, java.util.List bootstrapServers, KafkaConnection.SecurityProtocol securityProtocol, String username, String password, + String passwordSecretId, String trustStore, + String trustStoreSecretId, String trustStorePassword, + String trustStorePasswordSecretId, String keyStore, + String keyStoreSecretId, String keyStorePassword, + String keyStorePasswordSecretId, String sslKeyPassword, + String sslKeyPasswordSecretId, String consumerProperties, String producerProperties) { super( @@ -538,18 +708,25 @@ public CreateKafkaConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.streamPoolId = streamPoolId; this.bootstrapServers = bootstrapServers; this.securityProtocol = securityProtocol; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.trustStore = trustStore; + this.trustStoreSecretId = trustStoreSecretId; this.trustStorePassword = trustStorePassword; + this.trustStorePasswordSecretId = trustStorePasswordSecretId; this.keyStore = keyStore; + this.keyStoreSecretId = keyStoreSecretId; this.keyStorePassword = keyStorePassword; + this.keyStorePasswordSecretId = keyStorePasswordSecretId; this.sslKeyPassword = sslKeyPassword; + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; this.consumerProperties = consumerProperties; this.producerProperties = producerProperties; } @@ -662,6 +839,30 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * The base64 encoded content of the TrustStore file. * @@ -678,6 +879,24 @@ public String getTrustStore() { return trustStore; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private final String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + * @return the value + **/ + public String getTrustStoreSecretId() { + return trustStoreSecretId; + } + /** * The TrustStore password. * @@ -694,6 +913,24 @@ public String getTrustStorePassword() { return trustStorePassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private final String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @return the value + **/ + public String getTrustStorePasswordSecretId() { + return trustStorePasswordSecretId; + } + /** * The base64 encoded content of the KeyStore file. * @@ -710,6 +947,24 @@ public String getKeyStore() { return keyStore; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private final String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + * @return the value + **/ + public String getKeyStoreSecretId() { + return keyStoreSecretId; + } + /** * The KeyStore password. * @@ -726,6 +981,24 @@ public String getKeyStorePassword() { return keyStorePassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private final String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @return the value + **/ + public String getKeyStorePasswordSecretId() { + return keyStorePasswordSecretId; + } + /** * The password for the cert inside of the KeyStore. * In case it differs from the KeyStore password, it should be provided. @@ -744,6 +1017,24 @@ public String getSslKeyPassword() { return sslKeyPassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl Key password is stored. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private final String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl Key password is stored. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @return the value + **/ + public String getSslKeyPasswordSecretId() { + return sslKeyPasswordSecretId; + } + /** * The base64 encoded content of the consumer.properties file. * @@ -796,11 +1087,19 @@ public String toString(boolean includeByteArrayContents) { sb.append(", securityProtocol=").append(String.valueOf(this.securityProtocol)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", trustStore=").append(String.valueOf(this.trustStore)); + sb.append(", trustStoreSecretId=").append(String.valueOf(this.trustStoreSecretId)); sb.append(", trustStorePassword=").append(""); + sb.append(", trustStorePasswordSecretId=") + .append(String.valueOf(this.trustStorePasswordSecretId)); sb.append(", keyStore=").append(String.valueOf(this.keyStore)); + sb.append(", keyStoreSecretId=").append(String.valueOf(this.keyStoreSecretId)); sb.append(", keyStorePassword=").append(""); + sb.append(", keyStorePasswordSecretId=") + .append(String.valueOf(this.keyStorePasswordSecretId)); sb.append(", sslKeyPassword=").append(""); + sb.append(", sslKeyPasswordSecretId=").append(String.valueOf(this.sslKeyPasswordSecretId)); sb.append(", consumerProperties=").append(String.valueOf(this.consumerProperties)); sb.append(", producerProperties=").append(String.valueOf(this.producerProperties)); sb.append(")"); @@ -823,11 +1122,20 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.securityProtocol, other.securityProtocol) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.trustStore, other.trustStore) + && java.util.Objects.equals(this.trustStoreSecretId, other.trustStoreSecretId) && java.util.Objects.equals(this.trustStorePassword, other.trustStorePassword) + && java.util.Objects.equals( + this.trustStorePasswordSecretId, other.trustStorePasswordSecretId) && java.util.Objects.equals(this.keyStore, other.keyStore) + && java.util.Objects.equals(this.keyStoreSecretId, other.keyStoreSecretId) && java.util.Objects.equals(this.keyStorePassword, other.keyStorePassword) + && java.util.Objects.equals( + this.keyStorePasswordSecretId, other.keyStorePasswordSecretId) && java.util.Objects.equals(this.sslKeyPassword, other.sslKeyPassword) + && java.util.Objects.equals( + this.sslKeyPasswordSecretId, other.sslKeyPasswordSecretId) && java.util.Objects.equals(this.consumerProperties, other.consumerProperties) && java.util.Objects.equals(this.producerProperties, other.producerProperties) && super.equals(other); @@ -849,19 +1157,45 @@ public int hashCode() { + (this.securityProtocol == null ? 43 : this.securityProtocol.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.trustStore == null ? 43 : this.trustStore.hashCode()); + result = + (result * PRIME) + + (this.trustStoreSecretId == null + ? 43 + : this.trustStoreSecretId.hashCode()); result = (result * PRIME) + (this.trustStorePassword == null ? 43 : this.trustStorePassword.hashCode()); + result = + (result * PRIME) + + (this.trustStorePasswordSecretId == null + ? 43 + : this.trustStorePasswordSecretId.hashCode()); result = (result * PRIME) + (this.keyStore == null ? 43 : this.keyStore.hashCode()); + result = + (result * PRIME) + + (this.keyStoreSecretId == null ? 43 : this.keyStoreSecretId.hashCode()); result = (result * PRIME) + (this.keyStorePassword == null ? 43 : this.keyStorePassword.hashCode()); + result = + (result * PRIME) + + (this.keyStorePasswordSecretId == null + ? 43 + : this.keyStorePasswordSecretId.hashCode()); result = (result * PRIME) + (this.sslKeyPassword == null ? 43 : this.sslKeyPassword.hashCode()); + result = + (result * PRIME) + + (this.sslKeyPasswordSecretId == null + ? 43 + : this.sslKeyPasswordSecretId.hashCode()); result = (result * PRIME) + (this.consumerProperties == null diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateKafkaSchemaRegistryConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateKafkaSchemaRegistryConnectionDetails.java index 59e4b870fef..da687cba1cd 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateKafkaSchemaRegistryConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateKafkaSchemaRegistryConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Kafka (e.g. Confluent) Schema Registry technology type. * @@ -185,7 +194,7 @@ public Builder authenticationType( return this; } /** - * The username to access Schema Registry using basic authentation. + * The username to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * **/ @@ -193,7 +202,7 @@ public Builder authenticationType( private String username; /** - * The username to access Schema Registry using basic authentation. + * The username to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * * @param username the value to set @@ -205,7 +214,7 @@ public Builder username(String username) { return this; } /** - * The password to access Schema Registry using basic authentation. + * The password to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * **/ @@ -213,7 +222,7 @@ public Builder username(String username) { private String password; /** - * The password to access Schema Registry using basic authentation. + * The password to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * * @param password the value to set @@ -224,6 +233,30 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Kafka Schema Registry password is stored, + * The password to access Schema Registry using basic authentication. + * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Kafka Schema Registry password is stored, + * The password to access Schema Registry using basic authentication. + * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * The base64 encoded content of the TrustStore file. * @@ -242,6 +275,26 @@ public Builder trustStore(String trustStore) { this.__explicitlySet__.add("trustStore"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + * @param trustStoreSecretId the value to set + * @return this builder + **/ + public Builder trustStoreSecretId(String trustStoreSecretId) { + this.trustStoreSecretId = trustStoreSecretId; + this.__explicitlySet__.add("trustStoreSecretId"); + return this; + } /** * The TrustStore password. * @@ -260,6 +313,26 @@ public Builder trustStorePassword(String trustStorePassword) { this.__explicitlySet__.add("trustStorePassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @param trustStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder trustStorePasswordSecretId(String trustStorePasswordSecretId) { + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.__explicitlySet__.add("trustStorePasswordSecretId"); + return this; + } /** * The base64 encoded content of the KeyStore file. * @@ -278,6 +351,26 @@ public Builder keyStore(String keyStore) { this.__explicitlySet__.add("keyStore"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + * @param keyStoreSecretId the value to set + * @return this builder + **/ + public Builder keyStoreSecretId(String keyStoreSecretId) { + this.keyStoreSecretId = keyStoreSecretId; + this.__explicitlySet__.add("keyStoreSecretId"); + return this; + } /** * The KeyStore password. * @@ -296,6 +389,26 @@ public Builder keyStorePassword(String keyStorePassword) { this.__explicitlySet__.add("keyStorePassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @param keyStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder keyStorePasswordSecretId(String keyStorePasswordSecretId) { + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.__explicitlySet__.add("keyStorePasswordSecretId"); + return this; + } /** * The password for the cert inside the KeyStore. * In case it differs from the KeyStore password, it should be provided. @@ -316,6 +429,28 @@ public Builder sslKeyPassword(String sslKeyPassword) { this.__explicitlySet__.add("sslKeyPassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the cert inside the KeyStore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the cert inside the KeyStore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @param sslKeyPasswordSecretId the value to set + * @return this builder + **/ + public Builder sslKeyPasswordSecretId(String sslKeyPasswordSecretId) { + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; + this.__explicitlySet__.add("sslKeyPasswordSecretId"); + return this; + } /** * Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host * field, or make sure the host name is resolvable in the target VCN. @@ -366,16 +501,23 @@ public CreateKafkaSchemaRegistryConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.url, this.authenticationType, this.username, this.password, + this.passwordSecretId, this.trustStore, + this.trustStoreSecretId, this.trustStorePassword, + this.trustStorePasswordSecretId, this.keyStore, + this.keyStoreSecretId, this.keyStorePassword, + this.keyStorePasswordSecretId, this.sslKeyPassword, + this.sslKeyPasswordSecretId, this.privateIp); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -418,6 +560,9 @@ public Builder copy(CreateKafkaSchemaRegistryConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -433,21 +578,39 @@ public Builder copy(CreateKafkaSchemaRegistryConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("trustStore")) { this.trustStore(model.getTrustStore()); } + if (model.wasPropertyExplicitlySet("trustStoreSecretId")) { + this.trustStoreSecretId(model.getTrustStoreSecretId()); + } if (model.wasPropertyExplicitlySet("trustStorePassword")) { this.trustStorePassword(model.getTrustStorePassword()); } + if (model.wasPropertyExplicitlySet("trustStorePasswordSecretId")) { + this.trustStorePasswordSecretId(model.getTrustStorePasswordSecretId()); + } if (model.wasPropertyExplicitlySet("keyStore")) { this.keyStore(model.getKeyStore()); } + if (model.wasPropertyExplicitlySet("keyStoreSecretId")) { + this.keyStoreSecretId(model.getKeyStoreSecretId()); + } if (model.wasPropertyExplicitlySet("keyStorePassword")) { this.keyStorePassword(model.getKeyStorePassword()); } + if (model.wasPropertyExplicitlySet("keyStorePasswordSecretId")) { + this.keyStorePasswordSecretId(model.getKeyStorePasswordSecretId()); + } if (model.wasPropertyExplicitlySet("sslKeyPassword")) { this.sslKeyPassword(model.getSslKeyPassword()); } + if (model.wasPropertyExplicitlySet("sslKeyPasswordSecretId")) { + this.sslKeyPasswordSecretId(model.getSslKeyPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } @@ -479,16 +642,23 @@ public CreateKafkaSchemaRegistryConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, KafkaSchemaRegistryConnection.TechnologyType technologyType, String url, KafkaSchemaRegistryConnection.AuthenticationType authenticationType, String username, String password, + String passwordSecretId, String trustStore, + String trustStoreSecretId, String trustStorePassword, + String trustStorePasswordSecretId, String keyStore, + String keyStoreSecretId, String keyStorePassword, + String keyStorePasswordSecretId, String sslKeyPassword, + String sslKeyPasswordSecretId, String privateIp) { super( displayName, @@ -501,17 +671,24 @@ public CreateKafkaSchemaRegistryConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.url = url; this.authenticationType = authenticationType; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.trustStore = trustStore; + this.trustStoreSecretId = trustStoreSecretId; this.trustStorePassword = trustStorePassword; + this.trustStorePasswordSecretId = trustStorePasswordSecretId; this.keyStore = keyStore; + this.keyStoreSecretId = keyStoreSecretId; this.keyStorePassword = keyStorePassword; + this.keyStorePasswordSecretId = keyStorePasswordSecretId; this.sslKeyPassword = sslKeyPassword; + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; this.privateIp = privateIp; } @@ -566,7 +743,7 @@ public KafkaSchemaRegistryConnection.AuthenticationType getAuthenticationType() } /** - * The username to access Schema Registry using basic authentation. + * The username to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * **/ @@ -574,7 +751,7 @@ public KafkaSchemaRegistryConnection.AuthenticationType getAuthenticationType() private final String username; /** - * The username to access Schema Registry using basic authentation. + * The username to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * * @return the value @@ -584,7 +761,7 @@ public String getUsername() { } /** - * The password to access Schema Registry using basic authentation. + * The password to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * **/ @@ -592,7 +769,7 @@ public String getUsername() { private final String password; /** - * The password to access Schema Registry using basic authentation. + * The password to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * * @return the value @@ -601,6 +778,28 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Kafka Schema Registry password is stored, + * The password to access Schema Registry using basic authentication. + * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Kafka Schema Registry password is stored, + * The password to access Schema Registry using basic authentication. + * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * The base64 encoded content of the TrustStore file. * @@ -617,6 +816,24 @@ public String getTrustStore() { return trustStore; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private final String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + * @return the value + **/ + public String getTrustStoreSecretId() { + return trustStoreSecretId; + } + /** * The TrustStore password. * @@ -633,6 +850,24 @@ public String getTrustStorePassword() { return trustStorePassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private final String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @return the value + **/ + public String getTrustStorePasswordSecretId() { + return trustStorePasswordSecretId; + } + /** * The base64 encoded content of the KeyStore file. * @@ -649,6 +884,24 @@ public String getKeyStore() { return keyStore; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private final String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + * @return the value + **/ + public String getKeyStoreSecretId() { + return keyStoreSecretId; + } + /** * The KeyStore password. * @@ -665,6 +918,24 @@ public String getKeyStorePassword() { return keyStorePassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private final String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @return the value + **/ + public String getKeyStorePasswordSecretId() { + return keyStorePasswordSecretId; + } + /** * The password for the cert inside the KeyStore. * In case it differs from the KeyStore password, it should be provided. @@ -683,6 +954,26 @@ public String getSslKeyPassword() { return sslKeyPassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the cert inside the KeyStore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private final String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the cert inside the KeyStore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @return the value + **/ + public String getSslKeyPasswordSecretId() { + return sslKeyPasswordSecretId; + } + /** * Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host * field, or make sure the host name is resolvable in the target VCN. @@ -732,11 +1023,19 @@ public String toString(boolean includeByteArrayContents) { sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", trustStore=").append(String.valueOf(this.trustStore)); + sb.append(", trustStoreSecretId=").append(String.valueOf(this.trustStoreSecretId)); sb.append(", trustStorePassword=").append(""); + sb.append(", trustStorePasswordSecretId=") + .append(String.valueOf(this.trustStorePasswordSecretId)); sb.append(", keyStore=").append(String.valueOf(this.keyStore)); + sb.append(", keyStoreSecretId=").append(String.valueOf(this.keyStoreSecretId)); sb.append(", keyStorePassword=").append(""); + sb.append(", keyStorePasswordSecretId=") + .append(String.valueOf(this.keyStorePasswordSecretId)); sb.append(", sslKeyPassword=").append(""); + sb.append(", sslKeyPasswordSecretId=").append(String.valueOf(this.sslKeyPasswordSecretId)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(")"); return sb.toString(); @@ -758,11 +1057,20 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.trustStore, other.trustStore) + && java.util.Objects.equals(this.trustStoreSecretId, other.trustStoreSecretId) && java.util.Objects.equals(this.trustStorePassword, other.trustStorePassword) + && java.util.Objects.equals( + this.trustStorePasswordSecretId, other.trustStorePasswordSecretId) && java.util.Objects.equals(this.keyStore, other.keyStore) + && java.util.Objects.equals(this.keyStoreSecretId, other.keyStoreSecretId) && java.util.Objects.equals(this.keyStorePassword, other.keyStorePassword) + && java.util.Objects.equals( + this.keyStorePasswordSecretId, other.keyStorePasswordSecretId) && java.util.Objects.equals(this.sslKeyPassword, other.sslKeyPassword) + && java.util.Objects.equals( + this.sslKeyPasswordSecretId, other.sslKeyPasswordSecretId) && java.util.Objects.equals(this.privateIp, other.privateIp) && super.equals(other); } @@ -782,19 +1090,45 @@ public int hashCode() { : this.authenticationType.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.trustStore == null ? 43 : this.trustStore.hashCode()); + result = + (result * PRIME) + + (this.trustStoreSecretId == null + ? 43 + : this.trustStoreSecretId.hashCode()); result = (result * PRIME) + (this.trustStorePassword == null ? 43 : this.trustStorePassword.hashCode()); + result = + (result * PRIME) + + (this.trustStorePasswordSecretId == null + ? 43 + : this.trustStorePasswordSecretId.hashCode()); result = (result * PRIME) + (this.keyStore == null ? 43 : this.keyStore.hashCode()); + result = + (result * PRIME) + + (this.keyStoreSecretId == null ? 43 : this.keyStoreSecretId.hashCode()); result = (result * PRIME) + (this.keyStorePassword == null ? 43 : this.keyStorePassword.hashCode()); + result = + (result * PRIME) + + (this.keyStorePasswordSecretId == null + ? 43 + : this.keyStorePasswordSecretId.hashCode()); result = (result * PRIME) + (this.sslKeyPassword == null ? 43 : this.sslKeyPassword.hashCode()); + result = + (result * PRIME) + + (this.sslKeyPasswordSecretId == null + ? 43 + : this.sslKeyPasswordSecretId.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateMicrosoftSqlserverConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateMicrosoftSqlserverConnectionDetails.java index 3c55364d362..b84240ac6e4 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateMicrosoftSqlserverConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateMicrosoftSqlserverConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Microsoft SQL Server technology type. **/ @@ -235,6 +244,26 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated Microsoft SQL Server. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated Microsoft SQL Server. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * An array of name-value pair attribute entries. * Used as additional parameters in connection string. @@ -360,12 +389,14 @@ public CreateMicrosoftSqlserverConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.databaseName, this.host, this.port, this.username, this.password, + this.passwordSecretId, this.additionalAttributes, this.securityProtocol, this.sslCa, @@ -412,6 +443,9 @@ public Builder copy(CreateMicrosoftSqlserverConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -430,6 +464,9 @@ public Builder copy(CreateMicrosoftSqlserverConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("additionalAttributes")) { this.additionalAttributes(model.getAdditionalAttributes()); } @@ -473,12 +510,14 @@ public CreateMicrosoftSqlserverConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, MicrosoftSqlserverConnection.TechnologyType technologyType, String databaseName, String host, Integer port, String username, String password, + String passwordSecretId, java.util.List additionalAttributes, MicrosoftSqlserverConnection.SecurityProtocol securityProtocol, String sslCa, @@ -495,13 +534,15 @@ public CreateMicrosoftSqlserverConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.databaseName = databaseName; this.host = host; this.port = port; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.additionalAttributes = additionalAttributes; this.securityProtocol = securityProtocol; this.sslCa = sslCa; @@ -605,6 +646,24 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated Microsoft SQL Server. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated Microsoft SQL Server. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * An array of name-value pair attribute entries. * Used as additional parameters in connection string. @@ -721,6 +780,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", port=").append(String.valueOf(this.port)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", additionalAttributes=").append(String.valueOf(this.additionalAttributes)); sb.append(", securityProtocol=").append(String.valueOf(this.securityProtocol)); sb.append(", sslCa=").append(String.valueOf(this.sslCa)); @@ -748,6 +808,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.port, other.port) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.additionalAttributes, other.additionalAttributes) && java.util.Objects.equals(this.securityProtocol, other.securityProtocol) && java.util.Objects.equals(this.sslCa, other.sslCa) @@ -769,6 +830,9 @@ public int hashCode() { result = (result * PRIME) + (this.port == null ? 43 : this.port.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.additionalAttributes == null diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateMongoDbConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateMongoDbConnectionDetails.java index 38f5ab0a16d..dc9bf94eb7d 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateMongoDbConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateMongoDbConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The MongoDB technology type. **/ @@ -201,6 +210,26 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated database. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated database. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Autonomous Json Database. * @@ -237,10 +266,12 @@ public CreateMongoDbConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.connectionString, this.username, this.password, + this.passwordSecretId, this.databaseId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -283,6 +314,9 @@ public Builder copy(CreateMongoDbConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -295,6 +329,9 @@ public Builder copy(CreateMongoDbConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("databaseId")) { this.databaseId(model.getDatabaseId()); } @@ -326,10 +363,12 @@ public CreateMongoDbConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, MongoDbConnection.TechnologyType technologyType, String connectionString, String username, String password, + String passwordSecretId, String databaseId) { super( displayName, @@ -342,11 +381,13 @@ public CreateMongoDbConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.connectionString = connectionString; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.databaseId = databaseId; } @@ -416,6 +457,24 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated database. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated database. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Autonomous Json Database. * @@ -450,6 +509,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", connectionString=").append(String.valueOf(this.connectionString)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", databaseId=").append(String.valueOf(this.databaseId)); sb.append(")"); return sb.toString(); @@ -469,6 +529,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.connectionString, other.connectionString) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.databaseId, other.databaseId) && super.equals(other); } @@ -485,6 +546,9 @@ public int hashCode() { + (this.connectionString == null ? 43 : this.connectionString.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.databaseId == null ? 43 : this.databaseId.hashCode()); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateMysqlConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateMysqlConnectionDetails.java index 34ce186c380..8a131d2cbc6 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateMysqlConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateMysqlConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The MySQL technology type. **/ @@ -185,6 +194,32 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * The name or address of a host. * @@ -349,6 +384,28 @@ public Builder sslKey(String sslKey) { this.__explicitlySet__.add("sslKey"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key + * - The content of a .pem or .crt file containing the client private key (for 2-way SSL). + * Note: When provided, 'sslKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeySecretId") + private String sslKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key + * - The content of a .pem or .crt file containing the client private key (for 2-way SSL). + * Note: When provided, 'sslKey' field must not be provided. + * + * @param sslKeySecretId the value to set + * @return this builder + **/ + public Builder sslKeySecretId(String sslKeySecretId) { + this.sslKeySecretId = sslKeySecretId; + this.__explicitlySet__.add("sslKeySecretId"); + return this; + } /** * Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host * field, or make sure the host name is resolvable in the target VCN. @@ -437,9 +494,11 @@ public CreateMysqlConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.username, this.password, + this.passwordSecretId, this.host, this.port, this.databaseName, @@ -449,6 +508,7 @@ public CreateMysqlConnectionDetails build() { this.sslCrl, this.sslCert, this.sslKey, + this.sslKeySecretId, this.privateIp, this.additionalAttributes, this.dbSystemId); @@ -493,6 +553,9 @@ public Builder copy(CreateMysqlConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -502,6 +565,9 @@ public Builder copy(CreateMysqlConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("host")) { this.host(model.getHost()); } @@ -529,6 +595,9 @@ public Builder copy(CreateMysqlConnectionDetails model) { if (model.wasPropertyExplicitlySet("sslKey")) { this.sslKey(model.getSslKey()); } + if (model.wasPropertyExplicitlySet("sslKeySecretId")) { + this.sslKeySecretId(model.getSslKeySecretId()); + } if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } @@ -566,9 +635,11 @@ public CreateMysqlConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, MysqlConnection.TechnologyType technologyType, String username, String password, + String passwordSecretId, String host, Integer port, String databaseName, @@ -578,6 +649,7 @@ public CreateMysqlConnectionDetails( String sslCrl, String sslCert, String sslKey, + String sslKeySecretId, String privateIp, java.util.List additionalAttributes, String dbSystemId) { @@ -592,10 +664,12 @@ public CreateMysqlConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.host = host; this.port = port; this.databaseName = databaseName; @@ -605,6 +679,7 @@ public CreateMysqlConnectionDetails( this.sslCrl = sslCrl; this.sslCert = sslCert; this.sslKey = sslKey; + this.sslKeySecretId = sslKeySecretId; this.privateIp = privateIp; this.additionalAttributes = additionalAttributes; this.dbSystemId = dbSystemId; @@ -662,6 +737,30 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * The name or address of a host. * @@ -808,6 +907,26 @@ public String getSslKey() { return sslKey; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key + * - The content of a .pem or .crt file containing the client private key (for 2-way SSL). + * Note: When provided, 'sslKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeySecretId") + private final String sslKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key + * - The content of a .pem or .crt file containing the client private key (for 2-way SSL). + * Note: When provided, 'sslKey' field must not be provided. + * + * @return the value + **/ + public String getSslKeySecretId() { + return sslKeySecretId; + } + /** * Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host * field, or make sure the host name is resolvable in the target VCN. @@ -889,6 +1008,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", technologyType=").append(String.valueOf(this.technologyType)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", host=").append(String.valueOf(this.host)); sb.append(", port=").append(String.valueOf(this.port)); sb.append(", databaseName=").append(String.valueOf(this.databaseName)); @@ -898,6 +1018,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", sslCrl=").append(String.valueOf(this.sslCrl)); sb.append(", sslCert=").append(String.valueOf(this.sslCert)); sb.append(", sslKey=").append(String.valueOf(this.sslKey)); + sb.append(", sslKeySecretId=").append(String.valueOf(this.sslKeySecretId)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(", additionalAttributes=").append(String.valueOf(this.additionalAttributes)); sb.append(", dbSystemId=").append(String.valueOf(this.dbSystemId)); @@ -918,6 +1039,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.technologyType, other.technologyType) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.host, other.host) && java.util.Objects.equals(this.port, other.port) && java.util.Objects.equals(this.databaseName, other.databaseName) @@ -927,6 +1049,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.sslCrl, other.sslCrl) && java.util.Objects.equals(this.sslCert, other.sslCert) && java.util.Objects.equals(this.sslKey, other.sslKey) + && java.util.Objects.equals(this.sslKeySecretId, other.sslKeySecretId) && java.util.Objects.equals(this.privateIp, other.privateIp) && java.util.Objects.equals(this.additionalAttributes, other.additionalAttributes) && java.util.Objects.equals(this.dbSystemId, other.dbSystemId) @@ -942,6 +1065,9 @@ public int hashCode() { + (this.technologyType == null ? 43 : this.technologyType.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.host == null ? 43 : this.host.hashCode()); result = (result * PRIME) + (this.port == null ? 43 : this.port.hashCode()); result = (result * PRIME) + (this.databaseName == null ? 43 : this.databaseName.hashCode()); @@ -953,6 +1079,9 @@ public int hashCode() { result = (result * PRIME) + (this.sslCrl == null ? 43 : this.sslCrl.hashCode()); result = (result * PRIME) + (this.sslCert == null ? 43 : this.sslCert.hashCode()); result = (result * PRIME) + (this.sslKey == null ? 43 : this.sslKey.hashCode()); + result = + (result * PRIME) + + (this.sslKeySecretId == null ? 43 : this.sslKeySecretId.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); result = (result * PRIME) diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateOciObjectStorageConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateOciObjectStorageConnectionDetails.java index da0492f4d1c..7a844881797 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateOciObjectStorageConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateOciObjectStorageConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The OCI Object Storage technology type. **/ @@ -219,6 +228,28 @@ public Builder privateKeyFile(String privateKeyFile) { this.__explicitlySet__.add("privateKeyFile"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @param privateKeyFileSecretId the value to set + * @return this builder + **/ + public Builder privateKeyFileSecretId(String privateKeyFileSecretId) { + this.privateKeyFileSecretId = privateKeyFileSecretId; + this.__explicitlySet__.add("privateKeyFileSecretId"); + return this; + } /** * The passphrase of the private key. * @@ -237,6 +268,26 @@ public Builder privateKeyPassphrase(String privateKeyPassphrase) { this.__explicitlySet__.add("privateKeyPassphrase"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @param privateKeyPassphraseSecretId the value to set + * @return this builder + **/ + public Builder privateKeyPassphraseSecretId(String privateKeyPassphraseSecretId) { + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; + this.__explicitlySet__.add("privateKeyPassphraseSecretId"); + return this; + } /** * The fingerprint of the API Key of the user specified by the userId. * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm @@ -275,12 +326,15 @@ public CreateOciObjectStorageConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.tenancyId, this.region, this.userId, this.privateKeyFile, + this.privateKeyFileSecretId, this.privateKeyPassphrase, + this.privateKeyPassphraseSecretId, this.publicKeyFingerprint); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -323,6 +377,9 @@ public Builder copy(CreateOciObjectStorageConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -338,9 +395,15 @@ public Builder copy(CreateOciObjectStorageConnectionDetails model) { if (model.wasPropertyExplicitlySet("privateKeyFile")) { this.privateKeyFile(model.getPrivateKeyFile()); } + if (model.wasPropertyExplicitlySet("privateKeyFileSecretId")) { + this.privateKeyFileSecretId(model.getPrivateKeyFileSecretId()); + } if (model.wasPropertyExplicitlySet("privateKeyPassphrase")) { this.privateKeyPassphrase(model.getPrivateKeyPassphrase()); } + if (model.wasPropertyExplicitlySet("privateKeyPassphraseSecretId")) { + this.privateKeyPassphraseSecretId(model.getPrivateKeyPassphraseSecretId()); + } if (model.wasPropertyExplicitlySet("publicKeyFingerprint")) { this.publicKeyFingerprint(model.getPublicKeyFingerprint()); } @@ -372,12 +435,15 @@ public CreateOciObjectStorageConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, OciObjectStorageConnection.TechnologyType technologyType, String tenancyId, String region, String userId, String privateKeyFile, + String privateKeyFileSecretId, String privateKeyPassphrase, + String privateKeyPassphraseSecretId, String publicKeyFingerprint) { super( displayName, @@ -390,13 +456,16 @@ public CreateOciObjectStorageConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.tenancyId = tenancyId; this.region = region; this.userId = userId; this.privateKeyFile = privateKeyFile; + this.privateKeyFileSecretId = privateKeyFileSecretId; this.privateKeyPassphrase = privateKeyPassphrase; + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; this.publicKeyFingerprint = publicKeyFingerprint; } @@ -482,6 +551,26 @@ public String getPrivateKeyFile() { return privateKeyFile; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private final String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyFileSecretId() { + return privateKeyFileSecretId; + } + /** * The passphrase of the private key. * @@ -498,6 +587,24 @@ public String getPrivateKeyPassphrase() { return privateKeyPassphrase; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private final String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyPassphraseSecretId() { + return privateKeyPassphraseSecretId; + } + /** * The fingerprint of the API Key of the user specified by the userId. * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm @@ -535,7 +642,10 @@ public String toString(boolean includeByteArrayContents) { sb.append(", region=").append(String.valueOf(this.region)); sb.append(", userId=").append(String.valueOf(this.userId)); sb.append(", privateKeyFile=").append(String.valueOf(this.privateKeyFile)); + sb.append(", privateKeyFileSecretId=").append(String.valueOf(this.privateKeyFileSecretId)); sb.append(", privateKeyPassphrase=").append(""); + sb.append(", privateKeyPassphraseSecretId=") + .append(String.valueOf(this.privateKeyPassphraseSecretId)); sb.append(", publicKeyFingerprint=").append(String.valueOf(this.publicKeyFingerprint)); sb.append(")"); return sb.toString(); @@ -556,7 +666,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.region, other.region) && java.util.Objects.equals(this.userId, other.userId) && java.util.Objects.equals(this.privateKeyFile, other.privateKeyFile) + && java.util.Objects.equals( + this.privateKeyFileSecretId, other.privateKeyFileSecretId) && java.util.Objects.equals(this.privateKeyPassphrase, other.privateKeyPassphrase) + && java.util.Objects.equals( + this.privateKeyPassphraseSecretId, other.privateKeyPassphraseSecretId) && java.util.Objects.equals(this.publicKeyFingerprint, other.publicKeyFingerprint) && super.equals(other); } @@ -574,11 +688,21 @@ public int hashCode() { result = (result * PRIME) + (this.privateKeyFile == null ? 43 : this.privateKeyFile.hashCode()); + result = + (result * PRIME) + + (this.privateKeyFileSecretId == null + ? 43 + : this.privateKeyFileSecretId.hashCode()); result = (result * PRIME) + (this.privateKeyPassphrase == null ? 43 : this.privateKeyPassphrase.hashCode()); + result = + (result * PRIME) + + (this.privateKeyPassphraseSecretId == null + ? 43 + : this.privateKeyPassphraseSecretId.hashCode()); result = (result * PRIME) + (this.publicKeyFingerprint == null diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateOggDeploymentDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateOggDeploymentDetails.java index 4eeb768a4f2..b41872b8b4a 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateOggDeploymentDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateOggDeploymentDetails.java @@ -32,7 +32,8 @@ public final class CreateOggDeploymentDetails "adminPassword", "certificate", "key", - "oggVersion" + "oggVersion", + "groupToRolesMapping" }) public CreateOggDeploymentDetails( String deploymentName, @@ -43,7 +44,8 @@ public CreateOggDeploymentDetails( String adminPassword, String certificate, String key, - String oggVersion) { + String oggVersion, + GroupToRolesMappingDetails groupToRolesMapping) { super(); this.deploymentName = deploymentName; this.credentialStore = credentialStore; @@ -54,6 +56,7 @@ public CreateOggDeploymentDetails( this.certificate = certificate; this.key = key; this.oggVersion = oggVersion; + this.groupToRolesMapping = groupToRolesMapping; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -229,6 +232,15 @@ public Builder oggVersion(String oggVersion) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("groupToRolesMapping") + private GroupToRolesMappingDetails groupToRolesMapping; + + public Builder groupToRolesMapping(GroupToRolesMappingDetails groupToRolesMapping) { + this.groupToRolesMapping = groupToRolesMapping; + this.__explicitlySet__.add("groupToRolesMapping"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -243,7 +255,8 @@ public CreateOggDeploymentDetails build() { this.adminPassword, this.certificate, this.key, - this.oggVersion); + this.oggVersion, + this.groupToRolesMapping); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -279,6 +292,9 @@ public Builder copy(CreateOggDeploymentDetails model) { if (model.wasPropertyExplicitlySet("oggVersion")) { this.oggVersion(model.getOggVersion()); } + if (model.wasPropertyExplicitlySet("groupToRolesMapping")) { + this.groupToRolesMapping(model.getGroupToRolesMapping()); + } return this; } } @@ -446,6 +462,13 @@ public String getOggVersion() { return oggVersion; } + @com.fasterxml.jackson.annotation.JsonProperty("groupToRolesMapping") + private final GroupToRolesMappingDetails groupToRolesMapping; + + public GroupToRolesMappingDetails getGroupToRolesMapping() { + return groupToRolesMapping; + } + @Override public String toString() { return this.toString(true); @@ -469,6 +492,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", certificate=").append(String.valueOf(this.certificate)); sb.append(", key=").append(String.valueOf(this.key)); sb.append(", oggVersion=").append(String.valueOf(this.oggVersion)); + sb.append(", groupToRolesMapping=").append(String.valueOf(this.groupToRolesMapping)); sb.append(")"); return sb.toString(); } @@ -492,6 +516,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.certificate, other.certificate) && java.util.Objects.equals(this.key, other.key) && java.util.Objects.equals(this.oggVersion, other.oggVersion) + && java.util.Objects.equals(this.groupToRolesMapping, other.groupToRolesMapping) && super.equals(other); } @@ -520,6 +545,11 @@ public int hashCode() { result = (result * PRIME) + (this.certificate == null ? 43 : this.certificate.hashCode()); result = (result * PRIME) + (this.key == null ? 43 : this.key.hashCode()); result = (result * PRIME) + (this.oggVersion == null ? 43 : this.oggVersion.hashCode()); + result = + (result * PRIME) + + (this.groupToRolesMapping == null + ? 43 + : this.groupToRolesMapping.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateOracleConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateOracleConnectionDetails.java index 669a82ed394..2322c97f1f8 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateOracleConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateOracleConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Oracle technology type. **/ @@ -185,6 +194,32 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * Connect descriptor or Easy Connect Naming method used to connect to a database. * @@ -224,16 +259,16 @@ public Builder authenticationMode(OracleConnection.AuthenticationMode authentica return this; } /** - * The wallet contents Oracle GoldenGate uses to make connections to a database. This - * attribute is expected to be base64 encoded. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * This attribute is expected to be base64 encoded. * **/ @com.fasterxml.jackson.annotation.JsonProperty("wallet") private String wallet; /** - * The wallet contents Oracle GoldenGate uses to make connections to a database. This - * attribute is expected to be base64 encoded. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * This attribute is expected to be base64 encoded. * * @param wallet the value to set * @return this builder @@ -243,6 +278,28 @@ public Builder wallet(String wallet) { this.__explicitlySet__.add("wallet"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the wallet file is stored. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * Note: When provided, 'wallet' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("walletSecretId") + private String walletSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the wallet file is stored. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * Note: When provided, 'wallet' field must not be provided. + * + * @param walletSecretId the value to set + * @return this builder + **/ + public Builder walletSecretId(String walletSecretId) { + this.walletSecretId = walletSecretId; + this.__explicitlySet__.add("walletSecretId"); + return this; + } /** * The mode of the database connection session to be established by the data client. * 'REDIRECT' - for a RAC database, 'DIRECT' - for a non-RAC database. @@ -335,12 +392,15 @@ public CreateOracleConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.username, this.password, + this.passwordSecretId, this.connectionString, this.authenticationMode, this.wallet, + this.walletSecretId, this.sessionMode, this.privateIp, this.databaseId); @@ -385,6 +445,9 @@ public Builder copy(CreateOracleConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -394,6 +457,9 @@ public Builder copy(CreateOracleConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("connectionString")) { this.connectionString(model.getConnectionString()); } @@ -403,6 +469,9 @@ public Builder copy(CreateOracleConnectionDetails model) { if (model.wasPropertyExplicitlySet("wallet")) { this.wallet(model.getWallet()); } + if (model.wasPropertyExplicitlySet("walletSecretId")) { + this.walletSecretId(model.getWalletSecretId()); + } if (model.wasPropertyExplicitlySet("sessionMode")) { this.sessionMode(model.getSessionMode()); } @@ -440,12 +509,15 @@ public CreateOracleConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, OracleConnection.TechnologyType technologyType, String username, String password, + String passwordSecretId, String connectionString, OracleConnection.AuthenticationMode authenticationMode, String wallet, + String walletSecretId, OracleConnection.SessionMode sessionMode, String privateIp, String databaseId) { @@ -460,13 +532,16 @@ public CreateOracleConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.connectionString = connectionString; this.authenticationMode = authenticationMode; this.wallet = wallet; + this.walletSecretId = walletSecretId; this.sessionMode = sessionMode; this.privateIp = privateIp; this.databaseId = databaseId; @@ -524,6 +599,30 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * Connect descriptor or Easy Connect Naming method used to connect to a database. * @@ -559,16 +658,16 @@ public OracleConnection.AuthenticationMode getAuthenticationMode() { } /** - * The wallet contents Oracle GoldenGate uses to make connections to a database. This - * attribute is expected to be base64 encoded. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * This attribute is expected to be base64 encoded. * **/ @com.fasterxml.jackson.annotation.JsonProperty("wallet") private final String wallet; /** - * The wallet contents Oracle GoldenGate uses to make connections to a database. This - * attribute is expected to be base64 encoded. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * This attribute is expected to be base64 encoded. * * @return the value **/ @@ -576,6 +675,26 @@ public String getWallet() { return wallet; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the wallet file is stored. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * Note: When provided, 'wallet' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("walletSecretId") + private final String walletSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the wallet file is stored. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * Note: When provided, 'wallet' field must not be provided. + * + * @return the value + **/ + public String getWalletSecretId() { + return walletSecretId; + } + /** * The mode of the database connection session to be established by the data client. * 'REDIRECT' - for a RAC database, 'DIRECT' - for a non-RAC database. @@ -661,9 +780,11 @@ public String toString(boolean includeByteArrayContents) { sb.append(", technologyType=").append(String.valueOf(this.technologyType)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", connectionString=").append(String.valueOf(this.connectionString)); sb.append(", authenticationMode=").append(String.valueOf(this.authenticationMode)); sb.append(", wallet=").append(String.valueOf(this.wallet)); + sb.append(", walletSecretId=").append(String.valueOf(this.walletSecretId)); sb.append(", sessionMode=").append(String.valueOf(this.sessionMode)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(", databaseId=").append(String.valueOf(this.databaseId)); @@ -684,9 +805,11 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.technologyType, other.technologyType) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.connectionString, other.connectionString) && java.util.Objects.equals(this.authenticationMode, other.authenticationMode) && java.util.Objects.equals(this.wallet, other.wallet) + && java.util.Objects.equals(this.walletSecretId, other.walletSecretId) && java.util.Objects.equals(this.sessionMode, other.sessionMode) && java.util.Objects.equals(this.privateIp, other.privateIp) && java.util.Objects.equals(this.databaseId, other.databaseId) @@ -702,6 +825,9 @@ public int hashCode() { + (this.technologyType == null ? 43 : this.technologyType.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.connectionString == null ? 43 : this.connectionString.hashCode()); @@ -711,6 +837,9 @@ public int hashCode() { ? 43 : this.authenticationMode.hashCode()); result = (result * PRIME) + (this.wallet == null ? 43 : this.wallet.hashCode()); + result = + (result * PRIME) + + (this.walletSecretId == null ? 43 : this.walletSecretId.hashCode()); result = (result * PRIME) + (this.sessionMode == null ? 43 : this.sessionMode.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); result = (result * PRIME) + (this.databaseId == null ? 43 : this.databaseId.hashCode()); diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateOracleNosqlConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateOracleNosqlConnectionDetails.java index 9cb1bffdee1..ee9189b2632 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateOracleNosqlConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateOracleNosqlConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Oracle NoSQL technology type. **/ @@ -219,6 +228,28 @@ public Builder privateKeyFile(String privateKeyFile) { this.__explicitlySet__.add("privateKeyFile"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @param privateKeyFileSecretId the value to set + * @return this builder + **/ + public Builder privateKeyFileSecretId(String privateKeyFileSecretId) { + this.privateKeyFileSecretId = privateKeyFileSecretId; + this.__explicitlySet__.add("privateKeyFileSecretId"); + return this; + } /** * The passphrase of the private key. * @@ -237,6 +268,26 @@ public Builder privateKeyPassphrase(String privateKeyPassphrase) { this.__explicitlySet__.add("privateKeyPassphrase"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @param privateKeyPassphraseSecretId the value to set + * @return this builder + **/ + public Builder privateKeyPassphraseSecretId(String privateKeyPassphraseSecretId) { + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; + this.__explicitlySet__.add("privateKeyPassphraseSecretId"); + return this; + } /** * The fingerprint of the API Key of the user specified by the userId. * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm @@ -275,12 +326,15 @@ public CreateOracleNosqlConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.tenancyId, this.region, this.userId, this.privateKeyFile, + this.privateKeyFileSecretId, this.privateKeyPassphrase, + this.privateKeyPassphraseSecretId, this.publicKeyFingerprint); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -323,6 +377,9 @@ public Builder copy(CreateOracleNosqlConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -338,9 +395,15 @@ public Builder copy(CreateOracleNosqlConnectionDetails model) { if (model.wasPropertyExplicitlySet("privateKeyFile")) { this.privateKeyFile(model.getPrivateKeyFile()); } + if (model.wasPropertyExplicitlySet("privateKeyFileSecretId")) { + this.privateKeyFileSecretId(model.getPrivateKeyFileSecretId()); + } if (model.wasPropertyExplicitlySet("privateKeyPassphrase")) { this.privateKeyPassphrase(model.getPrivateKeyPassphrase()); } + if (model.wasPropertyExplicitlySet("privateKeyPassphraseSecretId")) { + this.privateKeyPassphraseSecretId(model.getPrivateKeyPassphraseSecretId()); + } if (model.wasPropertyExplicitlySet("publicKeyFingerprint")) { this.publicKeyFingerprint(model.getPublicKeyFingerprint()); } @@ -372,12 +435,15 @@ public CreateOracleNosqlConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, OracleNosqlConnection.TechnologyType technologyType, String tenancyId, String region, String userId, String privateKeyFile, + String privateKeyFileSecretId, String privateKeyPassphrase, + String privateKeyPassphraseSecretId, String publicKeyFingerprint) { super( displayName, @@ -390,13 +456,16 @@ public CreateOracleNosqlConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.tenancyId = tenancyId; this.region = region; this.userId = userId; this.privateKeyFile = privateKeyFile; + this.privateKeyFileSecretId = privateKeyFileSecretId; this.privateKeyPassphrase = privateKeyPassphrase; + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; this.publicKeyFingerprint = publicKeyFingerprint; } @@ -482,6 +551,26 @@ public String getPrivateKeyFile() { return privateKeyFile; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private final String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyFileSecretId() { + return privateKeyFileSecretId; + } + /** * The passphrase of the private key. * @@ -498,6 +587,24 @@ public String getPrivateKeyPassphrase() { return privateKeyPassphrase; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private final String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyPassphraseSecretId() { + return privateKeyPassphraseSecretId; + } + /** * The fingerprint of the API Key of the user specified by the userId. * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm @@ -535,7 +642,10 @@ public String toString(boolean includeByteArrayContents) { sb.append(", region=").append(String.valueOf(this.region)); sb.append(", userId=").append(String.valueOf(this.userId)); sb.append(", privateKeyFile=").append(String.valueOf(this.privateKeyFile)); + sb.append(", privateKeyFileSecretId=").append(String.valueOf(this.privateKeyFileSecretId)); sb.append(", privateKeyPassphrase=").append(""); + sb.append(", privateKeyPassphraseSecretId=") + .append(String.valueOf(this.privateKeyPassphraseSecretId)); sb.append(", publicKeyFingerprint=").append(String.valueOf(this.publicKeyFingerprint)); sb.append(")"); return sb.toString(); @@ -556,7 +666,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.region, other.region) && java.util.Objects.equals(this.userId, other.userId) && java.util.Objects.equals(this.privateKeyFile, other.privateKeyFile) + && java.util.Objects.equals( + this.privateKeyFileSecretId, other.privateKeyFileSecretId) && java.util.Objects.equals(this.privateKeyPassphrase, other.privateKeyPassphrase) + && java.util.Objects.equals( + this.privateKeyPassphraseSecretId, other.privateKeyPassphraseSecretId) && java.util.Objects.equals(this.publicKeyFingerprint, other.publicKeyFingerprint) && super.equals(other); } @@ -574,11 +688,21 @@ public int hashCode() { result = (result * PRIME) + (this.privateKeyFile == null ? 43 : this.privateKeyFile.hashCode()); + result = + (result * PRIME) + + (this.privateKeyFileSecretId == null + ? 43 + : this.privateKeyFileSecretId.hashCode()); result = (result * PRIME) + (this.privateKeyPassphrase == null ? 43 : this.privateKeyPassphrase.hashCode()); + result = + (result * PRIME) + + (this.privateKeyPassphraseSecretId == null + ? 43 + : this.privateKeyPassphraseSecretId.hashCode()); result = (result * PRIME) + (this.publicKeyFingerprint == null diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreatePostgresqlConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreatePostgresqlConnectionDetails.java index 09164a20d6f..08a67fece45 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreatePostgresqlConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreatePostgresqlConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The PostgreSQL technology type. **/ @@ -239,6 +248,32 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * An array of name-value pair attribute entries. * Used as additional parameters in connection string. @@ -365,6 +400,26 @@ public Builder sslKey(String sslKey) { this.__explicitlySet__.add("sslKey"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the private key of the PostgreSQL server. The supported file formats are .pem and .crt. + * Note: When provided, 'sslKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeySecretId") + private String sslKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the private key of the PostgreSQL server. The supported file formats are .pem and .crt. + * Note: When provided, 'sslKey' field must not be provided. + * + * @param sslKeySecretId the value to set + * @return this builder + **/ + public Builder sslKeySecretId(String sslKeySecretId) { + this.sslKeySecretId = sslKeySecretId; + this.__explicitlySet__.add("sslKeySecretId"); + return this; + } /** * Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host * field, or make sure the host name is resolvable in the target VCN. @@ -433,12 +488,14 @@ public CreatePostgresqlConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.databaseName, this.host, this.port, this.username, this.password, + this.passwordSecretId, this.additionalAttributes, this.securityProtocol, this.sslMode, @@ -446,6 +503,7 @@ public CreatePostgresqlConnectionDetails build() { this.sslCrl, this.sslCert, this.sslKey, + this.sslKeySecretId, this.privateIp, this.dbSystemId); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -489,6 +547,9 @@ public Builder copy(CreatePostgresqlConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -507,6 +568,9 @@ public Builder copy(CreatePostgresqlConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("additionalAttributes")) { this.additionalAttributes(model.getAdditionalAttributes()); } @@ -528,6 +592,9 @@ public Builder copy(CreatePostgresqlConnectionDetails model) { if (model.wasPropertyExplicitlySet("sslKey")) { this.sslKey(model.getSslKey()); } + if (model.wasPropertyExplicitlySet("sslKeySecretId")) { + this.sslKeySecretId(model.getSslKeySecretId()); + } if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } @@ -562,12 +629,14 @@ public CreatePostgresqlConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, PostgresqlConnection.TechnologyType technologyType, String databaseName, String host, Integer port, String username, String password, + String passwordSecretId, java.util.List additionalAttributes, PostgresqlConnection.SecurityProtocol securityProtocol, PostgresqlConnection.SslMode sslMode, @@ -575,6 +644,7 @@ public CreatePostgresqlConnectionDetails( String sslCrl, String sslCert, String sslKey, + String sslKeySecretId, String privateIp, String dbSystemId) { super( @@ -588,13 +658,15 @@ public CreatePostgresqlConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.databaseName = databaseName; this.host = host; this.port = port; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.additionalAttributes = additionalAttributes; this.securityProtocol = securityProtocol; this.sslMode = sslMode; @@ -602,6 +674,7 @@ public CreatePostgresqlConnectionDetails( this.sslCrl = sslCrl; this.sslCert = sslCert; this.sslKey = sslKey; + this.sslKeySecretId = sslKeySecretId; this.privateIp = privateIp; this.dbSystemId = dbSystemId; } @@ -706,6 +779,30 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * An array of name-value pair attribute entries. * Used as additional parameters in connection string. @@ -818,6 +915,24 @@ public String getSslKey() { return sslKey; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the private key of the PostgreSQL server. The supported file formats are .pem and .crt. + * Note: When provided, 'sslKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeySecretId") + private final String sslKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the private key of the PostgreSQL server. The supported file formats are .pem and .crt. + * Note: When provided, 'sslKey' field must not be provided. + * + * @return the value + **/ + public String getSslKeySecretId() { + return sslKeySecretId; + } + /** * Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host * field, or make sure the host name is resolvable in the target VCN. @@ -884,6 +999,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", port=").append(String.valueOf(this.port)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", additionalAttributes=").append(String.valueOf(this.additionalAttributes)); sb.append(", securityProtocol=").append(String.valueOf(this.securityProtocol)); sb.append(", sslMode=").append(String.valueOf(this.sslMode)); @@ -891,6 +1007,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", sslCrl=").append(String.valueOf(this.sslCrl)); sb.append(", sslCert=").append(String.valueOf(this.sslCert)); sb.append(", sslKey=").append(String.valueOf(this.sslKey)); + sb.append(", sslKeySecretId=").append(String.valueOf(this.sslKeySecretId)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(", dbSystemId=").append(String.valueOf(this.dbSystemId)); sb.append(")"); @@ -913,6 +1030,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.port, other.port) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.additionalAttributes, other.additionalAttributes) && java.util.Objects.equals(this.securityProtocol, other.securityProtocol) && java.util.Objects.equals(this.sslMode, other.sslMode) @@ -920,6 +1038,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.sslCrl, other.sslCrl) && java.util.Objects.equals(this.sslCert, other.sslCert) && java.util.Objects.equals(this.sslKey, other.sslKey) + && java.util.Objects.equals(this.sslKeySecretId, other.sslKeySecretId) && java.util.Objects.equals(this.privateIp, other.privateIp) && java.util.Objects.equals(this.dbSystemId, other.dbSystemId) && super.equals(other); @@ -937,6 +1056,9 @@ public int hashCode() { result = (result * PRIME) + (this.port == null ? 43 : this.port.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.additionalAttributes == null @@ -950,6 +1072,9 @@ public int hashCode() { result = (result * PRIME) + (this.sslCrl == null ? 43 : this.sslCrl.hashCode()); result = (result * PRIME) + (this.sslCert == null ? 43 : this.sslCert.hashCode()); result = (result * PRIME) + (this.sslKey == null ? 43 : this.sslKey.hashCode()); + result = + (result * PRIME) + + (this.sslKeySecretId == null ? 43 : this.sslKeySecretId.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); result = (result * PRIME) + (this.dbSystemId == null ? 43 : this.dbSystemId.hashCode()); return result; diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateRedisConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateRedisConnectionDetails.java index faabb7b1dd5..ee795da7448 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateRedisConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateRedisConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Redis technology type. **/ @@ -241,6 +250,32 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * The base64 encoded content of the TrustStore file. * @@ -259,6 +294,26 @@ public Builder trustStore(String trustStore) { this.__explicitlySet__.add("trustStore"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + * @param trustStoreSecretId the value to set + * @return this builder + **/ + public Builder trustStoreSecretId(String trustStoreSecretId) { + this.trustStoreSecretId = trustStoreSecretId; + this.__explicitlySet__.add("trustStoreSecretId"); + return this; + } /** * The TrustStore password. * @@ -277,6 +332,26 @@ public Builder trustStorePassword(String trustStorePassword) { this.__explicitlySet__.add("trustStorePassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @param trustStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder trustStorePasswordSecretId(String trustStorePasswordSecretId) { + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.__explicitlySet__.add("trustStorePasswordSecretId"); + return this; + } /** * The base64 encoded content of the KeyStore file. * @@ -295,6 +370,26 @@ public Builder keyStore(String keyStore) { this.__explicitlySet__.add("keyStore"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + * @param keyStoreSecretId the value to set + * @return this builder + **/ + public Builder keyStoreSecretId(String keyStoreSecretId) { + this.keyStoreSecretId = keyStoreSecretId; + this.__explicitlySet__.add("keyStoreSecretId"); + return this; + } /** * The KeyStore password. * @@ -313,6 +408,26 @@ public Builder keyStorePassword(String keyStorePassword) { this.__explicitlySet__.add("keyStorePassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @param keyStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder keyStorePasswordSecretId(String keyStorePasswordSecretId) { + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.__explicitlySet__.add("keyStorePasswordSecretId"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Redis cluster. * @@ -349,16 +464,22 @@ public CreateRedisConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.servers, this.securityProtocol, this.authenticationType, this.username, this.password, + this.passwordSecretId, this.trustStore, + this.trustStoreSecretId, this.trustStorePassword, + this.trustStorePasswordSecretId, this.keyStore, + this.keyStoreSecretId, this.keyStorePassword, + this.keyStorePasswordSecretId, this.redisClusterId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -401,6 +522,9 @@ public Builder copy(CreateRedisConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -419,18 +543,33 @@ public Builder copy(CreateRedisConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("trustStore")) { this.trustStore(model.getTrustStore()); } + if (model.wasPropertyExplicitlySet("trustStoreSecretId")) { + this.trustStoreSecretId(model.getTrustStoreSecretId()); + } if (model.wasPropertyExplicitlySet("trustStorePassword")) { this.trustStorePassword(model.getTrustStorePassword()); } + if (model.wasPropertyExplicitlySet("trustStorePasswordSecretId")) { + this.trustStorePasswordSecretId(model.getTrustStorePasswordSecretId()); + } if (model.wasPropertyExplicitlySet("keyStore")) { this.keyStore(model.getKeyStore()); } + if (model.wasPropertyExplicitlySet("keyStoreSecretId")) { + this.keyStoreSecretId(model.getKeyStoreSecretId()); + } if (model.wasPropertyExplicitlySet("keyStorePassword")) { this.keyStorePassword(model.getKeyStorePassword()); } + if (model.wasPropertyExplicitlySet("keyStorePasswordSecretId")) { + this.keyStorePasswordSecretId(model.getKeyStorePasswordSecretId()); + } if (model.wasPropertyExplicitlySet("redisClusterId")) { this.redisClusterId(model.getRedisClusterId()); } @@ -462,16 +601,22 @@ public CreateRedisConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, RedisConnection.TechnologyType technologyType, String servers, RedisConnection.SecurityProtocol securityProtocol, RedisConnection.AuthenticationType authenticationType, String username, String password, + String passwordSecretId, String trustStore, + String trustStoreSecretId, String trustStorePassword, + String trustStorePasswordSecretId, String keyStore, + String keyStoreSecretId, String keyStorePassword, + String keyStorePasswordSecretId, String redisClusterId) { super( displayName, @@ -484,17 +629,23 @@ public CreateRedisConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.servers = servers; this.securityProtocol = securityProtocol; this.authenticationType = authenticationType; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.trustStore = trustStore; + this.trustStoreSecretId = trustStoreSecretId; this.trustStorePassword = trustStorePassword; + this.trustStorePasswordSecretId = trustStorePasswordSecretId; this.keyStore = keyStore; + this.keyStoreSecretId = keyStoreSecretId; this.keyStorePassword = keyStorePassword; + this.keyStorePasswordSecretId = keyStorePasswordSecretId; this.redisClusterId = redisClusterId; } @@ -600,6 +751,30 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * The base64 encoded content of the TrustStore file. * @@ -616,6 +791,24 @@ public String getTrustStore() { return trustStore; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private final String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + * @return the value + **/ + public String getTrustStoreSecretId() { + return trustStoreSecretId; + } + /** * The TrustStore password. * @@ -632,6 +825,24 @@ public String getTrustStorePassword() { return trustStorePassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private final String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @return the value + **/ + public String getTrustStorePasswordSecretId() { + return trustStorePasswordSecretId; + } + /** * The base64 encoded content of the KeyStore file. * @@ -648,6 +859,24 @@ public String getKeyStore() { return keyStore; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private final String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + * @return the value + **/ + public String getKeyStoreSecretId() { + return keyStoreSecretId; + } + /** * The KeyStore password. * @@ -664,6 +893,24 @@ public String getKeyStorePassword() { return keyStorePassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private final String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @return the value + **/ + public String getKeyStorePasswordSecretId() { + return keyStorePasswordSecretId; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Redis cluster. * @@ -700,10 +947,17 @@ public String toString(boolean includeByteArrayContents) { sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", trustStore=").append(String.valueOf(this.trustStore)); + sb.append(", trustStoreSecretId=").append(String.valueOf(this.trustStoreSecretId)); sb.append(", trustStorePassword=").append(""); + sb.append(", trustStorePasswordSecretId=") + .append(String.valueOf(this.trustStorePasswordSecretId)); sb.append(", keyStore=").append(String.valueOf(this.keyStore)); + sb.append(", keyStoreSecretId=").append(String.valueOf(this.keyStoreSecretId)); sb.append(", keyStorePassword=").append(""); + sb.append(", keyStorePasswordSecretId=") + .append(String.valueOf(this.keyStorePasswordSecretId)); sb.append(", redisClusterId=").append(String.valueOf(this.redisClusterId)); sb.append(")"); return sb.toString(); @@ -725,10 +979,17 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.trustStore, other.trustStore) + && java.util.Objects.equals(this.trustStoreSecretId, other.trustStoreSecretId) && java.util.Objects.equals(this.trustStorePassword, other.trustStorePassword) + && java.util.Objects.equals( + this.trustStorePasswordSecretId, other.trustStorePasswordSecretId) && java.util.Objects.equals(this.keyStore, other.keyStore) + && java.util.Objects.equals(this.keyStoreSecretId, other.keyStoreSecretId) && java.util.Objects.equals(this.keyStorePassword, other.keyStorePassword) + && java.util.Objects.equals( + this.keyStorePasswordSecretId, other.keyStorePasswordSecretId) && java.util.Objects.equals(this.redisClusterId, other.redisClusterId) && super.equals(other); } @@ -751,16 +1012,37 @@ public int hashCode() { : this.authenticationType.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.trustStore == null ? 43 : this.trustStore.hashCode()); + result = + (result * PRIME) + + (this.trustStoreSecretId == null + ? 43 + : this.trustStoreSecretId.hashCode()); result = (result * PRIME) + (this.trustStorePassword == null ? 43 : this.trustStorePassword.hashCode()); + result = + (result * PRIME) + + (this.trustStorePasswordSecretId == null + ? 43 + : this.trustStorePasswordSecretId.hashCode()); result = (result * PRIME) + (this.keyStore == null ? 43 : this.keyStore.hashCode()); + result = + (result * PRIME) + + (this.keyStoreSecretId == null ? 43 : this.keyStoreSecretId.hashCode()); result = (result * PRIME) + (this.keyStorePassword == null ? 43 : this.keyStorePassword.hashCode()); + result = + (result * PRIME) + + (this.keyStorePasswordSecretId == null + ? 43 + : this.keyStorePasswordSecretId.hashCode()); result = (result * PRIME) + (this.redisClusterId == null ? 43 : this.redisClusterId.hashCode()); diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateSnowflakeConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateSnowflakeConnectionDetails.java index 634aa4ec4fe..6af0cd9336f 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateSnowflakeConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/CreateSnowflakeConnectionDetails.java @@ -127,6 +127,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Snowflake technology type. **/ @@ -220,6 +229,32 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * The base64 encoded content of private key file in PEM format. * @@ -238,6 +273,28 @@ public Builder privateKeyFile(String privateKeyFile) { this.__explicitlySet__.add("privateKeyFile"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @param privateKeyFileSecretId the value to set + * @return this builder + **/ + public Builder privateKeyFileSecretId(String privateKeyFileSecretId) { + this.privateKeyFileSecretId = privateKeyFileSecretId; + this.__explicitlySet__.add("privateKeyFileSecretId"); + return this; + } /** * Password if the private key file is encrypted. * @@ -256,6 +313,26 @@ public Builder privateKeyPassphrase(String privateKeyPassphrase) { this.__explicitlySet__.add("privateKeyPassphrase"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the private key file. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the private key file. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @param privateKeyPassphraseSecretId the value to set + * @return this builder + **/ + public Builder privateKeyPassphraseSecretId(String privateKeyPassphraseSecretId) { + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; + this.__explicitlySet__.add("privateKeyPassphraseSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -274,13 +351,17 @@ public CreateSnowflakeConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.connectionUrl, this.authenticationType, this.username, this.password, + this.passwordSecretId, this.privateKeyFile, - this.privateKeyPassphrase); + this.privateKeyFileSecretId, + this.privateKeyPassphrase, + this.privateKeyPassphraseSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -322,6 +403,9 @@ public Builder copy(CreateSnowflakeConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -337,12 +421,21 @@ public Builder copy(CreateSnowflakeConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("privateKeyFile")) { this.privateKeyFile(model.getPrivateKeyFile()); } + if (model.wasPropertyExplicitlySet("privateKeyFileSecretId")) { + this.privateKeyFileSecretId(model.getPrivateKeyFileSecretId()); + } if (model.wasPropertyExplicitlySet("privateKeyPassphrase")) { this.privateKeyPassphrase(model.getPrivateKeyPassphrase()); } + if (model.wasPropertyExplicitlySet("privateKeyPassphraseSecretId")) { + this.privateKeyPassphraseSecretId(model.getPrivateKeyPassphraseSecretId()); + } return this; } } @@ -371,13 +464,17 @@ public CreateSnowflakeConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, SnowflakeConnection.TechnologyType technologyType, String connectionUrl, SnowflakeConnection.AuthenticationType authenticationType, String username, String password, + String passwordSecretId, String privateKeyFile, - String privateKeyPassphrase) { + String privateKeyFileSecretId, + String privateKeyPassphrase, + String privateKeyPassphraseSecretId) { super( displayName, description, @@ -389,14 +486,18 @@ public CreateSnowflakeConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.connectionUrl = connectionUrl; this.authenticationType = authenticationType; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.privateKeyFile = privateKeyFile; + this.privateKeyFileSecretId = privateKeyFileSecretId; this.privateKeyPassphrase = privateKeyPassphrase; + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; } /** @@ -481,6 +582,30 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * The base64 encoded content of private key file in PEM format. * @@ -497,6 +622,26 @@ public String getPrivateKeyFile() { return privateKeyFile; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private final String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyFileSecretId() { + return privateKeyFileSecretId; + } + /** * Password if the private key file is encrypted. * @@ -513,6 +658,24 @@ public String getPrivateKeyPassphrase() { return privateKeyPassphrase; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the private key file. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private final String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the private key file. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyPassphraseSecretId() { + return privateKeyPassphraseSecretId; + } + @Override public String toString() { return this.toString(true); @@ -532,8 +695,12 @@ public String toString(boolean includeByteArrayContents) { sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", privateKeyFile=").append(String.valueOf(this.privateKeyFile)); + sb.append(", privateKeyFileSecretId=").append(String.valueOf(this.privateKeyFileSecretId)); sb.append(", privateKeyPassphrase=").append(""); + sb.append(", privateKeyPassphraseSecretId=") + .append(String.valueOf(this.privateKeyPassphraseSecretId)); sb.append(")"); return sb.toString(); } @@ -553,8 +720,13 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.privateKeyFile, other.privateKeyFile) + && java.util.Objects.equals( + this.privateKeyFileSecretId, other.privateKeyFileSecretId) && java.util.Objects.equals(this.privateKeyPassphrase, other.privateKeyPassphrase) + && java.util.Objects.equals( + this.privateKeyPassphraseSecretId, other.privateKeyPassphraseSecretId) && super.equals(other); } @@ -575,14 +747,27 @@ public int hashCode() { : this.authenticationType.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.privateKeyFile == null ? 43 : this.privateKeyFile.hashCode()); + result = + (result * PRIME) + + (this.privateKeyFileSecretId == null + ? 43 + : this.privateKeyFileSecretId.hashCode()); result = (result * PRIME) + (this.privateKeyPassphrase == null ? 43 : this.privateKeyPassphrase.hashCode()); + result = + (result * PRIME) + + (this.privateKeyPassphraseSecretId == null + ? 43 + : this.privateKeyPassphraseSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/Db2Connection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/Db2Connection.java index fc61d8bf485..8644067829a 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/Db2Connection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/Db2Connection.java @@ -188,6 +188,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The DB2 technology type. **/ @@ -314,6 +323,72 @@ public Builder securityProtocol(SecurityProtocol securityProtocol) { this.__explicitlySet__.add("securityProtocol"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated DB2 database. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated DB2 database. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystore file stored, + * which created at the client containing the server certificate / CA root certificate. + * Note: When provided, 'sslClientKeystoredb' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslClientKeystoredbSecretId") + private String sslClientKeystoredbSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystore file stored, + * which created at the client containing the server certificate / CA root certificate. + * Note: When provided, 'sslClientKeystoredb' field must not be provided. + * + * @param sslClientKeystoredbSecretId the value to set + * @return this builder + **/ + public Builder sslClientKeystoredbSecretId(String sslClientKeystoredbSecretId) { + this.sslClientKeystoredbSecretId = sslClientKeystoredbSecretId; + this.__explicitlySet__.add("sslClientKeystoredbSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystash file is stored, + * which contains the encrypted password to the key database file. + * Note: When provided, 'sslClientKeystash' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslClientKeystashSecretId") + private String sslClientKeystashSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystash file is stored, + * which contains the encrypted password to the key database file. + * Note: When provided, 'sslClientKeystash' field must not be provided. + * + * @param sslClientKeystashSecretId the value to set + * @return this builder + **/ + public Builder sslClientKeystashSecretId(String sslClientKeystashSecretId) { + this.sslClientKeystashSecretId = sslClientKeystashSecretId; + this.__explicitlySet__.add("sslClientKeystashSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -339,13 +414,17 @@ public Db2Connection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.username, this.host, this.port, this.databaseName, this.additionalAttributes, - this.securityProtocol); + this.securityProtocol, + this.passwordSecretId, + this.sslClientKeystoredbSecretId, + this.sslClientKeystashSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -408,6 +487,9 @@ public Builder copy(Db2Connection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -429,6 +511,15 @@ public Builder copy(Db2Connection model) { if (model.wasPropertyExplicitlySet("securityProtocol")) { this.securityProtocol(model.getSecurityProtocol()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("sslClientKeystoredbSecretId")) { + this.sslClientKeystoredbSecretId(model.getSslClientKeystoredbSecretId()); + } + if (model.wasPropertyExplicitlySet("sslClientKeystashSecretId")) { + this.sslClientKeystashSecretId(model.getSslClientKeystashSecretId()); + } return this; } } @@ -464,13 +555,17 @@ public Db2Connection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, String username, String host, Integer port, String databaseName, java.util.List additionalAttributes, - SecurityProtocol securityProtocol) { + SecurityProtocol securityProtocol, + String passwordSecretId, + String sslClientKeystoredbSecretId, + String sslClientKeystashSecretId) { super( id, displayName, @@ -489,7 +584,8 @@ public Db2Connection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.username = username; this.host = host; @@ -497,6 +593,9 @@ public Db2Connection( this.databaseName = databaseName; this.additionalAttributes = additionalAttributes; this.securityProtocol = securityProtocol; + this.passwordSecretId = passwordSecretId; + this.sslClientKeystoredbSecretId = sslClientKeystoredbSecretId; + this.sslClientKeystashSecretId = sslClientKeystashSecretId; } /** @@ -706,6 +805,66 @@ public SecurityProtocol getSecurityProtocol() { return securityProtocol; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated DB2 database. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated DB2 database. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystore file stored, + * which created at the client containing the server certificate / CA root certificate. + * Note: When provided, 'sslClientKeystoredb' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslClientKeystoredbSecretId") + private final String sslClientKeystoredbSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystore file stored, + * which created at the client containing the server certificate / CA root certificate. + * Note: When provided, 'sslClientKeystoredb' field must not be provided. + * + * @return the value + **/ + public String getSslClientKeystoredbSecretId() { + return sslClientKeystoredbSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystash file is stored, + * which contains the encrypted password to the key database file. + * Note: When provided, 'sslClientKeystash' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslClientKeystashSecretId") + private final String sslClientKeystashSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystash file is stored, + * which contains the encrypted password to the key database file. + * Note: When provided, 'sslClientKeystash' field must not be provided. + * + * @return the value + **/ + public String getSslClientKeystashSecretId() { + return sslClientKeystashSecretId; + } + @Override public String toString() { return this.toString(true); @@ -727,6 +886,11 @@ public String toString(boolean includeByteArrayContents) { sb.append(", databaseName=").append(String.valueOf(this.databaseName)); sb.append(", additionalAttributes=").append(String.valueOf(this.additionalAttributes)); sb.append(", securityProtocol=").append(String.valueOf(this.securityProtocol)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); + sb.append(", sslClientKeystoredbSecretId=") + .append(String.valueOf(this.sslClientKeystoredbSecretId)); + sb.append(", sslClientKeystashSecretId=") + .append(String.valueOf(this.sslClientKeystashSecretId)); sb.append(")"); return sb.toString(); } @@ -748,6 +912,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.databaseName, other.databaseName) && java.util.Objects.equals(this.additionalAttributes, other.additionalAttributes) && java.util.Objects.equals(this.securityProtocol, other.securityProtocol) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) + && java.util.Objects.equals( + this.sslClientKeystoredbSecretId, other.sslClientKeystoredbSecretId) + && java.util.Objects.equals( + this.sslClientKeystashSecretId, other.sslClientKeystashSecretId) && super.equals(other); } @@ -770,6 +939,19 @@ public int hashCode() { result = (result * PRIME) + (this.securityProtocol == null ? 43 : this.securityProtocol.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); + result = + (result * PRIME) + + (this.sslClientKeystoredbSecretId == null + ? 43 + : this.sslClientKeystoredbSecretId.hashCode()); + result = + (result * PRIME) + + (this.sslClientKeystashSecretId == null + ? 43 + : this.sslClientKeystashSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/Db2ConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/Db2ConnectionSummary.java index e461096043e..469bfa0d8ca 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/Db2ConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/Db2ConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The DB2 technology type. **/ @@ -316,6 +325,72 @@ public Builder securityProtocol(Db2Connection.SecurityProtocol securityProtocol) this.__explicitlySet__.add("securityProtocol"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated DB2 database. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated DB2 database. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystore file stored, + * which created at the client containing the server certificate / CA root certificate. + * Note: When provided, 'sslClientKeystoredb' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslClientKeystoredbSecretId") + private String sslClientKeystoredbSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystore file stored, + * which created at the client containing the server certificate / CA root certificate. + * Note: When provided, 'sslClientKeystoredb' field must not be provided. + * + * @param sslClientKeystoredbSecretId the value to set + * @return this builder + **/ + public Builder sslClientKeystoredbSecretId(String sslClientKeystoredbSecretId) { + this.sslClientKeystoredbSecretId = sslClientKeystoredbSecretId; + this.__explicitlySet__.add("sslClientKeystoredbSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystash file is stored, + * which contains the encrypted password to the key database file. + * Note: When provided, 'sslClientKeystash' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslClientKeystashSecretId") + private String sslClientKeystashSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystash file is stored, + * which contains the encrypted password to the key database file. + * Note: When provided, 'sslClientKeystash' field must not be provided. + * + * @param sslClientKeystashSecretId the value to set + * @return this builder + **/ + public Builder sslClientKeystashSecretId(String sslClientKeystashSecretId) { + this.sslClientKeystashSecretId = sslClientKeystashSecretId; + this.__explicitlySet__.add("sslClientKeystashSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -341,13 +416,17 @@ public Db2ConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, this.databaseName, this.host, this.port, this.username, this.additionalAttributes, - this.securityProtocol); + this.securityProtocol, + this.passwordSecretId, + this.sslClientKeystoredbSecretId, + this.sslClientKeystashSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -410,6 +489,9 @@ public Builder copy(Db2ConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -431,6 +513,15 @@ public Builder copy(Db2ConnectionSummary model) { if (model.wasPropertyExplicitlySet("securityProtocol")) { this.securityProtocol(model.getSecurityProtocol()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("sslClientKeystoredbSecretId")) { + this.sslClientKeystoredbSecretId(model.getSslClientKeystoredbSecretId()); + } + if (model.wasPropertyExplicitlySet("sslClientKeystashSecretId")) { + this.sslClientKeystashSecretId(model.getSslClientKeystashSecretId()); + } return this; } } @@ -466,13 +557,17 @@ public Db2ConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, Db2Connection.TechnologyType technologyType, String databaseName, String host, Integer port, String username, java.util.List additionalAttributes, - Db2Connection.SecurityProtocol securityProtocol) { + Db2Connection.SecurityProtocol securityProtocol, + String passwordSecretId, + String sslClientKeystoredbSecretId, + String sslClientKeystashSecretId) { super( id, displayName, @@ -491,7 +586,8 @@ public Db2ConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.databaseName = databaseName; this.host = host; @@ -499,6 +595,9 @@ public Db2ConnectionSummary( this.username = username; this.additionalAttributes = additionalAttributes; this.securityProtocol = securityProtocol; + this.passwordSecretId = passwordSecretId; + this.sslClientKeystoredbSecretId = sslClientKeystoredbSecretId; + this.sslClientKeystashSecretId = sslClientKeystashSecretId; } /** @@ -613,6 +712,66 @@ public Db2Connection.SecurityProtocol getSecurityProtocol() { return securityProtocol; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated DB2 database. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated DB2 database. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystore file stored, + * which created at the client containing the server certificate / CA root certificate. + * Note: When provided, 'sslClientKeystoredb' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslClientKeystoredbSecretId") + private final String sslClientKeystoredbSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystore file stored, + * which created at the client containing the server certificate / CA root certificate. + * Note: When provided, 'sslClientKeystoredb' field must not be provided. + * + * @return the value + **/ + public String getSslClientKeystoredbSecretId() { + return sslClientKeystoredbSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystash file is stored, + * which contains the encrypted password to the key database file. + * Note: When provided, 'sslClientKeystash' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslClientKeystashSecretId") + private final String sslClientKeystashSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystash file is stored, + * which contains the encrypted password to the key database file. + * Note: When provided, 'sslClientKeystash' field must not be provided. + * + * @return the value + **/ + public String getSslClientKeystashSecretId() { + return sslClientKeystashSecretId; + } + @Override public String toString() { return this.toString(true); @@ -634,6 +793,11 @@ public String toString(boolean includeByteArrayContents) { sb.append(", username=").append(String.valueOf(this.username)); sb.append(", additionalAttributes=").append(String.valueOf(this.additionalAttributes)); sb.append(", securityProtocol=").append(String.valueOf(this.securityProtocol)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); + sb.append(", sslClientKeystoredbSecretId=") + .append(String.valueOf(this.sslClientKeystoredbSecretId)); + sb.append(", sslClientKeystashSecretId=") + .append(String.valueOf(this.sslClientKeystashSecretId)); sb.append(")"); return sb.toString(); } @@ -655,6 +819,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.additionalAttributes, other.additionalAttributes) && java.util.Objects.equals(this.securityProtocol, other.securityProtocol) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) + && java.util.Objects.equals( + this.sslClientKeystoredbSecretId, other.sslClientKeystoredbSecretId) + && java.util.Objects.equals( + this.sslClientKeystashSecretId, other.sslClientKeystashSecretId) && super.equals(other); } @@ -677,6 +846,19 @@ public int hashCode() { result = (result * PRIME) + (this.securityProtocol == null ? 43 : this.securityProtocol.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); + result = + (result * PRIME) + + (this.sslClientKeystoredbSecretId == null + ? 43 + : this.sslClientKeystoredbSecretId.hashCode()); + result = + (result * PRIME) + + (this.sslClientKeystashSecretId == null + ? 43 + : this.sslClientKeystashSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DefaultRefreshConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DefaultRefreshConnectionDetails.java new file mode 100644 index 00000000000..77d3d0368a0 --- /dev/null +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DefaultRefreshConnectionDetails.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.goldengate.model; + +/** + * Definition of the additional attributes for default Connection external attributes. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200407") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DefaultRefreshConnectionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DefaultRefreshConnectionDetails extends RefreshConnectionDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DefaultRefreshConnectionDetails build() { + DefaultRefreshConnectionDetails model = new DefaultRefreshConnectionDetails(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DefaultRefreshConnectionDetails model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DefaultRefreshConnectionDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DefaultRefreshConnectionDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DefaultRefreshConnectionDetails)) { + return false; + } + + DefaultRefreshConnectionDetails other = (DefaultRefreshConnectionDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/Deployment.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/Deployment.java index d74ed784188..e2fe7b54dbc 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/Deployment.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/Deployment.java @@ -40,6 +40,8 @@ public final class Deployment extends com.oracle.bmc.http.internal.ExplicitlySet "loadBalancerId", "fqdn", "licenseModel", + "environmentType", + "category", "cpuCoreCount", "isAutoScalingEnabled", "nsgIds", @@ -83,6 +85,8 @@ public Deployment( String loadBalancerId, String fqdn, LicenseModel licenseModel, + EnvironmentType environmentType, + DeploymentCategory category, Integer cpuCoreCount, Boolean isAutoScalingEnabled, java.util.List nsgIds, @@ -125,6 +129,8 @@ public Deployment( this.loadBalancerId = loadBalancerId; this.fqdn = fqdn; this.licenseModel = licenseModel; + this.environmentType = environmentType; + this.category = category; this.cpuCoreCount = cpuCoreCount; this.isAutoScalingEnabled = isAutoScalingEnabled; this.nsgIds = nsgIds; @@ -518,6 +524,44 @@ public Builder licenseModel(LicenseModel licenseModel) { this.__explicitlySet__.add("licenseModel"); return this; } + /** + * Specifies whether the deployment is used in a production or development/testing environment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("environmentType") + private EnvironmentType environmentType; + + /** + * Specifies whether the deployment is used in a production or development/testing environment. + * + * @param environmentType the value to set + * @return this builder + **/ + public Builder environmentType(EnvironmentType environmentType) { + this.environmentType = environmentType; + this.__explicitlySet__.add("environmentType"); + return this; + } + /** + * The deployment category defines the broad separation of the deployment type into three categories. + * Currently the separation is 'DATA_REPLICATION', 'STREAM_ANALYTICS' and 'DATA_TRANSFORMS'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("category") + private DeploymentCategory category; + + /** + * The deployment category defines the broad separation of the deployment type into three categories. + * Currently the separation is 'DATA_REPLICATION', 'STREAM_ANALYTICS' and 'DATA_TRANSFORMS'. + * + * @param category the value to set + * @return this builder + **/ + public Builder category(DeploymentCategory category) { + this.category = category; + this.__explicitlySet__.add("category"); + return this; + } /** * The Minimum number of OCPUs to be made available for this Deployment. * @@ -739,6 +783,7 @@ public Builder storageUtilizationInBytes(Long storageUtilizationInBytes) { return this; } /** + * Deprecated: This field is not updated and will be removed in future versions. If storage utilization exceeds the limit, the respective warning message will appear in deployment messages, which can be accessed through /messages?deploymentId=. * Indicator will be true if the amount of storage being utilized exceeds the allowable storage utilization limit. Exceeding the limit may be an indication of a misconfiguration of the deployment's GoldenGate service. * **/ @@ -746,6 +791,7 @@ public Builder storageUtilizationInBytes(Long storageUtilizationInBytes) { private Boolean isStorageUtilizationLimitExceeded; /** + * Deprecated: This field is not updated and will be removed in future versions. If storage utilization exceeds the limit, the respective warning message will appear in deployment messages, which can be accessed through /messages?deploymentId=. * Indicator will be true if the amount of storage being utilized exceeds the allowable storage utilization limit. Exceeding the limit may be an indication of a misconfiguration of the deployment's GoldenGate service. * * @param isStorageUtilizationLimitExceeded the value to set @@ -937,6 +983,8 @@ public Deployment build() { this.loadBalancerId, this.fqdn, this.licenseModel, + this.environmentType, + this.category, this.cpuCoreCount, this.isAutoScalingEnabled, this.nsgIds, @@ -1024,6 +1072,12 @@ public Builder copy(Deployment model) { if (model.wasPropertyExplicitlySet("licenseModel")) { this.licenseModel(model.getLicenseModel()); } + if (model.wasPropertyExplicitlySet("environmentType")) { + this.environmentType(model.getEnvironmentType()); + } + if (model.wasPropertyExplicitlySet("category")) { + this.category(model.getCategory()); + } if (model.wasPropertyExplicitlySet("cpuCoreCount")) { this.cpuCoreCount(model.getCpuCoreCount()); } @@ -1434,6 +1488,40 @@ public LicenseModel getLicenseModel() { return licenseModel; } + /** + * Specifies whether the deployment is used in a production or development/testing environment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("environmentType") + private final EnvironmentType environmentType; + + /** + * Specifies whether the deployment is used in a production or development/testing environment. + * + * @return the value + **/ + public EnvironmentType getEnvironmentType() { + return environmentType; + } + + /** + * The deployment category defines the broad separation of the deployment type into three categories. + * Currently the separation is 'DATA_REPLICATION', 'STREAM_ANALYTICS' and 'DATA_TRANSFORMS'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("category") + private final DeploymentCategory category; + + /** + * The deployment category defines the broad separation of the deployment type into three categories. + * Currently the separation is 'DATA_REPLICATION', 'STREAM_ANALYTICS' and 'DATA_TRANSFORMS'. + * + * @return the value + **/ + public DeploymentCategory getCategory() { + return category; + } + /** * The Minimum number of OCPUs to be made available for this Deployment. * @@ -1633,6 +1721,7 @@ public Long getStorageUtilizationInBytes() { } /** + * Deprecated: This field is not updated and will be removed in future versions. If storage utilization exceeds the limit, the respective warning message will appear in deployment messages, which can be accessed through /messages?deploymentId=. * Indicator will be true if the amount of storage being utilized exceeds the allowable storage utilization limit. Exceeding the limit may be an indication of a misconfiguration of the deployment's GoldenGate service. * **/ @@ -1640,6 +1729,7 @@ public Long getStorageUtilizationInBytes() { private final Boolean isStorageUtilizationLimitExceeded; /** + * Deprecated: This field is not updated and will be removed in future versions. If storage utilization exceeds the limit, the respective warning message will appear in deployment messages, which can be accessed through /messages?deploymentId=. * Indicator will be true if the amount of storage being utilized exceeds the allowable storage utilization limit. Exceeding the limit may be an indication of a misconfiguration of the deployment's GoldenGate service. * * @return the value @@ -1815,6 +1905,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", loadBalancerId=").append(String.valueOf(this.loadBalancerId)); sb.append(", fqdn=").append(String.valueOf(this.fqdn)); sb.append(", licenseModel=").append(String.valueOf(this.licenseModel)); + sb.append(", environmentType=").append(String.valueOf(this.environmentType)); + sb.append(", category=").append(String.valueOf(this.category)); sb.append(", cpuCoreCount=").append(String.valueOf(this.cpuCoreCount)); sb.append(", isAutoScalingEnabled=").append(String.valueOf(this.isAutoScalingEnabled)); sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); @@ -1877,6 +1969,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.loadBalancerId, other.loadBalancerId) && java.util.Objects.equals(this.fqdn, other.fqdn) && java.util.Objects.equals(this.licenseModel, other.licenseModel) + && java.util.Objects.equals(this.environmentType, other.environmentType) + && java.util.Objects.equals(this.category, other.category) && java.util.Objects.equals(this.cpuCoreCount, other.cpuCoreCount) && java.util.Objects.equals(this.isAutoScalingEnabled, other.isAutoScalingEnabled) && java.util.Objects.equals(this.nsgIds, other.nsgIds) @@ -1951,6 +2045,10 @@ public int hashCode() { + (this.loadBalancerId == null ? 43 : this.loadBalancerId.hashCode()); result = (result * PRIME) + (this.fqdn == null ? 43 : this.fqdn.hashCode()); result = (result * PRIME) + (this.licenseModel == null ? 43 : this.licenseModel.hashCode()); + result = + (result * PRIME) + + (this.environmentType == null ? 43 : this.environmentType.hashCode()); + result = (result * PRIME) + (this.category == null ? 43 : this.category.hashCode()); result = (result * PRIME) + (this.cpuCoreCount == null ? 43 : this.cpuCoreCount.hashCode()); result = (result * PRIME) diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentBackup.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentBackup.java index 1090778fb53..235f858110e 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentBackup.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentBackup.java @@ -42,6 +42,7 @@ public final class DeploymentBackup extends com.oracle.bmc.http.internal.Explici "freeformTags", "definedTags", "systemTags", + "isMetadataOnly", "locks" }) public DeploymentBackup( @@ -66,6 +67,7 @@ public DeploymentBackup( java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags, + Boolean isMetadataOnly, java.util.List locks) { super(); this.id = id; @@ -89,6 +91,7 @@ public DeploymentBackup( this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; + this.isMetadataOnly = isMetadataOnly; this.locks = locks; } @@ -499,6 +502,22 @@ public Builder systemTags(java.util.Map> s this.__explicitlySet__.add("systemTags"); return this; } + /** + * Parameter to allow users to create backup without trails + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMetadataOnly") + private Boolean isMetadataOnly; + + /** + * Parameter to allow users to create backup without trails + * @param isMetadataOnly the value to set + * @return this builder + **/ + public Builder isMetadataOnly(Boolean isMetadataOnly) { + this.isMetadataOnly = isMetadataOnly; + this.__explicitlySet__.add("isMetadataOnly"); + return this; + } /** * Locks associated with this resource. **/ @@ -543,6 +562,7 @@ public DeploymentBackup build() { this.freeformTags, this.definedTags, this.systemTags, + this.isMetadataOnly, this.locks); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -615,6 +635,9 @@ public Builder copy(DeploymentBackup model) { if (model.wasPropertyExplicitlySet("systemTags")) { this.systemTags(model.getSystemTags()); } + if (model.wasPropertyExplicitlySet("isMetadataOnly")) { + this.isMetadataOnly(model.getIsMetadataOnly()); + } if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } @@ -995,6 +1018,20 @@ public java.util.Map> getSystemTags() { return systemTags; } + /** + * Parameter to allow users to create backup without trails + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMetadataOnly") + private final Boolean isMetadataOnly; + + /** + * Parameter to allow users to create backup without trails + * @return the value + **/ + public Boolean getIsMetadataOnly() { + return isMetadataOnly; + } + /** * Locks associated with this resource. **/ @@ -1044,6 +1081,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", isMetadataOnly=").append(String.valueOf(this.isMetadataOnly)); sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(")"); return sb.toString(); @@ -1080,6 +1118,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.isMetadataOnly, other.isMetadataOnly) && java.util.Objects.equals(this.locks, other.locks) && super.equals(other); } @@ -1123,6 +1162,9 @@ public int hashCode() { result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = + (result * PRIME) + + (this.isMetadataOnly == null ? 43 : this.isMetadataOnly.hashCode()); result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + super.hashCode(); return result; diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentBackupSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentBackupSummary.java index a50e044f38d..553b89c7143 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentBackupSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentBackupSummary.java @@ -45,6 +45,7 @@ public final class DeploymentBackupSummary "freeformTags", "definedTags", "systemTags", + "isMetadataOnly", "locks" }) public DeploymentBackupSummary( @@ -69,6 +70,7 @@ public DeploymentBackupSummary( java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags, + Boolean isMetadataOnly, java.util.List locks) { super(); this.id = id; @@ -92,6 +94,7 @@ public DeploymentBackupSummary( this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; + this.isMetadataOnly = isMetadataOnly; this.locks = locks; } @@ -502,6 +505,22 @@ public Builder systemTags(java.util.Map> s this.__explicitlySet__.add("systemTags"); return this; } + /** + * Parameter to allow users to create backup without trails + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMetadataOnly") + private Boolean isMetadataOnly; + + /** + * Parameter to allow users to create backup without trails + * @param isMetadataOnly the value to set + * @return this builder + **/ + public Builder isMetadataOnly(Boolean isMetadataOnly) { + this.isMetadataOnly = isMetadataOnly; + this.__explicitlySet__.add("isMetadataOnly"); + return this; + } /** * Locks associated with this resource. **/ @@ -546,6 +565,7 @@ public DeploymentBackupSummary build() { this.freeformTags, this.definedTags, this.systemTags, + this.isMetadataOnly, this.locks); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -618,6 +638,9 @@ public Builder copy(DeploymentBackupSummary model) { if (model.wasPropertyExplicitlySet("systemTags")) { this.systemTags(model.getSystemTags()); } + if (model.wasPropertyExplicitlySet("isMetadataOnly")) { + this.isMetadataOnly(model.getIsMetadataOnly()); + } if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } @@ -998,6 +1021,20 @@ public java.util.Map> getSystemTags() { return systemTags; } + /** + * Parameter to allow users to create backup without trails + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isMetadataOnly") + private final Boolean isMetadataOnly; + + /** + * Parameter to allow users to create backup without trails + * @return the value + **/ + public Boolean getIsMetadataOnly() { + return isMetadataOnly; + } + /** * Locks associated with this resource. **/ @@ -1047,6 +1084,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", isMetadataOnly=").append(String.valueOf(this.isMetadataOnly)); sb.append(", locks=").append(String.valueOf(this.locks)); sb.append(")"); return sb.toString(); @@ -1083,6 +1121,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.isMetadataOnly, other.isMetadataOnly) && java.util.Objects.equals(this.locks, other.locks) && super.equals(other); } @@ -1126,6 +1165,9 @@ public int hashCode() { result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = + (result * PRIME) + + (this.isMetadataOnly == null ? 43 : this.isMetadataOnly.hashCode()); result = (result * PRIME) + (this.locks == null ? 43 : this.locks.hashCode()); result = (result * PRIME) + super.hashCode(); return result; diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentCategory.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentCategory.java new file mode 100644 index 00000000000..532b6a35647 --- /dev/null +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentCategory.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.goldengate.model; + +/** + * The deployment category defines the broad separation of the deployment type into three categories. + * Currently the separation is 'DATA_REPLICATION', 'STREAM_ANALYTICS' and 'DATA_TRANSFORMS'. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200407") +public enum DeploymentCategory { + DataReplication("DATA_REPLICATION"), + StreamAnalytics("STREAM_ANALYTICS"), + DataTransforms("DATA_TRANSFORMS"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeploymentCategory.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DeploymentCategory v : DeploymentCategory.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DeploymentCategory(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DeploymentCategory create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DeploymentCategory', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentEnvironmentCollection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentEnvironmentCollection.java new file mode 100644 index 00000000000..fa87d993849 --- /dev/null +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentEnvironmentCollection.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.goldengate.model; + +/** + * The list of DeploymentEnvironmentDescriptor objects. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200407") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DeploymentEnvironmentCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DeploymentEnvironmentCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public DeploymentEnvironmentCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Array of DeploymentEnvironmentSummary objects. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * Array of DeploymentEnvironmentSummary objects. + * + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DeploymentEnvironmentCollection build() { + DeploymentEnvironmentCollection model = new DeploymentEnvironmentCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DeploymentEnvironmentCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Array of DeploymentEnvironmentSummary objects. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * Array of DeploymentEnvironmentSummary objects. + * + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DeploymentEnvironmentCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeploymentEnvironmentCollection)) { + return false; + } + + DeploymentEnvironmentCollection other = (DeploymentEnvironmentCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentEnvironmentSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentEnvironmentSummary.java new file mode 100644 index 00000000000..829de30361d --- /dev/null +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentEnvironmentSummary.java @@ -0,0 +1,578 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.goldengate.model; + +/** + * The metadata specific to a production or development/testing environment. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200407") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DeploymentEnvironmentSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DeploymentEnvironmentSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "environmentType", + "category", + "displayName", + "minCpuCoreCount", + "defaultCpuCoreCount", + "maxCpuCoreCount", + "isAutoScalingEnabledByDefault", + "networkBandwidthPerOcpuInGbps", + "memoryPerOcpuInGBs", + "storageUsageLimitPerOcpuInGBs" + }) + public DeploymentEnvironmentSummary( + EnvironmentType environmentType, + DeploymentCategory category, + String displayName, + Integer minCpuCoreCount, + Integer defaultCpuCoreCount, + Integer maxCpuCoreCount, + Boolean isAutoScalingEnabledByDefault, + Integer networkBandwidthPerOcpuInGbps, + Integer memoryPerOcpuInGBs, + Integer storageUsageLimitPerOcpuInGBs) { + super(); + this.environmentType = environmentType; + this.category = category; + this.displayName = displayName; + this.minCpuCoreCount = minCpuCoreCount; + this.defaultCpuCoreCount = defaultCpuCoreCount; + this.maxCpuCoreCount = maxCpuCoreCount; + this.isAutoScalingEnabledByDefault = isAutoScalingEnabledByDefault; + this.networkBandwidthPerOcpuInGbps = networkBandwidthPerOcpuInGbps; + this.memoryPerOcpuInGBs = memoryPerOcpuInGBs; + this.storageUsageLimitPerOcpuInGBs = storageUsageLimitPerOcpuInGBs; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Specifies whether the deployment is used in a production or development/testing environment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("environmentType") + private EnvironmentType environmentType; + + /** + * Specifies whether the deployment is used in a production or development/testing environment. + * + * @param environmentType the value to set + * @return this builder + **/ + public Builder environmentType(EnvironmentType environmentType) { + this.environmentType = environmentType; + this.__explicitlySet__.add("environmentType"); + return this; + } + /** + * The deployment category defines the broad separation of the deployment type into three categories. + * Currently the separation is 'DATA_REPLICATION', 'STREAM_ANALYTICS' and 'DATA_TRANSFORMS'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("category") + private DeploymentCategory category; + + /** + * The deployment category defines the broad separation of the deployment type into three categories. + * Currently the separation is 'DATA_REPLICATION', 'STREAM_ANALYTICS' and 'DATA_TRANSFORMS'. + * + * @param category the value to set + * @return this builder + **/ + public Builder category(DeploymentCategory category) { + this.category = category; + this.__explicitlySet__.add("category"); + return this; + } + /** + * An object's Display Name. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * An object's Display Name. + * + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The minimum CPU core count. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("minCpuCoreCount") + private Integer minCpuCoreCount; + + /** + * The minimum CPU core count. + * + * @param minCpuCoreCount the value to set + * @return this builder + **/ + public Builder minCpuCoreCount(Integer minCpuCoreCount) { + this.minCpuCoreCount = minCpuCoreCount; + this.__explicitlySet__.add("minCpuCoreCount"); + return this; + } + /** + * The default CPU core count. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("defaultCpuCoreCount") + private Integer defaultCpuCoreCount; + + /** + * The default CPU core count. + * + * @param defaultCpuCoreCount the value to set + * @return this builder + **/ + public Builder defaultCpuCoreCount(Integer defaultCpuCoreCount) { + this.defaultCpuCoreCount = defaultCpuCoreCount; + this.__explicitlySet__.add("defaultCpuCoreCount"); + return this; + } + /** + * The maximum CPU core count. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxCpuCoreCount") + private Integer maxCpuCoreCount; + + /** + * The maximum CPU core count. + * + * @param maxCpuCoreCount the value to set + * @return this builder + **/ + public Builder maxCpuCoreCount(Integer maxCpuCoreCount) { + this.maxCpuCoreCount = maxCpuCoreCount; + this.__explicitlySet__.add("maxCpuCoreCount"); + return this; + } + /** + * Specifies whether the "Auto scaling" option should be enabled by default or not. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoScalingEnabledByDefault") + private Boolean isAutoScalingEnabledByDefault; + + /** + * Specifies whether the "Auto scaling" option should be enabled by default or not. + * + * @param isAutoScalingEnabledByDefault the value to set + * @return this builder + **/ + public Builder isAutoScalingEnabledByDefault(Boolean isAutoScalingEnabledByDefault) { + this.isAutoScalingEnabledByDefault = isAutoScalingEnabledByDefault; + this.__explicitlySet__.add("isAutoScalingEnabledByDefault"); + return this; + } + /** + * The multiplier value between CPU core count and network bandwidth. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("networkBandwidthPerOcpuInGbps") + private Integer networkBandwidthPerOcpuInGbps; + + /** + * The multiplier value between CPU core count and network bandwidth. + * + * @param networkBandwidthPerOcpuInGbps the value to set + * @return this builder + **/ + public Builder networkBandwidthPerOcpuInGbps(Integer networkBandwidthPerOcpuInGbps) { + this.networkBandwidthPerOcpuInGbps = networkBandwidthPerOcpuInGbps; + this.__explicitlySet__.add("networkBandwidthPerOcpuInGbps"); + return this; + } + /** + * The multiplier value between CPU core count and memory size. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memoryPerOcpuInGBs") + private Integer memoryPerOcpuInGBs; + + /** + * The multiplier value between CPU core count and memory size. + * + * @param memoryPerOcpuInGBs the value to set + * @return this builder + **/ + public Builder memoryPerOcpuInGBs(Integer memoryPerOcpuInGBs) { + this.memoryPerOcpuInGBs = memoryPerOcpuInGBs; + this.__explicitlySet__.add("memoryPerOcpuInGBs"); + return this; + } + /** + * The multiplier value between CPU core count and storage usage limit size. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("storageUsageLimitPerOcpuInGBs") + private Integer storageUsageLimitPerOcpuInGBs; + + /** + * The multiplier value between CPU core count and storage usage limit size. + * + * @param storageUsageLimitPerOcpuInGBs the value to set + * @return this builder + **/ + public Builder storageUsageLimitPerOcpuInGBs(Integer storageUsageLimitPerOcpuInGBs) { + this.storageUsageLimitPerOcpuInGBs = storageUsageLimitPerOcpuInGBs; + this.__explicitlySet__.add("storageUsageLimitPerOcpuInGBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DeploymentEnvironmentSummary build() { + DeploymentEnvironmentSummary model = + new DeploymentEnvironmentSummary( + this.environmentType, + this.category, + this.displayName, + this.minCpuCoreCount, + this.defaultCpuCoreCount, + this.maxCpuCoreCount, + this.isAutoScalingEnabledByDefault, + this.networkBandwidthPerOcpuInGbps, + this.memoryPerOcpuInGBs, + this.storageUsageLimitPerOcpuInGBs); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DeploymentEnvironmentSummary model) { + if (model.wasPropertyExplicitlySet("environmentType")) { + this.environmentType(model.getEnvironmentType()); + } + if (model.wasPropertyExplicitlySet("category")) { + this.category(model.getCategory()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("minCpuCoreCount")) { + this.minCpuCoreCount(model.getMinCpuCoreCount()); + } + if (model.wasPropertyExplicitlySet("defaultCpuCoreCount")) { + this.defaultCpuCoreCount(model.getDefaultCpuCoreCount()); + } + if (model.wasPropertyExplicitlySet("maxCpuCoreCount")) { + this.maxCpuCoreCount(model.getMaxCpuCoreCount()); + } + if (model.wasPropertyExplicitlySet("isAutoScalingEnabledByDefault")) { + this.isAutoScalingEnabledByDefault(model.getIsAutoScalingEnabledByDefault()); + } + if (model.wasPropertyExplicitlySet("networkBandwidthPerOcpuInGbps")) { + this.networkBandwidthPerOcpuInGbps(model.getNetworkBandwidthPerOcpuInGbps()); + } + if (model.wasPropertyExplicitlySet("memoryPerOcpuInGBs")) { + this.memoryPerOcpuInGBs(model.getMemoryPerOcpuInGBs()); + } + if (model.wasPropertyExplicitlySet("storageUsageLimitPerOcpuInGBs")) { + this.storageUsageLimitPerOcpuInGBs(model.getStorageUsageLimitPerOcpuInGBs()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Specifies whether the deployment is used in a production or development/testing environment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("environmentType") + private final EnvironmentType environmentType; + + /** + * Specifies whether the deployment is used in a production or development/testing environment. + * + * @return the value + **/ + public EnvironmentType getEnvironmentType() { + return environmentType; + } + + /** + * The deployment category defines the broad separation of the deployment type into three categories. + * Currently the separation is 'DATA_REPLICATION', 'STREAM_ANALYTICS' and 'DATA_TRANSFORMS'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("category") + private final DeploymentCategory category; + + /** + * The deployment category defines the broad separation of the deployment type into three categories. + * Currently the separation is 'DATA_REPLICATION', 'STREAM_ANALYTICS' and 'DATA_TRANSFORMS'. + * + * @return the value + **/ + public DeploymentCategory getCategory() { + return category; + } + + /** + * An object's Display Name. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * An object's Display Name. + * + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The minimum CPU core count. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("minCpuCoreCount") + private final Integer minCpuCoreCount; + + /** + * The minimum CPU core count. + * + * @return the value + **/ + public Integer getMinCpuCoreCount() { + return minCpuCoreCount; + } + + /** + * The default CPU core count. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("defaultCpuCoreCount") + private final Integer defaultCpuCoreCount; + + /** + * The default CPU core count. + * + * @return the value + **/ + public Integer getDefaultCpuCoreCount() { + return defaultCpuCoreCount; + } + + /** + * The maximum CPU core count. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxCpuCoreCount") + private final Integer maxCpuCoreCount; + + /** + * The maximum CPU core count. + * + * @return the value + **/ + public Integer getMaxCpuCoreCount() { + return maxCpuCoreCount; + } + + /** + * Specifies whether the "Auto scaling" option should be enabled by default or not. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoScalingEnabledByDefault") + private final Boolean isAutoScalingEnabledByDefault; + + /** + * Specifies whether the "Auto scaling" option should be enabled by default or not. + * + * @return the value + **/ + public Boolean getIsAutoScalingEnabledByDefault() { + return isAutoScalingEnabledByDefault; + } + + /** + * The multiplier value between CPU core count and network bandwidth. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("networkBandwidthPerOcpuInGbps") + private final Integer networkBandwidthPerOcpuInGbps; + + /** + * The multiplier value between CPU core count and network bandwidth. + * + * @return the value + **/ + public Integer getNetworkBandwidthPerOcpuInGbps() { + return networkBandwidthPerOcpuInGbps; + } + + /** + * The multiplier value between CPU core count and memory size. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memoryPerOcpuInGBs") + private final Integer memoryPerOcpuInGBs; + + /** + * The multiplier value between CPU core count and memory size. + * + * @return the value + **/ + public Integer getMemoryPerOcpuInGBs() { + return memoryPerOcpuInGBs; + } + + /** + * The multiplier value between CPU core count and storage usage limit size. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("storageUsageLimitPerOcpuInGBs") + private final Integer storageUsageLimitPerOcpuInGBs; + + /** + * The multiplier value between CPU core count and storage usage limit size. + * + * @return the value + **/ + public Integer getStorageUsageLimitPerOcpuInGBs() { + return storageUsageLimitPerOcpuInGBs; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DeploymentEnvironmentSummary("); + sb.append("super=").append(super.toString()); + sb.append("environmentType=").append(String.valueOf(this.environmentType)); + sb.append(", category=").append(String.valueOf(this.category)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", minCpuCoreCount=").append(String.valueOf(this.minCpuCoreCount)); + sb.append(", defaultCpuCoreCount=").append(String.valueOf(this.defaultCpuCoreCount)); + sb.append(", maxCpuCoreCount=").append(String.valueOf(this.maxCpuCoreCount)); + sb.append(", isAutoScalingEnabledByDefault=") + .append(String.valueOf(this.isAutoScalingEnabledByDefault)); + sb.append(", networkBandwidthPerOcpuInGbps=") + .append(String.valueOf(this.networkBandwidthPerOcpuInGbps)); + sb.append(", memoryPerOcpuInGBs=").append(String.valueOf(this.memoryPerOcpuInGBs)); + sb.append(", storageUsageLimitPerOcpuInGBs=") + .append(String.valueOf(this.storageUsageLimitPerOcpuInGBs)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeploymentEnvironmentSummary)) { + return false; + } + + DeploymentEnvironmentSummary other = (DeploymentEnvironmentSummary) o; + return java.util.Objects.equals(this.environmentType, other.environmentType) + && java.util.Objects.equals(this.category, other.category) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.minCpuCoreCount, other.minCpuCoreCount) + && java.util.Objects.equals(this.defaultCpuCoreCount, other.defaultCpuCoreCount) + && java.util.Objects.equals(this.maxCpuCoreCount, other.maxCpuCoreCount) + && java.util.Objects.equals( + this.isAutoScalingEnabledByDefault, other.isAutoScalingEnabledByDefault) + && java.util.Objects.equals( + this.networkBandwidthPerOcpuInGbps, other.networkBandwidthPerOcpuInGbps) + && java.util.Objects.equals(this.memoryPerOcpuInGBs, other.memoryPerOcpuInGBs) + && java.util.Objects.equals( + this.storageUsageLimitPerOcpuInGBs, other.storageUsageLimitPerOcpuInGBs) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.environmentType == null ? 43 : this.environmentType.hashCode()); + result = (result * PRIME) + (this.category == null ? 43 : this.category.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.minCpuCoreCount == null ? 43 : this.minCpuCoreCount.hashCode()); + result = + (result * PRIME) + + (this.defaultCpuCoreCount == null + ? 43 + : this.defaultCpuCoreCount.hashCode()); + result = + (result * PRIME) + + (this.maxCpuCoreCount == null ? 43 : this.maxCpuCoreCount.hashCode()); + result = + (result * PRIME) + + (this.isAutoScalingEnabledByDefault == null + ? 43 + : this.isAutoScalingEnabledByDefault.hashCode()); + result = + (result * PRIME) + + (this.networkBandwidthPerOcpuInGbps == null + ? 43 + : this.networkBandwidthPerOcpuInGbps.hashCode()); + result = + (result * PRIME) + + (this.memoryPerOcpuInGBs == null + ? 43 + : this.memoryPerOcpuInGBs.hashCode()); + result = + (result * PRIME) + + (this.storageUsageLimitPerOcpuInGBs == null + ? 43 + : this.storageUsageLimitPerOcpuInGBs.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentSummary.java index 8a47f1d3864..30b37d8b2a6 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentSummary.java @@ -38,6 +38,8 @@ public final class DeploymentSummary extends com.oracle.bmc.http.internal.Explic "loadBalancerSubnetId", "loadBalancerId", "licenseModel", + "environmentType", + "category", "fqdn", "cpuCoreCount", "isAutoScalingEnabled", @@ -69,6 +71,8 @@ public DeploymentSummary( String loadBalancerSubnetId, String loadBalancerId, LicenseModel licenseModel, + EnvironmentType environmentType, + DeploymentCategory category, String fqdn, Integer cpuCoreCount, Boolean isAutoScalingEnabled, @@ -99,6 +103,8 @@ public DeploymentSummary( this.loadBalancerSubnetId = loadBalancerSubnetId; this.loadBalancerId = loadBalancerId; this.licenseModel = licenseModel; + this.environmentType = environmentType; + this.category = category; this.fqdn = fqdn; this.cpuCoreCount = cpuCoreCount; this.isAutoScalingEnabled = isAutoScalingEnabled; @@ -414,6 +420,44 @@ public Builder licenseModel(LicenseModel licenseModel) { this.__explicitlySet__.add("licenseModel"); return this; } + /** + * Specifies whether the deployment is used in a production or development/testing environment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("environmentType") + private EnvironmentType environmentType; + + /** + * Specifies whether the deployment is used in a production or development/testing environment. + * + * @param environmentType the value to set + * @return this builder + **/ + public Builder environmentType(EnvironmentType environmentType) { + this.environmentType = environmentType; + this.__explicitlySet__.add("environmentType"); + return this; + } + /** + * The deployment category defines the broad separation of the deployment type into three categories. + * Currently the separation is 'DATA_REPLICATION', 'STREAM_ANALYTICS' and 'DATA_TRANSFORMS'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("category") + private DeploymentCategory category; + + /** + * The deployment category defines the broad separation of the deployment type into three categories. + * Currently the separation is 'DATA_REPLICATION', 'STREAM_ANALYTICS' and 'DATA_TRANSFORMS'. + * + * @param category the value to set + * @return this builder + **/ + public Builder category(DeploymentCategory category) { + this.category = category; + this.__explicitlySet__.add("category"); + return this; + } /** * A three-label Fully Qualified Domain Name (FQDN) for a resource. * @@ -657,6 +701,7 @@ public Builder storageUtilizationInBytes(Long storageUtilizationInBytes) { return this; } /** + * Deprecated: This field is not updated and will be removed in future versions. If storage utilization exceeds the limit, the respective warning message will appear in deployment messages, which can be accessed through /messages?deploymentId=. * Indicator will be true if the amount of storage being utilized exceeds the allowable storage utilization limit. Exceeding the limit may be an indication of a misconfiguration of the deployment's GoldenGate service. * **/ @@ -664,6 +709,7 @@ public Builder storageUtilizationInBytes(Long storageUtilizationInBytes) { private Boolean isStorageUtilizationLimitExceeded; /** + * Deprecated: This field is not updated and will be removed in future versions. If storage utilization exceeds the limit, the respective warning message will appear in deployment messages, which can be accessed through /messages?deploymentId=. * Indicator will be true if the amount of storage being utilized exceeds the allowable storage utilization limit. Exceeding the limit may be an indication of a misconfiguration of the deployment's GoldenGate service. * * @param isStorageUtilizationLimitExceeded the value to set @@ -713,6 +759,8 @@ public DeploymentSummary build() { this.loadBalancerSubnetId, this.loadBalancerId, this.licenseModel, + this.environmentType, + this.category, this.fqdn, this.cpuCoreCount, this.isAutoScalingEnabled, @@ -780,6 +828,12 @@ public Builder copy(DeploymentSummary model) { if (model.wasPropertyExplicitlySet("licenseModel")) { this.licenseModel(model.getLicenseModel()); } + if (model.wasPropertyExplicitlySet("environmentType")) { + this.environmentType(model.getEnvironmentType()); + } + if (model.wasPropertyExplicitlySet("category")) { + this.category(model.getCategory()); + } if (model.wasPropertyExplicitlySet("fqdn")) { this.fqdn(model.getFqdn()); } @@ -1104,6 +1158,40 @@ public LicenseModel getLicenseModel() { return licenseModel; } + /** + * Specifies whether the deployment is used in a production or development/testing environment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("environmentType") + private final EnvironmentType environmentType; + + /** + * Specifies whether the deployment is used in a production or development/testing environment. + * + * @return the value + **/ + public EnvironmentType getEnvironmentType() { + return environmentType; + } + + /** + * The deployment category defines the broad separation of the deployment type into three categories. + * Currently the separation is 'DATA_REPLICATION', 'STREAM_ANALYTICS' and 'DATA_TRANSFORMS'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("category") + private final DeploymentCategory category; + + /** + * The deployment category defines the broad separation of the deployment type into three categories. + * Currently the separation is 'DATA_REPLICATION', 'STREAM_ANALYTICS' and 'DATA_TRANSFORMS'. + * + * @return the value + **/ + public DeploymentCategory getCategory() { + return category; + } + /** * A three-label Fully Qualified Domain Name (FQDN) for a resource. * @@ -1323,6 +1411,7 @@ public Long getStorageUtilizationInBytes() { } /** + * Deprecated: This field is not updated and will be removed in future versions. If storage utilization exceeds the limit, the respective warning message will appear in deployment messages, which can be accessed through /messages?deploymentId=. * Indicator will be true if the amount of storage being utilized exceeds the allowable storage utilization limit. Exceeding the limit may be an indication of a misconfiguration of the deployment's GoldenGate service. * **/ @@ -1330,6 +1419,7 @@ public Long getStorageUtilizationInBytes() { private final Boolean isStorageUtilizationLimitExceeded; /** + * Deprecated: This field is not updated and will be removed in future versions. If storage utilization exceeds the limit, the respective warning message will appear in deployment messages, which can be accessed through /messages?deploymentId=. * Indicator will be true if the amount of storage being utilized exceeds the allowable storage utilization limit. Exceeding the limit may be an indication of a misconfiguration of the deployment's GoldenGate service. * * @return the value @@ -1381,6 +1471,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", loadBalancerSubnetId=").append(String.valueOf(this.loadBalancerSubnetId)); sb.append(", loadBalancerId=").append(String.valueOf(this.loadBalancerId)); sb.append(", licenseModel=").append(String.valueOf(this.licenseModel)); + sb.append(", environmentType=").append(String.valueOf(this.environmentType)); + sb.append(", category=").append(String.valueOf(this.category)); sb.append(", fqdn=").append(String.valueOf(this.fqdn)); sb.append(", cpuCoreCount=").append(String.valueOf(this.cpuCoreCount)); sb.append(", isAutoScalingEnabled=").append(String.valueOf(this.isAutoScalingEnabled)); @@ -1426,6 +1518,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.loadBalancerSubnetId, other.loadBalancerSubnetId) && java.util.Objects.equals(this.loadBalancerId, other.loadBalancerId) && java.util.Objects.equals(this.licenseModel, other.licenseModel) + && java.util.Objects.equals(this.environmentType, other.environmentType) + && java.util.Objects.equals(this.category, other.category) && java.util.Objects.equals(this.fqdn, other.fqdn) && java.util.Objects.equals(this.cpuCoreCount, other.cpuCoreCount) && java.util.Objects.equals(this.isAutoScalingEnabled, other.isAutoScalingEnabled) @@ -1479,6 +1573,10 @@ public int hashCode() { (result * PRIME) + (this.loadBalancerId == null ? 43 : this.loadBalancerId.hashCode()); result = (result * PRIME) + (this.licenseModel == null ? 43 : this.licenseModel.hashCode()); + result = + (result * PRIME) + + (this.environmentType == null ? 43 : this.environmentType.hashCode()); + result = (result * PRIME) + (this.category == null ? 43 : this.category.hashCode()); result = (result * PRIME) + (this.fqdn == null ? 43 : this.fqdn.hashCode()); result = (result * PRIME) + (this.cpuCoreCount == null ? 43 : this.cpuCoreCount.hashCode()); result = diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentTypeSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentTypeSummary.java index dbf4d82032b..99b2a498a59 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentTypeSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/DeploymentTypeSummary.java @@ -6,6 +6,9 @@ /** * The meta-data specific on particular deployment type represented by deploymentType field. + *

+ * Deprecated properties: {@code sourceTechnologies} and {@code targetTechnologies} are not populated. They will be removed after September 15 2025. + * The list of supported source and target technologies can be accessed using the url provided in {@code supportedTechnologiesUrl} property. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -35,7 +38,7 @@ public final class DeploymentTypeSummary "defaultUsername" }) public DeploymentTypeSummary( - Category category, + DeploymentCategory category, String displayName, DeploymentType deploymentType, java.util.List connectionTypes, @@ -64,7 +67,7 @@ public static class Builder { * **/ @com.fasterxml.jackson.annotation.JsonProperty("category") - private Category category; + private DeploymentCategory category; /** * The deployment category defines the broad separation of the deployment type into three categories. @@ -73,7 +76,7 @@ public static class Builder { * @param category the value to set * @return this builder **/ - public Builder category(Category category) { + public Builder category(DeploymentCategory category) { this.category = category; this.__explicitlySet__.add("category"); return this; @@ -300,64 +303,13 @@ public Builder toBuilder() { return new Builder().copy(this); } - /** - * The deployment category defines the broad separation of the deployment type into three categories. - * Currently the separation is 'DATA_REPLICATION', 'STREAM_ANALYTICS' and 'DATA_TRANSFORMS'. - * - **/ - public enum Category { - DataReplication("DATA_REPLICATION"), - StreamAnalytics("STREAM_ANALYTICS"), - DataTransforms("DATA_TRANSFORMS"), - - /** - * This value is used if a service returns a value for this enum that is not recognized by this - * version of the SDK. - */ - UnknownEnumValue(null); - - private static final org.slf4j.Logger LOG = - org.slf4j.LoggerFactory.getLogger(Category.class); - - private final String value; - private static java.util.Map map; - - static { - map = new java.util.HashMap<>(); - for (Category v : Category.values()) { - if (v != UnknownEnumValue) { - map.put(v.getValue(), v); - } - } - } - - Category(String value) { - this.value = value; - } - - @com.fasterxml.jackson.annotation.JsonValue - public String getValue() { - return value; - } - - @com.fasterxml.jackson.annotation.JsonCreator - public static Category create(String key) { - if (map.containsKey(key)) { - return map.get(key); - } - LOG.warn( - "Received unknown value '{}' for enum 'Category', returning UnknownEnumValue", - key); - return UnknownEnumValue; - } - }; /** * The deployment category defines the broad separation of the deployment type into three categories. * Currently the separation is 'DATA_REPLICATION', 'STREAM_ANALYTICS' and 'DATA_TRANSFORMS'. * **/ @com.fasterxml.jackson.annotation.JsonProperty("category") - private final Category category; + private final DeploymentCategory category; /** * The deployment category defines the broad separation of the deployment type into three categories. @@ -365,7 +317,7 @@ public static Category create(String key) { * * @return the value **/ - public Category getCategory() { + public DeploymentCategory getCategory() { return category; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/ElasticsearchConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/ElasticsearchConnection.java index 501713ca4e8..eca6293764e 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/ElasticsearchConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/ElasticsearchConnection.java @@ -190,6 +190,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Elasticsearch technology type. **/ @@ -284,6 +293,32 @@ public Builder username(String username) { this.__explicitlySet__.add("username"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -309,11 +344,13 @@ public ElasticsearchConnection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.servers, this.securityProtocol, this.authenticationType, - this.username); + this.username, + this.passwordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -376,6 +413,9 @@ public Builder copy(ElasticsearchConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -391,6 +431,9 @@ public Builder copy(ElasticsearchConnection model) { if (model.wasPropertyExplicitlySet("username")) { this.username(model.getUsername()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } return this; } } @@ -426,11 +469,13 @@ public ElasticsearchConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, String servers, SecurityProtocol securityProtocol, AuthenticationType authenticationType, - String username) { + String username, + String passwordSecretId) { super( id, displayName, @@ -449,12 +494,14 @@ public ElasticsearchConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.servers = servers; this.securityProtocol = securityProtocol; this.authenticationType = authenticationType; this.username = username; + this.passwordSecretId = passwordSecretId; } /** @@ -684,6 +731,30 @@ public String getUsername() { return username; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -703,6 +774,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", securityProtocol=").append(String.valueOf(this.securityProtocol)); sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", username=").append(String.valueOf(this.username)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(")"); return sb.toString(); } @@ -722,6 +794,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.securityProtocol, other.securityProtocol) && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.username, other.username) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && super.equals(other); } @@ -742,6 +815,9 @@ public int hashCode() { ? 43 : this.authenticationType.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/ElasticsearchConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/ElasticsearchConnectionSummary.java index a369e8d3f88..ada9edb6ebf 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/ElasticsearchConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/ElasticsearchConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Elasticsearch technology type. **/ @@ -285,6 +294,32 @@ public Builder username(String username) { this.__explicitlySet__.add("username"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -310,11 +345,13 @@ public ElasticsearchConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, this.servers, this.securityProtocol, this.authenticationType, - this.username); + this.username, + this.passwordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -377,6 +414,9 @@ public Builder copy(ElasticsearchConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -392,6 +432,9 @@ public Builder copy(ElasticsearchConnectionSummary model) { if (model.wasPropertyExplicitlySet("username")) { this.username(model.getUsername()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } return this; } } @@ -427,11 +470,13 @@ public ElasticsearchConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, ElasticsearchConnection.TechnologyType technologyType, String servers, ElasticsearchConnection.SecurityProtocol securityProtocol, ElasticsearchConnection.AuthenticationType authenticationType, - String username) { + String username, + String passwordSecretId) { super( id, displayName, @@ -450,12 +495,14 @@ public ElasticsearchConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.servers = servers; this.securityProtocol = securityProtocol; this.authenticationType = authenticationType; this.username = username; + this.passwordSecretId = passwordSecretId; } /** @@ -542,6 +589,30 @@ public String getUsername() { return username; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -561,6 +632,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", securityProtocol=").append(String.valueOf(this.securityProtocol)); sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", username=").append(String.valueOf(this.username)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(")"); return sb.toString(); } @@ -580,6 +652,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.securityProtocol, other.securityProtocol) && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.username, other.username) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && super.equals(other); } @@ -600,6 +673,9 @@ public int hashCode() { ? 43 : this.authenticationType.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/EnvironmentType.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/EnvironmentType.java new file mode 100644 index 00000000000..9f99a9a4a52 --- /dev/null +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/EnvironmentType.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.goldengate.model; + +/** + * Specifies whether the deployment is used in a production or development/testing environment. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200407") +public enum EnvironmentType { + Production("PRODUCTION"), + DevelopmentOrTesting("DEVELOPMENT_OR_TESTING"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(EnvironmentType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (EnvironmentType v : EnvironmentType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + EnvironmentType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static EnvironmentType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'EnvironmentType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/ExportDeploymentWalletDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/ExportDeploymentWalletDetails.java index 542832739e8..1134a065efd 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/ExportDeploymentWalletDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/ExportDeploymentWalletDetails.java @@ -27,14 +27,20 @@ public final class ExportDeploymentWalletDetails "vaultId", "masterEncryptionKeyId", "secretName", + "secretCompartmentId", "description" }) public ExportDeploymentWalletDetails( - String vaultId, String masterEncryptionKeyId, String secretName, String description) { + String vaultId, + String masterEncryptionKeyId, + String secretName, + String secretCompartmentId, + String description) { super(); this.vaultId = vaultId; this.masterEncryptionKeyId = masterEncryptionKeyId; this.secretName = secretName; + this.secretCompartmentId = secretCompartmentId; this.description = description; } @@ -98,6 +104,24 @@ public Builder secretName(String secretName) { this.__explicitlySet__.add("secretName"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment, where the secret will be created in. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretCompartmentId") + private String secretCompartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment, where the secret will be created in. + * + * @param secretCompartmentId the value to set + * @return this builder + **/ + public Builder secretCompartmentId(String secretCompartmentId) { + this.secretCompartmentId = secretCompartmentId; + this.__explicitlySet__.add("secretCompartmentId"); + return this; + } /** * Metadata about this specific object. * @@ -126,6 +150,7 @@ public ExportDeploymentWalletDetails build() { this.vaultId, this.masterEncryptionKeyId, this.secretName, + this.secretCompartmentId, this.description); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -144,6 +169,9 @@ public Builder copy(ExportDeploymentWalletDetails model) { if (model.wasPropertyExplicitlySet("secretName")) { this.secretName(model.getSecretName()); } + if (model.wasPropertyExplicitlySet("secretCompartmentId")) { + this.secretCompartmentId(model.getSecretCompartmentId()); + } if (model.wasPropertyExplicitlySet("description")) { this.description(model.getDescription()); } @@ -214,6 +242,22 @@ public String getSecretName() { return secretName; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment, where the secret will be created in. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretCompartmentId") + private final String secretCompartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment, where the secret will be created in. + * + * @return the value + **/ + public String getSecretCompartmentId() { + return secretCompartmentId; + } + /** * Metadata about this specific object. * @@ -247,6 +291,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("vaultId=").append(String.valueOf(this.vaultId)); sb.append(", masterEncryptionKeyId=").append(String.valueOf(this.masterEncryptionKeyId)); sb.append(", secretName=").append(String.valueOf(this.secretName)); + sb.append(", secretCompartmentId=").append(String.valueOf(this.secretCompartmentId)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(")"); return sb.toString(); @@ -265,6 +310,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.vaultId, other.vaultId) && java.util.Objects.equals(this.masterEncryptionKeyId, other.masterEncryptionKeyId) && java.util.Objects.equals(this.secretName, other.secretName) + && java.util.Objects.equals(this.secretCompartmentId, other.secretCompartmentId) && java.util.Objects.equals(this.description, other.description) && super.equals(other); } @@ -280,6 +326,11 @@ public int hashCode() { ? 43 : this.masterEncryptionKeyId.hashCode()); result = (result * PRIME) + (this.secretName == null ? 43 : this.secretName.hashCode()); + result = + (result * PRIME) + + (this.secretCompartmentId == null + ? 43 + : this.secretCompartmentId.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); result = (result * PRIME) + super.hashCode(); return result; diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GenericConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GenericConnection.java index 8dd3fb87b83..aaae91cd82f 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GenericConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GenericConnection.java @@ -190,6 +190,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Generic technology type. **/ @@ -257,6 +266,7 @@ public GenericConnection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.host); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -321,6 +331,9 @@ public Builder copy(GenericConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -362,6 +375,7 @@ public GenericConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, String host) { super( @@ -382,7 +396,8 @@ public GenericConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.host = host; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GenericConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GenericConnectionSummary.java index c1537f09410..77cc32898ab 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GenericConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GenericConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Generic technology type. **/ @@ -257,6 +266,7 @@ public GenericConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, this.host); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -321,6 +331,9 @@ public Builder copy(GenericConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -362,6 +375,7 @@ public GenericConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, GenericConnection.TechnologyType technologyType, String host) { super( @@ -382,7 +396,8 @@ public GenericConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.host = host; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoldenGateConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoldenGateConnection.java index 74076c92956..21df7439bed 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoldenGateConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoldenGateConnection.java @@ -190,6 +190,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The GoldenGate technology type. **/ @@ -310,6 +319,28 @@ public Builder privateIp(String privateIp) { this.__explicitlySet__.add("privateIp"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * which is used to connect to the Oracle GoldenGate accessed trough this connection. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * which is used to connect to the Oracle GoldenGate accessed trough this connection. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -335,12 +366,14 @@ public GoldenGateConnection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.deploymentId, this.host, this.port, this.username, - this.privateIp); + this.privateIp, + this.passwordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -403,6 +436,9 @@ public Builder copy(GoldenGateConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -421,6 +457,9 @@ public Builder copy(GoldenGateConnection model) { if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } return this; } } @@ -456,12 +495,14 @@ public GoldenGateConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, String deploymentId, String host, Integer port, String username, - String privateIp) { + String privateIp, + String passwordSecretId) { super( id, displayName, @@ -480,13 +521,15 @@ public GoldenGateConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.deploymentId = deploymentId; this.host = host; this.port = port; this.username = username; this.privateIp = privateIp; + this.passwordSecretId = passwordSecretId; } /** @@ -644,6 +687,26 @@ public String getPrivateIp() { return privateIp; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * which is used to connect to the Oracle GoldenGate accessed trough this connection. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * which is used to connect to the Oracle GoldenGate accessed trough this connection. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -664,6 +727,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", port=").append(String.valueOf(this.port)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(")"); return sb.toString(); } @@ -684,6 +748,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.port, other.port) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.privateIp, other.privateIp) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && super.equals(other); } @@ -699,6 +764,9 @@ public int hashCode() { result = (result * PRIME) + (this.port == null ? 43 : this.port.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoldenGateConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoldenGateConnectionSummary.java index aa5ce9218c8..e6f0efa86e4 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoldenGateConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoldenGateConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The GoldenGate technology type. **/ @@ -310,6 +319,28 @@ public Builder privateIp(String privateIp) { this.__explicitlySet__.add("privateIp"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * which is used to connect to the Oracle GoldenGate accessed trough this connection. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * which is used to connect to the Oracle GoldenGate accessed trough this connection. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -335,12 +366,14 @@ public GoldenGateConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, this.deploymentId, this.host, this.port, this.username, - this.privateIp); + this.privateIp, + this.passwordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -403,6 +436,9 @@ public Builder copy(GoldenGateConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -421,6 +457,9 @@ public Builder copy(GoldenGateConnectionSummary model) { if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } return this; } } @@ -456,12 +495,14 @@ public GoldenGateConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, GoldenGateConnection.TechnologyType technologyType, String deploymentId, String host, Integer port, String username, - String privateIp) { + String privateIp, + String passwordSecretId) { super( id, displayName, @@ -480,13 +521,15 @@ public GoldenGateConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.deploymentId = deploymentId; this.host = host; this.port = port; this.username = username; this.privateIp = privateIp; + this.passwordSecretId = passwordSecretId; } /** @@ -597,6 +640,26 @@ public String getPrivateIp() { return privateIp; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * which is used to connect to the Oracle GoldenGate accessed trough this connection. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * which is used to connect to the Oracle GoldenGate accessed trough this connection. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -617,6 +680,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", port=").append(String.valueOf(this.port)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(")"); return sb.toString(); } @@ -637,6 +701,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.port, other.port) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.privateIp, other.privateIp) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && super.equals(other); } @@ -652,6 +717,9 @@ public int hashCode() { result = (result * PRIME) + (this.port == null ? 43 : this.port.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoogleBigQueryConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoogleBigQueryConnection.java index a5b15808f15..4351fd0a323 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoogleBigQueryConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoogleBigQueryConnection.java @@ -190,6 +190,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Google BigQuery technology type. **/ @@ -206,6 +215,28 @@ public Builder technologyType(TechnologyType technologyType) { this.__explicitlySet__.add("technologyType"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google BigQuery. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceAccountKeyFileSecretId") + private String serviceAccountKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google BigQuery. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + * @param serviceAccountKeyFileSecretId the value to set + * @return this builder + **/ + public Builder serviceAccountKeyFileSecretId(String serviceAccountKeyFileSecretId) { + this.serviceAccountKeyFileSecretId = serviceAccountKeyFileSecretId; + this.__explicitlySet__.add("serviceAccountKeyFileSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -231,7 +262,9 @@ public GoogleBigQueryConnection build() { this.nsgIds, this.subnetId, this.routingMethod, - this.technologyType); + this.doesUseSecretIds, + this.technologyType, + this.serviceAccountKeyFileSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -294,9 +327,15 @@ public Builder copy(GoogleBigQueryConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } + if (model.wasPropertyExplicitlySet("serviceAccountKeyFileSecretId")) { + this.serviceAccountKeyFileSecretId(model.getServiceAccountKeyFileSecretId()); + } return this; } } @@ -332,7 +371,9 @@ public GoogleBigQueryConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, - TechnologyType technologyType) { + Boolean doesUseSecretIds, + TechnologyType technologyType, + String serviceAccountKeyFileSecretId) { super( id, displayName, @@ -351,8 +392,10 @@ public GoogleBigQueryConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; + this.serviceAccountKeyFileSecretId = serviceAccountKeyFileSecretId; } /** @@ -416,6 +459,26 @@ public TechnologyType getTechnologyType() { return technologyType; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google BigQuery. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceAccountKeyFileSecretId") + private final String serviceAccountKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google BigQuery. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + * @return the value + **/ + public String getServiceAccountKeyFileSecretId() { + return serviceAccountKeyFileSecretId; + } + @Override public String toString() { return this.toString(true); @@ -431,6 +494,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("GoogleBigQueryConnection("); sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", technologyType=").append(String.valueOf(this.technologyType)); + sb.append(", serviceAccountKeyFileSecretId=") + .append(String.valueOf(this.serviceAccountKeyFileSecretId)); sb.append(")"); return sb.toString(); } @@ -446,6 +511,8 @@ public boolean equals(Object o) { GoogleBigQueryConnection other = (GoogleBigQueryConnection) o; return java.util.Objects.equals(this.technologyType, other.technologyType) + && java.util.Objects.equals( + this.serviceAccountKeyFileSecretId, other.serviceAccountKeyFileSecretId) && super.equals(other); } @@ -456,6 +523,11 @@ public int hashCode() { result = (result * PRIME) + (this.technologyType == null ? 43 : this.technologyType.hashCode()); + result = + (result * PRIME) + + (this.serviceAccountKeyFileSecretId == null + ? 43 + : this.serviceAccountKeyFileSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoogleBigQueryConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoogleBigQueryConnectionSummary.java index 2268269c587..d7094afff1c 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoogleBigQueryConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoogleBigQueryConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Google BigQuery technology type. **/ @@ -206,6 +215,28 @@ public Builder technologyType(GoogleBigQueryConnection.TechnologyType technology this.__explicitlySet__.add("technologyType"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google BigQuery. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceAccountKeyFileSecretId") + private String serviceAccountKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google BigQuery. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + * @param serviceAccountKeyFileSecretId the value to set + * @return this builder + **/ + public Builder serviceAccountKeyFileSecretId(String serviceAccountKeyFileSecretId) { + this.serviceAccountKeyFileSecretId = serviceAccountKeyFileSecretId; + this.__explicitlySet__.add("serviceAccountKeyFileSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -231,7 +262,9 @@ public GoogleBigQueryConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, - this.technologyType); + this.doesUseSecretIds, + this.technologyType, + this.serviceAccountKeyFileSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -294,9 +327,15 @@ public Builder copy(GoogleBigQueryConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } + if (model.wasPropertyExplicitlySet("serviceAccountKeyFileSecretId")) { + this.serviceAccountKeyFileSecretId(model.getServiceAccountKeyFileSecretId()); + } return this; } } @@ -332,7 +371,9 @@ public GoogleBigQueryConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, - GoogleBigQueryConnection.TechnologyType technologyType) { + Boolean doesUseSecretIds, + GoogleBigQueryConnection.TechnologyType technologyType, + String serviceAccountKeyFileSecretId) { super( id, displayName, @@ -351,8 +392,10 @@ public GoogleBigQueryConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; + this.serviceAccountKeyFileSecretId = serviceAccountKeyFileSecretId; } /** @@ -369,6 +412,26 @@ public GoogleBigQueryConnection.TechnologyType getTechnologyType() { return technologyType; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google BigQuery. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceAccountKeyFileSecretId") + private final String serviceAccountKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google BigQuery. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + * @return the value + **/ + public String getServiceAccountKeyFileSecretId() { + return serviceAccountKeyFileSecretId; + } + @Override public String toString() { return this.toString(true); @@ -384,6 +447,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("GoogleBigQueryConnectionSummary("); sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", technologyType=").append(String.valueOf(this.technologyType)); + sb.append(", serviceAccountKeyFileSecretId=") + .append(String.valueOf(this.serviceAccountKeyFileSecretId)); sb.append(")"); return sb.toString(); } @@ -399,6 +464,8 @@ public boolean equals(Object o) { GoogleBigQueryConnectionSummary other = (GoogleBigQueryConnectionSummary) o; return java.util.Objects.equals(this.technologyType, other.technologyType) + && java.util.Objects.equals( + this.serviceAccountKeyFileSecretId, other.serviceAccountKeyFileSecretId) && super.equals(other); } @@ -409,6 +476,11 @@ public int hashCode() { result = (result * PRIME) + (this.technologyType == null ? 43 : this.technologyType.hashCode()); + result = + (result * PRIME) + + (this.serviceAccountKeyFileSecretId == null + ? 43 + : this.serviceAccountKeyFileSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoogleCloudStorageConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoogleCloudStorageConnection.java index 4d68b2de723..1c32b64b81d 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoogleCloudStorageConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoogleCloudStorageConnection.java @@ -190,6 +190,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Google Cloud Storage technology type. **/ @@ -206,6 +215,28 @@ public Builder technologyType(TechnologyType technologyType) { this.__explicitlySet__.add("technologyType"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google Cloud Storage. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceAccountKeyFileSecretId") + private String serviceAccountKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google Cloud Storage. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + * @param serviceAccountKeyFileSecretId the value to set + * @return this builder + **/ + public Builder serviceAccountKeyFileSecretId(String serviceAccountKeyFileSecretId) { + this.serviceAccountKeyFileSecretId = serviceAccountKeyFileSecretId; + this.__explicitlySet__.add("serviceAccountKeyFileSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -231,7 +262,9 @@ public GoogleCloudStorageConnection build() { this.nsgIds, this.subnetId, this.routingMethod, - this.technologyType); + this.doesUseSecretIds, + this.technologyType, + this.serviceAccountKeyFileSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -294,9 +327,15 @@ public Builder copy(GoogleCloudStorageConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } + if (model.wasPropertyExplicitlySet("serviceAccountKeyFileSecretId")) { + this.serviceAccountKeyFileSecretId(model.getServiceAccountKeyFileSecretId()); + } return this; } } @@ -332,7 +371,9 @@ public GoogleCloudStorageConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, - TechnologyType technologyType) { + Boolean doesUseSecretIds, + TechnologyType technologyType, + String serviceAccountKeyFileSecretId) { super( id, displayName, @@ -351,8 +392,10 @@ public GoogleCloudStorageConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; + this.serviceAccountKeyFileSecretId = serviceAccountKeyFileSecretId; } /** @@ -416,6 +459,26 @@ public TechnologyType getTechnologyType() { return technologyType; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google Cloud Storage. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceAccountKeyFileSecretId") + private final String serviceAccountKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google Cloud Storage. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + * @return the value + **/ + public String getServiceAccountKeyFileSecretId() { + return serviceAccountKeyFileSecretId; + } + @Override public String toString() { return this.toString(true); @@ -431,6 +494,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("GoogleCloudStorageConnection("); sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", technologyType=").append(String.valueOf(this.technologyType)); + sb.append(", serviceAccountKeyFileSecretId=") + .append(String.valueOf(this.serviceAccountKeyFileSecretId)); sb.append(")"); return sb.toString(); } @@ -446,6 +511,8 @@ public boolean equals(Object o) { GoogleCloudStorageConnection other = (GoogleCloudStorageConnection) o; return java.util.Objects.equals(this.technologyType, other.technologyType) + && java.util.Objects.equals( + this.serviceAccountKeyFileSecretId, other.serviceAccountKeyFileSecretId) && super.equals(other); } @@ -456,6 +523,11 @@ public int hashCode() { result = (result * PRIME) + (this.technologyType == null ? 43 : this.technologyType.hashCode()); + result = + (result * PRIME) + + (this.serviceAccountKeyFileSecretId == null + ? 43 + : this.serviceAccountKeyFileSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoogleCloudStorageConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoogleCloudStorageConnectionSummary.java index 216aae2a0ba..1671327ee51 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoogleCloudStorageConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GoogleCloudStorageConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Google Cloud Storage technology type. **/ @@ -206,6 +215,28 @@ public Builder technologyType(GoogleCloudStorageConnection.TechnologyType techno this.__explicitlySet__.add("technologyType"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google Cloud Storage. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceAccountKeyFileSecretId") + private String serviceAccountKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google Cloud Storage. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + * @param serviceAccountKeyFileSecretId the value to set + * @return this builder + **/ + public Builder serviceAccountKeyFileSecretId(String serviceAccountKeyFileSecretId) { + this.serviceAccountKeyFileSecretId = serviceAccountKeyFileSecretId; + this.__explicitlySet__.add("serviceAccountKeyFileSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -231,7 +262,9 @@ public GoogleCloudStorageConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, - this.technologyType); + this.doesUseSecretIds, + this.technologyType, + this.serviceAccountKeyFileSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -294,9 +327,15 @@ public Builder copy(GoogleCloudStorageConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } + if (model.wasPropertyExplicitlySet("serviceAccountKeyFileSecretId")) { + this.serviceAccountKeyFileSecretId(model.getServiceAccountKeyFileSecretId()); + } return this; } } @@ -332,7 +371,9 @@ public GoogleCloudStorageConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, - GoogleCloudStorageConnection.TechnologyType technologyType) { + Boolean doesUseSecretIds, + GoogleCloudStorageConnection.TechnologyType technologyType, + String serviceAccountKeyFileSecretId) { super( id, displayName, @@ -351,8 +392,10 @@ public GoogleCloudStorageConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; + this.serviceAccountKeyFileSecretId = serviceAccountKeyFileSecretId; } /** @@ -369,6 +412,26 @@ public GoogleCloudStorageConnection.TechnologyType getTechnologyType() { return technologyType; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google Cloud Storage. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceAccountKeyFileSecretId") + private final String serviceAccountKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google Cloud Storage. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + * @return the value + **/ + public String getServiceAccountKeyFileSecretId() { + return serviceAccountKeyFileSecretId; + } + @Override public String toString() { return this.toString(true); @@ -384,6 +447,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("GoogleCloudStorageConnectionSummary("); sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", technologyType=").append(String.valueOf(this.technologyType)); + sb.append(", serviceAccountKeyFileSecretId=") + .append(String.valueOf(this.serviceAccountKeyFileSecretId)); sb.append(")"); return sb.toString(); } @@ -399,6 +464,8 @@ public boolean equals(Object o) { GoogleCloudStorageConnectionSummary other = (GoogleCloudStorageConnectionSummary) o; return java.util.Objects.equals(this.technologyType, other.technologyType) + && java.util.Objects.equals( + this.serviceAccountKeyFileSecretId, other.serviceAccountKeyFileSecretId) && super.equals(other); } @@ -409,6 +476,11 @@ public int hashCode() { result = (result * PRIME) + (this.technologyType == null ? 43 : this.technologyType.hashCode()); + result = + (result * PRIME) + + (this.serviceAccountKeyFileSecretId == null + ? 43 + : this.serviceAccountKeyFileSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GroupToRolesMappingDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GroupToRolesMappingDetails.java new file mode 100644 index 00000000000..a82ce5077b9 --- /dev/null +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/GroupToRolesMappingDetails.java @@ -0,0 +1,316 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.goldengate.model; + +/** + * Defines the IDP Groups to GoldenGate roles mapping. This field is used only for IAM deployment and does not have any impact on non-IAM deployments. + * For IAM deployment, when user does not specify this mapping, then it has null value and default mapping is used. + * User belonging to each group can only perform the actions according to the role the respective group is mapped to. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200407") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = GroupToRolesMappingDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class GroupToRolesMappingDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "securityGroupId", + "administratorGroupId", + "operatorGroupId", + "userGroupId" + }) + public GroupToRolesMappingDetails( + String securityGroupId, + String administratorGroupId, + String operatorGroupId, + String userGroupId) { + super(); + this.securityGroupId = securityGroupId; + this.administratorGroupId = administratorGroupId; + this.operatorGroupId = operatorGroupId; + this.userGroupId = userGroupId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role securityGroup. + * It grants administration of security related objects and invoke security related service requests. This role has full privileges. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityGroupId") + private String securityGroupId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role securityGroup. + * It grants administration of security related objects and invoke security related service requests. This role has full privileges. + * + * @param securityGroupId the value to set + * @return this builder + **/ + public Builder securityGroupId(String securityGroupId) { + this.securityGroupId = securityGroupId; + this.__explicitlySet__.add("securityGroupId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role administratorGroup. + * It grants full access to the user, including the ability to alter general, non-security related operational parameters + * and profiles of the server. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("administratorGroupId") + private String administratorGroupId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role administratorGroup. + * It grants full access to the user, including the ability to alter general, non-security related operational parameters + * and profiles of the server. + * + * @param administratorGroupId the value to set + * @return this builder + **/ + public Builder administratorGroupId(String administratorGroupId) { + this.administratorGroupId = administratorGroupId; + this.__explicitlySet__.add("administratorGroupId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role operatorGroup. + * It allows users to perform only operational actions, like starting and stopping resources. + * Operators cannot alter the operational parameters or profiles of the MA server. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operatorGroupId") + private String operatorGroupId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role operatorGroup. + * It allows users to perform only operational actions, like starting and stopping resources. + * Operators cannot alter the operational parameters or profiles of the MA server. + * + * @param operatorGroupId the value to set + * @return this builder + **/ + public Builder operatorGroupId(String operatorGroupId) { + this.operatorGroupId = operatorGroupId; + this.__explicitlySet__.add("operatorGroupId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role userGroup. + * It allows information-only service requests, which do not alter or affect the operation of either the MA. + * Examples of query and read-only information include performance metric information and resource status and monitoring information + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroupId") + private String userGroupId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role userGroup. + * It allows information-only service requests, which do not alter or affect the operation of either the MA. + * Examples of query and read-only information include performance metric information and resource status and monitoring information + * + * @param userGroupId the value to set + * @return this builder + **/ + public Builder userGroupId(String userGroupId) { + this.userGroupId = userGroupId; + this.__explicitlySet__.add("userGroupId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public GroupToRolesMappingDetails build() { + GroupToRolesMappingDetails model = + new GroupToRolesMappingDetails( + this.securityGroupId, + this.administratorGroupId, + this.operatorGroupId, + this.userGroupId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(GroupToRolesMappingDetails model) { + if (model.wasPropertyExplicitlySet("securityGroupId")) { + this.securityGroupId(model.getSecurityGroupId()); + } + if (model.wasPropertyExplicitlySet("administratorGroupId")) { + this.administratorGroupId(model.getAdministratorGroupId()); + } + if (model.wasPropertyExplicitlySet("operatorGroupId")) { + this.operatorGroupId(model.getOperatorGroupId()); + } + if (model.wasPropertyExplicitlySet("userGroupId")) { + this.userGroupId(model.getUserGroupId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role securityGroup. + * It grants administration of security related objects and invoke security related service requests. This role has full privileges. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityGroupId") + private final String securityGroupId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role securityGroup. + * It grants administration of security related objects and invoke security related service requests. This role has full privileges. + * + * @return the value + **/ + public String getSecurityGroupId() { + return securityGroupId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role administratorGroup. + * It grants full access to the user, including the ability to alter general, non-security related operational parameters + * and profiles of the server. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("administratorGroupId") + private final String administratorGroupId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role administratorGroup. + * It grants full access to the user, including the ability to alter general, non-security related operational parameters + * and profiles of the server. + * + * @return the value + **/ + public String getAdministratorGroupId() { + return administratorGroupId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role operatorGroup. + * It allows users to perform only operational actions, like starting and stopping resources. + * Operators cannot alter the operational parameters or profiles of the MA server. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operatorGroupId") + private final String operatorGroupId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role operatorGroup. + * It allows users to perform only operational actions, like starting and stopping resources. + * Operators cannot alter the operational parameters or profiles of the MA server. + * + * @return the value + **/ + public String getOperatorGroupId() { + return operatorGroupId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role userGroup. + * It allows information-only service requests, which do not alter or affect the operation of either the MA. + * Examples of query and read-only information include performance metric information and resource status and monitoring information + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroupId") + private final String userGroupId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role userGroup. + * It allows information-only service requests, which do not alter or affect the operation of either the MA. + * Examples of query and read-only information include performance metric information and resource status and monitoring information + * + * @return the value + **/ + public String getUserGroupId() { + return userGroupId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("GroupToRolesMappingDetails("); + sb.append("super=").append(super.toString()); + sb.append("securityGroupId=").append(String.valueOf(this.securityGroupId)); + sb.append(", administratorGroupId=").append(String.valueOf(this.administratorGroupId)); + sb.append(", operatorGroupId=").append(String.valueOf(this.operatorGroupId)); + sb.append(", userGroupId=").append(String.valueOf(this.userGroupId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GroupToRolesMappingDetails)) { + return false; + } + + GroupToRolesMappingDetails other = (GroupToRolesMappingDetails) o; + return java.util.Objects.equals(this.securityGroupId, other.securityGroupId) + && java.util.Objects.equals(this.administratorGroupId, other.administratorGroupId) + && java.util.Objects.equals(this.operatorGroupId, other.operatorGroupId) + && java.util.Objects.equals(this.userGroupId, other.userGroupId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.securityGroupId == null ? 43 : this.securityGroupId.hashCode()); + result = + (result * PRIME) + + (this.administratorGroupId == null + ? 43 + : this.administratorGroupId.hashCode()); + result = + (result * PRIME) + + (this.operatorGroupId == null ? 43 : this.operatorGroupId.hashCode()); + result = (result * PRIME) + (this.userGroupId == null ? 43 : this.userGroupId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/HdfsConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/HdfsConnection.java index 9570be7a3c9..4ba2b6f0cb7 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/HdfsConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/HdfsConnection.java @@ -188,6 +188,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Hadoop Distributed File System technology type. **/ @@ -229,6 +238,7 @@ public HdfsConnection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -292,6 +302,9 @@ public Builder copy(HdfsConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -330,6 +343,7 @@ public HdfsConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType) { super( id, @@ -349,7 +363,8 @@ public HdfsConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/HdfsConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/HdfsConnectionSummary.java index ff13acf3be4..1ebe40234c1 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/HdfsConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/HdfsConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Hadoop Distributed File System technology type. **/ @@ -231,6 +240,7 @@ public HdfsConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -294,6 +304,9 @@ public Builder copy(HdfsConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -332,6 +345,7 @@ public HdfsConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, HdfsConnection.TechnologyType technologyType) { super( id, @@ -351,7 +365,8 @@ public HdfsConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/ImportDeploymentWalletDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/ImportDeploymentWalletDetails.java index 4df5311de92..ff09d2c031c 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/ImportDeploymentWalletDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/ImportDeploymentWalletDetails.java @@ -27,6 +27,7 @@ public final class ImportDeploymentWalletDetails "vaultId", "newWalletSecretId", "walletBackupSecretName", + "walletBackupSecretCompartmentId", "masterEncryptionKeyId", "description" }) @@ -34,12 +35,14 @@ public ImportDeploymentWalletDetails( String vaultId, String newWalletSecretId, String walletBackupSecretName, + String walletBackupSecretCompartmentId, String masterEncryptionKeyId, String description) { super(); this.vaultId = vaultId; this.newWalletSecretId = newWalletSecretId; this.walletBackupSecretName = walletBackupSecretName; + this.walletBackupSecretCompartmentId = walletBackupSecretCompartmentId; this.masterEncryptionKeyId = masterEncryptionKeyId; this.description = description; } @@ -106,6 +109,24 @@ public Builder walletBackupSecretName(String walletBackupSecretName) { this.__explicitlySet__.add("walletBackupSecretName"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment, where the secret will be created in. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("walletBackupSecretCompartmentId") + private String walletBackupSecretCompartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment, where the secret will be created in. + * + * @param walletBackupSecretCompartmentId the value to set + * @return this builder + **/ + public Builder walletBackupSecretCompartmentId(String walletBackupSecretCompartmentId) { + this.walletBackupSecretCompartmentId = walletBackupSecretCompartmentId; + this.__explicitlySet__.add("walletBackupSecretCompartmentId"); + return this; + } /** * Refers to the customer's master key OCID. * If provided, it references a key to manage secrets. Customers must add policies to permit GoldenGate to use this key. @@ -154,6 +175,7 @@ public ImportDeploymentWalletDetails build() { this.vaultId, this.newWalletSecretId, this.walletBackupSecretName, + this.walletBackupSecretCompartmentId, this.masterEncryptionKeyId, this.description); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -173,6 +195,9 @@ public Builder copy(ImportDeploymentWalletDetails model) { if (model.wasPropertyExplicitlySet("walletBackupSecretName")) { this.walletBackupSecretName(model.getWalletBackupSecretName()); } + if (model.wasPropertyExplicitlySet("walletBackupSecretCompartmentId")) { + this.walletBackupSecretCompartmentId(model.getWalletBackupSecretCompartmentId()); + } if (model.wasPropertyExplicitlySet("masterEncryptionKeyId")) { this.masterEncryptionKeyId(model.getMasterEncryptionKeyId()); } @@ -248,6 +273,22 @@ public String getWalletBackupSecretName() { return walletBackupSecretName; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment, where the secret will be created in. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("walletBackupSecretCompartmentId") + private final String walletBackupSecretCompartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment, where the secret will be created in. + * + * @return the value + **/ + public String getWalletBackupSecretCompartmentId() { + return walletBackupSecretCompartmentId; + } + /** * Refers to the customer's master key OCID. * If provided, it references a key to manage secrets. Customers must add policies to permit GoldenGate to use this key. @@ -299,6 +340,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("vaultId=").append(String.valueOf(this.vaultId)); sb.append(", newWalletSecretId=").append(String.valueOf(this.newWalletSecretId)); sb.append(", walletBackupSecretName=").append(String.valueOf(this.walletBackupSecretName)); + sb.append(", walletBackupSecretCompartmentId=") + .append(String.valueOf(this.walletBackupSecretCompartmentId)); sb.append(", masterEncryptionKeyId=").append(String.valueOf(this.masterEncryptionKeyId)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(")"); @@ -319,6 +362,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.newWalletSecretId, other.newWalletSecretId) && java.util.Objects.equals( this.walletBackupSecretName, other.walletBackupSecretName) + && java.util.Objects.equals( + this.walletBackupSecretCompartmentId, other.walletBackupSecretCompartmentId) && java.util.Objects.equals(this.masterEncryptionKeyId, other.masterEncryptionKeyId) && java.util.Objects.equals(this.description, other.description) && super.equals(other); @@ -337,6 +382,11 @@ public int hashCode() { + (this.walletBackupSecretName == null ? 43 : this.walletBackupSecretName.hashCode()); + result = + (result * PRIME) + + (this.walletBackupSecretCompartmentId == null + ? 43 + : this.walletBackupSecretCompartmentId.hashCode()); result = (result * PRIME) + (this.masterEncryptionKeyId == null diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/JavaMessageServiceConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/JavaMessageServiceConnection.java index 4b96b1da392..e240ab0daa7 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/JavaMessageServiceConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/JavaMessageServiceConnection.java @@ -190,6 +190,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Java Message Service technology type. * @@ -442,6 +451,150 @@ public Builder privateIp(String privateIp) { this.__explicitlySet__.add("privateIp"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the security credentials are stored associated to the principal. + * Note: When provided, 'jndiSecurityCredentials' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("jndiSecurityCredentialsSecretId") + private String jndiSecurityCredentialsSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the security credentials are stored associated to the principal. + * Note: When provided, 'jndiSecurityCredentials' field must not be provided. + * + * @param jndiSecurityCredentialsSecretId the value to set + * @return this builder + **/ + public Builder jndiSecurityCredentialsSecretId(String jndiSecurityCredentialsSecretId) { + this.jndiSecurityCredentialsSecretId = jndiSecurityCredentialsSecretId; + this.__explicitlySet__.add("jndiSecurityCredentialsSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated Java Message Service. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated Java Message Service. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + * @param trustStoreSecretId the value to set + * @return this builder + **/ + public Builder trustStoreSecretId(String trustStoreSecretId) { + this.trustStoreSecretId = trustStoreSecretId; + this.__explicitlySet__.add("trustStoreSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @param trustStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder trustStorePasswordSecretId(String trustStorePasswordSecretId) { + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.__explicitlySet__.add("trustStorePasswordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + * @param keyStoreSecretId the value to set + * @return this builder + **/ + public Builder keyStoreSecretId(String keyStoreSecretId) { + this.keyStoreSecretId = keyStoreSecretId; + this.__explicitlySet__.add("keyStoreSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @param keyStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder keyStorePasswordSecretId(String keyStorePasswordSecretId) { + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.__explicitlySet__.add("keyStorePasswordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored for the cert inside of the Keystore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored for the cert inside of the Keystore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @param sslKeyPasswordSecretId the value to set + * @return this builder + **/ + public Builder sslKeyPasswordSecretId(String sslKeyPasswordSecretId) { + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; + this.__explicitlySet__.add("sslKeyPasswordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -467,6 +620,7 @@ public JavaMessageServiceConnection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.shouldUseJndi, this.jndiConnectionFactory, @@ -478,7 +632,14 @@ public JavaMessageServiceConnection build() { this.securityProtocol, this.authenticationType, this.username, - this.privateIp); + this.privateIp, + this.jndiSecurityCredentialsSecretId, + this.passwordSecretId, + this.trustStoreSecretId, + this.trustStorePasswordSecretId, + this.keyStoreSecretId, + this.keyStorePasswordSecretId, + this.sslKeyPasswordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -541,6 +702,9 @@ public Builder copy(JavaMessageServiceConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -577,6 +741,27 @@ public Builder copy(JavaMessageServiceConnection model) { if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } + if (model.wasPropertyExplicitlySet("jndiSecurityCredentialsSecretId")) { + this.jndiSecurityCredentialsSecretId(model.getJndiSecurityCredentialsSecretId()); + } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("trustStoreSecretId")) { + this.trustStoreSecretId(model.getTrustStoreSecretId()); + } + if (model.wasPropertyExplicitlySet("trustStorePasswordSecretId")) { + this.trustStorePasswordSecretId(model.getTrustStorePasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("keyStoreSecretId")) { + this.keyStoreSecretId(model.getKeyStoreSecretId()); + } + if (model.wasPropertyExplicitlySet("keyStorePasswordSecretId")) { + this.keyStorePasswordSecretId(model.getKeyStorePasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("sslKeyPasswordSecretId")) { + this.sslKeyPasswordSecretId(model.getSslKeyPasswordSecretId()); + } return this; } } @@ -612,6 +797,7 @@ public JavaMessageServiceConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, Boolean shouldUseJndi, String jndiConnectionFactory, @@ -623,7 +809,14 @@ public JavaMessageServiceConnection( SecurityProtocol securityProtocol, AuthenticationType authenticationType, String username, - String privateIp) { + String privateIp, + String jndiSecurityCredentialsSecretId, + String passwordSecretId, + String trustStoreSecretId, + String trustStorePasswordSecretId, + String keyStoreSecretId, + String keyStorePasswordSecretId, + String sslKeyPasswordSecretId) { super( id, displayName, @@ -642,7 +835,8 @@ public JavaMessageServiceConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.shouldUseJndi = shouldUseJndi; this.jndiConnectionFactory = jndiConnectionFactory; @@ -655,6 +849,13 @@ public JavaMessageServiceConnection( this.authenticationType = authenticationType; this.username = username; this.privateIp = privateIp; + this.jndiSecurityCredentialsSecretId = jndiSecurityCredentialsSecretId; + this.passwordSecretId = passwordSecretId; + this.trustStoreSecretId = trustStoreSecretId; + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.keyStoreSecretId = keyStoreSecretId; + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; } /** @@ -1034,6 +1235,136 @@ public String getPrivateIp() { return privateIp; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the security credentials are stored associated to the principal. + * Note: When provided, 'jndiSecurityCredentials' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("jndiSecurityCredentialsSecretId") + private final String jndiSecurityCredentialsSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the security credentials are stored associated to the principal. + * Note: When provided, 'jndiSecurityCredentials' field must not be provided. + * + * @return the value + **/ + public String getJndiSecurityCredentialsSecretId() { + return jndiSecurityCredentialsSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated Java Message Service. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated Java Message Service. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private final String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + * @return the value + **/ + public String getTrustStoreSecretId() { + return trustStoreSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private final String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @return the value + **/ + public String getTrustStorePasswordSecretId() { + return trustStorePasswordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private final String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + * @return the value + **/ + public String getKeyStoreSecretId() { + return keyStoreSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private final String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @return the value + **/ + public String getKeyStorePasswordSecretId() { + return keyStorePasswordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored for the cert inside of the Keystore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private final String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored for the cert inside of the Keystore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @return the value + **/ + public String getSslKeyPasswordSecretId() { + return sslKeyPasswordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -1061,6 +1392,16 @@ public String toString(boolean includeByteArrayContents) { sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); + sb.append(", jndiSecurityCredentialsSecretId=") + .append(String.valueOf(this.jndiSecurityCredentialsSecretId)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); + sb.append(", trustStoreSecretId=").append(String.valueOf(this.trustStoreSecretId)); + sb.append(", trustStorePasswordSecretId=") + .append(String.valueOf(this.trustStorePasswordSecretId)); + sb.append(", keyStoreSecretId=").append(String.valueOf(this.keyStoreSecretId)); + sb.append(", keyStorePasswordSecretId=") + .append(String.valueOf(this.keyStorePasswordSecretId)); + sb.append(", sslKeyPasswordSecretId=").append(String.valueOf(this.sslKeyPasswordSecretId)); sb.append(")"); return sb.toString(); } @@ -1088,6 +1429,17 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.privateIp, other.privateIp) + && java.util.Objects.equals( + this.jndiSecurityCredentialsSecretId, other.jndiSecurityCredentialsSecretId) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) + && java.util.Objects.equals(this.trustStoreSecretId, other.trustStoreSecretId) + && java.util.Objects.equals( + this.trustStorePasswordSecretId, other.trustStorePasswordSecretId) + && java.util.Objects.equals(this.keyStoreSecretId, other.keyStoreSecretId) + && java.util.Objects.equals( + this.keyStorePasswordSecretId, other.keyStorePasswordSecretId) + && java.util.Objects.equals( + this.sslKeyPasswordSecretId, other.sslKeyPasswordSecretId) && super.equals(other); } @@ -1135,6 +1487,37 @@ public int hashCode() { : this.authenticationType.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); + result = + (result * PRIME) + + (this.jndiSecurityCredentialsSecretId == null + ? 43 + : this.jndiSecurityCredentialsSecretId.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); + result = + (result * PRIME) + + (this.trustStoreSecretId == null + ? 43 + : this.trustStoreSecretId.hashCode()); + result = + (result * PRIME) + + (this.trustStorePasswordSecretId == null + ? 43 + : this.trustStorePasswordSecretId.hashCode()); + result = + (result * PRIME) + + (this.keyStoreSecretId == null ? 43 : this.keyStoreSecretId.hashCode()); + result = + (result * PRIME) + + (this.keyStorePasswordSecretId == null + ? 43 + : this.keyStorePasswordSecretId.hashCode()); + result = + (result * PRIME) + + (this.sslKeyPasswordSecretId == null + ? 43 + : this.sslKeyPasswordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/JavaMessageServiceConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/JavaMessageServiceConnectionSummary.java index ad693f3844a..2c92f5e8076 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/JavaMessageServiceConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/JavaMessageServiceConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Java Message Service technology type. * @@ -444,6 +453,150 @@ public Builder privateIp(String privateIp) { this.__explicitlySet__.add("privateIp"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the security credentials are stored associated to the principal. + * Note: When provided, 'jndiSecurityCredentials' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("jndiSecurityCredentialsSecretId") + private String jndiSecurityCredentialsSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the security credentials are stored associated to the principal. + * Note: When provided, 'jndiSecurityCredentials' field must not be provided. + * + * @param jndiSecurityCredentialsSecretId the value to set + * @return this builder + **/ + public Builder jndiSecurityCredentialsSecretId(String jndiSecurityCredentialsSecretId) { + this.jndiSecurityCredentialsSecretId = jndiSecurityCredentialsSecretId; + this.__explicitlySet__.add("jndiSecurityCredentialsSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated Java Message Service. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated Java Message Service. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + * @param trustStoreSecretId the value to set + * @return this builder + **/ + public Builder trustStoreSecretId(String trustStoreSecretId) { + this.trustStoreSecretId = trustStoreSecretId; + this.__explicitlySet__.add("trustStoreSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @param trustStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder trustStorePasswordSecretId(String trustStorePasswordSecretId) { + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.__explicitlySet__.add("trustStorePasswordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + * @param keyStoreSecretId the value to set + * @return this builder + **/ + public Builder keyStoreSecretId(String keyStoreSecretId) { + this.keyStoreSecretId = keyStoreSecretId; + this.__explicitlySet__.add("keyStoreSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @param keyStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder keyStorePasswordSecretId(String keyStorePasswordSecretId) { + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.__explicitlySet__.add("keyStorePasswordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored for the cert inside of the Keystore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored for the cert inside of the Keystore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @param sslKeyPasswordSecretId the value to set + * @return this builder + **/ + public Builder sslKeyPasswordSecretId(String sslKeyPasswordSecretId) { + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; + this.__explicitlySet__.add("sslKeyPasswordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -469,6 +622,7 @@ public JavaMessageServiceConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, this.shouldUseJndi, this.jndiConnectionFactory, @@ -480,7 +634,14 @@ public JavaMessageServiceConnectionSummary build() { this.securityProtocol, this.authenticationType, this.username, - this.privateIp); + this.privateIp, + this.jndiSecurityCredentialsSecretId, + this.passwordSecretId, + this.trustStoreSecretId, + this.trustStorePasswordSecretId, + this.keyStoreSecretId, + this.keyStorePasswordSecretId, + this.sslKeyPasswordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -543,6 +704,9 @@ public Builder copy(JavaMessageServiceConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -579,6 +743,27 @@ public Builder copy(JavaMessageServiceConnectionSummary model) { if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } + if (model.wasPropertyExplicitlySet("jndiSecurityCredentialsSecretId")) { + this.jndiSecurityCredentialsSecretId(model.getJndiSecurityCredentialsSecretId()); + } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("trustStoreSecretId")) { + this.trustStoreSecretId(model.getTrustStoreSecretId()); + } + if (model.wasPropertyExplicitlySet("trustStorePasswordSecretId")) { + this.trustStorePasswordSecretId(model.getTrustStorePasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("keyStoreSecretId")) { + this.keyStoreSecretId(model.getKeyStoreSecretId()); + } + if (model.wasPropertyExplicitlySet("keyStorePasswordSecretId")) { + this.keyStorePasswordSecretId(model.getKeyStorePasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("sslKeyPasswordSecretId")) { + this.sslKeyPasswordSecretId(model.getSslKeyPasswordSecretId()); + } return this; } } @@ -614,6 +799,7 @@ public JavaMessageServiceConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, JavaMessageServiceConnection.TechnologyType technologyType, Boolean shouldUseJndi, String jndiConnectionFactory, @@ -625,7 +811,14 @@ public JavaMessageServiceConnectionSummary( JavaMessageServiceConnection.SecurityProtocol securityProtocol, JavaMessageServiceConnection.AuthenticationType authenticationType, String username, - String privateIp) { + String privateIp, + String jndiSecurityCredentialsSecretId, + String passwordSecretId, + String trustStoreSecretId, + String trustStorePasswordSecretId, + String keyStoreSecretId, + String keyStorePasswordSecretId, + String sslKeyPasswordSecretId) { super( id, displayName, @@ -644,7 +837,8 @@ public JavaMessageServiceConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.shouldUseJndi = shouldUseJndi; this.jndiConnectionFactory = jndiConnectionFactory; @@ -657,6 +851,13 @@ public JavaMessageServiceConnectionSummary( this.authenticationType = authenticationType; this.username = username; this.privateIp = privateIp; + this.jndiSecurityCredentialsSecretId = jndiSecurityCredentialsSecretId; + this.passwordSecretId = passwordSecretId; + this.trustStoreSecretId = trustStoreSecretId; + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.keyStoreSecretId = keyStoreSecretId; + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; } /** @@ -887,6 +1088,136 @@ public String getPrivateIp() { return privateIp; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the security credentials are stored associated to the principal. + * Note: When provided, 'jndiSecurityCredentials' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("jndiSecurityCredentialsSecretId") + private final String jndiSecurityCredentialsSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the security credentials are stored associated to the principal. + * Note: When provided, 'jndiSecurityCredentials' field must not be provided. + * + * @return the value + **/ + public String getJndiSecurityCredentialsSecretId() { + return jndiSecurityCredentialsSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated Java Message Service. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated Java Message Service. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private final String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + * @return the value + **/ + public String getTrustStoreSecretId() { + return trustStoreSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private final String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @return the value + **/ + public String getTrustStorePasswordSecretId() { + return trustStorePasswordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private final String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + * @return the value + **/ + public String getKeyStoreSecretId() { + return keyStoreSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private final String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @return the value + **/ + public String getKeyStorePasswordSecretId() { + return keyStorePasswordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored for the cert inside of the Keystore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private final String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored for the cert inside of the Keystore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @return the value + **/ + public String getSslKeyPasswordSecretId() { + return sslKeyPasswordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -914,6 +1245,16 @@ public String toString(boolean includeByteArrayContents) { sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); + sb.append(", jndiSecurityCredentialsSecretId=") + .append(String.valueOf(this.jndiSecurityCredentialsSecretId)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); + sb.append(", trustStoreSecretId=").append(String.valueOf(this.trustStoreSecretId)); + sb.append(", trustStorePasswordSecretId=") + .append(String.valueOf(this.trustStorePasswordSecretId)); + sb.append(", keyStoreSecretId=").append(String.valueOf(this.keyStoreSecretId)); + sb.append(", keyStorePasswordSecretId=") + .append(String.valueOf(this.keyStorePasswordSecretId)); + sb.append(", sslKeyPasswordSecretId=").append(String.valueOf(this.sslKeyPasswordSecretId)); sb.append(")"); return sb.toString(); } @@ -941,6 +1282,17 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.privateIp, other.privateIp) + && java.util.Objects.equals( + this.jndiSecurityCredentialsSecretId, other.jndiSecurityCredentialsSecretId) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) + && java.util.Objects.equals(this.trustStoreSecretId, other.trustStoreSecretId) + && java.util.Objects.equals( + this.trustStorePasswordSecretId, other.trustStorePasswordSecretId) + && java.util.Objects.equals(this.keyStoreSecretId, other.keyStoreSecretId) + && java.util.Objects.equals( + this.keyStorePasswordSecretId, other.keyStorePasswordSecretId) + && java.util.Objects.equals( + this.sslKeyPasswordSecretId, other.sslKeyPasswordSecretId) && super.equals(other); } @@ -988,6 +1340,37 @@ public int hashCode() { : this.authenticationType.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); + result = + (result * PRIME) + + (this.jndiSecurityCredentialsSecretId == null + ? 43 + : this.jndiSecurityCredentialsSecretId.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); + result = + (result * PRIME) + + (this.trustStoreSecretId == null + ? 43 + : this.trustStoreSecretId.hashCode()); + result = + (result * PRIME) + + (this.trustStorePasswordSecretId == null + ? 43 + : this.trustStorePasswordSecretId.hashCode()); + result = + (result * PRIME) + + (this.keyStoreSecretId == null ? 43 : this.keyStoreSecretId.hashCode()); + result = + (result * PRIME) + + (this.keyStorePasswordSecretId == null + ? 43 + : this.keyStorePasswordSecretId.hashCode()); + result = + (result * PRIME) + + (this.sslKeyPasswordSecretId == null + ? 43 + : this.sslKeyPasswordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/KafkaConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/KafkaConnection.java index a44ffead796..c7b8c8ba93d 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/KafkaConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/KafkaConnection.java @@ -188,6 +188,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Kafka technology type. * @@ -288,6 +297,168 @@ public Builder username(String username) { this.__explicitlySet__.add("username"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + * @param trustStoreSecretId the value to set + * @return this builder + **/ + public Builder trustStoreSecretId(String trustStoreSecretId) { + this.trustStoreSecretId = trustStoreSecretId; + this.__explicitlySet__.add("trustStoreSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @param trustStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder trustStorePasswordSecretId(String trustStorePasswordSecretId) { + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.__explicitlySet__.add("trustStorePasswordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + * @param keyStoreSecretId the value to set + * @return this builder + **/ + public Builder keyStoreSecretId(String keyStoreSecretId) { + this.keyStoreSecretId = keyStoreSecretId; + this.__explicitlySet__.add("keyStoreSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @param keyStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder keyStorePasswordSecretId(String keyStorePasswordSecretId) { + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.__explicitlySet__.add("keyStorePasswordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl Key password is stored. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl Key password is stored. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @param sslKeyPasswordSecretId the value to set + * @return this builder + **/ + public Builder sslKeyPasswordSecretId(String sslKeyPasswordSecretId) { + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; + this.__explicitlySet__.add("sslKeyPasswordSecretId"); + return this; + } + /** + * The base64 encoded content of the consumer.properties file. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("consumerProperties") + private String consumerProperties; + + /** + * The base64 encoded content of the consumer.properties file. + * + * @param consumerProperties the value to set + * @return this builder + **/ + public Builder consumerProperties(String consumerProperties) { + this.consumerProperties = consumerProperties; + this.__explicitlySet__.add("consumerProperties"); + return this; + } + /** + * The base64 encoded content of the producer.properties file. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("producerProperties") + private String producerProperties; + + /** + * The base64 encoded content of the producer.properties file. + * + * @param producerProperties the value to set + * @return this builder + **/ + public Builder producerProperties(String producerProperties) { + this.producerProperties = producerProperties; + this.__explicitlySet__.add("producerProperties"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -313,11 +484,20 @@ public KafkaConnection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.streamPoolId, this.bootstrapServers, this.securityProtocol, - this.username); + this.username, + this.passwordSecretId, + this.trustStoreSecretId, + this.trustStorePasswordSecretId, + this.keyStoreSecretId, + this.keyStorePasswordSecretId, + this.sslKeyPasswordSecretId, + this.consumerProperties, + this.producerProperties); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -380,6 +560,9 @@ public Builder copy(KafkaConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -395,6 +578,30 @@ public Builder copy(KafkaConnection model) { if (model.wasPropertyExplicitlySet("username")) { this.username(model.getUsername()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("trustStoreSecretId")) { + this.trustStoreSecretId(model.getTrustStoreSecretId()); + } + if (model.wasPropertyExplicitlySet("trustStorePasswordSecretId")) { + this.trustStorePasswordSecretId(model.getTrustStorePasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("keyStoreSecretId")) { + this.keyStoreSecretId(model.getKeyStoreSecretId()); + } + if (model.wasPropertyExplicitlySet("keyStorePasswordSecretId")) { + this.keyStorePasswordSecretId(model.getKeyStorePasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("sslKeyPasswordSecretId")) { + this.sslKeyPasswordSecretId(model.getSslKeyPasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("consumerProperties")) { + this.consumerProperties(model.getConsumerProperties()); + } + if (model.wasPropertyExplicitlySet("producerProperties")) { + this.producerProperties(model.getProducerProperties()); + } return this; } } @@ -430,11 +637,20 @@ public KafkaConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, String streamPoolId, java.util.List bootstrapServers, SecurityProtocol securityProtocol, - String username) { + String username, + String passwordSecretId, + String trustStoreSecretId, + String trustStorePasswordSecretId, + String keyStoreSecretId, + String keyStorePasswordSecretId, + String sslKeyPasswordSecretId, + String consumerProperties, + String producerProperties) { super( id, displayName, @@ -453,12 +669,21 @@ public KafkaConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.streamPoolId = streamPoolId; this.bootstrapServers = bootstrapServers; this.securityProtocol = securityProtocol; this.username = username; + this.passwordSecretId = passwordSecretId; + this.trustStoreSecretId = trustStoreSecretId; + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.keyStoreSecretId = keyStoreSecretId; + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; + this.consumerProperties = consumerProperties; + this.producerProperties = producerProperties; } /** @@ -653,6 +878,152 @@ public String getUsername() { return username; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private final String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + * @return the value + **/ + public String getTrustStoreSecretId() { + return trustStoreSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private final String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @return the value + **/ + public String getTrustStorePasswordSecretId() { + return trustStorePasswordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private final String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + * @return the value + **/ + public String getKeyStoreSecretId() { + return keyStoreSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private final String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @return the value + **/ + public String getKeyStorePasswordSecretId() { + return keyStorePasswordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl Key password is stored. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private final String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl Key password is stored. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @return the value + **/ + public String getSslKeyPasswordSecretId() { + return sslKeyPasswordSecretId; + } + + /** + * The base64 encoded content of the consumer.properties file. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("consumerProperties") + private final String consumerProperties; + + /** + * The base64 encoded content of the consumer.properties file. + * + * @return the value + **/ + public String getConsumerProperties() { + return consumerProperties; + } + + /** + * The base64 encoded content of the producer.properties file. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("producerProperties") + private final String producerProperties; + + /** + * The base64 encoded content of the producer.properties file. + * + * @return the value + **/ + public String getProducerProperties() { + return producerProperties; + } + @Override public String toString() { return this.toString(true); @@ -672,6 +1043,16 @@ public String toString(boolean includeByteArrayContents) { sb.append(", bootstrapServers=").append(String.valueOf(this.bootstrapServers)); sb.append(", securityProtocol=").append(String.valueOf(this.securityProtocol)); sb.append(", username=").append(String.valueOf(this.username)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); + sb.append(", trustStoreSecretId=").append(String.valueOf(this.trustStoreSecretId)); + sb.append(", trustStorePasswordSecretId=") + .append(String.valueOf(this.trustStorePasswordSecretId)); + sb.append(", keyStoreSecretId=").append(String.valueOf(this.keyStoreSecretId)); + sb.append(", keyStorePasswordSecretId=") + .append(String.valueOf(this.keyStorePasswordSecretId)); + sb.append(", sslKeyPasswordSecretId=").append(String.valueOf(this.sslKeyPasswordSecretId)); + sb.append(", consumerProperties=").append(String.valueOf(this.consumerProperties)); + sb.append(", producerProperties=").append(String.valueOf(this.producerProperties)); sb.append(")"); return sb.toString(); } @@ -691,6 +1072,17 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.bootstrapServers, other.bootstrapServers) && java.util.Objects.equals(this.securityProtocol, other.securityProtocol) && java.util.Objects.equals(this.username, other.username) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) + && java.util.Objects.equals(this.trustStoreSecretId, other.trustStoreSecretId) + && java.util.Objects.equals( + this.trustStorePasswordSecretId, other.trustStorePasswordSecretId) + && java.util.Objects.equals(this.keyStoreSecretId, other.keyStoreSecretId) + && java.util.Objects.equals( + this.keyStorePasswordSecretId, other.keyStorePasswordSecretId) + && java.util.Objects.equals( + this.sslKeyPasswordSecretId, other.sslKeyPasswordSecretId) + && java.util.Objects.equals(this.consumerProperties, other.consumerProperties) + && java.util.Objects.equals(this.producerProperties, other.producerProperties) && super.equals(other); } @@ -709,6 +1101,42 @@ public int hashCode() { (result * PRIME) + (this.securityProtocol == null ? 43 : this.securityProtocol.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); + result = + (result * PRIME) + + (this.trustStoreSecretId == null + ? 43 + : this.trustStoreSecretId.hashCode()); + result = + (result * PRIME) + + (this.trustStorePasswordSecretId == null + ? 43 + : this.trustStorePasswordSecretId.hashCode()); + result = + (result * PRIME) + + (this.keyStoreSecretId == null ? 43 : this.keyStoreSecretId.hashCode()); + result = + (result * PRIME) + + (this.keyStorePasswordSecretId == null + ? 43 + : this.keyStorePasswordSecretId.hashCode()); + result = + (result * PRIME) + + (this.sslKeyPasswordSecretId == null + ? 43 + : this.sslKeyPasswordSecretId.hashCode()); + result = + (result * PRIME) + + (this.consumerProperties == null + ? 43 + : this.consumerProperties.hashCode()); + result = + (result * PRIME) + + (this.producerProperties == null + ? 43 + : this.producerProperties.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/KafkaConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/KafkaConnectionSummary.java index 531b64b79df..9da8fb5615f 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/KafkaConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/KafkaConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Kafka technology type. * @@ -290,6 +299,132 @@ public Builder username(String username) { this.__explicitlySet__.add("username"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + * @param trustStoreSecretId the value to set + * @return this builder + **/ + public Builder trustStoreSecretId(String trustStoreSecretId) { + this.trustStoreSecretId = trustStoreSecretId; + this.__explicitlySet__.add("trustStoreSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @param trustStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder trustStorePasswordSecretId(String trustStorePasswordSecretId) { + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.__explicitlySet__.add("trustStorePasswordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + * @param keyStoreSecretId the value to set + * @return this builder + **/ + public Builder keyStoreSecretId(String keyStoreSecretId) { + this.keyStoreSecretId = keyStoreSecretId; + this.__explicitlySet__.add("keyStoreSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @param keyStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder keyStorePasswordSecretId(String keyStorePasswordSecretId) { + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.__explicitlySet__.add("keyStorePasswordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl Key password is stored. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl Key password is stored. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @param sslKeyPasswordSecretId the value to set + * @return this builder + **/ + public Builder sslKeyPasswordSecretId(String sslKeyPasswordSecretId) { + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; + this.__explicitlySet__.add("sslKeyPasswordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -315,11 +450,18 @@ public KafkaConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, this.streamPoolId, this.bootstrapServers, this.securityProtocol, - this.username); + this.username, + this.passwordSecretId, + this.trustStoreSecretId, + this.trustStorePasswordSecretId, + this.keyStoreSecretId, + this.keyStorePasswordSecretId, + this.sslKeyPasswordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -382,6 +524,9 @@ public Builder copy(KafkaConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -397,6 +542,24 @@ public Builder copy(KafkaConnectionSummary model) { if (model.wasPropertyExplicitlySet("username")) { this.username(model.getUsername()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("trustStoreSecretId")) { + this.trustStoreSecretId(model.getTrustStoreSecretId()); + } + if (model.wasPropertyExplicitlySet("trustStorePasswordSecretId")) { + this.trustStorePasswordSecretId(model.getTrustStorePasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("keyStoreSecretId")) { + this.keyStoreSecretId(model.getKeyStoreSecretId()); + } + if (model.wasPropertyExplicitlySet("keyStorePasswordSecretId")) { + this.keyStorePasswordSecretId(model.getKeyStorePasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("sslKeyPasswordSecretId")) { + this.sslKeyPasswordSecretId(model.getSslKeyPasswordSecretId()); + } return this; } } @@ -432,11 +595,18 @@ public KafkaConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, KafkaConnection.TechnologyType technologyType, String streamPoolId, java.util.List bootstrapServers, KafkaConnection.SecurityProtocol securityProtocol, - String username) { + String username, + String passwordSecretId, + String trustStoreSecretId, + String trustStorePasswordSecretId, + String keyStoreSecretId, + String keyStorePasswordSecretId, + String sslKeyPasswordSecretId) { super( id, displayName, @@ -455,12 +625,19 @@ public KafkaConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.streamPoolId = streamPoolId; this.bootstrapServers = bootstrapServers; this.securityProtocol = securityProtocol; this.username = username; + this.passwordSecretId = passwordSecretId; + this.trustStoreSecretId = trustStoreSecretId; + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.keyStoreSecretId = keyStoreSecretId; + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; } /** @@ -553,6 +730,120 @@ public String getUsername() { return username; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private final String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + * @return the value + **/ + public String getTrustStoreSecretId() { + return trustStoreSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private final String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @return the value + **/ + public String getTrustStorePasswordSecretId() { + return trustStorePasswordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private final String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + * @return the value + **/ + public String getKeyStoreSecretId() { + return keyStoreSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private final String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @return the value + **/ + public String getKeyStorePasswordSecretId() { + return keyStorePasswordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl Key password is stored. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private final String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl Key password is stored. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @return the value + **/ + public String getSslKeyPasswordSecretId() { + return sslKeyPasswordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -572,6 +863,14 @@ public String toString(boolean includeByteArrayContents) { sb.append(", bootstrapServers=").append(String.valueOf(this.bootstrapServers)); sb.append(", securityProtocol=").append(String.valueOf(this.securityProtocol)); sb.append(", username=").append(String.valueOf(this.username)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); + sb.append(", trustStoreSecretId=").append(String.valueOf(this.trustStoreSecretId)); + sb.append(", trustStorePasswordSecretId=") + .append(String.valueOf(this.trustStorePasswordSecretId)); + sb.append(", keyStoreSecretId=").append(String.valueOf(this.keyStoreSecretId)); + sb.append(", keyStorePasswordSecretId=") + .append(String.valueOf(this.keyStorePasswordSecretId)); + sb.append(", sslKeyPasswordSecretId=").append(String.valueOf(this.sslKeyPasswordSecretId)); sb.append(")"); return sb.toString(); } @@ -591,6 +890,15 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.bootstrapServers, other.bootstrapServers) && java.util.Objects.equals(this.securityProtocol, other.securityProtocol) && java.util.Objects.equals(this.username, other.username) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) + && java.util.Objects.equals(this.trustStoreSecretId, other.trustStoreSecretId) + && java.util.Objects.equals( + this.trustStorePasswordSecretId, other.trustStorePasswordSecretId) + && java.util.Objects.equals(this.keyStoreSecretId, other.keyStoreSecretId) + && java.util.Objects.equals( + this.keyStorePasswordSecretId, other.keyStorePasswordSecretId) + && java.util.Objects.equals( + this.sslKeyPasswordSecretId, other.sslKeyPasswordSecretId) && super.equals(other); } @@ -609,6 +917,32 @@ public int hashCode() { (result * PRIME) + (this.securityProtocol == null ? 43 : this.securityProtocol.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); + result = + (result * PRIME) + + (this.trustStoreSecretId == null + ? 43 + : this.trustStoreSecretId.hashCode()); + result = + (result * PRIME) + + (this.trustStorePasswordSecretId == null + ? 43 + : this.trustStorePasswordSecretId.hashCode()); + result = + (result * PRIME) + + (this.keyStoreSecretId == null ? 43 : this.keyStoreSecretId.hashCode()); + result = + (result * PRIME) + + (this.keyStorePasswordSecretId == null + ? 43 + : this.keyStorePasswordSecretId.hashCode()); + result = + (result * PRIME) + + (this.sslKeyPasswordSecretId == null + ? 43 + : this.sslKeyPasswordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/KafkaSchemaRegistryConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/KafkaSchemaRegistryConnection.java index 0920995fd33..0c01c7aea73 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/KafkaSchemaRegistryConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/KafkaSchemaRegistryConnection.java @@ -190,6 +190,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Kafka (e.g. Confluent) Schema Registry technology type. * @@ -247,7 +256,7 @@ public Builder authenticationType(AuthenticationType authenticationType) { return this; } /** - * The username to access Schema Registry using basic authentation. + * The username to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * **/ @@ -255,7 +264,7 @@ public Builder authenticationType(AuthenticationType authenticationType) { private String username; /** - * The username to access Schema Registry using basic authentation. + * The username to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * * @param username the value to set @@ -298,6 +307,132 @@ public Builder privateIp(String privateIp) { this.__explicitlySet__.add("privateIp"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Kafka Schema Registry password is stored, + * The password to access Schema Registry using basic authentication. + * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Kafka Schema Registry password is stored, + * The password to access Schema Registry using basic authentication. + * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + * @param trustStoreSecretId the value to set + * @return this builder + **/ + public Builder trustStoreSecretId(String trustStoreSecretId) { + this.trustStoreSecretId = trustStoreSecretId; + this.__explicitlySet__.add("trustStoreSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @param trustStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder trustStorePasswordSecretId(String trustStorePasswordSecretId) { + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.__explicitlySet__.add("trustStorePasswordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + * @param keyStoreSecretId the value to set + * @return this builder + **/ + public Builder keyStoreSecretId(String keyStoreSecretId) { + this.keyStoreSecretId = keyStoreSecretId; + this.__explicitlySet__.add("keyStoreSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @param keyStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder keyStorePasswordSecretId(String keyStorePasswordSecretId) { + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.__explicitlySet__.add("keyStorePasswordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the cert inside the KeyStore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the cert inside the KeyStore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @param sslKeyPasswordSecretId the value to set + * @return this builder + **/ + public Builder sslKeyPasswordSecretId(String sslKeyPasswordSecretId) { + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; + this.__explicitlySet__.add("sslKeyPasswordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -323,11 +458,18 @@ public KafkaSchemaRegistryConnection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.url, this.authenticationType, this.username, - this.privateIp); + this.privateIp, + this.passwordSecretId, + this.trustStoreSecretId, + this.trustStorePasswordSecretId, + this.keyStoreSecretId, + this.keyStorePasswordSecretId, + this.sslKeyPasswordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -390,6 +532,9 @@ public Builder copy(KafkaSchemaRegistryConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -405,6 +550,24 @@ public Builder copy(KafkaSchemaRegistryConnection model) { if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("trustStoreSecretId")) { + this.trustStoreSecretId(model.getTrustStoreSecretId()); + } + if (model.wasPropertyExplicitlySet("trustStorePasswordSecretId")) { + this.trustStorePasswordSecretId(model.getTrustStorePasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("keyStoreSecretId")) { + this.keyStoreSecretId(model.getKeyStoreSecretId()); + } + if (model.wasPropertyExplicitlySet("keyStorePasswordSecretId")) { + this.keyStorePasswordSecretId(model.getKeyStorePasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("sslKeyPasswordSecretId")) { + this.sslKeyPasswordSecretId(model.getSslKeyPasswordSecretId()); + } return this; } } @@ -440,11 +603,18 @@ public KafkaSchemaRegistryConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, String url, AuthenticationType authenticationType, String username, - String privateIp) { + String privateIp, + String passwordSecretId, + String trustStoreSecretId, + String trustStorePasswordSecretId, + String keyStoreSecretId, + String keyStorePasswordSecretId, + String sslKeyPasswordSecretId) { super( id, displayName, @@ -463,12 +633,19 @@ public KafkaSchemaRegistryConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.url = url; this.authenticationType = authenticationType; this.username = username; this.privateIp = privateIp; + this.passwordSecretId = passwordSecretId; + this.trustStoreSecretId = trustStoreSecretId; + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.keyStoreSecretId = keyStoreSecretId; + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; } /** @@ -620,7 +797,7 @@ public AuthenticationType getAuthenticationType() { } /** - * The username to access Schema Registry using basic authentation. + * The username to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * **/ @@ -628,7 +805,7 @@ public AuthenticationType getAuthenticationType() { private final String username; /** - * The username to access Schema Registry using basic authentation. + * The username to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * * @return the value @@ -667,6 +844,120 @@ public String getPrivateIp() { return privateIp; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Kafka Schema Registry password is stored, + * The password to access Schema Registry using basic authentication. + * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Kafka Schema Registry password is stored, + * The password to access Schema Registry using basic authentication. + * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private final String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + * @return the value + **/ + public String getTrustStoreSecretId() { + return trustStoreSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private final String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @return the value + **/ + public String getTrustStorePasswordSecretId() { + return trustStorePasswordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private final String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + * @return the value + **/ + public String getKeyStoreSecretId() { + return keyStoreSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private final String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @return the value + **/ + public String getKeyStorePasswordSecretId() { + return keyStorePasswordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the cert inside the KeyStore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private final String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the cert inside the KeyStore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @return the value + **/ + public String getSslKeyPasswordSecretId() { + return sslKeyPasswordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -686,6 +977,14 @@ public String toString(boolean includeByteArrayContents) { sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); + sb.append(", trustStoreSecretId=").append(String.valueOf(this.trustStoreSecretId)); + sb.append(", trustStorePasswordSecretId=") + .append(String.valueOf(this.trustStorePasswordSecretId)); + sb.append(", keyStoreSecretId=").append(String.valueOf(this.keyStoreSecretId)); + sb.append(", keyStorePasswordSecretId=") + .append(String.valueOf(this.keyStorePasswordSecretId)); + sb.append(", sslKeyPasswordSecretId=").append(String.valueOf(this.sslKeyPasswordSecretId)); sb.append(")"); return sb.toString(); } @@ -705,6 +1004,15 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.privateIp, other.privateIp) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) + && java.util.Objects.equals(this.trustStoreSecretId, other.trustStoreSecretId) + && java.util.Objects.equals( + this.trustStorePasswordSecretId, other.trustStorePasswordSecretId) + && java.util.Objects.equals(this.keyStoreSecretId, other.keyStoreSecretId) + && java.util.Objects.equals( + this.keyStorePasswordSecretId, other.keyStorePasswordSecretId) + && java.util.Objects.equals( + this.sslKeyPasswordSecretId, other.sslKeyPasswordSecretId) && super.equals(other); } @@ -723,6 +1031,32 @@ public int hashCode() { : this.authenticationType.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); + result = + (result * PRIME) + + (this.trustStoreSecretId == null + ? 43 + : this.trustStoreSecretId.hashCode()); + result = + (result * PRIME) + + (this.trustStorePasswordSecretId == null + ? 43 + : this.trustStorePasswordSecretId.hashCode()); + result = + (result * PRIME) + + (this.keyStoreSecretId == null ? 43 : this.keyStoreSecretId.hashCode()); + result = + (result * PRIME) + + (this.keyStorePasswordSecretId == null + ? 43 + : this.keyStorePasswordSecretId.hashCode()); + result = + (result * PRIME) + + (this.sslKeyPasswordSecretId == null + ? 43 + : this.sslKeyPasswordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/KafkaSchemaRegistryConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/KafkaSchemaRegistryConnectionSummary.java index 1d7f5694ded..8f9b1848e9b 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/KafkaSchemaRegistryConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/KafkaSchemaRegistryConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Kafka (e.g. Confluent) Schema Registry technology type. * @@ -248,7 +257,7 @@ public Builder authenticationType( return this; } /** - * The username to access Schema Registry using basic authentation. + * The username to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * **/ @@ -256,7 +265,7 @@ public Builder authenticationType( private String username; /** - * The username to access Schema Registry using basic authentation. + * The username to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * * @param username the value to set @@ -299,6 +308,132 @@ public Builder privateIp(String privateIp) { this.__explicitlySet__.add("privateIp"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Kafka Schema Registry password is stored, + * The password to access Schema Registry using basic authentication. + * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Kafka Schema Registry password is stored, + * The password to access Schema Registry using basic authentication. + * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + * @param trustStoreSecretId the value to set + * @return this builder + **/ + public Builder trustStoreSecretId(String trustStoreSecretId) { + this.trustStoreSecretId = trustStoreSecretId; + this.__explicitlySet__.add("trustStoreSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @param trustStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder trustStorePasswordSecretId(String trustStorePasswordSecretId) { + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.__explicitlySet__.add("trustStorePasswordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + * @param keyStoreSecretId the value to set + * @return this builder + **/ + public Builder keyStoreSecretId(String keyStoreSecretId) { + this.keyStoreSecretId = keyStoreSecretId; + this.__explicitlySet__.add("keyStoreSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @param keyStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder keyStorePasswordSecretId(String keyStorePasswordSecretId) { + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.__explicitlySet__.add("keyStorePasswordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the cert inside the KeyStore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the cert inside the KeyStore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @param sslKeyPasswordSecretId the value to set + * @return this builder + **/ + public Builder sslKeyPasswordSecretId(String sslKeyPasswordSecretId) { + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; + this.__explicitlySet__.add("sslKeyPasswordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -324,11 +459,18 @@ public KafkaSchemaRegistryConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, this.url, this.authenticationType, this.username, - this.privateIp); + this.privateIp, + this.passwordSecretId, + this.trustStoreSecretId, + this.trustStorePasswordSecretId, + this.keyStoreSecretId, + this.keyStorePasswordSecretId, + this.sslKeyPasswordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -391,6 +533,9 @@ public Builder copy(KafkaSchemaRegistryConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -406,6 +551,24 @@ public Builder copy(KafkaSchemaRegistryConnectionSummary model) { if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("trustStoreSecretId")) { + this.trustStoreSecretId(model.getTrustStoreSecretId()); + } + if (model.wasPropertyExplicitlySet("trustStorePasswordSecretId")) { + this.trustStorePasswordSecretId(model.getTrustStorePasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("keyStoreSecretId")) { + this.keyStoreSecretId(model.getKeyStoreSecretId()); + } + if (model.wasPropertyExplicitlySet("keyStorePasswordSecretId")) { + this.keyStorePasswordSecretId(model.getKeyStorePasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("sslKeyPasswordSecretId")) { + this.sslKeyPasswordSecretId(model.getSslKeyPasswordSecretId()); + } return this; } } @@ -441,11 +604,18 @@ public KafkaSchemaRegistryConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, KafkaSchemaRegistryConnection.TechnologyType technologyType, String url, KafkaSchemaRegistryConnection.AuthenticationType authenticationType, String username, - String privateIp) { + String privateIp, + String passwordSecretId, + String trustStoreSecretId, + String trustStorePasswordSecretId, + String keyStoreSecretId, + String keyStorePasswordSecretId, + String sslKeyPasswordSecretId) { super( id, displayName, @@ -464,12 +634,19 @@ public KafkaSchemaRegistryConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.url = url; this.authenticationType = authenticationType; this.username = username; this.privateIp = privateIp; + this.passwordSecretId = passwordSecretId; + this.trustStoreSecretId = trustStoreSecretId; + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.keyStoreSecretId = keyStoreSecretId; + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; } /** @@ -523,7 +700,7 @@ public KafkaSchemaRegistryConnection.AuthenticationType getAuthenticationType() } /** - * The username to access Schema Registry using basic authentation. + * The username to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * **/ @@ -531,7 +708,7 @@ public KafkaSchemaRegistryConnection.AuthenticationType getAuthenticationType() private final String username; /** - * The username to access Schema Registry using basic authentation. + * The username to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * * @return the value @@ -570,6 +747,120 @@ public String getPrivateIp() { return privateIp; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Kafka Schema Registry password is stored, + * The password to access Schema Registry using basic authentication. + * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Kafka Schema Registry password is stored, + * The password to access Schema Registry using basic authentication. + * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private final String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + * @return the value + **/ + public String getTrustStoreSecretId() { + return trustStoreSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private final String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @return the value + **/ + public String getTrustStorePasswordSecretId() { + return trustStorePasswordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private final String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + * @return the value + **/ + public String getKeyStoreSecretId() { + return keyStoreSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private final String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @return the value + **/ + public String getKeyStorePasswordSecretId() { + return keyStorePasswordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the cert inside the KeyStore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private final String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the cert inside the KeyStore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @return the value + **/ + public String getSslKeyPasswordSecretId() { + return sslKeyPasswordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -589,6 +880,14 @@ public String toString(boolean includeByteArrayContents) { sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); + sb.append(", trustStoreSecretId=").append(String.valueOf(this.trustStoreSecretId)); + sb.append(", trustStorePasswordSecretId=") + .append(String.valueOf(this.trustStorePasswordSecretId)); + sb.append(", keyStoreSecretId=").append(String.valueOf(this.keyStoreSecretId)); + sb.append(", keyStorePasswordSecretId=") + .append(String.valueOf(this.keyStorePasswordSecretId)); + sb.append(", sslKeyPasswordSecretId=").append(String.valueOf(this.sslKeyPasswordSecretId)); sb.append(")"); return sb.toString(); } @@ -608,6 +907,15 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.privateIp, other.privateIp) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) + && java.util.Objects.equals(this.trustStoreSecretId, other.trustStoreSecretId) + && java.util.Objects.equals( + this.trustStorePasswordSecretId, other.trustStorePasswordSecretId) + && java.util.Objects.equals(this.keyStoreSecretId, other.keyStoreSecretId) + && java.util.Objects.equals( + this.keyStorePasswordSecretId, other.keyStorePasswordSecretId) + && java.util.Objects.equals( + this.sslKeyPasswordSecretId, other.sslKeyPasswordSecretId) && super.equals(other); } @@ -626,6 +934,32 @@ public int hashCode() { : this.authenticationType.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); + result = + (result * PRIME) + + (this.trustStoreSecretId == null + ? 43 + : this.trustStoreSecretId.hashCode()); + result = + (result * PRIME) + + (this.trustStorePasswordSecretId == null + ? 43 + : this.trustStorePasswordSecretId.hashCode()); + result = + (result * PRIME) + + (this.keyStoreSecretId == null ? 43 : this.keyStoreSecretId.hashCode()); + result = + (result * PRIME) + + (this.keyStorePasswordSecretId == null + ? 43 + : this.keyStorePasswordSecretId.hashCode()); + result = + (result * PRIME) + + (this.sslKeyPasswordSecretId == null + ? 43 + : this.sslKeyPasswordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MicrosoftSqlserverConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MicrosoftSqlserverConnection.java index 34015c7f85e..9d110cdbf24 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MicrosoftSqlserverConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MicrosoftSqlserverConnection.java @@ -190,6 +190,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Microsoft SQL Server technology type. **/ @@ -386,6 +395,26 @@ public Builder privateIp(String privateIp) { this.__explicitlySet__.add("privateIp"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated Microsoft SQL Server. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated Microsoft SQL Server. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -411,6 +440,7 @@ public MicrosoftSqlserverConnection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.username, this.host, @@ -420,7 +450,8 @@ public MicrosoftSqlserverConnection build() { this.securityProtocol, this.sslCa, this.shouldValidateServerCertificate, - this.privateIp); + this.privateIp, + this.passwordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -483,6 +514,9 @@ public Builder copy(MicrosoftSqlserverConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -513,6 +547,9 @@ public Builder copy(MicrosoftSqlserverConnection model) { if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } return this; } } @@ -548,6 +585,7 @@ public MicrosoftSqlserverConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, String username, String host, @@ -557,7 +595,8 @@ public MicrosoftSqlserverConnection( SecurityProtocol securityProtocol, String sslCa, Boolean shouldValidateServerCertificate, - String privateIp) { + String privateIp, + String passwordSecretId) { super( id, displayName, @@ -576,7 +615,8 @@ public MicrosoftSqlserverConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.username = username; this.host = host; @@ -587,6 +627,7 @@ public MicrosoftSqlserverConnection( this.sslCa = sslCa; this.shouldValidateServerCertificate = shouldValidateServerCertificate; this.privateIp = privateIp; + this.passwordSecretId = passwordSecretId; } /** @@ -864,6 +905,24 @@ public String getPrivateIp() { return privateIp; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated Microsoft SQL Server. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated Microsoft SQL Server. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -889,6 +948,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", shouldValidateServerCertificate=") .append(String.valueOf(this.shouldValidateServerCertificate)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(")"); return sb.toString(); } @@ -914,6 +974,7 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.shouldValidateServerCertificate, other.shouldValidateServerCertificate) && java.util.Objects.equals(this.privateIp, other.privateIp) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && super.equals(other); } @@ -943,6 +1004,9 @@ public int hashCode() { ? 43 : this.shouldValidateServerCertificate.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MicrosoftSqlserverConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MicrosoftSqlserverConnectionSummary.java index 546b7635978..08f5787c482 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MicrosoftSqlserverConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MicrosoftSqlserverConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Microsoft SQL Server technology type. **/ @@ -387,6 +396,26 @@ public Builder privateIp(String privateIp) { this.__explicitlySet__.add("privateIp"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated Microsoft SQL Server. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated Microsoft SQL Server. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -412,6 +441,7 @@ public MicrosoftSqlserverConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, this.databaseName, this.host, @@ -421,7 +451,8 @@ public MicrosoftSqlserverConnectionSummary build() { this.securityProtocol, this.sslCa, this.shouldValidateServerCertificate, - this.privateIp); + this.privateIp, + this.passwordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -484,6 +515,9 @@ public Builder copy(MicrosoftSqlserverConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -514,6 +548,9 @@ public Builder copy(MicrosoftSqlserverConnectionSummary model) { if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } return this; } } @@ -549,6 +586,7 @@ public MicrosoftSqlserverConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, MicrosoftSqlserverConnection.TechnologyType technologyType, String databaseName, String host, @@ -558,7 +596,8 @@ public MicrosoftSqlserverConnectionSummary( MicrosoftSqlserverConnection.SecurityProtocol securityProtocol, String sslCa, Boolean shouldValidateServerCertificate, - String privateIp) { + String privateIp, + String passwordSecretId) { super( id, displayName, @@ -577,7 +616,8 @@ public MicrosoftSqlserverConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.databaseName = databaseName; this.host = host; @@ -588,6 +628,7 @@ public MicrosoftSqlserverConnectionSummary( this.sslCa = sslCa; this.shouldValidateServerCertificate = shouldValidateServerCertificate; this.privateIp = privateIp; + this.passwordSecretId = passwordSecretId; } /** @@ -766,6 +807,24 @@ public String getPrivateIp() { return privateIp; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated Microsoft SQL Server. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated Microsoft SQL Server. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -791,6 +850,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", shouldValidateServerCertificate=") .append(String.valueOf(this.shouldValidateServerCertificate)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(")"); return sb.toString(); } @@ -816,6 +876,7 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.shouldValidateServerCertificate, other.shouldValidateServerCertificate) && java.util.Objects.equals(this.privateIp, other.privateIp) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && super.equals(other); } @@ -845,6 +906,9 @@ public int hashCode() { ? 43 : this.shouldValidateServerCertificate.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MongoDbConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MongoDbConnection.java index 720c46d895f..27b3082301f 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MongoDbConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MongoDbConnection.java @@ -190,6 +190,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The MongoDB technology type. **/ @@ -264,6 +273,26 @@ public Builder databaseId(String databaseId) { this.__explicitlySet__.add("databaseId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated database. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated database. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -289,10 +318,12 @@ public MongoDbConnection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.connectionString, this.username, - this.databaseId); + this.databaseId, + this.passwordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -355,6 +386,9 @@ public Builder copy(MongoDbConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -367,6 +401,9 @@ public Builder copy(MongoDbConnection model) { if (model.wasPropertyExplicitlySet("databaseId")) { this.databaseId(model.getDatabaseId()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } return this; } } @@ -402,10 +439,12 @@ public MongoDbConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, String connectionString, String username, - String databaseId) { + String databaseId, + String passwordSecretId) { super( id, displayName, @@ -424,11 +463,13 @@ public MongoDbConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.connectionString = connectionString; this.username = username; this.databaseId = databaseId; + this.passwordSecretId = passwordSecretId; } /** @@ -546,6 +587,24 @@ public String getDatabaseId() { return databaseId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated database. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated database. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -564,6 +623,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", connectionString=").append(String.valueOf(this.connectionString)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", databaseId=").append(String.valueOf(this.databaseId)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(")"); return sb.toString(); } @@ -582,6 +642,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.connectionString, other.connectionString) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.databaseId, other.databaseId) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && super.equals(other); } @@ -597,6 +658,9 @@ public int hashCode() { + (this.connectionString == null ? 43 : this.connectionString.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.databaseId == null ? 43 : this.databaseId.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MongoDbConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MongoDbConnectionSummary.java index 3cf31905be8..246533ff042 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MongoDbConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MongoDbConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The MongoDB technology type. **/ @@ -264,6 +273,26 @@ public Builder databaseId(String databaseId) { this.__explicitlySet__.add("databaseId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated database. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated database. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -289,10 +318,12 @@ public MongoDbConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, this.connectionString, this.username, - this.databaseId); + this.databaseId, + this.passwordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -355,6 +386,9 @@ public Builder copy(MongoDbConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -367,6 +401,9 @@ public Builder copy(MongoDbConnectionSummary model) { if (model.wasPropertyExplicitlySet("databaseId")) { this.databaseId(model.getDatabaseId()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } return this; } } @@ -402,10 +439,12 @@ public MongoDbConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, MongoDbConnection.TechnologyType technologyType, String connectionString, String username, - String databaseId) { + String databaseId, + String passwordSecretId) { super( id, displayName, @@ -424,11 +463,13 @@ public MongoDbConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.connectionString = connectionString; this.username = username; this.databaseId = databaseId; + this.passwordSecretId = passwordSecretId; } /** @@ -497,6 +538,24 @@ public String getDatabaseId() { return databaseId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated database. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated database. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -515,6 +574,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", connectionString=").append(String.valueOf(this.connectionString)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", databaseId=").append(String.valueOf(this.databaseId)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(")"); return sb.toString(); } @@ -533,6 +593,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.connectionString, other.connectionString) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.databaseId, other.databaseId) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && super.equals(other); } @@ -548,6 +609,9 @@ public int hashCode() { + (this.connectionString == null ? 43 : this.connectionString.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.databaseId == null ? 43 : this.databaseId.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MysqlConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MysqlConnection.java index 698731f50ee..ef71b258007 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MysqlConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MysqlConnection.java @@ -188,6 +188,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The MySQL technology type. **/ @@ -382,6 +391,54 @@ public Builder dbSystemId(String dbSystemId) { this.__explicitlySet__.add("dbSystemId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key + * - The content of a .pem or .crt file containing the client private key (for 2-way SSL). + * Note: When provided, 'sslKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeySecretId") + private String sslKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key + * - The content of a .pem or .crt file containing the client private key (for 2-way SSL). + * Note: When provided, 'sslKey' field must not be provided. + * + * @param sslKeySecretId the value to set + * @return this builder + **/ + public Builder sslKeySecretId(String sslKeySecretId) { + this.sslKeySecretId = sslKeySecretId; + this.__explicitlySet__.add("sslKeySecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -407,6 +464,7 @@ public MysqlConnection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.username, this.host, @@ -416,7 +474,9 @@ public MysqlConnection build() { this.sslMode, this.privateIp, this.additionalAttributes, - this.dbSystemId); + this.dbSystemId, + this.passwordSecretId, + this.sslKeySecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -479,6 +539,9 @@ public Builder copy(MysqlConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -509,6 +572,12 @@ public Builder copy(MysqlConnection model) { if (model.wasPropertyExplicitlySet("dbSystemId")) { this.dbSystemId(model.getDbSystemId()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("sslKeySecretId")) { + this.sslKeySecretId(model.getSslKeySecretId()); + } return this; } } @@ -544,6 +613,7 @@ public MysqlConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, String username, String host, @@ -553,7 +623,9 @@ public MysqlConnection( SslMode sslMode, String privateIp, java.util.List additionalAttributes, - String dbSystemId) { + String dbSystemId, + String passwordSecretId, + String sslKeySecretId) { super( id, displayName, @@ -572,7 +644,8 @@ public MysqlConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.username = username; this.host = host; @@ -583,6 +656,8 @@ public MysqlConnection( this.privateIp = privateIp; this.additionalAttributes = additionalAttributes; this.dbSystemId = dbSystemId; + this.passwordSecretId = passwordSecretId; + this.sslKeySecretId = sslKeySecretId; } /** @@ -917,6 +992,50 @@ public String getDbSystemId() { return dbSystemId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key + * - The content of a .pem or .crt file containing the client private key (for 2-way SSL). + * Note: When provided, 'sslKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeySecretId") + private final String sslKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key + * - The content of a .pem or .crt file containing the client private key (for 2-way SSL). + * Note: When provided, 'sslKey' field must not be provided. + * + * @return the value + **/ + public String getSslKeySecretId() { + return sslKeySecretId; + } + @Override public String toString() { return this.toString(true); @@ -941,6 +1060,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(", additionalAttributes=").append(String.valueOf(this.additionalAttributes)); sb.append(", dbSystemId=").append(String.valueOf(this.dbSystemId)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); + sb.append(", sslKeySecretId=").append(String.valueOf(this.sslKeySecretId)); sb.append(")"); return sb.toString(); } @@ -965,6 +1086,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.privateIp, other.privateIp) && java.util.Objects.equals(this.additionalAttributes, other.additionalAttributes) && java.util.Objects.equals(this.dbSystemId, other.dbSystemId) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) + && java.util.Objects.equals(this.sslKeySecretId, other.sslKeySecretId) && super.equals(other); } @@ -990,6 +1113,12 @@ public int hashCode() { ? 43 : this.additionalAttributes.hashCode()); result = (result * PRIME) + (this.dbSystemId == null ? 43 : this.dbSystemId.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); + result = + (result * PRIME) + + (this.sslKeySecretId == null ? 43 : this.sslKeySecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MysqlConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MysqlConnectionSummary.java index 06d42d5ce3c..73c4dfe7348 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MysqlConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/MysqlConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The MySQL technology type. **/ @@ -384,6 +393,54 @@ public Builder dbSystemId(String dbSystemId) { this.__explicitlySet__.add("dbSystemId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key + * - The content of a .pem or .crt file containing the client private key (for 2-way SSL). + * Note: When provided, 'sslKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeySecretId") + private String sslKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key + * - The content of a .pem or .crt file containing the client private key (for 2-way SSL). + * Note: When provided, 'sslKey' field must not be provided. + * + * @param sslKeySecretId the value to set + * @return this builder + **/ + public Builder sslKeySecretId(String sslKeySecretId) { + this.sslKeySecretId = sslKeySecretId; + this.__explicitlySet__.add("sslKeySecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -409,6 +466,7 @@ public MysqlConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, this.username, this.host, @@ -418,7 +476,9 @@ public MysqlConnectionSummary build() { this.sslMode, this.privateIp, this.additionalAttributes, - this.dbSystemId); + this.dbSystemId, + this.passwordSecretId, + this.sslKeySecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -481,6 +541,9 @@ public Builder copy(MysqlConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -511,6 +574,12 @@ public Builder copy(MysqlConnectionSummary model) { if (model.wasPropertyExplicitlySet("dbSystemId")) { this.dbSystemId(model.getDbSystemId()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("sslKeySecretId")) { + this.sslKeySecretId(model.getSslKeySecretId()); + } return this; } } @@ -546,6 +615,7 @@ public MysqlConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, MysqlConnection.TechnologyType technologyType, String username, String host, @@ -555,7 +625,9 @@ public MysqlConnectionSummary( MysqlConnection.SslMode sslMode, String privateIp, java.util.List additionalAttributes, - String dbSystemId) { + String dbSystemId, + String passwordSecretId, + String sslKeySecretId) { super( id, displayName, @@ -574,7 +646,8 @@ public MysqlConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.username = username; this.host = host; @@ -585,6 +658,8 @@ public MysqlConnectionSummary( this.privateIp = privateIp; this.additionalAttributes = additionalAttributes; this.dbSystemId = dbSystemId; + this.passwordSecretId = passwordSecretId; + this.sslKeySecretId = sslKeySecretId; } /** @@ -761,6 +836,50 @@ public String getDbSystemId() { return dbSystemId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key + * - The content of a .pem or .crt file containing the client private key (for 2-way SSL). + * Note: When provided, 'sslKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeySecretId") + private final String sslKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key + * - The content of a .pem or .crt file containing the client private key (for 2-way SSL). + * Note: When provided, 'sslKey' field must not be provided. + * + * @return the value + **/ + public String getSslKeySecretId() { + return sslKeySecretId; + } + @Override public String toString() { return this.toString(true); @@ -785,6 +904,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(", additionalAttributes=").append(String.valueOf(this.additionalAttributes)); sb.append(", dbSystemId=").append(String.valueOf(this.dbSystemId)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); + sb.append(", sslKeySecretId=").append(String.valueOf(this.sslKeySecretId)); sb.append(")"); return sb.toString(); } @@ -809,6 +930,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.privateIp, other.privateIp) && java.util.Objects.equals(this.additionalAttributes, other.additionalAttributes) && java.util.Objects.equals(this.dbSystemId, other.dbSystemId) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) + && java.util.Objects.equals(this.sslKeySecretId, other.sslKeySecretId) && super.equals(other); } @@ -834,6 +957,12 @@ public int hashCode() { ? 43 : this.additionalAttributes.hashCode()); result = (result * PRIME) + (this.dbSystemId == null ? 43 : this.dbSystemId.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); + result = + (result * PRIME) + + (this.sslKeySecretId == null ? 43 : this.sslKeySecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OciObjectStorageConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OciObjectStorageConnection.java index 858f119db4d..db7e1cd5569 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OciObjectStorageConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OciObjectStorageConnection.java @@ -190,6 +190,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The OCI Object Storage technology type. **/ @@ -262,6 +271,48 @@ public Builder userId(String userId) { this.__explicitlySet__.add("userId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @param privateKeyFileSecretId the value to set + * @return this builder + **/ + public Builder privateKeyFileSecretId(String privateKeyFileSecretId) { + this.privateKeyFileSecretId = privateKeyFileSecretId; + this.__explicitlySet__.add("privateKeyFileSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @param privateKeyPassphraseSecretId the value to set + * @return this builder + **/ + public Builder privateKeyPassphraseSecretId(String privateKeyPassphraseSecretId) { + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; + this.__explicitlySet__.add("privateKeyPassphraseSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -287,10 +338,13 @@ public OciObjectStorageConnection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.tenancyId, this.region, - this.userId); + this.userId, + this.privateKeyFileSecretId, + this.privateKeyPassphraseSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -353,6 +407,9 @@ public Builder copy(OciObjectStorageConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -365,6 +422,12 @@ public Builder copy(OciObjectStorageConnection model) { if (model.wasPropertyExplicitlySet("userId")) { this.userId(model.getUserId()); } + if (model.wasPropertyExplicitlySet("privateKeyFileSecretId")) { + this.privateKeyFileSecretId(model.getPrivateKeyFileSecretId()); + } + if (model.wasPropertyExplicitlySet("privateKeyPassphraseSecretId")) { + this.privateKeyPassphraseSecretId(model.getPrivateKeyPassphraseSecretId()); + } return this; } } @@ -400,10 +463,13 @@ public OciObjectStorageConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, String tenancyId, String region, - String userId) { + String userId, + String privateKeyFileSecretId, + String privateKeyPassphraseSecretId) { super( id, displayName, @@ -422,11 +488,14 @@ public OciObjectStorageConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.tenancyId = tenancyId; this.region = region; this.userId = userId; + this.privateKeyFileSecretId = privateKeyFileSecretId; + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; } /** @@ -540,6 +609,44 @@ public String getUserId() { return userId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private final String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyFileSecretId() { + return privateKeyFileSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private final String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyPassphraseSecretId() { + return privateKeyPassphraseSecretId; + } + @Override public String toString() { return this.toString(true); @@ -558,6 +665,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", tenancyId=").append(String.valueOf(this.tenancyId)); sb.append(", region=").append(String.valueOf(this.region)); sb.append(", userId=").append(String.valueOf(this.userId)); + sb.append(", privateKeyFileSecretId=").append(String.valueOf(this.privateKeyFileSecretId)); + sb.append(", privateKeyPassphraseSecretId=") + .append(String.valueOf(this.privateKeyPassphraseSecretId)); sb.append(")"); return sb.toString(); } @@ -576,6 +686,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.tenancyId, other.tenancyId) && java.util.Objects.equals(this.region, other.region) && java.util.Objects.equals(this.userId, other.userId) + && java.util.Objects.equals( + this.privateKeyFileSecretId, other.privateKeyFileSecretId) + && java.util.Objects.equals( + this.privateKeyPassphraseSecretId, other.privateKeyPassphraseSecretId) && super.equals(other); } @@ -589,6 +703,16 @@ public int hashCode() { result = (result * PRIME) + (this.tenancyId == null ? 43 : this.tenancyId.hashCode()); result = (result * PRIME) + (this.region == null ? 43 : this.region.hashCode()); result = (result * PRIME) + (this.userId == null ? 43 : this.userId.hashCode()); + result = + (result * PRIME) + + (this.privateKeyFileSecretId == null + ? 43 + : this.privateKeyFileSecretId.hashCode()); + result = + (result * PRIME) + + (this.privateKeyPassphraseSecretId == null + ? 43 + : this.privateKeyPassphraseSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OciObjectStorageConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OciObjectStorageConnectionSummary.java index 044e301aa1a..ff5dda9f05f 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OciObjectStorageConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OciObjectStorageConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The OCI Object Storage technology type. **/ @@ -262,6 +271,48 @@ public Builder userId(String userId) { this.__explicitlySet__.add("userId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @param privateKeyFileSecretId the value to set + * @return this builder + **/ + public Builder privateKeyFileSecretId(String privateKeyFileSecretId) { + this.privateKeyFileSecretId = privateKeyFileSecretId; + this.__explicitlySet__.add("privateKeyFileSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @param privateKeyPassphraseSecretId the value to set + * @return this builder + **/ + public Builder privateKeyPassphraseSecretId(String privateKeyPassphraseSecretId) { + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; + this.__explicitlySet__.add("privateKeyPassphraseSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -287,10 +338,13 @@ public OciObjectStorageConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, this.tenancyId, this.region, - this.userId); + this.userId, + this.privateKeyFileSecretId, + this.privateKeyPassphraseSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -353,6 +407,9 @@ public Builder copy(OciObjectStorageConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -365,6 +422,12 @@ public Builder copy(OciObjectStorageConnectionSummary model) { if (model.wasPropertyExplicitlySet("userId")) { this.userId(model.getUserId()); } + if (model.wasPropertyExplicitlySet("privateKeyFileSecretId")) { + this.privateKeyFileSecretId(model.getPrivateKeyFileSecretId()); + } + if (model.wasPropertyExplicitlySet("privateKeyPassphraseSecretId")) { + this.privateKeyPassphraseSecretId(model.getPrivateKeyPassphraseSecretId()); + } return this; } } @@ -400,10 +463,13 @@ public OciObjectStorageConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, OciObjectStorageConnection.TechnologyType technologyType, String tenancyId, String region, - String userId) { + String userId, + String privateKeyFileSecretId, + String privateKeyPassphraseSecretId) { super( id, displayName, @@ -422,11 +488,14 @@ public OciObjectStorageConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.tenancyId = tenancyId; this.region = region; this.userId = userId; + this.privateKeyFileSecretId = privateKeyFileSecretId; + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; } /** @@ -493,6 +562,44 @@ public String getUserId() { return userId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private final String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyFileSecretId() { + return privateKeyFileSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private final String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyPassphraseSecretId() { + return privateKeyPassphraseSecretId; + } + @Override public String toString() { return this.toString(true); @@ -511,6 +618,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", tenancyId=").append(String.valueOf(this.tenancyId)); sb.append(", region=").append(String.valueOf(this.region)); sb.append(", userId=").append(String.valueOf(this.userId)); + sb.append(", privateKeyFileSecretId=").append(String.valueOf(this.privateKeyFileSecretId)); + sb.append(", privateKeyPassphraseSecretId=") + .append(String.valueOf(this.privateKeyPassphraseSecretId)); sb.append(")"); return sb.toString(); } @@ -529,6 +639,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.tenancyId, other.tenancyId) && java.util.Objects.equals(this.region, other.region) && java.util.Objects.equals(this.userId, other.userId) + && java.util.Objects.equals( + this.privateKeyFileSecretId, other.privateKeyFileSecretId) + && java.util.Objects.equals( + this.privateKeyPassphraseSecretId, other.privateKeyPassphraseSecretId) && super.equals(other); } @@ -542,6 +656,16 @@ public int hashCode() { result = (result * PRIME) + (this.tenancyId == null ? 43 : this.tenancyId.hashCode()); result = (result * PRIME) + (this.region == null ? 43 : this.region.hashCode()); result = (result * PRIME) + (this.userId == null ? 43 : this.userId.hashCode()); + result = + (result * PRIME) + + (this.privateKeyFileSecretId == null + ? 43 + : this.privateKeyFileSecretId.hashCode()); + result = + (result * PRIME) + + (this.privateKeyPassphraseSecretId == null + ? 43 + : this.privateKeyPassphraseSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OggDeployment.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OggDeployment.java index 50270a5cdf7..dbb14237d4c 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OggDeployment.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OggDeployment.java @@ -27,7 +27,8 @@ public final class OggDeployment extends com.oracle.bmc.http.internal.Explicitly "certificate", "credentialStore", "identityDomainId", - "passwordSecretId" + "passwordSecretId", + "groupToRolesMapping" }) public OggDeployment( String deploymentName, @@ -36,7 +37,8 @@ public OggDeployment( String certificate, CredentialStore credentialStore, String identityDomainId, - String passwordSecretId) { + String passwordSecretId, + GroupToRolesMappingDetails groupToRolesMapping) { super(); this.deploymentName = deploymentName; this.adminUsername = adminUsername; @@ -45,6 +47,7 @@ public OggDeployment( this.credentialStore = credentialStore; this.identityDomainId = identityDomainId; this.passwordSecretId = passwordSecretId; + this.groupToRolesMapping = groupToRolesMapping; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -178,6 +181,15 @@ public Builder passwordSecretId(String passwordSecretId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("groupToRolesMapping") + private GroupToRolesMappingDetails groupToRolesMapping; + + public Builder groupToRolesMapping(GroupToRolesMappingDetails groupToRolesMapping) { + this.groupToRolesMapping = groupToRolesMapping; + this.__explicitlySet__.add("groupToRolesMapping"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -190,7 +202,8 @@ public OggDeployment build() { this.certificate, this.credentialStore, this.identityDomainId, - this.passwordSecretId); + this.passwordSecretId, + this.groupToRolesMapping); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -220,6 +233,9 @@ public Builder copy(OggDeployment model) { if (model.wasPropertyExplicitlySet("passwordSecretId")) { this.passwordSecretId(model.getPasswordSecretId()); } + if (model.wasPropertyExplicitlySet("groupToRolesMapping")) { + this.groupToRolesMapping(model.getGroupToRolesMapping()); + } return this; } } @@ -349,6 +365,13 @@ public String getPasswordSecretId() { return passwordSecretId; } + @com.fasterxml.jackson.annotation.JsonProperty("groupToRolesMapping") + private final GroupToRolesMappingDetails groupToRolesMapping; + + public GroupToRolesMappingDetails getGroupToRolesMapping() { + return groupToRolesMapping; + } + @Override public String toString() { return this.toString(true); @@ -370,6 +393,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", credentialStore=").append(String.valueOf(this.credentialStore)); sb.append(", identityDomainId=").append(String.valueOf(this.identityDomainId)); sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); + sb.append(", groupToRolesMapping=").append(String.valueOf(this.groupToRolesMapping)); sb.append(")"); return sb.toString(); } @@ -391,6 +415,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.credentialStore, other.credentialStore) && java.util.Objects.equals(this.identityDomainId, other.identityDomainId) && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) + && java.util.Objects.equals(this.groupToRolesMapping, other.groupToRolesMapping) && super.equals(other); } @@ -415,6 +440,11 @@ public int hashCode() { result = (result * PRIME) + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); + result = + (result * PRIME) + + (this.groupToRolesMapping == null + ? 43 + : this.groupToRolesMapping.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OperationType.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OperationType.java index a08aeb6c33a..527a55e0902 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OperationType.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OperationType.java @@ -32,6 +32,7 @@ public enum OperationType { GoldengateConnectionUpdate("GOLDENGATE_CONNECTION_UPDATE"), GoldengateConnectionDelete("GOLDENGATE_CONNECTION_DELETE"), GoldengateConnectionMove("GOLDENGATE_CONNECTION_MOVE"), + GoldengateConnectionRefresh("GOLDENGATE_CONNECTION_REFRESH"), GoldengateConnectionAssignmentCreate("GOLDENGATE_CONNECTION_ASSIGNMENT_CREATE"), GoldengateConnectionAssignmentDelete("GOLDENGATE_CONNECTION_ASSIGNMENT_DELETE"), GoldengateConnectionAssigmnentDelete("GOLDENGATE_CONNECTION_ASSIGMNENT_DELETE"), diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OracleConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OracleConnection.java index 311ccfc29b7..0faad5f946b 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OracleConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OracleConnection.java @@ -188,6 +188,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Oracle technology type. **/ @@ -338,6 +347,54 @@ public Builder databaseId(String databaseId) { this.__explicitlySet__.add("databaseId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the wallet file is stored. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * Note: When provided, 'wallet' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("walletSecretId") + private String walletSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the wallet file is stored. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * Note: When provided, 'wallet' field must not be provided. + * + * @param walletSecretId the value to set + * @return this builder + **/ + public Builder walletSecretId(String walletSecretId) { + this.walletSecretId = walletSecretId; + this.__explicitlySet__.add("walletSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -363,13 +420,16 @@ public OracleConnection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.username, this.connectionString, this.authenticationMode, this.sessionMode, this.privateIp, - this.databaseId); + this.databaseId, + this.passwordSecretId, + this.walletSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -432,6 +492,9 @@ public Builder copy(OracleConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -453,6 +516,12 @@ public Builder copy(OracleConnection model) { if (model.wasPropertyExplicitlySet("databaseId")) { this.databaseId(model.getDatabaseId()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("walletSecretId")) { + this.walletSecretId(model.getWalletSecretId()); + } return this; } } @@ -488,13 +557,16 @@ public OracleConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, String username, String connectionString, AuthenticationMode authenticationMode, SessionMode sessionMode, String privateIp, - String databaseId) { + String databaseId, + String passwordSecretId, + String walletSecretId) { super( id, displayName, @@ -513,7 +585,8 @@ public OracleConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.username = username; this.connectionString = connectionString; @@ -521,6 +594,8 @@ public OracleConnection( this.sessionMode = sessionMode; this.privateIp = privateIp; this.databaseId = databaseId; + this.passwordSecretId = passwordSecretId; + this.walletSecretId = walletSecretId; } /** @@ -812,6 +887,50 @@ public String getDatabaseId() { return databaseId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the wallet file is stored. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * Note: When provided, 'wallet' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("walletSecretId") + private final String walletSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the wallet file is stored. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * Note: When provided, 'wallet' field must not be provided. + * + * @return the value + **/ + public String getWalletSecretId() { + return walletSecretId; + } + @Override public String toString() { return this.toString(true); @@ -833,6 +952,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", sessionMode=").append(String.valueOf(this.sessionMode)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(", databaseId=").append(String.valueOf(this.databaseId)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); + sb.append(", walletSecretId=").append(String.valueOf(this.walletSecretId)); sb.append(")"); return sb.toString(); } @@ -854,6 +975,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.sessionMode, other.sessionMode) && java.util.Objects.equals(this.privateIp, other.privateIp) && java.util.Objects.equals(this.databaseId, other.databaseId) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) + && java.util.Objects.equals(this.walletSecretId, other.walletSecretId) && super.equals(other); } @@ -876,6 +999,12 @@ public int hashCode() { result = (result * PRIME) + (this.sessionMode == null ? 43 : this.sessionMode.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); result = (result * PRIME) + (this.databaseId == null ? 43 : this.databaseId.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); + result = + (result * PRIME) + + (this.walletSecretId == null ? 43 : this.walletSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OracleConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OracleConnectionSummary.java index 3c73f5af02a..f56724bffe4 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OracleConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OracleConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Oracle technology type. **/ @@ -340,6 +349,54 @@ public Builder databaseId(String databaseId) { this.__explicitlySet__.add("databaseId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the wallet file is stored. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * Note: When provided, 'wallet' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("walletSecretId") + private String walletSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the wallet file is stored. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * Note: When provided, 'wallet' field must not be provided. + * + * @param walletSecretId the value to set + * @return this builder + **/ + public Builder walletSecretId(String walletSecretId) { + this.walletSecretId = walletSecretId; + this.__explicitlySet__.add("walletSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -365,13 +422,16 @@ public OracleConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, this.username, this.connectionString, this.authenticationMode, this.sessionMode, this.privateIp, - this.databaseId); + this.databaseId, + this.passwordSecretId, + this.walletSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -434,6 +494,9 @@ public Builder copy(OracleConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -455,6 +518,12 @@ public Builder copy(OracleConnectionSummary model) { if (model.wasPropertyExplicitlySet("databaseId")) { this.databaseId(model.getDatabaseId()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("walletSecretId")) { + this.walletSecretId(model.getWalletSecretId()); + } return this; } } @@ -490,13 +559,16 @@ public OracleConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, OracleConnection.TechnologyType technologyType, String username, String connectionString, OracleConnection.AuthenticationMode authenticationMode, OracleConnection.SessionMode sessionMode, String privateIp, - String databaseId) { + String databaseId, + String passwordSecretId, + String walletSecretId) { super( id, displayName, @@ -515,7 +587,8 @@ public OracleConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.username = username; this.connectionString = connectionString; @@ -523,6 +596,8 @@ public OracleConnectionSummary( this.sessionMode = sessionMode; this.privateIp = privateIp; this.databaseId = databaseId; + this.passwordSecretId = passwordSecretId; + this.walletSecretId = walletSecretId; } /** @@ -661,6 +736,50 @@ public String getDatabaseId() { return databaseId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the wallet file is stored. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * Note: When provided, 'wallet' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("walletSecretId") + private final String walletSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the wallet file is stored. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * Note: When provided, 'wallet' field must not be provided. + * + * @return the value + **/ + public String getWalletSecretId() { + return walletSecretId; + } + @Override public String toString() { return this.toString(true); @@ -682,6 +801,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", sessionMode=").append(String.valueOf(this.sessionMode)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(", databaseId=").append(String.valueOf(this.databaseId)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); + sb.append(", walletSecretId=").append(String.valueOf(this.walletSecretId)); sb.append(")"); return sb.toString(); } @@ -703,6 +824,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.sessionMode, other.sessionMode) && java.util.Objects.equals(this.privateIp, other.privateIp) && java.util.Objects.equals(this.databaseId, other.databaseId) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) + && java.util.Objects.equals(this.walletSecretId, other.walletSecretId) && super.equals(other); } @@ -725,6 +848,12 @@ public int hashCode() { result = (result * PRIME) + (this.sessionMode == null ? 43 : this.sessionMode.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); result = (result * PRIME) + (this.databaseId == null ? 43 : this.databaseId.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); + result = + (result * PRIME) + + (this.walletSecretId == null ? 43 : this.walletSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OracleNosqlConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OracleNosqlConnection.java index ee6aa65275d..40e3ec04236 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OracleNosqlConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OracleNosqlConnection.java @@ -190,6 +190,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Oracle NoSQL technology type. **/ @@ -262,6 +271,48 @@ public Builder userId(String userId) { this.__explicitlySet__.add("userId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @param privateKeyFileSecretId the value to set + * @return this builder + **/ + public Builder privateKeyFileSecretId(String privateKeyFileSecretId) { + this.privateKeyFileSecretId = privateKeyFileSecretId; + this.__explicitlySet__.add("privateKeyFileSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @param privateKeyPassphraseSecretId the value to set + * @return this builder + **/ + public Builder privateKeyPassphraseSecretId(String privateKeyPassphraseSecretId) { + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; + this.__explicitlySet__.add("privateKeyPassphraseSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -287,10 +338,13 @@ public OracleNosqlConnection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.tenancyId, this.region, - this.userId); + this.userId, + this.privateKeyFileSecretId, + this.privateKeyPassphraseSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -353,6 +407,9 @@ public Builder copy(OracleNosqlConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -365,6 +422,12 @@ public Builder copy(OracleNosqlConnection model) { if (model.wasPropertyExplicitlySet("userId")) { this.userId(model.getUserId()); } + if (model.wasPropertyExplicitlySet("privateKeyFileSecretId")) { + this.privateKeyFileSecretId(model.getPrivateKeyFileSecretId()); + } + if (model.wasPropertyExplicitlySet("privateKeyPassphraseSecretId")) { + this.privateKeyPassphraseSecretId(model.getPrivateKeyPassphraseSecretId()); + } return this; } } @@ -400,10 +463,13 @@ public OracleNosqlConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, String tenancyId, String region, - String userId) { + String userId, + String privateKeyFileSecretId, + String privateKeyPassphraseSecretId) { super( id, displayName, @@ -422,11 +488,14 @@ public OracleNosqlConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.tenancyId = tenancyId; this.region = region; this.userId = userId; + this.privateKeyFileSecretId = privateKeyFileSecretId; + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; } /** @@ -540,6 +609,44 @@ public String getUserId() { return userId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private final String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyFileSecretId() { + return privateKeyFileSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private final String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyPassphraseSecretId() { + return privateKeyPassphraseSecretId; + } + @Override public String toString() { return this.toString(true); @@ -558,6 +665,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", tenancyId=").append(String.valueOf(this.tenancyId)); sb.append(", region=").append(String.valueOf(this.region)); sb.append(", userId=").append(String.valueOf(this.userId)); + sb.append(", privateKeyFileSecretId=").append(String.valueOf(this.privateKeyFileSecretId)); + sb.append(", privateKeyPassphraseSecretId=") + .append(String.valueOf(this.privateKeyPassphraseSecretId)); sb.append(")"); return sb.toString(); } @@ -576,6 +686,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.tenancyId, other.tenancyId) && java.util.Objects.equals(this.region, other.region) && java.util.Objects.equals(this.userId, other.userId) + && java.util.Objects.equals( + this.privateKeyFileSecretId, other.privateKeyFileSecretId) + && java.util.Objects.equals( + this.privateKeyPassphraseSecretId, other.privateKeyPassphraseSecretId) && super.equals(other); } @@ -589,6 +703,16 @@ public int hashCode() { result = (result * PRIME) + (this.tenancyId == null ? 43 : this.tenancyId.hashCode()); result = (result * PRIME) + (this.region == null ? 43 : this.region.hashCode()); result = (result * PRIME) + (this.userId == null ? 43 : this.userId.hashCode()); + result = + (result * PRIME) + + (this.privateKeyFileSecretId == null + ? 43 + : this.privateKeyFileSecretId.hashCode()); + result = + (result * PRIME) + + (this.privateKeyPassphraseSecretId == null + ? 43 + : this.privateKeyPassphraseSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OracleNosqlConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OracleNosqlConnectionSummary.java index ff6104fafba..d1c35407d07 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OracleNosqlConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/OracleNosqlConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Oracle NoSQL technology type. **/ @@ -262,6 +271,48 @@ public Builder userId(String userId) { this.__explicitlySet__.add("userId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @param privateKeyFileSecretId the value to set + * @return this builder + **/ + public Builder privateKeyFileSecretId(String privateKeyFileSecretId) { + this.privateKeyFileSecretId = privateKeyFileSecretId; + this.__explicitlySet__.add("privateKeyFileSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @param privateKeyPassphraseSecretId the value to set + * @return this builder + **/ + public Builder privateKeyPassphraseSecretId(String privateKeyPassphraseSecretId) { + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; + this.__explicitlySet__.add("privateKeyPassphraseSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -287,10 +338,13 @@ public OracleNosqlConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, this.tenancyId, this.region, - this.userId); + this.userId, + this.privateKeyFileSecretId, + this.privateKeyPassphraseSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -353,6 +407,9 @@ public Builder copy(OracleNosqlConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -365,6 +422,12 @@ public Builder copy(OracleNosqlConnectionSummary model) { if (model.wasPropertyExplicitlySet("userId")) { this.userId(model.getUserId()); } + if (model.wasPropertyExplicitlySet("privateKeyFileSecretId")) { + this.privateKeyFileSecretId(model.getPrivateKeyFileSecretId()); + } + if (model.wasPropertyExplicitlySet("privateKeyPassphraseSecretId")) { + this.privateKeyPassphraseSecretId(model.getPrivateKeyPassphraseSecretId()); + } return this; } } @@ -400,10 +463,13 @@ public OracleNosqlConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, OracleNosqlConnection.TechnologyType technologyType, String tenancyId, String region, - String userId) { + String userId, + String privateKeyFileSecretId, + String privateKeyPassphraseSecretId) { super( id, displayName, @@ -422,11 +488,14 @@ public OracleNosqlConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.tenancyId = tenancyId; this.region = region; this.userId = userId; + this.privateKeyFileSecretId = privateKeyFileSecretId; + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; } /** @@ -493,6 +562,44 @@ public String getUserId() { return userId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private final String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyFileSecretId() { + return privateKeyFileSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private final String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyPassphraseSecretId() { + return privateKeyPassphraseSecretId; + } + @Override public String toString() { return this.toString(true); @@ -511,6 +618,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", tenancyId=").append(String.valueOf(this.tenancyId)); sb.append(", region=").append(String.valueOf(this.region)); sb.append(", userId=").append(String.valueOf(this.userId)); + sb.append(", privateKeyFileSecretId=").append(String.valueOf(this.privateKeyFileSecretId)); + sb.append(", privateKeyPassphraseSecretId=") + .append(String.valueOf(this.privateKeyPassphraseSecretId)); sb.append(")"); return sb.toString(); } @@ -529,6 +639,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.tenancyId, other.tenancyId) && java.util.Objects.equals(this.region, other.region) && java.util.Objects.equals(this.userId, other.userId) + && java.util.Objects.equals( + this.privateKeyFileSecretId, other.privateKeyFileSecretId) + && java.util.Objects.equals( + this.privateKeyPassphraseSecretId, other.privateKeyPassphraseSecretId) && super.equals(other); } @@ -542,6 +656,16 @@ public int hashCode() { result = (result * PRIME) + (this.tenancyId == null ? 43 : this.tenancyId.hashCode()); result = (result * PRIME) + (this.region == null ? 43 : this.region.hashCode()); result = (result * PRIME) + (this.userId == null ? 43 : this.userId.hashCode()); + result = + (result * PRIME) + + (this.privateKeyFileSecretId == null + ? 43 + : this.privateKeyFileSecretId.hashCode()); + result = + (result * PRIME) + + (this.privateKeyPassphraseSecretId == null + ? 43 + : this.privateKeyPassphraseSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/PostgresqlConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/PostgresqlConnection.java index 76a04819f1f..209bea3d9a0 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/PostgresqlConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/PostgresqlConnection.java @@ -190,6 +190,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The PostgreSQL technology type. **/ @@ -384,6 +393,52 @@ public Builder dbSystemId(String dbSystemId) { this.__explicitlySet__.add("dbSystemId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the private key of the PostgreSQL server. The supported file formats are .pem and .crt. + * Note: When provided, 'sslKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeySecretId") + private String sslKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the private key of the PostgreSQL server. The supported file formats are .pem and .crt. + * Note: When provided, 'sslKey' field must not be provided. + * + * @param sslKeySecretId the value to set + * @return this builder + **/ + public Builder sslKeySecretId(String sslKeySecretId) { + this.sslKeySecretId = sslKeySecretId; + this.__explicitlySet__.add("sslKeySecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -409,6 +464,7 @@ public PostgresqlConnection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.databaseName, this.host, @@ -418,7 +474,9 @@ public PostgresqlConnection build() { this.securityProtocol, this.sslMode, this.privateIp, - this.dbSystemId); + this.dbSystemId, + this.passwordSecretId, + this.sslKeySecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -481,6 +539,9 @@ public Builder copy(PostgresqlConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -511,6 +572,12 @@ public Builder copy(PostgresqlConnection model) { if (model.wasPropertyExplicitlySet("dbSystemId")) { this.dbSystemId(model.getDbSystemId()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("sslKeySecretId")) { + this.sslKeySecretId(model.getSslKeySecretId()); + } return this; } } @@ -546,6 +613,7 @@ public PostgresqlConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, String databaseName, String host, @@ -555,7 +623,9 @@ public PostgresqlConnection( SecurityProtocol securityProtocol, SslMode sslMode, String privateIp, - String dbSystemId) { + String dbSystemId, + String passwordSecretId, + String sslKeySecretId) { super( id, displayName, @@ -574,7 +644,8 @@ public PostgresqlConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.databaseName = databaseName; this.host = host; @@ -585,6 +656,8 @@ public PostgresqlConnection( this.sslMode = sslMode; this.privateIp = privateIp; this.dbSystemId = dbSystemId; + this.passwordSecretId = passwordSecretId; + this.sslKeySecretId = sslKeySecretId; } /** @@ -913,6 +986,48 @@ public String getDbSystemId() { return dbSystemId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the private key of the PostgreSQL server. The supported file formats are .pem and .crt. + * Note: When provided, 'sslKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeySecretId") + private final String sslKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the private key of the PostgreSQL server. The supported file formats are .pem and .crt. + * Note: When provided, 'sslKey' field must not be provided. + * + * @return the value + **/ + public String getSslKeySecretId() { + return sslKeySecretId; + } + @Override public String toString() { return this.toString(true); @@ -937,6 +1052,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", sslMode=").append(String.valueOf(this.sslMode)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(", dbSystemId=").append(String.valueOf(this.dbSystemId)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); + sb.append(", sslKeySecretId=").append(String.valueOf(this.sslKeySecretId)); sb.append(")"); return sb.toString(); } @@ -961,6 +1078,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.sslMode, other.sslMode) && java.util.Objects.equals(this.privateIp, other.privateIp) && java.util.Objects.equals(this.dbSystemId, other.dbSystemId) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) + && java.util.Objects.equals(this.sslKeySecretId, other.sslKeySecretId) && super.equals(other); } @@ -986,6 +1105,12 @@ public int hashCode() { result = (result * PRIME) + (this.sslMode == null ? 43 : this.sslMode.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); result = (result * PRIME) + (this.dbSystemId == null ? 43 : this.dbSystemId.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); + result = + (result * PRIME) + + (this.sslKeySecretId == null ? 43 : this.sslKeySecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/PostgresqlConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/PostgresqlConnectionSummary.java index 8f3e6d936d1..06559d95b6b 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/PostgresqlConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/PostgresqlConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The PostgreSQL technology type. **/ @@ -384,6 +393,52 @@ public Builder dbSystemId(String dbSystemId) { this.__explicitlySet__.add("dbSystemId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the private key of the PostgreSQL server. The supported file formats are .pem and .crt. + * Note: When provided, 'sslKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeySecretId") + private String sslKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the private key of the PostgreSQL server. The supported file formats are .pem and .crt. + * Note: When provided, 'sslKey' field must not be provided. + * + * @param sslKeySecretId the value to set + * @return this builder + **/ + public Builder sslKeySecretId(String sslKeySecretId) { + this.sslKeySecretId = sslKeySecretId; + this.__explicitlySet__.add("sslKeySecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -409,6 +464,7 @@ public PostgresqlConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, this.databaseName, this.host, @@ -418,7 +474,9 @@ public PostgresqlConnectionSummary build() { this.securityProtocol, this.sslMode, this.privateIp, - this.dbSystemId); + this.dbSystemId, + this.passwordSecretId, + this.sslKeySecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -481,6 +539,9 @@ public Builder copy(PostgresqlConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -511,6 +572,12 @@ public Builder copy(PostgresqlConnectionSummary model) { if (model.wasPropertyExplicitlySet("dbSystemId")) { this.dbSystemId(model.getDbSystemId()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("sslKeySecretId")) { + this.sslKeySecretId(model.getSslKeySecretId()); + } return this; } } @@ -546,6 +613,7 @@ public PostgresqlConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, PostgresqlConnection.TechnologyType technologyType, String databaseName, String host, @@ -555,7 +623,9 @@ public PostgresqlConnectionSummary( PostgresqlConnection.SecurityProtocol securityProtocol, PostgresqlConnection.SslMode sslMode, String privateIp, - String dbSystemId) { + String dbSystemId, + String passwordSecretId, + String sslKeySecretId) { super( id, displayName, @@ -574,7 +644,8 @@ public PostgresqlConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.databaseName = databaseName; this.host = host; @@ -585,6 +656,8 @@ public PostgresqlConnectionSummary( this.sslMode = sslMode; this.privateIp = privateIp; this.dbSystemId = dbSystemId; + this.passwordSecretId = passwordSecretId; + this.sslKeySecretId = sslKeySecretId; } /** @@ -761,6 +834,48 @@ public String getDbSystemId() { return dbSystemId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the private key of the PostgreSQL server. The supported file formats are .pem and .crt. + * Note: When provided, 'sslKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeySecretId") + private final String sslKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the private key of the PostgreSQL server. The supported file formats are .pem and .crt. + * Note: When provided, 'sslKey' field must not be provided. + * + * @return the value + **/ + public String getSslKeySecretId() { + return sslKeySecretId; + } + @Override public String toString() { return this.toString(true); @@ -785,6 +900,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", sslMode=").append(String.valueOf(this.sslMode)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(", dbSystemId=").append(String.valueOf(this.dbSystemId)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); + sb.append(", sslKeySecretId=").append(String.valueOf(this.sslKeySecretId)); sb.append(")"); return sb.toString(); } @@ -809,6 +926,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.sslMode, other.sslMode) && java.util.Objects.equals(this.privateIp, other.privateIp) && java.util.Objects.equals(this.dbSystemId, other.dbSystemId) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) + && java.util.Objects.equals(this.sslKeySecretId, other.sslKeySecretId) && super.equals(other); } @@ -834,6 +953,12 @@ public int hashCode() { result = (result * PRIME) + (this.sslMode == null ? 43 : this.sslMode.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); result = (result * PRIME) + (this.dbSystemId == null ? 43 : this.dbSystemId.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); + result = + (result * PRIME) + + (this.sslKeySecretId == null ? 43 : this.sslKeySecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/RedisConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/RedisConnection.java index a1e8e8d289d..adb667b6491 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/RedisConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/RedisConnection.java @@ -188,6 +188,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Redis technology type. **/ @@ -300,6 +309,112 @@ public Builder redisClusterId(String redisClusterId) { this.__explicitlySet__.add("redisClusterId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + * @param trustStoreSecretId the value to set + * @return this builder + **/ + public Builder trustStoreSecretId(String trustStoreSecretId) { + this.trustStoreSecretId = trustStoreSecretId; + this.__explicitlySet__.add("trustStoreSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @param trustStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder trustStorePasswordSecretId(String trustStorePasswordSecretId) { + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.__explicitlySet__.add("trustStorePasswordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + * @param keyStoreSecretId the value to set + * @return this builder + **/ + public Builder keyStoreSecretId(String keyStoreSecretId) { + this.keyStoreSecretId = keyStoreSecretId; + this.__explicitlySet__.add("keyStoreSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @param keyStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder keyStorePasswordSecretId(String keyStorePasswordSecretId) { + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.__explicitlySet__.add("keyStorePasswordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -325,12 +440,18 @@ public RedisConnection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.servers, this.securityProtocol, this.authenticationType, this.username, - this.redisClusterId); + this.redisClusterId, + this.passwordSecretId, + this.trustStoreSecretId, + this.trustStorePasswordSecretId, + this.keyStoreSecretId, + this.keyStorePasswordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -393,6 +514,9 @@ public Builder copy(RedisConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -411,6 +535,21 @@ public Builder copy(RedisConnection model) { if (model.wasPropertyExplicitlySet("redisClusterId")) { this.redisClusterId(model.getRedisClusterId()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("trustStoreSecretId")) { + this.trustStoreSecretId(model.getTrustStoreSecretId()); + } + if (model.wasPropertyExplicitlySet("trustStorePasswordSecretId")) { + this.trustStorePasswordSecretId(model.getTrustStorePasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("keyStoreSecretId")) { + this.keyStoreSecretId(model.getKeyStoreSecretId()); + } + if (model.wasPropertyExplicitlySet("keyStorePasswordSecretId")) { + this.keyStorePasswordSecretId(model.getKeyStorePasswordSecretId()); + } return this; } } @@ -446,12 +585,18 @@ public RedisConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, String servers, SecurityProtocol securityProtocol, AuthenticationType authenticationType, String username, - String redisClusterId) { + String redisClusterId, + String passwordSecretId, + String trustStoreSecretId, + String trustStorePasswordSecretId, + String keyStoreSecretId, + String keyStorePasswordSecretId) { super( id, displayName, @@ -470,13 +615,19 @@ public RedisConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.servers = servers; this.securityProtocol = securityProtocol; this.authenticationType = authenticationType; this.username = username; this.redisClusterId = redisClusterId; + this.passwordSecretId = passwordSecretId; + this.trustStoreSecretId = trustStoreSecretId; + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.keyStoreSecretId = keyStoreSecretId; + this.keyStorePasswordSecretId = keyStorePasswordSecretId; } /** @@ -724,6 +875,102 @@ public String getRedisClusterId() { return redisClusterId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private final String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + * @return the value + **/ + public String getTrustStoreSecretId() { + return trustStoreSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private final String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @return the value + **/ + public String getTrustStorePasswordSecretId() { + return trustStorePasswordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private final String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + * @return the value + **/ + public String getKeyStoreSecretId() { + return keyStoreSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private final String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @return the value + **/ + public String getKeyStorePasswordSecretId() { + return keyStorePasswordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -744,6 +991,13 @@ public String toString(boolean includeByteArrayContents) { sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", redisClusterId=").append(String.valueOf(this.redisClusterId)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); + sb.append(", trustStoreSecretId=").append(String.valueOf(this.trustStoreSecretId)); + sb.append(", trustStorePasswordSecretId=") + .append(String.valueOf(this.trustStorePasswordSecretId)); + sb.append(", keyStoreSecretId=").append(String.valueOf(this.keyStoreSecretId)); + sb.append(", keyStorePasswordSecretId=") + .append(String.valueOf(this.keyStorePasswordSecretId)); sb.append(")"); return sb.toString(); } @@ -764,6 +1018,13 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.redisClusterId, other.redisClusterId) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) + && java.util.Objects.equals(this.trustStoreSecretId, other.trustStoreSecretId) + && java.util.Objects.equals( + this.trustStorePasswordSecretId, other.trustStorePasswordSecretId) + && java.util.Objects.equals(this.keyStoreSecretId, other.keyStoreSecretId) + && java.util.Objects.equals( + this.keyStorePasswordSecretId, other.keyStorePasswordSecretId) && super.equals(other); } @@ -787,6 +1048,27 @@ public int hashCode() { result = (result * PRIME) + (this.redisClusterId == null ? 43 : this.redisClusterId.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); + result = + (result * PRIME) + + (this.trustStoreSecretId == null + ? 43 + : this.trustStoreSecretId.hashCode()); + result = + (result * PRIME) + + (this.trustStorePasswordSecretId == null + ? 43 + : this.trustStorePasswordSecretId.hashCode()); + result = + (result * PRIME) + + (this.keyStoreSecretId == null ? 43 : this.keyStoreSecretId.hashCode()); + result = + (result * PRIME) + + (this.keyStorePasswordSecretId == null + ? 43 + : this.keyStorePasswordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/RedisConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/RedisConnectionSummary.java index 0ba774e5277..57f1d2f6b90 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/RedisConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/RedisConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Redis technology type. **/ @@ -302,6 +311,112 @@ public Builder redisClusterId(String redisClusterId) { this.__explicitlySet__.add("redisClusterId"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + * @param trustStoreSecretId the value to set + * @return this builder + **/ + public Builder trustStoreSecretId(String trustStoreSecretId) { + this.trustStoreSecretId = trustStoreSecretId; + this.__explicitlySet__.add("trustStoreSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @param trustStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder trustStorePasswordSecretId(String trustStorePasswordSecretId) { + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.__explicitlySet__.add("trustStorePasswordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + * @param keyStoreSecretId the value to set + * @return this builder + **/ + public Builder keyStoreSecretId(String keyStoreSecretId) { + this.keyStoreSecretId = keyStoreSecretId; + this.__explicitlySet__.add("keyStoreSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @param keyStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder keyStorePasswordSecretId(String keyStorePasswordSecretId) { + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.__explicitlySet__.add("keyStorePasswordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -327,12 +442,18 @@ public RedisConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, this.servers, this.securityProtocol, this.authenticationType, this.username, - this.redisClusterId); + this.redisClusterId, + this.passwordSecretId, + this.trustStoreSecretId, + this.trustStorePasswordSecretId, + this.keyStoreSecretId, + this.keyStorePasswordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -395,6 +516,9 @@ public Builder copy(RedisConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -413,6 +537,21 @@ public Builder copy(RedisConnectionSummary model) { if (model.wasPropertyExplicitlySet("redisClusterId")) { this.redisClusterId(model.getRedisClusterId()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("trustStoreSecretId")) { + this.trustStoreSecretId(model.getTrustStoreSecretId()); + } + if (model.wasPropertyExplicitlySet("trustStorePasswordSecretId")) { + this.trustStorePasswordSecretId(model.getTrustStorePasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("keyStoreSecretId")) { + this.keyStoreSecretId(model.getKeyStoreSecretId()); + } + if (model.wasPropertyExplicitlySet("keyStorePasswordSecretId")) { + this.keyStorePasswordSecretId(model.getKeyStorePasswordSecretId()); + } return this; } } @@ -448,12 +587,18 @@ public RedisConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, RedisConnection.TechnologyType technologyType, String servers, RedisConnection.SecurityProtocol securityProtocol, RedisConnection.AuthenticationType authenticationType, String username, - String redisClusterId) { + String redisClusterId, + String passwordSecretId, + String trustStoreSecretId, + String trustStorePasswordSecretId, + String keyStoreSecretId, + String keyStorePasswordSecretId) { super( id, displayName, @@ -472,13 +617,19 @@ public RedisConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.servers = servers; this.securityProtocol = securityProtocol; this.authenticationType = authenticationType; this.username = username; this.redisClusterId = redisClusterId; + this.passwordSecretId = passwordSecretId; + this.trustStoreSecretId = trustStoreSecretId; + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.keyStoreSecretId = keyStoreSecretId; + this.keyStorePasswordSecretId = keyStorePasswordSecretId; } /** @@ -581,6 +732,102 @@ public String getRedisClusterId() { return redisClusterId; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private final String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + * @return the value + **/ + public String getTrustStoreSecretId() { + return trustStoreSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private final String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @return the value + **/ + public String getTrustStorePasswordSecretId() { + return trustStorePasswordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private final String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + * @return the value + **/ + public String getKeyStoreSecretId() { + return keyStoreSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private final String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @return the value + **/ + public String getKeyStorePasswordSecretId() { + return keyStorePasswordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -601,6 +848,13 @@ public String toString(boolean includeByteArrayContents) { sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", redisClusterId=").append(String.valueOf(this.redisClusterId)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); + sb.append(", trustStoreSecretId=").append(String.valueOf(this.trustStoreSecretId)); + sb.append(", trustStorePasswordSecretId=") + .append(String.valueOf(this.trustStorePasswordSecretId)); + sb.append(", keyStoreSecretId=").append(String.valueOf(this.keyStoreSecretId)); + sb.append(", keyStorePasswordSecretId=") + .append(String.valueOf(this.keyStorePasswordSecretId)); sb.append(")"); return sb.toString(); } @@ -621,6 +875,13 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.redisClusterId, other.redisClusterId) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) + && java.util.Objects.equals(this.trustStoreSecretId, other.trustStoreSecretId) + && java.util.Objects.equals( + this.trustStorePasswordSecretId, other.trustStorePasswordSecretId) + && java.util.Objects.equals(this.keyStoreSecretId, other.keyStoreSecretId) + && java.util.Objects.equals( + this.keyStorePasswordSecretId, other.keyStorePasswordSecretId) && super.equals(other); } @@ -644,6 +905,27 @@ public int hashCode() { result = (result * PRIME) + (this.redisClusterId == null ? 43 : this.redisClusterId.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); + result = + (result * PRIME) + + (this.trustStoreSecretId == null + ? 43 + : this.trustStoreSecretId.hashCode()); + result = + (result * PRIME) + + (this.trustStorePasswordSecretId == null + ? 43 + : this.trustStorePasswordSecretId.hashCode()); + result = + (result * PRIME) + + (this.keyStoreSecretId == null ? 43 : this.keyStoreSecretId.hashCode()); + result = + (result * PRIME) + + (this.keyStorePasswordSecretId == null + ? 43 + : this.keyStorePasswordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/RefreshConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/RefreshConnectionDetails.java new file mode 100644 index 00000000000..9f33cb8aeb2 --- /dev/null +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/RefreshConnectionDetails.java @@ -0,0 +1,76 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.goldengate.model; + +/** + * The information about the Refresh Connection external attributes. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200407") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type", + defaultImpl = RefreshConnectionDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DefaultRefreshConnectionDetails.class, + name = "DEFAULT" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class RefreshConnectionDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected RefreshConnectionDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RefreshConnectionDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RefreshConnectionDetails)) { + return false; + } + + RefreshConnectionDetails other = (RefreshConnectionDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/RefreshConnectionType.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/RefreshConnectionType.java new file mode 100644 index 00000000000..3c0c60886ea --- /dev/null +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/RefreshConnectionType.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.goldengate.model; + +/** + * The Connection external attribute refresh type. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200407") +public enum RefreshConnectionType { + Default("DEFAULT"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (RefreshConnectionType v : RefreshConnectionType.values()) { + map.put(v.getValue(), v); + } + } + + RefreshConnectionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static RefreshConnectionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid RefreshConnectionType: " + key); + } +} diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/SnowflakeConnection.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/SnowflakeConnection.java index b2da66167c7..2e2dcd47f3f 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/SnowflakeConnection.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/SnowflakeConnection.java @@ -190,6 +190,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Snowflake technology type. **/ @@ -264,6 +273,74 @@ public Builder username(String username) { this.__explicitlySet__.add("username"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @param privateKeyFileSecretId the value to set + * @return this builder + **/ + public Builder privateKeyFileSecretId(String privateKeyFileSecretId) { + this.privateKeyFileSecretId = privateKeyFileSecretId; + this.__explicitlySet__.add("privateKeyFileSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the private key file. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the private key file. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @param privateKeyPassphraseSecretId the value to set + * @return this builder + **/ + public Builder privateKeyPassphraseSecretId(String privateKeyPassphraseSecretId) { + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; + this.__explicitlySet__.add("privateKeyPassphraseSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -289,10 +366,14 @@ public SnowflakeConnection build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.technologyType, this.connectionUrl, this.authenticationType, - this.username); + this.username, + this.passwordSecretId, + this.privateKeyFileSecretId, + this.privateKeyPassphraseSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -355,6 +436,9 @@ public Builder copy(SnowflakeConnection model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -367,6 +451,15 @@ public Builder copy(SnowflakeConnection model) { if (model.wasPropertyExplicitlySet("username")) { this.username(model.getUsername()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("privateKeyFileSecretId")) { + this.privateKeyFileSecretId(model.getPrivateKeyFileSecretId()); + } + if (model.wasPropertyExplicitlySet("privateKeyPassphraseSecretId")) { + this.privateKeyPassphraseSecretId(model.getPrivateKeyPassphraseSecretId()); + } return this; } } @@ -402,10 +495,14 @@ public SnowflakeConnection( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, TechnologyType technologyType, String connectionUrl, AuthenticationType authenticationType, - String username) { + String username, + String passwordSecretId, + String privateKeyFileSecretId, + String privateKeyPassphraseSecretId) { super( id, displayName, @@ -424,11 +521,15 @@ public SnowflakeConnection( ingressIps, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.technologyType = technologyType; this.connectionUrl = connectionUrl; this.authenticationType = authenticationType; this.username = username; + this.passwordSecretId = passwordSecretId; + this.privateKeyFileSecretId = privateKeyFileSecretId; + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; } /** @@ -593,6 +694,68 @@ public String getUsername() { return username; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private final String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyFileSecretId() { + return privateKeyFileSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the private key file. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private final String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the private key file. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyPassphraseSecretId() { + return privateKeyPassphraseSecretId; + } + @Override public String toString() { return this.toString(true); @@ -611,6 +774,10 @@ public String toString(boolean includeByteArrayContents) { sb.append(", connectionUrl=").append(String.valueOf(this.connectionUrl)); sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", username=").append(String.valueOf(this.username)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); + sb.append(", privateKeyFileSecretId=").append(String.valueOf(this.privateKeyFileSecretId)); + sb.append(", privateKeyPassphraseSecretId=") + .append(String.valueOf(this.privateKeyPassphraseSecretId)); sb.append(")"); return sb.toString(); } @@ -629,6 +796,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.connectionUrl, other.connectionUrl) && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.username, other.username) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) + && java.util.Objects.equals( + this.privateKeyFileSecretId, other.privateKeyFileSecretId) + && java.util.Objects.equals( + this.privateKeyPassphraseSecretId, other.privateKeyPassphraseSecretId) && super.equals(other); } @@ -648,6 +820,19 @@ public int hashCode() { ? 43 : this.authenticationType.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); + result = + (result * PRIME) + + (this.privateKeyFileSecretId == null + ? 43 + : this.privateKeyFileSecretId.hashCode()); + result = + (result * PRIME) + + (this.privateKeyPassphraseSecretId == null + ? 43 + : this.privateKeyPassphraseSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/SnowflakeConnectionSummary.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/SnowflakeConnectionSummary.java index 0ab6e2b735e..7d8a214cb07 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/SnowflakeConnectionSummary.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/SnowflakeConnectionSummary.java @@ -190,6 +190,15 @@ public Builder locks(java.util.List locks) { this.__explicitlySet__.add("locks"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The Snowflake technology type. **/ @@ -265,6 +274,74 @@ public Builder username(String username) { this.__explicitlySet__.add("username"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @param privateKeyFileSecretId the value to set + * @return this builder + **/ + public Builder privateKeyFileSecretId(String privateKeyFileSecretId) { + this.privateKeyFileSecretId = privateKeyFileSecretId; + this.__explicitlySet__.add("privateKeyFileSecretId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the private key file. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the private key file. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @param privateKeyPassphraseSecretId the value to set + * @return this builder + **/ + public Builder privateKeyPassphraseSecretId(String privateKeyPassphraseSecretId) { + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; + this.__explicitlySet__.add("privateKeyPassphraseSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -290,10 +367,14 @@ public SnowflakeConnectionSummary build() { this.subnetId, this.routingMethod, this.locks, + this.doesUseSecretIds, this.technologyType, this.connectionUrl, this.authenticationType, - this.username); + this.username, + this.passwordSecretId, + this.privateKeyFileSecretId, + this.privateKeyPassphraseSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -356,6 +437,9 @@ public Builder copy(SnowflakeConnectionSummary model) { if (model.wasPropertyExplicitlySet("locks")) { this.locks(model.getLocks()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("technologyType")) { this.technologyType(model.getTechnologyType()); } @@ -368,6 +452,15 @@ public Builder copy(SnowflakeConnectionSummary model) { if (model.wasPropertyExplicitlySet("username")) { this.username(model.getUsername()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } + if (model.wasPropertyExplicitlySet("privateKeyFileSecretId")) { + this.privateKeyFileSecretId(model.getPrivateKeyFileSecretId()); + } + if (model.wasPropertyExplicitlySet("privateKeyPassphraseSecretId")) { + this.privateKeyPassphraseSecretId(model.getPrivateKeyPassphraseSecretId()); + } return this; } } @@ -403,10 +496,14 @@ public SnowflakeConnectionSummary( String subnetId, RoutingMethod routingMethod, java.util.List locks, + Boolean doesUseSecretIds, SnowflakeConnection.TechnologyType technologyType, String connectionUrl, SnowflakeConnection.AuthenticationType authenticationType, - String username) { + String username, + String passwordSecretId, + String privateKeyFileSecretId, + String privateKeyPassphraseSecretId) { super( id, displayName, @@ -425,11 +522,15 @@ public SnowflakeConnectionSummary( nsgIds, subnetId, routingMethod, - locks); + locks, + doesUseSecretIds); this.technologyType = technologyType; this.connectionUrl = connectionUrl; this.authenticationType = authenticationType; this.username = username; + this.passwordSecretId = passwordSecretId; + this.privateKeyFileSecretId = privateKeyFileSecretId; + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; } /** @@ -498,6 +599,68 @@ public String getUsername() { return username; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private final String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyFileSecretId() { + return privateKeyFileSecretId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the private key file. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private final String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the private key file. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyPassphraseSecretId() { + return privateKeyPassphraseSecretId; + } + @Override public String toString() { return this.toString(true); @@ -516,6 +679,10 @@ public String toString(boolean includeByteArrayContents) { sb.append(", connectionUrl=").append(String.valueOf(this.connectionUrl)); sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", username=").append(String.valueOf(this.username)); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); + sb.append(", privateKeyFileSecretId=").append(String.valueOf(this.privateKeyFileSecretId)); + sb.append(", privateKeyPassphraseSecretId=") + .append(String.valueOf(this.privateKeyPassphraseSecretId)); sb.append(")"); return sb.toString(); } @@ -534,6 +701,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.connectionUrl, other.connectionUrl) && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.username, other.username) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) + && java.util.Objects.equals( + this.privateKeyFileSecretId, other.privateKeyFileSecretId) + && java.util.Objects.equals( + this.privateKeyPassphraseSecretId, other.privateKeyPassphraseSecretId) && super.equals(other); } @@ -553,6 +725,19 @@ public int hashCode() { ? 43 : this.authenticationType.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); + result = + (result * PRIME) + + (this.privateKeyFileSecretId == null + ? 43 + : this.privateKeyFileSecretId.hashCode()); + result = + (result * PRIME) + + (this.privateKeyPassphraseSecretId == null + ? 43 + : this.privateKeyPassphraseSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/TestConnectionAssignmentResult.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/TestConnectionAssignmentResult.java index 944beaeb86e..8ac4d357215 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/TestConnectionAssignmentResult.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/TestConnectionAssignmentResult.java @@ -6,6 +6,7 @@ /** * The result of the connectivity test performed between the GoldenGate deployment and the associated database / service. + * The 'error' property is deprecated and will not contain values in the future. So, the error(s) will be returned in just the 'errors' property. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -23,12 +24,15 @@ public final class TestConnectionAssignmentResult extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"resultType", "error"}) + @java.beans.ConstructorProperties({"resultType", "error", "errors"}) public TestConnectionAssignmentResult( - ResultType resultType, TestConnectionAssignmentError error) { + ResultType resultType, + TestConnectionAssignmentError error, + java.util.List errors) { super(); this.resultType = resultType; this.error = error; + this.errors = errors; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -60,13 +64,31 @@ public Builder error(TestConnectionAssignmentError error) { this.__explicitlySet__.add("error"); return this; } + /** + * List of test connection assignment error objects. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("errors") + private java.util.List errors; + + /** + * List of test connection assignment error objects. + * + * @param errors the value to set + * @return this builder + **/ + public Builder errors(java.util.List errors) { + this.errors = errors; + this.__explicitlySet__.add("errors"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public TestConnectionAssignmentResult build() { TestConnectionAssignmentResult model = - new TestConnectionAssignmentResult(this.resultType, this.error); + new TestConnectionAssignmentResult(this.resultType, this.error, this.errors); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -81,6 +103,9 @@ public Builder copy(TestConnectionAssignmentResult model) { if (model.wasPropertyExplicitlySet("error")) { this.error(model.getError()); } + if (model.wasPropertyExplicitlySet("errors")) { + this.errors(model.getErrors()); + } return this; } } @@ -169,6 +194,22 @@ public TestConnectionAssignmentError getError() { return error; } + /** + * List of test connection assignment error objects. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("errors") + private final java.util.List errors; + + /** + * List of test connection assignment error objects. + * + * @return the value + **/ + public java.util.List getErrors() { + return errors; + } + @Override public String toString() { return this.toString(true); @@ -185,6 +226,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("resultType=").append(String.valueOf(this.resultType)); sb.append(", error=").append(String.valueOf(this.error)); + sb.append(", errors=").append(String.valueOf(this.errors)); sb.append(")"); return sb.toString(); } @@ -201,6 +243,7 @@ public boolean equals(Object o) { TestConnectionAssignmentResult other = (TestConnectionAssignmentResult) o; return java.util.Objects.equals(this.resultType, other.resultType) && java.util.Objects.equals(this.error, other.error) + && java.util.Objects.equals(this.errors, other.errors) && super.equals(other); } @@ -210,6 +253,7 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.resultType == null ? 43 : this.resultType.hashCode()); result = (result * PRIME) + (this.error == null ? 43 : this.error.hashCode()); + result = (result * PRIME) + (this.errors == null ? 43 : this.errors.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateAmazonKinesisConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateAmazonKinesisConnectionDetails.java index a20339b8ba8..a7a210efd65 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateAmazonKinesisConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateAmazonKinesisConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * Access key ID to access the Amazon Kinesis. * @@ -145,6 +154,26 @@ public Builder secretAccessKey(String secretAccessKey) { this.__explicitlySet__.add("secretAccessKey"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the secret access key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretAccessKeySecretId") + private String secretAccessKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the secret access key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + * @param secretAccessKeySecretId the value to set + * @return this builder + **/ + public Builder secretAccessKeySecretId(String secretAccessKeySecretId) { + this.secretAccessKeySecretId = secretAccessKeySecretId; + this.__explicitlySet__.add("secretAccessKeySecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -161,8 +190,10 @@ public UpdateAmazonKinesisConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.accessKeyId, - this.secretAccessKey); + this.secretAccessKey, + this.secretAccessKeySecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -198,12 +229,18 @@ public Builder copy(UpdateAmazonKinesisConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("accessKeyId")) { this.accessKeyId(model.getAccessKeyId()); } if (model.wasPropertyExplicitlySet("secretAccessKey")) { this.secretAccessKey(model.getSecretAccessKey()); } + if (model.wasPropertyExplicitlySet("secretAccessKeySecretId")) { + this.secretAccessKeySecretId(model.getSecretAccessKeySecretId()); + } return this; } } @@ -230,8 +267,10 @@ public UpdateAmazonKinesisConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, String accessKeyId, - String secretAccessKey) { + String secretAccessKey, + String secretAccessKeySecretId) { super( displayName, description, @@ -241,9 +280,11 @@ public UpdateAmazonKinesisConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.accessKeyId = accessKeyId; this.secretAccessKey = secretAccessKey; + this.secretAccessKeySecretId = secretAccessKeySecretId; } /** @@ -278,6 +319,24 @@ public String getSecretAccessKey() { return secretAccessKey; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the secret access key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretAccessKeySecretId") + private final String secretAccessKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the secret access key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + * @return the value + **/ + public String getSecretAccessKeySecretId() { + return secretAccessKeySecretId; + } + @Override public String toString() { return this.toString(true); @@ -294,6 +353,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", accessKeyId=").append(String.valueOf(this.accessKeyId)); sb.append(", secretAccessKey=").append(""); + sb.append(", secretAccessKeySecretId=") + .append(String.valueOf(this.secretAccessKeySecretId)); sb.append(")"); return sb.toString(); } @@ -310,6 +371,8 @@ public boolean equals(Object o) { UpdateAmazonKinesisConnectionDetails other = (UpdateAmazonKinesisConnectionDetails) o; return java.util.Objects.equals(this.accessKeyId, other.accessKeyId) && java.util.Objects.equals(this.secretAccessKey, other.secretAccessKey) + && java.util.Objects.equals( + this.secretAccessKeySecretId, other.secretAccessKeySecretId) && super.equals(other); } @@ -321,6 +384,11 @@ public int hashCode() { result = (result * PRIME) + (this.secretAccessKey == null ? 43 : this.secretAccessKey.hashCode()); + result = + (result * PRIME) + + (this.secretAccessKeySecretId == null + ? 43 + : this.secretAccessKeySecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateAmazonRedshiftConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateAmazonRedshiftConnectionDetails.java index fa080719191..1be4cee0f83 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateAmazonRedshiftConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateAmazonRedshiftConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * Connection URL. * e.g.: 'jdbc:redshift://aws-redshift-instance.aaaaaaaaaaaa.us-east-2.redshift.amazonaws.com:5439/mydb' @@ -171,6 +180,32 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -187,9 +222,11 @@ public UpdateAmazonRedshiftConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.connectionUrl, this.username, - this.password); + this.password, + this.passwordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -225,6 +262,9 @@ public Builder copy(UpdateAmazonRedshiftConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("connectionUrl")) { this.connectionUrl(model.getConnectionUrl()); } @@ -234,6 +274,9 @@ public Builder copy(UpdateAmazonRedshiftConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } return this; } } @@ -260,9 +303,11 @@ public UpdateAmazonRedshiftConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, String connectionUrl, String username, - String password) { + String password, + String passwordSecretId) { super( displayName, description, @@ -272,10 +317,12 @@ public UpdateAmazonRedshiftConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.connectionUrl = connectionUrl; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; } /** @@ -334,6 +381,30 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -351,6 +422,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", connectionUrl=").append(String.valueOf(this.connectionUrl)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(")"); return sb.toString(); } @@ -368,6 +440,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.connectionUrl, other.connectionUrl) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && super.equals(other); } @@ -380,6 +453,9 @@ public int hashCode() { + (this.connectionUrl == null ? 43 : this.connectionUrl.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateAmazonS3ConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateAmazonS3ConnectionDetails.java index 83bdb135ee8..2dc0a73c5c0 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateAmazonS3ConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateAmazonS3ConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * Access key ID to access the Amazon S3 bucket. * e.g.: "this-is-not-the-secret" @@ -149,6 +158,26 @@ public Builder secretAccessKey(String secretAccessKey) { this.__explicitlySet__.add("secretAccessKey"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Secret Access Key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretAccessKeySecretId") + private String secretAccessKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Secret Access Key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + * @param secretAccessKeySecretId the value to set + * @return this builder + **/ + public Builder secretAccessKeySecretId(String secretAccessKeySecretId) { + this.secretAccessKeySecretId = secretAccessKeySecretId; + this.__explicitlySet__.add("secretAccessKeySecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -165,8 +194,10 @@ public UpdateAmazonS3ConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.accessKeyId, - this.secretAccessKey); + this.secretAccessKey, + this.secretAccessKeySecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -202,12 +233,18 @@ public Builder copy(UpdateAmazonS3ConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("accessKeyId")) { this.accessKeyId(model.getAccessKeyId()); } if (model.wasPropertyExplicitlySet("secretAccessKey")) { this.secretAccessKey(model.getSecretAccessKey()); } + if (model.wasPropertyExplicitlySet("secretAccessKeySecretId")) { + this.secretAccessKeySecretId(model.getSecretAccessKeySecretId()); + } return this; } } @@ -234,8 +271,10 @@ public UpdateAmazonS3ConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, String accessKeyId, - String secretAccessKey) { + String secretAccessKey, + String secretAccessKeySecretId) { super( displayName, description, @@ -245,9 +284,11 @@ public UpdateAmazonS3ConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.accessKeyId = accessKeyId; this.secretAccessKey = secretAccessKey; + this.secretAccessKeySecretId = secretAccessKeySecretId; } /** @@ -286,6 +327,24 @@ public String getSecretAccessKey() { return secretAccessKey; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Secret Access Key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretAccessKeySecretId") + private final String secretAccessKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Secret Access Key is stored. + * Note: When provided, 'secretAccessKey' field must not be provided. + * + * @return the value + **/ + public String getSecretAccessKeySecretId() { + return secretAccessKeySecretId; + } + @Override public String toString() { return this.toString(true); @@ -302,6 +361,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", accessKeyId=").append(String.valueOf(this.accessKeyId)); sb.append(", secretAccessKey=").append(""); + sb.append(", secretAccessKeySecretId=") + .append(String.valueOf(this.secretAccessKeySecretId)); sb.append(")"); return sb.toString(); } @@ -318,6 +379,8 @@ public boolean equals(Object o) { UpdateAmazonS3ConnectionDetails other = (UpdateAmazonS3ConnectionDetails) o; return java.util.Objects.equals(this.accessKeyId, other.accessKeyId) && java.util.Objects.equals(this.secretAccessKey, other.secretAccessKey) + && java.util.Objects.equals( + this.secretAccessKeySecretId, other.secretAccessKeySecretId) && super.equals(other); } @@ -329,6 +392,11 @@ public int hashCode() { result = (result * PRIME) + (this.secretAccessKey == null ? 43 : this.secretAccessKey.hashCode()); + result = + (result * PRIME) + + (this.secretAccessKeySecretId == null + ? 43 + : this.secretAccessKeySecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateAzureDataLakeStorageConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateAzureDataLakeStorageConnectionDetails.java index 9fe23f05570..b8548276594 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateAzureDataLakeStorageConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateAzureDataLakeStorageConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * Used authentication mechanism to access Azure Data Lake Storage. * @@ -166,6 +175,26 @@ public Builder accountKey(String accountKey) { this.__explicitlySet__.add("accountKey"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the account key is stored. + * Note: When provided, 'accountKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("accountKeySecretId") + private String accountKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the account key is stored. + * Note: When provided, 'accountKey' field must not be provided. + * + * @param accountKeySecretId the value to set + * @return this builder + **/ + public Builder accountKeySecretId(String accountKeySecretId) { + this.accountKeySecretId = accountKeySecretId; + this.__explicitlySet__.add("accountKeySecretId"); + return this; + } /** * Credential that uses a shared access signature (SAS) to authenticate to an Azure Service. This property is * required when 'authenticationType' is set to 'SHARED_ACCESS_SIGNATURE'. @@ -188,6 +217,26 @@ public Builder sasToken(String sasToken) { this.__explicitlySet__.add("sasToken"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the sas token is stored. + * Note: When provided, 'sasToken' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sasTokenSecretId") + private String sasTokenSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the sas token is stored. + * Note: When provided, 'sasToken' field must not be provided. + * + * @param sasTokenSecretId the value to set + * @return this builder + **/ + public Builder sasTokenSecretId(String sasTokenSecretId) { + this.sasTokenSecretId = sasTokenSecretId; + this.__explicitlySet__.add("sasTokenSecretId"); + return this; + } /** * Azure tenant ID of the application. This property is required when 'authenticationType' is set to 'AZURE_ACTIVE_DIRECTORY'. * e.g.: 14593954-d337-4a61-a364-9f758c64f97f @@ -248,6 +297,26 @@ public Builder clientSecret(String clientSecret) { this.__explicitlySet__.add("clientSecret"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the client secret is stored. + * Note: When provided, 'clientSecret' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clientSecretSecretId") + private String clientSecretSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the client secret is stored. + * Note: When provided, 'clientSecret' field must not be provided. + * + * @param clientSecretSecretId the value to set + * @return this builder + **/ + public Builder clientSecretSecretId(String clientSecretSecretId) { + this.clientSecretSecretId = clientSecretSecretId; + this.__explicitlySet__.add("clientSecretSecretId"); + return this; + } /** * Azure Storage service endpoint. * e.g: https://test.blob.core.windows.net @@ -284,13 +353,17 @@ public UpdateAzureDataLakeStorageConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.authenticationType, this.accountName, this.accountKey, + this.accountKeySecretId, this.sasToken, + this.sasTokenSecretId, this.azureTenantId, this.clientId, this.clientSecret, + this.clientSecretSecretId, this.endpoint); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -327,6 +400,9 @@ public Builder copy(UpdateAzureDataLakeStorageConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("authenticationType")) { this.authenticationType(model.getAuthenticationType()); } @@ -336,9 +412,15 @@ public Builder copy(UpdateAzureDataLakeStorageConnectionDetails model) { if (model.wasPropertyExplicitlySet("accountKey")) { this.accountKey(model.getAccountKey()); } + if (model.wasPropertyExplicitlySet("accountKeySecretId")) { + this.accountKeySecretId(model.getAccountKeySecretId()); + } if (model.wasPropertyExplicitlySet("sasToken")) { this.sasToken(model.getSasToken()); } + if (model.wasPropertyExplicitlySet("sasTokenSecretId")) { + this.sasTokenSecretId(model.getSasTokenSecretId()); + } if (model.wasPropertyExplicitlySet("azureTenantId")) { this.azureTenantId(model.getAzureTenantId()); } @@ -348,6 +430,9 @@ public Builder copy(UpdateAzureDataLakeStorageConnectionDetails model) { if (model.wasPropertyExplicitlySet("clientSecret")) { this.clientSecret(model.getClientSecret()); } + if (model.wasPropertyExplicitlySet("clientSecretSecretId")) { + this.clientSecretSecretId(model.getClientSecretSecretId()); + } if (model.wasPropertyExplicitlySet("endpoint")) { this.endpoint(model.getEndpoint()); } @@ -377,13 +462,17 @@ public UpdateAzureDataLakeStorageConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, AzureDataLakeStorageConnection.AuthenticationType authenticationType, String accountName, String accountKey, + String accountKeySecretId, String sasToken, + String sasTokenSecretId, String azureTenantId, String clientId, String clientSecret, + String clientSecretSecretId, String endpoint) { super( displayName, @@ -394,14 +483,18 @@ public UpdateAzureDataLakeStorageConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.authenticationType = authenticationType; this.accountName = accountName; this.accountKey = accountKey; + this.accountKeySecretId = accountKeySecretId; this.sasToken = sasToken; + this.sasTokenSecretId = sasTokenSecretId; this.azureTenantId = azureTenantId; this.clientId = clientId; this.clientSecret = clientSecret; + this.clientSecretSecretId = clientSecretSecretId; this.endpoint = endpoint; } @@ -455,6 +548,24 @@ public String getAccountKey() { return accountKey; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the account key is stored. + * Note: When provided, 'accountKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("accountKeySecretId") + private final String accountKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the account key is stored. + * Note: When provided, 'accountKey' field must not be provided. + * + * @return the value + **/ + public String getAccountKeySecretId() { + return accountKeySecretId; + } + /** * Credential that uses a shared access signature (SAS) to authenticate to an Azure Service. This property is * required when 'authenticationType' is set to 'SHARED_ACCESS_SIGNATURE'. @@ -475,6 +586,24 @@ public String getSasToken() { return sasToken; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the sas token is stored. + * Note: When provided, 'sasToken' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sasTokenSecretId") + private final String sasTokenSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the sas token is stored. + * Note: When provided, 'sasToken' field must not be provided. + * + * @return the value + **/ + public String getSasTokenSecretId() { + return sasTokenSecretId; + } + /** * Azure tenant ID of the application. This property is required when 'authenticationType' is set to 'AZURE_ACTIVE_DIRECTORY'. * e.g.: 14593954-d337-4a61-a364-9f758c64f97f @@ -529,6 +658,24 @@ public String getClientSecret() { return clientSecret; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the client secret is stored. + * Note: When provided, 'clientSecret' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clientSecretSecretId") + private final String clientSecretSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the client secret is stored. + * Note: When provided, 'clientSecret' field must not be provided. + * + * @return the value + **/ + public String getClientSecretSecretId() { + return clientSecretSecretId; + } + /** * Azure Storage service endpoint. * e.g: https://test.blob.core.windows.net @@ -564,10 +711,13 @@ public String toString(boolean includeByteArrayContents) { sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", accountName=").append(String.valueOf(this.accountName)); sb.append(", accountKey=").append(""); + sb.append(", accountKeySecretId=").append(String.valueOf(this.accountKeySecretId)); sb.append(", sasToken=").append(""); + sb.append(", sasTokenSecretId=").append(String.valueOf(this.sasTokenSecretId)); sb.append(", azureTenantId=").append(String.valueOf(this.azureTenantId)); sb.append(", clientId=").append(String.valueOf(this.clientId)); sb.append(", clientSecret=").append(""); + sb.append(", clientSecretSecretId=").append(String.valueOf(this.clientSecretSecretId)); sb.append(", endpoint=").append(String.valueOf(this.endpoint)); sb.append(")"); return sb.toString(); @@ -587,10 +737,13 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.accountName, other.accountName) && java.util.Objects.equals(this.accountKey, other.accountKey) + && java.util.Objects.equals(this.accountKeySecretId, other.accountKeySecretId) && java.util.Objects.equals(this.sasToken, other.sasToken) + && java.util.Objects.equals(this.sasTokenSecretId, other.sasTokenSecretId) && java.util.Objects.equals(this.azureTenantId, other.azureTenantId) && java.util.Objects.equals(this.clientId, other.clientId) && java.util.Objects.equals(this.clientSecret, other.clientSecret) + && java.util.Objects.equals(this.clientSecretSecretId, other.clientSecretSecretId) && java.util.Objects.equals(this.endpoint, other.endpoint) && super.equals(other); } @@ -606,12 +759,25 @@ public int hashCode() { : this.authenticationType.hashCode()); result = (result * PRIME) + (this.accountName == null ? 43 : this.accountName.hashCode()); result = (result * PRIME) + (this.accountKey == null ? 43 : this.accountKey.hashCode()); + result = + (result * PRIME) + + (this.accountKeySecretId == null + ? 43 + : this.accountKeySecretId.hashCode()); result = (result * PRIME) + (this.sasToken == null ? 43 : this.sasToken.hashCode()); + result = + (result * PRIME) + + (this.sasTokenSecretId == null ? 43 : this.sasTokenSecretId.hashCode()); result = (result * PRIME) + (this.azureTenantId == null ? 43 : this.azureTenantId.hashCode()); result = (result * PRIME) + (this.clientId == null ? 43 : this.clientId.hashCode()); result = (result * PRIME) + (this.clientSecret == null ? 43 : this.clientSecret.hashCode()); + result = + (result * PRIME) + + (this.clientSecretSecretId == null + ? 43 + : this.clientSecretSecretId.hashCode()); result = (result * PRIME) + (this.endpoint == null ? 43 : this.endpoint.hashCode()); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateAzureSynapseConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateAzureSynapseConnectionDetails.java index 307b5682214..0a2de2e52e5 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateAzureSynapseConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateAzureSynapseConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * JDBC connection string. * e.g.: 'jdbc:sqlserver://.sql.azuresynapse.net:1433;database=;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.sql.azuresynapse.net;loginTimeout=300;' @@ -171,6 +180,32 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -187,9 +222,11 @@ public UpdateAzureSynapseConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.connectionString, this.username, - this.password); + this.password, + this.passwordSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -225,6 +262,9 @@ public Builder copy(UpdateAzureSynapseConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("connectionString")) { this.connectionString(model.getConnectionString()); } @@ -234,6 +274,9 @@ public Builder copy(UpdateAzureSynapseConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } return this; } } @@ -260,9 +303,11 @@ public UpdateAzureSynapseConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, String connectionString, String username, - String password) { + String password, + String passwordSecretId) { super( displayName, description, @@ -272,10 +317,12 @@ public UpdateAzureSynapseConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.connectionString = connectionString; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; } /** @@ -334,6 +381,30 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + @Override public String toString() { return this.toString(true); @@ -351,6 +422,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", connectionString=").append(String.valueOf(this.connectionString)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(")"); return sb.toString(); } @@ -368,6 +440,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.connectionString, other.connectionString) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && super.equals(other); } @@ -380,6 +453,9 @@ public int hashCode() { + (this.connectionString == null ? 43 : this.connectionString.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateConnectionDetails.java index 1c076f7eded..3df39d86f7f 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateConnectionDetails.java @@ -132,7 +132,8 @@ public class UpdateConnectionDetails extends com.oracle.bmc.http.internal.Explic "keyId", "nsgIds", "subnetId", - "routingMethod" + "routingMethod", + "doesUseSecretIds" }) protected UpdateConnectionDetails( String displayName, @@ -143,7 +144,8 @@ protected UpdateConnectionDetails( String keyId, java.util.List nsgIds, String subnetId, - RoutingMethod routingMethod) { + RoutingMethod routingMethod, + Boolean doesUseSecretIds) { super(); this.displayName = displayName; this.description = description; @@ -154,6 +156,7 @@ protected UpdateConnectionDetails( this.nsgIds = nsgIds; this.subnetId = subnetId; this.routingMethod = routingMethod; + this.doesUseSecretIds = doesUseSecretIds; } /** @@ -322,6 +325,22 @@ public RoutingMethod getRoutingMethod() { return routingMethod; } + /** + * Indicates that sensitive attributes are provided via Secrets. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private final Boolean doesUseSecretIds; + + /** + * Indicates that sensitive attributes are provided via Secrets. + * + * @return the value + **/ + public Boolean getDoesUseSecretIds() { + return doesUseSecretIds; + } + @Override public String toString() { return this.toString(true); @@ -345,6 +364,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); sb.append(", subnetId=").append(String.valueOf(this.subnetId)); sb.append(", routingMethod=").append(String.valueOf(this.routingMethod)); + sb.append(", doesUseSecretIds=").append(String.valueOf(this.doesUseSecretIds)); sb.append(")"); return sb.toString(); } @@ -368,6 +388,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.nsgIds, other.nsgIds) && java.util.Objects.equals(this.subnetId, other.subnetId) && java.util.Objects.equals(this.routingMethod, other.routingMethod) + && java.util.Objects.equals(this.doesUseSecretIds, other.doesUseSecretIds) && super.equals(other); } @@ -386,6 +407,9 @@ public int hashCode() { result = (result * PRIME) + (this.routingMethod == null ? 43 : this.routingMethod.hashCode()); + result = + (result * PRIME) + + (this.doesUseSecretIds == null ? 43 : this.doesUseSecretIds.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateDatabaseRegistrationDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateDatabaseRegistrationDetails.java index 7397dc8cc55..99f72d74214 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateDatabaseRegistrationDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateDatabaseRegistrationDetails.java @@ -250,16 +250,16 @@ public Builder sessionMode(SessionMode sessionMode) { return this; } /** - * The wallet contents Oracle GoldenGate uses to make connections to a database. This - * attribute is expected to be base64 encoded. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * This attribute is expected to be base64 encoded. * **/ @com.fasterxml.jackson.annotation.JsonProperty("wallet") private String wallet; /** - * The wallet contents Oracle GoldenGate uses to make connections to a database. This - * attribute is expected to be base64 encoded. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * This attribute is expected to be base64 encoded. * * @param wallet the value to set * @return this builder @@ -567,16 +567,16 @@ public SessionMode getSessionMode() { } /** - * The wallet contents Oracle GoldenGate uses to make connections to a database. This - * attribute is expected to be base64 encoded. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * This attribute is expected to be base64 encoded. * **/ @com.fasterxml.jackson.annotation.JsonProperty("wallet") private final String wallet; /** - * The wallet contents Oracle GoldenGate uses to make connections to a database. This - * attribute is expected to be base64 encoded. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * This attribute is expected to be base64 encoded. * * @return the value **/ diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateDb2ConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateDb2ConnectionDetails.java index 8197c9c6286..155cad63be4 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateDb2ConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateDb2ConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The name of the database. * @@ -201,6 +210,28 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated DB2 database. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated DB2 database. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * An array of name-value pair attribute entries. * Used as additional parameters in connection string. @@ -255,6 +286,28 @@ public Builder sslClientKeystoredb(String sslClientKeystoredb) { this.__explicitlySet__.add("sslClientKeystoredb"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystore file stored, + * which created at the client containing the server certificate / CA root certificate. + * Note: When provided, 'sslClientKeystoredb' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslClientKeystoredbSecretId") + private String sslClientKeystoredbSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystore file stored, + * which created at the client containing the server certificate / CA root certificate. + * Note: When provided, 'sslClientKeystoredb' field must not be provided. + * + * @param sslClientKeystoredbSecretId the value to set + * @return this builder + **/ + public Builder sslClientKeystoredbSecretId(String sslClientKeystoredbSecretId) { + this.sslClientKeystoredbSecretId = sslClientKeystoredbSecretId; + this.__explicitlySet__.add("sslClientKeystoredbSecretId"); + return this; + } /** * The base64 encoded keystash file which contains the encrypted password to the key database file. * @@ -273,6 +326,28 @@ public Builder sslClientKeystash(String sslClientKeystash) { this.__explicitlySet__.add("sslClientKeystash"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystash file is stored, + * which contains the encrypted password to the key database file. + * Note: When provided, 'sslClientKeystash' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslClientKeystashSecretId") + private String sslClientKeystashSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystash file is stored, + * which contains the encrypted password to the key database file. + * Note: When provided, 'sslClientKeystash' field must not be provided. + * + * @param sslClientKeystashSecretId the value to set + * @return this builder + **/ + public Builder sslClientKeystashSecretId(String sslClientKeystashSecretId) { + this.sslClientKeystashSecretId = sslClientKeystashSecretId; + this.__explicitlySet__.add("sslClientKeystashSecretId"); + return this; + } /** * The base64 encoded file which contains the self-signed server certificate / Certificate Authority (CA) certificate. * @@ -307,15 +382,19 @@ public UpdateDb2ConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.databaseName, this.host, this.port, this.username, this.password, + this.passwordSecretId, this.additionalAttributes, this.securityProtocol, this.sslClientKeystoredb, + this.sslClientKeystoredbSecretId, this.sslClientKeystash, + this.sslClientKeystashSecretId, this.sslServerCertificate); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -352,6 +431,9 @@ public Builder copy(UpdateDb2ConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("databaseName")) { this.databaseName(model.getDatabaseName()); } @@ -367,6 +449,9 @@ public Builder copy(UpdateDb2ConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("additionalAttributes")) { this.additionalAttributes(model.getAdditionalAttributes()); } @@ -376,9 +461,15 @@ public Builder copy(UpdateDb2ConnectionDetails model) { if (model.wasPropertyExplicitlySet("sslClientKeystoredb")) { this.sslClientKeystoredb(model.getSslClientKeystoredb()); } + if (model.wasPropertyExplicitlySet("sslClientKeystoredbSecretId")) { + this.sslClientKeystoredbSecretId(model.getSslClientKeystoredbSecretId()); + } if (model.wasPropertyExplicitlySet("sslClientKeystash")) { this.sslClientKeystash(model.getSslClientKeystash()); } + if (model.wasPropertyExplicitlySet("sslClientKeystashSecretId")) { + this.sslClientKeystashSecretId(model.getSslClientKeystashSecretId()); + } if (model.wasPropertyExplicitlySet("sslServerCertificate")) { this.sslServerCertificate(model.getSslServerCertificate()); } @@ -408,15 +499,19 @@ public UpdateDb2ConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, String databaseName, String host, Integer port, String username, String password, + String passwordSecretId, java.util.List additionalAttributes, Db2Connection.SecurityProtocol securityProtocol, String sslClientKeystoredb, + String sslClientKeystoredbSecretId, String sslClientKeystash, + String sslClientKeystashSecretId, String sslServerCertificate) { super( displayName, @@ -427,16 +522,20 @@ public UpdateDb2ConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.databaseName = databaseName; this.host = host; this.port = port; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.additionalAttributes = additionalAttributes; this.securityProtocol = securityProtocol; this.sslClientKeystoredb = sslClientKeystoredb; + this.sslClientKeystoredbSecretId = sslClientKeystoredbSecretId; this.sslClientKeystash = sslClientKeystash; + this.sslClientKeystashSecretId = sslClientKeystashSecretId; this.sslServerCertificate = sslServerCertificate; } @@ -522,6 +621,26 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated DB2 database. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated DB2 database. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * An array of name-value pair attribute entries. * Used as additional parameters in connection string. @@ -570,6 +689,26 @@ public String getSslClientKeystoredb() { return sslClientKeystoredb; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystore file stored, + * which created at the client containing the server certificate / CA root certificate. + * Note: When provided, 'sslClientKeystoredb' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslClientKeystoredbSecretId") + private final String sslClientKeystoredbSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystore file stored, + * which created at the client containing the server certificate / CA root certificate. + * Note: When provided, 'sslClientKeystoredb' field must not be provided. + * + * @return the value + **/ + public String getSslClientKeystoredbSecretId() { + return sslClientKeystoredbSecretId; + } + /** * The base64 encoded keystash file which contains the encrypted password to the key database file. * @@ -586,6 +725,26 @@ public String getSslClientKeystash() { return sslClientKeystash; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystash file is stored, + * which contains the encrypted password to the key database file. + * Note: When provided, 'sslClientKeystash' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslClientKeystashSecretId") + private final String sslClientKeystashSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the keystash file is stored, + * which contains the encrypted password to the key database file. + * Note: When provided, 'sslClientKeystash' field must not be provided. + * + * @return the value + **/ + public String getSslClientKeystashSecretId() { + return sslClientKeystashSecretId; + } + /** * The base64 encoded file which contains the self-signed server certificate / Certificate Authority (CA) certificate. * @@ -621,10 +780,15 @@ public String toString(boolean includeByteArrayContents) { sb.append(", port=").append(String.valueOf(this.port)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", additionalAttributes=").append(String.valueOf(this.additionalAttributes)); sb.append(", securityProtocol=").append(String.valueOf(this.securityProtocol)); sb.append(", sslClientKeystoredb=").append(String.valueOf(this.sslClientKeystoredb)); + sb.append(", sslClientKeystoredbSecretId=") + .append(String.valueOf(this.sslClientKeystoredbSecretId)); sb.append(", sslClientKeystash=").append(String.valueOf(this.sslClientKeystash)); + sb.append(", sslClientKeystashSecretId=") + .append(String.valueOf(this.sslClientKeystashSecretId)); sb.append(", sslServerCertificate=").append(String.valueOf(this.sslServerCertificate)); sb.append(")"); return sb.toString(); @@ -645,10 +809,15 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.port, other.port) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.additionalAttributes, other.additionalAttributes) && java.util.Objects.equals(this.securityProtocol, other.securityProtocol) && java.util.Objects.equals(this.sslClientKeystoredb, other.sslClientKeystoredb) + && java.util.Objects.equals( + this.sslClientKeystoredbSecretId, other.sslClientKeystoredbSecretId) && java.util.Objects.equals(this.sslClientKeystash, other.sslClientKeystash) + && java.util.Objects.equals( + this.sslClientKeystashSecretId, other.sslClientKeystashSecretId) && java.util.Objects.equals(this.sslServerCertificate, other.sslServerCertificate) && super.equals(other); } @@ -662,6 +831,9 @@ public int hashCode() { result = (result * PRIME) + (this.port == null ? 43 : this.port.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.additionalAttributes == null @@ -675,9 +847,19 @@ public int hashCode() { + (this.sslClientKeystoredb == null ? 43 : this.sslClientKeystoredb.hashCode()); + result = + (result * PRIME) + + (this.sslClientKeystoredbSecretId == null + ? 43 + : this.sslClientKeystoredbSecretId.hashCode()); result = (result * PRIME) + (this.sslClientKeystash == null ? 43 : this.sslClientKeystash.hashCode()); + result = + (result * PRIME) + + (this.sslClientKeystashSecretId == null + ? 43 + : this.sslClientKeystashSecretId.hashCode()); result = (result * PRIME) + (this.sslServerCertificate == null diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateDeploymentDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateDeploymentDetails.java index 7d3600c484a..100a7bd3b35 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateDeploymentDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateDeploymentDetails.java @@ -26,6 +26,7 @@ public final class UpdateDeploymentDetails @java.beans.ConstructorProperties({ "displayName", "licenseModel", + "environmentType", "description", "freeformTags", "definedTags", @@ -43,6 +44,7 @@ public final class UpdateDeploymentDetails public UpdateDeploymentDetails( String displayName, LicenseModel licenseModel, + EnvironmentType environmentType, String description, java.util.Map freeformTags, java.util.Map> definedTags, @@ -59,6 +61,7 @@ public UpdateDeploymentDetails( super(); this.displayName = displayName; this.licenseModel = licenseModel; + this.environmentType = environmentType; this.description = description; this.freeformTags = freeformTags; this.definedTags = definedTags; @@ -112,6 +115,24 @@ public Builder licenseModel(LicenseModel licenseModel) { this.__explicitlySet__.add("licenseModel"); return this; } + /** + * Specifies whether the deployment is used in a production or development/testing environment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("environmentType") + private EnvironmentType environmentType; + + /** + * Specifies whether the deployment is used in a production or development/testing environment. + * + * @param environmentType the value to set + * @return this builder + **/ + public Builder environmentType(EnvironmentType environmentType) { + this.environmentType = environmentType; + this.__explicitlySet__.add("environmentType"); + return this; + } /** * Metadata about this specific object. * @@ -348,6 +369,7 @@ public UpdateDeploymentDetails build() { new UpdateDeploymentDetails( this.displayName, this.licenseModel, + this.environmentType, this.description, this.freeformTags, this.definedTags, @@ -375,6 +397,9 @@ public Builder copy(UpdateDeploymentDetails model) { if (model.wasPropertyExplicitlySet("licenseModel")) { this.licenseModel(model.getLicenseModel()); } + if (model.wasPropertyExplicitlySet("environmentType")) { + this.environmentType(model.getEnvironmentType()); + } if (model.wasPropertyExplicitlySet("description")) { this.description(model.getDescription()); } @@ -461,6 +486,22 @@ public LicenseModel getLicenseModel() { return licenseModel; } + /** + * Specifies whether the deployment is used in a production or development/testing environment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("environmentType") + private final EnvironmentType environmentType; + + /** + * Specifies whether the deployment is used in a production or development/testing environment. + * + * @return the value + **/ + public EnvironmentType getEnvironmentType() { + return environmentType; + } + /** * Metadata about this specific object. * @@ -676,6 +717,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("displayName=").append(String.valueOf(this.displayName)); sb.append(", licenseModel=").append(String.valueOf(this.licenseModel)); + sb.append(", environmentType=").append(String.valueOf(this.environmentType)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); @@ -706,6 +748,7 @@ public boolean equals(Object o) { UpdateDeploymentDetails other = (UpdateDeploymentDetails) o; return java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.licenseModel, other.licenseModel) + && java.util.Objects.equals(this.environmentType, other.environmentType) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) @@ -729,6 +772,9 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.licenseModel == null ? 43 : this.licenseModel.hashCode()); + result = + (result * PRIME) + + (this.environmentType == null ? 43 : this.environmentType.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateElasticsearchConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateElasticsearchConnectionDetails.java index 5f756f7f915..ac61ad606bd 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateElasticsearchConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateElasticsearchConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * Comma separated list of Elasticsearch server addresses, specified as host:port entries, where :port is optional. * If port is not specified, it defaults to 9200. @@ -208,6 +217,32 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * Fingerprint required by TLS security protocol. * Eg.: '6152b2dfbff200f973c5074a5b91d06ab3b472c07c09a1ea57bb7fd406cdce9c' @@ -244,11 +279,13 @@ public UpdateElasticsearchConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.servers, this.securityProtocol, this.authenticationType, this.username, this.password, + this.passwordSecretId, this.fingerprint); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -285,6 +322,9 @@ public Builder copy(UpdateElasticsearchConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("servers")) { this.servers(model.getServers()); } @@ -300,6 +340,9 @@ public Builder copy(UpdateElasticsearchConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("fingerprint")) { this.fingerprint(model.getFingerprint()); } @@ -329,11 +372,13 @@ public UpdateElasticsearchConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, String servers, ElasticsearchConnection.SecurityProtocol securityProtocol, ElasticsearchConnection.AuthenticationType authenticationType, String username, String password, + String passwordSecretId, String fingerprint) { super( displayName, @@ -344,12 +389,14 @@ public UpdateElasticsearchConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.servers = servers; this.securityProtocol = securityProtocol; this.authenticationType = authenticationType; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.fingerprint = fingerprint; } @@ -441,6 +488,30 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * Fingerprint required by TLS security protocol. * Eg.: '6152b2dfbff200f973c5074a5b91d06ab3b472c07c09a1ea57bb7fd406cdce9c' @@ -478,6 +549,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", fingerprint=").append(String.valueOf(this.fingerprint)); sb.append(")"); return sb.toString(); @@ -498,6 +570,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.fingerprint, other.fingerprint) && super.equals(other); } @@ -517,6 +590,9 @@ public int hashCode() { : this.authenticationType.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.fingerprint == null ? 43 : this.fingerprint.hashCode()); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateGenericConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateGenericConnectionDetails.java index 6106c7a86cc..ce849930462 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateGenericConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateGenericConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * Host and port separated by colon. * Example: {@code "server.example.com:1234"} @@ -151,6 +160,7 @@ public UpdateGenericConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.host); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -187,6 +197,9 @@ public Builder copy(UpdateGenericConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("host")) { this.host(model.getHost()); } @@ -216,6 +229,7 @@ public UpdateGenericConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, String host) { super( displayName, @@ -226,7 +240,8 @@ public UpdateGenericConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.host = host; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateGoldenGateConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateGoldenGateConnectionDetails.java index af37dcb1f25..86a04f6c641 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateGoldenGateConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateGoldenGateConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the deployment being referenced. * @@ -199,6 +208,28 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * which is used to connect to the Oracle GoldenGate accessed trough this connection. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * which is used to connect to the Oracle GoldenGate accessed trough this connection. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host * field, or make sure the host name is resolvable in the target VCN. @@ -247,11 +278,13 @@ public UpdateGoldenGateConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.deploymentId, this.host, this.port, this.username, this.password, + this.passwordSecretId, this.privateIp); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -288,6 +321,9 @@ public Builder copy(UpdateGoldenGateConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("deploymentId")) { this.deploymentId(model.getDeploymentId()); } @@ -303,6 +339,9 @@ public Builder copy(UpdateGoldenGateConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } @@ -332,11 +371,13 @@ public UpdateGoldenGateConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, String deploymentId, String host, Integer port, String username, String password, + String passwordSecretId, String privateIp) { super( displayName, @@ -347,12 +388,14 @@ public UpdateGoldenGateConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.deploymentId = deploymentId; this.host = host; this.port = port; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.privateIp = privateIp; } @@ -436,6 +479,26 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * which is used to connect to the Oracle GoldenGate accessed trough this connection. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * which is used to connect to the Oracle GoldenGate accessed trough this connection. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host * field, or make sure the host name is resolvable in the target VCN. @@ -485,6 +548,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", port=").append(String.valueOf(this.port)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(")"); return sb.toString(); @@ -505,6 +569,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.port, other.port) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.privateIp, other.privateIp) && super.equals(other); } @@ -518,6 +583,9 @@ public int hashCode() { result = (result * PRIME) + (this.port == null ? 43 : this.port.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateGoogleBigQueryConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateGoogleBigQueryConnectionDetails.java index 8105ebdd817..85c31498e9a 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateGoogleBigQueryConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateGoogleBigQueryConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The base64 encoded content of the service account key file containing * the credentials required to use Google BigQuery. @@ -129,6 +138,28 @@ public Builder serviceAccountKeyFile(String serviceAccountKeyFile) { this.__explicitlySet__.add("serviceAccountKeyFile"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google BigQuery. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceAccountKeyFileSecretId") + private String serviceAccountKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google BigQuery. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + * @param serviceAccountKeyFileSecretId the value to set + * @return this builder + **/ + public Builder serviceAccountKeyFileSecretId(String serviceAccountKeyFileSecretId) { + this.serviceAccountKeyFileSecretId = serviceAccountKeyFileSecretId; + this.__explicitlySet__.add("serviceAccountKeyFileSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -145,7 +176,9 @@ public UpdateGoogleBigQueryConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, - this.serviceAccountKeyFile); + this.doesUseSecretIds, + this.serviceAccountKeyFile, + this.serviceAccountKeyFileSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -181,9 +214,15 @@ public Builder copy(UpdateGoogleBigQueryConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("serviceAccountKeyFile")) { this.serviceAccountKeyFile(model.getServiceAccountKeyFile()); } + if (model.wasPropertyExplicitlySet("serviceAccountKeyFileSecretId")) { + this.serviceAccountKeyFileSecretId(model.getServiceAccountKeyFileSecretId()); + } return this; } } @@ -210,7 +249,9 @@ public UpdateGoogleBigQueryConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, - String serviceAccountKeyFile) { + Boolean doesUseSecretIds, + String serviceAccountKeyFile, + String serviceAccountKeyFileSecretId) { super( displayName, description, @@ -220,8 +261,10 @@ public UpdateGoogleBigQueryConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.serviceAccountKeyFile = serviceAccountKeyFile; + this.serviceAccountKeyFileSecretId = serviceAccountKeyFileSecretId; } /** @@ -242,6 +285,26 @@ public String getServiceAccountKeyFile() { return serviceAccountKeyFile; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google BigQuery. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceAccountKeyFileSecretId") + private final String serviceAccountKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google BigQuery. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + * @return the value + **/ + public String getServiceAccountKeyFileSecretId() { + return serviceAccountKeyFileSecretId; + } + @Override public String toString() { return this.toString(true); @@ -257,6 +320,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("UpdateGoogleBigQueryConnectionDetails("); sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", serviceAccountKeyFile=").append(String.valueOf(this.serviceAccountKeyFile)); + sb.append(", serviceAccountKeyFileSecretId=") + .append(String.valueOf(this.serviceAccountKeyFileSecretId)); sb.append(")"); return sb.toString(); } @@ -272,6 +337,8 @@ public boolean equals(Object o) { UpdateGoogleBigQueryConnectionDetails other = (UpdateGoogleBigQueryConnectionDetails) o; return java.util.Objects.equals(this.serviceAccountKeyFile, other.serviceAccountKeyFile) + && java.util.Objects.equals( + this.serviceAccountKeyFileSecretId, other.serviceAccountKeyFileSecretId) && super.equals(other); } @@ -284,6 +351,11 @@ public int hashCode() { + (this.serviceAccountKeyFile == null ? 43 : this.serviceAccountKeyFile.hashCode()); + result = + (result * PRIME) + + (this.serviceAccountKeyFileSecretId == null + ? 43 + : this.serviceAccountKeyFileSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateGoogleCloudStorageConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateGoogleCloudStorageConnectionDetails.java index f767ebe9fdd..41bdc413578 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateGoogleCloudStorageConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateGoogleCloudStorageConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The base64 encoded content of the service account key file containing * the credentials required to use Google Cloud Storage. @@ -129,6 +138,28 @@ public Builder serviceAccountKeyFile(String serviceAccountKeyFile) { this.__explicitlySet__.add("serviceAccountKeyFile"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google Cloud Storage. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceAccountKeyFileSecretId") + private String serviceAccountKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google Cloud Storage. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + * @param serviceAccountKeyFileSecretId the value to set + * @return this builder + **/ + public Builder serviceAccountKeyFileSecretId(String serviceAccountKeyFileSecretId) { + this.serviceAccountKeyFileSecretId = serviceAccountKeyFileSecretId; + this.__explicitlySet__.add("serviceAccountKeyFileSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -145,7 +176,9 @@ public UpdateGoogleCloudStorageConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, - this.serviceAccountKeyFile); + this.doesUseSecretIds, + this.serviceAccountKeyFile, + this.serviceAccountKeyFileSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -181,9 +214,15 @@ public Builder copy(UpdateGoogleCloudStorageConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("serviceAccountKeyFile")) { this.serviceAccountKeyFile(model.getServiceAccountKeyFile()); } + if (model.wasPropertyExplicitlySet("serviceAccountKeyFileSecretId")) { + this.serviceAccountKeyFileSecretId(model.getServiceAccountKeyFileSecretId()); + } return this; } } @@ -210,7 +249,9 @@ public UpdateGoogleCloudStorageConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, - String serviceAccountKeyFile) { + Boolean doesUseSecretIds, + String serviceAccountKeyFile, + String serviceAccountKeyFileSecretId) { super( displayName, description, @@ -220,8 +261,10 @@ public UpdateGoogleCloudStorageConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.serviceAccountKeyFile = serviceAccountKeyFile; + this.serviceAccountKeyFileSecretId = serviceAccountKeyFileSecretId; } /** @@ -242,6 +285,26 @@ public String getServiceAccountKeyFile() { return serviceAccountKeyFile; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google Cloud Storage. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceAccountKeyFileSecretId") + private final String serviceAccountKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the service account key file is stored, + * which containing the credentials required to use Google Cloud Storage. + * Note: When provided, 'serviceAccountKeyFile' field must not be provided. + * + * @return the value + **/ + public String getServiceAccountKeyFileSecretId() { + return serviceAccountKeyFileSecretId; + } + @Override public String toString() { return this.toString(true); @@ -257,6 +320,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("UpdateGoogleCloudStorageConnectionDetails("); sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", serviceAccountKeyFile=").append(String.valueOf(this.serviceAccountKeyFile)); + sb.append(", serviceAccountKeyFileSecretId=") + .append(String.valueOf(this.serviceAccountKeyFileSecretId)); sb.append(")"); return sb.toString(); } @@ -273,6 +338,8 @@ public boolean equals(Object o) { UpdateGoogleCloudStorageConnectionDetails other = (UpdateGoogleCloudStorageConnectionDetails) o; return java.util.Objects.equals(this.serviceAccountKeyFile, other.serviceAccountKeyFile) + && java.util.Objects.equals( + this.serviceAccountKeyFileSecretId, other.serviceAccountKeyFileSecretId) && super.equals(other); } @@ -285,6 +352,11 @@ public int hashCode() { + (this.serviceAccountKeyFile == null ? 43 : this.serviceAccountKeyFile.hashCode()); + result = + (result * PRIME) + + (this.serviceAccountKeyFileSecretId == null + ? 43 + : this.serviceAccountKeyFileSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateGroupToRolesMappingDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateGroupToRolesMappingDetails.java new file mode 100644 index 00000000000..bff9b45f7a5 --- /dev/null +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateGroupToRolesMappingDetails.java @@ -0,0 +1,316 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.goldengate.model; + +/** + * Defines the IDP Groups to GoldenGate roles mapping. This field is used only for IAM deployment and does not have any impact on non-IAM deployments. + * For IAM deployment, when user does not specify this mapping, then it has null value and default mapping is used. + * User belonging to each group can only perform the actions according to the role the respective group is mapped to. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200407") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateGroupToRolesMappingDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateGroupToRolesMappingDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "securityGroupId", + "administratorGroupId", + "operatorGroupId", + "userGroupId" + }) + public UpdateGroupToRolesMappingDetails( + String securityGroupId, + String administratorGroupId, + String operatorGroupId, + String userGroupId) { + super(); + this.securityGroupId = securityGroupId; + this.administratorGroupId = administratorGroupId; + this.operatorGroupId = operatorGroupId; + this.userGroupId = userGroupId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role securityGroup. + * It grants administration of security related objects and invoke security related service requests. This role has full privileges. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityGroupId") + private String securityGroupId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role securityGroup. + * It grants administration of security related objects and invoke security related service requests. This role has full privileges. + * + * @param securityGroupId the value to set + * @return this builder + **/ + public Builder securityGroupId(String securityGroupId) { + this.securityGroupId = securityGroupId; + this.__explicitlySet__.add("securityGroupId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role administratorGroup. + * It grants full access to the user, including the ability to alter general, non-security related operational parameters + * and profiles of the server. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("administratorGroupId") + private String administratorGroupId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role administratorGroup. + * It grants full access to the user, including the ability to alter general, non-security related operational parameters + * and profiles of the server. + * + * @param administratorGroupId the value to set + * @return this builder + **/ + public Builder administratorGroupId(String administratorGroupId) { + this.administratorGroupId = administratorGroupId; + this.__explicitlySet__.add("administratorGroupId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role operatorGroup. + * It allows users to perform only operational actions, like starting and stopping resources. + * Operators cannot alter the operational parameters or profiles of the MA server. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operatorGroupId") + private String operatorGroupId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role operatorGroup. + * It allows users to perform only operational actions, like starting and stopping resources. + * Operators cannot alter the operational parameters or profiles of the MA server. + * + * @param operatorGroupId the value to set + * @return this builder + **/ + public Builder operatorGroupId(String operatorGroupId) { + this.operatorGroupId = operatorGroupId; + this.__explicitlySet__.add("operatorGroupId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role userGroup. + * It allows information-only service requests, which do not alter or affect the operation of either the MA. + * Examples of query and read-only information include performance metric information and resource status and monitoring information + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroupId") + private String userGroupId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role userGroup. + * It allows information-only service requests, which do not alter or affect the operation of either the MA. + * Examples of query and read-only information include performance metric information and resource status and monitoring information + * + * @param userGroupId the value to set + * @return this builder + **/ + public Builder userGroupId(String userGroupId) { + this.userGroupId = userGroupId; + this.__explicitlySet__.add("userGroupId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateGroupToRolesMappingDetails build() { + UpdateGroupToRolesMappingDetails model = + new UpdateGroupToRolesMappingDetails( + this.securityGroupId, + this.administratorGroupId, + this.operatorGroupId, + this.userGroupId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateGroupToRolesMappingDetails model) { + if (model.wasPropertyExplicitlySet("securityGroupId")) { + this.securityGroupId(model.getSecurityGroupId()); + } + if (model.wasPropertyExplicitlySet("administratorGroupId")) { + this.administratorGroupId(model.getAdministratorGroupId()); + } + if (model.wasPropertyExplicitlySet("operatorGroupId")) { + this.operatorGroupId(model.getOperatorGroupId()); + } + if (model.wasPropertyExplicitlySet("userGroupId")) { + this.userGroupId(model.getUserGroupId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role securityGroup. + * It grants administration of security related objects and invoke security related service requests. This role has full privileges. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityGroupId") + private final String securityGroupId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role securityGroup. + * It grants administration of security related objects and invoke security related service requests. This role has full privileges. + * + * @return the value + **/ + public String getSecurityGroupId() { + return securityGroupId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role administratorGroup. + * It grants full access to the user, including the ability to alter general, non-security related operational parameters + * and profiles of the server. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("administratorGroupId") + private final String administratorGroupId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role administratorGroup. + * It grants full access to the user, including the ability to alter general, non-security related operational parameters + * and profiles of the server. + * + * @return the value + **/ + public String getAdministratorGroupId() { + return administratorGroupId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role operatorGroup. + * It allows users to perform only operational actions, like starting and stopping resources. + * Operators cannot alter the operational parameters or profiles of the MA server. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operatorGroupId") + private final String operatorGroupId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role operatorGroup. + * It allows users to perform only operational actions, like starting and stopping resources. + * Operators cannot alter the operational parameters or profiles of the MA server. + * + * @return the value + **/ + public String getOperatorGroupId() { + return operatorGroupId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role userGroup. + * It allows information-only service requests, which do not alter or affect the operation of either the MA. + * Examples of query and read-only information include performance metric information and resource status and monitoring information + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userGroupId") + private final String userGroupId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IDP group which will be mapped to goldengate role userGroup. + * It allows information-only service requests, which do not alter or affect the operation of either the MA. + * Examples of query and read-only information include performance metric information and resource status and monitoring information + * + * @return the value + **/ + public String getUserGroupId() { + return userGroupId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateGroupToRolesMappingDetails("); + sb.append("super=").append(super.toString()); + sb.append("securityGroupId=").append(String.valueOf(this.securityGroupId)); + sb.append(", administratorGroupId=").append(String.valueOf(this.administratorGroupId)); + sb.append(", operatorGroupId=").append(String.valueOf(this.operatorGroupId)); + sb.append(", userGroupId=").append(String.valueOf(this.userGroupId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateGroupToRolesMappingDetails)) { + return false; + } + + UpdateGroupToRolesMappingDetails other = (UpdateGroupToRolesMappingDetails) o; + return java.util.Objects.equals(this.securityGroupId, other.securityGroupId) + && java.util.Objects.equals(this.administratorGroupId, other.administratorGroupId) + && java.util.Objects.equals(this.operatorGroupId, other.operatorGroupId) + && java.util.Objects.equals(this.userGroupId, other.userGroupId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.securityGroupId == null ? 43 : this.securityGroupId.hashCode()); + result = + (result * PRIME) + + (this.administratorGroupId == null + ? 43 + : this.administratorGroupId.hashCode()); + result = + (result * PRIME) + + (this.operatorGroupId == null ? 43 : this.operatorGroupId.hashCode()); + result = (result * PRIME) + (this.userGroupId == null ? 43 : this.userGroupId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateHdfsConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateHdfsConnectionDetails.java index b83a5187114..d7368295c9e 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateHdfsConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateHdfsConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The base64 encoded content of the Hadoop Distributed File System configuration file (core-site.xml). * @@ -143,6 +152,7 @@ public UpdateHdfsConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.coreSiteXml); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -179,6 +189,9 @@ public Builder copy(UpdateHdfsConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("coreSiteXml")) { this.coreSiteXml(model.getCoreSiteXml()); } @@ -208,6 +221,7 @@ public UpdateHdfsConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, String coreSiteXml) { super( displayName, @@ -218,7 +232,8 @@ public UpdateHdfsConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.coreSiteXml = coreSiteXml; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateJavaMessageServiceConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateJavaMessageServiceConnectionDetails.java index ced7c6ee67b..ff3db101f21 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateJavaMessageServiceConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateJavaMessageServiceConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * If set to true, Java Naming and Directory Interface (JNDI) properties should be provided. * @@ -227,6 +236,26 @@ public Builder jndiSecurityCredentials(String jndiSecurityCredentials) { this.__explicitlySet__.add("jndiSecurityCredentials"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the security credentials are stored associated to the principal. + * Note: When provided, 'jndiSecurityCredentials' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("jndiSecurityCredentialsSecretId") + private String jndiSecurityCredentialsSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the security credentials are stored associated to the principal. + * Note: When provided, 'jndiSecurityCredentials' field must not be provided. + * + * @param jndiSecurityCredentialsSecretId the value to set + * @return this builder + **/ + public Builder jndiSecurityCredentialsSecretId(String jndiSecurityCredentialsSecretId) { + this.jndiSecurityCredentialsSecretId = jndiSecurityCredentialsSecretId; + this.__explicitlySet__.add("jndiSecurityCredentialsSecretId"); + return this; + } /** * Connectin URL of the Java Message Service, specifying the protocol, host, and port. * e.g.: 'mq://myjms.host.domain:7676' @@ -307,6 +336,28 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated Java Message Service. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated Java Message Service. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * Security protocol for Java Message Service. If not provided, default is PLAIN. * Optional until 2024-06-27, in the release after it will be made required. @@ -367,6 +418,26 @@ public Builder trustStore(String trustStore) { this.__explicitlySet__.add("trustStore"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + * @param trustStoreSecretId the value to set + * @return this builder + **/ + public Builder trustStoreSecretId(String trustStoreSecretId) { + this.trustStoreSecretId = trustStoreSecretId; + this.__explicitlySet__.add("trustStoreSecretId"); + return this; + } /** * The TrustStore password. * @@ -385,6 +456,26 @@ public Builder trustStorePassword(String trustStorePassword) { this.__explicitlySet__.add("trustStorePassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @param trustStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder trustStorePasswordSecretId(String trustStorePasswordSecretId) { + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.__explicitlySet__.add("trustStorePasswordSecretId"); + return this; + } /** * The base64 encoded content of the KeyStore file. * @@ -403,6 +494,26 @@ public Builder keyStore(String keyStore) { this.__explicitlySet__.add("keyStore"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + * @param keyStoreSecretId the value to set + * @return this builder + **/ + public Builder keyStoreSecretId(String keyStoreSecretId) { + this.keyStoreSecretId = keyStoreSecretId; + this.__explicitlySet__.add("keyStoreSecretId"); + return this; + } /** * The KeyStore password. * @@ -421,6 +532,26 @@ public Builder keyStorePassword(String keyStorePassword) { this.__explicitlySet__.add("keyStorePassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @param keyStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder keyStorePasswordSecretId(String keyStorePasswordSecretId) { + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.__explicitlySet__.add("keyStorePasswordSecretId"); + return this; + } /** * The password for the cert inside of the KeyStore. * In case it differs from the KeyStore password, it should be provided. @@ -441,6 +572,28 @@ public Builder sslKeyPassword(String sslKeyPassword) { this.__explicitlySet__.add("sslKeyPassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored for the cert inside of the Keystore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored for the cert inside of the Keystore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @param sslKeyPasswordSecretId the value to set + * @return this builder + **/ + public Builder sslKeyPasswordSecretId(String sslKeyPasswordSecretId) { + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; + this.__explicitlySet__.add("sslKeyPasswordSecretId"); + return this; + } /** * Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host * field, or make sure the host name is resolvable in the target VCN. @@ -489,23 +642,31 @@ public UpdateJavaMessageServiceConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.shouldUseJndi, this.jndiConnectionFactory, this.jndiProviderUrl, this.jndiInitialContextFactory, this.jndiSecurityPrincipal, this.jndiSecurityCredentials, + this.jndiSecurityCredentialsSecretId, this.connectionUrl, this.connectionFactory, this.username, this.password, + this.passwordSecretId, this.securityProtocol, this.authenticationType, this.trustStore, + this.trustStoreSecretId, this.trustStorePassword, + this.trustStorePasswordSecretId, this.keyStore, + this.keyStoreSecretId, this.keyStorePassword, + this.keyStorePasswordSecretId, this.sslKeyPassword, + this.sslKeyPasswordSecretId, this.privateIp); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -542,6 +703,9 @@ public Builder copy(UpdateJavaMessageServiceConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("shouldUseJndi")) { this.shouldUseJndi(model.getShouldUseJndi()); } @@ -560,6 +724,9 @@ public Builder copy(UpdateJavaMessageServiceConnectionDetails model) { if (model.wasPropertyExplicitlySet("jndiSecurityCredentials")) { this.jndiSecurityCredentials(model.getJndiSecurityCredentials()); } + if (model.wasPropertyExplicitlySet("jndiSecurityCredentialsSecretId")) { + this.jndiSecurityCredentialsSecretId(model.getJndiSecurityCredentialsSecretId()); + } if (model.wasPropertyExplicitlySet("connectionUrl")) { this.connectionUrl(model.getConnectionUrl()); } @@ -572,6 +739,9 @@ public Builder copy(UpdateJavaMessageServiceConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("securityProtocol")) { this.securityProtocol(model.getSecurityProtocol()); } @@ -581,18 +751,33 @@ public Builder copy(UpdateJavaMessageServiceConnectionDetails model) { if (model.wasPropertyExplicitlySet("trustStore")) { this.trustStore(model.getTrustStore()); } + if (model.wasPropertyExplicitlySet("trustStoreSecretId")) { + this.trustStoreSecretId(model.getTrustStoreSecretId()); + } if (model.wasPropertyExplicitlySet("trustStorePassword")) { this.trustStorePassword(model.getTrustStorePassword()); } + if (model.wasPropertyExplicitlySet("trustStorePasswordSecretId")) { + this.trustStorePasswordSecretId(model.getTrustStorePasswordSecretId()); + } if (model.wasPropertyExplicitlySet("keyStore")) { this.keyStore(model.getKeyStore()); } + if (model.wasPropertyExplicitlySet("keyStoreSecretId")) { + this.keyStoreSecretId(model.getKeyStoreSecretId()); + } if (model.wasPropertyExplicitlySet("keyStorePassword")) { this.keyStorePassword(model.getKeyStorePassword()); } + if (model.wasPropertyExplicitlySet("keyStorePasswordSecretId")) { + this.keyStorePasswordSecretId(model.getKeyStorePasswordSecretId()); + } if (model.wasPropertyExplicitlySet("sslKeyPassword")) { this.sslKeyPassword(model.getSslKeyPassword()); } + if (model.wasPropertyExplicitlySet("sslKeyPasswordSecretId")) { + this.sslKeyPasswordSecretId(model.getSslKeyPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } @@ -622,23 +807,31 @@ public UpdateJavaMessageServiceConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, Boolean shouldUseJndi, String jndiConnectionFactory, String jndiProviderUrl, String jndiInitialContextFactory, String jndiSecurityPrincipal, String jndiSecurityCredentials, + String jndiSecurityCredentialsSecretId, String connectionUrl, String connectionFactory, String username, String password, + String passwordSecretId, JavaMessageServiceConnection.SecurityProtocol securityProtocol, JavaMessageServiceConnection.AuthenticationType authenticationType, String trustStore, + String trustStoreSecretId, String trustStorePassword, + String trustStorePasswordSecretId, String keyStore, + String keyStoreSecretId, String keyStorePassword, + String keyStorePasswordSecretId, String sslKeyPassword, + String sslKeyPasswordSecretId, String privateIp) { super( displayName, @@ -649,24 +842,32 @@ public UpdateJavaMessageServiceConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.shouldUseJndi = shouldUseJndi; this.jndiConnectionFactory = jndiConnectionFactory; this.jndiProviderUrl = jndiProviderUrl; this.jndiInitialContextFactory = jndiInitialContextFactory; this.jndiSecurityPrincipal = jndiSecurityPrincipal; this.jndiSecurityCredentials = jndiSecurityCredentials; + this.jndiSecurityCredentialsSecretId = jndiSecurityCredentialsSecretId; this.connectionUrl = connectionUrl; this.connectionFactory = connectionFactory; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.securityProtocol = securityProtocol; this.authenticationType = authenticationType; this.trustStore = trustStore; + this.trustStoreSecretId = trustStoreSecretId; this.trustStorePassword = trustStorePassword; + this.trustStorePasswordSecretId = trustStorePasswordSecretId; this.keyStore = keyStore; + this.keyStoreSecretId = keyStoreSecretId; this.keyStorePassword = keyStorePassword; + this.keyStorePasswordSecretId = keyStorePasswordSecretId; this.sslKeyPassword = sslKeyPassword; + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; this.privateIp = privateIp; } @@ -776,6 +977,24 @@ public String getJndiSecurityCredentials() { return jndiSecurityCredentials; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the security credentials are stored associated to the principal. + * Note: When provided, 'jndiSecurityCredentials' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("jndiSecurityCredentialsSecretId") + private final String jndiSecurityCredentialsSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the security credentials are stored associated to the principal. + * Note: When provided, 'jndiSecurityCredentials' field must not be provided. + * + * @return the value + **/ + public String getJndiSecurityCredentialsSecretId() { + return jndiSecurityCredentialsSecretId; + } + /** * Connectin URL of the Java Message Service, specifying the protocol, host, and port. * e.g.: 'mq://myjms.host.domain:7676' @@ -848,6 +1067,26 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated Java Message Service. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored, + * that Oracle GoldenGate uses to connect the associated Java Message Service. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * Security protocol for Java Message Service. If not provided, default is PLAIN. * Optional until 2024-06-27, in the release after it will be made required. @@ -900,6 +1139,24 @@ public String getTrustStore() { return trustStore; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private final String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + * @return the value + **/ + public String getTrustStoreSecretId() { + return trustStoreSecretId; + } + /** * The TrustStore password. * @@ -916,6 +1173,24 @@ public String getTrustStorePassword() { return trustStorePassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private final String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @return the value + **/ + public String getTrustStorePasswordSecretId() { + return trustStorePasswordSecretId; + } + /** * The base64 encoded content of the KeyStore file. * @@ -932,6 +1207,24 @@ public String getKeyStore() { return keyStore; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private final String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + * @return the value + **/ + public String getKeyStoreSecretId() { + return keyStoreSecretId; + } + /** * The KeyStore password. * @@ -948,6 +1241,24 @@ public String getKeyStorePassword() { return keyStorePassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private final String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @return the value + **/ + public String getKeyStorePasswordSecretId() { + return keyStorePasswordSecretId; + } + /** * The password for the cert inside of the KeyStore. * In case it differs from the KeyStore password, it should be provided. @@ -966,6 +1277,26 @@ public String getSslKeyPassword() { return sslKeyPassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored for the cert inside of the Keystore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private final String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored for the cert inside of the Keystore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @return the value + **/ + public String getSslKeyPasswordSecretId() { + return sslKeyPasswordSecretId; + } + /** * Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host * field, or make sure the host name is resolvable in the target VCN. @@ -1017,17 +1348,27 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.jndiInitialContextFactory)); sb.append(", jndiSecurityPrincipal=").append(String.valueOf(this.jndiSecurityPrincipal)); sb.append(", jndiSecurityCredentials=").append(""); + sb.append(", jndiSecurityCredentialsSecretId=") + .append(String.valueOf(this.jndiSecurityCredentialsSecretId)); sb.append(", connectionUrl=").append(String.valueOf(this.connectionUrl)); sb.append(", connectionFactory=").append(String.valueOf(this.connectionFactory)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", securityProtocol=").append(String.valueOf(this.securityProtocol)); sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", trustStore=").append(String.valueOf(this.trustStore)); + sb.append(", trustStoreSecretId=").append(String.valueOf(this.trustStoreSecretId)); sb.append(", trustStorePassword=").append(""); + sb.append(", trustStorePasswordSecretId=") + .append(String.valueOf(this.trustStorePasswordSecretId)); sb.append(", keyStore=").append(String.valueOf(this.keyStore)); + sb.append(", keyStoreSecretId=").append(String.valueOf(this.keyStoreSecretId)); sb.append(", keyStorePassword=").append(""); + sb.append(", keyStorePasswordSecretId=") + .append(String.valueOf(this.keyStorePasswordSecretId)); sb.append(", sslKeyPassword=").append(""); + sb.append(", sslKeyPasswordSecretId=").append(String.valueOf(this.sslKeyPasswordSecretId)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(")"); return sb.toString(); @@ -1052,17 +1393,28 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.jndiSecurityPrincipal, other.jndiSecurityPrincipal) && java.util.Objects.equals( this.jndiSecurityCredentials, other.jndiSecurityCredentials) + && java.util.Objects.equals( + this.jndiSecurityCredentialsSecretId, other.jndiSecurityCredentialsSecretId) && java.util.Objects.equals(this.connectionUrl, other.connectionUrl) && java.util.Objects.equals(this.connectionFactory, other.connectionFactory) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.securityProtocol, other.securityProtocol) && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.trustStore, other.trustStore) + && java.util.Objects.equals(this.trustStoreSecretId, other.trustStoreSecretId) && java.util.Objects.equals(this.trustStorePassword, other.trustStorePassword) + && java.util.Objects.equals( + this.trustStorePasswordSecretId, other.trustStorePasswordSecretId) && java.util.Objects.equals(this.keyStore, other.keyStore) + && java.util.Objects.equals(this.keyStoreSecretId, other.keyStoreSecretId) && java.util.Objects.equals(this.keyStorePassword, other.keyStorePassword) + && java.util.Objects.equals( + this.keyStorePasswordSecretId, other.keyStorePasswordSecretId) && java.util.Objects.equals(this.sslKeyPassword, other.sslKeyPassword) + && java.util.Objects.equals( + this.sslKeyPasswordSecretId, other.sslKeyPasswordSecretId) && java.util.Objects.equals(this.privateIp, other.privateIp) && super.equals(other); } @@ -1097,6 +1449,11 @@ public int hashCode() { + (this.jndiSecurityCredentials == null ? 43 : this.jndiSecurityCredentials.hashCode()); + result = + (result * PRIME) + + (this.jndiSecurityCredentialsSecretId == null + ? 43 + : this.jndiSecurityCredentialsSecretId.hashCode()); result = (result * PRIME) + (this.connectionUrl == null ? 43 : this.connectionUrl.hashCode()); @@ -1105,6 +1462,9 @@ public int hashCode() { + (this.connectionFactory == null ? 43 : this.connectionFactory.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.securityProtocol == null ? 43 : this.securityProtocol.hashCode()); @@ -1114,18 +1474,41 @@ public int hashCode() { ? 43 : this.authenticationType.hashCode()); result = (result * PRIME) + (this.trustStore == null ? 43 : this.trustStore.hashCode()); + result = + (result * PRIME) + + (this.trustStoreSecretId == null + ? 43 + : this.trustStoreSecretId.hashCode()); result = (result * PRIME) + (this.trustStorePassword == null ? 43 : this.trustStorePassword.hashCode()); + result = + (result * PRIME) + + (this.trustStorePasswordSecretId == null + ? 43 + : this.trustStorePasswordSecretId.hashCode()); result = (result * PRIME) + (this.keyStore == null ? 43 : this.keyStore.hashCode()); + result = + (result * PRIME) + + (this.keyStoreSecretId == null ? 43 : this.keyStoreSecretId.hashCode()); result = (result * PRIME) + (this.keyStorePassword == null ? 43 : this.keyStorePassword.hashCode()); + result = + (result * PRIME) + + (this.keyStorePasswordSecretId == null + ? 43 + : this.keyStorePasswordSecretId.hashCode()); result = (result * PRIME) + (this.sslKeyPassword == null ? 43 : this.sslKeyPassword.hashCode()); + result = + (result * PRIME) + + (this.sslKeyPasswordSecretId == null + ? 43 + : this.sslKeyPasswordSecretId.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateKafkaConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateKafkaConnectionDetails.java index a3b871af2f6..19ea9c526b2 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateKafkaConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateKafkaConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the stream pool being referenced. * @@ -211,6 +220,32 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * The base64 encoded content of the TrustStore file. * @@ -229,6 +264,26 @@ public Builder trustStore(String trustStore) { this.__explicitlySet__.add("trustStore"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + * @param trustStoreSecretId the value to set + * @return this builder + **/ + public Builder trustStoreSecretId(String trustStoreSecretId) { + this.trustStoreSecretId = trustStoreSecretId; + this.__explicitlySet__.add("trustStoreSecretId"); + return this; + } /** * The TrustStore password. * @@ -247,6 +302,26 @@ public Builder trustStorePassword(String trustStorePassword) { this.__explicitlySet__.add("trustStorePassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @param trustStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder trustStorePasswordSecretId(String trustStorePasswordSecretId) { + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.__explicitlySet__.add("trustStorePasswordSecretId"); + return this; + } /** * The base64 encoded content of the KeyStore file. * @@ -265,6 +340,26 @@ public Builder keyStore(String keyStore) { this.__explicitlySet__.add("keyStore"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + * @param keyStoreSecretId the value to set + * @return this builder + **/ + public Builder keyStoreSecretId(String keyStoreSecretId) { + this.keyStoreSecretId = keyStoreSecretId; + this.__explicitlySet__.add("keyStoreSecretId"); + return this; + } /** * The KeyStore password. * @@ -283,6 +378,26 @@ public Builder keyStorePassword(String keyStorePassword) { this.__explicitlySet__.add("keyStorePassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @param keyStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder keyStorePasswordSecretId(String keyStorePasswordSecretId) { + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.__explicitlySet__.add("keyStorePasswordSecretId"); + return this; + } /** * The password for the cert inside of the KeyStore. * In case it differs from the KeyStore password, it should be provided. @@ -303,6 +418,26 @@ public Builder sslKeyPassword(String sslKeyPassword) { this.__explicitlySet__.add("sslKeyPassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl Key password is stored. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl Key password is stored. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @param sslKeyPasswordSecretId the value to set + * @return this builder + **/ + public Builder sslKeyPasswordSecretId(String sslKeyPasswordSecretId) { + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; + this.__explicitlySet__.add("sslKeyPasswordSecretId"); + return this; + } /** * The base64 encoded content of the consumer.properties file. * @@ -355,16 +490,23 @@ public UpdateKafkaConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.streamPoolId, this.bootstrapServers, this.securityProtocol, this.username, this.password, + this.passwordSecretId, this.trustStore, + this.trustStoreSecretId, this.trustStorePassword, + this.trustStorePasswordSecretId, this.keyStore, + this.keyStoreSecretId, this.keyStorePassword, + this.keyStorePasswordSecretId, this.sslKeyPassword, + this.sslKeyPasswordSecretId, this.consumerProperties, this.producerProperties); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -402,6 +544,9 @@ public Builder copy(UpdateKafkaConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("streamPoolId")) { this.streamPoolId(model.getStreamPoolId()); } @@ -417,21 +562,39 @@ public Builder copy(UpdateKafkaConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("trustStore")) { this.trustStore(model.getTrustStore()); } + if (model.wasPropertyExplicitlySet("trustStoreSecretId")) { + this.trustStoreSecretId(model.getTrustStoreSecretId()); + } if (model.wasPropertyExplicitlySet("trustStorePassword")) { this.trustStorePassword(model.getTrustStorePassword()); } + if (model.wasPropertyExplicitlySet("trustStorePasswordSecretId")) { + this.trustStorePasswordSecretId(model.getTrustStorePasswordSecretId()); + } if (model.wasPropertyExplicitlySet("keyStore")) { this.keyStore(model.getKeyStore()); } + if (model.wasPropertyExplicitlySet("keyStoreSecretId")) { + this.keyStoreSecretId(model.getKeyStoreSecretId()); + } if (model.wasPropertyExplicitlySet("keyStorePassword")) { this.keyStorePassword(model.getKeyStorePassword()); } + if (model.wasPropertyExplicitlySet("keyStorePasswordSecretId")) { + this.keyStorePasswordSecretId(model.getKeyStorePasswordSecretId()); + } if (model.wasPropertyExplicitlySet("sslKeyPassword")) { this.sslKeyPassword(model.getSslKeyPassword()); } + if (model.wasPropertyExplicitlySet("sslKeyPasswordSecretId")) { + this.sslKeyPasswordSecretId(model.getSslKeyPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("consumerProperties")) { this.consumerProperties(model.getConsumerProperties()); } @@ -464,16 +627,23 @@ public UpdateKafkaConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, String streamPoolId, java.util.List bootstrapServers, KafkaConnection.SecurityProtocol securityProtocol, String username, String password, + String passwordSecretId, String trustStore, + String trustStoreSecretId, String trustStorePassword, + String trustStorePasswordSecretId, String keyStore, + String keyStoreSecretId, String keyStorePassword, + String keyStorePasswordSecretId, String sslKeyPassword, + String sslKeyPasswordSecretId, String consumerProperties, String producerProperties) { super( @@ -485,17 +655,24 @@ public UpdateKafkaConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.streamPoolId = streamPoolId; this.bootstrapServers = bootstrapServers; this.securityProtocol = securityProtocol; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.trustStore = trustStore; + this.trustStoreSecretId = trustStoreSecretId; this.trustStorePassword = trustStorePassword; + this.trustStorePasswordSecretId = trustStorePasswordSecretId; this.keyStore = keyStore; + this.keyStoreSecretId = keyStoreSecretId; this.keyStorePassword = keyStorePassword; + this.keyStorePasswordSecretId = keyStorePasswordSecretId; this.sslKeyPassword = sslKeyPassword; + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; this.consumerProperties = consumerProperties; this.producerProperties = producerProperties; } @@ -592,6 +769,30 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * The base64 encoded content of the TrustStore file. * @@ -608,6 +809,24 @@ public String getTrustStore() { return trustStore; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private final String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the TrustStore file is stored. + * Note: When provided, 'trustStore' field must not be provided. + * + * @return the value + **/ + public String getTrustStoreSecretId() { + return trustStoreSecretId; + } + /** * The TrustStore password. * @@ -624,6 +843,24 @@ public String getTrustStorePassword() { return trustStorePassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private final String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @return the value + **/ + public String getTrustStorePasswordSecretId() { + return trustStorePasswordSecretId; + } + /** * The base64 encoded content of the KeyStore file. * @@ -640,6 +877,24 @@ public String getKeyStore() { return keyStore; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private final String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the content of the KeyStore file is stored. + * Note: When provided, 'keyStore' field must not be provided. + * + * @return the value + **/ + public String getKeyStoreSecretId() { + return keyStoreSecretId; + } + /** * The KeyStore password. * @@ -656,6 +911,24 @@ public String getKeyStorePassword() { return keyStorePassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private final String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @return the value + **/ + public String getKeyStorePasswordSecretId() { + return keyStorePasswordSecretId; + } + /** * The password for the cert inside of the KeyStore. * In case it differs from the KeyStore password, it should be provided. @@ -674,6 +947,24 @@ public String getSslKeyPassword() { return sslKeyPassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl Key password is stored. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private final String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl Key password is stored. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @return the value + **/ + public String getSslKeyPasswordSecretId() { + return sslKeyPasswordSecretId; + } + /** * The base64 encoded content of the consumer.properties file. * @@ -725,11 +1016,19 @@ public String toString(boolean includeByteArrayContents) { sb.append(", securityProtocol=").append(String.valueOf(this.securityProtocol)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", trustStore=").append(String.valueOf(this.trustStore)); + sb.append(", trustStoreSecretId=").append(String.valueOf(this.trustStoreSecretId)); sb.append(", trustStorePassword=").append(""); + sb.append(", trustStorePasswordSecretId=") + .append(String.valueOf(this.trustStorePasswordSecretId)); sb.append(", keyStore=").append(String.valueOf(this.keyStore)); + sb.append(", keyStoreSecretId=").append(String.valueOf(this.keyStoreSecretId)); sb.append(", keyStorePassword=").append(""); + sb.append(", keyStorePasswordSecretId=") + .append(String.valueOf(this.keyStorePasswordSecretId)); sb.append(", sslKeyPassword=").append(""); + sb.append(", sslKeyPasswordSecretId=").append(String.valueOf(this.sslKeyPasswordSecretId)); sb.append(", consumerProperties=").append(String.valueOf(this.consumerProperties)); sb.append(", producerProperties=").append(String.valueOf(this.producerProperties)); sb.append(")"); @@ -751,11 +1050,20 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.securityProtocol, other.securityProtocol) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.trustStore, other.trustStore) + && java.util.Objects.equals(this.trustStoreSecretId, other.trustStoreSecretId) && java.util.Objects.equals(this.trustStorePassword, other.trustStorePassword) + && java.util.Objects.equals( + this.trustStorePasswordSecretId, other.trustStorePasswordSecretId) && java.util.Objects.equals(this.keyStore, other.keyStore) + && java.util.Objects.equals(this.keyStoreSecretId, other.keyStoreSecretId) && java.util.Objects.equals(this.keyStorePassword, other.keyStorePassword) + && java.util.Objects.equals( + this.keyStorePasswordSecretId, other.keyStorePasswordSecretId) && java.util.Objects.equals(this.sslKeyPassword, other.sslKeyPassword) + && java.util.Objects.equals( + this.sslKeyPasswordSecretId, other.sslKeyPasswordSecretId) && java.util.Objects.equals(this.consumerProperties, other.consumerProperties) && java.util.Objects.equals(this.producerProperties, other.producerProperties) && super.equals(other); @@ -774,19 +1082,45 @@ public int hashCode() { + (this.securityProtocol == null ? 43 : this.securityProtocol.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.trustStore == null ? 43 : this.trustStore.hashCode()); + result = + (result * PRIME) + + (this.trustStoreSecretId == null + ? 43 + : this.trustStoreSecretId.hashCode()); result = (result * PRIME) + (this.trustStorePassword == null ? 43 : this.trustStorePassword.hashCode()); + result = + (result * PRIME) + + (this.trustStorePasswordSecretId == null + ? 43 + : this.trustStorePasswordSecretId.hashCode()); result = (result * PRIME) + (this.keyStore == null ? 43 : this.keyStore.hashCode()); + result = + (result * PRIME) + + (this.keyStoreSecretId == null ? 43 : this.keyStoreSecretId.hashCode()); result = (result * PRIME) + (this.keyStorePassword == null ? 43 : this.keyStorePassword.hashCode()); + result = + (result * PRIME) + + (this.keyStorePasswordSecretId == null + ? 43 + : this.keyStorePasswordSecretId.hashCode()); result = (result * PRIME) + (this.sslKeyPassword == null ? 43 : this.sslKeyPassword.hashCode()); + result = + (result * PRIME) + + (this.sslKeyPasswordSecretId == null + ? 43 + : this.sslKeyPasswordSecretId.hashCode()); result = (result * PRIME) + (this.consumerProperties == null diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateKafkaSchemaRegistryConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateKafkaSchemaRegistryConnectionDetails.java index 03cd797551a..0b6a7538f94 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateKafkaSchemaRegistryConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateKafkaSchemaRegistryConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * Kafka Schema Registry URL. * e.g.: 'https://server1.us.oracle.com:8081' @@ -149,7 +158,7 @@ public Builder authenticationType( return this; } /** - * The username to access Schema Registry using basic authentation. + * The username to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * **/ @@ -157,7 +166,7 @@ public Builder authenticationType( private String username; /** - * The username to access Schema Registry using basic authentation. + * The username to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * * @param username the value to set @@ -169,7 +178,7 @@ public Builder username(String username) { return this; } /** - * The password to access Schema Registry using basic authentation. + * The password to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * **/ @@ -177,7 +186,7 @@ public Builder username(String username) { private String password; /** - * The password to access Schema Registry using basic authentation. + * The password to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * * @param password the value to set @@ -188,6 +197,32 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * The base64 encoded content of the TrustStore file. * @@ -206,6 +241,26 @@ public Builder trustStore(String trustStore) { this.__explicitlySet__.add("trustStore"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + * @param trustStoreSecretId the value to set + * @return this builder + **/ + public Builder trustStoreSecretId(String trustStoreSecretId) { + this.trustStoreSecretId = trustStoreSecretId; + this.__explicitlySet__.add("trustStoreSecretId"); + return this; + } /** * The TrustStore password. * @@ -224,6 +279,26 @@ public Builder trustStorePassword(String trustStorePassword) { this.__explicitlySet__.add("trustStorePassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @param trustStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder trustStorePasswordSecretId(String trustStorePasswordSecretId) { + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.__explicitlySet__.add("trustStorePasswordSecretId"); + return this; + } /** * The base64 encoded content of the KeyStore file. * @@ -242,6 +317,26 @@ public Builder keyStore(String keyStore) { this.__explicitlySet__.add("keyStore"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + * @param keyStoreSecretId the value to set + * @return this builder + **/ + public Builder keyStoreSecretId(String keyStoreSecretId) { + this.keyStoreSecretId = keyStoreSecretId; + this.__explicitlySet__.add("keyStoreSecretId"); + return this; + } /** * The KeyStore password. * @@ -260,6 +355,26 @@ public Builder keyStorePassword(String keyStorePassword) { this.__explicitlySet__.add("keyStorePassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @param keyStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder keyStorePasswordSecretId(String keyStorePasswordSecretId) { + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.__explicitlySet__.add("keyStorePasswordSecretId"); + return this; + } /** * The password for the cert inside the KeyStore. * In case it differs from the KeyStore password, it should be provided. @@ -280,6 +395,28 @@ public Builder sslKeyPassword(String sslKeyPassword) { this.__explicitlySet__.add("sslKeyPassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the cert inside the KeyStore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the cert inside the KeyStore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @param sslKeyPasswordSecretId the value to set + * @return this builder + **/ + public Builder sslKeyPasswordSecretId(String sslKeyPasswordSecretId) { + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; + this.__explicitlySet__.add("sslKeyPasswordSecretId"); + return this; + } /** * Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host * field, or make sure the host name is resolvable in the target VCN. @@ -328,15 +465,22 @@ public UpdateKafkaSchemaRegistryConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.url, this.authenticationType, this.username, this.password, + this.passwordSecretId, this.trustStore, + this.trustStoreSecretId, this.trustStorePassword, + this.trustStorePasswordSecretId, this.keyStore, + this.keyStoreSecretId, this.keyStorePassword, + this.keyStorePasswordSecretId, this.sslKeyPassword, + this.sslKeyPasswordSecretId, this.privateIp); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -373,6 +517,9 @@ public Builder copy(UpdateKafkaSchemaRegistryConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("url")) { this.url(model.getUrl()); } @@ -385,21 +532,39 @@ public Builder copy(UpdateKafkaSchemaRegistryConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("trustStore")) { this.trustStore(model.getTrustStore()); } + if (model.wasPropertyExplicitlySet("trustStoreSecretId")) { + this.trustStoreSecretId(model.getTrustStoreSecretId()); + } if (model.wasPropertyExplicitlySet("trustStorePassword")) { this.trustStorePassword(model.getTrustStorePassword()); } + if (model.wasPropertyExplicitlySet("trustStorePasswordSecretId")) { + this.trustStorePasswordSecretId(model.getTrustStorePasswordSecretId()); + } if (model.wasPropertyExplicitlySet("keyStore")) { this.keyStore(model.getKeyStore()); } + if (model.wasPropertyExplicitlySet("keyStoreSecretId")) { + this.keyStoreSecretId(model.getKeyStoreSecretId()); + } if (model.wasPropertyExplicitlySet("keyStorePassword")) { this.keyStorePassword(model.getKeyStorePassword()); } + if (model.wasPropertyExplicitlySet("keyStorePasswordSecretId")) { + this.keyStorePasswordSecretId(model.getKeyStorePasswordSecretId()); + } if (model.wasPropertyExplicitlySet("sslKeyPassword")) { this.sslKeyPassword(model.getSslKeyPassword()); } + if (model.wasPropertyExplicitlySet("sslKeyPasswordSecretId")) { + this.sslKeyPasswordSecretId(model.getSslKeyPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } @@ -429,15 +594,22 @@ public UpdateKafkaSchemaRegistryConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, String url, KafkaSchemaRegistryConnection.AuthenticationType authenticationType, String username, String password, + String passwordSecretId, String trustStore, + String trustStoreSecretId, String trustStorePassword, + String trustStorePasswordSecretId, String keyStore, + String keyStoreSecretId, String keyStorePassword, + String keyStorePasswordSecretId, String sslKeyPassword, + String sslKeyPasswordSecretId, String privateIp) { super( displayName, @@ -448,16 +620,23 @@ public UpdateKafkaSchemaRegistryConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.url = url; this.authenticationType = authenticationType; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.trustStore = trustStore; + this.trustStoreSecretId = trustStoreSecretId; this.trustStorePassword = trustStorePassword; + this.trustStorePasswordSecretId = trustStorePasswordSecretId; this.keyStore = keyStore; + this.keyStoreSecretId = keyStoreSecretId; this.keyStorePassword = keyStorePassword; + this.keyStorePasswordSecretId = keyStorePasswordSecretId; this.sslKeyPassword = sslKeyPassword; + this.sslKeyPasswordSecretId = sslKeyPasswordSecretId; this.privateIp = privateIp; } @@ -496,7 +675,7 @@ public KafkaSchemaRegistryConnection.AuthenticationType getAuthenticationType() } /** - * The username to access Schema Registry using basic authentation. + * The username to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * **/ @@ -504,7 +683,7 @@ public KafkaSchemaRegistryConnection.AuthenticationType getAuthenticationType() private final String username; /** - * The username to access Schema Registry using basic authentation. + * The username to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * * @return the value @@ -514,7 +693,7 @@ public String getUsername() { } /** - * The password to access Schema Registry using basic authentation. + * The password to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * **/ @@ -522,7 +701,7 @@ public String getUsername() { private final String password; /** - * The password to access Schema Registry using basic authentation. + * The password to access Schema Registry using basic authentication. * This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. * * @return the value @@ -531,6 +710,30 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * The base64 encoded content of the TrustStore file. * @@ -547,6 +750,24 @@ public String getTrustStore() { return trustStore; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private final String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + * @return the value + **/ + public String getTrustStoreSecretId() { + return trustStoreSecretId; + } + /** * The TrustStore password. * @@ -563,6 +784,24 @@ public String getTrustStorePassword() { return trustStorePassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private final String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @return the value + **/ + public String getTrustStorePasswordSecretId() { + return trustStorePasswordSecretId; + } + /** * The base64 encoded content of the KeyStore file. * @@ -579,6 +818,24 @@ public String getKeyStore() { return keyStore; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private final String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + * @return the value + **/ + public String getKeyStoreSecretId() { + return keyStoreSecretId; + } + /** * The KeyStore password. * @@ -595,6 +852,24 @@ public String getKeyStorePassword() { return keyStorePassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private final String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the kafka Ssl KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @return the value + **/ + public String getKeyStorePasswordSecretId() { + return keyStorePasswordSecretId; + } + /** * The password for the cert inside the KeyStore. * In case it differs from the KeyStore password, it should be provided. @@ -613,6 +888,26 @@ public String getSslKeyPassword() { return sslKeyPassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the cert inside the KeyStore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeyPasswordSecretId") + private final String sslKeyPasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the cert inside the KeyStore. + * In case it differs from the KeyStore password, it should be provided. + * Note: When provided, 'sslKeyPassword' field must not be provided. + * + * @return the value + **/ + public String getSslKeyPasswordSecretId() { + return sslKeyPasswordSecretId; + } + /** * Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host * field, or make sure the host name is resolvable in the target VCN. @@ -661,11 +956,19 @@ public String toString(boolean includeByteArrayContents) { sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", trustStore=").append(String.valueOf(this.trustStore)); + sb.append(", trustStoreSecretId=").append(String.valueOf(this.trustStoreSecretId)); sb.append(", trustStorePassword=").append(""); + sb.append(", trustStorePasswordSecretId=") + .append(String.valueOf(this.trustStorePasswordSecretId)); sb.append(", keyStore=").append(String.valueOf(this.keyStore)); + sb.append(", keyStoreSecretId=").append(String.valueOf(this.keyStoreSecretId)); sb.append(", keyStorePassword=").append(""); + sb.append(", keyStorePasswordSecretId=") + .append(String.valueOf(this.keyStorePasswordSecretId)); sb.append(", sslKeyPassword=").append(""); + sb.append(", sslKeyPasswordSecretId=").append(String.valueOf(this.sslKeyPasswordSecretId)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(")"); return sb.toString(); @@ -686,11 +989,20 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.trustStore, other.trustStore) + && java.util.Objects.equals(this.trustStoreSecretId, other.trustStoreSecretId) && java.util.Objects.equals(this.trustStorePassword, other.trustStorePassword) + && java.util.Objects.equals( + this.trustStorePasswordSecretId, other.trustStorePasswordSecretId) && java.util.Objects.equals(this.keyStore, other.keyStore) + && java.util.Objects.equals(this.keyStoreSecretId, other.keyStoreSecretId) && java.util.Objects.equals(this.keyStorePassword, other.keyStorePassword) + && java.util.Objects.equals( + this.keyStorePasswordSecretId, other.keyStorePasswordSecretId) && java.util.Objects.equals(this.sslKeyPassword, other.sslKeyPassword) + && java.util.Objects.equals( + this.sslKeyPasswordSecretId, other.sslKeyPasswordSecretId) && java.util.Objects.equals(this.privateIp, other.privateIp) && super.equals(other); } @@ -707,19 +1019,45 @@ public int hashCode() { : this.authenticationType.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.trustStore == null ? 43 : this.trustStore.hashCode()); + result = + (result * PRIME) + + (this.trustStoreSecretId == null + ? 43 + : this.trustStoreSecretId.hashCode()); result = (result * PRIME) + (this.trustStorePassword == null ? 43 : this.trustStorePassword.hashCode()); + result = + (result * PRIME) + + (this.trustStorePasswordSecretId == null + ? 43 + : this.trustStorePasswordSecretId.hashCode()); result = (result * PRIME) + (this.keyStore == null ? 43 : this.keyStore.hashCode()); + result = + (result * PRIME) + + (this.keyStoreSecretId == null ? 43 : this.keyStoreSecretId.hashCode()); result = (result * PRIME) + (this.keyStorePassword == null ? 43 : this.keyStorePassword.hashCode()); + result = + (result * PRIME) + + (this.keyStorePasswordSecretId == null + ? 43 + : this.keyStorePasswordSecretId.hashCode()); result = (result * PRIME) + (this.sslKeyPassword == null ? 43 : this.sslKeyPassword.hashCode()); + result = + (result * PRIME) + + (this.sslKeyPasswordSecretId == null + ? 43 + : this.sslKeyPasswordSecretId.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateMicrosoftSqlserverConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateMicrosoftSqlserverConnectionDetails.java index 557808b65de..a96c1e8aada 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateMicrosoftSqlserverConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateMicrosoftSqlserverConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The name of the database. * @@ -201,6 +210,26 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated Microsoft SQL Server. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated Microsoft SQL Server. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * An array of name-value pair attribute entries. * Used as additional parameters in connection string. @@ -324,11 +353,13 @@ public UpdateMicrosoftSqlserverConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.databaseName, this.host, this.port, this.username, this.password, + this.passwordSecretId, this.additionalAttributes, this.securityProtocol, this.sslCa, @@ -369,6 +400,9 @@ public Builder copy(UpdateMicrosoftSqlserverConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("databaseName")) { this.databaseName(model.getDatabaseName()); } @@ -384,6 +418,9 @@ public Builder copy(UpdateMicrosoftSqlserverConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("additionalAttributes")) { this.additionalAttributes(model.getAdditionalAttributes()); } @@ -425,11 +462,13 @@ public UpdateMicrosoftSqlserverConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, String databaseName, String host, Integer port, String username, String password, + String passwordSecretId, java.util.List additionalAttributes, MicrosoftSqlserverConnection.SecurityProtocol securityProtocol, String sslCa, @@ -444,12 +483,14 @@ public UpdateMicrosoftSqlserverConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.databaseName = databaseName; this.host = host; this.port = port; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.additionalAttributes = additionalAttributes; this.securityProtocol = securityProtocol; this.sslCa = sslCa; @@ -539,6 +580,24 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated Microsoft SQL Server. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated Microsoft SQL Server. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * An array of name-value pair attribute entries. * Used as additional parameters in connection string. @@ -654,6 +713,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", port=").append(String.valueOf(this.port)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", additionalAttributes=").append(String.valueOf(this.additionalAttributes)); sb.append(", securityProtocol=").append(String.valueOf(this.securityProtocol)); sb.append(", sslCa=").append(String.valueOf(this.sslCa)); @@ -680,6 +740,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.port, other.port) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.additionalAttributes, other.additionalAttributes) && java.util.Objects.equals(this.securityProtocol, other.securityProtocol) && java.util.Objects.equals(this.sslCa, other.sslCa) @@ -698,6 +759,9 @@ public int hashCode() { result = (result * PRIME) + (this.port == null ? 43 : this.port.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.additionalAttributes == null diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateMongoDbConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateMongoDbConnectionDetails.java index 248378af9f1..8937828c8ac 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateMongoDbConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateMongoDbConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * MongoDB connection string. * e.g.: 'mongodb://mongodb0.example.com:27017/recordsrecords' @@ -167,6 +176,26 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated database. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated database. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Autonomous Json Database. * @@ -201,9 +230,11 @@ public UpdateMongoDbConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.connectionString, this.username, this.password, + this.passwordSecretId, this.databaseId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -240,6 +271,9 @@ public Builder copy(UpdateMongoDbConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("connectionString")) { this.connectionString(model.getConnectionString()); } @@ -249,6 +283,9 @@ public Builder copy(UpdateMongoDbConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("databaseId")) { this.databaseId(model.getDatabaseId()); } @@ -278,9 +315,11 @@ public UpdateMongoDbConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, String connectionString, String username, String password, + String passwordSecretId, String databaseId) { super( displayName, @@ -291,10 +330,12 @@ public UpdateMongoDbConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.connectionString = connectionString; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.databaseId = databaseId; } @@ -350,6 +391,24 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated database. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect the associated database. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Autonomous Json Database. * @@ -383,6 +442,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", connectionString=").append(String.valueOf(this.connectionString)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", databaseId=").append(String.valueOf(this.databaseId)); sb.append(")"); return sb.toString(); @@ -401,6 +461,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.connectionString, other.connectionString) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.databaseId, other.databaseId) && super.equals(other); } @@ -414,6 +475,9 @@ public int hashCode() { + (this.connectionString == null ? 43 : this.connectionString.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.databaseId == null ? 43 : this.databaseId.hashCode()); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateMysqlConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateMysqlConnectionDetails.java index 29d7a6edcaf..d2cb91e4627 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateMysqlConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateMysqlConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The username Oracle GoldenGate uses to connect the associated system of the given technology. * This username must already exist and be available by the system/application to be connected to @@ -151,6 +160,32 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * The name or address of a host. * @@ -315,6 +350,28 @@ public Builder sslKey(String sslKey) { this.__explicitlySet__.add("sslKey"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key + * - The content of a .pem or .crt file containing the client private key (for 2-way SSL). + * Note: When provided, 'sslKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeySecretId") + private String sslKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key + * - The content of a .pem or .crt file containing the client private key (for 2-way SSL). + * Note: When provided, 'sslKey' field must not be provided. + * + * @param sslKeySecretId the value to set + * @return this builder + **/ + public Builder sslKeySecretId(String sslKeySecretId) { + this.sslKeySecretId = sslKeySecretId; + this.__explicitlySet__.add("sslKeySecretId"); + return this; + } /** * Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host * field, or make sure the host name is resolvable in the target VCN. @@ -401,8 +458,10 @@ public UpdateMysqlConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.username, this.password, + this.passwordSecretId, this.host, this.port, this.databaseName, @@ -412,6 +471,7 @@ public UpdateMysqlConnectionDetails build() { this.sslCrl, this.sslCert, this.sslKey, + this.sslKeySecretId, this.privateIp, this.additionalAttributes, this.dbSystemId); @@ -450,12 +510,18 @@ public Builder copy(UpdateMysqlConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("username")) { this.username(model.getUsername()); } if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("host")) { this.host(model.getHost()); } @@ -483,6 +549,9 @@ public Builder copy(UpdateMysqlConnectionDetails model) { if (model.wasPropertyExplicitlySet("sslKey")) { this.sslKey(model.getSslKey()); } + if (model.wasPropertyExplicitlySet("sslKeySecretId")) { + this.sslKeySecretId(model.getSslKeySecretId()); + } if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } @@ -518,8 +587,10 @@ public UpdateMysqlConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, String username, String password, + String passwordSecretId, String host, Integer port, String databaseName, @@ -529,6 +600,7 @@ public UpdateMysqlConnectionDetails( String sslCrl, String sslCert, String sslKey, + String sslKeySecretId, String privateIp, java.util.List additionalAttributes, String dbSystemId) { @@ -541,9 +613,11 @@ public UpdateMysqlConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.host = host; this.port = port; this.databaseName = databaseName; @@ -553,6 +627,7 @@ public UpdateMysqlConnectionDetails( this.sslCrl = sslCrl; this.sslCert = sslCert; this.sslKey = sslKey; + this.sslKeySecretId = sslKeySecretId; this.privateIp = privateIp; this.additionalAttributes = additionalAttributes; this.dbSystemId = dbSystemId; @@ -596,6 +671,30 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * The name or address of a host. * @@ -742,6 +841,26 @@ public String getSslKey() { return sslKey; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key + * - The content of a .pem or .crt file containing the client private key (for 2-way SSL). + * Note: When provided, 'sslKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeySecretId") + private final String sslKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key + * - The content of a .pem or .crt file containing the client private key (for 2-way SSL). + * Note: When provided, 'sslKey' field must not be provided. + * + * @return the value + **/ + public String getSslKeySecretId() { + return sslKeySecretId; + } + /** * Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host * field, or make sure the host name is resolvable in the target VCN. @@ -822,6 +941,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", host=").append(String.valueOf(this.host)); sb.append(", port=").append(String.valueOf(this.port)); sb.append(", databaseName=").append(String.valueOf(this.databaseName)); @@ -831,6 +951,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", sslCrl=").append(String.valueOf(this.sslCrl)); sb.append(", sslCert=").append(String.valueOf(this.sslCert)); sb.append(", sslKey=").append(String.valueOf(this.sslKey)); + sb.append(", sslKeySecretId=").append(String.valueOf(this.sslKeySecretId)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(", additionalAttributes=").append(String.valueOf(this.additionalAttributes)); sb.append(", dbSystemId=").append(String.valueOf(this.dbSystemId)); @@ -850,6 +971,7 @@ public boolean equals(Object o) { UpdateMysqlConnectionDetails other = (UpdateMysqlConnectionDetails) o; return java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.host, other.host) && java.util.Objects.equals(this.port, other.port) && java.util.Objects.equals(this.databaseName, other.databaseName) @@ -859,6 +981,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.sslCrl, other.sslCrl) && java.util.Objects.equals(this.sslCert, other.sslCert) && java.util.Objects.equals(this.sslKey, other.sslKey) + && java.util.Objects.equals(this.sslKeySecretId, other.sslKeySecretId) && java.util.Objects.equals(this.privateIp, other.privateIp) && java.util.Objects.equals(this.additionalAttributes, other.additionalAttributes) && java.util.Objects.equals(this.dbSystemId, other.dbSystemId) @@ -871,6 +994,9 @@ public int hashCode() { int result = super.hashCode(); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.host == null ? 43 : this.host.hashCode()); result = (result * PRIME) + (this.port == null ? 43 : this.port.hashCode()); result = (result * PRIME) + (this.databaseName == null ? 43 : this.databaseName.hashCode()); @@ -882,6 +1008,9 @@ public int hashCode() { result = (result * PRIME) + (this.sslCrl == null ? 43 : this.sslCrl.hashCode()); result = (result * PRIME) + (this.sslCert == null ? 43 : this.sslCert.hashCode()); result = (result * PRIME) + (this.sslKey == null ? 43 : this.sslKey.hashCode()); + result = + (result * PRIME) + + (this.sslKeySecretId == null ? 43 : this.sslKeySecretId.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); result = (result * PRIME) diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateOciObjectStorageConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateOciObjectStorageConnectionDetails.java index f53977570ec..b3e83a509fa 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateOciObjectStorageConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateOciObjectStorageConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the related OCI tenancy. * @@ -185,6 +194,28 @@ public Builder privateKeyFile(String privateKeyFile) { this.__explicitlySet__.add("privateKeyFile"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @param privateKeyFileSecretId the value to set + * @return this builder + **/ + public Builder privateKeyFileSecretId(String privateKeyFileSecretId) { + this.privateKeyFileSecretId = privateKeyFileSecretId; + this.__explicitlySet__.add("privateKeyFileSecretId"); + return this; + } /** * The passphrase of the private key. * @@ -203,6 +234,26 @@ public Builder privateKeyPassphrase(String privateKeyPassphrase) { this.__explicitlySet__.add("privateKeyPassphrase"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @param privateKeyPassphraseSecretId the value to set + * @return this builder + **/ + public Builder privateKeyPassphraseSecretId(String privateKeyPassphraseSecretId) { + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; + this.__explicitlySet__.add("privateKeyPassphraseSecretId"); + return this; + } /** * The fingerprint of the API Key of the user specified by the userId. * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm @@ -239,11 +290,14 @@ public UpdateOciObjectStorageConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.tenancyId, this.region, this.userId, this.privateKeyFile, + this.privateKeyFileSecretId, this.privateKeyPassphrase, + this.privateKeyPassphraseSecretId, this.publicKeyFingerprint); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -280,6 +334,9 @@ public Builder copy(UpdateOciObjectStorageConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("tenancyId")) { this.tenancyId(model.getTenancyId()); } @@ -292,9 +349,15 @@ public Builder copy(UpdateOciObjectStorageConnectionDetails model) { if (model.wasPropertyExplicitlySet("privateKeyFile")) { this.privateKeyFile(model.getPrivateKeyFile()); } + if (model.wasPropertyExplicitlySet("privateKeyFileSecretId")) { + this.privateKeyFileSecretId(model.getPrivateKeyFileSecretId()); + } if (model.wasPropertyExplicitlySet("privateKeyPassphrase")) { this.privateKeyPassphrase(model.getPrivateKeyPassphrase()); } + if (model.wasPropertyExplicitlySet("privateKeyPassphraseSecretId")) { + this.privateKeyPassphraseSecretId(model.getPrivateKeyPassphraseSecretId()); + } if (model.wasPropertyExplicitlySet("publicKeyFingerprint")) { this.publicKeyFingerprint(model.getPublicKeyFingerprint()); } @@ -324,11 +387,14 @@ public UpdateOciObjectStorageConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, String tenancyId, String region, String userId, String privateKeyFile, + String privateKeyFileSecretId, String privateKeyPassphrase, + String privateKeyPassphraseSecretId, String publicKeyFingerprint) { super( displayName, @@ -339,12 +405,15 @@ public UpdateOciObjectStorageConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.tenancyId = tenancyId; this.region = region; this.userId = userId; this.privateKeyFile = privateKeyFile; + this.privateKeyFileSecretId = privateKeyFileSecretId; this.privateKeyPassphrase = privateKeyPassphrase; + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; this.publicKeyFingerprint = publicKeyFingerprint; } @@ -416,6 +485,26 @@ public String getPrivateKeyFile() { return privateKeyFile; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private final String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyFileSecretId() { + return privateKeyFileSecretId; + } + /** * The passphrase of the private key. * @@ -432,6 +521,24 @@ public String getPrivateKeyPassphrase() { return privateKeyPassphrase; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private final String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyPassphraseSecretId() { + return privateKeyPassphraseSecretId; + } + /** * The fingerprint of the API Key of the user specified by the userId. * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm @@ -468,7 +575,10 @@ public String toString(boolean includeByteArrayContents) { sb.append(", region=").append(String.valueOf(this.region)); sb.append(", userId=").append(String.valueOf(this.userId)); sb.append(", privateKeyFile=").append(String.valueOf(this.privateKeyFile)); + sb.append(", privateKeyFileSecretId=").append(String.valueOf(this.privateKeyFileSecretId)); sb.append(", privateKeyPassphrase=").append(""); + sb.append(", privateKeyPassphraseSecretId=") + .append(String.valueOf(this.privateKeyPassphraseSecretId)); sb.append(", publicKeyFingerprint=").append(String.valueOf(this.publicKeyFingerprint)); sb.append(")"); return sb.toString(); @@ -488,7 +598,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.region, other.region) && java.util.Objects.equals(this.userId, other.userId) && java.util.Objects.equals(this.privateKeyFile, other.privateKeyFile) + && java.util.Objects.equals( + this.privateKeyFileSecretId, other.privateKeyFileSecretId) && java.util.Objects.equals(this.privateKeyPassphrase, other.privateKeyPassphrase) + && java.util.Objects.equals( + this.privateKeyPassphraseSecretId, other.privateKeyPassphraseSecretId) && java.util.Objects.equals(this.publicKeyFingerprint, other.publicKeyFingerprint) && super.equals(other); } @@ -503,11 +617,21 @@ public int hashCode() { result = (result * PRIME) + (this.privateKeyFile == null ? 43 : this.privateKeyFile.hashCode()); + result = + (result * PRIME) + + (this.privateKeyFileSecretId == null + ? 43 + : this.privateKeyFileSecretId.hashCode()); result = (result * PRIME) + (this.privateKeyPassphrase == null ? 43 : this.privateKeyPassphrase.hashCode()); + result = + (result * PRIME) + + (this.privateKeyPassphraseSecretId == null + ? 43 + : this.privateKeyPassphraseSecretId.hashCode()); result = (result * PRIME) + (this.publicKeyFingerprint == null diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateOggDeploymentDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateOggDeploymentDetails.java index 7d4f478cc6a..b58530fe2a1 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateOggDeploymentDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateOggDeploymentDetails.java @@ -30,7 +30,8 @@ public final class UpdateOggDeploymentDetails "adminUsername", "adminPassword", "certificate", - "key" + "key", + "groupToRolesMapping" }) public UpdateOggDeploymentDetails( CredentialStore credentialStore, @@ -39,7 +40,8 @@ public UpdateOggDeploymentDetails( String adminUsername, String adminPassword, String certificate, - String key) { + String key, + UpdateGroupToRolesMappingDetails groupToRolesMapping) { super(); this.credentialStore = credentialStore; this.identityDomainId = identityDomainId; @@ -48,6 +50,7 @@ public UpdateOggDeploymentDetails( this.adminPassword = adminPassword; this.certificate = certificate; this.key = key; + this.groupToRolesMapping = groupToRolesMapping; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -185,6 +188,15 @@ public Builder key(String key) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("groupToRolesMapping") + private UpdateGroupToRolesMappingDetails groupToRolesMapping; + + public Builder groupToRolesMapping(UpdateGroupToRolesMappingDetails groupToRolesMapping) { + this.groupToRolesMapping = groupToRolesMapping; + this.__explicitlySet__.add("groupToRolesMapping"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -197,7 +209,8 @@ public UpdateOggDeploymentDetails build() { this.adminUsername, this.adminPassword, this.certificate, - this.key); + this.key, + this.groupToRolesMapping); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -227,6 +240,9 @@ public Builder copy(UpdateOggDeploymentDetails model) { if (model.wasPropertyExplicitlySet("key")) { this.key(model.getKey()); } + if (model.wasPropertyExplicitlySet("groupToRolesMapping")) { + this.groupToRolesMapping(model.getGroupToRolesMapping()); + } return this; } } @@ -360,6 +376,13 @@ public String getKey() { return key; } + @com.fasterxml.jackson.annotation.JsonProperty("groupToRolesMapping") + private final UpdateGroupToRolesMappingDetails groupToRolesMapping; + + public UpdateGroupToRolesMappingDetails getGroupToRolesMapping() { + return groupToRolesMapping; + } + @Override public String toString() { return this.toString(true); @@ -381,6 +404,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", adminPassword=").append(""); sb.append(", certificate=").append(String.valueOf(this.certificate)); sb.append(", key=").append(String.valueOf(this.key)); + sb.append(", groupToRolesMapping=").append(String.valueOf(this.groupToRolesMapping)); sb.append(")"); return sb.toString(); } @@ -402,6 +426,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.adminPassword, other.adminPassword) && java.util.Objects.equals(this.certificate, other.certificate) && java.util.Objects.equals(this.key, other.key) + && java.util.Objects.equals(this.groupToRolesMapping, other.groupToRolesMapping) && super.equals(other); } @@ -426,6 +451,11 @@ public int hashCode() { + (this.adminPassword == null ? 43 : this.adminPassword.hashCode()); result = (result * PRIME) + (this.certificate == null ? 43 : this.certificate.hashCode()); result = (result * PRIME) + (this.key == null ? 43 : this.key.hashCode()); + result = + (result * PRIME) + + (this.groupToRolesMapping == null + ? 43 + : this.groupToRolesMapping.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateOracleConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateOracleConnectionDetails.java index 00cc2cf301f..a684ccbefa8 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateOracleConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateOracleConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The username Oracle GoldenGate uses to connect the associated system of the given technology. * This username must already exist and be available by the system/application to be connected to @@ -151,6 +160,32 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * Connect descriptor or Easy Connect Naming method used to connect to a database. * @@ -190,16 +225,16 @@ public Builder authenticationMode(OracleConnection.AuthenticationMode authentica return this; } /** - * The wallet contents Oracle GoldenGate uses to make connections to a database. This - * attribute is expected to be base64 encoded. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * This attribute is expected to be base64 encoded. * **/ @com.fasterxml.jackson.annotation.JsonProperty("wallet") private String wallet; /** - * The wallet contents Oracle GoldenGate uses to make connections to a database. This - * attribute is expected to be base64 encoded. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * This attribute is expected to be base64 encoded. * * @param wallet the value to set * @return this builder @@ -209,6 +244,28 @@ public Builder wallet(String wallet) { this.__explicitlySet__.add("wallet"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the wallet file is stored. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * Note: When provided, 'wallet' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("walletSecretId") + private String walletSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the wallet file is stored. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * Note: When provided, 'wallet' field must not be provided. + * + * @param walletSecretId the value to set + * @return this builder + **/ + public Builder walletSecretId(String walletSecretId) { + this.walletSecretId = walletSecretId; + this.__explicitlySet__.add("walletSecretId"); + return this; + } /** * The mode of the database connection session to be established by the data client. * 'REDIRECT' - for a RAC database, 'DIRECT' - for a non-RAC database. @@ -299,11 +356,14 @@ public UpdateOracleConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.username, this.password, + this.passwordSecretId, this.connectionString, this.authenticationMode, this.wallet, + this.walletSecretId, this.sessionMode, this.privateIp, this.databaseId); @@ -342,12 +402,18 @@ public Builder copy(UpdateOracleConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("username")) { this.username(model.getUsername()); } if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("connectionString")) { this.connectionString(model.getConnectionString()); } @@ -357,6 +423,9 @@ public Builder copy(UpdateOracleConnectionDetails model) { if (model.wasPropertyExplicitlySet("wallet")) { this.wallet(model.getWallet()); } + if (model.wasPropertyExplicitlySet("walletSecretId")) { + this.walletSecretId(model.getWalletSecretId()); + } if (model.wasPropertyExplicitlySet("sessionMode")) { this.sessionMode(model.getSessionMode()); } @@ -392,11 +461,14 @@ public UpdateOracleConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, String username, String password, + String passwordSecretId, String connectionString, OracleConnection.AuthenticationMode authenticationMode, String wallet, + String walletSecretId, OracleConnection.SessionMode sessionMode, String privateIp, String databaseId) { @@ -409,12 +481,15 @@ public UpdateOracleConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.connectionString = connectionString; this.authenticationMode = authenticationMode; this.wallet = wallet; + this.walletSecretId = walletSecretId; this.sessionMode = sessionMode; this.privateIp = privateIp; this.databaseId = databaseId; @@ -458,6 +533,30 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * Connect descriptor or Easy Connect Naming method used to connect to a database. * @@ -493,16 +592,16 @@ public OracleConnection.AuthenticationMode getAuthenticationMode() { } /** - * The wallet contents Oracle GoldenGate uses to make connections to a database. This - * attribute is expected to be base64 encoded. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * This attribute is expected to be base64 encoded. * **/ @com.fasterxml.jackson.annotation.JsonProperty("wallet") private final String wallet; /** - * The wallet contents Oracle GoldenGate uses to make connections to a database. This - * attribute is expected to be base64 encoded. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * This attribute is expected to be base64 encoded. * * @return the value **/ @@ -510,6 +609,26 @@ public String getWallet() { return wallet; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the wallet file is stored. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * Note: When provided, 'wallet' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("walletSecretId") + private final String walletSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the wallet file is stored. + * The wallet contents Oracle GoldenGate uses to make connections to a database. + * Note: When provided, 'wallet' field must not be provided. + * + * @return the value + **/ + public String getWalletSecretId() { + return walletSecretId; + } + /** * The mode of the database connection session to be established by the data client. * 'REDIRECT' - for a RAC database, 'DIRECT' - for a non-RAC database. @@ -594,9 +713,11 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", connectionString=").append(String.valueOf(this.connectionString)); sb.append(", authenticationMode=").append(String.valueOf(this.authenticationMode)); sb.append(", wallet=").append(String.valueOf(this.wallet)); + sb.append(", walletSecretId=").append(String.valueOf(this.walletSecretId)); sb.append(", sessionMode=").append(String.valueOf(this.sessionMode)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(", databaseId=").append(String.valueOf(this.databaseId)); @@ -616,9 +737,11 @@ public boolean equals(Object o) { UpdateOracleConnectionDetails other = (UpdateOracleConnectionDetails) o; return java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.connectionString, other.connectionString) && java.util.Objects.equals(this.authenticationMode, other.authenticationMode) && java.util.Objects.equals(this.wallet, other.wallet) + && java.util.Objects.equals(this.walletSecretId, other.walletSecretId) && java.util.Objects.equals(this.sessionMode, other.sessionMode) && java.util.Objects.equals(this.privateIp, other.privateIp) && java.util.Objects.equals(this.databaseId, other.databaseId) @@ -631,6 +754,9 @@ public int hashCode() { int result = super.hashCode(); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.connectionString == null ? 43 : this.connectionString.hashCode()); @@ -640,6 +766,9 @@ public int hashCode() { ? 43 : this.authenticationMode.hashCode()); result = (result * PRIME) + (this.wallet == null ? 43 : this.wallet.hashCode()); + result = + (result * PRIME) + + (this.walletSecretId == null ? 43 : this.walletSecretId.hashCode()); result = (result * PRIME) + (this.sessionMode == null ? 43 : this.sessionMode.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); result = (result * PRIME) + (this.databaseId == null ? 43 : this.databaseId.hashCode()); diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateOracleNosqlConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateOracleNosqlConnectionDetails.java index 31eedbcb4a5..34be20c492b 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateOracleNosqlConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateOracleNosqlConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the related OCI tenancy. * @@ -185,6 +194,28 @@ public Builder privateKeyFile(String privateKeyFile) { this.__explicitlySet__.add("privateKeyFile"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @param privateKeyFileSecretId the value to set + * @return this builder + **/ + public Builder privateKeyFileSecretId(String privateKeyFileSecretId) { + this.privateKeyFileSecretId = privateKeyFileSecretId; + this.__explicitlySet__.add("privateKeyFileSecretId"); + return this; + } /** * The passphrase of the private key. * @@ -203,6 +234,26 @@ public Builder privateKeyPassphrase(String privateKeyPassphrase) { this.__explicitlySet__.add("privateKeyPassphrase"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @param privateKeyPassphraseSecretId the value to set + * @return this builder + **/ + public Builder privateKeyPassphraseSecretId(String privateKeyPassphraseSecretId) { + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; + this.__explicitlySet__.add("privateKeyPassphraseSecretId"); + return this; + } /** * The fingerprint of the API Key of the user specified by the userId. * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm @@ -239,11 +290,14 @@ public UpdateOracleNosqlConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.tenancyId, this.region, this.userId, this.privateKeyFile, + this.privateKeyFileSecretId, this.privateKeyPassphrase, + this.privateKeyPassphraseSecretId, this.publicKeyFingerprint); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -280,6 +334,9 @@ public Builder copy(UpdateOracleNosqlConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("tenancyId")) { this.tenancyId(model.getTenancyId()); } @@ -292,9 +349,15 @@ public Builder copy(UpdateOracleNosqlConnectionDetails model) { if (model.wasPropertyExplicitlySet("privateKeyFile")) { this.privateKeyFile(model.getPrivateKeyFile()); } + if (model.wasPropertyExplicitlySet("privateKeyFileSecretId")) { + this.privateKeyFileSecretId(model.getPrivateKeyFileSecretId()); + } if (model.wasPropertyExplicitlySet("privateKeyPassphrase")) { this.privateKeyPassphrase(model.getPrivateKeyPassphrase()); } + if (model.wasPropertyExplicitlySet("privateKeyPassphraseSecretId")) { + this.privateKeyPassphraseSecretId(model.getPrivateKeyPassphraseSecretId()); + } if (model.wasPropertyExplicitlySet("publicKeyFingerprint")) { this.publicKeyFingerprint(model.getPublicKeyFingerprint()); } @@ -324,11 +387,14 @@ public UpdateOracleNosqlConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, String tenancyId, String region, String userId, String privateKeyFile, + String privateKeyFileSecretId, String privateKeyPassphrase, + String privateKeyPassphraseSecretId, String publicKeyFingerprint) { super( displayName, @@ -339,12 +405,15 @@ public UpdateOracleNosqlConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.tenancyId = tenancyId; this.region = region; this.userId = userId; this.privateKeyFile = privateKeyFile; + this.privateKeyFileSecretId = privateKeyFileSecretId; this.privateKeyPassphrase = privateKeyPassphrase; + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; this.publicKeyFingerprint = publicKeyFingerprint; } @@ -416,6 +485,26 @@ public String getPrivateKeyFile() { return privateKeyFile; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private final String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyFileSecretId() { + return privateKeyFileSecretId; + } + /** * The passphrase of the private key. * @@ -432,6 +521,24 @@ public String getPrivateKeyPassphrase() { return privateKeyPassphrase; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private final String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the passphrase of the private key. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyPassphraseSecretId() { + return privateKeyPassphraseSecretId; + } + /** * The fingerprint of the API Key of the user specified by the userId. * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm @@ -468,7 +575,10 @@ public String toString(boolean includeByteArrayContents) { sb.append(", region=").append(String.valueOf(this.region)); sb.append(", userId=").append(String.valueOf(this.userId)); sb.append(", privateKeyFile=").append(String.valueOf(this.privateKeyFile)); + sb.append(", privateKeyFileSecretId=").append(String.valueOf(this.privateKeyFileSecretId)); sb.append(", privateKeyPassphrase=").append(""); + sb.append(", privateKeyPassphraseSecretId=") + .append(String.valueOf(this.privateKeyPassphraseSecretId)); sb.append(", publicKeyFingerprint=").append(String.valueOf(this.publicKeyFingerprint)); sb.append(")"); return sb.toString(); @@ -488,7 +598,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.region, other.region) && java.util.Objects.equals(this.userId, other.userId) && java.util.Objects.equals(this.privateKeyFile, other.privateKeyFile) + && java.util.Objects.equals( + this.privateKeyFileSecretId, other.privateKeyFileSecretId) && java.util.Objects.equals(this.privateKeyPassphrase, other.privateKeyPassphrase) + && java.util.Objects.equals( + this.privateKeyPassphraseSecretId, other.privateKeyPassphraseSecretId) && java.util.Objects.equals(this.publicKeyFingerprint, other.publicKeyFingerprint) && super.equals(other); } @@ -503,11 +617,21 @@ public int hashCode() { result = (result * PRIME) + (this.privateKeyFile == null ? 43 : this.privateKeyFile.hashCode()); + result = + (result * PRIME) + + (this.privateKeyFileSecretId == null + ? 43 + : this.privateKeyFileSecretId.hashCode()); result = (result * PRIME) + (this.privateKeyPassphrase == null ? 43 : this.privateKeyPassphrase.hashCode()); + result = + (result * PRIME) + + (this.privateKeyPassphraseSecretId == null + ? 43 + : this.privateKeyPassphraseSecretId.hashCode()); result = (result * PRIME) + (this.publicKeyFingerprint == null diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdatePostgresqlConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdatePostgresqlConnectionDetails.java index 801ba09930f..33710a65201 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdatePostgresqlConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdatePostgresqlConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * The name of the database. * @@ -205,6 +214,32 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * An array of name-value pair attribute entries. * Used as additional parameters in connection string. @@ -331,6 +366,26 @@ public Builder sslKey(String sslKey) { this.__explicitlySet__.add("sslKey"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the private key of the PostgreSQL server. The supported file formats are .pem and .crt. + * Note: When provided, 'sslKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeySecretId") + private String sslKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the private key of the PostgreSQL server. The supported file formats are .pem and .crt. + * Note: When provided, 'sslKey' field must not be provided. + * + * @param sslKeySecretId the value to set + * @return this builder + **/ + public Builder sslKeySecretId(String sslKeySecretId) { + this.sslKeySecretId = sslKeySecretId; + this.__explicitlySet__.add("sslKeySecretId"); + return this; + } /** * Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host * field, or make sure the host name is resolvable in the target VCN. @@ -397,11 +452,13 @@ public UpdatePostgresqlConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.databaseName, this.host, this.port, this.username, this.password, + this.passwordSecretId, this.additionalAttributes, this.securityProtocol, this.sslMode, @@ -409,6 +466,7 @@ public UpdatePostgresqlConnectionDetails build() { this.sslCrl, this.sslCert, this.sslKey, + this.sslKeySecretId, this.privateIp, this.dbSystemId); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -446,6 +504,9 @@ public Builder copy(UpdatePostgresqlConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("databaseName")) { this.databaseName(model.getDatabaseName()); } @@ -461,6 +522,9 @@ public Builder copy(UpdatePostgresqlConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("additionalAttributes")) { this.additionalAttributes(model.getAdditionalAttributes()); } @@ -482,6 +546,9 @@ public Builder copy(UpdatePostgresqlConnectionDetails model) { if (model.wasPropertyExplicitlySet("sslKey")) { this.sslKey(model.getSslKey()); } + if (model.wasPropertyExplicitlySet("sslKeySecretId")) { + this.sslKeySecretId(model.getSslKeySecretId()); + } if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } @@ -514,11 +581,13 @@ public UpdatePostgresqlConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, String databaseName, String host, Integer port, String username, String password, + String passwordSecretId, java.util.List additionalAttributes, PostgresqlConnection.SecurityProtocol securityProtocol, PostgresqlConnection.SslMode sslMode, @@ -526,6 +595,7 @@ public UpdatePostgresqlConnectionDetails( String sslCrl, String sslCert, String sslKey, + String sslKeySecretId, String privateIp, String dbSystemId) { super( @@ -537,12 +607,14 @@ public UpdatePostgresqlConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.databaseName = databaseName; this.host = host; this.port = port; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.additionalAttributes = additionalAttributes; this.securityProtocol = securityProtocol; this.sslMode = sslMode; @@ -550,6 +622,7 @@ public UpdatePostgresqlConnectionDetails( this.sslCrl = sslCrl; this.sslCert = sslCert; this.sslKey = sslKey; + this.sslKeySecretId = sslKeySecretId; this.privateIp = privateIp; this.dbSystemId = dbSystemId; } @@ -640,6 +713,30 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * An array of name-value pair attribute entries. * Used as additional parameters in connection string. @@ -752,6 +849,24 @@ public String getSslKey() { return sslKey; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the private key of the PostgreSQL server. The supported file formats are .pem and .crt. + * Note: When provided, 'sslKey' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sslKeySecretId") + private final String sslKeySecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the private key of the PostgreSQL server. The supported file formats are .pem and .crt. + * Note: When provided, 'sslKey' field must not be provided. + * + * @return the value + **/ + public String getSslKeySecretId() { + return sslKeySecretId; + } + /** * Deprecated: this field will be removed in future versions. Either specify the private IP in the connectionString or host * field, or make sure the host name is resolvable in the target VCN. @@ -817,6 +932,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", port=").append(String.valueOf(this.port)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", additionalAttributes=").append(String.valueOf(this.additionalAttributes)); sb.append(", securityProtocol=").append(String.valueOf(this.securityProtocol)); sb.append(", sslMode=").append(String.valueOf(this.sslMode)); @@ -824,6 +940,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", sslCrl=").append(String.valueOf(this.sslCrl)); sb.append(", sslCert=").append(String.valueOf(this.sslCert)); sb.append(", sslKey=").append(String.valueOf(this.sslKey)); + sb.append(", sslKeySecretId=").append(String.valueOf(this.sslKeySecretId)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(", dbSystemId=").append(String.valueOf(this.dbSystemId)); sb.append(")"); @@ -845,6 +962,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.port, other.port) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.additionalAttributes, other.additionalAttributes) && java.util.Objects.equals(this.securityProtocol, other.securityProtocol) && java.util.Objects.equals(this.sslMode, other.sslMode) @@ -852,6 +970,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.sslCrl, other.sslCrl) && java.util.Objects.equals(this.sslCert, other.sslCert) && java.util.Objects.equals(this.sslKey, other.sslKey) + && java.util.Objects.equals(this.sslKeySecretId, other.sslKeySecretId) && java.util.Objects.equals(this.privateIp, other.privateIp) && java.util.Objects.equals(this.dbSystemId, other.dbSystemId) && super.equals(other); @@ -866,6 +985,9 @@ public int hashCode() { result = (result * PRIME) + (this.port == null ? 43 : this.port.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.additionalAttributes == null @@ -879,6 +1001,9 @@ public int hashCode() { result = (result * PRIME) + (this.sslCrl == null ? 43 : this.sslCrl.hashCode()); result = (result * PRIME) + (this.sslCert == null ? 43 : this.sslCert.hashCode()); result = (result * PRIME) + (this.sslKey == null ? 43 : this.sslKey.hashCode()); + result = + (result * PRIME) + + (this.sslKeySecretId == null ? 43 : this.sslKeySecretId.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); result = (result * PRIME) + (this.dbSystemId == null ? 43 : this.dbSystemId.hashCode()); return result; diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateRedisConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateRedisConnectionDetails.java index 15a45acb7d3..bbdc567ccd2 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateRedisConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateRedisConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * Comma separated list of Redis server addresses, specified as host:port entries, where :port is optional. * If port is not specified, it defaults to 6379. @@ -207,6 +216,32 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * The base64 encoded content of the TrustStore file. * @@ -225,6 +260,26 @@ public Builder trustStore(String trustStore) { this.__explicitlySet__.add("trustStore"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + * @param trustStoreSecretId the value to set + * @return this builder + **/ + public Builder trustStoreSecretId(String trustStoreSecretId) { + this.trustStoreSecretId = trustStoreSecretId; + this.__explicitlySet__.add("trustStoreSecretId"); + return this; + } /** * The TrustStore password. * @@ -243,6 +298,26 @@ public Builder trustStorePassword(String trustStorePassword) { this.__explicitlySet__.add("trustStorePassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @param trustStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder trustStorePasswordSecretId(String trustStorePasswordSecretId) { + this.trustStorePasswordSecretId = trustStorePasswordSecretId; + this.__explicitlySet__.add("trustStorePasswordSecretId"); + return this; + } /** * The base64 encoded content of the KeyStore file. * @@ -261,6 +336,26 @@ public Builder keyStore(String keyStore) { this.__explicitlySet__.add("keyStore"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + * @param keyStoreSecretId the value to set + * @return this builder + **/ + public Builder keyStoreSecretId(String keyStoreSecretId) { + this.keyStoreSecretId = keyStoreSecretId; + this.__explicitlySet__.add("keyStoreSecretId"); + return this; + } /** * The KeyStore password. * @@ -279,6 +374,26 @@ public Builder keyStorePassword(String keyStorePassword) { this.__explicitlySet__.add("keyStorePassword"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @param keyStorePasswordSecretId the value to set + * @return this builder + **/ + public Builder keyStorePasswordSecretId(String keyStorePasswordSecretId) { + this.keyStorePasswordSecretId = keyStorePasswordSecretId; + this.__explicitlySet__.add("keyStorePasswordSecretId"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Redis cluster. * @@ -313,15 +428,21 @@ public UpdateRedisConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.servers, this.securityProtocol, this.authenticationType, this.username, this.password, + this.passwordSecretId, this.trustStore, + this.trustStoreSecretId, this.trustStorePassword, + this.trustStorePasswordSecretId, this.keyStore, + this.keyStoreSecretId, this.keyStorePassword, + this.keyStorePasswordSecretId, this.redisClusterId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -358,6 +479,9 @@ public Builder copy(UpdateRedisConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("servers")) { this.servers(model.getServers()); } @@ -373,18 +497,33 @@ public Builder copy(UpdateRedisConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("trustStore")) { this.trustStore(model.getTrustStore()); } + if (model.wasPropertyExplicitlySet("trustStoreSecretId")) { + this.trustStoreSecretId(model.getTrustStoreSecretId()); + } if (model.wasPropertyExplicitlySet("trustStorePassword")) { this.trustStorePassword(model.getTrustStorePassword()); } + if (model.wasPropertyExplicitlySet("trustStorePasswordSecretId")) { + this.trustStorePasswordSecretId(model.getTrustStorePasswordSecretId()); + } if (model.wasPropertyExplicitlySet("keyStore")) { this.keyStore(model.getKeyStore()); } + if (model.wasPropertyExplicitlySet("keyStoreSecretId")) { + this.keyStoreSecretId(model.getKeyStoreSecretId()); + } if (model.wasPropertyExplicitlySet("keyStorePassword")) { this.keyStorePassword(model.getKeyStorePassword()); } + if (model.wasPropertyExplicitlySet("keyStorePasswordSecretId")) { + this.keyStorePasswordSecretId(model.getKeyStorePasswordSecretId()); + } if (model.wasPropertyExplicitlySet("redisClusterId")) { this.redisClusterId(model.getRedisClusterId()); } @@ -414,15 +553,21 @@ public UpdateRedisConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, String servers, RedisConnection.SecurityProtocol securityProtocol, RedisConnection.AuthenticationType authenticationType, String username, String password, + String passwordSecretId, String trustStore, + String trustStoreSecretId, String trustStorePassword, + String trustStorePasswordSecretId, String keyStore, + String keyStoreSecretId, String keyStorePassword, + String keyStorePasswordSecretId, String redisClusterId) { super( displayName, @@ -433,16 +578,22 @@ public UpdateRedisConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.servers = servers; this.securityProtocol = securityProtocol; this.authenticationType = authenticationType; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.trustStore = trustStore; + this.trustStoreSecretId = trustStoreSecretId; this.trustStorePassword = trustStorePassword; + this.trustStorePasswordSecretId = trustStorePasswordSecretId; this.keyStore = keyStore; + this.keyStoreSecretId = keyStoreSecretId; this.keyStorePassword = keyStorePassword; + this.keyStorePasswordSecretId = keyStorePasswordSecretId; this.redisClusterId = redisClusterId; } @@ -534,6 +685,30 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored. + * The password Oracle GoldenGate uses to connect the associated system of the given technology. + * It must conform to the specific security requirements including length, case sensitivity, and so on. + * If secretId is used plaintext field must not be provided. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * The base64 encoded content of the TrustStore file. * @@ -550,6 +725,24 @@ public String getTrustStore() { return trustStore; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStoreSecretId") + private final String trustStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the TrustStore file. + * Note: When provided, 'trustStore' field must not be provided. + * + * @return the value + **/ + public String getTrustStoreSecretId() { + return trustStoreSecretId; + } + /** * The TrustStore password. * @@ -566,6 +759,24 @@ public String getTrustStorePassword() { return trustStorePassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("trustStorePasswordSecretId") + private final String trustStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis TrustStore password is stored. + * Note: When provided, 'trustStorePassword' field must not be provided. + * + * @return the value + **/ + public String getTrustStorePasswordSecretId() { + return trustStorePasswordSecretId; + } + /** * The base64 encoded content of the KeyStore file. * @@ -582,6 +793,24 @@ public String getKeyStore() { return keyStore; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStoreSecretId") + private final String keyStoreSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the KeyStore file. + * Note: When provided, 'keyStore' field must not be provided. + * + * @return the value + **/ + public String getKeyStoreSecretId() { + return keyStoreSecretId; + } + /** * The KeyStore password. * @@ -598,6 +827,24 @@ public String getKeyStorePassword() { return keyStorePassword; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("keyStorePasswordSecretId") + private final String keyStorePasswordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret where the Redis KeyStore password is stored. + * Note: When provided, 'keyStorePassword' field must not be provided. + * + * @return the value + **/ + public String getKeyStorePasswordSecretId() { + return keyStorePasswordSecretId; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Redis cluster. * @@ -633,10 +880,17 @@ public String toString(boolean includeByteArrayContents) { sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", trustStore=").append(String.valueOf(this.trustStore)); + sb.append(", trustStoreSecretId=").append(String.valueOf(this.trustStoreSecretId)); sb.append(", trustStorePassword=").append(""); + sb.append(", trustStorePasswordSecretId=") + .append(String.valueOf(this.trustStorePasswordSecretId)); sb.append(", keyStore=").append(String.valueOf(this.keyStore)); + sb.append(", keyStoreSecretId=").append(String.valueOf(this.keyStoreSecretId)); sb.append(", keyStorePassword=").append(""); + sb.append(", keyStorePasswordSecretId=") + .append(String.valueOf(this.keyStorePasswordSecretId)); sb.append(", redisClusterId=").append(String.valueOf(this.redisClusterId)); sb.append(")"); return sb.toString(); @@ -657,10 +911,17 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.trustStore, other.trustStore) + && java.util.Objects.equals(this.trustStoreSecretId, other.trustStoreSecretId) && java.util.Objects.equals(this.trustStorePassword, other.trustStorePassword) + && java.util.Objects.equals( + this.trustStorePasswordSecretId, other.trustStorePasswordSecretId) && java.util.Objects.equals(this.keyStore, other.keyStore) + && java.util.Objects.equals(this.keyStoreSecretId, other.keyStoreSecretId) && java.util.Objects.equals(this.keyStorePassword, other.keyStorePassword) + && java.util.Objects.equals( + this.keyStorePasswordSecretId, other.keyStorePasswordSecretId) && java.util.Objects.equals(this.redisClusterId, other.redisClusterId) && super.equals(other); } @@ -680,16 +941,37 @@ public int hashCode() { : this.authenticationType.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.trustStore == null ? 43 : this.trustStore.hashCode()); + result = + (result * PRIME) + + (this.trustStoreSecretId == null + ? 43 + : this.trustStoreSecretId.hashCode()); result = (result * PRIME) + (this.trustStorePassword == null ? 43 : this.trustStorePassword.hashCode()); + result = + (result * PRIME) + + (this.trustStorePasswordSecretId == null + ? 43 + : this.trustStorePasswordSecretId.hashCode()); result = (result * PRIME) + (this.keyStore == null ? 43 : this.keyStore.hashCode()); + result = + (result * PRIME) + + (this.keyStoreSecretId == null ? 43 : this.keyStoreSecretId.hashCode()); result = (result * PRIME) + (this.keyStorePassword == null ? 43 : this.keyStorePassword.hashCode()); + result = + (result * PRIME) + + (this.keyStorePasswordSecretId == null + ? 43 + : this.keyStorePasswordSecretId.hashCode()); result = (result * PRIME) + (this.redisClusterId == null ? 43 : this.redisClusterId.hashCode()); diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateSnowflakeConnectionDetails.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateSnowflakeConnectionDetails.java index f2bbee84ad2..137fe619ea8 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateSnowflakeConnectionDetails.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/model/UpdateSnowflakeConnectionDetails.java @@ -109,6 +109,15 @@ public Builder routingMethod(RoutingMethod routingMethod) { this.__explicitlySet__.add("routingMethod"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("doesUseSecretIds") + private Boolean doesUseSecretIds; + + public Builder doesUseSecretIds(Boolean doesUseSecretIds) { + this.doesUseSecretIds = doesUseSecretIds; + this.__explicitlySet__.add("doesUseSecretIds"); + return this; + } /** * JDBC connection URL. * e.g.: 'jdbc:snowflake://.snowflakecomputing.com/?warehouse=&db=' @@ -186,6 +195,26 @@ public Builder password(String password) { this.__explicitlySet__.add("password"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect to Snowflake platform. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect to Snowflake platform. + * Note: When provided, 'password' field must not be provided. + * + * @param passwordSecretId the value to set + * @return this builder + **/ + public Builder passwordSecretId(String passwordSecretId) { + this.passwordSecretId = passwordSecretId; + this.__explicitlySet__.add("passwordSecretId"); + return this; + } /** * The base64 encoded content of private key file in PEM format. * @@ -204,6 +233,28 @@ public Builder privateKeyFile(String privateKeyFile) { this.__explicitlySet__.add("privateKeyFile"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @param privateKeyFileSecretId the value to set + * @return this builder + **/ + public Builder privateKeyFileSecretId(String privateKeyFileSecretId) { + this.privateKeyFileSecretId = privateKeyFileSecretId; + this.__explicitlySet__.add("privateKeyFileSecretId"); + return this; + } /** * Password if the private key file is encrypted. * @@ -222,6 +273,26 @@ public Builder privateKeyPassphrase(String privateKeyPassphrase) { this.__explicitlySet__.add("privateKeyPassphrase"); return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the private key file. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the private key file. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @param privateKeyPassphraseSecretId the value to set + * @return this builder + **/ + public Builder privateKeyPassphraseSecretId(String privateKeyPassphraseSecretId) { + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; + this.__explicitlySet__.add("privateKeyPassphraseSecretId"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -238,12 +309,16 @@ public UpdateSnowflakeConnectionDetails build() { this.nsgIds, this.subnetId, this.routingMethod, + this.doesUseSecretIds, this.connectionUrl, this.authenticationType, this.username, this.password, + this.passwordSecretId, this.privateKeyFile, - this.privateKeyPassphrase); + this.privateKeyFileSecretId, + this.privateKeyPassphrase, + this.privateKeyPassphraseSecretId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -279,6 +354,9 @@ public Builder copy(UpdateSnowflakeConnectionDetails model) { if (model.wasPropertyExplicitlySet("routingMethod")) { this.routingMethod(model.getRoutingMethod()); } + if (model.wasPropertyExplicitlySet("doesUseSecretIds")) { + this.doesUseSecretIds(model.getDoesUseSecretIds()); + } if (model.wasPropertyExplicitlySet("connectionUrl")) { this.connectionUrl(model.getConnectionUrl()); } @@ -291,12 +369,21 @@ public Builder copy(UpdateSnowflakeConnectionDetails model) { if (model.wasPropertyExplicitlySet("password")) { this.password(model.getPassword()); } + if (model.wasPropertyExplicitlySet("passwordSecretId")) { + this.passwordSecretId(model.getPasswordSecretId()); + } if (model.wasPropertyExplicitlySet("privateKeyFile")) { this.privateKeyFile(model.getPrivateKeyFile()); } + if (model.wasPropertyExplicitlySet("privateKeyFileSecretId")) { + this.privateKeyFileSecretId(model.getPrivateKeyFileSecretId()); + } if (model.wasPropertyExplicitlySet("privateKeyPassphrase")) { this.privateKeyPassphrase(model.getPrivateKeyPassphrase()); } + if (model.wasPropertyExplicitlySet("privateKeyPassphraseSecretId")) { + this.privateKeyPassphraseSecretId(model.getPrivateKeyPassphraseSecretId()); + } return this; } } @@ -323,12 +410,16 @@ public UpdateSnowflakeConnectionDetails( java.util.List nsgIds, String subnetId, RoutingMethod routingMethod, + Boolean doesUseSecretIds, String connectionUrl, SnowflakeConnection.AuthenticationType authenticationType, String username, String password, + String passwordSecretId, String privateKeyFile, - String privateKeyPassphrase) { + String privateKeyFileSecretId, + String privateKeyPassphrase, + String privateKeyPassphraseSecretId) { super( displayName, description, @@ -338,13 +429,17 @@ public UpdateSnowflakeConnectionDetails( keyId, nsgIds, subnetId, - routingMethod); + routingMethod, + doesUseSecretIds); this.connectionUrl = connectionUrl; this.authenticationType = authenticationType; this.username = username; this.password = password; + this.passwordSecretId = passwordSecretId; this.privateKeyFile = privateKeyFile; + this.privateKeyFileSecretId = privateKeyFileSecretId; this.privateKeyPassphrase = privateKeyPassphrase; + this.privateKeyPassphraseSecretId = privateKeyPassphraseSecretId; } /** @@ -415,6 +510,24 @@ public String getPassword() { return password; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect to Snowflake platform. + * Note: When provided, 'password' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("passwordSecretId") + private final String passwordSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password Oracle GoldenGate uses to connect to Snowflake platform. + * Note: When provided, 'password' field must not be provided. + * + * @return the value + **/ + public String getPasswordSecretId() { + return passwordSecretId; + } + /** * The base64 encoded content of private key file in PEM format. * @@ -431,6 +544,26 @@ public String getPrivateKeyFile() { return privateKeyFile; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyFileSecretId") + private final String privateKeyFileSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the content of the private key file (PEM file) corresponding to the API key of the fingerprint. + * See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm + * Note: When provided, 'privateKeyFile' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyFileSecretId() { + return privateKeyFileSecretId; + } + /** * Password if the private key file is encrypted. * @@ -447,6 +580,24 @@ public String getPrivateKeyPassphrase() { return privateKeyPassphrase; } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the private key file. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateKeyPassphraseSecretId") + private final String privateKeyPassphraseSecretId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the password for the private key file. + * Note: When provided, 'privateKeyPassphrase' field must not be provided. + * + * @return the value + **/ + public String getPrivateKeyPassphraseSecretId() { + return privateKeyPassphraseSecretId; + } + @Override public String toString() { return this.toString(true); @@ -465,8 +616,12 @@ public String toString(boolean includeByteArrayContents) { sb.append(", authenticationType=").append(String.valueOf(this.authenticationType)); sb.append(", username=").append(String.valueOf(this.username)); sb.append(", password=").append(""); + sb.append(", passwordSecretId=").append(String.valueOf(this.passwordSecretId)); sb.append(", privateKeyFile=").append(String.valueOf(this.privateKeyFile)); + sb.append(", privateKeyFileSecretId=").append(String.valueOf(this.privateKeyFileSecretId)); sb.append(", privateKeyPassphrase=").append(""); + sb.append(", privateKeyPassphraseSecretId=") + .append(String.valueOf(this.privateKeyPassphraseSecretId)); sb.append(")"); return sb.toString(); } @@ -485,8 +640,13 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.authenticationType, other.authenticationType) && java.util.Objects.equals(this.username, other.username) && java.util.Objects.equals(this.password, other.password) + && java.util.Objects.equals(this.passwordSecretId, other.passwordSecretId) && java.util.Objects.equals(this.privateKeyFile, other.privateKeyFile) + && java.util.Objects.equals( + this.privateKeyFileSecretId, other.privateKeyFileSecretId) && java.util.Objects.equals(this.privateKeyPassphrase, other.privateKeyPassphrase) + && java.util.Objects.equals( + this.privateKeyPassphraseSecretId, other.privateKeyPassphraseSecretId) && super.equals(other); } @@ -504,14 +664,27 @@ public int hashCode() { : this.authenticationType.hashCode()); result = (result * PRIME) + (this.username == null ? 43 : this.username.hashCode()); result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); + result = + (result * PRIME) + + (this.passwordSecretId == null ? 43 : this.passwordSecretId.hashCode()); result = (result * PRIME) + (this.privateKeyFile == null ? 43 : this.privateKeyFile.hashCode()); + result = + (result * PRIME) + + (this.privateKeyFileSecretId == null + ? 43 + : this.privateKeyFileSecretId.hashCode()); result = (result * PRIME) + (this.privateKeyPassphrase == null ? 43 : this.privateKeyPassphrase.hashCode()); + result = + (result * PRIME) + + (this.privateKeyPassphraseSecretId == null + ? 43 + : this.privateKeyPassphraseSecretId.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/requests/ListDeploymentEnvironmentsRequest.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/requests/ListDeploymentEnvironmentsRequest.java new file mode 100644 index 00000000000..2825dafc889 --- /dev/null +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/requests/ListDeploymentEnvironmentsRequest.java @@ -0,0 +1,413 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.goldengate.requests; + +import com.oracle.bmc.goldengate.model.*; +/** + * Example: Click here to see how to use ListDeploymentEnvironmentsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200407") +public class ListDeploymentEnvironmentsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the compartment that contains the work request. Work requests should be scoped + * to the same compartment as the resource the work request affects. If the work request concerns + * multiple resources, and those resources are not in the same compartment, it is up to the service team + * to pick the primary resource whose compartment should be used. + * + */ + private String compartmentId; + + /** + * The OCID of the compartment that contains the work request. Work requests should be scoped + * to the same compartment as the resource the work request affects. If the work request concerns + * multiple resources, and those resources are not in the same compartment, it is up to the service team + * to pick the primary resource whose compartment should be used. + * + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The client request ID for tracing. + * + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * The maximum number of items to return. + * + */ + private Integer limit; + + /** + * The maximum number of items to return. + * + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. This is usually + * retrieved from a previous list call. + * + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. This is usually + * retrieved from a previous list call. + * + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'asc' or 'desc'. + * + */ + private com.oracle.bmc.goldengate.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'asc' or 'desc'. + * + */ + public com.oracle.bmc.goldengate.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order can be provided. Default order for 'timeCreated' is + * descending. Default order for 'displayName' is ascending. If no value is specified + * timeCreated is the default. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order can be provided. Default order for 'timeCreated' is + * descending. Default order for 'displayName' is ascending. If no value is specified + * timeCreated is the default. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order can be provided. Default order for 'timeCreated' is + * descending. Default order for 'displayName' is ascending. If no value is specified + * timeCreated is the default. + * + */ + public SortBy getSortBy() { + return sortBy; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListDeploymentEnvironmentsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the compartment that contains the work request. Work requests should be scoped + * to the same compartment as the resource the work request affects. If the work request concerns + * multiple resources, and those resources are not in the same compartment, it is up to the service team + * to pick the primary resource whose compartment should be used. + * + */ + private String compartmentId = null; + + /** + * The OCID of the compartment that contains the work request. Work requests should be scoped + * to the same compartment as the resource the work request affects. If the work request concerns + * multiple resources, and those resources are not in the same compartment, it is up to the service team + * to pick the primary resource whose compartment should be used. + * + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The client request ID for tracing. + * + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The maximum number of items to return. + * + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. This is usually + * retrieved from a previous list call. + * + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. This is usually + * retrieved from a previous list call. + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'asc' or 'desc'. + * + */ + private com.oracle.bmc.goldengate.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'asc' or 'desc'. + * + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.goldengate.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order can be provided. Default order for 'timeCreated' is + * descending. Default order for 'displayName' is ascending. If no value is specified + * timeCreated is the default. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order can be provided. Default order for 'timeCreated' is + * descending. Default order for 'displayName' is ascending. If no value is specified + * timeCreated is the default. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListDeploymentEnvironmentsRequest o) { + compartmentId(o.getCompartmentId()); + opcRequestId(o.getOpcRequestId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListDeploymentEnvironmentsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListDeploymentEnvironmentsRequest + */ + public ListDeploymentEnvironmentsRequest build() { + ListDeploymentEnvironmentsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListDeploymentEnvironmentsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListDeploymentEnvironmentsRequest + */ + public ListDeploymentEnvironmentsRequest buildWithoutInvocationCallback() { + ListDeploymentEnvironmentsRequest request = new ListDeploymentEnvironmentsRequest(); + request.compartmentId = compartmentId; + request.opcRequestId = opcRequestId; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + return request; + // new ListDeploymentEnvironmentsRequest(compartmentId, opcRequestId, limit, page, sortOrder, sortBy); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .opcRequestId(opcRequestId) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListDeploymentEnvironmentsRequest)) { + return false; + } + + ListDeploymentEnvironmentsRequest other = (ListDeploymentEnvironmentsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + return result; + } +} diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/requests/RefreshConnectionRequest.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/requests/RefreshConnectionRequest.java new file mode 100644 index 00000000000..b45f0280e89 --- /dev/null +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/requests/RefreshConnectionRequest.java @@ -0,0 +1,353 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.goldengate.requests; + +import com.oracle.bmc.goldengate.model.*; +/** + * Example: Click here to see how to use RefreshConnectionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200407") +public class RefreshConnectionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.goldengate.model.RefreshConnectionDetails> { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of a Connection. + * + */ + private String connectionId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of a Connection. + * + */ + public String getConnectionId() { + return connectionId; + } + /** + * Details of refresh external Connection attributes. + * + */ + private com.oracle.bmc.goldengate.model.RefreshConnectionDetails refreshConnectionDetails; + + /** + * Details of refresh external Connection attributes. + * + */ + public com.oracle.bmc.goldengate.model.RefreshConnectionDetails getRefreshConnectionDetails() { + return refreshConnectionDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for that + * resource. The resource is updated or deleted only if the etag you provide matches the + * resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for that + * resource. The resource is updated or deleted only if the etag you provide matches the + * resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + * + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride; + + /** + * Whether to override locks (if any exist). + */ + public Boolean getIsLockOverride() { + return isLockOverride; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.goldengate.model.RefreshConnectionDetails getBody$() { + return refreshConnectionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RefreshConnectionRequest, + com.oracle.bmc.goldengate.model.RefreshConnectionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of a Connection. + * + */ + private String connectionId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of a Connection. + * + * @param connectionId the value to set + * @return this builder instance + */ + public Builder connectionId(String connectionId) { + this.connectionId = connectionId; + return this; + } + + /** + * Details of refresh external Connection attributes. + * + */ + private com.oracle.bmc.goldengate.model.RefreshConnectionDetails refreshConnectionDetails = + null; + + /** + * Details of refresh external Connection attributes. + * + * @param refreshConnectionDetails the value to set + * @return this builder instance + */ + public Builder refreshConnectionDetails( + com.oracle.bmc.goldengate.model.RefreshConnectionDetails refreshConnectionDetails) { + this.refreshConnectionDetails = refreshConnectionDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for that + * resource. The resource is updated or deleted only if the etag you provide matches the + * resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for that + * resource. The resource is updated or deleted only if the etag you provide matches the + * resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + * + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Whether to override locks (if any exist). + */ + private Boolean isLockOverride = null; + + /** + * Whether to override locks (if any exist). + * @param isLockOverride the value to set + * @return this builder instance + */ + public Builder isLockOverride(Boolean isLockOverride) { + this.isLockOverride = isLockOverride; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RefreshConnectionRequest o) { + connectionId(o.getConnectionId()); + refreshConnectionDetails(o.getRefreshConnectionDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + isLockOverride(o.getIsLockOverride()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RefreshConnectionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RefreshConnectionRequest + */ + public RefreshConnectionRequest build() { + RefreshConnectionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.goldengate.model.RefreshConnectionDetails body) { + refreshConnectionDetails(body); + return this; + } + + /** + * Build the instance of RefreshConnectionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RefreshConnectionRequest + */ + public RefreshConnectionRequest buildWithoutInvocationCallback() { + RefreshConnectionRequest request = new RefreshConnectionRequest(); + request.connectionId = connectionId; + request.refreshConnectionDetails = refreshConnectionDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.isLockOverride = isLockOverride; + return request; + // new RefreshConnectionRequest(connectionId, refreshConnectionDetails, ifMatch, opcRequestId, isLockOverride); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .connectionId(connectionId) + .refreshConnectionDetails(refreshConnectionDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .isLockOverride(isLockOverride); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",connectionId=").append(String.valueOf(this.connectionId)); + sb.append(",refreshConnectionDetails=") + .append(String.valueOf(this.refreshConnectionDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",isLockOverride=").append(String.valueOf(this.isLockOverride)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RefreshConnectionRequest)) { + return false; + } + + RefreshConnectionRequest other = (RefreshConnectionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.connectionId, other.connectionId) + && java.util.Objects.equals( + this.refreshConnectionDetails, other.refreshConnectionDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.isLockOverride, other.isLockOverride); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.connectionId == null ? 43 : this.connectionId.hashCode()); + result = + (result * PRIME) + + (this.refreshConnectionDetails == null + ? 43 + : this.refreshConnectionDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.isLockOverride == null ? 43 : this.isLockOverride.hashCode()); + return result; + } +} diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/responses/CopyDeploymentBackupResponse.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/responses/CopyDeploymentBackupResponse.java index 4321c50f67e..e63e978d1f0 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/responses/CopyDeploymentBackupResponse.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/responses/CopyDeploymentBackupResponse.java @@ -42,20 +42,54 @@ public String getOpcRequestId() { return opcRequestId; } + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned DeploymentBackup instance. + */ + private com.oracle.bmc.goldengate.model.DeploymentBackup deploymentBackup; + + /** + * The returned DeploymentBackup instance. + * @return the value + */ + public com.oracle.bmc.goldengate.model.DeploymentBackup getDeploymentBackup() { + return deploymentBackup; + } + @java.beans.ConstructorProperties({ "__httpStatusCode__", "headers", "opcWorkRequestId", - "opcRequestId" + "opcRequestId", + "etag", + "deploymentBackup" }) private CopyDeploymentBackupResponse( int __httpStatusCode__, javax.ws.rs.core.MultivaluedMap headers, String opcWorkRequestId, - String opcRequestId) { + String opcRequestId, + String etag, + com.oracle.bmc.goldengate.model.DeploymentBackup deploymentBackup) { super(__httpStatusCode__, headers); this.opcWorkRequestId = opcWorkRequestId; this.opcRequestId = opcRequestId; + this.etag = etag; + this.deploymentBackup = deploymentBackup; } public static class Builder { @@ -111,6 +145,39 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned DeploymentBackup instance. + */ + private com.oracle.bmc.goldengate.model.DeploymentBackup deploymentBackup; + + /** + * The returned DeploymentBackup instance. + * @param deploymentBackup the value to set + * @return this builder + */ + public Builder deploymentBackup( + com.oracle.bmc.goldengate.model.DeploymentBackup deploymentBackup) { + this.deploymentBackup = deploymentBackup; + return this; + } + /** * Copy method to populate the builder with values from the given instance. * @return this builder instance @@ -120,6 +187,8 @@ public Builder copy(CopyDeploymentBackupResponse o) { headers(o.getHeaders()); opcWorkRequestId(o.getOpcWorkRequestId()); opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + deploymentBackup(o.getDeploymentBackup()); return this; } @@ -130,7 +199,12 @@ public Builder copy(CopyDeploymentBackupResponse o) { */ public CopyDeploymentBackupResponse build() { return new CopyDeploymentBackupResponse( - __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + __httpStatusCode__, + headers, + opcWorkRequestId, + opcRequestId, + etag, + deploymentBackup); } } @@ -149,6 +223,8 @@ public String toString() { sb.append("super=").append(super.toString()); sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",deploymentBackup=").append(String.valueOf(deploymentBackup)); sb.append(")"); return sb.toString(); } @@ -165,7 +241,9 @@ public boolean equals(Object o) { CopyDeploymentBackupResponse other = (CopyDeploymentBackupResponse) o; return super.equals(o) && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.deploymentBackup, other.deploymentBackup); } @Override @@ -176,6 +254,10 @@ public int hashCode() { (result * PRIME) + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.deploymentBackup == null ? 43 : this.deploymentBackup.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/responses/CreateDeploymentBackupResponse.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/responses/CreateDeploymentBackupResponse.java index e015a0c8d71..57ee1658443 100644 --- a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/responses/CreateDeploymentBackupResponse.java +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/responses/CreateDeploymentBackupResponse.java @@ -42,20 +42,54 @@ public String getOpcRequestId() { return opcRequestId; } + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned DeploymentBackup instance. + */ + private com.oracle.bmc.goldengate.model.DeploymentBackup deploymentBackup; + + /** + * The returned DeploymentBackup instance. + * @return the value + */ + public com.oracle.bmc.goldengate.model.DeploymentBackup getDeploymentBackup() { + return deploymentBackup; + } + @java.beans.ConstructorProperties({ "__httpStatusCode__", "headers", "opcWorkRequestId", - "opcRequestId" + "opcRequestId", + "etag", + "deploymentBackup" }) private CreateDeploymentBackupResponse( int __httpStatusCode__, javax.ws.rs.core.MultivaluedMap headers, String opcWorkRequestId, - String opcRequestId) { + String opcRequestId, + String etag, + com.oracle.bmc.goldengate.model.DeploymentBackup deploymentBackup) { super(__httpStatusCode__, headers); this.opcWorkRequestId = opcWorkRequestId; this.opcRequestId = opcRequestId; + this.etag = etag; + this.deploymentBackup = deploymentBackup; } public static class Builder { @@ -111,6 +145,39 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned DeploymentBackup instance. + */ + private com.oracle.bmc.goldengate.model.DeploymentBackup deploymentBackup; + + /** + * The returned DeploymentBackup instance. + * @param deploymentBackup the value to set + * @return this builder + */ + public Builder deploymentBackup( + com.oracle.bmc.goldengate.model.DeploymentBackup deploymentBackup) { + this.deploymentBackup = deploymentBackup; + return this; + } + /** * Copy method to populate the builder with values from the given instance. * @return this builder instance @@ -120,6 +187,8 @@ public Builder copy(CreateDeploymentBackupResponse o) { headers(o.getHeaders()); opcWorkRequestId(o.getOpcWorkRequestId()); opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + deploymentBackup(o.getDeploymentBackup()); return this; } @@ -130,7 +199,12 @@ public Builder copy(CreateDeploymentBackupResponse o) { */ public CreateDeploymentBackupResponse build() { return new CreateDeploymentBackupResponse( - __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + __httpStatusCode__, + headers, + opcWorkRequestId, + opcRequestId, + etag, + deploymentBackup); } } @@ -149,6 +223,8 @@ public String toString() { sb.append("super=").append(super.toString()); sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",deploymentBackup=").append(String.valueOf(deploymentBackup)); sb.append(")"); return sb.toString(); } @@ -165,7 +241,9 @@ public boolean equals(Object o) { CreateDeploymentBackupResponse other = (CreateDeploymentBackupResponse) o; return super.equals(o) && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.deploymentBackup, other.deploymentBackup); } @Override @@ -176,6 +254,10 @@ public int hashCode() { (result * PRIME) + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.deploymentBackup == null ? 43 : this.deploymentBackup.hashCode()); return result; } } diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/responses/ListDeploymentEnvironmentsResponse.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/responses/ListDeploymentEnvironmentsResponse.java new file mode 100644 index 00000000000..5b798acfd4c --- /dev/null +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/responses/ListDeploymentEnvironmentsResponse.java @@ -0,0 +1,231 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.goldengate.responses; + +import com.oracle.bmc.goldengate.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200407") +public class ListDeploymentEnvironmentsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please include the request ID. + * + */ + private String opcRequestId; + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please include the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The page token represents the page to start retrieving results. This is usually retrieved + * from a previous list call. + * + */ + private String opcNextPage; + + /** + * The page token represents the page to start retrieving results. This is usually retrieved + * from a previous list call. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned DeploymentEnvironmentCollection instance. + */ + private com.oracle.bmc.goldengate.model.DeploymentEnvironmentCollection + deploymentEnvironmentCollection; + + /** + * The returned DeploymentEnvironmentCollection instance. + * @return the value + */ + public com.oracle.bmc.goldengate.model.DeploymentEnvironmentCollection + getDeploymentEnvironmentCollection() { + return deploymentEnvironmentCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "deploymentEnvironmentCollection" + }) + private ListDeploymentEnvironmentsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.goldengate.model.DeploymentEnvironmentCollection + deploymentEnvironmentCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.deploymentEnvironmentCollection = deploymentEnvironmentCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please include the request ID. + * + */ + private String opcRequestId; + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please include the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The page token represents the page to start retrieving results. This is usually retrieved + * from a previous list call. + * + */ + private String opcNextPage; + + /** + * The page token represents the page to start retrieving results. This is usually retrieved + * from a previous list call. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned DeploymentEnvironmentCollection instance. + */ + private com.oracle.bmc.goldengate.model.DeploymentEnvironmentCollection + deploymentEnvironmentCollection; + + /** + * The returned DeploymentEnvironmentCollection instance. + * @param deploymentEnvironmentCollection the value to set + * @return this builder + */ + public Builder deploymentEnvironmentCollection( + com.oracle.bmc.goldengate.model.DeploymentEnvironmentCollection + deploymentEnvironmentCollection) { + this.deploymentEnvironmentCollection = deploymentEnvironmentCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListDeploymentEnvironmentsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + deploymentEnvironmentCollection(o.getDeploymentEnvironmentCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListDeploymentEnvironmentsResponse build() { + return new ListDeploymentEnvironmentsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + deploymentEnvironmentCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",deploymentEnvironmentCollection=") + .append(String.valueOf(deploymentEnvironmentCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListDeploymentEnvironmentsResponse)) { + return false; + } + + ListDeploymentEnvironmentsResponse other = (ListDeploymentEnvironmentsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.deploymentEnvironmentCollection, + other.deploymentEnvironmentCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.deploymentEnvironmentCollection == null + ? 43 + : this.deploymentEnvironmentCollection.hashCode()); + return result; + } +} diff --git a/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/responses/RefreshConnectionResponse.java b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/responses/RefreshConnectionResponse.java new file mode 100644 index 00000000000..a29fb39bc90 --- /dev/null +++ b/bmc-goldengate/src/main/java/com/oracle/bmc/goldengate/responses/RefreshConnectionResponse.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.goldengate.responses; + +import com.oracle.bmc.goldengate.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200407") +public class RefreshConnectionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * A unique Oracle-assigned identifier for an asynchronous request. You can use this to query + * status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * A unique Oracle-assigned identifier for an asynchronous request. You can use this to query + * status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please include the request ID. + * + */ + private String opcRequestId; + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please include the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private RefreshConnectionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * A unique Oracle-assigned identifier for an asynchronous request. You can use this to query + * status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * A unique Oracle-assigned identifier for an asynchronous request. You can use this to query + * status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please include the request ID. + * + */ + private String opcRequestId; + + /** + * A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please include the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RefreshConnectionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RefreshConnectionResponse build() { + return new RefreshConnectionResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RefreshConnectionResponse)) { + return false; + } + + RefreshConnectionResponse other = (RefreshConnectionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-governancerulescontrolplane/pom.xml b/bmc-governancerulescontrolplane/pom.xml index 0e5766f2779..d0e55a96340 100644 --- a/bmc-governancerulescontrolplane/pom.xml +++ b/bmc-governancerulescontrolplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-governancerulescontrolplane @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-healthchecks/pom.xml b/bmc-healthchecks/pom.xml index 87e61fbaba6..65bfc109152 100644 --- a/bmc-healthchecks/pom.xml +++ b/bmc-healthchecks/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-healthchecks @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-identity/pom.xml b/bmc-identity/pom.xml index 452d46e0454..e3e337b8036 100644 --- a/bmc-identity/pom.xml +++ b/bmc-identity/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-identitydataplane/pom.xml b/bmc-identitydataplane/pom.xml index 0fde8ab3275..0420752f48a 100644 --- a/bmc-identitydataplane/pom.xml +++ b/bmc-identitydataplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-identitydataplane @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-identitydomains/pom.xml b/bmc-identitydomains/pom.xml index a8f3940fcd7..badba743b26 100644 --- a/bmc-identitydomains/pom.xml +++ b/bmc-identitydomains/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-identitydomains @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/IdentityDomains.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/IdentityDomains.java index 25349beba44..2d5744f9013 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/IdentityDomains.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/IdentityDomains.java @@ -8,7 +8,8 @@ import com.oracle.bmc.identitydomains.responses.*; /** - * Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see [Identity and Access Management (with identity domains)](https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. + * Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see [Identity and Access Management (with identity domains)](https://docs.oracle.com/iaas/Content/Identity/home.htm). + * Use this pattern to construct endpoints for identity domains: {@code https:///admin/v1/}. See [Finding an Identity Domain URL](https://docs.oracle.com/en-us/iaas/Content/Identity/api-getstarted/locate-identity-domain-url.htm) to locate the domain URL you need. * Use the table of contents and search tool to explore the Identity Domains API. * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. */ @@ -168,7 +169,7 @@ CreateAuthenticationFactorsRemoverResponse createAuthenticationFactorsRemover( CreateCloudGateServerResponse createCloudGateServer(CreateCloudGateServerRequest request); /** - * Create a Condition + * Create a condition * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -467,7 +468,7 @@ CreateOAuthPartnerCertificateResponse createOAuthPartnerCertificate( CreatePasswordPolicyResponse createPasswordPolicy(CreatePasswordPolicyRequest request); /** - * Create a Policy + * Create a Policy. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -479,7 +480,20 @@ CreateOAuthPartnerCertificateResponse createOAuthPartnerCertificate( CreatePolicyResponse createPolicy(CreatePolicyRequest request); /** - * Create a Rule + * Create a RestoreOciConsolePolicy entry to restore Policy to factory default. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateRestoreOciConsolePolicy API. + */ + CreateRestoreOciConsolePolicyResponse createRestoreOciConsolePolicy( + CreateRestoreOciConsolePolicyRequest request); + + /** + * Create a Rule. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -527,6 +541,19 @@ CreateSelfRegistrationProfileResponse createSelfRegistrationProfile( */ CreateSmtpCredentialResponse createSmtpCredential(CreateSmtpCredentialRequest request); + /** + * Create a Social Identity Provider + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateSocialIdentityProvider API. + */ + CreateSocialIdentityProviderResponse createSocialIdentityProvider( + CreateSocialIdentityProviderRequest request); + /** * Create a user. * @param request The request object containing the details to send @@ -674,7 +701,7 @@ DeleteApprovalWorkflowStepResponse deleteApprovalWorkflowStep( DeleteCloudGateServerResponse deleteCloudGateServer(DeleteCloudGateServerRequest request); /** - * Delete a Condition + * Delete a condition. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -935,7 +962,7 @@ DeleteOAuthPartnerCertificateResponse deleteOAuthPartnerCertificate( DeletePasswordPolicyResponse deletePasswordPolicy(DeletePasswordPolicyRequest request); /** - * Delete a Policy + * Delete a Policy. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -947,7 +974,7 @@ DeleteOAuthPartnerCertificateResponse deleteOAuthPartnerCertificate( DeletePolicyResponse deletePolicy(DeletePolicyRequest request); /** - * Delete a Rule + * Delete a Rule. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -995,6 +1022,19 @@ DeleteSelfRegistrationProfileResponse deleteSelfRegistrationProfile( */ DeleteSmtpCredentialResponse deleteSmtpCredential(DeleteSmtpCredentialRequest request); + /** + * Delete a Social Identity Provider + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteSocialIdentityProvider API. + */ + DeleteSocialIdentityProviderResponse deleteSocialIdentityProvider( + DeleteSocialIdentityProviderRequest request); + /** * Delete a user. * @param request The request object containing the details to send @@ -1191,7 +1231,7 @@ GetAuthenticationFactorSettingResponse getAuthenticationFactorSetting( GetCloudGateServerResponse getCloudGateServer(GetCloudGateServerRequest request); /** - * Get a Condition + * Get a condition. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -1519,6 +1559,19 @@ GetOAuthClientCertificateResponse getOAuthClientCertificate( GetOAuthPartnerCertificateResponse getOAuthPartnerCertificate( GetOAuthPartnerCertificateRequest request); + /** + * Get a OciConsoleSignOnPolicyConsent Entry. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetOciConsoleSignOnPolicyConsent API. + */ + GetOciConsoleSignOnPolicyConsentResponse getOciConsoleSignOnPolicyConsent( + GetOciConsoleSignOnPolicyConsentRequest request); + /** * Get a password policy. * @param request The request object containing the details to send @@ -1532,7 +1585,7 @@ GetOAuthPartnerCertificateResponse getOAuthPartnerCertificate( GetPasswordPolicyResponse getPasswordPolicy(GetPasswordPolicyRequest request); /** - * Get a Policy + * Get a Policy. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -1544,7 +1597,7 @@ GetOAuthPartnerCertificateResponse getOAuthPartnerCertificate( GetPolicyResponse getPolicy(GetPolicyRequest request); /** - * Get a Rule + * Get a Rule. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -1629,6 +1682,19 @@ GetSelfRegistrationProfileResponse getSelfRegistrationProfile( */ GetSmtpCredentialResponse getSmtpCredential(GetSmtpCredentialRequest request); + /** + * Get a Social Identity Provider + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetSocialIdentityProvider API. + */ + GetSocialIdentityProviderResponse getSocialIdentityProvider( + GetSocialIdentityProviderRequest request); + /** * Get a user. * @param request The request object containing the details to send @@ -1839,7 +1905,7 @@ ListAuthenticationFactorSettingsResponse listAuthenticationFactorSettings( ListCloudGatesResponse listCloudGates(ListCloudGatesRequest request); /** - * Search Conditions + * Search conditions. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -2195,6 +2261,19 @@ ListOAuthClientCertificatesResponse listOAuthClientCertificates( ListOAuthPartnerCertificatesResponse listOAuthPartnerCertificates( ListOAuthPartnerCertificatesRequest request); + /** + * Search OciConsoleSignOnPolicyConsent entries + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListOciConsoleSignOnPolicyConsents API. + */ + ListOciConsoleSignOnPolicyConsentsResponse listOciConsoleSignOnPolicyConsents( + ListOciConsoleSignOnPolicyConsentsRequest request); + /** * Search for password policies. * @param request The request object containing the details to send @@ -2208,7 +2287,7 @@ ListOAuthPartnerCertificatesResponse listOAuthPartnerCertificates( ListPasswordPoliciesResponse listPasswordPolicies(ListPasswordPoliciesRequest request); /** - * Search Policies + * Search Policies. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -2233,7 +2312,7 @@ ListResourceTypeSchemaAttributesResponse listResourceTypeSchemaAttributes( ListResourceTypeSchemaAttributesRequest request); /** - * Search Rules + * Search Rules. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -2318,6 +2397,19 @@ ListSelfRegistrationProfilesResponse listSelfRegistrationProfiles( */ ListSmtpCredentialsResponse listSmtpCredentials(ListSmtpCredentialsRequest request); + /** + * Search Social Identity Providers + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListSocialIdentityProviders API. + */ + ListSocialIdentityProvidersResponse listSocialIdentityProviders( + ListSocialIdentityProvidersRequest request); + /** * Search User Schema Attribute Settings * @param request The request object containing the details to send @@ -2478,7 +2570,7 @@ PatchApprovalWorkflowStepResponse patchApprovalWorkflowStep( PatchCloudGateServerResponse patchCloudGateServer(PatchCloudGateServerRequest request); /** - * Update a Condition + * Update a condition. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -2735,7 +2827,7 @@ PatchOAuth2ClientCredentialResponse patchOAuth2ClientCredential( PatchPasswordPolicyResponse patchPasswordPolicy(PatchPasswordPolicyRequest request); /** - * Update a Policy + * Update a Policy. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -2747,7 +2839,7 @@ PatchOAuth2ClientCredentialResponse patchOAuth2ClientCredential( PatchPolicyResponse patchPolicy(PatchPolicyRequest request); /** - * Update a Rule + * Update a Rule. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -2832,6 +2924,19 @@ PatchSelfRegistrationProfileResponse patchSelfRegistrationProfile( */ PatchSmtpCredentialResponse patchSmtpCredential(PatchSmtpCredentialRequest request); + /** + * Update a Social Identity Provider + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use PatchSocialIdentityProvider API. + */ + PatchSocialIdentityProviderResponse patchSocialIdentityProvider( + PatchSocialIdentityProviderRequest request); + /** * Update a user. * @param request The request object containing the details to send @@ -2956,7 +3061,7 @@ PutAuthenticationFactorSettingResponse putAuthenticationFactorSetting( PutCloudGateServerResponse putCloudGateServer(PutCloudGateServerRequest request); /** - * Replace a Condition + * Replace a condition. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -3101,7 +3206,7 @@ PutIdentityPropagationTrustResponse putIdentityPropagationTrust( PutPasswordPolicyResponse putPasswordPolicy(PutPasswordPolicyRequest request); /** - * Replace a Policy + * Replace a Policy. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -3113,7 +3218,7 @@ PutIdentityPropagationTrustResponse putIdentityPropagationTrust( PutPolicyResponse putPolicy(PutPolicyRequest request); /** - * Replace a Rule + * Replace a Rule. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -3174,6 +3279,19 @@ PutSelfRegistrationProfileResponse putSelfRegistrationProfile( */ PutSettingResponse putSetting(PutSettingRequest request); + /** + * Replace a Social Identity Provider + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use PutSocialIdentityProvider API. + */ + PutSocialIdentityProviderResponse putSocialIdentityProvider( + PutSocialIdentityProviderRequest request); + /** * Replace a user. * @param request The request object containing the details to send @@ -3345,7 +3463,7 @@ SearchAuthenticationFactorSettingsResponse searchAuthenticationFactorSettings( SearchCloudGatesResponse searchCloudGates(SearchCloudGatesRequest request); /** - * Search Conditions Using POST + * Search Conditions Using POST. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -3555,6 +3673,19 @@ SearchOAuthClientCertificatesResponse searchOAuthClientCertificates( SearchOAuthPartnerCertificatesResponse searchOAuthPartnerCertificates( SearchOAuthPartnerCertificatesRequest request); + /** + * Search OciConsoleSignOnPolicyConsents Using POST + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use SearchOciConsoleSignOnPolicyConsents API. + */ + SearchOciConsoleSignOnPolicyConsentsResponse searchOciConsoleSignOnPolicyConsents( + SearchOciConsoleSignOnPolicyConsentsRequest request); + /** * Search for password policies using POST. * @param request The request object containing the details to send @@ -3593,7 +3724,7 @@ SearchResourceTypeSchemaAttributesResponse searchResourceTypeSchemaAttributes( SearchResourceTypeSchemaAttributesRequest request); /** - * Search Rules Using POST + * Search Rules Using POST. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -3678,6 +3809,19 @@ SearchSelfRegistrationProfilesResponse searchSelfRegistrationProfiles( */ SearchSmtpCredentialsResponse searchSmtpCredentials(SearchSmtpCredentialsRequest request); + /** + * Search Social Identity Providers Using POST + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use SearchSocialIdentityProviders API. + */ + SearchSocialIdentityProvidersResponse searchSocialIdentityProviders( + SearchSocialIdentityProvidersRequest request); + /** * Search User Schema Attribute Settings Using POST * @param request The request object containing the details to send diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/IdentityDomainsAsync.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/IdentityDomainsAsync.java index ec5cbf4d952..0f4fcd55dac 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/IdentityDomainsAsync.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/IdentityDomainsAsync.java @@ -8,7 +8,8 @@ import com.oracle.bmc.identitydomains.responses.*; /** - * Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see [Identity and Access Management (with identity domains)](https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. + * Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see [Identity and Access Management (with identity domains)](https://docs.oracle.com/iaas/Content/Identity/home.htm). + * Use this pattern to construct endpoints for identity domains: {@code https:///admin/v1/}. See [Finding an Identity Domain URL](https://docs.oracle.com/en-us/iaas/Content/Identity/api-getstarted/locate-identity-domain-url.htm) to locate the domain URL you need. * Use the table of contents and search tool to explore the Identity Domains API. */ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") @@ -206,7 +207,7 @@ java.util.concurrent.Future createCloudGateServer handler); /** - * Create a Condition + * Create a condition * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -595,7 +596,7 @@ java.util.concurrent.Future createPasswordPolicy( handler); /** - * Create a Policy + * Create a Policy. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -610,7 +611,25 @@ java.util.concurrent.Future createPolicy( handler); /** - * Create a Rule + * Create a RestoreOciConsolePolicy entry to restore Policy to factory default. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + createRestoreOciConsolePolicy( + CreateRestoreOciConsolePolicyRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateRestoreOciConsolePolicyRequest, + CreateRestoreOciConsolePolicyResponse> + handler); + + /** + * Create a Rule. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -673,6 +692,23 @@ java.util.concurrent.Future createSmtpCredential( CreateSmtpCredentialRequest, CreateSmtpCredentialResponse> handler); + /** + * Create a Social Identity Provider + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createSocialIdentityProvider( + CreateSocialIdentityProviderRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateSocialIdentityProviderRequest, + CreateSocialIdentityProviderResponse> + handler); + /** * Create a user. * @@ -860,7 +896,7 @@ java.util.concurrent.Future deleteCloudGateServer handler); /** - * Delete a Condition + * Delete a condition. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -1197,7 +1233,7 @@ java.util.concurrent.Future deletePasswordPolicy( handler); /** - * Delete a Policy + * Delete a Policy. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -1212,7 +1248,7 @@ java.util.concurrent.Future deletePolicy( handler); /** - * Delete a Rule + * Delete a Rule. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -1275,6 +1311,23 @@ java.util.concurrent.Future deleteSmtpCredential( DeleteSmtpCredentialRequest, DeleteSmtpCredentialResponse> handler); + /** + * Delete a Social Identity Provider + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteSocialIdentityProvider( + DeleteSocialIdentityProviderRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteSocialIdentityProviderRequest, + DeleteSocialIdentityProviderResponse> + handler); + /** * Delete a user. * @@ -1526,7 +1579,7 @@ java.util.concurrent.Future getCloudGateServer( handler); /** - * Get a Condition + * Get a condition. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -1943,6 +1996,24 @@ java.util.concurrent.Future getOAuthPartnerC GetOAuthPartnerCertificateRequest, GetOAuthPartnerCertificateResponse> handler); + /** + * Get a OciConsoleSignOnPolicyConsent Entry. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + getOciConsoleSignOnPolicyConsent( + GetOciConsoleSignOnPolicyConsentRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetOciConsoleSignOnPolicyConsentRequest, + GetOciConsoleSignOnPolicyConsentResponse> + handler); + /** * Get a password policy. * @@ -1960,7 +2031,7 @@ java.util.concurrent.Future getPasswordPolicy( handler); /** - * Get a Policy + * Get a Policy. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -1974,7 +2045,7 @@ java.util.concurrent.Future getPolicy( com.oracle.bmc.responses.AsyncHandler handler); /** - * Get a Rule + * Get a Rule. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -2079,6 +2150,22 @@ java.util.concurrent.Future getSmtpCredential( GetSmtpCredentialRequest, GetSmtpCredentialResponse> handler); + /** + * Get a Social Identity Provider + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getSocialIdentityProvider( + GetSocialIdentityProviderRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetSocialIdentityProviderRequest, GetSocialIdentityProviderResponse> + handler); + /** * Get a user. * @@ -2347,7 +2434,7 @@ java.util.concurrent.Future listCloudGates( handler); /** - * Search Conditions + * Search conditions. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -2802,6 +2889,24 @@ java.util.concurrent.Future listOAuthPartn ListOAuthPartnerCertificatesResponse> handler); + /** + * Search OciConsoleSignOnPolicyConsent entries + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listOciConsoleSignOnPolicyConsents( + ListOciConsoleSignOnPolicyConsentsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListOciConsoleSignOnPolicyConsentsRequest, + ListOciConsoleSignOnPolicyConsentsResponse> + handler); + /** * Search for password policies. * @@ -2819,7 +2924,7 @@ java.util.concurrent.Future listPasswordPolicies( handler); /** - * Search Policies + * Search Policies. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -2852,7 +2957,7 @@ java.util.concurrent.Future listPolicies( handler); /** - * Search Rules + * Search Rules. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -2960,6 +3065,22 @@ java.util.concurrent.Future listSmtpCredentials( ListSmtpCredentialsRequest, ListSmtpCredentialsResponse> handler); + /** + * Search Social Identity Providers + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listSocialIdentityProviders( + ListSocialIdentityProvidersRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListSocialIdentityProvidersRequest, ListSocialIdentityProvidersResponse> + handler); + /** * Search User Schema Attribute Settings * @@ -3160,7 +3281,7 @@ java.util.concurrent.Future patchCloudGateServer( handler); /** - * Update a Condition + * Update a condition. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -3488,7 +3609,7 @@ java.util.concurrent.Future patchPasswordPolicy( handler); /** - * Update a Policy + * Update a Policy. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -3502,7 +3623,7 @@ java.util.concurrent.Future patchPolicy( com.oracle.bmc.responses.AsyncHandler handler); /** - * Update a Rule + * Update a Rule. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -3610,6 +3731,22 @@ java.util.concurrent.Future patchSmtpCredential( PatchSmtpCredentialRequest, PatchSmtpCredentialResponse> handler); + /** + * Update a Social Identity Provider + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future patchSocialIdentityProvider( + PatchSocialIdentityProviderRequest request, + com.oracle.bmc.responses.AsyncHandler< + PatchSocialIdentityProviderRequest, PatchSocialIdentityProviderResponse> + handler); + /** * Update a user. * @@ -3768,7 +3905,7 @@ java.util.concurrent.Future putCloudGateServer( handler); /** - * Replace a Condition + * Replace a condition. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -3954,7 +4091,7 @@ java.util.concurrent.Future putPasswordPolicy( handler); /** - * Replace a Policy + * Replace a Policy. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -3968,7 +4105,7 @@ java.util.concurrent.Future putPolicy( com.oracle.bmc.responses.AsyncHandler handler); /** - * Replace a Rule + * Replace a Rule. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -4041,6 +4178,22 @@ java.util.concurrent.Future putSetting( PutSettingRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Replace a Social Identity Provider + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future putSocialIdentityProvider( + PutSocialIdentityProviderRequest request, + com.oracle.bmc.responses.AsyncHandler< + PutSocialIdentityProviderRequest, PutSocialIdentityProviderResponse> + handler); + /** * Replace a user. * @@ -4260,7 +4413,7 @@ java.util.concurrent.Future searchCloudGates( handler); /** - * Search Conditions Using POST + * Search Conditions Using POST. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -4531,6 +4684,24 @@ java.util.concurrent.Future searchNotificati SearchOAuthPartnerCertificatesResponse> handler); + /** + * Search OciConsoleSignOnPolicyConsents Using POST + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + searchOciConsoleSignOnPolicyConsents( + SearchOciConsoleSignOnPolicyConsentsRequest request, + com.oracle.bmc.responses.AsyncHandler< + SearchOciConsoleSignOnPolicyConsentsRequest, + SearchOciConsoleSignOnPolicyConsentsResponse> + handler); + /** * Search for password policies using POST. * @@ -4581,7 +4752,7 @@ java.util.concurrent.Future searchPolicies( handler); /** - * Search Rules Using POST + * Search Rules Using POST. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -4692,6 +4863,24 @@ java.util.concurrent.Future searchSmtpCredentials SearchSmtpCredentialsRequest, SearchSmtpCredentialsResponse> handler); + /** + * Search Social Identity Providers Using POST + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + searchSocialIdentityProviders( + SearchSocialIdentityProvidersRequest request, + com.oracle.bmc.responses.AsyncHandler< + SearchSocialIdentityProvidersRequest, + SearchSocialIdentityProvidersResponse> + handler); + /** * Search User Schema Attribute Settings Using POST * diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/IdentityDomainsAsyncClient.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/IdentityDomainsAsyncClient.java index 91e55c10b69..54834a9749c 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/IdentityDomainsAsyncClient.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/IdentityDomainsAsyncClient.java @@ -2289,6 +2289,63 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + createRestoreOciConsolePolicy( + CreateRestoreOciConsolePolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateRestoreOciConsolePolicyRequest, + CreateRestoreOciConsolePolicyResponse> + handler) { + LOG.trace("Called async createRestoreOciConsolePolicy"); + final CreateRestoreOciConsolePolicyRequest interceptedRequest = + CreateRestoreOciConsolePolicyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateRestoreOciConsolePolicyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "CreateRestoreOciConsolePolicy", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateRestoreOciConsolePolicyResponse> + transformer = + CreateRestoreOciConsolePolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateRestoreOciConsolePolicyRequest, CreateRestoreOciConsolePolicyResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateRestoreOciConsolePolicyRequest, + CreateRestoreOciConsolePolicyResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getRestoreOciConsolePolicy(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateRestoreOciConsolePolicyRequest, CreateRestoreOciConsolePolicyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future createRule( CreateRuleRequest request, @@ -2495,6 +2552,63 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + createSocialIdentityProvider( + CreateSocialIdentityProviderRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateSocialIdentityProviderRequest, + CreateSocialIdentityProviderResponse> + handler) { + LOG.trace("Called async createSocialIdentityProvider"); + final CreateSocialIdentityProviderRequest interceptedRequest = + CreateSocialIdentityProviderConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateSocialIdentityProviderConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "CreateSocialIdentityProvider", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateSocialIdentityProviderResponse> + transformer = + CreateSocialIdentityProviderConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateSocialIdentityProviderRequest, CreateSocialIdentityProviderResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateSocialIdentityProviderRequest, + CreateSocialIdentityProviderResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getSocialIdentityProvider(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateSocialIdentityProviderRequest, CreateSocialIdentityProviderResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future createUser( CreateUserRequest request, @@ -4332,6 +4446,58 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + deleteSocialIdentityProvider( + DeleteSocialIdentityProviderRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteSocialIdentityProviderRequest, + DeleteSocialIdentityProviderResponse> + handler) { + LOG.trace("Called async deleteSocialIdentityProvider"); + final DeleteSocialIdentityProviderRequest interceptedRequest = + DeleteSocialIdentityProviderConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteSocialIdentityProviderConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "DeleteSocialIdentityProvider", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SocialIdentityProvider/DeleteSocialIdentityProvider"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteSocialIdentityProviderResponse> + transformer = + DeleteSocialIdentityProviderConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteSocialIdentityProviderRequest, DeleteSocialIdentityProviderResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteSocialIdentityProviderRequest, + DeleteSocialIdentityProviderResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteSocialIdentityProviderRequest, DeleteSocialIdentityProviderResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteUser( DeleteUserRequest request, @@ -6358,6 +6524,60 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + getOciConsoleSignOnPolicyConsent( + GetOciConsoleSignOnPolicyConsentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetOciConsoleSignOnPolicyConsentRequest, + GetOciConsoleSignOnPolicyConsentResponse> + handler) { + LOG.trace("Called async getOciConsoleSignOnPolicyConsent"); + final GetOciConsoleSignOnPolicyConsentRequest interceptedRequest = + GetOciConsoleSignOnPolicyConsentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetOciConsoleSignOnPolicyConsentConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "GetOciConsoleSignOnPolicyConsent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OciConsoleSignOnPolicyConsent/GetOciConsoleSignOnPolicyConsent"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetOciConsoleSignOnPolicyConsentResponse> + transformer = + GetOciConsoleSignOnPolicyConsentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetOciConsoleSignOnPolicyConsentRequest, + GetOciConsoleSignOnPolicyConsentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetOciConsoleSignOnPolicyConsentRequest, + GetOciConsoleSignOnPolicyConsentResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetOciConsoleSignOnPolicyConsentRequest, + GetOciConsoleSignOnPolicyConsentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getPasswordPolicy( GetPasswordPolicyRequest request, @@ -6775,6 +6995,56 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future getSocialIdentityProvider( + GetSocialIdentityProviderRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetSocialIdentityProviderRequest, GetSocialIdentityProviderResponse> + handler) { + LOG.trace("Called async getSocialIdentityProvider"); + final GetSocialIdentityProviderRequest interceptedRequest = + GetSocialIdentityProviderConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetSocialIdentityProviderConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "GetSocialIdentityProvider", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SocialIdentityProvider/GetSocialIdentityProvider"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetSocialIdentityProviderResponse> + transformer = + GetSocialIdentityProviderConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetSocialIdentityProviderRequest, GetSocialIdentityProviderResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetSocialIdentityProviderRequest, + GetSocialIdentityProviderResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetSocialIdentityProviderRequest, GetSocialIdentityProviderResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getUser( GetUserRequest request, @@ -7604,7 +7874,7 @@ public java.util.concurrent.Future listConditions( "IdentityDomains", "ListConditions", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Conditions/ListConditions"); + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Condition/ListConditions"); final java.util.function.Function transformer = ListConditionsConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -8980,6 +9250,60 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + listOciConsoleSignOnPolicyConsents( + ListOciConsoleSignOnPolicyConsentsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListOciConsoleSignOnPolicyConsentsRequest, + ListOciConsoleSignOnPolicyConsentsResponse> + handler) { + LOG.trace("Called async listOciConsoleSignOnPolicyConsents"); + final ListOciConsoleSignOnPolicyConsentsRequest interceptedRequest = + ListOciConsoleSignOnPolicyConsentsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListOciConsoleSignOnPolicyConsentsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "ListOciConsoleSignOnPolicyConsents", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OciConsoleSignOnPolicyConsent/ListOciConsoleSignOnPolicyConsents"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListOciConsoleSignOnPolicyConsentsResponse> + transformer = + ListOciConsoleSignOnPolicyConsentsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListOciConsoleSignOnPolicyConsentsRequest, + ListOciConsoleSignOnPolicyConsentsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListOciConsoleSignOnPolicyConsentsRequest, + ListOciConsoleSignOnPolicyConsentsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListOciConsoleSignOnPolicyConsentsRequest, + ListOciConsoleSignOnPolicyConsentsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listPasswordPolicies( ListPasswordPoliciesRequest request, @@ -9044,7 +9368,7 @@ public java.util.concurrent.Future listPolicies( "IdentityDomains", "ListPolicies", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Policies/ListPolicies"); + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Policy/ListPolicies"); final java.util.function.Function transformer = ListPoliciesConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -9142,7 +9466,7 @@ public java.util.concurrent.Future listRules( "IdentityDomains", "ListRules", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Rules/ListRules"); + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Rule/ListRules"); final java.util.function.Function transformer = ListRulesConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -9460,6 +9784,58 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + listSocialIdentityProviders( + ListSocialIdentityProvidersRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListSocialIdentityProvidersRequest, + ListSocialIdentityProvidersResponse> + handler) { + LOG.trace("Called async listSocialIdentityProviders"); + final ListSocialIdentityProvidersRequest interceptedRequest = + ListSocialIdentityProvidersConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSocialIdentityProvidersConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "ListSocialIdentityProviders", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SocialIdentityProviders/ListSocialIdentityProviders"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListSocialIdentityProvidersResponse> + transformer = + ListSocialIdentityProvidersConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListSocialIdentityProvidersRequest, ListSocialIdentityProvidersResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListSocialIdentityProvidersRequest, + ListSocialIdentityProvidersResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListSocialIdentityProvidersRequest, ListSocialIdentityProvidersResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listUserAttributesSettings( @@ -9479,7 +9855,7 @@ protected void beforeRetryAction() {} "IdentityDomains", "ListUserAttributesSettings", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserAttributesSettings/ListUserAttributesSettings"); + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserAttributesSetting/ListUserAttributesSettings"); final java.util.function.Function< javax.ws.rs.core.Response, ListUserAttributesSettingsResponse> transformer = @@ -11642,6 +12018,63 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + patchSocialIdentityProvider( + PatchSocialIdentityProviderRequest request, + final com.oracle.bmc.responses.AsyncHandler< + PatchSocialIdentityProviderRequest, + PatchSocialIdentityProviderResponse> + handler) { + LOG.trace("Called async patchSocialIdentityProvider"); + final PatchSocialIdentityProviderRequest interceptedRequest = + PatchSocialIdentityProviderConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PatchSocialIdentityProviderConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "PatchSocialIdentityProvider", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SocialIdentityProvider/PatchSocialIdentityProvider"); + final java.util.function.Function< + javax.ws.rs.core.Response, PatchSocialIdentityProviderResponse> + transformer = + PatchSocialIdentityProviderConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + PatchSocialIdentityProviderRequest, PatchSocialIdentityProviderResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + PatchSocialIdentityProviderRequest, + PatchSocialIdentityProviderResponse>, + java.util.concurrent.Future> + futureSupplier = + client.patchFutureSupplier( + interceptedRequest, + interceptedRequest.getPatchOp(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + PatchSocialIdentityProviderRequest, PatchSocialIdentityProviderResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future patchUser( PatchUserRequest request, @@ -13079,6 +13512,61 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future putSocialIdentityProvider( + PutSocialIdentityProviderRequest request, + final com.oracle.bmc.responses.AsyncHandler< + PutSocialIdentityProviderRequest, PutSocialIdentityProviderResponse> + handler) { + LOG.trace("Called async putSocialIdentityProvider"); + final PutSocialIdentityProviderRequest interceptedRequest = + PutSocialIdentityProviderConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PutSocialIdentityProviderConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "PutSocialIdentityProvider", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SocialIdentityProvider/PutSocialIdentityProvider"); + final java.util.function.Function< + javax.ws.rs.core.Response, PutSocialIdentityProviderResponse> + transformer = + PutSocialIdentityProviderConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + PutSocialIdentityProviderRequest, PutSocialIdentityProviderResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + PutSocialIdentityProviderRequest, + PutSocialIdentityProviderResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getSocialIdentityProvider(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + PutSocialIdentityProviderRequest, PutSocialIdentityProviderResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future putUser( PutUserRequest request, @@ -13829,7 +14317,7 @@ public java.util.concurrent.Future searchConditions( "IdentityDomains", "SearchConditions", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Conditions/SearchConditions"); + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Condition/SearchConditions"); final java.util.function.Function transformer = SearchConditionsConverter.fromResponse( @@ -14725,6 +15213,66 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + searchOciConsoleSignOnPolicyConsents( + SearchOciConsoleSignOnPolicyConsentsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + SearchOciConsoleSignOnPolicyConsentsRequest, + SearchOciConsoleSignOnPolicyConsentsResponse> + handler) { + LOG.trace("Called async searchOciConsoleSignOnPolicyConsents"); + final SearchOciConsoleSignOnPolicyConsentsRequest interceptedRequest = + SearchOciConsoleSignOnPolicyConsentsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SearchOciConsoleSignOnPolicyConsentsConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "SearchOciConsoleSignOnPolicyConsents", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OciConsoleSignOnPolicyConsent/SearchOciConsoleSignOnPolicyConsents"); + final java.util.function.Function< + javax.ws.rs.core.Response, SearchOciConsoleSignOnPolicyConsentsResponse> + transformer = + SearchOciConsoleSignOnPolicyConsentsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + SearchOciConsoleSignOnPolicyConsentsRequest, + SearchOciConsoleSignOnPolicyConsentsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + SearchOciConsoleSignOnPolicyConsentsRequest, + SearchOciConsoleSignOnPolicyConsentsResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getOciConsoleSignOnPolicyConsentSearchRequest(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + SearchOciConsoleSignOnPolicyConsentsRequest, + SearchOciConsoleSignOnPolicyConsentsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future searchPasswordPolicies( SearchPasswordPoliciesRequest request, @@ -14795,7 +15343,7 @@ public java.util.concurrent.Future searchPolicies( "IdentityDomains", "SearchPolicies", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Policies/SearchPolicies"); + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Policy/SearchPolicies"); final java.util.function.Function transformer = SearchPoliciesConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -14904,7 +15452,7 @@ public java.util.concurrent.Future searchRules( "IdentityDomains", "SearchRules", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Rules/SearchRules"); + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Rule/SearchRules"); final java.util.function.Function transformer = SearchRulesConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -15262,6 +15810,63 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + searchSocialIdentityProviders( + SearchSocialIdentityProvidersRequest request, + final com.oracle.bmc.responses.AsyncHandler< + SearchSocialIdentityProvidersRequest, + SearchSocialIdentityProvidersResponse> + handler) { + LOG.trace("Called async searchSocialIdentityProviders"); + final SearchSocialIdentityProvidersRequest interceptedRequest = + SearchSocialIdentityProvidersConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SearchSocialIdentityProvidersConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "SearchSocialIdentityProviders", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SocialIdentityProviders/SearchSocialIdentityProviders"); + final java.util.function.Function< + javax.ws.rs.core.Response, SearchSocialIdentityProvidersResponse> + transformer = + SearchSocialIdentityProvidersConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + SearchSocialIdentityProvidersRequest, SearchSocialIdentityProvidersResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + SearchSocialIdentityProvidersRequest, + SearchSocialIdentityProvidersResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getSocialIdentityProviderSearchRequest(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + SearchSocialIdentityProvidersRequest, SearchSocialIdentityProvidersResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future searchUserAttributesSettings( @@ -15281,7 +15886,7 @@ protected void beforeRetryAction() {} "IdentityDomains", "SearchUserAttributesSettings", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserAttributesSettings/SearchUserAttributesSettings"); + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserAttributesSetting/SearchUserAttributesSettings"); final java.util.function.Function< javax.ws.rs.core.Response, SearchUserAttributesSettingsResponse> transformer = diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/IdentityDomainsClient.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/IdentityDomainsClient.java index e2dedca50d4..a13381e24fb 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/IdentityDomainsClient.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/IdentityDomainsClient.java @@ -1869,6 +1869,50 @@ public CreatePolicyResponse createPolicy(CreatePolicyRequest request) { }); } + @Override + public CreateRestoreOciConsolePolicyResponse createRestoreOciConsolePolicy( + CreateRestoreOciConsolePolicyRequest request) { + LOG.trace("Called createRestoreOciConsolePolicy"); + final CreateRestoreOciConsolePolicyRequest interceptedRequest = + CreateRestoreOciConsolePolicyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateRestoreOciConsolePolicyConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "CreateRestoreOciConsolePolicy", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, CreateRestoreOciConsolePolicyResponse> + transformer = + CreateRestoreOciConsolePolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getRestoreOciConsolePolicy(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public CreateRuleResponse createRule(CreateRuleRequest request) { LOG.trace("Called createRule"); @@ -2031,6 +2075,49 @@ public CreateSmtpCredentialResponse createSmtpCredential(CreateSmtpCredentialReq }); } + @Override + public CreateSocialIdentityProviderResponse createSocialIdentityProvider( + CreateSocialIdentityProviderRequest request) { + LOG.trace("Called createSocialIdentityProvider"); + final CreateSocialIdentityProviderRequest interceptedRequest = + CreateSocialIdentityProviderConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateSocialIdentityProviderConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "CreateSocialIdentityProvider", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + CreateSocialIdentityProviderConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getSocialIdentityProvider(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public CreateUserResponse createUser(CreateUserRequest request) { LOG.trace("Called createUser"); @@ -3517,6 +3604,46 @@ public DeleteSmtpCredentialResponse deleteSmtpCredential(DeleteSmtpCredentialReq }); } + @Override + public DeleteSocialIdentityProviderResponse deleteSocialIdentityProvider( + DeleteSocialIdentityProviderRequest request) { + LOG.trace("Called deleteSocialIdentityProvider"); + final DeleteSocialIdentityProviderRequest interceptedRequest = + DeleteSocialIdentityProviderConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteSocialIdentityProviderConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "DeleteSocialIdentityProvider", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SocialIdentityProvider/DeleteSocialIdentityProvider"); + java.util.function.Function + transformer = + DeleteSocialIdentityProviderConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DeleteUserResponse deleteUser(DeleteUserRequest request) { LOG.trace("Called deleteUser"); @@ -5134,6 +5261,46 @@ public GetOAuthPartnerCertificateResponse getOAuthPartnerCertificate( }); } + @Override + public GetOciConsoleSignOnPolicyConsentResponse getOciConsoleSignOnPolicyConsent( + GetOciConsoleSignOnPolicyConsentRequest request) { + LOG.trace("Called getOciConsoleSignOnPolicyConsent"); + final GetOciConsoleSignOnPolicyConsentRequest interceptedRequest = + GetOciConsoleSignOnPolicyConsentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetOciConsoleSignOnPolicyConsentConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "GetOciConsoleSignOnPolicyConsent", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OciConsoleSignOnPolicyConsent/GetOciConsoleSignOnPolicyConsent"); + java.util.function.Function< + javax.ws.rs.core.Response, GetOciConsoleSignOnPolicyConsentResponse> + transformer = + GetOciConsoleSignOnPolicyConsentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetPasswordPolicyResponse getPasswordPolicy(GetPasswordPolicyRequest request) { LOG.trace("Called getPasswordPolicy"); @@ -5466,6 +5633,45 @@ public GetSmtpCredentialResponse getSmtpCredential(GetSmtpCredentialRequest requ }); } + @Override + public GetSocialIdentityProviderResponse getSocialIdentityProvider( + GetSocialIdentityProviderRequest request) { + LOG.trace("Called getSocialIdentityProvider"); + final GetSocialIdentityProviderRequest interceptedRequest = + GetSocialIdentityProviderConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetSocialIdentityProviderConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "GetSocialIdentityProvider", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SocialIdentityProvider/GetSocialIdentityProvider"); + java.util.function.Function + transformer = + GetSocialIdentityProviderConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetUserResponse getUser(GetUserRequest request) { LOG.trace("Called getUser"); @@ -6125,7 +6331,7 @@ public ListConditionsResponse listConditions(ListConditionsRequest request) { "IdentityDomains", "ListConditions", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Conditions/ListConditions"); + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Condition/ListConditions"); java.util.function.Function transformer = ListConditionsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -7210,6 +7416,46 @@ public ListOAuthPartnerCertificatesResponse listOAuthPartnerCertificates( }); } + @Override + public ListOciConsoleSignOnPolicyConsentsResponse listOciConsoleSignOnPolicyConsents( + ListOciConsoleSignOnPolicyConsentsRequest request) { + LOG.trace("Called listOciConsoleSignOnPolicyConsents"); + final ListOciConsoleSignOnPolicyConsentsRequest interceptedRequest = + ListOciConsoleSignOnPolicyConsentsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListOciConsoleSignOnPolicyConsentsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "ListOciConsoleSignOnPolicyConsents", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OciConsoleSignOnPolicyConsent/ListOciConsoleSignOnPolicyConsents"); + java.util.function.Function< + javax.ws.rs.core.Response, ListOciConsoleSignOnPolicyConsentsResponse> + transformer = + ListOciConsoleSignOnPolicyConsentsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListPasswordPoliciesResponse listPasswordPolicies(ListPasswordPoliciesRequest request) { LOG.trace("Called listPasswordPolicies"); @@ -7266,7 +7512,7 @@ public ListPoliciesResponse listPolicies(ListPoliciesRequest request) { "IdentityDomains", "ListPolicies", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Policies/ListPolicies"); + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Policy/ListPolicies"); java.util.function.Function transformer = ListPoliciesConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -7341,7 +7587,7 @@ public ListRulesResponse listRules(ListRulesRequest request) { "IdentityDomains", "ListRules", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Rules/ListRules"); + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Rule/ListRules"); java.util.function.Function transformer = ListRulesConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -7586,6 +7832,45 @@ public ListSmtpCredentialsResponse listSmtpCredentials(ListSmtpCredentialsReques }); } + @Override + public ListSocialIdentityProvidersResponse listSocialIdentityProviders( + ListSocialIdentityProvidersRequest request) { + LOG.trace("Called listSocialIdentityProviders"); + final ListSocialIdentityProvidersRequest interceptedRequest = + ListSocialIdentityProvidersConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSocialIdentityProvidersConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "ListSocialIdentityProviders", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SocialIdentityProviders/ListSocialIdentityProviders"); + java.util.function.Function + transformer = + ListSocialIdentityProvidersConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListUserAttributesSettingsResponse listUserAttributesSettings( ListUserAttributesSettingsRequest request) { @@ -7605,7 +7890,7 @@ public ListUserAttributesSettingsResponse listUserAttributesSettings( "IdentityDomains", "ListUserAttributesSettings", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserAttributesSettings/ListUserAttributesSettings"); + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserAttributesSetting/ListUserAttributesSettings"); java.util.function.Function transformer = ListUserAttributesSettingsConverter.fromResponse( @@ -9241,6 +9526,47 @@ public PatchSmtpCredentialResponse patchSmtpCredential(PatchSmtpCredentialReques }); } + @Override + public PatchSocialIdentityProviderResponse patchSocialIdentityProvider( + PatchSocialIdentityProviderRequest request) { + LOG.trace("Called patchSocialIdentityProvider"); + final PatchSocialIdentityProviderRequest interceptedRequest = + PatchSocialIdentityProviderConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PatchSocialIdentityProviderConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "PatchSocialIdentityProvider", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SocialIdentityProvider/PatchSocialIdentityProvider"); + java.util.function.Function + transformer = + PatchSocialIdentityProviderConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.patch( + ib, retriedRequest.getPatchOp(), retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public PatchUserResponse patchUser(PatchUserRequest request) { LOG.trace("Called patchUser"); @@ -10367,6 +10693,49 @@ public PutSettingResponse putSetting(PutSettingRequest request) { }); } + @Override + public PutSocialIdentityProviderResponse putSocialIdentityProvider( + PutSocialIdentityProviderRequest request) { + LOG.trace("Called putSocialIdentityProvider"); + final PutSocialIdentityProviderRequest interceptedRequest = + PutSocialIdentityProviderConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PutSocialIdentityProviderConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "PutSocialIdentityProvider", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SocialIdentityProvider/PutSocialIdentityProvider"); + java.util.function.Function + transformer = + PutSocialIdentityProviderConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getSocialIdentityProvider(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public PutUserResponse putUser(PutUserRequest request) { LOG.trace("Called putUser"); @@ -10969,7 +11338,7 @@ public SearchConditionsResponse searchConditions(SearchConditionsRequest request "IdentityDomains", "SearchConditions", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Conditions/SearchConditions"); + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Condition/SearchConditions"); java.util.function.Function transformer = SearchConditionsConverter.fromResponse( @@ -11675,6 +12044,52 @@ public SearchOAuthPartnerCertificatesResponse searchOAuthPartnerCertificates( }); } + @Override + public SearchOciConsoleSignOnPolicyConsentsResponse searchOciConsoleSignOnPolicyConsents( + SearchOciConsoleSignOnPolicyConsentsRequest request) { + LOG.trace("Called searchOciConsoleSignOnPolicyConsents"); + final SearchOciConsoleSignOnPolicyConsentsRequest interceptedRequest = + SearchOciConsoleSignOnPolicyConsentsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SearchOciConsoleSignOnPolicyConsentsConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "SearchOciConsoleSignOnPolicyConsents", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OciConsoleSignOnPolicyConsent/SearchOciConsoleSignOnPolicyConsents"); + java.util.function.Function< + javax.ws.rs.core.Response, SearchOciConsoleSignOnPolicyConsentsResponse> + transformer = + SearchOciConsoleSignOnPolicyConsentsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getOciConsoleSignOnPolicyConsentSearchRequest(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public SearchPasswordPoliciesResponse searchPasswordPolicies( SearchPasswordPoliciesRequest request) { @@ -11736,7 +12151,7 @@ public SearchPoliciesResponse searchPolicies(SearchPoliciesRequest request) { "IdentityDomains", "SearchPolicies", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Policies/SearchPolicies"); + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Policy/SearchPolicies"); java.util.function.Function transformer = SearchPoliciesConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -11821,7 +12236,7 @@ public SearchRulesResponse searchRules(SearchRulesRequest request) { "IdentityDomains", "SearchRules", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Rules/SearchRules"); + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Rule/SearchRules"); java.util.function.Function transformer = SearchRulesConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -12099,6 +12514,51 @@ public SearchSmtpCredentialsResponse searchSmtpCredentials( }); } + @Override + public SearchSocialIdentityProvidersResponse searchSocialIdentityProviders( + SearchSocialIdentityProvidersRequest request) { + LOG.trace("Called searchSocialIdentityProviders"); + final SearchSocialIdentityProvidersRequest interceptedRequest = + SearchSocialIdentityProvidersConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SearchSocialIdentityProvidersConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IdentityDomains", + "SearchSocialIdentityProviders", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SocialIdentityProviders/SearchSocialIdentityProviders"); + java.util.function.Function< + javax.ws.rs.core.Response, SearchSocialIdentityProvidersResponse> + transformer = + SearchSocialIdentityProvidersConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getSocialIdentityProviderSearchRequest(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public SearchUserAttributesSettingsResponse searchUserAttributesSettings( SearchUserAttributesSettingsRequest request) { @@ -12118,7 +12578,7 @@ public SearchUserAttributesSettingsResponse searchUserAttributesSettings( "IdentityDomains", "SearchUserAttributesSettings", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserAttributesSettings/SearchUserAttributesSettings"); + "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserAttributesSetting/SearchUserAttributesSettings"); java.util.function.Function transformer = SearchUserAttributesSettingsConverter.fromResponse( diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/CreateRestoreOciConsolePolicyConverter.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/CreateRestoreOciConsolePolicyConverter.java new file mode 100644 index 00000000000..df126fd9993 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/CreateRestoreOciConsolePolicyConverter.java @@ -0,0 +1,159 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.identitydomains.model.*; +import com.oracle.bmc.identitydomains.requests.*; +import com.oracle.bmc.identitydomains.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class CreateRestoreOciConsolePolicyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateRestoreOciConsolePolicyConverter.class); + + public static com.oracle.bmc.identitydomains.requests.CreateRestoreOciConsolePolicyRequest + interceptRequest( + com.oracle.bmc.identitydomains.requests.CreateRestoreOciConsolePolicyRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.identitydomains.requests.CreateRestoreOciConsolePolicyRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("") + .path("admin") + .path("v1") + .path("RestoreOciConsolePolicy"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getAuthorization() != null) { + ib.header("authorization", request.getAuthorization()); + } + + if (request.getResourceTypeSchemaVersion() != null) { + ib.header("resource_type_schema_version", request.getResourceTypeSchemaVersion()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses.CreateRestoreOciConsolePolicyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses.CreateRestoreOciConsolePolicyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .CreateRestoreOciConsolePolicyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .CreateRestoreOciConsolePolicyResponse>() { + @Override + public com.oracle.bmc.identitydomains.responses + .CreateRestoreOciConsolePolicyResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.identitydomains.responses.CreateRestoreOciConsolePolicyResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.identitydomains.model + .RestoreOciConsolePolicy>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.identitydomains.model + .RestoreOciConsolePolicy + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.identitydomains.model + .RestoreOciConsolePolicy + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.identitydomains.model + .RestoreOciConsolePolicy> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.identitydomains.responses + .CreateRestoreOciConsolePolicyResponse.Builder + builder = + com.oracle.bmc.identitydomains.responses + .CreateRestoreOciConsolePolicyResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.restoreOciConsolePolicy(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.identitydomains.responses + .CreateRestoreOciConsolePolicyResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/CreateSocialIdentityProviderConverter.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/CreateSocialIdentityProviderConverter.java new file mode 100644 index 00000000000..63a151f151c --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/CreateSocialIdentityProviderConverter.java @@ -0,0 +1,159 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.identitydomains.model.*; +import com.oracle.bmc.identitydomains.requests.*; +import com.oracle.bmc.identitydomains.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class CreateSocialIdentityProviderConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateSocialIdentityProviderConverter.class); + + public static com.oracle.bmc.identitydomains.requests.CreateSocialIdentityProviderRequest + interceptRequest( + com.oracle.bmc.identitydomains.requests.CreateSocialIdentityProviderRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.identitydomains.requests.CreateSocialIdentityProviderRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("") + .path("admin") + .path("v1") + .path("SocialIdentityProviders"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getAuthorization() != null) { + ib.header("authorization", request.getAuthorization()); + } + + if (request.getResourceTypeSchemaVersion() != null) { + ib.header("resource_type_schema_version", request.getResourceTypeSchemaVersion()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses.CreateSocialIdentityProviderResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses.CreateSocialIdentityProviderResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .CreateSocialIdentityProviderResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .CreateSocialIdentityProviderResponse>() { + @Override + public com.oracle.bmc.identitydomains.responses + .CreateSocialIdentityProviderResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.identitydomains.responses.CreateSocialIdentityProviderResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.identitydomains.model + .SocialIdentityProvider>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.identitydomains.model + .SocialIdentityProvider + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.identitydomains.model + .SocialIdentityProvider + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.identitydomains.model + .SocialIdentityProvider> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.identitydomains.responses + .CreateSocialIdentityProviderResponse.Builder + builder = + com.oracle.bmc.identitydomains.responses + .CreateSocialIdentityProviderResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.socialIdentityProvider(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.identitydomains.responses + .CreateSocialIdentityProviderResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/DeleteSocialIdentityProviderConverter.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/DeleteSocialIdentityProviderConverter.java new file mode 100644 index 00000000000..c37e627c17f --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/DeleteSocialIdentityProviderConverter.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.identitydomains.model.*; +import com.oracle.bmc.identitydomains.requests.*; +import com.oracle.bmc.identitydomains.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class DeleteSocialIdentityProviderConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteSocialIdentityProviderConverter.class); + + public static com.oracle.bmc.identitydomains.requests.DeleteSocialIdentityProviderRequest + interceptRequest( + com.oracle.bmc.identitydomains.requests.DeleteSocialIdentityProviderRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.identitydomains.requests.DeleteSocialIdentityProviderRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSocialIdentityProviderId(), + "socialIdentityProviderId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("") + .path("admin") + .path("v1") + .path("SocialIdentityProviders") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSocialIdentityProviderId())); + + if (request.getForceDelete() != null) { + target = + target.queryParam( + "forceDelete", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getForceDelete())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getAuthorization() != null) { + ib.header("authorization", request.getAuthorization()); + } + + if (request.getResourceTypeSchemaVersion() != null) { + ib.header("resource_type_schema_version", request.getResourceTypeSchemaVersion()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses.DeleteSocialIdentityProviderResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses.DeleteSocialIdentityProviderResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .DeleteSocialIdentityProviderResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .DeleteSocialIdentityProviderResponse>() { + @Override + public com.oracle.bmc.identitydomains.responses + .DeleteSocialIdentityProviderResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.identitydomains.responses.DeleteSocialIdentityProviderResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.identitydomains.responses + .DeleteSocialIdentityProviderResponse.Builder + builder = + com.oracle.bmc.identitydomains.responses + .DeleteSocialIdentityProviderResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.identitydomains.responses + .DeleteSocialIdentityProviderResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/GetOciConsoleSignOnPolicyConsentConverter.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/GetOciConsoleSignOnPolicyConsentConverter.java new file mode 100644 index 00000000000..8682a8f8e30 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/GetOciConsoleSignOnPolicyConsentConverter.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.identitydomains.model.*; +import com.oracle.bmc.identitydomains.requests.*; +import com.oracle.bmc.identitydomains.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class GetOciConsoleSignOnPolicyConsentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetOciConsoleSignOnPolicyConsentConverter.class); + + public static com.oracle.bmc.identitydomains.requests.GetOciConsoleSignOnPolicyConsentRequest + interceptRequest( + com.oracle.bmc.identitydomains.requests.GetOciConsoleSignOnPolicyConsentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.identitydomains.requests.GetOciConsoleSignOnPolicyConsentRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getOciConsoleSignOnPolicyConsentId(), + "ociConsoleSignOnPolicyConsentId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("") + .path("admin") + .path("v1") + .path("OciConsoleSignOnPolicyConsents") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getOciConsoleSignOnPolicyConsentId())); + + if (request.getAttributes() != null) { + target = + target.queryParam( + "attributes", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAttributes())); + } + + if (request.getAttributeSets() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "attributeSets", + request.getAttributeSets(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getAuthorization() != null) { + ib.header("authorization", request.getAuthorization()); + } + + if (request.getResourceTypeSchemaVersion() != null) { + ib.header("resource_type_schema_version", request.getResourceTypeSchemaVersion()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .GetOciConsoleSignOnPolicyConsentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .GetOciConsoleSignOnPolicyConsentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .GetOciConsoleSignOnPolicyConsentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .GetOciConsoleSignOnPolicyConsentResponse>() { + @Override + public com.oracle.bmc.identitydomains.responses + .GetOciConsoleSignOnPolicyConsentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.identitydomains.responses.GetOciConsoleSignOnPolicyConsentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.identitydomains.model + .OciConsoleSignOnPolicyConsent>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.identitydomains.model + .OciConsoleSignOnPolicyConsent + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.identitydomains.model + .OciConsoleSignOnPolicyConsent + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.identitydomains.model + .OciConsoleSignOnPolicyConsent> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.identitydomains.responses + .GetOciConsoleSignOnPolicyConsentResponse.Builder + builder = + com.oracle.bmc.identitydomains.responses + .GetOciConsoleSignOnPolicyConsentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.ociConsoleSignOnPolicyConsent(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.identitydomains.responses + .GetOciConsoleSignOnPolicyConsentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/GetSocialIdentityProviderConverter.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/GetSocialIdentityProviderConverter.java new file mode 100644 index 00000000000..2a5500c6de8 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/GetSocialIdentityProviderConverter.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.identitydomains.model.*; +import com.oracle.bmc.identitydomains.requests.*; +import com.oracle.bmc.identitydomains.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class GetSocialIdentityProviderConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetSocialIdentityProviderConverter.class); + + public static com.oracle.bmc.identitydomains.requests.GetSocialIdentityProviderRequest + interceptRequest( + com.oracle.bmc.identitydomains.requests.GetSocialIdentityProviderRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.identitydomains.requests.GetSocialIdentityProviderRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSocialIdentityProviderId(), + "socialIdentityProviderId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("") + .path("admin") + .path("v1") + .path("SocialIdentityProviders") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSocialIdentityProviderId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getAuthorization() != null) { + ib.header("authorization", request.getAuthorization()); + } + + if (request.getResourceTypeSchemaVersion() != null) { + ib.header("resource_type_schema_version", request.getResourceTypeSchemaVersion()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses.GetSocialIdentityProviderResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses.GetSocialIdentityProviderResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses.GetSocialIdentityProviderResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .GetSocialIdentityProviderResponse>() { + @Override + public com.oracle.bmc.identitydomains.responses + .GetSocialIdentityProviderResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.identitydomains.responses.GetSocialIdentityProviderResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.identitydomains.model + .SocialIdentityProvider>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.identitydomains.model + .SocialIdentityProvider + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.identitydomains.model + .SocialIdentityProvider + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.identitydomains.model + .SocialIdentityProvider> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.identitydomains.responses + .GetSocialIdentityProviderResponse.Builder + builder = + com.oracle.bmc.identitydomains.responses + .GetSocialIdentityProviderResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.socialIdentityProvider(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.identitydomains.responses + .GetSocialIdentityProviderResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/ListOciConsoleSignOnPolicyConsentsConverter.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/ListOciConsoleSignOnPolicyConsentsConverter.java new file mode 100644 index 00000000000..33e9a852740 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/ListOciConsoleSignOnPolicyConsentsConverter.java @@ -0,0 +1,238 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.identitydomains.model.*; +import com.oracle.bmc.identitydomains.requests.*; +import com.oracle.bmc.identitydomains.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class ListOciConsoleSignOnPolicyConsentsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListOciConsoleSignOnPolicyConsentsConverter.class); + + public static com.oracle.bmc.identitydomains.requests.ListOciConsoleSignOnPolicyConsentsRequest + interceptRequest( + com.oracle.bmc.identitydomains.requests + .ListOciConsoleSignOnPolicyConsentsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.identitydomains.requests.ListOciConsoleSignOnPolicyConsentsRequest + request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("") + .path("admin") + .path("v1") + .path("OciConsoleSignOnPolicyConsents"); + + if (request.getFilter() != null) { + target = + target.queryParam( + "filter", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getFilter())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getStartIndex() != null) { + target = + target.queryParam( + "startIndex", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getStartIndex())); + } + + if (request.getCount() != null) { + target = + target.queryParam( + "count", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCount())); + } + + if (request.getAttributes() != null) { + target = + target.queryParam( + "attributes", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAttributes())); + } + + if (request.getAttributeSets() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "attributeSets", + request.getAttributeSets(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getAuthorization() != null) { + ib.header("authorization", request.getAuthorization()); + } + + if (request.getResourceTypeSchemaVersion() != null) { + ib.header("resource_type_schema_version", request.getResourceTypeSchemaVersion()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .ListOciConsoleSignOnPolicyConsentsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .ListOciConsoleSignOnPolicyConsentsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .ListOciConsoleSignOnPolicyConsentsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .ListOciConsoleSignOnPolicyConsentsResponse>() { + @Override + public com.oracle.bmc.identitydomains.responses + .ListOciConsoleSignOnPolicyConsentsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.identitydomains.responses.ListOciConsoleSignOnPolicyConsentsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.identitydomains.model + .OciConsoleSignOnPolicyConsents>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.identitydomains.model + .OciConsoleSignOnPolicyConsents + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.identitydomains.model + .OciConsoleSignOnPolicyConsents + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.identitydomains.model + .OciConsoleSignOnPolicyConsents> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.identitydomains.responses + .ListOciConsoleSignOnPolicyConsentsResponse.Builder + builder = + com.oracle.bmc.identitydomains.responses + .ListOciConsoleSignOnPolicyConsentsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.ociConsoleSignOnPolicyConsents(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.identitydomains.responses + .ListOciConsoleSignOnPolicyConsentsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/ListSocialIdentityProvidersConverter.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/ListSocialIdentityProvidersConverter.java new file mode 100644 index 00000000000..862fd108f20 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/ListSocialIdentityProvidersConverter.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.identitydomains.model.*; +import com.oracle.bmc.identitydomains.requests.*; +import com.oracle.bmc.identitydomains.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class ListSocialIdentityProvidersConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListSocialIdentityProvidersConverter.class); + + public static com.oracle.bmc.identitydomains.requests.ListSocialIdentityProvidersRequest + interceptRequest( + com.oracle.bmc.identitydomains.requests.ListSocialIdentityProvidersRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.identitydomains.requests.ListSocialIdentityProvidersRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("") + .path("admin") + .path("v1") + .path("SocialIdentityProviders"); + + if (request.getFilter() != null) { + target = + target.queryParam( + "filter", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getFilter())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getStartIndex() != null) { + target = + target.queryParam( + "startIndex", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getStartIndex())); + } + + if (request.getCount() != null) { + target = + target.queryParam( + "count", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCount())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getAuthorization() != null) { + ib.header("authorization", request.getAuthorization()); + } + + if (request.getResourceTypeSchemaVersion() != null) { + ib.header("resource_type_schema_version", request.getResourceTypeSchemaVersion()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses.ListSocialIdentityProvidersResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses.ListSocialIdentityProvidersResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .ListSocialIdentityProvidersResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .ListSocialIdentityProvidersResponse>() { + @Override + public com.oracle.bmc.identitydomains.responses + .ListSocialIdentityProvidersResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.identitydomains.responses.ListSocialIdentityProvidersResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.identitydomains.model + .SocialIdentityProviders>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.identitydomains.model + .SocialIdentityProviders + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.identitydomains.model + .SocialIdentityProviders + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.identitydomains.model + .SocialIdentityProviders> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.identitydomains.responses + .ListSocialIdentityProvidersResponse.Builder + builder = + com.oracle.bmc.identitydomains.responses + .ListSocialIdentityProvidersResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.socialIdentityProviders(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.identitydomains.responses + .ListSocialIdentityProvidersResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/PatchSocialIdentityProviderConverter.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/PatchSocialIdentityProviderConverter.java new file mode 100644 index 00000000000..2f9b2279c02 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/PatchSocialIdentityProviderConverter.java @@ -0,0 +1,169 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.identitydomains.model.*; +import com.oracle.bmc.identitydomains.requests.*; +import com.oracle.bmc.identitydomains.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class PatchSocialIdentityProviderConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PatchSocialIdentityProviderConverter.class); + + public static com.oracle.bmc.identitydomains.requests.PatchSocialIdentityProviderRequest + interceptRequest( + com.oracle.bmc.identitydomains.requests.PatchSocialIdentityProviderRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.identitydomains.requests.PatchSocialIdentityProviderRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSocialIdentityProviderId(), + "socialIdentityProviderId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("") + .path("admin") + .path("v1") + .path("SocialIdentityProviders") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSocialIdentityProviderId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getAuthorization() != null) { + ib.header("authorization", request.getAuthorization()); + } + + if (request.getResourceTypeSchemaVersion() != null) { + ib.header("resource_type_schema_version", request.getResourceTypeSchemaVersion()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses.PatchSocialIdentityProviderResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses.PatchSocialIdentityProviderResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .PatchSocialIdentityProviderResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .PatchSocialIdentityProviderResponse>() { + @Override + public com.oracle.bmc.identitydomains.responses + .PatchSocialIdentityProviderResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.identitydomains.responses.PatchSocialIdentityProviderResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.identitydomains.model + .SocialIdentityProvider>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.identitydomains.model + .SocialIdentityProvider + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.identitydomains.model + .SocialIdentityProvider + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.identitydomains.model + .SocialIdentityProvider> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.identitydomains.responses + .PatchSocialIdentityProviderResponse.Builder + builder = + com.oracle.bmc.identitydomains.responses + .PatchSocialIdentityProviderResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.socialIdentityProvider(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.identitydomains.responses + .PatchSocialIdentityProviderResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/PutSocialIdentityProviderConverter.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/PutSocialIdentityProviderConverter.java new file mode 100644 index 00000000000..4898776efb6 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/PutSocialIdentityProviderConverter.java @@ -0,0 +1,167 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.identitydomains.model.*; +import com.oracle.bmc.identitydomains.requests.*; +import com.oracle.bmc.identitydomains.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class PutSocialIdentityProviderConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PutSocialIdentityProviderConverter.class); + + public static com.oracle.bmc.identitydomains.requests.PutSocialIdentityProviderRequest + interceptRequest( + com.oracle.bmc.identitydomains.requests.PutSocialIdentityProviderRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.identitydomains.requests.PutSocialIdentityProviderRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSocialIdentityProviderId(), + "socialIdentityProviderId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("") + .path("admin") + .path("v1") + .path("SocialIdentityProviders") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSocialIdentityProviderId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getAuthorization() != null) { + ib.header("authorization", request.getAuthorization()); + } + + if (request.getResourceTypeSchemaVersion() != null) { + ib.header("resource_type_schema_version", request.getResourceTypeSchemaVersion()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses.PutSocialIdentityProviderResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses.PutSocialIdentityProviderResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses.PutSocialIdentityProviderResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .PutSocialIdentityProviderResponse>() { + @Override + public com.oracle.bmc.identitydomains.responses + .PutSocialIdentityProviderResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.identitydomains.responses.PutSocialIdentityProviderResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.identitydomains.model + .SocialIdentityProvider>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.identitydomains.model + .SocialIdentityProvider + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.identitydomains.model + .SocialIdentityProvider + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.identitydomains.model + .SocialIdentityProvider> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.identitydomains.responses + .PutSocialIdentityProviderResponse.Builder + builder = + com.oracle.bmc.identitydomains.responses + .PutSocialIdentityProviderResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.socialIdentityProvider(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.identitydomains.responses + .PutSocialIdentityProviderResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/SearchOciConsoleSignOnPolicyConsentsConverter.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/SearchOciConsoleSignOnPolicyConsentsConverter.java new file mode 100644 index 00000000000..8ab2dbd05f3 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/SearchOciConsoleSignOnPolicyConsentsConverter.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.identitydomains.model.*; +import com.oracle.bmc.identitydomains.requests.*; +import com.oracle.bmc.identitydomains.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class SearchOciConsoleSignOnPolicyConsentsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SearchOciConsoleSignOnPolicyConsentsConverter.class); + + public static com.oracle.bmc.identitydomains.requests + .SearchOciConsoleSignOnPolicyConsentsRequest + interceptRequest( + com.oracle.bmc.identitydomains.requests + .SearchOciConsoleSignOnPolicyConsentsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.identitydomains.requests.SearchOciConsoleSignOnPolicyConsentsRequest + request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("") + .path("admin") + .path("v1") + .path("OciConsoleSignOnPolicyConsents") + .path(".search"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getAuthorization() != null) { + ib.header("authorization", request.getAuthorization()); + } + + if (request.getResourceTypeSchemaVersion() != null) { + ib.header("resource_type_schema_version", request.getResourceTypeSchemaVersion()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .SearchOciConsoleSignOnPolicyConsentsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .SearchOciConsoleSignOnPolicyConsentsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .SearchOciConsoleSignOnPolicyConsentsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .SearchOciConsoleSignOnPolicyConsentsResponse>() { + @Override + public com.oracle.bmc.identitydomains.responses + .SearchOciConsoleSignOnPolicyConsentsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.identitydomains.responses.SearchOciConsoleSignOnPolicyConsentsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.identitydomains.model + .OciConsoleSignOnPolicyConsents>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.identitydomains.model + .OciConsoleSignOnPolicyConsents + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.identitydomains.model + .OciConsoleSignOnPolicyConsents + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.identitydomains.model + .OciConsoleSignOnPolicyConsents> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.identitydomains.responses + .SearchOciConsoleSignOnPolicyConsentsResponse + .Builder + builder = + com.oracle.bmc.identitydomains.responses + .SearchOciConsoleSignOnPolicyConsentsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.ociConsoleSignOnPolicyConsents(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.identitydomains.responses + .SearchOciConsoleSignOnPolicyConsentsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/SearchSocialIdentityProvidersConverter.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/SearchSocialIdentityProvidersConverter.java new file mode 100644 index 00000000000..ecfc94df37e --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/internal/http/SearchSocialIdentityProvidersConverter.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.identitydomains.model.*; +import com.oracle.bmc.identitydomains.requests.*; +import com.oracle.bmc.identitydomains.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class SearchSocialIdentityProvidersConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SearchSocialIdentityProvidersConverter.class); + + public static com.oracle.bmc.identitydomains.requests.SearchSocialIdentityProvidersRequest + interceptRequest( + com.oracle.bmc.identitydomains.requests.SearchSocialIdentityProvidersRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.identitydomains.requests.SearchSocialIdentityProvidersRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("") + .path("admin") + .path("v1") + .path("SocialIdentityProviders") + .path(".search"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getAuthorization() != null) { + ib.header("authorization", request.getAuthorization()); + } + + if (request.getResourceTypeSchemaVersion() != null) { + ib.header("resource_type_schema_version", request.getResourceTypeSchemaVersion()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses.SearchSocialIdentityProvidersResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses.SearchSocialIdentityProvidersResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .SearchSocialIdentityProvidersResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.identitydomains.responses + .SearchSocialIdentityProvidersResponse>() { + @Override + public com.oracle.bmc.identitydomains.responses + .SearchSocialIdentityProvidersResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.identitydomains.responses.SearchSocialIdentityProvidersResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.identitydomains.model + .SocialIdentityProviders>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.identitydomains.model + .SocialIdentityProviders + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.identitydomains.model + .SocialIdentityProviders + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.identitydomains.model + .SocialIdentityProviders> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.identitydomains.responses + .SearchSocialIdentityProvidersResponse.Builder + builder = + com.oracle.bmc.identitydomains.responses + .SearchSocialIdentityProvidersResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.socialIdentityProviders(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.identitydomains.responses + .SearchSocialIdentityProvidersResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/AuthToken.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/AuthToken.java index 93022d554b2..b52c835957a 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/AuthToken.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/AuthToken.java @@ -34,6 +34,7 @@ public final class AuthToken extends com.oracle.bmc.http.internal.ExplicitlySetB "compartmentOcid", "tenancyOcid", "description", + "token", "status", "expiresOn", "user", @@ -54,6 +55,7 @@ public AuthToken( String compartmentOcid, String tenancyOcid, String description, + String token, Status status, String expiresOn, AuthTokenUser user, @@ -73,6 +75,7 @@ public AuthToken( this.compartmentOcid = compartmentOcid; this.tenancyOcid = tenancyOcid; this.description = description; + this.token = token; this.status = status; this.expiresOn = expiresOn; this.user = user; @@ -502,6 +505,42 @@ public Builder description(String description) { this.__explicitlySet__.add("description"); return this; } + /** + * token + *

+ **Added In:** 2010242156 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - type: string + * - mutability: readOnly + * - required: false + * - returned: default + * - idcsSensitive: hash_sc + **/ + @com.fasterxml.jackson.annotation.JsonProperty("token") + private String token; + + /** + * token + *

+ **Added In:** 2010242156 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - type: string + * - mutability: readOnly + * - required: false + * - returned: default + * - idcsSensitive: hash_sc + * @param token the value to set + * @return this builder + **/ + public Builder token(String token) { + this.token = token; + this.__explicitlySet__.add("token"); + return this; + } /** * The user's credential status. *

@@ -624,6 +663,7 @@ public AuthToken build() { this.compartmentOcid, this.tenancyOcid, this.description, + this.token, this.status, this.expiresOn, this.user, @@ -678,6 +718,9 @@ public Builder copy(AuthToken model) { if (model.wasPropertyExplicitlySet("description")) { this.description(model.getDescription()); } + if (model.wasPropertyExplicitlySet("token")) { + this.token(model.getToken()); + } if (model.wasPropertyExplicitlySet("status")) { this.status(model.getStatus()); } @@ -1098,6 +1141,40 @@ public String getDescription() { return description; } + /** + * token + *

+ **Added In:** 2010242156 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - type: string + * - mutability: readOnly + * - required: false + * - returned: default + * - idcsSensitive: hash_sc + **/ + @com.fasterxml.jackson.annotation.JsonProperty("token") + private final String token; + + /** + * token + *

+ **Added In:** 2010242156 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - type: string + * - mutability: readOnly + * - required: false + * - returned: default + * - idcsSensitive: hash_sc + * @return the value + **/ + public String getToken() { + return token; + } + /** * The user's credential status. *

@@ -1278,6 +1355,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", compartmentOcid=").append(String.valueOf(this.compartmentOcid)); sb.append(", tenancyOcid=").append(String.valueOf(this.tenancyOcid)); sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", token=").append(String.valueOf(this.token)); sb.append(", status=").append(String.valueOf(this.status)); sb.append(", expiresOn=").append(String.valueOf(this.expiresOn)); sb.append(", user=").append(String.valueOf(this.user)); @@ -1315,6 +1393,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.compartmentOcid, other.compartmentOcid) && java.util.Objects.equals(this.tenancyOcid, other.tenancyOcid) && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.token, other.token) && java.util.Objects.equals(this.status, other.status) && java.util.Objects.equals(this.expiresOn, other.expiresOn) && java.util.Objects.equals(this.user, other.user) @@ -1360,6 +1439,7 @@ public int hashCode() { + (this.compartmentOcid == null ? 43 : this.compartmentOcid.hashCode()); result = (result * PRIME) + (this.tenancyOcid == null ? 43 : this.tenancyOcid.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.token == null ? 43 : this.token.hashCode()); result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); result = (result * PRIME) + (this.expiresOn == null ? 43 : this.expiresOn.hashCode()); result = (result * PRIME) + (this.user == null ? 43 : this.user.hashCode()); diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/Condition.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/Condition.java index 378d0615128..13c34884e4a 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/Condition.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/Condition.java @@ -39,7 +39,8 @@ public final class Condition extends com.oracle.bmc.http.internal.ExplicitlySetB "attributeName", "operator", "attributeValue", - "evaluateConditionIf" + "evaluateConditionIf", + "urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy" }) public Condition( String id, @@ -61,7 +62,9 @@ public Condition( String attributeName, Operator operator, String attributeValue, - String evaluateConditionIf) { + String evaluateConditionIf, + ConditionExtensionOciconsolesignonpolicyconsentPolicy + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy) { super(); this.id = id; this.ocid = ocid; @@ -83,6 +86,8 @@ public Condition( this.operator = operator; this.attributeValue = attributeValue; this.evaluateConditionIf = evaluateConditionIf; + this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy = + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -262,6 +267,7 @@ public Builder idcsPreventedOperations( *

**SCIM++ Properties:** * - idcsCompositeKey: [key, value] + * - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] * - idcsSearchable: true * - multiValued: true * - mutability: readWrite @@ -278,6 +284,7 @@ public Builder idcsPreventedOperations( *

**SCIM++ Properties:** * - idcsCompositeKey: [key, value] + * - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] * - idcsSearchable: true * - multiValued: true * - mutability: readWrite @@ -726,6 +733,22 @@ public Builder evaluateConditionIf(String evaluateConditionIf) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty( + "urn:ietf:params:scim:schemas:oracle:idcs:extension:ociconsolesignonpolicyconsent:Policy") + private ConditionExtensionOciconsolesignonpolicyconsentPolicy + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy; + + public Builder + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy( + ConditionExtensionOciconsolesignonpolicyconsentPolicy + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy) { + this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy = + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy; + this.__explicitlySet__.add( + "urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -751,7 +774,8 @@ public Condition build() { this.attributeName, this.operator, this.attributeValue, - this.evaluateConditionIf); + this.evaluateConditionIf, + this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -820,6 +844,12 @@ public Builder copy(Condition model) { if (model.wasPropertyExplicitlySet("evaluateConditionIf")) { this.evaluateConditionIf(model.getEvaluateConditionIf()); } + if (model.wasPropertyExplicitlySet( + "urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy")) { + this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy( + model + .getUrnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy()); + } return this; } } @@ -995,6 +1025,7 @@ public java.util.List getIdcsPreventedOperations() { *

**SCIM++ Properties:** * - idcsCompositeKey: [key, value] + * - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] * - idcsSearchable: true * - multiValued: true * - mutability: readWrite @@ -1011,6 +1042,7 @@ public java.util.List getIdcsPreventedOperations() { *

**SCIM++ Properties:** * - idcsCompositeKey: [key, value] + * - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] * - idcsSearchable: true * - multiValued: true * - mutability: readWrite @@ -1499,6 +1531,16 @@ public String getEvaluateConditionIf() { return evaluateConditionIf; } + @com.fasterxml.jackson.annotation.JsonProperty( + "urn:ietf:params:scim:schemas:oracle:idcs:extension:ociconsolesignonpolicyconsent:Policy") + private final ConditionExtensionOciconsolesignonpolicyconsentPolicy + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy; + + public ConditionExtensionOciconsolesignonpolicyconsentPolicy + getUrnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy() { + return urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy; + } + @Override public String toString() { return this.toString(true); @@ -1535,6 +1577,11 @@ public String toString(boolean includeByteArrayContents) { sb.append(", operator=").append(String.valueOf(this.operator)); sb.append(", attributeValue=").append(String.valueOf(this.attributeValue)); sb.append(", evaluateConditionIf=").append(String.valueOf(this.evaluateConditionIf)); + sb.append( + ", urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy=") + .append( + String.valueOf( + this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy)); sb.append(")"); return sb.toString(); } @@ -1571,6 +1618,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.operator, other.operator) && java.util.Objects.equals(this.attributeValue, other.attributeValue) && java.util.Objects.equals(this.evaluateConditionIf, other.evaluateConditionIf) + && java.util.Objects.equals( + this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy, + other.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy) && super.equals(other); } @@ -1624,6 +1674,14 @@ public int hashCode() { + (this.evaluateConditionIf == null ? 43 : this.evaluateConditionIf.hashCode()); + result = + (result * PRIME) + + (this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy + == null + ? 43 + : this + .urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy + .hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/ConditionExtensionOciconsolesignonpolicyconsentPolicy.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/ConditionExtensionOciconsolesignonpolicyconsentPolicy.java new file mode 100644 index 00000000000..ef7f228e2ac --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/ConditionExtensionOciconsolesignonpolicyconsentPolicy.java @@ -0,0 +1,336 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.model; + +/** + * This extension defines attributes used to record consent for modification of the "Security Policy for OCI Console" sign-on policy, Rule, Condition or ConditionGroup. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ConditionExtensionOciconsolesignonpolicyconsentPolicy.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ConditionExtensionOciconsolesignonpolicyconsentPolicy + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"consent", "justification", "reason"}) + public ConditionExtensionOciconsolesignonpolicyconsentPolicy( + Boolean consent, String justification, String reason) { + super(); + this.consent = consent; + this.justification = justification; + this.reason = reason; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Set to true when an identity domain administrator opts to change the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. Defaults to false. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: boolean + **/ + @com.fasterxml.jackson.annotation.JsonProperty("consent") + private Boolean consent; + + /** + * Set to true when an identity domain administrator opts to change the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. Defaults to false. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: boolean + * @param consent the value to set + * @return this builder + **/ + public Builder consent(Boolean consent) { + this.consent = consent; + this.__explicitlySet__.add("consent"); + return this; + } + /** + * The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("justification") + private String justification; + + /** + * The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + * @param justification the value to set + * @return this builder + **/ + public Builder justification(String justification) { + this.justification = justification; + this.__explicitlySet__.add("justification"); + return this; + } + /** + * The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reason") + private String reason; + + /** + * The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + * @param reason the value to set + * @return this builder + **/ + public Builder reason(String reason) { + this.reason = reason; + this.__explicitlySet__.add("reason"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ConditionExtensionOciconsolesignonpolicyconsentPolicy build() { + ConditionExtensionOciconsolesignonpolicyconsentPolicy model = + new ConditionExtensionOciconsolesignonpolicyconsentPolicy( + this.consent, this.justification, this.reason); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ConditionExtensionOciconsolesignonpolicyconsentPolicy model) { + if (model.wasPropertyExplicitlySet("consent")) { + this.consent(model.getConsent()); + } + if (model.wasPropertyExplicitlySet("justification")) { + this.justification(model.getJustification()); + } + if (model.wasPropertyExplicitlySet("reason")) { + this.reason(model.getReason()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Set to true when an identity domain administrator opts to change the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. Defaults to false. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: boolean + **/ + @com.fasterxml.jackson.annotation.JsonProperty("consent") + private final Boolean consent; + + /** + * Set to true when an identity domain administrator opts to change the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. Defaults to false. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: boolean + * @return the value + **/ + public Boolean getConsent() { + return consent; + } + + /** + * The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("justification") + private final String justification; + + /** + * The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + * @return the value + **/ + public String getJustification() { + return justification; + } + + /** + * The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reason") + private final String reason; + + /** + * The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + * @return the value + **/ + public String getReason() { + return reason; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ConditionExtensionOciconsolesignonpolicyconsentPolicy("); + sb.append("super=").append(super.toString()); + sb.append("consent=").append(String.valueOf(this.consent)); + sb.append(", justification=").append(String.valueOf(this.justification)); + sb.append(", reason=").append(String.valueOf(this.reason)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConditionExtensionOciconsolesignonpolicyconsentPolicy)) { + return false; + } + + ConditionExtensionOciconsolesignonpolicyconsentPolicy other = + (ConditionExtensionOciconsolesignonpolicyconsentPolicy) o; + return java.util.Objects.equals(this.consent, other.consent) + && java.util.Objects.equals(this.justification, other.justification) + && java.util.Objects.equals(this.reason, other.reason) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.consent == null ? 43 : this.consent.hashCode()); + result = + (result * PRIME) + + (this.justification == null ? 43 : this.justification.hashCode()); + result = (result * PRIME) + (this.reason == null ? 43 : this.reason.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/CustomerSecretKey.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/CustomerSecretKey.java index 0f0da5a7222..56705848ddd 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/CustomerSecretKey.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/CustomerSecretKey.java @@ -40,6 +40,7 @@ public final class CustomerSecretKey extends com.oracle.bmc.http.internal.Explic "status", "expiresOn", "accessKey", + "secretKey", "user", "urnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser" }) @@ -62,6 +63,7 @@ public CustomerSecretKey( Status status, String expiresOn, String accessKey, + String secretKey, CustomerSecretKeyUser user, ExtensionSelfChangeUser urnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser) { super(); @@ -83,6 +85,7 @@ public CustomerSecretKey( this.status = status; this.expiresOn = expiresOn; this.accessKey = accessKey; + this.secretKey = secretKey; this.user = user; this.urnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser = urnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser; @@ -646,6 +649,36 @@ public Builder accessKey(String accessKey) { this.__explicitlySet__.add("accessKey"); return this; } + /** + * The secret key. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - type: string + * - mutability: readOnly + * - required: false + * - returned: default + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretKey") + private String secretKey; + + /** + * The secret key. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - type: string + * - mutability: readOnly + * - required: false + * - returned: default + * @param secretKey the value to set + * @return this builder + **/ + public Builder secretKey(String secretKey) { + this.secretKey = secretKey; + this.__explicitlySet__.add("secretKey"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("user") private CustomerSecretKeyUser user; @@ -692,6 +725,7 @@ public CustomerSecretKey build() { this.status, this.expiresOn, this.accessKey, + this.secretKey, this.user, this.urnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -756,6 +790,9 @@ public Builder copy(CustomerSecretKey model) { if (model.wasPropertyExplicitlySet("accessKey")) { this.accessKey(model.getAccessKey()); } + if (model.wasPropertyExplicitlySet("secretKey")) { + this.secretKey(model.getSecretKey()); + } if (model.wasPropertyExplicitlySet("user")) { this.user(model.getUser()); } @@ -1357,6 +1394,34 @@ public String getAccessKey() { return accessKey; } + /** + * The secret key. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - type: string + * - mutability: readOnly + * - required: false + * - returned: default + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secretKey") + private final String secretKey; + + /** + * The secret key. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - type: string + * - mutability: readOnly + * - required: false + * - returned: default + * @return the value + **/ + public String getSecretKey() { + return secretKey; + } + @com.fasterxml.jackson.annotation.JsonProperty("user") private final CustomerSecretKeyUser user; @@ -1406,6 +1471,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", status=").append(String.valueOf(this.status)); sb.append(", expiresOn=").append(String.valueOf(this.expiresOn)); sb.append(", accessKey=").append(String.valueOf(this.accessKey)); + sb.append(", secretKey=").append(String.valueOf(this.secretKey)); sb.append(", user=").append(String.valueOf(this.user)); sb.append(", urnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser=") .append( @@ -1445,6 +1511,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.status, other.status) && java.util.Objects.equals(this.expiresOn, other.expiresOn) && java.util.Objects.equals(this.accessKey, other.accessKey) + && java.util.Objects.equals(this.secretKey, other.secretKey) && java.util.Objects.equals(this.user, other.user) && java.util.Objects.equals( this.urnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser, @@ -1492,6 +1559,7 @@ public int hashCode() { result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); result = (result * PRIME) + (this.expiresOn == null ? 43 : this.expiresOn.hashCode()); result = (result * PRIME) + (this.accessKey == null ? 43 : this.accessKey.hashCode()); + result = (result * PRIME) + (this.secretKey == null ? 43 : this.secretKey.hashCode()); result = (result * PRIME) + (this.user == null ? 43 : this.user.hashCode()); result = (result * PRIME) diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/ExtensionSocialIdentityProvider.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/ExtensionSocialIdentityProvider.java index 02644576e67..c36cfe3e89a 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/ExtensionSocialIdentityProvider.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/ExtensionSocialIdentityProvider.java @@ -24,6 +24,10 @@ public final class ExtensionSocialIdentityProvider @Deprecated @java.beans.ConstructorProperties({ "accountLinkingEnabled", + "autoRedirectEnabled", + "socialJitProvisioningEnabled", + "jitProvGroupStaticListEnabled", + "jitProvAssignedGroups", "registrationEnabled", "status", "authzUrl", @@ -43,6 +47,10 @@ public final class ExtensionSocialIdentityProvider }) public ExtensionSocialIdentityProvider( Boolean accountLinkingEnabled, + Boolean autoRedirectEnabled, + Boolean socialJitProvisioningEnabled, + Boolean jitProvGroupStaticListEnabled, + java.util.List jitProvAssignedGroups, Boolean registrationEnabled, Status status, String authzUrl, @@ -61,6 +69,10 @@ public ExtensionSocialIdentityProvider( String idAttribute) { super(); this.accountLinkingEnabled = accountLinkingEnabled; + this.autoRedirectEnabled = autoRedirectEnabled; + this.socialJitProvisioningEnabled = socialJitProvisioningEnabled; + this.jitProvGroupStaticListEnabled = jitProvGroupStaticListEnabled; + this.jitProvAssignedGroups = jitProvAssignedGroups; this.registrationEnabled = registrationEnabled; this.status = status; this.authzUrl = authzUrl; @@ -121,6 +133,167 @@ public Builder accountLinkingEnabled(Boolean accountLinkingEnabled) { this.__explicitlySet__.add("accountLinkingEnabled"); return this; } + /** + * Whether social auto redirect is enabled. The IDP policy should be configured with only one Social IDP, and without username/password selected. + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autoRedirectEnabled") + private Boolean autoRedirectEnabled; + + /** + * Whether social auto redirect is enabled. The IDP policy should be configured with only one Social IDP, and without username/password selected. + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * @param autoRedirectEnabled the value to set + * @return this builder + **/ + public Builder autoRedirectEnabled(Boolean autoRedirectEnabled) { + this.autoRedirectEnabled = autoRedirectEnabled; + this.__explicitlySet__.add("autoRedirectEnabled"); + return this; + } + /** + * Whether Social JIT Provisioning is enabled + *

+ **Added In:** 2307282043 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("socialJitProvisioningEnabled") + private Boolean socialJitProvisioningEnabled; + + /** + * Whether Social JIT Provisioning is enabled + *

+ **Added In:** 2307282043 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * @param socialJitProvisioningEnabled the value to set + * @return this builder + **/ + public Builder socialJitProvisioningEnabled(Boolean socialJitProvisioningEnabled) { + this.socialJitProvisioningEnabled = socialJitProvisioningEnabled; + this.__explicitlySet__.add("socialJitProvisioningEnabled"); + return this; + } + /** + * Set to true to indicate Social JIT User Provisioning Groups should be assigned from a static list + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("jitProvGroupStaticListEnabled") + private Boolean jitProvGroupStaticListEnabled; + + /** + * Set to true to indicate Social JIT User Provisioning Groups should be assigned from a static list + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * @param jitProvGroupStaticListEnabled the value to set + * @return this builder + **/ + public Builder jitProvGroupStaticListEnabled(Boolean jitProvGroupStaticListEnabled) { + this.jitProvGroupStaticListEnabled = jitProvGroupStaticListEnabled; + this.__explicitlySet__.add("jitProvGroupStaticListEnabled"); + return this; + } + /** + * Lists the groups each social JIT-provisioned user is a member. Just-in-Time user-provisioning applies this static list when jitProvGroupStaticListEnabled:true. + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [value] + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: complex + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("jitProvAssignedGroups") + private java.util.List jitProvAssignedGroups; + + /** + * Lists the groups each social JIT-provisioned user is a member. Just-in-Time user-provisioning applies this static list when jitProvGroupStaticListEnabled:true. + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [value] + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: complex + * - uniqueness: none + * @param jitProvAssignedGroups the value to set + * @return this builder + **/ + public Builder jitProvAssignedGroups( + java.util.List jitProvAssignedGroups) { + this.jitProvAssignedGroups = jitProvAssignedGroups; + this.__explicitlySet__.add("jitProvAssignedGroups"); + return this; + } /** * Whether registration is enabled *

@@ -770,6 +943,10 @@ public ExtensionSocialIdentityProvider build() { ExtensionSocialIdentityProvider model = new ExtensionSocialIdentityProvider( this.accountLinkingEnabled, + this.autoRedirectEnabled, + this.socialJitProvisioningEnabled, + this.jitProvGroupStaticListEnabled, + this.jitProvAssignedGroups, this.registrationEnabled, this.status, this.authzUrl, @@ -797,6 +974,18 @@ public Builder copy(ExtensionSocialIdentityProvider model) { if (model.wasPropertyExplicitlySet("accountLinkingEnabled")) { this.accountLinkingEnabled(model.getAccountLinkingEnabled()); } + if (model.wasPropertyExplicitlySet("autoRedirectEnabled")) { + this.autoRedirectEnabled(model.getAutoRedirectEnabled()); + } + if (model.wasPropertyExplicitlySet("socialJitProvisioningEnabled")) { + this.socialJitProvisioningEnabled(model.getSocialJitProvisioningEnabled()); + } + if (model.wasPropertyExplicitlySet("jitProvGroupStaticListEnabled")) { + this.jitProvGroupStaticListEnabled(model.getJitProvGroupStaticListEnabled()); + } + if (model.wasPropertyExplicitlySet("jitProvAssignedGroups")) { + this.jitProvAssignedGroups(model.getJitProvAssignedGroups()); + } if (model.wasPropertyExplicitlySet("registrationEnabled")) { this.registrationEnabled(model.getRegistrationEnabled()); } @@ -898,6 +1087,158 @@ public Boolean getAccountLinkingEnabled() { return accountLinkingEnabled; } + /** + * Whether social auto redirect is enabled. The IDP policy should be configured with only one Social IDP, and without username/password selected. + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autoRedirectEnabled") + private final Boolean autoRedirectEnabled; + + /** + * Whether social auto redirect is enabled. The IDP policy should be configured with only one Social IDP, and without username/password selected. + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * @return the value + **/ + public Boolean getAutoRedirectEnabled() { + return autoRedirectEnabled; + } + + /** + * Whether Social JIT Provisioning is enabled + *

+ **Added In:** 2307282043 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("socialJitProvisioningEnabled") + private final Boolean socialJitProvisioningEnabled; + + /** + * Whether Social JIT Provisioning is enabled + *

+ **Added In:** 2307282043 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * @return the value + **/ + public Boolean getSocialJitProvisioningEnabled() { + return socialJitProvisioningEnabled; + } + + /** + * Set to true to indicate Social JIT User Provisioning Groups should be assigned from a static list + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("jitProvGroupStaticListEnabled") + private final Boolean jitProvGroupStaticListEnabled; + + /** + * Set to true to indicate Social JIT User Provisioning Groups should be assigned from a static list + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * @return the value + **/ + public Boolean getJitProvGroupStaticListEnabled() { + return jitProvGroupStaticListEnabled; + } + + /** + * Lists the groups each social JIT-provisioned user is a member. Just-in-Time user-provisioning applies this static list when jitProvGroupStaticListEnabled:true. + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [value] + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: complex + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("jitProvAssignedGroups") + private final java.util.List jitProvAssignedGroups; + + /** + * Lists the groups each social JIT-provisioned user is a member. Just-in-Time user-provisioning applies this static list when jitProvGroupStaticListEnabled:true. + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [value] + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: complex + * - uniqueness: none + * @return the value + **/ + public java.util.List getJitProvAssignedGroups() { + return jitProvAssignedGroups; + } + /** * Whether registration is enabled *

@@ -1580,6 +1921,12 @@ public String toString(boolean includeByteArrayContents) { sb.append("ExtensionSocialIdentityProvider("); sb.append("super=").append(super.toString()); sb.append("accountLinkingEnabled=").append(String.valueOf(this.accountLinkingEnabled)); + sb.append(", autoRedirectEnabled=").append(String.valueOf(this.autoRedirectEnabled)); + sb.append(", socialJitProvisioningEnabled=") + .append(String.valueOf(this.socialJitProvisioningEnabled)); + sb.append(", jitProvGroupStaticListEnabled=") + .append(String.valueOf(this.jitProvGroupStaticListEnabled)); + sb.append(", jitProvAssignedGroups=").append(String.valueOf(this.jitProvAssignedGroups)); sb.append(", registrationEnabled=").append(String.valueOf(this.registrationEnabled)); sb.append(", status=").append(String.valueOf(this.status)); sb.append(", authzUrl=").append(String.valueOf(this.authzUrl)); @@ -1612,6 +1959,12 @@ public boolean equals(Object o) { ExtensionSocialIdentityProvider other = (ExtensionSocialIdentityProvider) o; return java.util.Objects.equals(this.accountLinkingEnabled, other.accountLinkingEnabled) + && java.util.Objects.equals(this.autoRedirectEnabled, other.autoRedirectEnabled) + && java.util.Objects.equals( + this.socialJitProvisioningEnabled, other.socialJitProvisioningEnabled) + && java.util.Objects.equals( + this.jitProvGroupStaticListEnabled, other.jitProvGroupStaticListEnabled) + && java.util.Objects.equals(this.jitProvAssignedGroups, other.jitProvAssignedGroups) && java.util.Objects.equals(this.registrationEnabled, other.registrationEnabled) && java.util.Objects.equals(this.status, other.status) && java.util.Objects.equals(this.authzUrl, other.authzUrl) @@ -1641,6 +1994,26 @@ public int hashCode() { + (this.accountLinkingEnabled == null ? 43 : this.accountLinkingEnabled.hashCode()); + result = + (result * PRIME) + + (this.autoRedirectEnabled == null + ? 43 + : this.autoRedirectEnabled.hashCode()); + result = + (result * PRIME) + + (this.socialJitProvisioningEnabled == null + ? 43 + : this.socialJitProvisioningEnabled.hashCode()); + result = + (result * PRIME) + + (this.jitProvGroupStaticListEnabled == null + ? 43 + : this.jitProvGroupStaticListEnabled.hashCode()); + result = + (result * PRIME) + + (this.jitProvAssignedGroups == null + ? 43 + : this.jitProvAssignedGroups.hashCode()); result = (result * PRIME) + (this.registrationEnabled == null diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/IdentityPropagationTrust.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/IdentityPropagationTrust.java index e20b7e03d48..dae8824e8c4 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/IdentityPropagationTrust.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/IdentityPropagationTrust.java @@ -50,7 +50,6 @@ public final class IdentityPropagationTrust "publicKeyEndpoint", "publicCertificate", "oauthClients", - "servicePrincipals", "allowImpersonation", "clockSkewSeconds", "impersonationServiceUsers", @@ -84,7 +83,6 @@ public IdentityPropagationTrust( String publicKeyEndpoint, String publicCertificate, java.util.List oauthClients, - java.util.List servicePrincipals, Boolean allowImpersonation, Integer clockSkewSeconds, java.util.List @@ -118,7 +116,6 @@ public IdentityPropagationTrust( this.publicKeyEndpoint = publicKeyEndpoint; this.publicCertificate = publicCertificate; this.oauthClients = oauthClients; - this.servicePrincipals = servicePrincipals; this.allowImpersonation = allowImpersonation; this.clockSkewSeconds = clockSkewSeconds; this.impersonationServiceUsers = impersonationServiceUsers; @@ -1005,40 +1002,6 @@ public Builder oauthClients(java.util.List oauthClients) { this.__explicitlySet__.add("oauthClients"); return this; } - /** - * The value of all the authorized OCI Service Principals. - *

- **SCIM++ Properties:** - * - idcsSearchable: false - * - multiValued: true - * - mutability: readWrite - * - required: false - * - returned: default - * - type: string - * - uniqueness: none - **/ - @com.fasterxml.jackson.annotation.JsonProperty("servicePrincipals") - private java.util.List servicePrincipals; - - /** - * The value of all the authorized OCI Service Principals. - *

- **SCIM++ Properties:** - * - idcsSearchable: false - * - multiValued: true - * - mutability: readWrite - * - required: false - * - returned: default - * - type: string - * - uniqueness: none - * @param servicePrincipals the value to set - * @return this builder - **/ - public Builder servicePrincipals(java.util.List servicePrincipals) { - this.servicePrincipals = servicePrincipals; - this.__explicitlySet__.add("servicePrincipals"); - return this; - } /** * Allow customers to define whether the resulting token should contain the authenticated user as the subject or whether the token should impersonate another Application Principal in IAM. *

@@ -1195,7 +1158,6 @@ public IdentityPropagationTrust build() { this.publicKeyEndpoint, this.publicCertificate, this.oauthClients, - this.servicePrincipals, this.allowImpersonation, this.clockSkewSeconds, this.impersonationServiceUsers, @@ -1289,9 +1251,6 @@ public Builder copy(IdentityPropagationTrust model) { if (model.wasPropertyExplicitlySet("oauthClients")) { this.oauthClients(model.getOauthClients()); } - if (model.wasPropertyExplicitlySet("servicePrincipals")) { - this.servicePrincipals(model.getServicePrincipals()); - } if (model.wasPropertyExplicitlySet("allowImpersonation")) { this.allowImpersonation(model.getAllowImpersonation()); } @@ -2257,38 +2216,6 @@ public java.util.List getOauthClients() { return oauthClients; } - /** - * The value of all the authorized OCI Service Principals. - *

- **SCIM++ Properties:** - * - idcsSearchable: false - * - multiValued: true - * - mutability: readWrite - * - required: false - * - returned: default - * - type: string - * - uniqueness: none - **/ - @com.fasterxml.jackson.annotation.JsonProperty("servicePrincipals") - private final java.util.List servicePrincipals; - - /** - * The value of all the authorized OCI Service Principals. - *

- **SCIM++ Properties:** - * - idcsSearchable: false - * - multiValued: true - * - mutability: readWrite - * - required: false - * - returned: default - * - type: string - * - uniqueness: none - * @return the value - **/ - public java.util.List getServicePrincipals() { - return servicePrincipals; - } - /** * Allow customers to define whether the resulting token should contain the authenticated user as the subject or whether the token should impersonate another Application Principal in IAM. *

@@ -2446,7 +2373,6 @@ public String toString(boolean includeByteArrayContents) { sb.append(", publicKeyEndpoint=").append(String.valueOf(this.publicKeyEndpoint)); sb.append(", publicCertificate=").append(String.valueOf(this.publicCertificate)); sb.append(", oauthClients=").append(String.valueOf(this.oauthClients)); - sb.append(", servicePrincipals=").append(String.valueOf(this.servicePrincipals)); sb.append(", allowImpersonation=").append(String.valueOf(this.allowImpersonation)); sb.append(", clockSkewSeconds=").append(String.valueOf(this.clockSkewSeconds)); sb.append(", impersonationServiceUsers=") @@ -2496,7 +2422,6 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.publicKeyEndpoint, other.publicKeyEndpoint) && java.util.Objects.equals(this.publicCertificate, other.publicCertificate) && java.util.Objects.equals(this.oauthClients, other.oauthClients) - && java.util.Objects.equals(this.servicePrincipals, other.servicePrincipals) && java.util.Objects.equals(this.allowImpersonation, other.allowImpersonation) && java.util.Objects.equals(this.clockSkewSeconds, other.clockSkewSeconds) && java.util.Objects.equals( @@ -2568,9 +2493,6 @@ public int hashCode() { (result * PRIME) + (this.publicCertificate == null ? 43 : this.publicCertificate.hashCode()); result = (result * PRIME) + (this.oauthClients == null ? 43 : this.oauthClients.hashCode()); - result = - (result * PRIME) - + (this.servicePrincipals == null ? 43 : this.servicePrincipals.hashCode()); result = (result * PRIME) + (this.allowImpersonation == null diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/IdentityProviderJitProvAssignedGroups.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/IdentityProviderJitProvAssignedGroups.java new file mode 100644 index 00000000000..67e0d4c0e46 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/IdentityProviderJitProvAssignedGroups.java @@ -0,0 +1,359 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.model; + +/** + * Lists the groups each social JIT-provisioned user is a member. Just-in-Time user-provisioning applies this static list when jitProvGroupStaticListEnabled:true. + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [value] + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: complex + * - uniqueness: none + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = IdentityProviderJitProvAssignedGroups.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class IdentityProviderJitProvAssignedGroups + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"value", "ref", "display"}) + public IdentityProviderJitProvAssignedGroups(String value, String ref, String display) { + super(); + this.value = value; + this.ref = ref; + this.display = display; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Group identifier + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + /** + * Group identifier + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @param value the value to set + * @return this builder + **/ + public Builder value(String value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + /** + * Group URI + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: reference + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("$ref") + private String ref; + + /** + * Group URI + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: reference + * - uniqueness: none + * @param ref the value to set + * @return this builder + **/ + public Builder ref(String ref) { + this.ref = ref; + this.__explicitlySet__.add("ref"); + return this; + } + /** + * A human readable name, primarily used for display purposes. READ-ONLY. + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("display") + private String display; + + /** + * A human readable name, primarily used for display purposes. READ-ONLY. + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + * @param display the value to set + * @return this builder + **/ + public Builder display(String display) { + this.display = display; + this.__explicitlySet__.add("display"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public IdentityProviderJitProvAssignedGroups build() { + IdentityProviderJitProvAssignedGroups model = + new IdentityProviderJitProvAssignedGroups(this.value, this.ref, this.display); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(IdentityProviderJitProvAssignedGroups model) { + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + if (model.wasPropertyExplicitlySet("ref")) { + this.ref(model.getRef()); + } + if (model.wasPropertyExplicitlySet("display")) { + this.display(model.getDisplay()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Group identifier + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final String value; + + /** + * Group identifier + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getValue() { + return value; + } + + /** + * Group URI + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: reference + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("$ref") + private final String ref; + + /** + * Group URI + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: reference + * - uniqueness: none + * @return the value + **/ + public String getRef() { + return ref; + } + + /** + * A human readable name, primarily used for display purposes. READ-ONLY. + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("display") + private final String display; + + /** + * A human readable name, primarily used for display purposes. READ-ONLY. + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getDisplay() { + return display; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("IdentityProviderJitProvAssignedGroups("); + sb.append("super=").append(super.toString()); + sb.append("value=").append(String.valueOf(this.value)); + sb.append(", ref=").append(String.valueOf(this.ref)); + sb.append(", display=").append(String.valueOf(this.display)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof IdentityProviderJitProvAssignedGroups)) { + return false; + } + + IdentityProviderJitProvAssignedGroups other = (IdentityProviderJitProvAssignedGroups) o; + return java.util.Objects.equals(this.value, other.value) + && java.util.Objects.equals(this.ref, other.ref) + && java.util.Objects.equals(this.display, other.display) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + result = (result * PRIME) + (this.ref == null ? 43 : this.ref.hashCode()); + result = (result * PRIME) + (this.display == null ? 43 : this.display.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OAuth2ClientCredential.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OAuth2ClientCredential.java index a64e1139696..b0f246e2298 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OAuth2ClientCredential.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OAuth2ClientCredential.java @@ -41,6 +41,7 @@ public final class OAuth2ClientCredential "status", "expiresOn", "isResetSecret", + "secret", "scopes", "user", "urnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser" @@ -64,6 +65,7 @@ public OAuth2ClientCredential( Status status, String expiresOn, Boolean isResetSecret, + String secret, java.util.List scopes, OAuth2ClientCredentialUser user, ExtensionSelfChangeUser urnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser) { @@ -86,6 +88,7 @@ public OAuth2ClientCredential( this.status = status; this.expiresOn = expiresOn; this.isResetSecret = isResetSecret; + this.secret = secret; this.scopes = scopes; this.user = user; this.urnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser = @@ -664,6 +667,40 @@ public Builder isResetSecret(Boolean isResetSecret) { this.__explicitlySet__.add("isResetSecret"); return this; } + /** + * Secret + *

+ **SCIM++ Properties:** + * - caseExact: false + * - type: string + * - mutability: readOnly + * - required: false + * - returned: default + * - idcsScimCompliant: false + * - idcsSensitive: hash_sc + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secret") + private String secret; + + /** + * Secret + *

+ **SCIM++ Properties:** + * - caseExact: false + * - type: string + * - mutability: readOnly + * - required: false + * - returned: default + * - idcsScimCompliant: false + * - idcsSensitive: hash_sc + * @param secret the value to set + * @return this builder + **/ + public Builder secret(String secret) { + this.secret = secret; + this.__explicitlySet__.add("secret"); + return this; + } /** * Scopes *

@@ -744,6 +781,7 @@ public OAuth2ClientCredential build() { this.status, this.expiresOn, this.isResetSecret, + this.secret, this.scopes, this.user, this.urnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser); @@ -809,6 +847,9 @@ public Builder copy(OAuth2ClientCredential model) { if (model.wasPropertyExplicitlySet("isResetSecret")) { this.isResetSecret(model.getIsResetSecret()); } + if (model.wasPropertyExplicitlySet("secret")) { + this.secret(model.getSecret()); + } if (model.wasPropertyExplicitlySet("scopes")) { this.scopes(model.getScopes()); } @@ -1427,6 +1468,38 @@ public Boolean getIsResetSecret() { return isResetSecret; } + /** + * Secret + *

+ **SCIM++ Properties:** + * - caseExact: false + * - type: string + * - mutability: readOnly + * - required: false + * - returned: default + * - idcsScimCompliant: false + * - idcsSensitive: hash_sc + **/ + @com.fasterxml.jackson.annotation.JsonProperty("secret") + private final String secret; + + /** + * Secret + *

+ **SCIM++ Properties:** + * - caseExact: false + * - type: string + * - mutability: readOnly + * - required: false + * - returned: default + * - idcsScimCompliant: false + * - idcsSensitive: hash_sc + * @return the value + **/ + public String getSecret() { + return secret; + } + /** * Scopes *

@@ -1508,6 +1581,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", status=").append(String.valueOf(this.status)); sb.append(", expiresOn=").append(String.valueOf(this.expiresOn)); sb.append(", isResetSecret=").append(String.valueOf(this.isResetSecret)); + sb.append(", secret=").append(String.valueOf(this.secret)); sb.append(", scopes=").append(String.valueOf(this.scopes)); sb.append(", user=").append(String.valueOf(this.user)); sb.append(", urnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser=") @@ -1548,6 +1622,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.status, other.status) && java.util.Objects.equals(this.expiresOn, other.expiresOn) && java.util.Objects.equals(this.isResetSecret, other.isResetSecret) + && java.util.Objects.equals(this.secret, other.secret) && java.util.Objects.equals(this.scopes, other.scopes) && java.util.Objects.equals(this.user, other.user) && java.util.Objects.equals( @@ -1598,6 +1673,7 @@ public int hashCode() { result = (result * PRIME) + (this.isResetSecret == null ? 43 : this.isResetSecret.hashCode()); + result = (result * PRIME) + (this.secret == null ? 43 : this.secret.hashCode()); result = (result * PRIME) + (this.scopes == null ? 43 : this.scopes.hashCode()); result = (result * PRIME) + (this.user == null ? 43 : this.user.hashCode()); result = diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OciConsoleSignOnPolicyConsent.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OciConsoleSignOnPolicyConsent.java new file mode 100644 index 00000000000..a45b7894092 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OciConsoleSignOnPolicyConsent.java @@ -0,0 +1,1606 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.model; + +/** + * The "Security Policy for OCI Console" sign-on policy consent resource used to record consents. The schema to record the "Security Policy for OCI Console" sign-on policy consent. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OciConsoleSignOnPolicyConsent.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OciConsoleSignOnPolicyConsent + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "ocid", + "schemas", + "meta", + "idcsCreatedBy", + "idcsLastModifiedBy", + "idcsPreventedOperations", + "tags", + "deleteInProgress", + "idcsLastUpgradedInRelease", + "domainOcid", + "compartmentOcid", + "tenancyOcid", + "consentSignedBy", + "modifiedResource", + "policyResource", + "changeType", + "clientIp", + "justification", + "reason", + "timeConsentSigned", + "notificationRecipients" + }) + public OciConsoleSignOnPolicyConsent( + String id, + String ocid, + java.util.List schemas, + Meta meta, + IdcsCreatedBy idcsCreatedBy, + IdcsLastModifiedBy idcsLastModifiedBy, + java.util.List idcsPreventedOperations, + java.util.List tags, + Boolean deleteInProgress, + String idcsLastUpgradedInRelease, + String domainOcid, + String compartmentOcid, + String tenancyOcid, + OciConsoleSignOnPolicyConsentConsentSignedBy consentSignedBy, + OciConsoleSignOnPolicyConsentModifiedResource modifiedResource, + OciConsoleSignOnPolicyConsentPolicyResource policyResource, + ChangeType changeType, + String clientIp, + String justification, + String reason, + String timeConsentSigned, + java.util.List notificationRecipients) { + super(); + this.id = id; + this.ocid = ocid; + this.schemas = schemas; + this.meta = meta; + this.idcsCreatedBy = idcsCreatedBy; + this.idcsLastModifiedBy = idcsLastModifiedBy; + this.idcsPreventedOperations = idcsPreventedOperations; + this.tags = tags; + this.deleteInProgress = deleteInProgress; + this.idcsLastUpgradedInRelease = idcsLastUpgradedInRelease; + this.domainOcid = domainOcid; + this.compartmentOcid = compartmentOcid; + this.tenancyOcid = tenancyOcid; + this.consentSignedBy = consentSignedBy; + this.modifiedResource = modifiedResource; + this.policyResource = policyResource; + this.changeType = changeType; + this.clientIp = clientIp; + this.justification = justification; + this.reason = reason; + this.timeConsentSigned = timeConsentSigned; + this.notificationRecipients = notificationRecipients; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: always + * - type: string + * - uniqueness: global + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: always + * - type: string + * - uniqueness: global + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Unique OCI identifier for the SCIM Resource. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: false + * - returned: default + * - type: string + * - uniqueness: global + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ocid") + private String ocid; + + /** + * Unique OCI identifier for the SCIM Resource. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: false + * - returned: default + * - type: string + * - uniqueness: global + * @param ocid the value to set + * @return this builder + **/ + public Builder ocid(String ocid) { + this.ocid = ocid; + this.__explicitlySet__.add("ocid"); + return this; + } + /** + * REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \\"enterprise\\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schemas") + private java.util.List schemas; + + /** + * REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \\"enterprise\\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @param schemas the value to set + * @return this builder + **/ + public Builder schemas(java.util.List schemas) { + this.schemas = schemas; + this.__explicitlySet__.add("schemas"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("meta") + private Meta meta; + + public Builder meta(Meta meta) { + this.meta = meta; + this.__explicitlySet__.add("meta"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("idcsCreatedBy") + private IdcsCreatedBy idcsCreatedBy; + + public Builder idcsCreatedBy(IdcsCreatedBy idcsCreatedBy) { + this.idcsCreatedBy = idcsCreatedBy; + this.__explicitlySet__.add("idcsCreatedBy"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("idcsLastModifiedBy") + private IdcsLastModifiedBy idcsLastModifiedBy; + + public Builder idcsLastModifiedBy(IdcsLastModifiedBy idcsLastModifiedBy) { + this.idcsLastModifiedBy = idcsLastModifiedBy; + this.__explicitlySet__.add("idcsLastModifiedBy"); + return this; + } + /** + * Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: true + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idcsPreventedOperations") + private java.util.List idcsPreventedOperations; + + /** + * Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: true + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + * @param idcsPreventedOperations the value to set + * @return this builder + **/ + public Builder idcsPreventedOperations( + java.util.List idcsPreventedOperations) { + this.idcsPreventedOperations = idcsPreventedOperations; + this.__explicitlySet__.add("idcsPreventedOperations"); + return this; + } + /** + * A list of tags on this resource. + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [key, value] + * - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] + * - idcsSearchable: true + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: request + * - type: complex + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tags") + private java.util.List tags; + + /** + * A list of tags on this resource. + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [key, value] + * - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] + * - idcsSearchable: true + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: request + * - type: complex + * - uniqueness: none + * @param tags the value to set + * @return this builder + **/ + public Builder tags(java.util.List tags) { + this.tags = tags; + this.__explicitlySet__.add("tags"); + return this; + } + /** + * A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deleteInProgress") + private Boolean deleteInProgress; + + /** + * A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * @param deleteInProgress the value to set + * @return this builder + **/ + public Builder deleteInProgress(Boolean deleteInProgress) { + this.deleteInProgress = deleteInProgress; + this.__explicitlySet__.add("deleteInProgress"); + return this; + } + /** + * The release number when the resource was upgraded. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idcsLastUpgradedInRelease") + private String idcsLastUpgradedInRelease; + + /** + * The release number when the resource was upgraded. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + * @param idcsLastUpgradedInRelease the value to set + * @return this builder + **/ + public Builder idcsLastUpgradedInRelease(String idcsLastUpgradedInRelease) { + this.idcsLastUpgradedInRelease = idcsLastUpgradedInRelease; + this.__explicitlySet__.add("idcsLastUpgradedInRelease"); + return this; + } + /** + * OCI Domain Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domainOcid") + private String domainOcid; + + /** + * OCI Domain Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @param domainOcid the value to set + * @return this builder + **/ + public Builder domainOcid(String domainOcid) { + this.domainOcid = domainOcid; + this.__explicitlySet__.add("domainOcid"); + return this; + } + /** + * OCI Compartment Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentOcid") + private String compartmentOcid; + + /** + * OCI Compartment Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @param compartmentOcid the value to set + * @return this builder + **/ + public Builder compartmentOcid(String compartmentOcid) { + this.compartmentOcid = compartmentOcid; + this.__explicitlySet__.add("compartmentOcid"); + return this; + } + /** + * OCI Tenant Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyOcid") + private String tenancyOcid; + + /** + * OCI Tenant Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @param tenancyOcid the value to set + * @return this builder + **/ + public Builder tenancyOcid(String tenancyOcid) { + this.tenancyOcid = tenancyOcid; + this.__explicitlySet__.add("tenancyOcid"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("consentSignedBy") + private OciConsoleSignOnPolicyConsentConsentSignedBy consentSignedBy; + + public Builder consentSignedBy( + OciConsoleSignOnPolicyConsentConsentSignedBy consentSignedBy) { + this.consentSignedBy = consentSignedBy; + this.__explicitlySet__.add("consentSignedBy"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("modifiedResource") + private OciConsoleSignOnPolicyConsentModifiedResource modifiedResource; + + public Builder modifiedResource( + OciConsoleSignOnPolicyConsentModifiedResource modifiedResource) { + this.modifiedResource = modifiedResource; + this.__explicitlySet__.add("modifiedResource"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("policyResource") + private OciConsoleSignOnPolicyConsentPolicyResource policyResource; + + public Builder policyResource(OciConsoleSignOnPolicyConsentPolicyResource policyResource) { + this.policyResource = policyResource; + this.__explicitlySet__.add("policyResource"); + return this; + } + /** + * Change Type - MODIFIED or RESTORED_TO_FACTORY_DEFAULT + *

+ **SCIM++ Properties:** + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("changeType") + private ChangeType changeType; + + /** + * Change Type - MODIFIED or RESTORED_TO_FACTORY_DEFAULT + *

+ **SCIM++ Properties:** + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @param changeType the value to set + * @return this builder + **/ + public Builder changeType(ChangeType changeType) { + this.changeType = changeType; + this.__explicitlySet__.add("changeType"); + return this; + } + /** + * Client IP of the Consent Signer + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clientIp") + private String clientIp; + + /** + * Client IP of the Consent Signer + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @param clientIp the value to set + * @return this builder + **/ + public Builder clientIp(String clientIp) { + this.clientIp = clientIp; + this.__explicitlySet__.add("clientIp"); + return this; + } + /** + * The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("justification") + private String justification; + + /** + * The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @param justification the value to set + * @return this builder + **/ + public Builder justification(String justification) { + this.justification = justification; + this.__explicitlySet__.add("justification"); + return this; + } + /** + * The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reason") + private String reason; + + /** + * The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @param reason the value to set + * @return this builder + **/ + public Builder reason(String reason) { + this.reason = reason; + this.__explicitlySet__.add("reason"); + return this; + } + /** + * Time when Consent was signed. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: dateTime + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeConsentSigned") + private String timeConsentSigned; + + /** + * Time when Consent was signed. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: dateTime + * - uniqueness: none + * @param timeConsentSigned the value to set + * @return this builder + **/ + public Builder timeConsentSigned(String timeConsentSigned) { + this.timeConsentSigned = timeConsentSigned; + this.__explicitlySet__.add("timeConsentSigned"); + return this; + } + /** + * The recipients of the email notification for the change in consent. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: true + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationRecipients") + private java.util.List notificationRecipients; + + /** + * The recipients of the email notification for the change in consent. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: true + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * @param notificationRecipients the value to set + * @return this builder + **/ + public Builder notificationRecipients(java.util.List notificationRecipients) { + this.notificationRecipients = notificationRecipients; + this.__explicitlySet__.add("notificationRecipients"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OciConsoleSignOnPolicyConsent build() { + OciConsoleSignOnPolicyConsent model = + new OciConsoleSignOnPolicyConsent( + this.id, + this.ocid, + this.schemas, + this.meta, + this.idcsCreatedBy, + this.idcsLastModifiedBy, + this.idcsPreventedOperations, + this.tags, + this.deleteInProgress, + this.idcsLastUpgradedInRelease, + this.domainOcid, + this.compartmentOcid, + this.tenancyOcid, + this.consentSignedBy, + this.modifiedResource, + this.policyResource, + this.changeType, + this.clientIp, + this.justification, + this.reason, + this.timeConsentSigned, + this.notificationRecipients); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OciConsoleSignOnPolicyConsent model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("ocid")) { + this.ocid(model.getOcid()); + } + if (model.wasPropertyExplicitlySet("schemas")) { + this.schemas(model.getSchemas()); + } + if (model.wasPropertyExplicitlySet("meta")) { + this.meta(model.getMeta()); + } + if (model.wasPropertyExplicitlySet("idcsCreatedBy")) { + this.idcsCreatedBy(model.getIdcsCreatedBy()); + } + if (model.wasPropertyExplicitlySet("idcsLastModifiedBy")) { + this.idcsLastModifiedBy(model.getIdcsLastModifiedBy()); + } + if (model.wasPropertyExplicitlySet("idcsPreventedOperations")) { + this.idcsPreventedOperations(model.getIdcsPreventedOperations()); + } + if (model.wasPropertyExplicitlySet("tags")) { + this.tags(model.getTags()); + } + if (model.wasPropertyExplicitlySet("deleteInProgress")) { + this.deleteInProgress(model.getDeleteInProgress()); + } + if (model.wasPropertyExplicitlySet("idcsLastUpgradedInRelease")) { + this.idcsLastUpgradedInRelease(model.getIdcsLastUpgradedInRelease()); + } + if (model.wasPropertyExplicitlySet("domainOcid")) { + this.domainOcid(model.getDomainOcid()); + } + if (model.wasPropertyExplicitlySet("compartmentOcid")) { + this.compartmentOcid(model.getCompartmentOcid()); + } + if (model.wasPropertyExplicitlySet("tenancyOcid")) { + this.tenancyOcid(model.getTenancyOcid()); + } + if (model.wasPropertyExplicitlySet("consentSignedBy")) { + this.consentSignedBy(model.getConsentSignedBy()); + } + if (model.wasPropertyExplicitlySet("modifiedResource")) { + this.modifiedResource(model.getModifiedResource()); + } + if (model.wasPropertyExplicitlySet("policyResource")) { + this.policyResource(model.getPolicyResource()); + } + if (model.wasPropertyExplicitlySet("changeType")) { + this.changeType(model.getChangeType()); + } + if (model.wasPropertyExplicitlySet("clientIp")) { + this.clientIp(model.getClientIp()); + } + if (model.wasPropertyExplicitlySet("justification")) { + this.justification(model.getJustification()); + } + if (model.wasPropertyExplicitlySet("reason")) { + this.reason(model.getReason()); + } + if (model.wasPropertyExplicitlySet("timeConsentSigned")) { + this.timeConsentSigned(model.getTimeConsentSigned()); + } + if (model.wasPropertyExplicitlySet("notificationRecipients")) { + this.notificationRecipients(model.getNotificationRecipients()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: always + * - type: string + * - uniqueness: global + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: always + * - type: string + * - uniqueness: global + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Unique OCI identifier for the SCIM Resource. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: false + * - returned: default + * - type: string + * - uniqueness: global + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ocid") + private final String ocid; + + /** + * Unique OCI identifier for the SCIM Resource. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: false + * - returned: default + * - type: string + * - uniqueness: global + * @return the value + **/ + public String getOcid() { + return ocid; + } + + /** + * REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \\"enterprise\\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schemas") + private final java.util.List schemas; + + /** + * REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \\"enterprise\\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public java.util.List getSchemas() { + return schemas; + } + + @com.fasterxml.jackson.annotation.JsonProperty("meta") + private final Meta meta; + + public Meta getMeta() { + return meta; + } + + @com.fasterxml.jackson.annotation.JsonProperty("idcsCreatedBy") + private final IdcsCreatedBy idcsCreatedBy; + + public IdcsCreatedBy getIdcsCreatedBy() { + return idcsCreatedBy; + } + + @com.fasterxml.jackson.annotation.JsonProperty("idcsLastModifiedBy") + private final IdcsLastModifiedBy idcsLastModifiedBy; + + public IdcsLastModifiedBy getIdcsLastModifiedBy() { + return idcsLastModifiedBy; + } + + /** + * Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: true + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idcsPreventedOperations") + private final java.util.List idcsPreventedOperations; + + /** + * Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: true + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + * @return the value + **/ + public java.util.List getIdcsPreventedOperations() { + return idcsPreventedOperations; + } + + /** + * A list of tags on this resource. + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [key, value] + * - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] + * - idcsSearchable: true + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: request + * - type: complex + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tags") + private final java.util.List tags; + + /** + * A list of tags on this resource. + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [key, value] + * - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] + * - idcsSearchable: true + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: request + * - type: complex + * - uniqueness: none + * @return the value + **/ + public java.util.List getTags() { + return tags; + } + + /** + * A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deleteInProgress") + private final Boolean deleteInProgress; + + /** + * A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * @return the value + **/ + public Boolean getDeleteInProgress() { + return deleteInProgress; + } + + /** + * The release number when the resource was upgraded. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idcsLastUpgradedInRelease") + private final String idcsLastUpgradedInRelease; + + /** + * The release number when the resource was upgraded. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getIdcsLastUpgradedInRelease() { + return idcsLastUpgradedInRelease; + } + + /** + * OCI Domain Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domainOcid") + private final String domainOcid; + + /** + * OCI Domain Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getDomainOcid() { + return domainOcid; + } + + /** + * OCI Compartment Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentOcid") + private final String compartmentOcid; + + /** + * OCI Compartment Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getCompartmentOcid() { + return compartmentOcid; + } + + /** + * OCI Tenant Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyOcid") + private final String tenancyOcid; + + /** + * OCI Tenant Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getTenancyOcid() { + return tenancyOcid; + } + + @com.fasterxml.jackson.annotation.JsonProperty("consentSignedBy") + private final OciConsoleSignOnPolicyConsentConsentSignedBy consentSignedBy; + + public OciConsoleSignOnPolicyConsentConsentSignedBy getConsentSignedBy() { + return consentSignedBy; + } + + @com.fasterxml.jackson.annotation.JsonProperty("modifiedResource") + private final OciConsoleSignOnPolicyConsentModifiedResource modifiedResource; + + public OciConsoleSignOnPolicyConsentModifiedResource getModifiedResource() { + return modifiedResource; + } + + @com.fasterxml.jackson.annotation.JsonProperty("policyResource") + private final OciConsoleSignOnPolicyConsentPolicyResource policyResource; + + public OciConsoleSignOnPolicyConsentPolicyResource getPolicyResource() { + return policyResource; + } + + /** + * Change Type - MODIFIED or RESTORED_TO_FACTORY_DEFAULT + *

+ **SCIM++ Properties:** + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + public enum ChangeType { + Modified("MODIFIED"), + RestoredToFactoryDefault("RESTORED_TO_FACTORY_DEFAULT"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ChangeType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ChangeType v : ChangeType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ChangeType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ChangeType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ChangeType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Change Type - MODIFIED or RESTORED_TO_FACTORY_DEFAULT + *

+ **SCIM++ Properties:** + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("changeType") + private final ChangeType changeType; + + /** + * Change Type - MODIFIED or RESTORED_TO_FACTORY_DEFAULT + *

+ **SCIM++ Properties:** + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public ChangeType getChangeType() { + return changeType; + } + + /** + * Client IP of the Consent Signer + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clientIp") + private final String clientIp; + + /** + * Client IP of the Consent Signer + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getClientIp() { + return clientIp; + } + + /** + * The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("justification") + private final String justification; + + /** + * The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getJustification() { + return justification; + } + + /** + * The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reason") + private final String reason; + + /** + * The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getReason() { + return reason; + } + + /** + * Time when Consent was signed. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: dateTime + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeConsentSigned") + private final String timeConsentSigned; + + /** + * Time when Consent was signed. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: dateTime + * - uniqueness: none + * @return the value + **/ + public String getTimeConsentSigned() { + return timeConsentSigned; + } + + /** + * The recipients of the email notification for the change in consent. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: true + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("notificationRecipients") + private final java.util.List notificationRecipients; + + /** + * The recipients of the email notification for the change in consent. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: true + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * @return the value + **/ + public java.util.List getNotificationRecipients() { + return notificationRecipients; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OciConsoleSignOnPolicyConsent("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", ocid=").append(String.valueOf(this.ocid)); + sb.append(", schemas=").append(String.valueOf(this.schemas)); + sb.append(", meta=").append(String.valueOf(this.meta)); + sb.append(", idcsCreatedBy=").append(String.valueOf(this.idcsCreatedBy)); + sb.append(", idcsLastModifiedBy=").append(String.valueOf(this.idcsLastModifiedBy)); + sb.append(", idcsPreventedOperations=") + .append(String.valueOf(this.idcsPreventedOperations)); + sb.append(", tags=").append(String.valueOf(this.tags)); + sb.append(", deleteInProgress=").append(String.valueOf(this.deleteInProgress)); + sb.append(", idcsLastUpgradedInRelease=") + .append(String.valueOf(this.idcsLastUpgradedInRelease)); + sb.append(", domainOcid=").append(String.valueOf(this.domainOcid)); + sb.append(", compartmentOcid=").append(String.valueOf(this.compartmentOcid)); + sb.append(", tenancyOcid=").append(String.valueOf(this.tenancyOcid)); + sb.append(", consentSignedBy=").append(String.valueOf(this.consentSignedBy)); + sb.append(", modifiedResource=").append(String.valueOf(this.modifiedResource)); + sb.append(", policyResource=").append(String.valueOf(this.policyResource)); + sb.append(", changeType=").append(String.valueOf(this.changeType)); + sb.append(", clientIp=").append(String.valueOf(this.clientIp)); + sb.append(", justification=").append(String.valueOf(this.justification)); + sb.append(", reason=").append(String.valueOf(this.reason)); + sb.append(", timeConsentSigned=").append(String.valueOf(this.timeConsentSigned)); + sb.append(", notificationRecipients=").append(String.valueOf(this.notificationRecipients)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OciConsoleSignOnPolicyConsent)) { + return false; + } + + OciConsoleSignOnPolicyConsent other = (OciConsoleSignOnPolicyConsent) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.ocid, other.ocid) + && java.util.Objects.equals(this.schemas, other.schemas) + && java.util.Objects.equals(this.meta, other.meta) + && java.util.Objects.equals(this.idcsCreatedBy, other.idcsCreatedBy) + && java.util.Objects.equals(this.idcsLastModifiedBy, other.idcsLastModifiedBy) + && java.util.Objects.equals( + this.idcsPreventedOperations, other.idcsPreventedOperations) + && java.util.Objects.equals(this.tags, other.tags) + && java.util.Objects.equals(this.deleteInProgress, other.deleteInProgress) + && java.util.Objects.equals( + this.idcsLastUpgradedInRelease, other.idcsLastUpgradedInRelease) + && java.util.Objects.equals(this.domainOcid, other.domainOcid) + && java.util.Objects.equals(this.compartmentOcid, other.compartmentOcid) + && java.util.Objects.equals(this.tenancyOcid, other.tenancyOcid) + && java.util.Objects.equals(this.consentSignedBy, other.consentSignedBy) + && java.util.Objects.equals(this.modifiedResource, other.modifiedResource) + && java.util.Objects.equals(this.policyResource, other.policyResource) + && java.util.Objects.equals(this.changeType, other.changeType) + && java.util.Objects.equals(this.clientIp, other.clientIp) + && java.util.Objects.equals(this.justification, other.justification) + && java.util.Objects.equals(this.reason, other.reason) + && java.util.Objects.equals(this.timeConsentSigned, other.timeConsentSigned) + && java.util.Objects.equals( + this.notificationRecipients, other.notificationRecipients) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.ocid == null ? 43 : this.ocid.hashCode()); + result = (result * PRIME) + (this.schemas == null ? 43 : this.schemas.hashCode()); + result = (result * PRIME) + (this.meta == null ? 43 : this.meta.hashCode()); + result = + (result * PRIME) + + (this.idcsCreatedBy == null ? 43 : this.idcsCreatedBy.hashCode()); + result = + (result * PRIME) + + (this.idcsLastModifiedBy == null + ? 43 + : this.idcsLastModifiedBy.hashCode()); + result = + (result * PRIME) + + (this.idcsPreventedOperations == null + ? 43 + : this.idcsPreventedOperations.hashCode()); + result = (result * PRIME) + (this.tags == null ? 43 : this.tags.hashCode()); + result = + (result * PRIME) + + (this.deleteInProgress == null ? 43 : this.deleteInProgress.hashCode()); + result = + (result * PRIME) + + (this.idcsLastUpgradedInRelease == null + ? 43 + : this.idcsLastUpgradedInRelease.hashCode()); + result = (result * PRIME) + (this.domainOcid == null ? 43 : this.domainOcid.hashCode()); + result = + (result * PRIME) + + (this.compartmentOcid == null ? 43 : this.compartmentOcid.hashCode()); + result = (result * PRIME) + (this.tenancyOcid == null ? 43 : this.tenancyOcid.hashCode()); + result = + (result * PRIME) + + (this.consentSignedBy == null ? 43 : this.consentSignedBy.hashCode()); + result = + (result * PRIME) + + (this.modifiedResource == null ? 43 : this.modifiedResource.hashCode()); + result = + (result * PRIME) + + (this.policyResource == null ? 43 : this.policyResource.hashCode()); + result = (result * PRIME) + (this.changeType == null ? 43 : this.changeType.hashCode()); + result = (result * PRIME) + (this.clientIp == null ? 43 : this.clientIp.hashCode()); + result = + (result * PRIME) + + (this.justification == null ? 43 : this.justification.hashCode()); + result = (result * PRIME) + (this.reason == null ? 43 : this.reason.hashCode()); + result = + (result * PRIME) + + (this.timeConsentSigned == null ? 43 : this.timeConsentSigned.hashCode()); + result = + (result * PRIME) + + (this.notificationRecipients == null + ? 43 + : this.notificationRecipients.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OciConsoleSignOnPolicyConsentConsentSignedBy.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OciConsoleSignOnPolicyConsentConsentSignedBy.java new file mode 100644 index 00000000000..d78e3ea7b3a --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OciConsoleSignOnPolicyConsentConsentSignedBy.java @@ -0,0 +1,454 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.model; + +/** + * User or App that signs the consent. + *

+ **SCIM++ Properties:** + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: complex + * - uniqueness: none + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OciConsoleSignOnPolicyConsentConsentSignedBy.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OciConsoleSignOnPolicyConsentConsentSignedBy + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"value", "ocid", "displayName", "type"}) + public OciConsoleSignOnPolicyConsentConsentSignedBy( + String value, String ocid, String displayName, Type type) { + super(); + this.value = value; + this.ocid = ocid; + this.displayName = displayName; + this.type = type; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Id of the User or App that signed consent. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + /** + * Id of the User or App that signed consent. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * @param value the value to set + * @return this builder + **/ + public Builder value(String value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + /** + * OCID of the User or App that signed consent. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ocid") + private String ocid; + + /** + * OCID of the User or App that signed consent. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * @param ocid the value to set + * @return this builder + **/ + public Builder ocid(String ocid) { + this.ocid = ocid; + this.__explicitlySet__.add("ocid"); + return this; + } + /** + * Name of the User or App that signed consent. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * Name of the User or App that signed consent. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * Type of principal that signed consent: User or App. + *

+ **SCIM++ Properties:** + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * Type of principal that signed consent: User or App. + *

+ **SCIM++ Properties:** + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OciConsoleSignOnPolicyConsentConsentSignedBy build() { + OciConsoleSignOnPolicyConsentConsentSignedBy model = + new OciConsoleSignOnPolicyConsentConsentSignedBy( + this.value, this.ocid, this.displayName, this.type); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OciConsoleSignOnPolicyConsentConsentSignedBy model) { + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + if (model.wasPropertyExplicitlySet("ocid")) { + this.ocid(model.getOcid()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Id of the User or App that signed consent. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final String value; + + /** + * Id of the User or App that signed consent. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * @return the value + **/ + public String getValue() { + return value; + } + + /** + * OCID of the User or App that signed consent. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ocid") + private final String ocid; + + /** + * OCID of the User or App that signed consent. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * @return the value + **/ + public String getOcid() { + return ocid; + } + + /** + * Name of the User or App that signed consent. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * Name of the User or App that signed consent. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * Type of principal that signed consent: User or App. + *

+ **SCIM++ Properties:** + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + **/ + public enum Type { + User("User"), + App("App"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * Type of principal that signed consent: User or App. + *

+ **SCIM++ Properties:** + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * Type of principal that signed consent: User or App. + *

+ **SCIM++ Properties:** + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * @return the value + **/ + public Type getType() { + return type; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OciConsoleSignOnPolicyConsentConsentSignedBy("); + sb.append("super=").append(super.toString()); + sb.append("value=").append(String.valueOf(this.value)); + sb.append(", ocid=").append(String.valueOf(this.ocid)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OciConsoleSignOnPolicyConsentConsentSignedBy)) { + return false; + } + + OciConsoleSignOnPolicyConsentConsentSignedBy other = + (OciConsoleSignOnPolicyConsentConsentSignedBy) o; + return java.util.Objects.equals(this.value, other.value) + && java.util.Objects.equals(this.ocid, other.ocid) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.type, other.type) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + result = (result * PRIME) + (this.ocid == null ? 43 : this.ocid.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OciConsoleSignOnPolicyConsentModifiedResource.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OciConsoleSignOnPolicyConsentModifiedResource.java new file mode 100644 index 00000000000..761c8addf8f --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OciConsoleSignOnPolicyConsentModifiedResource.java @@ -0,0 +1,392 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.model; + +/** + * The modified Policy, Rule, ConditionGroup or Condition during consent signing. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: complex + * - uniqueness: none + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OciConsoleSignOnPolicyConsentModifiedResource.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OciConsoleSignOnPolicyConsentModifiedResource + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"value", "ocid", "type"}) + public OciConsoleSignOnPolicyConsentModifiedResource(String value, String ocid, Type type) { + super(); + this.value = value; + this.ocid = ocid; + this.type = type; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Modified Policy, Rule, ConditionGroup or Condition Id. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + /** + * Modified Policy, Rule, ConditionGroup or Condition Id. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * @param value the value to set + * @return this builder + **/ + public Builder value(String value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + /** + * The modified Policy, Rule, ConditionGroup, or Condition OCID. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ocid") + private String ocid; + + /** + * The modified Policy, Rule, ConditionGroup, or Condition OCID. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * @param ocid the value to set + * @return this builder + **/ + public Builder ocid(String ocid) { + this.ocid = ocid; + this.__explicitlySet__.add("ocid"); + return this; + } + /** + * The Modified Resource type - Policy, Rule, ConditionGroup, or Condition. A label that indicates the resource type. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - idcsDefaultValue: Policy + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private Type type; + + /** + * The Modified Resource type - Policy, Rule, ConditionGroup, or Condition. A label that indicates the resource type. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - idcsDefaultValue: Policy + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @param type the value to set + * @return this builder + **/ + public Builder type(Type type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OciConsoleSignOnPolicyConsentModifiedResource build() { + OciConsoleSignOnPolicyConsentModifiedResource model = + new OciConsoleSignOnPolicyConsentModifiedResource( + this.value, this.ocid, this.type); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OciConsoleSignOnPolicyConsentModifiedResource model) { + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + if (model.wasPropertyExplicitlySet("ocid")) { + this.ocid(model.getOcid()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Modified Policy, Rule, ConditionGroup or Condition Id. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final String value; + + /** + * Modified Policy, Rule, ConditionGroup or Condition Id. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * @return the value + **/ + public String getValue() { + return value; + } + + /** + * The modified Policy, Rule, ConditionGroup, or Condition OCID. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ocid") + private final String ocid; + + /** + * The modified Policy, Rule, ConditionGroup, or Condition OCID. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * @return the value + **/ + public String getOcid() { + return ocid; + } + + /** + * The Modified Resource type - Policy, Rule, ConditionGroup, or Condition. A label that indicates the resource type. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - idcsDefaultValue: Policy + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + public enum Type { + Policy("Policy"), + Rule("Rule"), + ConditionGroup("ConditionGroup"), + Condition("Condition"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Type.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Type v : Type.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Type(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Type create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Type', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * The Modified Resource type - Policy, Rule, ConditionGroup, or Condition. A label that indicates the resource type. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - idcsDefaultValue: Policy + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final Type type; + + /** + * The Modified Resource type - Policy, Rule, ConditionGroup, or Condition. A label that indicates the resource type. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - idcsDefaultValue: Policy + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public Type getType() { + return type; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OciConsoleSignOnPolicyConsentModifiedResource("); + sb.append("super=").append(super.toString()); + sb.append("value=").append(String.valueOf(this.value)); + sb.append(", ocid=").append(String.valueOf(this.ocid)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OciConsoleSignOnPolicyConsentModifiedResource)) { + return false; + } + + OciConsoleSignOnPolicyConsentModifiedResource other = + (OciConsoleSignOnPolicyConsentModifiedResource) o; + return java.util.Objects.equals(this.value, other.value) + && java.util.Objects.equals(this.ocid, other.ocid) + && java.util.Objects.equals(this.type, other.type) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + result = (result * PRIME) + (this.ocid == null ? 43 : this.ocid.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OciConsoleSignOnPolicyConsentPolicyResource.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OciConsoleSignOnPolicyConsentPolicyResource.java new file mode 100644 index 00000000000..f8b9d924ce5 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OciConsoleSignOnPolicyConsentPolicyResource.java @@ -0,0 +1,256 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.model; + +/** + * Policy Resource + *

+ **SCIM++ Properties:** + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: complex + * - uniqueness: none + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OciConsoleSignOnPolicyConsentPolicyResource.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OciConsoleSignOnPolicyConsentPolicyResource + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"value", "ocid"}) + public OciConsoleSignOnPolicyConsentPolicyResource(String value, String ocid) { + super(); + this.value = value; + this.ocid = ocid; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Policy Resource Id + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + /** + * Policy Resource Id + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * @param value the value to set + * @return this builder + **/ + public Builder value(String value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + /** + * Policy Resource Ocid + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ocid") + private String ocid; + + /** + * Policy Resource Ocid + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * @param ocid the value to set + * @return this builder + **/ + public Builder ocid(String ocid) { + this.ocid = ocid; + this.__explicitlySet__.add("ocid"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OciConsoleSignOnPolicyConsentPolicyResource build() { + OciConsoleSignOnPolicyConsentPolicyResource model = + new OciConsoleSignOnPolicyConsentPolicyResource(this.value, this.ocid); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OciConsoleSignOnPolicyConsentPolicyResource model) { + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + if (model.wasPropertyExplicitlySet("ocid")) { + this.ocid(model.getOcid()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Policy Resource Id + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final String value; + + /** + * Policy Resource Id + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * @return the value + **/ + public String getValue() { + return value; + } + + /** + * Policy Resource Ocid + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ocid") + private final String ocid; + + /** + * Policy Resource Ocid + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * @return the value + **/ + public String getOcid() { + return ocid; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OciConsoleSignOnPolicyConsentPolicyResource("); + sb.append("super=").append(super.toString()); + sb.append("value=").append(String.valueOf(this.value)); + sb.append(", ocid=").append(String.valueOf(this.ocid)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OciConsoleSignOnPolicyConsentPolicyResource)) { + return false; + } + + OciConsoleSignOnPolicyConsentPolicyResource other = + (OciConsoleSignOnPolicyConsentPolicyResource) o; + return java.util.Objects.equals(this.value, other.value) + && java.util.Objects.equals(this.ocid, other.ocid) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + result = (result * PRIME) + (this.ocid == null ? 43 : this.ocid.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OciConsoleSignOnPolicyConsentSearchRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OciConsoleSignOnPolicyConsentSearchRequest.java new file mode 100644 index 00000000000..c340bfa7560 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OciConsoleSignOnPolicyConsentSearchRequest.java @@ -0,0 +1,424 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.model; + +/** + * Clients MAY execute queries without passing parameters on the URL by using the HTTP POST verb combined with the **.search** path extension. The inclusion of **.search** on the end of a valid SCIM endpoint SHALL be used to indicate the HTTP POST verb is intended to be a query operation. To create a new query result set, a SCIM client sends an HTTP POST request to the desired SCIM resource endpoint (ending in **.search**). The body of the POST request MAY include any of the parameters. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OciConsoleSignOnPolicyConsentSearchRequest.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OciConsoleSignOnPolicyConsentSearchRequest + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "schemas", + "attributes", + "attributeSets", + "filter", + "sortBy", + "sortOrder", + "startIndex", + "count" + }) + public OciConsoleSignOnPolicyConsentSearchRequest( + java.util.List schemas, + java.util.List attributes, + java.util.List attributeSets, + String filter, + String sortBy, + SortOrder sortOrder, + Integer startIndex, + Integer count) { + super(); + this.schemas = schemas; + this.attributes = attributes; + this.attributeSets = attributeSets; + this.filter = filter; + this.sortBy = sortBy; + this.sortOrder = sortOrder; + this.startIndex = startIndex; + this.count = count; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schemas") + private java.util.List schemas; + + /** + * The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + * @param schemas the value to set + * @return this builder + **/ + public Builder schemas(java.util.List schemas) { + this.schemas = schemas; + this.__explicitlySet__.add("schemas"); + return this; + } + /** + * A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation ([Section 3.10](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See ([additional retrieval query parameters](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attributes") + private java.util.List attributes; + + /** + * A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation ([Section 3.10](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See ([additional retrieval query parameters](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + * @param attributes the value to set + * @return this builder + **/ + public Builder attributes(java.util.List attributes) { + this.attributes = attributes; + this.__explicitlySet__.add("attributes"); + return this; + } + /** + * A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attributeSets") + private java.util.List attributeSets; + + /** + * A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + * @param attributeSets the value to set + * @return this builder + **/ + public Builder attributeSets(java.util.List attributeSets) { + this.attributeSets = attributeSets; + this.__explicitlySet__.add("attributeSets"); + return this; + } + /** + * The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See [Section 3.4.2.2](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("filter") + private String filter; + + /** + * The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See [Section 3.4.2.2](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2). OPTIONAL. + * @param filter the value to set + * @return this builder + **/ + public Builder filter(String filter) { + this.filter = filter; + this.__explicitlySet__.add("filter"); + return this; + } + /** + * A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation ([Section 3.10](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See [Sorting section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sortBy") + private String sortBy; + + /** + * A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation ([Section 3.10](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See [Sorting section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3). OPTIONAL. + * @param sortBy the value to set + * @return this builder + **/ + public Builder sortBy(String sortBy) { + this.sortBy = sortBy; + this.__explicitlySet__.add("sortBy"); + return this; + } + /** + * A string that indicates the order in which the sortBy parameter is applied. Allowed values are "ascending" and "descending". See ([Sorting Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sortOrder") + private SortOrder sortOrder; + + /** + * A string that indicates the order in which the sortBy parameter is applied. Allowed values are "ascending" and "descending". See ([Sorting Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + * @param sortOrder the value to set + * @return this builder + **/ + public Builder sortOrder(SortOrder sortOrder) { + this.sortOrder = sortOrder; + this.__explicitlySet__.add("sortOrder"); + return this; + } + /** + * An integer that indicates the 1-based index of the first query result. See [Pagination Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startIndex") + private Integer startIndex; + + /** + * An integer that indicates the 1-based index of the first query result. See [Pagination Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4). OPTIONAL. + * @param startIndex the value to set + * @return this builder + **/ + public Builder startIndex(Integer startIndex) { + this.startIndex = startIndex; + this.__explicitlySet__.add("startIndex"); + return this; + } + /** + * An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. ([Section 3.4.2.4](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4)). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("count") + private Integer count; + + /** + * An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. ([Section 3.4.2.4](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4)). OPTIONAL. + * @param count the value to set + * @return this builder + **/ + public Builder count(Integer count) { + this.count = count; + this.__explicitlySet__.add("count"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OciConsoleSignOnPolicyConsentSearchRequest build() { + OciConsoleSignOnPolicyConsentSearchRequest model = + new OciConsoleSignOnPolicyConsentSearchRequest( + this.schemas, + this.attributes, + this.attributeSets, + this.filter, + this.sortBy, + this.sortOrder, + this.startIndex, + this.count); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OciConsoleSignOnPolicyConsentSearchRequest model) { + if (model.wasPropertyExplicitlySet("schemas")) { + this.schemas(model.getSchemas()); + } + if (model.wasPropertyExplicitlySet("attributes")) { + this.attributes(model.getAttributes()); + } + if (model.wasPropertyExplicitlySet("attributeSets")) { + this.attributeSets(model.getAttributeSets()); + } + if (model.wasPropertyExplicitlySet("filter")) { + this.filter(model.getFilter()); + } + if (model.wasPropertyExplicitlySet("sortBy")) { + this.sortBy(model.getSortBy()); + } + if (model.wasPropertyExplicitlySet("sortOrder")) { + this.sortOrder(model.getSortOrder()); + } + if (model.wasPropertyExplicitlySet("startIndex")) { + this.startIndex(model.getStartIndex()); + } + if (model.wasPropertyExplicitlySet("count")) { + this.count(model.getCount()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schemas") + private final java.util.List schemas; + + /** + * The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + * @return the value + **/ + public java.util.List getSchemas() { + return schemas; + } + + /** + * A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation ([Section 3.10](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See ([additional retrieval query parameters](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attributes") + private final java.util.List attributes; + + /** + * A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation ([Section 3.10](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See ([additional retrieval query parameters](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + * @return the value + **/ + public java.util.List getAttributes() { + return attributes; + } + + /** + * A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attributeSets") + private final java.util.List attributeSets; + + /** + * A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + * @return the value + **/ + public java.util.List getAttributeSets() { + return attributeSets; + } + + /** + * The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See [Section 3.4.2.2](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("filter") + private final String filter; + + /** + * The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See [Section 3.4.2.2](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2). OPTIONAL. + * @return the value + **/ + public String getFilter() { + return filter; + } + + /** + * A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation ([Section 3.10](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See [Sorting section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sortBy") + private final String sortBy; + + /** + * A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation ([Section 3.10](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See [Sorting section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3). OPTIONAL. + * @return the value + **/ + public String getSortBy() { + return sortBy; + } + + /** + * A string that indicates the order in which the sortBy parameter is applied. Allowed values are "ascending" and "descending". See ([Sorting Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sortOrder") + private final SortOrder sortOrder; + + /** + * A string that indicates the order in which the sortBy parameter is applied. Allowed values are "ascending" and "descending". See ([Sorting Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + * @return the value + **/ + public SortOrder getSortOrder() { + return sortOrder; + } + + /** + * An integer that indicates the 1-based index of the first query result. See [Pagination Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startIndex") + private final Integer startIndex; + + /** + * An integer that indicates the 1-based index of the first query result. See [Pagination Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4). OPTIONAL. + * @return the value + **/ + public Integer getStartIndex() { + return startIndex; + } + + /** + * An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. ([Section 3.4.2.4](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4)). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("count") + private final Integer count; + + /** + * An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. ([Section 3.4.2.4](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4)). OPTIONAL. + * @return the value + **/ + public Integer getCount() { + return count; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OciConsoleSignOnPolicyConsentSearchRequest("); + sb.append("super=").append(super.toString()); + sb.append("schemas=").append(String.valueOf(this.schemas)); + sb.append(", attributes=").append(String.valueOf(this.attributes)); + sb.append(", attributeSets=").append(String.valueOf(this.attributeSets)); + sb.append(", filter=").append(String.valueOf(this.filter)); + sb.append(", sortBy=").append(String.valueOf(this.sortBy)); + sb.append(", sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(", startIndex=").append(String.valueOf(this.startIndex)); + sb.append(", count=").append(String.valueOf(this.count)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OciConsoleSignOnPolicyConsentSearchRequest)) { + return false; + } + + OciConsoleSignOnPolicyConsentSearchRequest other = + (OciConsoleSignOnPolicyConsentSearchRequest) o; + return java.util.Objects.equals(this.schemas, other.schemas) + && java.util.Objects.equals(this.attributes, other.attributes) + && java.util.Objects.equals(this.attributeSets, other.attributeSets) + && java.util.Objects.equals(this.filter, other.filter) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.startIndex, other.startIndex) + && java.util.Objects.equals(this.count, other.count) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.schemas == null ? 43 : this.schemas.hashCode()); + result = (result * PRIME) + (this.attributes == null ? 43 : this.attributes.hashCode()); + result = + (result * PRIME) + + (this.attributeSets == null ? 43 : this.attributeSets.hashCode()); + result = (result * PRIME) + (this.filter == null ? 43 : this.filter.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.startIndex == null ? 43 : this.startIndex.hashCode()); + result = (result * PRIME) + (this.count == null ? 43 : this.count.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OciConsoleSignOnPolicyConsents.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OciConsoleSignOnPolicyConsents.java new file mode 100644 index 00000000000..fbac42be2eb --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/OciConsoleSignOnPolicyConsents.java @@ -0,0 +1,301 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.model; + +/** + * The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OciConsoleSignOnPolicyConsents.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OciConsoleSignOnPolicyConsents + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "schemas", + "totalResults", + "resources", + "startIndex", + "itemsPerPage" + }) + public OciConsoleSignOnPolicyConsents( + java.util.List schemas, + Integer totalResults, + java.util.List resources, + Integer startIndex, + Integer itemsPerPage) { + super(); + this.schemas = schemas; + this.totalResults = totalResults; + this.resources = resources; + this.startIndex = startIndex; + this.itemsPerPage = itemsPerPage; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schemas") + private java.util.List schemas; + + /** + * The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + * @param schemas the value to set + * @return this builder + **/ + public Builder schemas(java.util.List schemas) { + this.schemas = schemas; + this.__explicitlySet__.add("schemas"); + return this; + } + /** + * The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalResults") + private Integer totalResults; + + /** + * The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + * @param totalResults the value to set + * @return this builder + **/ + public Builder totalResults(Integer totalResults) { + this.totalResults = totalResults; + this.__explicitlySet__.add("totalResults"); + return this; + } + /** + * A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("Resources") + private java.util.List resources; + + /** + * A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + * @param resources the value to set + * @return this builder + **/ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** + * The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startIndex") + private Integer startIndex; + + /** + * The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + * @param startIndex the value to set + * @return this builder + **/ + public Builder startIndex(Integer startIndex) { + this.startIndex = startIndex; + this.__explicitlySet__.add("startIndex"); + return this; + } + /** + * The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("itemsPerPage") + private Integer itemsPerPage; + + /** + * The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + * @param itemsPerPage the value to set + * @return this builder + **/ + public Builder itemsPerPage(Integer itemsPerPage) { + this.itemsPerPage = itemsPerPage; + this.__explicitlySet__.add("itemsPerPage"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OciConsoleSignOnPolicyConsents build() { + OciConsoleSignOnPolicyConsents model = + new OciConsoleSignOnPolicyConsents( + this.schemas, + this.totalResults, + this.resources, + this.startIndex, + this.itemsPerPage); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OciConsoleSignOnPolicyConsents model) { + if (model.wasPropertyExplicitlySet("schemas")) { + this.schemas(model.getSchemas()); + } + if (model.wasPropertyExplicitlySet("totalResults")) { + this.totalResults(model.getTotalResults()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("startIndex")) { + this.startIndex(model.getStartIndex()); + } + if (model.wasPropertyExplicitlySet("itemsPerPage")) { + this.itemsPerPage(model.getItemsPerPage()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schemas") + private final java.util.List schemas; + + /** + * The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + * @return the value + **/ + public java.util.List getSchemas() { + return schemas; + } + + /** + * The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalResults") + private final Integer totalResults; + + /** + * The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + * @return the value + **/ + public Integer getTotalResults() { + return totalResults; + } + + /** + * A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("Resources") + private final java.util.List resources; + + /** + * A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + /** + * The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startIndex") + private final Integer startIndex; + + /** + * The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + * @return the value + **/ + public Integer getStartIndex() { + return startIndex; + } + + /** + * The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("itemsPerPage") + private final Integer itemsPerPage; + + /** + * The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + * @return the value + **/ + public Integer getItemsPerPage() { + return itemsPerPage; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OciConsoleSignOnPolicyConsents("); + sb.append("super=").append(super.toString()); + sb.append("schemas=").append(String.valueOf(this.schemas)); + sb.append(", totalResults=").append(String.valueOf(this.totalResults)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", startIndex=").append(String.valueOf(this.startIndex)); + sb.append(", itemsPerPage=").append(String.valueOf(this.itemsPerPage)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OciConsoleSignOnPolicyConsents)) { + return false; + } + + OciConsoleSignOnPolicyConsents other = (OciConsoleSignOnPolicyConsents) o; + return java.util.Objects.equals(this.schemas, other.schemas) + && java.util.Objects.equals(this.totalResults, other.totalResults) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.startIndex, other.startIndex) + && java.util.Objects.equals(this.itemsPerPage, other.itemsPerPage) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.schemas == null ? 43 : this.schemas.hashCode()); + result = (result * PRIME) + (this.totalResults == null ? 43 : this.totalResults.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = (result * PRIME) + (this.startIndex == null ? 43 : this.startIndex.hashCode()); + result = (result * PRIME) + (this.itemsPerPage == null ? 43 : this.itemsPerPage.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/Policy.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/Policy.java index 288c8810861..b266f6c0166 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/Policy.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/Policy.java @@ -39,7 +39,8 @@ public final class Policy extends com.oracle.bmc.http.internal.ExplicitlySetBmcM "active", "policyGroovy", "rules", - "policyType" + "policyType", + "urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy" }) public Policy( String id, @@ -61,7 +62,9 @@ public Policy( Boolean active, String policyGroovy, java.util.List rules, - PolicyPolicyType policyType) { + PolicyPolicyType policyType, + PolicyExtensionOciconsolesignonpolicyconsentPolicy + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy) { super(); this.id = id; this.ocid = ocid; @@ -83,6 +86,8 @@ public Policy( this.policyGroovy = policyGroovy; this.rules = rules; this.policyType = policyType; + this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy = + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -262,6 +267,7 @@ public Builder idcsPreventedOperations( *

**SCIM++ Properties:** * - idcsCompositeKey: [key, value] + * - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] * - idcsSearchable: true * - multiValued: true * - mutability: readWrite @@ -278,6 +284,7 @@ public Builder idcsPreventedOperations( *

**SCIM++ Properties:** * - idcsCompositeKey: [key, value] + * - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] * - idcsSearchable: true * - multiValued: true * - mutability: readWrite @@ -695,6 +702,22 @@ public Builder policyType(PolicyPolicyType policyType) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty( + "urn:ietf:params:scim:schemas:oracle:idcs:extension:ociconsolesignonpolicyconsent:Policy") + private PolicyExtensionOciconsolesignonpolicyconsentPolicy + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy; + + public Builder + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy( + PolicyExtensionOciconsolesignonpolicyconsentPolicy + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy) { + this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy = + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy; + this.__explicitlySet__.add( + "urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -720,7 +743,8 @@ public Policy build() { this.active, this.policyGroovy, this.rules, - this.policyType); + this.policyType, + this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -789,6 +813,12 @@ public Builder copy(Policy model) { if (model.wasPropertyExplicitlySet("policyType")) { this.policyType(model.getPolicyType()); } + if (model.wasPropertyExplicitlySet( + "urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy")) { + this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy( + model + .getUrnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy()); + } return this; } } @@ -964,6 +994,7 @@ public java.util.List getIdcsPreventedOperations() { *

**SCIM++ Properties:** * - idcsCompositeKey: [key, value] + * - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] * - idcsSearchable: true * - multiValued: true * - mutability: readWrite @@ -980,6 +1011,7 @@ public java.util.List getIdcsPreventedOperations() { *

**SCIM++ Properties:** * - idcsCompositeKey: [key, value] + * - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] * - idcsSearchable: true * - multiValued: true * - mutability: readWrite @@ -1370,6 +1402,16 @@ public PolicyPolicyType getPolicyType() { return policyType; } + @com.fasterxml.jackson.annotation.JsonProperty( + "urn:ietf:params:scim:schemas:oracle:idcs:extension:ociconsolesignonpolicyconsent:Policy") + private final PolicyExtensionOciconsolesignonpolicyconsentPolicy + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy; + + public PolicyExtensionOciconsolesignonpolicyconsentPolicy + getUrnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy() { + return urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy; + } + @Override public String toString() { return this.toString(true); @@ -1406,6 +1448,11 @@ public String toString(boolean includeByteArrayContents) { sb.append(", policyGroovy=").append(String.valueOf(this.policyGroovy)); sb.append(", rules=").append(String.valueOf(this.rules)); sb.append(", policyType=").append(String.valueOf(this.policyType)); + sb.append( + ", urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy=") + .append( + String.valueOf( + this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy)); sb.append(")"); return sb.toString(); } @@ -1442,6 +1489,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.policyGroovy, other.policyGroovy) && java.util.Objects.equals(this.rules, other.rules) && java.util.Objects.equals(this.policyType, other.policyType) + && java.util.Objects.equals( + this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy, + other.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy) && super.equals(other); } @@ -1487,6 +1537,14 @@ public int hashCode() { result = (result * PRIME) + (this.policyGroovy == null ? 43 : this.policyGroovy.hashCode()); result = (result * PRIME) + (this.rules == null ? 43 : this.rules.hashCode()); result = (result * PRIME) + (this.policyType == null ? 43 : this.policyType.hashCode()); + result = + (result * PRIME) + + (this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy + == null + ? 43 + : this + .urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy + .hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/PolicyExtensionOciconsolesignonpolicyconsentPolicy.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/PolicyExtensionOciconsolesignonpolicyconsentPolicy.java new file mode 100644 index 00000000000..4495c17f6ee --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/PolicyExtensionOciconsolesignonpolicyconsentPolicy.java @@ -0,0 +1,336 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.model; + +/** + * This extension defines attributes used to record consent for modification of the "Security Policy for OCI Console" sign-on policy, Rule, Condition or ConditionGroup. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PolicyExtensionOciconsolesignonpolicyconsentPolicy.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PolicyExtensionOciconsolesignonpolicyconsentPolicy + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"consent", "justification", "reason"}) + public PolicyExtensionOciconsolesignonpolicyconsentPolicy( + Boolean consent, String justification, String reason) { + super(); + this.consent = consent; + this.justification = justification; + this.reason = reason; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Set to true when an identity domain administrator opts to change the Oracle security defaults for the "Security Policy for OCI Console" shipped by Oracle. Defaults to false. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: boolean + **/ + @com.fasterxml.jackson.annotation.JsonProperty("consent") + private Boolean consent; + + /** + * Set to true when an identity domain administrator opts to change the Oracle security defaults for the "Security Policy for OCI Console" shipped by Oracle. Defaults to false. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: boolean + * @param consent the value to set + * @return this builder + **/ + public Builder consent(Boolean consent) { + this.consent = consent; + this.__explicitlySet__.add("consent"); + return this; + } + /** + * The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("justification") + private String justification; + + /** + * The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + * @param justification the value to set + * @return this builder + **/ + public Builder justification(String justification) { + this.justification = justification; + this.__explicitlySet__.add("justification"); + return this; + } + /** + * The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reason") + private String reason; + + /** + * The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + * @param reason the value to set + * @return this builder + **/ + public Builder reason(String reason) { + this.reason = reason; + this.__explicitlySet__.add("reason"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PolicyExtensionOciconsolesignonpolicyconsentPolicy build() { + PolicyExtensionOciconsolesignonpolicyconsentPolicy model = + new PolicyExtensionOciconsolesignonpolicyconsentPolicy( + this.consent, this.justification, this.reason); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PolicyExtensionOciconsolesignonpolicyconsentPolicy model) { + if (model.wasPropertyExplicitlySet("consent")) { + this.consent(model.getConsent()); + } + if (model.wasPropertyExplicitlySet("justification")) { + this.justification(model.getJustification()); + } + if (model.wasPropertyExplicitlySet("reason")) { + this.reason(model.getReason()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Set to true when an identity domain administrator opts to change the Oracle security defaults for the "Security Policy for OCI Console" shipped by Oracle. Defaults to false. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: boolean + **/ + @com.fasterxml.jackson.annotation.JsonProperty("consent") + private final Boolean consent; + + /** + * Set to true when an identity domain administrator opts to change the Oracle security defaults for the "Security Policy for OCI Console" shipped by Oracle. Defaults to false. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: boolean + * @return the value + **/ + public Boolean getConsent() { + return consent; + } + + /** + * The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("justification") + private final String justification; + + /** + * The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + * @return the value + **/ + public String getJustification() { + return justification; + } + + /** + * The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reason") + private final String reason; + + /** + * The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + * @return the value + **/ + public String getReason() { + return reason; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PolicyExtensionOciconsolesignonpolicyconsentPolicy("); + sb.append("super=").append(super.toString()); + sb.append("consent=").append(String.valueOf(this.consent)); + sb.append(", justification=").append(String.valueOf(this.justification)); + sb.append(", reason=").append(String.valueOf(this.reason)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PolicyExtensionOciconsolesignonpolicyconsentPolicy)) { + return false; + } + + PolicyExtensionOciconsolesignonpolicyconsentPolicy other = + (PolicyExtensionOciconsolesignonpolicyconsentPolicy) o; + return java.util.Objects.equals(this.consent, other.consent) + && java.util.Objects.equals(this.justification, other.justification) + && java.util.Objects.equals(this.reason, other.reason) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.consent == null ? 43 : this.consent.hashCode()); + result = + (result * PRIME) + + (this.justification == null ? 43 : this.justification.hashCode()); + result = (result * PRIME) + (this.reason == null ? 43 : this.reason.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/PolicyPolicyType.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/PolicyPolicyType.java index 344f92c1d3b..b39f9edb878 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/PolicyPolicyType.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/PolicyPolicyType.java @@ -38,7 +38,7 @@ public PolicyPolicyType(String value, String ref) { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * PolicyType identifier + * PolicyType identifier. *

**SCIM++ Properties:** * - caseExact: true @@ -54,7 +54,7 @@ public static class Builder { private String value; /** - * PolicyType identifier + * PolicyType identifier. *

**SCIM++ Properties:** * - caseExact: true @@ -143,7 +143,7 @@ public Builder toBuilder() { } /** - * PolicyType identifier + * PolicyType identifier. *

**SCIM++ Properties:** * - caseExact: true @@ -159,7 +159,7 @@ public Builder toBuilder() { private final String value; /** - * PolicyType identifier + * PolicyType identifier. *

**SCIM++ Properties:** * - caseExact: true diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/RestoreOciConsolePolicy.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/RestoreOciConsolePolicy.java new file mode 100644 index 00000000000..86f768bf00a --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/RestoreOciConsolePolicy.java @@ -0,0 +1,1098 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.model; + +/** + * Schema to restoring OCI Console Policy to Factory Defaults. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RestoreOciConsolePolicy.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RestoreOciConsolePolicy + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "ocid", + "schemas", + "meta", + "idcsCreatedBy", + "idcsLastModifiedBy", + "idcsPreventedOperations", + "tags", + "deleteInProgress", + "idcsLastUpgradedInRelease", + "domainOcid", + "compartmentOcid", + "tenancyOcid", + "consent", + "reason" + }) + public RestoreOciConsolePolicy( + String id, + String ocid, + java.util.List schemas, + Meta meta, + IdcsCreatedBy idcsCreatedBy, + IdcsLastModifiedBy idcsLastModifiedBy, + java.util.List idcsPreventedOperations, + java.util.List tags, + Boolean deleteInProgress, + String idcsLastUpgradedInRelease, + String domainOcid, + String compartmentOcid, + String tenancyOcid, + Boolean consent, + String reason) { + super(); + this.id = id; + this.ocid = ocid; + this.schemas = schemas; + this.meta = meta; + this.idcsCreatedBy = idcsCreatedBy; + this.idcsLastModifiedBy = idcsLastModifiedBy; + this.idcsPreventedOperations = idcsPreventedOperations; + this.tags = tags; + this.deleteInProgress = deleteInProgress; + this.idcsLastUpgradedInRelease = idcsLastUpgradedInRelease; + this.domainOcid = domainOcid; + this.compartmentOcid = compartmentOcid; + this.tenancyOcid = tenancyOcid; + this.consent = consent; + this.reason = reason; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: always + * - type: string + * - uniqueness: global + * Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: always + * - type: string + * - uniqueness: global + * Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: false + * - returned: default + * - type: string + * - uniqueness: global + * Unique OCI identifier for the SCIM Resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ocid") + private String ocid; + + /** + * **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: false + * - returned: default + * - type: string + * - uniqueness: global + * Unique OCI identifier for the SCIM Resource. + * @param ocid the value to set + * @return this builder + **/ + public Builder ocid(String ocid) { + this.ocid = ocid; + this.__explicitlySet__.add("ocid"); + return this; + } + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \\"enterprise\\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schemas") + private java.util.List schemas; + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \\"enterprise\\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + * @param schemas the value to set + * @return this builder + **/ + public Builder schemas(java.util.List schemas) { + this.schemas = schemas; + this.__explicitlySet__.add("schemas"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("meta") + private Meta meta; + + public Builder meta(Meta meta) { + this.meta = meta; + this.__explicitlySet__.add("meta"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("idcsCreatedBy") + private IdcsCreatedBy idcsCreatedBy; + + public Builder idcsCreatedBy(IdcsCreatedBy idcsCreatedBy) { + this.idcsCreatedBy = idcsCreatedBy; + this.__explicitlySet__.add("idcsCreatedBy"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("idcsLastModifiedBy") + private IdcsLastModifiedBy idcsLastModifiedBy; + + public Builder idcsLastModifiedBy(IdcsLastModifiedBy idcsLastModifiedBy) { + this.idcsLastModifiedBy = idcsLastModifiedBy; + this.__explicitlySet__.add("idcsLastModifiedBy"); + return this; + } + /** + * **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: true + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + * Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idcsPreventedOperations") + private java.util.List idcsPreventedOperations; + + /** + * **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: true + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + * Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + * @param idcsPreventedOperations the value to set + * @return this builder + **/ + public Builder idcsPreventedOperations( + java.util.List idcsPreventedOperations) { + this.idcsPreventedOperations = idcsPreventedOperations; + this.__explicitlySet__.add("idcsPreventedOperations"); + return this; + } + /** + * **SCIM++ Properties:** + * - idcsCompositeKey: [key, value] + * - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] + * - idcsSearchable: true + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: request + * - type: complex + * - uniqueness: none + * A list of tags on this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tags") + private java.util.List tags; + + /** + * **SCIM++ Properties:** + * - idcsCompositeKey: [key, value] + * - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] + * - idcsSearchable: true + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: request + * - type: complex + * - uniqueness: none + * A list of tags on this resource. + * @param tags the value to set + * @return this builder + **/ + public Builder tags(java.util.List tags) { + this.tags = tags; + this.__explicitlySet__.add("tags"); + return this; + } + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deleteInProgress") + private Boolean deleteInProgress; + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + * @param deleteInProgress the value to set + * @return this builder + **/ + public Builder deleteInProgress(Boolean deleteInProgress) { + this.deleteInProgress = deleteInProgress; + this.__explicitlySet__.add("deleteInProgress"); + return this; + } + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + * The release number when the resource was upgraded. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idcsLastUpgradedInRelease") + private String idcsLastUpgradedInRelease; + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + * The release number when the resource was upgraded. + * @param idcsLastUpgradedInRelease the value to set + * @return this builder + **/ + public Builder idcsLastUpgradedInRelease(String idcsLastUpgradedInRelease) { + this.idcsLastUpgradedInRelease = idcsLastUpgradedInRelease; + this.__explicitlySet__.add("idcsLastUpgradedInRelease"); + return this; + } + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * OCI Domain Id (ocid) in which the resource lives. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domainOcid") + private String domainOcid; + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * OCI Domain Id (ocid) in which the resource lives. + * @param domainOcid the value to set + * @return this builder + **/ + public Builder domainOcid(String domainOcid) { + this.domainOcid = domainOcid; + this.__explicitlySet__.add("domainOcid"); + return this; + } + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * OCI Compartment Id (ocid) in which the resource lives. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentOcid") + private String compartmentOcid; + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * OCI Compartment Id (ocid) in which the resource lives. + * @param compartmentOcid the value to set + * @return this builder + **/ + public Builder compartmentOcid(String compartmentOcid) { + this.compartmentOcid = compartmentOcid; + this.__explicitlySet__.add("compartmentOcid"); + return this; + } + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * OCI Tenant Id (ocid) in which the resource lives. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyOcid") + private String tenancyOcid; + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * OCI Tenant Id (ocid) in which the resource lives. + * @param tenancyOcid the value to set + * @return this builder + **/ + public Builder tenancyOcid(String tenancyOcid) { + this.tenancyOcid = tenancyOcid; + this.__explicitlySet__.add("tenancyOcid"); + return this; + } + /** + * **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - required: true + * - mutability: writeOnly + * - returned: default + * - type: boolean + * Consent to be provided for restoring the Oci Console SignOn Policy to Factory Defaults. Defaults to false + **/ + @com.fasterxml.jackson.annotation.JsonProperty("consent") + private Boolean consent; + + /** + * **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - required: true + * - mutability: writeOnly + * - returned: default + * - type: boolean + * Consent to be provided for restoring the Oci Console SignOn Policy to Factory Defaults. Defaults to false + * @param consent the value to set + * @return this builder + **/ + public Builder consent(Boolean consent) { + this.consent = consent; + this.__explicitlySet__.add("consent"); + return this; + } + /** + * **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: true + * - returned: default + * - type: string + * Detailed reason when domain admin opts to restore the Oci Console SignOn Policy to Factory Defaults + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reason") + private String reason; + + /** + * **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: true + * - returned: default + * - type: string + * Detailed reason when domain admin opts to restore the Oci Console SignOn Policy to Factory Defaults + * @param reason the value to set + * @return this builder + **/ + public Builder reason(String reason) { + this.reason = reason; + this.__explicitlySet__.add("reason"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RestoreOciConsolePolicy build() { + RestoreOciConsolePolicy model = + new RestoreOciConsolePolicy( + this.id, + this.ocid, + this.schemas, + this.meta, + this.idcsCreatedBy, + this.idcsLastModifiedBy, + this.idcsPreventedOperations, + this.tags, + this.deleteInProgress, + this.idcsLastUpgradedInRelease, + this.domainOcid, + this.compartmentOcid, + this.tenancyOcid, + this.consent, + this.reason); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RestoreOciConsolePolicy model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("ocid")) { + this.ocid(model.getOcid()); + } + if (model.wasPropertyExplicitlySet("schemas")) { + this.schemas(model.getSchemas()); + } + if (model.wasPropertyExplicitlySet("meta")) { + this.meta(model.getMeta()); + } + if (model.wasPropertyExplicitlySet("idcsCreatedBy")) { + this.idcsCreatedBy(model.getIdcsCreatedBy()); + } + if (model.wasPropertyExplicitlySet("idcsLastModifiedBy")) { + this.idcsLastModifiedBy(model.getIdcsLastModifiedBy()); + } + if (model.wasPropertyExplicitlySet("idcsPreventedOperations")) { + this.idcsPreventedOperations(model.getIdcsPreventedOperations()); + } + if (model.wasPropertyExplicitlySet("tags")) { + this.tags(model.getTags()); + } + if (model.wasPropertyExplicitlySet("deleteInProgress")) { + this.deleteInProgress(model.getDeleteInProgress()); + } + if (model.wasPropertyExplicitlySet("idcsLastUpgradedInRelease")) { + this.idcsLastUpgradedInRelease(model.getIdcsLastUpgradedInRelease()); + } + if (model.wasPropertyExplicitlySet("domainOcid")) { + this.domainOcid(model.getDomainOcid()); + } + if (model.wasPropertyExplicitlySet("compartmentOcid")) { + this.compartmentOcid(model.getCompartmentOcid()); + } + if (model.wasPropertyExplicitlySet("tenancyOcid")) { + this.tenancyOcid(model.getTenancyOcid()); + } + if (model.wasPropertyExplicitlySet("consent")) { + this.consent(model.getConsent()); + } + if (model.wasPropertyExplicitlySet("reason")) { + this.reason(model.getReason()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: always + * - type: string + * - uniqueness: global + * Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: always + * - type: string + * - uniqueness: global + * Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: false + * - returned: default + * - type: string + * - uniqueness: global + * Unique OCI identifier for the SCIM Resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ocid") + private final String ocid; + + /** + * **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: false + * - returned: default + * - type: string + * - uniqueness: global + * Unique OCI identifier for the SCIM Resource. + * @return the value + **/ + public String getOcid() { + return ocid; + } + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \\"enterprise\\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schemas") + private final java.util.List schemas; + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \\"enterprise\\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + * @return the value + **/ + public java.util.List getSchemas() { + return schemas; + } + + @com.fasterxml.jackson.annotation.JsonProperty("meta") + private final Meta meta; + + public Meta getMeta() { + return meta; + } + + @com.fasterxml.jackson.annotation.JsonProperty("idcsCreatedBy") + private final IdcsCreatedBy idcsCreatedBy; + + public IdcsCreatedBy getIdcsCreatedBy() { + return idcsCreatedBy; + } + + @com.fasterxml.jackson.annotation.JsonProperty("idcsLastModifiedBy") + private final IdcsLastModifiedBy idcsLastModifiedBy; + + public IdcsLastModifiedBy getIdcsLastModifiedBy() { + return idcsLastModifiedBy; + } + + /** + * **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: true + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + * Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idcsPreventedOperations") + private final java.util.List idcsPreventedOperations; + + /** + * **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: true + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + * Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + * @return the value + **/ + public java.util.List getIdcsPreventedOperations() { + return idcsPreventedOperations; + } + + /** + * **SCIM++ Properties:** + * - idcsCompositeKey: [key, value] + * - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] + * - idcsSearchable: true + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: request + * - type: complex + * - uniqueness: none + * A list of tags on this resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tags") + private final java.util.List tags; + + /** + * **SCIM++ Properties:** + * - idcsCompositeKey: [key, value] + * - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] + * - idcsSearchable: true + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: request + * - type: complex + * - uniqueness: none + * A list of tags on this resource. + * @return the value + **/ + public java.util.List getTags() { + return tags; + } + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deleteInProgress") + private final Boolean deleteInProgress; + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + * @return the value + **/ + public Boolean getDeleteInProgress() { + return deleteInProgress; + } + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + * The release number when the resource was upgraded. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idcsLastUpgradedInRelease") + private final String idcsLastUpgradedInRelease; + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + * The release number when the resource was upgraded. + * @return the value + **/ + public String getIdcsLastUpgradedInRelease() { + return idcsLastUpgradedInRelease; + } + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * OCI Domain Id (ocid) in which the resource lives. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domainOcid") + private final String domainOcid; + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * OCI Domain Id (ocid) in which the resource lives. + * @return the value + **/ + public String getDomainOcid() { + return domainOcid; + } + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * OCI Compartment Id (ocid) in which the resource lives. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentOcid") + private final String compartmentOcid; + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * OCI Compartment Id (ocid) in which the resource lives. + * @return the value + **/ + public String getCompartmentOcid() { + return compartmentOcid; + } + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * OCI Tenant Id (ocid) in which the resource lives. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyOcid") + private final String tenancyOcid; + + /** + * **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * OCI Tenant Id (ocid) in which the resource lives. + * @return the value + **/ + public String getTenancyOcid() { + return tenancyOcid; + } + + /** + * **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - required: true + * - mutability: writeOnly + * - returned: default + * - type: boolean + * Consent to be provided for restoring the Oci Console SignOn Policy to Factory Defaults. Defaults to false + **/ + @com.fasterxml.jackson.annotation.JsonProperty("consent") + private final Boolean consent; + + /** + * **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - required: true + * - mutability: writeOnly + * - returned: default + * - type: boolean + * Consent to be provided for restoring the Oci Console SignOn Policy to Factory Defaults. Defaults to false + * @return the value + **/ + public Boolean getConsent() { + return consent; + } + + /** + * **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: true + * - returned: default + * - type: string + * Detailed reason when domain admin opts to restore the Oci Console SignOn Policy to Factory Defaults + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reason") + private final String reason; + + /** + * **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: true + * - returned: default + * - type: string + * Detailed reason when domain admin opts to restore the Oci Console SignOn Policy to Factory Defaults + * @return the value + **/ + public String getReason() { + return reason; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RestoreOciConsolePolicy("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", ocid=").append(String.valueOf(this.ocid)); + sb.append(", schemas=").append(String.valueOf(this.schemas)); + sb.append(", meta=").append(String.valueOf(this.meta)); + sb.append(", idcsCreatedBy=").append(String.valueOf(this.idcsCreatedBy)); + sb.append(", idcsLastModifiedBy=").append(String.valueOf(this.idcsLastModifiedBy)); + sb.append(", idcsPreventedOperations=") + .append(String.valueOf(this.idcsPreventedOperations)); + sb.append(", tags=").append(String.valueOf(this.tags)); + sb.append(", deleteInProgress=").append(String.valueOf(this.deleteInProgress)); + sb.append(", idcsLastUpgradedInRelease=") + .append(String.valueOf(this.idcsLastUpgradedInRelease)); + sb.append(", domainOcid=").append(String.valueOf(this.domainOcid)); + sb.append(", compartmentOcid=").append(String.valueOf(this.compartmentOcid)); + sb.append(", tenancyOcid=").append(String.valueOf(this.tenancyOcid)); + sb.append(", consent=").append(String.valueOf(this.consent)); + sb.append(", reason=").append(String.valueOf(this.reason)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RestoreOciConsolePolicy)) { + return false; + } + + RestoreOciConsolePolicy other = (RestoreOciConsolePolicy) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.ocid, other.ocid) + && java.util.Objects.equals(this.schemas, other.schemas) + && java.util.Objects.equals(this.meta, other.meta) + && java.util.Objects.equals(this.idcsCreatedBy, other.idcsCreatedBy) + && java.util.Objects.equals(this.idcsLastModifiedBy, other.idcsLastModifiedBy) + && java.util.Objects.equals( + this.idcsPreventedOperations, other.idcsPreventedOperations) + && java.util.Objects.equals(this.tags, other.tags) + && java.util.Objects.equals(this.deleteInProgress, other.deleteInProgress) + && java.util.Objects.equals( + this.idcsLastUpgradedInRelease, other.idcsLastUpgradedInRelease) + && java.util.Objects.equals(this.domainOcid, other.domainOcid) + && java.util.Objects.equals(this.compartmentOcid, other.compartmentOcid) + && java.util.Objects.equals(this.tenancyOcid, other.tenancyOcid) + && java.util.Objects.equals(this.consent, other.consent) + && java.util.Objects.equals(this.reason, other.reason) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.ocid == null ? 43 : this.ocid.hashCode()); + result = (result * PRIME) + (this.schemas == null ? 43 : this.schemas.hashCode()); + result = (result * PRIME) + (this.meta == null ? 43 : this.meta.hashCode()); + result = + (result * PRIME) + + (this.idcsCreatedBy == null ? 43 : this.idcsCreatedBy.hashCode()); + result = + (result * PRIME) + + (this.idcsLastModifiedBy == null + ? 43 + : this.idcsLastModifiedBy.hashCode()); + result = + (result * PRIME) + + (this.idcsPreventedOperations == null + ? 43 + : this.idcsPreventedOperations.hashCode()); + result = (result * PRIME) + (this.tags == null ? 43 : this.tags.hashCode()); + result = + (result * PRIME) + + (this.deleteInProgress == null ? 43 : this.deleteInProgress.hashCode()); + result = + (result * PRIME) + + (this.idcsLastUpgradedInRelease == null + ? 43 + : this.idcsLastUpgradedInRelease.hashCode()); + result = (result * PRIME) + (this.domainOcid == null ? 43 : this.domainOcid.hashCode()); + result = + (result * PRIME) + + (this.compartmentOcid == null ? 43 : this.compartmentOcid.hashCode()); + result = (result * PRIME) + (this.tenancyOcid == null ? 43 : this.tenancyOcid.hashCode()); + result = (result * PRIME) + (this.consent == null ? 43 : this.consent.hashCode()); + result = (result * PRIME) + (this.reason == null ? 43 : this.reason.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/Rule.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/Rule.java index a64b4848c76..5dd532f431e 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/Rule.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/Rule.java @@ -42,7 +42,8 @@ public final class Rule extends com.oracle.bmc.http.internal.ExplicitlySetBmcMod "condition", "conditionGroup", "policyType", - "ruleReturn" + "ruleReturn", + "urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy" }) public Rule( String id, @@ -67,7 +68,9 @@ public Rule( String condition, RuleConditionGroup conditionGroup, RulePolicyType policyType, - java.util.List ruleReturn) { + java.util.List ruleReturn, + RuleExtensionOciconsolesignonpolicyconsentPolicy + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy) { super(); this.id = id; this.ocid = ocid; @@ -92,6 +95,8 @@ public Rule( this.conditionGroup = conditionGroup; this.policyType = policyType; this.ruleReturn = ruleReturn; + this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy = + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -271,6 +276,7 @@ public Builder idcsPreventedOperations( *

**SCIM++ Properties:** * - idcsCompositeKey: [key, value] + * - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] * - idcsSearchable: true * - multiValued: true * - mutability: readWrite @@ -287,6 +293,7 @@ public Builder idcsPreventedOperations( *

**SCIM++ Properties:** * - idcsCompositeKey: [key, value] + * - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] * - idcsSearchable: true * - multiValued: true * - mutability: readWrite @@ -787,6 +794,22 @@ public Builder ruleReturn(java.util.List ruleReturn) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty( + "urn:ietf:params:scim:schemas:oracle:idcs:extension:ociconsolesignonpolicyconsent:Policy") + private RuleExtensionOciconsolesignonpolicyconsentPolicy + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy; + + public Builder + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy( + RuleExtensionOciconsolesignonpolicyconsentPolicy + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy) { + this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy = + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy; + this.__explicitlySet__.add( + "urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -815,7 +838,8 @@ public Rule build() { this.condition, this.conditionGroup, this.policyType, - this.ruleReturn); + this.ruleReturn, + this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -893,6 +917,12 @@ public Builder copy(Rule model) { if (model.wasPropertyExplicitlySet("ruleReturn")) { this.ruleReturn(model.getRuleReturn()); } + if (model.wasPropertyExplicitlySet( + "urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy")) { + this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy( + model + .getUrnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy()); + } return this; } } @@ -1068,6 +1098,7 @@ public java.util.List getIdcsPreventedOperations() { *

**SCIM++ Properties:** * - idcsCompositeKey: [key, value] + * - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] * - idcsSearchable: true * - multiValued: true * - mutability: readWrite @@ -1084,6 +1115,7 @@ public java.util.List getIdcsPreventedOperations() { *

**SCIM++ Properties:** * - idcsCompositeKey: [key, value] + * - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] * - idcsSearchable: true * - multiValued: true * - mutability: readWrite @@ -1551,6 +1583,16 @@ public java.util.List getRuleReturn() { return ruleReturn; } + @com.fasterxml.jackson.annotation.JsonProperty( + "urn:ietf:params:scim:schemas:oracle:idcs:extension:ociconsolesignonpolicyconsent:Policy") + private final RuleExtensionOciconsolesignonpolicyconsentPolicy + urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy; + + public RuleExtensionOciconsolesignonpolicyconsentPolicy + getUrnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy() { + return urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy; + } + @Override public String toString() { return this.toString(true); @@ -1590,6 +1632,11 @@ public String toString(boolean includeByteArrayContents) { sb.append(", conditionGroup=").append(String.valueOf(this.conditionGroup)); sb.append(", policyType=").append(String.valueOf(this.policyType)); sb.append(", ruleReturn=").append(String.valueOf(this.ruleReturn)); + sb.append( + ", urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy=") + .append( + String.valueOf( + this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy)); sb.append(")"); return sb.toString(); } @@ -1629,6 +1676,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.conditionGroup, other.conditionGroup) && java.util.Objects.equals(this.policyType, other.policyType) && java.util.Objects.equals(this.ruleReturn, other.ruleReturn) + && java.util.Objects.equals( + this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy, + other.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy) && super.equals(other); } @@ -1679,6 +1729,14 @@ public int hashCode() { + (this.conditionGroup == null ? 43 : this.conditionGroup.hashCode()); result = (result * PRIME) + (this.policyType == null ? 43 : this.policyType.hashCode()); result = (result * PRIME) + (this.ruleReturn == null ? 43 : this.ruleReturn.hashCode()); + result = + (result * PRIME) + + (this.urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy + == null + ? 43 + : this + .urnietfparamsscimschemasoracleidcsextensionociconsolesignonpolicyconsentPolicy + .hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/RuleConditionGroup.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/RuleConditionGroup.java index fa7708ccc34..a6425e48f45 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/RuleConditionGroup.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/RuleConditionGroup.java @@ -42,7 +42,7 @@ public RuleConditionGroup(String value, String ref, Type type, String name) { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * Condition or ConditionGroup identifier + * Condition or ConditionGroup identifier. *

**SCIM++ Properties:** * - caseExact: true @@ -58,7 +58,7 @@ public static class Builder { private String value; /** - * Condition or ConditionGroup identifier + * Condition or ConditionGroup identifier. *

**SCIM++ Properties:** * - caseExact: true @@ -228,7 +228,7 @@ public Builder toBuilder() { } /** - * Condition or ConditionGroup identifier + * Condition or ConditionGroup identifier. *

**SCIM++ Properties:** * - caseExact: true @@ -244,7 +244,7 @@ public Builder toBuilder() { private final String value; /** - * Condition or ConditionGroup identifier + * Condition or ConditionGroup identifier. *

**SCIM++ Properties:** * - caseExact: true diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/RuleExtensionOciconsolesignonpolicyconsentPolicy.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/RuleExtensionOciconsolesignonpolicyconsentPolicy.java new file mode 100644 index 00000000000..deb2430db49 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/RuleExtensionOciconsolesignonpolicyconsentPolicy.java @@ -0,0 +1,336 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.model; + +/** + * This extension defines attributes used to record consent for modification of the "Security Policy for OCI Console" sign-on policy, Rule, Condition or ConditionGroup. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RuleExtensionOciconsolesignonpolicyconsentPolicy.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RuleExtensionOciconsolesignonpolicyconsentPolicy + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"consent", "justification", "reason"}) + public RuleExtensionOciconsolesignonpolicyconsentPolicy( + Boolean consent, String justification, String reason) { + super(); + this.consent = consent; + this.justification = justification; + this.reason = reason; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Set to true when an identity domain administrator opts to change the Oracle security defaults for the "Security Policy for OCI Console" shipped by Oracle. Defaults to false. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: boolean + **/ + @com.fasterxml.jackson.annotation.JsonProperty("consent") + private Boolean consent; + + /** + * Set to true when an identity domain administrator opts to change the Oracle security defaults for the "Security Policy for OCI Console" shipped by Oracle. Defaults to false. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: boolean + * @param consent the value to set + * @return this builder + **/ + public Builder consent(Boolean consent) { + this.consent = consent; + this.__explicitlySet__.add("consent"); + return this; + } + /** + * The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("justification") + private String justification; + + /** + * The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + * @param justification the value to set + * @return this builder + **/ + public Builder justification(String justification) { + this.justification = justification; + this.__explicitlySet__.add("justification"); + return this; + } + /** + * The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reason") + private String reason; + + /** + * The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + * @param reason the value to set + * @return this builder + **/ + public Builder reason(String reason) { + this.reason = reason; + this.__explicitlySet__.add("reason"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RuleExtensionOciconsolesignonpolicyconsentPolicy build() { + RuleExtensionOciconsolesignonpolicyconsentPolicy model = + new RuleExtensionOciconsolesignonpolicyconsentPolicy( + this.consent, this.justification, this.reason); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RuleExtensionOciconsolesignonpolicyconsentPolicy model) { + if (model.wasPropertyExplicitlySet("consent")) { + this.consent(model.getConsent()); + } + if (model.wasPropertyExplicitlySet("justification")) { + this.justification(model.getJustification()); + } + if (model.wasPropertyExplicitlySet("reason")) { + this.reason(model.getReason()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Set to true when an identity domain administrator opts to change the Oracle security defaults for the "Security Policy for OCI Console" shipped by Oracle. Defaults to false. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: boolean + **/ + @com.fasterxml.jackson.annotation.JsonProperty("consent") + private final Boolean consent; + + /** + * Set to true when an identity domain administrator opts to change the Oracle security defaults for the "Security Policy for OCI Console" shipped by Oracle. Defaults to false. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: boolean + * @return the value + **/ + public Boolean getConsent() { + return consent; + } + + /** + * The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("justification") + private final String justification; + + /** + * The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + * @return the value + **/ + public String getJustification() { + return justification; + } + + /** + * The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("reason") + private final String reason; + + /** + * The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the "Security Policy for OCI Console" sign-on policy shipped by Oracle. + *

+ **Added In:** 2405220110 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: writeOnly + * - required: false + * - returned: never + * - type: string + * @return the value + **/ + public String getReason() { + return reason; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RuleExtensionOciconsolesignonpolicyconsentPolicy("); + sb.append("super=").append(super.toString()); + sb.append("consent=").append(String.valueOf(this.consent)); + sb.append(", justification=").append(String.valueOf(this.justification)); + sb.append(", reason=").append(String.valueOf(this.reason)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RuleExtensionOciconsolesignonpolicyconsentPolicy)) { + return false; + } + + RuleExtensionOciconsolesignonpolicyconsentPolicy other = + (RuleExtensionOciconsolesignonpolicyconsentPolicy) o; + return java.util.Objects.equals(this.consent, other.consent) + && java.util.Objects.equals(this.justification, other.justification) + && java.util.Objects.equals(this.reason, other.reason) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.consent == null ? 43 : this.consent.hashCode()); + result = + (result * PRIME) + + (this.justification == null ? 43 : this.justification.hashCode()); + result = (result * PRIME) + (this.reason == null ? 43 : this.reason.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/SmtpCredential.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/SmtpCredential.java index c93d023cfac..b52e5076380 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/SmtpCredential.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/SmtpCredential.java @@ -37,6 +37,7 @@ public final class SmtpCredential extends com.oracle.bmc.http.internal.Explicitl "status", "expiresOn", "userName", + "password", "user", "urnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser" }) @@ -58,6 +59,7 @@ public SmtpCredential( Status status, String expiresOn, String userName, + String password, SmtpCredentialUser user, ExtensionSelfChangeUser urnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser) { super(); @@ -78,6 +80,7 @@ public SmtpCredential( this.status = status; this.expiresOn = expiresOn; this.userName = userName; + this.password = password; this.user = user; this.urnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser = urnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser; @@ -611,6 +614,38 @@ public Builder userName(String userName) { this.__explicitlySet__.add("userName"); return this; } + /** + * Password + *

+ **SCIM++ Properties:** + * - caseExact: true + * - type: string + * - mutability: readOnly + * - required: false + * - returned: default + * - idcsSensitive: hash_sc + **/ + @com.fasterxml.jackson.annotation.JsonProperty("password") + private String password; + + /** + * Password + *

+ **SCIM++ Properties:** + * - caseExact: true + * - type: string + * - mutability: readOnly + * - required: false + * - returned: default + * - idcsSensitive: hash_sc + * @param password the value to set + * @return this builder + **/ + public Builder password(String password) { + this.password = password; + this.__explicitlySet__.add("password"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("user") private SmtpCredentialUser user; @@ -656,6 +691,7 @@ public SmtpCredential build() { this.status, this.expiresOn, this.userName, + this.password, this.user, this.urnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -717,6 +753,9 @@ public Builder copy(SmtpCredential model) { if (model.wasPropertyExplicitlySet("userName")) { this.userName(model.getUserName()); } + if (model.wasPropertyExplicitlySet("password")) { + this.password(model.getPassword()); + } if (model.wasPropertyExplicitlySet("user")) { this.user(model.getUser()); } @@ -1290,6 +1329,36 @@ public String getUserName() { return userName; } + /** + * Password + *

+ **SCIM++ Properties:** + * - caseExact: true + * - type: string + * - mutability: readOnly + * - required: false + * - returned: default + * - idcsSensitive: hash_sc + **/ + @com.fasterxml.jackson.annotation.JsonProperty("password") + private final String password; + + /** + * Password + *

+ **SCIM++ Properties:** + * - caseExact: true + * - type: string + * - mutability: readOnly + * - required: false + * - returned: default + * - idcsSensitive: hash_sc + * @return the value + **/ + public String getPassword() { + return password; + } + @com.fasterxml.jackson.annotation.JsonProperty("user") private final SmtpCredentialUser user; @@ -1338,6 +1407,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", status=").append(String.valueOf(this.status)); sb.append(", expiresOn=").append(String.valueOf(this.expiresOn)); sb.append(", userName=").append(String.valueOf(this.userName)); + sb.append(", password=").append(String.valueOf(this.password)); sb.append(", user=").append(String.valueOf(this.user)); sb.append(", urnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser=") .append( @@ -1376,6 +1446,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.status, other.status) && java.util.Objects.equals(this.expiresOn, other.expiresOn) && java.util.Objects.equals(this.userName, other.userName) + && java.util.Objects.equals(this.password, other.password) && java.util.Objects.equals(this.user, other.user) && java.util.Objects.equals( this.urnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser, @@ -1422,6 +1493,7 @@ public int hashCode() { result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); result = (result * PRIME) + (this.expiresOn == null ? 43 : this.expiresOn.hashCode()); result = (result * PRIME) + (this.userName == null ? 43 : this.userName.hashCode()); + result = (result * PRIME) + (this.password == null ? 43 : this.password.hashCode()); result = (result * PRIME) + (this.user == null ? 43 : this.user.hashCode()); result = (result * PRIME) diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/SocialIdentityProvider.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/SocialIdentityProvider.java new file mode 100644 index 00000000000..af9409d92f0 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/SocialIdentityProvider.java @@ -0,0 +1,3351 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.model; + +/** + * Social Identity Provider + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SocialIdentityProvider.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SocialIdentityProvider + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "ocid", + "schemas", + "meta", + "idcsCreatedBy", + "idcsLastModifiedBy", + "idcsPreventedOperations", + "tags", + "deleteInProgress", + "idcsLastUpgradedInRelease", + "domainOcid", + "compartmentOcid", + "tenancyOcid", + "name", + "description", + "enabled", + "accountLinkingEnabled", + "socialJitProvisioningEnabled", + "jitProvGroupStaticListEnabled", + "jitProvAssignedGroups", + "registrationEnabled", + "autoRedirectEnabled", + "showOnLogin", + "status", + "idAttribute", + "authzUrl", + "accessTokenUrl", + "profileUrl", + "scope", + "adminScope", + "consumerKey", + "consumerSecret", + "serviceProviderName", + "clockSkewInSeconds", + "redirectUrl", + "iconUrl", + "discoveryUrl", + "clientCredentialInPayload", + "refreshTokenUrl", + "relayIdpParamMappings" + }) + public SocialIdentityProvider( + String id, + String ocid, + java.util.List schemas, + Meta meta, + IdcsCreatedBy idcsCreatedBy, + IdcsLastModifiedBy idcsLastModifiedBy, + java.util.List idcsPreventedOperations, + java.util.List tags, + Boolean deleteInProgress, + String idcsLastUpgradedInRelease, + String domainOcid, + String compartmentOcid, + String tenancyOcid, + String name, + String description, + Boolean enabled, + Boolean accountLinkingEnabled, + Boolean socialJitProvisioningEnabled, + Boolean jitProvGroupStaticListEnabled, + java.util.List jitProvAssignedGroups, + Boolean registrationEnabled, + Boolean autoRedirectEnabled, + Boolean showOnLogin, + Status status, + String idAttribute, + String authzUrl, + String accessTokenUrl, + String profileUrl, + java.util.List scope, + java.util.List adminScope, + String consumerKey, + String consumerSecret, + String serviceProviderName, + Integer clockSkewInSeconds, + String redirectUrl, + String iconUrl, + String discoveryUrl, + Boolean clientCredentialInPayload, + String refreshTokenUrl, + java.util.List relayIdpParamMappings) { + super(); + this.id = id; + this.ocid = ocid; + this.schemas = schemas; + this.meta = meta; + this.idcsCreatedBy = idcsCreatedBy; + this.idcsLastModifiedBy = idcsLastModifiedBy; + this.idcsPreventedOperations = idcsPreventedOperations; + this.tags = tags; + this.deleteInProgress = deleteInProgress; + this.idcsLastUpgradedInRelease = idcsLastUpgradedInRelease; + this.domainOcid = domainOcid; + this.compartmentOcid = compartmentOcid; + this.tenancyOcid = tenancyOcid; + this.name = name; + this.description = description; + this.enabled = enabled; + this.accountLinkingEnabled = accountLinkingEnabled; + this.socialJitProvisioningEnabled = socialJitProvisioningEnabled; + this.jitProvGroupStaticListEnabled = jitProvGroupStaticListEnabled; + this.jitProvAssignedGroups = jitProvAssignedGroups; + this.registrationEnabled = registrationEnabled; + this.autoRedirectEnabled = autoRedirectEnabled; + this.showOnLogin = showOnLogin; + this.status = status; + this.idAttribute = idAttribute; + this.authzUrl = authzUrl; + this.accessTokenUrl = accessTokenUrl; + this.profileUrl = profileUrl; + this.scope = scope; + this.adminScope = adminScope; + this.consumerKey = consumerKey; + this.consumerSecret = consumerSecret; + this.serviceProviderName = serviceProviderName; + this.clockSkewInSeconds = clockSkewInSeconds; + this.redirectUrl = redirectUrl; + this.iconUrl = iconUrl; + this.discoveryUrl = discoveryUrl; + this.clientCredentialInPayload = clientCredentialInPayload; + this.refreshTokenUrl = refreshTokenUrl; + this.relayIdpParamMappings = relayIdpParamMappings; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: always + * - type: string + * - uniqueness: global + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: always + * - type: string + * - uniqueness: global + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Unique OCI identifier for the SCIM Resource. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: false + * - returned: default + * - type: string + * - uniqueness: global + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ocid") + private String ocid; + + /** + * Unique OCI identifier for the SCIM Resource. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: false + * - returned: default + * - type: string + * - uniqueness: global + * @param ocid the value to set + * @return this builder + **/ + public Builder ocid(String ocid) { + this.ocid = ocid; + this.__explicitlySet__.add("ocid"); + return this; + } + /** + * REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \\"enterprise\\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schemas") + private java.util.List schemas; + + /** + * REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \\"enterprise\\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @param schemas the value to set + * @return this builder + **/ + public Builder schemas(java.util.List schemas) { + this.schemas = schemas; + this.__explicitlySet__.add("schemas"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("meta") + private Meta meta; + + public Builder meta(Meta meta) { + this.meta = meta; + this.__explicitlySet__.add("meta"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("idcsCreatedBy") + private IdcsCreatedBy idcsCreatedBy; + + public Builder idcsCreatedBy(IdcsCreatedBy idcsCreatedBy) { + this.idcsCreatedBy = idcsCreatedBy; + this.__explicitlySet__.add("idcsCreatedBy"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("idcsLastModifiedBy") + private IdcsLastModifiedBy idcsLastModifiedBy; + + public Builder idcsLastModifiedBy(IdcsLastModifiedBy idcsLastModifiedBy) { + this.idcsLastModifiedBy = idcsLastModifiedBy; + this.__explicitlySet__.add("idcsLastModifiedBy"); + return this; + } + /** + * Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: true + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idcsPreventedOperations") + private java.util.List idcsPreventedOperations; + + /** + * Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: true + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + * @param idcsPreventedOperations the value to set + * @return this builder + **/ + public Builder idcsPreventedOperations( + java.util.List idcsPreventedOperations) { + this.idcsPreventedOperations = idcsPreventedOperations; + this.__explicitlySet__.add("idcsPreventedOperations"); + return this; + } + /** + * A list of tags on this resource. + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [key, value] + * - idcsSearchable: true + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: request + * - type: complex + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tags") + private java.util.List tags; + + /** + * A list of tags on this resource. + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [key, value] + * - idcsSearchable: true + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: request + * - type: complex + * - uniqueness: none + * @param tags the value to set + * @return this builder + **/ + public Builder tags(java.util.List tags) { + this.tags = tags; + this.__explicitlySet__.add("tags"); + return this; + } + /** + * A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deleteInProgress") + private Boolean deleteInProgress; + + /** + * A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * @param deleteInProgress the value to set + * @return this builder + **/ + public Builder deleteInProgress(Boolean deleteInProgress) { + this.deleteInProgress = deleteInProgress; + this.__explicitlySet__.add("deleteInProgress"); + return this; + } + /** + * The release number when the resource was upgraded. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idcsLastUpgradedInRelease") + private String idcsLastUpgradedInRelease; + + /** + * The release number when the resource was upgraded. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + * @param idcsLastUpgradedInRelease the value to set + * @return this builder + **/ + public Builder idcsLastUpgradedInRelease(String idcsLastUpgradedInRelease) { + this.idcsLastUpgradedInRelease = idcsLastUpgradedInRelease; + this.__explicitlySet__.add("idcsLastUpgradedInRelease"); + return this; + } + /** + * OCI Domain Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domainOcid") + private String domainOcid; + + /** + * OCI Domain Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @param domainOcid the value to set + * @return this builder + **/ + public Builder domainOcid(String domainOcid) { + this.domainOcid = domainOcid; + this.__explicitlySet__.add("domainOcid"); + return this; + } + /** + * OCI Compartment Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentOcid") + private String compartmentOcid; + + /** + * OCI Compartment Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @param compartmentOcid the value to set + * @return this builder + **/ + public Builder compartmentOcid(String compartmentOcid) { + this.compartmentOcid = compartmentOcid; + this.__explicitlySet__.add("compartmentOcid"); + return this; + } + /** + * OCI Tenant Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyOcid") + private String tenancyOcid; + + /** + * OCI Tenant Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @param tenancyOcid the value to set + * @return this builder + **/ + public Builder tenancyOcid(String tenancyOcid) { + this.tenancyOcid = tenancyOcid; + this.__explicitlySet__.add("tenancyOcid"); + return this; + } + /** + * Social provider name + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: always + * - type: string + * - uniqueness: global + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Social provider name + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: always + * - type: string + * - uniqueness: global + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Social IDP description + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Social IDP description + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Whether the IDP is enabled or not + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enabled") + private Boolean enabled; + + /** + * Whether the IDP is enabled or not + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: boolean + * - uniqueness: none + * @param enabled the value to set + * @return this builder + **/ + public Builder enabled(Boolean enabled) { + this.enabled = enabled; + this.__explicitlySet__.add("enabled"); + return this; + } + /** + * Whether account linking is enabled + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("accountLinkingEnabled") + private Boolean accountLinkingEnabled; + + /** + * Whether account linking is enabled + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: boolean + * - uniqueness: none + * @param accountLinkingEnabled the value to set + * @return this builder + **/ + public Builder accountLinkingEnabled(Boolean accountLinkingEnabled) { + this.accountLinkingEnabled = accountLinkingEnabled; + this.__explicitlySet__.add("accountLinkingEnabled"); + return this; + } + /** + * Whether Social JIT Provisioning is enabled + *

+ **Added In:** 2307282043 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("socialJitProvisioningEnabled") + private Boolean socialJitProvisioningEnabled; + + /** + * Whether Social JIT Provisioning is enabled + *

+ **Added In:** 2307282043 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * @param socialJitProvisioningEnabled the value to set + * @return this builder + **/ + public Builder socialJitProvisioningEnabled(Boolean socialJitProvisioningEnabled) { + this.socialJitProvisioningEnabled = socialJitProvisioningEnabled; + this.__explicitlySet__.add("socialJitProvisioningEnabled"); + return this; + } + /** + * Set to true to indicate Social JIT User Provisioning Groups should be assigned from a static list + *

+ **Added In:** 2309290043 + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("jitProvGroupStaticListEnabled") + private Boolean jitProvGroupStaticListEnabled; + + /** + * Set to true to indicate Social JIT User Provisioning Groups should be assigned from a static list + *

+ **Added In:** 2309290043 + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * @param jitProvGroupStaticListEnabled the value to set + * @return this builder + **/ + public Builder jitProvGroupStaticListEnabled(Boolean jitProvGroupStaticListEnabled) { + this.jitProvGroupStaticListEnabled = jitProvGroupStaticListEnabled; + this.__explicitlySet__.add("jitProvGroupStaticListEnabled"); + return this; + } + /** + * Lists the groups each social JIT-provisioned user is a member. Just-in-Time user-provisioning applies this static list when jitProvGroupStaticListEnabled:true. + *

+ **Added In:** 2309290043 + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [value] + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: complex + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("jitProvAssignedGroups") + private java.util.List jitProvAssignedGroups; + + /** + * Lists the groups each social JIT-provisioned user is a member. Just-in-Time user-provisioning applies this static list when jitProvGroupStaticListEnabled:true. + *

+ **Added In:** 2309290043 + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [value] + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: complex + * - uniqueness: none + * @param jitProvAssignedGroups the value to set + * @return this builder + **/ + public Builder jitProvAssignedGroups( + java.util.List jitProvAssignedGroups) { + this.jitProvAssignedGroups = jitProvAssignedGroups; + this.__explicitlySet__.add("jitProvAssignedGroups"); + return this; + } + /** + * Whether registration is enabled + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("registrationEnabled") + private Boolean registrationEnabled; + + /** + * Whether registration is enabled + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: boolean + * - uniqueness: none + * @param registrationEnabled the value to set + * @return this builder + **/ + public Builder registrationEnabled(Boolean registrationEnabled) { + this.registrationEnabled = registrationEnabled; + this.__explicitlySet__.add("registrationEnabled"); + return this; + } + /** + * Whether social auto redirect is enabled. The IDP policy should be configured with only one Social IDP, and without username/password selected. + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autoRedirectEnabled") + private Boolean autoRedirectEnabled; + + /** + * Whether social auto redirect is enabled. The IDP policy should be configured with only one Social IDP, and without username/password selected. + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * @param autoRedirectEnabled the value to set + * @return this builder + **/ + public Builder autoRedirectEnabled(Boolean autoRedirectEnabled) { + this.autoRedirectEnabled = autoRedirectEnabled; + this.__explicitlySet__.add("autoRedirectEnabled"); + return this; + } + /** + * Whether show on login + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("showOnLogin") + private Boolean showOnLogin; + + /** + * Whether show on login + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: boolean + * - uniqueness: none + * @param showOnLogin the value to set + * @return this builder + **/ + public Builder showOnLogin(Boolean showOnLogin) { + this.showOnLogin = showOnLogin; + this.__explicitlySet__.add("showOnLogin"); + return this; + } + /** + * Status + *

+ **Added In:** 17.4.6 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + /** + * Status + *

+ **Added In:** 17.4.6 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @param status the value to set + * @return this builder + **/ + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * Id attribute used for account linking + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idAttribute") + private String idAttribute; + + /** + * Id attribute used for account linking + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @param idAttribute the value to set + * @return this builder + **/ + public Builder idAttribute(String idAttribute) { + this.idAttribute = idAttribute; + this.__explicitlySet__.add("idAttribute"); + return this; + } + /** + * Social IDP Authorization URL + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("authzUrl") + private String authzUrl; + + /** + * Social IDP Authorization URL + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @param authzUrl the value to set + * @return this builder + **/ + public Builder authzUrl(String authzUrl) { + this.authzUrl = authzUrl; + this.__explicitlySet__.add("authzUrl"); + return this; + } + /** + * Social IDP Access token URL + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("accessTokenUrl") + private String accessTokenUrl; + + /** + * Social IDP Access token URL + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @param accessTokenUrl the value to set + * @return this builder + **/ + public Builder accessTokenUrl(String accessTokenUrl) { + this.accessTokenUrl = accessTokenUrl; + this.__explicitlySet__.add("accessTokenUrl"); + return this; + } + /** + * Social IDP User profile URL + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("profileUrl") + private String profileUrl; + + /** + * Social IDP User profile URL + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @param profileUrl the value to set + * @return this builder + **/ + public Builder profileUrl(String profileUrl) { + this.profileUrl = profileUrl; + this.__explicitlySet__.add("profileUrl"); + return this; + } + /** + * Scope to request + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scope") + private java.util.List scope; + + /** + * Scope to request + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @param scope the value to set + * @return this builder + **/ + public Builder scope(java.util.List scope) { + this.scope = scope; + this.__explicitlySet__.add("scope"); + return this; + } + /** + * Admin scope to request + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminScope") + private java.util.List adminScope; + + /** + * Admin scope to request + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @param adminScope the value to set + * @return this builder + **/ + public Builder adminScope(java.util.List adminScope) { + this.adminScope = adminScope; + this.__explicitlySet__.add("adminScope"); + return this; + } + /** + * Social IDP Client Application Client ID + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("consumerKey") + private String consumerKey; + + /** + * Social IDP Client Application Client ID + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @param consumerKey the value to set + * @return this builder + **/ + public Builder consumerKey(String consumerKey) { + this.consumerKey = consumerKey; + this.__explicitlySet__.add("consumerKey"); + return this; + } + /** + * Social IDP Client Application Client Secret + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - idcsSensitive: encrypt + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("consumerSecret") + private String consumerSecret; + + /** + * Social IDP Client Application Client Secret + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - idcsSensitive: encrypt + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @param consumerSecret the value to set + * @return this builder + **/ + public Builder consumerSecret(String consumerSecret) { + this.consumerSecret = consumerSecret; + this.__explicitlySet__.add("consumerSecret"); + return this; + } + /** + * Service Provider Name + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceProviderName") + private String serviceProviderName; + + /** + * Service Provider Name + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @param serviceProviderName the value to set + * @return this builder + **/ + public Builder serviceProviderName(String serviceProviderName) { + this.serviceProviderName = serviceProviderName; + this.__explicitlySet__.add("serviceProviderName"); + return this; + } + /** + * Social IDP allowed clock skew time + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: integer + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockSkewInSeconds") + private Integer clockSkewInSeconds; + + /** + * Social IDP allowed clock skew time + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: integer + * - uniqueness: none + * @param clockSkewInSeconds the value to set + * @return this builder + **/ + public Builder clockSkewInSeconds(Integer clockSkewInSeconds) { + this.clockSkewInSeconds = clockSkewInSeconds; + this.__explicitlySet__.add("clockSkewInSeconds"); + return this; + } + /** + * redirect URL for social idp + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("redirectUrl") + private String redirectUrl; + + /** + * redirect URL for social idp + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @param redirectUrl the value to set + * @return this builder + **/ + public Builder redirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + this.__explicitlySet__.add("redirectUrl"); + return this; + } + /** + * ICON URL for social idp + *

+ **Added In:** 17.4.6 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("iconUrl") + private String iconUrl; + + /** + * ICON URL for social idp + *

+ **Added In:** 17.4.6 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @param iconUrl the value to set + * @return this builder + **/ + public Builder iconUrl(String iconUrl) { + this.iconUrl = iconUrl; + this.__explicitlySet__.add("iconUrl"); + return this; + } + /** + * Discovery URL + *

+ **Added In:** 17.4.6 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("discoveryUrl") + private String discoveryUrl; + + /** + * Discovery URL + *

+ **Added In:** 17.4.6 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @param discoveryUrl the value to set + * @return this builder + **/ + public Builder discoveryUrl(String discoveryUrl) { + this.discoveryUrl = discoveryUrl; + this.__explicitlySet__.add("discoveryUrl"); + return this; + } + /** + * Whether the client credential is contained in payload + *

+ **Added In:** 18.4.2 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clientCredentialInPayload") + private Boolean clientCredentialInPayload; + + /** + * Whether the client credential is contained in payload + *

+ **Added In:** 18.4.2 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * @param clientCredentialInPayload the value to set + * @return this builder + **/ + public Builder clientCredentialInPayload(Boolean clientCredentialInPayload) { + this.clientCredentialInPayload = clientCredentialInPayload; + this.__explicitlySet__.add("clientCredentialInPayload"); + return this; + } + /** + * Social IDP Refresh token URL + *

+ **Added In:** 19.1.4 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("refreshTokenUrl") + private String refreshTokenUrl; + + /** + * Social IDP Refresh token URL + *

+ **Added In:** 19.1.4 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @param refreshTokenUrl the value to set + * @return this builder + **/ + public Builder refreshTokenUrl(String refreshTokenUrl) { + this.refreshTokenUrl = refreshTokenUrl; + this.__explicitlySet__.add("refreshTokenUrl"); + return this; + } + /** + * Relay Param variable for Social IDP + *

+ **Added In:** 2305190132 + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [relayParamKey] + * - idcsSearchable: true + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: complex + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("relayIdpParamMappings") + private java.util.List relayIdpParamMappings; + + /** + * Relay Param variable for Social IDP + *

+ **Added In:** 2305190132 + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [relayParamKey] + * - idcsSearchable: true + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: complex + * - uniqueness: none + * @param relayIdpParamMappings the value to set + * @return this builder + **/ + public Builder relayIdpParamMappings( + java.util.List relayIdpParamMappings) { + this.relayIdpParamMappings = relayIdpParamMappings; + this.__explicitlySet__.add("relayIdpParamMappings"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SocialIdentityProvider build() { + SocialIdentityProvider model = + new SocialIdentityProvider( + this.id, + this.ocid, + this.schemas, + this.meta, + this.idcsCreatedBy, + this.idcsLastModifiedBy, + this.idcsPreventedOperations, + this.tags, + this.deleteInProgress, + this.idcsLastUpgradedInRelease, + this.domainOcid, + this.compartmentOcid, + this.tenancyOcid, + this.name, + this.description, + this.enabled, + this.accountLinkingEnabled, + this.socialJitProvisioningEnabled, + this.jitProvGroupStaticListEnabled, + this.jitProvAssignedGroups, + this.registrationEnabled, + this.autoRedirectEnabled, + this.showOnLogin, + this.status, + this.idAttribute, + this.authzUrl, + this.accessTokenUrl, + this.profileUrl, + this.scope, + this.adminScope, + this.consumerKey, + this.consumerSecret, + this.serviceProviderName, + this.clockSkewInSeconds, + this.redirectUrl, + this.iconUrl, + this.discoveryUrl, + this.clientCredentialInPayload, + this.refreshTokenUrl, + this.relayIdpParamMappings); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SocialIdentityProvider model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("ocid")) { + this.ocid(model.getOcid()); + } + if (model.wasPropertyExplicitlySet("schemas")) { + this.schemas(model.getSchemas()); + } + if (model.wasPropertyExplicitlySet("meta")) { + this.meta(model.getMeta()); + } + if (model.wasPropertyExplicitlySet("idcsCreatedBy")) { + this.idcsCreatedBy(model.getIdcsCreatedBy()); + } + if (model.wasPropertyExplicitlySet("idcsLastModifiedBy")) { + this.idcsLastModifiedBy(model.getIdcsLastModifiedBy()); + } + if (model.wasPropertyExplicitlySet("idcsPreventedOperations")) { + this.idcsPreventedOperations(model.getIdcsPreventedOperations()); + } + if (model.wasPropertyExplicitlySet("tags")) { + this.tags(model.getTags()); + } + if (model.wasPropertyExplicitlySet("deleteInProgress")) { + this.deleteInProgress(model.getDeleteInProgress()); + } + if (model.wasPropertyExplicitlySet("idcsLastUpgradedInRelease")) { + this.idcsLastUpgradedInRelease(model.getIdcsLastUpgradedInRelease()); + } + if (model.wasPropertyExplicitlySet("domainOcid")) { + this.domainOcid(model.getDomainOcid()); + } + if (model.wasPropertyExplicitlySet("compartmentOcid")) { + this.compartmentOcid(model.getCompartmentOcid()); + } + if (model.wasPropertyExplicitlySet("tenancyOcid")) { + this.tenancyOcid(model.getTenancyOcid()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("enabled")) { + this.enabled(model.getEnabled()); + } + if (model.wasPropertyExplicitlySet("accountLinkingEnabled")) { + this.accountLinkingEnabled(model.getAccountLinkingEnabled()); + } + if (model.wasPropertyExplicitlySet("socialJitProvisioningEnabled")) { + this.socialJitProvisioningEnabled(model.getSocialJitProvisioningEnabled()); + } + if (model.wasPropertyExplicitlySet("jitProvGroupStaticListEnabled")) { + this.jitProvGroupStaticListEnabled(model.getJitProvGroupStaticListEnabled()); + } + if (model.wasPropertyExplicitlySet("jitProvAssignedGroups")) { + this.jitProvAssignedGroups(model.getJitProvAssignedGroups()); + } + if (model.wasPropertyExplicitlySet("registrationEnabled")) { + this.registrationEnabled(model.getRegistrationEnabled()); + } + if (model.wasPropertyExplicitlySet("autoRedirectEnabled")) { + this.autoRedirectEnabled(model.getAutoRedirectEnabled()); + } + if (model.wasPropertyExplicitlySet("showOnLogin")) { + this.showOnLogin(model.getShowOnLogin()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("idAttribute")) { + this.idAttribute(model.getIdAttribute()); + } + if (model.wasPropertyExplicitlySet("authzUrl")) { + this.authzUrl(model.getAuthzUrl()); + } + if (model.wasPropertyExplicitlySet("accessTokenUrl")) { + this.accessTokenUrl(model.getAccessTokenUrl()); + } + if (model.wasPropertyExplicitlySet("profileUrl")) { + this.profileUrl(model.getProfileUrl()); + } + if (model.wasPropertyExplicitlySet("scope")) { + this.scope(model.getScope()); + } + if (model.wasPropertyExplicitlySet("adminScope")) { + this.adminScope(model.getAdminScope()); + } + if (model.wasPropertyExplicitlySet("consumerKey")) { + this.consumerKey(model.getConsumerKey()); + } + if (model.wasPropertyExplicitlySet("consumerSecret")) { + this.consumerSecret(model.getConsumerSecret()); + } + if (model.wasPropertyExplicitlySet("serviceProviderName")) { + this.serviceProviderName(model.getServiceProviderName()); + } + if (model.wasPropertyExplicitlySet("clockSkewInSeconds")) { + this.clockSkewInSeconds(model.getClockSkewInSeconds()); + } + if (model.wasPropertyExplicitlySet("redirectUrl")) { + this.redirectUrl(model.getRedirectUrl()); + } + if (model.wasPropertyExplicitlySet("iconUrl")) { + this.iconUrl(model.getIconUrl()); + } + if (model.wasPropertyExplicitlySet("discoveryUrl")) { + this.discoveryUrl(model.getDiscoveryUrl()); + } + if (model.wasPropertyExplicitlySet("clientCredentialInPayload")) { + this.clientCredentialInPayload(model.getClientCredentialInPayload()); + } + if (model.wasPropertyExplicitlySet("refreshTokenUrl")) { + this.refreshTokenUrl(model.getRefreshTokenUrl()); + } + if (model.wasPropertyExplicitlySet("relayIdpParamMappings")) { + this.relayIdpParamMappings(model.getRelayIdpParamMappings()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: always + * - type: string + * - uniqueness: global + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: always + * - type: string + * - uniqueness: global + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Unique OCI identifier for the SCIM Resource. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: false + * - returned: default + * - type: string + * - uniqueness: global + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ocid") + private final String ocid; + + /** + * Unique OCI identifier for the SCIM Resource. + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: false + * - returned: default + * - type: string + * - uniqueness: global + * @return the value + **/ + public String getOcid() { + return ocid; + } + + /** + * REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \\"enterprise\\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schemas") + private final java.util.List schemas; + + /** + * REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \\"enterprise\\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public java.util.List getSchemas() { + return schemas; + } + + @com.fasterxml.jackson.annotation.JsonProperty("meta") + private final Meta meta; + + public Meta getMeta() { + return meta; + } + + @com.fasterxml.jackson.annotation.JsonProperty("idcsCreatedBy") + private final IdcsCreatedBy idcsCreatedBy; + + public IdcsCreatedBy getIdcsCreatedBy() { + return idcsCreatedBy; + } + + @com.fasterxml.jackson.annotation.JsonProperty("idcsLastModifiedBy") + private final IdcsLastModifiedBy idcsLastModifiedBy; + + public IdcsLastModifiedBy getIdcsLastModifiedBy() { + return idcsLastModifiedBy; + } + + /** + * Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: true + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idcsPreventedOperations") + private final java.util.List idcsPreventedOperations; + + /** + * Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: true + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + * @return the value + **/ + public java.util.List getIdcsPreventedOperations() { + return idcsPreventedOperations; + } + + /** + * A list of tags on this resource. + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [key, value] + * - idcsSearchable: true + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: request + * - type: complex + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tags") + private final java.util.List tags; + + /** + * A list of tags on this resource. + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [key, value] + * - idcsSearchable: true + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: request + * - type: complex + * - uniqueness: none + * @return the value + **/ + public java.util.List getTags() { + return tags; + } + + /** + * A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deleteInProgress") + private final Boolean deleteInProgress; + + /** + * A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * @return the value + **/ + public Boolean getDeleteInProgress() { + return deleteInProgress; + } + + /** + * The release number when the resource was upgraded. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idcsLastUpgradedInRelease") + private final String idcsLastUpgradedInRelease; + + /** + * The release number when the resource was upgraded. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getIdcsLastUpgradedInRelease() { + return idcsLastUpgradedInRelease; + } + + /** + * OCI Domain Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("domainOcid") + private final String domainOcid; + + /** + * OCI Domain Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getDomainOcid() { + return domainOcid; + } + + /** + * OCI Compartment Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentOcid") + private final String compartmentOcid; + + /** + * OCI Compartment Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getCompartmentOcid() { + return compartmentOcid; + } + + /** + * OCI Tenant Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tenancyOcid") + private final String tenancyOcid; + + /** + * OCI Tenant Id (ocid) in which the resource lives. + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getTenancyOcid() { + return tenancyOcid; + } + + /** + * Social provider name + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: always + * - type: string + * - uniqueness: global + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Social provider name + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: always + * - type: string + * - uniqueness: global + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Social IDP description + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Social IDP description + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Whether the IDP is enabled or not + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enabled") + private final Boolean enabled; + + /** + * Whether the IDP is enabled or not + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: boolean + * - uniqueness: none + * @return the value + **/ + public Boolean getEnabled() { + return enabled; + } + + /** + * Whether account linking is enabled + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("accountLinkingEnabled") + private final Boolean accountLinkingEnabled; + + /** + * Whether account linking is enabled + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: boolean + * - uniqueness: none + * @return the value + **/ + public Boolean getAccountLinkingEnabled() { + return accountLinkingEnabled; + } + + /** + * Whether Social JIT Provisioning is enabled + *

+ **Added In:** 2307282043 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("socialJitProvisioningEnabled") + private final Boolean socialJitProvisioningEnabled; + + /** + * Whether Social JIT Provisioning is enabled + *

+ **Added In:** 2307282043 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * @return the value + **/ + public Boolean getSocialJitProvisioningEnabled() { + return socialJitProvisioningEnabled; + } + + /** + * Set to true to indicate Social JIT User Provisioning Groups should be assigned from a static list + *

+ **Added In:** 2309290043 + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("jitProvGroupStaticListEnabled") + private final Boolean jitProvGroupStaticListEnabled; + + /** + * Set to true to indicate Social JIT User Provisioning Groups should be assigned from a static list + *

+ **Added In:** 2309290043 + *

+ **SCIM++ Properties:** + * - caseExact: false + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * @return the value + **/ + public Boolean getJitProvGroupStaticListEnabled() { + return jitProvGroupStaticListEnabled; + } + + /** + * Lists the groups each social JIT-provisioned user is a member. Just-in-Time user-provisioning applies this static list when jitProvGroupStaticListEnabled:true. + *

+ **Added In:** 2309290043 + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [value] + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: complex + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("jitProvAssignedGroups") + private final java.util.List jitProvAssignedGroups; + + /** + * Lists the groups each social JIT-provisioned user is a member. Just-in-Time user-provisioning applies this static list when jitProvGroupStaticListEnabled:true. + *

+ **Added In:** 2309290043 + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [value] + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: complex + * - uniqueness: none + * @return the value + **/ + public java.util.List getJitProvAssignedGroups() { + return jitProvAssignedGroups; + } + + /** + * Whether registration is enabled + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("registrationEnabled") + private final Boolean registrationEnabled; + + /** + * Whether registration is enabled + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: boolean + * - uniqueness: none + * @return the value + **/ + public Boolean getRegistrationEnabled() { + return registrationEnabled; + } + + /** + * Whether social auto redirect is enabled. The IDP policy should be configured with only one Social IDP, and without username/password selected. + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("autoRedirectEnabled") + private final Boolean autoRedirectEnabled; + + /** + * Whether social auto redirect is enabled. The IDP policy should be configured with only one Social IDP, and without username/password selected. + *

+ **Added In:** 2310202314 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * @return the value + **/ + public Boolean getAutoRedirectEnabled() { + return autoRedirectEnabled; + } + + /** + * Whether show on login + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("showOnLogin") + private final Boolean showOnLogin; + + /** + * Whether show on login + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: boolean + * - uniqueness: none + * @return the value + **/ + public Boolean getShowOnLogin() { + return showOnLogin; + } + + /** + * Status + *

+ **Added In:** 17.4.6 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + public enum Status { + Created("created"), + Deleted("deleted"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Status.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Status + *

+ **Added In:** 17.4.6 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final Status status; + + /** + * Status + *

+ **Added In:** 17.4.6 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public Status getStatus() { + return status; + } + + /** + * Id attribute used for account linking + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("idAttribute") + private final String idAttribute; + + /** + * Id attribute used for account linking + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: immutable + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getIdAttribute() { + return idAttribute; + } + + /** + * Social IDP Authorization URL + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("authzUrl") + private final String authzUrl; + + /** + * Social IDP Authorization URL + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getAuthzUrl() { + return authzUrl; + } + + /** + * Social IDP Access token URL + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("accessTokenUrl") + private final String accessTokenUrl; + + /** + * Social IDP Access token URL + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getAccessTokenUrl() { + return accessTokenUrl; + } + + /** + * Social IDP User profile URL + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("profileUrl") + private final String profileUrl; + + /** + * Social IDP User profile URL + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getProfileUrl() { + return profileUrl; + } + + /** + * Scope to request + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scope") + private final java.util.List scope; + + /** + * Scope to request + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public java.util.List getScope() { + return scope; + } + + /** + * Admin scope to request + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("adminScope") + private final java.util.List adminScope; + + /** + * Admin scope to request + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public java.util.List getAdminScope() { + return adminScope; + } + + /** + * Social IDP Client Application Client ID + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("consumerKey") + private final String consumerKey; + + /** + * Social IDP Client Application Client ID + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getConsumerKey() { + return consumerKey; + } + + /** + * Social IDP Client Application Client Secret + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - idcsSensitive: encrypt + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("consumerSecret") + private final String consumerSecret; + + /** + * Social IDP Client Application Client Secret + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - idcsSensitive: encrypt + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getConsumerSecret() { + return consumerSecret; + } + + /** + * Service Provider Name + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceProviderName") + private final String serviceProviderName; + + /** + * Service Provider Name + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: immutable + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getServiceProviderName() { + return serviceProviderName; + } + + /** + * Social IDP allowed clock skew time + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: integer + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockSkewInSeconds") + private final Integer clockSkewInSeconds; + + /** + * Social IDP allowed clock skew time + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: integer + * - uniqueness: none + * @return the value + **/ + public Integer getClockSkewInSeconds() { + return clockSkewInSeconds; + } + + /** + * redirect URL for social idp + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("redirectUrl") + private final String redirectUrl; + + /** + * redirect URL for social idp + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getRedirectUrl() { + return redirectUrl; + } + + /** + * ICON URL for social idp + *

+ **Added In:** 17.4.6 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("iconUrl") + private final String iconUrl; + + /** + * ICON URL for social idp + *

+ **Added In:** 17.4.6 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getIconUrl() { + return iconUrl; + } + + /** + * Discovery URL + *

+ **Added In:** 17.4.6 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("discoveryUrl") + private final String discoveryUrl; + + /** + * Discovery URL + *

+ **Added In:** 17.4.6 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getDiscoveryUrl() { + return discoveryUrl; + } + + /** + * Whether the client credential is contained in payload + *

+ **Added In:** 18.4.2 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clientCredentialInPayload") + private final Boolean clientCredentialInPayload; + + /** + * Whether the client credential is contained in payload + *

+ **Added In:** 18.4.2 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: boolean + * - uniqueness: none + * @return the value + **/ + public Boolean getClientCredentialInPayload() { + return clientCredentialInPayload; + } + + /** + * Social IDP Refresh token URL + *

+ **Added In:** 19.1.4 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("refreshTokenUrl") + private final String refreshTokenUrl; + + /** + * Social IDP Refresh token URL + *

+ **Added In:** 19.1.4 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getRefreshTokenUrl() { + return refreshTokenUrl; + } + + /** + * Relay Param variable for Social IDP + *

+ **Added In:** 2305190132 + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [relayParamKey] + * - idcsSearchable: true + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: complex + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("relayIdpParamMappings") + private final java.util.List relayIdpParamMappings; + + /** + * Relay Param variable for Social IDP + *

+ **Added In:** 2305190132 + *

+ **SCIM++ Properties:** + * - idcsCompositeKey: [relayParamKey] + * - idcsSearchable: true + * - multiValued: true + * - mutability: readWrite + * - required: false + * - returned: default + * - type: complex + * - uniqueness: none + * @return the value + **/ + public java.util.List getRelayIdpParamMappings() { + return relayIdpParamMappings; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SocialIdentityProvider("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", ocid=").append(String.valueOf(this.ocid)); + sb.append(", schemas=").append(String.valueOf(this.schemas)); + sb.append(", meta=").append(String.valueOf(this.meta)); + sb.append(", idcsCreatedBy=").append(String.valueOf(this.idcsCreatedBy)); + sb.append(", idcsLastModifiedBy=").append(String.valueOf(this.idcsLastModifiedBy)); + sb.append(", idcsPreventedOperations=") + .append(String.valueOf(this.idcsPreventedOperations)); + sb.append(", tags=").append(String.valueOf(this.tags)); + sb.append(", deleteInProgress=").append(String.valueOf(this.deleteInProgress)); + sb.append(", idcsLastUpgradedInRelease=") + .append(String.valueOf(this.idcsLastUpgradedInRelease)); + sb.append(", domainOcid=").append(String.valueOf(this.domainOcid)); + sb.append(", compartmentOcid=").append(String.valueOf(this.compartmentOcid)); + sb.append(", tenancyOcid=").append(String.valueOf(this.tenancyOcid)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", enabled=").append(String.valueOf(this.enabled)); + sb.append(", accountLinkingEnabled=").append(String.valueOf(this.accountLinkingEnabled)); + sb.append(", socialJitProvisioningEnabled=") + .append(String.valueOf(this.socialJitProvisioningEnabled)); + sb.append(", jitProvGroupStaticListEnabled=") + .append(String.valueOf(this.jitProvGroupStaticListEnabled)); + sb.append(", jitProvAssignedGroups=").append(String.valueOf(this.jitProvAssignedGroups)); + sb.append(", registrationEnabled=").append(String.valueOf(this.registrationEnabled)); + sb.append(", autoRedirectEnabled=").append(String.valueOf(this.autoRedirectEnabled)); + sb.append(", showOnLogin=").append(String.valueOf(this.showOnLogin)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", idAttribute=").append(String.valueOf(this.idAttribute)); + sb.append(", authzUrl=").append(String.valueOf(this.authzUrl)); + sb.append(", accessTokenUrl=").append(String.valueOf(this.accessTokenUrl)); + sb.append(", profileUrl=").append(String.valueOf(this.profileUrl)); + sb.append(", scope=").append(String.valueOf(this.scope)); + sb.append(", adminScope=").append(String.valueOf(this.adminScope)); + sb.append(", consumerKey=").append(String.valueOf(this.consumerKey)); + sb.append(", consumerSecret=").append(String.valueOf(this.consumerSecret)); + sb.append(", serviceProviderName=").append(String.valueOf(this.serviceProviderName)); + sb.append(", clockSkewInSeconds=").append(String.valueOf(this.clockSkewInSeconds)); + sb.append(", redirectUrl=").append(String.valueOf(this.redirectUrl)); + sb.append(", iconUrl=").append(String.valueOf(this.iconUrl)); + sb.append(", discoveryUrl=").append(String.valueOf(this.discoveryUrl)); + sb.append(", clientCredentialInPayload=") + .append(String.valueOf(this.clientCredentialInPayload)); + sb.append(", refreshTokenUrl=").append(String.valueOf(this.refreshTokenUrl)); + sb.append(", relayIdpParamMappings=").append(String.valueOf(this.relayIdpParamMappings)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SocialIdentityProvider)) { + return false; + } + + SocialIdentityProvider other = (SocialIdentityProvider) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.ocid, other.ocid) + && java.util.Objects.equals(this.schemas, other.schemas) + && java.util.Objects.equals(this.meta, other.meta) + && java.util.Objects.equals(this.idcsCreatedBy, other.idcsCreatedBy) + && java.util.Objects.equals(this.idcsLastModifiedBy, other.idcsLastModifiedBy) + && java.util.Objects.equals( + this.idcsPreventedOperations, other.idcsPreventedOperations) + && java.util.Objects.equals(this.tags, other.tags) + && java.util.Objects.equals(this.deleteInProgress, other.deleteInProgress) + && java.util.Objects.equals( + this.idcsLastUpgradedInRelease, other.idcsLastUpgradedInRelease) + && java.util.Objects.equals(this.domainOcid, other.domainOcid) + && java.util.Objects.equals(this.compartmentOcid, other.compartmentOcid) + && java.util.Objects.equals(this.tenancyOcid, other.tenancyOcid) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.enabled, other.enabled) + && java.util.Objects.equals(this.accountLinkingEnabled, other.accountLinkingEnabled) + && java.util.Objects.equals( + this.socialJitProvisioningEnabled, other.socialJitProvisioningEnabled) + && java.util.Objects.equals( + this.jitProvGroupStaticListEnabled, other.jitProvGroupStaticListEnabled) + && java.util.Objects.equals(this.jitProvAssignedGroups, other.jitProvAssignedGroups) + && java.util.Objects.equals(this.registrationEnabled, other.registrationEnabled) + && java.util.Objects.equals(this.autoRedirectEnabled, other.autoRedirectEnabled) + && java.util.Objects.equals(this.showOnLogin, other.showOnLogin) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.idAttribute, other.idAttribute) + && java.util.Objects.equals(this.authzUrl, other.authzUrl) + && java.util.Objects.equals(this.accessTokenUrl, other.accessTokenUrl) + && java.util.Objects.equals(this.profileUrl, other.profileUrl) + && java.util.Objects.equals(this.scope, other.scope) + && java.util.Objects.equals(this.adminScope, other.adminScope) + && java.util.Objects.equals(this.consumerKey, other.consumerKey) + && java.util.Objects.equals(this.consumerSecret, other.consumerSecret) + && java.util.Objects.equals(this.serviceProviderName, other.serviceProviderName) + && java.util.Objects.equals(this.clockSkewInSeconds, other.clockSkewInSeconds) + && java.util.Objects.equals(this.redirectUrl, other.redirectUrl) + && java.util.Objects.equals(this.iconUrl, other.iconUrl) + && java.util.Objects.equals(this.discoveryUrl, other.discoveryUrl) + && java.util.Objects.equals( + this.clientCredentialInPayload, other.clientCredentialInPayload) + && java.util.Objects.equals(this.refreshTokenUrl, other.refreshTokenUrl) + && java.util.Objects.equals(this.relayIdpParamMappings, other.relayIdpParamMappings) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.ocid == null ? 43 : this.ocid.hashCode()); + result = (result * PRIME) + (this.schemas == null ? 43 : this.schemas.hashCode()); + result = (result * PRIME) + (this.meta == null ? 43 : this.meta.hashCode()); + result = + (result * PRIME) + + (this.idcsCreatedBy == null ? 43 : this.idcsCreatedBy.hashCode()); + result = + (result * PRIME) + + (this.idcsLastModifiedBy == null + ? 43 + : this.idcsLastModifiedBy.hashCode()); + result = + (result * PRIME) + + (this.idcsPreventedOperations == null + ? 43 + : this.idcsPreventedOperations.hashCode()); + result = (result * PRIME) + (this.tags == null ? 43 : this.tags.hashCode()); + result = + (result * PRIME) + + (this.deleteInProgress == null ? 43 : this.deleteInProgress.hashCode()); + result = + (result * PRIME) + + (this.idcsLastUpgradedInRelease == null + ? 43 + : this.idcsLastUpgradedInRelease.hashCode()); + result = (result * PRIME) + (this.domainOcid == null ? 43 : this.domainOcid.hashCode()); + result = + (result * PRIME) + + (this.compartmentOcid == null ? 43 : this.compartmentOcid.hashCode()); + result = (result * PRIME) + (this.tenancyOcid == null ? 43 : this.tenancyOcid.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.enabled == null ? 43 : this.enabled.hashCode()); + result = + (result * PRIME) + + (this.accountLinkingEnabled == null + ? 43 + : this.accountLinkingEnabled.hashCode()); + result = + (result * PRIME) + + (this.socialJitProvisioningEnabled == null + ? 43 + : this.socialJitProvisioningEnabled.hashCode()); + result = + (result * PRIME) + + (this.jitProvGroupStaticListEnabled == null + ? 43 + : this.jitProvGroupStaticListEnabled.hashCode()); + result = + (result * PRIME) + + (this.jitProvAssignedGroups == null + ? 43 + : this.jitProvAssignedGroups.hashCode()); + result = + (result * PRIME) + + (this.registrationEnabled == null + ? 43 + : this.registrationEnabled.hashCode()); + result = + (result * PRIME) + + (this.autoRedirectEnabled == null + ? 43 + : this.autoRedirectEnabled.hashCode()); + result = (result * PRIME) + (this.showOnLogin == null ? 43 : this.showOnLogin.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.idAttribute == null ? 43 : this.idAttribute.hashCode()); + result = (result * PRIME) + (this.authzUrl == null ? 43 : this.authzUrl.hashCode()); + result = + (result * PRIME) + + (this.accessTokenUrl == null ? 43 : this.accessTokenUrl.hashCode()); + result = (result * PRIME) + (this.profileUrl == null ? 43 : this.profileUrl.hashCode()); + result = (result * PRIME) + (this.scope == null ? 43 : this.scope.hashCode()); + result = (result * PRIME) + (this.adminScope == null ? 43 : this.adminScope.hashCode()); + result = (result * PRIME) + (this.consumerKey == null ? 43 : this.consumerKey.hashCode()); + result = + (result * PRIME) + + (this.consumerSecret == null ? 43 : this.consumerSecret.hashCode()); + result = + (result * PRIME) + + (this.serviceProviderName == null + ? 43 + : this.serviceProviderName.hashCode()); + result = + (result * PRIME) + + (this.clockSkewInSeconds == null + ? 43 + : this.clockSkewInSeconds.hashCode()); + result = (result * PRIME) + (this.redirectUrl == null ? 43 : this.redirectUrl.hashCode()); + result = (result * PRIME) + (this.iconUrl == null ? 43 : this.iconUrl.hashCode()); + result = (result * PRIME) + (this.discoveryUrl == null ? 43 : this.discoveryUrl.hashCode()); + result = + (result * PRIME) + + (this.clientCredentialInPayload == null + ? 43 + : this.clientCredentialInPayload.hashCode()); + result = + (result * PRIME) + + (this.refreshTokenUrl == null ? 43 : this.refreshTokenUrl.hashCode()); + result = + (result * PRIME) + + (this.relayIdpParamMappings == null + ? 43 + : this.relayIdpParamMappings.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/SocialIdentityProviderJitProvAssignedGroups.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/SocialIdentityProviderJitProvAssignedGroups.java new file mode 100644 index 00000000000..c54860affe9 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/SocialIdentityProviderJitProvAssignedGroups.java @@ -0,0 +1,349 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.model; + +/** + * Lists the groups each social JIT-provisioned user is a member. Just-in-Time user-provisioning applies this static list when jitProvGroupStaticListEnabled:true. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SocialIdentityProviderJitProvAssignedGroups.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SocialIdentityProviderJitProvAssignedGroups + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"value", "ref", "display"}) + public SocialIdentityProviderJitProvAssignedGroups(String value, String ref, String display) { + super(); + this.value = value; + this.ref = ref; + this.display = display; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Group identifier + *

+ **Added In:** 2309290043 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + /** + * Group identifier + *

+ **Added In:** 2309290043 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @param value the value to set + * @return this builder + **/ + public Builder value(String value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + /** + * Group URI + *

+ **Added In:** 2309290043 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: reference + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("$ref") + private String ref; + + /** + * Group URI + *

+ **Added In:** 2309290043 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: reference + * - uniqueness: none + * @param ref the value to set + * @return this builder + **/ + public Builder ref(String ref) { + this.ref = ref; + this.__explicitlySet__.add("ref"); + return this; + } + /** + * A human readable name, primarily used for display purposes. READ-ONLY. + *

+ **Added In:** 2309290043 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("display") + private String display; + + /** + * A human readable name, primarily used for display purposes. READ-ONLY. + *

+ **Added In:** 2309290043 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + * @param display the value to set + * @return this builder + **/ + public Builder display(String display) { + this.display = display; + this.__explicitlySet__.add("display"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SocialIdentityProviderJitProvAssignedGroups build() { + SocialIdentityProviderJitProvAssignedGroups model = + new SocialIdentityProviderJitProvAssignedGroups( + this.value, this.ref, this.display); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SocialIdentityProviderJitProvAssignedGroups model) { + if (model.wasPropertyExplicitlySet("value")) { + this.value(model.getValue()); + } + if (model.wasPropertyExplicitlySet("ref")) { + this.ref(model.getRef()); + } + if (model.wasPropertyExplicitlySet("display")) { + this.display(model.getDisplay()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Group identifier + *

+ **Added In:** 2309290043 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + private final String value; + + /** + * Group identifier + *

+ **Added In:** 2309290043 + *

+ **SCIM++ Properties:** + * - caseExact: true + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getValue() { + return value; + } + + /** + * Group URI + *

+ **Added In:** 2309290043 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: reference + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("$ref") + private final String ref; + + /** + * Group URI + *

+ **Added In:** 2309290043 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: default + * - type: reference + * - uniqueness: none + * @return the value + **/ + public String getRef() { + return ref; + } + + /** + * A human readable name, primarily used for display purposes. READ-ONLY. + *

+ **Added In:** 2309290043 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("display") + private final String display; + + /** + * A human readable name, primarily used for display purposes. READ-ONLY. + *

+ **Added In:** 2309290043 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readOnly + * - required: false + * - returned: request + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getDisplay() { + return display; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SocialIdentityProviderJitProvAssignedGroups("); + sb.append("super=").append(super.toString()); + sb.append("value=").append(String.valueOf(this.value)); + sb.append(", ref=").append(String.valueOf(this.ref)); + sb.append(", display=").append(String.valueOf(this.display)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SocialIdentityProviderJitProvAssignedGroups)) { + return false; + } + + SocialIdentityProviderJitProvAssignedGroups other = + (SocialIdentityProviderJitProvAssignedGroups) o; + return java.util.Objects.equals(this.value, other.value) + && java.util.Objects.equals(this.ref, other.ref) + && java.util.Objects.equals(this.display, other.display) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); + result = (result * PRIME) + (this.ref == null ? 43 : this.ref.hashCode()); + result = (result * PRIME) + (this.display == null ? 43 : this.display.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/SocialIdentityProviderRelayIdpParamMappings.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/SocialIdentityProviderRelayIdpParamMappings.java new file mode 100644 index 00000000000..8cadee9ebf8 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/SocialIdentityProviderRelayIdpParamMappings.java @@ -0,0 +1,269 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.model; + +/** + * Relay Param variable for Social IDP + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SocialIdentityProviderRelayIdpParamMappings.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SocialIdentityProviderRelayIdpParamMappings + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"relayParamKey", "relayParamValue"}) + public SocialIdentityProviderRelayIdpParamMappings( + String relayParamKey, String relayParamValue) { + super(); + this.relayParamKey = relayParamKey; + this.relayParamValue = relayParamValue; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Key or name of the relayParam. + *

+ **Added In:** 2305190132 + *

+ **SCIM++ Properties:** + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("relayParamKey") + private String relayParamKey; + + /** + * Key or name of the relayParam. + *

+ **Added In:** 2305190132 + *

+ **SCIM++ Properties:** + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @param relayParamKey the value to set + * @return this builder + **/ + public Builder relayParamKey(String relayParamKey) { + this.relayParamKey = relayParamKey; + this.__explicitlySet__.add("relayParamKey"); + return this; + } + /** + * Value of the relayParam (if defined) + *

+ **Added In:** 2305190132 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("relayParamValue") + private String relayParamValue; + + /** + * Value of the relayParam (if defined) + *

+ **Added In:** 2305190132 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @param relayParamValue the value to set + * @return this builder + **/ + public Builder relayParamValue(String relayParamValue) { + this.relayParamValue = relayParamValue; + this.__explicitlySet__.add("relayParamValue"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SocialIdentityProviderRelayIdpParamMappings build() { + SocialIdentityProviderRelayIdpParamMappings model = + new SocialIdentityProviderRelayIdpParamMappings( + this.relayParamKey, this.relayParamValue); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SocialIdentityProviderRelayIdpParamMappings model) { + if (model.wasPropertyExplicitlySet("relayParamKey")) { + this.relayParamKey(model.getRelayParamKey()); + } + if (model.wasPropertyExplicitlySet("relayParamValue")) { + this.relayParamValue(model.getRelayParamValue()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Key or name of the relayParam. + *

+ **Added In:** 2305190132 + *

+ **SCIM++ Properties:** + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("relayParamKey") + private final String relayParamKey; + + /** + * Key or name of the relayParam. + *

+ **Added In:** 2305190132 + *

+ **SCIM++ Properties:** + * - idcsSearchable: true + * - multiValued: false + * - mutability: readWrite + * - required: true + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getRelayParamKey() { + return relayParamKey; + } + + /** + * Value of the relayParam (if defined) + *

+ **Added In:** 2305190132 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + **/ + @com.fasterxml.jackson.annotation.JsonProperty("relayParamValue") + private final String relayParamValue; + + /** + * Value of the relayParam (if defined) + *

+ **Added In:** 2305190132 + *

+ **SCIM++ Properties:** + * - idcsSearchable: false + * - multiValued: false + * - mutability: readWrite + * - required: false + * - returned: default + * - type: string + * - uniqueness: none + * @return the value + **/ + public String getRelayParamValue() { + return relayParamValue; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SocialIdentityProviderRelayIdpParamMappings("); + sb.append("super=").append(super.toString()); + sb.append("relayParamKey=").append(String.valueOf(this.relayParamKey)); + sb.append(", relayParamValue=").append(String.valueOf(this.relayParamValue)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SocialIdentityProviderRelayIdpParamMappings)) { + return false; + } + + SocialIdentityProviderRelayIdpParamMappings other = + (SocialIdentityProviderRelayIdpParamMappings) o; + return java.util.Objects.equals(this.relayParamKey, other.relayParamKey) + && java.util.Objects.equals(this.relayParamValue, other.relayParamValue) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.relayParamKey == null ? 43 : this.relayParamKey.hashCode()); + result = + (result * PRIME) + + (this.relayParamValue == null ? 43 : this.relayParamValue.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/SocialIdentityProviderSearchRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/SocialIdentityProviderSearchRequest.java new file mode 100644 index 00000000000..96e798e9f3d --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/SocialIdentityProviderSearchRequest.java @@ -0,0 +1,423 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.model; + +/** + * Clients MAY execute queries without passing parameters on the URL by using the HTTP POST verb combined with the **.search** path extension. The inclusion of **.search** on the end of a valid SCIM endpoint SHALL be used to indicate the HTTP POST verb is intended to be a query operation. To create a new query result set, a SCIM client sends an HTTP POST request to the desired SCIM resource endpoint (ending in **.search**). The body of the POST request MAY include any of the parameters. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SocialIdentityProviderSearchRequest.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SocialIdentityProviderSearchRequest + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "schemas", + "attributes", + "attributeSets", + "filter", + "sortBy", + "sortOrder", + "startIndex", + "count" + }) + public SocialIdentityProviderSearchRequest( + java.util.List schemas, + java.util.List attributes, + java.util.List attributeSets, + String filter, + String sortBy, + SortOrder sortOrder, + Integer startIndex, + Integer count) { + super(); + this.schemas = schemas; + this.attributes = attributes; + this.attributeSets = attributeSets; + this.filter = filter; + this.sortBy = sortBy; + this.sortOrder = sortOrder; + this.startIndex = startIndex; + this.count = count; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schemas") + private java.util.List schemas; + + /** + * The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + * @param schemas the value to set + * @return this builder + **/ + public Builder schemas(java.util.List schemas) { + this.schemas = schemas; + this.__explicitlySet__.add("schemas"); + return this; + } + /** + * A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation ([Section 3.10](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See ([additional retrieval query parameters](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attributes") + private java.util.List attributes; + + /** + * A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation ([Section 3.10](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See ([additional retrieval query parameters](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + * @param attributes the value to set + * @return this builder + **/ + public Builder attributes(java.util.List attributes) { + this.attributes = attributes; + this.__explicitlySet__.add("attributes"); + return this; + } + /** + * A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attributeSets") + private java.util.List attributeSets; + + /** + * A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + * @param attributeSets the value to set + * @return this builder + **/ + public Builder attributeSets(java.util.List attributeSets) { + this.attributeSets = attributeSets; + this.__explicitlySet__.add("attributeSets"); + return this; + } + /** + * The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See [Section 3.4.2.2](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("filter") + private String filter; + + /** + * The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See [Section 3.4.2.2](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2). OPTIONAL. + * @param filter the value to set + * @return this builder + **/ + public Builder filter(String filter) { + this.filter = filter; + this.__explicitlySet__.add("filter"); + return this; + } + /** + * A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation ([Section 3.10](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See [Sorting section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sortBy") + private String sortBy; + + /** + * A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation ([Section 3.10](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See [Sorting section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3). OPTIONAL. + * @param sortBy the value to set + * @return this builder + **/ + public Builder sortBy(String sortBy) { + this.sortBy = sortBy; + this.__explicitlySet__.add("sortBy"); + return this; + } + /** + * A string that indicates the order in which the sortBy parameter is applied. Allowed values are "ascending" and "descending". See ([Sorting Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sortOrder") + private SortOrder sortOrder; + + /** + * A string that indicates the order in which the sortBy parameter is applied. Allowed values are "ascending" and "descending". See ([Sorting Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + * @param sortOrder the value to set + * @return this builder + **/ + public Builder sortOrder(SortOrder sortOrder) { + this.sortOrder = sortOrder; + this.__explicitlySet__.add("sortOrder"); + return this; + } + /** + * An integer that indicates the 1-based index of the first query result. See [Pagination Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startIndex") + private Integer startIndex; + + /** + * An integer that indicates the 1-based index of the first query result. See [Pagination Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4). OPTIONAL. + * @param startIndex the value to set + * @return this builder + **/ + public Builder startIndex(Integer startIndex) { + this.startIndex = startIndex; + this.__explicitlySet__.add("startIndex"); + return this; + } + /** + * An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. ([Section 3.4.2.4](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4)). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("count") + private Integer count; + + /** + * An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. ([Section 3.4.2.4](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4)). OPTIONAL. + * @param count the value to set + * @return this builder + **/ + public Builder count(Integer count) { + this.count = count; + this.__explicitlySet__.add("count"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SocialIdentityProviderSearchRequest build() { + SocialIdentityProviderSearchRequest model = + new SocialIdentityProviderSearchRequest( + this.schemas, + this.attributes, + this.attributeSets, + this.filter, + this.sortBy, + this.sortOrder, + this.startIndex, + this.count); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SocialIdentityProviderSearchRequest model) { + if (model.wasPropertyExplicitlySet("schemas")) { + this.schemas(model.getSchemas()); + } + if (model.wasPropertyExplicitlySet("attributes")) { + this.attributes(model.getAttributes()); + } + if (model.wasPropertyExplicitlySet("attributeSets")) { + this.attributeSets(model.getAttributeSets()); + } + if (model.wasPropertyExplicitlySet("filter")) { + this.filter(model.getFilter()); + } + if (model.wasPropertyExplicitlySet("sortBy")) { + this.sortBy(model.getSortBy()); + } + if (model.wasPropertyExplicitlySet("sortOrder")) { + this.sortOrder(model.getSortOrder()); + } + if (model.wasPropertyExplicitlySet("startIndex")) { + this.startIndex(model.getStartIndex()); + } + if (model.wasPropertyExplicitlySet("count")) { + this.count(model.getCount()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schemas") + private final java.util.List schemas; + + /** + * The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + * @return the value + **/ + public java.util.List getSchemas() { + return schemas; + } + + /** + * A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation ([Section 3.10](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See ([additional retrieval query parameters](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attributes") + private final java.util.List attributes; + + /** + * A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation ([Section 3.10](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See ([additional retrieval query parameters](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + * @return the value + **/ + public java.util.List getAttributes() { + return attributes; + } + + /** + * A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attributeSets") + private final java.util.List attributeSets; + + /** + * A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + * @return the value + **/ + public java.util.List getAttributeSets() { + return attributeSets; + } + + /** + * The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See [Section 3.4.2.2](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("filter") + private final String filter; + + /** + * The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See [Section 3.4.2.2](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2). OPTIONAL. + * @return the value + **/ + public String getFilter() { + return filter; + } + + /** + * A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation ([Section 3.10](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See [Sorting section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sortBy") + private final String sortBy; + + /** + * A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation ([Section 3.10](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See [Sorting section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3). OPTIONAL. + * @return the value + **/ + public String getSortBy() { + return sortBy; + } + + /** + * A string that indicates the order in which the sortBy parameter is applied. Allowed values are "ascending" and "descending". See ([Sorting Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sortOrder") + private final SortOrder sortOrder; + + /** + * A string that indicates the order in which the sortBy parameter is applied. Allowed values are "ascending" and "descending". See ([Sorting Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + * @return the value + **/ + public SortOrder getSortOrder() { + return sortOrder; + } + + /** + * An integer that indicates the 1-based index of the first query result. See [Pagination Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startIndex") + private final Integer startIndex; + + /** + * An integer that indicates the 1-based index of the first query result. See [Pagination Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4). OPTIONAL. + * @return the value + **/ + public Integer getStartIndex() { + return startIndex; + } + + /** + * An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. ([Section 3.4.2.4](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4)). OPTIONAL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("count") + private final Integer count; + + /** + * An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. ([Section 3.4.2.4](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4)). OPTIONAL. + * @return the value + **/ + public Integer getCount() { + return count; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SocialIdentityProviderSearchRequest("); + sb.append("super=").append(super.toString()); + sb.append("schemas=").append(String.valueOf(this.schemas)); + sb.append(", attributes=").append(String.valueOf(this.attributes)); + sb.append(", attributeSets=").append(String.valueOf(this.attributeSets)); + sb.append(", filter=").append(String.valueOf(this.filter)); + sb.append(", sortBy=").append(String.valueOf(this.sortBy)); + sb.append(", sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(", startIndex=").append(String.valueOf(this.startIndex)); + sb.append(", count=").append(String.valueOf(this.count)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SocialIdentityProviderSearchRequest)) { + return false; + } + + SocialIdentityProviderSearchRequest other = (SocialIdentityProviderSearchRequest) o; + return java.util.Objects.equals(this.schemas, other.schemas) + && java.util.Objects.equals(this.attributes, other.attributes) + && java.util.Objects.equals(this.attributeSets, other.attributeSets) + && java.util.Objects.equals(this.filter, other.filter) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.startIndex, other.startIndex) + && java.util.Objects.equals(this.count, other.count) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.schemas == null ? 43 : this.schemas.hashCode()); + result = (result * PRIME) + (this.attributes == null ? 43 : this.attributes.hashCode()); + result = + (result * PRIME) + + (this.attributeSets == null ? 43 : this.attributeSets.hashCode()); + result = (result * PRIME) + (this.filter == null ? 43 : this.filter.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.startIndex == null ? 43 : this.startIndex.hashCode()); + result = (result * PRIME) + (this.count == null ? 43 : this.count.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/SocialIdentityProviders.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/SocialIdentityProviders.java new file mode 100644 index 00000000000..90270e91bf6 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/model/SocialIdentityProviders.java @@ -0,0 +1,301 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.model; + +/** + * The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SocialIdentityProviders.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SocialIdentityProviders + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "schemas", + "totalResults", + "resources", + "startIndex", + "itemsPerPage" + }) + public SocialIdentityProviders( + java.util.List schemas, + Integer totalResults, + java.util.List resources, + Integer startIndex, + Integer itemsPerPage) { + super(); + this.schemas = schemas; + this.totalResults = totalResults; + this.resources = resources; + this.startIndex = startIndex; + this.itemsPerPage = itemsPerPage; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schemas") + private java.util.List schemas; + + /** + * The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + * @param schemas the value to set + * @return this builder + **/ + public Builder schemas(java.util.List schemas) { + this.schemas = schemas; + this.__explicitlySet__.add("schemas"); + return this; + } + /** + * The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalResults") + private Integer totalResults; + + /** + * The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + * @param totalResults the value to set + * @return this builder + **/ + public Builder totalResults(Integer totalResults) { + this.totalResults = totalResults; + this.__explicitlySet__.add("totalResults"); + return this; + } + /** + * A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("Resources") + private java.util.List resources; + + /** + * A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + * @param resources the value to set + * @return this builder + **/ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** + * The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startIndex") + private Integer startIndex; + + /** + * The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + * @param startIndex the value to set + * @return this builder + **/ + public Builder startIndex(Integer startIndex) { + this.startIndex = startIndex; + this.__explicitlySet__.add("startIndex"); + return this; + } + /** + * The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("itemsPerPage") + private Integer itemsPerPage; + + /** + * The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + * @param itemsPerPage the value to set + * @return this builder + **/ + public Builder itemsPerPage(Integer itemsPerPage) { + this.itemsPerPage = itemsPerPage; + this.__explicitlySet__.add("itemsPerPage"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SocialIdentityProviders build() { + SocialIdentityProviders model = + new SocialIdentityProviders( + this.schemas, + this.totalResults, + this.resources, + this.startIndex, + this.itemsPerPage); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SocialIdentityProviders model) { + if (model.wasPropertyExplicitlySet("schemas")) { + this.schemas(model.getSchemas()); + } + if (model.wasPropertyExplicitlySet("totalResults")) { + this.totalResults(model.getTotalResults()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("startIndex")) { + this.startIndex(model.getStartIndex()); + } + if (model.wasPropertyExplicitlySet("itemsPerPage")) { + this.itemsPerPage(model.getItemsPerPage()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schemas") + private final java.util.List schemas; + + /** + * The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + * @return the value + **/ + public java.util.List getSchemas() { + return schemas; + } + + /** + * The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalResults") + private final Integer totalResults; + + /** + * The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + * @return the value + **/ + public Integer getTotalResults() { + return totalResults; + } + + /** + * A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("Resources") + private final java.util.List resources; + + /** + * A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + /** + * The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startIndex") + private final Integer startIndex; + + /** + * The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + * @return the value + **/ + public Integer getStartIndex() { + return startIndex; + } + + /** + * The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("itemsPerPage") + private final Integer itemsPerPage; + + /** + * The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + * @return the value + **/ + public Integer getItemsPerPage() { + return itemsPerPage; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SocialIdentityProviders("); + sb.append("super=").append(super.toString()); + sb.append("schemas=").append(String.valueOf(this.schemas)); + sb.append(", totalResults=").append(String.valueOf(this.totalResults)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", startIndex=").append(String.valueOf(this.startIndex)); + sb.append(", itemsPerPage=").append(String.valueOf(this.itemsPerPage)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SocialIdentityProviders)) { + return false; + } + + SocialIdentityProviders other = (SocialIdentityProviders) o; + return java.util.Objects.equals(this.schemas, other.schemas) + && java.util.Objects.equals(this.totalResults, other.totalResults) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.startIndex, other.startIndex) + && java.util.Objects.equals(this.itemsPerPage, other.itemsPerPage) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.schemas == null ? 43 : this.schemas.hashCode()); + result = (result * PRIME) + (this.totalResults == null ? 43 : this.totalResults.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = (result * PRIME) + (this.startIndex == null ? 43 : this.startIndex.hashCode()); + result = (result * PRIME) + (this.itemsPerPage == null ? 43 : this.itemsPerPage.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/CreateConditionRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/CreateConditionRequest.java index d4d78504cae..0bda54fe861 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/CreateConditionRequest.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/CreateConditionRequest.java @@ -60,12 +60,14 @@ public java.util.List getAtt * Condition schema. *

* Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -78,12 +80,14 @@ public java.util.List getAtt * Condition schema. *

* Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -197,12 +201,14 @@ public Builder attributeSets(AttributeSets singularValue) { * Condition schema. *

* Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -215,12 +221,14 @@ public Builder attributeSets(AttributeSets singularValue) { * Condition schema. *

* Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/CreatePolicyRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/CreatePolicyRequest.java index b08ac97d64a..d8f53307b6c 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/CreatePolicyRequest.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/CreatePolicyRequest.java @@ -60,12 +60,14 @@ public java.util.List getAtt * Policy schema. *

* Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -78,12 +80,14 @@ public java.util.List getAtt * Policy schema. *

* Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -197,12 +201,14 @@ public Builder attributeSets(AttributeSets singularValue) { * Policy schema. *

* Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -215,12 +221,14 @@ public Builder attributeSets(AttributeSets singularValue) { * Policy schema. *

* Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/CreateRestoreOciConsolePolicyRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/CreateRestoreOciConsolePolicyRequest.java new file mode 100644 index 00000000000..d86e62578bb --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/CreateRestoreOciConsolePolicyRequest.java @@ -0,0 +1,363 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.requests; + +import com.oracle.bmc.identitydomains.model.*; +/** + * Example: Click here to see how to use CreateRestoreOciConsolePolicyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class CreateRestoreOciConsolePolicyRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.identitydomains.model.RestoreOciConsolePolicy> { + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + public String getAuthorization() { + return authorization; + } + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + public String getResourceTypeSchemaVersion() { + return resourceTypeSchemaVersion; + } + /** + * RestoreOciConsolePolicy schema. + *

+ * Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

+ * - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + *

+ * Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

+ * - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + * - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + * + */ + private com.oracle.bmc.identitydomains.model.RestoreOciConsolePolicy restoreOciConsolePolicy; + + /** + * RestoreOciConsolePolicy schema. + *

+ * Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

+ * - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + *

+ * Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

+ * - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + * - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + * + */ + public com.oracle.bmc.identitydomains.model.RestoreOciConsolePolicy + getRestoreOciConsolePolicy() { + return restoreOciConsolePolicy; + } + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.identitydomains.model.RestoreOciConsolePolicy getBody$() { + return restoreOciConsolePolicy; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateRestoreOciConsolePolicyRequest, + com.oracle.bmc.identitydomains.model.RestoreOciConsolePolicy> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization = null; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + * @param authorization the value to set + * @return this builder instance + */ + public Builder authorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion = null; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + * @param resourceTypeSchemaVersion the value to set + * @return this builder instance + */ + public Builder resourceTypeSchemaVersion(String resourceTypeSchemaVersion) { + this.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + return this; + } + + /** + * RestoreOciConsolePolicy schema. + *

+ * Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

+ * - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + *

+ * Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

+ * - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + * - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + * + */ + private com.oracle.bmc.identitydomains.model.RestoreOciConsolePolicy + restoreOciConsolePolicy = null; + + /** + * RestoreOciConsolePolicy schema. + *

+ * Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

+ * - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + *

+ * Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

+ * - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + * - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + * + * @param restoreOciConsolePolicy the value to set + * @return this builder instance + */ + public Builder restoreOciConsolePolicy( + com.oracle.bmc.identitydomains.model.RestoreOciConsolePolicy + restoreOciConsolePolicy) { + this.restoreOciConsolePolicy = restoreOciConsolePolicy; + return this; + } + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken = null; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateRestoreOciConsolePolicyRequest o) { + authorization(o.getAuthorization()); + resourceTypeSchemaVersion(o.getResourceTypeSchemaVersion()); + restoreOciConsolePolicy(o.getRestoreOciConsolePolicy()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateRestoreOciConsolePolicyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateRestoreOciConsolePolicyRequest + */ + public CreateRestoreOciConsolePolicyRequest build() { + CreateRestoreOciConsolePolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.identitydomains.model.RestoreOciConsolePolicy body) { + restoreOciConsolePolicy(body); + return this; + } + + /** + * Build the instance of CreateRestoreOciConsolePolicyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateRestoreOciConsolePolicyRequest + */ + public CreateRestoreOciConsolePolicyRequest buildWithoutInvocationCallback() { + CreateRestoreOciConsolePolicyRequest request = + new CreateRestoreOciConsolePolicyRequest(); + request.authorization = authorization; + request.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + request.restoreOciConsolePolicy = restoreOciConsolePolicy; + request.opcRetryToken = opcRetryToken; + return request; + // new CreateRestoreOciConsolePolicyRequest(authorization, resourceTypeSchemaVersion, restoreOciConsolePolicy, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .authorization(authorization) + .resourceTypeSchemaVersion(resourceTypeSchemaVersion) + .restoreOciConsolePolicy(restoreOciConsolePolicy) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",authorization=").append(String.valueOf(this.authorization)); + sb.append(",resourceTypeSchemaVersion=") + .append(String.valueOf(this.resourceTypeSchemaVersion)); + sb.append(",restoreOciConsolePolicy=").append(String.valueOf(this.restoreOciConsolePolicy)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateRestoreOciConsolePolicyRequest)) { + return false; + } + + CreateRestoreOciConsolePolicyRequest other = (CreateRestoreOciConsolePolicyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.authorization, other.authorization) + && java.util.Objects.equals( + this.resourceTypeSchemaVersion, other.resourceTypeSchemaVersion) + && java.util.Objects.equals( + this.restoreOciConsolePolicy, other.restoreOciConsolePolicy) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.authorization == null ? 43 : this.authorization.hashCode()); + result = + (result * PRIME) + + (this.resourceTypeSchemaVersion == null + ? 43 + : this.resourceTypeSchemaVersion.hashCode()); + result = + (result * PRIME) + + (this.restoreOciConsolePolicy == null + ? 43 + : this.restoreOciConsolePolicy.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/CreateRuleRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/CreateRuleRequest.java index 1bad611537e..f516ef82c6c 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/CreateRuleRequest.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/CreateRuleRequest.java @@ -60,12 +60,14 @@ public java.util.List getAtt * Rule schema. *

* Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -78,12 +80,14 @@ public java.util.List getAtt * Rule schema. *

* Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -197,12 +201,14 @@ public Builder attributeSets(AttributeSets singularValue) { * Rule schema. *

* Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -215,12 +221,14 @@ public Builder attributeSets(AttributeSets singularValue) { * Rule schema. *

* Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/CreateSocialIdentityProviderRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/CreateSocialIdentityProviderRequest.java new file mode 100644 index 00000000000..00f88cd21d2 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/CreateSocialIdentityProviderRequest.java @@ -0,0 +1,361 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.requests; + +import com.oracle.bmc.identitydomains.model.*; +/** + * Example: Click here to see how to use CreateSocialIdentityProviderRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class CreateSocialIdentityProviderRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.identitydomains.model.SocialIdentityProvider> { + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + public String getAuthorization() { + return authorization; + } + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + public String getResourceTypeSchemaVersion() { + return resourceTypeSchemaVersion; + } + /** + * SocialIdentityProvider schema. + *

+ * Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

+ * - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + *

+ * Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

+ * - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + * - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + * + */ + private com.oracle.bmc.identitydomains.model.SocialIdentityProvider socialIdentityProvider; + + /** + * SocialIdentityProvider schema. + *

+ * Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

+ * - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + *

+ * Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

+ * - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + * - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + * + */ + public com.oracle.bmc.identitydomains.model.SocialIdentityProvider getSocialIdentityProvider() { + return socialIdentityProvider; + } + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.identitydomains.model.SocialIdentityProvider getBody$() { + return socialIdentityProvider; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateSocialIdentityProviderRequest, + com.oracle.bmc.identitydomains.model.SocialIdentityProvider> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization = null; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + * @param authorization the value to set + * @return this builder instance + */ + public Builder authorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion = null; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + * @param resourceTypeSchemaVersion the value to set + * @return this builder instance + */ + public Builder resourceTypeSchemaVersion(String resourceTypeSchemaVersion) { + this.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + return this; + } + + /** + * SocialIdentityProvider schema. + *

+ * Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

+ * - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + *

+ * Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

+ * - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + * - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + * + */ + private com.oracle.bmc.identitydomains.model.SocialIdentityProvider socialIdentityProvider = + null; + + /** + * SocialIdentityProvider schema. + *

+ * Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

+ * - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + *

+ * Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

+ * - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + * - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + * + * @param socialIdentityProvider the value to set + * @return this builder instance + */ + public Builder socialIdentityProvider( + com.oracle.bmc.identitydomains.model.SocialIdentityProvider + socialIdentityProvider) { + this.socialIdentityProvider = socialIdentityProvider; + return this; + } + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken = null; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateSocialIdentityProviderRequest o) { + authorization(o.getAuthorization()); + resourceTypeSchemaVersion(o.getResourceTypeSchemaVersion()); + socialIdentityProvider(o.getSocialIdentityProvider()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateSocialIdentityProviderRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateSocialIdentityProviderRequest + */ + public CreateSocialIdentityProviderRequest build() { + CreateSocialIdentityProviderRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.identitydomains.model.SocialIdentityProvider body) { + socialIdentityProvider(body); + return this; + } + + /** + * Build the instance of CreateSocialIdentityProviderRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateSocialIdentityProviderRequest + */ + public CreateSocialIdentityProviderRequest buildWithoutInvocationCallback() { + CreateSocialIdentityProviderRequest request = new CreateSocialIdentityProviderRequest(); + request.authorization = authorization; + request.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + request.socialIdentityProvider = socialIdentityProvider; + request.opcRetryToken = opcRetryToken; + return request; + // new CreateSocialIdentityProviderRequest(authorization, resourceTypeSchemaVersion, socialIdentityProvider, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .authorization(authorization) + .resourceTypeSchemaVersion(resourceTypeSchemaVersion) + .socialIdentityProvider(socialIdentityProvider) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",authorization=").append(String.valueOf(this.authorization)); + sb.append(",resourceTypeSchemaVersion=") + .append(String.valueOf(this.resourceTypeSchemaVersion)); + sb.append(",socialIdentityProvider=").append(String.valueOf(this.socialIdentityProvider)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSocialIdentityProviderRequest)) { + return false; + } + + CreateSocialIdentityProviderRequest other = (CreateSocialIdentityProviderRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.authorization, other.authorization) + && java.util.Objects.equals( + this.resourceTypeSchemaVersion, other.resourceTypeSchemaVersion) + && java.util.Objects.equals( + this.socialIdentityProvider, other.socialIdentityProvider) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.authorization == null ? 43 : this.authorization.hashCode()); + result = + (result * PRIME) + + (this.resourceTypeSchemaVersion == null + ? 43 + : this.resourceTypeSchemaVersion.hashCode()); + result = + (result * PRIME) + + (this.socialIdentityProvider == null + ? 43 + : this.socialIdentityProvider.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/DeleteSocialIdentityProviderRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/DeleteSocialIdentityProviderRequest.java new file mode 100644 index 00000000000..c51fc05ec9f --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/DeleteSocialIdentityProviderRequest.java @@ -0,0 +1,340 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.requests; + +import com.oracle.bmc.identitydomains.model.*; +/** + * Example: Click here to see how to use DeleteSocialIdentityProviderRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class DeleteSocialIdentityProviderRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * ID of the resource + */ + private String socialIdentityProviderId; + + /** + * ID of the resource + */ + public String getSocialIdentityProviderId() { + return socialIdentityProviderId; + } + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + public String getAuthorization() { + return authorization; + } + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + public String getResourceTypeSchemaVersion() { + return resourceTypeSchemaVersion; + } + /** + * To force delete the resource and all its references (if any). + */ + private Boolean forceDelete; + + /** + * To force delete the resource and all its references (if any). + */ + public Boolean getForceDelete() { + return forceDelete; + } + /** + * Used to make the request conditional on an ETag + */ + private String ifMatch; + + /** + * Used to make the request conditional on an ETag + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteSocialIdentityProviderRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * ID of the resource + */ + private String socialIdentityProviderId = null; + + /** + * ID of the resource + * @param socialIdentityProviderId the value to set + * @return this builder instance + */ + public Builder socialIdentityProviderId(String socialIdentityProviderId) { + this.socialIdentityProviderId = socialIdentityProviderId; + return this; + } + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization = null; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + * @param authorization the value to set + * @return this builder instance + */ + public Builder authorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion = null; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + * @param resourceTypeSchemaVersion the value to set + * @return this builder instance + */ + public Builder resourceTypeSchemaVersion(String resourceTypeSchemaVersion) { + this.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + return this; + } + + /** + * To force delete the resource and all its references (if any). + */ + private Boolean forceDelete = null; + + /** + * To force delete the resource and all its references (if any). + * @param forceDelete the value to set + * @return this builder instance + */ + public Builder forceDelete(Boolean forceDelete) { + this.forceDelete = forceDelete; + return this; + } + + /** + * Used to make the request conditional on an ETag + */ + private String ifMatch = null; + + /** + * Used to make the request conditional on an ETag + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken = null; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteSocialIdentityProviderRequest o) { + socialIdentityProviderId(o.getSocialIdentityProviderId()); + authorization(o.getAuthorization()); + resourceTypeSchemaVersion(o.getResourceTypeSchemaVersion()); + forceDelete(o.getForceDelete()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteSocialIdentityProviderRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteSocialIdentityProviderRequest + */ + public DeleteSocialIdentityProviderRequest build() { + DeleteSocialIdentityProviderRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteSocialIdentityProviderRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteSocialIdentityProviderRequest + */ + public DeleteSocialIdentityProviderRequest buildWithoutInvocationCallback() { + DeleteSocialIdentityProviderRequest request = new DeleteSocialIdentityProviderRequest(); + request.socialIdentityProviderId = socialIdentityProviderId; + request.authorization = authorization; + request.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + request.forceDelete = forceDelete; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new DeleteSocialIdentityProviderRequest(socialIdentityProviderId, authorization, resourceTypeSchemaVersion, forceDelete, ifMatch, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .socialIdentityProviderId(socialIdentityProviderId) + .authorization(authorization) + .resourceTypeSchemaVersion(resourceTypeSchemaVersion) + .forceDelete(forceDelete) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",socialIdentityProviderId=") + .append(String.valueOf(this.socialIdentityProviderId)); + sb.append(",authorization=").append(String.valueOf(this.authorization)); + sb.append(",resourceTypeSchemaVersion=") + .append(String.valueOf(this.resourceTypeSchemaVersion)); + sb.append(",forceDelete=").append(String.valueOf(this.forceDelete)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSocialIdentityProviderRequest)) { + return false; + } + + DeleteSocialIdentityProviderRequest other = (DeleteSocialIdentityProviderRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.socialIdentityProviderId, other.socialIdentityProviderId) + && java.util.Objects.equals(this.authorization, other.authorization) + && java.util.Objects.equals( + this.resourceTypeSchemaVersion, other.resourceTypeSchemaVersion) + && java.util.Objects.equals(this.forceDelete, other.forceDelete) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.socialIdentityProviderId == null + ? 43 + : this.socialIdentityProviderId.hashCode()); + result = + (result * PRIME) + + (this.authorization == null ? 43 : this.authorization.hashCode()); + result = + (result * PRIME) + + (this.resourceTypeSchemaVersion == null + ? 43 + : this.resourceTypeSchemaVersion.hashCode()); + result = (result * PRIME) + (this.forceDelete == null ? 43 : this.forceDelete.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/GetOciConsoleSignOnPolicyConsentRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/GetOciConsoleSignOnPolicyConsentRequest.java new file mode 100644 index 00000000000..b074376132a --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/GetOciConsoleSignOnPolicyConsentRequest.java @@ -0,0 +1,354 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.requests; + +import com.oracle.bmc.identitydomains.model.*; +/** + * Example: Click here to see how to use GetOciConsoleSignOnPolicyConsentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class GetOciConsoleSignOnPolicyConsentRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * ID of the resource + */ + private String ociConsoleSignOnPolicyConsentId; + + /** + * ID of the resource + */ + public String getOciConsoleSignOnPolicyConsentId() { + return ociConsoleSignOnPolicyConsentId; + } + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + public String getAuthorization() { + return authorization; + } + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + public String getResourceTypeSchemaVersion() { + return resourceTypeSchemaVersion; + } + /** + * A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + */ + private String attributes; + + /** + * A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + */ + public String getAttributes() { + return attributes; + } + /** + * A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + */ + private java.util.List attributeSets; + + /** + * A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + */ + public java.util.List getAttributeSets() { + return attributeSets; + } + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetOciConsoleSignOnPolicyConsentRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * ID of the resource + */ + private String ociConsoleSignOnPolicyConsentId = null; + + /** + * ID of the resource + * @param ociConsoleSignOnPolicyConsentId the value to set + * @return this builder instance + */ + public Builder ociConsoleSignOnPolicyConsentId(String ociConsoleSignOnPolicyConsentId) { + this.ociConsoleSignOnPolicyConsentId = ociConsoleSignOnPolicyConsentId; + return this; + } + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization = null; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + * @param authorization the value to set + * @return this builder instance + */ + public Builder authorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion = null; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + * @param resourceTypeSchemaVersion the value to set + * @return this builder instance + */ + public Builder resourceTypeSchemaVersion(String resourceTypeSchemaVersion) { + this.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + return this; + } + + /** + * A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + */ + private String attributes = null; + + /** + * A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + * @param attributes the value to set + * @return this builder instance + */ + public Builder attributes(String attributes) { + this.attributes = attributes; + return this; + } + + /** + * A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + */ + private java.util.List attributeSets = + null; + + /** + * A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + * @param attributeSets the value to set + * @return this builder instance + */ + public Builder attributeSets( + java.util.List attributeSets) { + this.attributeSets = attributeSets; + return this; + } + + /** + * Singular setter. A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder attributeSets(AttributeSets singularValue) { + return this.attributeSets(java.util.Arrays.asList(singularValue)); + } + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken = null; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetOciConsoleSignOnPolicyConsentRequest o) { + ociConsoleSignOnPolicyConsentId(o.getOciConsoleSignOnPolicyConsentId()); + authorization(o.getAuthorization()); + resourceTypeSchemaVersion(o.getResourceTypeSchemaVersion()); + attributes(o.getAttributes()); + attributeSets(o.getAttributeSets()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetOciConsoleSignOnPolicyConsentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetOciConsoleSignOnPolicyConsentRequest + */ + public GetOciConsoleSignOnPolicyConsentRequest build() { + GetOciConsoleSignOnPolicyConsentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetOciConsoleSignOnPolicyConsentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetOciConsoleSignOnPolicyConsentRequest + */ + public GetOciConsoleSignOnPolicyConsentRequest buildWithoutInvocationCallback() { + GetOciConsoleSignOnPolicyConsentRequest request = + new GetOciConsoleSignOnPolicyConsentRequest(); + request.ociConsoleSignOnPolicyConsentId = ociConsoleSignOnPolicyConsentId; + request.authorization = authorization; + request.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + request.attributes = attributes; + request.attributeSets = attributeSets; + request.opcRetryToken = opcRetryToken; + return request; + // new GetOciConsoleSignOnPolicyConsentRequest(ociConsoleSignOnPolicyConsentId, authorization, resourceTypeSchemaVersion, attributes, attributeSets, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .ociConsoleSignOnPolicyConsentId(ociConsoleSignOnPolicyConsentId) + .authorization(authorization) + .resourceTypeSchemaVersion(resourceTypeSchemaVersion) + .attributes(attributes) + .attributeSets(attributeSets) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",ociConsoleSignOnPolicyConsentId=") + .append(String.valueOf(this.ociConsoleSignOnPolicyConsentId)); + sb.append(",authorization=").append(String.valueOf(this.authorization)); + sb.append(",resourceTypeSchemaVersion=") + .append(String.valueOf(this.resourceTypeSchemaVersion)); + sb.append(",attributes=").append(String.valueOf(this.attributes)); + sb.append(",attributeSets=").append(String.valueOf(this.attributeSets)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetOciConsoleSignOnPolicyConsentRequest)) { + return false; + } + + GetOciConsoleSignOnPolicyConsentRequest other = (GetOciConsoleSignOnPolicyConsentRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.ociConsoleSignOnPolicyConsentId, other.ociConsoleSignOnPolicyConsentId) + && java.util.Objects.equals(this.authorization, other.authorization) + && java.util.Objects.equals( + this.resourceTypeSchemaVersion, other.resourceTypeSchemaVersion) + && java.util.Objects.equals(this.attributes, other.attributes) + && java.util.Objects.equals(this.attributeSets, other.attributeSets) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.ociConsoleSignOnPolicyConsentId == null + ? 43 + : this.ociConsoleSignOnPolicyConsentId.hashCode()); + result = + (result * PRIME) + + (this.authorization == null ? 43 : this.authorization.hashCode()); + result = + (result * PRIME) + + (this.resourceTypeSchemaVersion == null + ? 43 + : this.resourceTypeSchemaVersion.hashCode()); + result = (result * PRIME) + (this.attributes == null ? 43 : this.attributes.hashCode()); + result = + (result * PRIME) + + (this.attributeSets == null ? 43 : this.attributeSets.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/GetSocialIdentityProviderRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/GetSocialIdentityProviderRequest.java new file mode 100644 index 00000000000..7b09746155f --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/GetSocialIdentityProviderRequest.java @@ -0,0 +1,276 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.requests; + +import com.oracle.bmc.identitydomains.model.*; +/** + * Example: Click here to see how to use GetSocialIdentityProviderRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class GetSocialIdentityProviderRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * ID of the resource + */ + private String socialIdentityProviderId; + + /** + * ID of the resource + */ + public String getSocialIdentityProviderId() { + return socialIdentityProviderId; + } + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + public String getAuthorization() { + return authorization; + } + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + public String getResourceTypeSchemaVersion() { + return resourceTypeSchemaVersion; + } + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetSocialIdentityProviderRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * ID of the resource + */ + private String socialIdentityProviderId = null; + + /** + * ID of the resource + * @param socialIdentityProviderId the value to set + * @return this builder instance + */ + public Builder socialIdentityProviderId(String socialIdentityProviderId) { + this.socialIdentityProviderId = socialIdentityProviderId; + return this; + } + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization = null; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + * @param authorization the value to set + * @return this builder instance + */ + public Builder authorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion = null; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + * @param resourceTypeSchemaVersion the value to set + * @return this builder instance + */ + public Builder resourceTypeSchemaVersion(String resourceTypeSchemaVersion) { + this.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + return this; + } + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken = null; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSocialIdentityProviderRequest o) { + socialIdentityProviderId(o.getSocialIdentityProviderId()); + authorization(o.getAuthorization()); + resourceTypeSchemaVersion(o.getResourceTypeSchemaVersion()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetSocialIdentityProviderRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetSocialIdentityProviderRequest + */ + public GetSocialIdentityProviderRequest build() { + GetSocialIdentityProviderRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetSocialIdentityProviderRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetSocialIdentityProviderRequest + */ + public GetSocialIdentityProviderRequest buildWithoutInvocationCallback() { + GetSocialIdentityProviderRequest request = new GetSocialIdentityProviderRequest(); + request.socialIdentityProviderId = socialIdentityProviderId; + request.authorization = authorization; + request.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + request.opcRetryToken = opcRetryToken; + return request; + // new GetSocialIdentityProviderRequest(socialIdentityProviderId, authorization, resourceTypeSchemaVersion, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .socialIdentityProviderId(socialIdentityProviderId) + .authorization(authorization) + .resourceTypeSchemaVersion(resourceTypeSchemaVersion) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",socialIdentityProviderId=") + .append(String.valueOf(this.socialIdentityProviderId)); + sb.append(",authorization=").append(String.valueOf(this.authorization)); + sb.append(",resourceTypeSchemaVersion=") + .append(String.valueOf(this.resourceTypeSchemaVersion)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSocialIdentityProviderRequest)) { + return false; + } + + GetSocialIdentityProviderRequest other = (GetSocialIdentityProviderRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.socialIdentityProviderId, other.socialIdentityProviderId) + && java.util.Objects.equals(this.authorization, other.authorization) + && java.util.Objects.equals( + this.resourceTypeSchemaVersion, other.resourceTypeSchemaVersion) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.socialIdentityProviderId == null + ? 43 + : this.socialIdentityProviderId.hashCode()); + result = + (result * PRIME) + + (this.authorization == null ? 43 : this.authorization.hashCode()); + result = + (result * PRIME) + + (this.resourceTypeSchemaVersion == null + ? 43 + : this.resourceTypeSchemaVersion.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/ListOciConsoleSignOnPolicyConsentsRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/ListOciConsoleSignOnPolicyConsentsRequest.java new file mode 100644 index 00000000000..26337613263 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/ListOciConsoleSignOnPolicyConsentsRequest.java @@ -0,0 +1,541 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.requests; + +import com.oracle.bmc.identitydomains.model.*; +/** + * Example: Click here to see how to use ListOciConsoleSignOnPolicyConsentsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class ListOciConsoleSignOnPolicyConsentsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + */ + private String filter; + + /** + * OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + */ + public String getFilter() { + return filter; + } + /** + * OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + */ + private String sortBy; + + /** + * OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + */ + public String getSortBy() { + return sortBy; + } + /** + * A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See ([Sorting Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + */ + private com.oracle.bmc.identitydomains.model.SortOrder sortOrder; + + /** + * A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See ([Sorting Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + */ + public com.oracle.bmc.identitydomains.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + */ + private Integer startIndex; + + /** + * OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + */ + public Integer getStartIndex() { + return startIndex; + } + /** + * OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + */ + private Integer count; + + /** + * OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + */ + public Integer getCount() { + return count; + } + /** + * A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + */ + private String attributes; + + /** + * A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + */ + public String getAttributes() { + return attributes; + } + /** + * A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + */ + private java.util.List attributeSets; + + /** + * A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + */ + public java.util.List getAttributeSets() { + return attributeSets; + } + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + public String getAuthorization() { + return authorization; + } + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + public String getResourceTypeSchemaVersion() { + return resourceTypeSchemaVersion; + } + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The value of the {@code opc-next-page} response header from the previous 'List' call. + */ + private String page; + + /** + * The value of the {@code opc-next-page} response header from the previous 'List' call. + */ + public String getPage() { + return page; + } + /** + * The maximum number of items to return in a paginated 'List' call. + */ + private Integer limit; + + /** + * The maximum number of items to return in a paginated 'List' call. + */ + public Integer getLimit() { + return limit; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListOciConsoleSignOnPolicyConsentsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + */ + private String filter = null; + + /** + * OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + * @param filter the value to set + * @return this builder instance + */ + public Builder filter(String filter) { + this.filter = filter; + return this; + } + + /** + * OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + */ + private String sortBy = null; + + /** + * OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(String sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See ([Sorting Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + */ + private com.oracle.bmc.identitydomains.model.SortOrder sortOrder = null; + + /** + * A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See ([Sorting Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.identitydomains.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + */ + private Integer startIndex = null; + + /** + * OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + * @param startIndex the value to set + * @return this builder instance + */ + public Builder startIndex(Integer startIndex) { + this.startIndex = startIndex; + return this; + } + + /** + * OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + */ + private Integer count = null; + + /** + * OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + * @param count the value to set + * @return this builder instance + */ + public Builder count(Integer count) { + this.count = count; + return this; + } + + /** + * A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + */ + private String attributes = null; + + /** + * A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + * @param attributes the value to set + * @return this builder instance + */ + public Builder attributes(String attributes) { + this.attributes = attributes; + return this; + } + + /** + * A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + */ + private java.util.List attributeSets = + null; + + /** + * A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + * @param attributeSets the value to set + * @return this builder instance + */ + public Builder attributeSets( + java.util.List attributeSets) { + this.attributeSets = attributeSets; + return this; + } + + /** + * Singular setter. A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder attributeSets(AttributeSets singularValue) { + return this.attributeSets(java.util.Arrays.asList(singularValue)); + } + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization = null; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + * @param authorization the value to set + * @return this builder instance + */ + public Builder authorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion = null; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + * @param resourceTypeSchemaVersion the value to set + * @return this builder instance + */ + public Builder resourceTypeSchemaVersion(String resourceTypeSchemaVersion) { + this.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + return this; + } + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken = null; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The value of the {@code opc-next-page} response header from the previous 'List' call. + */ + private String page = null; + + /** + * The value of the {@code opc-next-page} response header from the previous 'List' call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The maximum number of items to return in a paginated 'List' call. + */ + private Integer limit = null; + + /** + * The maximum number of items to return in a paginated 'List' call. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListOciConsoleSignOnPolicyConsentsRequest o) { + filter(o.getFilter()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + startIndex(o.getStartIndex()); + count(o.getCount()); + attributes(o.getAttributes()); + attributeSets(o.getAttributeSets()); + authorization(o.getAuthorization()); + resourceTypeSchemaVersion(o.getResourceTypeSchemaVersion()); + opcRetryToken(o.getOpcRetryToken()); + page(o.getPage()); + limit(o.getLimit()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListOciConsoleSignOnPolicyConsentsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListOciConsoleSignOnPolicyConsentsRequest + */ + public ListOciConsoleSignOnPolicyConsentsRequest build() { + ListOciConsoleSignOnPolicyConsentsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListOciConsoleSignOnPolicyConsentsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListOciConsoleSignOnPolicyConsentsRequest + */ + public ListOciConsoleSignOnPolicyConsentsRequest buildWithoutInvocationCallback() { + ListOciConsoleSignOnPolicyConsentsRequest request = + new ListOciConsoleSignOnPolicyConsentsRequest(); + request.filter = filter; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.startIndex = startIndex; + request.count = count; + request.attributes = attributes; + request.attributeSets = attributeSets; + request.authorization = authorization; + request.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + request.opcRetryToken = opcRetryToken; + request.page = page; + request.limit = limit; + return request; + // new ListOciConsoleSignOnPolicyConsentsRequest(filter, sortBy, sortOrder, startIndex, count, attributes, attributeSets, authorization, resourceTypeSchemaVersion, opcRetryToken, page, limit); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .filter(filter) + .sortBy(sortBy) + .sortOrder(sortOrder) + .startIndex(startIndex) + .count(count) + .attributes(attributes) + .attributeSets(attributeSets) + .authorization(authorization) + .resourceTypeSchemaVersion(resourceTypeSchemaVersion) + .opcRetryToken(opcRetryToken) + .page(page) + .limit(limit); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",filter=").append(String.valueOf(this.filter)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",startIndex=").append(String.valueOf(this.startIndex)); + sb.append(",count=").append(String.valueOf(this.count)); + sb.append(",attributes=").append(String.valueOf(this.attributes)); + sb.append(",attributeSets=").append(String.valueOf(this.attributeSets)); + sb.append(",authorization=").append(String.valueOf(this.authorization)); + sb.append(",resourceTypeSchemaVersion=") + .append(String.valueOf(this.resourceTypeSchemaVersion)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListOciConsoleSignOnPolicyConsentsRequest)) { + return false; + } + + ListOciConsoleSignOnPolicyConsentsRequest other = + (ListOciConsoleSignOnPolicyConsentsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.filter, other.filter) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.startIndex, other.startIndex) + && java.util.Objects.equals(this.count, other.count) + && java.util.Objects.equals(this.attributes, other.attributes) + && java.util.Objects.equals(this.attributeSets, other.attributeSets) + && java.util.Objects.equals(this.authorization, other.authorization) + && java.util.Objects.equals( + this.resourceTypeSchemaVersion, other.resourceTypeSchemaVersion) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.filter == null ? 43 : this.filter.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.startIndex == null ? 43 : this.startIndex.hashCode()); + result = (result * PRIME) + (this.count == null ? 43 : this.count.hashCode()); + result = (result * PRIME) + (this.attributes == null ? 43 : this.attributes.hashCode()); + result = + (result * PRIME) + + (this.attributeSets == null ? 43 : this.attributeSets.hashCode()); + result = + (result * PRIME) + + (this.authorization == null ? 43 : this.authorization.hashCode()); + result = + (result * PRIME) + + (this.resourceTypeSchemaVersion == null + ? 43 + : this.resourceTypeSchemaVersion.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/ListSocialIdentityProvidersRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/ListSocialIdentityProvidersRequest.java new file mode 100644 index 00000000000..7d5be0b32dd --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/ListSocialIdentityProvidersRequest.java @@ -0,0 +1,462 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.requests; + +import com.oracle.bmc.identitydomains.model.*; +/** + * Example: Click here to see how to use ListSocialIdentityProvidersRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class ListSocialIdentityProvidersRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + */ + private String filter; + + /** + * OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + */ + public String getFilter() { + return filter; + } + /** + * OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + */ + private String sortBy; + + /** + * OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + */ + public String getSortBy() { + return sortBy; + } + /** + * A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See ([Sorting Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + */ + private com.oracle.bmc.identitydomains.model.SortOrder sortOrder; + + /** + * A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See ([Sorting Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + */ + public com.oracle.bmc.identitydomains.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + */ + private Integer startIndex; + + /** + * OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + */ + public Integer getStartIndex() { + return startIndex; + } + /** + * OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + */ + private Integer count; + + /** + * OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + */ + public Integer getCount() { + return count; + } + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + public String getAuthorization() { + return authorization; + } + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + public String getResourceTypeSchemaVersion() { + return resourceTypeSchemaVersion; + } + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The value of the {@code opc-next-page} response header from the previous 'List' call. + */ + private String page; + + /** + * The value of the {@code opc-next-page} response header from the previous 'List' call. + */ + public String getPage() { + return page; + } + /** + * The maximum number of items to return in a paginated 'List' call. + */ + private Integer limit; + + /** + * The maximum number of items to return in a paginated 'List' call. + */ + public Integer getLimit() { + return limit; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListSocialIdentityProvidersRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + */ + private String filter = null; + + /** + * OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + * @param filter the value to set + * @return this builder instance + */ + public Builder filter(String filter) { + this.filter = filter; + return this; + } + + /** + * OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + */ + private String sortBy = null; + + /** + * OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(String sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See ([Sorting Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + */ + private com.oracle.bmc.identitydomains.model.SortOrder sortOrder = null; + + /** + * A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See ([Sorting Section](https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.identitydomains.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + */ + private Integer startIndex = null; + + /** + * OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + * @param startIndex the value to set + * @return this builder instance + */ + public Builder startIndex(Integer startIndex) { + this.startIndex = startIndex; + return this; + } + + /** + * OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + */ + private Integer count = null; + + /** + * OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + * @param count the value to set + * @return this builder instance + */ + public Builder count(Integer count) { + this.count = count; + return this; + } + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization = null; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + * @param authorization the value to set + * @return this builder instance + */ + public Builder authorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion = null; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + * @param resourceTypeSchemaVersion the value to set + * @return this builder instance + */ + public Builder resourceTypeSchemaVersion(String resourceTypeSchemaVersion) { + this.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + return this; + } + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken = null; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The value of the {@code opc-next-page} response header from the previous 'List' call. + */ + private String page = null; + + /** + * The value of the {@code opc-next-page} response header from the previous 'List' call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The maximum number of items to return in a paginated 'List' call. + */ + private Integer limit = null; + + /** + * The maximum number of items to return in a paginated 'List' call. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSocialIdentityProvidersRequest o) { + filter(o.getFilter()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + startIndex(o.getStartIndex()); + count(o.getCount()); + authorization(o.getAuthorization()); + resourceTypeSchemaVersion(o.getResourceTypeSchemaVersion()); + opcRetryToken(o.getOpcRetryToken()); + page(o.getPage()); + limit(o.getLimit()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListSocialIdentityProvidersRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListSocialIdentityProvidersRequest + */ + public ListSocialIdentityProvidersRequest build() { + ListSocialIdentityProvidersRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListSocialIdentityProvidersRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListSocialIdentityProvidersRequest + */ + public ListSocialIdentityProvidersRequest buildWithoutInvocationCallback() { + ListSocialIdentityProvidersRequest request = new ListSocialIdentityProvidersRequest(); + request.filter = filter; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.startIndex = startIndex; + request.count = count; + request.authorization = authorization; + request.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + request.opcRetryToken = opcRetryToken; + request.page = page; + request.limit = limit; + return request; + // new ListSocialIdentityProvidersRequest(filter, sortBy, sortOrder, startIndex, count, authorization, resourceTypeSchemaVersion, opcRetryToken, page, limit); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .filter(filter) + .sortBy(sortBy) + .sortOrder(sortOrder) + .startIndex(startIndex) + .count(count) + .authorization(authorization) + .resourceTypeSchemaVersion(resourceTypeSchemaVersion) + .opcRetryToken(opcRetryToken) + .page(page) + .limit(limit); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",filter=").append(String.valueOf(this.filter)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",startIndex=").append(String.valueOf(this.startIndex)); + sb.append(",count=").append(String.valueOf(this.count)); + sb.append(",authorization=").append(String.valueOf(this.authorization)); + sb.append(",resourceTypeSchemaVersion=") + .append(String.valueOf(this.resourceTypeSchemaVersion)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSocialIdentityProvidersRequest)) { + return false; + } + + ListSocialIdentityProvidersRequest other = (ListSocialIdentityProvidersRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.filter, other.filter) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.startIndex, other.startIndex) + && java.util.Objects.equals(this.count, other.count) + && java.util.Objects.equals(this.authorization, other.authorization) + && java.util.Objects.equals( + this.resourceTypeSchemaVersion, other.resourceTypeSchemaVersion) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.filter == null ? 43 : this.filter.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.startIndex == null ? 43 : this.startIndex.hashCode()); + result = (result * PRIME) + (this.count == null ? 43 : this.count.hashCode()); + result = + (result * PRIME) + + (this.authorization == null ? 43 : this.authorization.hashCode()); + result = + (result * PRIME) + + (this.resourceTypeSchemaVersion == null + ? 43 + : this.resourceTypeSchemaVersion.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PatchConditionRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PatchConditionRequest.java index 44ab087a26e..596d34ba999 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PatchConditionRequest.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PatchConditionRequest.java @@ -71,12 +71,14 @@ public java.util.List getAtt * Update the Condition with SCIM Patch schema. *

* Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -89,12 +91,14 @@ public java.util.List getAtt * Update the Condition with SCIM Patch schema. *

* Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -234,12 +238,14 @@ public Builder attributeSets(AttributeSets singularValue) { * Update the Condition with SCIM Patch schema. *

* Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -252,12 +258,14 @@ public Builder attributeSets(AttributeSets singularValue) { * Update the Condition with SCIM Patch schema. *

* Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PatchPolicyRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PatchPolicyRequest.java index 12828aa33fb..8f95a67d496 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PatchPolicyRequest.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PatchPolicyRequest.java @@ -71,12 +71,14 @@ public java.util.List getAtt * Update the Policy with SCIM Patch schema. *

* Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -89,12 +91,14 @@ public java.util.List getAtt * Update the Policy with SCIM Patch schema. *

* Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -234,12 +238,14 @@ public Builder attributeSets(AttributeSets singularValue) { * Update the Policy with SCIM Patch schema. *

* Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -252,12 +258,14 @@ public Builder attributeSets(AttributeSets singularValue) { * Update the Policy with SCIM Patch schema. *

* Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PatchRuleRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PatchRuleRequest.java index 20b72d9c2ac..3077f5a7725 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PatchRuleRequest.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PatchRuleRequest.java @@ -71,12 +71,14 @@ public java.util.List getAtt * Update the Rule with SCIM Patch schema. *

* Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -89,12 +91,14 @@ public java.util.List getAtt * Update the Rule with SCIM Patch schema. *

* Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -234,12 +238,14 @@ public Builder attributeSets(AttributeSets singularValue) { * Update the Rule with SCIM Patch schema. *

* Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -252,12 +258,14 @@ public Builder attributeSets(AttributeSets singularValue) { * Update the Rule with SCIM Patch schema. *

* Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PatchSocialIdentityProviderRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PatchSocialIdentityProviderRequest.java new file mode 100644 index 00000000000..a97c189405c --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PatchSocialIdentityProviderRequest.java @@ -0,0 +1,422 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.requests; + +import com.oracle.bmc.identitydomains.model.*; +/** + * Example: Click here to see how to use PatchSocialIdentityProviderRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class PatchSocialIdentityProviderRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * ID of the resource + */ + private String socialIdentityProviderId; + + /** + * ID of the resource + */ + public String getSocialIdentityProviderId() { + return socialIdentityProviderId; + } + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + public String getAuthorization() { + return authorization; + } + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + public String getResourceTypeSchemaVersion() { + return resourceTypeSchemaVersion; + } + /** + * Update the SocialIdentityProvider with SCIM Patch schema. + *

+ * Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

+ * - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + *

+ * Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

+ * - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + * - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + * + */ + private com.oracle.bmc.identitydomains.model.PatchOp patchOp; + + /** + * Update the SocialIdentityProvider with SCIM Patch schema. + *

+ * Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

+ * - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + *

+ * Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

+ * - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + * - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + * + */ + public com.oracle.bmc.identitydomains.model.PatchOp getPatchOp() { + return patchOp; + } + /** + * Used to make the request conditional on an ETag + */ + private String ifMatch; + + /** + * Used to make the request conditional on an ETag + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.identitydomains.model.PatchOp getBody$() { + return patchOp; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + PatchSocialIdentityProviderRequest, + com.oracle.bmc.identitydomains.model.PatchOp> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * ID of the resource + */ + private String socialIdentityProviderId = null; + + /** + * ID of the resource + * @param socialIdentityProviderId the value to set + * @return this builder instance + */ + public Builder socialIdentityProviderId(String socialIdentityProviderId) { + this.socialIdentityProviderId = socialIdentityProviderId; + return this; + } + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization = null; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + * @param authorization the value to set + * @return this builder instance + */ + public Builder authorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion = null; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + * @param resourceTypeSchemaVersion the value to set + * @return this builder instance + */ + public Builder resourceTypeSchemaVersion(String resourceTypeSchemaVersion) { + this.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + return this; + } + + /** + * Update the SocialIdentityProvider with SCIM Patch schema. + *

+ * Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

+ * - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + *

+ * Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

+ * - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + * - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + * + */ + private com.oracle.bmc.identitydomains.model.PatchOp patchOp = null; + + /** + * Update the SocialIdentityProvider with SCIM Patch schema. + *

+ * Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

+ * - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + *

+ * Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

+ * - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + * - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + * + * @param patchOp the value to set + * @return this builder instance + */ + public Builder patchOp(com.oracle.bmc.identitydomains.model.PatchOp patchOp) { + this.patchOp = patchOp; + return this; + } + + /** + * Used to make the request conditional on an ETag + */ + private String ifMatch = null; + + /** + * Used to make the request conditional on an ETag + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken = null; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(PatchSocialIdentityProviderRequest o) { + socialIdentityProviderId(o.getSocialIdentityProviderId()); + authorization(o.getAuthorization()); + resourceTypeSchemaVersion(o.getResourceTypeSchemaVersion()); + patchOp(o.getPatchOp()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of PatchSocialIdentityProviderRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of PatchSocialIdentityProviderRequest + */ + public PatchSocialIdentityProviderRequest build() { + PatchSocialIdentityProviderRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.identitydomains.model.PatchOp body) { + patchOp(body); + return this; + } + + /** + * Build the instance of PatchSocialIdentityProviderRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of PatchSocialIdentityProviderRequest + */ + public PatchSocialIdentityProviderRequest buildWithoutInvocationCallback() { + PatchSocialIdentityProviderRequest request = new PatchSocialIdentityProviderRequest(); + request.socialIdentityProviderId = socialIdentityProviderId; + request.authorization = authorization; + request.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + request.patchOp = patchOp; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new PatchSocialIdentityProviderRequest(socialIdentityProviderId, authorization, resourceTypeSchemaVersion, patchOp, ifMatch, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .socialIdentityProviderId(socialIdentityProviderId) + .authorization(authorization) + .resourceTypeSchemaVersion(resourceTypeSchemaVersion) + .patchOp(patchOp) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",socialIdentityProviderId=") + .append(String.valueOf(this.socialIdentityProviderId)); + sb.append(",authorization=").append(String.valueOf(this.authorization)); + sb.append(",resourceTypeSchemaVersion=") + .append(String.valueOf(this.resourceTypeSchemaVersion)); + sb.append(",patchOp=").append(String.valueOf(this.patchOp)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchSocialIdentityProviderRequest)) { + return false; + } + + PatchSocialIdentityProviderRequest other = (PatchSocialIdentityProviderRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.socialIdentityProviderId, other.socialIdentityProviderId) + && java.util.Objects.equals(this.authorization, other.authorization) + && java.util.Objects.equals( + this.resourceTypeSchemaVersion, other.resourceTypeSchemaVersion) + && java.util.Objects.equals(this.patchOp, other.patchOp) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.socialIdentityProviderId == null + ? 43 + : this.socialIdentityProviderId.hashCode()); + result = + (result * PRIME) + + (this.authorization == null ? 43 : this.authorization.hashCode()); + result = + (result * PRIME) + + (this.resourceTypeSchemaVersion == null + ? 43 + : this.resourceTypeSchemaVersion.hashCode()); + result = (result * PRIME) + (this.patchOp == null ? 43 : this.patchOp.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PutConditionRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PutConditionRequest.java index 10cce53cc95..bf95e647dc5 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PutConditionRequest.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PutConditionRequest.java @@ -71,12 +71,14 @@ public java.util.List getAtt * Replace the current instance of Condition with provided payload. *

* Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -89,12 +91,14 @@ public java.util.List getAtt * Replace the current instance of Condition with provided payload. *

* Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -234,12 +238,14 @@ public Builder attributeSets(AttributeSets singularValue) { * Replace the current instance of Condition with provided payload. *

* Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -252,12 +258,14 @@ public Builder attributeSets(AttributeSets singularValue) { * Replace the current instance of Condition with provided payload. *

* Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PutPolicyRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PutPolicyRequest.java index 819d3967879..1852a8edc73 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PutPolicyRequest.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PutPolicyRequest.java @@ -71,12 +71,14 @@ public java.util.List getAtt * Replace the current instance of Policy with provided payload. *

* Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -89,12 +91,14 @@ public java.util.List getAtt * Replace the current instance of Policy with provided payload. *

* Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -234,12 +238,14 @@ public Builder attributeSets(AttributeSets singularValue) { * Replace the current instance of Policy with provided payload. *

* Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -252,12 +258,14 @@ public Builder attributeSets(AttributeSets singularValue) { * Replace the current instance of Policy with provided payload. *

* Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PutRuleRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PutRuleRequest.java index 61253e11487..cf7cc99b33c 100644 --- a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PutRuleRequest.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PutRuleRequest.java @@ -71,12 +71,14 @@ public java.util.List getAtt * Replace the current instance of Rule with provided payload. *

* Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -89,12 +91,14 @@ public java.util.List getAtt * Replace the current instance of Rule with provided payload. *

* Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -234,12 +238,14 @@ public Builder attributeSets(AttributeSets singularValue) { * Replace the current instance of Rule with provided payload. *

* Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -252,12 +258,14 @@ public Builder attributeSets(AttributeSets singularValue) { * Replace the current instance of Rule with provided payload. *

* Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

* - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. *

* Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

* - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PutSocialIdentityProviderRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PutSocialIdentityProviderRequest.java new file mode 100644 index 00000000000..e46f799fc48 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/PutSocialIdentityProviderRequest.java @@ -0,0 +1,431 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.requests; + +import com.oracle.bmc.identitydomains.model.*; +/** + * Example: Click here to see how to use PutSocialIdentityProviderRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class PutSocialIdentityProviderRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.identitydomains.model.SocialIdentityProvider> { + + /** + * ID of the resource + */ + private String socialIdentityProviderId; + + /** + * ID of the resource + */ + public String getSocialIdentityProviderId() { + return socialIdentityProviderId; + } + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + public String getAuthorization() { + return authorization; + } + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + public String getResourceTypeSchemaVersion() { + return resourceTypeSchemaVersion; + } + /** + * Replace the current instance of SocialIdentityProvider with provided payload. + *

+ * Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

+ * - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + *

+ * Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

+ * - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + * - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + * + */ + private com.oracle.bmc.identitydomains.model.SocialIdentityProvider socialIdentityProvider; + + /** + * Replace the current instance of SocialIdentityProvider with provided payload. + *

+ * Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

+ * - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + *

+ * Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

+ * - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + * - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + * + */ + public com.oracle.bmc.identitydomains.model.SocialIdentityProvider getSocialIdentityProvider() { + return socialIdentityProvider; + } + /** + * Used to make the request conditional on an ETag + */ + private String ifMatch; + + /** + * Used to make the request conditional on an ETag + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.identitydomains.model.SocialIdentityProvider getBody$() { + return socialIdentityProvider; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + PutSocialIdentityProviderRequest, + com.oracle.bmc.identitydomains.model.SocialIdentityProvider> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * ID of the resource + */ + private String socialIdentityProviderId = null; + + /** + * ID of the resource + * @param socialIdentityProviderId the value to set + * @return this builder instance + */ + public Builder socialIdentityProviderId(String socialIdentityProviderId) { + this.socialIdentityProviderId = socialIdentityProviderId; + return this; + } + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization = null; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + * @param authorization the value to set + * @return this builder instance + */ + public Builder authorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion = null; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + * @param resourceTypeSchemaVersion the value to set + * @return this builder instance + */ + public Builder resourceTypeSchemaVersion(String resourceTypeSchemaVersion) { + this.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + return this; + } + + /** + * Replace the current instance of SocialIdentityProvider with provided payload. + *

+ * Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

+ * - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + *

+ * Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

+ * - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + * - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + * + */ + private com.oracle.bmc.identitydomains.model.SocialIdentityProvider socialIdentityProvider = + null; + + /** + * Replace the current instance of SocialIdentityProvider with provided payload. + *

+ * Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + *

+ * - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + * - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + * - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + * - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + *

+ * Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + *

+ * - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + * - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + * - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + * - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + * + * @param socialIdentityProvider the value to set + * @return this builder instance + */ + public Builder socialIdentityProvider( + com.oracle.bmc.identitydomains.model.SocialIdentityProvider + socialIdentityProvider) { + this.socialIdentityProvider = socialIdentityProvider; + return this; + } + + /** + * Used to make the request conditional on an ETag + */ + private String ifMatch = null; + + /** + * Used to make the request conditional on an ETag + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken = null; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(PutSocialIdentityProviderRequest o) { + socialIdentityProviderId(o.getSocialIdentityProviderId()); + authorization(o.getAuthorization()); + resourceTypeSchemaVersion(o.getResourceTypeSchemaVersion()); + socialIdentityProvider(o.getSocialIdentityProvider()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of PutSocialIdentityProviderRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of PutSocialIdentityProviderRequest + */ + public PutSocialIdentityProviderRequest build() { + PutSocialIdentityProviderRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.identitydomains.model.SocialIdentityProvider body) { + socialIdentityProvider(body); + return this; + } + + /** + * Build the instance of PutSocialIdentityProviderRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of PutSocialIdentityProviderRequest + */ + public PutSocialIdentityProviderRequest buildWithoutInvocationCallback() { + PutSocialIdentityProviderRequest request = new PutSocialIdentityProviderRequest(); + request.socialIdentityProviderId = socialIdentityProviderId; + request.authorization = authorization; + request.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + request.socialIdentityProvider = socialIdentityProvider; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new PutSocialIdentityProviderRequest(socialIdentityProviderId, authorization, resourceTypeSchemaVersion, socialIdentityProvider, ifMatch, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .socialIdentityProviderId(socialIdentityProviderId) + .authorization(authorization) + .resourceTypeSchemaVersion(resourceTypeSchemaVersion) + .socialIdentityProvider(socialIdentityProvider) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",socialIdentityProviderId=") + .append(String.valueOf(this.socialIdentityProviderId)); + sb.append(",authorization=").append(String.valueOf(this.authorization)); + sb.append(",resourceTypeSchemaVersion=") + .append(String.valueOf(this.resourceTypeSchemaVersion)); + sb.append(",socialIdentityProvider=").append(String.valueOf(this.socialIdentityProvider)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PutSocialIdentityProviderRequest)) { + return false; + } + + PutSocialIdentityProviderRequest other = (PutSocialIdentityProviderRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.socialIdentityProviderId, other.socialIdentityProviderId) + && java.util.Objects.equals(this.authorization, other.authorization) + && java.util.Objects.equals( + this.resourceTypeSchemaVersion, other.resourceTypeSchemaVersion) + && java.util.Objects.equals( + this.socialIdentityProvider, other.socialIdentityProvider) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.socialIdentityProviderId == null + ? 43 + : this.socialIdentityProviderId.hashCode()); + result = + (result * PRIME) + + (this.authorization == null ? 43 : this.authorization.hashCode()); + result = + (result * PRIME) + + (this.resourceTypeSchemaVersion == null + ? 43 + : this.resourceTypeSchemaVersion.hashCode()); + result = + (result * PRIME) + + (this.socialIdentityProvider == null + ? 43 + : this.socialIdentityProvider.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/SearchOciConsoleSignOnPolicyConsentsRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/SearchOciConsoleSignOnPolicyConsentsRequest.java new file mode 100644 index 00000000000..9997afc299b --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/SearchOciConsoleSignOnPolicyConsentsRequest.java @@ -0,0 +1,379 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.requests; + +import com.oracle.bmc.identitydomains.model.*; +/** + * Example: Click here to see how to use SearchOciConsoleSignOnPolicyConsentsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class SearchOciConsoleSignOnPolicyConsentsRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsentSearchRequest> { + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + public String getAuthorization() { + return authorization; + } + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + public String getResourceTypeSchemaVersion() { + return resourceTypeSchemaVersion; + } + /** + * Parameters for searching OciConsoleSignOnPolicyConsents + */ + private com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsentSearchRequest + ociConsoleSignOnPolicyConsentSearchRequest; + + /** + * Parameters for searching OciConsoleSignOnPolicyConsents + */ + public com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsentSearchRequest + getOciConsoleSignOnPolicyConsentSearchRequest() { + return ociConsoleSignOnPolicyConsentSearchRequest; + } + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The value of the {@code opc-next-page} response header from the previous 'List' call. + */ + private String page; + + /** + * The value of the {@code opc-next-page} response header from the previous 'List' call. + */ + public String getPage() { + return page; + } + /** + * The maximum number of items to return in a paginated 'List' call. + */ + private Integer limit; + + /** + * The maximum number of items to return in a paginated 'List' call. + */ + public Integer getLimit() { + return limit; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsentSearchRequest + getBody$() { + return ociConsoleSignOnPolicyConsentSearchRequest; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + SearchOciConsoleSignOnPolicyConsentsRequest, + com.oracle.bmc.identitydomains.model + .OciConsoleSignOnPolicyConsentSearchRequest> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization = null; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + * @param authorization the value to set + * @return this builder instance + */ + public Builder authorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion = null; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + * @param resourceTypeSchemaVersion the value to set + * @return this builder instance + */ + public Builder resourceTypeSchemaVersion(String resourceTypeSchemaVersion) { + this.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + return this; + } + + /** + * Parameters for searching OciConsoleSignOnPolicyConsents + */ + private com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsentSearchRequest + ociConsoleSignOnPolicyConsentSearchRequest = null; + + /** + * Parameters for searching OciConsoleSignOnPolicyConsents + * @param ociConsoleSignOnPolicyConsentSearchRequest the value to set + * @return this builder instance + */ + public Builder ociConsoleSignOnPolicyConsentSearchRequest( + com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsentSearchRequest + ociConsoleSignOnPolicyConsentSearchRequest) { + this.ociConsoleSignOnPolicyConsentSearchRequest = + ociConsoleSignOnPolicyConsentSearchRequest; + return this; + } + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken = null; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The value of the {@code opc-next-page} response header from the previous 'List' call. + */ + private String page = null; + + /** + * The value of the {@code opc-next-page} response header from the previous 'List' call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The maximum number of items to return in a paginated 'List' call. + */ + private Integer limit = null; + + /** + * The maximum number of items to return in a paginated 'List' call. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SearchOciConsoleSignOnPolicyConsentsRequest o) { + authorization(o.getAuthorization()); + resourceTypeSchemaVersion(o.getResourceTypeSchemaVersion()); + ociConsoleSignOnPolicyConsentSearchRequest( + o.getOciConsoleSignOnPolicyConsentSearchRequest()); + opcRetryToken(o.getOpcRetryToken()); + page(o.getPage()); + limit(o.getLimit()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of SearchOciConsoleSignOnPolicyConsentsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of SearchOciConsoleSignOnPolicyConsentsRequest + */ + public SearchOciConsoleSignOnPolicyConsentsRequest build() { + SearchOciConsoleSignOnPolicyConsentsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsentSearchRequest + body) { + ociConsoleSignOnPolicyConsentSearchRequest(body); + return this; + } + + /** + * Build the instance of SearchOciConsoleSignOnPolicyConsentsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of SearchOciConsoleSignOnPolicyConsentsRequest + */ + public SearchOciConsoleSignOnPolicyConsentsRequest buildWithoutInvocationCallback() { + SearchOciConsoleSignOnPolicyConsentsRequest request = + new SearchOciConsoleSignOnPolicyConsentsRequest(); + request.authorization = authorization; + request.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + request.ociConsoleSignOnPolicyConsentSearchRequest = + ociConsoleSignOnPolicyConsentSearchRequest; + request.opcRetryToken = opcRetryToken; + request.page = page; + request.limit = limit; + return request; + // new SearchOciConsoleSignOnPolicyConsentsRequest(authorization, resourceTypeSchemaVersion, ociConsoleSignOnPolicyConsentSearchRequest, opcRetryToken, page, limit); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .authorization(authorization) + .resourceTypeSchemaVersion(resourceTypeSchemaVersion) + .ociConsoleSignOnPolicyConsentSearchRequest( + ociConsoleSignOnPolicyConsentSearchRequest) + .opcRetryToken(opcRetryToken) + .page(page) + .limit(limit); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",authorization=").append(String.valueOf(this.authorization)); + sb.append(",resourceTypeSchemaVersion=") + .append(String.valueOf(this.resourceTypeSchemaVersion)); + sb.append(",ociConsoleSignOnPolicyConsentSearchRequest=") + .append(String.valueOf(this.ociConsoleSignOnPolicyConsentSearchRequest)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SearchOciConsoleSignOnPolicyConsentsRequest)) { + return false; + } + + SearchOciConsoleSignOnPolicyConsentsRequest other = + (SearchOciConsoleSignOnPolicyConsentsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.authorization, other.authorization) + && java.util.Objects.equals( + this.resourceTypeSchemaVersion, other.resourceTypeSchemaVersion) + && java.util.Objects.equals( + this.ociConsoleSignOnPolicyConsentSearchRequest, + other.ociConsoleSignOnPolicyConsentSearchRequest) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.authorization == null ? 43 : this.authorization.hashCode()); + result = + (result * PRIME) + + (this.resourceTypeSchemaVersion == null + ? 43 + : this.resourceTypeSchemaVersion.hashCode()); + result = + (result * PRIME) + + (this.ociConsoleSignOnPolicyConsentSearchRequest == null + ? 43 + : this.ociConsoleSignOnPolicyConsentSearchRequest.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/SearchSocialIdentityProvidersRequest.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/SearchSocialIdentityProvidersRequest.java new file mode 100644 index 00000000000..23304262259 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/requests/SearchSocialIdentityProvidersRequest.java @@ -0,0 +1,371 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.requests; + +import com.oracle.bmc.identitydomains.model.*; +/** + * Example: Click here to see how to use SearchSocialIdentityProvidersRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class SearchSocialIdentityProvidersRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.identitydomains.model.SocialIdentityProviderSearchRequest> { + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + public String getAuthorization() { + return authorization; + } + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + public String getResourceTypeSchemaVersion() { + return resourceTypeSchemaVersion; + } + /** + * Parameters for searching SocialIdentityProviders + */ + private com.oracle.bmc.identitydomains.model.SocialIdentityProviderSearchRequest + socialIdentityProviderSearchRequest; + + /** + * Parameters for searching SocialIdentityProviders + */ + public com.oracle.bmc.identitydomains.model.SocialIdentityProviderSearchRequest + getSocialIdentityProviderSearchRequest() { + return socialIdentityProviderSearchRequest; + } + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The value of the {@code opc-next-page} response header from the previous 'List' call. + */ + private String page; + + /** + * The value of the {@code opc-next-page} response header from the previous 'List' call. + */ + public String getPage() { + return page; + } + /** + * The maximum number of items to return in a paginated 'List' call. + */ + private Integer limit; + + /** + * The maximum number of items to return in a paginated 'List' call. + */ + public Integer getLimit() { + return limit; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.identitydomains.model.SocialIdentityProviderSearchRequest getBody$() { + return socialIdentityProviderSearchRequest; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + SearchSocialIdentityProvidersRequest, + com.oracle.bmc.identitydomains.model.SocialIdentityProviderSearchRequest> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + */ + private String authorization = null; + + /** + * The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + * @param authorization the value to set + * @return this builder instance + */ + public Builder authorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + */ + private String resourceTypeSchemaVersion = null; + + /** + * An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + * @param resourceTypeSchemaVersion the value to set + * @return this builder instance + */ + public Builder resourceTypeSchemaVersion(String resourceTypeSchemaVersion) { + this.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + return this; + } + + /** + * Parameters for searching SocialIdentityProviders + */ + private com.oracle.bmc.identitydomains.model.SocialIdentityProviderSearchRequest + socialIdentityProviderSearchRequest = null; + + /** + * Parameters for searching SocialIdentityProviders + * @param socialIdentityProviderSearchRequest the value to set + * @return this builder instance + */ + public Builder socialIdentityProviderSearchRequest( + com.oracle.bmc.identitydomains.model.SocialIdentityProviderSearchRequest + socialIdentityProviderSearchRequest) { + this.socialIdentityProviderSearchRequest = socialIdentityProviderSearchRequest; + return this; + } + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + */ + private String opcRetryToken = null; + + /** + * A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The value of the {@code opc-next-page} response header from the previous 'List' call. + */ + private String page = null; + + /** + * The value of the {@code opc-next-page} response header from the previous 'List' call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The maximum number of items to return in a paginated 'List' call. + */ + private Integer limit = null; + + /** + * The maximum number of items to return in a paginated 'List' call. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SearchSocialIdentityProvidersRequest o) { + authorization(o.getAuthorization()); + resourceTypeSchemaVersion(o.getResourceTypeSchemaVersion()); + socialIdentityProviderSearchRequest(o.getSocialIdentityProviderSearchRequest()); + opcRetryToken(o.getOpcRetryToken()); + page(o.getPage()); + limit(o.getLimit()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of SearchSocialIdentityProvidersRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of SearchSocialIdentityProvidersRequest + */ + public SearchSocialIdentityProvidersRequest build() { + SearchSocialIdentityProvidersRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.identitydomains.model.SocialIdentityProviderSearchRequest body) { + socialIdentityProviderSearchRequest(body); + return this; + } + + /** + * Build the instance of SearchSocialIdentityProvidersRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of SearchSocialIdentityProvidersRequest + */ + public SearchSocialIdentityProvidersRequest buildWithoutInvocationCallback() { + SearchSocialIdentityProvidersRequest request = + new SearchSocialIdentityProvidersRequest(); + request.authorization = authorization; + request.resourceTypeSchemaVersion = resourceTypeSchemaVersion; + request.socialIdentityProviderSearchRequest = socialIdentityProviderSearchRequest; + request.opcRetryToken = opcRetryToken; + request.page = page; + request.limit = limit; + return request; + // new SearchSocialIdentityProvidersRequest(authorization, resourceTypeSchemaVersion, socialIdentityProviderSearchRequest, opcRetryToken, page, limit); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .authorization(authorization) + .resourceTypeSchemaVersion(resourceTypeSchemaVersion) + .socialIdentityProviderSearchRequest(socialIdentityProviderSearchRequest) + .opcRetryToken(opcRetryToken) + .page(page) + .limit(limit); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",authorization=").append(String.valueOf(this.authorization)); + sb.append(",resourceTypeSchemaVersion=") + .append(String.valueOf(this.resourceTypeSchemaVersion)); + sb.append(",socialIdentityProviderSearchRequest=") + .append(String.valueOf(this.socialIdentityProviderSearchRequest)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SearchSocialIdentityProvidersRequest)) { + return false; + } + + SearchSocialIdentityProvidersRequest other = (SearchSocialIdentityProvidersRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.authorization, other.authorization) + && java.util.Objects.equals( + this.resourceTypeSchemaVersion, other.resourceTypeSchemaVersion) + && java.util.Objects.equals( + this.socialIdentityProviderSearchRequest, + other.socialIdentityProviderSearchRequest) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.authorization == null ? 43 : this.authorization.hashCode()); + result = + (result * PRIME) + + (this.resourceTypeSchemaVersion == null + ? 43 + : this.resourceTypeSchemaVersion.hashCode()); + result = + (result * PRIME) + + (this.socialIdentityProviderSearchRequest == null + ? 43 + : this.socialIdentityProviderSearchRequest.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/CreateRestoreOciConsolePolicyResponse.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/CreateRestoreOciConsolePolicyResponse.java new file mode 100644 index 00000000000..8ed62c40561 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/CreateRestoreOciConsolePolicyResponse.java @@ -0,0 +1,207 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.responses; + +import com.oracle.bmc.identitydomains.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class CreateRestoreOciConsolePolicyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned RestoreOciConsolePolicy instance. + */ + private com.oracle.bmc.identitydomains.model.RestoreOciConsolePolicy restoreOciConsolePolicy; + + /** + * The returned RestoreOciConsolePolicy instance. + * @return the value + */ + public com.oracle.bmc.identitydomains.model.RestoreOciConsolePolicy + getRestoreOciConsolePolicy() { + return restoreOciConsolePolicy; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "restoreOciConsolePolicy" + }) + private CreateRestoreOciConsolePolicyResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.identitydomains.model.RestoreOciConsolePolicy restoreOciConsolePolicy) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.restoreOciConsolePolicy = restoreOciConsolePolicy; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned RestoreOciConsolePolicy instance. + */ + private com.oracle.bmc.identitydomains.model.RestoreOciConsolePolicy + restoreOciConsolePolicy; + + /** + * The returned RestoreOciConsolePolicy instance. + * @param restoreOciConsolePolicy the value to set + * @return this builder + */ + public Builder restoreOciConsolePolicy( + com.oracle.bmc.identitydomains.model.RestoreOciConsolePolicy + restoreOciConsolePolicy) { + this.restoreOciConsolePolicy = restoreOciConsolePolicy; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateRestoreOciConsolePolicyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + restoreOciConsolePolicy(o.getRestoreOciConsolePolicy()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateRestoreOciConsolePolicyResponse build() { + return new CreateRestoreOciConsolePolicyResponse( + __httpStatusCode__, headers, opcRequestId, etag, restoreOciConsolePolicy); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",restoreOciConsolePolicy=").append(String.valueOf(restoreOciConsolePolicy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateRestoreOciConsolePolicyResponse)) { + return false; + } + + CreateRestoreOciConsolePolicyResponse other = (CreateRestoreOciConsolePolicyResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals( + this.restoreOciConsolePolicy, other.restoreOciConsolePolicy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.restoreOciConsolePolicy == null + ? 43 + : this.restoreOciConsolePolicy.hashCode()); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/CreateSocialIdentityProviderResponse.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/CreateSocialIdentityProviderResponse.java new file mode 100644 index 00000000000..bbf2e338a39 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/CreateSocialIdentityProviderResponse.java @@ -0,0 +1,205 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.responses; + +import com.oracle.bmc.identitydomains.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class CreateSocialIdentityProviderResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned SocialIdentityProvider instance. + */ + private com.oracle.bmc.identitydomains.model.SocialIdentityProvider socialIdentityProvider; + + /** + * The returned SocialIdentityProvider instance. + * @return the value + */ + public com.oracle.bmc.identitydomains.model.SocialIdentityProvider getSocialIdentityProvider() { + return socialIdentityProvider; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "socialIdentityProvider" + }) + private CreateSocialIdentityProviderResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.identitydomains.model.SocialIdentityProvider socialIdentityProvider) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.socialIdentityProvider = socialIdentityProvider; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned SocialIdentityProvider instance. + */ + private com.oracle.bmc.identitydomains.model.SocialIdentityProvider socialIdentityProvider; + + /** + * The returned SocialIdentityProvider instance. + * @param socialIdentityProvider the value to set + * @return this builder + */ + public Builder socialIdentityProvider( + com.oracle.bmc.identitydomains.model.SocialIdentityProvider + socialIdentityProvider) { + this.socialIdentityProvider = socialIdentityProvider; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateSocialIdentityProviderResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + socialIdentityProvider(o.getSocialIdentityProvider()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateSocialIdentityProviderResponse build() { + return new CreateSocialIdentityProviderResponse( + __httpStatusCode__, headers, opcRequestId, etag, socialIdentityProvider); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",socialIdentityProvider=").append(String.valueOf(socialIdentityProvider)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSocialIdentityProviderResponse)) { + return false; + } + + CreateSocialIdentityProviderResponse other = (CreateSocialIdentityProviderResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals( + this.socialIdentityProvider, other.socialIdentityProvider); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.socialIdentityProvider == null + ? 43 + : this.socialIdentityProvider.hashCode()); + return result; + } +} diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/responses/GetCsiNumberResponse.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/DeleteSocialIdentityProviderResponse.java similarity index 69% rename from bmc-cims/src/main/java/com/oracle/bmc/cims/responses/GetCsiNumberResponse.java rename to bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/DeleteSocialIdentityProviderResponse.java index 1d02ec7c068..429337a559a 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/responses/GetCsiNumberResponse.java +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/DeleteSocialIdentityProviderResponse.java @@ -2,12 +2,12 @@ * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ -package com.oracle.bmc.cims.responses; +package com.oracle.bmc.identitydomains.responses; -import com.oracle.bmc.cims.model.*; +import com.oracle.bmc.identitydomains.model.*; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181231") -public class GetCsiNumberResponse extends com.oracle.bmc.responses.BmcResponse { +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class DeleteSocialIdentityProviderResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. */ @@ -21,28 +21,13 @@ public String getOpcRequestId() { return opcRequestId; } - /** - * The returned String instance. - */ - private String value; - - /** - * The returned String instance. - * @return the value - */ - public String getValue() { - return value; - } - - @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId", "value"}) - private GetCsiNumberResponse( + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeleteSocialIdentityProviderResponse( int __httpStatusCode__, javax.ws.rs.core.MultivaluedMap headers, - String opcRequestId, - String value) { + String opcRequestId) { super(__httpStatusCode__, headers); this.opcRequestId = opcRequestId; - this.value = value; } public static class Builder { @@ -75,30 +60,14 @@ public Builder opcRequestId(String opcRequestId) { return this; } - /** - * The returned String instance. - */ - private String value; - - /** - * The returned String instance. - * @param value the value to set - * @return this builder - */ - public Builder value(String value) { - this.value = value; - return this; - } - /** * Copy method to populate the builder with values from the given instance. * @return this builder instance */ - public Builder copy(GetCsiNumberResponse o) { + public Builder copy(DeleteSocialIdentityProviderResponse o) { __httpStatusCode__(o.get__httpStatusCode__()); headers(o.getHeaders()); opcRequestId(o.getOpcRequestId()); - value(o.getValue()); return this; } @@ -107,8 +76,9 @@ public Builder copy(GetCsiNumberResponse o) { * Build the response object. * @return the response object */ - public GetCsiNumberResponse build() { - return new GetCsiNumberResponse(__httpStatusCode__, headers, opcRequestId, value); + public DeleteSocialIdentityProviderResponse build() { + return new DeleteSocialIdentityProviderResponse( + __httpStatusCode__, headers, opcRequestId); } } @@ -126,7 +96,6 @@ public String toString() { sb.append("("); sb.append("super=").append(super.toString()); sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); - sb.append(",value=").append(String.valueOf(value)); sb.append(")"); return sb.toString(); } @@ -136,14 +105,12 @@ public boolean equals(Object o) { if (this == o) { return true; } - if (!(o instanceof GetCsiNumberResponse)) { + if (!(o instanceof DeleteSocialIdentityProviderResponse)) { return false; } - GetCsiNumberResponse other = (GetCsiNumberResponse) o; - return super.equals(o) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) - && java.util.Objects.equals(this.value, other.value); + DeleteSocialIdentityProviderResponse other = (DeleteSocialIdentityProviderResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); } @Override @@ -151,7 +118,6 @@ public int hashCode() { final int PRIME = 59; int result = super.hashCode(); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); - result = (result * PRIME) + (this.value == null ? 43 : this.value.hashCode()); return result; } } diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/GetOciConsoleSignOnPolicyConsentResponse.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/GetOciConsoleSignOnPolicyConsentResponse.java new file mode 100644 index 00000000000..b1d2c2b75d6 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/GetOciConsoleSignOnPolicyConsentResponse.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.responses; + +import com.oracle.bmc.identitydomains.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class GetOciConsoleSignOnPolicyConsentResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned OciConsoleSignOnPolicyConsent instance. + */ + private com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsent + ociConsoleSignOnPolicyConsent; + + /** + * The returned OciConsoleSignOnPolicyConsent instance. + * @return the value + */ + public com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsent + getOciConsoleSignOnPolicyConsent() { + return ociConsoleSignOnPolicyConsent; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "ociConsoleSignOnPolicyConsent" + }) + private GetOciConsoleSignOnPolicyConsentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsent + ociConsoleSignOnPolicyConsent) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.ociConsoleSignOnPolicyConsent = ociConsoleSignOnPolicyConsent; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned OciConsoleSignOnPolicyConsent instance. + */ + private com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsent + ociConsoleSignOnPolicyConsent; + + /** + * The returned OciConsoleSignOnPolicyConsent instance. + * @param ociConsoleSignOnPolicyConsent the value to set + * @return this builder + */ + public Builder ociConsoleSignOnPolicyConsent( + com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsent + ociConsoleSignOnPolicyConsent) { + this.ociConsoleSignOnPolicyConsent = ociConsoleSignOnPolicyConsent; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetOciConsoleSignOnPolicyConsentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + ociConsoleSignOnPolicyConsent(o.getOciConsoleSignOnPolicyConsent()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetOciConsoleSignOnPolicyConsentResponse build() { + return new GetOciConsoleSignOnPolicyConsentResponse( + __httpStatusCode__, headers, opcRequestId, ociConsoleSignOnPolicyConsent); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",ociConsoleSignOnPolicyConsent=") + .append(String.valueOf(ociConsoleSignOnPolicyConsent)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetOciConsoleSignOnPolicyConsentResponse)) { + return false; + } + + GetOciConsoleSignOnPolicyConsentResponse other = + (GetOciConsoleSignOnPolicyConsentResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.ociConsoleSignOnPolicyConsent, other.ociConsoleSignOnPolicyConsent); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.ociConsoleSignOnPolicyConsent == null + ? 43 + : this.ociConsoleSignOnPolicyConsent.hashCode()); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/GetSocialIdentityProviderResponse.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/GetSocialIdentityProviderResponse.java new file mode 100644 index 00000000000..25ce8add048 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/GetSocialIdentityProviderResponse.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.responses; + +import com.oracle.bmc.identitydomains.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class GetSocialIdentityProviderResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned SocialIdentityProvider instance. + */ + private com.oracle.bmc.identitydomains.model.SocialIdentityProvider socialIdentityProvider; + + /** + * The returned SocialIdentityProvider instance. + * @return the value + */ + public com.oracle.bmc.identitydomains.model.SocialIdentityProvider getSocialIdentityProvider() { + return socialIdentityProvider; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "socialIdentityProvider" + }) + private GetSocialIdentityProviderResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + com.oracle.bmc.identitydomains.model.SocialIdentityProvider socialIdentityProvider) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.socialIdentityProvider = socialIdentityProvider; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned SocialIdentityProvider instance. + */ + private com.oracle.bmc.identitydomains.model.SocialIdentityProvider socialIdentityProvider; + + /** + * The returned SocialIdentityProvider instance. + * @param socialIdentityProvider the value to set + * @return this builder + */ + public Builder socialIdentityProvider( + com.oracle.bmc.identitydomains.model.SocialIdentityProvider + socialIdentityProvider) { + this.socialIdentityProvider = socialIdentityProvider; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSocialIdentityProviderResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + socialIdentityProvider(o.getSocialIdentityProvider()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetSocialIdentityProviderResponse build() { + return new GetSocialIdentityProviderResponse( + __httpStatusCode__, headers, opcRequestId, socialIdentityProvider); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",socialIdentityProvider=").append(String.valueOf(socialIdentityProvider)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSocialIdentityProviderResponse)) { + return false; + } + + GetSocialIdentityProviderResponse other = (GetSocialIdentityProviderResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.socialIdentityProvider, other.socialIdentityProvider); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.socialIdentityProvider == null + ? 43 + : this.socialIdentityProvider.hashCode()); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/ListOciConsoleSignOnPolicyConsentsResponse.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/ListOciConsoleSignOnPolicyConsentsResponse.java new file mode 100644 index 00000000000..322e326f2c4 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/ListOciConsoleSignOnPolicyConsentsResponse.java @@ -0,0 +1,216 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.responses; + +import com.oracle.bmc.identitydomains.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class ListOciConsoleSignOnPolicyConsentsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned OciConsoleSignOnPolicyConsents instance. + */ + private com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsents + ociConsoleSignOnPolicyConsents; + + /** + * The returned OciConsoleSignOnPolicyConsents instance. + * @return the value + */ + public com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsents + getOciConsoleSignOnPolicyConsents() { + return ociConsoleSignOnPolicyConsents; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "ociConsoleSignOnPolicyConsents" + }) + private ListOciConsoleSignOnPolicyConsentsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsents + ociConsoleSignOnPolicyConsents) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.ociConsoleSignOnPolicyConsents = ociConsoleSignOnPolicyConsents; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned OciConsoleSignOnPolicyConsents instance. + */ + private com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsents + ociConsoleSignOnPolicyConsents; + + /** + * The returned OciConsoleSignOnPolicyConsents instance. + * @param ociConsoleSignOnPolicyConsents the value to set + * @return this builder + */ + public Builder ociConsoleSignOnPolicyConsents( + com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsents + ociConsoleSignOnPolicyConsents) { + this.ociConsoleSignOnPolicyConsents = ociConsoleSignOnPolicyConsents; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListOciConsoleSignOnPolicyConsentsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + ociConsoleSignOnPolicyConsents(o.getOciConsoleSignOnPolicyConsents()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListOciConsoleSignOnPolicyConsentsResponse build() { + return new ListOciConsoleSignOnPolicyConsentsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + ociConsoleSignOnPolicyConsents); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",ociConsoleSignOnPolicyConsents=") + .append(String.valueOf(ociConsoleSignOnPolicyConsents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListOciConsoleSignOnPolicyConsentsResponse)) { + return false; + } + + ListOciConsoleSignOnPolicyConsentsResponse other = + (ListOciConsoleSignOnPolicyConsentsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.ociConsoleSignOnPolicyConsents, other.ociConsoleSignOnPolicyConsents); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.ociConsoleSignOnPolicyConsents == null + ? 43 + : this.ociConsoleSignOnPolicyConsents.hashCode()); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/ListSocialIdentityProvidersResponse.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/ListSocialIdentityProvidersResponse.java new file mode 100644 index 00000000000..82d6e02bcc4 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/ListSocialIdentityProvidersResponse.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.responses; + +import com.oracle.bmc.identitydomains.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class ListSocialIdentityProvidersResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned SocialIdentityProviders instance. + */ + private com.oracle.bmc.identitydomains.model.SocialIdentityProviders socialIdentityProviders; + + /** + * The returned SocialIdentityProviders instance. + * @return the value + */ + public com.oracle.bmc.identitydomains.model.SocialIdentityProviders + getSocialIdentityProviders() { + return socialIdentityProviders; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "socialIdentityProviders" + }) + private ListSocialIdentityProvidersResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.identitydomains.model.SocialIdentityProviders socialIdentityProviders) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.socialIdentityProviders = socialIdentityProviders; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned SocialIdentityProviders instance. + */ + private com.oracle.bmc.identitydomains.model.SocialIdentityProviders + socialIdentityProviders; + + /** + * The returned SocialIdentityProviders instance. + * @param socialIdentityProviders the value to set + * @return this builder + */ + public Builder socialIdentityProviders( + com.oracle.bmc.identitydomains.model.SocialIdentityProviders + socialIdentityProviders) { + this.socialIdentityProviders = socialIdentityProviders; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSocialIdentityProvidersResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + socialIdentityProviders(o.getSocialIdentityProviders()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListSocialIdentityProvidersResponse build() { + return new ListSocialIdentityProvidersResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + socialIdentityProviders); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",socialIdentityProviders=").append(String.valueOf(socialIdentityProviders)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSocialIdentityProvidersResponse)) { + return false; + } + + ListSocialIdentityProvidersResponse other = (ListSocialIdentityProvidersResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.socialIdentityProviders, other.socialIdentityProviders); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.socialIdentityProviders == null + ? 43 + : this.socialIdentityProviders.hashCode()); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/PatchSocialIdentityProviderResponse.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/PatchSocialIdentityProviderResponse.java new file mode 100644 index 00000000000..89c10b4fa25 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/PatchSocialIdentityProviderResponse.java @@ -0,0 +1,205 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.responses; + +import com.oracle.bmc.identitydomains.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class PatchSocialIdentityProviderResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned SocialIdentityProvider instance. + */ + private com.oracle.bmc.identitydomains.model.SocialIdentityProvider socialIdentityProvider; + + /** + * The returned SocialIdentityProvider instance. + * @return the value + */ + public com.oracle.bmc.identitydomains.model.SocialIdentityProvider getSocialIdentityProvider() { + return socialIdentityProvider; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "socialIdentityProvider" + }) + private PatchSocialIdentityProviderResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.identitydomains.model.SocialIdentityProvider socialIdentityProvider) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.socialIdentityProvider = socialIdentityProvider; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned SocialIdentityProvider instance. + */ + private com.oracle.bmc.identitydomains.model.SocialIdentityProvider socialIdentityProvider; + + /** + * The returned SocialIdentityProvider instance. + * @param socialIdentityProvider the value to set + * @return this builder + */ + public Builder socialIdentityProvider( + com.oracle.bmc.identitydomains.model.SocialIdentityProvider + socialIdentityProvider) { + this.socialIdentityProvider = socialIdentityProvider; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(PatchSocialIdentityProviderResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + socialIdentityProvider(o.getSocialIdentityProvider()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public PatchSocialIdentityProviderResponse build() { + return new PatchSocialIdentityProviderResponse( + __httpStatusCode__, headers, opcRequestId, etag, socialIdentityProvider); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",socialIdentityProvider=").append(String.valueOf(socialIdentityProvider)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PatchSocialIdentityProviderResponse)) { + return false; + } + + PatchSocialIdentityProviderResponse other = (PatchSocialIdentityProviderResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals( + this.socialIdentityProvider, other.socialIdentityProvider); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.socialIdentityProvider == null + ? 43 + : this.socialIdentityProvider.hashCode()); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/PutSocialIdentityProviderResponse.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/PutSocialIdentityProviderResponse.java new file mode 100644 index 00000000000..3f0882fb598 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/PutSocialIdentityProviderResponse.java @@ -0,0 +1,205 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.responses; + +import com.oracle.bmc.identitydomains.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class PutSocialIdentityProviderResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned SocialIdentityProvider instance. + */ + private com.oracle.bmc.identitydomains.model.SocialIdentityProvider socialIdentityProvider; + + /** + * The returned SocialIdentityProvider instance. + * @return the value + */ + public com.oracle.bmc.identitydomains.model.SocialIdentityProvider getSocialIdentityProvider() { + return socialIdentityProvider; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "socialIdentityProvider" + }) + private PutSocialIdentityProviderResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.identitydomains.model.SocialIdentityProvider socialIdentityProvider) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.socialIdentityProvider = socialIdentityProvider; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned SocialIdentityProvider instance. + */ + private com.oracle.bmc.identitydomains.model.SocialIdentityProvider socialIdentityProvider; + + /** + * The returned SocialIdentityProvider instance. + * @param socialIdentityProvider the value to set + * @return this builder + */ + public Builder socialIdentityProvider( + com.oracle.bmc.identitydomains.model.SocialIdentityProvider + socialIdentityProvider) { + this.socialIdentityProvider = socialIdentityProvider; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(PutSocialIdentityProviderResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + socialIdentityProvider(o.getSocialIdentityProvider()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public PutSocialIdentityProviderResponse build() { + return new PutSocialIdentityProviderResponse( + __httpStatusCode__, headers, opcRequestId, etag, socialIdentityProvider); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",socialIdentityProvider=").append(String.valueOf(socialIdentityProvider)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PutSocialIdentityProviderResponse)) { + return false; + } + + PutSocialIdentityProviderResponse other = (PutSocialIdentityProviderResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals( + this.socialIdentityProvider, other.socialIdentityProvider); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.socialIdentityProvider == null + ? 43 + : this.socialIdentityProvider.hashCode()); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/SearchOciConsoleSignOnPolicyConsentsResponse.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/SearchOciConsoleSignOnPolicyConsentsResponse.java new file mode 100644 index 00000000000..927647d5017 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/SearchOciConsoleSignOnPolicyConsentsResponse.java @@ -0,0 +1,216 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.responses; + +import com.oracle.bmc.identitydomains.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class SearchOciConsoleSignOnPolicyConsentsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned OciConsoleSignOnPolicyConsents instance. + */ + private com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsents + ociConsoleSignOnPolicyConsents; + + /** + * The returned OciConsoleSignOnPolicyConsents instance. + * @return the value + */ + public com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsents + getOciConsoleSignOnPolicyConsents() { + return ociConsoleSignOnPolicyConsents; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "ociConsoleSignOnPolicyConsents" + }) + private SearchOciConsoleSignOnPolicyConsentsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsents + ociConsoleSignOnPolicyConsents) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.ociConsoleSignOnPolicyConsents = ociConsoleSignOnPolicyConsents; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned OciConsoleSignOnPolicyConsents instance. + */ + private com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsents + ociConsoleSignOnPolicyConsents; + + /** + * The returned OciConsoleSignOnPolicyConsents instance. + * @param ociConsoleSignOnPolicyConsents the value to set + * @return this builder + */ + public Builder ociConsoleSignOnPolicyConsents( + com.oracle.bmc.identitydomains.model.OciConsoleSignOnPolicyConsents + ociConsoleSignOnPolicyConsents) { + this.ociConsoleSignOnPolicyConsents = ociConsoleSignOnPolicyConsents; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SearchOciConsoleSignOnPolicyConsentsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + ociConsoleSignOnPolicyConsents(o.getOciConsoleSignOnPolicyConsents()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public SearchOciConsoleSignOnPolicyConsentsResponse build() { + return new SearchOciConsoleSignOnPolicyConsentsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + ociConsoleSignOnPolicyConsents); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",ociConsoleSignOnPolicyConsents=") + .append(String.valueOf(ociConsoleSignOnPolicyConsents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SearchOciConsoleSignOnPolicyConsentsResponse)) { + return false; + } + + SearchOciConsoleSignOnPolicyConsentsResponse other = + (SearchOciConsoleSignOnPolicyConsentsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.ociConsoleSignOnPolicyConsents, other.ociConsoleSignOnPolicyConsents); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.ociConsoleSignOnPolicyConsents == null + ? 43 + : this.ociConsoleSignOnPolicyConsents.hashCode()); + return result; + } +} diff --git a/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/SearchSocialIdentityProvidersResponse.java b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/SearchSocialIdentityProvidersResponse.java new file mode 100644 index 00000000000..14981d9cc95 --- /dev/null +++ b/bmc-identitydomains/src/main/java/com/oracle/bmc/identitydomains/responses/SearchSocialIdentityProvidersResponse.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.identitydomains.responses; + +import com.oracle.bmc.identitydomains.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: v1") +public class SearchSocialIdentityProvidersResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned SocialIdentityProviders instance. + */ + private com.oracle.bmc.identitydomains.model.SocialIdentityProviders socialIdentityProviders; + + /** + * The returned SocialIdentityProviders instance. + * @return the value + */ + public com.oracle.bmc.identitydomains.model.SocialIdentityProviders + getSocialIdentityProviders() { + return socialIdentityProviders; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "socialIdentityProviders" + }) + private SearchSocialIdentityProvidersResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.identitydomains.model.SocialIdentityProviders socialIdentityProviders) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.socialIdentityProviders = socialIdentityProviders; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned SocialIdentityProviders instance. + */ + private com.oracle.bmc.identitydomains.model.SocialIdentityProviders + socialIdentityProviders; + + /** + * The returned SocialIdentityProviders instance. + * @param socialIdentityProviders the value to set + * @return this builder + */ + public Builder socialIdentityProviders( + com.oracle.bmc.identitydomains.model.SocialIdentityProviders + socialIdentityProviders) { + this.socialIdentityProviders = socialIdentityProviders; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SearchSocialIdentityProvidersResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + socialIdentityProviders(o.getSocialIdentityProviders()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public SearchSocialIdentityProvidersResponse build() { + return new SearchSocialIdentityProvidersResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + socialIdentityProviders); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",socialIdentityProviders=").append(String.valueOf(socialIdentityProviders)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SearchSocialIdentityProvidersResponse)) { + return false; + } + + SearchSocialIdentityProvidersResponse other = (SearchSocialIdentityProvidersResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.socialIdentityProviders, other.socialIdentityProviders); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.socialIdentityProviders == null + ? 43 + : this.socialIdentityProviders.hashCode()); + return result; + } +} diff --git a/bmc-integration/pom.xml b/bmc-integration/pom.xml index b146a414e1e..ef39dd2bb63 100644 --- a/bmc-integration/pom.xml +++ b/bmc-integration/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-integration @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstance.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstance.java index 062bf11ac43..9699931ba64 100644 --- a/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstance.java +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstance.java @@ -59,6 +59,20 @@ public interface IntegrationInstance extends AutoCloseable { */ void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + /** + * Enable Oracle Managed Custom Endpoint for given integration instance. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use AddOracleManagedCustomEndpoint API. + */ + AddOracleManagedCustomEndpointResponse addOracleManagedCustomEndpoint( + AddOracleManagedCustomEndpointRequest request); + /** * Change the compartment for an integration instance * @@ -130,6 +144,23 @@ CreateIntegrationInstanceResponse createIntegrationInstance( DeleteIntegrationInstanceResponse deleteIntegrationInstance( DeleteIntegrationInstanceRequest request); + /** + * Allows failover for disaster recovery. Called in the context of integration instance in that region. + * Upon calling the failover api in the region where given instance was created, + * the intigration instance if primary will be switched to standby and crossRegion integration instance + * will be switched to primary and vice-versa. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DisasterRecoveryFailover API. + */ + DisasterRecoveryFailoverResponse disasterRecoveryFailover( + DisasterRecoveryFailoverRequest request); + /** * Enable Process Automation for given Integration Instance * @@ -143,6 +174,19 @@ DeleteIntegrationInstanceResponse deleteIntegrationInstance( */ EnableProcessAutomationResponse enableProcessAutomation(EnableProcessAutomationRequest request); + /** + * Extend Data Retention period for given Integration Instance + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ExtendDataRetention API. + */ + ExtendDataRetentionResponse extendDataRetention(ExtendDataRetentionRequest request); + /** * Gets a IntegrationInstance by identifier * @param request The request object containing the details to send @@ -218,6 +262,20 @@ ListIntegrationInstancesResponse listIntegrationInstances( */ ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request); + /** + * Remove Oracle Managed Custom Endpoint for given integration instance that was previously enabled. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RemoveOracleManagedCustomEndpoint API. + */ + RemoveOracleManagedCustomEndpointResponse removeOracleManagedCustomEndpoint( + RemoveOracleManagedCustomEndpointRequest request); + /** * Start an integration instance that was previously in an INACTIVE state * diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceAsync.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceAsync.java index 546088e1dcb..b422a171e79 100644 --- a/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceAsync.java +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceAsync.java @@ -58,6 +58,25 @@ public interface IntegrationInstanceAsync extends AutoCloseable { */ void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + /** + * Enable Oracle Managed Custom Endpoint for given integration instance. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + addOracleManagedCustomEndpoint( + AddOracleManagedCustomEndpointRequest request, + com.oracle.bmc.responses.AsyncHandler< + AddOracleManagedCustomEndpointRequest, + AddOracleManagedCustomEndpointResponse> + handler); + /** * Change the compartment for an integration instance * @@ -150,6 +169,26 @@ java.util.concurrent.Future deleteIntegration DeleteIntegrationInstanceRequest, DeleteIntegrationInstanceResponse> handler); + /** + * Allows failover for disaster recovery. Called in the context of integration instance in that region. + * Upon calling the failover api in the region where given instance was created, + * the intigration instance if primary will be switched to standby and crossRegion integration instance + * will be switched to primary and vice-versa. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future disasterRecoveryFailover( + DisasterRecoveryFailoverRequest request, + com.oracle.bmc.responses.AsyncHandler< + DisasterRecoveryFailoverRequest, DisasterRecoveryFailoverResponse> + handler); + /** * Enable Process Automation for given Integration Instance * @@ -167,6 +206,23 @@ java.util.concurrent.Future enableProcessAutoma EnableProcessAutomationRequest, EnableProcessAutomationResponse> handler); + /** + * Extend Data Retention period for given Integration Instance + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future extendDataRetention( + ExtendDataRetentionRequest request, + com.oracle.bmc.responses.AsyncHandler< + ExtendDataRetentionRequest, ExtendDataRetentionResponse> + handler); + /** * Gets a IntegrationInstance by identifier * @@ -263,6 +319,25 @@ java.util.concurrent.Future listWorkRequests( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Remove Oracle Managed Custom Endpoint for given integration instance that was previously enabled. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + removeOracleManagedCustomEndpoint( + RemoveOracleManagedCustomEndpointRequest request, + com.oracle.bmc.responses.AsyncHandler< + RemoveOracleManagedCustomEndpointRequest, + RemoveOracleManagedCustomEndpointResponse> + handler); + /** * Start an integration instance that was previously in an INACTIVE state * diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceAsyncClient.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceAsyncClient.java index 4fce600b519..e56997c5a46 100644 --- a/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceAsyncClient.java +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceAsyncClient.java @@ -458,6 +458,64 @@ public void close() { client.close(); } + @Override + public java.util.concurrent.Future + addOracleManagedCustomEndpoint( + AddOracleManagedCustomEndpointRequest request, + final com.oracle.bmc.responses.AsyncHandler< + AddOracleManagedCustomEndpointRequest, + AddOracleManagedCustomEndpointResponse> + handler) { + LOG.trace("Called async addOracleManagedCustomEndpoint"); + final AddOracleManagedCustomEndpointRequest interceptedRequest = + AddOracleManagedCustomEndpointConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + AddOracleManagedCustomEndpointConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IntegrationInstance", + "AddOracleManagedCustomEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/integration/20190131/IntegrationInstance/AddOracleManagedCustomEndpoint"); + final java.util.function.Function< + javax.ws.rs.core.Response, AddOracleManagedCustomEndpointResponse> + transformer = + AddOracleManagedCustomEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + AddOracleManagedCustomEndpointRequest, + AddOracleManagedCustomEndpointResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + AddOracleManagedCustomEndpointRequest, + AddOracleManagedCustomEndpointResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getAddOracleManagedCustomEndpointDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + AddOracleManagedCustomEndpointRequest, AddOracleManagedCustomEndpointResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future changeIntegrationInstanceCompartment( @@ -746,6 +804,55 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future disasterRecoveryFailover( + DisasterRecoveryFailoverRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DisasterRecoveryFailoverRequest, DisasterRecoveryFailoverResponse> + handler) { + LOG.trace("Called async disasterRecoveryFailover"); + final DisasterRecoveryFailoverRequest interceptedRequest = + DisasterRecoveryFailoverConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DisasterRecoveryFailoverConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IntegrationInstance", + "DisasterRecoveryFailover", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/integration/20190131/IntegrationInstance/DisasterRecoveryFailover"); + final java.util.function.Function< + javax.ws.rs.core.Response, DisasterRecoveryFailoverResponse> + transformer = + DisasterRecoveryFailoverConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DisasterRecoveryFailoverRequest, DisasterRecoveryFailoverResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DisasterRecoveryFailoverRequest, DisasterRecoveryFailoverResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DisasterRecoveryFailoverRequest, DisasterRecoveryFailoverResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future enableProcessAutomation( EnableProcessAutomationRequest request, @@ -795,6 +902,59 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future extendDataRetention( + ExtendDataRetentionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ExtendDataRetentionRequest, ExtendDataRetentionResponse> + handler) { + LOG.trace("Called async extendDataRetention"); + final ExtendDataRetentionRequest interceptedRequest = + ExtendDataRetentionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ExtendDataRetentionConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IntegrationInstance", + "ExtendDataRetention", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/integration/20190131/IntegrationInstance/ExtendDataRetention"); + final java.util.function.Function + transformer = + ExtendDataRetentionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ExtendDataRetentionRequest, ExtendDataRetentionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ExtendDataRetentionRequest, ExtendDataRetentionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getExtendDataRetentionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ExtendDataRetentionRequest, ExtendDataRetentionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getIntegrationInstance( GetIntegrationInstanceRequest request, @@ -1075,6 +1235,60 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + removeOracleManagedCustomEndpoint( + RemoveOracleManagedCustomEndpointRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RemoveOracleManagedCustomEndpointRequest, + RemoveOracleManagedCustomEndpointResponse> + handler) { + LOG.trace("Called async removeOracleManagedCustomEndpoint"); + final RemoveOracleManagedCustomEndpointRequest interceptedRequest = + RemoveOracleManagedCustomEndpointConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RemoveOracleManagedCustomEndpointConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IntegrationInstance", + "RemoveOracleManagedCustomEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/integration/20190131/IntegrationInstance/RemoveOracleManagedCustomEndpoint"); + final java.util.function.Function< + javax.ws.rs.core.Response, RemoveOracleManagedCustomEndpointResponse> + transformer = + RemoveOracleManagedCustomEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + RemoveOracleManagedCustomEndpointRequest, + RemoveOracleManagedCustomEndpointResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RemoveOracleManagedCustomEndpointRequest, + RemoveOracleManagedCustomEndpointResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RemoveOracleManagedCustomEndpointRequest, + RemoveOracleManagedCustomEndpointResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future startIntegrationInstance( StartIntegrationInstanceRequest request, diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceClient.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceClient.java index 69ef8109cfb..9bcebdd6da1 100644 --- a/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceClient.java +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceClient.java @@ -548,6 +548,51 @@ public void close() { client.close(); } + @Override + public AddOracleManagedCustomEndpointResponse addOracleManagedCustomEndpoint( + AddOracleManagedCustomEndpointRequest request) { + LOG.trace("Called addOracleManagedCustomEndpoint"); + final AddOracleManagedCustomEndpointRequest interceptedRequest = + AddOracleManagedCustomEndpointConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + AddOracleManagedCustomEndpointConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IntegrationInstance", + "AddOracleManagedCustomEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/integration/20190131/IntegrationInstance/AddOracleManagedCustomEndpoint"); + java.util.function.Function< + javax.ws.rs.core.Response, AddOracleManagedCustomEndpointResponse> + transformer = + AddOracleManagedCustomEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getAddOracleManagedCustomEndpointDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeIntegrationInstanceCompartmentResponse changeIntegrationInstanceCompartment( ChangeIntegrationInstanceCompartmentRequest request) { @@ -770,6 +815,46 @@ public DeleteIntegrationInstanceResponse deleteIntegrationInstance( }); } + @Override + public DisasterRecoveryFailoverResponse disasterRecoveryFailover( + DisasterRecoveryFailoverRequest request) { + LOG.trace("Called disasterRecoveryFailover"); + final DisasterRecoveryFailoverRequest interceptedRequest = + DisasterRecoveryFailoverConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DisasterRecoveryFailoverConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IntegrationInstance", + "DisasterRecoveryFailover", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/integration/20190131/IntegrationInstance/DisasterRecoveryFailover"); + java.util.function.Function + transformer = + DisasterRecoveryFailoverConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public EnableProcessAutomationResponse enableProcessAutomation( EnableProcessAutomationRequest request) { @@ -810,6 +895,48 @@ public EnableProcessAutomationResponse enableProcessAutomation( }); } + @Override + public ExtendDataRetentionResponse extendDataRetention(ExtendDataRetentionRequest request) { + LOG.trace("Called extendDataRetention"); + final ExtendDataRetentionRequest interceptedRequest = + ExtendDataRetentionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ExtendDataRetentionConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IntegrationInstance", + "ExtendDataRetention", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/integration/20190131/IntegrationInstance/ExtendDataRetention"); + java.util.function.Function + transformer = + ExtendDataRetentionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getExtendDataRetentionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetIntegrationInstanceResponse getIntegrationInstance( GetIntegrationInstanceRequest request) { @@ -1033,6 +1160,47 @@ public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request }); } + @Override + public RemoveOracleManagedCustomEndpointResponse removeOracleManagedCustomEndpoint( + RemoveOracleManagedCustomEndpointRequest request) { + LOG.trace("Called removeOracleManagedCustomEndpoint"); + final RemoveOracleManagedCustomEndpointRequest interceptedRequest = + RemoveOracleManagedCustomEndpointConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RemoveOracleManagedCustomEndpointConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "IntegrationInstance", + "RemoveOracleManagedCustomEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/integration/20190131/IntegrationInstance/RemoveOracleManagedCustomEndpoint"); + java.util.function.Function< + javax.ws.rs.core.Response, RemoveOracleManagedCustomEndpointResponse> + transformer = + RemoveOracleManagedCustomEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public StartIntegrationInstanceResponse startIntegrationInstance( StartIntegrationInstanceRequest request) { diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/internal/http/AddOracleManagedCustomEndpointConverter.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/internal/http/AddOracleManagedCustomEndpointConverter.java new file mode 100644 index 00000000000..545806c1c3f --- /dev/null +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/internal/http/AddOracleManagedCustomEndpointConverter.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.integration.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.integration.model.*; +import com.oracle.bmc.integration.requests.*; +import com.oracle.bmc.integration.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190131") +public class AddOracleManagedCustomEndpointConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(AddOracleManagedCustomEndpointConverter.class); + + public static com.oracle.bmc.integration.requests.AddOracleManagedCustomEndpointRequest + interceptRequest( + com.oracle.bmc.integration.requests.AddOracleManagedCustomEndpointRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.integration.requests.AddOracleManagedCustomEndpointRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getAddOracleManagedCustomEndpointDetails(), + "addOracleManagedCustomEndpointDetails is required"); + Validate.notBlank( + request.getIntegrationInstanceId(), "integrationInstanceId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190131") + .path("integrationInstances") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getIntegrationInstanceId())) + .path("actions") + .path("addOracleManagedCustomEndpoint"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.integration.responses.AddOracleManagedCustomEndpointResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.integration.responses.AddOracleManagedCustomEndpointResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.integration.responses.AddOracleManagedCustomEndpointResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.integration.responses + .AddOracleManagedCustomEndpointResponse>() { + @Override + public com.oracle.bmc.integration.responses + .AddOracleManagedCustomEndpointResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.integration.responses.AddOracleManagedCustomEndpointResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.integration.responses + .AddOracleManagedCustomEndpointResponse.Builder + builder = + com.oracle.bmc.integration.responses + .AddOracleManagedCustomEndpointResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.integration.responses + .AddOracleManagedCustomEndpointResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/internal/http/DisasterRecoveryFailoverConverter.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/internal/http/DisasterRecoveryFailoverConverter.java new file mode 100644 index 00000000000..483149a46df --- /dev/null +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/internal/http/DisasterRecoveryFailoverConverter.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.integration.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.integration.model.*; +import com.oracle.bmc.integration.requests.*; +import com.oracle.bmc.integration.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190131") +public class DisasterRecoveryFailoverConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DisasterRecoveryFailoverConverter.class); + + public static com.oracle.bmc.integration.requests.DisasterRecoveryFailoverRequest + interceptRequest( + com.oracle.bmc.integration.requests.DisasterRecoveryFailoverRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.integration.requests.DisasterRecoveryFailoverRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getIntegrationInstanceId(), "integrationInstanceId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190131") + .path("integrationInstances") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getIntegrationInstanceId())) + .path("actions") + .path("failover"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.integration.responses.DisasterRecoveryFailoverResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.integration.responses.DisasterRecoveryFailoverResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.integration.responses.DisasterRecoveryFailoverResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.integration.responses + .DisasterRecoveryFailoverResponse>() { + @Override + public com.oracle.bmc.integration.responses + .DisasterRecoveryFailoverResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.integration.responses.DisasterRecoveryFailoverResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.integration.responses + .DisasterRecoveryFailoverResponse.Builder + builder = + com.oracle.bmc.integration.responses + .DisasterRecoveryFailoverResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.integration.responses + .DisasterRecoveryFailoverResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/internal/http/ExtendDataRetentionConverter.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/internal/http/ExtendDataRetentionConverter.java new file mode 100644 index 00000000000..7af31bf8bd8 --- /dev/null +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/internal/http/ExtendDataRetentionConverter.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.integration.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.integration.model.*; +import com.oracle.bmc.integration.requests.*; +import com.oracle.bmc.integration.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190131") +public class ExtendDataRetentionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ExtendDataRetentionConverter.class); + + public static com.oracle.bmc.integration.requests.ExtendDataRetentionRequest interceptRequest( + com.oracle.bmc.integration.requests.ExtendDataRetentionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.integration.requests.ExtendDataRetentionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getIntegrationInstanceId(), "integrationInstanceId must not be blank"); + Validate.notNull( + request.getExtendDataRetentionDetails(), "extendDataRetentionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190131") + .path("integrationInstances") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getIntegrationInstanceId())) + .path("actions") + .path("extendDataRetention"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.integration.responses.ExtendDataRetentionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.integration.responses.ExtendDataRetentionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.integration.responses.ExtendDataRetentionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.integration.responses + .ExtendDataRetentionResponse>() { + @Override + public com.oracle.bmc.integration.responses.ExtendDataRetentionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.integration.responses.ExtendDataRetentionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.integration.responses.ExtendDataRetentionResponse + .Builder + builder = + com.oracle.bmc.integration.responses + .ExtendDataRetentionResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.integration.responses.ExtendDataRetentionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/internal/http/RemoveOracleManagedCustomEndpointConverter.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/internal/http/RemoveOracleManagedCustomEndpointConverter.java new file mode 100644 index 00000000000..78f7db43111 --- /dev/null +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/internal/http/RemoveOracleManagedCustomEndpointConverter.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.integration.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.integration.model.*; +import com.oracle.bmc.integration.requests.*; +import com.oracle.bmc.integration.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190131") +public class RemoveOracleManagedCustomEndpointConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RemoveOracleManagedCustomEndpointConverter.class); + + public static com.oracle.bmc.integration.requests.RemoveOracleManagedCustomEndpointRequest + interceptRequest( + com.oracle.bmc.integration.requests.RemoveOracleManagedCustomEndpointRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.integration.requests.RemoveOracleManagedCustomEndpointRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getIntegrationInstanceId(), "integrationInstanceId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20190131") + .path("integrationInstances") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getIntegrationInstanceId())) + .path("actions") + .path("removeOracleManagedCustomEndpoint"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.integration.responses.RemoveOracleManagedCustomEndpointResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.integration.responses.RemoveOracleManagedCustomEndpointResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.integration.responses + .RemoveOracleManagedCustomEndpointResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.integration.responses + .RemoveOracleManagedCustomEndpointResponse>() { + @Override + public com.oracle.bmc.integration.responses + .RemoveOracleManagedCustomEndpointResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.integration.responses.RemoveOracleManagedCustomEndpointResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.integration.responses + .RemoveOracleManagedCustomEndpointResponse.Builder + builder = + com.oracle.bmc.integration.responses + .RemoveOracleManagedCustomEndpointResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.integration.responses + .RemoveOracleManagedCustomEndpointResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/AddOracleManagedCustomEndpointDetails.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/AddOracleManagedCustomEndpointDetails.java new file mode 100644 index 00000000000..75ce7698ab9 --- /dev/null +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/AddOracleManagedCustomEndpointDetails.java @@ -0,0 +1,247 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.integration.model; + +/** + * Details for enabling Oracle Managed custom endpoint + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190131") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AddOracleManagedCustomEndpointDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AddOracleManagedCustomEndpointDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"hostname", "dnsType", "dnsZoneName"}) + public AddOracleManagedCustomEndpointDetails( + String hostname, DnsType dnsType, String dnsZoneName) { + super(); + this.hostname = hostname; + this.dnsType = dnsType; + this.dnsZoneName = dnsZoneName; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Oracle managed custom hostname + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hostname") + private String hostname; + + /** + * Oracle managed custom hostname + * @param hostname the value to set + * @return this builder + **/ + public Builder hostname(String hostname) { + this.hostname = hostname; + this.__explicitlySet__.add("hostname"); + return this; + } + /** + * Type of DNS. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dnsType") + private DnsType dnsType; + + /** + * Type of DNS. + * @param dnsType the value to set + * @return this builder + **/ + public Builder dnsType(DnsType dnsType) { + this.dnsType = dnsType; + this.__explicitlySet__.add("dnsType"); + return this; + } + /** + * DNS Zone name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dnsZoneName") + private String dnsZoneName; + + /** + * DNS Zone name + * @param dnsZoneName the value to set + * @return this builder + **/ + public Builder dnsZoneName(String dnsZoneName) { + this.dnsZoneName = dnsZoneName; + this.__explicitlySet__.add("dnsZoneName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AddOracleManagedCustomEndpointDetails build() { + AddOracleManagedCustomEndpointDetails model = + new AddOracleManagedCustomEndpointDetails( + this.hostname, this.dnsType, this.dnsZoneName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AddOracleManagedCustomEndpointDetails model) { + if (model.wasPropertyExplicitlySet("hostname")) { + this.hostname(model.getHostname()); + } + if (model.wasPropertyExplicitlySet("dnsType")) { + this.dnsType(model.getDnsType()); + } + if (model.wasPropertyExplicitlySet("dnsZoneName")) { + this.dnsZoneName(model.getDnsZoneName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Oracle managed custom hostname + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hostname") + private final String hostname; + + /** + * Oracle managed custom hostname + * @return the value + **/ + public String getHostname() { + return hostname; + } + + /** + * Type of DNS. + **/ + public enum DnsType { + Oci("OCI"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DnsType v : DnsType.values()) { + map.put(v.getValue(), v); + } + } + + DnsType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DnsType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid DnsType: " + key); + } + }; + /** + * Type of DNS. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dnsType") + private final DnsType dnsType; + + /** + * Type of DNS. + * @return the value + **/ + public DnsType getDnsType() { + return dnsType; + } + + /** + * DNS Zone name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dnsZoneName") + private final String dnsZoneName; + + /** + * DNS Zone name + * @return the value + **/ + public String getDnsZoneName() { + return dnsZoneName; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AddOracleManagedCustomEndpointDetails("); + sb.append("super=").append(super.toString()); + sb.append("hostname=").append(String.valueOf(this.hostname)); + sb.append(", dnsType=").append(String.valueOf(this.dnsType)); + sb.append(", dnsZoneName=").append(String.valueOf(this.dnsZoneName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddOracleManagedCustomEndpointDetails)) { + return false; + } + + AddOracleManagedCustomEndpointDetails other = (AddOracleManagedCustomEndpointDetails) o; + return java.util.Objects.equals(this.hostname, other.hostname) + && java.util.Objects.equals(this.dnsType, other.dnsType) + && java.util.Objects.equals(this.dnsZoneName, other.dnsZoneName) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.hostname == null ? 43 : this.hostname.hashCode()); + result = (result * PRIME) + (this.dnsType == null ? 43 : this.dnsType.hashCode()); + result = (result * PRIME) + (this.dnsZoneName == null ? 43 : this.dnsZoneName.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/CreateIntegrationInstanceDetails.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/CreateIntegrationInstanceDetails.java index ee9194dad36..f39b061f43b 100644 --- a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/CreateIntegrationInstanceDetails.java +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/CreateIntegrationInstanceDetails.java @@ -40,6 +40,7 @@ public final class CreateIntegrationInstanceDetails "alternateCustomEndpoints", "consumptionModel", "isFileServerEnabled", + "isDisasterRecoveryEnabled", "networkEndpointDetails", "shape", "domainId" @@ -58,6 +59,7 @@ public CreateIntegrationInstanceDetails( java.util.List alternateCustomEndpoints, ConsumptionModel consumptionModel, Boolean isFileServerEnabled, + Boolean isDisasterRecoveryEnabled, NetworkEndpointDetails networkEndpointDetails, Shape shape, String domainId) { @@ -75,6 +77,7 @@ public CreateIntegrationInstanceDetails( this.alternateCustomEndpoints = alternateCustomEndpoints; this.consumptionModel = consumptionModel; this.isFileServerEnabled = isFileServerEnabled; + this.isDisasterRecoveryEnabled = isDisasterRecoveryEnabled; this.networkEndpointDetails = networkEndpointDetails; this.shape = shape; this.domainId = domainId; @@ -307,6 +310,22 @@ public Builder isFileServerEnabled(Boolean isFileServerEnabled) { this.__explicitlySet__.add("isFileServerEnabled"); return this; } + /** + * Is Disaster Recovery enabled or not. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDisasterRecoveryEnabled") + private Boolean isDisasterRecoveryEnabled; + + /** + * Is Disaster Recovery enabled or not. + * @param isDisasterRecoveryEnabled the value to set + * @return this builder + **/ + public Builder isDisasterRecoveryEnabled(Boolean isDisasterRecoveryEnabled) { + this.isDisasterRecoveryEnabled = isDisasterRecoveryEnabled; + this.__explicitlySet__.add("isDisasterRecoveryEnabled"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("networkEndpointDetails") private NetworkEndpointDetails networkEndpointDetails; @@ -376,6 +395,7 @@ public CreateIntegrationInstanceDetails build() { this.alternateCustomEndpoints, this.consumptionModel, this.isFileServerEnabled, + this.isDisasterRecoveryEnabled, this.networkEndpointDetails, this.shape, this.domainId); @@ -426,6 +446,9 @@ public Builder copy(CreateIntegrationInstanceDetails model) { if (model.wasPropertyExplicitlySet("isFileServerEnabled")) { this.isFileServerEnabled(model.getIsFileServerEnabled()); } + if (model.wasPropertyExplicitlySet("isDisasterRecoveryEnabled")) { + this.isDisasterRecoveryEnabled(model.getIsDisasterRecoveryEnabled()); + } if (model.wasPropertyExplicitlySet("networkEndpointDetails")) { this.networkEndpointDetails(model.getNetworkEndpointDetails()); } @@ -489,6 +512,7 @@ public enum IntegrationInstanceType { Enterprise("ENTERPRISE"), Standardx("STANDARDX"), Enterprisex("ENTERPRISEX"), + Healthcare("HEALTHCARE"), ; private final String value; @@ -723,6 +747,20 @@ public Boolean getIsFileServerEnabled() { return isFileServerEnabled; } + /** + * Is Disaster Recovery enabled or not. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDisasterRecoveryEnabled") + private final Boolean isDisasterRecoveryEnabled; + + /** + * Is Disaster Recovery enabled or not. + * @return the value + **/ + public Boolean getIsDisasterRecoveryEnabled() { + return isDisasterRecoveryEnabled; + } + @com.fasterxml.jackson.annotation.JsonProperty("networkEndpointDetails") private final NetworkEndpointDetails networkEndpointDetails; @@ -830,6 +868,8 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.alternateCustomEndpoints)); sb.append(", consumptionModel=").append(String.valueOf(this.consumptionModel)); sb.append(", isFileServerEnabled=").append(String.valueOf(this.isFileServerEnabled)); + sb.append(", isDisasterRecoveryEnabled=") + .append(String.valueOf(this.isDisasterRecoveryEnabled)); sb.append(", networkEndpointDetails=").append(String.valueOf(this.networkEndpointDetails)); sb.append(", shape=").append(String.valueOf(this.shape)); sb.append(", domainId=").append(String.valueOf(this.domainId)); @@ -863,6 +903,8 @@ public boolean equals(Object o) { this.alternateCustomEndpoints, other.alternateCustomEndpoints) && java.util.Objects.equals(this.consumptionModel, other.consumptionModel) && java.util.Objects.equals(this.isFileServerEnabled, other.isFileServerEnabled) + && java.util.Objects.equals( + this.isDisasterRecoveryEnabled, other.isDisasterRecoveryEnabled) && java.util.Objects.equals( this.networkEndpointDetails, other.networkEndpointDetails) && java.util.Objects.equals(this.shape, other.shape) @@ -909,6 +951,11 @@ public int hashCode() { + (this.isFileServerEnabled == null ? 43 : this.isFileServerEnabled.hashCode()); + result = + (result * PRIME) + + (this.isDisasterRecoveryEnabled == null + ? 43 + : this.isDisasterRecoveryEnabled.hashCode()); result = (result * PRIME) + (this.networkEndpointDetails == null diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/CrossRegionIntegrationInstanceDetails.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/CrossRegionIntegrationInstanceDetails.java new file mode 100644 index 00000000000..2defeb4dcf4 --- /dev/null +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/CrossRegionIntegrationInstanceDetails.java @@ -0,0 +1,300 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.integration.model; + +/** + * Details of integration instance created in cross region for disaster recovery. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190131") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CrossRegionIntegrationInstanceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CrossRegionIntegrationInstanceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"role", "id", "region", "timeRoleChanged"}) + public CrossRegionIntegrationInstanceDetails( + Role role, String id, String region, java.util.Date timeRoleChanged) { + super(); + this.role = role; + this.id = id; + this.region = region; + this.timeRoleChanged = timeRoleChanged; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Role of the integration instance in the region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("role") + private Role role; + + /** + * Role of the integration instance in the region + * @param role the value to set + * @return this builder + **/ + public Builder role(Role role) { + this.role = role; + this.__explicitlySet__.add("role"); + return this; + } + /** + * Cross region integration instance identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Cross region integration instance identifier + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Cross region where integration instance is created + **/ + @com.fasterxml.jackson.annotation.JsonProperty("region") + private String region; + + /** + * Cross region where integration instance is created + * @param region the value to set + * @return this builder + **/ + public Builder region(String region) { + this.region = region; + this.__explicitlySet__.add("region"); + return this; + } + /** + * Time when cross region integration instance role was changed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeRoleChanged") + private java.util.Date timeRoleChanged; + + /** + * Time when cross region integration instance role was changed + * @param timeRoleChanged the value to set + * @return this builder + **/ + public Builder timeRoleChanged(java.util.Date timeRoleChanged) { + this.timeRoleChanged = timeRoleChanged; + this.__explicitlySet__.add("timeRoleChanged"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CrossRegionIntegrationInstanceDetails build() { + CrossRegionIntegrationInstanceDetails model = + new CrossRegionIntegrationInstanceDetails( + this.role, this.id, this.region, this.timeRoleChanged); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CrossRegionIntegrationInstanceDetails model) { + if (model.wasPropertyExplicitlySet("role")) { + this.role(model.getRole()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("region")) { + this.region(model.getRegion()); + } + if (model.wasPropertyExplicitlySet("timeRoleChanged")) { + this.timeRoleChanged(model.getTimeRoleChanged()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Role of the integration instance in the region + **/ + public enum Role { + Primary("PRIMARY"), + Secondary("SECONDARY"), + Unknown("UNKNOWN"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Role.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Role v : Role.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Role(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Role create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Role', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * Role of the integration instance in the region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("role") + private final Role role; + + /** + * Role of the integration instance in the region + * @return the value + **/ + public Role getRole() { + return role; + } + + /** + * Cross region integration instance identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Cross region integration instance identifier + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Cross region where integration instance is created + **/ + @com.fasterxml.jackson.annotation.JsonProperty("region") + private final String region; + + /** + * Cross region where integration instance is created + * @return the value + **/ + public String getRegion() { + return region; + } + + /** + * Time when cross region integration instance role was changed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeRoleChanged") + private final java.util.Date timeRoleChanged; + + /** + * Time when cross region integration instance role was changed + * @return the value + **/ + public java.util.Date getTimeRoleChanged() { + return timeRoleChanged; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CrossRegionIntegrationInstanceDetails("); + sb.append("super=").append(super.toString()); + sb.append("role=").append(String.valueOf(this.role)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", region=").append(String.valueOf(this.region)); + sb.append(", timeRoleChanged=").append(String.valueOf(this.timeRoleChanged)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CrossRegionIntegrationInstanceDetails)) { + return false; + } + + CrossRegionIntegrationInstanceDetails other = (CrossRegionIntegrationInstanceDetails) o; + return java.util.Objects.equals(this.role, other.role) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.region, other.region) + && java.util.Objects.equals(this.timeRoleChanged, other.timeRoleChanged) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.role == null ? 43 : this.role.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.region == null ? 43 : this.region.hashCode()); + result = + (result * PRIME) + + (this.timeRoleChanged == null ? 43 : this.timeRoleChanged.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/CustomEndpointDetails.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/CustomEndpointDetails.java index 11ce9746d30..e0f6277af4e 100644 --- a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/CustomEndpointDetails.java +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/CustomEndpointDetails.java @@ -24,17 +24,26 @@ public final class CustomEndpointDetails @Deprecated @java.beans.ConstructorProperties({ "hostname", + "managedType", + "dnsZoneName", + "dnsType", "certificateSecretId", "certificateSecretVersion", "alias" }) public CustomEndpointDetails( String hostname, + ManagedType managedType, + String dnsZoneName, + DnsType dnsType, String certificateSecretId, Integer certificateSecretVersion, String alias) { super(); this.hostname = hostname; + this.managedType = managedType; + this.dnsZoneName = dnsZoneName; + this.dnsType = dnsType; this.certificateSecretId = certificateSecretId; this.certificateSecretVersion = certificateSecretVersion; this.alias = alias; @@ -58,6 +67,54 @@ public Builder hostname(String hostname) { this.__explicitlySet__.add("hostname"); return this; } + /** + * Indicates if custom endpoint is managed by oracle or customer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managedType") + private ManagedType managedType; + + /** + * Indicates if custom endpoint is managed by oracle or customer. + * @param managedType the value to set + * @return this builder + **/ + public Builder managedType(ManagedType managedType) { + this.managedType = managedType; + this.__explicitlySet__.add("managedType"); + return this; + } + /** + * DNS Zone name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dnsZoneName") + private String dnsZoneName; + + /** + * DNS Zone name + * @param dnsZoneName the value to set + * @return this builder + **/ + public Builder dnsZoneName(String dnsZoneName) { + this.dnsZoneName = dnsZoneName; + this.__explicitlySet__.add("dnsZoneName"); + return this; + } + /** + * Type of DNS. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dnsType") + private DnsType dnsType; + + /** + * Type of DNS. + * @param dnsType the value to set + * @return this builder + **/ + public Builder dnsType(DnsType dnsType) { + this.dnsType = dnsType; + this.__explicitlySet__.add("dnsType"); + return this; + } /** * Optional OCID of a vault/secret containing a private SSL certificate bundle to be used for the custom hostname. * @@ -120,6 +177,9 @@ public CustomEndpointDetails build() { CustomEndpointDetails model = new CustomEndpointDetails( this.hostname, + this.managedType, + this.dnsZoneName, + this.dnsType, this.certificateSecretId, this.certificateSecretVersion, this.alias); @@ -134,6 +194,15 @@ public Builder copy(CustomEndpointDetails model) { if (model.wasPropertyExplicitlySet("hostname")) { this.hostname(model.getHostname()); } + if (model.wasPropertyExplicitlySet("managedType")) { + this.managedType(model.getManagedType()); + } + if (model.wasPropertyExplicitlySet("dnsZoneName")) { + this.dnsZoneName(model.getDnsZoneName()); + } + if (model.wasPropertyExplicitlySet("dnsType")) { + this.dnsType(model.getDnsType()); + } if (model.wasPropertyExplicitlySet("certificateSecretId")) { this.certificateSecretId(model.getCertificateSecretId()); } @@ -172,6 +241,143 @@ public String getHostname() { return hostname; } + /** + * Indicates if custom endpoint is managed by oracle or customer. + **/ + public enum ManagedType { + OracleManaged("ORACLE_MANAGED"), + CustomerManaged("CUSTOMER_MANAGED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ManagedType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ManagedType v : ManagedType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ManagedType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ManagedType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ManagedType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Indicates if custom endpoint is managed by oracle or customer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managedType") + private final ManagedType managedType; + + /** + * Indicates if custom endpoint is managed by oracle or customer. + * @return the value + **/ + public ManagedType getManagedType() { + return managedType; + } + + /** + * DNS Zone name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dnsZoneName") + private final String dnsZoneName; + + /** + * DNS Zone name + * @return the value + **/ + public String getDnsZoneName() { + return dnsZoneName; + } + + /** + * Type of DNS. + **/ + public enum DnsType { + Oci("OCI"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DnsType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DnsType v : DnsType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DnsType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DnsType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DnsType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Type of DNS. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dnsType") + private final DnsType dnsType; + + /** + * Type of DNS. + * @return the value + **/ + public DnsType getDnsType() { + return dnsType; + } + /** * Optional OCID of a vault/secret containing a private SSL certificate bundle to be used for the custom hostname. * @@ -235,6 +441,9 @@ public String toString(boolean includeByteArrayContents) { sb.append("CustomEndpointDetails("); sb.append("super=").append(super.toString()); sb.append("hostname=").append(String.valueOf(this.hostname)); + sb.append(", managedType=").append(String.valueOf(this.managedType)); + sb.append(", dnsZoneName=").append(String.valueOf(this.dnsZoneName)); + sb.append(", dnsType=").append(String.valueOf(this.dnsType)); sb.append(", certificateSecretId=").append(String.valueOf(this.certificateSecretId)); sb.append(", certificateSecretVersion=") .append(String.valueOf(this.certificateSecretVersion)); @@ -254,6 +463,9 @@ public boolean equals(Object o) { CustomEndpointDetails other = (CustomEndpointDetails) o; return java.util.Objects.equals(this.hostname, other.hostname) + && java.util.Objects.equals(this.managedType, other.managedType) + && java.util.Objects.equals(this.dnsZoneName, other.dnsZoneName) + && java.util.Objects.equals(this.dnsType, other.dnsType) && java.util.Objects.equals(this.certificateSecretId, other.certificateSecretId) && java.util.Objects.equals( this.certificateSecretVersion, other.certificateSecretVersion) @@ -266,6 +478,9 @@ public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.hostname == null ? 43 : this.hostname.hashCode()); + result = (result * PRIME) + (this.managedType == null ? 43 : this.managedType.hashCode()); + result = (result * PRIME) + (this.dnsZoneName == null ? 43 : this.dnsZoneName.hashCode()); + result = (result * PRIME) + (this.dnsType == null ? 43 : this.dnsType.hashCode()); result = (result * PRIME) + (this.certificateSecretId == null diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/DisasterRecoveryDetails.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/DisasterRecoveryDetails.java new file mode 100644 index 00000000000..f408b36b9ec --- /dev/null +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/DisasterRecoveryDetails.java @@ -0,0 +1,268 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.integration.model; + +/** + * Disaster recovery details for the integration instance created in the region. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190131") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DisasterRecoveryDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DisasterRecoveryDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "role", + "regionalInstanceUrl", + "crossRegionIntegrationInstanceDetails" + }) + public DisasterRecoveryDetails( + Role role, + String regionalInstanceUrl, + CrossRegionIntegrationInstanceDetails crossRegionIntegrationInstanceDetails) { + super(); + this.role = role; + this.regionalInstanceUrl = regionalInstanceUrl; + this.crossRegionIntegrationInstanceDetails = crossRegionIntegrationInstanceDetails; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Role of the integration instance in the region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("role") + private Role role; + + /** + * Role of the integration instance in the region + * @param role the value to set + * @return this builder + **/ + public Builder role(Role role) { + this.role = role; + this.__explicitlySet__.add("role"); + return this; + } + /** + * Region specific instance url for the integration instance in the region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("regionalInstanceUrl") + private String regionalInstanceUrl; + + /** + * Region specific instance url for the integration instance in the region + * @param regionalInstanceUrl the value to set + * @return this builder + **/ + public Builder regionalInstanceUrl(String regionalInstanceUrl) { + this.regionalInstanceUrl = regionalInstanceUrl; + this.__explicitlySet__.add("regionalInstanceUrl"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("crossRegionIntegrationInstanceDetails") + private CrossRegionIntegrationInstanceDetails crossRegionIntegrationInstanceDetails; + + public Builder crossRegionIntegrationInstanceDetails( + CrossRegionIntegrationInstanceDetails crossRegionIntegrationInstanceDetails) { + this.crossRegionIntegrationInstanceDetails = crossRegionIntegrationInstanceDetails; + this.__explicitlySet__.add("crossRegionIntegrationInstanceDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DisasterRecoveryDetails build() { + DisasterRecoveryDetails model = + new DisasterRecoveryDetails( + this.role, + this.regionalInstanceUrl, + this.crossRegionIntegrationInstanceDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DisasterRecoveryDetails model) { + if (model.wasPropertyExplicitlySet("role")) { + this.role(model.getRole()); + } + if (model.wasPropertyExplicitlySet("regionalInstanceUrl")) { + this.regionalInstanceUrl(model.getRegionalInstanceUrl()); + } + if (model.wasPropertyExplicitlySet("crossRegionIntegrationInstanceDetails")) { + this.crossRegionIntegrationInstanceDetails( + model.getCrossRegionIntegrationInstanceDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Role of the integration instance in the region + **/ + public enum Role { + Primary("PRIMARY"), + Secondary("SECONDARY"), + Unknown("UNKNOWN"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Role.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Role v : Role.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Role(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Role create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Role', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** + * Role of the integration instance in the region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("role") + private final Role role; + + /** + * Role of the integration instance in the region + * @return the value + **/ + public Role getRole() { + return role; + } + + /** + * Region specific instance url for the integration instance in the region + **/ + @com.fasterxml.jackson.annotation.JsonProperty("regionalInstanceUrl") + private final String regionalInstanceUrl; + + /** + * Region specific instance url for the integration instance in the region + * @return the value + **/ + public String getRegionalInstanceUrl() { + return regionalInstanceUrl; + } + + @com.fasterxml.jackson.annotation.JsonProperty("crossRegionIntegrationInstanceDetails") + private final CrossRegionIntegrationInstanceDetails crossRegionIntegrationInstanceDetails; + + public CrossRegionIntegrationInstanceDetails getCrossRegionIntegrationInstanceDetails() { + return crossRegionIntegrationInstanceDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DisasterRecoveryDetails("); + sb.append("super=").append(super.toString()); + sb.append("role=").append(String.valueOf(this.role)); + sb.append(", regionalInstanceUrl=").append(String.valueOf(this.regionalInstanceUrl)); + sb.append(", crossRegionIntegrationInstanceDetails=") + .append(String.valueOf(this.crossRegionIntegrationInstanceDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DisasterRecoveryDetails)) { + return false; + } + + DisasterRecoveryDetails other = (DisasterRecoveryDetails) o; + return java.util.Objects.equals(this.role, other.role) + && java.util.Objects.equals(this.regionalInstanceUrl, other.regionalInstanceUrl) + && java.util.Objects.equals( + this.crossRegionIntegrationInstanceDetails, + other.crossRegionIntegrationInstanceDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.role == null ? 43 : this.role.hashCode()); + result = + (result * PRIME) + + (this.regionalInstanceUrl == null + ? 43 + : this.regionalInstanceUrl.hashCode()); + result = + (result * PRIME) + + (this.crossRegionIntegrationInstanceDetails == null + ? 43 + : this.crossRegionIntegrationInstanceDetails.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/ExtendDataRetentionDetails.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/ExtendDataRetentionDetails.java new file mode 100644 index 00000000000..4d3ac574813 --- /dev/null +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/ExtendDataRetentionDetails.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.integration.model; + +/** + * Details for extending data retention for given integration instance + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190131") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExtendDataRetentionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExtendDataRetentionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"dataRetentionPeriod"}) + public ExtendDataRetentionDetails(DataRetentionPeriod dataRetentionPeriod) { + super(); + this.dataRetentionPeriod = dataRetentionPeriod; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Data retention period set for given integration instance + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataRetentionPeriod") + private DataRetentionPeriod dataRetentionPeriod; + + /** + * Data retention period set for given integration instance + * @param dataRetentionPeriod the value to set + * @return this builder + **/ + public Builder dataRetentionPeriod(DataRetentionPeriod dataRetentionPeriod) { + this.dataRetentionPeriod = dataRetentionPeriod; + this.__explicitlySet__.add("dataRetentionPeriod"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExtendDataRetentionDetails build() { + ExtendDataRetentionDetails model = + new ExtendDataRetentionDetails(this.dataRetentionPeriod); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExtendDataRetentionDetails model) { + if (model.wasPropertyExplicitlySet("dataRetentionPeriod")) { + this.dataRetentionPeriod(model.getDataRetentionPeriod()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Data retention period set for given integration instance + **/ + public enum DataRetentionPeriod { + Months1("MONTHS_1"), + Months3("MONTHS_3"), + Months6("MONTHS_6"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DataRetentionPeriod v : DataRetentionPeriod.values()) { + map.put(v.getValue(), v); + } + } + + DataRetentionPeriod(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DataRetentionPeriod create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid DataRetentionPeriod: " + key); + } + }; + /** + * Data retention period set for given integration instance + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataRetentionPeriod") + private final DataRetentionPeriod dataRetentionPeriod; + + /** + * Data retention period set for given integration instance + * @return the value + **/ + public DataRetentionPeriod getDataRetentionPeriod() { + return dataRetentionPeriod; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExtendDataRetentionDetails("); + sb.append("super=").append(super.toString()); + sb.append("dataRetentionPeriod=").append(String.valueOf(this.dataRetentionPeriod)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExtendDataRetentionDetails)) { + return false; + } + + ExtendDataRetentionDetails other = (ExtendDataRetentionDetails) o; + return java.util.Objects.equals(this.dataRetentionPeriod, other.dataRetentionPeriod) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.dataRetentionPeriod == null + ? 43 + : this.dataRetentionPeriod.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/IntegrationInstance.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/IntegrationInstance.java index 12478336c0a..9ba8974c3bd 100644 --- a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/IntegrationInstance.java +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/IntegrationInstance.java @@ -29,11 +29,14 @@ public final class IntegrationInstance extends com.oracle.bmc.http.internal.Expl "timeCreated", "timeUpdated", "lifecycleState", + "lifecycleDetails", "stateMessage", "freeformTags", "definedTags", + "systemTags", "isByol", "instanceUrl", + "instanceDesignTimeUrl", "messagePacks", "isFileServerEnabled", "isVisualBuilderEnabled", @@ -44,7 +47,10 @@ public final class IntegrationInstance extends com.oracle.bmc.http.internal.Expl "idcsInfo", "attachments", "shape", - "privateEndpointOutboundConnection" + "privateEndpointOutboundConnection", + "isDisasterRecoveryEnabled", + "disasterRecoveryDetails", + "dataRetentionPeriod" }) public IntegrationInstance( String id, @@ -54,11 +60,14 @@ public IntegrationInstance( java.util.Date timeCreated, java.util.Date timeUpdated, LifecycleState lifecycleState, + String lifecycleDetails, String stateMessage, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> systemTags, Boolean isByol, String instanceUrl, + String instanceDesignTimeUrl, Integer messagePacks, Boolean isFileServerEnabled, Boolean isVisualBuilderEnabled, @@ -69,7 +78,10 @@ public IntegrationInstance( IdcsInfoDetails idcsInfo, java.util.List attachments, Shape shape, - OutboundConnection privateEndpointOutboundConnection) { + OutboundConnection privateEndpointOutboundConnection, + Boolean isDisasterRecoveryEnabled, + DisasterRecoveryDetails disasterRecoveryDetails, + DataRetentionPeriod dataRetentionPeriod) { super(); this.id = id; this.displayName = displayName; @@ -78,11 +90,14 @@ public IntegrationInstance( this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; this.stateMessage = stateMessage; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.systemTags = systemTags; this.isByol = isByol; this.instanceUrl = instanceUrl; + this.instanceDesignTimeUrl = instanceDesignTimeUrl; this.messagePacks = messagePacks; this.isFileServerEnabled = isFileServerEnabled; this.isVisualBuilderEnabled = isVisualBuilderEnabled; @@ -94,6 +109,9 @@ public IntegrationInstance( this.attachments = attachments; this.shape = shape; this.privateEndpointOutboundConnection = privateEndpointOutboundConnection; + this.isDisasterRecoveryEnabled = isDisasterRecoveryEnabled; + this.disasterRecoveryDetails = disasterRecoveryDetails; + this.dataRetentionPeriod = dataRetentionPeriod; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -216,6 +234,22 @@ public Builder lifecycleState(LifecycleState lifecycleState) { this.__explicitlySet__.add("lifecycleState"); return this; } + /** + * Additional details of lifecycleState or substates + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Additional details of lifecycleState or substates + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } /** * An message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. **/ @@ -277,6 +311,26 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } /** * Bring your own license. **/ @@ -309,6 +363,22 @@ public Builder instanceUrl(String instanceUrl) { this.__explicitlySet__.add("instanceUrl"); return this; } + /** + * The Integration Instance Design Time URL + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceDesignTimeUrl") + private String instanceDesignTimeUrl; + + /** + * The Integration Instance Design Time URL + * @param instanceDesignTimeUrl the value to set + * @return this builder + **/ + public Builder instanceDesignTimeUrl(String instanceDesignTimeUrl) { + this.instanceDesignTimeUrl = instanceDesignTimeUrl; + this.__explicitlySet__.add("instanceDesignTimeUrl"); + return this; + } /** * The number of configured message packs (if any) **/ @@ -463,6 +533,47 @@ public Builder privateEndpointOutboundConnection( this.__explicitlySet__.add("privateEndpointOutboundConnection"); return this; } + /** + * Is Disaster Recovery enabled for the integrationInstance + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDisasterRecoveryEnabled") + private Boolean isDisasterRecoveryEnabled; + + /** + * Is Disaster Recovery enabled for the integrationInstance + * @param isDisasterRecoveryEnabled the value to set + * @return this builder + **/ + public Builder isDisasterRecoveryEnabled(Boolean isDisasterRecoveryEnabled) { + this.isDisasterRecoveryEnabled = isDisasterRecoveryEnabled; + this.__explicitlySet__.add("isDisasterRecoveryEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("disasterRecoveryDetails") + private DisasterRecoveryDetails disasterRecoveryDetails; + + public Builder disasterRecoveryDetails(DisasterRecoveryDetails disasterRecoveryDetails) { + this.disasterRecoveryDetails = disasterRecoveryDetails; + this.__explicitlySet__.add("disasterRecoveryDetails"); + return this; + } + /** + * Data retention period set for given integration instance + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataRetentionPeriod") + private DataRetentionPeriod dataRetentionPeriod; + + /** + * Data retention period set for given integration instance + * @param dataRetentionPeriod the value to set + * @return this builder + **/ + public Builder dataRetentionPeriod(DataRetentionPeriod dataRetentionPeriod) { + this.dataRetentionPeriod = dataRetentionPeriod; + this.__explicitlySet__.add("dataRetentionPeriod"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -477,11 +588,14 @@ public IntegrationInstance build() { this.timeCreated, this.timeUpdated, this.lifecycleState, + this.lifecycleDetails, this.stateMessage, this.freeformTags, this.definedTags, + this.systemTags, this.isByol, this.instanceUrl, + this.instanceDesignTimeUrl, this.messagePacks, this.isFileServerEnabled, this.isVisualBuilderEnabled, @@ -492,7 +606,10 @@ public IntegrationInstance build() { this.idcsInfo, this.attachments, this.shape, - this.privateEndpointOutboundConnection); + this.privateEndpointOutboundConnection, + this.isDisasterRecoveryEnabled, + this.disasterRecoveryDetails, + this.dataRetentionPeriod); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -522,6 +639,9 @@ public Builder copy(IntegrationInstance model) { if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } if (model.wasPropertyExplicitlySet("stateMessage")) { this.stateMessage(model.getStateMessage()); } @@ -531,12 +651,18 @@ public Builder copy(IntegrationInstance model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } if (model.wasPropertyExplicitlySet("isByol")) { this.isByol(model.getIsByol()); } if (model.wasPropertyExplicitlySet("instanceUrl")) { this.instanceUrl(model.getInstanceUrl()); } + if (model.wasPropertyExplicitlySet("instanceDesignTimeUrl")) { + this.instanceDesignTimeUrl(model.getInstanceDesignTimeUrl()); + } if (model.wasPropertyExplicitlySet("messagePacks")) { this.messagePacks(model.getMessagePacks()); } @@ -571,6 +697,15 @@ public Builder copy(IntegrationInstance model) { this.privateEndpointOutboundConnection( model.getPrivateEndpointOutboundConnection()); } + if (model.wasPropertyExplicitlySet("isDisasterRecoveryEnabled")) { + this.isDisasterRecoveryEnabled(model.getIsDisasterRecoveryEnabled()); + } + if (model.wasPropertyExplicitlySet("disasterRecoveryDetails")) { + this.disasterRecoveryDetails(model.getDisasterRecoveryDetails()); + } + if (model.wasPropertyExplicitlySet("dataRetentionPeriod")) { + this.dataRetentionPeriod(model.getDataRetentionPeriod()); + } return this; } } @@ -639,6 +774,7 @@ public enum IntegrationInstanceType { Enterprise("ENTERPRISE"), Standardx("STANDARDX"), Enterprisex("ENTERPRISEX"), + Healthcare("HEALTHCARE"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -796,6 +932,20 @@ public LifecycleState getLifecycleState() { return lifecycleState; } + /** + * Additional details of lifecycleState or substates + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Additional details of lifecycleState or substates + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + /** * An message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. **/ @@ -850,6 +1000,24 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + /** * Bring your own license. **/ @@ -878,6 +1046,20 @@ public String getInstanceUrl() { return instanceUrl; } + /** + * The Integration Instance Design Time URL + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceDesignTimeUrl") + private final String instanceDesignTimeUrl; + + /** + * The Integration Instance Design Time URL + * @return the value + **/ + public String getInstanceDesignTimeUrl() { + return instanceDesignTimeUrl; + } + /** * The number of configured message packs (if any) **/ @@ -1104,6 +1286,90 @@ public OutboundConnection getPrivateEndpointOutboundConnection() { return privateEndpointOutboundConnection; } + /** + * Is Disaster Recovery enabled for the integrationInstance + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDisasterRecoveryEnabled") + private final Boolean isDisasterRecoveryEnabled; + + /** + * Is Disaster Recovery enabled for the integrationInstance + * @return the value + **/ + public Boolean getIsDisasterRecoveryEnabled() { + return isDisasterRecoveryEnabled; + } + + @com.fasterxml.jackson.annotation.JsonProperty("disasterRecoveryDetails") + private final DisasterRecoveryDetails disasterRecoveryDetails; + + public DisasterRecoveryDetails getDisasterRecoveryDetails() { + return disasterRecoveryDetails; + } + + /** + * Data retention period set for given integration instance + **/ + public enum DataRetentionPeriod { + Months1("MONTHS_1"), + Months3("MONTHS_3"), + Months6("MONTHS_6"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DataRetentionPeriod.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DataRetentionPeriod v : DataRetentionPeriod.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DataRetentionPeriod(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DataRetentionPeriod create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DataRetentionPeriod', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Data retention period set for given integration instance + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataRetentionPeriod") + private final DataRetentionPeriod dataRetentionPeriod; + + /** + * Data retention period set for given integration instance + * @return the value + **/ + public DataRetentionPeriod getDataRetentionPeriod() { + return dataRetentionPeriod; + } + @Override public String toString() { return this.toString(true); @@ -1126,11 +1392,14 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", stateMessage=").append(String.valueOf(this.stateMessage)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", isByol=").append(String.valueOf(this.isByol)); sb.append(", instanceUrl=").append(String.valueOf(this.instanceUrl)); + sb.append(", instanceDesignTimeUrl=").append(String.valueOf(this.instanceDesignTimeUrl)); sb.append(", messagePacks=").append(String.valueOf(this.messagePacks)); sb.append(", isFileServerEnabled=").append(String.valueOf(this.isFileServerEnabled)); sb.append(", isVisualBuilderEnabled=").append(String.valueOf(this.isVisualBuilderEnabled)); @@ -1144,6 +1413,11 @@ public String toString(boolean includeByteArrayContents) { sb.append(", shape=").append(String.valueOf(this.shape)); sb.append(", privateEndpointOutboundConnection=") .append(String.valueOf(this.privateEndpointOutboundConnection)); + sb.append(", isDisasterRecoveryEnabled=") + .append(String.valueOf(this.isDisasterRecoveryEnabled)); + sb.append(", disasterRecoveryDetails=") + .append(String.valueOf(this.disasterRecoveryDetails)); + sb.append(", dataRetentionPeriod=").append(String.valueOf(this.dataRetentionPeriod)); sb.append(")"); return sb.toString(); } @@ -1166,11 +1440,14 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.stateMessage, other.stateMessage) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.isByol, other.isByol) && java.util.Objects.equals(this.instanceUrl, other.instanceUrl) + && java.util.Objects.equals(this.instanceDesignTimeUrl, other.instanceDesignTimeUrl) && java.util.Objects.equals(this.messagePacks, other.messagePacks) && java.util.Objects.equals(this.isFileServerEnabled, other.isFileServerEnabled) && java.util.Objects.equals( @@ -1187,6 +1464,11 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.privateEndpointOutboundConnection, other.privateEndpointOutboundConnection) + && java.util.Objects.equals( + this.isDisasterRecoveryEnabled, other.isDisasterRecoveryEnabled) + && java.util.Objects.equals( + this.disasterRecoveryDetails, other.disasterRecoveryDetails) + && java.util.Objects.equals(this.dataRetentionPeriod, other.dataRetentionPeriod) && super.equals(other); } @@ -1209,11 +1491,20 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); result = (result * PRIME) + (this.stateMessage == null ? 43 : this.stateMessage.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.isByol == null ? 43 : this.isByol.hashCode()); result = (result * PRIME) + (this.instanceUrl == null ? 43 : this.instanceUrl.hashCode()); + result = + (result * PRIME) + + (this.instanceDesignTimeUrl == null + ? 43 + : this.instanceDesignTimeUrl.hashCode()); result = (result * PRIME) + (this.messagePacks == null ? 43 : this.messagePacks.hashCode()); result = (result * PRIME) @@ -1249,6 +1540,21 @@ public int hashCode() { + (this.privateEndpointOutboundConnection == null ? 43 : this.privateEndpointOutboundConnection.hashCode()); + result = + (result * PRIME) + + (this.isDisasterRecoveryEnabled == null + ? 43 + : this.isDisasterRecoveryEnabled.hashCode()); + result = + (result * PRIME) + + (this.disasterRecoveryDetails == null + ? 43 + : this.disasterRecoveryDetails.hashCode()); + result = + (result * PRIME) + + (this.dataRetentionPeriod == null + ? 43 + : this.dataRetentionPeriod.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/IntegrationInstanceSummary.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/IntegrationInstanceSummary.java index c417177a655..3aa3c7c3013 100644 --- a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/IntegrationInstanceSummary.java +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/IntegrationInstanceSummary.java @@ -30,9 +30,11 @@ public final class IntegrationInstanceSummary "timeCreated", "timeUpdated", "lifecycleState", + "lifecycleDetails", "stateMessage", "isByol", "instanceUrl", + "instanceDesignTimeUrl", "messagePacks", "isFileServerEnabled", "isVisualBuilderEnabled", @@ -42,8 +44,11 @@ public final class IntegrationInstanceSummary "networkEndpointDetails", "freeformTags", "definedTags", + "systemTags", "shape", - "privateEndpointOutboundConnection" + "privateEndpointOutboundConnection", + "isDisasterRecoveryEnabled", + "dataRetentionPeriod" }) public IntegrationInstanceSummary( String id, @@ -53,9 +58,11 @@ public IntegrationInstanceSummary( java.util.Date timeCreated, java.util.Date timeUpdated, LifecycleState lifecycleState, + String lifecycleDetails, String stateMessage, Boolean isByol, String instanceUrl, + String instanceDesignTimeUrl, Integer messagePacks, Boolean isFileServerEnabled, Boolean isVisualBuilderEnabled, @@ -65,8 +72,11 @@ public IntegrationInstanceSummary( NetworkEndpointDetails networkEndpointDetails, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> systemTags, Shape shape, - OutboundConnection privateEndpointOutboundConnection) { + OutboundConnection privateEndpointOutboundConnection, + Boolean isDisasterRecoveryEnabled, + DataRetentionPeriod dataRetentionPeriod) { super(); this.id = id; this.displayName = displayName; @@ -75,9 +85,11 @@ public IntegrationInstanceSummary( this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; this.stateMessage = stateMessage; this.isByol = isByol; this.instanceUrl = instanceUrl; + this.instanceDesignTimeUrl = instanceDesignTimeUrl; this.messagePacks = messagePacks; this.isFileServerEnabled = isFileServerEnabled; this.isVisualBuilderEnabled = isVisualBuilderEnabled; @@ -87,8 +99,11 @@ public IntegrationInstanceSummary( this.networkEndpointDetails = networkEndpointDetails; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.systemTags = systemTags; this.shape = shape; this.privateEndpointOutboundConnection = privateEndpointOutboundConnection; + this.isDisasterRecoveryEnabled = isDisasterRecoveryEnabled; + this.dataRetentionPeriod = dataRetentionPeriod; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -211,6 +226,22 @@ public Builder lifecycleState(LifecycleState lifecycleState) { this.__explicitlySet__.add("lifecycleState"); return this; } + /** + * Additional details of lifecycleState or substates + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Additional details of lifecycleState or substates + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } /** * An message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. **/ @@ -259,6 +290,22 @@ public Builder instanceUrl(String instanceUrl) { this.__explicitlySet__.add("instanceUrl"); return this; } + /** + * The Integration Instance Design Time URL + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceDesignTimeUrl") + private String instanceDesignTimeUrl; + + /** + * The Integration Instance Design Time URL + * @param instanceDesignTimeUrl the value to set + * @return this builder + **/ + public Builder instanceDesignTimeUrl(String instanceDesignTimeUrl) { + this.instanceDesignTimeUrl = instanceDesignTimeUrl; + this.__explicitlySet__.add("instanceDesignTimeUrl"); + return this; + } /** * The number of configured message packs (if any) **/ @@ -405,6 +452,26 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } /** * Shape **/ @@ -431,6 +498,38 @@ public Builder privateEndpointOutboundConnection( this.__explicitlySet__.add("privateEndpointOutboundConnection"); return this; } + /** + * Is Disaster Recovery enabled for the integrationInstance + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDisasterRecoveryEnabled") + private Boolean isDisasterRecoveryEnabled; + + /** + * Is Disaster Recovery enabled for the integrationInstance + * @param isDisasterRecoveryEnabled the value to set + * @return this builder + **/ + public Builder isDisasterRecoveryEnabled(Boolean isDisasterRecoveryEnabled) { + this.isDisasterRecoveryEnabled = isDisasterRecoveryEnabled; + this.__explicitlySet__.add("isDisasterRecoveryEnabled"); + return this; + } + /** + * Data retention period set for given integration instance + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataRetentionPeriod") + private DataRetentionPeriod dataRetentionPeriod; + + /** + * Data retention period set for given integration instance + * @param dataRetentionPeriod the value to set + * @return this builder + **/ + public Builder dataRetentionPeriod(DataRetentionPeriod dataRetentionPeriod) { + this.dataRetentionPeriod = dataRetentionPeriod; + this.__explicitlySet__.add("dataRetentionPeriod"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -445,9 +544,11 @@ public IntegrationInstanceSummary build() { this.timeCreated, this.timeUpdated, this.lifecycleState, + this.lifecycleDetails, this.stateMessage, this.isByol, this.instanceUrl, + this.instanceDesignTimeUrl, this.messagePacks, this.isFileServerEnabled, this.isVisualBuilderEnabled, @@ -457,8 +558,11 @@ public IntegrationInstanceSummary build() { this.networkEndpointDetails, this.freeformTags, this.definedTags, + this.systemTags, this.shape, - this.privateEndpointOutboundConnection); + this.privateEndpointOutboundConnection, + this.isDisasterRecoveryEnabled, + this.dataRetentionPeriod); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -488,6 +592,9 @@ public Builder copy(IntegrationInstanceSummary model) { if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } if (model.wasPropertyExplicitlySet("stateMessage")) { this.stateMessage(model.getStateMessage()); } @@ -497,6 +604,9 @@ public Builder copy(IntegrationInstanceSummary model) { if (model.wasPropertyExplicitlySet("instanceUrl")) { this.instanceUrl(model.getInstanceUrl()); } + if (model.wasPropertyExplicitlySet("instanceDesignTimeUrl")) { + this.instanceDesignTimeUrl(model.getInstanceDesignTimeUrl()); + } if (model.wasPropertyExplicitlySet("messagePacks")) { this.messagePacks(model.getMessagePacks()); } @@ -524,6 +634,9 @@ public Builder copy(IntegrationInstanceSummary model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } if (model.wasPropertyExplicitlySet("shape")) { this.shape(model.getShape()); } @@ -531,6 +644,12 @@ public Builder copy(IntegrationInstanceSummary model) { this.privateEndpointOutboundConnection( model.getPrivateEndpointOutboundConnection()); } + if (model.wasPropertyExplicitlySet("isDisasterRecoveryEnabled")) { + this.isDisasterRecoveryEnabled(model.getIsDisasterRecoveryEnabled()); + } + if (model.wasPropertyExplicitlySet("dataRetentionPeriod")) { + this.dataRetentionPeriod(model.getDataRetentionPeriod()); + } return this; } } @@ -599,6 +718,7 @@ public enum IntegrationInstanceType { Enterprise("ENTERPRISE"), Standardx("STANDARDX"), Enterprisex("ENTERPRISEX"), + Healthcare("HEALTHCARE"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -756,6 +876,20 @@ public LifecycleState getLifecycleState() { return lifecycleState; } + /** + * Additional details of lifecycleState or substates + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Additional details of lifecycleState or substates + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + /** * An message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. **/ @@ -798,6 +932,20 @@ public String getInstanceUrl() { return instanceUrl; } + /** + * The Integration Instance Design Time URL + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceDesignTimeUrl") + private final String instanceDesignTimeUrl; + + /** + * The Integration Instance Design Time URL + * @return the value + **/ + public String getInstanceDesignTimeUrl() { + return instanceDesignTimeUrl; + } + /** * The number of configured message packs (if any) **/ @@ -973,6 +1121,24 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + /** * Shape **/ @@ -1041,6 +1207,83 @@ public OutboundConnection getPrivateEndpointOutboundConnection() { return privateEndpointOutboundConnection; } + /** + * Is Disaster Recovery enabled for the integrationInstance + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDisasterRecoveryEnabled") + private final Boolean isDisasterRecoveryEnabled; + + /** + * Is Disaster Recovery enabled for the integrationInstance + * @return the value + **/ + public Boolean getIsDisasterRecoveryEnabled() { + return isDisasterRecoveryEnabled; + } + + /** + * Data retention period set for given integration instance + **/ + public enum DataRetentionPeriod { + Months1("MONTHS_1"), + Months3("MONTHS_3"), + Months6("MONTHS_6"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DataRetentionPeriod.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DataRetentionPeriod v : DataRetentionPeriod.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + DataRetentionPeriod(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DataRetentionPeriod create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'DataRetentionPeriod', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Data retention period set for given integration instance + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataRetentionPeriod") + private final DataRetentionPeriod dataRetentionPeriod; + + /** + * Data retention period set for given integration instance + * @return the value + **/ + public DataRetentionPeriod getDataRetentionPeriod() { + return dataRetentionPeriod; + } + @Override public String toString() { return this.toString(true); @@ -1063,9 +1306,11 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", stateMessage=").append(String.valueOf(this.stateMessage)); sb.append(", isByol=").append(String.valueOf(this.isByol)); sb.append(", instanceUrl=").append(String.valueOf(this.instanceUrl)); + sb.append(", instanceDesignTimeUrl=").append(String.valueOf(this.instanceDesignTimeUrl)); sb.append(", messagePacks=").append(String.valueOf(this.messagePacks)); sb.append(", isFileServerEnabled=").append(String.valueOf(this.isFileServerEnabled)); sb.append(", isVisualBuilderEnabled=").append(String.valueOf(this.isVisualBuilderEnabled)); @@ -1076,9 +1321,13 @@ public String toString(boolean includeByteArrayContents) { sb.append(", networkEndpointDetails=").append(String.valueOf(this.networkEndpointDetails)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", shape=").append(String.valueOf(this.shape)); sb.append(", privateEndpointOutboundConnection=") .append(String.valueOf(this.privateEndpointOutboundConnection)); + sb.append(", isDisasterRecoveryEnabled=") + .append(String.valueOf(this.isDisasterRecoveryEnabled)); + sb.append(", dataRetentionPeriod=").append(String.valueOf(this.dataRetentionPeriod)); sb.append(")"); return sb.toString(); } @@ -1101,9 +1350,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.stateMessage, other.stateMessage) && java.util.Objects.equals(this.isByol, other.isByol) && java.util.Objects.equals(this.instanceUrl, other.instanceUrl) + && java.util.Objects.equals(this.instanceDesignTimeUrl, other.instanceDesignTimeUrl) && java.util.Objects.equals(this.messagePacks, other.messagePacks) && java.util.Objects.equals(this.isFileServerEnabled, other.isFileServerEnabled) && java.util.Objects.equals( @@ -1116,10 +1367,14 @@ public boolean equals(Object o) { this.networkEndpointDetails, other.networkEndpointDetails) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.shape, other.shape) && java.util.Objects.equals( this.privateEndpointOutboundConnection, other.privateEndpointOutboundConnection) + && java.util.Objects.equals( + this.isDisasterRecoveryEnabled, other.isDisasterRecoveryEnabled) + && java.util.Objects.equals(this.dataRetentionPeriod, other.dataRetentionPeriod) && super.equals(other); } @@ -1142,9 +1397,17 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); result = (result * PRIME) + (this.stateMessage == null ? 43 : this.stateMessage.hashCode()); result = (result * PRIME) + (this.isByol == null ? 43 : this.isByol.hashCode()); result = (result * PRIME) + (this.instanceUrl == null ? 43 : this.instanceUrl.hashCode()); + result = + (result * PRIME) + + (this.instanceDesignTimeUrl == null + ? 43 + : this.instanceDesignTimeUrl.hashCode()); result = (result * PRIME) + (this.messagePacks == null ? 43 : this.messagePacks.hashCode()); result = (result * PRIME) @@ -1174,12 +1437,23 @@ public int hashCode() { : this.networkEndpointDetails.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); result = (result * PRIME) + (this.privateEndpointOutboundConnection == null ? 43 : this.privateEndpointOutboundConnection.hashCode()); + result = + (result * PRIME) + + (this.isDisasterRecoveryEnabled == null + ? 43 + : this.isDisasterRecoveryEnabled.hashCode()); + result = + (result * PRIME) + + (this.dataRetentionPeriod == null + ? 43 + : this.dataRetentionPeriod.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/UpdateIntegrationInstanceDetails.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/UpdateIntegrationInstanceDetails.java index 828d952f09c..75922e44aff 100644 --- a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/UpdateIntegrationInstanceDetails.java +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/UpdateIntegrationInstanceDetails.java @@ -337,6 +337,7 @@ public enum IntegrationInstanceType { Enterprise("ENTERPRISE"), Standardx("STANDARDX"), Enterprisex("ENTERPRISEX"), + Healthcare("HEALTHCARE"), ; private final String value; diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/WorkRequest.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/WorkRequest.java index ff76b5fd301..71263b02cde 100644 --- a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/WorkRequest.java +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/WorkRequest.java @@ -301,6 +301,10 @@ public enum OperationType { DeleteIntegrationInstance("DELETE_INTEGRATION_INSTANCE"), ChangePrivateEndpointOutboundConnection("CHANGE_PRIVATE_ENDPOINT_OUTBOUND_CONNECTION"), EnableProcessAutomation("ENABLE_PROCESS_AUTOMATION"), + ExtendDataRetention("EXTEND_DATA_RETENTION"), + DisasterRecoveryFailover("DISASTER_RECOVERY_FAILOVER"), + CreateCustomEndpoint("CREATE_CUSTOM_ENDPOINT"), + DeleteCustomEndpoint("DELETE_CUSTOM_ENDPOINT"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/WorkRequestSummary.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/WorkRequestSummary.java index 95a59786e1e..3df1064389b 100644 --- a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/WorkRequestSummary.java +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/WorkRequestSummary.java @@ -303,6 +303,10 @@ public enum OperationType { DeleteIntegrationInstance("DELETE_INTEGRATION_INSTANCE"), ChangePrivateEndpointOutboundConnection("CHANGE_PRIVATE_ENDPOINT_OUTBOUND_CONNECTION"), EnableProcessAutomation("ENABLE_PROCESS_AUTOMATION"), + ExtendDataRetention("EXTEND_DATA_RETENTION"), + DisasterRecoveryFailover("DISASTER_RECOVERY_FAILOVER"), + CreateCustomEndpoint("CREATE_CUSTOM_ENDPOINT"), + DeleteCustomEndpoint("DELETE_CUSTOM_ENDPOINT"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/requests/AddOracleManagedCustomEndpointRequest.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/requests/AddOracleManagedCustomEndpointRequest.java new file mode 100644 index 00000000000..d30ea496b86 --- /dev/null +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/requests/AddOracleManagedCustomEndpointRequest.java @@ -0,0 +1,379 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.integration.requests; + +import com.oracle.bmc.integration.model.*; +/** + * Example: Click here to see how to use AddOracleManagedCustomEndpointRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190131") +public class AddOracleManagedCustomEndpointRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.integration.model.AddOracleManagedCustomEndpointDetails> { + + /** + * Details for enabling oracle managed custom endpoint. + */ + private com.oracle.bmc.integration.model.AddOracleManagedCustomEndpointDetails + addOracleManagedCustomEndpointDetails; + + /** + * Details for enabling oracle managed custom endpoint. + */ + public com.oracle.bmc.integration.model.AddOracleManagedCustomEndpointDetails + getAddOracleManagedCustomEndpointDetails() { + return addOracleManagedCustomEndpointDetails; + } + /** + * Unique Integration Instance identifier. + */ + private String integrationInstanceId; + + /** + * Unique Integration Instance identifier. + */ + public String getIntegrationInstanceId() { + return integrationInstanceId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations. For example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations. For example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.integration.model.AddOracleManagedCustomEndpointDetails getBody$() { + return addOracleManagedCustomEndpointDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + AddOracleManagedCustomEndpointRequest, + com.oracle.bmc.integration.model.AddOracleManagedCustomEndpointDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for enabling oracle managed custom endpoint. + */ + private com.oracle.bmc.integration.model.AddOracleManagedCustomEndpointDetails + addOracleManagedCustomEndpointDetails = null; + + /** + * Details for enabling oracle managed custom endpoint. + * @param addOracleManagedCustomEndpointDetails the value to set + * @return this builder instance + */ + public Builder addOracleManagedCustomEndpointDetails( + com.oracle.bmc.integration.model.AddOracleManagedCustomEndpointDetails + addOracleManagedCustomEndpointDetails) { + this.addOracleManagedCustomEndpointDetails = addOracleManagedCustomEndpointDetails; + return this; + } + + /** + * Unique Integration Instance identifier. + */ + private String integrationInstanceId = null; + + /** + * Unique Integration Instance identifier. + * @param integrationInstanceId the value to set + * @return this builder instance + */ + public Builder integrationInstanceId(String integrationInstanceId) { + this.integrationInstanceId = integrationInstanceId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations. For example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations. For example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddOracleManagedCustomEndpointRequest o) { + addOracleManagedCustomEndpointDetails(o.getAddOracleManagedCustomEndpointDetails()); + integrationInstanceId(o.getIntegrationInstanceId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of AddOracleManagedCustomEndpointRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of AddOracleManagedCustomEndpointRequest + */ + public AddOracleManagedCustomEndpointRequest build() { + AddOracleManagedCustomEndpointRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.integration.model.AddOracleManagedCustomEndpointDetails body) { + addOracleManagedCustomEndpointDetails(body); + return this; + } + + /** + * Build the instance of AddOracleManagedCustomEndpointRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of AddOracleManagedCustomEndpointRequest + */ + public AddOracleManagedCustomEndpointRequest buildWithoutInvocationCallback() { + AddOracleManagedCustomEndpointRequest request = + new AddOracleManagedCustomEndpointRequest(); + request.addOracleManagedCustomEndpointDetails = addOracleManagedCustomEndpointDetails; + request.integrationInstanceId = integrationInstanceId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new AddOracleManagedCustomEndpointRequest(addOracleManagedCustomEndpointDetails, integrationInstanceId, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .addOracleManagedCustomEndpointDetails(addOracleManagedCustomEndpointDetails) + .integrationInstanceId(integrationInstanceId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",addOracleManagedCustomEndpointDetails=") + .append(String.valueOf(this.addOracleManagedCustomEndpointDetails)); + sb.append(",integrationInstanceId=").append(String.valueOf(this.integrationInstanceId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddOracleManagedCustomEndpointRequest)) { + return false; + } + + AddOracleManagedCustomEndpointRequest other = (AddOracleManagedCustomEndpointRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.addOracleManagedCustomEndpointDetails, + other.addOracleManagedCustomEndpointDetails) + && java.util.Objects.equals(this.integrationInstanceId, other.integrationInstanceId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.addOracleManagedCustomEndpointDetails == null + ? 43 + : this.addOracleManagedCustomEndpointDetails.hashCode()); + result = + (result * PRIME) + + (this.integrationInstanceId == null + ? 43 + : this.integrationInstanceId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/requests/DisasterRecoveryFailoverRequest.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/requests/DisasterRecoveryFailoverRequest.java new file mode 100644 index 00000000000..925736e6325 --- /dev/null +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/requests/DisasterRecoveryFailoverRequest.java @@ -0,0 +1,310 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.integration.requests; + +import com.oracle.bmc.integration.model.*; +/** + * Example: Click here to see how to use DisasterRecoveryFailoverRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190131") +public class DisasterRecoveryFailoverRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Integration Instance identifier. + */ + private String integrationInstanceId; + + /** + * Unique Integration Instance identifier. + */ + public String getIntegrationInstanceId() { + return integrationInstanceId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations. For example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations. For example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DisasterRecoveryFailoverRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Integration Instance identifier. + */ + private String integrationInstanceId = null; + + /** + * Unique Integration Instance identifier. + * @param integrationInstanceId the value to set + * @return this builder instance + */ + public Builder integrationInstanceId(String integrationInstanceId) { + this.integrationInstanceId = integrationInstanceId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations. For example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations. For example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DisasterRecoveryFailoverRequest o) { + integrationInstanceId(o.getIntegrationInstanceId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DisasterRecoveryFailoverRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DisasterRecoveryFailoverRequest + */ + public DisasterRecoveryFailoverRequest build() { + DisasterRecoveryFailoverRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DisasterRecoveryFailoverRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DisasterRecoveryFailoverRequest + */ + public DisasterRecoveryFailoverRequest buildWithoutInvocationCallback() { + DisasterRecoveryFailoverRequest request = new DisasterRecoveryFailoverRequest(); + request.integrationInstanceId = integrationInstanceId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new DisasterRecoveryFailoverRequest(integrationInstanceId, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .integrationInstanceId(integrationInstanceId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",integrationInstanceId=").append(String.valueOf(this.integrationInstanceId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DisasterRecoveryFailoverRequest)) { + return false; + } + + DisasterRecoveryFailoverRequest other = (DisasterRecoveryFailoverRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.integrationInstanceId, other.integrationInstanceId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.integrationInstanceId == null + ? 43 + : this.integrationInstanceId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/requests/ExtendDataRetentionRequest.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/requests/ExtendDataRetentionRequest.java new file mode 100644 index 00000000000..4f73920f793 --- /dev/null +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/requests/ExtendDataRetentionRequest.java @@ -0,0 +1,375 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.integration.requests; + +import com.oracle.bmc.integration.model.*; +/** + * Example: Click here to see how to use ExtendDataRetentionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190131") +public class ExtendDataRetentionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.integration.model.ExtendDataRetentionDetails> { + + /** + * Unique Integration Instance identifier. + */ + private String integrationInstanceId; + + /** + * Unique Integration Instance identifier. + */ + public String getIntegrationInstanceId() { + return integrationInstanceId; + } + /** + * Extend Data Retention period for integration instance. + */ + private com.oracle.bmc.integration.model.ExtendDataRetentionDetails extendDataRetentionDetails; + + /** + * Extend Data Retention period for integration instance. + */ + public com.oracle.bmc.integration.model.ExtendDataRetentionDetails + getExtendDataRetentionDetails() { + return extendDataRetentionDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations. For example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations. For example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.integration.model.ExtendDataRetentionDetails getBody$() { + return extendDataRetentionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ExtendDataRetentionRequest, + com.oracle.bmc.integration.model.ExtendDataRetentionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Integration Instance identifier. + */ + private String integrationInstanceId = null; + + /** + * Unique Integration Instance identifier. + * @param integrationInstanceId the value to set + * @return this builder instance + */ + public Builder integrationInstanceId(String integrationInstanceId) { + this.integrationInstanceId = integrationInstanceId; + return this; + } + + /** + * Extend Data Retention period for integration instance. + */ + private com.oracle.bmc.integration.model.ExtendDataRetentionDetails + extendDataRetentionDetails = null; + + /** + * Extend Data Retention period for integration instance. + * @param extendDataRetentionDetails the value to set + * @return this builder instance + */ + public Builder extendDataRetentionDetails( + com.oracle.bmc.integration.model.ExtendDataRetentionDetails + extendDataRetentionDetails) { + this.extendDataRetentionDetails = extendDataRetentionDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations. For example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations. For example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ExtendDataRetentionRequest o) { + integrationInstanceId(o.getIntegrationInstanceId()); + extendDataRetentionDetails(o.getExtendDataRetentionDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ExtendDataRetentionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ExtendDataRetentionRequest + */ + public ExtendDataRetentionRequest build() { + ExtendDataRetentionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.integration.model.ExtendDataRetentionDetails body) { + extendDataRetentionDetails(body); + return this; + } + + /** + * Build the instance of ExtendDataRetentionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ExtendDataRetentionRequest + */ + public ExtendDataRetentionRequest buildWithoutInvocationCallback() { + ExtendDataRetentionRequest request = new ExtendDataRetentionRequest(); + request.integrationInstanceId = integrationInstanceId; + request.extendDataRetentionDetails = extendDataRetentionDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new ExtendDataRetentionRequest(integrationInstanceId, extendDataRetentionDetails, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .integrationInstanceId(integrationInstanceId) + .extendDataRetentionDetails(extendDataRetentionDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",integrationInstanceId=").append(String.valueOf(this.integrationInstanceId)); + sb.append(",extendDataRetentionDetails=") + .append(String.valueOf(this.extendDataRetentionDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExtendDataRetentionRequest)) { + return false; + } + + ExtendDataRetentionRequest other = (ExtendDataRetentionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.integrationInstanceId, other.integrationInstanceId) + && java.util.Objects.equals( + this.extendDataRetentionDetails, other.extendDataRetentionDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.integrationInstanceId == null + ? 43 + : this.integrationInstanceId.hashCode()); + result = + (result * PRIME) + + (this.extendDataRetentionDetails == null + ? 43 + : this.extendDataRetentionDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/requests/RemoveOracleManagedCustomEndpointRequest.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/requests/RemoveOracleManagedCustomEndpointRequest.java new file mode 100644 index 00000000000..1f625dbc39e --- /dev/null +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/requests/RemoveOracleManagedCustomEndpointRequest.java @@ -0,0 +1,312 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.integration.requests; + +import com.oracle.bmc.integration.model.*; +/** + * Example: Click here to see how to use RemoveOracleManagedCustomEndpointRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190131") +public class RemoveOracleManagedCustomEndpointRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Integration Instance identifier. + */ + private String integrationInstanceId; + + /** + * Unique Integration Instance identifier. + */ + public String getIntegrationInstanceId() { + return integrationInstanceId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations. For example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations. For example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RemoveOracleManagedCustomEndpointRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Integration Instance identifier. + */ + private String integrationInstanceId = null; + + /** + * Unique Integration Instance identifier. + * @param integrationInstanceId the value to set + * @return this builder instance + */ + public Builder integrationInstanceId(String integrationInstanceId) { + this.integrationInstanceId = integrationInstanceId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations. For example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations. For example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveOracleManagedCustomEndpointRequest o) { + integrationInstanceId(o.getIntegrationInstanceId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RemoveOracleManagedCustomEndpointRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RemoveOracleManagedCustomEndpointRequest + */ + public RemoveOracleManagedCustomEndpointRequest build() { + RemoveOracleManagedCustomEndpointRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of RemoveOracleManagedCustomEndpointRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RemoveOracleManagedCustomEndpointRequest + */ + public RemoveOracleManagedCustomEndpointRequest buildWithoutInvocationCallback() { + RemoveOracleManagedCustomEndpointRequest request = + new RemoveOracleManagedCustomEndpointRequest(); + request.integrationInstanceId = integrationInstanceId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new RemoveOracleManagedCustomEndpointRequest(integrationInstanceId, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .integrationInstanceId(integrationInstanceId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",integrationInstanceId=").append(String.valueOf(this.integrationInstanceId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveOracleManagedCustomEndpointRequest)) { + return false; + } + + RemoveOracleManagedCustomEndpointRequest other = + (RemoveOracleManagedCustomEndpointRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.integrationInstanceId, other.integrationInstanceId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.integrationInstanceId == null + ? 43 + : this.integrationInstanceId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/responses/AddOracleManagedCustomEndpointResponse.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/responses/AddOracleManagedCustomEndpointResponse.java new file mode 100644 index 00000000000..a454e30b41d --- /dev/null +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/responses/AddOracleManagedCustomEndpointResponse.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.integration.responses; + +import com.oracle.bmc.integration.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190131") +public class AddOracleManagedCustomEndpointResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private AddOracleManagedCustomEndpointResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(AddOracleManagedCustomEndpointResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public AddOracleManagedCustomEndpointResponse build() { + return new AddOracleManagedCustomEndpointResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddOracleManagedCustomEndpointResponse)) { + return false; + } + + AddOracleManagedCustomEndpointResponse other = (AddOracleManagedCustomEndpointResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/responses/DisasterRecoveryFailoverResponse.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/responses/DisasterRecoveryFailoverResponse.java new file mode 100644 index 00000000000..4f2196641c0 --- /dev/null +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/responses/DisasterRecoveryFailoverResponse.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.integration.responses; + +import com.oracle.bmc.integration.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190131") +public class DisasterRecoveryFailoverResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DisasterRecoveryFailoverResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DisasterRecoveryFailoverResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DisasterRecoveryFailoverResponse build() { + return new DisasterRecoveryFailoverResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DisasterRecoveryFailoverResponse)) { + return false; + } + + DisasterRecoveryFailoverResponse other = (DisasterRecoveryFailoverResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/responses/ExtendDataRetentionResponse.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/responses/ExtendDataRetentionResponse.java new file mode 100644 index 00000000000..4744623fec4 --- /dev/null +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/responses/ExtendDataRetentionResponse.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.integration.responses; + +import com.oracle.bmc.integration.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190131") +public class ExtendDataRetentionResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private ExtendDataRetentionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ExtendDataRetentionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ExtendDataRetentionResponse build() { + return new ExtendDataRetentionResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExtendDataRetentionResponse)) { + return false; + } + + ExtendDataRetentionResponse other = (ExtendDataRetentionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/responses/RemoveOracleManagedCustomEndpointResponse.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/responses/RemoveOracleManagedCustomEndpointResponse.java new file mode 100644 index 00000000000..7176ae94ad2 --- /dev/null +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/responses/RemoveOracleManagedCustomEndpointResponse.java @@ -0,0 +1,187 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.integration.responses; + +import com.oracle.bmc.integration.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190131") +public class RemoveOracleManagedCustomEndpointResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private RemoveOracleManagedCustomEndpointResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RemoveOracleManagedCustomEndpointResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RemoveOracleManagedCustomEndpointResponse build() { + return new RemoveOracleManagedCustomEndpointResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RemoveOracleManagedCustomEndpointResponse)) { + return false; + } + + RemoveOracleManagedCustomEndpointResponse other = + (RemoveOracleManagedCustomEndpointResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-jms/pom.xml b/bmc-jms/pom.xml index 4c93c817f3e..394dbed2a85 100644 --- a/bmc-jms/pom.xml +++ b/bmc-jms/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-jms @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementService.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementService.java index b83b688340b..09d72520da1 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementService.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementService.java @@ -8,7 +8,7 @@ import com.oracle.bmc.jms.responses.*; /** - * API for the Java Management Service. Use this API to view, create, and manage Fleets. + * The APIs for the [Fleet Management](https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. */ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") @@ -111,7 +111,7 @@ AddFleetInstallationSitesResponse addFleetInstallationSites( CreateBlocklistResponse createBlocklist(CreateBlocklistRequest request); /** - * Request to perform validaition of the DRS file and create the file to the Object Storage. + * Request to perform validation of the DRS file and create the file to the Object Storage. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -142,6 +142,21 @@ AddFleetInstallationSitesResponse addFleetInstallationSites( */ CreateFleetResponse createFleet(CreateFleetRequest request); + /** + * Registers an agent's JmsPlugin, optionally attaching to an existing fleet of the tenancy. + * JmsPlugins registered fleet-less are created with lifecycle state INACTIVE. + * For the operation to be authorized, the agent must exist, and the authorized user requires JMS_PLUGIN_CREATE permission for the agent's compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateJmsPlugin API. + */ + CreateJmsPluginResponse createJmsPlugin(CreateJmsPluginRequest request); + /** * Deletes the blocklist record specified by an identifier. * @param request The request object containing the details to send @@ -205,6 +220,20 @@ DeleteCryptoAnalysisResultResponse deleteCryptoAnalysisResult( DeleteJavaMigrationAnalysisResultResponse deleteJavaMigrationAnalysisResult( DeleteJavaMigrationAnalysisResultRequest request); + /** + * Deletes a JmsPlugin. The JmsPlugin may be visible for some time with state DELETED. + * Deleted plugins will not be able to communicate with the JMS service. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteJmsPlugin API. + */ + DeleteJmsPluginResponse deleteJmsPlugin(DeleteJmsPluginRequest request); + /** * Deletes only the metadata of the Performance Tuning Analysis result, but the file remains in the object storage. * @param request The request object containing the details to send @@ -258,6 +287,34 @@ DeletePerformanceTuningAnalysisResultResponse deletePerformanceTuningAnalysisRes GenerateAgentDeployScriptResponse generateAgentDeployScript( GenerateAgentDeployScriptRequest request); + /** + * Generates the agent installer configuration using the information provided. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GenerateAgentInstallerConfiguration API. + */ + GenerateAgentInstallerConfigurationResponse generateAgentInstallerConfiguration( + GenerateAgentInstallerConfigurationRequest request); + + /** + * Generates Load Pipeline Script + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GenerateLoadPipelineScript API. + */ + GenerateLoadPipelineScriptResponse generateLoadPipelineScript( + GenerateLoadPipelineScriptRequest request); + /** * Retrieve the metadata for the result of a Crypto event analysis. * @param request The request object containing the details to send @@ -283,7 +340,7 @@ GenerateAgentDeployScriptResponse generateAgentDeployScript( GetDrsFileResponse getDrsFile(GetDrsFileRequest request); /** - * Returns export setting for the specified Fleet. + * Returns export setting for the specified fleet. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -295,7 +352,7 @@ GenerateAgentDeployScriptResponse generateAgentDeployScript( GetExportSettingResponse getExportSetting(GetExportSettingRequest request); /** - * Returns last export status for the specified Fleet. + * Returns last export status for the specified fleet. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -383,6 +440,18 @@ GetJavaMigrationAnalysisResultResponse getJavaMigrationAnalysisResult( */ GetJavaReleaseResponse getJavaRelease(GetJavaReleaseRequest request); + /** + * Returns the JmsPlugin. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetJmsPlugin API. + */ + GetJmsPluginResponse getJmsPlugin(GetJmsPluginRequest request); + /** * Retrieve metadata of the Performance Tuning Analysis result. * @param request The request object containing the details to send @@ -408,6 +477,19 @@ GetPerformanceTuningAnalysisResultResponse getPerformanceTuningAnalysisResult( */ GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request); + /** + * Returns a list of the agent installer information. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListAgentInstallers API. + */ + ListAgentInstallersResponse listAgentInstallers(ListAgentInstallersRequest request); + /** * Return a list of AnnouncementSummary items * @param request The request object containing the details to send @@ -537,6 +619,18 @@ ListJavaMigrationAnalysisResultsResponse listJavaMigrationAnalysisResults( */ ListJavaReleasesResponse listJavaReleases(ListJavaReleasesRequest request); + /** + * Lists the JmsPlugins. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListJmsPlugins API. + */ + ListJmsPluginsResponse listJmsPlugins(ListJmsPluginsRequest request); + /** * List Java Runtime usage in a specified host filtered by query parameters. * @param request The request object containing the details to send @@ -640,6 +734,21 @@ RemoveFleetInstallationSitesResponse removeFleetInstallationSites( */ RequestCryptoAnalysesResponse requestCryptoAnalyses(RequestCryptoAnalysesRequest request); + /** + * Request to perform a deployed Java migration analyses. The results of the deployed Java migration analyses will be uploaded to the + * Object Storage bucket that you designate when you enable the Java Migration Analyses feature. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RequestDeployedApplicationMigrationAnalyses API. + */ + RequestDeployedApplicationMigrationAnalysesResponse requestDeployedApplicationMigrationAnalyses( + RequestDeployedApplicationMigrationAnalysesRequest request); + /** * Request to perform a Java migration analysis. The results of the Java migration analysis will be uploaded to the * Object Storage bucket that you designate when you enable the Java Migration Analysis feature. @@ -857,7 +966,7 @@ SummarizeResourceInventoryResponse summarizeResourceInventory( SummarizeResourceInventoryRequest request); /** - * Request to perform validaition of the DRS file and update the existing file in the Object Storage. + * Request to perform validation of the DRS file and update the existing file in the Object Storage. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -870,7 +979,7 @@ SummarizeResourceInventoryResponse summarizeResourceInventory( UpdateDrsFileResponse updateDrsFile(UpdateDrsFileRequest request); /** - * Updates existing export setting for the specified Fleet. + * Updates existing export setting for the specified fleet. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -921,6 +1030,18 @@ UpdateFleetAdvancedFeatureConfigurationResponse updateFleetAdvancedFeatureConfig UpdateFleetAgentConfigurationResponse updateFleetAgentConfiguration( UpdateFleetAgentConfigurationRequest request); + /** + * Updates the Fleet of a JmsPlugin. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateJmsPlugin API. + */ + UpdateJmsPluginResponse updateJmsPlugin(UpdateJmsPluginRequest request); + /** * Gets the pre-configured waiters available for resources for this service. * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementServiceAsync.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementServiceAsync.java index c59089bdf53..3f6847b5493 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementServiceAsync.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementServiceAsync.java @@ -8,7 +8,7 @@ import com.oracle.bmc.jms.responses.*; /** - * API for the Java Management Service. Use this API to view, create, and manage Fleets. + * The APIs for the [Fleet Management](https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. */ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") public interface JavaManagementServiceAsync extends AutoCloseable { @@ -124,7 +124,7 @@ java.util.concurrent.Future createBlocklist( handler); /** - * Request to perform validaition of the DRS file and create the file to the Object Storage. + * Request to perform validation of the DRS file and create the file to the Object Storage. * * * @param request The request object containing the details to send @@ -160,6 +160,24 @@ java.util.concurrent.Future createFleet( CreateFleetRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Registers an agent's JmsPlugin, optionally attaching to an existing fleet of the tenancy. + * JmsPlugins registered fleet-less are created with lifecycle state INACTIVE. + * For the operation to be authorized, the agent must exist, and the authorized user requires JMS_PLUGIN_CREATE permission for the agent's compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createJmsPlugin( + CreateJmsPluginRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Deletes the blocklist record specified by an identifier. * @@ -239,6 +257,23 @@ java.util.concurrent.Future deleteFleet( DeleteJavaMigrationAnalysisResultResponse> handler); + /** + * Deletes a JmsPlugin. The JmsPlugin may be visible for some time with state DELETED. + * Deleted plugins will not be able to communicate with the JMS service. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteJmsPlugin( + DeleteJmsPluginRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Deletes only the metadata of the Performance Tuning Analysis result, but the file remains in the object storage. * @@ -304,6 +339,42 @@ java.util.concurrent.Future generateAgentDepl GenerateAgentDeployScriptRequest, GenerateAgentDeployScriptResponse> handler); + /** + * Generates the agent installer configuration using the information provided. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + generateAgentInstallerConfiguration( + GenerateAgentInstallerConfigurationRequest request, + com.oracle.bmc.responses.AsyncHandler< + GenerateAgentInstallerConfigurationRequest, + GenerateAgentInstallerConfigurationResponse> + handler); + + /** + * Generates Load Pipeline Script + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future generateLoadPipelineScript( + GenerateLoadPipelineScriptRequest request, + com.oracle.bmc.responses.AsyncHandler< + GenerateLoadPipelineScriptRequest, GenerateLoadPipelineScriptResponse> + handler); + /** * Retrieve the metadata for the result of a Crypto event analysis. * @@ -335,7 +406,7 @@ java.util.concurrent.Future getDrsFile( com.oracle.bmc.responses.AsyncHandler handler); /** - * Returns export setting for the specified Fleet. + * Returns export setting for the specified fleet. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -350,7 +421,7 @@ java.util.concurrent.Future getExportSetting( handler); /** - * Returns last export status for the specified Fleet. + * Returns last export status for the specified fleet. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -462,6 +533,21 @@ java.util.concurrent.Future getJavaRelease( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Returns the JmsPlugin. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getJmsPlugin( + GetJmsPluginRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Retrieve metadata of the Performance Tuning Analysis result. * @@ -495,6 +581,23 @@ java.util.concurrent.Future getWorkRequest( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Returns a list of the agent installer information. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listAgentInstallers( + ListAgentInstallersRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListAgentInstallersRequest, ListAgentInstallersResponse> + handler); + /** * Return a list of AnnouncementSummary items * @@ -658,6 +761,21 @@ java.util.concurrent.Future listJavaReleases( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Lists the JmsPlugins. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listJmsPlugins( + ListJmsPluginsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * List Java Runtime usage in a specified host filtered by query parameters. * @@ -791,6 +909,26 @@ java.util.concurrent.Future requestCryptoAnalyses RequestCryptoAnalysesRequest, RequestCryptoAnalysesResponse> handler); + /** + * Request to perform a deployed Java migration analyses. The results of the deployed Java migration analyses will be uploaded to the + * Object Storage bucket that you designate when you enable the Java Migration Analyses feature. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + requestDeployedApplicationMigrationAnalyses( + RequestDeployedApplicationMigrationAnalysesRequest request, + com.oracle.bmc.responses.AsyncHandler< + RequestDeployedApplicationMigrationAnalysesRequest, + RequestDeployedApplicationMigrationAnalysesResponse> + handler); + /** * Request to perform a Java migration analysis. The results of the Java migration analysis will be uploaded to the * Object Storage bucket that you designate when you enable the Java Migration Analysis feature. @@ -1072,7 +1210,7 @@ java.util.concurrent.Future summarizeResourc handler); /** - * Request to perform validaition of the DRS file and update the existing file in the Object Storage. + * Request to perform validation of the DRS file and update the existing file in the Object Storage. * * * @param request The request object containing the details to send @@ -1088,7 +1226,7 @@ java.util.concurrent.Future updateDrsFile( handler); /** - * Updates existing export setting for the specified Fleet. + * Updates existing export setting for the specified fleet. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -1154,4 +1292,19 @@ java.util.concurrent.Future updateFleet( UpdateFleetAgentConfigurationRequest, UpdateFleetAgentConfigurationResponse> handler); + + /** + * Updates the Fleet of a JmsPlugin. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateJmsPlugin( + UpdateJmsPluginRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); } diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementServiceAsyncClient.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementServiceAsyncClient.java index 3ebdac5fe44..c89a9004d7a 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementServiceAsyncClient.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementServiceAsyncClient.java @@ -300,7 +300,8 @@ public JavaManagementServiceAsyncClient( if (com.oracle.bmc.http.ApacheUtils.isExtraStreamLogsEnabled()) { LOG.warn( com.oracle.bmc.http.ApacheUtils.getStreamWarningMessage( - "JavaManagementServiceAsyncClient", "generateAgentDeployScript")); + "JavaManagementServiceAsyncClient", + "generateAgentDeployScript,generateAgentInstallerConfiguration,generateLoadPipelineScript")); } } @@ -481,7 +482,7 @@ public java.util.concurrent.Future addFleetIn "JavaManagementService", "AddFleetInstallationSites", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/InstallationSiteSummary/AddFleetInstallationSites"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, AddFleetInstallationSitesResponse> transformer = @@ -535,7 +536,7 @@ public java.util.concurrent.Future cancelWorkRequest( "JavaManagementService", "CancelWorkRequest", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkRequest/CancelWorkRequest"); + ""); final java.util.function.Function transformer = CancelWorkRequestConverter.fromResponse( @@ -582,7 +583,7 @@ public java.util.concurrent.Future changeFleetCo "JavaManagementService", "ChangeFleetCompartment", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/ChangeFleetCompartment"); + ""); final java.util.function.Function transformer = ChangeFleetCompartmentConverter.fromResponse( @@ -635,7 +636,7 @@ public java.util.concurrent.Future createBlocklist( "JavaManagementService", "CreateBlocklist", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Blocklist/CreateBlocklist"); + ""); final java.util.function.Function transformer = CreateBlocklistConverter.fromResponse( @@ -686,7 +687,7 @@ public java.util.concurrent.Future createDrsFile( "JavaManagementService", "CreateDrsFile", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/CreateDrsFile"); + ""); final java.util.function.Function transformer = CreateDrsFileConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -733,10 +734,7 @@ public java.util.concurrent.Future createFleet( com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "JavaManagementService", - "CreateFleet", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/CreateFleet"); + "JavaManagementService", "CreateFleet", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = CreateFleetConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -770,6 +768,58 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future createJmsPlugin( + CreateJmsPluginRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateJmsPluginRequest, CreateJmsPluginResponse> + handler) { + LOG.trace("Called async createJmsPlugin"); + final CreateJmsPluginRequest interceptedRequest = + CreateJmsPluginConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateJmsPluginConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "JavaManagementService", + "CreateJmsPlugin", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + CreateJmsPluginConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateJmsPluginRequest, CreateJmsPluginResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateJmsPluginDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateJmsPluginRequest, CreateJmsPluginResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteBlocklist( DeleteBlocklistRequest request, @@ -786,7 +836,7 @@ public java.util.concurrent.Future deleteBlocklist( "JavaManagementService", "DeleteBlocklist", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Blocklist/DeleteBlocklist"); + ""); final java.util.function.Function transformer = DeleteBlocklistConverter.fromResponse( @@ -834,7 +884,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "DeleteCryptoAnalysisResult", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/CryptoAnalysisResult/DeleteCryptoAnalysisResult"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, DeleteCryptoAnalysisResultResponse> transformer = @@ -882,7 +932,7 @@ public java.util.concurrent.Future deleteDrsFile( "JavaManagementService", "DeleteDrsFile", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/DrsFile/DeleteDrsFile"); + ""); final java.util.function.Function transformer = DeleteDrsFileConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -923,10 +973,7 @@ public java.util.concurrent.Future deleteFleet( DeleteFleetConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "JavaManagementService", - "DeleteFleet", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/DeleteFleet"); + "JavaManagementService", "DeleteFleet", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = DeleteFleetConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -973,7 +1020,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "DeleteJavaMigrationAnalysisResult", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaMigrationAnalysisResult/DeleteJavaMigrationAnalysisResult"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, DeleteJavaMigrationAnalysisResultResponse> transformer = @@ -1008,6 +1055,52 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future deleteJmsPlugin( + DeleteJmsPluginRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteJmsPluginRequest, DeleteJmsPluginResponse> + handler) { + LOG.trace("Called async deleteJmsPlugin"); + final DeleteJmsPluginRequest interceptedRequest = + DeleteJmsPluginConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteJmsPluginConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "JavaManagementService", + "DeleteJmsPlugin", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + DeleteJmsPluginConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteJmsPluginRequest, DeleteJmsPluginResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteJmsPluginRequest, DeleteJmsPluginResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deletePerformanceTuningAnalysisResult( @@ -1027,7 +1120,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "DeletePerformanceTuningAnalysisResult", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/PerformanceTuningAnalysisResult/DeletePerformanceTuningAnalysisResult"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, DeletePerformanceTuningAnalysisResultResponse> transformer = @@ -1074,10 +1167,7 @@ public java.util.concurrent.Future disableDrs( com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "JavaManagementService", - "DisableDrs", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/DisableDrs"); + "JavaManagementService", "DisableDrs", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = DisableDrsConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1123,10 +1213,7 @@ public java.util.concurrent.Future enableDrs( com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "JavaManagementService", - "EnableDrs", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/EnableDrs"); + "JavaManagementService", "EnableDrs", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = EnableDrsConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1175,7 +1262,7 @@ public java.util.concurrent.Future generateAg "JavaManagementService", "GenerateAgentDeployScript", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/GenerateAgentDeployScript"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, GenerateAgentDeployScriptResponse> transformer = @@ -1213,6 +1300,121 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + generateAgentInstallerConfiguration( + GenerateAgentInstallerConfigurationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GenerateAgentInstallerConfigurationRequest, + GenerateAgentInstallerConfigurationResponse> + handler) { + LOG.trace("Called async generateAgentInstallerConfiguration"); + final GenerateAgentInstallerConfigurationRequest interceptedRequest = + GenerateAgentInstallerConfigurationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GenerateAgentInstallerConfigurationConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "JavaManagementService", + "GenerateAgentInstallerConfiguration", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, GenerateAgentInstallerConfigurationResponse> + transformer = + GenerateAgentInstallerConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GenerateAgentInstallerConfigurationRequest, + GenerateAgentInstallerConfigurationResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GenerateAgentInstallerConfigurationRequest, + GenerateAgentInstallerConfigurationResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getGenerateAgentInstallerConfigurationDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GenerateAgentInstallerConfigurationRequest, + GenerateAgentInstallerConfigurationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + generateLoadPipelineScript( + GenerateLoadPipelineScriptRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GenerateLoadPipelineScriptRequest, + GenerateLoadPipelineScriptResponse> + handler) { + LOG.trace("Called async generateLoadPipelineScript"); + final GenerateLoadPipelineScriptRequest interceptedRequest = + GenerateLoadPipelineScriptConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GenerateLoadPipelineScriptConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "JavaManagementService", + "GenerateLoadPipelineScript", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, GenerateLoadPipelineScriptResponse> + transformer = + GenerateLoadPipelineScriptConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GenerateLoadPipelineScriptRequest, GenerateLoadPipelineScriptResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GenerateLoadPipelineScriptRequest, + GenerateLoadPipelineScriptResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getGenerateLoadPipelineScriptDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GenerateLoadPipelineScriptRequest, GenerateLoadPipelineScriptResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getCryptoAnalysisResult( GetCryptoAnalysisResultRequest request, @@ -1229,7 +1431,7 @@ public java.util.concurrent.Future getCryptoAna "JavaManagementService", "GetCryptoAnalysisResult", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/CryptoAnalysisResult/GetCryptoAnalysisResult"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, GetCryptoAnalysisResultResponse> transformer = @@ -1272,10 +1474,7 @@ public java.util.concurrent.Future getDrsFile( GetDrsFileConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "JavaManagementService", - "GetDrsFile", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/DrsFile/GetDrsFile"); + "JavaManagementService", "GetDrsFile", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = GetDrsFileConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1320,7 +1519,7 @@ public java.util.concurrent.Future getExportSetting( "JavaManagementService", "GetExportSetting", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ExportSetting/GetExportSetting"); + ""); final java.util.function.Function transformer = GetExportSettingConverter.fromResponse( @@ -1366,7 +1565,7 @@ public java.util.concurrent.Future getExportStatus( "JavaManagementService", "GetExportStatus", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ExportStatus/GetExportStatus"); + ""); final java.util.function.Function transformer = GetExportStatusConverter.fromResponse( @@ -1407,10 +1606,7 @@ public java.util.concurrent.Future getFleet( GetFleetConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "JavaManagementService", - "GetFleet", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/GetFleet"); + "JavaManagementService", "GetFleet", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = GetFleetConverter.fromResponse(java.util.Optional.of(serviceDetails)); com.oracle.bmc.responses.AsyncHandler handlerToUse = @@ -1456,7 +1652,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "GetFleetAdvancedFeatureConfiguration", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/FleetAdvancedFeatureConfiguration/GetFleetAdvancedFeatureConfiguration"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, GetFleetAdvancedFeatureConfigurationResponse> transformer = @@ -1509,7 +1705,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "GetFleetAgentConfiguration", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/FleetAgentConfiguration/GetFleetAgentConfiguration"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, GetFleetAgentConfigurationResponse> transformer = @@ -1557,7 +1753,7 @@ public java.util.concurrent.Future getJavaFamily( "JavaManagementService", "GetJavaFamily", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaFamily/GetJavaFamily"); + ""); final java.util.function.Function transformer = GetJavaFamilyConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1604,7 +1800,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "GetJavaMigrationAnalysisResult", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaMigrationAnalysisResult/GetJavaMigrationAnalysisResult"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, GetJavaMigrationAnalysisResultResponse> transformer = @@ -1654,7 +1850,7 @@ public java.util.concurrent.Future getJavaRelease( "JavaManagementService", "GetJavaRelease", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaRelease/GetJavaRelease"); + ""); final java.util.function.Function transformer = GetJavaReleaseConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1683,6 +1879,47 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future getJmsPlugin( + GetJmsPluginRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getJmsPlugin"); + final GetJmsPluginRequest interceptedRequest = + GetJmsPluginConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetJmsPluginConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "JavaManagementService", "GetJmsPlugin", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + GetJmsPluginConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetJmsPluginRequest, GetJmsPluginResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetJmsPluginRequest, GetJmsPluginResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getPerformanceTuningAnalysisResult( @@ -1701,7 +1938,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "GetPerformanceTuningAnalysisResult", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/PerformanceTuningAnalysisResult/GetPerformanceTuningAnalysisResult"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, GetPerformanceTuningAnalysisResultResponse> transformer = @@ -1752,7 +1989,7 @@ public java.util.concurrent.Future getWorkRequest( "JavaManagementService", "GetWorkRequest", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkRequest/GetWorkRequest"); + ""); final java.util.function.Function transformer = GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1781,6 +2018,53 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future listAgentInstallers( + ListAgentInstallersRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListAgentInstallersRequest, ListAgentInstallersResponse> + handler) { + LOG.trace("Called async listAgentInstallers"); + final ListAgentInstallersRequest interceptedRequest = + ListAgentInstallersConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAgentInstallersConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "JavaManagementService", + "ListAgentInstallers", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListAgentInstallersConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListAgentInstallersRequest, ListAgentInstallersResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListAgentInstallersRequest, ListAgentInstallersResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListAgentInstallersRequest, ListAgentInstallersResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listAnnouncements( ListAnnouncementsRequest request, @@ -1797,7 +2081,7 @@ public java.util.concurrent.Future listAnnouncements( "JavaManagementService", "ListAnnouncements", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/AnnouncementCollection/ListAnnouncements"); + ""); final java.util.function.Function transformer = ListAnnouncementsConverter.fromResponse( @@ -1843,7 +2127,7 @@ public java.util.concurrent.Future listBlocklists( "JavaManagementService", "ListBlocklists", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Blocklist/ListBlocklists"); + ""); final java.util.function.Function transformer = ListBlocklistsConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1888,7 +2172,7 @@ public java.util.concurrent.Future listCrypto "JavaManagementService", "ListCryptoAnalysisResults", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/CryptoAnalysisResult/ListCryptoAnalysisResults"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, ListCryptoAnalysisResultsResponse> transformer = @@ -1933,10 +2217,7 @@ public java.util.concurrent.Future listDrsFiles( ListDrsFilesConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "JavaManagementService", - "ListDrsFiles", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/DrsFileCollection/ListDrsFiles"); + "JavaManagementService", "ListDrsFiles", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = ListDrsFilesConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1981,7 +2262,7 @@ public java.util.concurrent.Future listFleetDiagnose "JavaManagementService", "ListFleetDiagnoses", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/FleetDiagnosisSummary/ListFleetDiagnoses"); + ""); final java.util.function.Function transformer = ListFleetDiagnosesConverter.fromResponse( @@ -2022,10 +2303,7 @@ public java.util.concurrent.Future listFleets( ListFleetsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "JavaManagementService", - "ListFleets", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/ListFleets"); + "JavaManagementService", "ListFleets", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = ListFleetsConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -2070,7 +2348,7 @@ public java.util.concurrent.Future listInstallati "JavaManagementService", "ListInstallationSites", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/InstallationSiteSummary/ListInstallationSites"); + ""); final java.util.function.Function transformer = ListInstallationSitesConverter.fromResponse( @@ -2117,7 +2395,7 @@ public java.util.concurrent.Future listJavaFamilies( "JavaManagementService", "ListJavaFamilies", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaFamily/ListJavaFamilies"); + ""); final java.util.function.Function transformer = ListJavaFamiliesConverter.fromResponse( @@ -2165,7 +2443,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "ListJavaMigrationAnalysisResults", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaMigrationAnalysisResult/ListJavaMigrationAnalysisResults"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, ListJavaMigrationAnalysisResultsResponse> transformer = @@ -2216,7 +2494,7 @@ public java.util.concurrent.Future listJavaReleases( "JavaManagementService", "ListJavaReleases", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaRelease/ListJavaReleases"); + ""); final java.util.function.Function transformer = ListJavaReleasesConverter.fromResponse( @@ -2246,6 +2524,51 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future listJmsPlugins( + ListJmsPluginsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListJmsPluginsRequest, ListJmsPluginsResponse> + handler) { + LOG.trace("Called async listJmsPlugins"); + final ListJmsPluginsRequest interceptedRequest = + ListJmsPluginsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListJmsPluginsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "JavaManagementService", + "ListJmsPlugins", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListJmsPluginsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListJmsPluginsRequest, ListJmsPluginsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListJmsPluginsRequest, ListJmsPluginsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listJreUsage( ListJreUsageRequest request, @@ -2258,10 +2581,7 @@ public java.util.concurrent.Future listJreUsage( ListJreUsageConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "JavaManagementService", - "ListJreUsage", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JreUsage/ListJreUsage"); + "JavaManagementService", "ListJreUsage", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = ListJreUsageConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -2309,7 +2629,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "ListPerformanceTuningAnalysisResults", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/PerformanceTuningAnalysisResult/ListPerformanceTuningAnalysisResults"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, ListPerformanceTuningAnalysisResultsResponse> transformer = @@ -2359,7 +2679,7 @@ public java.util.concurrent.Future listWorkItems( "JavaManagementService", "ListWorkItems", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkItemSummary/ListWorkItems"); + ""); final java.util.function.Function transformer = ListWorkItemsConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -2404,7 +2724,7 @@ public java.util.concurrent.Future listWorkReques "JavaManagementService", "ListWorkRequestErrors", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkRequestError/ListWorkRequestErrors"); + ""); final java.util.function.Function transformer = ListWorkRequestErrorsConverter.fromResponse( @@ -2451,7 +2771,7 @@ public java.util.concurrent.Future listWorkRequestL "JavaManagementService", "ListWorkRequestLogs", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkRequestLogEntry/ListWorkRequestLogs"); + ""); final java.util.function.Function transformer = ListWorkRequestLogsConverter.fromResponse( @@ -2498,7 +2818,7 @@ public java.util.concurrent.Future listWorkRequests( "JavaManagementService", "ListWorkRequests", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkRequest/ListWorkRequests"); + ""); final java.util.function.Function transformer = ListWorkRequestsConverter.fromResponse( @@ -2547,7 +2867,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "RemoveFleetInstallationSites", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/InstallationSiteSummary/RemoveFleetInstallationSites"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, RemoveFleetInstallationSitesResponse> transformer = @@ -2601,7 +2921,7 @@ public java.util.concurrent.Future requestCryptoA "JavaManagementService", "RequestCryptoAnalyses", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/RequestCryptoAnalyses"); + ""); final java.util.function.Function transformer = RequestCryptoAnalysesConverter.fromResponse( @@ -2637,6 +2957,68 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + requestDeployedApplicationMigrationAnalyses( + RequestDeployedApplicationMigrationAnalysesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RequestDeployedApplicationMigrationAnalysesRequest, + RequestDeployedApplicationMigrationAnalysesResponse> + handler) { + LOG.trace("Called async requestDeployedApplicationMigrationAnalyses"); + final RequestDeployedApplicationMigrationAnalysesRequest interceptedRequest = + RequestDeployedApplicationMigrationAnalysesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RequestDeployedApplicationMigrationAnalysesConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "JavaManagementService", + "RequestDeployedApplicationMigrationAnalyses", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, + RequestDeployedApplicationMigrationAnalysesResponse> + transformer = + RequestDeployedApplicationMigrationAnalysesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + RequestDeployedApplicationMigrationAnalysesRequest, + RequestDeployedApplicationMigrationAnalysesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RequestDeployedApplicationMigrationAnalysesRequest, + RequestDeployedApplicationMigrationAnalysesResponse>, + java.util.concurrent.Future< + RequestDeployedApplicationMigrationAnalysesResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getRequestDeployedApplicationMigrationAnalysesDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RequestDeployedApplicationMigrationAnalysesRequest, + RequestDeployedApplicationMigrationAnalysesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future requestJavaMigrationAnalyses( @@ -2655,7 +3037,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "RequestJavaMigrationAnalyses", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/RequestJavaMigrationAnalyses"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, RequestJavaMigrationAnalysesResponse> transformer = @@ -2709,7 +3091,7 @@ public java.util.concurrent.Future requestJfrRecor "JavaManagementService", "RequestJfrRecordings", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/RequestJfrRecordings"); + ""); final java.util.function.Function transformer = RequestJfrRecordingsConverter.fromResponse( @@ -2763,7 +3145,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "RequestPerformanceTuningAnalyses", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/RequestPerformanceTuningAnalyses"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, RequestPerformanceTuningAnalysesResponse> transformer = @@ -2820,7 +3202,7 @@ public java.util.concurrent.Future scanJavaServerUs "JavaManagementService", "ScanJavaServerUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaServerUsage/ScanJavaServerUsage"); + ""); final java.util.function.Function transformer = ScanJavaServerUsageConverter.fromResponse( @@ -2873,7 +3255,7 @@ public java.util.concurrent.Future scanLibraryUsage( "JavaManagementService", "ScanLibraryUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/LibraryUsage/ScanLibraryUsage"); + ""); final java.util.function.Function transformer = ScanLibraryUsageConverter.fromResponse( @@ -2927,7 +3309,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "SummarizeApplicationInstallationUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ApplicationInstallationUsageSummary/SummarizeApplicationInstallationUsage"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeApplicationInstallationUsageResponse> transformer = @@ -2978,7 +3360,7 @@ public java.util.concurrent.Future summarizeA "JavaManagementService", "SummarizeApplicationUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ApplicationUsage/SummarizeApplicationUsage"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeApplicationUsageResponse> transformer = @@ -3030,7 +3412,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "SummarizeDeployedApplicationInstallationUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/DeployedApplicationInstallationUsageSummary/SummarizeDeployedApplicationInstallationUsage"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeDeployedApplicationInstallationUsageResponse> @@ -3085,7 +3467,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "SummarizeDeployedApplicationUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/DeployedApplicationUsage/SummarizeDeployedApplicationUsage"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeDeployedApplicationUsageResponse> transformer = @@ -3138,7 +3520,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "SummarizeInstallationUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/InstallationUsage/SummarizeInstallationUsage"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeInstallationUsageResponse> transformer = @@ -3189,7 +3571,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "SummarizeJavaServerInstanceUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaServerInstanceUsage/SummarizeJavaServerInstanceUsage"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeJavaServerInstanceUsageResponse> transformer = @@ -3240,7 +3622,7 @@ public java.util.concurrent.Future summarizeJa "JavaManagementService", "SummarizeJavaServerUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaServerUsage/SummarizeJavaServerUsage"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeJavaServerUsageResponse> transformer = @@ -3288,7 +3670,7 @@ public java.util.concurrent.Future summarizeJreUsage( "JavaManagementService", "SummarizeJreUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JreUsage/SummarizeJreUsage"); + ""); final java.util.function.Function transformer = SummarizeJreUsageConverter.fromResponse( @@ -3334,7 +3716,7 @@ public java.util.concurrent.Future summarizeLibra "JavaManagementService", "SummarizeLibraryUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/LibraryUsage/SummarizeLibraryUsage"); + ""); final java.util.function.Function transformer = SummarizeLibraryUsageConverter.fromResponse( @@ -3383,7 +3765,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "SummarizeManagedInstanceUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ManagedInstanceUsage/SummarizeManagedInstanceUsage"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeManagedInstanceUsageResponse> transformer = @@ -3434,7 +3816,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "SummarizeResourceInventory", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/SummarizeResourceInventory"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeResourceInventoryResponse> transformer = @@ -3483,7 +3865,7 @@ public java.util.concurrent.Future updateDrsFile( "JavaManagementService", "UpdateDrsFile", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/UpdateDrsFile"); + ""); final java.util.function.Function transformer = UpdateDrsFileConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -3533,7 +3915,7 @@ public java.util.concurrent.Future updateExportSett "JavaManagementService", "UpdateExportSetting", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ExportSetting/UpdateExportSetting"); + ""); final java.util.function.Function transformer = UpdateExportSettingConverter.fromResponse( @@ -3581,10 +3963,7 @@ public java.util.concurrent.Future updateFleet( UpdateFleetConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "JavaManagementService", - "UpdateFleet", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/UpdateFleet"); + "JavaManagementService", "UpdateFleet", ib.getRequestUri().toString(), ""); final java.util.function.Function transformer = UpdateFleetConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -3638,7 +4017,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "UpdateFleetAdvancedFeatureConfiguration", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/FleetAdvancedFeatureConfiguration/UpdateFleetAdvancedFeatureConfiguration"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, UpdateFleetAdvancedFeatureConfigurationResponse> transformer = @@ -3698,7 +4077,7 @@ protected void beforeRetryAction() {} "JavaManagementService", "UpdateFleetAgentConfiguration", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/FleetAgentConfiguration/UpdateFleetAgentConfiguration"); + ""); final java.util.function.Function< javax.ws.rs.core.Response, UpdateFleetAgentConfigurationResponse> transformer = @@ -3735,4 +4114,55 @@ protected void beforeRetryAction() {} return futureSupplier.apply(handlerToUse); } } + + @Override + public java.util.concurrent.Future updateJmsPlugin( + UpdateJmsPluginRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateJmsPluginRequest, UpdateJmsPluginResponse> + handler) { + LOG.trace("Called async updateJmsPlugin"); + final UpdateJmsPluginRequest interceptedRequest = + UpdateJmsPluginConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateJmsPluginConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "JavaManagementService", + "UpdateJmsPlugin", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + UpdateJmsPluginConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateJmsPluginRequest, UpdateJmsPluginResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateJmsPluginDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateJmsPluginRequest, UpdateJmsPluginResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } } diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementServiceClient.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementServiceClient.java index 7296cb2c0aa..7d36d62faf0 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementServiceClient.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementServiceClient.java @@ -378,7 +378,8 @@ protected JavaManagementServiceClient( if (com.oracle.bmc.http.ApacheUtils.isExtraStreamLogsEnabled()) { LOG.warn( com.oracle.bmc.http.ApacheUtils.getStreamWarningMessage( - "JavaManagementServiceClient", "generateAgentDeployScript")); + "JavaManagementServiceClient", + "generateAgentDeployScript,generateAgentInstallerConfiguration,generateLoadPipelineScript")); } } @@ -573,7 +574,7 @@ public AddFleetInstallationSitesResponse addFleetInstallationSites( "JavaManagementService", "AddFleetInstallationSites", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/InstallationSiteSummary/AddFleetInstallationSites"); + ""); java.util.function.Function transformer = AddFleetInstallationSitesConverter.fromResponse( @@ -615,7 +616,7 @@ public CancelWorkRequestResponse cancelWorkRequest(CancelWorkRequestRequest requ "JavaManagementService", "CancelWorkRequest", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkRequest/CancelWorkRequest"); + ""); java.util.function.Function transformer = CancelWorkRequestConverter.fromResponse( @@ -655,7 +656,7 @@ public ChangeFleetCompartmentResponse changeFleetCompartment( "JavaManagementService", "ChangeFleetCompartment", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/ChangeFleetCompartment"); + ""); java.util.function.Function transformer = ChangeFleetCompartmentConverter.fromResponse( @@ -697,7 +698,7 @@ public CreateBlocklistResponse createBlocklist(CreateBlocklistRequest request) { "JavaManagementService", "CreateBlocklist", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Blocklist/CreateBlocklist"); + ""); java.util.function.Function transformer = CreateBlocklistConverter.fromResponse( @@ -739,7 +740,7 @@ public CreateDrsFileResponse createDrsFile(CreateDrsFileRequest request) { "JavaManagementService", "CreateDrsFile", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/CreateDrsFile"); + ""); java.util.function.Function transformer = CreateDrsFileConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -776,10 +777,7 @@ public CreateFleetResponse createFleet(CreateFleetRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "JavaManagementService", - "CreateFleet", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/CreateFleet"); + "JavaManagementService", "CreateFleet", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = CreateFleetConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -801,6 +799,48 @@ public CreateFleetResponse createFleet(CreateFleetRequest request) { }); } + @Override + public CreateJmsPluginResponse createJmsPlugin(CreateJmsPluginRequest request) { + LOG.trace("Called createJmsPlugin"); + final CreateJmsPluginRequest interceptedRequest = + CreateJmsPluginConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateJmsPluginConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "JavaManagementService", + "CreateJmsPlugin", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + CreateJmsPluginConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateJmsPluginDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DeleteBlocklistResponse deleteBlocklist(DeleteBlocklistRequest request) { LOG.trace("Called deleteBlocklist"); @@ -818,7 +858,7 @@ public DeleteBlocklistResponse deleteBlocklist(DeleteBlocklistRequest request) { "JavaManagementService", "DeleteBlocklist", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Blocklist/DeleteBlocklist"); + ""); java.util.function.Function transformer = DeleteBlocklistConverter.fromResponse( @@ -857,7 +897,7 @@ public DeleteCryptoAnalysisResultResponse deleteCryptoAnalysisResult( "JavaManagementService", "DeleteCryptoAnalysisResult", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/CryptoAnalysisResult/DeleteCryptoAnalysisResult"); + ""); java.util.function.Function transformer = DeleteCryptoAnalysisResultConverter.fromResponse( @@ -895,7 +935,7 @@ public DeleteDrsFileResponse deleteDrsFile(DeleteDrsFileRequest request) { "JavaManagementService", "DeleteDrsFile", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/DrsFile/DeleteDrsFile"); + ""); java.util.function.Function transformer = DeleteDrsFileConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -928,10 +968,7 @@ public DeleteFleetResponse deleteFleet(DeleteFleetRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "JavaManagementService", - "DeleteFleet", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/DeleteFleet"); + "JavaManagementService", "DeleteFleet", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = DeleteFleetConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -968,7 +1005,7 @@ public DeleteJavaMigrationAnalysisResultResponse deleteJavaMigrationAnalysisResu "JavaManagementService", "DeleteJavaMigrationAnalysisResult", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaMigrationAnalysisResult/DeleteJavaMigrationAnalysisResult"); + ""); java.util.function.Function< javax.ws.rs.core.Response, DeleteJavaMigrationAnalysisResultResponse> transformer = @@ -990,6 +1027,44 @@ public DeleteJavaMigrationAnalysisResultResponse deleteJavaMigrationAnalysisResu }); } + @Override + public DeleteJmsPluginResponse deleteJmsPlugin(DeleteJmsPluginRequest request) { + LOG.trace("Called deleteJmsPlugin"); + final DeleteJmsPluginRequest interceptedRequest = + DeleteJmsPluginConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteJmsPluginConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "JavaManagementService", + "DeleteJmsPlugin", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + DeleteJmsPluginConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DeletePerformanceTuningAnalysisResultResponse deletePerformanceTuningAnalysisResult( DeletePerformanceTuningAnalysisResultRequest request) { @@ -1009,7 +1084,7 @@ public DeletePerformanceTuningAnalysisResultResponse deletePerformanceTuningAnal "JavaManagementService", "DeletePerformanceTuningAnalysisResult", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/PerformanceTuningAnalysisResult/DeletePerformanceTuningAnalysisResult"); + ""); java.util.function.Function< javax.ws.rs.core.Response, DeletePerformanceTuningAnalysisResultResponse> transformer = @@ -1045,10 +1120,7 @@ public DisableDrsResponse disableDrs(DisableDrsRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "JavaManagementService", - "DisableDrs", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/DisableDrs"); + "JavaManagementService", "DisableDrs", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = DisableDrsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1084,10 +1156,7 @@ public EnableDrsResponse enableDrs(EnableDrsRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "JavaManagementService", - "EnableDrs", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/EnableDrs"); + "JavaManagementService", "EnableDrs", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = EnableDrsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1127,7 +1196,7 @@ public GenerateAgentDeployScriptResponse generateAgentDeployScript( "JavaManagementService", "GenerateAgentDeployScript", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/GenerateAgentDeployScript"); + ""); java.util.function.Function transformer = GenerateAgentDeployScriptConverter.fromResponse( @@ -1152,6 +1221,94 @@ public GenerateAgentDeployScriptResponse generateAgentDeployScript( }); } + @Override + public GenerateAgentInstallerConfigurationResponse generateAgentInstallerConfiguration( + GenerateAgentInstallerConfigurationRequest request) { + LOG.trace("Called generateAgentInstallerConfiguration"); + final GenerateAgentInstallerConfigurationRequest interceptedRequest = + GenerateAgentInstallerConfigurationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GenerateAgentInstallerConfigurationConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "JavaManagementService", + "GenerateAgentInstallerConfiguration", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, GenerateAgentInstallerConfigurationResponse> + transformer = + GenerateAgentInstallerConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getGenerateAgentInstallerConfigurationDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GenerateLoadPipelineScriptResponse generateLoadPipelineScript( + GenerateLoadPipelineScriptRequest request) { + LOG.trace("Called generateLoadPipelineScript"); + final GenerateLoadPipelineScriptRequest interceptedRequest = + GenerateLoadPipelineScriptConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GenerateLoadPipelineScriptConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "JavaManagementService", + "GenerateLoadPipelineScript", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + GenerateLoadPipelineScriptConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getGenerateLoadPipelineScriptDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetCryptoAnalysisResultResponse getCryptoAnalysisResult( GetCryptoAnalysisResultRequest request) { @@ -1170,7 +1327,7 @@ public GetCryptoAnalysisResultResponse getCryptoAnalysisResult( "JavaManagementService", "GetCryptoAnalysisResult", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/CryptoAnalysisResult/GetCryptoAnalysisResult"); + ""); java.util.function.Function transformer = GetCryptoAnalysisResultConverter.fromResponse( @@ -1203,10 +1360,7 @@ public GetDrsFileResponse getDrsFile(GetDrsFileRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "JavaManagementService", - "GetDrsFile", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/DrsFile/GetDrsFile"); + "JavaManagementService", "GetDrsFile", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = GetDrsFileConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1241,7 +1395,7 @@ public GetExportSettingResponse getExportSetting(GetExportSettingRequest request "JavaManagementService", "GetExportSetting", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ExportSetting/GetExportSetting"); + ""); java.util.function.Function transformer = GetExportSettingConverter.fromResponse( @@ -1278,7 +1432,7 @@ public GetExportStatusResponse getExportStatus(GetExportStatusRequest request) { "JavaManagementService", "GetExportStatus", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ExportStatus/GetExportStatus"); + ""); java.util.function.Function transformer = GetExportStatusConverter.fromResponse( @@ -1311,10 +1465,7 @@ public GetFleetResponse getFleet(GetFleetRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "JavaManagementService", - "GetFleet", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/GetFleet"); + "JavaManagementService", "GetFleet", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = GetFleetConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1351,7 +1502,7 @@ public GetFleetAdvancedFeatureConfigurationResponse getFleetAdvancedFeatureConfi "JavaManagementService", "GetFleetAdvancedFeatureConfiguration", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/FleetAdvancedFeatureConfiguration/GetFleetAdvancedFeatureConfiguration"); + ""); java.util.function.Function< javax.ws.rs.core.Response, GetFleetAdvancedFeatureConfigurationResponse> transformer = @@ -1390,7 +1541,7 @@ public GetFleetAgentConfigurationResponse getFleetAgentConfiguration( "JavaManagementService", "GetFleetAgentConfiguration", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/FleetAgentConfiguration/GetFleetAgentConfiguration"); + ""); java.util.function.Function transformer = GetFleetAgentConfigurationConverter.fromResponse( @@ -1427,7 +1578,7 @@ public GetJavaFamilyResponse getJavaFamily(GetJavaFamilyRequest request) { "JavaManagementService", "GetJavaFamily", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaFamily/GetJavaFamily"); + ""); java.util.function.Function transformer = GetJavaFamilyConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1463,7 +1614,7 @@ public GetJavaMigrationAnalysisResultResponse getJavaMigrationAnalysisResult( "JavaManagementService", "GetJavaMigrationAnalysisResult", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaMigrationAnalysisResult/GetJavaMigrationAnalysisResult"); + ""); java.util.function.Function< javax.ws.rs.core.Response, GetJavaMigrationAnalysisResultResponse> transformer = @@ -1501,7 +1652,7 @@ public GetJavaReleaseResponse getJavaRelease(GetJavaReleaseRequest request) { "JavaManagementService", "GetJavaRelease", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaRelease/GetJavaRelease"); + ""); java.util.function.Function transformer = GetJavaReleaseConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1519,6 +1670,38 @@ public GetJavaReleaseResponse getJavaRelease(GetJavaReleaseRequest request) { }); } + @Override + public GetJmsPluginResponse getJmsPlugin(GetJmsPluginRequest request) { + LOG.trace("Called getJmsPlugin"); + final GetJmsPluginRequest interceptedRequest = + GetJmsPluginConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetJmsPluginConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "JavaManagementService", "GetJmsPlugin", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + GetJmsPluginConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetPerformanceTuningAnalysisResultResponse getPerformanceTuningAnalysisResult( GetPerformanceTuningAnalysisResultRequest request) { @@ -1537,7 +1720,7 @@ public GetPerformanceTuningAnalysisResultResponse getPerformanceTuningAnalysisRe "JavaManagementService", "GetPerformanceTuningAnalysisResult", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/PerformanceTuningAnalysisResult/GetPerformanceTuningAnalysisResult"); + ""); java.util.function.Function< javax.ws.rs.core.Response, GetPerformanceTuningAnalysisResultResponse> transformer = @@ -1575,7 +1758,7 @@ public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) { "JavaManagementService", "GetWorkRequest", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkRequest/GetWorkRequest"); + ""); java.util.function.Function transformer = GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1593,6 +1776,43 @@ public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) { }); } + @Override + public ListAgentInstallersResponse listAgentInstallers(ListAgentInstallersRequest request) { + LOG.trace("Called listAgentInstallers"); + final ListAgentInstallersRequest interceptedRequest = + ListAgentInstallersConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAgentInstallersConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "JavaManagementService", + "ListAgentInstallers", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListAgentInstallersConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListAnnouncementsResponse listAnnouncements(ListAnnouncementsRequest request) { LOG.trace("Called listAnnouncements"); @@ -1610,7 +1830,7 @@ public ListAnnouncementsResponse listAnnouncements(ListAnnouncementsRequest requ "JavaManagementService", "ListAnnouncements", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/AnnouncementCollection/ListAnnouncements"); + ""); java.util.function.Function transformer = ListAnnouncementsConverter.fromResponse( @@ -1647,7 +1867,7 @@ public ListBlocklistsResponse listBlocklists(ListBlocklistsRequest request) { "JavaManagementService", "ListBlocklists", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Blocklist/ListBlocklists"); + ""); java.util.function.Function transformer = ListBlocklistsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1683,7 +1903,7 @@ public ListCryptoAnalysisResultsResponse listCryptoAnalysisResults( "JavaManagementService", "ListCryptoAnalysisResults", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/CryptoAnalysisResult/ListCryptoAnalysisResults"); + ""); java.util.function.Function transformer = ListCryptoAnalysisResultsConverter.fromResponse( @@ -1717,10 +1937,7 @@ public ListDrsFilesResponse listDrsFiles(ListDrsFilesRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "JavaManagementService", - "ListDrsFiles", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/DrsFileCollection/ListDrsFiles"); + "JavaManagementService", "ListDrsFiles", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = ListDrsFilesConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1755,7 +1972,7 @@ public ListFleetDiagnosesResponse listFleetDiagnoses(ListFleetDiagnosesRequest r "JavaManagementService", "ListFleetDiagnoses", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/FleetDiagnosisSummary/ListFleetDiagnoses"); + ""); java.util.function.Function transformer = ListFleetDiagnosesConverter.fromResponse( @@ -1788,10 +2005,7 @@ public ListFleetsResponse listFleets(ListFleetsRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "JavaManagementService", - "ListFleets", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/ListFleets"); + "JavaManagementService", "ListFleets", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = ListFleetsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1827,7 +2041,7 @@ public ListInstallationSitesResponse listInstallationSites( "JavaManagementService", "ListInstallationSites", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/InstallationSiteSummary/ListInstallationSites"); + ""); java.util.function.Function transformer = ListInstallationSitesConverter.fromResponse( @@ -1864,7 +2078,7 @@ public ListJavaFamiliesResponse listJavaFamilies(ListJavaFamiliesRequest request "JavaManagementService", "ListJavaFamilies", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaFamily/ListJavaFamilies"); + ""); java.util.function.Function transformer = ListJavaFamiliesConverter.fromResponse( @@ -1902,7 +2116,7 @@ public ListJavaMigrationAnalysisResultsResponse listJavaMigrationAnalysisResults "JavaManagementService", "ListJavaMigrationAnalysisResults", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaMigrationAnalysisResult/ListJavaMigrationAnalysisResults"); + ""); java.util.function.Function< javax.ws.rs.core.Response, ListJavaMigrationAnalysisResultsResponse> transformer = @@ -1940,7 +2154,7 @@ public ListJavaReleasesResponse listJavaReleases(ListJavaReleasesRequest request "JavaManagementService", "ListJavaReleases", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaRelease/ListJavaReleases"); + ""); java.util.function.Function transformer = ListJavaReleasesConverter.fromResponse( @@ -1960,6 +2174,41 @@ public ListJavaReleasesResponse listJavaReleases(ListJavaReleasesRequest request }); } + @Override + public ListJmsPluginsResponse listJmsPlugins(ListJmsPluginsRequest request) { + LOG.trace("Called listJmsPlugins"); + final ListJmsPluginsRequest interceptedRequest = + ListJmsPluginsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListJmsPluginsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "JavaManagementService", + "ListJmsPlugins", + ib.getRequestUri().toString(), + ""); + java.util.function.Function transformer = + ListJmsPluginsConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListJreUsageResponse listJreUsage(ListJreUsageRequest request) { LOG.trace("Called listJreUsage"); @@ -1974,10 +2223,7 @@ public ListJreUsageResponse listJreUsage(ListJreUsageRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "JavaManagementService", - "ListJreUsage", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JreUsage/ListJreUsage"); + "JavaManagementService", "ListJreUsage", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = ListJreUsageConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -2014,7 +2260,7 @@ public ListPerformanceTuningAnalysisResultsResponse listPerformanceTuningAnalysi "JavaManagementService", "ListPerformanceTuningAnalysisResults", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/PerformanceTuningAnalysisResult/ListPerformanceTuningAnalysisResults"); + ""); java.util.function.Function< javax.ws.rs.core.Response, ListPerformanceTuningAnalysisResultsResponse> transformer = @@ -2052,7 +2298,7 @@ public ListWorkItemsResponse listWorkItems(ListWorkItemsRequest request) { "JavaManagementService", "ListWorkItems", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkItemSummary/ListWorkItems"); + ""); java.util.function.Function transformer = ListWorkItemsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -2088,7 +2334,7 @@ public ListWorkRequestErrorsResponse listWorkRequestErrors( "JavaManagementService", "ListWorkRequestErrors", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkRequestError/ListWorkRequestErrors"); + ""); java.util.function.Function transformer = ListWorkRequestErrorsConverter.fromResponse( @@ -2125,7 +2371,7 @@ public ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsReques "JavaManagementService", "ListWorkRequestLogs", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkRequestLogEntry/ListWorkRequestLogs"); + ""); java.util.function.Function transformer = ListWorkRequestLogsConverter.fromResponse( @@ -2162,7 +2408,7 @@ public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request "JavaManagementService", "ListWorkRequests", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/WorkRequest/ListWorkRequests"); + ""); java.util.function.Function transformer = ListWorkRequestsConverter.fromResponse( @@ -2201,7 +2447,7 @@ public RemoveFleetInstallationSitesResponse removeFleetInstallationSites( "JavaManagementService", "RemoveFleetInstallationSites", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/InstallationSiteSummary/RemoveFleetInstallationSites"); + ""); java.util.function.Function transformer = RemoveFleetInstallationSitesConverter.fromResponse( @@ -2244,7 +2490,7 @@ public RequestCryptoAnalysesResponse requestCryptoAnalyses( "JavaManagementService", "RequestCryptoAnalyses", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/RequestCryptoAnalyses"); + ""); java.util.function.Function transformer = RequestCryptoAnalysesConverter.fromResponse( @@ -2268,6 +2514,53 @@ public RequestCryptoAnalysesResponse requestCryptoAnalyses( }); } + @Override + public RequestDeployedApplicationMigrationAnalysesResponse + requestDeployedApplicationMigrationAnalyses( + RequestDeployedApplicationMigrationAnalysesRequest request) { + LOG.trace("Called requestDeployedApplicationMigrationAnalyses"); + final RequestDeployedApplicationMigrationAnalysesRequest interceptedRequest = + RequestDeployedApplicationMigrationAnalysesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RequestDeployedApplicationMigrationAnalysesConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "JavaManagementService", + "RequestDeployedApplicationMigrationAnalyses", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, + RequestDeployedApplicationMigrationAnalysesResponse> + transformer = + RequestDeployedApplicationMigrationAnalysesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getRequestDeployedApplicationMigrationAnalysesDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public RequestJavaMigrationAnalysesResponse requestJavaMigrationAnalyses( RequestJavaMigrationAnalysesRequest request) { @@ -2286,7 +2579,7 @@ public RequestJavaMigrationAnalysesResponse requestJavaMigrationAnalyses( "JavaManagementService", "RequestJavaMigrationAnalyses", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/RequestJavaMigrationAnalyses"); + ""); java.util.function.Function transformer = RequestJavaMigrationAnalysesConverter.fromResponse( @@ -2328,7 +2621,7 @@ public RequestJfrRecordingsResponse requestJfrRecordings(RequestJfrRecordingsReq "JavaManagementService", "RequestJfrRecordings", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/RequestJfrRecordings"); + ""); java.util.function.Function transformer = RequestJfrRecordingsConverter.fromResponse( @@ -2370,7 +2663,7 @@ public RequestPerformanceTuningAnalysesResponse requestPerformanceTuningAnalyses "JavaManagementService", "RequestPerformanceTuningAnalyses", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/RequestPerformanceTuningAnalyses"); + ""); java.util.function.Function< javax.ws.rs.core.Response, RequestPerformanceTuningAnalysesResponse> transformer = @@ -2414,7 +2707,7 @@ public ScanJavaServerUsageResponse scanJavaServerUsage(ScanJavaServerUsageReques "JavaManagementService", "ScanJavaServerUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaServerUsage/ScanJavaServerUsage"); + ""); java.util.function.Function transformer = ScanJavaServerUsageConverter.fromResponse( @@ -2456,7 +2749,7 @@ public ScanLibraryUsageResponse scanLibraryUsage(ScanLibraryUsageRequest request "JavaManagementService", "ScanLibraryUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/LibraryUsage/ScanLibraryUsage"); + ""); java.util.function.Function transformer = ScanLibraryUsageConverter.fromResponse( @@ -2499,7 +2792,7 @@ public SummarizeApplicationInstallationUsageResponse summarizeApplicationInstall "JavaManagementService", "SummarizeApplicationInstallationUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ApplicationInstallationUsageSummary/SummarizeApplicationInstallationUsage"); + ""); java.util.function.Function< javax.ws.rs.core.Response, SummarizeApplicationInstallationUsageResponse> transformer = @@ -2538,7 +2831,7 @@ public SummarizeApplicationUsageResponse summarizeApplicationUsage( "JavaManagementService", "SummarizeApplicationUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ApplicationUsage/SummarizeApplicationUsage"); + ""); java.util.function.Function transformer = SummarizeApplicationUsageConverter.fromResponse( @@ -2578,7 +2871,7 @@ public SummarizeApplicationUsageResponse summarizeApplicationUsage( "JavaManagementService", "SummarizeDeployedApplicationInstallationUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/DeployedApplicationInstallationUsageSummary/SummarizeDeployedApplicationInstallationUsage"); + ""); java.util.function.Function< javax.ws.rs.core.Response, SummarizeDeployedApplicationInstallationUsageResponse> @@ -2618,7 +2911,7 @@ public SummarizeDeployedApplicationUsageResponse summarizeDeployedApplicationUsa "JavaManagementService", "SummarizeDeployedApplicationUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/DeployedApplicationUsage/SummarizeDeployedApplicationUsage"); + ""); java.util.function.Function< javax.ws.rs.core.Response, SummarizeDeployedApplicationUsageResponse> transformer = @@ -2657,7 +2950,7 @@ public SummarizeInstallationUsageResponse summarizeInstallationUsage( "JavaManagementService", "SummarizeInstallationUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/InstallationUsage/SummarizeInstallationUsage"); + ""); java.util.function.Function transformer = SummarizeInstallationUsageConverter.fromResponse( @@ -2695,7 +2988,7 @@ public SummarizeJavaServerInstanceUsageResponse summarizeJavaServerInstanceUsage "JavaManagementService", "SummarizeJavaServerInstanceUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaServerInstanceUsage/SummarizeJavaServerInstanceUsage"); + ""); java.util.function.Function< javax.ws.rs.core.Response, SummarizeJavaServerInstanceUsageResponse> transformer = @@ -2734,7 +3027,7 @@ public SummarizeJavaServerUsageResponse summarizeJavaServerUsage( "JavaManagementService", "SummarizeJavaServerUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JavaServerUsage/SummarizeJavaServerUsage"); + ""); java.util.function.Function transformer = SummarizeJavaServerUsageConverter.fromResponse( @@ -2771,7 +3064,7 @@ public SummarizeJreUsageResponse summarizeJreUsage(SummarizeJreUsageRequest requ "JavaManagementService", "SummarizeJreUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/JreUsage/SummarizeJreUsage"); + ""); java.util.function.Function transformer = SummarizeJreUsageConverter.fromResponse( @@ -2809,7 +3102,7 @@ public SummarizeLibraryUsageResponse summarizeLibraryUsage( "JavaManagementService", "SummarizeLibraryUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/LibraryUsage/SummarizeLibraryUsage"); + ""); java.util.function.Function transformer = SummarizeLibraryUsageConverter.fromResponse( @@ -2847,7 +3140,7 @@ public SummarizeManagedInstanceUsageResponse summarizeManagedInstanceUsage( "JavaManagementService", "SummarizeManagedInstanceUsage", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ManagedInstanceUsage/SummarizeManagedInstanceUsage"); + ""); java.util.function.Function< javax.ws.rs.core.Response, SummarizeManagedInstanceUsageResponse> transformer = @@ -2886,7 +3179,7 @@ public SummarizeResourceInventoryResponse summarizeResourceInventory( "JavaManagementService", "SummarizeResourceInventory", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/SummarizeResourceInventory"); + ""); java.util.function.Function transformer = SummarizeResourceInventoryConverter.fromResponse( @@ -2924,7 +3217,7 @@ public UpdateDrsFileResponse updateDrsFile(UpdateDrsFileRequest request) { "JavaManagementService", "UpdateDrsFile", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/UpdateDrsFile"); + ""); java.util.function.Function transformer = UpdateDrsFileConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -2963,7 +3256,7 @@ public UpdateExportSettingResponse updateExportSetting(UpdateExportSettingReques "JavaManagementService", "UpdateExportSetting", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/ExportSetting/UpdateExportSetting"); + ""); java.util.function.Function transformer = UpdateExportSettingConverter.fromResponse( @@ -3001,10 +3294,7 @@ public UpdateFleetResponse updateFleet(UpdateFleetRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "JavaManagementService", - "UpdateFleet", - ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/Fleet/UpdateFleet"); + "JavaManagementService", "UpdateFleet", ib.getRequestUri().toString(), ""); java.util.function.Function transformer = UpdateFleetConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -3046,7 +3336,7 @@ public UpdateFleetAdvancedFeatureConfigurationResponse updateFleetAdvancedFeatur "JavaManagementService", "UpdateFleetAdvancedFeatureConfiguration", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/FleetAdvancedFeatureConfiguration/UpdateFleetAdvancedFeatureConfiguration"); + ""); java.util.function.Function< javax.ws.rs.core.Response, UpdateFleetAdvancedFeatureConfigurationResponse> transformer = @@ -3090,7 +3380,7 @@ public UpdateFleetAgentConfigurationResponse updateFleetAgentConfiguration( "JavaManagementService", "UpdateFleetAgentConfiguration", ib.getRequestUri().toString(), - "https://docs.oracle.com/iaas/api/#/en/jms/20210610/FleetAgentConfiguration/UpdateFleetAgentConfiguration"); + ""); java.util.function.Function< javax.ws.rs.core.Response, UpdateFleetAgentConfigurationResponse> transformer = @@ -3116,6 +3406,47 @@ public UpdateFleetAgentConfigurationResponse updateFleetAgentConfiguration( }); } + @Override + public UpdateJmsPluginResponse updateJmsPlugin(UpdateJmsPluginRequest request) { + LOG.trace("Called updateJmsPlugin"); + final UpdateJmsPluginRequest interceptedRequest = + UpdateJmsPluginConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateJmsPluginConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "JavaManagementService", + "UpdateJmsPlugin", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + UpdateJmsPluginConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateJmsPluginDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public JavaManagementServiceWaiters getWaiters() { return waiters; diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementServicePaginators.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementServicePaginators.java index 845c859d29b..75c1b8bd11d 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementServicePaginators.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementServicePaginators.java @@ -33,6 +33,119 @@ public JavaManagementServicePaginators(JavaManagementService client) { this.client = client; } + /** + * Creates a new iterable which will iterate over the responses received from the listAgentInstallers operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listAgentInstallersResponseIterator( + final ListAgentInstallersRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListAgentInstallersRequest.Builder, ListAgentInstallersRequest, + ListAgentInstallersResponse>( + new java.util.function.Supplier() { + @Override + public ListAgentInstallersRequest.Builder get() { + return ListAgentInstallersRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListAgentInstallersResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAgentInstallersRequest.Builder>, + ListAgentInstallersRequest>() { + @Override + public ListAgentInstallersRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAgentInstallersRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListAgentInstallersRequest, ListAgentInstallersResponse>() { + @Override + public ListAgentInstallersResponse apply(ListAgentInstallersRequest request) { + return client.listAgentInstallers(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.jms.model.AgentInstallerSummary} objects + * contained in responses from the listAgentInstallers operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.jms.model.AgentInstallerSummary} objects + * contained in responses received from the service. + */ + public Iterable + listAgentInstallersRecordIterator(final ListAgentInstallersRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListAgentInstallersRequest.Builder, ListAgentInstallersRequest, + ListAgentInstallersResponse, com.oracle.bmc.jms.model.AgentInstallerSummary>( + new java.util.function.Supplier() { + @Override + public ListAgentInstallersRequest.Builder get() { + return ListAgentInstallersRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListAgentInstallersResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAgentInstallersRequest.Builder>, + ListAgentInstallersRequest>() { + @Override + public ListAgentInstallersRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAgentInstallersRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListAgentInstallersRequest, ListAgentInstallersResponse>() { + @Override + public ListAgentInstallersResponse apply(ListAgentInstallersRequest request) { + return client.listAgentInstallers(request); + } + }, + new java.util.function.Function< + ListAgentInstallersResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListAgentInstallersResponse response) { + return response.getAgentInstallerCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listAnnouncements operation. This iterable * will fetch more data from the server as needed. @@ -1169,6 +1282,116 @@ public java.util.List apply( }); } + /** + * Creates a new iterable which will iterate over the responses received from the listJmsPlugins operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listJmsPluginsResponseIterator( + final ListJmsPluginsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListJmsPluginsRequest.Builder, ListJmsPluginsRequest, ListJmsPluginsResponse>( + new java.util.function.Supplier() { + @Override + public ListJmsPluginsRequest.Builder get() { + return ListJmsPluginsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListJmsPluginsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListJmsPluginsRequest.Builder>, + ListJmsPluginsRequest>() { + @Override + public ListJmsPluginsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListJmsPluginsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListJmsPluginsResponse apply(ListJmsPluginsRequest request) { + return client.listJmsPlugins(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.jms.model.JmsPluginSummary} objects + * contained in responses from the listJmsPlugins operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.jms.model.JmsPluginSummary} objects + * contained in responses received from the service. + */ + public Iterable listJmsPluginsRecordIterator( + final ListJmsPluginsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListJmsPluginsRequest.Builder, ListJmsPluginsRequest, ListJmsPluginsResponse, + com.oracle.bmc.jms.model.JmsPluginSummary>( + new java.util.function.Supplier() { + @Override + public ListJmsPluginsRequest.Builder get() { + return ListJmsPluginsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListJmsPluginsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListJmsPluginsRequest.Builder>, + ListJmsPluginsRequest>() { + @Override + public ListJmsPluginsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListJmsPluginsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListJmsPluginsResponse apply(ListJmsPluginsRequest request) { + return client.listJmsPlugins(request); + } + }, + new java.util.function.Function< + ListJmsPluginsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListJmsPluginsResponse response) { + return response.getJmsPluginCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listJreUsage operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementServiceWaiters.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementServiceWaiters.java index 7502b90d0b9..0e713cc4827 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementServiceWaiters.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/JavaManagementServiceWaiters.java @@ -119,6 +119,104 @@ public boolean test(GetFleetResponse response) { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetState the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forJmsPlugin( + GetJmsPluginRequest request, + com.oracle.bmc.jms.model.JmsPluginLifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forJmsPlugin( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forJmsPlugin( + GetJmsPluginRequest request, + com.oracle.bmc.jms.model.JmsPluginLifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forJmsPlugin( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forJmsPlugin( + GetJmsPluginRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.jms.model.JmsPluginLifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forJmsPlugin( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for JmsPlugin. + private com.oracle.bmc.waiter.Waiter forJmsPlugin( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetJmsPluginRequest request, + final com.oracle.bmc.jms.model.JmsPluginLifecycleState... targetStates) { + final java.util.Set targetStatesSet = + new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetJmsPluginRequest, GetJmsPluginResponse>() { + @Override + public GetJmsPluginResponse apply(GetJmsPluginRequest request) { + return client.getJmsPlugin(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetJmsPluginResponse response) { + return targetStatesSet.contains( + response.getJmsPlugin().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.jms.model.JmsPluginLifecycleState.Deleted)), + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using default configuration. * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/CreateJmsPluginConverter.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/CreateJmsPluginConverter.java new file mode 100644 index 00000000000..9ae5ff289a6 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/CreateJmsPluginConverter.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.jms.model.*; +import com.oracle.bmc.jms.requests.*; +import com.oracle.bmc.jms.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class CreateJmsPluginConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateJmsPluginConverter.class); + + public static com.oracle.bmc.jms.requests.CreateJmsPluginRequest interceptRequest( + com.oracle.bmc.jms.requests.CreateJmsPluginRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.jms.requests.CreateJmsPluginRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCreateJmsPluginDetails(), "createJmsPluginDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20210610").path("jmsPlugins"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.jms.responses.CreateJmsPluginResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.jms.responses.CreateJmsPluginResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.CreateJmsPluginResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.CreateJmsPluginResponse>() { + @Override + public com.oracle.bmc.jms.responses.CreateJmsPluginResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.jms.responses.CreateJmsPluginResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.jms.model.JmsPlugin>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.jms.model.JmsPlugin.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.jms.model.JmsPlugin.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.jms.model.JmsPlugin> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.jms.responses.CreateJmsPluginResponse.Builder + builder = + com.oracle.bmc.jms.responses.CreateJmsPluginResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.jmsPlugin(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.jms.responses.CreateJmsPluginResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/DeleteJmsPluginConverter.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/DeleteJmsPluginConverter.java new file mode 100644 index 00000000000..43365265fff --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/DeleteJmsPluginConverter.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.jms.model.*; +import com.oracle.bmc.jms.requests.*; +import com.oracle.bmc.jms.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class DeleteJmsPluginConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteJmsPluginConverter.class); + + public static com.oracle.bmc.jms.requests.DeleteJmsPluginRequest interceptRequest( + com.oracle.bmc.jms.requests.DeleteJmsPluginRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.jms.requests.DeleteJmsPluginRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getJmsPluginId(), "jmsPluginId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210610") + .path("jmsPlugins") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getJmsPluginId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.jms.responses.DeleteJmsPluginResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.jms.responses.DeleteJmsPluginResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.DeleteJmsPluginResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.DeleteJmsPluginResponse>() { + @Override + public com.oracle.bmc.jms.responses.DeleteJmsPluginResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.jms.responses.DeleteJmsPluginResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.jms.responses.DeleteJmsPluginResponse.Builder + builder = + com.oracle.bmc.jms.responses.DeleteJmsPluginResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.jms.responses.DeleteJmsPluginResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/GenerateAgentInstallerConfigurationConverter.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/GenerateAgentInstallerConfigurationConverter.java new file mode 100644 index 00000000000..7471737d95a --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/GenerateAgentInstallerConfigurationConverter.java @@ -0,0 +1,157 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.internal.http; + +import com.oracle.bmc.jms.model.*; +import com.oracle.bmc.jms.requests.*; +import com.oracle.bmc.jms.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class GenerateAgentInstallerConfigurationConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GenerateAgentInstallerConfigurationConverter.class); + + public static com.oracle.bmc.jms.requests.GenerateAgentInstallerConfigurationRequest + interceptRequest( + com.oracle.bmc.jms.requests.GenerateAgentInstallerConfigurationRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.jms.requests.GenerateAgentInstallerConfigurationRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getGenerateAgentInstallerConfigurationDetails(), + "generateAgentInstallerConfigurationDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210610") + .path("agentInstallers") + .path("actions") + .path("generateAgentInstallerConfiguration"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept("text/plain"); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.GenerateAgentInstallerConfigurationResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.GenerateAgentInstallerConfigurationResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.GenerateAgentInstallerConfigurationResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses + .GenerateAgentInstallerConfigurationResponse>() { + @Override + public com.oracle.bmc.jms.responses + .GenerateAgentInstallerConfigurationResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.jms.responses.GenerateAgentInstallerConfigurationResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.io.InputStream>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + java.io.InputStream.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + java.io.InputStream.class); + } + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.jms.responses + .GenerateAgentInstallerConfigurationResponse.Builder + builder = + com.oracle.bmc.jms.responses + .GenerateAgentInstallerConfigurationResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.inputStream(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLengthHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-length"); + if (contentLengthHeader.isPresent()) { + builder.contentLength( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-length", + contentLengthHeader.get().get(0), + Long.class)); + } + + java.util.Optional> contentTypeHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-type"); + if (contentTypeHeader.isPresent()) { + builder.contentType( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-type", + contentTypeHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.jms.responses + .GenerateAgentInstallerConfigurationResponse + responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/GenerateLoadPipelineScriptConverter.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/GenerateLoadPipelineScriptConverter.java new file mode 100644 index 00000000000..d5bba8ec1b5 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/GenerateLoadPipelineScriptConverter.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.internal.http; + +import com.oracle.bmc.jms.model.*; +import com.oracle.bmc.jms.requests.*; +import com.oracle.bmc.jms.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class GenerateLoadPipelineScriptConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GenerateLoadPipelineScriptConverter.class); + + public static com.oracle.bmc.jms.requests.GenerateLoadPipelineScriptRequest interceptRequest( + com.oracle.bmc.jms.requests.GenerateLoadPipelineScriptRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.jms.requests.GenerateLoadPipelineScriptRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + Validate.notNull( + request.getGenerateLoadPipelineScriptDetails(), + "generateLoadPipelineScriptDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210610") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("actions") + .path("generateLoadPipelineScript"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept("text/plain"); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.GenerateLoadPipelineScriptResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.GenerateLoadPipelineScriptResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.GenerateLoadPipelineScriptResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.GenerateLoadPipelineScriptResponse>() { + @Override + public com.oracle.bmc.jms.responses.GenerateLoadPipelineScriptResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.jms.responses.GenerateLoadPipelineScriptResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.io.InputStream>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + java.io.InputStream.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + java.io.InputStream.class); + } + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.jms.responses.GenerateLoadPipelineScriptResponse + .Builder + builder = + com.oracle.bmc.jms.responses + .GenerateLoadPipelineScriptResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.inputStream(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLengthHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-length"); + if (contentLengthHeader.isPresent()) { + builder.contentLength( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-length", + contentLengthHeader.get().get(0), + Long.class)); + } + + java.util.Optional> contentTypeHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-type"); + if (contentTypeHeader.isPresent()) { + builder.contentType( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-type", + contentTypeHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.jms.responses.GenerateLoadPipelineScriptResponse + responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/GetJmsPluginConverter.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/GetJmsPluginConverter.java new file mode 100644 index 00000000000..8c7448c3ac9 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/GetJmsPluginConverter.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.jms.model.*; +import com.oracle.bmc.jms.requests.*; +import com.oracle.bmc.jms.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class GetJmsPluginConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetJmsPluginConverter.class); + + public static com.oracle.bmc.jms.requests.GetJmsPluginRequest interceptRequest( + com.oracle.bmc.jms.requests.GetJmsPluginRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.jms.requests.GetJmsPluginRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getJmsPluginId(), "jmsPluginId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210610") + .path("jmsPlugins") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getJmsPluginId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.jms.responses.GetJmsPluginResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.jms.responses.GetJmsPluginResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.GetJmsPluginResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.GetJmsPluginResponse>() { + @Override + public com.oracle.bmc.jms.responses.GetJmsPluginResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.jms.responses.GetJmsPluginResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.jms.model.JmsPlugin>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.jms.model.JmsPlugin.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.jms.model.JmsPlugin.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.jms.model.JmsPlugin> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.jms.responses.GetJmsPluginResponse.Builder builder = + com.oracle.bmc.jms.responses.GetJmsPluginResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.jmsPlugin(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> retryAfterHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "retry-after"); + if (retryAfterHeader.isPresent()) { + builder.retryAfter( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "retry-after", + retryAfterHeader.get().get(0), + Float.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.jms.responses.GetJmsPluginResponse responseWrapper = + builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListAgentInstallersConverter.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListAgentInstallersConverter.java new file mode 100644 index 00000000000..55c3ddc570b --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListAgentInstallersConverter.java @@ -0,0 +1,204 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.jms.model.*; +import com.oracle.bmc.jms.requests.*; +import com.oracle.bmc.jms.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class ListAgentInstallersConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListAgentInstallersConverter.class); + + public static com.oracle.bmc.jms.requests.ListAgentInstallersRequest interceptRequest( + com.oracle.bmc.jms.requests.ListAgentInstallersRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.jms.requests.ListAgentInstallersRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20210610").path("agentInstallers"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getFleetId() != null) { + target = + target.queryParam( + "fleetId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getFleetId())); + } + + if (request.getPlatformArchitecture() != null) { + target = + target.queryParam( + "platformArchitecture", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPlatformArchitecture().getValue())); + } + + if (request.getOsFamily() != null) { + target = + target.queryParam( + "osFamily", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getOsFamily().getValue())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.ListAgentInstallersResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.ListAgentInstallersResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.ListAgentInstallersResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.ListAgentInstallersResponse>() { + @Override + public com.oracle.bmc.jms.responses.ListAgentInstallersResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.jms.responses.ListAgentInstallersResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.jms.model + .AgentInstallerCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.jms.model + .AgentInstallerCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.jms.model + .AgentInstallerCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.jms.model.AgentInstallerCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.jms.responses.ListAgentInstallersResponse.Builder + builder = + com.oracle.bmc.jms.responses + .ListAgentInstallersResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.agentInstallerCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.jms.responses.ListAgentInstallersResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListCryptoAnalysisResultsConverter.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListCryptoAnalysisResultsConverter.java index 1ff5a43c7bf..18e51053d04 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListCryptoAnalysisResultsConverter.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListCryptoAnalysisResultsConverter.java @@ -56,36 +56,44 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getManagedInstanceId())); } - if (request.getLimit() != null) { + if (request.getHostName() != null) { target = target.queryParam( - "limit", + "hostName", com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( - request.getLimit())); + request.getHostName())); } - if (request.getPage() != null) { + if (request.getNonCompliantFindingCount() != null) { target = target.queryParam( - "page", + "nonCompliantFindingCount", com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( - request.getPage())); + request.getNonCompliantFindingCount())); } - if (request.getSortOrder() != null) { + if (request.getNonCompliantFindingCountGreaterThan() != null) { target = target.queryParam( - "sortOrder", + "nonCompliantFindingCountGreaterThan", com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( - request.getSortOrder().getValue())); + request.getNonCompliantFindingCountGreaterThan())); } - if (request.getSortBy() != null) { + if (request.getFindingCount() != null) { target = target.queryParam( - "sortBy", + "findingCount", com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( - request.getSortBy().getValue())); + request.getFindingCount())); + } + + if (request.getFindingCountGreaterThan() != null) { + target = + target.queryParam( + "findingCountGreaterThan", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getFindingCountGreaterThan())); } if (request.getTimeStart() != null) { @@ -104,6 +112,38 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getTimeEnd())); } + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListJavaMigrationAnalysisResultsConverter.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListJavaMigrationAnalysisResultsConverter.java index 8a53bb08087..be60356b3ff 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListJavaMigrationAnalysisResultsConverter.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListJavaMigrationAnalysisResultsConverter.java @@ -49,6 +49,38 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getManagedInstanceId())); } + if (request.getHostName() != null) { + target = + target.queryParam( + "hostName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getHostName())); + } + + if (request.getApplicationName() != null) { + target = + target.queryParam( + "applicationName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getApplicationName())); + } + + if (request.getTimeStart() != null) { + target = + target.queryParam( + "timeStart", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeStart())); + } + + if (request.getTimeEnd() != null) { + target = + target.queryParam( + "timeEnd", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeEnd())); + } + if (request.getLimit() != null) { target = target.queryParam( @@ -81,22 +113,6 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getSortBy().getValue())); } - if (request.getTimeStart() != null) { - target = - target.queryParam( - "timeStart", - com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( - request.getTimeStart())); - } - - if (request.getTimeEnd() != null) { - target = - target.queryParam( - "timeEnd", - com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( - request.getTimeEnd())); - } - com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListJmsPluginsConverter.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListJmsPluginsConverter.java new file mode 100644 index 00000000000..f3fc9a8655c --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListJmsPluginsConverter.java @@ -0,0 +1,248 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.jms.model.*; +import com.oracle.bmc.jms.requests.*; +import com.oracle.bmc.jms.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class ListJmsPluginsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListJmsPluginsConverter.class); + + public static com.oracle.bmc.jms.requests.ListJmsPluginsRequest interceptRequest( + com.oracle.bmc.jms.requests.ListJmsPluginsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.jms.requests.ListJmsPluginsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20210610").path("jmsPlugins"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getCompartmentIdInSubtree() != null) { + target = + target.queryParam( + "compartmentIdInSubtree", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentIdInSubtree())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getFleetId() != null) { + target = + target.queryParam( + "fleetId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getFleetId())); + } + + if (request.getAgentId() != null) { + target = + target.queryParam( + "agentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAgentId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getAvailabilityStatus() != null) { + target = + target.queryParam( + "availabilityStatus", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAvailabilityStatus().getValue())); + } + + if (request.getTimeRegisteredLessThanOrEqualTo() != null) { + target = + target.queryParam( + "timeRegisteredLessThanOrEqualTo", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeRegisteredLessThanOrEqualTo())); + } + + if (request.getTimeLastSeenLessThanOrEqualTo() != null) { + target = + target.queryParam( + "timeLastSeenLessThanOrEqualTo", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeLastSeenLessThanOrEqualTo())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getHostnameContains() != null) { + target = + target.queryParam( + "hostnameContains", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getHostnameContains())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.jms.responses.ListJmsPluginsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.jms.responses.ListJmsPluginsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.ListJmsPluginsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.ListJmsPluginsResponse>() { + @Override + public com.oracle.bmc.jms.responses.ListJmsPluginsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.jms.responses.ListJmsPluginsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.jms.model + .JmsPluginCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.jms.model.JmsPluginCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.jms.model.JmsPluginCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.jms.model.JmsPluginCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.jms.responses.ListJmsPluginsResponse.Builder + builder = + com.oracle.bmc.jms.responses.ListJmsPluginsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.jmsPluginCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.jms.responses.ListJmsPluginsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListPerformanceTuningAnalysisResultsConverter.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListPerformanceTuningAnalysisResultsConverter.java index eaa6208dc58..3a33aaf8bef 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListPerformanceTuningAnalysisResultsConverter.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListPerformanceTuningAnalysisResultsConverter.java @@ -58,6 +58,30 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getApplicationId())); } + if (request.getHostName() != null) { + target = + target.queryParam( + "hostName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getHostName())); + } + + if (request.getTimeStart() != null) { + target = + target.queryParam( + "timeStart", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeStart())); + } + + if (request.getTimeEnd() != null) { + target = + target.queryParam( + "timeEnd", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeEnd())); + } + if (request.getLimit() != null) { target = target.queryParam( @@ -90,22 +114,6 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getSortBy().getValue())); } - if (request.getTimeStart() != null) { - target = - target.queryParam( - "timeStart", - com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( - request.getTimeStart())); - } - - if (request.getTimeEnd() != null) { - target = - target.queryParam( - "timeEnd", - com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( - request.getTimeEnd())); - } - com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListWorkRequestsConverter.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListWorkRequestsConverter.java index 89064e173b7..1fc7dfea42b 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListWorkRequestsConverter.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/ListWorkRequestsConverter.java @@ -81,6 +81,23 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getManagedInstanceId())); } + if (request.getOperationType() != null) { + target = + target.queryParam( + "operationType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getOperationType().getValue())); + } + + if (request.getStatus() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "status", + request.getStatus(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/RequestDeployedApplicationMigrationAnalysesConverter.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/RequestDeployedApplicationMigrationAnalysesConverter.java new file mode 100644 index 00000000000..14f7665abac --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/RequestDeployedApplicationMigrationAnalysesConverter.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.jms.model.*; +import com.oracle.bmc.jms.requests.*; +import com.oracle.bmc.jms.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class RequestDeployedApplicationMigrationAnalysesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + RequestDeployedApplicationMigrationAnalysesConverter.class); + + public static com.oracle.bmc.jms.requests.RequestDeployedApplicationMigrationAnalysesRequest + interceptRequest( + com.oracle.bmc.jms.requests.RequestDeployedApplicationMigrationAnalysesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.jms.requests.RequestDeployedApplicationMigrationAnalysesRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getFleetId(), "fleetId must not be blank"); + Validate.notNull( + request.getRequestDeployedApplicationMigrationAnalysesDetails(), + "requestDeployedApplicationMigrationAnalysesDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210610") + .path("fleets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getFleetId())) + .path("actions") + .path("requestDeployedApplicationMigrationAnalyses"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses + .RequestDeployedApplicationMigrationAnalysesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses + .RequestDeployedApplicationMigrationAnalysesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses + .RequestDeployedApplicationMigrationAnalysesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses + .RequestDeployedApplicationMigrationAnalysesResponse>() { + @Override + public com.oracle.bmc.jms.responses + .RequestDeployedApplicationMigrationAnalysesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.jms.responses.RequestDeployedApplicationMigrationAnalysesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.jms.responses + .RequestDeployedApplicationMigrationAnalysesResponse + .Builder + builder = + com.oracle.bmc.jms.responses + .RequestDeployedApplicationMigrationAnalysesResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.jms.responses + .RequestDeployedApplicationMigrationAnalysesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/SummarizeLibraryUsageConverter.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/SummarizeLibraryUsageConverter.java index 0d36d923637..9cb5a1d278c 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/SummarizeLibraryUsageConverter.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/SummarizeLibraryUsageConverter.java @@ -89,6 +89,22 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getLibraryName())); } + if (request.getCvssScoreGreaterThan() != null) { + target = + target.queryParam( + "cvssScoreGreaterThan", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCvssScoreGreaterThan())); + } + + if (request.getCvssScoreLessThan() != null) { + target = + target.queryParam( + "cvssScoreLessThan", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCvssScoreLessThan())); + } + if (request.getTimeStart() != null) { target = target.queryParam( diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/UpdateJmsPluginConverter.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/UpdateJmsPluginConverter.java new file mode 100644 index 00000000000..f67057f68f6 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/internal/http/UpdateJmsPluginConverter.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.jms.model.*; +import com.oracle.bmc.jms.requests.*; +import com.oracle.bmc.jms.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class UpdateJmsPluginConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateJmsPluginConverter.class); + + public static com.oracle.bmc.jms.requests.UpdateJmsPluginRequest interceptRequest( + com.oracle.bmc.jms.requests.UpdateJmsPluginRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.jms.requests.UpdateJmsPluginRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getJmsPluginId(), "jmsPluginId must not be blank"); + Validate.notNull(request.getUpdateJmsPluginDetails(), "updateJmsPluginDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210610") + .path("jmsPlugins") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getJmsPluginId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.jms.responses.UpdateJmsPluginResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.jms.responses.UpdateJmsPluginResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.UpdateJmsPluginResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.jms.responses.UpdateJmsPluginResponse>() { + @Override + public com.oracle.bmc.jms.responses.UpdateJmsPluginResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.jms.responses.UpdateJmsPluginResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.jms.model.JmsPlugin>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.jms.model.JmsPlugin.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.jms.model.JmsPlugin.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.jms.model.JmsPlugin> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.jms.responses.UpdateJmsPluginResponse.Builder + builder = + com.oracle.bmc.jms.responses.UpdateJmsPluginResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.jmsPlugin(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.jms.responses.UpdateJmsPluginResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/AgentInstallerCollection.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/AgentInstallerCollection.java new file mode 100644 index 00000000000..67378309d42 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/AgentInstallerCollection.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.model; + +/** + * Collection of the agent installer summary. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AgentInstallerCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AgentInstallerCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public AgentInstallerCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A list of the agent installer summaries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * A list of the agent installer summaries. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AgentInstallerCollection build() { + AgentInstallerCollection model = new AgentInstallerCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AgentInstallerCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A list of the agent installer summaries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * A list of the agent installer summaries. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AgentInstallerCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AgentInstallerCollection)) { + return false; + } + + AgentInstallerCollection other = (AgentInstallerCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/AgentInstallerSortBy.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/AgentInstallerSortBy.java new file mode 100644 index 00000000000..333eb6f0c6f --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/AgentInstallerSortBy.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.model; + +/** + * The field used to sort the installer summary. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public enum AgentInstallerSortBy { + AgentInstallerId("agentInstallerId"), + OsFamily("osFamily"), + PlatformArchitecture("platformArchitecture"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (AgentInstallerSortBy v : AgentInstallerSortBy.values()) { + map.put(v.getValue(), v); + } + } + + AgentInstallerSortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AgentInstallerSortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid AgentInstallerSortBy: " + key); + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/AgentInstallerSummary.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/AgentInstallerSummary.java new file mode 100644 index 00000000000..e5ca12b545b --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/AgentInstallerSummary.java @@ -0,0 +1,524 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.model; + +/** + * Supported agent installer downloads. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AgentInstallerSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AgentInstallerSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "agentInstallerId", + "agentInstallerDescription", + "approximateFileSizeInBytes", + "sha256", + "osFamily", + "platformArchitecture", + "packageType", + "agentVersion", + "javaVersion", + "agentInstallerVersion" + }) + public AgentInstallerSummary( + Long agentInstallerId, + String agentInstallerDescription, + Long approximateFileSizeInBytes, + String sha256, + OsFamily osFamily, + PlatformArchitectureType platformArchitecture, + PackageType packageType, + String agentVersion, + String javaVersion, + String agentInstallerVersion) { + super(); + this.agentInstallerId = agentInstallerId; + this.agentInstallerDescription = agentInstallerDescription; + this.approximateFileSizeInBytes = approximateFileSizeInBytes; + this.sha256 = sha256; + this.osFamily = osFamily; + this.platformArchitecture = platformArchitecture; + this.packageType = packageType; + this.agentVersion = agentVersion; + this.javaVersion = javaVersion; + this.agentInstallerVersion = agentInstallerVersion; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique identifier for the agent installer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentInstallerId") + private Long agentInstallerId; + + /** + * Unique identifier for the agent installer. + * @param agentInstallerId the value to set + * @return this builder + **/ + public Builder agentInstallerId(Long agentInstallerId) { + this.agentInstallerId = agentInstallerId; + this.__explicitlySet__.add("agentInstallerId"); + return this; + } + /** + * Description of the agent installer artifact. The description typically includes the OS, architecture, and agent installer type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentInstallerDescription") + private String agentInstallerDescription; + + /** + * Description of the agent installer artifact. The description typically includes the OS, architecture, and agent installer type. + * @param agentInstallerDescription the value to set + * @return this builder + **/ + public Builder agentInstallerDescription(String agentInstallerDescription) { + this.agentInstallerDescription = agentInstallerDescription; + this.__explicitlySet__.add("agentInstallerDescription"); + return this; + } + /** + * Approximate compressed file size in bytes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approximateFileSizeInBytes") + private Long approximateFileSizeInBytes; + + /** + * Approximate compressed file size in bytes. + * @param approximateFileSizeInBytes the value to set + * @return this builder + **/ + public Builder approximateFileSizeInBytes(Long approximateFileSizeInBytes) { + this.approximateFileSizeInBytes = approximateFileSizeInBytes; + this.__explicitlySet__.add("approximateFileSizeInBytes"); + return this; + } + /** + * SHA256 checksum of the agent installer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sha256") + private String sha256; + + /** + * SHA256 checksum of the agent installer. + * @param sha256 the value to set + * @return this builder + **/ + public Builder sha256(String sha256) { + this.sha256 = sha256; + this.__explicitlySet__.add("sha256"); + return this; + } + /** + * The target operating system family for the agent installer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osFamily") + private OsFamily osFamily; + + /** + * The target operating system family for the agent installer. + * @param osFamily the value to set + * @return this builder + **/ + public Builder osFamily(OsFamily osFamily) { + this.osFamily = osFamily; + this.__explicitlySet__.add("osFamily"); + return this; + } + /** + * The target operating system architecture for the installer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platformArchitecture") + private PlatformArchitectureType platformArchitecture; + + /** + * The target operating system architecture for the installer. + * @param platformArchitecture the value to set + * @return this builder + **/ + public Builder platformArchitecture(PlatformArchitectureType platformArchitecture) { + this.platformArchitecture = platformArchitecture; + this.__explicitlySet__.add("platformArchitecture"); + return this; + } + /** + * The package type (typically the file extension) of the agent software included in the installer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("packageType") + private PackageType packageType; + + /** + * The package type (typically the file extension) of the agent software included in the installer. + * @param packageType the value to set + * @return this builder + **/ + public Builder packageType(PackageType packageType) { + this.packageType = packageType; + this.__explicitlySet__.add("packageType"); + return this; + } + /** + * Agent image version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentVersion") + private String agentVersion; + + /** + * Agent image version. + * @param agentVersion the value to set + * @return this builder + **/ + public Builder agentVersion(String agentVersion) { + this.agentVersion = agentVersion; + this.__explicitlySet__.add("agentVersion"); + return this; + } + /** + * Java version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("javaVersion") + private String javaVersion; + + /** + * Java version. + * @param javaVersion the value to set + * @return this builder + **/ + public Builder javaVersion(String javaVersion) { + this.javaVersion = javaVersion; + this.__explicitlySet__.add("javaVersion"); + return this; + } + /** + * Agent installer version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentInstallerVersion") + private String agentInstallerVersion; + + /** + * Agent installer version. + * @param agentInstallerVersion the value to set + * @return this builder + **/ + public Builder agentInstallerVersion(String agentInstallerVersion) { + this.agentInstallerVersion = agentInstallerVersion; + this.__explicitlySet__.add("agentInstallerVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AgentInstallerSummary build() { + AgentInstallerSummary model = + new AgentInstallerSummary( + this.agentInstallerId, + this.agentInstallerDescription, + this.approximateFileSizeInBytes, + this.sha256, + this.osFamily, + this.platformArchitecture, + this.packageType, + this.agentVersion, + this.javaVersion, + this.agentInstallerVersion); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AgentInstallerSummary model) { + if (model.wasPropertyExplicitlySet("agentInstallerId")) { + this.agentInstallerId(model.getAgentInstallerId()); + } + if (model.wasPropertyExplicitlySet("agentInstallerDescription")) { + this.agentInstallerDescription(model.getAgentInstallerDescription()); + } + if (model.wasPropertyExplicitlySet("approximateFileSizeInBytes")) { + this.approximateFileSizeInBytes(model.getApproximateFileSizeInBytes()); + } + if (model.wasPropertyExplicitlySet("sha256")) { + this.sha256(model.getSha256()); + } + if (model.wasPropertyExplicitlySet("osFamily")) { + this.osFamily(model.getOsFamily()); + } + if (model.wasPropertyExplicitlySet("platformArchitecture")) { + this.platformArchitecture(model.getPlatformArchitecture()); + } + if (model.wasPropertyExplicitlySet("packageType")) { + this.packageType(model.getPackageType()); + } + if (model.wasPropertyExplicitlySet("agentVersion")) { + this.agentVersion(model.getAgentVersion()); + } + if (model.wasPropertyExplicitlySet("javaVersion")) { + this.javaVersion(model.getJavaVersion()); + } + if (model.wasPropertyExplicitlySet("agentInstallerVersion")) { + this.agentInstallerVersion(model.getAgentInstallerVersion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique identifier for the agent installer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentInstallerId") + private final Long agentInstallerId; + + /** + * Unique identifier for the agent installer. + * @return the value + **/ + public Long getAgentInstallerId() { + return agentInstallerId; + } + + /** + * Description of the agent installer artifact. The description typically includes the OS, architecture, and agent installer type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentInstallerDescription") + private final String agentInstallerDescription; + + /** + * Description of the agent installer artifact. The description typically includes the OS, architecture, and agent installer type. + * @return the value + **/ + public String getAgentInstallerDescription() { + return agentInstallerDescription; + } + + /** + * Approximate compressed file size in bytes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approximateFileSizeInBytes") + private final Long approximateFileSizeInBytes; + + /** + * Approximate compressed file size in bytes. + * @return the value + **/ + public Long getApproximateFileSizeInBytes() { + return approximateFileSizeInBytes; + } + + /** + * SHA256 checksum of the agent installer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sha256") + private final String sha256; + + /** + * SHA256 checksum of the agent installer. + * @return the value + **/ + public String getSha256() { + return sha256; + } + + /** + * The target operating system family for the agent installer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osFamily") + private final OsFamily osFamily; + + /** + * The target operating system family for the agent installer. + * @return the value + **/ + public OsFamily getOsFamily() { + return osFamily; + } + + /** + * The target operating system architecture for the installer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platformArchitecture") + private final PlatformArchitectureType platformArchitecture; + + /** + * The target operating system architecture for the installer. + * @return the value + **/ + public PlatformArchitectureType getPlatformArchitecture() { + return platformArchitecture; + } + + /** + * The package type (typically the file extension) of the agent software included in the installer. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("packageType") + private final PackageType packageType; + + /** + * The package type (typically the file extension) of the agent software included in the installer. + * @return the value + **/ + public PackageType getPackageType() { + return packageType; + } + + /** + * Agent image version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentVersion") + private final String agentVersion; + + /** + * Agent image version. + * @return the value + **/ + public String getAgentVersion() { + return agentVersion; + } + + /** + * Java version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("javaVersion") + private final String javaVersion; + + /** + * Java version. + * @return the value + **/ + public String getJavaVersion() { + return javaVersion; + } + + /** + * Agent installer version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentInstallerVersion") + private final String agentInstallerVersion; + + /** + * Agent installer version. + * @return the value + **/ + public String getAgentInstallerVersion() { + return agentInstallerVersion; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AgentInstallerSummary("); + sb.append("super=").append(super.toString()); + sb.append("agentInstallerId=").append(String.valueOf(this.agentInstallerId)); + sb.append(", agentInstallerDescription=") + .append(String.valueOf(this.agentInstallerDescription)); + sb.append(", approximateFileSizeInBytes=") + .append(String.valueOf(this.approximateFileSizeInBytes)); + sb.append(", sha256=").append(String.valueOf(this.sha256)); + sb.append(", osFamily=").append(String.valueOf(this.osFamily)); + sb.append(", platformArchitecture=").append(String.valueOf(this.platformArchitecture)); + sb.append(", packageType=").append(String.valueOf(this.packageType)); + sb.append(", agentVersion=").append(String.valueOf(this.agentVersion)); + sb.append(", javaVersion=").append(String.valueOf(this.javaVersion)); + sb.append(", agentInstallerVersion=").append(String.valueOf(this.agentInstallerVersion)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AgentInstallerSummary)) { + return false; + } + + AgentInstallerSummary other = (AgentInstallerSummary) o; + return java.util.Objects.equals(this.agentInstallerId, other.agentInstallerId) + && java.util.Objects.equals( + this.agentInstallerDescription, other.agentInstallerDescription) + && java.util.Objects.equals( + this.approximateFileSizeInBytes, other.approximateFileSizeInBytes) + && java.util.Objects.equals(this.sha256, other.sha256) + && java.util.Objects.equals(this.osFamily, other.osFamily) + && java.util.Objects.equals(this.platformArchitecture, other.platformArchitecture) + && java.util.Objects.equals(this.packageType, other.packageType) + && java.util.Objects.equals(this.agentVersion, other.agentVersion) + && java.util.Objects.equals(this.javaVersion, other.javaVersion) + && java.util.Objects.equals(this.agentInstallerVersion, other.agentInstallerVersion) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.agentInstallerId == null ? 43 : this.agentInstallerId.hashCode()); + result = + (result * PRIME) + + (this.agentInstallerDescription == null + ? 43 + : this.agentInstallerDescription.hashCode()); + result = + (result * PRIME) + + (this.approximateFileSizeInBytes == null + ? 43 + : this.approximateFileSizeInBytes.hashCode()); + result = (result * PRIME) + (this.sha256 == null ? 43 : this.sha256.hashCode()); + result = (result * PRIME) + (this.osFamily == null ? 43 : this.osFamily.hashCode()); + result = + (result * PRIME) + + (this.platformArchitecture == null + ? 43 + : this.platformArchitecture.hashCode()); + result = (result * PRIME) + (this.packageType == null ? 43 : this.packageType.hashCode()); + result = (result * PRIME) + (this.agentVersion == null ? 43 : this.agentVersion.hashCode()); + result = (result * PRIME) + (this.javaVersion == null ? 43 : this.javaVersion.hashCode()); + result = + (result * PRIME) + + (this.agentInstallerVersion == null + ? 43 + : this.agentInstallerVersion.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ApplicationInstallationSortBy.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ApplicationInstallationSortBy.java index 82220e925f3..6b0af9e48af 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ApplicationInstallationSortBy.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ApplicationInstallationSortBy.java @@ -17,6 +17,7 @@ public enum ApplicationInstallationSortBy { ApproximateJreCount("approximateJreCount"), ApproximateInstallationCount("approximateInstallationCount"), ApproximateManagedInstanceCount("approximateManagedInstanceCount"), + ApproximateLibraryCount("approximateLibraryCount"), ; private final String value; diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ApplicationInstallationUsageSummary.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ApplicationInstallationUsageSummary.java index 0cd0bdcc810..f713c21046d 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ApplicationInstallationUsageSummary.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ApplicationInstallationUsageSummary.java @@ -35,6 +35,8 @@ public final class ApplicationInstallationUsageSummary "approximateInstallationCount", "approximateJreCount", "approximateManagedInstanceCount", + "approximateLibraryCount", + "applicationInvokedBy", "timeStart", "timeEnd", "timeFirstSeen", @@ -51,6 +53,8 @@ public ApplicationInstallationUsageSummary( Integer approximateInstallationCount, Integer approximateJreCount, Integer approximateManagedInstanceCount, + Integer approximateLibraryCount, + String applicationInvokedBy, java.util.Date timeStart, java.util.Date timeEnd, java.util.Date timeFirstSeen, @@ -66,6 +70,8 @@ public ApplicationInstallationUsageSummary( this.approximateInstallationCount = approximateInstallationCount; this.approximateJreCount = approximateJreCount; this.approximateManagedInstanceCount = approximateManagedInstanceCount; + this.approximateLibraryCount = approximateLibraryCount; + this.applicationInvokedBy = applicationInvokedBy; this.timeStart = timeStart; this.timeEnd = timeEnd; this.timeFirstSeen = timeFirstSeen; @@ -244,6 +250,38 @@ public Builder approximateManagedInstanceCount(Integer approximateManagedInstanc this.__explicitlySet__.add("approximateManagedInstanceCount"); return this; } + /** + * The approximate count of libraries in this application. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approximateLibraryCount") + private Integer approximateLibraryCount; + + /** + * The approximate count of libraries in this application. + * @param approximateLibraryCount the value to set + * @return this builder + **/ + public Builder approximateLibraryCount(Integer approximateLibraryCount) { + this.approximateLibraryCount = approximateLibraryCount; + this.__explicitlySet__.add("approximateLibraryCount"); + return this; + } + /** + * Comma separated list of user names that invoked application installations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationInvokedBy") + private String applicationInvokedBy; + + /** + * Comma separated list of user names that invoked application installations. + * @param applicationInvokedBy the value to set + * @return this builder + **/ + public Builder applicationInvokedBy(String applicationInvokedBy) { + this.applicationInvokedBy = applicationInvokedBy; + this.__explicitlySet__.add("applicationInvokedBy"); + return this; + } /** * Lower bound of the specified time period filter. JMS provides a view of the data that is _per day_. The query uses only the date element of the parameter. **/ @@ -341,6 +379,8 @@ public ApplicationInstallationUsageSummary build() { this.approximateInstallationCount, this.approximateJreCount, this.approximateManagedInstanceCount, + this.approximateLibraryCount, + this.applicationInvokedBy, this.timeStart, this.timeEnd, this.timeFirstSeen, @@ -383,6 +423,12 @@ public Builder copy(ApplicationInstallationUsageSummary model) { if (model.wasPropertyExplicitlySet("approximateManagedInstanceCount")) { this.approximateManagedInstanceCount(model.getApproximateManagedInstanceCount()); } + if (model.wasPropertyExplicitlySet("approximateLibraryCount")) { + this.approximateLibraryCount(model.getApproximateLibraryCount()); + } + if (model.wasPropertyExplicitlySet("applicationInvokedBy")) { + this.applicationInvokedBy(model.getApplicationInvokedBy()); + } if (model.wasPropertyExplicitlySet("timeStart")) { this.timeStart(model.getTimeStart()); } @@ -560,6 +606,34 @@ public Integer getApproximateManagedInstanceCount() { return approximateManagedInstanceCount; } + /** + * The approximate count of libraries in this application. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approximateLibraryCount") + private final Integer approximateLibraryCount; + + /** + * The approximate count of libraries in this application. + * @return the value + **/ + public Integer getApproximateLibraryCount() { + return approximateLibraryCount; + } + + /** + * Comma separated list of user names that invoked application installations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationInvokedBy") + private final String applicationInvokedBy; + + /** + * Comma separated list of user names that invoked application installations. + * @return the value + **/ + public String getApplicationInvokedBy() { + return applicationInvokedBy; + } + /** * Lower bound of the specified time period filter. JMS provides a view of the data that is _per day_. The query uses only the date element of the parameter. **/ @@ -659,6 +733,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", approximateJreCount=").append(String.valueOf(this.approximateJreCount)); sb.append(", approximateManagedInstanceCount=") .append(String.valueOf(this.approximateManagedInstanceCount)); + sb.append(", approximateLibraryCount=") + .append(String.valueOf(this.approximateLibraryCount)); + sb.append(", applicationInvokedBy=").append(String.valueOf(this.applicationInvokedBy)); sb.append(", timeStart=").append(String.valueOf(this.timeStart)); sb.append(", timeEnd=").append(String.valueOf(this.timeEnd)); sb.append(", timeFirstSeen=").append(String.valueOf(this.timeFirstSeen)); @@ -690,6 +767,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.approximateJreCount, other.approximateJreCount) && java.util.Objects.equals( this.approximateManagedInstanceCount, other.approximateManagedInstanceCount) + && java.util.Objects.equals( + this.approximateLibraryCount, other.approximateLibraryCount) + && java.util.Objects.equals(this.applicationInvokedBy, other.applicationInvokedBy) && java.util.Objects.equals(this.timeStart, other.timeStart) && java.util.Objects.equals(this.timeEnd, other.timeEnd) && java.util.Objects.equals(this.timeFirstSeen, other.timeFirstSeen) @@ -737,6 +817,16 @@ public int hashCode() { + (this.approximateManagedInstanceCount == null ? 43 : this.approximateManagedInstanceCount.hashCode()); + result = + (result * PRIME) + + (this.approximateLibraryCount == null + ? 43 + : this.approximateLibraryCount.hashCode()); + result = + (result * PRIME) + + (this.applicationInvokedBy == null + ? 43 + : this.applicationInvokedBy.hashCode()); result = (result * PRIME) + (this.timeStart == null ? 43 : this.timeStart.hashCode()); result = (result * PRIME) + (this.timeEnd == null ? 43 : this.timeEnd.hashCode()); result = diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ApplicationSortBy.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ApplicationSortBy.java index 6f9a4ff11bf..702269bbae3 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ApplicationSortBy.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ApplicationSortBy.java @@ -15,6 +15,7 @@ public enum ApplicationSortBy { ApproximateJreCount("approximateJreCount"), ApproximateInstallationCount("approximateInstallationCount"), ApproximateManagedInstanceCount("approximateManagedInstanceCount"), + ApproximateLibraryCount("approximateLibraryCount"), OsName("osName"), ; diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ApplicationUsage.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ApplicationUsage.java index c7731da6c68..ff446c1854a 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ApplicationUsage.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ApplicationUsage.java @@ -30,6 +30,7 @@ public final class ApplicationUsage extends com.oracle.bmc.http.internal.Explici "approximateInstallationCount", "approximateJreCount", "approximateManagedInstanceCount", + "approximateLibraryCount", "timeStart", "timeEnd", "timeFirstSeen", @@ -43,6 +44,7 @@ public ApplicationUsage( Integer approximateInstallationCount, Integer approximateJreCount, Integer approximateManagedInstanceCount, + Integer approximateLibraryCount, java.util.Date timeStart, java.util.Date timeEnd, java.util.Date timeFirstSeen, @@ -55,6 +57,7 @@ public ApplicationUsage( this.approximateInstallationCount = approximateInstallationCount; this.approximateJreCount = approximateJreCount; this.approximateManagedInstanceCount = approximateManagedInstanceCount; + this.approximateLibraryCount = approximateLibraryCount; this.timeStart = timeStart; this.timeEnd = timeEnd; this.timeFirstSeen = timeFirstSeen; @@ -64,14 +67,14 @@ public ApplicationUsage( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * An internal identifier for the application that is unique to a Fleet. + * An internal identifier for the application that is unique to a fleet. * **/ @com.fasterxml.jackson.annotation.JsonProperty("applicationId") private String applicationId; /** - * An internal identifier for the application that is unique to a Fleet. + * An internal identifier for the application that is unique to a fleet. * * @param applicationId the value to set * @return this builder @@ -98,13 +101,13 @@ public Builder displayName(String displayName) { return this; } /** - * The type of the application, denoted by how the application was started. + * The type of the application denoted by how the application was started. **/ @com.fasterxml.jackson.annotation.JsonProperty("applicationType") private String applicationType; /** - * The type of the application, denoted by how the application was started. + * The type of the application denoted by how the application was started. * @param applicationType the value to set * @return this builder **/ @@ -177,6 +180,24 @@ public Builder approximateManagedInstanceCount(Integer approximateManagedInstanc this.__explicitlySet__.add("approximateManagedInstanceCount"); return this; } + /** + * The approximate count of libraries in this application. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approximateLibraryCount") + private Integer approximateLibraryCount; + + /** + * The approximate count of libraries in this application. + * + * @param approximateLibraryCount the value to set + * @return this builder + **/ + public Builder approximateLibraryCount(Integer approximateLibraryCount) { + this.approximateLibraryCount = approximateLibraryCount; + this.__explicitlySet__.add("approximateLibraryCount"); + return this; + } /** * Lower bound of the specified time period filter. JMS provides a view of the data that is _per day_. The query uses only the date element of the parameter. **/ @@ -271,6 +292,7 @@ public ApplicationUsage build() { this.approximateInstallationCount, this.approximateJreCount, this.approximateManagedInstanceCount, + this.approximateLibraryCount, this.timeStart, this.timeEnd, this.timeFirstSeen, @@ -304,6 +326,9 @@ public Builder copy(ApplicationUsage model) { if (model.wasPropertyExplicitlySet("approximateManagedInstanceCount")) { this.approximateManagedInstanceCount(model.getApproximateManagedInstanceCount()); } + if (model.wasPropertyExplicitlySet("approximateLibraryCount")) { + this.approximateLibraryCount(model.getApproximateLibraryCount()); + } if (model.wasPropertyExplicitlySet("timeStart")) { this.timeStart(model.getTimeStart()); } @@ -332,14 +357,14 @@ public Builder toBuilder() { } /** - * An internal identifier for the application that is unique to a Fleet. + * An internal identifier for the application that is unique to a fleet. * **/ @com.fasterxml.jackson.annotation.JsonProperty("applicationId") private final String applicationId; /** - * An internal identifier for the application that is unique to a Fleet. + * An internal identifier for the application that is unique to a fleet. * * @return the value **/ @@ -362,13 +387,13 @@ public String getDisplayName() { } /** - * The type of the application, denoted by how the application was started. + * The type of the application denoted by how the application was started. **/ @com.fasterxml.jackson.annotation.JsonProperty("applicationType") private final String applicationType; /** - * The type of the application, denoted by how the application was started. + * The type of the application denoted by how the application was started. * @return the value **/ public String getApplicationType() { @@ -431,6 +456,22 @@ public Integer getApproximateManagedInstanceCount() { return approximateManagedInstanceCount; } + /** + * The approximate count of libraries in this application. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approximateLibraryCount") + private final Integer approximateLibraryCount; + + /** + * The approximate count of libraries in this application. + * + * @return the value + **/ + public Integer getApproximateLibraryCount() { + return approximateLibraryCount; + } + /** * Lower bound of the specified time period filter. JMS provides a view of the data that is _per day_. The query uses only the date element of the parameter. **/ @@ -526,6 +567,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", approximateJreCount=").append(String.valueOf(this.approximateJreCount)); sb.append(", approximateManagedInstanceCount=") .append(String.valueOf(this.approximateManagedInstanceCount)); + sb.append(", approximateLibraryCount=") + .append(String.valueOf(this.approximateLibraryCount)); sb.append(", timeStart=").append(String.valueOf(this.timeStart)); sb.append(", timeEnd=").append(String.valueOf(this.timeEnd)); sb.append(", timeFirstSeen=").append(String.valueOf(this.timeFirstSeen)); @@ -553,6 +596,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.approximateJreCount, other.approximateJreCount) && java.util.Objects.equals( this.approximateManagedInstanceCount, other.approximateManagedInstanceCount) + && java.util.Objects.equals( + this.approximateLibraryCount, other.approximateLibraryCount) && java.util.Objects.equals(this.timeStart, other.timeStart) && java.util.Objects.equals(this.timeEnd, other.timeEnd) && java.util.Objects.equals(this.timeFirstSeen, other.timeFirstSeen) @@ -589,6 +634,11 @@ public int hashCode() { + (this.approximateManagedInstanceCount == null ? 43 : this.approximateManagedInstanceCount.hashCode()); + result = + (result * PRIME) + + (this.approximateLibraryCount == null + ? 43 + : this.approximateLibraryCount.hashCode()); result = (result * PRIME) + (this.timeStart == null ? 43 : this.timeStart.hashCode()); result = (result * PRIME) + (this.timeEnd == null ? 43 : this.timeEnd.hashCode()); result = diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/CreateJmsPluginDetails.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/CreateJmsPluginDetails.java new file mode 100644 index 00000000000..a7661871241 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/CreateJmsPluginDetails.java @@ -0,0 +1,324 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.model; + +/** + * The details for creating a JmsPlugin. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateJmsPluginDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateJmsPluginDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "agentId", + "compartmentId", + "fleetId", + "definedTags", + "freeformTags" + }) + public CreateJmsPluginDetails( + String agentId, + String compartmentId, + String fleetId, + java.util.Map> definedTags, + java.util.Map freeformTags) { + super(); + this.agentId = agentId; + this.compartmentId = compartmentId; + this.fleetId = fleetId; + this.definedTags = definedTags; + this.freeformTags = freeformTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Management Agent (OMA) or the Oracle Cloud Agent (OCA) instance where the JMS plugin is deployed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentId") + private String agentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Management Agent (OMA) or the Oracle Cloud Agent (OCA) instance where the JMS plugin is deployed. + * @param agentId the value to set + * @return this builder + **/ + public Builder agentId(String agentId) { + this.agentId = agentId; + this.__explicitlySet__.add("agentId"); + return this; + } + /** + * The OMA/OCA agent's compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OMA/OCA agent's compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetId") + private String fleetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + * + * @param fleetId the value to set + * @return this builder + **/ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + this.__explicitlySet__.add("fleetId"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}}. (See [Understanding Free-form Tags](https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}}. (See [Understanding Free-form Tags](https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. (See [Managing Tags and Tag Namespaces](https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. (See [Managing Tags and Tag Namespaces](https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateJmsPluginDetails build() { + CreateJmsPluginDetails model = + new CreateJmsPluginDetails( + this.agentId, + this.compartmentId, + this.fleetId, + this.definedTags, + this.freeformTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateJmsPluginDetails model) { + if (model.wasPropertyExplicitlySet("agentId")) { + this.agentId(model.getAgentId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("fleetId")) { + this.fleetId(model.getFleetId()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Management Agent (OMA) or the Oracle Cloud Agent (OCA) instance where the JMS plugin is deployed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentId") + private final String agentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Management Agent (OMA) or the Oracle Cloud Agent (OCA) instance where the JMS plugin is deployed. + * @return the value + **/ + public String getAgentId() { + return agentId; + } + + /** + * The OMA/OCA agent's compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OMA/OCA agent's compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetId") + private final String fleetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + * + * @return the value + **/ + public String getFleetId() { + return fleetId; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}}. (See [Understanding Free-form Tags](https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}}. (See [Understanding Free-form Tags](https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. (See [Managing Tags and Tag Namespaces](https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. (See [Managing Tags and Tag Namespaces](https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateJmsPluginDetails("); + sb.append("super=").append(super.toString()); + sb.append("agentId=").append(String.valueOf(this.agentId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", fleetId=").append(String.valueOf(this.fleetId)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateJmsPluginDetails)) { + return false; + } + + CreateJmsPluginDetails other = (CreateJmsPluginDetails) o; + return java.util.Objects.equals(this.agentId, other.agentId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.agentId == null ? 43 : this.agentId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/CryptoAnalysisResult.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/CryptoAnalysisResult.java index 9d2d85e481d..8f0df45c93c 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/CryptoAnalysisResult.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/CryptoAnalysisResult.java @@ -35,6 +35,8 @@ public final class CryptoAnalysisResult extends com.oracle.bmc.http.internal.Exp "findingCount", "nonCompliantFindingCount", "timeCreated", + "timeStarted", + "timeFinished", "cryptoRoadmapVersion", "namespace", "bucketName", @@ -54,6 +56,8 @@ public CryptoAnalysisResult( Integer findingCount, Integer nonCompliantFindingCount, java.util.Date timeCreated, + java.util.Date timeStarted, + java.util.Date timeFinished, String cryptoRoadmapVersion, String namespace, String bucketName, @@ -72,6 +76,8 @@ public CryptoAnalysisResult( this.findingCount = findingCount; this.nonCompliantFindingCount = nonCompliantFindingCount; this.timeCreated = timeCreated; + this.timeStarted = timeStarted; + this.timeFinished = timeFinished; this.cryptoRoadmapVersion = cryptoRoadmapVersion; this.namespace = namespace; this.bucketName = bucketName; @@ -294,6 +300,38 @@ public Builder timeCreated(java.util.Date timeCreated) { this.__explicitlySet__.add("timeCreated"); return this; } + /** + * The time the JFR recording has started. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The time the JFR recording has started. + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The time the JFR recording has finished. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + /** + * The time the JFR recording has finished. + * @param timeFinished the value to set + * @return this builder + **/ + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } /** * The Crypto Roadmap version used to perform the analysis. **/ @@ -378,6 +416,8 @@ public CryptoAnalysisResult build() { this.findingCount, this.nonCompliantFindingCount, this.timeCreated, + this.timeStarted, + this.timeFinished, this.cryptoRoadmapVersion, this.namespace, this.bucketName, @@ -429,6 +469,12 @@ public Builder copy(CryptoAnalysisResult model) { if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } if (model.wasPropertyExplicitlySet("cryptoRoadmapVersion")) { this.cryptoRoadmapVersion(model.getCryptoRoadmapVersion()); } @@ -644,6 +690,34 @@ public java.util.Date getTimeCreated() { return timeCreated; } + /** + * The time the JFR recording has started. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The time the JFR recording has started. + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The time the JFR recording has finished. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private final java.util.Date timeFinished; + + /** + * The time the JFR recording has finished. + * @return the value + **/ + public java.util.Date getTimeFinished() { + return timeFinished; + } + /** * The Crypto Roadmap version used to perform the analysis. **/ @@ -728,6 +802,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", nonCompliantFindingCount=") .append(String.valueOf(this.nonCompliantFindingCount)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); sb.append(", cryptoRoadmapVersion=").append(String.valueOf(this.cryptoRoadmapVersion)); sb.append(", namespace=").append(String.valueOf(this.namespace)); sb.append(", bucketName=").append(String.valueOf(this.bucketName)); @@ -760,6 +836,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.nonCompliantFindingCount, other.nonCompliantFindingCount) && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeFinished, other.timeFinished) && java.util.Objects.equals(this.cryptoRoadmapVersion, other.cryptoRoadmapVersion) && java.util.Objects.equals(this.namespace, other.namespace) && java.util.Objects.equals(this.bucketName, other.bucketName) @@ -804,6 +882,8 @@ public int hashCode() { ? 43 : this.nonCompliantFindingCount.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); result = (result * PRIME) + (this.cryptoRoadmapVersion == null diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/CryptoAnalysisResultSummary.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/CryptoAnalysisResultSummary.java index bbbf3eaf3fa..ce983825bd2 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/CryptoAnalysisResultSummary.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/CryptoAnalysisResultSummary.java @@ -36,6 +36,8 @@ public final class CryptoAnalysisResultSummary "findingCount", "nonCompliantFindingCount", "timeCreated", + "timeStarted", + "timeFinished", "cryptoRoadmapVersion", "namespace", "bucketName", @@ -55,6 +57,8 @@ public CryptoAnalysisResultSummary( Integer findingCount, Integer nonCompliantFindingCount, java.util.Date timeCreated, + java.util.Date timeStarted, + java.util.Date timeFinished, String cryptoRoadmapVersion, String namespace, String bucketName, @@ -73,6 +77,8 @@ public CryptoAnalysisResultSummary( this.findingCount = findingCount; this.nonCompliantFindingCount = nonCompliantFindingCount; this.timeCreated = timeCreated; + this.timeStarted = timeStarted; + this.timeFinished = timeFinished; this.cryptoRoadmapVersion = cryptoRoadmapVersion; this.namespace = namespace; this.bucketName = bucketName; @@ -295,6 +301,38 @@ public Builder timeCreated(java.util.Date timeCreated) { this.__explicitlySet__.add("timeCreated"); return this; } + /** + * The time the JFR recording has started. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The time the JFR recording has started. + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The time the JFR recording has finished. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + /** + * The time the JFR recording has finished. + * @param timeFinished the value to set + * @return this builder + **/ + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } /** * The Crypto Roadmap version used to perform the analysis. **/ @@ -379,6 +417,8 @@ public CryptoAnalysisResultSummary build() { this.findingCount, this.nonCompliantFindingCount, this.timeCreated, + this.timeStarted, + this.timeFinished, this.cryptoRoadmapVersion, this.namespace, this.bucketName, @@ -430,6 +470,12 @@ public Builder copy(CryptoAnalysisResultSummary model) { if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } if (model.wasPropertyExplicitlySet("cryptoRoadmapVersion")) { this.cryptoRoadmapVersion(model.getCryptoRoadmapVersion()); } @@ -645,6 +691,34 @@ public java.util.Date getTimeCreated() { return timeCreated; } + /** + * The time the JFR recording has started. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The time the JFR recording has started. + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The time the JFR recording has finished. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private final java.util.Date timeFinished; + + /** + * The time the JFR recording has finished. + * @return the value + **/ + public java.util.Date getTimeFinished() { + return timeFinished; + } + /** * The Crypto Roadmap version used to perform the analysis. **/ @@ -729,6 +803,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", nonCompliantFindingCount=") .append(String.valueOf(this.nonCompliantFindingCount)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); sb.append(", cryptoRoadmapVersion=").append(String.valueOf(this.cryptoRoadmapVersion)); sb.append(", namespace=").append(String.valueOf(this.namespace)); sb.append(", bucketName=").append(String.valueOf(this.bucketName)); @@ -761,6 +837,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.nonCompliantFindingCount, other.nonCompliantFindingCount) && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeFinished, other.timeFinished) && java.util.Objects.equals(this.cryptoRoadmapVersion, other.cryptoRoadmapVersion) && java.util.Objects.equals(this.namespace, other.namespace) && java.util.Objects.equals(this.bucketName, other.bucketName) @@ -805,6 +883,8 @@ public int hashCode() { ? 43 : this.nonCompliantFindingCount.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); result = (result * PRIME) + (this.cryptoRoadmapVersion == null diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationInstallationSortBy.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationInstallationSortBy.java index b6772107e67..18731166fc2 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationInstallationSortBy.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationInstallationSortBy.java @@ -15,6 +15,8 @@ public enum DeployedApplicationInstallationSortBy { ApplicationSourcePath("applicationSourcePath"), IsClustered("isClustered"), JavaServerInstanceCount("javaServerInstanceCount"), + ApproximateJavaServerInstanceCount("approximateJavaServerInstanceCount"), + ApproximateLibraryCount("approximateLibraryCount"), TimeFirstSeen("timeFirstSeen"), TimeLastSeen("timeLastSeen"), ; diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationInstallationUsageSummary.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationInstallationUsageSummary.java index dd80421cb5a..f6879924126 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationInstallationUsageSummary.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationInstallationUsageSummary.java @@ -5,7 +5,7 @@ package com.oracle.bmc.jms.model; /** - * Summarize usage information about an application deployed on Java servers including installation information during a specified time period. The main difference between DeployedApplicationInstallationUsageSummary and DeployedApplicationUsage is the presence of the applicationSourcePath. DeployedApplicationUsage provides only an aggregated view to the deployed applications without installation information. It therefore doesn\u2019t distinguish between applications with the identical deployment information deployed to different paths. DeployedApplicationInstallationUsageSummary contains installation information, and it\u2019s therefore possible to target actions. + * Summarize usage information about an application deployed on Java servers including installation information during a specified time period. The main difference between DeployedApplicationInstallationUsageSummary and DeployedApplicationUsage is the presence of the applicationSourcePath. DeployedApplicationUsage provides only an aggregated view to the deployed applications without installation information. DeployedApplicationUsage does not distinguish between applications with the identical deployment information deployed to different paths. DeployedApplicationInstallationUsageSummary contains installation information used to select target actions. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -32,6 +32,7 @@ public final class DeployedApplicationInstallationUsageSummary "applicationSourcePath", "isClustered", "approximateJavaServerInstanceCount", + "approximateLibraryCount", "timeStart", "timeEnd", "timeFirstSeen", @@ -46,6 +47,7 @@ public DeployedApplicationInstallationUsageSummary( String applicationSourcePath, Boolean isClustered, Integer approximateJavaServerInstanceCount, + Integer approximateLibraryCount, java.util.Date timeStart, java.util.Date timeEnd, java.util.Date timeFirstSeen, @@ -59,6 +61,7 @@ public DeployedApplicationInstallationUsageSummary( this.applicationSourcePath = applicationSourcePath; this.isClustered = isClustered; this.approximateJavaServerInstanceCount = approximateJavaServerInstanceCount; + this.approximateLibraryCount = approximateLibraryCount; this.timeStart = timeStart; this.timeEnd = timeEnd; this.timeFirstSeen = timeFirstSeen; @@ -214,6 +217,24 @@ public Builder approximateJavaServerInstanceCount( this.__explicitlySet__.add("approximateJavaServerInstanceCount"); return this; } + /** + * The approximate count of libraries in the deployed application. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approximateLibraryCount") + private Integer approximateLibraryCount; + + /** + * The approximate count of libraries in the deployed application. + * + * @param approximateLibraryCount the value to set + * @return this builder + **/ + public Builder approximateLibraryCount(Integer approximateLibraryCount) { + this.approximateLibraryCount = approximateLibraryCount; + this.__explicitlySet__.add("approximateLibraryCount"); + return this; + } /** * Lower bound of the specified time period filter. JMS provides a view of the data that is _per day_. The query uses only the date element of the parameter. **/ @@ -309,6 +330,7 @@ public DeployedApplicationInstallationUsageSummary build() { this.applicationSourcePath, this.isClustered, this.approximateJavaServerInstanceCount, + this.approximateLibraryCount, this.timeStart, this.timeEnd, this.timeFirstSeen, @@ -346,6 +368,9 @@ public Builder copy(DeployedApplicationInstallationUsageSummary model) { this.approximateJavaServerInstanceCount( model.getApproximateJavaServerInstanceCount()); } + if (model.wasPropertyExplicitlySet("approximateLibraryCount")) { + this.approximateLibraryCount(model.getApproximateLibraryCount()); + } if (model.wasPropertyExplicitlySet("timeStart")) { this.timeStart(model.getTimeStart()); } @@ -503,6 +528,22 @@ public Integer getApproximateJavaServerInstanceCount() { return approximateJavaServerInstanceCount; } + /** + * The approximate count of libraries in the deployed application. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approximateLibraryCount") + private final Integer approximateLibraryCount; + + /** + * The approximate count of libraries in the deployed application. + * + * @return the value + **/ + public Integer getApproximateLibraryCount() { + return approximateLibraryCount; + } + /** * Lower bound of the specified time period filter. JMS provides a view of the data that is _per day_. The query uses only the date element of the parameter. **/ @@ -599,6 +640,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isClustered=").append(String.valueOf(this.isClustered)); sb.append(", approximateJavaServerInstanceCount=") .append(String.valueOf(this.approximateJavaServerInstanceCount)); + sb.append(", approximateLibraryCount=") + .append(String.valueOf(this.approximateLibraryCount)); sb.append(", timeStart=").append(String.valueOf(this.timeStart)); sb.append(", timeEnd=").append(String.valueOf(this.timeEnd)); sb.append(", timeFirstSeen=").append(String.valueOf(this.timeFirstSeen)); @@ -629,6 +672,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.approximateJavaServerInstanceCount, other.approximateJavaServerInstanceCount) + && java.util.Objects.equals( + this.approximateLibraryCount, other.approximateLibraryCount) && java.util.Objects.equals(this.timeStart, other.timeStart) && java.util.Objects.equals(this.timeEnd, other.timeEnd) && java.util.Objects.equals(this.timeFirstSeen, other.timeFirstSeen) @@ -666,6 +711,11 @@ public int hashCode() { + (this.approximateJavaServerInstanceCount == null ? 43 : this.approximateJavaServerInstanceCount.hashCode()); + result = + (result * PRIME) + + (this.approximateLibraryCount == null + ? 43 + : this.approximateLibraryCount.hashCode()); result = (result * PRIME) + (this.timeStart == null ? 43 : this.timeStart.hashCode()); result = (result * PRIME) + (this.timeEnd == null ? 43 : this.timeEnd.hashCode()); result = diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationMigrationAnalysesTarget.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationMigrationAnalysesTarget.java new file mode 100644 index 00000000000..a3c76547447 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationMigrationAnalysesTarget.java @@ -0,0 +1,324 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.model; + +/** + * The target describes the input data for deployed Java migration analyses. + * A target contains a managed instance, deployed application installation Key, sourceJdkVersion, targetJdkVersion and optional excludePackagePrefixes. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DeployedApplicationMigrationAnalysesTarget.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DeployedApplicationMigrationAnalysesTarget + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "managedInstanceId", + "deployedApplicationInstallationKey", + "sourceJdkVersion", + "targetJdkVersion", + "excludePackagePrefixes" + }) + public DeployedApplicationMigrationAnalysesTarget( + String managedInstanceId, + String deployedApplicationInstallationKey, + String sourceJdkVersion, + String targetJdkVersion, + java.util.List excludePackagePrefixes) { + super(); + this.managedInstanceId = managedInstanceId; + this.deployedApplicationInstallationKey = deployedApplicationInstallationKey; + this.sourceJdkVersion = sourceJdkVersion; + this.targetJdkVersion = targetJdkVersion; + this.excludePackagePrefixes = excludePackagePrefixes; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the managed instance that hosts the application for which the Java migration analyses was performed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managedInstanceId") + private String managedInstanceId; + + /** + * The OCID of the managed instance that hosts the application for which the Java migration analyses was performed. + * @param managedInstanceId the value to set + * @return this builder + **/ + public Builder managedInstanceId(String managedInstanceId) { + this.managedInstanceId = managedInstanceId; + this.__explicitlySet__.add("managedInstanceId"); + return this; + } + /** + * The unique key that identifies the deployed application's installation path that is to be used for the Java migration analyses. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deployedApplicationInstallationKey") + private String deployedApplicationInstallationKey; + + /** + * The unique key that identifies the deployed application's installation path that is to be used for the Java migration analyses. + * @param deployedApplicationInstallationKey the value to set + * @return this builder + **/ + public Builder deployedApplicationInstallationKey( + String deployedApplicationInstallationKey) { + this.deployedApplicationInstallationKey = deployedApplicationInstallationKey; + this.__explicitlySet__.add("deployedApplicationInstallationKey"); + return this; + } + /** + * The JDK version the application is currently running on. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceJdkVersion") + private String sourceJdkVersion; + + /** + * The JDK version the application is currently running on. + * @param sourceJdkVersion the value to set + * @return this builder + **/ + public Builder sourceJdkVersion(String sourceJdkVersion) { + this.sourceJdkVersion = sourceJdkVersion; + this.__explicitlySet__.add("sourceJdkVersion"); + return this; + } + /** + * The JDK version against which the migration analyses was performed to identify effort required to move from source JDK. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetJdkVersion") + private String targetJdkVersion; + + /** + * The JDK version against which the migration analyses was performed to identify effort required to move from source JDK. + * @param targetJdkVersion the value to set + * @return this builder + **/ + public Builder targetJdkVersion(String targetJdkVersion) { + this.targetJdkVersion = targetJdkVersion; + this.__explicitlySet__.add("targetJdkVersion"); + return this; + } + /** + * Excludes the packages that starts with the prefix from the migration analyses result. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("excludePackagePrefixes") + private java.util.List excludePackagePrefixes; + + /** + * Excludes the packages that starts with the prefix from the migration analyses result. + * @param excludePackagePrefixes the value to set + * @return this builder + **/ + public Builder excludePackagePrefixes(java.util.List excludePackagePrefixes) { + this.excludePackagePrefixes = excludePackagePrefixes; + this.__explicitlySet__.add("excludePackagePrefixes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DeployedApplicationMigrationAnalysesTarget build() { + DeployedApplicationMigrationAnalysesTarget model = + new DeployedApplicationMigrationAnalysesTarget( + this.managedInstanceId, + this.deployedApplicationInstallationKey, + this.sourceJdkVersion, + this.targetJdkVersion, + this.excludePackagePrefixes); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DeployedApplicationMigrationAnalysesTarget model) { + if (model.wasPropertyExplicitlySet("managedInstanceId")) { + this.managedInstanceId(model.getManagedInstanceId()); + } + if (model.wasPropertyExplicitlySet("deployedApplicationInstallationKey")) { + this.deployedApplicationInstallationKey( + model.getDeployedApplicationInstallationKey()); + } + if (model.wasPropertyExplicitlySet("sourceJdkVersion")) { + this.sourceJdkVersion(model.getSourceJdkVersion()); + } + if (model.wasPropertyExplicitlySet("targetJdkVersion")) { + this.targetJdkVersion(model.getTargetJdkVersion()); + } + if (model.wasPropertyExplicitlySet("excludePackagePrefixes")) { + this.excludePackagePrefixes(model.getExcludePackagePrefixes()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the managed instance that hosts the application for which the Java migration analyses was performed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managedInstanceId") + private final String managedInstanceId; + + /** + * The OCID of the managed instance that hosts the application for which the Java migration analyses was performed. + * @return the value + **/ + public String getManagedInstanceId() { + return managedInstanceId; + } + + /** + * The unique key that identifies the deployed application's installation path that is to be used for the Java migration analyses. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deployedApplicationInstallationKey") + private final String deployedApplicationInstallationKey; + + /** + * The unique key that identifies the deployed application's installation path that is to be used for the Java migration analyses. + * @return the value + **/ + public String getDeployedApplicationInstallationKey() { + return deployedApplicationInstallationKey; + } + + /** + * The JDK version the application is currently running on. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceJdkVersion") + private final String sourceJdkVersion; + + /** + * The JDK version the application is currently running on. + * @return the value + **/ + public String getSourceJdkVersion() { + return sourceJdkVersion; + } + + /** + * The JDK version against which the migration analyses was performed to identify effort required to move from source JDK. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetJdkVersion") + private final String targetJdkVersion; + + /** + * The JDK version against which the migration analyses was performed to identify effort required to move from source JDK. + * @return the value + **/ + public String getTargetJdkVersion() { + return targetJdkVersion; + } + + /** + * Excludes the packages that starts with the prefix from the migration analyses result. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("excludePackagePrefixes") + private final java.util.List excludePackagePrefixes; + + /** + * Excludes the packages that starts with the prefix from the migration analyses result. + * @return the value + **/ + public java.util.List getExcludePackagePrefixes() { + return excludePackagePrefixes; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DeployedApplicationMigrationAnalysesTarget("); + sb.append("super=").append(super.toString()); + sb.append("managedInstanceId=").append(String.valueOf(this.managedInstanceId)); + sb.append(", deployedApplicationInstallationKey=") + .append(String.valueOf(this.deployedApplicationInstallationKey)); + sb.append(", sourceJdkVersion=").append(String.valueOf(this.sourceJdkVersion)); + sb.append(", targetJdkVersion=").append(String.valueOf(this.targetJdkVersion)); + sb.append(", excludePackagePrefixes=").append(String.valueOf(this.excludePackagePrefixes)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeployedApplicationMigrationAnalysesTarget)) { + return false; + } + + DeployedApplicationMigrationAnalysesTarget other = + (DeployedApplicationMigrationAnalysesTarget) o; + return java.util.Objects.equals(this.managedInstanceId, other.managedInstanceId) + && java.util.Objects.equals( + this.deployedApplicationInstallationKey, + other.deployedApplicationInstallationKey) + && java.util.Objects.equals(this.sourceJdkVersion, other.sourceJdkVersion) + && java.util.Objects.equals(this.targetJdkVersion, other.targetJdkVersion) + && java.util.Objects.equals( + this.excludePackagePrefixes, other.excludePackagePrefixes) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.managedInstanceId == null ? 43 : this.managedInstanceId.hashCode()); + result = + (result * PRIME) + + (this.deployedApplicationInstallationKey == null + ? 43 + : this.deployedApplicationInstallationKey.hashCode()); + result = + (result * PRIME) + + (this.sourceJdkVersion == null ? 43 : this.sourceJdkVersion.hashCode()); + result = + (result * PRIME) + + (this.targetJdkVersion == null ? 43 : this.targetJdkVersion.hashCode()); + result = + (result * PRIME) + + (this.excludePackagePrefixes == null + ? 43 + : this.excludePackagePrefixes.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationSortBy.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationSortBy.java index 250b73708fc..4a4a9679d87 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationSortBy.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationSortBy.java @@ -14,6 +14,8 @@ public enum DeployedApplicationSortBy { ApplicationType("applicationType"), IsClustered("isClustered"), JavaServerInstanceCount("javaServerInstanceCount"), + ApproximateJavaServerInstanceCount("approximateJavaServerInstanceCount"), + ApproximateLibraryCount("approximateLibraryCount"), TimeFirstSeen("timeFirstSeen"), TimeLastSeen("timeLastSeen"), ; diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationUsage.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationUsage.java index f96250d3984..fb0f3e79e7a 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationUsage.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationUsage.java @@ -30,6 +30,7 @@ public final class DeployedApplicationUsage "applicationType", "isClustered", "approximateJavaServerInstanceCount", + "approximateLibraryCount", "timeStart", "timeEnd", "timeFirstSeen", @@ -42,6 +43,7 @@ public DeployedApplicationUsage( String applicationType, Boolean isClustered, Integer approximateJavaServerInstanceCount, + Integer approximateLibraryCount, java.util.Date timeStart, java.util.Date timeEnd, java.util.Date timeFirstSeen, @@ -53,6 +55,7 @@ public DeployedApplicationUsage( this.applicationType = applicationType; this.isClustered = isClustered; this.approximateJavaServerInstanceCount = approximateJavaServerInstanceCount; + this.approximateLibraryCount = approximateLibraryCount; this.timeStart = timeStart; this.timeEnd = timeEnd; this.timeFirstSeen = timeFirstSeen; @@ -170,6 +173,24 @@ public Builder approximateJavaServerInstanceCount( this.__explicitlySet__.add("approximateJavaServerInstanceCount"); return this; } + /** + * The approximate count of libraries in the deployed application. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approximateLibraryCount") + private Integer approximateLibraryCount; + + /** + * The approximate count of libraries in the deployed application. + * + * @param approximateLibraryCount the value to set + * @return this builder + **/ + public Builder approximateLibraryCount(Integer approximateLibraryCount) { + this.approximateLibraryCount = approximateLibraryCount; + this.__explicitlySet__.add("approximateLibraryCount"); + return this; + } /** * Lower bound of the specified time period filter. JMS provides a view of the data that is _per day_. The query uses only the date element of the parameter. **/ @@ -263,6 +284,7 @@ public DeployedApplicationUsage build() { this.applicationType, this.isClustered, this.approximateJavaServerInstanceCount, + this.approximateLibraryCount, this.timeStart, this.timeEnd, this.timeFirstSeen, @@ -294,6 +316,9 @@ public Builder copy(DeployedApplicationUsage model) { this.approximateJavaServerInstanceCount( model.getApproximateJavaServerInstanceCount()); } + if (model.wasPropertyExplicitlySet("approximateLibraryCount")) { + this.approximateLibraryCount(model.getApproximateLibraryCount()); + } if (model.wasPropertyExplicitlySet("timeStart")) { this.timeStart(model.getTimeStart()); } @@ -417,6 +442,22 @@ public Integer getApproximateJavaServerInstanceCount() { return approximateJavaServerInstanceCount; } + /** + * The approximate count of libraries in the deployed application. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("approximateLibraryCount") + private final Integer approximateLibraryCount; + + /** + * The approximate count of libraries in the deployed application. + * + * @return the value + **/ + public Integer getApproximateLibraryCount() { + return approximateLibraryCount; + } + /** * Lower bound of the specified time period filter. JMS provides a view of the data that is _per day_. The query uses only the date element of the parameter. **/ @@ -510,6 +551,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isClustered=").append(String.valueOf(this.isClustered)); sb.append(", approximateJavaServerInstanceCount=") .append(String.valueOf(this.approximateJavaServerInstanceCount)); + sb.append(", approximateLibraryCount=") + .append(String.valueOf(this.approximateLibraryCount)); sb.append(", timeStart=").append(String.valueOf(this.timeStart)); sb.append(", timeEnd=").append(String.valueOf(this.timeEnd)); sb.append(", timeFirstSeen=").append(String.valueOf(this.timeFirstSeen)); @@ -536,6 +579,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.approximateJavaServerInstanceCount, other.approximateJavaServerInstanceCount) + && java.util.Objects.equals( + this.approximateLibraryCount, other.approximateLibraryCount) && java.util.Objects.equals(this.timeStart, other.timeStart) && java.util.Objects.equals(this.timeEnd, other.timeEnd) && java.util.Objects.equals(this.timeFirstSeen, other.timeFirstSeen) @@ -563,6 +608,11 @@ public int hashCode() { + (this.approximateJavaServerInstanceCount == null ? 43 : this.approximateJavaServerInstanceCount.hashCode()); + result = + (result * PRIME) + + (this.approximateLibraryCount == null + ? 43 + : this.approximateLibraryCount.hashCode()); result = (result * PRIME) + (this.timeStart == null ? 43 : this.timeStart.hashCode()); result = (result * PRIME) + (this.timeEnd == null ? 43 : this.timeEnd.hashCode()); result = diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationWorkItemDetails.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationWorkItemDetails.java new file mode 100644 index 00000000000..7bc45df3414 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/DeployedApplicationWorkItemDetails.java @@ -0,0 +1,299 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.model; + +/** + * The work item details for deployed application related information. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DeployedApplicationWorkItemDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "kind" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DeployedApplicationWorkItemDetails extends WorkItemDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("workItemType") + private WorkItemType workItemType; + + public Builder workItemType(WorkItemType workItemType) { + this.workItemType = workItemType; + this.__explicitlySet__.add("workItemType"); + return this; + } + /** + * The unique key of the deployed application. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deployedApplicationKey") + private String deployedApplicationKey; + + /** + * The unique key of the deployed application. + * @param deployedApplicationKey the value to set + * @return this builder + **/ + public Builder deployedApplicationKey(String deployedApplicationKey) { + this.deployedApplicationKey = deployedApplicationKey; + this.__explicitlySet__.add("deployedApplicationKey"); + return this; + } + /** + * The unique key of the deployed application installation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deployedApplicationInstallationKey") + private String deployedApplicationInstallationKey; + + /** + * The unique key of the deployed application installation. + * @param deployedApplicationInstallationKey the value to set + * @return this builder + **/ + public Builder deployedApplicationInstallationKey( + String deployedApplicationInstallationKey) { + this.deployedApplicationInstallationKey = deployedApplicationInstallationKey; + this.__explicitlySet__.add("deployedApplicationInstallationKey"); + return this; + } + /** + * The deployed application name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deployedApplicationName") + private String deployedApplicationName; + + /** + * The deployed application name. + * @param deployedApplicationName the value to set + * @return this builder + **/ + public Builder deployedApplicationName(String deployedApplicationName) { + this.deployedApplicationName = deployedApplicationName; + this.__explicitlySet__.add("deployedApplicationName"); + return this; + } + /** + * The full path on which deployed application installation was detected. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deployedApplicationInstallationPath") + private String deployedApplicationInstallationPath; + + /** + * The full path on which deployed application installation was detected. + * @param deployedApplicationInstallationPath the value to set + * @return this builder + **/ + public Builder deployedApplicationInstallationPath( + String deployedApplicationInstallationPath) { + this.deployedApplicationInstallationPath = deployedApplicationInstallationPath; + this.__explicitlySet__.add("deployedApplicationInstallationPath"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DeployedApplicationWorkItemDetails build() { + DeployedApplicationWorkItemDetails model = + new DeployedApplicationWorkItemDetails( + this.workItemType, + this.deployedApplicationKey, + this.deployedApplicationInstallationKey, + this.deployedApplicationName, + this.deployedApplicationInstallationPath); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DeployedApplicationWorkItemDetails model) { + if (model.wasPropertyExplicitlySet("workItemType")) { + this.workItemType(model.getWorkItemType()); + } + if (model.wasPropertyExplicitlySet("deployedApplicationKey")) { + this.deployedApplicationKey(model.getDeployedApplicationKey()); + } + if (model.wasPropertyExplicitlySet("deployedApplicationInstallationKey")) { + this.deployedApplicationInstallationKey( + model.getDeployedApplicationInstallationKey()); + } + if (model.wasPropertyExplicitlySet("deployedApplicationName")) { + this.deployedApplicationName(model.getDeployedApplicationName()); + } + if (model.wasPropertyExplicitlySet("deployedApplicationInstallationPath")) { + this.deployedApplicationInstallationPath( + model.getDeployedApplicationInstallationPath()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DeployedApplicationWorkItemDetails( + WorkItemType workItemType, + String deployedApplicationKey, + String deployedApplicationInstallationKey, + String deployedApplicationName, + String deployedApplicationInstallationPath) { + super(workItemType); + this.deployedApplicationKey = deployedApplicationKey; + this.deployedApplicationInstallationKey = deployedApplicationInstallationKey; + this.deployedApplicationName = deployedApplicationName; + this.deployedApplicationInstallationPath = deployedApplicationInstallationPath; + } + + /** + * The unique key of the deployed application. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deployedApplicationKey") + private final String deployedApplicationKey; + + /** + * The unique key of the deployed application. + * @return the value + **/ + public String getDeployedApplicationKey() { + return deployedApplicationKey; + } + + /** + * The unique key of the deployed application installation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deployedApplicationInstallationKey") + private final String deployedApplicationInstallationKey; + + /** + * The unique key of the deployed application installation. + * @return the value + **/ + public String getDeployedApplicationInstallationKey() { + return deployedApplicationInstallationKey; + } + + /** + * The deployed application name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deployedApplicationName") + private final String deployedApplicationName; + + /** + * The deployed application name. + * @return the value + **/ + public String getDeployedApplicationName() { + return deployedApplicationName; + } + + /** + * The full path on which deployed application installation was detected. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deployedApplicationInstallationPath") + private final String deployedApplicationInstallationPath; + + /** + * The full path on which deployed application installation was detected. + * @return the value + **/ + public String getDeployedApplicationInstallationPath() { + return deployedApplicationInstallationPath; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DeployedApplicationWorkItemDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", deployedApplicationKey=").append(String.valueOf(this.deployedApplicationKey)); + sb.append(", deployedApplicationInstallationKey=") + .append(String.valueOf(this.deployedApplicationInstallationKey)); + sb.append(", deployedApplicationName=") + .append(String.valueOf(this.deployedApplicationName)); + sb.append(", deployedApplicationInstallationPath=") + .append(String.valueOf(this.deployedApplicationInstallationPath)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeployedApplicationWorkItemDetails)) { + return false; + } + + DeployedApplicationWorkItemDetails other = (DeployedApplicationWorkItemDetails) o; + return java.util.Objects.equals(this.deployedApplicationKey, other.deployedApplicationKey) + && java.util.Objects.equals( + this.deployedApplicationInstallationKey, + other.deployedApplicationInstallationKey) + && java.util.Objects.equals( + this.deployedApplicationName, other.deployedApplicationName) + && java.util.Objects.equals( + this.deployedApplicationInstallationPath, + other.deployedApplicationInstallationPath) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.deployedApplicationKey == null + ? 43 + : this.deployedApplicationKey.hashCode()); + result = + (result * PRIME) + + (this.deployedApplicationInstallationKey == null + ? 43 + : this.deployedApplicationInstallationKey.hashCode()); + result = + (result * PRIME) + + (this.deployedApplicationName == null + ? 43 + : this.deployedApplicationName.hashCode()); + result = + (result * PRIME) + + (this.deployedApplicationInstallationPath == null + ? 43 + : this.deployedApplicationInstallationPath.hashCode()); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ExportSetting.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ExportSetting.java index bcadbb82b20..1b7cf02c457 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ExportSetting.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ExportSetting.java @@ -5,7 +5,7 @@ package com.oracle.bmc.jms.model; /** - * An export settings for JMS fleets. + * Export settings of a fleet. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -191,14 +191,14 @@ public Builder targetBucketNamespace(String targetBucketNamespace) { return this; } /** - * The namespace of the bucket where data will be exported. + * The id of the region of the target bucket. * **/ @com.fasterxml.jackson.annotation.JsonProperty("targetBucketRegion") private String targetBucketRegion; /** - * The namespace of the bucket where data will be exported. + * The id of the region of the target bucket. * * @param targetBucketRegion the value to set * @return this builder @@ -469,14 +469,14 @@ public String getTargetBucketNamespace() { } /** - * The namespace of the bucket where data will be exported. + * The id of the region of the target bucket. * **/ @com.fasterxml.jackson.annotation.JsonProperty("targetBucketRegion") private final String targetBucketRegion; /** - * The namespace of the bucket where data will be exported. + * The id of the region of the target bucket. * * @return the value **/ diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/FleetAgentConfiguration.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/FleetAgentConfiguration.java index 9c52cf04feb..ccc2fe188dc 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/FleetAgentConfiguration.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/FleetAgentConfiguration.java @@ -28,6 +28,8 @@ public final class FleetAgentConfiguration "javaUsageTrackerProcessingFrequencyInMinutes", "workRequestValidityPeriodInDays", "agentPollingIntervalInMinutes", + "isCollectingManagedInstanceMetricsEnabled", + "isCollectingUsernamesEnabled", "linuxConfiguration", "windowsConfiguration", "macOsConfiguration", @@ -38,6 +40,8 @@ public FleetAgentConfiguration( Integer javaUsageTrackerProcessingFrequencyInMinutes, Integer workRequestValidityPeriodInDays, Integer agentPollingIntervalInMinutes, + Boolean isCollectingManagedInstanceMetricsEnabled, + Boolean isCollectingUsernamesEnabled, FleetAgentOsConfiguration linuxConfiguration, FleetAgentOsConfiguration windowsConfiguration, FleetAgentOsConfiguration macOsConfiguration, @@ -48,6 +52,8 @@ public FleetAgentConfiguration( javaUsageTrackerProcessingFrequencyInMinutes; this.workRequestValidityPeriodInDays = workRequestValidityPeriodInDays; this.agentPollingIntervalInMinutes = agentPollingIntervalInMinutes; + this.isCollectingManagedInstanceMetricsEnabled = isCollectingManagedInstanceMetricsEnabled; + this.isCollectingUsernamesEnabled = isCollectingUsernamesEnabled; this.linuxConfiguration = linuxConfiguration; this.windowsConfiguration = windowsConfiguration; this.macOsConfiguration = macOsConfiguration; @@ -131,6 +137,44 @@ public Builder agentPollingIntervalInMinutes(Integer agentPollingIntervalInMinut this.__explicitlySet__.add("agentPollingIntervalInMinutes"); return this; } + /** + * Collect JMS agent metrics on all managed instances in the fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCollectingManagedInstanceMetricsEnabled") + private Boolean isCollectingManagedInstanceMetricsEnabled; + + /** + * Collect JMS agent metrics on all managed instances in the fleet. + * + * @param isCollectingManagedInstanceMetricsEnabled the value to set + * @return this builder + **/ + public Builder isCollectingManagedInstanceMetricsEnabled( + Boolean isCollectingManagedInstanceMetricsEnabled) { + this.isCollectingManagedInstanceMetricsEnabled = + isCollectingManagedInstanceMetricsEnabled; + this.__explicitlySet__.add("isCollectingManagedInstanceMetricsEnabled"); + return this; + } + /** + * Collect username for application invocations for all managed instances in the fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCollectingUsernamesEnabled") + private Boolean isCollectingUsernamesEnabled; + + /** + * Collect username for application invocations for all managed instances in the fleet. + * + * @param isCollectingUsernamesEnabled the value to set + * @return this builder + **/ + public Builder isCollectingUsernamesEnabled(Boolean isCollectingUsernamesEnabled) { + this.isCollectingUsernamesEnabled = isCollectingUsernamesEnabled; + this.__explicitlySet__.add("isCollectingUsernamesEnabled"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("linuxConfiguration") private FleetAgentOsConfiguration linuxConfiguration; @@ -187,6 +231,8 @@ public FleetAgentConfiguration build() { this.javaUsageTrackerProcessingFrequencyInMinutes, this.workRequestValidityPeriodInDays, this.agentPollingIntervalInMinutes, + this.isCollectingManagedInstanceMetricsEnabled, + this.isCollectingUsernamesEnabled, this.linuxConfiguration, this.windowsConfiguration, this.macOsConfiguration, @@ -212,6 +258,13 @@ public Builder copy(FleetAgentConfiguration model) { if (model.wasPropertyExplicitlySet("agentPollingIntervalInMinutes")) { this.agentPollingIntervalInMinutes(model.getAgentPollingIntervalInMinutes()); } + if (model.wasPropertyExplicitlySet("isCollectingManagedInstanceMetricsEnabled")) { + this.isCollectingManagedInstanceMetricsEnabled( + model.getIsCollectingManagedInstanceMetricsEnabled()); + } + if (model.wasPropertyExplicitlySet("isCollectingUsernamesEnabled")) { + this.isCollectingUsernamesEnabled(model.getIsCollectingUsernamesEnabled()); + } if (model.wasPropertyExplicitlySet("linuxConfiguration")) { this.linuxConfiguration(model.getLinuxConfiguration()); } @@ -303,6 +356,38 @@ public Integer getAgentPollingIntervalInMinutes() { return agentPollingIntervalInMinutes; } + /** + * Collect JMS agent metrics on all managed instances in the fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCollectingManagedInstanceMetricsEnabled") + private final Boolean isCollectingManagedInstanceMetricsEnabled; + + /** + * Collect JMS agent metrics on all managed instances in the fleet. + * + * @return the value + **/ + public Boolean getIsCollectingManagedInstanceMetricsEnabled() { + return isCollectingManagedInstanceMetricsEnabled; + } + + /** + * Collect username for application invocations for all managed instances in the fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCollectingUsernamesEnabled") + private final Boolean isCollectingUsernamesEnabled; + + /** + * Collect username for application invocations for all managed instances in the fleet. + * + * @return the value + **/ + public Boolean getIsCollectingUsernamesEnabled() { + return isCollectingUsernamesEnabled; + } + @com.fasterxml.jackson.annotation.JsonProperty("linuxConfiguration") private final FleetAgentOsConfiguration linuxConfiguration; @@ -362,6 +447,10 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.workRequestValidityPeriodInDays)); sb.append(", agentPollingIntervalInMinutes=") .append(String.valueOf(this.agentPollingIntervalInMinutes)); + sb.append(", isCollectingManagedInstanceMetricsEnabled=") + .append(String.valueOf(this.isCollectingManagedInstanceMetricsEnabled)); + sb.append(", isCollectingUsernamesEnabled=") + .append(String.valueOf(this.isCollectingUsernamesEnabled)); sb.append(", linuxConfiguration=").append(String.valueOf(this.linuxConfiguration)); sb.append(", windowsConfiguration=").append(String.valueOf(this.windowsConfiguration)); sb.append(", macOsConfiguration=").append(String.valueOf(this.macOsConfiguration)); @@ -389,6 +478,11 @@ public boolean equals(Object o) { this.workRequestValidityPeriodInDays, other.workRequestValidityPeriodInDays) && java.util.Objects.equals( this.agentPollingIntervalInMinutes, other.agentPollingIntervalInMinutes) + && java.util.Objects.equals( + this.isCollectingManagedInstanceMetricsEnabled, + other.isCollectingManagedInstanceMetricsEnabled) + && java.util.Objects.equals( + this.isCollectingUsernamesEnabled, other.isCollectingUsernamesEnabled) && java.util.Objects.equals(this.linuxConfiguration, other.linuxConfiguration) && java.util.Objects.equals(this.windowsConfiguration, other.windowsConfiguration) && java.util.Objects.equals(this.macOsConfiguration, other.macOsConfiguration) @@ -420,6 +514,16 @@ public int hashCode() { + (this.agentPollingIntervalInMinutes == null ? 43 : this.agentPollingIntervalInMinutes.hashCode()); + result = + (result * PRIME) + + (this.isCollectingManagedInstanceMetricsEnabled == null + ? 43 + : this.isCollectingManagedInstanceMetricsEnabled.hashCode()); + result = + (result * PRIME) + + (this.isCollectingUsernamesEnabled == null + ? 43 + : this.isCollectingUsernamesEnabled.hashCode()); result = (result * PRIME) + (this.linuxConfiguration == null diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/GenerateAgentInstallerConfigurationDetails.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/GenerateAgentInstallerConfigurationDetails.java new file mode 100644 index 00000000000..3295cb6d0cc --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/GenerateAgentInstallerConfigurationDetails.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.model; + +/** + * Attributes to generate agent installer parameters for a fleet. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = GenerateAgentInstallerConfigurationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class GenerateAgentInstallerConfigurationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"installKeyId", "fleetId"}) + public GenerateAgentInstallerConfigurationDetails(String installKeyId, String fleetId) { + super(); + this.installKeyId = installKeyId; + this.fleetId = fleetId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the install key for which to generate the configuration file. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("installKeyId") + private String installKeyId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the install key for which to generate the configuration file. + * @param installKeyId the value to set + * @return this builder + **/ + public Builder installKeyId(String installKeyId) { + this.installKeyId = installKeyId; + this.__explicitlySet__.add("installKeyId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet for which to generate the configuration file. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetId") + private String fleetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet for which to generate the configuration file. + * @param fleetId the value to set + * @return this builder + **/ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + this.__explicitlySet__.add("fleetId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public GenerateAgentInstallerConfigurationDetails build() { + GenerateAgentInstallerConfigurationDetails model = + new GenerateAgentInstallerConfigurationDetails(this.installKeyId, this.fleetId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(GenerateAgentInstallerConfigurationDetails model) { + if (model.wasPropertyExplicitlySet("installKeyId")) { + this.installKeyId(model.getInstallKeyId()); + } + if (model.wasPropertyExplicitlySet("fleetId")) { + this.fleetId(model.getFleetId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the install key for which to generate the configuration file. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("installKeyId") + private final String installKeyId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the install key for which to generate the configuration file. + * @return the value + **/ + public String getInstallKeyId() { + return installKeyId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet for which to generate the configuration file. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetId") + private final String fleetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet for which to generate the configuration file. + * @return the value + **/ + public String getFleetId() { + return fleetId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("GenerateAgentInstallerConfigurationDetails("); + sb.append("super=").append(super.toString()); + sb.append("installKeyId=").append(String.valueOf(this.installKeyId)); + sb.append(", fleetId=").append(String.valueOf(this.fleetId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GenerateAgentInstallerConfigurationDetails)) { + return false; + } + + GenerateAgentInstallerConfigurationDetails other = + (GenerateAgentInstallerConfigurationDetails) o; + return java.util.Objects.equals(this.installKeyId, other.installKeyId) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.installKeyId == null ? 43 : this.installKeyId.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/GenerateLoadPipelineScriptDetails.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/GenerateLoadPipelineScriptDetails.java new file mode 100644 index 00000000000..8ae2293c812 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/GenerateLoadPipelineScriptDetails.java @@ -0,0 +1,289 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.model; + +/** + * Attributes to generate load pipeline script. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = GenerateLoadPipelineScriptDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class GenerateLoadPipelineScriptDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "targetBucketName", + "targetBucketNamespace", + "targetBucketRegion", + "intervalMinutes" + }) + public GenerateLoadPipelineScriptDetails( + String targetBucketName, + String targetBucketNamespace, + String targetBucketRegion, + Integer intervalMinutes) { + super(); + this.targetBucketName = targetBucketName; + this.targetBucketNamespace = targetBucketNamespace; + this.targetBucketRegion = targetBucketRegion; + this.intervalMinutes = intervalMinutes; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name of the bucket where data will be exported. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetBucketName") + private String targetBucketName; + + /** + * The name of the bucket where data will be exported. + * + * @param targetBucketName the value to set + * @return this builder + **/ + public Builder targetBucketName(String targetBucketName) { + this.targetBucketName = targetBucketName; + this.__explicitlySet__.add("targetBucketName"); + return this; + } + /** + * The namespace of the bucket where data will be exported. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetBucketNamespace") + private String targetBucketNamespace; + + /** + * The namespace of the bucket where data will be exported. + * + * @param targetBucketNamespace the value to set + * @return this builder + **/ + public Builder targetBucketNamespace(String targetBucketNamespace) { + this.targetBucketNamespace = targetBucketNamespace; + this.__explicitlySet__.add("targetBucketNamespace"); + return this; + } + /** + * The id of the region of the target bucket. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetBucketRegion") + private String targetBucketRegion; + + /** + * The id of the region of the target bucket. + * + * @param targetBucketRegion the value to set + * @return this builder + **/ + public Builder targetBucketRegion(String targetBucketRegion) { + this.targetBucketRegion = targetBucketRegion; + this.__explicitlySet__.add("targetBucketRegion"); + return this; + } + /** + * The time internal in minutes between consecutive executions of scheduled pipeline job. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("intervalMinutes") + private Integer intervalMinutes; + + /** + * The time internal in minutes between consecutive executions of scheduled pipeline job. + * + * @param intervalMinutes the value to set + * @return this builder + **/ + public Builder intervalMinutes(Integer intervalMinutes) { + this.intervalMinutes = intervalMinutes; + this.__explicitlySet__.add("intervalMinutes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public GenerateLoadPipelineScriptDetails build() { + GenerateLoadPipelineScriptDetails model = + new GenerateLoadPipelineScriptDetails( + this.targetBucketName, + this.targetBucketNamespace, + this.targetBucketRegion, + this.intervalMinutes); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(GenerateLoadPipelineScriptDetails model) { + if (model.wasPropertyExplicitlySet("targetBucketName")) { + this.targetBucketName(model.getTargetBucketName()); + } + if (model.wasPropertyExplicitlySet("targetBucketNamespace")) { + this.targetBucketNamespace(model.getTargetBucketNamespace()); + } + if (model.wasPropertyExplicitlySet("targetBucketRegion")) { + this.targetBucketRegion(model.getTargetBucketRegion()); + } + if (model.wasPropertyExplicitlySet("intervalMinutes")) { + this.intervalMinutes(model.getIntervalMinutes()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name of the bucket where data will be exported. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetBucketName") + private final String targetBucketName; + + /** + * The name of the bucket where data will be exported. + * + * @return the value + **/ + public String getTargetBucketName() { + return targetBucketName; + } + + /** + * The namespace of the bucket where data will be exported. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetBucketNamespace") + private final String targetBucketNamespace; + + /** + * The namespace of the bucket where data will be exported. + * + * @return the value + **/ + public String getTargetBucketNamespace() { + return targetBucketNamespace; + } + + /** + * The id of the region of the target bucket. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targetBucketRegion") + private final String targetBucketRegion; + + /** + * The id of the region of the target bucket. + * + * @return the value + **/ + public String getTargetBucketRegion() { + return targetBucketRegion; + } + + /** + * The time internal in minutes between consecutive executions of scheduled pipeline job. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("intervalMinutes") + private final Integer intervalMinutes; + + /** + * The time internal in minutes between consecutive executions of scheduled pipeline job. + * + * @return the value + **/ + public Integer getIntervalMinutes() { + return intervalMinutes; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("GenerateLoadPipelineScriptDetails("); + sb.append("super=").append(super.toString()); + sb.append("targetBucketName=").append(String.valueOf(this.targetBucketName)); + sb.append(", targetBucketNamespace=").append(String.valueOf(this.targetBucketNamespace)); + sb.append(", targetBucketRegion=").append(String.valueOf(this.targetBucketRegion)); + sb.append(", intervalMinutes=").append(String.valueOf(this.intervalMinutes)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GenerateLoadPipelineScriptDetails)) { + return false; + } + + GenerateLoadPipelineScriptDetails other = (GenerateLoadPipelineScriptDetails) o; + return java.util.Objects.equals(this.targetBucketName, other.targetBucketName) + && java.util.Objects.equals(this.targetBucketNamespace, other.targetBucketNamespace) + && java.util.Objects.equals(this.targetBucketRegion, other.targetBucketRegion) + && java.util.Objects.equals(this.intervalMinutes, other.intervalMinutes) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.targetBucketName == null ? 43 : this.targetBucketName.hashCode()); + result = + (result * PRIME) + + (this.targetBucketNamespace == null + ? 43 + : this.targetBucketNamespace.hashCode()); + result = + (result * PRIME) + + (this.targetBucketRegion == null + ? 43 + : this.targetBucketRegion.hashCode()); + result = + (result * PRIME) + + (this.intervalMinutes == null ? 43 : this.intervalMinutes.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JavaArtifact.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JavaArtifact.java index 901fd422951..3bd4e286ccd 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JavaArtifact.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JavaArtifact.java @@ -229,7 +229,7 @@ public Builder packageTypeDetail(String packageTypeDetail) { /** * The endpoint that returns a short-lived artifact download URL in the response payload. * This download url can then be used for downloading the artifact. - * See this [API](https://docs.oracle.com/en-us/iaas/api/#/en/jms/20230601/JavaArtifact/GenerateArtifactDownloadUrl) for more details. + * See this [API](https://docs.oracle.com/en-us/iaas/api/#/en/jms-java-download/20230601/DownloadUrl/GenerateArtifactDownloadUrl) for more details. * **/ @com.fasterxml.jackson.annotation.JsonProperty("downloadUrl") @@ -238,7 +238,7 @@ public Builder packageTypeDetail(String packageTypeDetail) { /** * The endpoint that returns a short-lived artifact download URL in the response payload. * This download url can then be used for downloading the artifact. - * See this [API](https://docs.oracle.com/en-us/iaas/api/#/en/jms/20230601/JavaArtifact/GenerateArtifactDownloadUrl) for more details. + * See this [API](https://docs.oracle.com/en-us/iaas/api/#/en/jms-java-download/20230601/DownloadUrl/GenerateArtifactDownloadUrl) for more details. * * @param downloadUrl the value to set * @return this builder @@ -513,7 +513,7 @@ public String getPackageTypeDetail() { /** * The endpoint that returns a short-lived artifact download URL in the response payload. * This download url can then be used for downloading the artifact. - * See this [API](https://docs.oracle.com/en-us/iaas/api/#/en/jms/20230601/JavaArtifact/GenerateArtifactDownloadUrl) for more details. + * See this [API](https://docs.oracle.com/en-us/iaas/api/#/en/jms-java-download/20230601/DownloadUrl/GenerateArtifactDownloadUrl) for more details. * **/ @com.fasterxml.jackson.annotation.JsonProperty("downloadUrl") @@ -522,7 +522,7 @@ public String getPackageTypeDetail() { /** * The endpoint that returns a short-lived artifact download URL in the response payload. * This download url can then be used for downloading the artifact. - * See this [API](https://docs.oracle.com/en-us/iaas/api/#/en/jms/20230601/JavaArtifact/GenerateArtifactDownloadUrl) for more details. + * See this [API](https://docs.oracle.com/en-us/iaas/api/#/en/jms-java-download/20230601/DownloadUrl/GenerateArtifactDownloadUrl) for more details. * * @return the value **/ diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JavaFamily.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JavaFamily.java index c8df57f5a40..fd5d2e55607 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JavaFamily.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JavaFamily.java @@ -29,7 +29,8 @@ public final class JavaFamily extends com.oracle.bmc.http.internal.ExplicitlySet "endOfSupportLifeDate", "docUrl", "latestReleaseVersion", - "isSupportedVersion" + "isSupportedVersion", + "releaseDate" }) public JavaFamily( java.util.List latestReleaseArtifacts, @@ -39,7 +40,8 @@ public JavaFamily( java.util.Date endOfSupportLifeDate, String docUrl, String latestReleaseVersion, - Boolean isSupportedVersion) { + Boolean isSupportedVersion, + java.util.Date releaseDate) { super(); this.latestReleaseArtifacts = latestReleaseArtifacts; this.familyVersion = familyVersion; @@ -49,6 +51,7 @@ public JavaFamily( this.docUrl = docUrl; this.latestReleaseVersion = latestReleaseVersion; this.isSupportedVersion = isSupportedVersion; + this.releaseDate = releaseDate; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -191,6 +194,24 @@ public Builder isSupportedVersion(Boolean isSupportedVersion) { this.__explicitlySet__.add("isSupportedVersion"); return this; } + /** + * The date on which the Java release family was first made available (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("releaseDate") + private java.util.Date releaseDate; + + /** + * The date on which the Java release family was first made available (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + * + * @param releaseDate the value to set + * @return this builder + **/ + public Builder releaseDate(java.util.Date releaseDate) { + this.releaseDate = releaseDate; + this.__explicitlySet__.add("releaseDate"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -205,7 +226,8 @@ public JavaFamily build() { this.endOfSupportLifeDate, this.docUrl, this.latestReleaseVersion, - this.isSupportedVersion); + this.isSupportedVersion, + this.releaseDate); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -238,6 +260,9 @@ public Builder copy(JavaFamily model) { if (model.wasPropertyExplicitlySet("isSupportedVersion")) { this.isSupportedVersion(model.getIsSupportedVersion()); } + if (model.wasPropertyExplicitlySet("releaseDate")) { + this.releaseDate(model.getReleaseDate()); + } return this; } } @@ -375,6 +400,22 @@ public Boolean getIsSupportedVersion() { return isSupportedVersion; } + /** + * The date on which the Java release family was first made available (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("releaseDate") + private final java.util.Date releaseDate; + + /** + * The date on which the Java release family was first made available (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + * + * @return the value + **/ + public java.util.Date getReleaseDate() { + return releaseDate; + } + @Override public String toString() { return this.toString(true); @@ -397,6 +438,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", docUrl=").append(String.valueOf(this.docUrl)); sb.append(", latestReleaseVersion=").append(String.valueOf(this.latestReleaseVersion)); sb.append(", isSupportedVersion=").append(String.valueOf(this.isSupportedVersion)); + sb.append(", releaseDate=").append(String.valueOf(this.releaseDate)); sb.append(")"); return sb.toString(); } @@ -419,6 +461,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.docUrl, other.docUrl) && java.util.Objects.equals(this.latestReleaseVersion, other.latestReleaseVersion) && java.util.Objects.equals(this.isSupportedVersion, other.isSupportedVersion) + && java.util.Objects.equals(this.releaseDate, other.releaseDate) && super.equals(other); } @@ -452,6 +495,7 @@ public int hashCode() { + (this.isSupportedVersion == null ? 43 : this.isSupportedVersion.hashCode()); + result = (result * PRIME) + (this.releaseDate == null ? 43 : this.releaseDate.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JavaFamilySummary.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JavaFamilySummary.java index d40e8969f8e..370aacf8598 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JavaFamilySummary.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JavaFamilySummary.java @@ -30,7 +30,8 @@ public final class JavaFamilySummary extends com.oracle.bmc.http.internal.Explic "endOfSupportLifeDate", "docUrl", "latestReleaseVersion", - "isSupportedVersion" + "isSupportedVersion", + "releaseDate" }) public JavaFamilySummary( String familyVersion, @@ -39,7 +40,8 @@ public JavaFamilySummary( java.util.Date endOfSupportLifeDate, String docUrl, String latestReleaseVersion, - Boolean isSupportedVersion) { + Boolean isSupportedVersion, + java.util.Date releaseDate) { super(); this.familyVersion = familyVersion; this.displayName = displayName; @@ -48,6 +50,7 @@ public JavaFamilySummary( this.docUrl = docUrl; this.latestReleaseVersion = latestReleaseVersion; this.isSupportedVersion = isSupportedVersion; + this.releaseDate = releaseDate; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -170,6 +173,24 @@ public Builder isSupportedVersion(Boolean isSupportedVersion) { this.__explicitlySet__.add("isSupportedVersion"); return this; } + /** + * The date on which the Java release family was first made available (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("releaseDate") + private java.util.Date releaseDate; + + /** + * The date on which the Java release family was first made available (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + * + * @param releaseDate the value to set + * @return this builder + **/ + public Builder releaseDate(java.util.Date releaseDate) { + this.releaseDate = releaseDate; + this.__explicitlySet__.add("releaseDate"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -183,7 +204,8 @@ public JavaFamilySummary build() { this.endOfSupportLifeDate, this.docUrl, this.latestReleaseVersion, - this.isSupportedVersion); + this.isSupportedVersion, + this.releaseDate); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -213,6 +235,9 @@ public Builder copy(JavaFamilySummary model) { if (model.wasPropertyExplicitlySet("isSupportedVersion")) { this.isSupportedVersion(model.getIsSupportedVersion()); } + if (model.wasPropertyExplicitlySet("releaseDate")) { + this.releaseDate(model.getReleaseDate()); + } return this; } } @@ -332,6 +357,22 @@ public Boolean getIsSupportedVersion() { return isSupportedVersion; } + /** + * The date on which the Java release family was first made available (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("releaseDate") + private final java.util.Date releaseDate; + + /** + * The date on which the Java release family was first made available (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + * + * @return the value + **/ + public java.util.Date getReleaseDate() { + return releaseDate; + } + @Override public String toString() { return this.toString(true); @@ -353,6 +394,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", docUrl=").append(String.valueOf(this.docUrl)); sb.append(", latestReleaseVersion=").append(String.valueOf(this.latestReleaseVersion)); sb.append(", isSupportedVersion=").append(String.valueOf(this.isSupportedVersion)); + sb.append(", releaseDate=").append(String.valueOf(this.releaseDate)); sb.append(")"); return sb.toString(); } @@ -374,6 +416,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.docUrl, other.docUrl) && java.util.Objects.equals(this.latestReleaseVersion, other.latestReleaseVersion) && java.util.Objects.equals(this.isSupportedVersion, other.isSupportedVersion) + && java.util.Objects.equals(this.releaseDate, other.releaseDate) && super.equals(other); } @@ -402,6 +445,7 @@ public int hashCode() { + (this.isSupportedVersion == null ? 43 : this.isSupportedVersion.hashCode()); + result = (result * PRIME) + (this.releaseDate == null ? 43 : this.releaseDate.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JavaMigrationAnalysisTarget.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JavaMigrationAnalysisTarget.java index 7ac897ffc40..8894ed2b58f 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JavaMigrationAnalysisTarget.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JavaMigrationAnalysisTarget.java @@ -6,7 +6,7 @@ /** * The target describes the input data for Java migration analysis. - * A target contains a managed instance, application Installation Key, sourceJdkVersion, and targetJdkVersion. + * A target contains a managed instance, application Installation Key, sourceJdkVersion, targetJdkVersion and optional excludePackagePrefixes. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -28,18 +28,21 @@ public final class JavaMigrationAnalysisTarget "managedInstanceId", "applicationInstallationKey", "sourceJdkVersion", - "targetJdkVersion" + "targetJdkVersion", + "excludePackagePrefixes" }) public JavaMigrationAnalysisTarget( String managedInstanceId, String applicationInstallationKey, String sourceJdkVersion, - String targetJdkVersion) { + String targetJdkVersion, + java.util.List excludePackagePrefixes) { super(); this.managedInstanceId = managedInstanceId; this.applicationInstallationKey = applicationInstallationKey; this.sourceJdkVersion = sourceJdkVersion; this.targetJdkVersion = targetJdkVersion; + this.excludePackagePrefixes = excludePackagePrefixes; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -108,6 +111,22 @@ public Builder targetJdkVersion(String targetJdkVersion) { this.__explicitlySet__.add("targetJdkVersion"); return this; } + /** + * Excludes the packages that starts with the prefix from the migration analysis result. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("excludePackagePrefixes") + private java.util.List excludePackagePrefixes; + + /** + * Excludes the packages that starts with the prefix from the migration analysis result. + * @param excludePackagePrefixes the value to set + * @return this builder + **/ + public Builder excludePackagePrefixes(java.util.List excludePackagePrefixes) { + this.excludePackagePrefixes = excludePackagePrefixes; + this.__explicitlySet__.add("excludePackagePrefixes"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -118,7 +137,8 @@ public JavaMigrationAnalysisTarget build() { this.managedInstanceId, this.applicationInstallationKey, this.sourceJdkVersion, - this.targetJdkVersion); + this.targetJdkVersion, + this.excludePackagePrefixes); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -139,6 +159,9 @@ public Builder copy(JavaMigrationAnalysisTarget model) { if (model.wasPropertyExplicitlySet("targetJdkVersion")) { this.targetJdkVersion(model.getTargetJdkVersion()); } + if (model.wasPropertyExplicitlySet("excludePackagePrefixes")) { + this.excludePackagePrefixes(model.getExcludePackagePrefixes()); + } return this; } } @@ -210,6 +233,20 @@ public String getTargetJdkVersion() { return targetJdkVersion; } + /** + * Excludes the packages that starts with the prefix from the migration analysis result. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("excludePackagePrefixes") + private final java.util.List excludePackagePrefixes; + + /** + * Excludes the packages that starts with the prefix from the migration analysis result. + * @return the value + **/ + public java.util.List getExcludePackagePrefixes() { + return excludePackagePrefixes; + } + @Override public String toString() { return this.toString(true); @@ -229,6 +266,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.applicationInstallationKey)); sb.append(", sourceJdkVersion=").append(String.valueOf(this.sourceJdkVersion)); sb.append(", targetJdkVersion=").append(String.valueOf(this.targetJdkVersion)); + sb.append(", excludePackagePrefixes=").append(String.valueOf(this.excludePackagePrefixes)); sb.append(")"); return sb.toString(); } @@ -248,6 +286,8 @@ public boolean equals(Object o) { this.applicationInstallationKey, other.applicationInstallationKey) && java.util.Objects.equals(this.sourceJdkVersion, other.sourceJdkVersion) && java.util.Objects.equals(this.targetJdkVersion, other.targetJdkVersion) + && java.util.Objects.equals( + this.excludePackagePrefixes, other.excludePackagePrefixes) && super.equals(other); } @@ -269,6 +309,11 @@ public int hashCode() { result = (result * PRIME) + (this.targetJdkVersion == null ? 43 : this.targetJdkVersion.hashCode()); + result = + (result * PRIME) + + (this.excludePackagePrefixes == null + ? 43 + : this.excludePackagePrefixes.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JavaServerInstanceUsage.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JavaServerInstanceUsage.java index e02a681977a..8aede6093f4 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JavaServerInstanceUsage.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JavaServerInstanceUsage.java @@ -27,6 +27,7 @@ public final class JavaServerInstanceUsage "serverInstanceKey", "fleetId", "serverInstanceName", + "serverInstancePort", "serverKey", "serverName", "serverVersion", @@ -47,6 +48,7 @@ public JavaServerInstanceUsage( String serverInstanceKey, String fleetId, String serverInstanceName, + Integer serverInstancePort, String serverKey, String serverName, String serverVersion, @@ -66,6 +68,7 @@ public JavaServerInstanceUsage( this.serverInstanceKey = serverInstanceKey; this.fleetId = fleetId; this.serverInstanceName = serverInstanceName; + this.serverInstancePort = serverInstancePort; this.serverKey = serverKey; this.serverName = serverName; this.serverVersion = serverVersion; @@ -139,6 +142,24 @@ public Builder serverInstanceName(String serverInstanceName) { this.__explicitlySet__.add("serverInstanceName"); return this; } + /** + * The port of the Java Server instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serverInstancePort") + private Integer serverInstancePort; + + /** + * The port of the Java Server instance. + * + * @param serverInstancePort the value to set + * @return this builder + **/ + public Builder serverInstancePort(Integer serverInstancePort) { + this.serverInstancePort = serverInstancePort; + this.__explicitlySet__.add("serverInstancePort"); + return this; + } /** * The internal identifier of the related Java Server. * @@ -426,6 +447,7 @@ public JavaServerInstanceUsage build() { this.serverInstanceKey, this.fleetId, this.serverInstanceName, + this.serverInstancePort, this.serverKey, this.serverName, this.serverVersion, @@ -458,6 +480,9 @@ public Builder copy(JavaServerInstanceUsage model) { if (model.wasPropertyExplicitlySet("serverInstanceName")) { this.serverInstanceName(model.getServerInstanceName()); } + if (model.wasPropertyExplicitlySet("serverInstancePort")) { + this.serverInstancePort(model.getServerInstancePort()); + } if (model.wasPropertyExplicitlySet("serverKey")) { this.serverKey(model.getServerKey()); } @@ -567,6 +592,22 @@ public String getServerInstanceName() { return serverInstanceName; } + /** + * The port of the Java Server instance. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serverInstancePort") + private final Integer serverInstancePort; + + /** + * The port of the Java Server instance. + * + * @return the value + **/ + public Integer getServerInstancePort() { + return serverInstancePort; + } + /** * The internal identifier of the related Java Server. * @@ -830,6 +871,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("serverInstanceKey=").append(String.valueOf(this.serverInstanceKey)); sb.append(", fleetId=").append(String.valueOf(this.fleetId)); sb.append(", serverInstanceName=").append(String.valueOf(this.serverInstanceName)); + sb.append(", serverInstancePort=").append(String.valueOf(this.serverInstancePort)); sb.append(", serverKey=").append(String.valueOf(this.serverKey)); sb.append(", serverName=").append(String.valueOf(this.serverName)); sb.append(", serverVersion=").append(String.valueOf(this.serverVersion)); @@ -863,6 +905,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.serverInstanceKey, other.serverInstanceKey) && java.util.Objects.equals(this.fleetId, other.fleetId) && java.util.Objects.equals(this.serverInstanceName, other.serverInstanceName) + && java.util.Objects.equals(this.serverInstancePort, other.serverInstancePort) && java.util.Objects.equals(this.serverKey, other.serverKey) && java.util.Objects.equals(this.serverName, other.serverName) && java.util.Objects.equals(this.serverVersion, other.serverVersion) @@ -896,6 +939,11 @@ public int hashCode() { + (this.serverInstanceName == null ? 43 : this.serverInstanceName.hashCode()); + result = + (result * PRIME) + + (this.serverInstancePort == null + ? 43 + : this.serverInstancePort.hashCode()); result = (result * PRIME) + (this.serverKey == null ? 43 : this.serverKey.hashCode()); result = (result * PRIME) + (this.serverName == null ? 43 : this.serverName.hashCode()); result = diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JmsPlugin.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JmsPlugin.java new file mode 100644 index 00000000000..2e0f1507e08 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JmsPlugin.java @@ -0,0 +1,864 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.model; + +/** + * Information about a JmsPlugin that has been registered. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = JmsPlugin.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class JmsPlugin extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "agentId", + "agentType", + "lifecycleState", + "availabilityStatus", + "fleetId", + "compartmentId", + "hostname", + "osFamily", + "osArchitecture", + "osDistribution", + "pluginVersion", + "timeRegistered", + "timeLastSeen", + "definedTags", + "freeformTags", + "systemTags" + }) + public JmsPlugin( + String id, + String agentId, + AgentType agentType, + JmsPluginLifecycleState lifecycleState, + JmsPluginAvailabilityStatus availabilityStatus, + String fleetId, + String compartmentId, + String hostname, + OsFamily osFamily, + String osArchitecture, + String osDistribution, + String pluginVersion, + java.util.Date timeRegistered, + java.util.Date timeLastSeen, + java.util.Map> definedTags, + java.util.Map freeformTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.agentId = agentId; + this.agentType = agentType; + this.lifecycleState = lifecycleState; + this.availabilityStatus = availabilityStatus; + this.fleetId = fleetId; + this.compartmentId = compartmentId; + this.hostname = hostname; + this.osFamily = osFamily; + this.osArchitecture = osArchitecture; + this.osDistribution = osDistribution; + this.pluginVersion = pluginVersion; + this.timeRegistered = timeRegistered; + this.timeLastSeen = timeLastSeen; + this.definedTags = definedTags; + this.freeformTags = freeformTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) to identify this JmsPlugin. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) to identify this JmsPlugin. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Management Agent (OMA) or the Oracle Cloud Agent (OCA) instance where the JMS plugin is deployed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentId") + private String agentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Management Agent (OMA) or the Oracle Cloud Agent (OCA) instance where the JMS plugin is deployed. + * @param agentId the value to set + * @return this builder + **/ + public Builder agentId(String agentId) { + this.agentId = agentId; + this.__explicitlySet__.add("agentId"); + return this; + } + /** + * The agent type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentType") + private AgentType agentType; + + /** + * The agent type. + * @param agentType the value to set + * @return this builder + **/ + public Builder agentType(AgentType agentType) { + this.agentType = agentType; + this.__explicitlySet__.add("agentType"); + return this; + } + /** + * The lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private JmsPluginLifecycleState lifecycleState; + + /** + * The lifecycle state. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(JmsPluginLifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The availability status. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityStatus") + private JmsPluginAvailabilityStatus availabilityStatus; + + /** + * The availability status. + * @param availabilityStatus the value to set + * @return this builder + **/ + public Builder availabilityStatus(JmsPluginAvailabilityStatus availabilityStatus) { + this.availabilityStatus = availabilityStatus; + this.__explicitlySet__.add("availabilityStatus"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetId") + private String fleetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + * + * @param fleetId the value to set + * @return this builder + **/ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + this.__explicitlySet__.add("fleetId"); + return this; + } + /** + * The OMA/OCA agent's compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OMA/OCA agent's compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The hostname of the agent. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hostname") + private String hostname; + + /** + * The hostname of the agent. + * + * @param hostname the value to set + * @return this builder + **/ + public Builder hostname(String hostname) { + this.hostname = hostname; + this.__explicitlySet__.add("hostname"); + return this; + } + /** + * The operating system family for the plugin. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osFamily") + private OsFamily osFamily; + + /** + * The operating system family for the plugin. + * @param osFamily the value to set + * @return this builder + **/ + public Builder osFamily(OsFamily osFamily) { + this.osFamily = osFamily; + this.__explicitlySet__.add("osFamily"); + return this; + } + /** + * The architecture of the operating system of the plugin. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osArchitecture") + private String osArchitecture; + + /** + * The architecture of the operating system of the plugin. + * @param osArchitecture the value to set + * @return this builder + **/ + public Builder osArchitecture(String osArchitecture) { + this.osArchitecture = osArchitecture; + this.__explicitlySet__.add("osArchitecture"); + return this; + } + /** + * The distribution of the operating system of the plugin. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osDistribution") + private String osDistribution; + + /** + * The distribution of the operating system of the plugin. + * @param osDistribution the value to set + * @return this builder + **/ + public Builder osDistribution(String osDistribution) { + this.osDistribution = osDistribution; + this.__explicitlySet__.add("osDistribution"); + return this; + } + /** + * The version of the plugin. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pluginVersion") + private String pluginVersion; + + /** + * The version of the plugin. + * @param pluginVersion the value to set + * @return this builder + **/ + public Builder pluginVersion(String pluginVersion) { + this.pluginVersion = pluginVersion; + this.__explicitlySet__.add("pluginVersion"); + return this; + } + /** + * The date and time the plugin was registered. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeRegistered") + private java.util.Date timeRegistered; + + /** + * The date and time the plugin was registered. + * + * @param timeRegistered the value to set + * @return this builder + **/ + public Builder timeRegistered(java.util.Date timeRegistered) { + this.timeRegistered = timeRegistered; + this.__explicitlySet__.add("timeRegistered"); + return this; + } + /** + * The date and time the resource was _last_ reported to JMS. + * This is potentially _after_ the specified time period provided by the filters. + * For example, a resource can be last reported to JMS before the start of a specified time period, + * if it is also reported during the time period. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLastSeen") + private java.util.Date timeLastSeen; + + /** + * The date and time the resource was _last_ reported to JMS. + * This is potentially _after_ the specified time period provided by the filters. + * For example, a resource can be last reported to JMS before the start of a specified time period, + * if it is also reported during the time period. + * + * @param timeLastSeen the value to set + * @return this builder + **/ + public Builder timeLastSeen(java.util.Date timeLastSeen) { + this.timeLastSeen = timeLastSeen; + this.__explicitlySet__.add("timeLastSeen"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}}. (See [Understanding Free-form Tags](https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}}. (See [Understanding Free-form Tags](https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. (See [Managing Tags and Tag Namespaces](https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. (See [Managing Tags and Tag Namespaces](https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * System tags can be viewed by users, but can only be created by the system. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * System tags can be viewed by users, but can only be created by the system. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public JmsPlugin build() { + JmsPlugin model = + new JmsPlugin( + this.id, + this.agentId, + this.agentType, + this.lifecycleState, + this.availabilityStatus, + this.fleetId, + this.compartmentId, + this.hostname, + this.osFamily, + this.osArchitecture, + this.osDistribution, + this.pluginVersion, + this.timeRegistered, + this.timeLastSeen, + this.definedTags, + this.freeformTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(JmsPlugin model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("agentId")) { + this.agentId(model.getAgentId()); + } + if (model.wasPropertyExplicitlySet("agentType")) { + this.agentType(model.getAgentType()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("availabilityStatus")) { + this.availabilityStatus(model.getAvailabilityStatus()); + } + if (model.wasPropertyExplicitlySet("fleetId")) { + this.fleetId(model.getFleetId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("hostname")) { + this.hostname(model.getHostname()); + } + if (model.wasPropertyExplicitlySet("osFamily")) { + this.osFamily(model.getOsFamily()); + } + if (model.wasPropertyExplicitlySet("osArchitecture")) { + this.osArchitecture(model.getOsArchitecture()); + } + if (model.wasPropertyExplicitlySet("osDistribution")) { + this.osDistribution(model.getOsDistribution()); + } + if (model.wasPropertyExplicitlySet("pluginVersion")) { + this.pluginVersion(model.getPluginVersion()); + } + if (model.wasPropertyExplicitlySet("timeRegistered")) { + this.timeRegistered(model.getTimeRegistered()); + } + if (model.wasPropertyExplicitlySet("timeLastSeen")) { + this.timeLastSeen(model.getTimeLastSeen()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) to identify this JmsPlugin. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) to identify this JmsPlugin. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Management Agent (OMA) or the Oracle Cloud Agent (OCA) instance where the JMS plugin is deployed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentId") + private final String agentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Management Agent (OMA) or the Oracle Cloud Agent (OCA) instance where the JMS plugin is deployed. + * @return the value + **/ + public String getAgentId() { + return agentId; + } + + /** + * The agent type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentType") + private final AgentType agentType; + + /** + * The agent type. + * @return the value + **/ + public AgentType getAgentType() { + return agentType; + } + + /** + * The lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final JmsPluginLifecycleState lifecycleState; + + /** + * The lifecycle state. + * @return the value + **/ + public JmsPluginLifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The availability status. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityStatus") + private final JmsPluginAvailabilityStatus availabilityStatus; + + /** + * The availability status. + * @return the value + **/ + public JmsPluginAvailabilityStatus getAvailabilityStatus() { + return availabilityStatus; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetId") + private final String fleetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + * + * @return the value + **/ + public String getFleetId() { + return fleetId; + } + + /** + * The OMA/OCA agent's compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OMA/OCA agent's compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The hostname of the agent. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hostname") + private final String hostname; + + /** + * The hostname of the agent. + * + * @return the value + **/ + public String getHostname() { + return hostname; + } + + /** + * The operating system family for the plugin. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osFamily") + private final OsFamily osFamily; + + /** + * The operating system family for the plugin. + * @return the value + **/ + public OsFamily getOsFamily() { + return osFamily; + } + + /** + * The architecture of the operating system of the plugin. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osArchitecture") + private final String osArchitecture; + + /** + * The architecture of the operating system of the plugin. + * @return the value + **/ + public String getOsArchitecture() { + return osArchitecture; + } + + /** + * The distribution of the operating system of the plugin. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osDistribution") + private final String osDistribution; + + /** + * The distribution of the operating system of the plugin. + * @return the value + **/ + public String getOsDistribution() { + return osDistribution; + } + + /** + * The version of the plugin. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pluginVersion") + private final String pluginVersion; + + /** + * The version of the plugin. + * @return the value + **/ + public String getPluginVersion() { + return pluginVersion; + } + + /** + * The date and time the plugin was registered. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeRegistered") + private final java.util.Date timeRegistered; + + /** + * The date and time the plugin was registered. + * + * @return the value + **/ + public java.util.Date getTimeRegistered() { + return timeRegistered; + } + + /** + * The date and time the resource was _last_ reported to JMS. + * This is potentially _after_ the specified time period provided by the filters. + * For example, a resource can be last reported to JMS before the start of a specified time period, + * if it is also reported during the time period. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLastSeen") + private final java.util.Date timeLastSeen; + + /** + * The date and time the resource was _last_ reported to JMS. + * This is potentially _after_ the specified time period provided by the filters. + * For example, a resource can be last reported to JMS before the start of a specified time period, + * if it is also reported during the time period. + * + * @return the value + **/ + public java.util.Date getTimeLastSeen() { + return timeLastSeen; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}}. (See [Understanding Free-form Tags](https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}}. (See [Understanding Free-form Tags](https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. (See [Managing Tags and Tag Namespaces](https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. (See [Managing Tags and Tag Namespaces](https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * System tags can be viewed by users, but can only be created by the system. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * System tags can be viewed by users, but can only be created by the system. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("JmsPlugin("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", agentId=").append(String.valueOf(this.agentId)); + sb.append(", agentType=").append(String.valueOf(this.agentType)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", availabilityStatus=").append(String.valueOf(this.availabilityStatus)); + sb.append(", fleetId=").append(String.valueOf(this.fleetId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", hostname=").append(String.valueOf(this.hostname)); + sb.append(", osFamily=").append(String.valueOf(this.osFamily)); + sb.append(", osArchitecture=").append(String.valueOf(this.osArchitecture)); + sb.append(", osDistribution=").append(String.valueOf(this.osDistribution)); + sb.append(", pluginVersion=").append(String.valueOf(this.pluginVersion)); + sb.append(", timeRegistered=").append(String.valueOf(this.timeRegistered)); + sb.append(", timeLastSeen=").append(String.valueOf(this.timeLastSeen)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof JmsPlugin)) { + return false; + } + + JmsPlugin other = (JmsPlugin) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.agentId, other.agentId) + && java.util.Objects.equals(this.agentType, other.agentType) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.availabilityStatus, other.availabilityStatus) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.hostname, other.hostname) + && java.util.Objects.equals(this.osFamily, other.osFamily) + && java.util.Objects.equals(this.osArchitecture, other.osArchitecture) + && java.util.Objects.equals(this.osDistribution, other.osDistribution) + && java.util.Objects.equals(this.pluginVersion, other.pluginVersion) + && java.util.Objects.equals(this.timeRegistered, other.timeRegistered) + && java.util.Objects.equals(this.timeLastSeen, other.timeLastSeen) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.agentId == null ? 43 : this.agentId.hashCode()); + result = (result * PRIME) + (this.agentType == null ? 43 : this.agentType.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.availabilityStatus == null + ? 43 + : this.availabilityStatus.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.hostname == null ? 43 : this.hostname.hashCode()); + result = (result * PRIME) + (this.osFamily == null ? 43 : this.osFamily.hashCode()); + result = + (result * PRIME) + + (this.osArchitecture == null ? 43 : this.osArchitecture.hashCode()); + result = + (result * PRIME) + + (this.osDistribution == null ? 43 : this.osDistribution.hashCode()); + result = + (result * PRIME) + + (this.pluginVersion == null ? 43 : this.pluginVersion.hashCode()); + result = + (result * PRIME) + + (this.timeRegistered == null ? 43 : this.timeRegistered.hashCode()); + result = (result * PRIME) + (this.timeLastSeen == null ? 43 : this.timeLastSeen.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JmsPluginAvailabilityStatus.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JmsPluginAvailabilityStatus.java new file mode 100644 index 00000000000..14ab2b5de73 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JmsPluginAvailabilityStatus.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.model; + +/** + * Availability status of the JmsPlugin. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public enum JmsPluginAvailabilityStatus { + Active("ACTIVE"), + Silent("SILENT"), + NotAvailable("NOT_AVAILABLE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(JmsPluginAvailabilityStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (JmsPluginAvailabilityStatus v : JmsPluginAvailabilityStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + JmsPluginAvailabilityStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static JmsPluginAvailabilityStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'JmsPluginAvailabilityStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JmsPluginCollection.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JmsPluginCollection.java new file mode 100644 index 00000000000..b8b93dc731f --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JmsPluginCollection.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.model; + +/** + * Results of a JmsPlugin search. Contains JmsPluginSummary items. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = JmsPluginCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class JmsPluginCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public JmsPluginCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A list of JmsPlugins. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * A list of JmsPlugins. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public JmsPluginCollection build() { + JmsPluginCollection model = new JmsPluginCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(JmsPluginCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A list of JmsPlugins. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * A list of JmsPlugins. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("JmsPluginCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof JmsPluginCollection)) { + return false; + } + + JmsPluginCollection other = (JmsPluginCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JmsPluginLifecycleState.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JmsPluginLifecycleState.java new file mode 100644 index 00000000000..c4cc781a34d --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JmsPluginLifecycleState.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.model; + +/** + * Lifecycle state of the JmsPlugin. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public enum JmsPluginLifecycleState { + Active("ACTIVE"), + Inactive("INACTIVE"), + NeedsAttention("NEEDS_ATTENTION"), + Deleted("DELETED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(JmsPluginLifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (JmsPluginLifecycleState v : JmsPluginLifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + JmsPluginLifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static JmsPluginLifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'JmsPluginLifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JmsPluginSortBy.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JmsPluginSortBy.java new file mode 100644 index 00000000000..5cebc1a3b53 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JmsPluginSortBy.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.model; + +/** + * The field used to sort JmsPlugins. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public enum JmsPluginSortBy { + Id("id"), + TimeLastSeen("timeLastSeen"), + TimeRegistered("timeRegistered"), + Hostname("hostname"), + AgentId("agentId"), + AgentType("agentType"), + LifecycleState("lifecycleState"), + AvailabilityStatus("availabilityStatus"), + FleetId("fleetId"), + CompartmentId("compartmentId"), + OsFamily("osFamily"), + OsArchitecture("osArchitecture"), + OsDistribution("osDistribution"), + PluginVersion("pluginVersion"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (JmsPluginSortBy v : JmsPluginSortBy.values()) { + map.put(v.getValue(), v); + } + } + + JmsPluginSortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static JmsPluginSortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid JmsPluginSortBy: " + key); + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JmsPluginSummary.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JmsPluginSummary.java new file mode 100644 index 00000000000..472e9549073 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/JmsPluginSummary.java @@ -0,0 +1,863 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.model; + +/** + * Summary of the JmsPlugin. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = JmsPluginSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class JmsPluginSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "agentId", + "agentType", + "lifecycleState", + "availabilityStatus", + "fleetId", + "compartmentId", + "hostname", + "osFamily", + "osArchitecture", + "osDistribution", + "pluginVersion", + "timeRegistered", + "timeLastSeen", + "definedTags", + "freeformTags", + "systemTags" + }) + public JmsPluginSummary( + String id, + String agentId, + AgentType agentType, + JmsPluginLifecycleState lifecycleState, + JmsPluginAvailabilityStatus availabilityStatus, + String fleetId, + String compartmentId, + String hostname, + OsFamily osFamily, + String osArchitecture, + String osDistribution, + String pluginVersion, + java.util.Date timeRegistered, + java.util.Date timeLastSeen, + java.util.Map> definedTags, + java.util.Map freeformTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.agentId = agentId; + this.agentType = agentType; + this.lifecycleState = lifecycleState; + this.availabilityStatus = availabilityStatus; + this.fleetId = fleetId; + this.compartmentId = compartmentId; + this.hostname = hostname; + this.osFamily = osFamily; + this.osArchitecture = osArchitecture; + this.osDistribution = osDistribution; + this.pluginVersion = pluginVersion; + this.timeRegistered = timeRegistered; + this.timeLastSeen = timeLastSeen; + this.definedTags = definedTags; + this.freeformTags = freeformTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) to identify this JmsPlugin. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) to identify this JmsPlugin. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Management Agent (OMA) or the Oracle Cloud Agent (OCA) instance where the JMS plugin is deployed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentId") + private String agentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Management Agent (OMA) or the Oracle Cloud Agent (OCA) instance where the JMS plugin is deployed. + * @param agentId the value to set + * @return this builder + **/ + public Builder agentId(String agentId) { + this.agentId = agentId; + this.__explicitlySet__.add("agentId"); + return this; + } + /** + * The agent type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentType") + private AgentType agentType; + + /** + * The agent type. + * @param agentType the value to set + * @return this builder + **/ + public Builder agentType(AgentType agentType) { + this.agentType = agentType; + this.__explicitlySet__.add("agentType"); + return this; + } + /** + * The lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private JmsPluginLifecycleState lifecycleState; + + /** + * The lifecycle state. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(JmsPluginLifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The availability status. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityStatus") + private JmsPluginAvailabilityStatus availabilityStatus; + + /** + * The availability status. + * @param availabilityStatus the value to set + * @return this builder + **/ + public Builder availabilityStatus(JmsPluginAvailabilityStatus availabilityStatus) { + this.availabilityStatus = availabilityStatus; + this.__explicitlySet__.add("availabilityStatus"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetId") + private String fleetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + * + * @param fleetId the value to set + * @return this builder + **/ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + this.__explicitlySet__.add("fleetId"); + return this; + } + /** + * The OMA/OCA agent's compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OMA/OCA agent's compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The hostname of the agent. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hostname") + private String hostname; + + /** + * The hostname of the agent. + * + * @param hostname the value to set + * @return this builder + **/ + public Builder hostname(String hostname) { + this.hostname = hostname; + this.__explicitlySet__.add("hostname"); + return this; + } + /** + * The operating system family for the plugin. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osFamily") + private OsFamily osFamily; + + /** + * The operating system family for the plugin. + * @param osFamily the value to set + * @return this builder + **/ + public Builder osFamily(OsFamily osFamily) { + this.osFamily = osFamily; + this.__explicitlySet__.add("osFamily"); + return this; + } + /** + * The architecture of the operating system of the plugin. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osArchitecture") + private String osArchitecture; + + /** + * The architecture of the operating system of the plugin. + * @param osArchitecture the value to set + * @return this builder + **/ + public Builder osArchitecture(String osArchitecture) { + this.osArchitecture = osArchitecture; + this.__explicitlySet__.add("osArchitecture"); + return this; + } + /** + * The distribution of the operating system of the plugin. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osDistribution") + private String osDistribution; + + /** + * The distribution of the operating system of the plugin. + * @param osDistribution the value to set + * @return this builder + **/ + public Builder osDistribution(String osDistribution) { + this.osDistribution = osDistribution; + this.__explicitlySet__.add("osDistribution"); + return this; + } + /** + * The version of the plugin. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pluginVersion") + private String pluginVersion; + + /** + * The version of the plugin. + * @param pluginVersion the value to set + * @return this builder + **/ + public Builder pluginVersion(String pluginVersion) { + this.pluginVersion = pluginVersion; + this.__explicitlySet__.add("pluginVersion"); + return this; + } + /** + * The date and time the plugin was registered. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeRegistered") + private java.util.Date timeRegistered; + + /** + * The date and time the plugin was registered. + * + * @param timeRegistered the value to set + * @return this builder + **/ + public Builder timeRegistered(java.util.Date timeRegistered) { + this.timeRegistered = timeRegistered; + this.__explicitlySet__.add("timeRegistered"); + return this; + } + /** + * The date and time the resource was _last_ reported to JMS. + * This is potentially _after_ the specified time period provided by the filters. + * For example, a resource can be last reported to JMS before the start of a specified time period, + * if it is also reported during the time period. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLastSeen") + private java.util.Date timeLastSeen; + + /** + * The date and time the resource was _last_ reported to JMS. + * This is potentially _after_ the specified time period provided by the filters. + * For example, a resource can be last reported to JMS before the start of a specified time period, + * if it is also reported during the time period. + * + * @param timeLastSeen the value to set + * @return this builder + **/ + public Builder timeLastSeen(java.util.Date timeLastSeen) { + this.timeLastSeen = timeLastSeen; + this.__explicitlySet__.add("timeLastSeen"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}}. (See [Understanding Free-form Tags](https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}}. (See [Understanding Free-form Tags](https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. (See [Managing Tags and Tag Namespaces](https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. (See [Managing Tags and Tag Namespaces](https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * System tags can be viewed by users, but can only be created by the system. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * System tags can be viewed by users, but can only be created by the system. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public JmsPluginSummary build() { + JmsPluginSummary model = + new JmsPluginSummary( + this.id, + this.agentId, + this.agentType, + this.lifecycleState, + this.availabilityStatus, + this.fleetId, + this.compartmentId, + this.hostname, + this.osFamily, + this.osArchitecture, + this.osDistribution, + this.pluginVersion, + this.timeRegistered, + this.timeLastSeen, + this.definedTags, + this.freeformTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(JmsPluginSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("agentId")) { + this.agentId(model.getAgentId()); + } + if (model.wasPropertyExplicitlySet("agentType")) { + this.agentType(model.getAgentType()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("availabilityStatus")) { + this.availabilityStatus(model.getAvailabilityStatus()); + } + if (model.wasPropertyExplicitlySet("fleetId")) { + this.fleetId(model.getFleetId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("hostname")) { + this.hostname(model.getHostname()); + } + if (model.wasPropertyExplicitlySet("osFamily")) { + this.osFamily(model.getOsFamily()); + } + if (model.wasPropertyExplicitlySet("osArchitecture")) { + this.osArchitecture(model.getOsArchitecture()); + } + if (model.wasPropertyExplicitlySet("osDistribution")) { + this.osDistribution(model.getOsDistribution()); + } + if (model.wasPropertyExplicitlySet("pluginVersion")) { + this.pluginVersion(model.getPluginVersion()); + } + if (model.wasPropertyExplicitlySet("timeRegistered")) { + this.timeRegistered(model.getTimeRegistered()); + } + if (model.wasPropertyExplicitlySet("timeLastSeen")) { + this.timeLastSeen(model.getTimeLastSeen()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) to identify this JmsPlugin. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) to identify this JmsPlugin. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Management Agent (OMA) or the Oracle Cloud Agent (OCA) instance where the JMS plugin is deployed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentId") + private final String agentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Management Agent (OMA) or the Oracle Cloud Agent (OCA) instance where the JMS plugin is deployed. + * @return the value + **/ + public String getAgentId() { + return agentId; + } + + /** + * The agent type. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("agentType") + private final AgentType agentType; + + /** + * The agent type. + * @return the value + **/ + public AgentType getAgentType() { + return agentType; + } + + /** + * The lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final JmsPluginLifecycleState lifecycleState; + + /** + * The lifecycle state. + * @return the value + **/ + public JmsPluginLifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The availability status. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityStatus") + private final JmsPluginAvailabilityStatus availabilityStatus; + + /** + * The availability status. + * @return the value + **/ + public JmsPluginAvailabilityStatus getAvailabilityStatus() { + return availabilityStatus; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetId") + private final String fleetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + * + * @return the value + **/ + public String getFleetId() { + return fleetId; + } + + /** + * The OMA/OCA agent's compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OMA/OCA agent's compartment [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The hostname of the agent. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("hostname") + private final String hostname; + + /** + * The hostname of the agent. + * + * @return the value + **/ + public String getHostname() { + return hostname; + } + + /** + * The operating system family for the plugin. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osFamily") + private final OsFamily osFamily; + + /** + * The operating system family for the plugin. + * @return the value + **/ + public OsFamily getOsFamily() { + return osFamily; + } + + /** + * The architecture of the operating system of the plugin. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osArchitecture") + private final String osArchitecture; + + /** + * The architecture of the operating system of the plugin. + * @return the value + **/ + public String getOsArchitecture() { + return osArchitecture; + } + + /** + * The distribution of the operating system of the plugin. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("osDistribution") + private final String osDistribution; + + /** + * The distribution of the operating system of the plugin. + * @return the value + **/ + public String getOsDistribution() { + return osDistribution; + } + + /** + * The version of the plugin. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pluginVersion") + private final String pluginVersion; + + /** + * The version of the plugin. + * @return the value + **/ + public String getPluginVersion() { + return pluginVersion; + } + + /** + * The date and time the plugin was registered. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeRegistered") + private final java.util.Date timeRegistered; + + /** + * The date and time the plugin was registered. + * + * @return the value + **/ + public java.util.Date getTimeRegistered() { + return timeRegistered; + } + + /** + * The date and time the resource was _last_ reported to JMS. + * This is potentially _after_ the specified time period provided by the filters. + * For example, a resource can be last reported to JMS before the start of a specified time period, + * if it is also reported during the time period. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLastSeen") + private final java.util.Date timeLastSeen; + + /** + * The date and time the resource was _last_ reported to JMS. + * This is potentially _after_ the specified time period provided by the filters. + * For example, a resource can be last reported to JMS before the start of a specified time period, + * if it is also reported during the time period. + * + * @return the value + **/ + public java.util.Date getTimeLastSeen() { + return timeLastSeen; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}}. (See [Understanding Free-form Tags](https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}}. (See [Understanding Free-form Tags](https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. (See [Managing Tags and Tag Namespaces](https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. (See [Managing Tags and Tag Namespaces](https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * System tags can be viewed by users, but can only be created by the system. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * System tags can be viewed by users, but can only be created by the system. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("JmsPluginSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", agentId=").append(String.valueOf(this.agentId)); + sb.append(", agentType=").append(String.valueOf(this.agentType)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", availabilityStatus=").append(String.valueOf(this.availabilityStatus)); + sb.append(", fleetId=").append(String.valueOf(this.fleetId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", hostname=").append(String.valueOf(this.hostname)); + sb.append(", osFamily=").append(String.valueOf(this.osFamily)); + sb.append(", osArchitecture=").append(String.valueOf(this.osArchitecture)); + sb.append(", osDistribution=").append(String.valueOf(this.osDistribution)); + sb.append(", pluginVersion=").append(String.valueOf(this.pluginVersion)); + sb.append(", timeRegistered=").append(String.valueOf(this.timeRegistered)); + sb.append(", timeLastSeen=").append(String.valueOf(this.timeLastSeen)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof JmsPluginSummary)) { + return false; + } + + JmsPluginSummary other = (JmsPluginSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.agentId, other.agentId) + && java.util.Objects.equals(this.agentType, other.agentType) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.availabilityStatus, other.availabilityStatus) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.hostname, other.hostname) + && java.util.Objects.equals(this.osFamily, other.osFamily) + && java.util.Objects.equals(this.osArchitecture, other.osArchitecture) + && java.util.Objects.equals(this.osDistribution, other.osDistribution) + && java.util.Objects.equals(this.pluginVersion, other.pluginVersion) + && java.util.Objects.equals(this.timeRegistered, other.timeRegistered) + && java.util.Objects.equals(this.timeLastSeen, other.timeLastSeen) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.agentId == null ? 43 : this.agentId.hashCode()); + result = (result * PRIME) + (this.agentType == null ? 43 : this.agentType.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.availabilityStatus == null + ? 43 + : this.availabilityStatus.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.hostname == null ? 43 : this.hostname.hashCode()); + result = (result * PRIME) + (this.osFamily == null ? 43 : this.osFamily.hashCode()); + result = + (result * PRIME) + + (this.osArchitecture == null ? 43 : this.osArchitecture.hashCode()); + result = + (result * PRIME) + + (this.osDistribution == null ? 43 : this.osDistribution.hashCode()); + result = + (result * PRIME) + + (this.pluginVersion == null ? 43 : this.pluginVersion.hashCode()); + result = + (result * PRIME) + + (this.timeRegistered == null ? 43 : this.timeRegistered.hashCode()); + result = (result * PRIME) + (this.timeLastSeen == null ? 43 : this.timeLastSeen.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/LibraryUsage.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/LibraryUsage.java index aeece488c29..c37a93be716 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/LibraryUsage.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/LibraryUsage.java @@ -25,6 +25,7 @@ public final class LibraryUsage extends com.oracle.bmc.http.internal.ExplicitlyS "fleetId", "libraryName", "libraryVersion", + "cveId", "cvssScore", "approximateApplicationCount", "approximateJavaServerInstanceCount", @@ -33,13 +34,15 @@ public final class LibraryUsage extends com.oracle.bmc.http.internal.ExplicitlyS "timeStart", "timeEnd", "timeFirstSeen", - "timeLastSeen" + "timeLastSeen", + "timeLastCveRefreshed" }) public LibraryUsage( String libraryKey, String fleetId, String libraryName, String libraryVersion, + String cveId, Float cvssScore, Integer approximateApplicationCount, Integer approximateJavaServerInstanceCount, @@ -48,12 +51,14 @@ public LibraryUsage( java.util.Date timeStart, java.util.Date timeEnd, java.util.Date timeFirstSeen, - java.util.Date timeLastSeen) { + java.util.Date timeLastSeen, + java.util.Date timeLastCveRefreshed) { super(); this.libraryKey = libraryKey; this.fleetId = fleetId; this.libraryName = libraryName; this.libraryVersion = libraryVersion; + this.cveId = cveId; this.cvssScore = cvssScore; this.approximateApplicationCount = approximateApplicationCount; this.approximateJavaServerInstanceCount = approximateJavaServerInstanceCount; @@ -63,6 +68,7 @@ public LibraryUsage( this.timeEnd = timeEnd; this.timeFirstSeen = timeFirstSeen; this.timeLastSeen = timeLastSeen; + this.timeLastCveRefreshed = timeLastCveRefreshed; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -139,6 +145,24 @@ public Builder libraryVersion(String libraryVersion) { this.__explicitlySet__.add("libraryVersion"); return this; } + /** + * The Common Vulnerabilities and Exposures (CVE) ID. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cveId") + private String cveId; + + /** + * The Common Vulnerabilities and Exposures (CVE) ID. + * + * @param cveId the value to set + * @return this builder + **/ + public Builder cveId(String cveId) { + this.cveId = cveId; + this.__explicitlySet__.add("cveId"); + return this; + } /** * The Common Vulnerability Scoring System (CVSS) score. * @@ -311,6 +335,24 @@ public Builder timeLastSeen(java.util.Date timeLastSeen) { this.__explicitlySet__.add("timeLastSeen"); return this; } + /** + * The date and time of the last CVEs refresh was completed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLastCveRefreshed") + private java.util.Date timeLastCveRefreshed; + + /** + * The date and time of the last CVEs refresh was completed. + * + * @param timeLastCveRefreshed the value to set + * @return this builder + **/ + public Builder timeLastCveRefreshed(java.util.Date timeLastCveRefreshed) { + this.timeLastCveRefreshed = timeLastCveRefreshed; + this.__explicitlySet__.add("timeLastCveRefreshed"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -322,6 +364,7 @@ public LibraryUsage build() { this.fleetId, this.libraryName, this.libraryVersion, + this.cveId, this.cvssScore, this.approximateApplicationCount, this.approximateJavaServerInstanceCount, @@ -330,7 +373,8 @@ public LibraryUsage build() { this.timeStart, this.timeEnd, this.timeFirstSeen, - this.timeLastSeen); + this.timeLastSeen, + this.timeLastCveRefreshed); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -351,6 +395,9 @@ public Builder copy(LibraryUsage model) { if (model.wasPropertyExplicitlySet("libraryVersion")) { this.libraryVersion(model.getLibraryVersion()); } + if (model.wasPropertyExplicitlySet("cveId")) { + this.cveId(model.getCveId()); + } if (model.wasPropertyExplicitlySet("cvssScore")) { this.cvssScore(model.getCvssScore()); } @@ -380,6 +427,9 @@ public Builder copy(LibraryUsage model) { if (model.wasPropertyExplicitlySet("timeLastSeen")) { this.timeLastSeen(model.getTimeLastSeen()); } + if (model.wasPropertyExplicitlySet("timeLastCveRefreshed")) { + this.timeLastCveRefreshed(model.getTimeLastCveRefreshed()); + } return this; } } @@ -459,6 +509,22 @@ public String getLibraryVersion() { return libraryVersion; } + /** + * The Common Vulnerabilities and Exposures (CVE) ID. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cveId") + private final String cveId; + + /** + * The Common Vulnerabilities and Exposures (CVE) ID. + * + * @return the value + **/ + public String getCveId() { + return cveId; + } + /** * The Common Vulnerability Scoring System (CVSS) score. * @@ -611,6 +677,22 @@ public java.util.Date getTimeLastSeen() { return timeLastSeen; } + /** + * The date and time of the last CVEs refresh was completed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLastCveRefreshed") + private final java.util.Date timeLastCveRefreshed; + + /** + * The date and time of the last CVEs refresh was completed. + * + * @return the value + **/ + public java.util.Date getTimeLastCveRefreshed() { + return timeLastCveRefreshed; + } + @Override public String toString() { return this.toString(true); @@ -629,6 +711,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", fleetId=").append(String.valueOf(this.fleetId)); sb.append(", libraryName=").append(String.valueOf(this.libraryName)); sb.append(", libraryVersion=").append(String.valueOf(this.libraryVersion)); + sb.append(", cveId=").append(String.valueOf(this.cveId)); sb.append(", cvssScore=").append(String.valueOf(this.cvssScore)); sb.append(", approximateApplicationCount=") .append(String.valueOf(this.approximateApplicationCount)); @@ -642,6 +725,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeEnd=").append(String.valueOf(this.timeEnd)); sb.append(", timeFirstSeen=").append(String.valueOf(this.timeFirstSeen)); sb.append(", timeLastSeen=").append(String.valueOf(this.timeLastSeen)); + sb.append(", timeLastCveRefreshed=").append(String.valueOf(this.timeLastCveRefreshed)); sb.append(")"); return sb.toString(); } @@ -660,6 +744,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.fleetId, other.fleetId) && java.util.Objects.equals(this.libraryName, other.libraryName) && java.util.Objects.equals(this.libraryVersion, other.libraryVersion) + && java.util.Objects.equals(this.cveId, other.cveId) && java.util.Objects.equals(this.cvssScore, other.cvssScore) && java.util.Objects.equals( this.approximateApplicationCount, other.approximateApplicationCount) @@ -675,6 +760,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeEnd, other.timeEnd) && java.util.Objects.equals(this.timeFirstSeen, other.timeFirstSeen) && java.util.Objects.equals(this.timeLastSeen, other.timeLastSeen) + && java.util.Objects.equals(this.timeLastCveRefreshed, other.timeLastCveRefreshed) && super.equals(other); } @@ -688,6 +774,7 @@ public int hashCode() { result = (result * PRIME) + (this.libraryVersion == null ? 43 : this.libraryVersion.hashCode()); + result = (result * PRIME) + (this.cveId == null ? 43 : this.cveId.hashCode()); result = (result * PRIME) + (this.cvssScore == null ? 43 : this.cvssScore.hashCode()); result = (result * PRIME) @@ -715,6 +802,11 @@ public int hashCode() { (result * PRIME) + (this.timeFirstSeen == null ? 43 : this.timeFirstSeen.hashCode()); result = (result * PRIME) + (this.timeLastSeen == null ? 43 : this.timeLastSeen.hashCode()); + result = + (result * PRIME) + + (this.timeLastCveRefreshed == null + ? 43 + : this.timeLastCveRefreshed.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ManagedInstanceType.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ManagedInstanceType.java index 3d2b4d87e22..6ce8587e8b8 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ManagedInstanceType.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ManagedInstanceType.java @@ -10,6 +10,7 @@ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") public enum ManagedInstanceType { OracleManagementAgent("ORACLE_MANAGEMENT_AGENT"), + OracleCloudAgent("ORACLE_CLOUD_AGENT"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ManagedInstanceUsage.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ManagedInstanceUsage.java index 7998ff90995..d9f94a0b80a 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ManagedInstanceUsage.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/ManagedInstanceUsage.java @@ -36,6 +36,7 @@ public final class ManagedInstanceUsage extends com.oracle.bmc.http.internal.Exp "approximateInstallationCount", "approximateJreCount", "drsFileStatus", + "applicationInvokedBy", "timeStart", "timeEnd", "timeFirstSeen", @@ -52,6 +53,7 @@ public ManagedInstanceUsage( Integer approximateInstallationCount, Integer approximateJreCount, DrsFileStatus drsFileStatus, + String applicationInvokedBy, java.util.Date timeStart, java.util.Date timeEnd, java.util.Date timeFirstSeen, @@ -67,6 +69,7 @@ public ManagedInstanceUsage( this.approximateInstallationCount = approximateInstallationCount; this.approximateJreCount = approximateJreCount; this.drsFileStatus = drsFileStatus; + this.applicationInvokedBy = applicationInvokedBy; this.timeStart = timeStart; this.timeEnd = timeEnd; this.timeFirstSeen = timeFirstSeen; @@ -225,6 +228,22 @@ public Builder drsFileStatus(DrsFileStatus drsFileStatus) { this.__explicitlySet__.add("drsFileStatus"); return this; } + /** + * Comma separated list of user names that invoked applications within this managed instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationInvokedBy") + private String applicationInvokedBy; + + /** + * Comma separated list of user names that invoked applications within this managed instance. + * @param applicationInvokedBy the value to set + * @return this builder + **/ + public Builder applicationInvokedBy(String applicationInvokedBy) { + this.applicationInvokedBy = applicationInvokedBy; + this.__explicitlySet__.add("applicationInvokedBy"); + return this; + } /** * Lower bound of the specified time period filter. JMS provides a view of the data that is _per day_. The query uses only the date element of the parameter. **/ @@ -322,6 +341,7 @@ public ManagedInstanceUsage build() { this.approximateInstallationCount, this.approximateJreCount, this.drsFileStatus, + this.applicationInvokedBy, this.timeStart, this.timeEnd, this.timeFirstSeen, @@ -364,6 +384,9 @@ public Builder copy(ManagedInstanceUsage model) { if (model.wasPropertyExplicitlySet("drsFileStatus")) { this.drsFileStatus(model.getDrsFileStatus()); } + if (model.wasPropertyExplicitlySet("applicationInvokedBy")) { + this.applicationInvokedBy(model.getApplicationInvokedBy()); + } if (model.wasPropertyExplicitlySet("timeStart")) { this.timeStart(model.getTimeStart()); } @@ -521,6 +544,20 @@ public DrsFileStatus getDrsFileStatus() { return drsFileStatus; } + /** + * Comma separated list of user names that invoked applications within this managed instance. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("applicationInvokedBy") + private final String applicationInvokedBy; + + /** + * Comma separated list of user names that invoked applications within this managed instance. + * @return the value + **/ + public String getApplicationInvokedBy() { + return applicationInvokedBy; + } + /** * Lower bound of the specified time period filter. JMS provides a view of the data that is _per day_. The query uses only the date element of the parameter. **/ @@ -619,6 +656,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.approximateInstallationCount)); sb.append(", approximateJreCount=").append(String.valueOf(this.approximateJreCount)); sb.append(", drsFileStatus=").append(String.valueOf(this.drsFileStatus)); + sb.append(", applicationInvokedBy=").append(String.valueOf(this.applicationInvokedBy)); sb.append(", timeStart=").append(String.valueOf(this.timeStart)); sb.append(", timeEnd=").append(String.valueOf(this.timeEnd)); sb.append(", timeFirstSeen=").append(String.valueOf(this.timeFirstSeen)); @@ -649,6 +687,7 @@ public boolean equals(Object o) { this.approximateInstallationCount, other.approximateInstallationCount) && java.util.Objects.equals(this.approximateJreCount, other.approximateJreCount) && java.util.Objects.equals(this.drsFileStatus, other.drsFileStatus) + && java.util.Objects.equals(this.applicationInvokedBy, other.applicationInvokedBy) && java.util.Objects.equals(this.timeStart, other.timeStart) && java.util.Objects.equals(this.timeEnd, other.timeEnd) && java.util.Objects.equals(this.timeFirstSeen, other.timeFirstSeen) @@ -692,6 +731,11 @@ public int hashCode() { result = (result * PRIME) + (this.drsFileStatus == null ? 43 : this.drsFileStatus.hashCode()); + result = + (result * PRIME) + + (this.applicationInvokedBy == null + ? 43 + : this.applicationInvokedBy.hashCode()); result = (result * PRIME) + (this.timeStart == null ? 43 : this.timeStart.hashCode()); result = (result * PRIME) + (this.timeEnd == null ? 43 : this.timeEnd.hashCode()); result = diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/OperatingSystem.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/OperatingSystem.java index 50ab12b6fd4..c7f8b7fa11c 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/OperatingSystem.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/OperatingSystem.java @@ -44,13 +44,13 @@ public OperatingSystem( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The operating system type, such as Windows or Linux + * The operating system type, such as Windows, Linux or macOS **/ @com.fasterxml.jackson.annotation.JsonProperty("family") private OsFamily family; /** - * The operating system type, such as Windows or Linux + * The operating system type, such as Windows, Linux or macOS * @param family the value to set * @return this builder **/ @@ -174,13 +174,13 @@ public Builder toBuilder() { } /** - * The operating system type, such as Windows or Linux + * The operating system type, such as Windows, Linux or macOS **/ @com.fasterxml.jackson.annotation.JsonProperty("family") private final OsFamily family; /** - * The operating system type, such as Windows or Linux + * The operating system type, such as Windows, Linux or macOS * @return the value **/ public OsFamily getFamily() { diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/PackageType.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/PackageType.java new file mode 100644 index 00000000000..1184f883390 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/PackageType.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.model; + +/** + * The agent image installation package type. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public enum PackageType { + Rpm("RPM"), + Zip("ZIP"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PackageType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PackageType v : PackageType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + PackageType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PackageType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'PackageType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/PerformanceTuningAnalysisResult.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/PerformanceTuningAnalysisResult.java index c0ca786016f..9bb35e49ea4 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/PerformanceTuningAnalysisResult.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/PerformanceTuningAnalysisResult.java @@ -322,13 +322,13 @@ public Builder timeCreated(java.util.Date timeCreated) { return this; } /** - * The time the JFR capture started. + * The time the JFR recording has started. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") private java.util.Date timeStarted; /** - * The time the JFR capture started. + * The time the JFR recording has started. * @param timeStarted the value to set * @return this builder **/ @@ -338,13 +338,13 @@ public Builder timeStarted(java.util.Date timeStarted) { return this; } /** - * The time the JFR capture finished. + * The time the JFR recording has finished. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") private java.util.Date timeFinished; /** - * The time the JFR capture finished. + * The time the JFR recording has finished. * @param timeFinished the value to set * @return this builder **/ @@ -662,13 +662,13 @@ public java.util.Date getTimeCreated() { } /** - * The time the JFR capture started. + * The time the JFR recording has started. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") private final java.util.Date timeStarted; /** - * The time the JFR capture started. + * The time the JFR recording has started. * @return the value **/ public java.util.Date getTimeStarted() { @@ -676,13 +676,13 @@ public java.util.Date getTimeStarted() { } /** - * The time the JFR capture finished. + * The time the JFR recording has finished. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") private final java.util.Date timeFinished; /** - * The time the JFR capture finished. + * The time the JFR recording has finished. * @return the value **/ public java.util.Date getTimeFinished() { diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/PerformanceTuningAnalysisResultSortBy.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/PerformanceTuningAnalysisResultSortBy.java index 8e25c167652..b44211f6c07 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/PerformanceTuningAnalysisResultSortBy.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/PerformanceTuningAnalysisResultSortBy.java @@ -12,6 +12,7 @@ public enum PerformanceTuningAnalysisResultSortBy { TimeCreated("timeCreated"), ManagedInstanceId("managedInstanceId"), WorkRequestId("workRequestId"), + WarningCount("warningCount"), ; private final String value; diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/PerformanceTuningAnalysisResultSummary.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/PerformanceTuningAnalysisResultSummary.java index 0205342cf60..18c888652dd 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/PerformanceTuningAnalysisResultSummary.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/PerformanceTuningAnalysisResultSummary.java @@ -322,13 +322,13 @@ public Builder timeCreated(java.util.Date timeCreated) { return this; } /** - * The time the JFR capture started. + * The time the JFR recording has started. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") private java.util.Date timeStarted; /** - * The time the JFR capture started. + * The time the JFR recording has started. * @param timeStarted the value to set * @return this builder **/ @@ -338,13 +338,13 @@ public Builder timeStarted(java.util.Date timeStarted) { return this; } /** - * The time the JFR capture finished. + * The time the JFR recording has finished. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") private java.util.Date timeFinished; /** - * The time the JFR capture finished. + * The time the JFR recording has finished. * @param timeFinished the value to set * @return this builder **/ @@ -662,13 +662,13 @@ public java.util.Date getTimeCreated() { } /** - * The time the JFR capture started. + * The time the JFR recording has started. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") private final java.util.Date timeStarted; /** - * The time the JFR capture started. + * The time the JFR recording has started. * @return the value **/ public java.util.Date getTimeStarted() { @@ -676,13 +676,13 @@ public java.util.Date getTimeStarted() { } /** - * The time the JFR capture finished. + * The time the JFR recording has finished. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") private final java.util.Date timeFinished; /** - * The time the JFR capture finished. + * The time the JFR recording has finished. * @return the value **/ public java.util.Date getTimeFinished() { diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/PlatformArchitectureType.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/PlatformArchitectureType.java new file mode 100644 index 00000000000..a78c0979ff0 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/PlatformArchitectureType.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.model; + +/** + * Supported platform architecture types. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public enum PlatformArchitectureType { + X8664("X86_64"), + X86("X86"), + Aarch64("AARCH64"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PlatformArchitectureType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PlatformArchitectureType v : PlatformArchitectureType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + PlatformArchitectureType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PlatformArchitectureType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'PlatformArchitectureType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/RequestDeployedApplicationMigrationAnalysesDetails.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/RequestDeployedApplicationMigrationAnalysesDetails.java new file mode 100644 index 00000000000..2d87d5873d0 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/RequestDeployedApplicationMigrationAnalysesDetails.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.model; + +/** + * Details of the request to start a Java migration analyses. The analyses requires the managed instance OCID, deployed application key, + * source JDK version, and target JDK version of each selected application. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RequestDeployedApplicationMigrationAnalysesDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RequestDeployedApplicationMigrationAnalysesDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"targets"}) + public RequestDeployedApplicationMigrationAnalysesDetails( + java.util.List targets) { + super(); + this.targets = targets; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * An array of migration analyses requests. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targets") + private java.util.List targets; + + /** + * An array of migration analyses requests. + * @param targets the value to set + * @return this builder + **/ + public Builder targets(java.util.List targets) { + this.targets = targets; + this.__explicitlySet__.add("targets"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RequestDeployedApplicationMigrationAnalysesDetails build() { + RequestDeployedApplicationMigrationAnalysesDetails model = + new RequestDeployedApplicationMigrationAnalysesDetails(this.targets); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RequestDeployedApplicationMigrationAnalysesDetails model) { + if (model.wasPropertyExplicitlySet("targets")) { + this.targets(model.getTargets()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * An array of migration analyses requests. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("targets") + private final java.util.List targets; + + /** + * An array of migration analyses requests. + * @return the value + **/ + public java.util.List getTargets() { + return targets; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RequestDeployedApplicationMigrationAnalysesDetails("); + sb.append("super=").append(super.toString()); + sb.append("targets=").append(String.valueOf(this.targets)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RequestDeployedApplicationMigrationAnalysesDetails)) { + return false; + } + + RequestDeployedApplicationMigrationAnalysesDetails other = + (RequestDeployedApplicationMigrationAnalysesDetails) o; + return java.util.Objects.equals(this.targets, other.targets) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.targets == null ? 43 : this.targets.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/SummarizeApplicationUsageFields.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/SummarizeApplicationUsageFields.java index d6877524d73..699d65c91d8 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/SummarizeApplicationUsageFields.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/SummarizeApplicationUsageFields.java @@ -5,7 +5,7 @@ package com.oracle.bmc.jms.model; /** - * Potential fields to include into response model to summarize applications endpoints. + * Potential fields to include in the response model to summarize applications endpoints. **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") public enum SummarizeApplicationUsageFields { diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/SummarizeInstallationUsageFields.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/SummarizeInstallationUsageFields.java index a20a87e22a8..fb38feee1ee 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/SummarizeInstallationUsageFields.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/SummarizeInstallationUsageFields.java @@ -5,7 +5,7 @@ package com.oracle.bmc.jms.model; /** - * Potential fields to include into response model to summarize installations endpoints. + * Potential fields to include in the response model to summarize installations endpoints. **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") public enum SummarizeInstallationUsageFields { diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/SummarizeJreUsageFields.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/SummarizeJreUsageFields.java index 90b96539ed6..3f64e9b2d58 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/SummarizeJreUsageFields.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/SummarizeJreUsageFields.java @@ -5,7 +5,7 @@ package com.oracle.bmc.jms.model; /** - * Potential fields to include into response model to summarize JREs endpoints. + * Potential fields to include in the response model to summarize JREs endpoints. **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") public enum SummarizeJreUsageFields { diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/SummarizeManagedInstanceUsageFields.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/SummarizeManagedInstanceUsageFields.java index d6d00e44785..46e150c871f 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/SummarizeManagedInstanceUsageFields.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/SummarizeManagedInstanceUsageFields.java @@ -5,7 +5,7 @@ package com.oracle.bmc.jms.model; /** - * Potential fields to include into response model to summarize managed instances endpoints. + * Potential fields to include in the response model to summarize managed instances endpoints. **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") public enum SummarizeManagedInstanceUsageFields { diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/UpdateExportSettingDetails.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/UpdateExportSettingDetails.java index f12e2d1e777..f6aa3686b58 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/UpdateExportSettingDetails.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/UpdateExportSettingDetails.java @@ -5,7 +5,7 @@ package com.oracle.bmc.jms.model; /** - * Attributes to update a Export setting. + * Attributes to update an export setting. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -145,14 +145,14 @@ public Builder targetBucketNamespace(String targetBucketNamespace) { return this; } /** - * The namespace of the bucket where data will be exported. + * The id of the region of the target bucket. * **/ @com.fasterxml.jackson.annotation.JsonProperty("targetBucketRegion") private String targetBucketRegion; /** - * The namespace of the bucket where data will be exported. + * The id of the region of the target bucket. * * @param targetBucketRegion the value to set * @return this builder @@ -339,14 +339,14 @@ public String getTargetBucketNamespace() { } /** - * The namespace of the bucket where data will be exported. + * The id of the region of the target bucket. * **/ @com.fasterxml.jackson.annotation.JsonProperty("targetBucketRegion") private final String targetBucketRegion; /** - * The namespace of the bucket where data will be exported. + * The id of the region of the target bucket. * * @return the value **/ diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/UpdateFleetAgentConfigurationDetails.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/UpdateFleetAgentConfigurationDetails.java index 38bfb8cd188..73740e5d7a6 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/UpdateFleetAgentConfigurationDetails.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/UpdateFleetAgentConfigurationDetails.java @@ -27,6 +27,8 @@ public final class UpdateFleetAgentConfigurationDetails "javaUsageTrackerProcessingFrequencyInMinutes", "workRequestValidityPeriodInDays", "agentPollingIntervalInMinutes", + "isCollectingManagedInstanceMetricsEnabled", + "isCollectingUsernamesEnabled", "linuxConfiguration", "windowsConfiguration", "macOsConfiguration" @@ -36,6 +38,8 @@ public UpdateFleetAgentConfigurationDetails( Integer javaUsageTrackerProcessingFrequencyInMinutes, Integer workRequestValidityPeriodInDays, Integer agentPollingIntervalInMinutes, + Boolean isCollectingManagedInstanceMetricsEnabled, + Boolean isCollectingUsernamesEnabled, FleetAgentOsConfiguration linuxConfiguration, FleetAgentOsConfiguration windowsConfiguration, FleetAgentOsConfiguration macOsConfiguration) { @@ -45,6 +49,8 @@ public UpdateFleetAgentConfigurationDetails( javaUsageTrackerProcessingFrequencyInMinutes; this.workRequestValidityPeriodInDays = workRequestValidityPeriodInDays; this.agentPollingIntervalInMinutes = agentPollingIntervalInMinutes; + this.isCollectingManagedInstanceMetricsEnabled = isCollectingManagedInstanceMetricsEnabled; + this.isCollectingUsernamesEnabled = isCollectingUsernamesEnabled; this.linuxConfiguration = linuxConfiguration; this.windowsConfiguration = windowsConfiguration; this.macOsConfiguration = macOsConfiguration; @@ -127,6 +133,44 @@ public Builder agentPollingIntervalInMinutes(Integer agentPollingIntervalInMinut this.__explicitlySet__.add("agentPollingIntervalInMinutes"); return this; } + /** + * Collect JMS agent metrics on all managed instances in the fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCollectingManagedInstanceMetricsEnabled") + private Boolean isCollectingManagedInstanceMetricsEnabled; + + /** + * Collect JMS agent metrics on all managed instances in the fleet. + * + * @param isCollectingManagedInstanceMetricsEnabled the value to set + * @return this builder + **/ + public Builder isCollectingManagedInstanceMetricsEnabled( + Boolean isCollectingManagedInstanceMetricsEnabled) { + this.isCollectingManagedInstanceMetricsEnabled = + isCollectingManagedInstanceMetricsEnabled; + this.__explicitlySet__.add("isCollectingManagedInstanceMetricsEnabled"); + return this; + } + /** + * Collect username for application invocations for all managed instances in the fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCollectingUsernamesEnabled") + private Boolean isCollectingUsernamesEnabled; + + /** + * Collect username for application invocations for all managed instances in the fleet. + * + * @param isCollectingUsernamesEnabled the value to set + * @return this builder + **/ + public Builder isCollectingUsernamesEnabled(Boolean isCollectingUsernamesEnabled) { + this.isCollectingUsernamesEnabled = isCollectingUsernamesEnabled; + this.__explicitlySet__.add("isCollectingUsernamesEnabled"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("linuxConfiguration") private FleetAgentOsConfiguration linuxConfiguration; @@ -165,6 +209,8 @@ public UpdateFleetAgentConfigurationDetails build() { this.javaUsageTrackerProcessingFrequencyInMinutes, this.workRequestValidityPeriodInDays, this.agentPollingIntervalInMinutes, + this.isCollectingManagedInstanceMetricsEnabled, + this.isCollectingUsernamesEnabled, this.linuxConfiguration, this.windowsConfiguration, this.macOsConfiguration); @@ -189,6 +235,13 @@ public Builder copy(UpdateFleetAgentConfigurationDetails model) { if (model.wasPropertyExplicitlySet("agentPollingIntervalInMinutes")) { this.agentPollingIntervalInMinutes(model.getAgentPollingIntervalInMinutes()); } + if (model.wasPropertyExplicitlySet("isCollectingManagedInstanceMetricsEnabled")) { + this.isCollectingManagedInstanceMetricsEnabled( + model.getIsCollectingManagedInstanceMetricsEnabled()); + } + if (model.wasPropertyExplicitlySet("isCollectingUsernamesEnabled")) { + this.isCollectingUsernamesEnabled(model.getIsCollectingUsernamesEnabled()); + } if (model.wasPropertyExplicitlySet("linuxConfiguration")) { this.linuxConfiguration(model.getLinuxConfiguration()); } @@ -277,6 +330,38 @@ public Integer getAgentPollingIntervalInMinutes() { return agentPollingIntervalInMinutes; } + /** + * Collect JMS agent metrics on all managed instances in the fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCollectingManagedInstanceMetricsEnabled") + private final Boolean isCollectingManagedInstanceMetricsEnabled; + + /** + * Collect JMS agent metrics on all managed instances in the fleet. + * + * @return the value + **/ + public Boolean getIsCollectingManagedInstanceMetricsEnabled() { + return isCollectingManagedInstanceMetricsEnabled; + } + + /** + * Collect username for application invocations for all managed instances in the fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCollectingUsernamesEnabled") + private final Boolean isCollectingUsernamesEnabled; + + /** + * Collect username for application invocations for all managed instances in the fleet. + * + * @return the value + **/ + public Boolean getIsCollectingUsernamesEnabled() { + return isCollectingUsernamesEnabled; + } + @com.fasterxml.jackson.annotation.JsonProperty("linuxConfiguration") private final FleetAgentOsConfiguration linuxConfiguration; @@ -320,6 +405,10 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.workRequestValidityPeriodInDays)); sb.append(", agentPollingIntervalInMinutes=") .append(String.valueOf(this.agentPollingIntervalInMinutes)); + sb.append(", isCollectingManagedInstanceMetricsEnabled=") + .append(String.valueOf(this.isCollectingManagedInstanceMetricsEnabled)); + sb.append(", isCollectingUsernamesEnabled=") + .append(String.valueOf(this.isCollectingUsernamesEnabled)); sb.append(", linuxConfiguration=").append(String.valueOf(this.linuxConfiguration)); sb.append(", windowsConfiguration=").append(String.valueOf(this.windowsConfiguration)); sb.append(", macOsConfiguration=").append(String.valueOf(this.macOsConfiguration)); @@ -346,6 +435,11 @@ public boolean equals(Object o) { this.workRequestValidityPeriodInDays, other.workRequestValidityPeriodInDays) && java.util.Objects.equals( this.agentPollingIntervalInMinutes, other.agentPollingIntervalInMinutes) + && java.util.Objects.equals( + this.isCollectingManagedInstanceMetricsEnabled, + other.isCollectingManagedInstanceMetricsEnabled) + && java.util.Objects.equals( + this.isCollectingUsernamesEnabled, other.isCollectingUsernamesEnabled) && java.util.Objects.equals(this.linuxConfiguration, other.linuxConfiguration) && java.util.Objects.equals(this.windowsConfiguration, other.windowsConfiguration) && java.util.Objects.equals(this.macOsConfiguration, other.macOsConfiguration) @@ -376,6 +470,16 @@ public int hashCode() { + (this.agentPollingIntervalInMinutes == null ? 43 : this.agentPollingIntervalInMinutes.hashCode()); + result = + (result * PRIME) + + (this.isCollectingManagedInstanceMetricsEnabled == null + ? 43 + : this.isCollectingManagedInstanceMetricsEnabled.hashCode()); + result = + (result * PRIME) + + (this.isCollectingUsernamesEnabled == null + ? 43 + : this.isCollectingUsernamesEnabled.hashCode()); result = (result * PRIME) + (this.linuxConfiguration == null diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/UpdateJmsPluginDetails.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/UpdateJmsPluginDetails.java new file mode 100644 index 00000000000..3bdea877447 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/UpdateJmsPluginDetails.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.model; + +/** + * Attributes to update a JmsPlugin. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateJmsPluginDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateJmsPluginDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"fleetId", "definedTags", "freeformTags"}) + public UpdateJmsPluginDetails( + String fleetId, + java.util.Map> definedTags, + java.util.Map freeformTags) { + super(); + this.fleetId = fleetId; + this.definedTags = definedTags; + this.freeformTags = freeformTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetId") + private String fleetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + * + * @param fleetId the value to set + * @return this builder + **/ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + this.__explicitlySet__.add("fleetId"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}}. (See [Understanding Free-form Tags](https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}}. (See [Understanding Free-form Tags](https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. (See [Managing Tags and Tag Namespaces](https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. (See [Managing Tags and Tag Namespaces](https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateJmsPluginDetails build() { + UpdateJmsPluginDetails model = + new UpdateJmsPluginDetails(this.fleetId, this.definedTags, this.freeformTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateJmsPluginDetails model) { + if (model.wasPropertyExplicitlySet("fleetId")) { + this.fleetId(model.getFleetId()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fleetId") + private final String fleetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the fleet. + * + * @return the value + **/ + public String getFleetId() { + return fleetId; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}}. (See [Understanding Free-form Tags](https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}}. (See [Understanding Free-form Tags](https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm)). + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. (See [Managing Tags and Tag Namespaces](https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}}. (See [Managing Tags and Tag Namespaces](https://docs.cloud.oracle.com/Content/Tagging/Concepts/understandingfreeformtags.htm).) + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateJmsPluginDetails("); + sb.append("super=").append(super.toString()); + sb.append("fleetId=").append(String.valueOf(this.fleetId)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateJmsPluginDetails)) { + return false; + } + + UpdateJmsPluginDetails other = (UpdateJmsPluginDetails) o; + return java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/WorkItemDetails.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/WorkItemDetails.java index 7d4976a4357..c33d05c506e 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/WorkItemDetails.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/WorkItemDetails.java @@ -22,6 +22,10 @@ defaultImpl = WorkItemDetails.class ) @com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DeployedApplicationWorkItemDetails.class, + name = "DEPLOYED_APPLICATION" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = LcmWorkItemDetails.class, name = "LCM" @@ -107,6 +111,7 @@ public enum Kind { Basic("BASIC"), Application("APPLICATION"), Lcm("LCM"), + DeployedApplication("DEPLOYED_APPLICATION"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/WorkItemStatus.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/WorkItemStatus.java index fcb66b64362..8e720c29edc 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/model/WorkItemStatus.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/model/WorkItemStatus.java @@ -16,6 +16,7 @@ public enum WorkItemStatus { Succeeded("SUCCEEDED"), NeedsAttention("NEEDS_ATTENTION"), Retrying("RETRYING"), + Skipped("SKIPPED"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/CreateJmsPluginRequest.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/CreateJmsPluginRequest.java new file mode 100644 index 00000000000..6e767f12ed1 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/CreateJmsPluginRequest.java @@ -0,0 +1,278 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.requests; + +import com.oracle.bmc.jms.model.*; +/** + * Example: Click here to see how to use CreateJmsPluginRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class CreateJmsPluginRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.jms.model.CreateJmsPluginDetails> { + + /** + * Details for the new JmsPlugin. + */ + private com.oracle.bmc.jms.model.CreateJmsPluginDetails createJmsPluginDetails; + + /** + * Details for the new JmsPlugin. + */ + public com.oracle.bmc.jms.model.CreateJmsPluginDetails getCreateJmsPluginDetails() { + return createJmsPluginDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.jms.model.CreateJmsPluginDetails getBody$() { + return createJmsPluginDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateJmsPluginRequest, com.oracle.bmc.jms.model.CreateJmsPluginDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new JmsPlugin. + */ + private com.oracle.bmc.jms.model.CreateJmsPluginDetails createJmsPluginDetails = null; + + /** + * Details for the new JmsPlugin. + * @param createJmsPluginDetails the value to set + * @return this builder instance + */ + public Builder createJmsPluginDetails( + com.oracle.bmc.jms.model.CreateJmsPluginDetails createJmsPluginDetails) { + this.createJmsPluginDetails = createJmsPluginDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateJmsPluginRequest o) { + createJmsPluginDetails(o.getCreateJmsPluginDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateJmsPluginRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateJmsPluginRequest + */ + public CreateJmsPluginRequest build() { + CreateJmsPluginRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.jms.model.CreateJmsPluginDetails body) { + createJmsPluginDetails(body); + return this; + } + + /** + * Build the instance of CreateJmsPluginRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateJmsPluginRequest + */ + public CreateJmsPluginRequest buildWithoutInvocationCallback() { + CreateJmsPluginRequest request = new CreateJmsPluginRequest(); + request.createJmsPluginDetails = createJmsPluginDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateJmsPluginRequest(createJmsPluginDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createJmsPluginDetails(createJmsPluginDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createJmsPluginDetails=").append(String.valueOf(this.createJmsPluginDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateJmsPluginRequest)) { + return false; + } + + CreateJmsPluginRequest other = (CreateJmsPluginRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createJmsPluginDetails, other.createJmsPluginDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createJmsPluginDetails == null + ? 43 + : this.createJmsPluginDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/DeleteJmsPluginRequest.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/DeleteJmsPluginRequest.java new file mode 100644 index 00000000000..31e0f6f6a87 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/DeleteJmsPluginRequest.java @@ -0,0 +1,244 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.requests; + +import com.oracle.bmc.jms.model.*; +/** + * Example: Click here to see how to use DeleteJmsPluginRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class DeleteJmsPluginRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JmsPlugin. + */ + private String jmsPluginId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JmsPlugin. + */ + public String getJmsPluginId() { + return jmsPluginId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * ETag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the ETag you + * provide matches the resource's current ETag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * ETag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the ETag you + * provide matches the resource's current ETag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteJmsPluginRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JmsPlugin. + */ + private String jmsPluginId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JmsPlugin. + * @param jmsPluginId the value to set + * @return this builder instance + */ + public Builder jmsPluginId(String jmsPluginId) { + this.jmsPluginId = jmsPluginId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * ETag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the ETag you + * provide matches the resource's current ETag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * ETag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the ETag you + * provide matches the resource's current ETag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteJmsPluginRequest o) { + jmsPluginId(o.getJmsPluginId()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteJmsPluginRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteJmsPluginRequest + */ + public DeleteJmsPluginRequest build() { + DeleteJmsPluginRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteJmsPluginRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteJmsPluginRequest + */ + public DeleteJmsPluginRequest buildWithoutInvocationCallback() { + DeleteJmsPluginRequest request = new DeleteJmsPluginRequest(); + request.jmsPluginId = jmsPluginId; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new DeleteJmsPluginRequest(jmsPluginId, opcRequestId, ifMatch); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().jmsPluginId(jmsPluginId).opcRequestId(opcRequestId).ifMatch(ifMatch); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",jmsPluginId=").append(String.valueOf(this.jmsPluginId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteJmsPluginRequest)) { + return false; + } + + DeleteJmsPluginRequest other = (DeleteJmsPluginRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.jmsPluginId, other.jmsPluginId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.jmsPluginId == null ? 43 : this.jmsPluginId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/GenerateAgentInstallerConfigurationRequest.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/GenerateAgentInstallerConfigurationRequest.java new file mode 100644 index 00000000000..8f226932a65 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/GenerateAgentInstallerConfigurationRequest.java @@ -0,0 +1,238 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.requests; + +import com.oracle.bmc.jms.model.*; +/** + * Example: Click here to see how to use GenerateAgentInstallerConfigurationRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class GenerateAgentInstallerConfigurationRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.jms.model.GenerateAgentInstallerConfigurationDetails> { + + /** + * Details that are used to generate the installer configuration for a fleet. + */ + private com.oracle.bmc.jms.model.GenerateAgentInstallerConfigurationDetails + generateAgentInstallerConfigurationDetails; + + /** + * Details that are used to generate the installer configuration for a fleet. + */ + public com.oracle.bmc.jms.model.GenerateAgentInstallerConfigurationDetails + getGenerateAgentInstallerConfigurationDetails() { + return generateAgentInstallerConfigurationDetails; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.jms.model.GenerateAgentInstallerConfigurationDetails getBody$() { + return generateAgentInstallerConfigurationDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GenerateAgentInstallerConfigurationRequest, + com.oracle.bmc.jms.model.GenerateAgentInstallerConfigurationDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details that are used to generate the installer configuration for a fleet. + */ + private com.oracle.bmc.jms.model.GenerateAgentInstallerConfigurationDetails + generateAgentInstallerConfigurationDetails = null; + + /** + * Details that are used to generate the installer configuration for a fleet. + * @param generateAgentInstallerConfigurationDetails the value to set + * @return this builder instance + */ + public Builder generateAgentInstallerConfigurationDetails( + com.oracle.bmc.jms.model.GenerateAgentInstallerConfigurationDetails + generateAgentInstallerConfigurationDetails) { + this.generateAgentInstallerConfigurationDetails = + generateAgentInstallerConfigurationDetails; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GenerateAgentInstallerConfigurationRequest o) { + generateAgentInstallerConfigurationDetails( + o.getGenerateAgentInstallerConfigurationDetails()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GenerateAgentInstallerConfigurationRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GenerateAgentInstallerConfigurationRequest + */ + public GenerateAgentInstallerConfigurationRequest build() { + GenerateAgentInstallerConfigurationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.jms.model.GenerateAgentInstallerConfigurationDetails body) { + generateAgentInstallerConfigurationDetails(body); + return this; + } + + /** + * Build the instance of GenerateAgentInstallerConfigurationRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GenerateAgentInstallerConfigurationRequest + */ + public GenerateAgentInstallerConfigurationRequest buildWithoutInvocationCallback() { + GenerateAgentInstallerConfigurationRequest request = + new GenerateAgentInstallerConfigurationRequest(); + request.generateAgentInstallerConfigurationDetails = + generateAgentInstallerConfigurationDetails; + request.opcRequestId = opcRequestId; + return request; + // new GenerateAgentInstallerConfigurationRequest(generateAgentInstallerConfigurationDetails, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .generateAgentInstallerConfigurationDetails( + generateAgentInstallerConfigurationDetails) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",generateAgentInstallerConfigurationDetails=") + .append(String.valueOf(this.generateAgentInstallerConfigurationDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GenerateAgentInstallerConfigurationRequest)) { + return false; + } + + GenerateAgentInstallerConfigurationRequest other = + (GenerateAgentInstallerConfigurationRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.generateAgentInstallerConfigurationDetails, + other.generateAgentInstallerConfigurationDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.generateAgentInstallerConfigurationDetails == null + ? 43 + : this.generateAgentInstallerConfigurationDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/GenerateLoadPipelineScriptRequest.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/GenerateLoadPipelineScriptRequest.java new file mode 100644 index 00000000000..fad6d4c4b34 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/GenerateLoadPipelineScriptRequest.java @@ -0,0 +1,263 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.requests; + +import com.oracle.bmc.jms.model.*; +/** + * Example: Click here to see how to use GenerateLoadPipelineScriptRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class GenerateLoadPipelineScriptRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.jms.model.GenerateLoadPipelineScriptDetails> { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. + */ + private String fleetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. + */ + public String getFleetId() { + return fleetId; + } + /** + * Attributes to generate the load pipeline script. + */ + private com.oracle.bmc.jms.model.GenerateLoadPipelineScriptDetails + generateLoadPipelineScriptDetails; + + /** + * Attributes to generate the load pipeline script. + */ + public com.oracle.bmc.jms.model.GenerateLoadPipelineScriptDetails + getGenerateLoadPipelineScriptDetails() { + return generateLoadPipelineScriptDetails; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.jms.model.GenerateLoadPipelineScriptDetails getBody$() { + return generateLoadPipelineScriptDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GenerateLoadPipelineScriptRequest, + com.oracle.bmc.jms.model.GenerateLoadPipelineScriptDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. + */ + private String fleetId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * Attributes to generate the load pipeline script. + */ + private com.oracle.bmc.jms.model.GenerateLoadPipelineScriptDetails + generateLoadPipelineScriptDetails = null; + + /** + * Attributes to generate the load pipeline script. + * @param generateLoadPipelineScriptDetails the value to set + * @return this builder instance + */ + public Builder generateLoadPipelineScriptDetails( + com.oracle.bmc.jms.model.GenerateLoadPipelineScriptDetails + generateLoadPipelineScriptDetails) { + this.generateLoadPipelineScriptDetails = generateLoadPipelineScriptDetails; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GenerateLoadPipelineScriptRequest o) { + fleetId(o.getFleetId()); + generateLoadPipelineScriptDetails(o.getGenerateLoadPipelineScriptDetails()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GenerateLoadPipelineScriptRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GenerateLoadPipelineScriptRequest + */ + public GenerateLoadPipelineScriptRequest build() { + GenerateLoadPipelineScriptRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.jms.model.GenerateLoadPipelineScriptDetails body) { + generateLoadPipelineScriptDetails(body); + return this; + } + + /** + * Build the instance of GenerateLoadPipelineScriptRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GenerateLoadPipelineScriptRequest + */ + public GenerateLoadPipelineScriptRequest buildWithoutInvocationCallback() { + GenerateLoadPipelineScriptRequest request = new GenerateLoadPipelineScriptRequest(); + request.fleetId = fleetId; + request.generateLoadPipelineScriptDetails = generateLoadPipelineScriptDetails; + request.opcRequestId = opcRequestId; + return request; + // new GenerateLoadPipelineScriptRequest(fleetId, generateLoadPipelineScriptDetails, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fleetId(fleetId) + .generateLoadPipelineScriptDetails(generateLoadPipelineScriptDetails) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",generateLoadPipelineScriptDetails=") + .append(String.valueOf(this.generateLoadPipelineScriptDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GenerateLoadPipelineScriptRequest)) { + return false; + } + + GenerateLoadPipelineScriptRequest other = (GenerateLoadPipelineScriptRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals( + this.generateLoadPipelineScriptDetails, + other.generateLoadPipelineScriptDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.generateLoadPipelineScriptDetails == null + ? 43 + : this.generateLoadPipelineScriptDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/GetJmsPluginRequest.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/GetJmsPluginRequest.java new file mode 100644 index 00000000000..f103629cf3e --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/GetJmsPluginRequest.java @@ -0,0 +1,193 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.requests; + +import com.oracle.bmc.jms.model.*; +/** + * Example: Click here to see how to use GetJmsPluginRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class GetJmsPluginRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JmsPlugin. + */ + private String jmsPluginId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JmsPlugin. + */ + public String getJmsPluginId() { + return jmsPluginId; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetJmsPluginRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JmsPlugin. + */ + private String jmsPluginId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JmsPlugin. + * @param jmsPluginId the value to set + * @return this builder instance + */ + public Builder jmsPluginId(String jmsPluginId) { + this.jmsPluginId = jmsPluginId; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetJmsPluginRequest o) { + jmsPluginId(o.getJmsPluginId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetJmsPluginRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetJmsPluginRequest + */ + public GetJmsPluginRequest build() { + GetJmsPluginRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetJmsPluginRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetJmsPluginRequest + */ + public GetJmsPluginRequest buildWithoutInvocationCallback() { + GetJmsPluginRequest request = new GetJmsPluginRequest(); + request.jmsPluginId = jmsPluginId; + request.opcRequestId = opcRequestId; + return request; + // new GetJmsPluginRequest(jmsPluginId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().jmsPluginId(jmsPluginId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",jmsPluginId=").append(String.valueOf(this.jmsPluginId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetJmsPluginRequest)) { + return false; + } + + GetJmsPluginRequest other = (GetJmsPluginRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.jmsPluginId, other.jmsPluginId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.jmsPluginId == null ? 43 : this.jmsPluginId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListAgentInstallersRequest.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListAgentInstallersRequest.java new file mode 100644 index 00000000000..81f70974c22 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListAgentInstallersRequest.java @@ -0,0 +1,442 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.requests; + +import com.oracle.bmc.jms.model.*; +/** + * Example: Click here to see how to use ListAgentInstallersRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class ListAgentInstallersRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + * + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + * + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The ID of the Fleet. + */ + private String fleetId; + + /** + * The ID of the Fleet. + */ + public String getFleetId() { + return fleetId; + } + /** + * The platform architecture for the agent installer. + */ + private com.oracle.bmc.jms.model.PlatformArchitectureType platformArchitecture; + + /** + * The platform architecture for the agent installer. + */ + public com.oracle.bmc.jms.model.PlatformArchitectureType getPlatformArchitecture() { + return platformArchitecture; + } + /** + * The OS family for the agent installer. + */ + private com.oracle.bmc.jms.model.OsFamily osFamily; + + /** + * The OS family for the agent installer. + */ + public com.oracle.bmc.jms.model.OsFamily getOsFamily() { + return osFamily; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. The token is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. The token is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The sort order, either 'asc' or 'desc'. + */ + private com.oracle.bmc.jms.model.SortOrder sortOrder; + + /** + * The sort order, either 'asc' or 'desc'. + */ + public com.oracle.bmc.jms.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort the agent installer. Only one sort order can be provided. + * Default order for _agentInstallerId_, _osFamily_, _platformArchitecture_ is **ascending**. + * If no value is specified _agentInstallerId_ is default. + * + */ + private com.oracle.bmc.jms.model.AgentInstallerSortBy sortBy; + + /** + * The field to sort the agent installer. Only one sort order can be provided. + * Default order for _agentInstallerId_, _osFamily_, _platformArchitecture_ is **ascending**. + * If no value is specified _agentInstallerId_ is default. + * + */ + public com.oracle.bmc.jms.model.AgentInstallerSortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListAgentInstallersRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + * + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + * + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The ID of the Fleet. + */ + private String fleetId = null; + + /** + * The ID of the Fleet. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * The platform architecture for the agent installer. + */ + private com.oracle.bmc.jms.model.PlatformArchitectureType platformArchitecture = null; + + /** + * The platform architecture for the agent installer. + * @param platformArchitecture the value to set + * @return this builder instance + */ + public Builder platformArchitecture( + com.oracle.bmc.jms.model.PlatformArchitectureType platformArchitecture) { + this.platformArchitecture = platformArchitecture; + return this; + } + + /** + * The OS family for the agent installer. + */ + private com.oracle.bmc.jms.model.OsFamily osFamily = null; + + /** + * The OS family for the agent installer. + * @param osFamily the value to set + * @return this builder instance + */ + public Builder osFamily(com.oracle.bmc.jms.model.OsFamily osFamily) { + this.osFamily = osFamily; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. The token is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. The token is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order, either 'asc' or 'desc'. + */ + private com.oracle.bmc.jms.model.SortOrder sortOrder = null; + + /** + * The sort order, either 'asc' or 'desc'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.jms.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort the agent installer. Only one sort order can be provided. + * Default order for _agentInstallerId_, _osFamily_, _platformArchitecture_ is **ascending**. + * If no value is specified _agentInstallerId_ is default. + * + */ + private com.oracle.bmc.jms.model.AgentInstallerSortBy sortBy = null; + + /** + * The field to sort the agent installer. Only one sort order can be provided. + * Default order for _agentInstallerId_, _osFamily_, _platformArchitecture_ is **ascending**. + * If no value is specified _agentInstallerId_ is default. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(com.oracle.bmc.jms.model.AgentInstallerSortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAgentInstallersRequest o) { + compartmentId(o.getCompartmentId()); + fleetId(o.getFleetId()); + platformArchitecture(o.getPlatformArchitecture()); + osFamily(o.getOsFamily()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListAgentInstallersRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListAgentInstallersRequest + */ + public ListAgentInstallersRequest build() { + ListAgentInstallersRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListAgentInstallersRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListAgentInstallersRequest + */ + public ListAgentInstallersRequest buildWithoutInvocationCallback() { + ListAgentInstallersRequest request = new ListAgentInstallersRequest(); + request.compartmentId = compartmentId; + request.fleetId = fleetId; + request.platformArchitecture = platformArchitecture; + request.osFamily = osFamily; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListAgentInstallersRequest(compartmentId, fleetId, platformArchitecture, osFamily, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .fleetId(fleetId) + .platformArchitecture(platformArchitecture) + .osFamily(osFamily) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",platformArchitecture=").append(String.valueOf(this.platformArchitecture)); + sb.append(",osFamily=").append(String.valueOf(this.osFamily)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListAgentInstallersRequest)) { + return false; + } + + ListAgentInstallersRequest other = (ListAgentInstallersRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.platformArchitecture, other.platformArchitecture) + && java.util.Objects.equals(this.osFamily, other.osFamily) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.platformArchitecture == null + ? 43 + : this.platformArchitecture.hashCode()); + result = (result * PRIME) + (this.osFamily == null ? 43 : this.osFamily.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListCryptoAnalysisResultsRequest.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListCryptoAnalysisResultsRequest.java index 5dbd648ed2e..6d54454ac0a 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListCryptoAnalysisResultsRequest.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListCryptoAnalysisResultsRequest.java @@ -45,6 +45,83 @@ public com.oracle.bmc.jms.model.CryptoAnalysisResultMode getAggregationMode() { public String getManagedInstanceId() { return managedInstanceId; } + /** + * The host [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the managed instance. + */ + private String hostName; + + /** + * The host [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the managed instance. + */ + public String getHostName() { + return hostName; + } + /** + * Non Compliant Finding Count of CryptoAnalysis Report. + */ + private Integer nonCompliantFindingCount; + + /** + * Non Compliant Finding Count of CryptoAnalysis Report. + */ + public Integer getNonCompliantFindingCount() { + return nonCompliantFindingCount; + } + /** + * Non Compliant Finding Count of CryptoAnalysis Report. + */ + private Integer nonCompliantFindingCountGreaterThan; + + /** + * Non Compliant Finding Count of CryptoAnalysis Report. + */ + public Integer getNonCompliantFindingCountGreaterThan() { + return nonCompliantFindingCountGreaterThan; + } + /** + * FindingCount of CryptoAnalysis Report. + */ + private Integer findingCount; + + /** + * FindingCount of CryptoAnalysis Report. + */ + public Integer getFindingCount() { + return findingCount; + } + /** + * FindingCount of CryptoAnalysis Report. + */ + private Integer findingCountGreaterThan; + + /** + * FindingCount of CryptoAnalysis Report. + */ + public Integer getFindingCountGreaterThan() { + return findingCountGreaterThan; + } + /** + * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + private java.util.Date timeStart; + + /** + * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + public java.util.Date getTimeStart() { + return timeStart; + } + /** + * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + private java.util.Date timeEnd; + + /** + * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + public java.util.Date getTimeEnd() { + return timeEnd; + } /** * The maximum number of items to return. */ @@ -108,28 +185,6 @@ public com.oracle.bmc.jms.model.CryptoAnalysisResultSortBy getSortBy() { public String getOpcRequestId() { return opcRequestId; } - /** - * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - */ - private java.util.Date timeStart; - - /** - * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - */ - public java.util.Date getTimeStart() { - return timeStart; - } - /** - * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - */ - private java.util.Date timeEnd; - - /** - * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - */ - public java.util.Date getTimeEnd() { - return timeEnd; - } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -184,6 +239,112 @@ public Builder managedInstanceId(String managedInstanceId) { return this; } + /** + * The host [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the managed instance. + */ + private String hostName = null; + + /** + * The host [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the managed instance. + * @param hostName the value to set + * @return this builder instance + */ + public Builder hostName(String hostName) { + this.hostName = hostName; + return this; + } + + /** + * Non Compliant Finding Count of CryptoAnalysis Report. + */ + private Integer nonCompliantFindingCount = null; + + /** + * Non Compliant Finding Count of CryptoAnalysis Report. + * @param nonCompliantFindingCount the value to set + * @return this builder instance + */ + public Builder nonCompliantFindingCount(Integer nonCompliantFindingCount) { + this.nonCompliantFindingCount = nonCompliantFindingCount; + return this; + } + + /** + * Non Compliant Finding Count of CryptoAnalysis Report. + */ + private Integer nonCompliantFindingCountGreaterThan = null; + + /** + * Non Compliant Finding Count of CryptoAnalysis Report. + * @param nonCompliantFindingCountGreaterThan the value to set + * @return this builder instance + */ + public Builder nonCompliantFindingCountGreaterThan( + Integer nonCompliantFindingCountGreaterThan) { + this.nonCompliantFindingCountGreaterThan = nonCompliantFindingCountGreaterThan; + return this; + } + + /** + * FindingCount of CryptoAnalysis Report. + */ + private Integer findingCount = null; + + /** + * FindingCount of CryptoAnalysis Report. + * @param findingCount the value to set + * @return this builder instance + */ + public Builder findingCount(Integer findingCount) { + this.findingCount = findingCount; + return this; + } + + /** + * FindingCount of CryptoAnalysis Report. + */ + private Integer findingCountGreaterThan = null; + + /** + * FindingCount of CryptoAnalysis Report. + * @param findingCountGreaterThan the value to set + * @return this builder instance + */ + public Builder findingCountGreaterThan(Integer findingCountGreaterThan) { + this.findingCountGreaterThan = findingCountGreaterThan; + return this; + } + + /** + * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + private java.util.Date timeStart = null; + + /** + * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + * @param timeStart the value to set + * @return this builder instance + */ + public Builder timeStart(java.util.Date timeStart) { + this.timeStart = timeStart; + return this; + } + + /** + * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + private java.util.Date timeEnd = null; + + /** + * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + * @param timeEnd the value to set + * @return this builder instance + */ + public Builder timeEnd(java.util.Date timeEnd) { + this.timeEnd = timeEnd; + return this; + } + /** * The maximum number of items to return. */ @@ -267,36 +428,6 @@ public Builder opcRequestId(String opcRequestId) { return this; } - /** - * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - */ - private java.util.Date timeStart = null; - - /** - * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - * @param timeStart the value to set - * @return this builder instance - */ - public Builder timeStart(java.util.Date timeStart) { - this.timeStart = timeStart; - return this; - } - - /** - * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - */ - private java.util.Date timeEnd = null; - - /** - * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - * @param timeEnd the value to set - * @return this builder instance - */ - public Builder timeEnd(java.util.Date timeEnd) { - this.timeEnd = timeEnd; - return this; - } - /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -328,13 +459,18 @@ public Builder copy(ListCryptoAnalysisResultsRequest o) { fleetId(o.getFleetId()); aggregationMode(o.getAggregationMode()); managedInstanceId(o.getManagedInstanceId()); + hostName(o.getHostName()); + nonCompliantFindingCount(o.getNonCompliantFindingCount()); + nonCompliantFindingCountGreaterThan(o.getNonCompliantFindingCountGreaterThan()); + findingCount(o.getFindingCount()); + findingCountGreaterThan(o.getFindingCountGreaterThan()); + timeStart(o.getTimeStart()); + timeEnd(o.getTimeEnd()); limit(o.getLimit()); page(o.getPage()); sortOrder(o.getSortOrder()); sortBy(o.getSortBy()); opcRequestId(o.getOpcRequestId()); - timeStart(o.getTimeStart()); - timeEnd(o.getTimeEnd()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -370,15 +506,20 @@ public ListCryptoAnalysisResultsRequest buildWithoutInvocationCallback() { request.fleetId = fleetId; request.aggregationMode = aggregationMode; request.managedInstanceId = managedInstanceId; + request.hostName = hostName; + request.nonCompliantFindingCount = nonCompliantFindingCount; + request.nonCompliantFindingCountGreaterThan = nonCompliantFindingCountGreaterThan; + request.findingCount = findingCount; + request.findingCountGreaterThan = findingCountGreaterThan; + request.timeStart = timeStart; + request.timeEnd = timeEnd; request.limit = limit; request.page = page; request.sortOrder = sortOrder; request.sortBy = sortBy; request.opcRequestId = opcRequestId; - request.timeStart = timeStart; - request.timeEnd = timeEnd; return request; - // new ListCryptoAnalysisResultsRequest(fleetId, aggregationMode, managedInstanceId, limit, page, sortOrder, sortBy, opcRequestId, timeStart, timeEnd); + // new ListCryptoAnalysisResultsRequest(fleetId, aggregationMode, managedInstanceId, hostName, nonCompliantFindingCount, nonCompliantFindingCountGreaterThan, findingCount, findingCountGreaterThan, timeStart, timeEnd, limit, page, sortOrder, sortBy, opcRequestId); } } @@ -391,13 +532,18 @@ public Builder toBuilder() { .fleetId(fleetId) .aggregationMode(aggregationMode) .managedInstanceId(managedInstanceId) + .hostName(hostName) + .nonCompliantFindingCount(nonCompliantFindingCount) + .nonCompliantFindingCountGreaterThan(nonCompliantFindingCountGreaterThan) + .findingCount(findingCount) + .findingCountGreaterThan(findingCountGreaterThan) + .timeStart(timeStart) + .timeEnd(timeEnd) .limit(limit) .page(page) .sortOrder(sortOrder) .sortBy(sortBy) - .opcRequestId(opcRequestId) - .timeStart(timeStart) - .timeEnd(timeEnd); + .opcRequestId(opcRequestId); } /** @@ -416,13 +562,20 @@ public String toString() { sb.append(",fleetId=").append(String.valueOf(this.fleetId)); sb.append(",aggregationMode=").append(String.valueOf(this.aggregationMode)); sb.append(",managedInstanceId=").append(String.valueOf(this.managedInstanceId)); + sb.append(",hostName=").append(String.valueOf(this.hostName)); + sb.append(",nonCompliantFindingCount=") + .append(String.valueOf(this.nonCompliantFindingCount)); + sb.append(",nonCompliantFindingCountGreaterThan=") + .append(String.valueOf(this.nonCompliantFindingCountGreaterThan)); + sb.append(",findingCount=").append(String.valueOf(this.findingCount)); + sb.append(",findingCountGreaterThan=").append(String.valueOf(this.findingCountGreaterThan)); + sb.append(",timeStart=").append(String.valueOf(this.timeStart)); + sb.append(",timeEnd=").append(String.valueOf(this.timeEnd)); sb.append(",limit=").append(String.valueOf(this.limit)); sb.append(",page=").append(String.valueOf(this.page)); sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); sb.append(",sortBy=").append(String.valueOf(this.sortBy)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); - sb.append(",timeStart=").append(String.valueOf(this.timeStart)); - sb.append(",timeEnd=").append(String.valueOf(this.timeEnd)); sb.append(")"); return sb.toString(); } @@ -441,13 +594,22 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.fleetId, other.fleetId) && java.util.Objects.equals(this.aggregationMode, other.aggregationMode) && java.util.Objects.equals(this.managedInstanceId, other.managedInstanceId) + && java.util.Objects.equals(this.hostName, other.hostName) + && java.util.Objects.equals( + this.nonCompliantFindingCount, other.nonCompliantFindingCount) + && java.util.Objects.equals( + this.nonCompliantFindingCountGreaterThan, + other.nonCompliantFindingCountGreaterThan) + && java.util.Objects.equals(this.findingCount, other.findingCount) + && java.util.Objects.equals( + this.findingCountGreaterThan, other.findingCountGreaterThan) + && java.util.Objects.equals(this.timeStart, other.timeStart) + && java.util.Objects.equals(this.timeEnd, other.timeEnd) && java.util.Objects.equals(this.limit, other.limit) && java.util.Objects.equals(this.page, other.page) && java.util.Objects.equals(this.sortOrder, other.sortOrder) && java.util.Objects.equals(this.sortBy, other.sortBy) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) - && java.util.Objects.equals(this.timeStart, other.timeStart) - && java.util.Objects.equals(this.timeEnd, other.timeEnd); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); } @Override @@ -461,13 +623,30 @@ public int hashCode() { result = (result * PRIME) + (this.managedInstanceId == null ? 43 : this.managedInstanceId.hashCode()); + result = (result * PRIME) + (this.hostName == null ? 43 : this.hostName.hashCode()); + result = + (result * PRIME) + + (this.nonCompliantFindingCount == null + ? 43 + : this.nonCompliantFindingCount.hashCode()); + result = + (result * PRIME) + + (this.nonCompliantFindingCountGreaterThan == null + ? 43 + : this.nonCompliantFindingCountGreaterThan.hashCode()); + result = (result * PRIME) + (this.findingCount == null ? 43 : this.findingCount.hashCode()); + result = + (result * PRIME) + + (this.findingCountGreaterThan == null + ? 43 + : this.findingCountGreaterThan.hashCode()); + result = (result * PRIME) + (this.timeStart == null ? 43 : this.timeStart.hashCode()); + result = (result * PRIME) + (this.timeEnd == null ? 43 : this.timeEnd.hashCode()); result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); - result = (result * PRIME) + (this.timeStart == null ? 43 : this.timeStart.hashCode()); - result = (result * PRIME) + (this.timeEnd == null ? 43 : this.timeEnd.hashCode()); return result; } } diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListFleetsRequest.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListFleetsRequest.java index d33d7ae0c80..6dc9f933572 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListFleetsRequest.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListFleetsRequest.java @@ -25,12 +25,12 @@ public String getCompartmentId() { return compartmentId; } /** - * The ID of the Fleet. + * The ID. */ private String id; /** - * The ID of the Fleet. + * The ID. */ public String getId() { return id; @@ -161,12 +161,12 @@ public Builder compartmentId(String compartmentId) { } /** - * The ID of the Fleet. + * The ID. */ private String id = null; /** - * The ID of the Fleet. + * The ID. * @param id the value to set * @return this builder instance */ diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListJavaMigrationAnalysisResultsRequest.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListJavaMigrationAnalysisResultsRequest.java index ac6c9ceac1e..8c20adffc73 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListJavaMigrationAnalysisResultsRequest.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListJavaMigrationAnalysisResultsRequest.java @@ -34,6 +34,50 @@ public String getFleetId() { public String getManagedInstanceId() { return managedInstanceId; } + /** + * The host [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the managed instance. + */ + private String hostName; + + /** + * The host [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the managed instance. + */ + public String getHostName() { + return hostName; + } + /** + * The name of the application. + */ + private String applicationName; + + /** + * The name of the application. + */ + public String getApplicationName() { + return applicationName; + } + /** + * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + private java.util.Date timeStart; + + /** + * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + public java.util.Date getTimeStart() { + return timeStart; + } + /** + * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + private java.util.Date timeEnd; + + /** + * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + public java.util.Date getTimeEnd() { + return timeEnd; + } /** * The maximum number of items to return. */ @@ -95,28 +139,6 @@ public com.oracle.bmc.jms.model.JavaMigrationAnalysisResultSortBy getSortBy() { public String getOpcRequestId() { return opcRequestId; } - /** - * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - */ - private java.util.Date timeStart; - - /** - * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - */ - public java.util.Date getTimeStart() { - return timeStart; - } - /** - * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - */ - private java.util.Date timeEnd; - - /** - * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - */ - public java.util.Date getTimeEnd() { - return timeEnd; - } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -155,6 +177,66 @@ public Builder managedInstanceId(String managedInstanceId) { return this; } + /** + * The host [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the managed instance. + */ + private String hostName = null; + + /** + * The host [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the managed instance. + * @param hostName the value to set + * @return this builder instance + */ + public Builder hostName(String hostName) { + this.hostName = hostName; + return this; + } + + /** + * The name of the application. + */ + private String applicationName = null; + + /** + * The name of the application. + * @param applicationName the value to set + * @return this builder instance + */ + public Builder applicationName(String applicationName) { + this.applicationName = applicationName; + return this; + } + + /** + * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + private java.util.Date timeStart = null; + + /** + * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + * @param timeStart the value to set + * @return this builder instance + */ + public Builder timeStart(java.util.Date timeStart) { + this.timeStart = timeStart; + return this; + } + + /** + * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + private java.util.Date timeEnd = null; + + /** + * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + * @param timeEnd the value to set + * @return this builder instance + */ + public Builder timeEnd(java.util.Date timeEnd) { + this.timeEnd = timeEnd; + return this; + } + /** * The maximum number of items to return. */ @@ -236,36 +318,6 @@ public Builder opcRequestId(String opcRequestId) { return this; } - /** - * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - */ - private java.util.Date timeStart = null; - - /** - * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - * @param timeStart the value to set - * @return this builder instance - */ - public Builder timeStart(java.util.Date timeStart) { - this.timeStart = timeStart; - return this; - } - - /** - * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - */ - private java.util.Date timeEnd = null; - - /** - * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - * @param timeEnd the value to set - * @return this builder instance - */ - public Builder timeEnd(java.util.Date timeEnd) { - this.timeEnd = timeEnd; - return this; - } - /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -296,13 +348,15 @@ public Builder retryConfiguration( public Builder copy(ListJavaMigrationAnalysisResultsRequest o) { fleetId(o.getFleetId()); managedInstanceId(o.getManagedInstanceId()); + hostName(o.getHostName()); + applicationName(o.getApplicationName()); + timeStart(o.getTimeStart()); + timeEnd(o.getTimeEnd()); limit(o.getLimit()); page(o.getPage()); sortOrder(o.getSortOrder()); sortBy(o.getSortBy()); opcRequestId(o.getOpcRequestId()); - timeStart(o.getTimeStart()); - timeEnd(o.getTimeEnd()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -338,15 +392,17 @@ public ListJavaMigrationAnalysisResultsRequest buildWithoutInvocationCallback() new ListJavaMigrationAnalysisResultsRequest(); request.fleetId = fleetId; request.managedInstanceId = managedInstanceId; + request.hostName = hostName; + request.applicationName = applicationName; + request.timeStart = timeStart; + request.timeEnd = timeEnd; request.limit = limit; request.page = page; request.sortOrder = sortOrder; request.sortBy = sortBy; request.opcRequestId = opcRequestId; - request.timeStart = timeStart; - request.timeEnd = timeEnd; return request; - // new ListJavaMigrationAnalysisResultsRequest(fleetId, managedInstanceId, limit, page, sortOrder, sortBy, opcRequestId, timeStart, timeEnd); + // new ListJavaMigrationAnalysisResultsRequest(fleetId, managedInstanceId, hostName, applicationName, timeStart, timeEnd, limit, page, sortOrder, sortBy, opcRequestId); } } @@ -358,13 +414,15 @@ public Builder toBuilder() { return new Builder() .fleetId(fleetId) .managedInstanceId(managedInstanceId) + .hostName(hostName) + .applicationName(applicationName) + .timeStart(timeStart) + .timeEnd(timeEnd) .limit(limit) .page(page) .sortOrder(sortOrder) .sortBy(sortBy) - .opcRequestId(opcRequestId) - .timeStart(timeStart) - .timeEnd(timeEnd); + .opcRequestId(opcRequestId); } /** @@ -382,13 +440,15 @@ public String toString() { sb.append("super=").append(super.toString()); sb.append(",fleetId=").append(String.valueOf(this.fleetId)); sb.append(",managedInstanceId=").append(String.valueOf(this.managedInstanceId)); + sb.append(",hostName=").append(String.valueOf(this.hostName)); + sb.append(",applicationName=").append(String.valueOf(this.applicationName)); + sb.append(",timeStart=").append(String.valueOf(this.timeStart)); + sb.append(",timeEnd=").append(String.valueOf(this.timeEnd)); sb.append(",limit=").append(String.valueOf(this.limit)); sb.append(",page=").append(String.valueOf(this.page)); sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); sb.append(",sortBy=").append(String.valueOf(this.sortBy)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); - sb.append(",timeStart=").append(String.valueOf(this.timeStart)); - sb.append(",timeEnd=").append(String.valueOf(this.timeEnd)); sb.append(")"); return sb.toString(); } @@ -406,13 +466,15 @@ public boolean equals(Object o) { return super.equals(o) && java.util.Objects.equals(this.fleetId, other.fleetId) && java.util.Objects.equals(this.managedInstanceId, other.managedInstanceId) + && java.util.Objects.equals(this.hostName, other.hostName) + && java.util.Objects.equals(this.applicationName, other.applicationName) + && java.util.Objects.equals(this.timeStart, other.timeStart) + && java.util.Objects.equals(this.timeEnd, other.timeEnd) && java.util.Objects.equals(this.limit, other.limit) && java.util.Objects.equals(this.page, other.page) && java.util.Objects.equals(this.sortOrder, other.sortOrder) && java.util.Objects.equals(this.sortBy, other.sortBy) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) - && java.util.Objects.equals(this.timeStart, other.timeStart) - && java.util.Objects.equals(this.timeEnd, other.timeEnd); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); } @Override @@ -423,13 +485,17 @@ public int hashCode() { result = (result * PRIME) + (this.managedInstanceId == null ? 43 : this.managedInstanceId.hashCode()); + result = (result * PRIME) + (this.hostName == null ? 43 : this.hostName.hashCode()); + result = + (result * PRIME) + + (this.applicationName == null ? 43 : this.applicationName.hashCode()); + result = (result * PRIME) + (this.timeStart == null ? 43 : this.timeStart.hashCode()); + result = (result * PRIME) + (this.timeEnd == null ? 43 : this.timeEnd.hashCode()); result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); - result = (result * PRIME) + (this.timeStart == null ? 43 : this.timeStart.hashCode()); - result = (result * PRIME) + (this.timeEnd == null ? 43 : this.timeEnd.hashCode()); return result; } } diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListJmsPluginsRequest.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListJmsPluginsRequest.java new file mode 100644 index 00000000000..15d394d0538 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListJmsPluginsRequest.java @@ -0,0 +1,665 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.requests; + +import com.oracle.bmc.jms.model.*; +/** + * Example: Click here to see how to use ListJmsPluginsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class ListJmsPluginsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + * + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + * + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * Flag to determine whether the info should be gathered only in the compartment or in the compartment and its subcompartments. + * + */ + private Boolean compartmentIdInSubtree; + + /** + * Flag to determine whether the info should be gathered only in the compartment or in the compartment and its subcompartments. + * + */ + public Boolean getCompartmentIdInSubtree() { + return compartmentIdInSubtree; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JmsPlugin. + */ + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JmsPlugin. + */ + public String getId() { + return id; + } + /** + * The ID of the Fleet. + */ + private String fleetId; + + /** + * The ID of the Fleet. + */ + public String getFleetId() { + return fleetId; + } + /** + * The ManagementAgent (OMA) or Instance (OCA) [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) that identifies the Agent. + */ + private String agentId; + + /** + * The ManagementAgent (OMA) or Instance (OCA) [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) that identifies the Agent. + */ + public String getAgentId() { + return agentId; + } + /** + * Filter JmsPlugin with its lifecycle state. + */ + private com.oracle.bmc.jms.model.JmsPluginLifecycleState lifecycleState; + + /** + * Filter JmsPlugin with its lifecycle state. + */ + public com.oracle.bmc.jms.model.JmsPluginLifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * Filter JmsPlugin with its availability status. + */ + private com.oracle.bmc.jms.model.JmsPluginAvailabilityStatus availabilityStatus; + + /** + * Filter JmsPlugin with its availability status. + */ + public com.oracle.bmc.jms.model.JmsPluginAvailabilityStatus getAvailabilityStatus() { + return availabilityStatus; + } + /** + * If present, only plugins with a registration time before this parameter are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + private java.util.Date timeRegisteredLessThanOrEqualTo; + + /** + * If present, only plugins with a registration time before this parameter are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + public java.util.Date getTimeRegisteredLessThanOrEqualTo() { + return timeRegisteredLessThanOrEqualTo; + } + /** + * If present, only plugins with a last seen time before this parameter are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + private java.util.Date timeLastSeenLessThanOrEqualTo; + + /** + * If present, only plugins with a last seen time before this parameter are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + public java.util.Date getTimeLastSeenLessThanOrEqualTo() { + return timeLastSeenLessThanOrEqualTo; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * The page token representing the page at which to start retrieving results. The token is usually retrieved from a previous list call. + */ + private String page; + + /** + * The page token representing the page at which to start retrieving results. The token is usually retrieved from a previous list call. + */ + public String getPage() { + return page; + } + /** + * The sort order, either 'asc' or 'desc'. + */ + private com.oracle.bmc.jms.model.SortOrder sortOrder; + + /** + * The sort order, either 'asc' or 'desc'. + */ + public com.oracle.bmc.jms.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort JmsPlugin. Only one sort order may be provided. + * Default order is **descending**. + * If no value is specified _timeLastSeen_ is default. + * + */ + private com.oracle.bmc.jms.model.JmsPluginSortBy sortBy; + + /** + * The field to sort JmsPlugin. Only one sort order may be provided. + * Default order is **descending**. + * If no value is specified _timeLastSeen_ is default. + * + */ + public com.oracle.bmc.jms.model.JmsPluginSortBy getSortBy() { + return sortBy; + } + /** + * Filter the list with hostname contains the given value. + * + */ + private String hostnameContains; + + /** + * Filter the list with hostname contains the given value. + * + */ + public String getHostnameContains() { + return hostnameContains; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListJmsPluginsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + * + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + * + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * Flag to determine whether the info should be gathered only in the compartment or in the compartment and its subcompartments. + * + */ + private Boolean compartmentIdInSubtree = null; + + /** + * Flag to determine whether the info should be gathered only in the compartment or in the compartment and its subcompartments. + * + * @param compartmentIdInSubtree the value to set + * @return this builder instance + */ + public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { + this.compartmentIdInSubtree = compartmentIdInSubtree; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JmsPlugin. + */ + private String id = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JmsPlugin. + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the Fleet. + */ + private String fleetId = null; + + /** + * The ID of the Fleet. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * The ManagementAgent (OMA) or Instance (OCA) [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) that identifies the Agent. + */ + private String agentId = null; + + /** + * The ManagementAgent (OMA) or Instance (OCA) [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) that identifies the Agent. + * @param agentId the value to set + * @return this builder instance + */ + public Builder agentId(String agentId) { + this.agentId = agentId; + return this; + } + + /** + * Filter JmsPlugin with its lifecycle state. + */ + private com.oracle.bmc.jms.model.JmsPluginLifecycleState lifecycleState = null; + + /** + * Filter JmsPlugin with its lifecycle state. + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.jms.model.JmsPluginLifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * Filter JmsPlugin with its availability status. + */ + private com.oracle.bmc.jms.model.JmsPluginAvailabilityStatus availabilityStatus = null; + + /** + * Filter JmsPlugin with its availability status. + * @param availabilityStatus the value to set + * @return this builder instance + */ + public Builder availabilityStatus( + com.oracle.bmc.jms.model.JmsPluginAvailabilityStatus availabilityStatus) { + this.availabilityStatus = availabilityStatus; + return this; + } + + /** + * If present, only plugins with a registration time before this parameter are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + private java.util.Date timeRegisteredLessThanOrEqualTo = null; + + /** + * If present, only plugins with a registration time before this parameter are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + * @param timeRegisteredLessThanOrEqualTo the value to set + * @return this builder instance + */ + public Builder timeRegisteredLessThanOrEqualTo( + java.util.Date timeRegisteredLessThanOrEqualTo) { + this.timeRegisteredLessThanOrEqualTo = timeRegisteredLessThanOrEqualTo; + return this; + } + + /** + * If present, only plugins with a last seen time before this parameter are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + private java.util.Date timeLastSeenLessThanOrEqualTo = null; + + /** + * If present, only plugins with a last seen time before this parameter are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + * @param timeLastSeenLessThanOrEqualTo the value to set + * @return this builder instance + */ + public Builder timeLastSeenLessThanOrEqualTo(java.util.Date timeLastSeenLessThanOrEqualTo) { + this.timeLastSeenLessThanOrEqualTo = timeLastSeenLessThanOrEqualTo; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The page token representing the page at which to start retrieving results. The token is usually retrieved from a previous list call. + */ + private String page = null; + + /** + * The page token representing the page at which to start retrieving results. The token is usually retrieved from a previous list call. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order, either 'asc' or 'desc'. + */ + private com.oracle.bmc.jms.model.SortOrder sortOrder = null; + + /** + * The sort order, either 'asc' or 'desc'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.jms.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort JmsPlugin. Only one sort order may be provided. + * Default order is **descending**. + * If no value is specified _timeLastSeen_ is default. + * + */ + private com.oracle.bmc.jms.model.JmsPluginSortBy sortBy = null; + + /** + * The field to sort JmsPlugin. Only one sort order may be provided. + * Default order is **descending**. + * If no value is specified _timeLastSeen_ is default. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(com.oracle.bmc.jms.model.JmsPluginSortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Filter the list with hostname contains the given value. + * + */ + private String hostnameContains = null; + + /** + * Filter the list with hostname contains the given value. + * + * @param hostnameContains the value to set + * @return this builder instance + */ + public Builder hostnameContains(String hostnameContains) { + this.hostnameContains = hostnameContains; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListJmsPluginsRequest o) { + compartmentId(o.getCompartmentId()); + compartmentIdInSubtree(o.getCompartmentIdInSubtree()); + id(o.getId()); + fleetId(o.getFleetId()); + agentId(o.getAgentId()); + lifecycleState(o.getLifecycleState()); + availabilityStatus(o.getAvailabilityStatus()); + timeRegisteredLessThanOrEqualTo(o.getTimeRegisteredLessThanOrEqualTo()); + timeLastSeenLessThanOrEqualTo(o.getTimeLastSeenLessThanOrEqualTo()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + hostnameContains(o.getHostnameContains()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListJmsPluginsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListJmsPluginsRequest + */ + public ListJmsPluginsRequest build() { + ListJmsPluginsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListJmsPluginsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListJmsPluginsRequest + */ + public ListJmsPluginsRequest buildWithoutInvocationCallback() { + ListJmsPluginsRequest request = new ListJmsPluginsRequest(); + request.compartmentId = compartmentId; + request.compartmentIdInSubtree = compartmentIdInSubtree; + request.id = id; + request.fleetId = fleetId; + request.agentId = agentId; + request.lifecycleState = lifecycleState; + request.availabilityStatus = availabilityStatus; + request.timeRegisteredLessThanOrEqualTo = timeRegisteredLessThanOrEqualTo; + request.timeLastSeenLessThanOrEqualTo = timeLastSeenLessThanOrEqualTo; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.hostnameContains = hostnameContains; + request.opcRequestId = opcRequestId; + return request; + // new ListJmsPluginsRequest(compartmentId, compartmentIdInSubtree, id, fleetId, agentId, lifecycleState, availabilityStatus, timeRegisteredLessThanOrEqualTo, timeLastSeenLessThanOrEqualTo, limit, page, sortOrder, sortBy, hostnameContains, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .compartmentIdInSubtree(compartmentIdInSubtree) + .id(id) + .fleetId(fleetId) + .agentId(agentId) + .lifecycleState(lifecycleState) + .availabilityStatus(availabilityStatus) + .timeRegisteredLessThanOrEqualTo(timeRegisteredLessThanOrEqualTo) + .timeLastSeenLessThanOrEqualTo(timeLastSeenLessThanOrEqualTo) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .hostnameContains(hostnameContains) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",compartmentIdInSubtree=").append(String.valueOf(this.compartmentIdInSubtree)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",agentId=").append(String.valueOf(this.agentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",availabilityStatus=").append(String.valueOf(this.availabilityStatus)); + sb.append(",timeRegisteredLessThanOrEqualTo=") + .append(String.valueOf(this.timeRegisteredLessThanOrEqualTo)); + sb.append(",timeLastSeenLessThanOrEqualTo=") + .append(String.valueOf(this.timeLastSeenLessThanOrEqualTo)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",hostnameContains=").append(String.valueOf(this.hostnameContains)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListJmsPluginsRequest)) { + return false; + } + + ListJmsPluginsRequest other = (ListJmsPluginsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals( + this.compartmentIdInSubtree, other.compartmentIdInSubtree) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals(this.agentId, other.agentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.availabilityStatus, other.availabilityStatus) + && java.util.Objects.equals( + this.timeRegisteredLessThanOrEqualTo, other.timeRegisteredLessThanOrEqualTo) + && java.util.Objects.equals( + this.timeLastSeenLessThanOrEqualTo, other.timeLastSeenLessThanOrEqualTo) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.hostnameContains, other.hostnameContains) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.compartmentIdInSubtree == null + ? 43 + : this.compartmentIdInSubtree.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = (result * PRIME) + (this.agentId == null ? 43 : this.agentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.availabilityStatus == null + ? 43 + : this.availabilityStatus.hashCode()); + result = + (result * PRIME) + + (this.timeRegisteredLessThanOrEqualTo == null + ? 43 + : this.timeRegisteredLessThanOrEqualTo.hashCode()); + result = + (result * PRIME) + + (this.timeLastSeenLessThanOrEqualTo == null + ? 43 + : this.timeLastSeenLessThanOrEqualTo.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = + (result * PRIME) + + (this.hostnameContains == null ? 43 : this.hostnameContains.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListPerformanceTuningAnalysisResultsRequest.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListPerformanceTuningAnalysisResultsRequest.java index 2086dd11594..37c713d87e5 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListPerformanceTuningAnalysisResultsRequest.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListPerformanceTuningAnalysisResultsRequest.java @@ -45,6 +45,39 @@ public String getManagedInstanceId() { public String getApplicationId() { return applicationId; } + /** + * The host [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the managed instance. + */ + private String hostName; + + /** + * The host [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the managed instance. + */ + public String getHostName() { + return hostName; + } + /** + * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + private java.util.Date timeStart; + + /** + * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + public java.util.Date getTimeStart() { + return timeStart; + } + /** + * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + private java.util.Date timeEnd; + + /** + * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + public java.util.Date getTimeEnd() { + return timeEnd; + } /** * The maximum number of items to return. */ @@ -108,28 +141,6 @@ public com.oracle.bmc.jms.model.PerformanceTuningAnalysisResultSortBy getSortBy( public String getOpcRequestId() { return opcRequestId; } - /** - * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - */ - private java.util.Date timeStart; - - /** - * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - */ - public java.util.Date getTimeStart() { - return timeStart; - } - /** - * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - */ - private java.util.Date timeEnd; - - /** - * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - */ - public java.util.Date getTimeEnd() { - return timeEnd; - } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -183,6 +194,51 @@ public Builder applicationId(String applicationId) { return this; } + /** + * The host [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the managed instance. + */ + private String hostName = null; + + /** + * The host [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the managed instance. + * @param hostName the value to set + * @return this builder instance + */ + public Builder hostName(String hostName) { + this.hostName = hostName; + return this; + } + + /** + * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + private java.util.Date timeStart = null; + + /** + * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + * @param timeStart the value to set + * @return this builder instance + */ + public Builder timeStart(java.util.Date timeStart) { + this.timeStart = timeStart; + return this; + } + + /** + * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + */ + private java.util.Date timeEnd = null; + + /** + * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). + * @param timeEnd the value to set + * @return this builder instance + */ + public Builder timeEnd(java.util.Date timeEnd) { + this.timeEnd = timeEnd; + return this; + } + /** * The maximum number of items to return. */ @@ -267,36 +323,6 @@ public Builder opcRequestId(String opcRequestId) { return this; } - /** - * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - */ - private java.util.Date timeStart = null; - - /** - * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - * @param timeStart the value to set - * @return this builder instance - */ - public Builder timeStart(java.util.Date timeStart) { - this.timeStart = timeStart; - return this; - } - - /** - * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - */ - private java.util.Date timeEnd = null; - - /** - * The end of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). - * @param timeEnd the value to set - * @return this builder instance - */ - public Builder timeEnd(java.util.Date timeEnd) { - this.timeEnd = timeEnd; - return this; - } - /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -328,13 +354,14 @@ public Builder copy(ListPerformanceTuningAnalysisResultsRequest o) { fleetId(o.getFleetId()); managedInstanceId(o.getManagedInstanceId()); applicationId(o.getApplicationId()); + hostName(o.getHostName()); + timeStart(o.getTimeStart()); + timeEnd(o.getTimeEnd()); limit(o.getLimit()); page(o.getPage()); sortOrder(o.getSortOrder()); sortBy(o.getSortBy()); opcRequestId(o.getOpcRequestId()); - timeStart(o.getTimeStart()); - timeEnd(o.getTimeEnd()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -371,15 +398,16 @@ public ListPerformanceTuningAnalysisResultsRequest buildWithoutInvocationCallbac request.fleetId = fleetId; request.managedInstanceId = managedInstanceId; request.applicationId = applicationId; + request.hostName = hostName; + request.timeStart = timeStart; + request.timeEnd = timeEnd; request.limit = limit; request.page = page; request.sortOrder = sortOrder; request.sortBy = sortBy; request.opcRequestId = opcRequestId; - request.timeStart = timeStart; - request.timeEnd = timeEnd; return request; - // new ListPerformanceTuningAnalysisResultsRequest(fleetId, managedInstanceId, applicationId, limit, page, sortOrder, sortBy, opcRequestId, timeStart, timeEnd); + // new ListPerformanceTuningAnalysisResultsRequest(fleetId, managedInstanceId, applicationId, hostName, timeStart, timeEnd, limit, page, sortOrder, sortBy, opcRequestId); } } @@ -392,13 +420,14 @@ public Builder toBuilder() { .fleetId(fleetId) .managedInstanceId(managedInstanceId) .applicationId(applicationId) + .hostName(hostName) + .timeStart(timeStart) + .timeEnd(timeEnd) .limit(limit) .page(page) .sortOrder(sortOrder) .sortBy(sortBy) - .opcRequestId(opcRequestId) - .timeStart(timeStart) - .timeEnd(timeEnd); + .opcRequestId(opcRequestId); } /** @@ -417,13 +446,14 @@ public String toString() { sb.append(",fleetId=").append(String.valueOf(this.fleetId)); sb.append(",managedInstanceId=").append(String.valueOf(this.managedInstanceId)); sb.append(",applicationId=").append(String.valueOf(this.applicationId)); + sb.append(",hostName=").append(String.valueOf(this.hostName)); + sb.append(",timeStart=").append(String.valueOf(this.timeStart)); + sb.append(",timeEnd=").append(String.valueOf(this.timeEnd)); sb.append(",limit=").append(String.valueOf(this.limit)); sb.append(",page=").append(String.valueOf(this.page)); sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); sb.append(",sortBy=").append(String.valueOf(this.sortBy)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); - sb.append(",timeStart=").append(String.valueOf(this.timeStart)); - sb.append(",timeEnd=").append(String.valueOf(this.timeEnd)); sb.append(")"); return sb.toString(); } @@ -443,13 +473,14 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.fleetId, other.fleetId) && java.util.Objects.equals(this.managedInstanceId, other.managedInstanceId) && java.util.Objects.equals(this.applicationId, other.applicationId) + && java.util.Objects.equals(this.hostName, other.hostName) + && java.util.Objects.equals(this.timeStart, other.timeStart) + && java.util.Objects.equals(this.timeEnd, other.timeEnd) && java.util.Objects.equals(this.limit, other.limit) && java.util.Objects.equals(this.page, other.page) && java.util.Objects.equals(this.sortOrder, other.sortOrder) && java.util.Objects.equals(this.sortBy, other.sortBy) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) - && java.util.Objects.equals(this.timeStart, other.timeStart) - && java.util.Objects.equals(this.timeEnd, other.timeEnd); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); } @Override @@ -463,13 +494,14 @@ public int hashCode() { result = (result * PRIME) + (this.applicationId == null ? 43 : this.applicationId.hashCode()); + result = (result * PRIME) + (this.hostName == null ? 43 : this.hostName.hashCode()); + result = (result * PRIME) + (this.timeStart == null ? 43 : this.timeStart.hashCode()); + result = (result * PRIME) + (this.timeEnd == null ? 43 : this.timeEnd.hashCode()); result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); - result = (result * PRIME) + (this.timeStart == null ? 43 : this.timeStart.hashCode()); - result = (result * PRIME) + (this.timeEnd == null ? 43 : this.timeEnd.hashCode()); return result; } } diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListWorkRequestsRequest.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListWorkRequestsRequest.java index 1715ffd755b..6cd9248a51e 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListWorkRequestsRequest.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/ListWorkRequestsRequest.java @@ -90,6 +90,28 @@ public Integer getLimit() { public String getManagedInstanceId() { return managedInstanceId; } + /** + * The operation type of the work request. + */ + private com.oracle.bmc.jms.model.OperationType operationType; + + /** + * The operation type of the work request. + */ + public com.oracle.bmc.jms.model.OperationType getOperationType() { + return operationType; + } + /** + * The status of the work request. + */ + private java.util.List status; + + /** + * The status of the work request. + */ + public java.util.List getStatus() { + return status; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -205,6 +227,45 @@ public Builder managedInstanceId(String managedInstanceId) { return this; } + /** + * The operation type of the work request. + */ + private com.oracle.bmc.jms.model.OperationType operationType = null; + + /** + * The operation type of the work request. + * @param operationType the value to set + * @return this builder instance + */ + public Builder operationType(com.oracle.bmc.jms.model.OperationType operationType) { + this.operationType = operationType; + return this; + } + + /** + * The status of the work request. + */ + private java.util.List status = null; + + /** + * The status of the work request. + * @param status the value to set + * @return this builder instance + */ + public Builder status(java.util.List status) { + this.status = status; + return this; + } + + /** + * Singular setter. The status of the work request. + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder status(OperationStatus singularValue) { + return this.status(java.util.Arrays.asList(singularValue)); + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -240,6 +301,8 @@ public Builder copy(ListWorkRequestsRequest o) { page(o.getPage()); limit(o.getLimit()); managedInstanceId(o.getManagedInstanceId()); + operationType(o.getOperationType()); + status(o.getStatus()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -279,8 +342,10 @@ public ListWorkRequestsRequest buildWithoutInvocationCallback() { request.page = page; request.limit = limit; request.managedInstanceId = managedInstanceId; + request.operationType = operationType; + request.status = status; return request; - // new ListWorkRequestsRequest(compartmentId, id, fleetId, opcRequestId, page, limit, managedInstanceId); + // new ListWorkRequestsRequest(compartmentId, id, fleetId, opcRequestId, page, limit, managedInstanceId, operationType, status); } } @@ -296,7 +361,9 @@ public Builder toBuilder() { .opcRequestId(opcRequestId) .page(page) .limit(limit) - .managedInstanceId(managedInstanceId); + .managedInstanceId(managedInstanceId) + .operationType(operationType) + .status(status); } /** @@ -319,6 +386,8 @@ public String toString() { sb.append(",page=").append(String.valueOf(this.page)); sb.append(",limit=").append(String.valueOf(this.limit)); sb.append(",managedInstanceId=").append(String.valueOf(this.managedInstanceId)); + sb.append(",operationType=").append(String.valueOf(this.operationType)); + sb.append(",status=").append(String.valueOf(this.status)); sb.append(")"); return sb.toString(); } @@ -340,7 +409,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) && java.util.Objects.equals(this.page, other.page) && java.util.Objects.equals(this.limit, other.limit) - && java.util.Objects.equals(this.managedInstanceId, other.managedInstanceId); + && java.util.Objects.equals(this.managedInstanceId, other.managedInstanceId) + && java.util.Objects.equals(this.operationType, other.operationType) + && java.util.Objects.equals(this.status, other.status); } @Override @@ -358,6 +429,10 @@ public int hashCode() { result = (result * PRIME) + (this.managedInstanceId == null ? 43 : this.managedInstanceId.hashCode()); + result = + (result * PRIME) + + (this.operationType == null ? 43 : this.operationType.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); return result; } } diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/RequestDeployedApplicationMigrationAnalysesRequest.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/RequestDeployedApplicationMigrationAnalysesRequest.java new file mode 100644 index 00000000000..437d6370d5c --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/RequestDeployedApplicationMigrationAnalysesRequest.java @@ -0,0 +1,272 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.requests; + +import com.oracle.bmc.jms.model.*; +/** + * Example: Click here to see how to use RequestDeployedApplicationMigrationAnalysesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class RequestDeployedApplicationMigrationAnalysesRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.jms.model.RequestDeployedApplicationMigrationAnalysesDetails> { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. + */ + private String fleetId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. + */ + public String getFleetId() { + return fleetId; + } + /** + * Detail information that starts the deployed Java migration analyses + */ + private com.oracle.bmc.jms.model.RequestDeployedApplicationMigrationAnalysesDetails + requestDeployedApplicationMigrationAnalysesDetails; + + /** + * Detail information that starts the deployed Java migration analyses + */ + public com.oracle.bmc.jms.model.RequestDeployedApplicationMigrationAnalysesDetails + getRequestDeployedApplicationMigrationAnalysesDetails() { + return requestDeployedApplicationMigrationAnalysesDetails; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.jms.model.RequestDeployedApplicationMigrationAnalysesDetails getBody$() { + return requestDeployedApplicationMigrationAnalysesDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RequestDeployedApplicationMigrationAnalysesRequest, + com.oracle.bmc.jms.model.RequestDeployedApplicationMigrationAnalysesDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. + */ + private String fleetId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Fleet. + * @param fleetId the value to set + * @return this builder instance + */ + public Builder fleetId(String fleetId) { + this.fleetId = fleetId; + return this; + } + + /** + * Detail information that starts the deployed Java migration analyses + */ + private com.oracle.bmc.jms.model.RequestDeployedApplicationMigrationAnalysesDetails + requestDeployedApplicationMigrationAnalysesDetails = null; + + /** + * Detail information that starts the deployed Java migration analyses + * @param requestDeployedApplicationMigrationAnalysesDetails the value to set + * @return this builder instance + */ + public Builder requestDeployedApplicationMigrationAnalysesDetails( + com.oracle.bmc.jms.model.RequestDeployedApplicationMigrationAnalysesDetails + requestDeployedApplicationMigrationAnalysesDetails) { + this.requestDeployedApplicationMigrationAnalysesDetails = + requestDeployedApplicationMigrationAnalysesDetails; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RequestDeployedApplicationMigrationAnalysesRequest o) { + fleetId(o.getFleetId()); + requestDeployedApplicationMigrationAnalysesDetails( + o.getRequestDeployedApplicationMigrationAnalysesDetails()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RequestDeployedApplicationMigrationAnalysesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RequestDeployedApplicationMigrationAnalysesRequest + */ + public RequestDeployedApplicationMigrationAnalysesRequest build() { + RequestDeployedApplicationMigrationAnalysesRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.jms.model.RequestDeployedApplicationMigrationAnalysesDetails body) { + requestDeployedApplicationMigrationAnalysesDetails(body); + return this; + } + + /** + * Build the instance of RequestDeployedApplicationMigrationAnalysesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RequestDeployedApplicationMigrationAnalysesRequest + */ + public RequestDeployedApplicationMigrationAnalysesRequest buildWithoutInvocationCallback() { + RequestDeployedApplicationMigrationAnalysesRequest request = + new RequestDeployedApplicationMigrationAnalysesRequest(); + request.fleetId = fleetId; + request.requestDeployedApplicationMigrationAnalysesDetails = + requestDeployedApplicationMigrationAnalysesDetails; + request.opcRequestId = opcRequestId; + return request; + // new RequestDeployedApplicationMigrationAnalysesRequest(fleetId, requestDeployedApplicationMigrationAnalysesDetails, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .fleetId(fleetId) + .requestDeployedApplicationMigrationAnalysesDetails( + requestDeployedApplicationMigrationAnalysesDetails) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",fleetId=").append(String.valueOf(this.fleetId)); + sb.append(",requestDeployedApplicationMigrationAnalysesDetails=") + .append(String.valueOf(this.requestDeployedApplicationMigrationAnalysesDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RequestDeployedApplicationMigrationAnalysesRequest)) { + return false; + } + + RequestDeployedApplicationMigrationAnalysesRequest other = + (RequestDeployedApplicationMigrationAnalysesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.fleetId, other.fleetId) + && java.util.Objects.equals( + this.requestDeployedApplicationMigrationAnalysesDetails, + other.requestDeployedApplicationMigrationAnalysesDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.fleetId == null ? 43 : this.fleetId.hashCode()); + result = + (result * PRIME) + + (this.requestDeployedApplicationMigrationAnalysesDetails == null + ? 43 + : this.requestDeployedApplicationMigrationAnalysesDetails + .hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/SummarizeLibraryUsageRequest.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/SummarizeLibraryUsageRequest.java index 60477cf7913..dd0281244b5 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/SummarizeLibraryUsageRequest.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/SummarizeLibraryUsageRequest.java @@ -99,6 +99,28 @@ public String getLibraryNameContains() { public String getLibraryName() { return libraryName; } + /** + * Total Common Vulnerability Scoring System (CVSS) Score reported by the analysis. + */ + private Integer cvssScoreGreaterThan; + + /** + * Total Common Vulnerability Scoring System (CVSS) Score reported by the analysis. + */ + public Integer getCvssScoreGreaterThan() { + return cvssScoreGreaterThan; + } + /** + * Total Common Vulnerability Scoring System (CVSS) Score reported by the analysis. + */ + private Integer cvssScoreLessThan; + + /** + * Total Common Vulnerability Scoring System (CVSS) Score reported by the analysis. + */ + public Integer getCvssScoreLessThan() { + return cvssScoreLessThan; + } /** * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). */ @@ -303,6 +325,36 @@ public Builder libraryName(String libraryName) { return this; } + /** + * Total Common Vulnerability Scoring System (CVSS) Score reported by the analysis. + */ + private Integer cvssScoreGreaterThan = null; + + /** + * Total Common Vulnerability Scoring System (CVSS) Score reported by the analysis. + * @param cvssScoreGreaterThan the value to set + * @return this builder instance + */ + public Builder cvssScoreGreaterThan(Integer cvssScoreGreaterThan) { + this.cvssScoreGreaterThan = cvssScoreGreaterThan; + return this; + } + + /** + * Total Common Vulnerability Scoring System (CVSS) Score reported by the analysis. + */ + private Integer cvssScoreLessThan = null; + + /** + * Total Common Vulnerability Scoring System (CVSS) Score reported by the analysis. + * @param cvssScoreLessThan the value to set + * @return this builder instance + */ + public Builder cvssScoreLessThan(Integer cvssScoreLessThan) { + this.cvssScoreLessThan = cvssScoreLessThan; + return this; + } + /** * The start of the time period during which resources are searched (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)). */ @@ -447,6 +499,8 @@ public Builder copy(SummarizeLibraryUsageRequest o) { libraryKey(o.getLibraryKey()); libraryNameContains(o.getLibraryNameContains()); libraryName(o.getLibraryName()); + cvssScoreGreaterThan(o.getCvssScoreGreaterThan()); + cvssScoreLessThan(o.getCvssScoreLessThan()); timeStart(o.getTimeStart()); timeEnd(o.getTimeEnd()); limit(o.getLimit()); @@ -493,6 +547,8 @@ public SummarizeLibraryUsageRequest buildWithoutInvocationCallback() { request.libraryKey = libraryKey; request.libraryNameContains = libraryNameContains; request.libraryName = libraryName; + request.cvssScoreGreaterThan = cvssScoreGreaterThan; + request.cvssScoreLessThan = cvssScoreLessThan; request.timeStart = timeStart; request.timeEnd = timeEnd; request.limit = limit; @@ -501,7 +557,7 @@ public SummarizeLibraryUsageRequest buildWithoutInvocationCallback() { request.sortBy = sortBy; request.opcRequestId = opcRequestId; return request; - // new SummarizeLibraryUsageRequest(fleetId, serverInstanceKey, managedInstanceId, applicationKey, libraryKey, libraryNameContains, libraryName, timeStart, timeEnd, limit, page, sortOrder, sortBy, opcRequestId); + // new SummarizeLibraryUsageRequest(fleetId, serverInstanceKey, managedInstanceId, applicationKey, libraryKey, libraryNameContains, libraryName, cvssScoreGreaterThan, cvssScoreLessThan, timeStart, timeEnd, limit, page, sortOrder, sortBy, opcRequestId); } } @@ -518,6 +574,8 @@ public Builder toBuilder() { .libraryKey(libraryKey) .libraryNameContains(libraryNameContains) .libraryName(libraryName) + .cvssScoreGreaterThan(cvssScoreGreaterThan) + .cvssScoreLessThan(cvssScoreLessThan) .timeStart(timeStart) .timeEnd(timeEnd) .limit(limit) @@ -547,6 +605,8 @@ public String toString() { sb.append(",libraryKey=").append(String.valueOf(this.libraryKey)); sb.append(",libraryNameContains=").append(String.valueOf(this.libraryNameContains)); sb.append(",libraryName=").append(String.valueOf(this.libraryName)); + sb.append(",cvssScoreGreaterThan=").append(String.valueOf(this.cvssScoreGreaterThan)); + sb.append(",cvssScoreLessThan=").append(String.valueOf(this.cvssScoreLessThan)); sb.append(",timeStart=").append(String.valueOf(this.timeStart)); sb.append(",timeEnd=").append(String.valueOf(this.timeEnd)); sb.append(",limit=").append(String.valueOf(this.limit)); @@ -576,6 +636,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.libraryKey, other.libraryKey) && java.util.Objects.equals(this.libraryNameContains, other.libraryNameContains) && java.util.Objects.equals(this.libraryName, other.libraryName) + && java.util.Objects.equals(this.cvssScoreGreaterThan, other.cvssScoreGreaterThan) + && java.util.Objects.equals(this.cvssScoreLessThan, other.cvssScoreLessThan) && java.util.Objects.equals(this.timeStart, other.timeStart) && java.util.Objects.equals(this.timeEnd, other.timeEnd) && java.util.Objects.equals(this.limit, other.limit) @@ -606,6 +668,14 @@ public int hashCode() { ? 43 : this.libraryNameContains.hashCode()); result = (result * PRIME) + (this.libraryName == null ? 43 : this.libraryName.hashCode()); + result = + (result * PRIME) + + (this.cvssScoreGreaterThan == null + ? 43 + : this.cvssScoreGreaterThan.hashCode()); + result = + (result * PRIME) + + (this.cvssScoreLessThan == null ? 43 : this.cvssScoreLessThan.hashCode()); result = (result * PRIME) + (this.timeStart == null ? 43 : this.timeStart.hashCode()); result = (result * PRIME) + (this.timeEnd == null ? 43 : this.timeEnd.hashCode()); result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/UpdateExportSettingRequest.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/UpdateExportSettingRequest.java index fc2c115da77..c8691b70765 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/UpdateExportSettingRequest.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/UpdateExportSettingRequest.java @@ -25,12 +25,12 @@ public String getFleetId() { return fleetId; } /** - * The new details for the Export setting. + * The new details for the export setting. */ private com.oracle.bmc.jms.model.UpdateExportSettingDetails updateExportSettingDetails; /** - * The new details for the Export setting. + * The new details for the export setting. */ public com.oracle.bmc.jms.model.UpdateExportSettingDetails getUpdateExportSettingDetails() { return updateExportSettingDetails; @@ -102,13 +102,13 @@ public Builder fleetId(String fleetId) { } /** - * The new details for the Export setting. + * The new details for the export setting. */ private com.oracle.bmc.jms.model.UpdateExportSettingDetails updateExportSettingDetails = null; /** - * The new details for the Export setting. + * The new details for the export setting. * @param updateExportSettingDetails the value to set * @return this builder instance */ diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/UpdateJmsPluginRequest.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/UpdateJmsPluginRequest.java new file mode 100644 index 00000000000..7d0cda8a797 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/requests/UpdateJmsPluginRequest.java @@ -0,0 +1,308 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.requests; + +import com.oracle.bmc.jms.model.*; +/** + * Example: Click here to see how to use UpdateJmsPluginRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class UpdateJmsPluginRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.jms.model.UpdateJmsPluginDetails> { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JmsPlugin. + */ + private String jmsPluginId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JmsPlugin. + */ + public String getJmsPluginId() { + return jmsPluginId; + } + /** + * The new details for the JmsPlugin. + */ + private com.oracle.bmc.jms.model.UpdateJmsPluginDetails updateJmsPluginDetails; + + /** + * The new details for the JmsPlugin. + */ + public com.oracle.bmc.jms.model.UpdateJmsPluginDetails getUpdateJmsPluginDetails() { + return updateJmsPluginDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * ETag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the ETag you + * provide matches the resource's current ETag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * ETag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the ETag you + * provide matches the resource's current ETag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.jms.model.UpdateJmsPluginDetails getBody$() { + return updateJmsPluginDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateJmsPluginRequest, com.oracle.bmc.jms.model.UpdateJmsPluginDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JmsPlugin. + */ + private String jmsPluginId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the JmsPlugin. + * @param jmsPluginId the value to set + * @return this builder instance + */ + public Builder jmsPluginId(String jmsPluginId) { + this.jmsPluginId = jmsPluginId; + return this; + } + + /** + * The new details for the JmsPlugin. + */ + private com.oracle.bmc.jms.model.UpdateJmsPluginDetails updateJmsPluginDetails = null; + + /** + * The new details for the JmsPlugin. + * @param updateJmsPluginDetails the value to set + * @return this builder instance + */ + public Builder updateJmsPluginDetails( + com.oracle.bmc.jms.model.UpdateJmsPluginDetails updateJmsPluginDetails) { + this.updateJmsPluginDetails = updateJmsPluginDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * ETag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the ETag you + * provide matches the resource's current ETag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * ETag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the ETag you + * provide matches the resource's current ETag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateJmsPluginRequest o) { + jmsPluginId(o.getJmsPluginId()); + updateJmsPluginDetails(o.getUpdateJmsPluginDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateJmsPluginRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateJmsPluginRequest + */ + public UpdateJmsPluginRequest build() { + UpdateJmsPluginRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.jms.model.UpdateJmsPluginDetails body) { + updateJmsPluginDetails(body); + return this; + } + + /** + * Build the instance of UpdateJmsPluginRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateJmsPluginRequest + */ + public UpdateJmsPluginRequest buildWithoutInvocationCallback() { + UpdateJmsPluginRequest request = new UpdateJmsPluginRequest(); + request.jmsPluginId = jmsPluginId; + request.updateJmsPluginDetails = updateJmsPluginDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateJmsPluginRequest(jmsPluginId, updateJmsPluginDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .jmsPluginId(jmsPluginId) + .updateJmsPluginDetails(updateJmsPluginDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",jmsPluginId=").append(String.valueOf(this.jmsPluginId)); + sb.append(",updateJmsPluginDetails=").append(String.valueOf(this.updateJmsPluginDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateJmsPluginRequest)) { + return false; + } + + UpdateJmsPluginRequest other = (UpdateJmsPluginRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.jmsPluginId, other.jmsPluginId) + && java.util.Objects.equals( + this.updateJmsPluginDetails, other.updateJmsPluginDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.jmsPluginId == null ? 43 : this.jmsPluginId.hashCode()); + result = + (result * PRIME) + + (this.updateJmsPluginDetails == null + ? 43 + : this.updateJmsPluginDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/AddFleetInstallationSitesResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/AddFleetInstallationSitesResponse.java index 80b4386ac7d..f6d64f8c6b1 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/AddFleetInstallationSitesResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/AddFleetInstallationSitesResponse.java @@ -27,14 +27,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -94,14 +94,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/CancelWorkRequestResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/CancelWorkRequestResponse.java index 3ae55c3888b..e3a64eb03b4 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/CancelWorkRequestResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/CancelWorkRequestResponse.java @@ -10,14 +10,14 @@ public class CancelWorkRequestResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -51,14 +51,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ChangeFleetCompartmentResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ChangeFleetCompartmentResponse.java index 71f66a5e285..c39a3f5a438 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ChangeFleetCompartmentResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ChangeFleetCompartmentResponse.java @@ -27,14 +27,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -94,14 +94,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/CreateBlocklistResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/CreateBlocklistResponse.java index ca8010861ed..ce250e8a959 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/CreateBlocklistResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/CreateBlocklistResponse.java @@ -10,14 +10,14 @@ public class CreateBlocklistResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -89,14 +89,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/CreateDrsFileResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/CreateDrsFileResponse.java index aa168b6f6ac..34467242eae 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/CreateDrsFileResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/CreateDrsFileResponse.java @@ -27,14 +27,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -94,14 +94,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/CreateFleetResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/CreateFleetResponse.java index 04140b14403..0f2184672eb 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/CreateFleetResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/CreateFleetResponse.java @@ -27,14 +27,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -94,14 +94,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/CreateJmsPluginResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/CreateJmsPluginResponse.java new file mode 100644 index 00000000000..b21ba436509 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/CreateJmsPluginResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.responses; + +import com.oracle.bmc.jms.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class CreateJmsPluginResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned JmsPlugin instance. + */ + private com.oracle.bmc.jms.model.JmsPlugin jmsPlugin; + + /** + * The returned JmsPlugin instance. + * @return the value + */ + public com.oracle.bmc.jms.model.JmsPlugin getJmsPlugin() { + return jmsPlugin; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "jmsPlugin" + }) + private CreateJmsPluginResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.jms.model.JmsPlugin jmsPlugin) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.jmsPlugin = jmsPlugin; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned JmsPlugin instance. + */ + private com.oracle.bmc.jms.model.JmsPlugin jmsPlugin; + + /** + * The returned JmsPlugin instance. + * @param jmsPlugin the value to set + * @return this builder + */ + public Builder jmsPlugin(com.oracle.bmc.jms.model.JmsPlugin jmsPlugin) { + this.jmsPlugin = jmsPlugin; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateJmsPluginResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + jmsPlugin(o.getJmsPlugin()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateJmsPluginResponse build() { + return new CreateJmsPluginResponse( + __httpStatusCode__, headers, opcRequestId, etag, jmsPlugin); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",jmsPlugin=").append(String.valueOf(jmsPlugin)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateJmsPluginResponse)) { + return false; + } + + CreateJmsPluginResponse other = (CreateJmsPluginResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.jmsPlugin, other.jmsPlugin); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.jmsPlugin == null ? 43 : this.jmsPlugin.hashCode()); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteBlocklistResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteBlocklistResponse.java index fc28acf170e..a5af41247fc 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteBlocklistResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteBlocklistResponse.java @@ -10,14 +10,14 @@ public class DeleteBlocklistResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -51,14 +51,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteCryptoAnalysisResultResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteCryptoAnalysisResultResponse.java index e3094826ca3..63e1eb08f49 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteCryptoAnalysisResultResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteCryptoAnalysisResultResponse.java @@ -27,14 +27,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -94,14 +94,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteDrsFileResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteDrsFileResponse.java index 3016c40534e..eb89b89c62c 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteDrsFileResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteDrsFileResponse.java @@ -27,14 +27,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -94,14 +94,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteFleetResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteFleetResponse.java index f5b54eecf5d..9ce52528b51 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteFleetResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteFleetResponse.java @@ -27,14 +27,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -94,14 +94,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteJavaMigrationAnalysisResultResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteJavaMigrationAnalysisResultResponse.java index 9a3c5177c5e..f677c446780 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteJavaMigrationAnalysisResultResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteJavaMigrationAnalysisResultResponse.java @@ -28,14 +28,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -95,14 +95,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteJmsPluginResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteJmsPluginResponse.java new file mode 100644 index 00000000000..5033b55f119 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeleteJmsPluginResponse.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.responses; + +import com.oracle.bmc.jms.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class DeleteJmsPluginResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeleteJmsPluginResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteJmsPluginResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteJmsPluginResponse build() { + return new DeleteJmsPluginResponse(__httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteJmsPluginResponse)) { + return false; + } + + DeleteJmsPluginResponse other = (DeleteJmsPluginResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeletePerformanceTuningAnalysisResultResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeletePerformanceTuningAnalysisResultResponse.java index 3ce2fd06e62..16cc02a457a 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeletePerformanceTuningAnalysisResultResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DeletePerformanceTuningAnalysisResultResponse.java @@ -28,14 +28,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -95,14 +95,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DisableDrsResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DisableDrsResponse.java index cde64daaab2..820373d0b66 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DisableDrsResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/DisableDrsResponse.java @@ -27,14 +27,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -94,14 +94,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/EnableDrsResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/EnableDrsResponse.java index 6a2d163b876..5435950cda3 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/EnableDrsResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/EnableDrsResponse.java @@ -27,14 +27,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -94,14 +94,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GenerateAgentDeployScriptResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GenerateAgentDeployScriptResponse.java index a68a42cacb1..9c7e9c858dd 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GenerateAgentDeployScriptResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GenerateAgentDeployScriptResponse.java @@ -10,14 +10,14 @@ public class GenerateAgentDeployScriptResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -103,14 +103,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GenerateAgentInstallerConfigurationResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GenerateAgentInstallerConfigurationResponse.java new file mode 100644 index 00000000000..d47dbb256bb --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GenerateAgentInstallerConfigurationResponse.java @@ -0,0 +1,250 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.responses; + +import com.oracle.bmc.jms.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class GenerateAgentInstallerConfigurationResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The content size of the body in bytes. + */ + private Long contentLength; + + /** + * The content size of the body in bytes. + * @return the value + */ + public Long getContentLength() { + return contentLength; + } + + /** + * The content type of the body. + */ + private String contentType; + + /** + * The content type of the body. + * @return the value + */ + public String getContentType() { + return contentType; + } + + /** + * The returned java.io.InputStream instance. + */ + private java.io.InputStream inputStream; + + /** + * The returned java.io.InputStream instance. + * @return the value + */ + public java.io.InputStream getInputStream() { + return inputStream; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "contentLength", + "contentType", + "inputStream" + }) + private GenerateAgentInstallerConfigurationResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + Long contentLength, + String contentType, + java.io.InputStream inputStream) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.contentLength = contentLength; + this.contentType = contentType; + this.inputStream = inputStream; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The content size of the body in bytes. + */ + private Long contentLength; + + /** + * The content size of the body in bytes. + * @param contentLength the value to set + * @return this builder + */ + public Builder contentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + + /** + * The content type of the body. + */ + private String contentType; + + /** + * The content type of the body. + * @param contentType the value to set + * @return this builder + */ + public Builder contentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * The returned java.io.InputStream instance. + */ + private java.io.InputStream inputStream; + + /** + * The returned java.io.InputStream instance. + * @param inputStream the value to set + * @return this builder + */ + public Builder inputStream(java.io.InputStream inputStream) { + this.inputStream = inputStream; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GenerateAgentInstallerConfigurationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + contentLength(o.getContentLength()); + contentType(o.getContentType()); + inputStream(o.getInputStream()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GenerateAgentInstallerConfigurationResponse build() { + return new GenerateAgentInstallerConfigurationResponse( + __httpStatusCode__, + headers, + opcRequestId, + contentLength, + contentType, + inputStream); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",contentLength=").append(String.valueOf(contentLength)); + sb.append(",contentType=").append(String.valueOf(contentType)); + sb.append(",inputStream=").append(String.valueOf(inputStream)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GenerateAgentInstallerConfigurationResponse)) { + return false; + } + + GenerateAgentInstallerConfigurationResponse other = + (GenerateAgentInstallerConfigurationResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.contentLength, other.contentLength) + && java.util.Objects.equals(this.contentType, other.contentType) + && java.util.Objects.equals(this.inputStream, other.inputStream); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.contentLength == null ? 43 : this.contentLength.hashCode()); + result = (result * PRIME) + (this.contentType == null ? 43 : this.contentType.hashCode()); + result = (result * PRIME) + (this.inputStream == null ? 43 : this.inputStream.hashCode()); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GenerateLoadPipelineScriptResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GenerateLoadPipelineScriptResponse.java new file mode 100644 index 00000000000..a9317fca27c --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GenerateLoadPipelineScriptResponse.java @@ -0,0 +1,248 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.responses; + +import com.oracle.bmc.jms.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class GenerateLoadPipelineScriptResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The content size of the body in bytes. + */ + private Long contentLength; + + /** + * The content size of the body in bytes. + * @return the value + */ + public Long getContentLength() { + return contentLength; + } + + /** + * The content type of the body. + */ + private String contentType; + + /** + * The content type of the body. + * @return the value + */ + public String getContentType() { + return contentType; + } + + /** + * The returned java.io.InputStream instance. + */ + private java.io.InputStream inputStream; + + /** + * The returned java.io.InputStream instance. + * @return the value + */ + public java.io.InputStream getInputStream() { + return inputStream; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "contentLength", + "contentType", + "inputStream" + }) + private GenerateLoadPipelineScriptResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + Long contentLength, + String contentType, + java.io.InputStream inputStream) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.contentLength = contentLength; + this.contentType = contentType; + this.inputStream = inputStream; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The content size of the body in bytes. + */ + private Long contentLength; + + /** + * The content size of the body in bytes. + * @param contentLength the value to set + * @return this builder + */ + public Builder contentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + + /** + * The content type of the body. + */ + private String contentType; + + /** + * The content type of the body. + * @param contentType the value to set + * @return this builder + */ + public Builder contentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * The returned java.io.InputStream instance. + */ + private java.io.InputStream inputStream; + + /** + * The returned java.io.InputStream instance. + * @param inputStream the value to set + * @return this builder + */ + public Builder inputStream(java.io.InputStream inputStream) { + this.inputStream = inputStream; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GenerateLoadPipelineScriptResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + contentLength(o.getContentLength()); + contentType(o.getContentType()); + inputStream(o.getInputStream()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GenerateLoadPipelineScriptResponse build() { + return new GenerateLoadPipelineScriptResponse( + __httpStatusCode__, + headers, + opcRequestId, + contentLength, + contentType, + inputStream); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",contentLength=").append(String.valueOf(contentLength)); + sb.append(",contentType=").append(String.valueOf(contentType)); + sb.append(",inputStream=").append(String.valueOf(inputStream)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GenerateLoadPipelineScriptResponse)) { + return false; + } + + GenerateLoadPipelineScriptResponse other = (GenerateLoadPipelineScriptResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.contentLength, other.contentLength) + && java.util.Objects.equals(this.contentType, other.contentType) + && java.util.Objects.equals(this.inputStream, other.inputStream); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.contentLength == null ? 43 : this.contentLength.hashCode()); + result = (result * PRIME) + (this.contentType == null ? 43 : this.contentType.hashCode()); + result = (result * PRIME) + (this.inputStream == null ? 43 : this.inputStream.hashCode()); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetCryptoAnalysisResultResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetCryptoAnalysisResultResponse.java index f1eb0543192..b19e070e767 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetCryptoAnalysisResultResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetCryptoAnalysisResultResponse.java @@ -25,14 +25,14 @@ public String getEtag() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -106,14 +106,14 @@ public Builder etag(String etag) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetDrsFileResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetDrsFileResponse.java index 7a39371e0bd..f78c1564711 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetDrsFileResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetDrsFileResponse.java @@ -25,14 +25,14 @@ public String getEtag() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -106,14 +106,14 @@ public Builder etag(String etag) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetExportSettingResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetExportSettingResponse.java index 9515e446085..8b5109aa0cc 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetExportSettingResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetExportSettingResponse.java @@ -25,14 +25,14 @@ public String getEtag() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -106,14 +106,14 @@ public Builder etag(String etag) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetExportStatusResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetExportStatusResponse.java index 87d21888325..d85c9a21ae3 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetExportStatusResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetExportStatusResponse.java @@ -25,14 +25,14 @@ public String getEtag() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -106,14 +106,14 @@ public Builder etag(String etag) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetFleetAdvancedFeatureConfigurationResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetFleetAdvancedFeatureConfigurationResponse.java index 01610219df8..930d6eb6e20 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetFleetAdvancedFeatureConfigurationResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetFleetAdvancedFeatureConfigurationResponse.java @@ -11,14 +11,14 @@ public class GetFleetAdvancedFeatureConfigurationResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -93,14 +93,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetFleetAgentConfigurationResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetFleetAgentConfigurationResponse.java index 27ae843f959..f31ce915a1e 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetFleetAgentConfigurationResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetFleetAgentConfigurationResponse.java @@ -25,14 +25,14 @@ public String getEtag() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -106,14 +106,14 @@ public Builder etag(String etag) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetFleetResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetFleetResponse.java index 10a103c9efa..e7efe2943c1 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetFleetResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetFleetResponse.java @@ -25,14 +25,14 @@ public String getEtag() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -106,14 +106,14 @@ public Builder etag(String etag) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetJavaFamilyResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetJavaFamilyResponse.java index c1efc105bff..772ec838f6a 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetJavaFamilyResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetJavaFamilyResponse.java @@ -10,14 +10,14 @@ public class GetJavaFamilyResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -71,14 +71,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetJavaMigrationAnalysisResultResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetJavaMigrationAnalysisResultResponse.java index 0748d584061..3efc3558e0a 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetJavaMigrationAnalysisResultResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetJavaMigrationAnalysisResultResponse.java @@ -25,14 +25,14 @@ public String getEtag() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -106,14 +106,14 @@ public Builder etag(String etag) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetJavaReleaseResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetJavaReleaseResponse.java index c837a67ec1b..35330300fb5 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetJavaReleaseResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetJavaReleaseResponse.java @@ -10,14 +10,14 @@ public class GetJavaReleaseResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -71,14 +71,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetJmsPluginResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetJmsPluginResponse.java new file mode 100644 index 00000000000..1efba6212a4 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetJmsPluginResponse.java @@ -0,0 +1,245 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.responses; + +import com.oracle.bmc.jms.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class GetJmsPluginResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Float retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @return the value + */ + public Float getRetryAfter() { + return retryAfter; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned JmsPlugin instance. + */ + private com.oracle.bmc.jms.model.JmsPlugin jmsPlugin; + + /** + * The returned JmsPlugin instance. + * @return the value + */ + public com.oracle.bmc.jms.model.JmsPlugin getJmsPlugin() { + return jmsPlugin; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "retryAfter", + "etag", + "jmsPlugin" + }) + private GetJmsPluginResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + Float retryAfter, + String etag, + com.oracle.bmc.jms.model.JmsPlugin jmsPlugin) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + this.etag = etag; + this.jmsPlugin = jmsPlugin; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Float retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @param retryAfter the value to set + * @return this builder + */ + public Builder retryAfter(Float retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned JmsPlugin instance. + */ + private com.oracle.bmc.jms.model.JmsPlugin jmsPlugin; + + /** + * The returned JmsPlugin instance. + * @param jmsPlugin the value to set + * @return this builder + */ + public Builder jmsPlugin(com.oracle.bmc.jms.model.JmsPlugin jmsPlugin) { + this.jmsPlugin = jmsPlugin; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetJmsPluginResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + etag(o.getEtag()); + jmsPlugin(o.getJmsPlugin()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetJmsPluginResponse build() { + return new GetJmsPluginResponse( + __httpStatusCode__, headers, opcRequestId, retryAfter, etag, jmsPlugin); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",retryAfter=").append(String.valueOf(retryAfter)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",jmsPlugin=").append(String.valueOf(jmsPlugin)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetJmsPluginResponse)) { + return false; + } + + GetJmsPluginResponse other = (GetJmsPluginResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.retryAfter, other.retryAfter) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.jmsPlugin, other.jmsPlugin); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.retryAfter == null ? 43 : this.retryAfter.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.jmsPlugin == null ? 43 : this.jmsPlugin.hashCode()); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetPerformanceTuningAnalysisResultResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetPerformanceTuningAnalysisResultResponse.java index 1a63a82e3c6..76ea6ce32af 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetPerformanceTuningAnalysisResultResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetPerformanceTuningAnalysisResultResponse.java @@ -26,14 +26,14 @@ public String getEtag() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -110,14 +110,14 @@ public Builder etag(String etag) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetWorkRequestResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetWorkRequestResponse.java index 4ee450f8684..4882da06ebf 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetWorkRequestResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/GetWorkRequestResponse.java @@ -10,14 +10,14 @@ public class GetWorkRequestResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -105,14 +105,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListAgentInstallersResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListAgentInstallersResponse.java new file mode 100644 index 00000000000..c4d83a5aa54 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListAgentInstallersResponse.java @@ -0,0 +1,228 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.responses; + +import com.oracle.bmc.jms.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class ListAgentInstallersResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination, when this header appears in the response, additional pages of results remain. + * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination, when this header appears in the response, additional pages of results remain. + * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned AgentInstallerCollection instance. + */ + private com.oracle.bmc.jms.model.AgentInstallerCollection agentInstallerCollection; + + /** + * The returned AgentInstallerCollection instance. + * @return the value + */ + public com.oracle.bmc.jms.model.AgentInstallerCollection getAgentInstallerCollection() { + return agentInstallerCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "agentInstallerCollection" + }) + private ListAgentInstallersResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.jms.model.AgentInstallerCollection agentInstallerCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.agentInstallerCollection = agentInstallerCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination, when this header appears in the response, additional pages of results remain. + * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination, when this header appears in the response, additional pages of results remain. + * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned AgentInstallerCollection instance. + */ + private com.oracle.bmc.jms.model.AgentInstallerCollection agentInstallerCollection; + + /** + * The returned AgentInstallerCollection instance. + * @param agentInstallerCollection the value to set + * @return this builder + */ + public Builder agentInstallerCollection( + com.oracle.bmc.jms.model.AgentInstallerCollection agentInstallerCollection) { + this.agentInstallerCollection = agentInstallerCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAgentInstallersResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + agentInstallerCollection(o.getAgentInstallerCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListAgentInstallersResponse build() { + return new ListAgentInstallersResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + agentInstallerCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",agentInstallerCollection=").append(String.valueOf(agentInstallerCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListAgentInstallersResponse)) { + return false; + } + + ListAgentInstallersResponse other = (ListAgentInstallersResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.agentInstallerCollection, other.agentInstallerCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.agentInstallerCollection == null + ? 43 + : this.agentInstallerCollection.hashCode()); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListAnnouncementsResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListAnnouncementsResponse.java index 1c903ba9c27..c5df4933ca1 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListAnnouncementsResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListAnnouncementsResponse.java @@ -10,14 +10,14 @@ public class ListAnnouncementsResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -26,7 +26,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -34,7 +34,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -93,14 +93,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -111,7 +111,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -119,7 +119,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListBlocklistsResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListBlocklistsResponse.java index 53cfee52401..48836f0a928 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListBlocklistsResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListBlocklistsResponse.java @@ -10,14 +10,14 @@ public class ListBlocklistsResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -26,7 +26,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -34,7 +34,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -93,14 +93,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -111,7 +111,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -119,7 +119,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListCryptoAnalysisResultsResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListCryptoAnalysisResultsResponse.java index 6621609cf34..65151ab9b3a 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListCryptoAnalysisResultsResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListCryptoAnalysisResultsResponse.java @@ -10,14 +10,14 @@ public class ListCryptoAnalysisResultsResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -26,7 +26,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -34,7 +34,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -95,14 +95,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -113,7 +113,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -121,7 +121,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListDrsFilesResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListDrsFilesResponse.java index 4e67364979b..b588e2b33c9 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListDrsFilesResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListDrsFilesResponse.java @@ -10,14 +10,14 @@ public class ListDrsFilesResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -26,7 +26,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -34,7 +34,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -93,14 +93,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -111,7 +111,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -119,7 +119,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListFleetDiagnosesResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListFleetDiagnosesResponse.java index 4d15bc3fa81..1cc679045f7 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListFleetDiagnosesResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListFleetDiagnosesResponse.java @@ -10,14 +10,14 @@ public class ListFleetDiagnosesResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -26,7 +26,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -34,7 +34,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -93,14 +93,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -111,7 +111,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -119,7 +119,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListFleetsResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListFleetsResponse.java index 3ce0d030110..5a1dc545a90 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListFleetsResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListFleetsResponse.java @@ -10,14 +10,14 @@ public class ListFleetsResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -26,7 +26,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -34,7 +34,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -93,14 +93,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -111,7 +111,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -119,7 +119,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListInstallationSitesResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListInstallationSitesResponse.java index 5f6502eb709..377fd789551 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListInstallationSitesResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListInstallationSitesResponse.java @@ -10,14 +10,14 @@ public class ListInstallationSitesResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -26,7 +26,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -34,7 +34,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -93,14 +93,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -111,7 +111,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -119,7 +119,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListJavaFamiliesResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListJavaFamiliesResponse.java index 33636cf0cdf..3b6dd82455b 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListJavaFamiliesResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListJavaFamiliesResponse.java @@ -10,14 +10,14 @@ public class ListJavaFamiliesResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -26,7 +26,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -34,7 +34,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -93,14 +93,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -111,7 +111,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -119,7 +119,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListJavaMigrationAnalysisResultsResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListJavaMigrationAnalysisResultsResponse.java index 982282cace2..e94cdbc76a9 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListJavaMigrationAnalysisResultsResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListJavaMigrationAnalysisResultsResponse.java @@ -10,14 +10,14 @@ public class ListJavaMigrationAnalysisResultsResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -26,7 +26,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -34,7 +34,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -96,14 +96,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -114,7 +114,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -122,7 +122,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListJavaReleasesResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListJavaReleasesResponse.java index c281f1b0451..75ca008fe52 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListJavaReleasesResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListJavaReleasesResponse.java @@ -10,14 +10,14 @@ public class ListJavaReleasesResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -26,7 +26,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -34,7 +34,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -93,14 +93,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -111,7 +111,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -119,7 +119,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListJmsPluginsResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListJmsPluginsResponse.java new file mode 100644 index 00000000000..9c0bd4a770c --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListJmsPluginsResponse.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.responses; + +import com.oracle.bmc.jms.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class ListJmsPluginsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination, when this header appears in the response, additional pages of results remain. + * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination, when this header appears in the response, additional pages of results remain. + * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned JmsPluginCollection instance. + */ + private com.oracle.bmc.jms.model.JmsPluginCollection jmsPluginCollection; + + /** + * The returned JmsPluginCollection instance. + * @return the value + */ + public com.oracle.bmc.jms.model.JmsPluginCollection getJmsPluginCollection() { + return jmsPluginCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "jmsPluginCollection" + }) + private ListJmsPluginsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.jms.model.JmsPluginCollection jmsPluginCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.jmsPluginCollection = jmsPluginCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination, when this header appears in the response, additional pages of results remain. + * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination, when this header appears in the response, additional pages of results remain. + * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. + * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned JmsPluginCollection instance. + */ + private com.oracle.bmc.jms.model.JmsPluginCollection jmsPluginCollection; + + /** + * The returned JmsPluginCollection instance. + * @param jmsPluginCollection the value to set + * @return this builder + */ + public Builder jmsPluginCollection( + com.oracle.bmc.jms.model.JmsPluginCollection jmsPluginCollection) { + this.jmsPluginCollection = jmsPluginCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListJmsPluginsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + jmsPluginCollection(o.getJmsPluginCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListJmsPluginsResponse build() { + return new ListJmsPluginsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, jmsPluginCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",jmsPluginCollection=").append(String.valueOf(jmsPluginCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListJmsPluginsResponse)) { + return false; + } + + ListJmsPluginsResponse other = (ListJmsPluginsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.jmsPluginCollection, other.jmsPluginCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.jmsPluginCollection == null + ? 43 + : this.jmsPluginCollection.hashCode()); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListJreUsageResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListJreUsageResponse.java index 3610c7feb8f..551e2167935 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListJreUsageResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListJreUsageResponse.java @@ -10,14 +10,14 @@ public class ListJreUsageResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -26,7 +26,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -34,7 +34,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -93,14 +93,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -111,7 +111,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -119,7 +119,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListPerformanceTuningAnalysisResultsResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListPerformanceTuningAnalysisResultsResponse.java index 754f58d8638..c99b5285f31 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListPerformanceTuningAnalysisResultsResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListPerformanceTuningAnalysisResultsResponse.java @@ -11,14 +11,14 @@ public class ListPerformanceTuningAnalysisResultsResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -27,7 +27,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -35,7 +35,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -97,14 +97,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -115,7 +115,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -123,7 +123,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListWorkItemsResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListWorkItemsResponse.java index 56d8aa536fc..fd723247f93 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListWorkItemsResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListWorkItemsResponse.java @@ -9,7 +9,7 @@ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") public class ListWorkItemsResponse extends com.oracle.bmc.responses.BmcResponse { /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -17,7 +17,7 @@ public class ListWorkItemsResponse extends com.oracle.bmc.responses.BmcResponse private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -29,14 +29,14 @@ public String getOpcNextPage() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -92,7 +92,7 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -100,7 +100,7 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -114,14 +114,14 @@ public Builder opcNextPage(String opcNextPage) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListWorkRequestErrorsResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListWorkRequestErrorsResponse.java index 3dd09277a76..a6ccc6befb8 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListWorkRequestErrorsResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListWorkRequestErrorsResponse.java @@ -9,7 +9,7 @@ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") public class ListWorkRequestErrorsResponse extends com.oracle.bmc.responses.BmcResponse { /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -17,7 +17,7 @@ public class ListWorkRequestErrorsResponse extends com.oracle.bmc.responses.BmcR private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -29,14 +29,14 @@ public String getOpcNextPage() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -92,7 +92,7 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -100,7 +100,7 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -114,14 +114,14 @@ public Builder opcNextPage(String opcNextPage) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListWorkRequestLogsResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListWorkRequestLogsResponse.java index 19340341d8e..91da4a783fa 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListWorkRequestLogsResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListWorkRequestLogsResponse.java @@ -9,7 +9,7 @@ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") public class ListWorkRequestLogsResponse extends com.oracle.bmc.responses.BmcResponse { /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -17,7 +17,7 @@ public class ListWorkRequestLogsResponse extends com.oracle.bmc.responses.BmcRes private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -29,14 +29,14 @@ public String getOpcNextPage() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -93,7 +93,7 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -101,7 +101,7 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -115,14 +115,14 @@ public Builder opcNextPage(String opcNextPage) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListWorkRequestsResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListWorkRequestsResponse.java index 495dc658016..49e5a3fddbd 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListWorkRequestsResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ListWorkRequestsResponse.java @@ -10,14 +10,14 @@ public class ListWorkRequestsResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -26,7 +26,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -34,7 +34,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -93,14 +93,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -111,7 +111,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -119,7 +119,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RemoveFleetInstallationSitesResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RemoveFleetInstallationSitesResponse.java index 13304453998..8b5df7cb32d 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RemoveFleetInstallationSitesResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RemoveFleetInstallationSitesResponse.java @@ -27,14 +27,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -94,14 +94,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RequestCryptoAnalysesResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RequestCryptoAnalysesResponse.java index 205c02b6470..8d7c2b4fb6a 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RequestCryptoAnalysesResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RequestCryptoAnalysesResponse.java @@ -27,14 +27,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -94,14 +94,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RequestDeployedApplicationMigrationAnalysesResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RequestDeployedApplicationMigrationAnalysesResponse.java new file mode 100644 index 00000000000..91831c7efd9 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RequestDeployedApplicationMigrationAnalysesResponse.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.responses; + +import com.oracle.bmc.jms.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class RequestDeployedApplicationMigrationAnalysesResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query the status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query the status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private RequestDeployedApplicationMigrationAnalysesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query the status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query the status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RequestDeployedApplicationMigrationAnalysesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RequestDeployedApplicationMigrationAnalysesResponse build() { + return new RequestDeployedApplicationMigrationAnalysesResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RequestDeployedApplicationMigrationAnalysesResponse)) { + return false; + } + + RequestDeployedApplicationMigrationAnalysesResponse other = + (RequestDeployedApplicationMigrationAnalysesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RequestJavaMigrationAnalysesResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RequestJavaMigrationAnalysesResponse.java index 2e22770725e..ee2c4843148 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RequestJavaMigrationAnalysesResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RequestJavaMigrationAnalysesResponse.java @@ -27,14 +27,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -94,14 +94,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RequestJfrRecordingsResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RequestJfrRecordingsResponse.java index ba9be54df96..990b965df3c 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RequestJfrRecordingsResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RequestJfrRecordingsResponse.java @@ -27,14 +27,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -94,14 +94,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RequestPerformanceTuningAnalysesResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RequestPerformanceTuningAnalysesResponse.java index 5fd0c39b09f..e8139b391a8 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RequestPerformanceTuningAnalysesResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/RequestPerformanceTuningAnalysesResponse.java @@ -27,14 +27,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -94,14 +94,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ScanJavaServerUsageResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ScanJavaServerUsageResponse.java index b442dc127be..d4fd7b5863d 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ScanJavaServerUsageResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ScanJavaServerUsageResponse.java @@ -27,14 +27,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -94,14 +94,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ScanLibraryUsageResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ScanLibraryUsageResponse.java index 60d54f25621..bcb71aede24 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ScanLibraryUsageResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/ScanLibraryUsageResponse.java @@ -27,14 +27,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -94,14 +94,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeApplicationInstallationUsageResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeApplicationInstallationUsageResponse.java index 0fdccfe39f9..bd2d0fdb8e8 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeApplicationInstallationUsageResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeApplicationInstallationUsageResponse.java @@ -11,14 +11,14 @@ public class SummarizeApplicationInstallationUsageResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -27,7 +27,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -35,7 +35,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -98,14 +98,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -116,7 +116,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -124,7 +124,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeApplicationUsageResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeApplicationUsageResponse.java index 8cfd7348155..7080b45ce15 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeApplicationUsageResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeApplicationUsageResponse.java @@ -10,14 +10,14 @@ public class SummarizeApplicationUsageResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -26,7 +26,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -34,7 +34,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -93,14 +93,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -111,7 +111,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -119,7 +119,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeDeployedApplicationInstallationUsageResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeDeployedApplicationInstallationUsageResponse.java index 9afbe407111..f2e8cd5098d 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeDeployedApplicationInstallationUsageResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeDeployedApplicationInstallationUsageResponse.java @@ -11,14 +11,14 @@ public class SummarizeDeployedApplicationInstallationUsageResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -27,7 +27,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -35,7 +35,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -98,14 +98,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -116,7 +116,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -124,7 +124,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeDeployedApplicationUsageResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeDeployedApplicationUsageResponse.java index 09e1c730e58..7869a87fc00 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeDeployedApplicationUsageResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeDeployedApplicationUsageResponse.java @@ -11,14 +11,14 @@ public class SummarizeDeployedApplicationUsageResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -27,7 +27,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -35,7 +35,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -97,14 +97,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -115,7 +115,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -123,7 +123,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeInstallationUsageResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeInstallationUsageResponse.java index 0f65e29240f..a1c9c19d857 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeInstallationUsageResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeInstallationUsageResponse.java @@ -10,14 +10,14 @@ public class SummarizeInstallationUsageResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -26,7 +26,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -34,7 +34,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -93,14 +93,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -111,7 +111,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -119,7 +119,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeJavaServerInstanceUsageResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeJavaServerInstanceUsageResponse.java index 2500d4690c7..016a7f994df 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeJavaServerInstanceUsageResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeJavaServerInstanceUsageResponse.java @@ -10,14 +10,14 @@ public class SummarizeJavaServerInstanceUsageResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -26,7 +26,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -34,7 +34,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -96,14 +96,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -114,7 +114,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -122,7 +122,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeJavaServerUsageResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeJavaServerUsageResponse.java index d1e46304413..9f86eec91a1 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeJavaServerUsageResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeJavaServerUsageResponse.java @@ -10,14 +10,14 @@ public class SummarizeJavaServerUsageResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -26,7 +26,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -34,7 +34,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -93,14 +93,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -111,7 +111,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -119,7 +119,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeJreUsageResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeJreUsageResponse.java index 8ef44fc7670..a3285ecee0b 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeJreUsageResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeJreUsageResponse.java @@ -10,14 +10,14 @@ public class SummarizeJreUsageResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -26,7 +26,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -34,7 +34,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -93,14 +93,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -111,7 +111,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -119,7 +119,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeLibraryUsageResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeLibraryUsageResponse.java index 87a8b83efa1..a2d2055814c 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeLibraryUsageResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeLibraryUsageResponse.java @@ -10,14 +10,14 @@ public class SummarizeLibraryUsageResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -26,7 +26,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -34,7 +34,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -93,14 +93,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -111,7 +111,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -119,7 +119,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeManagedInstanceUsageResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeManagedInstanceUsageResponse.java index a431a796a86..b6429568e23 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeManagedInstanceUsageResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeManagedInstanceUsageResponse.java @@ -10,14 +10,14 @@ public class SummarizeManagedInstanceUsageResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -26,7 +26,7 @@ public String getOpcRequestId() { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -34,7 +34,7 @@ public String getOpcRequestId() { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -95,14 +95,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder @@ -113,7 +113,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * @@ -121,7 +121,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcNextPage; /** - * For list pagination. When this header appears in the response, additional pages of results remain. + * For list pagination, when this header appears in the response, additional pages of results remain. * Include this value as the {@code page} parameter for the subsequent GET request to get the next batch of items. * For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeResourceInventoryResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeResourceInventoryResponse.java index 7b627fc2371..11d1bc4c858 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeResourceInventoryResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/SummarizeResourceInventoryResponse.java @@ -10,14 +10,14 @@ public class SummarizeResourceInventoryResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -71,14 +71,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateDrsFileResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateDrsFileResponse.java index cee32deb7b7..34e72beed02 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateDrsFileResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateDrsFileResponse.java @@ -27,14 +27,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -94,14 +94,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateExportSettingResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateExportSettingResponse.java index 312e1f99bed..6677f2cda27 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateExportSettingResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateExportSettingResponse.java @@ -25,14 +25,14 @@ public String getEtag() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -106,14 +106,14 @@ public Builder etag(String etag) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateFleetAdvancedFeatureConfigurationResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateFleetAdvancedFeatureConfigurationResponse.java index 2fab873cceb..4fcfc9d775a 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateFleetAdvancedFeatureConfigurationResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateFleetAdvancedFeatureConfigurationResponse.java @@ -11,14 +11,14 @@ public class UpdateFleetAdvancedFeatureConfigurationResponse extends com.oracle.bmc.responses.BmcResponse { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -93,14 +93,14 @@ public Builder headers(javax.ws.rs.core.MultivaluedMap headers) /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateFleetAgentConfigurationResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateFleetAgentConfigurationResponse.java index ea35bdab38e..4fc6e18954d 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateFleetAgentConfigurationResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateFleetAgentConfigurationResponse.java @@ -27,14 +27,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -94,14 +94,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateFleetResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateFleetResponse.java index 56ad80adec5..a099ef0b210 100644 --- a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateFleetResponse.java +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateFleetResponse.java @@ -27,14 +27,14 @@ public String getOpcWorkRequestId() { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @return the value */ @@ -94,14 +94,14 @@ public Builder opcWorkRequestId(String opcWorkRequestId) { /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * */ private String opcRequestId; /** * Unique Oracle-assigned identifier for the request. If you need to contact - * Oracle about a particular request, please provide the request ID. + * Oracle about a particular request, provide the request ID. * * @param opcRequestId the value to set * @return this builder diff --git a/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateJmsPluginResponse.java b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateJmsPluginResponse.java new file mode 100644 index 00000000000..a575af85fa5 --- /dev/null +++ b/bmc-jms/src/main/java/com/oracle/bmc/jms/responses/UpdateJmsPluginResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.jms.responses; + +import com.oracle.bmc.jms.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210610") +public class UpdateJmsPluginResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned JmsPlugin instance. + */ + private com.oracle.bmc.jms.model.JmsPlugin jmsPlugin; + + /** + * The returned JmsPlugin instance. + * @return the value + */ + public com.oracle.bmc.jms.model.JmsPlugin getJmsPlugin() { + return jmsPlugin; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "jmsPlugin" + }) + private UpdateJmsPluginResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.jms.model.JmsPlugin jmsPlugin) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.jmsPlugin = jmsPlugin; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned JmsPlugin instance. + */ + private com.oracle.bmc.jms.model.JmsPlugin jmsPlugin; + + /** + * The returned JmsPlugin instance. + * @param jmsPlugin the value to set + * @return this builder + */ + public Builder jmsPlugin(com.oracle.bmc.jms.model.JmsPlugin jmsPlugin) { + this.jmsPlugin = jmsPlugin; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateJmsPluginResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + jmsPlugin(o.getJmsPlugin()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateJmsPluginResponse build() { + return new UpdateJmsPluginResponse( + __httpStatusCode__, headers, etag, opcRequestId, jmsPlugin); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",jmsPlugin=").append(String.valueOf(jmsPlugin)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateJmsPluginResponse)) { + return false; + } + + UpdateJmsPluginResponse other = (UpdateJmsPluginResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.jmsPlugin, other.jmsPlugin); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.jmsPlugin == null ? 43 : this.jmsPlugin.hashCode()); + return result; + } +} diff --git a/bmc-jmsjavadownloads/pom.xml b/bmc-jmsjavadownloads/pom.xml index 759f1520374..848f3f06baa 100644 --- a/bmc-jmsjavadownloads/pom.xml +++ b/bmc-jmsjavadownloads/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-jmsjavadownloads @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-jmsjavadownloads/src/main/java/com/oracle/bmc/jmsjavadownloads/JavaDownload.java b/bmc-jmsjavadownloads/src/main/java/com/oracle/bmc/jmsjavadownloads/JavaDownload.java index f26f63bb817..7c9ff3d8ab0 100644 --- a/bmc-jmsjavadownloads/src/main/java/com/oracle/bmc/jmsjavadownloads/JavaDownload.java +++ b/bmc-jmsjavadownloads/src/main/java/com/oracle/bmc/jmsjavadownloads/JavaDownload.java @@ -154,11 +154,11 @@ DeleteJavaLicenseAcceptanceRecordResponse deleteJavaLicenseAcceptanceRecord( DeleteJavaLicenseAcceptanceRecordRequest request); /** - * Generates a short-lived download URL and returns it in the response payload. - * The returned URL can then be used for downloading the specific Java runtime artifact. + * Generates a download URL and returns it in the response payload. + * The URL in the response can then be used for downloading the specific Java runtime artifact. *

* Use the {@link #getJavaRelease(GetJavaReleaseRequest) getJavaRelease} API - * to get information about available artifacts for a specific release. Each such artifact is uniquely identified by an `artifactId`. + * to get information about available artifacts for a specific release. Each artifact is uniquely identified by an `artifactId`. * Refer {@link #javaArtifact(JavaArtifactRequest) javaArtifact} for more details. * * @param request The request object containing the details to send diff --git a/bmc-jmsjavadownloads/src/main/java/com/oracle/bmc/jmsjavadownloads/JavaDownloadAsync.java b/bmc-jmsjavadownloads/src/main/java/com/oracle/bmc/jmsjavadownloads/JavaDownloadAsync.java index 5531893352b..03f3e453694 100644 --- a/bmc-jmsjavadownloads/src/main/java/com/oracle/bmc/jmsjavadownloads/JavaDownloadAsync.java +++ b/bmc-jmsjavadownloads/src/main/java/com/oracle/bmc/jmsjavadownloads/JavaDownloadAsync.java @@ -181,11 +181,11 @@ java.util.concurrent.Future deleteJavaDownloadT handler); /** - * Generates a short-lived download URL and returns it in the response payload. - * The returned URL can then be used for downloading the specific Java runtime artifact. + * Generates a download URL and returns it in the response payload. + * The URL in the response can then be used for downloading the specific Java runtime artifact. *

* Use the {@link #getJavaRelease(GetJavaReleaseRequest, Consumer, Consumer) getJavaRelease} API - * to get information about available artifacts for a specific release. Each such artifact is uniquely identified by an `artifactId`. + * to get information about available artifacts for a specific release. Each artifact is uniquely identified by an `artifactId`. * Refer {@link #javaArtifact(JavaArtifactRequest, Consumer, Consumer) javaArtifact} for more details. * * diff --git a/bmc-jmsjavadownloads/src/main/java/com/oracle/bmc/jmsjavadownloads/model/GenerateArtifactDownloadUrlDetails.java b/bmc-jmsjavadownloads/src/main/java/com/oracle/bmc/jmsjavadownloads/model/GenerateArtifactDownloadUrlDetails.java index a2f567e5a84..bc5108598cc 100644 --- a/bmc-jmsjavadownloads/src/main/java/com/oracle/bmc/jmsjavadownloads/model/GenerateArtifactDownloadUrlDetails.java +++ b/bmc-jmsjavadownloads/src/main/java/com/oracle/bmc/jmsjavadownloads/model/GenerateArtifactDownloadUrlDetails.java @@ -22,14 +22,31 @@ public final class GenerateArtifactDownloadUrlDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"artifactId"}) - public GenerateArtifactDownloadUrlDetails(Long artifactId) { + @java.beans.ConstructorProperties({"compartmentId", "artifactId"}) + public GenerateArtifactDownloadUrlDetails(String compartmentId, Long artifactId) { super(); + this.compartmentId = compartmentId; this.artifactId = artifactId; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + /** + * The tenancy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the user initiating the download. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The tenancy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the user initiating the download. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } /** * Unique identifier for the Java runtime artifact. **/ @@ -52,7 +69,7 @@ public Builder artifactId(Long artifactId) { public GenerateArtifactDownloadUrlDetails build() { GenerateArtifactDownloadUrlDetails model = - new GenerateArtifactDownloadUrlDetails(this.artifactId); + new GenerateArtifactDownloadUrlDetails(this.compartmentId, this.artifactId); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -61,6 +78,9 @@ public GenerateArtifactDownloadUrlDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(GenerateArtifactDownloadUrlDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } if (model.wasPropertyExplicitlySet("artifactId")) { this.artifactId(model.getArtifactId()); } @@ -79,6 +99,20 @@ public Builder toBuilder() { return new Builder().copy(this); } + /** + * The tenancy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the user initiating the download. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The tenancy [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the user initiating the download. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + /** * Unique identifier for the Java runtime artifact. **/ @@ -107,7 +141,8 @@ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("GenerateArtifactDownloadUrlDetails("); sb.append("super=").append(super.toString()); - sb.append("artifactId=").append(String.valueOf(this.artifactId)); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", artifactId=").append(String.valueOf(this.artifactId)); sb.append(")"); return sb.toString(); } @@ -122,13 +157,18 @@ public boolean equals(Object o) { } GenerateArtifactDownloadUrlDetails other = (GenerateArtifactDownloadUrlDetails) o; - return java.util.Objects.equals(this.artifactId, other.artifactId) && super.equals(other); + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.artifactId, other.artifactId) + && super.equals(other); } @Override public int hashCode() { final int PRIME = 59; int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.artifactId == null ? 43 : this.artifactId.hashCode()); result = (result * PRIME) + super.hashCode(); return result; diff --git a/bmc-jmsjavadownloads/src/main/java/com/oracle/bmc/jmsjavadownloads/requests/ListJavaDownloadTokensRequest.java b/bmc-jmsjavadownloads/src/main/java/com/oracle/bmc/jmsjavadownloads/requests/ListJavaDownloadTokensRequest.java index 79fff4aeab8..beb705ce8aa 100644 --- a/bmc-jmsjavadownloads/src/main/java/com/oracle/bmc/jmsjavadownloads/requests/ListJavaDownloadTokensRequest.java +++ b/bmc-jmsjavadownloads/src/main/java/com/oracle/bmc/jmsjavadownloads/requests/ListJavaDownloadTokensRequest.java @@ -83,7 +83,7 @@ public String getFamilyVersion() { /** * A filter to return only resources that match the user principal detail. * The search string can be any of the property values from the {@link #principal(PrincipalRequest) principal} object. - * This object is used as response datatype for the {@code createdBy} and {@code lastUpdatedBy} fields in applicable resource. + * This object is used as a response datatype for the {@code createdBy} and {@code lastUpdatedBy} fields in applicable resource. * */ private String searchByUser; @@ -91,7 +91,7 @@ public String getFamilyVersion() { /** * A filter to return only resources that match the user principal detail. * The search string can be any of the property values from the {@link #principal(PrincipalRequest) principal} object. - * This object is used as response datatype for the {@code createdBy} and {@code lastUpdatedBy} fields in applicable resource. + * This object is used as a response datatype for the {@code createdBy} and {@code lastUpdatedBy} fields in applicable resource. * */ public String getSearchByUser() { @@ -258,7 +258,7 @@ public Builder familyVersion(String familyVersion) { /** * A filter to return only resources that match the user principal detail. * The search string can be any of the property values from the {@link #principal(PrincipalRequest) principal} object. - * This object is used as response datatype for the {@code createdBy} and {@code lastUpdatedBy} fields in applicable resource. + * This object is used as a response datatype for the {@code createdBy} and {@code lastUpdatedBy} fields in applicable resource. * */ private String searchByUser = null; @@ -266,7 +266,7 @@ public Builder familyVersion(String familyVersion) { /** * A filter to return only resources that match the user principal detail. * The search string can be any of the property values from the {@link #principal(PrincipalRequest) principal} object. - * This object is used as response datatype for the {@code createdBy} and {@code lastUpdatedBy} fields in applicable resource. + * This object is used as a response datatype for the {@code createdBy} and {@code lastUpdatedBy} fields in applicable resource. * * @param searchByUser the value to set * @return this builder instance diff --git a/bmc-jmsjavadownloads/src/main/java/com/oracle/bmc/jmsjavadownloads/requests/ListJavaLicenseAcceptanceRecordsRequest.java b/bmc-jmsjavadownloads/src/main/java/com/oracle/bmc/jmsjavadownloads/requests/ListJavaLicenseAcceptanceRecordsRequest.java index d99af812e02..f8683803e60 100644 --- a/bmc-jmsjavadownloads/src/main/java/com/oracle/bmc/jmsjavadownloads/requests/ListJavaLicenseAcceptanceRecordsRequest.java +++ b/bmc-jmsjavadownloads/src/main/java/com/oracle/bmc/jmsjavadownloads/requests/ListJavaLicenseAcceptanceRecordsRequest.java @@ -28,7 +28,7 @@ public String getCompartmentId() { /** * A filter to return only resources that match the user principal detail. * The search string can be any of the property values from the {@link #principal(PrincipalRequest) principal} object. - * This object is used as response datatype for the {@code createdBy} and {@code lastUpdatedBy} fields in applicable resource. + * This object is used as a response datatype for the {@code createdBy} and {@code lastUpdatedBy} fields in applicable resource. * */ private String searchByUser; @@ -36,7 +36,7 @@ public String getCompartmentId() { /** * A filter to return only resources that match the user principal detail. * The search string can be any of the property values from the {@link #principal(PrincipalRequest) principal} object. - * This object is used as response datatype for the {@code createdBy} and {@code lastUpdatedBy} fields in applicable resource. + * This object is used as a response datatype for the {@code createdBy} and {@code lastUpdatedBy} fields in applicable resource. * */ public String getSearchByUser() { @@ -160,7 +160,7 @@ public Builder compartmentId(String compartmentId) { /** * A filter to return only resources that match the user principal detail. * The search string can be any of the property values from the {@link #principal(PrincipalRequest) principal} object. - * This object is used as response datatype for the {@code createdBy} and {@code lastUpdatedBy} fields in applicable resource. + * This object is used as a response datatype for the {@code createdBy} and {@code lastUpdatedBy} fields in applicable resource. * */ private String searchByUser = null; @@ -168,7 +168,7 @@ public Builder compartmentId(String compartmentId) { /** * A filter to return only resources that match the user principal detail. * The search string can be any of the property values from the {@link #principal(PrincipalRequest) principal} object. - * This object is used as response datatype for the {@code createdBy} and {@code lastUpdatedBy} fields in applicable resource. + * This object is used as a response datatype for the {@code createdBy} and {@code lastUpdatedBy} fields in applicable resource. * * @param searchByUser the value to set * @return this builder instance diff --git a/bmc-keymanagement/pom.xml b/bmc-keymanagement/pom.xml index ebc30a1a651..3761a28f428 100644 --- a/bmc-keymanagement/pom.xml +++ b/bmc-keymanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-keymanagement @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/KmsHsmClusterWaiters.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/KmsHsmClusterWaiters.java index c8d1e7bdb5e..d876c2e0285 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/KmsHsmClusterWaiters.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/KmsHsmClusterWaiters.java @@ -223,7 +223,9 @@ public boolean test(GetHsmPartitionResponse response) { response.getHsmPartition().getLifecycleState()); } }, - false), + targetStatesSet.contains( + com.oracle.bmc.keymanagement.model.HsmPartition.LifecycleState + .Deleted)), request); } } diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/AutoKeyRotationDetails.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/AutoKeyRotationDetails.java index 6949f09b15a..b7c56105e61 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/AutoKeyRotationDetails.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/AutoKeyRotationDetails.java @@ -49,13 +49,13 @@ public AutoKeyRotationDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The interval of auto key rotation. For auto key rotation the interval should between 30 day and 365 days (1 year) + * The interval of auto key rotation. For auto key rotation the interval should between 60 day and 365 days (1 year). Note: User must specify this parameter when creating a new schedule. **/ @com.fasterxml.jackson.annotation.JsonProperty("rotationIntervalInDays") private Integer rotationIntervalInDays; /** - * The interval of auto key rotation. For auto key rotation the interval should between 30 day and 365 days (1 year) + * The interval of auto key rotation. For auto key rotation the interval should between 60 day and 365 days (1 year). Note: User must specify this parameter when creating a new schedule. * @param rotationIntervalInDays the value to set * @return this builder **/ @@ -65,13 +65,13 @@ public Builder rotationIntervalInDays(Integer rotationIntervalInDays) { return this; } /** - * A property indicating scheduled start date expressed as date YYYY-MM-DD String. Example: {@code 2023-04-04T00:00:00Z} . + * A property indicating scheduled start date expressed as date YYYY-MM-DD String. Example: 2023-04-04T00:00:00Z. The time has no significance when scheduling an auto key rotation as this can be done anytime approximately the scheduled day, KMS ignores the time and replaces it with 00:00, for example 2023-04-04T15:14:13Z will be used as 2023-04-04T00:00:00Z . Note : Today\u2019s date will be used if not specified by customer. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeOfScheduleStart") private java.util.Date timeOfScheduleStart; /** - * A property indicating scheduled start date expressed as date YYYY-MM-DD String. Example: {@code 2023-04-04T00:00:00Z} . + * A property indicating scheduled start date expressed as date YYYY-MM-DD String. Example: 2023-04-04T00:00:00Z. The time has no significance when scheduling an auto key rotation as this can be done anytime approximately the scheduled day, KMS ignores the time and replaces it with 00:00, for example 2023-04-04T15:14:13Z will be used as 2023-04-04T00:00:00Z . Note : Today\u2019s date will be used if not specified by customer. * @param timeOfScheduleStart the value to set * @return this builder **/ @@ -81,13 +81,13 @@ public Builder timeOfScheduleStart(java.util.Date timeOfScheduleStart) { return this; } /** - * A property indicating Next estimated scheduled Time, as per the interval, expressed as date YYYY-MM-DD String. Example: {@code 2023-04-04T00:00:00Z} . + * A property indicating Next estimated scheduled Time, as per the interval, expressed as date YYYY-MM-DD String. Example: {@code 2023-04-04T00:00:00Z}. The time has no significance when scheduling an auto key rotation as this can be done anytime approximately the scheduled day, KMS ignores the time and replaces it with 00:00, for example 2023-04-04T15:14:13Z will be used as 2023-04-04T00:00:00Z. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeOfNextRotation") private java.util.Date timeOfNextRotation; /** - * A property indicating Next estimated scheduled Time, as per the interval, expressed as date YYYY-MM-DD String. Example: {@code 2023-04-04T00:00:00Z} . + * A property indicating Next estimated scheduled Time, as per the interval, expressed as date YYYY-MM-DD String. Example: {@code 2023-04-04T00:00:00Z}. The time has no significance when scheduling an auto key rotation as this can be done anytime approximately the scheduled day, KMS ignores the time and replaces it with 00:00, for example 2023-04-04T15:14:13Z will be used as 2023-04-04T00:00:00Z. * @param timeOfNextRotation the value to set * @return this builder **/ @@ -97,13 +97,13 @@ public Builder timeOfNextRotation(java.util.Date timeOfNextRotation) { return this; } /** - * A property indicating Last rotation Date Example: {@code 2023-04-04T00:00:00Z}. + * A property indicating Last rotation Date. Example: {@code 2023-04-04T00:00:00Z}. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeOfLastRotation") private java.util.Date timeOfLastRotation; /** - * A property indicating Last rotation Date Example: {@code 2023-04-04T00:00:00Z}. + * A property indicating Last rotation Date. Example: {@code 2023-04-04T00:00:00Z}. * @param timeOfLastRotation the value to set * @return this builder **/ @@ -129,14 +129,14 @@ public Builder lastRotationStatus(LastRotationStatus lastRotationStatus) { return this; } /** - * The last execution status message. + * The last execution status message of auto key rotation. * **/ @com.fasterxml.jackson.annotation.JsonProperty("lastRotationMessage") private String lastRotationMessage; /** - * The last execution status message. + * The last execution status message of auto key rotation. * * @param lastRotationMessage the value to set * @return this builder @@ -201,13 +201,13 @@ public Builder toBuilder() { } /** - * The interval of auto key rotation. For auto key rotation the interval should between 30 day and 365 days (1 year) + * The interval of auto key rotation. For auto key rotation the interval should between 60 day and 365 days (1 year). Note: User must specify this parameter when creating a new schedule. **/ @com.fasterxml.jackson.annotation.JsonProperty("rotationIntervalInDays") private final Integer rotationIntervalInDays; /** - * The interval of auto key rotation. For auto key rotation the interval should between 30 day and 365 days (1 year) + * The interval of auto key rotation. For auto key rotation the interval should between 60 day and 365 days (1 year). Note: User must specify this parameter when creating a new schedule. * @return the value **/ public Integer getRotationIntervalInDays() { @@ -215,13 +215,13 @@ public Integer getRotationIntervalInDays() { } /** - * A property indicating scheduled start date expressed as date YYYY-MM-DD String. Example: {@code 2023-04-04T00:00:00Z} . + * A property indicating scheduled start date expressed as date YYYY-MM-DD String. Example: 2023-04-04T00:00:00Z. The time has no significance when scheduling an auto key rotation as this can be done anytime approximately the scheduled day, KMS ignores the time and replaces it with 00:00, for example 2023-04-04T15:14:13Z will be used as 2023-04-04T00:00:00Z . Note : Today\u2019s date will be used if not specified by customer. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeOfScheduleStart") private final java.util.Date timeOfScheduleStart; /** - * A property indicating scheduled start date expressed as date YYYY-MM-DD String. Example: {@code 2023-04-04T00:00:00Z} . + * A property indicating scheduled start date expressed as date YYYY-MM-DD String. Example: 2023-04-04T00:00:00Z. The time has no significance when scheduling an auto key rotation as this can be done anytime approximately the scheduled day, KMS ignores the time and replaces it with 00:00, for example 2023-04-04T15:14:13Z will be used as 2023-04-04T00:00:00Z . Note : Today\u2019s date will be used if not specified by customer. * @return the value **/ public java.util.Date getTimeOfScheduleStart() { @@ -229,13 +229,13 @@ public java.util.Date getTimeOfScheduleStart() { } /** - * A property indicating Next estimated scheduled Time, as per the interval, expressed as date YYYY-MM-DD String. Example: {@code 2023-04-04T00:00:00Z} . + * A property indicating Next estimated scheduled Time, as per the interval, expressed as date YYYY-MM-DD String. Example: {@code 2023-04-04T00:00:00Z}. The time has no significance when scheduling an auto key rotation as this can be done anytime approximately the scheduled day, KMS ignores the time and replaces it with 00:00, for example 2023-04-04T15:14:13Z will be used as 2023-04-04T00:00:00Z. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeOfNextRotation") private final java.util.Date timeOfNextRotation; /** - * A property indicating Next estimated scheduled Time, as per the interval, expressed as date YYYY-MM-DD String. Example: {@code 2023-04-04T00:00:00Z} . + * A property indicating Next estimated scheduled Time, as per the interval, expressed as date YYYY-MM-DD String. Example: {@code 2023-04-04T00:00:00Z}. The time has no significance when scheduling an auto key rotation as this can be done anytime approximately the scheduled day, KMS ignores the time and replaces it with 00:00, for example 2023-04-04T15:14:13Z will be used as 2023-04-04T00:00:00Z. * @return the value **/ public java.util.Date getTimeOfNextRotation() { @@ -243,13 +243,13 @@ public java.util.Date getTimeOfNextRotation() { } /** - * A property indicating Last rotation Date Example: {@code 2023-04-04T00:00:00Z}. + * A property indicating Last rotation Date. Example: {@code 2023-04-04T00:00:00Z}. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeOfLastRotation") private final java.util.Date timeOfLastRotation; /** - * A property indicating Last rotation Date Example: {@code 2023-04-04T00:00:00Z}. + * A property indicating Last rotation Date. Example: {@code 2023-04-04T00:00:00Z}. * @return the value **/ public java.util.Date getTimeOfLastRotation() { @@ -320,14 +320,14 @@ public LastRotationStatus getLastRotationStatus() { } /** - * The last execution status message. + * The last execution status message of auto key rotation. * **/ @com.fasterxml.jackson.annotation.JsonProperty("lastRotationMessage") private final String lastRotationMessage; /** - * The last execution status message. + * The last execution status message of auto key rotation. * * @return the value **/ diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/ChangeHsmClusterCompartmentDetails.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/ChangeHsmClusterCompartmentDetails.java index 12cc10dea2e..208c3bc9c6f 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/ChangeHsmClusterCompartmentDetails.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/ChangeHsmClusterCompartmentDetails.java @@ -5,7 +5,7 @@ package com.oracle.bmc.keymanagement.model; /** - * The details of the compartment you wish to move the Hsm. + * The details of the compartment you wish to move the hsm cluster to. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -31,13 +31,13 @@ public ChangeHsmClusterCompartmentDetails(String compartmentId) { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The [OCID] of the compartment to move the hsm to. + * The [OCID] of the compartment to move the hsm cluster to. **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; /** - * The [OCID] of the compartment to move the hsm to. + * The [OCID] of the compartment to move the hsm cluster to. * @param compartmentId the value to set * @return this builder **/ @@ -80,13 +80,13 @@ public Builder toBuilder() { } /** - * The [OCID] of the compartment to move the hsm to. + * The [OCID] of the compartment to move the hsm cluster to. **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private final String compartmentId; /** - * The [OCID] of the compartment to move the hsm to. + * The [OCID] of the compartment to move the hsm cluster to. * @return the value **/ public String getCompartmentId() { diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/CreateHsmClusterDetails.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/CreateHsmClusterDetails.java index cd83c038ab0..8b886396ade 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/CreateHsmClusterDetails.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/CreateHsmClusterDetails.java @@ -5,7 +5,7 @@ package com.oracle.bmc.keymanagement.model; /** - * The details of the HSM resource that you want to create. + * The details of the HSM cluster resource that you want to create. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -43,13 +43,13 @@ public CreateHsmClusterDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The OCID of the compartment where you want to create this HSM resource. + * The OCID of the compartment where you want to create this HSM cluster resource. **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; /** - * The OCID of the compartment where you want to create this HSM resource. + * The OCID of the compartment where you want to create this HSM cluster resource. * @param compartmentId the value to set * @return this builder **/ @@ -59,7 +59,7 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * A user-friendly name for the HSM resource. It does not have to be unique, and it is changeable. + * A user-friendly display name for the HSM cluster resource. It does not have to be unique, and it is changeable. * Avoid entering confidential information. * **/ @@ -67,7 +67,7 @@ public Builder compartmentId(String compartmentId) { private String displayName; /** - * A user-friendly name for the HSM resource. It does not have to be unique, and it is changeable. + * A user-friendly display name for the HSM cluster resource. It does not have to be unique, and it is changeable. * Avoid entering confidential information. * * @param displayName the value to set @@ -170,13 +170,13 @@ public Builder toBuilder() { } /** - * The OCID of the compartment where you want to create this HSM resource. + * The OCID of the compartment where you want to create this HSM cluster resource. **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private final String compartmentId; /** - * The OCID of the compartment where you want to create this HSM resource. + * The OCID of the compartment where you want to create this HSM cluster resource. * @return the value **/ public String getCompartmentId() { @@ -184,7 +184,7 @@ public String getCompartmentId() { } /** - * A user-friendly name for the HSM resource. It does not have to be unique, and it is changeable. + * A user-friendly display name for the HSM cluster resource. It does not have to be unique, and it is changeable. * Avoid entering confidential information. * **/ @@ -192,7 +192,7 @@ public String getCompartmentId() { private final String displayName; /** - * A user-friendly name for the HSM resource. It does not have to be unique, and it is changeable. + * A user-friendly display name for the HSM cluster resource. It does not have to be unique, and it is changeable. * Avoid entering confidential information. * * @return the value diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmCluster.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmCluster.java index 11ea3261ef5..3c45f8b82d1 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmCluster.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmCluster.java @@ -90,7 +90,7 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * A user-friendly name for the HSMCluster resource. It does not have to be unique, and it is changeable. + * A user-friendly display name for the HSMCluster resource. It does not have to be unique, and it is changeable. * Avoid entering confidential information. * **/ @@ -98,7 +98,7 @@ public Builder compartmentId(String compartmentId) { private String displayName; /** - * A user-friendly name for the HSMCluster resource. It does not have to be unique, and it is changeable. + * A user-friendly display name for the HSMCluster resource. It does not have to be unique, and it is changeable. * Avoid entering confidential information. * * @param displayName the value to set @@ -176,13 +176,13 @@ public Builder lifecycleState(LifecycleState lifecycleState) { return this; } /** - * DNS name for the Hsm Cluster. + * DNS name for the HSM Cluster -- this will contain information about the region as well. **/ @com.fasterxml.jackson.annotation.JsonProperty("dnsName") private String dnsName; /** - * DNS name for the Hsm Cluster. + * DNS name for the HSM Cluster -- this will contain information about the region as well. * @param dnsName the value to set * @return this builder **/ @@ -355,7 +355,7 @@ public String getCompartmentId() { } /** - * A user-friendly name for the HSMCluster resource. It does not have to be unique, and it is changeable. + * A user-friendly display name for the HSMCluster resource. It does not have to be unique, and it is changeable. * Avoid entering confidential information. * **/ @@ -363,7 +363,7 @@ public String getCompartmentId() { private final String displayName; /** - * A user-friendly name for the HSMCluster resource. It does not have to be unique, and it is changeable. + * A user-friendly display name for the HSMCluster resource. It does not have to be unique, and it is changeable. * Avoid entering confidential information. * * @return the value @@ -493,13 +493,13 @@ public LifecycleState getLifecycleState() { } /** - * DNS name for the Hsm Cluster. + * DNS name for the HSM Cluster -- this will contain information about the region as well. **/ @com.fasterxml.jackson.annotation.JsonProperty("dnsName") private final String dnsName; /** - * DNS name for the Hsm Cluster. + * DNS name for the HSM Cluster -- this will contain information about the region as well. * @return the value **/ public String getDnsName() { diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmClusterCollection.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmClusterCollection.java index abdf9617f03..73250cc8aa3 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmClusterCollection.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmClusterCollection.java @@ -30,13 +30,13 @@ public HsmClusterCollection(java.util.List items) { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * List of Hsm Clusters. + * List of HSM Cluster Summary Objects. **/ @com.fasterxml.jackson.annotation.JsonProperty("items") private java.util.List items; /** - * List of Hsm Clusters. + * List of HSM Cluster Summary Objects. * @param items the value to set * @return this builder **/ @@ -78,13 +78,13 @@ public Builder toBuilder() { } /** - * List of Hsm Clusters. + * List of HSM Cluster Summary Objects. **/ @com.fasterxml.jackson.annotation.JsonProperty("items") private final java.util.List items; /** - * List of Hsm Clusters. + * List of HSM Cluster Summary Objects. * @return the value **/ public java.util.List getItems() { diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmClusterSummary.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmClusterSummary.java index 5ab9fcb52b1..fed596a815f 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmClusterSummary.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmClusterSummary.java @@ -5,7 +5,7 @@ package com.oracle.bmc.keymanagement.model; /** - * The details of the HSM resource. + * An object which encapsulates the details of a given HSM Cluster. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -134,13 +134,13 @@ public Builder lifecycleState(HsmCluster.LifecycleState lifecycleState) { return this; } /** - * DNS name for the HSMCluster. + * DNS name for the HSMCluster -- this will contain information about the region as well. **/ @com.fasterxml.jackson.annotation.JsonProperty("dnsName") private String dnsName; /** - * DNS name for the HSMCluster. + * DNS name for the HSMCluster -- this will contain information about the region as well. * @param dnsName the value to set * @return this builder **/ @@ -395,13 +395,13 @@ public HsmCluster.LifecycleState getLifecycleState() { } /** - * DNS name for the HSMCluster. + * DNS name for the HSMCluster -- this will contain information about the region as well. **/ @com.fasterxml.jackson.annotation.JsonProperty("dnsName") private final String dnsName; /** - * DNS name for the HSMCluster. + * DNS name for the HSMCluster -- this will contain information about the region as well. * @return the value **/ public String getDnsName() { diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmPartition.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmPartition.java index f4eaf3b34bc..d0ce4ea1238 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmPartition.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmPartition.java @@ -46,13 +46,13 @@ public HsmPartition( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The OCID of the HSM resource. + * The OCID of the HSM resource. Each HSM resource has a unique OCID as an identifier. **/ @com.fasterxml.jackson.annotation.JsonProperty("id") private String id; /** - * The OCID of the HSM resource. + * The OCID of the HSM resource. Each HSM resource has a unique OCID as an identifier. * @param id the value to set * @return this builder **/ @@ -78,13 +78,13 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * Details of PortNumber and PortType. + * Details of a single portInformation item include the PortNumber (an integer used as an identifier) and the PortType (refers to either an enum value of Managementutility,Clientutility, or null) **/ @com.fasterxml.jackson.annotation.JsonProperty("portInformation") private java.util.List portInformation; /** - * Details of PortNumber and PortType. + * Details of a single portInformation item include the PortNumber (an integer used as an identifier) and the PortType (refers to either an enum value of Managementutility,Clientutility, or null) * @param portInformation the value to set * @return this builder **/ @@ -138,13 +138,19 @@ public Builder timeUpdated(java.util.Date timeUpdated) { return this; } /** - * The HSMPartition's current lifecycle state. + * A HSMCluster resource's current lifecycle state. + *

+ * Example: {@code ACTIVE} + * **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private LifecycleState lifecycleState; /** - * The HSMPartition's current lifecycle state. + * A HSMCluster resource's current lifecycle state. + *

+ * Example: {@code ACTIVE} + * * @param lifecycleState the value to set * @return this builder **/ @@ -208,13 +214,13 @@ public Builder toBuilder() { } /** - * The OCID of the HSM resource. + * The OCID of the HSM resource. Each HSM resource has a unique OCID as an identifier. **/ @com.fasterxml.jackson.annotation.JsonProperty("id") private final String id; /** - * The OCID of the HSM resource. + * The OCID of the HSM resource. Each HSM resource has a unique OCID as an identifier. * @return the value **/ public String getId() { @@ -236,13 +242,13 @@ public String getCompartmentId() { } /** - * Details of PortNumber and PortType. + * Details of a single portInformation item include the PortNumber (an integer used as an identifier) and the PortType (refers to either an enum value of Managementutility,Clientutility, or null) **/ @com.fasterxml.jackson.annotation.JsonProperty("portInformation") private final java.util.List portInformation; /** - * Details of PortNumber and PortType. + * Details of a single portInformation item include the PortNumber (an integer used as an identifier) and the PortType (refers to either an enum value of Managementutility,Clientutility, or null) * @return the value **/ public java.util.List getPortInformation() { @@ -290,13 +296,20 @@ public java.util.Date getTimeUpdated() { } /** - * The HSMPartition's current lifecycle state. + * A HSMCluster resource's current lifecycle state. + *

+ * Example: {@code ACTIVE} + * **/ public enum LifecycleState { Active("ACTIVE"), Inactive("INACTIVE"), Activating("ACTIVATING"), ActivationRequired("ACTIVATION_REQUIRED"), + SchedulingDeletion("SCHEDULING_DELETION"), + PendingDeletion("PENDING_DELETION"), + Deleting("DELETING"), + Deleted("DELETED"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -340,13 +353,19 @@ public static LifecycleState create(String key) { } }; /** - * The HSMPartition's current lifecycle state. + * A HSMCluster resource's current lifecycle state. + *

+ * Example: {@code ACTIVE} + * **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private final LifecycleState lifecycleState; /** - * The HSMPartition's current lifecycle state. + * A HSMCluster resource's current lifecycle state. + *

+ * Example: {@code ACTIVE} + * * @return the value **/ public LifecycleState getLifecycleState() { diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmPartitionCollection.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmPartitionCollection.java index 41ada1e4981..0324ef73049 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmPartitionCollection.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmPartitionCollection.java @@ -5,7 +5,7 @@ package com.oracle.bmc.keymanagement.model; /** - * HsmPartitionCollection object with page of HsmPartitionSummary objects. + * HsmPartitionCollection object with page of HsmPartitionSummary objects. A HsmPartitionSummary object contains details about the corresponding HSM. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmPartitionSummary.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmPartitionSummary.java index d501a8213e6..bb93063ba96 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmPartitionSummary.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/HsmPartitionSummary.java @@ -5,7 +5,7 @@ package com.oracle.bmc.keymanagement.model; /** - * The details of the Hsm. + * An object which encapsulates the details of a given HSM. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -51,13 +51,13 @@ public HsmPartitionSummary( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The OCID of the HSM resource. + * The OCID of the HSM resource. Each HSM resource will have a unique OCID identifier. **/ @com.fasterxml.jackson.annotation.JsonProperty("id") private String id; /** - * The OCID of the HSM resource. + * The OCID of the HSM resource. Each HSM resource will have a unique OCID identifier. * @param id the value to set * @return this builder **/ @@ -83,13 +83,19 @@ public Builder hsmClusterId(String hsmClusterId) { return this; } /** - * The Hsm's current lifecycle state. + * A HSMCluster resource's current lifecycle state. + *

+ * Example: {@code ACTIVE} + * **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private HsmPartition.LifecycleState lifecycleState; /** - * The Hsm's current lifecycle state. + * A HSMCluster resource's current lifecycle state. + *

+ * Example: {@code ACTIVE} + * * @param lifecycleState the value to set * @return this builder **/ @@ -115,13 +121,13 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * Port summary. + * Details of a single portInformation item include the PortNumber (an integer used as an identifier) and the PortType (refers to either an enum value of Managementutility,Clientutility, or null) **/ @com.fasterxml.jackson.annotation.JsonProperty("portInformation") private java.util.List portInformation; /** - * Port summary. + * Details of a single portInformation item include the PortNumber (an integer used as an identifier) and the PortType (refers to either an enum value of Managementutility,Clientutility, or null) * @param portInformation the value to set * @return this builder **/ @@ -233,13 +239,13 @@ public Builder toBuilder() { } /** - * The OCID of the HSM resource. + * The OCID of the HSM resource. Each HSM resource will have a unique OCID identifier. **/ @com.fasterxml.jackson.annotation.JsonProperty("id") private final String id; /** - * The OCID of the HSM resource. + * The OCID of the HSM resource. Each HSM resource will have a unique OCID identifier. * @return the value **/ public String getId() { @@ -261,13 +267,19 @@ public String getHsmClusterId() { } /** - * The Hsm's current lifecycle state. + * A HSMCluster resource's current lifecycle state. + *

+ * Example: {@code ACTIVE} + * **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private final HsmPartition.LifecycleState lifecycleState; /** - * The Hsm's current lifecycle state. + * A HSMCluster resource's current lifecycle state. + *

+ * Example: {@code ACTIVE} + * * @return the value **/ public HsmPartition.LifecycleState getLifecycleState() { @@ -289,13 +301,13 @@ public String getCompartmentId() { } /** - * Port summary. + * Details of a single portInformation item include the PortNumber (an integer used as an identifier) and the PortType (refers to either an enum value of Managementutility,Clientutility, or null) **/ @com.fasterxml.jackson.annotation.JsonProperty("portInformation") private final java.util.List portInformation; /** - * Port summary. + * Details of a single portInformation item include the PortNumber (an integer used as an identifier) and the PortType (refers to either an enum value of Managementutility,Clientutility, or null) * @return the value **/ public java.util.List getPortInformation() { diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/PortInformation.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/PortInformation.java index 51328740dc2..9202433fdb7 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/PortInformation.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/PortInformation.java @@ -5,7 +5,7 @@ package com.oracle.bmc.keymanagement.model; /** - * The details of the port. + * Details of a single portInformation item include the PortNumber (an integer used as an identifier) and the PortType (this refers to either an enum value of Management Utility, Client Utility, or null) *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -29,13 +29,13 @@ public PortInformation(Integer portNumber, PortType portType) { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The port number of the cavium server. + * The port number is a unique identifier which is typically used as the loadbalancer listener. **/ @com.fasterxml.jackson.annotation.JsonProperty("portNumber") private Integer portNumber; /** - * The port number of the cavium server. + * The port number is a unique identifier which is typically used as the loadbalancer listener. * @param portNumber the value to set * @return this builder **/ @@ -45,13 +45,13 @@ public Builder portNumber(Integer portNumber) { return this; } /** - * Port type associated for the port number. + * Port type associated for the port number. The two port type enums are {@code CLIENTUTILITY} and {@code MANAGEMENTUTILITY}. The CLIENTUTILITY enum corresponds to a port which is used by the client daemon. The MANAGEMENTUTILITY enum corresponds to a port used by user management utility. **/ @com.fasterxml.jackson.annotation.JsonProperty("portType") private PortType portType; /** - * Port type associated for the port number. + * Port type associated for the port number. The two port type enums are {@code CLIENTUTILITY} and {@code MANAGEMENTUTILITY}. The CLIENTUTILITY enum corresponds to a port which is used by the client daemon. The MANAGEMENTUTILITY enum corresponds to a port used by user management utility. * @param portType the value to set * @return this builder **/ @@ -96,13 +96,13 @@ public Builder toBuilder() { } /** - * The port number of the cavium server. + * The port number is a unique identifier which is typically used as the loadbalancer listener. **/ @com.fasterxml.jackson.annotation.JsonProperty("portNumber") private final Integer portNumber; /** - * The port number of the cavium server. + * The port number is a unique identifier which is typically used as the loadbalancer listener. * @return the value **/ public Integer getPortNumber() { @@ -110,7 +110,7 @@ public Integer getPortNumber() { } /** - * Port type associated for the port number. + * Port type associated for the port number. The two port type enums are {@code CLIENTUTILITY} and {@code MANAGEMENTUTILITY}. The CLIENTUTILITY enum corresponds to a port which is used by the client daemon. The MANAGEMENTUTILITY enum corresponds to a port used by user management utility. **/ public enum PortType { Clientutility("CLIENTUTILITY"), @@ -158,13 +158,13 @@ public static PortType create(String key) { } }; /** - * Port type associated for the port number. + * Port type associated for the port number. The two port type enums are {@code CLIENTUTILITY} and {@code MANAGEMENTUTILITY}. The CLIENTUTILITY enum corresponds to a port which is used by the client daemon. The MANAGEMENTUTILITY enum corresponds to a port used by user management utility. **/ @com.fasterxml.jackson.annotation.JsonProperty("portType") private final PortType portType; /** - * Port type associated for the port number. + * Port type associated for the port number. The two port type enums are {@code CLIENTUTILITY} and {@code MANAGEMENTUTILITY}. The CLIENTUTILITY enum corresponds to a port which is used by the client daemon. The MANAGEMENTUTILITY enum corresponds to a port used by user management utility. * @return the value **/ public PortType getPortType() { diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/PreCoUserCredentials.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/PreCoUserCredentials.java index dde208f61d8..e8889b3c579 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/PreCoUserCredentials.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/PreCoUserCredentials.java @@ -31,13 +31,13 @@ public PreCoUserCredentials(String username, String password) { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The pre crypto officer username.. + * The pre crypto officer username, which should be chosen as a non confidential string. **/ @com.fasterxml.jackson.annotation.JsonProperty("username") private String username; /** - * The pre crypto officer username.. + * The pre crypto officer username, which should be chosen as a non confidential string. * @param username the value to set * @return this builder **/ @@ -98,13 +98,13 @@ public Builder toBuilder() { } /** - * The pre crypto officer username.. + * The pre crypto officer username, which should be chosen as a non confidential string. **/ @com.fasterxml.jackson.annotation.JsonProperty("username") private final String username; /** - * The pre crypto officer username.. + * The pre crypto officer username, which should be chosen as a non confidential string. * @return the value **/ public String getUsername() { diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/UploadPartitionCertificatesDetails.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/UploadPartitionCertificatesDetails.java index 00bdeebfa11..31ae41c7078 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/UploadPartitionCertificatesDetails.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/UploadPartitionCertificatesDetails.java @@ -5,7 +5,7 @@ package com.oracle.bmc.keymanagement.model; /** - * The details of the partition certificates. + * An object that encapsulates the necessary partition certificates. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -33,13 +33,13 @@ public UploadPartitionCertificatesDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * Base64 encoded (StandardCharsets.UTF_8) Partition Certificate. + * Base64 encoded (StandardCharsets.UTF_8) Partition Certificate, which gets created when the CSR is signed. **/ @com.fasterxml.jackson.annotation.JsonProperty("partitionCertificate") private String partitionCertificate; /** - * Base64 encoded (StandardCharsets.UTF_8) Partition Certificate. + * Base64 encoded (StandardCharsets.UTF_8) Partition Certificate, which gets created when the CSR is signed. * @param partitionCertificate the value to set * @return this builder **/ @@ -49,13 +49,13 @@ public Builder partitionCertificate(String partitionCertificate) { return this; } /** - * Base64 encoded (StandardCharsets.UTF_8) Partition Owner Certificate. + * Base64 encoded (StandardCharsets.UTF_8) Partition Owner Certificate, which is used to help sign the CSR. **/ @com.fasterxml.jackson.annotation.JsonProperty("partitionOwnerCertificate") private String partitionOwnerCertificate; /** - * Base64 encoded (StandardCharsets.UTF_8) Partition Owner Certificate. + * Base64 encoded (StandardCharsets.UTF_8) Partition Owner Certificate, which is used to help sign the CSR. * @param partitionOwnerCertificate the value to set * @return this builder **/ @@ -102,13 +102,13 @@ public Builder toBuilder() { } /** - * Base64 encoded (StandardCharsets.UTF_8) Partition Certificate. + * Base64 encoded (StandardCharsets.UTF_8) Partition Certificate, which gets created when the CSR is signed. **/ @com.fasterxml.jackson.annotation.JsonProperty("partitionCertificate") private final String partitionCertificate; /** - * Base64 encoded (StandardCharsets.UTF_8) Partition Certificate. + * Base64 encoded (StandardCharsets.UTF_8) Partition Certificate, which gets created when the CSR is signed. * @return the value **/ public String getPartitionCertificate() { @@ -116,13 +116,13 @@ public String getPartitionCertificate() { } /** - * Base64 encoded (StandardCharsets.UTF_8) Partition Owner Certificate. + * Base64 encoded (StandardCharsets.UTF_8) Partition Owner Certificate, which is used to help sign the CSR. **/ @com.fasterxml.jackson.annotation.JsonProperty("partitionOwnerCertificate") private final String partitionOwnerCertificate; /** - * Base64 encoded (StandardCharsets.UTF_8) Partition Owner Certificate. + * Base64 encoded (StandardCharsets.UTF_8) Partition Owner Certificate, which is used to help sign the CSR. * @return the value **/ public String getPartitionOwnerCertificate() { diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/Vault.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/Vault.java index f7b40b2be9e..f0bebc9edc9 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/Vault.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/model/Vault.java @@ -35,6 +35,7 @@ public final class Vault extends com.oracle.bmc.http.internal.ExplicitlySetBmcMo "wrappingkeyId", "replicaDetails", "isPrimary", + "isVaultReplicable", "externalKeyManagerMetadataSummary" }) public Vault( @@ -53,6 +54,7 @@ public Vault( String wrappingkeyId, VaultReplicaDetails replicaDetails, Boolean isPrimary, + Boolean isVaultReplicable, ExternalKeyManagerMetadataSummary externalKeyManagerMetadataSummary) { super(); this.compartmentId = compartmentId; @@ -70,6 +72,7 @@ public Vault( this.wrappingkeyId = wrappingkeyId; this.replicaDetails = replicaDetails; this.isPrimary = isPrimary; + this.isVaultReplicable = isVaultReplicable; this.externalKeyManagerMetadataSummary = externalKeyManagerMetadataSummary; } @@ -359,6 +362,22 @@ public Builder isPrimary(Boolean isPrimary) { this.__explicitlySet__.add("isPrimary"); return this; } + /** + * A Boolean value that indicates whether the Vault has cross region replication capability. Always true for Virtual Private Vaults. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isVaultReplicable") + private Boolean isVaultReplicable; + + /** + * A Boolean value that indicates whether the Vault has cross region replication capability. Always true for Virtual Private Vaults. + * @param isVaultReplicable the value to set + * @return this builder + **/ + public Builder isVaultReplicable(Boolean isVaultReplicable) { + this.isVaultReplicable = isVaultReplicable; + this.__explicitlySet__.add("isVaultReplicable"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("externalKeyManagerMetadataSummary") private ExternalKeyManagerMetadataSummary externalKeyManagerMetadataSummary; @@ -391,6 +410,7 @@ public Vault build() { this.wrappingkeyId, this.replicaDetails, this.isPrimary, + this.isVaultReplicable, this.externalKeyManagerMetadataSummary); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -445,6 +465,9 @@ public Builder copy(Vault model) { if (model.wasPropertyExplicitlySet("isPrimary")) { this.isPrimary(model.getIsPrimary()); } + if (model.wasPropertyExplicitlySet("isVaultReplicable")) { + this.isVaultReplicable(model.getIsVaultReplicable()); + } if (model.wasPropertyExplicitlySet("externalKeyManagerMetadataSummary")) { this.externalKeyManagerMetadataSummary( model.getExternalKeyManagerMetadataSummary()); @@ -827,6 +850,20 @@ public Boolean getIsPrimary() { return isPrimary; } + /** + * A Boolean value that indicates whether the Vault has cross region replication capability. Always true for Virtual Private Vaults. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isVaultReplicable") + private final Boolean isVaultReplicable; + + /** + * A Boolean value that indicates whether the Vault has cross region replication capability. Always true for Virtual Private Vaults. + * @return the value + **/ + public Boolean getIsVaultReplicable() { + return isVaultReplicable; + } + @com.fasterxml.jackson.annotation.JsonProperty("externalKeyManagerMetadataSummary") private final ExternalKeyManagerMetadataSummary externalKeyManagerMetadataSummary; @@ -863,6 +900,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", wrappingkeyId=").append(String.valueOf(this.wrappingkeyId)); sb.append(", replicaDetails=").append(String.valueOf(this.replicaDetails)); sb.append(", isPrimary=").append(String.valueOf(this.isPrimary)); + sb.append(", isVaultReplicable=").append(String.valueOf(this.isVaultReplicable)); sb.append(", externalKeyManagerMetadataSummary=") .append(String.valueOf(this.externalKeyManagerMetadataSummary)); sb.append(")"); @@ -894,6 +932,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.wrappingkeyId, other.wrappingkeyId) && java.util.Objects.equals(this.replicaDetails, other.replicaDetails) && java.util.Objects.equals(this.isPrimary, other.isPrimary) + && java.util.Objects.equals(this.isVaultReplicable, other.isVaultReplicable) && java.util.Objects.equals( this.externalKeyManagerMetadataSummary, other.externalKeyManagerMetadataSummary) @@ -939,6 +978,9 @@ public int hashCode() { (result * PRIME) + (this.replicaDetails == null ? 43 : this.replicaDetails.hashCode()); result = (result * PRIME) + (this.isPrimary == null ? 43 : this.isPrimary.hashCode()); + result = + (result * PRIME) + + (this.isVaultReplicable == null ? 43 : this.isVaultReplicable.hashCode()); result = (result * PRIME) + (this.externalKeyManagerMetadataSummary == null diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/CancelHsmClusterDeletionRequest.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/CancelHsmClusterDeletionRequest.java index 90d7546d9ca..e5d27bb7c60 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/CancelHsmClusterDeletionRequest.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/CancelHsmClusterDeletionRequest.java @@ -13,12 +13,12 @@ public class CancelHsmClusterDeletionRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ private String hsmClusterId; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ public String getHsmClusterId() { return hsmClusterId; @@ -93,12 +93,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ private String hsmClusterId = null; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. * @param hsmClusterId the value to set * @return this builder instance */ diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/ChangeHsmClusterCompartmentRequest.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/ChangeHsmClusterCompartmentRequest.java index d6019f8b731..075411e2561 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/ChangeHsmClusterCompartmentRequest.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/ChangeHsmClusterCompartmentRequest.java @@ -14,12 +14,12 @@ public class ChangeHsmClusterCompartmentRequest com.oracle.bmc.keymanagement.model.ChangeHsmClusterCompartmentDetails> { /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ private String hsmClusterId; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ public String getHsmClusterId() { return hsmClusterId; @@ -118,12 +118,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ private String hsmClusterId = null; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. * @param hsmClusterId the value to set * @return this builder instance */ diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/DownloadCertificateSigningRequestRequest.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/DownloadCertificateSigningRequestRequest.java index b8938acaa67..f25a03b6ed2 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/DownloadCertificateSigningRequestRequest.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/DownloadCertificateSigningRequestRequest.java @@ -13,12 +13,12 @@ public class DownloadCertificateSigningRequestRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ private String hsmClusterId; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ public String getHsmClusterId() { return hsmClusterId; @@ -93,12 +93,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ private String hsmClusterId = null; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. * @param hsmClusterId the value to set * @return this builder instance */ diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/GetHsmClusterRequest.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/GetHsmClusterRequest.java index 9395d630d44..efa0a1e4efe 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/GetHsmClusterRequest.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/GetHsmClusterRequest.java @@ -12,12 +12,12 @@ public class GetHsmClusterRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ private String hsmClusterId; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ public String getHsmClusterId() { return hsmClusterId; @@ -48,12 +48,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ private String hsmClusterId = null; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. * @param hsmClusterId the value to set * @return this builder instance */ diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/GetHsmPartitionRequest.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/GetHsmPartitionRequest.java index bd1409be064..b4f20809dfe 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/GetHsmPartitionRequest.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/GetHsmPartitionRequest.java @@ -12,23 +12,23 @@ public class GetHsmPartitionRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ private String hsmClusterId; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ public String getHsmClusterId() { return hsmClusterId; } /** - * The OCID of the HSM Partition. + * The OCID of the HSM Partition. This is a unique identifier which each hsmPartition will have. */ private String hsmPartitionId; /** - * The OCID of the HSM Partition. + * The OCID of the HSM Partition. This is a unique identifier which each hsmPartition will have. */ public String getHsmPartitionId() { return hsmPartitionId; @@ -82,12 +82,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ private String hsmClusterId = null; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. * @param hsmClusterId the value to set * @return this builder instance */ @@ -97,12 +97,12 @@ public Builder hsmClusterId(String hsmClusterId) { } /** - * The OCID of the HSM Partition. + * The OCID of the HSM Partition. This is a unique identifier which each hsmPartition will have. */ private String hsmPartitionId = null; /** - * The OCID of the HSM Partition. + * The OCID of the HSM Partition. This is a unique identifier which each hsmPartition will have. * @param hsmPartitionId the value to set * @return this builder instance */ diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/GetPreCoUserCredentialsRequest.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/GetPreCoUserCredentialsRequest.java index b45fb736430..3bcd8dba207 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/GetPreCoUserCredentialsRequest.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/GetPreCoUserCredentialsRequest.java @@ -13,12 +13,12 @@ public class GetPreCoUserCredentialsRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ private String hsmClusterId; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ public String getHsmClusterId() { return hsmClusterId; @@ -72,12 +72,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ private String hsmClusterId = null; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. * @param hsmClusterId the value to set * @return this builder instance */ diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/ListHsmPartitionsRequest.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/ListHsmPartitionsRequest.java index 06662036b05..212e2ca50dd 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/ListHsmPartitionsRequest.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/ListHsmPartitionsRequest.java @@ -12,12 +12,12 @@ public class ListHsmPartitionsRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ private String hsmClusterId; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ public String getHsmClusterId() { return hsmClusterId; @@ -193,12 +193,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ private String hsmClusterId = null; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. * @param hsmClusterId the value to set * @return this builder instance */ diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/ScheduleHsmClusterDeletionRequest.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/ScheduleHsmClusterDeletionRequest.java index 68a78167890..543adf4dc3a 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/ScheduleHsmClusterDeletionRequest.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/ScheduleHsmClusterDeletionRequest.java @@ -14,12 +14,12 @@ public class ScheduleHsmClusterDeletionRequest com.oracle.bmc.keymanagement.model.ScheduleHsmClusterDeletionDetails> { /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ private String hsmClusterId; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ public String getHsmClusterId() { return hsmClusterId; @@ -118,12 +118,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ private String hsmClusterId = null; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. * @param hsmClusterId the value to set * @return this builder instance */ diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/UpdateHsmClusterRequest.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/UpdateHsmClusterRequest.java index e6bd815d45a..0d2308cc52d 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/UpdateHsmClusterRequest.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/UpdateHsmClusterRequest.java @@ -14,12 +14,12 @@ public class UpdateHsmClusterRequest com.oracle.bmc.keymanagement.model.UpdateHsmClusterDetails> { /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ private String hsmClusterId; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ public String getHsmClusterId() { return hsmClusterId; @@ -93,12 +93,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ private String hsmClusterId = null; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. * @param hsmClusterId the value to set * @return this builder instance */ diff --git a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/UploadPartitionCertificatesRequest.java b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/UploadPartitionCertificatesRequest.java index a61190730fb..3bcedfcd69c 100644 --- a/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/UploadPartitionCertificatesRequest.java +++ b/bmc-keymanagement/src/main/java/com/oracle/bmc/keymanagement/requests/UploadPartitionCertificatesRequest.java @@ -14,12 +14,12 @@ public class UploadPartitionCertificatesRequest com.oracle.bmc.keymanagement.model.UploadPartitionCertificatesDetails> { /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ private String hsmClusterId; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ public String getHsmClusterId() { return hsmClusterId; @@ -118,12 +118,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. */ private String hsmClusterId = null; /** - * The OCID of the HSM Cluster. + * The OCID of the HSM Cluster. This is a unique identifier assigned to each hsmCluster. * @param hsmClusterId the value to set * @return this builder instance */ diff --git a/bmc-licensemanager/pom.xml b/bmc-licensemanager/pom.xml index c2e62bb6624..93d6770fe0c 100644 --- a/bmc-licensemanager/pom.xml +++ b/bmc-licensemanager/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-licensemanager @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-limits/pom.xml b/bmc-limits/pom.xml index a00333d6f5b..84720b9301a 100644 --- a/bmc-limits/pom.xml +++ b/bmc-limits/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-limits @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/Limits.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/Limits.java index 2c625974713..e27dce59da5 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/Limits.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/Limits.java @@ -63,7 +63,8 @@ public interface Limits extends AutoCloseable { * For a given compartmentId, resource limit name, and scope, returns the following: * * The number of available resources associated with the given limit. * * The usage in the selected compartment for the given limit. - * Note that not all resource limits support this API. If the value is not available, the API returns a 404 response. + * If Subscription Id is provided, then usage for resource created in that subscription will be returned + * Note that not all resource limits support this API. If the value is not available, the API returns a 404 response. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -76,7 +77,7 @@ public interface Limits extends AutoCloseable { GetResourceAvailabilityResponse getResourceAvailability(GetResourceAvailabilityRequest request); /** - * Includes a list of resource limits that are currently supported. + * Includes a list of resource limits that are currently supported. If subscription Id is provided, then only resource limits supported by subscription will be returned * If the 'areQuotasSupported' property is true, you can create quota policies on top of this limit at the * compartment level. * @@ -91,7 +92,7 @@ public interface Limits extends AutoCloseable { ListLimitDefinitionsResponse listLimitDefinitions(ListLimitDefinitionsRequest request); /** - * Includes a full list of resource limits belonging to a given service. + * Includes a full list of resource limits belonging to a given service. If subscription Id is provided, limit value for subscription will be returned. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -104,7 +105,7 @@ public interface Limits extends AutoCloseable { ListLimitValuesResponse listLimitValues(ListLimitValuesRequest request); /** - * Returns the list of supported services. + * Returns the list of supported services. If subscription ID is provided then only services supported by subscription will be returned. * This includes the programmatic service name, along with the friendly service name. * * @param request The request object containing the details to send diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/LimitsAsync.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/LimitsAsync.java index d5520cf497a..025eeff2415 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/LimitsAsync.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/LimitsAsync.java @@ -62,7 +62,8 @@ public interface LimitsAsync extends AutoCloseable { * For a given compartmentId, resource limit name, and scope, returns the following: * * The number of available resources associated with the given limit. * * The usage in the selected compartment for the given limit. - * Note that not all resource limits support this API. If the value is not available, the API returns a 404 response. + * If Subscription Id is provided, then usage for resource created in that subscription will be returned + * Note that not all resource limits support this API. If the value is not available, the API returns a 404 response. * * * @param request The request object containing the details to send @@ -79,7 +80,7 @@ java.util.concurrent.Future getResourceAvailabi handler); /** - * Includes a list of resource limits that are currently supported. + * Includes a list of resource limits that are currently supported. If subscription Id is provided, then only resource limits supported by subscription will be returned * If the 'areQuotasSupported' property is true, you can create quota policies on top of this limit at the * compartment level. * @@ -98,7 +99,7 @@ java.util.concurrent.Future listLimitDefinitions( handler); /** - * Includes a full list of resource limits belonging to a given service. + * Includes a full list of resource limits belonging to a given service. If subscription Id is provided, limit value for subscription will be returned. * * * @param request The request object containing the details to send @@ -114,7 +115,7 @@ java.util.concurrent.Future listLimitValues( handler); /** - * Returns the list of supported services. + * Returns the list of supported services. If subscription ID is provided then only services supported by subscription will be returned. * This includes the programmatic service name, along with the friendly service name. * * diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/GetResourceAvailabilityConverter.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/GetResourceAvailabilityConverter.java index eb5a0cb84a2..f028888c76f 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/GetResourceAvailabilityConverter.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/GetResourceAvailabilityConverter.java @@ -61,6 +61,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getAvailabilityDomain())); } + if (request.getSubscriptionId() != null) { + target = + target.queryParam( + "subscriptionId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSubscriptionId())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListLimitDefinitionsConverter.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListLimitDefinitionsConverter.java index af441e72cd5..3aa6b5444b9 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListLimitDefinitionsConverter.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListLimitDefinitionsConverter.java @@ -40,6 +40,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( request.getCompartmentId())); + if (request.getSubscriptionId() != null) { + target = + target.queryParam( + "subscriptionId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSubscriptionId())); + } + if (request.getServiceName() != null) { target = target.queryParam( diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListLimitValuesConverter.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListLimitValuesConverter.java index 5c5c55939ef..78d167ffec5 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListLimitValuesConverter.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListLimitValuesConverter.java @@ -41,6 +41,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( request.getCompartmentId())); + if (request.getSubscriptionId() != null) { + target = + target.queryParam( + "subscriptionId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSubscriptionId())); + } + target = target.queryParam( "serviceName", diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListServicesConverter.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListServicesConverter.java index f27448b44a8..af8d5045eec 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListServicesConverter.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListServicesConverter.java @@ -72,6 +72,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getPage())); } + if (request.getSubscriptionId() != null) { + target = + target.queryParam( + "subscriptionId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSubscriptionId())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/model/LimitDefinitionSummary.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/model/LimitDefinitionSummary.java index 60f3f8586fb..5a51b3dfd43 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/model/LimitDefinitionSummary.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/model/LimitDefinitionSummary.java @@ -31,7 +31,9 @@ public final class LimitDefinitionSummary "isResourceAvailabilitySupported", "isDeprecated", "isEligibleForLimitIncrease", - "isDynamic" + "isDynamic", + "supportedSubscriptions", + "supportedQuotaFamilies" }) public LimitDefinitionSummary( String name, @@ -42,7 +44,9 @@ public LimitDefinitionSummary( Boolean isResourceAvailabilitySupported, Boolean isDeprecated, Boolean isEligibleForLimitIncrease, - Boolean isDynamic) { + Boolean isDynamic, + java.util.List supportedSubscriptions, + java.util.List supportedQuotaFamilies) { super(); this.name = name; this.serviceName = serviceName; @@ -53,6 +57,8 @@ public LimitDefinitionSummary( this.isDeprecated = isDeprecated; this.isEligibleForLimitIncrease = isEligibleForLimitIncrease; this.isDynamic = isDynamic; + this.supportedSubscriptions = supportedSubscriptions; + this.supportedQuotaFamilies = supportedQuotaFamilies; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -217,6 +223,42 @@ public Builder isDynamic(Boolean isDynamic) { this.__explicitlySet__.add("isDynamic"); return this; } + /** + * An array of subscription types supported by the limit. e,g The type of subscription, such as 'SAAS', 'ERP', 'CRM'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportedSubscriptions") + private java.util.List supportedSubscriptions; + + /** + * An array of subscription types supported by the limit. e,g The type of subscription, such as 'SAAS', 'ERP', 'CRM'. + * + * @param supportedSubscriptions the value to set + * @return this builder + **/ + public Builder supportedSubscriptions(java.util.List supportedSubscriptions) { + this.supportedSubscriptions = supportedSubscriptions; + this.__explicitlySet__.add("supportedSubscriptions"); + return this; + } + /** + * Supported quota family names for creation of quota policy. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportedQuotaFamilies") + private java.util.List supportedQuotaFamilies; + + /** + * Supported quota family names for creation of quota policy. + * + * @param supportedQuotaFamilies the value to set + * @return this builder + **/ + public Builder supportedQuotaFamilies(java.util.List supportedQuotaFamilies) { + this.supportedQuotaFamilies = supportedQuotaFamilies; + this.__explicitlySet__.add("supportedQuotaFamilies"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -232,7 +274,9 @@ public LimitDefinitionSummary build() { this.isResourceAvailabilitySupported, this.isDeprecated, this.isEligibleForLimitIncrease, - this.isDynamic); + this.isDynamic, + this.supportedSubscriptions, + this.supportedQuotaFamilies); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -268,6 +312,12 @@ public Builder copy(LimitDefinitionSummary model) { if (model.wasPropertyExplicitlySet("isDynamic")) { this.isDynamic(model.getIsDynamic()); } + if (model.wasPropertyExplicitlySet("supportedSubscriptions")) { + this.supportedSubscriptions(model.getSupportedSubscriptions()); + } + if (model.wasPropertyExplicitlySet("supportedQuotaFamilies")) { + this.supportedQuotaFamilies(model.getSupportedQuotaFamilies()); + } return this; } } @@ -475,6 +525,38 @@ public Boolean getIsDynamic() { return isDynamic; } + /** + * An array of subscription types supported by the limit. e,g The type of subscription, such as 'SAAS', 'ERP', 'CRM'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportedSubscriptions") + private final java.util.List supportedSubscriptions; + + /** + * An array of subscription types supported by the limit. e,g The type of subscription, such as 'SAAS', 'ERP', 'CRM'. + * + * @return the value + **/ + public java.util.List getSupportedSubscriptions() { + return supportedSubscriptions; + } + + /** + * Supported quota family names for creation of quota policy. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportedQuotaFamilies") + private final java.util.List supportedQuotaFamilies; + + /** + * Supported quota family names for creation of quota policy. + * + * @return the value + **/ + public java.util.List getSupportedQuotaFamilies() { + return supportedQuotaFamilies; + } + @Override public String toString() { return this.toString(true); @@ -500,6 +582,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isEligibleForLimitIncrease=") .append(String.valueOf(this.isEligibleForLimitIncrease)); sb.append(", isDynamic=").append(String.valueOf(this.isDynamic)); + sb.append(", supportedSubscriptions=").append(String.valueOf(this.supportedSubscriptions)); + sb.append(", supportedQuotaFamilies=").append(String.valueOf(this.supportedQuotaFamilies)); sb.append(")"); return sb.toString(); } @@ -525,6 +609,10 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.isEligibleForLimitIncrease, other.isEligibleForLimitIncrease) && java.util.Objects.equals(this.isDynamic, other.isDynamic) + && java.util.Objects.equals( + this.supportedSubscriptions, other.supportedSubscriptions) + && java.util.Objects.equals( + this.supportedQuotaFamilies, other.supportedQuotaFamilies) && super.equals(other); } @@ -553,6 +641,16 @@ public int hashCode() { ? 43 : this.isEligibleForLimitIncrease.hashCode()); result = (result * PRIME) + (this.isDynamic == null ? 43 : this.isDynamic.hashCode()); + result = + (result * PRIME) + + (this.supportedSubscriptions == null + ? 43 + : this.supportedSubscriptions.hashCode()); + result = + (result * PRIME) + + (this.supportedQuotaFamilies == null + ? 43 + : this.supportedQuotaFamilies.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/model/ServiceSummary.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/model/ServiceSummary.java index 236fae5f861..f0fb0b3e4e9 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/model/ServiceSummary.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/model/ServiceSummary.java @@ -19,11 +19,13 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class ServiceSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"name", "description"}) - public ServiceSummary(String name, String description) { + @java.beans.ConstructorProperties({"name", "description", "supportedSubscriptions"}) + public ServiceSummary( + String name, String description, java.util.List supportedSubscriptions) { super(); this.name = name; this.description = description; + this.supportedSubscriptions = supportedSubscriptions; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -60,12 +62,31 @@ public Builder description(String description) { this.__explicitlySet__.add("description"); return this; } + /** + * An array of subscription types supported by the service. e,g The type of subscription, such as 'SAAS', 'ERP', 'CRM'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportedSubscriptions") + private java.util.List supportedSubscriptions; + + /** + * An array of subscription types supported by the service. e,g The type of subscription, such as 'SAAS', 'ERP', 'CRM'. + * + * @param supportedSubscriptions the value to set + * @return this builder + **/ + public Builder supportedSubscriptions(java.util.List supportedSubscriptions) { + this.supportedSubscriptions = supportedSubscriptions; + this.__explicitlySet__.add("supportedSubscriptions"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public ServiceSummary build() { - ServiceSummary model = new ServiceSummary(this.name, this.description); + ServiceSummary model = + new ServiceSummary(this.name, this.description, this.supportedSubscriptions); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -80,6 +101,9 @@ public Builder copy(ServiceSummary model) { if (model.wasPropertyExplicitlySet("description")) { this.description(model.getDescription()); } + if (model.wasPropertyExplicitlySet("supportedSubscriptions")) { + this.supportedSubscriptions(model.getSupportedSubscriptions()); + } return this; } } @@ -123,6 +147,22 @@ public String getDescription() { return description; } + /** + * An array of subscription types supported by the service. e,g The type of subscription, such as 'SAAS', 'ERP', 'CRM'. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("supportedSubscriptions") + private final java.util.List supportedSubscriptions; + + /** + * An array of subscription types supported by the service. e,g The type of subscription, such as 'SAAS', 'ERP', 'CRM'. + * + * @return the value + **/ + public java.util.List getSupportedSubscriptions() { + return supportedSubscriptions; + } + @Override public String toString() { return this.toString(true); @@ -139,6 +179,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("name=").append(String.valueOf(this.name)); sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", supportedSubscriptions=").append(String.valueOf(this.supportedSubscriptions)); sb.append(")"); return sb.toString(); } @@ -155,6 +196,8 @@ public boolean equals(Object o) { ServiceSummary other = (ServiceSummary) o; return java.util.Objects.equals(this.name, other.name) && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals( + this.supportedSubscriptions, other.supportedSubscriptions) && super.equals(other); } @@ -164,6 +207,11 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.supportedSubscriptions == null + ? 43 + : this.supportedSubscriptions.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/GetResourceAvailabilityRequest.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/GetResourceAvailabilityRequest.java index 05a2f1f6739..8be2ee22b1a 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/GetResourceAvailabilityRequest.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/GetResourceAvailabilityRequest.java @@ -77,6 +77,19 @@ public String getAvailabilityDomain() { public String getOpcRequestId() { return opcRequestId; } + /** + * The OCID of the subscription assigned to tenant + * + */ + private String subscriptionId; + + /** + * The OCID of the subscription assigned to tenant + * + */ + public String getSubscriptionId() { + return subscriptionId; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -170,6 +183,23 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * The OCID of the subscription assigned to tenant + * + */ + private String subscriptionId = null; + + /** + * The OCID of the subscription assigned to tenant + * + * @param subscriptionId the value to set + * @return this builder instance + */ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -203,6 +233,7 @@ public Builder copy(GetResourceAvailabilityRequest o) { compartmentId(o.getCompartmentId()); availabilityDomain(o.getAvailabilityDomain()); opcRequestId(o.getOpcRequestId()); + subscriptionId(o.getSubscriptionId()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -240,8 +271,9 @@ public GetResourceAvailabilityRequest buildWithoutInvocationCallback() { request.compartmentId = compartmentId; request.availabilityDomain = availabilityDomain; request.opcRequestId = opcRequestId; + request.subscriptionId = subscriptionId; return request; - // new GetResourceAvailabilityRequest(serviceName, limitName, compartmentId, availabilityDomain, opcRequestId); + // new GetResourceAvailabilityRequest(serviceName, limitName, compartmentId, availabilityDomain, opcRequestId, subscriptionId); } } @@ -255,7 +287,8 @@ public Builder toBuilder() { .limitName(limitName) .compartmentId(compartmentId) .availabilityDomain(availabilityDomain) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .subscriptionId(subscriptionId); } /** @@ -276,6 +309,7 @@ public String toString() { sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(",availabilityDomain=").append(String.valueOf(this.availabilityDomain)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(")"); return sb.toString(); } @@ -295,7 +329,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.limitName, other.limitName) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId); } @Override @@ -313,6 +348,9 @@ public int hashCode() { ? 43 : this.availabilityDomain.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); return result; } } diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListLimitDefinitionsRequest.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListLimitDefinitionsRequest.java index cc26c9fe196..8fbeb28361b 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListLimitDefinitionsRequest.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListLimitDefinitionsRequest.java @@ -25,6 +25,19 @@ public class ListLimitDefinitionsRequest public String getCompartmentId() { return compartmentId; } + /** + * The OCID of the subscription assigned to tenant + * + */ + private String subscriptionId; + + /** + * The OCID of the subscription assigned to tenant + * + */ + public String getSubscriptionId() { + return subscriptionId; + } /** * The target service name. */ @@ -213,6 +226,23 @@ public Builder compartmentId(String compartmentId) { return this; } + /** + * The OCID of the subscription assigned to tenant + * + */ + private String subscriptionId = null; + + /** + * The OCID of the subscription assigned to tenant + * + * @param subscriptionId the value to set + * @return this builder instance + */ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + /** * The target service name. */ @@ -359,6 +389,7 @@ public Builder retryConfiguration( */ public Builder copy(ListLimitDefinitionsRequest o) { compartmentId(o.getCompartmentId()); + subscriptionId(o.getSubscriptionId()); serviceName(o.getServiceName()); name(o.getName()); sortBy(o.getSortBy()); @@ -399,6 +430,7 @@ public ListLimitDefinitionsRequest build() { public ListLimitDefinitionsRequest buildWithoutInvocationCallback() { ListLimitDefinitionsRequest request = new ListLimitDefinitionsRequest(); request.compartmentId = compartmentId; + request.subscriptionId = subscriptionId; request.serviceName = serviceName; request.name = name; request.sortBy = sortBy; @@ -407,7 +439,7 @@ public ListLimitDefinitionsRequest buildWithoutInvocationCallback() { request.page = page; request.opcRequestId = opcRequestId; return request; - // new ListLimitDefinitionsRequest(compartmentId, serviceName, name, sortBy, sortOrder, limit, page, opcRequestId); + // new ListLimitDefinitionsRequest(compartmentId, subscriptionId, serviceName, name, sortBy, sortOrder, limit, page, opcRequestId); } } @@ -418,6 +450,7 @@ public ListLimitDefinitionsRequest buildWithoutInvocationCallback() { public Builder toBuilder() { return new Builder() .compartmentId(compartmentId) + .subscriptionId(subscriptionId) .serviceName(serviceName) .name(name) .sortBy(sortBy) @@ -441,6 +474,7 @@ public String toString() { sb.append("("); sb.append("super=").append(super.toString()); sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(",serviceName=").append(String.valueOf(this.serviceName)); sb.append(",name=").append(String.valueOf(this.name)); sb.append(",sortBy=").append(String.valueOf(this.sortBy)); @@ -464,6 +498,7 @@ public boolean equals(Object o) { ListLimitDefinitionsRequest other = (ListLimitDefinitionsRequest) o; return super.equals(o) && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) && java.util.Objects.equals(this.serviceName, other.serviceName) && java.util.Objects.equals(this.name, other.name) && java.util.Objects.equals(this.sortBy, other.sortBy) @@ -480,6 +515,9 @@ public int hashCode() { result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); result = (result * PRIME) + (this.serviceName == null ? 43 : this.serviceName.hashCode()); result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListLimitValuesRequest.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListLimitValuesRequest.java index 222bb3b3b6b..fb4e524be8d 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListLimitValuesRequest.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListLimitValuesRequest.java @@ -35,6 +35,19 @@ public String getCompartmentId() { public String getServiceName() { return serviceName; } + /** + * The OCID of the subscription assigned to tenant + * + */ + private String subscriptionId; + + /** + * The OCID of the subscription assigned to tenant + * + */ + public String getSubscriptionId() { + return subscriptionId; + } /** * Filter entries by scope type. */ @@ -287,6 +300,23 @@ public Builder serviceName(String serviceName) { return this; } + /** + * The OCID of the subscription assigned to tenant + * + */ + private String subscriptionId = null; + + /** + * The OCID of the subscription assigned to tenant + * + * @param subscriptionId the value to set + * @return this builder instance + */ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + /** * Filter entries by scope type. */ @@ -451,6 +481,7 @@ public Builder retryConfiguration( public Builder copy(ListLimitValuesRequest o) { compartmentId(o.getCompartmentId()); serviceName(o.getServiceName()); + subscriptionId(o.getSubscriptionId()); scopeType(o.getScopeType()); availabilityDomain(o.getAvailabilityDomain()); name(o.getName()); @@ -493,6 +524,7 @@ public ListLimitValuesRequest buildWithoutInvocationCallback() { ListLimitValuesRequest request = new ListLimitValuesRequest(); request.compartmentId = compartmentId; request.serviceName = serviceName; + request.subscriptionId = subscriptionId; request.scopeType = scopeType; request.availabilityDomain = availabilityDomain; request.name = name; @@ -502,7 +534,7 @@ public ListLimitValuesRequest buildWithoutInvocationCallback() { request.page = page; request.opcRequestId = opcRequestId; return request; - // new ListLimitValuesRequest(compartmentId, serviceName, scopeType, availabilityDomain, name, sortBy, sortOrder, limit, page, opcRequestId); + // new ListLimitValuesRequest(compartmentId, serviceName, subscriptionId, scopeType, availabilityDomain, name, sortBy, sortOrder, limit, page, opcRequestId); } } @@ -514,6 +546,7 @@ public Builder toBuilder() { return new Builder() .compartmentId(compartmentId) .serviceName(serviceName) + .subscriptionId(subscriptionId) .scopeType(scopeType) .availabilityDomain(availabilityDomain) .name(name) @@ -539,6 +572,7 @@ public String toString() { sb.append("super=").append(super.toString()); sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(",serviceName=").append(String.valueOf(this.serviceName)); + sb.append(",subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(",scopeType=").append(String.valueOf(this.scopeType)); sb.append(",availabilityDomain=").append(String.valueOf(this.availabilityDomain)); sb.append(",name=").append(String.valueOf(this.name)); @@ -564,6 +598,7 @@ public boolean equals(Object o) { return super.equals(o) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.serviceName, other.serviceName) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) && java.util.Objects.equals(this.scopeType, other.scopeType) && java.util.Objects.equals(this.availabilityDomain, other.availabilityDomain) && java.util.Objects.equals(this.name, other.name) @@ -582,6 +617,9 @@ public int hashCode() { (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.serviceName == null ? 43 : this.serviceName.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); result = (result * PRIME) + (this.scopeType == null ? 43 : this.scopeType.hashCode()); result = (result * PRIME) diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListServicesRequest.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListServicesRequest.java index 5186771a102..759348bf957 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListServicesRequest.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListServicesRequest.java @@ -165,6 +165,19 @@ public String getPage() { public String getOpcRequestId() { return opcRequestId; } + /** + * The OCID of the subscription assigned to tenant + * + */ + private String subscriptionId; + + /** + * The OCID of the subscription assigned to tenant + * + */ + public String getSubscriptionId() { + return subscriptionId; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -277,6 +290,23 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * The OCID of the subscription assigned to tenant + * + */ + private String subscriptionId = null; + + /** + * The OCID of the subscription assigned to tenant + * + * @param subscriptionId the value to set + * @return this builder instance + */ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -311,6 +341,7 @@ public Builder copy(ListServicesRequest o) { limit(o.getLimit()); page(o.getPage()); opcRequestId(o.getOpcRequestId()); + subscriptionId(o.getSubscriptionId()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -349,8 +380,9 @@ public ListServicesRequest buildWithoutInvocationCallback() { request.limit = limit; request.page = page; request.opcRequestId = opcRequestId; + request.subscriptionId = subscriptionId; return request; - // new ListServicesRequest(compartmentId, sortBy, sortOrder, limit, page, opcRequestId); + // new ListServicesRequest(compartmentId, sortBy, sortOrder, limit, page, opcRequestId, subscriptionId); } } @@ -365,7 +397,8 @@ public Builder toBuilder() { .sortOrder(sortOrder) .limit(limit) .page(page) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .subscriptionId(subscriptionId); } /** @@ -387,6 +420,7 @@ public String toString() { sb.append(",limit=").append(String.valueOf(this.limit)); sb.append(",page=").append(String.valueOf(this.page)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(")"); return sb.toString(); } @@ -407,7 +441,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.sortOrder, other.sortOrder) && java.util.Objects.equals(this.limit, other.limit) && java.util.Objects.equals(this.page, other.page) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId); } @Override @@ -422,6 +457,9 @@ public int hashCode() { result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); return result; } } diff --git a/bmc-loadbalancer/pom.xml b/bmc-loadbalancer/pom.xml index cf7f6a538aa..e5e487daef2 100644 --- a/bmc-loadbalancer/pom.xml +++ b/bmc-loadbalancer/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/Backend.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/Backend.java index 62a463fa273..4485357153f 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/Backend.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/Backend.java @@ -151,6 +151,8 @@ public Builder weight(Integer weight) { } /** * The maximum number of simultaneous connections the load balancer can make to the backend. + * If this is not set then the maximum number of simultaneous connections the load balancer + * can make to the backend is unlimited. *

* Example: {@code 300} * @@ -160,6 +162,8 @@ public Builder weight(Integer weight) { /** * The maximum number of simultaneous connections the load balancer can make to the backend. + * If this is not set then the maximum number of simultaneous connections the load balancer + * can make to the backend is unlimited. *

* Example: {@code 300} * @@ -399,6 +403,8 @@ public Integer getWeight() { /** * The maximum number of simultaneous connections the load balancer can make to the backend. + * If this is not set then the maximum number of simultaneous connections the load balancer + * can make to the backend is unlimited. *

* Example: {@code 300} * @@ -408,6 +414,8 @@ public Integer getWeight() { /** * The maximum number of simultaneous connections the load balancer can make to the backend. + * If this is not set then the maximum number of simultaneous connections the load balancer + * can make to the backend is unlimited. *

* Example: {@code 300} * diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendDetails.java index 13fb1f8b672..54de7a68ea7 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendDetails.java @@ -124,6 +124,8 @@ public Builder weight(Integer weight) { } /** * The maximum number of simultaneous connections the load balancer can make to the backend. + * If this is not set then the maximum number of simultaneous connections the load balancer + * can make to the backend is unlimited. *

* Example: {@code 300} * @@ -133,6 +135,8 @@ public Builder weight(Integer weight) { /** * The maximum number of simultaneous connections the load balancer can make to the backend. + * If this is not set then the maximum number of simultaneous connections the load balancer + * can make to the backend is unlimited. *

* Example: {@code 300} * @@ -348,6 +352,8 @@ public Integer getWeight() { /** * The maximum number of simultaneous connections the load balancer can make to the backend. + * If this is not set then the maximum number of simultaneous connections the load balancer + * can make to the backend is unlimited. *

* Example: {@code 300} * @@ -357,6 +363,8 @@ public Integer getWeight() { /** * The maximum number of simultaneous connections the load balancer can make to the backend. + * If this is not set then the maximum number of simultaneous connections the load balancer + * can make to the backend is unlimited. *

* Example: {@code 300} * diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendSet.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendSet.java index 107f09f0819..c2b70914f8d 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendSet.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendSet.java @@ -124,7 +124,9 @@ public Builder backends(java.util.List backends) { } /** * The maximum number of simultaneous connections the load balancer can make to any backend - * in the backend set unless the backend has its own maxConnections setting. + * in the backend set unless the backend has its own maxConnections setting. If this is not + * set then the number of simultaneous connections the load balancer can make to any backend + * in the backend set unless the backend has its own maxConnections setting is unlimited. *

* Example: {@code 300} * @@ -134,7 +136,9 @@ public Builder backends(java.util.List backends) { /** * The maximum number of simultaneous connections the load balancer can make to any backend - * in the backend set unless the backend has its own maxConnections setting. + * in the backend set unless the backend has its own maxConnections setting. If this is not + * set then the number of simultaneous connections the load balancer can make to any backend + * in the backend set unless the backend has its own maxConnections setting is unlimited. *

* Example: {@code 300} * @@ -306,7 +310,9 @@ public java.util.List getBackends() { /** * The maximum number of simultaneous connections the load balancer can make to any backend - * in the backend set unless the backend has its own maxConnections setting. + * in the backend set unless the backend has its own maxConnections setting. If this is not + * set then the number of simultaneous connections the load balancer can make to any backend + * in the backend set unless the backend has its own maxConnections setting is unlimited. *

* Example: {@code 300} * @@ -316,7 +322,9 @@ public java.util.List getBackends() { /** * The maximum number of simultaneous connections the load balancer can make to any backend - * in the backend set unless the backend has its own maxConnections setting. + * in the backend set unless the backend has its own maxConnections setting. If this is not + * set then the number of simultaneous connections the load balancer can make to any backend + * in the backend set unless the backend has its own maxConnections setting is unlimited. *

* Example: {@code 300} * diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendSetDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendSetDetails.java index 29b132634b1..50a024c9387 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendSetDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendSetDetails.java @@ -93,7 +93,9 @@ public Builder backends(java.util.List backends) { } /** * The maximum number of simultaneous connections the load balancer can make to any backend - * in the backend set unless the backend has its own maxConnections setting. + * in the backend set unless the backend has its own maxConnections setting. If this is not + * set then the number of simultaneous connections the load balancer can make to any backend + * in the backend set unless the backend has its own maxConnections setting is unlimited. *

* Example: {@code 300} * @@ -103,7 +105,9 @@ public Builder backends(java.util.List backends) { /** * The maximum number of simultaneous connections the load balancer can make to any backend - * in the backend set unless the backend has its own maxConnections setting. + * in the backend set unless the backend has its own maxConnections setting. If this is not + * set then the number of simultaneous connections the load balancer can make to any backend + * in the backend set unless the backend has its own maxConnections setting is unlimited. *

* Example: {@code 300} * @@ -245,7 +249,9 @@ public java.util.List getBackends() { /** * The maximum number of simultaneous connections the load balancer can make to any backend - * in the backend set unless the backend has its own maxConnections setting. + * in the backend set unless the backend has its own maxConnections setting. If this is not + * set then the number of simultaneous connections the load balancer can make to any backend + * in the backend set unless the backend has its own maxConnections setting is unlimited. *

* Example: {@code 300} * @@ -255,7 +261,9 @@ public java.util.List getBackends() { /** * The maximum number of simultaneous connections the load balancer can make to any backend - * in the backend set unless the backend has its own maxConnections setting. + * in the backend set unless the backend has its own maxConnections setting. If this is not + * set then the number of simultaneous connections the load balancer can make to any backend + * in the backend set unless the backend has its own maxConnections setting is unlimited. *

* Example: {@code 300} * diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/ConnectionConfiguration.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/ConnectionConfiguration.java index 06fd0ad4425..b9758dd86f3 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/ConnectionConfiguration.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/ConnectionConfiguration.java @@ -23,11 +23,19 @@ public final class ConnectionConfiguration extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"idleTimeout", "backendTcpProxyProtocolVersion"}) - public ConnectionConfiguration(Long idleTimeout, Integer backendTcpProxyProtocolVersion) { + @java.beans.ConstructorProperties({ + "idleTimeout", + "backendTcpProxyProtocolVersion", + "backendTcpProxyProtocolOptions" + }) + public ConnectionConfiguration( + Long idleTimeout, + Integer backendTcpProxyProtocolVersion, + java.util.List backendTcpProxyProtocolOptions) { super(); this.idleTimeout = idleTimeout; this.backendTcpProxyProtocolVersion = backendTcpProxyProtocolVersion; + this.backendTcpProxyProtocolOptions = backendTcpProxyProtocolOptions; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -84,6 +92,27 @@ public Builder backendTcpProxyProtocolVersion(Integer backendTcpProxyProtocolVer this.__explicitlySet__.add("backendTcpProxyProtocolVersion"); return this; } + /** + * An array that represents the PPV2 Options that can be enabled on TCP Listeners. + * Example: ["PP2_TYPE_AUTHORITY"] + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backendTcpProxyProtocolOptions") + private java.util.List backendTcpProxyProtocolOptions; + + /** + * An array that represents the PPV2 Options that can be enabled on TCP Listeners. + * Example: ["PP2_TYPE_AUTHORITY"] + * + * @param backendTcpProxyProtocolOptions the value to set + * @return this builder + **/ + public Builder backendTcpProxyProtocolOptions( + java.util.List backendTcpProxyProtocolOptions) { + this.backendTcpProxyProtocolOptions = backendTcpProxyProtocolOptions; + this.__explicitlySet__.add("backendTcpProxyProtocolOptions"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -91,7 +120,9 @@ public Builder backendTcpProxyProtocolVersion(Integer backendTcpProxyProtocolVer public ConnectionConfiguration build() { ConnectionConfiguration model = new ConnectionConfiguration( - this.idleTimeout, this.backendTcpProxyProtocolVersion); + this.idleTimeout, + this.backendTcpProxyProtocolVersion, + this.backendTcpProxyProtocolOptions); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -106,6 +137,9 @@ public Builder copy(ConnectionConfiguration model) { if (model.wasPropertyExplicitlySet("backendTcpProxyProtocolVersion")) { this.backendTcpProxyProtocolVersion(model.getBackendTcpProxyProtocolVersion()); } + if (model.wasPropertyExplicitlySet("backendTcpProxyProtocolOptions")) { + this.backendTcpProxyProtocolOptions(model.getBackendTcpProxyProtocolOptions()); + } return this; } } @@ -169,6 +203,70 @@ public Integer getBackendTcpProxyProtocolVersion() { return backendTcpProxyProtocolVersion; } + /** + **/ + public enum BackendTcpProxyProtocolOptions { + Pp2TypeAuthority("PP2_TYPE_AUTHORITY"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(BackendTcpProxyProtocolOptions.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (BackendTcpProxyProtocolOptions v : BackendTcpProxyProtocolOptions.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + BackendTcpProxyProtocolOptions(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static BackendTcpProxyProtocolOptions create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'BackendTcpProxyProtocolOptions', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * An array that represents the PPV2 Options that can be enabled on TCP Listeners. + * Example: ["PP2_TYPE_AUTHORITY"] + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("backendTcpProxyProtocolOptions") + private final java.util.List backendTcpProxyProtocolOptions; + + /** + * An array that represents the PPV2 Options that can be enabled on TCP Listeners. + * Example: ["PP2_TYPE_AUTHORITY"] + * + * @return the value + **/ + public java.util.List getBackendTcpProxyProtocolOptions() { + return backendTcpProxyProtocolOptions; + } + @Override public String toString() { return this.toString(true); @@ -186,6 +284,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("idleTimeout=").append(String.valueOf(this.idleTimeout)); sb.append(", backendTcpProxyProtocolVersion=") .append(String.valueOf(this.backendTcpProxyProtocolVersion)); + sb.append(", backendTcpProxyProtocolOptions=") + .append(String.valueOf(this.backendTcpProxyProtocolOptions)); sb.append(")"); return sb.toString(); } @@ -203,6 +303,8 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.idleTimeout, other.idleTimeout) && java.util.Objects.equals( this.backendTcpProxyProtocolVersion, other.backendTcpProxyProtocolVersion) + && java.util.Objects.equals( + this.backendTcpProxyProtocolOptions, other.backendTcpProxyProtocolOptions) && super.equals(other); } @@ -216,6 +318,11 @@ public int hashCode() { + (this.backendTcpProxyProtocolVersion == null ? 43 : this.backendTcpProxyProtocolVersion.hashCode()); + result = + (result * PRIME) + + (this.backendTcpProxyProtocolOptions == null + ? 43 + : this.backendTcpProxyProtocolOptions.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateBackendDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateBackendDetails.java index e7b78fa43aa..d5365828164 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateBackendDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateBackendDetails.java @@ -129,6 +129,8 @@ public Builder weight(Integer weight) { } /** * The maximum number of simultaneous connections the load balancer can make to the backend. + * If this is not set then number of simultaneous connections the load balancer can make to + * the backend is unlimited. *

* Example: {@code 300} * @@ -138,6 +140,8 @@ public Builder weight(Integer weight) { /** * The maximum number of simultaneous connections the load balancer can make to the backend. + * If this is not set then number of simultaneous connections the load balancer can make to + * the backend is unlimited. *

* Example: {@code 300} * @@ -353,6 +357,8 @@ public Integer getWeight() { /** * The maximum number of simultaneous connections the load balancer can make to the backend. + * If this is not set then number of simultaneous connections the load balancer can make to + * the backend is unlimited. *

* Example: {@code 300} * @@ -362,6 +368,8 @@ public Integer getWeight() { /** * The maximum number of simultaneous connections the load balancer can make to the backend. + * If this is not set then number of simultaneous connections the load balancer can make to + * the backend is unlimited. *

* Example: {@code 300} * diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateBackendSetDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateBackendSetDetails.java index ea199c12649..5c91cb860ae 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateBackendSetDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateBackendSetDetails.java @@ -127,7 +127,9 @@ public Builder backends(java.util.List backends) { } /** * The maximum number of simultaneous connections the load balancer can make to any backend - * in the backend set unless the backend has its own maxConnections setting. + * in the backend set unless the backend has its own maxConnections setting. If this is not + * set then the number of simultaneous connections the load balancer can make to any backend + * in the backend set unless the backend has its own maxConnections setting is unlimited. *

* Example: {@code 300} * @@ -137,7 +139,9 @@ public Builder backends(java.util.List backends) { /** * The maximum number of simultaneous connections the load balancer can make to any backend - * in the backend set unless the backend has its own maxConnections setting. + * in the backend set unless the backend has its own maxConnections setting. If this is not + * set then the number of simultaneous connections the load balancer can make to any backend + * in the backend set unless the backend has its own maxConnections setting is unlimited. *

* Example: {@code 300} * @@ -309,7 +313,9 @@ public java.util.List getBackends() { /** * The maximum number of simultaneous connections the load balancer can make to any backend - * in the backend set unless the backend has its own maxConnections setting. + * in the backend set unless the backend has its own maxConnections setting. If this is not + * set then the number of simultaneous connections the load balancer can make to any backend + * in the backend set unless the backend has its own maxConnections setting is unlimited. *

* Example: {@code 300} * @@ -319,7 +325,9 @@ public java.util.List getBackends() { /** * The maximum number of simultaneous connections the load balancer can make to any backend - * in the backend set unless the backend has its own maxConnections setting. + * in the backend set unless the backend has its own maxConnections setting. If this is not + * set then the number of simultaneous connections the load balancer can make to any backend + * in the backend set unless the backend has its own maxConnections setting is unlimited. *

* Example: {@code 300} * diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateListenerDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateListenerDetails.java index afb4c540263..b8330c0d735 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateListenerDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateListenerDetails.java @@ -110,9 +110,8 @@ public Builder port(Integer port) { return this; } /** - * The protocol on which the listener accepts connection requests. - * To get a list of valid protocols, use the {@link #listProtocols(ListProtocolsRequest) listProtocols} - * operation. + * The protocol on which the listener accepts connection requests. The supported protocols are HTTP, HTTP2, TCP, and GRPC. + * You can also use the {@link #listProtocols(ListProtocolsRequest) listProtocols} operation to get a list of valid protocols. *

* Example: {@code HTTP} * @@ -121,9 +120,8 @@ public Builder port(Integer port) { private String protocol; /** - * The protocol on which the listener accepts connection requests. - * To get a list of valid protocols, use the {@link #listProtocols(ListProtocolsRequest) listProtocols} - * operation. + * The protocol on which the listener accepts connection requests. The supported protocols are HTTP, HTTP2, TCP, and GRPC. + * You can also use the {@link #listProtocols(ListProtocolsRequest) listProtocols} operation to get a list of valid protocols. *

* Example: {@code HTTP} * @@ -376,9 +374,8 @@ public Integer getPort() { } /** - * The protocol on which the listener accepts connection requests. - * To get a list of valid protocols, use the {@link #listProtocols(ListProtocolsRequest) listProtocols} - * operation. + * The protocol on which the listener accepts connection requests. The supported protocols are HTTP, HTTP2, TCP, and GRPC. + * You can also use the {@link #listProtocols(ListProtocolsRequest) listProtocols} operation to get a list of valid protocols. *

* Example: {@code HTTP} * @@ -387,9 +384,8 @@ public Integer getPort() { private final String protocol; /** - * The protocol on which the listener accepts connection requests. - * To get a list of valid protocols, use the {@link #listProtocols(ListProtocolsRequest) listProtocols} - * operation. + * The protocol on which the listener accepts connection requests. The supported protocols are HTTP, HTTP2, TCP, and GRPC. + * You can also use the {@link #listProtocols(ListProtocolsRequest) listProtocols} operation to get a list of valid protocols. *

* Example: {@code HTTP} * diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateLoadBalancerDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateLoadBalancerDetails.java index 6570f03c334..7c2d04db91b 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateLoadBalancerDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateLoadBalancerDetails.java @@ -33,6 +33,8 @@ public final class CreateLoadBalancerDetails "isPrivate", "isDeleteProtectionEnabled", "ipMode", + "isRequestIdEnabled", + "requestIdHeader", "reservedIps", "listeners", "hostnames", @@ -44,6 +46,7 @@ public final class CreateLoadBalancerDetails "pathRouteSets", "freeformTags", "definedTags", + "zprTags", "ruleSets" }) public CreateLoadBalancerDetails( @@ -54,6 +57,8 @@ public CreateLoadBalancerDetails( Boolean isPrivate, Boolean isDeleteProtectionEnabled, IpMode ipMode, + Boolean isRequestIdEnabled, + String requestIdHeader, java.util.List reservedIps, java.util.Map listeners, java.util.Map hostnames, @@ -65,6 +70,7 @@ public CreateLoadBalancerDetails( java.util.Map pathRouteSets, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> zprTags, java.util.Map ruleSets) { super(); this.compartmentId = compartmentId; @@ -74,6 +80,8 @@ public CreateLoadBalancerDetails( this.isPrivate = isPrivate; this.isDeleteProtectionEnabled = isDeleteProtectionEnabled; this.ipMode = ipMode; + this.isRequestIdEnabled = isRequestIdEnabled; + this.requestIdHeader = requestIdHeader; this.reservedIps = reservedIps; this.listeners = listeners; this.hostnames = hostnames; @@ -85,6 +93,7 @@ public CreateLoadBalancerDetails( this.pathRouteSets = pathRouteSets; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.zprTags = zprTags; this.ruleSets = ruleSets; } @@ -278,6 +287,96 @@ public Builder ipMode(IpMode ipMode) { this.__explicitlySet__.add("ipMode"); return this; } + /** + * Whether or not the load balancer has the Request Id feature enabled for HTTP listeners. + *

+ * If "true", the load balancer will attach a unique request id header to every request + * passed through from the load balancer to load balancer backends. This same request id + * header also will be added to the response the lb received from the backend handling + * the request before the load balancer returns the response to the requestor. The name + * of the unique request id header is set the by value of requestIdHeader. + *

+ * If "false", the loadbalancer not add this unique request id header to either the request + * passed through to the load balancer backends nor to the reponse returned to the user. + *

+ * New load balancers have the Request Id feature disabled unless isRequestIdEnabled is set to true. + *

+ * Example: {@code true} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRequestIdEnabled") + private Boolean isRequestIdEnabled; + + /** + * Whether or not the load balancer has the Request Id feature enabled for HTTP listeners. + *

+ * If "true", the load balancer will attach a unique request id header to every request + * passed through from the load balancer to load balancer backends. This same request id + * header also will be added to the response the lb received from the backend handling + * the request before the load balancer returns the response to the requestor. The name + * of the unique request id header is set the by value of requestIdHeader. + *

+ * If "false", the loadbalancer not add this unique request id header to either the request + * passed through to the load balancer backends nor to the reponse returned to the user. + *

+ * New load balancers have the Request Id feature disabled unless isRequestIdEnabled is set to true. + *

+ * Example: {@code true} + * + * @param isRequestIdEnabled the value to set + * @return this builder + **/ + public Builder isRequestIdEnabled(Boolean isRequestIdEnabled) { + this.isRequestIdEnabled = isRequestIdEnabled; + this.__explicitlySet__.add("isRequestIdEnabled"); + return this; + } + /** + * If isRequestIdEnabled is true then this field contains the name of the header field + * that contains the unique request id that is attached to every request from + * the load balancer to the load balancer backends and to every response from the load + * balancer. + *

+ * If a request to the load balancer already contains a header with same name as specified + * in requestIdHeader then the load balancer will not change the value of that field. + *

+ * If isRequestIdEnabled is false then this field is ignored. + *

+ * If this field is not set or is set to "" then this field defaults to X-Request-Id + *

+ **Notes:** + * * Unless the header name is "" it must start with "X-" prefix. + * * Setting the header name to "" will set it to the default: X-Request-Id. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestIdHeader") + private String requestIdHeader; + + /** + * If isRequestIdEnabled is true then this field contains the name of the header field + * that contains the unique request id that is attached to every request from + * the load balancer to the load balancer backends and to every response from the load + * balancer. + *

+ * If a request to the load balancer already contains a header with same name as specified + * in requestIdHeader then the load balancer will not change the value of that field. + *

+ * If isRequestIdEnabled is false then this field is ignored. + *

+ * If this field is not set or is set to "" then this field defaults to X-Request-Id + *

+ **Notes:** + * * Unless the header name is "" it must start with "X-" prefix. + * * Setting the header name to "" will set it to the default: X-Request-Id. + * + * @param requestIdHeader the value to set + * @return this builder + **/ + public Builder requestIdHeader(String requestIdHeader) { + this.requestIdHeader = requestIdHeader; + this.__explicitlySet__.add("requestIdHeader"); + return this; + } /** * An array of reserved Ips. * @@ -456,6 +555,28 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Extended Defined tags for ZPR for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit", "usagetype" : "zpr"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("zprTags") + private java.util.Map> zprTags; + + /** + * Extended Defined tags for ZPR for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit", "usagetype" : "zpr"}}}} + * + * @param zprTags the value to set + * @return this builder + **/ + public Builder zprTags(java.util.Map> zprTags) { + this.zprTags = zprTags; + this.__explicitlySet__.add("zprTags"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("ruleSets") private java.util.Map ruleSets; @@ -479,6 +600,8 @@ public CreateLoadBalancerDetails build() { this.isPrivate, this.isDeleteProtectionEnabled, this.ipMode, + this.isRequestIdEnabled, + this.requestIdHeader, this.reservedIps, this.listeners, this.hostnames, @@ -490,6 +613,7 @@ public CreateLoadBalancerDetails build() { this.pathRouteSets, this.freeformTags, this.definedTags, + this.zprTags, this.ruleSets); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -520,6 +644,12 @@ public Builder copy(CreateLoadBalancerDetails model) { if (model.wasPropertyExplicitlySet("ipMode")) { this.ipMode(model.getIpMode()); } + if (model.wasPropertyExplicitlySet("isRequestIdEnabled")) { + this.isRequestIdEnabled(model.getIsRequestIdEnabled()); + } + if (model.wasPropertyExplicitlySet("requestIdHeader")) { + this.requestIdHeader(model.getRequestIdHeader()); + } if (model.wasPropertyExplicitlySet("reservedIps")) { this.reservedIps(model.getReservedIps()); } @@ -553,6 +683,9 @@ public Builder copy(CreateLoadBalancerDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("zprTags")) { + this.zprTags(model.getZprTags()); + } if (model.wasPropertyExplicitlySet("ruleSets")) { this.ruleSets(model.getRuleSets()); } @@ -787,6 +920,92 @@ public IpMode getIpMode() { return ipMode; } + /** + * Whether or not the load balancer has the Request Id feature enabled for HTTP listeners. + *

+ * If "true", the load balancer will attach a unique request id header to every request + * passed through from the load balancer to load balancer backends. This same request id + * header also will be added to the response the lb received from the backend handling + * the request before the load balancer returns the response to the requestor. The name + * of the unique request id header is set the by value of requestIdHeader. + *

+ * If "false", the loadbalancer not add this unique request id header to either the request + * passed through to the load balancer backends nor to the reponse returned to the user. + *

+ * New load balancers have the Request Id feature disabled unless isRequestIdEnabled is set to true. + *

+ * Example: {@code true} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRequestIdEnabled") + private final Boolean isRequestIdEnabled; + + /** + * Whether or not the load balancer has the Request Id feature enabled for HTTP listeners. + *

+ * If "true", the load balancer will attach a unique request id header to every request + * passed through from the load balancer to load balancer backends. This same request id + * header also will be added to the response the lb received from the backend handling + * the request before the load balancer returns the response to the requestor. The name + * of the unique request id header is set the by value of requestIdHeader. + *

+ * If "false", the loadbalancer not add this unique request id header to either the request + * passed through to the load balancer backends nor to the reponse returned to the user. + *

+ * New load balancers have the Request Id feature disabled unless isRequestIdEnabled is set to true. + *

+ * Example: {@code true} + * + * @return the value + **/ + public Boolean getIsRequestIdEnabled() { + return isRequestIdEnabled; + } + + /** + * If isRequestIdEnabled is true then this field contains the name of the header field + * that contains the unique request id that is attached to every request from + * the load balancer to the load balancer backends and to every response from the load + * balancer. + *

+ * If a request to the load balancer already contains a header with same name as specified + * in requestIdHeader then the load balancer will not change the value of that field. + *

+ * If isRequestIdEnabled is false then this field is ignored. + *

+ * If this field is not set or is set to "" then this field defaults to X-Request-Id + *

+ **Notes:** + * * Unless the header name is "" it must start with "X-" prefix. + * * Setting the header name to "" will set it to the default: X-Request-Id. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestIdHeader") + private final String requestIdHeader; + + /** + * If isRequestIdEnabled is true then this field contains the name of the header field + * that contains the unique request id that is attached to every request from + * the load balancer to the load balancer backends and to every response from the load + * balancer. + *

+ * If a request to the load balancer already contains a header with same name as specified + * in requestIdHeader then the load balancer will not change the value of that field. + *

+ * If isRequestIdEnabled is false then this field is ignored. + *

+ * If this field is not set or is set to "" then this field defaults to X-Request-Id + *

+ **Notes:** + * * Unless the header name is "" it must start with "X-" prefix. + * * Setting the header name to "" will set it to the default: X-Request-Id. + * + * @return the value + **/ + public String getRequestIdHeader() { + return requestIdHeader; + } + /** * An array of reserved Ips. * @@ -941,6 +1160,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Extended Defined tags for ZPR for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit", "usagetype" : "zpr"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("zprTags") + private final java.util.Map> zprTags; + + /** + * Extended Defined tags for ZPR for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit", "usagetype" : "zpr"}}}} + * + * @return the value + **/ + public java.util.Map> getZprTags() { + return zprTags; + } + @com.fasterxml.jackson.annotation.JsonProperty("ruleSets") private final java.util.Map ruleSets; @@ -970,6 +1209,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isDeleteProtectionEnabled=") .append(String.valueOf(this.isDeleteProtectionEnabled)); sb.append(", ipMode=").append(String.valueOf(this.ipMode)); + sb.append(", isRequestIdEnabled=").append(String.valueOf(this.isRequestIdEnabled)); + sb.append(", requestIdHeader=").append(String.valueOf(this.requestIdHeader)); sb.append(", reservedIps=").append(String.valueOf(this.reservedIps)); sb.append(", listeners=").append(String.valueOf(this.listeners)); sb.append(", hostnames=").append(String.valueOf(this.hostnames)); @@ -982,6 +1223,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", pathRouteSets=").append(String.valueOf(this.pathRouteSets)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", zprTags=").append(String.valueOf(this.zprTags)); sb.append(", ruleSets=").append(String.valueOf(this.ruleSets)); sb.append(")"); return sb.toString(); @@ -1005,6 +1247,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.isDeleteProtectionEnabled, other.isDeleteProtectionEnabled) && java.util.Objects.equals(this.ipMode, other.ipMode) + && java.util.Objects.equals(this.isRequestIdEnabled, other.isRequestIdEnabled) + && java.util.Objects.equals(this.requestIdHeader, other.requestIdHeader) && java.util.Objects.equals(this.reservedIps, other.reservedIps) && java.util.Objects.equals(this.listeners, other.listeners) && java.util.Objects.equals(this.hostnames, other.hostnames) @@ -1017,6 +1261,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.pathRouteSets, other.pathRouteSets) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.zprTags, other.zprTags) && java.util.Objects.equals(this.ruleSets, other.ruleSets) && super.equals(other); } @@ -1038,6 +1283,14 @@ public int hashCode() { ? 43 : this.isDeleteProtectionEnabled.hashCode()); result = (result * PRIME) + (this.ipMode == null ? 43 : this.ipMode.hashCode()); + result = + (result * PRIME) + + (this.isRequestIdEnabled == null + ? 43 + : this.isRequestIdEnabled.hashCode()); + result = + (result * PRIME) + + (this.requestIdHeader == null ? 43 : this.requestIdHeader.hashCode()); result = (result * PRIME) + (this.reservedIps == null ? 43 : this.reservedIps.hashCode()); result = (result * PRIME) + (this.listeners == null ? 43 : this.listeners.hashCode()); result = (result * PRIME) + (this.hostnames == null ? 43 : this.hostnames.hashCode()); @@ -1057,6 +1310,7 @@ public int hashCode() { + (this.pathRouteSets == null ? 43 : this.pathRouteSets.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.zprTags == null ? 43 : this.zprTags.hashCode()); result = (result * PRIME) + (this.ruleSets == null ? 43 : this.ruleSets.hashCode()); result = (result * PRIME) + super.hashCode(); return result; diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/IpMaxConnections.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/IpMaxConnections.java index b74359f20e9..a74f9278393 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/IpMaxConnections.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/IpMaxConnections.java @@ -50,14 +50,20 @@ public Builder ipAddresses(java.util.List ipAddresses) { return this; } /** - * The max number of connections that the specified IPs can make to the Listener. + * The maximum number of simultaneous connections that the specified IPs can make to the + * Listener. IPs without a maxConnections setting can make either defaultMaxConnections + * simultaneous connections to a listener or, if no defaultMaxConnections is specified, an + * unlimited number of simultaneous connections to a listener. * **/ @com.fasterxml.jackson.annotation.JsonProperty("maxConnections") private Integer maxConnections; /** - * The max number of connections that the specified IPs can make to the Listener. + * The maximum number of simultaneous connections that the specified IPs can make to the + * Listener. IPs without a maxConnections setting can make either defaultMaxConnections + * simultaneous connections to a listener or, if no defaultMaxConnections is specified, an + * unlimited number of simultaneous connections to a listener. * * @param maxConnections the value to set * @return this builder @@ -121,14 +127,20 @@ public java.util.List getIpAddresses() { } /** - * The max number of connections that the specified IPs can make to the Listener. + * The maximum number of simultaneous connections that the specified IPs can make to the + * Listener. IPs without a maxConnections setting can make either defaultMaxConnections + * simultaneous connections to a listener or, if no defaultMaxConnections is specified, an + * unlimited number of simultaneous connections to a listener. * **/ @com.fasterxml.jackson.annotation.JsonProperty("maxConnections") private final Integer maxConnections; /** - * The max number of connections that the specified IPs can make to the Listener. + * The maximum number of simultaneous connections that the specified IPs can make to the + * Listener. IPs without a maxConnections setting can make either defaultMaxConnections + * simultaneous connections to a listener or, if no defaultMaxConnections is specified, an + * unlimited number of simultaneous connections to a listener. * * @return the value **/ diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/Listener.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/Listener.java index 61ec695476c..98d537c467c 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/Listener.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/Listener.java @@ -127,9 +127,8 @@ public Builder port(Integer port) { return this; } /** - * The protocol on which the listener accepts connection requests. - * To get a list of valid protocols, use the {@link #listProtocols(ListProtocolsRequest) listProtocols} - * operation. + * The protocol on which the listener accepts connection requests. The supported protocols are HTTP, HTTP2, TCP, and GRPC. + * You can also use the {@link #listProtocols(ListProtocolsRequest) listProtocols} operation to get a list of valid protocols. *

* Example: {@code HTTP} * @@ -138,9 +137,8 @@ public Builder port(Integer port) { private String protocol; /** - * The protocol on which the listener accepts connection requests. - * To get a list of valid protocols, use the {@link #listProtocols(ListProtocolsRequest) listProtocols} - * operation. + * The protocol on which the listener accepts connection requests. The supported protocols are HTTP, HTTP2, TCP, and GRPC. + * You can also use the {@link #listProtocols(ListProtocolsRequest) listProtocols} operation to get a list of valid protocols. *

* Example: {@code HTTP} * @@ -389,9 +387,8 @@ public Integer getPort() { } /** - * The protocol on which the listener accepts connection requests. - * To get a list of valid protocols, use the {@link #listProtocols(ListProtocolsRequest) listProtocols} - * operation. + * The protocol on which the listener accepts connection requests. The supported protocols are HTTP, HTTP2, TCP, and GRPC. + * You can also use the {@link #listProtocols(ListProtocolsRequest) listProtocols} operation to get a list of valid protocols. *

* Example: {@code HTTP} * @@ -400,9 +397,8 @@ public Integer getPort() { private final String protocol; /** - * The protocol on which the listener accepts connection requests. - * To get a list of valid protocols, use the {@link #listProtocols(ListProtocolsRequest) listProtocols} - * operation. + * The protocol on which the listener accepts connection requests. The supported protocols are HTTP, HTTP2, TCP, and GRPC. + * You can also use the {@link #listProtocols(ListProtocolsRequest) listProtocols} operation to get a list of valid protocols. *

* Example: {@code HTTP} * diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/ListenerDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/ListenerDetails.java index c98c7b1c2ef..01856a4ea24 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/ListenerDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/ListenerDetails.java @@ -99,9 +99,8 @@ public Builder port(Integer port) { return this; } /** - * The protocol on which the listener accepts connection requests. - * To get a list of valid protocols, use the {@link #listProtocols(ListProtocolsRequest) listProtocols} - * operation. + * The protocol on which the listener accepts connection requests. The supported protocols are HTTP, HTTP2, TCP, and GRPC. + * You can also use the {@link #listProtocols(ListProtocolsRequest) listProtocols} operation to get a list of valid protocols. *

* Example: {@code HTTP} * @@ -110,9 +109,8 @@ public Builder port(Integer port) { private String protocol; /** - * The protocol on which the listener accepts connection requests. - * To get a list of valid protocols, use the {@link #listProtocols(ListProtocolsRequest) listProtocols} - * operation. + * The protocol on which the listener accepts connection requests. The supported protocols are HTTP, HTTP2, TCP, and GRPC. + * You can also use the {@link #listProtocols(ListProtocolsRequest) listProtocols} operation to get a list of valid protocols. *

* Example: {@code HTTP} * @@ -337,9 +335,8 @@ public Integer getPort() { } /** - * The protocol on which the listener accepts connection requests. - * To get a list of valid protocols, use the {@link #listProtocols(ListProtocolsRequest) listProtocols} - * operation. + * The protocol on which the listener accepts connection requests. The supported protocols are HTTP, HTTP2, TCP, and GRPC. + * You can also use the {@link #listProtocols(ListProtocolsRequest) listProtocols} operation to get a list of valid protocols. *

* Example: {@code HTTP} * @@ -348,9 +345,8 @@ public Integer getPort() { private final String protocol; /** - * The protocol on which the listener accepts connection requests. - * To get a list of valid protocols, use the {@link #listProtocols(ListProtocolsRequest) listProtocols} - * operation. + * The protocol on which the listener accepts connection requests. The supported protocols are HTTP, HTTP2, TCP, and GRPC. + * You can also use the {@link #listProtocols(ListProtocolsRequest) listProtocols} operation to get a list of valid protocols. *

* Example: {@code HTTP} * diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/LoadBalancer.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/LoadBalancer.java index d0b3a322448..84841af5a91 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/LoadBalancer.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/LoadBalancer.java @@ -40,6 +40,8 @@ public final class LoadBalancer extends com.oracle.bmc.http.internal.ExplicitlyS "shapeDetails", "isPrivate", "isDeleteProtectionEnabled", + "isRequestIdEnabled", + "requestIdHeader", "subnetIds", "networkSecurityGroupIds", "listeners", @@ -50,6 +52,7 @@ public final class LoadBalancer extends com.oracle.bmc.http.internal.ExplicitlyS "pathRouteSets", "freeformTags", "definedTags", + "zprTags", "systemTags", "ruleSets", "routingPolicies" @@ -65,6 +68,8 @@ public LoadBalancer( ShapeDetails shapeDetails, Boolean isPrivate, Boolean isDeleteProtectionEnabled, + Boolean isRequestIdEnabled, + String requestIdHeader, java.util.List subnetIds, java.util.List networkSecurityGroupIds, java.util.Map listeners, @@ -75,6 +80,7 @@ public LoadBalancer( java.util.Map pathRouteSets, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> zprTags, java.util.Map> systemTags, java.util.Map ruleSets, java.util.Map routingPolicies) { @@ -89,6 +95,8 @@ public LoadBalancer( this.shapeDetails = shapeDetails; this.isPrivate = isPrivate; this.isDeleteProtectionEnabled = isDeleteProtectionEnabled; + this.isRequestIdEnabled = isRequestIdEnabled; + this.requestIdHeader = requestIdHeader; this.subnetIds = subnetIds; this.networkSecurityGroupIds = networkSecurityGroupIds; this.listeners = listeners; @@ -99,6 +107,7 @@ public LoadBalancer( this.pathRouteSets = pathRouteSets; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.zprTags = zprTags; this.systemTags = systemTags; this.ruleSets = ruleSets; this.routingPolicies = routingPolicies; @@ -323,6 +332,80 @@ public Builder isDeleteProtectionEnabled(Boolean isDeleteProtectionEnabled) { this.__explicitlySet__.add("isDeleteProtectionEnabled"); return this; } + /** + * Whether or not the load balancer has the Request Id feature enabled for HTTP listeners. + *

+ * If "true", the load balancer will attach a unique request id header to every request + * passed through from the load balancer to load balancer backends. This same request id + * header also will be added to the response the lb received from the backend handling + * the request before the load balancer returns the response to the requestor. The name + * of the unique request id header is set the by value of requestIdHeader. + *

+ * If "false", the loadbalancer not add this unique request id header to either the request + * passed through to the load balancer backends nor to the reponse returned to the user. + *

+ * Example: {@code true} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRequestIdEnabled") + private Boolean isRequestIdEnabled; + + /** + * Whether or not the load balancer has the Request Id feature enabled for HTTP listeners. + *

+ * If "true", the load balancer will attach a unique request id header to every request + * passed through from the load balancer to load balancer backends. This same request id + * header also will be added to the response the lb received from the backend handling + * the request before the load balancer returns the response to the requestor. The name + * of the unique request id header is set the by value of requestIdHeader. + *

+ * If "false", the loadbalancer not add this unique request id header to either the request + * passed through to the load balancer backends nor to the reponse returned to the user. + *

+ * Example: {@code true} + * + * @param isRequestIdEnabled the value to set + * @return this builder + **/ + public Builder isRequestIdEnabled(Boolean isRequestIdEnabled) { + this.isRequestIdEnabled = isRequestIdEnabled; + this.__explicitlySet__.add("isRequestIdEnabled"); + return this; + } + /** + * If isRequestIdEnabled is true then this field contains the name of the header field + * that contains the unique request id that is attached to every request from + * the load balancer to the load balancer backends and to every response from the load + * balancer. + *

+ * If a request to the load balancer already contains a header with same name as specified + * in requestIdHeader then the load balancer will not change the value of that field. + *

+ * If this field is set to "" this field defaults to X-Request-Id. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestIdHeader") + private String requestIdHeader; + + /** + * If isRequestIdEnabled is true then this field contains the name of the header field + * that contains the unique request id that is attached to every request from + * the load balancer to the load balancer backends and to every response from the load + * balancer. + *

+ * If a request to the load balancer already contains a header with same name as specified + * in requestIdHeader then the load balancer will not change the value of that field. + *

+ * If this field is set to "" this field defaults to X-Request-Id. + * + * @param requestIdHeader the value to set + * @return this builder + **/ + public Builder requestIdHeader(String requestIdHeader) { + this.requestIdHeader = requestIdHeader; + this.__explicitlySet__.add("requestIdHeader"); + return this; + } /** * An array of subnet [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). **/ @@ -484,6 +567,28 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Extended Defined tags for ZPR for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit", "usagetype" : "zpr"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("zprTags") + private java.util.Map> zprTags; + + /** + * Extended Defined tags for ZPR for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit", "usagetype" : "zpr"}}}} + * + * @param zprTags the value to set + * @return this builder + **/ + public Builder zprTags(java.util.Map> zprTags) { + this.zprTags = zprTags; + this.__explicitlySet__.add("zprTags"); + return this; + } /** * System tags for this resource. Each key is predefined and scoped to a namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -545,6 +650,8 @@ public LoadBalancer build() { this.shapeDetails, this.isPrivate, this.isDeleteProtectionEnabled, + this.isRequestIdEnabled, + this.requestIdHeader, this.subnetIds, this.networkSecurityGroupIds, this.listeners, @@ -555,6 +662,7 @@ public LoadBalancer build() { this.pathRouteSets, this.freeformTags, this.definedTags, + this.zprTags, this.systemTags, this.ruleSets, this.routingPolicies); @@ -596,6 +704,12 @@ public Builder copy(LoadBalancer model) { if (model.wasPropertyExplicitlySet("isDeleteProtectionEnabled")) { this.isDeleteProtectionEnabled(model.getIsDeleteProtectionEnabled()); } + if (model.wasPropertyExplicitlySet("isRequestIdEnabled")) { + this.isRequestIdEnabled(model.getIsRequestIdEnabled()); + } + if (model.wasPropertyExplicitlySet("requestIdHeader")) { + this.requestIdHeader(model.getRequestIdHeader()); + } if (model.wasPropertyExplicitlySet("subnetIds")) { this.subnetIds(model.getSubnetIds()); } @@ -626,6 +740,9 @@ public Builder copy(LoadBalancer model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("zprTags")) { + this.zprTags(model.getZprTags()); + } if (model.wasPropertyExplicitlySet("systemTags")) { this.systemTags(model.getSystemTags()); } @@ -899,6 +1016,76 @@ public Boolean getIsDeleteProtectionEnabled() { return isDeleteProtectionEnabled; } + /** + * Whether or not the load balancer has the Request Id feature enabled for HTTP listeners. + *

+ * If "true", the load balancer will attach a unique request id header to every request + * passed through from the load balancer to load balancer backends. This same request id + * header also will be added to the response the lb received from the backend handling + * the request before the load balancer returns the response to the requestor. The name + * of the unique request id header is set the by value of requestIdHeader. + *

+ * If "false", the loadbalancer not add this unique request id header to either the request + * passed through to the load balancer backends nor to the reponse returned to the user. + *

+ * Example: {@code true} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRequestIdEnabled") + private final Boolean isRequestIdEnabled; + + /** + * Whether or not the load balancer has the Request Id feature enabled for HTTP listeners. + *

+ * If "true", the load balancer will attach a unique request id header to every request + * passed through from the load balancer to load balancer backends. This same request id + * header also will be added to the response the lb received from the backend handling + * the request before the load balancer returns the response to the requestor. The name + * of the unique request id header is set the by value of requestIdHeader. + *

+ * If "false", the loadbalancer not add this unique request id header to either the request + * passed through to the load balancer backends nor to the reponse returned to the user. + *

+ * Example: {@code true} + * + * @return the value + **/ + public Boolean getIsRequestIdEnabled() { + return isRequestIdEnabled; + } + + /** + * If isRequestIdEnabled is true then this field contains the name of the header field + * that contains the unique request id that is attached to every request from + * the load balancer to the load balancer backends and to every response from the load + * balancer. + *

+ * If a request to the load balancer already contains a header with same name as specified + * in requestIdHeader then the load balancer will not change the value of that field. + *

+ * If this field is set to "" this field defaults to X-Request-Id. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestIdHeader") + private final String requestIdHeader; + + /** + * If isRequestIdEnabled is true then this field contains the name of the header field + * that contains the unique request id that is attached to every request from + * the load balancer to the load balancer backends and to every response from the load + * balancer. + *

+ * If a request to the load balancer already contains a header with same name as specified + * in requestIdHeader then the load balancer will not change the value of that field. + *

+ * If this field is set to "" this field defaults to X-Request-Id. + * + * @return the value + **/ + public String getRequestIdHeader() { + return requestIdHeader; + } + /** * An array of subnet [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). **/ @@ -1039,6 +1226,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Extended Defined tags for ZPR for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit", "usagetype" : "zpr"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("zprTags") + private final java.util.Map> zprTags; + + /** + * Extended Defined tags for ZPR for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit", "usagetype" : "zpr"}}}} + * + * @return the value + **/ + public java.util.Map> getZprTags() { + return zprTags; + } + /** * System tags for this resource. Each key is predefined and scoped to a namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -1102,6 +1309,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isPrivate=").append(String.valueOf(this.isPrivate)); sb.append(", isDeleteProtectionEnabled=") .append(String.valueOf(this.isDeleteProtectionEnabled)); + sb.append(", isRequestIdEnabled=").append(String.valueOf(this.isRequestIdEnabled)); + sb.append(", requestIdHeader=").append(String.valueOf(this.requestIdHeader)); sb.append(", subnetIds=").append(String.valueOf(this.subnetIds)); sb.append(", networkSecurityGroupIds=") .append(String.valueOf(this.networkSecurityGroupIds)); @@ -1113,6 +1322,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", pathRouteSets=").append(String.valueOf(this.pathRouteSets)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", zprTags=").append(String.valueOf(this.zprTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", ruleSets=").append(String.valueOf(this.ruleSets)); sb.append(", routingPolicies=").append(String.valueOf(this.routingPolicies)); @@ -1141,6 +1351,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.isPrivate, other.isPrivate) && java.util.Objects.equals( this.isDeleteProtectionEnabled, other.isDeleteProtectionEnabled) + && java.util.Objects.equals(this.isRequestIdEnabled, other.isRequestIdEnabled) + && java.util.Objects.equals(this.requestIdHeader, other.requestIdHeader) && java.util.Objects.equals(this.subnetIds, other.subnetIds) && java.util.Objects.equals( this.networkSecurityGroupIds, other.networkSecurityGroupIds) @@ -1152,6 +1364,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.pathRouteSets, other.pathRouteSets) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.zprTags, other.zprTags) && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.ruleSets, other.ruleSets) && java.util.Objects.equals(this.routingPolicies, other.routingPolicies) @@ -1180,6 +1393,14 @@ public int hashCode() { + (this.isDeleteProtectionEnabled == null ? 43 : this.isDeleteProtectionEnabled.hashCode()); + result = + (result * PRIME) + + (this.isRequestIdEnabled == null + ? 43 + : this.isRequestIdEnabled.hashCode()); + result = + (result * PRIME) + + (this.requestIdHeader == null ? 43 : this.requestIdHeader.hashCode()); result = (result * PRIME) + (this.subnetIds == null ? 43 : this.subnetIds.hashCode()); result = (result * PRIME) @@ -1198,6 +1419,7 @@ public int hashCode() { + (this.pathRouteSets == null ? 43 : this.pathRouteSets.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.zprTags == null ? 43 : this.zprTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.ruleSets == null ? 43 : this.ruleSets.hashCode()); result = diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateBackendDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateBackendDetails.java index 3b14974e2a9..7d5132a0889 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateBackendDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateBackendDetails.java @@ -70,6 +70,8 @@ public Builder weight(Integer weight) { } /** * The maximum number of simultaneous connections the load balancer can make to the backend. + * If this is not set then the maximum number of simultaneous connections the load balancer + * can make to the backend is unlimited. *

* Example: {@code 300} * @@ -79,6 +81,8 @@ public Builder weight(Integer weight) { /** * The maximum number of simultaneous connections the load balancer can make to the backend. + * If this is not set then the maximum number of simultaneous connections the load balancer + * can make to the backend is unlimited. *

* Example: {@code 300} * @@ -246,6 +250,8 @@ public Integer getWeight() { /** * The maximum number of simultaneous connections the load balancer can make to the backend. + * If this is not set then the maximum number of simultaneous connections the load balancer + * can make to the backend is unlimited. *

* Example: {@code 300} * @@ -255,6 +261,8 @@ public Integer getWeight() { /** * The maximum number of simultaneous connections the load balancer can make to the backend. + * If this is not set then the maximum number of simultaneous connections the load balancer + * can make to the backend is unlimited. *

* Example: {@code 300} * diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateBackendSetDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateBackendSetDetails.java index 56ebad4e015..3f2b49e648e 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateBackendSetDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateBackendSetDetails.java @@ -96,7 +96,9 @@ public Builder backends(java.util.List backends) { } /** * The maximum number of simultaneous connections the load balancer can make to any backend - * in the backend set unless the backend has its own maxConnections setting. + * in the backend set unless the backend has its own maxConnections setting. If this is not + * set then the number of simultaneous connections the load balancer can make to any backend + * in the backend set unless the backend has its own maxConnections setting is unlimited. *

* Example: {@code 300} * @@ -106,7 +108,9 @@ public Builder backends(java.util.List backends) { /** * The maximum number of simultaneous connections the load balancer can make to any backend - * in the backend set unless the backend has its own maxConnections setting. + * in the backend set unless the backend has its own maxConnections setting. If this is not + * set then the number of simultaneous connections the load balancer can make to any backend + * in the backend set unless the backend has its own maxConnections setting is unlimited. *

* Example: {@code 300} * @@ -248,7 +252,9 @@ public java.util.List getBackends() { /** * The maximum number of simultaneous connections the load balancer can make to any backend - * in the backend set unless the backend has its own maxConnections setting. + * in the backend set unless the backend has its own maxConnections setting. If this is not + * set then the number of simultaneous connections the load balancer can make to any backend + * in the backend set unless the backend has its own maxConnections setting is unlimited. *

* Example: {@code 300} * @@ -258,7 +264,9 @@ public java.util.List getBackends() { /** * The maximum number of simultaneous connections the load balancer can make to any backend - * in the backend set unless the backend has its own maxConnections setting. + * in the backend set unless the backend has its own maxConnections setting. If this is not + * set then the number of simultaneous connections the load balancer can make to any backend + * in the backend set unless the backend has its own maxConnections setting is unlimited. *

* Example: {@code 300} * diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateListenerDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateListenerDetails.java index 91c55464e86..4e3421d0c73 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateListenerDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateListenerDetails.java @@ -102,9 +102,8 @@ public Builder port(Integer port) { return this; } /** - * The protocol on which the listener accepts connection requests. - * To get a list of valid protocols, use the {@link #listProtocols(ListProtocolsRequest) listProtocols} - * operation. + * The protocol on which the listener accepts connection requests. The supported protocols are HTTP, HTTP2, TCP, and GRPC. + * You can also use the {@link #listProtocols(ListProtocolsRequest) listProtocols} operation to get a list of valid protocols. *

* Example: {@code HTTP} * @@ -113,9 +112,8 @@ public Builder port(Integer port) { private String protocol; /** - * The protocol on which the listener accepts connection requests. - * To get a list of valid protocols, use the {@link #listProtocols(ListProtocolsRequest) listProtocols} - * operation. + * The protocol on which the listener accepts connection requests. The supported protocols are HTTP, HTTP2, TCP, and GRPC. + * You can also use the {@link #listProtocols(ListProtocolsRequest) listProtocols} operation to get a list of valid protocols. *

* Example: {@code HTTP} * @@ -340,9 +338,8 @@ public Integer getPort() { } /** - * The protocol on which the listener accepts connection requests. - * To get a list of valid protocols, use the {@link #listProtocols(ListProtocolsRequest) listProtocols} - * operation. + * The protocol on which the listener accepts connection requests. The supported protocols are HTTP, HTTP2, TCP, and GRPC. + * You can also use the {@link #listProtocols(ListProtocolsRequest) listProtocols} operation to get a list of valid protocols. *

* Example: {@code HTTP} * @@ -351,9 +348,8 @@ public Integer getPort() { private final String protocol; /** - * The protocol on which the listener accepts connection requests. - * To get a list of valid protocols, use the {@link #listProtocols(ListProtocolsRequest) listProtocols} - * operation. + * The protocol on which the listener accepts connection requests. The supported protocols are HTTP, HTTP2, TCP, and GRPC. + * You can also use the {@link #listProtocols(ListProtocolsRequest) listProtocols} operation to get a list of valid protocols. *

* Example: {@code HTTP} * diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateLoadBalancerDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateLoadBalancerDetails.java index a87bfcc0abb..d5a79d12585 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateLoadBalancerDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateLoadBalancerDetails.java @@ -28,19 +28,28 @@ public final class UpdateLoadBalancerDetails @java.beans.ConstructorProperties({ "displayName", "isDeleteProtectionEnabled", + "isRequestIdEnabled", + "requestIdHeader", "freeformTags", - "definedTags" + "definedTags", + "zprTags" }) public UpdateLoadBalancerDetails( String displayName, Boolean isDeleteProtectionEnabled, + Boolean isRequestIdEnabled, + String requestIdHeader, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> zprTags) { super(); this.displayName = displayName; this.isDeleteProtectionEnabled = isDeleteProtectionEnabled; + this.isRequestIdEnabled = isRequestIdEnabled; + this.requestIdHeader = requestIdHeader; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.zprTags = zprTags; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -103,6 +112,92 @@ public Builder isDeleteProtectionEnabled(Boolean isDeleteProtectionEnabled) { this.__explicitlySet__.add("isDeleteProtectionEnabled"); return this; } + /** + * Whether or not the load balancer has the Request Id feature enabled for HTTP listeners. + *

+ * If "true", the load balancer will attach a unique request id header to every request + * passed through from the load balancer to load balancer backends. This same request id + * header also will be added to the response the lb received from the backend handling + * the request before the load balancer returns the response to the requestor. The name + * of the unique request id header is set the by value of requestIdHeader. + *

+ * If "false", the loadbalancer not add this unique request id header to either the request + * passed through to the load balancer backends nor to the reponse returned to the user. + *

+ * New load balancers have the Request Id feature enabled unless isRequestIdEnabled is set to False. + *

+ * Example: {@code true} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRequestIdEnabled") + private Boolean isRequestIdEnabled; + + /** + * Whether or not the load balancer has the Request Id feature enabled for HTTP listeners. + *

+ * If "true", the load balancer will attach a unique request id header to every request + * passed through from the load balancer to load balancer backends. This same request id + * header also will be added to the response the lb received from the backend handling + * the request before the load balancer returns the response to the requestor. The name + * of the unique request id header is set the by value of requestIdHeader. + *

+ * If "false", the loadbalancer not add this unique request id header to either the request + * passed through to the load balancer backends nor to the reponse returned to the user. + *

+ * New load balancers have the Request Id feature enabled unless isRequestIdEnabled is set to False. + *

+ * Example: {@code true} + * + * @param isRequestIdEnabled the value to set + * @return this builder + **/ + public Builder isRequestIdEnabled(Boolean isRequestIdEnabled) { + this.isRequestIdEnabled = isRequestIdEnabled; + this.__explicitlySet__.add("isRequestIdEnabled"); + return this; + } + /** + * If isRequestIdEnabled is true then this field contains the name of the header field + * that contains the unique request id that is attached to every request from + * the load balancer to the load balancer backends and to every response from the load + * balancer. + *

+ * If a request to the load balancer already contains a header with same name as specified + * in requestIdHeader then the load balancer will not change the value of that field. + *

+ * If isRequestIdEnabled is false then this field is ignored. + *

+ **Notes:** + * * Unless the header name is "" it must start with "X-" prefix. + * * Setting the header name to "" will set it to the default: X-Request-Id. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestIdHeader") + private String requestIdHeader; + + /** + * If isRequestIdEnabled is true then this field contains the name of the header field + * that contains the unique request id that is attached to every request from + * the load balancer to the load balancer backends and to every response from the load + * balancer. + *

+ * If a request to the load balancer already contains a header with same name as specified + * in requestIdHeader then the load balancer will not change the value of that field. + *

+ * If isRequestIdEnabled is false then this field is ignored. + *

+ **Notes:** + * * Unless the header name is "" it must start with "X-" prefix. + * * Setting the header name to "" will set it to the default: X-Request-Id. + * + * @param requestIdHeader the value to set + * @return this builder + **/ + public Builder requestIdHeader(String requestIdHeader) { + this.requestIdHeader = requestIdHeader; + this.__explicitlySet__.add("requestIdHeader"); + return this; + } /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -152,6 +247,28 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Extended Defined tags for ZPR for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit", "usagetype" : "zpr"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("zprTags") + private java.util.Map> zprTags; + + /** + * Extended Defined tags for ZPR for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit", "usagetype" : "zpr"}}}} + * + * @param zprTags the value to set + * @return this builder + **/ + public Builder zprTags(java.util.Map> zprTags) { + this.zprTags = zprTags; + this.__explicitlySet__.add("zprTags"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -161,8 +278,11 @@ public UpdateLoadBalancerDetails build() { new UpdateLoadBalancerDetails( this.displayName, this.isDeleteProtectionEnabled, + this.isRequestIdEnabled, + this.requestIdHeader, this.freeformTags, - this.definedTags); + this.definedTags, + this.zprTags); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -177,12 +297,21 @@ public Builder copy(UpdateLoadBalancerDetails model) { if (model.wasPropertyExplicitlySet("isDeleteProtectionEnabled")) { this.isDeleteProtectionEnabled(model.getIsDeleteProtectionEnabled()); } + if (model.wasPropertyExplicitlySet("isRequestIdEnabled")) { + this.isRequestIdEnabled(model.getIsRequestIdEnabled()); + } + if (model.wasPropertyExplicitlySet("requestIdHeader")) { + this.requestIdHeader(model.getRequestIdHeader()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("zprTags")) { + this.zprTags(model.getZprTags()); + } return this; } } @@ -252,6 +381,88 @@ public Boolean getIsDeleteProtectionEnabled() { return isDeleteProtectionEnabled; } + /** + * Whether or not the load balancer has the Request Id feature enabled for HTTP listeners. + *

+ * If "true", the load balancer will attach a unique request id header to every request + * passed through from the load balancer to load balancer backends. This same request id + * header also will be added to the response the lb received from the backend handling + * the request before the load balancer returns the response to the requestor. The name + * of the unique request id header is set the by value of requestIdHeader. + *

+ * If "false", the loadbalancer not add this unique request id header to either the request + * passed through to the load balancer backends nor to the reponse returned to the user. + *

+ * New load balancers have the Request Id feature enabled unless isRequestIdEnabled is set to False. + *

+ * Example: {@code true} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRequestIdEnabled") + private final Boolean isRequestIdEnabled; + + /** + * Whether or not the load balancer has the Request Id feature enabled for HTTP listeners. + *

+ * If "true", the load balancer will attach a unique request id header to every request + * passed through from the load balancer to load balancer backends. This same request id + * header also will be added to the response the lb received from the backend handling + * the request before the load balancer returns the response to the requestor. The name + * of the unique request id header is set the by value of requestIdHeader. + *

+ * If "false", the loadbalancer not add this unique request id header to either the request + * passed through to the load balancer backends nor to the reponse returned to the user. + *

+ * New load balancers have the Request Id feature enabled unless isRequestIdEnabled is set to False. + *

+ * Example: {@code true} + * + * @return the value + **/ + public Boolean getIsRequestIdEnabled() { + return isRequestIdEnabled; + } + + /** + * If isRequestIdEnabled is true then this field contains the name of the header field + * that contains the unique request id that is attached to every request from + * the load balancer to the load balancer backends and to every response from the load + * balancer. + *

+ * If a request to the load balancer already contains a header with same name as specified + * in requestIdHeader then the load balancer will not change the value of that field. + *

+ * If isRequestIdEnabled is false then this field is ignored. + *

+ **Notes:** + * * Unless the header name is "" it must start with "X-" prefix. + * * Setting the header name to "" will set it to the default: X-Request-Id. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("requestIdHeader") + private final String requestIdHeader; + + /** + * If isRequestIdEnabled is true then this field contains the name of the header field + * that contains the unique request id that is attached to every request from + * the load balancer to the load balancer backends and to every response from the load + * balancer. + *

+ * If a request to the load balancer already contains a header with same name as specified + * in requestIdHeader then the load balancer will not change the value of that field. + *

+ * If isRequestIdEnabled is false then this field is ignored. + *

+ **Notes:** + * * Unless the header name is "" it must start with "X-" prefix. + * * Setting the header name to "" will set it to the default: X-Request-Id. + * + * @return the value + **/ + public String getRequestIdHeader() { + return requestIdHeader; + } + /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -296,6 +507,26 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Extended Defined tags for ZPR for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit", "usagetype" : "zpr"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("zprTags") + private final java.util.Map> zprTags; + + /** + * Extended Defined tags for ZPR for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit", "usagetype" : "zpr"}}}} + * + * @return the value + **/ + public java.util.Map> getZprTags() { + return zprTags; + } + @Override public String toString() { return this.toString(true); @@ -313,8 +544,11 @@ public String toString(boolean includeByteArrayContents) { sb.append("displayName=").append(String.valueOf(this.displayName)); sb.append(", isDeleteProtectionEnabled=") .append(String.valueOf(this.isDeleteProtectionEnabled)); + sb.append(", isRequestIdEnabled=").append(String.valueOf(this.isRequestIdEnabled)); + sb.append(", requestIdHeader=").append(String.valueOf(this.requestIdHeader)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", zprTags=").append(String.valueOf(this.zprTags)); sb.append(")"); return sb.toString(); } @@ -332,8 +566,11 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals( this.isDeleteProtectionEnabled, other.isDeleteProtectionEnabled) + && java.util.Objects.equals(this.isRequestIdEnabled, other.isRequestIdEnabled) + && java.util.Objects.equals(this.requestIdHeader, other.requestIdHeader) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.zprTags, other.zprTags) && super.equals(other); } @@ -347,8 +584,17 @@ public int hashCode() { + (this.isDeleteProtectionEnabled == null ? 43 : this.isDeleteProtectionEnabled.hashCode()); + result = + (result * PRIME) + + (this.isRequestIdEnabled == null + ? 43 + : this.isRequestIdEnabled.hashCode()); + result = + (result * PRIME) + + (this.requestIdHeader == null ? 43 : this.requestIdHeader.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.zprTags == null ? 43 : this.zprTags.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-lockbox/pom.xml b/bmc-lockbox/pom.xml index 6ae898905fd..79dbd9f2cb6 100644 --- a/bmc-lockbox/pom.xml +++ b/bmc-lockbox/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-lockbox @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-lockbox/src/main/java/com/oracle/bmc/lockbox/model/AccessRequest.java b/bmc-lockbox/src/main/java/com/oracle/bmc/lockbox/model/AccessRequest.java index cec60287f8e..d83ecc8532c 100644 --- a/bmc-lockbox/src/main/java/com/oracle/bmc/lockbox/model/AccessRequest.java +++ b/bmc-lockbox/src/main/java/com/oracle/bmc/lockbox/model/AccessRequest.java @@ -37,7 +37,8 @@ public final class AccessRequest extends com.oracle.bmc.http.internal.Explicitly "timeExpired", "timeReminded", "reminderCount", - "requestorLocation" + "requestorLocation", + "ticketNumber" }) public AccessRequest( String id, @@ -55,7 +56,8 @@ public AccessRequest( java.util.Date timeExpired, java.util.Date timeReminded, Integer reminderCount, - String requestorLocation) { + String requestorLocation, + String ticketNumber) { super(); this.id = id; this.lockboxId = lockboxId; @@ -73,6 +75,7 @@ public AccessRequest( this.timeReminded = timeReminded; this.reminderCount = reminderCount; this.requestorLocation = requestorLocation; + this.ticketNumber = ticketNumber; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -355,6 +358,26 @@ public Builder requestorLocation(String requestorLocation) { this.__explicitlySet__.add("requestorLocation"); return this; } + /** + * The ticket number raised by external customers + * Example: {@code 3-37509643121} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ticketNumber") + private String ticketNumber; + + /** + * The ticket number raised by external customers + * Example: {@code 3-37509643121} + * + * @param ticketNumber the value to set + * @return this builder + **/ + public Builder ticketNumber(String ticketNumber) { + this.ticketNumber = ticketNumber; + this.__explicitlySet__.add("ticketNumber"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -377,7 +400,8 @@ public AccessRequest build() { this.timeExpired, this.timeReminded, this.reminderCount, - this.requestorLocation); + this.requestorLocation, + this.ticketNumber); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -434,6 +458,9 @@ public Builder copy(AccessRequest model) { if (model.wasPropertyExplicitlySet("requestorLocation")) { this.requestorLocation(model.getRequestorLocation()); } + if (model.wasPropertyExplicitlySet("ticketNumber")) { + this.ticketNumber(model.getTicketNumber()); + } return this; } } @@ -802,6 +829,24 @@ public String getRequestorLocation() { return requestorLocation; } + /** + * The ticket number raised by external customers + * Example: {@code 3-37509643121} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ticketNumber") + private final String ticketNumber; + + /** + * The ticket number raised by external customers + * Example: {@code 3-37509643121} + * + * @return the value + **/ + public String getTicketNumber() { + return ticketNumber; + } + @Override public String toString() { return this.toString(true); @@ -832,6 +877,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeReminded=").append(String.valueOf(this.timeReminded)); sb.append(", reminderCount=").append(String.valueOf(this.reminderCount)); sb.append(", requestorLocation=").append(String.valueOf(this.requestorLocation)); + sb.append(", ticketNumber=").append(String.valueOf(this.ticketNumber)); sb.append(")"); return sb.toString(); } @@ -862,6 +908,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeReminded, other.timeReminded) && java.util.Objects.equals(this.reminderCount, other.reminderCount) && java.util.Objects.equals(this.requestorLocation, other.requestorLocation) + && java.util.Objects.equals(this.ticketNumber, other.ticketNumber) && super.equals(other); } @@ -897,6 +944,7 @@ public int hashCode() { result = (result * PRIME) + (this.requestorLocation == null ? 43 : this.requestorLocation.hashCode()); + result = (result * PRIME) + (this.ticketNumber == null ? 43 : this.ticketNumber.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-lockbox/src/main/java/com/oracle/bmc/lockbox/model/AccessRequestExt.java b/bmc-lockbox/src/main/java/com/oracle/bmc/lockbox/model/AccessRequestExt.java index 5756c53b338..c36b1699469 100644 --- a/bmc-lockbox/src/main/java/com/oracle/bmc/lockbox/model/AccessRequestExt.java +++ b/bmc-lockbox/src/main/java/com/oracle/bmc/lockbox/model/AccessRequestExt.java @@ -38,7 +38,8 @@ public final class AccessRequestExt extends com.oracle.bmc.http.internal.Explici "timeExpired", "timeReminded", "reminderCount", - "requestorLocation" + "requestorLocation", + "ticketNumber" }) public AccessRequestExt( String requestorUserName, @@ -57,7 +58,8 @@ public AccessRequestExt( java.util.Date timeExpired, java.util.Date timeReminded, Integer reminderCount, - String requestorLocation) { + String requestorLocation, + String ticketNumber) { super(); this.requestorUserName = requestorUserName; this.id = id; @@ -76,6 +78,7 @@ public AccessRequestExt( this.timeReminded = timeReminded; this.reminderCount = reminderCount; this.requestorLocation = requestorLocation; + this.ticketNumber = ticketNumber; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -376,6 +379,26 @@ public Builder requestorLocation(String requestorLocation) { this.__explicitlySet__.add("requestorLocation"); return this; } + /** + * The ticket number raised by external customers + * Example: {@code 3-37509643121} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ticketNumber") + private String ticketNumber; + + /** + * The ticket number raised by external customers + * Example: {@code 3-37509643121} + * + * @param ticketNumber the value to set + * @return this builder + **/ + public Builder ticketNumber(String ticketNumber) { + this.ticketNumber = ticketNumber; + this.__explicitlySet__.add("ticketNumber"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -399,7 +422,8 @@ public AccessRequestExt build() { this.timeExpired, this.timeReminded, this.reminderCount, - this.requestorLocation); + this.requestorLocation, + this.ticketNumber); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -459,6 +483,9 @@ public Builder copy(AccessRequestExt model) { if (model.wasPropertyExplicitlySet("requestorLocation")) { this.requestorLocation(model.getRequestorLocation()); } + if (model.wasPropertyExplicitlySet("ticketNumber")) { + this.ticketNumber(model.getTicketNumber()); + } return this; } } @@ -843,6 +870,24 @@ public String getRequestorLocation() { return requestorLocation; } + /** + * The ticket number raised by external customers + * Example: {@code 3-37509643121} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ticketNumber") + private final String ticketNumber; + + /** + * The ticket number raised by external customers + * Example: {@code 3-37509643121} + * + * @return the value + **/ + public String getTicketNumber() { + return ticketNumber; + } + @Override public String toString() { return this.toString(true); @@ -874,6 +919,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeReminded=").append(String.valueOf(this.timeReminded)); sb.append(", reminderCount=").append(String.valueOf(this.reminderCount)); sb.append(", requestorLocation=").append(String.valueOf(this.requestorLocation)); + sb.append(", ticketNumber=").append(String.valueOf(this.ticketNumber)); sb.append(")"); return sb.toString(); } @@ -905,6 +951,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeReminded, other.timeReminded) && java.util.Objects.equals(this.reminderCount, other.reminderCount) && java.util.Objects.equals(this.requestorLocation, other.requestorLocation) + && java.util.Objects.equals(this.ticketNumber, other.ticketNumber) && super.equals(other); } @@ -943,6 +990,7 @@ public int hashCode() { result = (result * PRIME) + (this.requestorLocation == null ? 43 : this.requestorLocation.hashCode()); + result = (result * PRIME) + (this.ticketNumber == null ? 43 : this.ticketNumber.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-lockbox/src/main/java/com/oracle/bmc/lockbox/model/AccessRequestSummary.java b/bmc-lockbox/src/main/java/com/oracle/bmc/lockbox/model/AccessRequestSummary.java index a905e22b2eb..14b25e4d1da 100644 --- a/bmc-lockbox/src/main/java/com/oracle/bmc/lockbox/model/AccessRequestSummary.java +++ b/bmc-lockbox/src/main/java/com/oracle/bmc/lockbox/model/AccessRequestSummary.java @@ -33,6 +33,7 @@ public final class AccessRequestSummary extends com.oracle.bmc.http.internal.Exp "timeCreated", "timeUpdated", "timeExpired", + "ticketNumber", "freeformTags", "definedTags", "systemTags" @@ -49,6 +50,7 @@ public AccessRequestSummary( java.util.Date timeCreated, java.util.Date timeUpdated, java.util.Date timeExpired, + String ticketNumber, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags) { @@ -64,6 +66,7 @@ public AccessRequestSummary( this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.timeExpired = timeExpired; + this.ticketNumber = ticketNumber; this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; @@ -263,6 +266,26 @@ public Builder timeExpired(java.util.Date timeExpired) { this.__explicitlySet__.add("timeExpired"); return this; } + /** + * The ticket number raised by external customers + * Example: {@code 3-37509643121} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ticketNumber") + private String ticketNumber; + + /** + * The ticket number raised by external customers + * Example: {@code 3-37509643121} + * + * @param ticketNumber the value to set + * @return this builder + **/ + public Builder ticketNumber(String ticketNumber) { + this.ticketNumber = ticketNumber; + this.__explicitlySet__.add("ticketNumber"); + return this; + } /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -342,6 +365,7 @@ public AccessRequestSummary build() { this.timeCreated, this.timeUpdated, this.timeExpired, + this.ticketNumber, this.freeformTags, this.definedTags, this.systemTags); @@ -386,6 +410,9 @@ public Builder copy(AccessRequestSummary model) { if (model.wasPropertyExplicitlySet("timeExpired")) { this.timeExpired(model.getTimeExpired()); } + if (model.wasPropertyExplicitlySet("ticketNumber")) { + this.ticketNumber(model.getTicketNumber()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -580,6 +607,24 @@ public java.util.Date getTimeExpired() { return timeExpired; } + /** + * The ticket number raised by external customers + * Example: {@code 3-37509643121} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ticketNumber") + private final String ticketNumber; + + /** + * The ticket number raised by external customers + * Example: {@code 3-37509643121} + * + * @return the value + **/ + public String getTicketNumber() { + return ticketNumber; + } + /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -659,6 +704,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", timeExpired=").append(String.valueOf(this.timeExpired)); + sb.append(", ticketNumber=").append(String.valueOf(this.ticketNumber)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); @@ -687,6 +733,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.timeExpired, other.timeExpired) + && java.util.Objects.equals(this.ticketNumber, other.ticketNumber) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) @@ -714,6 +761,7 @@ public int hashCode() { result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); result = (result * PRIME) + (this.timeExpired == null ? 43 : this.timeExpired.hashCode()); + result = (result * PRIME) + (this.ticketNumber == null ? 43 : this.ticketNumber.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); diff --git a/bmc-lockbox/src/main/java/com/oracle/bmc/lockbox/model/CreateAccessRequestDetails.java b/bmc-lockbox/src/main/java/com/oracle/bmc/lockbox/model/CreateAccessRequestDetails.java index ef223e864d5..261b19c2599 100644 --- a/bmc-lockbox/src/main/java/com/oracle/bmc/lockbox/model/CreateAccessRequestDetails.java +++ b/bmc-lockbox/src/main/java/com/oracle/bmc/lockbox/model/CreateAccessRequestDetails.java @@ -30,20 +30,23 @@ public final class CreateAccessRequestDetails "displayName", "description", "context", - "accessDuration" + "accessDuration", + "ticketNumber" }) public CreateAccessRequestDetails( String lockboxId, String displayName, String description, java.util.Map context, - String accessDuration) { + String accessDuration, + String ticketNumber) { super(); this.lockboxId = lockboxId; this.displayName = displayName; this.description = description; this.context = context; this.accessDuration = accessDuration; + this.ticketNumber = ticketNumber; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -128,6 +131,26 @@ public Builder accessDuration(String accessDuration) { this.__explicitlySet__.add("accessDuration"); return this; } + /** + * The ticket number raised by external customers + * Example: {@code 3-37509643121} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ticketNumber") + private String ticketNumber; + + /** + * The ticket number raised by external customers + * Example: {@code 3-37509643121} + * + * @param ticketNumber the value to set + * @return this builder + **/ + public Builder ticketNumber(String ticketNumber) { + this.ticketNumber = ticketNumber; + this.__explicitlySet__.add("ticketNumber"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -139,7 +162,8 @@ public CreateAccessRequestDetails build() { this.displayName, this.description, this.context, - this.accessDuration); + this.accessDuration, + this.ticketNumber); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -163,6 +187,9 @@ public Builder copy(CreateAccessRequestDetails model) { if (model.wasPropertyExplicitlySet("accessDuration")) { this.accessDuration(model.getAccessDuration()); } + if (model.wasPropertyExplicitlySet("ticketNumber")) { + this.ticketNumber(model.getTicketNumber()); + } return this; } } @@ -248,6 +275,24 @@ public String getAccessDuration() { return accessDuration; } + /** + * The ticket number raised by external customers + * Example: {@code 3-37509643121} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("ticketNumber") + private final String ticketNumber; + + /** + * The ticket number raised by external customers + * Example: {@code 3-37509643121} + * + * @return the value + **/ + public String getTicketNumber() { + return ticketNumber; + } + @Override public String toString() { return this.toString(true); @@ -267,6 +312,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", description=").append(String.valueOf(this.description)); sb.append(", context=").append(String.valueOf(this.context)); sb.append(", accessDuration=").append(String.valueOf(this.accessDuration)); + sb.append(", ticketNumber=").append(String.valueOf(this.ticketNumber)); sb.append(")"); return sb.toString(); } @@ -286,6 +332,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.context, other.context) && java.util.Objects.equals(this.accessDuration, other.accessDuration) + && java.util.Objects.equals(this.ticketNumber, other.ticketNumber) && super.equals(other); } @@ -300,6 +347,7 @@ public int hashCode() { result = (result * PRIME) + (this.accessDuration == null ? 43 : this.accessDuration.hashCode()); + result = (result * PRIME) + (this.ticketNumber == null ? 43 : this.ticketNumber.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-loganalytics/pom.xml b/bmc-loganalytics/pom.xml index 61930e5d382..ac8fee605ea 100644 --- a/bmc-loganalytics/pom.xml +++ b/bmc-loganalytics/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-loganalytics @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-logging/pom.xml b/bmc-logging/pom.xml index 6c7b5ed7260..84a38b2e4d5 100644 --- a/bmc-logging/pom.xml +++ b/bmc-logging/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-logging @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-loggingingestion/pom.xml b/bmc-loggingingestion/pom.xml index 47eef7d9d7f..dbc43b610b3 100644 --- a/bmc-loggingingestion/pom.xml +++ b/bmc-loggingingestion/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-loggingingestion @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-loggingsearch/pom.xml b/bmc-loggingsearch/pom.xml index f1d227c275f..c90cf64f759 100644 --- a/bmc-loggingsearch/pom.xml +++ b/bmc-loggingsearch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-loggingsearch @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-managementagent/pom.xml b/bmc-managementagent/pom.xml index 6772e934e59..a89a39fc4a4 100644 --- a/bmc-managementagent/pom.xml +++ b/bmc-managementagent/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-managementagent @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-managementdashboard/pom.xml b/bmc-managementdashboard/pom.xml index 6ea63abf001..2580548f65b 100644 --- a/bmc-managementdashboard/pom.xml +++ b/bmc-managementdashboard/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-managementdashboard @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-marketplace/pom.xml b/bmc-marketplace/pom.xml index 58b2b25092a..eeaafdf1206 100644 --- a/bmc-marketplace/pom.xml +++ b/bmc-marketplace/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-marketplace @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-marketplaceprivateoffer/pom.xml b/bmc-marketplaceprivateoffer/pom.xml index cf6c63a573c..d9db092d5fe 100644 --- a/bmc-marketplaceprivateoffer/pom.xml +++ b/bmc-marketplaceprivateoffer/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-marketplaceprivateoffer @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-marketplacepublisher/pom.xml b/bmc-marketplacepublisher/pom.xml index 9811d4d44a5..0d74a88cbed 100644 --- a/bmc-marketplacepublisher/pom.xml +++ b/bmc-marketplacepublisher/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-marketplacepublisher @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-mediaservices/pom.xml b/bmc-mediaservices/pom.xml index e92e6097d3c..969ca23b1d7 100644 --- a/bmc-mediaservices/pom.xml +++ b/bmc-mediaservices/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-mediaservices @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-monitoring/pom.xml b/bmc-monitoring/pom.xml index e7e64557746..3c1bc1e4d8c 100644 --- a/bmc-monitoring/pom.xml +++ b/bmc-monitoring/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-monitoring @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/Monitoring.java b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/Monitoring.java index 3527f9f4c37..77c649fc60b 100644 --- a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/Monitoring.java +++ b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/Monitoring.java @@ -100,7 +100,10 @@ public interface Monitoring extends AutoCloseable { CreateAlarmResponse createAlarm(CreateAlarmRequest request); /** - * Creates a dimension-specific suppression for an alarm. + * Creates a new alarm suppression at the specified level (alarm-wide or dimension-specific). + * For more information, see + * [Adding an Alarm-wide Suppression](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/add-alarm-suppression.htm) and + * [Adding a Dimension-Specific Alarm Suppression](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/create-alarm-suppression.htm). *

* For important limits information, see * [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits). @@ -141,7 +144,9 @@ public interface Monitoring extends AutoCloseable { DeleteAlarmResponse deleteAlarm(DeleteAlarmRequest request); /** - * Deletes the specified alarm suppression. + * Deletes the specified alarm suppression. For more information, see + * [Removing an Alarm-wide Suppression](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/remove-alarm-suppression.htm) and + * [Removing a Dimension-Specific Alarm Suppression](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/delete-alarm-suppression.htm). *

* For important limits information, see * [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits). @@ -203,7 +208,8 @@ public interface Monitoring extends AutoCloseable { GetAlarmHistoryResponse getAlarmHistory(GetAlarmHistoryRequest request); /** - * Gets the specified alarm suppression. + * Gets the specified alarm suppression. For more information, see + * [Getting an Alarm-wide Suppression](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/get-alarm-suppression.htm). *

* For important limits information, see * [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits). @@ -223,8 +229,8 @@ public interface Monitoring extends AutoCloseable { GetAlarmSuppressionResponse getAlarmSuppression(GetAlarmSuppressionRequest request); /** - * Lists alarm suppressions for the specified alarm. - * Only dimension-level suppressions are listed. Alarm-level suppressions are not listed. + * Lists alarm suppressions for the specified alarm. For more information, see + * [Listing Alarm Suppressions](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/list-alarm-suppression.htm). *

* For important limits information, see * [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits). @@ -269,6 +275,7 @@ public interface Monitoring extends AutoCloseable { * Status is collective, across all metric streams in the alarm. * To list alarm status for each metric stream, use {@link #retrieveDimensionStates(RetrieveDimensionStatesRequest) retrieveDimensionStates}. * Optionally filter by resource or status value. + *

* For more information, see * [Listing Alarm Statuses](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/list-alarm-status.htm). * For important limits information, see @@ -374,6 +381,7 @@ public interface Monitoring extends AutoCloseable { /** * Lists the current alarm status of each metric stream, where status is derived from the metric stream's last associated transition. * Optionally filter by status value and one or more dimension key-value pairs. + *

* For more information, see * [Listing Metric Stream Status in an Alarm](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/list-alarm-status-metric-stream.htm). *

@@ -395,7 +403,8 @@ public interface Monitoring extends AutoCloseable { RetrieveDimensionStatesResponse retrieveDimensionStates(RetrieveDimensionStatesRequest request); /** - * Returns history of suppressions for the specified alarm, including both dimension-specific and and alarm-wide suppressions. + * Returns history of suppressions for the specified alarm, including both dimension-specific and and alarm-wide suppressions. For more information, see + * [Getting Suppression History for an Alarm](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/summarize-alarm-suppression-history.htm). *

* For important limits information, see * [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits). diff --git a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/MonitoringAsync.java b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/MonitoringAsync.java index 478cd153e59..8bb5ea9db49 100644 --- a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/MonitoringAsync.java +++ b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/MonitoringAsync.java @@ -105,7 +105,10 @@ java.util.concurrent.Future createAlarm( com.oracle.bmc.responses.AsyncHandler handler); /** - * Creates a dimension-specific suppression for an alarm. + * Creates a new alarm suppression at the specified level (alarm-wide or dimension-specific). + * For more information, see + * [Adding an Alarm-wide Suppression](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/add-alarm-suppression.htm) and + * [Adding a Dimension-Specific Alarm Suppression](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/create-alarm-suppression.htm). *

* For important limits information, see * [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits). @@ -152,7 +155,9 @@ java.util.concurrent.Future deleteAlarm( com.oracle.bmc.responses.AsyncHandler handler); /** - * Deletes the specified alarm suppression. + * Deletes the specified alarm suppression. For more information, see + * [Removing an Alarm-wide Suppression](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/remove-alarm-suppression.htm) and + * [Removing a Dimension-Specific Alarm Suppression](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/delete-alarm-suppression.htm). *

* For important limits information, see * [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits). @@ -223,7 +228,8 @@ java.util.concurrent.Future getAlarmHistory( handler); /** - * Gets the specified alarm suppression. + * Gets the specified alarm suppression. For more information, see + * [Getting an Alarm-wide Suppression](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/get-alarm-suppression.htm). *

* For important limits information, see * [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits). @@ -247,8 +253,8 @@ java.util.concurrent.Future getAlarmSuppression( handler); /** - * Lists alarm suppressions for the specified alarm. - * Only dimension-level suppressions are listed. Alarm-level suppressions are not listed. + * Lists alarm suppressions for the specified alarm. For more information, see + * [Listing Alarm Suppressions](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/list-alarm-suppression.htm). *

* For important limits information, see * [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits). @@ -299,6 +305,7 @@ java.util.concurrent.Future listAlarms( * Status is collective, across all metric streams in the alarm. * To list alarm status for each metric stream, use {@link #retrieveDimensionStates(RetrieveDimensionStatesRequest, Consumer, Consumer) retrieveDimensionStates}. * Optionally filter by resource or status value. + *

* For more information, see * [Listing Alarm Statuses](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/list-alarm-status.htm). * For important limits information, see @@ -416,6 +423,7 @@ java.util.concurrent.Future removeAlarmSuppressi /** * Lists the current alarm status of each metric stream, where status is derived from the metric stream's last associated transition. * Optionally filter by status value and one or more dimension key-value pairs. + *

* For more information, see * [Listing Metric Stream Status in an Alarm](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/list-alarm-status-metric-stream.htm). *

@@ -441,7 +449,8 @@ java.util.concurrent.Future retrieveDimensionSt handler); /** - * Returns history of suppressions for the specified alarm, including both dimension-specific and and alarm-wide suppressions. + * Returns history of suppressions for the specified alarm, including both dimension-specific and and alarm-wide suppressions. For more information, see + * [Getting Suppression History for an Alarm](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/summarize-alarm-suppression-history.htm). *

* For important limits information, see * [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits). diff --git a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/internal/http/ListAlarmSuppressionsConverter.java b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/internal/http/ListAlarmSuppressionsConverter.java index f590c654197..de943f9ad98 100644 --- a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/internal/http/ListAlarmSuppressionsConverter.java +++ b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/internal/http/ListAlarmSuppressionsConverter.java @@ -29,16 +29,17 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.http.internal.RestClient client, com.oracle.bmc.monitoring.requests.ListAlarmSuppressionsRequest request) { Validate.notNull(request, "request instance is required"); - Validate.notNull(request.getAlarmId(), "alarmId is required"); com.oracle.bmc.http.internal.WrappedWebTarget target = client.getBaseTarget().path("/20180401").path("alarmSuppressions"); - target = - target.queryParam( - "alarmId", - com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( - request.getAlarmId())); + if (request.getAlarmId() != null) { + target = + target.queryParam( + "alarmId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAlarmId())); + } if (request.getDisplayName() != null) { target = @@ -56,6 +57,46 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getLifecycleState().getValue())); } + if (request.getLevel() != null) { + target = + target.queryParam( + "level", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLevel().getValue())); + } + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getCompartmentIdInSubtree() != null) { + target = + target.queryParam( + "compartmentIdInSubtree", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentIdInSubtree())); + } + + if (request.getTargetType() != null) { + target = + target.queryParam( + "targetType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTargetType().getValue())); + } + + if (request.getIsAllSuppressions() != null) { + target = + target.queryParam( + "isAllSuppressions", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsAllSuppressions())); + } + if (request.getSortBy() != null) { target = target.queryParam( diff --git a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmStatusSummary.java b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmStatusSummary.java index 7cafdd97fc6..a2b85dc3444 100644 --- a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmStatusSummary.java +++ b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmStatusSummary.java @@ -203,6 +203,7 @@ public Builder alarmSummary(String alarmSummary) { * The status of this alarm. * Status is collective, across all metric streams in the alarm. * To list alarm status for each metric stream, use {@link #retrieveDimensionStates(RetrieveDimensionStatesRequest) retrieveDimensionStates}. + *

* Example: {@code FIRING} * **/ @@ -213,6 +214,7 @@ public Builder alarmSummary(String alarmSummary) { * The status of this alarm. * Status is collective, across all metric streams in the alarm. * To list alarm status for each metric stream, use {@link #retrieveDimensionStates(RetrieveDimensionStatesRequest) retrieveDimensionStates}. + *

* Example: {@code FIRING} * * @param status the value to set @@ -482,6 +484,7 @@ public String getAlarmSummary() { * The status of this alarm. * Status is collective, across all metric streams in the alarm. * To list alarm status for each metric stream, use {@link #retrieveDimensionStates(RetrieveDimensionStatesRequest) retrieveDimensionStates}. + *

* Example: {@code FIRING} * **/ @@ -534,6 +537,7 @@ public static Status create(String key) { * The status of this alarm. * Status is collective, across all metric streams in the alarm. * To list alarm status for each metric stream, use {@link #retrieveDimensionStates(RetrieveDimensionStatesRequest) retrieveDimensionStates}. + *

* Example: {@code FIRING} * **/ @@ -544,6 +548,7 @@ public static Status create(String key) { * The status of this alarm. * Status is collective, across all metric streams in the alarm. * To list alarm status for each metric stream, use {@link #retrieveDimensionStates(RetrieveDimensionStatesRequest) retrieveDimensionStates}. + *

* Example: {@code FIRING} * * @return the value diff --git a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppression.java b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppression.java index 2e2d79b5971..8f38b9c2e0b 100644 --- a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppression.java +++ b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppression.java @@ -5,7 +5,7 @@ package com.oracle.bmc.monitoring.model; /** - * The configuration details for a dimension-specific alarm suppression. + * The configuration details for an alarm suppression. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -24,6 +24,8 @@ public final class AlarmSuppression extends com.oracle.bmc.http.internal.Explici "id", "compartmentId", "alarmSuppressionTarget", + "level", + "suppressionConditions", "displayName", "description", "dimensions", @@ -39,6 +41,8 @@ public AlarmSuppression( String id, String compartmentId, AlarmSuppressionTarget alarmSuppressionTarget, + Level level, + java.util.List suppressionConditions, String displayName, String description, java.util.Map dimensions, @@ -53,6 +57,8 @@ public AlarmSuppression( this.id = id; this.compartmentId = compartmentId; this.alarmSuppressionTarget = alarmSuppressionTarget; + this.level = level; + this.suppressionConditions = suppressionConditions; this.displayName = displayName; this.description = description; this.dimensions = dimensions; @@ -108,6 +114,57 @@ public Builder alarmSuppressionTarget(AlarmSuppressionTarget alarmSuppressionTar this.__explicitlySet__.add("alarmSuppressionTarget"); return this; } + /** + * The level of this alarm suppression. + * {@code ALARM} indicates a suppression of the entire alarm, regardless of dimension. + * {@code DIMENSION} indicates a suppression configured for specified dimensions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("level") + private Level level; + + /** + * The level of this alarm suppression. + * {@code ALARM} indicates a suppression of the entire alarm, regardless of dimension. + * {@code DIMENSION} indicates a suppression configured for specified dimensions. + * + * @param level the value to set + * @return this builder + **/ + public Builder level(Level level) { + this.level = level; + this.__explicitlySet__.add("level"); + return this; + } + /** + * Array of all preconditions for alarm suppression. + * Example: {@code [{ + * conditionType: "RECURRENCE", + * suppressionRecurrence: "FRQ=DAILY;BYHOUR=10", + * suppressionDuration: "PT1H" + * }]} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("suppressionConditions") + private java.util.List suppressionConditions; + + /** + * Array of all preconditions for alarm suppression. + * Example: {@code [{ + * conditionType: "RECURRENCE", + * suppressionRecurrence: "FRQ=DAILY;BYHOUR=10", + * suppressionDuration: "PT1H" + * }]} + * + * @param suppressionConditions the value to set + * @return this builder + **/ + public Builder suppressionConditions( + java.util.List suppressionConditions) { + this.suppressionConditions = suppressionConditions; + this.__explicitlySet__.add("suppressionConditions"); + return this; + } /** * A user-friendly name for the alarm suppression. It does not have to be unique, and it's changeable. Avoid entering confidential information. **/ @@ -339,6 +396,8 @@ public AlarmSuppression build() { this.id, this.compartmentId, this.alarmSuppressionTarget, + this.level, + this.suppressionConditions, this.displayName, this.description, this.dimensions, @@ -366,6 +425,12 @@ public Builder copy(AlarmSuppression model) { if (model.wasPropertyExplicitlySet("alarmSuppressionTarget")) { this.alarmSuppressionTarget(model.getAlarmSuppressionTarget()); } + if (model.wasPropertyExplicitlySet("level")) { + this.level(model.getLevel()); + } + if (model.wasPropertyExplicitlySet("suppressionConditions")) { + this.suppressionConditions(model.getSuppressionConditions()); + } if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } @@ -446,6 +511,102 @@ public AlarmSuppressionTarget getAlarmSuppressionTarget() { return alarmSuppressionTarget; } + /** + * The level of this alarm suppression. + * {@code ALARM} indicates a suppression of the entire alarm, regardless of dimension. + * {@code DIMENSION} indicates a suppression configured for specified dimensions. + * + **/ + public enum Level { + Alarm("ALARM"), + Dimension("DIMENSION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Level.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Level v : Level.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Level(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Level create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Level', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The level of this alarm suppression. + * {@code ALARM} indicates a suppression of the entire alarm, regardless of dimension. + * {@code DIMENSION} indicates a suppression configured for specified dimensions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("level") + private final Level level; + + /** + * The level of this alarm suppression. + * {@code ALARM} indicates a suppression of the entire alarm, regardless of dimension. + * {@code DIMENSION} indicates a suppression configured for specified dimensions. + * + * @return the value + **/ + public Level getLevel() { + return level; + } + + /** + * Array of all preconditions for alarm suppression. + * Example: {@code [{ + * conditionType: "RECURRENCE", + * suppressionRecurrence: "FRQ=DAILY;BYHOUR=10", + * suppressionDuration: "PT1H" + * }]} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("suppressionConditions") + private final java.util.List suppressionConditions; + + /** + * Array of all preconditions for alarm suppression. + * Example: {@code [{ + * conditionType: "RECURRENCE", + * suppressionRecurrence: "FRQ=DAILY;BYHOUR=10", + * suppressionDuration: "PT1H" + * }]} + * + * @return the value + **/ + public java.util.List getSuppressionConditions() { + return suppressionConditions; + } + /** * A user-friendly name for the alarm suppression. It does not have to be unique, and it's changeable. Avoid entering confidential information. **/ @@ -714,6 +875,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("id=").append(String.valueOf(this.id)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", alarmSuppressionTarget=").append(String.valueOf(this.alarmSuppressionTarget)); + sb.append(", level=").append(String.valueOf(this.level)); + sb.append(", suppressionConditions=").append(String.valueOf(this.suppressionConditions)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", dimensions=").append(String.valueOf(this.dimensions)); @@ -742,6 +905,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals( this.alarmSuppressionTarget, other.alarmSuppressionTarget) + && java.util.Objects.equals(this.level, other.level) + && java.util.Objects.equals(this.suppressionConditions, other.suppressionConditions) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.dimensions, other.dimensions) @@ -768,6 +933,12 @@ public int hashCode() { + (this.alarmSuppressionTarget == null ? 43 : this.alarmSuppressionTarget.hashCode()); + result = (result * PRIME) + (this.level == null ? 43 : this.level.hashCode()); + result = + (result * PRIME) + + (this.suppressionConditions == null + ? 43 + : this.suppressionConditions.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); result = (result * PRIME) + (this.dimensions == null ? 43 : this.dimensions.hashCode()); diff --git a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppressionCollection.java b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppressionCollection.java index 416cabf2c3d..df65c62dcc8 100644 --- a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppressionCollection.java +++ b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppressionCollection.java @@ -5,7 +5,7 @@ package com.oracle.bmc.monitoring.model; /** - * Collection of property summaries for dimension-specific alarm suppressions. + * Collection of property summaries for alarm suppressions. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -32,14 +32,14 @@ public AlarmSuppressionCollection(java.util.List items) @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * List of property summaries for dimension-specific alarm suppressions. + * List of property summaries for alarm suppressions. * **/ @com.fasterxml.jackson.annotation.JsonProperty("items") private java.util.List items; /** - * List of property summaries for dimension-specific alarm suppressions. + * List of property summaries for alarm suppressions. * * @param items the value to set * @return this builder @@ -82,14 +82,14 @@ public Builder toBuilder() { } /** - * List of property summaries for dimension-specific alarm suppressions. + * List of property summaries for alarm suppressions. * **/ @com.fasterxml.jackson.annotation.JsonProperty("items") private final java.util.List items; /** - * List of property summaries for dimension-specific alarm suppressions. + * List of property summaries for alarm suppressions. * * @return the value **/ diff --git a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppressionCompartmentTarget.java b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppressionCompartmentTarget.java new file mode 100644 index 00000000000..f97f3fc3fbe --- /dev/null +++ b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppressionCompartmentTarget.java @@ -0,0 +1,212 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.monitoring.model; + +/** + * The compartment target of the alarm suppression. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180401") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AlarmSuppressionCompartmentTarget.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "targetType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AlarmSuppressionCompartmentTarget extends AlarmSuppressionTarget { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment or tenancy that is the + * target of the alarm suppression. + * Example: {@code ocid1.compartment.oc1..exampleuniqueID} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment or tenancy that is the + * target of the alarm suppression. + * Example: {@code ocid1.compartment.oc1..exampleuniqueID} + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * When true, the alarm suppression targets all alarms under all compartments and subcompartments of + * the tenancy specified. The parameter can only be set to true when compartmentId is the tenancy OCID + * (the tenancy is the root compartment). When false, the alarm suppression targets only the alarms under + * the specified compartment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentIdInSubtree") + private Boolean compartmentIdInSubtree; + + /** + * When true, the alarm suppression targets all alarms under all compartments and subcompartments of + * the tenancy specified. The parameter can only be set to true when compartmentId is the tenancy OCID + * (the tenancy is the root compartment). When false, the alarm suppression targets only the alarms under + * the specified compartment. + * + * @param compartmentIdInSubtree the value to set + * @return this builder + **/ + public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { + this.compartmentIdInSubtree = compartmentIdInSubtree; + this.__explicitlySet__.add("compartmentIdInSubtree"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AlarmSuppressionCompartmentTarget build() { + AlarmSuppressionCompartmentTarget model = + new AlarmSuppressionCompartmentTarget( + this.compartmentId, this.compartmentIdInSubtree); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AlarmSuppressionCompartmentTarget model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("compartmentIdInSubtree")) { + this.compartmentIdInSubtree(model.getCompartmentIdInSubtree()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public AlarmSuppressionCompartmentTarget(String compartmentId, Boolean compartmentIdInSubtree) { + super(); + this.compartmentId = compartmentId; + this.compartmentIdInSubtree = compartmentIdInSubtree; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment or tenancy that is the + * target of the alarm suppression. + * Example: {@code ocid1.compartment.oc1..exampleuniqueID} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment or tenancy that is the + * target of the alarm suppression. + * Example: {@code ocid1.compartment.oc1..exampleuniqueID} + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * When true, the alarm suppression targets all alarms under all compartments and subcompartments of + * the tenancy specified. The parameter can only be set to true when compartmentId is the tenancy OCID + * (the tenancy is the root compartment). When false, the alarm suppression targets only the alarms under + * the specified compartment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentIdInSubtree") + private final Boolean compartmentIdInSubtree; + + /** + * When true, the alarm suppression targets all alarms under all compartments and subcompartments of + * the tenancy specified. The parameter can only be set to true when compartmentId is the tenancy OCID + * (the tenancy is the root compartment). When false, the alarm suppression targets only the alarms under + * the specified compartment. + * + * @return the value + **/ + public Boolean getCompartmentIdInSubtree() { + return compartmentIdInSubtree; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AlarmSuppressionCompartmentTarget("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", compartmentIdInSubtree=").append(String.valueOf(this.compartmentIdInSubtree)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AlarmSuppressionCompartmentTarget)) { + return false; + } + + AlarmSuppressionCompartmentTarget other = (AlarmSuppressionCompartmentTarget) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals( + this.compartmentIdInSubtree, other.compartmentIdInSubtree) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.compartmentIdInSubtree == null + ? 43 + : this.compartmentIdInSubtree.hashCode()); + return result; + } +} diff --git a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppressionHistoryItem.java b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppressionHistoryItem.java index 0da3d9eb13b..b22b544a140 100644 --- a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppressionHistoryItem.java +++ b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppressionHistoryItem.java @@ -31,7 +31,8 @@ public final class AlarmSuppressionHistoryItem "description", "dimensions", "timeEffectiveFrom", - "timeEffectiveUntil" + "timeEffectiveUntil", + "suppressionConditions" }) public AlarmSuppressionHistoryItem( String suppressionId, @@ -41,7 +42,8 @@ public AlarmSuppressionHistoryItem( String description, java.util.Map dimensions, java.util.Date timeEffectiveFrom, - java.util.Date timeEffectiveUntil) { + java.util.Date timeEffectiveUntil, + java.util.List suppressionConditions) { super(); this.suppressionId = suppressionId; this.alarmSuppressionTarget = alarmSuppressionTarget; @@ -51,6 +53,7 @@ public AlarmSuppressionHistoryItem( this.dimensions = dimensions; this.timeEffectiveFrom = timeEffectiveFrom; this.timeEffectiveUntil = timeEffectiveUntil; + this.suppressionConditions = suppressionConditions; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -216,6 +219,35 @@ public Builder timeEffectiveUntil(java.util.Date timeEffectiveUntil) { this.__explicitlySet__.add("timeEffectiveUntil"); return this; } + /** + * Array of all preconditions for alarm suppression. + * Example: {@code [{ + * conditionType: "RECURRENCE", + * suppressionRecurrence: "FRQ=DAILY;BYHOUR=10", + * suppressionDuration: "PT1H" + * }]} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("suppressionConditions") + private java.util.List suppressionConditions; + + /** + * Array of all preconditions for alarm suppression. + * Example: {@code [{ + * conditionType: "RECURRENCE", + * suppressionRecurrence: "FRQ=DAILY;BYHOUR=10", + * suppressionDuration: "PT1H" + * }]} + * + * @param suppressionConditions the value to set + * @return this builder + **/ + public Builder suppressionConditions( + java.util.List suppressionConditions) { + this.suppressionConditions = suppressionConditions; + this.__explicitlySet__.add("suppressionConditions"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -230,7 +262,8 @@ public AlarmSuppressionHistoryItem build() { this.description, this.dimensions, this.timeEffectiveFrom, - this.timeEffectiveUntil); + this.timeEffectiveUntil, + this.suppressionConditions); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -263,6 +296,9 @@ public Builder copy(AlarmSuppressionHistoryItem model) { if (model.wasPropertyExplicitlySet("timeEffectiveUntil")) { this.timeEffectiveUntil(model.getTimeEffectiveUntil()); } + if (model.wasPropertyExplicitlySet("suppressionConditions")) { + this.suppressionConditions(model.getSuppressionConditions()); + } return this; } } @@ -473,6 +509,32 @@ public java.util.Date getTimeEffectiveUntil() { return timeEffectiveUntil; } + /** + * Array of all preconditions for alarm suppression. + * Example: {@code [{ + * conditionType: "RECURRENCE", + * suppressionRecurrence: "FRQ=DAILY;BYHOUR=10", + * suppressionDuration: "PT1H" + * }]} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("suppressionConditions") + private final java.util.List suppressionConditions; + + /** + * Array of all preconditions for alarm suppression. + * Example: {@code [{ + * conditionType: "RECURRENCE", + * suppressionRecurrence: "FRQ=DAILY;BYHOUR=10", + * suppressionDuration: "PT1H" + * }]} + * + * @return the value + **/ + public java.util.List getSuppressionConditions() { + return suppressionConditions; + } + @Override public String toString() { return this.toString(true); @@ -495,6 +557,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", dimensions=").append(String.valueOf(this.dimensions)); sb.append(", timeEffectiveFrom=").append(String.valueOf(this.timeEffectiveFrom)); sb.append(", timeEffectiveUntil=").append(String.valueOf(this.timeEffectiveUntil)); + sb.append(", suppressionConditions=").append(String.valueOf(this.suppressionConditions)); sb.append(")"); return sb.toString(); } @@ -518,6 +581,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.dimensions, other.dimensions) && java.util.Objects.equals(this.timeEffectiveFrom, other.timeEffectiveFrom) && java.util.Objects.equals(this.timeEffectiveUntil, other.timeEffectiveUntil) + && java.util.Objects.equals(this.suppressionConditions, other.suppressionConditions) && super.equals(other); } @@ -545,6 +609,11 @@ public int hashCode() { + (this.timeEffectiveUntil == null ? 43 : this.timeEffectiveUntil.hashCode()); + result = + (result * PRIME) + + (this.suppressionConditions == null + ? 43 + : this.suppressionConditions.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppressionSummary.java b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppressionSummary.java index fed027bc7bf..7bf7f0f0613 100644 --- a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppressionSummary.java +++ b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppressionSummary.java @@ -5,7 +5,7 @@ package com.oracle.bmc.monitoring.model; /** - * A summary of properties for the specified dimension-specific alarm suppression. + * A summary of properties for the specified alarm suppression. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -27,6 +27,8 @@ public final class AlarmSuppressionSummary "id", "compartmentId", "alarmSuppressionTarget", + "level", + "suppressionConditions", "displayName", "description", "dimensions", @@ -42,6 +44,8 @@ public AlarmSuppressionSummary( String id, String compartmentId, AlarmSuppressionTarget alarmSuppressionTarget, + AlarmSuppression.Level level, + java.util.List suppressionConditions, String displayName, String description, java.util.Map dimensions, @@ -56,6 +60,8 @@ public AlarmSuppressionSummary( this.id = id; this.compartmentId = compartmentId; this.alarmSuppressionTarget = alarmSuppressionTarget; + this.level = level; + this.suppressionConditions = suppressionConditions; this.displayName = displayName; this.description = description; this.dimensions = dimensions; @@ -111,6 +117,57 @@ public Builder alarmSuppressionTarget(AlarmSuppressionTarget alarmSuppressionTar this.__explicitlySet__.add("alarmSuppressionTarget"); return this; } + /** + * The level of this alarm suppression. + * {@code ALARM} indicates a suppression of the entire alarm, regardless of dimension. + * {@code DIMENSION} indicates a suppression configured for specified dimensions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("level") + private AlarmSuppression.Level level; + + /** + * The level of this alarm suppression. + * {@code ALARM} indicates a suppression of the entire alarm, regardless of dimension. + * {@code DIMENSION} indicates a suppression configured for specified dimensions. + * + * @param level the value to set + * @return this builder + **/ + public Builder level(AlarmSuppression.Level level) { + this.level = level; + this.__explicitlySet__.add("level"); + return this; + } + /** + * Array of all preconditions for alarm suppression. + * Example: {@code [{ + * conditionType: "RECURRENCE", + * suppressionRecurrence: "FRQ=DAILY;BYHOUR=10", + * suppressionDuration: "PT1H" + * }]} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("suppressionConditions") + private java.util.List suppressionConditions; + + /** + * Array of all preconditions for alarm suppression. + * Example: {@code [{ + * conditionType: "RECURRENCE", + * suppressionRecurrence: "FRQ=DAILY;BYHOUR=10", + * suppressionDuration: "PT1H" + * }]} + * + * @param suppressionConditions the value to set + * @return this builder + **/ + public Builder suppressionConditions( + java.util.List suppressionConditions) { + this.suppressionConditions = suppressionConditions; + this.__explicitlySet__.add("suppressionConditions"); + return this; + } /** * A user-friendly name for the alarm suppression. It does not have to be unique, and it's changeable. Avoid entering confidential information. **/ @@ -342,6 +399,8 @@ public AlarmSuppressionSummary build() { this.id, this.compartmentId, this.alarmSuppressionTarget, + this.level, + this.suppressionConditions, this.displayName, this.description, this.dimensions, @@ -369,6 +428,12 @@ public Builder copy(AlarmSuppressionSummary model) { if (model.wasPropertyExplicitlySet("alarmSuppressionTarget")) { this.alarmSuppressionTarget(model.getAlarmSuppressionTarget()); } + if (model.wasPropertyExplicitlySet("level")) { + this.level(model.getLevel()); + } + if (model.wasPropertyExplicitlySet("suppressionConditions")) { + this.suppressionConditions(model.getSuppressionConditions()); + } if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } @@ -449,6 +514,52 @@ public AlarmSuppressionTarget getAlarmSuppressionTarget() { return alarmSuppressionTarget; } + /** + * The level of this alarm suppression. + * {@code ALARM} indicates a suppression of the entire alarm, regardless of dimension. + * {@code DIMENSION} indicates a suppression configured for specified dimensions. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("level") + private final AlarmSuppression.Level level; + + /** + * The level of this alarm suppression. + * {@code ALARM} indicates a suppression of the entire alarm, regardless of dimension. + * {@code DIMENSION} indicates a suppression configured for specified dimensions. + * + * @return the value + **/ + public AlarmSuppression.Level getLevel() { + return level; + } + + /** + * Array of all preconditions for alarm suppression. + * Example: {@code [{ + * conditionType: "RECURRENCE", + * suppressionRecurrence: "FRQ=DAILY;BYHOUR=10", + * suppressionDuration: "PT1H" + * }]} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("suppressionConditions") + private final java.util.List suppressionConditions; + + /** + * Array of all preconditions for alarm suppression. + * Example: {@code [{ + * conditionType: "RECURRENCE", + * suppressionRecurrence: "FRQ=DAILY;BYHOUR=10", + * suppressionDuration: "PT1H" + * }]} + * + * @return the value + **/ + public java.util.List getSuppressionConditions() { + return suppressionConditions; + } + /** * A user-friendly name for the alarm suppression. It does not have to be unique, and it's changeable. Avoid entering confidential information. **/ @@ -666,6 +777,8 @@ public String toString(boolean includeByteArrayContents) { sb.append("id=").append(String.valueOf(this.id)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", alarmSuppressionTarget=").append(String.valueOf(this.alarmSuppressionTarget)); + sb.append(", level=").append(String.valueOf(this.level)); + sb.append(", suppressionConditions=").append(String.valueOf(this.suppressionConditions)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", dimensions=").append(String.valueOf(this.dimensions)); @@ -694,6 +807,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals( this.alarmSuppressionTarget, other.alarmSuppressionTarget) + && java.util.Objects.equals(this.level, other.level) + && java.util.Objects.equals(this.suppressionConditions, other.suppressionConditions) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.dimensions, other.dimensions) @@ -720,6 +835,12 @@ public int hashCode() { + (this.alarmSuppressionTarget == null ? 43 : this.alarmSuppressionTarget.hashCode()); + result = (result * PRIME) + (this.level == null ? 43 : this.level.hashCode()); + result = + (result * PRIME) + + (this.suppressionConditions == null + ? 43 + : this.suppressionConditions.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); result = (result * PRIME) + (this.dimensions == null ? 43 : this.dimensions.hashCode()); diff --git a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppressionTarget.java b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppressionTarget.java index b5d5b67ec97..3c68f73cd69 100644 --- a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppressionTarget.java +++ b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/AlarmSuppressionTarget.java @@ -25,6 +25,10 @@ @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = AlarmSuppressionAlarmTarget.class, name = "ALARM" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = AlarmSuppressionCompartmentTarget.class, + name = "COMPARTMENT" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) @@ -79,6 +83,7 @@ public int hashCode() { **/ public enum TargetType { Alarm("ALARM"), + Compartment("COMPARTMENT"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/CreateAlarmSuppressionDetails.java b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/CreateAlarmSuppressionDetails.java index 6494d7dbc03..b6660c713aa 100644 --- a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/CreateAlarmSuppressionDetails.java +++ b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/CreateAlarmSuppressionDetails.java @@ -5,7 +5,7 @@ package com.oracle.bmc.monitoring.model; /** - * The configuration details for creating a dimension-specific alarm suppression. + * The configuration details for creating an alarm suppression. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -25,25 +25,30 @@ public final class CreateAlarmSuppressionDetails @Deprecated @java.beans.ConstructorProperties({ "alarmSuppressionTarget", + "level", "displayName", "description", "dimensions", "timeSuppressFrom", "timeSuppressUntil", "freeformTags", - "definedTags" + "definedTags", + "suppressionConditions" }) public CreateAlarmSuppressionDetails( AlarmSuppressionTarget alarmSuppressionTarget, + AlarmSuppression.Level level, String displayName, String description, java.util.Map dimensions, java.util.Date timeSuppressFrom, java.util.Date timeSuppressUntil, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.List suppressionConditions) { super(); this.alarmSuppressionTarget = alarmSuppressionTarget; + this.level = level; this.displayName = displayName; this.description = description; this.dimensions = dimensions; @@ -51,6 +56,7 @@ public CreateAlarmSuppressionDetails( this.timeSuppressUntil = timeSuppressUntil; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.suppressionConditions = suppressionConditions; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -64,6 +70,32 @@ public Builder alarmSuppressionTarget(AlarmSuppressionTarget alarmSuppressionTar this.__explicitlySet__.add("alarmSuppressionTarget"); return this; } + /** + * The level of this alarm suppression. + * {@code ALARM} indicates a suppression of the entire alarm, regardless of dimension. + * {@code DIMENSION} indicates a suppression configured for specified dimensions. + *

+ * Defaut: {@code DIMENSION} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("level") + private AlarmSuppression.Level level; + + /** + * The level of this alarm suppression. + * {@code ALARM} indicates a suppression of the entire alarm, regardless of dimension. + * {@code DIMENSION} indicates a suppression configured for specified dimensions. + *

+ * Defaut: {@code DIMENSION} + * + * @param level the value to set + * @return this builder + **/ + public Builder level(AlarmSuppression.Level level) { + this.level = level; + this.__explicitlySet__.add("level"); + return this; + } /** * A user-friendly name for the alarm suppression. It does not have to be unique, and it's changeable. Avoid entering confidential information. **/ @@ -118,7 +150,7 @@ public Builder description(String description) { * and the alarm state entry corresponds to the set {"availabilityDomain": "phx-ad-1" and "resourceId": "ocid1.instance.region1.phx.exampleuniqueID"}, * then this alarm will be included for suppression. *

- * The value cannot be an empty object. + * This is required only when the value of level is {@code DIMENSION}. If required, the value cannot be an empty object. * Only a single value is allowed per key. No grouping of multiple values is allowed under the same key. * Maximum characters (after serialization): 4000. This maximum satisfies typical use cases. * The response for an exceeded maximum is {@code HTTP 400} with an "dimensions values are too long" message. @@ -133,7 +165,7 @@ public Builder description(String description) { * and the alarm state entry corresponds to the set {"availabilityDomain": "phx-ad-1" and "resourceId": "ocid1.instance.region1.phx.exampleuniqueID"}, * then this alarm will be included for suppression. *

- * The value cannot be an empty object. + * This is required only when the value of level is {@code DIMENSION}. If required, the value cannot be an empty object. * Only a single value is allowed per key. No grouping of multiple values is allowed under the same key. * Maximum characters (after serialization): 4000. This maximum satisfies typical use cases. * The response for an exceeded maximum is {@code HTTP 400} with an "dimensions values are too long" message. @@ -231,6 +263,35 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Array of all preconditions for alarm suppression. + * Example: {@code [{ + * conditionType: "RECURRENCE", + * suppressionRecurrence: "FRQ=DAILY;BYHOUR=10", + * suppressionDuration: "PT1H" + * }]} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("suppressionConditions") + private java.util.List suppressionConditions; + + /** + * Array of all preconditions for alarm suppression. + * Example: {@code [{ + * conditionType: "RECURRENCE", + * suppressionRecurrence: "FRQ=DAILY;BYHOUR=10", + * suppressionDuration: "PT1H" + * }]} + * + * @param suppressionConditions the value to set + * @return this builder + **/ + public Builder suppressionConditions( + java.util.List suppressionConditions) { + this.suppressionConditions = suppressionConditions; + this.__explicitlySet__.add("suppressionConditions"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -239,13 +300,15 @@ public CreateAlarmSuppressionDetails build() { CreateAlarmSuppressionDetails model = new CreateAlarmSuppressionDetails( this.alarmSuppressionTarget, + this.level, this.displayName, this.description, this.dimensions, this.timeSuppressFrom, this.timeSuppressUntil, this.freeformTags, - this.definedTags); + this.definedTags, + this.suppressionConditions); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -257,6 +320,9 @@ public Builder copy(CreateAlarmSuppressionDetails model) { if (model.wasPropertyExplicitlySet("alarmSuppressionTarget")) { this.alarmSuppressionTarget(model.getAlarmSuppressionTarget()); } + if (model.wasPropertyExplicitlySet("level")) { + this.level(model.getLevel()); + } if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } @@ -278,6 +344,9 @@ public Builder copy(CreateAlarmSuppressionDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("suppressionConditions")) { + this.suppressionConditions(model.getSuppressionConditions()); + } return this; } } @@ -300,6 +369,30 @@ public AlarmSuppressionTarget getAlarmSuppressionTarget() { return alarmSuppressionTarget; } + /** + * The level of this alarm suppression. + * {@code ALARM} indicates a suppression of the entire alarm, regardless of dimension. + * {@code DIMENSION} indicates a suppression configured for specified dimensions. + *

+ * Defaut: {@code DIMENSION} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("level") + private final AlarmSuppression.Level level; + + /** + * The level of this alarm suppression. + * {@code ALARM} indicates a suppression of the entire alarm, regardless of dimension. + * {@code DIMENSION} indicates a suppression configured for specified dimensions. + *

+ * Defaut: {@code DIMENSION} + * + * @return the value + **/ + public AlarmSuppression.Level getLevel() { + return level; + } + /** * A user-friendly name for the alarm suppression. It does not have to be unique, and it's changeable. Avoid entering confidential information. **/ @@ -350,7 +443,7 @@ public String getDescription() { * and the alarm state entry corresponds to the set {"availabilityDomain": "phx-ad-1" and "resourceId": "ocid1.instance.region1.phx.exampleuniqueID"}, * then this alarm will be included for suppression. *

- * The value cannot be an empty object. + * This is required only when the value of level is {@code DIMENSION}. If required, the value cannot be an empty object. * Only a single value is allowed per key. No grouping of multiple values is allowed under the same key. * Maximum characters (after serialization): 4000. This maximum satisfies typical use cases. * The response for an exceeded maximum is {@code HTTP 400} with an "dimensions values are too long" message. @@ -365,7 +458,7 @@ public String getDescription() { * and the alarm state entry corresponds to the set {"availabilityDomain": "phx-ad-1" and "resourceId": "ocid1.instance.region1.phx.exampleuniqueID"}, * then this alarm will be included for suppression. *

- * The value cannot be an empty object. + * This is required only when the value of level is {@code DIMENSION}. If required, the value cannot be an empty object. * Only a single value is allowed per key. No grouping of multiple values is allowed under the same key. * Maximum characters (after serialization): 4000. This maximum satisfies typical use cases. * The response for an exceeded maximum is {@code HTTP 400} with an "dimensions values are too long" message. @@ -452,6 +545,32 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Array of all preconditions for alarm suppression. + * Example: {@code [{ + * conditionType: "RECURRENCE", + * suppressionRecurrence: "FRQ=DAILY;BYHOUR=10", + * suppressionDuration: "PT1H" + * }]} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("suppressionConditions") + private final java.util.List suppressionConditions; + + /** + * Array of all preconditions for alarm suppression. + * Example: {@code [{ + * conditionType: "RECURRENCE", + * suppressionRecurrence: "FRQ=DAILY;BYHOUR=10", + * suppressionDuration: "PT1H" + * }]} + * + * @return the value + **/ + public java.util.List getSuppressionConditions() { + return suppressionConditions; + } + @Override public String toString() { return this.toString(true); @@ -467,6 +586,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("CreateAlarmSuppressionDetails("); sb.append("super=").append(super.toString()); sb.append("alarmSuppressionTarget=").append(String.valueOf(this.alarmSuppressionTarget)); + sb.append(", level=").append(String.valueOf(this.level)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", description=").append(String.valueOf(this.description)); sb.append(", dimensions=").append(String.valueOf(this.dimensions)); @@ -474,6 +594,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeSuppressUntil=").append(String.valueOf(this.timeSuppressUntil)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", suppressionConditions=").append(String.valueOf(this.suppressionConditions)); sb.append(")"); return sb.toString(); } @@ -489,6 +610,7 @@ public boolean equals(Object o) { CreateAlarmSuppressionDetails other = (CreateAlarmSuppressionDetails) o; return java.util.Objects.equals(this.alarmSuppressionTarget, other.alarmSuppressionTarget) + && java.util.Objects.equals(this.level, other.level) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.description, other.description) && java.util.Objects.equals(this.dimensions, other.dimensions) @@ -496,6 +618,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeSuppressUntil, other.timeSuppressUntil) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.suppressionConditions, other.suppressionConditions) && super.equals(other); } @@ -508,6 +631,7 @@ public int hashCode() { + (this.alarmSuppressionTarget == null ? 43 : this.alarmSuppressionTarget.hashCode()); + result = (result * PRIME) + (this.level == null ? 43 : this.level.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); result = (result * PRIME) + (this.dimensions == null ? 43 : this.dimensions.hashCode()); @@ -519,6 +643,11 @@ public int hashCode() { + (this.timeSuppressUntil == null ? 43 : this.timeSuppressUntil.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.suppressionConditions == null + ? 43 + : this.suppressionConditions.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/Recurrence.java b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/Recurrence.java new file mode 100644 index 00000000000..d12d1b77268 --- /dev/null +++ b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/Recurrence.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.monitoring.model; + +/** + * Alarm suppression recurring schedule. Only one recurrence condition is supported within the list of preconditions for a suppression ({@code suppressionConditions}). + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180401") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Recurrence.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "conditionType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Recurrence extends SuppressionCondition { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Frequency and start time of the recurring suppression. The format follows + * [the iCalendar specification (RFC 5545, section 3.3.10)](https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10). + * Supported rule parts: + * * {@code FREQ}: Frequency of the recurring suppression: {@code WEEKLY} or {@code DAILY} only. + * * {@code BYDAY}: Comma separated days. Use with weekly suppressions only. Supported values: {@code MO}, {@code TU}, {@code WE}, {@code TH}, {@code FR}, {@code SA} ,{@code SU}. + * * {@code BYHOUR}, {@code BYMINUTE}, {@code BYSECOND}: Start time in UTC, after {@code timeSuppressFrom} value. Default is 00:00:00 UTC after {@code timeSuppressFrom}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("suppressionRecurrence") + private String suppressionRecurrence; + + /** + * Frequency and start time of the recurring suppression. The format follows + * [the iCalendar specification (RFC 5545, section 3.3.10)](https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10). + * Supported rule parts: + * * {@code FREQ}: Frequency of the recurring suppression: {@code WEEKLY} or {@code DAILY} only. + * * {@code BYDAY}: Comma separated days. Use with weekly suppressions only. Supported values: {@code MO}, {@code TU}, {@code WE}, {@code TH}, {@code FR}, {@code SA} ,{@code SU}. + * * {@code BYHOUR}, {@code BYMINUTE}, {@code BYSECOND}: Start time in UTC, after {@code timeSuppressFrom} value. Default is 00:00:00 UTC after {@code timeSuppressFrom}. + * + * @param suppressionRecurrence the value to set + * @return this builder + **/ + public Builder suppressionRecurrence(String suppressionRecurrence) { + this.suppressionRecurrence = suppressionRecurrence; + this.__explicitlySet__.add("suppressionRecurrence"); + return this; + } + /** + * Duration of the recurring suppression. Specified as a string in ISO 8601 format. Minimum: {@code PT1M} (1 minute). Maximum: {@code PT24H} (24 hours). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("suppressionDuration") + private String suppressionDuration; + + /** + * Duration of the recurring suppression. Specified as a string in ISO 8601 format. Minimum: {@code PT1M} (1 minute). Maximum: {@code PT24H} (24 hours). + * + * @param suppressionDuration the value to set + * @return this builder + **/ + public Builder suppressionDuration(String suppressionDuration) { + this.suppressionDuration = suppressionDuration; + this.__explicitlySet__.add("suppressionDuration"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Recurrence build() { + Recurrence model = new Recurrence(this.suppressionRecurrence, this.suppressionDuration); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Recurrence model) { + if (model.wasPropertyExplicitlySet("suppressionRecurrence")) { + this.suppressionRecurrence(model.getSuppressionRecurrence()); + } + if (model.wasPropertyExplicitlySet("suppressionDuration")) { + this.suppressionDuration(model.getSuppressionDuration()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public Recurrence(String suppressionRecurrence, String suppressionDuration) { + super(); + this.suppressionRecurrence = suppressionRecurrence; + this.suppressionDuration = suppressionDuration; + } + + /** + * Frequency and start time of the recurring suppression. The format follows + * [the iCalendar specification (RFC 5545, section 3.3.10)](https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10). + * Supported rule parts: + * * {@code FREQ}: Frequency of the recurring suppression: {@code WEEKLY} or {@code DAILY} only. + * * {@code BYDAY}: Comma separated days. Use with weekly suppressions only. Supported values: {@code MO}, {@code TU}, {@code WE}, {@code TH}, {@code FR}, {@code SA} ,{@code SU}. + * * {@code BYHOUR}, {@code BYMINUTE}, {@code BYSECOND}: Start time in UTC, after {@code timeSuppressFrom} value. Default is 00:00:00 UTC after {@code timeSuppressFrom}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("suppressionRecurrence") + private final String suppressionRecurrence; + + /** + * Frequency and start time of the recurring suppression. The format follows + * [the iCalendar specification (RFC 5545, section 3.3.10)](https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10). + * Supported rule parts: + * * {@code FREQ}: Frequency of the recurring suppression: {@code WEEKLY} or {@code DAILY} only. + * * {@code BYDAY}: Comma separated days. Use with weekly suppressions only. Supported values: {@code MO}, {@code TU}, {@code WE}, {@code TH}, {@code FR}, {@code SA} ,{@code SU}. + * * {@code BYHOUR}, {@code BYMINUTE}, {@code BYSECOND}: Start time in UTC, after {@code timeSuppressFrom} value. Default is 00:00:00 UTC after {@code timeSuppressFrom}. + * + * @return the value + **/ + public String getSuppressionRecurrence() { + return suppressionRecurrence; + } + + /** + * Duration of the recurring suppression. Specified as a string in ISO 8601 format. Minimum: {@code PT1M} (1 minute). Maximum: {@code PT24H} (24 hours). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("suppressionDuration") + private final String suppressionDuration; + + /** + * Duration of the recurring suppression. Specified as a string in ISO 8601 format. Minimum: {@code PT1M} (1 minute). Maximum: {@code PT24H} (24 hours). + * + * @return the value + **/ + public String getSuppressionDuration() { + return suppressionDuration; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Recurrence("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", suppressionRecurrence=").append(String.valueOf(this.suppressionRecurrence)); + sb.append(", suppressionDuration=").append(String.valueOf(this.suppressionDuration)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Recurrence)) { + return false; + } + + Recurrence other = (Recurrence) o; + return java.util.Objects.equals(this.suppressionRecurrence, other.suppressionRecurrence) + && java.util.Objects.equals(this.suppressionDuration, other.suppressionDuration) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.suppressionRecurrence == null + ? 43 + : this.suppressionRecurrence.hashCode()); + result = + (result * PRIME) + + (this.suppressionDuration == null + ? 43 + : this.suppressionDuration.hashCode()); + return result; + } +} diff --git a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/Suppression.java b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/Suppression.java index fc451162ffa..9a6a85e0186 100644 --- a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/Suppression.java +++ b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/Suppression.java @@ -7,6 +7,7 @@ /** * The configuration details for an alarm-wide suppression. * For dimension-specific suppressions, see {@link AlarmSuppression}. + *

* For information about alarms, see * [Alarms Overview](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#AlarmsOverview). * diff --git a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/SuppressionCondition.java b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/SuppressionCondition.java new file mode 100644 index 00000000000..b618dfaa037 --- /dev/null +++ b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/model/SuppressionCondition.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.monitoring.model; + +/** + * Precondition for an alarm suppression within the suppression date and time range ({@code timeSuppressFrom} to {@code timeSuppressUntil}). + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180401") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "conditionType", + defaultImpl = SuppressionCondition.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = Recurrence.class, + name = "RECURRENCE" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class SuppressionCondition extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected SuppressionCondition() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SuppressionCondition("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SuppressionCondition)) { + return false; + } + + SuppressionCondition other = (SuppressionCondition) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Type of suppression condition. + **/ + public enum ConditionType { + Recurrence("RECURRENCE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ConditionType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ConditionType v : ConditionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ConditionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ConditionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ConditionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/requests/ListAlarmSuppressionsRequest.java b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/requests/ListAlarmSuppressionsRequest.java index 895beec7613..9f9e00bb006 100644 --- a/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/requests/ListAlarmSuppressionsRequest.java +++ b/bmc-monitoring/src/main/java/com/oracle/bmc/monitoring/requests/ListAlarmSuppressionsRequest.java @@ -12,17 +12,6 @@ public class ListAlarmSuppressionsRequest extends com.oracle.bmc.requests.BmcRequest { - /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the alarm that is the target of the alarm suppression. - */ - private String alarmId; - - /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the alarm that is the target of the alarm suppression. - */ - public String getAlarmId() { - return alarmId; - } /** * Customer part of the request identifier token. If you need to contact Oracle about a particular * request, please provide the complete request ID. @@ -38,9 +27,20 @@ public String getAlarmId() { public String getOpcRequestId() { return opcRequestId; } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the alarm that is the target of the alarm suppression. + */ + private String alarmId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the alarm that is the target of the alarm suppression. + */ + public String getAlarmId() { + return alarmId; + } /** * A filter to return only resources that match the given display name exactly. - * Use this filter to list a alarm suppression by name. + * Use this filter to list an alarm suppression by name. * Alternatively, when you know the alarm suppression OCID, use the GetAlarmSuppression operation. * */ @@ -48,7 +48,7 @@ public String getOpcRequestId() { /** * A filter to return only resources that match the given display name exactly. - * Use this filter to list a alarm suppression by name. + * Use this filter to list an alarm suppression by name. * Alternatively, when you know the alarm suppression OCID, use the GetAlarmSuppression operation. * */ @@ -68,6 +68,150 @@ public String getDisplayName() { public com.oracle.bmc.monitoring.model.AlarmSuppression.LifecycleState getLifecycleState() { return lifecycleState; } + /** + * The level of this alarm suppression. + * {@code ALARM} indicates a suppression of the entire alarm, regardless of dimension. + * {@code DIMENSION} indicates a suppression configured for specified dimensions. + * + */ + private com.oracle.bmc.monitoring.model.AlarmSuppression.Level level; + + /** + * The level of this alarm suppression. + * {@code ALARM} indicates a suppression of the entire alarm, regardless of dimension. + * {@code DIMENSION} indicates a suppression configured for specified dimensions. + * + */ + public com.oracle.bmc.monitoring.model.AlarmSuppression.Level getLevel() { + return level; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for searching. + * Use the tenancy OCID to search in the root compartment. + *

+ * If targetType is not specified, searches all suppressions defined under the compartment. + * If targetType is {@code COMPARTMENT}, searches suppressions in the specified compartment only. + *

+ * Example: {@code ocid1.compartment.oc1..exampleuniqueID} + * + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for searching. + * Use the tenancy OCID to search in the root compartment. + *

+ * If targetType is not specified, searches all suppressions defined under the compartment. + * If targetType is {@code COMPARTMENT}, searches suppressions in the specified compartment only. + *

+ * Example: {@code ocid1.compartment.oc1..exampleuniqueID} + * + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * When true, returns resources from all compartments and subcompartments. The parameter can + * only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). + * A true value requires the user to have tenancy-level permissions. If this requirement is not met, + * then the call is rejected. When false, returns resources from only the compartment specified in + * compartmentId. Default is false. + * + */ + private Boolean compartmentIdInSubtree; + + /** + * When true, returns resources from all compartments and subcompartments. The parameter can + * only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). + * A true value requires the user to have tenancy-level permissions. If this requirement is not met, + * then the call is rejected. When false, returns resources from only the compartment specified in + * compartmentId. Default is false. + * + */ + public Boolean getCompartmentIdInSubtree() { + return compartmentIdInSubtree; + } + /** + * The target type to use when listing alarm suppressions. + * {@code ALARM} lists all suppression records for the specified alarm. + * {@code COMPARTMENT} lists all suppression records for the specified compartment or tenancy. + * + */ + private TargetType targetType; + + /** + * The target type to use when listing alarm suppressions. + * {@code ALARM} lists all suppression records for the specified alarm. + * {@code COMPARTMENT} lists all suppression records for the specified compartment or tenancy. + * + **/ + public enum TargetType { + Alarm("ALARM"), + Compartment("COMPARTMENT"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (TargetType v : TargetType.values()) { + map.put(v.getValue(), v); + } + } + + TargetType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static TargetType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid TargetType: " + key); + } + }; + + /** + * The target type to use when listing alarm suppressions. + * {@code ALARM} lists all suppression records for the specified alarm. + * {@code COMPARTMENT} lists all suppression records for the specified compartment or tenancy. + * + */ + public TargetType getTargetType() { + return targetType; + } + /** + * Setting this parameter to true requires the query to specify the alarm ({@code alarmId}). + *

+ * When true, lists all alarm suppressions that affect the specified alarm, + * including suppressions that target the corresponding compartment or tenancy. + * When false, lists only the alarm suppressions that target the specified alarm. + *

+ * Default is false. + * + */ + private Boolean isAllSuppressions; + + /** + * Setting this parameter to true requires the query to specify the alarm ({@code alarmId}). + *

+ * When true, lists all alarm suppressions that affect the specified alarm, + * including suppressions that target the corresponding compartment or tenancy. + * When false, lists only the alarm suppressions that target the specified alarm. + *

+ * Default is false. + * + */ + public Boolean getIsAllSuppressions() { + return isAllSuppressions; + } /** * The field to use when sorting returned alarm suppressions. Only one sorting level is provided. *

@@ -231,21 +375,6 @@ public static class Builder invocationCallback = null; private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; - /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the alarm that is the target of the alarm suppression. - */ - private String alarmId = null; - - /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the alarm that is the target of the alarm suppression. - * @param alarmId the value to set - * @return this builder instance - */ - public Builder alarmId(String alarmId) { - this.alarmId = alarmId; - return this; - } - /** * Customer part of the request identifier token. If you need to contact Oracle about a particular * request, please provide the complete request ID. @@ -265,9 +394,24 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the alarm that is the target of the alarm suppression. + */ + private String alarmId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the alarm that is the target of the alarm suppression. + * @param alarmId the value to set + * @return this builder instance + */ + public Builder alarmId(String alarmId) { + this.alarmId = alarmId; + return this; + } + /** * A filter to return only resources that match the given display name exactly. - * Use this filter to list a alarm suppression by name. + * Use this filter to list an alarm suppression by name. * Alternatively, when you know the alarm suppression OCID, use the GetAlarmSuppression operation. * */ @@ -275,7 +419,7 @@ public Builder opcRequestId(String opcRequestId) { /** * A filter to return only resources that match the given display name exactly. - * Use this filter to list a alarm suppression by name. + * Use this filter to list an alarm suppression by name. * Alternatively, when you know the alarm suppression OCID, use the GetAlarmSuppression operation. * * @param displayName the value to set @@ -305,6 +449,131 @@ public Builder lifecycleState( return this; } + /** + * The level of this alarm suppression. + * {@code ALARM} indicates a suppression of the entire alarm, regardless of dimension. + * {@code DIMENSION} indicates a suppression configured for specified dimensions. + * + */ + private com.oracle.bmc.monitoring.model.AlarmSuppression.Level level = null; + + /** + * The level of this alarm suppression. + * {@code ALARM} indicates a suppression of the entire alarm, regardless of dimension. + * {@code DIMENSION} indicates a suppression configured for specified dimensions. + * + * @param level the value to set + * @return this builder instance + */ + public Builder level(com.oracle.bmc.monitoring.model.AlarmSuppression.Level level) { + this.level = level; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for searching. + * Use the tenancy OCID to search in the root compartment. + *

+ * If targetType is not specified, searches all suppressions defined under the compartment. + * If targetType is {@code COMPARTMENT}, searches suppressions in the specified compartment only. + *

+ * Example: {@code ocid1.compartment.oc1..exampleuniqueID} + * + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for searching. + * Use the tenancy OCID to search in the root compartment. + *

+ * If targetType is not specified, searches all suppressions defined under the compartment. + * If targetType is {@code COMPARTMENT}, searches suppressions in the specified compartment only. + *

+ * Example: {@code ocid1.compartment.oc1..exampleuniqueID} + * + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * When true, returns resources from all compartments and subcompartments. The parameter can + * only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). + * A true value requires the user to have tenancy-level permissions. If this requirement is not met, + * then the call is rejected. When false, returns resources from only the compartment specified in + * compartmentId. Default is false. + * + */ + private Boolean compartmentIdInSubtree = null; + + /** + * When true, returns resources from all compartments and subcompartments. The parameter can + * only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). + * A true value requires the user to have tenancy-level permissions. If this requirement is not met, + * then the call is rejected. When false, returns resources from only the compartment specified in + * compartmentId. Default is false. + * + * @param compartmentIdInSubtree the value to set + * @return this builder instance + */ + public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { + this.compartmentIdInSubtree = compartmentIdInSubtree; + return this; + } + + /** + * The target type to use when listing alarm suppressions. + * {@code ALARM} lists all suppression records for the specified alarm. + * {@code COMPARTMENT} lists all suppression records for the specified compartment or tenancy. + * + */ + private TargetType targetType = null; + + /** + * The target type to use when listing alarm suppressions. + * {@code ALARM} lists all suppression records for the specified alarm. + * {@code COMPARTMENT} lists all suppression records for the specified compartment or tenancy. + * + * @param targetType the value to set + * @return this builder instance + */ + public Builder targetType(TargetType targetType) { + this.targetType = targetType; + return this; + } + + /** + * Setting this parameter to true requires the query to specify the alarm ({@code alarmId}). + *

+ * When true, lists all alarm suppressions that affect the specified alarm, + * including suppressions that target the corresponding compartment or tenancy. + * When false, lists only the alarm suppressions that target the specified alarm. + *

+ * Default is false. + * + */ + private Boolean isAllSuppressions = null; + + /** + * Setting this parameter to true requires the query to specify the alarm ({@code alarmId}). + *

+ * When true, lists all alarm suppressions that affect the specified alarm, + * including suppressions that target the corresponding compartment or tenancy. + * When false, lists only the alarm suppressions that target the specified alarm. + *

+ * Default is false. + * + * @param isAllSuppressions the value to set + * @return this builder instance + */ + public Builder isAllSuppressions(Boolean isAllSuppressions) { + this.isAllSuppressions = isAllSuppressions; + return this; + } + /** * The field to use when sorting returned alarm suppressions. Only one sorting level is provided. *

@@ -425,10 +694,15 @@ public Builder retryConfiguration( * @return this builder instance */ public Builder copy(ListAlarmSuppressionsRequest o) { - alarmId(o.getAlarmId()); opcRequestId(o.getOpcRequestId()); + alarmId(o.getAlarmId()); displayName(o.getDisplayName()); lifecycleState(o.getLifecycleState()); + level(o.getLevel()); + compartmentId(o.getCompartmentId()); + compartmentIdInSubtree(o.getCompartmentIdInSubtree()); + targetType(o.getTargetType()); + isAllSuppressions(o.getIsAllSuppressions()); sortBy(o.getSortBy()); sortOrder(o.getSortOrder()); page(o.getPage()); @@ -465,16 +739,21 @@ public ListAlarmSuppressionsRequest build() { */ public ListAlarmSuppressionsRequest buildWithoutInvocationCallback() { ListAlarmSuppressionsRequest request = new ListAlarmSuppressionsRequest(); - request.alarmId = alarmId; request.opcRequestId = opcRequestId; + request.alarmId = alarmId; request.displayName = displayName; request.lifecycleState = lifecycleState; + request.level = level; + request.compartmentId = compartmentId; + request.compartmentIdInSubtree = compartmentIdInSubtree; + request.targetType = targetType; + request.isAllSuppressions = isAllSuppressions; request.sortBy = sortBy; request.sortOrder = sortOrder; request.page = page; request.limit = limit; return request; - // new ListAlarmSuppressionsRequest(alarmId, opcRequestId, displayName, lifecycleState, sortBy, sortOrder, page, limit); + // new ListAlarmSuppressionsRequest(opcRequestId, alarmId, displayName, lifecycleState, level, compartmentId, compartmentIdInSubtree, targetType, isAllSuppressions, sortBy, sortOrder, page, limit); } } @@ -484,10 +763,15 @@ public ListAlarmSuppressionsRequest buildWithoutInvocationCallback() { */ public Builder toBuilder() { return new Builder() - .alarmId(alarmId) .opcRequestId(opcRequestId) + .alarmId(alarmId) .displayName(displayName) .lifecycleState(lifecycleState) + .level(level) + .compartmentId(compartmentId) + .compartmentIdInSubtree(compartmentIdInSubtree) + .targetType(targetType) + .isAllSuppressions(isAllSuppressions) .sortBy(sortBy) .sortOrder(sortOrder) .page(page) @@ -507,10 +791,15 @@ public String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("("); sb.append("super=").append(super.toString()); - sb.append(",alarmId=").append(String.valueOf(this.alarmId)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",alarmId=").append(String.valueOf(this.alarmId)); sb.append(",displayName=").append(String.valueOf(this.displayName)); sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",level=").append(String.valueOf(this.level)); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",compartmentIdInSubtree=").append(String.valueOf(this.compartmentIdInSubtree)); + sb.append(",targetType=").append(String.valueOf(this.targetType)); + sb.append(",isAllSuppressions=").append(String.valueOf(this.isAllSuppressions)); sb.append(",sortBy=").append(String.valueOf(this.sortBy)); sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); sb.append(",page=").append(String.valueOf(this.page)); @@ -530,10 +819,16 @@ public boolean equals(Object o) { ListAlarmSuppressionsRequest other = (ListAlarmSuppressionsRequest) o; return super.equals(o) - && java.util.Objects.equals(this.alarmId, other.alarmId) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.alarmId, other.alarmId) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.level, other.level) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals( + this.compartmentIdInSubtree, other.compartmentIdInSubtree) + && java.util.Objects.equals(this.targetType, other.targetType) + && java.util.Objects.equals(this.isAllSuppressions, other.isAllSuppressions) && java.util.Objects.equals(this.sortBy, other.sortBy) && java.util.Objects.equals(this.sortOrder, other.sortOrder) && java.util.Objects.equals(this.page, other.page) @@ -544,12 +839,25 @@ public boolean equals(Object o) { public int hashCode() { final int PRIME = 59; int result = super.hashCode(); - result = (result * PRIME) + (this.alarmId == null ? 43 : this.alarmId.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.alarmId == null ? 43 : this.alarmId.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.level == null ? 43 : this.level.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.compartmentIdInSubtree == null + ? 43 + : this.compartmentIdInSubtree.hashCode()); + result = (result * PRIME) + (this.targetType == null ? 43 : this.targetType.hashCode()); + result = + (result * PRIME) + + (this.isAllSuppressions == null ? 43 : this.isAllSuppressions.hashCode()); result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); diff --git a/bmc-mysql/pom.xml b/bmc-mysql/pom.xml index 4be18697efc..44726d33dce 100644 --- a/bmc-mysql/pom.xml +++ b/bmc-mysql/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-mysql @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/CreateDbSystemDetails.java b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/CreateDbSystemDetails.java index 57357389ca0..2fc4a9b7f7c 100644 --- a/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/CreateDbSystemDetails.java +++ b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/CreateDbSystemDetails.java @@ -37,6 +37,7 @@ public final class CreateDbSystemDetails "adminUsername", "adminPassword", "dataStorageSizeInGBs", + "dataStorage", "hostnameLabel", "ipAddress", "port", @@ -49,7 +50,8 @@ public final class CreateDbSystemDetails "deletionPolicy", "crashRecovery", "databaseManagement", - "secureConnections" + "secureConnections", + "customerContacts" }) public CreateDbSystemDetails( String displayName, @@ -65,6 +67,7 @@ public CreateDbSystemDetails( String adminUsername, String adminPassword, Integer dataStorageSizeInGBs, + DataStorageDetails dataStorage, String hostnameLabel, String ipAddress, Integer port, @@ -77,7 +80,8 @@ public CreateDbSystemDetails( CreateDeletionPolicyDetails deletionPolicy, CrashRecoveryStatus crashRecovery, DatabaseManagementStatus databaseManagement, - SecureConnectionDetails secureConnections) { + SecureConnectionDetails secureConnections, + java.util.List customerContacts) { super(); this.displayName = displayName; this.description = description; @@ -92,6 +96,7 @@ public CreateDbSystemDetails( this.adminUsername = adminUsername; this.adminPassword = adminPassword; this.dataStorageSizeInGBs = dataStorageSizeInGBs; + this.dataStorage = dataStorage; this.hostnameLabel = hostnameLabel; this.ipAddress = ipAddress; this.port = port; @@ -105,6 +110,7 @@ public CreateDbSystemDetails( this.crashRecovery = crashRecovery; this.databaseManagement = databaseManagement; this.secureConnections = secureConnections; + this.customerContacts = customerContacts; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -383,6 +389,15 @@ public Builder dataStorageSizeInGBs(Integer dataStorageSizeInGBs) { this.__explicitlySet__.add("dataStorageSizeInGBs"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("dataStorage") + private DataStorageDetails dataStorage; + + public Builder dataStorage(DataStorageDetails dataStorage) { + this.dataStorage = dataStorage; + this.__explicitlySet__.add("dataStorage"); + return this; + } /** * The hostname for the primary endpoint of the DB System. Used for DNS. *

@@ -595,6 +610,28 @@ public Builder secureConnections(SecureConnectionDetails secureConnections) { this.__explicitlySet__.add("secureConnections"); return this; } + /** + * The list of customer email addresses that receive information from Oracle about the specified OCI DB System resource. + * Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. + * Up to 10 email addresses can be added to the customer contacts for a DB System. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerContacts") + private java.util.List customerContacts; + + /** + * The list of customer email addresses that receive information from Oracle about the specified OCI DB System resource. + * Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. + * Up to 10 email addresses can be added to the customer contacts for a DB System. + * + * @param customerContacts the value to set + * @return this builder + **/ + public Builder customerContacts(java.util.List customerContacts) { + this.customerContacts = customerContacts; + this.__explicitlySet__.add("customerContacts"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -615,6 +652,7 @@ public CreateDbSystemDetails build() { this.adminUsername, this.adminPassword, this.dataStorageSizeInGBs, + this.dataStorage, this.hostnameLabel, this.ipAddress, this.port, @@ -627,7 +665,8 @@ public CreateDbSystemDetails build() { this.deletionPolicy, this.crashRecovery, this.databaseManagement, - this.secureConnections); + this.secureConnections, + this.customerContacts); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -675,6 +714,9 @@ public Builder copy(CreateDbSystemDetails model) { if (model.wasPropertyExplicitlySet("dataStorageSizeInGBs")) { this.dataStorageSizeInGBs(model.getDataStorageSizeInGBs()); } + if (model.wasPropertyExplicitlySet("dataStorage")) { + this.dataStorage(model.getDataStorage()); + } if (model.wasPropertyExplicitlySet("hostnameLabel")) { this.hostnameLabel(model.getHostnameLabel()); } @@ -714,6 +756,9 @@ public Builder copy(CreateDbSystemDetails model) { if (model.wasPropertyExplicitlySet("secureConnections")) { this.secureConnections(model.getSecureConnections()); } + if (model.wasPropertyExplicitlySet("customerContacts")) { + this.customerContacts(model.getCustomerContacts()); + } return this; } } @@ -977,6 +1022,13 @@ public Integer getDataStorageSizeInGBs() { return dataStorageSizeInGBs; } + @com.fasterxml.jackson.annotation.JsonProperty("dataStorage") + private final DataStorageDetails dataStorage; + + public DataStorageDetails getDataStorage() { + return dataStorage; + } + /** * The hostname for the primary endpoint of the DB System. Used for DNS. *

@@ -1162,6 +1214,26 @@ public SecureConnectionDetails getSecureConnections() { return secureConnections; } + /** + * The list of customer email addresses that receive information from Oracle about the specified OCI DB System resource. + * Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. + * Up to 10 email addresses can be added to the customer contacts for a DB System. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerContacts") + private final java.util.List customerContacts; + + /** + * The list of customer email addresses that receive information from Oracle about the specified OCI DB System resource. + * Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. + * Up to 10 email addresses can be added to the customer contacts for a DB System. + * + * @return the value + **/ + public java.util.List getCustomerContacts() { + return customerContacts; + } + @Override public String toString() { return this.toString(true); @@ -1189,6 +1261,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", adminUsername=").append(String.valueOf(this.adminUsername)); sb.append(", adminPassword=").append(""); sb.append(", dataStorageSizeInGBs=").append(String.valueOf(this.dataStorageSizeInGBs)); + sb.append(", dataStorage=").append(String.valueOf(this.dataStorage)); sb.append(", hostnameLabel=").append(String.valueOf(this.hostnameLabel)); sb.append(", ipAddress=").append(String.valueOf(this.ipAddress)); sb.append(", port=").append(String.valueOf(this.port)); @@ -1202,6 +1275,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", crashRecovery=").append(String.valueOf(this.crashRecovery)); sb.append(", databaseManagement=").append(String.valueOf(this.databaseManagement)); sb.append(", secureConnections=").append(String.valueOf(this.secureConnections)); + sb.append(", customerContacts=").append(String.valueOf(this.customerContacts)); sb.append(")"); return sb.toString(); } @@ -1229,6 +1303,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.adminUsername, other.adminUsername) && java.util.Objects.equals(this.adminPassword, other.adminPassword) && java.util.Objects.equals(this.dataStorageSizeInGBs, other.dataStorageSizeInGBs) + && java.util.Objects.equals(this.dataStorage, other.dataStorage) && java.util.Objects.equals(this.hostnameLabel, other.hostnameLabel) && java.util.Objects.equals(this.ipAddress, other.ipAddress) && java.util.Objects.equals(this.port, other.port) @@ -1242,6 +1317,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.crashRecovery, other.crashRecovery) && java.util.Objects.equals(this.databaseManagement, other.databaseManagement) && java.util.Objects.equals(this.secureConnections, other.secureConnections) + && java.util.Objects.equals(this.customerContacts, other.customerContacts) && super.equals(other); } @@ -1280,6 +1356,7 @@ public int hashCode() { + (this.dataStorageSizeInGBs == null ? 43 : this.dataStorageSizeInGBs.hashCode()); + result = (result * PRIME) + (this.dataStorage == null ? 43 : this.dataStorage.hashCode()); result = (result * PRIME) + (this.hostnameLabel == null ? 43 : this.hostnameLabel.hashCode()); @@ -1305,6 +1382,9 @@ public int hashCode() { result = (result * PRIME) + (this.secureConnections == null ? 43 : this.secureConnections.hashCode()); + result = + (result * PRIME) + + (this.customerContacts == null ? 43 : this.customerContacts.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/CustomerContact.java b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/CustomerContact.java new file mode 100644 index 00000000000..5a0309bafd3 --- /dev/null +++ b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/CustomerContact.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mysql.model; + +/** + * Customer contact information that will be used by Oracle to provide notifications needed by DB System administrators. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190415") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = CustomerContact.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CustomerContact extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"email"}) + public CustomerContact(String email) { + super(); + this.email = email; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The email address used by Oracle to send notifications regarding the DB System. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("email") + private String email; + + /** + * The email address used by Oracle to send notifications regarding the DB System. + * + * @param email the value to set + * @return this builder + **/ + public Builder email(String email) { + this.email = email; + this.__explicitlySet__.add("email"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CustomerContact build() { + CustomerContact model = new CustomerContact(this.email); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CustomerContact model) { + if (model.wasPropertyExplicitlySet("email")) { + this.email(model.getEmail()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The email address used by Oracle to send notifications regarding the DB System. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("email") + private final String email; + + /** + * The email address used by Oracle to send notifications regarding the DB System. + * + * @return the value + **/ + public String getEmail() { + return email; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CustomerContact("); + sb.append("super=").append(super.toString()); + sb.append("email=").append(String.valueOf(this.email)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CustomerContact)) { + return false; + } + + CustomerContact other = (CustomerContact) o; + return java.util.Objects.equals(this.email, other.email) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.email == null ? 43 : this.email.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/DataStorage.java b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/DataStorage.java new file mode 100644 index 00000000000..10dae4af3b5 --- /dev/null +++ b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/DataStorage.java @@ -0,0 +1,417 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mysql.model; + +/** + * Data Storage information. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190415") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = DataStorage.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DataStorage extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "allocatedStorageSizeInGBs", + "dataStorageSizeInGBs", + "dataStorageSizeLimitInGBs", + "isAutoExpandStorageEnabled", + "maxStorageSizeInGBs" + }) + public DataStorage( + Integer allocatedStorageSizeInGBs, + Integer dataStorageSizeInGBs, + Integer dataStorageSizeLimitInGBs, + Boolean isAutoExpandStorageEnabled, + Integer maxStorageSizeInGBs) { + super(); + this.allocatedStorageSizeInGBs = allocatedStorageSizeInGBs; + this.dataStorageSizeInGBs = dataStorageSizeInGBs; + this.dataStorageSizeLimitInGBs = dataStorageSizeLimitInGBs; + this.isAutoExpandStorageEnabled = isAutoExpandStorageEnabled; + this.maxStorageSizeInGBs = maxStorageSizeInGBs; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The actual allocated storage size for the DB System. This may be higher than dataStorageSizeInGBs + * if an automatic storage expansion has occurred. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("allocatedStorageSizeInGBs") + private Integer allocatedStorageSizeInGBs; + + /** + * The actual allocated storage size for the DB System. This may be higher than dataStorageSizeInGBs + * if an automatic storage expansion has occurred. + * + * @param allocatedStorageSizeInGBs the value to set + * @return this builder + **/ + public Builder allocatedStorageSizeInGBs(Integer allocatedStorageSizeInGBs) { + this.allocatedStorageSizeInGBs = allocatedStorageSizeInGBs; + this.__explicitlySet__.add("allocatedStorageSizeInGBs"); + return this; + } + /** + * User specified size of the data volume. May be less than current allocatedStorageSizeInGBs. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGBs") + private Integer dataStorageSizeInGBs; + + /** + * User specified size of the data volume. May be less than current allocatedStorageSizeInGBs. + * + * @param dataStorageSizeInGBs the value to set + * @return this builder + **/ + public Builder dataStorageSizeInGBs(Integer dataStorageSizeInGBs) { + this.dataStorageSizeInGBs = dataStorageSizeInGBs; + this.__explicitlySet__.add("dataStorageSizeInGBs"); + return this; + } + /** + * The absolute limit the DB System's storage size may ever expand to, either manually or automatically. + * This limit is based based on the initial dataStorageSizeInGBs when the DB System was first created. + * Both dataStorageSizeInGBs and maxDataStorageSizeInGBs can not exceed this value. + *

+ * DB Systems with an initial storage size of 400 GB or less can be expanded up to 32 TB. + * DB Systems with an initial storage size between 401-800 GB can be expanded up to 64 TB. + * DB Systems with an initial storage size between 801-1200 GB can be expanded up to 96 TB. + * DB Systems with an initial storage size of 1201 GB or more can be expanded up to 128 TB. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeLimitInGBs") + private Integer dataStorageSizeLimitInGBs; + + /** + * The absolute limit the DB System's storage size may ever expand to, either manually or automatically. + * This limit is based based on the initial dataStorageSizeInGBs when the DB System was first created. + * Both dataStorageSizeInGBs and maxDataStorageSizeInGBs can not exceed this value. + *

+ * DB Systems with an initial storage size of 400 GB or less can be expanded up to 32 TB. + * DB Systems with an initial storage size between 401-800 GB can be expanded up to 64 TB. + * DB Systems with an initial storage size between 801-1200 GB can be expanded up to 96 TB. + * DB Systems with an initial storage size of 1201 GB or more can be expanded up to 128 TB. + * + * @param dataStorageSizeLimitInGBs the value to set + * @return this builder + **/ + public Builder dataStorageSizeLimitInGBs(Integer dataStorageSizeLimitInGBs) { + this.dataStorageSizeLimitInGBs = dataStorageSizeLimitInGBs; + this.__explicitlySet__.add("dataStorageSizeLimitInGBs"); + return this; + } + /** + * Enable/disable automatic storage expansion. When set to true, the DB System will automatically + * add storage incrementally up to the value specified in maxStorageSizeInGBs. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoExpandStorageEnabled") + private Boolean isAutoExpandStorageEnabled; + + /** + * Enable/disable automatic storage expansion. When set to true, the DB System will automatically + * add storage incrementally up to the value specified in maxStorageSizeInGBs. + * + * @param isAutoExpandStorageEnabled the value to set + * @return this builder + **/ + public Builder isAutoExpandStorageEnabled(Boolean isAutoExpandStorageEnabled) { + this.isAutoExpandStorageEnabled = isAutoExpandStorageEnabled; + this.__explicitlySet__.add("isAutoExpandStorageEnabled"); + return this; + } + /** + * Maximum storage size this DB System can expand to. When isAutoExpandStorageEnabled + * is set to true, the DB System will add storage incrementally up to this value. + *

+ * DB Systems with an initial storage size of 400 GB or less can be expanded up to 32 TB. + * DB Systems with an initial storage size between 401-800 GB can be expanded up to 64 TB. + * DB Systems with an initial storage size between 801-1200 GB can be expanded up to 96 TB. + * DB Systems with an initial storage size of 1201 GB or more can be expanded up to 128 TB. + *

+ * It is not possible to decrease data storage size. You cannot set the maximum data storage size to less + * than either current DB System dataStorageSizeInGBs or allocatedStorageSizeInGBs. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxStorageSizeInGBs") + private Integer maxStorageSizeInGBs; + + /** + * Maximum storage size this DB System can expand to. When isAutoExpandStorageEnabled + * is set to true, the DB System will add storage incrementally up to this value. + *

+ * DB Systems with an initial storage size of 400 GB or less can be expanded up to 32 TB. + * DB Systems with an initial storage size between 401-800 GB can be expanded up to 64 TB. + * DB Systems with an initial storage size between 801-1200 GB can be expanded up to 96 TB. + * DB Systems with an initial storage size of 1201 GB or more can be expanded up to 128 TB. + *

+ * It is not possible to decrease data storage size. You cannot set the maximum data storage size to less + * than either current DB System dataStorageSizeInGBs or allocatedStorageSizeInGBs. + * + * @param maxStorageSizeInGBs the value to set + * @return this builder + **/ + public Builder maxStorageSizeInGBs(Integer maxStorageSizeInGBs) { + this.maxStorageSizeInGBs = maxStorageSizeInGBs; + this.__explicitlySet__.add("maxStorageSizeInGBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DataStorage build() { + DataStorage model = + new DataStorage( + this.allocatedStorageSizeInGBs, + this.dataStorageSizeInGBs, + this.dataStorageSizeLimitInGBs, + this.isAutoExpandStorageEnabled, + this.maxStorageSizeInGBs); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DataStorage model) { + if (model.wasPropertyExplicitlySet("allocatedStorageSizeInGBs")) { + this.allocatedStorageSizeInGBs(model.getAllocatedStorageSizeInGBs()); + } + if (model.wasPropertyExplicitlySet("dataStorageSizeInGBs")) { + this.dataStorageSizeInGBs(model.getDataStorageSizeInGBs()); + } + if (model.wasPropertyExplicitlySet("dataStorageSizeLimitInGBs")) { + this.dataStorageSizeLimitInGBs(model.getDataStorageSizeLimitInGBs()); + } + if (model.wasPropertyExplicitlySet("isAutoExpandStorageEnabled")) { + this.isAutoExpandStorageEnabled(model.getIsAutoExpandStorageEnabled()); + } + if (model.wasPropertyExplicitlySet("maxStorageSizeInGBs")) { + this.maxStorageSizeInGBs(model.getMaxStorageSizeInGBs()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The actual allocated storage size for the DB System. This may be higher than dataStorageSizeInGBs + * if an automatic storage expansion has occurred. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("allocatedStorageSizeInGBs") + private final Integer allocatedStorageSizeInGBs; + + /** + * The actual allocated storage size for the DB System. This may be higher than dataStorageSizeInGBs + * if an automatic storage expansion has occurred. + * + * @return the value + **/ + public Integer getAllocatedStorageSizeInGBs() { + return allocatedStorageSizeInGBs; + } + + /** + * User specified size of the data volume. May be less than current allocatedStorageSizeInGBs. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGBs") + private final Integer dataStorageSizeInGBs; + + /** + * User specified size of the data volume. May be less than current allocatedStorageSizeInGBs. + * + * @return the value + **/ + public Integer getDataStorageSizeInGBs() { + return dataStorageSizeInGBs; + } + + /** + * The absolute limit the DB System's storage size may ever expand to, either manually or automatically. + * This limit is based based on the initial dataStorageSizeInGBs when the DB System was first created. + * Both dataStorageSizeInGBs and maxDataStorageSizeInGBs can not exceed this value. + *

+ * DB Systems with an initial storage size of 400 GB or less can be expanded up to 32 TB. + * DB Systems with an initial storage size between 401-800 GB can be expanded up to 64 TB. + * DB Systems with an initial storage size between 801-1200 GB can be expanded up to 96 TB. + * DB Systems with an initial storage size of 1201 GB or more can be expanded up to 128 TB. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeLimitInGBs") + private final Integer dataStorageSizeLimitInGBs; + + /** + * The absolute limit the DB System's storage size may ever expand to, either manually or automatically. + * This limit is based based on the initial dataStorageSizeInGBs when the DB System was first created. + * Both dataStorageSizeInGBs and maxDataStorageSizeInGBs can not exceed this value. + *

+ * DB Systems with an initial storage size of 400 GB or less can be expanded up to 32 TB. + * DB Systems with an initial storage size between 401-800 GB can be expanded up to 64 TB. + * DB Systems with an initial storage size between 801-1200 GB can be expanded up to 96 TB. + * DB Systems with an initial storage size of 1201 GB or more can be expanded up to 128 TB. + * + * @return the value + **/ + public Integer getDataStorageSizeLimitInGBs() { + return dataStorageSizeLimitInGBs; + } + + /** + * Enable/disable automatic storage expansion. When set to true, the DB System will automatically + * add storage incrementally up to the value specified in maxStorageSizeInGBs. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoExpandStorageEnabled") + private final Boolean isAutoExpandStorageEnabled; + + /** + * Enable/disable automatic storage expansion. When set to true, the DB System will automatically + * add storage incrementally up to the value specified in maxStorageSizeInGBs. + * + * @return the value + **/ + public Boolean getIsAutoExpandStorageEnabled() { + return isAutoExpandStorageEnabled; + } + + /** + * Maximum storage size this DB System can expand to. When isAutoExpandStorageEnabled + * is set to true, the DB System will add storage incrementally up to this value. + *

+ * DB Systems with an initial storage size of 400 GB or less can be expanded up to 32 TB. + * DB Systems with an initial storage size between 401-800 GB can be expanded up to 64 TB. + * DB Systems with an initial storage size between 801-1200 GB can be expanded up to 96 TB. + * DB Systems with an initial storage size of 1201 GB or more can be expanded up to 128 TB. + *

+ * It is not possible to decrease data storage size. You cannot set the maximum data storage size to less + * than either current DB System dataStorageSizeInGBs or allocatedStorageSizeInGBs. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxStorageSizeInGBs") + private final Integer maxStorageSizeInGBs; + + /** + * Maximum storage size this DB System can expand to. When isAutoExpandStorageEnabled + * is set to true, the DB System will add storage incrementally up to this value. + *

+ * DB Systems with an initial storage size of 400 GB or less can be expanded up to 32 TB. + * DB Systems with an initial storage size between 401-800 GB can be expanded up to 64 TB. + * DB Systems with an initial storage size between 801-1200 GB can be expanded up to 96 TB. + * DB Systems with an initial storage size of 1201 GB or more can be expanded up to 128 TB. + *

+ * It is not possible to decrease data storage size. You cannot set the maximum data storage size to less + * than either current DB System dataStorageSizeInGBs or allocatedStorageSizeInGBs. + * + * @return the value + **/ + public Integer getMaxStorageSizeInGBs() { + return maxStorageSizeInGBs; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DataStorage("); + sb.append("super=").append(super.toString()); + sb.append("allocatedStorageSizeInGBs=") + .append(String.valueOf(this.allocatedStorageSizeInGBs)); + sb.append(", dataStorageSizeInGBs=").append(String.valueOf(this.dataStorageSizeInGBs)); + sb.append(", dataStorageSizeLimitInGBs=") + .append(String.valueOf(this.dataStorageSizeLimitInGBs)); + sb.append(", isAutoExpandStorageEnabled=") + .append(String.valueOf(this.isAutoExpandStorageEnabled)); + sb.append(", maxStorageSizeInGBs=").append(String.valueOf(this.maxStorageSizeInGBs)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DataStorage)) { + return false; + } + + DataStorage other = (DataStorage) o; + return java.util.Objects.equals( + this.allocatedStorageSizeInGBs, other.allocatedStorageSizeInGBs) + && java.util.Objects.equals(this.dataStorageSizeInGBs, other.dataStorageSizeInGBs) + && java.util.Objects.equals( + this.dataStorageSizeLimitInGBs, other.dataStorageSizeLimitInGBs) + && java.util.Objects.equals( + this.isAutoExpandStorageEnabled, other.isAutoExpandStorageEnabled) + && java.util.Objects.equals(this.maxStorageSizeInGBs, other.maxStorageSizeInGBs) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.allocatedStorageSizeInGBs == null + ? 43 + : this.allocatedStorageSizeInGBs.hashCode()); + result = + (result * PRIME) + + (this.dataStorageSizeInGBs == null + ? 43 + : this.dataStorageSizeInGBs.hashCode()); + result = + (result * PRIME) + + (this.dataStorageSizeLimitInGBs == null + ? 43 + : this.dataStorageSizeLimitInGBs.hashCode()); + result = + (result * PRIME) + + (this.isAutoExpandStorageEnabled == null + ? 43 + : this.isAutoExpandStorageEnabled.hashCode()); + result = + (result * PRIME) + + (this.maxStorageSizeInGBs == null + ? 43 + : this.maxStorageSizeInGBs.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/DataStorageDetails.java b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/DataStorageDetails.java new file mode 100644 index 00000000000..dbf86a2743f --- /dev/null +++ b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/DataStorageDetails.java @@ -0,0 +1,233 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.mysql.model; + +/** + * Data Storage configuration properties. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190415") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DataStorageDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DataStorageDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"isAutoExpandStorageEnabled", "maxStorageSizeInGBs"}) + public DataStorageDetails(Boolean isAutoExpandStorageEnabled, Integer maxStorageSizeInGBs) { + super(); + this.isAutoExpandStorageEnabled = isAutoExpandStorageEnabled; + this.maxStorageSizeInGBs = maxStorageSizeInGBs; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Enable/disable automatic storage expansion. When set to true, the DB System will automatically + * add storage incrementally up to the value specified in maxStorageSizeInGBs. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoExpandStorageEnabled") + private Boolean isAutoExpandStorageEnabled; + + /** + * Enable/disable automatic storage expansion. When set to true, the DB System will automatically + * add storage incrementally up to the value specified in maxStorageSizeInGBs. + * + * @param isAutoExpandStorageEnabled the value to set + * @return this builder + **/ + public Builder isAutoExpandStorageEnabled(Boolean isAutoExpandStorageEnabled) { + this.isAutoExpandStorageEnabled = isAutoExpandStorageEnabled; + this.__explicitlySet__.add("isAutoExpandStorageEnabled"); + return this; + } + /** + * Maximum storage size this DB System can expand to. When isAutoExpandStorageEnabled + * is set to true, the DB System will add storage incrementally up to this value. + *

+ * DB Systems with an initial storage size of 400 GB or less can be expanded up to 32 TB. + * DB Systems with an initial storage size between 401-800 GB can be expanded up to 64 TB. + * DB Systems with an initial storage size between 801-1200 GB can be expanded up to 96 TB. + * DB Systems with an initial storage size of 1201 GB or more can be expanded up to 128 TB. + *

+ * It is not possible to decrease data storage size. You cannot set the maximum data storage size to less + * than either current DB System dataStorageSizeInGBs or allocatedStorageSizeInGBs. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxStorageSizeInGBs") + private Integer maxStorageSizeInGBs; + + /** + * Maximum storage size this DB System can expand to. When isAutoExpandStorageEnabled + * is set to true, the DB System will add storage incrementally up to this value. + *

+ * DB Systems with an initial storage size of 400 GB or less can be expanded up to 32 TB. + * DB Systems with an initial storage size between 401-800 GB can be expanded up to 64 TB. + * DB Systems with an initial storage size between 801-1200 GB can be expanded up to 96 TB. + * DB Systems with an initial storage size of 1201 GB or more can be expanded up to 128 TB. + *

+ * It is not possible to decrease data storage size. You cannot set the maximum data storage size to less + * than either current DB System dataStorageSizeInGBs or allocatedStorageSizeInGBs. + * + * @param maxStorageSizeInGBs the value to set + * @return this builder + **/ + public Builder maxStorageSizeInGBs(Integer maxStorageSizeInGBs) { + this.maxStorageSizeInGBs = maxStorageSizeInGBs; + this.__explicitlySet__.add("maxStorageSizeInGBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DataStorageDetails build() { + DataStorageDetails model = + new DataStorageDetails( + this.isAutoExpandStorageEnabled, this.maxStorageSizeInGBs); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DataStorageDetails model) { + if (model.wasPropertyExplicitlySet("isAutoExpandStorageEnabled")) { + this.isAutoExpandStorageEnabled(model.getIsAutoExpandStorageEnabled()); + } + if (model.wasPropertyExplicitlySet("maxStorageSizeInGBs")) { + this.maxStorageSizeInGBs(model.getMaxStorageSizeInGBs()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Enable/disable automatic storage expansion. When set to true, the DB System will automatically + * add storage incrementally up to the value specified in maxStorageSizeInGBs. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAutoExpandStorageEnabled") + private final Boolean isAutoExpandStorageEnabled; + + /** + * Enable/disable automatic storage expansion. When set to true, the DB System will automatically + * add storage incrementally up to the value specified in maxStorageSizeInGBs. + * + * @return the value + **/ + public Boolean getIsAutoExpandStorageEnabled() { + return isAutoExpandStorageEnabled; + } + + /** + * Maximum storage size this DB System can expand to. When isAutoExpandStorageEnabled + * is set to true, the DB System will add storage incrementally up to this value. + *

+ * DB Systems with an initial storage size of 400 GB or less can be expanded up to 32 TB. + * DB Systems with an initial storage size between 401-800 GB can be expanded up to 64 TB. + * DB Systems with an initial storage size between 801-1200 GB can be expanded up to 96 TB. + * DB Systems with an initial storage size of 1201 GB or more can be expanded up to 128 TB. + *

+ * It is not possible to decrease data storage size. You cannot set the maximum data storage size to less + * than either current DB System dataStorageSizeInGBs or allocatedStorageSizeInGBs. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxStorageSizeInGBs") + private final Integer maxStorageSizeInGBs; + + /** + * Maximum storage size this DB System can expand to. When isAutoExpandStorageEnabled + * is set to true, the DB System will add storage incrementally up to this value. + *

+ * DB Systems with an initial storage size of 400 GB or less can be expanded up to 32 TB. + * DB Systems with an initial storage size between 401-800 GB can be expanded up to 64 TB. + * DB Systems with an initial storage size between 801-1200 GB can be expanded up to 96 TB. + * DB Systems with an initial storage size of 1201 GB or more can be expanded up to 128 TB. + *

+ * It is not possible to decrease data storage size. You cannot set the maximum data storage size to less + * than either current DB System dataStorageSizeInGBs or allocatedStorageSizeInGBs. + * + * @return the value + **/ + public Integer getMaxStorageSizeInGBs() { + return maxStorageSizeInGBs; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DataStorageDetails("); + sb.append("super=").append(super.toString()); + sb.append("isAutoExpandStorageEnabled=") + .append(String.valueOf(this.isAutoExpandStorageEnabled)); + sb.append(", maxStorageSizeInGBs=").append(String.valueOf(this.maxStorageSizeInGBs)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DataStorageDetails)) { + return false; + } + + DataStorageDetails other = (DataStorageDetails) o; + return java.util.Objects.equals( + this.isAutoExpandStorageEnabled, other.isAutoExpandStorageEnabled) + && java.util.Objects.equals(this.maxStorageSizeInGBs, other.maxStorageSizeInGBs) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.isAutoExpandStorageEnabled == null + ? 43 + : this.isAutoExpandStorageEnabled.hashCode()); + result = + (result * PRIME) + + (this.maxStorageSizeInGBs == null + ? 43 + : this.maxStorageSizeInGBs.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/DbSystem.java b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/DbSystem.java index e4679a7d7ab..c67cf34b5d5 100644 --- a/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/DbSystem.java +++ b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/DbSystem.java @@ -38,6 +38,7 @@ public final class DbSystem extends com.oracle.bmc.http.internal.ExplicitlySetBm "source", "configurationId", "dataStorageSizeInGBs", + "dataStorage", "hostnameLabel", "ipAddress", "port", @@ -55,7 +56,8 @@ public final class DbSystem extends com.oracle.bmc.http.internal.ExplicitlySetBm "crashRecovery", "pointInTimeRecoveryDetails", "databaseManagement", - "secureConnections" + "secureConnections", + "customerContacts" }) public DbSystem( String id, @@ -75,6 +77,7 @@ public DbSystem( DbSystemSource source, String configurationId, Integer dataStorageSizeInGBs, + DataStorage dataStorage, String hostnameLabel, String ipAddress, Integer port, @@ -92,7 +95,8 @@ public DbSystem( CrashRecoveryStatus crashRecovery, PointInTimeRecoveryDetails pointInTimeRecoveryDetails, DatabaseManagementStatus databaseManagement, - SecureConnectionDetails secureConnections) { + SecureConnectionDetails secureConnections, + java.util.List customerContacts) { super(); this.id = id; this.displayName = displayName; @@ -111,6 +115,7 @@ public DbSystem( this.source = source; this.configurationId = configurationId; this.dataStorageSizeInGBs = dataStorageSizeInGBs; + this.dataStorage = dataStorage; this.hostnameLabel = hostnameLabel; this.ipAddress = ipAddress; this.port = port; @@ -129,6 +134,7 @@ public DbSystem( this.pointInTimeRecoveryDetails = pointInTimeRecoveryDetails; this.databaseManagement = databaseManagement; this.secureConnections = secureConnections; + this.customerContacts = customerContacts; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -406,14 +412,16 @@ public Builder configurationId(String configurationId) { return this; } /** - * Initial size of the data volume in GiBs that will be created and attached. + * DEPRECATED: User specified size of the data volume. May be less than current allocatedStorageSizeInGBs. + * Replaced by dataStorage.dataStorageSizeInGBs. * **/ @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGBs") private Integer dataStorageSizeInGBs; /** - * Initial size of the data volume in GiBs that will be created and attached. + * DEPRECATED: User specified size of the data volume. May be less than current allocatedStorageSizeInGBs. + * Replaced by dataStorage.dataStorageSizeInGBs. * * @param dataStorageSizeInGBs the value to set * @return this builder @@ -423,6 +431,15 @@ public Builder dataStorageSizeInGBs(Integer dataStorageSizeInGBs) { this.__explicitlySet__.add("dataStorageSizeInGBs"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("dataStorage") + private DataStorage dataStorage; + + public Builder dataStorage(DataStorage dataStorage) { + this.dataStorage = dataStorage; + this.__explicitlySet__.add("dataStorage"); + return this; + } /** * The hostname for the primary endpoint of the DB System. Used for DNS. * The value is the hostname portion of the primary private IP's fully qualified domain name (FQDN) @@ -719,6 +736,28 @@ public Builder secureConnections(SecureConnectionDetails secureConnections) { this.__explicitlySet__.add("secureConnections"); return this; } + /** + * The list of customer email addresses that receive information from Oracle about the specified OCI DB System resource. + * Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. + * Up to 10 email addresses can be added to the customer contacts for a DB System. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerContacts") + private java.util.List customerContacts; + + /** + * The list of customer email addresses that receive information from Oracle about the specified OCI DB System resource. + * Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. + * Up to 10 email addresses can be added to the customer contacts for a DB System. + * + * @param customerContacts the value to set + * @return this builder + **/ + public Builder customerContacts(java.util.List customerContacts) { + this.customerContacts = customerContacts; + this.__explicitlySet__.add("customerContacts"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -743,6 +782,7 @@ public DbSystem build() { this.source, this.configurationId, this.dataStorageSizeInGBs, + this.dataStorage, this.hostnameLabel, this.ipAddress, this.port, @@ -760,7 +800,8 @@ public DbSystem build() { this.crashRecovery, this.pointInTimeRecoveryDetails, this.databaseManagement, - this.secureConnections); + this.secureConnections, + this.customerContacts); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -820,6 +861,9 @@ public Builder copy(DbSystem model) { if (model.wasPropertyExplicitlySet("dataStorageSizeInGBs")) { this.dataStorageSizeInGBs(model.getDataStorageSizeInGBs()); } + if (model.wasPropertyExplicitlySet("dataStorage")) { + this.dataStorage(model.getDataStorage()); + } if (model.wasPropertyExplicitlySet("hostnameLabel")) { this.hostnameLabel(model.getHostnameLabel()); } @@ -874,6 +918,9 @@ public Builder copy(DbSystem model) { if (model.wasPropertyExplicitlySet("secureConnections")) { this.secureConnections(model.getSecureConnections()); } + if (model.wasPropertyExplicitlySet("customerContacts")) { + this.customerContacts(model.getCustomerContacts()); + } return this; } } @@ -1130,14 +1177,16 @@ public String getConfigurationId() { } /** - * Initial size of the data volume in GiBs that will be created and attached. + * DEPRECATED: User specified size of the data volume. May be less than current allocatedStorageSizeInGBs. + * Replaced by dataStorage.dataStorageSizeInGBs. * **/ @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGBs") private final Integer dataStorageSizeInGBs; /** - * Initial size of the data volume in GiBs that will be created and attached. + * DEPRECATED: User specified size of the data volume. May be less than current allocatedStorageSizeInGBs. + * Replaced by dataStorage.dataStorageSizeInGBs. * * @return the value **/ @@ -1145,6 +1194,13 @@ public Integer getDataStorageSizeInGBs() { return dataStorageSizeInGBs; } + @com.fasterxml.jackson.annotation.JsonProperty("dataStorage") + private final DataStorage dataStorage; + + public DataStorage getDataStorage() { + return dataStorage; + } + /** * The hostname for the primary endpoint of the DB System. Used for DNS. * The value is the hostname portion of the primary private IP's fully qualified domain name (FQDN) @@ -1456,6 +1512,26 @@ public SecureConnectionDetails getSecureConnections() { return secureConnections; } + /** + * The list of customer email addresses that receive information from Oracle about the specified OCI DB System resource. + * Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. + * Up to 10 email addresses can be added to the customer contacts for a DB System. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerContacts") + private final java.util.List customerContacts; + + /** + * The list of customer email addresses that receive information from Oracle about the specified OCI DB System resource. + * Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. + * Up to 10 email addresses can be added to the customer contacts for a DB System. + * + * @return the value + **/ + public java.util.List getCustomerContacts() { + return customerContacts; + } + @Override public String toString() { return this.toString(true); @@ -1488,6 +1564,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", source=").append(String.valueOf(this.source)); sb.append(", configurationId=").append(String.valueOf(this.configurationId)); sb.append(", dataStorageSizeInGBs=").append(String.valueOf(this.dataStorageSizeInGBs)); + sb.append(", dataStorage=").append(String.valueOf(this.dataStorage)); sb.append(", hostnameLabel=").append(String.valueOf(this.hostnameLabel)); sb.append(", ipAddress=").append(String.valueOf(this.ipAddress)); sb.append(", port=").append(String.valueOf(this.port)); @@ -1507,6 +1584,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.pointInTimeRecoveryDetails)); sb.append(", databaseManagement=").append(String.valueOf(this.databaseManagement)); sb.append(", secureConnections=").append(String.valueOf(this.secureConnections)); + sb.append(", customerContacts=").append(String.valueOf(this.customerContacts)); sb.append(")"); return sb.toString(); } @@ -1539,6 +1617,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.source, other.source) && java.util.Objects.equals(this.configurationId, other.configurationId) && java.util.Objects.equals(this.dataStorageSizeInGBs, other.dataStorageSizeInGBs) + && java.util.Objects.equals(this.dataStorage, other.dataStorage) && java.util.Objects.equals(this.hostnameLabel, other.hostnameLabel) && java.util.Objects.equals(this.ipAddress, other.ipAddress) && java.util.Objects.equals(this.port, other.port) @@ -1558,6 +1637,7 @@ public boolean equals(Object o) { this.pointInTimeRecoveryDetails, other.pointInTimeRecoveryDetails) && java.util.Objects.equals(this.databaseManagement, other.databaseManagement) && java.util.Objects.equals(this.secureConnections, other.secureConnections) + && java.util.Objects.equals(this.customerContacts, other.customerContacts) && super.equals(other); } @@ -1604,6 +1684,7 @@ public int hashCode() { + (this.dataStorageSizeInGBs == null ? 43 : this.dataStorageSizeInGBs.hashCode()); + result = (result * PRIME) + (this.dataStorage == null ? 43 : this.dataStorage.hashCode()); result = (result * PRIME) + (this.hostnameLabel == null ? 43 : this.hostnameLabel.hashCode()); @@ -1642,6 +1723,9 @@ public int hashCode() { result = (result * PRIME) + (this.secureConnections == null ? 43 : this.secureConnections.hashCode()); + result = + (result * PRIME) + + (this.customerContacts == null ? 43 : this.customerContacts.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/DbSystemSnapshot.java b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/DbSystemSnapshot.java index e9fdc023be5..34426aadf4c 100644 --- a/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/DbSystemSnapshot.java +++ b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/DbSystemSnapshot.java @@ -34,6 +34,7 @@ public final class DbSystemSnapshot extends com.oracle.bmc.http.internal.Explici "backupPolicy", "configurationId", "dataStorageSizeInGBs", + "dataStorage", "hostnameLabel", "ipAddress", "port", @@ -63,6 +64,7 @@ public DbSystemSnapshot( BackupPolicy backupPolicy, String configurationId, Integer dataStorageSizeInGBs, + DataStorage dataStorage, String hostnameLabel, String ipAddress, Integer port, @@ -91,6 +93,7 @@ public DbSystemSnapshot( this.backupPolicy = backupPolicy; this.configurationId = configurationId; this.dataStorageSizeInGBs = dataStorageSizeInGBs; + this.dataStorage = dataStorage; this.hostnameLabel = hostnameLabel; this.ipAddress = ipAddress; this.port = port; @@ -311,14 +314,16 @@ public Builder configurationId(String configurationId) { return this; } /** - * Initial size of the data volume in GiBs that will be created and attached. + * DEPRECATED: User specified size of the data volume. May be less than current allocatedStorageSizeInGBs. + * Replaced by dataStorage.dataStorageSizeInGBs. * **/ @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGBs") private Integer dataStorageSizeInGBs; /** - * Initial size of the data volume in GiBs that will be created and attached. + * DEPRECATED: User specified size of the data volume. May be less than current allocatedStorageSizeInGBs. + * Replaced by dataStorage.dataStorageSizeInGBs. * * @param dataStorageSizeInGBs the value to set * @return this builder @@ -328,6 +333,15 @@ public Builder dataStorageSizeInGBs(Integer dataStorageSizeInGBs) { this.__explicitlySet__.add("dataStorageSizeInGBs"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("dataStorage") + private DataStorage dataStorage; + + public Builder dataStorage(DataStorage dataStorage) { + this.dataStorage = dataStorage; + this.__explicitlySet__.add("dataStorage"); + return this; + } /** * The hostname for the primary endpoint of the DB System. Used for DNS. * The value is the hostname portion of the primary private IP's fully qualified domain name (FQDN) @@ -592,6 +606,7 @@ public DbSystemSnapshot build() { this.backupPolicy, this.configurationId, this.dataStorageSizeInGBs, + this.dataStorage, this.hostnameLabel, this.ipAddress, this.port, @@ -653,6 +668,9 @@ public Builder copy(DbSystemSnapshot model) { if (model.wasPropertyExplicitlySet("dataStorageSizeInGBs")) { this.dataStorageSizeInGBs(model.getDataStorageSizeInGBs()); } + if (model.wasPropertyExplicitlySet("dataStorage")) { + this.dataStorage(model.getDataStorage()); + } if (model.wasPropertyExplicitlySet("hostnameLabel")) { this.hostnameLabel(model.getHostnameLabel()); } @@ -888,14 +906,16 @@ public String getConfigurationId() { } /** - * Initial size of the data volume in GiBs that will be created and attached. + * DEPRECATED: User specified size of the data volume. May be less than current allocatedStorageSizeInGBs. + * Replaced by dataStorage.dataStorageSizeInGBs. * **/ @com.fasterxml.jackson.annotation.JsonProperty("dataStorageSizeInGBs") private final Integer dataStorageSizeInGBs; /** - * Initial size of the data volume in GiBs that will be created and attached. + * DEPRECATED: User specified size of the data volume. May be less than current allocatedStorageSizeInGBs. + * Replaced by dataStorage.dataStorageSizeInGBs. * * @return the value **/ @@ -903,6 +923,13 @@ public Integer getDataStorageSizeInGBs() { return dataStorageSizeInGBs; } + @com.fasterxml.jackson.annotation.JsonProperty("dataStorage") + private final DataStorage dataStorage; + + public DataStorage getDataStorage() { + return dataStorage; + } + /** * The hostname for the primary endpoint of the DB System. Used for DNS. * The value is the hostname portion of the primary private IP's fully qualified domain name (FQDN) @@ -1145,6 +1172,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", backupPolicy=").append(String.valueOf(this.backupPolicy)); sb.append(", configurationId=").append(String.valueOf(this.configurationId)); sb.append(", dataStorageSizeInGBs=").append(String.valueOf(this.dataStorageSizeInGBs)); + sb.append(", dataStorage=").append(String.valueOf(this.dataStorage)); sb.append(", hostnameLabel=").append(String.valueOf(this.hostnameLabel)); sb.append(", ipAddress=").append(String.valueOf(this.ipAddress)); sb.append(", port=").append(String.valueOf(this.port)); @@ -1186,6 +1214,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.backupPolicy, other.backupPolicy) && java.util.Objects.equals(this.configurationId, other.configurationId) && java.util.Objects.equals(this.dataStorageSizeInGBs, other.dataStorageSizeInGBs) + && java.util.Objects.equals(this.dataStorage, other.dataStorage) && java.util.Objects.equals(this.hostnameLabel, other.hostnameLabel) && java.util.Objects.equals(this.ipAddress, other.ipAddress) && java.util.Objects.equals(this.port, other.port) @@ -1234,6 +1263,7 @@ public int hashCode() { + (this.dataStorageSizeInGBs == null ? 43 : this.dataStorageSizeInGBs.hashCode()); + result = (result * PRIME) + (this.dataStorage == null ? 43 : this.dataStorage.hashCode()); result = (result * PRIME) + (this.hostnameLabel == null ? 43 : this.hostnameLabel.hashCode()); diff --git a/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/UpdateDbSystemDetails.java b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/UpdateDbSystemDetails.java index 2081c4a0ce1..48825fe26ac 100644 --- a/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/UpdateDbSystemDetails.java +++ b/bmc-mysql/src/main/java/com/oracle/bmc/mysql/model/UpdateDbSystemDetails.java @@ -36,6 +36,7 @@ public final class UpdateDbSystemDetails "adminUsername", "adminPassword", "dataStorageSizeInGBs", + "dataStorage", "hostnameLabel", "ipAddress", "port", @@ -47,7 +48,8 @@ public final class UpdateDbSystemDetails "deletionPolicy", "crashRecovery", "databaseManagement", - "secureConnections" + "secureConnections", + "customerContacts" }) public UpdateDbSystemDetails( String displayName, @@ -62,6 +64,7 @@ public UpdateDbSystemDetails( String adminUsername, String adminPassword, Integer dataStorageSizeInGBs, + DataStorageDetails dataStorage, String hostnameLabel, String ipAddress, Integer port, @@ -73,7 +76,8 @@ public UpdateDbSystemDetails( UpdateDeletionPolicyDetails deletionPolicy, CrashRecoveryStatus crashRecovery, DatabaseManagementStatus databaseManagement, - SecureConnectionDetails secureConnections) { + SecureConnectionDetails secureConnections, + java.util.List customerContacts) { super(); this.displayName = displayName; this.description = description; @@ -87,6 +91,7 @@ public UpdateDbSystemDetails( this.adminUsername = adminUsername; this.adminPassword = adminPassword; this.dataStorageSizeInGBs = dataStorageSizeInGBs; + this.dataStorage = dataStorage; this.hostnameLabel = hostnameLabel; this.ipAddress = ipAddress; this.port = port; @@ -99,6 +104,7 @@ public UpdateDbSystemDetails( this.crashRecovery = crashRecovery; this.databaseManagement = databaseManagement; this.secureConnections = secureConnections; + this.customerContacts = customerContacts; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -381,6 +387,15 @@ public Builder dataStorageSizeInGBs(Integer dataStorageSizeInGBs) { this.__explicitlySet__.add("dataStorageSizeInGBs"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("dataStorage") + private DataStorageDetails dataStorage; + + public Builder dataStorage(DataStorageDetails dataStorage) { + this.dataStorage = dataStorage; + this.__explicitlySet__.add("dataStorage"); + return this; + } /** * The hostname for the primary endpoint of the DB System. Used for DNS. * The value is the hostname portion of the primary private IP's fully qualified domain name (FQDN) @@ -578,6 +593,28 @@ public Builder secureConnections(SecureConnectionDetails secureConnections) { this.__explicitlySet__.add("secureConnections"); return this; } + /** + * The list of customer email addresses that receive information from Oracle about the specified OCI DB System resource. + * Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. + * Up to 10 email addresses can be added to the customer contacts for a DB System. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerContacts") + private java.util.List customerContacts; + + /** + * The list of customer email addresses that receive information from Oracle about the specified OCI DB System resource. + * Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. + * Up to 10 email addresses can be added to the customer contacts for a DB System. + * + * @param customerContacts the value to set + * @return this builder + **/ + public Builder customerContacts(java.util.List customerContacts) { + this.customerContacts = customerContacts; + this.__explicitlySet__.add("customerContacts"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -597,6 +634,7 @@ public UpdateDbSystemDetails build() { this.adminUsername, this.adminPassword, this.dataStorageSizeInGBs, + this.dataStorage, this.hostnameLabel, this.ipAddress, this.port, @@ -608,7 +646,8 @@ public UpdateDbSystemDetails build() { this.deletionPolicy, this.crashRecovery, this.databaseManagement, - this.secureConnections); + this.secureConnections, + this.customerContacts); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -653,6 +692,9 @@ public Builder copy(UpdateDbSystemDetails model) { if (model.wasPropertyExplicitlySet("dataStorageSizeInGBs")) { this.dataStorageSizeInGBs(model.getDataStorageSizeInGBs()); } + if (model.wasPropertyExplicitlySet("dataStorage")) { + this.dataStorage(model.getDataStorage()); + } if (model.wasPropertyExplicitlySet("hostnameLabel")) { this.hostnameLabel(model.getHostnameLabel()); } @@ -689,6 +731,9 @@ public Builder copy(UpdateDbSystemDetails model) { if (model.wasPropertyExplicitlySet("secureConnections")) { this.secureConnections(model.getSecureConnections()); } + if (model.wasPropertyExplicitlySet("customerContacts")) { + this.customerContacts(model.getCustomerContacts()); + } return this; } } @@ -958,6 +1003,13 @@ public Integer getDataStorageSizeInGBs() { return dataStorageSizeInGBs; } + @com.fasterxml.jackson.annotation.JsonProperty("dataStorage") + private final DataStorageDetails dataStorage; + + public DataStorageDetails getDataStorage() { + return dataStorage; + } + /** * The hostname for the primary endpoint of the DB System. Used for DNS. * The value is the hostname portion of the primary private IP's fully qualified domain name (FQDN) @@ -1130,6 +1182,26 @@ public SecureConnectionDetails getSecureConnections() { return secureConnections; } + /** + * The list of customer email addresses that receive information from Oracle about the specified OCI DB System resource. + * Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. + * Up to 10 email addresses can be added to the customer contacts for a DB System. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customerContacts") + private final java.util.List customerContacts; + + /** + * The list of customer email addresses that receive information from Oracle about the specified OCI DB System resource. + * Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. + * Up to 10 email addresses can be added to the customer contacts for a DB System. + * + * @return the value + **/ + public java.util.List getCustomerContacts() { + return customerContacts; + } + @Override public String toString() { return this.toString(true); @@ -1156,6 +1228,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", adminUsername=").append(String.valueOf(this.adminUsername)); sb.append(", adminPassword=").append(""); sb.append(", dataStorageSizeInGBs=").append(String.valueOf(this.dataStorageSizeInGBs)); + sb.append(", dataStorage=").append(String.valueOf(this.dataStorage)); sb.append(", hostnameLabel=").append(String.valueOf(this.hostnameLabel)); sb.append(", ipAddress=").append(String.valueOf(this.ipAddress)); sb.append(", port=").append(String.valueOf(this.port)); @@ -1168,6 +1241,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", crashRecovery=").append(String.valueOf(this.crashRecovery)); sb.append(", databaseManagement=").append(String.valueOf(this.databaseManagement)); sb.append(", secureConnections=").append(String.valueOf(this.secureConnections)); + sb.append(", customerContacts=").append(String.valueOf(this.customerContacts)); sb.append(")"); return sb.toString(); } @@ -1194,6 +1268,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.adminUsername, other.adminUsername) && java.util.Objects.equals(this.adminPassword, other.adminPassword) && java.util.Objects.equals(this.dataStorageSizeInGBs, other.dataStorageSizeInGBs) + && java.util.Objects.equals(this.dataStorage, other.dataStorage) && java.util.Objects.equals(this.hostnameLabel, other.hostnameLabel) && java.util.Objects.equals(this.ipAddress, other.ipAddress) && java.util.Objects.equals(this.port, other.port) @@ -1206,6 +1281,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.crashRecovery, other.crashRecovery) && java.util.Objects.equals(this.databaseManagement, other.databaseManagement) && java.util.Objects.equals(this.secureConnections, other.secureConnections) + && java.util.Objects.equals(this.customerContacts, other.customerContacts) && super.equals(other); } @@ -1241,6 +1317,7 @@ public int hashCode() { + (this.dataStorageSizeInGBs == null ? 43 : this.dataStorageSizeInGBs.hashCode()); + result = (result * PRIME) + (this.dataStorage == null ? 43 : this.dataStorage.hashCode()); result = (result * PRIME) + (this.hostnameLabel == null ? 43 : this.hostnameLabel.hashCode()); @@ -1265,6 +1342,9 @@ public int hashCode() { result = (result * PRIME) + (this.secureConnections == null ? 43 : this.secureConnections.hashCode()); + result = + (result * PRIME) + + (this.customerContacts == null ? 43 : this.customerContacts.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-networkfirewall/pom.xml b/bmc-networkfirewall/pom.xml index b686d1dea80..2731a6ceccc 100644 --- a/bmc-networkfirewall/pom.xml +++ b/bmc-networkfirewall/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-networkfirewall @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/NetworkFirewall.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/NetworkFirewall.java index cd2a9639625..5b77476af8f 100644 --- a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/NetworkFirewall.java +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/NetworkFirewall.java @@ -435,6 +435,47 @@ BulkUploadDecryptionRulesResponse bulkUploadDecryptionRules( */ BulkUploadServicesResponse bulkUploadServices(BulkUploadServicesRequest request); + /** + * Creates a new Tunnel Inspection Rule at bulk for the Network Firewall Policy. + * + * + * Note: This operation consumes a stream. + * + * If the stream supports {@link java.io.InputStream#mark(int)} and {@link java.io.InputStream#reset()}, when a retry is + * necessary, the stream is reset so it starts at the beginning (or whatever the stream's position was at the time this + * operation is called}. + * + * Note this means that if the caller has used {@link java.io.InputStream#mark(int)} before, then the mark + * will not be the same anymore after this operation, and a subsequent call to {@link java.io.InputStream#reset()} by + * the caller will reset the stream not to the caller's mark, but to the position the stream was in when this operation + * was called. + * + * If the stream is a {@link java.io.FileInputStream}, and the stream's {@link java.nio.channels.FileChannel} position + * can be changed (like for a regular file), the stream will be wrapped in such a way that it does provide + * support for {@link java.io.InputStream#mark(int)} and {@link java.io.InputStream#reset()}. Then the same procedure as + * above is followed. If the stream's {@link java.nio.channels.FileChannel} position cannot be changed (like for a + * named pipe), then the stream's contents will be buffered in memory, as described below. + * + * If the stream does not support {@link java.io.InputStream#mark(int)} and {@link java.io.InputStream#reset()}, then + * the stream is wrapped in a {@link java.io.BufferedInputStream}, which means the entire contents may + * be buffered in memory. Then the same procedure as above is followed. + * + * The contents of the stream, except when the stream is a {@link java.io.FileInputStream} whose + * {@link java.nio.channels.FileChannel} position can be changed, should be less than 2 GiB in size if retries are used. + * This is because streams 2 GiB in size or larger do no guarantee that mark-and-reset can be performed. If the stream + * is larger, do not use built-in retries and manage retries yourself. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use BulkUploadTunnelInspectionRules API. + */ + BulkUploadTunnelInspectionRulesResponse bulkUploadTunnelInspectionRules( + BulkUploadTunnelInspectionRulesRequest request); + /** * Creates a new Url Lists at bulk for the Network Firewall Policy. * @@ -670,6 +711,20 @@ CreateNetworkFirewallPolicyResponse createNetworkFirewallPolicy( */ CreateServiceListResponse createServiceList(CreateServiceListRequest request); + /** + * Creates a new tunnel inspection rule for the network firewall policy. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateTunnelInspectionRule API. + */ + CreateTunnelInspectionRuleResponse createTunnelInspectionRule( + CreateTunnelInspectionRuleRequest request); + /** * Creates a new Url List for the Network Firewall Policy. * @@ -816,6 +871,19 @@ DeleteNetworkFirewallPolicyResponse deleteNetworkFirewallPolicy( */ DeleteServiceListResponse deleteServiceList(DeleteServiceListRequest request); + /** + * Deletes a tunnel inspection rule resource with the given identifier. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteTunnelInspectionRule API. + */ + DeleteTunnelInspectionRuleResponse deleteTunnelInspectionRule( + DeleteTunnelInspectionRuleRequest request); + /** * Deletes a Url List resource with the given identifier. * @param request The request object containing the details to send @@ -961,6 +1029,18 @@ GetNetworkFirewallPolicyResponse getNetworkFirewallPolicy( */ GetServiceListResponse getServiceList(GetServiceListRequest request); + /** + * Get tunnel inspection rule by the given name in the context of network firewall policy. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetTunnelInspectionRule API. + */ + GetTunnelInspectionRuleResponse getTunnelInspectionRule(GetTunnelInspectionRuleRequest request); + /** * Get Url List by the given name in the context of network firewall policy. * @param request The request object containing the details to send @@ -1129,6 +1209,20 @@ ListNetworkFirewallPoliciesResponse listNetworkFirewallPolicies( */ ListServicesResponse listServices(ListServicesRequest request); + /** + * Returns a list of tunnel inspection rules for the network firewall policy. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListTunnelInspectionRules API. + */ + ListTunnelInspectionRulesResponse listTunnelInspectionRules( + ListTunnelInspectionRulesRequest request); + /** * Returns a list of URL lists for the Network Firewall Policy. * @@ -1327,6 +1421,19 @@ UpdateNetworkFirewallPolicyResponse updateNetworkFirewallPolicy( */ UpdateServiceListResponse updateServiceList(UpdateServiceListRequest request); + /** + * Updates the tunnel inspection rule with the given name in the network firewall policy. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateTunnelInspectionRule API. + */ + UpdateTunnelInspectionRuleResponse updateTunnelInspectionRule( + UpdateTunnelInspectionRuleRequest request); + /** * Updates the Url list with the given name in the network firewall policy. * @param request The request object containing the details to send diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/NetworkFirewallAsync.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/NetworkFirewallAsync.java index c4996c44a63..90d5a3ef857 100644 --- a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/NetworkFirewallAsync.java +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/NetworkFirewallAsync.java @@ -228,6 +228,25 @@ java.util.concurrent.Future bulkUploadServices( BulkUploadServicesRequest, BulkUploadServicesResponse> handler); + /** + * Creates a new Tunnel Inspection Rule at bulk for the Network Firewall Policy. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + bulkUploadTunnelInspectionRules( + BulkUploadTunnelInspectionRulesRequest request, + com.oracle.bmc.responses.AsyncHandler< + BulkUploadTunnelInspectionRulesRequest, + BulkUploadTunnelInspectionRulesResponse> + handler); + /** * Creates a new Url Lists at bulk for the Network Firewall Policy. * @@ -499,6 +518,23 @@ java.util.concurrent.Future createServiceList( CreateServiceListRequest, CreateServiceListResponse> handler); + /** + * Creates a new tunnel inspection rule for the network firewall policy. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createTunnelInspectionRule( + CreateTunnelInspectionRuleRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateTunnelInspectionRuleRequest, CreateTunnelInspectionRuleResponse> + handler); + /** * Creates a new Url List for the Network Firewall Policy. * @@ -690,6 +726,22 @@ java.util.concurrent.Future deleteServiceList( DeleteServiceListRequest, DeleteServiceListResponse> handler); + /** + * Deletes a tunnel inspection rule resource with the given identifier. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteTunnelInspectionRule( + DeleteTunnelInspectionRuleRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteTunnelInspectionRuleRequest, DeleteTunnelInspectionRuleResponse> + handler); + /** * Deletes a Url List resource with the given identifier. * @@ -874,6 +926,22 @@ java.util.concurrent.Future getServiceList( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Get tunnel inspection rule by the given name in the context of network firewall policy. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getTunnelInspectionRule( + GetTunnelInspectionRuleRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetTunnelInspectionRuleRequest, GetTunnelInspectionRuleResponse> + handler); + /** * Get Url List by the given name in the context of network firewall policy. * @@ -1086,6 +1154,23 @@ java.util.concurrent.Future listServices( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Returns a list of tunnel inspection rules for the network firewall policy. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listTunnelInspectionRules( + ListTunnelInspectionRulesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListTunnelInspectionRulesRequest, ListTunnelInspectionRulesResponse> + handler); + /** * Returns a list of URL lists for the Network Firewall Policy. * @@ -1344,6 +1429,22 @@ java.util.concurrent.Future updateServiceList( UpdateServiceListRequest, UpdateServiceListResponse> handler); + /** + * Updates the tunnel inspection rule with the given name in the network firewall policy. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateTunnelInspectionRule( + UpdateTunnelInspectionRuleRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateTunnelInspectionRuleRequest, UpdateTunnelInspectionRuleResponse> + handler); + /** * Updates the Url list with the given name in the network firewall policy. * diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/NetworkFirewallAsyncClient.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/NetworkFirewallAsyncClient.java index ce9a4cb928c..6a0005b2fab 100644 --- a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/NetworkFirewallAsyncClient.java +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/NetworkFirewallAsyncClient.java @@ -1112,6 +1112,77 @@ protected void beforeRetryAction() { } } + @Override + public java.util.concurrent.Future + bulkUploadTunnelInspectionRules( + BulkUploadTunnelInspectionRulesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + BulkUploadTunnelInspectionRulesRequest, + BulkUploadTunnelInspectionRulesResponse> + handler) { + LOG.trace("Called async bulkUploadTunnelInspectionRules"); + if (request.getRetryConfiguration() != null + || authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + request = + com.oracle.bmc.retrier.Retriers.wrapBodyInputStreamIfNecessary( + request, BulkUploadTunnelInspectionRulesRequest.builder()); + } + final BulkUploadTunnelInspectionRulesRequest interceptedRequest = + BulkUploadTunnelInspectionRulesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + BulkUploadTunnelInspectionRulesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "NetworkFirewall", + "BulkUploadTunnelInspectionRules", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/network-firewall/20230501/TunnelInspectionRule/BulkUploadTunnelInspectionRules"); + final java.util.function.Function< + javax.ws.rs.core.Response, BulkUploadTunnelInspectionRulesResponse> + transformer = + BulkUploadTunnelInspectionRulesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + BulkUploadTunnelInspectionRulesRequest, + BulkUploadTunnelInspectionRulesResponse> + handlerToUse = + new com.oracle.bmc.responses.internal.StreamClosingAsyncHandler<>(handler); + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + BulkUploadTunnelInspectionRulesRequest, + BulkUploadTunnelInspectionRulesResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getBulkUploadTunnelInspectionRulesDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + BulkUploadTunnelInspectionRulesRequest, + BulkUploadTunnelInspectionRulesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() { + LOG.debug("Resetting stream"); + com.oracle.bmc.retrier.Retriers.tryResetStreamForRetry( + interceptedRequest.getBulkUploadTunnelInspectionRulesDetails(), true); + } + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future bulkUploadUrlLists( BulkUploadUrlListsRequest request, @@ -1979,6 +2050,63 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + createTunnelInspectionRule( + CreateTunnelInspectionRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateTunnelInspectionRuleRequest, + CreateTunnelInspectionRuleResponse> + handler) { + LOG.trace("Called async createTunnelInspectionRule"); + final CreateTunnelInspectionRuleRequest interceptedRequest = + CreateTunnelInspectionRuleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateTunnelInspectionRuleConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "NetworkFirewall", + "CreateTunnelInspectionRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/network-firewall/20230501/TunnelInspectionRule/CreateTunnelInspectionRule"); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateTunnelInspectionRuleResponse> + transformer = + CreateTunnelInspectionRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateTunnelInspectionRuleRequest, CreateTunnelInspectionRuleResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateTunnelInspectionRuleRequest, + CreateTunnelInspectionRuleResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateTunnelInspectionRuleDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateTunnelInspectionRuleRequest, CreateTunnelInspectionRuleResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future createUrlList( CreateUrlListRequest request, @@ -2543,6 +2671,57 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + deleteTunnelInspectionRule( + DeleteTunnelInspectionRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteTunnelInspectionRuleRequest, + DeleteTunnelInspectionRuleResponse> + handler) { + LOG.trace("Called async deleteTunnelInspectionRule"); + final DeleteTunnelInspectionRuleRequest interceptedRequest = + DeleteTunnelInspectionRuleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteTunnelInspectionRuleConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "NetworkFirewall", + "DeleteTunnelInspectionRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/network-firewall/20230501/TunnelInspectionRule/DeleteTunnelInspectionRule"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteTunnelInspectionRuleResponse> + transformer = + DeleteTunnelInspectionRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteTunnelInspectionRuleRequest, DeleteTunnelInspectionRuleResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteTunnelInspectionRuleRequest, + DeleteTunnelInspectionRuleResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteTunnelInspectionRuleRequest, DeleteTunnelInspectionRuleResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteUrlList( DeleteUrlListRequest request, @@ -3091,6 +3270,54 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future getTunnelInspectionRule( + GetTunnelInspectionRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetTunnelInspectionRuleRequest, GetTunnelInspectionRuleResponse> + handler) { + LOG.trace("Called async getTunnelInspectionRule"); + final GetTunnelInspectionRuleRequest interceptedRequest = + GetTunnelInspectionRuleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetTunnelInspectionRuleConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "NetworkFirewall", + "GetTunnelInspectionRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/network-firewall/20230501/TunnelInspectionRule/GetTunnelInspectionRule"); + final java.util.function.Function< + javax.ws.rs.core.Response, GetTunnelInspectionRuleResponse> + transformer = + GetTunnelInspectionRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetTunnelInspectionRuleRequest, GetTunnelInspectionRuleResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetTunnelInspectionRuleRequest, GetTunnelInspectionRuleResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetTunnelInspectionRuleRequest, GetTunnelInspectionRuleResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getUrlList( GetUrlListRequest request, @@ -3692,6 +3919,55 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future listTunnelInspectionRules( + ListTunnelInspectionRulesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListTunnelInspectionRulesRequest, ListTunnelInspectionRulesResponse> + handler) { + LOG.trace("Called async listTunnelInspectionRules"); + final ListTunnelInspectionRulesRequest interceptedRequest = + ListTunnelInspectionRulesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListTunnelInspectionRulesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "NetworkFirewall", + "ListTunnelInspectionRules", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/network-firewall/20230501/TunnelInspectionRule/ListTunnelInspectionRules"); + final java.util.function.Function< + javax.ws.rs.core.Response, ListTunnelInspectionRulesResponse> + transformer = + ListTunnelInspectionRulesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListTunnelInspectionRulesRequest, ListTunnelInspectionRulesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListTunnelInspectionRulesRequest, + ListTunnelInspectionRulesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListTunnelInspectionRulesRequest, ListTunnelInspectionRulesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listUrlLists( ListUrlListsRequest request, @@ -4497,6 +4773,62 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + updateTunnelInspectionRule( + UpdateTunnelInspectionRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateTunnelInspectionRuleRequest, + UpdateTunnelInspectionRuleResponse> + handler) { + LOG.trace("Called async updateTunnelInspectionRule"); + final UpdateTunnelInspectionRuleRequest interceptedRequest = + UpdateTunnelInspectionRuleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateTunnelInspectionRuleConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "NetworkFirewall", + "UpdateTunnelInspectionRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/network-firewall/20230501/TunnelInspectionRule/UpdateTunnelInspectionRule"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateTunnelInspectionRuleResponse> + transformer = + UpdateTunnelInspectionRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateTunnelInspectionRuleRequest, UpdateTunnelInspectionRuleResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateTunnelInspectionRuleRequest, + UpdateTunnelInspectionRuleResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateTunnelInspectionRuleDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateTunnelInspectionRuleRequest, UpdateTunnelInspectionRuleResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateUrlList( UpdateUrlListRequest request, diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/NetworkFirewallClient.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/NetworkFirewallClient.java index dccc1f3a06b..51d33b3b612 100644 --- a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/NetworkFirewallClient.java +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/NetworkFirewallClient.java @@ -1278,6 +1278,84 @@ public BulkUploadServicesResponse bulkUploadServices(BulkUploadServicesRequest r } } + @Override + public BulkUploadTunnelInspectionRulesResponse bulkUploadTunnelInspectionRules( + BulkUploadTunnelInspectionRulesRequest request) { + LOG.trace("Called bulkUploadTunnelInspectionRules"); + try { + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + request.getRetryConfiguration(), retryConfiguration, true); + if (request.getRetryConfiguration() != null + || retryConfiguration != null + || shouldRetryBecauseOfWaiterConfiguration(retrier) + || authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + request = + com.oracle.bmc.retrier.Retriers.wrapBodyInputStreamIfNecessary( + request, BulkUploadTunnelInspectionRulesRequest.builder()); + } + final BulkUploadTunnelInspectionRulesRequest interceptedRequest = + BulkUploadTunnelInspectionRulesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + BulkUploadTunnelInspectionRulesConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "NetworkFirewall", + "BulkUploadTunnelInspectionRules", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/network-firewall/20230501/TunnelInspectionRule/BulkUploadTunnelInspectionRules"); + java.util.function.Function< + javax.ws.rs.core.Response, BulkUploadTunnelInspectionRulesResponse> + transformer = + BulkUploadTunnelInspectionRulesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + try { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getBulkUploadTunnelInspectionRulesDetails(), + retriedRequest); + return transformer.apply(response); + } catch (RuntimeException e) { + if (interceptedRequest.getRetryConfiguration() != null + || retryConfiguration != null + || shouldRetryBecauseOfWaiterConfiguration(retrier) + || (e instanceof com.oracle.bmc.model.BmcException + && tokenRefreshRetrier + .getRetryCondition() + .shouldBeRetried( + (com.oracle.bmc.model + .BmcException) + e))) { + com.oracle.bmc.retrier.Retriers.tryResetStreamForRetry( + interceptedRequest + .getBulkUploadTunnelInspectionRulesDetails(), + true); + } + throw e; // rethrow + } + }); + }); + } finally { + com.oracle.bmc.io.internal.KeepOpenInputStream.closeStream( + request.getBulkUploadTunnelInspectionRulesDetails()); + } + } + @Override public BulkUploadUrlListsResponse bulkUploadUrlLists(BulkUploadUrlListsRequest request) { LOG.trace("Called bulkUploadUrlLists"); @@ -1991,6 +2069,50 @@ public CreateServiceListResponse createServiceList(CreateServiceListRequest requ }); } + @Override + public CreateTunnelInspectionRuleResponse createTunnelInspectionRule( + CreateTunnelInspectionRuleRequest request) { + LOG.trace("Called createTunnelInspectionRule"); + final CreateTunnelInspectionRuleRequest interceptedRequest = + CreateTunnelInspectionRuleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateTunnelInspectionRuleConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "NetworkFirewall", + "CreateTunnelInspectionRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/network-firewall/20230501/TunnelInspectionRule/CreateTunnelInspectionRule"); + java.util.function.Function + transformer = + CreateTunnelInspectionRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getCreateTunnelInspectionRuleDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public CreateUrlListResponse createUrlList(CreateUrlListRequest request) { LOG.trace("Called createUrlList"); @@ -2451,6 +2573,45 @@ public DeleteServiceListResponse deleteServiceList(DeleteServiceListRequest requ }); } + @Override + public DeleteTunnelInspectionRuleResponse deleteTunnelInspectionRule( + DeleteTunnelInspectionRuleRequest request) { + LOG.trace("Called deleteTunnelInspectionRule"); + final DeleteTunnelInspectionRuleRequest interceptedRequest = + DeleteTunnelInspectionRuleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteTunnelInspectionRuleConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "NetworkFirewall", + "DeleteTunnelInspectionRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/network-firewall/20230501/TunnelInspectionRule/DeleteTunnelInspectionRule"); + java.util.function.Function + transformer = + DeleteTunnelInspectionRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DeleteUrlListResponse deleteUrlList(DeleteUrlListRequest request) { LOG.trace("Called deleteUrlList"); @@ -2886,6 +3047,44 @@ public GetServiceListResponse getServiceList(GetServiceListRequest request) { }); } + @Override + public GetTunnelInspectionRuleResponse getTunnelInspectionRule( + GetTunnelInspectionRuleRequest request) { + LOG.trace("Called getTunnelInspectionRule"); + final GetTunnelInspectionRuleRequest interceptedRequest = + GetTunnelInspectionRuleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetTunnelInspectionRuleConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "NetworkFirewall", + "GetTunnelInspectionRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/network-firewall/20230501/TunnelInspectionRule/GetTunnelInspectionRule"); + java.util.function.Function + transformer = + GetTunnelInspectionRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetUrlListResponse getUrlList(GetUrlListRequest request) { LOG.trace("Called getUrlList"); @@ -3363,6 +3562,44 @@ public ListServicesResponse listServices(ListServicesRequest request) { }); } + @Override + public ListTunnelInspectionRulesResponse listTunnelInspectionRules( + ListTunnelInspectionRulesRequest request) { + LOG.trace("Called listTunnelInspectionRules"); + final ListTunnelInspectionRulesRequest interceptedRequest = + ListTunnelInspectionRulesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListTunnelInspectionRulesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "NetworkFirewall", + "ListTunnelInspectionRules", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/network-firewall/20230501/TunnelInspectionRule/ListTunnelInspectionRules"); + java.util.function.Function + transformer = + ListTunnelInspectionRulesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListUrlListsResponse listUrlLists(ListUrlListsRequest request) { LOG.trace("Called listUrlLists"); @@ -4004,6 +4241,49 @@ public UpdateServiceListResponse updateServiceList(UpdateServiceListRequest requ }); } + @Override + public UpdateTunnelInspectionRuleResponse updateTunnelInspectionRule( + UpdateTunnelInspectionRuleRequest request) { + LOG.trace("Called updateTunnelInspectionRule"); + final UpdateTunnelInspectionRuleRequest interceptedRequest = + UpdateTunnelInspectionRuleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateTunnelInspectionRuleConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "NetworkFirewall", + "UpdateTunnelInspectionRule", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/network-firewall/20230501/TunnelInspectionRule/UpdateTunnelInspectionRule"); + java.util.function.Function + transformer = + UpdateTunnelInspectionRuleConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest + .getUpdateTunnelInspectionRuleDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateUrlListResponse updateUrlList(UpdateUrlListRequest request) { LOG.trace("Called updateUrlList"); diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/NetworkFirewallPaginators.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/NetworkFirewallPaginators.java index 02c7659318c..fddbe2a3bf7 100644 --- a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/NetworkFirewallPaginators.java +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/NetworkFirewallPaginators.java @@ -1299,6 +1299,127 @@ public ListServicesResponse apply(ListServicesRequest request) { }); } + /** + * Creates a new iterable which will iterate over the responses received from the listTunnelInspectionRules operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listTunnelInspectionRulesResponseIterator( + final ListTunnelInspectionRulesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListTunnelInspectionRulesRequest.Builder, ListTunnelInspectionRulesRequest, + ListTunnelInspectionRulesResponse>( + new java.util.function.Supplier() { + @Override + public ListTunnelInspectionRulesRequest.Builder get() { + return ListTunnelInspectionRulesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListTunnelInspectionRulesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListTunnelInspectionRulesRequest.Builder>, + ListTunnelInspectionRulesRequest>() { + @Override + public ListTunnelInspectionRulesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListTunnelInspectionRulesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListTunnelInspectionRulesRequest, ListTunnelInspectionRulesResponse>() { + @Override + public ListTunnelInspectionRulesResponse apply( + ListTunnelInspectionRulesRequest request) { + return client.listTunnelInspectionRules(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.networkfirewall.model.TunnelInspectionRuleSummary} objects + * contained in responses from the listTunnelInspectionRules operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.networkfirewall.model.TunnelInspectionRuleSummary} objects + * contained in responses received from the service. + */ + public Iterable + listTunnelInspectionRulesRecordIterator( + final ListTunnelInspectionRulesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListTunnelInspectionRulesRequest.Builder, ListTunnelInspectionRulesRequest, + ListTunnelInspectionRulesResponse, + com.oracle.bmc.networkfirewall.model.TunnelInspectionRuleSummary>( + new java.util.function.Supplier() { + @Override + public ListTunnelInspectionRulesRequest.Builder get() { + return ListTunnelInspectionRulesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListTunnelInspectionRulesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListTunnelInspectionRulesRequest.Builder>, + ListTunnelInspectionRulesRequest>() { + @Override + public ListTunnelInspectionRulesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListTunnelInspectionRulesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListTunnelInspectionRulesRequest, ListTunnelInspectionRulesResponse>() { + @Override + public ListTunnelInspectionRulesResponse apply( + ListTunnelInspectionRulesRequest request) { + return client.listTunnelInspectionRules(request); + } + }, + new java.util.function.Function< + ListTunnelInspectionRulesResponse, + java.util.List< + com.oracle.bmc.networkfirewall.model + .TunnelInspectionRuleSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.networkfirewall.model + .TunnelInspectionRuleSummary> + apply(ListTunnelInspectionRulesResponse response) { + return response.getTunnelInspectionRuleSummaryCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listUrlLists operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/internal/http/BulkUploadTunnelInspectionRulesConverter.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/internal/http/BulkUploadTunnelInspectionRulesConverter.java new file mode 100644 index 00000000000..b469f806752 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/internal/http/BulkUploadTunnelInspectionRulesConverter.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.networkfirewall.model.*; +import com.oracle.bmc.networkfirewall.requests.*; +import com.oracle.bmc.networkfirewall.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +public class BulkUploadTunnelInspectionRulesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(BulkUploadTunnelInspectionRulesConverter.class); + + public static com.oracle.bmc.networkfirewall.requests.BulkUploadTunnelInspectionRulesRequest + interceptRequest( + com.oracle.bmc.networkfirewall.requests.BulkUploadTunnelInspectionRulesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.networkfirewall.requests.BulkUploadTunnelInspectionRulesRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getNetworkFirewallPolicyId(), "networkFirewallPolicyId must not be blank"); + Validate.notNull( + request.getBulkUploadTunnelInspectionRulesDetails(), + "bulkUploadTunnelInspectionRulesDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230501") + .path("networkFirewallPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNetworkFirewallPolicyId())) + .path("tunnelInspectionRules") + .path("actions") + .path("bulkUpload"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses + .BulkUploadTunnelInspectionRulesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses + .BulkUploadTunnelInspectionRulesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses + .BulkUploadTunnelInspectionRulesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses + .BulkUploadTunnelInspectionRulesResponse>() { + @Override + public com.oracle.bmc.networkfirewall.responses + .BulkUploadTunnelInspectionRulesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.networkfirewall.responses.BulkUploadTunnelInspectionRulesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.networkfirewall.responses + .BulkUploadTunnelInspectionRulesResponse.Builder + builder = + com.oracle.bmc.networkfirewall.responses + .BulkUploadTunnelInspectionRulesResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.networkfirewall.responses + .BulkUploadTunnelInspectionRulesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/internal/http/CreateTunnelInspectionRuleConverter.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/internal/http/CreateTunnelInspectionRuleConverter.java new file mode 100644 index 00000000000..d9b2d6a056c --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/internal/http/CreateTunnelInspectionRuleConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.networkfirewall.model.*; +import com.oracle.bmc.networkfirewall.requests.*; +import com.oracle.bmc.networkfirewall.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +public class CreateTunnelInspectionRuleConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateTunnelInspectionRuleConverter.class); + + public static com.oracle.bmc.networkfirewall.requests.CreateTunnelInspectionRuleRequest + interceptRequest( + com.oracle.bmc.networkfirewall.requests.CreateTunnelInspectionRuleRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.networkfirewall.requests.CreateTunnelInspectionRuleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getNetworkFirewallPolicyId(), "networkFirewallPolicyId must not be blank"); + Validate.notNull( + request.getCreateTunnelInspectionRuleDetails(), + "createTunnelInspectionRuleDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230501") + .path("networkFirewallPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNetworkFirewallPolicyId())) + .path("tunnelInspectionRules"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses.CreateTunnelInspectionRuleResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses.CreateTunnelInspectionRuleResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses.CreateTunnelInspectionRuleResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses + .CreateTunnelInspectionRuleResponse>() { + @Override + public com.oracle.bmc.networkfirewall.responses + .CreateTunnelInspectionRuleResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.networkfirewall.responses.CreateTunnelInspectionRuleResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.networkfirewall.model + .TunnelInspectionRule>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.networkfirewall.model + .TunnelInspectionRule + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.networkfirewall.model + .TunnelInspectionRule + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.networkfirewall.model + .TunnelInspectionRule> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.networkfirewall.responses + .CreateTunnelInspectionRuleResponse.Builder + builder = + com.oracle.bmc.networkfirewall.responses + .CreateTunnelInspectionRuleResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.tunnelInspectionRule(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.networkfirewall.responses + .CreateTunnelInspectionRuleResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/internal/http/DeleteTunnelInspectionRuleConverter.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/internal/http/DeleteTunnelInspectionRuleConverter.java new file mode 100644 index 00000000000..f8f0f5ebb17 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/internal/http/DeleteTunnelInspectionRuleConverter.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.networkfirewall.model.*; +import com.oracle.bmc.networkfirewall.requests.*; +import com.oracle.bmc.networkfirewall.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +public class DeleteTunnelInspectionRuleConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteTunnelInspectionRuleConverter.class); + + public static com.oracle.bmc.networkfirewall.requests.DeleteTunnelInspectionRuleRequest + interceptRequest( + com.oracle.bmc.networkfirewall.requests.DeleteTunnelInspectionRuleRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.networkfirewall.requests.DeleteTunnelInspectionRuleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getNetworkFirewallPolicyId(), "networkFirewallPolicyId must not be blank"); + Validate.notBlank( + request.getTunnelInspectionRuleName(), + "tunnelInspectionRuleName must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230501") + .path("networkFirewallPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNetworkFirewallPolicyId())) + .path("tunnelInspectionRules") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getTunnelInspectionRuleName())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses.DeleteTunnelInspectionRuleResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses.DeleteTunnelInspectionRuleResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses.DeleteTunnelInspectionRuleResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses + .DeleteTunnelInspectionRuleResponse>() { + @Override + public com.oracle.bmc.networkfirewall.responses + .DeleteTunnelInspectionRuleResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.networkfirewall.responses.DeleteTunnelInspectionRuleResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.networkfirewall.responses + .DeleteTunnelInspectionRuleResponse.Builder + builder = + com.oracle.bmc.networkfirewall.responses + .DeleteTunnelInspectionRuleResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.networkfirewall.responses + .DeleteTunnelInspectionRuleResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/internal/http/GetTunnelInspectionRuleConverter.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/internal/http/GetTunnelInspectionRuleConverter.java new file mode 100644 index 00000000000..00f0513a5ff --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/internal/http/GetTunnelInspectionRuleConverter.java @@ -0,0 +1,159 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.networkfirewall.model.*; +import com.oracle.bmc.networkfirewall.requests.*; +import com.oracle.bmc.networkfirewall.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +public class GetTunnelInspectionRuleConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetTunnelInspectionRuleConverter.class); + + public static com.oracle.bmc.networkfirewall.requests.GetTunnelInspectionRuleRequest + interceptRequest( + com.oracle.bmc.networkfirewall.requests.GetTunnelInspectionRuleRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.networkfirewall.requests.GetTunnelInspectionRuleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getNetworkFirewallPolicyId(), "networkFirewallPolicyId must not be blank"); + Validate.notBlank( + request.getTunnelInspectionRuleName(), + "tunnelInspectionRuleName must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230501") + .path("networkFirewallPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNetworkFirewallPolicyId())) + .path("tunnelInspectionRules") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getTunnelInspectionRuleName())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses.GetTunnelInspectionRuleResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses.GetTunnelInspectionRuleResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses.GetTunnelInspectionRuleResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses + .GetTunnelInspectionRuleResponse>() { + @Override + public com.oracle.bmc.networkfirewall.responses + .GetTunnelInspectionRuleResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.networkfirewall.responses.GetTunnelInspectionRuleResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.networkfirewall.model + .TunnelInspectionRule>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.networkfirewall.model + .TunnelInspectionRule + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.networkfirewall.model + .TunnelInspectionRule + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.networkfirewall.model + .TunnelInspectionRule> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.networkfirewall.responses + .GetTunnelInspectionRuleResponse.Builder + builder = + com.oracle.bmc.networkfirewall.responses + .GetTunnelInspectionRuleResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.tunnelInspectionRule(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.networkfirewall.responses + .GetTunnelInspectionRuleResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/internal/http/ListTunnelInspectionRulesConverter.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/internal/http/ListTunnelInspectionRulesConverter.java new file mode 100644 index 00000000000..21f9c2ab59f --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/internal/http/ListTunnelInspectionRulesConverter.java @@ -0,0 +1,236 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.networkfirewall.model.*; +import com.oracle.bmc.networkfirewall.requests.*; +import com.oracle.bmc.networkfirewall.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +public class ListTunnelInspectionRulesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListTunnelInspectionRulesConverter.class); + + public static com.oracle.bmc.networkfirewall.requests.ListTunnelInspectionRulesRequest + interceptRequest( + com.oracle.bmc.networkfirewall.requests.ListTunnelInspectionRulesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.networkfirewall.requests.ListTunnelInspectionRulesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getNetworkFirewallPolicyId(), "networkFirewallPolicyId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230501") + .path("networkFirewallPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNetworkFirewallPolicyId())) + .path("tunnelInspectionRules"); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getTunnelInspectionRulePriorityOrder() != null) { + target = + target.queryParam( + "tunnelInspectionRulePriorityOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTunnelInspectionRulePriorityOrder())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses.ListTunnelInspectionRulesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses.ListTunnelInspectionRulesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses.ListTunnelInspectionRulesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses + .ListTunnelInspectionRulesResponse>() { + @Override + public com.oracle.bmc.networkfirewall.responses + .ListTunnelInspectionRulesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.networkfirewall.responses.ListTunnelInspectionRulesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.networkfirewall.model + .TunnelInspectionRuleSummaryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.networkfirewall.model + .TunnelInspectionRuleSummaryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.networkfirewall.model + .TunnelInspectionRuleSummaryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.networkfirewall.model + .TunnelInspectionRuleSummaryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.networkfirewall.responses + .ListTunnelInspectionRulesResponse.Builder + builder = + com.oracle.bmc.networkfirewall.responses + .ListTunnelInspectionRulesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.tunnelInspectionRuleSummaryCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcPrevPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-prev-page"); + if (opcPrevPageHeader.isPresent()) { + builder.opcPrevPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-prev-page", + opcPrevPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcPageCountHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-page-count"); + if (opcPageCountHeader.isPresent()) { + builder.opcPageCount( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-page-count", + opcPageCountHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcTotalItemsHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-total-items"); + if (opcTotalItemsHeader.isPresent()) { + builder.opcTotalItems( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-total-items", + opcTotalItemsHeader.get().get(0), + Integer.class)); + } + + com.oracle.bmc.networkfirewall.responses + .ListTunnelInspectionRulesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/internal/http/UpdateTunnelInspectionRuleConverter.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/internal/http/UpdateTunnelInspectionRuleConverter.java new file mode 100644 index 00000000000..7422f4c71cd --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/internal/http/UpdateTunnelInspectionRuleConverter.java @@ -0,0 +1,167 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.networkfirewall.model.*; +import com.oracle.bmc.networkfirewall.requests.*; +import com.oracle.bmc.networkfirewall.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +public class UpdateTunnelInspectionRuleConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateTunnelInspectionRuleConverter.class); + + public static com.oracle.bmc.networkfirewall.requests.UpdateTunnelInspectionRuleRequest + interceptRequest( + com.oracle.bmc.networkfirewall.requests.UpdateTunnelInspectionRuleRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.networkfirewall.requests.UpdateTunnelInspectionRuleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getNetworkFirewallPolicyId(), "networkFirewallPolicyId must not be blank"); + Validate.notBlank( + request.getTunnelInspectionRuleName(), + "tunnelInspectionRuleName must not be blank"); + Validate.notNull( + request.getUpdateTunnelInspectionRuleDetails(), + "updateTunnelInspectionRuleDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20230501") + .path("networkFirewallPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNetworkFirewallPolicyId())) + .path("tunnelInspectionRules") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getTunnelInspectionRuleName())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses.UpdateTunnelInspectionRuleResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses.UpdateTunnelInspectionRuleResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses.UpdateTunnelInspectionRuleResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.networkfirewall.responses + .UpdateTunnelInspectionRuleResponse>() { + @Override + public com.oracle.bmc.networkfirewall.responses + .UpdateTunnelInspectionRuleResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.networkfirewall.responses.UpdateTunnelInspectionRuleResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.networkfirewall.model + .TunnelInspectionRule>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.networkfirewall.model + .TunnelInspectionRule + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.networkfirewall.model + .TunnelInspectionRule + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.networkfirewall.model + .TunnelInspectionRule> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.networkfirewall.responses + .UpdateTunnelInspectionRuleResponse.Builder + builder = + com.oracle.bmc.networkfirewall.responses + .UpdateTunnelInspectionRuleResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.tunnelInspectionRule(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.networkfirewall.responses + .UpdateTunnelInspectionRuleResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/CreateTunnelInspectionRuleDetails.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/CreateTunnelInspectionRuleDetails.java new file mode 100644 index 00000000000..87db852afcc --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/CreateTunnelInspectionRuleDetails.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.model; + +/** + * Request for creating Tunnel Inspection Rule used in the firewall policy rules. + * Tunnel Inspection Rule determines whether tunnel inspection is applied on the traffic based on attributes + * such as Tunnel Inspection protocol, the source and destination IP address. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "protocol", + defaultImpl = CreateTunnelInspectionRuleDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateVxlanInspectionRuleDetails.class, + name = "VXLAN" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CreateTunnelInspectionRuleDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "action", "position"}) + protected CreateTunnelInspectionRuleDetails( + String name, InspectActionType action, RulePosition position) { + super(); + this.name = name; + this.action = action; + this.position = position; + } + + /** + * Name for the Tunnel Inspection Rule, must be unique within the policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name for the Tunnel Inspection Rule, must be unique within the policy. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Types of Inspect Action on the traffic flow. + *

+ * INSPECT - Inspect the traffic. + * * INSPECT_AND_CAPTURE_LOG - Inspect and capture logs for the traffic. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("action") + private final InspectActionType action; + + /** + * Types of Inspect Action on the traffic flow. + *

+ * INSPECT - Inspect the traffic. + * * INSPECT_AND_CAPTURE_LOG - Inspect and capture logs for the traffic. + * + * @return the value + **/ + public InspectActionType getAction() { + return action; + } + + @com.fasterxml.jackson.annotation.JsonProperty("position") + private final RulePosition position; + + public RulePosition getPosition() { + return position; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateTunnelInspectionRuleDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", action=").append(String.valueOf(this.action)); + sb.append(", position=").append(String.valueOf(this.position)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateTunnelInspectionRuleDetails)) { + return false; + } + + CreateTunnelInspectionRuleDetails other = (CreateTunnelInspectionRuleDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.action, other.action) + && java.util.Objects.equals(this.position, other.position) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.action == null ? 43 : this.action.hashCode()); + result = (result * PRIME) + (this.position == null ? 43 : this.position.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/CreateVxlanInspectionRuleDetails.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/CreateVxlanInspectionRuleDetails.java new file mode 100644 index 00000000000..222aac631d9 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/CreateVxlanInspectionRuleDetails.java @@ -0,0 +1,190 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.model; + +/** + * Request for creating Vxlan Tunnel Inspection Rule used in the firewall policy rules. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateVxlanInspectionRuleDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "protocol" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateVxlanInspectionRuleDetails extends CreateTunnelInspectionRuleDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("action") + private InspectActionType action; + + public Builder action(InspectActionType action) { + this.action = action; + this.__explicitlySet__.add("action"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("position") + private RulePosition position; + + public Builder position(RulePosition position) { + this.position = position; + this.__explicitlySet__.add("position"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("condition") + private VxlanInspectionRuleMatchCriteria condition; + + public Builder condition(VxlanInspectionRuleMatchCriteria condition) { + this.condition = condition; + this.__explicitlySet__.add("condition"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("profile") + private VxlanInspectionRuleProfile profile; + + public Builder profile(VxlanInspectionRuleProfile profile) { + this.profile = profile; + this.__explicitlySet__.add("profile"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateVxlanInspectionRuleDetails build() { + CreateVxlanInspectionRuleDetails model = + new CreateVxlanInspectionRuleDetails( + this.name, this.action, this.position, this.condition, this.profile); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateVxlanInspectionRuleDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("action")) { + this.action(model.getAction()); + } + if (model.wasPropertyExplicitlySet("position")) { + this.position(model.getPosition()); + } + if (model.wasPropertyExplicitlySet("condition")) { + this.condition(model.getCondition()); + } + if (model.wasPropertyExplicitlySet("profile")) { + this.profile(model.getProfile()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateVxlanInspectionRuleDetails( + String name, + InspectActionType action, + RulePosition position, + VxlanInspectionRuleMatchCriteria condition, + VxlanInspectionRuleProfile profile) { + super(name, action, position); + this.condition = condition; + this.profile = profile; + } + + @com.fasterxml.jackson.annotation.JsonProperty("condition") + private final VxlanInspectionRuleMatchCriteria condition; + + public VxlanInspectionRuleMatchCriteria getCondition() { + return condition; + } + + @com.fasterxml.jackson.annotation.JsonProperty("profile") + private final VxlanInspectionRuleProfile profile; + + public VxlanInspectionRuleProfile getProfile() { + return profile; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateVxlanInspectionRuleDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", condition=").append(String.valueOf(this.condition)); + sb.append(", profile=").append(String.valueOf(this.profile)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateVxlanInspectionRuleDetails)) { + return false; + } + + CreateVxlanInspectionRuleDetails other = (CreateVxlanInspectionRuleDetails) o; + return java.util.Objects.equals(this.condition, other.condition) + && java.util.Objects.equals(this.profile, other.profile) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.condition == null ? 43 : this.condition.hashCode()); + result = (result * PRIME) + (this.profile == null ? 43 : this.profile.hashCode()); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/InspectActionType.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/InspectActionType.java new file mode 100644 index 00000000000..17572bd8476 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/InspectActionType.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.model; + +/** + * Types of Inspect Action on the traffic flow. + *

+ * INSPECT - Inspect the traffic. + * * INSPECT_AND_CAPTURE_LOG - Inspect and capture logs for the traffic. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +public enum InspectActionType { + Inspect("INSPECT"), + InspectAndCaptureLog("INSPECT_AND_CAPTURE_LOG"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(InspectActionType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (InspectActionType v : InspectActionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + InspectActionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static InspectActionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'InspectActionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/TunnelInspectionProtocol.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/TunnelInspectionProtocol.java new file mode 100644 index 00000000000..6d9ec51edc2 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/TunnelInspectionProtocol.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.model; + +/** + * Types of Tunnel Inspection Protocol to be applied on the traffic. + *

+ * VXLAN - VXLAN Tunnel Inspection Protocol will be applied on the traffic. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +public enum TunnelInspectionProtocol { + Vxlan("VXLAN"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(TunnelInspectionProtocol.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (TunnelInspectionProtocol v : TunnelInspectionProtocol.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + TunnelInspectionProtocol(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static TunnelInspectionProtocol create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'TunnelInspectionProtocol', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/TunnelInspectionRule.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/TunnelInspectionRule.java new file mode 100644 index 00000000000..c46225965d7 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/TunnelInspectionRule.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.model; + +/** + * Tunnel Inspection Rule used in the firewall policy rules. + * Tunnel Inspection Rule determines whether tunnel inspection is applied on the traffic based on attributes + * such as Tunnel Inspect protocol, the source and destination IP addresses. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "protocol", + defaultImpl = TunnelInspectionRule.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = VxlanInspectionRule.class, + name = "VXLAN" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class TunnelInspectionRule extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "action", + "priorityOrder", + "position", + "parentResourceId" + }) + protected TunnelInspectionRule( + String name, + InspectActionType action, + Long priorityOrder, + RulePosition position, + String parentResourceId) { + super(); + this.name = name; + this.action = action; + this.priorityOrder = priorityOrder; + this.position = position; + this.parentResourceId = parentResourceId; + } + + /** + * Name for the Tunnel Inspection Rule, must be unique within the policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name for the Tunnel Inspection Rule, must be unique within the policy. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Types of Inspect Action on the Traffic flow. + *

+ * INSPECT - Inspect the traffic. + * * INSPECT_AND_CAPTURE_LOG - Inspect and capture logs for the traffic. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("action") + private final InspectActionType action; + + /** + * Types of Inspect Action on the Traffic flow. + *

+ * INSPECT - Inspect the traffic. + * * INSPECT_AND_CAPTURE_LOG - Inspect and capture logs for the traffic. + * + * @return the value + **/ + public InspectActionType getAction() { + return action; + } + + /** + * The priority order in which this rule should be evaluated + **/ + @com.fasterxml.jackson.annotation.JsonProperty("priorityOrder") + private final Long priorityOrder; + + /** + * The priority order in which this rule should be evaluated + * @return the value + **/ + public Long getPriorityOrder() { + return priorityOrder; + } + + @com.fasterxml.jackson.annotation.JsonProperty("position") + private final RulePosition position; + + public RulePosition getPosition() { + return position; + } + + /** + * OCID of the Network Firewall Policy this Tunnel Inspection Rule belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentResourceId") + private final String parentResourceId; + + /** + * OCID of the Network Firewall Policy this Tunnel Inspection Rule belongs to. + * @return the value + **/ + public String getParentResourceId() { + return parentResourceId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TunnelInspectionRule("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", action=").append(String.valueOf(this.action)); + sb.append(", priorityOrder=").append(String.valueOf(this.priorityOrder)); + sb.append(", position=").append(String.valueOf(this.position)); + sb.append(", parentResourceId=").append(String.valueOf(this.parentResourceId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TunnelInspectionRule)) { + return false; + } + + TunnelInspectionRule other = (TunnelInspectionRule) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.action, other.action) + && java.util.Objects.equals(this.priorityOrder, other.priorityOrder) + && java.util.Objects.equals(this.position, other.position) + && java.util.Objects.equals(this.parentResourceId, other.parentResourceId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.action == null ? 43 : this.action.hashCode()); + result = + (result * PRIME) + + (this.priorityOrder == null ? 43 : this.priorityOrder.hashCode()); + result = (result * PRIME) + (this.position == null ? 43 : this.position.hashCode()); + result = + (result * PRIME) + + (this.parentResourceId == null ? 43 : this.parentResourceId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/TunnelInspectionRuleSummary.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/TunnelInspectionRuleSummary.java new file mode 100644 index 00000000000..2240f361b94 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/TunnelInspectionRuleSummary.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.model; + +/** + * Summary for the Tunnel Inspection Rule used in the firewall policy rules. + * Tunnel Inspection Rule determines whether tunnel inspection is applied on the traffic based on attributes + * such as Tunnel Inspect protocol, the source and destination IP address. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "protocol", + defaultImpl = TunnelInspectionRuleSummary.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = VxlanInspectionRuleSummary.class, + name = "VXLAN" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class TunnelInspectionRuleSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "action", "priorityOrder", "parentResourceId"}) + protected TunnelInspectionRuleSummary( + String name, InspectActionType action, Long priorityOrder, String parentResourceId) { + super(); + this.name = name; + this.action = action; + this.priorityOrder = priorityOrder; + this.parentResourceId = parentResourceId; + } + + /** + * Name for the Tunnel Inspection Rule, must be unique within the policy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name for the Tunnel Inspection Rule, must be unique within the policy. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Types of Inspect Action on the Traffic flow. + *

+ * INSPECT - Inspect the traffic. + * * INSPECT_AND_CAPTURE_LOG - Inspect and capture logs for the traffic. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("action") + private final InspectActionType action; + + /** + * Types of Inspect Action on the Traffic flow. + *

+ * INSPECT - Inspect the traffic. + * * INSPECT_AND_CAPTURE_LOG - Inspect and capture logs for the traffic. + * + * @return the value + **/ + public InspectActionType getAction() { + return action; + } + + /** + * The priority order in which this rule should be evaluated + **/ + @com.fasterxml.jackson.annotation.JsonProperty("priorityOrder") + private final Long priorityOrder; + + /** + * The priority order in which this rule should be evaluated + * @return the value + **/ + public Long getPriorityOrder() { + return priorityOrder; + } + + /** + * OCID of the Network Firewall Policy this Tunnel Inspection Rule belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentResourceId") + private final String parentResourceId; + + /** + * OCID of the Network Firewall Policy this Tunnel Inspection Rule belongs to. + * @return the value + **/ + public String getParentResourceId() { + return parentResourceId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TunnelInspectionRuleSummary("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", action=").append(String.valueOf(this.action)); + sb.append(", priorityOrder=").append(String.valueOf(this.priorityOrder)); + sb.append(", parentResourceId=").append(String.valueOf(this.parentResourceId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TunnelInspectionRuleSummary)) { + return false; + } + + TunnelInspectionRuleSummary other = (TunnelInspectionRuleSummary) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.action, other.action) + && java.util.Objects.equals(this.priorityOrder, other.priorityOrder) + && java.util.Objects.equals(this.parentResourceId, other.parentResourceId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.action == null ? 43 : this.action.hashCode()); + result = + (result * PRIME) + + (this.priorityOrder == null ? 43 : this.priorityOrder.hashCode()); + result = + (result * PRIME) + + (this.parentResourceId == null ? 43 : this.parentResourceId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/TunnelInspectionRuleSummaryCollection.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/TunnelInspectionRuleSummaryCollection.java new file mode 100644 index 00000000000..96bcdfb47d4 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/TunnelInspectionRuleSummaryCollection.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.model; + +/** + * Collection of Tunnel Inspection Rule Summaries in the network firewall policy + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = TunnelInspectionRuleSummaryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class TunnelInspectionRuleSummaryCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public TunnelInspectionRuleSummaryCollection( + java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Collection of Tunnel Inspection Rule Summaries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * Collection of Tunnel Inspection Rule Summaries. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public TunnelInspectionRuleSummaryCollection build() { + TunnelInspectionRuleSummaryCollection model = + new TunnelInspectionRuleSummaryCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(TunnelInspectionRuleSummaryCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Collection of Tunnel Inspection Rule Summaries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * Collection of Tunnel Inspection Rule Summaries. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TunnelInspectionRuleSummaryCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TunnelInspectionRuleSummaryCollection)) { + return false; + } + + TunnelInspectionRuleSummaryCollection other = (TunnelInspectionRuleSummaryCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/UpdateTunnelInspectionRuleDetails.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/UpdateTunnelInspectionRuleDetails.java new file mode 100644 index 00000000000..711602b6e35 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/UpdateTunnelInspectionRuleDetails.java @@ -0,0 +1,117 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.model; + +/** + * Update Request for creating Tunnel Inspection Rule used in the firewall policy rules. + * Tunnel Inspection Rule determines whether tunnel inspection is applied on the traffic based on attributes + * such as Tunnel Inspect protocol, the source and destination IP address. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "protocol", + defaultImpl = UpdateTunnelInspectionRuleDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = UpdateVxlanInspectionRuleDetails.class, + name = "VXLAN" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class UpdateTunnelInspectionRuleDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"action", "position"}) + protected UpdateTunnelInspectionRuleDetails(InspectActionType action, RulePosition position) { + super(); + this.action = action; + this.position = position; + } + + /** + * Types of Inspect Action on the Traffic flow. + *

+ * INSPECT - Inspect the traffic. + * * INSPECT_AND_CAPTURE_LOG - Inspect and capture logs for the traffic. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("action") + private final InspectActionType action; + + /** + * Types of Inspect Action on the Traffic flow. + *

+ * INSPECT - Inspect the traffic. + * * INSPECT_AND_CAPTURE_LOG - Inspect and capture logs for the traffic. + * + * @return the value + **/ + public InspectActionType getAction() { + return action; + } + + @com.fasterxml.jackson.annotation.JsonProperty("position") + private final RulePosition position; + + public RulePosition getPosition() { + return position; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateTunnelInspectionRuleDetails("); + sb.append("super=").append(super.toString()); + sb.append("action=").append(String.valueOf(this.action)); + sb.append(", position=").append(String.valueOf(this.position)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateTunnelInspectionRuleDetails)) { + return false; + } + + UpdateTunnelInspectionRuleDetails other = (UpdateTunnelInspectionRuleDetails) o; + return java.util.Objects.equals(this.action, other.action) + && java.util.Objects.equals(this.position, other.position) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.action == null ? 43 : this.action.hashCode()); + result = (result * PRIME) + (this.position == null ? 43 : this.position.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/UpdateVxlanInspectionRuleDetails.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/UpdateVxlanInspectionRuleDetails.java new file mode 100644 index 00000000000..1da4e241871 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/UpdateVxlanInspectionRuleDetails.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.model; + +/** + * Update Request for creating Vxlan Tunnel Inspection Rule used in the firewall policy rules. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateVxlanInspectionRuleDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "protocol" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateVxlanInspectionRuleDetails extends UpdateTunnelInspectionRuleDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("action") + private InspectActionType action; + + public Builder action(InspectActionType action) { + this.action = action; + this.__explicitlySet__.add("action"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("position") + private RulePosition position; + + public Builder position(RulePosition position) { + this.position = position; + this.__explicitlySet__.add("position"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("condition") + private VxlanInspectionRuleMatchCriteria condition; + + public Builder condition(VxlanInspectionRuleMatchCriteria condition) { + this.condition = condition; + this.__explicitlySet__.add("condition"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("profile") + private VxlanInspectionRuleProfile profile; + + public Builder profile(VxlanInspectionRuleProfile profile) { + this.profile = profile; + this.__explicitlySet__.add("profile"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateVxlanInspectionRuleDetails build() { + UpdateVxlanInspectionRuleDetails model = + new UpdateVxlanInspectionRuleDetails( + this.action, this.position, this.condition, this.profile); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateVxlanInspectionRuleDetails model) { + if (model.wasPropertyExplicitlySet("action")) { + this.action(model.getAction()); + } + if (model.wasPropertyExplicitlySet("position")) { + this.position(model.getPosition()); + } + if (model.wasPropertyExplicitlySet("condition")) { + this.condition(model.getCondition()); + } + if (model.wasPropertyExplicitlySet("profile")) { + this.profile(model.getProfile()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public UpdateVxlanInspectionRuleDetails( + InspectActionType action, + RulePosition position, + VxlanInspectionRuleMatchCriteria condition, + VxlanInspectionRuleProfile profile) { + super(action, position); + this.condition = condition; + this.profile = profile; + } + + @com.fasterxml.jackson.annotation.JsonProperty("condition") + private final VxlanInspectionRuleMatchCriteria condition; + + public VxlanInspectionRuleMatchCriteria getCondition() { + return condition; + } + + @com.fasterxml.jackson.annotation.JsonProperty("profile") + private final VxlanInspectionRuleProfile profile; + + public VxlanInspectionRuleProfile getProfile() { + return profile; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateVxlanInspectionRuleDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", condition=").append(String.valueOf(this.condition)); + sb.append(", profile=").append(String.valueOf(this.profile)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateVxlanInspectionRuleDetails)) { + return false; + } + + UpdateVxlanInspectionRuleDetails other = (UpdateVxlanInspectionRuleDetails) o; + return java.util.Objects.equals(this.condition, other.condition) + && java.util.Objects.equals(this.profile, other.profile) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.condition == null ? 43 : this.condition.hashCode()); + result = (result * PRIME) + (this.profile == null ? 43 : this.profile.hashCode()); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/VxlanInspectionRule.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/VxlanInspectionRule.java new file mode 100644 index 00000000000..82db4f5bc6a --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/VxlanInspectionRule.java @@ -0,0 +1,222 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.model; + +/** + * Vxlan Tunnel Inspection Rule used on the firewall policy rules. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = VxlanInspectionRule.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "protocol" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class VxlanInspectionRule extends TunnelInspectionRule { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("action") + private InspectActionType action; + + public Builder action(InspectActionType action) { + this.action = action; + this.__explicitlySet__.add("action"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("priorityOrder") + private Long priorityOrder; + + public Builder priorityOrder(Long priorityOrder) { + this.priorityOrder = priorityOrder; + this.__explicitlySet__.add("priorityOrder"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("position") + private RulePosition position; + + public Builder position(RulePosition position) { + this.position = position; + this.__explicitlySet__.add("position"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("parentResourceId") + private String parentResourceId; + + public Builder parentResourceId(String parentResourceId) { + this.parentResourceId = parentResourceId; + this.__explicitlySet__.add("parentResourceId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("condition") + private VxlanInspectionRuleMatchCriteria condition; + + public Builder condition(VxlanInspectionRuleMatchCriteria condition) { + this.condition = condition; + this.__explicitlySet__.add("condition"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("profile") + private VxlanInspectionRuleProfile profile; + + public Builder profile(VxlanInspectionRuleProfile profile) { + this.profile = profile; + this.__explicitlySet__.add("profile"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public VxlanInspectionRule build() { + VxlanInspectionRule model = + new VxlanInspectionRule( + this.name, + this.action, + this.priorityOrder, + this.position, + this.parentResourceId, + this.condition, + this.profile); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(VxlanInspectionRule model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("action")) { + this.action(model.getAction()); + } + if (model.wasPropertyExplicitlySet("priorityOrder")) { + this.priorityOrder(model.getPriorityOrder()); + } + if (model.wasPropertyExplicitlySet("position")) { + this.position(model.getPosition()); + } + if (model.wasPropertyExplicitlySet("parentResourceId")) { + this.parentResourceId(model.getParentResourceId()); + } + if (model.wasPropertyExplicitlySet("condition")) { + this.condition(model.getCondition()); + } + if (model.wasPropertyExplicitlySet("profile")) { + this.profile(model.getProfile()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public VxlanInspectionRule( + String name, + InspectActionType action, + Long priorityOrder, + RulePosition position, + String parentResourceId, + VxlanInspectionRuleMatchCriteria condition, + VxlanInspectionRuleProfile profile) { + super(name, action, priorityOrder, position, parentResourceId); + this.condition = condition; + this.profile = profile; + } + + @com.fasterxml.jackson.annotation.JsonProperty("condition") + private final VxlanInspectionRuleMatchCriteria condition; + + public VxlanInspectionRuleMatchCriteria getCondition() { + return condition; + } + + @com.fasterxml.jackson.annotation.JsonProperty("profile") + private final VxlanInspectionRuleProfile profile; + + public VxlanInspectionRuleProfile getProfile() { + return profile; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("VxlanInspectionRule("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", condition=").append(String.valueOf(this.condition)); + sb.append(", profile=").append(String.valueOf(this.profile)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof VxlanInspectionRule)) { + return false; + } + + VxlanInspectionRule other = (VxlanInspectionRule) o; + return java.util.Objects.equals(this.condition, other.condition) + && java.util.Objects.equals(this.profile, other.profile) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.condition == null ? 43 : this.condition.hashCode()); + result = (result * PRIME) + (this.profile == null ? 43 : this.profile.hashCode()); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/VxlanInspectionRuleMatchCriteria.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/VxlanInspectionRuleMatchCriteria.java new file mode 100644 index 00000000000..e51930d050e --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/VxlanInspectionRuleMatchCriteria.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.model; + +/** + * Criteria to evaluate against incoming network traffic. + * A match occurs when at least one item in the array associated with each specified property corresponds with the relevant aspect of the traffic. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = VxlanInspectionRuleMatchCriteria.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class VxlanInspectionRuleMatchCriteria + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"sourceAddress", "destinationAddress"}) + public VxlanInspectionRuleMatchCriteria( + java.util.List sourceAddress, java.util.List destinationAddress) { + super(); + this.sourceAddress = sourceAddress; + this.destinationAddress = destinationAddress; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * An array of address list names to be evaluated against the traffic source address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceAddress") + private java.util.List sourceAddress; + + /** + * An array of address list names to be evaluated against the traffic source address. + * @param sourceAddress the value to set + * @return this builder + **/ + public Builder sourceAddress(java.util.List sourceAddress) { + this.sourceAddress = sourceAddress; + this.__explicitlySet__.add("sourceAddress"); + return this; + } + /** + * An array of address list names to be evaluated against the traffic destination address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationAddress") + private java.util.List destinationAddress; + + /** + * An array of address list names to be evaluated against the traffic destination address. + * @param destinationAddress the value to set + * @return this builder + **/ + public Builder destinationAddress(java.util.List destinationAddress) { + this.destinationAddress = destinationAddress; + this.__explicitlySet__.add("destinationAddress"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public VxlanInspectionRuleMatchCriteria build() { + VxlanInspectionRuleMatchCriteria model = + new VxlanInspectionRuleMatchCriteria( + this.sourceAddress, this.destinationAddress); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(VxlanInspectionRuleMatchCriteria model) { + if (model.wasPropertyExplicitlySet("sourceAddress")) { + this.sourceAddress(model.getSourceAddress()); + } + if (model.wasPropertyExplicitlySet("destinationAddress")) { + this.destinationAddress(model.getDestinationAddress()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * An array of address list names to be evaluated against the traffic source address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceAddress") + private final java.util.List sourceAddress; + + /** + * An array of address list names to be evaluated against the traffic source address. + * @return the value + **/ + public java.util.List getSourceAddress() { + return sourceAddress; + } + + /** + * An array of address list names to be evaluated against the traffic destination address. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationAddress") + private final java.util.List destinationAddress; + + /** + * An array of address list names to be evaluated against the traffic destination address. + * @return the value + **/ + public java.util.List getDestinationAddress() { + return destinationAddress; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("VxlanInspectionRuleMatchCriteria("); + sb.append("super=").append(super.toString()); + sb.append("sourceAddress=").append(String.valueOf(this.sourceAddress)); + sb.append(", destinationAddress=").append(String.valueOf(this.destinationAddress)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof VxlanInspectionRuleMatchCriteria)) { + return false; + } + + VxlanInspectionRuleMatchCriteria other = (VxlanInspectionRuleMatchCriteria) o; + return java.util.Objects.equals(this.sourceAddress, other.sourceAddress) + && java.util.Objects.equals(this.destinationAddress, other.destinationAddress) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.sourceAddress == null ? 43 : this.sourceAddress.hashCode()); + result = + (result * PRIME) + + (this.destinationAddress == null + ? 43 + : this.destinationAddress.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/VxlanInspectionRuleProfile.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/VxlanInspectionRuleProfile.java new file mode 100644 index 00000000000..f7c199add06 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/VxlanInspectionRuleProfile.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.model; + +/** + * Vxlan Inspect profile used in Vxlan Tunnel Inspection Rules. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = VxlanInspectionRuleProfile.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class VxlanInspectionRuleProfile + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"mustReturnTrafficToSource"}) + public VxlanInspectionRuleProfile(Boolean mustReturnTrafficToSource) { + super(); + this.mustReturnTrafficToSource = mustReturnTrafficToSource; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Return scanned VXLAN tunnel traffic to source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mustReturnTrafficToSource") + private Boolean mustReturnTrafficToSource; + + /** + * Return scanned VXLAN tunnel traffic to source. + * @param mustReturnTrafficToSource the value to set + * @return this builder + **/ + public Builder mustReturnTrafficToSource(Boolean mustReturnTrafficToSource) { + this.mustReturnTrafficToSource = mustReturnTrafficToSource; + this.__explicitlySet__.add("mustReturnTrafficToSource"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public VxlanInspectionRuleProfile build() { + VxlanInspectionRuleProfile model = + new VxlanInspectionRuleProfile(this.mustReturnTrafficToSource); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(VxlanInspectionRuleProfile model) { + if (model.wasPropertyExplicitlySet("mustReturnTrafficToSource")) { + this.mustReturnTrafficToSource(model.getMustReturnTrafficToSource()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Return scanned VXLAN tunnel traffic to source. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mustReturnTrafficToSource") + private final Boolean mustReturnTrafficToSource; + + /** + * Return scanned VXLAN tunnel traffic to source. + * @return the value + **/ + public Boolean getMustReturnTrafficToSource() { + return mustReturnTrafficToSource; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("VxlanInspectionRuleProfile("); + sb.append("super=").append(super.toString()); + sb.append("mustReturnTrafficToSource=") + .append(String.valueOf(this.mustReturnTrafficToSource)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof VxlanInspectionRuleProfile)) { + return false; + } + + VxlanInspectionRuleProfile other = (VxlanInspectionRuleProfile) o; + return java.util.Objects.equals( + this.mustReturnTrafficToSource, other.mustReturnTrafficToSource) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.mustReturnTrafficToSource == null + ? 43 + : this.mustReturnTrafficToSource.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/VxlanInspectionRuleSummary.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/VxlanInspectionRuleSummary.java new file mode 100644 index 00000000000..6e2087f6ef2 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/model/VxlanInspectionRuleSummary.java @@ -0,0 +1,208 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.model; + +/** + * Vxlan Tunnel Inspection Rule used on the firewall policy rules. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = VxlanInspectionRuleSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "protocol" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class VxlanInspectionRuleSummary extends TunnelInspectionRuleSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("action") + private InspectActionType action; + + public Builder action(InspectActionType action) { + this.action = action; + this.__explicitlySet__.add("action"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("priorityOrder") + private Long priorityOrder; + + public Builder priorityOrder(Long priorityOrder) { + this.priorityOrder = priorityOrder; + this.__explicitlySet__.add("priorityOrder"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("parentResourceId") + private String parentResourceId; + + public Builder parentResourceId(String parentResourceId) { + this.parentResourceId = parentResourceId; + this.__explicitlySet__.add("parentResourceId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("condition") + private VxlanInspectionRuleMatchCriteria condition; + + public Builder condition(VxlanInspectionRuleMatchCriteria condition) { + this.condition = condition; + this.__explicitlySet__.add("condition"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("profile") + private VxlanInspectionRuleProfile profile; + + public Builder profile(VxlanInspectionRuleProfile profile) { + this.profile = profile; + this.__explicitlySet__.add("profile"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public VxlanInspectionRuleSummary build() { + VxlanInspectionRuleSummary model = + new VxlanInspectionRuleSummary( + this.name, + this.action, + this.priorityOrder, + this.parentResourceId, + this.condition, + this.profile); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(VxlanInspectionRuleSummary model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("action")) { + this.action(model.getAction()); + } + if (model.wasPropertyExplicitlySet("priorityOrder")) { + this.priorityOrder(model.getPriorityOrder()); + } + if (model.wasPropertyExplicitlySet("parentResourceId")) { + this.parentResourceId(model.getParentResourceId()); + } + if (model.wasPropertyExplicitlySet("condition")) { + this.condition(model.getCondition()); + } + if (model.wasPropertyExplicitlySet("profile")) { + this.profile(model.getProfile()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public VxlanInspectionRuleSummary( + String name, + InspectActionType action, + Long priorityOrder, + String parentResourceId, + VxlanInspectionRuleMatchCriteria condition, + VxlanInspectionRuleProfile profile) { + super(name, action, priorityOrder, parentResourceId); + this.condition = condition; + this.profile = profile; + } + + @com.fasterxml.jackson.annotation.JsonProperty("condition") + private final VxlanInspectionRuleMatchCriteria condition; + + public VxlanInspectionRuleMatchCriteria getCondition() { + return condition; + } + + @com.fasterxml.jackson.annotation.JsonProperty("profile") + private final VxlanInspectionRuleProfile profile; + + public VxlanInspectionRuleProfile getProfile() { + return profile; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("VxlanInspectionRuleSummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", condition=").append(String.valueOf(this.condition)); + sb.append(", profile=").append(String.valueOf(this.profile)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof VxlanInspectionRuleSummary)) { + return false; + } + + VxlanInspectionRuleSummary other = (VxlanInspectionRuleSummary) o; + return java.util.Objects.equals(this.condition, other.condition) + && java.util.Objects.equals(this.profile, other.profile) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.condition == null ? 43 : this.condition.hashCode()); + result = (result * PRIME) + (this.profile == null ? 43 : this.profile.hashCode()); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/requests/BulkUploadTunnelInspectionRulesRequest.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/requests/BulkUploadTunnelInspectionRulesRequest.java new file mode 100644 index 00000000000..e35face6988 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/requests/BulkUploadTunnelInspectionRulesRequest.java @@ -0,0 +1,369 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.requests; + +import com.oracle.bmc.networkfirewall.model.*; +/** + * Example: Click here to see how to use BulkUploadTunnelInspectionRulesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +public class BulkUploadTunnelInspectionRulesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Network Firewall Policy identifier + */ + private String networkFirewallPolicyId; + + /** + * Unique Network Firewall Policy identifier + */ + public String getNetworkFirewallPolicyId() { + return networkFirewallPolicyId; + } + /** + * Request details to create the tunnel inspection rule for the network firewall policy Resource. + */ + private java.io.InputStream bulkUploadTunnelInspectionRulesDetails; + + /** + * Request details to create the tunnel inspection rule for the network firewall policy Resource. + */ + public java.io.InputStream getBulkUploadTunnelInspectionRulesDetails() { + return bulkUploadTunnelInspectionRulesDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public java.io.InputStream getBody$() { + return bulkUploadTunnelInspectionRulesDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + BulkUploadTunnelInspectionRulesRequest, java.io.InputStream> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Network Firewall Policy identifier + */ + private String networkFirewallPolicyId = null; + + /** + * Unique Network Firewall Policy identifier + * @param networkFirewallPolicyId the value to set + * @return this builder instance + */ + public Builder networkFirewallPolicyId(String networkFirewallPolicyId) { + this.networkFirewallPolicyId = networkFirewallPolicyId; + return this; + } + + /** + * Request details to create the tunnel inspection rule for the network firewall policy Resource. + */ + private java.io.InputStream bulkUploadTunnelInspectionRulesDetails = null; + + /** + * Request details to create the tunnel inspection rule for the network firewall policy Resource. + * @param bulkUploadTunnelInspectionRulesDetails the value to set + * @return this builder instance + */ + public Builder bulkUploadTunnelInspectionRulesDetails( + java.io.InputStream bulkUploadTunnelInspectionRulesDetails) { + this.bulkUploadTunnelInspectionRulesDetails = bulkUploadTunnelInspectionRulesDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(BulkUploadTunnelInspectionRulesRequest o) { + networkFirewallPolicyId(o.getNetworkFirewallPolicyId()); + bulkUploadTunnelInspectionRulesDetails(o.getBulkUploadTunnelInspectionRulesDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of BulkUploadTunnelInspectionRulesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of BulkUploadTunnelInspectionRulesRequest + */ + public BulkUploadTunnelInspectionRulesRequest build() { + BulkUploadTunnelInspectionRulesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(java.io.InputStream body) { + bulkUploadTunnelInspectionRulesDetails(body); + return this; + } + + /** + * Build the instance of BulkUploadTunnelInspectionRulesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of BulkUploadTunnelInspectionRulesRequest + */ + public BulkUploadTunnelInspectionRulesRequest buildWithoutInvocationCallback() { + BulkUploadTunnelInspectionRulesRequest request = + new BulkUploadTunnelInspectionRulesRequest(); + request.networkFirewallPolicyId = networkFirewallPolicyId; + request.bulkUploadTunnelInspectionRulesDetails = bulkUploadTunnelInspectionRulesDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new BulkUploadTunnelInspectionRulesRequest(networkFirewallPolicyId, bulkUploadTunnelInspectionRulesDetails, opcRetryToken, opcRequestId, ifMatch); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .networkFirewallPolicyId(networkFirewallPolicyId) + .bulkUploadTunnelInspectionRulesDetails(bulkUploadTunnelInspectionRulesDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",networkFirewallPolicyId=").append(String.valueOf(this.networkFirewallPolicyId)); + sb.append(",bulkUploadTunnelInspectionRulesDetails=") + .append(String.valueOf(this.bulkUploadTunnelInspectionRulesDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkUploadTunnelInspectionRulesRequest)) { + return false; + } + + BulkUploadTunnelInspectionRulesRequest other = (BulkUploadTunnelInspectionRulesRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.networkFirewallPolicyId, other.networkFirewallPolicyId) + && java.util.Objects.equals( + this.bulkUploadTunnelInspectionRulesDetails, + other.bulkUploadTunnelInspectionRulesDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.networkFirewallPolicyId == null + ? 43 + : this.networkFirewallPolicyId.hashCode()); + result = + (result * PRIME) + + (this.bulkUploadTunnelInspectionRulesDetails == null + ? 43 + : this.bulkUploadTunnelInspectionRulesDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/requests/CreateTunnelInspectionRuleRequest.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/requests/CreateTunnelInspectionRuleRequest.java new file mode 100644 index 00000000000..c95415c0717 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/requests/CreateTunnelInspectionRuleRequest.java @@ -0,0 +1,323 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.requests; + +import com.oracle.bmc.networkfirewall.model.*; +/** + * Example: Click here to see how to use CreateTunnelInspectionRuleRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +public class CreateTunnelInspectionRuleRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.networkfirewall.model.CreateTunnelInspectionRuleDetails> { + + /** + * Unique Network Firewall Policy identifier + */ + private String networkFirewallPolicyId; + + /** + * Unique Network Firewall Policy identifier + */ + public String getNetworkFirewallPolicyId() { + return networkFirewallPolicyId; + } + /** + * Request Details to create the network firewall policy resource. + */ + private com.oracle.bmc.networkfirewall.model.CreateTunnelInspectionRuleDetails + createTunnelInspectionRuleDetails; + + /** + * Request Details to create the network firewall policy resource. + */ + public com.oracle.bmc.networkfirewall.model.CreateTunnelInspectionRuleDetails + getCreateTunnelInspectionRuleDetails() { + return createTunnelInspectionRuleDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.networkfirewall.model.CreateTunnelInspectionRuleDetails getBody$() { + return createTunnelInspectionRuleDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateTunnelInspectionRuleRequest, + com.oracle.bmc.networkfirewall.model.CreateTunnelInspectionRuleDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Network Firewall Policy identifier + */ + private String networkFirewallPolicyId = null; + + /** + * Unique Network Firewall Policy identifier + * @param networkFirewallPolicyId the value to set + * @return this builder instance + */ + public Builder networkFirewallPolicyId(String networkFirewallPolicyId) { + this.networkFirewallPolicyId = networkFirewallPolicyId; + return this; + } + + /** + * Request Details to create the network firewall policy resource. + */ + private com.oracle.bmc.networkfirewall.model.CreateTunnelInspectionRuleDetails + createTunnelInspectionRuleDetails = null; + + /** + * Request Details to create the network firewall policy resource. + * @param createTunnelInspectionRuleDetails the value to set + * @return this builder instance + */ + public Builder createTunnelInspectionRuleDetails( + com.oracle.bmc.networkfirewall.model.CreateTunnelInspectionRuleDetails + createTunnelInspectionRuleDetails) { + this.createTunnelInspectionRuleDetails = createTunnelInspectionRuleDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateTunnelInspectionRuleRequest o) { + networkFirewallPolicyId(o.getNetworkFirewallPolicyId()); + createTunnelInspectionRuleDetails(o.getCreateTunnelInspectionRuleDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateTunnelInspectionRuleRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateTunnelInspectionRuleRequest + */ + public CreateTunnelInspectionRuleRequest build() { + CreateTunnelInspectionRuleRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.networkfirewall.model.CreateTunnelInspectionRuleDetails body) { + createTunnelInspectionRuleDetails(body); + return this; + } + + /** + * Build the instance of CreateTunnelInspectionRuleRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateTunnelInspectionRuleRequest + */ + public CreateTunnelInspectionRuleRequest buildWithoutInvocationCallback() { + CreateTunnelInspectionRuleRequest request = new CreateTunnelInspectionRuleRequest(); + request.networkFirewallPolicyId = networkFirewallPolicyId; + request.createTunnelInspectionRuleDetails = createTunnelInspectionRuleDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateTunnelInspectionRuleRequest(networkFirewallPolicyId, createTunnelInspectionRuleDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .networkFirewallPolicyId(networkFirewallPolicyId) + .createTunnelInspectionRuleDetails(createTunnelInspectionRuleDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",networkFirewallPolicyId=").append(String.valueOf(this.networkFirewallPolicyId)); + sb.append(",createTunnelInspectionRuleDetails=") + .append(String.valueOf(this.createTunnelInspectionRuleDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateTunnelInspectionRuleRequest)) { + return false; + } + + CreateTunnelInspectionRuleRequest other = (CreateTunnelInspectionRuleRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.networkFirewallPolicyId, other.networkFirewallPolicyId) + && java.util.Objects.equals( + this.createTunnelInspectionRuleDetails, + other.createTunnelInspectionRuleDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.networkFirewallPolicyId == null + ? 43 + : this.networkFirewallPolicyId.hashCode()); + result = + (result * PRIME) + + (this.createTunnelInspectionRuleDetails == null + ? 43 + : this.createTunnelInspectionRuleDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/requests/DeleteTunnelInspectionRuleRequest.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/requests/DeleteTunnelInspectionRuleRequest.java new file mode 100644 index 00000000000..90651e1bf70 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/requests/DeleteTunnelInspectionRuleRequest.java @@ -0,0 +1,291 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.requests; + +import com.oracle.bmc.networkfirewall.model.*; +/** + * Example: Click here to see how to use DeleteTunnelInspectionRuleRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +public class DeleteTunnelInspectionRuleRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Network Firewall Policy identifier + */ + private String networkFirewallPolicyId; + + /** + * Unique Network Firewall Policy identifier + */ + public String getNetworkFirewallPolicyId() { + return networkFirewallPolicyId; + } + /** + * Unique identifier for Tunnel Inspection Rules in the network firewall policy. + */ + private String tunnelInspectionRuleName; + + /** + * Unique identifier for Tunnel Inspection Rules in the network firewall policy. + */ + public String getTunnelInspectionRuleName() { + return tunnelInspectionRuleName; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteTunnelInspectionRuleRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Network Firewall Policy identifier + */ + private String networkFirewallPolicyId = null; + + /** + * Unique Network Firewall Policy identifier + * @param networkFirewallPolicyId the value to set + * @return this builder instance + */ + public Builder networkFirewallPolicyId(String networkFirewallPolicyId) { + this.networkFirewallPolicyId = networkFirewallPolicyId; + return this; + } + + /** + * Unique identifier for Tunnel Inspection Rules in the network firewall policy. + */ + private String tunnelInspectionRuleName = null; + + /** + * Unique identifier for Tunnel Inspection Rules in the network firewall policy. + * @param tunnelInspectionRuleName the value to set + * @return this builder instance + */ + public Builder tunnelInspectionRuleName(String tunnelInspectionRuleName) { + this.tunnelInspectionRuleName = tunnelInspectionRuleName; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteTunnelInspectionRuleRequest o) { + networkFirewallPolicyId(o.getNetworkFirewallPolicyId()); + tunnelInspectionRuleName(o.getTunnelInspectionRuleName()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteTunnelInspectionRuleRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteTunnelInspectionRuleRequest + */ + public DeleteTunnelInspectionRuleRequest build() { + DeleteTunnelInspectionRuleRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteTunnelInspectionRuleRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteTunnelInspectionRuleRequest + */ + public DeleteTunnelInspectionRuleRequest buildWithoutInvocationCallback() { + DeleteTunnelInspectionRuleRequest request = new DeleteTunnelInspectionRuleRequest(); + request.networkFirewallPolicyId = networkFirewallPolicyId; + request.tunnelInspectionRuleName = tunnelInspectionRuleName; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteTunnelInspectionRuleRequest(networkFirewallPolicyId, tunnelInspectionRuleName, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .networkFirewallPolicyId(networkFirewallPolicyId) + .tunnelInspectionRuleName(tunnelInspectionRuleName) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",networkFirewallPolicyId=").append(String.valueOf(this.networkFirewallPolicyId)); + sb.append(",tunnelInspectionRuleName=") + .append(String.valueOf(this.tunnelInspectionRuleName)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteTunnelInspectionRuleRequest)) { + return false; + } + + DeleteTunnelInspectionRuleRequest other = (DeleteTunnelInspectionRuleRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.networkFirewallPolicyId, other.networkFirewallPolicyId) + && java.util.Objects.equals( + this.tunnelInspectionRuleName, other.tunnelInspectionRuleName) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.networkFirewallPolicyId == null + ? 43 + : this.networkFirewallPolicyId.hashCode()); + result = + (result * PRIME) + + (this.tunnelInspectionRuleName == null + ? 43 + : this.tunnelInspectionRuleName.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/requests/GetTunnelInspectionRuleRequest.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/requests/GetTunnelInspectionRuleRequest.java new file mode 100644 index 00000000000..8a97972b4d6 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/requests/GetTunnelInspectionRuleRequest.java @@ -0,0 +1,239 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.requests; + +import com.oracle.bmc.networkfirewall.model.*; +/** + * Example: Click here to see how to use GetTunnelInspectionRuleRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +public class GetTunnelInspectionRuleRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Network Firewall Policy identifier + */ + private String networkFirewallPolicyId; + + /** + * Unique Network Firewall Policy identifier + */ + public String getNetworkFirewallPolicyId() { + return networkFirewallPolicyId; + } + /** + * Unique identifier for Tunnel Inspection Rules in the network firewall policy. + */ + private String tunnelInspectionRuleName; + + /** + * Unique identifier for Tunnel Inspection Rules in the network firewall policy. + */ + public String getTunnelInspectionRuleName() { + return tunnelInspectionRuleName; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetTunnelInspectionRuleRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Network Firewall Policy identifier + */ + private String networkFirewallPolicyId = null; + + /** + * Unique Network Firewall Policy identifier + * @param networkFirewallPolicyId the value to set + * @return this builder instance + */ + public Builder networkFirewallPolicyId(String networkFirewallPolicyId) { + this.networkFirewallPolicyId = networkFirewallPolicyId; + return this; + } + + /** + * Unique identifier for Tunnel Inspection Rules in the network firewall policy. + */ + private String tunnelInspectionRuleName = null; + + /** + * Unique identifier for Tunnel Inspection Rules in the network firewall policy. + * @param tunnelInspectionRuleName the value to set + * @return this builder instance + */ + public Builder tunnelInspectionRuleName(String tunnelInspectionRuleName) { + this.tunnelInspectionRuleName = tunnelInspectionRuleName; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetTunnelInspectionRuleRequest o) { + networkFirewallPolicyId(o.getNetworkFirewallPolicyId()); + tunnelInspectionRuleName(o.getTunnelInspectionRuleName()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetTunnelInspectionRuleRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetTunnelInspectionRuleRequest + */ + public GetTunnelInspectionRuleRequest build() { + GetTunnelInspectionRuleRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetTunnelInspectionRuleRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetTunnelInspectionRuleRequest + */ + public GetTunnelInspectionRuleRequest buildWithoutInvocationCallback() { + GetTunnelInspectionRuleRequest request = new GetTunnelInspectionRuleRequest(); + request.networkFirewallPolicyId = networkFirewallPolicyId; + request.tunnelInspectionRuleName = tunnelInspectionRuleName; + request.opcRequestId = opcRequestId; + return request; + // new GetTunnelInspectionRuleRequest(networkFirewallPolicyId, tunnelInspectionRuleName, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .networkFirewallPolicyId(networkFirewallPolicyId) + .tunnelInspectionRuleName(tunnelInspectionRuleName) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",networkFirewallPolicyId=").append(String.valueOf(this.networkFirewallPolicyId)); + sb.append(",tunnelInspectionRuleName=") + .append(String.valueOf(this.tunnelInspectionRuleName)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetTunnelInspectionRuleRequest)) { + return false; + } + + GetTunnelInspectionRuleRequest other = (GetTunnelInspectionRuleRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.networkFirewallPolicyId, other.networkFirewallPolicyId) + && java.util.Objects.equals( + this.tunnelInspectionRuleName, other.tunnelInspectionRuleName) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.networkFirewallPolicyId == null + ? 43 + : this.networkFirewallPolicyId.hashCode()); + result = + (result * PRIME) + + (this.tunnelInspectionRuleName == null + ? 43 + : this.tunnelInspectionRuleName.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/requests/ListTunnelInspectionRulesRequest.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/requests/ListTunnelInspectionRulesRequest.java new file mode 100644 index 00000000000..91d9c9d82ee --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/requests/ListTunnelInspectionRulesRequest.java @@ -0,0 +1,442 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.requests; + +import com.oracle.bmc.networkfirewall.model.*; +/** + * Example: Click here to see how to use ListTunnelInspectionRulesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +public class ListTunnelInspectionRulesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Network Firewall Policy identifier + */ + private String networkFirewallPolicyId; + + /** + * Unique Network Firewall Policy identifier + */ + public String getNetworkFirewallPolicyId() { + return networkFirewallPolicyId; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} or {@code opc-prev-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} or {@code opc-prev-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.networkfirewall.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.networkfirewall.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * Unique priority order for Tunnel Inspection rules in the network firewall policy. + */ + private Integer tunnelInspectionRulePriorityOrder; + + /** + * Unique priority order for Tunnel Inspection rules in the network firewall policy. + */ + public Integer getTunnelInspectionRulePriorityOrder() { + return tunnelInspectionRulePriorityOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListTunnelInspectionRulesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Network Firewall Policy identifier + */ + private String networkFirewallPolicyId = null; + + /** + * Unique Network Firewall Policy identifier + * @param networkFirewallPolicyId the value to set + * @return this builder instance + */ + public Builder networkFirewallPolicyId(String networkFirewallPolicyId) { + this.networkFirewallPolicyId = networkFirewallPolicyId; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} or {@code opc-prev-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} or {@code opc-prev-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.networkfirewall.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.networkfirewall.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Unique priority order for Tunnel Inspection rules in the network firewall policy. + */ + private Integer tunnelInspectionRulePriorityOrder = null; + + /** + * Unique priority order for Tunnel Inspection rules in the network firewall policy. + * @param tunnelInspectionRulePriorityOrder the value to set + * @return this builder instance + */ + public Builder tunnelInspectionRulePriorityOrder( + Integer tunnelInspectionRulePriorityOrder) { + this.tunnelInspectionRulePriorityOrder = tunnelInspectionRulePriorityOrder; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListTunnelInspectionRulesRequest o) { + networkFirewallPolicyId(o.getNetworkFirewallPolicyId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + displayName(o.getDisplayName()); + tunnelInspectionRulePriorityOrder(o.getTunnelInspectionRulePriorityOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListTunnelInspectionRulesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListTunnelInspectionRulesRequest + */ + public ListTunnelInspectionRulesRequest build() { + ListTunnelInspectionRulesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListTunnelInspectionRulesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListTunnelInspectionRulesRequest + */ + public ListTunnelInspectionRulesRequest buildWithoutInvocationCallback() { + ListTunnelInspectionRulesRequest request = new ListTunnelInspectionRulesRequest(); + request.networkFirewallPolicyId = networkFirewallPolicyId; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + request.displayName = displayName; + request.tunnelInspectionRulePriorityOrder = tunnelInspectionRulePriorityOrder; + return request; + // new ListTunnelInspectionRulesRequest(networkFirewallPolicyId, limit, page, sortOrder, sortBy, opcRequestId, displayName, tunnelInspectionRulePriorityOrder); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .networkFirewallPolicyId(networkFirewallPolicyId) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId) + .displayName(displayName) + .tunnelInspectionRulePriorityOrder(tunnelInspectionRulePriorityOrder); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",networkFirewallPolicyId=").append(String.valueOf(this.networkFirewallPolicyId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",tunnelInspectionRulePriorityOrder=") + .append(String.valueOf(this.tunnelInspectionRulePriorityOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListTunnelInspectionRulesRequest)) { + return false; + } + + ListTunnelInspectionRulesRequest other = (ListTunnelInspectionRulesRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.networkFirewallPolicyId, other.networkFirewallPolicyId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals( + this.tunnelInspectionRulePriorityOrder, + other.tunnelInspectionRulePriorityOrder); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.networkFirewallPolicyId == null + ? 43 + : this.networkFirewallPolicyId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.tunnelInspectionRulePriorityOrder == null + ? 43 + : this.tunnelInspectionRulePriorityOrder.hashCode()); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/requests/UpdateTunnelInspectionRuleRequest.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/requests/UpdateTunnelInspectionRuleRequest.java new file mode 100644 index 00000000000..5f8bcbc5177 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/requests/UpdateTunnelInspectionRuleRequest.java @@ -0,0 +1,359 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.requests; + +import com.oracle.bmc.networkfirewall.model.*; +/** + * Example: Click here to see how to use UpdateTunnelInspectionRuleRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +public class UpdateTunnelInspectionRuleRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.networkfirewall.model.UpdateTunnelInspectionRuleDetails> { + + /** + * Unique Network Firewall Policy identifier + */ + private String networkFirewallPolicyId; + + /** + * Unique Network Firewall Policy identifier + */ + public String getNetworkFirewallPolicyId() { + return networkFirewallPolicyId; + } + /** + * Unique identifier for Tunnel Inspection Rules in the network firewall policy. + */ + private String tunnelInspectionRuleName; + + /** + * Unique identifier for Tunnel Inspection Rules in the network firewall policy. + */ + public String getTunnelInspectionRuleName() { + return tunnelInspectionRuleName; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.networkfirewall.model.UpdateTunnelInspectionRuleDetails + updateTunnelInspectionRuleDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.networkfirewall.model.UpdateTunnelInspectionRuleDetails + getUpdateTunnelInspectionRuleDetails() { + return updateTunnelInspectionRuleDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.networkfirewall.model.UpdateTunnelInspectionRuleDetails getBody$() { + return updateTunnelInspectionRuleDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateTunnelInspectionRuleRequest, + com.oracle.bmc.networkfirewall.model.UpdateTunnelInspectionRuleDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Network Firewall Policy identifier + */ + private String networkFirewallPolicyId = null; + + /** + * Unique Network Firewall Policy identifier + * @param networkFirewallPolicyId the value to set + * @return this builder instance + */ + public Builder networkFirewallPolicyId(String networkFirewallPolicyId) { + this.networkFirewallPolicyId = networkFirewallPolicyId; + return this; + } + + /** + * Unique identifier for Tunnel Inspection Rules in the network firewall policy. + */ + private String tunnelInspectionRuleName = null; + + /** + * Unique identifier for Tunnel Inspection Rules in the network firewall policy. + * @param tunnelInspectionRuleName the value to set + * @return this builder instance + */ + public Builder tunnelInspectionRuleName(String tunnelInspectionRuleName) { + this.tunnelInspectionRuleName = tunnelInspectionRuleName; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.networkfirewall.model.UpdateTunnelInspectionRuleDetails + updateTunnelInspectionRuleDetails = null; + + /** + * The information to be updated. + * @param updateTunnelInspectionRuleDetails the value to set + * @return this builder instance + */ + public Builder updateTunnelInspectionRuleDetails( + com.oracle.bmc.networkfirewall.model.UpdateTunnelInspectionRuleDetails + updateTunnelInspectionRuleDetails) { + this.updateTunnelInspectionRuleDetails = updateTunnelInspectionRuleDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateTunnelInspectionRuleRequest o) { + networkFirewallPolicyId(o.getNetworkFirewallPolicyId()); + tunnelInspectionRuleName(o.getTunnelInspectionRuleName()); + updateTunnelInspectionRuleDetails(o.getUpdateTunnelInspectionRuleDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateTunnelInspectionRuleRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateTunnelInspectionRuleRequest + */ + public UpdateTunnelInspectionRuleRequest build() { + UpdateTunnelInspectionRuleRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.networkfirewall.model.UpdateTunnelInspectionRuleDetails body) { + updateTunnelInspectionRuleDetails(body); + return this; + } + + /** + * Build the instance of UpdateTunnelInspectionRuleRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateTunnelInspectionRuleRequest + */ + public UpdateTunnelInspectionRuleRequest buildWithoutInvocationCallback() { + UpdateTunnelInspectionRuleRequest request = new UpdateTunnelInspectionRuleRequest(); + request.networkFirewallPolicyId = networkFirewallPolicyId; + request.tunnelInspectionRuleName = tunnelInspectionRuleName; + request.updateTunnelInspectionRuleDetails = updateTunnelInspectionRuleDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateTunnelInspectionRuleRequest(networkFirewallPolicyId, tunnelInspectionRuleName, updateTunnelInspectionRuleDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .networkFirewallPolicyId(networkFirewallPolicyId) + .tunnelInspectionRuleName(tunnelInspectionRuleName) + .updateTunnelInspectionRuleDetails(updateTunnelInspectionRuleDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",networkFirewallPolicyId=").append(String.valueOf(this.networkFirewallPolicyId)); + sb.append(",tunnelInspectionRuleName=") + .append(String.valueOf(this.tunnelInspectionRuleName)); + sb.append(",updateTunnelInspectionRuleDetails=") + .append(String.valueOf(this.updateTunnelInspectionRuleDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateTunnelInspectionRuleRequest)) { + return false; + } + + UpdateTunnelInspectionRuleRequest other = (UpdateTunnelInspectionRuleRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.networkFirewallPolicyId, other.networkFirewallPolicyId) + && java.util.Objects.equals( + this.tunnelInspectionRuleName, other.tunnelInspectionRuleName) + && java.util.Objects.equals( + this.updateTunnelInspectionRuleDetails, + other.updateTunnelInspectionRuleDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.networkFirewallPolicyId == null + ? 43 + : this.networkFirewallPolicyId.hashCode()); + result = + (result * PRIME) + + (this.tunnelInspectionRuleName == null + ? 43 + : this.tunnelInspectionRuleName.hashCode()); + result = + (result * PRIME) + + (this.updateTunnelInspectionRuleDetails == null + ? 43 + : this.updateTunnelInspectionRuleDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/responses/BulkUploadTunnelInspectionRulesResponse.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/responses/BulkUploadTunnelInspectionRulesResponse.java new file mode 100644 index 00000000000..acc2dfcb9d0 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/responses/BulkUploadTunnelInspectionRulesResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.responses; + +import com.oracle.bmc.networkfirewall.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +public class BulkUploadTunnelInspectionRulesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private BulkUploadTunnelInspectionRulesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(BulkUploadTunnelInspectionRulesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public BulkUploadTunnelInspectionRulesResponse build() { + return new BulkUploadTunnelInspectionRulesResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkUploadTunnelInspectionRulesResponse)) { + return false; + } + + BulkUploadTunnelInspectionRulesResponse other = (BulkUploadTunnelInspectionRulesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/responses/CreateTunnelInspectionRuleResponse.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/responses/CreateTunnelInspectionRuleResponse.java new file mode 100644 index 00000000000..5cd3bddf94a --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/responses/CreateTunnelInspectionRuleResponse.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.responses; + +import com.oracle.bmc.networkfirewall.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +public class CreateTunnelInspectionRuleResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned TunnelInspectionRule instance. + */ + private com.oracle.bmc.networkfirewall.model.TunnelInspectionRule tunnelInspectionRule; + + /** + * The returned TunnelInspectionRule instance. + * @return the value + */ + public com.oracle.bmc.networkfirewall.model.TunnelInspectionRule getTunnelInspectionRule() { + return tunnelInspectionRule; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "tunnelInspectionRule" + }) + private CreateTunnelInspectionRuleResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.networkfirewall.model.TunnelInspectionRule tunnelInspectionRule) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.tunnelInspectionRule = tunnelInspectionRule; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned TunnelInspectionRule instance. + */ + private com.oracle.bmc.networkfirewall.model.TunnelInspectionRule tunnelInspectionRule; + + /** + * The returned TunnelInspectionRule instance. + * @param tunnelInspectionRule the value to set + * @return this builder + */ + public Builder tunnelInspectionRule( + com.oracle.bmc.networkfirewall.model.TunnelInspectionRule tunnelInspectionRule) { + this.tunnelInspectionRule = tunnelInspectionRule; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateTunnelInspectionRuleResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + tunnelInspectionRule(o.getTunnelInspectionRule()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateTunnelInspectionRuleResponse build() { + return new CreateTunnelInspectionRuleResponse( + __httpStatusCode__, headers, etag, opcRequestId, tunnelInspectionRule); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",tunnelInspectionRule=").append(String.valueOf(tunnelInspectionRule)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateTunnelInspectionRuleResponse)) { + return false; + } + + CreateTunnelInspectionRuleResponse other = (CreateTunnelInspectionRuleResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.tunnelInspectionRule, other.tunnelInspectionRule); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.tunnelInspectionRule == null + ? 43 + : this.tunnelInspectionRule.hashCode()); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/responses/DeleteTunnelInspectionRuleResponse.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/responses/DeleteTunnelInspectionRuleResponse.java new file mode 100644 index 00000000000..90c6a9c1e58 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/responses/DeleteTunnelInspectionRuleResponse.java @@ -0,0 +1,131 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.responses; + +import com.oracle.bmc.networkfirewall.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +public class DeleteTunnelInspectionRuleResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeleteTunnelInspectionRuleResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteTunnelInspectionRuleResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteTunnelInspectionRuleResponse build() { + return new DeleteTunnelInspectionRuleResponse( + __httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteTunnelInspectionRuleResponse)) { + return false; + } + + DeleteTunnelInspectionRuleResponse other = (DeleteTunnelInspectionRuleResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/responses/GetTunnelInspectionRuleResponse.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/responses/GetTunnelInspectionRuleResponse.java new file mode 100644 index 00000000000..437f015fb91 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/responses/GetTunnelInspectionRuleResponse.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.responses; + +import com.oracle.bmc.networkfirewall.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +public class GetTunnelInspectionRuleResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned TunnelInspectionRule instance. + */ + private com.oracle.bmc.networkfirewall.model.TunnelInspectionRule tunnelInspectionRule; + + /** + * The returned TunnelInspectionRule instance. + * @return the value + */ + public com.oracle.bmc.networkfirewall.model.TunnelInspectionRule getTunnelInspectionRule() { + return tunnelInspectionRule; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "tunnelInspectionRule" + }) + private GetTunnelInspectionRuleResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.networkfirewall.model.TunnelInspectionRule tunnelInspectionRule) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.tunnelInspectionRule = tunnelInspectionRule; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned TunnelInspectionRule instance. + */ + private com.oracle.bmc.networkfirewall.model.TunnelInspectionRule tunnelInspectionRule; + + /** + * The returned TunnelInspectionRule instance. + * @param tunnelInspectionRule the value to set + * @return this builder + */ + public Builder tunnelInspectionRule( + com.oracle.bmc.networkfirewall.model.TunnelInspectionRule tunnelInspectionRule) { + this.tunnelInspectionRule = tunnelInspectionRule; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetTunnelInspectionRuleResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + tunnelInspectionRule(o.getTunnelInspectionRule()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetTunnelInspectionRuleResponse build() { + return new GetTunnelInspectionRuleResponse( + __httpStatusCode__, headers, etag, opcRequestId, tunnelInspectionRule); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",tunnelInspectionRule=").append(String.valueOf(tunnelInspectionRule)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetTunnelInspectionRuleResponse)) { + return false; + } + + GetTunnelInspectionRuleResponse other = (GetTunnelInspectionRuleResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.tunnelInspectionRule, other.tunnelInspectionRule); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.tunnelInspectionRule == null + ? 43 + : this.tunnelInspectionRule.hashCode()); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/responses/ListTunnelInspectionRulesResponse.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/responses/ListTunnelInspectionRulesResponse.java new file mode 100644 index 00000000000..3d31fae79d1 --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/responses/ListTunnelInspectionRulesResponse.java @@ -0,0 +1,353 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.responses; + +import com.oracle.bmc.networkfirewall.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +public class ListTunnelInspectionRulesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * For list pagination. When this header appears in the response, previous pages of results exist. For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcPrevPage; + + /** + * For list pagination. When this header appears in the response, previous pages of results exist. For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcPrevPage() { + return opcPrevPage; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. This is to get the page counts overall. + * + */ + private String opcPageCount; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. This is to get the page counts overall. + * + * @return the value + */ + public String getOpcPageCount() { + return opcPageCount; + } + + /** + * For pagination of a list of items. This provides the count of total items across pages. + * + */ + private Integer opcTotalItems; + + /** + * For pagination of a list of items. This provides the count of total items across pages. + * + * @return the value + */ + public Integer getOpcTotalItems() { + return opcTotalItems; + } + + /** + * The returned TunnelInspectionRuleSummaryCollection instance. + */ + private com.oracle.bmc.networkfirewall.model.TunnelInspectionRuleSummaryCollection + tunnelInspectionRuleSummaryCollection; + + /** + * The returned TunnelInspectionRuleSummaryCollection instance. + * @return the value + */ + public com.oracle.bmc.networkfirewall.model.TunnelInspectionRuleSummaryCollection + getTunnelInspectionRuleSummaryCollection() { + return tunnelInspectionRuleSummaryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "opcPrevPage", + "opcPageCount", + "opcTotalItems", + "tunnelInspectionRuleSummaryCollection" + }) + private ListTunnelInspectionRulesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + String opcPrevPage, + String opcPageCount, + Integer opcTotalItems, + com.oracle.bmc.networkfirewall.model.TunnelInspectionRuleSummaryCollection + tunnelInspectionRuleSummaryCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.opcPrevPage = opcPrevPage; + this.opcPageCount = opcPageCount; + this.opcTotalItems = opcTotalItems; + this.tunnelInspectionRuleSummaryCollection = tunnelInspectionRuleSummaryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * For list pagination. When this header appears in the response, previous pages of results exist. For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcPrevPage; + + /** + * For list pagination. When this header appears in the response, previous pages of results exist. For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcPrevPage the value to set + * @return this builder + */ + public Builder opcPrevPage(String opcPrevPage) { + this.opcPrevPage = opcPrevPage; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. This is to get the page counts overall. + * + */ + private String opcPageCount; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. This is to get the page counts overall. + * + * @param opcPageCount the value to set + * @return this builder + */ + public Builder opcPageCount(String opcPageCount) { + this.opcPageCount = opcPageCount; + return this; + } + + /** + * For pagination of a list of items. This provides the count of total items across pages. + * + */ + private Integer opcTotalItems; + + /** + * For pagination of a list of items. This provides the count of total items across pages. + * + * @param opcTotalItems the value to set + * @return this builder + */ + public Builder opcTotalItems(Integer opcTotalItems) { + this.opcTotalItems = opcTotalItems; + return this; + } + + /** + * The returned TunnelInspectionRuleSummaryCollection instance. + */ + private com.oracle.bmc.networkfirewall.model.TunnelInspectionRuleSummaryCollection + tunnelInspectionRuleSummaryCollection; + + /** + * The returned TunnelInspectionRuleSummaryCollection instance. + * @param tunnelInspectionRuleSummaryCollection the value to set + * @return this builder + */ + public Builder tunnelInspectionRuleSummaryCollection( + com.oracle.bmc.networkfirewall.model.TunnelInspectionRuleSummaryCollection + tunnelInspectionRuleSummaryCollection) { + this.tunnelInspectionRuleSummaryCollection = tunnelInspectionRuleSummaryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListTunnelInspectionRulesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + opcPrevPage(o.getOpcPrevPage()); + opcPageCount(o.getOpcPageCount()); + opcTotalItems(o.getOpcTotalItems()); + tunnelInspectionRuleSummaryCollection(o.getTunnelInspectionRuleSummaryCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListTunnelInspectionRulesResponse build() { + return new ListTunnelInspectionRulesResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + opcPrevPage, + opcPageCount, + opcTotalItems, + tunnelInspectionRuleSummaryCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcPrevPage=").append(String.valueOf(opcPrevPage)); + sb.append(",opcPageCount=").append(String.valueOf(opcPageCount)); + sb.append(",opcTotalItems=").append(String.valueOf(opcTotalItems)); + sb.append(",tunnelInspectionRuleSummaryCollection=") + .append(String.valueOf(tunnelInspectionRuleSummaryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListTunnelInspectionRulesResponse)) { + return false; + } + + ListTunnelInspectionRulesResponse other = (ListTunnelInspectionRulesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcPrevPage, other.opcPrevPage) + && java.util.Objects.equals(this.opcPageCount, other.opcPageCount) + && java.util.Objects.equals(this.opcTotalItems, other.opcTotalItems) + && java.util.Objects.equals( + this.tunnelInspectionRuleSummaryCollection, + other.tunnelInspectionRuleSummaryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcPrevPage == null ? 43 : this.opcPrevPage.hashCode()); + result = (result * PRIME) + (this.opcPageCount == null ? 43 : this.opcPageCount.hashCode()); + result = + (result * PRIME) + + (this.opcTotalItems == null ? 43 : this.opcTotalItems.hashCode()); + result = + (result * PRIME) + + (this.tunnelInspectionRuleSummaryCollection == null + ? 43 + : this.tunnelInspectionRuleSummaryCollection.hashCode()); + return result; + } +} diff --git a/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/responses/UpdateTunnelInspectionRuleResponse.java b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/responses/UpdateTunnelInspectionRuleResponse.java new file mode 100644 index 00000000000..a10b6f784ce --- /dev/null +++ b/bmc-networkfirewall/src/main/java/com/oracle/bmc/networkfirewall/responses/UpdateTunnelInspectionRuleResponse.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.networkfirewall.responses; + +import com.oracle.bmc.networkfirewall.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230501") +public class UpdateTunnelInspectionRuleResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned TunnelInspectionRule instance. + */ + private com.oracle.bmc.networkfirewall.model.TunnelInspectionRule tunnelInspectionRule; + + /** + * The returned TunnelInspectionRule instance. + * @return the value + */ + public com.oracle.bmc.networkfirewall.model.TunnelInspectionRule getTunnelInspectionRule() { + return tunnelInspectionRule; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "tunnelInspectionRule" + }) + private UpdateTunnelInspectionRuleResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.networkfirewall.model.TunnelInspectionRule tunnelInspectionRule) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.tunnelInspectionRule = tunnelInspectionRule; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned TunnelInspectionRule instance. + */ + private com.oracle.bmc.networkfirewall.model.TunnelInspectionRule tunnelInspectionRule; + + /** + * The returned TunnelInspectionRule instance. + * @param tunnelInspectionRule the value to set + * @return this builder + */ + public Builder tunnelInspectionRule( + com.oracle.bmc.networkfirewall.model.TunnelInspectionRule tunnelInspectionRule) { + this.tunnelInspectionRule = tunnelInspectionRule; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateTunnelInspectionRuleResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + tunnelInspectionRule(o.getTunnelInspectionRule()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateTunnelInspectionRuleResponse build() { + return new UpdateTunnelInspectionRuleResponse( + __httpStatusCode__, headers, etag, opcRequestId, tunnelInspectionRule); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",tunnelInspectionRule=").append(String.valueOf(tunnelInspectionRule)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateTunnelInspectionRuleResponse)) { + return false; + } + + UpdateTunnelInspectionRuleResponse other = (UpdateTunnelInspectionRuleResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.tunnelInspectionRule, other.tunnelInspectionRule); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.tunnelInspectionRule == null + ? 43 + : this.tunnelInspectionRule.hashCode()); + return result; + } +} diff --git a/bmc-networkloadbalancer/pom.xml b/bmc-networkloadbalancer/pom.xml index c31fc265606..35c6b13610a 100644 --- a/bmc-networkloadbalancer/pom.xml +++ b/bmc-networkloadbalancer/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-networkloadbalancer @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/Backend.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/Backend.java index 58beeb64711..dee7fc56e4b 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/Backend.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/Backend.java @@ -6,7 +6,7 @@ /** * The configuration of a backend server that is a member of a network load balancer backend set. - * For more information, see [Managing Backend Servers](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/BackendServers/backend-server-management.htm). + * For more information, see [Managing Backend Servers](https://docs.cloud.oracle.com/Content/Balance/Tasks/managingbackendservers.htm). * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -142,7 +142,7 @@ public Builder port(Integer port) { * proportion of incoming traffic. For example, a server weighted '3' receives three times the number of new connections * as a server weighted '1'. * For more information about load balancing policies, see - * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/introducton.htm#Policies). + * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/Balance/Reference/lbpolicies.htm). *

* Example: {@code 3} * @@ -155,7 +155,7 @@ public Builder port(Integer port) { * proportion of incoming traffic. For example, a server weighted '3' receives three times the number of new connections * as a server weighted '1'. * For more information about load balancing policies, see - * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/introducton.htm#Policies). + * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/Balance/Reference/lbpolicies.htm). *

* Example: {@code 3} * @@ -382,7 +382,7 @@ public Integer getPort() { * proportion of incoming traffic. For example, a server weighted '3' receives three times the number of new connections * as a server weighted '1'. * For more information about load balancing policies, see - * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/introducton.htm#Policies). + * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/Balance/Reference/lbpolicies.htm). *

* Example: {@code 3} * @@ -395,7 +395,7 @@ public Integer getPort() { * proportion of incoming traffic. For example, a server weighted '3' receives three times the number of new connections * as a server weighted '1'. * For more information about load balancing policies, see - * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/introducton.htm#Policies). + * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/Balance/Reference/lbpolicies.htm). *

* Example: {@code 3} * diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/BackendDetails.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/BackendDetails.java index b0a5f95919d..7d29b3d1802 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/BackendDetails.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/BackendDetails.java @@ -142,7 +142,7 @@ public Builder port(Integer port) { * proportion of incoming traffic. For example, a server weighted '3' receives three times the number of new connections * as a server weighted '1'. * For more information about load balancing policies, see - * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/introducton.htm#Policies). + * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/Balance/Reference/lbpolicies.htm). *

* Example: {@code 3} * @@ -155,7 +155,7 @@ public Builder port(Integer port) { * proportion of incoming traffic. For example, a server weighted '3' receives three times the number of new connections * as a server weighted '1'. * For more information about load balancing policies, see - * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/introducton.htm#Policies). + * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/Balance/Reference/lbpolicies.htm). *

* Example: {@code 3} * @@ -384,7 +384,7 @@ public Integer getPort() { * proportion of incoming traffic. For example, a server weighted '3' receives three times the number of new connections * as a server weighted '1'. * For more information about load balancing policies, see - * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/introducton.htm#Policies). + * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/Balance/Reference/lbpolicies.htm). *

* Example: {@code 3} * @@ -397,7 +397,7 @@ public Integer getPort() { * proportion of incoming traffic. For example, a server weighted '3' receives three times the number of new connections * as a server weighted '1'. * For more information about load balancing policies, see - * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/introducton.htm#Policies). + * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/Balance/Reference/lbpolicies.htm). *

* Example: {@code 3} * diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/BackendSet.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/BackendSet.java index 9deee2b38cc..0039d27935a 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/BackendSet.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/BackendSet.java @@ -7,7 +7,7 @@ /** * The configuration of a network load balancer backend set. * For more information about backend set configuration, see - * [Managing Backend Sets](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/BackendSets/backend-set-management.htm). + * [Managing Backend Sets](https://docs.cloud.oracle.com/Content/Balance/Tasks/managingbackendsets.htm). *

**Caution:** Oracle recommends that you avoid using any confidential information when you supply string values using the API. * @@ -183,14 +183,14 @@ public Builder ipVersion(IpVersion ipVersion) { return this; } /** - * Array of backends. + * An array of backends. * **/ @com.fasterxml.jackson.annotation.JsonProperty("backends") private java.util.List backends; /** - * Array of backends. + * An array of backends. * * @param backends the value to set * @return this builder @@ -386,14 +386,14 @@ public IpVersion getIpVersion() { } /** - * Array of backends. + * An array of backends. * **/ @com.fasterxml.jackson.annotation.JsonProperty("backends") private final java.util.List backends; /** - * Array of backends. + * An array of backends. * * @return the value **/ diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/BackendSetDetails.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/BackendSetDetails.java index f0a9115d3f8..b090e23f293 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/BackendSetDetails.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/BackendSetDetails.java @@ -7,7 +7,7 @@ /** * The configuration of a network load balancer backend set. * For more information about backend set configuration, see - * [Managing Backend Sets](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/BackendSets/backend-set-management.htm). + * [Managing Backend Sets](https://docs.cloud.oracle.com/Content/Balance/Tasks/managingbackendsets.htm). *

**Caution:** Oracle recommends that you avoid using any confidential information when you supply string values using the API. * diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/BackendSetSummary.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/BackendSetSummary.java index 76fd7237191..08091394b55 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/BackendSetSummary.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/BackendSetSummary.java @@ -7,7 +7,7 @@ /** * The configuration of a network load balancer backend set. * For more information about backend set configuration, see - * [Managing Backend Sets](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/BackendSets/backend-set-management.htm). + * [Managing Backend Sets](https://docs.cloud.oracle.com/Content/Balance/Tasks/managingbackendsets.htm). *

**Caution:** Oracle recommends that you avoid using any confidential information when you supply string values using the API. * diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/BackendSummary.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/BackendSummary.java index 649bc659be8..365318dc479 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/BackendSummary.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/BackendSummary.java @@ -6,7 +6,7 @@ /** * The configuration of a backend server that is a member of a network load balancer backend set. - * For more information, see [Managing Backend Servers](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/BackendServers/backend-server-management.htm). + * For more information, see [Managing Backend Servers](https://docs.cloud.oracle.com/Content/Balance/Tasks/managingbackendservers.htm). * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -142,7 +142,7 @@ public Builder port(Integer port) { * proportion of incoming traffic. For example, a server weighted '3' receives three times the number of new connections * as a server weighted '1'. * For more information about load balancing policies, see - * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/introducton.htm#Policies). + * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/Balance/Reference/lbpolicies.htm). *

* Example: {@code 3} * @@ -155,7 +155,7 @@ public Builder port(Integer port) { * proportion of incoming traffic. For example, a server weighted '3' receives three times the number of new connections * as a server weighted '1'. * For more information about load balancing policies, see - * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/introducton.htm#Policies). + * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/Balance/Reference/lbpolicies.htm). *

* Example: {@code 3} * @@ -382,7 +382,7 @@ public Integer getPort() { * proportion of incoming traffic. For example, a server weighted '3' receives three times the number of new connections * as a server weighted '1'. * For more information about load balancing policies, see - * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/introducton.htm#Policies). + * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/Balance/Reference/lbpolicies.htm). *

* Example: {@code 3} * @@ -395,7 +395,7 @@ public Integer getPort() { * proportion of incoming traffic. For example, a server weighted '3' receives three times the number of new connections * as a server weighted '1'. * For more information about load balancing policies, see - * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/introducton.htm#Policies). + * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/Balance/Reference/lbpolicies.htm). *

* Example: {@code 3} * diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/CreateBackendDetails.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/CreateBackendDetails.java index 322787428a9..ab3dc364bee 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/CreateBackendDetails.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/CreateBackendDetails.java @@ -6,7 +6,7 @@ /** * The configuration of a backend server that is a member of a network load balancer backend set. - * For more information, see [Managing Backend Servers](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/BackendServers/backend-server-management.htm). + * For more information, see [Managing Backend Servers](https://docs.cloud.oracle.com/Content/Balance/Tasks/managingbackendservers.htm). * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -142,7 +142,7 @@ public Builder port(Integer port) { * proportion of incoming traffic. For example, a server weighted '3' receives three times the number of new connections * as a server weighted '1'. * For more information about load balancing policies, see - * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/introducton.htm#Policies). + * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/Balance/Reference/lbpolicies.htm). *

* Example: {@code 3} * @@ -155,7 +155,7 @@ public Builder port(Integer port) { * proportion of incoming traffic. For example, a server weighted '3' receives three times the number of new connections * as a server weighted '1'. * For more information about load balancing policies, see - * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/introducton.htm#Policies). + * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/Balance/Reference/lbpolicies.htm). *

* Example: {@code 3} * @@ -380,7 +380,7 @@ public Integer getPort() { * proportion of incoming traffic. For example, a server weighted '3' receives three times the number of new connections * as a server weighted '1'. * For more information about load balancing policies, see - * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/introducton.htm#Policies). + * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/Balance/Reference/lbpolicies.htm). *

* Example: {@code 3} * @@ -393,7 +393,7 @@ public Integer getPort() { * proportion of incoming traffic. For example, a server weighted '3' receives three times the number of new connections * as a server weighted '1'. * For more information about load balancing policies, see - * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/introducton.htm#Policies). + * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/Balance/Reference/lbpolicies.htm). *

* Example: {@code 3} * diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/CreateBackendSetDetails.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/CreateBackendSetDetails.java index bdd6c871039..7e362890f78 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/CreateBackendSetDetails.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/CreateBackendSetDetails.java @@ -7,7 +7,7 @@ /** * The configuration details for creating a backend set in a network load balancer. * For more information about backend set configuration, see - * [Managing Backend Sets](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/BackendSets/backend-set-management.htm). + * [Managing Backend Sets](https://docs.cloud.oracle.com/Content/Balance/Tasks/managingbackendsets.htm). *

**Caution:** Oracle recommends that you avoid using any confidential information when you supply string values using the API. * diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/CreateListenerDetails.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/CreateListenerDetails.java index 4aeba168ad6..a92018bdc9a 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/CreateListenerDetails.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/CreateListenerDetails.java @@ -6,8 +6,8 @@ /** * The configuration of the listener. - * For more information about listener configuration, see - * [Managing Network Load Balancer Listeners](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/Listeners/listener-management.htm). + * For more information about backend set configuration, see + * [Managing Load Balancer Listeners](https://docs.cloud.oracle.com/Content/Balance/Tasks/managinglisteners.htm). * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -31,7 +31,10 @@ public final class CreateListenerDetails "port", "protocol", "ipVersion", - "isPpv2Enabled" + "isPpv2Enabled", + "tcpIdleTimeout", + "udpIdleTimeout", + "l3IpIdleTimeout" }) public CreateListenerDetails( String name, @@ -39,7 +42,10 @@ public CreateListenerDetails( Integer port, ListenerProtocols protocol, IpVersion ipVersion, - Boolean isPpv2Enabled) { + Boolean isPpv2Enabled, + Integer tcpIdleTimeout, + Integer udpIdleTimeout, + Integer l3IpIdleTimeout) { super(); this.name = name; this.defaultBackendSetName = defaultBackendSetName; @@ -47,6 +53,9 @@ public CreateListenerDetails( this.protocol = protocol; this.ipVersion = ipVersion; this.isPpv2Enabled = isPpv2Enabled; + this.tcpIdleTimeout = tcpIdleTimeout; + this.udpIdleTimeout = udpIdleTimeout; + this.l3IpIdleTimeout = l3IpIdleTimeout; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -177,6 +186,66 @@ public Builder isPpv2Enabled(Boolean isPpv2Enabled) { this.__explicitlySet__.add("isPpv2Enabled"); return this; } + /** + * The duration for TCP idle timeout in seconds. + * Example: {@code 300} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tcpIdleTimeout") + private Integer tcpIdleTimeout; + + /** + * The duration for TCP idle timeout in seconds. + * Example: {@code 300} + * + * @param tcpIdleTimeout the value to set + * @return this builder + **/ + public Builder tcpIdleTimeout(Integer tcpIdleTimeout) { + this.tcpIdleTimeout = tcpIdleTimeout; + this.__explicitlySet__.add("tcpIdleTimeout"); + return this; + } + /** + * The duration for UDP idle timeout in seconds. + * Example: {@code 120} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("udpIdleTimeout") + private Integer udpIdleTimeout; + + /** + * The duration for UDP idle timeout in seconds. + * Example: {@code 120} + * + * @param udpIdleTimeout the value to set + * @return this builder + **/ + public Builder udpIdleTimeout(Integer udpIdleTimeout) { + this.udpIdleTimeout = udpIdleTimeout; + this.__explicitlySet__.add("udpIdleTimeout"); + return this; + } + /** + * The duration for L3IP idle timeout in seconds. + * Example: {@code 200} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("l3IpIdleTimeout") + private Integer l3IpIdleTimeout; + + /** + * The duration for L3IP idle timeout in seconds. + * Example: {@code 200} + * + * @param l3IpIdleTimeout the value to set + * @return this builder + **/ + public Builder l3IpIdleTimeout(Integer l3IpIdleTimeout) { + this.l3IpIdleTimeout = l3IpIdleTimeout; + this.__explicitlySet__.add("l3IpIdleTimeout"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -189,7 +258,10 @@ public CreateListenerDetails build() { this.port, this.protocol, this.ipVersion, - this.isPpv2Enabled); + this.isPpv2Enabled, + this.tcpIdleTimeout, + this.udpIdleTimeout, + this.l3IpIdleTimeout); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -216,6 +288,15 @@ public Builder copy(CreateListenerDetails model) { if (model.wasPropertyExplicitlySet("isPpv2Enabled")) { this.isPpv2Enabled(model.getIsPpv2Enabled()); } + if (model.wasPropertyExplicitlySet("tcpIdleTimeout")) { + this.tcpIdleTimeout(model.getTcpIdleTimeout()); + } + if (model.wasPropertyExplicitlySet("udpIdleTimeout")) { + this.udpIdleTimeout(model.getUdpIdleTimeout()); + } + if (model.wasPropertyExplicitlySet("l3IpIdleTimeout")) { + this.l3IpIdleTimeout(model.getL3IpIdleTimeout()); + } return this; } } @@ -345,6 +426,60 @@ public Boolean getIsPpv2Enabled() { return isPpv2Enabled; } + /** + * The duration for TCP idle timeout in seconds. + * Example: {@code 300} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tcpIdleTimeout") + private final Integer tcpIdleTimeout; + + /** + * The duration for TCP idle timeout in seconds. + * Example: {@code 300} + * + * @return the value + **/ + public Integer getTcpIdleTimeout() { + return tcpIdleTimeout; + } + + /** + * The duration for UDP idle timeout in seconds. + * Example: {@code 120} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("udpIdleTimeout") + private final Integer udpIdleTimeout; + + /** + * The duration for UDP idle timeout in seconds. + * Example: {@code 120} + * + * @return the value + **/ + public Integer getUdpIdleTimeout() { + return udpIdleTimeout; + } + + /** + * The duration for L3IP idle timeout in seconds. + * Example: {@code 200} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("l3IpIdleTimeout") + private final Integer l3IpIdleTimeout; + + /** + * The duration for L3IP idle timeout in seconds. + * Example: {@code 200} + * + * @return the value + **/ + public Integer getL3IpIdleTimeout() { + return l3IpIdleTimeout; + } + @Override public String toString() { return this.toString(true); @@ -365,6 +500,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", protocol=").append(String.valueOf(this.protocol)); sb.append(", ipVersion=").append(String.valueOf(this.ipVersion)); sb.append(", isPpv2Enabled=").append(String.valueOf(this.isPpv2Enabled)); + sb.append(", tcpIdleTimeout=").append(String.valueOf(this.tcpIdleTimeout)); + sb.append(", udpIdleTimeout=").append(String.valueOf(this.udpIdleTimeout)); + sb.append(", l3IpIdleTimeout=").append(String.valueOf(this.l3IpIdleTimeout)); sb.append(")"); return sb.toString(); } @@ -385,6 +523,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.protocol, other.protocol) && java.util.Objects.equals(this.ipVersion, other.ipVersion) && java.util.Objects.equals(this.isPpv2Enabled, other.isPpv2Enabled) + && java.util.Objects.equals(this.tcpIdleTimeout, other.tcpIdleTimeout) + && java.util.Objects.equals(this.udpIdleTimeout, other.udpIdleTimeout) + && java.util.Objects.equals(this.l3IpIdleTimeout, other.l3IpIdleTimeout) && super.equals(other); } @@ -404,6 +545,15 @@ public int hashCode() { result = (result * PRIME) + (this.isPpv2Enabled == null ? 43 : this.isPpv2Enabled.hashCode()); + result = + (result * PRIME) + + (this.tcpIdleTimeout == null ? 43 : this.tcpIdleTimeout.hashCode()); + result = + (result * PRIME) + + (this.udpIdleTimeout == null ? 43 : this.udpIdleTimeout.hashCode()); + result = + (result * PRIME) + + (this.l3IpIdleTimeout == null ? 43 : this.l3IpIdleTimeout.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/CreateNetworkLoadBalancerDetails.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/CreateNetworkLoadBalancerDetails.java index 515795185a2..81ae2d763f5 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/CreateNetworkLoadBalancerDetails.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/CreateNetworkLoadBalancerDetails.java @@ -6,7 +6,7 @@ /** * The properties that define a network load balancer. For more information, see - * [Managing a network load balancer](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/NetworkLoadBalancers/network-load-balancer-management.htm). + * [Managing a network load balancer](https://docs.cloud.oracle.com/Content/Balance/Tasks/managingloadbalancer.htm). *

* To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, then * contact an administrator. If you are an administrator who writes policies to give users access, then see @@ -48,7 +48,8 @@ public final class CreateNetworkLoadBalancerDetails "listeners", "backendSets", "freeformTags", - "definedTags" + "definedTags", + "securityAttributes" }) public CreateNetworkLoadBalancerDetails( String compartmentId, @@ -66,7 +67,8 @@ public CreateNetworkLoadBalancerDetails( java.util.Map listeners, java.util.Map backendSets, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> securityAttributes) { super(); this.compartmentId = compartmentId; this.displayName = displayName; @@ -84,6 +86,7 @@ public CreateNetworkLoadBalancerDetails( this.backendSets = backendSets; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -188,7 +191,7 @@ public Builder reservedIps(java.util.List reservedIps) { * A public network load balancer is accessible from the internet, depending on the * [security list rules](https://docs.cloud.oracle.com/Content/network/Concepts/securitylists.htm) for your virtual cloud network. For more information about public and * private network load balancers, - * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/overview.htm). + * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/Balance/Concepts/balanceoverview.htm#how-network-load-balancing-works). * This value is true by default. *

* Example: {@code true} @@ -207,7 +210,7 @@ public Builder reservedIps(java.util.List reservedIps) { * A public network load balancer is accessible from the internet, depending on the * [security list rules](https://docs.cloud.oracle.com/Content/network/Concepts/securitylists.htm) for your virtual cloud network. For more information about public and * private network load balancers, - * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/overview.htm). + * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/Balance/Concepts/balanceoverview.htm#how-network-load-balancing-works). * This value is true by default. *

* Example: {@code true} @@ -427,6 +430,31 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * ZPR tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * ZPR tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -449,7 +477,8 @@ public CreateNetworkLoadBalancerDetails build() { this.listeners, this.backendSets, this.freeformTags, - this.definedTags); + this.definedTags, + this.securityAttributes); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -506,6 +535,9 @@ public Builder copy(CreateNetworkLoadBalancerDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } return this; } } @@ -611,7 +643,7 @@ public java.util.List getReservedIps() { * A public network load balancer is accessible from the internet, depending on the * [security list rules](https://docs.cloud.oracle.com/Content/network/Concepts/securitylists.htm) for your virtual cloud network. For more information about public and * private network load balancers, - * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/overview.htm). + * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/Balance/Concepts/balanceoverview.htm#how-network-load-balancing-works). * This value is true by default. *

* Example: {@code true} @@ -630,7 +662,7 @@ public java.util.List getReservedIps() { * A public network load balancer is accessible from the internet, depending on the * [security list rules](https://docs.cloud.oracle.com/Content/network/Concepts/securitylists.htm) for your virtual cloud network. For more information about public and * private network load balancers, - * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/overview.htm). + * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/Balance/Concepts/balanceoverview.htm#how-network-load-balancing-works). * This value is true by default. *

* Example: {@code true} @@ -827,6 +859,28 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * ZPR tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * ZPR tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + @Override public String toString() { return this.toString(true); @@ -859,6 +913,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", backendSets=").append(String.valueOf(this.backendSets)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(")"); return sb.toString(); } @@ -892,6 +947,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.backendSets, other.backendSets) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && super.equals(other); } @@ -935,6 +991,11 @@ public int hashCode() { result = (result * PRIME) + (this.backendSets == null ? 43 : this.backendSets.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/HealthChecker.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/HealthChecker.java index 050a7ed0161..51982df7d41 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/HealthChecker.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/HealthChecker.java @@ -6,7 +6,7 @@ /** * The health check policy configuration. - * For more information, see [Editing Health Check Policies](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/HealthCheckPolicies/health-check-policy-management.htm). + * For more information, see [Editing Health Check Policies](https://docs.cloud.oracle.com/Content/Balance/Tasks/editinghealthcheck.htm). * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/HealthCheckerDetails.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/HealthCheckerDetails.java index ba12b0520e9..78ae7d8ce89 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/HealthCheckerDetails.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/HealthCheckerDetails.java @@ -6,7 +6,7 @@ /** * The health check policy configuration. - * For more information, see [Editing Health Check Policies](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/HealthCheckPolicies/health-check-policy-management.htm). + * For more information, see [Editing Health Check Policies](https://docs.cloud.oracle.com/Content/Balance/Tasks/editinghealthcheck.htm). * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/Listener.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/Listener.java index e0935e6f92d..c43c32bd6d3 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/Listener.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/Listener.java @@ -6,8 +6,8 @@ /** * The congfiguration of the listener. - * For more information about listener configuration, see - * [Managing Load Balancer Listeners](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/Listeners/listener-management.htm). + * For more information about backend set configuration, see + * [Managing Load Balancer Listeners](https://docs.cloud.oracle.com/Content/Balance/Tasks/managinglisteners.htm). * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -28,7 +28,10 @@ public final class Listener extends com.oracle.bmc.http.internal.ExplicitlySetBm "port", "protocol", "ipVersion", - "isPpv2Enabled" + "isPpv2Enabled", + "tcpIdleTimeout", + "udpIdleTimeout", + "l3IpIdleTimeout" }) public Listener( String name, @@ -36,7 +39,10 @@ public Listener( Integer port, ListenerProtocols protocol, IpVersion ipVersion, - Boolean isPpv2Enabled) { + Boolean isPpv2Enabled, + Integer tcpIdleTimeout, + Integer udpIdleTimeout, + Integer l3IpIdleTimeout) { super(); this.name = name; this.defaultBackendSetName = defaultBackendSetName; @@ -44,6 +50,9 @@ public Listener( this.protocol = protocol; this.ipVersion = ipVersion; this.isPpv2Enabled = isPpv2Enabled; + this.tcpIdleTimeout = tcpIdleTimeout; + this.udpIdleTimeout = udpIdleTimeout; + this.l3IpIdleTimeout = l3IpIdleTimeout; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -174,6 +183,66 @@ public Builder isPpv2Enabled(Boolean isPpv2Enabled) { this.__explicitlySet__.add("isPpv2Enabled"); return this; } + /** + * The duration for TCP idle timeout in seconds. + * Example: {@code 300} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tcpIdleTimeout") + private Integer tcpIdleTimeout; + + /** + * The duration for TCP idle timeout in seconds. + * Example: {@code 300} + * + * @param tcpIdleTimeout the value to set + * @return this builder + **/ + public Builder tcpIdleTimeout(Integer tcpIdleTimeout) { + this.tcpIdleTimeout = tcpIdleTimeout; + this.__explicitlySet__.add("tcpIdleTimeout"); + return this; + } + /** + * The duration for UDP idle timeout in seconds. + * Example: {@code 120} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("udpIdleTimeout") + private Integer udpIdleTimeout; + + /** + * The duration for UDP idle timeout in seconds. + * Example: {@code 120} + * + * @param udpIdleTimeout the value to set + * @return this builder + **/ + public Builder udpIdleTimeout(Integer udpIdleTimeout) { + this.udpIdleTimeout = udpIdleTimeout; + this.__explicitlySet__.add("udpIdleTimeout"); + return this; + } + /** + * The duration for L3IP idle timeout in seconds. + * Example: {@code 200} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("l3IpIdleTimeout") + private Integer l3IpIdleTimeout; + + /** + * The duration for L3IP idle timeout in seconds. + * Example: {@code 200} + * + * @param l3IpIdleTimeout the value to set + * @return this builder + **/ + public Builder l3IpIdleTimeout(Integer l3IpIdleTimeout) { + this.l3IpIdleTimeout = l3IpIdleTimeout; + this.__explicitlySet__.add("l3IpIdleTimeout"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -186,7 +255,10 @@ public Listener build() { this.port, this.protocol, this.ipVersion, - this.isPpv2Enabled); + this.isPpv2Enabled, + this.tcpIdleTimeout, + this.udpIdleTimeout, + this.l3IpIdleTimeout); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -213,6 +285,15 @@ public Builder copy(Listener model) { if (model.wasPropertyExplicitlySet("isPpv2Enabled")) { this.isPpv2Enabled(model.getIsPpv2Enabled()); } + if (model.wasPropertyExplicitlySet("tcpIdleTimeout")) { + this.tcpIdleTimeout(model.getTcpIdleTimeout()); + } + if (model.wasPropertyExplicitlySet("udpIdleTimeout")) { + this.udpIdleTimeout(model.getUdpIdleTimeout()); + } + if (model.wasPropertyExplicitlySet("l3IpIdleTimeout")) { + this.l3IpIdleTimeout(model.getL3IpIdleTimeout()); + } return this; } } @@ -342,6 +423,60 @@ public Boolean getIsPpv2Enabled() { return isPpv2Enabled; } + /** + * The duration for TCP idle timeout in seconds. + * Example: {@code 300} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tcpIdleTimeout") + private final Integer tcpIdleTimeout; + + /** + * The duration for TCP idle timeout in seconds. + * Example: {@code 300} + * + * @return the value + **/ + public Integer getTcpIdleTimeout() { + return tcpIdleTimeout; + } + + /** + * The duration for UDP idle timeout in seconds. + * Example: {@code 120} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("udpIdleTimeout") + private final Integer udpIdleTimeout; + + /** + * The duration for UDP idle timeout in seconds. + * Example: {@code 120} + * + * @return the value + **/ + public Integer getUdpIdleTimeout() { + return udpIdleTimeout; + } + + /** + * The duration for L3IP idle timeout in seconds. + * Example: {@code 200} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("l3IpIdleTimeout") + private final Integer l3IpIdleTimeout; + + /** + * The duration for L3IP idle timeout in seconds. + * Example: {@code 200} + * + * @return the value + **/ + public Integer getL3IpIdleTimeout() { + return l3IpIdleTimeout; + } + @Override public String toString() { return this.toString(true); @@ -362,6 +497,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", protocol=").append(String.valueOf(this.protocol)); sb.append(", ipVersion=").append(String.valueOf(this.ipVersion)); sb.append(", isPpv2Enabled=").append(String.valueOf(this.isPpv2Enabled)); + sb.append(", tcpIdleTimeout=").append(String.valueOf(this.tcpIdleTimeout)); + sb.append(", udpIdleTimeout=").append(String.valueOf(this.udpIdleTimeout)); + sb.append(", l3IpIdleTimeout=").append(String.valueOf(this.l3IpIdleTimeout)); sb.append(")"); return sb.toString(); } @@ -382,6 +520,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.protocol, other.protocol) && java.util.Objects.equals(this.ipVersion, other.ipVersion) && java.util.Objects.equals(this.isPpv2Enabled, other.isPpv2Enabled) + && java.util.Objects.equals(this.tcpIdleTimeout, other.tcpIdleTimeout) + && java.util.Objects.equals(this.udpIdleTimeout, other.udpIdleTimeout) + && java.util.Objects.equals(this.l3IpIdleTimeout, other.l3IpIdleTimeout) && super.equals(other); } @@ -401,6 +542,15 @@ public int hashCode() { result = (result * PRIME) + (this.isPpv2Enabled == null ? 43 : this.isPpv2Enabled.hashCode()); + result = + (result * PRIME) + + (this.tcpIdleTimeout == null ? 43 : this.tcpIdleTimeout.hashCode()); + result = + (result * PRIME) + + (this.udpIdleTimeout == null ? 43 : this.udpIdleTimeout.hashCode()); + result = + (result * PRIME) + + (this.l3IpIdleTimeout == null ? 43 : this.l3IpIdleTimeout.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/ListenerDetails.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/ListenerDetails.java index 132e14e631c..0281284909e 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/ListenerDetails.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/ListenerDetails.java @@ -6,8 +6,8 @@ /** * The listener's configuration. - * For more information about listener configuration, see - * [Managing Load Balancer Listeners](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/Listeners/listener-management.htm). + * For more information about backend set configuration, see + * [Managing Load Balancer Listeners](https://docs.cloud.oracle.com/Content/Balance/Tasks/managinglisteners.htm). * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -28,7 +28,10 @@ public final class ListenerDetails extends com.oracle.bmc.http.internal.Explicit "ipVersion", "port", "protocol", - "isPpv2Enabled" + "isPpv2Enabled", + "tcpIdleTimeout", + "udpIdleTimeout", + "l3IpIdleTimeout" }) public ListenerDetails( String name, @@ -36,7 +39,10 @@ public ListenerDetails( IpVersion ipVersion, Integer port, ListenerProtocols protocol, - Boolean isPpv2Enabled) { + Boolean isPpv2Enabled, + Integer tcpIdleTimeout, + Integer udpIdleTimeout, + Integer l3IpIdleTimeout) { super(); this.name = name; this.defaultBackendSetName = defaultBackendSetName; @@ -44,6 +50,9 @@ public ListenerDetails( this.port = port; this.protocol = protocol; this.isPpv2Enabled = isPpv2Enabled; + this.tcpIdleTimeout = tcpIdleTimeout; + this.udpIdleTimeout = udpIdleTimeout; + this.l3IpIdleTimeout = l3IpIdleTimeout; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -174,6 +183,66 @@ public Builder isPpv2Enabled(Boolean isPpv2Enabled) { this.__explicitlySet__.add("isPpv2Enabled"); return this; } + /** + * The duration for TCP idle timeout in seconds. + * Example: {@code 300} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tcpIdleTimeout") + private Integer tcpIdleTimeout; + + /** + * The duration for TCP idle timeout in seconds. + * Example: {@code 300} + * + * @param tcpIdleTimeout the value to set + * @return this builder + **/ + public Builder tcpIdleTimeout(Integer tcpIdleTimeout) { + this.tcpIdleTimeout = tcpIdleTimeout; + this.__explicitlySet__.add("tcpIdleTimeout"); + return this; + } + /** + * The duration for UDP idle timeout in seconds. + * Example: {@code 120} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("udpIdleTimeout") + private Integer udpIdleTimeout; + + /** + * The duration for UDP idle timeout in seconds. + * Example: {@code 120} + * + * @param udpIdleTimeout the value to set + * @return this builder + **/ + public Builder udpIdleTimeout(Integer udpIdleTimeout) { + this.udpIdleTimeout = udpIdleTimeout; + this.__explicitlySet__.add("udpIdleTimeout"); + return this; + } + /** + * The duration for L3IP idle timeout in seconds. + * Example: {@code 200} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("l3IpIdleTimeout") + private Integer l3IpIdleTimeout; + + /** + * The duration for L3IP idle timeout in seconds. + * Example: {@code 200} + * + * @param l3IpIdleTimeout the value to set + * @return this builder + **/ + public Builder l3IpIdleTimeout(Integer l3IpIdleTimeout) { + this.l3IpIdleTimeout = l3IpIdleTimeout; + this.__explicitlySet__.add("l3IpIdleTimeout"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -186,7 +255,10 @@ public ListenerDetails build() { this.ipVersion, this.port, this.protocol, - this.isPpv2Enabled); + this.isPpv2Enabled, + this.tcpIdleTimeout, + this.udpIdleTimeout, + this.l3IpIdleTimeout); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -213,6 +285,15 @@ public Builder copy(ListenerDetails model) { if (model.wasPropertyExplicitlySet("isPpv2Enabled")) { this.isPpv2Enabled(model.getIsPpv2Enabled()); } + if (model.wasPropertyExplicitlySet("tcpIdleTimeout")) { + this.tcpIdleTimeout(model.getTcpIdleTimeout()); + } + if (model.wasPropertyExplicitlySet("udpIdleTimeout")) { + this.udpIdleTimeout(model.getUdpIdleTimeout()); + } + if (model.wasPropertyExplicitlySet("l3IpIdleTimeout")) { + this.l3IpIdleTimeout(model.getL3IpIdleTimeout()); + } return this; } } @@ -342,6 +423,60 @@ public Boolean getIsPpv2Enabled() { return isPpv2Enabled; } + /** + * The duration for TCP idle timeout in seconds. + * Example: {@code 300} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tcpIdleTimeout") + private final Integer tcpIdleTimeout; + + /** + * The duration for TCP idle timeout in seconds. + * Example: {@code 300} + * + * @return the value + **/ + public Integer getTcpIdleTimeout() { + return tcpIdleTimeout; + } + + /** + * The duration for UDP idle timeout in seconds. + * Example: {@code 120} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("udpIdleTimeout") + private final Integer udpIdleTimeout; + + /** + * The duration for UDP idle timeout in seconds. + * Example: {@code 120} + * + * @return the value + **/ + public Integer getUdpIdleTimeout() { + return udpIdleTimeout; + } + + /** + * The duration for L3IP idle timeout in seconds. + * Example: {@code 200} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("l3IpIdleTimeout") + private final Integer l3IpIdleTimeout; + + /** + * The duration for L3IP idle timeout in seconds. + * Example: {@code 200} + * + * @return the value + **/ + public Integer getL3IpIdleTimeout() { + return l3IpIdleTimeout; + } + @Override public String toString() { return this.toString(true); @@ -362,6 +497,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", port=").append(String.valueOf(this.port)); sb.append(", protocol=").append(String.valueOf(this.protocol)); sb.append(", isPpv2Enabled=").append(String.valueOf(this.isPpv2Enabled)); + sb.append(", tcpIdleTimeout=").append(String.valueOf(this.tcpIdleTimeout)); + sb.append(", udpIdleTimeout=").append(String.valueOf(this.udpIdleTimeout)); + sb.append(", l3IpIdleTimeout=").append(String.valueOf(this.l3IpIdleTimeout)); sb.append(")"); return sb.toString(); } @@ -382,6 +520,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.port, other.port) && java.util.Objects.equals(this.protocol, other.protocol) && java.util.Objects.equals(this.isPpv2Enabled, other.isPpv2Enabled) + && java.util.Objects.equals(this.tcpIdleTimeout, other.tcpIdleTimeout) + && java.util.Objects.equals(this.udpIdleTimeout, other.udpIdleTimeout) + && java.util.Objects.equals(this.l3IpIdleTimeout, other.l3IpIdleTimeout) && super.equals(other); } @@ -401,6 +542,15 @@ public int hashCode() { result = (result * PRIME) + (this.isPpv2Enabled == null ? 43 : this.isPpv2Enabled.hashCode()); + result = + (result * PRIME) + + (this.tcpIdleTimeout == null ? 43 : this.tcpIdleTimeout.hashCode()); + result = + (result * PRIME) + + (this.udpIdleTimeout == null ? 43 : this.udpIdleTimeout.hashCode()); + result = + (result * PRIME) + + (this.l3IpIdleTimeout == null ? 43 : this.l3IpIdleTimeout.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/ListenerProtocols.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/ListenerProtocols.java index d169ec4bfda..5ab519449c2 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/ListenerProtocols.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/ListenerProtocols.java @@ -13,6 +13,7 @@ public enum ListenerProtocols { Tcp("TCP"), Udp("UDP"), TcpAndUdp("TCP_AND_UDP"), + L3Ip("L3IP"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/ListenerSummary.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/ListenerSummary.java index 9f94f099c08..33d9ceddc0d 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/ListenerSummary.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/ListenerSummary.java @@ -6,8 +6,8 @@ /** * The configuration of the listener. - * For more information about listener configuration, see - * [Managing Load Balancer Listeners](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/Listeners/listener-management.htm). + * For more information about backend set configuration, see + * [Managing Load Balancer Listeners](https://docs.cloud.oracle.com/Content/Balance/Tasks/managinglisteners.htm). * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -28,7 +28,10 @@ public final class ListenerSummary extends com.oracle.bmc.http.internal.Explicit "port", "protocol", "ipVersion", - "isPpv2Enabled" + "isPpv2Enabled", + "tcpIdleTimeout", + "udpIdleTimeout", + "l3IpIdleTimeout" }) public ListenerSummary( String name, @@ -36,7 +39,10 @@ public ListenerSummary( Integer port, ListenerProtocols protocol, IpVersion ipVersion, - Boolean isPpv2Enabled) { + Boolean isPpv2Enabled, + Integer tcpIdleTimeout, + Integer udpIdleTimeout, + Integer l3IpIdleTimeout) { super(); this.name = name; this.defaultBackendSetName = defaultBackendSetName; @@ -44,6 +50,9 @@ public ListenerSummary( this.protocol = protocol; this.ipVersion = ipVersion; this.isPpv2Enabled = isPpv2Enabled; + this.tcpIdleTimeout = tcpIdleTimeout; + this.udpIdleTimeout = udpIdleTimeout; + this.l3IpIdleTimeout = l3IpIdleTimeout; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -174,6 +183,66 @@ public Builder isPpv2Enabled(Boolean isPpv2Enabled) { this.__explicitlySet__.add("isPpv2Enabled"); return this; } + /** + * The duration for TCP idle timeout in seconds. + * Example: {@code 300} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tcpIdleTimeout") + private Integer tcpIdleTimeout; + + /** + * The duration for TCP idle timeout in seconds. + * Example: {@code 300} + * + * @param tcpIdleTimeout the value to set + * @return this builder + **/ + public Builder tcpIdleTimeout(Integer tcpIdleTimeout) { + this.tcpIdleTimeout = tcpIdleTimeout; + this.__explicitlySet__.add("tcpIdleTimeout"); + return this; + } + /** + * The duration for UDP idle timeout in seconds. + * Example: {@code 120} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("udpIdleTimeout") + private Integer udpIdleTimeout; + + /** + * The duration for UDP idle timeout in seconds. + * Example: {@code 120} + * + * @param udpIdleTimeout the value to set + * @return this builder + **/ + public Builder udpIdleTimeout(Integer udpIdleTimeout) { + this.udpIdleTimeout = udpIdleTimeout; + this.__explicitlySet__.add("udpIdleTimeout"); + return this; + } + /** + * The duration for L3IP idle timeout in seconds. + * Example: {@code 200} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("l3IpIdleTimeout") + private Integer l3IpIdleTimeout; + + /** + * The duration for L3IP idle timeout in seconds. + * Example: {@code 200} + * + * @param l3IpIdleTimeout the value to set + * @return this builder + **/ + public Builder l3IpIdleTimeout(Integer l3IpIdleTimeout) { + this.l3IpIdleTimeout = l3IpIdleTimeout; + this.__explicitlySet__.add("l3IpIdleTimeout"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -186,7 +255,10 @@ public ListenerSummary build() { this.port, this.protocol, this.ipVersion, - this.isPpv2Enabled); + this.isPpv2Enabled, + this.tcpIdleTimeout, + this.udpIdleTimeout, + this.l3IpIdleTimeout); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -213,6 +285,15 @@ public Builder copy(ListenerSummary model) { if (model.wasPropertyExplicitlySet("isPpv2Enabled")) { this.isPpv2Enabled(model.getIsPpv2Enabled()); } + if (model.wasPropertyExplicitlySet("tcpIdleTimeout")) { + this.tcpIdleTimeout(model.getTcpIdleTimeout()); + } + if (model.wasPropertyExplicitlySet("udpIdleTimeout")) { + this.udpIdleTimeout(model.getUdpIdleTimeout()); + } + if (model.wasPropertyExplicitlySet("l3IpIdleTimeout")) { + this.l3IpIdleTimeout(model.getL3IpIdleTimeout()); + } return this; } } @@ -342,6 +423,60 @@ public Boolean getIsPpv2Enabled() { return isPpv2Enabled; } + /** + * The duration for TCP idle timeout in seconds. + * Example: {@code 300} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tcpIdleTimeout") + private final Integer tcpIdleTimeout; + + /** + * The duration for TCP idle timeout in seconds. + * Example: {@code 300} + * + * @return the value + **/ + public Integer getTcpIdleTimeout() { + return tcpIdleTimeout; + } + + /** + * The duration for UDP idle timeout in seconds. + * Example: {@code 120} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("udpIdleTimeout") + private final Integer udpIdleTimeout; + + /** + * The duration for UDP idle timeout in seconds. + * Example: {@code 120} + * + * @return the value + **/ + public Integer getUdpIdleTimeout() { + return udpIdleTimeout; + } + + /** + * The duration for L3IP idle timeout in seconds. + * Example: {@code 200} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("l3IpIdleTimeout") + private final Integer l3IpIdleTimeout; + + /** + * The duration for L3IP idle timeout in seconds. + * Example: {@code 200} + * + * @return the value + **/ + public Integer getL3IpIdleTimeout() { + return l3IpIdleTimeout; + } + @Override public String toString() { return this.toString(true); @@ -362,6 +497,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", protocol=").append(String.valueOf(this.protocol)); sb.append(", ipVersion=").append(String.valueOf(this.ipVersion)); sb.append(", isPpv2Enabled=").append(String.valueOf(this.isPpv2Enabled)); + sb.append(", tcpIdleTimeout=").append(String.valueOf(this.tcpIdleTimeout)); + sb.append(", udpIdleTimeout=").append(String.valueOf(this.udpIdleTimeout)); + sb.append(", l3IpIdleTimeout=").append(String.valueOf(this.l3IpIdleTimeout)); sb.append(")"); return sb.toString(); } @@ -382,6 +520,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.protocol, other.protocol) && java.util.Objects.equals(this.ipVersion, other.ipVersion) && java.util.Objects.equals(this.isPpv2Enabled, other.isPpv2Enabled) + && java.util.Objects.equals(this.tcpIdleTimeout, other.tcpIdleTimeout) + && java.util.Objects.equals(this.udpIdleTimeout, other.udpIdleTimeout) + && java.util.Objects.equals(this.l3IpIdleTimeout, other.l3IpIdleTimeout) && super.equals(other); } @@ -401,6 +542,15 @@ public int hashCode() { result = (result * PRIME) + (this.isPpv2Enabled == null ? 43 : this.isPpv2Enabled.hashCode()); + result = + (result * PRIME) + + (this.tcpIdleTimeout == null ? 43 : this.tcpIdleTimeout.hashCode()); + result = + (result * PRIME) + + (this.udpIdleTimeout == null ? 43 : this.udpIdleTimeout.hashCode()); + result = + (result * PRIME) + + (this.l3IpIdleTimeout == null ? 43 : this.l3IpIdleTimeout.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/NetworkLoadBalancer.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/NetworkLoadBalancer.java index 054f52e47be..e1e33ff2304 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/NetworkLoadBalancer.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/NetworkLoadBalancer.java @@ -6,7 +6,7 @@ /** * The properties that define a network load balancer. For more information, see - * [Managing a network load balancer](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/NetworkLoadBalancers/network-load-balancer-management.htm). + * [Managing a network load balancer](https://docs.cloud.oracle.com/Content/Balance/Tasks/managingloadbalancer.htm). *

* To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, * contact an administrator. If you are an administrator who writes policies to give users access, then see @@ -49,6 +49,7 @@ public final class NetworkLoadBalancer extends com.oracle.bmc.http.internal.Expl "listeners", "backendSets", "freeformTags", + "securityAttributes", "definedTags", "systemTags" }) @@ -70,6 +71,7 @@ public NetworkLoadBalancer( java.util.Map listeners, java.util.Map backendSets, java.util.Map freeformTags, + java.util.Map> securityAttributes, java.util.Map> definedTags, java.util.Map> systemTags) { super(); @@ -90,6 +92,7 @@ public NetworkLoadBalancer( this.listeners = listeners; this.backendSets = backendSets; this.freeformTags = freeformTags; + this.securityAttributes = securityAttributes; this.definedTags = definedTags; this.systemTags = systemTags; } @@ -274,7 +277,7 @@ public Builder ipAddresses(java.util.List ipAddresses) { * A public network load balancer is accessible from the internet, depending the * [security list rules](https://docs.cloud.oracle.com/Content/network/Concepts/securitylists.htm) for your virtual cloudn network. For more information about public and * private network load balancers, - * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/overview.htm). + * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/Balance/Concepts/balanceoverview.htm#how-network-load-balancing-works). * This value is true by default. *

* Example: {@code true} @@ -293,7 +296,7 @@ public Builder ipAddresses(java.util.List ipAddresses) { * A public network load balancer is accessible from the internet, depending the * [security list rules](https://docs.cloud.oracle.com/Content/network/Concepts/securitylists.htm) for your virtual cloudn network. For more information about public and * private network load balancers, - * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/overview.htm). + * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/Balance/Concepts/balanceoverview.htm#how-network-load-balancing-works). * This value is true by default. *

* Example: {@code true} @@ -347,13 +350,13 @@ public Builder isSymmetricHashEnabled(Boolean isSymmetricHashEnabled) { return this; } /** - * The subnet in which the network load balancer is spawned [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)." + * The subnet in which the network load balancer is spawned [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). **/ @com.fasterxml.jackson.annotation.JsonProperty("subnetId") private String subnetId; /** - * The subnet in which the network load balancer is spawned [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)." + * The subnet in which the network load balancer is spawned [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). * @param subnetId the value to set * @return this builder **/ @@ -460,6 +463,31 @@ public Builder freeformTags(java.util.Map freeformTags) { this.__explicitlySet__.add("freeformTags"); return this; } + /** + * ZPR tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code { "oracle-zpr": { "td": { "value": "42", "mode": "audit" } } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * ZPR tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code { "oracle-zpr": { "td": { "value": "42", "mode": "audit" } } }} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * Defined tags for this resource. Each key is predefined and scoped to a namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -529,6 +557,7 @@ public NetworkLoadBalancer build() { this.listeners, this.backendSets, this.freeformTags, + this.securityAttributes, this.definedTags, this.systemTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -590,6 +619,9 @@ public Builder copy(NetworkLoadBalancer model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } @@ -771,7 +803,7 @@ public java.util.List getIpAddresses() { * A public network load balancer is accessible from the internet, depending the * [security list rules](https://docs.cloud.oracle.com/Content/network/Concepts/securitylists.htm) for your virtual cloudn network. For more information about public and * private network load balancers, - * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/overview.htm). + * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/Balance/Concepts/balanceoverview.htm#how-network-load-balancing-works). * This value is true by default. *

* Example: {@code true} @@ -790,7 +822,7 @@ public java.util.List getIpAddresses() { * A public network load balancer is accessible from the internet, depending the * [security list rules](https://docs.cloud.oracle.com/Content/network/Concepts/securitylists.htm) for your virtual cloudn network. For more information about public and * private network load balancers, - * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/overview.htm). + * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/Balance/Concepts/balanceoverview.htm#how-network-load-balancing-works). * This value is true by default. *

* Example: {@code true} @@ -838,13 +870,13 @@ public Boolean getIsSymmetricHashEnabled() { } /** - * The subnet in which the network load balancer is spawned [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)." + * The subnet in which the network load balancer is spawned [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). **/ @com.fasterxml.jackson.annotation.JsonProperty("subnetId") private final String subnetId; /** - * The subnet in which the network load balancer is spawned [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)." + * The subnet in which the network load balancer is spawned [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). * @return the value **/ public String getSubnetId() { @@ -941,6 +973,28 @@ public java.util.Map getFreeformTags() { return freeformTags; } + /** + * ZPR tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code { "oracle-zpr": { "td": { "value": "42", "mode": "audit" } } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * ZPR tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code { "oracle-zpr": { "td": { "value": "42", "mode": "audit" } } }} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * Defined tags for this resource. Each key is predefined and scoped to a namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -1014,6 +1068,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", listeners=").append(String.valueOf(this.listeners)); sb.append(", backendSets=").append(String.valueOf(this.backendSets)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(")"); @@ -1050,6 +1105,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.listeners, other.listeners) && java.util.Objects.equals(this.backendSets, other.backendSets) && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) && super.equals(other); @@ -1094,6 +1150,11 @@ public int hashCode() { result = (result * PRIME) + (this.listeners == null ? 43 : this.listeners.hashCode()); result = (result * PRIME) + (this.backendSets == null ? 43 : this.backendSets.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/NetworkLoadBalancerSummary.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/NetworkLoadBalancerSummary.java index 21aa7cb3542..d6f3d46b2e6 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/NetworkLoadBalancerSummary.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/NetworkLoadBalancerSummary.java @@ -40,6 +40,7 @@ public final class NetworkLoadBalancerSummary "listeners", "backendSets", "freeformTags", + "securityAttributes", "definedTags", "systemTags" }) @@ -61,6 +62,7 @@ public NetworkLoadBalancerSummary( java.util.Map listeners, java.util.Map backendSets, java.util.Map freeformTags, + java.util.Map> securityAttributes, java.util.Map> definedTags, java.util.Map> systemTags) { super(); @@ -81,6 +83,7 @@ public NetworkLoadBalancerSummary( this.listeners = listeners; this.backendSets = backendSets; this.freeformTags = freeformTags; + this.securityAttributes = securityAttributes; this.definedTags = definedTags; this.systemTags = systemTags; } @@ -265,7 +268,7 @@ public Builder ipAddresses(java.util.List ipAddresses) { * A public network load balancer is accessible from the internet, depending the * [security list rules](https://docs.cloud.oracle.com/Content/network/Concepts/securitylists.htm) for your virtual cloudn network. For more information about public and * private network load balancers, - * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/overview.htm). + * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/Balance/Concepts/balanceoverview.htm#how-network-load-balancing-works). * This value is true by default. *

* Example: {@code true} @@ -284,7 +287,7 @@ public Builder ipAddresses(java.util.List ipAddresses) { * A public network load balancer is accessible from the internet, depending the * [security list rules](https://docs.cloud.oracle.com/Content/network/Concepts/securitylists.htm) for your virtual cloudn network. For more information about public and * private network load balancers, - * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/overview.htm). + * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/Balance/Concepts/balanceoverview.htm#how-network-load-balancing-works). * This value is true by default. *

* Example: {@code true} @@ -338,13 +341,13 @@ public Builder isSymmetricHashEnabled(Boolean isSymmetricHashEnabled) { return this; } /** - * The subnet in which the network load balancer is spawned [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)." + * The subnet in which the network load balancer is spawned [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). **/ @com.fasterxml.jackson.annotation.JsonProperty("subnetId") private String subnetId; /** - * The subnet in which the network load balancer is spawned [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)." + * The subnet in which the network load balancer is spawned [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). * @param subnetId the value to set * @return this builder **/ @@ -451,6 +454,31 @@ public Builder freeformTags(java.util.Map freeformTags) { this.__explicitlySet__.add("freeformTags"); return this; } + /** + * ZPR tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code { "oracle-zpr": { "td": { "value": "42", "mode": "audit" } } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * ZPR tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code { "oracle-zpr": { "td": { "value": "42", "mode": "audit" } } }} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * Defined tags for this resource. Each key is predefined and scoped to a namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -520,6 +548,7 @@ public NetworkLoadBalancerSummary build() { this.listeners, this.backendSets, this.freeformTags, + this.securityAttributes, this.definedTags, this.systemTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -581,6 +610,9 @@ public Builder copy(NetworkLoadBalancerSummary model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } @@ -762,7 +794,7 @@ public java.util.List getIpAddresses() { * A public network load balancer is accessible from the internet, depending the * [security list rules](https://docs.cloud.oracle.com/Content/network/Concepts/securitylists.htm) for your virtual cloudn network. For more information about public and * private network load balancers, - * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/overview.htm). + * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/Balance/Concepts/balanceoverview.htm#how-network-load-balancing-works). * This value is true by default. *

* Example: {@code true} @@ -781,7 +813,7 @@ public java.util.List getIpAddresses() { * A public network load balancer is accessible from the internet, depending the * [security list rules](https://docs.cloud.oracle.com/Content/network/Concepts/securitylists.htm) for your virtual cloudn network. For more information about public and * private network load balancers, - * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/overview.htm). + * see [How Network Load Balancing Works](https://docs.cloud.oracle.com/Content/Balance/Concepts/balanceoverview.htm#how-network-load-balancing-works). * This value is true by default. *

* Example: {@code true} @@ -829,13 +861,13 @@ public Boolean getIsSymmetricHashEnabled() { } /** - * The subnet in which the network load balancer is spawned [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)." + * The subnet in which the network load balancer is spawned [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). **/ @com.fasterxml.jackson.annotation.JsonProperty("subnetId") private final String subnetId; /** - * The subnet in which the network load balancer is spawned [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)." + * The subnet in which the network load balancer is spawned [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). * @return the value **/ public String getSubnetId() { @@ -932,6 +964,28 @@ public java.util.Map getFreeformTags() { return freeformTags; } + /** + * ZPR tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code { "oracle-zpr": { "td": { "value": "42", "mode": "audit" } } }} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * ZPR tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code { "oracle-zpr": { "td": { "value": "42", "mode": "audit" } } }} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * Defined tags for this resource. Each key is predefined and scoped to a namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -1005,6 +1059,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", listeners=").append(String.valueOf(this.listeners)); sb.append(", backendSets=").append(String.valueOf(this.backendSets)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(")"); @@ -1041,6 +1096,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.listeners, other.listeners) && java.util.Objects.equals(this.backendSets, other.backendSets) && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) && super.equals(other); @@ -1085,6 +1141,11 @@ public int hashCode() { result = (result * PRIME) + (this.listeners == null ? 43 : this.listeners.hashCode()); result = (result * PRIME) + (this.backendSets == null ? 43 : this.backendSets.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/NetworkLoadBalancersProtocolSummary.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/NetworkLoadBalancersProtocolSummary.java index 242e7c1d04c..207b2d17738 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/NetworkLoadBalancersProtocolSummary.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/NetworkLoadBalancersProtocolSummary.java @@ -15,6 +15,7 @@ public enum NetworkLoadBalancersProtocolSummary { Tcp("TCP"), Udp("UDP"), TcpAndUdp("TCP_AND_UDP"), + L3Ip("L3IP"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/UpdateBackendDetails.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/UpdateBackendDetails.java index f238d9a7989..600d96fa29a 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/UpdateBackendDetails.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/UpdateBackendDetails.java @@ -38,7 +38,7 @@ public static class Builder { * proportion of incoming traffic. For example, a server weighted '3' receives three times the number of new connections * as a server weighted '1'. * For more information about load balancing policies, see - * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/introducton.htm#Policies). + * [How Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/Balance/Reference/lbpolicies.htm). *

* Example: {@code 3} * @@ -51,7 +51,7 @@ public static class Builder { * proportion of incoming traffic. For example, a server weighted '3' receives three times the number of new connections * as a server weighted '1'. * For more information about load balancing policies, see - * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/introducton.htm#Policies). + * [How Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/Balance/Reference/lbpolicies.htm). *

* Example: {@code 3} * @@ -183,7 +183,7 @@ public Builder toBuilder() { * proportion of incoming traffic. For example, a server weighted '3' receives three times the number of new connections * as a server weighted '1'. * For more information about load balancing policies, see - * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/introducton.htm#Policies). + * [How Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/Balance/Reference/lbpolicies.htm). *

* Example: {@code 3} * @@ -196,7 +196,7 @@ public Builder toBuilder() { * proportion of incoming traffic. For example, a server weighted '3' receives three times the number of new connections * as a server weighted '1'. * For more information about load balancing policies, see - * [How Network Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/introducton.htm#Policies). + * [How Load Balancing Policies Work](https://docs.cloud.oracle.com/Content/Balance/Reference/lbpolicies.htm). *

* Example: {@code 3} * diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/UpdateBackendSetDetails.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/UpdateBackendSetDetails.java index 0974627956b..c289f319bd9 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/UpdateBackendSetDetails.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/UpdateBackendSetDetails.java @@ -7,7 +7,7 @@ /** * The configuration details for updating a load balancer backend set. * For more information about backend set configuration, see - * [Managing Backend Sets](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/BackendSets/backend-set-management.htm). + * [Managing Backend Sets](https://docs.cloud.oracle.com/Content/Balance/Tasks/managingbackendsets.htm). *

**Caution:** Oracle recommends that you avoid using any confidential information when you supply string values using the API. * diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/UpdateListenerDetails.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/UpdateListenerDetails.java index 4efa624c8c9..3a595dbff76 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/UpdateListenerDetails.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/UpdateListenerDetails.java @@ -7,7 +7,7 @@ /** * The configuration of the listener. * For more information about backend set configuration, see - * [Managing Network Load Balancer Listeners](https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/Listeners/listener-management.htm). + * [Managing Network Load Balancer Listeners](https://docs.cloud.oracle.com/Content/Balance/Tasks/managinglisteners.htm). * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -30,20 +30,29 @@ public final class UpdateListenerDetails "port", "protocol", "ipVersion", - "isPpv2Enabled" + "isPpv2Enabled", + "tcpIdleTimeout", + "udpIdleTimeout", + "l3IpIdleTimeout" }) public UpdateListenerDetails( String defaultBackendSetName, Integer port, ListenerProtocols protocol, IpVersion ipVersion, - Boolean isPpv2Enabled) { + Boolean isPpv2Enabled, + Integer tcpIdleTimeout, + Integer udpIdleTimeout, + Integer l3IpIdleTimeout) { super(); this.defaultBackendSetName = defaultBackendSetName; this.port = port; this.protocol = protocol; this.ipVersion = ipVersion; this.isPpv2Enabled = isPpv2Enabled; + this.tcpIdleTimeout = tcpIdleTimeout; + this.udpIdleTimeout = udpIdleTimeout; + this.l3IpIdleTimeout = l3IpIdleTimeout; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -152,6 +161,66 @@ public Builder isPpv2Enabled(Boolean isPpv2Enabled) { this.__explicitlySet__.add("isPpv2Enabled"); return this; } + /** + * The duration for TCP idle timeout in seconds. + * Example: {@code 300} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tcpIdleTimeout") + private Integer tcpIdleTimeout; + + /** + * The duration for TCP idle timeout in seconds. + * Example: {@code 300} + * + * @param tcpIdleTimeout the value to set + * @return this builder + **/ + public Builder tcpIdleTimeout(Integer tcpIdleTimeout) { + this.tcpIdleTimeout = tcpIdleTimeout; + this.__explicitlySet__.add("tcpIdleTimeout"); + return this; + } + /** + * The duration for UDP idle timeout in seconds. + * Example: {@code 120} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("udpIdleTimeout") + private Integer udpIdleTimeout; + + /** + * The duration for UDP idle timeout in seconds. + * Example: {@code 120} + * + * @param udpIdleTimeout the value to set + * @return this builder + **/ + public Builder udpIdleTimeout(Integer udpIdleTimeout) { + this.udpIdleTimeout = udpIdleTimeout; + this.__explicitlySet__.add("udpIdleTimeout"); + return this; + } + /** + * The duration for L3IP idle timeout in seconds. + * Example: {@code 200} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("l3IpIdleTimeout") + private Integer l3IpIdleTimeout; + + /** + * The duration for L3IP idle timeout in seconds. + * Example: {@code 200} + * + * @param l3IpIdleTimeout the value to set + * @return this builder + **/ + public Builder l3IpIdleTimeout(Integer l3IpIdleTimeout) { + this.l3IpIdleTimeout = l3IpIdleTimeout; + this.__explicitlySet__.add("l3IpIdleTimeout"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -163,7 +232,10 @@ public UpdateListenerDetails build() { this.port, this.protocol, this.ipVersion, - this.isPpv2Enabled); + this.isPpv2Enabled, + this.tcpIdleTimeout, + this.udpIdleTimeout, + this.l3IpIdleTimeout); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -187,6 +259,15 @@ public Builder copy(UpdateListenerDetails model) { if (model.wasPropertyExplicitlySet("isPpv2Enabled")) { this.isPpv2Enabled(model.getIsPpv2Enabled()); } + if (model.wasPropertyExplicitlySet("tcpIdleTimeout")) { + this.tcpIdleTimeout(model.getTcpIdleTimeout()); + } + if (model.wasPropertyExplicitlySet("udpIdleTimeout")) { + this.udpIdleTimeout(model.getUdpIdleTimeout()); + } + if (model.wasPropertyExplicitlySet("l3IpIdleTimeout")) { + this.l3IpIdleTimeout(model.getL3IpIdleTimeout()); + } return this; } } @@ -296,6 +377,60 @@ public Boolean getIsPpv2Enabled() { return isPpv2Enabled; } + /** + * The duration for TCP idle timeout in seconds. + * Example: {@code 300} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tcpIdleTimeout") + private final Integer tcpIdleTimeout; + + /** + * The duration for TCP idle timeout in seconds. + * Example: {@code 300} + * + * @return the value + **/ + public Integer getTcpIdleTimeout() { + return tcpIdleTimeout; + } + + /** + * The duration for UDP idle timeout in seconds. + * Example: {@code 120} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("udpIdleTimeout") + private final Integer udpIdleTimeout; + + /** + * The duration for UDP idle timeout in seconds. + * Example: {@code 120} + * + * @return the value + **/ + public Integer getUdpIdleTimeout() { + return udpIdleTimeout; + } + + /** + * The duration for L3IP idle timeout in seconds. + * Example: {@code 200} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("l3IpIdleTimeout") + private final Integer l3IpIdleTimeout; + + /** + * The duration for L3IP idle timeout in seconds. + * Example: {@code 200} + * + * @return the value + **/ + public Integer getL3IpIdleTimeout() { + return l3IpIdleTimeout; + } + @Override public String toString() { return this.toString(true); @@ -315,6 +450,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", protocol=").append(String.valueOf(this.protocol)); sb.append(", ipVersion=").append(String.valueOf(this.ipVersion)); sb.append(", isPpv2Enabled=").append(String.valueOf(this.isPpv2Enabled)); + sb.append(", tcpIdleTimeout=").append(String.valueOf(this.tcpIdleTimeout)); + sb.append(", udpIdleTimeout=").append(String.valueOf(this.udpIdleTimeout)); + sb.append(", l3IpIdleTimeout=").append(String.valueOf(this.l3IpIdleTimeout)); sb.append(")"); return sb.toString(); } @@ -334,6 +472,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.protocol, other.protocol) && java.util.Objects.equals(this.ipVersion, other.ipVersion) && java.util.Objects.equals(this.isPpv2Enabled, other.isPpv2Enabled) + && java.util.Objects.equals(this.tcpIdleTimeout, other.tcpIdleTimeout) + && java.util.Objects.equals(this.udpIdleTimeout, other.udpIdleTimeout) + && java.util.Objects.equals(this.l3IpIdleTimeout, other.l3IpIdleTimeout) && super.equals(other); } @@ -352,6 +493,15 @@ public int hashCode() { result = (result * PRIME) + (this.isPpv2Enabled == null ? 43 : this.isPpv2Enabled.hashCode()); + result = + (result * PRIME) + + (this.tcpIdleTimeout == null ? 43 : this.tcpIdleTimeout.hashCode()); + result = + (result * PRIME) + + (this.udpIdleTimeout == null ? 43 : this.udpIdleTimeout.hashCode()); + result = + (result * PRIME) + + (this.l3IpIdleTimeout == null ? 43 : this.l3IpIdleTimeout.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/UpdateNetworkLoadBalancerDetails.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/UpdateNetworkLoadBalancerDetails.java index 011d27885b7..5453ed67d3b 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/UpdateNetworkLoadBalancerDetails.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/UpdateNetworkLoadBalancerDetails.java @@ -33,7 +33,8 @@ public final class UpdateNetworkLoadBalancerDetails "subnetIpv6Cidr", "assignedIpv6", "freeformTags", - "definedTags" + "definedTags", + "securityAttributes" }) public UpdateNetworkLoadBalancerDetails( String displayName, @@ -43,7 +44,8 @@ public UpdateNetworkLoadBalancerDetails( String subnetIpv6Cidr, String assignedIpv6, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> securityAttributes) { super(); this.displayName = displayName; this.isPreserveSourceDestination = isPreserveSourceDestination; @@ -53,6 +55,7 @@ public UpdateNetworkLoadBalancerDetails( this.assignedIpv6 = assignedIpv6; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -224,6 +227,31 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * ZPR tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * ZPR tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -238,7 +266,8 @@ public UpdateNetworkLoadBalancerDetails build() { this.subnetIpv6Cidr, this.assignedIpv6, this.freeformTags, - this.definedTags); + this.definedTags, + this.securityAttributes); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -271,6 +300,9 @@ public Builder copy(UpdateNetworkLoadBalancerDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } return this; } } @@ -436,6 +468,28 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * ZPR tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * ZPR tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + @Override public String toString() { return this.toString(true); @@ -459,6 +513,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", assignedIpv6=").append(String.valueOf(this.assignedIpv6)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(")"); return sb.toString(); } @@ -483,6 +538,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.assignedIpv6, other.assignedIpv6) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && super.equals(other); } @@ -508,6 +564,11 @@ public int hashCode() { result = (result * PRIME) + (this.assignedIpv6 == null ? 43 : this.assignedIpv6.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-nosql/pom.xml b/bmc-nosql/pom.xml index f333a14eed5..b5654763e0f 100644 --- a/bmc-nosql/pom.xml +++ b/bmc-nosql/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-nosql @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-objectstorage/bmc-objectstorage-combined/pom.xml b/bmc-objectstorage/bmc-objectstorage-combined/pom.xml index 46e26a72f30..501da1e7449 100644 --- a/bmc-objectstorage/bmc-objectstorage-combined/pom.xml +++ b/bmc-objectstorage/bmc-objectstorage-combined/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-objectstorage-parent - 2.73.0 + 2.79.0 ../pom.xml @@ -18,12 +18,12 @@ com.oracle.oci.sdk oci-java-sdk-objectstorage-generated - 2.73.0 + 2.79.0 com.oracle.oci.sdk oci-java-sdk-objectstorage-extensions - 2.73.0 + 2.79.0 diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml b/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml index 17a042e8857..e98892bae46 100644 --- a/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml +++ b/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-objectstorage-parent - 2.73.0 + 2.79.0 ../pom.xml @@ -20,12 +20,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 com.oracle.oci.sdk oci-java-sdk-objectstorage-generated - 2.73.0 + 2.79.0 diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/DownloadConfiguration.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/DownloadConfiguration.java index 38eb86302e7..1f37a758362 100644 --- a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/DownloadConfiguration.java +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/DownloadConfiguration.java @@ -79,6 +79,9 @@ public class DownloadConfiguration { */ private final ExecutorService executorService; + /** Flag to indicate whether download integrity verification should be enabled. */ + private final boolean enforceDataIntegrityForDownload; + /** * Create a configuration for the {@link DownloadManager}. * @param maxRetries maximum number of retries, not including the initial attempt. @@ -97,6 +100,42 @@ public DownloadConfiguration( long multipartDownloadThresholdInBytes, int parallelDownloads, ExecutorService executorService) { + this( + maxRetries, + initialBackoff, + maxBackoff, + partSizeInBytes, + multipartDownloadThresholdInBytes, + parallelDownloads, + executorService, + false); + } + + /** + * Create a configuration for the {@link DownloadManager} with a flag to enforce data integrity + * for downloads. + * + * @param maxRetries maximum number of retries, not including the initial attempt. + * @param initialBackoff initial backoff, before a retry is performed. + * @param maxBackoff maximum backoff between retries + * @param partSizeInBytes the size in bytes of the individual parts as which the object is + * downloaded. + * @param multipartDownloadThresholdInBytes the threshold size in bytes at which we will start + * splitting the object into parts + * @param parallelDownloads maximum number of parallel downloads + * @param executorService executor service for parallel downloads + * @param enforceDataIntegrityForDownload flag to enable or disable data integrity verification + * for downloads + */ + public DownloadConfiguration( + int maxRetries, + Duration initialBackoff, + Duration maxBackoff, + int partSizeInBytes, + long multipartDownloadThresholdInBytes, + int parallelDownloads, + ExecutorService executorService, + boolean enforceDataIntegrityForDownload) { Validate.isTrue( maxRetries >= 0, "maxRetries [%s] must be greater than or equal to %s", @@ -144,6 +183,7 @@ public DownloadConfiguration( this.multipartDownloadThresholdInBytes = multipartDownloadThresholdInBytes; this.parallelDownloads = parallelDownloads; this.executorService = executorService; + this.enforceDataIntegrityForDownload = enforceDataIntegrityForDownload; } /** @@ -165,6 +205,7 @@ public static class Builder { private long multipartDownloadThresholdInBytes; private int parallelDownloads; private ExecutorService executorService; + private boolean enforceDataIntegrityForDownload; private Builder() { this.maxRetries = 10; @@ -175,6 +216,7 @@ private Builder() { DownloadConfiguration.MIN_PART_SIZE_IN_BYTES * 2; this.parallelDownloads = 3; this.executorService = null; + this.enforceDataIntegrityForDownload = false; } /** @@ -189,7 +231,8 @@ public DownloadConfiguration build() { this.partSizeInBytes, this.multipartDownloadThresholdInBytes, this.parallelDownloads, - this.executorService); + this.executorService, + this.enforceDataIntegrityForDownload); } /** @@ -205,6 +248,7 @@ public Builder copy(DownloadConfiguration that) { this.multipartDownloadThresholdInBytes = that.multipartDownloadThresholdInBytes; this.parallelDownloads = that.parallelDownloads; this.executorService = that.executorService; + this.enforceDataIntegrityForDownload = that.enforceDataIntegrityForDownload; return this; } @@ -309,6 +353,17 @@ public Builder executorService(ExecutorService value) { this.executorService = value; return this; } + + /** + * Set whether download integrity verification should be enabled. + * + * @param value true to enable data integrity verification for downloads, false otherwise + * @return this builder + */ + public Builder enforceDataIntegrityForDownload(boolean value) { + this.enforceDataIntegrityForDownload = value; + return this; + } } /** @@ -369,4 +424,9 @@ public int getParallelDownloads() { public ExecutorService getExecutorService() { return this.executorService; } + + /** Flag to indicate whether download integrity verification should be enabled. */ + public boolean isEnforceDataIntegrityForDownload() { + return this.enforceDataIntegrityForDownload; + } } diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/DownloadManager.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/DownloadManager.java index fd8ed88cf96..cd459a65e4c 100644 --- a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/DownloadManager.java +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/DownloadManager.java @@ -9,9 +9,14 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.security.NoSuchAlgorithmException; + import com.oracle.bmc.objectstorage.ObjectStorage; import com.oracle.bmc.objectstorage.requests.GetObjectRequest; import com.oracle.bmc.objectstorage.responses.GetObjectResponse; +import com.oracle.bmc.objectstorage.transfer.internal.ChecksumInfo; +import com.oracle.bmc.objectstorage.transfer.internal.ChecksumInputStream; +import com.oracle.bmc.objectstorage.transfer.internal.ChecksumUtils; import com.oracle.bmc.objectstorage.transfer.internal.download.DownloadExecution; import com.oracle.bmc.objectstorage.transfer.internal.download.MultithreadStream; import com.oracle.bmc.objectstorage.transfer.internal.download.RetryingStream; @@ -165,9 +170,31 @@ public GetObjectResponse getObject(GetObjectRequest request) { stream = retryingStream; } - final GetObjectResponse retryingResponse = - GetObjectResponse.builder().copy(response).inputStream(stream).build(); - return retryingResponse; + // Wrap the stream with ChecksumInputStream for data integrity verification + InputStream resultStream; + if (this.config.isEnforceDataIntegrityForDownload() && request.getRange() == null) { + try { + ChecksumInfo checksumInfo = ChecksumUtils.getExpectedChecksumAndAlgorithm(response); + if (checksumInfo.getChecksum() != null) { + resultStream = + new ChecksumInputStream( + stream, + checksumInfo.getAlgorithm(), + checksumInfo.getChecksum(), + response.getContentLength()); + } else { + resultStream = stream; + } + } catch (NoSuchAlgorithmException e) { + throw new RuntimeException( + "Checksum initialization error: The specified algorithm is not available", + e); + } + } else { + resultStream = stream; + } + + return GetObjectResponse.builder().copy(response).inputStream(resultStream).build(); } /** diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/MultipartObjectAssembler.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/MultipartObjectAssembler.java index 9068c730250..101257ca880 100644 --- a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/MultipartObjectAssembler.java +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/MultipartObjectAssembler.java @@ -12,6 +12,7 @@ import javax.ws.rs.client.Invocation; import com.oracle.bmc.objectstorage.ObjectStorage; import com.oracle.bmc.objectstorage.internal.ObjectStorageUtils; +import com.oracle.bmc.objectstorage.model.ChecksumAlgorithm; import com.oracle.bmc.objectstorage.model.CommitMultipartUploadDetails; import com.oracle.bmc.objectstorage.model.CreateMultipartUploadDetails; import com.oracle.bmc.objectstorage.model.MultipartUpload; @@ -61,6 +62,7 @@ public class MultipartObjectAssembler { private final ExecutorService executorService; private final String cacheControl; private final String contentDisposition; + private final ChecksumAlgorithm additionalChecksumAlgorithm; private MultipartTransferManager transferManager; private MultipartManifestImpl manifest; @@ -104,7 +106,8 @@ public MultipartObjectAssembler( null /* invocationCallback */, UploadManager.RETRY_CONFIGURATION, /* backwards compatibility */ null /* cacheControl */, - null /* contentDisposition */); + null /* contentDisposition */, + null /* additionalChecksumAlgorithm */); } private MultipartObjectAssembler( @@ -119,7 +122,8 @@ private MultipartObjectAssembler( Consumer invocationCallback, RetryConfiguration retryConfiguration, String cacheControl, - String contentDisposition) { + String contentDisposition, + ChecksumAlgorithm additionalChecksumAlgorithm) { this.service = service; this.namespaceName = namespaceName; this.bucketName = bucketName; @@ -132,6 +136,7 @@ private MultipartObjectAssembler( this.retryConfiguration = retryConfiguration; this.cacheControl = cacheControl; this.contentDisposition = contentDisposition; + this.additionalChecksumAlgorithm = additionalChecksumAlgorithm; } /** @@ -150,26 +155,31 @@ public synchronized MultipartManifest newRequest( checkInitialized(); String ifNoneMatch = ObjectStorageUtils.getIfNoneMatchHeader(allowOverwrite); + CreateMultipartUploadRequest.Builder requestBuilder = + CreateMultipartUploadRequest.builder() + .invocationCallback(invocationCallback) + .bucketName(bucketName) + .ifNoneMatch(ifNoneMatch) + .namespaceName(namespaceName) + .createMultipartUploadDetails( + CreateMultipartUploadDetails.builder() + .object(objectName) + .contentEncoding(contentEncoding) + .contentLanguage(contentLanguage) + .contentType(contentType) + .metadata(opcMeta) + .storageTier(storageTier) + .cacheControl(cacheControl) + .contentDisposition(contentDisposition) + .build()) + .opcClientRequestId(createClientRequestId("-create")); + + if (additionalChecksumAlgorithm != null) { + requestBuilder.opcChecksumAlgorithm(additionalChecksumAlgorithm); + } + CreateMultipartUploadRequest createMultipartUploadRequest = requestBuilder.build(); CreateMultipartUploadResponse createUploadResponse = - service.createMultipartUpload( - CreateMultipartUploadRequest.builder() - .invocationCallback(invocationCallback) - .bucketName(bucketName) - .ifNoneMatch(ifNoneMatch) - .namespaceName(namespaceName) - .createMultipartUploadDetails( - CreateMultipartUploadDetails.builder() - .object(objectName) - .contentEncoding(contentEncoding) - .contentLanguage(contentLanguage) - .contentType(contentType) - .metadata(opcMeta) - .cacheControl(cacheControl) - .contentDisposition(contentDisposition) - .storageTier(storageTier) - .build()) - .opcClientRequestId(createClientRequestId("-create")) - .build()); + service.createMultipartUpload(createMultipartUploadRequest); this.manifest = new MultipartManifestImpl(createUploadResponse.getMultipartUpload().getUploadId()); @@ -249,6 +259,25 @@ public int addPart(File file, String md5) { return addPart(stream, file.length(), md5); } + /** + * Adds the next part to the upload. Parts will be committed in the order submitted. + * + *

We allow part overwrites to facilitate retries. + * + * @param stream The stream to upload as the next part + * @param contentLength The content length of the part + * @param checksum The checksum of the part, optional + * @param checksumAlgorithm The checksum algorithm used, optional (e.g., "CRC32C") + * @return The part number assigned to this part + * @throws IllegalStateException if the assembler has not been initialized or the upload has + * been aborted + */ + public int addPart( + InputStream stream, long contentLength, String checksum, String checksumAlgorithm) { + int nextPartNumber = manifest.nextPartNumber(); + return doUploadPart(stream, contentLength, checksum, checksumAlgorithm, nextPartNumber); + } + /** * Add the next part to the upload. Parts will be committed in the order * submitted. @@ -301,6 +330,28 @@ public void setPart(InputStream stream, long contentLength, String md5, int part doUploadPart(stream, contentLength, md5, partNum); } + /** + * Adds a part to the upload. The part will be ordered based on the part number provided. + * + *

This method is for setting parts with additional checksum algorithms. + * + *

Calling this will not set the ifNoneMatch value and will allow overwriting existing parts. + * + * @param stream The stream to upload + * @param contentLength The content length of the part + * @param checksum The checksum value, optional + * @param checksumAlgorithm The checksum algorithm used + * @param partNum The part number to assign to the part + */ + public void setPart( + InputStream stream, + long contentLength, + String checksum, + String checksumAlgorithm, + int partNum) { + doUploadPart(stream, contentLength, checksum, checksumAlgorithm, partNum); + } + private int doUploadPart(InputStream stream, long contentLength, String md5, int partNumber) { validateState(); UploadPartRequest request = @@ -323,6 +374,54 @@ private int doUploadPart(InputStream stream, long contentLength, String md5, int return partNumber; } + private int doUploadPart( + InputStream stream, + long contentLength, + String checksum, + String checksumAlgorithm, + int partNumber) { + validateState(); + UploadPartRequest.Builder requestBuilder = + UploadPartRequest.builder() + .invocationCallback(invocationCallback) + .namespaceName(namespaceName) + .bucketName(bucketName) + .objectName(objectName) + .contentLength(contentLength) + .uploadId(manifest.getUploadId()) + .uploadPartNum(partNumber) + .uploadPartBody(stream) + .opcClientRequestId(createClientRequestId("-" + partNumber)); + + if (checksumAlgorithm != null) { + ChecksumAlgorithm algo = ChecksumAlgorithm.create(checksumAlgorithm); + requestBuilder.opcChecksumAlgorithm(algo); + + if (checksum != null) { + switch (algo) { + case Crc32C: + requestBuilder.opcContentCrc32c(checksum); + break; + case Sha256: + requestBuilder.opcContentSha256(checksum); + break; + case Sha384: + requestBuilder.opcContentSha384(checksum); + break; + default: + throw new IllegalArgumentException( + "Unsupported checksum algorithm: " + checksumAlgorithm); + } + } + } + + UploadPartRequest request = requestBuilder.build(); + request.setRetryConfiguration(this.retryConfiguration); + + transferManager.startTransfer(request); + return partNumber; + } + /** * Aborts the current multi-part assembly and all uploads * that are currently in progress. @@ -452,6 +551,7 @@ public static class MultipartObjectAssemblerBuilder { private RetryConfiguration retryConfiguration; private String cacheControl; private String contentDisposition; + private ChecksumAlgorithm additionalChecksumAlgorithm; MultipartObjectAssemblerBuilder() {} @@ -563,6 +663,13 @@ public MultipartObjectAssembler.MultipartObjectAssemblerBuilder contentDispositi return this; } + /** @return {@code this}. */ + public MultipartObjectAssembler.MultipartObjectAssemblerBuilder additionalChecksumAlgorithm( + final ChecksumAlgorithm additionalChecksumAlgorithm) { + this.additionalChecksumAlgorithm = additionalChecksumAlgorithm; + return this; + } + public MultipartObjectAssembler build() { return new MultipartObjectAssembler( this.service, @@ -576,7 +683,8 @@ public MultipartObjectAssembler build() { this.invocationCallback, this.retryConfiguration, this.cacheControl, - this.contentDisposition); + this.contentDisposition, + this.additionalChecksumAlgorithm); } @java.lang.Override @@ -605,6 +713,8 @@ public java.lang.String toString() { + this.cacheControl + ", contentDisposition=" + this.contentDisposition + + ", additionalChecksumAlgorithm=" + + this.additionalChecksumAlgorithm + ")"; } } diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/UploadConfiguration.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/UploadConfiguration.java index 7bf9ecdd441..3d1807b7610 100644 --- a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/UploadConfiguration.java +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/UploadConfiguration.java @@ -6,6 +6,7 @@ import com.oracle.bmc.io.DuplicatableInputStream; +import com.oracle.bmc.objectstorage.model.ChecksumAlgorithm; import com.oracle.bmc.util.internal.Validate; /** @@ -62,6 +63,58 @@ public class UploadConfiguration { * ie does not implement {@link DuplicatableInputStream}, as the entire part will have to be read into memory. */ private final boolean enforceMd5BeforeMultipartUpload; + /** + * Flag to indicate that additional checksum should be set on every PutObject call. If not + * provided, the SDK will calculate it before uploading the object. Default is null. + * + *

Note: Valid values are {@link ChecksumAlgorithm#Crc32C}, {@link ChecksumAlgorithm#Sha256}, + * {@link ChecksumAlgorithm#Sha384}. + * + *

Note: If {@link #additionalChecksumAlgorithm} is provided, this value must match it. + * + *

When this value is set, the SDK will set the corresponding header: + * + *

    + *
  • {@code opc-content-crc32c} if the value is "Crc32C" + *
  • {@code opc-content-sha256} if the value is "Sha256" + *
  • {@code opc-content-sha384} if the value is "Sha384" + *
+ * + *

If {@link #additionalChecksumAlgorithm} has a matching value or is null, the header {@code + * opc-checksum-algorithm} will also be set. + * + *

Note, having the SDK calculate it could lead to OutOfMemory exceptions if the source + * stream for the part cannot be duplicated, i.e., does not implement {@link + * DuplicatableInputStream}, as the entire part will have to be read into memory. + */ + private final ChecksumAlgorithm enforceAdditionalChecksumBeforeUpload; + + /** + * Flag to indicate that additional checksum should be set on every part of a multi-part upload. + * The SDK will calculate the additional checksum before uploading for each part it creates. + * Default is null. + * + *

Note: Valid values are {@link ChecksumAlgorithm#Crc32C}, {@link ChecksumAlgorithm#Sha256}, + * {@link ChecksumAlgorithm#Sha384}. + * + *

Note: If {@link #additionalChecksumAlgorithm} is provided, this value must match it. + * + *

When this value is set, the SDK will set the corresponding header: + * + *

    + *
  • {@code opc-content-crc32c} if the value is "Crc32C" + *
  • {@code opc-content-sha256} if the value is "Sha256" + *
  • {@code opc-content-sha384} if the value is "Sha384" + *
+ * + *

If {@link #additionalChecksumAlgorithm} has a matching value or is null, the header {@code + * opc-checksum-algorithm} will also be set. + * + *

Note, having the SDK calculate it could lead to OutOfMemory exceptions if the source + * stream for the part cannot be duplicated, i.e., does not implement {@link + * DuplicatableInputStream}, as the entire part will have to be read into memory. + */ + private final ChecksumAlgorithm enforceAdditionalChecksumBeforeMultipartUpload; /** * Flag to indicate that multi-part uploads can be used. Default is true. */ @@ -75,6 +128,21 @@ public class UploadConfiguration { * failed uploads themselves). Default is false. */ private final boolean disableAutoAbort; + /** + * The value of the additional checksum algorithm to be used for data integrity checks. Default + * is null. + * + *

Note: Valid values are {@link ChecksumAlgorithm#Crc32C}, {@link ChecksumAlgorithm#Sha256}, + * {@link ChecksumAlgorithm#Sha384}. + * + *

Note: If provided, {@link #enforceAdditionalChecksumBeforeUpload} and {@link + * #enforceAdditionalChecksumBeforeMultipartUpload} must match this value. + * + *

When this value is provided, the additional checksum algorithm will be set for both single + * PutObject requests and each part of a multipart upload. Specifically, the header + * `opc-checksum-algorithm` will be set to the value of this algorithm. + */ + private final ChecksumAlgorithm additionalChecksumAlgorithm; @Deprecated public long getMinimumLengthPerUploadPart() { @@ -90,6 +158,52 @@ private UploadConfiguration( Boolean allowMultipartUploads, Boolean allowParallelUploads, Boolean disableAutoAbort) { + this( + minimumLengthForMultipartUpload, + lengthPerUploadPart, + enforceMd5BeforeUpload, + enforceMd5BeforeMultipartUpload, + null, + null, + allowMultipartUploads, + allowParallelUploads, + disableAutoAbort, + null); + } + + /** + * Create a configuration for the {@link UploadManager} with an additional checksum algorithm. + * + * @param minimumLengthForMultipartUpload Minimum length in MiB before an upload is performed + * using multi-part upload + * @param lengthPerUploadPart Length in MiB for each part of a multi-part upload (except the + * last) + * @param enforceMd5BeforeUpload Flag to indicate that MD5 should be set on every PutObject call + * @param enforceMd5BeforeMultipartUpload Flag to indicate that MD5 should be set on every part + * of a multi-part upload + * @param enforceAdditionalChecksumBeforeUpload Flag to indicate that additional checksum should + * be set on every PutObject call + * @param enforceAdditionalChecksumBeforeMultipartUpload Flag to indicate that additional + * checksum should be set on every part of a multi-part upload + * @param allowMultipartUploads Flag to indicate that multi-part uploads can be used + * @param allowParallelUploads Flag to indicate that multi-part uploads can upload individual + * parts in parallel if possible + * @param disableAutoAbort Flag to indicate that uploads that fail should not be automatically + * aborted + * @param additionalChecksumAlgorithm The additional checksum algorithm to be used for data + * integrity checks + */ + public UploadConfiguration( + Integer minimumLengthForMultipartUpload, + Integer lengthPerUploadPart, + Boolean enforceMd5BeforeUpload, + Boolean enforceMd5BeforeMultipartUpload, + ChecksumAlgorithm enforceAdditionalChecksumBeforeUpload, + ChecksumAlgorithm enforceAdditionalChecksumBeforeMultipartUpload, + Boolean allowMultipartUploads, + Boolean allowParallelUploads, + Boolean disableAutoAbort, + ChecksumAlgorithm additionalChecksumAlgorithm) { this.minimumLengthForMultipartUpload = getOrDefault( minimumLengthForMultipartUpload, DEFAULT_MIN_LENGTH_FOR_MULTI_PART_UPLOAD); @@ -98,9 +212,14 @@ private UploadConfiguration( this.maxPartsForMultipartUpload = MAXIMUM_NUM_ALLOWED_PARTS; this.enforceMd5BeforeUpload = getOrDefault(enforceMd5BeforeUpload, false); this.enforceMd5BeforeMultipartUpload = getOrDefault(enforceMd5BeforeMultipartUpload, false); + this.enforceAdditionalChecksumBeforeUpload = + getOrDefault(enforceAdditionalChecksumBeforeUpload, null); + this.enforceAdditionalChecksumBeforeMultipartUpload = + getOrDefault(enforceAdditionalChecksumBeforeMultipartUpload, null); this.allowMultipartUploads = getOrDefault(allowMultipartUploads, true); this.allowParallelUploads = getOrDefault(allowParallelUploads, true); this.disableAutoAbort = getOrDefault(disableAutoAbort, false); + this.additionalChecksumAlgorithm = getOrDefault(additionalChecksumAlgorithm, null); Validate.isTrue( this.minimumLengthForMultipartUpload >= 0L, @@ -117,6 +236,24 @@ private UploadConfiguration( this.lengthPerUploadPart, MINIMUM_ALLOWED_LENGTH_PER_PART_MB, MAXIMUM_ALLOWED_LENGTH_PER_PART_MB)); + Validate.isTrue( + this.enforceAdditionalChecksumBeforeUpload == null + || this.enforceAdditionalChecksumBeforeUpload.equals( + ChecksumAlgorithm.Sha256) + || this.enforceAdditionalChecksumBeforeUpload.equals( + ChecksumAlgorithm.Sha384) + || this.enforceAdditionalChecksumBeforeUpload.equals( + ChecksumAlgorithm.Crc32C), + "Invalid value for enforceAdditionalChecksumBeforeUpload. Valid values are: SHA256, SHA384, CRC32C."); + Validate.isTrue( + this.enforceAdditionalChecksumBeforeMultipartUpload == null + || this.enforceAdditionalChecksumBeforeMultipartUpload.equals( + ChecksumAlgorithm.Sha256) + || this.enforceAdditionalChecksumBeforeMultipartUpload.equals( + ChecksumAlgorithm.Sha384) + || this.enforceAdditionalChecksumBeforeMultipartUpload.equals( + ChecksumAlgorithm.Crc32C), + "Invalid value for enforceAdditionalChecksumBeforeMultipartUpload. Valid values are: SHA256, SHA384, CRC32C."); } public static class UploadConfigurationBuilder { @@ -124,9 +261,12 @@ public static class UploadConfigurationBuilder { private Integer lengthPerUploadPart; private Boolean enforceMd5BeforeUpload; private Boolean enforceMd5BeforeMultipartUpload; + private ChecksumAlgorithm enforceAdditionalChecksumBeforeUpload; + private ChecksumAlgorithm enforceAdditionalChecksumBeforeMultipartUpload; private Boolean allowMultipartUploads; private Boolean allowParallelUploads; private Boolean disableAutoAbort; + private ChecksumAlgorithm additionalChecksumAlgorithm; /** * Sets the enforce MD5 flag for both {@link #enforceMd5BeforeUpload(Boolean)} and @@ -140,6 +280,22 @@ public UploadConfigurationBuilder enforceMd5(Boolean enforceMd5) { return this; } + /** + * Sets the enforce additional checksum flag for both {@link + * #enforceAdditionalChecksumBeforeUpload(ChecksumAlgorithm)} and {@link + * #enforceAdditionalChecksumBeforeMultipartUpload(ChecksumAlgorithm)} in a single call. + * + * @param enforceAdditionalChecksum the additional checksum algorithm to enforce everywhere, + * null to use default values. + * @return the current builder instance + */ + public UploadConfigurationBuilder enforceAdditionalChecksum( + ChecksumAlgorithm enforceAdditionalChecksum) { + this.enforceAdditionalChecksumBeforeUpload = enforceAdditionalChecksum; + this.enforceAdditionalChecksumBeforeMultipartUpload = enforceAdditionalChecksum; + return this; + } + /** * @deprecated maxPartsForMultipartUpload is no longer configurable and will always be set to * {@link #MAXIMUM_NUM_ALLOWED_PARTS} @@ -205,6 +361,22 @@ public UploadConfiguration.UploadConfigurationBuilder enforceMd5BeforeMultipartU return this; } + /** @return {@code this}. */ + public UploadConfiguration.UploadConfigurationBuilder enforceAdditionalChecksumBeforeUpload( + final ChecksumAlgorithm enforceAdditionalChecksumBeforeUpload) { + this.enforceAdditionalChecksumBeforeUpload = enforceAdditionalChecksumBeforeUpload; + return this; + } + + /** @return {@code this}. */ + public UploadConfiguration.UploadConfigurationBuilder + enforceAdditionalChecksumBeforeMultipartUpload( + final ChecksumAlgorithm enforceAdditionalChecksumBeforeMultipartUpload) { + this.enforceAdditionalChecksumBeforeMultipartUpload = + enforceAdditionalChecksumBeforeMultipartUpload; + return this; + } + /** * @return {@code this}. */ @@ -232,15 +404,25 @@ public UploadConfiguration.UploadConfigurationBuilder disableAutoAbort( return this; } + /** @return {@code this}. */ + public UploadConfiguration.UploadConfigurationBuilder additionalChecksumAlgorithm( + final ChecksumAlgorithm additionalChecksumAlgorithm) { + this.additionalChecksumAlgorithm = additionalChecksumAlgorithm; + return this; + } + public UploadConfiguration build() { return new UploadConfiguration( this.minimumLengthForMultipartUpload, this.lengthPerUploadPart, this.enforceMd5BeforeUpload, this.enforceMd5BeforeMultipartUpload, + this.enforceAdditionalChecksumBeforeUpload, + this.enforceAdditionalChecksumBeforeMultipartUpload, this.allowMultipartUploads, this.allowParallelUploads, - this.disableAutoAbort); + this.disableAutoAbort, + this.additionalChecksumAlgorithm); } @java.lang.Override @@ -253,12 +435,18 @@ public java.lang.String toString() { + this.enforceMd5BeforeUpload + ", enforceMd5BeforeMultipartUpload=" + this.enforceMd5BeforeMultipartUpload + + ", enforceAdditionalChecksumBeforeUpload=" + + this.enforceAdditionalChecksumBeforeUpload + + ", enforceAdditionalChecksumBeforeMultipartUpload=" + + this.enforceAdditionalChecksumBeforeMultipartUpload + ", allowMultipartUploads=" + this.allowMultipartUploads + ", allowParallelUploads=" + this.allowParallelUploads + ", disableAutoAbort=" + this.disableAutoAbort + + ", additionalChecksumAlgorithm=" + + this.additionalChecksumAlgorithm + ")"; } } @@ -323,6 +511,27 @@ public boolean isEnforceMd5BeforeMultipartUpload() { return this.enforceMd5BeforeMultipartUpload; } + /** + * Flag to indicate that additional checksum should be set on every PutObject call. If not + * provided, the SDK will calculate it before uploading the object. Default is null. + * + *

Note: Valid values are {@link ChecksumAlgorithm#Crc32C}, {@link ChecksumAlgorithm#Sha256},{@link ChecksumAlgorithm#Sha384}. + */ + public ChecksumAlgorithm getEnforceAdditionalChecksumBeforeUpload() { + return this.enforceAdditionalChecksumBeforeUpload; + } + + /** + * Flag to indicate that additional checksum should be set on every part of a multi-part upload. + * The SDK will calculate the additional checksum before uploading for each part it creates. + * Default is null. + * + *

Note: Valid values are {@link ChecksumAlgorithm#Crc32C}, {@link ChecksumAlgorithm#Sha256},{@link ChecksumAlgorithm#Sha384}. + */ + public ChecksumAlgorithm getEnforceAdditionalChecksumBeforeMultipartUpload() { + return this.enforceAdditionalChecksumBeforeMultipartUpload; + } + /** * Flag to indicate that multi-part uploads can be used. Default is true. */ @@ -345,6 +554,13 @@ public boolean isDisableAutoAbort() { return this.disableAutoAbort; } + /** The value of the additional checksum algorithm. Default is null. + *

Note: Valid values are {@link ChecksumAlgorithm#Crc32C}, {@link ChecksumAlgorithm#Sha256},{@link ChecksumAlgorithm#Sha384}. + * */ + public ChecksumAlgorithm getAdditionalChecksumAlgorithm() { + return this.additionalChecksumAlgorithm; + } + @java.lang.Override public java.lang.String toString() { return "UploadConfiguration(minimumLengthForMultipartUpload=" @@ -357,12 +573,18 @@ public java.lang.String toString() { + this.isEnforceMd5BeforeUpload() + ", enforceMd5BeforeMultipartUpload=" + this.isEnforceMd5BeforeMultipartUpload() + + ", enforceAdditionalChecksumBeforeUpload=" + + this.getEnforceAdditionalChecksumBeforeUpload() + + ", enforceAdditionalChecksumBeforeMultipartUpload=" + + this.getEnforceAdditionalChecksumBeforeMultipartUpload() + ", allowMultipartUploads=" + this.isAllowMultipartUploads() + ", allowParallelUploads=" + this.isAllowParallelUploads() + ", disableAutoAbort=" + this.isDisableAutoAbort() + + ", additionalChecksumAlgorithm=" + + this.getAdditionalChecksumAlgorithm() + ")"; } } diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/UploadManager.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/UploadManager.java index e6097b84026..0d26b34b1f2 100644 --- a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/UploadManager.java +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/UploadManager.java @@ -4,10 +4,12 @@ */ package com.oracle.bmc.objectstorage.transfer; +import com.oracle.bmc.objectstorage.model.ChecksumAlgorithm; +import com.oracle.bmc.objectstorage.transfer.internal.ChecksumUtils; +import com.oracle.bmc.responses.BmcResponse; import com.oracle.bmc.util.VisibleForTesting; import com.oracle.bmc.internal.ClientThreadFactory; import com.oracle.bmc.ClientRuntime; -import com.oracle.bmc.io.DuplicatableInputStream; import com.oracle.bmc.model.BmcException; import com.oracle.bmc.objectstorage.ObjectStorage; import com.oracle.bmc.objectstorage.internal.ObjectStorageUtils; @@ -16,20 +18,16 @@ import com.oracle.bmc.objectstorage.responses.PutObjectResponse; import com.oracle.bmc.objectstorage.transfer.internal.MultipartUtils; import com.oracle.bmc.objectstorage.transfer.internal.StreamChunkCreator; -import com.oracle.bmc.objectstorage.transfer.internal.StreamHelper; import com.oracle.bmc.retrier.DefaultRetryCondition; import com.oracle.bmc.retrier.RetryCondition; import com.oracle.bmc.retrier.RetryConfiguration; import com.oracle.bmc.util.StreamUtils; import com.oracle.bmc.waiter.ExponentialBackoffDelayStrategy; import com.oracle.bmc.waiter.MaxAttemptsTerminationStrategy; + import javax.annotation.Nonnull; -import java.io.ByteArrayOutputStream; import java.io.File; -import java.io.IOException; import java.io.InputStream; -import java.io.OutputStream; -import java.security.DigestOutputStream; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -111,18 +109,38 @@ private UploadResponse singleUpload(UploadRequest uploadRequest, long contentLen ProgressTrackerFactory.createSingleUploadProgressTrackerFactory( uploadRequest.progressReporter, contentLength); PutObjectRequest putObjectRequest = uploadRequest.putObjectRequest; + ChecksumAlgorithm algorithm = uploadConfiguration.getAdditionalChecksumAlgorithm(); + ChecksumAlgorithm enforceAlgoChecksum = + uploadConfiguration.getEnforceAdditionalChecksumBeforeUpload(); + if (MultipartUtils.shouldCalculateMd5(uploadConfiguration, putObjectRequest)) { - MD5Calculation md5Calculation = - calculateMd5( + ChecksumUtils.MD5Calculation md5Calculation = + ChecksumUtils.calculateMd5( putObjectRequest.getPutObjectBody(), putObjectRequest.getContentLength()); putObjectRequest = PutObjectRequest.builder() .copy(putObjectRequest) - .contentMD5(md5Calculation.md5) + .contentMD5(md5Calculation.getMd5()) .putObjectBody( ProgressTrackingInputStreamFactory.create( - md5Calculation.streamToUse, + md5Calculation.getStreamToUse(), + progressTrackerFactory.getProgressTracker())) + .build(); + } else if (MultipartUtils.shouldCalculateAdditionalChecksum( + uploadConfiguration, putObjectRequest)) { + putObjectRequest = + updateRequestWithChecksum( + putObjectRequest, enforceAlgoChecksum, progressTrackerFactory); + } else if (MultipartUtils.shouldSetAdditionalChecksum( + uploadConfiguration, putObjectRequest)) { + putObjectRequest = + PutObjectRequest.builder() + .copy(putObjectRequest) + .opcChecksumAlgorithm(algorithm) + .putObjectBody( + ProgressTrackingInputStreamFactory.create( + putObjectRequest.getPutObjectBody(), progressTrackerFactory.getProgressTracker())) .build(); } else { @@ -141,12 +159,13 @@ private UploadResponse singleUpload(UploadRequest uploadRequest, long contentLen getRetryToUse(putObjectRequest.getRetryConfiguration())); PutObjectResponse response = objectStorage.putObject(putObjectRequest); - return new UploadResponse( - response.getETag(), - response.getOpcContentMd5(), - null, - response.getOpcRequestId(), - response.getOpcClientRequestId()); + + return buildUploadResponse( + response, + algorithm, + enforceAlgoChecksum, + putObjectRequest.getOpcChecksumAlgorithm(), + false); } private UploadResponse multipartUpload(UploadRequest uploadRequest) { @@ -163,6 +182,10 @@ private UploadResponse multipartUpload(UploadRequest uploadRequest) { final ExecutorService executorServiceToUse; final boolean shutdownExecutor; + ChecksumAlgorithm algorithm = uploadConfiguration.getAdditionalChecksumAlgorithm(); + ChecksumAlgorithm enforceAlgoChecksum = + uploadConfiguration.getEnforceAdditionalChecksumBeforeMultipartUpload(); + if (uploadConfiguration.isAllowParallelUploads() && chunkCreator.supportsParallelReads()) { if (uploadRequest.parallelUploadExecutorService != null) { executorServiceToUse = uploadRequest.parallelUploadExecutorService; @@ -193,13 +216,33 @@ private UploadResponse multipartUpload(UploadRequest uploadRequest) { LOG.trace("Creating part {}", ++partCount); StreamChunkCreator.SubRangeInputStream chunk = chunkCreator.next(); if (uploadConfiguration.isEnforceMd5BeforeMultipartUpload()) { - MD5Calculation md5Calculation = calculateMd5(chunk, chunk.length()); + ChecksumUtils.MD5Calculation md5Calculation = + ChecksumUtils.calculateMd5(chunk, chunk.length()); assembler.addPart( ProgressTrackingInputStreamFactory.create( - md5Calculation.streamToUse, + md5Calculation.getStreamToUse(), progressTrackerFactory.getProgressTracker()), chunk.length(), - md5Calculation.md5); + md5Calculation.getMd5()); + } else if (uploadConfiguration.getEnforceAdditionalChecksumBeforeMultipartUpload() + != null) { + addPartWithChecksum( + assembler, chunk, enforceAlgoChecksum, progressTrackerFactory); + } else if (MultipartUtils.shouldSetAdditionalChecksum( + uploadConfiguration, request)) { + assembler.addPart( + ProgressTrackingInputStreamFactory.create( + chunk, progressTrackerFactory.getProgressTracker()), + chunk.length(), + null, + algorithm.getValue()); + } else if (request.getOpcChecksumAlgorithm() != null) { + assembler.addPart( + ProgressTrackingInputStreamFactory.create( + chunk, progressTrackerFactory.getProgressTracker()), + chunk.length(), + null, + request.getOpcChecksumAlgorithm().getValue()); } else { assembler.addPart( ProgressTrackingInputStreamFactory.create( @@ -210,12 +253,13 @@ private UploadResponse multipartUpload(UploadRequest uploadRequest) { } LOG.debug("Created {} parts", partCount); CommitMultipartUploadResponse response = assembler.commit(); - return new UploadResponse( - response.getETag(), - null, - response.getOpcMultipartMd5(), - response.getOpcRequestId(), - response.getOpcClientRequestId()); + + return buildUploadResponse( + response, + algorithm, + enforceAlgoChecksum, + request.getOpcChecksumAlgorithm(), + true); } catch (Exception e) { if (manifest != null) { LOG.error( @@ -257,6 +301,171 @@ private UploadResponse multipartUpload(UploadRequest uploadRequest) { } } + private UploadResponse buildUploadResponse( + BmcResponse response, + ChecksumAlgorithm algorithm, + ChecksumAlgorithm enforceAlgoChecksum, + ChecksumAlgorithm requestAlgorithm, + boolean isMultipart) { + UploadResponse.Builder responseBuilder = new UploadResponse.Builder(); + + if (response instanceof PutObjectResponse) { + PutObjectResponse putObjectResponse = (PutObjectResponse) response; + responseBuilder + .eTag(putObjectResponse.getETag()) + .opcRequestId(putObjectResponse.getOpcRequestId()) + .opcClientRequestId(putObjectResponse.getOpcClientRequestId()) + .contentMd5(putObjectResponse.getOpcContentMd5()); + } else if (response instanceof CommitMultipartUploadResponse) { + CommitMultipartUploadResponse commitResponse = (CommitMultipartUploadResponse) response; + responseBuilder + .eTag(commitResponse.getETag()) + .opcRequestId(commitResponse.getOpcRequestId()) + .opcClientRequestId(commitResponse.getOpcClientRequestId()) + .multipartMd5(commitResponse.getOpcMultipartMd5()); + } else { + throw new IllegalArgumentException( + "Unsupported response type: " + response.getClass().getName()); + } + + ChecksumAlgorithm checksumAlgorithm = + algorithm != null + ? algorithm + : enforceAlgoChecksum != null ? enforceAlgoChecksum : requestAlgorithm; + + if (checksumAlgorithm != null) { + String responseChecksum = + ChecksumUtils.getResponseChecksum(response, checksumAlgorithm, isMultipart); + if (responseChecksum != null) { + switch (checksumAlgorithm) { + case Crc32C: + responseBuilder.contentCrc32c(responseChecksum); + break; + case Sha256: + if (isMultipart) { + responseBuilder.multipartSha256(responseChecksum); + } else { + responseBuilder.contentSha256(responseChecksum); + } + break; + case Sha384: + if (isMultipart) { + responseBuilder.multipartSha384(responseChecksum); + } else { + responseBuilder.contentSha384(responseChecksum); + } + break; + default: + throw new IllegalArgumentException( + "Unsupported checksum algorithm: " + checksumAlgorithm); + } + } + } + + return responseBuilder.build(); + } + + private PutObjectRequest updateRequestWithChecksum( + PutObjectRequest putObjectRequest, + ChecksumAlgorithm algorithm, + ProgressTrackerFactory progressTrackerFactory) { + + InputStream streamToUse; + String checksum; + PutObjectRequest.Builder requestBuilder = + PutObjectRequest.builder().copy(putObjectRequest).opcChecksumAlgorithm(algorithm); + + switch (algorithm) { + case Crc32C: + ChecksumUtils.CRC32CCalculation crc32CCalculation = + ChecksumUtils.calculateCrc32c( + putObjectRequest.getPutObjectBody(), + putObjectRequest.getContentLength()); + streamToUse = crc32CCalculation.getStreamToUse(); + checksum = crc32CCalculation.getCrc32c(); + requestBuilder.opcContentCrc32c(checksum); + break; + case Sha256: + ChecksumUtils.SHA256Calculation sha256Calculation = + ChecksumUtils.calculateSha256( + putObjectRequest.getPutObjectBody(), + putObjectRequest.getContentLength()); + streamToUse = sha256Calculation.getStreamToUse(); + checksum = sha256Calculation.getSha256(); + requestBuilder.opcContentSha256(checksum); + break; + case Sha384: + ChecksumUtils.SHA384Calculation sha384Calculation = + ChecksumUtils.calculateSha384( + putObjectRequest.getPutObjectBody(), + putObjectRequest.getContentLength()); + streamToUse = sha384Calculation.getStreamToUse(); + checksum = sha384Calculation.getSha384(); + requestBuilder.opcContentSha384(checksum); + break; + default: + throw new IllegalArgumentException("Unsupported checksum algorithm: " + algorithm); + } + + return requestBuilder + .putObjectBody( + ProgressTrackingInputStreamFactory.create( + streamToUse, progressTrackerFactory.getProgressTracker())) + .build(); + } + + private void addPartWithChecksum( + MultipartObjectAssembler assembler, + StreamChunkCreator.SubRangeInputStream chunk, + ChecksumAlgorithm algorithm, + ProgressTrackerFactory progressTrackerFactory) { + + InputStream streamToUse; + String checksum; + + switch (algorithm) { + case Crc32C: + ChecksumUtils.CRC32CCalculation crc32CCalculation = + ChecksumUtils.calculateCrc32c(chunk, chunk.length()); + streamToUse = crc32CCalculation.getStreamToUse(); + checksum = crc32CCalculation.getCrc32c(); + assembler.addPart( + ProgressTrackingInputStreamFactory.create( + streamToUse, progressTrackerFactory.getProgressTracker()), + chunk.length(), + checksum, + algorithm.getValue()); + break; + case Sha256: + ChecksumUtils.SHA256Calculation sha256Calculation = + ChecksumUtils.calculateSha256(chunk, chunk.length()); + streamToUse = sha256Calculation.getStreamToUse(); + checksum = sha256Calculation.getSha256(); + assembler.addPart( + ProgressTrackingInputStreamFactory.create( + streamToUse, progressTrackerFactory.getProgressTracker()), + chunk.length(), + checksum, + algorithm.getValue()); + break; + case Sha384: + ChecksumUtils.SHA384Calculation sha384Calculation = + ChecksumUtils.calculateSha384(chunk, chunk.length()); + streamToUse = sha384Calculation.getStreamToUse(); + checksum = sha384Calculation.getSha384(); + assembler.addPart( + ProgressTrackingInputStreamFactory.create( + streamToUse, progressTrackerFactory.getProgressTracker()), + chunk.length(), + checksum, + algorithm.getValue()); + break; + default: + throw new UnsupportedOperationException( + "Unsupported checksum algorithm: " + algorithm); + } + } + /** * Determines the first non-null RetryConfiguration * 1 -> RetryConfiguration set on UploadConfiguration @@ -284,20 +493,29 @@ protected MultipartObjectAssembler createAssembler( uploadRequest.putObjectRequest.getRetryConfiguration(), request.getRetryConfiguration()); - return MultipartObjectAssembler.builder() - .allowOverwrite(uploadRequest.allowOverwrite) - .bucketName(request.getBucketName()) - .executorService(executorService) - .invocationCallback(request.getInvocationCallback()) - .namespaceName(request.getNamespaceName()) - .objectName(request.getObjectName()) - .storageTier(request.getStorageTier()) - .opcClientRequestId(request.getOpcClientRequestId()) - .service(objectStorage) - .cacheControl(request.getCacheControl()) - .contentDisposition(request.getContentDisposition()) - .retryConfiguration(retryToUse) - .build(); + MultipartObjectAssembler.MultipartObjectAssemblerBuilder assemblerBuilder = + MultipartObjectAssembler.builder() + .allowOverwrite(uploadRequest.allowOverwrite) + .bucketName(request.getBucketName()) + .executorService(executorService) + .invocationCallback(request.getInvocationCallback()) + .namespaceName(request.getNamespaceName()) + .objectName(request.getObjectName()) + .storageTier(request.getStorageTier()) + .opcClientRequestId(request.getOpcClientRequestId()) + .service(objectStorage) + .cacheControl(request.getCacheControl()) + .contentDisposition(request.getContentDisposition()) + .retryConfiguration(retryToUse); + + if (uploadConfiguration.getAdditionalChecksumAlgorithm() != null) { + assemblerBuilder.additionalChecksumAlgorithm( + uploadConfiguration.getAdditionalChecksumAlgorithm()); + } else if (request.getOpcChecksumAlgorithm() != null) { + assemblerBuilder.additionalChecksumAlgorithm(request.getOpcChecksumAlgorithm()); + } + + return assemblerBuilder.build(); } private static ExecutorService buildDefaultParallelExecutor() { @@ -309,67 +527,6 @@ private static ExecutorService buildDefaultParallelExecutor() { .build()); } - private static MD5Calculation calculateMd5(InputStream stream, Long contentLength) { - String md5 = null; - InputStream streamToReturn = null; - - if (stream instanceof DuplicatableInputStream) { - md5 = - performMd5Calculation( - ((DuplicatableInputStream) stream).duplicate(), - new StreamHelper.NullOutputStream(), - contentLength); - streamToReturn = stream; - } else { - LOG.info( - "About to copy object into memory to calculate MD5, may lead to OutOfMemory exceptions"); - if (contentLength.longValue() > Integer.MAX_VALUE) { - throw new BmcException( - false, - "Cannot compute MD5 client-size as content length (" - + contentLength.longValue() - + ") is larger than max buffer. Disable MD5 enforcement or provide a DuplicableInputStream to avoid this problem", - null, - null); - } - try { - ByteArrayOutputStream baos = new ByteArrayOutputStream(contentLength.intValue()); - md5 = performMd5Calculation(stream, baos, contentLength); - streamToReturn = StreamUtils.createByteArrayInputStream(baos.toByteArray()); - } catch (OutOfMemoryError oom) { - OutOfMemoryError newOom = - new OutOfMemoryError( - "Could not compute MD5. Disable MD5 enforcement or provide a DuplicableInputStream to avoid this problem"); - newOom.initCause(oom); - throw newOom; - } - } - return new MD5Calculation(streamToReturn, md5); - } - - private static String performMd5Calculation( - InputStream stream, OutputStream outputStream, long contentLength) { - DigestOutputStream digestOutputStream = - StreamHelper.createMd5MessageOutputStream(outputStream); - long bytesCopied; - try { - bytesCopied = StreamHelper.copy(stream, digestOutputStream); - } catch (IOException e) { - throw new BmcException(false, "Unable to calculate MD5", e, null); - } - if (bytesCopied != contentLength) { - throw new BmcException( - false, - "Failed to read all bytes while calculating MD5: " - + bytesCopied - + ", " - + contentLength, - null, - null); - } - return StreamHelper.base64Encode(digestOutputStream.getMessageDigest()); - } - public static class UploadRequest { private final PutObjectRequest putObjectRequest; private final ExecutorService parallelUploadExecutorService; @@ -535,6 +692,16 @@ public static class UploadResponse { * The opc-client-request-id sent with every request, if provided. */ private final String opcClientRequestId; + /** The CRC32C of the single or multipart object uploaded. */ + private final String contentCrc32c; + /** The SHA256 of the object uploaded. */ + private final String contentSha256; + /** The SHA384 of the object uploaded. */ + private final String contentSha384; + /** The SHA256 of the multipart object uploaded. */ + private final String multipartSha256; + /** The SHA384 of the multipart object uploaded. */ + private final String multipartSha384; @java.beans.ConstructorProperties({ "eTag", @@ -549,11 +716,65 @@ public UploadResponse( final String multipartMd5, final String opcRequestId, final String opcClientRequestId) { + this( + eTag, + contentMd5, + multipartMd5, + opcRequestId, + opcClientRequestId, + null, + null, + null, + null, + null); + } + + @java.beans.ConstructorProperties({ + "eTag", + "contentMd5", + "multipartMd5", + "opcRequestId", + "opcClientRequestId", + "contentCrc32c", + "contentSha256", + "contentSha384", + "multipartSha256", + "multipartSha384" + }) + public UploadResponse( + final String eTag, + final String contentMd5, + final String multipartMd5, + final String opcRequestId, + final String opcClientRequestId, + final String contentCrc32c, + final String contentSha256, + final String contentSha384, + final String multipartSha256, + final String multipartSha384) { this.eTag = eTag; this.contentMd5 = contentMd5; this.multipartMd5 = multipartMd5; this.opcRequestId = opcRequestId; this.opcClientRequestId = opcClientRequestId; + this.contentCrc32c = contentCrc32c; + this.contentSha256 = contentSha256; + this.contentSha384 = contentSha384; + this.multipartSha256 = multipartSha256; + this.multipartSha384 = multipartSha384; + } + + private UploadResponse(Builder builder) { + this.eTag = builder.eTag; + this.contentMd5 = builder.contentMd5; + this.multipartMd5 = builder.multipartMd5; + this.opcRequestId = builder.opcRequestId; + this.opcClientRequestId = builder.opcClientRequestId; + this.contentCrc32c = builder.contentCrc32c; + this.contentSha256 = builder.contentSha256; + this.contentSha384 = builder.contentSha384; + this.multipartSha256 = builder.multipartSha256; + this.multipartSha384 = builder.multipartSha384; } /** @@ -597,8 +818,33 @@ public String getOpcClientRequestId() { return this.opcClientRequestId; } - @java.lang.Override - public java.lang.String toString() { + /** The CRC32C of the single or multipart object uploaded. */ + public String getContentCrc32c() { + return this.contentCrc32c; + } + + /** The SHA256 of the object uploaded. */ + public String getContentSha256() { + return this.contentSha256; + } + + /** The SHA384 of the object uploaded. */ + public String getContentSha384() { + return this.contentSha384; + } + + /** The SHA256 of the multipart object uploaded. */ + public String getMultipartSha256() { + return this.multipartSha256; + } + + /** The SHA384 of the multipart object uploaded. */ + public String getMultipartSha384() { + return this.multipartSha384; + } + + @Override + public String toString() { return "UploadManager.UploadResponse(eTag=" + this.getETag() + ", contentMd5=" @@ -609,18 +855,84 @@ public java.lang.String toString() { + this.getOpcRequestId() + ", opcClientRequestId=" + this.getOpcClientRequestId() + + ", contentCrc32c=" + + this.getContentCrc32c() + + ", contentSha256=" + + this.getContentSha256() + + ", contentSha384=" + + this.getContentSha384() + + ", multipartSha256=" + + this.getMultipartSha256() + + ", multipartSha384=" + + this.getMultipartSha384() + ")"; } - } - private static class MD5Calculation { - private final InputStream streamToUse; - private final String md5; + public static class Builder { + private String eTag; + private String contentMd5; + private String multipartMd5; + private String opcRequestId; + private String opcClientRequestId; + private String contentCrc32c; + private String contentSha256; + private String contentSha384; + private String multipartSha256; + private String multipartSha384; + + public Builder eTag(String eTag) { + this.eTag = eTag; + return this; + } + + public Builder contentMd5(String contentMd5) { + this.contentMd5 = contentMd5; + return this; + } - @java.beans.ConstructorProperties({"streamToUse", "md5"}) - public MD5Calculation(final InputStream streamToUse, final String md5) { - this.streamToUse = streamToUse; - this.md5 = md5; + public Builder multipartMd5(String multipartMd5) { + this.multipartMd5 = multipartMd5; + return this; + } + + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + public Builder opcClientRequestId(String opcClientRequestId) { + this.opcClientRequestId = opcClientRequestId; + return this; + } + + public Builder contentCrc32c(String contentCrc32c) { + this.contentCrc32c = contentCrc32c; + return this; + } + + public Builder contentSha256(String contentSha256) { + this.contentSha256 = contentSha256; + return this; + } + + public Builder contentSha384(String contentSha384) { + this.contentSha384 = contentSha384; + return this; + } + + public Builder multipartSha256(String multipartSha256) { + this.multipartSha256 = multipartSha256; + return this; + } + + public Builder multipartSha384(String multipartSha384) { + this.multipartSha384 = multipartSha384; + return this; + } + + public UploadResponse build() { + return new UploadResponse(this); + } } } diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/CRC32C.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/CRC32C.java new file mode 100644 index 00000000000..ec9122daeaa --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/CRC32C.java @@ -0,0 +1,258 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.transfer.internal; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.util.zip.Checksum; + +/** + * This class was refactored from the original Java 9 implementation to be compatible with Java 8. + */ +public final class CRC32C implements Checksum { + + /** CRC-32C Polynomial */ + private static final int CRC32C_POLY = 0x1EDC6F41; + + private static final int REVERSED_CRC32C_POLY = Integer.reverse(CRC32C_POLY); + + private static final int[] byteTable; + private static final int[][] byteTables = new int[8][256]; + private static final int[] byteTable0 = byteTables[0]; + private static final int[] byteTable1 = byteTables[1]; + private static final int[] byteTable2 = byteTables[2]; + private static final int[] byteTable3 = byteTables[3]; + private static final int[] byteTable4 = byteTables[4]; + private static final int[] byteTable5 = byteTables[5]; + private static final int[] byteTable6 = byteTables[6]; + private static final int[] byteTable7 = byteTables[7]; + + static { + for (int index = 0; index < byteTables[0].length; index++) { + int r = index; + for (int i = 0; i < Byte.SIZE; i++) { + if ((r & 1) != 0) { + r = (r >>> 1) ^ REVERSED_CRC32C_POLY; + } else { + r >>>= 1; + } + } + byteTables[0][index] = r; + } + + for (int index = 0; index < byteTables[0].length; index++) { + int r = byteTables[0][index]; + + for (int k = 1; k < byteTables.length; k++) { + r = byteTables[0][r & 0xFF] ^ (r >>> 8); + byteTables[k][index] = r; + } + } + + if (ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN) { + byteTable = byteTables[0]; + } else { + byteTable = new int[byteTable0.length]; + System.arraycopy(byteTable0, 0, byteTable, 0, byteTable0.length); + for (int[] table : byteTables) { + for (int index = 0; index < table.length; index++) { + table[index] = Integer.reverseBytes(table[index]); + } + } + } + } + + /** Calculated CRC-32C value */ + private int crc = 0xFFFFFFFF; + + /** Creates a new CRC32C object. */ + public CRC32C() {} + + /** + * Updates the CRC-32C checksum with the specified byte (the low eight bits of the argument b). + */ + @Override + public void update(int b) { + crc = (crc >>> 8) ^ byteTable[(crc ^ (b & 0xFF)) & 0xFF]; + } + + /** + * Updates the CRC-32C checksum with the specified array of bytes. + * + * @throws ArrayIndexOutOfBoundsException if {@code off} is negative, or {@code len} is + * negative, or {@code off+len} is negative or greater than the length of the array {@code + * b}. + */ + @Override + public void update(byte[] b, int off, int len) { + if (b == null) { + throw new NullPointerException(); + } + if (off < 0 || len < 0 || off > b.length - len) { + throw new ArrayIndexOutOfBoundsException(); + } + crc = updateBytes(crc, b, off, (off + len)); + } + + /** + * Updates the CRC-32C checksum with the bytes from the specified buffer. + * + *

The checksum is updated with the remaining bytes in the buffer, starting at the buffer's + * position. Upon return, the buffer's position will be updated to its limit; its limit will not + * have been changed. + */ + public void update(ByteBuffer buffer) { + int pos = buffer.position(); + int limit = buffer.limit(); + assert (pos <= limit); + int rem = limit - pos; + if (rem <= 0) { + return; + } + + if (buffer.isDirect()) { + crc = updateDirectByteBuffer(crc, buffer, pos, limit); + } else if (buffer.hasArray()) { + crc = + updateBytes( + crc, + buffer.array(), + pos + buffer.arrayOffset(), + limit + buffer.arrayOffset()); + } else { + byte[] b = new byte[Math.min(buffer.remaining(), 4096)]; + while (buffer.hasRemaining()) { + int length = Math.min(buffer.remaining(), b.length); + buffer.get(b, 0, length); + update(b, 0, length); + } + } + buffer.position(limit); + } + + /** Resets CRC-32C to initial value. */ + @Override + public void reset() { + crc = 0xFFFFFFFF; + } + + /** Returns CRC-32C value. */ + @Override + public long getValue() { + return (~crc) & 0xFFFFFFFFL; + } + + /** Updates the CRC-32C checksum with the specified array of bytes. */ + private static int updateBytes(int crc, byte[] b, int off, int end) { + + if (end - off >= 8) { + + int alignLength = (8 - (off & 0x7)) & 0x7; + for (int alignEnd = off + alignLength; off < alignEnd; off++) { + crc = (crc >>> 8) ^ byteTable[(crc ^ b[off]) & 0xFF]; + } + + if (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) { + crc = Integer.reverseBytes(crc); + } + + for (; off < (end - Long.BYTES); off += Long.BYTES) { + long value = 0; + for (int i = 0; i < Long.BYTES; i++) { + value |= ((long) b[off + i] & 0xFF) << (i * 8); + } + int firstHalf = (int) value; + int secondHalf = (int) (value >>> 32); + crc ^= firstHalf; + if (ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN) { + crc = + byteTable7[crc & 0xFF] + ^ byteTable6[(crc >>> 8) & 0xFF] + ^ byteTable5[(crc >>> 16) & 0xFF] + ^ byteTable4[crc >>> 24] + ^ byteTable3[secondHalf & 0xFF] + ^ byteTable2[(secondHalf >>> 8) & 0xFF] + ^ byteTable1[(secondHalf >>> 16) & 0xFF] + ^ byteTable0[secondHalf >>> 24]; + } else { + crc = + byteTable0[secondHalf & 0xFF] + ^ byteTable1[(secondHalf >>> 8) & 0xFF] + ^ byteTable2[(secondHalf >>> 16) & 0xFF] + ^ byteTable3[secondHalf >>> 24] + ^ byteTable4[crc & 0xFF] + ^ byteTable5[(crc >>> 8) & 0xFF] + ^ byteTable6[(crc >>> 16) & 0xFF] + ^ byteTable7[crc >>> 24]; + } + } + + if (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) { + crc = Integer.reverseBytes(crc); + } + } + + // Tail + for (; off < end; off++) { + crc = (crc >>> 8) ^ byteTable[(crc ^ b[off]) & 0xFF]; + } + + return crc; + } + + /** Updates the CRC-32C checksum reading from the specified address. */ + private static int updateDirectByteBuffer(int crc, ByteBuffer buffer, int off, int end) { + + if (end - off >= 8) { + + int alignLength = (8 - (off & 0x7)) & 0x7; + for (int alignEnd = off + alignLength; off < alignEnd; off++) { + crc = (crc >>> 8) ^ byteTable[(crc ^ buffer.get(off)) & 0xFF]; + } + + if (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) { + crc = Integer.reverseBytes(crc); + } + + for (; off <= (end - Long.BYTES); off += Long.BYTES) { + long value = buffer.getLong(off); + int firstHalf = (int) value; + int secondHalf = (int) (value >>> 32); + crc ^= firstHalf; + if (ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN) { + crc = + byteTable7[crc & 0xFF] + ^ byteTable6[(crc >>> 8) & 0xFF] + ^ byteTable5[(crc >>> 16) & 0xFF] + ^ byteTable4[crc >>> 24] + ^ byteTable3[secondHalf & 0xFF] + ^ byteTable2[(secondHalf >>> 8) & 0xFF] + ^ byteTable1[(secondHalf >>> 16) & 0xFF] + ^ byteTable0[secondHalf >>> 24]; + } else { + crc = + byteTable0[secondHalf & 0xFF] + ^ byteTable1[(secondHalf >>> 8) & 0xFF] + ^ byteTable2[(secondHalf >>> 16) & 0xFF] + ^ byteTable3[secondHalf >>> 24] + ^ byteTable4[crc & 0xFF] + ^ byteTable5[(crc >>> 8) & 0xFF] + ^ byteTable6[(crc >>> 16) & 0xFF] + ^ byteTable7[crc >>> 24]; + } + } + + if (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) { + crc = Integer.reverseBytes(crc); + } + } + + for (; off < end; off++) { + crc = (crc >>> 8) ^ byteTable[(crc ^ buffer.get(off)) & 0xFF]; + } + + return crc; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/CRC32CDigest.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/CRC32CDigest.java new file mode 100644 index 00000000000..0e437f79961 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/CRC32CDigest.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.transfer.internal; + +import java.security.MessageDigest; +import java.nio.ByteBuffer; + +public class CRC32CDigest extends MessageDigest { + + private final CRC32C crc32c; + + public CRC32CDigest() { + super("CRC32C"); + crc32c = new CRC32C(); + } + + @Override + protected void engineUpdate(byte input) { + crc32c.update(input); + } + + @Override + protected void engineUpdate(byte[] input, int offset, int len) { + crc32c.update(input, offset, len); + } + + @Override + protected byte[] engineDigest() { + long crcValue = crc32c.getValue(); + byte[] crcBytes = ByteBuffer.allocate(4).putInt((int) crcValue).array(); + engineReset(); + return crcBytes; + } + + @Override + protected void engineReset() { + crc32c.reset(); + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/ChecksumInfo.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/ChecksumInfo.java new file mode 100644 index 00000000000..2a6fb81d4b5 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/ChecksumInfo.java @@ -0,0 +1,30 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.transfer.internal; + +import com.oracle.bmc.objectstorage.model.ChecksumAlgorithm; +import com.oracle.bmc.util.internal.Validate; + +/** + * Encapsulates a checksum value and its corresponding algorithm. + * Stores a checksum along with the {@link ChecksumAlgorithm}. + */ +public class ChecksumInfo { + private final String checksum; + private final ChecksumAlgorithm algorithm; + + public ChecksumInfo(String checksum, ChecksumAlgorithm algorithm) { + this.checksum = checksum; + this.algorithm = algorithm; // Algorithm can be null for MD5 + } + + public String getChecksum() { + return checksum; + } + + public ChecksumAlgorithm getAlgorithm() { + return algorithm; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/ChecksumInputStream.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/ChecksumInputStream.java new file mode 100644 index 00000000000..b4a8b16d498 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/ChecksumInputStream.java @@ -0,0 +1,162 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.transfer.internal; + +import com.oracle.bmc.objectstorage.model.ChecksumAlgorithm; +import com.oracle.bmc.objectstorage.transfer.internal.download.MultithreadStream; +import com.oracle.bmc.objectstorage.transfer.internal.download.RetryingStream; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.FilterInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.nio.ByteBuffer; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.Base64; + +/** + * A ChecksumInputStream that computes and verifies a checksum for the data read from the stream. + * Supports CRC32C, SHA-256, SHA-384, and MD5 algorithms. + * + *

Checksum verification is performed before the last byte is read. If the computed checksum does + * not match the expected checksum, an IOException is thrown. + */ +public class ChecksumInputStream extends FilterInputStream { + private static final Logger LOG = LoggerFactory.getLogger(ChecksumInputStream.class); + + private final ChecksumAlgorithm algorithm; + private final String expectedChecksum; + private final CRC32C crc32c; + private final MessageDigest digest; + private final boolean isMd5; + private volatile boolean checksumVerified = false; + private volatile long totalBytesRead = 0; + private final long contentLength; + + public ChecksumInputStream( + InputStream in, + ChecksumAlgorithm algorithm, + String expectedChecksum, + long contentLength) + throws NoSuchAlgorithmException { + super(in); + this.isMd5 = algorithm == null; + this.algorithm = algorithm; + this.expectedChecksum = expectedChecksum; + this.crc32c = this.algorithm == ChecksumAlgorithm.Crc32C ? new CRC32C() : null; + this.digest = selectDigest(this.algorithm, this.isMd5); + this.contentLength = contentLength; + } + + @Override + public int read() throws IOException { + int byteRead = super.read(); + if (byteRead != -1) { + totalBytesRead++; + updateChecksum(byteRead); + if (totalBytesRead == contentLength) { + verifyChecksum(); + checksumVerified = true; + } + } + return byteRead; + } + + @Override + public int read(byte[] b, int off, int len) throws IOException { + int bytesRead = super.read(b, off, len); + if (bytesRead != -1) { + totalBytesRead += bytesRead; + updateChecksum(b, off, bytesRead); + if (totalBytesRead == contentLength) { + verifyChecksum(); + checksumVerified = true; + } + } + return bytesRead; + } + + @Override + public int read(byte[] b) throws IOException { + return read(b, 0, b.length); + } + + /** + * This method throws an IOException because the underlying stream classes {@link + * RetryingStream} and {@link MultithreadStream} do not support the skip operation. + */ + @Override + public long skip(long n) throws IOException { + throw new IOException("skip not supported"); + } + + private void updateChecksum(int byteRead) { + if (algorithm == ChecksumAlgorithm.Crc32C) { + crc32c.update(byteRead); + } else { + digest.update((byte) byteRead); + } + } + + private void updateChecksum(byte[] b, int off, int len) { + if (algorithm == ChecksumAlgorithm.Crc32C) { + crc32c.update(b, off, len); + } else { + digest.update(b, off, len); + } + } + + private void verifyChecksum() throws IOException { + if (expectedChecksum == null) { + throw new IOException("Expected checksum is null"); + } + + if (algorithm == ChecksumAlgorithm.Crc32C) { + long calculatedChecksum = crc32c.getValue(); + byte[] expectedChecksumBytes = Base64.getDecoder().decode(expectedChecksum); + + if (expectedChecksumBytes.length != Integer.BYTES) { + throw new IOException("Expected checksum length is invalid"); + } + + int expectedChecksumValue = ByteBuffer.wrap(expectedChecksumBytes).getInt(); + + if (calculatedChecksum != Integer.toUnsignedLong(expectedChecksumValue)) { + LOG.error( + "Checksum mismatch: expected {}, but calculated {}", + expectedChecksum, + calculatedChecksum); + throw new IOException( + "Checksum mismatch: expected " + + expectedChecksum + + " but calculated " + + calculatedChecksum); + } + LOG.debug("CRC32C checksum verified successfully"); + } else { + byte[] calculatedDigest = digest.digest(); + byte[] expectedDigest = Base64.getDecoder().decode(expectedChecksum); + if (!MessageDigest.isEqual(calculatedDigest, expectedDigest)) { + LOG.error("Checksum mismatch"); + throw new IOException("Checksum mismatch"); + } + LOG.debug("{} checksum verified successfully", isMd5 ? "MD5" : algorithm); + } + } + + private static MessageDigest selectDigest(ChecksumAlgorithm algorithm, boolean isMd5) + throws NoSuchAlgorithmException { + if (algorithm == ChecksumAlgorithm.Sha256) { + return MessageDigest.getInstance("SHA-256"); + } else if (algorithm == ChecksumAlgorithm.Sha384) { + return MessageDigest.getInstance("SHA-384"); + } else if (isMd5) { + return MessageDigest.getInstance("MD5"); + } + return null; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/ChecksumUtils.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/ChecksumUtils.java new file mode 100644 index 00000000000..27caf6fa4e4 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/ChecksumUtils.java @@ -0,0 +1,400 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.transfer.internal; + +import com.oracle.bmc.io.DuplicatableInputStream; +import com.oracle.bmc.model.BmcException; +import com.oracle.bmc.objectstorage.model.ChecksumAlgorithm; +import com.oracle.bmc.objectstorage.responses.CommitMultipartUploadResponse; +import com.oracle.bmc.objectstorage.responses.GetObjectResponse; +import com.oracle.bmc.objectstorage.responses.HeadObjectResponse; +import com.oracle.bmc.objectstorage.responses.PutObjectResponse; +import com.oracle.bmc.objectstorage.responses.UploadPartResponse; +import com.oracle.bmc.objectstorage.transfer.UploadManager; +import com.oracle.bmc.responses.BmcResponse; +import com.oracle.bmc.util.StreamUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.ByteBuffer; +import java.security.DigestOutputStream; +import java.util.Arrays; +import java.util.Base64; + +public class ChecksumUtils { + private static final Logger LOG = LoggerFactory.getLogger(ChecksumUtils.class); + + private ChecksumUtils() {} + + /** Calculate the MD5 checksum of the provided input stream. */ + public static MD5Calculation calculateMd5(InputStream stream, Long contentLength) { + return calculateChecksum( + stream, + contentLength, + StreamHelper::createMd5MessageOutputStream, + MD5Calculation::new, + "MD5"); + } + + /** Calculate the SHA-384 checksum of the provided input stream. */ + public static SHA384Calculation calculateSha384(InputStream stream, Long contentLength) { + return calculateChecksum( + stream, + contentLength, + StreamHelper::createSha384MessageOutputStream, + SHA384Calculation::new, + ChecksumAlgorithm.Sha384.getValue()); + } + + /** Calculate the SHA-256 checksum of the provided input stream. */ + public static SHA256Calculation calculateSha256(InputStream stream, Long contentLength) { + return calculateChecksum( + stream, + contentLength, + StreamHelper::createSha256MessageOutputStream, + SHA256Calculation::new, + ChecksumAlgorithm.Sha256.getValue()); + } + + /** Calculate the CRC32C checksum of the provided input stream. */ + public static CRC32CCalculation calculateCrc32c(InputStream stream, Long contentLength) { + return calculateChecksum( + stream, + contentLength, + StreamHelper::createCrc32cMessageOutputStream, + CRC32CCalculation::new, + ChecksumAlgorithm.Crc32C.getValue()); + } + + /** + * This method is responsible for calculating the checksum of the provided input stream based on + * the specified algorithm. The MD5 checksum calculation logic was refactored and relocated from + * the UploadManager to this utility class, ensuring a consistent approach for calculating + * checksums for various algorithms. + */ + private static T calculateChecksum( + InputStream stream, + Long contentLength, + DigestOutputStreamFactory outputStreamFactory, + ChecksumCalculationFactory calculationFactory, + String algorithmName) { + String checksum; + InputStream streamToReturn; + + if (stream instanceof DuplicatableInputStream) { + checksum = + performChecksumCalculation( + ((DuplicatableInputStream) stream).duplicate(), + new StreamHelper.NullOutputStream(), + contentLength, + outputStreamFactory, + algorithmName); + streamToReturn = stream; + } else { + LOG.info( + "About to copy object into memory to calculate {}, may lead to OutOfMemory exceptions", + algorithmName); + if (contentLength > Integer.MAX_VALUE) { + throw new BmcException( + false, + String.format( + "Cannot compute %s client-side as content length (%d) is larger than max buffer. Disable %s enforcement or provide a DuplicableInputStream to avoid this problem", + algorithmName, + contentLength, + algorithmName), + null, + null); + } + try { + ByteArrayOutputStream baos = new ByteArrayOutputStream(contentLength.intValue()); + checksum = + performChecksumCalculation( + stream, baos, contentLength, outputStreamFactory, algorithmName); + streamToReturn = StreamUtils.createByteArrayInputStream(baos.toByteArray()); + } catch (OutOfMemoryError oom) { + OutOfMemoryError newOom = + new OutOfMemoryError( + String.format( + "Could not compute %s. Disable %s enforcement or provide a DuplicableInputStream to avoid this problem", + algorithmName, + algorithmName)); + newOom.initCause(oom); + throw newOom; + } + } + return calculationFactory.create(streamToReturn, checksum); + } + + private static String performChecksumCalculation( + InputStream stream, + OutputStream outputStream, + long contentLength, + DigestOutputStreamFactory outputStreamFactory, + String algorithmName) { + DigestOutputStream digestOutputStream = outputStreamFactory.create(outputStream); + long bytesCopied; + try { + bytesCopied = StreamHelper.copy(stream, digestOutputStream); + } catch (IOException e) { + throw new BmcException( + false, "Unable to calculate " + algorithmName + " checksum", e, null); + } + if (bytesCopied != contentLength) { + throw new BmcException( + false, + String.format( + "Failed to read all bytes while calculating %s checksum: %d, %d", + algorithmName, + bytesCopied, + contentLength), + null, + null); + } + return StreamHelper.base64Encode(digestOutputStream.getMessageDigest()); + } + + /** Calculate the CRC32C checksum of the provided byte array. */ + public static String calculateCrc32cChecksum(byte[] data) { + CRC32C crc32c = new CRC32C(); + crc32c.update(data, 0, data.length); + long crcValue = crc32c.getValue(); + byte[] crcBytes = ByteBuffer.allocate(Long.BYTES).putLong(crcValue).array(); + crcBytes = Arrays.copyOfRange(crcBytes, 4, Long.BYTES); + return Base64.getEncoder().encodeToString(crcBytes); + } + + public static ChecksumInfo getExpectedChecksumAndAlgorithm(GetObjectResponse response) { + String expectedChecksum; + ChecksumAlgorithm algorithm; + + if (response.getOpcContentCrc32c() != null) { + expectedChecksum = response.getOpcContentCrc32c(); + algorithm = ChecksumAlgorithm.Crc32C; + } else if (response.getOpcContentSha256() != null) { + expectedChecksum = response.getOpcContentSha256(); + algorithm = ChecksumAlgorithm.Sha256; + } else if (response.getOpcContentSha384() != null) { + expectedChecksum = response.getOpcContentSha384(); + algorithm = ChecksumAlgorithm.Sha384; + } else { + expectedChecksum = response.getContentMd5(); + algorithm = null; + } + + return new ChecksumInfo(expectedChecksum, algorithm); + } + + public static String getChecksumFromUploadResponse( + UploadManager.UploadResponse uploadResponse, + ChecksumAlgorithm checksumAlgorithm, + boolean isMultipart) { + if (checksumAlgorithm == null) { + return null; + } + switch (checksumAlgorithm) { + case Crc32C: + return uploadResponse.getContentCrc32c(); + case Sha256: + return isMultipart + ? uploadResponse.getMultipartSha256() + : uploadResponse.getContentSha256(); + case Sha384: + return isMultipart + ? uploadResponse.getMultipartSha384() + : uploadResponse.getContentSha384(); + default: + throw new IllegalArgumentException( + "Unsupported checksum algorithm: " + checksumAlgorithm); + } + } + + public static String getResponseChecksum( + BmcResponse response, ChecksumAlgorithm algorithm, boolean isMultipart) { + if (algorithm == null) { + return null; + } + + if (response instanceof GetObjectResponse) { + return getChecksumForGetObjectResponse( + (GetObjectResponse) response, algorithm, isMultipart); + } else if (response instanceof HeadObjectResponse) { + return getChecksumForHeadObjectResponse( + (HeadObjectResponse) response, algorithm, isMultipart); + } else if (response instanceof PutObjectResponse) { + return getChecksumForPutObjectResponse((PutObjectResponse) response, algorithm); + } else if (response instanceof UploadPartResponse) { + return getChecksumForUploadPartResponse((UploadPartResponse) response, algorithm); + } else if (response instanceof CommitMultipartUploadResponse) { + return getChecksumForCommitMultipartUploadResponse( + (CommitMultipartUploadResponse) response, algorithm); + } else { + throw new IllegalArgumentException("Unsupported response type"); + } + } + + private static String getChecksumForGetObjectResponse( + GetObjectResponse response, ChecksumAlgorithm algorithm, boolean isMultipart) { + switch (algorithm) { + case Crc32C: + return response.getOpcContentCrc32c(); + case Sha256: + return isMultipart + ? response.getOpcMultipartSha256() + : response.getOpcContentSha256(); + case Sha384: + return isMultipart + ? response.getOpcMultipartSha384() + : response.getOpcContentSha384(); + default: + throw new IllegalArgumentException("Unsupported checksum algorithm: " + algorithm); + } + } + + private static String getChecksumForHeadObjectResponse( + HeadObjectResponse response, ChecksumAlgorithm algorithm, boolean isMultipart) { + switch (algorithm) { + case Crc32C: + return response.getOpcContentCrc32c(); + case Sha256: + return isMultipart + ? response.getOpcMultipartSha256() + : response.getOpcContentSha256(); + case Sha384: + return isMultipart + ? response.getOpcMultipartSha384() + : response.getOpcContentSha384(); + default: + throw new IllegalArgumentException("Unsupported checksum algorithm: " + algorithm); + } + } + + private static String getChecksumForPutObjectResponse( + PutObjectResponse response, ChecksumAlgorithm algorithm) { + switch (algorithm) { + case Crc32C: + return response.getOpcContentCrc32c(); + case Sha256: + return response.getOpcContentSha256(); + case Sha384: + return response.getOpcContentSha384(); + default: + throw new IllegalArgumentException("Unsupported checksum algorithm: " + algorithm); + } + } + + private static String getChecksumForUploadPartResponse( + UploadPartResponse response, ChecksumAlgorithm algorithm) { + switch (algorithm) { + case Crc32C: + return response.getOpcContentCrc32c(); + case Sha256: + return response.getOpcContentSha256(); + case Sha384: + return response.getOpcContentSha384(); + default: + throw new IllegalArgumentException("Unsupported checksum algorithm: " + algorithm); + } + } + + private static String getChecksumForCommitMultipartUploadResponse( + CommitMultipartUploadResponse response, ChecksumAlgorithm algorithm) { + switch (algorithm) { + case Crc32C: + return response.getOpcContentCrc32c(); + case Sha256: + return response.getOpcMultipartSha256(); + case Sha384: + return response.getOpcMultipartSha384(); + default: + throw new IllegalArgumentException("Unsupported checksum algorithm: " + algorithm); + } + } + + public static class MD5Calculation { + private final InputStream streamToUse; + private final String md5; + + public MD5Calculation(InputStream streamToUse, String md5) { + this.streamToUse = streamToUse; + this.md5 = md5; + } + + public InputStream getStreamToUse() { + return streamToUse; + } + + public String getMd5() { + return md5; + } + } + + public static class SHA384Calculation { + private final InputStream streamToUse; + private final String sha384; + + public SHA384Calculation(InputStream streamToUse, String sha384) { + this.streamToUse = streamToUse; + this.sha384 = sha384; + } + + public InputStream getStreamToUse() { + return streamToUse; + } + + public String getSha384() { + return sha384; + } + } + + public static class SHA256Calculation { + private final InputStream streamToUse; + private final String sha256; + + public SHA256Calculation(InputStream streamToUse, String sha256) { + this.streamToUse = streamToUse; + this.sha256 = sha256; + } + + public InputStream getStreamToUse() { + return streamToUse; + } + + public String getSha256() { + return sha256; + } + } + + public static class CRC32CCalculation { + private final InputStream streamToUse; + private final String crc32c; + + public CRC32CCalculation(InputStream streamToUse, String crc32c) { + this.streamToUse = streamToUse; + this.crc32c = crc32c; + } + + public InputStream getStreamToUse() { + return streamToUse; + } + + public String getCrc32c() { + return crc32c; + } + } + + @FunctionalInterface + private interface DigestOutputStreamFactory { + DigestOutputStream create(OutputStream outputStream); + } + + @FunctionalInterface + private interface ChecksumCalculationFactory { + T create(InputStream streamToUse, String checksum); + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/MultipartUtils.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/MultipartUtils.java index ed3417fd8e8..816cb17d780 100644 --- a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/MultipartUtils.java +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/MultipartUtils.java @@ -4,6 +4,7 @@ */ package com.oracle.bmc.objectstorage.transfer.internal; +import com.oracle.bmc.objectstorage.model.ChecksumAlgorithm; import com.oracle.bmc.util.VisibleForTesting; import com.oracle.bmc.objectstorage.requests.PutObjectRequest; import com.oracle.bmc.objectstorage.transfer.UploadConfiguration; @@ -81,6 +82,100 @@ public static boolean shouldCalculateMd5( return config.isEnforceMd5BeforeUpload() && request.getContentMD5() == null; } + /** + * Test whether or not the additional checksum value should be calculated for the given request + * when issuing a single upload (non-multipart) request. + * + * @param config The configuration to use. + * @param request The request being sent. + * @return true to calculate additional checksum, false if it's not necessary. + */ + public static boolean shouldCalculateAdditionalChecksum( + @Nonnull UploadConfiguration config, @Nonnull PutObjectRequest request) { + if (config == null) { + throw new java.lang.NullPointerException("config is marked non-null but is null"); + } + if (request == null) { + throw new java.lang.NullPointerException("request is marked non-null but is null"); + } + + ChecksumAlgorithm checksumAlgorithm = config.getEnforceAdditionalChecksumBeforeUpload(); + ChecksumAlgorithm additionalChecksumAlgorithm = config.getAdditionalChecksumAlgorithm(); + + if (checksumAlgorithm == null) { + return false; + } + + if (additionalChecksumAlgorithm != null + && !checksumAlgorithm.equals(additionalChecksumAlgorithm)) { + throw new IllegalArgumentException( + "If both additionalChecksumAlgorithm and enforceAdditionalChecksumBeforeUpload are provided, they must be the same."); + } + + switch (checksumAlgorithm) { + case Crc32C: + return request.getOpcContentCrc32c() == null; + case Sha256: + return request.getOpcContentSha256() == null; + case Sha384: + return request.getOpcContentSha384() == null; + default: + return false; + } + } + + /** + * Determines whether an additional checksum value should be set for the given request. + * + *

This method covers the following cases: + * + *

    + *
  • If the request already has a checksum algorithm set, the method returns false, as + * there's no need to set it again. + *
  • If both the configuration's additional checksum algorithm and the request's checksum + * algorithm are provided but differ, an IllegalArgumentException is thrown. + *
  • If the configuration has no additional checksum algorithm and the request has no + * checksum algorithm, the method returns false, as there's nothing to set. + *
  • If the configuration has an additional checksum algorithm, and the request has no + * checksum algorithm, the method returns true, indicating that the additional checksum + * should be set. + *
+ * + * @param config The configuration to use. + * @param request The request being sent. + * @return true if the additional checksum should be set, false otherwise. + * @throws NullPointerException if config or request is null. + * @throws IllegalArgumentException if both the configuration and the request have different + * checksum algorithms. + */ + public static boolean shouldSetAdditionalChecksum( + @Nonnull UploadConfiguration config, @Nonnull PutObjectRequest request) { + if (config == null) { + throw new NullPointerException("config is marked non-null but is null"); + } + if (request == null) { + throw new NullPointerException("request is marked non-null but is null"); + } + + ChecksumAlgorithm additionalChecksumAlgorithm = config.getAdditionalChecksumAlgorithm(); + ChecksumAlgorithm requestChecksumAlgorithm = request.getOpcChecksumAlgorithm(); + + if (requestChecksumAlgorithm != null) { + if (additionalChecksumAlgorithm != null + && !additionalChecksumAlgorithm.equals(requestChecksumAlgorithm)) { + throw new IllegalArgumentException( + "If you are providing ChecksumAlgorithm in the upload request and setting the additionalChecksumAlgorithm, then both must be the same."); + } + return false; + } + + if (additionalChecksumAlgorithm == null) { + return false; + } + + return true; + } + private static boolean meetsMinimumSize(UploadConfiguration config, long contentLength) { long min = (config.getMinimumLengthForMultipartUpload() * MiB); return contentLength >= min; diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/StreamHelper.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/StreamHelper.java index 24d693906c9..67c9ddabc64 100644 --- a/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/StreamHelper.java +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/internal/StreamHelper.java @@ -66,6 +66,46 @@ public static DigestOutputStream createMd5MessageOutputStream(OutputStream strea return new DigestOutputStream(stream, getMd5MessageDigest()); } + /** + * Creates a DigestOutputStream where the digest uses SHA-384. + * + * @param stream The output stream to write to. + * @return A new DigestOutputStream + */ + public static DigestOutputStream createSha384MessageOutputStream(OutputStream stream) { + try { + MessageDigest sha384Digest = MessageDigest.getInstance("SHA-384"); + return new DigestOutputStream(stream, sha384Digest); + } catch (NoSuchAlgorithmException e) { + throw new RuntimeException("SHA-384 algorithm not available", e); + } + } + + /** + * Creates a DigestOutputStream where the digest uses SHA-256. + * + * @param stream The output stream to write to. + * @return A new DigestOutputStream + */ + public static DigestOutputStream createSha256MessageOutputStream(OutputStream stream) { + try { + MessageDigest sha256Digest = MessageDigest.getInstance("SHA-256"); + return new DigestOutputStream(stream, sha256Digest); + } catch (NoSuchAlgorithmException e) { + throw new RuntimeException("SHA-256 algorithm not available", e); + } + } + + /** + * Creates a DigestOutputStream where the digest uses CRC32C. + * + * @param stream The output stream to write to. + * @return A new DigestOutputStream + */ + public static DigestOutputStream createCrc32cMessageOutputStream(OutputStream stream) { + return new DigestOutputStream(stream, new CRC32CDigest()); + } + /** * Base64 encodes the digest (resets the digest). * diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/DownloadManagerTest.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/DownloadManagerTest.java index 621e2fbf6ee..c51b696edde 100644 --- a/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/DownloadManagerTest.java +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/DownloadManagerTest.java @@ -46,6 +46,9 @@ public class DownloadManagerTest { private String bucketName; private String objectName; private String etag; + private String contentCrc32c; + private String contentSha256; + private String contentSha384; @BeforeClass public static void setupClass() { @@ -68,6 +71,9 @@ public void setup() { this.bucketName = mockObject.getBucketName(); this.objectName = mockObject.getObjectName(); this.etag = mockObject.getEtag(); + this.contentCrc32c = mockObject.getContentCrc32c(); + this.contentSha256 = mockObject.getContentSha256(); + this.contentSha384 = mockObject.getContentSha384(); this.objectStorage = MockObjectStorage.create(mockObject); } @@ -345,6 +351,135 @@ public void rangeGets() throws Exception { } } + @Test + public void testAdditionalChecksumSinglePartCorrectCrc32c() throws IOException { + final DownloadConfiguration config = + DownloadConfiguration.builder() + .executorService(executorService) + .enforceDataIntegrityForDownload(true) + .build(); + + final DownloadManager downloadManager = new DownloadManager(objectStorage, config); + final GetObjectRequest request = + GetObjectRequest.builder() + .namespaceName(namespaceName) + .bucketName(bucketName) + .objectName(objectName) + .build(); + final GetObjectResponse response = downloadManager.getObject(request); + verify(request, response); + Assert.assertEquals(contentCrc32c, response.getOpcContentCrc32c()); + } + + @Test + public void testAdditionalChecksumSinglePartCorrectSha256() throws IOException { + final DownloadConfiguration config = + DownloadConfiguration.builder() + .executorService(executorService) + .enforceDataIntegrityForDownload(true) + .build(); + + final DownloadManager downloadManager = new DownloadManager(objectStorage, config); + final GetObjectRequest request = + GetObjectRequest.builder() + .namespaceName(namespaceName) + .bucketName(bucketName) + .objectName(objectName) + .build(); + final GetObjectResponse response = downloadManager.getObject(request); + verify(request, response); + Assert.assertEquals(contentSha256, response.getOpcContentSha256()); + } + + @Test + public void testAdditionalChecksumSinglePartCorrectSha384() throws IOException { + final DownloadConfiguration config = + DownloadConfiguration.builder() + .executorService(executorService) + .enforceDataIntegrityForDownload(true) + .build(); + + final DownloadManager downloadManager = new DownloadManager(objectStorage, config); + final GetObjectRequest request = + GetObjectRequest.builder() + .namespaceName(namespaceName) + .bucketName(bucketName) + .objectName(objectName) + .build(); + final GetObjectResponse response = downloadManager.getObject(request); + verify(request, response); + Assert.assertEquals(contentSha384, response.getOpcContentSha384()); + } + + @Test + public void testAdditionalChecksumMultiPartCorrectCrc32c() throws IOException { + final DownloadConfiguration config = + DownloadConfiguration.builder() + .executorService(executorService) + .partSizeInBytes(4 * 1024 * 1024) + .multipartDownloadThresholdInBytes(4 * 1024 * 1024) + .parallelDownloads(2) + .enforceDataIntegrityForDownload(true) + .build(); + + final DownloadManager downloadManager = new DownloadManager(objectStorage, config); + final GetObjectRequest request = + GetObjectRequest.builder() + .namespaceName(namespaceName) + .bucketName(bucketName) + .objectName(objectName) + .build(); + final GetObjectResponse response = downloadManager.getObject(request); + verify(request, response); + Assert.assertEquals(contentCrc32c, response.getOpcContentCrc32c()); + } + + @Test + public void testAdditionalChecksumMultiPartCorrectSha256() throws IOException { + final DownloadConfiguration config = + DownloadConfiguration.builder() + .executorService(executorService) + .partSizeInBytes(4 * 1024 * 1024) + .multipartDownloadThresholdInBytes(4 * 1024 * 1024) + .parallelDownloads(2) + .enforceDataIntegrityForDownload(true) + .build(); + + final DownloadManager downloadManager = new DownloadManager(objectStorage, config); + final GetObjectRequest request = + GetObjectRequest.builder() + .namespaceName(namespaceName) + .bucketName(bucketName) + .objectName(objectName) + .build(); + final GetObjectResponse response = downloadManager.getObject(request); + verify(request, response); + Assert.assertEquals(contentSha256, response.getOpcContentSha256()); + } + + @Test + public void testAdditionalChecksumMultiPartCorrectSha384() throws IOException { + final DownloadConfiguration config = + DownloadConfiguration.builder() + .executorService(executorService) + .partSizeInBytes(4 * 1024 * 1024) + .multipartDownloadThresholdInBytes(4 * 1024 * 1024) + .parallelDownloads(2) + .enforceDataIntegrityForDownload(true) + .build(); + + final DownloadManager downloadManager = new DownloadManager(objectStorage, config); + final GetObjectRequest request = + GetObjectRequest.builder() + .namespaceName(namespaceName) + .bucketName(bucketName) + .objectName(objectName) + .build(); + final GetObjectResponse response = downloadManager.getObject(request); + verify(request, response); + Assert.assertEquals(contentSha384, response.getOpcContentSha384()); + } + private void verify(GetObjectRequest request, GetObjectResponse response) throws IOException { Assert.assertEquals(etag, response.getETag()); Assert.assertEquals(Long.valueOf(data.length), response.getContentLength()); diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/MultipartObjectAssemblerTest.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/MultipartObjectAssemblerTest.java index 80463e5b5f3..f22376e6a8f 100644 --- a/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/MultipartObjectAssemblerTest.java +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/MultipartObjectAssemblerTest.java @@ -24,6 +24,7 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import com.oracle.bmc.objectstorage.model.ChecksumAlgorithm; import com.oracle.bmc.retrier.DefaultRetryCondition; import com.oracle.bmc.retrier.RetryConfiguration; import com.oracle.bmc.util.internal.Consumer; @@ -511,6 +512,128 @@ public void commit_addPart_afterAbort() throws Exception { } } + @Test + public void newRequest_withChecksumEnabled_andVerifyManifest() { + String uploadId = "uploadId"; + + assembler = + MultipartObjectAssembler.builder() + .allowOverwrite(ALLOW_OVERWRITE) + .bucketName(BUCKET) + .executorService(executorService) + .invocationCallback(mockInvocationCallback) + .namespaceName(NAMESPACE) + .objectName(OBJECT) + .service(service) + .cacheControl(CACHE_CONTROL) + .contentDisposition(CONTENT_DISPOSITION) + .additionalChecksumAlgorithm(ChecksumAlgorithm.Crc32C) + .build(); + + initializeCreateMultipartUpload(uploadId); + + MultipartManifest manifest = + assembler.newRequest(CONTENT_TYPE, CONTENT_LANGUAGE, CONTENT_ENCODING, OPC_META); + assertNotNull(manifest); + assertEquals(uploadId, manifest.getUploadId()); + + ArgumentCaptor captor = + ArgumentCaptor.forClass(CreateMultipartUploadRequest.class); + verify(service).createMultipartUpload(captor.capture()); + + CreateMultipartUploadRequest request = captor.getValue(); + assertEquals(NAMESPACE, request.getNamespaceName()); + assertEquals(BUCKET, request.getBucketName()); + assertEquals(OBJECT, request.getCreateMultipartUploadDetails().getObject()); + assertEquals(CONTENT_TYPE, request.getCreateMultipartUploadDetails().getContentType()); + assertEquals( + CONTENT_LANGUAGE, request.getCreateMultipartUploadDetails().getContentLanguage()); + assertEquals( + CONTENT_ENCODING, request.getCreateMultipartUploadDetails().getContentEncoding()); + assertEquals(OPC_META, request.getCreateMultipartUploadDetails().getMetadata()); + assertEquals(mockInvocationCallback, request.getInvocationCallback()); + assertEquals(CACHE_CONTROL, request.getCreateMultipartUploadDetails().getCacheControl()); + assertEquals( + CONTENT_DISPOSITION, + request.getCreateMultipartUploadDetails().getContentDisposition()); + assertEquals(ChecksumAlgorithm.Crc32C, request.getOpcChecksumAlgorithm()); + } + + @Test + public void addParts_withChecksum_allSuccessful_commit() throws Exception { + String uploadId = "uploadId"; + initializeCreateMultipartUpload(uploadId); + MultipartManifest manifest = + assembler.newRequest(CONTENT_TYPE, CONTENT_LANGUAGE, CONTENT_ENCODING, OPC_META); + + byte[] bytes = "abcd".getBytes(); + + File file = File.createTempFile("unitTest", ".txt"); + file.deleteOnExit(); + try (FileOutputStream fos = new FileOutputStream(file)) { + fos.write(bytes); + } + + String etag1 = "etag1"; + String etag2 = "etag2"; + UploadPartResponse uploadPartResponse1 = UploadPartResponse.builder().eTag(etag1).build(); + UploadPartResponse uploadPartResponse2 = UploadPartResponse.builder().eTag(etag2).build(); + when(service.uploadPart(any(UploadPartRequest.class))) + .thenReturn(uploadPartResponse1) + .thenReturn(uploadPartResponse2); + + CommitMultipartUploadResponse finalCommitResponse = + CommitMultipartUploadResponse.builder().build(); + when(service.commitMultipartUpload(any(CommitMultipartUploadRequest.class))) + .thenReturn(finalCommitResponse); + + String checksum1 = "checksum_1"; + String checksum2 = "checksum_2"; + String checksumAlgorithm = ChecksumAlgorithm.Crc32C.getValue(); + + assembler.addPart( + StreamUtils.createByteArrayInputStream(bytes), + bytes.length, + checksum1, + checksumAlgorithm); + assembler.addPart( + StreamUtils.createByteArrayInputStream(bytes), + bytes.length, + checksum2, + checksumAlgorithm); + + CommitMultipartUploadResponse commitResponse = assembler.commit(); + assertSame(finalCommitResponse, commitResponse); + + ArgumentCaptor commitCaptor = + ArgumentCaptor.forClass(CommitMultipartUploadRequest.class); + verify(service).commitMultipartUpload(commitCaptor.capture()); + CommitMultipartUploadRequest actualCommitRequest = commitCaptor.getValue(); + assertEquals(NAMESPACE, actualCommitRequest.getNamespaceName()); + assertEquals(BUCKET, actualCommitRequest.getBucketName()); + assertEquals(OBJECT, actualCommitRequest.getObjectName()); + assertEquals(uploadId, actualCommitRequest.getUploadId()); + assertEquals(mockInvocationCallback, actualCommitRequest.getInvocationCallback()); + + assertTrue(manifest.isUploadComplete()); + assertTrue(manifest.isUploadSuccessful()); + assertEquals(2, manifest.listCompletedParts().size()); + assertEquals(1, manifest.listCompletedParts().get(0).getPartNum().intValue()); + assertEquals(etag1, manifest.listCompletedParts().get(0).getEtag()); + assertEquals(2, manifest.listCompletedParts().get(1).getPartNum().intValue()); + assertEquals(etag2, manifest.listCompletedParts().get(1).getEtag()); + + ArgumentCaptor uploadCaptor = + ArgumentCaptor.forClass(UploadPartRequest.class); + verify(service, times(2)).uploadPart(uploadCaptor.capture()); + verifyUploadPart( + uploadCaptor.getAllValues().get(0), uploadId, 1, checksum1, checksumAlgorithm); + verifyUploadPart( + uploadCaptor.getAllValues().get(1), uploadId, 2, checksum2, checksumAlgorithm); + + file.delete(); + } + private void verifyUploadPart( UploadPartRequest request, String uploadId, int partNum, String md5) { assertEquals(NAMESPACE, request.getNamespaceName()); @@ -524,6 +647,22 @@ private void verifyUploadPart( assertNotNull(request.getUploadPartBody()); } + private void verifyUploadPart( + UploadPartRequest request, + String uploadId, + int partNum, + String checksum, + String checksumAlgorithm) { + assertEquals(NAMESPACE, request.getNamespaceName()); + assertEquals(BUCKET, request.getBucketName()); + assertEquals(uploadId, request.getUploadId()); + assertEquals(partNum, request.getUploadPartNum().intValue()); + assertEquals(checksum, request.getOpcContentCrc32c()); + assertEquals(checksumAlgorithm, request.getOpcChecksumAlgorithm().getValue()); + assertEquals(mockInvocationCallback, request.getInvocationCallback()); + assertNotNull(request.getUploadPartBody()); + } + @Test public void abort() { String uploadId = "uploadId"; diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/UploadManagerTest.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/UploadManagerTest.java index d44a0d47241..dd51c2f7edf 100644 --- a/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/UploadManagerTest.java +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/UploadManagerTest.java @@ -5,6 +5,8 @@ package com.oracle.bmc.objectstorage.transfer; import com.oracle.bmc.internal.EndpointBuilder; +import com.oracle.bmc.objectstorage.model.ChecksumAlgorithm; +import com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils; import com.oracle.bmc.util.internal.StringUtils; import com.oracle.bmc.ClientConfiguration; import com.oracle.bmc.Service; @@ -710,6 +712,225 @@ public void multiplartUpload_shouldAbort_whenNoPartsWereUploaded() { } } + @Test + public void upload_singleUpload_withSha256Checksum() throws IOException { + UploadConfiguration uploadConfiguration = + UploadConfiguration.builder() + .allowMultipartUploads(false) + .additionalChecksumAlgorithm(ChecksumAlgorithm.Sha256) + .build(); + UploadManager uploadManager = new UploadManager(objectStorage, uploadConfiguration); + + UploadRequest request = createUploadRequest(); + + ArgumentCaptor putRequestCaptor = + ArgumentCaptor.forClass(PutObjectRequest.class); + PutObjectResponse putResponse = + PutObjectResponse.builder() + .eTag("etag") + .opcContentSha256("sha256") + .opcRequestId(REQ_ID) + .opcClientRequestId(CLIENT_REQ_ID) + .build(); + when(objectStorage.putObject(putRequestCaptor.capture())).thenReturn(putResponse); + + UploadResponse uploadResponse = uploadManager.upload(request); + + assertNotNull(uploadResponse); + assertEquals("etag", uploadResponse.getETag()); + assertEquals("sha256", uploadResponse.getContentSha256()); + assertNull(uploadResponse.getMultipartMd5()); + assertEquals(REQ_ID, uploadResponse.getOpcRequestId()); + assertEquals(CLIENT_REQ_ID, uploadResponse.getOpcClientRequestId()); + byte[] buffer = new byte[(int) CONTENT_LENGTH]; + putRequestCaptor.getValue().getPutObjectBody().read(buffer); + assertEquals(CONTENT, new String(buffer)); + assertSame( + UploadManager.RETRY_CONFIGURATION, + putRequestCaptor.getValue().getRetryConfiguration()); + assertEquals(CONTENT_LENGTH, putRequestCaptor.getValue().getContentLength().longValue()); + assertEquals(CLIENT_REQ_ID, putRequestCaptor.getValue().getOpcClientRequestId()); + assertSame(METADATA, putRequestCaptor.getValue().getOpcMeta()); + } + + @Test + public void upload_singleUpload_withSha384Checksum() throws IOException { + UploadConfiguration uploadConfiguration = + UploadConfiguration.builder() + .allowMultipartUploads(false) + .additionalChecksumAlgorithm(ChecksumAlgorithm.Sha384) + .build(); + UploadManager uploadManager = new UploadManager(objectStorage, uploadConfiguration); + + UploadRequest request = createUploadRequest(); + + ArgumentCaptor putRequestCaptor = + ArgumentCaptor.forClass(PutObjectRequest.class); + PutObjectResponse putResponse = + PutObjectResponse.builder() + .eTag("etag") + .opcContentSha384("sha384") + .opcRequestId(REQ_ID) + .opcClientRequestId(CLIENT_REQ_ID) + .build(); + when(objectStorage.putObject(putRequestCaptor.capture())).thenReturn(putResponse); + + UploadResponse uploadResponse = uploadManager.upload(request); + + assertNotNull(uploadResponse); + assertEquals("etag", uploadResponse.getETag()); + assertEquals("sha384", uploadResponse.getContentSha384()); + assertNull(uploadResponse.getMultipartMd5()); + assertEquals(REQ_ID, uploadResponse.getOpcRequestId()); + assertEquals(CLIENT_REQ_ID, uploadResponse.getOpcClientRequestId()); + byte[] buffer = new byte[(int) CONTENT_LENGTH]; + putRequestCaptor.getValue().getPutObjectBody().read(buffer); + assertEquals(CONTENT, new String(buffer)); + assertSame( + UploadManager.RETRY_CONFIGURATION, + putRequestCaptor.getValue().getRetryConfiguration()); + assertEquals(CONTENT_LENGTH, putRequestCaptor.getValue().getContentLength().longValue()); + assertEquals(CLIENT_REQ_ID, putRequestCaptor.getValue().getOpcClientRequestId()); + assertSame(METADATA, putRequestCaptor.getValue().getOpcMeta()); + } + + @Test + public void upload_singleUpload_withCrc32cChecksum() throws IOException { + UploadConfiguration uploadConfiguration = + UploadConfiguration.builder() + .allowMultipartUploads(false) + .additionalChecksumAlgorithm(ChecksumAlgorithm.Crc32C) + .build(); + UploadManager uploadManager = new UploadManager(objectStorage, uploadConfiguration); + + UploadRequest request = createUploadRequest(); + + ArgumentCaptor putRequestCaptor = + ArgumentCaptor.forClass(PutObjectRequest.class); + PutObjectResponse putResponse = + PutObjectResponse.builder() + .eTag("etag") + .opcContentCrc32c("crc32c") + .opcRequestId(REQ_ID) + .opcClientRequestId(CLIENT_REQ_ID) + .build(); + when(objectStorage.putObject(putRequestCaptor.capture())).thenReturn(putResponse); + + UploadResponse uploadResponse = uploadManager.upload(request); + + assertNotNull(uploadResponse); + assertEquals("etag", uploadResponse.getETag()); + assertEquals("crc32c", uploadResponse.getContentCrc32c()); + assertNull(uploadResponse.getMultipartMd5()); + assertEquals(REQ_ID, uploadResponse.getOpcRequestId()); + assertEquals(CLIENT_REQ_ID, uploadResponse.getOpcClientRequestId()); + byte[] buffer = new byte[(int) CONTENT_LENGTH]; + putRequestCaptor.getValue().getPutObjectBody().read(buffer); + assertEquals(CONTENT, new String(buffer)); + assertSame( + UploadManager.RETRY_CONFIGURATION, + putRequestCaptor.getValue().getRetryConfiguration()); + assertEquals(CONTENT_LENGTH, putRequestCaptor.getValue().getContentLength().longValue()); + assertEquals(CLIENT_REQ_ID, putRequestCaptor.getValue().getOpcClientRequestId()); + assertSame(METADATA, putRequestCaptor.getValue().getOpcMeta()); + } + + @Test + public void upload_multipartUpload_withSha256Checksum() { + UploadConfiguration uploadConfiguration = + UploadConfiguration.builder() + .minimumLengthForMultipartUpload(10) + .lengthPerUploadPart(10) + .additionalChecksumAlgorithm(ChecksumAlgorithm.Sha256) + .enforceAdditionalChecksumBeforeMultipartUpload(ChecksumAlgorithm.Sha256) + .build(); + UploadManager uploadManager = + new UploadManager(objectStorage, uploadConfiguration) { + @Override + protected MultipartObjectAssembler createAssembler( + PutObjectRequest request, + UploadRequest uploadRequest, + ExecutorService executorService) { + return assembler; + } + }; + + UploadRequest request = createUploadRequest(); + when(assembler.commit()) + .thenReturn( + CommitMultipartUploadResponse.builder() + .eTag("finalEtag") + .opcRequestId(REQ_ID) + .opcClientRequestId(CLIENT_REQ_ID) + .opcMultipartSha256("multipartSha256") + .build()); + + UploadResponse uploadResponse = uploadManager.upload(request); + assertNotNull(uploadResponse); + assertEquals("finalEtag", uploadResponse.getETag()); + assertEquals("multipartSha256", uploadResponse.getMultipartSha256()); + assertNull(uploadResponse.getContentMd5()); + assertNull(uploadResponse.getMultipartMd5()); + assertEquals(REQ_ID, uploadResponse.getOpcRequestId()); + assertEquals(CLIENT_REQ_ID, uploadResponse.getOpcClientRequestId()); + + verify(assembler).newRequest(CONTENT_TYPE, CONTENT_LANG, CONTENT_ENCODING, METADATA); + verify(assembler, times(2)) + .addPart( + any(InputStream.class), + eq(CONTENT_LENGTH / 2), + anyString(), + eq(ChecksumAlgorithm.Sha256.getValue())); + } + + @Test + public void upload_multipartUpload_withCrc32cChecksum() { + UploadConfiguration uploadConfiguration = + UploadConfiguration.builder() + .minimumLengthForMultipartUpload(10) + .lengthPerUploadPart(10) + .additionalChecksumAlgorithm(ChecksumAlgorithm.Crc32C) + .enforceAdditionalChecksumBeforeMultipartUpload(ChecksumAlgorithm.Crc32C) + .build(); + UploadManager uploadManager = + new UploadManager(objectStorage, uploadConfiguration) { + @Override + protected MultipartObjectAssembler createAssembler( + PutObjectRequest request, + UploadRequest uploadRequest, + ExecutorService executorService) { + return assembler; + } + }; + + UploadRequest request = createUploadRequest(); + when(assembler.commit()) + .thenReturn( + CommitMultipartUploadResponse.builder() + .eTag("finalEtag") + .opcRequestId(REQ_ID) + .opcClientRequestId(CLIENT_REQ_ID) + .opcContentCrc32c("contentCrc32c") + .build()); + + UploadResponse uploadResponse = uploadManager.upload(request); + assertNotNull(uploadResponse); + assertEquals("finalEtag", uploadResponse.getETag()); + assertEquals("contentCrc32c", uploadResponse.getContentCrc32c()); + assertNull(uploadResponse.getContentMd5()); + assertNull(uploadResponse.getMultipartMd5()); + assertEquals(REQ_ID, uploadResponse.getOpcRequestId()); + assertEquals(CLIENT_REQ_ID, uploadResponse.getOpcClientRequestId()); + + verify(assembler).newRequest(CONTENT_TYPE, CONTENT_LANG, CONTENT_ENCODING, METADATA); + verify(assembler, times(2)) + .addPart( + any(InputStream.class), + eq(CONTENT_LENGTH / 2), + anyString(), + eq(ChecksumAlgorithm.Crc32C.getValue())); + } + private static UploadConfiguration getMultipartUploadConfiguration() { return UploadConfiguration.builder() .minimumLengthForMultipartUpload(10) diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/helper/MockObject.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/helper/MockObject.java index c7020d528af..75b67f926d6 100644 --- a/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/helper/MockObject.java +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/helper/MockObject.java @@ -7,6 +7,7 @@ import com.oracle.bmc.model.BmcException; import com.oracle.bmc.objectstorage.requests.GetObjectRequest; import com.oracle.bmc.objectstorage.responses.GetObjectResponse; +import com.oracle.bmc.objectstorage.transfer.internal.ChecksumUtils; import org.junit.Assert; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; @@ -26,6 +27,9 @@ public final class MockObject implements Answer { private final byte[] data; private final String etag; private final FailureInjector failureInjector; + private final String contentCrc32c; + private final String contentSha256; + private final String contentSha384; public MockObject( Map metadata, @@ -40,6 +44,13 @@ public MockObject( this.metadata = metadata; this.etag = UUID.randomUUID().toString(); this.failureInjector = failureInjector; + this.contentCrc32c = ChecksumUtils.calculateCrc32cChecksum(data); + this.contentSha256 = + ChecksumUtils.calculateSha256(new ByteArrayInputStream(data), (long) data.length) + .getSha256(); + this.contentSha384 = + ChecksumUtils.calculateSha384(new ByteArrayInputStream(data), (long) data.length) + .getSha384(); } public String getNamespaceName() { @@ -70,6 +81,18 @@ public String getEtag() { return etag; } + public String getContentCrc32c() { + return contentCrc32c; + } + + public String getContentSha256() { + return contentSha256; + } + + public String getContentSha384() { + return contentSha384; + } + @Override public GetObjectResponse answer(InvocationOnMock invocationOnMock) throws Throwable { return this.getObject((GetObjectRequest) invocationOnMock.getArguments()[0]); @@ -136,6 +159,9 @@ GetObjectResponse getObject(GetObjectRequest request) { .opcMeta(getMetadata()) .inputStream(new FailingInputStream(failureInjector, inputStream)) .contentLength(contentLength) + .opcContentCrc32c(getContentCrc32c()) + .opcContentSha256(getContentSha256()) + .opcContentSha384(getContentSha384()) .build(); } diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/internal/CRC32CTest.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/internal/CRC32CTest.java new file mode 100644 index 00000000000..9c2e28b96bf --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/internal/CRC32CTest.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.transfer.internal; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; + +public class CRC32CTest { + + private CRC32C crc32c; + + @Before + public void setUp() { + crc32c = new CRC32C(); + } + + @Test + public void testUpdateWithSingleByte() { + byte[] input = "123456789".getBytes(StandardCharsets.US_ASCII); + for (byte b : input) { + crc32c.update(b); + } + Assert.assertEquals("Checksum value mismatch", 0xE3069283L, crc32c.getValue()); + } + + @Test + public void testUpdateWithByteArray() { + byte[] input = "123456789".getBytes(StandardCharsets.US_ASCII); + crc32c.update(input, 0, input.length); + Assert.assertEquals("Checksum value mismatch", 0xE3069283L, crc32c.getValue()); + } + + @Test + public void testUpdateWithByteBuffer() { + ByteBuffer buffer = ByteBuffer.wrap("123456789".getBytes(StandardCharsets.US_ASCII)); + crc32c.update(buffer); + Assert.assertEquals("Checksum value mismatch", 0xE3069283L, crc32c.getValue()); + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/internal/ChecksumInputStreamTest.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/internal/ChecksumInputStreamTest.java new file mode 100644 index 00000000000..37277c8d608 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/internal/ChecksumInputStreamTest.java @@ -0,0 +1,216 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.transfer.internal; + +import com.oracle.bmc.objectstorage.model.ChecksumAlgorithm; +import org.junit.Before; +import org.junit.Test; +import org.junit.Assert; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.Base64; + +public class ChecksumInputStreamTest { + + private static final String TEST_DATA = "123456789"; + private InputStream inputStream; + + @Before + public void setUp() { + inputStream = new ByteArrayInputStream(TEST_DATA.getBytes()); + } + + @Test + public void testCrc32cChecksumVerificationSuccess() + throws IOException, NoSuchAlgorithmException { + String expectedChecksum = ChecksumUtils.calculateCrc32cChecksum(TEST_DATA.getBytes()); + try (ChecksumInputStream checksumStream = + new ChecksumInputStream( + inputStream, + ChecksumAlgorithm.Crc32C, + expectedChecksum, + TEST_DATA.length())) { + while (checksumStream.read() != -1) { + // Read all data + } + // If no exception thrown, verification is successful + } + } + + @Test + public void testCrc32cChecksumVerificationFailure() { + String incorrectChecksum = + ChecksumUtils.calculateCrc32cChecksum("12345678".getBytes(StandardCharsets.UTF_8)); + + IOException thrown = + Assert.assertThrows( + IOException.class, + () -> { + try (ChecksumInputStream checksumStream = + new ChecksumInputStream( + inputStream, + ChecksumAlgorithm.Crc32C, + incorrectChecksum, + TEST_DATA.length())) { + while (checksumStream.read() != -1) { + // Read all data + } + } + }); + + Assert.assertTrue(thrown.getMessage().contains("Checksum mismatch")); + } + + @Test + public void testSha256ChecksumVerificationSuccess() + throws IOException, NoSuchAlgorithmException { + MessageDigest sha256 = MessageDigest.getInstance("SHA-256"); + sha256.update(TEST_DATA.getBytes()); + String expectedChecksum = Base64.getEncoder().encodeToString(sha256.digest()); + + try (ChecksumInputStream checksumStream = + new ChecksumInputStream( + inputStream, + ChecksumAlgorithm.Sha256, + expectedChecksum, + TEST_DATA.length())) { + while (checksumStream.read() != -1) { + // Read all data + } + // If no exception thrown, verification is successful + } + } + + @Test + public void testSha256ChecksumVerificationFailure() { + String incorrectChecksum = Base64.getEncoder().encodeToString(new byte[] {1, 2, 3, 4}); + + IOException thrown = + Assert.assertThrows( + IOException.class, + () -> { + try (ChecksumInputStream checksumStream = + new ChecksumInputStream( + inputStream, + ChecksumAlgorithm.Sha256, + incorrectChecksum, + TEST_DATA.length())) { + while (checksumStream.read() != -1) { + // Read all data + } + } + }); + + Assert.assertTrue(thrown.getMessage().contains("Checksum mismatch")); + } + + @Test + public void testSha384ChecksumVerificationSuccess() + throws IOException, NoSuchAlgorithmException { + MessageDigest sha384 = MessageDigest.getInstance("SHA-384"); + sha384.update(TEST_DATA.getBytes()); + String expectedChecksum = Base64.getEncoder().encodeToString(sha384.digest()); + + try (ChecksumInputStream checksumStream = + new ChecksumInputStream( + inputStream, + ChecksumAlgorithm.Sha384, + expectedChecksum, + TEST_DATA.length())) { + while (checksumStream.read() != -1) { + // Read all data + } + // If no exception thrown, verification is successful + } + } + + @Test + public void testSha384ChecksumVerificationFailure() { + String incorrectChecksum = + Base64.getEncoder().encodeToString(new byte[] {1, 2, 3, 4, 5, 6}); + + IOException thrown = + Assert.assertThrows( + IOException.class, + () -> { + try (ChecksumInputStream checksumStream = + new ChecksumInputStream( + inputStream, + ChecksumAlgorithm.Sha384, + incorrectChecksum, + TEST_DATA.length())) { + while (checksumStream.read() != -1) { + // Read all data + } + } + }); + + Assert.assertTrue(thrown.getMessage().contains("Checksum mismatch")); + } + + @Test + public void testLargeDataChecksumVerificationSuccess() + throws IOException, NoSuchAlgorithmException { + String largeData = new String(new char[1000000]).replace("\0", "A"); + InputStream largeInputStream = new ByteArrayInputStream(largeData.getBytes()); + String expectedChecksum = ChecksumUtils.calculateCrc32cChecksum(largeData.getBytes()); + + try (ChecksumInputStream checksumStream = + new ChecksumInputStream( + largeInputStream, + ChecksumAlgorithm.Crc32C, + expectedChecksum, + largeData.length())) { + while (checksumStream.read() != -1) { + // Read all data + } + // If no exception thrown, verification is successful + } + } + + @Test + public void testMd5ChecksumVerificationSuccess() throws IOException, NoSuchAlgorithmException { + MessageDigest md5 = MessageDigest.getInstance("MD5"); + md5.update(TEST_DATA.getBytes()); + String expectedChecksum = Base64.getEncoder().encodeToString(md5.digest()); + + try (ChecksumInputStream checksumStream = + new ChecksumInputStream(inputStream, null, expectedChecksum, TEST_DATA.length())) { + while (checksumStream.read() != -1) { + // Read all data + } + // If no exception thrown, verification is successful + } + } + + @Test + public void testMd5ChecksumVerificationFailure() { + String incorrectChecksum = + Base64.getEncoder().encodeToString("12345678".getBytes(StandardCharsets.UTF_8)); + + IOException thrown = + Assert.assertThrows( + IOException.class, + () -> { + try (ChecksumInputStream checksumStream = + new ChecksumInputStream( + inputStream, + null, + incorrectChecksum, + TEST_DATA.length())) { + while (checksumStream.read() != -1) { + // Read all data + } + } + }); + + Assert.assertTrue(thrown.getMessage().contains("Checksum mismatch")); + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/internal/ChecksumUtilsTest.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/internal/ChecksumUtilsTest.java new file mode 100644 index 00000000000..d87d7d9a497 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/internal/ChecksumUtilsTest.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.transfer.internal; + +import org.junit.Assert; +import org.junit.Test; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; + +public class ChecksumUtilsTest { + + private static final String TEST_DATA = "123456789"; + private static final long CONTENT_LENGTH = TEST_DATA.length(); + private static final String PRECOMPUTED_MD5 = "JfnnlDI7RTiF9RgfG2JNCw=="; + private static final String PRECOMPUTED_SHA256 = "FeKw08M4keuw8e9gnsQZQgwg4yDOlMZfvIwzEkSOsiU="; + private static final String PRECOMPUTED_SHA384 = + "60VdVtLBpp3mToMgEfM5PUXz+jHWhC8hr5LS/kacSZ2l4xeYRzNKGEecjR3t6hvj"; + private static final String PRECOMPUTED_CRC32C = "4waSgw=="; + + @Test + public void testCalculateMd5() { + InputStream stream = new ByteArrayInputStream(TEST_DATA.getBytes(StandardCharsets.UTF_8)); + ChecksumUtils.MD5Calculation result = ChecksumUtils.calculateMd5(stream, CONTENT_LENGTH); + + Assert.assertNotNull(result); + Assert.assertEquals(PRECOMPUTED_MD5, result.getMd5()); + } + + @Test + public void testCalculateSha384() { + InputStream stream = new ByteArrayInputStream(TEST_DATA.getBytes(StandardCharsets.UTF_8)); + ChecksumUtils.SHA384Calculation result = + ChecksumUtils.calculateSha384(stream, CONTENT_LENGTH); + + Assert.assertNotNull(result); + Assert.assertEquals(PRECOMPUTED_SHA384, result.getSha384()); + } + + @Test + public void testCalculateSha256() { + InputStream stream = new ByteArrayInputStream(TEST_DATA.getBytes(StandardCharsets.UTF_8)); + ChecksumUtils.SHA256Calculation result = + ChecksumUtils.calculateSha256(stream, CONTENT_LENGTH); + + Assert.assertNotNull(result); + Assert.assertEquals(PRECOMPUTED_SHA256, result.getSha256()); + } + + @Test + public void testCalculateCrc32c() { + InputStream stream = new ByteArrayInputStream(TEST_DATA.getBytes(StandardCharsets.UTF_8)); + ChecksumUtils.CRC32CCalculation result = + ChecksumUtils.calculateCrc32c(stream, CONTENT_LENGTH); + + Assert.assertNotNull(result); + Assert.assertEquals(PRECOMPUTED_CRC32C, result.getCrc32c()); + } + + @Test + public void testCalculateCrc32cChecksum() { + String result = + ChecksumUtils.calculateCrc32cChecksum(TEST_DATA.getBytes(StandardCharsets.UTF_8)); + Assert.assertEquals(PRECOMPUTED_CRC32C, result); + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/internal/MultipartUtilsTest.java b/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/internal/MultipartUtilsTest.java index c5b5cf616c5..caa3397cf6b 100644 --- a/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/internal/MultipartUtilsTest.java +++ b/bmc-objectstorage/bmc-objectstorage-extensions/src/test/java/com/oracle/bmc/objectstorage/transfer/internal/MultipartUtilsTest.java @@ -8,6 +8,7 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import com.oracle.bmc.objectstorage.model.ChecksumAlgorithm; import org.junit.Rule; import org.junit.Test; @@ -190,4 +191,70 @@ public void shouldCalculateMd5_enabled_notSet() { UploadConfiguration.builder().enforceMd5(true).build(), PutObjectRequest.builder().build())); } + + @Test + public void shouldCalculateAdditionalChecksum_disabled() { + assertFalse( + MultipartUtils.shouldCalculateAdditionalChecksum( + UploadConfiguration.builder() + .enforceAdditionalChecksumBeforeUpload(null) + .build(), + PutObjectRequest.builder().build())); + } + + @Test + public void shouldCalculateAdditionalChecksum_enabled_crc32cAlreadySet() { + assertFalse( + MultipartUtils.shouldCalculateAdditionalChecksum( + UploadConfiguration.builder() + .enforceAdditionalChecksumBeforeUpload(ChecksumAlgorithm.Crc32C) + .build(), + PutObjectRequest.builder().opcContentCrc32c("crc32c").build())); + } + + @Test + public void shouldCalculateAdditionalChecksum_enabled_sha256AlreadySet() { + assertFalse( + MultipartUtils.shouldCalculateAdditionalChecksum( + UploadConfiguration.builder() + .enforceAdditionalChecksumBeforeUpload(ChecksumAlgorithm.Sha256) + .build(), + PutObjectRequest.builder().opcContentSha256("sha256").build())); + } + + @Test + public void shouldCalculateAdditionalChecksum_enabled_sha384AlreadySet() { + assertFalse( + MultipartUtils.shouldCalculateAdditionalChecksum( + UploadConfiguration.builder() + .enforceAdditionalChecksumBeforeUpload(ChecksumAlgorithm.Sha384) + .build(), + PutObjectRequest.builder().opcContentSha384("sha384").build())); + } + + @Test + public void shouldCalculateAdditionalChecksum_enabled_notSet() { + assertTrue( + MultipartUtils.shouldCalculateAdditionalChecksum( + UploadConfiguration.builder() + .enforceAdditionalChecksumBeforeUpload(ChecksumAlgorithm.Crc32C) + .build(), + PutObjectRequest.builder().build())); + } + + @Test + public void shouldCalculateAdditionalChecksum_conflictAlgorithms() { + UploadConfiguration config = + UploadConfiguration.builder() + .enforceAdditionalChecksumBeforeUpload(ChecksumAlgorithm.Crc32C) + .additionalChecksumAlgorithm(ChecksumAlgorithm.Sha256) + .build(); + + PutObjectRequest request = PutObjectRequest.builder().build(); + + thrown.expect(IllegalArgumentException.class); + thrown.expectMessage("must be the same"); + + MultipartUtils.shouldCalculateAdditionalChecksum(config, request); + } } diff --git a/bmc-objectstorage/bmc-objectstorage-generated/pom.xml b/bmc-objectstorage/bmc-objectstorage-generated/pom.xml index d381eb8ffb3..d583701df27 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/pom.xml +++ b/bmc-objectstorage/bmc-objectstorage-generated/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-objectstorage-parent - 2.73.0 + 2.79.0 ../pom.xml @@ -20,7 +20,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java index b44c93bba66..b5487748a21 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java @@ -161,6 +161,19 @@ public interface ObjectStorage extends AutoCloseable { CreatePreauthenticatedRequestResponse createPreauthenticatedRequest( CreatePreauthenticatedRequestRequest request); + /** + * Create a PrivateEndpoint. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreatePrivateEndpoint API. + */ + CreatePrivateEndpointResponse createPrivateEndpoint(CreatePrivateEndpointRequest request); + /** * Creates a replication policy for the specified bucket. * @@ -244,6 +257,19 @@ DeleteObjectLifecyclePolicyResponse deleteObjectLifecyclePolicy( DeletePreauthenticatedRequestResponse deletePreauthenticatedRequest( DeletePreauthenticatedRequestRequest request); + /** + * Deletes a Private Endpoint if it exists in the given namespace. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeletePrivateEndpoint API. + */ + DeletePrivateEndpointResponse deletePrivateEndpoint(DeletePrivateEndpointRequest request); + /** * Deletes the replication policy associated with the source bucket. * @@ -360,6 +386,19 @@ GetObjectLifecyclePolicyResponse getObjectLifecyclePolicy( GetPreauthenticatedRequestResponse getPreauthenticatedRequest( GetPreauthenticatedRequestRequest request); + /** + * Gets the current representation of the given Private Endpoint in the given Object Storage namespace. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetPrivateEndpoint API. + */ + GetPrivateEndpointResponse getPrivateEndpoint(GetPrivateEndpointRequest request); + /** * Get the replication policy. * @@ -527,6 +566,22 @@ ListMultipartUploadPartsResponse listMultipartUploadParts( ListPreauthenticatedRequestsResponse listPreauthenticatedRequests( ListPreauthenticatedRequestsRequest request); + /** + * Gets a list of all PrivateEndpointSummary in a compartment associated with a namespace. + * To use this and other API operations, you must be authorized in an IAM policy. If you are not authorized, + * talk to an administrator. If you are an administrator who needs to write policies to give users access, see + * [Getting Started with Policies](https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm). + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListPrivateEndpoints API. + */ + ListPrivateEndpointsResponse listPrivateEndpoints(ListPrivateEndpointsRequest request); + /** * List the replication policies associated with a bucket. * @@ -746,8 +801,8 @@ PutObjectLifecyclePolicyResponse putObjectLifecyclePolicy( RenameObjectResponse renameObject(RenameObjectRequest request); /** - * Restores one or more objects specified by the objectName parameter. - * By default objects will be restored for 24 hours. Duration can be configured using the hours parameter. + * Restores the object specified by the objectName parameter. + * By default object will be restored for 24 hours. Duration can be configured using the hours parameter. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -808,6 +863,26 @@ PutObjectLifecyclePolicyResponse putObjectLifecyclePolicy( */ UpdateObjectStorageTierResponse updateObjectStorageTier(UpdateObjectStorageTierRequest request); + /** + * Performs a partial or full update of a user-defined data associated with the Private Endpoint. + *

+ * Use UpdatePrivateEndpoint to move a Private Endpoint from one compartment to another within the same tenancy. Supply the compartmentID + * of the compartment that you want to move the Private Endpoint to. Or use it to update the name, subnetId, endpointFqdn or privateEndpointIp or accessTargets of the Private Endpoint. + * For more information about moving resources between compartments, see [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + *

+ * This API follows replace semantics (rather than merge semantics). That means if the body provides values for + * parameters and the resource has exisiting ones, this operation will replace those existing values. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdatePrivateEndpoint API. + */ + UpdatePrivateEndpointResponse updatePrivateEndpoint(UpdatePrivateEndpointRequest request); + /** * Updates the specified retention rule. Rule changes take effect typically within 30 seconds. * diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java index ed400edcd5d..fddce13c654 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java @@ -186,6 +186,23 @@ java.util.concurrent.Future createMultipartUpload CreatePreauthenticatedRequestResponse> handler); + /** + * Create a PrivateEndpoint. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createPrivateEndpoint( + CreatePrivateEndpointRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreatePrivateEndpointRequest, CreatePrivateEndpointResponse> + handler); + /** * Creates a replication policy for the specified bucket. * @@ -291,6 +308,23 @@ java.util.concurrent.Future deleteObjectLif DeletePreauthenticatedRequestResponse> handler); + /** + * Deletes a Private Endpoint if it exists in the given namespace. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deletePrivateEndpoint( + DeletePrivateEndpointRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeletePrivateEndpointRequest, DeletePrivateEndpointResponse> + handler); + /** * Deletes the replication policy associated with the source bucket. * @@ -432,6 +466,23 @@ java.util.concurrent.Future getPreauthentica GetPreauthenticatedRequestRequest, GetPreauthenticatedRequestResponse> handler); + /** + * Gets the current representation of the given Private Endpoint in the given Object Storage namespace. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getPrivateEndpoint( + GetPrivateEndpointRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetPrivateEndpointRequest, GetPrivateEndpointResponse> + handler); + /** * Get the replication policy. * @@ -632,6 +683,26 @@ java.util.concurrent.Future listPreauthent ListPreauthenticatedRequestsResponse> handler); + /** + * Gets a list of all PrivateEndpointSummary in a compartment associated with a namespace. + * To use this and other API operations, you must be authorized in an IAM policy. If you are not authorized, + * talk to an administrator. If you are an administrator who needs to write policies to give users access, see + * [Getting Started with Policies](https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm). + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listPrivateEndpoints( + ListPrivateEndpointsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListPrivateEndpointsRequest, ListPrivateEndpointsResponse> + handler); + /** * List the replication policies associated with a bucket. * @@ -865,8 +936,8 @@ java.util.concurrent.Future renameObject( handler); /** - * Restores one or more objects specified by the objectName parameter. - * By default objects will be restored for 24 hours. Duration can be configured using the hours parameter. + * Restores the object specified by the objectName parameter. + * By default object will be restored for 24 hours. Duration can be configured using the hours parameter. * * * @param request The request object containing the details to send @@ -941,6 +1012,30 @@ java.util.concurrent.Future updateObjectStorage UpdateObjectStorageTierRequest, UpdateObjectStorageTierResponse> handler); + /** + * Performs a partial or full update of a user-defined data associated with the Private Endpoint. + *

+ * Use UpdatePrivateEndpoint to move a Private Endpoint from one compartment to another within the same tenancy. Supply the compartmentID + * of the compartment that you want to move the Private Endpoint to. Or use it to update the name, subnetId, endpointFqdn or privateEndpointIp or accessTargets of the Private Endpoint. + * For more information about moving resources between compartments, see [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + *

+ * This API follows replace semantics (rather than merge semantics). That means if the body provides values for + * parameters and the resource has exisiting ones, this operation will replace those existing values. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updatePrivateEndpoint( + UpdatePrivateEndpointRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdatePrivateEndpointRequest, UpdatePrivateEndpointResponse> + handler); + /** * Updates the specified retention rule. Rule changes take effect typically within 30 seconds. * diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsyncClient.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsyncClient.java index 9e819378f9d..0cc9ca04b9b 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsyncClient.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsyncClient.java @@ -818,6 +818,58 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future createPrivateEndpoint( + CreatePrivateEndpointRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreatePrivateEndpointRequest, CreatePrivateEndpointResponse> + handler) { + LOG.trace("Called async createPrivateEndpoint"); + final CreatePrivateEndpointRequest interceptedRequest = + CreatePrivateEndpointConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreatePrivateEndpointConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "ObjectStorage", + "CreatePrivateEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/PrivateEndpoint/CreatePrivateEndpoint"); + final java.util.function.Function + transformer = + CreatePrivateEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreatePrivateEndpointRequest, CreatePrivateEndpointResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreatePrivateEndpointRequest, CreatePrivateEndpointResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreatePrivateEndpointDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreatePrivateEndpointRequest, CreatePrivateEndpointResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future createReplicationPolicy( CreateReplicationPolicyRequest request, @@ -1113,6 +1165,53 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future deletePrivateEndpoint( + DeletePrivateEndpointRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeletePrivateEndpointRequest, DeletePrivateEndpointResponse> + handler) { + LOG.trace("Called async deletePrivateEndpoint"); + final DeletePrivateEndpointRequest interceptedRequest = + DeletePrivateEndpointConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeletePrivateEndpointConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "ObjectStorage", + "DeletePrivateEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/PrivateEndpoint/DeletePrivateEndpoint"); + final java.util.function.Function + transformer = + DeletePrivateEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeletePrivateEndpointRequest, DeletePrivateEndpointResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeletePrivateEndpointRequest, DeletePrivateEndpointResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeletePrivateEndpointRequest, DeletePrivateEndpointResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteReplicationPolicy( DeleteReplicationPolicyRequest request, @@ -1482,6 +1581,52 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future getPrivateEndpoint( + GetPrivateEndpointRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetPrivateEndpointRequest, GetPrivateEndpointResponse> + handler) { + LOG.trace("Called async getPrivateEndpoint"); + final GetPrivateEndpointRequest interceptedRequest = + GetPrivateEndpointConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetPrivateEndpointConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "ObjectStorage", + "GetPrivateEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/PrivateEndpoint/GetPrivateEndpoint"); + final java.util.function.Function + transformer = + GetPrivateEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetPrivateEndpointRequest, GetPrivateEndpointResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetPrivateEndpointRequest, GetPrivateEndpointResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getReplicationPolicy( GetReplicationPolicyRequest request, @@ -1986,6 +2131,53 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future listPrivateEndpoints( + ListPrivateEndpointsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListPrivateEndpointsRequest, ListPrivateEndpointsResponse> + handler) { + LOG.trace("Called async listPrivateEndpoints"); + final ListPrivateEndpointsRequest interceptedRequest = + ListPrivateEndpointsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPrivateEndpointsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "ObjectStorage", + "ListPrivateEndpoints", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/PrivateEndpointSummary/ListPrivateEndpoints"); + final java.util.function.Function + transformer = + ListPrivateEndpointsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListPrivateEndpointsRequest, ListPrivateEndpointsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListPrivateEndpointsRequest, ListPrivateEndpointsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListPrivateEndpointsRequest, ListPrivateEndpointsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listReplicationPolicies( ListReplicationPoliciesRequest request, @@ -2779,6 +2971,58 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future updatePrivateEndpoint( + UpdatePrivateEndpointRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdatePrivateEndpointRequest, UpdatePrivateEndpointResponse> + handler) { + LOG.trace("Called async updatePrivateEndpoint"); + final UpdatePrivateEndpointRequest interceptedRequest = + UpdatePrivateEndpointConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdatePrivateEndpointConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "ObjectStorage", + "UpdatePrivateEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/PrivateEndpoint/UpdatePrivateEndpoint"); + final java.util.function.Function + transformer = + UpdatePrivateEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdatePrivateEndpointRequest, UpdatePrivateEndpointResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdatePrivateEndpointRequest, UpdatePrivateEndpointResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdatePrivateEndpointDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdatePrivateEndpointRequest, UpdatePrivateEndpointResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateRetentionRule( UpdateRetentionRuleRequest request, diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageClient.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageClient.java index 2ce2ab80b6b..20466c989e9 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageClient.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageClient.java @@ -839,6 +839,48 @@ public CreatePreauthenticatedRequestResponse createPreauthenticatedRequest( }); } + @Override + public CreatePrivateEndpointResponse createPrivateEndpoint( + CreatePrivateEndpointRequest request) { + LOG.trace("Called createPrivateEndpoint"); + final CreatePrivateEndpointRequest interceptedRequest = + CreatePrivateEndpointConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreatePrivateEndpointConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "ObjectStorage", + "CreatePrivateEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/PrivateEndpoint/CreatePrivateEndpoint"); + java.util.function.Function + transformer = + CreatePrivateEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreatePrivateEndpointDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public CreateReplicationPolicyResponse createReplicationPolicy( CreateReplicationPolicyRequest request) { @@ -1073,6 +1115,45 @@ public DeletePreauthenticatedRequestResponse deletePreauthenticatedRequest( }); } + @Override + public DeletePrivateEndpointResponse deletePrivateEndpoint( + DeletePrivateEndpointRequest request) { + LOG.trace("Called deletePrivateEndpoint"); + final DeletePrivateEndpointRequest interceptedRequest = + DeletePrivateEndpointConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeletePrivateEndpointConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "ObjectStorage", + "DeletePrivateEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/PrivateEndpoint/DeletePrivateEndpoint"); + java.util.function.Function + transformer = + DeletePrivateEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DeleteReplicationPolicyResponse deleteReplicationPolicy( DeleteReplicationPolicyRequest request) { @@ -1366,6 +1447,43 @@ public GetPreauthenticatedRequestResponse getPreauthenticatedRequest( }); } + @Override + public GetPrivateEndpointResponse getPrivateEndpoint(GetPrivateEndpointRequest request) { + LOG.trace("Called getPrivateEndpoint"); + final GetPrivateEndpointRequest interceptedRequest = + GetPrivateEndpointConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetPrivateEndpointConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "ObjectStorage", + "GetPrivateEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/PrivateEndpoint/GetPrivateEndpoint"); + java.util.function.Function + transformer = + GetPrivateEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetReplicationPolicyResponse getReplicationPolicy(GetReplicationPolicyRequest request) { LOG.trace("Called getReplicationPolicy"); @@ -1765,6 +1883,43 @@ public ListPreauthenticatedRequestsResponse listPreauthenticatedRequests( }); } + @Override + public ListPrivateEndpointsResponse listPrivateEndpoints(ListPrivateEndpointsRequest request) { + LOG.trace("Called listPrivateEndpoints"); + final ListPrivateEndpointsRequest interceptedRequest = + ListPrivateEndpointsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListPrivateEndpointsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "ObjectStorage", + "ListPrivateEndpoints", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/PrivateEndpointSummary/ListPrivateEndpoints"); + java.util.function.Function + transformer = + ListPrivateEndpointsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListReplicationPoliciesResponse listReplicationPolicies( ListReplicationPoliciesRequest request) { @@ -2422,6 +2577,48 @@ public UpdateObjectStorageTierResponse updateObjectStorageTier( }); } + @Override + public UpdatePrivateEndpointResponse updatePrivateEndpoint( + UpdatePrivateEndpointRequest request) { + LOG.trace("Called updatePrivateEndpoint"); + final UpdatePrivateEndpointRequest interceptedRequest = + UpdatePrivateEndpointConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdatePrivateEndpointConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "ObjectStorage", + "UpdatePrivateEndpoint", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/PrivateEndpoint/UpdatePrivateEndpoint"); + java.util.function.Function + transformer = + UpdatePrivateEndpointConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getUpdatePrivateEndpointDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateRetentionRuleResponse updateRetentionRule(UpdateRetentionRuleRequest request) { LOG.trace("Called updateRetentionRule"); diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStoragePaginators.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStoragePaginators.java index 2ad7875b4f6..e27231f08bb 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStoragePaginators.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStoragePaginators.java @@ -722,6 +722,121 @@ public ListPreauthenticatedRequestsResponse apply( }); } + /** + * Creates a new iterable which will iterate over the responses received from the listPrivateEndpoints operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listPrivateEndpointsResponseIterator( + final ListPrivateEndpointsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListPrivateEndpointsRequest.Builder, ListPrivateEndpointsRequest, + ListPrivateEndpointsResponse>( + new java.util.function.Supplier() { + @Override + public ListPrivateEndpointsRequest.Builder get() { + return ListPrivateEndpointsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPrivateEndpointsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPrivateEndpointsRequest.Builder>, + ListPrivateEndpointsRequest>() { + @Override + public ListPrivateEndpointsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPrivateEndpointsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListPrivateEndpointsRequest, ListPrivateEndpointsResponse>() { + @Override + public ListPrivateEndpointsResponse apply(ListPrivateEndpointsRequest request) { + return client.listPrivateEndpoints(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.objectstorage.model.PrivateEndpointSummary} objects + * contained in responses from the listPrivateEndpoints operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.objectstorage.model.PrivateEndpointSummary} objects + * contained in responses received from the service. + */ + public Iterable + listPrivateEndpointsRecordIterator(final ListPrivateEndpointsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListPrivateEndpointsRequest.Builder, ListPrivateEndpointsRequest, + ListPrivateEndpointsResponse, + com.oracle.bmc.objectstorage.model.PrivateEndpointSummary>( + new java.util.function.Supplier() { + @Override + public ListPrivateEndpointsRequest.Builder get() { + return ListPrivateEndpointsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListPrivateEndpointsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPrivateEndpointsRequest.Builder>, + ListPrivateEndpointsRequest>() { + @Override + public ListPrivateEndpointsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListPrivateEndpointsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListPrivateEndpointsRequest, ListPrivateEndpointsResponse>() { + @Override + public ListPrivateEndpointsResponse apply(ListPrivateEndpointsRequest request) { + return client.listPrivateEndpoints(request); + } + }, + new java.util.function.Function< + ListPrivateEndpointsResponse, + java.util.List< + com.oracle.bmc.objectstorage.model.PrivateEndpointSummary>>() { + @Override + public java.util.List + apply(ListPrivateEndpointsResponse response) { + return response.getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listReplicationPolicies operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageWaiters.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageWaiters.java index 204ff128626..2ef48d3b46c 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageWaiters.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageWaiters.java @@ -24,6 +24,113 @@ public ObjectStorageWaiters( this.client = client; } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forPrivateEndpoint( + GetPrivateEndpointRequest request, + com.oracle.bmc.objectstorage.model.PrivateEndpoint.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forPrivateEndpoint( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forPrivateEndpoint( + GetPrivateEndpointRequest request, + com.oracle.bmc.objectstorage.model.PrivateEndpoint.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forPrivateEndpoint( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forPrivateEndpoint( + GetPrivateEndpointRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.objectstorage.model.PrivateEndpoint.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forPrivateEndpoint( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for PrivateEndpoint. + private com.oracle.bmc.waiter.Waiter + forPrivateEndpoint( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetPrivateEndpointRequest request, + final com.oracle.bmc.objectstorage.model.PrivateEndpoint.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetPrivateEndpointRequest, GetPrivateEndpointResponse>() { + @Override + public GetPrivateEndpointResponse apply( + GetPrivateEndpointRequest request) { + return client.getPrivateEndpoint(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetPrivateEndpointResponse response) { + return targetStatesSet.contains( + response.getPrivateEndpoint().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.objectstorage.model.PrivateEndpoint.LifecycleState + .Deleted)), + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using default configuration. * diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/CommitMultipartUploadConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/CommitMultipartUploadConverter.java index 77294901cfe..acd405c37e2 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/CommitMultipartUploadConverter.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/CommitMultipartUploadConverter.java @@ -176,6 +176,43 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( String.class)); } + java.util.Optional> opcContentCrc32cHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-content-crc32c"); + if (opcContentCrc32cHeader.isPresent()) { + builder.opcContentCrc32c( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-content-crc32c", + opcContentCrc32cHeader.get().get(0), + String.class)); + } + + java.util.Optional> + opcMultipartSha256Header = + com.oracle.bmc.http.internal.HeaderUtils + .getHeadersWithName( + headers, "opc-multipart-sha256"); + if (opcMultipartSha256Header.isPresent()) { + builder.opcMultipartSha256( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-multipart-sha256", + opcMultipartSha256Header.get().get(0), + String.class)); + } + + java.util.Optional> + opcMultipartSha384Header = + com.oracle.bmc.http.internal.HeaderUtils + .getHeadersWithName( + headers, "opc-multipart-sha384"); + if (opcMultipartSha384Header.isPresent()) { + builder.opcMultipartSha384( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-multipart-sha384", + opcMultipartSha384Header.get().get(0), + String.class)); + } + java.util.Optional> eTagHeader = com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( headers, "ETag"); diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/CreateMultipartUploadConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/CreateMultipartUploadConverter.java index b29de31ace8..7aeecc46d39 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/CreateMultipartUploadConverter.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/CreateMultipartUploadConverter.java @@ -88,6 +88,10 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( ib.header("opc-sse-kms-key-id", request.getOpcSseKmsKeyId()); } + if (request.getOpcChecksumAlgorithm() != null) { + ib.header("opc-checksum-algorithm", request.getOpcChecksumAlgorithm().getValue()); + } + if (client.getClientConfigurator() != null) { client.getClientConfigurator().customizeRequest(request, ib); } diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/CreatePrivateEndpointConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/CreatePrivateEndpointConverter.java new file mode 100644 index 00000000000..911132308ae --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/CreatePrivateEndpointConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.objectstorage.model.*; +import com.oracle.bmc.objectstorage.requests.*; +import com.oracle.bmc.objectstorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreatePrivateEndpointConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreatePrivateEndpointConverter.class); + + public static com.oracle.bmc.objectstorage.requests.CreatePrivateEndpointRequest + interceptRequest( + com.oracle.bmc.objectstorage.requests.CreatePrivateEndpointRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.objectstorage.requests.CreatePrivateEndpointRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getNamespaceName(), "namespaceName must not be blank"); + Validate.notNull( + request.getCreatePrivateEndpointDetails(), + "createPrivateEndpointDetails is required"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("namespaceName", request.getNamespaceName()); + com.oracle.bmc.http.internal.WrappedWebTarget newBaseTarget = + com.oracle.bmc.internal.EndpointBuilder.populateServiceParametersInEndpoint( + client, requiredParametersMap); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + newBaseTarget + .path("/") + .path("n") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNamespaceName())) + .path("pe"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcClientRequestId() != null) { + ib.header("opc-client-request-id", request.getOpcClientRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.objectstorage.responses.CreatePrivateEndpointResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.objectstorage.responses.CreatePrivateEndpointResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.objectstorage.responses.CreatePrivateEndpointResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.objectstorage.responses + .CreatePrivateEndpointResponse>() { + @Override + public com.oracle.bmc.objectstorage.responses + .CreatePrivateEndpointResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.objectstorage.responses.CreatePrivateEndpointResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.objectstorage.responses.CreatePrivateEndpointResponse + .Builder + builder = + com.oracle.bmc.objectstorage.responses + .CreatePrivateEndpointResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> + opcClientRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils + .getHeadersWithName( + headers, "opc-client-request-id"); + if (opcClientRequestIdHeader.isPresent()) { + builder.opcClientRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-client-request-id", + opcClientRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.objectstorage.responses.CreatePrivateEndpointResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/DeletePrivateEndpointConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/DeletePrivateEndpointConverter.java new file mode 100644 index 00000000000..9cd714b5561 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/DeletePrivateEndpointConverter.java @@ -0,0 +1,167 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.objectstorage.model.*; +import com.oracle.bmc.objectstorage.requests.*; +import com.oracle.bmc.objectstorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeletePrivateEndpointConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeletePrivateEndpointConverter.class); + + public static com.oracle.bmc.objectstorage.requests.DeletePrivateEndpointRequest + interceptRequest( + com.oracle.bmc.objectstorage.requests.DeletePrivateEndpointRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.objectstorage.requests.DeletePrivateEndpointRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getNamespaceName(), "namespaceName must not be blank"); + Validate.notBlank(request.getPeName(), "peName must not be blank"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("namespaceName", request.getNamespaceName()); + requiredParametersMap.put("peName", request.getPeName()); + com.oracle.bmc.http.internal.WrappedWebTarget newBaseTarget = + com.oracle.bmc.internal.EndpointBuilder.populateServiceParametersInEndpoint( + client, requiredParametersMap); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + newBaseTarget + .path("/") + .path("n") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNamespaceName())) + .path("pe") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPeName())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcClientRequestId() != null) { + ib.header("opc-client-request-id", request.getOpcClientRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.objectstorage.responses.DeletePrivateEndpointResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.objectstorage.responses.DeletePrivateEndpointResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.objectstorage.responses.DeletePrivateEndpointResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.objectstorage.responses + .DeletePrivateEndpointResponse>() { + @Override + public com.oracle.bmc.objectstorage.responses + .DeletePrivateEndpointResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.objectstorage.responses.DeletePrivateEndpointResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.objectstorage.responses.DeletePrivateEndpointResponse + .Builder + builder = + com.oracle.bmc.objectstorage.responses + .DeletePrivateEndpointResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> + opcClientRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils + .getHeadersWithName( + headers, "opc-client-request-id"); + if (opcClientRequestIdHeader.isPresent()) { + builder.opcClientRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-client-request-id", + opcClientRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.objectstorage.responses.DeletePrivateEndpointResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetObjectConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetObjectConverter.java index 5c8506dc6be..e3d4d5fea6e 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetObjectConverter.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetObjectConverter.java @@ -300,6 +300,65 @@ public com.oracle.bmc.objectstorage.responses.GetObjectResponse apply( String.class)); } + java.util.Optional> opcContentCrc32cHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-content-crc32c"); + if (opcContentCrc32cHeader.isPresent()) { + builder.opcContentCrc32c( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-content-crc32c", + opcContentCrc32cHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcContentSha256Header = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-content-sha256"); + if (opcContentSha256Header.isPresent()) { + builder.opcContentSha256( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-content-sha256", + opcContentSha256Header.get().get(0), + String.class)); + } + + java.util.Optional> + opcMultipartSha256Header = + com.oracle.bmc.http.internal.HeaderUtils + .getHeadersWithName( + headers, "opc-multipart-sha256"); + if (opcMultipartSha256Header.isPresent()) { + builder.opcMultipartSha256( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-multipart-sha256", + opcMultipartSha256Header.get().get(0), + String.class)); + } + + java.util.Optional> opcContentSha384Header = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-content-sha384"); + if (opcContentSha384Header.isPresent()) { + builder.opcContentSha384( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-content-sha384", + opcContentSha384Header.get().get(0), + String.class)); + } + + java.util.Optional> + opcMultipartSha384Header = + com.oracle.bmc.http.internal.HeaderUtils + .getHeadersWithName( + headers, "opc-multipart-sha384"); + if (opcMultipartSha384Header.isPresent()) { + builder.opcMultipartSha384( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-multipart-sha384", + opcMultipartSha384Header.get().get(0), + String.class)); + } + java.util.Optional> contentTypeHeader = com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( headers, "content-type"); diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetPrivateEndpointConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetPrivateEndpointConverter.java new file mode 100644 index 00000000000..fb2ac2a1613 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetPrivateEndpointConverter.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.objectstorage.model.*; +import com.oracle.bmc.objectstorage.requests.*; +import com.oracle.bmc.objectstorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetPrivateEndpointConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetPrivateEndpointConverter.class); + + public static com.oracle.bmc.objectstorage.requests.GetPrivateEndpointRequest interceptRequest( + com.oracle.bmc.objectstorage.requests.GetPrivateEndpointRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.objectstorage.requests.GetPrivateEndpointRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getNamespaceName(), "namespaceName must not be blank"); + Validate.notBlank(request.getPeName(), "peName must not be blank"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("namespaceName", request.getNamespaceName()); + requiredParametersMap.put("peName", request.getPeName()); + com.oracle.bmc.http.internal.WrappedWebTarget newBaseTarget = + com.oracle.bmc.internal.EndpointBuilder.populateServiceParametersInEndpoint( + client, requiredParametersMap); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + newBaseTarget + .path("/") + .path("n") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNamespaceName())) + .path("pe") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPeName())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getIfNoneMatch() != null) { + ib.header("if-none-match", request.getIfNoneMatch()); + } + + if (request.getOpcClientRequestId() != null) { + ib.header("opc-client-request-id", request.getOpcClientRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.objectstorage.responses.GetPrivateEndpointResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.objectstorage.responses.GetPrivateEndpointResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.objectstorage.responses.GetPrivateEndpointResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.objectstorage.responses + .GetPrivateEndpointResponse>() { + @Override + public com.oracle.bmc.objectstorage.responses.GetPrivateEndpointResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.objectstorage.responses.GetPrivateEndpointResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.objectstorage.model + .PrivateEndpoint>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.objectstorage.model + .PrivateEndpoint + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.objectstorage.model + .PrivateEndpoint + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.objectstorage.model.PrivateEndpoint> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.objectstorage.responses.GetPrivateEndpointResponse + .Builder + builder = + com.oracle.bmc.objectstorage.responses + .GetPrivateEndpointResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + if (response.getStatusCode() != 304) { + builder.privateEndpoint(response.getItem()); + builder.isNotModified(false); + } else { + builder.isNotModified(true); + } + + java.util.Optional> + opcClientRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils + .getHeadersWithName( + headers, "opc-client-request-id"); + if (opcClientRequestIdHeader.isPresent()) { + builder.opcClientRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-client-request-id", + opcClientRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> eTagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "eTag"); + if (eTagHeader.isPresent()) { + builder.eTag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "eTag", eTagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.objectstorage.responses.GetPrivateEndpointResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/HeadObjectConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/HeadObjectConverter.java index 8dbc6f7bb15..43b377b910e 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/HeadObjectConverter.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/HeadObjectConverter.java @@ -233,6 +233,65 @@ public com.oracle.bmc.objectstorage.responses.HeadObjectResponse apply( String.class)); } + java.util.Optional> opcContentCrc32cHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-content-crc32c"); + if (opcContentCrc32cHeader.isPresent()) { + builder.opcContentCrc32c( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-content-crc32c", + opcContentCrc32cHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcContentSha256Header = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-content-sha256"); + if (opcContentSha256Header.isPresent()) { + builder.opcContentSha256( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-content-sha256", + opcContentSha256Header.get().get(0), + String.class)); + } + + java.util.Optional> + opcMultipartSha256Header = + com.oracle.bmc.http.internal.HeaderUtils + .getHeadersWithName( + headers, "opc-multipart-sha256"); + if (opcMultipartSha256Header.isPresent()) { + builder.opcMultipartSha256( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-multipart-sha256", + opcMultipartSha256Header.get().get(0), + String.class)); + } + + java.util.Optional> opcContentSha384Header = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-content-sha384"); + if (opcContentSha384Header.isPresent()) { + builder.opcContentSha384( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-content-sha384", + opcContentSha384Header.get().get(0), + String.class)); + } + + java.util.Optional> + opcMultipartSha384Header = + com.oracle.bmc.http.internal.HeaderUtils + .getHeadersWithName( + headers, "opc-multipart-sha384"); + if (opcMultipartSha384Header.isPresent()) { + builder.opcMultipartSha384( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-multipart-sha384", + opcMultipartSha384Header.get().get(0), + String.class)); + } + java.util.Optional> contentTypeHeader = com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( headers, "content-type"); diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ListPrivateEndpointsConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ListPrivateEndpointsConverter.java new file mode 100644 index 00000000000..d32eda64fa1 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ListPrivateEndpointsConverter.java @@ -0,0 +1,218 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.objectstorage.model.*; +import com.oracle.bmc.objectstorage.requests.*; +import com.oracle.bmc.objectstorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListPrivateEndpointsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListPrivateEndpointsConverter.class); + + public static com.oracle.bmc.objectstorage.requests.ListPrivateEndpointsRequest + interceptRequest( + com.oracle.bmc.objectstorage.requests.ListPrivateEndpointsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.objectstorage.requests.ListPrivateEndpointsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getNamespaceName(), "namespaceName must not be blank"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("namespaceName", request.getNamespaceName()); + requiredParametersMap.put("compartmentId", request.getCompartmentId()); + com.oracle.bmc.http.internal.WrappedWebTarget newBaseTarget = + com.oracle.bmc.internal.EndpointBuilder.populateServiceParametersInEndpoint( + client, requiredParametersMap); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + newBaseTarget + .path("/") + .path("n") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNamespaceName())) + .path("pe"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getFields() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "fields", + request.getFields(), + com.oracle.bmc.util.internal.CollectionFormatType.CommaSeparated); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcClientRequestId() != null) { + ib.header("opc-client-request-id", request.getOpcClientRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.objectstorage.responses.ListPrivateEndpointsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.objectstorage.responses.ListPrivateEndpointsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.objectstorage.responses.ListPrivateEndpointsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.objectstorage.responses + .ListPrivateEndpointsResponse>() { + @Override + public com.oracle.bmc.objectstorage.responses + .ListPrivateEndpointsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.objectstorage.responses.ListPrivateEndpointsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.objectstorage.model + .PrivateEndpointSummary>>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.objectstorage + .model + .PrivateEndpointSummary>>() {}, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.objectstorage + .model + .PrivateEndpointSummary>>() {}); + } + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.objectstorage.model + .PrivateEndpointSummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.objectstorage.responses.ListPrivateEndpointsResponse + .Builder + builder = + com.oracle.bmc.objectstorage.responses + .ListPrivateEndpointsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.items(response.getItem()); + + java.util.Optional> + opcClientRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils + .getHeadersWithName( + headers, "opc-client-request-id"); + if (opcClientRequestIdHeader.isPresent()) { + builder.opcClientRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-client-request-id", + opcClientRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.objectstorage.responses.ListPrivateEndpointsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ListWorkRequestsConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ListWorkRequestsConverter.java index 3306a0defd2..242ea41e82f 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ListWorkRequestsConverter.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ListWorkRequestsConverter.java @@ -46,6 +46,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( request.getCompartmentId())); + if (request.getPrivateEndpointName() != null) { + target = + target.queryParam( + "privateEndpointName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPrivateEndpointName())); + } + if (request.getPage() != null) { target = target.queryParam( diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/PutObjectConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/PutObjectConverter.java index c00335637f5..ea72cb49eaf 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/PutObjectConverter.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/PutObjectConverter.java @@ -86,6 +86,22 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( ib.header("Content-MD5", request.getContentMD5()); } + if (request.getOpcChecksumAlgorithm() != null) { + ib.header("opc-checksum-algorithm", request.getOpcChecksumAlgorithm().getValue()); + } + + if (request.getOpcContentCrc32c() != null) { + ib.header("opc-content-crc32c", request.getOpcContentCrc32c()); + } + + if (request.getOpcContentSha256() != null) { + ib.header("opc-content-sha256", request.getOpcContentSha256()); + } + + if (request.getOpcContentSha384() != null) { + ib.header("opc-content-sha384", request.getOpcContentSha384()); + } + if (request.getContentType() != null) { ib.header("Content-Type", request.getContentType()); } @@ -220,6 +236,39 @@ public com.oracle.bmc.objectstorage.responses.PutObjectResponse apply( String.class)); } + java.util.Optional> opcContentCrc32cHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-content-crc32c"); + if (opcContentCrc32cHeader.isPresent()) { + builder.opcContentCrc32c( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-content-crc32c", + opcContentCrc32cHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcContentSha256Header = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-content-sha256"); + if (opcContentSha256Header.isPresent()) { + builder.opcContentSha256( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-content-sha256", + opcContentSha256Header.get().get(0), + String.class)); + } + + java.util.Optional> opcContentSha384Header = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-content-sha384"); + if (opcContentSha384Header.isPresent()) { + builder.opcContentSha384( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-content-sha384", + opcContentSha384Header.get().get(0), + String.class)); + } + java.util.Optional> eTagHeader = com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( headers, "ETag"); diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/UpdatePrivateEndpointConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/UpdatePrivateEndpointConverter.java new file mode 100644 index 00000000000..f0c7129e3d0 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/UpdatePrivateEndpointConverter.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.objectstorage.model.*; +import com.oracle.bmc.objectstorage.requests.*; +import com.oracle.bmc.objectstorage.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdatePrivateEndpointConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdatePrivateEndpointConverter.class); + + public static com.oracle.bmc.objectstorage.requests.UpdatePrivateEndpointRequest + interceptRequest( + com.oracle.bmc.objectstorage.requests.UpdatePrivateEndpointRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.objectstorage.requests.UpdatePrivateEndpointRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getNamespaceName(), "namespaceName must not be blank"); + Validate.notBlank(request.getPeName(), "peName must not be blank"); + Validate.notNull( + request.getUpdatePrivateEndpointDetails(), + "updatePrivateEndpointDetails is required"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("namespaceName", request.getNamespaceName()); + requiredParametersMap.put("peName", request.getPeName()); + com.oracle.bmc.http.internal.WrappedWebTarget newBaseTarget = + com.oracle.bmc.internal.EndpointBuilder.populateServiceParametersInEndpoint( + client, requiredParametersMap); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + newBaseTarget + .path("/") + .path("n") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNamespaceName())) + .path("pe") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPeName())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcClientRequestId() != null) { + ib.header("opc-client-request-id", request.getOpcClientRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.objectstorage.responses.UpdatePrivateEndpointResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.objectstorage.responses.UpdatePrivateEndpointResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.objectstorage.responses.UpdatePrivateEndpointResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.objectstorage.responses + .UpdatePrivateEndpointResponse>() { + @Override + public com.oracle.bmc.objectstorage.responses + .UpdatePrivateEndpointResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.objectstorage.responses.UpdatePrivateEndpointResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.objectstorage.responses.UpdatePrivateEndpointResponse + .Builder + builder = + com.oracle.bmc.objectstorage.responses + .UpdatePrivateEndpointResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> + opcClientRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils + .getHeadersWithName( + headers, "opc-client-request-id"); + if (opcClientRequestIdHeader.isPresent()) { + builder.opcClientRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-client-request-id", + opcClientRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.objectstorage.responses.UpdatePrivateEndpointResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/UploadPartConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/UploadPartConverter.java index 9b96f982825..73be70aecbc 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/UploadPartConverter.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/UploadPartConverter.java @@ -102,6 +102,22 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( ib.header("Content-MD5", request.getContentMD5()); } + if (request.getOpcChecksumAlgorithm() != null) { + ib.header("opc-checksum-algorithm", request.getOpcChecksumAlgorithm().getValue()); + } + + if (request.getOpcContentCrc32c() != null) { + ib.header("opc-content-crc32c", request.getOpcContentCrc32c()); + } + + if (request.getOpcContentSha256() != null) { + ib.header("opc-content-sha256", request.getOpcContentSha256()); + } + + if (request.getOpcContentSha384() != null) { + ib.header("opc-content-sha384", request.getOpcContentSha384()); + } + if (request.getOpcSseCustomerAlgorithm() != null) { ib.header("opc-sse-customer-algorithm", request.getOpcSseCustomerAlgorithm()); } @@ -206,6 +222,39 @@ public com.oracle.bmc.objectstorage.responses.UploadPartResponse apply( String.class)); } + java.util.Optional> opcContentCrc32cHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-content-crc32c"); + if (opcContentCrc32cHeader.isPresent()) { + builder.opcContentCrc32c( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-content-crc32c", + opcContentCrc32cHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcContentSha256Header = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-content-sha256"); + if (opcContentSha256Header.isPresent()) { + builder.opcContentSha256( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-content-sha256", + opcContentSha256Header.get().get(0), + String.class)); + } + + java.util.Optional> opcContentSha384Header = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-content-sha384"); + if (opcContentSha384Header.isPresent()) { + builder.opcContentSha384( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-content-sha384", + opcContentSha384Header.get().get(0), + String.class)); + } + java.util.Optional> eTagHeader = com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( headers, "ETag"); diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/AccessTargetDetails.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/AccessTargetDetails.java new file mode 100644 index 00000000000..c3cf1acca2d --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/AccessTargetDetails.java @@ -0,0 +1,221 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * Details of the targets that can be accessed by the private endpoint. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AccessTargetDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AccessTargetDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"namespace", "compartmentId", "bucket"}) + public AccessTargetDetails(String namespace, String compartmentId, String bucket) { + super(); + this.namespace = namespace; + this.compartmentId = compartmentId; + this.bucket = bucket; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The Object Storage namespace which the private endpoint can access. Wildcards ('*') are allowed. If value is '*', it means all namespaces can be accessed. It cannot be a regex. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespace") + private String namespace; + + /** + * The Object Storage namespace which the private endpoint can access. Wildcards ('*') are allowed. If value is '*', it means all namespaces can be accessed. It cannot be a regex. + * @param namespace the value to set + * @return this builder + **/ + public Builder namespace(String namespace) { + this.namespace = namespace; + this.__explicitlySet__.add("namespace"); + return this; + } + /** + * The compartment ID which the private endpoint can access. Wildcards ('*') are allowed. If value is '*', it means all compartments in the specified namespace can be accessed. It cannot be a regex. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The compartment ID which the private endpoint can access. Wildcards ('*') are allowed. If value is '*', it means all compartments in the specified namespace can be accessed. It cannot be a regex. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The name of the bucket. Avoid entering confidential information. Wildcards ('*') are allowed. If value is '*', it means all buckets in the specified namespace and compartment can be accessed. It cannot be a regex. + * Example: my-new-bucket1 + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucket") + private String bucket; + + /** + * The name of the bucket. Avoid entering confidential information. Wildcards ('*') are allowed. If value is '*', it means all buckets in the specified namespace and compartment can be accessed. It cannot be a regex. + * Example: my-new-bucket1 + * + * @param bucket the value to set + * @return this builder + **/ + public Builder bucket(String bucket) { + this.bucket = bucket; + this.__explicitlySet__.add("bucket"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AccessTargetDetails build() { + AccessTargetDetails model = + new AccessTargetDetails(this.namespace, this.compartmentId, this.bucket); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AccessTargetDetails model) { + if (model.wasPropertyExplicitlySet("namespace")) { + this.namespace(model.getNamespace()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("bucket")) { + this.bucket(model.getBucket()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The Object Storage namespace which the private endpoint can access. Wildcards ('*') are allowed. If value is '*', it means all namespaces can be accessed. It cannot be a regex. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespace") + private final String namespace; + + /** + * The Object Storage namespace which the private endpoint can access. Wildcards ('*') are allowed. If value is '*', it means all namespaces can be accessed. It cannot be a regex. + * @return the value + **/ + public String getNamespace() { + return namespace; + } + + /** + * The compartment ID which the private endpoint can access. Wildcards ('*') are allowed. If value is '*', it means all compartments in the specified namespace can be accessed. It cannot be a regex. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The compartment ID which the private endpoint can access. Wildcards ('*') are allowed. If value is '*', it means all compartments in the specified namespace can be accessed. It cannot be a regex. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The name of the bucket. Avoid entering confidential information. Wildcards ('*') are allowed. If value is '*', it means all buckets in the specified namespace and compartment can be accessed. It cannot be a regex. + * Example: my-new-bucket1 + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucket") + private final String bucket; + + /** + * The name of the bucket. Avoid entering confidential information. Wildcards ('*') are allowed. If value is '*', it means all buckets in the specified namespace and compartment can be accessed. It cannot be a regex. + * Example: my-new-bucket1 + * + * @return the value + **/ + public String getBucket() { + return bucket; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AccessTargetDetails("); + sb.append("super=").append(super.toString()); + sb.append("namespace=").append(String.valueOf(this.namespace)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", bucket=").append(String.valueOf(this.bucket)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AccessTargetDetails)) { + return false; + } + + AccessTargetDetails other = (AccessTargetDetails) o; + return java.util.Objects.equals(this.namespace, other.namespace) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.bucket, other.bucket) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.namespace == null ? 43 : this.namespace.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.bucket == null ? 43 : this.bucket.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ChecksumAlgorithm.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ChecksumAlgorithm.java new file mode 100644 index 00000000000..a8d3bb1df1e --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ChecksumAlgorithm.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * Checksum algorithms supported by Object Storage for data integrity checks, in addition to the default MD5 checksum. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public enum ChecksumAlgorithm { + Crc32C("CRC32C"), + Sha256("SHA256"), + Sha384("SHA384"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ChecksumAlgorithm v : ChecksumAlgorithm.values()) { + map.put(v.getValue(), v); + } + } + + ChecksumAlgorithm(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ChecksumAlgorithm create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ChecksumAlgorithm: " + key); + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/CreatePrivateEndpointDetails.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/CreatePrivateEndpointDetails.java new file mode 100644 index 00000000000..ed76553691b --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/CreatePrivateEndpointDetails.java @@ -0,0 +1,609 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * Details to create a private endpoint + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreatePrivateEndpointDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreatePrivateEndpointDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "compartmentId", + "subnetId", + "prefix", + "additionalPrefixes", + "privateEndpointIp", + "nsgIds", + "accessTargets", + "freeformTags", + "definedTags" + }) + public CreatePrivateEndpointDetails( + String name, + String compartmentId, + String subnetId, + String prefix, + java.util.List additionalPrefixes, + String privateEndpointIp, + java.util.List nsgIds, + java.util.List accessTargets, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.name = name; + this.compartmentId = compartmentId; + this.subnetId = subnetId; + this.prefix = prefix; + this.additionalPrefixes = additionalPrefixes; + this.privateEndpointIp = privateEndpointIp; + this.nsgIds = nsgIds; + this.accessTargets = accessTargets; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * This name associated with the endpoint. Valid characters are uppercase or lowercase letters, numbers, hyphens, + * underscores, and periods. + * Example: my-new-private-endpoint1 + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * This name associated with the endpoint. Valid characters are uppercase or lowercase letters, numbers, hyphens, + * underscores, and periods. + * Example: my-new-private-endpoint1 + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The ID of the compartment in which to create the Private Endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The ID of the compartment in which to create the Private Endpoint. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The OCID of the customer's subnet where the private endpoint VNIC will reside. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + /** + * The OCID of the customer's subnet where the private endpoint VNIC will reside. + * + * @param subnetId the value to set + * @return this builder + **/ + public Builder subnetId(String subnetId) { + this.subnetId = subnetId; + this.__explicitlySet__.add("subnetId"); + return this; + } + /** + * A prefix to use for the private endpoint. The customer VCN's DNS records are + * updated with this prefix. The prefix input from the customer will be the first sub-domain in the endpointFqdn. + * Example: If the prefix chosen is "abc", then the endpointFqdn will be 'abc.private.objectstorage..oraclecloud.com' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private String prefix; + + /** + * A prefix to use for the private endpoint. The customer VCN's DNS records are + * updated with this prefix. The prefix input from the customer will be the first sub-domain in the endpointFqdn. + * Example: If the prefix chosen is "abc", then the endpointFqdn will be 'abc.private.objectstorage..oraclecloud.com' + * + * @param prefix the value to set + * @return this builder + **/ + public Builder prefix(String prefix) { + this.prefix = prefix; + this.__explicitlySet__.add("prefix"); + return this; + } + /** + * A list of additional prefix that you can provide along with any other prefix. These resulting endpointFqdn's are added to the + * customer VCN's DNS record. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalPrefixes") + private java.util.List additionalPrefixes; + + /** + * A list of additional prefix that you can provide along with any other prefix. These resulting endpointFqdn's are added to the + * customer VCN's DNS record. + * + * @param additionalPrefixes the value to set + * @return this builder + **/ + public Builder additionalPrefixes(java.util.List additionalPrefixes) { + this.additionalPrefixes = additionalPrefixes; + this.__explicitlySet__.add("additionalPrefixes"); + return this; + } + /** + * The private IP address to assign to this private endpoint. If you provide a value, + * it must be an available IP address in the customer's subnet. If it's not available, an error + * is returned. + *

+ * If you do not provide a value, an available IP address in the subnet is automatically chosen. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") + private String privateEndpointIp; + + /** + * The private IP address to assign to this private endpoint. If you provide a value, + * it must be an available IP address in the customer's subnet. If it's not available, an error + * is returned. + *

+ * If you do not provide a value, an available IP address in the subnet is automatically chosen. + * + * @param privateEndpointIp the value to set + * @return this builder + **/ + public Builder privateEndpointIp(String privateEndpointIp) { + this.privateEndpointIp = privateEndpointIp; + this.__explicitlySet__.add("privateEndpointIp"); + return this; + } + /** + * A list of the OCIDs of the network security groups (NSGs) to add the private endpoint's VNIC to. + * For more information about NSGs, see + * {@link NetworkSecurityGroup}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private java.util.List nsgIds; + + /** + * A list of the OCIDs of the network security groups (NSGs) to add the private endpoint's VNIC to. + * For more information about NSGs, see + * {@link NetworkSecurityGroup}. + * + * @param nsgIds the value to set + * @return this builder + **/ + public Builder nsgIds(java.util.List nsgIds) { + this.nsgIds = nsgIds; + this.__explicitlySet__.add("nsgIds"); + return this; + } + /** + * A list of targets that can be accessed by the private endpoint. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("accessTargets") + private java.util.List accessTargets; + + /** + * A list of targets that can be accessed by the private endpoint. + * + * @param accessTargets the value to set + * @return this builder + **/ + public Builder accessTargets(java.util.List accessTargets) { + this.accessTargets = accessTargets; + this.__explicitlySet__.add("accessTargets"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreatePrivateEndpointDetails build() { + CreatePrivateEndpointDetails model = + new CreatePrivateEndpointDetails( + this.name, + this.compartmentId, + this.subnetId, + this.prefix, + this.additionalPrefixes, + this.privateEndpointIp, + this.nsgIds, + this.accessTargets, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreatePrivateEndpointDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + if (model.wasPropertyExplicitlySet("prefix")) { + this.prefix(model.getPrefix()); + } + if (model.wasPropertyExplicitlySet("additionalPrefixes")) { + this.additionalPrefixes(model.getAdditionalPrefixes()); + } + if (model.wasPropertyExplicitlySet("privateEndpointIp")) { + this.privateEndpointIp(model.getPrivateEndpointIp()); + } + if (model.wasPropertyExplicitlySet("nsgIds")) { + this.nsgIds(model.getNsgIds()); + } + if (model.wasPropertyExplicitlySet("accessTargets")) { + this.accessTargets(model.getAccessTargets()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * This name associated with the endpoint. Valid characters are uppercase or lowercase letters, numbers, hyphens, + * underscores, and periods. + * Example: my-new-private-endpoint1 + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * This name associated with the endpoint. Valid characters are uppercase or lowercase letters, numbers, hyphens, + * underscores, and periods. + * Example: my-new-private-endpoint1 + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The ID of the compartment in which to create the Private Endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The ID of the compartment in which to create the Private Endpoint. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The OCID of the customer's subnet where the private endpoint VNIC will reside. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; + + /** + * The OCID of the customer's subnet where the private endpoint VNIC will reside. + * + * @return the value + **/ + public String getSubnetId() { + return subnetId; + } + + /** + * A prefix to use for the private endpoint. The customer VCN's DNS records are + * updated with this prefix. The prefix input from the customer will be the first sub-domain in the endpointFqdn. + * Example: If the prefix chosen is "abc", then the endpointFqdn will be 'abc.private.objectstorage..oraclecloud.com' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private final String prefix; + + /** + * A prefix to use for the private endpoint. The customer VCN's DNS records are + * updated with this prefix. The prefix input from the customer will be the first sub-domain in the endpointFqdn. + * Example: If the prefix chosen is "abc", then the endpointFqdn will be 'abc.private.objectstorage..oraclecloud.com' + * + * @return the value + **/ + public String getPrefix() { + return prefix; + } + + /** + * A list of additional prefix that you can provide along with any other prefix. These resulting endpointFqdn's are added to the + * customer VCN's DNS record. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalPrefixes") + private final java.util.List additionalPrefixes; + + /** + * A list of additional prefix that you can provide along with any other prefix. These resulting endpointFqdn's are added to the + * customer VCN's DNS record. + * + * @return the value + **/ + public java.util.List getAdditionalPrefixes() { + return additionalPrefixes; + } + + /** + * The private IP address to assign to this private endpoint. If you provide a value, + * it must be an available IP address in the customer's subnet. If it's not available, an error + * is returned. + *

+ * If you do not provide a value, an available IP address in the subnet is automatically chosen. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") + private final String privateEndpointIp; + + /** + * The private IP address to assign to this private endpoint. If you provide a value, + * it must be an available IP address in the customer's subnet. If it's not available, an error + * is returned. + *

+ * If you do not provide a value, an available IP address in the subnet is automatically chosen. + * + * @return the value + **/ + public String getPrivateEndpointIp() { + return privateEndpointIp; + } + + /** + * A list of the OCIDs of the network security groups (NSGs) to add the private endpoint's VNIC to. + * For more information about NSGs, see + * {@link NetworkSecurityGroup}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private final java.util.List nsgIds; + + /** + * A list of the OCIDs of the network security groups (NSGs) to add the private endpoint's VNIC to. + * For more information about NSGs, see + * {@link NetworkSecurityGroup}. + * + * @return the value + **/ + public java.util.List getNsgIds() { + return nsgIds; + } + + /** + * A list of targets that can be accessed by the private endpoint. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("accessTargets") + private final java.util.List accessTargets; + + /** + * A list of targets that can be accessed by the private endpoint. + * + * @return the value + **/ + public java.util.List getAccessTargets() { + return accessTargets; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreatePrivateEndpointDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", prefix=").append(String.valueOf(this.prefix)); + sb.append(", additionalPrefixes=").append(String.valueOf(this.additionalPrefixes)); + sb.append(", privateEndpointIp=").append(String.valueOf(this.privateEndpointIp)); + sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); + sb.append(", accessTargets=").append(String.valueOf(this.accessTargets)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreatePrivateEndpointDetails)) { + return false; + } + + CreatePrivateEndpointDetails other = (CreatePrivateEndpointDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals(this.prefix, other.prefix) + && java.util.Objects.equals(this.additionalPrefixes, other.additionalPrefixes) + && java.util.Objects.equals(this.privateEndpointIp, other.privateEndpointIp) + && java.util.Objects.equals(this.nsgIds, other.nsgIds) + && java.util.Objects.equals(this.accessTargets, other.accessTargets) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); + result = (result * PRIME) + (this.prefix == null ? 43 : this.prefix.hashCode()); + result = + (result * PRIME) + + (this.additionalPrefixes == null + ? 43 + : this.additionalPrefixes.hashCode()); + result = + (result * PRIME) + + (this.privateEndpointIp == null ? 43 : this.privateEndpointIp.hashCode()); + result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); + result = + (result * PRIME) + + (this.accessTargets == null ? 43 : this.accessTargets.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/Fqdns.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/Fqdns.java new file mode 100644 index 00000000000..02701672d4a --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/Fqdns.java @@ -0,0 +1,169 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * The object representing FQDN details formed using prefix and additionalPrefixes. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Fqdns.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Fqdns extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"prefixFqdns", "additionalPrefixesFqdns"}) + public Fqdns( + PrefixFqdns prefixFqdns, java.util.Map additionalPrefixesFqdns) { + super(); + this.prefixFqdns = prefixFqdns; + this.additionalPrefixesFqdns = additionalPrefixesFqdns; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("prefixFqdns") + private PrefixFqdns prefixFqdns; + + public Builder prefixFqdns(PrefixFqdns prefixFqdns) { + this.prefixFqdns = prefixFqdns; + this.__explicitlySet__.add("prefixFqdns"); + return this; + } + /** + * An object containing FQDNs formed using additionalPrefixes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalPrefixesFqdns") + private java.util.Map additionalPrefixesFqdns; + + /** + * An object containing FQDNs formed using additionalPrefixes. + * + * @param additionalPrefixesFqdns the value to set + * @return this builder + **/ + public Builder additionalPrefixesFqdns( + java.util.Map additionalPrefixesFqdns) { + this.additionalPrefixesFqdns = additionalPrefixesFqdns; + this.__explicitlySet__.add("additionalPrefixesFqdns"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Fqdns build() { + Fqdns model = new Fqdns(this.prefixFqdns, this.additionalPrefixesFqdns); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Fqdns model) { + if (model.wasPropertyExplicitlySet("prefixFqdns")) { + this.prefixFqdns(model.getPrefixFqdns()); + } + if (model.wasPropertyExplicitlySet("additionalPrefixesFqdns")) { + this.additionalPrefixesFqdns(model.getAdditionalPrefixesFqdns()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @com.fasterxml.jackson.annotation.JsonProperty("prefixFqdns") + private final PrefixFqdns prefixFqdns; + + public PrefixFqdns getPrefixFqdns() { + return prefixFqdns; + } + + /** + * An object containing FQDNs formed using additionalPrefixes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalPrefixesFqdns") + private final java.util.Map additionalPrefixesFqdns; + + /** + * An object containing FQDNs formed using additionalPrefixes. + * + * @return the value + **/ + public java.util.Map getAdditionalPrefixesFqdns() { + return additionalPrefixesFqdns; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Fqdns("); + sb.append("super=").append(super.toString()); + sb.append("prefixFqdns=").append(String.valueOf(this.prefixFqdns)); + sb.append(", additionalPrefixesFqdns=") + .append(String.valueOf(this.additionalPrefixesFqdns)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Fqdns)) { + return false; + } + + Fqdns other = (Fqdns) o; + return java.util.Objects.equals(this.prefixFqdns, other.prefixFqdns) + && java.util.Objects.equals( + this.additionalPrefixesFqdns, other.additionalPrefixesFqdns) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.prefixFqdns == null ? 43 : this.prefixFqdns.hashCode()); + result = + (result * PRIME) + + (this.additionalPrefixesFqdns == null + ? 43 + : this.additionalPrefixesFqdns.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/PrefixFqdns.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/PrefixFqdns.java new file mode 100644 index 00000000000..47dc108d326 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/PrefixFqdns.java @@ -0,0 +1,238 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * An object containing FQDNs + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = PrefixFqdns.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PrefixFqdns extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "objectStorageApiFqdn", + "s3CompatibilityApiFqdn", + "swiftApiFqdn" + }) + public PrefixFqdns( + String objectStorageApiFqdn, String s3CompatibilityApiFqdn, String swiftApiFqdn) { + super(); + this.objectStorageApiFqdn = objectStorageApiFqdn; + this.s3CompatibilityApiFqdn = s3CompatibilityApiFqdn; + this.swiftApiFqdn = swiftApiFqdn; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * ObjectStorage API FQDN + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectStorageApiFqdn") + private String objectStorageApiFqdn; + + /** + * ObjectStorage API FQDN + * + * @param objectStorageApiFqdn the value to set + * @return this builder + **/ + public Builder objectStorageApiFqdn(String objectStorageApiFqdn) { + this.objectStorageApiFqdn = objectStorageApiFqdn; + this.__explicitlySet__.add("objectStorageApiFqdn"); + return this; + } + /** + * S3 Compatibility API FQDN + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("s3CompatibilityApiFqdn") + private String s3CompatibilityApiFqdn; + + /** + * S3 Compatibility API FQDN + * + * @param s3CompatibilityApiFqdn the value to set + * @return this builder + **/ + public Builder s3CompatibilityApiFqdn(String s3CompatibilityApiFqdn) { + this.s3CompatibilityApiFqdn = s3CompatibilityApiFqdn; + this.__explicitlySet__.add("s3CompatibilityApiFqdn"); + return this; + } + /** + * Swift API FQDN + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("swiftApiFqdn") + private String swiftApiFqdn; + + /** + * Swift API FQDN + * + * @param swiftApiFqdn the value to set + * @return this builder + **/ + public Builder swiftApiFqdn(String swiftApiFqdn) { + this.swiftApiFqdn = swiftApiFqdn; + this.__explicitlySet__.add("swiftApiFqdn"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PrefixFqdns build() { + PrefixFqdns model = + new PrefixFqdns( + this.objectStorageApiFqdn, + this.s3CompatibilityApiFqdn, + this.swiftApiFqdn); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PrefixFqdns model) { + if (model.wasPropertyExplicitlySet("objectStorageApiFqdn")) { + this.objectStorageApiFqdn(model.getObjectStorageApiFqdn()); + } + if (model.wasPropertyExplicitlySet("s3CompatibilityApiFqdn")) { + this.s3CompatibilityApiFqdn(model.getS3CompatibilityApiFqdn()); + } + if (model.wasPropertyExplicitlySet("swiftApiFqdn")) { + this.swiftApiFqdn(model.getSwiftApiFqdn()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * ObjectStorage API FQDN + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectStorageApiFqdn") + private final String objectStorageApiFqdn; + + /** + * ObjectStorage API FQDN + * + * @return the value + **/ + public String getObjectStorageApiFqdn() { + return objectStorageApiFqdn; + } + + /** + * S3 Compatibility API FQDN + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("s3CompatibilityApiFqdn") + private final String s3CompatibilityApiFqdn; + + /** + * S3 Compatibility API FQDN + * + * @return the value + **/ + public String getS3CompatibilityApiFqdn() { + return s3CompatibilityApiFqdn; + } + + /** + * Swift API FQDN + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("swiftApiFqdn") + private final String swiftApiFqdn; + + /** + * Swift API FQDN + * + * @return the value + **/ + public String getSwiftApiFqdn() { + return swiftApiFqdn; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PrefixFqdns("); + sb.append("super=").append(super.toString()); + sb.append("objectStorageApiFqdn=").append(String.valueOf(this.objectStorageApiFqdn)); + sb.append(", s3CompatibilityApiFqdn=").append(String.valueOf(this.s3CompatibilityApiFqdn)); + sb.append(", swiftApiFqdn=").append(String.valueOf(this.swiftApiFqdn)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PrefixFqdns)) { + return false; + } + + PrefixFqdns other = (PrefixFqdns) o; + return java.util.Objects.equals(this.objectStorageApiFqdn, other.objectStorageApiFqdn) + && java.util.Objects.equals( + this.s3CompatibilityApiFqdn, other.s3CompatibilityApiFqdn) + && java.util.Objects.equals(this.swiftApiFqdn, other.swiftApiFqdn) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.objectStorageApiFqdn == null + ? 43 + : this.objectStorageApiFqdn.hashCode()); + result = + (result * PRIME) + + (this.s3CompatibilityApiFqdn == null + ? 43 + : this.s3CompatibilityApiFqdn.hashCode()); + result = (result * PRIME) + (this.swiftApiFqdn == null ? 43 : this.swiftApiFqdn.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/PrivateEndpoint.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/PrivateEndpoint.java new file mode 100644 index 00000000000..af01ce8c7c6 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/PrivateEndpoint.java @@ -0,0 +1,971 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * A private endpoint makes your service accessible through a private IP in the customer's private network. A private endpoint has a name and is associated with a namespace and a single compartment. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = PrivateEndpoint.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PrivateEndpoint extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "namespace", + "compartmentId", + "createdBy", + "timeCreated", + "timeModified", + "subnetId", + "privateEndpointIp", + "prefix", + "additionalPrefixes", + "nsgIds", + "fqdns", + "etag", + "lifecycleState", + "accessTargets", + "freeformTags", + "definedTags", + "id" + }) + public PrivateEndpoint( + String name, + String namespace, + String compartmentId, + String createdBy, + java.util.Date timeCreated, + java.util.Date timeModified, + String subnetId, + String privateEndpointIp, + String prefix, + java.util.List additionalPrefixes, + java.util.List nsgIds, + Fqdns fqdns, + String etag, + LifecycleState lifecycleState, + java.util.List accessTargets, + java.util.Map freeformTags, + java.util.Map> definedTags, + String id) { + super(); + this.name = name; + this.namespace = namespace; + this.compartmentId = compartmentId; + this.createdBy = createdBy; + this.timeCreated = timeCreated; + this.timeModified = timeModified; + this.subnetId = subnetId; + this.privateEndpointIp = privateEndpointIp; + this.prefix = prefix; + this.additionalPrefixes = additionalPrefixes; + this.nsgIds = nsgIds; + this.fqdns = fqdns; + this.etag = etag; + this.lifecycleState = lifecycleState; + this.accessTargets = accessTargets; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.id = id; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * This name associated with the endpoint. Valid characters are uppercase or lowercase letters, numbers, hyphens, + * underscores, and periods. + * Example: my-new-private-endpoint1 + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * This name associated with the endpoint. Valid characters are uppercase or lowercase letters, numbers, hyphens, + * underscores, and periods. + * Example: my-new-private-endpoint1 + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The Object Storage namespace associated with the private enpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespace") + private String namespace; + + /** + * The Object Storage namespace associated with the private enpoint. + * @param namespace the value to set + * @return this builder + **/ + public Builder namespace(String namespace) { + this.namespace = namespace; + this.__explicitlySet__.add("namespace"); + return this; + } + /** + * The compartment which is associated with the Private Endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The compartment which is associated with the Private Endpoint. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the user who created the Private Endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private String createdBy; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the user who created the Private Endpoint. + * @param createdBy the value to set + * @return this builder + **/ + public Builder createdBy(String createdBy) { + this.createdBy = createdBy; + this.__explicitlySet__.add("createdBy"); + return this; + } + /** + * The date and time the Private Endpoint was created, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.29). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the Private Endpoint was created, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.29). + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the Private Endpoint was updated, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.29). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeModified") + private java.util.Date timeModified; + + /** + * The date and time the Private Endpoint was updated, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.29). + * @param timeModified the value to set + * @return this builder + **/ + public Builder timeModified(java.util.Date timeModified) { + this.timeModified = timeModified; + this.__explicitlySet__.add("timeModified"); + return this; + } + /** + * The OCID of the customer's subnet where the private endpoint VNIC will reside. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + /** + * The OCID of the customer's subnet where the private endpoint VNIC will reside. + * + * @param subnetId the value to set + * @return this builder + **/ + public Builder subnetId(String subnetId) { + this.subnetId = subnetId; + this.__explicitlySet__.add("subnetId"); + return this; + } + /** + * The private IP address to assign to this private endpoint. If you provide a value, + * it must be an available IP address in the customer's subnet. If it's not available, an error + * is returned. + *

+ * If you do not provide a value, an available IP address in the subnet is automatically chosen. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") + private String privateEndpointIp; + + /** + * The private IP address to assign to this private endpoint. If you provide a value, + * it must be an available IP address in the customer's subnet. If it's not available, an error + * is returned. + *

+ * If you do not provide a value, an available IP address in the subnet is automatically chosen. + * + * @param privateEndpointIp the value to set + * @return this builder + **/ + public Builder privateEndpointIp(String privateEndpointIp) { + this.privateEndpointIp = privateEndpointIp; + this.__explicitlySet__.add("privateEndpointIp"); + return this; + } + /** + * A prefix to use for the private endpoint. The customer VCN's DNS records are + * updated with this prefix. The prefix input from the customer will be the first sub-domain in the endpointFqdn. + * Example: If the prefix chosen is "abc", then the endpointFqdn will be 'abc.private.objectstorage..oraclecloud.com' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private String prefix; + + /** + * A prefix to use for the private endpoint. The customer VCN's DNS records are + * updated with this prefix. The prefix input from the customer will be the first sub-domain in the endpointFqdn. + * Example: If the prefix chosen is "abc", then the endpointFqdn will be 'abc.private.objectstorage..oraclecloud.com' + * + * @param prefix the value to set + * @return this builder + **/ + public Builder prefix(String prefix) { + this.prefix = prefix; + this.__explicitlySet__.add("prefix"); + return this; + } + /** + * A list of additional prefix that you can provide along with any other prefix. These resulting endpointFqdn's are added to the + * customer VCN's DNS record. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalPrefixes") + private java.util.List additionalPrefixes; + + /** + * A list of additional prefix that you can provide along with any other prefix. These resulting endpointFqdn's are added to the + * customer VCN's DNS record. + * + * @param additionalPrefixes the value to set + * @return this builder + **/ + public Builder additionalPrefixes(java.util.List additionalPrefixes) { + this.additionalPrefixes = additionalPrefixes; + this.__explicitlySet__.add("additionalPrefixes"); + return this; + } + /** + * A list of the OCIDs of the network security groups (NSGs) to add the private endpoint's VNIC to. + * For more information about NSGs, see + * {@link NetworkSecurityGroup}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private java.util.List nsgIds; + + /** + * A list of the OCIDs of the network security groups (NSGs) to add the private endpoint's VNIC to. + * For more information about NSGs, see + * {@link NetworkSecurityGroup}. + * + * @param nsgIds the value to set + * @return this builder + **/ + public Builder nsgIds(java.util.List nsgIds) { + this.nsgIds = nsgIds; + this.__explicitlySet__.add("nsgIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("fqdns") + private Fqdns fqdns; + + public Builder fqdns(Fqdns fqdns) { + this.fqdns = fqdns; + this.__explicitlySet__.add("fqdns"); + return this; + } + /** + * The entity tag (ETag) for the Private Endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("etag") + private String etag; + + /** + * The entity tag (ETag) for the Private Endpoint. + * @param etag the value to set + * @return this builder + **/ + public Builder etag(String etag) { + this.etag = etag; + this.__explicitlySet__.add("etag"); + return this; + } + /** + * The Private Endpoint's lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The Private Endpoint's lifecycle state. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A list of targets that can be accessed by the private endpoint. At least one or more access targets is required for a private endpoint. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("accessTargets") + private java.util.List accessTargets; + + /** + * A list of targets that can be accessed by the private endpoint. At least one or more access targets is required for a private endpoint. + * + * @param accessTargets the value to set + * @return this builder + **/ + public Builder accessTargets(java.util.List accessTargets) { + this.accessTargets = accessTargets; + this.__explicitlySet__.add("accessTargets"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the PrivateEndpoint. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the PrivateEndpoint. + * + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PrivateEndpoint build() { + PrivateEndpoint model = + new PrivateEndpoint( + this.name, + this.namespace, + this.compartmentId, + this.createdBy, + this.timeCreated, + this.timeModified, + this.subnetId, + this.privateEndpointIp, + this.prefix, + this.additionalPrefixes, + this.nsgIds, + this.fqdns, + this.etag, + this.lifecycleState, + this.accessTargets, + this.freeformTags, + this.definedTags, + this.id); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PrivateEndpoint model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("namespace")) { + this.namespace(model.getNamespace()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("createdBy")) { + this.createdBy(model.getCreatedBy()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeModified")) { + this.timeModified(model.getTimeModified()); + } + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + if (model.wasPropertyExplicitlySet("privateEndpointIp")) { + this.privateEndpointIp(model.getPrivateEndpointIp()); + } + if (model.wasPropertyExplicitlySet("prefix")) { + this.prefix(model.getPrefix()); + } + if (model.wasPropertyExplicitlySet("additionalPrefixes")) { + this.additionalPrefixes(model.getAdditionalPrefixes()); + } + if (model.wasPropertyExplicitlySet("nsgIds")) { + this.nsgIds(model.getNsgIds()); + } + if (model.wasPropertyExplicitlySet("fqdns")) { + this.fqdns(model.getFqdns()); + } + if (model.wasPropertyExplicitlySet("etag")) { + this.etag(model.getEtag()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("accessTargets")) { + this.accessTargets(model.getAccessTargets()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * This name associated with the endpoint. Valid characters are uppercase or lowercase letters, numbers, hyphens, + * underscores, and periods. + * Example: my-new-private-endpoint1 + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * This name associated with the endpoint. Valid characters are uppercase or lowercase letters, numbers, hyphens, + * underscores, and periods. + * Example: my-new-private-endpoint1 + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The Object Storage namespace associated with the private enpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespace") + private final String namespace; + + /** + * The Object Storage namespace associated with the private enpoint. + * @return the value + **/ + public String getNamespace() { + return namespace; + } + + /** + * The compartment which is associated with the Private Endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The compartment which is associated with the Private Endpoint. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the user who created the Private Endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private final String createdBy; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the user who created the Private Endpoint. + * @return the value + **/ + public String getCreatedBy() { + return createdBy; + } + + /** + * The date and time the Private Endpoint was created, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.29). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the Private Endpoint was created, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.29). + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the Private Endpoint was updated, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.29). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeModified") + private final java.util.Date timeModified; + + /** + * The date and time the Private Endpoint was updated, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.29). + * @return the value + **/ + public java.util.Date getTimeModified() { + return timeModified; + } + + /** + * The OCID of the customer's subnet where the private endpoint VNIC will reside. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; + + /** + * The OCID of the customer's subnet where the private endpoint VNIC will reside. + * + * @return the value + **/ + public String getSubnetId() { + return subnetId; + } + + /** + * The private IP address to assign to this private endpoint. If you provide a value, + * it must be an available IP address in the customer's subnet. If it's not available, an error + * is returned. + *

+ * If you do not provide a value, an available IP address in the subnet is automatically chosen. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") + private final String privateEndpointIp; + + /** + * The private IP address to assign to this private endpoint. If you provide a value, + * it must be an available IP address in the customer's subnet. If it's not available, an error + * is returned. + *

+ * If you do not provide a value, an available IP address in the subnet is automatically chosen. + * + * @return the value + **/ + public String getPrivateEndpointIp() { + return privateEndpointIp; + } + + /** + * A prefix to use for the private endpoint. The customer VCN's DNS records are + * updated with this prefix. The prefix input from the customer will be the first sub-domain in the endpointFqdn. + * Example: If the prefix chosen is "abc", then the endpointFqdn will be 'abc.private.objectstorage..oraclecloud.com' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private final String prefix; + + /** + * A prefix to use for the private endpoint. The customer VCN's DNS records are + * updated with this prefix. The prefix input from the customer will be the first sub-domain in the endpointFqdn. + * Example: If the prefix chosen is "abc", then the endpointFqdn will be 'abc.private.objectstorage..oraclecloud.com' + * + * @return the value + **/ + public String getPrefix() { + return prefix; + } + + /** + * A list of additional prefix that you can provide along with any other prefix. These resulting endpointFqdn's are added to the + * customer VCN's DNS record. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("additionalPrefixes") + private final java.util.List additionalPrefixes; + + /** + * A list of additional prefix that you can provide along with any other prefix. These resulting endpointFqdn's are added to the + * customer VCN's DNS record. + * + * @return the value + **/ + public java.util.List getAdditionalPrefixes() { + return additionalPrefixes; + } + + /** + * A list of the OCIDs of the network security groups (NSGs) to add the private endpoint's VNIC to. + * For more information about NSGs, see + * {@link NetworkSecurityGroup}. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private final java.util.List nsgIds; + + /** + * A list of the OCIDs of the network security groups (NSGs) to add the private endpoint's VNIC to. + * For more information about NSGs, see + * {@link NetworkSecurityGroup}. + * + * @return the value + **/ + public java.util.List getNsgIds() { + return nsgIds; + } + + @com.fasterxml.jackson.annotation.JsonProperty("fqdns") + private final Fqdns fqdns; + + public Fqdns getFqdns() { + return fqdns; + } + + /** + * The entity tag (ETag) for the Private Endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("etag") + private final String etag; + + /** + * The entity tag (ETag) for the Private Endpoint. + * @return the value + **/ + public String getEtag() { + return etag; + } + + /** + * The Private Endpoint's lifecycle state. + **/ + public enum LifecycleState { + Creating("CREATING"), + Active("ACTIVE"), + Inactive("INACTIVE"), + Updating("UPDATING"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The Private Endpoint's lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The Private Endpoint's lifecycle state. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A list of targets that can be accessed by the private endpoint. At least one or more access targets is required for a private endpoint. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("accessTargets") + private final java.util.List accessTargets; + + /** + * A list of targets that can be accessed by the private endpoint. At least one or more access targets is required for a private endpoint. + * + * @return the value + **/ + public java.util.List getAccessTargets() { + return accessTargets; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the PrivateEndpoint. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the PrivateEndpoint. + * + * @return the value + **/ + public String getId() { + return id; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PrivateEndpoint("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", namespace=").append(String.valueOf(this.namespace)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", createdBy=").append(String.valueOf(this.createdBy)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeModified=").append(String.valueOf(this.timeModified)); + sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", privateEndpointIp=").append(String.valueOf(this.privateEndpointIp)); + sb.append(", prefix=").append(String.valueOf(this.prefix)); + sb.append(", additionalPrefixes=").append(String.valueOf(this.additionalPrefixes)); + sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); + sb.append(", fqdns=").append(String.valueOf(this.fqdns)); + sb.append(", etag=").append(String.valueOf(this.etag)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", accessTargets=").append(String.valueOf(this.accessTargets)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PrivateEndpoint)) { + return false; + } + + PrivateEndpoint other = (PrivateEndpoint) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.namespace, other.namespace) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.createdBy, other.createdBy) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeModified, other.timeModified) + && java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals(this.privateEndpointIp, other.privateEndpointIp) + && java.util.Objects.equals(this.prefix, other.prefix) + && java.util.Objects.equals(this.additionalPrefixes, other.additionalPrefixes) + && java.util.Objects.equals(this.nsgIds, other.nsgIds) + && java.util.Objects.equals(this.fqdns, other.fqdns) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.accessTargets, other.accessTargets) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.id, other.id) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.namespace == null ? 43 : this.namespace.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.createdBy == null ? 43 : this.createdBy.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeModified == null ? 43 : this.timeModified.hashCode()); + result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); + result = + (result * PRIME) + + (this.privateEndpointIp == null ? 43 : this.privateEndpointIp.hashCode()); + result = (result * PRIME) + (this.prefix == null ? 43 : this.prefix.hashCode()); + result = + (result * PRIME) + + (this.additionalPrefixes == null + ? 43 + : this.additionalPrefixes.hashCode()); + result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); + result = (result * PRIME) + (this.fqdns == null ? 43 : this.fqdns.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.accessTargets == null ? 43 : this.accessTargets.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/PrivateEndpointSummary.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/PrivateEndpointSummary.java new file mode 100644 index 00000000000..03ba38c0b42 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/PrivateEndpointSummary.java @@ -0,0 +1,514 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, + * talk to an administrator. If you are an administrator who needs to write policies to give users access, see + * [Getting Started with Policies](https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm). + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PrivateEndpointSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PrivateEndpointSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "namespace", + "compartmentId", + "createdBy", + "timeCreated", + "timeModified", + "prefix", + "fqdns", + "etag", + "lifecycleState" + }) + public PrivateEndpointSummary( + String name, + String namespace, + String compartmentId, + String createdBy, + java.util.Date timeCreated, + java.util.Date timeModified, + String prefix, + Fqdns fqdns, + String etag, + PrivateEndpoint.LifecycleState lifecycleState) { + super(); + this.name = name; + this.namespace = namespace; + this.compartmentId = compartmentId; + this.createdBy = createdBy; + this.timeCreated = timeCreated; + this.timeModified = timeModified; + this.prefix = prefix; + this.fqdns = fqdns; + this.etag = etag; + this.lifecycleState = lifecycleState; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name given to the Private Endpoint. Avoid entering confidential information. + * Example: my-new-pe1 + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name given to the Private Endpoint. Avoid entering confidential information. + * Example: my-new-pe1 + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The Object Storage namespace with which the Private Endpoint is associated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespace") + private String namespace; + + /** + * The Object Storage namespace with which the Private Endpoint is associated. + * @param namespace the value to set + * @return this builder + **/ + public Builder namespace(String namespace) { + this.namespace = namespace; + this.__explicitlySet__.add("namespace"); + return this; + } + /** + * The compartment ID in which the Private Endpoint is authorized. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The compartment ID in which the Private Endpoint is authorized. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the user who created the Private Endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private String createdBy; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the user who created the Private Endpoint. + * @param createdBy the value to set + * @return this builder + **/ + public Builder createdBy(String createdBy) { + this.createdBy = createdBy; + this.__explicitlySet__.add("createdBy"); + return this; + } + /** + * The date and time the Private Endpoint was created, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.29). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the Private Endpoint was created, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.29). + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time the Private Endpoint was updated, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.29). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeModified") + private java.util.Date timeModified; + + /** + * The date and time the Private Endpoint was updated, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.29). + * @param timeModified the value to set + * @return this builder + **/ + public Builder timeModified(java.util.Date timeModified) { + this.timeModified = timeModified; + this.__explicitlySet__.add("timeModified"); + return this; + } + /** + * A prefix to use for the private endpoint. The customer VCN's DNS records are + * updated with this prefix. The prefix input from the customer will be the first sub-domain in the endpointFqdn. + * Example: If the prefix chosen is "abc", then the endpointFqdn will be 'abc.private.objectstorage..oraclecloud.com' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private String prefix; + + /** + * A prefix to use for the private endpoint. The customer VCN's DNS records are + * updated with this prefix. The prefix input from the customer will be the first sub-domain in the endpointFqdn. + * Example: If the prefix chosen is "abc", then the endpointFqdn will be 'abc.private.objectstorage..oraclecloud.com' + * + * @param prefix the value to set + * @return this builder + **/ + public Builder prefix(String prefix) { + this.prefix = prefix; + this.__explicitlySet__.add("prefix"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("fqdns") + private Fqdns fqdns; + + public Builder fqdns(Fqdns fqdns) { + this.fqdns = fqdns; + this.__explicitlySet__.add("fqdns"); + return this; + } + /** + * The entity tag for the Private Endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("etag") + private String etag; + + /** + * The entity tag for the Private Endpoint. + * @param etag the value to set + * @return this builder + **/ + public Builder etag(String etag) { + this.etag = etag; + this.__explicitlySet__.add("etag"); + return this; + } + /** + * The summaries of Private Endpoints' lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private PrivateEndpoint.LifecycleState lifecycleState; + + /** + * The summaries of Private Endpoints' lifecycle state. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(PrivateEndpoint.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PrivateEndpointSummary build() { + PrivateEndpointSummary model = + new PrivateEndpointSummary( + this.name, + this.namespace, + this.compartmentId, + this.createdBy, + this.timeCreated, + this.timeModified, + this.prefix, + this.fqdns, + this.etag, + this.lifecycleState); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PrivateEndpointSummary model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("namespace")) { + this.namespace(model.getNamespace()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("createdBy")) { + this.createdBy(model.getCreatedBy()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeModified")) { + this.timeModified(model.getTimeModified()); + } + if (model.wasPropertyExplicitlySet("prefix")) { + this.prefix(model.getPrefix()); + } + if (model.wasPropertyExplicitlySet("fqdns")) { + this.fqdns(model.getFqdns()); + } + if (model.wasPropertyExplicitlySet("etag")) { + this.etag(model.getEtag()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name given to the Private Endpoint. Avoid entering confidential information. + * Example: my-new-pe1 + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name given to the Private Endpoint. Avoid entering confidential information. + * Example: my-new-pe1 + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The Object Storage namespace with which the Private Endpoint is associated. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespace") + private final String namespace; + + /** + * The Object Storage namespace with which the Private Endpoint is associated. + * @return the value + **/ + public String getNamespace() { + return namespace; + } + + /** + * The compartment ID in which the Private Endpoint is authorized. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The compartment ID in which the Private Endpoint is authorized. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the user who created the Private Endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private final String createdBy; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the user who created the Private Endpoint. + * @return the value + **/ + public String getCreatedBy() { + return createdBy; + } + + /** + * The date and time the Private Endpoint was created, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.29). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the Private Endpoint was created, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.29). + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time the Private Endpoint was updated, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.29). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeModified") + private final java.util.Date timeModified; + + /** + * The date and time the Private Endpoint was updated, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.29). + * @return the value + **/ + public java.util.Date getTimeModified() { + return timeModified; + } + + /** + * A prefix to use for the private endpoint. The customer VCN's DNS records are + * updated with this prefix. The prefix input from the customer will be the first sub-domain in the endpointFqdn. + * Example: If the prefix chosen is "abc", then the endpointFqdn will be 'abc.private.objectstorage..oraclecloud.com' + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("prefix") + private final String prefix; + + /** + * A prefix to use for the private endpoint. The customer VCN's DNS records are + * updated with this prefix. The prefix input from the customer will be the first sub-domain in the endpointFqdn. + * Example: If the prefix chosen is "abc", then the endpointFqdn will be 'abc.private.objectstorage..oraclecloud.com' + * + * @return the value + **/ + public String getPrefix() { + return prefix; + } + + @com.fasterxml.jackson.annotation.JsonProperty("fqdns") + private final Fqdns fqdns; + + public Fqdns getFqdns() { + return fqdns; + } + + /** + * The entity tag for the Private Endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("etag") + private final String etag; + + /** + * The entity tag for the Private Endpoint. + * @return the value + **/ + public String getEtag() { + return etag; + } + + /** + * The summaries of Private Endpoints' lifecycle state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final PrivateEndpoint.LifecycleState lifecycleState; + + /** + * The summaries of Private Endpoints' lifecycle state. + * @return the value + **/ + public PrivateEndpoint.LifecycleState getLifecycleState() { + return lifecycleState; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PrivateEndpointSummary("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", namespace=").append(String.valueOf(this.namespace)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", createdBy=").append(String.valueOf(this.createdBy)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeModified=").append(String.valueOf(this.timeModified)); + sb.append(", prefix=").append(String.valueOf(this.prefix)); + sb.append(", fqdns=").append(String.valueOf(this.fqdns)); + sb.append(", etag=").append(String.valueOf(this.etag)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PrivateEndpointSummary)) { + return false; + } + + PrivateEndpointSummary other = (PrivateEndpointSummary) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.namespace, other.namespace) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.createdBy, other.createdBy) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeModified, other.timeModified) + && java.util.Objects.equals(this.prefix, other.prefix) + && java.util.Objects.equals(this.fqdns, other.fqdns) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.namespace == null ? 43 : this.namespace.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.createdBy == null ? 43 : this.createdBy.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeModified == null ? 43 : this.timeModified.hashCode()); + result = (result * PRIME) + (this.prefix == null ? 43 : this.prefix.hashCode()); + result = (result * PRIME) + (this.fqdns == null ? 43 : this.fqdns.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/UpdatePrivateEndpointDetails.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/UpdatePrivateEndpointDetails.java new file mode 100644 index 00000000000..42a0761b84d --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/UpdatePrivateEndpointDetails.java @@ -0,0 +1,345 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * Information that can be updated for a private endpoint. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdatePrivateEndpointDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdatePrivateEndpointDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "namespace", + "accessTargets", + "freeformTags", + "definedTags" + }) + public UpdatePrivateEndpointDetails( + String name, + String namespace, + java.util.List accessTargets, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.name = name; + this.namespace = namespace; + this.accessTargets = accessTargets; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * This name associated with the endpoint. Valid characters are uppercase or lowercase letters, numbers, hyphens, + * underscores, and periods. + * Example: my-new-private-endpoint1 + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * This name associated with the endpoint. Valid characters are uppercase or lowercase letters, numbers, hyphens, + * underscores, and periods. + * Example: my-new-private-endpoint1 + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The Object Storage namespace which will associated with the private endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespace") + private String namespace; + + /** + * The Object Storage namespace which will associated with the private endpoint. + * @param namespace the value to set + * @return this builder + **/ + public Builder namespace(String namespace) { + this.namespace = namespace; + this.__explicitlySet__.add("namespace"); + return this; + } + /** + * A list of targets that can be accessed by the private endpoint. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("accessTargets") + private java.util.List accessTargets; + + /** + * A list of targets that can be accessed by the private endpoint. + * + * @param accessTargets the value to set + * @return this builder + **/ + public Builder accessTargets(java.util.List accessTargets) { + this.accessTargets = accessTargets; + this.__explicitlySet__.add("accessTargets"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdatePrivateEndpointDetails build() { + UpdatePrivateEndpointDetails model = + new UpdatePrivateEndpointDetails( + this.name, + this.namespace, + this.accessTargets, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdatePrivateEndpointDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("namespace")) { + this.namespace(model.getNamespace()); + } + if (model.wasPropertyExplicitlySet("accessTargets")) { + this.accessTargets(model.getAccessTargets()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * This name associated with the endpoint. Valid characters are uppercase or lowercase letters, numbers, hyphens, + * underscores, and periods. + * Example: my-new-private-endpoint1 + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * This name associated with the endpoint. Valid characters are uppercase or lowercase letters, numbers, hyphens, + * underscores, and periods. + * Example: my-new-private-endpoint1 + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The Object Storage namespace which will associated with the private endpoint. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("namespace") + private final String namespace; + + /** + * The Object Storage namespace which will associated with the private endpoint. + * @return the value + **/ + public String getNamespace() { + return namespace; + } + + /** + * A list of targets that can be accessed by the private endpoint. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("accessTargets") + private final java.util.List accessTargets; + + /** + * A list of targets that can be accessed by the private endpoint. + * + * @return the value + **/ + public java.util.List getAccessTargets() { + return accessTargets; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdatePrivateEndpointDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", namespace=").append(String.valueOf(this.namespace)); + sb.append(", accessTargets=").append(String.valueOf(this.accessTargets)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePrivateEndpointDetails)) { + return false; + } + + UpdatePrivateEndpointDetails other = (UpdatePrivateEndpointDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.namespace, other.namespace) + && java.util.Objects.equals(this.accessTargets, other.accessTargets) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.namespace == null ? 43 : this.namespace.hashCode()); + result = + (result * PRIME) + + (this.accessTargets == null ? 43 : this.accessTargets.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequest.java index 57eb3590336..c43b9549cf5 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequest.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequest.java @@ -287,6 +287,9 @@ public Builder toBuilder() { public enum OperationType { CopyObject("COPY_OBJECT"), Reencrypt("REENCRYPT"), + PrivateEndpointCreate("PRIVATE_ENDPOINT_CREATE"), + PrivateEndpointUpdate("PRIVATE_ENDPOINT_UPDATE"), + PrivateEndpointDelete("PRIVATE_ENDPOINT_DELETE"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestResourceMetadataKey.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestResourceMetadataKey.java index 18d26aca029..9673176ccce 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestResourceMetadataKey.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestResourceMetadataKey.java @@ -13,6 +13,7 @@ public enum WorkRequestResourceMetadataKey { Namespace("NAMESPACE"), Bucket("BUCKET"), Object("OBJECT"), + PrivateEndpointName("PRIVATE_ENDPOINT_NAME"), ; private final String value; diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestSummary.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestSummary.java index 8cf53e2ac36..361319db5aa 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestSummary.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestSummary.java @@ -289,6 +289,9 @@ public Builder toBuilder() { public enum OperationType { CopyObject("COPY_OBJECT"), Reencrypt("REENCRYPT"), + PrivateEndpointCreate("PRIVATE_ENDPOINT_CREATE"), + PrivateEndpointUpdate("PRIVATE_ENDPOINT_UPDATE"), + PrivateEndpointDelete("PRIVATE_ENDPOINT_DELETE"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CreateMultipartUploadRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CreateMultipartUploadRequest.java index 322f8588140..227d8772a1b 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CreateMultipartUploadRequest.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CreateMultipartUploadRequest.java @@ -159,6 +159,21 @@ public String getOpcSseCustomerKeySha256() { public String getOpcSseKmsKeyId() { return opcSseKmsKeyId; } + /** + * The optional checksum algorithm to use to compute and store the checksum of the body of the HTTP request (or the parts in case of multipart uploads), + * in addition to the default MD5 checksum. + * + */ + private com.oracle.bmc.objectstorage.model.ChecksumAlgorithm opcChecksumAlgorithm; + + /** + * The optional checksum algorithm to use to compute and store the checksum of the body of the HTTP request (or the parts in case of multipart uploads), + * in addition to the default MD5 checksum. + * + */ + public com.oracle.bmc.objectstorage.model.ChecksumAlgorithm getOpcChecksumAlgorithm() { + return opcChecksumAlgorithm; + } /** * Alternative accessor for the body parameter. @@ -365,6 +380,26 @@ public Builder opcSseKmsKeyId(String opcSseKmsKeyId) { return this; } + /** + * The optional checksum algorithm to use to compute and store the checksum of the body of the HTTP request (or the parts in case of multipart uploads), + * in addition to the default MD5 checksum. + * + */ + private com.oracle.bmc.objectstorage.model.ChecksumAlgorithm opcChecksumAlgorithm = null; + + /** + * The optional checksum algorithm to use to compute and store the checksum of the body of the HTTP request (or the parts in case of multipart uploads), + * in addition to the default MD5 checksum. + * + * @param opcChecksumAlgorithm the value to set + * @return this builder instance + */ + public Builder opcChecksumAlgorithm( + com.oracle.bmc.objectstorage.model.ChecksumAlgorithm opcChecksumAlgorithm) { + this.opcChecksumAlgorithm = opcChecksumAlgorithm; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -403,6 +438,7 @@ public Builder copy(CreateMultipartUploadRequest o) { opcSseCustomerKey(o.getOpcSseCustomerKey()); opcSseCustomerKeySha256(o.getOpcSseCustomerKeySha256()); opcSseKmsKeyId(o.getOpcSseKmsKeyId()); + opcChecksumAlgorithm(o.getOpcChecksumAlgorithm()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -456,8 +492,9 @@ public CreateMultipartUploadRequest buildWithoutInvocationCallback() { request.opcSseCustomerKey = opcSseCustomerKey; request.opcSseCustomerKeySha256 = opcSseCustomerKeySha256; request.opcSseKmsKeyId = opcSseKmsKeyId; + request.opcChecksumAlgorithm = opcChecksumAlgorithm; return request; - // new CreateMultipartUploadRequest(namespaceName, bucketName, createMultipartUploadDetails, ifMatch, ifNoneMatch, opcClientRequestId, opcSseCustomerAlgorithm, opcSseCustomerKey, opcSseCustomerKeySha256, opcSseKmsKeyId); + // new CreateMultipartUploadRequest(namespaceName, bucketName, createMultipartUploadDetails, ifMatch, ifNoneMatch, opcClientRequestId, opcSseCustomerAlgorithm, opcSseCustomerKey, opcSseCustomerKeySha256, opcSseKmsKeyId, opcChecksumAlgorithm); } } @@ -476,7 +513,8 @@ public Builder toBuilder() { .opcSseCustomerAlgorithm(opcSseCustomerAlgorithm) .opcSseCustomerKey(opcSseCustomerKey) .opcSseCustomerKeySha256(opcSseCustomerKeySha256) - .opcSseKmsKeyId(opcSseKmsKeyId); + .opcSseKmsKeyId(opcSseKmsKeyId) + .opcChecksumAlgorithm(opcChecksumAlgorithm); } /** @@ -503,6 +541,7 @@ public String toString() { sb.append(",opcSseCustomerKey=").append(String.valueOf(this.opcSseCustomerKey)); sb.append(",opcSseCustomerKeySha256=").append(String.valueOf(this.opcSseCustomerKeySha256)); sb.append(",opcSseKmsKeyId=").append(String.valueOf(this.opcSseKmsKeyId)); + sb.append(",opcChecksumAlgorithm=").append(String.valueOf(this.opcChecksumAlgorithm)); sb.append(")"); return sb.toString(); } @@ -530,7 +569,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.opcSseCustomerKey, other.opcSseCustomerKey) && java.util.Objects.equals( this.opcSseCustomerKeySha256, other.opcSseCustomerKeySha256) - && java.util.Objects.equals(this.opcSseKmsKeyId, other.opcSseKmsKeyId); + && java.util.Objects.equals(this.opcSseKmsKeyId, other.opcSseKmsKeyId) + && java.util.Objects.equals(this.opcChecksumAlgorithm, other.opcChecksumAlgorithm); } @Override @@ -569,6 +609,11 @@ public int hashCode() { result = (result * PRIME) + (this.opcSseKmsKeyId == null ? 43 : this.opcSseKmsKeyId.hashCode()); + result = + (result * PRIME) + + (this.opcChecksumAlgorithm == null + ? 43 + : this.opcChecksumAlgorithm.hashCode()); return result; } } diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CreatePrivateEndpointRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CreatePrivateEndpointRequest.java new file mode 100644 index 00000000000..b4288bccaaf --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CreatePrivateEndpointRequest.java @@ -0,0 +1,268 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.requests; + +import com.oracle.bmc.objectstorage.model.*; +/** + * Example: Click here to see how to use CreatePrivateEndpointRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreatePrivateEndpointRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.objectstorage.model.CreatePrivateEndpointDetails> { + + /** + * The Object Storage namespace used for the request. + */ + private String namespaceName; + + /** + * The Object Storage namespace used for the request. + */ + public String getNamespaceName() { + return namespaceName; + } + /** + * Details to create a private endpoint. + */ + private com.oracle.bmc.objectstorage.model.CreatePrivateEndpointDetails + createPrivateEndpointDetails; + + /** + * Details to create a private endpoint. + */ + public com.oracle.bmc.objectstorage.model.CreatePrivateEndpointDetails + getCreatePrivateEndpointDetails() { + return createPrivateEndpointDetails; + } + /** + * The client request ID for tracing. + */ + private String opcClientRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcClientRequestId() { + return opcClientRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.objectstorage.model.CreatePrivateEndpointDetails getBody$() { + return createPrivateEndpointDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreatePrivateEndpointRequest, + com.oracle.bmc.objectstorage.model.CreatePrivateEndpointDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Object Storage namespace used for the request. + */ + private String namespaceName = null; + + /** + * The Object Storage namespace used for the request. + * @param namespaceName the value to set + * @return this builder instance + */ + public Builder namespaceName(String namespaceName) { + this.namespaceName = namespaceName; + return this; + } + + /** + * Details to create a private endpoint. + */ + private com.oracle.bmc.objectstorage.model.CreatePrivateEndpointDetails + createPrivateEndpointDetails = null; + + /** + * Details to create a private endpoint. + * @param createPrivateEndpointDetails the value to set + * @return this builder instance + */ + public Builder createPrivateEndpointDetails( + com.oracle.bmc.objectstorage.model.CreatePrivateEndpointDetails + createPrivateEndpointDetails) { + this.createPrivateEndpointDetails = createPrivateEndpointDetails; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcClientRequestId = null; + + /** + * The client request ID for tracing. + * @param opcClientRequestId the value to set + * @return this builder instance + */ + public Builder opcClientRequestId(String opcClientRequestId) { + this.opcClientRequestId = opcClientRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreatePrivateEndpointRequest o) { + namespaceName(o.getNamespaceName()); + createPrivateEndpointDetails(o.getCreatePrivateEndpointDetails()); + opcClientRequestId(o.getOpcClientRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreatePrivateEndpointRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreatePrivateEndpointRequest + */ + public CreatePrivateEndpointRequest build() { + CreatePrivateEndpointRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.objectstorage.model.CreatePrivateEndpointDetails body) { + createPrivateEndpointDetails(body); + return this; + } + + /** + * Build the instance of CreatePrivateEndpointRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreatePrivateEndpointRequest + */ + public CreatePrivateEndpointRequest buildWithoutInvocationCallback() { + CreatePrivateEndpointRequest request = new CreatePrivateEndpointRequest(); + request.namespaceName = namespaceName; + request.createPrivateEndpointDetails = createPrivateEndpointDetails; + request.opcClientRequestId = opcClientRequestId; + return request; + // new CreatePrivateEndpointRequest(namespaceName, createPrivateEndpointDetails, opcClientRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .namespaceName(namespaceName) + .createPrivateEndpointDetails(createPrivateEndpointDetails) + .opcClientRequestId(opcClientRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",namespaceName=").append(String.valueOf(this.namespaceName)); + sb.append(",createPrivateEndpointDetails=") + .append(String.valueOf(this.createPrivateEndpointDetails)); + sb.append(",opcClientRequestId=").append(String.valueOf(this.opcClientRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreatePrivateEndpointRequest)) { + return false; + } + + CreatePrivateEndpointRequest other = (CreatePrivateEndpointRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.namespaceName, other.namespaceName) + && java.util.Objects.equals( + this.createPrivateEndpointDetails, other.createPrivateEndpointDetails) + && java.util.Objects.equals(this.opcClientRequestId, other.opcClientRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.namespaceName == null ? 43 : this.namespaceName.hashCode()); + result = + (result * PRIME) + + (this.createPrivateEndpointDetails == null + ? 43 + : this.createPrivateEndpointDetails.hashCode()); + result = + (result * PRIME) + + (this.opcClientRequestId == null + ? 43 + : this.opcClientRequestId.hashCode()); + return result; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/DeletePrivateEndpointRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/DeletePrivateEndpointRequest.java new file mode 100644 index 00000000000..3189c582635 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/DeletePrivateEndpointRequest.java @@ -0,0 +1,286 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.requests; + +import com.oracle.bmc.objectstorage.model.*; +/** + * Example: Click here to see how to use DeletePrivateEndpointRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeletePrivateEndpointRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Object Storage namespace used for the request. + */ + private String namespaceName; + + /** + * The Object Storage namespace used for the request. + */ + public String getNamespaceName() { + return namespaceName; + } + /** + * The name of the private endpoint. Avoid entering confidential information. + * Example: {@code my-new-pe-1} + * + */ + private String peName; + + /** + * The name of the private endpoint. Avoid entering confidential information. + * Example: {@code my-new-pe-1} + * + */ + public String getPeName() { + return peName; + } + /** + * The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + * the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + * the resource. + * + */ + private String ifMatch; + + /** + * The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + * the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + * the resource. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcClientRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcClientRequestId() { + return opcClientRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeletePrivateEndpointRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Object Storage namespace used for the request. + */ + private String namespaceName = null; + + /** + * The Object Storage namespace used for the request. + * @param namespaceName the value to set + * @return this builder instance + */ + public Builder namespaceName(String namespaceName) { + this.namespaceName = namespaceName; + return this; + } + + /** + * The name of the private endpoint. Avoid entering confidential information. + * Example: {@code my-new-pe-1} + * + */ + private String peName = null; + + /** + * The name of the private endpoint. Avoid entering confidential information. + * Example: {@code my-new-pe-1} + * + * @param peName the value to set + * @return this builder instance + */ + public Builder peName(String peName) { + this.peName = peName; + return this; + } + + /** + * The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + * the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + * the resource. + * + */ + private String ifMatch = null; + + /** + * The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + * the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + * the resource. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcClientRequestId = null; + + /** + * The client request ID for tracing. + * @param opcClientRequestId the value to set + * @return this builder instance + */ + public Builder opcClientRequestId(String opcClientRequestId) { + this.opcClientRequestId = opcClientRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeletePrivateEndpointRequest o) { + namespaceName(o.getNamespaceName()); + peName(o.getPeName()); + ifMatch(o.getIfMatch()); + opcClientRequestId(o.getOpcClientRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeletePrivateEndpointRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeletePrivateEndpointRequest + */ + public DeletePrivateEndpointRequest build() { + DeletePrivateEndpointRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeletePrivateEndpointRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeletePrivateEndpointRequest + */ + public DeletePrivateEndpointRequest buildWithoutInvocationCallback() { + DeletePrivateEndpointRequest request = new DeletePrivateEndpointRequest(); + request.namespaceName = namespaceName; + request.peName = peName; + request.ifMatch = ifMatch; + request.opcClientRequestId = opcClientRequestId; + return request; + // new DeletePrivateEndpointRequest(namespaceName, peName, ifMatch, opcClientRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .namespaceName(namespaceName) + .peName(peName) + .ifMatch(ifMatch) + .opcClientRequestId(opcClientRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",namespaceName=").append(String.valueOf(this.namespaceName)); + sb.append(",peName=").append(String.valueOf(this.peName)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcClientRequestId=").append(String.valueOf(this.opcClientRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeletePrivateEndpointRequest)) { + return false; + } + + DeletePrivateEndpointRequest other = (DeletePrivateEndpointRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.namespaceName, other.namespaceName) + && java.util.Objects.equals(this.peName, other.peName) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcClientRequestId, other.opcClientRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.namespaceName == null ? 43 : this.namespaceName.hashCode()); + result = (result * PRIME) + (this.peName == null ? 43 : this.peName.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcClientRequestId == null + ? 43 + : this.opcClientRequestId.hashCode()); + return result; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/GetPrivateEndpointRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/GetPrivateEndpointRequest.java new file mode 100644 index 00000000000..b1dff5e8276 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/GetPrivateEndpointRequest.java @@ -0,0 +1,329 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.requests; + +import com.oracle.bmc.objectstorage.model.*; +/** + * Example: Click here to see how to use GetPrivateEndpointRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetPrivateEndpointRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Object Storage namespace used for the request. + */ + private String namespaceName; + + /** + * The Object Storage namespace used for the request. + */ + public String getNamespaceName() { + return namespaceName; + } + /** + * The name of the private endpoint. Avoid entering confidential information. + * Example: {@code my-new-pe-1} + * + */ + private String peName; + + /** + * The name of the private endpoint. Avoid entering confidential information. + * Example: {@code my-new-pe-1} + * + */ + public String getPeName() { + return peName; + } + /** + * The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + * the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + * the resource. + * + */ + private String ifMatch; + + /** + * The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + * the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + * the resource. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The entity tag (ETag) to avoid matching. Wildcards ('*') are not allowed. If the specified ETag does not + * match the ETag of the existing resource, the request returns the expected response. If the ETag matches + * the ETag of the existing resource, the request returns an HTTP 304 status without a response body. + * + */ + private String ifNoneMatch; + + /** + * The entity tag (ETag) to avoid matching. Wildcards ('*') are not allowed. If the specified ETag does not + * match the ETag of the existing resource, the request returns the expected response. If the ETag matches + * the ETag of the existing resource, the request returns an HTTP 304 status without a response body. + * + */ + public String getIfNoneMatch() { + return ifNoneMatch; + } + /** + * The client request ID for tracing. + */ + private String opcClientRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcClientRequestId() { + return opcClientRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetPrivateEndpointRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Object Storage namespace used for the request. + */ + private String namespaceName = null; + + /** + * The Object Storage namespace used for the request. + * @param namespaceName the value to set + * @return this builder instance + */ + public Builder namespaceName(String namespaceName) { + this.namespaceName = namespaceName; + return this; + } + + /** + * The name of the private endpoint. Avoid entering confidential information. + * Example: {@code my-new-pe-1} + * + */ + private String peName = null; + + /** + * The name of the private endpoint. Avoid entering confidential information. + * Example: {@code my-new-pe-1} + * + * @param peName the value to set + * @return this builder instance + */ + public Builder peName(String peName) { + this.peName = peName; + return this; + } + + /** + * The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + * the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + * the resource. + * + */ + private String ifMatch = null; + + /** + * The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + * the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + * the resource. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The entity tag (ETag) to avoid matching. Wildcards ('*') are not allowed. If the specified ETag does not + * match the ETag of the existing resource, the request returns the expected response. If the ETag matches + * the ETag of the existing resource, the request returns an HTTP 304 status without a response body. + * + */ + private String ifNoneMatch = null; + + /** + * The entity tag (ETag) to avoid matching. Wildcards ('*') are not allowed. If the specified ETag does not + * match the ETag of the existing resource, the request returns the expected response. If the ETag matches + * the ETag of the existing resource, the request returns an HTTP 304 status without a response body. + * + * @param ifNoneMatch the value to set + * @return this builder instance + */ + public Builder ifNoneMatch(String ifNoneMatch) { + this.ifNoneMatch = ifNoneMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcClientRequestId = null; + + /** + * The client request ID for tracing. + * @param opcClientRequestId the value to set + * @return this builder instance + */ + public Builder opcClientRequestId(String opcClientRequestId) { + this.opcClientRequestId = opcClientRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetPrivateEndpointRequest o) { + namespaceName(o.getNamespaceName()); + peName(o.getPeName()); + ifMatch(o.getIfMatch()); + ifNoneMatch(o.getIfNoneMatch()); + opcClientRequestId(o.getOpcClientRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetPrivateEndpointRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetPrivateEndpointRequest + */ + public GetPrivateEndpointRequest build() { + GetPrivateEndpointRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetPrivateEndpointRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetPrivateEndpointRequest + */ + public GetPrivateEndpointRequest buildWithoutInvocationCallback() { + GetPrivateEndpointRequest request = new GetPrivateEndpointRequest(); + request.namespaceName = namespaceName; + request.peName = peName; + request.ifMatch = ifMatch; + request.ifNoneMatch = ifNoneMatch; + request.opcClientRequestId = opcClientRequestId; + return request; + // new GetPrivateEndpointRequest(namespaceName, peName, ifMatch, ifNoneMatch, opcClientRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .namespaceName(namespaceName) + .peName(peName) + .ifMatch(ifMatch) + .ifNoneMatch(ifNoneMatch) + .opcClientRequestId(opcClientRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",namespaceName=").append(String.valueOf(this.namespaceName)); + sb.append(",peName=").append(String.valueOf(this.peName)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",ifNoneMatch=").append(String.valueOf(this.ifNoneMatch)); + sb.append(",opcClientRequestId=").append(String.valueOf(this.opcClientRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetPrivateEndpointRequest)) { + return false; + } + + GetPrivateEndpointRequest other = (GetPrivateEndpointRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.namespaceName, other.namespaceName) + && java.util.Objects.equals(this.peName, other.peName) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.ifNoneMatch, other.ifNoneMatch) + && java.util.Objects.equals(this.opcClientRequestId, other.opcClientRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.namespaceName == null ? 43 : this.namespaceName.hashCode()); + result = (result * PRIME) + (this.peName == null ? 43 : this.peName.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.ifNoneMatch == null ? 43 : this.ifNoneMatch.hashCode()); + result = + (result * PRIME) + + (this.opcClientRequestId == null + ? 43 + : this.opcClientRequestId.hashCode()); + return result; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListObjectVersionsRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListObjectVersionsRequest.java index 9b7fdc68003..450ed9f187b 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListObjectVersionsRequest.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListObjectVersionsRequest.java @@ -49,23 +49,23 @@ public String getPrefix() { return prefix; } /** - * Object names returned by a list query must be greater or equal to this parameter. + * Returns object names which are lexicographically greater than or equal to this parameter. */ private String start; /** - * Object names returned by a list query must be greater or equal to this parameter. + * Returns object names which are lexicographically greater than or equal to this parameter. */ public String getStart() { return start; } /** - * Object names returned by a list query must be strictly less than this parameter. + * Returns object names which are lexicographically strictly less than this parameter. */ private String end; /** - * Object names returned by a list query must be strictly less than this parameter. + * Returns object names which are lexicographically strictly less than this parameter. */ public String getEnd() { return end; @@ -141,12 +141,12 @@ public String getOpcClientRequestId() { return opcClientRequestId; } /** - * Object names returned by a list query must be greater than this parameter. + * Returns object names which are lexicographically strictly greater than this parameter. */ private String startAfter; /** - * Object names returned by a list query must be greater than this parameter. + * Returns object names which are lexicographically strictly greater than this parameter. */ public String getStartAfter() { return startAfter; @@ -224,12 +224,12 @@ public Builder prefix(String prefix) { } /** - * Object names returned by a list query must be greater or equal to this parameter. + * Returns object names which are lexicographically greater than or equal to this parameter. */ private String start = null; /** - * Object names returned by a list query must be greater or equal to this parameter. + * Returns object names which are lexicographically greater than or equal to this parameter. * @param start the value to set * @return this builder instance */ @@ -239,12 +239,12 @@ public Builder start(String start) { } /** - * Object names returned by a list query must be strictly less than this parameter. + * Returns object names which are lexicographically strictly less than this parameter. */ private String end = null; /** - * Object names returned by a list query must be strictly less than this parameter. + * Returns object names which are lexicographically strictly less than this parameter. * @param end the value to set * @return this builder instance */ @@ -340,12 +340,12 @@ public Builder opcClientRequestId(String opcClientRequestId) { } /** - * Object names returned by a list query must be greater than this parameter. + * Returns object names which are lexicographically strictly greater than this parameter. */ private String startAfter = null; /** - * Object names returned by a list query must be greater than this parameter. + * Returns object names which are lexicographically strictly greater than this parameter. * @param startAfter the value to set * @return this builder instance */ diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListObjectsRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListObjectsRequest.java index 8f1c98ef54f..bd172dd911c 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListObjectsRequest.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListObjectsRequest.java @@ -49,23 +49,23 @@ public String getPrefix() { return prefix; } /** - * Object names returned by a list query must be greater or equal to this parameter. + * Returns object names which are lexicographically greater than or equal to this parameter. */ private String start; /** - * Object names returned by a list query must be greater or equal to this parameter. + * Returns object names which are lexicographically greater than or equal to this parameter. */ public String getStart() { return start; } /** - * Object names returned by a list query must be strictly less than this parameter. + * Returns object names which are lexicographically strictly less than this parameter. */ private String end; /** - * Object names returned by a list query must be strictly less than this parameter. + * Returns object names which are lexicographically strictly less than this parameter. */ public String getEnd() { return end; @@ -141,12 +141,12 @@ public String getOpcClientRequestId() { return opcClientRequestId; } /** - * Object names returned by a list query must be greater than this parameter. + * Returns object names which are lexicographically strictly greater than this parameter. */ private String startAfter; /** - * Object names returned by a list query must be greater than this parameter. + * Returns object names which are lexicographically strictly greater than this parameter. */ public String getStartAfter() { return startAfter; @@ -209,12 +209,12 @@ public Builder prefix(String prefix) { } /** - * Object names returned by a list query must be greater or equal to this parameter. + * Returns object names which are lexicographically greater than or equal to this parameter. */ private String start = null; /** - * Object names returned by a list query must be greater or equal to this parameter. + * Returns object names which are lexicographically greater than or equal to this parameter. * @param start the value to set * @return this builder instance */ @@ -224,12 +224,12 @@ public Builder start(String start) { } /** - * Object names returned by a list query must be strictly less than this parameter. + * Returns object names which are lexicographically strictly less than this parameter. */ private String end = null; /** - * Object names returned by a list query must be strictly less than this parameter. + * Returns object names which are lexicographically strictly less than this parameter. * @param end the value to set * @return this builder instance */ @@ -325,12 +325,12 @@ public Builder opcClientRequestId(String opcClientRequestId) { } /** - * Object names returned by a list query must be greater than this parameter. + * Returns object names which are lexicographically strictly greater than this parameter. */ private String startAfter = null; /** - * Object names returned by a list query must be greater than this parameter. + * Returns object names which are lexicographically strictly greater than this parameter. * @param startAfter the value to set * @return this builder instance */ diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListPrivateEndpointsRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListPrivateEndpointsRequest.java new file mode 100644 index 00000000000..b50014dcd50 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListPrivateEndpointsRequest.java @@ -0,0 +1,456 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.requests; + +import com.oracle.bmc.objectstorage.model.*; +/** + * Example: Click here to see how to use ListPrivateEndpointsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListPrivateEndpointsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The Object Storage namespace used for the request. + */ + private String namespaceName; + + /** + * The Object Storage namespace used for the request. + */ + public String getNamespaceName() { + return namespaceName; + } + /** + * The ID of the compartment in which to list buckets. + */ + private String compartmentId; + + /** + * The ID of the compartment in which to list buckets. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a paginated + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a paginated + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public Integer getLimit() { + return limit; + } + /** + * For list pagination. The value of the {@code opc-next-page} response header from the previous "List" call. For important + * details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * For list pagination. The value of the {@code opc-next-page} response header from the previous "List" call. For important + * details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * PrivateEndpoint summary in list of PrivateEndpoints includes the 'namespace', 'name', 'compartmentId', + * 'createdBy', 'timeCreated', 'timeModified' and 'etag' fields. + * This parameter can also include 'tags' (freeformTags and definedTags). + * The only supported value of this parameter is 'tags' for now. Example 'tags'. + * + */ + private java.util.List fields; + + /** + * PrivateEndpoint summary in list of PrivateEndpoints includes the 'namespace', 'name', 'compartmentId', + * 'createdBy', 'timeCreated', 'timeModified' and 'etag' fields. + * This parameter can also include 'tags' (freeformTags and definedTags). + * The only supported value of this parameter is 'tags' for now. Example 'tags'. + * + **/ + public enum Fields { + Tags("tags"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Fields v : Fields.values()) { + map.put(v.getValue(), v); + } + } + + Fields(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Fields create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Fields: " + key); + } + }; + + /** + * PrivateEndpoint summary in list of PrivateEndpoints includes the 'namespace', 'name', 'compartmentId', + * 'createdBy', 'timeCreated', 'timeModified' and 'etag' fields. + * This parameter can also include 'tags' (freeformTags and definedTags). + * The only supported value of this parameter is 'tags' for now. Example 'tags'. + * + */ + public java.util.List getFields() { + return fields; + } + /** + * The client request ID for tracing. + */ + private String opcClientRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcClientRequestId() { + return opcClientRequestId; + } + /** + * The lifecycle state of the Private Endpoint + */ + private com.oracle.bmc.objectstorage.model.PrivateEndpoint.LifecycleState lifecycleState; + + /** + * The lifecycle state of the Private Endpoint + */ + public com.oracle.bmc.objectstorage.model.PrivateEndpoint.LifecycleState getLifecycleState() { + return lifecycleState; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListPrivateEndpointsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Object Storage namespace used for the request. + */ + private String namespaceName = null; + + /** + * The Object Storage namespace used for the request. + * @param namespaceName the value to set + * @return this builder instance + */ + public Builder namespaceName(String namespaceName) { + this.namespaceName = namespaceName; + return this; + } + + /** + * The ID of the compartment in which to list buckets. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which to list buckets. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a paginated + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a paginated + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * For list pagination. The value of the {@code opc-next-page} response header from the previous "List" call. For important + * details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page = null; + + /** + * For list pagination. The value of the {@code opc-next-page} response header from the previous "List" call. For important + * details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * PrivateEndpoint summary in list of PrivateEndpoints includes the 'namespace', 'name', 'compartmentId', + * 'createdBy', 'timeCreated', 'timeModified' and 'etag' fields. + * This parameter can also include 'tags' (freeformTags and definedTags). + * The only supported value of this parameter is 'tags' for now. Example 'tags'. + * + */ + private java.util.List fields = null; + + /** + * PrivateEndpoint summary in list of PrivateEndpoints includes the 'namespace', 'name', 'compartmentId', + * 'createdBy', 'timeCreated', 'timeModified' and 'etag' fields. + * This parameter can also include 'tags' (freeformTags and definedTags). + * The only supported value of this parameter is 'tags' for now. Example 'tags'. + * + * @param fields the value to set + * @return this builder instance + */ + public Builder fields(java.util.List fields) { + this.fields = fields; + return this; + } + + /** + * Singular setter. PrivateEndpoint summary in list of PrivateEndpoints includes the 'namespace', 'name', 'compartmentId', + * 'createdBy', 'timeCreated', 'timeModified' and 'etag' fields. + * This parameter can also include 'tags' (freeformTags and definedTags). + * The only supported value of this parameter is 'tags' for now. Example 'tags'. + * + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder fields(Fields singularValue) { + return this.fields(java.util.Arrays.asList(singularValue)); + } + + /** + * The client request ID for tracing. + */ + private String opcClientRequestId = null; + + /** + * The client request ID for tracing. + * @param opcClientRequestId the value to set + * @return this builder instance + */ + public Builder opcClientRequestId(String opcClientRequestId) { + this.opcClientRequestId = opcClientRequestId; + return this; + } + + /** + * The lifecycle state of the Private Endpoint + */ + private com.oracle.bmc.objectstorage.model.PrivateEndpoint.LifecycleState lifecycleState = + null; + + /** + * The lifecycle state of the Private Endpoint + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.objectstorage.model.PrivateEndpoint.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPrivateEndpointsRequest o) { + namespaceName(o.getNamespaceName()); + compartmentId(o.getCompartmentId()); + limit(o.getLimit()); + page(o.getPage()); + fields(o.getFields()); + opcClientRequestId(o.getOpcClientRequestId()); + lifecycleState(o.getLifecycleState()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListPrivateEndpointsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListPrivateEndpointsRequest + */ + public ListPrivateEndpointsRequest build() { + ListPrivateEndpointsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListPrivateEndpointsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListPrivateEndpointsRequest + */ + public ListPrivateEndpointsRequest buildWithoutInvocationCallback() { + ListPrivateEndpointsRequest request = new ListPrivateEndpointsRequest(); + request.namespaceName = namespaceName; + request.compartmentId = compartmentId; + request.limit = limit; + request.page = page; + request.fields = fields; + request.opcClientRequestId = opcClientRequestId; + request.lifecycleState = lifecycleState; + return request; + // new ListPrivateEndpointsRequest(namespaceName, compartmentId, limit, page, fields, opcClientRequestId, lifecycleState); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .namespaceName(namespaceName) + .compartmentId(compartmentId) + .limit(limit) + .page(page) + .fields(fields) + .opcClientRequestId(opcClientRequestId) + .lifecycleState(lifecycleState); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",namespaceName=").append(String.valueOf(this.namespaceName)); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",fields=").append(String.valueOf(this.fields)); + sb.append(",opcClientRequestId=").append(String.valueOf(this.opcClientRequestId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPrivateEndpointsRequest)) { + return false; + } + + ListPrivateEndpointsRequest other = (ListPrivateEndpointsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.namespaceName, other.namespaceName) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.fields, other.fields) + && java.util.Objects.equals(this.opcClientRequestId, other.opcClientRequestId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.namespaceName == null ? 43 : this.namespaceName.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.fields == null ? 43 : this.fields.hashCode()); + result = + (result * PRIME) + + (this.opcClientRequestId == null + ? 43 + : this.opcClientRequestId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + return result; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListWorkRequestsRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListWorkRequestsRequest.java index 212ded5d1f9..24cb78a40f1 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListWorkRequestsRequest.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListWorkRequestsRequest.java @@ -22,6 +22,17 @@ public class ListWorkRequestsRequest extends com.oracle.bmc.requests.BmcRequest< public String getCompartmentId() { return compartmentId; } + /** + * The name of the privateEndpoint for which to list work requests. + */ + private String privateEndpointName; + + /** + * The name of the privateEndpoint for which to list work requests. + */ + public String getPrivateEndpointName() { + return privateEndpointName; + } /** * The client request ID for tracing. */ @@ -88,6 +99,21 @@ public Builder compartmentId(String compartmentId) { return this; } + /** + * The name of the privateEndpoint for which to list work requests. + */ + private String privateEndpointName = null; + + /** + * The name of the privateEndpoint for which to list work requests. + * @param privateEndpointName the value to set + * @return this builder instance + */ + public Builder privateEndpointName(String privateEndpointName) { + this.privateEndpointName = privateEndpointName; + return this; + } + /** * The client request ID for tracing. */ @@ -172,6 +198,7 @@ public Builder retryConfiguration( */ public Builder copy(ListWorkRequestsRequest o) { compartmentId(o.getCompartmentId()); + privateEndpointName(o.getPrivateEndpointName()); opcClientRequestId(o.getOpcClientRequestId()); page(o.getPage()); limit(o.getLimit()); @@ -208,11 +235,12 @@ public ListWorkRequestsRequest build() { public ListWorkRequestsRequest buildWithoutInvocationCallback() { ListWorkRequestsRequest request = new ListWorkRequestsRequest(); request.compartmentId = compartmentId; + request.privateEndpointName = privateEndpointName; request.opcClientRequestId = opcClientRequestId; request.page = page; request.limit = limit; return request; - // new ListWorkRequestsRequest(compartmentId, opcClientRequestId, page, limit); + // new ListWorkRequestsRequest(compartmentId, privateEndpointName, opcClientRequestId, page, limit); } } @@ -223,6 +251,7 @@ public ListWorkRequestsRequest buildWithoutInvocationCallback() { public Builder toBuilder() { return new Builder() .compartmentId(compartmentId) + .privateEndpointName(privateEndpointName) .opcClientRequestId(opcClientRequestId) .page(page) .limit(limit); @@ -242,6 +271,7 @@ public String toString() { sb.append("("); sb.append("super=").append(super.toString()); sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",privateEndpointName=").append(String.valueOf(this.privateEndpointName)); sb.append(",opcClientRequestId=").append(String.valueOf(this.opcClientRequestId)); sb.append(",page=").append(String.valueOf(this.page)); sb.append(",limit=").append(String.valueOf(this.limit)); @@ -261,6 +291,7 @@ public boolean equals(Object o) { ListWorkRequestsRequest other = (ListWorkRequestsRequest) o; return super.equals(o) && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.privateEndpointName, other.privateEndpointName) && java.util.Objects.equals(this.opcClientRequestId, other.opcClientRequestId) && java.util.Objects.equals(this.page, other.page) && java.util.Objects.equals(this.limit, other.limit); @@ -273,6 +304,11 @@ public int hashCode() { result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.privateEndpointName == null + ? 43 + : this.privateEndpointName.hashCode()); result = (result * PRIME) + (this.opcClientRequestId == null diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectRequest.java index f8d349057fe..8a68098c5a1 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectRequest.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectRequest.java @@ -136,7 +136,7 @@ public String getExpect() { return expect; } /** - * The optional base-64 header that defines the encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object + * The optional header that defines the base64-encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object * Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the * MD5 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error * is returned with the message: @@ -147,7 +147,7 @@ public String getExpect() { private String contentMD5; /** - * The optional base-64 header that defines the encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object + * The optional header that defines the base64-encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object * Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the * MD5 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error * is returned with the message: @@ -158,6 +158,102 @@ public String getExpect() { public String getContentMD5() { return contentMD5; } + /** + * The optional checksum algorithm to use to compute and store the checksum of the body of the HTTP request (or the parts in case of multipart uploads), + * in addition to the default MD5 checksum. + * + */ + private com.oracle.bmc.objectstorage.model.ChecksumAlgorithm opcChecksumAlgorithm; + + /** + * The optional checksum algorithm to use to compute and store the checksum of the body of the HTTP request (or the parts in case of multipart uploads), + * in addition to the default MD5 checksum. + * + */ + public com.oracle.bmc.objectstorage.model.ChecksumAlgorithm getOpcChecksumAlgorithm() { + return opcChecksumAlgorithm; + } + /** + * Applicable only if CRC32C is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the body. If the optional opc-content-crc32c header + * is present, Object Storage performs an integrity check on the body of the HTTP request by computing the CRC32C checksum for the body and comparing + * it to the CRC32C checksum supplied in the header. If the two checksums do not match, the object is rejected and an HTTP-400 Unmatched Content CRC32C error + * is returned with the message: + *

+ * "The computed CRC32C of the request body (ACTUAL_CRC32C) does not match the opc-content-crc32c header (HEADER_CRC32C)" + * + */ + private String opcContentCrc32c; + + /** + * Applicable only if CRC32C is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the body. If the optional opc-content-crc32c header + * is present, Object Storage performs an integrity check on the body of the HTTP request by computing the CRC32C checksum for the body and comparing + * it to the CRC32C checksum supplied in the header. If the two checksums do not match, the object is rejected and an HTTP-400 Unmatched Content CRC32C error + * is returned with the message: + *

+ * "The computed CRC32C of the request body (ACTUAL_CRC32C) does not match the opc-content-crc32c header (HEADER_CRC32C)" + * + */ + public String getOpcContentCrc32c() { + return opcContentCrc32c; + } + /** + * Applicable only if SHA256 is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded SHA256 hash of the body. If the optional opc-content-sha256 header is present, Object + * Storage performs an integrity check on the body of the HTTP request by computing the SHA256 hash for the body and comparing it to the + * SHA256 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content SHA256 error + * is returned with the message: + *

+ * "The computed SHA256 of the request body (ACTUAL_SHA256) does not match the opc-content-sha256 header (HEADER_SHA256)" + * + */ + private String opcContentSha256; + + /** + * Applicable only if SHA256 is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded SHA256 hash of the body. If the optional opc-content-sha256 header is present, Object + * Storage performs an integrity check on the body of the HTTP request by computing the SHA256 hash for the body and comparing it to the + * SHA256 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content SHA256 error + * is returned with the message: + *

+ * "The computed SHA256 of the request body (ACTUAL_SHA256) does not match the opc-content-sha256 header (HEADER_SHA256)" + * + */ + public String getOpcContentSha256() { + return opcContentSha256; + } + /** + * Applicable only if SHA384 is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded SHA384 hash of the body. If the optional opc-content-sha384 header is present, Object + * Storage performs an integrity check on the body of the HTTP request by computing the SHA384 hash for the body and comparing it to the + * SHA384 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content SHA384 error + * is returned with the message: + *

+ * "The computed SHA384 of the request body (ACTUAL_SHA384) does not match the opc-content-sha384 header (HEADER_SHA384)" + * + */ + private String opcContentSha384; + + /** + * Applicable only if SHA384 is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded SHA384 hash of the body. If the optional opc-content-sha384 header is present, Object + * Storage performs an integrity check on the body of the HTTP request by computing the SHA384 hash for the body and comparing it to the + * SHA384 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content SHA384 error + * is returned with the message: + *

+ * "The computed SHA384 of the request body (ACTUAL_SHA384) does not match the opc-content-sha384 header (HEADER_SHA384)" + * + */ + public String getOpcContentSha384() { + return opcContentSha384; + } /** * The optional Content-Type header that defines the standard MIME type format of the object. Content type defaults to * 'application/octet-stream' if not specified in the PutObject call. Specifying values for this header has no effect @@ -528,7 +624,7 @@ public Builder expect(String expect) { } /** - * The optional base-64 header that defines the encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object + * The optional header that defines the base64-encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object * Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the * MD5 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error * is returned with the message: @@ -539,7 +635,7 @@ public Builder expect(String expect) { private String contentMD5 = null; /** - * The optional base-64 header that defines the encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object + * The optional header that defines the base64-encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object * Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the * MD5 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error * is returned with the message: @@ -554,6 +650,119 @@ public Builder contentMD5(String contentMD5) { return this; } + /** + * The optional checksum algorithm to use to compute and store the checksum of the body of the HTTP request (or the parts in case of multipart uploads), + * in addition to the default MD5 checksum. + * + */ + private com.oracle.bmc.objectstorage.model.ChecksumAlgorithm opcChecksumAlgorithm = null; + + /** + * The optional checksum algorithm to use to compute and store the checksum of the body of the HTTP request (or the parts in case of multipart uploads), + * in addition to the default MD5 checksum. + * + * @param opcChecksumAlgorithm the value to set + * @return this builder instance + */ + public Builder opcChecksumAlgorithm( + com.oracle.bmc.objectstorage.model.ChecksumAlgorithm opcChecksumAlgorithm) { + this.opcChecksumAlgorithm = opcChecksumAlgorithm; + return this; + } + + /** + * Applicable only if CRC32C is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the body. If the optional opc-content-crc32c header + * is present, Object Storage performs an integrity check on the body of the HTTP request by computing the CRC32C checksum for the body and comparing + * it to the CRC32C checksum supplied in the header. If the two checksums do not match, the object is rejected and an HTTP-400 Unmatched Content CRC32C error + * is returned with the message: + *

+ * "The computed CRC32C of the request body (ACTUAL_CRC32C) does not match the opc-content-crc32c header (HEADER_CRC32C)" + * + */ + private String opcContentCrc32c = null; + + /** + * Applicable only if CRC32C is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the body. If the optional opc-content-crc32c header + * is present, Object Storage performs an integrity check on the body of the HTTP request by computing the CRC32C checksum for the body and comparing + * it to the CRC32C checksum supplied in the header. If the two checksums do not match, the object is rejected and an HTTP-400 Unmatched Content CRC32C error + * is returned with the message: + *

+ * "The computed CRC32C of the request body (ACTUAL_CRC32C) does not match the opc-content-crc32c header (HEADER_CRC32C)" + * + * @param opcContentCrc32c the value to set + * @return this builder instance + */ + public Builder opcContentCrc32c(String opcContentCrc32c) { + this.opcContentCrc32c = opcContentCrc32c; + return this; + } + + /** + * Applicable only if SHA256 is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded SHA256 hash of the body. If the optional opc-content-sha256 header is present, Object + * Storage performs an integrity check on the body of the HTTP request by computing the SHA256 hash for the body and comparing it to the + * SHA256 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content SHA256 error + * is returned with the message: + *

+ * "The computed SHA256 of the request body (ACTUAL_SHA256) does not match the opc-content-sha256 header (HEADER_SHA256)" + * + */ + private String opcContentSha256 = null; + + /** + * Applicable only if SHA256 is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded SHA256 hash of the body. If the optional opc-content-sha256 header is present, Object + * Storage performs an integrity check on the body of the HTTP request by computing the SHA256 hash for the body and comparing it to the + * SHA256 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content SHA256 error + * is returned with the message: + *

+ * "The computed SHA256 of the request body (ACTUAL_SHA256) does not match the opc-content-sha256 header (HEADER_SHA256)" + * + * @param opcContentSha256 the value to set + * @return this builder instance + */ + public Builder opcContentSha256(String opcContentSha256) { + this.opcContentSha256 = opcContentSha256; + return this; + } + + /** + * Applicable only if SHA384 is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded SHA384 hash of the body. If the optional opc-content-sha384 header is present, Object + * Storage performs an integrity check on the body of the HTTP request by computing the SHA384 hash for the body and comparing it to the + * SHA384 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content SHA384 error + * is returned with the message: + *

+ * "The computed SHA384 of the request body (ACTUAL_SHA384) does not match the opc-content-sha384 header (HEADER_SHA384)" + * + */ + private String opcContentSha384 = null; + + /** + * Applicable only if SHA384 is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded SHA384 hash of the body. If the optional opc-content-sha384 header is present, Object + * Storage performs an integrity check on the body of the HTTP request by computing the SHA384 hash for the body and comparing it to the + * SHA384 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content SHA384 error + * is returned with the message: + *

+ * "The computed SHA384 of the request body (ACTUAL_SHA384) does not match the opc-content-sha384 header (HEADER_SHA384)" + * + * @param opcContentSha384 the value to set + * @return this builder instance + */ + public Builder opcContentSha384(String opcContentSha384) { + this.opcContentSha384 = opcContentSha384; + return this; + } + /** * The optional Content-Type header that defines the standard MIME type format of the object. Content type defaults to * 'application/octet-stream' if not specified in the PutObject call. Specifying values for this header has no effect @@ -823,6 +1032,10 @@ public Builder copy(PutObjectRequest o) { opcClientRequestId(o.getOpcClientRequestId()); expect(o.getExpect()); contentMD5(o.getContentMD5()); + opcChecksumAlgorithm(o.getOpcChecksumAlgorithm()); + opcContentCrc32c(o.getOpcContentCrc32c()); + opcContentSha256(o.getOpcContentSha256()); + opcContentSha384(o.getOpcContentSha384()); contentType(o.getContentType()); contentLanguage(o.getContentLanguage()); contentEncoding(o.getContentEncoding()); @@ -887,6 +1100,10 @@ public PutObjectRequest buildWithoutInvocationCallback() { request.opcClientRequestId = opcClientRequestId; request.expect = expect; request.contentMD5 = contentMD5; + request.opcChecksumAlgorithm = opcChecksumAlgorithm; + request.opcContentCrc32c = opcContentCrc32c; + request.opcContentSha256 = opcContentSha256; + request.opcContentSha384 = opcContentSha384; request.contentType = contentType; request.contentLanguage = contentLanguage; request.contentEncoding = contentEncoding; @@ -899,7 +1116,7 @@ public PutObjectRequest buildWithoutInvocationCallback() { request.storageTier = storageTier; request.opcMeta = opcMeta; return request; - // new PutObjectRequest(namespaceName, bucketName, objectName, contentLength, putObjectBody, ifMatch, ifNoneMatch, opcClientRequestId, expect, contentMD5, contentType, contentLanguage, contentEncoding, contentDisposition, cacheControl, opcSseCustomerAlgorithm, opcSseCustomerKey, opcSseCustomerKeySha256, opcSseKmsKeyId, storageTier, opcMeta); + // new PutObjectRequest(namespaceName, bucketName, objectName, contentLength, putObjectBody, ifMatch, ifNoneMatch, opcClientRequestId, expect, contentMD5, opcChecksumAlgorithm, opcContentCrc32c, opcContentSha256, opcContentSha384, contentType, contentLanguage, contentEncoding, contentDisposition, cacheControl, opcSseCustomerAlgorithm, opcSseCustomerKey, opcSseCustomerKeySha256, opcSseKmsKeyId, storageTier, opcMeta); } } @@ -919,6 +1136,10 @@ public Builder toBuilder() { .opcClientRequestId(opcClientRequestId) .expect(expect) .contentMD5(contentMD5) + .opcChecksumAlgorithm(opcChecksumAlgorithm) + .opcContentCrc32c(opcContentCrc32c) + .opcContentSha256(opcContentSha256) + .opcContentSha384(opcContentSha384) .contentType(contentType) .contentLanguage(contentLanguage) .contentEncoding(contentEncoding) @@ -955,6 +1176,10 @@ public String toString() { sb.append(",opcClientRequestId=").append(String.valueOf(this.opcClientRequestId)); sb.append(",expect=").append(String.valueOf(this.expect)); sb.append(",contentMD5=").append(String.valueOf(this.contentMD5)); + sb.append(",opcChecksumAlgorithm=").append(String.valueOf(this.opcChecksumAlgorithm)); + sb.append(",opcContentCrc32c=").append(String.valueOf(this.opcContentCrc32c)); + sb.append(",opcContentSha256=").append(String.valueOf(this.opcContentSha256)); + sb.append(",opcContentSha384=").append(String.valueOf(this.opcContentSha384)); sb.append(",contentType=").append(String.valueOf(this.contentType)); sb.append(",contentLanguage=").append(String.valueOf(this.contentLanguage)); sb.append(",contentEncoding=").append(String.valueOf(this.contentEncoding)); @@ -991,6 +1216,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.opcClientRequestId, other.opcClientRequestId) && java.util.Objects.equals(this.expect, other.expect) && java.util.Objects.equals(this.contentMD5, other.contentMD5) + && java.util.Objects.equals(this.opcChecksumAlgorithm, other.opcChecksumAlgorithm) + && java.util.Objects.equals(this.opcContentCrc32c, other.opcContentCrc32c) + && java.util.Objects.equals(this.opcContentSha256, other.opcContentSha256) + && java.util.Objects.equals(this.opcContentSha384, other.opcContentSha384) && java.util.Objects.equals(this.contentType, other.contentType) && java.util.Objects.equals(this.contentLanguage, other.contentLanguage) && java.util.Objects.equals(this.contentEncoding, other.contentEncoding) @@ -1030,6 +1259,20 @@ public int hashCode() { : this.opcClientRequestId.hashCode()); result = (result * PRIME) + (this.expect == null ? 43 : this.expect.hashCode()); result = (result * PRIME) + (this.contentMD5 == null ? 43 : this.contentMD5.hashCode()); + result = + (result * PRIME) + + (this.opcChecksumAlgorithm == null + ? 43 + : this.opcChecksumAlgorithm.hashCode()); + result = + (result * PRIME) + + (this.opcContentCrc32c == null ? 43 : this.opcContentCrc32c.hashCode()); + result = + (result * PRIME) + + (this.opcContentSha256 == null ? 43 : this.opcContentSha256.hashCode()); + result = + (result * PRIME) + + (this.opcContentSha384 == null ? 43 : this.opcContentSha384.hashCode()); result = (result * PRIME) + (this.contentType == null ? 43 : this.contentType.hashCode()); result = (result * PRIME) diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/RestoreObjectsRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/RestoreObjectsRequest.java index 97e4e3f73a6..daff29ffe9a 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/RestoreObjectsRequest.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/RestoreObjectsRequest.java @@ -40,12 +40,12 @@ public String getBucketName() { return bucketName; } /** - * Request to restore objects. + * Request to restore object. */ private com.oracle.bmc.objectstorage.model.RestoreObjectsDetails restoreObjectsDetails; /** - * Request to restore objects. + * Request to restore object. */ public com.oracle.bmc.objectstorage.model.RestoreObjectsDetails getRestoreObjectsDetails() { return restoreObjectsDetails; @@ -115,13 +115,13 @@ public Builder bucketName(String bucketName) { } /** - * Request to restore objects. + * Request to restore object. */ private com.oracle.bmc.objectstorage.model.RestoreObjectsDetails restoreObjectsDetails = null; /** - * Request to restore objects. + * Request to restore object. * @param restoreObjectsDetails the value to set * @return this builder instance */ diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/UpdatePrivateEndpointRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/UpdatePrivateEndpointRequest.java new file mode 100644 index 00000000000..dea909372e1 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/UpdatePrivateEndpointRequest.java @@ -0,0 +1,352 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.requests; + +import com.oracle.bmc.objectstorage.model.*; +/** + * Example: Click here to see how to use UpdatePrivateEndpointRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdatePrivateEndpointRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.objectstorage.model.UpdatePrivateEndpointDetails> { + + /** + * The Object Storage namespace used for the request. + */ + private String namespaceName; + + /** + * The Object Storage namespace used for the request. + */ + public String getNamespaceName() { + return namespaceName; + } + /** + * The name of the private endpoint. Avoid entering confidential information. + * Example: {@code my-new-pe-1} + * + */ + private String peName; + + /** + * The name of the private endpoint. Avoid entering confidential information. + * Example: {@code my-new-pe-1} + * + */ + public String getPeName() { + return peName; + } + /** + * Request object for updating the Private Endpoint. + */ + private com.oracle.bmc.objectstorage.model.UpdatePrivateEndpointDetails + updatePrivateEndpointDetails; + + /** + * Request object for updating the Private Endpoint. + */ + public com.oracle.bmc.objectstorage.model.UpdatePrivateEndpointDetails + getUpdatePrivateEndpointDetails() { + return updatePrivateEndpointDetails; + } + /** + * The client request ID for tracing. + */ + private String opcClientRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcClientRequestId() { + return opcClientRequestId; + } + /** + * The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + * the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + * the resource. + * + */ + private String ifMatch; + + /** + * The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + * the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + * the resource. + * + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.objectstorage.model.UpdatePrivateEndpointDetails getBody$() { + return updatePrivateEndpointDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdatePrivateEndpointRequest, + com.oracle.bmc.objectstorage.model.UpdatePrivateEndpointDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The Object Storage namespace used for the request. + */ + private String namespaceName = null; + + /** + * The Object Storage namespace used for the request. + * @param namespaceName the value to set + * @return this builder instance + */ + public Builder namespaceName(String namespaceName) { + this.namespaceName = namespaceName; + return this; + } + + /** + * The name of the private endpoint. Avoid entering confidential information. + * Example: {@code my-new-pe-1} + * + */ + private String peName = null; + + /** + * The name of the private endpoint. Avoid entering confidential information. + * Example: {@code my-new-pe-1} + * + * @param peName the value to set + * @return this builder instance + */ + public Builder peName(String peName) { + this.peName = peName; + return this; + } + + /** + * Request object for updating the Private Endpoint. + */ + private com.oracle.bmc.objectstorage.model.UpdatePrivateEndpointDetails + updatePrivateEndpointDetails = null; + + /** + * Request object for updating the Private Endpoint. + * @param updatePrivateEndpointDetails the value to set + * @return this builder instance + */ + public Builder updatePrivateEndpointDetails( + com.oracle.bmc.objectstorage.model.UpdatePrivateEndpointDetails + updatePrivateEndpointDetails) { + this.updatePrivateEndpointDetails = updatePrivateEndpointDetails; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcClientRequestId = null; + + /** + * The client request ID for tracing. + * @param opcClientRequestId the value to set + * @return this builder instance + */ + public Builder opcClientRequestId(String opcClientRequestId) { + this.opcClientRequestId = opcClientRequestId; + return this; + } + + /** + * The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + * the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + * the resource. + * + */ + private String ifMatch = null; + + /** + * The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + * the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + * the resource. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdatePrivateEndpointRequest o) { + namespaceName(o.getNamespaceName()); + peName(o.getPeName()); + updatePrivateEndpointDetails(o.getUpdatePrivateEndpointDetails()); + opcClientRequestId(o.getOpcClientRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdatePrivateEndpointRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdatePrivateEndpointRequest + */ + public UpdatePrivateEndpointRequest build() { + UpdatePrivateEndpointRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.objectstorage.model.UpdatePrivateEndpointDetails body) { + updatePrivateEndpointDetails(body); + return this; + } + + /** + * Build the instance of UpdatePrivateEndpointRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdatePrivateEndpointRequest + */ + public UpdatePrivateEndpointRequest buildWithoutInvocationCallback() { + UpdatePrivateEndpointRequest request = new UpdatePrivateEndpointRequest(); + request.namespaceName = namespaceName; + request.peName = peName; + request.updatePrivateEndpointDetails = updatePrivateEndpointDetails; + request.opcClientRequestId = opcClientRequestId; + request.ifMatch = ifMatch; + return request; + // new UpdatePrivateEndpointRequest(namespaceName, peName, updatePrivateEndpointDetails, opcClientRequestId, ifMatch); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .namespaceName(namespaceName) + .peName(peName) + .updatePrivateEndpointDetails(updatePrivateEndpointDetails) + .opcClientRequestId(opcClientRequestId) + .ifMatch(ifMatch); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",namespaceName=").append(String.valueOf(this.namespaceName)); + sb.append(",peName=").append(String.valueOf(this.peName)); + sb.append(",updatePrivateEndpointDetails=") + .append(String.valueOf(this.updatePrivateEndpointDetails)); + sb.append(",opcClientRequestId=").append(String.valueOf(this.opcClientRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePrivateEndpointRequest)) { + return false; + } + + UpdatePrivateEndpointRequest other = (UpdatePrivateEndpointRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.namespaceName, other.namespaceName) + && java.util.Objects.equals(this.peName, other.peName) + && java.util.Objects.equals( + this.updatePrivateEndpointDetails, other.updatePrivateEndpointDetails) + && java.util.Objects.equals(this.opcClientRequestId, other.opcClientRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.namespaceName == null ? 43 : this.namespaceName.hashCode()); + result = (result * PRIME) + (this.peName == null ? 43 : this.peName.hashCode()); + result = + (result * PRIME) + + (this.updatePrivateEndpointDetails == null + ? 43 + : this.updatePrivateEndpointDetails.hashCode()); + result = + (result * PRIME) + + (this.opcClientRequestId == null + ? 43 + : this.opcClientRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/UploadPartRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/UploadPartRequest.java index 9d188ee0382..f35bef2c5f3 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/UploadPartRequest.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/UploadPartRequest.java @@ -158,7 +158,7 @@ public String getExpect() { return expect; } /** - * The optional base-64 header that defines the encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object + * The optional header that defines the base64-encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object * Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the * MD5 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error * is returned with the message: @@ -169,7 +169,7 @@ public String getExpect() { private String contentMD5; /** - * The optional base-64 header that defines the encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object + * The optional header that defines the base64-encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object * Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the * MD5 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error * is returned with the message: @@ -180,6 +180,102 @@ public String getExpect() { public String getContentMD5() { return contentMD5; } + /** + * The optional checksum algorithm to use to compute and store the checksum of the body of the HTTP request (or the parts in case of multipart uploads), + * in addition to the default MD5 checksum. + * + */ + private com.oracle.bmc.objectstorage.model.ChecksumAlgorithm opcChecksumAlgorithm; + + /** + * The optional checksum algorithm to use to compute and store the checksum of the body of the HTTP request (or the parts in case of multipart uploads), + * in addition to the default MD5 checksum. + * + */ + public com.oracle.bmc.objectstorage.model.ChecksumAlgorithm getOpcChecksumAlgorithm() { + return opcChecksumAlgorithm; + } + /** + * Applicable only if CRC32C is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the body. If the optional opc-content-crc32c header + * is present, Object Storage performs an integrity check on the body of the HTTP request by computing the CRC32C checksum for the body and comparing + * it to the CRC32C checksum supplied in the header. If the two checksums do not match, the object is rejected and an HTTP-400 Unmatched Content CRC32C error + * is returned with the message: + *

+ * "The computed CRC32C of the request body (ACTUAL_CRC32C) does not match the opc-content-crc32c header (HEADER_CRC32C)" + * + */ + private String opcContentCrc32c; + + /** + * Applicable only if CRC32C is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the body. If the optional opc-content-crc32c header + * is present, Object Storage performs an integrity check on the body of the HTTP request by computing the CRC32C checksum for the body and comparing + * it to the CRC32C checksum supplied in the header. If the two checksums do not match, the object is rejected and an HTTP-400 Unmatched Content CRC32C error + * is returned with the message: + *

+ * "The computed CRC32C of the request body (ACTUAL_CRC32C) does not match the opc-content-crc32c header (HEADER_CRC32C)" + * + */ + public String getOpcContentCrc32c() { + return opcContentCrc32c; + } + /** + * Applicable only if SHA256 is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded SHA256 hash of the body. If the optional opc-content-sha256 header is present, Object + * Storage performs an integrity check on the body of the HTTP request by computing the SHA256 hash for the body and comparing it to the + * SHA256 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content SHA256 error + * is returned with the message: + *

+ * "The computed SHA256 of the request body (ACTUAL_SHA256) does not match the opc-content-sha256 header (HEADER_SHA256)" + * + */ + private String opcContentSha256; + + /** + * Applicable only if SHA256 is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded SHA256 hash of the body. If the optional opc-content-sha256 header is present, Object + * Storage performs an integrity check on the body of the HTTP request by computing the SHA256 hash for the body and comparing it to the + * SHA256 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content SHA256 error + * is returned with the message: + *

+ * "The computed SHA256 of the request body (ACTUAL_SHA256) does not match the opc-content-sha256 header (HEADER_SHA256)" + * + */ + public String getOpcContentSha256() { + return opcContentSha256; + } + /** + * Applicable only if SHA384 is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded SHA384 hash of the body. If the optional opc-content-sha384 header is present, Object + * Storage performs an integrity check on the body of the HTTP request by computing the SHA384 hash for the body and comparing it to the + * SHA384 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content SHA384 error + * is returned with the message: + *

+ * "The computed SHA384 of the request body (ACTUAL_SHA384) does not match the opc-content-sha384 header (HEADER_SHA384)" + * + */ + private String opcContentSha384; + + /** + * Applicable only if SHA384 is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded SHA384 hash of the body. If the optional opc-content-sha384 header is present, Object + * Storage performs an integrity check on the body of the HTTP request by computing the SHA384 hash for the body and comparing it to the + * SHA384 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content SHA384 error + * is returned with the message: + *

+ * "The computed SHA384 of the request body (ACTUAL_SHA384) does not match the opc-content-sha384 header (HEADER_SHA384)" + * + */ + public String getOpcContentSha384() { + return opcContentSha384; + } /** * The optional header that specifies "AES256" as the encryption algorithm. For more information, see * [Using Your Own Keys for Server-Side Encryption](https://docs.cloud.oracle.com/Content/Object/Tasks/usingyourencryptionkeys.htm). @@ -457,7 +553,7 @@ public Builder expect(String expect) { } /** - * The optional base-64 header that defines the encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object + * The optional header that defines the base64-encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object * Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the * MD5 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error * is returned with the message: @@ -468,7 +564,7 @@ public Builder expect(String expect) { private String contentMD5 = null; /** - * The optional base-64 header that defines the encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object + * The optional header that defines the base64-encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object * Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the * MD5 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error * is returned with the message: @@ -483,6 +579,119 @@ public Builder contentMD5(String contentMD5) { return this; } + /** + * The optional checksum algorithm to use to compute and store the checksum of the body of the HTTP request (or the parts in case of multipart uploads), + * in addition to the default MD5 checksum. + * + */ + private com.oracle.bmc.objectstorage.model.ChecksumAlgorithm opcChecksumAlgorithm = null; + + /** + * The optional checksum algorithm to use to compute and store the checksum of the body of the HTTP request (or the parts in case of multipart uploads), + * in addition to the default MD5 checksum. + * + * @param opcChecksumAlgorithm the value to set + * @return this builder instance + */ + public Builder opcChecksumAlgorithm( + com.oracle.bmc.objectstorage.model.ChecksumAlgorithm opcChecksumAlgorithm) { + this.opcChecksumAlgorithm = opcChecksumAlgorithm; + return this; + } + + /** + * Applicable only if CRC32C is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the body. If the optional opc-content-crc32c header + * is present, Object Storage performs an integrity check on the body of the HTTP request by computing the CRC32C checksum for the body and comparing + * it to the CRC32C checksum supplied in the header. If the two checksums do not match, the object is rejected and an HTTP-400 Unmatched Content CRC32C error + * is returned with the message: + *

+ * "The computed CRC32C of the request body (ACTUAL_CRC32C) does not match the opc-content-crc32c header (HEADER_CRC32C)" + * + */ + private String opcContentCrc32c = null; + + /** + * Applicable only if CRC32C is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the body. If the optional opc-content-crc32c header + * is present, Object Storage performs an integrity check on the body of the HTTP request by computing the CRC32C checksum for the body and comparing + * it to the CRC32C checksum supplied in the header. If the two checksums do not match, the object is rejected and an HTTP-400 Unmatched Content CRC32C error + * is returned with the message: + *

+ * "The computed CRC32C of the request body (ACTUAL_CRC32C) does not match the opc-content-crc32c header (HEADER_CRC32C)" + * + * @param opcContentCrc32c the value to set + * @return this builder instance + */ + public Builder opcContentCrc32c(String opcContentCrc32c) { + this.opcContentCrc32c = opcContentCrc32c; + return this; + } + + /** + * Applicable only if SHA256 is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded SHA256 hash of the body. If the optional opc-content-sha256 header is present, Object + * Storage performs an integrity check on the body of the HTTP request by computing the SHA256 hash for the body and comparing it to the + * SHA256 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content SHA256 error + * is returned with the message: + *

+ * "The computed SHA256 of the request body (ACTUAL_SHA256) does not match the opc-content-sha256 header (HEADER_SHA256)" + * + */ + private String opcContentSha256 = null; + + /** + * Applicable only if SHA256 is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded SHA256 hash of the body. If the optional opc-content-sha256 header is present, Object + * Storage performs an integrity check on the body of the HTTP request by computing the SHA256 hash for the body and comparing it to the + * SHA256 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content SHA256 error + * is returned with the message: + *

+ * "The computed SHA256 of the request body (ACTUAL_SHA256) does not match the opc-content-sha256 header (HEADER_SHA256)" + * + * @param opcContentSha256 the value to set + * @return this builder instance + */ + public Builder opcContentSha256(String opcContentSha256) { + this.opcContentSha256 = opcContentSha256; + return this; + } + + /** + * Applicable only if SHA384 is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded SHA384 hash of the body. If the optional opc-content-sha384 header is present, Object + * Storage performs an integrity check on the body of the HTTP request by computing the SHA384 hash for the body and comparing it to the + * SHA384 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content SHA384 error + * is returned with the message: + *

+ * "The computed SHA384 of the request body (ACTUAL_SHA384) does not match the opc-content-sha384 header (HEADER_SHA384)" + * + */ + private String opcContentSha384 = null; + + /** + * Applicable only if SHA384 is specified in the opc-checksum-algorithm request header. + *

+ * The optional header that defines the base64-encoded SHA384 hash of the body. If the optional opc-content-sha384 header is present, Object + * Storage performs an integrity check on the body of the HTTP request by computing the SHA384 hash for the body and comparing it to the + * SHA384 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content SHA384 error + * is returned with the message: + *

+ * "The computed SHA384 of the request body (ACTUAL_SHA384) does not match the opc-content-sha384 header (HEADER_SHA384)" + * + * @param opcContentSha384 the value to set + * @return this builder instance + */ + public Builder opcContentSha384(String opcContentSha384) { + this.opcContentSha384 = opcContentSha384; + return this; + } + /** * The optional header that specifies "AES256" as the encryption algorithm. For more information, see * [Using Your Own Keys for Server-Side Encryption](https://docs.cloud.oracle.com/Content/Object/Tasks/usingyourencryptionkeys.htm). @@ -603,6 +812,10 @@ public Builder copy(UploadPartRequest o) { ifNoneMatch(o.getIfNoneMatch()); expect(o.getExpect()); contentMD5(o.getContentMD5()); + opcChecksumAlgorithm(o.getOpcChecksumAlgorithm()); + opcContentCrc32c(o.getOpcContentCrc32c()); + opcContentSha256(o.getOpcContentSha256()); + opcContentSha384(o.getOpcContentSha384()); opcSseCustomerAlgorithm(o.getOpcSseCustomerAlgorithm()); opcSseCustomerKey(o.getOpcSseCustomerKey()); opcSseCustomerKeySha256(o.getOpcSseCustomerKeySha256()); @@ -662,12 +875,16 @@ public UploadPartRequest buildWithoutInvocationCallback() { request.ifNoneMatch = ifNoneMatch; request.expect = expect; request.contentMD5 = contentMD5; + request.opcChecksumAlgorithm = opcChecksumAlgorithm; + request.opcContentCrc32c = opcContentCrc32c; + request.opcContentSha256 = opcContentSha256; + request.opcContentSha384 = opcContentSha384; request.opcSseCustomerAlgorithm = opcSseCustomerAlgorithm; request.opcSseCustomerKey = opcSseCustomerKey; request.opcSseCustomerKeySha256 = opcSseCustomerKeySha256; request.opcSseKmsKeyId = opcSseKmsKeyId; return request; - // new UploadPartRequest(namespaceName, bucketName, objectName, uploadId, uploadPartNum, contentLength, uploadPartBody, opcClientRequestId, ifMatch, ifNoneMatch, expect, contentMD5, opcSseCustomerAlgorithm, opcSseCustomerKey, opcSseCustomerKeySha256, opcSseKmsKeyId); + // new UploadPartRequest(namespaceName, bucketName, objectName, uploadId, uploadPartNum, contentLength, uploadPartBody, opcClientRequestId, ifMatch, ifNoneMatch, expect, contentMD5, opcChecksumAlgorithm, opcContentCrc32c, opcContentSha256, opcContentSha384, opcSseCustomerAlgorithm, opcSseCustomerKey, opcSseCustomerKeySha256, opcSseKmsKeyId); } } @@ -689,6 +906,10 @@ public Builder toBuilder() { .ifNoneMatch(ifNoneMatch) .expect(expect) .contentMD5(contentMD5) + .opcChecksumAlgorithm(opcChecksumAlgorithm) + .opcContentCrc32c(opcContentCrc32c) + .opcContentSha256(opcContentSha256) + .opcContentSha384(opcContentSha384) .opcSseCustomerAlgorithm(opcSseCustomerAlgorithm) .opcSseCustomerKey(opcSseCustomerKey) .opcSseCustomerKeySha256(opcSseCustomerKeySha256) @@ -720,6 +941,10 @@ public String toString() { sb.append(",ifNoneMatch=").append(String.valueOf(this.ifNoneMatch)); sb.append(",expect=").append(String.valueOf(this.expect)); sb.append(",contentMD5=").append(String.valueOf(this.contentMD5)); + sb.append(",opcChecksumAlgorithm=").append(String.valueOf(this.opcChecksumAlgorithm)); + sb.append(",opcContentCrc32c=").append(String.valueOf(this.opcContentCrc32c)); + sb.append(",opcContentSha256=").append(String.valueOf(this.opcContentSha256)); + sb.append(",opcContentSha384=").append(String.valueOf(this.opcContentSha384)); sb.append(",opcSseCustomerAlgorithm=").append(String.valueOf(this.opcSseCustomerAlgorithm)); sb.append(",opcSseCustomerKey=").append(String.valueOf(this.opcSseCustomerKey)); sb.append(",opcSseCustomerKeySha256=").append(String.valueOf(this.opcSseCustomerKeySha256)); @@ -751,6 +976,10 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.ifNoneMatch, other.ifNoneMatch) && java.util.Objects.equals(this.expect, other.expect) && java.util.Objects.equals(this.contentMD5, other.contentMD5) + && java.util.Objects.equals(this.opcChecksumAlgorithm, other.opcChecksumAlgorithm) + && java.util.Objects.equals(this.opcContentCrc32c, other.opcContentCrc32c) + && java.util.Objects.equals(this.opcContentSha256, other.opcContentSha256) + && java.util.Objects.equals(this.opcContentSha384, other.opcContentSha384) && java.util.Objects.equals( this.opcSseCustomerAlgorithm, other.opcSseCustomerAlgorithm) && java.util.Objects.equals(this.opcSseCustomerKey, other.opcSseCustomerKey) @@ -787,6 +1016,20 @@ public int hashCode() { result = (result * PRIME) + (this.ifNoneMatch == null ? 43 : this.ifNoneMatch.hashCode()); result = (result * PRIME) + (this.expect == null ? 43 : this.expect.hashCode()); result = (result * PRIME) + (this.contentMD5 == null ? 43 : this.contentMD5.hashCode()); + result = + (result * PRIME) + + (this.opcChecksumAlgorithm == null + ? 43 + : this.opcChecksumAlgorithm.hashCode()); + result = + (result * PRIME) + + (this.opcContentCrc32c == null ? 43 : this.opcContentCrc32c.hashCode()); + result = + (result * PRIME) + + (this.opcContentSha256 == null ? 43 : this.opcContentSha256.hashCode()); + result = + (result * PRIME) + + (this.opcContentSha384 == null ? 43 : this.opcContentSha384.hashCode()); result = (result * PRIME) + (this.opcSseCustomerAlgorithm == null diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/CommitMultipartUploadResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/CommitMultipartUploadResponse.java index 1011f467bc2..d35b2e15001 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/CommitMultipartUploadResponse.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/CommitMultipartUploadResponse.java @@ -39,7 +39,7 @@ public String getOpcRequestId() { } /** - * Base-64 representation of the multipart object hash. + * Base-64 representation of the multipart object MD5 hash. * The multipart object hash is calculated by taking the MD5 hashes of the parts passed to this call, * concatenating the binary representation of those hashes in order of their part numbers, * and then calculating the MD5 hash of the concatenated values. The multipart object hash is followed @@ -49,7 +49,7 @@ public String getOpcRequestId() { private String opcMultipartMd5; /** - * Base-64 representation of the multipart object hash. + * Base-64 representation of the multipart object MD5 hash. * The multipart object hash is calculated by taking the MD5 hashes of the parts passed to this call, * concatenating the binary representation of those hashes in order of their part numbers, * and then calculating the MD5 hash of the concatenated values. The multipart object hash is followed @@ -61,6 +61,71 @@ public String getOpcMultipartMd5() { return opcMultipartMd5; } + /** + * The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the object. + * Even for objects uploaded using multipart upload, this header returns the CRC32C (Castagnoli) checksum + * of the complete reconstructed object. + * + */ + private String opcContentCrc32c; + + /** + * The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the object. + * Even for objects uploaded using multipart upload, this header returns the CRC32C (Castagnoli) checksum + * of the complete reconstructed object. + * + * @return the value + */ + public String getOpcContentCrc32c() { + return opcContentCrc32c; + } + + /** + * Base-64 representation of the multipart object SHA256 hash. + * The multipart object hash is calculated by taking the SHA256 hashes of the parts passed to this call, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA256 hash of the concatenated values. The multipart object hash is followed + * by a hyphen and the total number of parts (for example, '-6'). + * + */ + private String opcMultipartSha256; + + /** + * Base-64 representation of the multipart object SHA256 hash. + * The multipart object hash is calculated by taking the SHA256 hashes of the parts passed to this call, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA256 hash of the concatenated values. The multipart object hash is followed + * by a hyphen and the total number of parts (for example, '-6'). + * + * @return the value + */ + public String getOpcMultipartSha256() { + return opcMultipartSha256; + } + + /** + * Base-64 representation of the multipart object SHA384 hash. + * The multipart object hash is calculated by taking the SHA384 hashes of the parts passed to this call, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA384 hash of the concatenated values. The multipart object hash is followed + * by a hyphen and the total number of parts (for example, '-6'). + * + */ + private String opcMultipartSha384; + + /** + * Base-64 representation of the multipart object SHA384 hash. + * The multipart object hash is calculated by taking the SHA384 hashes of the parts passed to this call, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA384 hash of the concatenated values. The multipart object hash is followed + * by a hyphen and the total number of parts (for example, '-6'). + * + * @return the value + */ + public String getOpcMultipartSha384() { + return opcMultipartSha384; + } + /** * The entity tag (ETag) for the object. */ @@ -106,6 +171,9 @@ public String getVersionId() { "opcClientRequestId", "opcRequestId", "opcMultipartMd5", + "opcContentCrc32c", + "opcMultipartSha256", + "opcMultipartSha384", "eTag", "lastModified", "versionId" @@ -116,6 +184,9 @@ private CommitMultipartUploadResponse( String opcClientRequestId, String opcRequestId, String opcMultipartMd5, + String opcContentCrc32c, + String opcMultipartSha256, + String opcMultipartSha384, String eTag, java.util.Date lastModified, String versionId) { @@ -123,6 +194,9 @@ private CommitMultipartUploadResponse( this.opcClientRequestId = opcClientRequestId; this.opcRequestId = opcRequestId; this.opcMultipartMd5 = opcMultipartMd5; + this.opcContentCrc32c = opcContentCrc32c; + this.opcMultipartSha256 = opcMultipartSha256; + this.opcMultipartSha384 = opcMultipartSha384; this.eTag = eTag; this.lastModified = lastModified; this.versionId = versionId; @@ -178,7 +252,7 @@ public Builder opcRequestId(String opcRequestId) { } /** - * Base-64 representation of the multipart object hash. + * Base-64 representation of the multipart object MD5 hash. * The multipart object hash is calculated by taking the MD5 hashes of the parts passed to this call, * concatenating the binary representation of those hashes in order of their part numbers, * and then calculating the MD5 hash of the concatenated values. The multipart object hash is followed @@ -188,7 +262,7 @@ public Builder opcRequestId(String opcRequestId) { private String opcMultipartMd5; /** - * Base-64 representation of the multipart object hash. + * Base-64 representation of the multipart object MD5 hash. * The multipart object hash is calculated by taking the MD5 hashes of the parts passed to this call, * concatenating the binary representation of those hashes in order of their part numbers, * and then calculating the MD5 hash of the concatenated values. The multipart object hash is followed @@ -202,6 +276,77 @@ public Builder opcMultipartMd5(String opcMultipartMd5) { return this; } + /** + * The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the object. + * Even for objects uploaded using multipart upload, this header returns the CRC32C (Castagnoli) checksum + * of the complete reconstructed object. + * + */ + private String opcContentCrc32c; + + /** + * The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the object. + * Even for objects uploaded using multipart upload, this header returns the CRC32C (Castagnoli) checksum + * of the complete reconstructed object. + * + * @param opcContentCrc32c the value to set + * @return this builder + */ + public Builder opcContentCrc32c(String opcContentCrc32c) { + this.opcContentCrc32c = opcContentCrc32c; + return this; + } + + /** + * Base-64 representation of the multipart object SHA256 hash. + * The multipart object hash is calculated by taking the SHA256 hashes of the parts passed to this call, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA256 hash of the concatenated values. The multipart object hash is followed + * by a hyphen and the total number of parts (for example, '-6'). + * + */ + private String opcMultipartSha256; + + /** + * Base-64 representation of the multipart object SHA256 hash. + * The multipart object hash is calculated by taking the SHA256 hashes of the parts passed to this call, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA256 hash of the concatenated values. The multipart object hash is followed + * by a hyphen and the total number of parts (for example, '-6'). + * + * @param opcMultipartSha256 the value to set + * @return this builder + */ + public Builder opcMultipartSha256(String opcMultipartSha256) { + this.opcMultipartSha256 = opcMultipartSha256; + return this; + } + + /** + * Base-64 representation of the multipart object SHA384 hash. + * The multipart object hash is calculated by taking the SHA384 hashes of the parts passed to this call, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA384 hash of the concatenated values. The multipart object hash is followed + * by a hyphen and the total number of parts (for example, '-6'). + * + */ + private String opcMultipartSha384; + + /** + * Base-64 representation of the multipart object SHA384 hash. + * The multipart object hash is calculated by taking the SHA384 hashes of the parts passed to this call, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA384 hash of the concatenated values. The multipart object hash is followed + * by a hyphen and the total number of parts (for example, '-6'). + * + * @param opcMultipartSha384 the value to set + * @return this builder + */ + public Builder opcMultipartSha384(String opcMultipartSha384) { + this.opcMultipartSha384 = opcMultipartSha384; + return this; + } + /** * The entity tag (ETag) for the object. */ @@ -257,6 +402,9 @@ public Builder copy(CommitMultipartUploadResponse o) { opcClientRequestId(o.getOpcClientRequestId()); opcRequestId(o.getOpcRequestId()); opcMultipartMd5(o.getOpcMultipartMd5()); + opcContentCrc32c(o.getOpcContentCrc32c()); + opcMultipartSha256(o.getOpcMultipartSha256()); + opcMultipartSha384(o.getOpcMultipartSha384()); eTag(o.getETag()); lastModified(o.getLastModified()); versionId(o.getVersionId()); @@ -275,6 +423,9 @@ public CommitMultipartUploadResponse build() { opcClientRequestId, opcRequestId, opcMultipartMd5, + opcContentCrc32c, + opcMultipartSha256, + opcMultipartSha384, eTag, lastModified, versionId); @@ -297,6 +448,9 @@ public String toString() { sb.append(",opcClientRequestId=").append(String.valueOf(opcClientRequestId)); sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); sb.append(",opcMultipartMd5=").append(String.valueOf(opcMultipartMd5)); + sb.append(",opcContentCrc32c=").append(String.valueOf(opcContentCrc32c)); + sb.append(",opcMultipartSha256=").append(String.valueOf(opcMultipartSha256)); + sb.append(",opcMultipartSha384=").append(String.valueOf(opcMultipartSha384)); sb.append(",eTag=").append(String.valueOf(eTag)); sb.append(",lastModified=").append(String.valueOf(lastModified)); sb.append(",versionId=").append(String.valueOf(versionId)); @@ -318,6 +472,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.opcClientRequestId, other.opcClientRequestId) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) && java.util.Objects.equals(this.opcMultipartMd5, other.opcMultipartMd5) + && java.util.Objects.equals(this.opcContentCrc32c, other.opcContentCrc32c) + && java.util.Objects.equals(this.opcMultipartSha256, other.opcMultipartSha256) + && java.util.Objects.equals(this.opcMultipartSha384, other.opcMultipartSha384) && java.util.Objects.equals(this.eTag, other.eTag) && java.util.Objects.equals(this.lastModified, other.lastModified) && java.util.Objects.equals(this.versionId, other.versionId); @@ -336,6 +493,19 @@ public int hashCode() { result = (result * PRIME) + (this.opcMultipartMd5 == null ? 43 : this.opcMultipartMd5.hashCode()); + result = + (result * PRIME) + + (this.opcContentCrc32c == null ? 43 : this.opcContentCrc32c.hashCode()); + result = + (result * PRIME) + + (this.opcMultipartSha256 == null + ? 43 + : this.opcMultipartSha256.hashCode()); + result = + (result * PRIME) + + (this.opcMultipartSha384 == null + ? 43 + : this.opcMultipartSha384.hashCode()); result = (result * PRIME) + (this.eTag == null ? 43 : this.eTag.hashCode()); result = (result * PRIME) + (this.lastModified == null ? 43 : this.lastModified.hashCode()); result = (result * PRIME) + (this.versionId == null ? 43 : this.versionId.hashCode()); diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/CreatePrivateEndpointResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/CreatePrivateEndpointResponse.java new file mode 100644 index 00000000000..21f9e327b77 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/CreatePrivateEndpointResponse.java @@ -0,0 +1,224 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.responses; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class CreatePrivateEndpointResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. If you need to contact Oracle about a + * particular request, provide this request ID. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. If you need to contact Oracle about a + * particular request, provide this request ID. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + * @return the value + */ + public String getOpcClientRequestId() { + return opcClientRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId", + "opcClientRequestId" + }) + private CreatePrivateEndpointResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId, + String opcClientRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.opcClientRequestId = opcClientRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. If you need to contact Oracle about a + * particular request, provide this request ID. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. If you need to contact Oracle about a + * particular request, provide this request ID. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + * @param opcClientRequestId the value to set + * @return this builder + */ + public Builder opcClientRequestId(String opcClientRequestId) { + this.opcClientRequestId = opcClientRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreatePrivateEndpointResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + opcClientRequestId(o.getOpcClientRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreatePrivateEndpointResponse build() { + return new CreatePrivateEndpointResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + opcRequestId, + opcClientRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcClientRequestId=").append(String.valueOf(opcClientRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreatePrivateEndpointResponse)) { + return false; + } + + CreatePrivateEndpointResponse other = (CreatePrivateEndpointResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcClientRequestId, other.opcClientRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcClientRequestId == null + ? 43 + : this.opcClientRequestId.hashCode()); + return result; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/DeletePrivateEndpointResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/DeletePrivateEndpointResponse.java new file mode 100644 index 00000000000..a10bcdcc944 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/DeletePrivateEndpointResponse.java @@ -0,0 +1,224 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.responses; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class DeletePrivateEndpointResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. If you need to contact Oracle about a + * particular request, provide this request ID. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. If you need to contact Oracle about a + * particular request, provide this request ID. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + * @return the value + */ + public String getOpcClientRequestId() { + return opcClientRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcClientRequestId", + "opcRequestId" + }) + private DeletePrivateEndpointResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcClientRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcClientRequestId = opcClientRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. If you need to contact Oracle about a + * particular request, provide this request ID. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. If you need to contact Oracle about a + * particular request, provide this request ID. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + * @param opcClientRequestId the value to set + * @return this builder + */ + public Builder opcClientRequestId(String opcClientRequestId) { + this.opcClientRequestId = opcClientRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeletePrivateEndpointResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcClientRequestId(o.getOpcClientRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeletePrivateEndpointResponse build() { + return new DeletePrivateEndpointResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + opcClientRequestId, + opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcClientRequestId=").append(String.valueOf(opcClientRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeletePrivateEndpointResponse)) { + return false; + } + + DeletePrivateEndpointResponse other = (DeletePrivateEndpointResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcClientRequestId, other.opcClientRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcClientRequestId == null + ? 43 + : this.opcClientRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/GetObjectResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/GetObjectResponse.java index 19051d2908f..48b91bf3571 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/GetObjectResponse.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/GetObjectResponse.java @@ -130,6 +130,113 @@ public String getOpcMultipartMd5() { return opcMultipartMd5; } + /** + * The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the object. + * Even for objects uploaded using multipart upload, this header returns the CRC32C (Castagnoli) checksum + * of the complete reconstructed object. + * + */ + private String opcContentCrc32c; + + /** + * The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the object. + * Even for objects uploaded using multipart upload, this header returns the CRC32C (Castagnoli) checksum + * of the complete reconstructed object. + * + * @return the value + */ + public String getOpcContentCrc32c() { + return opcContentCrc32c; + } + + /** + * Applicable only if SHA256 was specified in the opc-checksum-algorithm request header during upload. + * The base64-encoded SHA256 hash of the object as computed during upload. + * Unavailable for objects uploaded using multipart upload. + * + */ + private String opcContentSha256; + + /** + * Applicable only if SHA256 was specified in the opc-checksum-algorithm request header during upload. + * The base64-encoded SHA256 hash of the object as computed during upload. + * Unavailable for objects uploaded using multipart upload. + * + * @return the value + */ + public String getOpcContentSha256() { + return opcContentSha256; + } + + /** + * Only applicable to objects uploaded using multipart upload. + * Applicable only if SHA256 was specified in the opc-checksum-algorithm request header during upload. + * Base-64 representation of the multipart object SHA256 hash. + * The multipart object hash is calculated by taking the SHA256 hashes of the parts, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA256 hash of the concatenated values. + * + */ + private String opcMultipartSha256; + + /** + * Only applicable to objects uploaded using multipart upload. + * Applicable only if SHA256 was specified in the opc-checksum-algorithm request header during upload. + * Base-64 representation of the multipart object SHA256 hash. + * The multipart object hash is calculated by taking the SHA256 hashes of the parts, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA256 hash of the concatenated values. + * + * @return the value + */ + public String getOpcMultipartSha256() { + return opcMultipartSha256; + } + + /** + * Applicable only if SHA384 was specified in the opc-checksum-algorithm request header during upload. + * The base64-encoded SHA384 hash of the object as computed during upload. + * Unavailable for objects uploaded using multipart upload. + * + */ + private String opcContentSha384; + + /** + * Applicable only if SHA384 was specified in the opc-checksum-algorithm request header during upload. + * The base64-encoded SHA384 hash of the object as computed during upload. + * Unavailable for objects uploaded using multipart upload. + * + * @return the value + */ + public String getOpcContentSha384() { + return opcContentSha384; + } + + /** + * Only applicable to objects uploaded using multipart upload. + * Applicable only if SHA384 was specified in the opc-checksum-algorithm request header during upload. + * Base-64 representation of the multipart object SHA384 hash. + * The multipart object hash is calculated by taking the SHA384 hashes of the parts, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA384 hash of the concatenated values. + * + */ + private String opcMultipartSha384; + + /** + * Only applicable to objects uploaded using multipart upload. + * Applicable only if SHA384 was specified in the opc-checksum-algorithm request header during upload. + * Base-64 representation of the multipart object SHA384 hash. + * The multipart object hash is calculated by taking the SHA384 hashes of the parts, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA384 hash of the concatenated values. + * + * @return the value + */ + public String getOpcMultipartSha384() { + return opcMultipartSha384; + } + /** * Content-Type header, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.17). */ @@ -320,6 +427,11 @@ public boolean isNotModified() { "contentRange", "contentMd5", "opcMultipartMd5", + "opcContentCrc32c", + "opcContentSha256", + "opcMultipartSha256", + "opcContentSha384", + "opcMultipartSha384", "contentType", "contentLanguage", "contentEncoding", @@ -345,6 +457,11 @@ private GetObjectResponse( com.oracle.bmc.model.Range contentRange, String contentMd5, String opcMultipartMd5, + String opcContentCrc32c, + String opcContentSha256, + String opcMultipartSha256, + String opcContentSha384, + String opcMultipartSha384, String contentType, String contentLanguage, String contentEncoding, @@ -367,6 +484,11 @@ private GetObjectResponse( this.contentRange = contentRange; this.contentMd5 = contentMd5; this.opcMultipartMd5 = opcMultipartMd5; + this.opcContentCrc32c = opcContentCrc32c; + this.opcContentSha256 = opcContentSha256; + this.opcMultipartSha256 = opcMultipartSha256; + this.opcContentSha384 = opcContentSha384; + this.opcMultipartSha384 = opcMultipartSha384; this.contentType = contentType; this.contentLanguage = contentLanguage; this.contentEncoding = contentEncoding; @@ -535,6 +657,123 @@ public Builder opcMultipartMd5(String opcMultipartMd5) { return this; } + /** + * The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the object. + * Even for objects uploaded using multipart upload, this header returns the CRC32C (Castagnoli) checksum + * of the complete reconstructed object. + * + */ + private String opcContentCrc32c; + + /** + * The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the object. + * Even for objects uploaded using multipart upload, this header returns the CRC32C (Castagnoli) checksum + * of the complete reconstructed object. + * + * @param opcContentCrc32c the value to set + * @return this builder + */ + public Builder opcContentCrc32c(String opcContentCrc32c) { + this.opcContentCrc32c = opcContentCrc32c; + return this; + } + + /** + * Applicable only if SHA256 was specified in the opc-checksum-algorithm request header during upload. + * The base64-encoded SHA256 hash of the object as computed during upload. + * Unavailable for objects uploaded using multipart upload. + * + */ + private String opcContentSha256; + + /** + * Applicable only if SHA256 was specified in the opc-checksum-algorithm request header during upload. + * The base64-encoded SHA256 hash of the object as computed during upload. + * Unavailable for objects uploaded using multipart upload. + * + * @param opcContentSha256 the value to set + * @return this builder + */ + public Builder opcContentSha256(String opcContentSha256) { + this.opcContentSha256 = opcContentSha256; + return this; + } + + /** + * Only applicable to objects uploaded using multipart upload. + * Applicable only if SHA256 was specified in the opc-checksum-algorithm request header during upload. + * Base-64 representation of the multipart object SHA256 hash. + * The multipart object hash is calculated by taking the SHA256 hashes of the parts, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA256 hash of the concatenated values. + * + */ + private String opcMultipartSha256; + + /** + * Only applicable to objects uploaded using multipart upload. + * Applicable only if SHA256 was specified in the opc-checksum-algorithm request header during upload. + * Base-64 representation of the multipart object SHA256 hash. + * The multipart object hash is calculated by taking the SHA256 hashes of the parts, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA256 hash of the concatenated values. + * + * @param opcMultipartSha256 the value to set + * @return this builder + */ + public Builder opcMultipartSha256(String opcMultipartSha256) { + this.opcMultipartSha256 = opcMultipartSha256; + return this; + } + + /** + * Applicable only if SHA384 was specified in the opc-checksum-algorithm request header during upload. + * The base64-encoded SHA384 hash of the object as computed during upload. + * Unavailable for objects uploaded using multipart upload. + * + */ + private String opcContentSha384; + + /** + * Applicable only if SHA384 was specified in the opc-checksum-algorithm request header during upload. + * The base64-encoded SHA384 hash of the object as computed during upload. + * Unavailable for objects uploaded using multipart upload. + * + * @param opcContentSha384 the value to set + * @return this builder + */ + public Builder opcContentSha384(String opcContentSha384) { + this.opcContentSha384 = opcContentSha384; + return this; + } + + /** + * Only applicable to objects uploaded using multipart upload. + * Applicable only if SHA384 was specified in the opc-checksum-algorithm request header during upload. + * Base-64 representation of the multipart object SHA384 hash. + * The multipart object hash is calculated by taking the SHA384 hashes of the parts, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA384 hash of the concatenated values. + * + */ + private String opcMultipartSha384; + + /** + * Only applicable to objects uploaded using multipart upload. + * Applicable only if SHA384 was specified in the opc-checksum-algorithm request header during upload. + * Base-64 representation of the multipart object SHA384 hash. + * The multipart object hash is calculated by taking the SHA384 hashes of the parts, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA384 hash of the concatenated values. + * + * @param opcMultipartSha384 the value to set + * @return this builder + */ + public Builder opcMultipartSha384(String opcMultipartSha384) { + this.opcMultipartSha384 = opcMultipartSha384; + return this; + } + /** * Content-Type header, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.17). */ @@ -754,6 +993,11 @@ public Builder copy(GetObjectResponse o) { contentRange(o.getContentRange()); contentMd5(o.getContentMd5()); opcMultipartMd5(o.getOpcMultipartMd5()); + opcContentCrc32c(o.getOpcContentCrc32c()); + opcContentSha256(o.getOpcContentSha256()); + opcMultipartSha256(o.getOpcMultipartSha256()); + opcContentSha384(o.getOpcContentSha384()); + opcMultipartSha384(o.getOpcMultipartSha384()); contentType(o.getContentType()); contentLanguage(o.getContentLanguage()); contentEncoding(o.getContentEncoding()); @@ -786,6 +1030,11 @@ public GetObjectResponse build() { contentRange, contentMd5, opcMultipartMd5, + opcContentCrc32c, + opcContentSha256, + opcMultipartSha256, + opcContentSha384, + opcMultipartSha384, contentType, contentLanguage, contentEncoding, @@ -823,6 +1072,11 @@ public String toString() { sb.append(",contentRange=").append(String.valueOf(contentRange)); sb.append(",contentMd5=").append(String.valueOf(contentMd5)); sb.append(",opcMultipartMd5=").append(String.valueOf(opcMultipartMd5)); + sb.append(",opcContentCrc32c=").append(String.valueOf(opcContentCrc32c)); + sb.append(",opcContentSha256=").append(String.valueOf(opcContentSha256)); + sb.append(",opcMultipartSha256=").append(String.valueOf(opcMultipartSha256)); + sb.append(",opcContentSha384=").append(String.valueOf(opcContentSha384)); + sb.append(",opcMultipartSha384=").append(String.valueOf(opcMultipartSha384)); sb.append(",contentType=").append(String.valueOf(contentType)); sb.append(",contentLanguage=").append(String.valueOf(contentLanguage)); sb.append(",contentEncoding=").append(String.valueOf(contentEncoding)); @@ -859,6 +1113,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.contentRange, other.contentRange) && java.util.Objects.equals(this.contentMd5, other.contentMd5) && java.util.Objects.equals(this.opcMultipartMd5, other.opcMultipartMd5) + && java.util.Objects.equals(this.opcContentCrc32c, other.opcContentCrc32c) + && java.util.Objects.equals(this.opcContentSha256, other.opcContentSha256) + && java.util.Objects.equals(this.opcMultipartSha256, other.opcMultipartSha256) + && java.util.Objects.equals(this.opcContentSha384, other.opcContentSha384) + && java.util.Objects.equals(this.opcMultipartSha384, other.opcMultipartSha384) && java.util.Objects.equals(this.contentType, other.contentType) && java.util.Objects.equals(this.contentLanguage, other.contentLanguage) && java.util.Objects.equals(this.contentEncoding, other.contentEncoding) @@ -894,6 +1153,25 @@ public int hashCode() { result = (result * PRIME) + (this.opcMultipartMd5 == null ? 43 : this.opcMultipartMd5.hashCode()); + result = + (result * PRIME) + + (this.opcContentCrc32c == null ? 43 : this.opcContentCrc32c.hashCode()); + result = + (result * PRIME) + + (this.opcContentSha256 == null ? 43 : this.opcContentSha256.hashCode()); + result = + (result * PRIME) + + (this.opcMultipartSha256 == null + ? 43 + : this.opcMultipartSha256.hashCode()); + result = + (result * PRIME) + + (this.opcContentSha384 == null ? 43 : this.opcContentSha384.hashCode()); + result = + (result * PRIME) + + (this.opcMultipartSha384 == null + ? 43 + : this.opcMultipartSha384.hashCode()); result = (result * PRIME) + (this.contentType == null ? 43 : this.contentType.hashCode()); result = (result * PRIME) diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/GetPrivateEndpointResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/GetPrivateEndpointResponse.java new file mode 100644 index 00000000000..68a31c42d85 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/GetPrivateEndpointResponse.java @@ -0,0 +1,299 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.responses; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class GetPrivateEndpointResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + * @return the value + */ + public String getOpcClientRequestId() { + return opcClientRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The entity tag (ETag) for the Private Endpoint. + */ + private String eTag; + + /** + * The entity tag (ETag) for the Private Endpoint. + * @return the value + */ + public String getETag() { + return eTag; + } + + /** + * The returned PrivateEndpoint instance, or null if {@link #isNotModified()} is true. + */ + private com.oracle.bmc.objectstorage.model.PrivateEndpoint privateEndpoint; + + /** + * The returned PrivateEndpoint instance, or null if {@link #isNotModified()} is true. + * @return the value + */ + public com.oracle.bmc.objectstorage.model.PrivateEndpoint getPrivateEndpoint() { + return privateEndpoint; + } + + /** + * Flag to indicate whether or not the object was modified. If this is true, + * the getter for the object itself will return null. Callers should check this + * if they specified one of the request params that might result in a conditional + * response (like 'if-match'/'if-none-match'). + */ + private boolean isNotModified; + + /** + * Flag to indicate whether or not the object was modified. If this is true, + * the getter for the object itself will return null. Callers should check this + * if they specified one of the request params that might result in a conditional + * response (like 'if-match'/'if-none-match'). + * @param true if the object was not modified + */ + public boolean isNotModified() { + return isNotModified; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcClientRequestId", + "opcRequestId", + "eTag", + "privateEndpoint", + "isNotModified" + }) + private GetPrivateEndpointResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcClientRequestId, + String opcRequestId, + String eTag, + com.oracle.bmc.objectstorage.model.PrivateEndpoint privateEndpoint, + boolean isNotModified) { + super(__httpStatusCode__, headers); + this.opcClientRequestId = opcClientRequestId; + this.opcRequestId = opcRequestId; + this.eTag = eTag; + this.privateEndpoint = privateEndpoint; + this.isNotModified = isNotModified; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + * @param opcClientRequestId the value to set + * @return this builder + */ + public Builder opcClientRequestId(String opcClientRequestId) { + this.opcClientRequestId = opcClientRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The entity tag (ETag) for the Private Endpoint. + */ + private String eTag; + + /** + * The entity tag (ETag) for the Private Endpoint. + * @param eTag the value to set + * @return this builder + */ + public Builder eTag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * The returned PrivateEndpoint instance, or null if {@link #isNotModified()} is true. + */ + private com.oracle.bmc.objectstorage.model.PrivateEndpoint privateEndpoint; + + /** + * The returned PrivateEndpoint instance, or null if {@link #isNotModified()} is true. + * @param privateEndpoint the value to set + * @return this builder + */ + public Builder privateEndpoint( + com.oracle.bmc.objectstorage.model.PrivateEndpoint privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Flag to indicate whether or not the object was modified. If this is true, + * the getter for the object itself will return null. Callers should check this + * if they specified one of the request params that might result in a conditional + * response (like 'if-match'/'if-none-match'). + */ + private boolean isNotModified; + + /** + * Flag to indicate whether or not the object was modified. If this is true, + * the getter for the object itself will return null. Callers should check this + * if they specified one of the request params that might result in a conditional + * response (like 'if-match'/'if-none-match'). + * @param true if the object was not modified + */ + public Builder isNotModified(boolean isNotModified) { + this.isNotModified = isNotModified; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetPrivateEndpointResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcClientRequestId(o.getOpcClientRequestId()); + opcRequestId(o.getOpcRequestId()); + eTag(o.getETag()); + privateEndpoint(o.getPrivateEndpoint()); + isNotModified(o.isNotModified()); + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetPrivateEndpointResponse build() { + return new GetPrivateEndpointResponse( + __httpStatusCode__, + headers, + opcClientRequestId, + opcRequestId, + eTag, + privateEndpoint, + isNotModified); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcClientRequestId=").append(String.valueOf(opcClientRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",eTag=").append(String.valueOf(eTag)); + sb.append(",privateEndpoint=").append(String.valueOf(privateEndpoint)); + sb.append(",isNotModified=").append(isNotModified); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetPrivateEndpointResponse)) { + return false; + } + + GetPrivateEndpointResponse other = (GetPrivateEndpointResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcClientRequestId, other.opcClientRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.eTag, other.eTag) + && java.util.Objects.equals(this.privateEndpoint, other.privateEndpoint) + && this.isNotModified == other.isNotModified; + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcClientRequestId == null + ? 43 + : this.opcClientRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.eTag == null ? 43 : this.eTag.hashCode()); + result = + (result * PRIME) + + (this.privateEndpoint == null ? 43 : this.privateEndpoint.hashCode()); + result = (result * PRIME) + (this.isNotModified ? 79 : 97); + return result; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/HeadObjectResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/HeadObjectResponse.java index 493230d0fa9..132b787b69e 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/HeadObjectResponse.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/HeadObjectResponse.java @@ -117,6 +117,113 @@ public String getOpcMultipartMd5() { return opcMultipartMd5; } + /** + * The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the object. + * Even for objects uploaded using multipart upload, this header returns the CRC32C (Castagnoli) checksum + * of the complete reconstructed object. + * + */ + private String opcContentCrc32c; + + /** + * The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the object. + * Even for objects uploaded using multipart upload, this header returns the CRC32C (Castagnoli) checksum + * of the complete reconstructed object. + * + * @return the value + */ + public String getOpcContentCrc32c() { + return opcContentCrc32c; + } + + /** + * Applicable only if SHA256 was specified in the opc-checksum-algorithm request header during upload. + * The base64-encoded SHA256 hash of the object as computed during upload. + * Unavailable for objects uploaded using multipart upload. + * + */ + private String opcContentSha256; + + /** + * Applicable only if SHA256 was specified in the opc-checksum-algorithm request header during upload. + * The base64-encoded SHA256 hash of the object as computed during upload. + * Unavailable for objects uploaded using multipart upload. + * + * @return the value + */ + public String getOpcContentSha256() { + return opcContentSha256; + } + + /** + * Only applicable to objects uploaded using multipart upload. + * Applicable only if SHA256 was specified in the opc-checksum-algorithm request header during upload. + * Base-64 representation of the multipart object SHA256 hash. + * The multipart object hash is calculated by taking the SHA256 hashes of the parts, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA256 hash of the concatenated values. + * + */ + private String opcMultipartSha256; + + /** + * Only applicable to objects uploaded using multipart upload. + * Applicable only if SHA256 was specified in the opc-checksum-algorithm request header during upload. + * Base-64 representation of the multipart object SHA256 hash. + * The multipart object hash is calculated by taking the SHA256 hashes of the parts, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA256 hash of the concatenated values. + * + * @return the value + */ + public String getOpcMultipartSha256() { + return opcMultipartSha256; + } + + /** + * Applicable only if SHA384 was specified in the opc-checksum-algorithm request header during upload. + * The base64-encoded SHA384 hash of the object as computed during upload. + * Unavailable for objects uploaded using multipart upload. + * + */ + private String opcContentSha384; + + /** + * Applicable only if SHA384 was specified in the opc-checksum-algorithm request header during upload. + * The base64-encoded SHA384 hash of the object as computed during upload. + * Unavailable for objects uploaded using multipart upload. + * + * @return the value + */ + public String getOpcContentSha384() { + return opcContentSha384; + } + + /** + * Only applicable to objects uploaded using multipart upload. + * Applicable only if SHA384 was specified in the opc-checksum-algorithm request header during upload. + * Base-64 representation of the multipart object SHA384 hash. + * The multipart object hash is calculated by taking the SHA384 hashes of the parts, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA384 hash of the concatenated values. + * + */ + private String opcMultipartSha384; + + /** + * Only applicable to objects uploaded using multipart upload. + * Applicable only if SHA384 was specified in the opc-checksum-algorithm request header during upload. + * Base-64 representation of the multipart object SHA384 hash. + * The multipart object hash is calculated by taking the SHA384 hashes of the parts, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA384 hash of the concatenated values. + * + * @return the value + */ + public String getOpcMultipartSha384() { + return opcMultipartSha384; + } + /** * Content-Type header, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.17). */ @@ -276,6 +383,11 @@ public boolean isNotModified() { "contentLength", "contentMd5", "opcMultipartMd5", + "opcContentCrc32c", + "opcContentSha256", + "opcMultipartSha256", + "opcContentSha384", + "opcMultipartSha384", "contentType", "contentLanguage", "contentEncoding", @@ -298,6 +410,11 @@ private HeadObjectResponse( Long contentLength, String contentMd5, String opcMultipartMd5, + String opcContentCrc32c, + String opcContentSha256, + String opcMultipartSha256, + String opcContentSha384, + String opcMultipartSha384, String contentType, String contentLanguage, String contentEncoding, @@ -317,6 +434,11 @@ private HeadObjectResponse( this.contentLength = contentLength; this.contentMd5 = contentMd5; this.opcMultipartMd5 = opcMultipartMd5; + this.opcContentCrc32c = opcContentCrc32c; + this.opcContentSha256 = opcContentSha256; + this.opcMultipartSha256 = opcMultipartSha256; + this.opcContentSha384 = opcContentSha384; + this.opcMultipartSha384 = opcMultipartSha384; this.contentType = contentType; this.contentLanguage = contentLanguage; this.contentEncoding = contentEncoding; @@ -468,6 +590,123 @@ public Builder opcMultipartMd5(String opcMultipartMd5) { return this; } + /** + * The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the object. + * Even for objects uploaded using multipart upload, this header returns the CRC32C (Castagnoli) checksum + * of the complete reconstructed object. + * + */ + private String opcContentCrc32c; + + /** + * The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the object. + * Even for objects uploaded using multipart upload, this header returns the CRC32C (Castagnoli) checksum + * of the complete reconstructed object. + * + * @param opcContentCrc32c the value to set + * @return this builder + */ + public Builder opcContentCrc32c(String opcContentCrc32c) { + this.opcContentCrc32c = opcContentCrc32c; + return this; + } + + /** + * Applicable only if SHA256 was specified in the opc-checksum-algorithm request header during upload. + * The base64-encoded SHA256 hash of the object as computed during upload. + * Unavailable for objects uploaded using multipart upload. + * + */ + private String opcContentSha256; + + /** + * Applicable only if SHA256 was specified in the opc-checksum-algorithm request header during upload. + * The base64-encoded SHA256 hash of the object as computed during upload. + * Unavailable for objects uploaded using multipart upload. + * + * @param opcContentSha256 the value to set + * @return this builder + */ + public Builder opcContentSha256(String opcContentSha256) { + this.opcContentSha256 = opcContentSha256; + return this; + } + + /** + * Only applicable to objects uploaded using multipart upload. + * Applicable only if SHA256 was specified in the opc-checksum-algorithm request header during upload. + * Base-64 representation of the multipart object SHA256 hash. + * The multipart object hash is calculated by taking the SHA256 hashes of the parts, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA256 hash of the concatenated values. + * + */ + private String opcMultipartSha256; + + /** + * Only applicable to objects uploaded using multipart upload. + * Applicable only if SHA256 was specified in the opc-checksum-algorithm request header during upload. + * Base-64 representation of the multipart object SHA256 hash. + * The multipart object hash is calculated by taking the SHA256 hashes of the parts, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA256 hash of the concatenated values. + * + * @param opcMultipartSha256 the value to set + * @return this builder + */ + public Builder opcMultipartSha256(String opcMultipartSha256) { + this.opcMultipartSha256 = opcMultipartSha256; + return this; + } + + /** + * Applicable only if SHA384 was specified in the opc-checksum-algorithm request header during upload. + * The base64-encoded SHA384 hash of the object as computed during upload. + * Unavailable for objects uploaded using multipart upload. + * + */ + private String opcContentSha384; + + /** + * Applicable only if SHA384 was specified in the opc-checksum-algorithm request header during upload. + * The base64-encoded SHA384 hash of the object as computed during upload. + * Unavailable for objects uploaded using multipart upload. + * + * @param opcContentSha384 the value to set + * @return this builder + */ + public Builder opcContentSha384(String opcContentSha384) { + this.opcContentSha384 = opcContentSha384; + return this; + } + + /** + * Only applicable to objects uploaded using multipart upload. + * Applicable only if SHA384 was specified in the opc-checksum-algorithm request header during upload. + * Base-64 representation of the multipart object SHA384 hash. + * The multipart object hash is calculated by taking the SHA384 hashes of the parts, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA384 hash of the concatenated values. + * + */ + private String opcMultipartSha384; + + /** + * Only applicable to objects uploaded using multipart upload. + * Applicable only if SHA384 was specified in the opc-checksum-algorithm request header during upload. + * Base-64 representation of the multipart object SHA384 hash. + * The multipart object hash is calculated by taking the SHA384 hashes of the parts, + * concatenating the binary representation of those hashes in order of their part numbers, + * and then calculating the SHA384 hash of the concatenated values. + * + * @param opcMultipartSha384 the value to set + * @return this builder + */ + public Builder opcMultipartSha384(String opcMultipartSha384) { + this.opcMultipartSha384 = opcMultipartSha384; + return this; + } + /** * Content-Type header, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.17). */ @@ -652,6 +891,11 @@ public Builder copy(HeadObjectResponse o) { contentLength(o.getContentLength()); contentMd5(o.getContentMd5()); opcMultipartMd5(o.getOpcMultipartMd5()); + opcContentCrc32c(o.getOpcContentCrc32c()); + opcContentSha256(o.getOpcContentSha256()); + opcMultipartSha256(o.getOpcMultipartSha256()); + opcContentSha384(o.getOpcContentSha384()); + opcMultipartSha384(o.getOpcMultipartSha384()); contentType(o.getContentType()); contentLanguage(o.getContentLanguage()); contentEncoding(o.getContentEncoding()); @@ -682,6 +926,11 @@ public HeadObjectResponse build() { contentLength, contentMd5, opcMultipartMd5, + opcContentCrc32c, + opcContentSha256, + opcMultipartSha256, + opcContentSha384, + opcMultipartSha384, contentType, contentLanguage, contentEncoding, @@ -716,6 +965,11 @@ public String toString() { sb.append(",contentLength=").append(String.valueOf(contentLength)); sb.append(",contentMd5=").append(String.valueOf(contentMd5)); sb.append(",opcMultipartMd5=").append(String.valueOf(opcMultipartMd5)); + sb.append(",opcContentCrc32c=").append(String.valueOf(opcContentCrc32c)); + sb.append(",opcContentSha256=").append(String.valueOf(opcContentSha256)); + sb.append(",opcMultipartSha256=").append(String.valueOf(opcMultipartSha256)); + sb.append(",opcContentSha384=").append(String.valueOf(opcContentSha384)); + sb.append(",opcMultipartSha384=").append(String.valueOf(opcMultipartSha384)); sb.append(",contentType=").append(String.valueOf(contentType)); sb.append(",contentLanguage=").append(String.valueOf(contentLanguage)); sb.append(",contentEncoding=").append(String.valueOf(contentEncoding)); @@ -749,6 +1003,11 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.contentLength, other.contentLength) && java.util.Objects.equals(this.contentMd5, other.contentMd5) && java.util.Objects.equals(this.opcMultipartMd5, other.opcMultipartMd5) + && java.util.Objects.equals(this.opcContentCrc32c, other.opcContentCrc32c) + && java.util.Objects.equals(this.opcContentSha256, other.opcContentSha256) + && java.util.Objects.equals(this.opcMultipartSha256, other.opcMultipartSha256) + && java.util.Objects.equals(this.opcContentSha384, other.opcContentSha384) + && java.util.Objects.equals(this.opcMultipartSha384, other.opcMultipartSha384) && java.util.Objects.equals(this.contentType, other.contentType) && java.util.Objects.equals(this.contentLanguage, other.contentLanguage) && java.util.Objects.equals(this.contentEncoding, other.contentEncoding) @@ -781,6 +1040,25 @@ public int hashCode() { result = (result * PRIME) + (this.opcMultipartMd5 == null ? 43 : this.opcMultipartMd5.hashCode()); + result = + (result * PRIME) + + (this.opcContentCrc32c == null ? 43 : this.opcContentCrc32c.hashCode()); + result = + (result * PRIME) + + (this.opcContentSha256 == null ? 43 : this.opcContentSha256.hashCode()); + result = + (result * PRIME) + + (this.opcMultipartSha256 == null + ? 43 + : this.opcMultipartSha256.hashCode()); + result = + (result * PRIME) + + (this.opcContentSha384 == null ? 43 : this.opcContentSha384.hashCode()); + result = + (result * PRIME) + + (this.opcMultipartSha384 == null + ? 43 + : this.opcMultipartSha384.hashCode()); result = (result * PRIME) + (this.contentType == null ? 43 : this.contentType.hashCode()); result = (result * PRIME) diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListPrivateEndpointsResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListPrivateEndpointsResponse.java new file mode 100644 index 00000000000..8b4f4f77e00 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListPrivateEndpointsResponse.java @@ -0,0 +1,279 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.responses; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class ListPrivateEndpointsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + * @return the value + */ + public String getOpcClientRequestId() { + return opcClientRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For paginating a list of PEs. + * In the GET request, set the limit to the number of Private Endpoint items that you want returned in the response. + * If the {@code opc-next-page} header appears in the response, then this is a partial list and there are additional + * Private Endpoint's to get. Include the header's value as the {@code page} parameter in the subsequent GET request to get the + * next batch of PEs. Repeat this process to retrieve the entire list of Private Endpoint's. + * By default, the page limit is set to 25 Private Endpoint's per page, but you can specify a value from 1 to 1000. + * For more details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For paginating a list of PEs. + * In the GET request, set the limit to the number of Private Endpoint items that you want returned in the response. + * If the {@code opc-next-page} header appears in the response, then this is a partial list and there are additional + * Private Endpoint's to get. Include the header's value as the {@code page} parameter in the subsequent GET request to get the + * next batch of PEs. Repeat this process to retrieve the entire list of Private Endpoint's. + * By default, the page limit is set to 25 Private Endpoint's per page, but you can specify a value from 1 to 1000. + * For more details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of com.oracle.bmc.objectstorage.model.PrivateEndpointSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.objectstorage.model.PrivateEndpointSummary instances. + * @return the value + */ + public java.util.List getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcClientRequestId", + "opcRequestId", + "opcNextPage", + "items" + }) + private ListPrivateEndpointsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcClientRequestId, + String opcRequestId, + String opcNextPage, + java.util.List items) { + super(__httpStatusCode__, headers); + this.opcClientRequestId = opcClientRequestId; + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + * @param opcClientRequestId the value to set + * @return this builder + */ + public Builder opcClientRequestId(String opcClientRequestId) { + this.opcClientRequestId = opcClientRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For paginating a list of PEs. + * In the GET request, set the limit to the number of Private Endpoint items that you want returned in the response. + * If the {@code opc-next-page} header appears in the response, then this is a partial list and there are additional + * Private Endpoint's to get. Include the header's value as the {@code page} parameter in the subsequent GET request to get the + * next batch of PEs. Repeat this process to retrieve the entire list of Private Endpoint's. + * By default, the page limit is set to 25 Private Endpoint's per page, but you can specify a value from 1 to 1000. + * For more details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For paginating a list of PEs. + * In the GET request, set the limit to the number of Private Endpoint items that you want returned in the response. + * If the {@code opc-next-page} header appears in the response, then this is a partial list and there are additional + * Private Endpoint's to get. Include the header's value as the {@code page} parameter in the subsequent GET request to get the + * next batch of PEs. Repeat this process to retrieve the entire list of Private Endpoint's. + * By default, the page limit is set to 25 Private Endpoint's per page, but you can specify a value from 1 to 1000. + * For more details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of com.oracle.bmc.objectstorage.model.PrivateEndpointSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.objectstorage.model.PrivateEndpointSummary instances. + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListPrivateEndpointsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcClientRequestId(o.getOpcClientRequestId()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListPrivateEndpointsResponse build() { + return new ListPrivateEndpointsResponse( + __httpStatusCode__, + headers, + opcClientRequestId, + opcRequestId, + opcNextPage, + items); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcClientRequestId=").append(String.valueOf(opcClientRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListPrivateEndpointsResponse)) { + return false; + } + + ListPrivateEndpointsResponse other = (ListPrivateEndpointsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcClientRequestId, other.opcClientRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcClientRequestId == null + ? 43 + : this.opcClientRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/PutObjectResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/PutObjectResponse.java index aa097412bbf..5b664b8de22 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/PutObjectResponse.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/PutObjectResponse.java @@ -39,18 +39,57 @@ public String getOpcRequestId() { } /** - * The base-64 encoded MD5 hash of the request body as computed by the server. + * The base64-encoded MD5 hash of the request body as computed by the server. */ private String opcContentMd5; /** - * The base-64 encoded MD5 hash of the request body as computed by the server. + * The base64-encoded MD5 hash of the request body as computed by the server. * @return the value */ public String getOpcContentMd5() { return opcContentMd5; } + /** + * The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the request body as computed by the server. Applicable only if CRC32C was specified in opc-checksum-algorithm request header during upload. + */ + private String opcContentCrc32c; + + /** + * The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the request body as computed by the server. Applicable only if CRC32C was specified in opc-checksum-algorithm request header during upload. + * @return the value + */ + public String getOpcContentCrc32c() { + return opcContentCrc32c; + } + + /** + * The base64-encoded SHA256 hash of the request body as computed by the server. Applicable only if SHA256 was specified in opc-checksum-algorithm request header during upload. + */ + private String opcContentSha256; + + /** + * The base64-encoded SHA256 hash of the request body as computed by the server. Applicable only if SHA256 was specified in opc-checksum-algorithm request header during upload. + * @return the value + */ + public String getOpcContentSha256() { + return opcContentSha256; + } + + /** + * The base64-encoded SHA384 hash of the request body as computed by the server. Applicable only if SHA384 was specified in opc-checksum-algorithm request header during upload. + */ + private String opcContentSha384; + + /** + * The base64-encoded SHA384 hash of the request body as computed by the server. Applicable only if SHA384 was specified in opc-checksum-algorithm request header during upload. + * @return the value + */ + public String getOpcContentSha384() { + return opcContentSha384; + } + /** * The entity tag (ETag) for the object. */ @@ -96,6 +135,9 @@ public String getVersionId() { "opcClientRequestId", "opcRequestId", "opcContentMd5", + "opcContentCrc32c", + "opcContentSha256", + "opcContentSha384", "eTag", "lastModified", "versionId" @@ -106,6 +148,9 @@ private PutObjectResponse( String opcClientRequestId, String opcRequestId, String opcContentMd5, + String opcContentCrc32c, + String opcContentSha256, + String opcContentSha384, String eTag, java.util.Date lastModified, String versionId) { @@ -113,6 +158,9 @@ private PutObjectResponse( this.opcClientRequestId = opcClientRequestId; this.opcRequestId = opcRequestId; this.opcContentMd5 = opcContentMd5; + this.opcContentCrc32c = opcContentCrc32c; + this.opcContentSha256 = opcContentSha256; + this.opcContentSha384 = opcContentSha384; this.eTag = eTag; this.lastModified = lastModified; this.versionId = versionId; @@ -168,12 +216,12 @@ public Builder opcRequestId(String opcRequestId) { } /** - * The base-64 encoded MD5 hash of the request body as computed by the server. + * The base64-encoded MD5 hash of the request body as computed by the server. */ private String opcContentMd5; /** - * The base-64 encoded MD5 hash of the request body as computed by the server. + * The base64-encoded MD5 hash of the request body as computed by the server. * @param opcContentMd5 the value to set * @return this builder */ @@ -182,6 +230,51 @@ public Builder opcContentMd5(String opcContentMd5) { return this; } + /** + * The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the request body as computed by the server. Applicable only if CRC32C was specified in opc-checksum-algorithm request header during upload. + */ + private String opcContentCrc32c; + + /** + * The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the request body as computed by the server. Applicable only if CRC32C was specified in opc-checksum-algorithm request header during upload. + * @param opcContentCrc32c the value to set + * @return this builder + */ + public Builder opcContentCrc32c(String opcContentCrc32c) { + this.opcContentCrc32c = opcContentCrc32c; + return this; + } + + /** + * The base64-encoded SHA256 hash of the request body as computed by the server. Applicable only if SHA256 was specified in opc-checksum-algorithm request header during upload. + */ + private String opcContentSha256; + + /** + * The base64-encoded SHA256 hash of the request body as computed by the server. Applicable only if SHA256 was specified in opc-checksum-algorithm request header during upload. + * @param opcContentSha256 the value to set + * @return this builder + */ + public Builder opcContentSha256(String opcContentSha256) { + this.opcContentSha256 = opcContentSha256; + return this; + } + + /** + * The base64-encoded SHA384 hash of the request body as computed by the server. Applicable only if SHA384 was specified in opc-checksum-algorithm request header during upload. + */ + private String opcContentSha384; + + /** + * The base64-encoded SHA384 hash of the request body as computed by the server. Applicable only if SHA384 was specified in opc-checksum-algorithm request header during upload. + * @param opcContentSha384 the value to set + * @return this builder + */ + public Builder opcContentSha384(String opcContentSha384) { + this.opcContentSha384 = opcContentSha384; + return this; + } + /** * The entity tag (ETag) for the object. */ @@ -237,6 +330,9 @@ public Builder copy(PutObjectResponse o) { opcClientRequestId(o.getOpcClientRequestId()); opcRequestId(o.getOpcRequestId()); opcContentMd5(o.getOpcContentMd5()); + opcContentCrc32c(o.getOpcContentCrc32c()); + opcContentSha256(o.getOpcContentSha256()); + opcContentSha384(o.getOpcContentSha384()); eTag(o.getETag()); lastModified(o.getLastModified()); versionId(o.getVersionId()); @@ -255,6 +351,9 @@ public PutObjectResponse build() { opcClientRequestId, opcRequestId, opcContentMd5, + opcContentCrc32c, + opcContentSha256, + opcContentSha384, eTag, lastModified, versionId); @@ -277,6 +376,9 @@ public String toString() { sb.append(",opcClientRequestId=").append(String.valueOf(opcClientRequestId)); sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); sb.append(",opcContentMd5=").append(String.valueOf(opcContentMd5)); + sb.append(",opcContentCrc32c=").append(String.valueOf(opcContentCrc32c)); + sb.append(",opcContentSha256=").append(String.valueOf(opcContentSha256)); + sb.append(",opcContentSha384=").append(String.valueOf(opcContentSha384)); sb.append(",eTag=").append(String.valueOf(eTag)); sb.append(",lastModified=").append(String.valueOf(lastModified)); sb.append(",versionId=").append(String.valueOf(versionId)); @@ -298,6 +400,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.opcClientRequestId, other.opcClientRequestId) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) && java.util.Objects.equals(this.opcContentMd5, other.opcContentMd5) + && java.util.Objects.equals(this.opcContentCrc32c, other.opcContentCrc32c) + && java.util.Objects.equals(this.opcContentSha256, other.opcContentSha256) + && java.util.Objects.equals(this.opcContentSha384, other.opcContentSha384) && java.util.Objects.equals(this.eTag, other.eTag) && java.util.Objects.equals(this.lastModified, other.lastModified) && java.util.Objects.equals(this.versionId, other.versionId); @@ -316,6 +421,15 @@ public int hashCode() { result = (result * PRIME) + (this.opcContentMd5 == null ? 43 : this.opcContentMd5.hashCode()); + result = + (result * PRIME) + + (this.opcContentCrc32c == null ? 43 : this.opcContentCrc32c.hashCode()); + result = + (result * PRIME) + + (this.opcContentSha256 == null ? 43 : this.opcContentSha256.hashCode()); + result = + (result * PRIME) + + (this.opcContentSha384 == null ? 43 : this.opcContentSha384.hashCode()); result = (result * PRIME) + (this.eTag == null ? 43 : this.eTag.hashCode()); result = (result * PRIME) + (this.lastModified == null ? 43 : this.lastModified.hashCode()); result = (result * PRIME) + (this.versionId == null ? 43 : this.versionId.hashCode()); diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/UpdatePrivateEndpointResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/UpdatePrivateEndpointResponse.java new file mode 100644 index 00000000000..4b69d66377c --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/UpdatePrivateEndpointResponse.java @@ -0,0 +1,224 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.objectstorage.responses; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public class UpdatePrivateEndpointResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. If you need to contact Oracle about a + * particular request, provide this request ID. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. If you need to contact Oracle about a + * particular request, provide this request ID. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + * @return the value + */ + public String getOpcClientRequestId() { + return opcClientRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcClientRequestId", + "opcRequestId" + }) + private UpdatePrivateEndpointResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcClientRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcClientRequestId = opcClientRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. If you need to contact Oracle about a + * particular request, provide this request ID. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. If you need to contact Oracle about a + * particular request, provide this request ID. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + * @param opcClientRequestId the value to set + * @return this builder + */ + public Builder opcClientRequestId(String opcClientRequestId) { + this.opcClientRequestId = opcClientRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * request, provide this request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdatePrivateEndpointResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcClientRequestId(o.getOpcClientRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdatePrivateEndpointResponse build() { + return new UpdatePrivateEndpointResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + opcClientRequestId, + opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcClientRequestId=").append(String.valueOf(opcClientRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePrivateEndpointResponse)) { + return false; + } + + UpdatePrivateEndpointResponse other = (UpdatePrivateEndpointResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcClientRequestId, other.opcClientRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcClientRequestId == null + ? 43 + : this.opcClientRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/UploadPartResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/UploadPartResponse.java index 806a1296f2d..3e7b617bd78 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/UploadPartResponse.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/UploadPartResponse.java @@ -51,6 +51,45 @@ public String getOpcContentMd5() { return opcContentMd5; } + /** + * The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the request body as computed by the server. Applicable only if CRC32C was specified in opc-checksum-algorithm request header during upload. + */ + private String opcContentCrc32c; + + /** + * The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the request body as computed by the server. Applicable only if CRC32C was specified in opc-checksum-algorithm request header during upload. + * @return the value + */ + public String getOpcContentCrc32c() { + return opcContentCrc32c; + } + + /** + * The base64-encoded SHA256 hash of the request body as computed by the server. Applicable only if SHA256 was specified in opc-checksum-algorithm request header during upload. + */ + private String opcContentSha256; + + /** + * The base64-encoded SHA256 hash of the request body as computed by the server. Applicable only if SHA256 was specified in opc-checksum-algorithm request header during upload. + * @return the value + */ + public String getOpcContentSha256() { + return opcContentSha256; + } + + /** + * The base64-encoded SHA384 hash of the request body as computed by the server. Applicable only if SHA384 was specified in opc-checksum-algorithm request header during upload. + */ + private String opcContentSha384; + + /** + * The base64-encoded SHA384 hash of the request body as computed by the server. Applicable only if SHA384 was specified in opc-checksum-algorithm request header during upload. + * @return the value + */ + public String getOpcContentSha384() { + return opcContentSha384; + } + /** * The entity tag (ETag) for the object. */ @@ -70,6 +109,9 @@ public String getETag() { "opcClientRequestId", "opcRequestId", "opcContentMd5", + "opcContentCrc32c", + "opcContentSha256", + "opcContentSha384", "eTag" }) private UploadPartResponse( @@ -78,11 +120,17 @@ private UploadPartResponse( String opcClientRequestId, String opcRequestId, String opcContentMd5, + String opcContentCrc32c, + String opcContentSha256, + String opcContentSha384, String eTag) { super(__httpStatusCode__, headers); this.opcClientRequestId = opcClientRequestId; this.opcRequestId = opcRequestId; this.opcContentMd5 = opcContentMd5; + this.opcContentCrc32c = opcContentCrc32c; + this.opcContentSha256 = opcContentSha256; + this.opcContentSha384 = opcContentSha384; this.eTag = eTag; } @@ -150,6 +198,51 @@ public Builder opcContentMd5(String opcContentMd5) { return this; } + /** + * The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the request body as computed by the server. Applicable only if CRC32C was specified in opc-checksum-algorithm request header during upload. + */ + private String opcContentCrc32c; + + /** + * The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the request body as computed by the server. Applicable only if CRC32C was specified in opc-checksum-algorithm request header during upload. + * @param opcContentCrc32c the value to set + * @return this builder + */ + public Builder opcContentCrc32c(String opcContentCrc32c) { + this.opcContentCrc32c = opcContentCrc32c; + return this; + } + + /** + * The base64-encoded SHA256 hash of the request body as computed by the server. Applicable only if SHA256 was specified in opc-checksum-algorithm request header during upload. + */ + private String opcContentSha256; + + /** + * The base64-encoded SHA256 hash of the request body as computed by the server. Applicable only if SHA256 was specified in opc-checksum-algorithm request header during upload. + * @param opcContentSha256 the value to set + * @return this builder + */ + public Builder opcContentSha256(String opcContentSha256) { + this.opcContentSha256 = opcContentSha256; + return this; + } + + /** + * The base64-encoded SHA384 hash of the request body as computed by the server. Applicable only if SHA384 was specified in opc-checksum-algorithm request header during upload. + */ + private String opcContentSha384; + + /** + * The base64-encoded SHA384 hash of the request body as computed by the server. Applicable only if SHA384 was specified in opc-checksum-algorithm request header during upload. + * @param opcContentSha384 the value to set + * @return this builder + */ + public Builder opcContentSha384(String opcContentSha384) { + this.opcContentSha384 = opcContentSha384; + return this; + } + /** * The entity tag (ETag) for the object. */ @@ -175,6 +268,9 @@ public Builder copy(UploadPartResponse o) { opcClientRequestId(o.getOpcClientRequestId()); opcRequestId(o.getOpcRequestId()); opcContentMd5(o.getOpcContentMd5()); + opcContentCrc32c(o.getOpcContentCrc32c()); + opcContentSha256(o.getOpcContentSha256()); + opcContentSha384(o.getOpcContentSha384()); eTag(o.getETag()); return this; @@ -191,6 +287,9 @@ public UploadPartResponse build() { opcClientRequestId, opcRequestId, opcContentMd5, + opcContentCrc32c, + opcContentSha256, + opcContentSha384, eTag); } } @@ -211,6 +310,9 @@ public String toString() { sb.append(",opcClientRequestId=").append(String.valueOf(opcClientRequestId)); sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); sb.append(",opcContentMd5=").append(String.valueOf(opcContentMd5)); + sb.append(",opcContentCrc32c=").append(String.valueOf(opcContentCrc32c)); + sb.append(",opcContentSha256=").append(String.valueOf(opcContentSha256)); + sb.append(",opcContentSha384=").append(String.valueOf(opcContentSha384)); sb.append(",eTag=").append(String.valueOf(eTag)); sb.append(")"); return sb.toString(); @@ -230,6 +332,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.opcClientRequestId, other.opcClientRequestId) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) && java.util.Objects.equals(this.opcContentMd5, other.opcContentMd5) + && java.util.Objects.equals(this.opcContentCrc32c, other.opcContentCrc32c) + && java.util.Objects.equals(this.opcContentSha256, other.opcContentSha256) + && java.util.Objects.equals(this.opcContentSha384, other.opcContentSha384) && java.util.Objects.equals(this.eTag, other.eTag); } @@ -246,6 +351,15 @@ public int hashCode() { result = (result * PRIME) + (this.opcContentMd5 == null ? 43 : this.opcContentMd5.hashCode()); + result = + (result * PRIME) + + (this.opcContentCrc32c == null ? 43 : this.opcContentCrc32c.hashCode()); + result = + (result * PRIME) + + (this.opcContentSha256 == null ? 43 : this.opcContentSha256.hashCode()); + result = + (result * PRIME) + + (this.opcContentSha384 == null ? 43 : this.opcContentSha384.hashCode()); result = (result * PRIME) + (this.eTag == null ? 43 : this.eTag.hashCode()); return result; } diff --git a/bmc-objectstorage/pom.xml b/bmc-objectstorage/pom.xml index 2907835f5f0..9273ed87232 100644 --- a/bmc-objectstorage/pom.xml +++ b/bmc-objectstorage/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml diff --git a/bmc-oce/pom.xml b/bmc-oce/pom.xml index b7a1941afc0..7bd3c3417e9 100644 --- a/bmc-oce/pom.xml +++ b/bmc-oce/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-oce @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-ocicontrolcenter/pom.xml b/bmc-ocicontrolcenter/pom.xml index dcbce607d5d..4f85a0538fd 100644 --- a/bmc-ocicontrolcenter/pom.xml +++ b/bmc-ocicontrolcenter/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-ocicontrolcenter @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-ocvp/pom.xml b/bmc-ocvp/pom.xml index 83b2e8d3aa9..d524b9a7497 100644 --- a/bmc-ocvp/pom.xml +++ b/bmc-ocvp/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-ocvp @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/internal/http/ListSupportedVmwareSoftwareVersionsConverter.java b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/internal/http/ListSupportedVmwareSoftwareVersionsConverter.java index c187bd37b8f..800e7edece5 100644 --- a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/internal/http/ListSupportedVmwareSoftwareVersionsConverter.java +++ b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/internal/http/ListSupportedVmwareSoftwareVersionsConverter.java @@ -74,6 +74,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getHostShapeName())); } + if (request.getVersionToUpgrade() != null) { + target = + target.queryParam( + "versionToUpgrade", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getVersionToUpgrade())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/Cluster.java b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/Cluster.java index 24ed017365e..14e03782824 100644 --- a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/Cluster.java +++ b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/Cluster.java @@ -53,7 +53,8 @@ public final class Cluster extends com.oracle.bmc.http.internal.ExplicitlySetBmc "datastores", "vsphereType", "freeformTags", - "definedTags" + "definedTags", + "systemTags" }) public Cluster( String id, @@ -80,7 +81,8 @@ public Cluster( java.util.List datastores, VsphereTypes vsphereType, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> systemTags) { super(); this.id = id; this.computeAvailabilityDomain = computeAvailabilityDomain; @@ -107,6 +109,7 @@ public Cluster( this.vsphereType = vsphereType; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.systemTags = systemTags; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -650,6 +653,26 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -681,7 +704,8 @@ public Cluster build() { this.datastores, this.vsphereType, this.freeformTags, - this.definedTags); + this.definedTags, + this.systemTags); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -765,6 +789,9 @@ public Builder copy(Cluster model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } return this; } } @@ -1267,6 +1294,24 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + @Override public String toString() { return this.toString(true); @@ -1309,6 +1354,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", vsphereType=").append(String.valueOf(this.vsphereType)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(")"); return sb.toString(); } @@ -1351,6 +1397,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.vsphereType, other.vsphereType) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) && super.equals(other); } @@ -1437,6 +1484,7 @@ public int hashCode() { result = (result * PRIME) + (this.vsphereType == null ? 43 : this.vsphereType.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/ClusterSummary.java b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/ClusterSummary.java index 60a8c9295fc..b75913556a7 100644 --- a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/ClusterSummary.java +++ b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/ClusterSummary.java @@ -35,7 +35,8 @@ public final class ClusterSummary extends com.oracle.bmc.http.internal.Explicitl "initialHostOcpuCount", "vsphereType", "freeformTags", - "definedTags" + "definedTags", + "systemTags" }) public ClusterSummary( String id, @@ -53,7 +54,8 @@ public ClusterSummary( Float initialHostOcpuCount, VsphereTypes vsphereType, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> systemTags) { super(); this.id = id; this.computeAvailabilityDomain = computeAvailabilityDomain; @@ -71,6 +73,7 @@ public ClusterSummary( this.vsphereType = vsphereType; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.systemTags = systemTags; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -418,6 +421,26 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -440,7 +463,8 @@ public ClusterSummary build() { this.initialHostOcpuCount, this.vsphereType, this.freeformTags, - this.definedTags); + this.definedTags, + this.systemTags); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -497,6 +521,9 @@ public Builder copy(ClusterSummary model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } return this; } } @@ -822,6 +849,24 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + @Override public String toString() { return this.toString(true); @@ -854,6 +899,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", vsphereType=").append(String.valueOf(this.vsphereType)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(")"); return sb.toString(); } @@ -886,6 +932,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.vsphereType, other.vsphereType) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) && super.equals(other); } @@ -935,6 +982,7 @@ public int hashCode() { result = (result * PRIME) + (this.vsphereType == null ? 43 : this.vsphereType.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/DatastoreClusterTypes.java b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/DatastoreClusterTypes.java new file mode 100644 index 00000000000..c0c7f2c7dc7 --- /dev/null +++ b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/DatastoreClusterTypes.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.ocvp.model; + +/** + * Possible datastore cluster types. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20230701") +public enum DatastoreClusterTypes { + Management("MANAGEMENT"), + Workload("WORKLOAD"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DatastoreClusterTypes v : DatastoreClusterTypes.values()) { + map.put(v.getValue(), v); + } + } + + DatastoreClusterTypes(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DatastoreClusterTypes create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid DatastoreClusterTypes: " + key); + } +} diff --git a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/DatastoreDetails.java b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/DatastoreDetails.java index c06dec71fa5..2109122b1a7 100644 --- a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/DatastoreDetails.java +++ b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/DatastoreDetails.java @@ -5,7 +5,7 @@ package com.oracle.bmc.ocvp.model; /** - * Datastore summary for a getting an Sddc. + * Datastore details for a getting an Sddc. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields diff --git a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/EsxiHost.java b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/EsxiHost.java index 529237b6a87..b14b951eba0 100644 --- a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/EsxiHost.java +++ b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/EsxiHost.java @@ -56,7 +56,8 @@ public final class EsxiHost extends com.oracle.bmc.http.internal.ExplicitlySetBm "hostOcpuCount", "capacityReservationId", "freeformTags", - "definedTags" + "definedTags", + "systemTags" }) public EsxiHost( String id, @@ -87,7 +88,8 @@ public EsxiHost( Float hostOcpuCount, String capacityReservationId, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> systemTags) { super(); this.id = id; this.displayName = displayName; @@ -118,6 +120,7 @@ public EsxiHost( this.capacityReservationId = capacityReservationId; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.systemTags = systemTags; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -697,6 +700,26 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -732,7 +755,8 @@ public EsxiHost build() { this.hostOcpuCount, this.capacityReservationId, this.freeformTags, - this.definedTags); + this.definedTags, + this.systemTags); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -828,6 +852,9 @@ public Builder copy(EsxiHost model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } return this; } } @@ -1359,6 +1386,24 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + @Override public String toString() { return this.toString(true); @@ -1406,6 +1451,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", capacityReservationId=").append(String.valueOf(this.capacityReservationId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(")"); return sb.toString(); } @@ -1454,6 +1500,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.capacityReservationId, other.capacityReservationId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) && super.equals(other); } @@ -1556,6 +1603,7 @@ public int hashCode() { : this.capacityReservationId.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/EsxiHostSummary.java b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/EsxiHostSummary.java index 2994bea51c0..44a968f9572 100644 --- a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/EsxiHostSummary.java +++ b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/EsxiHostSummary.java @@ -46,7 +46,8 @@ public final class EsxiHostSummary extends com.oracle.bmc.http.internal.Explicit "isBillingContinuationInProgress", "isBillingSwappingInProgress", "freeformTags", - "definedTags" + "definedTags", + "systemTags" }) public EsxiHostSummary( String id, @@ -75,7 +76,8 @@ public EsxiHostSummary( Boolean isBillingContinuationInProgress, Boolean isBillingSwappingInProgress, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> systemTags) { super(); this.id = id; this.displayName = displayName; @@ -104,6 +106,7 @@ public EsxiHostSummary( this.isBillingSwappingInProgress = isBillingSwappingInProgress; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.systemTags = systemTags; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -647,6 +650,26 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -680,7 +703,8 @@ public EsxiHostSummary build() { this.isBillingContinuationInProgress, this.isBillingSwappingInProgress, this.freeformTags, - this.definedTags); + this.definedTags, + this.systemTags); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -770,6 +794,9 @@ public Builder copy(EsxiHostSummary model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } return this; } } @@ -1269,6 +1296,24 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + @Override public String toString() { return this.toString(true); @@ -1314,6 +1359,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.isBillingSwappingInProgress)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(")"); return sb.toString(); } @@ -1360,6 +1406,7 @@ public boolean equals(Object o) { this.isBillingSwappingInProgress, other.isBillingSwappingInProgress) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) && super.equals(other); } @@ -1452,6 +1499,7 @@ public int hashCode() { : this.isBillingSwappingInProgress.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/OperationTypes.java b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/OperationTypes.java index 50f1b1fa7a4..a41f8257510 100644 --- a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/OperationTypes.java +++ b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/OperationTypes.java @@ -22,6 +22,19 @@ public enum OperationTypes { SwapBilling("SWAP_BILLING"), ReplaceHost("REPLACE_HOST"), InPlaceUpgrade("IN_PLACE_UPGRADE"), + CreateDatastore("CREATE_DATASTORE"), + UpdateDatastore("UPDATE_DATASTORE"), + AddBlockVolumeToDatastore("ADD_BLOCK_VOLUME_TO_DATASTORE"), + DeleteDatastore("DELETE_DATASTORE"), + CreateDatastoreCluster("CREATE_DATASTORE_CLUSTER"), + UpdateDatastoreCluster("UPDATE_DATASTORE_CLUSTER"), + AttachDatastoreClusterToEsxiHost("ATTACH_DATASTORE_CLUSTER_TO_ESXI_HOST"), + AttachDatastoreClusterToCluster("ATTACH_DATASTORE_CLUSTER_TO_CLUSTER"), + DetachDatastoreClusterFromEsxiHost("DETACH_DATASTORE_CLUSTER_FROM_ESXI_HOST"), + DetachDatastoreClusterFromCluster("DETACH_DATASTORE_CLUSTER_FROM_CLUSTER"), + DeleteDatastoreCluster("DELETE_DATASTORE_CLUSTER"), + AddDatastoreToDatastoreCluster("ADD_DATASTORE_TO_DATASTORE_CLUSTER"), + RemoveDatastoreFromDatastoreCluster("REMOVE_DATASTORE_FROM_DATASTORE_CLUSTER"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/Sddc.java b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/Sddc.java index 52138109cd2..248dba47c8c 100644 --- a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/Sddc.java +++ b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/Sddc.java @@ -56,7 +56,8 @@ public final class Sddc extends com.oracle.bmc.http.internal.ExplicitlySetBmcMod "timeUpdated", "lifecycleState", "freeformTags", - "definedTags" + "definedTags", + "systemTags" }) public Sddc( String id, @@ -86,7 +87,8 @@ public Sddc( java.util.Date timeUpdated, LifecycleStates lifecycleState, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> systemTags) { super(); this.id = id; this.displayName = displayName; @@ -116,6 +118,7 @@ public Sddc( this.lifecycleState = lifecycleState; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.systemTags = systemTags; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -756,6 +759,26 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -790,7 +813,8 @@ public Sddc build() { this.timeUpdated, this.lifecycleState, this.freeformTags, - this.definedTags); + this.definedTags, + this.systemTags); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -883,6 +907,9 @@ public Builder copy(Sddc model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } return this; } } @@ -1477,6 +1504,24 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + @Override public String toString() { return this.toString(true); @@ -1520,6 +1565,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(")"); return sb.toString(); } @@ -1564,6 +1610,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) && super.equals(other); } @@ -1655,6 +1702,7 @@ public int hashCode() { + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/SddcSummary.java b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/SddcSummary.java index 5c373cb73d5..a350d05ae79 100644 --- a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/SddcSummary.java +++ b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/model/SddcSummary.java @@ -34,7 +34,8 @@ public final class SddcSummary extends com.oracle.bmc.http.internal.ExplicitlySe "lifecycleState", "isSingleHostSddc", "freeformTags", - "definedTags" + "definedTags", + "systemTags" }) public SddcSummary( String id, @@ -51,7 +52,8 @@ public SddcSummary( LifecycleStates lifecycleState, Boolean isSingleHostSddc, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> systemTags) { super(); this.id = id; this.displayName = displayName; @@ -68,6 +70,7 @@ public SddcSummary( this.isSingleHostSddc = isSingleHostSddc; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.systemTags = systemTags; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -397,6 +400,26 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -418,7 +441,8 @@ public SddcSummary build() { this.lifecycleState, this.isSingleHostSddc, this.freeformTags, - this.definedTags); + this.definedTags, + this.systemTags); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -472,6 +496,9 @@ public Builder copy(SddcSummary model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } return this; } } @@ -781,6 +808,24 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {orcl-cloud: {free-tier-retain: true}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + @Override public String toString() { return this.toString(true); @@ -810,6 +855,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isSingleHostSddc=").append(String.valueOf(this.isSingleHostSddc)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(")"); return sb.toString(); } @@ -839,6 +885,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.isSingleHostSddc, other.isSingleHostSddc) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) && super.equals(other); } @@ -875,6 +922,7 @@ public int hashCode() { + (this.isSingleHostSddc == null ? 43 : this.isSingleHostSddc.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/requests/DeleteClusterRequest.java b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/requests/DeleteClusterRequest.java index 738b2857622..65a64c05d46 100644 --- a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/requests/DeleteClusterRequest.java +++ b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/requests/DeleteClusterRequest.java @@ -12,13 +12,13 @@ public class DeleteClusterRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Cluster. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the SDDC Cluster. * */ private String clusterId; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Cluster. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the SDDC Cluster. * */ public String getClusterId() { @@ -69,13 +69,13 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Cluster. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the SDDC Cluster. * */ private String clusterId = null; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Cluster. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the SDDC Cluster. * * @param clusterId the value to set * @return this builder instance diff --git a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/requests/GetClusterRequest.java b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/requests/GetClusterRequest.java index 32dec301f27..c52dbe0bbd9 100644 --- a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/requests/GetClusterRequest.java +++ b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/requests/GetClusterRequest.java @@ -12,13 +12,13 @@ public class GetClusterRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Cluster. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the SDDC Cluster. * */ private String clusterId; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Cluster. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the SDDC Cluster. * */ public String getClusterId() { @@ -48,13 +48,13 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Cluster. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the SDDC Cluster. * */ private String clusterId = null; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Cluster. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the SDDC Cluster. * * @param clusterId the value to set * @return this builder instance diff --git a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/requests/ListEsxiHostsRequest.java b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/requests/ListEsxiHostsRequest.java index bcf76a23c43..d389145505e 100644 --- a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/requests/ListEsxiHostsRequest.java +++ b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/requests/ListEsxiHostsRequest.java @@ -25,13 +25,13 @@ public String getSddcId() { return sddcId; } /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Cluster. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the SDDC Cluster. * */ private String clusterId; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Cluster. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the SDDC Cluster. * */ public String getClusterId() { @@ -270,13 +270,13 @@ public Builder sddcId(String sddcId) { } /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Cluster. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the SDDC Cluster. * */ private String clusterId = null; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Cluster. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the SDDC Cluster. * * @param clusterId the value to set * @return this builder instance diff --git a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/requests/ListSupportedVmwareSoftwareVersionsRequest.java b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/requests/ListSupportedVmwareSoftwareVersionsRequest.java index f76e902fd21..f26fcbec60a 100644 --- a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/requests/ListSupportedVmwareSoftwareVersionsRequest.java +++ b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/requests/ListSupportedVmwareSoftwareVersionsRequest.java @@ -94,6 +94,17 @@ public String getVersion() { public String getHostShapeName() { return hostShapeName; } + /** + * A filter to return only VMware software versions that the given VMware software version can be upgraded to. + */ + private String versionToUpgrade; + + /** + * A filter to return only VMware software versions that the given VMware software version can be upgraded to. + */ + public String getVersionToUpgrade() { + return versionToUpgrade; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -208,6 +219,21 @@ public Builder hostShapeName(String hostShapeName) { return this; } + /** + * A filter to return only VMware software versions that the given VMware software version can be upgraded to. + */ + private String versionToUpgrade = null; + + /** + * A filter to return only VMware software versions that the given VMware software version can be upgraded to. + * @param versionToUpgrade the value to set + * @return this builder instance + */ + public Builder versionToUpgrade(String versionToUpgrade) { + this.versionToUpgrade = versionToUpgrade; + return this; + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -242,6 +268,7 @@ public Builder copy(ListSupportedVmwareSoftwareVersionsRequest o) { opcRequestId(o.getOpcRequestId()); version(o.getVersion()); hostShapeName(o.getHostShapeName()); + versionToUpgrade(o.getVersionToUpgrade()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -281,8 +308,9 @@ public ListSupportedVmwareSoftwareVersionsRequest buildWithoutInvocationCallback request.opcRequestId = opcRequestId; request.version = version; request.hostShapeName = hostShapeName; + request.versionToUpgrade = versionToUpgrade; return request; - // new ListSupportedVmwareSoftwareVersionsRequest(compartmentId, limit, page, opcRequestId, version, hostShapeName); + // new ListSupportedVmwareSoftwareVersionsRequest(compartmentId, limit, page, opcRequestId, version, hostShapeName, versionToUpgrade); } } @@ -297,7 +325,8 @@ public Builder toBuilder() { .page(page) .opcRequestId(opcRequestId) .version(version) - .hostShapeName(hostShapeName); + .hostShapeName(hostShapeName) + .versionToUpgrade(versionToUpgrade); } /** @@ -319,6 +348,7 @@ public String toString() { sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); sb.append(",version=").append(String.valueOf(this.version)); sb.append(",hostShapeName=").append(String.valueOf(this.hostShapeName)); + sb.append(",versionToUpgrade=").append(String.valueOf(this.versionToUpgrade)); sb.append(")"); return sb.toString(); } @@ -340,7 +370,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.page, other.page) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) && java.util.Objects.equals(this.version, other.version) - && java.util.Objects.equals(this.hostShapeName, other.hostShapeName); + && java.util.Objects.equals(this.hostShapeName, other.hostShapeName) + && java.util.Objects.equals(this.versionToUpgrade, other.versionToUpgrade); } @Override @@ -357,6 +388,9 @@ public int hashCode() { result = (result * PRIME) + (this.hostShapeName == null ? 43 : this.hostShapeName.hashCode()); + result = + (result * PRIME) + + (this.versionToUpgrade == null ? 43 : this.versionToUpgrade.hashCode()); return result; } } diff --git a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/requests/UpdateClusterRequest.java b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/requests/UpdateClusterRequest.java index 5c6ec0908ff..57ac65a183a 100644 --- a/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/requests/UpdateClusterRequest.java +++ b/bmc-ocvp/src/main/java/com/oracle/bmc/ocvp/requests/UpdateClusterRequest.java @@ -13,13 +13,13 @@ public class UpdateClusterRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Cluster. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the SDDC Cluster. * */ private String clusterId; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Cluster. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the SDDC Cluster. * */ public String getClusterId() { @@ -91,13 +91,13 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Cluster. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the SDDC Cluster. * */ private String clusterId = null; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Cluster. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the SDDC Cluster. * * @param clusterId the value to set * @return this builder instance diff --git a/bmc-oda/pom.xml b/bmc-oda/pom.xml index 71400478bba..e2fd60f28e8 100644 --- a/bmc-oda/pom.xml +++ b/bmc-oda/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-oda @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-onesubscription/pom.xml b/bmc-onesubscription/pom.xml index 910c5969a3f..26471b3b756 100644 --- a/bmc-onesubscription/pom.xml +++ b/bmc-onesubscription/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-onesubscription @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-ons/pom.xml b/bmc-ons/pom.xml index 464ae6f521f..7b8b3f35b52 100644 --- a/bmc-ons/pom.xml +++ b/bmc-ons/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-ons @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-opa/pom.xml b/bmc-opa/pom.xml index 0db5c1a1583..a304183bb1b 100644 --- a/bmc-opa/pom.xml +++ b/bmc-opa/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-opa @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-opensearch/pom.xml b/bmc-opensearch/pom.xml index c7a17a48380..ff2414755c9 100644 --- a/bmc-opensearch/pom.xml +++ b/bmc-opensearch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-opensearch @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-operatoraccesscontrol/pom.xml b/bmc-operatoraccesscontrol/pom.xml index 09624d0cfc8..079bbb400fd 100644 --- a/bmc-operatoraccesscontrol/pom.xml +++ b/bmc-operatoraccesscontrol/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-operatoraccesscontrol @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-opsi/pom.xml b/bmc-opsi/pom.xml index faa79be4002..fda21cd6c87 100644 --- a/bmc-opsi/pom.xml +++ b/bmc-opsi/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-opsi @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/OperationsInsights.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/OperationsInsights.java index 9d52d2d8d1b..965c6218189 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/OperationsInsights.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/OperationsInsights.java @@ -8,9 +8,9 @@ import com.oracle.bmc.opsi.responses.*; /** - * Use the Operations Insights API to perform data extraction operations to obtain database + * Use the Ops Insights API to perform data extraction operations to obtain database * resource utilization, performance statistics, and reference information. For more information, - * see [About Oracle Cloud Infrastructure Operations Insights](https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). + * see [About Oracle Cloud Infrastructure Ops Insights](https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). * * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. */ @@ -154,6 +154,20 @@ ChangeExadataInsightCompartmentResponse changeExadataInsightCompartment( ChangeHostInsightCompartmentResponse changeHostInsightCompartment( ChangeHostInsightCompartmentRequest request); + /** + * Change the connection details of a Cloud MACS-managed database insight. When provided, If-Match is checked against ETag values of the resource. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ChangeMacsManagedCloudDatabaseInsightConnection API. + */ + ChangeMacsManagedCloudDatabaseInsightConnectionResponse + changeMacsManagedCloudDatabaseInsightConnection( + ChangeMacsManagedCloudDatabaseInsightConnectionRequest request); + /** * Moves a news report resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. * @param request The request object containing the details to send @@ -289,7 +303,7 @@ CreateEnterpriseManagerBridgeResponse createEnterpriseManagerBridge( CreateExadataInsightResponse createExadataInsight(CreateExadataInsightRequest request); /** - * Create a Host Insight resource for a host in Operations Insights. The host will be enabled in Operations Insights. Host metric collection and analysis will be started. + * Create a Host Insight resource for a host in Ops Insights. The host will be enabled in Ops Insights. Host metric collection and analysis will be started. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -302,7 +316,7 @@ CreateEnterpriseManagerBridgeResponse createEnterpriseManagerBridge( CreateHostInsightResponse createHostInsight(CreateHostInsightRequest request); /** - * Create a news report in Operations Insights. The report will be enabled in Operations Insights. Insights will be emailed as per selected frequency. + * Create a news report in Ops Insights. The report will be enabled in Ops Insights. Insights will be emailed as per selected frequency. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -315,7 +329,7 @@ CreateEnterpriseManagerBridgeResponse createEnterpriseManagerBridge( CreateNewsReportResponse createNewsReport(CreateNewsReportRequest request); /** - * Create a private endpoint resource for the tenant in Operations Insights. + * Create a private endpoint resource for the tenant in Ops Insights. * This resource will be created in customer compartment. * * @param request The request object containing the details to send @@ -330,7 +344,7 @@ CreateOperationsInsightsPrivateEndpointResponse createOperationsInsightsPrivateE CreateOperationsInsightsPrivateEndpointRequest request); /** - * Create a Operations Insights Warehouse resource for the tenant in Operations Insights. New ADW will be provisioned for this tenant. + * Create a Ops Insights Warehouse resource for the tenant in Ops Insights. New ADW will be provisioned for this tenant. * There is only expected to be 1 warehouse per tenant. The warehouse is expected to be in the root compartment. If the 'opsi-warehouse-type' * header is passed to the API, a warehouse resource without ADW or Schema provisioning is created. * @@ -576,7 +590,7 @@ DeleteOperationsInsightsWarehouseUserResponse deleteOperationsInsightsWarehouseU DisableExadataInsightResponse disableExadataInsight(DisableExadataInsightRequest request); /** - * Disables a host in Operations Insights. Host metric collection and analysis will be stopped. + * Disables a host in Ops Insights. Host metric collection and analysis will be stopped. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -651,7 +665,7 @@ DownloadOperationsInsightsWarehouseWalletResponse downloadOperationsInsightsWare EnableExadataInsightResponse enableExadataInsight(EnableExadataInsightRequest request); /** - * Enables a host in Operations Insights. Host metric collection and analysis will be started. + * Enables a host in Ops Insights. Host metric collection and analysis will be started. * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -813,7 +827,7 @@ GetOperationsInsightsPrivateEndpointResponse getOperationsInsightsPrivateEndpoin GetOperationsInsightsPrivateEndpointRequest request); /** - * Gets details of an Operations Insights Warehouse. + * Gets details of an Ops Insights Warehouse. * There is only expected to be 1 warehouse per tenant. The warehouse is expected to be in the root compartment. * * @param request The request object containing the details to send @@ -944,7 +958,36 @@ IngestDatabaseConfigurationResponse ingestDatabaseConfiguration( IngestHostMetricsResponse ingestHostMetrics(IngestHostMetricsRequest request); /** - * The sqlbucket endpoint takes in a JSON payload, persists it in Operations Insights ingest pipeline. + * The MySql SQL Stats endpoint takes in a JSON payload, persists it in Ops Insights ingest pipeline. + * Either databaseId or id must be specified. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use IngestMySqlSqlStats API. + */ + IngestMySqlSqlStatsResponse ingestMySqlSqlStats(IngestMySqlSqlStatsRequest request); + + /** + * The SqlText endpoint takes in a JSON payload, persists it in Operation Insights ingest pipeline. + * Either databaseId or id must be specified. + * Disclaimer: SQL text being uploaded explicitly via APIs is already masked. All sensitive literals contained in the sqlFullText column are masked prior to ingestion. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use IngestMySqlSqlText API. + */ + IngestMySqlSqlTextResponse ingestMySqlSqlText(IngestMySqlSqlTextRequest request); + + /** + * The sqlbucket endpoint takes in a JSON payload, persists it in Ops Insights ingest pipeline. * Either databaseId or id must be specified. * * @param request The request object containing the details to send @@ -972,7 +1015,7 @@ IngestDatabaseConfigurationResponse ingestDatabaseConfiguration( IngestSqlPlanLinesResponse ingestSqlPlanLines(IngestSqlPlanLinesRequest request); /** - * The SQL Stats endpoint takes in a JSON payload, persists it in Operations Insights ingest pipeline. + * The SQL Stats endpoint takes in a JSON payload, persists it in Ops Insights ingest pipeline. * Either databaseId or id must be specified. * * @param request The request object containing the details to send @@ -1192,7 +1235,7 @@ ListDatabaseConfigurationsResponse listDatabaseConfigurations( ListDatabaseInsightsResponse listDatabaseInsights(ListDatabaseInsightsRequest request); /** - * Gets a list of Operations Insights Enterprise Manager bridges. Either compartmentId or id must be specified. + * Gets a list of Ops Insights Enterprise Manager bridges. Either compartmentId or id must be specified. * When both compartmentId and compartmentIdInSubtree are specified, a list of bridges in that compartment and in all sub-compartments will be returned. * * @param request The request object containing the details to send @@ -1367,7 +1410,7 @@ ListOperationsInsightsWarehouseUsersResponse listOperationsInsightsWarehouseUser ListOperationsInsightsWarehouseUsersRequest request); /** - * Gets a list of Operations Insights warehouses. Either compartmentId or id must be specified. + * Gets a list of Ops Insights warehouses. Either compartmentId or id must be specified. * There is only expected to be 1 warehouse per tenant. The warehouse is expected to be in the root compartment. * * @param request The request object containing the details to send @@ -2150,6 +2193,20 @@ SummarizeHostInsightDiskStatisticsResponse summarizeHostInsightDiskStatistics( SummarizeHostInsightHostRecommendationResponse summarizeHostInsightHostRecommendation( SummarizeHostInsightHostRecommendationRequest request); + /** + * Returns response with usage time series data with breakdown by IO interface for the time period specified. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use SummarizeHostInsightIoUsageTrend API. + */ + SummarizeHostInsightIoUsageTrendResponse summarizeHostInsightIoUsageTrend( + SummarizeHostInsightIoUsageTrendRequest request); + /** * Returns response with usage time series data with breakdown by network interface for the time period specified. * @@ -2409,6 +2466,20 @@ SummarizeSqlStatisticsTimeSeriesResponse summarizeSqlStatisticsTimeSeries( SummarizeSqlStatisticsTimeSeriesByPlanResponse summarizeSqlStatisticsTimeSeriesByPlan( SummarizeSqlStatisticsTimeSeriesByPlanRequest request); + /** + * Test the connection details of a Cloud MACS-managed database. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use TestMacsManagedCloudDatabaseInsightConnection API. + */ + TestMacsManagedCloudDatabaseInsightConnectionResponse + testMacsManagedCloudDatabaseInsightConnection( + TestMacsManagedCloudDatabaseInsightConnectionRequest request); + /** * Updates the configuration of a hub . * @param request The request object containing the details to send @@ -2508,7 +2579,7 @@ UpdateOperationsInsightsPrivateEndpointResponse updateOperationsInsightsPrivateE UpdateOperationsInsightsPrivateEndpointRequest request); /** - * Updates the configuration of an Operations Insights Warehouse. + * Updates the configuration of an Ops Insights Warehouse. * There is only expected to be 1 warehouse per tenant. The warehouse is expected to be in the root compartment. * * @param request The request object containing the details to send diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/OperationsInsightsAsync.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/OperationsInsightsAsync.java index 4b7fe7ba4c1..931b2aefdfd 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/OperationsInsightsAsync.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/OperationsInsightsAsync.java @@ -8,9 +8,9 @@ import com.oracle.bmc.opsi.responses.*; /** - * Use the Operations Insights API to perform data extraction operations to obtain database + * Use the Ops Insights API to perform data extraction operations to obtain database * resource utilization, performance statistics, and reference information. For more information, - * see [About Oracle Cloud Infrastructure Operations Insights](https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). + * see [About Oracle Cloud Infrastructure Ops Insights](https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). * */ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") @@ -184,6 +184,24 @@ java.util.concurrent.Future changeHostInsi ChangeHostInsightCompartmentResponse> handler); + /** + * Change the connection details of a Cloud MACS-managed database insight. When provided, If-Match is checked against ETag values of the resource. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + changeMacsManagedCloudDatabaseInsightConnection( + ChangeMacsManagedCloudDatabaseInsightConnectionRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeMacsManagedCloudDatabaseInsightConnectionRequest, + ChangeMacsManagedCloudDatabaseInsightConnectionResponse> + handler); + /** * Moves a news report resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. * @@ -360,7 +378,7 @@ java.util.concurrent.Future createExadataInsight( handler); /** - * Create a Host Insight resource for a host in Operations Insights. The host will be enabled in Operations Insights. Host metric collection and analysis will be started. + * Create a Host Insight resource for a host in Ops Insights. The host will be enabled in Ops Insights. Host metric collection and analysis will be started. * * * @param request The request object containing the details to send @@ -377,7 +395,7 @@ java.util.concurrent.Future createHostInsight( handler); /** - * Create a news report in Operations Insights. The report will be enabled in Operations Insights. Insights will be emailed as per selected frequency. + * Create a news report in Ops Insights. The report will be enabled in Ops Insights. Insights will be emailed as per selected frequency. * * * @param request The request object containing the details to send @@ -393,7 +411,7 @@ java.util.concurrent.Future createNewsReport( handler); /** - * Create a private endpoint resource for the tenant in Operations Insights. + * Create a private endpoint resource for the tenant in Ops Insights. * This resource will be created in customer compartment. * * @@ -413,7 +431,7 @@ java.util.concurrent.Future createNewsReport( handler); /** - * Create a Operations Insights Warehouse resource for the tenant in Operations Insights. New ADW will be provisioned for this tenant. + * Create a Ops Insights Warehouse resource for the tenant in Ops Insights. New ADW will be provisioned for this tenant. * There is only expected to be 1 warehouse per tenant. The warehouse is expected to be in the root compartment. If the 'opsi-warehouse-type' * header is passed to the API, a warehouse resource without ADW or Schema provisioning is created. * @@ -739,7 +757,7 @@ java.util.concurrent.Future disableExadataInsight handler); /** - * Disables a host in Operations Insights. Host metric collection and analysis will be stopped. + * Disables a host in Ops Insights. Host metric collection and analysis will be stopped. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -839,7 +857,7 @@ java.util.concurrent.Future enableExadataInsight( handler); /** - * Enables a host in Operations Insights. Host metric collection and analysis will be started. + * Enables a host in Ops Insights. Host metric collection and analysis will be started. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -1046,7 +1064,7 @@ java.util.concurrent.Future getNewsReport( handler); /** - * Gets details of an Operations Insights Warehouse. + * Gets details of an Ops Insights Warehouse. * There is only expected to be 1 warehouse per tenant. The warehouse is expected to be in the root compartment. * * @@ -1216,7 +1234,44 @@ java.util.concurrent.Future ingestHostMetrics( handler); /** - * The sqlbucket endpoint takes in a JSON payload, persists it in Operations Insights ingest pipeline. + * The MySql SQL Stats endpoint takes in a JSON payload, persists it in Ops Insights ingest pipeline. + * Either databaseId or id must be specified. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future ingestMySqlSqlStats( + IngestMySqlSqlStatsRequest request, + com.oracle.bmc.responses.AsyncHandler< + IngestMySqlSqlStatsRequest, IngestMySqlSqlStatsResponse> + handler); + + /** + * The SqlText endpoint takes in a JSON payload, persists it in Operation Insights ingest pipeline. + * Either databaseId or id must be specified. + * Disclaimer: SQL text being uploaded explicitly via APIs is already masked. All sensitive literals contained in the sqlFullText column are masked prior to ingestion. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future ingestMySqlSqlText( + IngestMySqlSqlTextRequest request, + com.oracle.bmc.responses.AsyncHandler< + IngestMySqlSqlTextRequest, IngestMySqlSqlTextResponse> + handler); + + /** + * The sqlbucket endpoint takes in a JSON payload, persists it in Ops Insights ingest pipeline. * Either databaseId or id must be specified. * * @@ -1251,7 +1306,7 @@ java.util.concurrent.Future ingestSqlPlanLines( handler); /** - * The SQL Stats endpoint takes in a JSON payload, persists it in Operations Insights ingest pipeline. + * The SQL Stats endpoint takes in a JSON payload, persists it in Ops Insights ingest pipeline. * Either databaseId or id must be specified. * * @@ -1527,7 +1582,7 @@ java.util.concurrent.Future listDatabaseInsights( handler); /** - * Gets a list of Operations Insights Enterprise Manager bridges. Either compartmentId or id must be specified. + * Gets a list of Ops Insights Enterprise Manager bridges. Either compartmentId or id must be specified. * When both compartmentId and compartmentIdInSubtree are specified, a list of bridges in that compartment and in all sub-compartments will be returned. * * @@ -1750,7 +1805,7 @@ java.util.concurrent.Future listNewsReports( handler); /** - * Gets a list of Operations Insights warehouses. Either compartmentId or id must be specified. + * Gets a list of Ops Insights warehouses. Either compartmentId or id must be specified. * There is only expected to be 1 warehouse per tenant. The warehouse is expected to be in the root compartment. * * @@ -2711,6 +2766,25 @@ java.util.concurrent.Future summarizeExadataMem SummarizeHostInsightHostRecommendationResponse> handler); + /** + * Returns response with usage time series data with breakdown by IO interface for the time period specified. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + summarizeHostInsightIoUsageTrend( + SummarizeHostInsightIoUsageTrendRequest request, + com.oracle.bmc.responses.AsyncHandler< + SummarizeHostInsightIoUsageTrendRequest, + SummarizeHostInsightIoUsageTrendResponse> + handler); + /** * Returns response with usage time series data with breakdown by network interface for the time period specified. * @@ -3049,6 +3123,24 @@ java.util.concurrent.Future summarizeSqlStatisti SummarizeSqlStatisticsTimeSeriesByPlanResponse> handler); + /** + * Test the connection details of a Cloud MACS-managed database. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + testMacsManagedCloudDatabaseInsightConnection( + TestMacsManagedCloudDatabaseInsightConnectionRequest request, + com.oracle.bmc.responses.AsyncHandler< + TestMacsManagedCloudDatabaseInsightConnectionRequest, + TestMacsManagedCloudDatabaseInsightConnectionResponse> + handler); + /** * Updates the configuration of a hub . * @@ -3180,7 +3272,7 @@ java.util.concurrent.Future updateNewsReport( handler); /** - * Updates the configuration of an Operations Insights Warehouse. + * Updates the configuration of an Ops Insights Warehouse. * There is only expected to be 1 warehouse per tenant. The warehouse is expected to be in the root compartment. * * diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/OperationsInsightsAsyncClient.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/OperationsInsightsAsyncClient.java index 3cf5910c570..8dca28c2c08 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/OperationsInsightsAsyncClient.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/OperationsInsightsAsyncClient.java @@ -482,7 +482,7 @@ public java.util.concurrent.Future addExadataI "OperationsInsights", "AddExadataInsightMembers", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/AddExadataInsightMembers"); final java.util.function.Function< javax.ws.rs.core.Response, AddExadataInsightMembersResponse> transformer = @@ -539,7 +539,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ChangeAutonomousDatabaseInsightAdvancedFeatures", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ChangeAutonomousDatabaseInsightAdvancedFeatures"); final java.util.function.Function< javax.ws.rs.core.Response, ChangeAutonomousDatabaseInsightAdvancedFeaturesResponse> @@ -601,7 +601,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ChangeAwrHubSourceCompartment", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubSources/ChangeAwrHubSourceCompartment"); final java.util.function.Function< javax.ws.rs.core.Response, ChangeAwrHubSourceCompartmentResponse> transformer = @@ -658,7 +658,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ChangeDatabaseInsightCompartment", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ChangeDatabaseInsightCompartment"); final java.util.function.Function< javax.ws.rs.core.Response, ChangeDatabaseInsightCompartmentResponse> transformer = @@ -717,7 +717,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ChangeEnterpriseManagerBridgeCompartment", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/EnterpriseManagerBridges/ChangeEnterpriseManagerBridgeCompartment"); final java.util.function.Function< javax.ws.rs.core.Response, ChangeEnterpriseManagerBridgeCompartmentResponse> transformer = @@ -778,7 +778,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ChangeExadataInsightCompartment", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/ChangeExadataInsightCompartment"); final java.util.function.Function< javax.ws.rs.core.Response, ChangeExadataInsightCompartmentResponse> transformer = @@ -837,7 +837,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ChangeHostInsightCompartment", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ChangeHostInsightCompartment"); final java.util.function.Function< javax.ws.rs.core.Response, ChangeHostInsightCompartmentResponse> transformer = @@ -875,6 +875,69 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + changeMacsManagedCloudDatabaseInsightConnection( + ChangeMacsManagedCloudDatabaseInsightConnectionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeMacsManagedCloudDatabaseInsightConnectionRequest, + ChangeMacsManagedCloudDatabaseInsightConnectionResponse> + handler) { + LOG.trace("Called async changeMacsManagedCloudDatabaseInsightConnection"); + final ChangeMacsManagedCloudDatabaseInsightConnectionRequest interceptedRequest = + ChangeMacsManagedCloudDatabaseInsightConnectionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeMacsManagedCloudDatabaseInsightConnectionConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OperationsInsights", + "ChangeMacsManagedCloudDatabaseInsightConnection", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ChangeMacsManagedCloudDatabaseInsightConnection"); + final java.util.function.Function< + javax.ws.rs.core.Response, + ChangeMacsManagedCloudDatabaseInsightConnectionResponse> + transformer = + ChangeMacsManagedCloudDatabaseInsightConnectionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeMacsManagedCloudDatabaseInsightConnectionRequest, + ChangeMacsManagedCloudDatabaseInsightConnectionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeMacsManagedCloudDatabaseInsightConnectionRequest, + ChangeMacsManagedCloudDatabaseInsightConnectionResponse>, + java.util.concurrent.Future< + ChangeMacsManagedCloudDatabaseInsightConnectionResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getChangeMacsManagedCloudDatabaseInsightConnectionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeMacsManagedCloudDatabaseInsightConnectionRequest, + ChangeMacsManagedCloudDatabaseInsightConnectionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future changeNewsReportCompartment( @@ -894,7 +957,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ChangeNewsReportCompartment", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/NewsReports/ChangeNewsReportCompartment"); final java.util.function.Function< javax.ws.rs.core.Response, ChangeNewsReportCompartmentResponse> transformer = @@ -953,7 +1016,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ChangeOperationsInsightsPrivateEndpointCompartment", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsPrivateEndpoint/ChangeOperationsInsightsPrivateEndpointCompartment"); final java.util.function.Function< javax.ws.rs.core.Response, ChangeOperationsInsightsPrivateEndpointCompartmentResponse> @@ -1016,7 +1079,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ChangeOperationsInsightsWarehouseCompartment", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/ChangeOperationsInsightsWarehouseCompartment"); final java.util.function.Function< javax.ws.rs.core.Response, ChangeOperationsInsightsWarehouseCompartmentResponse> @@ -1078,7 +1141,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ChangeOpsiConfigurationCompartment", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiConfigurations/ChangeOpsiConfigurationCompartment"); final java.util.function.Function< javax.ws.rs.core.Response, ChangeOpsiConfigurationCompartmentResponse> transformer = @@ -1137,7 +1200,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ChangePeComanagedDatabaseInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ChangePeComanagedDatabaseInsight"); final java.util.function.Function< javax.ws.rs.core.Response, ChangePeComanagedDatabaseInsightResponse> transformer = @@ -1190,7 +1253,10 @@ public java.util.concurrent.Future createAwrHub( com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "CreateAwrHub", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "CreateAwrHub", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/CreateAwrHub"); final java.util.function.Function transformer = CreateAwrHubConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1241,7 +1307,7 @@ public java.util.concurrent.Future createAwrHubSourc "OperationsInsights", "CreateAwrHubSource", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubSources/CreateAwrHubSource"); final java.util.function.Function transformer = CreateAwrHubSourceConverter.fromResponse( @@ -1293,7 +1359,7 @@ public java.util.concurrent.Future createDatabase "OperationsInsights", "CreateDatabaseInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/CreateDatabaseInsight"); final java.util.function.Function transformer = CreateDatabaseInsightConverter.fromResponse( @@ -1348,7 +1414,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "CreateEnterpriseManagerBridge", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/EnterpriseManagerBridges/CreateEnterpriseManagerBridge"); final java.util.function.Function< javax.ws.rs.core.Response, CreateEnterpriseManagerBridgeResponse> transformer = @@ -1403,7 +1469,7 @@ public java.util.concurrent.Future createExadataIn "OperationsInsights", "CreateExadataInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/CreateExadataInsight"); final java.util.function.Function transformer = CreateExadataInsightConverter.fromResponse( @@ -1456,7 +1522,7 @@ public java.util.concurrent.Future createHostInsight( "OperationsInsights", "CreateHostInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/CreateHostInsight"); final java.util.function.Function transformer = CreateHostInsightConverter.fromResponse( @@ -1508,7 +1574,7 @@ public java.util.concurrent.Future createNewsReport( "OperationsInsights", "CreateNewsReport", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/NewsReports/CreateNewsReport"); final java.util.function.Function transformer = CreateNewsReportConverter.fromResponse( @@ -1563,7 +1629,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "CreateOperationsInsightsPrivateEndpoint", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsPrivateEndpoint/CreateOperationsInsightsPrivateEndpoint"); final java.util.function.Function< javax.ws.rs.core.Response, CreateOperationsInsightsPrivateEndpointResponse> transformer = @@ -1624,7 +1690,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "CreateOperationsInsightsWarehouse", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/CreateOperationsInsightsWarehouse"); final java.util.function.Function< javax.ws.rs.core.Response, CreateOperationsInsightsWarehouseResponse> transformer = @@ -1684,7 +1750,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "CreateOperationsInsightsWarehouseUser", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouseUsers/CreateOperationsInsightsWarehouseUser"); final java.util.function.Function< javax.ws.rs.core.Response, CreateOperationsInsightsWarehouseUserResponse> transformer = @@ -1742,7 +1808,7 @@ public java.util.concurrent.Future createOpsiCo "OperationsInsights", "CreateOpsiConfiguration", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiConfigurations/CreateOpsiConfiguration"); final java.util.function.Function< javax.ws.rs.core.Response, CreateOpsiConfigurationResponse> transformer = @@ -1791,7 +1857,10 @@ public java.util.concurrent.Future deleteAwrHub( DeleteAwrHubConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "DeleteAwrHub", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "DeleteAwrHub", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/DeleteAwrHub"); final java.util.function.Function transformer = DeleteAwrHubConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -1836,7 +1905,7 @@ public java.util.concurrent.Future deleteAwrHubObjec "OperationsInsights", "DeleteAwrHubObject", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubObjects/DeleteAwrHubObject"); final java.util.function.Function transformer = DeleteAwrHubObjectConverter.fromResponse( @@ -1882,7 +1951,7 @@ public java.util.concurrent.Future deleteAwrHubSourc "OperationsInsights", "DeleteAwrHubSource", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubSources/DeleteAwrHubSource"); final java.util.function.Function transformer = DeleteAwrHubSourceConverter.fromResponse( @@ -1928,7 +1997,7 @@ public java.util.concurrent.Future deleteDatabase "OperationsInsights", "DeleteDatabaseInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/DeleteDatabaseInsight"); final java.util.function.Function transformer = DeleteDatabaseInsightConverter.fromResponse( @@ -1977,7 +2046,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "DeleteEnterpriseManagerBridge", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/EnterpriseManagerBridges/DeleteEnterpriseManagerBridge"); final java.util.function.Function< javax.ws.rs.core.Response, DeleteEnterpriseManagerBridgeResponse> transformer = @@ -2026,7 +2095,7 @@ public java.util.concurrent.Future deleteExadataIn "OperationsInsights", "DeleteExadataInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/DeleteExadataInsight"); final java.util.function.Function transformer = DeleteExadataInsightConverter.fromResponse( @@ -2073,7 +2142,7 @@ public java.util.concurrent.Future deleteHostInsight( "OperationsInsights", "DeleteHostInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/DeleteHostInsight"); final java.util.function.Function transformer = DeleteHostInsightConverter.fromResponse( @@ -2119,7 +2188,7 @@ public java.util.concurrent.Future deleteNewsReport( "OperationsInsights", "DeleteNewsReport", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/NewsReports/DeleteNewsReport"); final java.util.function.Function transformer = DeleteNewsReportConverter.fromResponse( @@ -2168,7 +2237,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "DeleteOperationsInsightsPrivateEndpoint", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsPrivateEndpoint/DeleteOperationsInsightsPrivateEndpoint"); final java.util.function.Function< javax.ws.rs.core.Response, DeleteOperationsInsightsPrivateEndpointResponse> transformer = @@ -2222,7 +2291,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "DeleteOperationsInsightsWarehouse", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/DeleteOperationsInsightsWarehouse"); final java.util.function.Function< javax.ws.rs.core.Response, DeleteOperationsInsightsWarehouseResponse> transformer = @@ -2276,7 +2345,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "DeleteOperationsInsightsWarehouseUser", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouseUsers/DeleteOperationsInsightsWarehouseUser"); final java.util.function.Function< javax.ws.rs.core.Response, DeleteOperationsInsightsWarehouseUserResponse> transformer = @@ -2327,7 +2396,7 @@ public java.util.concurrent.Future deleteOpsiCo "OperationsInsights", "DeleteOpsiConfiguration", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiConfigurations/DeleteOpsiConfiguration"); final java.util.function.Function< javax.ws.rs.core.Response, DeleteOpsiConfigurationResponse> transformer = @@ -2379,7 +2448,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "DisableAutonomousDatabaseInsightAdvancedFeatures", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/DisableAutonomousDatabaseInsightAdvancedFeatures"); final java.util.function.Function< javax.ws.rs.core.Response, DisableAutonomousDatabaseInsightAdvancedFeaturesResponse> @@ -2433,7 +2502,7 @@ public java.util.concurrent.Future disableAwrHubSou "OperationsInsights", "DisableAwrHubSource", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubSources/DisableAwrHubSource"); final java.util.function.Function transformer = DisableAwrHubSourceConverter.fromResponse( @@ -2481,7 +2550,7 @@ public java.util.concurrent.Future disableDataba "OperationsInsights", "DisableDatabaseInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/DisableDatabaseInsight"); final java.util.function.Function transformer = DisableDatabaseInsightConverter.fromResponse( @@ -2529,7 +2598,7 @@ public java.util.concurrent.Future disableExadata "OperationsInsights", "DisableExadataInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/DisableExadataInsight"); final java.util.function.Function transformer = DisableExadataInsightConverter.fromResponse( @@ -2577,7 +2646,7 @@ public java.util.concurrent.Future disableHostInsigh "OperationsInsights", "DisableHostInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/DisableHostInsight"); final java.util.function.Function transformer = DisableHostInsightConverter.fromResponse( @@ -2627,7 +2696,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "DownloadOperationsInsightsWarehouseWallet", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/DownloadOperationsInsightsWarehouseWallet"); final java.util.function.Function< javax.ws.rs.core.Response, DownloadOperationsInsightsWarehouseWalletResponse> @@ -2690,7 +2759,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "EnableAutonomousDatabaseInsightAdvancedFeatures", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/EnableAutonomousDatabaseInsightAdvancedFeatures"); final java.util.function.Function< javax.ws.rs.core.Response, EnableAutonomousDatabaseInsightAdvancedFeaturesResponse> @@ -2750,7 +2819,7 @@ public java.util.concurrent.Future enableAwrHubSourc "OperationsInsights", "EnableAwrHubSource", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubSources/EnableAwrHubSource"); final java.util.function.Function transformer = EnableAwrHubSourceConverter.fromResponse( @@ -2797,7 +2866,7 @@ public java.util.concurrent.Future enableDatabase "OperationsInsights", "EnableDatabaseInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/EnableDatabaseInsight"); final java.util.function.Function transformer = EnableDatabaseInsightConverter.fromResponse( @@ -2850,7 +2919,7 @@ public java.util.concurrent.Future enableExadataIn "OperationsInsights", "EnableExadataInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/EnableExadataInsight"); final java.util.function.Function transformer = EnableExadataInsightConverter.fromResponse( @@ -2903,7 +2972,7 @@ public java.util.concurrent.Future enableHostInsight( "OperationsInsights", "EnableHostInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/EnableHostInsight"); final java.util.function.Function transformer = EnableHostInsightConverter.fromResponse( @@ -2954,7 +3023,7 @@ public java.util.concurrent.Future getAwrDatabaseR "OperationsInsights", "GetAwrDatabaseReport", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/GetAwrDatabaseReport"); final java.util.function.Function transformer = GetAwrDatabaseReportConverter.fromResponse( @@ -3001,7 +3070,7 @@ public java.util.concurrent.Future getAwrDataba "OperationsInsights", "GetAwrDatabaseSqlReport", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/GetAwrDatabaseSqlReport"); final java.util.function.Function< javax.ws.rs.core.Response, GetAwrDatabaseSqlReportResponse> transformer = @@ -3044,7 +3113,10 @@ public java.util.concurrent.Future getAwrHub( GetAwrHubConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "GetAwrHub", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "GetAwrHub", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/GetAwrHub"); final java.util.function.Function transformer = GetAwrHubConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -3085,7 +3157,10 @@ public java.util.concurrent.Future getAwrHubObject( GetAwrHubObjectConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "GetAwrHubObject", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "GetAwrHubObject", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubObjects/GetAwrHubObject"); final java.util.function.Function transformer = GetAwrHubObjectConverter.fromResponse( @@ -3128,7 +3203,10 @@ public java.util.concurrent.Future getAwrHubSource( GetAwrHubSourceConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "GetAwrHubSource", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "GetAwrHubSource", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubSources/GetAwrHubSource"); final java.util.function.Function transformer = GetAwrHubSourceConverter.fromResponse( @@ -3170,7 +3248,10 @@ public java.util.concurrent.Future getAwrReport( GetAwrReportConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "GetAwrReport", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "GetAwrReport", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/GetAwrReport"); final java.util.function.Function transformer = GetAwrReportConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -3215,7 +3296,7 @@ public java.util.concurrent.Future getDatabaseInsigh "OperationsInsights", "GetDatabaseInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/GetDatabaseInsight"); final java.util.function.Function transformer = GetDatabaseInsightConverter.fromResponse( @@ -3263,7 +3344,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "GetEnterpriseManagerBridge", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/EnterpriseManagerBridges/GetEnterpriseManagerBridge"); final java.util.function.Function< javax.ws.rs.core.Response, GetEnterpriseManagerBridgeResponse> transformer = @@ -3312,7 +3393,7 @@ public java.util.concurrent.Future getExadataInsight( "OperationsInsights", "GetExadataInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/GetExadataInsight"); final java.util.function.Function transformer = GetExadataInsightConverter.fromResponse( @@ -3355,7 +3436,10 @@ public java.util.concurrent.Future getHostInsight( GetHostInsightConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "GetHostInsight", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "GetHostInsight", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/GetHostInsight"); final java.util.function.Function transformer = GetHostInsightConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -3396,7 +3480,10 @@ public java.util.concurrent.Future getNewsReport( GetNewsReportConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "GetNewsReport", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "GetNewsReport", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/NewsReports/GetNewsReport"); final java.util.function.Function transformer = GetNewsReportConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -3444,7 +3531,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "GetOperationsInsightsPrivateEndpoint", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsPrivateEndpoint/GetOperationsInsightsPrivateEndpoint"); final java.util.function.Function< javax.ws.rs.core.Response, GetOperationsInsightsPrivateEndpointResponse> transformer = @@ -3497,7 +3584,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "GetOperationsInsightsWarehouse", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/GetOperationsInsightsWarehouse"); final java.util.function.Function< javax.ws.rs.core.Response, GetOperationsInsightsWarehouseResponse> transformer = @@ -3549,7 +3636,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "GetOperationsInsightsWarehouseUser", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouseUsers/GetOperationsInsightsWarehouseUser"); final java.util.function.Function< javax.ws.rs.core.Response, GetOperationsInsightsWarehouseUserResponse> transformer = @@ -3600,7 +3687,7 @@ public java.util.concurrent.Future getOpsiConfigur "OperationsInsights", "GetOpsiConfiguration", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiConfigurations/GetOpsiConfiguration"); final java.util.function.Function transformer = GetOpsiConfigurationConverter.fromResponse( @@ -3647,7 +3734,7 @@ public java.util.concurrent.Future getOpsiDataObject( "OperationsInsights", "GetOpsiDataObject", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiDataObjects/GetOpsiDataObject"); final java.util.function.Function transformer = GetOpsiDataObjectConverter.fromResponse( @@ -3690,7 +3777,10 @@ public java.util.concurrent.Future getWorkRequest( GetWorkRequestConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "GetWorkRequest", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "GetWorkRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/WorkRequests/GetWorkRequest"); final java.util.function.Function transformer = GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -3735,7 +3825,7 @@ public java.util.concurrent.Future headAwrHubObject( "OperationsInsights", "HeadAwrHubObject", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubObjects/HeadAwrHubObject"); final java.util.function.Function transformer = HeadAwrHubObjectConverter.fromResponse( @@ -3782,7 +3872,7 @@ public java.util.concurrent.Future ingestAddmReports( "OperationsInsights", "IngestAddmReports", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/IngestAddmReports"); final java.util.function.Function transformer = IngestAddmReportsConverter.fromResponse( @@ -3836,7 +3926,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "IngestDatabaseConfiguration", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/IngestDatabaseConfiguration"); final java.util.function.Function< javax.ws.rs.core.Response, IngestDatabaseConfigurationResponse> transformer = @@ -3891,7 +3981,7 @@ public java.util.concurrent.Future ingestHostCo "OperationsInsights", "IngestHostConfiguration", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/IngestHostConfiguration"); final java.util.function.Function< javax.ws.rs.core.Response, IngestHostConfigurationResponse> transformer = @@ -3945,7 +4035,7 @@ public java.util.concurrent.Future ingestHostMetrics( "OperationsInsights", "IngestHostMetrics", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/IngestHostMetrics"); final java.util.function.Function transformer = IngestHostMetricsConverter.fromResponse( @@ -3980,6 +4070,111 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future ingestMySqlSqlStats( + IngestMySqlSqlStatsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + IngestMySqlSqlStatsRequest, IngestMySqlSqlStatsResponse> + handler) { + LOG.trace("Called async ingestMySqlSqlStats"); + final IngestMySqlSqlStatsRequest interceptedRequest = + IngestMySqlSqlStatsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + IngestMySqlSqlStatsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OperationsInsights", + "IngestMySqlSqlStats", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/IngestMySqlSqlStats"); + final java.util.function.Function + transformer = + IngestMySqlSqlStatsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + IngestMySqlSqlStatsRequest, IngestMySqlSqlStatsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + IngestMySqlSqlStatsRequest, IngestMySqlSqlStatsResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getIngestMySqlSqlStatsDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + IngestMySqlSqlStatsRequest, IngestMySqlSqlStatsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future ingestMySqlSqlText( + IngestMySqlSqlTextRequest request, + final com.oracle.bmc.responses.AsyncHandler< + IngestMySqlSqlTextRequest, IngestMySqlSqlTextResponse> + handler) { + LOG.trace("Called async ingestMySqlSqlText"); + final IngestMySqlSqlTextRequest interceptedRequest = + IngestMySqlSqlTextConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + IngestMySqlSqlTextConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OperationsInsights", + "IngestMySqlSqlText", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/IngestMySqlSqlText"); + final java.util.function.Function + transformer = + IngestMySqlSqlTextConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + IngestMySqlSqlTextRequest, IngestMySqlSqlTextResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getIngestMySqlSqlTextDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + IngestMySqlSqlTextRequest, IngestMySqlSqlTextResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future ingestSqlBucket( IngestSqlBucketRequest request, @@ -3994,7 +4189,10 @@ public java.util.concurrent.Future ingestSqlBucket( com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "IngestSqlBucket", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "IngestSqlBucket", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/IngestSqlBucket"); final java.util.function.Function transformer = IngestSqlBucketConverter.fromResponse( @@ -4046,7 +4244,7 @@ public java.util.concurrent.Future ingestSqlPlanLine "OperationsInsights", "IngestSqlPlanLines", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/IngestSqlPlanLines"); final java.util.function.Function transformer = IngestSqlPlanLinesConverter.fromResponse( @@ -4095,7 +4293,10 @@ public java.util.concurrent.Future ingestSqlStats( com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "IngestSqlStats", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "IngestSqlStats", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/IngestSqlStats"); final java.util.function.Function transformer = IngestSqlStatsConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -4142,7 +4343,10 @@ public java.util.concurrent.Future ingestSqlText( com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "IngestSqlText", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "IngestSqlText", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/IngestSqlText"); final java.util.function.Function transformer = IngestSqlTextConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -4194,7 +4398,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ListAddmDbFindingCategories", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListAddmDbFindingCategories"); final java.util.function.Function< javax.ws.rs.core.Response, ListAddmDbFindingCategoriesResponse> transformer = @@ -4245,7 +4449,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ListAddmDbFindingsTimeSeries", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListAddmDbFindingsTimeSeries"); final java.util.function.Function< javax.ws.rs.core.Response, ListAddmDbFindingsTimeSeriesResponse> transformer = @@ -4296,7 +4500,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ListAddmDbParameterCategories", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListAddmDbParameterCategories"); final java.util.function.Function< javax.ws.rs.core.Response, ListAddmDbParameterCategoriesResponse> transformer = @@ -4347,7 +4551,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ListAddmDbRecommendationCategories", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListAddmDbRecommendationCategories"); final java.util.function.Function< javax.ws.rs.core.Response, ListAddmDbRecommendationCategoriesResponse> transformer = @@ -4401,7 +4605,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ListAddmDbRecommendationsTimeSeries", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListAddmDbRecommendationsTimeSeries"); final java.util.function.Function< javax.ws.rs.core.Response, ListAddmDbRecommendationsTimeSeriesResponse> transformer = @@ -4448,7 +4652,10 @@ public java.util.concurrent.Future listAddmDbs( ListAddmDbsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "ListAddmDbs", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "ListAddmDbs", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListAddmDbs"); final java.util.function.Function transformer = ListAddmDbsConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -4493,7 +4700,7 @@ public java.util.concurrent.Future listAwrData "OperationsInsights", "ListAwrDatabaseSnapshots", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/ListAwrDatabaseSnapshots"); final java.util.function.Function< javax.ws.rs.core.Response, ListAwrDatabaseSnapshotsResponse> transformer = @@ -4541,7 +4748,7 @@ public java.util.concurrent.Future listAwrDatabases( "OperationsInsights", "ListAwrDatabases", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/ListAwrDatabases"); final java.util.function.Function transformer = ListAwrDatabasesConverter.fromResponse( @@ -4587,7 +4794,7 @@ public java.util.concurrent.Future listAwrHubObjects( "OperationsInsights", "ListAwrHubObjects", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubObjects/ListAwrHubObjects"); final java.util.function.Function transformer = ListAwrHubObjectsConverter.fromResponse( @@ -4633,7 +4840,7 @@ public java.util.concurrent.Future listAwrHubSources( "OperationsInsights", "ListAwrHubSources", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubSources/ListAwrHubSources"); final java.util.function.Function transformer = ListAwrHubSourcesConverter.fromResponse( @@ -4675,7 +4882,10 @@ public java.util.concurrent.Future listAwrHubs( ListAwrHubsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "ListAwrHubs", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "ListAwrHubs", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/ListAwrHubs"); final java.util.function.Function transformer = ListAwrHubsConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -4720,7 +4930,7 @@ public java.util.concurrent.Future listAwrSnapshots( "OperationsInsights", "ListAwrSnapshots", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/ListAwrSnapshots"); final java.util.function.Function transformer = ListAwrSnapshotsConverter.fromResponse( @@ -4768,7 +4978,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ListDatabaseConfigurations", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListDatabaseConfigurations"); final java.util.function.Function< javax.ws.rs.core.Response, ListDatabaseConfigurationsResponse> transformer = @@ -4817,7 +5027,7 @@ public java.util.concurrent.Future listDatabaseIns "OperationsInsights", "ListDatabaseInsights", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListDatabaseInsights"); final java.util.function.Function transformer = ListDatabaseInsightsConverter.fromResponse( @@ -4866,7 +5076,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ListEnterpriseManagerBridges", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/EnterpriseManagerBridges/ListEnterpriseManagerBridges"); final java.util.function.Function< javax.ws.rs.core.Response, ListEnterpriseManagerBridgesResponse> transformer = @@ -4915,7 +5125,7 @@ public java.util.concurrent.Future listExadat "OperationsInsights", "ListExadataConfigurations", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/ListExadataConfigurations"); final java.util.function.Function< javax.ws.rs.core.Response, ListExadataConfigurationsResponse> transformer = @@ -4964,7 +5174,7 @@ public java.util.concurrent.Future listExadataInsig "OperationsInsights", "ListExadataInsights", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/ListExadataInsights"); final java.util.function.Function transformer = ListExadataInsightsConverter.fromResponse( @@ -5011,7 +5221,7 @@ public java.util.concurrent.Future listHostConfi "OperationsInsights", "ListHostConfigurations", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ListHostConfigurations"); final java.util.function.Function transformer = ListHostConfigurationsConverter.fromResponse( @@ -5058,7 +5268,7 @@ public java.util.concurrent.Future listHostInsights( "OperationsInsights", "ListHostInsights", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ListHostInsights"); final java.util.function.Function transformer = ListHostInsightsConverter.fromResponse( @@ -5104,7 +5314,7 @@ public java.util.concurrent.Future listHostedEntitie "OperationsInsights", "ListHostedEntities", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ListHostedEntities"); final java.util.function.Function transformer = ListHostedEntitiesConverter.fromResponse( @@ -5152,7 +5362,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ListImportableAgentEntities", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ListImportableAgentEntities"); final java.util.function.Function< javax.ws.rs.core.Response, ListImportableAgentEntitiesResponse> transformer = @@ -5203,7 +5413,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ListImportableComputeEntities", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ListImportableComputeEntities"); final java.util.function.Function< javax.ws.rs.core.Response, ListImportableComputeEntitiesResponse> transformer = @@ -5255,7 +5465,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ListImportableEnterpriseManagerEntities", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/EnterpriseManagerBridges/ListImportableEnterpriseManagerEntities"); final java.util.function.Function< javax.ws.rs.core.Response, ListImportableEnterpriseManagerEntitiesResponse> transformer = @@ -5304,7 +5514,10 @@ public java.util.concurrent.Future listNewsReports( ListNewsReportsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "ListNewsReports", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "ListNewsReports", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/NewsReport/ListNewsReports"); final java.util.function.Function transformer = ListNewsReportsConverter.fromResponse( @@ -5353,7 +5566,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ListOperationsInsightsPrivateEndpoints", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsPrivateEndpoint/ListOperationsInsightsPrivateEndpoints"); final java.util.function.Function< javax.ws.rs.core.Response, ListOperationsInsightsPrivateEndpointsResponse> transformer = @@ -5407,7 +5620,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ListOperationsInsightsWarehouseUsers", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouseUsers/ListOperationsInsightsWarehouseUsers"); final java.util.function.Function< javax.ws.rs.core.Response, ListOperationsInsightsWarehouseUsersResponse> transformer = @@ -5460,7 +5673,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "ListOperationsInsightsWarehouses", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/ListOperationsInsightsWarehouses"); final java.util.function.Function< javax.ws.rs.core.Response, ListOperationsInsightsWarehousesResponse> transformer = @@ -5511,7 +5724,7 @@ public java.util.concurrent.Future listOpsiConfi "OperationsInsights", "ListOpsiConfigurations", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiConfigurations/ListOpsiConfigurations"); final java.util.function.Function transformer = ListOpsiConfigurationsConverter.fromResponse( @@ -5558,7 +5771,7 @@ public java.util.concurrent.Future listOpsiDataObje "OperationsInsights", "ListOpsiDataObjects", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiDataObjects/ListOpsiDataObjects"); final java.util.function.Function transformer = ListOpsiDataObjectsConverter.fromResponse( @@ -5601,7 +5814,10 @@ public java.util.concurrent.Future listSqlPlans( ListSqlPlansConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "ListSqlPlans", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "ListSqlPlans", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListSqlPlans"); final java.util.function.Function transformer = ListSqlPlansConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -5643,7 +5859,10 @@ public java.util.concurrent.Future listSqlSearches( ListSqlSearchesConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "ListSqlSearches", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "ListSqlSearches", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListSqlSearches"); final java.util.function.Function transformer = ListSqlSearchesConverter.fromResponse( @@ -5685,7 +5904,10 @@ public java.util.concurrent.Future listSqlTexts( ListSqlTextsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "ListSqlTexts", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "ListSqlTexts", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListSqlTexts"); final java.util.function.Function transformer = ListSqlTextsConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -5730,7 +5952,7 @@ public java.util.concurrent.Future listWarehou "OperationsInsights", "ListWarehouseDataObjects", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiWarehouseDataObjects/ListWarehouseDataObjects"); final java.util.function.Function< javax.ws.rs.core.Response, ListWarehouseDataObjectsResponse> transformer = @@ -5778,7 +6000,7 @@ public java.util.concurrent.Future listWorkReques "OperationsInsights", "ListWorkRequestErrors", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/WorkRequests/ListWorkRequestErrors"); final java.util.function.Function transformer = ListWorkRequestErrorsConverter.fromResponse( @@ -5825,7 +6047,7 @@ public java.util.concurrent.Future listWorkRequestL "OperationsInsights", "ListWorkRequestLogs", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/WorkRequests/ListWorkRequestLogs"); final java.util.function.Function transformer = ListWorkRequestLogsConverter.fromResponse( @@ -5872,7 +6094,7 @@ public java.util.concurrent.Future listWorkRequests( "OperationsInsights", "ListWorkRequests", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/WorkRequests/ListWorkRequests"); final java.util.function.Function transformer = ListWorkRequestsConverter.fromResponse( @@ -5926,7 +6148,10 @@ public java.util.concurrent.Future putAwrHubObject( com.oracle.bmc.http.signing.SigningStrategy.EXCLUDE_BODY); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "PutAwrHubObject", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "PutAwrHubObject", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubObjects/PutAwrHubObject"); final java.util.function.Function transformer = PutAwrHubObjectConverter.fromResponse( @@ -5982,7 +6207,7 @@ public java.util.concurrent.Future queryOpsiDat "OperationsInsights", "QueryOpsiDataObjectData", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiDataObjects/QueryOpsiDataObjectData"); final java.util.function.Function< javax.ws.rs.core.Response, QueryOpsiDataObjectDataResponse> transformer = @@ -6037,7 +6262,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "QueryWarehouseDataObjectData", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiWarehouseDataObjects/QueryWarehouseDataObjectData"); final java.util.function.Function< javax.ws.rs.core.Response, QueryWarehouseDataObjectDataResponse> transformer = @@ -6094,7 +6319,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "RotateOperationsInsightsWarehouseWallet", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/RotateOperationsInsightsWarehouseWallet"); final java.util.function.Function< javax.ws.rs.core.Response, RotateOperationsInsightsWarehouseWalletResponse> transformer = @@ -6146,7 +6371,7 @@ public java.util.concurrent.Future summarizeAdd "OperationsInsights", "SummarizeAddmDbFindings", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeAddmDbFindings"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeAddmDbFindingsResponse> transformer = @@ -6196,7 +6421,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeAddmDbParameterChanges", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeAddmDbParameterChanges"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeAddmDbParameterChangesResponse> transformer = @@ -6247,7 +6472,7 @@ public java.util.concurrent.Future summarizeA "OperationsInsights", "SummarizeAddmDbParameters", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeAddmDbParameters"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeAddmDbParametersResponse> transformer = @@ -6298,7 +6523,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeAddmDbRecommendations", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeAddmDbRecommendations"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeAddmDbRecommendationsResponse> transformer = @@ -6350,7 +6575,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeAddmDbSchemaObjects", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeAddmDbSchemaObjects"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeAddmDbSchemaObjectsResponse> transformer = @@ -6401,7 +6626,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeAddmDbSqlStatements", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeAddmDbSqlStatements"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeAddmDbSqlStatementsResponse> transformer = @@ -6452,7 +6677,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeAwrDatabaseCpuUsages", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/SummarizeAwrDatabaseCpuUsages"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeAwrDatabaseCpuUsagesResponse> transformer = @@ -6503,7 +6728,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeAwrDatabaseMetrics", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/SummarizeAwrDatabaseMetrics"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeAwrDatabaseMetricsResponse> transformer = @@ -6555,7 +6780,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeAwrDatabaseParameterChanges", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/SummarizeAwrDatabaseParameterChanges"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeAwrDatabaseParameterChangesResponse> transformer = @@ -6608,7 +6833,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeAwrDatabaseParameters", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/SummarizeAwrDatabaseParameters"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeAwrDatabaseParametersResponse> transformer = @@ -6660,7 +6885,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeAwrDatabaseSnapshotRanges", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/SummarizeAwrDatabaseSnapshotRanges"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeAwrDatabaseSnapshotRangesResponse> transformer = @@ -6713,7 +6938,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeAwrDatabaseSysstats", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/SummarizeAwrDatabaseSysstats"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeAwrDatabaseSysstatsResponse> transformer = @@ -6764,7 +6989,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeAwrDatabaseTopWaitEvents", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/SummarizeAwrDatabaseTopWaitEvents"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeAwrDatabaseTopWaitEventsResponse> transformer = @@ -6818,7 +7043,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeAwrDatabaseWaitEventBuckets", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/SummarizeAwrDatabaseWaitEventBuckets"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeAwrDatabaseWaitEventBucketsResponse> transformer = @@ -6871,7 +7096,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeAwrDatabaseWaitEvents", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/SummarizeAwrDatabaseWaitEvents"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeAwrDatabaseWaitEventsResponse> transformer = @@ -6923,7 +7148,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeAwrSourcesSummaries", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/SummarizeAwrSourcesSummaries"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeAwrSourcesSummariesResponse> transformer = @@ -6974,7 +7199,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeConfigurationItems", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiConfigurations/SummarizeConfigurationItems"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeConfigurationItemsResponse> transformer = @@ -7026,7 +7251,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeDatabaseInsightResourceCapacityTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeDatabaseInsightResourceCapacityTrend"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeDatabaseInsightResourceCapacityTrendResponse> @@ -7082,7 +7307,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeDatabaseInsightResourceForecastTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeDatabaseInsightResourceForecastTrend"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeDatabaseInsightResourceForecastTrendResponse> @@ -7138,7 +7363,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeDatabaseInsightResourceStatistics", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeDatabaseInsightResourceStatistics"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeDatabaseInsightResourceStatisticsResponse> @@ -7194,7 +7419,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeDatabaseInsightResourceUsage", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeDatabaseInsightResourceUsage"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeDatabaseInsightResourceUsageResponse> transformer = @@ -7248,7 +7473,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeDatabaseInsightResourceUsageTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeDatabaseInsightResourceUsageTrend"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeDatabaseInsightResourceUsageTrendResponse> @@ -7305,7 +7530,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeDatabaseInsightResourceUtilizationInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeDatabaseInsightResourceUtilizationInsight"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeDatabaseInsightResourceUtilizationInsightResponse> @@ -7361,7 +7586,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeDatabaseInsightTablespaceUsageTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeDatabaseInsightTablespaceUsageTrend"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeDatabaseInsightTablespaceUsageTrendResponse> @@ -7417,7 +7642,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeExadataInsightResourceCapacityTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/SummarizeExadataInsightResourceCapacityTrend"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeExadataInsightResourceCapacityTrendResponse> @@ -7475,7 +7700,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeExadataInsightResourceCapacityTrendAggregated", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/SummarizeExadataInsightResourceCapacityTrendAggregated"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeExadataInsightResourceCapacityTrendAggregatedResponse> @@ -7531,7 +7756,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeExadataInsightResourceForecastTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/SummarizeExadataInsightResourceForecastTrend"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeExadataInsightResourceForecastTrendResponse> @@ -7589,7 +7814,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeExadataInsightResourceForecastTrendAggregated", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/SummarizeExadataInsightResourceForecastTrendAggregated"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeExadataInsightResourceForecastTrendAggregatedResponse> @@ -7645,7 +7870,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeExadataInsightResourceStatistics", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/SummarizeExadataInsightResourceStatistics"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeExadataInsightResourceStatisticsResponse> @@ -7701,7 +7926,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeExadataInsightResourceUsage", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/SummarizeExadataInsightResourceUsage"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeExadataInsightResourceUsageResponse> transformer = @@ -7755,7 +7980,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeExadataInsightResourceUsageAggregated", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/SummarizeExadataInsightResourceUsageAggregated"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeExadataInsightResourceUsageAggregatedResponse> @@ -7812,7 +8037,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeExadataInsightResourceUtilizationInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/SummarizeExadataInsightResourceUtilizationInsight"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeExadataInsightResourceUtilizationInsightResponse> @@ -7865,7 +8090,7 @@ public java.util.concurrent.Future summarizeExa "OperationsInsights", "SummarizeExadataMembers", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/SummarizeExadataMembers"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeExadataMembersResponse> transformer = @@ -7915,7 +8140,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeHostInsightDiskStatistics", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightDiskStatistics"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightDiskStatisticsResponse> transformer = @@ -7969,7 +8194,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeHostInsightHostRecommendation", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightHostRecommendation"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightHostRecommendationResponse> transformer = @@ -8004,6 +8229,59 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + summarizeHostInsightIoUsageTrend( + SummarizeHostInsightIoUsageTrendRequest request, + final com.oracle.bmc.responses.AsyncHandler< + SummarizeHostInsightIoUsageTrendRequest, + SummarizeHostInsightIoUsageTrendResponse> + handler) { + LOG.trace("Called async summarizeHostInsightIoUsageTrend"); + final SummarizeHostInsightIoUsageTrendRequest interceptedRequest = + SummarizeHostInsightIoUsageTrendConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SummarizeHostInsightIoUsageTrendConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OperationsInsights", + "SummarizeHostInsightIoUsageTrend", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightIoUsageTrend"); + final java.util.function.Function< + javax.ws.rs.core.Response, SummarizeHostInsightIoUsageTrendResponse> + transformer = + SummarizeHostInsightIoUsageTrendConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + SummarizeHostInsightIoUsageTrendRequest, + SummarizeHostInsightIoUsageTrendResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + SummarizeHostInsightIoUsageTrendRequest, + SummarizeHostInsightIoUsageTrendResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + SummarizeHostInsightIoUsageTrendRequest, + SummarizeHostInsightIoUsageTrendResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future summarizeHostInsightNetworkUsageTrend( @@ -8023,7 +8301,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeHostInsightNetworkUsageTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightNetworkUsageTrend"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightNetworkUsageTrendResponse> transformer = @@ -8077,7 +8355,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeHostInsightResourceCapacityTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightResourceCapacityTrend"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightResourceCapacityTrendResponse> @@ -8133,7 +8411,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeHostInsightResourceForecastTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightResourceForecastTrend"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightResourceForecastTrendResponse> @@ -8189,7 +8467,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeHostInsightResourceStatistics", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightResourceStatistics"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightResourceStatisticsResponse> transformer = @@ -8242,7 +8520,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeHostInsightResourceUsage", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightResourceUsage"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightResourceUsageResponse> transformer = @@ -8296,7 +8574,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeHostInsightResourceUsageTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightResourceUsageTrend"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightResourceUsageTrendResponse> transformer = @@ -8350,7 +8628,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeHostInsightResourceUtilizationInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightResourceUtilizationInsight"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightResourceUtilizationInsightResponse> @@ -8406,7 +8684,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeHostInsightStorageUsageTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightStorageUsageTrend"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightStorageUsageTrendResponse> transformer = @@ -8460,7 +8738,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeHostInsightTopProcessesUsage", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightTopProcessesUsage"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightTopProcessesUsageResponse> transformer = @@ -8514,7 +8792,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeHostInsightTopProcessesUsageTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightTopProcessesUsageTrend"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightTopProcessesUsageTrendResponse> @@ -8571,7 +8849,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeOperationsInsightsWarehouseResourceUsage", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/SummarizeOperationsInsightsWarehouseResourceUsage"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeOperationsInsightsWarehouseResourceUsageResponse> @@ -8624,7 +8902,7 @@ public java.util.concurrent.Future summarizeSqlIns "OperationsInsights", "SummarizeSqlInsights", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeSqlInsights"); final java.util.function.Function transformer = SummarizeSqlInsightsConverter.fromResponse( @@ -8671,7 +8949,7 @@ public java.util.concurrent.Future summarizeSq "OperationsInsights", "SummarizeSqlPlanInsights", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeSqlPlanInsights"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeSqlPlanInsightsResponse> transformer = @@ -8722,7 +9000,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeSqlResponseTimeDistributions", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeSqlResponseTimeDistributions"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeSqlResponseTimeDistributionsResponse> transformer = @@ -8773,7 +9051,7 @@ public java.util.concurrent.Future summarizeSqlS "OperationsInsights", "SummarizeSqlStatistics", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeSqlStatistics"); final java.util.function.Function transformer = SummarizeSqlStatisticsConverter.fromResponse( @@ -8822,7 +9100,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeSqlStatisticsTimeSeries", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeSqlStatisticsTimeSeries"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeSqlStatisticsTimeSeriesResponse> transformer = @@ -8876,7 +9154,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "SummarizeSqlStatisticsTimeSeriesByPlan", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeSqlStatisticsTimeSeriesByPlan"); final java.util.function.Function< javax.ws.rs.core.Response, SummarizeSqlStatisticsTimeSeriesByPlanResponse> transformer = @@ -8911,6 +9189,69 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + testMacsManagedCloudDatabaseInsightConnection( + TestMacsManagedCloudDatabaseInsightConnectionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + TestMacsManagedCloudDatabaseInsightConnectionRequest, + TestMacsManagedCloudDatabaseInsightConnectionResponse> + handler) { + LOG.trace("Called async testMacsManagedCloudDatabaseInsightConnection"); + final TestMacsManagedCloudDatabaseInsightConnectionRequest interceptedRequest = + TestMacsManagedCloudDatabaseInsightConnectionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + TestMacsManagedCloudDatabaseInsightConnectionConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OperationsInsights", + "TestMacsManagedCloudDatabaseInsightConnection", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/TestMacsManagedCloudDatabaseInsightConnection"); + final java.util.function.Function< + javax.ws.rs.core.Response, + TestMacsManagedCloudDatabaseInsightConnectionResponse> + transformer = + TestMacsManagedCloudDatabaseInsightConnectionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + TestMacsManagedCloudDatabaseInsightConnectionRequest, + TestMacsManagedCloudDatabaseInsightConnectionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + TestMacsManagedCloudDatabaseInsightConnectionRequest, + TestMacsManagedCloudDatabaseInsightConnectionResponse>, + java.util.concurrent.Future< + TestMacsManagedCloudDatabaseInsightConnectionResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getTestMacsManagedCloudDatabaseInsightConnectionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + TestMacsManagedCloudDatabaseInsightConnectionRequest, + TestMacsManagedCloudDatabaseInsightConnectionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateAwrHub( UpdateAwrHubRequest request, @@ -8923,7 +9264,10 @@ public java.util.concurrent.Future updateAwrHub( UpdateAwrHubConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "UpdateAwrHub", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "UpdateAwrHub", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/UpdateAwrHub"); final java.util.function.Function transformer = UpdateAwrHubConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -8973,7 +9317,7 @@ public java.util.concurrent.Future updateAwrHubSourc "OperationsInsights", "UpdateAwrHubSource", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubSources/UpdateAwrHubSource"); final java.util.function.Function transformer = UpdateAwrHubSourceConverter.fromResponse( @@ -9024,7 +9368,7 @@ public java.util.concurrent.Future updateDatabase "OperationsInsights", "UpdateDatabaseInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/UpdateDatabaseInsight"); final java.util.function.Function transformer = UpdateDatabaseInsightConverter.fromResponse( @@ -9078,7 +9422,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "UpdateEnterpriseManagerBridge", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/EnterpriseManagerBridges/UpdateEnterpriseManagerBridge"); final java.util.function.Function< javax.ws.rs.core.Response, UpdateEnterpriseManagerBridgeResponse> transformer = @@ -9132,7 +9476,7 @@ public java.util.concurrent.Future updateExadataIn "OperationsInsights", "UpdateExadataInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/UpdateExadataInsight"); final java.util.function.Function transformer = UpdateExadataInsightConverter.fromResponse( @@ -9184,7 +9528,7 @@ public java.util.concurrent.Future updateHostInsight( "OperationsInsights", "UpdateHostInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/UpdateHostInsight"); final java.util.function.Function transformer = UpdateHostInsightConverter.fromResponse( @@ -9235,7 +9579,7 @@ public java.util.concurrent.Future updateNewsReport( "OperationsInsights", "UpdateNewsReport", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/NewsReports/UpdateNewsReport"); final java.util.function.Function transformer = UpdateNewsReportConverter.fromResponse( @@ -9289,7 +9633,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "UpdateOperationsInsightsPrivateEndpoint", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsPrivateEndpoint/UpdateOperationsInsightsPrivateEndpoint"); final java.util.function.Function< javax.ws.rs.core.Response, UpdateOperationsInsightsPrivateEndpointResponse> transformer = @@ -9349,7 +9693,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "UpdateOperationsInsightsWarehouse", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/UpdateOperationsInsightsWarehouse"); final java.util.function.Function< javax.ws.rs.core.Response, UpdateOperationsInsightsWarehouseResponse> transformer = @@ -9408,7 +9752,7 @@ protected void beforeRetryAction() {} "OperationsInsights", "UpdateOperationsInsightsWarehouseUser", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouseUsers/UpdateOperationsInsightsWarehouseUser"); final java.util.function.Function< javax.ws.rs.core.Response, UpdateOperationsInsightsWarehouseUserResponse> transformer = @@ -9465,7 +9809,7 @@ public java.util.concurrent.Future updateOpsiCo "OperationsInsights", "UpdateOpsiConfiguration", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiConfigurations/UpdateOpsiConfiguration"); final java.util.function.Function< javax.ws.rs.core.Response, UpdateOpsiConfigurationResponse> transformer = diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/OperationsInsightsClient.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/OperationsInsightsClient.java index 952bf54b34b..f7e94a22af2 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/OperationsInsightsClient.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/OperationsInsightsClient.java @@ -573,7 +573,7 @@ public AddExadataInsightMembersResponse addExadataInsightMembers( "OperationsInsights", "AddExadataInsightMembers", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/AddExadataInsightMembers"); java.util.function.Function transformer = AddExadataInsightMembersConverter.fromResponse( @@ -618,7 +618,7 @@ public AddExadataInsightMembersResponse addExadataInsightMembers( "OperationsInsights", "ChangeAutonomousDatabaseInsightAdvancedFeatures", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ChangeAutonomousDatabaseInsightAdvancedFeatures"); java.util.function.Function< javax.ws.rs.core.Response, ChangeAutonomousDatabaseInsightAdvancedFeaturesResponse> @@ -664,7 +664,7 @@ public ChangeAwrHubSourceCompartmentResponse changeAwrHubSourceCompartment( "OperationsInsights", "ChangeAwrHubSourceCompartment", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubSources/ChangeAwrHubSourceCompartment"); java.util.function.Function< javax.ws.rs.core.Response, ChangeAwrHubSourceCompartmentResponse> transformer = @@ -709,7 +709,7 @@ public ChangeDatabaseInsightCompartmentResponse changeDatabaseInsightCompartment "OperationsInsights", "ChangeDatabaseInsightCompartment", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ChangeDatabaseInsightCompartment"); java.util.function.Function< javax.ws.rs.core.Response, ChangeDatabaseInsightCompartmentResponse> transformer = @@ -755,7 +755,7 @@ public ChangeDatabaseInsightCompartmentResponse changeDatabaseInsightCompartment "OperationsInsights", "ChangeEnterpriseManagerBridgeCompartment", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/EnterpriseManagerBridges/ChangeEnterpriseManagerBridgeCompartment"); java.util.function.Function< javax.ws.rs.core.Response, ChangeEnterpriseManagerBridgeCompartmentResponse> transformer = @@ -800,7 +800,7 @@ public ChangeExadataInsightCompartmentResponse changeExadataInsightCompartment( "OperationsInsights", "ChangeExadataInsightCompartment", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/ChangeExadataInsightCompartment"); java.util.function.Function< javax.ws.rs.core.Response, ChangeExadataInsightCompartmentResponse> transformer = @@ -845,7 +845,7 @@ public ChangeHostInsightCompartmentResponse changeHostInsightCompartment( "OperationsInsights", "ChangeHostInsightCompartment", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ChangeHostInsightCompartment"); java.util.function.Function transformer = ChangeHostInsightCompartmentConverter.fromResponse( @@ -870,6 +870,54 @@ public ChangeHostInsightCompartmentResponse changeHostInsightCompartment( }); } + @Override + public ChangeMacsManagedCloudDatabaseInsightConnectionResponse + changeMacsManagedCloudDatabaseInsightConnection( + ChangeMacsManagedCloudDatabaseInsightConnectionRequest request) { + LOG.trace("Called changeMacsManagedCloudDatabaseInsightConnection"); + final ChangeMacsManagedCloudDatabaseInsightConnectionRequest interceptedRequest = + ChangeMacsManagedCloudDatabaseInsightConnectionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeMacsManagedCloudDatabaseInsightConnectionConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OperationsInsights", + "ChangeMacsManagedCloudDatabaseInsightConnection", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ChangeMacsManagedCloudDatabaseInsightConnection"); + java.util.function.Function< + javax.ws.rs.core.Response, + ChangeMacsManagedCloudDatabaseInsightConnectionResponse> + transformer = + ChangeMacsManagedCloudDatabaseInsightConnectionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeMacsManagedCloudDatabaseInsightConnectionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeNewsReportCompartmentResponse changeNewsReportCompartment( ChangeNewsReportCompartmentRequest request) { @@ -889,7 +937,7 @@ public ChangeNewsReportCompartmentResponse changeNewsReportCompartment( "OperationsInsights", "ChangeNewsReportCompartment", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/NewsReports/ChangeNewsReportCompartment"); java.util.function.Function transformer = ChangeNewsReportCompartmentConverter.fromResponse( @@ -936,7 +984,7 @@ public ChangeNewsReportCompartmentResponse changeNewsReportCompartment( "OperationsInsights", "ChangeOperationsInsightsPrivateEndpointCompartment", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsPrivateEndpoint/ChangeOperationsInsightsPrivateEndpointCompartment"); java.util.function.Function< javax.ws.rs.core.Response, ChangeOperationsInsightsPrivateEndpointCompartmentResponse> @@ -984,7 +1032,7 @@ public ChangeNewsReportCompartmentResponse changeNewsReportCompartment( "OperationsInsights", "ChangeOperationsInsightsWarehouseCompartment", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/ChangeOperationsInsightsWarehouseCompartment"); java.util.function.Function< javax.ws.rs.core.Response, ChangeOperationsInsightsWarehouseCompartmentResponse> @@ -1030,7 +1078,7 @@ public ChangeOpsiConfigurationCompartmentResponse changeOpsiConfigurationCompart "OperationsInsights", "ChangeOpsiConfigurationCompartment", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiConfigurations/ChangeOpsiConfigurationCompartment"); java.util.function.Function< javax.ws.rs.core.Response, ChangeOpsiConfigurationCompartmentResponse> transformer = @@ -1075,7 +1123,7 @@ public ChangePeComanagedDatabaseInsightResponse changePeComanagedDatabaseInsight "OperationsInsights", "ChangePeComanagedDatabaseInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ChangePeComanagedDatabaseInsight"); java.util.function.Function< javax.ws.rs.core.Response, ChangePeComanagedDatabaseInsightResponse> transformer = @@ -1116,7 +1164,10 @@ public CreateAwrHubResponse createAwrHub(CreateAwrHubRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "CreateAwrHub", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "CreateAwrHub", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/CreateAwrHub"); java.util.function.Function transformer = CreateAwrHubConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1156,7 +1207,7 @@ public CreateAwrHubSourceResponse createAwrHubSource(CreateAwrHubSourceRequest r "OperationsInsights", "CreateAwrHubSource", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubSources/CreateAwrHubSource"); java.util.function.Function transformer = CreateAwrHubSourceConverter.fromResponse( @@ -1199,7 +1250,7 @@ public CreateDatabaseInsightResponse createDatabaseInsight( "OperationsInsights", "CreateDatabaseInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/CreateDatabaseInsight"); java.util.function.Function transformer = CreateDatabaseInsightConverter.fromResponse( @@ -1242,7 +1293,7 @@ public CreateEnterpriseManagerBridgeResponse createEnterpriseManagerBridge( "OperationsInsights", "CreateEnterpriseManagerBridge", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/EnterpriseManagerBridges/CreateEnterpriseManagerBridge"); java.util.function.Function< javax.ws.rs.core.Response, CreateEnterpriseManagerBridgeResponse> transformer = @@ -1286,7 +1337,7 @@ public CreateExadataInsightResponse createExadataInsight(CreateExadataInsightReq "OperationsInsights", "CreateExadataInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/CreateExadataInsight"); java.util.function.Function transformer = CreateExadataInsightConverter.fromResponse( @@ -1328,7 +1379,7 @@ public CreateHostInsightResponse createHostInsight(CreateHostInsightRequest requ "OperationsInsights", "CreateHostInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/CreateHostInsight"); java.util.function.Function transformer = CreateHostInsightConverter.fromResponse( @@ -1370,7 +1421,7 @@ public CreateNewsReportResponse createNewsReport(CreateNewsReportRequest request "OperationsInsights", "CreateNewsReport", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/NewsReports/CreateNewsReport"); java.util.function.Function transformer = CreateNewsReportConverter.fromResponse( @@ -1414,7 +1465,7 @@ public CreateOperationsInsightsPrivateEndpointResponse createOperationsInsightsP "OperationsInsights", "CreateOperationsInsightsPrivateEndpoint", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsPrivateEndpoint/CreateOperationsInsightsPrivateEndpoint"); java.util.function.Function< javax.ws.rs.core.Response, CreateOperationsInsightsPrivateEndpointResponse> transformer = @@ -1459,7 +1510,7 @@ public CreateOperationsInsightsWarehouseResponse createOperationsInsightsWarehou "OperationsInsights", "CreateOperationsInsightsWarehouse", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/CreateOperationsInsightsWarehouse"); java.util.function.Function< javax.ws.rs.core.Response, CreateOperationsInsightsWarehouseResponse> transformer = @@ -1505,7 +1556,7 @@ public CreateOperationsInsightsWarehouseUserResponse createOperationsInsightsWar "OperationsInsights", "CreateOperationsInsightsWarehouseUser", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouseUsers/CreateOperationsInsightsWarehouseUser"); java.util.function.Function< javax.ws.rs.core.Response, CreateOperationsInsightsWarehouseUserResponse> transformer = @@ -1550,7 +1601,7 @@ public CreateOpsiConfigurationResponse createOpsiConfiguration( "OperationsInsights", "CreateOpsiConfiguration", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiConfigurations/CreateOpsiConfiguration"); java.util.function.Function transformer = CreateOpsiConfigurationConverter.fromResponse( @@ -1588,7 +1639,10 @@ public DeleteAwrHubResponse deleteAwrHub(DeleteAwrHubRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "DeleteAwrHub", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "DeleteAwrHub", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/DeleteAwrHub"); java.util.function.Function transformer = DeleteAwrHubConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -1624,7 +1678,7 @@ public DeleteAwrHubObjectResponse deleteAwrHubObject(DeleteAwrHubObjectRequest r "OperationsInsights", "DeleteAwrHubObject", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubObjects/DeleteAwrHubObject"); java.util.function.Function transformer = DeleteAwrHubObjectConverter.fromResponse( @@ -1662,7 +1716,7 @@ public DeleteAwrHubSourceResponse deleteAwrHubSource(DeleteAwrHubSourceRequest r "OperationsInsights", "DeleteAwrHubSource", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubSources/DeleteAwrHubSource"); java.util.function.Function transformer = DeleteAwrHubSourceConverter.fromResponse( @@ -1701,7 +1755,7 @@ public DeleteDatabaseInsightResponse deleteDatabaseInsight( "OperationsInsights", "DeleteDatabaseInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/DeleteDatabaseInsight"); java.util.function.Function transformer = DeleteDatabaseInsightConverter.fromResponse( @@ -1740,7 +1794,7 @@ public DeleteEnterpriseManagerBridgeResponse deleteEnterpriseManagerBridge( "OperationsInsights", "DeleteEnterpriseManagerBridge", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/EnterpriseManagerBridges/DeleteEnterpriseManagerBridge"); java.util.function.Function< javax.ws.rs.core.Response, DeleteEnterpriseManagerBridgeResponse> transformer = @@ -1779,7 +1833,7 @@ public DeleteExadataInsightResponse deleteExadataInsight(DeleteExadataInsightReq "OperationsInsights", "DeleteExadataInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/DeleteExadataInsight"); java.util.function.Function transformer = DeleteExadataInsightConverter.fromResponse( @@ -1817,7 +1871,7 @@ public DeleteHostInsightResponse deleteHostInsight(DeleteHostInsightRequest requ "OperationsInsights", "DeleteHostInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/DeleteHostInsight"); java.util.function.Function transformer = DeleteHostInsightConverter.fromResponse( @@ -1855,7 +1909,7 @@ public DeleteNewsReportResponse deleteNewsReport(DeleteNewsReportRequest request "OperationsInsights", "DeleteNewsReport", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/NewsReports/DeleteNewsReport"); java.util.function.Function transformer = DeleteNewsReportConverter.fromResponse( @@ -1895,7 +1949,7 @@ public DeleteOperationsInsightsPrivateEndpointResponse deleteOperationsInsightsP "OperationsInsights", "DeleteOperationsInsightsPrivateEndpoint", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsPrivateEndpoint/DeleteOperationsInsightsPrivateEndpoint"); java.util.function.Function< javax.ws.rs.core.Response, DeleteOperationsInsightsPrivateEndpointResponse> transformer = @@ -1935,7 +1989,7 @@ public DeleteOperationsInsightsWarehouseResponse deleteOperationsInsightsWarehou "OperationsInsights", "DeleteOperationsInsightsWarehouse", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/DeleteOperationsInsightsWarehouse"); java.util.function.Function< javax.ws.rs.core.Response, DeleteOperationsInsightsWarehouseResponse> transformer = @@ -1976,7 +2030,7 @@ public DeleteOperationsInsightsWarehouseUserResponse deleteOperationsInsightsWar "OperationsInsights", "DeleteOperationsInsightsWarehouseUser", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouseUsers/DeleteOperationsInsightsWarehouseUser"); java.util.function.Function< javax.ws.rs.core.Response, DeleteOperationsInsightsWarehouseUserResponse> transformer = @@ -2016,7 +2070,7 @@ public DeleteOpsiConfigurationResponse deleteOpsiConfiguration( "OperationsInsights", "DeleteOpsiConfiguration", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiConfigurations/DeleteOpsiConfiguration"); java.util.function.Function transformer = DeleteOpsiConfigurationConverter.fromResponse( @@ -2058,7 +2112,7 @@ public DeleteOpsiConfigurationResponse deleteOpsiConfiguration( "OperationsInsights", "DisableAutonomousDatabaseInsightAdvancedFeatures", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/DisableAutonomousDatabaseInsightAdvancedFeatures"); java.util.function.Function< javax.ws.rs.core.Response, DisableAutonomousDatabaseInsightAdvancedFeaturesResponse> @@ -2099,7 +2153,7 @@ public DisableAwrHubSourceResponse disableAwrHubSource(DisableAwrHubSourceReques "OperationsInsights", "DisableAwrHubSource", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubSources/DisableAwrHubSource"); java.util.function.Function transformer = DisableAwrHubSourceConverter.fromResponse( @@ -2139,7 +2193,7 @@ public DisableDatabaseInsightResponse disableDatabaseInsight( "OperationsInsights", "DisableDatabaseInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/DisableDatabaseInsight"); java.util.function.Function transformer = DisableDatabaseInsightConverter.fromResponse( @@ -2179,7 +2233,7 @@ public DisableExadataInsightResponse disableExadataInsight( "OperationsInsights", "DisableExadataInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/DisableExadataInsight"); java.util.function.Function transformer = DisableExadataInsightConverter.fromResponse( @@ -2218,7 +2272,7 @@ public DisableHostInsightResponse disableHostInsight(DisableHostInsightRequest r "OperationsInsights", "DisableHostInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/DisableHostInsight"); java.util.function.Function transformer = DisableHostInsightConverter.fromResponse( @@ -2260,7 +2314,7 @@ public DisableHostInsightResponse disableHostInsight(DisableHostInsightRequest r "OperationsInsights", "DownloadOperationsInsightsWarehouseWallet", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/DownloadOperationsInsightsWarehouseWallet"); java.util.function.Function< javax.ws.rs.core.Response, DownloadOperationsInsightsWarehouseWalletResponse> @@ -2308,7 +2362,7 @@ public DisableHostInsightResponse disableHostInsight(DisableHostInsightRequest r "OperationsInsights", "EnableAutonomousDatabaseInsightAdvancedFeatures", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/EnableAutonomousDatabaseInsightAdvancedFeatures"); java.util.function.Function< javax.ws.rs.core.Response, EnableAutonomousDatabaseInsightAdvancedFeaturesResponse> @@ -2353,7 +2407,7 @@ public EnableAwrHubSourceResponse enableAwrHubSource(EnableAwrHubSourceRequest r "OperationsInsights", "EnableAwrHubSource", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubSources/EnableAwrHubSource"); java.util.function.Function transformer = EnableAwrHubSourceConverter.fromResponse( @@ -2393,7 +2447,7 @@ public EnableDatabaseInsightResponse enableDatabaseInsight( "OperationsInsights", "EnableDatabaseInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/EnableDatabaseInsight"); java.util.function.Function transformer = EnableDatabaseInsightConverter.fromResponse( @@ -2435,7 +2489,7 @@ public EnableExadataInsightResponse enableExadataInsight(EnableExadataInsightReq "OperationsInsights", "EnableExadataInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/EnableExadataInsight"); java.util.function.Function transformer = EnableExadataInsightConverter.fromResponse( @@ -2477,7 +2531,7 @@ public EnableHostInsightResponse enableHostInsight(EnableHostInsightRequest requ "OperationsInsights", "EnableHostInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/EnableHostInsight"); java.util.function.Function transformer = EnableHostInsightConverter.fromResponse( @@ -2518,7 +2572,7 @@ public GetAwrDatabaseReportResponse getAwrDatabaseReport(GetAwrDatabaseReportReq "OperationsInsights", "GetAwrDatabaseReport", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/GetAwrDatabaseReport"); java.util.function.Function transformer = GetAwrDatabaseReportConverter.fromResponse( @@ -2556,7 +2610,7 @@ public GetAwrDatabaseSqlReportResponse getAwrDatabaseSqlReport( "OperationsInsights", "GetAwrDatabaseSqlReport", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/GetAwrDatabaseSqlReport"); java.util.function.Function transformer = GetAwrDatabaseSqlReportConverter.fromResponse( @@ -2589,7 +2643,10 @@ public GetAwrHubResponse getAwrHub(GetAwrHubRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "GetAwrHub", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "GetAwrHub", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/GetAwrHub"); java.util.function.Function transformer = GetAwrHubConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -2621,7 +2678,10 @@ public GetAwrHubObjectResponse getAwrHubObject(GetAwrHubObjectRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "GetAwrHubObject", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "GetAwrHubObject", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubObjects/GetAwrHubObject"); java.util.function.Function transformer = GetAwrHubObjectConverter.fromResponse( @@ -2655,7 +2715,10 @@ public GetAwrHubSourceResponse getAwrHubSource(GetAwrHubSourceRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "GetAwrHubSource", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "GetAwrHubSource", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubSources/GetAwrHubSource"); java.util.function.Function transformer = GetAwrHubSourceConverter.fromResponse( @@ -2689,7 +2752,10 @@ public GetAwrReportResponse getAwrReport(GetAwrReportRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "GetAwrReport", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "GetAwrReport", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/GetAwrReport"); java.util.function.Function transformer = GetAwrReportConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -2724,7 +2790,7 @@ public GetDatabaseInsightResponse getDatabaseInsight(GetDatabaseInsightRequest r "OperationsInsights", "GetDatabaseInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/GetDatabaseInsight"); java.util.function.Function transformer = GetDatabaseInsightConverter.fromResponse( @@ -2762,7 +2828,7 @@ public GetEnterpriseManagerBridgeResponse getEnterpriseManagerBridge( "OperationsInsights", "GetEnterpriseManagerBridge", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/EnterpriseManagerBridges/GetEnterpriseManagerBridge"); java.util.function.Function transformer = GetEnterpriseManagerBridgeConverter.fromResponse( @@ -2799,7 +2865,7 @@ public GetExadataInsightResponse getExadataInsight(GetExadataInsightRequest requ "OperationsInsights", "GetExadataInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/GetExadataInsight"); java.util.function.Function transformer = GetExadataInsightConverter.fromResponse( @@ -2833,7 +2899,10 @@ public GetHostInsightResponse getHostInsight(GetHostInsightRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "GetHostInsight", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "GetHostInsight", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/GetHostInsight"); java.util.function.Function transformer = GetHostInsightConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -2865,7 +2934,10 @@ public GetNewsReportResponse getNewsReport(GetNewsReportRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "GetNewsReport", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "GetNewsReport", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/NewsReports/GetNewsReport"); java.util.function.Function transformer = GetNewsReportConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -2902,7 +2974,7 @@ public GetOperationsInsightsPrivateEndpointResponse getOperationsInsightsPrivate "OperationsInsights", "GetOperationsInsightsPrivateEndpoint", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsPrivateEndpoint/GetOperationsInsightsPrivateEndpoint"); java.util.function.Function< javax.ws.rs.core.Response, GetOperationsInsightsPrivateEndpointResponse> transformer = @@ -2941,7 +3013,7 @@ public GetOperationsInsightsWarehouseResponse getOperationsInsightsWarehouse( "OperationsInsights", "GetOperationsInsightsWarehouse", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/GetOperationsInsightsWarehouse"); java.util.function.Function< javax.ws.rs.core.Response, GetOperationsInsightsWarehouseResponse> transformer = @@ -2980,7 +3052,7 @@ public GetOperationsInsightsWarehouseUserResponse getOperationsInsightsWarehouse "OperationsInsights", "GetOperationsInsightsWarehouseUser", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouseUsers/GetOperationsInsightsWarehouseUser"); java.util.function.Function< javax.ws.rs.core.Response, GetOperationsInsightsWarehouseUserResponse> transformer = @@ -3018,7 +3090,7 @@ public GetOpsiConfigurationResponse getOpsiConfiguration(GetOpsiConfigurationReq "OperationsInsights", "GetOpsiConfiguration", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiConfigurations/GetOpsiConfiguration"); java.util.function.Function transformer = GetOpsiConfigurationConverter.fromResponse( @@ -3055,7 +3127,7 @@ public GetOpsiDataObjectResponse getOpsiDataObject(GetOpsiDataObjectRequest requ "OperationsInsights", "GetOpsiDataObject", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiDataObjects/GetOpsiDataObject"); java.util.function.Function transformer = GetOpsiDataObjectConverter.fromResponse( @@ -3089,7 +3161,10 @@ public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "GetWorkRequest", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "GetWorkRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/WorkRequests/GetWorkRequest"); java.util.function.Function transformer = GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -3124,7 +3199,7 @@ public HeadAwrHubObjectResponse headAwrHubObject(HeadAwrHubObjectRequest request "OperationsInsights", "HeadAwrHubObject", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubObjects/HeadAwrHubObject"); java.util.function.Function transformer = HeadAwrHubObjectConverter.fromResponse( @@ -3163,7 +3238,7 @@ public IngestAddmReportsResponse ingestAddmReports(IngestAddmReportsRequest requ "OperationsInsights", "IngestAddmReports", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/IngestAddmReports"); java.util.function.Function transformer = IngestAddmReportsConverter.fromResponse( @@ -3206,7 +3281,7 @@ public IngestDatabaseConfigurationResponse ingestDatabaseConfiguration( "OperationsInsights", "IngestDatabaseConfiguration", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/IngestDatabaseConfiguration"); java.util.function.Function transformer = IngestDatabaseConfigurationConverter.fromResponse( @@ -3250,7 +3325,7 @@ public IngestHostConfigurationResponse ingestHostConfiguration( "OperationsInsights", "IngestHostConfiguration", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/IngestHostConfiguration"); java.util.function.Function transformer = IngestHostConfigurationConverter.fromResponse( @@ -3292,7 +3367,7 @@ public IngestHostMetricsResponse ingestHostMetrics(IngestHostMetricsRequest requ "OperationsInsights", "IngestHostMetrics", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/IngestHostMetrics"); java.util.function.Function transformer = IngestHostMetricsConverter.fromResponse( @@ -3316,6 +3391,90 @@ public IngestHostMetricsResponse ingestHostMetrics(IngestHostMetricsRequest requ }); } + @Override + public IngestMySqlSqlStatsResponse ingestMySqlSqlStats(IngestMySqlSqlStatsRequest request) { + LOG.trace("Called ingestMySqlSqlStats"); + final IngestMySqlSqlStatsRequest interceptedRequest = + IngestMySqlSqlStatsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + IngestMySqlSqlStatsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OperationsInsights", + "IngestMySqlSqlStats", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/IngestMySqlSqlStats"); + java.util.function.Function + transformer = + IngestMySqlSqlStatsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getIngestMySqlSqlStatsDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public IngestMySqlSqlTextResponse ingestMySqlSqlText(IngestMySqlSqlTextRequest request) { + LOG.trace("Called ingestMySqlSqlText"); + final IngestMySqlSqlTextRequest interceptedRequest = + IngestMySqlSqlTextConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + IngestMySqlSqlTextConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OperationsInsights", + "IngestMySqlSqlText", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/IngestMySqlSqlText"); + java.util.function.Function + transformer = + IngestMySqlSqlTextConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getIngestMySqlSqlTextDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public IngestSqlBucketResponse ingestSqlBucket(IngestSqlBucketRequest request) { LOG.trace("Called ingestSqlBucket"); @@ -3331,7 +3490,10 @@ public IngestSqlBucketResponse ingestSqlBucket(IngestSqlBucketRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "IngestSqlBucket", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "IngestSqlBucket", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/IngestSqlBucket"); java.util.function.Function transformer = IngestSqlBucketConverter.fromResponse( @@ -3373,7 +3535,7 @@ public IngestSqlPlanLinesResponse ingestSqlPlanLines(IngestSqlPlanLinesRequest r "OperationsInsights", "IngestSqlPlanLines", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/IngestSqlPlanLines"); java.util.function.Function transformer = IngestSqlPlanLinesConverter.fromResponse( @@ -3412,7 +3574,10 @@ public IngestSqlStatsResponse ingestSqlStats(IngestSqlStatsRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "IngestSqlStats", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "IngestSqlStats", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/IngestSqlStats"); java.util.function.Function transformer = IngestSqlStatsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -3449,7 +3614,10 @@ public IngestSqlTextResponse ingestSqlText(IngestSqlTextRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "IngestSqlText", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "IngestSqlText", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/IngestSqlText"); java.util.function.Function transformer = IngestSqlTextConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -3489,7 +3657,7 @@ public ListAddmDbFindingCategoriesResponse listAddmDbFindingCategories( "OperationsInsights", "ListAddmDbFindingCategories", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListAddmDbFindingCategories"); java.util.function.Function transformer = ListAddmDbFindingCategoriesConverter.fromResponse( @@ -3527,7 +3695,7 @@ public ListAddmDbFindingsTimeSeriesResponse listAddmDbFindingsTimeSeries( "OperationsInsights", "ListAddmDbFindingsTimeSeries", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListAddmDbFindingsTimeSeries"); java.util.function.Function transformer = ListAddmDbFindingsTimeSeriesConverter.fromResponse( @@ -3565,7 +3733,7 @@ public ListAddmDbParameterCategoriesResponse listAddmDbParameterCategories( "OperationsInsights", "ListAddmDbParameterCategories", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListAddmDbParameterCategories"); java.util.function.Function< javax.ws.rs.core.Response, ListAddmDbParameterCategoriesResponse> transformer = @@ -3604,7 +3772,7 @@ public ListAddmDbRecommendationCategoriesResponse listAddmDbRecommendationCatego "OperationsInsights", "ListAddmDbRecommendationCategories", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListAddmDbRecommendationCategories"); java.util.function.Function< javax.ws.rs.core.Response, ListAddmDbRecommendationCategoriesResponse> transformer = @@ -3644,7 +3812,7 @@ public ListAddmDbRecommendationsTimeSeriesResponse listAddmDbRecommendationsTime "OperationsInsights", "ListAddmDbRecommendationsTimeSeries", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListAddmDbRecommendationsTimeSeries"); java.util.function.Function< javax.ws.rs.core.Response, ListAddmDbRecommendationsTimeSeriesResponse> transformer = @@ -3679,7 +3847,10 @@ public ListAddmDbsResponse listAddmDbs(ListAddmDbsRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "ListAddmDbs", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "ListAddmDbs", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListAddmDbs"); java.util.function.Function transformer = ListAddmDbsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -3715,7 +3886,7 @@ public ListAwrDatabaseSnapshotsResponse listAwrDatabaseSnapshots( "OperationsInsights", "ListAwrDatabaseSnapshots", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/ListAwrDatabaseSnapshots"); java.util.function.Function transformer = ListAwrDatabaseSnapshotsConverter.fromResponse( @@ -3752,7 +3923,7 @@ public ListAwrDatabasesResponse listAwrDatabases(ListAwrDatabasesRequest request "OperationsInsights", "ListAwrDatabases", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/ListAwrDatabases"); java.util.function.Function transformer = ListAwrDatabasesConverter.fromResponse( @@ -3789,7 +3960,7 @@ public ListAwrHubObjectsResponse listAwrHubObjects(ListAwrHubObjectsRequest requ "OperationsInsights", "ListAwrHubObjects", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubObjects/ListAwrHubObjects"); java.util.function.Function transformer = ListAwrHubObjectsConverter.fromResponse( @@ -3826,7 +3997,7 @@ public ListAwrHubSourcesResponse listAwrHubSources(ListAwrHubSourcesRequest requ "OperationsInsights", "ListAwrHubSources", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubSources/ListAwrHubSources"); java.util.function.Function transformer = ListAwrHubSourcesConverter.fromResponse( @@ -3860,7 +4031,10 @@ public ListAwrHubsResponse listAwrHubs(ListAwrHubsRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "ListAwrHubs", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "ListAwrHubs", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/ListAwrHubs"); java.util.function.Function transformer = ListAwrHubsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -3895,7 +4069,7 @@ public ListAwrSnapshotsResponse listAwrSnapshots(ListAwrSnapshotsRequest request "OperationsInsights", "ListAwrSnapshots", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/ListAwrSnapshots"); java.util.function.Function transformer = ListAwrSnapshotsConverter.fromResponse( @@ -3933,7 +4107,7 @@ public ListDatabaseConfigurationsResponse listDatabaseConfigurations( "OperationsInsights", "ListDatabaseConfigurations", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListDatabaseConfigurations"); java.util.function.Function transformer = ListDatabaseConfigurationsConverter.fromResponse( @@ -3970,7 +4144,7 @@ public ListDatabaseInsightsResponse listDatabaseInsights(ListDatabaseInsightsReq "OperationsInsights", "ListDatabaseInsights", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListDatabaseInsights"); java.util.function.Function transformer = ListDatabaseInsightsConverter.fromResponse( @@ -4008,7 +4182,7 @@ public ListEnterpriseManagerBridgesResponse listEnterpriseManagerBridges( "OperationsInsights", "ListEnterpriseManagerBridges", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/EnterpriseManagerBridges/ListEnterpriseManagerBridges"); java.util.function.Function transformer = ListEnterpriseManagerBridgesConverter.fromResponse( @@ -4046,7 +4220,7 @@ public ListExadataConfigurationsResponse listExadataConfigurations( "OperationsInsights", "ListExadataConfigurations", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/ListExadataConfigurations"); java.util.function.Function transformer = ListExadataConfigurationsConverter.fromResponse( @@ -4083,7 +4257,7 @@ public ListExadataInsightsResponse listExadataInsights(ListExadataInsightsReques "OperationsInsights", "ListExadataInsights", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/ListExadataInsights"); java.util.function.Function transformer = ListExadataInsightsConverter.fromResponse( @@ -4121,7 +4295,7 @@ public ListHostConfigurationsResponse listHostConfigurations( "OperationsInsights", "ListHostConfigurations", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ListHostConfigurations"); java.util.function.Function transformer = ListHostConfigurationsConverter.fromResponse( @@ -4158,7 +4332,7 @@ public ListHostInsightsResponse listHostInsights(ListHostInsightsRequest request "OperationsInsights", "ListHostInsights", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ListHostInsights"); java.util.function.Function transformer = ListHostInsightsConverter.fromResponse( @@ -4195,7 +4369,7 @@ public ListHostedEntitiesResponse listHostedEntities(ListHostedEntitiesRequest r "OperationsInsights", "ListHostedEntities", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ListHostedEntities"); java.util.function.Function transformer = ListHostedEntitiesConverter.fromResponse( @@ -4233,7 +4407,7 @@ public ListImportableAgentEntitiesResponse listImportableAgentEntities( "OperationsInsights", "ListImportableAgentEntities", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ListImportableAgentEntities"); java.util.function.Function transformer = ListImportableAgentEntitiesConverter.fromResponse( @@ -4271,7 +4445,7 @@ public ListImportableComputeEntitiesResponse listImportableComputeEntities( "OperationsInsights", "ListImportableComputeEntities", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ListImportableComputeEntities"); java.util.function.Function< javax.ws.rs.core.Response, ListImportableComputeEntitiesResponse> transformer = @@ -4311,7 +4485,7 @@ public ListImportableEnterpriseManagerEntitiesResponse listImportableEnterpriseM "OperationsInsights", "ListImportableEnterpriseManagerEntities", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/EnterpriseManagerBridges/ListImportableEnterpriseManagerEntities"); java.util.function.Function< javax.ws.rs.core.Response, ListImportableEnterpriseManagerEntitiesResponse> transformer = @@ -4346,7 +4520,10 @@ public ListNewsReportsResponse listNewsReports(ListNewsReportsRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "ListNewsReports", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "ListNewsReports", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/NewsReport/ListNewsReports"); java.util.function.Function transformer = ListNewsReportsConverter.fromResponse( @@ -4385,7 +4562,7 @@ public ListOperationsInsightsPrivateEndpointsResponse listOperationsInsightsPriv "OperationsInsights", "ListOperationsInsightsPrivateEndpoints", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsPrivateEndpoint/ListOperationsInsightsPrivateEndpoints"); java.util.function.Function< javax.ws.rs.core.Response, ListOperationsInsightsPrivateEndpointsResponse> transformer = @@ -4425,7 +4602,7 @@ public ListOperationsInsightsWarehouseUsersResponse listOperationsInsightsWareho "OperationsInsights", "ListOperationsInsightsWarehouseUsers", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouseUsers/ListOperationsInsightsWarehouseUsers"); java.util.function.Function< javax.ws.rs.core.Response, ListOperationsInsightsWarehouseUsersResponse> transformer = @@ -4464,7 +4641,7 @@ public ListOperationsInsightsWarehousesResponse listOperationsInsightsWarehouses "OperationsInsights", "ListOperationsInsightsWarehouses", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/ListOperationsInsightsWarehouses"); java.util.function.Function< javax.ws.rs.core.Response, ListOperationsInsightsWarehousesResponse> transformer = @@ -4503,7 +4680,7 @@ public ListOpsiConfigurationsResponse listOpsiConfigurations( "OperationsInsights", "ListOpsiConfigurations", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiConfigurations/ListOpsiConfigurations"); java.util.function.Function transformer = ListOpsiConfigurationsConverter.fromResponse( @@ -4540,7 +4717,7 @@ public ListOpsiDataObjectsResponse listOpsiDataObjects(ListOpsiDataObjectsReques "OperationsInsights", "ListOpsiDataObjects", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiDataObjects/ListOpsiDataObjects"); java.util.function.Function transformer = ListOpsiDataObjectsConverter.fromResponse( @@ -4574,7 +4751,10 @@ public ListSqlPlansResponse listSqlPlans(ListSqlPlansRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "ListSqlPlans", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "ListSqlPlans", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListSqlPlans"); java.util.function.Function transformer = ListSqlPlansConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -4606,7 +4786,10 @@ public ListSqlSearchesResponse listSqlSearches(ListSqlSearchesRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "ListSqlSearches", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "ListSqlSearches", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListSqlSearches"); java.util.function.Function transformer = ListSqlSearchesConverter.fromResponse( @@ -4640,7 +4823,10 @@ public ListSqlTextsResponse listSqlTexts(ListSqlTextsRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "ListSqlTexts", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "ListSqlTexts", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListSqlTexts"); java.util.function.Function transformer = ListSqlTextsConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -4676,7 +4862,7 @@ public ListWarehouseDataObjectsResponse listWarehouseDataObjects( "OperationsInsights", "ListWarehouseDataObjects", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiWarehouseDataObjects/ListWarehouseDataObjects"); java.util.function.Function transformer = ListWarehouseDataObjectsConverter.fromResponse( @@ -4714,7 +4900,7 @@ public ListWorkRequestErrorsResponse listWorkRequestErrors( "OperationsInsights", "ListWorkRequestErrors", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/WorkRequests/ListWorkRequestErrors"); java.util.function.Function transformer = ListWorkRequestErrorsConverter.fromResponse( @@ -4751,7 +4937,7 @@ public ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsReques "OperationsInsights", "ListWorkRequestLogs", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/WorkRequests/ListWorkRequestLogs"); java.util.function.Function transformer = ListWorkRequestLogsConverter.fromResponse( @@ -4788,7 +4974,7 @@ public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request "OperationsInsights", "ListWorkRequests", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/WorkRequests/ListWorkRequests"); java.util.function.Function transformer = ListWorkRequestsConverter.fromResponse( @@ -4838,7 +5024,7 @@ public PutAwrHubObjectResponse putAwrHubObject(PutAwrHubObjectRequest request) { "OperationsInsights", "PutAwrHubObject", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubObjects/PutAwrHubObject"); java.util.function.Function transformer = PutAwrHubObjectConverter.fromResponse( @@ -4902,7 +5088,7 @@ public QueryOpsiDataObjectDataResponse queryOpsiDataObjectData( "OperationsInsights", "QueryOpsiDataObjectData", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiDataObjects/QueryOpsiDataObjectData"); java.util.function.Function transformer = QueryOpsiDataObjectDataConverter.fromResponse( @@ -4944,7 +5130,7 @@ public QueryWarehouseDataObjectDataResponse queryWarehouseDataObjectData( "OperationsInsights", "QueryWarehouseDataObjectData", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiWarehouseDataObjects/QueryWarehouseDataObjectData"); java.util.function.Function transformer = QueryWarehouseDataObjectDataConverter.fromResponse( @@ -4988,7 +5174,7 @@ public RotateOperationsInsightsWarehouseWalletResponse rotateOperationsInsightsW "OperationsInsights", "RotateOperationsInsightsWarehouseWallet", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/RotateOperationsInsightsWarehouseWallet"); java.util.function.Function< javax.ws.rs.core.Response, RotateOperationsInsightsWarehouseWalletResponse> transformer = @@ -5028,7 +5214,7 @@ public SummarizeAddmDbFindingsResponse summarizeAddmDbFindings( "OperationsInsights", "SummarizeAddmDbFindings", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeAddmDbFindings"); java.util.function.Function transformer = SummarizeAddmDbFindingsConverter.fromResponse( @@ -5066,7 +5252,7 @@ public SummarizeAddmDbParameterChangesResponse summarizeAddmDbParameterChanges( "OperationsInsights", "SummarizeAddmDbParameterChanges", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeAddmDbParameterChanges"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeAddmDbParameterChangesResponse> transformer = @@ -5105,7 +5291,7 @@ public SummarizeAddmDbParametersResponse summarizeAddmDbParameters( "OperationsInsights", "SummarizeAddmDbParameters", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeAddmDbParameters"); java.util.function.Function transformer = SummarizeAddmDbParametersConverter.fromResponse( @@ -5143,7 +5329,7 @@ public SummarizeAddmDbRecommendationsResponse summarizeAddmDbRecommendations( "OperationsInsights", "SummarizeAddmDbRecommendations", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeAddmDbRecommendations"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeAddmDbRecommendationsResponse> transformer = @@ -5182,7 +5368,7 @@ public SummarizeAddmDbSchemaObjectsResponse summarizeAddmDbSchemaObjects( "OperationsInsights", "SummarizeAddmDbSchemaObjects", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeAddmDbSchemaObjects"); java.util.function.Function transformer = SummarizeAddmDbSchemaObjectsConverter.fromResponse( @@ -5220,7 +5406,7 @@ public SummarizeAddmDbSqlStatementsResponse summarizeAddmDbSqlStatements( "OperationsInsights", "SummarizeAddmDbSqlStatements", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeAddmDbSqlStatements"); java.util.function.Function transformer = SummarizeAddmDbSqlStatementsConverter.fromResponse( @@ -5258,7 +5444,7 @@ public SummarizeAwrDatabaseCpuUsagesResponse summarizeAwrDatabaseCpuUsages( "OperationsInsights", "SummarizeAwrDatabaseCpuUsages", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/SummarizeAwrDatabaseCpuUsages"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeAwrDatabaseCpuUsagesResponse> transformer = @@ -5297,7 +5483,7 @@ public SummarizeAwrDatabaseMetricsResponse summarizeAwrDatabaseMetrics( "OperationsInsights", "SummarizeAwrDatabaseMetrics", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/SummarizeAwrDatabaseMetrics"); java.util.function.Function transformer = SummarizeAwrDatabaseMetricsConverter.fromResponse( @@ -5336,7 +5522,7 @@ public SummarizeAwrDatabaseParameterChangesResponse summarizeAwrDatabaseParamete "OperationsInsights", "SummarizeAwrDatabaseParameterChanges", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/SummarizeAwrDatabaseParameterChanges"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeAwrDatabaseParameterChangesResponse> transformer = @@ -5375,7 +5561,7 @@ public SummarizeAwrDatabaseParametersResponse summarizeAwrDatabaseParameters( "OperationsInsights", "SummarizeAwrDatabaseParameters", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/SummarizeAwrDatabaseParameters"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeAwrDatabaseParametersResponse> transformer = @@ -5414,7 +5600,7 @@ public SummarizeAwrDatabaseSnapshotRangesResponse summarizeAwrDatabaseSnapshotRa "OperationsInsights", "SummarizeAwrDatabaseSnapshotRanges", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/SummarizeAwrDatabaseSnapshotRanges"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeAwrDatabaseSnapshotRangesResponse> transformer = @@ -5453,7 +5639,7 @@ public SummarizeAwrDatabaseSysstatsResponse summarizeAwrDatabaseSysstats( "OperationsInsights", "SummarizeAwrDatabaseSysstats", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/SummarizeAwrDatabaseSysstats"); java.util.function.Function transformer = SummarizeAwrDatabaseSysstatsConverter.fromResponse( @@ -5491,7 +5677,7 @@ public SummarizeAwrDatabaseTopWaitEventsResponse summarizeAwrDatabaseTopWaitEven "OperationsInsights", "SummarizeAwrDatabaseTopWaitEvents", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/SummarizeAwrDatabaseTopWaitEvents"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeAwrDatabaseTopWaitEventsResponse> transformer = @@ -5531,7 +5717,7 @@ public SummarizeAwrDatabaseWaitEventBucketsResponse summarizeAwrDatabaseWaitEven "OperationsInsights", "SummarizeAwrDatabaseWaitEventBuckets", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/SummarizeAwrDatabaseWaitEventBuckets"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeAwrDatabaseWaitEventBucketsResponse> transformer = @@ -5570,7 +5756,7 @@ public SummarizeAwrDatabaseWaitEventsResponse summarizeAwrDatabaseWaitEvents( "OperationsInsights", "SummarizeAwrDatabaseWaitEvents", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/SummarizeAwrDatabaseWaitEvents"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeAwrDatabaseWaitEventsResponse> transformer = @@ -5609,7 +5795,7 @@ public SummarizeAwrSourcesSummariesResponse summarizeAwrSourcesSummaries( "OperationsInsights", "SummarizeAwrSourcesSummaries", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/SummarizeAwrSourcesSummaries"); java.util.function.Function transformer = SummarizeAwrSourcesSummariesConverter.fromResponse( @@ -5647,7 +5833,7 @@ public SummarizeConfigurationItemsResponse summarizeConfigurationItems( "OperationsInsights", "SummarizeConfigurationItems", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiConfigurations/SummarizeConfigurationItems"); java.util.function.Function transformer = SummarizeConfigurationItemsConverter.fromResponse( @@ -5687,7 +5873,7 @@ public SummarizeConfigurationItemsResponse summarizeConfigurationItems( "OperationsInsights", "SummarizeDatabaseInsightResourceCapacityTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeDatabaseInsightResourceCapacityTrend"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeDatabaseInsightResourceCapacityTrendResponse> @@ -5729,7 +5915,7 @@ public SummarizeConfigurationItemsResponse summarizeConfigurationItems( "OperationsInsights", "SummarizeDatabaseInsightResourceForecastTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeDatabaseInsightResourceForecastTrend"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeDatabaseInsightResourceForecastTrendResponse> @@ -5771,7 +5957,7 @@ public SummarizeConfigurationItemsResponse summarizeConfigurationItems( "OperationsInsights", "SummarizeDatabaseInsightResourceStatistics", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeDatabaseInsightResourceStatistics"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeDatabaseInsightResourceStatisticsResponse> @@ -5812,7 +5998,7 @@ public SummarizeDatabaseInsightResourceUsageResponse summarizeDatabaseInsightRes "OperationsInsights", "SummarizeDatabaseInsightResourceUsage", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeDatabaseInsightResourceUsage"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeDatabaseInsightResourceUsageResponse> transformer = @@ -5853,7 +6039,7 @@ public SummarizeDatabaseInsightResourceUsageResponse summarizeDatabaseInsightRes "OperationsInsights", "SummarizeDatabaseInsightResourceUsageTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeDatabaseInsightResourceUsageTrend"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeDatabaseInsightResourceUsageTrendResponse> @@ -5896,7 +6082,7 @@ public SummarizeDatabaseInsightResourceUsageResponse summarizeDatabaseInsightRes "OperationsInsights", "SummarizeDatabaseInsightResourceUtilizationInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeDatabaseInsightResourceUtilizationInsight"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeDatabaseInsightResourceUtilizationInsightResponse> @@ -5938,7 +6124,7 @@ public SummarizeDatabaseInsightResourceUsageResponse summarizeDatabaseInsightRes "OperationsInsights", "SummarizeDatabaseInsightTablespaceUsageTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeDatabaseInsightTablespaceUsageTrend"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeDatabaseInsightTablespaceUsageTrendResponse> @@ -5980,7 +6166,7 @@ public SummarizeDatabaseInsightResourceUsageResponse summarizeDatabaseInsightRes "OperationsInsights", "SummarizeExadataInsightResourceCapacityTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/SummarizeExadataInsightResourceCapacityTrend"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeExadataInsightResourceCapacityTrendResponse> @@ -6023,7 +6209,7 @@ public SummarizeDatabaseInsightResourceUsageResponse summarizeDatabaseInsightRes "OperationsInsights", "SummarizeExadataInsightResourceCapacityTrendAggregated", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/SummarizeExadataInsightResourceCapacityTrendAggregated"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeExadataInsightResourceCapacityTrendAggregatedResponse> @@ -6065,7 +6251,7 @@ public SummarizeDatabaseInsightResourceUsageResponse summarizeDatabaseInsightRes "OperationsInsights", "SummarizeExadataInsightResourceForecastTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/SummarizeExadataInsightResourceForecastTrend"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeExadataInsightResourceForecastTrendResponse> @@ -6108,7 +6294,7 @@ public SummarizeDatabaseInsightResourceUsageResponse summarizeDatabaseInsightRes "OperationsInsights", "SummarizeExadataInsightResourceForecastTrendAggregated", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/SummarizeExadataInsightResourceForecastTrendAggregated"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeExadataInsightResourceForecastTrendAggregatedResponse> @@ -6150,7 +6336,7 @@ public SummarizeDatabaseInsightResourceUsageResponse summarizeDatabaseInsightRes "OperationsInsights", "SummarizeExadataInsightResourceStatistics", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/SummarizeExadataInsightResourceStatistics"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeExadataInsightResourceStatisticsResponse> @@ -6191,7 +6377,7 @@ public SummarizeExadataInsightResourceUsageResponse summarizeExadataInsightResou "OperationsInsights", "SummarizeExadataInsightResourceUsage", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/SummarizeExadataInsightResourceUsage"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeExadataInsightResourceUsageResponse> transformer = @@ -6232,7 +6418,7 @@ public SummarizeExadataInsightResourceUsageResponse summarizeExadataInsightResou "OperationsInsights", "SummarizeExadataInsightResourceUsageAggregated", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/SummarizeExadataInsightResourceUsageAggregated"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeExadataInsightResourceUsageAggregatedResponse> @@ -6275,7 +6461,7 @@ public SummarizeExadataInsightResourceUsageResponse summarizeExadataInsightResou "OperationsInsights", "SummarizeExadataInsightResourceUtilizationInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/SummarizeExadataInsightResourceUtilizationInsight"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeExadataInsightResourceUtilizationInsightResponse> @@ -6315,7 +6501,7 @@ public SummarizeExadataMembersResponse summarizeExadataMembers( "OperationsInsights", "SummarizeExadataMembers", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/SummarizeExadataMembers"); java.util.function.Function transformer = SummarizeExadataMembersConverter.fromResponse( @@ -6353,7 +6539,7 @@ public SummarizeHostInsightDiskStatisticsResponse summarizeHostInsightDiskStatis "OperationsInsights", "SummarizeHostInsightDiskStatistics", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightDiskStatistics"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightDiskStatisticsResponse> transformer = @@ -6393,7 +6579,7 @@ public SummarizeHostInsightHostRecommendationResponse summarizeHostInsightHostRe "OperationsInsights", "SummarizeHostInsightHostRecommendation", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightHostRecommendation"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightHostRecommendationResponse> transformer = @@ -6414,6 +6600,45 @@ public SummarizeHostInsightHostRecommendationResponse summarizeHostInsightHostRe }); } + @Override + public SummarizeHostInsightIoUsageTrendResponse summarizeHostInsightIoUsageTrend( + SummarizeHostInsightIoUsageTrendRequest request) { + LOG.trace("Called summarizeHostInsightIoUsageTrend"); + final SummarizeHostInsightIoUsageTrendRequest interceptedRequest = + SummarizeHostInsightIoUsageTrendConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + SummarizeHostInsightIoUsageTrendConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OperationsInsights", + "SummarizeHostInsightIoUsageTrend", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightIoUsageTrend"); + java.util.function.Function< + javax.ws.rs.core.Response, SummarizeHostInsightIoUsageTrendResponse> + transformer = + SummarizeHostInsightIoUsageTrendConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public SummarizeHostInsightNetworkUsageTrendResponse summarizeHostInsightNetworkUsageTrend( SummarizeHostInsightNetworkUsageTrendRequest request) { @@ -6433,7 +6658,7 @@ public SummarizeHostInsightNetworkUsageTrendResponse summarizeHostInsightNetwork "OperationsInsights", "SummarizeHostInsightNetworkUsageTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightNetworkUsageTrend"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightNetworkUsageTrendResponse> transformer = @@ -6474,7 +6699,7 @@ public SummarizeHostInsightNetworkUsageTrendResponse summarizeHostInsightNetwork "OperationsInsights", "SummarizeHostInsightResourceCapacityTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightResourceCapacityTrend"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightResourceCapacityTrendResponse> @@ -6516,7 +6741,7 @@ public SummarizeHostInsightNetworkUsageTrendResponse summarizeHostInsightNetwork "OperationsInsights", "SummarizeHostInsightResourceForecastTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightResourceForecastTrend"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightResourceForecastTrendResponse> @@ -6557,7 +6782,7 @@ public SummarizeHostInsightResourceStatisticsResponse summarizeHostInsightResour "OperationsInsights", "SummarizeHostInsightResourceStatistics", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightResourceStatistics"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightResourceStatisticsResponse> transformer = @@ -6596,7 +6821,7 @@ public SummarizeHostInsightResourceUsageResponse summarizeHostInsightResourceUsa "OperationsInsights", "SummarizeHostInsightResourceUsage", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightResourceUsage"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightResourceUsageResponse> transformer = @@ -6636,7 +6861,7 @@ public SummarizeHostInsightResourceUsageTrendResponse summarizeHostInsightResour "OperationsInsights", "SummarizeHostInsightResourceUsageTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightResourceUsageTrend"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightResourceUsageTrendResponse> transformer = @@ -6677,7 +6902,7 @@ public SummarizeHostInsightResourceUsageTrendResponse summarizeHostInsightResour "OperationsInsights", "SummarizeHostInsightResourceUtilizationInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightResourceUtilizationInsight"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightResourceUtilizationInsightResponse> @@ -6718,7 +6943,7 @@ public SummarizeHostInsightStorageUsageTrendResponse summarizeHostInsightStorage "OperationsInsights", "SummarizeHostInsightStorageUsageTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightStorageUsageTrend"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightStorageUsageTrendResponse> transformer = @@ -6758,7 +6983,7 @@ public SummarizeHostInsightTopProcessesUsageResponse summarizeHostInsightTopProc "OperationsInsights", "SummarizeHostInsightTopProcessesUsage", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightTopProcessesUsage"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightTopProcessesUsageResponse> transformer = @@ -6799,7 +7024,7 @@ public SummarizeHostInsightTopProcessesUsageResponse summarizeHostInsightTopProc "OperationsInsights", "SummarizeHostInsightTopProcessesUsageTrend", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightTopProcessesUsageTrend"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeHostInsightTopProcessesUsageTrendResponse> @@ -6842,7 +7067,7 @@ public SummarizeHostInsightTopProcessesUsageResponse summarizeHostInsightTopProc "OperationsInsights", "SummarizeOperationsInsightsWarehouseResourceUsage", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/SummarizeOperationsInsightsWarehouseResourceUsage"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeOperationsInsightsWarehouseResourceUsageResponse> @@ -6881,7 +7106,7 @@ public SummarizeSqlInsightsResponse summarizeSqlInsights(SummarizeSqlInsightsReq "OperationsInsights", "SummarizeSqlInsights", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeSqlInsights"); java.util.function.Function transformer = SummarizeSqlInsightsConverter.fromResponse( @@ -6919,7 +7144,7 @@ public SummarizeSqlPlanInsightsResponse summarizeSqlPlanInsights( "OperationsInsights", "SummarizeSqlPlanInsights", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeSqlPlanInsights"); java.util.function.Function transformer = SummarizeSqlPlanInsightsConverter.fromResponse( @@ -6958,7 +7183,7 @@ public SummarizeSqlResponseTimeDistributionsResponse summarizeSqlResponseTimeDis "OperationsInsights", "SummarizeSqlResponseTimeDistributions", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeSqlResponseTimeDistributions"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeSqlResponseTimeDistributionsResponse> transformer = @@ -6997,7 +7222,7 @@ public SummarizeSqlStatisticsResponse summarizeSqlStatistics( "OperationsInsights", "SummarizeSqlStatistics", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeSqlStatistics"); java.util.function.Function transformer = SummarizeSqlStatisticsConverter.fromResponse( @@ -7035,7 +7260,7 @@ public SummarizeSqlStatisticsTimeSeriesResponse summarizeSqlStatisticsTimeSeries "OperationsInsights", "SummarizeSqlStatisticsTimeSeries", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeSqlStatisticsTimeSeries"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeSqlStatisticsTimeSeriesResponse> transformer = @@ -7075,7 +7300,7 @@ public SummarizeSqlStatisticsTimeSeriesByPlanResponse summarizeSqlStatisticsTime "OperationsInsights", "SummarizeSqlStatisticsTimeSeriesByPlan", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeSqlStatisticsTimeSeriesByPlan"); java.util.function.Function< javax.ws.rs.core.Response, SummarizeSqlStatisticsTimeSeriesByPlanResponse> transformer = @@ -7096,6 +7321,54 @@ public SummarizeSqlStatisticsTimeSeriesByPlanResponse summarizeSqlStatisticsTime }); } + @Override + public TestMacsManagedCloudDatabaseInsightConnectionResponse + testMacsManagedCloudDatabaseInsightConnection( + TestMacsManagedCloudDatabaseInsightConnectionRequest request) { + LOG.trace("Called testMacsManagedCloudDatabaseInsightConnection"); + final TestMacsManagedCloudDatabaseInsightConnectionRequest interceptedRequest = + TestMacsManagedCloudDatabaseInsightConnectionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + TestMacsManagedCloudDatabaseInsightConnectionConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "OperationsInsights", + "TestMacsManagedCloudDatabaseInsightConnection", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/TestMacsManagedCloudDatabaseInsightConnection"); + java.util.function.Function< + javax.ws.rs.core.Response, + TestMacsManagedCloudDatabaseInsightConnectionResponse> + transformer = + TestMacsManagedCloudDatabaseInsightConnectionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getTestMacsManagedCloudDatabaseInsightConnectionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateAwrHubResponse updateAwrHub(UpdateAwrHubRequest request) { LOG.trace("Called updateAwrHub"); @@ -7110,7 +7383,10 @@ public UpdateAwrHubResponse updateAwrHub(UpdateAwrHubRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "OperationsInsights", "UpdateAwrHub", ib.getRequestUri().toString(), ""); + "OperationsInsights", + "UpdateAwrHub", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/UpdateAwrHub"); java.util.function.Function transformer = UpdateAwrHubConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -7149,7 +7425,7 @@ public UpdateAwrHubSourceResponse updateAwrHubSource(UpdateAwrHubSourceRequest r "OperationsInsights", "UpdateAwrHubSource", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubSources/UpdateAwrHubSource"); java.util.function.Function transformer = UpdateAwrHubSourceConverter.fromResponse( @@ -7191,7 +7467,7 @@ public UpdateDatabaseInsightResponse updateDatabaseInsight( "OperationsInsights", "UpdateDatabaseInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/UpdateDatabaseInsight"); java.util.function.Function transformer = UpdateDatabaseInsightConverter.fromResponse( @@ -7233,7 +7509,7 @@ public UpdateEnterpriseManagerBridgeResponse updateEnterpriseManagerBridge( "OperationsInsights", "UpdateEnterpriseManagerBridge", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/EnterpriseManagerBridges/UpdateEnterpriseManagerBridge"); java.util.function.Function< javax.ws.rs.core.Response, UpdateEnterpriseManagerBridgeResponse> transformer = @@ -7276,7 +7552,7 @@ public UpdateExadataInsightResponse updateExadataInsight(UpdateExadataInsightReq "OperationsInsights", "UpdateExadataInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/UpdateExadataInsight"); java.util.function.Function transformer = UpdateExadataInsightConverter.fromResponse( @@ -7317,7 +7593,7 @@ public UpdateHostInsightResponse updateHostInsight(UpdateHostInsightRequest requ "OperationsInsights", "UpdateHostInsight", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/UpdateHostInsight"); java.util.function.Function transformer = UpdateHostInsightConverter.fromResponse( @@ -7358,7 +7634,7 @@ public UpdateNewsReportResponse updateNewsReport(UpdateNewsReportRequest request "OperationsInsights", "UpdateNewsReport", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/NewsReports/UpdateNewsReport"); java.util.function.Function transformer = UpdateNewsReportConverter.fromResponse( @@ -7401,7 +7677,7 @@ public UpdateOperationsInsightsPrivateEndpointResponse updateOperationsInsightsP "OperationsInsights", "UpdateOperationsInsightsPrivateEndpoint", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsPrivateEndpoint/UpdateOperationsInsightsPrivateEndpoint"); java.util.function.Function< javax.ws.rs.core.Response, UpdateOperationsInsightsPrivateEndpointResponse> transformer = @@ -7445,7 +7721,7 @@ public UpdateOperationsInsightsWarehouseResponse updateOperationsInsightsWarehou "OperationsInsights", "UpdateOperationsInsightsWarehouse", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/UpdateOperationsInsightsWarehouse"); java.util.function.Function< javax.ws.rs.core.Response, UpdateOperationsInsightsWarehouseResponse> transformer = @@ -7490,7 +7766,7 @@ public UpdateOperationsInsightsWarehouseUserResponse updateOperationsInsightsWar "OperationsInsights", "UpdateOperationsInsightsWarehouseUser", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouseUsers/UpdateOperationsInsightsWarehouseUser"); java.util.function.Function< javax.ws.rs.core.Response, UpdateOperationsInsightsWarehouseUserResponse> transformer = @@ -7534,7 +7810,7 @@ public UpdateOpsiConfigurationResponse updateOpsiConfiguration( "OperationsInsights", "UpdateOpsiConfiguration", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiConfigurations/UpdateOpsiConfiguration"); java.util.function.Function transformer = UpdateOpsiConfigurationConverter.fromResponse( diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/ChangeMacsManagedCloudDatabaseInsightConnectionConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/ChangeMacsManagedCloudDatabaseInsightConnectionConverter.java new file mode 100644 index 00000000000..bc10e5eb012 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/ChangeMacsManagedCloudDatabaseInsightConnectionConverter.java @@ -0,0 +1,162 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.opsi.model.*; +import com.oracle.bmc.opsi.requests.*; +import com.oracle.bmc.opsi.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +public class ChangeMacsManagedCloudDatabaseInsightConnectionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ChangeMacsManagedCloudDatabaseInsightConnectionConverter.class); + + public static com.oracle.bmc.opsi.requests + .ChangeMacsManagedCloudDatabaseInsightConnectionRequest + interceptRequest( + com.oracle.bmc.opsi.requests + .ChangeMacsManagedCloudDatabaseInsightConnectionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.opsi.requests.ChangeMacsManagedCloudDatabaseInsightConnectionRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getDatabaseInsightId(), "databaseInsightId must not be blank"); + Validate.notNull( + request.getChangeMacsManagedCloudDatabaseInsightConnectionDetails(), + "changeMacsManagedCloudDatabaseInsightConnectionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20200630") + .path("databaseInsights") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDatabaseInsightId())) + .path("actions") + .path("changeMacsManagedCloudDatabaseInsightConnectionDetails"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opsi.responses + .ChangeMacsManagedCloudDatabaseInsightConnectionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opsi.responses + .ChangeMacsManagedCloudDatabaseInsightConnectionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opsi.responses + .ChangeMacsManagedCloudDatabaseInsightConnectionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opsi.responses + .ChangeMacsManagedCloudDatabaseInsightConnectionResponse>() { + @Override + public com.oracle.bmc.opsi.responses + .ChangeMacsManagedCloudDatabaseInsightConnectionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.opsi.responses.ChangeMacsManagedCloudDatabaseInsightConnectionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.opsi.responses + .ChangeMacsManagedCloudDatabaseInsightConnectionResponse + .Builder + builder = + com.oracle.bmc.opsi.responses + .ChangeMacsManagedCloudDatabaseInsightConnectionResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.opsi.responses + .ChangeMacsManagedCloudDatabaseInsightConnectionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/IngestMySqlSqlStatsConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/IngestMySqlSqlStatsConverter.java new file mode 100644 index 00000000000..7169600b067 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/IngestMySqlSqlStatsConverter.java @@ -0,0 +1,169 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.opsi.model.*; +import com.oracle.bmc.opsi.requests.*; +import com.oracle.bmc.opsi.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +public class IngestMySqlSqlStatsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(IngestMySqlSqlStatsConverter.class); + + public static com.oracle.bmc.opsi.requests.IngestMySqlSqlStatsRequest interceptRequest( + com.oracle.bmc.opsi.requests.IngestMySqlSqlStatsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.opsi.requests.IngestMySqlSqlStatsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getIngestMySqlSqlStatsDetails(), "ingestMySqlSqlStatsDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20200630") + .path("databaseInsights") + .path("actions") + .path("ingestMySqlSqlStatsMetric"); + + if (request.getDatabaseId() != null) { + target = + target.queryParam( + "databaseId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDatabaseId())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opsi.responses.IngestMySqlSqlStatsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opsi.responses.IngestMySqlSqlStatsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opsi.responses.IngestMySqlSqlStatsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opsi.responses.IngestMySqlSqlStatsResponse>() { + @Override + public com.oracle.bmc.opsi.responses.IngestMySqlSqlStatsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.opsi.responses.IngestMySqlSqlStatsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.opsi.model + .IngestMySqlSqlStatsResponseDetails>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.opsi.model + .IngestMySqlSqlStatsResponseDetails + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.opsi.model + .IngestMySqlSqlStatsResponseDetails + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.opsi.model + .IngestMySqlSqlStatsResponseDetails> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.opsi.responses.IngestMySqlSqlStatsResponse.Builder + builder = + com.oracle.bmc.opsi.responses + .IngestMySqlSqlStatsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.ingestMySqlSqlStatsResponseDetails(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.opsi.responses.IngestMySqlSqlStatsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/IngestMySqlSqlTextConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/IngestMySqlSqlTextConverter.java new file mode 100644 index 00000000000..4c08ee98b98 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/IngestMySqlSqlTextConverter.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.opsi.model.*; +import com.oracle.bmc.opsi.requests.*; +import com.oracle.bmc.opsi.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +public class IngestMySqlSqlTextConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(IngestMySqlSqlTextConverter.class); + + public static com.oracle.bmc.opsi.requests.IngestMySqlSqlTextRequest interceptRequest( + com.oracle.bmc.opsi.requests.IngestMySqlSqlTextRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.opsi.requests.IngestMySqlSqlTextRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getIngestMySqlSqlTextDetails(), "ingestMySqlSqlTextDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20200630") + .path("databaseInsights") + .path("actions") + .path("ingestMySqlSqlText"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getDatabaseId() != null) { + target = + target.queryParam( + "databaseId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDatabaseId())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opsi.responses.IngestMySqlSqlTextResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opsi.responses.IngestMySqlSqlTextResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opsi.responses.IngestMySqlSqlTextResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opsi.responses.IngestMySqlSqlTextResponse>() { + @Override + public com.oracle.bmc.opsi.responses.IngestMySqlSqlTextResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.opsi.responses.IngestMySqlSqlTextResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.opsi.model + .IngestMySqlSqlTextResponseDetails>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.opsi.model + .IngestMySqlSqlTextResponseDetails + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.opsi.model + .IngestMySqlSqlTextResponseDetails + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.opsi.model + .IngestMySqlSqlTextResponseDetails> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.opsi.responses.IngestMySqlSqlTextResponse.Builder + builder = + com.oracle.bmc.opsi.responses + .IngestMySqlSqlTextResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.ingestMySqlSqlTextResponseDetails(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.opsi.responses.IngestMySqlSqlTextResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/ListExadataConfigurationsConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/ListExadataConfigurationsConverter.java index 23556bae598..4ac83f04939 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/ListExadataConfigurationsConverter.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/ListExadataConfigurationsConverter.java @@ -130,6 +130,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.CollectionFormatType.Multi); } + if (request.getCompartmentIdInSubtree() != null) { + target = + target.queryParam( + "compartmentIdInSubtree", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentIdInSubtree())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/ListHostConfigurationsConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/ListHostConfigurationsConverter.java index ba4dfdf741c..4359c955ea5 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/ListHostConfigurationsConverter.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/ListHostConfigurationsConverter.java @@ -181,6 +181,15 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.CollectionFormatType.Multi); } + if (request.getStatus() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "status", + request.getStatus(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/ListHostedEntitiesConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/ListHostedEntitiesConverter.java index 3d8ba1f34e1..68424256ec0 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/ListHostedEntitiesConverter.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/ListHostedEntitiesConverter.java @@ -140,6 +140,15 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getHostId())); } + if (request.getStatus() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "status", + request.getStatus(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeExadataInsightResourceCapacityTrendAggregatedConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeExadataInsightResourceCapacityTrendAggregatedConverter.java index e645dc18fca..0e4137e41a3 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeExadataInsightResourceCapacityTrendAggregatedConverter.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeExadataInsightResourceCapacityTrendAggregatedConverter.java @@ -185,6 +185,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.CollectionFormatType.Multi); } + if (request.getCompartmentIdInSubtree() != null) { + target = + target.queryParam( + "compartmentIdInSubtree", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentIdInSubtree())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeExadataInsightResourceForecastTrendAggregatedConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeExadataInsightResourceForecastTrendAggregatedConverter.java index 79f808d5a29..99a96b1218d 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeExadataInsightResourceForecastTrendAggregatedConverter.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeExadataInsightResourceForecastTrendAggregatedConverter.java @@ -209,6 +209,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.CollectionFormatType.Multi); } + if (request.getCompartmentIdInSubtree() != null) { + target = + target.queryParam( + "compartmentIdInSubtree", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentIdInSubtree())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeExadataInsightResourceUsageAggregatedConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeExadataInsightResourceUsageAggregatedConverter.java index 2aea69b3bf1..e04917d42c1 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeExadataInsightResourceUsageAggregatedConverter.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeExadataInsightResourceUsageAggregatedConverter.java @@ -174,6 +174,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.CollectionFormatType.Multi); } + if (request.getCompartmentIdInSubtree() != null) { + target = + target.queryParam( + "compartmentIdInSubtree", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentIdInSubtree())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeExadataInsightResourceUsageConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeExadataInsightResourceUsageConverter.java index bb8ec93c418..b2f0fae27ed 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeExadataInsightResourceUsageConverter.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeExadataInsightResourceUsageConverter.java @@ -195,6 +195,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.CollectionFormatType.Multi); } + if (request.getCompartmentIdInSubtree() != null) { + target = + target.queryParam( + "compartmentIdInSubtree", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentIdInSubtree())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeExadataInsightResourceUtilizationInsightConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeExadataInsightResourceUtilizationInsightConverter.java index 55fb81e074c..bf7cdad6dc0 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeExadataInsightResourceUtilizationInsightConverter.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeExadataInsightResourceUtilizationInsightConverter.java @@ -191,6 +191,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.CollectionFormatType.Multi); } + if (request.getCompartmentIdInSubtree() != null) { + target = + target.queryParam( + "compartmentIdInSubtree", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentIdInSubtree())); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightDiskStatisticsConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightDiskStatisticsConverter.java index 5c5fa21fa9c..cf311cb1f2d 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightDiskStatisticsConverter.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightDiskStatisticsConverter.java @@ -92,6 +92,15 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getStatistic().getValue())); } + if (request.getStatus() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "status", + request.getStatus(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightIoUsageTrendConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightIoUsageTrendConverter.java new file mode 100644 index 00000000000..56c8e46719b --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightIoUsageTrendConverter.java @@ -0,0 +1,227 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.opsi.model.*; +import com.oracle.bmc.opsi.requests.*; +import com.oracle.bmc.opsi.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +public class SummarizeHostInsightIoUsageTrendConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SummarizeHostInsightIoUsageTrendConverter.class); + + public static com.oracle.bmc.opsi.requests.SummarizeHostInsightIoUsageTrendRequest + interceptRequest( + com.oracle.bmc.opsi.requests.SummarizeHostInsightIoUsageTrendRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.opsi.requests.SummarizeHostInsightIoUsageTrendRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + Validate.notNull(request.getId(), "id is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20200630").path("hostInsights").path("ioUsageTrend"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + + if (request.getAnalysisTimeInterval() != null) { + target = + target.queryParam( + "analysisTimeInterval", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAnalysisTimeInterval())); + } + + if (request.getTimeIntervalStart() != null) { + target = + target.queryParam( + "timeIntervalStart", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeIntervalStart())); + } + + if (request.getTimeIntervalEnd() != null) { + target = + target.queryParam( + "timeIntervalEnd", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeIntervalEnd())); + } + + if (request.getHostId() != null) { + target = + target.queryParam( + "hostId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getHostId())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getStatistic() != null) { + target = + target.queryParam( + "statistic", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getStatistic().getValue())); + } + + if (request.getStatus() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "status", + request.getStatus(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opsi.responses.SummarizeHostInsightIoUsageTrendResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opsi.responses.SummarizeHostInsightIoUsageTrendResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opsi.responses.SummarizeHostInsightIoUsageTrendResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opsi.responses + .SummarizeHostInsightIoUsageTrendResponse>() { + @Override + public com.oracle.bmc.opsi.responses + .SummarizeHostInsightIoUsageTrendResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.opsi.responses.SummarizeHostInsightIoUsageTrendResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.opsi.model + .SummarizeHostInsightIoUsageTrendAggregationCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.opsi.model + .SummarizeHostInsightIoUsageTrendAggregationCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.opsi.model + .SummarizeHostInsightIoUsageTrendAggregationCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.opsi.model + .SummarizeHostInsightIoUsageTrendAggregationCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.opsi.responses + .SummarizeHostInsightIoUsageTrendResponse.Builder + builder = + com.oracle.bmc.opsi.responses + .SummarizeHostInsightIoUsageTrendResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.summarizeHostInsightIoUsageTrendAggregationCollection( + response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.opsi.responses + .SummarizeHostInsightIoUsageTrendResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightNetworkUsageTrendConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightNetworkUsageTrendConverter.java index 0e4d4e25f27..3aac1f75464 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightNetworkUsageTrendConverter.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightNetworkUsageTrendConverter.java @@ -108,6 +108,15 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getStatistic().getValue())); } + if (request.getStatus() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "status", + request.getStatus(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceCapacityTrendConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceCapacityTrendConverter.java index e43ca5e2a00..f85e9db1938 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceCapacityTrendConverter.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceCapacityTrendConverter.java @@ -222,6 +222,15 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getLowUtilizationThreshold())); } + if (request.getStatus() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "status", + request.getStatus(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceForecastTrendConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceForecastTrendConverter.java index a18a86ffc49..9e1b8d11979 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceForecastTrendConverter.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceForecastTrendConverter.java @@ -254,6 +254,23 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getInterfaceName())); } + if (request.getGpuId() != null) { + target = + target.queryParam( + "gpuId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getGpuId())); + } + + if (request.getStatus() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "status", + request.getStatus(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceStatisticsConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceStatisticsConverter.java index d358894ecca..ffe9a70e62e 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceStatisticsConverter.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceStatisticsConverter.java @@ -246,6 +246,15 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getLowUtilizationThreshold())); } + if (request.getStatus() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "status", + request.getStatus(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceUsageConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceUsageConverter.java index 7131819c8eb..4b1a190c0fb 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceUsageConverter.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceUsageConverter.java @@ -188,6 +188,15 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.CollectionFormatType.Multi); } + if (request.getStatus() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "status", + request.getStatus(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceUsageTrendConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceUsageTrendConverter.java index 92a8f8e2dfb..4e3c1cbf5f9 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceUsageTrendConverter.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceUsageTrendConverter.java @@ -198,6 +198,15 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.util.internal.CollectionFormatType.Multi); } + if (request.getStatus() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "status", + request.getStatus(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceUtilizationInsightConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceUtilizationInsightConverter.java index a8fb5cdc1e1..9eabe0d2019 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceUtilizationInsightConverter.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightResourceUtilizationInsightConverter.java @@ -208,6 +208,15 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getLowUtilizationThreshold())); } + if (request.getStatus() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "status", + request.getStatus(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightStorageUsageTrendConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightStorageUsageTrendConverter.java index c8709903b31..e868a9ad43d 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightStorageUsageTrendConverter.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightStorageUsageTrendConverter.java @@ -108,6 +108,15 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getStatistic().getValue())); } + if (request.getStatus() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "status", + request.getStatus(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightTopProcessesUsageConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightTopProcessesUsageConverter.java index a514cac09b0..92762fdbcef 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightTopProcessesUsageConverter.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightTopProcessesUsageConverter.java @@ -131,6 +131,15 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getStatistic().getValue())); } + if (request.getStatus() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "status", + request.getStatus(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightTopProcessesUsageTrendConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightTopProcessesUsageTrendConverter.java index d807ecb2a32..51e8c634d9e 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightTopProcessesUsageTrendConverter.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/SummarizeHostInsightTopProcessesUsageTrendConverter.java @@ -134,6 +134,15 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getStatistic().getValue())); } + if (request.getStatus() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "status", + request.getStatus(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/TestMacsManagedCloudDatabaseInsightConnectionConverter.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/TestMacsManagedCloudDatabaseInsightConnectionConverter.java new file mode 100644 index 00000000000..8fd355bdbde --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/internal/http/TestMacsManagedCloudDatabaseInsightConnectionConverter.java @@ -0,0 +1,169 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.opsi.model.*; +import com.oracle.bmc.opsi.requests.*; +import com.oracle.bmc.opsi.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +public class TestMacsManagedCloudDatabaseInsightConnectionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + TestMacsManagedCloudDatabaseInsightConnectionConverter.class); + + public static com.oracle.bmc.opsi.requests.TestMacsManagedCloudDatabaseInsightConnectionRequest + interceptRequest( + com.oracle.bmc.opsi.requests + .TestMacsManagedCloudDatabaseInsightConnectionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.opsi.requests.TestMacsManagedCloudDatabaseInsightConnectionRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getTestMacsManagedCloudDatabaseInsightConnectionDetails(), + "testMacsManagedCloudDatabaseInsightConnectionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20200630") + .path("databaseInsights") + .path("actions") + .path("testMacsManagedCloudDatabaseInsightConnectionDetails"); + + if (request.getDatabaseId() != null) { + target = + target.queryParam( + "databaseId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDatabaseId())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opsi.responses + .TestMacsManagedCloudDatabaseInsightConnectionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opsi.responses + .TestMacsManagedCloudDatabaseInsightConnectionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opsi.responses + .TestMacsManagedCloudDatabaseInsightConnectionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.opsi.responses + .TestMacsManagedCloudDatabaseInsightConnectionResponse>() { + @Override + public com.oracle.bmc.opsi.responses + .TestMacsManagedCloudDatabaseInsightConnectionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.opsi.responses.TestMacsManagedCloudDatabaseInsightConnectionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.opsi.responses + .TestMacsManagedCloudDatabaseInsightConnectionResponse + .Builder + builder = + com.oracle.bmc.opsi.responses + .TestMacsManagedCloudDatabaseInsightConnectionResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.opsi.responses + .TestMacsManagedCloudDatabaseInsightConnectionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/AddExadataInsightMembersDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/AddExadataInsightMembersDetails.java index 157d0cfb210..20259589a35 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/AddExadataInsightMembersDetails.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/AddExadataInsightMembersDetails.java @@ -29,6 +29,10 @@ @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = AddEmManagedExternalExadataInsightMembersDetails.class, name = "EM_MANAGED_EXTERNAL_EXADATA" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = AddMacsManagedCloudExadataInsightMembersDetails.class, + name = "MACS_MANAGED_CLOUD_EXADATA" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/AddMacsManagedCloudExadataInsightMembersDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/AddMacsManagedCloudExadataInsightMembersDetails.java new file mode 100644 index 00000000000..3363d332b88 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/AddMacsManagedCloudExadataInsightMembersDetails.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * The information about the members of Exadata system to be added. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AddMacsManagedCloudExadataInsightMembersDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class AddMacsManagedCloudExadataInsightMembersDetails + extends AddExadataInsightMembersDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonProperty("memberEntityDetails") + private java.util.List memberEntityDetails; + + public Builder memberEntityDetails( + java.util.List memberEntityDetails) { + this.memberEntityDetails = memberEntityDetails; + this.__explicitlySet__.add("memberEntityDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AddMacsManagedCloudExadataInsightMembersDetails build() { + AddMacsManagedCloudExadataInsightMembersDetails model = + new AddMacsManagedCloudExadataInsightMembersDetails(this.memberEntityDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AddMacsManagedCloudExadataInsightMembersDetails model) { + if (model.wasPropertyExplicitlySet("memberEntityDetails")) { + this.memberEntityDetails(model.getMemberEntityDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public AddMacsManagedCloudExadataInsightMembersDetails( + java.util.List memberEntityDetails) { + super(); + this.memberEntityDetails = memberEntityDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("memberEntityDetails") + private final java.util.List memberEntityDetails; + + public java.util.List getMemberEntityDetails() { + return memberEntityDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("AddMacsManagedCloudExadataInsightMembersDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", memberEntityDetails=").append(String.valueOf(this.memberEntityDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AddMacsManagedCloudExadataInsightMembersDetails)) { + return false; + } + + AddMacsManagedCloudExadataInsightMembersDetails other = + (AddMacsManagedCloudExadataInsightMembersDetails) o; + return java.util.Objects.equals(this.memberEntityDetails, other.memberEntityDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.memberEntityDetails == null + ? 43 + : this.memberEntityDetails.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/BasicConfigurationItemSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/BasicConfigurationItemSummary.java index 0f7e3e38f3e..b8be936e46a 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/BasicConfigurationItemSummary.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/BasicConfigurationItemSummary.java @@ -7,7 +7,7 @@ /** * Basic configuration item summary. * Value field contain the most preferred value for the specified scope (compartmentId), which could be from any of the ConfigurationItemValueSourceConfigurationType. - * Default value field contains the default value from Operations Insights. + * Default value field contains the default value from Ops Insights. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -96,13 +96,13 @@ public Builder defaultValue(String defaultValue) { return this; } /** - * List of contexts in Operations Insights where this configuration item is applicable. + * List of contexts in Ops Insights where this configuration item is applicable. **/ @com.fasterxml.jackson.annotation.JsonProperty("applicableContexts") private java.util.List applicableContexts; /** - * List of contexts in Operations Insights where this configuration item is applicable. + * List of contexts in Ops Insights where this configuration item is applicable. * @param applicableContexts the value to set * @return this builder **/ @@ -248,13 +248,13 @@ public String getDefaultValue() { } /** - * List of contexts in Operations Insights where this configuration item is applicable. + * List of contexts in Ops Insights where this configuration item is applicable. **/ @com.fasterxml.jackson.annotation.JsonProperty("applicableContexts") private final java.util.List applicableContexts; /** - * List of contexts in Operations Insights where this configuration item is applicable. + * List of contexts in Ops Insights where this configuration item is applicable. * @return the value **/ public java.util.List getApplicableContexts() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ChangeMacsManagedCloudDatabaseInsightConnectionDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ChangeMacsManagedCloudDatabaseInsightConnectionDetails.java new file mode 100644 index 00000000000..7e7f281f8b9 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ChangeMacsManagedCloudDatabaseInsightConnectionDetails.java @@ -0,0 +1,204 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Connection details of a MACS-managed cloud database insight. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeMacsManagedCloudDatabaseInsightConnectionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeMacsManagedCloudDatabaseInsightConnectionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "managementAgentId", + "connectionDetails", + "connectionCredentialDetails" + }) + public ChangeMacsManagedCloudDatabaseInsightConnectionDetails( + String managementAgentId, + ConnectionDetails connectionDetails, + CredentialDetails connectionCredentialDetails) { + super(); + this.managementAgentId = managementAgentId; + this.connectionDetails = connectionDetails; + this.connectionCredentialDetails = connectionCredentialDetails; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @param managementAgentId the value to set + * @return this builder + **/ + public Builder managementAgentId(String managementAgentId) { + this.managementAgentId = managementAgentId; + this.__explicitlySet__.add("managementAgentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionDetails") + private ConnectionDetails connectionDetails; + + public Builder connectionDetails(ConnectionDetails connectionDetails) { + this.connectionDetails = connectionDetails; + this.__explicitlySet__.add("connectionDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionCredentialDetails") + private CredentialDetails connectionCredentialDetails; + + public Builder connectionCredentialDetails(CredentialDetails connectionCredentialDetails) { + this.connectionCredentialDetails = connectionCredentialDetails; + this.__explicitlySet__.add("connectionCredentialDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeMacsManagedCloudDatabaseInsightConnectionDetails build() { + ChangeMacsManagedCloudDatabaseInsightConnectionDetails model = + new ChangeMacsManagedCloudDatabaseInsightConnectionDetails( + this.managementAgentId, + this.connectionDetails, + this.connectionCredentialDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeMacsManagedCloudDatabaseInsightConnectionDetails model) { + if (model.wasPropertyExplicitlySet("managementAgentId")) { + this.managementAgentId(model.getManagementAgentId()); + } + if (model.wasPropertyExplicitlySet("connectionDetails")) { + this.connectionDetails(model.getConnectionDetails()); + } + if (model.wasPropertyExplicitlySet("connectionCredentialDetails")) { + this.connectionCredentialDetails(model.getConnectionCredentialDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private final String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @return the value + **/ + public String getManagementAgentId() { + return managementAgentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionDetails") + private final ConnectionDetails connectionDetails; + + public ConnectionDetails getConnectionDetails() { + return connectionDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionCredentialDetails") + private final CredentialDetails connectionCredentialDetails; + + public CredentialDetails getConnectionCredentialDetails() { + return connectionCredentialDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ChangeMacsManagedCloudDatabaseInsightConnectionDetails("); + sb.append("super=").append(super.toString()); + sb.append("managementAgentId=").append(String.valueOf(this.managementAgentId)); + sb.append(", connectionDetails=").append(String.valueOf(this.connectionDetails)); + sb.append(", connectionCredentialDetails=") + .append(String.valueOf(this.connectionCredentialDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeMacsManagedCloudDatabaseInsightConnectionDetails)) { + return false; + } + + ChangeMacsManagedCloudDatabaseInsightConnectionDetails other = + (ChangeMacsManagedCloudDatabaseInsightConnectionDetails) o; + return java.util.Objects.equals(this.managementAgentId, other.managementAgentId) + && java.util.Objects.equals(this.connectionDetails, other.connectionDetails) + && java.util.Objects.equals( + this.connectionCredentialDetails, other.connectionCredentialDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.managementAgentId == null ? 43 : this.managementAgentId.hashCode()); + result = + (result * PRIME) + + (this.connectionDetails == null ? 43 : this.connectionDetails.hashCode()); + result = + (result * PRIME) + + (this.connectionCredentialDetails == null + ? 43 + : this.connectionCredentialDetails.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateAutonomousDatabaseInsightDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateAutonomousDatabaseInsightDetails.java new file mode 100644 index 00000000000..23b723bdc43 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateAutonomousDatabaseInsightDetails.java @@ -0,0 +1,416 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * The information about database to be analyzed. When isAdvancedFeaturesEnabled is set to false, parameters connectionDetails, credentialDetails and opsiPrivateEndpoint are optional. Otherwise, connectionDetails and crendetialDetails are required to enable full OPSI service features. If the Autonomouse Database is configured with private, restricted or dedicated access, opsiPrivateEndpoint parameter is required. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAutonomousDatabaseInsightDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateAutonomousDatabaseInsightDetails extends CreateDatabaseInsightDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + private String databaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + * @param databaseId the value to set + * @return this builder + **/ + public Builder databaseId(String databaseId) { + this.databaseId = databaseId; + this.__explicitlySet__.add("databaseId"); + return this; + } + /** + * OCI database resource type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseResourceType") + private String databaseResourceType; + + /** + * OCI database resource type + * @param databaseResourceType the value to set + * @return this builder + **/ + public Builder databaseResourceType(String databaseResourceType) { + this.databaseResourceType = databaseResourceType; + this.__explicitlySet__.add("databaseResourceType"); + return this; + } + /** + * Flag is to identify if advanced features for autonomous database is enabled or not + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAdvancedFeaturesEnabled") + private Boolean isAdvancedFeaturesEnabled; + + /** + * Flag is to identify if advanced features for autonomous database is enabled or not + * @param isAdvancedFeaturesEnabled the value to set + * @return this builder + **/ + public Builder isAdvancedFeaturesEnabled(Boolean isAdvancedFeaturesEnabled) { + this.isAdvancedFeaturesEnabled = isAdvancedFeaturesEnabled; + this.__explicitlySet__.add("isAdvancedFeaturesEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionDetails") + private ConnectionDetails connectionDetails; + + public Builder connectionDetails(ConnectionDetails connectionDetails) { + this.connectionDetails = connectionDetails; + this.__explicitlySet__.add("connectionDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("credentialDetails") + private CredentialDetails credentialDetails; + + public Builder credentialDetails(CredentialDetails credentialDetails) { + this.credentialDetails = credentialDetails; + this.__explicitlySet__.add("credentialDetails"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OPSI private endpoint + **/ + @com.fasterxml.jackson.annotation.JsonProperty("opsiPrivateEndpointId") + private String opsiPrivateEndpointId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OPSI private endpoint + * @param opsiPrivateEndpointId the value to set + * @return this builder + **/ + public Builder opsiPrivateEndpointId(String opsiPrivateEndpointId) { + this.opsiPrivateEndpointId = opsiPrivateEndpointId; + this.__explicitlySet__.add("opsiPrivateEndpointId"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAutonomousDatabaseInsightDetails build() { + CreateAutonomousDatabaseInsightDetails model = + new CreateAutonomousDatabaseInsightDetails( + this.compartmentId, + this.freeformTags, + this.definedTags, + this.databaseId, + this.databaseResourceType, + this.isAdvancedFeaturesEnabled, + this.connectionDetails, + this.credentialDetails, + this.opsiPrivateEndpointId, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAutonomousDatabaseInsightDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("databaseId")) { + this.databaseId(model.getDatabaseId()); + } + if (model.wasPropertyExplicitlySet("databaseResourceType")) { + this.databaseResourceType(model.getDatabaseResourceType()); + } + if (model.wasPropertyExplicitlySet("isAdvancedFeaturesEnabled")) { + this.isAdvancedFeaturesEnabled(model.getIsAdvancedFeaturesEnabled()); + } + if (model.wasPropertyExplicitlySet("connectionDetails")) { + this.connectionDetails(model.getConnectionDetails()); + } + if (model.wasPropertyExplicitlySet("credentialDetails")) { + this.credentialDetails(model.getCredentialDetails()); + } + if (model.wasPropertyExplicitlySet("opsiPrivateEndpointId")) { + this.opsiPrivateEndpointId(model.getOpsiPrivateEndpointId()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateAutonomousDatabaseInsightDetails( + String compartmentId, + java.util.Map freeformTags, + java.util.Map> definedTags, + String databaseId, + String databaseResourceType, + Boolean isAdvancedFeaturesEnabled, + ConnectionDetails connectionDetails, + CredentialDetails credentialDetails, + String opsiPrivateEndpointId, + java.util.Map> systemTags) { + super(compartmentId, freeformTags, definedTags); + this.databaseId = databaseId; + this.databaseResourceType = databaseResourceType; + this.isAdvancedFeaturesEnabled = isAdvancedFeaturesEnabled; + this.connectionDetails = connectionDetails; + this.credentialDetails = credentialDetails; + this.opsiPrivateEndpointId = opsiPrivateEndpointId; + this.systemTags = systemTags; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + private final String databaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + * @return the value + **/ + public String getDatabaseId() { + return databaseId; + } + + /** + * OCI database resource type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseResourceType") + private final String databaseResourceType; + + /** + * OCI database resource type + * @return the value + **/ + public String getDatabaseResourceType() { + return databaseResourceType; + } + + /** + * Flag is to identify if advanced features for autonomous database is enabled or not + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAdvancedFeaturesEnabled") + private final Boolean isAdvancedFeaturesEnabled; + + /** + * Flag is to identify if advanced features for autonomous database is enabled or not + * @return the value + **/ + public Boolean getIsAdvancedFeaturesEnabled() { + return isAdvancedFeaturesEnabled; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionDetails") + private final ConnectionDetails connectionDetails; + + public ConnectionDetails getConnectionDetails() { + return connectionDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("credentialDetails") + private final CredentialDetails credentialDetails; + + public CredentialDetails getCredentialDetails() { + return credentialDetails; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OPSI private endpoint + **/ + @com.fasterxml.jackson.annotation.JsonProperty("opsiPrivateEndpointId") + private final String opsiPrivateEndpointId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OPSI private endpoint + * @return the value + **/ + public String getOpsiPrivateEndpointId() { + return opsiPrivateEndpointId; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateAutonomousDatabaseInsightDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", databaseId=").append(String.valueOf(this.databaseId)); + sb.append(", databaseResourceType=").append(String.valueOf(this.databaseResourceType)); + sb.append(", isAdvancedFeaturesEnabled=") + .append(String.valueOf(this.isAdvancedFeaturesEnabled)); + sb.append(", connectionDetails=").append(String.valueOf(this.connectionDetails)); + sb.append(", credentialDetails=").append(String.valueOf(this.credentialDetails)); + sb.append(", opsiPrivateEndpointId=").append(String.valueOf(this.opsiPrivateEndpointId)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateAutonomousDatabaseInsightDetails)) { + return false; + } + + CreateAutonomousDatabaseInsightDetails other = (CreateAutonomousDatabaseInsightDetails) o; + return java.util.Objects.equals(this.databaseId, other.databaseId) + && java.util.Objects.equals(this.databaseResourceType, other.databaseResourceType) + && java.util.Objects.equals( + this.isAdvancedFeaturesEnabled, other.isAdvancedFeaturesEnabled) + && java.util.Objects.equals(this.connectionDetails, other.connectionDetails) + && java.util.Objects.equals(this.credentialDetails, other.credentialDetails) + && java.util.Objects.equals(this.opsiPrivateEndpointId, other.opsiPrivateEndpointId) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.databaseId == null ? 43 : this.databaseId.hashCode()); + result = + (result * PRIME) + + (this.databaseResourceType == null + ? 43 + : this.databaseResourceType.hashCode()); + result = + (result * PRIME) + + (this.isAdvancedFeaturesEnabled == null + ? 43 + : this.isAdvancedFeaturesEnabled.hashCode()); + result = + (result * PRIME) + + (this.connectionDetails == null ? 43 : this.connectionDetails.hashCode()); + result = + (result * PRIME) + + (this.credentialDetails == null ? 43 : this.credentialDetails.hashCode()); + result = + (result * PRIME) + + (this.opsiPrivateEndpointId == null + ? 43 + : this.opsiPrivateEndpointId.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateDatabaseInsightDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateDatabaseInsightDetails.java index 2aa17ec8177..0914a52f608 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateDatabaseInsightDetails.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateDatabaseInsightDetails.java @@ -22,6 +22,18 @@ defaultImpl = CreateDatabaseInsightDetails.class ) @com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateMacsManagedCloudDatabaseInsightDetails.class, + name = "MACS_MANAGED_CLOUD_DATABASE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateAutonomousDatabaseInsightDetails.class, + name = "AUTONOMOUS_DATABASE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateMdsMySqlDatabaseInsightDetails.class, + name = "MDS_MYSQL_DATABASE_SYSTEM" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = CreateEmManagedExternalDatabaseInsightDetails.class, name = "EM_MANAGED_EXTERNAL_DATABASE" diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateExadataInsightDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateExadataInsightDetails.java index 26f9194cdc5..8a32fcee576 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateExadataInsightDetails.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateExadataInsightDetails.java @@ -26,6 +26,10 @@ value = CreateEmManagedExternalExadataInsightDetails.class, name = "EM_MANAGED_EXTERNAL_EXADATA" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateMacsManagedCloudExadataInsightDetails.class, + name = "MACS_MANAGED_CLOUD_EXADATA" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = CreatePeComanagedExadataInsightDetails.class, name = "PE_COMANAGED_EXADATA" diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateMacsManagedCloudDatabaseInsightDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateMacsManagedCloudDatabaseInsightDetails.java new file mode 100644 index 00000000000..17b884803ba --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateMacsManagedCloudDatabaseInsightDetails.java @@ -0,0 +1,452 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * The information about database to be analyzed. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateMacsManagedCloudDatabaseInsightDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateMacsManagedCloudDatabaseInsightDetails + extends CreateDatabaseInsightDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + private String databaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + * @param databaseId the value to set + * @return this builder + **/ + public Builder databaseId(String databaseId) { + this.databaseId = databaseId; + this.__explicitlySet__.add("databaseId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @param managementAgentId the value to set + * @return this builder + **/ + public Builder managementAgentId(String managementAgentId) { + this.managementAgentId = managementAgentId; + this.__explicitlySet__.add("managementAgentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionDetails") + private ConnectionDetails connectionDetails; + + public Builder connectionDetails(ConnectionDetails connectionDetails) { + this.connectionDetails = connectionDetails; + this.__explicitlySet__.add("connectionDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionCredentialDetails") + private CredentialDetails connectionCredentialDetails; + + public Builder connectionCredentialDetails(CredentialDetails connectionCredentialDetails) { + this.connectionCredentialDetails = connectionCredentialDetails; + this.__explicitlySet__.add("connectionCredentialDetails"); + return this; + } + /** + * OCI database resource type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseResourceType") + private String databaseResourceType; + + /** + * OCI database resource type + * @param databaseResourceType the value to set + * @return this builder + **/ + public Builder databaseResourceType(String databaseResourceType) { + this.databaseResourceType = databaseResourceType; + this.__explicitlySet__.add("databaseResourceType"); + return this; + } + /** + * Database Deployment Type (EXACS will be supported in the future) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deploymentType") + private DeploymentType deploymentType; + + /** + * Database Deployment Type (EXACS will be supported in the future) + * @param deploymentType the value to set + * @return this builder + **/ + public Builder deploymentType(DeploymentType deploymentType) { + this.deploymentType = deploymentType; + this.__explicitlySet__.add("deploymentType"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateMacsManagedCloudDatabaseInsightDetails build() { + CreateMacsManagedCloudDatabaseInsightDetails model = + new CreateMacsManagedCloudDatabaseInsightDetails( + this.compartmentId, + this.freeformTags, + this.definedTags, + this.databaseId, + this.managementAgentId, + this.connectionDetails, + this.connectionCredentialDetails, + this.databaseResourceType, + this.deploymentType, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateMacsManagedCloudDatabaseInsightDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("databaseId")) { + this.databaseId(model.getDatabaseId()); + } + if (model.wasPropertyExplicitlySet("managementAgentId")) { + this.managementAgentId(model.getManagementAgentId()); + } + if (model.wasPropertyExplicitlySet("connectionDetails")) { + this.connectionDetails(model.getConnectionDetails()); + } + if (model.wasPropertyExplicitlySet("connectionCredentialDetails")) { + this.connectionCredentialDetails(model.getConnectionCredentialDetails()); + } + if (model.wasPropertyExplicitlySet("databaseResourceType")) { + this.databaseResourceType(model.getDatabaseResourceType()); + } + if (model.wasPropertyExplicitlySet("deploymentType")) { + this.deploymentType(model.getDeploymentType()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateMacsManagedCloudDatabaseInsightDetails( + String compartmentId, + java.util.Map freeformTags, + java.util.Map> definedTags, + String databaseId, + String managementAgentId, + ConnectionDetails connectionDetails, + CredentialDetails connectionCredentialDetails, + String databaseResourceType, + DeploymentType deploymentType, + java.util.Map> systemTags) { + super(compartmentId, freeformTags, definedTags); + this.databaseId = databaseId; + this.managementAgentId = managementAgentId; + this.connectionDetails = connectionDetails; + this.connectionCredentialDetails = connectionCredentialDetails; + this.databaseResourceType = databaseResourceType; + this.deploymentType = deploymentType; + this.systemTags = systemTags; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + private final String databaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + * @return the value + **/ + public String getDatabaseId() { + return databaseId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private final String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @return the value + **/ + public String getManagementAgentId() { + return managementAgentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionDetails") + private final ConnectionDetails connectionDetails; + + public ConnectionDetails getConnectionDetails() { + return connectionDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionCredentialDetails") + private final CredentialDetails connectionCredentialDetails; + + public CredentialDetails getConnectionCredentialDetails() { + return connectionCredentialDetails; + } + + /** + * OCI database resource type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseResourceType") + private final String databaseResourceType; + + /** + * OCI database resource type + * @return the value + **/ + public String getDatabaseResourceType() { + return databaseResourceType; + } + + /** + * Database Deployment Type (EXACS will be supported in the future) + **/ + public enum DeploymentType { + VirtualMachine("VIRTUAL_MACHINE"), + BareMetal("BARE_METAL"), + Exacc("EXACC"), + Exacs("EXACS"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (DeploymentType v : DeploymentType.values()) { + map.put(v.getValue(), v); + } + } + + DeploymentType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static DeploymentType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid DeploymentType: " + key); + } + }; + /** + * Database Deployment Type (EXACS will be supported in the future) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("deploymentType") + private final DeploymentType deploymentType; + + /** + * Database Deployment Type (EXACS will be supported in the future) + * @return the value + **/ + public DeploymentType getDeploymentType() { + return deploymentType; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateMacsManagedCloudDatabaseInsightDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", databaseId=").append(String.valueOf(this.databaseId)); + sb.append(", managementAgentId=").append(String.valueOf(this.managementAgentId)); + sb.append(", connectionDetails=").append(String.valueOf(this.connectionDetails)); + sb.append(", connectionCredentialDetails=") + .append(String.valueOf(this.connectionCredentialDetails)); + sb.append(", databaseResourceType=").append(String.valueOf(this.databaseResourceType)); + sb.append(", deploymentType=").append(String.valueOf(this.deploymentType)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateMacsManagedCloudDatabaseInsightDetails)) { + return false; + } + + CreateMacsManagedCloudDatabaseInsightDetails other = + (CreateMacsManagedCloudDatabaseInsightDetails) o; + return java.util.Objects.equals(this.databaseId, other.databaseId) + && java.util.Objects.equals(this.managementAgentId, other.managementAgentId) + && java.util.Objects.equals(this.connectionDetails, other.connectionDetails) + && java.util.Objects.equals( + this.connectionCredentialDetails, other.connectionCredentialDetails) + && java.util.Objects.equals(this.databaseResourceType, other.databaseResourceType) + && java.util.Objects.equals(this.deploymentType, other.deploymentType) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.databaseId == null ? 43 : this.databaseId.hashCode()); + result = + (result * PRIME) + + (this.managementAgentId == null ? 43 : this.managementAgentId.hashCode()); + result = + (result * PRIME) + + (this.connectionDetails == null ? 43 : this.connectionDetails.hashCode()); + result = + (result * PRIME) + + (this.connectionCredentialDetails == null + ? 43 + : this.connectionCredentialDetails.hashCode()); + result = + (result * PRIME) + + (this.databaseResourceType == null + ? 43 + : this.databaseResourceType.hashCode()); + result = + (result * PRIME) + + (this.deploymentType == null ? 43 : this.deploymentType.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateMacsManagedCloudExadataClusterDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateMacsManagedCloudExadataClusterDetails.java new file mode 100644 index 00000000000..bf02dbbdbf7 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateMacsManagedCloudExadataClusterDetails.java @@ -0,0 +1,117 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * The information of the VM Cluster which contains databases. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "vmClusterType", + defaultImpl = CreateMacsManagedCloudExadataClusterDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CreateMacsManagedCloudExadataVmclusterDetails.class, + name = "vmCluster" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CreateMacsManagedCloudExadataClusterDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"vmclusterId", "compartmentId"}) + protected CreateMacsManagedCloudExadataClusterDetails( + String vmclusterId, String compartmentId) { + super(); + this.vmclusterId = vmclusterId; + this.compartmentId = compartmentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vmclusterId") + private final String vmclusterId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster. + * @return the value + **/ + public String getVmclusterId() { + return vmclusterId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateMacsManagedCloudExadataClusterDetails("); + sb.append("super=").append(super.toString()); + sb.append("vmclusterId=").append(String.valueOf(this.vmclusterId)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateMacsManagedCloudExadataClusterDetails)) { + return false; + } + + CreateMacsManagedCloudExadataClusterDetails other = + (CreateMacsManagedCloudExadataClusterDetails) o; + return java.util.Objects.equals(this.vmclusterId, other.vmclusterId) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.vmclusterId == null ? 43 : this.vmclusterId.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateMacsManagedCloudExadataInsightDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateMacsManagedCloudExadataInsightDetails.java new file mode 100644 index 00000000000..d973c6df5bf --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateMacsManagedCloudExadataInsightDetails.java @@ -0,0 +1,221 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * The information about the Exadata system to be analyzed. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateMacsManagedCloudExadataInsightDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateMacsManagedCloudExadataInsightDetails extends CreateExadataInsightDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exadataInfraId") + private String exadataInfraId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + * @param exadataInfraId the value to set + * @return this builder + **/ + public Builder exadataInfraId(String exadataInfraId) { + this.exadataInfraId = exadataInfraId; + this.__explicitlySet__.add("exadataInfraId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("memberVmClusterDetails") + private java.util.List + memberVmClusterDetails; + + public Builder memberVmClusterDetails( + java.util.List + memberVmClusterDetails) { + this.memberVmClusterDetails = memberVmClusterDetails; + this.__explicitlySet__.add("memberVmClusterDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateMacsManagedCloudExadataInsightDetails build() { + CreateMacsManagedCloudExadataInsightDetails model = + new CreateMacsManagedCloudExadataInsightDetails( + this.compartmentId, + this.freeformTags, + this.definedTags, + this.exadataInfraId, + this.memberVmClusterDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateMacsManagedCloudExadataInsightDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("exadataInfraId")) { + this.exadataInfraId(model.getExadataInfraId()); + } + if (model.wasPropertyExplicitlySet("memberVmClusterDetails")) { + this.memberVmClusterDetails(model.getMemberVmClusterDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateMacsManagedCloudExadataInsightDetails( + String compartmentId, + java.util.Map freeformTags, + java.util.Map> definedTags, + String exadataInfraId, + java.util.List memberVmClusterDetails) { + super(compartmentId, freeformTags, definedTags); + this.exadataInfraId = exadataInfraId; + this.memberVmClusterDetails = memberVmClusterDetails; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exadataInfraId") + private final String exadataInfraId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + * @return the value + **/ + public String getExadataInfraId() { + return exadataInfraId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("memberVmClusterDetails") + private final java.util.List + memberVmClusterDetails; + + public java.util.List + getMemberVmClusterDetails() { + return memberVmClusterDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateMacsManagedCloudExadataInsightDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", exadataInfraId=").append(String.valueOf(this.exadataInfraId)); + sb.append(", memberVmClusterDetails=").append(String.valueOf(this.memberVmClusterDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateMacsManagedCloudExadataInsightDetails)) { + return false; + } + + CreateMacsManagedCloudExadataInsightDetails other = + (CreateMacsManagedCloudExadataInsightDetails) o; + return java.util.Objects.equals(this.exadataInfraId, other.exadataInfraId) + && java.util.Objects.equals( + this.memberVmClusterDetails, other.memberVmClusterDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.exadataInfraId == null ? 43 : this.exadataInfraId.hashCode()); + result = + (result * PRIME) + + (this.memberVmClusterDetails == null + ? 43 + : this.memberVmClusterDetails.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateMacsManagedCloudExadataVmclusterDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateMacsManagedCloudExadataVmclusterDetails.java new file mode 100644 index 00000000000..5768f11490b --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateMacsManagedCloudExadataVmclusterDetails.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * The information of the VM Cluster which contains databases. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateMacsManagedCloudExadataVmclusterDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "vmClusterType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateMacsManagedCloudExadataVmclusterDetails + extends CreateMacsManagedCloudExadataClusterDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("vmclusterId") + private String vmclusterId; + + public Builder vmclusterId(String vmclusterId) { + this.vmclusterId = vmclusterId; + this.__explicitlySet__.add("vmclusterId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The databases that belong to the VM Cluster + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memberDatabaseDetails") + private java.util.List memberDatabaseDetails; + + /** + * The databases that belong to the VM Cluster + * @param memberDatabaseDetails the value to set + * @return this builder + **/ + public Builder memberDatabaseDetails( + java.util.List + memberDatabaseDetails) { + this.memberDatabaseDetails = memberDatabaseDetails; + this.__explicitlySet__.add("memberDatabaseDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateMacsManagedCloudExadataVmclusterDetails build() { + CreateMacsManagedCloudExadataVmclusterDetails model = + new CreateMacsManagedCloudExadataVmclusterDetails( + this.vmclusterId, this.compartmentId, this.memberDatabaseDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateMacsManagedCloudExadataVmclusterDetails model) { + if (model.wasPropertyExplicitlySet("vmclusterId")) { + this.vmclusterId(model.getVmclusterId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("memberDatabaseDetails")) { + this.memberDatabaseDetails(model.getMemberDatabaseDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateMacsManagedCloudExadataVmclusterDetails( + String vmclusterId, + String compartmentId, + java.util.List memberDatabaseDetails) { + super(vmclusterId, compartmentId); + this.memberDatabaseDetails = memberDatabaseDetails; + } + + /** + * The databases that belong to the VM Cluster + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memberDatabaseDetails") + private final java.util.List + memberDatabaseDetails; + + /** + * The databases that belong to the VM Cluster + * @return the value + **/ + public java.util.List getMemberDatabaseDetails() { + return memberDatabaseDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateMacsManagedCloudExadataVmclusterDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", memberDatabaseDetails=").append(String.valueOf(this.memberDatabaseDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateMacsManagedCloudExadataVmclusterDetails)) { + return false; + } + + CreateMacsManagedCloudExadataVmclusterDetails other = + (CreateMacsManagedCloudExadataVmclusterDetails) o; + return java.util.Objects.equals(this.memberDatabaseDetails, other.memberDatabaseDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.memberDatabaseDetails == null + ? 43 + : this.memberDatabaseDetails.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateMdsMySqlDatabaseInsightDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateMdsMySqlDatabaseInsightDetails.java new file mode 100644 index 00000000000..e9eb172a593 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateMdsMySqlDatabaseInsightDetails.java @@ -0,0 +1,182 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * The information about database to be analyzed. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateMdsMySqlDatabaseInsightDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateMdsMySqlDatabaseInsightDetails extends CreateDatabaseInsightDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + private String databaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + * @param databaseId the value to set + * @return this builder + **/ + public Builder databaseId(String databaseId) { + this.databaseId = databaseId; + this.__explicitlySet__.add("databaseId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateMdsMySqlDatabaseInsightDetails build() { + CreateMdsMySqlDatabaseInsightDetails model = + new CreateMdsMySqlDatabaseInsightDetails( + this.compartmentId, + this.freeformTags, + this.definedTags, + this.databaseId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateMdsMySqlDatabaseInsightDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("databaseId")) { + this.databaseId(model.getDatabaseId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CreateMdsMySqlDatabaseInsightDetails( + String compartmentId, + java.util.Map freeformTags, + java.util.Map> definedTags, + String databaseId) { + super(compartmentId, freeformTags, definedTags); + this.databaseId = databaseId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + private final String databaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + * @return the value + **/ + public String getDatabaseId() { + return databaseId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateMdsMySqlDatabaseInsightDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", databaseId=").append(String.valueOf(this.databaseId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateMdsMySqlDatabaseInsightDetails)) { + return false; + } + + CreateMdsMySqlDatabaseInsightDetails other = (CreateMdsMySqlDatabaseInsightDetails) o; + return java.util.Objects.equals(this.databaseId, other.databaseId) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.databaseId == null ? 43 : this.databaseId.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateOperationsInsightsPrivateEndpointDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateOperationsInsightsPrivateEndpointDetails.java index c24c6efdf27..4d155009b9c 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateOperationsInsightsPrivateEndpointDetails.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateOperationsInsightsPrivateEndpointDetails.java @@ -122,13 +122,17 @@ public Builder subnetId(String subnetId) { return this; } /** - * The flag to identify if private endpoint is used for rac database or not + * This flag was previously used to create a private endpoint with scan proxy. Setting this to true will now create a private endpoint with a + * DNS proxy causing {@code isProxyEnabled} flag to be true; this is used exclusively for full feature support for dedicated Autonomous Databases. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("isUsedForRacDbs") private Boolean isUsedForRacDbs; /** - * The flag to identify if private endpoint is used for rac database or not + * This flag was previously used to create a private endpoint with scan proxy. Setting this to true will now create a private endpoint with a + * DNS proxy causing {@code isProxyEnabled} flag to be true; this is used exclusively for full feature support for dedicated Autonomous Databases. + * * @param isUsedForRacDbs the value to set * @return this builder **/ @@ -335,13 +339,17 @@ public String getSubnetId() { } /** - * The flag to identify if private endpoint is used for rac database or not + * This flag was previously used to create a private endpoint with scan proxy. Setting this to true will now create a private endpoint with a + * DNS proxy causing {@code isProxyEnabled} flag to be true; this is used exclusively for full feature support for dedicated Autonomous Databases. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("isUsedForRacDbs") private final Boolean isUsedForRacDbs; /** - * The flag to identify if private endpoint is used for rac database or not + * This flag was previously used to create a private endpoint with scan proxy. Setting this to true will now create a private endpoint with a + * DNS proxy causing {@code isProxyEnabled} flag to be true; this is used exclusively for full feature support for dedicated Autonomous Databases. + * * @return the value **/ public Boolean getIsUsedForRacDbs() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateOperationsInsightsWarehouseDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateOperationsInsightsWarehouseDetails.java index 9dfb18df8af..a60b4f44aeb 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateOperationsInsightsWarehouseDetails.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateOperationsInsightsWarehouseDetails.java @@ -65,13 +65,13 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * User-friedly name of Operations Insights Warehouse that does not have to be unique. + * User-friedly name of Ops Insights Warehouse that does not have to be unique. **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") private String displayName; /** - * User-friedly name of Operations Insights Warehouse that does not have to be unique. + * User-friedly name of Ops Insights Warehouse that does not have to be unique. * @param displayName the value to set * @return this builder **/ @@ -226,13 +226,13 @@ public String getCompartmentId() { } /** - * User-friedly name of Operations Insights Warehouse that does not have to be unique. + * User-friedly name of Ops Insights Warehouse that does not have to be unique. **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") private final String displayName; /** - * User-friedly name of Operations Insights Warehouse that does not have to be unique. + * User-friedly name of Ops Insights Warehouse that does not have to be unique. * @return the value **/ public String getDisplayName() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateOperationsInsightsWarehouseUserDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateOperationsInsightsWarehouseUserDetails.java index 98aa3f06989..8ee4ce070da 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateOperationsInsightsWarehouseUserDetails.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CreateOperationsInsightsWarehouseUserDetails.java @@ -90,13 +90,13 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * Username for schema which would have access to AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * Username for schema which would have access to AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. **/ @com.fasterxml.jackson.annotation.JsonProperty("name") private String name; /** - * Username for schema which would have access to AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * Username for schema which would have access to AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * @param name the value to set * @return this builder **/ @@ -106,13 +106,13 @@ public Builder name(String name) { return this; } /** - * User provided connection password for the AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * User provided connection password for the AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. **/ @com.fasterxml.jackson.annotation.JsonProperty("connectionPassword") private String connectionPassword; /** - * User provided connection password for the AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * User provided connection password for the AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * @param connectionPassword the value to set * @return this builder **/ @@ -305,13 +305,13 @@ public String getCompartmentId() { } /** - * Username for schema which would have access to AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * Username for schema which would have access to AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. **/ @com.fasterxml.jackson.annotation.JsonProperty("name") private final String name; /** - * Username for schema which would have access to AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * Username for schema which would have access to AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * @return the value **/ public String getName() { @@ -319,13 +319,13 @@ public String getName() { } /** - * User provided connection password for the AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * User provided connection password for the AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. **/ @com.fasterxml.jackson.annotation.JsonProperty("connectionPassword") private final String connectionPassword; /** - * User provided connection password for the AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * User provided connection password for the AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * @return the value **/ public String getConnectionPassword() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CredentialByIam.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CredentialByIam.java new file mode 100644 index 00000000000..ec534e94dca --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CredentialByIam.java @@ -0,0 +1,110 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * IAM Credential Details to connect to the database. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = CredentialByIam.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "credentialType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CredentialByIam extends CredentialDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("credentialSourceName") + private String credentialSourceName; + + public Builder credentialSourceName(String credentialSourceName) { + this.credentialSourceName = credentialSourceName; + this.__explicitlySet__.add("credentialSourceName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CredentialByIam build() { + CredentialByIam model = new CredentialByIam(this.credentialSourceName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CredentialByIam model) { + if (model.wasPropertyExplicitlySet("credentialSourceName")) { + this.credentialSourceName(model.getCredentialSourceName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public CredentialByIam(String credentialSourceName) { + super(credentialSourceName); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CredentialByIam("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CredentialByIam)) { + return false; + } + + CredentialByIam other = (CredentialByIam) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CredentialDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CredentialDetails.java index aa04d85e4fa..3a397edb343 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CredentialDetails.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/CredentialDetails.java @@ -5,7 +5,7 @@ package com.oracle.bmc.opsi.model; /** - * User credential details to connect to the database. This is supplied via the External Database Service. + * User credential details to connect to the database. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -30,6 +30,10 @@ @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = CredentialByVault.class, name = "CREDENTIALS_BY_VAULT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = CredentialByIam.class, + name = "CREDENTIALS_BY_IAM" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) @@ -102,11 +106,13 @@ public int hashCode() { } /** - * Credential type. + * CREDENTIALS_BY_SOURCE is supplied via the External Database Service. CREDENTIALS_BY_VAULT is supplied by secret service to connection PE_COMANAGED_DATABASE and ADB as well. CREDENTIALS_BY_IAM is used db-token to connect only for Autonomous Database. + * **/ public enum CredentialType { CredentialsBySource("CREDENTIALS_BY_SOURCE"), CredentialsByVault("CREDENTIALS_BY_VAULT"), + CredentialsByIam("CREDENTIALS_BY_IAM"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DBConnectionStatus.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DBConnectionStatus.java new file mode 100644 index 00000000000..b7c88577be3 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DBConnectionStatus.java @@ -0,0 +1,112 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Database connection status. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DBConnectionStatus.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "metricName" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DBConnectionStatus extends DatabaseConfigurationMetricGroup { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("timeCollected") + private java.util.Date timeCollected; + + public Builder timeCollected(java.util.Date timeCollected) { + this.timeCollected = timeCollected; + this.__explicitlySet__.add("timeCollected"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DBConnectionStatus build() { + DBConnectionStatus model = new DBConnectionStatus(this.timeCollected); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DBConnectionStatus model) { + if (model.wasPropertyExplicitlySet("timeCollected")) { + this.timeCollected(model.getTimeCollected()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DBConnectionStatus(java.util.Date timeCollected) { + super(timeCollected); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DBConnectionStatus("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DBConnectionStatus)) { + return false; + } + + DBConnectionStatus other = (DBConnectionStatus) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseConfigurationMetricGroup.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseConfigurationMetricGroup.java index e20f78f92e2..86ccac9b5e8 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseConfigurationMetricGroup.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseConfigurationMetricGroup.java @@ -35,9 +35,25 @@ value = DBParameters.class, name = "DB_PARAMETERS" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DBConnectionStatus.class, + name = "DB_CONNECTION_STATUS" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = HostAllocation.class, + name = "HOST_RESOURCE_ALLOCATION" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ExadataCellConfig.class, + name = "EXADATA_CELL_CONFIG" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = DBExternalProperties.class, name = "DB_EXTERNAL_PROPERTIES" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ExadataAsmEntity.class, + name = "ASM_ENTITY" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) @@ -121,6 +137,10 @@ public enum MetricName { DbExternalInstance("DB_EXTERNAL_INSTANCE"), DbOsConfigInstance("DB_OS_CONFIG_INSTANCE"), DbParameters("DB_PARAMETERS"), + DbConnectionStatus("DB_CONNECTION_STATUS"), + HostResourceAllocation("HOST_RESOURCE_ALLOCATION"), + AsmEntity("ASM_ENTITY"), + ExadataCellConfig("EXADATA_CELL_CONFIG"), ; private final String value; diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseConfigurationSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseConfigurationSummary.java index 362be5778d8..183e321eb78 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseConfigurationSummary.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseConfigurationSummary.java @@ -37,6 +37,14 @@ @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = PeComanagedManagedExternalDatabaseConfigurationSummary.class, name = "PE_COMANAGED_DATABASE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = MacsManagedCloudDatabaseConfigurationSummary.class, + name = "MACS_MANAGED_CLOUD_DATABASE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = MdsMysqlDatabaseConfigurationSummary.class, + name = "MDS_MYSQL_DATABASE_SYSTEM" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) @@ -136,13 +144,13 @@ public String getDatabaseDisplayName() { } /** - * Operations Insights internal representation of the database type. + * Ops Insights internal representation of the database type. **/ @com.fasterxml.jackson.annotation.JsonProperty("databaseType") private final String databaseType; /** - * Operations Insights internal representation of the database type. + * Ops Insights internal representation of the database type. * @return the value **/ public String getDatabaseType() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseDetails.java index 7298a66dbd5..013e93731c1 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseDetails.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseDetails.java @@ -135,13 +135,13 @@ public Builder databaseDisplayName(String databaseDisplayName) { return this; } /** - * Operations Insights internal representation of the database type. + * Ops Insights internal representation of the database type. **/ @com.fasterxml.jackson.annotation.JsonProperty("databaseType") private String databaseType; /** - * Operations Insights internal representation of the database type. + * Ops Insights internal representation of the database type. * @param databaseType the value to set * @return this builder **/ @@ -335,13 +335,13 @@ public String getDatabaseDisplayName() { } /** - * Operations Insights internal representation of the database type. + * Ops Insights internal representation of the database type. **/ @com.fasterxml.jackson.annotation.JsonProperty("databaseType") private final String databaseType; /** - * Operations Insights internal representation of the database type. + * Ops Insights internal representation of the database type. * @return the value **/ public String getDatabaseType() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseEntitySource.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseEntitySource.java index 196dcadf08d..b10ae74eee6 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseEntitySource.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseEntitySource.java @@ -11,6 +11,8 @@ public enum DatabaseEntitySource { EmManagedExternalDatabase("EM_MANAGED_EXTERNAL_DATABASE"), PeComanagedDatabase("PE_COMANAGED_DATABASE"), + MdsMysqlDatabaseSystem("MDS_MYSQL_DATABASE_SYSTEM"), + MacsManagedCloudDatabase("MACS_MANAGED_CLOUD_DATABASE"), ; private final String value; diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseEntitySourceAll.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseEntitySourceAll.java index aabfe80a9e6..1d7d9310a18 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseEntitySourceAll.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseEntitySourceAll.java @@ -13,6 +13,8 @@ public enum DatabaseEntitySourceAll { EmManagedExternalDatabase("EM_MANAGED_EXTERNAL_DATABASE"), MacsManagedExternalDatabase("MACS_MANAGED_EXTERNAL_DATABASE"), PeComanagedDatabase("PE_COMANAGED_DATABASE"), + MdsMysqlDatabaseSystem("MDS_MYSQL_DATABASE_SYSTEM"), + MacsManagedCloudDatabase("MACS_MANAGED_CLOUD_DATABASE"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseInsight.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseInsight.java index ec421ca5850..8b2321f9db8 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseInsight.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseInsight.java @@ -34,9 +34,17 @@ value = PeComanagedDatabaseInsight.class, name = "PE_COMANAGED_DATABASE" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = MacsManagedCloudDatabaseInsight.class, + name = "MACS_MANAGED_CLOUD_DATABASE" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = AutonomousDatabaseInsight.class, name = "AUTONOMOUS_DATABASE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = MdsMySqlDatabaseInsight.class, + name = "MDS_MYSQL_DATABASE_SYSTEM" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) @@ -133,13 +141,13 @@ public ResourceStatus getStatus() { } /** - * Operations Insights internal representation of the database type. + * Ops Insights internal representation of the database type. **/ @com.fasterxml.jackson.annotation.JsonProperty("databaseType") private final String databaseType; /** - * Operations Insights internal representation of the database type. + * Ops Insights internal representation of the database type. * @return the value **/ public String getDatabaseType() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseInsightSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseInsightSummary.java index d4b4c78761d..efc2e80640c 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseInsightSummary.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DatabaseInsightSummary.java @@ -30,6 +30,14 @@ value = AutonomousDatabaseInsightSummary.class, name = "AUTONOMOUS_DATABASE" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = MacsManagedCloudDatabaseInsightSummary.class, + name = "MACS_MANAGED_CLOUD_DATABASE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = MdsMySqlDatabaseInsightSummary.class, + name = "MDS_MYSQL_DATABASE_SYSTEM" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = PeComanagedDatabaseInsightSummary.class, name = "PE_COMANAGED_DATABASE" @@ -173,13 +181,13 @@ public String getDatabaseDisplayName() { } /** - * Operations Insights internal representation of the database type. + * Ops Insights internal representation of the database type. **/ @com.fasterxml.jackson.annotation.JsonProperty("databaseType") private final String databaseType; /** - * Operations Insights internal representation of the database type. + * Ops Insights internal representation of the database type. * @return the value **/ public String getDatabaseType() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DownloadOperationsInsightsWarehouseWalletDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DownloadOperationsInsightsWarehouseWalletDetails.java index 5b845f888c2..f6d41a88903 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DownloadOperationsInsightsWarehouseWalletDetails.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/DownloadOperationsInsightsWarehouseWalletDetails.java @@ -32,13 +32,13 @@ public DownloadOperationsInsightsWarehouseWalletDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * User provided ADW wallet password for the Operations Insights Warehouse. + * User provided ADW wallet password for the Ops Insights Warehouse. **/ @com.fasterxml.jackson.annotation.JsonProperty("operationsInsightsWarehouseWalletPassword") private String operationsInsightsWarehouseWalletPassword; /** - * User provided ADW wallet password for the Operations Insights Warehouse. + * User provided ADW wallet password for the Ops Insights Warehouse. * @param operationsInsightsWarehouseWalletPassword the value to set * @return this builder **/ @@ -85,13 +85,13 @@ public Builder toBuilder() { } /** - * User provided ADW wallet password for the Operations Insights Warehouse. + * User provided ADW wallet password for the Ops Insights Warehouse. **/ @com.fasterxml.jackson.annotation.JsonProperty("operationsInsightsWarehouseWalletPassword") private final String operationsInsightsWarehouseWalletPassword; /** - * User provided ADW wallet password for the Operations Insights Warehouse. + * User provided ADW wallet password for the Ops Insights Warehouse. * @return the value **/ public String getOperationsInsightsWarehouseWalletPassword() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EmManagedExternalDatabaseConfigurationSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EmManagedExternalDatabaseConfigurationSummary.java index 7c1d810c1f7..7f349b3ad41 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EmManagedExternalDatabaseConfigurationSummary.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EmManagedExternalDatabaseConfigurationSummary.java @@ -175,6 +175,70 @@ public Builder exadataDetails(ExadataDetails exadataDetails) { this.__explicitlySet__.add("exadataDetails"); return this; } + /** + * Enterprise Manager Entity Unique Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerEntityIdentifier") + private String enterpriseManagerEntityIdentifier; + + /** + * Enterprise Manager Entity Unique Identifier + * @param enterpriseManagerEntityIdentifier the value to set + * @return this builder + **/ + public Builder enterpriseManagerEntityIdentifier(String enterpriseManagerEntityIdentifier) { + this.enterpriseManagerEntityIdentifier = enterpriseManagerEntityIdentifier; + this.__explicitlySet__.add("enterpriseManagerEntityIdentifier"); + return this; + } + /** + * Enterprise Manager Console Url + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerConsoleUrl") + private String enterpriseManagerConsoleUrl; + + /** + * Enterprise Manager Console Url + * @param enterpriseManagerConsoleUrl the value to set + * @return this builder + **/ + public Builder enterpriseManagerConsoleUrl(String enterpriseManagerConsoleUrl) { + this.enterpriseManagerConsoleUrl = enterpriseManagerConsoleUrl; + this.__explicitlySet__.add("enterpriseManagerConsoleUrl"); + return this; + } + /** + * Enterprise Manager OMS Version + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerOmsVer") + private String enterpriseManagerOmsVer; + + /** + * Enterprise Manager OMS Version + * @param enterpriseManagerOmsVer the value to set + * @return this builder + **/ + public Builder enterpriseManagerOmsVer(String enterpriseManagerOmsVer) { + this.enterpriseManagerOmsVer = enterpriseManagerOmsVer; + this.__explicitlySet__.add("enterpriseManagerOmsVer"); + return this; + } + /** + * Enterprise Manager Entity Type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerEntityType") + private String enterpriseManagerEntityType; + + /** + * Enterprise Manager Entity Type + * @param enterpriseManagerEntityType the value to set + * @return this builder + **/ + public Builder enterpriseManagerEntityType(String enterpriseManagerEntityType) { + this.enterpriseManagerEntityType = enterpriseManagerEntityType; + this.__explicitlySet__.add("enterpriseManagerEntityType"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -195,7 +259,11 @@ public EmManagedExternalDatabaseConfigurationSummary build() { this.enterpriseManagerIdentifier, this.enterpriseManagerBridgeId, this.instances, - this.exadataDetails); + this.exadataDetails, + this.enterpriseManagerEntityIdentifier, + this.enterpriseManagerConsoleUrl, + this.enterpriseManagerOmsVer, + this.enterpriseManagerEntityType); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -246,6 +314,19 @@ public Builder copy(EmManagedExternalDatabaseConfigurationSummary model) { if (model.wasPropertyExplicitlySet("exadataDetails")) { this.exadataDetails(model.getExadataDetails()); } + if (model.wasPropertyExplicitlySet("enterpriseManagerEntityIdentifier")) { + this.enterpriseManagerEntityIdentifier( + model.getEnterpriseManagerEntityIdentifier()); + } + if (model.wasPropertyExplicitlySet("enterpriseManagerConsoleUrl")) { + this.enterpriseManagerConsoleUrl(model.getEnterpriseManagerConsoleUrl()); + } + if (model.wasPropertyExplicitlySet("enterpriseManagerOmsVer")) { + this.enterpriseManagerOmsVer(model.getEnterpriseManagerOmsVer()); + } + if (model.wasPropertyExplicitlySet("enterpriseManagerEntityType")) { + this.enterpriseManagerEntityType(model.getEnterpriseManagerEntityType()); + } return this; } } @@ -276,7 +357,11 @@ public EmManagedExternalDatabaseConfigurationSummary( String enterpriseManagerIdentifier, String enterpriseManagerBridgeId, java.util.List instances, - ExadataDetails exadataDetails) { + ExadataDetails exadataDetails, + String enterpriseManagerEntityIdentifier, + String enterpriseManagerConsoleUrl, + String enterpriseManagerOmsVer, + String enterpriseManagerEntityType) { super( databaseInsightId, compartmentId, @@ -292,6 +377,10 @@ public EmManagedExternalDatabaseConfigurationSummary( this.enterpriseManagerBridgeId = enterpriseManagerBridgeId; this.instances = instances; this.exadataDetails = exadataDetails; + this.enterpriseManagerEntityIdentifier = enterpriseManagerEntityIdentifier; + this.enterpriseManagerConsoleUrl = enterpriseManagerConsoleUrl; + this.enterpriseManagerOmsVer = enterpriseManagerOmsVer; + this.enterpriseManagerEntityType = enterpriseManagerEntityType; } /** @@ -343,6 +432,62 @@ public ExadataDetails getExadataDetails() { return exadataDetails; } + /** + * Enterprise Manager Entity Unique Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerEntityIdentifier") + private final String enterpriseManagerEntityIdentifier; + + /** + * Enterprise Manager Entity Unique Identifier + * @return the value + **/ + public String getEnterpriseManagerEntityIdentifier() { + return enterpriseManagerEntityIdentifier; + } + + /** + * Enterprise Manager Console Url + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerConsoleUrl") + private final String enterpriseManagerConsoleUrl; + + /** + * Enterprise Manager Console Url + * @return the value + **/ + public String getEnterpriseManagerConsoleUrl() { + return enterpriseManagerConsoleUrl; + } + + /** + * Enterprise Manager OMS Version + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerOmsVer") + private final String enterpriseManagerOmsVer; + + /** + * Enterprise Manager OMS Version + * @return the value + **/ + public String getEnterpriseManagerOmsVer() { + return enterpriseManagerOmsVer; + } + + /** + * Enterprise Manager Entity Type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerEntityType") + private final String enterpriseManagerEntityType; + + /** + * Enterprise Manager Entity Type + * @return the value + **/ + public String getEnterpriseManagerEntityType() { + return enterpriseManagerEntityType; + } + @Override public String toString() { return this.toString(true); @@ -363,6 +508,14 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.enterpriseManagerBridgeId)); sb.append(", instances=").append(String.valueOf(this.instances)); sb.append(", exadataDetails=").append(String.valueOf(this.exadataDetails)); + sb.append(", enterpriseManagerEntityIdentifier=") + .append(String.valueOf(this.enterpriseManagerEntityIdentifier)); + sb.append(", enterpriseManagerConsoleUrl=") + .append(String.valueOf(this.enterpriseManagerConsoleUrl)); + sb.append(", enterpriseManagerOmsVer=") + .append(String.valueOf(this.enterpriseManagerOmsVer)); + sb.append(", enterpriseManagerEntityType=") + .append(String.valueOf(this.enterpriseManagerEntityType)); sb.append(")"); return sb.toString(); } @@ -384,6 +537,15 @@ public boolean equals(Object o) { this.enterpriseManagerBridgeId, other.enterpriseManagerBridgeId) && java.util.Objects.equals(this.instances, other.instances) && java.util.Objects.equals(this.exadataDetails, other.exadataDetails) + && java.util.Objects.equals( + this.enterpriseManagerEntityIdentifier, + other.enterpriseManagerEntityIdentifier) + && java.util.Objects.equals( + this.enterpriseManagerConsoleUrl, other.enterpriseManagerConsoleUrl) + && java.util.Objects.equals( + this.enterpriseManagerOmsVer, other.enterpriseManagerOmsVer) + && java.util.Objects.equals( + this.enterpriseManagerEntityType, other.enterpriseManagerEntityType) && super.equals(other); } @@ -405,6 +567,26 @@ public int hashCode() { result = (result * PRIME) + (this.exadataDetails == null ? 43 : this.exadataDetails.hashCode()); + result = + (result * PRIME) + + (this.enterpriseManagerEntityIdentifier == null + ? 43 + : this.enterpriseManagerEntityIdentifier.hashCode()); + result = + (result * PRIME) + + (this.enterpriseManagerConsoleUrl == null + ? 43 + : this.enterpriseManagerConsoleUrl.hashCode()); + result = + (result * PRIME) + + (this.enterpriseManagerOmsVer == null + ? 43 + : this.enterpriseManagerOmsVer.hashCode()); + result = + (result * PRIME) + + (this.enterpriseManagerEntityType == null + ? 43 + : this.enterpriseManagerEntityType.hashCode()); return result; } } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EmManagedExternalHostConfigurationSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EmManagedExternalHostConfigurationSummary.java index 78835bb1e99..96756362db0 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EmManagedExternalHostConfigurationSummary.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EmManagedExternalHostConfigurationSummary.java @@ -239,6 +239,70 @@ public Builder exadataDetails(ExadataDetails exadataDetails) { this.__explicitlySet__.add("exadataDetails"); return this; } + /** + * Enterprise Manager Entity Unique Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerEntityIdentifier") + private String enterpriseManagerEntityIdentifier; + + /** + * Enterprise Manager Entity Unique Identifier + * @param enterpriseManagerEntityIdentifier the value to set + * @return this builder + **/ + public Builder enterpriseManagerEntityIdentifier(String enterpriseManagerEntityIdentifier) { + this.enterpriseManagerEntityIdentifier = enterpriseManagerEntityIdentifier; + this.__explicitlySet__.add("enterpriseManagerEntityIdentifier"); + return this; + } + /** + * Enterprise Manager Console Url + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerConsoleUrl") + private String enterpriseManagerConsoleUrl; + + /** + * Enterprise Manager Console Url + * @param enterpriseManagerConsoleUrl the value to set + * @return this builder + **/ + public Builder enterpriseManagerConsoleUrl(String enterpriseManagerConsoleUrl) { + this.enterpriseManagerConsoleUrl = enterpriseManagerConsoleUrl; + this.__explicitlySet__.add("enterpriseManagerConsoleUrl"); + return this; + } + /** + * Enterprise Manager OMS Version + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerOmsVer") + private String enterpriseManagerOmsVer; + + /** + * Enterprise Manager OMS Version + * @param enterpriseManagerOmsVer the value to set + * @return this builder + **/ + public Builder enterpriseManagerOmsVer(String enterpriseManagerOmsVer) { + this.enterpriseManagerOmsVer = enterpriseManagerOmsVer; + this.__explicitlySet__.add("enterpriseManagerOmsVer"); + return this; + } + /** + * Enterprise Manager Entity Type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerEntityType") + private String enterpriseManagerEntityType; + + /** + * Enterprise Manager Entity Type + * @param enterpriseManagerEntityType the value to set + * @return this builder + **/ + public Builder enterpriseManagerEntityType(String enterpriseManagerEntityType) { + this.enterpriseManagerEntityType = enterpriseManagerEntityType; + this.__explicitlySet__.add("enterpriseManagerEntityType"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -267,7 +331,11 @@ public EmManagedExternalHostConfigurationSummary build() { this.freeformTags, this.enterpriseManagerIdentifier, this.enterpriseManagerBridgeId, - this.exadataDetails); + this.exadataDetails, + this.enterpriseManagerEntityIdentifier, + this.enterpriseManagerConsoleUrl, + this.enterpriseManagerOmsVer, + this.enterpriseManagerEntityType); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -342,6 +410,19 @@ public Builder copy(EmManagedExternalHostConfigurationSummary model) { if (model.wasPropertyExplicitlySet("exadataDetails")) { this.exadataDetails(model.getExadataDetails()); } + if (model.wasPropertyExplicitlySet("enterpriseManagerEntityIdentifier")) { + this.enterpriseManagerEntityIdentifier( + model.getEnterpriseManagerEntityIdentifier()); + } + if (model.wasPropertyExplicitlySet("enterpriseManagerConsoleUrl")) { + this.enterpriseManagerConsoleUrl(model.getEnterpriseManagerConsoleUrl()); + } + if (model.wasPropertyExplicitlySet("enterpriseManagerOmsVer")) { + this.enterpriseManagerOmsVer(model.getEnterpriseManagerOmsVer()); + } + if (model.wasPropertyExplicitlySet("enterpriseManagerEntityType")) { + this.enterpriseManagerEntityType(model.getEnterpriseManagerEntityType()); + } return this; } } @@ -380,7 +461,11 @@ public EmManagedExternalHostConfigurationSummary( java.util.Map freeformTags, String enterpriseManagerIdentifier, String enterpriseManagerBridgeId, - ExadataDetails exadataDetails) { + ExadataDetails exadataDetails, + String enterpriseManagerEntityIdentifier, + String enterpriseManagerConsoleUrl, + String enterpriseManagerOmsVer, + String enterpriseManagerEntityType) { super( hostInsightId, compartmentId, @@ -404,6 +489,10 @@ public EmManagedExternalHostConfigurationSummary( this.enterpriseManagerIdentifier = enterpriseManagerIdentifier; this.enterpriseManagerBridgeId = enterpriseManagerBridgeId; this.exadataDetails = exadataDetails; + this.enterpriseManagerEntityIdentifier = enterpriseManagerEntityIdentifier; + this.enterpriseManagerConsoleUrl = enterpriseManagerConsoleUrl; + this.enterpriseManagerOmsVer = enterpriseManagerOmsVer; + this.enterpriseManagerEntityType = enterpriseManagerEntityType; } /** @@ -441,6 +530,62 @@ public ExadataDetails getExadataDetails() { return exadataDetails; } + /** + * Enterprise Manager Entity Unique Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerEntityIdentifier") + private final String enterpriseManagerEntityIdentifier; + + /** + * Enterprise Manager Entity Unique Identifier + * @return the value + **/ + public String getEnterpriseManagerEntityIdentifier() { + return enterpriseManagerEntityIdentifier; + } + + /** + * Enterprise Manager Console Url + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerConsoleUrl") + private final String enterpriseManagerConsoleUrl; + + /** + * Enterprise Manager Console Url + * @return the value + **/ + public String getEnterpriseManagerConsoleUrl() { + return enterpriseManagerConsoleUrl; + } + + /** + * Enterprise Manager OMS Version + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerOmsVer") + private final String enterpriseManagerOmsVer; + + /** + * Enterprise Manager OMS Version + * @return the value + **/ + public String getEnterpriseManagerOmsVer() { + return enterpriseManagerOmsVer; + } + + /** + * Enterprise Manager Entity Type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerEntityType") + private final String enterpriseManagerEntityType; + + /** + * Enterprise Manager Entity Type + * @return the value + **/ + public String getEnterpriseManagerEntityType() { + return enterpriseManagerEntityType; + } + @Override public String toString() { return this.toString(true); @@ -460,6 +605,14 @@ public String toString(boolean includeByteArrayContents) { sb.append(", enterpriseManagerBridgeId=") .append(String.valueOf(this.enterpriseManagerBridgeId)); sb.append(", exadataDetails=").append(String.valueOf(this.exadataDetails)); + sb.append(", enterpriseManagerEntityIdentifier=") + .append(String.valueOf(this.enterpriseManagerEntityIdentifier)); + sb.append(", enterpriseManagerConsoleUrl=") + .append(String.valueOf(this.enterpriseManagerConsoleUrl)); + sb.append(", enterpriseManagerOmsVer=") + .append(String.valueOf(this.enterpriseManagerOmsVer)); + sb.append(", enterpriseManagerEntityType=") + .append(String.valueOf(this.enterpriseManagerEntityType)); sb.append(")"); return sb.toString(); } @@ -480,6 +633,15 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.enterpriseManagerBridgeId, other.enterpriseManagerBridgeId) && java.util.Objects.equals(this.exadataDetails, other.exadataDetails) + && java.util.Objects.equals( + this.enterpriseManagerEntityIdentifier, + other.enterpriseManagerEntityIdentifier) + && java.util.Objects.equals( + this.enterpriseManagerConsoleUrl, other.enterpriseManagerConsoleUrl) + && java.util.Objects.equals( + this.enterpriseManagerOmsVer, other.enterpriseManagerOmsVer) + && java.util.Objects.equals( + this.enterpriseManagerEntityType, other.enterpriseManagerEntityType) && super.equals(other); } @@ -500,6 +662,26 @@ public int hashCode() { result = (result * PRIME) + (this.exadataDetails == null ? 43 : this.exadataDetails.hashCode()); + result = + (result * PRIME) + + (this.enterpriseManagerEntityIdentifier == null + ? 43 + : this.enterpriseManagerEntityIdentifier.hashCode()); + result = + (result * PRIME) + + (this.enterpriseManagerConsoleUrl == null + ? 43 + : this.enterpriseManagerConsoleUrl.hashCode()); + result = + (result * PRIME) + + (this.enterpriseManagerOmsVer == null + ? 43 + : this.enterpriseManagerOmsVer.hashCode()); + result = + (result * PRIME) + + (this.enterpriseManagerEntityType == null + ? 43 + : this.enterpriseManagerEntityType.hashCode()); return result; } } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnableAutonomousDatabaseInsightDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnableAutonomousDatabaseInsightDetails.java new file mode 100644 index 00000000000..306ad43d86a --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnableAutonomousDatabaseInsightDetails.java @@ -0,0 +1,430 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * The information about database to be analyzed. When isAdvancedFeaturesEnabled is set to false, parameters connectionDetails, credentialDetails and opsiPrivateEndpoint are optional. Otherwise, connectionDetails and crendetialDetails are required to enable full OPSI service features. If the Autonomouse Database is configured with private, restricted or dedicated access, opsiPrivateEndpoint parameter is required. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = EnableAutonomousDatabaseInsightDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class EnableAutonomousDatabaseInsightDetails extends EnableDatabaseInsightDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * OCI database resource type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseResourceType") + private String databaseResourceType; + + /** + * OCI database resource type + * @param databaseResourceType the value to set + * @return this builder + **/ + public Builder databaseResourceType(String databaseResourceType) { + this.databaseResourceType = databaseResourceType; + this.__explicitlySet__.add("databaseResourceType"); + return this; + } + /** + * Flag is to identify if advanced features for autonomous database is enabled or not + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAdvancedFeaturesEnabled") + private Boolean isAdvancedFeaturesEnabled; + + /** + * Flag is to identify if advanced features for autonomous database is enabled or not + * @param isAdvancedFeaturesEnabled the value to set + * @return this builder + **/ + public Builder isAdvancedFeaturesEnabled(Boolean isAdvancedFeaturesEnabled) { + this.isAdvancedFeaturesEnabled = isAdvancedFeaturesEnabled; + this.__explicitlySet__.add("isAdvancedFeaturesEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionDetails") + private ConnectionDetails connectionDetails; + + public Builder connectionDetails(ConnectionDetails connectionDetails) { + this.connectionDetails = connectionDetails; + this.__explicitlySet__.add("connectionDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("credentialDetails") + private CredentialDetails credentialDetails; + + public Builder credentialDetails(CredentialDetails credentialDetails) { + this.credentialDetails = credentialDetails; + this.__explicitlySet__.add("credentialDetails"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OPSI private endpoint + **/ + @com.fasterxml.jackson.annotation.JsonProperty("opsiPrivateEndpointId") + private String opsiPrivateEndpointId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OPSI private endpoint + * @param opsiPrivateEndpointId the value to set + * @return this builder + **/ + public Builder opsiPrivateEndpointId(String opsiPrivateEndpointId) { + this.opsiPrivateEndpointId = opsiPrivateEndpointId; + this.__explicitlySet__.add("opsiPrivateEndpointId"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public EnableAutonomousDatabaseInsightDetails build() { + EnableAutonomousDatabaseInsightDetails model = + new EnableAutonomousDatabaseInsightDetails( + this.databaseResourceType, + this.isAdvancedFeaturesEnabled, + this.connectionDetails, + this.credentialDetails, + this.opsiPrivateEndpointId, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(EnableAutonomousDatabaseInsightDetails model) { + if (model.wasPropertyExplicitlySet("databaseResourceType")) { + this.databaseResourceType(model.getDatabaseResourceType()); + } + if (model.wasPropertyExplicitlySet("isAdvancedFeaturesEnabled")) { + this.isAdvancedFeaturesEnabled(model.getIsAdvancedFeaturesEnabled()); + } + if (model.wasPropertyExplicitlySet("connectionDetails")) { + this.connectionDetails(model.getConnectionDetails()); + } + if (model.wasPropertyExplicitlySet("credentialDetails")) { + this.credentialDetails(model.getCredentialDetails()); + } + if (model.wasPropertyExplicitlySet("opsiPrivateEndpointId")) { + this.opsiPrivateEndpointId(model.getOpsiPrivateEndpointId()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public EnableAutonomousDatabaseInsightDetails( + String databaseResourceType, + Boolean isAdvancedFeaturesEnabled, + ConnectionDetails connectionDetails, + CredentialDetails credentialDetails, + String opsiPrivateEndpointId, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.databaseResourceType = databaseResourceType; + this.isAdvancedFeaturesEnabled = isAdvancedFeaturesEnabled; + this.connectionDetails = connectionDetails; + this.credentialDetails = credentialDetails; + this.opsiPrivateEndpointId = opsiPrivateEndpointId; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + /** + * OCI database resource type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseResourceType") + private final String databaseResourceType; + + /** + * OCI database resource type + * @return the value + **/ + public String getDatabaseResourceType() { + return databaseResourceType; + } + + /** + * Flag is to identify if advanced features for autonomous database is enabled or not + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAdvancedFeaturesEnabled") + private final Boolean isAdvancedFeaturesEnabled; + + /** + * Flag is to identify if advanced features for autonomous database is enabled or not + * @return the value + **/ + public Boolean getIsAdvancedFeaturesEnabled() { + return isAdvancedFeaturesEnabled; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionDetails") + private final ConnectionDetails connectionDetails; + + public ConnectionDetails getConnectionDetails() { + return connectionDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("credentialDetails") + private final CredentialDetails credentialDetails; + + public CredentialDetails getCredentialDetails() { + return credentialDetails; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OPSI private endpoint + **/ + @com.fasterxml.jackson.annotation.JsonProperty("opsiPrivateEndpointId") + private final String opsiPrivateEndpointId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OPSI private endpoint + * @return the value + **/ + public String getOpsiPrivateEndpointId() { + return opsiPrivateEndpointId; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("EnableAutonomousDatabaseInsightDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", databaseResourceType=").append(String.valueOf(this.databaseResourceType)); + sb.append(", isAdvancedFeaturesEnabled=") + .append(String.valueOf(this.isAdvancedFeaturesEnabled)); + sb.append(", connectionDetails=").append(String.valueOf(this.connectionDetails)); + sb.append(", credentialDetails=").append(String.valueOf(this.credentialDetails)); + sb.append(", opsiPrivateEndpointId=").append(String.valueOf(this.opsiPrivateEndpointId)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof EnableAutonomousDatabaseInsightDetails)) { + return false; + } + + EnableAutonomousDatabaseInsightDetails other = (EnableAutonomousDatabaseInsightDetails) o; + return java.util.Objects.equals(this.databaseResourceType, other.databaseResourceType) + && java.util.Objects.equals( + this.isAdvancedFeaturesEnabled, other.isAdvancedFeaturesEnabled) + && java.util.Objects.equals(this.connectionDetails, other.connectionDetails) + && java.util.Objects.equals(this.credentialDetails, other.credentialDetails) + && java.util.Objects.equals(this.opsiPrivateEndpointId, other.opsiPrivateEndpointId) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.databaseResourceType == null + ? 43 + : this.databaseResourceType.hashCode()); + result = + (result * PRIME) + + (this.isAdvancedFeaturesEnabled == null + ? 43 + : this.isAdvancedFeaturesEnabled.hashCode()); + result = + (result * PRIME) + + (this.connectionDetails == null ? 43 : this.connectionDetails.hashCode()); + result = + (result * PRIME) + + (this.credentialDetails == null ? 43 : this.credentialDetails.hashCode()); + result = + (result * PRIME) + + (this.opsiPrivateEndpointId == null + ? 43 + : this.opsiPrivateEndpointId.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnableDatabaseInsightDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnableDatabaseInsightDetails.java index 7cf25dc6cb3..4af5768fe15 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnableDatabaseInsightDetails.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnableDatabaseInsightDetails.java @@ -26,6 +26,18 @@ value = EnableEmManagedExternalDatabaseInsightDetails.class, name = "EM_MANAGED_EXTERNAL_DATABASE" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = EnableMdsMySqlDatabaseInsightDetails.class, + name = "MDS_MYSQL_DATABASE_SYSTEM" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = EnableAutonomousDatabaseInsightDetails.class, + name = "AUTONOMOUS_DATABASE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = EnableMacsManagedCloudDatabaseInsightDetails.class, + name = "MACS_MANAGED_CLOUD_DATABASE" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = EnablePeComanagedDatabaseInsightDetails.class, name = "PE_COMANAGED_DATABASE" diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnableExadataInsightDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnableExadataInsightDetails.java index da52c12355a..16dee503a52 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnableExadataInsightDetails.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnableExadataInsightDetails.java @@ -22,6 +22,10 @@ defaultImpl = EnableExadataInsightDetails.class ) @com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = EnableMacsManagedCloudExadataInsightDetails.class, + name = "MACS_MANAGED_CLOUD_EXADATA" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = EnablePeComanagedExadataInsightDetails.class, name = "PE_COMANAGED_EXADATA" diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnableMacsManagedCloudDatabaseInsightDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnableMacsManagedCloudDatabaseInsightDetails.java new file mode 100644 index 00000000000..06fc70df9b7 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnableMacsManagedCloudDatabaseInsightDetails.java @@ -0,0 +1,386 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * The information about database to be analyzed. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = EnableMacsManagedCloudDatabaseInsightDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class EnableMacsManagedCloudDatabaseInsightDetails + extends EnableDatabaseInsightDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The compartment [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the External Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the External Database. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @param managementAgentId the value to set + * @return this builder + **/ + public Builder managementAgentId(String managementAgentId) { + this.managementAgentId = managementAgentId; + this.__explicitlySet__.add("managementAgentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionDetails") + private ConnectionDetails connectionDetails; + + public Builder connectionDetails(ConnectionDetails connectionDetails) { + this.connectionDetails = connectionDetails; + this.__explicitlySet__.add("connectionDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionCredentialDetails") + private CredentialDetails connectionCredentialDetails; + + public Builder connectionCredentialDetails(CredentialDetails connectionCredentialDetails) { + this.connectionCredentialDetails = connectionCredentialDetails; + this.__explicitlySet__.add("connectionCredentialDetails"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public EnableMacsManagedCloudDatabaseInsightDetails build() { + EnableMacsManagedCloudDatabaseInsightDetails model = + new EnableMacsManagedCloudDatabaseInsightDetails( + this.compartmentId, + this.managementAgentId, + this.connectionDetails, + this.connectionCredentialDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(EnableMacsManagedCloudDatabaseInsightDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("managementAgentId")) { + this.managementAgentId(model.getManagementAgentId()); + } + if (model.wasPropertyExplicitlySet("connectionDetails")) { + this.connectionDetails(model.getConnectionDetails()); + } + if (model.wasPropertyExplicitlySet("connectionCredentialDetails")) { + this.connectionCredentialDetails(model.getConnectionCredentialDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public EnableMacsManagedCloudDatabaseInsightDetails( + String compartmentId, + String managementAgentId, + ConnectionDetails connectionDetails, + CredentialDetails connectionCredentialDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.compartmentId = compartmentId; + this.managementAgentId = managementAgentId; + this.connectionDetails = connectionDetails; + this.connectionCredentialDetails = connectionCredentialDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the External Database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The compartment [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the External Database. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private final String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @return the value + **/ + public String getManagementAgentId() { + return managementAgentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionDetails") + private final ConnectionDetails connectionDetails; + + public ConnectionDetails getConnectionDetails() { + return connectionDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionCredentialDetails") + private final CredentialDetails connectionCredentialDetails; + + public CredentialDetails getConnectionCredentialDetails() { + return connectionCredentialDetails; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("EnableMacsManagedCloudDatabaseInsightDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", managementAgentId=").append(String.valueOf(this.managementAgentId)); + sb.append(", connectionDetails=").append(String.valueOf(this.connectionDetails)); + sb.append(", connectionCredentialDetails=") + .append(String.valueOf(this.connectionCredentialDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof EnableMacsManagedCloudDatabaseInsightDetails)) { + return false; + } + + EnableMacsManagedCloudDatabaseInsightDetails other = + (EnableMacsManagedCloudDatabaseInsightDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.managementAgentId, other.managementAgentId) + && java.util.Objects.equals(this.connectionDetails, other.connectionDetails) + && java.util.Objects.equals( + this.connectionCredentialDetails, other.connectionCredentialDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.managementAgentId == null ? 43 : this.managementAgentId.hashCode()); + result = + (result * PRIME) + + (this.connectionDetails == null ? 43 : this.connectionDetails.hashCode()); + result = + (result * PRIME) + + (this.connectionCredentialDetails == null + ? 43 + : this.connectionCredentialDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnableMacsManagedCloudExadataInsightDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnableMacsManagedCloudExadataInsightDetails.java new file mode 100644 index 00000000000..ec9aea9c01e --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnableMacsManagedCloudExadataInsightDetails.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * The information about the Exadata system to be analyzed. (ExaCC) + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = EnableMacsManagedCloudExadataInsightDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class EnableMacsManagedCloudExadataInsightDetails extends EnableExadataInsightDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public EnableMacsManagedCloudExadataInsightDetails build() { + EnableMacsManagedCloudExadataInsightDetails model = + new EnableMacsManagedCloudExadataInsightDetails(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(EnableMacsManagedCloudExadataInsightDetails model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public EnableMacsManagedCloudExadataInsightDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("EnableMacsManagedCloudExadataInsightDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof EnableMacsManagedCloudExadataInsightDetails)) { + return false; + } + + EnableMacsManagedCloudExadataInsightDetails other = + (EnableMacsManagedCloudExadataInsightDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnableMdsMySqlDatabaseInsightDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnableMdsMySqlDatabaseInsightDetails.java new file mode 100644 index 00000000000..7924efe8589 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnableMdsMySqlDatabaseInsightDetails.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * The information about database to be analyzed. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = EnableMdsMySqlDatabaseInsightDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class EnableMdsMySqlDatabaseInsightDetails extends EnableDatabaseInsightDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public EnableMdsMySqlDatabaseInsightDetails build() { + EnableMdsMySqlDatabaseInsightDetails model = new EnableMdsMySqlDatabaseInsightDetails(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(EnableMdsMySqlDatabaseInsightDetails model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public EnableMdsMySqlDatabaseInsightDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("EnableMdsMySqlDatabaseInsightDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof EnableMdsMySqlDatabaseInsightDetails)) { + return false; + } + + EnableMdsMySqlDatabaseInsightDetails other = (EnableMdsMySqlDatabaseInsightDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnterpriseManagerBridges.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnterpriseManagerBridges.java index 4f834832a11..1fcc8908b53 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnterpriseManagerBridges.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/EnterpriseManagerBridges.java @@ -5,7 +5,7 @@ package com.oracle.bmc.opsi.model; /** - * Logical grouping used for Operations Insights Enterprise Manager Bridge operations. + * Logical grouping used for Ops Insights Enterprise Manager Bridge operations. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataAsmEntity.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataAsmEntity.java new file mode 100644 index 00000000000..134cb3a1a51 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataAsmEntity.java @@ -0,0 +1,233 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * ASM entitie for an exadata + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ExadataAsmEntity.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "metricName" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExadataAsmEntity extends DatabaseConfigurationMetricGroup { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("timeCollected") + private java.util.Date timeCollected; + + public Builder timeCollected(java.util.Date timeCollected) { + this.timeCollected = timeCollected; + this.__explicitlySet__.add("timeCollected"); + return this; + } + /** + * Instance name of ASM + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceName") + private String instanceName; + + /** + * Instance name of ASM + * @param instanceName the value to set + * @return this builder + **/ + public Builder instanceName(String instanceName) { + this.instanceName = instanceName; + this.__explicitlySet__.add("instanceName"); + return this; + } + /** + * Cluster name of ASM + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterName") + private String clusterName; + + /** + * Cluster name of ASM + * @param clusterName the value to set + * @return this builder + **/ + public Builder clusterName(String clusterName) { + this.clusterName = clusterName; + this.__explicitlySet__.add("clusterName"); + return this; + } + /** + * Software version + **/ + @com.fasterxml.jackson.annotation.JsonProperty("softwareVersion") + private String softwareVersion; + + /** + * Software version + * @param softwareVersion the value to set + * @return this builder + **/ + public Builder softwareVersion(String softwareVersion) { + this.softwareVersion = softwareVersion; + this.__explicitlySet__.add("softwareVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExadataAsmEntity build() { + ExadataAsmEntity model = + new ExadataAsmEntity( + this.timeCollected, + this.instanceName, + this.clusterName, + this.softwareVersion); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExadataAsmEntity model) { + if (model.wasPropertyExplicitlySet("timeCollected")) { + this.timeCollected(model.getTimeCollected()); + } + if (model.wasPropertyExplicitlySet("instanceName")) { + this.instanceName(model.getInstanceName()); + } + if (model.wasPropertyExplicitlySet("clusterName")) { + this.clusterName(model.getClusterName()); + } + if (model.wasPropertyExplicitlySet("softwareVersion")) { + this.softwareVersion(model.getSoftwareVersion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ExadataAsmEntity( + java.util.Date timeCollected, + String instanceName, + String clusterName, + String softwareVersion) { + super(timeCollected); + this.instanceName = instanceName; + this.clusterName = clusterName; + this.softwareVersion = softwareVersion; + } + + /** + * Instance name of ASM + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceName") + private final String instanceName; + + /** + * Instance name of ASM + * @return the value + **/ + public String getInstanceName() { + return instanceName; + } + + /** + * Cluster name of ASM + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterName") + private final String clusterName; + + /** + * Cluster name of ASM + * @return the value + **/ + public String getClusterName() { + return clusterName; + } + + /** + * Software version + **/ + @com.fasterxml.jackson.annotation.JsonProperty("softwareVersion") + private final String softwareVersion; + + /** + * Software version + * @return the value + **/ + public String getSoftwareVersion() { + return softwareVersion; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExadataAsmEntity("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", instanceName=").append(String.valueOf(this.instanceName)); + sb.append(", clusterName=").append(String.valueOf(this.clusterName)); + sb.append(", softwareVersion=").append(String.valueOf(this.softwareVersion)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExadataAsmEntity)) { + return false; + } + + ExadataAsmEntity other = (ExadataAsmEntity) o; + return java.util.Objects.equals(this.instanceName, other.instanceName) + && java.util.Objects.equals(this.clusterName, other.clusterName) + && java.util.Objects.equals(this.softwareVersion, other.softwareVersion) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.instanceName == null ? 43 : this.instanceName.hashCode()); + result = (result * PRIME) + (this.clusterName == null ? 43 : this.clusterName.hashCode()); + result = + (result * PRIME) + + (this.softwareVersion == null ? 43 : this.softwareVersion.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataCellConfig.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataCellConfig.java new file mode 100644 index 00000000000..4876bf45b21 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataCellConfig.java @@ -0,0 +1,313 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Storage server configuration + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExadataCellConfig.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "metricName" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExadataCellConfig extends DatabaseConfigurationMetricGroup { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("timeCollected") + private java.util.Date timeCollected; + + public Builder timeCollected(java.util.Date timeCollected) { + this.timeCollected = timeCollected; + this.__explicitlySet__.add("timeCollected"); + return this; + } + /** + * Cell name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cellName") + private String cellName; + + /** + * Cell name + * @param cellName the value to set + * @return this builder + **/ + public Builder cellName(String cellName) { + this.cellName = cellName; + this.__explicitlySet__.add("cellName"); + return this; + } + /** + * Cell hash + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cellHash") + private String cellHash; + + /** + * Cell hash + * @param cellHash the value to set + * @return this builder + **/ + public Builder cellHash(String cellHash) { + this.cellHash = cellHash; + this.__explicitlySet__.add("cellHash"); + return this; + } + /** + * Cell properties + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cellProperties") + private String cellProperties; + + /** + * Cell properties + * @param cellProperties the value to set + * @return this builder + **/ + public Builder cellProperties(String cellProperties) { + this.cellProperties = cellProperties; + this.__explicitlySet__.add("cellProperties"); + return this; + } + /** + * Cell configs + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cellConfigs") + private String cellConfigs; + + /** + * Cell configs + * @param cellConfigs the value to set + * @return this builder + **/ + public Builder cellConfigs(String cellConfigs) { + this.cellConfigs = cellConfigs; + this.__explicitlySet__.add("cellConfigs"); + return this; + } + /** + * Cell disk counts + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskCounts") + private String diskCounts; + + /** + * Cell disk counts + * @param diskCounts the value to set + * @return this builder + **/ + public Builder diskCounts(String diskCounts) { + this.diskCounts = diskCounts; + this.__explicitlySet__.add("diskCounts"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExadataCellConfig build() { + ExadataCellConfig model = + new ExadataCellConfig( + this.timeCollected, + this.cellName, + this.cellHash, + this.cellProperties, + this.cellConfigs, + this.diskCounts); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExadataCellConfig model) { + if (model.wasPropertyExplicitlySet("timeCollected")) { + this.timeCollected(model.getTimeCollected()); + } + if (model.wasPropertyExplicitlySet("cellName")) { + this.cellName(model.getCellName()); + } + if (model.wasPropertyExplicitlySet("cellHash")) { + this.cellHash(model.getCellHash()); + } + if (model.wasPropertyExplicitlySet("cellProperties")) { + this.cellProperties(model.getCellProperties()); + } + if (model.wasPropertyExplicitlySet("cellConfigs")) { + this.cellConfigs(model.getCellConfigs()); + } + if (model.wasPropertyExplicitlySet("diskCounts")) { + this.diskCounts(model.getDiskCounts()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ExadataCellConfig( + java.util.Date timeCollected, + String cellName, + String cellHash, + String cellProperties, + String cellConfigs, + String diskCounts) { + super(timeCollected); + this.cellName = cellName; + this.cellHash = cellHash; + this.cellProperties = cellProperties; + this.cellConfigs = cellConfigs; + this.diskCounts = diskCounts; + } + + /** + * Cell name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cellName") + private final String cellName; + + /** + * Cell name + * @return the value + **/ + public String getCellName() { + return cellName; + } + + /** + * Cell hash + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cellHash") + private final String cellHash; + + /** + * Cell hash + * @return the value + **/ + public String getCellHash() { + return cellHash; + } + + /** + * Cell properties + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cellProperties") + private final String cellProperties; + + /** + * Cell properties + * @return the value + **/ + public String getCellProperties() { + return cellProperties; + } + + /** + * Cell configs + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cellConfigs") + private final String cellConfigs; + + /** + * Cell configs + * @return the value + **/ + public String getCellConfigs() { + return cellConfigs; + } + + /** + * Cell disk counts + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskCounts") + private final String diskCounts; + + /** + * Cell disk counts + * @return the value + **/ + public String getDiskCounts() { + return diskCounts; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExadataCellConfig("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", cellName=").append(String.valueOf(this.cellName)); + sb.append(", cellHash=").append(String.valueOf(this.cellHash)); + sb.append(", cellProperties=").append(String.valueOf(this.cellProperties)); + sb.append(", cellConfigs=").append(String.valueOf(this.cellConfigs)); + sb.append(", diskCounts=").append(String.valueOf(this.diskCounts)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExadataCellConfig)) { + return false; + } + + ExadataCellConfig other = (ExadataCellConfig) o; + return java.util.Objects.equals(this.cellName, other.cellName) + && java.util.Objects.equals(this.cellHash, other.cellHash) + && java.util.Objects.equals(this.cellProperties, other.cellProperties) + && java.util.Objects.equals(this.cellConfigs, other.cellConfigs) + && java.util.Objects.equals(this.diskCounts, other.diskCounts) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.cellName == null ? 43 : this.cellName.hashCode()); + result = (result * PRIME) + (this.cellHash == null ? 43 : this.cellHash.hashCode()); + result = + (result * PRIME) + + (this.cellProperties == null ? 43 : this.cellProperties.hashCode()); + result = (result * PRIME) + (this.cellConfigs == null ? 43 : this.cellConfigs.hashCode()); + result = (result * PRIME) + (this.diskCounts == null ? 43 : this.diskCounts.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataConfigurationSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataConfigurationSummary.java index 80be0ca838c..4bf3cadb4a1 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataConfigurationSummary.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataConfigurationSummary.java @@ -29,6 +29,10 @@ @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = ExadataExacsConfigurationSummary.class, name = "PE_COMANAGED_EXADATA" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = ExadataExaccConfigurationSummary.class, + name = "MACS_MANAGED_CLOUD_EXADATA" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataDatabaseMachineConfigurationSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataDatabaseMachineConfigurationSummary.java index 3285a3234f4..4fd65f5d213 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataDatabaseMachineConfigurationSummary.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataDatabaseMachineConfigurationSummary.java @@ -140,6 +140,70 @@ public Builder enterpriseManagerBridgeId(String enterpriseManagerBridgeId) { this.__explicitlySet__.add("enterpriseManagerBridgeId"); return this; } + /** + * Enterprise Manager Entity Unique Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerEntityIdentifier") + private String enterpriseManagerEntityIdentifier; + + /** + * Enterprise Manager Entity Unique Identifier + * @param enterpriseManagerEntityIdentifier the value to set + * @return this builder + **/ + public Builder enterpriseManagerEntityIdentifier(String enterpriseManagerEntityIdentifier) { + this.enterpriseManagerEntityIdentifier = enterpriseManagerEntityIdentifier; + this.__explicitlySet__.add("enterpriseManagerEntityIdentifier"); + return this; + } + /** + * Enterprise Manager Console Url + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerConsoleUrl") + private String enterpriseManagerConsoleUrl; + + /** + * Enterprise Manager Console Url + * @param enterpriseManagerConsoleUrl the value to set + * @return this builder + **/ + public Builder enterpriseManagerConsoleUrl(String enterpriseManagerConsoleUrl) { + this.enterpriseManagerConsoleUrl = enterpriseManagerConsoleUrl; + this.__explicitlySet__.add("enterpriseManagerConsoleUrl"); + return this; + } + /** + * Enterprise Manager OMS Version + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerOmsVer") + private String enterpriseManagerOmsVer; + + /** + * Enterprise Manager OMS Version + * @param enterpriseManagerOmsVer the value to set + * @return this builder + **/ + public Builder enterpriseManagerOmsVer(String enterpriseManagerOmsVer) { + this.enterpriseManagerOmsVer = enterpriseManagerOmsVer; + this.__explicitlySet__.add("enterpriseManagerOmsVer"); + return this; + } + /** + * Enterprise Manager Entity Type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerEntityType") + private String enterpriseManagerEntityType; + + /** + * Enterprise Manager Entity Type + * @param enterpriseManagerEntityType the value to set + * @return this builder + **/ + public Builder enterpriseManagerEntityType(String enterpriseManagerEntityType) { + this.enterpriseManagerEntityType = enterpriseManagerEntityType; + this.__explicitlySet__.add("enterpriseManagerEntityType"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -157,7 +221,11 @@ public ExadataDatabaseMachineConfigurationSummary build() { this.freeformTags, this.vmclusterDetails, this.enterpriseManagerIdentifier, - this.enterpriseManagerBridgeId); + this.enterpriseManagerBridgeId, + this.enterpriseManagerEntityIdentifier, + this.enterpriseManagerConsoleUrl, + this.enterpriseManagerOmsVer, + this.enterpriseManagerEntityType); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -199,6 +267,19 @@ public Builder copy(ExadataDatabaseMachineConfigurationSummary model) { if (model.wasPropertyExplicitlySet("enterpriseManagerBridgeId")) { this.enterpriseManagerBridgeId(model.getEnterpriseManagerBridgeId()); } + if (model.wasPropertyExplicitlySet("enterpriseManagerEntityIdentifier")) { + this.enterpriseManagerEntityIdentifier( + model.getEnterpriseManagerEntityIdentifier()); + } + if (model.wasPropertyExplicitlySet("enterpriseManagerConsoleUrl")) { + this.enterpriseManagerConsoleUrl(model.getEnterpriseManagerConsoleUrl()); + } + if (model.wasPropertyExplicitlySet("enterpriseManagerOmsVer")) { + this.enterpriseManagerOmsVer(model.getEnterpriseManagerOmsVer()); + } + if (model.wasPropertyExplicitlySet("enterpriseManagerEntityType")) { + this.enterpriseManagerEntityType(model.getEnterpriseManagerEntityType()); + } return this; } } @@ -226,7 +307,11 @@ public ExadataDatabaseMachineConfigurationSummary( java.util.Map freeformTags, java.util.List vmclusterDetails, String enterpriseManagerIdentifier, - String enterpriseManagerBridgeId) { + String enterpriseManagerBridgeId, + String enterpriseManagerEntityIdentifier, + String enterpriseManagerConsoleUrl, + String enterpriseManagerOmsVer, + String enterpriseManagerEntityType) { super( exadataInsightId, compartmentId, @@ -239,6 +324,10 @@ public ExadataDatabaseMachineConfigurationSummary( vmclusterDetails); this.enterpriseManagerIdentifier = enterpriseManagerIdentifier; this.enterpriseManagerBridgeId = enterpriseManagerBridgeId; + this.enterpriseManagerEntityIdentifier = enterpriseManagerEntityIdentifier; + this.enterpriseManagerConsoleUrl = enterpriseManagerConsoleUrl; + this.enterpriseManagerOmsVer = enterpriseManagerOmsVer; + this.enterpriseManagerEntityType = enterpriseManagerEntityType; } /** @@ -269,6 +358,62 @@ public String getEnterpriseManagerBridgeId() { return enterpriseManagerBridgeId; } + /** + * Enterprise Manager Entity Unique Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerEntityIdentifier") + private final String enterpriseManagerEntityIdentifier; + + /** + * Enterprise Manager Entity Unique Identifier + * @return the value + **/ + public String getEnterpriseManagerEntityIdentifier() { + return enterpriseManagerEntityIdentifier; + } + + /** + * Enterprise Manager Console Url + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerConsoleUrl") + private final String enterpriseManagerConsoleUrl; + + /** + * Enterprise Manager Console Url + * @return the value + **/ + public String getEnterpriseManagerConsoleUrl() { + return enterpriseManagerConsoleUrl; + } + + /** + * Enterprise Manager OMS Version + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerOmsVer") + private final String enterpriseManagerOmsVer; + + /** + * Enterprise Manager OMS Version + * @return the value + **/ + public String getEnterpriseManagerOmsVer() { + return enterpriseManagerOmsVer; + } + + /** + * Enterprise Manager Entity Type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("enterpriseManagerEntityType") + private final String enterpriseManagerEntityType; + + /** + * Enterprise Manager Entity Type + * @return the value + **/ + public String getEnterpriseManagerEntityType() { + return enterpriseManagerEntityType; + } + @Override public String toString() { return this.toString(true); @@ -287,6 +432,14 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.enterpriseManagerIdentifier)); sb.append(", enterpriseManagerBridgeId=") .append(String.valueOf(this.enterpriseManagerBridgeId)); + sb.append(", enterpriseManagerEntityIdentifier=") + .append(String.valueOf(this.enterpriseManagerEntityIdentifier)); + sb.append(", enterpriseManagerConsoleUrl=") + .append(String.valueOf(this.enterpriseManagerConsoleUrl)); + sb.append(", enterpriseManagerOmsVer=") + .append(String.valueOf(this.enterpriseManagerOmsVer)); + sb.append(", enterpriseManagerEntityType=") + .append(String.valueOf(this.enterpriseManagerEntityType)); sb.append(")"); return sb.toString(); } @@ -306,6 +459,15 @@ public boolean equals(Object o) { this.enterpriseManagerIdentifier, other.enterpriseManagerIdentifier) && java.util.Objects.equals( this.enterpriseManagerBridgeId, other.enterpriseManagerBridgeId) + && java.util.Objects.equals( + this.enterpriseManagerEntityIdentifier, + other.enterpriseManagerEntityIdentifier) + && java.util.Objects.equals( + this.enterpriseManagerConsoleUrl, other.enterpriseManagerConsoleUrl) + && java.util.Objects.equals( + this.enterpriseManagerOmsVer, other.enterpriseManagerOmsVer) + && java.util.Objects.equals( + this.enterpriseManagerEntityType, other.enterpriseManagerEntityType) && super.equals(other); } @@ -323,6 +485,26 @@ public int hashCode() { + (this.enterpriseManagerBridgeId == null ? 43 : this.enterpriseManagerBridgeId.hashCode()); + result = + (result * PRIME) + + (this.enterpriseManagerEntityIdentifier == null + ? 43 + : this.enterpriseManagerEntityIdentifier.hashCode()); + result = + (result * PRIME) + + (this.enterpriseManagerConsoleUrl == null + ? 43 + : this.enterpriseManagerConsoleUrl.hashCode()); + result = + (result * PRIME) + + (this.enterpriseManagerOmsVer == null + ? 43 + : this.enterpriseManagerOmsVer.hashCode()); + result = + (result * PRIME) + + (this.enterpriseManagerEntityType == null + ? 43 + : this.enterpriseManagerEntityType.hashCode()); return result; } } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataEntitySource.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataEntitySource.java index 6f555ed5fb6..f68e63e84f3 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataEntitySource.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataEntitySource.java @@ -11,6 +11,7 @@ public enum ExadataEntitySource { EmManagedExternalExadata("EM_MANAGED_EXTERNAL_EXADATA"), PeComanagedExadata("PE_COMANAGED_EXADATA"), + MacsManagedCloudExadata("MACS_MANAGED_CLOUD_EXADATA"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataExaccConfigurationSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataExaccConfigurationSummary.java new file mode 100644 index 00000000000..1be1799049f --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataExaccConfigurationSummary.java @@ -0,0 +1,317 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Configuration summary of a macs managed Exacc exadata machine. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ExadataExaccConfigurationSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ExadataExaccConfigurationSummary extends ExadataConfigurationSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("exadataInsightId") + private String exadataInsightId; + + public Builder exadataInsightId(String exadataInsightId) { + this.exadataInsightId = exadataInsightId; + this.__explicitlySet__.add("exadataInsightId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("exadataName") + private String exadataName; + + public Builder exadataName(String exadataName) { + this.exadataName = exadataName; + this.__explicitlySet__.add("exadataName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("exadataDisplayName") + private String exadataDisplayName; + + public Builder exadataDisplayName(String exadataDisplayName) { + this.exadataDisplayName = exadataDisplayName; + this.__explicitlySet__.add("exadataDisplayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("exadataType") + private ExadataType exadataType; + + public Builder exadataType(ExadataType exadataType) { + this.exadataType = exadataType; + this.__explicitlySet__.add("exadataType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("exadataRackType") + private ExadataRackType exadataRackType; + + public Builder exadataRackType(ExadataRackType exadataRackType) { + this.exadataRackType = exadataRackType; + this.__explicitlySet__.add("exadataRackType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vmclusterDetails") + private java.util.List vmclusterDetails; + + public Builder vmclusterDetails(java.util.List vmclusterDetails) { + this.vmclusterDetails = vmclusterDetails; + this.__explicitlySet__.add("vmclusterDetails"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @param managementAgentId the value to set + * @return this builder + **/ + public Builder managementAgentId(String managementAgentId) { + this.managementAgentId = managementAgentId; + this.__explicitlySet__.add("managementAgentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentId") + private String parentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + * @param parentId the value to set + * @return this builder + **/ + public Builder parentId(String parentId) { + this.parentId = parentId; + this.__explicitlySet__.add("parentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ExadataExaccConfigurationSummary build() { + ExadataExaccConfigurationSummary model = + new ExadataExaccConfigurationSummary( + this.exadataInsightId, + this.compartmentId, + this.exadataName, + this.exadataDisplayName, + this.exadataType, + this.exadataRackType, + this.definedTags, + this.freeformTags, + this.vmclusterDetails, + this.managementAgentId, + this.parentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ExadataExaccConfigurationSummary model) { + if (model.wasPropertyExplicitlySet("exadataInsightId")) { + this.exadataInsightId(model.getExadataInsightId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("exadataName")) { + this.exadataName(model.getExadataName()); + } + if (model.wasPropertyExplicitlySet("exadataDisplayName")) { + this.exadataDisplayName(model.getExadataDisplayName()); + } + if (model.wasPropertyExplicitlySet("exadataType")) { + this.exadataType(model.getExadataType()); + } + if (model.wasPropertyExplicitlySet("exadataRackType")) { + this.exadataRackType(model.getExadataRackType()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("vmclusterDetails")) { + this.vmclusterDetails(model.getVmclusterDetails()); + } + if (model.wasPropertyExplicitlySet("managementAgentId")) { + this.managementAgentId(model.getManagementAgentId()); + } + if (model.wasPropertyExplicitlySet("parentId")) { + this.parentId(model.getParentId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public ExadataExaccConfigurationSummary( + String exadataInsightId, + String compartmentId, + String exadataName, + String exadataDisplayName, + ExadataType exadataType, + ExadataRackType exadataRackType, + java.util.Map> definedTags, + java.util.Map freeformTags, + java.util.List vmclusterDetails, + String managementAgentId, + String parentId) { + super( + exadataInsightId, + compartmentId, + exadataName, + exadataDisplayName, + exadataType, + exadataRackType, + definedTags, + freeformTags, + vmclusterDetails); + this.managementAgentId = managementAgentId; + this.parentId = parentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private final String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @return the value + **/ + public String getManagementAgentId() { + return managementAgentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentId") + private final String parentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + * @return the value + **/ + public String getParentId() { + return parentId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ExadataExaccConfigurationSummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", managementAgentId=").append(String.valueOf(this.managementAgentId)); + sb.append(", parentId=").append(String.valueOf(this.parentId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ExadataExaccConfigurationSummary)) { + return false; + } + + ExadataExaccConfigurationSummary other = (ExadataExaccConfigurationSummary) o; + return java.util.Objects.equals(this.managementAgentId, other.managementAgentId) + && java.util.Objects.equals(this.parentId, other.parentId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.managementAgentId == null ? 43 : this.managementAgentId.hashCode()); + result = (result * PRIME) + (this.parentId == null ? 43 : this.parentId.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataInsight.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataInsight.java index ab66922970a..7a9e70799c2 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataInsight.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataInsight.java @@ -29,6 +29,10 @@ @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = PeComanagedExadataInsight.class, name = "PE_COMANAGED_EXADATA" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = MacsManagedCloudExadataInsight.class, + name = "MACS_MANAGED_CLOUD_EXADATA" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataInsightSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataInsightSummary.java index dc5c75935bc..5957857e6a1 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataInsightSummary.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataInsightSummary.java @@ -22,6 +22,10 @@ defaultImpl = ExadataInsightSummary.class ) @com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = MacsManagedCloudExadataInsightSummary.class, + name = "MACS_MANAGED_CLOUD_EXADATA" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = EmManagedExternalExadataInsightSummary.class, name = "EM_MANAGED_EXTERNAL_EXADATA" diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataRackType.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataRackType.java index 34102003ac1..3e240ad2267 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataRackType.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataRackType.java @@ -14,6 +14,10 @@ public enum ExadataRackType { Quarter("QUARTER"), Eighth("EIGHTH"), Flex("FLEX"), + Base("BASE"), + Elastic("ELASTIC"), + ElasticBase("ELASTIC_BASE"), + ElasticLarge("ELASTIC_LARGE"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataResourceType.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataResourceType.java index 9bfdbc63268..cf05b1b2efb 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataResourceType.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataResourceType.java @@ -10,6 +10,7 @@ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") public enum ExadataResourceType { CloudExadataInfrastructure("cloudExadataInfrastructure"), + ExadataInfrastructure("exadataInfrastructure"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataVmClusterType.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataVmClusterType.java new file mode 100644 index 00000000000..375461439f7 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ExadataVmClusterType.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * OCI Exadata VM Cluster Type + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +public enum ExadataVmClusterType { + VmCluster("vmCluster"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ExadataVmClusterType v : ExadataVmClusterType.values()) { + map.put(v.getValue(), v); + } + } + + ExadataVmClusterType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ExadataVmClusterType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid ExadataVmClusterType: " + key); + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostAllocation.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostAllocation.java new file mode 100644 index 00000000000..e5e0b200674 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostAllocation.java @@ -0,0 +1,188 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Resource Allocation metric for the host + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = HostAllocation.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "metricName" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class HostAllocation extends DatabaseConfigurationMetricGroup { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("timeCollected") + private java.util.Date timeCollected; + + public Builder timeCollected(java.util.Date timeCollected) { + this.timeCollected = timeCollected; + this.__explicitlySet__.add("timeCollected"); + return this; + } + /** + * Name of the host resource + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceName") + private String resourceName; + + /** + * Name of the host resource + * @param resourceName the value to set + * @return this builder + **/ + public Builder resourceName(String resourceName) { + this.resourceName = resourceName; + this.__explicitlySet__.add("resourceName"); + return this; + } + /** + * Value of the host resource + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceValue") + private Long resourceValue; + + /** + * Value of the host resource + * @param resourceValue the value to set + * @return this builder + **/ + public Builder resourceValue(Long resourceValue) { + this.resourceValue = resourceValue; + this.__explicitlySet__.add("resourceValue"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public HostAllocation build() { + HostAllocation model = + new HostAllocation(this.timeCollected, this.resourceName, this.resourceValue); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(HostAllocation model) { + if (model.wasPropertyExplicitlySet("timeCollected")) { + this.timeCollected(model.getTimeCollected()); + } + if (model.wasPropertyExplicitlySet("resourceName")) { + this.resourceName(model.getResourceName()); + } + if (model.wasPropertyExplicitlySet("resourceValue")) { + this.resourceValue(model.getResourceValue()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public HostAllocation(java.util.Date timeCollected, String resourceName, Long resourceValue) { + super(timeCollected); + this.resourceName = resourceName; + this.resourceValue = resourceValue; + } + + /** + * Name of the host resource + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceName") + private final String resourceName; + + /** + * Name of the host resource + * @return the value + **/ + public String getResourceName() { + return resourceName; + } + + /** + * Value of the host resource + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceValue") + private final Long resourceValue; + + /** + * Value of the host resource + * @return the value + **/ + public Long getResourceValue() { + return resourceValue; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("HostAllocation("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", resourceName=").append(String.valueOf(this.resourceName)); + sb.append(", resourceValue=").append(String.valueOf(this.resourceValue)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof HostAllocation)) { + return false; + } + + HostAllocation other = (HostAllocation) o; + return java.util.Objects.equals(this.resourceName, other.resourceName) + && java.util.Objects.equals(this.resourceValue, other.resourceValue) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.resourceName == null ? 43 : this.resourceName.hashCode()); + result = + (result * PRIME) + + (this.resourceValue == null ? 43 : this.resourceValue.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostConfigurationMetricGroup.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostConfigurationMetricGroup.java index 3d5e2df02d8..1fd63bb070b 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostConfigurationMetricGroup.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostConfigurationMetricGroup.java @@ -35,6 +35,10 @@ value = HostFilesystemConfiguration.class, name = "HOST_FILESYSTEM_CONFIGURATION" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = HostContainers.class, + name = "HOST_CONTAINERS" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = HostNetworkConfiguration.class, name = "HOST_NETWORK_CONFIGURATION" @@ -51,6 +55,10 @@ value = HostCpuHardwareConfiguration.class, name = "HOST_CPU_HARDWARE_CONFIGURATION" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = HostGpuConfiguration.class, + name = "HOST_GPU_CONFIGURATION" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = HostHardwareConfiguration.class, name = "HOST_HARDWARE_CONFIGURATION" @@ -141,6 +149,8 @@ public enum MetricName { HostNetworkConfiguration("HOST_NETWORK_CONFIGURATION"), HostEntites("HOST_ENTITES"), HostFilesystemConfiguration("HOST_FILESYSTEM_CONFIGURATION"), + HostGpuConfiguration("HOST_GPU_CONFIGURATION"), + HostContainers("HOST_CONTAINERS"), ; private final String value; diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostConfigurationSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostConfigurationSummary.java index 46752d6aca2..156cb657c51 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostConfigurationSummary.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostConfigurationSummary.java @@ -30,6 +30,10 @@ value = PeComanagedHostConfigurationSummary.class, name = "PE_COMANAGED_HOST" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = MacsManagedCloudDbHostConfigurationSummary.class, + name = "MACS_MANAGED_CLOUD_DB_HOST" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = EmManagedExternalHostConfigurationSummary.class, name = "EM_MANAGED_EXTERNAL_HOST" diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostContainers.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostContainers.java new file mode 100644 index 00000000000..b878b5033f5 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostContainers.java @@ -0,0 +1,360 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Host Containers details + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = HostContainers.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "metricName" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class HostContainers extends HostConfigurationMetricGroup { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("timeCollected") + private java.util.Date timeCollected; + + public Builder timeCollected(java.util.Date timeCollected) { + this.timeCollected = timeCollected; + this.__explicitlySet__.add("timeCollected"); + return this; + } + /** + * Container Id (full) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerId") + private String containerId; + + /** + * Container Id (full) + * @param containerId the value to set + * @return this builder + **/ + public Builder containerId(String containerId) { + this.containerId = containerId; + this.__explicitlySet__.add("containerId"); + return this; + } + /** + * Container Name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerName") + private String containerName; + + /** + * Container Name + * @param containerName the value to set + * @return this builder + **/ + public Builder containerName(String containerName) { + this.containerName = containerName; + this.__explicitlySet__.add("containerName"); + return this; + } + /** + * Container Image + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerImage") + private String containerImage; + + /** + * Container Image + * @param containerImage the value to set + * @return this builder + **/ + public Builder containerImage(String containerImage) { + this.containerImage = containerImage; + this.__explicitlySet__.add("containerImage"); + return this; + } + /** + * Container Image Tag (version) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerImageTag") + private String containerImageTag; + + /** + * Container Image Tag (version) + * @param containerImageTag the value to set + * @return this builder + **/ + public Builder containerImageTag(String containerImageTag) { + this.containerImageTag = containerImageTag; + this.__explicitlySet__.add("containerImageTag"); + return this; + } + /** + * Container Image Digest + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerImageDigest") + private String containerImageDigest; + + /** + * Container Image Digest + * @param containerImageDigest the value to set + * @return this builder + **/ + public Builder containerImageDigest(String containerImageDigest) { + this.containerImageDigest = containerImageDigest; + this.__explicitlySet__.add("containerImageDigest"); + return this; + } + /** + * Container open ports + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerPorts") + private String containerPorts; + + /** + * Container open ports + * @param containerPorts the value to set + * @return this builder + **/ + public Builder containerPorts(String containerPorts) { + this.containerPorts = containerPorts; + this.__explicitlySet__.add("containerPorts"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public HostContainers build() { + HostContainers model = + new HostContainers( + this.timeCollected, + this.containerId, + this.containerName, + this.containerImage, + this.containerImageTag, + this.containerImageDigest, + this.containerPorts); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(HostContainers model) { + if (model.wasPropertyExplicitlySet("timeCollected")) { + this.timeCollected(model.getTimeCollected()); + } + if (model.wasPropertyExplicitlySet("containerId")) { + this.containerId(model.getContainerId()); + } + if (model.wasPropertyExplicitlySet("containerName")) { + this.containerName(model.getContainerName()); + } + if (model.wasPropertyExplicitlySet("containerImage")) { + this.containerImage(model.getContainerImage()); + } + if (model.wasPropertyExplicitlySet("containerImageTag")) { + this.containerImageTag(model.getContainerImageTag()); + } + if (model.wasPropertyExplicitlySet("containerImageDigest")) { + this.containerImageDigest(model.getContainerImageDigest()); + } + if (model.wasPropertyExplicitlySet("containerPorts")) { + this.containerPorts(model.getContainerPorts()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public HostContainers( + java.util.Date timeCollected, + String containerId, + String containerName, + String containerImage, + String containerImageTag, + String containerImageDigest, + String containerPorts) { + super(timeCollected); + this.containerId = containerId; + this.containerName = containerName; + this.containerImage = containerImage; + this.containerImageTag = containerImageTag; + this.containerImageDigest = containerImageDigest; + this.containerPorts = containerPorts; + } + + /** + * Container Id (full) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerId") + private final String containerId; + + /** + * Container Id (full) + * @return the value + **/ + public String getContainerId() { + return containerId; + } + + /** + * Container Name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerName") + private final String containerName; + + /** + * Container Name + * @return the value + **/ + public String getContainerName() { + return containerName; + } + + /** + * Container Image + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerImage") + private final String containerImage; + + /** + * Container Image + * @return the value + **/ + public String getContainerImage() { + return containerImage; + } + + /** + * Container Image Tag (version) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerImageTag") + private final String containerImageTag; + + /** + * Container Image Tag (version) + * @return the value + **/ + public String getContainerImageTag() { + return containerImageTag; + } + + /** + * Container Image Digest + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerImageDigest") + private final String containerImageDigest; + + /** + * Container Image Digest + * @return the value + **/ + public String getContainerImageDigest() { + return containerImageDigest; + } + + /** + * Container open ports + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerPorts") + private final String containerPorts; + + /** + * Container open ports + * @return the value + **/ + public String getContainerPorts() { + return containerPorts; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("HostContainers("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", containerId=").append(String.valueOf(this.containerId)); + sb.append(", containerName=").append(String.valueOf(this.containerName)); + sb.append(", containerImage=").append(String.valueOf(this.containerImage)); + sb.append(", containerImageTag=").append(String.valueOf(this.containerImageTag)); + sb.append(", containerImageDigest=").append(String.valueOf(this.containerImageDigest)); + sb.append(", containerPorts=").append(String.valueOf(this.containerPorts)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof HostContainers)) { + return false; + } + + HostContainers other = (HostContainers) o; + return java.util.Objects.equals(this.containerId, other.containerId) + && java.util.Objects.equals(this.containerName, other.containerName) + && java.util.Objects.equals(this.containerImage, other.containerImage) + && java.util.Objects.equals(this.containerImageTag, other.containerImageTag) + && java.util.Objects.equals(this.containerImageDigest, other.containerImageDigest) + && java.util.Objects.equals(this.containerPorts, other.containerPorts) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.containerId == null ? 43 : this.containerId.hashCode()); + result = + (result * PRIME) + + (this.containerName == null ? 43 : this.containerName.hashCode()); + result = + (result * PRIME) + + (this.containerImage == null ? 43 : this.containerImage.hashCode()); + result = + (result * PRIME) + + (this.containerImageTag == null ? 43 : this.containerImageTag.hashCode()); + result = + (result * PRIME) + + (this.containerImageDigest == null + ? 43 + : this.containerImageDigest.hashCode()); + result = + (result * PRIME) + + (this.containerPorts == null ? 43 : this.containerPorts.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostCpuRecommendations.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostCpuRecommendations.java index 1f3594c2cd8..c677c92513d 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostCpuRecommendations.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostCpuRecommendations.java @@ -29,13 +29,13 @@ public final class HostCpuRecommendations extends HostInsightHostRecommendations @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * Show if OPSI recommend to convert an instance to a burstable instance and show recommended cpu baseline if positive recommendation. + * Show if OPSI recommends to convert an instance to a burstable instance and show recommended cpu baseline if positive recommendation. **/ @com.fasterxml.jackson.annotation.JsonProperty("burstable") private Burstable burstable; /** - * Show if OPSI recommend to convert an instance to a burstable instance and show recommended cpu baseline if positive recommendation. + * Show if OPSI recommends to convert an instance to a burstable instance and show recommended cpu baseline if positive recommendation. * @param burstable the value to set * @return this builder **/ @@ -44,12 +44,65 @@ public Builder burstable(Burstable burstable) { this.__explicitlySet__.add("burstable"); return this; } + /** + * Show if OPSI recommends to change the shape of an instance and show recommended shape based on CPU utilization. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private String shape; + + /** + * Show if OPSI recommends to change the shape of an instance and show recommended shape based on CPU utilization. + * @param shape the value to set + * @return this builder + **/ + public Builder shape(String shape) { + this.shape = shape; + this.__explicitlySet__.add("shape"); + return this; + } + /** + * Identify unused instances based on cpu, memory and network metrics. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("unusedInstance") + private UnusedInstance unusedInstance; + + /** + * Identify unused instances based on cpu, memory and network metrics. + * @param unusedInstance the value to set + * @return this builder + **/ + public Builder unusedInstance(UnusedInstance unusedInstance) { + this.unusedInstance = unusedInstance; + this.__explicitlySet__.add("unusedInstance"); + return this; + } + /** + * Identify if an instance is abandoned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAbandonedInstance") + private Boolean isAbandonedInstance; + + /** + * Identify if an instance is abandoned. + * @param isAbandonedInstance the value to set + * @return this builder + **/ + public Builder isAbandonedInstance(Boolean isAbandonedInstance) { + this.isAbandonedInstance = isAbandonedInstance; + this.__explicitlySet__.add("isAbandonedInstance"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public HostCpuRecommendations build() { - HostCpuRecommendations model = new HostCpuRecommendations(this.burstable); + HostCpuRecommendations model = + new HostCpuRecommendations( + this.burstable, + this.shape, + this.unusedInstance, + this.isAbandonedInstance); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -61,6 +114,15 @@ public Builder copy(HostCpuRecommendations model) { if (model.wasPropertyExplicitlySet("burstable")) { this.burstable(model.getBurstable()); } + if (model.wasPropertyExplicitlySet("shape")) { + this.shape(model.getShape()); + } + if (model.wasPropertyExplicitlySet("unusedInstance")) { + this.unusedInstance(model.getUnusedInstance()); + } + if (model.wasPropertyExplicitlySet("isAbandonedInstance")) { + this.isAbandonedInstance(model.getIsAbandonedInstance()); + } return this; } } @@ -77,13 +139,20 @@ public Builder toBuilder() { } @Deprecated - public HostCpuRecommendations(Burstable burstable) { + public HostCpuRecommendations( + Burstable burstable, + String shape, + UnusedInstance unusedInstance, + Boolean isAbandonedInstance) { super(); this.burstable = burstable; + this.shape = shape; + this.unusedInstance = unusedInstance; + this.isAbandonedInstance = isAbandonedInstance; } /** - * Show if OPSI recommend to convert an instance to a burstable instance and show recommended cpu baseline if positive recommendation. + * Show if OPSI recommends to convert an instance to a burstable instance and show recommended cpu baseline if positive recommendation. **/ public enum Burstable { Baseline18("BASELINE_1_8"), @@ -133,19 +202,110 @@ public static Burstable create(String key) { } }; /** - * Show if OPSI recommend to convert an instance to a burstable instance and show recommended cpu baseline if positive recommendation. + * Show if OPSI recommends to convert an instance to a burstable instance and show recommended cpu baseline if positive recommendation. **/ @com.fasterxml.jackson.annotation.JsonProperty("burstable") private final Burstable burstable; /** - * Show if OPSI recommend to convert an instance to a burstable instance and show recommended cpu baseline if positive recommendation. + * Show if OPSI recommends to convert an instance to a burstable instance and show recommended cpu baseline if positive recommendation. * @return the value **/ public Burstable getBurstable() { return burstable; } + /** + * Show if OPSI recommends to change the shape of an instance and show recommended shape based on CPU utilization. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private final String shape; + + /** + * Show if OPSI recommends to change the shape of an instance and show recommended shape based on CPU utilization. + * @return the value + **/ + public String getShape() { + return shape; + } + + /** + * Identify unused instances based on cpu, memory and network metrics. + **/ + public enum UnusedInstance { + InUse("IN_USE"), + NotInUse("NOT_IN_USE"), + IsNotDetermined("IS_NOT_DETERMINED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UnusedInstance.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (UnusedInstance v : UnusedInstance.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + UnusedInstance(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static UnusedInstance create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'UnusedInstance', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Identify unused instances based on cpu, memory and network metrics. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("unusedInstance") + private final UnusedInstance unusedInstance; + + /** + * Identify unused instances based on cpu, memory and network metrics. + * @return the value + **/ + public UnusedInstance getUnusedInstance() { + return unusedInstance; + } + + /** + * Identify if an instance is abandoned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAbandonedInstance") + private final Boolean isAbandonedInstance; + + /** + * Identify if an instance is abandoned. + * @return the value + **/ + public Boolean getIsAbandonedInstance() { + return isAbandonedInstance; + } + @Override public String toString() { return this.toString(true); @@ -161,6 +321,9 @@ public String toString(boolean includeByteArrayContents) { sb.append("HostCpuRecommendations("); sb.append("super=").append(super.toString(includeByteArrayContents)); sb.append(", burstable=").append(String.valueOf(this.burstable)); + sb.append(", shape=").append(String.valueOf(this.shape)); + sb.append(", unusedInstance=").append(String.valueOf(this.unusedInstance)); + sb.append(", isAbandonedInstance=").append(String.valueOf(this.isAbandonedInstance)); sb.append(")"); return sb.toString(); } @@ -175,7 +338,11 @@ public boolean equals(Object o) { } HostCpuRecommendations other = (HostCpuRecommendations) o; - return java.util.Objects.equals(this.burstable, other.burstable) && super.equals(other); + return java.util.Objects.equals(this.burstable, other.burstable) + && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.unusedInstance, other.unusedInstance) + && java.util.Objects.equals(this.isAbandonedInstance, other.isAbandonedInstance) + && super.equals(other); } @Override @@ -183,6 +350,15 @@ public int hashCode() { final int PRIME = 59; int result = super.hashCode(); result = (result * PRIME) + (this.burstable == null ? 43 : this.burstable.hashCode()); + result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); + result = + (result * PRIME) + + (this.unusedInstance == null ? 43 : this.unusedInstance.hashCode()); + result = + (result * PRIME) + + (this.isAbandonedInstance == null + ? 43 + : this.isAbandonedInstance.hashCode()); return result; } } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostEntitySource.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostEntitySource.java index 6e320a018bf..3084b9a17bd 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostEntitySource.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostEntitySource.java @@ -13,6 +13,7 @@ public enum HostEntitySource { EmManagedExternalHost("EM_MANAGED_EXTERNAL_HOST"), MacsManagedCloudHost("MACS_MANAGED_CLOUD_HOST"), PeComanagedHost("PE_COMANAGED_HOST"), + MacsManagedCloudDbHost("MACS_MANAGED_CLOUD_DB_HOST"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostFilesystemUsage.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostFilesystemUsage.java index e3ce6029b7b..1e5a280c5fd 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostFilesystemUsage.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostFilesystemUsage.java @@ -71,6 +71,15 @@ public Builder fileSystemAvailInPercent(Double fileSystemAvailInPercent) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("fileSystemAvailInGBs") + private Double fileSystemAvailInGBs; + + public Builder fileSystemAvailInGBs(Double fileSystemAvailInGBs) { + this.fileSystemAvailInGBs = fileSystemAvailInGBs; + this.__explicitlySet__.add("fileSystemAvailInGBs"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -80,7 +89,8 @@ public HostFilesystemUsage build() { this.timeCollected, this.mountPoint, this.fileSystemUsageInGB, - this.fileSystemAvailInPercent); + this.fileSystemAvailInPercent, + this.fileSystemAvailInGBs); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -101,6 +111,9 @@ public Builder copy(HostFilesystemUsage model) { if (model.wasPropertyExplicitlySet("fileSystemAvailInPercent")) { this.fileSystemAvailInPercent(model.getFileSystemAvailInPercent()); } + if (model.wasPropertyExplicitlySet("fileSystemAvailInGBs")) { + this.fileSystemAvailInGBs(model.getFileSystemAvailInGBs()); + } return this; } } @@ -121,11 +134,13 @@ public HostFilesystemUsage( java.util.Date timeCollected, String mountPoint, Double fileSystemUsageInGB, - Double fileSystemAvailInPercent) { + Double fileSystemAvailInPercent, + Double fileSystemAvailInGBs) { super(timeCollected); this.mountPoint = mountPoint; this.fileSystemUsageInGB = fileSystemUsageInGB; this.fileSystemAvailInPercent = fileSystemAvailInPercent; + this.fileSystemAvailInGBs = fileSystemAvailInGBs; } /** @@ -156,6 +171,13 @@ public Double getFileSystemAvailInPercent() { return fileSystemAvailInPercent; } + @com.fasterxml.jackson.annotation.JsonProperty("fileSystemAvailInGBs") + private final Double fileSystemAvailInGBs; + + public Double getFileSystemAvailInGBs() { + return fileSystemAvailInGBs; + } + @Override public String toString() { return this.toString(true); @@ -174,6 +196,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", fileSystemUsageInGB=").append(String.valueOf(this.fileSystemUsageInGB)); sb.append(", fileSystemAvailInPercent=") .append(String.valueOf(this.fileSystemAvailInPercent)); + sb.append(", fileSystemAvailInGBs=").append(String.valueOf(this.fileSystemAvailInGBs)); sb.append(")"); return sb.toString(); } @@ -192,6 +215,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.fileSystemUsageInGB, other.fileSystemUsageInGB) && java.util.Objects.equals( this.fileSystemAvailInPercent, other.fileSystemAvailInPercent) + && java.util.Objects.equals(this.fileSystemAvailInGBs, other.fileSystemAvailInGBs) && super.equals(other); } @@ -210,6 +234,11 @@ public int hashCode() { + (this.fileSystemAvailInPercent == null ? 43 : this.fileSystemAvailInPercent.hashCode()); + result = + (result * PRIME) + + (this.fileSystemAvailInGBs == null + ? 43 + : this.fileSystemAvailInGBs.hashCode()); return result; } } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostGpuConfiguration.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostGpuConfiguration.java new file mode 100644 index 00000000000..36b21604007 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostGpuConfiguration.java @@ -0,0 +1,682 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * GPU configuration metrics + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = HostGpuConfiguration.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "metricName" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class HostGpuConfiguration extends HostConfigurationMetricGroup { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("timeCollected") + private java.util.Date timeCollected; + + public Builder timeCollected(java.util.Date timeCollected) { + this.timeCollected = timeCollected; + this.__explicitlySet__.add("timeCollected"); + return this; + } + /** + * GPU Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gpuId") + private Integer gpuId; + + /** + * GPU Identifier + * @param gpuId the value to set + * @return this builder + **/ + public Builder gpuId(Integer gpuId) { + this.gpuId = gpuId; + this.__explicitlySet__.add("gpuId"); + return this; + } + /** + * GPU Product Name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productName") + private String productName; + + /** + * GPU Product Name + * @param productName the value to set + * @return this builder + **/ + public Builder productName(String productName) { + this.productName = productName; + this.__explicitlySet__.add("productName"); + return this; + } + /** + * GPU Vendor + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vendor") + private String vendor; + + /** + * GPU Vendor + * @param vendor the value to set + * @return this builder + **/ + public Builder vendor(String vendor) { + this.vendor = vendor; + this.__explicitlySet__.add("vendor"); + return this; + } + /** + * Bus Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("busId") + private String busId; + + /** + * Bus Identifier + * @param busId the value to set + * @return this builder + **/ + public Builder busId(String busId) { + this.busId = busId; + this.__explicitlySet__.add("busId"); + return this; + } + /** + * Bus Width + **/ + @com.fasterxml.jackson.annotation.JsonProperty("busWidth") + private Integer busWidth; + + /** + * Bus Width + * @param busWidth the value to set + * @return this builder + **/ + public Builder busWidth(Integer busWidth) { + this.busWidth = busWidth; + this.__explicitlySet__.add("busWidth"); + return this; + } + /** + * GPU Capabilities + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gpuCapabilities") + private String gpuCapabilities; + + /** + * GPU Capabilities + * @param gpuCapabilities the value to set + * @return this builder + **/ + public Builder gpuCapabilities(String gpuCapabilities) { + this.gpuCapabilities = gpuCapabilities; + this.__explicitlySet__.add("gpuCapabilities"); + return this; + } + /** + * Power Capacity + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalPower") + private Double totalPower; + + /** + * Power Capacity + * @param totalPower the value to set + * @return this builder + **/ + public Builder totalPower(Double totalPower) { + this.totalPower = totalPower; + this.__explicitlySet__.add("totalPower"); + return this; + } + /** + * Total Memory Allocated to GPU + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalMemory") + private Double totalMemory; + + /** + * Total Memory Allocated to GPU + * @param totalMemory the value to set + * @return this builder + **/ + public Builder totalMemory(Double totalMemory) { + this.totalMemory = totalMemory; + this.__explicitlySet__.add("totalMemory"); + return this; + } + /** + * Max Video Clock Speed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalVideoClockSpeed") + private Double totalVideoClockSpeed; + + /** + * Max Video Clock Speed + * @param totalVideoClockSpeed the value to set + * @return this builder + **/ + public Builder totalVideoClockSpeed(Double totalVideoClockSpeed) { + this.totalVideoClockSpeed = totalVideoClockSpeed; + this.__explicitlySet__.add("totalVideoClockSpeed"); + return this; + } + /** + * Max SM (Streaming Multiprocessor) Clock Speed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalSmClockSpeed") + private Double totalSmClockSpeed; + + /** + * Max SM (Streaming Multiprocessor) Clock Speed + * @param totalSmClockSpeed the value to set + * @return this builder + **/ + public Builder totalSmClockSpeed(Double totalSmClockSpeed) { + this.totalSmClockSpeed = totalSmClockSpeed; + this.__explicitlySet__.add("totalSmClockSpeed"); + return this; + } + /** + * Max Graphics Clock Speed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalGraphicsClockSpeed") + private Double totalGraphicsClockSpeed; + + /** + * Max Graphics Clock Speed + * @param totalGraphicsClockSpeed the value to set + * @return this builder + **/ + public Builder totalGraphicsClockSpeed(Double totalGraphicsClockSpeed) { + this.totalGraphicsClockSpeed = totalGraphicsClockSpeed; + this.__explicitlySet__.add("totalGraphicsClockSpeed"); + return this; + } + /** + * Max Memory Clock Speed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalMemoryClockSpeed") + private Double totalMemoryClockSpeed; + + /** + * Max Memory Clock Speed + * @param totalMemoryClockSpeed the value to set + * @return this builder + **/ + public Builder totalMemoryClockSpeed(Double totalMemoryClockSpeed) { + this.totalMemoryClockSpeed = totalMemoryClockSpeed; + this.__explicitlySet__.add("totalMemoryClockSpeed"); + return this; + } + /** + * CUDA library version + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cudaVersion") + private String cudaVersion; + + /** + * CUDA library version + * @param cudaVersion the value to set + * @return this builder + **/ + public Builder cudaVersion(String cudaVersion) { + this.cudaVersion = cudaVersion; + this.__explicitlySet__.add("cudaVersion"); + return this; + } + /** + * GPU Driver version + **/ + @com.fasterxml.jackson.annotation.JsonProperty("driverVersion") + private String driverVersion; + + /** + * GPU Driver version + * @param driverVersion the value to set + * @return this builder + **/ + public Builder driverVersion(String driverVersion) { + this.driverVersion = driverVersion; + this.__explicitlySet__.add("driverVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public HostGpuConfiguration build() { + HostGpuConfiguration model = + new HostGpuConfiguration( + this.timeCollected, + this.gpuId, + this.productName, + this.vendor, + this.busId, + this.busWidth, + this.gpuCapabilities, + this.totalPower, + this.totalMemory, + this.totalVideoClockSpeed, + this.totalSmClockSpeed, + this.totalGraphicsClockSpeed, + this.totalMemoryClockSpeed, + this.cudaVersion, + this.driverVersion); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(HostGpuConfiguration model) { + if (model.wasPropertyExplicitlySet("timeCollected")) { + this.timeCollected(model.getTimeCollected()); + } + if (model.wasPropertyExplicitlySet("gpuId")) { + this.gpuId(model.getGpuId()); + } + if (model.wasPropertyExplicitlySet("productName")) { + this.productName(model.getProductName()); + } + if (model.wasPropertyExplicitlySet("vendor")) { + this.vendor(model.getVendor()); + } + if (model.wasPropertyExplicitlySet("busId")) { + this.busId(model.getBusId()); + } + if (model.wasPropertyExplicitlySet("busWidth")) { + this.busWidth(model.getBusWidth()); + } + if (model.wasPropertyExplicitlySet("gpuCapabilities")) { + this.gpuCapabilities(model.getGpuCapabilities()); + } + if (model.wasPropertyExplicitlySet("totalPower")) { + this.totalPower(model.getTotalPower()); + } + if (model.wasPropertyExplicitlySet("totalMemory")) { + this.totalMemory(model.getTotalMemory()); + } + if (model.wasPropertyExplicitlySet("totalVideoClockSpeed")) { + this.totalVideoClockSpeed(model.getTotalVideoClockSpeed()); + } + if (model.wasPropertyExplicitlySet("totalSmClockSpeed")) { + this.totalSmClockSpeed(model.getTotalSmClockSpeed()); + } + if (model.wasPropertyExplicitlySet("totalGraphicsClockSpeed")) { + this.totalGraphicsClockSpeed(model.getTotalGraphicsClockSpeed()); + } + if (model.wasPropertyExplicitlySet("totalMemoryClockSpeed")) { + this.totalMemoryClockSpeed(model.getTotalMemoryClockSpeed()); + } + if (model.wasPropertyExplicitlySet("cudaVersion")) { + this.cudaVersion(model.getCudaVersion()); + } + if (model.wasPropertyExplicitlySet("driverVersion")) { + this.driverVersion(model.getDriverVersion()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public HostGpuConfiguration( + java.util.Date timeCollected, + Integer gpuId, + String productName, + String vendor, + String busId, + Integer busWidth, + String gpuCapabilities, + Double totalPower, + Double totalMemory, + Double totalVideoClockSpeed, + Double totalSmClockSpeed, + Double totalGraphicsClockSpeed, + Double totalMemoryClockSpeed, + String cudaVersion, + String driverVersion) { + super(timeCollected); + this.gpuId = gpuId; + this.productName = productName; + this.vendor = vendor; + this.busId = busId; + this.busWidth = busWidth; + this.gpuCapabilities = gpuCapabilities; + this.totalPower = totalPower; + this.totalMemory = totalMemory; + this.totalVideoClockSpeed = totalVideoClockSpeed; + this.totalSmClockSpeed = totalSmClockSpeed; + this.totalGraphicsClockSpeed = totalGraphicsClockSpeed; + this.totalMemoryClockSpeed = totalMemoryClockSpeed; + this.cudaVersion = cudaVersion; + this.driverVersion = driverVersion; + } + + /** + * GPU Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gpuId") + private final Integer gpuId; + + /** + * GPU Identifier + * @return the value + **/ + public Integer getGpuId() { + return gpuId; + } + + /** + * GPU Product Name + **/ + @com.fasterxml.jackson.annotation.JsonProperty("productName") + private final String productName; + + /** + * GPU Product Name + * @return the value + **/ + public String getProductName() { + return productName; + } + + /** + * GPU Vendor + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vendor") + private final String vendor; + + /** + * GPU Vendor + * @return the value + **/ + public String getVendor() { + return vendor; + } + + /** + * Bus Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("busId") + private final String busId; + + /** + * Bus Identifier + * @return the value + **/ + public String getBusId() { + return busId; + } + + /** + * Bus Width + **/ + @com.fasterxml.jackson.annotation.JsonProperty("busWidth") + private final Integer busWidth; + + /** + * Bus Width + * @return the value + **/ + public Integer getBusWidth() { + return busWidth; + } + + /** + * GPU Capabilities + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gpuCapabilities") + private final String gpuCapabilities; + + /** + * GPU Capabilities + * @return the value + **/ + public String getGpuCapabilities() { + return gpuCapabilities; + } + + /** + * Power Capacity + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalPower") + private final Double totalPower; + + /** + * Power Capacity + * @return the value + **/ + public Double getTotalPower() { + return totalPower; + } + + /** + * Total Memory Allocated to GPU + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalMemory") + private final Double totalMemory; + + /** + * Total Memory Allocated to GPU + * @return the value + **/ + public Double getTotalMemory() { + return totalMemory; + } + + /** + * Max Video Clock Speed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalVideoClockSpeed") + private final Double totalVideoClockSpeed; + + /** + * Max Video Clock Speed + * @return the value + **/ + public Double getTotalVideoClockSpeed() { + return totalVideoClockSpeed; + } + + /** + * Max SM (Streaming Multiprocessor) Clock Speed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalSmClockSpeed") + private final Double totalSmClockSpeed; + + /** + * Max SM (Streaming Multiprocessor) Clock Speed + * @return the value + **/ + public Double getTotalSmClockSpeed() { + return totalSmClockSpeed; + } + + /** + * Max Graphics Clock Speed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalGraphicsClockSpeed") + private final Double totalGraphicsClockSpeed; + + /** + * Max Graphics Clock Speed + * @return the value + **/ + public Double getTotalGraphicsClockSpeed() { + return totalGraphicsClockSpeed; + } + + /** + * Max Memory Clock Speed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalMemoryClockSpeed") + private final Double totalMemoryClockSpeed; + + /** + * Max Memory Clock Speed + * @return the value + **/ + public Double getTotalMemoryClockSpeed() { + return totalMemoryClockSpeed; + } + + /** + * CUDA library version + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cudaVersion") + private final String cudaVersion; + + /** + * CUDA library version + * @return the value + **/ + public String getCudaVersion() { + return cudaVersion; + } + + /** + * GPU Driver version + **/ + @com.fasterxml.jackson.annotation.JsonProperty("driverVersion") + private final String driverVersion; + + /** + * GPU Driver version + * @return the value + **/ + public String getDriverVersion() { + return driverVersion; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("HostGpuConfiguration("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", gpuId=").append(String.valueOf(this.gpuId)); + sb.append(", productName=").append(String.valueOf(this.productName)); + sb.append(", vendor=").append(String.valueOf(this.vendor)); + sb.append(", busId=").append(String.valueOf(this.busId)); + sb.append(", busWidth=").append(String.valueOf(this.busWidth)); + sb.append(", gpuCapabilities=").append(String.valueOf(this.gpuCapabilities)); + sb.append(", totalPower=").append(String.valueOf(this.totalPower)); + sb.append(", totalMemory=").append(String.valueOf(this.totalMemory)); + sb.append(", totalVideoClockSpeed=").append(String.valueOf(this.totalVideoClockSpeed)); + sb.append(", totalSmClockSpeed=").append(String.valueOf(this.totalSmClockSpeed)); + sb.append(", totalGraphicsClockSpeed=") + .append(String.valueOf(this.totalGraphicsClockSpeed)); + sb.append(", totalMemoryClockSpeed=").append(String.valueOf(this.totalMemoryClockSpeed)); + sb.append(", cudaVersion=").append(String.valueOf(this.cudaVersion)); + sb.append(", driverVersion=").append(String.valueOf(this.driverVersion)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof HostGpuConfiguration)) { + return false; + } + + HostGpuConfiguration other = (HostGpuConfiguration) o; + return java.util.Objects.equals(this.gpuId, other.gpuId) + && java.util.Objects.equals(this.productName, other.productName) + && java.util.Objects.equals(this.vendor, other.vendor) + && java.util.Objects.equals(this.busId, other.busId) + && java.util.Objects.equals(this.busWidth, other.busWidth) + && java.util.Objects.equals(this.gpuCapabilities, other.gpuCapabilities) + && java.util.Objects.equals(this.totalPower, other.totalPower) + && java.util.Objects.equals(this.totalMemory, other.totalMemory) + && java.util.Objects.equals(this.totalVideoClockSpeed, other.totalVideoClockSpeed) + && java.util.Objects.equals(this.totalSmClockSpeed, other.totalSmClockSpeed) + && java.util.Objects.equals( + this.totalGraphicsClockSpeed, other.totalGraphicsClockSpeed) + && java.util.Objects.equals(this.totalMemoryClockSpeed, other.totalMemoryClockSpeed) + && java.util.Objects.equals(this.cudaVersion, other.cudaVersion) + && java.util.Objects.equals(this.driverVersion, other.driverVersion) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.gpuId == null ? 43 : this.gpuId.hashCode()); + result = (result * PRIME) + (this.productName == null ? 43 : this.productName.hashCode()); + result = (result * PRIME) + (this.vendor == null ? 43 : this.vendor.hashCode()); + result = (result * PRIME) + (this.busId == null ? 43 : this.busId.hashCode()); + result = (result * PRIME) + (this.busWidth == null ? 43 : this.busWidth.hashCode()); + result = + (result * PRIME) + + (this.gpuCapabilities == null ? 43 : this.gpuCapabilities.hashCode()); + result = (result * PRIME) + (this.totalPower == null ? 43 : this.totalPower.hashCode()); + result = (result * PRIME) + (this.totalMemory == null ? 43 : this.totalMemory.hashCode()); + result = + (result * PRIME) + + (this.totalVideoClockSpeed == null + ? 43 + : this.totalVideoClockSpeed.hashCode()); + result = + (result * PRIME) + + (this.totalSmClockSpeed == null ? 43 : this.totalSmClockSpeed.hashCode()); + result = + (result * PRIME) + + (this.totalGraphicsClockSpeed == null + ? 43 + : this.totalGraphicsClockSpeed.hashCode()); + result = + (result * PRIME) + + (this.totalMemoryClockSpeed == null + ? 43 + : this.totalMemoryClockSpeed.hashCode()); + result = (result * PRIME) + (this.cudaVersion == null ? 43 : this.cudaVersion.hashCode()); + result = + (result * PRIME) + + (this.driverVersion == null ? 43 : this.driverVersion.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostGpuProcesses.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostGpuProcesses.java new file mode 100644 index 00000000000..236846cc46b --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostGpuProcesses.java @@ -0,0 +1,311 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * GPU processes metrics, processes using GPUs. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = HostGpuProcesses.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "metricName" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class HostGpuProcesses extends HostPerformanceMetricGroup { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("timeCollected") + private java.util.Date timeCollected; + + public Builder timeCollected(java.util.Date timeCollected) { + this.timeCollected = timeCollected; + this.__explicitlySet__.add("timeCollected"); + return this; + } + /** + * GPU Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gpuId") + private Integer gpuId; + + /** + * GPU Identifier + * @param gpuId the value to set + * @return this builder + **/ + public Builder gpuId(Integer gpuId) { + this.gpuId = gpuId; + this.__explicitlySet__.add("gpuId"); + return this; + } + /** + * Process Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pid") + private Integer pid; + + /** + * Process Identifier + * @param pid the value to set + * @return this builder + **/ + public Builder pid(Integer pid) { + this.pid = pid; + this.__explicitlySet__.add("pid"); + return this; + } + /** + * Process Name (process using GPU) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("processName") + private String processName; + + /** + * Process Name (process using GPU) + * @param processName the value to set + * @return this builder + **/ + public Builder processName(String processName) { + this.processName = processName; + this.__explicitlySet__.add("processName"); + return this; + } + /** + * Process elapsed time + **/ + @com.fasterxml.jackson.annotation.JsonProperty("elapsedTime") + private Double elapsedTime; + + /** + * Process elapsed time + * @param elapsedTime the value to set + * @return this builder + **/ + public Builder elapsedTime(Double elapsedTime) { + this.elapsedTime = elapsedTime; + this.__explicitlySet__.add("elapsedTime"); + return this; + } + /** + * Memory Used by Process in MBs + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gpuMemoryUsage") + private Double gpuMemoryUsage; + + /** + * Memory Used by Process in MBs + * @param gpuMemoryUsage the value to set + * @return this builder + **/ + public Builder gpuMemoryUsage(Double gpuMemoryUsage) { + this.gpuMemoryUsage = gpuMemoryUsage; + this.__explicitlySet__.add("gpuMemoryUsage"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public HostGpuProcesses build() { + HostGpuProcesses model = + new HostGpuProcesses( + this.timeCollected, + this.gpuId, + this.pid, + this.processName, + this.elapsedTime, + this.gpuMemoryUsage); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(HostGpuProcesses model) { + if (model.wasPropertyExplicitlySet("timeCollected")) { + this.timeCollected(model.getTimeCollected()); + } + if (model.wasPropertyExplicitlySet("gpuId")) { + this.gpuId(model.getGpuId()); + } + if (model.wasPropertyExplicitlySet("pid")) { + this.pid(model.getPid()); + } + if (model.wasPropertyExplicitlySet("processName")) { + this.processName(model.getProcessName()); + } + if (model.wasPropertyExplicitlySet("elapsedTime")) { + this.elapsedTime(model.getElapsedTime()); + } + if (model.wasPropertyExplicitlySet("gpuMemoryUsage")) { + this.gpuMemoryUsage(model.getGpuMemoryUsage()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public HostGpuProcesses( + java.util.Date timeCollected, + Integer gpuId, + Integer pid, + String processName, + Double elapsedTime, + Double gpuMemoryUsage) { + super(timeCollected); + this.gpuId = gpuId; + this.pid = pid; + this.processName = processName; + this.elapsedTime = elapsedTime; + this.gpuMemoryUsage = gpuMemoryUsage; + } + + /** + * GPU Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gpuId") + private final Integer gpuId; + + /** + * GPU Identifier + * @return the value + **/ + public Integer getGpuId() { + return gpuId; + } + + /** + * Process Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("pid") + private final Integer pid; + + /** + * Process Identifier + * @return the value + **/ + public Integer getPid() { + return pid; + } + + /** + * Process Name (process using GPU) + **/ + @com.fasterxml.jackson.annotation.JsonProperty("processName") + private final String processName; + + /** + * Process Name (process using GPU) + * @return the value + **/ + public String getProcessName() { + return processName; + } + + /** + * Process elapsed time + **/ + @com.fasterxml.jackson.annotation.JsonProperty("elapsedTime") + private final Double elapsedTime; + + /** + * Process elapsed time + * @return the value + **/ + public Double getElapsedTime() { + return elapsedTime; + } + + /** + * Memory Used by Process in MBs + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gpuMemoryUsage") + private final Double gpuMemoryUsage; + + /** + * Memory Used by Process in MBs + * @return the value + **/ + public Double getGpuMemoryUsage() { + return gpuMemoryUsage; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("HostGpuProcesses("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", gpuId=").append(String.valueOf(this.gpuId)); + sb.append(", pid=").append(String.valueOf(this.pid)); + sb.append(", processName=").append(String.valueOf(this.processName)); + sb.append(", elapsedTime=").append(String.valueOf(this.elapsedTime)); + sb.append(", gpuMemoryUsage=").append(String.valueOf(this.gpuMemoryUsage)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof HostGpuProcesses)) { + return false; + } + + HostGpuProcesses other = (HostGpuProcesses) o; + return java.util.Objects.equals(this.gpuId, other.gpuId) + && java.util.Objects.equals(this.pid, other.pid) + && java.util.Objects.equals(this.processName, other.processName) + && java.util.Objects.equals(this.elapsedTime, other.elapsedTime) + && java.util.Objects.equals(this.gpuMemoryUsage, other.gpuMemoryUsage) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.gpuId == null ? 43 : this.gpuId.hashCode()); + result = (result * PRIME) + (this.pid == null ? 43 : this.pid.hashCode()); + result = (result * PRIME) + (this.processName == null ? 43 : this.processName.hashCode()); + result = (result * PRIME) + (this.elapsedTime == null ? 43 : this.elapsedTime.hashCode()); + result = + (result * PRIME) + + (this.gpuMemoryUsage == null ? 43 : this.gpuMemoryUsage.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostGpuUsage.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostGpuUsage.java new file mode 100644 index 00000000000..01efb3fd331 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostGpuUsage.java @@ -0,0 +1,949 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * GPU performance metrics + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = HostGpuUsage.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "metricName" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class HostGpuUsage extends HostPerformanceMetricGroup { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("timeCollected") + private java.util.Date timeCollected; + + public Builder timeCollected(java.util.Date timeCollected) { + this.timeCollected = timeCollected; + this.__explicitlySet__.add("timeCollected"); + return this; + } + /** + * GPU Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gpuId") + private Integer gpuId; + + /** + * GPU Identifier + * @param gpuId the value to set + * @return this builder + **/ + public Builder gpuId(Integer gpuId) { + this.gpuId = gpuId; + this.__explicitlySet__.add("gpuId"); + return this; + } + /** + * GPU Utilization Percent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("utilization") + private Double utilization; + + /** + * GPU Utilization Percent + * @param utilization the value to set + * @return this builder + **/ + public Builder utilization(Double utilization) { + this.utilization = utilization; + this.__explicitlySet__.add("utilization"); + return this; + } + /** + * GPU Memory Utilization Percent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memoryUtilization") + private Double memoryUtilization; + + /** + * GPU Memory Utilization Percent + * @param memoryUtilization the value to set + * @return this builder + **/ + public Builder memoryUtilization(Double memoryUtilization) { + this.memoryUtilization = memoryUtilization; + this.__explicitlySet__.add("memoryUtilization"); + return this; + } + /** + * GPU Power Draw in Watts + **/ + @com.fasterxml.jackson.annotation.JsonProperty("powerDraw") + private Double powerDraw; + + /** + * GPU Power Draw in Watts + * @param powerDraw the value to set + * @return this builder + **/ + public Builder powerDraw(Double powerDraw) { + this.powerDraw = powerDraw; + this.__explicitlySet__.add("powerDraw"); + return this; + } + /** + * GPU Temperature in Celsius + **/ + @com.fasterxml.jackson.annotation.JsonProperty("temperature") + private Double temperature; + + /** + * GPU Temperature in Celsius + * @param temperature the value to set + * @return this builder + **/ + public Builder temperature(Double temperature) { + this.temperature = temperature; + this.__explicitlySet__.add("temperature"); + return this; + } + /** + * GPU Fan Utilization + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fanUtilization") + private Double fanUtilization; + + /** + * GPU Fan Utilization + * @param fanUtilization the value to set + * @return this builder + **/ + public Builder fanUtilization(Double fanUtilization) { + this.fanUtilization = fanUtilization; + this.__explicitlySet__.add("fanUtilization"); + return this; + } + /** + * GPU Graphics (Shader) Clock Speed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockSpeedGraphics") + private Double clockSpeedGraphics; + + /** + * GPU Graphics (Shader) Clock Speed + * @param clockSpeedGraphics the value to set + * @return this builder + **/ + public Builder clockSpeedGraphics(Double clockSpeedGraphics) { + this.clockSpeedGraphics = clockSpeedGraphics; + this.__explicitlySet__.add("clockSpeedGraphics"); + return this; + } + /** + * GPU SM (Streaming Multiprocessor) Clock Speed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockSpeedSm") + private Double clockSpeedSm; + + /** + * GPU SM (Streaming Multiprocessor) Clock Speed + * @param clockSpeedSm the value to set + * @return this builder + **/ + public Builder clockSpeedSm(Double clockSpeedSm) { + this.clockSpeedSm = clockSpeedSm; + this.__explicitlySet__.add("clockSpeedSm"); + return this; + } + /** + * GPU Video Clock Speed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockSpeedVideo") + private Double clockSpeedVideo; + + /** + * GPU Video Clock Speed + * @param clockSpeedVideo the value to set + * @return this builder + **/ + public Builder clockSpeedVideo(Double clockSpeedVideo) { + this.clockSpeedVideo = clockSpeedVideo; + this.__explicitlySet__.add("clockSpeedVideo"); + return this; + } + /** + * GPU Memory Clock Speed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockSpeedMemory") + private Double clockSpeedMemory; + + /** + * GPU Memory Clock Speed + * @param clockSpeedMemory the value to set + * @return this builder + **/ + public Builder clockSpeedMemory(Double clockSpeedMemory) { + this.clockSpeedMemory = clockSpeedMemory; + this.__explicitlySet__.add("clockSpeedMemory"); + return this; + } + /** + * GPU Performance State + **/ + @com.fasterxml.jackson.annotation.JsonProperty("performanceState") + private Double performanceState; + + /** + * GPU Performance State + * @param performanceState the value to set + * @return this builder + **/ + public Builder performanceState(Double performanceState) { + this.performanceState = performanceState; + this.__explicitlySet__.add("performanceState"); + return this; + } + /** + * GPU ECC Single Bit Errors + **/ + @com.fasterxml.jackson.annotation.JsonProperty("eccSingleBitErrors") + private Integer eccSingleBitErrors; + + /** + * GPU ECC Single Bit Errors + * @param eccSingleBitErrors the value to set + * @return this builder + **/ + public Builder eccSingleBitErrors(Integer eccSingleBitErrors) { + this.eccSingleBitErrors = eccSingleBitErrors; + this.__explicitlySet__.add("eccSingleBitErrors"); + return this; + } + /** + * GPU ECC Double Bit Errors + **/ + @com.fasterxml.jackson.annotation.JsonProperty("eccDoubleBitErrors") + private Integer eccDoubleBitErrors; + + /** + * GPU ECC Double Bit Errors + * @param eccDoubleBitErrors the value to set + * @return this builder + **/ + public Builder eccDoubleBitErrors(Integer eccDoubleBitErrors) { + this.eccDoubleBitErrors = eccDoubleBitErrors; + this.__explicitlySet__.add("eccDoubleBitErrors"); + return this; + } + /** + * Nothing running on CPU, clocks are idle + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockEventIdle") + private Integer clockEventIdle; + + /** + * Nothing running on CPU, clocks are idle + * @param clockEventIdle the value to set + * @return this builder + **/ + public Builder clockEventIdle(Integer clockEventIdle) { + this.clockEventIdle = clockEventIdle; + this.__explicitlySet__.add("clockEventIdle"); + return this; + } + /** + * HW Thermal Slowdown (reducing the core clocks by a factor of 2 or more) is engaged. Temp too high + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockEventHwThermalSlowDown") + private Integer clockEventHwThermalSlowDown; + + /** + * HW Thermal Slowdown (reducing the core clocks by a factor of 2 or more) is engaged. Temp too high + * @param clockEventHwThermalSlowDown the value to set + * @return this builder + **/ + public Builder clockEventHwThermalSlowDown(Integer clockEventHwThermalSlowDown) { + this.clockEventHwThermalSlowDown = clockEventHwThermalSlowDown; + this.__explicitlySet__.add("clockEventHwThermalSlowDown"); + return this; + } + /** + * SW Power Scaling algorithm is reducing the clocks below requested clocks because the GPU is consuming too much power + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockEventSwPowerCap") + private Integer clockEventSwPowerCap; + + /** + * SW Power Scaling algorithm is reducing the clocks below requested clocks because the GPU is consuming too much power + * @param clockEventSwPowerCap the value to set + * @return this builder + **/ + public Builder clockEventSwPowerCap(Integer clockEventSwPowerCap) { + this.clockEventSwPowerCap = clockEventSwPowerCap; + this.__explicitlySet__.add("clockEventSwPowerCap"); + return this; + } + /** + * GPU clocks are limited by applications clocks setting + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockEventAppClockSetting") + private Integer clockEventAppClockSetting; + + /** + * GPU clocks are limited by applications clocks setting + * @param clockEventAppClockSetting the value to set + * @return this builder + **/ + public Builder clockEventAppClockSetting(Integer clockEventAppClockSetting) { + this.clockEventAppClockSetting = clockEventAppClockSetting; + this.__explicitlySet__.add("clockEventAppClockSetting"); + return this; + } + /** + * HW Power Brake Slowdown (reducing the core clocks by a factor of 2 or more) is engaged + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockEventHwPowerBreak") + private Integer clockEventHwPowerBreak; + + /** + * HW Power Brake Slowdown (reducing the core clocks by a factor of 2 or more) is engaged + * @param clockEventHwPowerBreak the value to set + * @return this builder + **/ + public Builder clockEventHwPowerBreak(Integer clockEventHwPowerBreak) { + this.clockEventHwPowerBreak = clockEventHwPowerBreak; + this.__explicitlySet__.add("clockEventHwPowerBreak"); + return this; + } + /** + * SW Thermal capping algorithm is reducing clocks below requested clocks because GPU temperature is higher than Max Operating Temp + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockEventSwThermalSlowdown") + private Integer clockEventSwThermalSlowdown; + + /** + * SW Thermal capping algorithm is reducing clocks below requested clocks because GPU temperature is higher than Max Operating Temp + * @param clockEventSwThermalSlowdown the value to set + * @return this builder + **/ + public Builder clockEventSwThermalSlowdown(Integer clockEventSwThermalSlowdown) { + this.clockEventSwThermalSlowdown = clockEventSwThermalSlowdown; + this.__explicitlySet__.add("clockEventSwThermalSlowdown"); + return this; + } + /** + * HW Power Brake Slowdown (reducing the core clocks by a factor of 2 or more) is engaged + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockEventSyncBoost") + private Integer clockEventSyncBoost; + + /** + * HW Power Brake Slowdown (reducing the core clocks by a factor of 2 or more) is engaged + * @param clockEventSyncBoost the value to set + * @return this builder + **/ + public Builder clockEventSyncBoost(Integer clockEventSyncBoost) { + this.clockEventSyncBoost = clockEventSyncBoost; + this.__explicitlySet__.add("clockEventSyncBoost"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public HostGpuUsage build() { + HostGpuUsage model = + new HostGpuUsage( + this.timeCollected, + this.gpuId, + this.utilization, + this.memoryUtilization, + this.powerDraw, + this.temperature, + this.fanUtilization, + this.clockSpeedGraphics, + this.clockSpeedSm, + this.clockSpeedVideo, + this.clockSpeedMemory, + this.performanceState, + this.eccSingleBitErrors, + this.eccDoubleBitErrors, + this.clockEventIdle, + this.clockEventHwThermalSlowDown, + this.clockEventSwPowerCap, + this.clockEventAppClockSetting, + this.clockEventHwPowerBreak, + this.clockEventSwThermalSlowdown, + this.clockEventSyncBoost); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(HostGpuUsage model) { + if (model.wasPropertyExplicitlySet("timeCollected")) { + this.timeCollected(model.getTimeCollected()); + } + if (model.wasPropertyExplicitlySet("gpuId")) { + this.gpuId(model.getGpuId()); + } + if (model.wasPropertyExplicitlySet("utilization")) { + this.utilization(model.getUtilization()); + } + if (model.wasPropertyExplicitlySet("memoryUtilization")) { + this.memoryUtilization(model.getMemoryUtilization()); + } + if (model.wasPropertyExplicitlySet("powerDraw")) { + this.powerDraw(model.getPowerDraw()); + } + if (model.wasPropertyExplicitlySet("temperature")) { + this.temperature(model.getTemperature()); + } + if (model.wasPropertyExplicitlySet("fanUtilization")) { + this.fanUtilization(model.getFanUtilization()); + } + if (model.wasPropertyExplicitlySet("clockSpeedGraphics")) { + this.clockSpeedGraphics(model.getClockSpeedGraphics()); + } + if (model.wasPropertyExplicitlySet("clockSpeedSm")) { + this.clockSpeedSm(model.getClockSpeedSm()); + } + if (model.wasPropertyExplicitlySet("clockSpeedVideo")) { + this.clockSpeedVideo(model.getClockSpeedVideo()); + } + if (model.wasPropertyExplicitlySet("clockSpeedMemory")) { + this.clockSpeedMemory(model.getClockSpeedMemory()); + } + if (model.wasPropertyExplicitlySet("performanceState")) { + this.performanceState(model.getPerformanceState()); + } + if (model.wasPropertyExplicitlySet("eccSingleBitErrors")) { + this.eccSingleBitErrors(model.getEccSingleBitErrors()); + } + if (model.wasPropertyExplicitlySet("eccDoubleBitErrors")) { + this.eccDoubleBitErrors(model.getEccDoubleBitErrors()); + } + if (model.wasPropertyExplicitlySet("clockEventIdle")) { + this.clockEventIdle(model.getClockEventIdle()); + } + if (model.wasPropertyExplicitlySet("clockEventHwThermalSlowDown")) { + this.clockEventHwThermalSlowDown(model.getClockEventHwThermalSlowDown()); + } + if (model.wasPropertyExplicitlySet("clockEventSwPowerCap")) { + this.clockEventSwPowerCap(model.getClockEventSwPowerCap()); + } + if (model.wasPropertyExplicitlySet("clockEventAppClockSetting")) { + this.clockEventAppClockSetting(model.getClockEventAppClockSetting()); + } + if (model.wasPropertyExplicitlySet("clockEventHwPowerBreak")) { + this.clockEventHwPowerBreak(model.getClockEventHwPowerBreak()); + } + if (model.wasPropertyExplicitlySet("clockEventSwThermalSlowdown")) { + this.clockEventSwThermalSlowdown(model.getClockEventSwThermalSlowdown()); + } + if (model.wasPropertyExplicitlySet("clockEventSyncBoost")) { + this.clockEventSyncBoost(model.getClockEventSyncBoost()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public HostGpuUsage( + java.util.Date timeCollected, + Integer gpuId, + Double utilization, + Double memoryUtilization, + Double powerDraw, + Double temperature, + Double fanUtilization, + Double clockSpeedGraphics, + Double clockSpeedSm, + Double clockSpeedVideo, + Double clockSpeedMemory, + Double performanceState, + Integer eccSingleBitErrors, + Integer eccDoubleBitErrors, + Integer clockEventIdle, + Integer clockEventHwThermalSlowDown, + Integer clockEventSwPowerCap, + Integer clockEventAppClockSetting, + Integer clockEventHwPowerBreak, + Integer clockEventSwThermalSlowdown, + Integer clockEventSyncBoost) { + super(timeCollected); + this.gpuId = gpuId; + this.utilization = utilization; + this.memoryUtilization = memoryUtilization; + this.powerDraw = powerDraw; + this.temperature = temperature; + this.fanUtilization = fanUtilization; + this.clockSpeedGraphics = clockSpeedGraphics; + this.clockSpeedSm = clockSpeedSm; + this.clockSpeedVideo = clockSpeedVideo; + this.clockSpeedMemory = clockSpeedMemory; + this.performanceState = performanceState; + this.eccSingleBitErrors = eccSingleBitErrors; + this.eccDoubleBitErrors = eccDoubleBitErrors; + this.clockEventIdle = clockEventIdle; + this.clockEventHwThermalSlowDown = clockEventHwThermalSlowDown; + this.clockEventSwPowerCap = clockEventSwPowerCap; + this.clockEventAppClockSetting = clockEventAppClockSetting; + this.clockEventHwPowerBreak = clockEventHwPowerBreak; + this.clockEventSwThermalSlowdown = clockEventSwThermalSlowdown; + this.clockEventSyncBoost = clockEventSyncBoost; + } + + /** + * GPU Identifier + **/ + @com.fasterxml.jackson.annotation.JsonProperty("gpuId") + private final Integer gpuId; + + /** + * GPU Identifier + * @return the value + **/ + public Integer getGpuId() { + return gpuId; + } + + /** + * GPU Utilization Percent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("utilization") + private final Double utilization; + + /** + * GPU Utilization Percent + * @return the value + **/ + public Double getUtilization() { + return utilization; + } + + /** + * GPU Memory Utilization Percent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memoryUtilization") + private final Double memoryUtilization; + + /** + * GPU Memory Utilization Percent + * @return the value + **/ + public Double getMemoryUtilization() { + return memoryUtilization; + } + + /** + * GPU Power Draw in Watts + **/ + @com.fasterxml.jackson.annotation.JsonProperty("powerDraw") + private final Double powerDraw; + + /** + * GPU Power Draw in Watts + * @return the value + **/ + public Double getPowerDraw() { + return powerDraw; + } + + /** + * GPU Temperature in Celsius + **/ + @com.fasterxml.jackson.annotation.JsonProperty("temperature") + private final Double temperature; + + /** + * GPU Temperature in Celsius + * @return the value + **/ + public Double getTemperature() { + return temperature; + } + + /** + * GPU Fan Utilization + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fanUtilization") + private final Double fanUtilization; + + /** + * GPU Fan Utilization + * @return the value + **/ + public Double getFanUtilization() { + return fanUtilization; + } + + /** + * GPU Graphics (Shader) Clock Speed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockSpeedGraphics") + private final Double clockSpeedGraphics; + + /** + * GPU Graphics (Shader) Clock Speed + * @return the value + **/ + public Double getClockSpeedGraphics() { + return clockSpeedGraphics; + } + + /** + * GPU SM (Streaming Multiprocessor) Clock Speed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockSpeedSm") + private final Double clockSpeedSm; + + /** + * GPU SM (Streaming Multiprocessor) Clock Speed + * @return the value + **/ + public Double getClockSpeedSm() { + return clockSpeedSm; + } + + /** + * GPU Video Clock Speed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockSpeedVideo") + private final Double clockSpeedVideo; + + /** + * GPU Video Clock Speed + * @return the value + **/ + public Double getClockSpeedVideo() { + return clockSpeedVideo; + } + + /** + * GPU Memory Clock Speed + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockSpeedMemory") + private final Double clockSpeedMemory; + + /** + * GPU Memory Clock Speed + * @return the value + **/ + public Double getClockSpeedMemory() { + return clockSpeedMemory; + } + + /** + * GPU Performance State + **/ + @com.fasterxml.jackson.annotation.JsonProperty("performanceState") + private final Double performanceState; + + /** + * GPU Performance State + * @return the value + **/ + public Double getPerformanceState() { + return performanceState; + } + + /** + * GPU ECC Single Bit Errors + **/ + @com.fasterxml.jackson.annotation.JsonProperty("eccSingleBitErrors") + private final Integer eccSingleBitErrors; + + /** + * GPU ECC Single Bit Errors + * @return the value + **/ + public Integer getEccSingleBitErrors() { + return eccSingleBitErrors; + } + + /** + * GPU ECC Double Bit Errors + **/ + @com.fasterxml.jackson.annotation.JsonProperty("eccDoubleBitErrors") + private final Integer eccDoubleBitErrors; + + /** + * GPU ECC Double Bit Errors + * @return the value + **/ + public Integer getEccDoubleBitErrors() { + return eccDoubleBitErrors; + } + + /** + * Nothing running on CPU, clocks are idle + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockEventIdle") + private final Integer clockEventIdle; + + /** + * Nothing running on CPU, clocks are idle + * @return the value + **/ + public Integer getClockEventIdle() { + return clockEventIdle; + } + + /** + * HW Thermal Slowdown (reducing the core clocks by a factor of 2 or more) is engaged. Temp too high + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockEventHwThermalSlowDown") + private final Integer clockEventHwThermalSlowDown; + + /** + * HW Thermal Slowdown (reducing the core clocks by a factor of 2 or more) is engaged. Temp too high + * @return the value + **/ + public Integer getClockEventHwThermalSlowDown() { + return clockEventHwThermalSlowDown; + } + + /** + * SW Power Scaling algorithm is reducing the clocks below requested clocks because the GPU is consuming too much power + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockEventSwPowerCap") + private final Integer clockEventSwPowerCap; + + /** + * SW Power Scaling algorithm is reducing the clocks below requested clocks because the GPU is consuming too much power + * @return the value + **/ + public Integer getClockEventSwPowerCap() { + return clockEventSwPowerCap; + } + + /** + * GPU clocks are limited by applications clocks setting + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockEventAppClockSetting") + private final Integer clockEventAppClockSetting; + + /** + * GPU clocks are limited by applications clocks setting + * @return the value + **/ + public Integer getClockEventAppClockSetting() { + return clockEventAppClockSetting; + } + + /** + * HW Power Brake Slowdown (reducing the core clocks by a factor of 2 or more) is engaged + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockEventHwPowerBreak") + private final Integer clockEventHwPowerBreak; + + /** + * HW Power Brake Slowdown (reducing the core clocks by a factor of 2 or more) is engaged + * @return the value + **/ + public Integer getClockEventHwPowerBreak() { + return clockEventHwPowerBreak; + } + + /** + * SW Thermal capping algorithm is reducing clocks below requested clocks because GPU temperature is higher than Max Operating Temp + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockEventSwThermalSlowdown") + private final Integer clockEventSwThermalSlowdown; + + /** + * SW Thermal capping algorithm is reducing clocks below requested clocks because GPU temperature is higher than Max Operating Temp + * @return the value + **/ + public Integer getClockEventSwThermalSlowdown() { + return clockEventSwThermalSlowdown; + } + + /** + * HW Power Brake Slowdown (reducing the core clocks by a factor of 2 or more) is engaged + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clockEventSyncBoost") + private final Integer clockEventSyncBoost; + + /** + * HW Power Brake Slowdown (reducing the core clocks by a factor of 2 or more) is engaged + * @return the value + **/ + public Integer getClockEventSyncBoost() { + return clockEventSyncBoost; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("HostGpuUsage("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", gpuId=").append(String.valueOf(this.gpuId)); + sb.append(", utilization=").append(String.valueOf(this.utilization)); + sb.append(", memoryUtilization=").append(String.valueOf(this.memoryUtilization)); + sb.append(", powerDraw=").append(String.valueOf(this.powerDraw)); + sb.append(", temperature=").append(String.valueOf(this.temperature)); + sb.append(", fanUtilization=").append(String.valueOf(this.fanUtilization)); + sb.append(", clockSpeedGraphics=").append(String.valueOf(this.clockSpeedGraphics)); + sb.append(", clockSpeedSm=").append(String.valueOf(this.clockSpeedSm)); + sb.append(", clockSpeedVideo=").append(String.valueOf(this.clockSpeedVideo)); + sb.append(", clockSpeedMemory=").append(String.valueOf(this.clockSpeedMemory)); + sb.append(", performanceState=").append(String.valueOf(this.performanceState)); + sb.append(", eccSingleBitErrors=").append(String.valueOf(this.eccSingleBitErrors)); + sb.append(", eccDoubleBitErrors=").append(String.valueOf(this.eccDoubleBitErrors)); + sb.append(", clockEventIdle=").append(String.valueOf(this.clockEventIdle)); + sb.append(", clockEventHwThermalSlowDown=") + .append(String.valueOf(this.clockEventHwThermalSlowDown)); + sb.append(", clockEventSwPowerCap=").append(String.valueOf(this.clockEventSwPowerCap)); + sb.append(", clockEventAppClockSetting=") + .append(String.valueOf(this.clockEventAppClockSetting)); + sb.append(", clockEventHwPowerBreak=").append(String.valueOf(this.clockEventHwPowerBreak)); + sb.append(", clockEventSwThermalSlowdown=") + .append(String.valueOf(this.clockEventSwThermalSlowdown)); + sb.append(", clockEventSyncBoost=").append(String.valueOf(this.clockEventSyncBoost)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof HostGpuUsage)) { + return false; + } + + HostGpuUsage other = (HostGpuUsage) o; + return java.util.Objects.equals(this.gpuId, other.gpuId) + && java.util.Objects.equals(this.utilization, other.utilization) + && java.util.Objects.equals(this.memoryUtilization, other.memoryUtilization) + && java.util.Objects.equals(this.powerDraw, other.powerDraw) + && java.util.Objects.equals(this.temperature, other.temperature) + && java.util.Objects.equals(this.fanUtilization, other.fanUtilization) + && java.util.Objects.equals(this.clockSpeedGraphics, other.clockSpeedGraphics) + && java.util.Objects.equals(this.clockSpeedSm, other.clockSpeedSm) + && java.util.Objects.equals(this.clockSpeedVideo, other.clockSpeedVideo) + && java.util.Objects.equals(this.clockSpeedMemory, other.clockSpeedMemory) + && java.util.Objects.equals(this.performanceState, other.performanceState) + && java.util.Objects.equals(this.eccSingleBitErrors, other.eccSingleBitErrors) + && java.util.Objects.equals(this.eccDoubleBitErrors, other.eccDoubleBitErrors) + && java.util.Objects.equals(this.clockEventIdle, other.clockEventIdle) + && java.util.Objects.equals( + this.clockEventHwThermalSlowDown, other.clockEventHwThermalSlowDown) + && java.util.Objects.equals(this.clockEventSwPowerCap, other.clockEventSwPowerCap) + && java.util.Objects.equals( + this.clockEventAppClockSetting, other.clockEventAppClockSetting) + && java.util.Objects.equals( + this.clockEventHwPowerBreak, other.clockEventHwPowerBreak) + && java.util.Objects.equals( + this.clockEventSwThermalSlowdown, other.clockEventSwThermalSlowdown) + && java.util.Objects.equals(this.clockEventSyncBoost, other.clockEventSyncBoost) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.gpuId == null ? 43 : this.gpuId.hashCode()); + result = (result * PRIME) + (this.utilization == null ? 43 : this.utilization.hashCode()); + result = + (result * PRIME) + + (this.memoryUtilization == null ? 43 : this.memoryUtilization.hashCode()); + result = (result * PRIME) + (this.powerDraw == null ? 43 : this.powerDraw.hashCode()); + result = (result * PRIME) + (this.temperature == null ? 43 : this.temperature.hashCode()); + result = + (result * PRIME) + + (this.fanUtilization == null ? 43 : this.fanUtilization.hashCode()); + result = + (result * PRIME) + + (this.clockSpeedGraphics == null + ? 43 + : this.clockSpeedGraphics.hashCode()); + result = (result * PRIME) + (this.clockSpeedSm == null ? 43 : this.clockSpeedSm.hashCode()); + result = + (result * PRIME) + + (this.clockSpeedVideo == null ? 43 : this.clockSpeedVideo.hashCode()); + result = + (result * PRIME) + + (this.clockSpeedMemory == null ? 43 : this.clockSpeedMemory.hashCode()); + result = + (result * PRIME) + + (this.performanceState == null ? 43 : this.performanceState.hashCode()); + result = + (result * PRIME) + + (this.eccSingleBitErrors == null + ? 43 + : this.eccSingleBitErrors.hashCode()); + result = + (result * PRIME) + + (this.eccDoubleBitErrors == null + ? 43 + : this.eccDoubleBitErrors.hashCode()); + result = + (result * PRIME) + + (this.clockEventIdle == null ? 43 : this.clockEventIdle.hashCode()); + result = + (result * PRIME) + + (this.clockEventHwThermalSlowDown == null + ? 43 + : this.clockEventHwThermalSlowDown.hashCode()); + result = + (result * PRIME) + + (this.clockEventSwPowerCap == null + ? 43 + : this.clockEventSwPowerCap.hashCode()); + result = + (result * PRIME) + + (this.clockEventAppClockSetting == null + ? 43 + : this.clockEventAppClockSetting.hashCode()); + result = + (result * PRIME) + + (this.clockEventHwPowerBreak == null + ? 43 + : this.clockEventHwPowerBreak.hashCode()); + result = + (result * PRIME) + + (this.clockEventSwThermalSlowdown == null + ? 43 + : this.clockEventSwThermalSlowdown.hashCode()); + result = + (result * PRIME) + + (this.clockEventSyncBoost == null + ? 43 + : this.clockEventSyncBoost.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostInsight.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostInsight.java index dac546cce3c..c21c4357cf2 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostInsight.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostInsight.java @@ -30,6 +30,10 @@ value = EmManagedExternalHostInsight.class, name = "EM_MANAGED_EXTERNAL_HOST" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = MacsManagedCloudDatabaseHostInsight.class, + name = "MACS_MANAGED_CLOUD_DB_HOST" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = PeComanagedHostInsight.class, name = "PE_COMANAGED_HOST" @@ -147,13 +151,13 @@ public String getHostDisplayName() { } /** - * Operations Insights internal representation of the host type. Possible value is EXTERNAL-HOST. + * Ops Insights internal representation of the host type. Possible value is EXTERNAL-HOST. **/ @com.fasterxml.jackson.annotation.JsonProperty("hostType") private final String hostType; /** - * Operations Insights internal representation of the host type. Possible value is EXTERNAL-HOST. + * Ops Insights internal representation of the host type. Possible value is EXTERNAL-HOST. * @return the value **/ public String getHostType() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostInsightHostRecommendations.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostInsightHostRecommendations.java index e44723be13a..10f9ef2cdb1 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostInsightHostRecommendations.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostInsightHostRecommendations.java @@ -26,6 +26,18 @@ @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = HostCpuRecommendations.class, name = "HOST_CPU_RECOMMENDATIONS" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = HostNetworkRecommendations.class, + name = "HOST_NETWORK_RECOMMENDATIONS" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = HostMemoryRecommendations.class, + name = "HOST_MEMORY_RECOMMENDATIONS" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = HostStorageRecommendations.class, + name = "HOST_STORAGE_RECOMMENDATIONS" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) @@ -81,6 +93,9 @@ public int hashCode() { **/ public enum MetricRecommendationName { HostCpuRecommendations("HOST_CPU_RECOMMENDATIONS"), + HostMemoryRecommendations("HOST_MEMORY_RECOMMENDATIONS"), + HostNetworkRecommendations("HOST_NETWORK_RECOMMENDATIONS"), + HostStorageRecommendations("HOST_STORAGE_RECOMMENDATIONS"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostInsightSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostInsightSummary.java index fee718016ed..7b9e502850d 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostInsightSummary.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostInsightSummary.java @@ -26,6 +26,10 @@ value = MacsManagedExternalHostInsightSummary.class, name = "MACS_MANAGED_EXTERNAL_HOST" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = MacsManagedCloudDatabaseHostInsightSummary.class, + name = "MACS_MANAGED_CLOUD_DB_HOST" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = EmManagedExternalHostInsightSummary.class, name = "EM_MANAGED_EXTERNAL_HOST" @@ -150,13 +154,13 @@ public String getHostDisplayName() { } /** - * Operations Insights internal representation of the host type. Possible value is EXTERNAL-HOST. + * Ops Insights internal representation of the host type. Possible value is EXTERNAL-HOST. **/ @com.fasterxml.jackson.annotation.JsonProperty("hostType") private final String hostType; /** - * Operations Insights internal representation of the host type. Possible value is EXTERNAL-HOST. + * Ops Insights internal representation of the host type. Possible value is EXTERNAL-HOST. * @return the value **/ public String getHostType() { @@ -246,13 +250,13 @@ public String getOpsiPrivateEndpointId() { } /** - * Indicates the status of a host insight in Operations Insights + * Indicates the status of a host insight in Ops Insights **/ @com.fasterxml.jackson.annotation.JsonProperty("status") private final ResourceStatus status; /** - * Indicates the status of a host insight in Operations Insights + * Indicates the status of a host insight in Ops Insights * @return the value **/ public ResourceStatus getStatus() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostIoStatistics.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostIoStatistics.java new file mode 100644 index 00000000000..7577a4122e7 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostIoStatistics.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Contains io statistics. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = HostIoStatistics.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "resourceName" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class HostIoStatistics extends HostResourceStatistics { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("usage") + private Double usage; + + public Builder usage(Double usage) { + this.usage = usage; + this.__explicitlySet__.add("usage"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("capacity") + private Double capacity; + + public Builder capacity(Double capacity) { + this.capacity = capacity; + this.__explicitlySet__.add("capacity"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("utilizationPercent") + private Double utilizationPercent; + + public Builder utilizationPercent(Double utilizationPercent) { + this.utilizationPercent = utilizationPercent; + this.__explicitlySet__.add("utilizationPercent"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("usageChangePercent") + private Double usageChangePercent; + + public Builder usageChangePercent(Double usageChangePercent) { + this.usageChangePercent = usageChangePercent; + this.__explicitlySet__.add("usageChangePercent"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("diskReadInMBs") + private Double diskReadInMBs; + + public Builder diskReadInMBs(Double diskReadInMBs) { + this.diskReadInMBs = diskReadInMBs; + this.__explicitlySet__.add("diskReadInMBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("diskWriteInMBs") + private Double diskWriteInMBs; + + public Builder diskWriteInMBs(Double diskWriteInMBs) { + this.diskWriteInMBs = diskWriteInMBs; + this.__explicitlySet__.add("diskWriteInMBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("diskIops") + private Double diskIops; + + public Builder diskIops(Double diskIops) { + this.diskIops = diskIops; + this.__explicitlySet__.add("diskIops"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public HostIoStatistics build() { + HostIoStatistics model = + new HostIoStatistics( + this.usage, + this.capacity, + this.utilizationPercent, + this.usageChangePercent, + this.diskReadInMBs, + this.diskWriteInMBs, + this.diskIops); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(HostIoStatistics model) { + if (model.wasPropertyExplicitlySet("usage")) { + this.usage(model.getUsage()); + } + if (model.wasPropertyExplicitlySet("capacity")) { + this.capacity(model.getCapacity()); + } + if (model.wasPropertyExplicitlySet("utilizationPercent")) { + this.utilizationPercent(model.getUtilizationPercent()); + } + if (model.wasPropertyExplicitlySet("usageChangePercent")) { + this.usageChangePercent(model.getUsageChangePercent()); + } + if (model.wasPropertyExplicitlySet("diskReadInMBs")) { + this.diskReadInMBs(model.getDiskReadInMBs()); + } + if (model.wasPropertyExplicitlySet("diskWriteInMBs")) { + this.diskWriteInMBs(model.getDiskWriteInMBs()); + } + if (model.wasPropertyExplicitlySet("diskIops")) { + this.diskIops(model.getDiskIops()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public HostIoStatistics( + Double usage, + Double capacity, + Double utilizationPercent, + Double usageChangePercent, + Double diskReadInMBs, + Double diskWriteInMBs, + Double diskIops) { + super(usage, capacity, utilizationPercent, usageChangePercent); + this.diskReadInMBs = diskReadInMBs; + this.diskWriteInMBs = diskWriteInMBs; + this.diskIops = diskIops; + } + + @com.fasterxml.jackson.annotation.JsonProperty("diskReadInMBs") + private final Double diskReadInMBs; + + public Double getDiskReadInMBs() { + return diskReadInMBs; + } + + @com.fasterxml.jackson.annotation.JsonProperty("diskWriteInMBs") + private final Double diskWriteInMBs; + + public Double getDiskWriteInMBs() { + return diskWriteInMBs; + } + + @com.fasterxml.jackson.annotation.JsonProperty("diskIops") + private final Double diskIops; + + public Double getDiskIops() { + return diskIops; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("HostIoStatistics("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", diskReadInMBs=").append(String.valueOf(this.diskReadInMBs)); + sb.append(", diskWriteInMBs=").append(String.valueOf(this.diskWriteInMBs)); + sb.append(", diskIops=").append(String.valueOf(this.diskIops)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof HostIoStatistics)) { + return false; + } + + HostIoStatistics other = (HostIoStatistics) o; + return java.util.Objects.equals(this.diskReadInMBs, other.diskReadInMBs) + && java.util.Objects.equals(this.diskWriteInMBs, other.diskWriteInMBs) + && java.util.Objects.equals(this.diskIops, other.diskIops) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.diskReadInMBs == null ? 43 : this.diskReadInMBs.hashCode()); + result = + (result * PRIME) + + (this.diskWriteInMBs == null ? 43 : this.diskWriteInMBs.hashCode()); + result = (result * PRIME) + (this.diskIops == null ? 43 : this.diskIops.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostIoUsage.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostIoUsage.java new file mode 100644 index 00000000000..8e71695b782 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostIoUsage.java @@ -0,0 +1,354 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Host IO Performance Metrics + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = HostIoUsage.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "metricName" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class HostIoUsage extends HostPerformanceMetricGroup { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("timeCollected") + private java.util.Date timeCollected; + + public Builder timeCollected(java.util.Date timeCollected) { + this.timeCollected = timeCollected; + this.__explicitlySet__.add("timeCollected"); + return this; + } + /** + * Mount point + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mountPoint") + private String mountPoint; + + /** + * Mount point + * @param mountPoint the value to set + * @return this builder + **/ + public Builder mountPoint(String mountPoint) { + this.mountPoint = mountPoint; + this.__explicitlySet__.add("mountPoint"); + return this; + } + /** + * Bytes Read + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskBytesRead") + private Double diskBytesRead; + + /** + * Bytes Read + * @param diskBytesRead the value to set + * @return this builder + **/ + public Builder diskBytesRead(Double diskBytesRead) { + this.diskBytesRead = diskBytesRead; + this.__explicitlySet__.add("diskBytesRead"); + return this; + } + /** + * Bytes Written + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskBytesWritten") + private Double diskBytesWritten; + + /** + * Bytes Written + * @param diskBytesWritten the value to set + * @return this builder + **/ + public Builder diskBytesWritten(Double diskBytesWritten) { + this.diskBytesWritten = diskBytesWritten; + this.__explicitlySet__.add("diskBytesWritten"); + return this; + } + /** + * Read transactions per second + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskIopsRead") + private Double diskIopsRead; + + /** + * Read transactions per second + * @param diskIopsRead the value to set + * @return this builder + **/ + public Builder diskIopsRead(Double diskIopsRead) { + this.diskIopsRead = diskIopsRead; + this.__explicitlySet__.add("diskIopsRead"); + return this; + } + /** + * Write transactions per second + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskIopsWritten") + private Double diskIopsWritten; + + /** + * Write transactions per second + * @param diskIopsWritten the value to set + * @return this builder + **/ + public Builder diskIopsWritten(Double diskIopsWritten) { + this.diskIopsWritten = diskIopsWritten; + this.__explicitlySet__.add("diskIopsWritten"); + return this; + } + /** + * IO Transactions per second + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskIops") + private Double diskIops; + + /** + * IO Transactions per second + * @param diskIops the value to set + * @return this builder + **/ + public Builder diskIops(Double diskIops) { + this.diskIops = diskIops; + this.__explicitlySet__.add("diskIops"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public HostIoUsage build() { + HostIoUsage model = + new HostIoUsage( + this.timeCollected, + this.mountPoint, + this.diskBytesRead, + this.diskBytesWritten, + this.diskIopsRead, + this.diskIopsWritten, + this.diskIops); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(HostIoUsage model) { + if (model.wasPropertyExplicitlySet("timeCollected")) { + this.timeCollected(model.getTimeCollected()); + } + if (model.wasPropertyExplicitlySet("mountPoint")) { + this.mountPoint(model.getMountPoint()); + } + if (model.wasPropertyExplicitlySet("diskBytesRead")) { + this.diskBytesRead(model.getDiskBytesRead()); + } + if (model.wasPropertyExplicitlySet("diskBytesWritten")) { + this.diskBytesWritten(model.getDiskBytesWritten()); + } + if (model.wasPropertyExplicitlySet("diskIopsRead")) { + this.diskIopsRead(model.getDiskIopsRead()); + } + if (model.wasPropertyExplicitlySet("diskIopsWritten")) { + this.diskIopsWritten(model.getDiskIopsWritten()); + } + if (model.wasPropertyExplicitlySet("diskIops")) { + this.diskIops(model.getDiskIops()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public HostIoUsage( + java.util.Date timeCollected, + String mountPoint, + Double diskBytesRead, + Double diskBytesWritten, + Double diskIopsRead, + Double diskIopsWritten, + Double diskIops) { + super(timeCollected); + this.mountPoint = mountPoint; + this.diskBytesRead = diskBytesRead; + this.diskBytesWritten = diskBytesWritten; + this.diskIopsRead = diskIopsRead; + this.diskIopsWritten = diskIopsWritten; + this.diskIops = diskIops; + } + + /** + * Mount point + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mountPoint") + private final String mountPoint; + + /** + * Mount point + * @return the value + **/ + public String getMountPoint() { + return mountPoint; + } + + /** + * Bytes Read + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskBytesRead") + private final Double diskBytesRead; + + /** + * Bytes Read + * @return the value + **/ + public Double getDiskBytesRead() { + return diskBytesRead; + } + + /** + * Bytes Written + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskBytesWritten") + private final Double diskBytesWritten; + + /** + * Bytes Written + * @return the value + **/ + public Double getDiskBytesWritten() { + return diskBytesWritten; + } + + /** + * Read transactions per second + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskIopsRead") + private final Double diskIopsRead; + + /** + * Read transactions per second + * @return the value + **/ + public Double getDiskIopsRead() { + return diskIopsRead; + } + + /** + * Write transactions per second + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskIopsWritten") + private final Double diskIopsWritten; + + /** + * Write transactions per second + * @return the value + **/ + public Double getDiskIopsWritten() { + return diskIopsWritten; + } + + /** + * IO Transactions per second + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskIops") + private final Double diskIops; + + /** + * IO Transactions per second + * @return the value + **/ + public Double getDiskIops() { + return diskIops; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("HostIoUsage("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", mountPoint=").append(String.valueOf(this.mountPoint)); + sb.append(", diskBytesRead=").append(String.valueOf(this.diskBytesRead)); + sb.append(", diskBytesWritten=").append(String.valueOf(this.diskBytesWritten)); + sb.append(", diskIopsRead=").append(String.valueOf(this.diskIopsRead)); + sb.append(", diskIopsWritten=").append(String.valueOf(this.diskIopsWritten)); + sb.append(", diskIops=").append(String.valueOf(this.diskIops)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof HostIoUsage)) { + return false; + } + + HostIoUsage other = (HostIoUsage) o; + return java.util.Objects.equals(this.mountPoint, other.mountPoint) + && java.util.Objects.equals(this.diskBytesRead, other.diskBytesRead) + && java.util.Objects.equals(this.diskBytesWritten, other.diskBytesWritten) + && java.util.Objects.equals(this.diskIopsRead, other.diskIopsRead) + && java.util.Objects.equals(this.diskIopsWritten, other.diskIopsWritten) + && java.util.Objects.equals(this.diskIops, other.diskIops) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.mountPoint == null ? 43 : this.mountPoint.hashCode()); + result = + (result * PRIME) + + (this.diskBytesRead == null ? 43 : this.diskBytesRead.hashCode()); + result = + (result * PRIME) + + (this.diskBytesWritten == null ? 43 : this.diskBytesWritten.hashCode()); + result = (result * PRIME) + (this.diskIopsRead == null ? 43 : this.diskIopsRead.hashCode()); + result = + (result * PRIME) + + (this.diskIopsWritten == null ? 43 : this.diskIopsWritten.hashCode()); + result = (result * PRIME) + (this.diskIops == null ? 43 : this.diskIops.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostMemoryRecommendations.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostMemoryRecommendations.java new file mode 100644 index 00000000000..5ede8362370 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostMemoryRecommendations.java @@ -0,0 +1,275 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Contains memory recommendation. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = HostMemoryRecommendations.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "metricRecommendationName" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class HostMemoryRecommendations extends HostInsightHostRecommendations { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Identify unused instances based on cpu, memory and network metrics. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("unusedInstance") + private UnusedInstance unusedInstance; + + /** + * Identify unused instances based on cpu, memory and network metrics. + * @param unusedInstance the value to set + * @return this builder + **/ + public Builder unusedInstance(UnusedInstance unusedInstance) { + this.unusedInstance = unusedInstance; + this.__explicitlySet__.add("unusedInstance"); + return this; + } + /** + * Identify if an instance is abandoned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAbandonedInstance") + private Boolean isAbandonedInstance; + + /** + * Identify if an instance is abandoned. + * @param isAbandonedInstance the value to set + * @return this builder + **/ + public Builder isAbandonedInstance(Boolean isAbandonedInstance) { + this.isAbandonedInstance = isAbandonedInstance; + this.__explicitlySet__.add("isAbandonedInstance"); + return this; + } + /** + * Show if OPSI recommends to change memory capacity based on Memory utilization and current shape. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memoryOptimization") + private String memoryOptimization; + + /** + * Show if OPSI recommends to change memory capacity based on Memory utilization and current shape. + * @param memoryOptimization the value to set + * @return this builder + **/ + public Builder memoryOptimization(String memoryOptimization) { + this.memoryOptimization = memoryOptimization; + this.__explicitlySet__.add("memoryOptimization"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public HostMemoryRecommendations build() { + HostMemoryRecommendations model = + new HostMemoryRecommendations( + this.unusedInstance, this.isAbandonedInstance, this.memoryOptimization); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(HostMemoryRecommendations model) { + if (model.wasPropertyExplicitlySet("unusedInstance")) { + this.unusedInstance(model.getUnusedInstance()); + } + if (model.wasPropertyExplicitlySet("isAbandonedInstance")) { + this.isAbandonedInstance(model.getIsAbandonedInstance()); + } + if (model.wasPropertyExplicitlySet("memoryOptimization")) { + this.memoryOptimization(model.getMemoryOptimization()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public HostMemoryRecommendations( + UnusedInstance unusedInstance, Boolean isAbandonedInstance, String memoryOptimization) { + super(); + this.unusedInstance = unusedInstance; + this.isAbandonedInstance = isAbandonedInstance; + this.memoryOptimization = memoryOptimization; + } + + /** + * Identify unused instances based on cpu, memory and network metrics. + **/ + public enum UnusedInstance { + InUse("IN_USE"), + NotInUse("NOT_IN_USE"), + IsNotDetermined("IS_NOT_DETERMINED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UnusedInstance.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (UnusedInstance v : UnusedInstance.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + UnusedInstance(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static UnusedInstance create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'UnusedInstance', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Identify unused instances based on cpu, memory and network metrics. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("unusedInstance") + private final UnusedInstance unusedInstance; + + /** + * Identify unused instances based on cpu, memory and network metrics. + * @return the value + **/ + public UnusedInstance getUnusedInstance() { + return unusedInstance; + } + + /** + * Identify if an instance is abandoned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAbandonedInstance") + private final Boolean isAbandonedInstance; + + /** + * Identify if an instance is abandoned. + * @return the value + **/ + public Boolean getIsAbandonedInstance() { + return isAbandonedInstance; + } + + /** + * Show if OPSI recommends to change memory capacity based on Memory utilization and current shape. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("memoryOptimization") + private final String memoryOptimization; + + /** + * Show if OPSI recommends to change memory capacity based on Memory utilization and current shape. + * @return the value + **/ + public String getMemoryOptimization() { + return memoryOptimization; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("HostMemoryRecommendations("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", unusedInstance=").append(String.valueOf(this.unusedInstance)); + sb.append(", isAbandonedInstance=").append(String.valueOf(this.isAbandonedInstance)); + sb.append(", memoryOptimization=").append(String.valueOf(this.memoryOptimization)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof HostMemoryRecommendations)) { + return false; + } + + HostMemoryRecommendations other = (HostMemoryRecommendations) o; + return java.util.Objects.equals(this.unusedInstance, other.unusedInstance) + && java.util.Objects.equals(this.isAbandonedInstance, other.isAbandonedInstance) + && java.util.Objects.equals(this.memoryOptimization, other.memoryOptimization) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.unusedInstance == null ? 43 : this.unusedInstance.hashCode()); + result = + (result * PRIME) + + (this.isAbandonedInstance == null + ? 43 + : this.isAbandonedInstance.hashCode()); + result = + (result * PRIME) + + (this.memoryOptimization == null + ? 43 + : this.memoryOptimization.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostNetworkRecommendations.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostNetworkRecommendations.java new file mode 100644 index 00000000000..74f9e499e7a --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostNetworkRecommendations.java @@ -0,0 +1,232 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Contains network recommendation. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = HostNetworkRecommendations.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "metricRecommendationName" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class HostNetworkRecommendations extends HostInsightHostRecommendations { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Identify unused instances based on cpu, memory and network metrics. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("unusedInstance") + private UnusedInstance unusedInstance; + + /** + * Identify unused instances based on cpu, memory and network metrics. + * @param unusedInstance the value to set + * @return this builder + **/ + public Builder unusedInstance(UnusedInstance unusedInstance) { + this.unusedInstance = unusedInstance; + this.__explicitlySet__.add("unusedInstance"); + return this; + } + /** + * Identify if an instance is abandoned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAbandonedInstance") + private Boolean isAbandonedInstance; + + /** + * Identify if an instance is abandoned. + * @param isAbandonedInstance the value to set + * @return this builder + **/ + public Builder isAbandonedInstance(Boolean isAbandonedInstance) { + this.isAbandonedInstance = isAbandonedInstance; + this.__explicitlySet__.add("isAbandonedInstance"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public HostNetworkRecommendations build() { + HostNetworkRecommendations model = + new HostNetworkRecommendations(this.unusedInstance, this.isAbandonedInstance); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(HostNetworkRecommendations model) { + if (model.wasPropertyExplicitlySet("unusedInstance")) { + this.unusedInstance(model.getUnusedInstance()); + } + if (model.wasPropertyExplicitlySet("isAbandonedInstance")) { + this.isAbandonedInstance(model.getIsAbandonedInstance()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public HostNetworkRecommendations(UnusedInstance unusedInstance, Boolean isAbandonedInstance) { + super(); + this.unusedInstance = unusedInstance; + this.isAbandonedInstance = isAbandonedInstance; + } + + /** + * Identify unused instances based on cpu, memory and network metrics. + **/ + public enum UnusedInstance { + InUse("IN_USE"), + NotInUse("NOT_IN_USE"), + IsNotDetermined("IS_NOT_DETERMINED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UnusedInstance.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (UnusedInstance v : UnusedInstance.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + UnusedInstance(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static UnusedInstance create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'UnusedInstance', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Identify unused instances based on cpu, memory and network metrics. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("unusedInstance") + private final UnusedInstance unusedInstance; + + /** + * Identify unused instances based on cpu, memory and network metrics. + * @return the value + **/ + public UnusedInstance getUnusedInstance() { + return unusedInstance; + } + + /** + * Identify if an instance is abandoned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAbandonedInstance") + private final Boolean isAbandonedInstance; + + /** + * Identify if an instance is abandoned. + * @return the value + **/ + public Boolean getIsAbandonedInstance() { + return isAbandonedInstance; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("HostNetworkRecommendations("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", unusedInstance=").append(String.valueOf(this.unusedInstance)); + sb.append(", isAbandonedInstance=").append(String.valueOf(this.isAbandonedInstance)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof HostNetworkRecommendations)) { + return false; + } + + HostNetworkRecommendations other = (HostNetworkRecommendations) o; + return java.util.Objects.equals(this.unusedInstance, other.unusedInstance) + && java.util.Objects.equals(this.isAbandonedInstance, other.isAbandonedInstance) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.unusedInstance == null ? 43 : this.unusedInstance.hashCode()); + result = + (result * PRIME) + + (this.isAbandonedInstance == null + ? 43 + : this.isAbandonedInstance.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostPerformanceMetricGroup.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostPerformanceMetricGroup.java index 39fc524e83c..9609bcf8d9c 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostPerformanceMetricGroup.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostPerformanceMetricGroup.java @@ -35,10 +35,22 @@ value = HostCpuUsage.class, name = "HOST_CPU_USAGE" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = HostGpuUsage.class, + name = "HOST_GPU_USAGE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = HostGpuProcesses.class, + name = "HOST_GPU_PROCESSES" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = HostFilesystemUsage.class, name = "HOST_FILESYSTEM_USAGE" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = HostIoUsage.class, + name = "HOST_IO_USAGE" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = HostNetworkActivitySummary.class, name = "HOST_NETWORK_ACTIVITY_SUMMARY" @@ -125,6 +137,9 @@ public enum MetricName { HostNetworkActivitySummary("HOST_NETWORK_ACTIVITY_SUMMARY"), HostTopProcesses("HOST_TOP_PROCESSES"), HostFilesystemUsage("HOST_FILESYSTEM_USAGE"), + HostGpuUsage("HOST_GPU_USAGE"), + HostGpuProcesses("HOST_GPU_PROCESSES"), + HostIoUsage("HOST_IO_USAGE"), ; private final String value; diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostResourceStatistics.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostResourceStatistics.java index 503ad1a8fe8..4d136ecd5c4 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostResourceStatistics.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostResourceStatistics.java @@ -35,6 +35,10 @@ value = HostMemoryStatistics.class, name = "HOST_MEMORY_STATISTICS" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = HostIoStatistics.class, + name = "HOST_IO_STATISTICS" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = HostCpuStatistics.class, name = "HOST_CPU_STATISTICS" @@ -187,6 +191,7 @@ public enum ResourceName { HostMemoryStatistics("HOST_MEMORY_STATISTICS"), HostStorageStatistics("HOST_STORAGE_STATISTICS"), HostNetworkStatistics("HOST_NETWORK_STATISTICS"), + HostIoStatistics("HOST_IO_STATISTICS"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostStorageRecommendations.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostStorageRecommendations.java new file mode 100644 index 00000000000..162a9f4cb06 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostStorageRecommendations.java @@ -0,0 +1,232 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Contains storage recommendation. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = HostStorageRecommendations.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "metricRecommendationName" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class HostStorageRecommendations extends HostInsightHostRecommendations { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Identify unused instances based on cpu, memory and network metrics. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("unusedInstance") + private UnusedInstance unusedInstance; + + /** + * Identify unused instances based on cpu, memory and network metrics. + * @param unusedInstance the value to set + * @return this builder + **/ + public Builder unusedInstance(UnusedInstance unusedInstance) { + this.unusedInstance = unusedInstance; + this.__explicitlySet__.add("unusedInstance"); + return this; + } + /** + * Identify if an instance is abandoned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAbandonedInstance") + private Boolean isAbandonedInstance; + + /** + * Identify if an instance is abandoned. + * @param isAbandonedInstance the value to set + * @return this builder + **/ + public Builder isAbandonedInstance(Boolean isAbandonedInstance) { + this.isAbandonedInstance = isAbandonedInstance; + this.__explicitlySet__.add("isAbandonedInstance"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public HostStorageRecommendations build() { + HostStorageRecommendations model = + new HostStorageRecommendations(this.unusedInstance, this.isAbandonedInstance); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(HostStorageRecommendations model) { + if (model.wasPropertyExplicitlySet("unusedInstance")) { + this.unusedInstance(model.getUnusedInstance()); + } + if (model.wasPropertyExplicitlySet("isAbandonedInstance")) { + this.isAbandonedInstance(model.getIsAbandonedInstance()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public HostStorageRecommendations(UnusedInstance unusedInstance, Boolean isAbandonedInstance) { + super(); + this.unusedInstance = unusedInstance; + this.isAbandonedInstance = isAbandonedInstance; + } + + /** + * Identify unused instances based on cpu, memory and network metrics. + **/ + public enum UnusedInstance { + InUse("IN_USE"), + NotInUse("NOT_IN_USE"), + IsNotDetermined("IS_NOT_DETERMINED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UnusedInstance.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (UnusedInstance v : UnusedInstance.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + UnusedInstance(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static UnusedInstance create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'UnusedInstance', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Identify unused instances based on cpu, memory and network metrics. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("unusedInstance") + private final UnusedInstance unusedInstance; + + /** + * Identify unused instances based on cpu, memory and network metrics. + * @return the value + **/ + public UnusedInstance getUnusedInstance() { + return unusedInstance; + } + + /** + * Identify if an instance is abandoned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isAbandonedInstance") + private final Boolean isAbandonedInstance; + + /** + * Identify if an instance is abandoned. + * @return the value + **/ + public Boolean getIsAbandonedInstance() { + return isAbandonedInstance; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("HostStorageRecommendations("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", unusedInstance=").append(String.valueOf(this.unusedInstance)); + sb.append(", isAbandonedInstance=").append(String.valueOf(this.isAbandonedInstance)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof HostStorageRecommendations)) { + return false; + } + + HostStorageRecommendations other = (HostStorageRecommendations) o; + return java.util.Objects.equals(this.unusedInstance, other.unusedInstance) + && java.util.Objects.equals(this.isAbandonedInstance, other.isAbandonedInstance) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.unusedInstance == null ? 43 : this.unusedInstance.hashCode()); + result = + (result * PRIME) + + (this.isAbandonedInstance == null + ? 43 + : this.isAbandonedInstance.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostTopProcesses.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostTopProcesses.java index a4783244ccd..57fb1964961 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostTopProcesses.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/HostTopProcesses.java @@ -198,6 +198,102 @@ public Builder totalProcesses(java.math.BigDecimal totalProcesses) { this.__explicitlySet__.add("totalProcesses"); return this; } + /** + * Container id if this process corresponds to a running container in the host + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerId") + private String containerId; + + /** + * Container id if this process corresponds to a running container in the host + * @param containerId the value to set + * @return this builder + **/ + public Builder containerId(String containerId) { + this.containerId = containerId; + this.__explicitlySet__.add("containerId"); + return this; + } + /** + * Bytes Read + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskBytesRead") + private Double diskBytesRead; + + /** + * Bytes Read + * @param diskBytesRead the value to set + * @return this builder + **/ + public Builder diskBytesRead(Double diskBytesRead) { + this.diskBytesRead = diskBytesRead; + this.__explicitlySet__.add("diskBytesRead"); + return this; + } + /** + * Bytes Written + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskBytesWritten") + private Double diskBytesWritten; + + /** + * Bytes Written + * @param diskBytesWritten the value to set + * @return this builder + **/ + public Builder diskBytesWritten(Double diskBytesWritten) { + this.diskBytesWritten = diskBytesWritten; + this.__explicitlySet__.add("diskBytesWritten"); + return this; + } + /** + * Read transactions per second + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskIopsRead") + private Double diskIopsRead; + + /** + * Read transactions per second + * @param diskIopsRead the value to set + * @return this builder + **/ + public Builder diskIopsRead(Double diskIopsRead) { + this.diskIopsRead = diskIopsRead; + this.__explicitlySet__.add("diskIopsRead"); + return this; + } + /** + * Write transactions per second + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskIopsWritten") + private Double diskIopsWritten; + + /** + * Write transactions per second + * @param diskIopsWritten the value to set + * @return this builder + **/ + public Builder diskIopsWritten(Double diskIopsWritten) { + this.diskIopsWritten = diskIopsWritten; + this.__explicitlySet__.add("diskIopsWritten"); + return this; + } + /** + * IO Transactions per second + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskIops") + private Double diskIops; + + /** + * IO Transactions per second + * @param diskIops the value to set + * @return this builder + **/ + public Builder diskIops(Double diskIops) { + this.diskIops = diskIops; + this.__explicitlySet__.add("diskIops"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -215,7 +311,13 @@ public HostTopProcesses build() { this.virtualMemoryInMBs, this.physicalMemoryInMBs, this.startTime, - this.totalProcesses); + this.totalProcesses, + this.containerId, + this.diskBytesRead, + this.diskBytesWritten, + this.diskIopsRead, + this.diskIopsWritten, + this.diskIops); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -257,6 +359,24 @@ public Builder copy(HostTopProcesses model) { if (model.wasPropertyExplicitlySet("totalProcesses")) { this.totalProcesses(model.getTotalProcesses()); } + if (model.wasPropertyExplicitlySet("containerId")) { + this.containerId(model.getContainerId()); + } + if (model.wasPropertyExplicitlySet("diskBytesRead")) { + this.diskBytesRead(model.getDiskBytesRead()); + } + if (model.wasPropertyExplicitlySet("diskBytesWritten")) { + this.diskBytesWritten(model.getDiskBytesWritten()); + } + if (model.wasPropertyExplicitlySet("diskIopsRead")) { + this.diskIopsRead(model.getDiskIopsRead()); + } + if (model.wasPropertyExplicitlySet("diskIopsWritten")) { + this.diskIopsWritten(model.getDiskIopsWritten()); + } + if (model.wasPropertyExplicitlySet("diskIops")) { + this.diskIops(model.getDiskIops()); + } return this; } } @@ -284,7 +404,13 @@ public HostTopProcesses( Double virtualMemoryInMBs, Double physicalMemoryInMBs, java.util.Date startTime, - java.math.BigDecimal totalProcesses) { + java.math.BigDecimal totalProcesses, + String containerId, + Double diskBytesRead, + Double diskBytesWritten, + Double diskIopsRead, + Double diskIopsWritten, + Double diskIops) { super(timeCollected); this.pid = pid; this.userName = userName; @@ -296,6 +422,12 @@ public HostTopProcesses( this.physicalMemoryInMBs = physicalMemoryInMBs; this.startTime = startTime; this.totalProcesses = totalProcesses; + this.containerId = containerId; + this.diskBytesRead = diskBytesRead; + this.diskBytesWritten = diskBytesWritten; + this.diskIopsRead = diskIopsRead; + this.diskIopsWritten = diskIopsWritten; + this.diskIops = diskIops; } /** @@ -442,6 +574,90 @@ public java.math.BigDecimal getTotalProcesses() { return totalProcesses; } + /** + * Container id if this process corresponds to a running container in the host + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerId") + private final String containerId; + + /** + * Container id if this process corresponds to a running container in the host + * @return the value + **/ + public String getContainerId() { + return containerId; + } + + /** + * Bytes Read + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskBytesRead") + private final Double diskBytesRead; + + /** + * Bytes Read + * @return the value + **/ + public Double getDiskBytesRead() { + return diskBytesRead; + } + + /** + * Bytes Written + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskBytesWritten") + private final Double diskBytesWritten; + + /** + * Bytes Written + * @return the value + **/ + public Double getDiskBytesWritten() { + return diskBytesWritten; + } + + /** + * Read transactions per second + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskIopsRead") + private final Double diskIopsRead; + + /** + * Read transactions per second + * @return the value + **/ + public Double getDiskIopsRead() { + return diskIopsRead; + } + + /** + * Write transactions per second + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskIopsWritten") + private final Double diskIopsWritten; + + /** + * Write transactions per second + * @return the value + **/ + public Double getDiskIopsWritten() { + return diskIopsWritten; + } + + /** + * IO Transactions per second + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskIops") + private final Double diskIops; + + /** + * IO Transactions per second + * @return the value + **/ + public Double getDiskIops() { + return diskIops; + } + @Override public String toString() { return this.toString(true); @@ -467,6 +683,12 @@ public String toString(boolean includeByteArrayContents) { sb.append(", physicalMemoryInMBs=").append(String.valueOf(this.physicalMemoryInMBs)); sb.append(", startTime=").append(String.valueOf(this.startTime)); sb.append(", totalProcesses=").append(String.valueOf(this.totalProcesses)); + sb.append(", containerId=").append(String.valueOf(this.containerId)); + sb.append(", diskBytesRead=").append(String.valueOf(this.diskBytesRead)); + sb.append(", diskBytesWritten=").append(String.valueOf(this.diskBytesWritten)); + sb.append(", diskIopsRead=").append(String.valueOf(this.diskIopsRead)); + sb.append(", diskIopsWritten=").append(String.valueOf(this.diskIopsWritten)); + sb.append(", diskIops=").append(String.valueOf(this.diskIops)); sb.append(")"); return sb.toString(); } @@ -492,6 +714,12 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.physicalMemoryInMBs, other.physicalMemoryInMBs) && java.util.Objects.equals(this.startTime, other.startTime) && java.util.Objects.equals(this.totalProcesses, other.totalProcesses) + && java.util.Objects.equals(this.containerId, other.containerId) + && java.util.Objects.equals(this.diskBytesRead, other.diskBytesRead) + && java.util.Objects.equals(this.diskBytesWritten, other.diskBytesWritten) + && java.util.Objects.equals(this.diskIopsRead, other.diskIopsRead) + && java.util.Objects.equals(this.diskIopsWritten, other.diskIopsWritten) + && java.util.Objects.equals(this.diskIops, other.diskIops) && super.equals(other); } @@ -529,6 +757,18 @@ public int hashCode() { result = (result * PRIME) + (this.totalProcesses == null ? 43 : this.totalProcesses.hashCode()); + result = (result * PRIME) + (this.containerId == null ? 43 : this.containerId.hashCode()); + result = + (result * PRIME) + + (this.diskBytesRead == null ? 43 : this.diskBytesRead.hashCode()); + result = + (result * PRIME) + + (this.diskBytesWritten == null ? 43 : this.diskBytesWritten.hashCode()); + result = (result * PRIME) + (this.diskIopsRead == null ? 43 : this.diskIopsRead.hashCode()); + result = + (result * PRIME) + + (this.diskIopsWritten == null ? 43 : this.diskIopsWritten.hashCode()); + result = (result * PRIME) + (this.diskIops == null ? 43 : this.diskIops.hashCode()); return result; } } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ImportableEnterpriseManagerEntity.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ImportableEnterpriseManagerEntity.java index 22b229b4813..aff661f3915 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ImportableEnterpriseManagerEntity.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ImportableEnterpriseManagerEntity.java @@ -110,13 +110,13 @@ public Builder enterpriseManagerEntityIdentifier(String enterpriseManagerEntityI return this; } /** - * Operations Insights internal representation of the resource type. + * Ops Insights internal representation of the resource type. **/ @com.fasterxml.jackson.annotation.JsonProperty("opsiEntityType") private String opsiEntityType; /** - * Operations Insights internal representation of the resource type. + * Ops Insights internal representation of the resource type. * @param opsiEntityType the value to set * @return this builder **/ @@ -233,13 +233,13 @@ public String getEnterpriseManagerEntityIdentifier() { } /** - * Operations Insights internal representation of the resource type. + * Ops Insights internal representation of the resource type. **/ @com.fasterxml.jackson.annotation.JsonProperty("opsiEntityType") private final String opsiEntityType; /** - * Operations Insights internal representation of the resource type. + * Ops Insights internal representation of the resource type. * @return the value **/ public String getOpsiEntityType() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/IngestMySqlSqlStatsDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/IngestMySqlSqlStatsDetails.java new file mode 100644 index 00000000000..858238e1649 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/IngestMySqlSqlStatsDetails.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Collection of MySql SQL Stats Metric Entries + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = IngestMySqlSqlStatsDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class IngestMySqlSqlStatsDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public IngestMySqlSqlStatsDetails(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of MySql SQL Stats Metric Entries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of MySql SQL Stats Metric Entries. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public IngestMySqlSqlStatsDetails build() { + IngestMySqlSqlStatsDetails model = new IngestMySqlSqlStatsDetails(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(IngestMySqlSqlStatsDetails model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of MySql SQL Stats Metric Entries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of MySql SQL Stats Metric Entries. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("IngestMySqlSqlStatsDetails("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof IngestMySqlSqlStatsDetails)) { + return false; + } + + IngestMySqlSqlStatsDetails other = (IngestMySqlSqlStatsDetails) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/IngestMySqlSqlStatsResponseDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/IngestMySqlSqlStatsResponseDetails.java new file mode 100644 index 00000000000..174b22d5324 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/IngestMySqlSqlStatsResponseDetails.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * The response object returned from IngestMySqlSqlStats operation. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = IngestMySqlSqlStatsResponseDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class IngestMySqlSqlStatsResponseDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"message"}) + public IngestMySqlSqlStatsResponseDetails(String message) { + super(); + this.message = message; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Success message returned as a result of the upload. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * Success message returned as a result of the upload. + * + * @param message the value to set + * @return this builder + **/ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public IngestMySqlSqlStatsResponseDetails build() { + IngestMySqlSqlStatsResponseDetails model = + new IngestMySqlSqlStatsResponseDetails(this.message); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(IngestMySqlSqlStatsResponseDetails model) { + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Success message returned as a result of the upload. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * Success message returned as a result of the upload. + * + * @return the value + **/ + public String getMessage() { + return message; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("IngestMySqlSqlStatsResponseDetails("); + sb.append("super=").append(super.toString()); + sb.append("message=").append(String.valueOf(this.message)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof IngestMySqlSqlStatsResponseDetails)) { + return false; + } + + IngestMySqlSqlStatsResponseDetails other = (IngestMySqlSqlStatsResponseDetails) o; + return java.util.Objects.equals(this.message, other.message) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/IoUsageTrend.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/IoUsageTrend.java new file mode 100644 index 00000000000..7bc84e84120 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/IoUsageTrend.java @@ -0,0 +1,348 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Usage data for IO interface per usage unit. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = IoUsageTrend.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class IoUsageTrend extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "endTimestamp", + "diskBytesReadInMBs", + "diskBytesWrittenInMBs", + "diskIopsRead", + "diskIopsWritten", + "diskIops" + }) + public IoUsageTrend( + java.util.Date endTimestamp, + Double diskBytesReadInMBs, + Double diskBytesWrittenInMBs, + Double diskIopsRead, + Double diskIopsWritten, + Double diskIops) { + super(); + this.endTimestamp = endTimestamp; + this.diskBytesReadInMBs = diskBytesReadInMBs; + this.diskBytesWrittenInMBs = diskBytesWrittenInMBs; + this.diskIopsRead = diskIopsRead; + this.diskIopsWritten = diskIopsWritten; + this.diskIops = diskIops; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The timestamp in which the current sampling period ends in RFC 3339 format. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("endTimestamp") + private java.util.Date endTimestamp; + + /** + * The timestamp in which the current sampling period ends in RFC 3339 format. + * @param endTimestamp the value to set + * @return this builder + **/ + public Builder endTimestamp(java.util.Date endTimestamp) { + this.endTimestamp = endTimestamp; + this.__explicitlySet__.add("endTimestamp"); + return this; + } + /** + * MBs Read. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskBytesReadInMBs") + private Double diskBytesReadInMBs; + + /** + * MBs Read. + * @param diskBytesReadInMBs the value to set + * @return this builder + **/ + public Builder diskBytesReadInMBs(Double diskBytesReadInMBs) { + this.diskBytesReadInMBs = diskBytesReadInMBs; + this.__explicitlySet__.add("diskBytesReadInMBs"); + return this; + } + /** + * MBs Written. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskBytesWrittenInMBs") + private Double diskBytesWrittenInMBs; + + /** + * MBs Written. + * @param diskBytesWrittenInMBs the value to set + * @return this builder + **/ + public Builder diskBytesWrittenInMBs(Double diskBytesWrittenInMBs) { + this.diskBytesWrittenInMBs = diskBytesWrittenInMBs; + this.__explicitlySet__.add("diskBytesWrittenInMBs"); + return this; + } + /** + * Read IO operations per second. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskIopsRead") + private Double diskIopsRead; + + /** + * Read IO operations per second. + * @param diskIopsRead the value to set + * @return this builder + **/ + public Builder diskIopsRead(Double diskIopsRead) { + this.diskIopsRead = diskIopsRead; + this.__explicitlySet__.add("diskIopsRead"); + return this; + } + /** + * Write IO operations per second. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskIopsWritten") + private Double diskIopsWritten; + + /** + * Write IO operations per second. + * @param diskIopsWritten the value to set + * @return this builder + **/ + public Builder diskIopsWritten(Double diskIopsWritten) { + this.diskIopsWritten = diskIopsWritten; + this.__explicitlySet__.add("diskIopsWritten"); + return this; + } + /** + * IO operations per second. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskIops") + private Double diskIops; + + /** + * IO operations per second. + * @param diskIops the value to set + * @return this builder + **/ + public Builder diskIops(Double diskIops) { + this.diskIops = diskIops; + this.__explicitlySet__.add("diskIops"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public IoUsageTrend build() { + IoUsageTrend model = + new IoUsageTrend( + this.endTimestamp, + this.diskBytesReadInMBs, + this.diskBytesWrittenInMBs, + this.diskIopsRead, + this.diskIopsWritten, + this.diskIops); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(IoUsageTrend model) { + if (model.wasPropertyExplicitlySet("endTimestamp")) { + this.endTimestamp(model.getEndTimestamp()); + } + if (model.wasPropertyExplicitlySet("diskBytesReadInMBs")) { + this.diskBytesReadInMBs(model.getDiskBytesReadInMBs()); + } + if (model.wasPropertyExplicitlySet("diskBytesWrittenInMBs")) { + this.diskBytesWrittenInMBs(model.getDiskBytesWrittenInMBs()); + } + if (model.wasPropertyExplicitlySet("diskIopsRead")) { + this.diskIopsRead(model.getDiskIopsRead()); + } + if (model.wasPropertyExplicitlySet("diskIopsWritten")) { + this.diskIopsWritten(model.getDiskIopsWritten()); + } + if (model.wasPropertyExplicitlySet("diskIops")) { + this.diskIops(model.getDiskIops()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The timestamp in which the current sampling period ends in RFC 3339 format. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("endTimestamp") + private final java.util.Date endTimestamp; + + /** + * The timestamp in which the current sampling period ends in RFC 3339 format. + * @return the value + **/ + public java.util.Date getEndTimestamp() { + return endTimestamp; + } + + /** + * MBs Read. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskBytesReadInMBs") + private final Double diskBytesReadInMBs; + + /** + * MBs Read. + * @return the value + **/ + public Double getDiskBytesReadInMBs() { + return diskBytesReadInMBs; + } + + /** + * MBs Written. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskBytesWrittenInMBs") + private final Double diskBytesWrittenInMBs; + + /** + * MBs Written. + * @return the value + **/ + public Double getDiskBytesWrittenInMBs() { + return diskBytesWrittenInMBs; + } + + /** + * Read IO operations per second. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskIopsRead") + private final Double diskIopsRead; + + /** + * Read IO operations per second. + * @return the value + **/ + public Double getDiskIopsRead() { + return diskIopsRead; + } + + /** + * Write IO operations per second. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskIopsWritten") + private final Double diskIopsWritten; + + /** + * Write IO operations per second. + * @return the value + **/ + public Double getDiskIopsWritten() { + return diskIopsWritten; + } + + /** + * IO operations per second. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("diskIops") + private final Double diskIops; + + /** + * IO operations per second. + * @return the value + **/ + public Double getDiskIops() { + return diskIops; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("IoUsageTrend("); + sb.append("super=").append(super.toString()); + sb.append("endTimestamp=").append(String.valueOf(this.endTimestamp)); + sb.append(", diskBytesReadInMBs=").append(String.valueOf(this.diskBytesReadInMBs)); + sb.append(", diskBytesWrittenInMBs=").append(String.valueOf(this.diskBytesWrittenInMBs)); + sb.append(", diskIopsRead=").append(String.valueOf(this.diskIopsRead)); + sb.append(", diskIopsWritten=").append(String.valueOf(this.diskIopsWritten)); + sb.append(", diskIops=").append(String.valueOf(this.diskIops)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof IoUsageTrend)) { + return false; + } + + IoUsageTrend other = (IoUsageTrend) o; + return java.util.Objects.equals(this.endTimestamp, other.endTimestamp) + && java.util.Objects.equals(this.diskBytesReadInMBs, other.diskBytesReadInMBs) + && java.util.Objects.equals(this.diskBytesWrittenInMBs, other.diskBytesWrittenInMBs) + && java.util.Objects.equals(this.diskIopsRead, other.diskIopsRead) + && java.util.Objects.equals(this.diskIopsWritten, other.diskIopsWritten) + && java.util.Objects.equals(this.diskIops, other.diskIops) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.endTimestamp == null ? 43 : this.endTimestamp.hashCode()); + result = + (result * PRIME) + + (this.diskBytesReadInMBs == null + ? 43 + : this.diskBytesReadInMBs.hashCode()); + result = + (result * PRIME) + + (this.diskBytesWrittenInMBs == null + ? 43 + : this.diskBytesWrittenInMBs.hashCode()); + result = (result * PRIME) + (this.diskIopsRead == null ? 43 : this.diskIopsRead.hashCode()); + result = + (result * PRIME) + + (this.diskIopsWritten == null ? 43 : this.diskIopsWritten.hashCode()); + result = (result * PRIME) + (this.diskIops == null ? 43 : this.diskIops.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/IoUsageTrendAggregation.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/IoUsageTrendAggregation.java new file mode 100644 index 00000000000..2b121bd8582 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/IoUsageTrendAggregation.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Usage data per io interface. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = IoUsageTrendAggregation.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class IoUsageTrendAggregation + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"mountPoint", "usageData"}) + public IoUsageTrendAggregation(String mountPoint, java.util.List usageData) { + super(); + this.mountPoint = mountPoint; + this.usageData = usageData; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Mount point is specialized NTFS filesystem object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mountPoint") + private String mountPoint; + + /** + * Mount point is specialized NTFS filesystem object. + * @param mountPoint the value to set + * @return this builder + **/ + public Builder mountPoint(String mountPoint) { + this.mountPoint = mountPoint; + this.__explicitlySet__.add("mountPoint"); + return this; + } + /** + * List of usage data samples for a IO interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("usageData") + private java.util.List usageData; + + /** + * List of usage data samples for a IO interface. + * @param usageData the value to set + * @return this builder + **/ + public Builder usageData(java.util.List usageData) { + this.usageData = usageData; + this.__explicitlySet__.add("usageData"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public IoUsageTrendAggregation build() { + IoUsageTrendAggregation model = + new IoUsageTrendAggregation(this.mountPoint, this.usageData); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(IoUsageTrendAggregation model) { + if (model.wasPropertyExplicitlySet("mountPoint")) { + this.mountPoint(model.getMountPoint()); + } + if (model.wasPropertyExplicitlySet("usageData")) { + this.usageData(model.getUsageData()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Mount point is specialized NTFS filesystem object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mountPoint") + private final String mountPoint; + + /** + * Mount point is specialized NTFS filesystem object. + * @return the value + **/ + public String getMountPoint() { + return mountPoint; + } + + /** + * List of usage data samples for a IO interface. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("usageData") + private final java.util.List usageData; + + /** + * List of usage data samples for a IO interface. + * @return the value + **/ + public java.util.List getUsageData() { + return usageData; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("IoUsageTrendAggregation("); + sb.append("super=").append(super.toString()); + sb.append("mountPoint=").append(String.valueOf(this.mountPoint)); + sb.append(", usageData=").append(String.valueOf(this.usageData)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof IoUsageTrendAggregation)) { + return false; + } + + IoUsageTrendAggregation other = (IoUsageTrendAggregation) o; + return java.util.Objects.equals(this.mountPoint, other.mountPoint) + && java.util.Objects.equals(this.usageData, other.usageData) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.mountPoint == null ? 43 : this.mountPoint.hashCode()); + result = (result * PRIME) + (this.usageData == null ? 43 : this.usageData.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudDatabaseConfigurationSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudDatabaseConfigurationSummary.java new file mode 100644 index 00000000000..cb4bdf74010 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudDatabaseConfigurationSummary.java @@ -0,0 +1,400 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Configuration Summary of a Macs Managed Cloud database. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MacsManagedCloudDatabaseConfigurationSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MacsManagedCloudDatabaseConfigurationSummary + extends DatabaseConfigurationSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("databaseInsightId") + private String databaseInsightId; + + public Builder databaseInsightId(String databaseInsightId) { + this.databaseInsightId = databaseInsightId; + this.__explicitlySet__.add("databaseInsightId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseName") + private String databaseName; + + public Builder databaseName(String databaseName) { + this.databaseName = databaseName; + this.__explicitlySet__.add("databaseName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseDisplayName") + private String databaseDisplayName; + + public Builder databaseDisplayName(String databaseDisplayName) { + this.databaseDisplayName = databaseDisplayName; + this.__explicitlySet__.add("databaseDisplayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseType") + private String databaseType; + + public Builder databaseType(String databaseType) { + this.databaseType = databaseType; + this.__explicitlySet__.add("databaseType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseVersion") + private String databaseVersion; + + public Builder databaseVersion(String databaseVersion) { + this.databaseVersion = databaseVersion; + this.__explicitlySet__.add("databaseVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("cdbName") + private String cdbName; + + public Builder cdbName(String cdbName) { + this.cdbName = cdbName; + this.__explicitlySet__.add("cdbName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("processorCount") + private Integer processorCount; + + public Builder processorCount(Integer processorCount) { + this.processorCount = processorCount; + this.__explicitlySet__.add("processorCount"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + private String databaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + * @param databaseId the value to set + * @return this builder + **/ + public Builder databaseId(String databaseId) { + this.databaseId = databaseId; + this.__explicitlySet__.add("databaseId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @param managementAgentId the value to set + * @return this builder + **/ + public Builder managementAgentId(String managementAgentId) { + this.managementAgentId = managementAgentId; + this.__explicitlySet__.add("managementAgentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentId") + private String parentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + * @param parentId the value to set + * @return this builder + **/ + public Builder parentId(String parentId) { + this.parentId = parentId; + this.__explicitlySet__.add("parentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("exadataDetails") + private ExadataDetails exadataDetails; + + public Builder exadataDetails(ExadataDetails exadataDetails) { + this.exadataDetails = exadataDetails; + this.__explicitlySet__.add("exadataDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MacsManagedCloudDatabaseConfigurationSummary build() { + MacsManagedCloudDatabaseConfigurationSummary model = + new MacsManagedCloudDatabaseConfigurationSummary( + this.databaseInsightId, + this.compartmentId, + this.databaseName, + this.databaseDisplayName, + this.databaseType, + this.databaseVersion, + this.cdbName, + this.definedTags, + this.freeformTags, + this.processorCount, + this.databaseId, + this.managementAgentId, + this.parentId, + this.exadataDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MacsManagedCloudDatabaseConfigurationSummary model) { + if (model.wasPropertyExplicitlySet("databaseInsightId")) { + this.databaseInsightId(model.getDatabaseInsightId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("databaseName")) { + this.databaseName(model.getDatabaseName()); + } + if (model.wasPropertyExplicitlySet("databaseDisplayName")) { + this.databaseDisplayName(model.getDatabaseDisplayName()); + } + if (model.wasPropertyExplicitlySet("databaseType")) { + this.databaseType(model.getDatabaseType()); + } + if (model.wasPropertyExplicitlySet("databaseVersion")) { + this.databaseVersion(model.getDatabaseVersion()); + } + if (model.wasPropertyExplicitlySet("cdbName")) { + this.cdbName(model.getCdbName()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("processorCount")) { + this.processorCount(model.getProcessorCount()); + } + if (model.wasPropertyExplicitlySet("databaseId")) { + this.databaseId(model.getDatabaseId()); + } + if (model.wasPropertyExplicitlySet("managementAgentId")) { + this.managementAgentId(model.getManagementAgentId()); + } + if (model.wasPropertyExplicitlySet("parentId")) { + this.parentId(model.getParentId()); + } + if (model.wasPropertyExplicitlySet("exadataDetails")) { + this.exadataDetails(model.getExadataDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public MacsManagedCloudDatabaseConfigurationSummary( + String databaseInsightId, + String compartmentId, + String databaseName, + String databaseDisplayName, + String databaseType, + String databaseVersion, + String cdbName, + java.util.Map> definedTags, + java.util.Map freeformTags, + Integer processorCount, + String databaseId, + String managementAgentId, + String parentId, + ExadataDetails exadataDetails) { + super( + databaseInsightId, + compartmentId, + databaseName, + databaseDisplayName, + databaseType, + databaseVersion, + cdbName, + definedTags, + freeformTags, + processorCount); + this.databaseId = databaseId; + this.managementAgentId = managementAgentId; + this.parentId = parentId; + this.exadataDetails = exadataDetails; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + private final String databaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + * @return the value + **/ + public String getDatabaseId() { + return databaseId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private final String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @return the value + **/ + public String getManagementAgentId() { + return managementAgentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentId") + private final String parentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + * @return the value + **/ + public String getParentId() { + return parentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("exadataDetails") + private final ExadataDetails exadataDetails; + + public ExadataDetails getExadataDetails() { + return exadataDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MacsManagedCloudDatabaseConfigurationSummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", databaseId=").append(String.valueOf(this.databaseId)); + sb.append(", managementAgentId=").append(String.valueOf(this.managementAgentId)); + sb.append(", parentId=").append(String.valueOf(this.parentId)); + sb.append(", exadataDetails=").append(String.valueOf(this.exadataDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MacsManagedCloudDatabaseConfigurationSummary)) { + return false; + } + + MacsManagedCloudDatabaseConfigurationSummary other = + (MacsManagedCloudDatabaseConfigurationSummary) o; + return java.util.Objects.equals(this.databaseId, other.databaseId) + && java.util.Objects.equals(this.managementAgentId, other.managementAgentId) + && java.util.Objects.equals(this.parentId, other.parentId) + && java.util.Objects.equals(this.exadataDetails, other.exadataDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.databaseId == null ? 43 : this.databaseId.hashCode()); + result = + (result * PRIME) + + (this.managementAgentId == null ? 43 : this.managementAgentId.hashCode()); + result = (result * PRIME) + (this.parentId == null ? 43 : this.parentId.hashCode()); + result = + (result * PRIME) + + (this.exadataDetails == null ? 43 : this.exadataDetails.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudDatabaseHostInsight.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudDatabaseHostInsight.java new file mode 100644 index 00000000000..80cf815554d --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudDatabaseHostInsight.java @@ -0,0 +1,623 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Cloud MACS-managed database host insight resource. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MacsManagedCloudDatabaseHostInsight.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MacsManagedCloudDatabaseHostInsight extends HostInsight { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("hostName") + private String hostName; + + public Builder hostName(String hostName) { + this.hostName = hostName; + this.__explicitlySet__.add("hostName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("hostDisplayName") + private String hostDisplayName; + + public Builder hostDisplayName(String hostDisplayName) { + this.hostDisplayName = hostDisplayName; + this.__explicitlySet__.add("hostDisplayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("hostType") + private String hostType; + + public Builder hostType(String hostType) { + this.hostType = hostType; + this.__explicitlySet__.add("hostType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("processorCount") + private Integer processorCount; + + public Builder processorCount(Integer processorCount) { + this.processorCount = processorCount; + this.__explicitlySet__.add("processorCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("status") + private ResourceStatus status; + + public Builder status(ResourceStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @param managementAgentId the value to set + * @return this builder + **/ + public Builder managementAgentId(String managementAgentId) { + this.managementAgentId = managementAgentId; + this.__explicitlySet__.add("managementAgentId"); + return this; + } + /** + * Platform name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platformName") + private String platformName; + + /** + * Platform name. + * @param platformName the value to set + * @return this builder + **/ + public Builder platformName(String platformName) { + this.platformName = platformName; + this.__explicitlySet__.add("platformName"); + return this; + } + /** + * Platform type. + * Supported platformType(s) for MACS-managed external host insight: [LINUX, SOLARIS, WINDOWS]. + * Supported platformType(s) for MACS-managed cloud host insight: [LINUX]. + * Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX, WINDOWS, AIX, HP-UX]. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platformType") + private PlatformType platformType; + + /** + * Platform type. + * Supported platformType(s) for MACS-managed external host insight: [LINUX, SOLARIS, WINDOWS]. + * Supported platformType(s) for MACS-managed cloud host insight: [LINUX]. + * Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX, WINDOWS, AIX, HP-UX]. + * + * @param platformType the value to set + * @return this builder + **/ + public Builder platformType(PlatformType platformType) { + this.platformType = platformType; + this.__explicitlySet__.add("platformType"); + return this; + } + /** + * Platform version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platformVersion") + private String platformVersion; + + /** + * Platform version. + * @param platformVersion the value to set + * @return this builder + **/ + public Builder platformVersion(String platformVersion) { + this.platformVersion = platformVersion; + this.__explicitlySet__.add("platformVersion"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentId") + private String parentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. + * @param parentId the value to set + * @return this builder + **/ + public Builder parentId(String parentId) { + this.parentId = parentId; + this.__explicitlySet__.add("parentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rootId") + private String rootId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + * @param rootId the value to set + * @return this builder + **/ + public Builder rootId(String rootId) { + this.rootId = rootId; + this.__explicitlySet__.add("rootId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MacsManagedCloudDatabaseHostInsight build() { + MacsManagedCloudDatabaseHostInsight model = + new MacsManagedCloudDatabaseHostInsight( + this.id, + this.compartmentId, + this.hostName, + this.hostDisplayName, + this.hostType, + this.processorCount, + this.freeformTags, + this.definedTags, + this.systemTags, + this.status, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.managementAgentId, + this.platformName, + this.platformType, + this.platformVersion, + this.parentId, + this.rootId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MacsManagedCloudDatabaseHostInsight model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("hostName")) { + this.hostName(model.getHostName()); + } + if (model.wasPropertyExplicitlySet("hostDisplayName")) { + this.hostDisplayName(model.getHostDisplayName()); + } + if (model.wasPropertyExplicitlySet("hostType")) { + this.hostType(model.getHostType()); + } + if (model.wasPropertyExplicitlySet("processorCount")) { + this.processorCount(model.getProcessorCount()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("managementAgentId")) { + this.managementAgentId(model.getManagementAgentId()); + } + if (model.wasPropertyExplicitlySet("platformName")) { + this.platformName(model.getPlatformName()); + } + if (model.wasPropertyExplicitlySet("platformType")) { + this.platformType(model.getPlatformType()); + } + if (model.wasPropertyExplicitlySet("platformVersion")) { + this.platformVersion(model.getPlatformVersion()); + } + if (model.wasPropertyExplicitlySet("parentId")) { + this.parentId(model.getParentId()); + } + if (model.wasPropertyExplicitlySet("rootId")) { + this.rootId(model.getRootId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public MacsManagedCloudDatabaseHostInsight( + String id, + String compartmentId, + String hostName, + String hostDisplayName, + String hostType, + Integer processorCount, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + ResourceStatus status, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + String lifecycleDetails, + String managementAgentId, + String platformName, + PlatformType platformType, + String platformVersion, + String parentId, + String rootId) { + super( + id, + compartmentId, + hostName, + hostDisplayName, + hostType, + processorCount, + freeformTags, + definedTags, + systemTags, + status, + timeCreated, + timeUpdated, + lifecycleState, + lifecycleDetails); + this.managementAgentId = managementAgentId; + this.platformName = platformName; + this.platformType = platformType; + this.platformVersion = platformVersion; + this.parentId = parentId; + this.rootId = rootId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private final String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @return the value + **/ + public String getManagementAgentId() { + return managementAgentId; + } + + /** + * Platform name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platformName") + private final String platformName; + + /** + * Platform name. + * @return the value + **/ + public String getPlatformName() { + return platformName; + } + + /** + * Platform type. + * Supported platformType(s) for MACS-managed external host insight: [LINUX, SOLARIS, WINDOWS]. + * Supported platformType(s) for MACS-managed cloud host insight: [LINUX]. + * Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX, WINDOWS, AIX, HP-UX]. + * + **/ + public enum PlatformType { + Linux("LINUX"), + Solaris("SOLARIS"), + Sunos("SUNOS"), + Zlinux("ZLINUX"), + Windows("WINDOWS"), + Aix("AIX"), + HpUx("HP_UX"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PlatformType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PlatformType v : PlatformType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + PlatformType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PlatformType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'PlatformType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Platform type. + * Supported platformType(s) for MACS-managed external host insight: [LINUX, SOLARIS, WINDOWS]. + * Supported platformType(s) for MACS-managed cloud host insight: [LINUX]. + * Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX, WINDOWS, AIX, HP-UX]. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platformType") + private final PlatformType platformType; + + /** + * Platform type. + * Supported platformType(s) for MACS-managed external host insight: [LINUX, SOLARIS, WINDOWS]. + * Supported platformType(s) for MACS-managed cloud host insight: [LINUX]. + * Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX, WINDOWS, AIX, HP-UX]. + * + * @return the value + **/ + public PlatformType getPlatformType() { + return platformType; + } + + /** + * Platform version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platformVersion") + private final String platformVersion; + + /** + * Platform version. + * @return the value + **/ + public String getPlatformVersion() { + return platformVersion; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentId") + private final String parentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. + * @return the value + **/ + public String getParentId() { + return parentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rootId") + private final String rootId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + * @return the value + **/ + public String getRootId() { + return rootId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MacsManagedCloudDatabaseHostInsight("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", managementAgentId=").append(String.valueOf(this.managementAgentId)); + sb.append(", platformName=").append(String.valueOf(this.platformName)); + sb.append(", platformType=").append(String.valueOf(this.platformType)); + sb.append(", platformVersion=").append(String.valueOf(this.platformVersion)); + sb.append(", parentId=").append(String.valueOf(this.parentId)); + sb.append(", rootId=").append(String.valueOf(this.rootId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MacsManagedCloudDatabaseHostInsight)) { + return false; + } + + MacsManagedCloudDatabaseHostInsight other = (MacsManagedCloudDatabaseHostInsight) o; + return java.util.Objects.equals(this.managementAgentId, other.managementAgentId) + && java.util.Objects.equals(this.platformName, other.platformName) + && java.util.Objects.equals(this.platformType, other.platformType) + && java.util.Objects.equals(this.platformVersion, other.platformVersion) + && java.util.Objects.equals(this.parentId, other.parentId) + && java.util.Objects.equals(this.rootId, other.rootId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.managementAgentId == null ? 43 : this.managementAgentId.hashCode()); + result = (result * PRIME) + (this.platformName == null ? 43 : this.platformName.hashCode()); + result = (result * PRIME) + (this.platformType == null ? 43 : this.platformType.hashCode()); + result = + (result * PRIME) + + (this.platformVersion == null ? 43 : this.platformVersion.hashCode()); + result = (result * PRIME) + (this.parentId == null ? 43 : this.parentId.hashCode()); + result = (result * PRIME) + (this.rootId == null ? 43 : this.rootId.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudDatabaseHostInsightSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudDatabaseHostInsightSummary.java new file mode 100644 index 00000000000..41b3f6d376d --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudDatabaseHostInsightSummary.java @@ -0,0 +1,559 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Summary of a Cloud MACS-managed database host insight resource. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MacsManagedCloudDatabaseHostInsightSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MacsManagedCloudDatabaseHostInsightSummary extends HostInsightSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("hostName") + private String hostName; + + public Builder hostName(String hostName) { + this.hostName = hostName; + this.__explicitlySet__.add("hostName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("hostDisplayName") + private String hostDisplayName; + + public Builder hostDisplayName(String hostDisplayName) { + this.hostDisplayName = hostDisplayName; + this.__explicitlySet__.add("hostDisplayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("hostType") + private String hostType; + + public Builder hostType(String hostType) { + this.hostType = hostType; + this.__explicitlySet__.add("hostType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("processorCount") + private Integer processorCount; + + public Builder processorCount(Integer processorCount) { + this.processorCount = processorCount; + this.__explicitlySet__.add("processorCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("opsiPrivateEndpointId") + private String opsiPrivateEndpointId; + + public Builder opsiPrivateEndpointId(String opsiPrivateEndpointId) { + this.opsiPrivateEndpointId = opsiPrivateEndpointId; + this.__explicitlySet__.add("opsiPrivateEndpointId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("status") + private ResourceStatus status; + + public Builder status(ResourceStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @param managementAgentId the value to set + * @return this builder + **/ + public Builder managementAgentId(String managementAgentId) { + this.managementAgentId = managementAgentId; + this.__explicitlySet__.add("managementAgentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentId") + private String parentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. + * @param parentId the value to set + * @return this builder + **/ + public Builder parentId(String parentId) { + this.parentId = parentId; + this.__explicitlySet__.add("parentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rootId") + private String rootId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + * @param rootId the value to set + * @return this builder + **/ + public Builder rootId(String rootId) { + this.rootId = rootId; + this.__explicitlySet__.add("rootId"); + return this; + } + /** + * Platform type. + * Supported platformType(s) for MACS-managed external host insight: [LINUX, SOLARIS, WINDOWS]. + * Supported platformType(s) for MACS-managed cloud host insight: [LINUX]. + * Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX, WINDOWS, AIX, HP-UX]. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platformType") + private PlatformType platformType; + + /** + * Platform type. + * Supported platformType(s) for MACS-managed external host insight: [LINUX, SOLARIS, WINDOWS]. + * Supported platformType(s) for MACS-managed cloud host insight: [LINUX]. + * Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX, WINDOWS, AIX, HP-UX]. + * + * @param platformType the value to set + * @return this builder + **/ + public Builder platformType(PlatformType platformType) { + this.platformType = platformType; + this.__explicitlySet__.add("platformType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MacsManagedCloudDatabaseHostInsightSummary build() { + MacsManagedCloudDatabaseHostInsightSummary model = + new MacsManagedCloudDatabaseHostInsightSummary( + this.id, + this.compartmentId, + this.hostName, + this.hostDisplayName, + this.hostType, + this.processorCount, + this.freeformTags, + this.definedTags, + this.systemTags, + this.opsiPrivateEndpointId, + this.status, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.managementAgentId, + this.parentId, + this.rootId, + this.platformType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MacsManagedCloudDatabaseHostInsightSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("hostName")) { + this.hostName(model.getHostName()); + } + if (model.wasPropertyExplicitlySet("hostDisplayName")) { + this.hostDisplayName(model.getHostDisplayName()); + } + if (model.wasPropertyExplicitlySet("hostType")) { + this.hostType(model.getHostType()); + } + if (model.wasPropertyExplicitlySet("processorCount")) { + this.processorCount(model.getProcessorCount()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("opsiPrivateEndpointId")) { + this.opsiPrivateEndpointId(model.getOpsiPrivateEndpointId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("managementAgentId")) { + this.managementAgentId(model.getManagementAgentId()); + } + if (model.wasPropertyExplicitlySet("parentId")) { + this.parentId(model.getParentId()); + } + if (model.wasPropertyExplicitlySet("rootId")) { + this.rootId(model.getRootId()); + } + if (model.wasPropertyExplicitlySet("platformType")) { + this.platformType(model.getPlatformType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public MacsManagedCloudDatabaseHostInsightSummary( + String id, + String compartmentId, + String hostName, + String hostDisplayName, + String hostType, + Integer processorCount, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + String opsiPrivateEndpointId, + ResourceStatus status, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + String lifecycleDetails, + String managementAgentId, + String parentId, + String rootId, + PlatformType platformType) { + super( + id, + compartmentId, + hostName, + hostDisplayName, + hostType, + processorCount, + freeformTags, + definedTags, + systemTags, + opsiPrivateEndpointId, + status, + timeCreated, + timeUpdated, + lifecycleState, + lifecycleDetails); + this.managementAgentId = managementAgentId; + this.parentId = parentId; + this.rootId = rootId; + this.platformType = platformType; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private final String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @return the value + **/ + public String getManagementAgentId() { + return managementAgentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentId") + private final String parentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. + * @return the value + **/ + public String getParentId() { + return parentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rootId") + private final String rootId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + * @return the value + **/ + public String getRootId() { + return rootId; + } + + /** + * Platform type. + * Supported platformType(s) for MACS-managed external host insight: [LINUX, SOLARIS, WINDOWS]. + * Supported platformType(s) for MACS-managed cloud host insight: [LINUX]. + * Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX, WINDOWS, AIX, HP-UX]. + * + **/ + public enum PlatformType { + Linux("LINUX"), + Solaris("SOLARIS"), + Sunos("SUNOS"), + Zlinux("ZLINUX"), + Windows("WINDOWS"), + Aix("AIX"), + HpUx("HP_UX"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(PlatformType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (PlatformType v : PlatformType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + PlatformType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static PlatformType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'PlatformType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Platform type. + * Supported platformType(s) for MACS-managed external host insight: [LINUX, SOLARIS, WINDOWS]. + * Supported platformType(s) for MACS-managed cloud host insight: [LINUX]. + * Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX, WINDOWS, AIX, HP-UX]. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("platformType") + private final PlatformType platformType; + + /** + * Platform type. + * Supported platformType(s) for MACS-managed external host insight: [LINUX, SOLARIS, WINDOWS]. + * Supported platformType(s) for MACS-managed cloud host insight: [LINUX]. + * Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX, WINDOWS, AIX, HP-UX]. + * + * @return the value + **/ + public PlatformType getPlatformType() { + return platformType; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MacsManagedCloudDatabaseHostInsightSummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", managementAgentId=").append(String.valueOf(this.managementAgentId)); + sb.append(", parentId=").append(String.valueOf(this.parentId)); + sb.append(", rootId=").append(String.valueOf(this.rootId)); + sb.append(", platformType=").append(String.valueOf(this.platformType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MacsManagedCloudDatabaseHostInsightSummary)) { + return false; + } + + MacsManagedCloudDatabaseHostInsightSummary other = + (MacsManagedCloudDatabaseHostInsightSummary) o; + return java.util.Objects.equals(this.managementAgentId, other.managementAgentId) + && java.util.Objects.equals(this.parentId, other.parentId) + && java.util.Objects.equals(this.rootId, other.rootId) + && java.util.Objects.equals(this.platformType, other.platformType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.managementAgentId == null ? 43 : this.managementAgentId.hashCode()); + result = (result * PRIME) + (this.parentId == null ? 43 : this.parentId.hashCode()); + result = (result * PRIME) + (this.rootId == null ? 43 : this.rootId.hashCode()); + result = (result * PRIME) + (this.platformType == null ? 43 : this.platformType.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudDatabaseInsight.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudDatabaseInsight.java new file mode 100644 index 00000000000..15c79bab448 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudDatabaseInsight.java @@ -0,0 +1,700 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Database insight resource. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MacsManagedCloudDatabaseInsight.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MacsManagedCloudDatabaseInsight extends DatabaseInsight { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("status") + private ResourceStatus status; + + public Builder status(ResourceStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseType") + private String databaseType; + + public Builder databaseType(String databaseType) { + this.databaseType = databaseType; + this.__explicitlySet__.add("databaseType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseVersion") + private String databaseVersion; + + public Builder databaseVersion(String databaseVersion) { + this.databaseVersion = databaseVersion; + this.__explicitlySet__.add("databaseVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("processorCount") + private Integer processorCount; + + public Builder processorCount(Integer processorCount) { + this.processorCount = processorCount; + this.__explicitlySet__.add("processorCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseConnectionStatusDetails") + private String databaseConnectionStatusDetails; + + public Builder databaseConnectionStatusDetails(String databaseConnectionStatusDetails) { + this.databaseConnectionStatusDetails = databaseConnectionStatusDetails; + this.__explicitlySet__.add("databaseConnectionStatusDetails"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @param managementAgentId the value to set + * @return this builder + **/ + public Builder managementAgentId(String managementAgentId) { + this.managementAgentId = managementAgentId; + this.__explicitlySet__.add("managementAgentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionDetails") + private ConnectionDetails connectionDetails; + + public Builder connectionDetails(ConnectionDetails connectionDetails) { + this.connectionDetails = connectionDetails; + this.__explicitlySet__.add("connectionDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionCredentialDetails") + private CredentialDetails connectionCredentialDetails; + + public Builder connectionCredentialDetails(CredentialDetails connectionCredentialDetails) { + this.connectionCredentialDetails = connectionCredentialDetails; + this.__explicitlySet__.add("connectionCredentialDetails"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + private String databaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + * @param databaseId the value to set + * @return this builder + **/ + public Builder databaseId(String databaseId) { + this.databaseId = databaseId; + this.__explicitlySet__.add("databaseId"); + return this; + } + /** + * Name of database + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseName") + private String databaseName; + + /** + * Name of database + * @param databaseName the value to set + * @return this builder + **/ + public Builder databaseName(String databaseName) { + this.databaseName = databaseName; + this.__explicitlySet__.add("databaseName"); + return this; + } + /** + * Display name of database + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseDisplayName") + private String databaseDisplayName; + + /** + * Display name of database + * @param databaseDisplayName the value to set + * @return this builder + **/ + public Builder databaseDisplayName(String databaseDisplayName) { + this.databaseDisplayName = databaseDisplayName; + this.__explicitlySet__.add("databaseDisplayName"); + return this; + } + /** + * OCI database resource type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseResourceType") + private String databaseResourceType; + + /** + * OCI database resource type + * @param databaseResourceType the value to set + * @return this builder + **/ + public Builder databaseResourceType(String databaseResourceType) { + this.databaseResourceType = databaseResourceType; + this.__explicitlySet__.add("databaseResourceType"); + return this; + } + /** + * Additional details of a database in JSON format. For autonomous databases, this is the AutonomousDatabase object serialized as a JSON string as defined in https://docs.cloud.oracle.com/en-us/iaas/api/#/en/database/20160918/AutonomousDatabase/. For EM, pass in null or an empty string. Note that this string needs to be escaped when specified in the curl command. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbAdditionalDetails") + private Object dbAdditionalDetails; + + /** + * Additional details of a database in JSON format. For autonomous databases, this is the AutonomousDatabase object serialized as a JSON string as defined in https://docs.cloud.oracle.com/en-us/iaas/api/#/en/database/20160918/AutonomousDatabase/. For EM, pass in null or an empty string. Note that this string needs to be escaped when specified in the curl command. + * + * @param dbAdditionalDetails the value to set + * @return this builder + **/ + public Builder dbAdditionalDetails(Object dbAdditionalDetails) { + this.dbAdditionalDetails = dbAdditionalDetails; + this.__explicitlySet__.add("dbAdditionalDetails"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentId") + private String parentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. + * @param parentId the value to set + * @return this builder + **/ + public Builder parentId(String parentId) { + this.parentId = parentId; + this.__explicitlySet__.add("parentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rootId") + private String rootId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + * @param rootId the value to set + * @return this builder + **/ + public Builder rootId(String rootId) { + this.rootId = rootId; + this.__explicitlySet__.add("rootId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MacsManagedCloudDatabaseInsight build() { + MacsManagedCloudDatabaseInsight model = + new MacsManagedCloudDatabaseInsight( + this.id, + this.compartmentId, + this.status, + this.databaseType, + this.databaseVersion, + this.processorCount, + this.freeformTags, + this.definedTags, + this.systemTags, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.databaseConnectionStatusDetails, + this.managementAgentId, + this.connectionDetails, + this.connectionCredentialDetails, + this.databaseId, + this.databaseName, + this.databaseDisplayName, + this.databaseResourceType, + this.dbAdditionalDetails, + this.parentId, + this.rootId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MacsManagedCloudDatabaseInsight model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("databaseType")) { + this.databaseType(model.getDatabaseType()); + } + if (model.wasPropertyExplicitlySet("databaseVersion")) { + this.databaseVersion(model.getDatabaseVersion()); + } + if (model.wasPropertyExplicitlySet("processorCount")) { + this.processorCount(model.getProcessorCount()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("databaseConnectionStatusDetails")) { + this.databaseConnectionStatusDetails(model.getDatabaseConnectionStatusDetails()); + } + if (model.wasPropertyExplicitlySet("managementAgentId")) { + this.managementAgentId(model.getManagementAgentId()); + } + if (model.wasPropertyExplicitlySet("connectionDetails")) { + this.connectionDetails(model.getConnectionDetails()); + } + if (model.wasPropertyExplicitlySet("connectionCredentialDetails")) { + this.connectionCredentialDetails(model.getConnectionCredentialDetails()); + } + if (model.wasPropertyExplicitlySet("databaseId")) { + this.databaseId(model.getDatabaseId()); + } + if (model.wasPropertyExplicitlySet("databaseName")) { + this.databaseName(model.getDatabaseName()); + } + if (model.wasPropertyExplicitlySet("databaseDisplayName")) { + this.databaseDisplayName(model.getDatabaseDisplayName()); + } + if (model.wasPropertyExplicitlySet("databaseResourceType")) { + this.databaseResourceType(model.getDatabaseResourceType()); + } + if (model.wasPropertyExplicitlySet("dbAdditionalDetails")) { + this.dbAdditionalDetails(model.getDbAdditionalDetails()); + } + if (model.wasPropertyExplicitlySet("parentId")) { + this.parentId(model.getParentId()); + } + if (model.wasPropertyExplicitlySet("rootId")) { + this.rootId(model.getRootId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public MacsManagedCloudDatabaseInsight( + String id, + String compartmentId, + ResourceStatus status, + String databaseType, + String databaseVersion, + Integer processorCount, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + String lifecycleDetails, + String databaseConnectionStatusDetails, + String managementAgentId, + ConnectionDetails connectionDetails, + CredentialDetails connectionCredentialDetails, + String databaseId, + String databaseName, + String databaseDisplayName, + String databaseResourceType, + Object dbAdditionalDetails, + String parentId, + String rootId) { + super( + id, + compartmentId, + status, + databaseType, + databaseVersion, + processorCount, + freeformTags, + definedTags, + systemTags, + timeCreated, + timeUpdated, + lifecycleState, + lifecycleDetails, + databaseConnectionStatusDetails); + this.managementAgentId = managementAgentId; + this.connectionDetails = connectionDetails; + this.connectionCredentialDetails = connectionCredentialDetails; + this.databaseId = databaseId; + this.databaseName = databaseName; + this.databaseDisplayName = databaseDisplayName; + this.databaseResourceType = databaseResourceType; + this.dbAdditionalDetails = dbAdditionalDetails; + this.parentId = parentId; + this.rootId = rootId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private final String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @return the value + **/ + public String getManagementAgentId() { + return managementAgentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionDetails") + private final ConnectionDetails connectionDetails; + + public ConnectionDetails getConnectionDetails() { + return connectionDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionCredentialDetails") + private final CredentialDetails connectionCredentialDetails; + + public CredentialDetails getConnectionCredentialDetails() { + return connectionCredentialDetails; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + private final String databaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + * @return the value + **/ + public String getDatabaseId() { + return databaseId; + } + + /** + * Name of database + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseName") + private final String databaseName; + + /** + * Name of database + * @return the value + **/ + public String getDatabaseName() { + return databaseName; + } + + /** + * Display name of database + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseDisplayName") + private final String databaseDisplayName; + + /** + * Display name of database + * @return the value + **/ + public String getDatabaseDisplayName() { + return databaseDisplayName; + } + + /** + * OCI database resource type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseResourceType") + private final String databaseResourceType; + + /** + * OCI database resource type + * @return the value + **/ + public String getDatabaseResourceType() { + return databaseResourceType; + } + + /** + * Additional details of a database in JSON format. For autonomous databases, this is the AutonomousDatabase object serialized as a JSON string as defined in https://docs.cloud.oracle.com/en-us/iaas/api/#/en/database/20160918/AutonomousDatabase/. For EM, pass in null or an empty string. Note that this string needs to be escaped when specified in the curl command. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbAdditionalDetails") + private final Object dbAdditionalDetails; + + /** + * Additional details of a database in JSON format. For autonomous databases, this is the AutonomousDatabase object serialized as a JSON string as defined in https://docs.cloud.oracle.com/en-us/iaas/api/#/en/database/20160918/AutonomousDatabase/. For EM, pass in null or an empty string. Note that this string needs to be escaped when specified in the curl command. + * + * @return the value + **/ + public Object getDbAdditionalDetails() { + return dbAdditionalDetails; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentId") + private final String parentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. + * @return the value + **/ + public String getParentId() { + return parentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rootId") + private final String rootId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + * @return the value + **/ + public String getRootId() { + return rootId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MacsManagedCloudDatabaseInsight("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", managementAgentId=").append(String.valueOf(this.managementAgentId)); + sb.append(", connectionDetails=").append(String.valueOf(this.connectionDetails)); + sb.append(", connectionCredentialDetails=") + .append(String.valueOf(this.connectionCredentialDetails)); + sb.append(", databaseId=").append(String.valueOf(this.databaseId)); + sb.append(", databaseName=").append(String.valueOf(this.databaseName)); + sb.append(", databaseDisplayName=").append(String.valueOf(this.databaseDisplayName)); + sb.append(", databaseResourceType=").append(String.valueOf(this.databaseResourceType)); + sb.append(", dbAdditionalDetails=").append(String.valueOf(this.dbAdditionalDetails)); + sb.append(", parentId=").append(String.valueOf(this.parentId)); + sb.append(", rootId=").append(String.valueOf(this.rootId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MacsManagedCloudDatabaseInsight)) { + return false; + } + + MacsManagedCloudDatabaseInsight other = (MacsManagedCloudDatabaseInsight) o; + return java.util.Objects.equals(this.managementAgentId, other.managementAgentId) + && java.util.Objects.equals(this.connectionDetails, other.connectionDetails) + && java.util.Objects.equals( + this.connectionCredentialDetails, other.connectionCredentialDetails) + && java.util.Objects.equals(this.databaseId, other.databaseId) + && java.util.Objects.equals(this.databaseName, other.databaseName) + && java.util.Objects.equals(this.databaseDisplayName, other.databaseDisplayName) + && java.util.Objects.equals(this.databaseResourceType, other.databaseResourceType) + && java.util.Objects.equals(this.dbAdditionalDetails, other.dbAdditionalDetails) + && java.util.Objects.equals(this.parentId, other.parentId) + && java.util.Objects.equals(this.rootId, other.rootId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.managementAgentId == null ? 43 : this.managementAgentId.hashCode()); + result = + (result * PRIME) + + (this.connectionDetails == null ? 43 : this.connectionDetails.hashCode()); + result = + (result * PRIME) + + (this.connectionCredentialDetails == null + ? 43 + : this.connectionCredentialDetails.hashCode()); + result = (result * PRIME) + (this.databaseId == null ? 43 : this.databaseId.hashCode()); + result = (result * PRIME) + (this.databaseName == null ? 43 : this.databaseName.hashCode()); + result = + (result * PRIME) + + (this.databaseDisplayName == null + ? 43 + : this.databaseDisplayName.hashCode()); + result = + (result * PRIME) + + (this.databaseResourceType == null + ? 43 + : this.databaseResourceType.hashCode()); + result = + (result * PRIME) + + (this.dbAdditionalDetails == null + ? 43 + : this.dbAdditionalDetails.hashCode()); + result = (result * PRIME) + (this.parentId == null ? 43 : this.parentId.hashCode()); + result = (result * PRIME) + (this.rootId == null ? 43 : this.rootId.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudDatabaseInsightSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudDatabaseInsightSummary.java new file mode 100644 index 00000000000..9f26a4e4160 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudDatabaseInsightSummary.java @@ -0,0 +1,534 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Summary of a database insight resource. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MacsManagedCloudDatabaseInsightSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MacsManagedCloudDatabaseInsightSummary extends DatabaseInsightSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + private String databaseId; + + public Builder databaseId(String databaseId) { + this.databaseId = databaseId; + this.__explicitlySet__.add("databaseId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseName") + private String databaseName; + + public Builder databaseName(String databaseName) { + this.databaseName = databaseName; + this.__explicitlySet__.add("databaseName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseDisplayName") + private String databaseDisplayName; + + public Builder databaseDisplayName(String databaseDisplayName) { + this.databaseDisplayName = databaseDisplayName; + this.__explicitlySet__.add("databaseDisplayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseType") + private String databaseType; + + public Builder databaseType(String databaseType) { + this.databaseType = databaseType; + this.__explicitlySet__.add("databaseType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseVersion") + private String databaseVersion; + + public Builder databaseVersion(String databaseVersion) { + this.databaseVersion = databaseVersion; + this.__explicitlySet__.add("databaseVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseHostNames") + private java.util.List databaseHostNames; + + public Builder databaseHostNames(java.util.List databaseHostNames) { + this.databaseHostNames = databaseHostNames; + this.__explicitlySet__.add("databaseHostNames"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("processorCount") + private Integer processorCount; + + public Builder processorCount(Integer processorCount) { + this.processorCount = processorCount; + this.__explicitlySet__.add("processorCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("status") + private ResourceStatus status; + + public Builder status(ResourceStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseConnectionStatusDetails") + private String databaseConnectionStatusDetails; + + public Builder databaseConnectionStatusDetails(String databaseConnectionStatusDetails) { + this.databaseConnectionStatusDetails = databaseConnectionStatusDetails; + this.__explicitlySet__.add("databaseConnectionStatusDetails"); + return this; + } + /** + * OCI database resource type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseResourceType") + private String databaseResourceType; + + /** + * OCI database resource type + * @param databaseResourceType the value to set + * @return this builder + **/ + public Builder databaseResourceType(String databaseResourceType) { + this.databaseResourceType = databaseResourceType; + this.__explicitlySet__.add("databaseResourceType"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @param managementAgentId the value to set + * @return this builder + **/ + public Builder managementAgentId(String managementAgentId) { + this.managementAgentId = managementAgentId; + this.__explicitlySet__.add("managementAgentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentId") + private String parentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. + * @param parentId the value to set + * @return this builder + **/ + public Builder parentId(String parentId) { + this.parentId = parentId; + this.__explicitlySet__.add("parentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the root resource for a composite target. e.g. for ExaCS members the rootId will be the OCID of the Exadata Infrastructure resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rootId") + private String rootId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the root resource for a composite target. e.g. for ExaCS members the rootId will be the OCID of the Exadata Infrastructure resource. + * @param rootId the value to set + * @return this builder + **/ + public Builder rootId(String rootId) { + this.rootId = rootId; + this.__explicitlySet__.add("rootId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MacsManagedCloudDatabaseInsightSummary build() { + MacsManagedCloudDatabaseInsightSummary model = + new MacsManagedCloudDatabaseInsightSummary( + this.id, + this.databaseId, + this.compartmentId, + this.databaseName, + this.databaseDisplayName, + this.databaseType, + this.databaseVersion, + this.databaseHostNames, + this.freeformTags, + this.definedTags, + this.systemTags, + this.processorCount, + this.status, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.databaseConnectionStatusDetails, + this.databaseResourceType, + this.managementAgentId, + this.parentId, + this.rootId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MacsManagedCloudDatabaseInsightSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("databaseId")) { + this.databaseId(model.getDatabaseId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("databaseName")) { + this.databaseName(model.getDatabaseName()); + } + if (model.wasPropertyExplicitlySet("databaseDisplayName")) { + this.databaseDisplayName(model.getDatabaseDisplayName()); + } + if (model.wasPropertyExplicitlySet("databaseType")) { + this.databaseType(model.getDatabaseType()); + } + if (model.wasPropertyExplicitlySet("databaseVersion")) { + this.databaseVersion(model.getDatabaseVersion()); + } + if (model.wasPropertyExplicitlySet("databaseHostNames")) { + this.databaseHostNames(model.getDatabaseHostNames()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("processorCount")) { + this.processorCount(model.getProcessorCount()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("databaseConnectionStatusDetails")) { + this.databaseConnectionStatusDetails(model.getDatabaseConnectionStatusDetails()); + } + if (model.wasPropertyExplicitlySet("databaseResourceType")) { + this.databaseResourceType(model.getDatabaseResourceType()); + } + if (model.wasPropertyExplicitlySet("managementAgentId")) { + this.managementAgentId(model.getManagementAgentId()); + } + if (model.wasPropertyExplicitlySet("parentId")) { + this.parentId(model.getParentId()); + } + if (model.wasPropertyExplicitlySet("rootId")) { + this.rootId(model.getRootId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public MacsManagedCloudDatabaseInsightSummary( + String id, + String databaseId, + String compartmentId, + String databaseName, + String databaseDisplayName, + String databaseType, + String databaseVersion, + java.util.List databaseHostNames, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + Integer processorCount, + ResourceStatus status, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + String lifecycleDetails, + String databaseConnectionStatusDetails, + String databaseResourceType, + String managementAgentId, + String parentId, + String rootId) { + super( + id, + databaseId, + compartmentId, + databaseName, + databaseDisplayName, + databaseType, + databaseVersion, + databaseHostNames, + freeformTags, + definedTags, + systemTags, + processorCount, + status, + timeCreated, + timeUpdated, + lifecycleState, + lifecycleDetails, + databaseConnectionStatusDetails); + this.databaseResourceType = databaseResourceType; + this.managementAgentId = managementAgentId; + this.parentId = parentId; + this.rootId = rootId; + } + + /** + * OCI database resource type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseResourceType") + private final String databaseResourceType; + + /** + * OCI database resource type + * @return the value + **/ + public String getDatabaseResourceType() { + return databaseResourceType; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private final String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @return the value + **/ + public String getManagementAgentId() { + return managementAgentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentId") + private final String parentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. + * @return the value + **/ + public String getParentId() { + return parentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the root resource for a composite target. e.g. for ExaCS members the rootId will be the OCID of the Exadata Infrastructure resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rootId") + private final String rootId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the root resource for a composite target. e.g. for ExaCS members the rootId will be the OCID of the Exadata Infrastructure resource. + * @return the value + **/ + public String getRootId() { + return rootId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MacsManagedCloudDatabaseInsightSummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", databaseResourceType=").append(String.valueOf(this.databaseResourceType)); + sb.append(", managementAgentId=").append(String.valueOf(this.managementAgentId)); + sb.append(", parentId=").append(String.valueOf(this.parentId)); + sb.append(", rootId=").append(String.valueOf(this.rootId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MacsManagedCloudDatabaseInsightSummary)) { + return false; + } + + MacsManagedCloudDatabaseInsightSummary other = (MacsManagedCloudDatabaseInsightSummary) o; + return java.util.Objects.equals(this.databaseResourceType, other.databaseResourceType) + && java.util.Objects.equals(this.managementAgentId, other.managementAgentId) + && java.util.Objects.equals(this.parentId, other.parentId) + && java.util.Objects.equals(this.rootId, other.rootId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.databaseResourceType == null + ? 43 + : this.databaseResourceType.hashCode()); + result = + (result * PRIME) + + (this.managementAgentId == null ? 43 : this.managementAgentId.hashCode()); + result = (result * PRIME) + (this.parentId == null ? 43 : this.parentId.hashCode()); + result = (result * PRIME) + (this.rootId == null ? 43 : this.rootId.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudDbHostConfigurationSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudDbHostConfigurationSummary.java new file mode 100644 index 00000000000..c015069f80a --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudDbHostConfigurationSummary.java @@ -0,0 +1,495 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Configuration Summary of Cloud MACS-managed database host insight resource. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MacsManagedCloudDbHostConfigurationSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MacsManagedCloudDbHostConfigurationSummary extends HostConfigurationSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("hostInsightId") + private String hostInsightId; + + public Builder hostInsightId(String hostInsightId) { + this.hostInsightId = hostInsightId; + this.__explicitlySet__.add("hostInsightId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("hostName") + private String hostName; + + public Builder hostName(String hostName) { + this.hostName = hostName; + this.__explicitlySet__.add("hostName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("platformType") + private PlatformType platformType; + + public Builder platformType(PlatformType platformType) { + this.platformType = platformType; + this.__explicitlySet__.add("platformType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("platformVersion") + private String platformVersion; + + public Builder platformVersion(String platformVersion) { + this.platformVersion = platformVersion; + this.__explicitlySet__.add("platformVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("platformVendor") + private String platformVendor; + + public Builder platformVendor(String platformVendor) { + this.platformVendor = platformVendor; + this.__explicitlySet__.add("platformVendor"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("totalCpus") + private Integer totalCpus; + + public Builder totalCpus(Integer totalCpus) { + this.totalCpus = totalCpus; + this.__explicitlySet__.add("totalCpus"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("totalMemoryInGBs") + private Double totalMemoryInGBs; + + public Builder totalMemoryInGBs(Double totalMemoryInGBs) { + this.totalMemoryInGBs = totalMemoryInGBs; + this.__explicitlySet__.add("totalMemoryInGBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("cpuArchitecture") + private String cpuArchitecture; + + public Builder cpuArchitecture(String cpuArchitecture) { + this.cpuArchitecture = cpuArchitecture; + this.__explicitlySet__.add("cpuArchitecture"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("cpuCacheInMBs") + private Double cpuCacheInMBs; + + public Builder cpuCacheInMBs(Double cpuCacheInMBs) { + this.cpuCacheInMBs = cpuCacheInMBs; + this.__explicitlySet__.add("cpuCacheInMBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("cpuVendor") + private String cpuVendor; + + public Builder cpuVendor(String cpuVendor) { + this.cpuVendor = cpuVendor; + this.__explicitlySet__.add("cpuVendor"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("cpuFrequencyInMhz") + private Double cpuFrequencyInMhz; + + public Builder cpuFrequencyInMhz(Double cpuFrequencyInMhz) { + this.cpuFrequencyInMhz = cpuFrequencyInMhz; + this.__explicitlySet__.add("cpuFrequencyInMhz"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("cpuImplementation") + private String cpuImplementation; + + public Builder cpuImplementation(String cpuImplementation) { + this.cpuImplementation = cpuImplementation; + this.__explicitlySet__.add("cpuImplementation"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("coresPerSocket") + private Integer coresPerSocket; + + public Builder coresPerSocket(Integer coresPerSocket) { + this.coresPerSocket = coresPerSocket; + this.__explicitlySet__.add("coresPerSocket"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("totalSockets") + private Integer totalSockets; + + public Builder totalSockets(Integer totalSockets) { + this.totalSockets = totalSockets; + this.__explicitlySet__.add("totalSockets"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("threadsPerSocket") + private Integer threadsPerSocket; + + public Builder threadsPerSocket(Integer threadsPerSocket) { + this.threadsPerSocket = threadsPerSocket; + this.__explicitlySet__.add("threadsPerSocket"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isHyperThreadingEnabled") + private Boolean isHyperThreadingEnabled; + + public Builder isHyperThreadingEnabled(Boolean isHyperThreadingEnabled) { + this.isHyperThreadingEnabled = isHyperThreadingEnabled; + this.__explicitlySet__.add("isHyperThreadingEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @param managementAgentId the value to set + * @return this builder + **/ + public Builder managementAgentId(String managementAgentId) { + this.managementAgentId = managementAgentId; + this.__explicitlySet__.add("managementAgentId"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentId") + private String parentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + * @param parentId the value to set + * @return this builder + **/ + public Builder parentId(String parentId) { + this.parentId = parentId; + this.__explicitlySet__.add("parentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("exadataDetails") + private ExadataDetails exadataDetails; + + public Builder exadataDetails(ExadataDetails exadataDetails) { + this.exadataDetails = exadataDetails; + this.__explicitlySet__.add("exadataDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MacsManagedCloudDbHostConfigurationSummary build() { + MacsManagedCloudDbHostConfigurationSummary model = + new MacsManagedCloudDbHostConfigurationSummary( + this.hostInsightId, + this.compartmentId, + this.hostName, + this.platformType, + this.platformVersion, + this.platformVendor, + this.totalCpus, + this.totalMemoryInGBs, + this.cpuArchitecture, + this.cpuCacheInMBs, + this.cpuVendor, + this.cpuFrequencyInMhz, + this.cpuImplementation, + this.coresPerSocket, + this.totalSockets, + this.threadsPerSocket, + this.isHyperThreadingEnabled, + this.definedTags, + this.freeformTags, + this.managementAgentId, + this.parentId, + this.exadataDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MacsManagedCloudDbHostConfigurationSummary model) { + if (model.wasPropertyExplicitlySet("hostInsightId")) { + this.hostInsightId(model.getHostInsightId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("hostName")) { + this.hostName(model.getHostName()); + } + if (model.wasPropertyExplicitlySet("platformType")) { + this.platformType(model.getPlatformType()); + } + if (model.wasPropertyExplicitlySet("platformVersion")) { + this.platformVersion(model.getPlatformVersion()); + } + if (model.wasPropertyExplicitlySet("platformVendor")) { + this.platformVendor(model.getPlatformVendor()); + } + if (model.wasPropertyExplicitlySet("totalCpus")) { + this.totalCpus(model.getTotalCpus()); + } + if (model.wasPropertyExplicitlySet("totalMemoryInGBs")) { + this.totalMemoryInGBs(model.getTotalMemoryInGBs()); + } + if (model.wasPropertyExplicitlySet("cpuArchitecture")) { + this.cpuArchitecture(model.getCpuArchitecture()); + } + if (model.wasPropertyExplicitlySet("cpuCacheInMBs")) { + this.cpuCacheInMBs(model.getCpuCacheInMBs()); + } + if (model.wasPropertyExplicitlySet("cpuVendor")) { + this.cpuVendor(model.getCpuVendor()); + } + if (model.wasPropertyExplicitlySet("cpuFrequencyInMhz")) { + this.cpuFrequencyInMhz(model.getCpuFrequencyInMhz()); + } + if (model.wasPropertyExplicitlySet("cpuImplementation")) { + this.cpuImplementation(model.getCpuImplementation()); + } + if (model.wasPropertyExplicitlySet("coresPerSocket")) { + this.coresPerSocket(model.getCoresPerSocket()); + } + if (model.wasPropertyExplicitlySet("totalSockets")) { + this.totalSockets(model.getTotalSockets()); + } + if (model.wasPropertyExplicitlySet("threadsPerSocket")) { + this.threadsPerSocket(model.getThreadsPerSocket()); + } + if (model.wasPropertyExplicitlySet("isHyperThreadingEnabled")) { + this.isHyperThreadingEnabled(model.getIsHyperThreadingEnabled()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("managementAgentId")) { + this.managementAgentId(model.getManagementAgentId()); + } + if (model.wasPropertyExplicitlySet("parentId")) { + this.parentId(model.getParentId()); + } + if (model.wasPropertyExplicitlySet("exadataDetails")) { + this.exadataDetails(model.getExadataDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public MacsManagedCloudDbHostConfigurationSummary( + String hostInsightId, + String compartmentId, + String hostName, + PlatformType platformType, + String platformVersion, + String platformVendor, + Integer totalCpus, + Double totalMemoryInGBs, + String cpuArchitecture, + Double cpuCacheInMBs, + String cpuVendor, + Double cpuFrequencyInMhz, + String cpuImplementation, + Integer coresPerSocket, + Integer totalSockets, + Integer threadsPerSocket, + Boolean isHyperThreadingEnabled, + java.util.Map> definedTags, + java.util.Map freeformTags, + String managementAgentId, + String parentId, + ExadataDetails exadataDetails) { + super( + hostInsightId, + compartmentId, + hostName, + platformType, + platformVersion, + platformVendor, + totalCpus, + totalMemoryInGBs, + cpuArchitecture, + cpuCacheInMBs, + cpuVendor, + cpuFrequencyInMhz, + cpuImplementation, + coresPerSocket, + totalSockets, + threadsPerSocket, + isHyperThreadingEnabled, + definedTags, + freeformTags); + this.managementAgentId = managementAgentId; + this.parentId = parentId; + this.exadataDetails = exadataDetails; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private final String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @return the value + **/ + public String getManagementAgentId() { + return managementAgentId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("parentId") + private final String parentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + * @return the value + **/ + public String getParentId() { + return parentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("exadataDetails") + private final ExadataDetails exadataDetails; + + public ExadataDetails getExadataDetails() { + return exadataDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MacsManagedCloudDbHostConfigurationSummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", managementAgentId=").append(String.valueOf(this.managementAgentId)); + sb.append(", parentId=").append(String.valueOf(this.parentId)); + sb.append(", exadataDetails=").append(String.valueOf(this.exadataDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MacsManagedCloudDbHostConfigurationSummary)) { + return false; + } + + MacsManagedCloudDbHostConfigurationSummary other = + (MacsManagedCloudDbHostConfigurationSummary) o; + return java.util.Objects.equals(this.managementAgentId, other.managementAgentId) + && java.util.Objects.equals(this.parentId, other.parentId) + && java.util.Objects.equals(this.exadataDetails, other.exadataDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.managementAgentId == null ? 43 : this.managementAgentId.hashCode()); + result = (result * PRIME) + (this.parentId == null ? 43 : this.parentId.hashCode()); + result = + (result * PRIME) + + (this.exadataDetails == null ? 43 : this.exadataDetails.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudExadataInsight.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudExadataInsight.java new file mode 100644 index 00000000000..8dedf4dbde8 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudExadataInsight.java @@ -0,0 +1,452 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Cloud MACS-managed Exadata insight resource (ExaCC) (ExaCS will be supported in the future). + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MacsManagedCloudExadataInsight.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MacsManagedCloudExadataInsight extends ExadataInsight { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("exadataName") + private String exadataName; + + public Builder exadataName(String exadataName) { + this.exadataName = exadataName; + this.__explicitlySet__.add("exadataName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("exadataDisplayName") + private String exadataDisplayName; + + public Builder exadataDisplayName(String exadataDisplayName) { + this.exadataDisplayName = exadataDisplayName; + this.__explicitlySet__.add("exadataDisplayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("exadataType") + private ExadataType exadataType; + + public Builder exadataType(ExadataType exadataType) { + this.exadataType = exadataType; + this.__explicitlySet__.add("exadataType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("exadataRackType") + private ExadataRackType exadataRackType; + + public Builder exadataRackType(ExadataRackType exadataRackType) { + this.exadataRackType = exadataRackType; + this.__explicitlySet__.add("exadataRackType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isVirtualizedExadata") + private Boolean isVirtualizedExadata; + + public Builder isVirtualizedExadata(Boolean isVirtualizedExadata) { + this.isVirtualizedExadata = isVirtualizedExadata; + this.__explicitlySet__.add("isVirtualizedExadata"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("status") + private ResourceStatus status; + + public Builder status(ResourceStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private ExadataInsightLifecycleState lifecycleState; + + public Builder lifecycleState(ExadataInsightLifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exadataInfraId") + private String exadataInfraId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + * @param exadataInfraId the value to set + * @return this builder + **/ + public Builder exadataInfraId(String exadataInfraId) { + this.exadataInfraId = exadataInfraId; + this.__explicitlySet__.add("exadataInfraId"); + return this; + } + /** + * OCI exadata infrastructure resource type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exadataInfraResourceType") + private ExadataResourceType exadataInfraResourceType; + + /** + * OCI exadata infrastructure resource type + * @param exadataInfraResourceType the value to set + * @return this builder + **/ + public Builder exadataInfraResourceType(ExadataResourceType exadataInfraResourceType) { + this.exadataInfraResourceType = exadataInfraResourceType; + this.__explicitlySet__.add("exadataInfraResourceType"); + return this; + } + /** + * The shape of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exadataShape") + private String exadataShape; + + /** + * The shape of the Exadata Infrastructure. + * @param exadataShape the value to set + * @return this builder + **/ + public Builder exadataShape(String exadataShape) { + this.exadataShape = exadataShape; + this.__explicitlySet__.add("exadataShape"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MacsManagedCloudExadataInsight build() { + MacsManagedCloudExadataInsight model = + new MacsManagedCloudExadataInsight( + this.id, + this.compartmentId, + this.exadataName, + this.exadataDisplayName, + this.exadataType, + this.exadataRackType, + this.isVirtualizedExadata, + this.status, + this.freeformTags, + this.definedTags, + this.systemTags, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.exadataInfraId, + this.exadataInfraResourceType, + this.exadataShape); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MacsManagedCloudExadataInsight model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("exadataName")) { + this.exadataName(model.getExadataName()); + } + if (model.wasPropertyExplicitlySet("exadataDisplayName")) { + this.exadataDisplayName(model.getExadataDisplayName()); + } + if (model.wasPropertyExplicitlySet("exadataType")) { + this.exadataType(model.getExadataType()); + } + if (model.wasPropertyExplicitlySet("exadataRackType")) { + this.exadataRackType(model.getExadataRackType()); + } + if (model.wasPropertyExplicitlySet("isVirtualizedExadata")) { + this.isVirtualizedExadata(model.getIsVirtualizedExadata()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("exadataInfraId")) { + this.exadataInfraId(model.getExadataInfraId()); + } + if (model.wasPropertyExplicitlySet("exadataInfraResourceType")) { + this.exadataInfraResourceType(model.getExadataInfraResourceType()); + } + if (model.wasPropertyExplicitlySet("exadataShape")) { + this.exadataShape(model.getExadataShape()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public MacsManagedCloudExadataInsight( + String id, + String compartmentId, + String exadataName, + String exadataDisplayName, + ExadataType exadataType, + ExadataRackType exadataRackType, + Boolean isVirtualizedExadata, + ResourceStatus status, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + java.util.Date timeCreated, + java.util.Date timeUpdated, + ExadataInsightLifecycleState lifecycleState, + String lifecycleDetails, + String exadataInfraId, + ExadataResourceType exadataInfraResourceType, + String exadataShape) { + super( + id, + compartmentId, + exadataName, + exadataDisplayName, + exadataType, + exadataRackType, + isVirtualizedExadata, + status, + freeformTags, + definedTags, + systemTags, + timeCreated, + timeUpdated, + lifecycleState, + lifecycleDetails); + this.exadataInfraId = exadataInfraId; + this.exadataInfraResourceType = exadataInfraResourceType; + this.exadataShape = exadataShape; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exadataInfraId") + private final String exadataInfraId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + * @return the value + **/ + public String getExadataInfraId() { + return exadataInfraId; + } + + /** + * OCI exadata infrastructure resource type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exadataInfraResourceType") + private final ExadataResourceType exadataInfraResourceType; + + /** + * OCI exadata infrastructure resource type + * @return the value + **/ + public ExadataResourceType getExadataInfraResourceType() { + return exadataInfraResourceType; + } + + /** + * The shape of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exadataShape") + private final String exadataShape; + + /** + * The shape of the Exadata Infrastructure. + * @return the value + **/ + public String getExadataShape() { + return exadataShape; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MacsManagedCloudExadataInsight("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", exadataInfraId=").append(String.valueOf(this.exadataInfraId)); + sb.append(", exadataInfraResourceType=") + .append(String.valueOf(this.exadataInfraResourceType)); + sb.append(", exadataShape=").append(String.valueOf(this.exadataShape)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MacsManagedCloudExadataInsight)) { + return false; + } + + MacsManagedCloudExadataInsight other = (MacsManagedCloudExadataInsight) o; + return java.util.Objects.equals(this.exadataInfraId, other.exadataInfraId) + && java.util.Objects.equals( + this.exadataInfraResourceType, other.exadataInfraResourceType) + && java.util.Objects.equals(this.exadataShape, other.exadataShape) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.exadataInfraId == null ? 43 : this.exadataInfraId.hashCode()); + result = + (result * PRIME) + + (this.exadataInfraResourceType == null + ? 43 + : this.exadataInfraResourceType.hashCode()); + result = (result * PRIME) + (this.exadataShape == null ? 43 : this.exadataShape.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudExadataInsightSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudExadataInsightSummary.java new file mode 100644 index 00000000000..b41e17e875a --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MacsManagedCloudExadataInsightSummary.java @@ -0,0 +1,437 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Summary of a Cloud MACS-managed Exadata insight resource (ExaCC). + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MacsManagedCloudExadataInsightSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MacsManagedCloudExadataInsightSummary extends ExadataInsightSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("exadataName") + private String exadataName; + + public Builder exadataName(String exadataName) { + this.exadataName = exadataName; + this.__explicitlySet__.add("exadataName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("exadataDisplayName") + private String exadataDisplayName; + + public Builder exadataDisplayName(String exadataDisplayName) { + this.exadataDisplayName = exadataDisplayName; + this.__explicitlySet__.add("exadataDisplayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("exadataType") + private ExadataType exadataType; + + public Builder exadataType(ExadataType exadataType) { + this.exadataType = exadataType; + this.__explicitlySet__.add("exadataType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("exadataRackType") + private ExadataRackType exadataRackType; + + public Builder exadataRackType(ExadataRackType exadataRackType) { + this.exadataRackType = exadataRackType; + this.__explicitlySet__.add("exadataRackType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("status") + private ResourceStatus status; + + public Builder status(ResourceStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private ExadataInsightLifecycleState lifecycleState; + + public Builder lifecycleState(ExadataInsightLifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exadataInfraId") + private String exadataInfraId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + * @param exadataInfraId the value to set + * @return this builder + **/ + public Builder exadataInfraId(String exadataInfraId) { + this.exadataInfraId = exadataInfraId; + this.__explicitlySet__.add("exadataInfraId"); + return this; + } + /** + * OCI exadata infrastructure resource type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exadataInfraResourceType") + private ExadataResourceType exadataInfraResourceType; + + /** + * OCI exadata infrastructure resource type + * @param exadataInfraResourceType the value to set + * @return this builder + **/ + public Builder exadataInfraResourceType(ExadataResourceType exadataInfraResourceType) { + this.exadataInfraResourceType = exadataInfraResourceType; + this.__explicitlySet__.add("exadataInfraResourceType"); + return this; + } + /** + * The shape of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exadataShape") + private String exadataShape; + + /** + * The shape of the Exadata Infrastructure. + * @param exadataShape the value to set + * @return this builder + **/ + public Builder exadataShape(String exadataShape) { + this.exadataShape = exadataShape; + this.__explicitlySet__.add("exadataShape"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MacsManagedCloudExadataInsightSummary build() { + MacsManagedCloudExadataInsightSummary model = + new MacsManagedCloudExadataInsightSummary( + this.id, + this.compartmentId, + this.exadataName, + this.exadataDisplayName, + this.exadataType, + this.exadataRackType, + this.freeformTags, + this.definedTags, + this.systemTags, + this.status, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.exadataInfraId, + this.exadataInfraResourceType, + this.exadataShape); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MacsManagedCloudExadataInsightSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("exadataName")) { + this.exadataName(model.getExadataName()); + } + if (model.wasPropertyExplicitlySet("exadataDisplayName")) { + this.exadataDisplayName(model.getExadataDisplayName()); + } + if (model.wasPropertyExplicitlySet("exadataType")) { + this.exadataType(model.getExadataType()); + } + if (model.wasPropertyExplicitlySet("exadataRackType")) { + this.exadataRackType(model.getExadataRackType()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("exadataInfraId")) { + this.exadataInfraId(model.getExadataInfraId()); + } + if (model.wasPropertyExplicitlySet("exadataInfraResourceType")) { + this.exadataInfraResourceType(model.getExadataInfraResourceType()); + } + if (model.wasPropertyExplicitlySet("exadataShape")) { + this.exadataShape(model.getExadataShape()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public MacsManagedCloudExadataInsightSummary( + String id, + String compartmentId, + String exadataName, + String exadataDisplayName, + ExadataType exadataType, + ExadataRackType exadataRackType, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + ResourceStatus status, + java.util.Date timeCreated, + java.util.Date timeUpdated, + ExadataInsightLifecycleState lifecycleState, + String lifecycleDetails, + String exadataInfraId, + ExadataResourceType exadataInfraResourceType, + String exadataShape) { + super( + id, + compartmentId, + exadataName, + exadataDisplayName, + exadataType, + exadataRackType, + freeformTags, + definedTags, + systemTags, + status, + timeCreated, + timeUpdated, + lifecycleState, + lifecycleDetails); + this.exadataInfraId = exadataInfraId; + this.exadataInfraResourceType = exadataInfraResourceType; + this.exadataShape = exadataShape; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exadataInfraId") + private final String exadataInfraId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. + * @return the value + **/ + public String getExadataInfraId() { + return exadataInfraId; + } + + /** + * OCI exadata infrastructure resource type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exadataInfraResourceType") + private final ExadataResourceType exadataInfraResourceType; + + /** + * OCI exadata infrastructure resource type + * @return the value + **/ + public ExadataResourceType getExadataInfraResourceType() { + return exadataInfraResourceType; + } + + /** + * The shape of the Exadata Infrastructure. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("exadataShape") + private final String exadataShape; + + /** + * The shape of the Exadata Infrastructure. + * @return the value + **/ + public String getExadataShape() { + return exadataShape; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MacsManagedCloudExadataInsightSummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", exadataInfraId=").append(String.valueOf(this.exadataInfraId)); + sb.append(", exadataInfraResourceType=") + .append(String.valueOf(this.exadataInfraResourceType)); + sb.append(", exadataShape=").append(String.valueOf(this.exadataShape)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MacsManagedCloudExadataInsightSummary)) { + return false; + } + + MacsManagedCloudExadataInsightSummary other = (MacsManagedCloudExadataInsightSummary) o; + return java.util.Objects.equals(this.exadataInfraId, other.exadataInfraId) + && java.util.Objects.equals( + this.exadataInfraResourceType, other.exadataInfraResourceType) + && java.util.Objects.equals(this.exadataShape, other.exadataShape) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.exadataInfraId == null ? 43 : this.exadataInfraId.hashCode()); + result = + (result * PRIME) + + (this.exadataInfraResourceType == null + ? 43 + : this.exadataInfraResourceType.hashCode()); + result = (result * PRIME) + (this.exadataShape == null ? 43 : this.exadataShape.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MdsMySqlDatabaseInsight.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MdsMySqlDatabaseInsight.java new file mode 100644 index 00000000000..89c0c3e985b --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MdsMySqlDatabaseInsight.java @@ -0,0 +1,613 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Database insight resource. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MdsMySqlDatabaseInsight.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MdsMySqlDatabaseInsight extends DatabaseInsight { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("status") + private ResourceStatus status; + + public Builder status(ResourceStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseType") + private String databaseType; + + public Builder databaseType(String databaseType) { + this.databaseType = databaseType; + this.__explicitlySet__.add("databaseType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseVersion") + private String databaseVersion; + + public Builder databaseVersion(String databaseVersion) { + this.databaseVersion = databaseVersion; + this.__explicitlySet__.add("databaseVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("processorCount") + private Integer processorCount; + + public Builder processorCount(Integer processorCount) { + this.processorCount = processorCount; + this.__explicitlySet__.add("processorCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseConnectionStatusDetails") + private String databaseConnectionStatusDetails; + + public Builder databaseConnectionStatusDetails(String databaseConnectionStatusDetails) { + this.databaseConnectionStatusDetails = databaseConnectionStatusDetails; + this.__explicitlySet__.add("databaseConnectionStatusDetails"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + private String databaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + * @param databaseId the value to set + * @return this builder + **/ + public Builder databaseId(String databaseId) { + this.databaseId = databaseId; + this.__explicitlySet__.add("databaseId"); + return this; + } + /** + * Name of database + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseName") + private String databaseName; + + /** + * Name of database + * @param databaseName the value to set + * @return this builder + **/ + public Builder databaseName(String databaseName) { + this.databaseName = databaseName; + this.__explicitlySet__.add("databaseName"); + return this; + } + /** + * Display name of database + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseDisplayName") + private String databaseDisplayName; + + /** + * Display name of database + * @param databaseDisplayName the value to set + * @return this builder + **/ + public Builder databaseDisplayName(String databaseDisplayName) { + this.databaseDisplayName = databaseDisplayName; + this.__explicitlySet__.add("databaseDisplayName"); + return this; + } + /** + * OCI database resource type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseResourceType") + private String databaseResourceType; + + /** + * OCI database resource type + * @param databaseResourceType the value to set + * @return this builder + **/ + public Builder databaseResourceType(String databaseResourceType) { + this.databaseResourceType = databaseResourceType; + this.__explicitlySet__.add("databaseResourceType"); + return this; + } + /** + * Specifies if MYSQL DB System is highly available. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHighlyAvailable") + private Boolean isHighlyAvailable; + + /** + * Specifies if MYSQL DB System is highly available. + * @param isHighlyAvailable the value to set + * @return this builder + **/ + public Builder isHighlyAvailable(Boolean isHighlyAvailable) { + this.isHighlyAvailable = isHighlyAvailable; + this.__explicitlySet__.add("isHighlyAvailable"); + return this; + } + /** + * Specifies if MYSQL DB System has heatwave cluster attached. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHeatWaveClusterAttached") + private Boolean isHeatWaveClusterAttached; + + /** + * Specifies if MYSQL DB System has heatwave cluster attached. + * @param isHeatWaveClusterAttached the value to set + * @return this builder + **/ + public Builder isHeatWaveClusterAttached(Boolean isHeatWaveClusterAttached) { + this.isHeatWaveClusterAttached = isHeatWaveClusterAttached; + this.__explicitlySet__.add("isHeatWaveClusterAttached"); + return this; + } + /** + * Additional details of a db system in JSON format. + * For MySQL DB System, this is the DbSystem object serialized as a JSON string as defined in https://docs.oracle.com/en-us/iaas/api/#/en/mysql/20190415/DbSystem/. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbAdditionalDetails") + private Object dbAdditionalDetails; + + /** + * Additional details of a db system in JSON format. + * For MySQL DB System, this is the DbSystem object serialized as a JSON string as defined in https://docs.oracle.com/en-us/iaas/api/#/en/mysql/20190415/DbSystem/. + * + * @param dbAdditionalDetails the value to set + * @return this builder + **/ + public Builder dbAdditionalDetails(Object dbAdditionalDetails) { + this.dbAdditionalDetails = dbAdditionalDetails; + this.__explicitlySet__.add("dbAdditionalDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MdsMySqlDatabaseInsight build() { + MdsMySqlDatabaseInsight model = + new MdsMySqlDatabaseInsight( + this.id, + this.compartmentId, + this.status, + this.databaseType, + this.databaseVersion, + this.processorCount, + this.freeformTags, + this.definedTags, + this.systemTags, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.databaseConnectionStatusDetails, + this.databaseId, + this.databaseName, + this.databaseDisplayName, + this.databaseResourceType, + this.isHighlyAvailable, + this.isHeatWaveClusterAttached, + this.dbAdditionalDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MdsMySqlDatabaseInsight model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("databaseType")) { + this.databaseType(model.getDatabaseType()); + } + if (model.wasPropertyExplicitlySet("databaseVersion")) { + this.databaseVersion(model.getDatabaseVersion()); + } + if (model.wasPropertyExplicitlySet("processorCount")) { + this.processorCount(model.getProcessorCount()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("databaseConnectionStatusDetails")) { + this.databaseConnectionStatusDetails(model.getDatabaseConnectionStatusDetails()); + } + if (model.wasPropertyExplicitlySet("databaseId")) { + this.databaseId(model.getDatabaseId()); + } + if (model.wasPropertyExplicitlySet("databaseName")) { + this.databaseName(model.getDatabaseName()); + } + if (model.wasPropertyExplicitlySet("databaseDisplayName")) { + this.databaseDisplayName(model.getDatabaseDisplayName()); + } + if (model.wasPropertyExplicitlySet("databaseResourceType")) { + this.databaseResourceType(model.getDatabaseResourceType()); + } + if (model.wasPropertyExplicitlySet("isHighlyAvailable")) { + this.isHighlyAvailable(model.getIsHighlyAvailable()); + } + if (model.wasPropertyExplicitlySet("isHeatWaveClusterAttached")) { + this.isHeatWaveClusterAttached(model.getIsHeatWaveClusterAttached()); + } + if (model.wasPropertyExplicitlySet("dbAdditionalDetails")) { + this.dbAdditionalDetails(model.getDbAdditionalDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public MdsMySqlDatabaseInsight( + String id, + String compartmentId, + ResourceStatus status, + String databaseType, + String databaseVersion, + Integer processorCount, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + String lifecycleDetails, + String databaseConnectionStatusDetails, + String databaseId, + String databaseName, + String databaseDisplayName, + String databaseResourceType, + Boolean isHighlyAvailable, + Boolean isHeatWaveClusterAttached, + Object dbAdditionalDetails) { + super( + id, + compartmentId, + status, + databaseType, + databaseVersion, + processorCount, + freeformTags, + definedTags, + systemTags, + timeCreated, + timeUpdated, + lifecycleState, + lifecycleDetails, + databaseConnectionStatusDetails); + this.databaseId = databaseId; + this.databaseName = databaseName; + this.databaseDisplayName = databaseDisplayName; + this.databaseResourceType = databaseResourceType; + this.isHighlyAvailable = isHighlyAvailable; + this.isHeatWaveClusterAttached = isHeatWaveClusterAttached; + this.dbAdditionalDetails = dbAdditionalDetails; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + private final String databaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + * @return the value + **/ + public String getDatabaseId() { + return databaseId; + } + + /** + * Name of database + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseName") + private final String databaseName; + + /** + * Name of database + * @return the value + **/ + public String getDatabaseName() { + return databaseName; + } + + /** + * Display name of database + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseDisplayName") + private final String databaseDisplayName; + + /** + * Display name of database + * @return the value + **/ + public String getDatabaseDisplayName() { + return databaseDisplayName; + } + + /** + * OCI database resource type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseResourceType") + private final String databaseResourceType; + + /** + * OCI database resource type + * @return the value + **/ + public String getDatabaseResourceType() { + return databaseResourceType; + } + + /** + * Specifies if MYSQL DB System is highly available. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHighlyAvailable") + private final Boolean isHighlyAvailable; + + /** + * Specifies if MYSQL DB System is highly available. + * @return the value + **/ + public Boolean getIsHighlyAvailable() { + return isHighlyAvailable; + } + + /** + * Specifies if MYSQL DB System has heatwave cluster attached. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHeatWaveClusterAttached") + private final Boolean isHeatWaveClusterAttached; + + /** + * Specifies if MYSQL DB System has heatwave cluster attached. + * @return the value + **/ + public Boolean getIsHeatWaveClusterAttached() { + return isHeatWaveClusterAttached; + } + + /** + * Additional details of a db system in JSON format. + * For MySQL DB System, this is the DbSystem object serialized as a JSON string as defined in https://docs.oracle.com/en-us/iaas/api/#/en/mysql/20190415/DbSystem/. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbAdditionalDetails") + private final Object dbAdditionalDetails; + + /** + * Additional details of a db system in JSON format. + * For MySQL DB System, this is the DbSystem object serialized as a JSON string as defined in https://docs.oracle.com/en-us/iaas/api/#/en/mysql/20190415/DbSystem/. + * + * @return the value + **/ + public Object getDbAdditionalDetails() { + return dbAdditionalDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MdsMySqlDatabaseInsight("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", databaseId=").append(String.valueOf(this.databaseId)); + sb.append(", databaseName=").append(String.valueOf(this.databaseName)); + sb.append(", databaseDisplayName=").append(String.valueOf(this.databaseDisplayName)); + sb.append(", databaseResourceType=").append(String.valueOf(this.databaseResourceType)); + sb.append(", isHighlyAvailable=").append(String.valueOf(this.isHighlyAvailable)); + sb.append(", isHeatWaveClusterAttached=") + .append(String.valueOf(this.isHeatWaveClusterAttached)); + sb.append(", dbAdditionalDetails=").append(String.valueOf(this.dbAdditionalDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MdsMySqlDatabaseInsight)) { + return false; + } + + MdsMySqlDatabaseInsight other = (MdsMySqlDatabaseInsight) o; + return java.util.Objects.equals(this.databaseId, other.databaseId) + && java.util.Objects.equals(this.databaseName, other.databaseName) + && java.util.Objects.equals(this.databaseDisplayName, other.databaseDisplayName) + && java.util.Objects.equals(this.databaseResourceType, other.databaseResourceType) + && java.util.Objects.equals(this.isHighlyAvailable, other.isHighlyAvailable) + && java.util.Objects.equals( + this.isHeatWaveClusterAttached, other.isHeatWaveClusterAttached) + && java.util.Objects.equals(this.dbAdditionalDetails, other.dbAdditionalDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.databaseId == null ? 43 : this.databaseId.hashCode()); + result = (result * PRIME) + (this.databaseName == null ? 43 : this.databaseName.hashCode()); + result = + (result * PRIME) + + (this.databaseDisplayName == null + ? 43 + : this.databaseDisplayName.hashCode()); + result = + (result * PRIME) + + (this.databaseResourceType == null + ? 43 + : this.databaseResourceType.hashCode()); + result = + (result * PRIME) + + (this.isHighlyAvailable == null ? 43 : this.isHighlyAvailable.hashCode()); + result = + (result * PRIME) + + (this.isHeatWaveClusterAttached == null + ? 43 + : this.isHeatWaveClusterAttached.hashCode()); + result = + (result * PRIME) + + (this.dbAdditionalDetails == null + ? 43 + : this.dbAdditionalDetails.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MdsMySqlDatabaseInsightSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MdsMySqlDatabaseInsightSummary.java new file mode 100644 index 00000000000..8805111790b --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MdsMySqlDatabaseInsightSummary.java @@ -0,0 +1,415 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Summary of a database insight resource. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MdsMySqlDatabaseInsightSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MdsMySqlDatabaseInsightSummary extends DatabaseInsightSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + private String databaseId; + + public Builder databaseId(String databaseId) { + this.databaseId = databaseId; + this.__explicitlySet__.add("databaseId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseName") + private String databaseName; + + public Builder databaseName(String databaseName) { + this.databaseName = databaseName; + this.__explicitlySet__.add("databaseName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseDisplayName") + private String databaseDisplayName; + + public Builder databaseDisplayName(String databaseDisplayName) { + this.databaseDisplayName = databaseDisplayName; + this.__explicitlySet__.add("databaseDisplayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseType") + private String databaseType; + + public Builder databaseType(String databaseType) { + this.databaseType = databaseType; + this.__explicitlySet__.add("databaseType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseVersion") + private String databaseVersion; + + public Builder databaseVersion(String databaseVersion) { + this.databaseVersion = databaseVersion; + this.__explicitlySet__.add("databaseVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseHostNames") + private java.util.List databaseHostNames; + + public Builder databaseHostNames(java.util.List databaseHostNames) { + this.databaseHostNames = databaseHostNames; + this.__explicitlySet__.add("databaseHostNames"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("processorCount") + private Integer processorCount; + + public Builder processorCount(Integer processorCount) { + this.processorCount = processorCount; + this.__explicitlySet__.add("processorCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("status") + private ResourceStatus status; + + public Builder status(ResourceStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseConnectionStatusDetails") + private String databaseConnectionStatusDetails; + + public Builder databaseConnectionStatusDetails(String databaseConnectionStatusDetails) { + this.databaseConnectionStatusDetails = databaseConnectionStatusDetails; + this.__explicitlySet__.add("databaseConnectionStatusDetails"); + return this; + } + /** + * OCI database resource type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseResourceType") + private String databaseResourceType; + + /** + * OCI database resource type + * @param databaseResourceType the value to set + * @return this builder + **/ + public Builder databaseResourceType(String databaseResourceType) { + this.databaseResourceType = databaseResourceType; + this.__explicitlySet__.add("databaseResourceType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MdsMySqlDatabaseInsightSummary build() { + MdsMySqlDatabaseInsightSummary model = + new MdsMySqlDatabaseInsightSummary( + this.id, + this.databaseId, + this.compartmentId, + this.databaseName, + this.databaseDisplayName, + this.databaseType, + this.databaseVersion, + this.databaseHostNames, + this.freeformTags, + this.definedTags, + this.systemTags, + this.processorCount, + this.status, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.databaseConnectionStatusDetails, + this.databaseResourceType); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MdsMySqlDatabaseInsightSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("databaseId")) { + this.databaseId(model.getDatabaseId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("databaseName")) { + this.databaseName(model.getDatabaseName()); + } + if (model.wasPropertyExplicitlySet("databaseDisplayName")) { + this.databaseDisplayName(model.getDatabaseDisplayName()); + } + if (model.wasPropertyExplicitlySet("databaseType")) { + this.databaseType(model.getDatabaseType()); + } + if (model.wasPropertyExplicitlySet("databaseVersion")) { + this.databaseVersion(model.getDatabaseVersion()); + } + if (model.wasPropertyExplicitlySet("databaseHostNames")) { + this.databaseHostNames(model.getDatabaseHostNames()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("processorCount")) { + this.processorCount(model.getProcessorCount()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("databaseConnectionStatusDetails")) { + this.databaseConnectionStatusDetails(model.getDatabaseConnectionStatusDetails()); + } + if (model.wasPropertyExplicitlySet("databaseResourceType")) { + this.databaseResourceType(model.getDatabaseResourceType()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public MdsMySqlDatabaseInsightSummary( + String id, + String databaseId, + String compartmentId, + String databaseName, + String databaseDisplayName, + String databaseType, + String databaseVersion, + java.util.List databaseHostNames, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + Integer processorCount, + ResourceStatus status, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + String lifecycleDetails, + String databaseConnectionStatusDetails, + String databaseResourceType) { + super( + id, + databaseId, + compartmentId, + databaseName, + databaseDisplayName, + databaseType, + databaseVersion, + databaseHostNames, + freeformTags, + definedTags, + systemTags, + processorCount, + status, + timeCreated, + timeUpdated, + lifecycleState, + lifecycleDetails, + databaseConnectionStatusDetails); + this.databaseResourceType = databaseResourceType; + } + + /** + * OCI database resource type + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseResourceType") + private final String databaseResourceType; + + /** + * OCI database resource type + * @return the value + **/ + public String getDatabaseResourceType() { + return databaseResourceType; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MdsMySqlDatabaseInsightSummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", databaseResourceType=").append(String.valueOf(this.databaseResourceType)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MdsMySqlDatabaseInsightSummary)) { + return false; + } + + MdsMySqlDatabaseInsightSummary other = (MdsMySqlDatabaseInsightSummary) o; + return java.util.Objects.equals(this.databaseResourceType, other.databaseResourceType) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.databaseResourceType == null + ? 43 + : this.databaseResourceType.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MdsMysqlDatabaseConfigurationSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MdsMysqlDatabaseConfigurationSummary.java new file mode 100644 index 00000000000..663d2188a03 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MdsMysqlDatabaseConfigurationSummary.java @@ -0,0 +1,424 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Configuration Summary of a MDS MYSQL database. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MdsMysqlDatabaseConfigurationSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MdsMysqlDatabaseConfigurationSummary extends DatabaseConfigurationSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("databaseInsightId") + private String databaseInsightId; + + public Builder databaseInsightId(String databaseInsightId) { + this.databaseInsightId = databaseInsightId; + this.__explicitlySet__.add("databaseInsightId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseName") + private String databaseName; + + public Builder databaseName(String databaseName) { + this.databaseName = databaseName; + this.__explicitlySet__.add("databaseName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseDisplayName") + private String databaseDisplayName; + + public Builder databaseDisplayName(String databaseDisplayName) { + this.databaseDisplayName = databaseDisplayName; + this.__explicitlySet__.add("databaseDisplayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseType") + private String databaseType; + + public Builder databaseType(String databaseType) { + this.databaseType = databaseType; + this.__explicitlySet__.add("databaseType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("databaseVersion") + private String databaseVersion; + + public Builder databaseVersion(String databaseVersion) { + this.databaseVersion = databaseVersion; + this.__explicitlySet__.add("databaseVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("cdbName") + private String cdbName; + + public Builder cdbName(String cdbName) { + this.cdbName = cdbName; + this.__explicitlySet__.add("cdbName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("processorCount") + private Integer processorCount; + + public Builder processorCount(Integer processorCount) { + this.processorCount = processorCount; + this.__explicitlySet__.add("processorCount"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + private String databaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + * @param databaseId the value to set + * @return this builder + **/ + public Builder databaseId(String databaseId) { + this.databaseId = databaseId; + this.__explicitlySet__.add("databaseId"); + return this; + } + /** + * Specifies if MYSQL DB System has heatwave cluster attached. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHeatWaveClusterAttached") + private Boolean isHeatWaveClusterAttached; + + /** + * Specifies if MYSQL DB System has heatwave cluster attached. + * @param isHeatWaveClusterAttached the value to set + * @return this builder + **/ + public Builder isHeatWaveClusterAttached(Boolean isHeatWaveClusterAttached) { + this.isHeatWaveClusterAttached = isHeatWaveClusterAttached; + this.__explicitlySet__.add("isHeatWaveClusterAttached"); + return this; + } + /** + * Specifies if MYSQL DB System is highly available. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHighlyAvailable") + private Boolean isHighlyAvailable; + + /** + * Specifies if MYSQL DB System is highly available. + * @param isHighlyAvailable the value to set + * @return this builder + **/ + public Builder isHighlyAvailable(Boolean isHighlyAvailable) { + this.isHighlyAvailable = isHighlyAvailable; + this.__explicitlySet__.add("isHighlyAvailable"); + return this; + } + /** + * The shape of the primary instances of MYSQL DB system. The shape determines resources allocated to a DB System - CPU cores + * and memory for VM shapes; CPU cores, memory and storage for non-VM shapes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shapeName") + private String shapeName; + + /** + * The shape of the primary instances of MYSQL DB system. The shape determines resources allocated to a DB System - CPU cores + * and memory for VM shapes; CPU cores, memory and storage for non-VM shapes. + * + * @param shapeName the value to set + * @return this builder + **/ + public Builder shapeName(String shapeName) { + this.shapeName = shapeName; + this.__explicitlySet__.add("shapeName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MdsMysqlDatabaseConfigurationSummary build() { + MdsMysqlDatabaseConfigurationSummary model = + new MdsMysqlDatabaseConfigurationSummary( + this.databaseInsightId, + this.compartmentId, + this.databaseName, + this.databaseDisplayName, + this.databaseType, + this.databaseVersion, + this.cdbName, + this.definedTags, + this.freeformTags, + this.processorCount, + this.databaseId, + this.isHeatWaveClusterAttached, + this.isHighlyAvailable, + this.shapeName); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MdsMysqlDatabaseConfigurationSummary model) { + if (model.wasPropertyExplicitlySet("databaseInsightId")) { + this.databaseInsightId(model.getDatabaseInsightId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("databaseName")) { + this.databaseName(model.getDatabaseName()); + } + if (model.wasPropertyExplicitlySet("databaseDisplayName")) { + this.databaseDisplayName(model.getDatabaseDisplayName()); + } + if (model.wasPropertyExplicitlySet("databaseType")) { + this.databaseType(model.getDatabaseType()); + } + if (model.wasPropertyExplicitlySet("databaseVersion")) { + this.databaseVersion(model.getDatabaseVersion()); + } + if (model.wasPropertyExplicitlySet("cdbName")) { + this.cdbName(model.getCdbName()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("processorCount")) { + this.processorCount(model.getProcessorCount()); + } + if (model.wasPropertyExplicitlySet("databaseId")) { + this.databaseId(model.getDatabaseId()); + } + if (model.wasPropertyExplicitlySet("isHeatWaveClusterAttached")) { + this.isHeatWaveClusterAttached(model.getIsHeatWaveClusterAttached()); + } + if (model.wasPropertyExplicitlySet("isHighlyAvailable")) { + this.isHighlyAvailable(model.getIsHighlyAvailable()); + } + if (model.wasPropertyExplicitlySet("shapeName")) { + this.shapeName(model.getShapeName()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public MdsMysqlDatabaseConfigurationSummary( + String databaseInsightId, + String compartmentId, + String databaseName, + String databaseDisplayName, + String databaseType, + String databaseVersion, + String cdbName, + java.util.Map> definedTags, + java.util.Map freeformTags, + Integer processorCount, + String databaseId, + Boolean isHeatWaveClusterAttached, + Boolean isHighlyAvailable, + String shapeName) { + super( + databaseInsightId, + compartmentId, + databaseName, + databaseDisplayName, + databaseType, + databaseVersion, + cdbName, + definedTags, + freeformTags, + processorCount); + this.databaseId = databaseId; + this.isHeatWaveClusterAttached = isHeatWaveClusterAttached; + this.isHighlyAvailable = isHighlyAvailable; + this.shapeName = shapeName; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("databaseId") + private final String databaseId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + * @return the value + **/ + public String getDatabaseId() { + return databaseId; + } + + /** + * Specifies if MYSQL DB System has heatwave cluster attached. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHeatWaveClusterAttached") + private final Boolean isHeatWaveClusterAttached; + + /** + * Specifies if MYSQL DB System has heatwave cluster attached. + * @return the value + **/ + public Boolean getIsHeatWaveClusterAttached() { + return isHeatWaveClusterAttached; + } + + /** + * Specifies if MYSQL DB System is highly available. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHighlyAvailable") + private final Boolean isHighlyAvailable; + + /** + * Specifies if MYSQL DB System is highly available. + * @return the value + **/ + public Boolean getIsHighlyAvailable() { + return isHighlyAvailable; + } + + /** + * The shape of the primary instances of MYSQL DB system. The shape determines resources allocated to a DB System - CPU cores + * and memory for VM shapes; CPU cores, memory and storage for non-VM shapes. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shapeName") + private final String shapeName; + + /** + * The shape of the primary instances of MYSQL DB system. The shape determines resources allocated to a DB System - CPU cores + * and memory for VM shapes; CPU cores, memory and storage for non-VM shapes. + * + * @return the value + **/ + public String getShapeName() { + return shapeName; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MdsMysqlDatabaseConfigurationSummary("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", databaseId=").append(String.valueOf(this.databaseId)); + sb.append(", isHeatWaveClusterAttached=") + .append(String.valueOf(this.isHeatWaveClusterAttached)); + sb.append(", isHighlyAvailable=").append(String.valueOf(this.isHighlyAvailable)); + sb.append(", shapeName=").append(String.valueOf(this.shapeName)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MdsMysqlDatabaseConfigurationSummary)) { + return false; + } + + MdsMysqlDatabaseConfigurationSummary other = (MdsMysqlDatabaseConfigurationSummary) o; + return java.util.Objects.equals(this.databaseId, other.databaseId) + && java.util.Objects.equals( + this.isHeatWaveClusterAttached, other.isHeatWaveClusterAttached) + && java.util.Objects.equals(this.isHighlyAvailable, other.isHighlyAvailable) + && java.util.Objects.equals(this.shapeName, other.shapeName) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.databaseId == null ? 43 : this.databaseId.hashCode()); + result = + (result * PRIME) + + (this.isHeatWaveClusterAttached == null + ? 43 + : this.isHeatWaveClusterAttached.hashCode()); + result = + (result * PRIME) + + (this.isHighlyAvailable == null ? 43 : this.isHighlyAvailable.hashCode()); + result = (result * PRIME) + (this.shapeName == null ? 43 : this.shapeName.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MySqlSqlStats.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MySqlSqlStats.java new file mode 100644 index 00000000000..1bd4014ff4f --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/MySqlSqlStats.java @@ -0,0 +1,1504 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * MySql Sql Stats type object. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = MySqlSqlStats.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MySqlSqlStats extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "digest", + "timeCollected", + "commandType", + "totalRows", + "perfSchemaUsedPercent", + "schemaName", + "execCount", + "totalLatencyInPs", + "lockLatencyInPs", + "errCount", + "warnCount", + "rowsAffected", + "rowsSent", + "rowsExamined", + "tmpDiskTables", + "tmpTables", + "selectFullJoin", + "selectFullRangeJoin", + "selectRange", + "selectRangeCheck", + "selectScan", + "sortMergePasses", + "sortRange", + "rowsSorted", + "sortScan", + "noIndexUsedCount", + "noGoodIndexUsedCount", + "cpuLatencyInPs", + "maxControlledMemoryInBytes", + "maxTotalMemoryInBytes", + "execCountSecondary", + "timeFirstSeen", + "timeLastSeen" + }) + public MySqlSqlStats( + String digest, + java.util.Date timeCollected, + String commandType, + Long totalRows, + Long perfSchemaUsedPercent, + String schemaName, + Long execCount, + Long totalLatencyInPs, + Long lockLatencyInPs, + Long errCount, + Long warnCount, + Long rowsAffected, + Long rowsSent, + Long rowsExamined, + Long tmpDiskTables, + Long tmpTables, + Long selectFullJoin, + Long selectFullRangeJoin, + Long selectRange, + Long selectRangeCheck, + Long selectScan, + Long sortMergePasses, + Long sortRange, + Long rowsSorted, + Long sortScan, + Long noIndexUsedCount, + Long noGoodIndexUsedCount, + Long cpuLatencyInPs, + Long maxControlledMemoryInBytes, + Long maxTotalMemoryInBytes, + Long execCountSecondary, + java.util.Date timeFirstSeen, + java.util.Date timeLastSeen) { + super(); + this.digest = digest; + this.timeCollected = timeCollected; + this.commandType = commandType; + this.totalRows = totalRows; + this.perfSchemaUsedPercent = perfSchemaUsedPercent; + this.schemaName = schemaName; + this.execCount = execCount; + this.totalLatencyInPs = totalLatencyInPs; + this.lockLatencyInPs = lockLatencyInPs; + this.errCount = errCount; + this.warnCount = warnCount; + this.rowsAffected = rowsAffected; + this.rowsSent = rowsSent; + this.rowsExamined = rowsExamined; + this.tmpDiskTables = tmpDiskTables; + this.tmpTables = tmpTables; + this.selectFullJoin = selectFullJoin; + this.selectFullRangeJoin = selectFullRangeJoin; + this.selectRange = selectRange; + this.selectRangeCheck = selectRangeCheck; + this.selectScan = selectScan; + this.sortMergePasses = sortMergePasses; + this.sortRange = sortRange; + this.rowsSorted = rowsSorted; + this.sortScan = sortScan; + this.noIndexUsedCount = noIndexUsedCount; + this.noGoodIndexUsedCount = noGoodIndexUsedCount; + this.cpuLatencyInPs = cpuLatencyInPs; + this.maxControlledMemoryInBytes = maxControlledMemoryInBytes; + this.maxTotalMemoryInBytes = maxTotalMemoryInBytes; + this.execCountSecondary = execCountSecondary; + this.timeFirstSeen = timeFirstSeen; + this.timeLastSeen = timeLastSeen; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Unique SQL ID Digest for a MySql Statement. + * Example: {@code "c20fcea11911be36651b7ca7bd3712d4ed9ac1134cee9c6620039e1fb13b5eff"} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("digest") + private String digest; + + /** + * Unique SQL ID Digest for a MySql Statement. + * Example: {@code "c20fcea11911be36651b7ca7bd3712d4ed9ac1134cee9c6620039e1fb13b5eff"} + * + * @param digest the value to set + * @return this builder + **/ + public Builder digest(String digest) { + this.digest = digest; + this.__explicitlySet__.add("digest"); + return this; + } + /** + * Collection timestamp. + * Example: {@code "2020-03-31T00:00:00.000Z"} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCollected") + private java.util.Date timeCollected; + + /** + * Collection timestamp. + * Example: {@code "2020-03-31T00:00:00.000Z"} + * + * @param timeCollected the value to set + * @return this builder + **/ + public Builder timeCollected(java.util.Date timeCollected) { + this.timeCollected = timeCollected; + this.__explicitlySet__.add("timeCollected"); + return this; + } + /** + * Type of statement such as select, update or delete. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commandType") + private String commandType; + + /** + * Type of statement such as select, update or delete. + * @param commandType the value to set + * @return this builder + **/ + public Builder commandType(String commandType) { + this.commandType = commandType; + this.__explicitlySet__.add("commandType"); + return this; + } + /** + * Total number of SQL statements used in collection ranking calculation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalRows") + private Long totalRows; + + /** + * Total number of SQL statements used in collection ranking calculation. + * @param totalRows the value to set + * @return this builder + **/ + public Builder totalRows(Long totalRows) { + this.totalRows = totalRows; + this.__explicitlySet__.add("totalRows"); + return this; + } + /** + * Percent of SQL statements in the perf schema table relative to max or overflow count set in @@GLOBAL.performance_schema_digests_size. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("perfSchemaUsedPercent") + private Long perfSchemaUsedPercent; + + /** + * Percent of SQL statements in the perf schema table relative to max or overflow count set in @@GLOBAL.performance_schema_digests_size. + * @param perfSchemaUsedPercent the value to set + * @return this builder + **/ + public Builder perfSchemaUsedPercent(Long perfSchemaUsedPercent) { + this.perfSchemaUsedPercent = perfSchemaUsedPercent; + this.__explicitlySet__.add("perfSchemaUsedPercent"); + return this; + } + /** + * Name of Database Schema. + * Example: {@code "performance_schema"} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schemaName") + private String schemaName; + + /** + * Name of Database Schema. + * Example: {@code "performance_schema"} + * + * @param schemaName the value to set + * @return this builder + **/ + public Builder schemaName(String schemaName) { + this.schemaName = schemaName; + this.__explicitlySet__.add("schemaName"); + return this; + } + /** + * The total number of times the statement has executed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("execCount") + private Long execCount; + + /** + * The total number of times the statement has executed. + * @param execCount the value to set + * @return this builder + **/ + public Builder execCount(Long execCount) { + this.execCount = execCount; + this.__explicitlySet__.add("execCount"); + return this; + } + /** + * The total wait time (in picoseconds) of timed occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalLatencyInPs") + private Long totalLatencyInPs; + + /** + * The total wait time (in picoseconds) of timed occurrences of the statement. + * @param totalLatencyInPs the value to set + * @return this builder + **/ + public Builder totalLatencyInPs(Long totalLatencyInPs) { + this.totalLatencyInPs = totalLatencyInPs; + this.__explicitlySet__.add("totalLatencyInPs"); + return this; + } + /** + * The total time waiting (in picoseconds) for locks by timed occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lockLatencyInPs") + private Long lockLatencyInPs; + + /** + * The total time waiting (in picoseconds) for locks by timed occurrences of the statement. + * @param lockLatencyInPs the value to set + * @return this builder + **/ + public Builder lockLatencyInPs(Long lockLatencyInPs) { + this.lockLatencyInPs = lockLatencyInPs; + this.__explicitlySet__.add("lockLatencyInPs"); + return this; + } + /** + * The total number of errors produced by occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("errCount") + private Long errCount; + + /** + * The total number of errors produced by occurrences of the statement. + * @param errCount the value to set + * @return this builder + **/ + public Builder errCount(Long errCount) { + this.errCount = errCount; + this.__explicitlySet__.add("errCount"); + return this; + } + /** + * The total number of warnings produced by occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("warnCount") + private Long warnCount; + + /** + * The total number of warnings produced by occurrences of the statement. + * @param warnCount the value to set + * @return this builder + **/ + public Builder warnCount(Long warnCount) { + this.warnCount = warnCount; + this.__explicitlySet__.add("warnCount"); + return this; + } + /** + * The total number of rows affected by occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rowsAffected") + private Long rowsAffected; + + /** + * The total number of rows affected by occurrences of the statement. + * @param rowsAffected the value to set + * @return this builder + **/ + public Builder rowsAffected(Long rowsAffected) { + this.rowsAffected = rowsAffected; + this.__explicitlySet__.add("rowsAffected"); + return this; + } + /** + * The total number of rows returned by occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rowsSent") + private Long rowsSent; + + /** + * The total number of rows returned by occurrences of the statement. + * @param rowsSent the value to set + * @return this builder + **/ + public Builder rowsSent(Long rowsSent) { + this.rowsSent = rowsSent; + this.__explicitlySet__.add("rowsSent"); + return this; + } + /** + * The total number of rows read from storage engines by occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rowsExamined") + private Long rowsExamined; + + /** + * The total number of rows read from storage engines by occurrences of the statement. + * @param rowsExamined the value to set + * @return this builder + **/ + public Builder rowsExamined(Long rowsExamined) { + this.rowsExamined = rowsExamined; + this.__explicitlySet__.add("rowsExamined"); + return this; + } + /** + * The total number of internal on-disk temporary tables created by occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tmpDiskTables") + private Long tmpDiskTables; + + /** + * The total number of internal on-disk temporary tables created by occurrences of the statement. + * @param tmpDiskTables the value to set + * @return this builder + **/ + public Builder tmpDiskTables(Long tmpDiskTables) { + this.tmpDiskTables = tmpDiskTables; + this.__explicitlySet__.add("tmpDiskTables"); + return this; + } + /** + * The total number of internal in-memory temporary tables created by occurrences of the statement Count + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tmpTables") + private Long tmpTables; + + /** + * The total number of internal in-memory temporary tables created by occurrences of the statement Count + * @param tmpTables the value to set + * @return this builder + **/ + public Builder tmpTables(Long tmpTables) { + this.tmpTables = tmpTables; + this.__explicitlySet__.add("tmpTables"); + return this; + } + /** + * The total number of joins that perform table scans because they do not use indexes by occurrences of the statement. If this value is not 0 + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selectFullJoin") + private Long selectFullJoin; + + /** + * The total number of joins that perform table scans because they do not use indexes by occurrences of the statement. If this value is not 0 + * @param selectFullJoin the value to set + * @return this builder + **/ + public Builder selectFullJoin(Long selectFullJoin) { + this.selectFullJoin = selectFullJoin; + this.__explicitlySet__.add("selectFullJoin"); + return this; + } + /** + * The total number of joins that used a range search on a reference table by occurrences of the statement + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selectFullRangeJoin") + private Long selectFullRangeJoin; + + /** + * The total number of joins that used a range search on a reference table by occurrences of the statement + * @param selectFullRangeJoin the value to set + * @return this builder + **/ + public Builder selectFullRangeJoin(Long selectFullRangeJoin) { + this.selectFullRangeJoin = selectFullRangeJoin; + this.__explicitlySet__.add("selectFullRangeJoin"); + return this; + } + /** + * The total number of joins that used ranges on the first table by occurrences of the statement. This is normally not a critical issue even if the value is quite large. Count + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selectRange") + private Long selectRange; + + /** + * The total number of joins that used ranges on the first table by occurrences of the statement. This is normally not a critical issue even if the value is quite large. Count + * @param selectRange the value to set + * @return this builder + **/ + public Builder selectRange(Long selectRange) { + this.selectRange = selectRange; + this.__explicitlySet__.add("selectRange"); + return this; + } + /** + * The total number of joins without keys that check for key usage after each row by occurrences of the statement. If this is not 0 + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selectRangeCheck") + private Long selectRangeCheck; + + /** + * The total number of joins without keys that check for key usage after each row by occurrences of the statement. If this is not 0 + * @param selectRangeCheck the value to set + * @return this builder + **/ + public Builder selectRangeCheck(Long selectRangeCheck) { + this.selectRangeCheck = selectRangeCheck; + this.__explicitlySet__.add("selectRangeCheck"); + return this; + } + /** + * The total number of joins that did a full scan of the first table by occurrences of the statement Count + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selectScan") + private Long selectScan; + + /** + * The total number of joins that did a full scan of the first table by occurrences of the statement Count + * @param selectScan the value to set + * @return this builder + **/ + public Builder selectScan(Long selectScan) { + this.selectScan = selectScan; + this.__explicitlySet__.add("selectScan"); + return this; + } + /** + * The total number of sort merge passes by occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sortMergePasses") + private Long sortMergePasses; + + /** + * The total number of sort merge passes by occurrences of the statement. + * @param sortMergePasses the value to set + * @return this builder + **/ + public Builder sortMergePasses(Long sortMergePasses) { + this.sortMergePasses = sortMergePasses; + this.__explicitlySet__.add("sortMergePasses"); + return this; + } + /** + * The total number of sorts that were done using ranges by occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sortRange") + private Long sortRange; + + /** + * The total number of sorts that were done using ranges by occurrences of the statement. + * @param sortRange the value to set + * @return this builder + **/ + public Builder sortRange(Long sortRange) { + this.sortRange = sortRange; + this.__explicitlySet__.add("sortRange"); + return this; + } + /** + * The total number of rows sorted by occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rowsSorted") + private Long rowsSorted; + + /** + * The total number of rows sorted by occurrences of the statement. + * @param rowsSorted the value to set + * @return this builder + **/ + public Builder rowsSorted(Long rowsSorted) { + this.rowsSorted = rowsSorted; + this.__explicitlySet__.add("rowsSorted"); + return this; + } + /** + * The total number of sorts that were done by scanning the table by occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sortScan") + private Long sortScan; + + /** + * The total number of sorts that were done by scanning the table by occurrences of the statement. + * @param sortScan the value to set + * @return this builder + **/ + public Builder sortScan(Long sortScan) { + this.sortScan = sortScan; + this.__explicitlySet__.add("sortScan"); + return this; + } + /** + * The number of occurences of the statement which performed a table scan without using an index Count + **/ + @com.fasterxml.jackson.annotation.JsonProperty("noIndexUsedCount") + private Long noIndexUsedCount; + + /** + * The number of occurences of the statement which performed a table scan without using an index Count + * @param noIndexUsedCount the value to set + * @return this builder + **/ + public Builder noIndexUsedCount(Long noIndexUsedCount) { + this.noIndexUsedCount = noIndexUsedCount; + this.__explicitlySet__.add("noIndexUsedCount"); + return this; + } + /** + * The number of occurences of the statement where the server found no good index to use Count + **/ + @com.fasterxml.jackson.annotation.JsonProperty("noGoodIndexUsedCount") + private Long noGoodIndexUsedCount; + + /** + * The number of occurences of the statement where the server found no good index to use Count + * @param noGoodIndexUsedCount the value to set + * @return this builder + **/ + public Builder noGoodIndexUsedCount(Long noGoodIndexUsedCount) { + this.noGoodIndexUsedCount = noGoodIndexUsedCount; + this.__explicitlySet__.add("noGoodIndexUsedCount"); + return this; + } + /** + * The total time spent on CPU (in picoseconds) for the current thread. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cpuLatencyInPs") + private Long cpuLatencyInPs; + + /** + * The total time spent on CPU (in picoseconds) for the current thread. + * @param cpuLatencyInPs the value to set + * @return this builder + **/ + public Builder cpuLatencyInPs(Long cpuLatencyInPs) { + this.cpuLatencyInPs = cpuLatencyInPs; + this.__explicitlySet__.add("cpuLatencyInPs"); + return this; + } + /** + * The maximum amount of controlled memory (in bytes) used by the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxControlledMemoryInBytes") + private Long maxControlledMemoryInBytes; + + /** + * The maximum amount of controlled memory (in bytes) used by the statement. + * @param maxControlledMemoryInBytes the value to set + * @return this builder + **/ + public Builder maxControlledMemoryInBytes(Long maxControlledMemoryInBytes) { + this.maxControlledMemoryInBytes = maxControlledMemoryInBytes; + this.__explicitlySet__.add("maxControlledMemoryInBytes"); + return this; + } + /** + * The maximum amount of memory (in bytes) used by the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxTotalMemoryInBytes") + private Long maxTotalMemoryInBytes; + + /** + * The maximum amount of memory (in bytes) used by the statement. + * @param maxTotalMemoryInBytes the value to set + * @return this builder + **/ + public Builder maxTotalMemoryInBytes(Long maxTotalMemoryInBytes) { + this.maxTotalMemoryInBytes = maxTotalMemoryInBytes; + this.__explicitlySet__.add("maxTotalMemoryInBytes"); + return this; + } + /** + * The total number of times a query was processed on the secondary engine (HEATWAVE) for occurrences of this statement Count. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("execCountSecondary") + private Long execCountSecondary; + + /** + * The total number of times a query was processed on the secondary engine (HEATWAVE) for occurrences of this statement Count. + * @param execCountSecondary the value to set + * @return this builder + **/ + public Builder execCountSecondary(Long execCountSecondary) { + this.execCountSecondary = execCountSecondary; + this.__explicitlySet__.add("execCountSecondary"); + return this; + } + /** + * The time at which statement was first seen. + * Example: {@code "2023-01-16 08:04:31.533577"} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFirstSeen") + private java.util.Date timeFirstSeen; + + /** + * The time at which statement was first seen. + * Example: {@code "2023-01-16 08:04:31.533577"} + * + * @param timeFirstSeen the value to set + * @return this builder + **/ + public Builder timeFirstSeen(java.util.Date timeFirstSeen) { + this.timeFirstSeen = timeFirstSeen; + this.__explicitlySet__.add("timeFirstSeen"); + return this; + } + /** + * The time at which statement was most recently seen for all occurrences of the statement. + * Example: {@code "2023-01-30 02:17:08.067961"} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLastSeen") + private java.util.Date timeLastSeen; + + /** + * The time at which statement was most recently seen for all occurrences of the statement. + * Example: {@code "2023-01-30 02:17:08.067961"} + * + * @param timeLastSeen the value to set + * @return this builder + **/ + public Builder timeLastSeen(java.util.Date timeLastSeen) { + this.timeLastSeen = timeLastSeen; + this.__explicitlySet__.add("timeLastSeen"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MySqlSqlStats build() { + MySqlSqlStats model = + new MySqlSqlStats( + this.digest, + this.timeCollected, + this.commandType, + this.totalRows, + this.perfSchemaUsedPercent, + this.schemaName, + this.execCount, + this.totalLatencyInPs, + this.lockLatencyInPs, + this.errCount, + this.warnCount, + this.rowsAffected, + this.rowsSent, + this.rowsExamined, + this.tmpDiskTables, + this.tmpTables, + this.selectFullJoin, + this.selectFullRangeJoin, + this.selectRange, + this.selectRangeCheck, + this.selectScan, + this.sortMergePasses, + this.sortRange, + this.rowsSorted, + this.sortScan, + this.noIndexUsedCount, + this.noGoodIndexUsedCount, + this.cpuLatencyInPs, + this.maxControlledMemoryInBytes, + this.maxTotalMemoryInBytes, + this.execCountSecondary, + this.timeFirstSeen, + this.timeLastSeen); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MySqlSqlStats model) { + if (model.wasPropertyExplicitlySet("digest")) { + this.digest(model.getDigest()); + } + if (model.wasPropertyExplicitlySet("timeCollected")) { + this.timeCollected(model.getTimeCollected()); + } + if (model.wasPropertyExplicitlySet("commandType")) { + this.commandType(model.getCommandType()); + } + if (model.wasPropertyExplicitlySet("totalRows")) { + this.totalRows(model.getTotalRows()); + } + if (model.wasPropertyExplicitlySet("perfSchemaUsedPercent")) { + this.perfSchemaUsedPercent(model.getPerfSchemaUsedPercent()); + } + if (model.wasPropertyExplicitlySet("schemaName")) { + this.schemaName(model.getSchemaName()); + } + if (model.wasPropertyExplicitlySet("execCount")) { + this.execCount(model.getExecCount()); + } + if (model.wasPropertyExplicitlySet("totalLatencyInPs")) { + this.totalLatencyInPs(model.getTotalLatencyInPs()); + } + if (model.wasPropertyExplicitlySet("lockLatencyInPs")) { + this.lockLatencyInPs(model.getLockLatencyInPs()); + } + if (model.wasPropertyExplicitlySet("errCount")) { + this.errCount(model.getErrCount()); + } + if (model.wasPropertyExplicitlySet("warnCount")) { + this.warnCount(model.getWarnCount()); + } + if (model.wasPropertyExplicitlySet("rowsAffected")) { + this.rowsAffected(model.getRowsAffected()); + } + if (model.wasPropertyExplicitlySet("rowsSent")) { + this.rowsSent(model.getRowsSent()); + } + if (model.wasPropertyExplicitlySet("rowsExamined")) { + this.rowsExamined(model.getRowsExamined()); + } + if (model.wasPropertyExplicitlySet("tmpDiskTables")) { + this.tmpDiskTables(model.getTmpDiskTables()); + } + if (model.wasPropertyExplicitlySet("tmpTables")) { + this.tmpTables(model.getTmpTables()); + } + if (model.wasPropertyExplicitlySet("selectFullJoin")) { + this.selectFullJoin(model.getSelectFullJoin()); + } + if (model.wasPropertyExplicitlySet("selectFullRangeJoin")) { + this.selectFullRangeJoin(model.getSelectFullRangeJoin()); + } + if (model.wasPropertyExplicitlySet("selectRange")) { + this.selectRange(model.getSelectRange()); + } + if (model.wasPropertyExplicitlySet("selectRangeCheck")) { + this.selectRangeCheck(model.getSelectRangeCheck()); + } + if (model.wasPropertyExplicitlySet("selectScan")) { + this.selectScan(model.getSelectScan()); + } + if (model.wasPropertyExplicitlySet("sortMergePasses")) { + this.sortMergePasses(model.getSortMergePasses()); + } + if (model.wasPropertyExplicitlySet("sortRange")) { + this.sortRange(model.getSortRange()); + } + if (model.wasPropertyExplicitlySet("rowsSorted")) { + this.rowsSorted(model.getRowsSorted()); + } + if (model.wasPropertyExplicitlySet("sortScan")) { + this.sortScan(model.getSortScan()); + } + if (model.wasPropertyExplicitlySet("noIndexUsedCount")) { + this.noIndexUsedCount(model.getNoIndexUsedCount()); + } + if (model.wasPropertyExplicitlySet("noGoodIndexUsedCount")) { + this.noGoodIndexUsedCount(model.getNoGoodIndexUsedCount()); + } + if (model.wasPropertyExplicitlySet("cpuLatencyInPs")) { + this.cpuLatencyInPs(model.getCpuLatencyInPs()); + } + if (model.wasPropertyExplicitlySet("maxControlledMemoryInBytes")) { + this.maxControlledMemoryInBytes(model.getMaxControlledMemoryInBytes()); + } + if (model.wasPropertyExplicitlySet("maxTotalMemoryInBytes")) { + this.maxTotalMemoryInBytes(model.getMaxTotalMemoryInBytes()); + } + if (model.wasPropertyExplicitlySet("execCountSecondary")) { + this.execCountSecondary(model.getExecCountSecondary()); + } + if (model.wasPropertyExplicitlySet("timeFirstSeen")) { + this.timeFirstSeen(model.getTimeFirstSeen()); + } + if (model.wasPropertyExplicitlySet("timeLastSeen")) { + this.timeLastSeen(model.getTimeLastSeen()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Unique SQL ID Digest for a MySql Statement. + * Example: {@code "c20fcea11911be36651b7ca7bd3712d4ed9ac1134cee9c6620039e1fb13b5eff"} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("digest") + private final String digest; + + /** + * Unique SQL ID Digest for a MySql Statement. + * Example: {@code "c20fcea11911be36651b7ca7bd3712d4ed9ac1134cee9c6620039e1fb13b5eff"} + * + * @return the value + **/ + public String getDigest() { + return digest; + } + + /** + * Collection timestamp. + * Example: {@code "2020-03-31T00:00:00.000Z"} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCollected") + private final java.util.Date timeCollected; + + /** + * Collection timestamp. + * Example: {@code "2020-03-31T00:00:00.000Z"} + * + * @return the value + **/ + public java.util.Date getTimeCollected() { + return timeCollected; + } + + /** + * Type of statement such as select, update or delete. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("commandType") + private final String commandType; + + /** + * Type of statement such as select, update or delete. + * @return the value + **/ + public String getCommandType() { + return commandType; + } + + /** + * Total number of SQL statements used in collection ranking calculation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalRows") + private final Long totalRows; + + /** + * Total number of SQL statements used in collection ranking calculation. + * @return the value + **/ + public Long getTotalRows() { + return totalRows; + } + + /** + * Percent of SQL statements in the perf schema table relative to max or overflow count set in @@GLOBAL.performance_schema_digests_size. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("perfSchemaUsedPercent") + private final Long perfSchemaUsedPercent; + + /** + * Percent of SQL statements in the perf schema table relative to max or overflow count set in @@GLOBAL.performance_schema_digests_size. + * @return the value + **/ + public Long getPerfSchemaUsedPercent() { + return perfSchemaUsedPercent; + } + + /** + * Name of Database Schema. + * Example: {@code "performance_schema"} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("schemaName") + private final String schemaName; + + /** + * Name of Database Schema. + * Example: {@code "performance_schema"} + * + * @return the value + **/ + public String getSchemaName() { + return schemaName; + } + + /** + * The total number of times the statement has executed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("execCount") + private final Long execCount; + + /** + * The total number of times the statement has executed. + * @return the value + **/ + public Long getExecCount() { + return execCount; + } + + /** + * The total wait time (in picoseconds) of timed occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalLatencyInPs") + private final Long totalLatencyInPs; + + /** + * The total wait time (in picoseconds) of timed occurrences of the statement. + * @return the value + **/ + public Long getTotalLatencyInPs() { + return totalLatencyInPs; + } + + /** + * The total time waiting (in picoseconds) for locks by timed occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lockLatencyInPs") + private final Long lockLatencyInPs; + + /** + * The total time waiting (in picoseconds) for locks by timed occurrences of the statement. + * @return the value + **/ + public Long getLockLatencyInPs() { + return lockLatencyInPs; + } + + /** + * The total number of errors produced by occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("errCount") + private final Long errCount; + + /** + * The total number of errors produced by occurrences of the statement. + * @return the value + **/ + public Long getErrCount() { + return errCount; + } + + /** + * The total number of warnings produced by occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("warnCount") + private final Long warnCount; + + /** + * The total number of warnings produced by occurrences of the statement. + * @return the value + **/ + public Long getWarnCount() { + return warnCount; + } + + /** + * The total number of rows affected by occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rowsAffected") + private final Long rowsAffected; + + /** + * The total number of rows affected by occurrences of the statement. + * @return the value + **/ + public Long getRowsAffected() { + return rowsAffected; + } + + /** + * The total number of rows returned by occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rowsSent") + private final Long rowsSent; + + /** + * The total number of rows returned by occurrences of the statement. + * @return the value + **/ + public Long getRowsSent() { + return rowsSent; + } + + /** + * The total number of rows read from storage engines by occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rowsExamined") + private final Long rowsExamined; + + /** + * The total number of rows read from storage engines by occurrences of the statement. + * @return the value + **/ + public Long getRowsExamined() { + return rowsExamined; + } + + /** + * The total number of internal on-disk temporary tables created by occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tmpDiskTables") + private final Long tmpDiskTables; + + /** + * The total number of internal on-disk temporary tables created by occurrences of the statement. + * @return the value + **/ + public Long getTmpDiskTables() { + return tmpDiskTables; + } + + /** + * The total number of internal in-memory temporary tables created by occurrences of the statement Count + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tmpTables") + private final Long tmpTables; + + /** + * The total number of internal in-memory temporary tables created by occurrences of the statement Count + * @return the value + **/ + public Long getTmpTables() { + return tmpTables; + } + + /** + * The total number of joins that perform table scans because they do not use indexes by occurrences of the statement. If this value is not 0 + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selectFullJoin") + private final Long selectFullJoin; + + /** + * The total number of joins that perform table scans because they do not use indexes by occurrences of the statement. If this value is not 0 + * @return the value + **/ + public Long getSelectFullJoin() { + return selectFullJoin; + } + + /** + * The total number of joins that used a range search on a reference table by occurrences of the statement + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selectFullRangeJoin") + private final Long selectFullRangeJoin; + + /** + * The total number of joins that used a range search on a reference table by occurrences of the statement + * @return the value + **/ + public Long getSelectFullRangeJoin() { + return selectFullRangeJoin; + } + + /** + * The total number of joins that used ranges on the first table by occurrences of the statement. This is normally not a critical issue even if the value is quite large. Count + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selectRange") + private final Long selectRange; + + /** + * The total number of joins that used ranges on the first table by occurrences of the statement. This is normally not a critical issue even if the value is quite large. Count + * @return the value + **/ + public Long getSelectRange() { + return selectRange; + } + + /** + * The total number of joins without keys that check for key usage after each row by occurrences of the statement. If this is not 0 + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selectRangeCheck") + private final Long selectRangeCheck; + + /** + * The total number of joins without keys that check for key usage after each row by occurrences of the statement. If this is not 0 + * @return the value + **/ + public Long getSelectRangeCheck() { + return selectRangeCheck; + } + + /** + * The total number of joins that did a full scan of the first table by occurrences of the statement Count + **/ + @com.fasterxml.jackson.annotation.JsonProperty("selectScan") + private final Long selectScan; + + /** + * The total number of joins that did a full scan of the first table by occurrences of the statement Count + * @return the value + **/ + public Long getSelectScan() { + return selectScan; + } + + /** + * The total number of sort merge passes by occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sortMergePasses") + private final Long sortMergePasses; + + /** + * The total number of sort merge passes by occurrences of the statement. + * @return the value + **/ + public Long getSortMergePasses() { + return sortMergePasses; + } + + /** + * The total number of sorts that were done using ranges by occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sortRange") + private final Long sortRange; + + /** + * The total number of sorts that were done using ranges by occurrences of the statement. + * @return the value + **/ + public Long getSortRange() { + return sortRange; + } + + /** + * The total number of rows sorted by occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("rowsSorted") + private final Long rowsSorted; + + /** + * The total number of rows sorted by occurrences of the statement. + * @return the value + **/ + public Long getRowsSorted() { + return rowsSorted; + } + + /** + * The total number of sorts that were done by scanning the table by occurrences of the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sortScan") + private final Long sortScan; + + /** + * The total number of sorts that were done by scanning the table by occurrences of the statement. + * @return the value + **/ + public Long getSortScan() { + return sortScan; + } + + /** + * The number of occurences of the statement which performed a table scan without using an index Count + **/ + @com.fasterxml.jackson.annotation.JsonProperty("noIndexUsedCount") + private final Long noIndexUsedCount; + + /** + * The number of occurences of the statement which performed a table scan without using an index Count + * @return the value + **/ + public Long getNoIndexUsedCount() { + return noIndexUsedCount; + } + + /** + * The number of occurences of the statement where the server found no good index to use Count + **/ + @com.fasterxml.jackson.annotation.JsonProperty("noGoodIndexUsedCount") + private final Long noGoodIndexUsedCount; + + /** + * The number of occurences of the statement where the server found no good index to use Count + * @return the value + **/ + public Long getNoGoodIndexUsedCount() { + return noGoodIndexUsedCount; + } + + /** + * The total time spent on CPU (in picoseconds) for the current thread. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cpuLatencyInPs") + private final Long cpuLatencyInPs; + + /** + * The total time spent on CPU (in picoseconds) for the current thread. + * @return the value + **/ + public Long getCpuLatencyInPs() { + return cpuLatencyInPs; + } + + /** + * The maximum amount of controlled memory (in bytes) used by the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxControlledMemoryInBytes") + private final Long maxControlledMemoryInBytes; + + /** + * The maximum amount of controlled memory (in bytes) used by the statement. + * @return the value + **/ + public Long getMaxControlledMemoryInBytes() { + return maxControlledMemoryInBytes; + } + + /** + * The maximum amount of memory (in bytes) used by the statement. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxTotalMemoryInBytes") + private final Long maxTotalMemoryInBytes; + + /** + * The maximum amount of memory (in bytes) used by the statement. + * @return the value + **/ + public Long getMaxTotalMemoryInBytes() { + return maxTotalMemoryInBytes; + } + + /** + * The total number of times a query was processed on the secondary engine (HEATWAVE) for occurrences of this statement Count. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("execCountSecondary") + private final Long execCountSecondary; + + /** + * The total number of times a query was processed on the secondary engine (HEATWAVE) for occurrences of this statement Count. + * @return the value + **/ + public Long getExecCountSecondary() { + return execCountSecondary; + } + + /** + * The time at which statement was first seen. + * Example: {@code "2023-01-16 08:04:31.533577"} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFirstSeen") + private final java.util.Date timeFirstSeen; + + /** + * The time at which statement was first seen. + * Example: {@code "2023-01-16 08:04:31.533577"} + * + * @return the value + **/ + public java.util.Date getTimeFirstSeen() { + return timeFirstSeen; + } + + /** + * The time at which statement was most recently seen for all occurrences of the statement. + * Example: {@code "2023-01-30 02:17:08.067961"} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLastSeen") + private final java.util.Date timeLastSeen; + + /** + * The time at which statement was most recently seen for all occurrences of the statement. + * Example: {@code "2023-01-30 02:17:08.067961"} + * + * @return the value + **/ + public java.util.Date getTimeLastSeen() { + return timeLastSeen; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MySqlSqlStats("); + sb.append("super=").append(super.toString()); + sb.append("digest=").append(String.valueOf(this.digest)); + sb.append(", timeCollected=").append(String.valueOf(this.timeCollected)); + sb.append(", commandType=").append(String.valueOf(this.commandType)); + sb.append(", totalRows=").append(String.valueOf(this.totalRows)); + sb.append(", perfSchemaUsedPercent=").append(String.valueOf(this.perfSchemaUsedPercent)); + sb.append(", schemaName=").append(String.valueOf(this.schemaName)); + sb.append(", execCount=").append(String.valueOf(this.execCount)); + sb.append(", totalLatencyInPs=").append(String.valueOf(this.totalLatencyInPs)); + sb.append(", lockLatencyInPs=").append(String.valueOf(this.lockLatencyInPs)); + sb.append(", errCount=").append(String.valueOf(this.errCount)); + sb.append(", warnCount=").append(String.valueOf(this.warnCount)); + sb.append(", rowsAffected=").append(String.valueOf(this.rowsAffected)); + sb.append(", rowsSent=").append(String.valueOf(this.rowsSent)); + sb.append(", rowsExamined=").append(String.valueOf(this.rowsExamined)); + sb.append(", tmpDiskTables=").append(String.valueOf(this.tmpDiskTables)); + sb.append(", tmpTables=").append(String.valueOf(this.tmpTables)); + sb.append(", selectFullJoin=").append(String.valueOf(this.selectFullJoin)); + sb.append(", selectFullRangeJoin=").append(String.valueOf(this.selectFullRangeJoin)); + sb.append(", selectRange=").append(String.valueOf(this.selectRange)); + sb.append(", selectRangeCheck=").append(String.valueOf(this.selectRangeCheck)); + sb.append(", selectScan=").append(String.valueOf(this.selectScan)); + sb.append(", sortMergePasses=").append(String.valueOf(this.sortMergePasses)); + sb.append(", sortRange=").append(String.valueOf(this.sortRange)); + sb.append(", rowsSorted=").append(String.valueOf(this.rowsSorted)); + sb.append(", sortScan=").append(String.valueOf(this.sortScan)); + sb.append(", noIndexUsedCount=").append(String.valueOf(this.noIndexUsedCount)); + sb.append(", noGoodIndexUsedCount=").append(String.valueOf(this.noGoodIndexUsedCount)); + sb.append(", cpuLatencyInPs=").append(String.valueOf(this.cpuLatencyInPs)); + sb.append(", maxControlledMemoryInBytes=") + .append(String.valueOf(this.maxControlledMemoryInBytes)); + sb.append(", maxTotalMemoryInBytes=").append(String.valueOf(this.maxTotalMemoryInBytes)); + sb.append(", execCountSecondary=").append(String.valueOf(this.execCountSecondary)); + sb.append(", timeFirstSeen=").append(String.valueOf(this.timeFirstSeen)); + sb.append(", timeLastSeen=").append(String.valueOf(this.timeLastSeen)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MySqlSqlStats)) { + return false; + } + + MySqlSqlStats other = (MySqlSqlStats) o; + return java.util.Objects.equals(this.digest, other.digest) + && java.util.Objects.equals(this.timeCollected, other.timeCollected) + && java.util.Objects.equals(this.commandType, other.commandType) + && java.util.Objects.equals(this.totalRows, other.totalRows) + && java.util.Objects.equals(this.perfSchemaUsedPercent, other.perfSchemaUsedPercent) + && java.util.Objects.equals(this.schemaName, other.schemaName) + && java.util.Objects.equals(this.execCount, other.execCount) + && java.util.Objects.equals(this.totalLatencyInPs, other.totalLatencyInPs) + && java.util.Objects.equals(this.lockLatencyInPs, other.lockLatencyInPs) + && java.util.Objects.equals(this.errCount, other.errCount) + && java.util.Objects.equals(this.warnCount, other.warnCount) + && java.util.Objects.equals(this.rowsAffected, other.rowsAffected) + && java.util.Objects.equals(this.rowsSent, other.rowsSent) + && java.util.Objects.equals(this.rowsExamined, other.rowsExamined) + && java.util.Objects.equals(this.tmpDiskTables, other.tmpDiskTables) + && java.util.Objects.equals(this.tmpTables, other.tmpTables) + && java.util.Objects.equals(this.selectFullJoin, other.selectFullJoin) + && java.util.Objects.equals(this.selectFullRangeJoin, other.selectFullRangeJoin) + && java.util.Objects.equals(this.selectRange, other.selectRange) + && java.util.Objects.equals(this.selectRangeCheck, other.selectRangeCheck) + && java.util.Objects.equals(this.selectScan, other.selectScan) + && java.util.Objects.equals(this.sortMergePasses, other.sortMergePasses) + && java.util.Objects.equals(this.sortRange, other.sortRange) + && java.util.Objects.equals(this.rowsSorted, other.rowsSorted) + && java.util.Objects.equals(this.sortScan, other.sortScan) + && java.util.Objects.equals(this.noIndexUsedCount, other.noIndexUsedCount) + && java.util.Objects.equals(this.noGoodIndexUsedCount, other.noGoodIndexUsedCount) + && java.util.Objects.equals(this.cpuLatencyInPs, other.cpuLatencyInPs) + && java.util.Objects.equals( + this.maxControlledMemoryInBytes, other.maxControlledMemoryInBytes) + && java.util.Objects.equals(this.maxTotalMemoryInBytes, other.maxTotalMemoryInBytes) + && java.util.Objects.equals(this.execCountSecondary, other.execCountSecondary) + && java.util.Objects.equals(this.timeFirstSeen, other.timeFirstSeen) + && java.util.Objects.equals(this.timeLastSeen, other.timeLastSeen) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.digest == null ? 43 : this.digest.hashCode()); + result = + (result * PRIME) + + (this.timeCollected == null ? 43 : this.timeCollected.hashCode()); + result = (result * PRIME) + (this.commandType == null ? 43 : this.commandType.hashCode()); + result = (result * PRIME) + (this.totalRows == null ? 43 : this.totalRows.hashCode()); + result = + (result * PRIME) + + (this.perfSchemaUsedPercent == null + ? 43 + : this.perfSchemaUsedPercent.hashCode()); + result = (result * PRIME) + (this.schemaName == null ? 43 : this.schemaName.hashCode()); + result = (result * PRIME) + (this.execCount == null ? 43 : this.execCount.hashCode()); + result = + (result * PRIME) + + (this.totalLatencyInPs == null ? 43 : this.totalLatencyInPs.hashCode()); + result = + (result * PRIME) + + (this.lockLatencyInPs == null ? 43 : this.lockLatencyInPs.hashCode()); + result = (result * PRIME) + (this.errCount == null ? 43 : this.errCount.hashCode()); + result = (result * PRIME) + (this.warnCount == null ? 43 : this.warnCount.hashCode()); + result = (result * PRIME) + (this.rowsAffected == null ? 43 : this.rowsAffected.hashCode()); + result = (result * PRIME) + (this.rowsSent == null ? 43 : this.rowsSent.hashCode()); + result = (result * PRIME) + (this.rowsExamined == null ? 43 : this.rowsExamined.hashCode()); + result = + (result * PRIME) + + (this.tmpDiskTables == null ? 43 : this.tmpDiskTables.hashCode()); + result = (result * PRIME) + (this.tmpTables == null ? 43 : this.tmpTables.hashCode()); + result = + (result * PRIME) + + (this.selectFullJoin == null ? 43 : this.selectFullJoin.hashCode()); + result = + (result * PRIME) + + (this.selectFullRangeJoin == null + ? 43 + : this.selectFullRangeJoin.hashCode()); + result = (result * PRIME) + (this.selectRange == null ? 43 : this.selectRange.hashCode()); + result = + (result * PRIME) + + (this.selectRangeCheck == null ? 43 : this.selectRangeCheck.hashCode()); + result = (result * PRIME) + (this.selectScan == null ? 43 : this.selectScan.hashCode()); + result = + (result * PRIME) + + (this.sortMergePasses == null ? 43 : this.sortMergePasses.hashCode()); + result = (result * PRIME) + (this.sortRange == null ? 43 : this.sortRange.hashCode()); + result = (result * PRIME) + (this.rowsSorted == null ? 43 : this.rowsSorted.hashCode()); + result = (result * PRIME) + (this.sortScan == null ? 43 : this.sortScan.hashCode()); + result = + (result * PRIME) + + (this.noIndexUsedCount == null ? 43 : this.noIndexUsedCount.hashCode()); + result = + (result * PRIME) + + (this.noGoodIndexUsedCount == null + ? 43 + : this.noGoodIndexUsedCount.hashCode()); + result = + (result * PRIME) + + (this.cpuLatencyInPs == null ? 43 : this.cpuLatencyInPs.hashCode()); + result = + (result * PRIME) + + (this.maxControlledMemoryInBytes == null + ? 43 + : this.maxControlledMemoryInBytes.hashCode()); + result = + (result * PRIME) + + (this.maxTotalMemoryInBytes == null + ? 43 + : this.maxTotalMemoryInBytes.hashCode()); + result = + (result * PRIME) + + (this.execCountSecondary == null + ? 43 + : this.execCountSecondary.hashCode()); + result = + (result * PRIME) + + (this.timeFirstSeen == null ? 43 : this.timeFirstSeen.hashCode()); + result = (result * PRIME) + (this.timeLastSeen == null ? 43 : this.timeLastSeen.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/NewsReport.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/NewsReport.java index be81b3de8ec..08087d34b83 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/NewsReport.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/NewsReport.java @@ -266,13 +266,13 @@ public Builder systemTags(java.util.Map> s return this; } /** - * Indicates the status of a news report in Operations Insights. + * Indicates the status of a news report in Ops Insights. **/ @com.fasterxml.jackson.annotation.JsonProperty("status") private ResourceStatus status; /** - * Indicates the status of a news report in Operations Insights. + * Indicates the status of a news report in Ops Insights. * @param status the value to set * @return this builder **/ @@ -641,13 +641,13 @@ public java.util.Map> getSystemTags() { } /** - * Indicates the status of a news report in Operations Insights. + * Indicates the status of a news report in Ops Insights. **/ @com.fasterxml.jackson.annotation.JsonProperty("status") private final ResourceStatus status; /** - * Indicates the status of a news report in Operations Insights. + * Indicates the status of a news report in Ops Insights. * @return the value **/ public ResourceStatus getStatus() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/NewsReportSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/NewsReportSummary.java index 2552460f66b..2a728f4c4e8 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/NewsReportSummary.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/NewsReportSummary.java @@ -268,13 +268,13 @@ public Builder systemTags(java.util.Map> s return this; } /** - * Indicates the status of a news report in Operations Insights. + * Indicates the status of a news report in Ops Insights. **/ @com.fasterxml.jackson.annotation.JsonProperty("status") private ResourceStatus status; /** - * Indicates the status of a news report in Operations Insights. + * Indicates the status of a news report in Ops Insights. * @param status the value to set * @return this builder **/ @@ -643,13 +643,13 @@ public java.util.Map> getSystemTags() { } /** - * Indicates the status of a news report in Operations Insights. + * Indicates the status of a news report in Ops Insights. **/ @com.fasterxml.jackson.annotation.JsonProperty("status") private final ResourceStatus status; /** - * Indicates the status of a news report in Operations Insights. + * Indicates the status of a news report in Ops Insights. * @return the value **/ public ResourceStatus getStatus() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationType.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationType.java index 12759634bac..72a8f08e8da 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationType.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationType.java @@ -70,6 +70,10 @@ public enum OperationType { MoveAwrhubSource("MOVE_AWRHUB_SOURCE"), EnableAwrhubSource("ENABLE_AWRHUB_SOURCE"), DisableAwrhubSource("DISABLE_AWRHUB_SOURCE"), + ChangeMacsManagedCloudDatabaseInsightConnectionDetails( + "CHANGE_MACS_MANAGED_CLOUD_DATABASE_INSIGHT_CONNECTION_DETAILS"), + TestMacsManagedCloudDatabaseInsightConnectionDetails( + "TEST_MACS_MANAGED_CLOUD_DATABASE_INSIGHT_CONNECTION_DETAILS"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsPrivateEndpoint.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsPrivateEndpoint.java index be86565a887..674e0722688 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsPrivateEndpoint.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsPrivateEndpoint.java @@ -258,13 +258,13 @@ public Builder privateEndpointStatusDetails(String privateEndpointStatusDetails) return this; } /** - * The flag is to identify if private endpoint is used for rac database or not + * The flag is to identify if private endpoint is used for rac database or not. This flag is deprecated and no longer is used. **/ @com.fasterxml.jackson.annotation.JsonProperty("isUsedForRacDbs") private Boolean isUsedForRacDbs; /** - * The flag is to identify if private endpoint is used for rac database or not + * The flag is to identify if private endpoint is used for rac database or not. This flag is deprecated and no longer is used. * @param isUsedForRacDbs the value to set * @return this builder **/ @@ -603,13 +603,13 @@ public String getPrivateEndpointStatusDetails() { } /** - * The flag is to identify if private endpoint is used for rac database or not + * The flag is to identify if private endpoint is used for rac database or not. This flag is deprecated and no longer is used. **/ @com.fasterxml.jackson.annotation.JsonProperty("isUsedForRacDbs") private final Boolean isUsedForRacDbs; /** - * The flag is to identify if private endpoint is used for rac database or not + * The flag is to identify if private endpoint is used for rac database or not. This flag is deprecated and no longer is used. * @return the value **/ public Boolean getIsUsedForRacDbs() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsPrivateEndpointSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsPrivateEndpointSummary.java index 20fa3e5dff8..a7beaf133a4 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsPrivateEndpointSummary.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsPrivateEndpointSummary.java @@ -153,13 +153,13 @@ public Builder subnetId(String subnetId) { return this; } /** - * The flag to identify if private endpoint is used for rac database or not + * The flag to identify if private endpoint is used for rac database or not. This flag is deprecated and no longer is used. **/ @com.fasterxml.jackson.annotation.JsonProperty("isUsedForRacDbs") private Boolean isUsedForRacDbs; /** - * The flag to identify if private endpoint is used for rac database or not + * The flag to identify if private endpoint is used for rac database or not. This flag is deprecated and no longer is used. * @param isUsedForRacDbs the value to set * @return this builder **/ @@ -467,13 +467,13 @@ public String getSubnetId() { } /** - * The flag to identify if private endpoint is used for rac database or not + * The flag to identify if private endpoint is used for rac database or not. This flag is deprecated and no longer is used. **/ @com.fasterxml.jackson.annotation.JsonProperty("isUsedForRacDbs") private final Boolean isUsedForRacDbs; /** - * The flag to identify if private endpoint is used for rac database or not + * The flag to identify if private endpoint is used for rac database or not. This flag is deprecated and no longer is used. * @return the value **/ public Boolean getIsUsedForRacDbs() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsWarehouse.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsWarehouse.java index 6a10eed8bf0..4f4fb931c39 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsWarehouse.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsWarehouse.java @@ -114,13 +114,13 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * User-friedly name of Operations Insights Warehouse that does not have to be unique. + * User-friedly name of Ops Insights Warehouse that does not have to be unique. **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") private String displayName; /** - * User-friedly name of Operations Insights Warehouse that does not have to be unique. + * User-friedly name of Ops Insights Warehouse that does not have to be unique. * @param displayName the value to set * @return this builder **/ @@ -218,13 +218,13 @@ public Builder dynamicGroupId(String dynamicGroupId) { return this; } /** - * Tenancy Identifier of Operations Insights service + * Tenancy Identifier of Ops Insights service **/ @com.fasterxml.jackson.annotation.JsonProperty("operationsInsightsTenancyId") private String operationsInsightsTenancyId; /** - * Tenancy Identifier of Operations Insights service + * Tenancy Identifier of Ops Insights service * @param operationsInsightsTenancyId the value to set * @return this builder **/ @@ -234,13 +234,13 @@ public Builder operationsInsightsTenancyId(String operationsInsightsTenancyId) { return this; } /** - * The time at which the ADW wallet was last rotated for the Operations Insights Warehouse. An RFC3339 formatted datetime string + * The time at which the ADW wallet was last rotated for the Ops Insights Warehouse. An RFC3339 formatted datetime string **/ @com.fasterxml.jackson.annotation.JsonProperty("timeLastWalletRotated") private java.util.Date timeLastWalletRotated; /** - * The time at which the ADW wallet was last rotated for the Operations Insights Warehouse. An RFC3339 formatted datetime string + * The time at which the ADW wallet was last rotated for the Ops Insights Warehouse. An RFC3339 formatted datetime string * @param timeLastWalletRotated the value to set * @return this builder **/ @@ -501,13 +501,13 @@ public String getCompartmentId() { } /** - * User-friedly name of Operations Insights Warehouse that does not have to be unique. + * User-friedly name of Ops Insights Warehouse that does not have to be unique. **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") private final String displayName; /** - * User-friedly name of Operations Insights Warehouse that does not have to be unique. + * User-friedly name of Ops Insights Warehouse that does not have to be unique. * @return the value **/ public String getDisplayName() { @@ -593,13 +593,13 @@ public String getDynamicGroupId() { } /** - * Tenancy Identifier of Operations Insights service + * Tenancy Identifier of Ops Insights service **/ @com.fasterxml.jackson.annotation.JsonProperty("operationsInsightsTenancyId") private final String operationsInsightsTenancyId; /** - * Tenancy Identifier of Operations Insights service + * Tenancy Identifier of Ops Insights service * @return the value **/ public String getOperationsInsightsTenancyId() { @@ -607,13 +607,13 @@ public String getOperationsInsightsTenancyId() { } /** - * The time at which the ADW wallet was last rotated for the Operations Insights Warehouse. An RFC3339 formatted datetime string + * The time at which the ADW wallet was last rotated for the Ops Insights Warehouse. An RFC3339 formatted datetime string **/ @com.fasterxml.jackson.annotation.JsonProperty("timeLastWalletRotated") private final java.util.Date timeLastWalletRotated; /** - * The time at which the ADW wallet was last rotated for the Operations Insights Warehouse. An RFC3339 formatted datetime string + * The time at which the ADW wallet was last rotated for the Ops Insights Warehouse. An RFC3339 formatted datetime string * @return the value **/ public java.util.Date getTimeLastWalletRotated() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsWarehouseSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsWarehouseSummary.java index dfb721b8655..ef411f3de4f 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsWarehouseSummary.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsWarehouseSummary.java @@ -114,13 +114,13 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * User-friedly name of Operations Insights Warehouse that does not have to be unique. + * User-friedly name of Ops Insights Warehouse that does not have to be unique. **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") private String displayName; /** - * User-friedly name of Operations Insights Warehouse that does not have to be unique. + * User-friedly name of Ops Insights Warehouse that does not have to be unique. * @param displayName the value to set * @return this builder **/ @@ -218,13 +218,13 @@ public Builder dynamicGroupId(String dynamicGroupId) { return this; } /** - * Tenancy Identifier of Operations Insights service + * Tenancy Identifier of Ops Insights service **/ @com.fasterxml.jackson.annotation.JsonProperty("operationsInsightsTenancyId") private String operationsInsightsTenancyId; /** - * Tenancy Identifier of Operations Insights service + * Tenancy Identifier of Ops Insights service * @param operationsInsightsTenancyId the value to set * @return this builder **/ @@ -234,13 +234,13 @@ public Builder operationsInsightsTenancyId(String operationsInsightsTenancyId) { return this; } /** - * The time at which the ADW wallet was last rotated for the Operations Insights Warehouse. An RFC3339 formatted datetime string + * The time at which the ADW wallet was last rotated for the Ops Insights Warehouse. An RFC3339 formatted datetime string **/ @com.fasterxml.jackson.annotation.JsonProperty("timeLastWalletRotated") private java.util.Date timeLastWalletRotated; /** - * The time at which the ADW wallet was last rotated for the Operations Insights Warehouse. An RFC3339 formatted datetime string + * The time at which the ADW wallet was last rotated for the Ops Insights Warehouse. An RFC3339 formatted datetime string * @param timeLastWalletRotated the value to set * @return this builder **/ @@ -501,13 +501,13 @@ public String getCompartmentId() { } /** - * User-friedly name of Operations Insights Warehouse that does not have to be unique. + * User-friedly name of Ops Insights Warehouse that does not have to be unique. **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") private final String displayName; /** - * User-friedly name of Operations Insights Warehouse that does not have to be unique. + * User-friedly name of Ops Insights Warehouse that does not have to be unique. * @return the value **/ public String getDisplayName() { @@ -593,13 +593,13 @@ public String getDynamicGroupId() { } /** - * Tenancy Identifier of Operations Insights service + * Tenancy Identifier of Ops Insights service **/ @com.fasterxml.jackson.annotation.JsonProperty("operationsInsightsTenancyId") private final String operationsInsightsTenancyId; /** - * Tenancy Identifier of Operations Insights service + * Tenancy Identifier of Ops Insights service * @return the value **/ public String getOperationsInsightsTenancyId() { @@ -607,13 +607,13 @@ public String getOperationsInsightsTenancyId() { } /** - * The time at which the ADW wallet was last rotated for the Operations Insights Warehouse. An RFC3339 formatted datetime string + * The time at which the ADW wallet was last rotated for the Ops Insights Warehouse. An RFC3339 formatted datetime string **/ @com.fasterxml.jackson.annotation.JsonProperty("timeLastWalletRotated") private final java.util.Date timeLastWalletRotated; /** - * The time at which the ADW wallet was last rotated for the Operations Insights Warehouse. An RFC3339 formatted datetime string + * The time at which the ADW wallet was last rotated for the Ops Insights Warehouse. An RFC3339 formatted datetime string * @return the value **/ public java.util.Date getTimeLastWalletRotated() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsWarehouseUser.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsWarehouseUser.java index a50ef043b67..de146aea636 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsWarehouseUser.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsWarehouseUser.java @@ -124,13 +124,13 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * Username for schema which would have access to AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * Username for schema which would have access to AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. **/ @com.fasterxml.jackson.annotation.JsonProperty("name") private String name; /** - * Username for schema which would have access to AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * Username for schema which would have access to AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * @param name the value to set * @return this builder **/ @@ -140,13 +140,13 @@ public Builder name(String name) { return this; } /** - * User provided connection password for the AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * User provided connection password for the AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. **/ @com.fasterxml.jackson.annotation.JsonProperty("connectionPassword") private String connectionPassword; /** - * User provided connection password for the AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * User provided connection password for the AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * @param connectionPassword the value to set * @return this builder **/ @@ -462,13 +462,13 @@ public String getCompartmentId() { } /** - * Username for schema which would have access to AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * Username for schema which would have access to AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. **/ @com.fasterxml.jackson.annotation.JsonProperty("name") private final String name; /** - * Username for schema which would have access to AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * Username for schema which would have access to AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * @return the value **/ public String getName() { @@ -476,13 +476,13 @@ public String getName() { } /** - * User provided connection password for the AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * User provided connection password for the AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. **/ @com.fasterxml.jackson.annotation.JsonProperty("connectionPassword") private final String connectionPassword; /** - * User provided connection password for the AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * User provided connection password for the AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * @return the value **/ public String getConnectionPassword() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsWarehouseUserSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsWarehouseUserSummary.java index 8cc3ff2c131..9b4de3e91ba 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsWarehouseUserSummary.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsWarehouseUserSummary.java @@ -124,13 +124,13 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * Username for schema which would have access to AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * Username for schema which would have access to AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. **/ @com.fasterxml.jackson.annotation.JsonProperty("name") private String name; /** - * Username for schema which would have access to AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * Username for schema which would have access to AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * @param name the value to set * @return this builder **/ @@ -140,13 +140,13 @@ public Builder name(String name) { return this; } /** - * User provided connection password for the AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * User provided connection password for the AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. **/ @com.fasterxml.jackson.annotation.JsonProperty("connectionPassword") private String connectionPassword; /** - * User provided connection password for the AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * User provided connection password for the AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * @param connectionPassword the value to set * @return this builder **/ @@ -462,13 +462,13 @@ public String getCompartmentId() { } /** - * Username for schema which would have access to AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * Username for schema which would have access to AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. **/ @com.fasterxml.jackson.annotation.JsonProperty("name") private final String name; /** - * Username for schema which would have access to AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * Username for schema which would have access to AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * @return the value **/ public String getName() { @@ -476,13 +476,13 @@ public String getName() { } /** - * User provided connection password for the AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * User provided connection password for the AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. **/ @com.fasterxml.jackson.annotation.JsonProperty("connectionPassword") private final String connectionPassword; /** - * User provided connection password for the AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * User provided connection password for the AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * @return the value **/ public String getConnectionPassword() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsWarehouses.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsWarehouses.java index 64d20db1a85..ec9042e8a1c 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsWarehouses.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OperationsInsightsWarehouses.java @@ -5,7 +5,7 @@ package com.oracle.bmc.opsi.model; /** - * Logical grouping used for Operations Insights Warehouse operations. + * Logical grouping used for Ops Insights Warehouse operations. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -31,13 +31,13 @@ public OperationsInsightsWarehouses(Object operationsInsightsWarehouses) { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * Operations Insights Warehouse Object. + * Ops Insights Warehouse Object. **/ @com.fasterxml.jackson.annotation.JsonProperty("operationsInsightsWarehouses") private Object operationsInsightsWarehouses; /** - * Operations Insights Warehouse Object. + * Ops Insights Warehouse Object. * @param operationsInsightsWarehouses the value to set * @return this builder **/ @@ -80,13 +80,13 @@ public Builder toBuilder() { } /** - * Operations Insights Warehouse Object. + * Ops Insights Warehouse Object. **/ @com.fasterxml.jackson.annotation.JsonProperty("operationsInsightsWarehouses") private final Object operationsInsightsWarehouses; /** - * Operations Insights Warehouse Object. + * Ops Insights Warehouse Object. * @return the value **/ public Object getOperationsInsightsWarehouses() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OpsiConfigurationBasicConfigurationItemSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OpsiConfigurationBasicConfigurationItemSummary.java index 4855ee19564..9d0f13c6543 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OpsiConfigurationBasicConfigurationItemSummary.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/OpsiConfigurationBasicConfigurationItemSummary.java @@ -5,7 +5,7 @@ package com.oracle.bmc.opsi.model; /** - * Basic configuration item summary. Value and defaultValue fields will contain the custom value stored in the resource and default value from Operations Insights respectively. + * Basic configuration item summary. Value and defaultValue fields will contain the custom value stored in the resource and default value from Ops Insights respectively. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ResourceFilters.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ResourceFilters.java index f6d6dc48b7e..b1e8b6e6ce8 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ResourceFilters.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ResourceFilters.java @@ -28,20 +28,23 @@ public final class ResourceFilters extends com.oracle.bmc.http.internal.Explicit "freeformTagEquals", "definedTagExists", "freeformTagExists", - "compartmentIdInSubtree" + "compartmentIdInSubtree", + "resourceStatus" }) public ResourceFilters( java.util.List definedTagEquals, java.util.List freeformTagEquals, java.util.List definedTagExists, java.util.List freeformTagExists, - Boolean compartmentIdInSubtree) { + Boolean compartmentIdInSubtree, + java.util.List resourceStatus) { super(); this.definedTagEquals = definedTagEquals; this.freeformTagEquals = freeformTagEquals; this.definedTagExists = definedTagExists; this.freeformTagExists = freeformTagExists; this.compartmentIdInSubtree = compartmentIdInSubtree; + this.resourceStatus = resourceStatus; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -160,6 +163,24 @@ public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { this.__explicitlySet__.add("compartmentIdInSubtree"); return this; } + /** + * Filter resources by status, multiple options could be chosen to show authorized resources even if those are disabled or deleted. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceStatus") + private java.util.List resourceStatus; + + /** + * Filter resources by status, multiple options could be chosen to show authorized resources even if those are disabled or deleted. + * + * @param resourceStatus the value to set + * @return this builder + **/ + public Builder resourceStatus(java.util.List resourceStatus) { + this.resourceStatus = resourceStatus; + this.__explicitlySet__.add("resourceStatus"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -171,7 +192,8 @@ public ResourceFilters build() { this.freeformTagEquals, this.definedTagExists, this.freeformTagExists, - this.compartmentIdInSubtree); + this.compartmentIdInSubtree, + this.resourceStatus); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -195,6 +217,9 @@ public Builder copy(ResourceFilters model) { if (model.wasPropertyExplicitlySet("compartmentIdInSubtree")) { this.compartmentIdInSubtree(model.getCompartmentIdInSubtree()); } + if (model.wasPropertyExplicitlySet("resourceStatus")) { + this.resourceStatus(model.getResourceStatus()); + } return this; } } @@ -314,6 +339,22 @@ public Boolean getCompartmentIdInSubtree() { return compartmentIdInSubtree; } + /** + * Filter resources by status, multiple options could be chosen to show authorized resources even if those are disabled or deleted. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceStatus") + private final java.util.List resourceStatus; + + /** + * Filter resources by status, multiple options could be chosen to show authorized resources even if those are disabled or deleted. + * + * @return the value + **/ + public java.util.List getResourceStatus() { + return resourceStatus; + } + @Override public String toString() { return this.toString(true); @@ -333,6 +374,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", definedTagExists=").append(String.valueOf(this.definedTagExists)); sb.append(", freeformTagExists=").append(String.valueOf(this.freeformTagExists)); sb.append(", compartmentIdInSubtree=").append(String.valueOf(this.compartmentIdInSubtree)); + sb.append(", resourceStatus=").append(String.valueOf(this.resourceStatus)); sb.append(")"); return sb.toString(); } @@ -353,6 +395,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.freeformTagExists, other.freeformTagExists) && java.util.Objects.equals( this.compartmentIdInSubtree, other.compartmentIdInSubtree) + && java.util.Objects.equals(this.resourceStatus, other.resourceStatus) && super.equals(other); } @@ -377,6 +420,9 @@ public int hashCode() { + (this.compartmentIdInSubtree == null ? 43 : this.compartmentIdInSubtree.hashCode()); + result = + (result * PRIME) + + (this.resourceStatus == null ? 43 : this.resourceStatus.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ResourceStatistics.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ResourceStatistics.java index 405ad70256a..1d09103151b 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ResourceStatistics.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/ResourceStatistics.java @@ -29,7 +29,9 @@ public final class ResourceStatistics extends com.oracle.bmc.http.internal.Expli "utilizationPercent", "usageChangePercent", "instanceMetrics", - "totalHostCapacity" + "totalHostCapacity", + "isHeatWaveClusterAttached", + "isHighlyAvailable" }) public ResourceStatistics( Double usage, @@ -39,7 +41,9 @@ public ResourceStatistics( Double utilizationPercent, Double usageChangePercent, java.util.List instanceMetrics, - Double totalHostCapacity) { + Double totalHostCapacity, + Boolean isHeatWaveClusterAttached, + Boolean isHighlyAvailable) { super(); this.usage = usage; this.capacity = capacity; @@ -49,6 +53,8 @@ public ResourceStatistics( this.usageChangePercent = usageChangePercent; this.instanceMetrics = instanceMetrics; this.totalHostCapacity = totalHostCapacity; + this.isHeatWaveClusterAttached = isHeatWaveClusterAttached; + this.isHighlyAvailable = isHighlyAvailable; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -189,6 +195,38 @@ public Builder totalHostCapacity(Double totalHostCapacity) { this.__explicitlySet__.add("totalHostCapacity"); return this; } + /** + * Specifies if MYSQL DB System has heatwave cluster attached. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHeatWaveClusterAttached") + private Boolean isHeatWaveClusterAttached; + + /** + * Specifies if MYSQL DB System has heatwave cluster attached. + * @param isHeatWaveClusterAttached the value to set + * @return this builder + **/ + public Builder isHeatWaveClusterAttached(Boolean isHeatWaveClusterAttached) { + this.isHeatWaveClusterAttached = isHeatWaveClusterAttached; + this.__explicitlySet__.add("isHeatWaveClusterAttached"); + return this; + } + /** + * Specifies if MYSQL DB System is highly available. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHighlyAvailable") + private Boolean isHighlyAvailable; + + /** + * Specifies if MYSQL DB System is highly available. + * @param isHighlyAvailable the value to set + * @return this builder + **/ + public Builder isHighlyAvailable(Boolean isHighlyAvailable) { + this.isHighlyAvailable = isHighlyAvailable; + this.__explicitlySet__.add("isHighlyAvailable"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -203,7 +241,9 @@ public ResourceStatistics build() { this.utilizationPercent, this.usageChangePercent, this.instanceMetrics, - this.totalHostCapacity); + this.totalHostCapacity, + this.isHeatWaveClusterAttached, + this.isHighlyAvailable); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -236,6 +276,12 @@ public Builder copy(ResourceStatistics model) { if (model.wasPropertyExplicitlySet("totalHostCapacity")) { this.totalHostCapacity(model.getTotalHostCapacity()); } + if (model.wasPropertyExplicitlySet("isHeatWaveClusterAttached")) { + this.isHeatWaveClusterAttached(model.getIsHeatWaveClusterAttached()); + } + if (model.wasPropertyExplicitlySet("isHighlyAvailable")) { + this.isHighlyAvailable(model.getIsHighlyAvailable()); + } return this; } } @@ -371,6 +417,34 @@ public Double getTotalHostCapacity() { return totalHostCapacity; } + /** + * Specifies if MYSQL DB System has heatwave cluster attached. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHeatWaveClusterAttached") + private final Boolean isHeatWaveClusterAttached; + + /** + * Specifies if MYSQL DB System has heatwave cluster attached. + * @return the value + **/ + public Boolean getIsHeatWaveClusterAttached() { + return isHeatWaveClusterAttached; + } + + /** + * Specifies if MYSQL DB System is highly available. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isHighlyAvailable") + private final Boolean isHighlyAvailable; + + /** + * Specifies if MYSQL DB System is highly available. + * @return the value + **/ + public Boolean getIsHighlyAvailable() { + return isHighlyAvailable; + } + @Override public String toString() { return this.toString(true); @@ -393,6 +467,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", usageChangePercent=").append(String.valueOf(this.usageChangePercent)); sb.append(", instanceMetrics=").append(String.valueOf(this.instanceMetrics)); sb.append(", totalHostCapacity=").append(String.valueOf(this.totalHostCapacity)); + sb.append(", isHeatWaveClusterAttached=") + .append(String.valueOf(this.isHeatWaveClusterAttached)); + sb.append(", isHighlyAvailable=").append(String.valueOf(this.isHighlyAvailable)); sb.append(")"); return sb.toString(); } @@ -415,6 +492,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.usageChangePercent, other.usageChangePercent) && java.util.Objects.equals(this.instanceMetrics, other.instanceMetrics) && java.util.Objects.equals(this.totalHostCapacity, other.totalHostCapacity) + && java.util.Objects.equals( + this.isHeatWaveClusterAttached, other.isHeatWaveClusterAttached) + && java.util.Objects.equals(this.isHighlyAvailable, other.isHighlyAvailable) && super.equals(other); } @@ -446,6 +526,14 @@ public int hashCode() { result = (result * PRIME) + (this.totalHostCapacity == null ? 43 : this.totalHostCapacity.hashCode()); + result = + (result * PRIME) + + (this.isHeatWaveClusterAttached == null + ? 43 + : this.isHeatWaveClusterAttached.hashCode()); + result = + (result * PRIME) + + (this.isHighlyAvailable == null ? 43 : this.isHighlyAvailable.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SqlBucket.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SqlBucket.java index a40d1f08429..a6f3d1f3471 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SqlBucket.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SqlBucket.java @@ -81,13 +81,13 @@ public Builder version(Float version) { return this; } /** - * Operations Insights internal representation of the database type. + * Ops Insights internal representation of the database type. **/ @com.fasterxml.jackson.annotation.JsonProperty("databaseType") private String databaseType; /** - * Operations Insights internal representation of the database type. + * Ops Insights internal representation of the database type. * @param databaseType the value to set * @return this builder **/ @@ -363,13 +363,13 @@ public Float getVersion() { } /** - * Operations Insights internal representation of the database type. + * Ops Insights internal representation of the database type. **/ @com.fasterxml.jackson.annotation.JsonProperty("databaseType") private final String databaseType; /** - * Operations Insights internal representation of the database type. + * Ops Insights internal representation of the database type. * @return the value **/ public String getDatabaseType() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SqlSearchSummary.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SqlSearchSummary.java index 4fafd544fce..0fec6ab9882 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SqlSearchSummary.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SqlSearchSummary.java @@ -129,13 +129,13 @@ public Builder databaseDisplayName(String databaseDisplayName) { return this; } /** - * Operations Insights internal representation of the database type. + * Ops Insights internal representation of the database type. **/ @com.fasterxml.jackson.annotation.JsonProperty("databaseType") private String databaseType; /** - * Operations Insights internal representation of the database type. + * Ops Insights internal representation of the database type. * @param databaseType the value to set * @return this builder **/ @@ -289,13 +289,13 @@ public String getDatabaseDisplayName() { } /** - * Operations Insights internal representation of the database type. + * Ops Insights internal representation of the database type. **/ @com.fasterxml.jackson.annotation.JsonProperty("databaseType") private final String databaseType; /** - * Operations Insights internal representation of the database type. + * Ops Insights internal representation of the database type. * @return the value **/ public String getDatabaseType() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightHostRecommendationAggregation.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightHostRecommendationAggregation.java index b256f4d0764..fa34419ae25 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightHostRecommendationAggregation.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightHostRecommendationAggregation.java @@ -206,6 +206,9 @@ public enum ResourceMetric { LogicalMemory("LOGICAL_MEMORY"), Storage("STORAGE"), Network("NETWORK"), + GpuUtilization("GPU_UTILIZATION"), + GpuMemoryUsage("GPU_MEMORY_USAGE"), + Io("IO"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightIoUsageTrendAggregationCollection.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightIoUsageTrendAggregationCollection.java new file mode 100644 index 00000000000..1b0a77ad652 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightIoUsageTrendAggregationCollection.java @@ -0,0 +1,272 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Top level response object. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SummarizeHostInsightIoUsageTrendAggregationCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SummarizeHostInsightIoUsageTrendAggregationCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "timeIntervalStart", + "timeIntervalEnd", + "itemDurationInMs", + "items" + }) + public SummarizeHostInsightIoUsageTrendAggregationCollection( + java.util.Date timeIntervalStart, + java.util.Date timeIntervalEnd, + Long itemDurationInMs, + java.util.List items) { + super(); + this.timeIntervalStart = timeIntervalStart; + this.timeIntervalEnd = timeIntervalEnd; + this.itemDurationInMs = itemDurationInMs; + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The start timestamp that was passed into the request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeIntervalStart") + private java.util.Date timeIntervalStart; + + /** + * The start timestamp that was passed into the request. + * @param timeIntervalStart the value to set + * @return this builder + **/ + public Builder timeIntervalStart(java.util.Date timeIntervalStart) { + this.timeIntervalStart = timeIntervalStart; + this.__explicitlySet__.add("timeIntervalStart"); + return this; + } + /** + * The end timestamp that was passed into the request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeIntervalEnd") + private java.util.Date timeIntervalEnd; + + /** + * The end timestamp that was passed into the request. + * @param timeIntervalEnd the value to set + * @return this builder + **/ + public Builder timeIntervalEnd(java.util.Date timeIntervalEnd) { + this.timeIntervalEnd = timeIntervalEnd; + this.__explicitlySet__.add("timeIntervalEnd"); + return this; + } + /** + * Time duration in milliseconds between data points (one hour or one day). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("itemDurationInMs") + private Long itemDurationInMs; + + /** + * Time duration in milliseconds between data points (one hour or one day). + * + * @param itemDurationInMs the value to set + * @return this builder + **/ + public Builder itemDurationInMs(Long itemDurationInMs) { + this.itemDurationInMs = itemDurationInMs; + this.__explicitlySet__.add("itemDurationInMs"); + return this; + } + /** + * Collection of Usage Data with time stamps for all IO interfaces. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * Collection of Usage Data with time stamps for all IO interfaces. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SummarizeHostInsightIoUsageTrendAggregationCollection build() { + SummarizeHostInsightIoUsageTrendAggregationCollection model = + new SummarizeHostInsightIoUsageTrendAggregationCollection( + this.timeIntervalStart, + this.timeIntervalEnd, + this.itemDurationInMs, + this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SummarizeHostInsightIoUsageTrendAggregationCollection model) { + if (model.wasPropertyExplicitlySet("timeIntervalStart")) { + this.timeIntervalStart(model.getTimeIntervalStart()); + } + if (model.wasPropertyExplicitlySet("timeIntervalEnd")) { + this.timeIntervalEnd(model.getTimeIntervalEnd()); + } + if (model.wasPropertyExplicitlySet("itemDurationInMs")) { + this.itemDurationInMs(model.getItemDurationInMs()); + } + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The start timestamp that was passed into the request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeIntervalStart") + private final java.util.Date timeIntervalStart; + + /** + * The start timestamp that was passed into the request. + * @return the value + **/ + public java.util.Date getTimeIntervalStart() { + return timeIntervalStart; + } + + /** + * The end timestamp that was passed into the request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeIntervalEnd") + private final java.util.Date timeIntervalEnd; + + /** + * The end timestamp that was passed into the request. + * @return the value + **/ + public java.util.Date getTimeIntervalEnd() { + return timeIntervalEnd; + } + + /** + * Time duration in milliseconds between data points (one hour or one day). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("itemDurationInMs") + private final Long itemDurationInMs; + + /** + * Time duration in milliseconds between data points (one hour or one day). + * + * @return the value + **/ + public Long getItemDurationInMs() { + return itemDurationInMs; + } + + /** + * Collection of Usage Data with time stamps for all IO interfaces. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * Collection of Usage Data with time stamps for all IO interfaces. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SummarizeHostInsightIoUsageTrendAggregationCollection("); + sb.append("super=").append(super.toString()); + sb.append("timeIntervalStart=").append(String.valueOf(this.timeIntervalStart)); + sb.append(", timeIntervalEnd=").append(String.valueOf(this.timeIntervalEnd)); + sb.append(", itemDurationInMs=").append(String.valueOf(this.itemDurationInMs)); + sb.append(", items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SummarizeHostInsightIoUsageTrendAggregationCollection)) { + return false; + } + + SummarizeHostInsightIoUsageTrendAggregationCollection other = + (SummarizeHostInsightIoUsageTrendAggregationCollection) o; + return java.util.Objects.equals(this.timeIntervalStart, other.timeIntervalStart) + && java.util.Objects.equals(this.timeIntervalEnd, other.timeIntervalEnd) + && java.util.Objects.equals(this.itemDurationInMs, other.itemDurationInMs) + && java.util.Objects.equals(this.items, other.items) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.timeIntervalStart == null ? 43 : this.timeIntervalStart.hashCode()); + result = + (result * PRIME) + + (this.timeIntervalEnd == null ? 43 : this.timeIntervalEnd.hashCode()); + result = + (result * PRIME) + + (this.itemDurationInMs == null ? 43 : this.itemDurationInMs.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceCapacityTrendAggregationCollection.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceCapacityTrendAggregationCollection.java index eb1e804bf05..6cf15eef271 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceCapacityTrendAggregationCollection.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceCapacityTrendAggregationCollection.java @@ -318,6 +318,9 @@ public enum ResourceMetric { LogicalMemory("LOGICAL_MEMORY"), Storage("STORAGE"), Network("NETWORK"), + GpuUtilization("GPU_UTILIZATION"), + GpuMemoryUsage("GPU_MEMORY_USAGE"), + Io("IO"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceForecastTrendAggregation.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceForecastTrendAggregation.java index 038353a1907..2b955a857d4 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceForecastTrendAggregation.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceForecastTrendAggregation.java @@ -359,6 +359,9 @@ public enum ResourceMetric { LogicalMemory("LOGICAL_MEMORY"), Storage("STORAGE"), Network("NETWORK"), + GpuUtilization("GPU_UTILIZATION"), + GpuMemoryUsage("GPU_MEMORY_USAGE"), + Io("IO"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceStatisticsAggregationCollection.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceStatisticsAggregationCollection.java index 10df692bcd8..3a1eb74f2bb 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceStatisticsAggregationCollection.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceStatisticsAggregationCollection.java @@ -290,6 +290,9 @@ public enum ResourceMetric { LogicalMemory("LOGICAL_MEMORY"), Storage("STORAGE"), Network("NETWORK"), + GpuUtilization("GPU_UTILIZATION"), + GpuMemoryUsage("GPU_MEMORY_USAGE"), + Io("IO"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceUsageAggregation.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceUsageAggregation.java index e43a22c6e42..639ef948f8d 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceUsageAggregation.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceUsageAggregation.java @@ -266,6 +266,9 @@ public enum ResourceMetric { LogicalMemory("LOGICAL_MEMORY"), Storage("STORAGE"), Network("NETWORK"), + GpuUtilization("GPU_UTILIZATION"), + GpuMemoryUsage("GPU_MEMORY_USAGE"), + Io("IO"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceUsageTrendAggregationCollection.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceUsageTrendAggregationCollection.java index 80e407b004c..c89264d25e2 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceUsageTrendAggregationCollection.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceUsageTrendAggregationCollection.java @@ -243,6 +243,9 @@ public enum ResourceMetric { LogicalMemory("LOGICAL_MEMORY"), Storage("STORAGE"), Network("NETWORK"), + GpuUtilization("GPU_UTILIZATION"), + GpuMemoryUsage("GPU_MEMORY_USAGE"), + Io("IO"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceUtilizationInsightAggregation.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceUtilizationInsightAggregation.java index 68b91402c10..3fa35fee61f 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceUtilizationInsightAggregation.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/SummarizeHostInsightResourceUtilizationInsightAggregation.java @@ -277,6 +277,9 @@ public enum ResourceMetric { LogicalMemory("LOGICAL_MEMORY"), Storage("STORAGE"), Network("NETWORK"), + GpuUtilization("GPU_UTILIZATION"), + GpuMemoryUsage("GPU_MEMORY_USAGE"), + Io("IO"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/TestMacsManagedCloudDatabaseInsightConnectionDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/TestMacsManagedCloudDatabaseInsightConnectionDetails.java new file mode 100644 index 00000000000..44c95eb4b8d --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/TestMacsManagedCloudDatabaseInsightConnectionDetails.java @@ -0,0 +1,204 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Connection details of a MACS-managed cloud database . + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = TestMacsManagedCloudDatabaseInsightConnectionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class TestMacsManagedCloudDatabaseInsightConnectionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "managementAgentId", + "connectionDetails", + "connectionCredentialDetails" + }) + public TestMacsManagedCloudDatabaseInsightConnectionDetails( + String managementAgentId, + ConnectionDetails connectionDetails, + CredentialDetails connectionCredentialDetails) { + super(); + this.managementAgentId = managementAgentId; + this.connectionDetails = connectionDetails; + this.connectionCredentialDetails = connectionCredentialDetails; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @param managementAgentId the value to set + * @return this builder + **/ + public Builder managementAgentId(String managementAgentId) { + this.managementAgentId = managementAgentId; + this.__explicitlySet__.add("managementAgentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionDetails") + private ConnectionDetails connectionDetails; + + public Builder connectionDetails(ConnectionDetails connectionDetails) { + this.connectionDetails = connectionDetails; + this.__explicitlySet__.add("connectionDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionCredentialDetails") + private CredentialDetails connectionCredentialDetails; + + public Builder connectionCredentialDetails(CredentialDetails connectionCredentialDetails) { + this.connectionCredentialDetails = connectionCredentialDetails; + this.__explicitlySet__.add("connectionCredentialDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public TestMacsManagedCloudDatabaseInsightConnectionDetails build() { + TestMacsManagedCloudDatabaseInsightConnectionDetails model = + new TestMacsManagedCloudDatabaseInsightConnectionDetails( + this.managementAgentId, + this.connectionDetails, + this.connectionCredentialDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(TestMacsManagedCloudDatabaseInsightConnectionDetails model) { + if (model.wasPropertyExplicitlySet("managementAgentId")) { + this.managementAgentId(model.getManagementAgentId()); + } + if (model.wasPropertyExplicitlySet("connectionDetails")) { + this.connectionDetails(model.getConnectionDetails()); + } + if (model.wasPropertyExplicitlySet("connectionCredentialDetails")) { + this.connectionCredentialDetails(model.getConnectionCredentialDetails()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + **/ + @com.fasterxml.jackson.annotation.JsonProperty("managementAgentId") + private final String managementAgentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + * @return the value + **/ + public String getManagementAgentId() { + return managementAgentId; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionDetails") + private final ConnectionDetails connectionDetails; + + public ConnectionDetails getConnectionDetails() { + return connectionDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("connectionCredentialDetails") + private final CredentialDetails connectionCredentialDetails; + + public CredentialDetails getConnectionCredentialDetails() { + return connectionCredentialDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("TestMacsManagedCloudDatabaseInsightConnectionDetails("); + sb.append("super=").append(super.toString()); + sb.append("managementAgentId=").append(String.valueOf(this.managementAgentId)); + sb.append(", connectionDetails=").append(String.valueOf(this.connectionDetails)); + sb.append(", connectionCredentialDetails=") + .append(String.valueOf(this.connectionCredentialDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TestMacsManagedCloudDatabaseInsightConnectionDetails)) { + return false; + } + + TestMacsManagedCloudDatabaseInsightConnectionDetails other = + (TestMacsManagedCloudDatabaseInsightConnectionDetails) o; + return java.util.Objects.equals(this.managementAgentId, other.managementAgentId) + && java.util.Objects.equals(this.connectionDetails, other.connectionDetails) + && java.util.Objects.equals( + this.connectionCredentialDetails, other.connectionCredentialDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.managementAgentId == null ? 43 : this.managementAgentId.hashCode()); + result = + (result * PRIME) + + (this.connectionDetails == null ? 43 : this.connectionDetails.hashCode()); + result = + (result * PRIME) + + (this.connectionCredentialDetails == null + ? 43 + : this.connectionCredentialDetails.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/TopProcessesUsage.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/TopProcessesUsage.java index 65cfd8390c7..92eb55cf301 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/TopProcessesUsage.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/TopProcessesUsage.java @@ -23,6 +23,7 @@ public final class TopProcessesUsage extends com.oracle.bmc.http.internal.Explic @Deprecated @java.beans.ConstructorProperties({ "command", + "containerId", "processHash", "cpuUsage", "cpuUtilization", @@ -33,6 +34,7 @@ public final class TopProcessesUsage extends com.oracle.bmc.http.internal.Explic }) public TopProcessesUsage( String command, + String containerId, String processHash, Double cpuUsage, Double cpuUtilization, @@ -42,6 +44,7 @@ public TopProcessesUsage( Integer maxProcessCount) { super(); this.command = command; + this.containerId = containerId; this.processHash = processHash; this.cpuUsage = cpuUsage; this.cpuUtilization = cpuUtilization; @@ -69,6 +72,22 @@ public Builder command(String command) { this.__explicitlySet__.add("command"); return this; } + /** + * Container id if this process corresponds to a running container in the host. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerId") + private String containerId; + + /** + * Container id if this process corresponds to a running container in the host. + * @param containerId the value to set + * @return this builder + **/ + public Builder containerId(String containerId) { + this.containerId = containerId; + this.__explicitlySet__.add("containerId"); + return this; + } /** * Unique identifier for a process. **/ @@ -189,6 +208,7 @@ public TopProcessesUsage build() { TopProcessesUsage model = new TopProcessesUsage( this.command, + this.containerId, this.processHash, this.cpuUsage, this.cpuUtilization, @@ -207,6 +227,9 @@ public Builder copy(TopProcessesUsage model) { if (model.wasPropertyExplicitlySet("command")) { this.command(model.getCommand()); } + if (model.wasPropertyExplicitlySet("containerId")) { + this.containerId(model.getContainerId()); + } if (model.wasPropertyExplicitlySet("processHash")) { this.processHash(model.getProcessHash()); } @@ -257,6 +280,20 @@ public String getCommand() { return command; } + /** + * Container id if this process corresponds to a running container in the host. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerId") + private final String containerId; + + /** + * Container id if this process corresponds to a running container in the host. + * @return the value + **/ + public String getContainerId() { + return containerId; + } + /** * Unique identifier for a process. **/ @@ -370,6 +407,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("TopProcessesUsage("); sb.append("super=").append(super.toString()); sb.append("command=").append(String.valueOf(this.command)); + sb.append(", containerId=").append(String.valueOf(this.containerId)); sb.append(", processHash=").append(String.valueOf(this.processHash)); sb.append(", cpuUsage=").append(String.valueOf(this.cpuUsage)); sb.append(", cpuUtilization=").append(String.valueOf(this.cpuUtilization)); @@ -392,6 +430,7 @@ public boolean equals(Object o) { TopProcessesUsage other = (TopProcessesUsage) o; return java.util.Objects.equals(this.command, other.command) + && java.util.Objects.equals(this.containerId, other.containerId) && java.util.Objects.equals(this.processHash, other.processHash) && java.util.Objects.equals(this.cpuUsage, other.cpuUsage) && java.util.Objects.equals(this.cpuUtilization, other.cpuUtilization) @@ -407,6 +446,7 @@ public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.command == null ? 43 : this.command.hashCode()); + result = (result * PRIME) + (this.containerId == null ? 43 : this.containerId.hashCode()); result = (result * PRIME) + (this.processHash == null ? 43 : this.processHash.hashCode()); result = (result * PRIME) + (this.cpuUsage == null ? 43 : this.cpuUsage.hashCode()); result = diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/TopProcessesUsageTrend.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/TopProcessesUsageTrend.java index 4c79fa09a1e..1f414d2d294 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/TopProcessesUsageTrend.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/TopProcessesUsageTrend.java @@ -24,6 +24,7 @@ public final class TopProcessesUsageTrend @Deprecated @java.beans.ConstructorProperties({ "endTimestamp", + "containerId", "cpuUsage", "cpuUtilization", "memoryUtilization", @@ -33,6 +34,7 @@ public final class TopProcessesUsageTrend }) public TopProcessesUsageTrend( java.util.Date endTimestamp, + String containerId, Double cpuUsage, Double cpuUtilization, Double memoryUtilization, @@ -41,6 +43,7 @@ public TopProcessesUsageTrend( Integer maxProcessCount) { super(); this.endTimestamp = endTimestamp; + this.containerId = containerId; this.cpuUsage = cpuUsage; this.cpuUtilization = cpuUtilization; this.memoryUtilization = memoryUtilization; @@ -67,6 +70,22 @@ public Builder endTimestamp(java.util.Date endTimestamp) { this.__explicitlySet__.add("endTimestamp"); return this; } + /** + * Container id if this process corresponds to a running container in the host. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerId") + private String containerId; + + /** + * Container id if this process corresponds to a running container in the host. + * @param containerId the value to set + * @return this builder + **/ + public Builder containerId(String containerId) { + this.containerId = containerId; + this.__explicitlySet__.add("containerId"); + return this; + } /** * Process CPU usage. **/ @@ -171,6 +190,7 @@ public TopProcessesUsageTrend build() { TopProcessesUsageTrend model = new TopProcessesUsageTrend( this.endTimestamp, + this.containerId, this.cpuUsage, this.cpuUtilization, this.memoryUtilization, @@ -188,6 +208,9 @@ public Builder copy(TopProcessesUsageTrend model) { if (model.wasPropertyExplicitlySet("endTimestamp")) { this.endTimestamp(model.getEndTimestamp()); } + if (model.wasPropertyExplicitlySet("containerId")) { + this.containerId(model.getContainerId()); + } if (model.wasPropertyExplicitlySet("cpuUsage")) { this.cpuUsage(model.getCpuUsage()); } @@ -235,6 +258,20 @@ public java.util.Date getEndTimestamp() { return endTimestamp; } + /** + * Container id if this process corresponds to a running container in the host. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("containerId") + private final String containerId; + + /** + * Container id if this process corresponds to a running container in the host. + * @return the value + **/ + public String getContainerId() { + return containerId; + } + /** * Process CPU usage. **/ @@ -334,6 +371,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("TopProcessesUsageTrend("); sb.append("super=").append(super.toString()); sb.append("endTimestamp=").append(String.valueOf(this.endTimestamp)); + sb.append(", containerId=").append(String.valueOf(this.containerId)); sb.append(", cpuUsage=").append(String.valueOf(this.cpuUsage)); sb.append(", cpuUtilization=").append(String.valueOf(this.cpuUtilization)); sb.append(", memoryUtilization=").append(String.valueOf(this.memoryUtilization)); @@ -355,6 +393,7 @@ public boolean equals(Object o) { TopProcessesUsageTrend other = (TopProcessesUsageTrend) o; return java.util.Objects.equals(this.endTimestamp, other.endTimestamp) + && java.util.Objects.equals(this.containerId, other.containerId) && java.util.Objects.equals(this.cpuUsage, other.cpuUsage) && java.util.Objects.equals(this.cpuUtilization, other.cpuUtilization) && java.util.Objects.equals(this.memoryUtilization, other.memoryUtilization) @@ -369,6 +408,7 @@ public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.endTimestamp == null ? 43 : this.endTimestamp.hashCode()); + result = (result * PRIME) + (this.containerId == null ? 43 : this.containerId.hashCode()); result = (result * PRIME) + (this.cpuUsage == null ? 43 : this.cpuUsage.hashCode()); result = (result * PRIME) diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateDatabaseInsightDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateDatabaseInsightDetails.java index 9c967f4f307..75800fb7800 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateDatabaseInsightDetails.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateDatabaseInsightDetails.java @@ -37,6 +37,14 @@ @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = UpdateAutonomousDatabaseInsightDetails.class, name = "AUTONOMOUS_DATABASE" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = UpdateMdsMySqlDatabaseInsight.class, + name = "MDS_MYSQL_DATABASE_SYSTEM" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = UpdateMacsManagedCloudDatabaseInsightDetails.class, + name = "MACS_MANAGED_CLOUD_DATABASE" ) }) @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateExadataInsightDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateExadataInsightDetails.java index b82d7701aac..69fc1437f4d 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateExadataInsightDetails.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateExadataInsightDetails.java @@ -26,6 +26,10 @@ value = UpdatePeComanagedExadataInsightDetails.class, name = "PE_COMANAGED_EXADATA" ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = UpdateMacsManagedCloudExadataInsightDetails.class, + name = "MACS_MANAGED_CLOUD_EXADATA" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = UpdateEmManagedExternalExadataInsightDetails.class, name = "EM_MANAGED_EXTERNAL_EXADATA" diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateHostInsightDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateHostInsightDetails.java index e152abb0bd0..b5226ee2904 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateHostInsightDetails.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateHostInsightDetails.java @@ -22,6 +22,10 @@ defaultImpl = UpdateHostInsightDetails.class ) @com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = UpdateMacsManagedCloudDatabaseHostInsightDetails.class, + name = "MACS_MANAGED_CLOUD_DB_HOST" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = UpdateEmManagedExternalHostInsightDetails.class, name = "EM_MANAGED_EXTERNAL_HOST" diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateMacsManagedCloudDatabaseHostInsightDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateMacsManagedCloudDatabaseHostInsightDetails.java new file mode 100644 index 00000000000..31eef24c59d --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateMacsManagedCloudDatabaseHostInsightDetails.java @@ -0,0 +1,131 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * The information to be updated. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateMacsManagedCloudDatabaseHostInsightDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateMacsManagedCloudDatabaseHostInsightDetails + extends UpdateHostInsightDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateMacsManagedCloudDatabaseHostInsightDetails build() { + UpdateMacsManagedCloudDatabaseHostInsightDetails model = + new UpdateMacsManagedCloudDatabaseHostInsightDetails( + this.freeformTags, this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateMacsManagedCloudDatabaseHostInsightDetails model) { + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public UpdateMacsManagedCloudDatabaseHostInsightDetails( + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(freeformTags, definedTags); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateMacsManagedCloudDatabaseHostInsightDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateMacsManagedCloudDatabaseHostInsightDetails)) { + return false; + } + + UpdateMacsManagedCloudDatabaseHostInsightDetails other = + (UpdateMacsManagedCloudDatabaseHostInsightDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateMacsManagedCloudDatabaseInsightDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateMacsManagedCloudDatabaseInsightDetails.java new file mode 100644 index 00000000000..e1028915bb0 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateMacsManagedCloudDatabaseInsightDetails.java @@ -0,0 +1,131 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * The freeformTags and definedTags to be updated. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateMacsManagedCloudDatabaseInsightDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateMacsManagedCloudDatabaseInsightDetails + extends UpdateDatabaseInsightDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateMacsManagedCloudDatabaseInsightDetails build() { + UpdateMacsManagedCloudDatabaseInsightDetails model = + new UpdateMacsManagedCloudDatabaseInsightDetails( + this.freeformTags, this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateMacsManagedCloudDatabaseInsightDetails model) { + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public UpdateMacsManagedCloudDatabaseInsightDetails( + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(freeformTags, definedTags); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateMacsManagedCloudDatabaseInsightDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateMacsManagedCloudDatabaseInsightDetails)) { + return false; + } + + UpdateMacsManagedCloudDatabaseInsightDetails other = + (UpdateMacsManagedCloudDatabaseInsightDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateMacsManagedCloudExadataInsightDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateMacsManagedCloudExadataInsightDetails.java new file mode 100644 index 00000000000..1cbce6cfac1 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateMacsManagedCloudExadataInsightDetails.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * The information to be updated. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateMacsManagedCloudExadataInsightDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateMacsManagedCloudExadataInsightDetails extends UpdateExadataInsightDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateMacsManagedCloudExadataInsightDetails build() { + UpdateMacsManagedCloudExadataInsightDetails model = + new UpdateMacsManagedCloudExadataInsightDetails( + this.freeformTags, this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateMacsManagedCloudExadataInsightDetails model) { + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public UpdateMacsManagedCloudExadataInsightDetails( + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(freeformTags, definedTags); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateMacsManagedCloudExadataInsightDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateMacsManagedCloudExadataInsightDetails)) { + return false; + } + + UpdateMacsManagedCloudExadataInsightDetails other = + (UpdateMacsManagedCloudExadataInsightDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateMacsManagedExternalDatabaseInsightDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateMacsManagedExternalDatabaseInsightDetails.java index 3ec8e67e948..96acfe8d39a 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateMacsManagedExternalDatabaseInsightDetails.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateMacsManagedExternalDatabaseInsightDetails.java @@ -5,7 +5,7 @@ package com.oracle.bmc.opsi.model; /** - * The information to be updated. + * The freeformTags and definedTags to be updated. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateMdsMySqlDatabaseInsight.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateMdsMySqlDatabaseInsight.java new file mode 100644 index 00000000000..d5cc9a7e65e --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateMdsMySqlDatabaseInsight.java @@ -0,0 +1,128 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.model; + +/** + * Database insight resource. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateMdsMySqlDatabaseInsight.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "entitySource" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateMdsMySqlDatabaseInsight extends UpdateDatabaseInsightDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateMdsMySqlDatabaseInsight build() { + UpdateMdsMySqlDatabaseInsight model = + new UpdateMdsMySqlDatabaseInsight(this.freeformTags, this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateMdsMySqlDatabaseInsight model) { + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public UpdateMdsMySqlDatabaseInsight( + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(freeformTags, definedTags); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateMdsMySqlDatabaseInsight("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateMdsMySqlDatabaseInsight)) { + return false; + } + + UpdateMdsMySqlDatabaseInsight other = (UpdateMdsMySqlDatabaseInsight) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateOperationsInsightsWarehouseDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateOperationsInsightsWarehouseDetails.java index cd9ce67f07a..bc758f6d1c5 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateOperationsInsightsWarehouseDetails.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateOperationsInsightsWarehouseDetails.java @@ -46,13 +46,13 @@ public UpdateOperationsInsightsWarehouseDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * User-friedly name of Operations Insights Warehouse that does not have to be unique. + * User-friedly name of Ops Insights Warehouse that does not have to be unique. **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") private String displayName; /** - * User-friedly name of Operations Insights Warehouse that does not have to be unique. + * User-friedly name of Ops Insights Warehouse that does not have to be unique. * @param displayName the value to set * @return this builder **/ @@ -189,13 +189,13 @@ public Builder toBuilder() { } /** - * User-friedly name of Operations Insights Warehouse that does not have to be unique. + * User-friedly name of Ops Insights Warehouse that does not have to be unique. **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") private final String displayName; /** - * User-friedly name of Operations Insights Warehouse that does not have to be unique. + * User-friedly name of Ops Insights Warehouse that does not have to be unique. * @return the value **/ public String getDisplayName() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateOperationsInsightsWarehouseUserDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateOperationsInsightsWarehouseUserDetails.java index 805eccfa97d..4ad9f739146 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateOperationsInsightsWarehouseUserDetails.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdateOperationsInsightsWarehouseUserDetails.java @@ -49,13 +49,13 @@ public UpdateOperationsInsightsWarehouseUserDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * User provided connection password for the AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * User provided connection password for the AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. **/ @com.fasterxml.jackson.annotation.JsonProperty("connectionPassword") private String connectionPassword; /** - * User provided connection password for the AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * User provided connection password for the AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * @param connectionPassword the value to set * @return this builder **/ @@ -208,13 +208,13 @@ public Builder toBuilder() { } /** - * User provided connection password for the AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * User provided connection password for the AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. **/ @com.fasterxml.jackson.annotation.JsonProperty("connectionPassword") private final String connectionPassword; /** - * User provided connection password for the AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. + * User provided connection password for the AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * @return the value **/ public String getConnectionPassword() { diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdatePeComanagedDatabaseInsightDetails.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdatePeComanagedDatabaseInsightDetails.java index 4272129c4a1..8cbf38fa89d 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdatePeComanagedDatabaseInsightDetails.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/UpdatePeComanagedDatabaseInsightDetails.java @@ -5,7 +5,7 @@ package com.oracle.bmc.opsi.model; /** - * The information to be updated. + * The freeformTags and definedTags to be updated. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/WorkRequests.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/WorkRequests.java index 7ce5d7de9fc..e4308869d3b 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/WorkRequests.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/model/WorkRequests.java @@ -5,7 +5,7 @@ package com.oracle.bmc.opsi.model; /** - * Logical grouping used for Operations Insights Work Request operations. + * Logical grouping used for Ops Insights Work Request operations. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ChangeMacsManagedCloudDatabaseInsightConnectionRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ChangeMacsManagedCloudDatabaseInsightConnectionRequest.java new file mode 100644 index 00000000000..45c77d334a9 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ChangeMacsManagedCloudDatabaseInsightConnectionRequest.java @@ -0,0 +1,390 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.requests; + +import com.oracle.bmc.opsi.model.*; +/** + * Example: Click here to see how to use ChangeMacsManagedCloudDatabaseInsightConnectionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +public class ChangeMacsManagedCloudDatabaseInsightConnectionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.opsi.model.ChangeMacsManagedCloudDatabaseInsightConnectionDetails> { + + /** + * Unique database insight identifier + */ + private String databaseInsightId; + + /** + * Unique database insight identifier + */ + public String getDatabaseInsightId() { + return databaseInsightId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.opsi.model.ChangeMacsManagedCloudDatabaseInsightConnectionDetails + changeMacsManagedCloudDatabaseInsightConnectionDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.opsi.model.ChangeMacsManagedCloudDatabaseInsightConnectionDetails + getChangeMacsManagedCloudDatabaseInsightConnectionDetails() { + return changeMacsManagedCloudDatabaseInsightConnectionDetails; + } + /** + * Used for optimistic concurrency control. In the update or delete call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous get, create, or update response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * Used for optimistic concurrency control. In the update or delete call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous get, create, or update response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request that can be retried in case of a timeout or + * server error without risk of executing the same action again. Retry tokens expire after 24 + * hours. + *

+ *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + * operations, such as a resource being deleted or purged from the system. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request that can be retried in case of a timeout or + * server error without risk of executing the same action again. Retry tokens expire after 24 + * hours. + *

+ *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + * operations, such as a resource being deleted or purged from the system. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.opsi.model.ChangeMacsManagedCloudDatabaseInsightConnectionDetails + getBody$() { + return changeMacsManagedCloudDatabaseInsightConnectionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeMacsManagedCloudDatabaseInsightConnectionRequest, + com.oracle.bmc.opsi.model + .ChangeMacsManagedCloudDatabaseInsightConnectionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique database insight identifier + */ + private String databaseInsightId = null; + + /** + * Unique database insight identifier + * @param databaseInsightId the value to set + * @return this builder instance + */ + public Builder databaseInsightId(String databaseInsightId) { + this.databaseInsightId = databaseInsightId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.opsi.model.ChangeMacsManagedCloudDatabaseInsightConnectionDetails + changeMacsManagedCloudDatabaseInsightConnectionDetails = null; + + /** + * The information to be updated. + * @param changeMacsManagedCloudDatabaseInsightConnectionDetails the value to set + * @return this builder instance + */ + public Builder changeMacsManagedCloudDatabaseInsightConnectionDetails( + com.oracle.bmc.opsi.model.ChangeMacsManagedCloudDatabaseInsightConnectionDetails + changeMacsManagedCloudDatabaseInsightConnectionDetails) { + this.changeMacsManagedCloudDatabaseInsightConnectionDetails = + changeMacsManagedCloudDatabaseInsightConnectionDetails; + return this; + } + + /** + * Used for optimistic concurrency control. In the update or delete call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous get, create, or update response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * Used for optimistic concurrency control. In the update or delete call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous get, create, or update response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request that can be retried in case of a timeout or + * server error without risk of executing the same action again. Retry tokens expire after 24 + * hours. + *

+ *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + * operations, such as a resource being deleted or purged from the system. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request that can be retried in case of a timeout or + * server error without risk of executing the same action again. Retry tokens expire after 24 + * hours. + *

+ *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + * operations, such as a resource being deleted or purged from the system. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeMacsManagedCloudDatabaseInsightConnectionRequest o) { + databaseInsightId(o.getDatabaseInsightId()); + changeMacsManagedCloudDatabaseInsightConnectionDetails( + o.getChangeMacsManagedCloudDatabaseInsightConnectionDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeMacsManagedCloudDatabaseInsightConnectionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeMacsManagedCloudDatabaseInsightConnectionRequest + */ + public ChangeMacsManagedCloudDatabaseInsightConnectionRequest build() { + ChangeMacsManagedCloudDatabaseInsightConnectionRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.opsi.model.ChangeMacsManagedCloudDatabaseInsightConnectionDetails + body) { + changeMacsManagedCloudDatabaseInsightConnectionDetails(body); + return this; + } + + /** + * Build the instance of ChangeMacsManagedCloudDatabaseInsightConnectionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeMacsManagedCloudDatabaseInsightConnectionRequest + */ + public ChangeMacsManagedCloudDatabaseInsightConnectionRequest + buildWithoutInvocationCallback() { + ChangeMacsManagedCloudDatabaseInsightConnectionRequest request = + new ChangeMacsManagedCloudDatabaseInsightConnectionRequest(); + request.databaseInsightId = databaseInsightId; + request.changeMacsManagedCloudDatabaseInsightConnectionDetails = + changeMacsManagedCloudDatabaseInsightConnectionDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new ChangeMacsManagedCloudDatabaseInsightConnectionRequest(databaseInsightId, changeMacsManagedCloudDatabaseInsightConnectionDetails, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .databaseInsightId(databaseInsightId) + .changeMacsManagedCloudDatabaseInsightConnectionDetails( + changeMacsManagedCloudDatabaseInsightConnectionDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",databaseInsightId=").append(String.valueOf(this.databaseInsightId)); + sb.append(",changeMacsManagedCloudDatabaseInsightConnectionDetails=") + .append( + String.valueOf( + this.changeMacsManagedCloudDatabaseInsightConnectionDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeMacsManagedCloudDatabaseInsightConnectionRequest)) { + return false; + } + + ChangeMacsManagedCloudDatabaseInsightConnectionRequest other = + (ChangeMacsManagedCloudDatabaseInsightConnectionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.databaseInsightId, other.databaseInsightId) + && java.util.Objects.equals( + this.changeMacsManagedCloudDatabaseInsightConnectionDetails, + other.changeMacsManagedCloudDatabaseInsightConnectionDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.databaseInsightId == null ? 43 : this.databaseInsightId.hashCode()); + result = + (result * PRIME) + + (this.changeMacsManagedCloudDatabaseInsightConnectionDetails == null + ? 43 + : this.changeMacsManagedCloudDatabaseInsightConnectionDetails + .hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ChangeOperationsInsightsWarehouseCompartmentRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ChangeOperationsInsightsWarehouseCompartmentRequest.java index aee72d984cd..1b0967cd34e 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ChangeOperationsInsightsWarehouseCompartmentRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ChangeOperationsInsightsWarehouseCompartmentRequest.java @@ -14,12 +14,12 @@ public class ChangeOperationsInsightsWarehouseCompartmentRequest com.oracle.bmc.opsi.model.ChangeOperationsInsightsWarehouseCompartmentDetails> { /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ private String operationsInsightsWarehouseId; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ public String getOperationsInsightsWarehouseId() { return operationsInsightsWarehouseId; @@ -113,12 +113,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ private String operationsInsightsWarehouseId = null; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier * @param operationsInsightsWarehouseId the value to set * @return this builder instance */ diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/CreateHostInsightRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/CreateHostInsightRequest.java index fcfee0c61b4..208bb273ef5 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/CreateHostInsightRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/CreateHostInsightRequest.java @@ -14,12 +14,12 @@ public class CreateHostInsightRequest com.oracle.bmc.opsi.model.CreateHostInsightDetails> { /** - * Details for the host for which a Host Insight resource will be created in Operations Insights. + * Details for the host for which a Host Insight resource will be created in Ops Insights. */ private com.oracle.bmc.opsi.model.CreateHostInsightDetails createHostInsightDetails; /** - * Details for the host for which a Host Insight resource will be created in Operations Insights. + * Details for the host for which a Host Insight resource will be created in Ops Insights. */ public com.oracle.bmc.opsi.model.CreateHostInsightDetails getCreateHostInsightDetails() { return createHostInsightDetails; @@ -81,12 +81,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * Details for the host for which a Host Insight resource will be created in Operations Insights. + * Details for the host for which a Host Insight resource will be created in Ops Insights. */ private com.oracle.bmc.opsi.model.CreateHostInsightDetails createHostInsightDetails = null; /** - * Details for the host for which a Host Insight resource will be created in Operations Insights. + * Details for the host for which a Host Insight resource will be created in Ops Insights. * @param createHostInsightDetails the value to set * @return this builder instance */ diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/CreateNewsReportRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/CreateNewsReportRequest.java index c2761f12616..9f1ff36eefa 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/CreateNewsReportRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/CreateNewsReportRequest.java @@ -14,12 +14,12 @@ public class CreateNewsReportRequest com.oracle.bmc.opsi.model.CreateNewsReportDetails> { /** - * Details for the news report that will be created in Operations Insights. + * Details for the news report that will be created in Ops Insights. */ private com.oracle.bmc.opsi.model.CreateNewsReportDetails createNewsReportDetails; /** - * Details for the news report that will be created in Operations Insights. + * Details for the news report that will be created in Ops Insights. */ public com.oracle.bmc.opsi.model.CreateNewsReportDetails getCreateNewsReportDetails() { return createNewsReportDetails; @@ -81,12 +81,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * Details for the news report that will be created in Operations Insights. + * Details for the news report that will be created in Ops Insights. */ private com.oracle.bmc.opsi.model.CreateNewsReportDetails createNewsReportDetails = null; /** - * Details for the news report that will be created in Operations Insights. + * Details for the news report that will be created in Ops Insights. * @param createNewsReportDetails the value to set * @return this builder instance */ diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/CreateOperationsInsightsWarehouseRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/CreateOperationsInsightsWarehouseRequest.java index 420855bf6c9..831f7b22a78 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/CreateOperationsInsightsWarehouseRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/CreateOperationsInsightsWarehouseRequest.java @@ -14,13 +14,13 @@ public class CreateOperationsInsightsWarehouseRequest com.oracle.bmc.opsi.model.CreateOperationsInsightsWarehouseDetails> { /** - * Details using which an Operations Insights Warehouse resource will be created in Operations Insights. + * Details using which an Ops Insights Warehouse resource will be created in Ops Insights. */ private com.oracle.bmc.opsi.model.CreateOperationsInsightsWarehouseDetails createOperationsInsightsWarehouseDetails; /** - * Details using which an Operations Insights Warehouse resource will be created in Operations Insights. + * Details using which an Ops Insights Warehouse resource will be created in Ops Insights. */ public com.oracle.bmc.opsi.model.CreateOperationsInsightsWarehouseDetails getCreateOperationsInsightsWarehouseDetails() { @@ -84,13 +84,13 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * Details using which an Operations Insights Warehouse resource will be created in Operations Insights. + * Details using which an Ops Insights Warehouse resource will be created in Ops Insights. */ private com.oracle.bmc.opsi.model.CreateOperationsInsightsWarehouseDetails createOperationsInsightsWarehouseDetails = null; /** - * Details using which an Operations Insights Warehouse resource will be created in Operations Insights. + * Details using which an Ops Insights Warehouse resource will be created in Ops Insights. * @param createOperationsInsightsWarehouseDetails the value to set * @return this builder instance */ diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/DeleteOperationsInsightsWarehouseRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/DeleteOperationsInsightsWarehouseRequest.java index 916ceda0538..49b27224395 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/DeleteOperationsInsightsWarehouseRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/DeleteOperationsInsightsWarehouseRequest.java @@ -13,12 +13,12 @@ public class DeleteOperationsInsightsWarehouseRequest extends com.oracle.bmc.requests.BmcRequest { /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ private String operationsInsightsWarehouseId; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ public String getOperationsInsightsWarehouseId() { return operationsInsightsWarehouseId; @@ -64,12 +64,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ private String operationsInsightsWarehouseId = null; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier * @param operationsInsightsWarehouseId the value to set * @return this builder instance */ diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/DownloadOperationsInsightsWarehouseWalletRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/DownloadOperationsInsightsWarehouseWalletRequest.java index a6a712b103e..c8fe3a1608a 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/DownloadOperationsInsightsWarehouseWalletRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/DownloadOperationsInsightsWarehouseWalletRequest.java @@ -14,12 +14,12 @@ public class DownloadOperationsInsightsWarehouseWalletRequest com.oracle.bmc.opsi.model.DownloadOperationsInsightsWarehouseWalletDetails> { /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ private String operationsInsightsWarehouseId; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ public String getOperationsInsightsWarehouseId() { return operationsInsightsWarehouseId; @@ -95,12 +95,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ private String operationsInsightsWarehouseId = null; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier * @param operationsInsightsWarehouseId the value to set * @return this builder instance */ diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/EnableHostInsightRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/EnableHostInsightRequest.java index 4de7a9af5ac..ebde24f2c56 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/EnableHostInsightRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/EnableHostInsightRequest.java @@ -14,12 +14,12 @@ public class EnableHostInsightRequest com.oracle.bmc.opsi.model.EnableHostInsightDetails> { /** - * Details for the host to be enabled in Operations Insights. + * Details for the host to be enabled in Ops Insights. */ private com.oracle.bmc.opsi.model.EnableHostInsightDetails enableHostInsightDetails; /** - * Details for the host to be enabled in Operations Insights. + * Details for the host to be enabled in Ops Insights. */ public com.oracle.bmc.opsi.model.EnableHostInsightDetails getEnableHostInsightDetails() { return enableHostInsightDetails; @@ -109,12 +109,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * Details for the host to be enabled in Operations Insights. + * Details for the host to be enabled in Ops Insights. */ private com.oracle.bmc.opsi.model.EnableHostInsightDetails enableHostInsightDetails = null; /** - * Details for the host to be enabled in Operations Insights. + * Details for the host to be enabled in Ops Insights. * @param enableHostInsightDetails the value to set * @return this builder instance */ diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/GetOperationsInsightsWarehouseRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/GetOperationsInsightsWarehouseRequest.java index e39899918fb..71a104e27f1 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/GetOperationsInsightsWarehouseRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/GetOperationsInsightsWarehouseRequest.java @@ -13,12 +13,12 @@ public class GetOperationsInsightsWarehouseRequest extends com.oracle.bmc.requests.BmcRequest { /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ private String operationsInsightsWarehouseId; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ public String getOperationsInsightsWarehouseId() { return operationsInsightsWarehouseId; @@ -47,12 +47,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ private String operationsInsightsWarehouseId = null; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier * @param operationsInsightsWarehouseId the value to set * @return this builder instance */ diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/IngestMySqlSqlStatsRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/IngestMySqlSqlStatsRequest.java new file mode 100644 index 00000000000..de517b03dfd --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/IngestMySqlSqlStatsRequest.java @@ -0,0 +1,409 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.requests; + +import com.oracle.bmc.opsi.model.*; +/** + * Example: Click here to see how to use IngestMySqlSqlStatsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +public class IngestMySqlSqlStatsRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.opsi.model.IngestMySqlSqlStatsDetails> { + + /** + * Collection of MySql SQL stats objects for a particular database. + */ + private com.oracle.bmc.opsi.model.IngestMySqlSqlStatsDetails ingestMySqlSqlStatsDetails; + + /** + * Collection of MySql SQL stats objects for a particular database. + */ + public com.oracle.bmc.opsi.model.IngestMySqlSqlStatsDetails getIngestMySqlSqlStatsDetails() { + return ingestMySqlSqlStatsDetails; + } + /** + * Optional [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + * + */ + private String databaseId; + + /** + * Optional [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + * + */ + public String getDatabaseId() { + return databaseId; + } + /** + * [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database insight resource. + * + */ + private String id; + + /** + * [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database insight resource. + * + */ + public String getId() { + return id; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * Used for optimistic concurrency control. In the update or delete call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous get, create, or update response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * Used for optimistic concurrency control. In the update or delete call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous get, create, or update response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request that can be retried in case of a timeout or + * server error without risk of executing the same action again. Retry tokens expire after 24 + * hours. + *

+ *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + * operations, such as a resource being deleted or purged from the system. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request that can be retried in case of a timeout or + * server error without risk of executing the same action again. Retry tokens expire after 24 + * hours. + *

+ *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + * operations, such as a resource being deleted or purged from the system. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.opsi.model.IngestMySqlSqlStatsDetails getBody$() { + return ingestMySqlSqlStatsDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + IngestMySqlSqlStatsRequest, + com.oracle.bmc.opsi.model.IngestMySqlSqlStatsDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Collection of MySql SQL stats objects for a particular database. + */ + private com.oracle.bmc.opsi.model.IngestMySqlSqlStatsDetails ingestMySqlSqlStatsDetails = + null; + + /** + * Collection of MySql SQL stats objects for a particular database. + * @param ingestMySqlSqlStatsDetails the value to set + * @return this builder instance + */ + public Builder ingestMySqlSqlStatsDetails( + com.oracle.bmc.opsi.model.IngestMySqlSqlStatsDetails ingestMySqlSqlStatsDetails) { + this.ingestMySqlSqlStatsDetails = ingestMySqlSqlStatsDetails; + return this; + } + + /** + * Optional [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + * + */ + private String databaseId = null; + + /** + * Optional [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + * + * @param databaseId the value to set + * @return this builder instance + */ + public Builder databaseId(String databaseId) { + this.databaseId = databaseId; + return this; + } + + /** + * [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database insight resource. + * + */ + private String id = null; + + /** + * [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database insight resource. + * + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Used for optimistic concurrency control. In the update or delete call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous get, create, or update response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * Used for optimistic concurrency control. In the update or delete call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous get, create, or update response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request that can be retried in case of a timeout or + * server error without risk of executing the same action again. Retry tokens expire after 24 + * hours. + *

+ *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + * operations, such as a resource being deleted or purged from the system. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request that can be retried in case of a timeout or + * server error without risk of executing the same action again. Retry tokens expire after 24 + * hours. + *

+ *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + * operations, such as a resource being deleted or purged from the system. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(IngestMySqlSqlStatsRequest o) { + ingestMySqlSqlStatsDetails(o.getIngestMySqlSqlStatsDetails()); + databaseId(o.getDatabaseId()); + id(o.getId()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of IngestMySqlSqlStatsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of IngestMySqlSqlStatsRequest + */ + public IngestMySqlSqlStatsRequest build() { + IngestMySqlSqlStatsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.opsi.model.IngestMySqlSqlStatsDetails body) { + ingestMySqlSqlStatsDetails(body); + return this; + } + + /** + * Build the instance of IngestMySqlSqlStatsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of IngestMySqlSqlStatsRequest + */ + public IngestMySqlSqlStatsRequest buildWithoutInvocationCallback() { + IngestMySqlSqlStatsRequest request = new IngestMySqlSqlStatsRequest(); + request.ingestMySqlSqlStatsDetails = ingestMySqlSqlStatsDetails; + request.databaseId = databaseId; + request.id = id; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new IngestMySqlSqlStatsRequest(ingestMySqlSqlStatsDetails, databaseId, id, opcRequestId, ifMatch, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .ingestMySqlSqlStatsDetails(ingestMySqlSqlStatsDetails) + .databaseId(databaseId) + .id(id) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",ingestMySqlSqlStatsDetails=") + .append(String.valueOf(this.ingestMySqlSqlStatsDetails)); + sb.append(",databaseId=").append(String.valueOf(this.databaseId)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof IngestMySqlSqlStatsRequest)) { + return false; + } + + IngestMySqlSqlStatsRequest other = (IngestMySqlSqlStatsRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.ingestMySqlSqlStatsDetails, other.ingestMySqlSqlStatsDetails) + && java.util.Objects.equals(this.databaseId, other.databaseId) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.ingestMySqlSqlStatsDetails == null + ? 43 + : this.ingestMySqlSqlStatsDetails.hashCode()); + result = (result * PRIME) + (this.databaseId == null ? 43 : this.databaseId.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/IngestMySqlSqlTextRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/IngestMySqlSqlTextRequest.java new file mode 100644 index 00000000000..816263421a7 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/IngestMySqlSqlTextRequest.java @@ -0,0 +1,443 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.requests; + +import com.oracle.bmc.opsi.model.*; +/** + * Example: Click here to see how to use IngestMySqlSqlTextRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +public class IngestMySqlSqlTextRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.opsi.model.IngestMySqlSqlTextDetails> { + + /** + * Collection of SQL text objects for a particular database. + */ + private com.oracle.bmc.opsi.model.IngestMySqlSqlTextDetails ingestMySqlSqlTextDetails; + + /** + * Collection of SQL text objects for a particular database. + */ + public com.oracle.bmc.opsi.model.IngestMySqlSqlTextDetails getIngestMySqlSqlTextDetails() { + return ingestMySqlSqlTextDetails; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * Optional [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + * + */ + private String databaseId; + + /** + * Optional [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + * + */ + public String getDatabaseId() { + return databaseId; + } + /** + * [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database insight resource. + * + */ + private String id; + + /** + * [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database insight resource. + * + */ + public String getId() { + return id; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * Used for optimistic concurrency control. In the update or delete call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous get, create, or update response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * Used for optimistic concurrency control. In the update or delete call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous get, create, or update response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * A token that uniquely identifies a request that can be retried in case of a timeout or + * server error without risk of executing the same action again. Retry tokens expire after 24 + * hours. + *

+ *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + * operations, such as a resource being deleted or purged from the system. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request that can be retried in case of a timeout or + * server error without risk of executing the same action again. Retry tokens expire after 24 + * hours. + *

+ *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + * operations, such as a resource being deleted or purged from the system. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.opsi.model.IngestMySqlSqlTextDetails getBody$() { + return ingestMySqlSqlTextDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + IngestMySqlSqlTextRequest, + com.oracle.bmc.opsi.model.IngestMySqlSqlTextDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Collection of SQL text objects for a particular database. + */ + private com.oracle.bmc.opsi.model.IngestMySqlSqlTextDetails ingestMySqlSqlTextDetails = + null; + + /** + * Collection of SQL text objects for a particular database. + * @param ingestMySqlSqlTextDetails the value to set + * @return this builder instance + */ + public Builder ingestMySqlSqlTextDetails( + com.oracle.bmc.opsi.model.IngestMySqlSqlTextDetails ingestMySqlSqlTextDetails) { + this.ingestMySqlSqlTextDetails = ingestMySqlSqlTextDetails; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * Optional [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + * + */ + private String databaseId = null; + + /** + * Optional [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + * + * @param databaseId the value to set + * @return this builder instance + */ + public Builder databaseId(String databaseId) { + this.databaseId = databaseId; + return this; + } + + /** + * [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database insight resource. + * + */ + private String id = null; + + /** + * [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database insight resource. + * + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Used for optimistic concurrency control. In the update or delete call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous get, create, or update response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * Used for optimistic concurrency control. In the update or delete call for a resource, set the {@code if-match} + * parameter to the value of the etag from a previous get, create, or update response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * A token that uniquely identifies a request that can be retried in case of a timeout or + * server error without risk of executing the same action again. Retry tokens expire after 24 + * hours. + *

+ *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + * operations, such as a resource being deleted or purged from the system. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request that can be retried in case of a timeout or + * server error without risk of executing the same action again. Retry tokens expire after 24 + * hours. + *

+ *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + * operations, such as a resource being deleted or purged from the system. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(IngestMySqlSqlTextRequest o) { + ingestMySqlSqlTextDetails(o.getIngestMySqlSqlTextDetails()); + compartmentId(o.getCompartmentId()); + databaseId(o.getDatabaseId()); + id(o.getId()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of IngestMySqlSqlTextRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of IngestMySqlSqlTextRequest + */ + public IngestMySqlSqlTextRequest build() { + IngestMySqlSqlTextRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.opsi.model.IngestMySqlSqlTextDetails body) { + ingestMySqlSqlTextDetails(body); + return this; + } + + /** + * Build the instance of IngestMySqlSqlTextRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of IngestMySqlSqlTextRequest + */ + public IngestMySqlSqlTextRequest buildWithoutInvocationCallback() { + IngestMySqlSqlTextRequest request = new IngestMySqlSqlTextRequest(); + request.ingestMySqlSqlTextDetails = ingestMySqlSqlTextDetails; + request.compartmentId = compartmentId; + request.databaseId = databaseId; + request.id = id; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + request.opcRetryToken = opcRetryToken; + return request; + // new IngestMySqlSqlTextRequest(ingestMySqlSqlTextDetails, compartmentId, databaseId, id, opcRequestId, ifMatch, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .ingestMySqlSqlTextDetails(ingestMySqlSqlTextDetails) + .compartmentId(compartmentId) + .databaseId(databaseId) + .id(id) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",ingestMySqlSqlTextDetails=") + .append(String.valueOf(this.ingestMySqlSqlTextDetails)); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",databaseId=").append(String.valueOf(this.databaseId)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof IngestMySqlSqlTextRequest)) { + return false; + } + + IngestMySqlSqlTextRequest other = (IngestMySqlSqlTextRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.ingestMySqlSqlTextDetails, other.ingestMySqlSqlTextDetails) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.databaseId, other.databaseId) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.ingestMySqlSqlTextDetails == null + ? 43 + : this.ingestMySqlSqlTextDetails.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.databaseId == null ? 43 : this.databaseId.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListDatabaseConfigurationsRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListDatabaseConfigurationsRequest.java index 121dcea301a..121a0f1a721 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListDatabaseConfigurationsRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListDatabaseConfigurationsRequest.java @@ -114,6 +114,10 @@ public enum DatabaseType { ComanagedExacsCdb("COMANAGED-EXACS-CDB"), ComanagedExacsPdb("COMANAGED-EXACS-PDB"), ComanagedExacsNoncdb("COMANAGED-EXACS-NONCDB"), + ComanagedExaccCdb("COMANAGED-EXACC-CDB"), + ComanagedExaccPdb("COMANAGED-EXACC-PDB"), + ComanagedExaccNoncdb("COMANAGED-EXACC-NONCDB"), + MdsMysql("MDS-MYSQL"), ; private final String value; diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListDatabaseInsightsRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListDatabaseInsightsRequest.java index a4599848504..caf74d185d1 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListDatabaseInsightsRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListDatabaseInsightsRequest.java @@ -97,6 +97,10 @@ public enum DatabaseType { ComanagedExacsCdb("COMANAGED-EXACS-CDB"), ComanagedExacsPdb("COMANAGED-EXACS-PDB"), ComanagedExacsNoncdb("COMANAGED-EXACS-NONCDB"), + ComanagedExaccCdb("COMANAGED-EXACC-CDB"), + ComanagedExaccPdb("COMANAGED-EXACC-PDB"), + ComanagedExaccNoncdb("COMANAGED-EXACC-NONCDB"), + MdsMysql("MDS-MYSQL"), ; private final String value; diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListExadataConfigurationsRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListExadataConfigurationsRequest.java index 449979b82dc..5b60560c4e3 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListExadataConfigurationsRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListExadataConfigurationsRequest.java @@ -231,6 +231,19 @@ public java.util.List getDefinedTagExists() { public java.util.List getFreeformTagExists() { return freeformTagExists; } + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + */ + private Boolean compartmentIdInSubtree; + + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + */ + public Boolean getCompartmentIdInSubtree() { + return compartmentIdInSubtree; + } /** * Unique Oracle-assigned identifier for the request. If you need to contact * Oracle about a particular request, please provide the request ID. @@ -553,6 +566,23 @@ public Builder freeformTagExists(String singularValue) { return this.freeformTagExists(java.util.Arrays.asList(singularValue)); } + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + */ + private Boolean compartmentIdInSubtree = null; + + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + * @param compartmentIdInSubtree the value to set + * @return this builder instance + */ + public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { + this.compartmentIdInSubtree = compartmentIdInSubtree; + return this; + } + /** * Unique Oracle-assigned identifier for the request. If you need to contact * Oracle about a particular request, please provide the request ID. @@ -611,6 +641,7 @@ public Builder copy(ListExadataConfigurationsRequest o) { freeformTagEquals(o.getFreeformTagEquals()); definedTagExists(o.getDefinedTagExists()); freeformTagExists(o.getFreeformTagExists()); + compartmentIdInSubtree(o.getCompartmentIdInSubtree()); opcRequestId(o.getOpcRequestId()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); @@ -655,9 +686,10 @@ public ListExadataConfigurationsRequest buildWithoutInvocationCallback() { request.freeformTagEquals = freeformTagEquals; request.definedTagExists = definedTagExists; request.freeformTagExists = freeformTagExists; + request.compartmentIdInSubtree = compartmentIdInSubtree; request.opcRequestId = opcRequestId; return request; - // new ListExadataConfigurationsRequest(compartmentId, exadataInsightId, exadataType, limit, page, sortOrder, sortBy, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, opcRequestId); + // new ListExadataConfigurationsRequest(compartmentId, exadataInsightId, exadataType, limit, page, sortOrder, sortBy, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, compartmentIdInSubtree, opcRequestId); } } @@ -678,6 +710,7 @@ public Builder toBuilder() { .freeformTagEquals(freeformTagEquals) .definedTagExists(definedTagExists) .freeformTagExists(freeformTagExists) + .compartmentIdInSubtree(compartmentIdInSubtree) .opcRequestId(opcRequestId); } @@ -705,6 +738,7 @@ public String toString() { sb.append(",freeformTagEquals=").append(String.valueOf(this.freeformTagEquals)); sb.append(",definedTagExists=").append(String.valueOf(this.definedTagExists)); sb.append(",freeformTagExists=").append(String.valueOf(this.freeformTagExists)); + sb.append(",compartmentIdInSubtree=").append(String.valueOf(this.compartmentIdInSubtree)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); sb.append(")"); return sb.toString(); @@ -732,6 +766,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.freeformTagEquals, other.freeformTagEquals) && java.util.Objects.equals(this.definedTagExists, other.definedTagExists) && java.util.Objects.equals(this.freeformTagExists, other.freeformTagExists) + && java.util.Objects.equals( + this.compartmentIdInSubtree, other.compartmentIdInSubtree) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); } @@ -762,6 +798,11 @@ public int hashCode() { result = (result * PRIME) + (this.freeformTagExists == null ? 43 : this.freeformTagExists.hashCode()); + result = + (result * PRIME) + + (this.compartmentIdInSubtree == null + ? 43 + : this.compartmentIdInSubtree.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); return result; } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListHostConfigurationsRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListHostConfigurationsRequest.java index 26c450a2e1a..e7c6f1a9849 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListHostConfigurationsRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListHostConfigurationsRequest.java @@ -333,14 +333,14 @@ public Boolean getCompartmentIdInSubtree() { } /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ public java.util.List getHostType() { @@ -372,6 +372,17 @@ public String getHostId() { public java.util.List getVmclusterName() { return vmclusterName; } + /** + * Resource Status + */ + private java.util.List status; + + /** + * Resource Status + */ + public java.util.List getStatus() { + return status; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -765,14 +776,14 @@ public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType = null; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param hostType the value to set * @return this builder instance @@ -784,7 +795,7 @@ public Builder hostType(java.util.List hostType) { /** * Singular setter. Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param singularValue the singular value to set * @return this builder instance @@ -837,6 +848,30 @@ public Builder vmclusterName(String singularValue) { return this.vmclusterName(java.util.Arrays.asList(singularValue)); } + /** + * Resource Status + */ + private java.util.List status = null; + + /** + * Resource Status + * @param status the value to set + * @return this builder instance + */ + public Builder status(java.util.List status) { + this.status = status; + return this; + } + + /** + * Singular setter. Resource Status + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder status(ResourceStatus singularValue) { + return this.status(java.util.Arrays.asList(singularValue)); + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -883,6 +918,7 @@ public Builder copy(ListHostConfigurationsRequest o) { hostType(o.getHostType()); hostId(o.getHostId()); vmclusterName(o.getVmclusterName()); + status(o.getStatus()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -933,8 +969,9 @@ public ListHostConfigurationsRequest buildWithoutInvocationCallback() { request.hostType = hostType; request.hostId = hostId; request.vmclusterName = vmclusterName; + request.status = status; return request; - // new ListHostConfigurationsRequest(compartmentId, enterpriseManagerBridgeId, id, exadataInsightId, platformType, limit, page, sortOrder, sortBy, opcRequestId, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, compartmentIdInSubtree, hostType, hostId, vmclusterName); + // new ListHostConfigurationsRequest(compartmentId, enterpriseManagerBridgeId, id, exadataInsightId, platformType, limit, page, sortOrder, sortBy, opcRequestId, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, compartmentIdInSubtree, hostType, hostId, vmclusterName, status); } } @@ -961,7 +998,8 @@ public Builder toBuilder() { .compartmentIdInSubtree(compartmentIdInSubtree) .hostType(hostType) .hostId(hostId) - .vmclusterName(vmclusterName); + .vmclusterName(vmclusterName) + .status(status); } /** @@ -996,6 +1034,7 @@ public String toString() { sb.append(",hostType=").append(String.valueOf(this.hostType)); sb.append(",hostId=").append(String.valueOf(this.hostId)); sb.append(",vmclusterName=").append(String.valueOf(this.vmclusterName)); + sb.append(",status=").append(String.valueOf(this.status)); sb.append(")"); return sb.toString(); } @@ -1030,7 +1069,8 @@ public boolean equals(Object o) { this.compartmentIdInSubtree, other.compartmentIdInSubtree) && java.util.Objects.equals(this.hostType, other.hostType) && java.util.Objects.equals(this.hostId, other.hostId) - && java.util.Objects.equals(this.vmclusterName, other.vmclusterName); + && java.util.Objects.equals(this.vmclusterName, other.vmclusterName) + && java.util.Objects.equals(this.status, other.status); } @Override @@ -1077,6 +1117,7 @@ public int hashCode() { result = (result * PRIME) + (this.vmclusterName == null ? 43 : this.vmclusterName.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); return result; } } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListHostInsightsRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListHostInsightsRequest.java index dfb9b0dab9a..9a52c917422 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListHostInsightsRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListHostInsightsRequest.java @@ -59,14 +59,14 @@ public java.util.List getLifecycleStat } /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ public java.util.List getHostType() { @@ -390,14 +390,14 @@ public Builder lifecycleState(LifecycleState singularValue) { /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType = null; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param hostType the value to set * @return this builder instance @@ -409,7 +409,7 @@ public Builder hostType(java.util.List hostType) { /** * Singular setter. Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param singularValue the singular value to set * @return this builder instance diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListHostedEntitiesRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListHostedEntitiesRequest.java index 4d7de326fa5..65edda88cd5 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListHostedEntitiesRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListHostedEntitiesRequest.java @@ -289,14 +289,14 @@ public String getOpcRequestId() { } /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ public java.util.List getHostType() { @@ -315,6 +315,17 @@ public java.util.List getHostType() { public String getHostId() { return hostId; } + /** + * Resource Status + */ + private java.util.List status; + + /** + * Resource Status + */ + public java.util.List getStatus() { + return status; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -580,14 +591,14 @@ public Builder opcRequestId(String opcRequestId) { /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType = null; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param hostType the value to set * @return this builder instance @@ -599,7 +610,7 @@ public Builder hostType(java.util.List hostType) { /** * Singular setter. Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param singularValue the singular value to set * @return this builder instance @@ -625,6 +636,30 @@ public Builder hostId(String hostId) { return this; } + /** + * Resource Status + */ + private java.util.List status = null; + + /** + * Resource Status + * @param status the value to set + * @return this builder instance + */ + public Builder status(java.util.List status) { + this.status = status; + return this; + } + + /** + * Singular setter. Resource Status + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder status(ResourceStatus singularValue) { + return this.status(java.util.Arrays.asList(singularValue)); + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -667,6 +702,7 @@ public Builder copy(ListHostedEntitiesRequest o) { opcRequestId(o.getOpcRequestId()); hostType(o.getHostType()); hostId(o.getHostId()); + status(o.getStatus()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -713,8 +749,9 @@ public ListHostedEntitiesRequest buildWithoutInvocationCallback() { request.opcRequestId = opcRequestId; request.hostType = hostType; request.hostId = hostId; + request.status = status; return request; - // new ListHostedEntitiesRequest(compartmentId, id, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, platformType, exadataInsightId, limit, page, sortOrder, sortBy, opcRequestId, hostType, hostId); + // new ListHostedEntitiesRequest(compartmentId, id, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, platformType, exadataInsightId, limit, page, sortOrder, sortBy, opcRequestId, hostType, hostId, status); } } @@ -737,7 +774,8 @@ public Builder toBuilder() { .sortBy(sortBy) .opcRequestId(opcRequestId) .hostType(hostType) - .hostId(hostId); + .hostId(hostId) + .status(status); } /** @@ -767,6 +805,7 @@ public String toString() { sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); sb.append(",hostType=").append(String.valueOf(this.hostType)); sb.append(",hostId=").append(String.valueOf(this.hostId)); + sb.append(",status=").append(String.valueOf(this.status)); sb.append(")"); return sb.toString(); } @@ -795,7 +834,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.sortBy, other.sortBy) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) && java.util.Objects.equals(this.hostType, other.hostType) - && java.util.Objects.equals(this.hostId, other.hostId); + && java.util.Objects.equals(this.hostId, other.hostId) + && java.util.Objects.equals(this.status, other.status); } @Override @@ -828,6 +868,7 @@ public int hashCode() { result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); result = (result * PRIME) + (this.hostType == null ? 43 : this.hostType.hashCode()); result = (result * PRIME) + (this.hostId == null ? 43 : this.hostId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); return result; } } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListNewsReportsRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListNewsReportsRequest.java index 8f608573e29..777b11460a7 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListNewsReportsRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListNewsReportsRequest.java @@ -23,12 +23,12 @@ public String getCompartmentId() { return compartmentId; } /** - * Unique Operations Insights news report identifier + * Unique Ops Insights news report identifier */ private String newsReportId; /** - * Unique Operations Insights news report identifier + * Unique Ops Insights news report identifier */ public String getNewsReportId() { return newsReportId; @@ -208,12 +208,12 @@ public Builder compartmentId(String compartmentId) { } /** - * Unique Operations Insights news report identifier + * Unique Ops Insights news report identifier */ private String newsReportId = null; /** - * Unique Operations Insights news report identifier + * Unique Ops Insights news report identifier * @param newsReportId the value to set * @return this builder instance */ diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListOperationsInsightsWarehousesRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListOperationsInsightsWarehousesRequest.java index bfc64950f80..8eca7f113a1 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListOperationsInsightsWarehousesRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/ListOperationsInsightsWarehousesRequest.java @@ -35,12 +35,12 @@ public String getDisplayName() { return displayName; } /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ private String id; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ public String getId() { return id; @@ -213,12 +213,12 @@ public Builder displayName(String displayName) { } /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ private String id = null; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier * @param id the value to set * @return this builder instance */ diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/RotateOperationsInsightsWarehouseWalletRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/RotateOperationsInsightsWarehouseWalletRequest.java index 97ebda9d1ea..33047fc155b 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/RotateOperationsInsightsWarehouseWalletRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/RotateOperationsInsightsWarehouseWalletRequest.java @@ -13,12 +13,12 @@ public class RotateOperationsInsightsWarehouseWalletRequest extends com.oracle.bmc.requests.BmcRequest { /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ private String operationsInsightsWarehouseId; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ public String getOperationsInsightsWarehouseId() { return operationsInsightsWarehouseId; @@ -64,12 +64,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ private String operationsInsightsWarehouseId = null; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier * @param operationsInsightsWarehouseId the value to set * @return this builder instance */ diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeAddmDbParametersRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeAddmDbParametersRequest.java index 152f6ed5713..de7ec964efa 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeAddmDbParametersRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeAddmDbParametersRequest.java @@ -145,8 +145,8 @@ public String getNameOrValueContains() { * **/ public enum IsChanged { - True("true"), - False("false"), + True("TRUE"), + False("FALSE"), ; private final String value; @@ -198,8 +198,8 @@ public IsChanged getIsChanged() { * **/ public enum IsDefault { - True("true"), - False("false"), + True("TRUE"), + False("FALSE"), ; private final String value; @@ -251,8 +251,8 @@ public IsDefault getIsDefault() { * **/ public enum HasRecommendations { - True("true"), - False("false"), + True("TRUE"), + False("FALSE"), ; private final String value; diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceCapacityTrendRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceCapacityTrendRequest.java index f9a6f7c3483..d9d8cc32560 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceCapacityTrendRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceCapacityTrendRequest.java @@ -125,6 +125,10 @@ public enum DatabaseType { ComanagedExacsCdb("COMANAGED-EXACS-CDB"), ComanagedExacsPdb("COMANAGED-EXACS-PDB"), ComanagedExacsNoncdb("COMANAGED-EXACS-NONCDB"), + ComanagedExaccCdb("COMANAGED-EXACC-CDB"), + ComanagedExaccPdb("COMANAGED-EXACC-PDB"), + ComanagedExaccNoncdb("COMANAGED-EXACC-NONCDB"), + MdsMysql("MDS-MYSQL"), ; private final String value; diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceForecastTrendRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceForecastTrendRequest.java index ade55d9912a..e58ab5f4522 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceForecastTrendRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceForecastTrendRequest.java @@ -125,6 +125,10 @@ public enum DatabaseType { ComanagedExacsCdb("COMANAGED-EXACS-CDB"), ComanagedExacsPdb("COMANAGED-EXACS-PDB"), ComanagedExacsNoncdb("COMANAGED-EXACS-NONCDB"), + ComanagedExaccCdb("COMANAGED-EXACC-CDB"), + ComanagedExaccPdb("COMANAGED-EXACC-PDB"), + ComanagedExaccNoncdb("COMANAGED-EXACC-NONCDB"), + MdsMysql("MDS-MYSQL"), ; private final String value; diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceStatisticsRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceStatisticsRequest.java index a6b3df18edb..5714e8a08fe 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceStatisticsRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceStatisticsRequest.java @@ -125,6 +125,10 @@ public enum DatabaseType { ComanagedExacsCdb("COMANAGED-EXACS-CDB"), ComanagedExacsPdb("COMANAGED-EXACS-PDB"), ComanagedExacsNoncdb("COMANAGED-EXACS-NONCDB"), + ComanagedExaccCdb("COMANAGED-EXACC-CDB"), + ComanagedExaccPdb("COMANAGED-EXACC-PDB"), + ComanagedExaccNoncdb("COMANAGED-EXACC-NONCDB"), + MdsMysql("MDS-MYSQL"), ; private final String value; diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceUsageRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceUsageRequest.java index 06c23f63aeb..302e434a14b 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceUsageRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceUsageRequest.java @@ -125,6 +125,10 @@ public enum DatabaseType { ComanagedExacsCdb("COMANAGED-EXACS-CDB"), ComanagedExacsPdb("COMANAGED-EXACS-PDB"), ComanagedExacsNoncdb("COMANAGED-EXACS-NONCDB"), + ComanagedExaccCdb("COMANAGED-EXACC-CDB"), + ComanagedExaccPdb("COMANAGED-EXACC-PDB"), + ComanagedExaccNoncdb("COMANAGED-EXACC-NONCDB"), + MdsMysql("MDS-MYSQL"), ; private final String value; diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceUsageTrendRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceUsageTrendRequest.java index 593da691f88..f579564f245 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceUsageTrendRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceUsageTrendRequest.java @@ -125,6 +125,10 @@ public enum DatabaseType { ComanagedExacsCdb("COMANAGED-EXACS-CDB"), ComanagedExacsPdb("COMANAGED-EXACS-PDB"), ComanagedExacsNoncdb("COMANAGED-EXACS-NONCDB"), + ComanagedExaccCdb("COMANAGED-EXACC-CDB"), + ComanagedExaccPdb("COMANAGED-EXACC-PDB"), + ComanagedExaccNoncdb("COMANAGED-EXACC-NONCDB"), + MdsMysql("MDS-MYSQL"), ; private final String value; diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceUtilizationInsightRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceUtilizationInsightRequest.java index 259f42f9a18..34a41e46436 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceUtilizationInsightRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeDatabaseInsightResourceUtilizationInsightRequest.java @@ -125,6 +125,10 @@ public enum DatabaseType { ComanagedExacsCdb("COMANAGED-EXACS-CDB"), ComanagedExacsPdb("COMANAGED-EXACS-PDB"), ComanagedExacsNoncdb("COMANAGED-EXACS-NONCDB"), + ComanagedExaccCdb("COMANAGED-EXACC-CDB"), + ComanagedExaccPdb("COMANAGED-EXACC-PDB"), + ComanagedExaccNoncdb("COMANAGED-EXACC-NONCDB"), + MdsMysql("MDS-MYSQL"), ; private final String value; diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeExadataInsightResourceCapacityTrendAggregatedRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeExadataInsightResourceCapacityTrendAggregatedRequest.java index c65498feee8..f80ff6b7501 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeExadataInsightResourceCapacityTrendAggregatedRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeExadataInsightResourceCapacityTrendAggregatedRequest.java @@ -324,6 +324,19 @@ public java.util.List getDefinedTagExists() { public java.util.List getFreeformTagExists() { return freeformTagExists; } + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + */ + private Boolean compartmentIdInSubtree; + + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + */ + public Boolean getCompartmentIdInSubtree() { + return compartmentIdInSubtree; + } /** * Unique Oracle-assigned identifier for the request. If you need to contact * Oracle about a particular request, please provide the request ID. @@ -784,6 +797,23 @@ public Builder freeformTagExists(String singularValue) { return this.freeformTagExists(java.util.Arrays.asList(singularValue)); } + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + */ + private Boolean compartmentIdInSubtree = null; + + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + * @param compartmentIdInSubtree the value to set + * @return this builder instance + */ + public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { + this.compartmentIdInSubtree = compartmentIdInSubtree; + return this; + } + /** * Unique Oracle-assigned identifier for the request. If you need to contact * Oracle about a particular request, please provide the request ID. @@ -848,6 +878,7 @@ public Builder copy(SummarizeExadataInsightResourceCapacityTrendAggregatedReques freeformTagEquals(o.getFreeformTagEquals()); definedTagExists(o.getDefinedTagExists()); freeformTagExists(o.getFreeformTagExists()); + compartmentIdInSubtree(o.getCompartmentIdInSubtree()); opcRequestId(o.getOpcRequestId()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); @@ -901,9 +932,10 @@ public SummarizeExadataInsightResourceCapacityTrendAggregatedRequest build() { request.freeformTagEquals = freeformTagEquals; request.definedTagExists = definedTagExists; request.freeformTagExists = freeformTagExists; + request.compartmentIdInSubtree = compartmentIdInSubtree; request.opcRequestId = opcRequestId; return request; - // new SummarizeExadataInsightResourceCapacityTrendAggregatedRequest(resourceType, resourceMetric, compartmentId, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, exadataInsightId, exadataType, cdbName, hostName, page, sortOrder, sortBy, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, opcRequestId); + // new SummarizeExadataInsightResourceCapacityTrendAggregatedRequest(resourceType, resourceMetric, compartmentId, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, exadataInsightId, exadataType, cdbName, hostName, page, sortOrder, sortBy, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, compartmentIdInSubtree, opcRequestId); } } @@ -930,6 +962,7 @@ public Builder toBuilder() { .freeformTagEquals(freeformTagEquals) .definedTagExists(definedTagExists) .freeformTagExists(freeformTagExists) + .compartmentIdInSubtree(compartmentIdInSubtree) .opcRequestId(opcRequestId); } @@ -963,6 +996,7 @@ public String toString() { sb.append(",freeformTagEquals=").append(String.valueOf(this.freeformTagEquals)); sb.append(",definedTagExists=").append(String.valueOf(this.definedTagExists)); sb.append(",freeformTagExists=").append(String.valueOf(this.freeformTagExists)); + sb.append(",compartmentIdInSubtree=").append(String.valueOf(this.compartmentIdInSubtree)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); sb.append(")"); return sb.toString(); @@ -997,6 +1031,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.freeformTagEquals, other.freeformTagEquals) && java.util.Objects.equals(this.definedTagExists, other.definedTagExists) && java.util.Objects.equals(this.freeformTagExists, other.freeformTagExists) + && java.util.Objects.equals( + this.compartmentIdInSubtree, other.compartmentIdInSubtree) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); } @@ -1043,6 +1079,11 @@ public int hashCode() { result = (result * PRIME) + (this.freeformTagExists == null ? 43 : this.freeformTagExists.hashCode()); + result = + (result * PRIME) + + (this.compartmentIdInSubtree == null + ? 43 + : this.compartmentIdInSubtree.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); return result; } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeExadataInsightResourceForecastTrendAggregatedRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeExadataInsightResourceForecastTrendAggregatedRequest.java index 4b4daa04f26..38ad13fdf40 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeExadataInsightResourceForecastTrendAggregatedRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeExadataInsightResourceForecastTrendAggregatedRequest.java @@ -418,6 +418,19 @@ public java.util.List getDefinedTagExists() { public java.util.List getFreeformTagExists() { return freeformTagExists; } + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + */ + private Boolean compartmentIdInSubtree; + + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + */ + public Boolean getCompartmentIdInSubtree() { + return compartmentIdInSubtree; + } /** * Unique Oracle-assigned identifier for the request. If you need to contact * Oracle about a particular request, please provide the request ID. @@ -943,6 +956,23 @@ public Builder freeformTagExists(String singularValue) { return this.freeformTagExists(java.util.Arrays.asList(singularValue)); } + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + */ + private Boolean compartmentIdInSubtree = null; + + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + * @param compartmentIdInSubtree the value to set + * @return this builder instance + */ + public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { + this.compartmentIdInSubtree = compartmentIdInSubtree; + return this; + } + /** * Unique Oracle-assigned identifier for the request. If you need to contact * Oracle about a particular request, please provide the request ID. @@ -1010,6 +1040,7 @@ public Builder copy(SummarizeExadataInsightResourceForecastTrendAggregatedReques freeformTagEquals(o.getFreeformTagEquals()); definedTagExists(o.getDefinedTagExists()); freeformTagExists(o.getFreeformTagExists()); + compartmentIdInSubtree(o.getCompartmentIdInSubtree()); opcRequestId(o.getOpcRequestId()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); @@ -1066,9 +1097,10 @@ public SummarizeExadataInsightResourceForecastTrendAggregatedRequest build() { request.freeformTagEquals = freeformTagEquals; request.definedTagExists = definedTagExists; request.freeformTagExists = freeformTagExists; + request.compartmentIdInSubtree = compartmentIdInSubtree; request.opcRequestId = opcRequestId; return request; - // new SummarizeExadataInsightResourceForecastTrendAggregatedRequest(resourceType, resourceMetric, compartmentId, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, exadataInsightId, exadataType, statistic, forecastStartDay, forecastDays, forecastModel, cdbName, hostName, confidence, page, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, opcRequestId); + // new SummarizeExadataInsightResourceForecastTrendAggregatedRequest(resourceType, resourceMetric, compartmentId, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, exadataInsightId, exadataType, statistic, forecastStartDay, forecastDays, forecastModel, cdbName, hostName, confidence, page, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, compartmentIdInSubtree, opcRequestId); } } @@ -1098,6 +1130,7 @@ public Builder toBuilder() { .freeformTagEquals(freeformTagEquals) .definedTagExists(definedTagExists) .freeformTagExists(freeformTagExists) + .compartmentIdInSubtree(compartmentIdInSubtree) .opcRequestId(opcRequestId); } @@ -1134,6 +1167,7 @@ public String toString() { sb.append(",freeformTagEquals=").append(String.valueOf(this.freeformTagEquals)); sb.append(",definedTagExists=").append(String.valueOf(this.definedTagExists)); sb.append(",freeformTagExists=").append(String.valueOf(this.freeformTagExists)); + sb.append(",compartmentIdInSubtree=").append(String.valueOf(this.compartmentIdInSubtree)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); sb.append(")"); return sb.toString(); @@ -1171,6 +1205,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.freeformTagEquals, other.freeformTagEquals) && java.util.Objects.equals(this.definedTagExists, other.definedTagExists) && java.util.Objects.equals(this.freeformTagExists, other.freeformTagExists) + && java.util.Objects.equals( + this.compartmentIdInSubtree, other.compartmentIdInSubtree) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); } @@ -1224,6 +1260,11 @@ public int hashCode() { result = (result * PRIME) + (this.freeformTagExists == null ? 43 : this.freeformTagExists.hashCode()); + result = + (result * PRIME) + + (this.compartmentIdInSubtree == null + ? 43 + : this.compartmentIdInSubtree.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); return result; } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeExadataInsightResourceUsageAggregatedRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeExadataInsightResourceUsageAggregatedRequest.java index 6354d5c18ed..e2842b114b7 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeExadataInsightResourceUsageAggregatedRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeExadataInsightResourceUsageAggregatedRequest.java @@ -274,6 +274,19 @@ public java.util.List getDefinedTagExists() { public java.util.List getFreeformTagExists() { return freeformTagExists; } + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + */ + private Boolean compartmentIdInSubtree; + + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + */ + public Boolean getCompartmentIdInSubtree() { + return compartmentIdInSubtree; + } /** * Unique Oracle-assigned identifier for the request. If you need to contact * Oracle about a particular request, please provide the request ID. @@ -717,6 +730,23 @@ public Builder freeformTagExists(String singularValue) { return this.freeformTagExists(java.util.Arrays.asList(singularValue)); } + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + */ + private Boolean compartmentIdInSubtree = null; + + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + * @param compartmentIdInSubtree the value to set + * @return this builder instance + */ + public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { + this.compartmentIdInSubtree = compartmentIdInSubtree; + return this; + } + /** * Unique Oracle-assigned identifier for the request. If you need to contact * Oracle about a particular request, please provide the request ID. @@ -780,6 +810,7 @@ public Builder copy(SummarizeExadataInsightResourceUsageAggregatedRequest o) { freeformTagEquals(o.getFreeformTagEquals()); definedTagExists(o.getDefinedTagExists()); freeformTagExists(o.getFreeformTagExists()); + compartmentIdInSubtree(o.getCompartmentIdInSubtree()); opcRequestId(o.getOpcRequestId()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); @@ -832,9 +863,10 @@ public SummarizeExadataInsightResourceUsageAggregatedRequest build() { request.freeformTagEquals = freeformTagEquals; request.definedTagExists = definedTagExists; request.freeformTagExists = freeformTagExists; + request.compartmentIdInSubtree = compartmentIdInSubtree; request.opcRequestId = opcRequestId; return request; - // new SummarizeExadataInsightResourceUsageAggregatedRequest(compartmentId, resourceType, resourceMetric, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, exadataInsightId, exadataType, cdbName, hostName, page, percentile, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, opcRequestId); + // new SummarizeExadataInsightResourceUsageAggregatedRequest(compartmentId, resourceType, resourceMetric, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, exadataInsightId, exadataType, cdbName, hostName, page, percentile, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, compartmentIdInSubtree, opcRequestId); } } @@ -860,6 +892,7 @@ public Builder toBuilder() { .freeformTagEquals(freeformTagEquals) .definedTagExists(definedTagExists) .freeformTagExists(freeformTagExists) + .compartmentIdInSubtree(compartmentIdInSubtree) .opcRequestId(opcRequestId); } @@ -892,6 +925,7 @@ public String toString() { sb.append(",freeformTagEquals=").append(String.valueOf(this.freeformTagEquals)); sb.append(",definedTagExists=").append(String.valueOf(this.definedTagExists)); sb.append(",freeformTagExists=").append(String.valueOf(this.freeformTagExists)); + sb.append(",compartmentIdInSubtree=").append(String.valueOf(this.compartmentIdInSubtree)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); sb.append(")"); return sb.toString(); @@ -925,6 +959,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.freeformTagEquals, other.freeformTagEquals) && java.util.Objects.equals(this.definedTagExists, other.definedTagExists) && java.util.Objects.equals(this.freeformTagExists, other.freeformTagExists) + && java.util.Objects.equals( + this.compartmentIdInSubtree, other.compartmentIdInSubtree) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); } @@ -970,6 +1006,11 @@ public int hashCode() { result = (result * PRIME) + (this.freeformTagExists == null ? 43 : this.freeformTagExists.hashCode()); + result = + (result * PRIME) + + (this.compartmentIdInSubtree == null + ? 43 + : this.compartmentIdInSubtree.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); return result; } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeExadataInsightResourceUsageRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeExadataInsightResourceUsageRequest.java index d192d47f278..d129014695c 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeExadataInsightResourceUsageRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeExadataInsightResourceUsageRequest.java @@ -360,6 +360,19 @@ public java.util.List getDefinedTagExists() { public java.util.List getFreeformTagExists() { return freeformTagExists; } + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + */ + private Boolean compartmentIdInSubtree; + + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + */ + public Boolean getCompartmentIdInSubtree() { + return compartmentIdInSubtree; + } /** * Unique Oracle-assigned identifier for the request. If you need to contact * Oracle about a particular request, please provide the request ID. @@ -862,6 +875,23 @@ public Builder freeformTagExists(String singularValue) { return this.freeformTagExists(java.util.Arrays.asList(singularValue)); } + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + */ + private Boolean compartmentIdInSubtree = null; + + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + * @param compartmentIdInSubtree the value to set + * @return this builder instance + */ + public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { + this.compartmentIdInSubtree = compartmentIdInSubtree; + return this; + } + /** * Unique Oracle-assigned identifier for the request. If you need to contact * Oracle about a particular request, please provide the request ID. @@ -928,6 +958,7 @@ public Builder copy(SummarizeExadataInsightResourceUsageRequest o) { freeformTagEquals(o.getFreeformTagEquals()); definedTagExists(o.getDefinedTagExists()); freeformTagExists(o.getFreeformTagExists()); + compartmentIdInSubtree(o.getCompartmentIdInSubtree()); opcRequestId(o.getOpcRequestId()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); @@ -981,9 +1012,10 @@ public SummarizeExadataInsightResourceUsageRequest buildWithoutInvocationCallbac request.freeformTagEquals = freeformTagEquals; request.definedTagExists = definedTagExists; request.freeformTagExists = freeformTagExists; + request.compartmentIdInSubtree = compartmentIdInSubtree; request.opcRequestId = opcRequestId; return request; - // new SummarizeExadataInsightResourceUsageRequest(compartmentId, resourceType, resourceMetric, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, exadataInsightId, exadataType, cdbName, hostName, sortOrder, sortBy, page, limit, percentile, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, opcRequestId); + // new SummarizeExadataInsightResourceUsageRequest(compartmentId, resourceType, resourceMetric, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, exadataInsightId, exadataType, cdbName, hostName, sortOrder, sortBy, page, limit, percentile, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, compartmentIdInSubtree, opcRequestId); } } @@ -1012,6 +1044,7 @@ public Builder toBuilder() { .freeformTagEquals(freeformTagEquals) .definedTagExists(definedTagExists) .freeformTagExists(freeformTagExists) + .compartmentIdInSubtree(compartmentIdInSubtree) .opcRequestId(opcRequestId); } @@ -1047,6 +1080,7 @@ public String toString() { sb.append(",freeformTagEquals=").append(String.valueOf(this.freeformTagEquals)); sb.append(",definedTagExists=").append(String.valueOf(this.definedTagExists)); sb.append(",freeformTagExists=").append(String.valueOf(this.freeformTagExists)); + sb.append(",compartmentIdInSubtree=").append(String.valueOf(this.compartmentIdInSubtree)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); sb.append(")"); return sb.toString(); @@ -1083,6 +1117,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.freeformTagEquals, other.freeformTagEquals) && java.util.Objects.equals(this.definedTagExists, other.definedTagExists) && java.util.Objects.equals(this.freeformTagExists, other.freeformTagExists) + && java.util.Objects.equals( + this.compartmentIdInSubtree, other.compartmentIdInSubtree) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); } @@ -1131,6 +1167,11 @@ public int hashCode() { result = (result * PRIME) + (this.freeformTagExists == null ? 43 : this.freeformTagExists.hashCode()); + result = + (result * PRIME) + + (this.compartmentIdInSubtree == null + ? 43 + : this.compartmentIdInSubtree.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); return result; } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeExadataInsightResourceUtilizationInsightRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeExadataInsightResourceUtilizationInsightRequest.java index 015be383d99..6342c3733ad 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeExadataInsightResourceUtilizationInsightRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeExadataInsightResourceUtilizationInsightRequest.java @@ -308,6 +308,19 @@ public java.util.List getDefinedTagExists() { public java.util.List getFreeformTagExists() { return freeformTagExists; } + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + */ + private Boolean compartmentIdInSubtree; + + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + */ + public Boolean getCompartmentIdInSubtree() { + return compartmentIdInSubtree; + } /** * Unique Oracle-assigned identifier for the request. If you need to contact * Oracle about a particular request, please provide the request ID. @@ -793,6 +806,23 @@ public Builder freeformTagExists(String singularValue) { return this.freeformTagExists(java.util.Arrays.asList(singularValue)); } + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + */ + private Boolean compartmentIdInSubtree = null; + + /** + * A flag to search all resources within a given compartment and all sub-compartments. + * + * @param compartmentIdInSubtree the value to set + * @return this builder instance + */ + public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { + this.compartmentIdInSubtree = compartmentIdInSubtree; + return this; + } + /** * Unique Oracle-assigned identifier for the request. If you need to contact * Oracle about a particular request, please provide the request ID. @@ -858,6 +888,7 @@ public Builder copy(SummarizeExadataInsightResourceUtilizationInsightRequest o) freeformTagEquals(o.getFreeformTagEquals()); definedTagExists(o.getDefinedTagExists()); freeformTagExists(o.getFreeformTagExists()); + compartmentIdInSubtree(o.getCompartmentIdInSubtree()); opcRequestId(o.getOpcRequestId()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); @@ -912,9 +943,10 @@ public SummarizeExadataInsightResourceUtilizationInsightRequest build() { request.freeformTagEquals = freeformTagEquals; request.definedTagExists = definedTagExists; request.freeformTagExists = freeformTagExists; + request.compartmentIdInSubtree = compartmentIdInSubtree; request.opcRequestId = opcRequestId; return request; - // new SummarizeExadataInsightResourceUtilizationInsightRequest(compartmentId, resourceType, resourceMetric, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, exadataInsightId, exadataType, forecastStartDay, forecastDays, cdbName, hostName, limit, page, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, opcRequestId); + // new SummarizeExadataInsightResourceUtilizationInsightRequest(compartmentId, resourceType, resourceMetric, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, exadataInsightId, exadataType, forecastStartDay, forecastDays, cdbName, hostName, limit, page, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, compartmentIdInSubtree, opcRequestId); } } @@ -942,6 +974,7 @@ public Builder toBuilder() { .freeformTagEquals(freeformTagEquals) .definedTagExists(definedTagExists) .freeformTagExists(freeformTagExists) + .compartmentIdInSubtree(compartmentIdInSubtree) .opcRequestId(opcRequestId); } @@ -976,6 +1009,7 @@ public String toString() { sb.append(",freeformTagEquals=").append(String.valueOf(this.freeformTagEquals)); sb.append(",definedTagExists=").append(String.valueOf(this.definedTagExists)); sb.append(",freeformTagExists=").append(String.valueOf(this.freeformTagExists)); + sb.append(",compartmentIdInSubtree=").append(String.valueOf(this.compartmentIdInSubtree)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); sb.append(")"); return sb.toString(); @@ -1011,6 +1045,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.freeformTagEquals, other.freeformTagEquals) && java.util.Objects.equals(this.definedTagExists, other.definedTagExists) && java.util.Objects.equals(this.freeformTagExists, other.freeformTagExists) + && java.util.Objects.equals( + this.compartmentIdInSubtree, other.compartmentIdInSubtree) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); } @@ -1060,6 +1096,11 @@ public int hashCode() { result = (result * PRIME) + (this.freeformTagExists == null ? 43 : this.freeformTagExists.hashCode()); + result = + (result * PRIME) + + (this.compartmentIdInSubtree == null + ? 43 + : this.compartmentIdInSubtree.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); return result; } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightDiskStatisticsRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightDiskStatisticsRequest.java index 6ca88fbb64d..62a9383b023 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightDiskStatisticsRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightDiskStatisticsRequest.java @@ -170,6 +170,17 @@ public Statistic getStatistic() { public String getOpcRequestId() { return opcRequestId; } + /** + * Resource Status + */ + private java.util.List status; + + /** + * Resource Status + */ + public java.util.List getStatus() { + return status; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -332,6 +343,30 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Resource Status + */ + private java.util.List status = null; + + /** + * Resource Status + * @param status the value to set + * @return this builder instance + */ + public Builder status(java.util.List status) { + this.status = status; + return this; + } + + /** + * Singular setter. Resource Status + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder status(ResourceStatus singularValue) { + return this.status(java.util.Arrays.asList(singularValue)); + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -368,6 +403,7 @@ public Builder copy(SummarizeHostInsightDiskStatisticsRequest o) { hostId(o.getHostId()); statistic(o.getStatistic()); opcRequestId(o.getOpcRequestId()); + status(o.getStatus()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -409,8 +445,9 @@ public SummarizeHostInsightDiskStatisticsRequest buildWithoutInvocationCallback( request.hostId = hostId; request.statistic = statistic; request.opcRequestId = opcRequestId; + request.status = status; return request; - // new SummarizeHostInsightDiskStatisticsRequest(compartmentId, id, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, hostId, statistic, opcRequestId); + // new SummarizeHostInsightDiskStatisticsRequest(compartmentId, id, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, hostId, statistic, opcRequestId, status); } } @@ -427,7 +464,8 @@ public Builder toBuilder() { .timeIntervalEnd(timeIntervalEnd) .hostId(hostId) .statistic(statistic) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .status(status); } /** @@ -451,6 +489,7 @@ public String toString() { sb.append(",hostId=").append(String.valueOf(this.hostId)); sb.append(",statistic=").append(String.valueOf(this.statistic)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",status=").append(String.valueOf(this.status)); sb.append(")"); return sb.toString(); } @@ -474,7 +513,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeIntervalEnd, other.timeIntervalEnd) && java.util.Objects.equals(this.hostId, other.hostId) && java.util.Objects.equals(this.statistic, other.statistic) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.status, other.status); } @Override @@ -499,6 +539,7 @@ public int hashCode() { result = (result * PRIME) + (this.hostId == null ? 43 : this.hostId.hashCode()); result = (result * PRIME) + (this.statistic == null ? 43 : this.statistic.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); return result; } } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightIoUsageTrendRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightIoUsageTrendRequest.java new file mode 100644 index 00000000000..352b60a83fa --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightIoUsageTrendRequest.java @@ -0,0 +1,640 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.requests; + +import com.oracle.bmc.opsi.model.*; +/** + * Example: Click here to see how to use SummarizeHostInsightIoUsageTrendRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +public class SummarizeHostInsightIoUsageTrendRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * Required [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host insight resource. + * + */ + private String id; + + /** + * Required [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host insight resource. + * + */ + public String getId() { + return id; + } + /** + * Specify time period in ISO 8601 format with respect to current time. + * Default is last 30 days represented by P30D. + * If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. + * Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M). + * + */ + private String analysisTimeInterval; + + /** + * Specify time period in ISO 8601 format with respect to current time. + * Default is last 30 days represented by P30D. + * If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. + * Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M). + * + */ + public String getAnalysisTimeInterval() { + return analysisTimeInterval; + } + /** + * Analysis start time in UTC in ISO 8601 format(inclusive). + * Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + * The minimum allowed value is 2 years prior to the current day. + * timeIntervalStart and timeIntervalEnd parameters are used together. + * If analysisTimeInterval is specified, this parameter is ignored. + * + */ + private java.util.Date timeIntervalStart; + + /** + * Analysis start time in UTC in ISO 8601 format(inclusive). + * Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + * The minimum allowed value is 2 years prior to the current day. + * timeIntervalStart and timeIntervalEnd parameters are used together. + * If analysisTimeInterval is specified, this parameter is ignored. + * + */ + public java.util.Date getTimeIntervalStart() { + return timeIntervalStart; + } + /** + * Analysis end time in UTC in ISO 8601 format(exclusive). + * Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + * timeIntervalStart and timeIntervalEnd are used together. + * If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + * + */ + private java.util.Date timeIntervalEnd; + + /** + * Analysis end time in UTC in ISO 8601 format(exclusive). + * Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + * timeIntervalStart and timeIntervalEnd are used together. + * If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + * + */ + public java.util.Date getTimeIntervalEnd() { + return timeIntervalEnd; + } + /** + * Optional [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host (Compute Id) + * + */ + private String hostId; + + /** + * Optional [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host (Compute Id) + * + */ + public String getHostId() { + return hostId; + } + /** + * For list pagination. The value of the {@code opc-next-page} response header from + * the previous "List" call. For important details about how pagination works, + * see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * For list pagination. The value of the {@code opc-next-page} response header from + * the previous "List" call. For important details about how pagination works, + * see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * For list pagination. The maximum number of results per page, or items to + * return in a paginated "List" call. + * For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * Example: {@code 50} + * + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to + * return in a paginated "List" call. + * For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * Example: {@code 50} + * + */ + public Integer getLimit() { + return limit; + } + /** + * Choose the type of statistic metric data to be used for forecasting. + */ + private Statistic statistic; + + /** + * Choose the type of statistic metric data to be used for forecasting. + **/ + public enum Statistic { + Avg("AVG"), + Max("MAX"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Statistic v : Statistic.values()) { + map.put(v.getValue(), v); + } + } + + Statistic(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Statistic create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid Statistic: " + key); + } + }; + + /** + * Choose the type of statistic metric data to be used for forecasting. + */ + public Statistic getStatistic() { + return statistic; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * Resource Status + */ + private java.util.List status; + + /** + * Resource Status + */ + public java.util.List getStatus() { + return status; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + SummarizeHostInsightIoUsageTrendRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * Required [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host insight resource. + * + */ + private String id = null; + + /** + * Required [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host insight resource. + * + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * Specify time period in ISO 8601 format with respect to current time. + * Default is last 30 days represented by P30D. + * If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. + * Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M). + * + */ + private String analysisTimeInterval = null; + + /** + * Specify time period in ISO 8601 format with respect to current time. + * Default is last 30 days represented by P30D. + * If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. + * Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M). + * + * @param analysisTimeInterval the value to set + * @return this builder instance + */ + public Builder analysisTimeInterval(String analysisTimeInterval) { + this.analysisTimeInterval = analysisTimeInterval; + return this; + } + + /** + * Analysis start time in UTC in ISO 8601 format(inclusive). + * Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + * The minimum allowed value is 2 years prior to the current day. + * timeIntervalStart and timeIntervalEnd parameters are used together. + * If analysisTimeInterval is specified, this parameter is ignored. + * + */ + private java.util.Date timeIntervalStart = null; + + /** + * Analysis start time in UTC in ISO 8601 format(inclusive). + * Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + * The minimum allowed value is 2 years prior to the current day. + * timeIntervalStart and timeIntervalEnd parameters are used together. + * If analysisTimeInterval is specified, this parameter is ignored. + * + * @param timeIntervalStart the value to set + * @return this builder instance + */ + public Builder timeIntervalStart(java.util.Date timeIntervalStart) { + this.timeIntervalStart = timeIntervalStart; + return this; + } + + /** + * Analysis end time in UTC in ISO 8601 format(exclusive). + * Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + * timeIntervalStart and timeIntervalEnd are used together. + * If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + * + */ + private java.util.Date timeIntervalEnd = null; + + /** + * Analysis end time in UTC in ISO 8601 format(exclusive). + * Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + * timeIntervalStart and timeIntervalEnd are used together. + * If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + * + * @param timeIntervalEnd the value to set + * @return this builder instance + */ + public Builder timeIntervalEnd(java.util.Date timeIntervalEnd) { + this.timeIntervalEnd = timeIntervalEnd; + return this; + } + + /** + * Optional [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host (Compute Id) + * + */ + private String hostId = null; + + /** + * Optional [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host (Compute Id) + * + * @param hostId the value to set + * @return this builder instance + */ + public Builder hostId(String hostId) { + this.hostId = hostId; + return this; + } + + /** + * For list pagination. The value of the {@code opc-next-page} response header from + * the previous "List" call. For important details about how pagination works, + * see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page = null; + + /** + * For list pagination. The value of the {@code opc-next-page} response header from + * the previous "List" call. For important details about how pagination works, + * see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to + * return in a paginated "List" call. + * For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * Example: {@code 50} + * + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to + * return in a paginated "List" call. + * For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + * Example: {@code 50} + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Choose the type of statistic metric data to be used for forecasting. + */ + private Statistic statistic = null; + + /** + * Choose the type of statistic metric data to be used for forecasting. + * @param statistic the value to set + * @return this builder instance + */ + public Builder statistic(Statistic statistic) { + this.statistic = statistic; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Resource Status + */ + private java.util.List status = null; + + /** + * Resource Status + * @param status the value to set + * @return this builder instance + */ + public Builder status(java.util.List status) { + this.status = status; + return this; + } + + /** + * Singular setter. Resource Status + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder status(ResourceStatus singularValue) { + return this.status(java.util.Arrays.asList(singularValue)); + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SummarizeHostInsightIoUsageTrendRequest o) { + compartmentId(o.getCompartmentId()); + id(o.getId()); + analysisTimeInterval(o.getAnalysisTimeInterval()); + timeIntervalStart(o.getTimeIntervalStart()); + timeIntervalEnd(o.getTimeIntervalEnd()); + hostId(o.getHostId()); + page(o.getPage()); + limit(o.getLimit()); + statistic(o.getStatistic()); + opcRequestId(o.getOpcRequestId()); + status(o.getStatus()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of SummarizeHostInsightIoUsageTrendRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of SummarizeHostInsightIoUsageTrendRequest + */ + public SummarizeHostInsightIoUsageTrendRequest build() { + SummarizeHostInsightIoUsageTrendRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of SummarizeHostInsightIoUsageTrendRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of SummarizeHostInsightIoUsageTrendRequest + */ + public SummarizeHostInsightIoUsageTrendRequest buildWithoutInvocationCallback() { + SummarizeHostInsightIoUsageTrendRequest request = + new SummarizeHostInsightIoUsageTrendRequest(); + request.compartmentId = compartmentId; + request.id = id; + request.analysisTimeInterval = analysisTimeInterval; + request.timeIntervalStart = timeIntervalStart; + request.timeIntervalEnd = timeIntervalEnd; + request.hostId = hostId; + request.page = page; + request.limit = limit; + request.statistic = statistic; + request.opcRequestId = opcRequestId; + request.status = status; + return request; + // new SummarizeHostInsightIoUsageTrendRequest(compartmentId, id, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, hostId, page, limit, statistic, opcRequestId, status); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .id(id) + .analysisTimeInterval(analysisTimeInterval) + .timeIntervalStart(timeIntervalStart) + .timeIntervalEnd(timeIntervalEnd) + .hostId(hostId) + .page(page) + .limit(limit) + .statistic(statistic) + .opcRequestId(opcRequestId) + .status(status); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",analysisTimeInterval=").append(String.valueOf(this.analysisTimeInterval)); + sb.append(",timeIntervalStart=").append(String.valueOf(this.timeIntervalStart)); + sb.append(",timeIntervalEnd=").append(String.valueOf(this.timeIntervalEnd)); + sb.append(",hostId=").append(String.valueOf(this.hostId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",statistic=").append(String.valueOf(this.statistic)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",status=").append(String.valueOf(this.status)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SummarizeHostInsightIoUsageTrendRequest)) { + return false; + } + + SummarizeHostInsightIoUsageTrendRequest other = (SummarizeHostInsightIoUsageTrendRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.analysisTimeInterval, other.analysisTimeInterval) + && java.util.Objects.equals(this.timeIntervalStart, other.timeIntervalStart) + && java.util.Objects.equals(this.timeIntervalEnd, other.timeIntervalEnd) + && java.util.Objects.equals(this.hostId, other.hostId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.statistic, other.statistic) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.status, other.status); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.analysisTimeInterval == null + ? 43 + : this.analysisTimeInterval.hashCode()); + result = + (result * PRIME) + + (this.timeIntervalStart == null ? 43 : this.timeIntervalStart.hashCode()); + result = + (result * PRIME) + + (this.timeIntervalEnd == null ? 43 : this.timeIntervalEnd.hashCode()); + result = (result * PRIME) + (this.hostId == null ? 43 : this.hostId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.statistic == null ? 43 : this.statistic.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightNetworkUsageTrendRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightNetworkUsageTrendRequest.java index 5325aa641cc..c9260daf001 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightNetworkUsageTrendRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightNetworkUsageTrendRequest.java @@ -208,6 +208,17 @@ public Statistic getStatistic() { public String getOpcRequestId() { return opcRequestId; } + /** + * Resource Status + */ + private java.util.List status; + + /** + * Resource Status + */ + public java.util.List getStatus() { + return status; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -416,6 +427,30 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Resource Status + */ + private java.util.List status = null; + + /** + * Resource Status + * @param status the value to set + * @return this builder instance + */ + public Builder status(java.util.List status) { + this.status = status; + return this; + } + + /** + * Singular setter. Resource Status + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder status(ResourceStatus singularValue) { + return this.status(java.util.Arrays.asList(singularValue)); + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -454,6 +489,7 @@ public Builder copy(SummarizeHostInsightNetworkUsageTrendRequest o) { limit(o.getLimit()); statistic(o.getStatistic()); opcRequestId(o.getOpcRequestId()); + status(o.getStatus()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -497,8 +533,9 @@ public SummarizeHostInsightNetworkUsageTrendRequest buildWithoutInvocationCallba request.limit = limit; request.statistic = statistic; request.opcRequestId = opcRequestId; + request.status = status; return request; - // new SummarizeHostInsightNetworkUsageTrendRequest(compartmentId, id, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, hostId, page, limit, statistic, opcRequestId); + // new SummarizeHostInsightNetworkUsageTrendRequest(compartmentId, id, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, hostId, page, limit, statistic, opcRequestId, status); } } @@ -517,7 +554,8 @@ public Builder toBuilder() { .page(page) .limit(limit) .statistic(statistic) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .status(status); } /** @@ -543,6 +581,7 @@ public String toString() { sb.append(",limit=").append(String.valueOf(this.limit)); sb.append(",statistic=").append(String.valueOf(this.statistic)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",status=").append(String.valueOf(this.status)); sb.append(")"); return sb.toString(); } @@ -568,7 +607,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.page, other.page) && java.util.Objects.equals(this.limit, other.limit) && java.util.Objects.equals(this.statistic, other.statistic) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.status, other.status); } @Override @@ -595,6 +635,7 @@ public int hashCode() { result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); result = (result * PRIME) + (this.statistic == null ? 43 : this.statistic.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); return result; } } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceCapacityTrendRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceCapacityTrendRequest.java index 378fdd089d6..286155e87c5 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceCapacityTrendRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceCapacityTrendRequest.java @@ -439,14 +439,14 @@ public Boolean getCompartmentIdInSubtree() { } /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ public java.util.List getHostType() { @@ -500,6 +500,17 @@ public Integer getHighUtilizationThreshold() { public Integer getLowUtilizationThreshold() { return lowUtilizationThreshold; } + /** + * Resource Status + */ + private java.util.List status; + + /** + * Resource Status + */ + public java.util.List getStatus() { + return status; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -968,14 +979,14 @@ public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType = null; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param hostType the value to set * @return this builder instance @@ -987,7 +998,7 @@ public Builder hostType(java.util.List hostType) { /** * Singular setter. Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param singularValue the singular value to set * @return this builder instance @@ -1070,6 +1081,30 @@ public Builder lowUtilizationThreshold(Integer lowUtilizationThreshold) { return this; } + /** + * Resource Status + */ + private java.util.List status = null; + + /** + * Resource Status + * @param status the value to set + * @return this builder instance + */ + public Builder status(java.util.List status) { + this.status = status; + return this; + } + + /** + * Singular setter. Resource Status + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder status(ResourceStatus singularValue) { + return this.status(java.util.Arrays.asList(singularValue)); + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -1121,6 +1156,7 @@ public Builder copy(SummarizeHostInsightResourceCapacityTrendRequest o) { vmclusterName(o.getVmclusterName()); highUtilizationThreshold(o.getHighUtilizationThreshold()); lowUtilizationThreshold(o.getLowUtilizationThreshold()); + status(o.getStatus()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -1178,8 +1214,9 @@ public SummarizeHostInsightResourceCapacityTrendRequest buildWithoutInvocationCa request.vmclusterName = vmclusterName; request.highUtilizationThreshold = highUtilizationThreshold; request.lowUtilizationThreshold = lowUtilizationThreshold; + request.status = status; return request; - // new SummarizeHostInsightResourceCapacityTrendRequest(compartmentId, resourceMetric, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, platformType, id, exadataInsightId, utilizationLevel, page, sortOrder, sortBy, opcRequestId, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, compartmentIdInSubtree, hostType, hostId, vmclusterName, highUtilizationThreshold, lowUtilizationThreshold); + // new SummarizeHostInsightResourceCapacityTrendRequest(compartmentId, resourceMetric, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, platformType, id, exadataInsightId, utilizationLevel, page, sortOrder, sortBy, opcRequestId, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, compartmentIdInSubtree, hostType, hostId, vmclusterName, highUtilizationThreshold, lowUtilizationThreshold, status); } } @@ -1211,7 +1248,8 @@ public Builder toBuilder() { .hostId(hostId) .vmclusterName(vmclusterName) .highUtilizationThreshold(highUtilizationThreshold) - .lowUtilizationThreshold(lowUtilizationThreshold); + .lowUtilizationThreshold(lowUtilizationThreshold) + .status(status); } /** @@ -1251,6 +1289,7 @@ public String toString() { sb.append(",highUtilizationThreshold=") .append(String.valueOf(this.highUtilizationThreshold)); sb.append(",lowUtilizationThreshold=").append(String.valueOf(this.lowUtilizationThreshold)); + sb.append(",status=").append(String.valueOf(this.status)); sb.append(")"); return sb.toString(); } @@ -1292,7 +1331,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.highUtilizationThreshold, other.highUtilizationThreshold) && java.util.Objects.equals( - this.lowUtilizationThreshold, other.lowUtilizationThreshold); + this.lowUtilizationThreshold, other.lowUtilizationThreshold) + && java.util.Objects.equals(this.status, other.status); } @Override @@ -1360,6 +1400,7 @@ public int hashCode() { + (this.lowUtilizationThreshold == null ? 43 : this.lowUtilizationThreshold.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); return result; } } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceForecastTrendRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceForecastTrendRequest.java index bf48c15ad71..b311ede9fef 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceForecastTrendRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceForecastTrendRequest.java @@ -520,14 +520,14 @@ public Boolean getCompartmentIdInSubtree() { } /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ public java.util.List getHostType() { @@ -607,6 +607,30 @@ public String getMountPoint() { public String getInterfaceName() { return interfaceName; } + /** + * GPU identifier. + * + */ + private Integer gpuId; + + /** + * GPU identifier. + * + */ + public Integer getGpuId() { + return gpuId; + } + /** + * Resource Status + */ + private java.util.List status; + + /** + * Resource Status + */ + public java.util.List getStatus() { + return status; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -1123,14 +1147,14 @@ public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType = null; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param hostType the value to set * @return this builder instance @@ -1142,7 +1166,7 @@ public Builder hostType(java.util.List hostType) { /** * Singular setter. Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param singularValue the singular value to set * @return this builder instance @@ -1259,6 +1283,47 @@ public Builder interfaceName(String interfaceName) { return this; } + /** + * GPU identifier. + * + */ + private Integer gpuId = null; + + /** + * GPU identifier. + * + * @param gpuId the value to set + * @return this builder instance + */ + public Builder gpuId(Integer gpuId) { + this.gpuId = gpuId; + return this; + } + + /** + * Resource Status + */ + private java.util.List status = null; + + /** + * Resource Status + * @param status the value to set + * @return this builder instance + */ + public Builder status(java.util.List status) { + this.status = status; + return this; + } + + /** + * Singular setter. Resource Status + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder status(ResourceStatus singularValue) { + return this.status(java.util.Arrays.asList(singularValue)); + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -1314,6 +1379,8 @@ public Builder copy(SummarizeHostInsightResourceForecastTrendRequest o) { lowUtilizationThreshold(o.getLowUtilizationThreshold()); mountPoint(o.getMountPoint()); interfaceName(o.getInterfaceName()); + gpuId(o.getGpuId()); + status(o.getStatus()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -1375,8 +1442,10 @@ public SummarizeHostInsightResourceForecastTrendRequest buildWithoutInvocationCa request.lowUtilizationThreshold = lowUtilizationThreshold; request.mountPoint = mountPoint; request.interfaceName = interfaceName; + request.gpuId = gpuId; + request.status = status; return request; - // new SummarizeHostInsightResourceForecastTrendRequest(compartmentId, resourceMetric, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, platformType, id, exadataInsightId, statistic, forecastDays, forecastModel, utilizationLevel, confidence, page, opcRequestId, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, compartmentIdInSubtree, hostType, hostId, vmclusterName, highUtilizationThreshold, lowUtilizationThreshold, mountPoint, interfaceName); + // new SummarizeHostInsightResourceForecastTrendRequest(compartmentId, resourceMetric, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, platformType, id, exadataInsightId, statistic, forecastDays, forecastModel, utilizationLevel, confidence, page, opcRequestId, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, compartmentIdInSubtree, hostType, hostId, vmclusterName, highUtilizationThreshold, lowUtilizationThreshold, mountPoint, interfaceName, gpuId, status); } } @@ -1412,7 +1481,9 @@ public Builder toBuilder() { .highUtilizationThreshold(highUtilizationThreshold) .lowUtilizationThreshold(lowUtilizationThreshold) .mountPoint(mountPoint) - .interfaceName(interfaceName); + .interfaceName(interfaceName) + .gpuId(gpuId) + .status(status); } /** @@ -1456,6 +1527,8 @@ public String toString() { sb.append(",lowUtilizationThreshold=").append(String.valueOf(this.lowUtilizationThreshold)); sb.append(",mountPoint=").append(String.valueOf(this.mountPoint)); sb.append(",interfaceName=").append(String.valueOf(this.interfaceName)); + sb.append(",gpuId=").append(String.valueOf(this.gpuId)); + sb.append(",status=").append(String.valueOf(this.status)); sb.append(")"); return sb.toString(); } @@ -1501,7 +1574,9 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.lowUtilizationThreshold, other.lowUtilizationThreshold) && java.util.Objects.equals(this.mountPoint, other.mountPoint) - && java.util.Objects.equals(this.interfaceName, other.interfaceName); + && java.util.Objects.equals(this.interfaceName, other.interfaceName) + && java.util.Objects.equals(this.gpuId, other.gpuId) + && java.util.Objects.equals(this.status, other.status); } @Override @@ -1577,6 +1652,8 @@ public int hashCode() { result = (result * PRIME) + (this.interfaceName == null ? 43 : this.interfaceName.hashCode()); + result = (result * PRIME) + (this.gpuId == null ? 43 : this.gpuId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); return result; } } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceStatisticsRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceStatisticsRequest.java index d4a97866f3f..5a9c98cc568 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceStatisticsRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceStatisticsRequest.java @@ -442,14 +442,14 @@ public Boolean getCompartmentIdInSubtree() { } /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ public java.util.List getHostType() { @@ -503,6 +503,17 @@ public Integer getHighUtilizationThreshold() { public Integer getLowUtilizationThreshold() { return lowUtilizationThreshold; } + /** + * Resource Status + */ + private java.util.List status; + + /** + * Resource Status + */ + public java.util.List getStatus() { + return status; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -1026,14 +1037,14 @@ public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType = null; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param hostType the value to set * @return this builder instance @@ -1045,7 +1056,7 @@ public Builder hostType(java.util.List hostType) { /** * Singular setter. Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param singularValue the singular value to set * @return this builder instance @@ -1128,6 +1139,30 @@ public Builder lowUtilizationThreshold(Integer lowUtilizationThreshold) { return this; } + /** + * Resource Status + */ + private java.util.List status = null; + + /** + * Resource Status + * @param status the value to set + * @return this builder instance + */ + public Builder status(java.util.List status) { + this.status = status; + return this; + } + + /** + * Singular setter. Resource Status + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder status(ResourceStatus singularValue) { + return this.status(java.util.Arrays.asList(singularValue)); + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -1182,6 +1217,7 @@ public Builder copy(SummarizeHostInsightResourceStatisticsRequest o) { vmclusterName(o.getVmclusterName()); highUtilizationThreshold(o.getHighUtilizationThreshold()); lowUtilizationThreshold(o.getLowUtilizationThreshold()); + status(o.getStatus()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -1242,8 +1278,9 @@ public SummarizeHostInsightResourceStatisticsRequest buildWithoutInvocationCallb request.vmclusterName = vmclusterName; request.highUtilizationThreshold = highUtilizationThreshold; request.lowUtilizationThreshold = lowUtilizationThreshold; + request.status = status; return request; - // new SummarizeHostInsightResourceStatisticsRequest(compartmentId, resourceMetric, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, platformType, id, exadataInsightId, percentile, insightBy, forecastDays, limit, page, sortOrder, sortBy, opcRequestId, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, compartmentIdInSubtree, hostType, hostId, vmclusterName, highUtilizationThreshold, lowUtilizationThreshold); + // new SummarizeHostInsightResourceStatisticsRequest(compartmentId, resourceMetric, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, platformType, id, exadataInsightId, percentile, insightBy, forecastDays, limit, page, sortOrder, sortBy, opcRequestId, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, compartmentIdInSubtree, hostType, hostId, vmclusterName, highUtilizationThreshold, lowUtilizationThreshold, status); } } @@ -1278,7 +1315,8 @@ public Builder toBuilder() { .hostId(hostId) .vmclusterName(vmclusterName) .highUtilizationThreshold(highUtilizationThreshold) - .lowUtilizationThreshold(lowUtilizationThreshold); + .lowUtilizationThreshold(lowUtilizationThreshold) + .status(status); } /** @@ -1321,6 +1359,7 @@ public String toString() { sb.append(",highUtilizationThreshold=") .append(String.valueOf(this.highUtilizationThreshold)); sb.append(",lowUtilizationThreshold=").append(String.valueOf(this.lowUtilizationThreshold)); + sb.append(",status=").append(String.valueOf(this.status)); sb.append(")"); return sb.toString(); } @@ -1365,7 +1404,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.highUtilizationThreshold, other.highUtilizationThreshold) && java.util.Objects.equals( - this.lowUtilizationThreshold, other.lowUtilizationThreshold); + this.lowUtilizationThreshold, other.lowUtilizationThreshold) + && java.util.Objects.equals(this.status, other.status); } @Override @@ -1434,6 +1474,7 @@ public int hashCode() { + (this.lowUtilizationThreshold == null ? 43 : this.lowUtilizationThreshold.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); return result; } } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceUsageRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceUsageRequest.java index c7cf140b3eb..43cc82cf78b 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceUsageRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceUsageRequest.java @@ -325,14 +325,14 @@ public Boolean getCompartmentIdInSubtree() { } /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ public java.util.List getHostType() { @@ -364,6 +364,17 @@ public String getHostId() { public java.util.List getVmclusterName() { return vmclusterName; } + /** + * Resource Status + */ + private java.util.List status; + + /** + * Resource Status + */ + public java.util.List getStatus() { + return status; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -790,14 +801,14 @@ public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType = null; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param hostType the value to set * @return this builder instance @@ -809,7 +820,7 @@ public Builder hostType(java.util.List hostType) { /** * Singular setter. Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param singularValue the singular value to set * @return this builder instance @@ -862,6 +873,30 @@ public Builder vmclusterName(String singularValue) { return this.vmclusterName(java.util.Arrays.asList(singularValue)); } + /** + * Resource Status + */ + private java.util.List status = null; + + /** + * Resource Status + * @param status the value to set + * @return this builder instance + */ + public Builder status(java.util.List status) { + this.status = status; + return this; + } + + /** + * Singular setter. Resource Status + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder status(ResourceStatus singularValue) { + return this.status(java.util.Arrays.asList(singularValue)); + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -909,6 +944,7 @@ public Builder copy(SummarizeHostInsightResourceUsageRequest o) { hostType(o.getHostType()); hostId(o.getHostId()); vmclusterName(o.getVmclusterName()); + status(o.getStatus()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -961,8 +997,9 @@ public SummarizeHostInsightResourceUsageRequest buildWithoutInvocationCallback() request.hostType = hostType; request.hostId = hostId; request.vmclusterName = vmclusterName; + request.status = status; return request; - // new SummarizeHostInsightResourceUsageRequest(compartmentId, resourceMetric, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, platformType, id, exadataInsightId, page, percentile, opcRequestId, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, compartmentIdInSubtree, hostType, hostId, vmclusterName); + // new SummarizeHostInsightResourceUsageRequest(compartmentId, resourceMetric, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, platformType, id, exadataInsightId, page, percentile, opcRequestId, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, compartmentIdInSubtree, hostType, hostId, vmclusterName, status); } } @@ -990,7 +1027,8 @@ public Builder toBuilder() { .compartmentIdInSubtree(compartmentIdInSubtree) .hostType(hostType) .hostId(hostId) - .vmclusterName(vmclusterName); + .vmclusterName(vmclusterName) + .status(status); } /** @@ -1025,6 +1063,7 @@ public String toString() { sb.append(",hostType=").append(String.valueOf(this.hostType)); sb.append(",hostId=").append(String.valueOf(this.hostId)); sb.append(",vmclusterName=").append(String.valueOf(this.vmclusterName)); + sb.append(",status=").append(String.valueOf(this.status)); sb.append(")"); return sb.toString(); } @@ -1060,7 +1099,8 @@ public boolean equals(Object o) { this.compartmentIdInSubtree, other.compartmentIdInSubtree) && java.util.Objects.equals(this.hostType, other.hostType) && java.util.Objects.equals(this.hostId, other.hostId) - && java.util.Objects.equals(this.vmclusterName, other.vmclusterName); + && java.util.Objects.equals(this.vmclusterName, other.vmclusterName) + && java.util.Objects.equals(this.status, other.status); } @Override @@ -1114,6 +1154,7 @@ public int hashCode() { result = (result * PRIME) + (this.vmclusterName == null ? 43 : this.vmclusterName.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); return result; } } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceUsageTrendRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceUsageTrendRequest.java index bfe354a896d..7fa4e8d305e 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceUsageTrendRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceUsageTrendRequest.java @@ -376,14 +376,14 @@ public Boolean getCompartmentIdInSubtree() { } /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ public java.util.List getHostType() { @@ -415,6 +415,17 @@ public String getHostId() { public java.util.List getVmclusterName() { return vmclusterName; } + /** + * Resource Status + */ + private java.util.List status; + + /** + * Resource Status + */ + public java.util.List getStatus() { + return status; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -858,14 +869,14 @@ public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType = null; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param hostType the value to set * @return this builder instance @@ -877,7 +888,7 @@ public Builder hostType(java.util.List hostType) { /** * Singular setter. Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param singularValue the singular value to set * @return this builder instance @@ -930,6 +941,30 @@ public Builder vmclusterName(String singularValue) { return this.vmclusterName(java.util.Arrays.asList(singularValue)); } + /** + * Resource Status + */ + private java.util.List status = null; + + /** + * Resource Status + * @param status the value to set + * @return this builder instance + */ + public Builder status(java.util.List status) { + this.status = status; + return this; + } + + /** + * Singular setter. Resource Status + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder status(ResourceStatus singularValue) { + return this.status(java.util.Arrays.asList(singularValue)); + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -978,6 +1013,7 @@ public Builder copy(SummarizeHostInsightResourceUsageTrendRequest o) { hostType(o.getHostType()); hostId(o.getHostId()); vmclusterName(o.getVmclusterName()); + status(o.getStatus()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -1032,8 +1068,9 @@ public SummarizeHostInsightResourceUsageTrendRequest buildWithoutInvocationCallb request.hostType = hostType; request.hostId = hostId; request.vmclusterName = vmclusterName; + request.status = status; return request; - // new SummarizeHostInsightResourceUsageTrendRequest(compartmentId, resourceMetric, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, platformType, id, exadataInsightId, page, sortOrder, sortBy, opcRequestId, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, compartmentIdInSubtree, hostType, hostId, vmclusterName); + // new SummarizeHostInsightResourceUsageTrendRequest(compartmentId, resourceMetric, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, platformType, id, exadataInsightId, page, sortOrder, sortBy, opcRequestId, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, compartmentIdInSubtree, hostType, hostId, vmclusterName, status); } } @@ -1062,7 +1099,8 @@ public Builder toBuilder() { .compartmentIdInSubtree(compartmentIdInSubtree) .hostType(hostType) .hostId(hostId) - .vmclusterName(vmclusterName); + .vmclusterName(vmclusterName) + .status(status); } /** @@ -1098,6 +1136,7 @@ public String toString() { sb.append(",hostType=").append(String.valueOf(this.hostType)); sb.append(",hostId=").append(String.valueOf(this.hostId)); sb.append(",vmclusterName=").append(String.valueOf(this.vmclusterName)); + sb.append(",status=").append(String.valueOf(this.status)); sb.append(")"); return sb.toString(); } @@ -1134,7 +1173,8 @@ public boolean equals(Object o) { this.compartmentIdInSubtree, other.compartmentIdInSubtree) && java.util.Objects.equals(this.hostType, other.hostType) && java.util.Objects.equals(this.hostId, other.hostId) - && java.util.Objects.equals(this.vmclusterName, other.vmclusterName); + && java.util.Objects.equals(this.vmclusterName, other.vmclusterName) + && java.util.Objects.equals(this.status, other.status); } @Override @@ -1189,6 +1229,7 @@ public int hashCode() { result = (result * PRIME) + (this.vmclusterName == null ? 43 : this.vmclusterName.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); return result; } } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceUtilizationInsightRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceUtilizationInsightRequest.java index 5298c7e88f1..20aa9f07a05 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceUtilizationInsightRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightResourceUtilizationInsightRequest.java @@ -325,14 +325,14 @@ public Boolean getCompartmentIdInSubtree() { } /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ public java.util.List getHostType() { @@ -386,6 +386,17 @@ public Integer getHighUtilizationThreshold() { public Integer getLowUtilizationThreshold() { return lowUtilizationThreshold; } + /** + * Resource Status + */ + private java.util.List status; + + /** + * Resource Status + */ + public java.util.List getStatus() { + return status; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -812,14 +823,14 @@ public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType = null; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param hostType the value to set * @return this builder instance @@ -831,7 +842,7 @@ public Builder hostType(java.util.List hostType) { /** * Singular setter. Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param singularValue the singular value to set * @return this builder instance @@ -914,6 +925,30 @@ public Builder lowUtilizationThreshold(Integer lowUtilizationThreshold) { return this; } + /** + * Resource Status + */ + private java.util.List status = null; + + /** + * Resource Status + * @param status the value to set + * @return this builder instance + */ + public Builder status(java.util.List status) { + this.status = status; + return this; + } + + /** + * Singular setter. Resource Status + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder status(ResourceStatus singularValue) { + return this.status(java.util.Arrays.asList(singularValue)); + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -963,6 +998,7 @@ public Builder copy(SummarizeHostInsightResourceUtilizationInsightRequest o) { vmclusterName(o.getVmclusterName()); highUtilizationThreshold(o.getHighUtilizationThreshold()); lowUtilizationThreshold(o.getLowUtilizationThreshold()); + status(o.getStatus()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -1019,8 +1055,9 @@ public SummarizeHostInsightResourceUtilizationInsightRequest build() { request.vmclusterName = vmclusterName; request.highUtilizationThreshold = highUtilizationThreshold; request.lowUtilizationThreshold = lowUtilizationThreshold; + request.status = status; return request; - // new SummarizeHostInsightResourceUtilizationInsightRequest(compartmentId, resourceMetric, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, platformType, id, exadataInsightId, forecastDays, page, opcRequestId, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, compartmentIdInSubtree, hostType, hostId, vmclusterName, highUtilizationThreshold, lowUtilizationThreshold); + // new SummarizeHostInsightResourceUtilizationInsightRequest(compartmentId, resourceMetric, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, platformType, id, exadataInsightId, forecastDays, page, opcRequestId, definedTagEquals, freeformTagEquals, definedTagExists, freeformTagExists, compartmentIdInSubtree, hostType, hostId, vmclusterName, highUtilizationThreshold, lowUtilizationThreshold, status); } } @@ -1050,7 +1087,8 @@ public Builder toBuilder() { .hostId(hostId) .vmclusterName(vmclusterName) .highUtilizationThreshold(highUtilizationThreshold) - .lowUtilizationThreshold(lowUtilizationThreshold); + .lowUtilizationThreshold(lowUtilizationThreshold) + .status(status); } /** @@ -1088,6 +1126,7 @@ public String toString() { sb.append(",highUtilizationThreshold=") .append(String.valueOf(this.highUtilizationThreshold)); sb.append(",lowUtilizationThreshold=").append(String.valueOf(this.lowUtilizationThreshold)); + sb.append(",status=").append(String.valueOf(this.status)); sb.append(")"); return sb.toString(); } @@ -1127,7 +1166,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.highUtilizationThreshold, other.highUtilizationThreshold) && java.util.Objects.equals( - this.lowUtilizationThreshold, other.lowUtilizationThreshold); + this.lowUtilizationThreshold, other.lowUtilizationThreshold) + && java.util.Objects.equals(this.status, other.status); } @Override @@ -1191,6 +1231,7 @@ public int hashCode() { + (this.lowUtilizationThreshold == null ? 43 : this.lowUtilizationThreshold.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); return result; } } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightStorageUsageTrendRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightStorageUsageTrendRequest.java index 7a66a94a937..796f81093cf 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightStorageUsageTrendRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightStorageUsageTrendRequest.java @@ -208,6 +208,17 @@ public Statistic getStatistic() { public String getOpcRequestId() { return opcRequestId; } + /** + * Resource Status + */ + private java.util.List status; + + /** + * Resource Status + */ + public java.util.List getStatus() { + return status; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -416,6 +427,30 @@ public Builder opcRequestId(String opcRequestId) { return this; } + /** + * Resource Status + */ + private java.util.List status = null; + + /** + * Resource Status + * @param status the value to set + * @return this builder instance + */ + public Builder status(java.util.List status) { + this.status = status; + return this; + } + + /** + * Singular setter. Resource Status + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder status(ResourceStatus singularValue) { + return this.status(java.util.Arrays.asList(singularValue)); + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -454,6 +489,7 @@ public Builder copy(SummarizeHostInsightStorageUsageTrendRequest o) { limit(o.getLimit()); statistic(o.getStatistic()); opcRequestId(o.getOpcRequestId()); + status(o.getStatus()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -497,8 +533,9 @@ public SummarizeHostInsightStorageUsageTrendRequest buildWithoutInvocationCallba request.limit = limit; request.statistic = statistic; request.opcRequestId = opcRequestId; + request.status = status; return request; - // new SummarizeHostInsightStorageUsageTrendRequest(compartmentId, id, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, hostId, page, limit, statistic, opcRequestId); + // new SummarizeHostInsightStorageUsageTrendRequest(compartmentId, id, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, hostId, page, limit, statistic, opcRequestId, status); } } @@ -517,7 +554,8 @@ public Builder toBuilder() { .page(page) .limit(limit) .statistic(statistic) - .opcRequestId(opcRequestId); + .opcRequestId(opcRequestId) + .status(status); } /** @@ -543,6 +581,7 @@ public String toString() { sb.append(",limit=").append(String.valueOf(this.limit)); sb.append(",statistic=").append(String.valueOf(this.statistic)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",status=").append(String.valueOf(this.status)); sb.append(")"); return sb.toString(); } @@ -568,7 +607,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.page, other.page) && java.util.Objects.equals(this.limit, other.limit) && java.util.Objects.equals(this.statistic, other.statistic) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.status, other.status); } @Override @@ -595,6 +635,7 @@ public int hashCode() { result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); result = (result * PRIME) + (this.statistic == null ? 43 : this.statistic.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); return result; } } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightTopProcessesUsageRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightTopProcessesUsageRequest.java index d025b9e497b..d3f185ed731 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightTopProcessesUsageRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightTopProcessesUsageRequest.java @@ -180,14 +180,14 @@ public String getAnalysisTimeInterval() { } /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ public java.util.List getHostType() { @@ -253,6 +253,17 @@ public static Statistic create(String key) { public Statistic getStatistic() { return statistic; } + /** + * Resource Status + */ + private java.util.List status; + + /** + * Resource Status + */ + public java.util.List getStatus() { + return status; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -469,14 +480,14 @@ public Builder analysisTimeInterval(String analysisTimeInterval) { /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType = null; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param hostType the value to set * @return this builder instance @@ -488,7 +499,7 @@ public Builder hostType(java.util.List hostType) { /** * Singular setter. Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param singularValue the singular value to set * @return this builder instance @@ -529,6 +540,30 @@ public Builder statistic(Statistic statistic) { return this; } + /** + * Resource Status + */ + private java.util.List status = null; + + /** + * Resource Status + * @param status the value to set + * @return this builder instance + */ + public Builder status(java.util.List status) { + this.status = status; + return this; + } + + /** + * Singular setter. Resource Status + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder status(ResourceStatus singularValue) { + return this.status(java.util.Arrays.asList(singularValue)); + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -570,6 +605,7 @@ public Builder copy(SummarizeHostInsightTopProcessesUsageRequest o) { hostType(o.getHostType()); hostId(o.getHostId()); statistic(o.getStatistic()); + status(o.getStatus()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -616,8 +652,9 @@ public SummarizeHostInsightTopProcessesUsageRequest buildWithoutInvocationCallba request.hostType = hostType; request.hostId = hostId; request.statistic = statistic; + request.status = status; return request; - // new SummarizeHostInsightTopProcessesUsageRequest(compartmentId, id, resourceMetric, timestamp, timeIntervalStart, timeIntervalEnd, page, limit, opcRequestId, analysisTimeInterval, hostType, hostId, statistic); + // new SummarizeHostInsightTopProcessesUsageRequest(compartmentId, id, resourceMetric, timestamp, timeIntervalStart, timeIntervalEnd, page, limit, opcRequestId, analysisTimeInterval, hostType, hostId, statistic, status); } } @@ -639,7 +676,8 @@ public Builder toBuilder() { .analysisTimeInterval(analysisTimeInterval) .hostType(hostType) .hostId(hostId) - .statistic(statistic); + .statistic(statistic) + .status(status); } /** @@ -668,6 +706,7 @@ public String toString() { sb.append(",hostType=").append(String.valueOf(this.hostType)); sb.append(",hostId=").append(String.valueOf(this.hostId)); sb.append(",statistic=").append(String.valueOf(this.statistic)); + sb.append(",status=").append(String.valueOf(this.status)); sb.append(")"); return sb.toString(); } @@ -696,7 +735,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.analysisTimeInterval, other.analysisTimeInterval) && java.util.Objects.equals(this.hostType, other.hostType) && java.util.Objects.equals(this.hostId, other.hostId) - && java.util.Objects.equals(this.statistic, other.statistic); + && java.util.Objects.equals(this.statistic, other.statistic) + && java.util.Objects.equals(this.status, other.status); } @Override @@ -728,6 +768,7 @@ public int hashCode() { result = (result * PRIME) + (this.hostType == null ? 43 : this.hostType.hashCode()); result = (result * PRIME) + (this.hostId == null ? 43 : this.hostId.hashCode()); result = (result * PRIME) + (this.statistic == null ? 43 : this.statistic.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); return result; } } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightTopProcessesUsageTrendRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightTopProcessesUsageTrendRequest.java index 286f7c6c96e..9223ed7d15b 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightTopProcessesUsageTrendRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeHostInsightTopProcessesUsageTrendRequest.java @@ -165,14 +165,14 @@ public String getOpcRequestId() { } /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ public java.util.List getHostType() { @@ -251,6 +251,17 @@ public static Statistic create(String key) { public Statistic getStatistic() { return statistic; } + /** + * Resource Status + */ + private java.util.List status; + + /** + * Resource Status + */ + public java.util.List getStatus() { + return status; + } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< @@ -448,14 +459,14 @@ public Builder opcRequestId(String opcRequestId) { /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * */ private java.util.List hostType = null; /** * Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param hostType the value to set * @return this builder instance @@ -467,7 +478,7 @@ public Builder hostType(java.util.List hostType) { /** * Singular setter. Filter by one or more host types. - * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST + * Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST, COMANAGED-EXACC-HOST * * @param singularValue the singular value to set * @return this builder instance @@ -525,6 +536,30 @@ public Builder statistic(Statistic statistic) { return this; } + /** + * Resource Status + */ + private java.util.List status = null; + + /** + * Resource Status + * @param status the value to set + * @return this builder instance + */ + public Builder status(java.util.List status) { + this.status = status; + return this; + } + + /** + * Singular setter. Resource Status + * @param singularValue the singular value to set + * @return this builder instance + */ + public Builder status(ResourceStatus singularValue) { + return this.status(java.util.Arrays.asList(singularValue)); + } + /** * Set the invocation callback for the request to be built. * @param invocationCallback the invocation callback to be set for the request @@ -566,6 +601,7 @@ public Builder copy(SummarizeHostInsightTopProcessesUsageTrendRequest o) { hostId(o.getHostId()); processHash(o.getProcessHash()); statistic(o.getStatistic()); + status(o.getStatus()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; @@ -613,8 +649,9 @@ public SummarizeHostInsightTopProcessesUsageTrendRequest buildWithoutInvocationC request.hostId = hostId; request.processHash = processHash; request.statistic = statistic; + request.status = status; return request; - // new SummarizeHostInsightTopProcessesUsageTrendRequest(compartmentId, id, resourceMetric, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, page, limit, opcRequestId, hostType, hostId, processHash, statistic); + // new SummarizeHostInsightTopProcessesUsageTrendRequest(compartmentId, id, resourceMetric, analysisTimeInterval, timeIntervalStart, timeIntervalEnd, page, limit, opcRequestId, hostType, hostId, processHash, statistic, status); } } @@ -636,7 +673,8 @@ public Builder toBuilder() { .hostType(hostType) .hostId(hostId) .processHash(processHash) - .statistic(statistic); + .statistic(statistic) + .status(status); } /** @@ -665,6 +703,7 @@ public String toString() { sb.append(",hostId=").append(String.valueOf(this.hostId)); sb.append(",processHash=").append(String.valueOf(this.processHash)); sb.append(",statistic=").append(String.valueOf(this.statistic)); + sb.append(",status=").append(String.valueOf(this.status)); sb.append(")"); return sb.toString(); } @@ -693,7 +732,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.hostType, other.hostType) && java.util.Objects.equals(this.hostId, other.hostId) && java.util.Objects.equals(this.processHash, other.processHash) - && java.util.Objects.equals(this.statistic, other.statistic); + && java.util.Objects.equals(this.statistic, other.statistic) + && java.util.Objects.equals(this.status, other.status); } @Override @@ -725,6 +765,7 @@ public int hashCode() { result = (result * PRIME) + (this.hostId == null ? 43 : this.hostId.hashCode()); result = (result * PRIME) + (this.processHash == null ? 43 : this.processHash.hashCode()); result = (result * PRIME) + (this.statistic == null ? 43 : this.statistic.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); return result; } } diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeOperationsInsightsWarehouseResourceUsageRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeOperationsInsightsWarehouseResourceUsageRequest.java index 5adeacc84bf..c854915473d 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeOperationsInsightsWarehouseResourceUsageRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeOperationsInsightsWarehouseResourceUsageRequest.java @@ -13,12 +13,12 @@ public class SummarizeOperationsInsightsWarehouseResourceUsageRequest extends com.oracle.bmc.requests.BmcRequest { /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ private String operationsInsightsWarehouseId; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ public String getOperationsInsightsWarehouseId() { return operationsInsightsWarehouseId; @@ -47,12 +47,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ private String operationsInsightsWarehouseId = null; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier * @param operationsInsightsWarehouseId the value to set * @return this builder instance */ diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeSqlInsightsRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeSqlInsightsRequest.java index 678217ee67e..e3fb453c68d 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeSqlInsightsRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeSqlInsightsRequest.java @@ -51,6 +51,10 @@ public enum DatabaseType { ComanagedExacsCdb("COMANAGED-EXACS-CDB"), ComanagedExacsPdb("COMANAGED-EXACS-PDB"), ComanagedExacsNoncdb("COMANAGED-EXACS-NONCDB"), + ComanagedExaccCdb("COMANAGED-EXACC-CDB"), + ComanagedExaccPdb("COMANAGED-EXACC-PDB"), + ComanagedExaccNoncdb("COMANAGED-EXACC-NONCDB"), + MdsMysql("MDS-MYSQL"), ; private final String value; diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeSqlStatisticsRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeSqlStatisticsRequest.java index 49d51901771..86dc98f627d 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeSqlStatisticsRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/SummarizeSqlStatisticsRequest.java @@ -51,6 +51,10 @@ public enum DatabaseType { ComanagedExacsCdb("COMANAGED-EXACS-CDB"), ComanagedExacsPdb("COMANAGED-EXACS-PDB"), ComanagedExacsNoncdb("COMANAGED-EXACS-NONCDB"), + ComanagedExaccCdb("COMANAGED-EXACC-CDB"), + ComanagedExaccPdb("COMANAGED-EXACC-PDB"), + ComanagedExaccNoncdb("COMANAGED-EXACC-NONCDB"), + MdsMysql("MDS-MYSQL"), ; private final String value; diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/TestMacsManagedCloudDatabaseInsightConnectionRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/TestMacsManagedCloudDatabaseInsightConnectionRequest.java new file mode 100644 index 00000000000..7ed2788e66e --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/TestMacsManagedCloudDatabaseInsightConnectionRequest.java @@ -0,0 +1,382 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.requests; + +import com.oracle.bmc.opsi.model.*; +/** + * Example: Click here to see how to use TestMacsManagedCloudDatabaseInsightConnectionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +public class TestMacsManagedCloudDatabaseInsightConnectionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.opsi.model.TestMacsManagedCloudDatabaseInsightConnectionDetails> { + + /** + * The database connection information for the Cloud MACS-managed database. + */ + private com.oracle.bmc.opsi.model.TestMacsManagedCloudDatabaseInsightConnectionDetails + testMacsManagedCloudDatabaseInsightConnectionDetails; + + /** + * The database connection information for the Cloud MACS-managed database. + */ + public com.oracle.bmc.opsi.model.TestMacsManagedCloudDatabaseInsightConnectionDetails + getTestMacsManagedCloudDatabaseInsightConnectionDetails() { + return testMacsManagedCloudDatabaseInsightConnectionDetails; + } + /** + * Optional [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + * + */ + private String databaseId; + + /** + * Optional [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + * + */ + public String getDatabaseId() { + return databaseId; + } + /** + * [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database insight resource. + * + */ + private String id; + + /** + * [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database insight resource. + * + */ + public String getId() { + return id; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request that can be retried in case of a timeout or + * server error without risk of executing the same action again. Retry tokens expire after 24 + * hours. + *

+ *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + * operations, such as a resource being deleted or purged from the system. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request that can be retried in case of a timeout or + * server error without risk of executing the same action again. Retry tokens expire after 24 + * hours. + *

+ *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + * operations, such as a resource being deleted or purged from the system. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.opsi.model.TestMacsManagedCloudDatabaseInsightConnectionDetails + getBody$() { + return testMacsManagedCloudDatabaseInsightConnectionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + TestMacsManagedCloudDatabaseInsightConnectionRequest, + com.oracle.bmc.opsi.model + .TestMacsManagedCloudDatabaseInsightConnectionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The database connection information for the Cloud MACS-managed database. + */ + private com.oracle.bmc.opsi.model.TestMacsManagedCloudDatabaseInsightConnectionDetails + testMacsManagedCloudDatabaseInsightConnectionDetails = null; + + /** + * The database connection information for the Cloud MACS-managed database. + * @param testMacsManagedCloudDatabaseInsightConnectionDetails the value to set + * @return this builder instance + */ + public Builder testMacsManagedCloudDatabaseInsightConnectionDetails( + com.oracle.bmc.opsi.model.TestMacsManagedCloudDatabaseInsightConnectionDetails + testMacsManagedCloudDatabaseInsightConnectionDetails) { + this.testMacsManagedCloudDatabaseInsightConnectionDetails = + testMacsManagedCloudDatabaseInsightConnectionDetails; + return this; + } + + /** + * Optional [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + * + */ + private String databaseId = null; + + /** + * Optional [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + * + * @param databaseId the value to set + * @return this builder instance + */ + public Builder databaseId(String databaseId) { + this.databaseId = databaseId; + return this; + } + + /** + * [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database insight resource. + * + */ + private String id = null; + + /** + * [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database insight resource. + * + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request that can be retried in case of a timeout or + * server error without risk of executing the same action again. Retry tokens expire after 24 + * hours. + *

+ *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + * operations, such as a resource being deleted or purged from the system. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request that can be retried in case of a timeout or + * server error without risk of executing the same action again. Retry tokens expire after 24 + * hours. + *

+ *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + * operations, such as a resource being deleted or purged from the system. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(TestMacsManagedCloudDatabaseInsightConnectionRequest o) { + testMacsManagedCloudDatabaseInsightConnectionDetails( + o.getTestMacsManagedCloudDatabaseInsightConnectionDetails()); + databaseId(o.getDatabaseId()); + id(o.getId()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of TestMacsManagedCloudDatabaseInsightConnectionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of TestMacsManagedCloudDatabaseInsightConnectionRequest + */ + public TestMacsManagedCloudDatabaseInsightConnectionRequest build() { + TestMacsManagedCloudDatabaseInsightConnectionRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.opsi.model.TestMacsManagedCloudDatabaseInsightConnectionDetails + body) { + testMacsManagedCloudDatabaseInsightConnectionDetails(body); + return this; + } + + /** + * Build the instance of TestMacsManagedCloudDatabaseInsightConnectionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of TestMacsManagedCloudDatabaseInsightConnectionRequest + */ + public TestMacsManagedCloudDatabaseInsightConnectionRequest + buildWithoutInvocationCallback() { + TestMacsManagedCloudDatabaseInsightConnectionRequest request = + new TestMacsManagedCloudDatabaseInsightConnectionRequest(); + request.testMacsManagedCloudDatabaseInsightConnectionDetails = + testMacsManagedCloudDatabaseInsightConnectionDetails; + request.databaseId = databaseId; + request.id = id; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new TestMacsManagedCloudDatabaseInsightConnectionRequest(testMacsManagedCloudDatabaseInsightConnectionDetails, databaseId, id, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .testMacsManagedCloudDatabaseInsightConnectionDetails( + testMacsManagedCloudDatabaseInsightConnectionDetails) + .databaseId(databaseId) + .id(id) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",testMacsManagedCloudDatabaseInsightConnectionDetails=") + .append(String.valueOf(this.testMacsManagedCloudDatabaseInsightConnectionDetails)); + sb.append(",databaseId=").append(String.valueOf(this.databaseId)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TestMacsManagedCloudDatabaseInsightConnectionRequest)) { + return false; + } + + TestMacsManagedCloudDatabaseInsightConnectionRequest other = + (TestMacsManagedCloudDatabaseInsightConnectionRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.testMacsManagedCloudDatabaseInsightConnectionDetails, + other.testMacsManagedCloudDatabaseInsightConnectionDetails) + && java.util.Objects.equals(this.databaseId, other.databaseId) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.testMacsManagedCloudDatabaseInsightConnectionDetails == null + ? 43 + : this.testMacsManagedCloudDatabaseInsightConnectionDetails + .hashCode()); + result = (result * PRIME) + (this.databaseId == null ? 43 : this.databaseId.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/UpdateOperationsInsightsWarehouseRequest.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/UpdateOperationsInsightsWarehouseRequest.java index a693929b2d0..ff83afd94ac 100644 --- a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/UpdateOperationsInsightsWarehouseRequest.java +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/requests/UpdateOperationsInsightsWarehouseRequest.java @@ -14,12 +14,12 @@ public class UpdateOperationsInsightsWarehouseRequest com.oracle.bmc.opsi.model.UpdateOperationsInsightsWarehouseDetails> { /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ private String operationsInsightsWarehouseId; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ public String getOperationsInsightsWarehouseId() { return operationsInsightsWarehouseId; @@ -89,12 +89,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier */ private String operationsInsightsWarehouseId = null; /** - * Unique Operations Insights Warehouse identifier + * Unique Ops Insights Warehouse identifier * @param operationsInsightsWarehouseId the value to set * @return this builder instance */ diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/responses/ChangeMacsManagedCloudDatabaseInsightConnectionResponse.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/responses/ChangeMacsManagedCloudDatabaseInsightConnectionResponse.java new file mode 100644 index 00000000000..fb53fad990c --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/responses/ChangeMacsManagedCloudDatabaseInsightConnectionResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.responses; + +import com.oracle.bmc.opsi.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +public class ChangeMacsManagedCloudDatabaseInsightConnectionResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private ChangeMacsManagedCloudDatabaseInsightConnectionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeMacsManagedCloudDatabaseInsightConnectionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeMacsManagedCloudDatabaseInsightConnectionResponse build() { + return new ChangeMacsManagedCloudDatabaseInsightConnectionResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeMacsManagedCloudDatabaseInsightConnectionResponse)) { + return false; + } + + ChangeMacsManagedCloudDatabaseInsightConnectionResponse other = + (ChangeMacsManagedCloudDatabaseInsightConnectionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/responses/IngestMySqlSqlStatsResponse.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/responses/IngestMySqlSqlStatsResponse.java new file mode 100644 index 00000000000..e26dd22a58a --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/responses/IngestMySqlSqlStatsResponse.java @@ -0,0 +1,227 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.responses; + +import com.oracle.bmc.opsi.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +public class IngestMySqlSqlStatsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned IngestMySqlSqlStatsResponseDetails instance. + */ + private com.oracle.bmc.opsi.model.IngestMySqlSqlStatsResponseDetails + ingestMySqlSqlStatsResponseDetails; + + /** + * The returned IngestMySqlSqlStatsResponseDetails instance. + * @return the value + */ + public com.oracle.bmc.opsi.model.IngestMySqlSqlStatsResponseDetails + getIngestMySqlSqlStatsResponseDetails() { + return ingestMySqlSqlStatsResponseDetails; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "ingestMySqlSqlStatsResponseDetails" + }) + private IngestMySqlSqlStatsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.opsi.model.IngestMySqlSqlStatsResponseDetails + ingestMySqlSqlStatsResponseDetails) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.ingestMySqlSqlStatsResponseDetails = ingestMySqlSqlStatsResponseDetails; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned IngestMySqlSqlStatsResponseDetails instance. + */ + private com.oracle.bmc.opsi.model.IngestMySqlSqlStatsResponseDetails + ingestMySqlSqlStatsResponseDetails; + + /** + * The returned IngestMySqlSqlStatsResponseDetails instance. + * @param ingestMySqlSqlStatsResponseDetails the value to set + * @return this builder + */ + public Builder ingestMySqlSqlStatsResponseDetails( + com.oracle.bmc.opsi.model.IngestMySqlSqlStatsResponseDetails + ingestMySqlSqlStatsResponseDetails) { + this.ingestMySqlSqlStatsResponseDetails = ingestMySqlSqlStatsResponseDetails; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(IngestMySqlSqlStatsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + ingestMySqlSqlStatsResponseDetails(o.getIngestMySqlSqlStatsResponseDetails()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public IngestMySqlSqlStatsResponse build() { + return new IngestMySqlSqlStatsResponse( + __httpStatusCode__, + headers, + opcRequestId, + etag, + ingestMySqlSqlStatsResponseDetails); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",ingestMySqlSqlStatsResponseDetails=") + .append(String.valueOf(ingestMySqlSqlStatsResponseDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof IngestMySqlSqlStatsResponse)) { + return false; + } + + IngestMySqlSqlStatsResponse other = (IngestMySqlSqlStatsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals( + this.ingestMySqlSqlStatsResponseDetails, + other.ingestMySqlSqlStatsResponseDetails); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.ingestMySqlSqlStatsResponseDetails == null + ? 43 + : this.ingestMySqlSqlStatsResponseDetails.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/responses/IngestMySqlSqlTextResponse.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/responses/IngestMySqlSqlTextResponse.java new file mode 100644 index 00000000000..b67178db264 --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/responses/IngestMySqlSqlTextResponse.java @@ -0,0 +1,227 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.responses; + +import com.oracle.bmc.opsi.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +public class IngestMySqlSqlTextResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned IngestMySqlSqlTextResponseDetails instance. + */ + private com.oracle.bmc.opsi.model.IngestMySqlSqlTextResponseDetails + ingestMySqlSqlTextResponseDetails; + + /** + * The returned IngestMySqlSqlTextResponseDetails instance. + * @return the value + */ + public com.oracle.bmc.opsi.model.IngestMySqlSqlTextResponseDetails + getIngestMySqlSqlTextResponseDetails() { + return ingestMySqlSqlTextResponseDetails; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "ingestMySqlSqlTextResponseDetails" + }) + private IngestMySqlSqlTextResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.opsi.model.IngestMySqlSqlTextResponseDetails + ingestMySqlSqlTextResponseDetails) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.ingestMySqlSqlTextResponseDetails = ingestMySqlSqlTextResponseDetails; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned IngestMySqlSqlTextResponseDetails instance. + */ + private com.oracle.bmc.opsi.model.IngestMySqlSqlTextResponseDetails + ingestMySqlSqlTextResponseDetails; + + /** + * The returned IngestMySqlSqlTextResponseDetails instance. + * @param ingestMySqlSqlTextResponseDetails the value to set + * @return this builder + */ + public Builder ingestMySqlSqlTextResponseDetails( + com.oracle.bmc.opsi.model.IngestMySqlSqlTextResponseDetails + ingestMySqlSqlTextResponseDetails) { + this.ingestMySqlSqlTextResponseDetails = ingestMySqlSqlTextResponseDetails; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(IngestMySqlSqlTextResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + ingestMySqlSqlTextResponseDetails(o.getIngestMySqlSqlTextResponseDetails()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public IngestMySqlSqlTextResponse build() { + return new IngestMySqlSqlTextResponse( + __httpStatusCode__, + headers, + opcRequestId, + etag, + ingestMySqlSqlTextResponseDetails); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",ingestMySqlSqlTextResponseDetails=") + .append(String.valueOf(ingestMySqlSqlTextResponseDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof IngestMySqlSqlTextResponse)) { + return false; + } + + IngestMySqlSqlTextResponse other = (IngestMySqlSqlTextResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals( + this.ingestMySqlSqlTextResponseDetails, + other.ingestMySqlSqlTextResponseDetails); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.ingestMySqlSqlTextResponseDetails == null + ? 43 + : this.ingestMySqlSqlTextResponseDetails.hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/responses/SummarizeHostInsightIoUsageTrendResponse.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/responses/SummarizeHostInsightIoUsageTrendResponse.java new file mode 100644 index 00000000000..8b1e94c6aea --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/responses/SummarizeHostInsightIoUsageTrendResponse.java @@ -0,0 +1,240 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.responses; + +import com.oracle.bmc.opsi.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +public class SummarizeHostInsightIoUsageTrendResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned SummarizeHostInsightIoUsageTrendAggregationCollection instance. + */ + private com.oracle.bmc.opsi.model.SummarizeHostInsightIoUsageTrendAggregationCollection + summarizeHostInsightIoUsageTrendAggregationCollection; + + /** + * The returned SummarizeHostInsightIoUsageTrendAggregationCollection instance. + * @return the value + */ + public com.oracle.bmc.opsi.model.SummarizeHostInsightIoUsageTrendAggregationCollection + getSummarizeHostInsightIoUsageTrendAggregationCollection() { + return summarizeHostInsightIoUsageTrendAggregationCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "summarizeHostInsightIoUsageTrendAggregationCollection" + }) + private SummarizeHostInsightIoUsageTrendResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.opsi.model.SummarizeHostInsightIoUsageTrendAggregationCollection + summarizeHostInsightIoUsageTrendAggregationCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.summarizeHostInsightIoUsageTrendAggregationCollection = + summarizeHostInsightIoUsageTrendAggregationCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned SummarizeHostInsightIoUsageTrendAggregationCollection instance. + */ + private com.oracle.bmc.opsi.model.SummarizeHostInsightIoUsageTrendAggregationCollection + summarizeHostInsightIoUsageTrendAggregationCollection; + + /** + * The returned SummarizeHostInsightIoUsageTrendAggregationCollection instance. + * @param summarizeHostInsightIoUsageTrendAggregationCollection the value to set + * @return this builder + */ + public Builder summarizeHostInsightIoUsageTrendAggregationCollection( + com.oracle.bmc.opsi.model.SummarizeHostInsightIoUsageTrendAggregationCollection + summarizeHostInsightIoUsageTrendAggregationCollection) { + this.summarizeHostInsightIoUsageTrendAggregationCollection = + summarizeHostInsightIoUsageTrendAggregationCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(SummarizeHostInsightIoUsageTrendResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + summarizeHostInsightIoUsageTrendAggregationCollection( + o.getSummarizeHostInsightIoUsageTrendAggregationCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public SummarizeHostInsightIoUsageTrendResponse build() { + return new SummarizeHostInsightIoUsageTrendResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + summarizeHostInsightIoUsageTrendAggregationCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",summarizeHostInsightIoUsageTrendAggregationCollection=") + .append(String.valueOf(summarizeHostInsightIoUsageTrendAggregationCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SummarizeHostInsightIoUsageTrendResponse)) { + return false; + } + + SummarizeHostInsightIoUsageTrendResponse other = + (SummarizeHostInsightIoUsageTrendResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.summarizeHostInsightIoUsageTrendAggregationCollection, + other.summarizeHostInsightIoUsageTrendAggregationCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.summarizeHostInsightIoUsageTrendAggregationCollection == null + ? 43 + : this.summarizeHostInsightIoUsageTrendAggregationCollection + .hashCode()); + return result; + } +} diff --git a/bmc-opsi/src/main/java/com/oracle/bmc/opsi/responses/TestMacsManagedCloudDatabaseInsightConnectionResponse.java b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/responses/TestMacsManagedCloudDatabaseInsightConnectionResponse.java new file mode 100644 index 00000000000..3b22bdce4ab --- /dev/null +++ b/bmc-opsi/src/main/java/com/oracle/bmc/opsi/responses/TestMacsManagedCloudDatabaseInsightConnectionResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.opsi.responses; + +import com.oracle.bmc.opsi.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20200630") +public class TestMacsManagedCloudDatabaseInsightConnectionResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private TestMacsManagedCloudDatabaseInsightConnectionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(TestMacsManagedCloudDatabaseInsightConnectionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public TestMacsManagedCloudDatabaseInsightConnectionResponse build() { + return new TestMacsManagedCloudDatabaseInsightConnectionResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof TestMacsManagedCloudDatabaseInsightConnectionResponse)) { + return false; + } + + TestMacsManagedCloudDatabaseInsightConnectionResponse other = + (TestMacsManagedCloudDatabaseInsightConnectionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-optimizer/pom.xml b/bmc-optimizer/pom.xml index 26cb87b38fd..03efed9cf0e 100644 --- a/bmc-optimizer/pom.xml +++ b/bmc-optimizer/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-optimizer @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-osmanagement/pom.xml b/bmc-osmanagement/pom.xml index dd4ff4698fe..6b0bfc51e63 100644 --- a/bmc-osmanagement/pom.xml +++ b/bmc-osmanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-osmanagement @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-osmanagementhub/pom.xml b/bmc-osmanagementhub/pom.xml index 737cfbe2881..69b2deb224a 100644 --- a/bmc-osmanagementhub/pom.xml +++ b/bmc-osmanagementhub/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-osmanagementhub @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/SoftwareSource.java b/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/SoftwareSource.java index a9d605ca5ea..48f87bf2c40 100644 --- a/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/SoftwareSource.java +++ b/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/SoftwareSource.java @@ -106,7 +106,7 @@ ChangeSoftwareSourceCompartmentResponse changeSoftwareSourceCompartment( ChangeSoftwareSourceCompartmentRequest request); /** - * Registers the necessary entitlement credentials for OS vendor software sources. + * Registers the necessary entitlement credentials for OS vendor software sources for a tenancy. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation diff --git a/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/SoftwareSourceAsync.java b/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/SoftwareSourceAsync.java index ee8c02cebb0..837b728ac9e 100644 --- a/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/SoftwareSourceAsync.java +++ b/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/SoftwareSourceAsync.java @@ -118,7 +118,7 @@ java.util.concurrent.Future addPackagesToSo handler); /** - * Registers the necessary entitlement credentials for OS vendor software sources. + * Registers the necessary entitlement credentials for OS vendor software sources for a tenancy. * * * @param request The request object containing the details to send diff --git a/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/model/CreateCustomSoftwareSourceDetails.java b/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/model/CreateCustomSoftwareSourceDetails.java index 4b637ecbc31..1e80387b2bb 100644 --- a/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/model/CreateCustomSoftwareSourceDetails.java +++ b/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/model/CreateCustomSoftwareSourceDetails.java @@ -146,6 +146,34 @@ public Builder isCreatedFromPackageList(Boolean isCreatedFromPackageList) { this.__explicitlySet__.add("isCreatedFromPackageList"); return this; } + /** + * Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + * * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + * * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + * * For a package filter that does not specify a version, this will include only the latest available version of the package. + * * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + * * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isLatestContentOnly") + private Boolean isLatestContentOnly; + + /** + * Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + * * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + * * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + * * For a package filter that does not specify a version, this will include only the latest available version of the package. + * * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + * * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + * + * @param isLatestContentOnly the value to set + * @return this builder + **/ + public Builder isLatestContentOnly(Boolean isLatestContentOnly) { + this.isLatestContentOnly = isLatestContentOnly; + this.__explicitlySet__.add("isLatestContentOnly"); + return this; + } /** * A property used for compatibility only. It doesn't provide a complete list of packages. See {@link #addPackagesToSoftwareSourceDetails(AddPackagesToSoftwareSourceDetailsRequest) addPackagesToSoftwareSourceDetails} for providing the list of packages used to create the software source when isCreatedFromPackageList is set to true. **/ @@ -179,6 +207,7 @@ public CreateCustomSoftwareSourceDetails build() { this.isAutomaticallyUpdated, this.isAutoResolveDependencies, this.isCreatedFromPackageList, + this.isLatestContentOnly, this.packages); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -218,6 +247,9 @@ public Builder copy(CreateCustomSoftwareSourceDetails model) { if (model.wasPropertyExplicitlySet("isCreatedFromPackageList")) { this.isCreatedFromPackageList(model.getIsCreatedFromPackageList()); } + if (model.wasPropertyExplicitlySet("isLatestContentOnly")) { + this.isLatestContentOnly(model.getIsLatestContentOnly()); + } if (model.wasPropertyExplicitlySet("packages")) { this.packages(model.getPackages()); } @@ -248,6 +280,7 @@ public CreateCustomSoftwareSourceDetails( Boolean isAutomaticallyUpdated, Boolean isAutoResolveDependencies, Boolean isCreatedFromPackageList, + Boolean isLatestContentOnly, java.util.List packages) { super(compartmentId, displayName, description, freeformTags, definedTags); this.vendorSoftwareSources = vendorSoftwareSources; @@ -255,6 +288,7 @@ public CreateCustomSoftwareSourceDetails( this.isAutomaticallyUpdated = isAutomaticallyUpdated; this.isAutoResolveDependencies = isAutoResolveDependencies; this.isCreatedFromPackageList = isCreatedFromPackageList; + this.isLatestContentOnly = isLatestContentOnly; this.packages = packages; } @@ -321,6 +355,32 @@ public Boolean getIsCreatedFromPackageList() { return isCreatedFromPackageList; } + /** + * Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + * * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + * * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + * * For a package filter that does not specify a version, this will include only the latest available version of the package. + * * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + * * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isLatestContentOnly") + private final Boolean isLatestContentOnly; + + /** + * Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + * * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + * * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + * * For a package filter that does not specify a version, this will include only the latest available version of the package. + * * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + * * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + * + * @return the value + **/ + public Boolean getIsLatestContentOnly() { + return isLatestContentOnly; + } + /** * A property used for compatibility only. It doesn't provide a complete list of packages. See {@link #addPackagesToSoftwareSourceDetails(AddPackagesToSoftwareSourceDetailsRequest) addPackagesToSoftwareSourceDetails} for providing the list of packages used to create the software source when isCreatedFromPackageList is set to true. **/ @@ -357,6 +417,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.isAutoResolveDependencies)); sb.append(", isCreatedFromPackageList=") .append(String.valueOf(this.isCreatedFromPackageList)); + sb.append(", isLatestContentOnly=").append(String.valueOf(this.isLatestContentOnly)); sb.append(", packages=").append(String.valueOf(this.packages)); sb.append(")"); return sb.toString(); @@ -381,6 +442,7 @@ public boolean equals(Object o) { this.isAutoResolveDependencies, other.isAutoResolveDependencies) && java.util.Objects.equals( this.isCreatedFromPackageList, other.isCreatedFromPackageList) + && java.util.Objects.equals(this.isLatestContentOnly, other.isLatestContentOnly) && java.util.Objects.equals(this.packages, other.packages) && super.equals(other); } @@ -414,6 +476,11 @@ public int hashCode() { + (this.isCreatedFromPackageList == null ? 43 : this.isCreatedFromPackageList.hashCode()); + result = + (result * PRIME) + + (this.isLatestContentOnly == null + ? 43 + : this.isLatestContentOnly.hashCode()); result = (result * PRIME) + (this.packages == null ? 43 : this.packages.hashCode()); return result; } diff --git a/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/model/CreateVersionedCustomSoftwareSourceDetails.java b/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/model/CreateVersionedCustomSoftwareSourceDetails.java index b86db63f743..c1151799007 100644 --- a/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/model/CreateVersionedCustomSoftwareSourceDetails.java +++ b/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/model/CreateVersionedCustomSoftwareSourceDetails.java @@ -146,6 +146,34 @@ public Builder isCreatedFromPackageList(Boolean isCreatedFromPackageList) { this.__explicitlySet__.add("isCreatedFromPackageList"); return this; } + /** + * Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + * * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + * * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + * * For a package filter that does not specify a version, this will include only the latest available version of the package. + * * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + * * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isLatestContentOnly") + private Boolean isLatestContentOnly; + + /** + * Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + * * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + * * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + * * For a package filter that does not specify a version, this will include only the latest available version of the package. + * * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + * * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + * + * @param isLatestContentOnly the value to set + * @return this builder + **/ + public Builder isLatestContentOnly(Boolean isLatestContentOnly) { + this.isLatestContentOnly = isLatestContentOnly; + this.__explicitlySet__.add("isLatestContentOnly"); + return this; + } /** * A property used for compatibility only. It doesn't provide a complete list of packages. See {@link #addPackagesToSoftwareSourceDetails(AddPackagesToSoftwareSourceDetailsRequest) addPackagesToSoftwareSourceDetails} for providing the list of packages used to create the software source when isCreatedFromPackageList is set to true. **/ @@ -179,6 +207,7 @@ public CreateVersionedCustomSoftwareSourceDetails build() { this.softwareSourceVersion, this.isAutoResolveDependencies, this.isCreatedFromPackageList, + this.isLatestContentOnly, this.packages); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -218,6 +247,9 @@ public Builder copy(CreateVersionedCustomSoftwareSourceDetails model) { if (model.wasPropertyExplicitlySet("isCreatedFromPackageList")) { this.isCreatedFromPackageList(model.getIsCreatedFromPackageList()); } + if (model.wasPropertyExplicitlySet("isLatestContentOnly")) { + this.isLatestContentOnly(model.getIsLatestContentOnly()); + } if (model.wasPropertyExplicitlySet("packages")) { this.packages(model.getPackages()); } @@ -248,6 +280,7 @@ public CreateVersionedCustomSoftwareSourceDetails( String softwareSourceVersion, Boolean isAutoResolveDependencies, Boolean isCreatedFromPackageList, + Boolean isLatestContentOnly, java.util.List packages) { super(compartmentId, displayName, description, freeformTags, definedTags); this.vendorSoftwareSources = vendorSoftwareSources; @@ -255,6 +288,7 @@ public CreateVersionedCustomSoftwareSourceDetails( this.softwareSourceVersion = softwareSourceVersion; this.isAutoResolveDependencies = isAutoResolveDependencies; this.isCreatedFromPackageList = isCreatedFromPackageList; + this.isLatestContentOnly = isLatestContentOnly; this.packages = packages; } @@ -321,6 +355,32 @@ public Boolean getIsCreatedFromPackageList() { return isCreatedFromPackageList; } + /** + * Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + * * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + * * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + * * For a package filter that does not specify a version, this will include only the latest available version of the package. + * * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + * * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isLatestContentOnly") + private final Boolean isLatestContentOnly; + + /** + * Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + * * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + * * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + * * For a package filter that does not specify a version, this will include only the latest available version of the package. + * * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + * * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + * + * @return the value + **/ + public Boolean getIsLatestContentOnly() { + return isLatestContentOnly; + } + /** * A property used for compatibility only. It doesn't provide a complete list of packages. See {@link #addPackagesToSoftwareSourceDetails(AddPackagesToSoftwareSourceDetailsRequest) addPackagesToSoftwareSourceDetails} for providing the list of packages used to create the software source when isCreatedFromPackageList is set to true. **/ @@ -357,6 +417,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.isAutoResolveDependencies)); sb.append(", isCreatedFromPackageList=") .append(String.valueOf(this.isCreatedFromPackageList)); + sb.append(", isLatestContentOnly=").append(String.valueOf(this.isLatestContentOnly)); sb.append(", packages=").append(String.valueOf(this.packages)); sb.append(")"); return sb.toString(); @@ -381,6 +442,7 @@ public boolean equals(Object o) { this.isAutoResolveDependencies, other.isAutoResolveDependencies) && java.util.Objects.equals( this.isCreatedFromPackageList, other.isCreatedFromPackageList) + && java.util.Objects.equals(this.isLatestContentOnly, other.isLatestContentOnly) && java.util.Objects.equals(this.packages, other.packages) && super.equals(other); } @@ -414,6 +476,11 @@ public int hashCode() { + (this.isCreatedFromPackageList == null ? 43 : this.isCreatedFromPackageList.hashCode()); + result = + (result * PRIME) + + (this.isLatestContentOnly == null + ? 43 + : this.isLatestContentOnly.hashCode()); result = (result * PRIME) + (this.packages == null ? 43 : this.packages.hashCode()); return result; } diff --git a/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/model/CustomSoftwareSource.java b/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/model/CustomSoftwareSource.java index 0936c3557c8..7f266095a5c 100644 --- a/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/model/CustomSoftwareSource.java +++ b/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/model/CustomSoftwareSource.java @@ -290,6 +290,34 @@ public Builder isCreatedFromPackageList(Boolean isCreatedFromPackageList) { this.__explicitlySet__.add("isCreatedFromPackageList"); return this; } + /** + * Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + * * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + * * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + * * For a package filter that does not specify a version, this will include only the latest available version of the package. + * * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + * * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isLatestContentOnly") + private Boolean isLatestContentOnly; + + /** + * Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + * * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + * * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + * * For a package filter that does not specify a version, this will include only the latest available version of the package. + * * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + * * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + * + * @param isLatestContentOnly the value to set + * @return this builder + **/ + public Builder isLatestContentOnly(Boolean isLatestContentOnly) { + this.isLatestContentOnly = isLatestContentOnly; + this.__explicitlySet__.add("isLatestContentOnly"); + return this; + } /** * The packages in the software source. **/ @@ -339,6 +367,7 @@ public CustomSoftwareSource build() { this.isAutomaticallyUpdated, this.isAutoResolveDependencies, this.isCreatedFromPackageList, + this.isLatestContentOnly, this.packages); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -426,6 +455,9 @@ public Builder copy(CustomSoftwareSource model) { if (model.wasPropertyExplicitlySet("isCreatedFromPackageList")) { this.isCreatedFromPackageList(model.getIsCreatedFromPackageList()); } + if (model.wasPropertyExplicitlySet("isLatestContentOnly")) { + this.isLatestContentOnly(model.getIsLatestContentOnly()); + } if (model.wasPropertyExplicitlySet("packages")) { this.packages(model.getPackages()); } @@ -472,6 +504,7 @@ public CustomSoftwareSource( Boolean isAutomaticallyUpdated, Boolean isAutoResolveDependencies, Boolean isCreatedFromPackageList, + Boolean isLatestContentOnly, java.util.List packages) { super( id, @@ -500,6 +533,7 @@ public CustomSoftwareSource( this.isAutomaticallyUpdated = isAutomaticallyUpdated; this.isAutoResolveDependencies = isAutoResolveDependencies; this.isCreatedFromPackageList = isCreatedFromPackageList; + this.isLatestContentOnly = isLatestContentOnly; this.packages = packages; } @@ -566,6 +600,32 @@ public Boolean getIsCreatedFromPackageList() { return isCreatedFromPackageList; } + /** + * Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + * * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + * * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + * * For a package filter that does not specify a version, this will include only the latest available version of the package. + * * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + * * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isLatestContentOnly") + private final Boolean isLatestContentOnly; + + /** + * Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + * * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + * * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + * * For a package filter that does not specify a version, this will include only the latest available version of the package. + * * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + * * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + * + * @return the value + **/ + public Boolean getIsLatestContentOnly() { + return isLatestContentOnly; + } + /** * The packages in the software source. **/ @@ -602,6 +662,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.isAutoResolveDependencies)); sb.append(", isCreatedFromPackageList=") .append(String.valueOf(this.isCreatedFromPackageList)); + sb.append(", isLatestContentOnly=").append(String.valueOf(this.isLatestContentOnly)); sb.append(", packages=").append(String.valueOf(this.packages)); sb.append(")"); return sb.toString(); @@ -626,6 +687,7 @@ public boolean equals(Object o) { this.isAutoResolveDependencies, other.isAutoResolveDependencies) && java.util.Objects.equals( this.isCreatedFromPackageList, other.isCreatedFromPackageList) + && java.util.Objects.equals(this.isLatestContentOnly, other.isLatestContentOnly) && java.util.Objects.equals(this.packages, other.packages) && super.equals(other); } @@ -659,6 +721,11 @@ public int hashCode() { + (this.isCreatedFromPackageList == null ? 43 : this.isCreatedFromPackageList.hashCode()); + result = + (result * PRIME) + + (this.isLatestContentOnly == null + ? 43 + : this.isLatestContentOnly.hashCode()); result = (result * PRIME) + (this.packages == null ? 43 : this.packages.hashCode()); return result; } diff --git a/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/model/UpdateCustomSoftwareSourceDetails.java b/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/model/UpdateCustomSoftwareSourceDetails.java index f1674df04fe..0ea973cb930 100644 --- a/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/model/UpdateCustomSoftwareSourceDetails.java +++ b/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/model/UpdateCustomSoftwareSourceDetails.java @@ -130,6 +130,34 @@ public Builder isAutoResolveDependencies(Boolean isAutoResolveDependencies) { this.__explicitlySet__.add("isAutoResolveDependencies"); return this; } + /** + * Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + * * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + * * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + * * For a package filter that does not specify a version, this will include only the latest available version of the package. + * * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + * * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isLatestContentOnly") + private Boolean isLatestContentOnly; + + /** + * Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + * * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + * * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + * * For a package filter that does not specify a version, this will include only the latest available version of the package. + * * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + * * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + * + * @param isLatestContentOnly the value to set + * @return this builder + **/ + public Builder isLatestContentOnly(Boolean isLatestContentOnly) { + this.isLatestContentOnly = isLatestContentOnly; + this.__explicitlySet__.add("isLatestContentOnly"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -145,7 +173,8 @@ public UpdateCustomSoftwareSourceDetails build() { this.vendorSoftwareSources, this.customSoftwareSourceFilter, this.isAutomaticallyUpdated, - this.isAutoResolveDependencies); + this.isAutoResolveDependencies, + this.isLatestContentOnly); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -181,6 +210,9 @@ public Builder copy(UpdateCustomSoftwareSourceDetails model) { if (model.wasPropertyExplicitlySet("isAutoResolveDependencies")) { this.isAutoResolveDependencies(model.getIsAutoResolveDependencies()); } + if (model.wasPropertyExplicitlySet("isLatestContentOnly")) { + this.isLatestContentOnly(model.getIsLatestContentOnly()); + } return this; } } @@ -206,12 +238,14 @@ public UpdateCustomSoftwareSourceDetails( java.util.List vendorSoftwareSources, CustomSoftwareSourceFilter customSoftwareSourceFilter, Boolean isAutomaticallyUpdated, - Boolean isAutoResolveDependencies) { + Boolean isAutoResolveDependencies, + Boolean isLatestContentOnly) { super(compartmentId, displayName, description, freeformTags, definedTags); this.vendorSoftwareSources = vendorSoftwareSources; this.customSoftwareSourceFilter = customSoftwareSourceFilter; this.isAutomaticallyUpdated = isAutomaticallyUpdated; this.isAutoResolveDependencies = isAutoResolveDependencies; + this.isLatestContentOnly = isLatestContentOnly; } /** @@ -263,6 +297,32 @@ public Boolean getIsAutoResolveDependencies() { return isAutoResolveDependencies; } + /** + * Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + * * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + * * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + * * For a package filter that does not specify a version, this will include only the latest available version of the package. + * * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + * * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isLatestContentOnly") + private final Boolean isLatestContentOnly; + + /** + * Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + * * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + * * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + * * For a package filter that does not specify a version, this will include only the latest available version of the package. + * * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + * * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + * + * @return the value + **/ + public Boolean getIsLatestContentOnly() { + return isLatestContentOnly; + } + @Override public String toString() { return this.toString(true); @@ -283,6 +343,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", isAutomaticallyUpdated=").append(String.valueOf(this.isAutomaticallyUpdated)); sb.append(", isAutoResolveDependencies=") .append(String.valueOf(this.isAutoResolveDependencies)); + sb.append(", isLatestContentOnly=").append(String.valueOf(this.isLatestContentOnly)); sb.append(")"); return sb.toString(); } @@ -304,6 +365,7 @@ public boolean equals(Object o) { this.isAutomaticallyUpdated, other.isAutomaticallyUpdated) && java.util.Objects.equals( this.isAutoResolveDependencies, other.isAutoResolveDependencies) + && java.util.Objects.equals(this.isLatestContentOnly, other.isLatestContentOnly) && super.equals(other); } @@ -331,6 +393,11 @@ public int hashCode() { + (this.isAutoResolveDependencies == null ? 43 : this.isAutoResolveDependencies.hashCode()); + result = + (result * PRIME) + + (this.isLatestContentOnly == null + ? 43 + : this.isLatestContentOnly.hashCode()); return result; } } diff --git a/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/model/VersionedCustomSoftwareSource.java b/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/model/VersionedCustomSoftwareSource.java index 4dbdb22710f..56636cf8116 100644 --- a/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/model/VersionedCustomSoftwareSource.java +++ b/bmc-osmanagementhub/src/main/java/com/oracle/bmc/osmanagementhub/model/VersionedCustomSoftwareSource.java @@ -290,6 +290,34 @@ public Builder isCreatedFromPackageList(Boolean isCreatedFromPackageList) { this.__explicitlySet__.add("isCreatedFromPackageList"); return this; } + /** + * Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + * * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + * * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + * * For a package filter that does not specify a version, this will include only the latest available version of the package. + * * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + * * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isLatestContentOnly") + private Boolean isLatestContentOnly; + + /** + * Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + * * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + * * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + * * For a package filter that does not specify a version, this will include only the latest available version of the package. + * * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + * * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + * + * @param isLatestContentOnly the value to set + * @return this builder + **/ + public Builder isLatestContentOnly(Boolean isLatestContentOnly) { + this.isLatestContentOnly = isLatestContentOnly; + this.__explicitlySet__.add("isLatestContentOnly"); + return this; + } /** * The packages in the software source. **/ @@ -339,6 +367,7 @@ public VersionedCustomSoftwareSource build() { this.softwareSourceVersion, this.isAutoResolveDependencies, this.isCreatedFromPackageList, + this.isLatestContentOnly, this.packages); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -426,6 +455,9 @@ public Builder copy(VersionedCustomSoftwareSource model) { if (model.wasPropertyExplicitlySet("isCreatedFromPackageList")) { this.isCreatedFromPackageList(model.getIsCreatedFromPackageList()); } + if (model.wasPropertyExplicitlySet("isLatestContentOnly")) { + this.isLatestContentOnly(model.getIsLatestContentOnly()); + } if (model.wasPropertyExplicitlySet("packages")) { this.packages(model.getPackages()); } @@ -472,6 +504,7 @@ public VersionedCustomSoftwareSource( String softwareSourceVersion, Boolean isAutoResolveDependencies, Boolean isCreatedFromPackageList, + Boolean isLatestContentOnly, java.util.List packages) { super( id, @@ -500,6 +533,7 @@ public VersionedCustomSoftwareSource( this.softwareSourceVersion = softwareSourceVersion; this.isAutoResolveDependencies = isAutoResolveDependencies; this.isCreatedFromPackageList = isCreatedFromPackageList; + this.isLatestContentOnly = isLatestContentOnly; this.packages = packages; } @@ -566,6 +600,32 @@ public Boolean getIsCreatedFromPackageList() { return isCreatedFromPackageList; } + /** + * Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + * * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + * * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + * * For a package filter that does not specify a version, this will include only the latest available version of the package. + * * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + * * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isLatestContentOnly") + private final Boolean isLatestContentOnly; + + /** + * Indicates whether the software source will include only the latest versions of content from vendor software sources, while accounting for other constraints set in the custom or versioned custom software source (such as a package list or filters). + * * For a module filter that does not specify a stream, this will include all available streams, and within each stream only the latest version of packages. + * * For a module filter that does specify a stream, this will include only the latest version of packages for the specified stream. + * * For a package filter that does not specify a version, this will include only the latest available version of the package. + * * For a package filter that does specify a version, this will include only the specified version of the package (the isLatestContentOnly attribute is ignored). + * * For a package list, this will include only the specified version of packages and modules in the list (the isLatestContentOnly attribute is ignored). + * + * @return the value + **/ + public Boolean getIsLatestContentOnly() { + return isLatestContentOnly; + } + /** * The packages in the software source. **/ @@ -602,6 +662,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.isAutoResolveDependencies)); sb.append(", isCreatedFromPackageList=") .append(String.valueOf(this.isCreatedFromPackageList)); + sb.append(", isLatestContentOnly=").append(String.valueOf(this.isLatestContentOnly)); sb.append(", packages=").append(String.valueOf(this.packages)); sb.append(")"); return sb.toString(); @@ -625,6 +686,7 @@ public boolean equals(Object o) { this.isAutoResolveDependencies, other.isAutoResolveDependencies) && java.util.Objects.equals( this.isCreatedFromPackageList, other.isCreatedFromPackageList) + && java.util.Objects.equals(this.isLatestContentOnly, other.isLatestContentOnly) && java.util.Objects.equals(this.packages, other.packages) && super.equals(other); } @@ -658,6 +720,11 @@ public int hashCode() { + (this.isCreatedFromPackageList == null ? 43 : this.isCreatedFromPackageList.hashCode()); + result = + (result * PRIME) + + (this.isLatestContentOnly == null + ? 43 + : this.isLatestContentOnly.hashCode()); result = (result * PRIME) + (this.packages == null ? 43 : this.packages.hashCode()); return result; } diff --git a/bmc-ospgateway/pom.xml b/bmc-ospgateway/pom.xml index 45ac354a216..e2eaebbfce5 100644 --- a/bmc-ospgateway/pom.xml +++ b/bmc-ospgateway/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-ospgateway @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-osubbillingschedule/pom.xml b/bmc-osubbillingschedule/pom.xml index 2179ea1c1cc..72454b31c46 100644 --- a/bmc-osubbillingschedule/pom.xml +++ b/bmc-osubbillingschedule/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-osubbillingschedule @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-osuborganizationsubscription/pom.xml b/bmc-osuborganizationsubscription/pom.xml index a3286dd3a3f..af76d177c1d 100644 --- a/bmc-osuborganizationsubscription/pom.xml +++ b/bmc-osuborganizationsubscription/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-osuborganizationsubscription @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-osubsubscription/pom.xml b/bmc-osubsubscription/pom.xml index 1afb2c23588..2a8170c423c 100644 --- a/bmc-osubsubscription/pom.xml +++ b/bmc-osubsubscription/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-osubsubscription @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-osubusage/pom.xml b/bmc-osubusage/pom.xml index 7d6ee7f1a15..6ba96219793 100644 --- a/bmc-osubusage/pom.xml +++ b/bmc-osubusage/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-osubusage @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-psql/pom.xml b/bmc-psql/pom.xml index c85955d6ef2..85e3d990eb3 100644 --- a/bmc-psql/pom.xml +++ b/bmc-psql/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-psql @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/Backup.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/Backup.java index f4d2d6cdc43..cd3b1474bd1 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/Backup.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/Backup.java @@ -162,7 +162,7 @@ public Builder sourceType(SourceType sourceType) { return this; } /** - * The date and time the backup was created, expressed in + * The date and time the backup request was received, expressed in * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. *

* Example: {@code 2016-08-25T21:10:29.600Z} @@ -172,7 +172,7 @@ public Builder sourceType(SourceType sourceType) { private java.util.Date timeCreated; /** - * The date and time the backup was created, expressed in + * The date and time the backup request was received, expressed in * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. *

* Example: {@code 2016-08-25T21:10:29.600Z} @@ -612,7 +612,7 @@ public SourceType getSourceType() { } /** - * The date and time the backup was created, expressed in + * The date and time the backup request was received, expressed in * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. *

* Example: {@code 2016-08-25T21:10:29.600Z} @@ -622,7 +622,7 @@ public SourceType getSourceType() { private final java.util.Date timeCreated; /** - * The date and time the backup was created, expressed in + * The date and time the backup request was received, expressed in * [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. *

* Example: {@code 2016-08-25T21:10:29.600Z} diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupSummary.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupSummary.java index 6f83ccfaf52..cdad839ba36 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupSummary.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/BackupSummary.java @@ -198,13 +198,13 @@ public Builder lifecycleDetails(String lifecycleDetails) { return this; } /** - * Specifies whether the backup was created manually, or by a management policy. + * Specifies whether the backup was created manually, taken on schedule defined in the a backup policy, or copied from the remote location. **/ @com.fasterxml.jackson.annotation.JsonProperty("sourceType") private Backup.SourceType sourceType; /** - * Specifies whether the backup was created manually, or by a management policy. + * Specifies whether the backup was created manually, taken on schedule defined in the a backup policy, or copied from the remote location. * @param sourceType the value to set * @return this builder **/ @@ -523,13 +523,13 @@ public String getLifecycleDetails() { } /** - * Specifies whether the backup was created manually, or by a management policy. + * Specifies whether the backup was created manually, taken on schedule defined in the a backup policy, or copied from the remote location. **/ @com.fasterxml.jackson.annotation.JsonProperty("sourceType") private final Backup.SourceType sourceType; /** - * Specifies whether the backup was created manually, or by a management policy. + * Specifies whether the backup was created manually, taken on schedule defined in the a backup policy, or copied from the remote location. * @return the value **/ public Backup.SourceType getSourceType() { diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/Configuration.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/Configuration.java index 4c335021ec8..9bb44fe2e45 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/Configuration.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/Configuration.java @@ -27,10 +27,12 @@ public final class Configuration extends com.oracle.bmc.http.internal.Explicitly "timeCreated", "lifecycleState", "lifecycleDetails", + "dbVersion", + "configType", "shape", + "isFlexible", "instanceOcpuCount", "instanceMemorySizeInGBs", - "dbVersion", "configurationDetails", "freeformTags", "definedTags", @@ -44,10 +46,12 @@ public Configuration( java.util.Date timeCreated, LifecycleState lifecycleState, String lifecycleDetails, + String dbVersion, + ConfigType configType, String shape, + Boolean isFlexible, Integer instanceOcpuCount, Integer instanceMemorySizeInGBs, - String dbVersion, ConfigurationDetails configurationDetails, java.util.Map freeformTags, java.util.Map> definedTags, @@ -60,10 +64,12 @@ public Configuration( this.timeCreated = timeCreated; this.lifecycleState = lifecycleState; this.lifecycleDetails = lifecycleDetails; + this.dbVersion = dbVersion; + this.configType = configType; this.shape = shape; + this.isFlexible = isFlexible; this.instanceOcpuCount = instanceOcpuCount; this.instanceMemorySizeInGBs = instanceMemorySizeInGBs; - this.dbVersion = dbVersion; this.configurationDetails = configurationDetails; this.freeformTags = freeformTags; this.definedTags = definedTags; @@ -192,6 +198,38 @@ public Builder lifecycleDetails(String lifecycleDetails) { this.__explicitlySet__.add("lifecycleDetails"); return this; } + /** + * Version of the PostgreSQL database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") + private String dbVersion; + + /** + * Version of the PostgreSQL database. + * @param dbVersion the value to set + * @return this builder + **/ + public Builder dbVersion(String dbVersion) { + this.dbVersion = dbVersion; + this.__explicitlySet__.add("dbVersion"); + return this; + } + /** + * The type of configuration. Either user-created or a default configuration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("configType") + private ConfigType configType; + + /** + * The type of configuration. Either user-created or a default configuration. + * @param configType the value to set + * @return this builder + **/ + public Builder configType(ConfigType configType) { + this.configType = configType; + this.__explicitlySet__.add("configType"); + return this; + } /** * The name of the shape for the configuration. * Example: {@code VM.Standard.E4.Flex} @@ -212,8 +250,26 @@ public Builder shape(String shape) { this.__explicitlySet__.add("shape"); return this; } + /** + * Whether the configuration supports flexible shapes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFlexible") + private Boolean isFlexible; + + /** + * Whether the configuration supports flexible shapes. + * @param isFlexible the value to set + * @return this builder + **/ + public Builder isFlexible(Boolean isFlexible) { + this.isFlexible = isFlexible; + this.__explicitlySet__.add("isFlexible"); + return this; + } /** * CPU core count. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceOcpuCount") @@ -221,6 +277,8 @@ public Builder shape(String shape) { /** * CPU core count. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * * @param instanceOcpuCount the value to set * @return this builder @@ -232,6 +290,8 @@ public Builder instanceOcpuCount(Integer instanceOcpuCount) { } /** * Memory size in gigabytes with 1GB increment. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceMemorySizeInGBs") @@ -239,6 +299,8 @@ public Builder instanceOcpuCount(Integer instanceOcpuCount) { /** * Memory size in gigabytes with 1GB increment. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * * @param instanceMemorySizeInGBs the value to set * @return this builder @@ -248,22 +310,6 @@ public Builder instanceMemorySizeInGBs(Integer instanceMemorySizeInGBs) { this.__explicitlySet__.add("instanceMemorySizeInGBs"); return this; } - /** - * Version of the PostgreSQL database. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") - private String dbVersion; - - /** - * Version of the PostgreSQL database. - * @param dbVersion the value to set - * @return this builder - **/ - public Builder dbVersion(String dbVersion) { - this.dbVersion = dbVersion; - this.__explicitlySet__.add("dbVersion"); - return this; - } @com.fasterxml.jackson.annotation.JsonProperty("configurationDetails") private ConfigurationDetails configurationDetails; @@ -348,10 +394,12 @@ public Configuration build() { this.timeCreated, this.lifecycleState, this.lifecycleDetails, + this.dbVersion, + this.configType, this.shape, + this.isFlexible, this.instanceOcpuCount, this.instanceMemorySizeInGBs, - this.dbVersion, this.configurationDetails, this.freeformTags, this.definedTags, @@ -385,18 +433,24 @@ public Builder copy(Configuration model) { if (model.wasPropertyExplicitlySet("lifecycleDetails")) { this.lifecycleDetails(model.getLifecycleDetails()); } + if (model.wasPropertyExplicitlySet("dbVersion")) { + this.dbVersion(model.getDbVersion()); + } + if (model.wasPropertyExplicitlySet("configType")) { + this.configType(model.getConfigType()); + } if (model.wasPropertyExplicitlySet("shape")) { this.shape(model.getShape()); } + if (model.wasPropertyExplicitlySet("isFlexible")) { + this.isFlexible(model.getIsFlexible()); + } if (model.wasPropertyExplicitlySet("instanceOcpuCount")) { this.instanceOcpuCount(model.getInstanceOcpuCount()); } if (model.wasPropertyExplicitlySet("instanceMemorySizeInGBs")) { this.instanceMemorySizeInGBs(model.getInstanceMemorySizeInGBs()); } - if (model.wasPropertyExplicitlySet("dbVersion")) { - this.dbVersion(model.getDbVersion()); - } if (model.wasPropertyExplicitlySet("configurationDetails")) { this.configurationDetails(model.getConfigurationDetails()); } @@ -580,6 +634,82 @@ public String getLifecycleDetails() { return lifecycleDetails; } + /** + * Version of the PostgreSQL database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") + private final String dbVersion; + + /** + * Version of the PostgreSQL database. + * @return the value + **/ + public String getDbVersion() { + return dbVersion; + } + + /** + * The type of configuration. Either user-created or a default configuration. + **/ + public enum ConfigType { + Default("DEFAULT"), + Custom("CUSTOM"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ConfigType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ConfigType v : ConfigType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ConfigType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ConfigType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ConfigType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The type of configuration. Either user-created or a default configuration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("configType") + private final ConfigType configType; + + /** + * The type of configuration. Either user-created or a default configuration. + * @return the value + **/ + public ConfigType getConfigType() { + return configType; + } + /** * The name of the shape for the configuration. * Example: {@code VM.Standard.E4.Flex} @@ -598,8 +728,24 @@ public String getShape() { return shape; } + /** + * Whether the configuration supports flexible shapes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFlexible") + private final Boolean isFlexible; + + /** + * Whether the configuration supports flexible shapes. + * @return the value + **/ + public Boolean getIsFlexible() { + return isFlexible; + } + /** * CPU core count. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceOcpuCount") @@ -607,6 +753,8 @@ public String getShape() { /** * CPU core count. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * * @return the value **/ @@ -616,6 +764,8 @@ public Integer getInstanceOcpuCount() { /** * Memory size in gigabytes with 1GB increment. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceMemorySizeInGBs") @@ -623,6 +773,8 @@ public Integer getInstanceOcpuCount() { /** * Memory size in gigabytes with 1GB increment. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * * @return the value **/ @@ -630,20 +782,6 @@ public Integer getInstanceMemorySizeInGBs() { return instanceMemorySizeInGBs; } - /** - * Version of the PostgreSQL database. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") - private final String dbVersion; - - /** - * Version of the PostgreSQL database. - * @return the value - **/ - public String getDbVersion() { - return dbVersion; - } - @com.fasterxml.jackson.annotation.JsonProperty("configurationDetails") private final ConfigurationDetails configurationDetails; @@ -726,11 +864,13 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", dbVersion=").append(String.valueOf(this.dbVersion)); + sb.append(", configType=").append(String.valueOf(this.configType)); sb.append(", shape=").append(String.valueOf(this.shape)); + sb.append(", isFlexible=").append(String.valueOf(this.isFlexible)); sb.append(", instanceOcpuCount=").append(String.valueOf(this.instanceOcpuCount)); sb.append(", instanceMemorySizeInGBs=") .append(String.valueOf(this.instanceMemorySizeInGBs)); - sb.append(", dbVersion=").append(String.valueOf(this.dbVersion)); sb.append(", configurationDetails=").append(String.valueOf(this.configurationDetails)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); @@ -756,11 +896,13 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.dbVersion, other.dbVersion) + && java.util.Objects.equals(this.configType, other.configType) && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.isFlexible, other.isFlexible) && java.util.Objects.equals(this.instanceOcpuCount, other.instanceOcpuCount) && java.util.Objects.equals( this.instanceMemorySizeInGBs, other.instanceMemorySizeInGBs) - && java.util.Objects.equals(this.dbVersion, other.dbVersion) && java.util.Objects.equals(this.configurationDetails, other.configurationDetails) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) @@ -785,7 +927,10 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.dbVersion == null ? 43 : this.dbVersion.hashCode()); + result = (result * PRIME) + (this.configType == null ? 43 : this.configType.hashCode()); result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); + result = (result * PRIME) + (this.isFlexible == null ? 43 : this.isFlexible.hashCode()); result = (result * PRIME) + (this.instanceOcpuCount == null ? 43 : this.instanceOcpuCount.hashCode()); @@ -794,7 +939,6 @@ public int hashCode() { + (this.instanceMemorySizeInGBs == null ? 43 : this.instanceMemorySizeInGBs.hashCode()); - result = (result * PRIME) + (this.dbVersion == null ? 43 : this.dbVersion.hashCode()); result = (result * PRIME) + (this.configurationDetails == null diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ConfigurationSummary.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ConfigurationSummary.java index 5d7c2efc6a8..9c51f7a8f19 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ConfigurationSummary.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ConfigurationSummary.java @@ -28,8 +28,9 @@ public final class ConfigurationSummary extends com.oracle.bmc.http.internal.Exp "timeCreated", "lifecycleState", "lifecycleDetails", - "shape", "dbVersion", + "shape", + "isFlexible", "instanceOcpuCount", "instanceMemorySizeInGBs", "freeformTags", @@ -43,8 +44,9 @@ public ConfigurationSummary( java.util.Date timeCreated, Configuration.LifecycleState lifecycleState, String lifecycleDetails, - String shape, String dbVersion, + String shape, + Boolean isFlexible, Integer instanceOcpuCount, Integer instanceMemorySizeInGBs, java.util.Map freeformTags, @@ -57,8 +59,9 @@ public ConfigurationSummary( this.timeCreated = timeCreated; this.lifecycleState = lifecycleState; this.lifecycleDetails = lifecycleDetails; - this.shape = shape; this.dbVersion = dbVersion; + this.shape = shape; + this.isFlexible = isFlexible; this.instanceOcpuCount = instanceOcpuCount; this.instanceMemorySizeInGBs = instanceMemorySizeInGBs; this.freeformTags = freeformTags; @@ -172,6 +175,22 @@ public Builder lifecycleDetails(String lifecycleDetails) { this.__explicitlySet__.add("lifecycleDetails"); return this; } + /** + * Version of the PostgreSQL database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") + private String dbVersion; + + /** + * Version of the PostgreSQL database. + * @param dbVersion the value to set + * @return this builder + **/ + public Builder dbVersion(String dbVersion) { + this.dbVersion = dbVersion; + this.__explicitlySet__.add("dbVersion"); + return this; + } /** * The name of the shape for the configuration. * Example: {@code VM.Standard.E4.Flex} @@ -193,23 +212,25 @@ public Builder shape(String shape) { return this; } /** - * Version of the PostgreSQL database. + * Whether the configuration supports flexible shapes. **/ - @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") - private String dbVersion; + @com.fasterxml.jackson.annotation.JsonProperty("isFlexible") + private Boolean isFlexible; /** - * Version of the PostgreSQL database. - * @param dbVersion the value to set + * Whether the configuration supports flexible shapes. + * @param isFlexible the value to set * @return this builder **/ - public Builder dbVersion(String dbVersion) { - this.dbVersion = dbVersion; - this.__explicitlySet__.add("dbVersion"); + public Builder isFlexible(Boolean isFlexible) { + this.isFlexible = isFlexible; + this.__explicitlySet__.add("isFlexible"); return this; } /** * CPU core count. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceOcpuCount") @@ -217,6 +238,8 @@ public Builder dbVersion(String dbVersion) { /** * CPU core count. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * * @param instanceOcpuCount the value to set * @return this builder @@ -228,6 +251,8 @@ public Builder instanceOcpuCount(Integer instanceOcpuCount) { } /** * Memory size in gigabytes with 1GB increment. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceMemorySizeInGBs") @@ -235,6 +260,8 @@ public Builder instanceOcpuCount(Integer instanceOcpuCount) { /** * Memory size in gigabytes with 1GB increment. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * * @param instanceMemorySizeInGBs the value to set * @return this builder @@ -318,8 +345,9 @@ public ConfigurationSummary build() { this.timeCreated, this.lifecycleState, this.lifecycleDetails, - this.shape, this.dbVersion, + this.shape, + this.isFlexible, this.instanceOcpuCount, this.instanceMemorySizeInGBs, this.freeformTags, @@ -351,11 +379,14 @@ public Builder copy(ConfigurationSummary model) { if (model.wasPropertyExplicitlySet("lifecycleDetails")) { this.lifecycleDetails(model.getLifecycleDetails()); } + if (model.wasPropertyExplicitlySet("dbVersion")) { + this.dbVersion(model.getDbVersion()); + } if (model.wasPropertyExplicitlySet("shape")) { this.shape(model.getShape()); } - if (model.wasPropertyExplicitlySet("dbVersion")) { - this.dbVersion(model.getDbVersion()); + if (model.wasPropertyExplicitlySet("isFlexible")) { + this.isFlexible(model.getIsFlexible()); } if (model.wasPropertyExplicitlySet("instanceOcpuCount")) { this.instanceOcpuCount(model.getInstanceOcpuCount()); @@ -479,6 +510,20 @@ public String getLifecycleDetails() { return lifecycleDetails; } + /** + * Version of the PostgreSQL database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") + private final String dbVersion; + + /** + * Version of the PostgreSQL database. + * @return the value + **/ + public String getDbVersion() { + return dbVersion; + } + /** * The name of the shape for the configuration. * Example: {@code VM.Standard.E4.Flex} @@ -498,21 +543,23 @@ public String getShape() { } /** - * Version of the PostgreSQL database. + * Whether the configuration supports flexible shapes. **/ - @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") - private final String dbVersion; + @com.fasterxml.jackson.annotation.JsonProperty("isFlexible") + private final Boolean isFlexible; /** - * Version of the PostgreSQL database. + * Whether the configuration supports flexible shapes. * @return the value **/ - public String getDbVersion() { - return dbVersion; + public Boolean getIsFlexible() { + return isFlexible; } /** * CPU core count. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceOcpuCount") @@ -520,6 +567,8 @@ public String getDbVersion() { /** * CPU core count. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * * @return the value **/ @@ -529,6 +578,8 @@ public Integer getInstanceOcpuCount() { /** * Memory size in gigabytes with 1GB increment. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceMemorySizeInGBs") @@ -536,6 +587,8 @@ public Integer getInstanceOcpuCount() { /** * Memory size in gigabytes with 1GB increment. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * * @return the value **/ @@ -617,8 +670,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); - sb.append(", shape=").append(String.valueOf(this.shape)); sb.append(", dbVersion=").append(String.valueOf(this.dbVersion)); + sb.append(", shape=").append(String.valueOf(this.shape)); + sb.append(", isFlexible=").append(String.valueOf(this.isFlexible)); sb.append(", instanceOcpuCount=").append(String.valueOf(this.instanceOcpuCount)); sb.append(", instanceMemorySizeInGBs=") .append(String.valueOf(this.instanceMemorySizeInGBs)); @@ -645,8 +699,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) - && java.util.Objects.equals(this.shape, other.shape) && java.util.Objects.equals(this.dbVersion, other.dbVersion) + && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.isFlexible, other.isFlexible) && java.util.Objects.equals(this.instanceOcpuCount, other.instanceOcpuCount) && java.util.Objects.equals( this.instanceMemorySizeInGBs, other.instanceMemorySizeInGBs) @@ -672,8 +727,9 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); - result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); result = (result * PRIME) + (this.dbVersion == null ? 43 : this.dbVersion.hashCode()); + result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); + result = (result * PRIME) + (this.isFlexible == null ? 43 : this.isFlexible.hashCode()); result = (result * PRIME) + (this.instanceOcpuCount == null ? 43 : this.instanceOcpuCount.hashCode()); diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ConnectionDetails.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ConnectionDetails.java index 462286729fc..ffa0adf8a2e 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ConnectionDetails.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ConnectionDetails.java @@ -21,15 +21,22 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class ConnectionDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"caCertificate", "primaryDbEndpoint", "instanceEndpoints"}) + @java.beans.ConstructorProperties({ + "caCertificate", + "primaryDbEndpoint", + "instanceEndpoints", + "readerEndpoint" + }) public ConnectionDetails( String caCertificate, Endpoint primaryDbEndpoint, - java.util.List instanceEndpoints) { + java.util.List instanceEndpoints, + Endpoint readerEndpoint) { super(); this.caCertificate = caCertificate; this.primaryDbEndpoint = primaryDbEndpoint; this.instanceEndpoints = instanceEndpoints; + this.readerEndpoint = readerEndpoint; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -82,13 +89,25 @@ public Builder instanceEndpoints(java.util.List instanceEndp return this; } + @com.fasterxml.jackson.annotation.JsonProperty("readerEndpoint") + private Endpoint readerEndpoint; + + public Builder readerEndpoint(Endpoint readerEndpoint) { + this.readerEndpoint = readerEndpoint; + this.__explicitlySet__.add("readerEndpoint"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public ConnectionDetails build() { ConnectionDetails model = new ConnectionDetails( - this.caCertificate, this.primaryDbEndpoint, this.instanceEndpoints); + this.caCertificate, + this.primaryDbEndpoint, + this.instanceEndpoints, + this.readerEndpoint); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -106,6 +125,9 @@ public Builder copy(ConnectionDetails model) { if (model.wasPropertyExplicitlySet("instanceEndpoints")) { this.instanceEndpoints(model.getInstanceEndpoints()); } + if (model.wasPropertyExplicitlySet("readerEndpoint")) { + this.readerEndpoint(model.getReaderEndpoint()); + } return this; } } @@ -162,6 +184,13 @@ public java.util.List getInstanceEndpoints() { return instanceEndpoints; } + @com.fasterxml.jackson.annotation.JsonProperty("readerEndpoint") + private final Endpoint readerEndpoint; + + public Endpoint getReaderEndpoint() { + return readerEndpoint; + } + @Override public String toString() { return this.toString(true); @@ -179,6 +208,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("caCertificate=").append(String.valueOf(this.caCertificate)); sb.append(", primaryDbEndpoint=").append(String.valueOf(this.primaryDbEndpoint)); sb.append(", instanceEndpoints=").append(String.valueOf(this.instanceEndpoints)); + sb.append(", readerEndpoint=").append(String.valueOf(this.readerEndpoint)); sb.append(")"); return sb.toString(); } @@ -196,6 +226,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.caCertificate, other.caCertificate) && java.util.Objects.equals(this.primaryDbEndpoint, other.primaryDbEndpoint) && java.util.Objects.equals(this.instanceEndpoints, other.instanceEndpoints) + && java.util.Objects.equals(this.readerEndpoint, other.readerEndpoint) && super.equals(other); } @@ -212,6 +243,9 @@ public int hashCode() { result = (result * PRIME) + (this.instanceEndpoints == null ? 43 : this.instanceEndpoints.hashCode()); + result = + (result * PRIME) + + (this.readerEndpoint == null ? 43 : this.readerEndpoint.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/CreateConfigurationDetails.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/CreateConfigurationDetails.java index 2753e9da664..cba268e664b 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/CreateConfigurationDetails.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/CreateConfigurationDetails.java @@ -26,8 +26,9 @@ public final class CreateConfigurationDetails "displayName", "compartmentId", "description", - "shape", "dbVersion", + "shape", + "isFlexible", "instanceOcpuCount", "instanceMemorySizeInGBs", "dbConfigurationOverrides", @@ -39,8 +40,9 @@ public CreateConfigurationDetails( String displayName, String compartmentId, String description, - String shape, String dbVersion, + String shape, + Boolean isFlexible, Integer instanceOcpuCount, Integer instanceMemorySizeInGBs, DbConfigurationOverrideCollection dbConfigurationOverrides, @@ -51,8 +53,9 @@ public CreateConfigurationDetails( this.displayName = displayName; this.compartmentId = compartmentId; this.description = description; - this.shape = shape; this.dbVersion = dbVersion; + this.shape = shape; + this.isFlexible = isFlexible; this.instanceOcpuCount = instanceOcpuCount; this.instanceMemorySizeInGBs = instanceMemorySizeInGBs; this.dbConfigurationOverrides = dbConfigurationOverrides; @@ -111,6 +114,22 @@ public Builder description(String description) { this.__explicitlySet__.add("description"); return this; } + /** + * Version of the PostgreSQL database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") + private String dbVersion; + + /** + * Version of the PostgreSQL database. + * @param dbVersion the value to set + * @return this builder + **/ + public Builder dbVersion(String dbVersion) { + this.dbVersion = dbVersion; + this.__explicitlySet__.add("dbVersion"); + return this; + } /** * The name of the shape for the configuration. * Example: {@code VM.Standard.E4.Flex} @@ -132,23 +151,25 @@ public Builder shape(String shape) { return this; } /** - * Version of the PostgreSQL database. + * Whether the configuration supports flexible shapes. **/ - @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") - private String dbVersion; + @com.fasterxml.jackson.annotation.JsonProperty("isFlexible") + private Boolean isFlexible; /** - * Version of the PostgreSQL database. - * @param dbVersion the value to set + * Whether the configuration supports flexible shapes. + * @param isFlexible the value to set * @return this builder **/ - public Builder dbVersion(String dbVersion) { - this.dbVersion = dbVersion; - this.__explicitlySet__.add("dbVersion"); + public Builder isFlexible(Boolean isFlexible) { + this.isFlexible = isFlexible; + this.__explicitlySet__.add("isFlexible"); return this; } /** * CPU core count. + *

+ * Skip or set it's value to 0 if configuration is for a flexible shape. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceOcpuCount") @@ -156,6 +177,8 @@ public Builder dbVersion(String dbVersion) { /** * CPU core count. + *

+ * Skip or set it's value to 0 if configuration is for a flexible shape. * * @param instanceOcpuCount the value to set * @return this builder @@ -167,6 +190,8 @@ public Builder instanceOcpuCount(Integer instanceOcpuCount) { } /** * Memory size in gigabytes with 1GB increment. + *

+ * Skip or set it's value to 0 if configuration is for a flexible shape. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceMemorySizeInGBs") @@ -174,6 +199,8 @@ public Builder instanceOcpuCount(Integer instanceOcpuCount) { /** * Memory size in gigabytes with 1GB increment. + *

+ * Skip or set it's value to 0 if configuration is for a flexible shape. * * @param instanceMemorySizeInGBs the value to set * @return this builder @@ -264,8 +291,9 @@ public CreateConfigurationDetails build() { this.displayName, this.compartmentId, this.description, - this.shape, this.dbVersion, + this.shape, + this.isFlexible, this.instanceOcpuCount, this.instanceMemorySizeInGBs, this.dbConfigurationOverrides, @@ -289,11 +317,14 @@ public Builder copy(CreateConfigurationDetails model) { if (model.wasPropertyExplicitlySet("description")) { this.description(model.getDescription()); } + if (model.wasPropertyExplicitlySet("dbVersion")) { + this.dbVersion(model.getDbVersion()); + } if (model.wasPropertyExplicitlySet("shape")) { this.shape(model.getShape()); } - if (model.wasPropertyExplicitlySet("dbVersion")) { - this.dbVersion(model.getDbVersion()); + if (model.wasPropertyExplicitlySet("isFlexible")) { + this.isFlexible(model.getIsFlexible()); } if (model.wasPropertyExplicitlySet("instanceOcpuCount")) { this.instanceOcpuCount(model.getInstanceOcpuCount()); @@ -370,6 +401,20 @@ public String getDescription() { return description; } + /** + * Version of the PostgreSQL database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") + private final String dbVersion; + + /** + * Version of the PostgreSQL database. + * @return the value + **/ + public String getDbVersion() { + return dbVersion; + } + /** * The name of the shape for the configuration. * Example: {@code VM.Standard.E4.Flex} @@ -389,21 +434,23 @@ public String getShape() { } /** - * Version of the PostgreSQL database. + * Whether the configuration supports flexible shapes. **/ - @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") - private final String dbVersion; + @com.fasterxml.jackson.annotation.JsonProperty("isFlexible") + private final Boolean isFlexible; /** - * Version of the PostgreSQL database. + * Whether the configuration supports flexible shapes. * @return the value **/ - public String getDbVersion() { - return dbVersion; + public Boolean getIsFlexible() { + return isFlexible; } /** * CPU core count. + *

+ * Skip or set it's value to 0 if configuration is for a flexible shape. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceOcpuCount") @@ -411,6 +458,8 @@ public String getDbVersion() { /** * CPU core count. + *

+ * Skip or set it's value to 0 if configuration is for a flexible shape. * * @return the value **/ @@ -420,6 +469,8 @@ public Integer getInstanceOcpuCount() { /** * Memory size in gigabytes with 1GB increment. + *

+ * Skip or set it's value to 0 if configuration is for a flexible shape. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceMemorySizeInGBs") @@ -427,6 +478,8 @@ public Integer getInstanceOcpuCount() { /** * Memory size in gigabytes with 1GB increment. + *

+ * Skip or set it's value to 0 if configuration is for a flexible shape. * * @return the value **/ @@ -512,8 +565,9 @@ public String toString(boolean includeByteArrayContents) { sb.append("displayName=").append(String.valueOf(this.displayName)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", description=").append(String.valueOf(this.description)); - sb.append(", shape=").append(String.valueOf(this.shape)); sb.append(", dbVersion=").append(String.valueOf(this.dbVersion)); + sb.append(", shape=").append(String.valueOf(this.shape)); + sb.append(", isFlexible=").append(String.valueOf(this.isFlexible)); sb.append(", instanceOcpuCount=").append(String.valueOf(this.instanceOcpuCount)); sb.append(", instanceMemorySizeInGBs=") .append(String.valueOf(this.instanceMemorySizeInGBs)); @@ -539,8 +593,9 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.description, other.description) - && java.util.Objects.equals(this.shape, other.shape) && java.util.Objects.equals(this.dbVersion, other.dbVersion) + && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.isFlexible, other.isFlexible) && java.util.Objects.equals(this.instanceOcpuCount, other.instanceOcpuCount) && java.util.Objects.equals( this.instanceMemorySizeInGBs, other.instanceMemorySizeInGBs) @@ -561,8 +616,9 @@ public int hashCode() { (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); - result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); result = (result * PRIME) + (this.dbVersion == null ? 43 : this.dbVersion.hashCode()); + result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); + result = (result * PRIME) + (this.isFlexible == null ? 43 : this.isFlexible.hashCode()); result = (result * PRIME) + (this.instanceOcpuCount == null ? 43 : this.instanceOcpuCount.hashCode()); diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/DefaultConfiguration.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/DefaultConfiguration.java index d31cae25270..4401adbba82 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/DefaultConfiguration.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/DefaultConfiguration.java @@ -28,10 +28,11 @@ public final class DefaultConfiguration extends com.oracle.bmc.http.internal.Exp "timeCreated", "lifecycleState", "lifecycleDetails", + "dbVersion", "shape", + "isFlexible", "instanceOcpuCount", "instanceMemorySizeInGBs", - "dbVersion", "configurationDetails" }) public DefaultConfiguration( @@ -41,10 +42,11 @@ public DefaultConfiguration( java.util.Date timeCreated, LifecycleState lifecycleState, String lifecycleDetails, + String dbVersion, String shape, + Boolean isFlexible, Integer instanceOcpuCount, Integer instanceMemorySizeInGBs, - String dbVersion, DefaultConfigurationDetails configurationDetails) { super(); this.id = id; @@ -53,10 +55,11 @@ public DefaultConfiguration( this.timeCreated = timeCreated; this.lifecycleState = lifecycleState; this.lifecycleDetails = lifecycleDetails; + this.dbVersion = dbVersion; this.shape = shape; + this.isFlexible = isFlexible; this.instanceOcpuCount = instanceOcpuCount; this.instanceMemorySizeInGBs = instanceMemorySizeInGBs; - this.dbVersion = dbVersion; this.configurationDetails = configurationDetails; } @@ -166,6 +169,22 @@ public Builder lifecycleDetails(String lifecycleDetails) { this.__explicitlySet__.add("lifecycleDetails"); return this; } + /** + * Version of the PostgreSQL database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") + private String dbVersion; + + /** + * Version of the PostgreSQL database. + * @param dbVersion the value to set + * @return this builder + **/ + public Builder dbVersion(String dbVersion) { + this.dbVersion = dbVersion; + this.__explicitlySet__.add("dbVersion"); + return this; + } /** * The name of the shape for the configuration. * Example: {@code VM.Standard.E4.Flex} @@ -187,14 +206,34 @@ public Builder shape(String shape) { return this; } /** - * CPU core count. Minimum value is 1. + * True if the configuration supports flexible shapes, false otherwise. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFlexible") + private Boolean isFlexible; + + /** + * True if the configuration supports flexible shapes, false otherwise. + * @param isFlexible the value to set + * @return this builder + **/ + public Builder isFlexible(Boolean isFlexible) { + this.isFlexible = isFlexible; + this.__explicitlySet__.add("isFlexible"); + return this; + } + /** + * CPU core count. + *

+ * Its value is set to 0 if configuration is for a flexible shape. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceOcpuCount") private Integer instanceOcpuCount; /** - * CPU core count. Minimum value is 1. + * CPU core count. + *

+ * Its value is set to 0 if configuration is for a flexible shape. * * @param instanceOcpuCount the value to set * @return this builder @@ -206,6 +245,8 @@ public Builder instanceOcpuCount(Integer instanceOcpuCount) { } /** * Memory size in gigabytes with 1GB increment. + *

+ * Its value is set to 0 if configuration is for a flexible shape. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceMemorySizeInGBs") @@ -213,6 +254,8 @@ public Builder instanceOcpuCount(Integer instanceOcpuCount) { /** * Memory size in gigabytes with 1GB increment. + *

+ * Its value is set to 0 if configuration is for a flexible shape. * * @param instanceMemorySizeInGBs the value to set * @return this builder @@ -222,22 +265,6 @@ public Builder instanceMemorySizeInGBs(Integer instanceMemorySizeInGBs) { this.__explicitlySet__.add("instanceMemorySizeInGBs"); return this; } - /** - * Version of the PostgreSQL database. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") - private String dbVersion; - - /** - * Version of the PostgreSQL database. - * @param dbVersion the value to set - * @return this builder - **/ - public Builder dbVersion(String dbVersion) { - this.dbVersion = dbVersion; - this.__explicitlySet__.add("dbVersion"); - return this; - } @com.fasterxml.jackson.annotation.JsonProperty("configurationDetails") private DefaultConfigurationDetails configurationDetails; @@ -260,10 +287,11 @@ public DefaultConfiguration build() { this.timeCreated, this.lifecycleState, this.lifecycleDetails, + this.dbVersion, this.shape, + this.isFlexible, this.instanceOcpuCount, this.instanceMemorySizeInGBs, - this.dbVersion, this.configurationDetails); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -291,18 +319,21 @@ public Builder copy(DefaultConfiguration model) { if (model.wasPropertyExplicitlySet("lifecycleDetails")) { this.lifecycleDetails(model.getLifecycleDetails()); } + if (model.wasPropertyExplicitlySet("dbVersion")) { + this.dbVersion(model.getDbVersion()); + } if (model.wasPropertyExplicitlySet("shape")) { this.shape(model.getShape()); } + if (model.wasPropertyExplicitlySet("isFlexible")) { + this.isFlexible(model.getIsFlexible()); + } if (model.wasPropertyExplicitlySet("instanceOcpuCount")) { this.instanceOcpuCount(model.getInstanceOcpuCount()); } if (model.wasPropertyExplicitlySet("instanceMemorySizeInGBs")) { this.instanceMemorySizeInGBs(model.getInstanceMemorySizeInGBs()); } - if (model.wasPropertyExplicitlySet("dbVersion")) { - this.dbVersion(model.getDbVersion()); - } if (model.wasPropertyExplicitlySet("configurationDetails")) { this.configurationDetails(model.getConfigurationDetails()); } @@ -464,6 +495,20 @@ public String getLifecycleDetails() { return lifecycleDetails; } + /** + * Version of the PostgreSQL database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") + private final String dbVersion; + + /** + * Version of the PostgreSQL database. + * @return the value + **/ + public String getDbVersion() { + return dbVersion; + } + /** * The name of the shape for the configuration. * Example: {@code VM.Standard.E4.Flex} @@ -483,14 +528,32 @@ public String getShape() { } /** - * CPU core count. Minimum value is 1. + * True if the configuration supports flexible shapes, false otherwise. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFlexible") + private final Boolean isFlexible; + + /** + * True if the configuration supports flexible shapes, false otherwise. + * @return the value + **/ + public Boolean getIsFlexible() { + return isFlexible; + } + + /** + * CPU core count. + *

+ * Its value is set to 0 if configuration is for a flexible shape. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceOcpuCount") private final Integer instanceOcpuCount; /** - * CPU core count. Minimum value is 1. + * CPU core count. + *

+ * Its value is set to 0 if configuration is for a flexible shape. * * @return the value **/ @@ -500,6 +563,8 @@ public Integer getInstanceOcpuCount() { /** * Memory size in gigabytes with 1GB increment. + *

+ * Its value is set to 0 if configuration is for a flexible shape. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceMemorySizeInGBs") @@ -507,6 +572,8 @@ public Integer getInstanceOcpuCount() { /** * Memory size in gigabytes with 1GB increment. + *

+ * Its value is set to 0 if configuration is for a flexible shape. * * @return the value **/ @@ -514,20 +581,6 @@ public Integer getInstanceMemorySizeInGBs() { return instanceMemorySizeInGBs; } - /** - * Version of the PostgreSQL database. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") - private final String dbVersion; - - /** - * Version of the PostgreSQL database. - * @return the value - **/ - public String getDbVersion() { - return dbVersion; - } - @com.fasterxml.jackson.annotation.JsonProperty("configurationDetails") private final DefaultConfigurationDetails configurationDetails; @@ -555,11 +608,12 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", dbVersion=").append(String.valueOf(this.dbVersion)); sb.append(", shape=").append(String.valueOf(this.shape)); + sb.append(", isFlexible=").append(String.valueOf(this.isFlexible)); sb.append(", instanceOcpuCount=").append(String.valueOf(this.instanceOcpuCount)); sb.append(", instanceMemorySizeInGBs=") .append(String.valueOf(this.instanceMemorySizeInGBs)); - sb.append(", dbVersion=").append(String.valueOf(this.dbVersion)); sb.append(", configurationDetails=").append(String.valueOf(this.configurationDetails)); sb.append(")"); return sb.toString(); @@ -581,11 +635,12 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.dbVersion, other.dbVersion) && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.isFlexible, other.isFlexible) && java.util.Objects.equals(this.instanceOcpuCount, other.instanceOcpuCount) && java.util.Objects.equals( this.instanceMemorySizeInGBs, other.instanceMemorySizeInGBs) - && java.util.Objects.equals(this.dbVersion, other.dbVersion) && java.util.Objects.equals(this.configurationDetails, other.configurationDetails) && super.equals(other); } @@ -604,7 +659,9 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.dbVersion == null ? 43 : this.dbVersion.hashCode()); result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); + result = (result * PRIME) + (this.isFlexible == null ? 43 : this.isFlexible.hashCode()); result = (result * PRIME) + (this.instanceOcpuCount == null ? 43 : this.instanceOcpuCount.hashCode()); @@ -613,7 +670,6 @@ public int hashCode() { + (this.instanceMemorySizeInGBs == null ? 43 : this.instanceMemorySizeInGBs.hashCode()); - result = (result * PRIME) + (this.dbVersion == null ? 43 : this.dbVersion.hashCode()); result = (result * PRIME) + (this.configurationDetails == null diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/DefaultConfigurationSummary.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/DefaultConfigurationSummary.java index df4e7e856e3..6e0d8ab18a3 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/DefaultConfigurationSummary.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/DefaultConfigurationSummary.java @@ -28,8 +28,9 @@ public final class DefaultConfigurationSummary "timeCreated", "lifecycleState", "lifecycleDetails", - "shape", "dbVersion", + "shape", + "isFlexible", "instanceOcpuCount", "instanceMemorySizeInGBs" }) @@ -39,8 +40,9 @@ public DefaultConfigurationSummary( java.util.Date timeCreated, DefaultConfiguration.LifecycleState lifecycleState, String lifecycleDetails, - String shape, String dbVersion, + String shape, + Boolean isFlexible, Integer instanceOcpuCount, Integer instanceMemorySizeInGBs) { super(); @@ -49,8 +51,9 @@ public DefaultConfigurationSummary( this.timeCreated = timeCreated; this.lifecycleState = lifecycleState; this.lifecycleDetails = lifecycleDetails; - this.shape = shape; this.dbVersion = dbVersion; + this.shape = shape; + this.isFlexible = isFlexible; this.instanceOcpuCount = instanceOcpuCount; this.instanceMemorySizeInGBs = instanceMemorySizeInGBs; } @@ -145,6 +148,22 @@ public Builder lifecycleDetails(String lifecycleDetails) { this.__explicitlySet__.add("lifecycleDetails"); return this; } + /** + * Version of the PostgreSQL database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") + private String dbVersion; + + /** + * Version of the PostgreSQL database. + * @param dbVersion the value to set + * @return this builder + **/ + public Builder dbVersion(String dbVersion) { + this.dbVersion = dbVersion; + this.__explicitlySet__.add("dbVersion"); + return this; + } /** * The name of the shape for the configuration. * Example: {@code VM.Standard.E4.Flex} @@ -166,30 +185,34 @@ public Builder shape(String shape) { return this; } /** - * Version of the PostgreSQL database. + * True if the configuration supports flexible shapes, false otherwise. **/ - @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") - private String dbVersion; + @com.fasterxml.jackson.annotation.JsonProperty("isFlexible") + private Boolean isFlexible; /** - * Version of the PostgreSQL database. - * @param dbVersion the value to set + * True if the configuration supports flexible shapes, false otherwise. + * @param isFlexible the value to set * @return this builder **/ - public Builder dbVersion(String dbVersion) { - this.dbVersion = dbVersion; - this.__explicitlySet__.add("dbVersion"); + public Builder isFlexible(Boolean isFlexible) { + this.isFlexible = isFlexible; + this.__explicitlySet__.add("isFlexible"); return this; } /** - * CPU core count. Minimum value is 1. + * CPU core count. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceOcpuCount") private Integer instanceOcpuCount; /** - * CPU core count. Minimum value is 1. + * CPU core count. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * * @param instanceOcpuCount the value to set * @return this builder @@ -201,6 +224,8 @@ public Builder instanceOcpuCount(Integer instanceOcpuCount) { } /** * Memory size in gigabytes with 1GB increment. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceMemorySizeInGBs") @@ -208,6 +233,8 @@ public Builder instanceOcpuCount(Integer instanceOcpuCount) { /** * Memory size in gigabytes with 1GB increment. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * * @param instanceMemorySizeInGBs the value to set * @return this builder @@ -229,8 +256,9 @@ public DefaultConfigurationSummary build() { this.timeCreated, this.lifecycleState, this.lifecycleDetails, - this.shape, this.dbVersion, + this.shape, + this.isFlexible, this.instanceOcpuCount, this.instanceMemorySizeInGBs); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -256,11 +284,14 @@ public Builder copy(DefaultConfigurationSummary model) { if (model.wasPropertyExplicitlySet("lifecycleDetails")) { this.lifecycleDetails(model.getLifecycleDetails()); } + if (model.wasPropertyExplicitlySet("dbVersion")) { + this.dbVersion(model.getDbVersion()); + } if (model.wasPropertyExplicitlySet("shape")) { this.shape(model.getShape()); } - if (model.wasPropertyExplicitlySet("dbVersion")) { - this.dbVersion(model.getDbVersion()); + if (model.wasPropertyExplicitlySet("isFlexible")) { + this.isFlexible(model.getIsFlexible()); } if (model.wasPropertyExplicitlySet("instanceOcpuCount")) { this.instanceOcpuCount(model.getInstanceOcpuCount()); @@ -361,6 +392,20 @@ public String getLifecycleDetails() { return lifecycleDetails; } + /** + * Version of the PostgreSQL database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") + private final String dbVersion; + + /** + * Version of the PostgreSQL database. + * @return the value + **/ + public String getDbVersion() { + return dbVersion; + } + /** * The name of the shape for the configuration. * Example: {@code VM.Standard.E4.Flex} @@ -380,28 +425,32 @@ public String getShape() { } /** - * Version of the PostgreSQL database. + * True if the configuration supports flexible shapes, false otherwise. **/ - @com.fasterxml.jackson.annotation.JsonProperty("dbVersion") - private final String dbVersion; + @com.fasterxml.jackson.annotation.JsonProperty("isFlexible") + private final Boolean isFlexible; /** - * Version of the PostgreSQL database. + * True if the configuration supports flexible shapes, false otherwise. * @return the value **/ - public String getDbVersion() { - return dbVersion; + public Boolean getIsFlexible() { + return isFlexible; } /** - * CPU core count. Minimum value is 1. + * CPU core count. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceOcpuCount") private final Integer instanceOcpuCount; /** - * CPU core count. Minimum value is 1. + * CPU core count. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * * @return the value **/ @@ -411,6 +460,8 @@ public Integer getInstanceOcpuCount() { /** * Memory size in gigabytes with 1GB increment. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceMemorySizeInGBs") @@ -418,6 +469,8 @@ public Integer getInstanceOcpuCount() { /** * Memory size in gigabytes with 1GB increment. + *

+ * It's value is set to 0 if configuration is for a flexible shape. * * @return the value **/ @@ -444,8 +497,9 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); - sb.append(", shape=").append(String.valueOf(this.shape)); sb.append(", dbVersion=").append(String.valueOf(this.dbVersion)); + sb.append(", shape=").append(String.valueOf(this.shape)); + sb.append(", isFlexible=").append(String.valueOf(this.isFlexible)); sb.append(", instanceOcpuCount=").append(String.valueOf(this.instanceOcpuCount)); sb.append(", instanceMemorySizeInGBs=") .append(String.valueOf(this.instanceMemorySizeInGBs)); @@ -468,8 +522,9 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) - && java.util.Objects.equals(this.shape, other.shape) && java.util.Objects.equals(this.dbVersion, other.dbVersion) + && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.isFlexible, other.isFlexible) && java.util.Objects.equals(this.instanceOcpuCount, other.instanceOcpuCount) && java.util.Objects.equals( this.instanceMemorySizeInGBs, other.instanceMemorySizeInGBs) @@ -489,8 +544,9 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); - result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); result = (result * PRIME) + (this.dbVersion == null ? 43 : this.dbVersion.hashCode()); + result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); + result = (result * PRIME) + (this.isFlexible == null ? 43 : this.isFlexible.hashCode()); result = (result * PRIME) + (this.instanceOcpuCount == null ? 43 : this.instanceOcpuCount.hashCode()); diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ManagementPolicyDetails.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ManagementPolicyDetails.java index 67399480968..16728860fca 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ManagementPolicyDetails.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ManagementPolicyDetails.java @@ -32,14 +32,22 @@ public ManagementPolicyDetails(String maintenanceWindowStart, BackupPolicy backu @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The start of the maintenance window. + * The start of the maintenance window in UTC. + *

+ * This string is of the format: "{day-of-week} {time-of-day}". + * "{day-of-week}" is a case-insensitive string like "mon", "tue", &c. + * "{time-of-day}" is the "Time" portion of an RFC3339-formatted timestamp. Any second or sub-second time data will be truncated to zero. * **/ @com.fasterxml.jackson.annotation.JsonProperty("maintenanceWindowStart") private String maintenanceWindowStart; /** - * The start of the maintenance window. + * The start of the maintenance window in UTC. + *

+ * This string is of the format: "{day-of-week} {time-of-day}". + * "{day-of-week}" is a case-insensitive string like "mon", "tue", &c. + * "{time-of-day}" is the "Time" portion of an RFC3339-formatted timestamp. Any second or sub-second time data will be truncated to zero. * * @param maintenanceWindowStart the value to set * @return this builder @@ -95,14 +103,22 @@ public Builder toBuilder() { } /** - * The start of the maintenance window. + * The start of the maintenance window in UTC. + *

+ * This string is of the format: "{day-of-week} {time-of-day}". + * "{day-of-week}" is a case-insensitive string like "mon", "tue", &c. + * "{time-of-day}" is the "Time" portion of an RFC3339-formatted timestamp. Any second or sub-second time data will be truncated to zero. * **/ @com.fasterxml.jackson.annotation.JsonProperty("maintenanceWindowStart") private final String maintenanceWindowStart; /** - * The start of the maintenance window. + * The start of the maintenance window in UTC. + *

+ * This string is of the format: "{day-of-week} {time-of-day}". + * "{day-of-week}" is a case-insensitive string like "mon", "tue", &c. + * "{time-of-day}" is the "Time" portion of an RFC3339-formatted timestamp. Any second or sub-second time data will be truncated to zero. * * @return the value **/ diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/NetworkDetails.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/NetworkDetails.java index 0722cb554d3..376aeb1a37f 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/NetworkDetails.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/NetworkDetails.java @@ -19,13 +19,22 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class NetworkDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"subnetId", "primaryDbEndpointPrivateIp", "nsgIds"}) + @java.beans.ConstructorProperties({ + "subnetId", + "primaryDbEndpointPrivateIp", + "nsgIds", + "isReaderEndpointEnabled" + }) public NetworkDetails( - String subnetId, String primaryDbEndpointPrivateIp, java.util.List nsgIds) { + String subnetId, + String primaryDbEndpointPrivateIp, + java.util.List nsgIds, + Boolean isReaderEndpointEnabled) { super(); this.subnetId = subnetId; this.primaryDbEndpointPrivateIp = primaryDbEndpointPrivateIp; this.nsgIds = nsgIds; + this.isReaderEndpointEnabled = isReaderEndpointEnabled; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -82,13 +91,33 @@ public Builder nsgIds(java.util.List nsgIds) { this.__explicitlySet__.add("nsgIds"); return this; } + /** + * Specifies if the reader endpoint is enabled on the dbSystem. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isReaderEndpointEnabled") + private Boolean isReaderEndpointEnabled; + + /** + * Specifies if the reader endpoint is enabled on the dbSystem. + * @param isReaderEndpointEnabled the value to set + * @return this builder + **/ + public Builder isReaderEndpointEnabled(Boolean isReaderEndpointEnabled) { + this.isReaderEndpointEnabled = isReaderEndpointEnabled; + this.__explicitlySet__.add("isReaderEndpointEnabled"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public NetworkDetails build() { NetworkDetails model = - new NetworkDetails(this.subnetId, this.primaryDbEndpointPrivateIp, this.nsgIds); + new NetworkDetails( + this.subnetId, + this.primaryDbEndpointPrivateIp, + this.nsgIds, + this.isReaderEndpointEnabled); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -106,6 +135,9 @@ public Builder copy(NetworkDetails model) { if (model.wasPropertyExplicitlySet("nsgIds")) { this.nsgIds(model.getNsgIds()); } + if (model.wasPropertyExplicitlySet("isReaderEndpointEnabled")) { + this.isReaderEndpointEnabled(model.getIsReaderEndpointEnabled()); + } return this; } } @@ -167,6 +199,20 @@ public java.util.List getNsgIds() { return nsgIds; } + /** + * Specifies if the reader endpoint is enabled on the dbSystem. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isReaderEndpointEnabled") + private final Boolean isReaderEndpointEnabled; + + /** + * Specifies if the reader endpoint is enabled on the dbSystem. + * @return the value + **/ + public Boolean getIsReaderEndpointEnabled() { + return isReaderEndpointEnabled; + } + @Override public String toString() { return this.toString(true); @@ -185,6 +231,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", primaryDbEndpointPrivateIp=") .append(String.valueOf(this.primaryDbEndpointPrivateIp)); sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); + sb.append(", isReaderEndpointEnabled=") + .append(String.valueOf(this.isReaderEndpointEnabled)); sb.append(")"); return sb.toString(); } @@ -203,6 +251,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.primaryDbEndpointPrivateIp, other.primaryDbEndpointPrivateIp) && java.util.Objects.equals(this.nsgIds, other.nsgIds) + && java.util.Objects.equals( + this.isReaderEndpointEnabled, other.isReaderEndpointEnabled) && super.equals(other); } @@ -217,6 +267,11 @@ public int hashCode() { ? 43 : this.primaryDbEndpointPrivateIp.hashCode()); result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); + result = + (result * PRIME) + + (this.isReaderEndpointEnabled == null + ? 43 + : this.isReaderEndpointEnabled.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ShapeMemoryOptions.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ShapeMemoryOptions.java new file mode 100644 index 00000000000..1d293ca063d --- /dev/null +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ShapeMemoryOptions.java @@ -0,0 +1,308 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.psql.model; + +/** + * Options for the the shape memory + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220915") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ShapeMemoryOptions.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ShapeMemoryOptions extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "defaultPerOcpuInGBs", + "minInGBs", + "minPerOcpuInGBs", + "maxInGBs", + "maxPerOcpuInGBs" + }) + public ShapeMemoryOptions( + Integer defaultPerOcpuInGBs, + Integer minInGBs, + Integer minPerOcpuInGBs, + Integer maxInGBs, + Integer maxPerOcpuInGBs) { + super(); + this.defaultPerOcpuInGBs = defaultPerOcpuInGBs; + this.minInGBs = minInGBs; + this.minPerOcpuInGBs = minPerOcpuInGBs; + this.maxInGBs = maxInGBs; + this.maxPerOcpuInGBs = maxPerOcpuInGBs; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Default per OCPU configuration in GBs + **/ + @com.fasterxml.jackson.annotation.JsonProperty("defaultPerOcpuInGBs") + private Integer defaultPerOcpuInGBs; + + /** + * Default per OCPU configuration in GBs + * @param defaultPerOcpuInGBs the value to set + * @return this builder + **/ + public Builder defaultPerOcpuInGBs(Integer defaultPerOcpuInGBs) { + this.defaultPerOcpuInGBs = defaultPerOcpuInGBs; + this.__explicitlySet__.add("defaultPerOcpuInGBs"); + return this; + } + /** + * Minimum Memory configuration in GBs + **/ + @com.fasterxml.jackson.annotation.JsonProperty("minInGBs") + private Integer minInGBs; + + /** + * Minimum Memory configuration in GBs + * @param minInGBs the value to set + * @return this builder + **/ + public Builder minInGBs(Integer minInGBs) { + this.minInGBs = minInGBs; + this.__explicitlySet__.add("minInGBs"); + return this; + } + /** + * Minimum Memory configuration per OCPU in GBs + **/ + @com.fasterxml.jackson.annotation.JsonProperty("minPerOcpuInGBs") + private Integer minPerOcpuInGBs; + + /** + * Minimum Memory configuration per OCPU in GBs + * @param minPerOcpuInGBs the value to set + * @return this builder + **/ + public Builder minPerOcpuInGBs(Integer minPerOcpuInGBs) { + this.minPerOcpuInGBs = minPerOcpuInGBs; + this.__explicitlySet__.add("minPerOcpuInGBs"); + return this; + } + /** + * Maximum Memory configuration in GBs + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxInGBs") + private Integer maxInGBs; + + /** + * Maximum Memory configuration in GBs + * @param maxInGBs the value to set + * @return this builder + **/ + public Builder maxInGBs(Integer maxInGBs) { + this.maxInGBs = maxInGBs; + this.__explicitlySet__.add("maxInGBs"); + return this; + } + /** + * Maximum Memory configuration per OCPU in GBs + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxPerOcpuInGBs") + private Integer maxPerOcpuInGBs; + + /** + * Maximum Memory configuration per OCPU in GBs + * @param maxPerOcpuInGBs the value to set + * @return this builder + **/ + public Builder maxPerOcpuInGBs(Integer maxPerOcpuInGBs) { + this.maxPerOcpuInGBs = maxPerOcpuInGBs; + this.__explicitlySet__.add("maxPerOcpuInGBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ShapeMemoryOptions build() { + ShapeMemoryOptions model = + new ShapeMemoryOptions( + this.defaultPerOcpuInGBs, + this.minInGBs, + this.minPerOcpuInGBs, + this.maxInGBs, + this.maxPerOcpuInGBs); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ShapeMemoryOptions model) { + if (model.wasPropertyExplicitlySet("defaultPerOcpuInGBs")) { + this.defaultPerOcpuInGBs(model.getDefaultPerOcpuInGBs()); + } + if (model.wasPropertyExplicitlySet("minInGBs")) { + this.minInGBs(model.getMinInGBs()); + } + if (model.wasPropertyExplicitlySet("minPerOcpuInGBs")) { + this.minPerOcpuInGBs(model.getMinPerOcpuInGBs()); + } + if (model.wasPropertyExplicitlySet("maxInGBs")) { + this.maxInGBs(model.getMaxInGBs()); + } + if (model.wasPropertyExplicitlySet("maxPerOcpuInGBs")) { + this.maxPerOcpuInGBs(model.getMaxPerOcpuInGBs()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Default per OCPU configuration in GBs + **/ + @com.fasterxml.jackson.annotation.JsonProperty("defaultPerOcpuInGBs") + private final Integer defaultPerOcpuInGBs; + + /** + * Default per OCPU configuration in GBs + * @return the value + **/ + public Integer getDefaultPerOcpuInGBs() { + return defaultPerOcpuInGBs; + } + + /** + * Minimum Memory configuration in GBs + **/ + @com.fasterxml.jackson.annotation.JsonProperty("minInGBs") + private final Integer minInGBs; + + /** + * Minimum Memory configuration in GBs + * @return the value + **/ + public Integer getMinInGBs() { + return minInGBs; + } + + /** + * Minimum Memory configuration per OCPU in GBs + **/ + @com.fasterxml.jackson.annotation.JsonProperty("minPerOcpuInGBs") + private final Integer minPerOcpuInGBs; + + /** + * Minimum Memory configuration per OCPU in GBs + * @return the value + **/ + public Integer getMinPerOcpuInGBs() { + return minPerOcpuInGBs; + } + + /** + * Maximum Memory configuration in GBs + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxInGBs") + private final Integer maxInGBs; + + /** + * Maximum Memory configuration in GBs + * @return the value + **/ + public Integer getMaxInGBs() { + return maxInGBs; + } + + /** + * Maximum Memory configuration per OCPU in GBs + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maxPerOcpuInGBs") + private final Integer maxPerOcpuInGBs; + + /** + * Maximum Memory configuration per OCPU in GBs + * @return the value + **/ + public Integer getMaxPerOcpuInGBs() { + return maxPerOcpuInGBs; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ShapeMemoryOptions("); + sb.append("super=").append(super.toString()); + sb.append("defaultPerOcpuInGBs=").append(String.valueOf(this.defaultPerOcpuInGBs)); + sb.append(", minInGBs=").append(String.valueOf(this.minInGBs)); + sb.append(", minPerOcpuInGBs=").append(String.valueOf(this.minPerOcpuInGBs)); + sb.append(", maxInGBs=").append(String.valueOf(this.maxInGBs)); + sb.append(", maxPerOcpuInGBs=").append(String.valueOf(this.maxPerOcpuInGBs)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ShapeMemoryOptions)) { + return false; + } + + ShapeMemoryOptions other = (ShapeMemoryOptions) o; + return java.util.Objects.equals(this.defaultPerOcpuInGBs, other.defaultPerOcpuInGBs) + && java.util.Objects.equals(this.minInGBs, other.minInGBs) + && java.util.Objects.equals(this.minPerOcpuInGBs, other.minPerOcpuInGBs) + && java.util.Objects.equals(this.maxInGBs, other.maxInGBs) + && java.util.Objects.equals(this.maxPerOcpuInGBs, other.maxPerOcpuInGBs) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.defaultPerOcpuInGBs == null + ? 43 + : this.defaultPerOcpuInGBs.hashCode()); + result = (result * PRIME) + (this.minInGBs == null ? 43 : this.minInGBs.hashCode()); + result = + (result * PRIME) + + (this.minPerOcpuInGBs == null ? 43 : this.minPerOcpuInGBs.hashCode()); + result = (result * PRIME) + (this.maxInGBs == null ? 43 : this.maxInGBs.hashCode()); + result = + (result * PRIME) + + (this.maxPerOcpuInGBs == null ? 43 : this.maxPerOcpuInGBs.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ShapeOcpuOptions.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ShapeOcpuOptions.java new file mode 100644 index 00000000000..f92dd1ed99b --- /dev/null +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ShapeOcpuOptions.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.psql.model; + +/** + * Options for the the shape OCPU + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220915") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ShapeOcpuOptions.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ShapeOcpuOptions extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"min", "max"}) + public ShapeOcpuOptions(Integer min, Integer max) { + super(); + this.min = min; + this.max = max; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Minimum OCPU configuration + **/ + @com.fasterxml.jackson.annotation.JsonProperty("min") + private Integer min; + + /** + * Minimum OCPU configuration + * @param min the value to set + * @return this builder + **/ + public Builder min(Integer min) { + this.min = min; + this.__explicitlySet__.add("min"); + return this; + } + /** + * Maximum OCPU configuration + **/ + @com.fasterxml.jackson.annotation.JsonProperty("max") + private Integer max; + + /** + * Maximum OCPU configuration + * @param max the value to set + * @return this builder + **/ + public Builder max(Integer max) { + this.max = max; + this.__explicitlySet__.add("max"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ShapeOcpuOptions build() { + ShapeOcpuOptions model = new ShapeOcpuOptions(this.min, this.max); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ShapeOcpuOptions model) { + if (model.wasPropertyExplicitlySet("min")) { + this.min(model.getMin()); + } + if (model.wasPropertyExplicitlySet("max")) { + this.max(model.getMax()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Minimum OCPU configuration + **/ + @com.fasterxml.jackson.annotation.JsonProperty("min") + private final Integer min; + + /** + * Minimum OCPU configuration + * @return the value + **/ + public Integer getMin() { + return min; + } + + /** + * Maximum OCPU configuration + **/ + @com.fasterxml.jackson.annotation.JsonProperty("max") + private final Integer max; + + /** + * Maximum OCPU configuration + * @return the value + **/ + public Integer getMax() { + return max; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ShapeOcpuOptions("); + sb.append("super=").append(super.toString()); + sb.append("min=").append(String.valueOf(this.min)); + sb.append(", max=").append(String.valueOf(this.max)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ShapeOcpuOptions)) { + return false; + } + + ShapeOcpuOptions other = (ShapeOcpuOptions) o; + return java.util.Objects.equals(this.min, other.min) + && java.util.Objects.equals(this.max, other.max) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.min == null ? 43 : this.min.hashCode()); + result = (result * PRIME) + (this.max == null ? 43 : this.max.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ShapeSummary.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ShapeSummary.java index f9e3b871082..74e0cad0b26 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ShapeSummary.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/ShapeSummary.java @@ -19,13 +19,31 @@ @com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) public final class ShapeSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"id", "shape", "ocpuCount", "memorySizeInGBs"}) - public ShapeSummary(String id, String shape, Integer ocpuCount, Integer memorySizeInGBs) { + @java.beans.ConstructorProperties({ + "id", + "shape", + "isFlexible", + "ocpuCount", + "memorySizeInGBs", + "shapeOcpuOptions", + "shapeMemoryOptions" + }) + public ShapeSummary( + String id, + String shape, + Boolean isFlexible, + Integer ocpuCount, + Integer memorySizeInGBs, + ShapeOcpuOptions shapeOcpuOptions, + ShapeMemoryOptions shapeMemoryOptions) { super(); this.id = id; this.shape = shape; + this.isFlexible = isFlexible; this.ocpuCount = ocpuCount; this.memorySizeInGBs = memorySizeInGBs; + this.shapeOcpuOptions = shapeOcpuOptions; + this.shapeMemoryOptions = shapeMemoryOptions; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -66,6 +84,22 @@ public Builder shape(String shape) { this.__explicitlySet__.add("shape"); return this; } + /** + * Indicates if the shape is a flex shape. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFlexible") + private Boolean isFlexible; + + /** + * Indicates if the shape is a flex shape. + * @param isFlexible the value to set + * @return this builder + **/ + public Builder isFlexible(Boolean isFlexible) { + this.isFlexible = isFlexible; + this.__explicitlySet__.add("isFlexible"); + return this; + } /** * The number of OCPUs. **/ @@ -99,12 +133,37 @@ public Builder memorySizeInGBs(Integer memorySizeInGBs) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("shapeOcpuOptions") + private ShapeOcpuOptions shapeOcpuOptions; + + public Builder shapeOcpuOptions(ShapeOcpuOptions shapeOcpuOptions) { + this.shapeOcpuOptions = shapeOcpuOptions; + this.__explicitlySet__.add("shapeOcpuOptions"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("shapeMemoryOptions") + private ShapeMemoryOptions shapeMemoryOptions; + + public Builder shapeMemoryOptions(ShapeMemoryOptions shapeMemoryOptions) { + this.shapeMemoryOptions = shapeMemoryOptions; + this.__explicitlySet__.add("shapeMemoryOptions"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public ShapeSummary build() { ShapeSummary model = - new ShapeSummary(this.id, this.shape, this.ocpuCount, this.memorySizeInGBs); + new ShapeSummary( + this.id, + this.shape, + this.isFlexible, + this.ocpuCount, + this.memorySizeInGBs, + this.shapeOcpuOptions, + this.shapeMemoryOptions); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -119,12 +178,21 @@ public Builder copy(ShapeSummary model) { if (model.wasPropertyExplicitlySet("shape")) { this.shape(model.getShape()); } + if (model.wasPropertyExplicitlySet("isFlexible")) { + this.isFlexible(model.getIsFlexible()); + } if (model.wasPropertyExplicitlySet("ocpuCount")) { this.ocpuCount(model.getOcpuCount()); } if (model.wasPropertyExplicitlySet("memorySizeInGBs")) { this.memorySizeInGBs(model.getMemorySizeInGBs()); } + if (model.wasPropertyExplicitlySet("shapeOcpuOptions")) { + this.shapeOcpuOptions(model.getShapeOcpuOptions()); + } + if (model.wasPropertyExplicitlySet("shapeMemoryOptions")) { + this.shapeMemoryOptions(model.getShapeMemoryOptions()); + } return this; } } @@ -172,6 +240,20 @@ public String getShape() { return shape; } + /** + * Indicates if the shape is a flex shape. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isFlexible") + private final Boolean isFlexible; + + /** + * Indicates if the shape is a flex shape. + * @return the value + **/ + public Boolean getIsFlexible() { + return isFlexible; + } + /** * The number of OCPUs. **/ @@ -200,6 +282,20 @@ public Integer getMemorySizeInGBs() { return memorySizeInGBs; } + @com.fasterxml.jackson.annotation.JsonProperty("shapeOcpuOptions") + private final ShapeOcpuOptions shapeOcpuOptions; + + public ShapeOcpuOptions getShapeOcpuOptions() { + return shapeOcpuOptions; + } + + @com.fasterxml.jackson.annotation.JsonProperty("shapeMemoryOptions") + private final ShapeMemoryOptions shapeMemoryOptions; + + public ShapeMemoryOptions getShapeMemoryOptions() { + return shapeMemoryOptions; + } + @Override public String toString() { return this.toString(true); @@ -216,8 +312,11 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("id=").append(String.valueOf(this.id)); sb.append(", shape=").append(String.valueOf(this.shape)); + sb.append(", isFlexible=").append(String.valueOf(this.isFlexible)); sb.append(", ocpuCount=").append(String.valueOf(this.ocpuCount)); sb.append(", memorySizeInGBs=").append(String.valueOf(this.memorySizeInGBs)); + sb.append(", shapeOcpuOptions=").append(String.valueOf(this.shapeOcpuOptions)); + sb.append(", shapeMemoryOptions=").append(String.valueOf(this.shapeMemoryOptions)); sb.append(")"); return sb.toString(); } @@ -234,8 +333,11 @@ public boolean equals(Object o) { ShapeSummary other = (ShapeSummary) o; return java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.isFlexible, other.isFlexible) && java.util.Objects.equals(this.ocpuCount, other.ocpuCount) && java.util.Objects.equals(this.memorySizeInGBs, other.memorySizeInGBs) + && java.util.Objects.equals(this.shapeOcpuOptions, other.shapeOcpuOptions) + && java.util.Objects.equals(this.shapeMemoryOptions, other.shapeMemoryOptions) && super.equals(other); } @@ -245,10 +347,19 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); + result = (result * PRIME) + (this.isFlexible == null ? 43 : this.isFlexible.hashCode()); result = (result * PRIME) + (this.ocpuCount == null ? 43 : this.ocpuCount.hashCode()); result = (result * PRIME) + (this.memorySizeInGBs == null ? 43 : this.memorySizeInGBs.hashCode()); + result = + (result * PRIME) + + (this.shapeOcpuOptions == null ? 43 : this.shapeOcpuOptions.hashCode()); + result = + (result * PRIME) + + (this.shapeMemoryOptions == null + ? 43 + : this.shapeMemoryOptions.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/UpdateDbSystemDetails.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/UpdateDbSystemDetails.java index 8a3fdb4e375..7dc88e6eabe 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/UpdateDbSystemDetails.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/UpdateDbSystemDetails.java @@ -25,26 +25,38 @@ public final class UpdateDbSystemDetails @java.beans.ConstructorProperties({ "displayName", "description", + "shape", + "instanceOcpuCount", + "instanceMemorySizeInGBs", "dbConfigurationParams", "managementPolicy", "storageDetails", + "networkDetails", "freeformTags", "definedTags" }) public UpdateDbSystemDetails( String displayName, String description, + String shape, + Integer instanceOcpuCount, + Integer instanceMemorySizeInGBs, UpdateDbConfigParams dbConfigurationParams, ManagementPolicyDetails managementPolicy, UpdateStorageDetailsParams storageDetails, + UpdateNetworkDetails networkDetails, java.util.Map freeformTags, java.util.Map> definedTags) { super(); this.displayName = displayName; this.description = description; + this.shape = shape; + this.instanceOcpuCount = instanceOcpuCount; + this.instanceMemorySizeInGBs = instanceMemorySizeInGBs; this.dbConfigurationParams = dbConfigurationParams; this.managementPolicy = managementPolicy; this.storageDetails = storageDetails; + this.networkDetails = networkDetails; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -83,6 +95,58 @@ public Builder description(String description) { this.__explicitlySet__.add("description"); return this; } + /** + * The name of the shape for the database system nodes. + * Example: {@code VM.Standard.E4.Flex} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private String shape; + + /** + * The name of the shape for the database system nodes. + * Example: {@code VM.Standard.E4.Flex} + * + * @param shape the value to set + * @return this builder + **/ + public Builder shape(String shape) { + this.shape = shape; + this.__explicitlySet__.add("shape"); + return this; + } + /** + * The total number of OCPUs available to each database system node. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceOcpuCount") + private Integer instanceOcpuCount; + + /** + * The total number of OCPUs available to each database system node. + * @param instanceOcpuCount the value to set + * @return this builder + **/ + public Builder instanceOcpuCount(Integer instanceOcpuCount) { + this.instanceOcpuCount = instanceOcpuCount; + this.__explicitlySet__.add("instanceOcpuCount"); + return this; + } + /** + * The total amount of memory available to each database system node, in gigabytes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceMemorySizeInGBs") + private Integer instanceMemorySizeInGBs; + + /** + * The total amount of memory available to each database system node, in gigabytes. + * @param instanceMemorySizeInGBs the value to set + * @return this builder + **/ + public Builder instanceMemorySizeInGBs(Integer instanceMemorySizeInGBs) { + this.instanceMemorySizeInGBs = instanceMemorySizeInGBs; + this.__explicitlySet__.add("instanceMemorySizeInGBs"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("dbConfigurationParams") private UpdateDbConfigParams dbConfigurationParams; @@ -110,6 +174,15 @@ public Builder storageDetails(UpdateStorageDetailsParams storageDetails) { this.__explicitlySet__.add("storageDetails"); return this; } + + @com.fasterxml.jackson.annotation.JsonProperty("networkDetails") + private UpdateNetworkDetails networkDetails; + + public Builder networkDetails(UpdateNetworkDetails networkDetails) { + this.networkDetails = networkDetails; + this.__explicitlySet__.add("networkDetails"); + return this; + } /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -160,9 +233,13 @@ public UpdateDbSystemDetails build() { new UpdateDbSystemDetails( this.displayName, this.description, + this.shape, + this.instanceOcpuCount, + this.instanceMemorySizeInGBs, this.dbConfigurationParams, this.managementPolicy, this.storageDetails, + this.networkDetails, this.freeformTags, this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -179,6 +256,15 @@ public Builder copy(UpdateDbSystemDetails model) { if (model.wasPropertyExplicitlySet("description")) { this.description(model.getDescription()); } + if (model.wasPropertyExplicitlySet("shape")) { + this.shape(model.getShape()); + } + if (model.wasPropertyExplicitlySet("instanceOcpuCount")) { + this.instanceOcpuCount(model.getInstanceOcpuCount()); + } + if (model.wasPropertyExplicitlySet("instanceMemorySizeInGBs")) { + this.instanceMemorySizeInGBs(model.getInstanceMemorySizeInGBs()); + } if (model.wasPropertyExplicitlySet("dbConfigurationParams")) { this.dbConfigurationParams(model.getDbConfigurationParams()); } @@ -188,6 +274,9 @@ public Builder copy(UpdateDbSystemDetails model) { if (model.wasPropertyExplicitlySet("storageDetails")) { this.storageDetails(model.getStorageDetails()); } + if (model.wasPropertyExplicitlySet("networkDetails")) { + this.networkDetails(model.getNetworkDetails()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -237,6 +326,52 @@ public String getDescription() { return description; } + /** + * The name of the shape for the database system nodes. + * Example: {@code VM.Standard.E4.Flex} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shape") + private final String shape; + + /** + * The name of the shape for the database system nodes. + * Example: {@code VM.Standard.E4.Flex} + * + * @return the value + **/ + public String getShape() { + return shape; + } + + /** + * The total number of OCPUs available to each database system node. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceOcpuCount") + private final Integer instanceOcpuCount; + + /** + * The total number of OCPUs available to each database system node. + * @return the value + **/ + public Integer getInstanceOcpuCount() { + return instanceOcpuCount; + } + + /** + * The total amount of memory available to each database system node, in gigabytes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceMemorySizeInGBs") + private final Integer instanceMemorySizeInGBs; + + /** + * The total amount of memory available to each database system node, in gigabytes. + * @return the value + **/ + public Integer getInstanceMemorySizeInGBs() { + return instanceMemorySizeInGBs; + } + @com.fasterxml.jackson.annotation.JsonProperty("dbConfigurationParams") private final UpdateDbConfigParams dbConfigurationParams; @@ -258,6 +393,13 @@ public UpdateStorageDetailsParams getStorageDetails() { return storageDetails; } + @com.fasterxml.jackson.annotation.JsonProperty("networkDetails") + private final UpdateNetworkDetails networkDetails; + + public UpdateNetworkDetails getNetworkDetails() { + return networkDetails; + } + /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -310,9 +452,14 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("displayName=").append(String.valueOf(this.displayName)); sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", shape=").append(String.valueOf(this.shape)); + sb.append(", instanceOcpuCount=").append(String.valueOf(this.instanceOcpuCount)); + sb.append(", instanceMemorySizeInGBs=") + .append(String.valueOf(this.instanceMemorySizeInGBs)); sb.append(", dbConfigurationParams=").append(String.valueOf(this.dbConfigurationParams)); sb.append(", managementPolicy=").append(String.valueOf(this.managementPolicy)); sb.append(", storageDetails=").append(String.valueOf(this.storageDetails)); + sb.append(", networkDetails=").append(String.valueOf(this.networkDetails)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -331,9 +478,14 @@ public boolean equals(Object o) { UpdateDbSystemDetails other = (UpdateDbSystemDetails) o; return java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.shape, other.shape) + && java.util.Objects.equals(this.instanceOcpuCount, other.instanceOcpuCount) + && java.util.Objects.equals( + this.instanceMemorySizeInGBs, other.instanceMemorySizeInGBs) && java.util.Objects.equals(this.dbConfigurationParams, other.dbConfigurationParams) && java.util.Objects.equals(this.managementPolicy, other.managementPolicy) && java.util.Objects.equals(this.storageDetails, other.storageDetails) + && java.util.Objects.equals(this.networkDetails, other.networkDetails) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -345,6 +497,15 @@ public int hashCode() { int result = 1; result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); + result = + (result * PRIME) + + (this.instanceOcpuCount == null ? 43 : this.instanceOcpuCount.hashCode()); + result = + (result * PRIME) + + (this.instanceMemorySizeInGBs == null + ? 43 + : this.instanceMemorySizeInGBs.hashCode()); result = (result * PRIME) + (this.dbConfigurationParams == null @@ -356,6 +517,9 @@ public int hashCode() { result = (result * PRIME) + (this.storageDetails == null ? 43 : this.storageDetails.hashCode()); + result = + (result * PRIME) + + (this.networkDetails == null ? 43 : this.networkDetails.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/model/UpdateNetworkDetails.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/UpdateNetworkDetails.java new file mode 100644 index 00000000000..1b975738a60 --- /dev/null +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/model/UpdateNetworkDetails.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.psql.model; + +/** + * Network details for the database system. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220915") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateNetworkDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateNetworkDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"nsgIds", "isReaderEndpointEnabled"}) + public UpdateNetworkDetails(java.util.List nsgIds, Boolean isReaderEndpointEnabled) { + super(); + this.nsgIds = nsgIds; + this.isReaderEndpointEnabled = isReaderEndpointEnabled; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of Network Security Group [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) associated with the database system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private java.util.List nsgIds; + + /** + * List of Network Security Group [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) associated with the database system. + * @param nsgIds the value to set + * @return this builder + **/ + public Builder nsgIds(java.util.List nsgIds) { + this.nsgIds = nsgIds; + this.__explicitlySet__.add("nsgIds"); + return this; + } + /** + * Specifies if the reader endpoint is enabled on the dbSystem. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isReaderEndpointEnabled") + private Boolean isReaderEndpointEnabled; + + /** + * Specifies if the reader endpoint is enabled on the dbSystem. + * @param isReaderEndpointEnabled the value to set + * @return this builder + **/ + public Builder isReaderEndpointEnabled(Boolean isReaderEndpointEnabled) { + this.isReaderEndpointEnabled = isReaderEndpointEnabled; + this.__explicitlySet__.add("isReaderEndpointEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateNetworkDetails build() { + UpdateNetworkDetails model = + new UpdateNetworkDetails(this.nsgIds, this.isReaderEndpointEnabled); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateNetworkDetails model) { + if (model.wasPropertyExplicitlySet("nsgIds")) { + this.nsgIds(model.getNsgIds()); + } + if (model.wasPropertyExplicitlySet("isReaderEndpointEnabled")) { + this.isReaderEndpointEnabled(model.getIsReaderEndpointEnabled()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of Network Security Group [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) associated with the database system. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") + private final java.util.List nsgIds; + + /** + * List of Network Security Group [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) associated with the database system. + * @return the value + **/ + public java.util.List getNsgIds() { + return nsgIds; + } + + /** + * Specifies if the reader endpoint is enabled on the dbSystem. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isReaderEndpointEnabled") + private final Boolean isReaderEndpointEnabled; + + /** + * Specifies if the reader endpoint is enabled on the dbSystem. + * @return the value + **/ + public Boolean getIsReaderEndpointEnabled() { + return isReaderEndpointEnabled; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateNetworkDetails("); + sb.append("super=").append(super.toString()); + sb.append("nsgIds=").append(String.valueOf(this.nsgIds)); + sb.append(", isReaderEndpointEnabled=") + .append(String.valueOf(this.isReaderEndpointEnabled)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateNetworkDetails)) { + return false; + } + + UpdateNetworkDetails other = (UpdateNetworkDetails) o; + return java.util.Objects.equals(this.nsgIds, other.nsgIds) + && java.util.Objects.equals( + this.isReaderEndpointEnabled, other.isReaderEndpointEnabled) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); + result = + (result * PRIME) + + (this.isReaderEndpointEnabled == null + ? 43 + : this.isReaderEndpointEnabled.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/requests/ListConfigurationsRequest.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/requests/ListConfigurationsRequest.java index f80fffabe51..da253de81b7 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/requests/ListConfigurationsRequest.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/requests/ListConfigurationsRequest.java @@ -45,12 +45,12 @@ public String getDisplayName() { return displayName; } /** - * Verison of the PostgreSQL database, such as 14.9. + * Version of the PostgreSQL database, such as 14.9. */ private String dbVersion; /** - * Verison of the PostgreSQL database, such as 14.9. + * Version of the PostgreSQL database, such as 14.9. */ public String getDbVersion() { return dbVersion; @@ -230,12 +230,12 @@ public Builder displayName(String displayName) { } /** - * Verison of the PostgreSQL database, such as 14.9. + * Version of the PostgreSQL database, such as 14.9. */ private String dbVersion = null; /** - * Verison of the PostgreSQL database, such as 14.9. + * Version of the PostgreSQL database, such as 14.9. * @param dbVersion the value to set * @return this builder instance */ diff --git a/bmc-psql/src/main/java/com/oracle/bmc/psql/requests/ListDefaultConfigurationsRequest.java b/bmc-psql/src/main/java/com/oracle/bmc/psql/requests/ListDefaultConfigurationsRequest.java index 8089b4a498c..4e3a6a5f4ee 100644 --- a/bmc-psql/src/main/java/com/oracle/bmc/psql/requests/ListDefaultConfigurationsRequest.java +++ b/bmc-psql/src/main/java/com/oracle/bmc/psql/requests/ListDefaultConfigurationsRequest.java @@ -35,12 +35,12 @@ public String getDisplayName() { return displayName; } /** - * Verison of the PostgreSQL database, such as 14.9. + * Version of the PostgreSQL database, such as 14.9. */ private String dbVersion; /** - * Verison of the PostgreSQL database, such as 14.9. + * Version of the PostgreSQL database, such as 14.9. */ public String getDbVersion() { return dbVersion; @@ -205,12 +205,12 @@ public Builder displayName(String displayName) { } /** - * Verison of the PostgreSQL database, such as 14.9. + * Version of the PostgreSQL database, such as 14.9. */ private String dbVersion = null; /** - * Verison of the PostgreSQL database, such as 14.9. + * Version of the PostgreSQL database, such as 14.9. * @param dbVersion the value to set * @return this builder instance */ diff --git a/bmc-queue/pom.xml b/bmc-queue/pom.xml index 96287e8bf00..32dd6a26731 100644 --- a/bmc-queue/pom.xml +++ b/bmc-queue/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-queue @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-recovery/pom.xml b/bmc-recovery/pom.xml index b8e10975ed5..08c919375ee 100644 --- a/bmc-recovery/pom.xml +++ b/bmc-recovery/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-recovery @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/DatabaseRecovery.java b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/DatabaseRecovery.java index 1be18d1dcb5..52faac934b8 100644 --- a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/DatabaseRecovery.java +++ b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/DatabaseRecovery.java @@ -85,6 +85,19 @@ CancelProtectedDatabaseDeletionResponse cancelProtectedDatabaseDeletion( ChangeProtectedDatabaseCompartmentResponse changeProtectedDatabaseCompartment( ChangeProtectedDatabaseCompartmentRequest request); + /** + * Associates the protected database with a new cloud service environment, such as Microsoft Azure. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ChangeProtectedDatabaseSubscription API. + */ + ChangeProtectedDatabaseSubscriptionResponse changeProtectedDatabaseSubscription( + ChangeProtectedDatabaseSubscriptionRequest request); + /** * Moves a protection policy resource from the existing compartment to the specified compartment. When provided, If-Match is checked against ETag values of the resource. * @param request The request object containing the details to send diff --git a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/DatabaseRecoveryAsync.java b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/DatabaseRecoveryAsync.java index 8e4207e2520..f2c0d516083 100644 --- a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/DatabaseRecoveryAsync.java +++ b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/DatabaseRecoveryAsync.java @@ -94,6 +94,24 @@ public interface DatabaseRecoveryAsync extends AutoCloseable { ChangeProtectedDatabaseCompartmentResponse> handler); + /** + * Associates the protected database with a new cloud service environment, such as Microsoft Azure. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + changeProtectedDatabaseSubscription( + ChangeProtectedDatabaseSubscriptionRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeProtectedDatabaseSubscriptionRequest, + ChangeProtectedDatabaseSubscriptionResponse> + handler); + /** * Moves a protection policy resource from the existing compartment to the specified compartment. When provided, If-Match is checked against ETag values of the resource. * diff --git a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/DatabaseRecoveryAsyncClient.java b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/DatabaseRecoveryAsyncClient.java index bc8c8f33450..88f97b5462f 100644 --- a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/DatabaseRecoveryAsyncClient.java +++ b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/DatabaseRecoveryAsyncClient.java @@ -574,6 +574,65 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + changeProtectedDatabaseSubscription( + ChangeProtectedDatabaseSubscriptionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeProtectedDatabaseSubscriptionRequest, + ChangeProtectedDatabaseSubscriptionResponse> + handler) { + LOG.trace("Called async changeProtectedDatabaseSubscription"); + final ChangeProtectedDatabaseSubscriptionRequest interceptedRequest = + ChangeProtectedDatabaseSubscriptionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeProtectedDatabaseSubscriptionConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DatabaseRecovery", + "ChangeProtectedDatabaseSubscription", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectedDatabase/ChangeProtectedDatabaseSubscription"); + final java.util.function.Function< + javax.ws.rs.core.Response, ChangeProtectedDatabaseSubscriptionResponse> + transformer = + ChangeProtectedDatabaseSubscriptionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeProtectedDatabaseSubscriptionRequest, + ChangeProtectedDatabaseSubscriptionResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeProtectedDatabaseSubscriptionRequest, + ChangeProtectedDatabaseSubscriptionResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getChangeProtectedDatabaseSubscriptionDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeProtectedDatabaseSubscriptionRequest, + ChangeProtectedDatabaseSubscriptionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future changeProtectionPolicyCompartment( diff --git a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/DatabaseRecoveryClient.java b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/DatabaseRecoveryClient.java index e435d0234ff..7d5a3d43d68 100644 --- a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/DatabaseRecoveryClient.java +++ b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/DatabaseRecoveryClient.java @@ -636,6 +636,51 @@ public ChangeProtectedDatabaseCompartmentResponse changeProtectedDatabaseCompart }); } + @Override + public ChangeProtectedDatabaseSubscriptionResponse changeProtectedDatabaseSubscription( + ChangeProtectedDatabaseSubscriptionRequest request) { + LOG.trace("Called changeProtectedDatabaseSubscription"); + final ChangeProtectedDatabaseSubscriptionRequest interceptedRequest = + ChangeProtectedDatabaseSubscriptionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeProtectedDatabaseSubscriptionConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "DatabaseRecovery", + "ChangeProtectedDatabaseSubscription", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectedDatabase/ChangeProtectedDatabaseSubscription"); + java.util.function.Function< + javax.ws.rs.core.Response, ChangeProtectedDatabaseSubscriptionResponse> + transformer = + ChangeProtectedDatabaseSubscriptionConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeProtectedDatabaseSubscriptionDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeProtectionPolicyCompartmentResponse changeProtectionPolicyCompartment( ChangeProtectionPolicyCompartmentRequest request) { diff --git a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/internal/http/ChangeProtectedDatabaseSubscriptionConverter.java b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/internal/http/ChangeProtectedDatabaseSubscriptionConverter.java new file mode 100644 index 00000000000..d175f3d6fa1 --- /dev/null +++ b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/internal/http/ChangeProtectedDatabaseSubscriptionConverter.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.recovery.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.recovery.model.*; +import com.oracle.bmc.recovery.requests.*; +import com.oracle.bmc.recovery.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210216") +public class ChangeProtectedDatabaseSubscriptionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ChangeProtectedDatabaseSubscriptionConverter.class); + + public static com.oracle.bmc.recovery.requests.ChangeProtectedDatabaseSubscriptionRequest + interceptRequest( + com.oracle.bmc.recovery.requests.ChangeProtectedDatabaseSubscriptionRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.recovery.requests.ChangeProtectedDatabaseSubscriptionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getProtectedDatabaseId(), "protectedDatabaseId must not be blank"); + Validate.notNull( + request.getChangeProtectedDatabaseSubscriptionDetails(), + "changeProtectedDatabaseSubscriptionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210216") + .path("protectedDatabases") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getProtectedDatabaseId())) + .path("actions") + .path("changeSubscription"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.recovery.responses.ChangeProtectedDatabaseSubscriptionResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.recovery.responses.ChangeProtectedDatabaseSubscriptionResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.recovery.responses + .ChangeProtectedDatabaseSubscriptionResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.recovery.responses + .ChangeProtectedDatabaseSubscriptionResponse>() { + @Override + public com.oracle.bmc.recovery.responses + .ChangeProtectedDatabaseSubscriptionResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.recovery.responses.ChangeProtectedDatabaseSubscriptionResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.recovery.responses + .ChangeProtectedDatabaseSubscriptionResponse.Builder + builder = + com.oracle.bmc.recovery.responses + .ChangeProtectedDatabaseSubscriptionResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.recovery.responses + .ChangeProtectedDatabaseSubscriptionResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/ChangeProtectedDatabaseSubscriptionDetails.java b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/ChangeProtectedDatabaseSubscriptionDetails.java new file mode 100644 index 00000000000..4d44c32e4a7 --- /dev/null +++ b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/ChangeProtectedDatabaseSubscriptionDetails.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.recovery.model; + +/** + * Subscription details of the new cloud service environment, such as Microsoft Azure, where the protected database will be provisioned. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210216") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeProtectedDatabaseSubscriptionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeProtectedDatabaseSubscriptionDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"subscriptionId", "isDefault"}) + public ChangeProtectedDatabaseSubscriptionDetails(String subscriptionId, Boolean isDefault) { + super(); + this.subscriptionId = subscriptionId; + this.isDefault = isDefault; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the new cloud service subscription to which you want to link the protected database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + /** + * The OCID of the new cloud service subscription to which you want to link the protected database. + * @param subscriptionId the value to set + * @return this builder + **/ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } + /** + * Indicates whether it is a Universal Credit Model (UCM) subscription. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private Boolean isDefault; + + /** + * Indicates whether it is a Universal Credit Model (UCM) subscription. + * + * @param isDefault the value to set + * @return this builder + **/ + public Builder isDefault(Boolean isDefault) { + this.isDefault = isDefault; + this.__explicitlySet__.add("isDefault"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeProtectedDatabaseSubscriptionDetails build() { + ChangeProtectedDatabaseSubscriptionDetails model = + new ChangeProtectedDatabaseSubscriptionDetails( + this.subscriptionId, this.isDefault); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeProtectedDatabaseSubscriptionDetails model) { + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } + if (model.wasPropertyExplicitlySet("isDefault")) { + this.isDefault(model.getIsDefault()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the new cloud service subscription to which you want to link the protected database. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The OCID of the new cloud service subscription to which you want to link the protected database. + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + + /** + * Indicates whether it is a Universal Credit Model (UCM) subscription. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isDefault") + private final Boolean isDefault; + + /** + * Indicates whether it is a Universal Credit Model (UCM) subscription. + * + * @return the value + **/ + public Boolean getIsDefault() { + return isDefault; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ChangeProtectedDatabaseSubscriptionDetails("); + sb.append("super=").append(super.toString()); + sb.append("subscriptionId=").append(String.valueOf(this.subscriptionId)); + sb.append(", isDefault=").append(String.valueOf(this.isDefault)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeProtectedDatabaseSubscriptionDetails)) { + return false; + } + + ChangeProtectedDatabaseSubscriptionDetails other = + (ChangeProtectedDatabaseSubscriptionDetails) o; + return java.util.Objects.equals(this.subscriptionId, other.subscriptionId) + && java.util.Objects.equals(this.isDefault, other.isDefault) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); + result = (result * PRIME) + (this.isDefault == null ? 43 : this.isDefault.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/CreateProtectedDatabaseDetails.java b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/CreateProtectedDatabaseDetails.java index a556156067d..520b1029b21 100644 --- a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/CreateProtectedDatabaseDetails.java +++ b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/CreateProtectedDatabaseDetails.java @@ -35,6 +35,7 @@ public final class CreateProtectedDatabaseDetails "changeRate", "compressionRatio", "isRedoLogsShipped", + "subscriptionId", "freeformTags", "definedTags" }) @@ -51,6 +52,7 @@ public CreateProtectedDatabaseDetails( Double changeRate, Double compressionRatio, Boolean isRedoLogsShipped, + String subscriptionId, java.util.Map freeformTags, java.util.Map> definedTags) { super(); @@ -66,6 +68,7 @@ public CreateProtectedDatabaseDetails( this.changeRate = changeRate; this.compressionRatio = compressionRatio; this.isRedoLogsShipped = isRedoLogsShipped; + this.subscriptionId = subscriptionId; this.freeformTags = freeformTags; this.definedTags = definedTags; } @@ -275,6 +278,26 @@ public Builder isRedoLogsShipped(Boolean isRedoLogsShipped) { this.__explicitlySet__.add("isRedoLogsShipped"); return this; } + /** + * The OCID of the cloud service subscription to which you want to link the protected database. + * For example, specify the Microsoft Azure subscription ID if you want to provision the protected database in Azure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + /** + * The OCID of the cloud service subscription to which you want to link the protected database. + * For example, specify the Microsoft Azure subscription ID if you want to provision the protected database in Azure. + * + * @param subscriptionId the value to set + * @return this builder + **/ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -335,6 +358,7 @@ public CreateProtectedDatabaseDetails build() { this.changeRate, this.compressionRatio, this.isRedoLogsShipped, + this.subscriptionId, this.freeformTags, this.definedTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -381,6 +405,9 @@ public Builder copy(CreateProtectedDatabaseDetails model) { if (model.wasPropertyExplicitlySet("isRedoLogsShipped")) { this.isRedoLogsShipped(model.getIsRedoLogsShipped()); } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -580,6 +607,24 @@ public Boolean getIsRedoLogsShipped() { return isRedoLogsShipped; } + /** + * The OCID of the cloud service subscription to which you want to link the protected database. + * For example, specify the Microsoft Azure subscription ID if you want to provision the protected database in Azure. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The OCID of the cloud service subscription to which you want to link the protected database. + * For example, specify the Microsoft Azure subscription ID if you want to provision the protected database in Azure. + * + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -642,6 +687,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", changeRate=").append(String.valueOf(this.changeRate)); sb.append(", compressionRatio=").append(String.valueOf(this.compressionRatio)); sb.append(", isRedoLogsShipped=").append(String.valueOf(this.isRedoLogsShipped)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(")"); @@ -671,6 +717,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.changeRate, other.changeRate) && java.util.Objects.equals(this.compressionRatio, other.compressionRatio) && java.util.Objects.equals(this.isRedoLogsShipped, other.isRedoLogsShipped) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && super.equals(other); @@ -708,6 +755,9 @@ public int hashCode() { result = (result * PRIME) + (this.isRedoLogsShipped == null ? 43 : this.isRedoLogsShipped.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/CreateProtectionPolicyDetails.java b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/CreateProtectionPolicyDetails.java index 506b7dc76c8..277fb5e9914 100644 --- a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/CreateProtectionPolicyDetails.java +++ b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/CreateProtectionPolicyDetails.java @@ -26,6 +26,7 @@ public final class CreateProtectionPolicyDetails "displayName", "backupRetentionPeriodInDays", "compartmentId", + "mustEnforceCloudLocality", "policyLockedDateTime", "freeformTags", "definedTags" @@ -34,6 +35,7 @@ public CreateProtectionPolicyDetails( String displayName, Integer backupRetentionPeriodInDays, String compartmentId, + Boolean mustEnforceCloudLocality, String policyLockedDateTime, java.util.Map freeformTags, java.util.Map> definedTags) { @@ -41,6 +43,7 @@ public CreateProtectionPolicyDetails( this.displayName = displayName; this.backupRetentionPeriodInDays = backupRetentionPeriodInDays; this.compartmentId = compartmentId; + this.mustEnforceCloudLocality = mustEnforceCloudLocality; this.policyLockedDateTime = policyLockedDateTime; this.freeformTags = freeformTags; this.definedTags = definedTags; @@ -96,6 +99,32 @@ public Builder compartmentId(String compartmentId) { this.__explicitlySet__.add("compartmentId"); return this; } + /** + * Indicates whether the protection policy enforces Recovery Service to retain backups in the same cloud service environment where your Oracle Database is provisioned. + * This parameter is applicable if your Oracle Database runs in a different cloud service environment, such as Microsoft Azure. + * If you set the mustEnforceCloudLocality parameter to TRUE, then Recovery Service stores the database backups locally in the same cloud service environment where the database resides. For example, if your Oracle Database is provisioned on Microsoft Azure, then Recovery Service stores the database backups in Azure. + * Note: + * You cannot change the mustEnforceCloudLocality setting for a protection policy after you create it. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mustEnforceCloudLocality") + private Boolean mustEnforceCloudLocality; + + /** + * Indicates whether the protection policy enforces Recovery Service to retain backups in the same cloud service environment where your Oracle Database is provisioned. + * This parameter is applicable if your Oracle Database runs in a different cloud service environment, such as Microsoft Azure. + * If you set the mustEnforceCloudLocality parameter to TRUE, then Recovery Service stores the database backups locally in the same cloud service environment where the database resides. For example, if your Oracle Database is provisioned on Microsoft Azure, then Recovery Service stores the database backups in Azure. + * Note: + * You cannot change the mustEnforceCloudLocality setting for a protection policy after you create it. + * + * @param mustEnforceCloudLocality the value to set + * @return this builder + **/ + public Builder mustEnforceCloudLocality(Boolean mustEnforceCloudLocality) { + this.mustEnforceCloudLocality = mustEnforceCloudLocality; + this.__explicitlySet__.add("mustEnforceCloudLocality"); + return this; + } /** * An RFC3339 formatted datetime string that specifies the exact date and time for the retention lock to take effect and permanently lock the retention period defined in the policy. *

@@ -179,6 +208,7 @@ public CreateProtectionPolicyDetails build() { this.displayName, this.backupRetentionPeriodInDays, this.compartmentId, + this.mustEnforceCloudLocality, this.policyLockedDateTime, this.freeformTags, this.definedTags); @@ -199,6 +229,9 @@ public Builder copy(CreateProtectionPolicyDetails model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } + if (model.wasPropertyExplicitlySet("mustEnforceCloudLocality")) { + this.mustEnforceCloudLocality(model.getMustEnforceCloudLocality()); + } if (model.wasPropertyExplicitlySet("policyLockedDateTime")) { this.policyLockedDateTime(model.getPolicyLockedDateTime()); } @@ -265,6 +298,30 @@ public String getCompartmentId() { return compartmentId; } + /** + * Indicates whether the protection policy enforces Recovery Service to retain backups in the same cloud service environment where your Oracle Database is provisioned. + * This parameter is applicable if your Oracle Database runs in a different cloud service environment, such as Microsoft Azure. + * If you set the mustEnforceCloudLocality parameter to TRUE, then Recovery Service stores the database backups locally in the same cloud service environment where the database resides. For example, if your Oracle Database is provisioned on Microsoft Azure, then Recovery Service stores the database backups in Azure. + * Note: + * You cannot change the mustEnforceCloudLocality setting for a protection policy after you create it. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mustEnforceCloudLocality") + private final Boolean mustEnforceCloudLocality; + + /** + * Indicates whether the protection policy enforces Recovery Service to retain backups in the same cloud service environment where your Oracle Database is provisioned. + * This parameter is applicable if your Oracle Database runs in a different cloud service environment, such as Microsoft Azure. + * If you set the mustEnforceCloudLocality parameter to TRUE, then Recovery Service stores the database backups locally in the same cloud service environment where the database resides. For example, if your Oracle Database is provisioned on Microsoft Azure, then Recovery Service stores the database backups in Azure. + * Note: + * You cannot change the mustEnforceCloudLocality setting for a protection policy after you create it. + * + * @return the value + **/ + public Boolean getMustEnforceCloudLocality() { + return mustEnforceCloudLocality; + } + /** * An RFC3339 formatted datetime string that specifies the exact date and time for the retention lock to take effect and permanently lock the retention period defined in the policy. *

@@ -349,6 +406,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", backupRetentionPeriodInDays=") .append(String.valueOf(this.backupRetentionPeriodInDays)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", mustEnforceCloudLocality=") + .append(String.valueOf(this.mustEnforceCloudLocality)); sb.append(", policyLockedDateTime=").append(String.valueOf(this.policyLockedDateTime)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); @@ -370,6 +429,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.backupRetentionPeriodInDays, other.backupRetentionPeriodInDays) && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals( + this.mustEnforceCloudLocality, other.mustEnforceCloudLocality) && java.util.Objects.equals(this.policyLockedDateTime, other.policyLockedDateTime) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) @@ -389,6 +450,11 @@ public int hashCode() { result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.mustEnforceCloudLocality == null + ? 43 + : this.mustEnforceCloudLocality.hashCode()); result = (result * PRIME) + (this.policyLockedDateTime == null diff --git a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/ProtectedDatabase.java b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/ProtectedDatabase.java index f57313cfce9..73698b4bea8 100644 --- a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/ProtectedDatabase.java +++ b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/ProtectedDatabase.java @@ -48,6 +48,7 @@ public final class ProtectedDatabase extends com.oracle.bmc.http.internal.Explic "lifecycleDetails", "healthDetails", "metrics", + "subscriptionId", "freeformTags", "definedTags", "systemTags" @@ -75,6 +76,7 @@ public ProtectedDatabase( String lifecycleDetails, String healthDetails, Metrics metrics, + String subscriptionId, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags) { @@ -101,6 +103,7 @@ public ProtectedDatabase( this.lifecycleDetails = lifecycleDetails; this.healthDetails = healthDetails; this.metrics = metrics; + this.subscriptionId = subscriptionId; this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; @@ -500,6 +503,22 @@ public Builder metrics(Metrics metrics) { this.__explicitlySet__.add("metrics"); return this; } + /** + * The OCID of the cloud service subscription to which the protected database is linked. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + /** + * The OCID of the cloud service subscription to which the protected database is linked. + * @param subscriptionId the value to set + * @return this builder + **/ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -590,6 +609,7 @@ public ProtectedDatabase build() { this.lifecycleDetails, this.healthDetails, this.metrics, + this.subscriptionId, this.freeformTags, this.definedTags, this.systemTags); @@ -667,6 +687,9 @@ public Builder copy(ProtectedDatabase model) { if (model.wasPropertyExplicitlySet("metrics")) { this.metrics(model.getMetrics()); } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -1038,6 +1061,20 @@ public Metrics getMetrics() { return metrics; } + /** + * The OCID of the cloud service subscription to which the protected database is linked. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The OCID of the cloud service subscription to which the protected database is linked. + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -1128,6 +1165,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", healthDetails=").append(String.valueOf(this.healthDetails)); sb.append(", metrics=").append(String.valueOf(this.metrics)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); @@ -1168,6 +1206,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.healthDetails, other.healthDetails) && java.util.Objects.equals(this.metrics, other.metrics) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) @@ -1230,6 +1269,9 @@ public int hashCode() { (result * PRIME) + (this.healthDetails == null ? 43 : this.healthDetails.hashCode()); result = (result * PRIME) + (this.metrics == null ? 43 : this.metrics.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); diff --git a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/ProtectedDatabaseSummary.java b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/ProtectedDatabaseSummary.java index 0c191cb15a2..c1fe60475c7 100644 --- a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/ProtectedDatabaseSummary.java +++ b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/ProtectedDatabaseSummary.java @@ -48,6 +48,7 @@ public final class ProtectedDatabaseSummary "healthDetails", "isReadOnlyResource", "metrics", + "subscriptionId", "freeformTags", "definedTags", "systemTags" @@ -71,6 +72,7 @@ public ProtectedDatabaseSummary( String healthDetails, Boolean isReadOnlyResource, MetricsSummary metrics, + String subscriptionId, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags) { @@ -93,6 +95,7 @@ public ProtectedDatabaseSummary( this.healthDetails = healthDetails; this.isReadOnlyResource = isReadOnlyResource; this.metrics = metrics; + this.subscriptionId = subscriptionId; this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; @@ -400,6 +403,22 @@ public Builder metrics(MetricsSummary metrics) { this.__explicitlySet__.add("metrics"); return this; } + /** + * The OCID of the cloud service subscription to which the protected database is linked. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private String subscriptionId; + + /** + * The OCID of the cloud service subscription to which the protected database is linked. + * @param subscriptionId the value to set + * @return this builder + **/ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + this.__explicitlySet__.add("subscriptionId"); + return this; + } /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -486,6 +505,7 @@ public ProtectedDatabaseSummary build() { this.healthDetails, this.isReadOnlyResource, this.metrics, + this.subscriptionId, this.freeformTags, this.definedTags, this.systemTags); @@ -551,6 +571,9 @@ public Builder copy(ProtectedDatabaseSummary model) { if (model.wasPropertyExplicitlySet("metrics")) { this.metrics(model.getMetrics()); } + if (model.wasPropertyExplicitlySet("subscriptionId")) { + this.subscriptionId(model.getSubscriptionId()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -838,6 +861,20 @@ public MetricsSummary getMetrics() { return metrics; } + /** + * The OCID of the cloud service subscription to which the protected database is linked. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subscriptionId") + private final String subscriptionId; + + /** + * The OCID of the cloud service subscription to which the protected database is linked. + * @return the value + **/ + public String getSubscriptionId() { + return subscriptionId; + } + /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -924,6 +961,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", healthDetails=").append(String.valueOf(this.healthDetails)); sb.append(", isReadOnlyResource=").append(String.valueOf(this.isReadOnlyResource)); sb.append(", metrics=").append(String.valueOf(this.metrics)); + sb.append(", subscriptionId=").append(String.valueOf(this.subscriptionId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); @@ -960,6 +998,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.healthDetails, other.healthDetails) && java.util.Objects.equals(this.isReadOnlyResource, other.isReadOnlyResource) && java.util.Objects.equals(this.metrics, other.metrics) + && java.util.Objects.equals(this.subscriptionId, other.subscriptionId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) @@ -1012,6 +1051,9 @@ public int hashCode() { ? 43 : this.isReadOnlyResource.hashCode()); result = (result * PRIME) + (this.metrics == null ? 43 : this.metrics.hashCode()); + result = + (result * PRIME) + + (this.subscriptionId == null ? 43 : this.subscriptionId.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); diff --git a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/ProtectionPolicy.java b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/ProtectionPolicy.java index e3dc54a81e6..e870ab3e1c5 100644 --- a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/ProtectionPolicy.java +++ b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/ProtectionPolicy.java @@ -28,6 +28,7 @@ public final class ProtectionPolicy extends com.oracle.bmc.http.internal.Explici "backupRetentionPeriodInDays", "isPredefinedPolicy", "policyLockedDateTime", + "mustEnforceCloudLocality", "timeCreated", "timeUpdated", "lifecycleState", @@ -43,6 +44,7 @@ public ProtectionPolicy( Integer backupRetentionPeriodInDays, Boolean isPredefinedPolicy, String policyLockedDateTime, + Boolean mustEnforceCloudLocality, java.util.Date timeCreated, java.util.Date timeUpdated, LifecycleState lifecycleState, @@ -57,6 +59,7 @@ public ProtectionPolicy( this.backupRetentionPeriodInDays = backupRetentionPeriodInDays; this.isPredefinedPolicy = isPredefinedPolicy; this.policyLockedDateTime = policyLockedDateTime; + this.mustEnforceCloudLocality = mustEnforceCloudLocality; this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.lifecycleState = lifecycleState; @@ -166,6 +169,22 @@ public Builder policyLockedDateTime(String policyLockedDateTime) { this.__explicitlySet__.add("policyLockedDateTime"); return this; } + /** + * Indicates whether the protection policy enforces Recovery Service to retain backups in the same cloud service environment where your Oracle Database is provisioned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mustEnforceCloudLocality") + private Boolean mustEnforceCloudLocality; + + /** + * Indicates whether the protection policy enforces Recovery Service to retain backups in the same cloud service environment where your Oracle Database is provisioned. + * @param mustEnforceCloudLocality the value to set + * @return this builder + **/ + public Builder mustEnforceCloudLocality(Boolean mustEnforceCloudLocality) { + this.mustEnforceCloudLocality = mustEnforceCloudLocality; + this.__explicitlySet__.add("mustEnforceCloudLocality"); + return this; + } /** * An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'. * @@ -310,6 +329,7 @@ public ProtectionPolicy build() { this.backupRetentionPeriodInDays, this.isPredefinedPolicy, this.policyLockedDateTime, + this.mustEnforceCloudLocality, this.timeCreated, this.timeUpdated, this.lifecycleState, @@ -343,6 +363,9 @@ public Builder copy(ProtectionPolicy model) { if (model.wasPropertyExplicitlySet("policyLockedDateTime")) { this.policyLockedDateTime(model.getPolicyLockedDateTime()); } + if (model.wasPropertyExplicitlySet("mustEnforceCloudLocality")) { + this.mustEnforceCloudLocality(model.getMustEnforceCloudLocality()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -465,6 +488,20 @@ public String getPolicyLockedDateTime() { return policyLockedDateTime; } + /** + * Indicates whether the protection policy enforces Recovery Service to retain backups in the same cloud service environment where your Oracle Database is provisioned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mustEnforceCloudLocality") + private final Boolean mustEnforceCloudLocality; + + /** + * Indicates whether the protection policy enforces Recovery Service to retain backups in the same cloud service environment where your Oracle Database is provisioned. + * @return the value + **/ + public Boolean getMustEnforceCloudLocality() { + return mustEnforceCloudLocality; + } + /** * An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'. * @@ -602,6 +639,8 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.backupRetentionPeriodInDays)); sb.append(", isPredefinedPolicy=").append(String.valueOf(this.isPredefinedPolicy)); sb.append(", policyLockedDateTime=").append(String.valueOf(this.policyLockedDateTime)); + sb.append(", mustEnforceCloudLocality=") + .append(String.valueOf(this.mustEnforceCloudLocality)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); @@ -630,6 +669,8 @@ public boolean equals(Object o) { this.backupRetentionPeriodInDays, other.backupRetentionPeriodInDays) && java.util.Objects.equals(this.isPredefinedPolicy, other.isPredefinedPolicy) && java.util.Objects.equals(this.policyLockedDateTime, other.policyLockedDateTime) + && java.util.Objects.equals( + this.mustEnforceCloudLocality, other.mustEnforceCloudLocality) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) @@ -664,6 +705,11 @@ public int hashCode() { + (this.policyLockedDateTime == null ? 43 : this.policyLockedDateTime.hashCode()); + result = + (result * PRIME) + + (this.mustEnforceCloudLocality == null + ? 43 + : this.mustEnforceCloudLocality.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); result = diff --git a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/ProtectionPolicySummary.java b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/ProtectionPolicySummary.java index d7774383153..83258df6290 100644 --- a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/ProtectionPolicySummary.java +++ b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/model/ProtectionPolicySummary.java @@ -34,6 +34,7 @@ public final class ProtectionPolicySummary "backupRetentionPeriodInDays", "isPredefinedPolicy", "policyLockedDateTime", + "mustEnforceCloudLocality", "timeCreated", "timeUpdated", "lifecycleState", @@ -49,6 +50,7 @@ public ProtectionPolicySummary( Integer backupRetentionPeriodInDays, Boolean isPredefinedPolicy, String policyLockedDateTime, + Boolean mustEnforceCloudLocality, java.util.Date timeCreated, java.util.Date timeUpdated, LifecycleState lifecycleState, @@ -63,6 +65,7 @@ public ProtectionPolicySummary( this.backupRetentionPeriodInDays = backupRetentionPeriodInDays; this.isPredefinedPolicy = isPredefinedPolicy; this.policyLockedDateTime = policyLockedDateTime; + this.mustEnforceCloudLocality = mustEnforceCloudLocality; this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.lifecycleState = lifecycleState; @@ -172,6 +175,22 @@ public Builder policyLockedDateTime(String policyLockedDateTime) { this.__explicitlySet__.add("policyLockedDateTime"); return this; } + /** + * Indicates whether the protection policy enforces Recovery Service to retain backups in the same cloud service environment where your Oracle Database is provisioned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mustEnforceCloudLocality") + private Boolean mustEnforceCloudLocality; + + /** + * Indicates whether the protection policy enforces Recovery Service to retain backups in the same cloud service environment where your Oracle Database is provisioned. + * @param mustEnforceCloudLocality the value to set + * @return this builder + **/ + public Builder mustEnforceCloudLocality(Boolean mustEnforceCloudLocality) { + this.mustEnforceCloudLocality = mustEnforceCloudLocality; + this.__explicitlySet__.add("mustEnforceCloudLocality"); + return this; + } /** * The time the Protection Policy was created. An RFC3339 formatted datetime string **/ @@ -310,6 +329,7 @@ public ProtectionPolicySummary build() { this.backupRetentionPeriodInDays, this.isPredefinedPolicy, this.policyLockedDateTime, + this.mustEnforceCloudLocality, this.timeCreated, this.timeUpdated, this.lifecycleState, @@ -343,6 +363,9 @@ public Builder copy(ProtectionPolicySummary model) { if (model.wasPropertyExplicitlySet("policyLockedDateTime")) { this.policyLockedDateTime(model.getPolicyLockedDateTime()); } + if (model.wasPropertyExplicitlySet("mustEnforceCloudLocality")) { + this.mustEnforceCloudLocality(model.getMustEnforceCloudLocality()); + } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } @@ -465,6 +488,20 @@ public String getPolicyLockedDateTime() { return policyLockedDateTime; } + /** + * Indicates whether the protection policy enforces Recovery Service to retain backups in the same cloud service environment where your Oracle Database is provisioned. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mustEnforceCloudLocality") + private final Boolean mustEnforceCloudLocality; + + /** + * Indicates whether the protection policy enforces Recovery Service to retain backups in the same cloud service environment where your Oracle Database is provisioned. + * @return the value + **/ + public Boolean getMustEnforceCloudLocality() { + return mustEnforceCloudLocality; + } + /** * The time the Protection Policy was created. An RFC3339 formatted datetime string **/ @@ -596,6 +633,8 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.backupRetentionPeriodInDays)); sb.append(", isPredefinedPolicy=").append(String.valueOf(this.isPredefinedPolicy)); sb.append(", policyLockedDateTime=").append(String.valueOf(this.policyLockedDateTime)); + sb.append(", mustEnforceCloudLocality=") + .append(String.valueOf(this.mustEnforceCloudLocality)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); @@ -624,6 +663,8 @@ public boolean equals(Object o) { this.backupRetentionPeriodInDays, other.backupRetentionPeriodInDays) && java.util.Objects.equals(this.isPredefinedPolicy, other.isPredefinedPolicy) && java.util.Objects.equals(this.policyLockedDateTime, other.policyLockedDateTime) + && java.util.Objects.equals( + this.mustEnforceCloudLocality, other.mustEnforceCloudLocality) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) @@ -658,6 +699,11 @@ public int hashCode() { + (this.policyLockedDateTime == null ? 43 : this.policyLockedDateTime.hashCode()); + result = + (result * PRIME) + + (this.mustEnforceCloudLocality == null + ? 43 + : this.mustEnforceCloudLocality.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); result = diff --git a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/requests/ChangeProtectedDatabaseSubscriptionRequest.java b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/requests/ChangeProtectedDatabaseSubscriptionRequest.java new file mode 100644 index 00000000000..9d1d61a9bc7 --- /dev/null +++ b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/requests/ChangeProtectedDatabaseSubscriptionRequest.java @@ -0,0 +1,326 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.recovery.requests; + +import com.oracle.bmc.recovery.model.*; +/** + * Example: Click here to see how to use ChangeProtectedDatabaseSubscriptionRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210216") +public class ChangeProtectedDatabaseSubscriptionRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.recovery.model.ChangeProtectedDatabaseSubscriptionDetails> { + + /** + * The protected database OCID. + */ + private String protectedDatabaseId; + + /** + * The protected database OCID. + */ + public String getProtectedDatabaseId() { + return protectedDatabaseId; + } + /** + * Associate a protected database with a different subscription. + */ + private com.oracle.bmc.recovery.model.ChangeProtectedDatabaseSubscriptionDetails + changeProtectedDatabaseSubscriptionDetails; + + /** + * Associate a protected database with a different subscription. + */ + public com.oracle.bmc.recovery.model.ChangeProtectedDatabaseSubscriptionDetails + getChangeProtectedDatabaseSubscriptionDetails() { + return changeProtectedDatabaseSubscriptionDetails; + } + /** + * Unique identifier for the request. + */ + private String opcRequestId; + + /** + * Unique identifier for the request. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.recovery.model.ChangeProtectedDatabaseSubscriptionDetails getBody$() { + return changeProtectedDatabaseSubscriptionDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeProtectedDatabaseSubscriptionRequest, + com.oracle.bmc.recovery.model.ChangeProtectedDatabaseSubscriptionDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The protected database OCID. + */ + private String protectedDatabaseId = null; + + /** + * The protected database OCID. + * @param protectedDatabaseId the value to set + * @return this builder instance + */ + public Builder protectedDatabaseId(String protectedDatabaseId) { + this.protectedDatabaseId = protectedDatabaseId; + return this; + } + + /** + * Associate a protected database with a different subscription. + */ + private com.oracle.bmc.recovery.model.ChangeProtectedDatabaseSubscriptionDetails + changeProtectedDatabaseSubscriptionDetails = null; + + /** + * Associate a protected database with a different subscription. + * @param changeProtectedDatabaseSubscriptionDetails the value to set + * @return this builder instance + */ + public Builder changeProtectedDatabaseSubscriptionDetails( + com.oracle.bmc.recovery.model.ChangeProtectedDatabaseSubscriptionDetails + changeProtectedDatabaseSubscriptionDetails) { + this.changeProtectedDatabaseSubscriptionDetails = + changeProtectedDatabaseSubscriptionDetails; + return this; + } + + /** + * Unique identifier for the request. + */ + private String opcRequestId = null; + + /** + * Unique identifier for the request. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeProtectedDatabaseSubscriptionRequest o) { + protectedDatabaseId(o.getProtectedDatabaseId()); + changeProtectedDatabaseSubscriptionDetails( + o.getChangeProtectedDatabaseSubscriptionDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeProtectedDatabaseSubscriptionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeProtectedDatabaseSubscriptionRequest + */ + public ChangeProtectedDatabaseSubscriptionRequest build() { + ChangeProtectedDatabaseSubscriptionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.recovery.model.ChangeProtectedDatabaseSubscriptionDetails body) { + changeProtectedDatabaseSubscriptionDetails(body); + return this; + } + + /** + * Build the instance of ChangeProtectedDatabaseSubscriptionRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeProtectedDatabaseSubscriptionRequest + */ + public ChangeProtectedDatabaseSubscriptionRequest buildWithoutInvocationCallback() { + ChangeProtectedDatabaseSubscriptionRequest request = + new ChangeProtectedDatabaseSubscriptionRequest(); + request.protectedDatabaseId = protectedDatabaseId; + request.changeProtectedDatabaseSubscriptionDetails = + changeProtectedDatabaseSubscriptionDetails; + request.opcRequestId = opcRequestId; + request.ifMatch = ifMatch; + return request; + // new ChangeProtectedDatabaseSubscriptionRequest(protectedDatabaseId, changeProtectedDatabaseSubscriptionDetails, opcRequestId, ifMatch); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .protectedDatabaseId(protectedDatabaseId) + .changeProtectedDatabaseSubscriptionDetails( + changeProtectedDatabaseSubscriptionDetails) + .opcRequestId(opcRequestId) + .ifMatch(ifMatch); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",protectedDatabaseId=").append(String.valueOf(this.protectedDatabaseId)); + sb.append(",changeProtectedDatabaseSubscriptionDetails=") + .append(String.valueOf(this.changeProtectedDatabaseSubscriptionDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeProtectedDatabaseSubscriptionRequest)) { + return false; + } + + ChangeProtectedDatabaseSubscriptionRequest other = + (ChangeProtectedDatabaseSubscriptionRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.protectedDatabaseId, other.protectedDatabaseId) + && java.util.Objects.equals( + this.changeProtectedDatabaseSubscriptionDetails, + other.changeProtectedDatabaseSubscriptionDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.protectedDatabaseId == null + ? 43 + : this.protectedDatabaseId.hashCode()); + result = + (result * PRIME) + + (this.changeProtectedDatabaseSubscriptionDetails == null + ? 43 + : this.changeProtectedDatabaseSubscriptionDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + return result; + } +} diff --git a/bmc-recovery/src/main/java/com/oracle/bmc/recovery/responses/ChangeProtectedDatabaseSubscriptionResponse.java b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/responses/ChangeProtectedDatabaseSubscriptionResponse.java new file mode 100644 index 00000000000..819c46992f7 --- /dev/null +++ b/bmc-recovery/src/main/java/com/oracle/bmc/recovery/responses/ChangeProtectedDatabaseSubscriptionResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.recovery.responses; + +import com.oracle.bmc.recovery.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210216") +public class ChangeProtectedDatabaseSubscriptionResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier of the work request. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier of the work request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private ChangeProtectedDatabaseSubscriptionResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier of the work request. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier of the work request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeProtectedDatabaseSubscriptionResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeProtectedDatabaseSubscriptionResponse build() { + return new ChangeProtectedDatabaseSubscriptionResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeProtectedDatabaseSubscriptionResponse)) { + return false; + } + + ChangeProtectedDatabaseSubscriptionResponse other = + (ChangeProtectedDatabaseSubscriptionResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-redis/pom.xml b/bmc-redis/pom.xml index 1734191fe95..146e8a23096 100644 --- a/bmc-redis/pom.xml +++ b/bmc-redis/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-redis @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/RedisCluster.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/RedisCluster.java index 3e23440bb84..38a90510507 100644 --- a/bmc-redis/src/main/java/com/oracle/bmc/redis/RedisCluster.java +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/RedisCluster.java @@ -8,7 +8,7 @@ import com.oracle.bmc.redis.responses.*; /** - * Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). + * Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. */ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220315") @@ -72,7 +72,7 @@ public interface RedisCluster extends AutoCloseable { CancelWorkRequestResponse cancelWorkRequest(CancelWorkRequestRequest request); /** - * Moves a Redis cluster into a different compartment within the same tenancy. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). + * Moves an OCI Cache cluster into a different compartment within the same tenancy. A cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -85,7 +85,7 @@ ChangeRedisClusterCompartmentResponse changeRedisClusterCompartment( ChangeRedisClusterCompartmentRequest request); /** - * Creates a new Redis cluster. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). + * Creates a new OCI Cache cluster. A cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -98,7 +98,7 @@ ChangeRedisClusterCompartmentResponse changeRedisClusterCompartment( CreateRedisClusterResponse createRedisCluster(CreateRedisClusterRequest request); /** - * Deletes the specified Redis cluster. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). + * Deletes the specified OCI Cache cluster. A cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -110,7 +110,7 @@ ChangeRedisClusterCompartmentResponse changeRedisClusterCompartment( DeleteRedisClusterResponse deleteRedisCluster(DeleteRedisClusterRequest request); /** - * Retrieves the specified Redis cluster. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). + * Retrieves the specified OCI Cache cluster. A cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. @@ -134,7 +134,20 @@ ChangeRedisClusterCompartmentResponse changeRedisClusterCompartment( GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request); /** - * Lists the Redis clusters in the specified compartment. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). + * Gets the list of all nodes in a cluster. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListRedisClusterNodes API. + */ + ListRedisClusterNodesResponse listRedisClusterNodes(ListRedisClusterNodesRequest request); + + /** + * Lists the OCI Cache clusters in the specified compartment. A cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -186,7 +199,7 @@ ChangeRedisClusterCompartmentResponse changeRedisClusterCompartment( ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request); /** - * Updates the specified Redis cluster. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). + * Updates the specified OCI Cache cluster. A cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/RedisClusterAsync.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/RedisClusterAsync.java index 92783db617f..f289edfc9f8 100644 --- a/bmc-redis/src/main/java/com/oracle/bmc/redis/RedisClusterAsync.java +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/RedisClusterAsync.java @@ -8,7 +8,7 @@ import com.oracle.bmc.redis.responses.*; /** - * Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). + * Use the OCI Cache API to create and manage clusters. A cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). */ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220315") public interface RedisClusterAsync extends AutoCloseable { @@ -75,7 +75,7 @@ java.util.concurrent.Future cancelWorkRequest( handler); /** - * Moves a Redis cluster into a different compartment within the same tenancy. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). + * Moves an OCI Cache cluster into a different compartment within the same tenancy. A cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -93,7 +93,7 @@ java.util.concurrent.Future cancelWorkRequest( handler); /** - * Creates a new Redis cluster. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). + * Creates a new OCI Cache cluster. A cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). * * * @param request The request object containing the details to send @@ -110,7 +110,7 @@ java.util.concurrent.Future createRedisCluster( handler); /** - * Deletes the specified Redis cluster. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). + * Deletes the specified OCI Cache cluster. A cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -126,7 +126,7 @@ java.util.concurrent.Future deleteRedisCluster( handler); /** - * Retrieves the specified Redis cluster. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). + * Retrieves the specified OCI Cache cluster. A cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -156,7 +156,24 @@ java.util.concurrent.Future getWorkRequest( handler); /** - * Lists the Redis clusters in the specified compartment. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). + * Gets the list of all nodes in a cluster. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listRedisClusterNodes( + ListRedisClusterNodesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListRedisClusterNodesRequest, ListRedisClusterNodesResponse> + handler); + + /** + * Lists the OCI Cache clusters in the specified compartment. A cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). * * * @param request The request object containing the details to send @@ -223,7 +240,7 @@ java.util.concurrent.Future listWorkRequests( handler); /** - * Updates the specified Redis cluster. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). + * Updates the specified OCI Cache cluster. A cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/RedisClusterAsyncClient.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/RedisClusterAsyncClient.java index 4a19d6fd4e2..8576cc3d4f7 100644 --- a/bmc-redis/src/main/java/com/oracle/bmc/redis/RedisClusterAsyncClient.java +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/RedisClusterAsyncClient.java @@ -470,7 +470,10 @@ public java.util.concurrent.Future cancelWorkRequest( CancelWorkRequestConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "RedisCluster", "CancelWorkRequest", ib.getRequestUri().toString(), ""); + "RedisCluster", + "CancelWorkRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/WorkRequest/CancelWorkRequest"); final java.util.function.Function transformer = CancelWorkRequestConverter.fromResponse( @@ -519,7 +522,7 @@ protected void beforeRetryAction() {} "RedisCluster", "ChangeRedisClusterCompartment", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/RedisCluster/ChangeRedisClusterCompartment"); final java.util.function.Function< javax.ws.rs.core.Response, ChangeRedisClusterCompartmentResponse> transformer = @@ -571,7 +574,10 @@ public java.util.concurrent.Future createRedisCluste com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "RedisCluster", "CreateRedisCluster", ib.getRequestUri().toString(), ""); + "RedisCluster", + "CreateRedisCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/RedisCluster/CreateRedisCluster"); final java.util.function.Function transformer = CreateRedisClusterConverter.fromResponse( @@ -619,7 +625,10 @@ public java.util.concurrent.Future deleteRedisCluste DeleteRedisClusterConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "RedisCluster", "DeleteRedisCluster", ib.getRequestUri().toString(), ""); + "RedisCluster", + "DeleteRedisCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/RedisCluster/DeleteRedisCluster"); final java.util.function.Function transformer = DeleteRedisClusterConverter.fromResponse( @@ -662,7 +671,10 @@ public java.util.concurrent.Future getRedisCluster( GetRedisClusterConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "RedisCluster", "GetRedisCluster", ib.getRequestUri().toString(), ""); + "RedisCluster", + "GetRedisCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/RedisCluster/GetRedisCluster"); final java.util.function.Function transformer = GetRedisClusterConverter.fromResponse( @@ -705,7 +717,10 @@ public java.util.concurrent.Future getWorkRequest( GetWorkRequestConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "RedisCluster", "GetWorkRequest", ib.getRequestUri().toString(), ""); + "RedisCluster", + "GetWorkRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/WorkRequest/GetWorkRequest"); final java.util.function.Function transformer = GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); @@ -734,6 +749,53 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future listRedisClusterNodes( + ListRedisClusterNodesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListRedisClusterNodesRequest, ListRedisClusterNodesResponse> + handler) { + LOG.trace("Called async listRedisClusterNodes"); + final ListRedisClusterNodesRequest interceptedRequest = + ListRedisClusterNodesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListRedisClusterNodesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "RedisCluster", + "ListRedisClusterNodes", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/NodeSummary/ListRedisClusterNodes"); + final java.util.function.Function + transformer = + ListRedisClusterNodesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListRedisClusterNodesRequest, ListRedisClusterNodesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListRedisClusterNodesRequest, ListRedisClusterNodesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListRedisClusterNodesRequest, ListRedisClusterNodesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listRedisClusters( ListRedisClustersRequest request, @@ -747,7 +809,10 @@ public java.util.concurrent.Future listRedisClusters( ListRedisClustersConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "RedisCluster", "ListRedisClusters", ib.getRequestUri().toString(), ""); + "RedisCluster", + "ListRedisClusters", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/RedisClusterSummary/ListRedisClusters"); final java.util.function.Function transformer = ListRedisClustersConverter.fromResponse( @@ -790,7 +855,10 @@ public java.util.concurrent.Future listWorkReques ListWorkRequestErrorsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "RedisCluster", "ListWorkRequestErrors", ib.getRequestUri().toString(), ""); + "RedisCluster", + "ListWorkRequestErrors", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/WorkRequestError/ListWorkRequestErrors"); final java.util.function.Function transformer = ListWorkRequestErrorsConverter.fromResponse( @@ -834,7 +902,10 @@ public java.util.concurrent.Future listWorkRequestL ListWorkRequestLogsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "RedisCluster", "ListWorkRequestLogs", ib.getRequestUri().toString(), ""); + "RedisCluster", + "ListWorkRequestLogs", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/WorkRequestLogEntry/ListWorkRequestLogs"); final java.util.function.Function transformer = ListWorkRequestLogsConverter.fromResponse( @@ -878,7 +949,10 @@ public java.util.concurrent.Future listWorkRequests( ListWorkRequestsConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "RedisCluster", "ListWorkRequests", ib.getRequestUri().toString(), ""); + "RedisCluster", + "ListWorkRequests", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/WorkRequest/ListWorkRequests"); final java.util.function.Function transformer = ListWorkRequestsConverter.fromResponse( @@ -921,7 +995,10 @@ public java.util.concurrent.Future updateRedisCluste UpdateRedisClusterConverter.fromRequest(client, interceptedRequest); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "RedisCluster", "UpdateRedisCluster", ib.getRequestUri().toString(), ""); + "RedisCluster", + "UpdateRedisCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/RedisCluster/UpdateRedisCluster"); final java.util.function.Function transformer = UpdateRedisClusterConverter.fromResponse( diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/RedisClusterClient.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/RedisClusterClient.java index 332bf4b1d4f..b33eeb2a1ac 100644 --- a/bmc-redis/src/main/java/com/oracle/bmc/redis/RedisClusterClient.java +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/RedisClusterClient.java @@ -561,7 +561,10 @@ public CancelWorkRequestResponse cancelWorkRequest(CancelWorkRequestRequest requ com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "RedisCluster", "CancelWorkRequest", ib.getRequestUri().toString(), ""); + "RedisCluster", + "CancelWorkRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/WorkRequest/CancelWorkRequest"); java.util.function.Function transformer = CancelWorkRequestConverter.fromResponse( @@ -601,7 +604,7 @@ public ChangeRedisClusterCompartmentResponse changeRedisClusterCompartment( "RedisCluster", "ChangeRedisClusterCompartment", ib.getRequestUri().toString(), - ""); + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/RedisCluster/ChangeRedisClusterCompartment"); java.util.function.Function< javax.ws.rs.core.Response, ChangeRedisClusterCompartmentResponse> transformer = @@ -642,7 +645,10 @@ public CreateRedisClusterResponse createRedisCluster(CreateRedisClusterRequest r com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "RedisCluster", "CreateRedisCluster", ib.getRequestUri().toString(), ""); + "RedisCluster", + "CreateRedisCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/RedisCluster/CreateRedisCluster"); java.util.function.Function transformer = CreateRedisClusterConverter.fromResponse( @@ -680,7 +686,10 @@ public DeleteRedisClusterResponse deleteRedisCluster(DeleteRedisClusterRequest r com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "RedisCluster", "DeleteRedisCluster", ib.getRequestUri().toString(), ""); + "RedisCluster", + "DeleteRedisCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/RedisCluster/DeleteRedisCluster"); java.util.function.Function transformer = DeleteRedisClusterConverter.fromResponse( @@ -715,7 +724,10 @@ public GetRedisClusterResponse getRedisCluster(GetRedisClusterRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "RedisCluster", "GetRedisCluster", ib.getRequestUri().toString(), ""); + "RedisCluster", + "GetRedisCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/RedisCluster/GetRedisCluster"); java.util.function.Function transformer = GetRedisClusterConverter.fromResponse( @@ -749,7 +761,10 @@ public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) { com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "RedisCluster", "GetWorkRequest", ib.getRequestUri().toString(), ""); + "RedisCluster", + "GetWorkRequest", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/WorkRequest/GetWorkRequest"); java.util.function.Function transformer = GetWorkRequestConverter.fromResponse(java.util.Optional.of(serviceDetails)); return retrier.execute( @@ -767,6 +782,44 @@ public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) { }); } + @Override + public ListRedisClusterNodesResponse listRedisClusterNodes( + ListRedisClusterNodesRequest request) { + LOG.trace("Called listRedisClusterNodes"); + final ListRedisClusterNodesRequest interceptedRequest = + ListRedisClusterNodesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListRedisClusterNodesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "RedisCluster", + "ListRedisClusterNodes", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/NodeSummary/ListRedisClusterNodes"); + java.util.function.Function + transformer = + ListRedisClusterNodesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListRedisClustersResponse listRedisClusters(ListRedisClustersRequest request) { LOG.trace("Called listRedisClusters"); @@ -781,7 +834,10 @@ public ListRedisClustersResponse listRedisClusters(ListRedisClustersRequest requ com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "RedisCluster", "ListRedisClusters", ib.getRequestUri().toString(), ""); + "RedisCluster", + "ListRedisClusters", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/RedisClusterSummary/ListRedisClusters"); java.util.function.Function transformer = ListRedisClustersConverter.fromResponse( @@ -816,7 +872,10 @@ public ListWorkRequestErrorsResponse listWorkRequestErrors( com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "RedisCluster", "ListWorkRequestErrors", ib.getRequestUri().toString(), ""); + "RedisCluster", + "ListWorkRequestErrors", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/WorkRequestError/ListWorkRequestErrors"); java.util.function.Function transformer = ListWorkRequestErrorsConverter.fromResponse( @@ -850,7 +909,10 @@ public ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsReques com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "RedisCluster", "ListWorkRequestLogs", ib.getRequestUri().toString(), ""); + "RedisCluster", + "ListWorkRequestLogs", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/WorkRequestLogEntry/ListWorkRequestLogs"); java.util.function.Function transformer = ListWorkRequestLogsConverter.fromResponse( @@ -884,7 +946,10 @@ public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "RedisCluster", "ListWorkRequests", ib.getRequestUri().toString(), ""); + "RedisCluster", + "ListWorkRequests", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/WorkRequest/ListWorkRequests"); java.util.function.Function transformer = ListWorkRequestsConverter.fromResponse( @@ -918,7 +983,10 @@ public UpdateRedisClusterResponse updateRedisCluster(UpdateRedisClusterRequest r com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); com.oracle.bmc.ServiceDetails serviceDetails = new com.oracle.bmc.ServiceDetails( - "RedisCluster", "UpdateRedisCluster", ib.getRequestUri().toString(), ""); + "RedisCluster", + "UpdateRedisCluster", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/ocicache/20220315/RedisCluster/UpdateRedisCluster"); java.util.function.Function transformer = UpdateRedisClusterConverter.fromResponse( diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/RedisClusterPaginators.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/RedisClusterPaginators.java index 8f841019644..60f2380f7f3 100644 --- a/bmc-redis/src/main/java/com/oracle/bmc/redis/RedisClusterPaginators.java +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/RedisClusterPaginators.java @@ -33,6 +33,121 @@ public RedisClusterPaginators(RedisCluster client) { this.client = client; } + /** + * Creates a new iterable which will iterate over the responses received from the listRedisClusterNodes operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listRedisClusterNodesResponseIterator( + final ListRedisClusterNodesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListRedisClusterNodesRequest.Builder, ListRedisClusterNodesRequest, + ListRedisClusterNodesResponse>( + new java.util.function.Supplier() { + @Override + public ListRedisClusterNodesRequest.Builder get() { + return ListRedisClusterNodesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListRedisClusterNodesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListRedisClusterNodesRequest.Builder>, + ListRedisClusterNodesRequest>() { + @Override + public ListRedisClusterNodesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListRedisClusterNodesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListRedisClusterNodesRequest, ListRedisClusterNodesResponse>() { + @Override + public ListRedisClusterNodesResponse apply( + ListRedisClusterNodesRequest request) { + return client.listRedisClusterNodes(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.redis.model.NodeSummary} objects + * contained in responses from the listRedisClusterNodes operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.redis.model.NodeSummary} objects + * contained in responses received from the service. + */ + public Iterable listRedisClusterNodesRecordIterator( + final ListRedisClusterNodesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListRedisClusterNodesRequest.Builder, ListRedisClusterNodesRequest, + ListRedisClusterNodesResponse, com.oracle.bmc.redis.model.NodeSummary>( + new java.util.function.Supplier() { + @Override + public ListRedisClusterNodesRequest.Builder get() { + return ListRedisClusterNodesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListRedisClusterNodesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListRedisClusterNodesRequest.Builder>, + ListRedisClusterNodesRequest>() { + @Override + public ListRedisClusterNodesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListRedisClusterNodesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListRedisClusterNodesRequest, ListRedisClusterNodesResponse>() { + @Override + public ListRedisClusterNodesResponse apply( + ListRedisClusterNodesRequest request) { + return client.listRedisClusterNodes(request); + } + }, + new java.util.function.Function< + ListRedisClusterNodesResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListRedisClusterNodesResponse response) { + return response.getRedisNodeCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listRedisClusters operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/internal/http/ListRedisClusterNodesConverter.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/internal/http/ListRedisClusterNodesConverter.java new file mode 100644 index 00000000000..28fa1dffa9d --- /dev/null +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/internal/http/ListRedisClusterNodesConverter.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.redis.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.redis.model.*; +import com.oracle.bmc.redis.requests.*; +import com.oracle.bmc.redis.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220315") +public class ListRedisClusterNodesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListRedisClusterNodesConverter.class); + + public static com.oracle.bmc.redis.requests.ListRedisClusterNodesRequest interceptRequest( + com.oracle.bmc.redis.requests.ListRedisClusterNodesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.redis.requests.ListRedisClusterNodesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getRedisClusterId(), "redisClusterId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20220315") + .path("redisClusters") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getRedisClusterId())) + .path("nodes"); + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.redis.responses.ListRedisClusterNodesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.redis.responses.ListRedisClusterNodesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.redis.responses.ListRedisClusterNodesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.redis.responses.ListRedisClusterNodesResponse>() { + @Override + public com.oracle.bmc.redis.responses.ListRedisClusterNodesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.redis.responses.ListRedisClusterNodesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.redis.model + .RedisNodeCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.redis.model.RedisNodeCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.redis.model.RedisNodeCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.redis.model.RedisNodeCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.redis.responses.ListRedisClusterNodesResponse.Builder + builder = + com.oracle.bmc.redis.responses + .ListRedisClusterNodesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.redisNodeCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.redis.responses.ListRedisClusterNodesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/model/ChangeRedisClusterCompartmentDetails.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/model/ChangeRedisClusterCompartmentDetails.java index 07f74d9a129..77ce8f0649e 100644 --- a/bmc-redis/src/main/java/com/oracle/bmc/redis/model/ChangeRedisClusterCompartmentDetails.java +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/model/ChangeRedisClusterCompartmentDetails.java @@ -32,7 +32,7 @@ public ChangeRedisClusterCompartmentDetails(String compartmentId) { public static class Builder { /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment - * into which the Redis cluster should be moved. + * into which the cluster should be moved. * **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") @@ -40,7 +40,7 @@ public static class Builder { /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment - * into which the Redis cluster should be moved. + * into which the cluster should be moved. * * @param compartmentId the value to set * @return this builder @@ -85,7 +85,7 @@ public Builder toBuilder() { /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment - * into which the Redis cluster should be moved. + * into which the cluster should be moved. * **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") @@ -93,7 +93,7 @@ public Builder toBuilder() { /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment - * into which the Redis cluster should be moved. + * into which the cluster should be moved. * * @return the value **/ diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/model/CreateRedisClusterDetails.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/model/CreateRedisClusterDetails.java index abd904c5a68..0b680383ee1 100644 --- a/bmc-redis/src/main/java/com/oracle/bmc/redis/model/CreateRedisClusterDetails.java +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/model/CreateRedisClusterDetails.java @@ -5,7 +5,7 @@ package com.oracle.bmc.redis.model; /** - * The configuration details for a new Redis cluster. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). + * The configuration details for a new OCI Cache cluster. An OCI Cache cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -23,6 +23,8 @@ public final class CreateRedisClusterDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated @java.beans.ConstructorProperties({ + "clusterMode", + "shardCount", "displayName", "compartmentId", "nodeCount", @@ -34,6 +36,8 @@ public final class CreateRedisClusterDetails "definedTags" }) public CreateRedisClusterDetails( + RedisCluster.ClusterMode clusterMode, + Integer shardCount, String displayName, String compartmentId, Integer nodeCount, @@ -44,6 +48,8 @@ public CreateRedisClusterDetails( java.util.Map freeformTags, java.util.Map> definedTags) { super(); + this.clusterMode = clusterMode; + this.shardCount = shardCount; this.displayName = displayName; this.compartmentId = compartmentId; this.nodeCount = nodeCount; @@ -57,6 +63,38 @@ public CreateRedisClusterDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + /** + * Specifies whether the cluster is sharded or non-sharded. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterMode") + private RedisCluster.ClusterMode clusterMode; + + /** + * Specifies whether the cluster is sharded or non-sharded. + * @param clusterMode the value to set + * @return this builder + **/ + public Builder clusterMode(RedisCluster.ClusterMode clusterMode) { + this.clusterMode = clusterMode; + this.__explicitlySet__.add("clusterMode"); + return this; + } + /** + * The number of shards in sharded cluster. Only applicable when clusterMode is SHARDED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shardCount") + private Integer shardCount; + + /** + * The number of shards in sharded cluster. Only applicable when clusterMode is SHARDED. + * @param shardCount the value to set + * @return this builder + **/ + public Builder shardCount(Integer shardCount) { + this.shardCount = shardCount; + this.__explicitlySet__.add("shardCount"); + return this; + } /** * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. **/ @@ -74,13 +112,13 @@ public Builder displayName(String displayName) { return this; } /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the cluster. **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the cluster. * @param compartmentId the value to set * @return this builder **/ @@ -90,13 +128,13 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * The number of nodes in the Redis cluster. + * The number of nodes per shard in the cluster when clusterMode is SHARDED. This is the total number of nodes when clusterMode is NONSHARDED. **/ @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") private Integer nodeCount; /** - * The number of nodes in the Redis cluster. + * The number of nodes per shard in the cluster when clusterMode is SHARDED. This is the total number of nodes when clusterMode is NONSHARDED. * @param nodeCount the value to set * @return this builder **/ @@ -106,13 +144,13 @@ public Builder nodeCount(Integer nodeCount) { return this; } /** - * The Redis version that the cluster is running. + * The OCI Cache engine version that the cluster is running. **/ @com.fasterxml.jackson.annotation.JsonProperty("softwareVersion") private RedisCluster.SoftwareVersion softwareVersion; /** - * The Redis version that the cluster is running. + * The OCI Cache engine version that the cluster is running. * @param softwareVersion the value to set * @return this builder **/ @@ -122,13 +160,13 @@ public Builder softwareVersion(RedisCluster.SoftwareVersion softwareVersion) { return this; } /** - * The amount of memory allocated to the Redis cluster's nodes, in gigabytes. + * The amount of memory allocated to the cluster's nodes, in gigabytes. **/ @com.fasterxml.jackson.annotation.JsonProperty("nodeMemoryInGBs") private Float nodeMemoryInGBs; /** - * The amount of memory allocated to the Redis cluster's nodes, in gigabytes. + * The amount of memory allocated to the cluster's nodes, in gigabytes. * @param nodeMemoryInGBs the value to set * @return this builder **/ @@ -138,13 +176,13 @@ public Builder nodeMemoryInGBs(Float nodeMemoryInGBs) { return this; } /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster's subnet. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster's subnet. **/ @com.fasterxml.jackson.annotation.JsonProperty("subnetId") private String subnetId; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster's subnet. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster's subnet. * @param subnetId the value to set * @return this builder **/ @@ -154,13 +192,19 @@ public Builder subnetId(String subnetId) { return this; } /** - * OCIDs of the NSGs to control access in the customer network + * A list of Network Security Group (NSG) [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * associated with this cluster. For more information, + * see [Using an NSG for Clusters](https://docs.cloud.oracle.com/iaas/Content/ocicache/connecttocluster.htm#connecttocluster__networksecuritygroup). + * **/ @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") private java.util.List nsgIds; /** - * OCIDs of the NSGs to control access in the customer network + * A list of Network Security Group (NSG) [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * associated with this cluster. For more information, + * see [Using an NSG for Clusters](https://docs.cloud.oracle.com/iaas/Content/ocicache/connecttocluster.htm#connecttocluster__networksecuritygroup). + * * @param nsgIds the value to set * @return this builder **/ @@ -217,6 +261,8 @@ public Builder definedTags( public CreateRedisClusterDetails build() { CreateRedisClusterDetails model = new CreateRedisClusterDetails( + this.clusterMode, + this.shardCount, this.displayName, this.compartmentId, this.nodeCount, @@ -234,6 +280,12 @@ public CreateRedisClusterDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(CreateRedisClusterDetails model) { + if (model.wasPropertyExplicitlySet("clusterMode")) { + this.clusterMode(model.getClusterMode()); + } + if (model.wasPropertyExplicitlySet("shardCount")) { + this.shardCount(model.getShardCount()); + } if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } @@ -276,6 +328,34 @@ public Builder toBuilder() { return new Builder().copy(this); } + /** + * Specifies whether the cluster is sharded or non-sharded. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterMode") + private final RedisCluster.ClusterMode clusterMode; + + /** + * Specifies whether the cluster is sharded or non-sharded. + * @return the value + **/ + public RedisCluster.ClusterMode getClusterMode() { + return clusterMode; + } + + /** + * The number of shards in sharded cluster. Only applicable when clusterMode is SHARDED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shardCount") + private final Integer shardCount; + + /** + * The number of shards in sharded cluster. Only applicable when clusterMode is SHARDED. + * @return the value + **/ + public Integer getShardCount() { + return shardCount; + } + /** * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. **/ @@ -291,13 +371,13 @@ public String getDisplayName() { } /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the cluster. **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private final String compartmentId; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the cluster. * @return the value **/ public String getCompartmentId() { @@ -305,13 +385,13 @@ public String getCompartmentId() { } /** - * The number of nodes in the Redis cluster. + * The number of nodes per shard in the cluster when clusterMode is SHARDED. This is the total number of nodes when clusterMode is NONSHARDED. **/ @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") private final Integer nodeCount; /** - * The number of nodes in the Redis cluster. + * The number of nodes per shard in the cluster when clusterMode is SHARDED. This is the total number of nodes when clusterMode is NONSHARDED. * @return the value **/ public Integer getNodeCount() { @@ -319,13 +399,13 @@ public Integer getNodeCount() { } /** - * The Redis version that the cluster is running. + * The OCI Cache engine version that the cluster is running. **/ @com.fasterxml.jackson.annotation.JsonProperty("softwareVersion") private final RedisCluster.SoftwareVersion softwareVersion; /** - * The Redis version that the cluster is running. + * The OCI Cache engine version that the cluster is running. * @return the value **/ public RedisCluster.SoftwareVersion getSoftwareVersion() { @@ -333,13 +413,13 @@ public RedisCluster.SoftwareVersion getSoftwareVersion() { } /** - * The amount of memory allocated to the Redis cluster's nodes, in gigabytes. + * The amount of memory allocated to the cluster's nodes, in gigabytes. **/ @com.fasterxml.jackson.annotation.JsonProperty("nodeMemoryInGBs") private final Float nodeMemoryInGBs; /** - * The amount of memory allocated to the Redis cluster's nodes, in gigabytes. + * The amount of memory allocated to the cluster's nodes, in gigabytes. * @return the value **/ public Float getNodeMemoryInGBs() { @@ -347,13 +427,13 @@ public Float getNodeMemoryInGBs() { } /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster's subnet. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster's subnet. **/ @com.fasterxml.jackson.annotation.JsonProperty("subnetId") private final String subnetId; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster's subnet. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster's subnet. * @return the value **/ public String getSubnetId() { @@ -361,13 +441,19 @@ public String getSubnetId() { } /** - * OCIDs of the NSGs to control access in the customer network + * A list of Network Security Group (NSG) [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * associated with this cluster. For more information, + * see [Using an NSG for Clusters](https://docs.cloud.oracle.com/iaas/Content/ocicache/connecttocluster.htm#connecttocluster__networksecuritygroup). + * **/ @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") private final java.util.List nsgIds; /** - * OCIDs of the NSGs to control access in the customer network + * A list of Network Security Group (NSG) [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * associated with this cluster. For more information, + * see [Using an NSG for Clusters](https://docs.cloud.oracle.com/iaas/Content/ocicache/connecttocluster.htm#connecttocluster__networksecuritygroup). + * * @return the value **/ public java.util.List getNsgIds() { @@ -424,7 +510,9 @@ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("CreateRedisClusterDetails("); sb.append("super=").append(super.toString()); - sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append("clusterMode=").append(String.valueOf(this.clusterMode)); + sb.append(", shardCount=").append(String.valueOf(this.shardCount)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", nodeCount=").append(String.valueOf(this.nodeCount)); sb.append(", softwareVersion=").append(String.valueOf(this.softwareVersion)); @@ -447,7 +535,9 @@ public boolean equals(Object o) { } CreateRedisClusterDetails other = (CreateRedisClusterDetails) o; - return java.util.Objects.equals(this.displayName, other.displayName) + return java.util.Objects.equals(this.clusterMode, other.clusterMode) + && java.util.Objects.equals(this.shardCount, other.shardCount) + && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.nodeCount, other.nodeCount) && java.util.Objects.equals(this.softwareVersion, other.softwareVersion) @@ -463,6 +553,8 @@ public boolean equals(Object o) { public int hashCode() { final int PRIME = 59; int result = 1; + result = (result * PRIME) + (this.clusterMode == null ? 43 : this.clusterMode.hashCode()); + result = (result * PRIME) + (this.shardCount == null ? 43 : this.shardCount.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/model/Node.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/model/Node.java index 8b5cf8dfb76..014d93849a4 100644 --- a/bmc-redis/src/main/java/com/oracle/bmc/redis/model/Node.java +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/model/Node.java @@ -5,7 +5,7 @@ package com.oracle.bmc.redis.model; /** - * The details of each node in the Redis cluster. + * The details of each node in the cluster. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -66,13 +66,13 @@ public Builder privateEndpointIpAddress(String privateEndpointIpAddress) { return this; } /** - * A user-friendly name of a Redis cluster node. + * A user-friendly name of a cluster node. **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") private String displayName; /** - * A user-friendly name of a Redis cluster node. + * A user-friendly name of a cluster node. * @param displayName the value to set * @return this builder **/ @@ -152,13 +152,13 @@ public String getPrivateEndpointIpAddress() { } /** - * A user-friendly name of a Redis cluster node. + * A user-friendly name of a cluster node. **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") private final String displayName; /** - * A user-friendly name of a Redis cluster node. + * A user-friendly name of a cluster node. * @return the value **/ public String getDisplayName() { diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/model/NodeCollection.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/model/NodeCollection.java index 4ccbdc14535..bcaaffc5a4f 100644 --- a/bmc-redis/src/main/java/com/oracle/bmc/redis/model/NodeCollection.java +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/model/NodeCollection.java @@ -5,7 +5,7 @@ package com.oracle.bmc.redis.model; /** - * The collection of Redis cluster nodes. + * The collection of cluster nodes. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/model/NodeSummary.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/model/NodeSummary.java new file mode 100644 index 00000000000..6aa820375b3 --- /dev/null +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/model/NodeSummary.java @@ -0,0 +1,310 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.redis.model; + +/** + * The details of each node in the cluster. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220315") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = NodeSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class NodeSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "privateEndpointFqdn", + "privateEndpointIpAddress", + "displayName", + "redisClusterId", + "shardNumber" + }) + public NodeSummary( + String privateEndpointFqdn, + String privateEndpointIpAddress, + String displayName, + String redisClusterId, + Integer shardNumber) { + super(); + this.privateEndpointFqdn = privateEndpointFqdn; + this.privateEndpointIpAddress = privateEndpointIpAddress; + this.displayName = displayName; + this.redisClusterId = redisClusterId; + this.shardNumber = shardNumber; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The fully qualified domain name (FQDN) of the API endpoint to access a specific node. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointFqdn") + private String privateEndpointFqdn; + + /** + * The fully qualified domain name (FQDN) of the API endpoint to access a specific node. + * @param privateEndpointFqdn the value to set + * @return this builder + **/ + public Builder privateEndpointFqdn(String privateEndpointFqdn) { + this.privateEndpointFqdn = privateEndpointFqdn; + this.__explicitlySet__.add("privateEndpointFqdn"); + return this; + } + /** + * The private IP address of the API endpoint to access a specific node. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIpAddress") + private String privateEndpointIpAddress; + + /** + * The private IP address of the API endpoint to access a specific node. + * @param privateEndpointIpAddress the value to set + * @return this builder + **/ + public Builder privateEndpointIpAddress(String privateEndpointIpAddress) { + this.privateEndpointIpAddress = privateEndpointIpAddress; + this.__explicitlySet__.add("privateEndpointIpAddress"); + return this; + } + /** + * A user-friendly name of a cluster node. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + /** + * A user-friendly name of a cluster node. + * @param displayName the value to set + * @return this builder + **/ + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + /** + * The OCID of the cluster + **/ + @com.fasterxml.jackson.annotation.JsonProperty("redisClusterId") + private String redisClusterId; + + /** + * The OCID of the cluster + * @param redisClusterId the value to set + * @return this builder + **/ + public Builder redisClusterId(String redisClusterId) { + this.redisClusterId = redisClusterId; + this.__explicitlySet__.add("redisClusterId"); + return this; + } + /** + * The shard number to which the node belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shardNumber") + private Integer shardNumber; + + /** + * The shard number to which the node belongs to. + * @param shardNumber the value to set + * @return this builder + **/ + public Builder shardNumber(Integer shardNumber) { + this.shardNumber = shardNumber; + this.__explicitlySet__.add("shardNumber"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public NodeSummary build() { + NodeSummary model = + new NodeSummary( + this.privateEndpointFqdn, + this.privateEndpointIpAddress, + this.displayName, + this.redisClusterId, + this.shardNumber); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(NodeSummary model) { + if (model.wasPropertyExplicitlySet("privateEndpointFqdn")) { + this.privateEndpointFqdn(model.getPrivateEndpointFqdn()); + } + if (model.wasPropertyExplicitlySet("privateEndpointIpAddress")) { + this.privateEndpointIpAddress(model.getPrivateEndpointIpAddress()); + } + if (model.wasPropertyExplicitlySet("displayName")) { + this.displayName(model.getDisplayName()); + } + if (model.wasPropertyExplicitlySet("redisClusterId")) { + this.redisClusterId(model.getRedisClusterId()); + } + if (model.wasPropertyExplicitlySet("shardNumber")) { + this.shardNumber(model.getShardNumber()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The fully qualified domain name (FQDN) of the API endpoint to access a specific node. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointFqdn") + private final String privateEndpointFqdn; + + /** + * The fully qualified domain name (FQDN) of the API endpoint to access a specific node. + * @return the value + **/ + public String getPrivateEndpointFqdn() { + return privateEndpointFqdn; + } + + /** + * The private IP address of the API endpoint to access a specific node. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIpAddress") + private final String privateEndpointIpAddress; + + /** + * The private IP address of the API endpoint to access a specific node. + * @return the value + **/ + public String getPrivateEndpointIpAddress() { + return privateEndpointIpAddress; + } + + /** + * A user-friendly name of a cluster node. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private final String displayName; + + /** + * A user-friendly name of a cluster node. + * @return the value + **/ + public String getDisplayName() { + return displayName; + } + + /** + * The OCID of the cluster + **/ + @com.fasterxml.jackson.annotation.JsonProperty("redisClusterId") + private final String redisClusterId; + + /** + * The OCID of the cluster + * @return the value + **/ + public String getRedisClusterId() { + return redisClusterId; + } + + /** + * The shard number to which the node belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shardNumber") + private final Integer shardNumber; + + /** + * The shard number to which the node belongs to. + * @return the value + **/ + public Integer getShardNumber() { + return shardNumber; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("NodeSummary("); + sb.append("super=").append(super.toString()); + sb.append("privateEndpointFqdn=").append(String.valueOf(this.privateEndpointFqdn)); + sb.append(", privateEndpointIpAddress=") + .append(String.valueOf(this.privateEndpointIpAddress)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", redisClusterId=").append(String.valueOf(this.redisClusterId)); + sb.append(", shardNumber=").append(String.valueOf(this.shardNumber)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof NodeSummary)) { + return false; + } + + NodeSummary other = (NodeSummary) o; + return java.util.Objects.equals(this.privateEndpointFqdn, other.privateEndpointFqdn) + && java.util.Objects.equals( + this.privateEndpointIpAddress, other.privateEndpointIpAddress) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.redisClusterId, other.redisClusterId) + && java.util.Objects.equals(this.shardNumber, other.shardNumber) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.privateEndpointFqdn == null + ? 43 + : this.privateEndpointFqdn.hashCode()); + result = + (result * PRIME) + + (this.privateEndpointIpAddress == null + ? 43 + : this.privateEndpointIpAddress.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.redisClusterId == null ? 43 : this.redisClusterId.hashCode()); + result = (result * PRIME) + (this.shardNumber == null ? 43 : this.shardNumber.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/model/RedisCluster.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/model/RedisCluster.java index f1528d2048c..035a2b18b7f 100644 --- a/bmc-redis/src/main/java/com/oracle/bmc/redis/model/RedisCluster.java +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/model/RedisCluster.java @@ -5,7 +5,7 @@ package com.oracle.bmc.redis.model; /** - * A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). + * An OCI Cache cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -36,6 +36,8 @@ public final class RedisCluster extends com.oracle.bmc.http.internal.ExplicitlyS "timeCreated", "timeUpdated", "nodeCollection", + "clusterMode", + "shardCount", "nsgIds", "freeformTags", "definedTags", @@ -58,6 +60,8 @@ public RedisCluster( java.util.Date timeCreated, java.util.Date timeUpdated, NodeCollection nodeCollection, + ClusterMode clusterMode, + Integer shardCount, java.util.List nsgIds, java.util.Map freeformTags, java.util.Map> definedTags, @@ -79,6 +83,8 @@ public RedisCluster( this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.nodeCollection = nodeCollection; + this.clusterMode = clusterMode; + this.shardCount = shardCount; this.nsgIds = nsgIds; this.freeformTags = freeformTags; this.definedTags = definedTags; @@ -88,13 +94,13 @@ public RedisCluster( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. **/ @com.fasterxml.jackson.annotation.JsonProperty("id") private String id; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. * @param id the value to set * @return this builder **/ @@ -120,13 +126,13 @@ public Builder displayName(String displayName) { return this; } /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the cluster. **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the cluster. * @param compartmentId the value to set * @return this builder **/ @@ -136,13 +142,13 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * The current state of the Redis cluster. + * The current state of the cluster. **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private LifecycleState lifecycleState; /** - * The current state of the Redis cluster. + * The current state of the cluster. * @param lifecycleState the value to set * @return this builder **/ @@ -168,13 +174,13 @@ public Builder lifecycleDetails(String lifecycleDetails) { return this; } /** - * The number of nodes in the Redis cluster. + * The number of nodes per shard in the cluster when clusterMode is SHARDED. This is the total number of nodes when clusterMode is NONSHARDED. **/ @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") private Integer nodeCount; /** - * The number of nodes in the Redis cluster. + * The number of nodes per shard in the cluster when clusterMode is SHARDED. This is the total number of nodes when clusterMode is NONSHARDED. * @param nodeCount the value to set * @return this builder **/ @@ -184,13 +190,13 @@ public Builder nodeCount(Integer nodeCount) { return this; } /** - * The amount of memory allocated to the Redis cluster's nodes, in gigabytes. + * The amount of memory allocated to the cluster's nodes, in gigabytes. **/ @com.fasterxml.jackson.annotation.JsonProperty("nodeMemoryInGBs") private Float nodeMemoryInGBs; /** - * The amount of memory allocated to the Redis cluster's nodes, in gigabytes. + * The amount of memory allocated to the cluster's nodes, in gigabytes. * @param nodeMemoryInGBs the value to set * @return this builder **/ @@ -200,13 +206,13 @@ public Builder nodeMemoryInGBs(Float nodeMemoryInGBs) { return this; } /** - * The fully qualified domain name (FQDN) of the API endpoint for the Redis cluster's primary node. + * The fully qualified domain name (FQDN) of the API endpoint for the cluster's primary node. **/ @com.fasterxml.jackson.annotation.JsonProperty("primaryFqdn") private String primaryFqdn; /** - * The fully qualified domain name (FQDN) of the API endpoint for the Redis cluster's primary node. + * The fully qualified domain name (FQDN) of the API endpoint for the cluster's primary node. * @param primaryFqdn the value to set * @return this builder **/ @@ -216,13 +222,13 @@ public Builder primaryFqdn(String primaryFqdn) { return this; } /** - * The private IP address of the API endpoint for the Redis cluster's primary node. + * The private IP address of the API endpoint for the cluster's primary node. **/ @com.fasterxml.jackson.annotation.JsonProperty("primaryEndpointIpAddress") private String primaryEndpointIpAddress; /** - * The private IP address of the API endpoint for the Redis cluster's primary node. + * The private IP address of the API endpoint for the cluster's primary node. * @param primaryEndpointIpAddress the value to set * @return this builder **/ @@ -232,13 +238,13 @@ public Builder primaryEndpointIpAddress(String primaryEndpointIpAddress) { return this; } /** - * The fully qualified domain name (FQDN) of the API endpoint for the Redis cluster's replica nodes. + * The fully qualified domain name (FQDN) of the API endpoint for the cluster's replica nodes. **/ @com.fasterxml.jackson.annotation.JsonProperty("replicasFqdn") private String replicasFqdn; /** - * The fully qualified domain name (FQDN) of the API endpoint for the Redis cluster's replica nodes. + * The fully qualified domain name (FQDN) of the API endpoint for the cluster's replica nodes. * @param replicasFqdn the value to set * @return this builder **/ @@ -248,13 +254,13 @@ public Builder replicasFqdn(String replicasFqdn) { return this; } /** - * The private IP address of the API endpoint for the Redis cluster's replica nodes. + * The private IP address of the API endpoint for the cluster's replica nodes. **/ @com.fasterxml.jackson.annotation.JsonProperty("replicasEndpointIpAddress") private String replicasEndpointIpAddress; /** - * The private IP address of the API endpoint for the Redis cluster's replica nodes. + * The private IP address of the API endpoint for the cluster's replica nodes. * @param replicasEndpointIpAddress the value to set * @return this builder **/ @@ -264,13 +270,13 @@ public Builder replicasEndpointIpAddress(String replicasEndpointIpAddress) { return this; } /** - * The Redis version that the cluster is running. + * The OCI Cache engine version that the cluster is running. **/ @com.fasterxml.jackson.annotation.JsonProperty("softwareVersion") private SoftwareVersion softwareVersion; /** - * The Redis version that the cluster is running. + * The OCI Cache engine version that the cluster is running. * @param softwareVersion the value to set * @return this builder **/ @@ -280,13 +286,13 @@ public Builder softwareVersion(SoftwareVersion softwareVersion) { return this; } /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster's subnet. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster's subnet. **/ @com.fasterxml.jackson.annotation.JsonProperty("subnetId") private String subnetId; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster's subnet. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster's subnet. * @param subnetId the value to set * @return this builder **/ @@ -296,13 +302,13 @@ public Builder subnetId(String subnetId) { return this; } /** - * The date and time the Redis cluster was created. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. + * The date and time the cluster was created. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") private java.util.Date timeCreated; /** - * The date and time the Redis cluster was created. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. + * The date and time the cluster was created. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. * @param timeCreated the value to set * @return this builder **/ @@ -312,13 +318,13 @@ public Builder timeCreated(java.util.Date timeCreated) { return this; } /** - * The date and time the Redis cluster was updated. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. + * The date and time the cluster was updated. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") private java.util.Date timeUpdated; /** - * The date and time the Redis cluster was updated. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. + * The date and time the cluster was updated. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. * @param timeUpdated the value to set * @return this builder **/ @@ -337,13 +343,51 @@ public Builder nodeCollection(NodeCollection nodeCollection) { return this; } /** - * OCIDs of the NSGs to control access in the customer network + * Specifies whether the cluster is sharded or non-sharded. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterMode") + private ClusterMode clusterMode; + + /** + * Specifies whether the cluster is sharded or non-sharded. + * @param clusterMode the value to set + * @return this builder + **/ + public Builder clusterMode(ClusterMode clusterMode) { + this.clusterMode = clusterMode; + this.__explicitlySet__.add("clusterMode"); + return this; + } + /** + * The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shardCount") + private Integer shardCount; + + /** + * The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED. + * @param shardCount the value to set + * @return this builder + **/ + public Builder shardCount(Integer shardCount) { + this.shardCount = shardCount; + this.__explicitlySet__.add("shardCount"); + return this; + } + /** + * A list of Network Security Group (NSG) [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * associated with this cluster. For more information, + * see [Using an NSG for Clusters](https://docs.cloud.oracle.com/iaas/Content/ocicache/connecttocluster.htm#connecttocluster__networksecuritygroup). + * **/ @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") private java.util.List nsgIds; /** - * OCIDs of the NSGs to control access in the customer network + * A list of Network Security Group (NSG) [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * associated with this cluster. For more information, + * see [Using an NSG for Clusters](https://docs.cloud.oracle.com/iaas/Content/ocicache/connecttocluster.htm#connecttocluster__networksecuritygroup). + * * @param nsgIds the value to set * @return this builder **/ @@ -436,6 +480,8 @@ public RedisCluster build() { this.timeCreated, this.timeUpdated, this.nodeCollection, + this.clusterMode, + this.shardCount, this.nsgIds, this.freeformTags, this.definedTags, @@ -496,6 +542,12 @@ public Builder copy(RedisCluster model) { if (model.wasPropertyExplicitlySet("nodeCollection")) { this.nodeCollection(model.getNodeCollection()); } + if (model.wasPropertyExplicitlySet("clusterMode")) { + this.clusterMode(model.getClusterMode()); + } + if (model.wasPropertyExplicitlySet("shardCount")) { + this.shardCount(model.getShardCount()); + } if (model.wasPropertyExplicitlySet("nsgIds")) { this.nsgIds(model.getNsgIds()); } @@ -524,13 +576,13 @@ public Builder toBuilder() { } /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. **/ @com.fasterxml.jackson.annotation.JsonProperty("id") private final String id; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. * @return the value **/ public String getId() { @@ -552,13 +604,13 @@ public String getDisplayName() { } /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the cluster. **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private final String compartmentId; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the cluster. * @return the value **/ public String getCompartmentId() { @@ -566,7 +618,7 @@ public String getCompartmentId() { } /** - * The current state of the Redis cluster. + * The current state of the cluster. **/ public enum LifecycleState { Creating("CREATING"), @@ -618,13 +670,13 @@ public static LifecycleState create(String key) { } }; /** - * The current state of the Redis cluster. + * The current state of the cluster. **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private final LifecycleState lifecycleState; /** - * The current state of the Redis cluster. + * The current state of the cluster. * @return the value **/ public LifecycleState getLifecycleState() { @@ -646,13 +698,13 @@ public String getLifecycleDetails() { } /** - * The number of nodes in the Redis cluster. + * The number of nodes per shard in the cluster when clusterMode is SHARDED. This is the total number of nodes when clusterMode is NONSHARDED. **/ @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") private final Integer nodeCount; /** - * The number of nodes in the Redis cluster. + * The number of nodes per shard in the cluster when clusterMode is SHARDED. This is the total number of nodes when clusterMode is NONSHARDED. * @return the value **/ public Integer getNodeCount() { @@ -660,13 +712,13 @@ public Integer getNodeCount() { } /** - * The amount of memory allocated to the Redis cluster's nodes, in gigabytes. + * The amount of memory allocated to the cluster's nodes, in gigabytes. **/ @com.fasterxml.jackson.annotation.JsonProperty("nodeMemoryInGBs") private final Float nodeMemoryInGBs; /** - * The amount of memory allocated to the Redis cluster's nodes, in gigabytes. + * The amount of memory allocated to the cluster's nodes, in gigabytes. * @return the value **/ public Float getNodeMemoryInGBs() { @@ -674,13 +726,13 @@ public Float getNodeMemoryInGBs() { } /** - * The fully qualified domain name (FQDN) of the API endpoint for the Redis cluster's primary node. + * The fully qualified domain name (FQDN) of the API endpoint for the cluster's primary node. **/ @com.fasterxml.jackson.annotation.JsonProperty("primaryFqdn") private final String primaryFqdn; /** - * The fully qualified domain name (FQDN) of the API endpoint for the Redis cluster's primary node. + * The fully qualified domain name (FQDN) of the API endpoint for the cluster's primary node. * @return the value **/ public String getPrimaryFqdn() { @@ -688,13 +740,13 @@ public String getPrimaryFqdn() { } /** - * The private IP address of the API endpoint for the Redis cluster's primary node. + * The private IP address of the API endpoint for the cluster's primary node. **/ @com.fasterxml.jackson.annotation.JsonProperty("primaryEndpointIpAddress") private final String primaryEndpointIpAddress; /** - * The private IP address of the API endpoint for the Redis cluster's primary node. + * The private IP address of the API endpoint for the cluster's primary node. * @return the value **/ public String getPrimaryEndpointIpAddress() { @@ -702,13 +754,13 @@ public String getPrimaryEndpointIpAddress() { } /** - * The fully qualified domain name (FQDN) of the API endpoint for the Redis cluster's replica nodes. + * The fully qualified domain name (FQDN) of the API endpoint for the cluster's replica nodes. **/ @com.fasterxml.jackson.annotation.JsonProperty("replicasFqdn") private final String replicasFqdn; /** - * The fully qualified domain name (FQDN) of the API endpoint for the Redis cluster's replica nodes. + * The fully qualified domain name (FQDN) of the API endpoint for the cluster's replica nodes. * @return the value **/ public String getReplicasFqdn() { @@ -716,13 +768,13 @@ public String getReplicasFqdn() { } /** - * The private IP address of the API endpoint for the Redis cluster's replica nodes. + * The private IP address of the API endpoint for the cluster's replica nodes. **/ @com.fasterxml.jackson.annotation.JsonProperty("replicasEndpointIpAddress") private final String replicasEndpointIpAddress; /** - * The private IP address of the API endpoint for the Redis cluster's replica nodes. + * The private IP address of the API endpoint for the cluster's replica nodes. * @return the value **/ public String getReplicasEndpointIpAddress() { @@ -730,10 +782,11 @@ public String getReplicasEndpointIpAddress() { } /** - * The Redis version that the cluster is running. + * The OCI Cache engine version that the cluster is running. **/ public enum SoftwareVersion { V705("V7_0_5"), + Redis70("REDIS_7_0"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -777,13 +830,13 @@ public static SoftwareVersion create(String key) { } }; /** - * The Redis version that the cluster is running. + * The OCI Cache engine version that the cluster is running. **/ @com.fasterxml.jackson.annotation.JsonProperty("softwareVersion") private final SoftwareVersion softwareVersion; /** - * The Redis version that the cluster is running. + * The OCI Cache engine version that the cluster is running. * @return the value **/ public SoftwareVersion getSoftwareVersion() { @@ -791,13 +844,13 @@ public SoftwareVersion getSoftwareVersion() { } /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster's subnet. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster's subnet. **/ @com.fasterxml.jackson.annotation.JsonProperty("subnetId") private final String subnetId; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster's subnet. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster's subnet. * @return the value **/ public String getSubnetId() { @@ -805,13 +858,13 @@ public String getSubnetId() { } /** - * The date and time the Redis cluster was created. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. + * The date and time the cluster was created. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") private final java.util.Date timeCreated; /** - * The date and time the Redis cluster was created. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. + * The date and time the cluster was created. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. * @return the value **/ public java.util.Date getTimeCreated() { @@ -819,13 +872,13 @@ public java.util.Date getTimeCreated() { } /** - * The date and time the Redis cluster was updated. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. + * The date and time the cluster was updated. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") private final java.util.Date timeUpdated; /** - * The date and time the Redis cluster was updated. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. + * The date and time the cluster was updated. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. * @return the value **/ public java.util.Date getTimeUpdated() { @@ -840,13 +893,95 @@ public NodeCollection getNodeCollection() { } /** - * OCIDs of the NSGs to control access in the customer network + * Specifies whether the cluster is sharded or non-sharded. + **/ + public enum ClusterMode { + Sharded("SHARDED"), + Nonsharded("NONSHARDED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ClusterMode.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ClusterMode v : ClusterMode.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ClusterMode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ClusterMode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ClusterMode', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Specifies whether the cluster is sharded or non-sharded. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterMode") + private final ClusterMode clusterMode; + + /** + * Specifies whether the cluster is sharded or non-sharded. + * @return the value + **/ + public ClusterMode getClusterMode() { + return clusterMode; + } + + /** + * The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shardCount") + private final Integer shardCount; + + /** + * The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED. + * @return the value + **/ + public Integer getShardCount() { + return shardCount; + } + + /** + * A list of Network Security Group (NSG) [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * associated with this cluster. For more information, + * see [Using an NSG for Clusters](https://docs.cloud.oracle.com/iaas/Content/ocicache/connecttocluster.htm#connecttocluster__networksecuritygroup). + * **/ @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") private final java.util.List nsgIds; /** - * OCIDs of the NSGs to control access in the customer network + * A list of Network Security Group (NSG) [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * associated with this cluster. For more information, + * see [Using an NSG for Clusters](https://docs.cloud.oracle.com/iaas/Content/ocicache/connecttocluster.htm#connecttocluster__networksecuritygroup). + * * @return the value **/ public java.util.List getNsgIds() { @@ -939,6 +1074,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", nodeCollection=").append(String.valueOf(this.nodeCollection)); + sb.append(", clusterMode=").append(String.valueOf(this.clusterMode)); + sb.append(", shardCount=").append(String.valueOf(this.shardCount)); sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); @@ -975,6 +1112,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.nodeCollection, other.nodeCollection) + && java.util.Objects.equals(this.clusterMode, other.clusterMode) + && java.util.Objects.equals(this.shardCount, other.shardCount) && java.util.Objects.equals(this.nsgIds, other.nsgIds) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) @@ -1022,6 +1161,8 @@ public int hashCode() { result = (result * PRIME) + (this.nodeCollection == null ? 43 : this.nodeCollection.hashCode()); + result = (result * PRIME) + (this.clusterMode == null ? 43 : this.clusterMode.hashCode()); + result = (result * PRIME) + (this.shardCount == null ? 43 : this.shardCount.hashCode()); result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/model/RedisClusterCollection.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/model/RedisClusterCollection.java index 7bc6fd3cbdf..9d45157e04e 100644 --- a/bmc-redis/src/main/java/com/oracle/bmc/redis/model/RedisClusterCollection.java +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/model/RedisClusterCollection.java @@ -5,7 +5,7 @@ package com.oracle.bmc.redis.model; /** - * A list of Redis clusters that match filter criteria, if any. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). + * A list of clusters that match filter criteria, if any. A cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -31,13 +31,13 @@ public RedisClusterCollection(java.util.List items) { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The list of Redis clusters. + * The list of clusters. **/ @com.fasterxml.jackson.annotation.JsonProperty("items") private java.util.List items; /** - * The list of Redis clusters. + * The list of clusters. * @param items the value to set * @return this builder **/ @@ -79,13 +79,13 @@ public Builder toBuilder() { } /** - * The list of Redis clusters. + * The list of clusters. **/ @com.fasterxml.jackson.annotation.JsonProperty("items") private final java.util.List items; /** - * The list of Redis clusters. + * The list of clusters. * @return the value **/ public java.util.List getItems() { diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/model/RedisClusterSummary.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/model/RedisClusterSummary.java index 91f48fb02eb..538e1e29c11 100644 --- a/bmc-redis/src/main/java/com/oracle/bmc/redis/model/RedisClusterSummary.java +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/model/RedisClusterSummary.java @@ -5,7 +5,7 @@ package com.oracle.bmc.redis.model; /** - * Summary of information about a Redis cluster. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm). + * Summary of information about a cluster. A cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.cloud.oracle.com/iaas/Content/ocicache/home.htm). * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -38,6 +38,8 @@ public final class RedisClusterSummary extends com.oracle.bmc.http.internal.Expl "subnetId", "timeCreated", "timeUpdated", + "clusterMode", + "shardCount", "nsgIds", "freeformTags", "definedTags", @@ -59,6 +61,8 @@ public RedisClusterSummary( String subnetId, java.util.Date timeCreated, java.util.Date timeUpdated, + RedisCluster.ClusterMode clusterMode, + Integer shardCount, java.util.List nsgIds, java.util.Map freeformTags, java.util.Map> definedTags, @@ -79,6 +83,8 @@ public RedisClusterSummary( this.subnetId = subnetId; this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; + this.clusterMode = clusterMode; + this.shardCount = shardCount; this.nsgIds = nsgIds; this.freeformTags = freeformTags; this.definedTags = definedTags; @@ -88,13 +94,13 @@ public RedisClusterSummary( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. **/ @com.fasterxml.jackson.annotation.JsonProperty("id") private String id; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. * @param id the value to set * @return this builder **/ @@ -120,13 +126,13 @@ public Builder displayName(String displayName) { return this; } /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the cluster. **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the cluster. * @param compartmentId the value to set * @return this builder **/ @@ -136,13 +142,13 @@ public Builder compartmentId(String compartmentId) { return this; } /** - * The current state of the Redis cluster. + * The current state of the cluster. **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private RedisCluster.LifecycleState lifecycleState; /** - * The current state of the Redis cluster. + * The current state of the cluster. * @param lifecycleState the value to set * @return this builder **/ @@ -168,13 +174,13 @@ public Builder lifecycleDetails(String lifecycleDetails) { return this; } /** - * The number of nodes in the Redis cluster. + * The number of nodes per shard in the cluster when clusterMode is SHARDED. This is the total number of nodes when clusterMode is NONSHARDED. **/ @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") private Integer nodeCount; /** - * The number of nodes in the Redis cluster. + * The number of nodes per shard in the cluster when clusterMode is SHARDED. This is the total number of nodes when clusterMode is NONSHARDED. * @param nodeCount the value to set * @return this builder **/ @@ -184,13 +190,13 @@ public Builder nodeCount(Integer nodeCount) { return this; } /** - * The amount of memory allocated to the Redis cluster's nodes, in gigabytes. + * The amount of memory allocated to the cluster's nodes, in gigabytes. **/ @com.fasterxml.jackson.annotation.JsonProperty("nodeMemoryInGBs") private Float nodeMemoryInGBs; /** - * The amount of memory allocated to the Redis cluster's nodes, in gigabytes. + * The amount of memory allocated to the cluster's nodes, in gigabytes. * @param nodeMemoryInGBs the value to set * @return this builder **/ @@ -200,13 +206,13 @@ public Builder nodeMemoryInGBs(Float nodeMemoryInGBs) { return this; } /** - * The fully qualified domain name (FQDN) of the API endpoint for the Redis cluster's primary node. + * The fully qualified domain name (FQDN) of the API endpoint for the cluster's primary node. **/ @com.fasterxml.jackson.annotation.JsonProperty("primaryFqdn") private String primaryFqdn; /** - * The fully qualified domain name (FQDN) of the API endpoint for the Redis cluster's primary node. + * The fully qualified domain name (FQDN) of the API endpoint for the cluster's primary node. * @param primaryFqdn the value to set * @return this builder **/ @@ -216,13 +222,13 @@ public Builder primaryFqdn(String primaryFqdn) { return this; } /** - * The private IP address of the API endpoint for the Redis cluster's primary node. + * The private IP address of the API endpoint for the cluster's primary node. **/ @com.fasterxml.jackson.annotation.JsonProperty("primaryEndpointIpAddress") private String primaryEndpointIpAddress; /** - * The private IP address of the API endpoint for the Redis cluster's primary node. + * The private IP address of the API endpoint for the cluster's primary node. * @param primaryEndpointIpAddress the value to set * @return this builder **/ @@ -232,13 +238,13 @@ public Builder primaryEndpointIpAddress(String primaryEndpointIpAddress) { return this; } /** - * The fully qualified domain name (FQDN) of the API endpoint for the Redis cluster's replica nodes. + * The fully qualified domain name (FQDN) of the API endpoint for the cluster's replica nodes. **/ @com.fasterxml.jackson.annotation.JsonProperty("replicasFqdn") private String replicasFqdn; /** - * The fully qualified domain name (FQDN) of the API endpoint for the Redis cluster's replica nodes. + * The fully qualified domain name (FQDN) of the API endpoint for the cluster's replica nodes. * @param replicasFqdn the value to set * @return this builder **/ @@ -248,13 +254,13 @@ public Builder replicasFqdn(String replicasFqdn) { return this; } /** - * The private IP address of the API endpoint for the Redis cluster's replica nodes. + * The private IP address of the API endpoint for the cluster's replica nodes. **/ @com.fasterxml.jackson.annotation.JsonProperty("replicasEndpointIpAddress") private String replicasEndpointIpAddress; /** - * The private IP address of the API endpoint for the Redis cluster's replica nodes. + * The private IP address of the API endpoint for the cluster's replica nodes. * @param replicasEndpointIpAddress the value to set * @return this builder **/ @@ -264,13 +270,13 @@ public Builder replicasEndpointIpAddress(String replicasEndpointIpAddress) { return this; } /** - * The Redis version that the cluster is running. + * The OCI Cache engine version that the cluster is running. **/ @com.fasterxml.jackson.annotation.JsonProperty("softwareVersion") private RedisCluster.SoftwareVersion softwareVersion; /** - * The Redis version that the cluster is running. + * The OCI Cache engine version that the cluster is running. * @param softwareVersion the value to set * @return this builder **/ @@ -280,13 +286,13 @@ public Builder softwareVersion(RedisCluster.SoftwareVersion softwareVersion) { return this; } /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster's subnet. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster's subnet. **/ @com.fasterxml.jackson.annotation.JsonProperty("subnetId") private String subnetId; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster's subnet. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster's subnet. * @param subnetId the value to set * @return this builder **/ @@ -296,13 +302,13 @@ public Builder subnetId(String subnetId) { return this; } /** - * The date and time the Redis cluster was created. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. + * The date and time the cluster was created. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") private java.util.Date timeCreated; /** - * The date and time the Redis cluster was created. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. + * The date and time the cluster was created. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. * @param timeCreated the value to set * @return this builder **/ @@ -312,13 +318,13 @@ public Builder timeCreated(java.util.Date timeCreated) { return this; } /** - * The date and time the Redis cluster was updated. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. + * The date and time the cluster was updated. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") private java.util.Date timeUpdated; /** - * The date and time the Redis cluster was updated. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. + * The date and time the cluster was updated. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. * @param timeUpdated the value to set * @return this builder **/ @@ -328,13 +334,51 @@ public Builder timeUpdated(java.util.Date timeUpdated) { return this; } /** - * OCIDs of the NSGs to control access in the customer network + * Specifies whether the cluster is sharded or non-sharded. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterMode") + private RedisCluster.ClusterMode clusterMode; + + /** + * Specifies whether the cluster is sharded or non-sharded. + * @param clusterMode the value to set + * @return this builder + **/ + public Builder clusterMode(RedisCluster.ClusterMode clusterMode) { + this.clusterMode = clusterMode; + this.__explicitlySet__.add("clusterMode"); + return this; + } + /** + * The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shardCount") + private Integer shardCount; + + /** + * The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED. + * @param shardCount the value to set + * @return this builder + **/ + public Builder shardCount(Integer shardCount) { + this.shardCount = shardCount; + this.__explicitlySet__.add("shardCount"); + return this; + } + /** + * A list of Network Security Group (NSG) [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * associated with this cluster. For more information, + * see [Using an NSG for Clusters](https://docs.cloud.oracle.com/iaas/Content/ocicache/connecttocluster.htm#connecttocluster__networksecuritygroup). + * **/ @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") private java.util.List nsgIds; /** - * OCIDs of the NSGs to control access in the customer network + * A list of Network Security Group (NSG) [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * associated with this cluster. For more information, + * see [Using an NSG for Clusters](https://docs.cloud.oracle.com/iaas/Content/ocicache/connecttocluster.htm#connecttocluster__networksecuritygroup). + * * @param nsgIds the value to set * @return this builder **/ @@ -426,6 +470,8 @@ public RedisClusterSummary build() { this.subnetId, this.timeCreated, this.timeUpdated, + this.clusterMode, + this.shardCount, this.nsgIds, this.freeformTags, this.definedTags, @@ -483,6 +529,12 @@ public Builder copy(RedisClusterSummary model) { if (model.wasPropertyExplicitlySet("timeUpdated")) { this.timeUpdated(model.getTimeUpdated()); } + if (model.wasPropertyExplicitlySet("clusterMode")) { + this.clusterMode(model.getClusterMode()); + } + if (model.wasPropertyExplicitlySet("shardCount")) { + this.shardCount(model.getShardCount()); + } if (model.wasPropertyExplicitlySet("nsgIds")) { this.nsgIds(model.getNsgIds()); } @@ -511,13 +563,13 @@ public Builder toBuilder() { } /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. **/ @com.fasterxml.jackson.annotation.JsonProperty("id") private final String id; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. * @return the value **/ public String getId() { @@ -539,13 +591,13 @@ public String getDisplayName() { } /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the cluster. **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private final String compartmentId; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the compartment that contains the cluster. * @return the value **/ public String getCompartmentId() { @@ -553,13 +605,13 @@ public String getCompartmentId() { } /** - * The current state of the Redis cluster. + * The current state of the cluster. **/ @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") private final RedisCluster.LifecycleState lifecycleState; /** - * The current state of the Redis cluster. + * The current state of the cluster. * @return the value **/ public RedisCluster.LifecycleState getLifecycleState() { @@ -581,13 +633,13 @@ public String getLifecycleDetails() { } /** - * The number of nodes in the Redis cluster. + * The number of nodes per shard in the cluster when clusterMode is SHARDED. This is the total number of nodes when clusterMode is NONSHARDED. **/ @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") private final Integer nodeCount; /** - * The number of nodes in the Redis cluster. + * The number of nodes per shard in the cluster when clusterMode is SHARDED. This is the total number of nodes when clusterMode is NONSHARDED. * @return the value **/ public Integer getNodeCount() { @@ -595,13 +647,13 @@ public Integer getNodeCount() { } /** - * The amount of memory allocated to the Redis cluster's nodes, in gigabytes. + * The amount of memory allocated to the cluster's nodes, in gigabytes. **/ @com.fasterxml.jackson.annotation.JsonProperty("nodeMemoryInGBs") private final Float nodeMemoryInGBs; /** - * The amount of memory allocated to the Redis cluster's nodes, in gigabytes. + * The amount of memory allocated to the cluster's nodes, in gigabytes. * @return the value **/ public Float getNodeMemoryInGBs() { @@ -609,13 +661,13 @@ public Float getNodeMemoryInGBs() { } /** - * The fully qualified domain name (FQDN) of the API endpoint for the Redis cluster's primary node. + * The fully qualified domain name (FQDN) of the API endpoint for the cluster's primary node. **/ @com.fasterxml.jackson.annotation.JsonProperty("primaryFqdn") private final String primaryFqdn; /** - * The fully qualified domain name (FQDN) of the API endpoint for the Redis cluster's primary node. + * The fully qualified domain name (FQDN) of the API endpoint for the cluster's primary node. * @return the value **/ public String getPrimaryFqdn() { @@ -623,13 +675,13 @@ public String getPrimaryFqdn() { } /** - * The private IP address of the API endpoint for the Redis cluster's primary node. + * The private IP address of the API endpoint for the cluster's primary node. **/ @com.fasterxml.jackson.annotation.JsonProperty("primaryEndpointIpAddress") private final String primaryEndpointIpAddress; /** - * The private IP address of the API endpoint for the Redis cluster's primary node. + * The private IP address of the API endpoint for the cluster's primary node. * @return the value **/ public String getPrimaryEndpointIpAddress() { @@ -637,13 +689,13 @@ public String getPrimaryEndpointIpAddress() { } /** - * The fully qualified domain name (FQDN) of the API endpoint for the Redis cluster's replica nodes. + * The fully qualified domain name (FQDN) of the API endpoint for the cluster's replica nodes. **/ @com.fasterxml.jackson.annotation.JsonProperty("replicasFqdn") private final String replicasFqdn; /** - * The fully qualified domain name (FQDN) of the API endpoint for the Redis cluster's replica nodes. + * The fully qualified domain name (FQDN) of the API endpoint for the cluster's replica nodes. * @return the value **/ public String getReplicasFqdn() { @@ -651,13 +703,13 @@ public String getReplicasFqdn() { } /** - * The private IP address of the API endpoint for the Redis cluster's replica nodes. + * The private IP address of the API endpoint for the cluster's replica nodes. **/ @com.fasterxml.jackson.annotation.JsonProperty("replicasEndpointIpAddress") private final String replicasEndpointIpAddress; /** - * The private IP address of the API endpoint for the Redis cluster's replica nodes. + * The private IP address of the API endpoint for the cluster's replica nodes. * @return the value **/ public String getReplicasEndpointIpAddress() { @@ -665,13 +717,13 @@ public String getReplicasEndpointIpAddress() { } /** - * The Redis version that the cluster is running. + * The OCI Cache engine version that the cluster is running. **/ @com.fasterxml.jackson.annotation.JsonProperty("softwareVersion") private final RedisCluster.SoftwareVersion softwareVersion; /** - * The Redis version that the cluster is running. + * The OCI Cache engine version that the cluster is running. * @return the value **/ public RedisCluster.SoftwareVersion getSoftwareVersion() { @@ -679,13 +731,13 @@ public RedisCluster.SoftwareVersion getSoftwareVersion() { } /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster's subnet. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster's subnet. **/ @com.fasterxml.jackson.annotation.JsonProperty("subnetId") private final String subnetId; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster's subnet. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster's subnet. * @return the value **/ public String getSubnetId() { @@ -693,13 +745,13 @@ public String getSubnetId() { } /** - * The date and time the Redis cluster was created. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. + * The date and time the cluster was created. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") private final java.util.Date timeCreated; /** - * The date and time the Redis cluster was created. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. + * The date and time the cluster was created. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. * @return the value **/ public java.util.Date getTimeCreated() { @@ -707,13 +759,13 @@ public java.util.Date getTimeCreated() { } /** - * The date and time the Redis cluster was updated. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. + * The date and time the cluster was updated. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. **/ @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") private final java.util.Date timeUpdated; /** - * The date and time the Redis cluster was updated. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. + * The date and time the cluster was updated. An [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) formatted datetime string. * @return the value **/ public java.util.Date getTimeUpdated() { @@ -721,13 +773,47 @@ public java.util.Date getTimeUpdated() { } /** - * OCIDs of the NSGs to control access in the customer network + * Specifies whether the cluster is sharded or non-sharded. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clusterMode") + private final RedisCluster.ClusterMode clusterMode; + + /** + * Specifies whether the cluster is sharded or non-sharded. + * @return the value + **/ + public RedisCluster.ClusterMode getClusterMode() { + return clusterMode; + } + + /** + * The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shardCount") + private final Integer shardCount; + + /** + * The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED. + * @return the value + **/ + public Integer getShardCount() { + return shardCount; + } + + /** + * A list of Network Security Group (NSG) [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * associated with this cluster. For more information, + * see [Using an NSG for Clusters](https://docs.cloud.oracle.com/iaas/Content/ocicache/connecttocluster.htm#connecttocluster__networksecuritygroup). + * **/ @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") private final java.util.List nsgIds; /** - * OCIDs of the NSGs to control access in the customer network + * A list of Network Security Group (NSG) [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * associated with this cluster. For more information, + * see [Using an NSG for Clusters](https://docs.cloud.oracle.com/iaas/Content/ocicache/connecttocluster.htm#connecttocluster__networksecuritygroup). + * * @return the value **/ public java.util.List getNsgIds() { @@ -819,6 +905,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", subnetId=").append(String.valueOf(this.subnetId)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", clusterMode=").append(String.valueOf(this.clusterMode)); + sb.append(", shardCount=").append(String.valueOf(this.shardCount)); sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); @@ -854,6 +942,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.subnetId, other.subnetId) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.clusterMode, other.clusterMode) + && java.util.Objects.equals(this.shardCount, other.shardCount) && java.util.Objects.equals(this.nsgIds, other.nsgIds) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) @@ -898,6 +988,8 @@ public int hashCode() { result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + (this.clusterMode == null ? 43 : this.clusterMode.hashCode()); + result = (result * PRIME) + (this.shardCount == null ? 43 : this.shardCount.hashCode()); result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/model/RedisNodeCollection.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/model/RedisNodeCollection.java new file mode 100644 index 00000000000..ce588886b17 --- /dev/null +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/model/RedisNodeCollection.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.redis.model; + +/** + * A list of nodes in a cluster that match filter criteria, if any. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220315") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RedisNodeCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RedisNodeCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public RedisNodeCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The list of nodes in a cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * The list of nodes in a cluster. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RedisNodeCollection build() { + RedisNodeCollection model = new RedisNodeCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RedisNodeCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The list of nodes in a cluster. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * The list of nodes in a cluster. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RedisNodeCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RedisNodeCollection)) { + return false; + } + + RedisNodeCollection other = (RedisNodeCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/model/UpdateRedisClusterDetails.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/model/UpdateRedisClusterDetails.java index 875f6ff1f35..dee79175f69 100644 --- a/bmc-redis/src/main/java/com/oracle/bmc/redis/model/UpdateRedisClusterDetails.java +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/model/UpdateRedisClusterDetails.java @@ -5,7 +5,7 @@ package com.oracle.bmc.redis.model; /** - * The configuration to update for an existing Redis cluster. + * The configuration to update for an existing cluster. *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in @@ -23,6 +23,7 @@ public final class UpdateRedisClusterDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated @java.beans.ConstructorProperties({ + "shardCount", "displayName", "nodeCount", "nodeMemoryInGBs", @@ -31,6 +32,7 @@ public final class UpdateRedisClusterDetails "definedTags" }) public UpdateRedisClusterDetails( + Integer shardCount, String displayName, Integer nodeCount, Float nodeMemoryInGBs, @@ -38,6 +40,7 @@ public UpdateRedisClusterDetails( java.util.Map freeformTags, java.util.Map> definedTags) { super(); + this.shardCount = shardCount; this.displayName = displayName; this.nodeCount = nodeCount; this.nodeMemoryInGBs = nodeMemoryInGBs; @@ -48,6 +51,22 @@ public UpdateRedisClusterDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { + /** + * The number of shards in sharded cluster. Only applicable when clusterMode is SHARDED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shardCount") + private Integer shardCount; + + /** + * The number of shards in sharded cluster. Only applicable when clusterMode is SHARDED. + * @param shardCount the value to set + * @return this builder + **/ + public Builder shardCount(Integer shardCount) { + this.shardCount = shardCount; + this.__explicitlySet__.add("shardCount"); + return this; + } /** * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. **/ @@ -65,13 +84,13 @@ public Builder displayName(String displayName) { return this; } /** - * The number of nodes in the Redis cluster. + * The number of nodes per shard in the cluster when clusterMode is SHARDED. This is the total number of nodes when clusterMode is NONSHARDED. **/ @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") private Integer nodeCount; /** - * The number of nodes in the Redis cluster. + * The number of nodes per shard in the cluster when clusterMode is SHARDED. This is the total number of nodes when clusterMode is NONSHARDED. * @param nodeCount the value to set * @return this builder **/ @@ -81,13 +100,13 @@ public Builder nodeCount(Integer nodeCount) { return this; } /** - * The amount of memory allocated to the Redis cluster's nodes, in gigabytes. + * The amount of memory allocated to the cluster's nodes, in gigabytes. **/ @com.fasterxml.jackson.annotation.JsonProperty("nodeMemoryInGBs") private Float nodeMemoryInGBs; /** - * The amount of memory allocated to the Redis cluster's nodes, in gigabytes. + * The amount of memory allocated to the cluster's nodes, in gigabytes. * @param nodeMemoryInGBs the value to set * @return this builder **/ @@ -97,13 +116,19 @@ public Builder nodeMemoryInGBs(Float nodeMemoryInGBs) { return this; } /** - * OCIDs of the NSGs to control access in the customer network + * A list of Network Security Group (NSG) [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * associated with this cluster. For more information, + * see [Using an NSG for Clusters](https://docs.cloud.oracle.com/iaas/Content/ocicache/connecttocluster.htm#connecttocluster__networksecuritygroup). + * **/ @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") private java.util.List nsgIds; /** - * OCIDs of the NSGs to control access in the customer network + * A list of Network Security Group (NSG) [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * associated with this cluster. For more information, + * see [Using an NSG for Clusters](https://docs.cloud.oracle.com/iaas/Content/ocicache/connecttocluster.htm#connecttocluster__networksecuritygroup). + * * @param nsgIds the value to set * @return this builder **/ @@ -160,6 +185,7 @@ public Builder definedTags( public UpdateRedisClusterDetails build() { UpdateRedisClusterDetails model = new UpdateRedisClusterDetails( + this.shardCount, this.displayName, this.nodeCount, this.nodeMemoryInGBs, @@ -174,6 +200,9 @@ public UpdateRedisClusterDetails build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(UpdateRedisClusterDetails model) { + if (model.wasPropertyExplicitlySet("shardCount")) { + this.shardCount(model.getShardCount()); + } if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } @@ -207,6 +236,20 @@ public Builder toBuilder() { return new Builder().copy(this); } + /** + * The number of shards in sharded cluster. Only applicable when clusterMode is SHARDED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("shardCount") + private final Integer shardCount; + + /** + * The number of shards in sharded cluster. Only applicable when clusterMode is SHARDED. + * @return the value + **/ + public Integer getShardCount() { + return shardCount; + } + /** * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. **/ @@ -222,13 +265,13 @@ public String getDisplayName() { } /** - * The number of nodes in the Redis cluster. + * The number of nodes per shard in the cluster when clusterMode is SHARDED. This is the total number of nodes when clusterMode is NONSHARDED. **/ @com.fasterxml.jackson.annotation.JsonProperty("nodeCount") private final Integer nodeCount; /** - * The number of nodes in the Redis cluster. + * The number of nodes per shard in the cluster when clusterMode is SHARDED. This is the total number of nodes when clusterMode is NONSHARDED. * @return the value **/ public Integer getNodeCount() { @@ -236,13 +279,13 @@ public Integer getNodeCount() { } /** - * The amount of memory allocated to the Redis cluster's nodes, in gigabytes. + * The amount of memory allocated to the cluster's nodes, in gigabytes. **/ @com.fasterxml.jackson.annotation.JsonProperty("nodeMemoryInGBs") private final Float nodeMemoryInGBs; /** - * The amount of memory allocated to the Redis cluster's nodes, in gigabytes. + * The amount of memory allocated to the cluster's nodes, in gigabytes. * @return the value **/ public Float getNodeMemoryInGBs() { @@ -250,13 +293,19 @@ public Float getNodeMemoryInGBs() { } /** - * OCIDs of the NSGs to control access in the customer network + * A list of Network Security Group (NSG) [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * associated with this cluster. For more information, + * see [Using an NSG for Clusters](https://docs.cloud.oracle.com/iaas/Content/ocicache/connecttocluster.htm#connecttocluster__networksecuritygroup). + * **/ @com.fasterxml.jackson.annotation.JsonProperty("nsgIds") private final java.util.List nsgIds; /** - * OCIDs of the NSGs to control access in the customer network + * A list of Network Security Group (NSG) [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * associated with this cluster. For more information, + * see [Using an NSG for Clusters](https://docs.cloud.oracle.com/iaas/Content/ocicache/connecttocluster.htm#connecttocluster__networksecuritygroup). + * * @return the value **/ public java.util.List getNsgIds() { @@ -313,7 +362,8 @@ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("UpdateRedisClusterDetails("); sb.append("super=").append(super.toString()); - sb.append("displayName=").append(String.valueOf(this.displayName)); + sb.append("shardCount=").append(String.valueOf(this.shardCount)); + sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", nodeCount=").append(String.valueOf(this.nodeCount)); sb.append(", nodeMemoryInGBs=").append(String.valueOf(this.nodeMemoryInGBs)); sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); @@ -333,7 +383,8 @@ public boolean equals(Object o) { } UpdateRedisClusterDetails other = (UpdateRedisClusterDetails) o; - return java.util.Objects.equals(this.displayName, other.displayName) + return java.util.Objects.equals(this.shardCount, other.shardCount) + && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.nodeCount, other.nodeCount) && java.util.Objects.equals(this.nodeMemoryInGBs, other.nodeMemoryInGBs) && java.util.Objects.equals(this.nsgIds, other.nsgIds) @@ -346,6 +397,7 @@ public boolean equals(Object o) { public int hashCode() { final int PRIME = 59; int result = 1; + result = (result * PRIME) + (this.shardCount == null ? 43 : this.shardCount.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.nodeCount == null ? 43 : this.nodeCount.hashCode()); result = diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/ChangeRedisClusterCompartmentRequest.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/ChangeRedisClusterCompartmentRequest.java index 00f65f5eeda..ca9f5655be2 100644 --- a/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/ChangeRedisClusterCompartmentRequest.java +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/ChangeRedisClusterCompartmentRequest.java @@ -14,12 +14,12 @@ public class ChangeRedisClusterCompartmentRequest com.oracle.bmc.redis.model.ChangeRedisClusterCompartmentDetails> { /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. */ private String redisClusterId; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. */ public String getRedisClusterId() { return redisClusterId; @@ -110,12 +110,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. */ private String redisClusterId = null; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. * @param redisClusterId the value to set * @return this builder instance */ diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/CreateRedisClusterRequest.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/CreateRedisClusterRequest.java index b018098728e..7d2f5a0a436 100644 --- a/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/CreateRedisClusterRequest.java +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/CreateRedisClusterRequest.java @@ -14,12 +14,12 @@ public class CreateRedisClusterRequest com.oracle.bmc.redis.model.CreateRedisClusterDetails> { /** - * Details for the new RedisCluster. + * Details for the new cluster. */ private com.oracle.bmc.redis.model.CreateRedisClusterDetails createRedisClusterDetails; /** - * Details for the new RedisCluster. + * Details for the new cluster. */ public com.oracle.bmc.redis.model.CreateRedisClusterDetails getCreateRedisClusterDetails() { return createRedisClusterDetails; @@ -76,13 +76,13 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * Details for the new RedisCluster. + * Details for the new cluster. */ private com.oracle.bmc.redis.model.CreateRedisClusterDetails createRedisClusterDetails = null; /** - * Details for the new RedisCluster. + * Details for the new cluster. * @param createRedisClusterDetails the value to set * @return this builder instance */ diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/DeleteRedisClusterRequest.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/DeleteRedisClusterRequest.java index 91788387208..058581571d9 100644 --- a/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/DeleteRedisClusterRequest.java +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/DeleteRedisClusterRequest.java @@ -12,12 +12,12 @@ public class DeleteRedisClusterRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. */ private String redisClusterId; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. */ public String getRedisClusterId() { return redisClusterId; @@ -63,12 +63,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. */ private String redisClusterId = null; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. * @param redisClusterId the value to set * @return this builder instance */ diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/GetRedisClusterRequest.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/GetRedisClusterRequest.java index a3b524a0305..c329eee82e1 100644 --- a/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/GetRedisClusterRequest.java +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/GetRedisClusterRequest.java @@ -12,12 +12,12 @@ public class GetRedisClusterRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. */ private String redisClusterId; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. */ public String getRedisClusterId() { return redisClusterId; @@ -42,12 +42,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. */ private String redisClusterId = null; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. * @param redisClusterId the value to set * @return this builder instance */ diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/ListRedisClusterNodesRequest.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/ListRedisClusterNodesRequest.java new file mode 100644 index 00000000000..94173ea40ba --- /dev/null +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/ListRedisClusterNodesRequest.java @@ -0,0 +1,399 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.redis.requests; + +import com.oracle.bmc.redis.model.*; +/** + * Example: Click here to see how to use ListRedisClusterNodesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220315") +public class ListRedisClusterNodesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. + */ + private String redisClusterId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. + */ + public String getRedisClusterId() { + return redisClusterId; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getDisplayName() { + return displayName; + } + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The maximum number of items to return. + */ + public Integer getLimit() { + return limit; + } + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.redis.model.SortOrder sortOrder; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + public com.oracle.bmc.redis.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + DisplayName("displayName"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListRedisClusterNodesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. + */ + private String redisClusterId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. + * @param redisClusterId the value to set + * @return this builder instance + */ + public Builder redisClusterId(String redisClusterId) { + this.redisClusterId = redisClusterId; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String displayName = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param displayName the value to set + * @return this builder instance + */ + public Builder displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The maximum number of items to return. + */ + private Integer limit = null; + + /** + * The maximum number of items to return. + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + */ + private String page = null; + + /** + * A token representing the position at which to start retrieving results. This must come from the {@code opc-next-page} header field of a previous response. + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either 'ASC' or 'DESC'. + */ + private com.oracle.bmc.redis.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either 'ASC' or 'DESC'. + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.redis.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListRedisClusterNodesRequest o) { + redisClusterId(o.getRedisClusterId()); + displayName(o.getDisplayName()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListRedisClusterNodesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListRedisClusterNodesRequest + */ + public ListRedisClusterNodesRequest build() { + ListRedisClusterNodesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListRedisClusterNodesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListRedisClusterNodesRequest + */ + public ListRedisClusterNodesRequest buildWithoutInvocationCallback() { + ListRedisClusterNodesRequest request = new ListRedisClusterNodesRequest(); + request.redisClusterId = redisClusterId; + request.displayName = displayName; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListRedisClusterNodesRequest(redisClusterId, displayName, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .redisClusterId(redisClusterId) + .displayName(displayName) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",redisClusterId=").append(String.valueOf(this.redisClusterId)); + sb.append(",displayName=").append(String.valueOf(this.displayName)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListRedisClusterNodesRequest)) { + return false; + } + + ListRedisClusterNodesRequest other = (ListRedisClusterNodesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.redisClusterId, other.redisClusterId) + && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.redisClusterId == null ? 43 : this.redisClusterId.hashCode()); + result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/ListRedisClustersRequest.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/ListRedisClustersRequest.java index da3c703df15..30702c2d21b 100644 --- a/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/ListRedisClustersRequest.java +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/ListRedisClustersRequest.java @@ -45,12 +45,12 @@ public String getDisplayName() { return displayName; } /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. */ private String id; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. */ public String getId() { return id; @@ -204,12 +204,12 @@ public Builder displayName(String displayName) { } /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. */ private String id = null; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. * @param id the value to set * @return this builder instance */ diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/UpdateRedisClusterRequest.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/UpdateRedisClusterRequest.java index 1263849ec97..6218f234c7c 100644 --- a/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/UpdateRedisClusterRequest.java +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/requests/UpdateRedisClusterRequest.java @@ -14,12 +14,12 @@ public class UpdateRedisClusterRequest com.oracle.bmc.redis.model.UpdateRedisClusterDetails> { /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. */ private String redisClusterId; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. */ public String getRedisClusterId() { return redisClusterId; @@ -87,12 +87,12 @@ public static class Builder private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. */ private String redisClusterId = null; /** - * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the Redis cluster. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm#Oracle) of the cluster. * @param redisClusterId the value to set * @return this builder instance */ diff --git a/bmc-redis/src/main/java/com/oracle/bmc/redis/responses/ListRedisClusterNodesResponse.java b/bmc-redis/src/main/java/com/oracle/bmc/redis/responses/ListRedisClusterNodesResponse.java new file mode 100644 index 00000000000..ba262c0d1c6 --- /dev/null +++ b/bmc-redis/src/main/java/com/oracle/bmc/redis/responses/ListRedisClusterNodesResponse.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.redis.responses; + +import com.oracle.bmc.redis.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220315") +public class ListRedisClusterNodesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned RedisNodeCollection instance. + */ + private com.oracle.bmc.redis.model.RedisNodeCollection redisNodeCollection; + + /** + * The returned RedisNodeCollection instance. + * @return the value + */ + public com.oracle.bmc.redis.model.RedisNodeCollection getRedisNodeCollection() { + return redisNodeCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "redisNodeCollection" + }) + private ListRedisClusterNodesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.redis.model.RedisNodeCollection redisNodeCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.redisNodeCollection = redisNodeCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned RedisNodeCollection instance. + */ + private com.oracle.bmc.redis.model.RedisNodeCollection redisNodeCollection; + + /** + * The returned RedisNodeCollection instance. + * @param redisNodeCollection the value to set + * @return this builder + */ + public Builder redisNodeCollection( + com.oracle.bmc.redis.model.RedisNodeCollection redisNodeCollection) { + this.redisNodeCollection = redisNodeCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListRedisClusterNodesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + redisNodeCollection(o.getRedisNodeCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListRedisClusterNodesResponse build() { + return new ListRedisClusterNodesResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, redisNodeCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",redisNodeCollection=").append(String.valueOf(redisNodeCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListRedisClusterNodesResponse)) { + return false; + } + + ListRedisClusterNodesResponse other = (ListRedisClusterNodesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.redisNodeCollection, other.redisNodeCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.redisNodeCollection == null + ? 43 + : this.redisNodeCollection.hashCode()); + return result; + } +} diff --git a/bmc-resourcemanager/pom.xml b/bmc-resourcemanager/pom.xml index 94398ad8bc5..a125a4030cc 100644 --- a/bmc-resourcemanager/pom.xml +++ b/bmc-resourcemanager/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-resourcemanager @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-resourcescheduler/pom.xml b/bmc-resourcescheduler/pom.xml index 7e56304bf31..27de1f8423d 100644 --- a/bmc-resourcescheduler/pom.xml +++ b/bmc-resourcescheduler/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-resourcescheduler @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-resourcesearch/pom.xml b/bmc-resourcesearch/pom.xml index ba7cd2f8278..69e0020a447 100644 --- a/bmc-resourcesearch/pom.xml +++ b/bmc-resourcesearch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-resourcesearch @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-rover/pom.xml b/bmc-rover/pom.xml index eeb87207baf..b8bb581769c 100644 --- a/bmc-rover/pom.xml +++ b/bmc-rover/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-rover @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-sch/pom.xml b/bmc-sch/pom.xml index ea45d901d0e..b289af7e121 100644 --- a/bmc-sch/pom.xml +++ b/bmc-sch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-sch @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-secrets/pom.xml b/bmc-secrets/pom.xml index 55777edd2c4..c1e54b374a3 100644 --- a/bmc-secrets/pom.xml +++ b/bmc-secrets/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-secrets @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-securityattribute/pom.xml b/bmc-securityattribute/pom.xml new file mode 100644 index 00000000000..5b72bfb4542 --- /dev/null +++ b/bmc-securityattribute/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + com.oracle.oci.sdk + oci-java-sdk + 2.79.0 + ../pom.xml + + oci-java-sdk-securityattribute + Oracle Cloud Infrastructure SDK - Security Attribute + This project contains the SDK used for Oracle Cloud Infrastructure Security Attribute + https://docs.cloud.oracle.com/Content/API/SDKDocs/javasdk.htm + + + com.oracle.oci.sdk + oci-java-sdk-common + 2.79.0 + + + \ No newline at end of file diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SdkClientsMetadata.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SdkClientsMetadata.java new file mode 100644 index 00000000000..0a1bcfedf98 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SdkClientsMetadata.java @@ -0,0 +1,11 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute; + +import com.oracle.bmc.SdkClients; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@SdkClients({SecurityAttributeAsyncClient.class, SecurityAttributeClient.class}) +public final class SdkClientsMetadata {} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttribute.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttribute.java new file mode 100644 index 00000000000..3ac7affbda9 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttribute.java @@ -0,0 +1,423 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute; + +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; + +/** + * Use the Security Attributes API to manage security attributes and security attribute namespaces. For more information, see the documentation for [Security Attributes](https://docs.cloud.oracle.com/iaas/Content/zero-trust-packet-routing/managing-security-attributes.htm) and [Security Attribute Nampespaces](https://docs.cloud.oracle.com/iaas/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public interface SecurityAttribute extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the service. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this Region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Deletes the specified security attribute definitions. This operation triggers a process that removes the + * security attributes from all resources in your tenancy. The security attributes must be within the same security attribute namespace. + * + * The following actions happen immediately: + * + * After you start this operation, the state of the tag changes to DELETING, and security attribute removal + * from resources begins. This process can take up to 48 hours depending on the number of resources that + * are tagged and the regions in which those resources reside. + * + * When all security attributes have been removed, the state changes to DELETED. You cannot restore a deleted security attribute. After the security attribute state + * changes to DELETED, you can use the same security attribute name again. + * + * After you start this operation, you cannot start either the {@link #deleteSecurityAttribute(DeleteSecurityAttributeRequest) deleteSecurityAttribute} or the {@link #cascadeDeleteSecurityAttributeNamespace(CascadeDeleteSecurityAttributeNamespaceRequest) cascadeDeleteSecurityAttributeNamespace} operation until this process completes. + * + * In order to delete security attribute, you must first retire the security attribute. Use {@link #updateSecurityAttribute(UpdateSecurityAttributeRequest) updateSecurityAttribute} + * to retire a security attribute. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use BulkDeleteSecurityAttributes API. + */ + BulkDeleteSecurityAttributesResponse bulkDeleteSecurityAttributes( + BulkDeleteSecurityAttributesRequest request); + + /** + * Edits the specified list of security attributes for the selected resources. + * This operation triggers a process that edits the attributes on all selected resources. The possible actions are: + *

+ * Add a security attribute when it does not already exist on the resource. + * * Update the value for a security attribute when it is present on the resource. + * * Add a security attribute when it does not already exist on the resource or update the value when it is present on the resource. + * * Remove a security attribute from a resource. The security attribute is removed from the resource regardless of the value. + *

+ * The edits can include a combination of operations and attributes. + * However, multiple operations cannot apply to the same attribute in the same request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use BulkEditSecurityAttributes API. + */ + BulkEditSecurityAttributesResponse bulkEditSecurityAttributes( + BulkEditSecurityAttributesRequest request); + + /** + * Deletes the specified security attribute namespace. This operation triggers a process that removes all of the security attributes + * defined in the specified security attribute namespace from all resources in your tenancy and then deletes the security attribute namespace. + *

+ * After you start the delete operation: + *

+ * New security attribute key definitions cannot be created under the namespace. + * * The state of the security attribute namespace changes to DELETING. + * * Security attribute removal from the resources begins. + *

+ * This process can take up to 48 hours depending on the number of security attributes in the namespace, the number of resources + * that are tagged, and the locations of the regions in which those resources reside. + *

+ * After all security attributes are removed, the state changes to DELETED. You cannot restore a deleted security attribute namespace. After the deleted security attribute namespace + * changes its state to DELETED, you can use the name of the deleted security attribute namespace again. + *

+ * After you start this operation, you cannot start either the {@link #deleteSecurityAttribute(DeleteSecurityAttributeRequest) deleteSecurityAttribute} or the {@link #bulkDeleteSecurityAttributes(BulkDeleteSecurityAttributesRequest) bulkDeleteSecurityAttributes} operation until this process completes. + *

+ * To delete a security attribute namespace, you must first retire it. Use {@link #updateSecurityAttributeNamespace(UpdateSecurityAttributeNamespaceRequest) updateSecurityAttributeNamespace} + * to retire a security attribute namespace. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CascadingDeleteSecurityAttributeNamespace API. + */ + CascadingDeleteSecurityAttributeNamespaceResponse cascadingDeleteSecurityAttributeNamespace( + CascadingDeleteSecurityAttributeNamespaceRequest request); + + /** + * Moves the specified security attribute namespace to the specified compartment within the same tenancy. + *

+ * To move the security attribute namespace, you must have the manage security-attributes permission on both compartments. + * For more information about IAM policies, see [Details for IAM](https://docs.cloud.oracle.com/Content/Identity/policyreference/iampolicyreference.htm). + *

+ * Moving a security attribute namespace moves all the security attributes contained in the security attribute namespace. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ChangeSecurityAttributeNamespaceCompartment API. + */ + ChangeSecurityAttributeNamespaceCompartmentResponse changeSecurityAttributeNamespaceCompartment( + ChangeSecurityAttributeNamespaceCompartmentRequest request); + + /** + * Creates a new security attribute in the specified security attribute namespace. + *

+ * The security attribute requires either the OCID or the name of the security attribute namespace that will contain this + * security attribute. + *

+ * You must specify a *name* for the attribute, which must be unique across all attributes in the security attribute namespace + * and cannot be changed. The only valid characters for security attribute names are:\u00A00-9, A-Z, a-z, -, _ characters. + * Names are case insensitive. That means, for example, \"mySecurityAttribute\" and \"mysecurityattribute\" are not allowed in the same namespace. + * If you specify a name that's already in use in the security attribute namespace, a 409 error is returned. + *

+ * The security attribute must have a *description*. It does not have to be unique, and you can change it with + * {@link #updateSecurityAttribute(UpdateSecurityAttributeRequest) updateSecurityAttribute}. + *

+ * The security attribute must have a value type, which is specified with a validator. Security attribute can use either a + * static value or a list of possible values. Static values are entered by a user applying the security attribute + * to a resource. Lists are created by the user and the user must apply a value from the list. Lists + * are validated. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateSecurityAttribute API. + */ + CreateSecurityAttributeResponse createSecurityAttribute(CreateSecurityAttributeRequest request); + + /** + * Creates a new security attribute namespace in the specified compartment. + *

+ * You must specify the compartment ID in the request object (remember that the tenancy is simply the root + * compartment). + *

+ * You must also specify a *name* for the namespace, which must be unique across all namespaces in your tenancy + * and cannot be changed. The only valid characters for security attribute names are: \u00A00-9, A-Z, a-z, -, _ characters. + * Names are case insensitive. That means, for example, \"myNamespace\" and \"mynamespace\" are not allowed + * in the same tenancy. Once you created a namespace, you cannot change the name. + * If you specify a name that's already in use in the tenancy, a 409 error is returned. + *

+ * You must also specify a *description* for the namespace. + * It does not have to be unique, and you can change it with + * {@link #securityAttributeNamespace(SecurityAttributeNamespaceRequest) securityAttributeNamespace}. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateSecurityAttributeNamespace API. + */ + CreateSecurityAttributeNamespaceResponse createSecurityAttributeNamespace( + CreateSecurityAttributeNamespaceRequest request); + + /** + * Deletes the specified security attribute. This operation triggers a process that removes the + * security attribute from all resources in your tenancy. + *

+ * When you start the delete operation, the state of the security attribute changes to DELETING and security attribute removal + * from resources begins. This can take up to 48 hours depending on the number of resources that + * were tagged as well as the regions in which those resources reside. + *

+ * When all attributes have been removed, the state changes to DELETED. You cannot restore a deleted attribute. Once the deleted attribute + * changes its state to DELETED, you can use the same security attribute name again. + *

+ * After you start this operation, you cannot start either the {@link #bulkDeleteSecurityAttributes(BulkDeleteSecurityAttributesRequest) bulkDeleteSecurityAttributes} or the {@link #cascadeDeleteTagNamespace(CascadeDeleteTagNamespaceRequest) cascadeDeleteTagNamespace} operation until this process completes. + *

+ * To delete a security attribute, you must first retire it. Use {@link #updateSecurityAttribute(UpdateSecurityAttributeRequest) updateSecurityAttribute} + * to retire a security attribute. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteSecurityAttribute API. + */ + DeleteSecurityAttributeResponse deleteSecurityAttribute(DeleteSecurityAttributeRequest request); + + /** + * Deletes the specified security attribute namespace. Only an empty security attribute namespace can be deleted with this operation. To use this operation + * to delete a security attribute namespace that contains security attributes, first delete all of its security attributes. + * Use {@link #deleteSecurityAttribute(DeleteSecurityAttributeRequest) deleteSecurityAttribute} to delete a security attribute. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteSecurityAttributeNamespace API. + */ + DeleteSecurityAttributeNamespaceResponse deleteSecurityAttributeNamespace( + DeleteSecurityAttributeNamespaceRequest request); + + /** + * Gets the specified security attribute's information. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetSecurityAttribute API. + */ + GetSecurityAttributeResponse getSecurityAttribute(GetSecurityAttributeRequest request); + + /** + * Gets the specified security attribute namespace's information. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetSecurityAttributeNamespace API. + */ + GetSecurityAttributeNamespaceResponse getSecurityAttributeNamespace( + GetSecurityAttributeNamespaceRequest request); + + /** + * Gets details on a specified work request. The workRequestID is returned in the opc-work-request-id header + * for any asynchronous operation in security attributes service. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetSecurityAttributeWorkRequest API. + */ + GetSecurityAttributeWorkRequestResponse getSecurityAttributeWorkRequest( + GetSecurityAttributeWorkRequestRequest request); + + /** + * Lists the security attribute namespaces in the specified compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListSecurityAttributeNamespaces API. + */ + ListSecurityAttributeNamespacesResponse listSecurityAttributeNamespaces( + ListSecurityAttributeNamespacesRequest request); + + /** + * Gets the errors for a work request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListSecurityAttributeWorkRequestErrors API. + */ + ListSecurityAttributeWorkRequestErrorsResponse listSecurityAttributeWorkRequestErrors( + ListSecurityAttributeWorkRequestErrorsRequest request); + + /** + * Gets the logs for a work request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListSecurityAttributeWorkRequestLogs API. + */ + ListSecurityAttributeWorkRequestLogsResponse listSecurityAttributeWorkRequestLogs( + ListSecurityAttributeWorkRequestLogsRequest request); + + /** + * Lists the security attribute work requests in compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListSecurityAttributeWorkRequests API. + */ + ListSecurityAttributeWorkRequestsResponse listSecurityAttributeWorkRequests( + ListSecurityAttributeWorkRequestsRequest request); + + /** + * Lists the security attributes in the specified namespace. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListSecurityAttributes API. + */ + ListSecurityAttributesResponse listSecurityAttributes(ListSecurityAttributesRequest request); + + /** + * Updates the specified security attribute. You can only update `description`, and `isRetired`. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateSecurityAttribute API. + */ + UpdateSecurityAttributeResponse updateSecurityAttribute(UpdateSecurityAttributeRequest request); + + /** + * Updates the specified security attribute namespace. You can't update the namespace name. + *

+ * Updating `isRetired` to 'true' retires the namespace and all the security attributes in the namespace. Reactivating a + * namespace (changing `isRetired` from 'true' to 'false') does not reactivate security attributes. + * To reactivate the security attributes, you must reactivate each one individually *after* you reactivate the namespace, + * using {@link #updateTag(UpdateTagRequest) updateTag}. For more information about retiring security attribute namespaces, see + * [Managing Security Attribute Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + *

+ * You can't add a namespace with the same name as a retired namespace in the same tenancy. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateSecurityAttributeNamespace API. + */ + UpdateSecurityAttributeNamespaceResponse updateSecurityAttributeNamespace( + UpdateSecurityAttributeNamespaceRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + SecurityAttributeWaiters getWaiters(); + + /** + * Gets the pre-configured paginators available for list operations in this service which may return multiple + * pages of data. These paginators provide an {@link java.lang.Iterable} interface so that service responses, or + * resources/records, can be iterated through without having to manually deal with pagination and page tokens. + * + * @return The service paginators. + */ + SecurityAttributePaginators getPaginators(); +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeAsync.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeAsync.java new file mode 100644 index 00000000000..b0da9b2fee0 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeAsync.java @@ -0,0 +1,488 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute; + +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; + +/** + * Use the Security Attributes API to manage security attributes and security attribute namespaces. For more information, see the documentation for [Security Attributes](https://docs.cloud.oracle.com/iaas/Content/zero-trust-packet-routing/managing-security-attributes.htm) and [Security Attribute Nampespaces](https://docs.cloud.oracle.com/iaas/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public interface SecurityAttributeAsync extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the serice. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Deletes the specified security attribute definitions. This operation triggers a process that removes the + * security attributes from all resources in your tenancy. The security attributes must be within the same security attribute namespace. + * + * The following actions happen immediately: + * + * After you start this operation, the state of the tag changes to DELETING, and security attribute removal + * from resources begins. This process can take up to 48 hours depending on the number of resources that + * are tagged and the regions in which those resources reside. + * + * When all security attributes have been removed, the state changes to DELETED. You cannot restore a deleted security attribute. After the security attribute state + * changes to DELETED, you can use the same security attribute name again. + * + * After you start this operation, you cannot start either the {@link #deleteSecurityAttribute(DeleteSecurityAttributeRequest, Consumer, Consumer) deleteSecurityAttribute} or the {@link #cascadeDeleteSecurityAttributeNamespace(CascadeDeleteSecurityAttributeNamespaceRequest, Consumer, Consumer) cascadeDeleteSecurityAttributeNamespace} operation until this process completes. + * + * In order to delete security attribute, you must first retire the security attribute. Use {@link #updateSecurityAttribute(UpdateSecurityAttributeRequest, Consumer, Consumer) updateSecurityAttribute} + * to retire a security attribute. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future bulkDeleteSecurityAttributes( + BulkDeleteSecurityAttributesRequest request, + com.oracle.bmc.responses.AsyncHandler< + BulkDeleteSecurityAttributesRequest, + BulkDeleteSecurityAttributesResponse> + handler); + + /** + * Edits the specified list of security attributes for the selected resources. + * This operation triggers a process that edits the attributes on all selected resources. The possible actions are: + *

+ * Add a security attribute when it does not already exist on the resource. + * * Update the value for a security attribute when it is present on the resource. + * * Add a security attribute when it does not already exist on the resource or update the value when it is present on the resource. + * * Remove a security attribute from a resource. The security attribute is removed from the resource regardless of the value. + *

+ * The edits can include a combination of operations and attributes. + * However, multiple operations cannot apply to the same attribute in the same request. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future bulkEditSecurityAttributes( + BulkEditSecurityAttributesRequest request, + com.oracle.bmc.responses.AsyncHandler< + BulkEditSecurityAttributesRequest, BulkEditSecurityAttributesResponse> + handler); + + /** + * Deletes the specified security attribute namespace. This operation triggers a process that removes all of the security attributes + * defined in the specified security attribute namespace from all resources in your tenancy and then deletes the security attribute namespace. + *

+ * After you start the delete operation: + *

+ * New security attribute key definitions cannot be created under the namespace. + * * The state of the security attribute namespace changes to DELETING. + * * Security attribute removal from the resources begins. + *

+ * This process can take up to 48 hours depending on the number of security attributes in the namespace, the number of resources + * that are tagged, and the locations of the regions in which those resources reside. + *

+ * After all security attributes are removed, the state changes to DELETED. You cannot restore a deleted security attribute namespace. After the deleted security attribute namespace + * changes its state to DELETED, you can use the name of the deleted security attribute namespace again. + *

+ * After you start this operation, you cannot start either the {@link #deleteSecurityAttribute(DeleteSecurityAttributeRequest, Consumer, Consumer) deleteSecurityAttribute} or the {@link #bulkDeleteSecurityAttributes(BulkDeleteSecurityAttributesRequest, Consumer, Consumer) bulkDeleteSecurityAttributes} operation until this process completes. + *

+ * To delete a security attribute namespace, you must first retire it. Use {@link #updateSecurityAttributeNamespace(UpdateSecurityAttributeNamespaceRequest, Consumer, Consumer) updateSecurityAttributeNamespace} + * to retire a security attribute namespace. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + cascadingDeleteSecurityAttributeNamespace( + CascadingDeleteSecurityAttributeNamespaceRequest request, + com.oracle.bmc.responses.AsyncHandler< + CascadingDeleteSecurityAttributeNamespaceRequest, + CascadingDeleteSecurityAttributeNamespaceResponse> + handler); + + /** + * Moves the specified security attribute namespace to the specified compartment within the same tenancy. + *

+ * To move the security attribute namespace, you must have the manage security-attributes permission on both compartments. + * For more information about IAM policies, see [Details for IAM](https://docs.cloud.oracle.com/Content/Identity/policyreference/iampolicyreference.htm). + *

+ * Moving a security attribute namespace moves all the security attributes contained in the security attribute namespace. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + changeSecurityAttributeNamespaceCompartment( + ChangeSecurityAttributeNamespaceCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeSecurityAttributeNamespaceCompartmentRequest, + ChangeSecurityAttributeNamespaceCompartmentResponse> + handler); + + /** + * Creates a new security attribute in the specified security attribute namespace. + *

+ * The security attribute requires either the OCID or the name of the security attribute namespace that will contain this + * security attribute. + *

+ * You must specify a *name* for the attribute, which must be unique across all attributes in the security attribute namespace + * and cannot be changed. The only valid characters for security attribute names are:\u00A00-9, A-Z, a-z, -, _ characters. + * Names are case insensitive. That means, for example, \"mySecurityAttribute\" and \"mysecurityattribute\" are not allowed in the same namespace. + * If you specify a name that's already in use in the security attribute namespace, a 409 error is returned. + *

+ * The security attribute must have a *description*. It does not have to be unique, and you can change it with + * {@link #updateSecurityAttribute(UpdateSecurityAttributeRequest, Consumer, Consumer) updateSecurityAttribute}. + *

+ * The security attribute must have a value type, which is specified with a validator. Security attribute can use either a + * static value or a list of possible values. Static values are entered by a user applying the security attribute + * to a resource. Lists are created by the user and the user must apply a value from the list. Lists + * are validated. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createSecurityAttribute( + CreateSecurityAttributeRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateSecurityAttributeRequest, CreateSecurityAttributeResponse> + handler); + + /** + * Creates a new security attribute namespace in the specified compartment. + *

+ * You must specify the compartment ID in the request object (remember that the tenancy is simply the root + * compartment). + *

+ * You must also specify a *name* for the namespace, which must be unique across all namespaces in your tenancy + * and cannot be changed. The only valid characters for security attribute names are: \u00A00-9, A-Z, a-z, -, _ characters. + * Names are case insensitive. That means, for example, \"myNamespace\" and \"mynamespace\" are not allowed + * in the same tenancy. Once you created a namespace, you cannot change the name. + * If you specify a name that's already in use in the tenancy, a 409 error is returned. + *

+ * You must also specify a *description* for the namespace. + * It does not have to be unique, and you can change it with + * {@link #securityAttributeNamespace(SecurityAttributeNamespaceRequest, Consumer, Consumer) securityAttributeNamespace}. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + createSecurityAttributeNamespace( + CreateSecurityAttributeNamespaceRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateSecurityAttributeNamespaceRequest, + CreateSecurityAttributeNamespaceResponse> + handler); + + /** + * Deletes the specified security attribute. This operation triggers a process that removes the + * security attribute from all resources in your tenancy. + *

+ * When you start the delete operation, the state of the security attribute changes to DELETING and security attribute removal + * from resources begins. This can take up to 48 hours depending on the number of resources that + * were tagged as well as the regions in which those resources reside. + *

+ * When all attributes have been removed, the state changes to DELETED. You cannot restore a deleted attribute. Once the deleted attribute + * changes its state to DELETED, you can use the same security attribute name again. + *

+ * After you start this operation, you cannot start either the {@link #bulkDeleteSecurityAttributes(BulkDeleteSecurityAttributesRequest, Consumer, Consumer) bulkDeleteSecurityAttributes} or the {@link #cascadeDeleteTagNamespace(CascadeDeleteTagNamespaceRequest, Consumer, Consumer) cascadeDeleteTagNamespace} operation until this process completes. + *

+ * To delete a security attribute, you must first retire it. Use {@link #updateSecurityAttribute(UpdateSecurityAttributeRequest, Consumer, Consumer) updateSecurityAttribute} + * to retire a security attribute. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteSecurityAttribute( + DeleteSecurityAttributeRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteSecurityAttributeRequest, DeleteSecurityAttributeResponse> + handler); + + /** + * Deletes the specified security attribute namespace. Only an empty security attribute namespace can be deleted with this operation. To use this operation + * to delete a security attribute namespace that contains security attributes, first delete all of its security attributes. + * Use {@link #deleteSecurityAttribute(DeleteSecurityAttributeRequest, Consumer, Consumer) deleteSecurityAttribute} to delete a security attribute. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + deleteSecurityAttributeNamespace( + DeleteSecurityAttributeNamespaceRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteSecurityAttributeNamespaceRequest, + DeleteSecurityAttributeNamespaceResponse> + handler); + + /** + * Gets the specified security attribute's information. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getSecurityAttribute( + GetSecurityAttributeRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetSecurityAttributeRequest, GetSecurityAttributeResponse> + handler); + + /** + * Gets the specified security attribute namespace's information. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + getSecurityAttributeNamespace( + GetSecurityAttributeNamespaceRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetSecurityAttributeNamespaceRequest, + GetSecurityAttributeNamespaceResponse> + handler); + + /** + * Gets details on a specified work request. The workRequestID is returned in the opc-work-request-id header + * for any asynchronous operation in security attributes service. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + getSecurityAttributeWorkRequest( + GetSecurityAttributeWorkRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetSecurityAttributeWorkRequestRequest, + GetSecurityAttributeWorkRequestResponse> + handler); + + /** + * Lists the security attribute namespaces in the specified compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listSecurityAttributeNamespaces( + ListSecurityAttributeNamespacesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeNamespacesRequest, + ListSecurityAttributeNamespacesResponse> + handler); + + /** + * Gets the errors for a work request. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listSecurityAttributeWorkRequestErrors( + ListSecurityAttributeWorkRequestErrorsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeWorkRequestErrorsRequest, + ListSecurityAttributeWorkRequestErrorsResponse> + handler); + + /** + * Gets the logs for a work request. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listSecurityAttributeWorkRequestLogs( + ListSecurityAttributeWorkRequestLogsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeWorkRequestLogsRequest, + ListSecurityAttributeWorkRequestLogsResponse> + handler); + + /** + * Lists the security attribute work requests in compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listSecurityAttributeWorkRequests( + ListSecurityAttributeWorkRequestsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeWorkRequestsRequest, + ListSecurityAttributeWorkRequestsResponse> + handler); + + /** + * Lists the security attributes in the specified namespace. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listSecurityAttributes( + ListSecurityAttributesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributesRequest, ListSecurityAttributesResponse> + handler); + + /** + * Updates the specified security attribute. You can only update `description`, and `isRetired`. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateSecurityAttribute( + UpdateSecurityAttributeRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateSecurityAttributeRequest, UpdateSecurityAttributeResponse> + handler); + + /** + * Updates the specified security attribute namespace. You can't update the namespace name. + *

+ * Updating `isRetired` to 'true' retires the namespace and all the security attributes in the namespace. Reactivating a + * namespace (changing `isRetired` from 'true' to 'false') does not reactivate security attributes. + * To reactivate the security attributes, you must reactivate each one individually *after* you reactivate the namespace, + * using {@link #updateTag(UpdateTagRequest, Consumer, Consumer) updateTag}. For more information about retiring security attribute namespaces, see + * [Managing Security Attribute Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + *

+ * You can't add a namespace with the same name as a retired namespace in the same tenancy. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + updateSecurityAttributeNamespace( + UpdateSecurityAttributeNamespaceRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateSecurityAttributeNamespaceRequest, + UpdateSecurityAttributeNamespaceResponse> + handler); +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeAsyncClient.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeAsyncClient.java new file mode 100644 index 00000000000..f6600ae2756 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeAsyncClient.java @@ -0,0 +1,1436 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute; + +import com.oracle.bmc.securityattribute.internal.http.*; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; + +/** + * Async client implementation for SecurityAttribute service.
+ * There are two ways to use async client: + * 1. Use AsyncHandler: using AsyncHandler, if the response to the call is an {@link java.io.InputStream}, like + * getObject Api in object storage service, developers need to process the stream in AsyncHandler, and not anywhere else, + * because the stream will be closed right after the AsyncHandler is invoked.
+ * 2. Use Java Future: using Java Future, developers need to close the stream after they are done with the Java Future.
+ * Accessing the result should be done in a mutually exclusive manner, either through the Future or the AsyncHandler, + * but not both. If the Future is used, the caller should pass in null as the AsyncHandler. If the AsyncHandler + * is used, it is still safe to use the Future to determine whether or not the request was completed via + * Future.isDone/isCancelled.
+ * Please refer to https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class SecurityAttributeAsyncClient implements SecurityAttributeAsync { + /** + * Service instance for SecurityAttribute. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("SECURITYATTRIBUTE") + .serviceEndpointPrefix("") + .serviceEndpointTemplate( + "https://security-attribute.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SecurityAttributeAsyncClient.class); + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public SecurityAttributeAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public SecurityAttributeAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public SecurityAttributeAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public SecurityAttributeAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public SecurityAttributeAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public SecurityAttributeAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public SecurityAttributeAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + public SecurityAttributeAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.clientConfigurationToUse = configuration; + + this.refreshClient(); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder< + Builder, SecurityAttributeAsyncClient> { + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public SecurityAttributeAsyncClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new SecurityAttributeAsyncClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint); + } + } + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public java.util.concurrent.Future + bulkDeleteSecurityAttributes( + BulkDeleteSecurityAttributesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + BulkDeleteSecurityAttributesRequest, + BulkDeleteSecurityAttributesResponse> + handler) { + LOG.trace("Called async bulkDeleteSecurityAttributes"); + final BulkDeleteSecurityAttributesRequest interceptedRequest = + BulkDeleteSecurityAttributesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + BulkDeleteSecurityAttributesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "BulkDeleteSecurityAttributes", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, BulkDeleteSecurityAttributesResponse> + transformer = + BulkDeleteSecurityAttributesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + BulkDeleteSecurityAttributesRequest, BulkDeleteSecurityAttributesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + BulkDeleteSecurityAttributesRequest, + BulkDeleteSecurityAttributesResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getBulkDeleteSecurityAttributesDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + BulkDeleteSecurityAttributesRequest, BulkDeleteSecurityAttributesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + bulkEditSecurityAttributes( + BulkEditSecurityAttributesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + BulkEditSecurityAttributesRequest, + BulkEditSecurityAttributesResponse> + handler) { + LOG.trace("Called async bulkEditSecurityAttributes"); + final BulkEditSecurityAttributesRequest interceptedRequest = + BulkEditSecurityAttributesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + BulkEditSecurityAttributesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "BulkEditSecurityAttributes", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, BulkEditSecurityAttributesResponse> + transformer = + BulkEditSecurityAttributesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + BulkEditSecurityAttributesRequest, BulkEditSecurityAttributesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + BulkEditSecurityAttributesRequest, + BulkEditSecurityAttributesResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getBulkEditSecurityAttributeDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + BulkEditSecurityAttributesRequest, BulkEditSecurityAttributesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + cascadingDeleteSecurityAttributeNamespace( + CascadingDeleteSecurityAttributeNamespaceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CascadingDeleteSecurityAttributeNamespaceRequest, + CascadingDeleteSecurityAttributeNamespaceResponse> + handler) { + LOG.trace("Called async cascadingDeleteSecurityAttributeNamespace"); + final CascadingDeleteSecurityAttributeNamespaceRequest interceptedRequest = + CascadingDeleteSecurityAttributeNamespaceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CascadingDeleteSecurityAttributeNamespaceConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "CascadingDeleteSecurityAttributeNamespace", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, + CascadingDeleteSecurityAttributeNamespaceResponse> + transformer = + CascadingDeleteSecurityAttributeNamespaceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CascadingDeleteSecurityAttributeNamespaceRequest, + CascadingDeleteSecurityAttributeNamespaceResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CascadingDeleteSecurityAttributeNamespaceRequest, + CascadingDeleteSecurityAttributeNamespaceResponse>, + java.util.concurrent.Future< + CascadingDeleteSecurityAttributeNamespaceResponse>> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CascadingDeleteSecurityAttributeNamespaceRequest, + CascadingDeleteSecurityAttributeNamespaceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + changeSecurityAttributeNamespaceCompartment( + ChangeSecurityAttributeNamespaceCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeSecurityAttributeNamespaceCompartmentRequest, + ChangeSecurityAttributeNamespaceCompartmentResponse> + handler) { + LOG.trace("Called async changeSecurityAttributeNamespaceCompartment"); + final ChangeSecurityAttributeNamespaceCompartmentRequest interceptedRequest = + ChangeSecurityAttributeNamespaceCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeSecurityAttributeNamespaceCompartmentConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "ChangeSecurityAttributeNamespaceCompartment", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, + ChangeSecurityAttributeNamespaceCompartmentResponse> + transformer = + ChangeSecurityAttributeNamespaceCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ChangeSecurityAttributeNamespaceCompartmentRequest, + ChangeSecurityAttributeNamespaceCompartmentResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ChangeSecurityAttributeNamespaceCompartmentRequest, + ChangeSecurityAttributeNamespaceCompartmentResponse>, + java.util.concurrent.Future< + ChangeSecurityAttributeNamespaceCompartmentResponse>> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest + .getChangeSecurityAttributeNamespaceCompartmentDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ChangeSecurityAttributeNamespaceCompartmentRequest, + ChangeSecurityAttributeNamespaceCompartmentResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createSecurityAttribute( + CreateSecurityAttributeRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateSecurityAttributeRequest, CreateSecurityAttributeResponse> + handler) { + LOG.trace("Called async createSecurityAttribute"); + final CreateSecurityAttributeRequest interceptedRequest = + CreateSecurityAttributeConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateSecurityAttributeConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "CreateSecurityAttribute", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateSecurityAttributeResponse> + transformer = + CreateSecurityAttributeConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateSecurityAttributeRequest, CreateSecurityAttributeResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateSecurityAttributeRequest, CreateSecurityAttributeResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateSecurityAttributeDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateSecurityAttributeRequest, CreateSecurityAttributeResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + createSecurityAttributeNamespace( + CreateSecurityAttributeNamespaceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateSecurityAttributeNamespaceRequest, + CreateSecurityAttributeNamespaceResponse> + handler) { + LOG.trace("Called async createSecurityAttributeNamespace"); + final CreateSecurityAttributeNamespaceRequest interceptedRequest = + CreateSecurityAttributeNamespaceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateSecurityAttributeNamespaceConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "CreateSecurityAttributeNamespace", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateSecurityAttributeNamespaceResponse> + transformer = + CreateSecurityAttributeNamespaceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateSecurityAttributeNamespaceRequest, + CreateSecurityAttributeNamespaceResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateSecurityAttributeNamespaceRequest, + CreateSecurityAttributeNamespaceResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateSecurityAttributeNamespaceDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateSecurityAttributeNamespaceRequest, + CreateSecurityAttributeNamespaceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteSecurityAttribute( + DeleteSecurityAttributeRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteSecurityAttributeRequest, DeleteSecurityAttributeResponse> + handler) { + LOG.trace("Called async deleteSecurityAttribute"); + final DeleteSecurityAttributeRequest interceptedRequest = + DeleteSecurityAttributeConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteSecurityAttributeConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "DeleteSecurityAttribute", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteSecurityAttributeResponse> + transformer = + DeleteSecurityAttributeConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteSecurityAttributeRequest, DeleteSecurityAttributeResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteSecurityAttributeRequest, DeleteSecurityAttributeResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteSecurityAttributeRequest, DeleteSecurityAttributeResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + deleteSecurityAttributeNamespace( + DeleteSecurityAttributeNamespaceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteSecurityAttributeNamespaceRequest, + DeleteSecurityAttributeNamespaceResponse> + handler) { + LOG.trace("Called async deleteSecurityAttributeNamespace"); + final DeleteSecurityAttributeNamespaceRequest interceptedRequest = + DeleteSecurityAttributeNamespaceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteSecurityAttributeNamespaceConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "DeleteSecurityAttributeNamespace", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteSecurityAttributeNamespaceResponse> + transformer = + DeleteSecurityAttributeNamespaceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteSecurityAttributeNamespaceRequest, + DeleteSecurityAttributeNamespaceResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteSecurityAttributeNamespaceRequest, + DeleteSecurityAttributeNamespaceResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteSecurityAttributeNamespaceRequest, + DeleteSecurityAttributeNamespaceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getSecurityAttribute( + GetSecurityAttributeRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetSecurityAttributeRequest, GetSecurityAttributeResponse> + handler) { + LOG.trace("Called async getSecurityAttribute"); + final GetSecurityAttributeRequest interceptedRequest = + GetSecurityAttributeConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetSecurityAttributeConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "GetSecurityAttribute", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + GetSecurityAttributeConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetSecurityAttributeRequest, GetSecurityAttributeResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetSecurityAttributeRequest, GetSecurityAttributeResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetSecurityAttributeRequest, GetSecurityAttributeResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getSecurityAttributeNamespace( + GetSecurityAttributeNamespaceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetSecurityAttributeNamespaceRequest, + GetSecurityAttributeNamespaceResponse> + handler) { + LOG.trace("Called async getSecurityAttributeNamespace"); + final GetSecurityAttributeNamespaceRequest interceptedRequest = + GetSecurityAttributeNamespaceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetSecurityAttributeNamespaceConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "GetSecurityAttributeNamespace", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, GetSecurityAttributeNamespaceResponse> + transformer = + GetSecurityAttributeNamespaceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetSecurityAttributeNamespaceRequest, GetSecurityAttributeNamespaceResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetSecurityAttributeNamespaceRequest, + GetSecurityAttributeNamespaceResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetSecurityAttributeNamespaceRequest, GetSecurityAttributeNamespaceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getSecurityAttributeWorkRequest( + GetSecurityAttributeWorkRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetSecurityAttributeWorkRequestRequest, + GetSecurityAttributeWorkRequestResponse> + handler) { + LOG.trace("Called async getSecurityAttributeWorkRequest"); + final GetSecurityAttributeWorkRequestRequest interceptedRequest = + GetSecurityAttributeWorkRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetSecurityAttributeWorkRequestConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "GetSecurityAttributeWorkRequest", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, GetSecurityAttributeWorkRequestResponse> + transformer = + GetSecurityAttributeWorkRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetSecurityAttributeWorkRequestRequest, + GetSecurityAttributeWorkRequestResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetSecurityAttributeWorkRequestRequest, + GetSecurityAttributeWorkRequestResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetSecurityAttributeWorkRequestRequest, + GetSecurityAttributeWorkRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listSecurityAttributeNamespaces( + ListSecurityAttributeNamespacesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeNamespacesRequest, + ListSecurityAttributeNamespacesResponse> + handler) { + LOG.trace("Called async listSecurityAttributeNamespaces"); + final ListSecurityAttributeNamespacesRequest interceptedRequest = + ListSecurityAttributeNamespacesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSecurityAttributeNamespacesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "ListSecurityAttributeNamespaces", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ListSecurityAttributeNamespacesResponse> + transformer = + ListSecurityAttributeNamespacesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeNamespacesRequest, + ListSecurityAttributeNamespacesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeNamespacesRequest, + ListSecurityAttributeNamespacesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListSecurityAttributeNamespacesRequest, + ListSecurityAttributeNamespacesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listSecurityAttributeWorkRequestErrors( + ListSecurityAttributeWorkRequestErrorsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeWorkRequestErrorsRequest, + ListSecurityAttributeWorkRequestErrorsResponse> + handler) { + LOG.trace("Called async listSecurityAttributeWorkRequestErrors"); + final ListSecurityAttributeWorkRequestErrorsRequest interceptedRequest = + ListSecurityAttributeWorkRequestErrorsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSecurityAttributeWorkRequestErrorsConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "ListSecurityAttributeWorkRequestErrors", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ListSecurityAttributeWorkRequestErrorsResponse> + transformer = + ListSecurityAttributeWorkRequestErrorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeWorkRequestErrorsRequest, + ListSecurityAttributeWorkRequestErrorsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeWorkRequestErrorsRequest, + ListSecurityAttributeWorkRequestErrorsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListSecurityAttributeWorkRequestErrorsRequest, + ListSecurityAttributeWorkRequestErrorsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listSecurityAttributeWorkRequestLogs( + ListSecurityAttributeWorkRequestLogsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeWorkRequestLogsRequest, + ListSecurityAttributeWorkRequestLogsResponse> + handler) { + LOG.trace("Called async listSecurityAttributeWorkRequestLogs"); + final ListSecurityAttributeWorkRequestLogsRequest interceptedRequest = + ListSecurityAttributeWorkRequestLogsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSecurityAttributeWorkRequestLogsConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "ListSecurityAttributeWorkRequestLogs", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ListSecurityAttributeWorkRequestLogsResponse> + transformer = + ListSecurityAttributeWorkRequestLogsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeWorkRequestLogsRequest, + ListSecurityAttributeWorkRequestLogsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeWorkRequestLogsRequest, + ListSecurityAttributeWorkRequestLogsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListSecurityAttributeWorkRequestLogsRequest, + ListSecurityAttributeWorkRequestLogsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listSecurityAttributeWorkRequests( + ListSecurityAttributeWorkRequestsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeWorkRequestsRequest, + ListSecurityAttributeWorkRequestsResponse> + handler) { + LOG.trace("Called async listSecurityAttributeWorkRequests"); + final ListSecurityAttributeWorkRequestsRequest interceptedRequest = + ListSecurityAttributeWorkRequestsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSecurityAttributeWorkRequestsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "ListSecurityAttributeWorkRequests", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ListSecurityAttributeWorkRequestsResponse> + transformer = + ListSecurityAttributeWorkRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeWorkRequestsRequest, + ListSecurityAttributeWorkRequestsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeWorkRequestsRequest, + ListSecurityAttributeWorkRequestsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListSecurityAttributeWorkRequestsRequest, + ListSecurityAttributeWorkRequestsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listSecurityAttributes( + ListSecurityAttributesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributesRequest, ListSecurityAttributesResponse> + handler) { + LOG.trace("Called async listSecurityAttributes"); + final ListSecurityAttributesRequest interceptedRequest = + ListSecurityAttributesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSecurityAttributesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "ListSecurityAttributes", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function + transformer = + ListSecurityAttributesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributesRequest, ListSecurityAttributesResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributesRequest, ListSecurityAttributesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListSecurityAttributesRequest, ListSecurityAttributesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateSecurityAttribute( + UpdateSecurityAttributeRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateSecurityAttributeRequest, UpdateSecurityAttributeResponse> + handler) { + LOG.trace("Called async updateSecurityAttribute"); + final UpdateSecurityAttributeRequest interceptedRequest = + UpdateSecurityAttributeConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateSecurityAttributeConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "UpdateSecurityAttribute", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateSecurityAttributeResponse> + transformer = + UpdateSecurityAttributeConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateSecurityAttributeRequest, UpdateSecurityAttributeResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateSecurityAttributeRequest, UpdateSecurityAttributeResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateSecurityAttributeDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateSecurityAttributeRequest, UpdateSecurityAttributeResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + updateSecurityAttributeNamespace( + UpdateSecurityAttributeNamespaceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateSecurityAttributeNamespaceRequest, + UpdateSecurityAttributeNamespaceResponse> + handler) { + LOG.trace("Called async updateSecurityAttributeNamespace"); + final UpdateSecurityAttributeNamespaceRequest interceptedRequest = + UpdateSecurityAttributeNamespaceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateSecurityAttributeNamespaceConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "UpdateSecurityAttributeNamespace", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateSecurityAttributeNamespaceResponse> + transformer = + UpdateSecurityAttributeNamespaceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateSecurityAttributeNamespaceRequest, + UpdateSecurityAttributeNamespaceResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateSecurityAttributeNamespaceRequest, + UpdateSecurityAttributeNamespaceResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateSecurityAttributeNamespaceDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateSecurityAttributeNamespaceRequest, + UpdateSecurityAttributeNamespaceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeClient.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeClient.java new file mode 100644 index 00000000000..67493861f9d --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeClient.java @@ -0,0 +1,1308 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute; + +import com.oracle.bmc.securityattribute.internal.http.*; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; +import com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration; +import com.oracle.bmc.util.CircuitBreakerUtils; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class SecurityAttributeClient implements SecurityAttribute { + /** + * Service instance for SecurityAttribute. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("SECURITYATTRIBUTE") + .serviceEndpointPrefix("") + .serviceEndpointTemplate( + "https://security-attribute.{region}.oci.{secondLevelDomain}") + .build(); + // attempt twice if it's instance principals, immediately failures will try to refresh the token + private static final int MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS = 2; + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SecurityAttributeClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final SecurityAttributeWaiters waiters; + + private final SecurityAttributePaginators paginators; + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + circuitBreakerConfiguration; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public SecurityAttributeClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public SecurityAttributeClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public SecurityAttributeClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public SecurityAttributeClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public SecurityAttributeClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public SecurityAttributeClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public SecurityAttributeClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + */ + public SecurityAttributeClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * Use the {@link Builder} to get access to all these parameters. + * + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + protected SecurityAttributeClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + this.restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + + this.clientConfigurationToUse = + (configuration != null) + ? configuration + : com.oracle.bmc.ClientConfiguration.builder().build(); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.retryConfiguration = clientConfigurationToUse.getRetryConfiguration(); + final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + userCircuitBreakerConfiguration = + CircuitBreakerUtils.getUserDefinedCircuitBreakerConfiguration( + configuration); + if (userCircuitBreakerConfiguration == null) { + this.circuitBreakerConfiguration = + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION; + } else { + this.circuitBreakerConfiguration = userCircuitBreakerConfiguration; + } + + this.refreshClient(); + + if (executorService == null) { + // up to 50 (core) threads, time out after 60s idle, all daemon + java.util.concurrent.ThreadPoolExecutor threadPoolExecutor = + new java.util.concurrent.ThreadPoolExecutor( + 50, + 50, + 60L, + java.util.concurrent.TimeUnit.SECONDS, + new java.util.concurrent.LinkedBlockingQueue(), + com.oracle.bmc.internal.ClientThreadFactory.builder() + .isDaemon(true) + .nameFormat("SecurityAttribute-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new SecurityAttributeWaiters(executorService, this); + + this.paginators = new SecurityAttributePaginators(this); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder { + private java.util.concurrent.ExecutorService executorService; + + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Set the ExecutorService for the client to be created. + * @param executorService executorService + * @return this builder + */ + public Builder executorService(java.util.concurrent.ExecutorService executorService) { + this.executorService = executorService; + return this; + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public SecurityAttributeClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new SecurityAttributeClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + restClientFactoryBuilder); + } + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, this.authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient, + null, + this.circuitBreakerConfiguration); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public BulkDeleteSecurityAttributesResponse bulkDeleteSecurityAttributes( + BulkDeleteSecurityAttributesRequest request) { + LOG.trace("Called bulkDeleteSecurityAttributes"); + final BulkDeleteSecurityAttributesRequest interceptedRequest = + BulkDeleteSecurityAttributesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + BulkDeleteSecurityAttributesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "BulkDeleteSecurityAttributes", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + BulkDeleteSecurityAttributesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getBulkDeleteSecurityAttributesDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public BulkEditSecurityAttributesResponse bulkEditSecurityAttributes( + BulkEditSecurityAttributesRequest request) { + LOG.trace("Called bulkEditSecurityAttributes"); + final BulkEditSecurityAttributesRequest interceptedRequest = + BulkEditSecurityAttributesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + BulkEditSecurityAttributesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "BulkEditSecurityAttributes", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + BulkEditSecurityAttributesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getBulkEditSecurityAttributeDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CascadingDeleteSecurityAttributeNamespaceResponse + cascadingDeleteSecurityAttributeNamespace( + CascadingDeleteSecurityAttributeNamespaceRequest request) { + LOG.trace("Called cascadingDeleteSecurityAttributeNamespace"); + final CascadingDeleteSecurityAttributeNamespaceRequest interceptedRequest = + CascadingDeleteSecurityAttributeNamespaceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CascadingDeleteSecurityAttributeNamespaceConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "CascadingDeleteSecurityAttributeNamespace", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, + CascadingDeleteSecurityAttributeNamespaceResponse> + transformer = + CascadingDeleteSecurityAttributeNamespaceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ChangeSecurityAttributeNamespaceCompartmentResponse + changeSecurityAttributeNamespaceCompartment( + ChangeSecurityAttributeNamespaceCompartmentRequest request) { + LOG.trace("Called changeSecurityAttributeNamespaceCompartment"); + final ChangeSecurityAttributeNamespaceCompartmentRequest interceptedRequest = + ChangeSecurityAttributeNamespaceCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeSecurityAttributeNamespaceCompartmentConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "ChangeSecurityAttributeNamespaceCompartment", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, + ChangeSecurityAttributeNamespaceCompartmentResponse> + transformer = + ChangeSecurityAttributeNamespaceCompartmentConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeSecurityAttributeNamespaceCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateSecurityAttributeResponse createSecurityAttribute( + CreateSecurityAttributeRequest request) { + LOG.trace("Called createSecurityAttribute"); + final CreateSecurityAttributeRequest interceptedRequest = + CreateSecurityAttributeConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateSecurityAttributeConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "CreateSecurityAttribute", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + CreateSecurityAttributeConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateSecurityAttributeDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateSecurityAttributeNamespaceResponse createSecurityAttributeNamespace( + CreateSecurityAttributeNamespaceRequest request) { + LOG.trace("Called createSecurityAttributeNamespace"); + final CreateSecurityAttributeNamespaceRequest interceptedRequest = + CreateSecurityAttributeNamespaceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateSecurityAttributeNamespaceConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "CreateSecurityAttributeNamespace", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, CreateSecurityAttributeNamespaceResponse> + transformer = + CreateSecurityAttributeNamespaceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getCreateSecurityAttributeNamespaceDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteSecurityAttributeResponse deleteSecurityAttribute( + DeleteSecurityAttributeRequest request) { + LOG.trace("Called deleteSecurityAttribute"); + final DeleteSecurityAttributeRequest interceptedRequest = + DeleteSecurityAttributeConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteSecurityAttributeConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "DeleteSecurityAttribute", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + DeleteSecurityAttributeConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteSecurityAttributeNamespaceResponse deleteSecurityAttributeNamespace( + DeleteSecurityAttributeNamespaceRequest request) { + LOG.trace("Called deleteSecurityAttributeNamespace"); + final DeleteSecurityAttributeNamespaceRequest interceptedRequest = + DeleteSecurityAttributeNamespaceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteSecurityAttributeNamespaceConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "DeleteSecurityAttributeNamespace", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, DeleteSecurityAttributeNamespaceResponse> + transformer = + DeleteSecurityAttributeNamespaceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetSecurityAttributeResponse getSecurityAttribute(GetSecurityAttributeRequest request) { + LOG.trace("Called getSecurityAttribute"); + final GetSecurityAttributeRequest interceptedRequest = + GetSecurityAttributeConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetSecurityAttributeConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "GetSecurityAttribute", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + GetSecurityAttributeConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetSecurityAttributeNamespaceResponse getSecurityAttributeNamespace( + GetSecurityAttributeNamespaceRequest request) { + LOG.trace("Called getSecurityAttributeNamespace"); + final GetSecurityAttributeNamespaceRequest interceptedRequest = + GetSecurityAttributeNamespaceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetSecurityAttributeNamespaceConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "GetSecurityAttributeNamespace", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, GetSecurityAttributeNamespaceResponse> + transformer = + GetSecurityAttributeNamespaceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetSecurityAttributeWorkRequestResponse getSecurityAttributeWorkRequest( + GetSecurityAttributeWorkRequestRequest request) { + LOG.trace("Called getSecurityAttributeWorkRequest"); + final GetSecurityAttributeWorkRequestRequest interceptedRequest = + GetSecurityAttributeWorkRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetSecurityAttributeWorkRequestConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "GetSecurityAttributeWorkRequest", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, GetSecurityAttributeWorkRequestResponse> + transformer = + GetSecurityAttributeWorkRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListSecurityAttributeNamespacesResponse listSecurityAttributeNamespaces( + ListSecurityAttributeNamespacesRequest request) { + LOG.trace("Called listSecurityAttributeNamespaces"); + final ListSecurityAttributeNamespacesRequest interceptedRequest = + ListSecurityAttributeNamespacesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSecurityAttributeNamespacesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "ListSecurityAttributeNamespaces", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, ListSecurityAttributeNamespacesResponse> + transformer = + ListSecurityAttributeNamespacesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListSecurityAttributeWorkRequestErrorsResponse listSecurityAttributeWorkRequestErrors( + ListSecurityAttributeWorkRequestErrorsRequest request) { + LOG.trace("Called listSecurityAttributeWorkRequestErrors"); + final ListSecurityAttributeWorkRequestErrorsRequest interceptedRequest = + ListSecurityAttributeWorkRequestErrorsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSecurityAttributeWorkRequestErrorsConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "ListSecurityAttributeWorkRequestErrors", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, ListSecurityAttributeWorkRequestErrorsResponse> + transformer = + ListSecurityAttributeWorkRequestErrorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListSecurityAttributeWorkRequestLogsResponse listSecurityAttributeWorkRequestLogs( + ListSecurityAttributeWorkRequestLogsRequest request) { + LOG.trace("Called listSecurityAttributeWorkRequestLogs"); + final ListSecurityAttributeWorkRequestLogsRequest interceptedRequest = + ListSecurityAttributeWorkRequestLogsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSecurityAttributeWorkRequestLogsConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "ListSecurityAttributeWorkRequestLogs", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, ListSecurityAttributeWorkRequestLogsResponse> + transformer = + ListSecurityAttributeWorkRequestLogsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListSecurityAttributeWorkRequestsResponse listSecurityAttributeWorkRequests( + ListSecurityAttributeWorkRequestsRequest request) { + LOG.trace("Called listSecurityAttributeWorkRequests"); + final ListSecurityAttributeWorkRequestsRequest interceptedRequest = + ListSecurityAttributeWorkRequestsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSecurityAttributeWorkRequestsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "ListSecurityAttributeWorkRequests", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, ListSecurityAttributeWorkRequestsResponse> + transformer = + ListSecurityAttributeWorkRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListSecurityAttributesResponse listSecurityAttributes( + ListSecurityAttributesRequest request) { + LOG.trace("Called listSecurityAttributes"); + final ListSecurityAttributesRequest interceptedRequest = + ListSecurityAttributesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListSecurityAttributesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "ListSecurityAttributes", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + ListSecurityAttributesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateSecurityAttributeResponse updateSecurityAttribute( + UpdateSecurityAttributeRequest request) { + LOG.trace("Called updateSecurityAttribute"); + final UpdateSecurityAttributeRequest interceptedRequest = + UpdateSecurityAttributeConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateSecurityAttributeConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "UpdateSecurityAttribute", + ib.getRequestUri().toString(), + ""); + java.util.function.Function + transformer = + UpdateSecurityAttributeConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateSecurityAttributeDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateSecurityAttributeNamespaceResponse updateSecurityAttributeNamespace( + UpdateSecurityAttributeNamespaceRequest request) { + LOG.trace("Called updateSecurityAttributeNamespace"); + final UpdateSecurityAttributeNamespaceRequest interceptedRequest = + UpdateSecurityAttributeNamespaceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateSecurityAttributeNamespaceConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "SecurityAttribute", + "UpdateSecurityAttributeNamespace", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, UpdateSecurityAttributeNamespaceResponse> + transformer = + UpdateSecurityAttributeNamespaceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest + .getUpdateSecurityAttributeNamespaceDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public SecurityAttributeWaiters getWaiters() { + return waiters; + } + + @Override + public SecurityAttributePaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributePaginators.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributePaginators.java new file mode 100644 index 00000000000..5d587f0d8cf --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributePaginators.java @@ -0,0 +1,669 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute; + +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of SecurityAttribute where multiple pages of data may be fetched. + * Two styles of iteration are supported: + * + *

    + *
  • Iterating over the Response objects returned by the list operation. These are referred to as ResponseIterators, and the methods are suffixed with ResponseIterator. For example: listUsersResponseIterator
  • + *
  • Iterating over the resources/records being listed. These are referred to as RecordIterators, and the methods are suffixed with RecordIterator. For example: listUsersRecordIterator
  • + *
+ * + * These iterables abstract away the need to write code to manually handle pagination via looping and using the page tokens. + * They will automatically fetch more data from the service when required. + * + * As an example, if we were using the ListUsers operation in IdentityService, then the {@link java.lang.Iterable} returned by calling a + * ResponseIterator method would iterate over the ListUsersResponse objects returned by each ListUsers call, whereas the {@link java.lang.Iterable} + * returned by calling a RecordIterator method would iterate over the User records and we don't have to deal with ListUsersResponse objects at all. + * In either case, pagination will be automatically handled so we can iterate until there are no more responses or no more resources/records available. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class SecurityAttributePaginators { + private final SecurityAttribute client; + + public SecurityAttributePaginators(SecurityAttribute client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listSecurityAttributeNamespaces operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listSecurityAttributeNamespacesResponseIterator( + final ListSecurityAttributeNamespacesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListSecurityAttributeNamespacesRequest.Builder, + ListSecurityAttributeNamespacesRequest, ListSecurityAttributeNamespacesResponse>( + new java.util.function.Supplier() { + @Override + public ListSecurityAttributeNamespacesRequest.Builder get() { + return ListSecurityAttributeNamespacesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListSecurityAttributeNamespacesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeNamespacesRequest.Builder>, + ListSecurityAttributeNamespacesRequest>() { + @Override + public ListSecurityAttributeNamespacesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeNamespacesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSecurityAttributeNamespacesRequest, + ListSecurityAttributeNamespacesResponse>() { + @Override + public ListSecurityAttributeNamespacesResponse apply( + ListSecurityAttributeNamespacesRequest request) { + return client.listSecurityAttributeNamespaces(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.securityattribute.model.SecurityAttributeNamespaceSummary} objects + * contained in responses from the listSecurityAttributeNamespaces operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.securityattribute.model.SecurityAttributeNamespaceSummary} objects + * contained in responses received from the service. + */ + public Iterable + listSecurityAttributeNamespacesRecordIterator( + final ListSecurityAttributeNamespacesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListSecurityAttributeNamespacesRequest.Builder, + ListSecurityAttributeNamespacesRequest, ListSecurityAttributeNamespacesResponse, + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespaceSummary>( + new java.util.function.Supplier() { + @Override + public ListSecurityAttributeNamespacesRequest.Builder get() { + return ListSecurityAttributeNamespacesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListSecurityAttributeNamespacesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeNamespacesRequest.Builder>, + ListSecurityAttributeNamespacesRequest>() { + @Override + public ListSecurityAttributeNamespacesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeNamespacesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSecurityAttributeNamespacesRequest, + ListSecurityAttributeNamespacesResponse>() { + @Override + public ListSecurityAttributeNamespacesResponse apply( + ListSecurityAttributeNamespacesRequest request) { + return client.listSecurityAttributeNamespaces(request); + } + }, + new java.util.function.Function< + ListSecurityAttributeNamespacesResponse, + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeNamespaceSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeNamespaceSummary> + apply(ListSecurityAttributeNamespacesResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listSecurityAttributeWorkRequestErrors operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listSecurityAttributeWorkRequestErrorsResponseIterator( + final ListSecurityAttributeWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListSecurityAttributeWorkRequestErrorsRequest.Builder, + ListSecurityAttributeWorkRequestErrorsRequest, + ListSecurityAttributeWorkRequestErrorsResponse>( + new java.util.function.Supplier< + ListSecurityAttributeWorkRequestErrorsRequest.Builder>() { + @Override + public ListSecurityAttributeWorkRequestErrorsRequest.Builder get() { + return ListSecurityAttributeWorkRequestErrorsRequest.builder() + .copy(request); + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestErrorsResponse, String>() { + @Override + public String apply(ListSecurityAttributeWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestErrorsRequest.Builder>, + ListSecurityAttributeWorkRequestErrorsRequest>() { + @Override + public ListSecurityAttributeWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestErrorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestErrorsRequest, + ListSecurityAttributeWorkRequestErrorsResponse>() { + @Override + public ListSecurityAttributeWorkRequestErrorsResponse apply( + ListSecurityAttributeWorkRequestErrorsRequest request) { + return client.listSecurityAttributeWorkRequestErrors(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestErrorSummary} objects + * contained in responses from the listSecurityAttributeWorkRequestErrors operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestErrorSummary} objects + * contained in responses received from the service. + */ + public Iterable + listSecurityAttributeWorkRequestErrorsRecordIterator( + final ListSecurityAttributeWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListSecurityAttributeWorkRequestErrorsRequest.Builder, + ListSecurityAttributeWorkRequestErrorsRequest, + ListSecurityAttributeWorkRequestErrorsResponse, + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestErrorSummary>( + new java.util.function.Supplier< + ListSecurityAttributeWorkRequestErrorsRequest.Builder>() { + @Override + public ListSecurityAttributeWorkRequestErrorsRequest.Builder get() { + return ListSecurityAttributeWorkRequestErrorsRequest.builder() + .copy(request); + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestErrorsResponse, String>() { + @Override + public String apply(ListSecurityAttributeWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestErrorsRequest.Builder>, + ListSecurityAttributeWorkRequestErrorsRequest>() { + @Override + public ListSecurityAttributeWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestErrorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestErrorsRequest, + ListSecurityAttributeWorkRequestErrorsResponse>() { + @Override + public ListSecurityAttributeWorkRequestErrorsResponse apply( + ListSecurityAttributeWorkRequestErrorsRequest request) { + return client.listSecurityAttributeWorkRequestErrors(request); + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestErrorsResponse, + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestErrorSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestErrorSummary> + apply(ListSecurityAttributeWorkRequestErrorsResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listSecurityAttributeWorkRequestLogs operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listSecurityAttributeWorkRequestLogsResponseIterator( + final ListSecurityAttributeWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListSecurityAttributeWorkRequestLogsRequest.Builder, + ListSecurityAttributeWorkRequestLogsRequest, + ListSecurityAttributeWorkRequestLogsResponse>( + new java.util.function.Supplier< + ListSecurityAttributeWorkRequestLogsRequest.Builder>() { + @Override + public ListSecurityAttributeWorkRequestLogsRequest.Builder get() { + return ListSecurityAttributeWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestLogsResponse, String>() { + @Override + public String apply(ListSecurityAttributeWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestLogsRequest.Builder>, + ListSecurityAttributeWorkRequestLogsRequest>() { + @Override + public ListSecurityAttributeWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestLogsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestLogsRequest, + ListSecurityAttributeWorkRequestLogsResponse>() { + @Override + public ListSecurityAttributeWorkRequestLogsResponse apply( + ListSecurityAttributeWorkRequestLogsRequest request) { + return client.listSecurityAttributeWorkRequestLogs(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestLogSummary} objects + * contained in responses from the listSecurityAttributeWorkRequestLogs operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestLogSummary} objects + * contained in responses received from the service. + */ + public Iterable + listSecurityAttributeWorkRequestLogsRecordIterator( + final ListSecurityAttributeWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListSecurityAttributeWorkRequestLogsRequest.Builder, + ListSecurityAttributeWorkRequestLogsRequest, + ListSecurityAttributeWorkRequestLogsResponse, + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestLogSummary>( + new java.util.function.Supplier< + ListSecurityAttributeWorkRequestLogsRequest.Builder>() { + @Override + public ListSecurityAttributeWorkRequestLogsRequest.Builder get() { + return ListSecurityAttributeWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestLogsResponse, String>() { + @Override + public String apply(ListSecurityAttributeWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestLogsRequest.Builder>, + ListSecurityAttributeWorkRequestLogsRequest>() { + @Override + public ListSecurityAttributeWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestLogsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestLogsRequest, + ListSecurityAttributeWorkRequestLogsResponse>() { + @Override + public ListSecurityAttributeWorkRequestLogsResponse apply( + ListSecurityAttributeWorkRequestLogsRequest request) { + return client.listSecurityAttributeWorkRequestLogs(request); + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestLogsResponse, + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestLogSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestLogSummary> + apply(ListSecurityAttributeWorkRequestLogsResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listSecurityAttributeWorkRequests operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listSecurityAttributeWorkRequestsResponseIterator( + final ListSecurityAttributeWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListSecurityAttributeWorkRequestsRequest.Builder, + ListSecurityAttributeWorkRequestsRequest, + ListSecurityAttributeWorkRequestsResponse>( + new java.util.function.Supplier< + ListSecurityAttributeWorkRequestsRequest.Builder>() { + @Override + public ListSecurityAttributeWorkRequestsRequest.Builder get() { + return ListSecurityAttributeWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestsResponse, String>() { + @Override + public String apply(ListSecurityAttributeWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestsRequest.Builder>, + ListSecurityAttributeWorkRequestsRequest>() { + @Override + public ListSecurityAttributeWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestsRequest, + ListSecurityAttributeWorkRequestsResponse>() { + @Override + public ListSecurityAttributeWorkRequestsResponse apply( + ListSecurityAttributeWorkRequestsRequest request) { + return client.listSecurityAttributeWorkRequests(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary} objects + * contained in responses from the listSecurityAttributeWorkRequests operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary} objects + * contained in responses received from the service. + */ + public Iterable + listSecurityAttributeWorkRequestsRecordIterator( + final ListSecurityAttributeWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListSecurityAttributeWorkRequestsRequest.Builder, + ListSecurityAttributeWorkRequestsRequest, ListSecurityAttributeWorkRequestsResponse, + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary>( + new java.util.function.Supplier< + ListSecurityAttributeWorkRequestsRequest.Builder>() { + @Override + public ListSecurityAttributeWorkRequestsRequest.Builder get() { + return ListSecurityAttributeWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestsResponse, String>() { + @Override + public String apply(ListSecurityAttributeWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestsRequest.Builder>, + ListSecurityAttributeWorkRequestsRequest>() { + @Override + public ListSecurityAttributeWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestsRequest, + ListSecurityAttributeWorkRequestsResponse>() { + @Override + public ListSecurityAttributeWorkRequestsResponse apply( + ListSecurityAttributeWorkRequestsRequest request) { + return client.listSecurityAttributeWorkRequests(request); + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestsResponse, + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestSummary> + apply(ListSecurityAttributeWorkRequestsResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listSecurityAttributes operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listSecurityAttributesResponseIterator( + final ListSecurityAttributesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListSecurityAttributesRequest.Builder, ListSecurityAttributesRequest, + ListSecurityAttributesResponse>( + new java.util.function.Supplier() { + @Override + public ListSecurityAttributesRequest.Builder get() { + return ListSecurityAttributesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListSecurityAttributesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributesRequest.Builder>, + ListSecurityAttributesRequest>() { + @Override + public ListSecurityAttributesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSecurityAttributesRequest, ListSecurityAttributesResponse>() { + @Override + public ListSecurityAttributesResponse apply( + ListSecurityAttributesRequest request) { + return client.listSecurityAttributes(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.securityattribute.model.SecurityAttributeSummary} objects + * contained in responses from the listSecurityAttributes operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.securityattribute.model.SecurityAttributeSummary} objects + * contained in responses received from the service. + */ + public Iterable + listSecurityAttributesRecordIterator(final ListSecurityAttributesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListSecurityAttributesRequest.Builder, ListSecurityAttributesRequest, + ListSecurityAttributesResponse, + com.oracle.bmc.securityattribute.model.SecurityAttributeSummary>( + new java.util.function.Supplier() { + @Override + public ListSecurityAttributesRequest.Builder get() { + return ListSecurityAttributesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListSecurityAttributesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributesRequest.Builder>, + ListSecurityAttributesRequest>() { + @Override + public ListSecurityAttributesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSecurityAttributesRequest, ListSecurityAttributesResponse>() { + @Override + public ListSecurityAttributesResponse apply( + ListSecurityAttributesRequest request) { + return client.listSecurityAttributes(request); + } + }, + new java.util.function.Function< + ListSecurityAttributesResponse, + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.securityattribute.model.SecurityAttributeSummary> + apply(ListSecurityAttributesResponse response) { + return response.getItems(); + } + }); + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeWaiters.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeWaiters.java new file mode 100644 index 00000000000..7bfd698866f --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeWaiters.java @@ -0,0 +1,317 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute; + +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of SecurityAttribute. + *

+ * The default configuration used is defined by {@link com.oracle.bmc.waiter.Waiters.Waiters#DEFAULT_POLLING_WAITER}. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class SecurityAttributeWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final SecurityAttribute client; + + public SecurityAttributeWaiters( + java.util.concurrent.ExecutorService executorService, SecurityAttribute client) { + this.executorService = executorService; + this.client = client; + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forSecurityAttribute( + GetSecurityAttributeRequest request, + com.oracle.bmc.securityattribute.model.SecurityAttribute.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forSecurityAttribute( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forSecurityAttribute( + GetSecurityAttributeRequest request, + com.oracle.bmc.securityattribute.model.SecurityAttribute.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forSecurityAttribute( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forSecurityAttribute( + GetSecurityAttributeRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.securityattribute.model.SecurityAttribute.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forSecurityAttribute( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for SecurityAttribute. + private com.oracle.bmc.waiter.Waiter + forSecurityAttribute( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetSecurityAttributeRequest request, + final com.oracle.bmc.securityattribute.model.SecurityAttribute.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetSecurityAttributeRequest, GetSecurityAttributeResponse>() { + @Override + public GetSecurityAttributeResponse apply( + GetSecurityAttributeRequest request) { + return client.getSecurityAttribute(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetSecurityAttributeResponse response) { + return targetStatesSet.contains( + response.getSecurityAttribute().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.securityattribute.model.SecurityAttribute + .LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetSecurityAttributeNamespaceRequest, GetSecurityAttributeNamespaceResponse> + forSecurityAttributeNamespace( + GetSecurityAttributeNamespaceRequest request, + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + .LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forSecurityAttributeNamespace( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetSecurityAttributeNamespaceRequest, GetSecurityAttributeNamespaceResponse> + forSecurityAttributeNamespace( + GetSecurityAttributeNamespaceRequest request, + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forSecurityAttributeNamespace( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetSecurityAttributeNamespaceRequest, GetSecurityAttributeNamespaceResponse> + forSecurityAttributeNamespace( + GetSecurityAttributeNamespaceRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + .LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forSecurityAttributeNamespace( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for SecurityAttributeNamespace. + private com.oracle.bmc.waiter.Waiter< + GetSecurityAttributeNamespaceRequest, GetSecurityAttributeNamespaceResponse> + forSecurityAttributeNamespace( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetSecurityAttributeNamespaceRequest request, + final com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + .LifecycleState... + targetStates) { + final java.util.Set< + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + .LifecycleState> + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetSecurityAttributeNamespaceRequest, + GetSecurityAttributeNamespaceResponse>() { + @Override + public GetSecurityAttributeNamespaceResponse apply( + GetSecurityAttributeNamespaceRequest request) { + return client.getSecurityAttributeNamespace(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetSecurityAttributeNamespaceResponse response) { + return targetStatesSet.contains( + response.getSecurityAttributeNamespace() + .getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + .LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using default configuration. + * + * @param request the request to send + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetSecurityAttributeWorkRequestRequest, GetSecurityAttributeWorkRequestResponse> + forSecurityAttributeWorkRequest(GetSecurityAttributeWorkRequestRequest request) { + return forSecurityAttributeWorkRequest( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@linkcom.oracle.bmc.waiter. DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetSecurityAttributeWorkRequestRequest, GetSecurityAttributeWorkRequestResponse> + forSecurityAttributeWorkRequest( + GetSecurityAttributeWorkRequestRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + return forSecurityAttributeWorkRequest( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request); + } + + // Helper method to create a new Waiter for SecurityAttributeWorkRequest. + private com.oracle.bmc.waiter.Waiter< + GetSecurityAttributeWorkRequestRequest, GetSecurityAttributeWorkRequestResponse> + forSecurityAttributeWorkRequest( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetSecurityAttributeWorkRequestRequest request) { + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetSecurityAttributeWorkRequestRequest, + GetSecurityAttributeWorkRequestResponse>() { + @Override + public GetSecurityAttributeWorkRequestResponse apply( + GetSecurityAttributeWorkRequestRequest request) { + return client.getSecurityAttributeWorkRequest(request); + } + }, + new java.util.function.Predicate< + GetSecurityAttributeWorkRequestResponse>() { + @Override + public boolean test(GetSecurityAttributeWorkRequestResponse response) { + // work requests are complete once the time finished is available + return response.getSecurityAttributeWorkRequest().getTimeFinished() + != null; + } + }, + false), + request); + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/BulkDeleteSecurityAttributesConverter.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/BulkDeleteSecurityAttributesConverter.java new file mode 100644 index 00000000000..67170a5cd38 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/BulkDeleteSecurityAttributesConverter.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.securityattribute.model.*; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class BulkDeleteSecurityAttributesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(BulkDeleteSecurityAttributesConverter.class); + + public static com.oracle.bmc.securityattribute.requests.BulkDeleteSecurityAttributesRequest + interceptRequest( + com.oracle.bmc.securityattribute.requests.BulkDeleteSecurityAttributesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.securityattribute.requests.BulkDeleteSecurityAttributesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getBulkDeleteSecurityAttributesDetails(), + "bulkDeleteSecurityAttributesDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240815") + .path("securityAttributes") + .path("actions") + .path("bulkDelete"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses.BulkDeleteSecurityAttributesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses.BulkDeleteSecurityAttributesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .BulkDeleteSecurityAttributesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .BulkDeleteSecurityAttributesResponse>() { + @Override + public com.oracle.bmc.securityattribute.responses + .BulkDeleteSecurityAttributesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.securityattribute.responses.BulkDeleteSecurityAttributesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.securityattribute.responses + .BulkDeleteSecurityAttributesResponse.Builder + builder = + com.oracle.bmc.securityattribute.responses + .BulkDeleteSecurityAttributesResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.securityattribute.responses + .BulkDeleteSecurityAttributesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/BulkEditSecurityAttributesConverter.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/BulkEditSecurityAttributesConverter.java new file mode 100644 index 00000000000..d7517d2311b --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/BulkEditSecurityAttributesConverter.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.securityattribute.model.*; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class BulkEditSecurityAttributesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(BulkEditSecurityAttributesConverter.class); + + public static com.oracle.bmc.securityattribute.requests.BulkEditSecurityAttributesRequest + interceptRequest( + com.oracle.bmc.securityattribute.requests.BulkEditSecurityAttributesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.securityattribute.requests.BulkEditSecurityAttributesRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240815") + .path("securityAttributes") + .path("actions") + .path("bulkEdit"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses.BulkEditSecurityAttributesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses.BulkEditSecurityAttributesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .BulkEditSecurityAttributesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .BulkEditSecurityAttributesResponse>() { + @Override + public com.oracle.bmc.securityattribute.responses + .BulkEditSecurityAttributesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.securityattribute.responses.BulkEditSecurityAttributesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.securityattribute.responses + .BulkEditSecurityAttributesResponse.Builder + builder = + com.oracle.bmc.securityattribute.responses + .BulkEditSecurityAttributesResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.securityattribute.responses + .BulkEditSecurityAttributesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/CascadingDeleteSecurityAttributeNamespaceConverter.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/CascadingDeleteSecurityAttributeNamespaceConverter.java new file mode 100644 index 00000000000..5a6c211193e --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/CascadingDeleteSecurityAttributeNamespaceConverter.java @@ -0,0 +1,162 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.securityattribute.model.*; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class CascadingDeleteSecurityAttributeNamespaceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + CascadingDeleteSecurityAttributeNamespaceConverter.class); + + public static com.oracle.bmc.securityattribute.requests + .CascadingDeleteSecurityAttributeNamespaceRequest + interceptRequest( + com.oracle.bmc.securityattribute.requests + .CascadingDeleteSecurityAttributeNamespaceRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.securityattribute.requests + .CascadingDeleteSecurityAttributeNamespaceRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240815") + .path("securityAttributeNamespaces") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSecurityAttributeNamespaceId())) + .path("actions") + .path("cascadeDelete"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .CascadingDeleteSecurityAttributeNamespaceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .CascadingDeleteSecurityAttributeNamespaceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .CascadingDeleteSecurityAttributeNamespaceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .CascadingDeleteSecurityAttributeNamespaceResponse>() { + @Override + public com.oracle.bmc.securityattribute.responses + .CascadingDeleteSecurityAttributeNamespaceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.securityattribute.responses.CascadingDeleteSecurityAttributeNamespaceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.securityattribute.responses + .CascadingDeleteSecurityAttributeNamespaceResponse + .Builder + builder = + com.oracle.bmc.securityattribute.responses + .CascadingDeleteSecurityAttributeNamespaceResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.securityattribute.responses + .CascadingDeleteSecurityAttributeNamespaceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/ChangeSecurityAttributeNamespaceCompartmentConverter.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/ChangeSecurityAttributeNamespaceCompartmentConverter.java new file mode 100644 index 00000000000..4c4cc94f374 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/ChangeSecurityAttributeNamespaceCompartmentConverter.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.securityattribute.model.*; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ChangeSecurityAttributeNamespaceCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ChangeSecurityAttributeNamespaceCompartmentConverter.class); + + public static com.oracle.bmc.securityattribute.requests + .ChangeSecurityAttributeNamespaceCompartmentRequest + interceptRequest( + com.oracle.bmc.securityattribute.requests + .ChangeSecurityAttributeNamespaceCompartmentRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.securityattribute.requests + .ChangeSecurityAttributeNamespaceCompartmentRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + Validate.notNull( + request.getChangeSecurityAttributeNamespaceCompartmentDetails(), + "changeSecurityAttributeNamespaceCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240815") + .path("securityAttributeNamespaces") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSecurityAttributeNamespaceId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ChangeSecurityAttributeNamespaceCompartmentResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ChangeSecurityAttributeNamespaceCompartmentResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ChangeSecurityAttributeNamespaceCompartmentResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ChangeSecurityAttributeNamespaceCompartmentResponse>() { + @Override + public com.oracle.bmc.securityattribute.responses + .ChangeSecurityAttributeNamespaceCompartmentResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.securityattribute.responses.ChangeSecurityAttributeNamespaceCompartmentResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.securityattribute.responses + .ChangeSecurityAttributeNamespaceCompartmentResponse + .Builder + builder = + com.oracle.bmc.securityattribute.responses + .ChangeSecurityAttributeNamespaceCompartmentResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.securityattribute.responses + .ChangeSecurityAttributeNamespaceCompartmentResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/CreateSecurityAttributeConverter.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/CreateSecurityAttributeConverter.java new file mode 100644 index 00000000000..a1148836aef --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/CreateSecurityAttributeConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.securityattribute.model.*; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class CreateSecurityAttributeConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateSecurityAttributeConverter.class); + + public static com.oracle.bmc.securityattribute.requests.CreateSecurityAttributeRequest + interceptRequest( + com.oracle.bmc.securityattribute.requests.CreateSecurityAttributeRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.securityattribute.requests.CreateSecurityAttributeRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + Validate.notNull( + request.getCreateSecurityAttributeDetails(), + "createSecurityAttributeDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240815") + .path("securityAttributeNamespaces") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSecurityAttributeNamespaceId())) + .path("securityAttributes"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses.CreateSecurityAttributeResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses.CreateSecurityAttributeResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses.CreateSecurityAttributeResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .CreateSecurityAttributeResponse>() { + @Override + public com.oracle.bmc.securityattribute.responses + .CreateSecurityAttributeResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.securityattribute.responses.CreateSecurityAttributeResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.securityattribute.model + .SecurityAttribute>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.securityattribute.model + .SecurityAttribute + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.securityattribute.model + .SecurityAttribute + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.securityattribute.model + .SecurityAttribute> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.securityattribute.responses + .CreateSecurityAttributeResponse.Builder + builder = + com.oracle.bmc.securityattribute.responses + .CreateSecurityAttributeResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.securityAttribute(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.securityattribute.responses + .CreateSecurityAttributeResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/CreateSecurityAttributeNamespaceConverter.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/CreateSecurityAttributeNamespaceConverter.java new file mode 100644 index 00000000000..b38086dfb1b --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/CreateSecurityAttributeNamespaceConverter.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.securityattribute.model.*; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class CreateSecurityAttributeNamespaceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateSecurityAttributeNamespaceConverter.class); + + public static com.oracle.bmc.securityattribute.requests.CreateSecurityAttributeNamespaceRequest + interceptRequest( + com.oracle.bmc.securityattribute.requests + .CreateSecurityAttributeNamespaceRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.securityattribute.requests.CreateSecurityAttributeNamespaceRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateSecurityAttributeNamespaceDetails(), + "createSecurityAttributeNamespaceDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240815").path("securityAttributeNamespaces"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .CreateSecurityAttributeNamespaceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .CreateSecurityAttributeNamespaceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .CreateSecurityAttributeNamespaceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .CreateSecurityAttributeNamespaceResponse>() { + @Override + public com.oracle.bmc.securityattribute.responses + .CreateSecurityAttributeNamespaceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.securityattribute.responses.CreateSecurityAttributeNamespaceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.securityattribute.model + .SecurityAttributeNamespace>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.securityattribute.model + .SecurityAttributeNamespace + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.securityattribute.model + .SecurityAttributeNamespace + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.securityattribute.model + .SecurityAttributeNamespace> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.securityattribute.responses + .CreateSecurityAttributeNamespaceResponse.Builder + builder = + com.oracle.bmc.securityattribute.responses + .CreateSecurityAttributeNamespaceResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.securityAttributeNamespace(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.securityattribute.responses + .CreateSecurityAttributeNamespaceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/DeleteSecurityAttributeConverter.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/DeleteSecurityAttributeConverter.java new file mode 100644 index 00000000000..9308c958475 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/DeleteSecurityAttributeConverter.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.securityattribute.model.*; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class DeleteSecurityAttributeConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteSecurityAttributeConverter.class); + + public static com.oracle.bmc.securityattribute.requests.DeleteSecurityAttributeRequest + interceptRequest( + com.oracle.bmc.securityattribute.requests.DeleteSecurityAttributeRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.securityattribute.requests.DeleteSecurityAttributeRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + Validate.notBlank( + request.getSecurityAttributeName(), "securityAttributeName must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240815") + .path("securityAttributeNamespaces") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSecurityAttributeNamespaceId())) + .path("securityAttributes") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSecurityAttributeName())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses.DeleteSecurityAttributeResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses.DeleteSecurityAttributeResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses.DeleteSecurityAttributeResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .DeleteSecurityAttributeResponse>() { + @Override + public com.oracle.bmc.securityattribute.responses + .DeleteSecurityAttributeResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.securityattribute.responses.DeleteSecurityAttributeResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.securityattribute.responses + .DeleteSecurityAttributeResponse.Builder + builder = + com.oracle.bmc.securityattribute.responses + .DeleteSecurityAttributeResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.securityattribute.responses + .DeleteSecurityAttributeResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/DeleteSecurityAttributeNamespaceConverter.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/DeleteSecurityAttributeNamespaceConverter.java new file mode 100644 index 00000000000..7b7fafb2b89 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/DeleteSecurityAttributeNamespaceConverter.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.securityattribute.model.*; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class DeleteSecurityAttributeNamespaceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteSecurityAttributeNamespaceConverter.class); + + public static com.oracle.bmc.securityattribute.requests.DeleteSecurityAttributeNamespaceRequest + interceptRequest( + com.oracle.bmc.securityattribute.requests + .DeleteSecurityAttributeNamespaceRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.securityattribute.requests.DeleteSecurityAttributeNamespaceRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240815") + .path("securityAttributeNamespaces") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSecurityAttributeNamespaceId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .DeleteSecurityAttributeNamespaceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .DeleteSecurityAttributeNamespaceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .DeleteSecurityAttributeNamespaceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .DeleteSecurityAttributeNamespaceResponse>() { + @Override + public com.oracle.bmc.securityattribute.responses + .DeleteSecurityAttributeNamespaceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.securityattribute.responses.DeleteSecurityAttributeNamespaceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.securityattribute.responses + .DeleteSecurityAttributeNamespaceResponse.Builder + builder = + com.oracle.bmc.securityattribute.responses + .DeleteSecurityAttributeNamespaceResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.securityattribute.responses + .DeleteSecurityAttributeNamespaceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/GetSecurityAttributeConverter.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/GetSecurityAttributeConverter.java new file mode 100644 index 00000000000..822844cd4f4 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/GetSecurityAttributeConverter.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.securityattribute.model.*; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class GetSecurityAttributeConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetSecurityAttributeConverter.class); + + public static com.oracle.bmc.securityattribute.requests.GetSecurityAttributeRequest + interceptRequest( + com.oracle.bmc.securityattribute.requests.GetSecurityAttributeRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.securityattribute.requests.GetSecurityAttributeRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + Validate.notBlank( + request.getSecurityAttributeName(), "securityAttributeName must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240815") + .path("securityAttributeNamespaces") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSecurityAttributeNamespaceId())) + .path("securityAttributes") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSecurityAttributeName())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses.GetSecurityAttributeResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses.GetSecurityAttributeResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses.GetSecurityAttributeResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeResponse>() { + @Override + public com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.securityattribute.responses.GetSecurityAttributeResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.securityattribute.model + .SecurityAttribute>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.securityattribute.model + .SecurityAttribute + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.securityattribute.model + .SecurityAttribute + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.securityattribute.model + .SecurityAttribute> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeResponse.Builder + builder = + com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.securityAttribute(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/GetSecurityAttributeNamespaceConverter.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/GetSecurityAttributeNamespaceConverter.java new file mode 100644 index 00000000000..6d7c8a38533 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/GetSecurityAttributeNamespaceConverter.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.securityattribute.model.*; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class GetSecurityAttributeNamespaceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetSecurityAttributeNamespaceConverter.class); + + public static com.oracle.bmc.securityattribute.requests.GetSecurityAttributeNamespaceRequest + interceptRequest( + com.oracle.bmc.securityattribute.requests.GetSecurityAttributeNamespaceRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.securityattribute.requests.GetSecurityAttributeNamespaceRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240815") + .path("securityAttributeNamespaces") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSecurityAttributeNamespaceId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeNamespaceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeNamespaceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeNamespaceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeNamespaceResponse>() { + @Override + public com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeNamespaceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.securityattribute.responses.GetSecurityAttributeNamespaceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.securityattribute.model + .SecurityAttributeNamespace>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.securityattribute.model + .SecurityAttributeNamespace + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.securityattribute.model + .SecurityAttributeNamespace + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.securityattribute.model + .SecurityAttributeNamespace> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeNamespaceResponse.Builder + builder = + com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeNamespaceResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.securityAttributeNamespace(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeNamespaceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/GetSecurityAttributeWorkRequestConverter.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/GetSecurityAttributeWorkRequestConverter.java new file mode 100644 index 00000000000..b5bea969cfa --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/GetSecurityAttributeWorkRequestConverter.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.securityattribute.model.*; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class GetSecurityAttributeWorkRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetSecurityAttributeWorkRequestConverter.class); + + public static com.oracle.bmc.securityattribute.requests.GetSecurityAttributeWorkRequestRequest + interceptRequest( + com.oracle.bmc.securityattribute.requests.GetSecurityAttributeWorkRequestRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.securityattribute.requests.GetSecurityAttributeWorkRequestRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240815") + .path("securityAttributeWorkRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeWorkRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeWorkRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeWorkRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeWorkRequestResponse>() { + @Override + public com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeWorkRequestResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.securityattribute.responses.GetSecurityAttributeWorkRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequest>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequest + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequest + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequest> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeWorkRequestResponse.Builder + builder = + com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeWorkRequestResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.securityAttributeWorkRequest(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> retryAfterHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "retry-after"); + if (retryAfterHeader.isPresent()) { + builder.retryAfter( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "retry-after", + retryAfterHeader.get().get(0), + Float.class)); + } + + com.oracle.bmc.securityattribute.responses + .GetSecurityAttributeWorkRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/ListSecurityAttributeNamespacesConverter.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/ListSecurityAttributeNamespacesConverter.java new file mode 100644 index 00000000000..0971a4585c4 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/ListSecurityAttributeNamespacesConverter.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.securityattribute.model.*; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributeNamespacesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListSecurityAttributeNamespacesConverter.class); + + public static com.oracle.bmc.securityattribute.requests.ListSecurityAttributeNamespacesRequest + interceptRequest( + com.oracle.bmc.securityattribute.requests.ListSecurityAttributeNamespacesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.securityattribute.requests.ListSecurityAttributeNamespacesRequest + request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240815").path("securityAttributeNamespaces"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getName() != null) { + target = + target.queryParam( + "name", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getName())); + } + + if (request.getCompartmentIdInSubtree() != null) { + target = + target.queryParam( + "compartmentIdInSubtree", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentIdInSubtree())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeNamespacesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeNamespacesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeNamespacesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeNamespacesResponse>() { + @Override + public com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeNamespacesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.securityattribute.responses.ListSecurityAttributeNamespacesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.securityattribute + .model + .SecurityAttributeNamespaceSummary>>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.securityattribute + .model + .SecurityAttributeNamespaceSummary>>() {}, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.securityattribute + .model + .SecurityAttributeNamespaceSummary>>() {}); + } + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeNamespaceSummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeNamespacesResponse.Builder + builder = + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeNamespacesResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.items(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeNamespacesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/ListSecurityAttributeWorkRequestErrorsConverter.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/ListSecurityAttributeWorkRequestErrorsConverter.java new file mode 100644 index 00000000000..c7ca3b54881 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/ListSecurityAttributeWorkRequestErrorsConverter.java @@ -0,0 +1,197 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.securityattribute.model.*; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributeWorkRequestErrorsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger( + ListSecurityAttributeWorkRequestErrorsConverter.class); + + public static com.oracle.bmc.securityattribute.requests + .ListSecurityAttributeWorkRequestErrorsRequest + interceptRequest( + com.oracle.bmc.securityattribute.requests + .ListSecurityAttributeWorkRequestErrorsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.securityattribute.requests.ListSecurityAttributeWorkRequestErrorsRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240815") + .path("securityAttributeWorkRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())) + .path("errors"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestErrorsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestErrorsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestErrorsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestErrorsResponse>() { + @Override + public com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestErrorsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.securityattribute.responses.ListSecurityAttributeWorkRequestErrorsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.securityattribute + .model + .SecurityAttributeWorkRequestErrorSummary>>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.securityattribute + .model + .SecurityAttributeWorkRequestErrorSummary>>() {}, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.securityattribute + .model + .SecurityAttributeWorkRequestErrorSummary>>() {}); + } + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestErrorSummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestErrorsResponse + .Builder + builder = + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestErrorsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.items(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> retryAfterHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "retry-after"); + if (retryAfterHeader.isPresent()) { + builder.retryAfter( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "retry-after", + retryAfterHeader.get().get(0), + Float.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestErrorsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/ListSecurityAttributeWorkRequestLogsConverter.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/ListSecurityAttributeWorkRequestLogsConverter.java new file mode 100644 index 00000000000..2596ae9e7e4 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/ListSecurityAttributeWorkRequestLogsConverter.java @@ -0,0 +1,196 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.securityattribute.model.*; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributeWorkRequestLogsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListSecurityAttributeWorkRequestLogsConverter.class); + + public static com.oracle.bmc.securityattribute.requests + .ListSecurityAttributeWorkRequestLogsRequest + interceptRequest( + com.oracle.bmc.securityattribute.requests + .ListSecurityAttributeWorkRequestLogsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.securityattribute.requests.ListSecurityAttributeWorkRequestLogsRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240815") + .path("securityAttributeWorkRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())) + .path("logs"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestLogsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestLogsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestLogsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestLogsResponse>() { + @Override + public com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestLogsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.securityattribute.responses.ListSecurityAttributeWorkRequestLogsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.securityattribute + .model + .SecurityAttributeWorkRequestLogSummary>>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.securityattribute + .model + .SecurityAttributeWorkRequestLogSummary>>() {}, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.securityattribute + .model + .SecurityAttributeWorkRequestLogSummary>>() {}); + } + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestLogSummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestLogsResponse + .Builder + builder = + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestLogsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.items(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> retryAfterHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "retry-after"); + if (retryAfterHeader.isPresent()) { + builder.retryAfter( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "retry-after", + retryAfterHeader.get().get(0), + Float.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestLogsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/ListSecurityAttributeWorkRequestsConverter.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/ListSecurityAttributeWorkRequestsConverter.java new file mode 100644 index 00000000000..4e202c20974 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/ListSecurityAttributeWorkRequestsConverter.java @@ -0,0 +1,192 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.securityattribute.model.*; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributeWorkRequestsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListSecurityAttributeWorkRequestsConverter.class); + + public static com.oracle.bmc.securityattribute.requests.ListSecurityAttributeWorkRequestsRequest + interceptRequest( + com.oracle.bmc.securityattribute.requests + .ListSecurityAttributeWorkRequestsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.securityattribute.requests.ListSecurityAttributeWorkRequestsRequest + request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240815").path("securityAttributeWorkRequests"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getResourceIdentifier() != null) { + target = + target.queryParam( + "resourceIdentifier", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceIdentifier())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestsResponse>() { + @Override + public com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.securityattribute.responses.ListSecurityAttributeWorkRequestsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.securityattribute + .model + .SecurityAttributeWorkRequestSummary>>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.securityattribute + .model + .SecurityAttributeWorkRequestSummary>>() {}, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.securityattribute + .model + .SecurityAttributeWorkRequestSummary>>() {}); + } + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestSummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestsResponse.Builder + builder = + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.items(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributeWorkRequestsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/ListSecurityAttributesConverter.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/ListSecurityAttributesConverter.java new file mode 100644 index 00000000000..d701914f8a5 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/ListSecurityAttributesConverter.java @@ -0,0 +1,187 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.securityattribute.model.*; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListSecurityAttributesConverter.class); + + public static com.oracle.bmc.securityattribute.requests.ListSecurityAttributesRequest + interceptRequest( + com.oracle.bmc.securityattribute.requests.ListSecurityAttributesRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.securityattribute.requests.ListSecurityAttributesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240815") + .path("securityAttributeNamespaces") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSecurityAttributeNamespaceId())) + .path("securityAttributes"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses.ListSecurityAttributesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses.ListSecurityAttributesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses.ListSecurityAttributesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributesResponse>() { + @Override + public com.oracle.bmc.securityattribute.responses + .ListSecurityAttributesResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.securityattribute.responses.ListSecurityAttributesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.securityattribute + .model + .SecurityAttributeSummary>>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.securityattribute + .model + .SecurityAttributeSummary>>() {}, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + com.oracle.bmc.securityattribute + .model + .SecurityAttributeSummary>>() {}); + } + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeSummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributesResponse.Builder + builder = + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributesResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.items(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.securityattribute.responses + .ListSecurityAttributesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/UpdateSecurityAttributeConverter.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/UpdateSecurityAttributeConverter.java new file mode 100644 index 00000000000..e1b4a284a35 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/UpdateSecurityAttributeConverter.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.securityattribute.model.*; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class UpdateSecurityAttributeConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateSecurityAttributeConverter.class); + + public static com.oracle.bmc.securityattribute.requests.UpdateSecurityAttributeRequest + interceptRequest( + com.oracle.bmc.securityattribute.requests.UpdateSecurityAttributeRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.securityattribute.requests.UpdateSecurityAttributeRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + Validate.notBlank( + request.getSecurityAttributeName(), "securityAttributeName must not be blank"); + Validate.notNull( + request.getUpdateSecurityAttributeDetails(), + "updateSecurityAttributeDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240815") + .path("securityAttributeNamespaces") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSecurityAttributeNamespaceId())) + .path("securityAttributes") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSecurityAttributeName())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses.UpdateSecurityAttributeResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses.UpdateSecurityAttributeResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses.UpdateSecurityAttributeResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .UpdateSecurityAttributeResponse>() { + @Override + public com.oracle.bmc.securityattribute.responses + .UpdateSecurityAttributeResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.securityattribute.responses.UpdateSecurityAttributeResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.securityattribute.model + .SecurityAttribute>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.securityattribute.model + .SecurityAttribute + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.securityattribute.model + .SecurityAttribute + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.securityattribute.model + .SecurityAttribute> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.securityattribute.responses + .UpdateSecurityAttributeResponse.Builder + builder = + com.oracle.bmc.securityattribute.responses + .UpdateSecurityAttributeResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.securityAttribute(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.securityattribute.responses + .UpdateSecurityAttributeResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/UpdateSecurityAttributeNamespaceConverter.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/UpdateSecurityAttributeNamespaceConverter.java new file mode 100644 index 00000000000..705dc7614ed --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/internal/http/UpdateSecurityAttributeNamespaceConverter.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.securityattribute.model.*; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class UpdateSecurityAttributeNamespaceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateSecurityAttributeNamespaceConverter.class); + + public static com.oracle.bmc.securityattribute.requests.UpdateSecurityAttributeNamespaceRequest + interceptRequest( + com.oracle.bmc.securityattribute.requests + .UpdateSecurityAttributeNamespaceRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.securityattribute.requests.UpdateSecurityAttributeNamespaceRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + Validate.notNull( + request.getUpdateSecurityAttributeNamespaceDetails(), + "updateSecurityAttributeNamespaceDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240815") + .path("securityAttributeNamespaces") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getSecurityAttributeNamespaceId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .UpdateSecurityAttributeNamespaceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .UpdateSecurityAttributeNamespaceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .UpdateSecurityAttributeNamespaceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.securityattribute.responses + .UpdateSecurityAttributeNamespaceResponse>() { + @Override + public com.oracle.bmc.securityattribute.responses + .UpdateSecurityAttributeNamespaceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.securityattribute.responses.UpdateSecurityAttributeNamespaceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.securityattribute.model + .SecurityAttributeNamespace>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.securityattribute.model + .SecurityAttributeNamespace + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.securityattribute.model + .SecurityAttributeNamespace + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.securityattribute.model + .SecurityAttributeNamespace> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.securityattribute.responses + .UpdateSecurityAttributeNamespaceResponse.Builder + builder = + com.oracle.bmc.securityattribute.responses + .UpdateSecurityAttributeNamespaceResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.securityAttributeNamespace(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.securityattribute.responses + .UpdateSecurityAttributeNamespaceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BaseSecurityAttributeValidator.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BaseSecurityAttributeValidator.java new file mode 100644 index 00000000000..94dbd711bcc --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BaseSecurityAttributeValidator.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * Validates a security attribute value. Each validator performs validation steps in addition to the standard + * validation for security attribute values. For more information, see + * [Limits on Security Attributes](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/overview.htm). + *

+ * If you define a validator after a value has been set for a security attribute, then any updates that + * attempt to change the value must pass the additional validation defined by the current rule. + * Previously set values (even those that would fail the current validation) are not updated. You can + * still update other attributes to resources that contain a non-valid security attribute. + *

+ * To clear the validator call UpdateSecurityAttribute with + * [DefaultSecuirtyAttributeValidator](https://docs.cloud.oracle.com/api/#/en/securityattribute/latest/datatypes/DefaultTagDefinitionValidator). + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "validatorType", + defaultImpl = BaseSecurityAttributeValidator.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = EnumSecurityAttributeValidator.class, + name = "ENUM" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DefaultSecurityAttributeValidator.class, + name = "DEFAULT" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class BaseSecurityAttributeValidator + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected BaseSecurityAttributeValidator() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BaseSecurityAttributeValidator("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BaseSecurityAttributeValidator)) { + return false; + } + + BaseSecurityAttributeValidator other = (BaseSecurityAttributeValidator) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Specifies the type of validation: a static value (no validation) or a list. + * + **/ + public enum ValidatorType { + Enum("ENUM"), + Default("DEFAULT"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ValidatorType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ValidatorType v : ValidatorType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ValidatorType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ValidatorType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ValidatorType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkDeleteSecurityAttributesDetails.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkDeleteSecurityAttributesDetails.java new file mode 100644 index 00000000000..b59b3e217a8 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkDeleteSecurityAttributesDetails.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * Properties for deleting security attributes in bulk. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = BulkDeleteSecurityAttributesDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class BulkDeleteSecurityAttributesDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"securityAttributeIds"}) + public BulkDeleteSecurityAttributesDetails(java.util.List securityAttributeIds) { + super(); + this.securityAttributeIds = securityAttributeIds; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCIDs of the security attributes to delete. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributeIds") + private java.util.List securityAttributeIds; + + /** + * The OCIDs of the security attributes to delete. + * @param securityAttributeIds the value to set + * @return this builder + **/ + public Builder securityAttributeIds(java.util.List securityAttributeIds) { + this.securityAttributeIds = securityAttributeIds; + this.__explicitlySet__.add("securityAttributeIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BulkDeleteSecurityAttributesDetails build() { + BulkDeleteSecurityAttributesDetails model = + new BulkDeleteSecurityAttributesDetails(this.securityAttributeIds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BulkDeleteSecurityAttributesDetails model) { + if (model.wasPropertyExplicitlySet("securityAttributeIds")) { + this.securityAttributeIds(model.getSecurityAttributeIds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCIDs of the security attributes to delete. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributeIds") + private final java.util.List securityAttributeIds; + + /** + * The OCIDs of the security attributes to delete. + * @return the value + **/ + public java.util.List getSecurityAttributeIds() { + return securityAttributeIds; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BulkDeleteSecurityAttributesDetails("); + sb.append("super=").append(super.toString()); + sb.append("securityAttributeIds=").append(String.valueOf(this.securityAttributeIds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkDeleteSecurityAttributesDetails)) { + return false; + } + + BulkDeleteSecurityAttributesDetails other = (BulkDeleteSecurityAttributesDetails) o; + return java.util.Objects.equals(this.securityAttributeIds, other.securityAttributeIds) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.securityAttributeIds == null + ? 43 + : this.securityAttributeIds.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditResource.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditResource.java new file mode 100644 index 00000000000..10be577a01b --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditResource.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = BulkEditResource.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class BulkEditResource extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"id", "resourceType", "metadata"}) + public BulkEditResource( + String id, String resourceType, java.util.Map metadata) { + super(); + this.id = id; + this.resourceType = resourceType; + this.metadata = metadata; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The unique OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The unique OCID of the resource. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The type of resource. See {@link #listBulkEditTagsResourceTypes(ListBulkEditTagsResourceTypesRequest) listBulkEditTagsResourceTypes}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private String resourceType; + + /** + * The type of resource. See {@link #listBulkEditTagsResourceTypes(ListBulkEditTagsResourceTypesRequest) listBulkEditTagsResourceTypes}. + * @param resourceType the value to set + * @return this builder + **/ + public Builder resourceType(String resourceType) { + this.resourceType = resourceType; + this.__explicitlySet__.add("resourceType"); + return this; + } + /** + * Additional information that identifies the resource for bulk editing of tags. This information is provided in the resource's API documentation. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private java.util.Map metadata; + + /** + * Additional information that identifies the resource for bulk editing of tags. This information is provided in the resource's API documentation. + * + * @param metadata the value to set + * @return this builder + **/ + public Builder metadata(java.util.Map metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BulkEditResource build() { + BulkEditResource model = + new BulkEditResource(this.id, this.resourceType, this.metadata); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BulkEditResource model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("resourceType")) { + this.resourceType(model.getResourceType()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The unique OCID of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The unique OCID of the resource. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The type of resource. See {@link #listBulkEditTagsResourceTypes(ListBulkEditTagsResourceTypesRequest) listBulkEditTagsResourceTypes}. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private final String resourceType; + + /** + * The type of resource. See {@link #listBulkEditTagsResourceTypes(ListBulkEditTagsResourceTypesRequest) listBulkEditTagsResourceTypes}. + * @return the value + **/ + public String getResourceType() { + return resourceType; + } + + /** + * Additional information that identifies the resource for bulk editing of tags. This information is provided in the resource's API documentation. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final java.util.Map metadata; + + /** + * Additional information that identifies the resource for bulk editing of tags. This information is provided in the resource's API documentation. + * + * @return the value + **/ + public java.util.Map getMetadata() { + return metadata; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BulkEditResource("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", resourceType=").append(String.valueOf(this.resourceType)); + sb.append(", metadata=").append(String.valueOf(this.metadata)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkEditResource)) { + return false; + } + + BulkEditResource other = (BulkEditResource) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.resourceType, other.resourceType) + && java.util.Objects.equals(this.metadata, other.metadata) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditSecurityAttributeDetails.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditSecurityAttributeDetails.java new file mode 100644 index 00000000000..15cc16cf4f5 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditSecurityAttributeDetails.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = BulkEditSecurityAttributeDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class BulkEditSecurityAttributeDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId", "resources", "bulkEditOperations"}) + public BulkEditSecurityAttributeDetails( + String compartmentId, + java.util.List resources, + java.util.List bulkEditOperations) { + super(); + this.compartmentId = compartmentId; + this.resources = resources; + this.bulkEditOperations = bulkEditOperations; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the compartment where the bulk edit request is submitted. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment where the bulk edit request is submitted. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The resources to be updated. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * The resources to be updated. + * + * @param resources the value to set + * @return this builder + **/ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** + * The operations associated with the request to bulk edit tags. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bulkEditOperations") + private java.util.List bulkEditOperations; + + /** + * The operations associated with the request to bulk edit tags. + * + * @param bulkEditOperations the value to set + * @return this builder + **/ + public Builder bulkEditOperations( + java.util.List bulkEditOperations) { + this.bulkEditOperations = bulkEditOperations; + this.__explicitlySet__.add("bulkEditOperations"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BulkEditSecurityAttributeDetails build() { + BulkEditSecurityAttributeDetails model = + new BulkEditSecurityAttributeDetails( + this.compartmentId, this.resources, this.bulkEditOperations); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BulkEditSecurityAttributeDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("bulkEditOperations")) { + this.bulkEditOperations(model.getBulkEditOperations()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the compartment where the bulk edit request is submitted. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment where the bulk edit request is submitted. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The resources to be updated. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * The resources to be updated. + * + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + /** + * The operations associated with the request to bulk edit tags. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bulkEditOperations") + private final java.util.List bulkEditOperations; + + /** + * The operations associated with the request to bulk edit tags. + * + * @return the value + **/ + public java.util.List getBulkEditOperations() { + return bulkEditOperations; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BulkEditSecurityAttributeDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", bulkEditOperations=").append(String.valueOf(this.bulkEditOperations)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkEditSecurityAttributeDetails)) { + return false; + } + + BulkEditSecurityAttributeDetails other = (BulkEditSecurityAttributeDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.bulkEditOperations, other.bulkEditOperations) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = + (result * PRIME) + + (this.bulkEditOperations == null + ? 43 + : this.bulkEditOperations.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditSecurityAttributeOperationDetails.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditSecurityAttributeOperationDetails.java new file mode 100644 index 00000000000..1afdcf7c0b8 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditSecurityAttributeOperationDetails.java @@ -0,0 +1,269 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = BulkEditSecurityAttributeOperationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class BulkEditSecurityAttributeOperationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"operationType", "securityAttributes"}) + public BulkEditSecurityAttributeOperationDetails( + OperationType operationType, + java.util.Map> securityAttributes) { + super(); + this.operationType = operationType; + this.securityAttributes = securityAttributes; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * An enum-like description of the type of operation. + *

+ * {@code ADD_WHERE_ABSENT} adds a security attribute only if it does not already exist on the resource. + * * {@code SET_WHERE_PRESENT} updates the value for a security attribute only if it is present on the resource. + * * {@code ADD_OR_SET} combines the first two operations to add a security attribute if it does not already exist on the resource + * or update the value if it is present on the resource. + * * {@code REMOVE} removes the security attribute from the resource. It's removed from the resource regardless of the value. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private OperationType operationType; + + /** + * An enum-like description of the type of operation. + *

+ * {@code ADD_WHERE_ABSENT} adds a security attribute only if it does not already exist on the resource. + * * {@code SET_WHERE_PRESENT} updates the value for a security attribute only if it is present on the resource. + * * {@code ADD_OR_SET} combines the first two operations to add a security attribute if it does not already exist on the resource + * or update the value if it is present on the resource. + * * {@code REMOVE} removes the security attribute from the resource. It's removed from the resource regardless of the value. + * + * @param operationType the value to set + * @return this builder + **/ + public Builder operationType(OperationType operationType) { + this.operationType = operationType; + this.__explicitlySet__.add("operationType"); + return this; + } + /** + * Security attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + **/ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BulkEditSecurityAttributeOperationDetails build() { + BulkEditSecurityAttributeOperationDetails model = + new BulkEditSecurityAttributeOperationDetails( + this.operationType, this.securityAttributes); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BulkEditSecurityAttributeOperationDetails model) { + if (model.wasPropertyExplicitlySet("operationType")) { + this.operationType(model.getOperationType()); + } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * An enum-like description of the type of operation. + *

+ * {@code ADD_WHERE_ABSENT} adds a security attribute only if it does not already exist on the resource. + * * {@code SET_WHERE_PRESENT} updates the value for a security attribute only if it is present on the resource. + * * {@code ADD_OR_SET} combines the first two operations to add a security attribute if it does not already exist on the resource + * or update the value if it is present on the resource. + * * {@code REMOVE} removes the security attribute from the resource. It's removed from the resource regardless of the value. + * + **/ + public enum OperationType { + AddWhereAbsent("ADD_WHERE_ABSENT"), + SetWherePresent("SET_WHERE_PRESENT"), + AddOrSet("ADD_OR_SET"), + Remove("REMOVE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OperationType v : OperationType.values()) { + map.put(v.getValue(), v); + } + } + + OperationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OperationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid OperationType: " + key); + } + }; + /** + * An enum-like description of the type of operation. + *

+ * {@code ADD_WHERE_ABSENT} adds a security attribute only if it does not already exist on the resource. + * * {@code SET_WHERE_PRESENT} updates the value for a security attribute only if it is present on the resource. + * * {@code ADD_OR_SET} combines the first two operations to add a security attribute if it does not already exist on the resource + * or update the value if it is present on the resource. + * * {@code REMOVE} removes the security attribute from the resource. It's removed from the resource regardless of the value. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private final OperationType operationType; + + /** + * An enum-like description of the type of operation. + *

+ * {@code ADD_WHERE_ABSENT} adds a security attribute only if it does not already exist on the resource. + * * {@code SET_WHERE_PRESENT} updates the value for a security attribute only if it is present on the resource. + * * {@code ADD_OR_SET} combines the first two operations to add a security attribute if it does not already exist on the resource + * or update the value if it is present on the resource. + * * {@code REMOVE} removes the security attribute from the resource. It's removed from the resource regardless of the value. + * + * @return the value + **/ + public OperationType getOperationType() { + return operationType; + } + + /** + * Security attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + * + * @return the value + **/ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BulkEditSecurityAttributeOperationDetails("); + sb.append("super=").append(super.toString()); + sb.append("operationType=").append(String.valueOf(this.operationType)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkEditSecurityAttributeOperationDetails)) { + return false; + } + + BulkEditSecurityAttributeOperationDetails other = + (BulkEditSecurityAttributeOperationDetails) o; + return java.util.Objects.equals(this.operationType, other.operationType) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.operationType == null ? 43 : this.operationType.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/ChangeSecurityAttributeNamespaceCompartmentDetails.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/ChangeSecurityAttributeNamespaceCompartmentDetails.java new file mode 100644 index 00000000000..f941a7cda9d --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/ChangeSecurityAttributeNamespaceCompartmentDetails.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * Details of the compartment the resource is being moved to. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeSecurityAttributeNamespaceCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ChangeSecurityAttributeNamespaceCompartmentDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeSecurityAttributeNamespaceCompartmentDetails(String compartmentId) { + super(); + this.compartmentId = compartmentId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The Oracle Cloud ID (OCID) of the destination compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The Oracle Cloud ID (OCID) of the destination compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeSecurityAttributeNamespaceCompartmentDetails build() { + ChangeSecurityAttributeNamespaceCompartmentDetails model = + new ChangeSecurityAttributeNamespaceCompartmentDetails(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeSecurityAttributeNamespaceCompartmentDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The Oracle Cloud ID (OCID) of the destination compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The Oracle Cloud ID (OCID) of the destination compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ChangeSecurityAttributeNamespaceCompartmentDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeSecurityAttributeNamespaceCompartmentDetails)) { + return false; + } + + ChangeSecurityAttributeNamespaceCompartmentDetails other = + (ChangeSecurityAttributeNamespaceCompartmentDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/CreateSecurityAttributeDetails.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/CreateSecurityAttributeDetails.java new file mode 100644 index 00000000000..15767b70514 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/CreateSecurityAttributeDetails.java @@ -0,0 +1,207 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * Details of the security attribute to be created for a specific security attribute namespace. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateSecurityAttributeDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateSecurityAttributeDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "description", "validator"}) + public CreateSecurityAttributeDetails( + String name, String description, BaseSecurityAttributeValidator validator) { + super(); + this.name = name; + this.description = description; + this.validator = validator; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name you assign to the security attribute during creation. This is the security attribute key. + * The name must be unique within the namespace and cannot be changed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name you assign to the security attribute during creation. This is the security attribute key. + * The name must be unique within the namespace and cannot be changed. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The description you assign to the security attribute during creation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description you assign to the security attribute during creation. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("validator") + private BaseSecurityAttributeValidator validator; + + public Builder validator(BaseSecurityAttributeValidator validator) { + this.validator = validator; + this.__explicitlySet__.add("validator"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateSecurityAttributeDetails build() { + CreateSecurityAttributeDetails model = + new CreateSecurityAttributeDetails(this.name, this.description, this.validator); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateSecurityAttributeDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("validator")) { + this.validator(model.getValidator()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name you assign to the security attribute during creation. This is the security attribute key. + * The name must be unique within the namespace and cannot be changed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name you assign to the security attribute during creation. This is the security attribute key. + * The name must be unique within the namespace and cannot be changed. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The description you assign to the security attribute during creation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description you assign to the security attribute during creation. + * @return the value + **/ + public String getDescription() { + return description; + } + + @com.fasterxml.jackson.annotation.JsonProperty("validator") + private final BaseSecurityAttributeValidator validator; + + public BaseSecurityAttributeValidator getValidator() { + return validator; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateSecurityAttributeDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", validator=").append(String.valueOf(this.validator)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSecurityAttributeDetails)) { + return false; + } + + CreateSecurityAttributeDetails other = (CreateSecurityAttributeDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.validator, other.validator) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.validator == null ? 43 : this.validator.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/CreateSecurityAttributeNamespaceDetails.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/CreateSecurityAttributeNamespaceDetails.java new file mode 100644 index 00000000000..5ba6a6a99ca --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/CreateSecurityAttributeNamespaceDetails.java @@ -0,0 +1,341 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * Details of the security attribute namespace to be created for a specific compartment. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateSecurityAttributeNamespaceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateSecurityAttributeNamespaceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "name", + "description", + "freeformTags", + "definedTags" + }) + public CreateSecurityAttributeNamespaceDetails( + String compartmentId, + String name, + String description, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.compartmentId = compartmentId; + this.name = name; + this.description = description; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the tenancy containing the security attribute namespace. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the tenancy containing the security attribute namespace. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The name you assign to the security attribute namespace during creation. The name must be unique across all namespaces in the tenancy and cannot be changed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name you assign to the security attribute namespace during creation. The name must be unique across all namespaces in the tenancy and cannot be changed. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The description you assign to the security attribute namespace during creation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description you assign to the security attribute namespace during creation. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateSecurityAttributeNamespaceDetails build() { + CreateSecurityAttributeNamespaceDetails model = + new CreateSecurityAttributeNamespaceDetails( + this.compartmentId, + this.name, + this.description, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateSecurityAttributeNamespaceDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the tenancy containing the security attribute namespace. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the tenancy containing the security attribute namespace. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The name you assign to the security attribute namespace during creation. The name must be unique across all namespaces in the tenancy and cannot be changed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name you assign to the security attribute namespace during creation. The name must be unique across all namespaces in the tenancy and cannot be changed. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The description you assign to the security attribute namespace during creation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description you assign to the security attribute namespace during creation. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateSecurityAttributeNamespaceDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSecurityAttributeNamespaceDetails)) { + return false; + } + + CreateSecurityAttributeNamespaceDetails other = (CreateSecurityAttributeNamespaceDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/DefaultSecurityAttributeValidator.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/DefaultSecurityAttributeValidator.java new file mode 100644 index 00000000000..1f2d1f758d6 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/DefaultSecurityAttributeValidator.java @@ -0,0 +1,104 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * Use this validator to clear any existing validator on the security attribute with the UpdateSecurityAttribute + * operation. Using this {@code validatorType} is the same as not setting any value on the validator field. + * The resultant value for {@code validatorType} returned in the response body is {@code null}. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DefaultSecurityAttributeValidator.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "validatorType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DefaultSecurityAttributeValidator extends BaseSecurityAttributeValidator { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DefaultSecurityAttributeValidator build() { + DefaultSecurityAttributeValidator model = new DefaultSecurityAttributeValidator(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DefaultSecurityAttributeValidator model) { + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DefaultSecurityAttributeValidator() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DefaultSecurityAttributeValidator("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DefaultSecurityAttributeValidator)) { + return false; + } + + DefaultSecurityAttributeValidator other = (DefaultSecurityAttributeValidator) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/EnumSecurityAttributeValidator.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/EnumSecurityAttributeValidator.java new file mode 100644 index 00000000000..5656e2eaa7a --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/EnumSecurityAttributeValidator.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * Used to validate the value set for a security attribute and contains the list of allowable {@code values}. + *

+ * You must specify at least one valid value in the {@code values} array. You can't have blank or + * or empty strings ({@code ""}). Duplicate values are not allowed. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = EnumSecurityAttributeValidator.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "validatorType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class EnumSecurityAttributeValidator extends BaseSecurityAttributeValidator { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The list of allowed values for a security attribute value. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("values") + private java.util.List values; + + /** + * The list of allowed values for a security attribute value. + * + * @param values the value to set + * @return this builder + **/ + public Builder values(java.util.List values) { + this.values = values; + this.__explicitlySet__.add("values"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public EnumSecurityAttributeValidator build() { + EnumSecurityAttributeValidator model = new EnumSecurityAttributeValidator(this.values); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(EnumSecurityAttributeValidator model) { + if (model.wasPropertyExplicitlySet("values")) { + this.values(model.getValues()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public EnumSecurityAttributeValidator(java.util.List values) { + super(); + this.values = values; + } + + /** + * The list of allowed values for a security attribute value. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("values") + private final java.util.List values; + + /** + * The list of allowed values for a security attribute value. + * + * @return the value + **/ + public java.util.List getValues() { + return values; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("EnumSecurityAttributeValidator("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", values=").append(String.valueOf(this.values)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof EnumSecurityAttributeValidator)) { + return false; + } + + EnumSecurityAttributeValidator other = (EnumSecurityAttributeValidator) o; + return java.util.Objects.equals(this.values, other.values) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.values == null ? 43 : this.values.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttribute.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttribute.java new file mode 100644 index 00000000000..d36494f645a --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttribute.java @@ -0,0 +1,630 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * A security attribute that belongs to a specific security attribute namespace. Security attributes must be created in a tenancy before + * a user can apply them to resources. + * For more information, see [Managing Security Attributes](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attributes.htm). + *

+ **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values + * using the API. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SecurityAttribute.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SecurityAttribute extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "securityAttributeNamespaceId", + "securityAttributeNamespaceName", + "id", + "name", + "description", + "type", + "isRetired", + "lifecycleState", + "timeCreated", + "validator" + }) + public SecurityAttribute( + String compartmentId, + String securityAttributeNamespaceId, + String securityAttributeNamespaceName, + String id, + String name, + String description, + String type, + Boolean isRetired, + LifecycleState lifecycleState, + java.util.Date timeCreated, + BaseSecurityAttributeValidator validator) { + super(); + this.compartmentId = compartmentId; + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + this.securityAttributeNamespaceName = securityAttributeNamespaceName; + this.id = id; + this.name = name; + this.description = description; + this.type = type; + this.isRetired = isRetired; + this.lifecycleState = lifecycleState; + this.timeCreated = timeCreated; + this.validator = validator; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the compartment that contains the security attribute definition. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the security attribute definition. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The OCID of the security attribute namespace that contains the security attribute definition. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributeNamespaceId") + private String securityAttributeNamespaceId; + + /** + * The OCID of the security attribute namespace that contains the security attribute definition. + * @param securityAttributeNamespaceId the value to set + * @return this builder + **/ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + this.__explicitlySet__.add("securityAttributeNamespaceId"); + return this; + } + /** + * The name of the security attribute namespace that contains the security attribute. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributeNamespaceName") + private String securityAttributeNamespaceName; + + /** + * The name of the security attribute namespace that contains the security attribute. + * + * @param securityAttributeNamespaceName the value to set + * @return this builder + **/ + public Builder securityAttributeNamespaceName(String securityAttributeNamespaceName) { + this.securityAttributeNamespaceName = securityAttributeNamespaceName; + this.__explicitlySet__.add("securityAttributeNamespaceName"); + return this; + } + /** + * The OCID of the security attribute definition. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the security attribute definition. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The name assigned to the security attribute during creation. This is the security attribute key. + * The name must be unique within the security attribute namespace and cannot be changed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name assigned to the security attribute during creation. This is the security attribute key. + * The name must be unique within the security attribute namespace and cannot be changed. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The description of the security attribute. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description of the security attribute. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The data type of the security attribute. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private String type; + + /** + * The data type of the security attribute. + * @param type the value to set + * @return this builder + **/ + public Builder type(String type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * Indicates whether the security attribute is retired. + * See [Managing Security Attribute Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private Boolean isRetired; + + /** + * Indicates whether the security attribute is retired. + * See [Managing Security Attribute Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + * @param isRetired the value to set + * @return this builder + **/ + public Builder isRetired(Boolean isRetired) { + this.isRetired = isRetired; + this.__explicitlySet__.add("isRetired"); + return this; + } + /** + * The security attribute's current state. After creating a security attribute, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute, make sure its {@code lifecycleState} is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted tag's {@code lifecycleState} changes from DELETING to DELETED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The security attribute's current state. After creating a security attribute, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute, make sure its {@code lifecycleState} is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted tag's {@code lifecycleState} changes from DELETING to DELETED. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Date and time the security attribute was created, in the format defined by RFC3339. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Date and time the security attribute was created, in the format defined by RFC3339. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("validator") + private BaseSecurityAttributeValidator validator; + + public Builder validator(BaseSecurityAttributeValidator validator) { + this.validator = validator; + this.__explicitlySet__.add("validator"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SecurityAttribute build() { + SecurityAttribute model = + new SecurityAttribute( + this.compartmentId, + this.securityAttributeNamespaceId, + this.securityAttributeNamespaceName, + this.id, + this.name, + this.description, + this.type, + this.isRetired, + this.lifecycleState, + this.timeCreated, + this.validator); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SecurityAttribute model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("securityAttributeNamespaceId")) { + this.securityAttributeNamespaceId(model.getSecurityAttributeNamespaceId()); + } + if (model.wasPropertyExplicitlySet("securityAttributeNamespaceName")) { + this.securityAttributeNamespaceName(model.getSecurityAttributeNamespaceName()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("isRetired")) { + this.isRetired(model.getIsRetired()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("validator")) { + this.validator(model.getValidator()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the compartment that contains the security attribute definition. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the security attribute definition. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The OCID of the security attribute namespace that contains the security attribute definition. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributeNamespaceId") + private final String securityAttributeNamespaceId; + + /** + * The OCID of the security attribute namespace that contains the security attribute definition. + * @return the value + **/ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + + /** + * The name of the security attribute namespace that contains the security attribute. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributeNamespaceName") + private final String securityAttributeNamespaceName; + + /** + * The name of the security attribute namespace that contains the security attribute. + * + * @return the value + **/ + public String getSecurityAttributeNamespaceName() { + return securityAttributeNamespaceName; + } + + /** + * The OCID of the security attribute definition. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the security attribute definition. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The name assigned to the security attribute during creation. This is the security attribute key. + * The name must be unique within the security attribute namespace and cannot be changed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name assigned to the security attribute during creation. This is the security attribute key. + * The name must be unique within the security attribute namespace and cannot be changed. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The description of the security attribute. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description of the security attribute. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The data type of the security attribute. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final String type; + + /** + * The data type of the security attribute. + * @return the value + **/ + public String getType() { + return type; + } + + /** + * Indicates whether the security attribute is retired. + * See [Managing Security Attribute Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private final Boolean isRetired; + + /** + * Indicates whether the security attribute is retired. + * See [Managing Security Attribute Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + * @return the value + **/ + public Boolean getIsRetired() { + return isRetired; + } + + /** + * The security attribute's current state. After creating a security attribute, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute, make sure its {@code lifecycleState} is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted tag's {@code lifecycleState} changes from DELETING to DELETED. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Inactive("INACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The security attribute's current state. After creating a security attribute, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute, make sure its {@code lifecycleState} is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted tag's {@code lifecycleState} changes from DELETING to DELETED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The security attribute's current state. After creating a security attribute, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute, make sure its {@code lifecycleState} is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted tag's {@code lifecycleState} changes from DELETING to DELETED. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Date and time the security attribute was created, in the format defined by RFC3339. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Date and time the security attribute was created, in the format defined by RFC3339. + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("validator") + private final BaseSecurityAttributeValidator validator; + + public BaseSecurityAttributeValidator getValidator() { + return validator; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SecurityAttribute("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(", securityAttributeNamespaceName=") + .append(String.valueOf(this.securityAttributeNamespaceName)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", isRetired=").append(String.valueOf(this.isRetired)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", validator=").append(String.valueOf(this.validator)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SecurityAttribute)) { + return false; + } + + SecurityAttribute other = (SecurityAttribute) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals( + this.securityAttributeNamespaceName, other.securityAttributeNamespaceName) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.isRetired, other.isRetired) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.validator, other.validator) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeNamespaceName == null + ? 43 + : this.securityAttributeNamespaceName.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + (this.isRetired == null ? 43 : this.isRetired.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.validator == null ? 43 : this.validator.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeNamespace.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeNamespace.java new file mode 100644 index 00000000000..813a52fe819 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeNamespace.java @@ -0,0 +1,673 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * A managed container for security attributes. A security attribute namespace is unique in a tenancy. For more information, + * see [Managing Security Attributes Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + *

+ **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values + * using the API. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SecurityAttributeNamespace.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SecurityAttributeNamespace + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "name", + "description", + "freeformTags", + "definedTags", + "systemTags", + "isRetired", + "mode", + "lifecycleState", + "timeCreated" + }) + public SecurityAttributeNamespace( + String id, + String compartmentId, + String name, + String description, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + Boolean isRetired, + java.util.List mode, + LifecycleState lifecycleState, + java.util.Date timeCreated) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.name = name; + this.description = description; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + this.isRetired = isRetired; + this.mode = mode; + this.lifecycleState = lifecycleState; + this.timeCreated = timeCreated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the security attribute namespace. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the security attribute namespace. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The OCID of the compartment that contains the namespace. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the namespace. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The name of the namespace. It must be unique across all namespaces in the tenancy and cannot be changed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of the namespace. It must be unique across all namespaces in the tenancy and cannot be changed. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The description you assign to the security attribute namespace. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description you assign to the security attribute namespace. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * Indicates whether the security attribute namespace is retired. + * See [Managing Security Attribute Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private Boolean isRetired; + + /** + * Indicates whether the security attribute namespace is retired. + * See [Managing Security Attribute Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + * @param isRetired the value to set + * @return this builder + **/ + public Builder isRetired(Boolean isRetired) { + this.isRetired = isRetired; + this.__explicitlySet__.add("isRetired"); + return this; + } + /** + * Indicates possible modes the security attributes in this namespace can be set to. + * This is not accepted from the user. Currently the supported values are enforce and audit. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mode") + private java.util.List mode; + + /** + * Indicates possible modes the security attributes in this namespace can be set to. + * This is not accepted from the user. Currently the supported values are enforce and audit. + * + * @param mode the value to set + * @return this builder + **/ + public Builder mode(java.util.List mode) { + this.mode = mode; + this.__explicitlySet__.add("mode"); + return this; + } + /** + * The security attribute namespace's current state. After creating a security attribute namespace, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute namespace, make sure its {@code lifecycleState} is INACTIVE. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The security attribute namespace's current state. After creating a security attribute namespace, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute namespace, make sure its {@code lifecycleState} is INACTIVE. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Date and time the security attribute namespace was created, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Date and time the security attribute namespace was created, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SecurityAttributeNamespace build() { + SecurityAttributeNamespace model = + new SecurityAttributeNamespace( + this.id, + this.compartmentId, + this.name, + this.description, + this.freeformTags, + this.definedTags, + this.systemTags, + this.isRetired, + this.mode, + this.lifecycleState, + this.timeCreated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SecurityAttributeNamespace model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("isRetired")) { + this.isRetired(model.getIsRetired()); + } + if (model.wasPropertyExplicitlySet("mode")) { + this.mode(model.getMode()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the security attribute namespace. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the security attribute namespace. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of the compartment that contains the namespace. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the namespace. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The name of the namespace. It must be unique across all namespaces in the tenancy and cannot be changed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the namespace. It must be unique across all namespaces in the tenancy and cannot be changed. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The description you assign to the security attribute namespace. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description you assign to the security attribute namespace. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + /** + * Indicates whether the security attribute namespace is retired. + * See [Managing Security Attribute Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private final Boolean isRetired; + + /** + * Indicates whether the security attribute namespace is retired. + * See [Managing Security Attribute Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + * @return the value + **/ + public Boolean getIsRetired() { + return isRetired; + } + + /** + * Indicates possible modes the security attributes in this namespace can be set to. + * This is not accepted from the user. Currently the supported values are enforce and audit. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mode") + private final java.util.List mode; + + /** + * Indicates possible modes the security attributes in this namespace can be set to. + * This is not accepted from the user. Currently the supported values are enforce and audit. + * + * @return the value + **/ + public java.util.List getMode() { + return mode; + } + + /** + * The security attribute namespace's current state. After creating a security attribute namespace, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute namespace, make sure its {@code lifecycleState} is INACTIVE. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Inactive("INACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The security attribute namespace's current state. After creating a security attribute namespace, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute namespace, make sure its {@code lifecycleState} is INACTIVE. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The security attribute namespace's current state. After creating a security attribute namespace, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute namespace, make sure its {@code lifecycleState} is INACTIVE. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Date and time the security attribute namespace was created, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Date and time the security attribute namespace was created, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SecurityAttributeNamespace("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", isRetired=").append(String.valueOf(this.isRetired)); + sb.append(", mode=").append(String.valueOf(this.mode)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SecurityAttributeNamespace)) { + return false; + } + + SecurityAttributeNamespace other = (SecurityAttributeNamespace) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.isRetired, other.isRetired) + && java.util.Objects.equals(this.mode, other.mode) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + (this.isRetired == null ? 43 : this.isRetired.hashCode()); + result = (result * PRIME) + (this.mode == null ? 43 : this.mode.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeNamespaceSummary.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeNamespaceSummary.java new file mode 100644 index 00000000000..5270ea012e4 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeNamespaceSummary.java @@ -0,0 +1,615 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * A container for security attributes. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SecurityAttributeNamespaceSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SecurityAttributeNamespaceSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "name", + "description", + "freeformTags", + "definedTags", + "systemTags", + "isRetired", + "mode", + "lifecycleState", + "timeCreated" + }) + public SecurityAttributeNamespaceSummary( + String id, + String compartmentId, + String name, + String description, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + Boolean isRetired, + java.util.List mode, + SecurityAttributeNamespace.LifecycleState lifecycleState, + java.util.Date timeCreated) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.name = name; + this.description = description; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + this.isRetired = isRetired; + this.mode = mode; + this.lifecycleState = lifecycleState; + this.timeCreated = timeCreated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the security attribute namespace. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the security attribute namespace. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The OCID of the compartment that contains the security attribute namespace. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the security attribute namespace. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The name of the security attribute namespace. It must be unique across all security attribute namespaces in the tenancy and cannot be changed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of the security attribute namespace. It must be unique across all security attribute namespaces in the tenancy and cannot be changed. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * A description you create for the security attribute namespace to help you identify it. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A description you create for the security attribute namespace to help you identify it. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * Indicates whether the security attribute namespace is retired. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private Boolean isRetired; + + /** + * Indicates whether the security attribute namespace is retired. + * + * @param isRetired the value to set + * @return this builder + **/ + public Builder isRetired(Boolean isRetired) { + this.isRetired = isRetired; + this.__explicitlySet__.add("isRetired"); + return this; + } + /** + * Indicates possible modes the security attributes in the namespace can be set to. + * This is not accepted from the user. Currently the supported values are enforce and audit. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mode") + private java.util.List mode; + + /** + * Indicates possible modes the security attributes in the namespace can be set to. + * This is not accepted from the user. Currently the supported values are enforce and audit. + * + * @param mode the value to set + * @return this builder + **/ + public Builder mode(java.util.List mode) { + this.mode = mode; + this.__explicitlySet__.add("mode"); + return this; + } + /** + * The security attribute namespace's current state. After creating a security attribute namespace, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute namespace, make sure its {@code lifecycleState} is INACTIVE. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private SecurityAttributeNamespace.LifecycleState lifecycleState; + + /** + * The security attribute namespace's current state. After creating a security attribute namespace, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute namespace, make sure its {@code lifecycleState} is INACTIVE. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(SecurityAttributeNamespace.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Date and time the security attribute namespace was created, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Date and time the security attribute namespace was created, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SecurityAttributeNamespaceSummary build() { + SecurityAttributeNamespaceSummary model = + new SecurityAttributeNamespaceSummary( + this.id, + this.compartmentId, + this.name, + this.description, + this.freeformTags, + this.definedTags, + this.systemTags, + this.isRetired, + this.mode, + this.lifecycleState, + this.timeCreated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SecurityAttributeNamespaceSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("isRetired")) { + this.isRetired(model.getIsRetired()); + } + if (model.wasPropertyExplicitlySet("mode")) { + this.mode(model.getMode()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the security attribute namespace. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the security attribute namespace. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The OCID of the compartment that contains the security attribute namespace. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the security attribute namespace. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The name of the security attribute namespace. It must be unique across all security attribute namespaces in the tenancy and cannot be changed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the security attribute namespace. It must be unique across all security attribute namespaces in the tenancy and cannot be changed. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * A description you create for the security attribute namespace to help you identify it. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A description you create for the security attribute namespace to help you identify it. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + /** + * Indicates whether the security attribute namespace is retired. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private final Boolean isRetired; + + /** + * Indicates whether the security attribute namespace is retired. + * + * @return the value + **/ + public Boolean getIsRetired() { + return isRetired; + } + + /** + * Indicates possible modes the security attributes in the namespace can be set to. + * This is not accepted from the user. Currently the supported values are enforce and audit. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("mode") + private final java.util.List mode; + + /** + * Indicates possible modes the security attributes in the namespace can be set to. + * This is not accepted from the user. Currently the supported values are enforce and audit. + * + * @return the value + **/ + public java.util.List getMode() { + return mode; + } + + /** + * The security attribute namespace's current state. After creating a security attribute namespace, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute namespace, make sure its {@code lifecycleState} is INACTIVE. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final SecurityAttributeNamespace.LifecycleState lifecycleState; + + /** + * The security attribute namespace's current state. After creating a security attribute namespace, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute namespace, make sure its {@code lifecycleState} is INACTIVE. + * @return the value + **/ + public SecurityAttributeNamespace.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Date and time the security attribute namespace was created, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Date and time the security attribute namespace was created, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SecurityAttributeNamespaceSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", isRetired=").append(String.valueOf(this.isRetired)); + sb.append(", mode=").append(String.valueOf(this.mode)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SecurityAttributeNamespaceSummary)) { + return false; + } + + SecurityAttributeNamespaceSummary other = (SecurityAttributeNamespaceSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.isRetired, other.isRetired) + && java.util.Objects.equals(this.mode, other.mode) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + (this.isRetired == null ? 43 : this.isRetired.hashCode()); + result = (result * PRIME) + (this.mode == null ? 43 : this.mode.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeSummary.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeSummary.java new file mode 100644 index 00000000000..f6e7e73d166 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeSummary.java @@ -0,0 +1,546 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * A security attribute definition that belongs to a specific security attribute namespace. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SecurityAttributeSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SecurityAttributeSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "securityAttributeNamespaceId", + "securityAttributeNamespaceName", + "id", + "name", + "description", + "type", + "isRetired", + "lifecycleState", + "timeCreated" + }) + public SecurityAttributeSummary( + String compartmentId, + String securityAttributeNamespaceId, + String securityAttributeNamespaceName, + String id, + String name, + String description, + String type, + Boolean isRetired, + SecurityAttribute.LifecycleState lifecycleState, + java.util.Date timeCreated) { + super(); + this.compartmentId = compartmentId; + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + this.securityAttributeNamespaceName = securityAttributeNamespaceName; + this.id = id; + this.name = name; + this.description = description; + this.type = type; + this.isRetired = isRetired; + this.lifecycleState = lifecycleState; + this.timeCreated = timeCreated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the compartment that contains the security attribute. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the security attribute. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The OCID of the namespace that contains the security attribute. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributeNamespaceId") + private String securityAttributeNamespaceId; + + /** + * The OCID of the namespace that contains the security attribute. + * @param securityAttributeNamespaceId the value to set + * @return this builder + **/ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + this.__explicitlySet__.add("securityAttributeNamespaceId"); + return this; + } + /** + * The name of the security attribute namespace that contains the security attribute. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributeNamespaceName") + private String securityAttributeNamespaceName; + + /** + * The name of the security attribute namespace that contains the security attribute. + * + * @param securityAttributeNamespaceName the value to set + * @return this builder + **/ + public Builder securityAttributeNamespaceName(String securityAttributeNamespaceName) { + this.securityAttributeNamespaceName = securityAttributeNamespaceName; + this.__explicitlySet__.add("securityAttributeNamespaceName"); + return this; + } + /** + * The OCID of the security attribute. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the security attribute. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The name assigned to the security attribute during creation. This is the security attribute. + * The name must be unique within the security attribute namespace and cannot be changed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name assigned to the security attribute during creation. This is the security attribute. + * The name must be unique within the security attribute namespace and cannot be changed. + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The description you assign to the security attribute. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description you assign to the security attribute. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The data type of the security attribute. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private String type; + + /** + * The data type of the security attribute. + * @param type the value to set + * @return this builder + **/ + public Builder type(String type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * Whether the security attribute is retired. + * See [Managing Security Attributes](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attributes.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private Boolean isRetired; + + /** + * Whether the security attribute is retired. + * See [Managing Security Attributes](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attributes.htm). + * + * @param isRetired the value to set + * @return this builder + **/ + public Builder isRetired(Boolean isRetired) { + this.isRetired = isRetired; + this.__explicitlySet__.add("isRetired"); + return this; + } + /** + * The security attribute's current state. After creating a security attribute, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute, make sure its {@code lifecycleState} is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute's {@code lifecycleState} changes from DELETING to DELETED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private SecurityAttribute.LifecycleState lifecycleState; + + /** + * The security attribute's current state. After creating a security attribute, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute, make sure its {@code lifecycleState} is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute's {@code lifecycleState} changes from DELETING to DELETED. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(SecurityAttribute.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Date and time the security attribute was created, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Date and time the security attribute was created, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SecurityAttributeSummary build() { + SecurityAttributeSummary model = + new SecurityAttributeSummary( + this.compartmentId, + this.securityAttributeNamespaceId, + this.securityAttributeNamespaceName, + this.id, + this.name, + this.description, + this.type, + this.isRetired, + this.lifecycleState, + this.timeCreated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SecurityAttributeSummary model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("securityAttributeNamespaceId")) { + this.securityAttributeNamespaceId(model.getSecurityAttributeNamespaceId()); + } + if (model.wasPropertyExplicitlySet("securityAttributeNamespaceName")) { + this.securityAttributeNamespaceName(model.getSecurityAttributeNamespaceName()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("isRetired")) { + this.isRetired(model.getIsRetired()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the compartment that contains the security attribute. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the security attribute. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The OCID of the namespace that contains the security attribute. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributeNamespaceId") + private final String securityAttributeNamespaceId; + + /** + * The OCID of the namespace that contains the security attribute. + * @return the value + **/ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + + /** + * The name of the security attribute namespace that contains the security attribute. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributeNamespaceName") + private final String securityAttributeNamespaceName; + + /** + * The name of the security attribute namespace that contains the security attribute. + * + * @return the value + **/ + public String getSecurityAttributeNamespaceName() { + return securityAttributeNamespaceName; + } + + /** + * The OCID of the security attribute. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the security attribute. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The name assigned to the security attribute during creation. This is the security attribute. + * The name must be unique within the security attribute namespace and cannot be changed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name assigned to the security attribute during creation. This is the security attribute. + * The name must be unique within the security attribute namespace and cannot be changed. + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The description you assign to the security attribute. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description you assign to the security attribute. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The data type of the security attribute. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final String type; + + /** + * The data type of the security attribute. + * @return the value + **/ + public String getType() { + return type; + } + + /** + * Whether the security attribute is retired. + * See [Managing Security Attributes](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attributes.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private final Boolean isRetired; + + /** + * Whether the security attribute is retired. + * See [Managing Security Attributes](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attributes.htm). + * + * @return the value + **/ + public Boolean getIsRetired() { + return isRetired; + } + + /** + * The security attribute's current state. After creating a security attribute, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute, make sure its {@code lifecycleState} is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute's {@code lifecycleState} changes from DELETING to DELETED. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final SecurityAttribute.LifecycleState lifecycleState; + + /** + * The security attribute's current state. After creating a security attribute, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute, make sure its {@code lifecycleState} is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute's {@code lifecycleState} changes from DELETING to DELETED. + * @return the value + **/ + public SecurityAttribute.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Date and time the security attribute was created, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Date and time the security attribute was created, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SecurityAttributeSummary("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(", securityAttributeNamespaceName=") + .append(String.valueOf(this.securityAttributeNamespaceName)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", isRetired=").append(String.valueOf(this.isRetired)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SecurityAttributeSummary)) { + return false; + } + + SecurityAttributeSummary other = (SecurityAttributeSummary) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals( + this.securityAttributeNamespaceName, other.securityAttributeNamespaceName) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.isRetired, other.isRetired) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeNamespaceName == null + ? 43 + : this.securityAttributeNamespaceName.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + (this.isRetired == null ? 43 : this.isRetired.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequest.java new file mode 100644 index 00000000000..e45d962aa82 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequest.java @@ -0,0 +1,501 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * The asynchronous API request does not take effect immediately. This request spawns an asynchronous + * workflow to fulfill the request. WorkRequest objects provide visibility for in-progress workflows. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SecurityAttributeWorkRequest.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SecurityAttributeWorkRequest + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "operationType", + "compartmentId", + "status", + "resources", + "timeAccepted", + "timeStarted", + "timeFinished", + "percentComplete" + }) + public SecurityAttributeWorkRequest( + String id, + WorkRequestOperationType operationType, + String compartmentId, + WorkRequestStatus status, + java.util.List resources, + java.util.Date timeAccepted, + java.util.Date timeStarted, + java.util.Date timeFinished, + Float percentComplete) { + super(); + this.id = id; + this.operationType = operationType; + this.compartmentId = compartmentId; + this.status = status; + this.resources = resources; + this.timeAccepted = timeAccepted; + this.timeStarted = timeStarted; + this.timeFinished = timeFinished; + this.percentComplete = percentComplete; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the work request. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * An enum-like description of the type of work the work request is doing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private WorkRequestOperationType operationType; + + /** + * An enum-like description of the type of work the work request is doing. + * @param operationType the value to set + * @return this builder + **/ + public Builder operationType(WorkRequestOperationType operationType) { + this.operationType = operationType; + this.__explicitlySet__.add("operationType"); + return this; + } + /** + * The OCID of the compartment that contains the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the work request. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The current status of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private WorkRequestStatus status; + + /** + * The current status of the work request. + * @param status the value to set + * @return this builder + **/ + public Builder status(WorkRequestStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The resources this work request affects. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * The resources this work request affects. + * + * @param resources the value to set + * @return this builder + **/ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** + * Date and time the work was accepted, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private java.util.Date timeAccepted; + + /** + * Date and time the work was accepted, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeAccepted the value to set + * @return this builder + **/ + public Builder timeAccepted(java.util.Date timeAccepted) { + this.timeAccepted = timeAccepted; + this.__explicitlySet__.add("timeAccepted"); + return this; + } + /** + * Date and time the work started, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * Date and time the work started, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * Date and time the work completed, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + /** + * Date and time the work completed, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeFinished the value to set + * @return this builder + **/ + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + /** + * How much progress the operation has made. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private Float percentComplete; + + /** + * How much progress the operation has made. + * + * @param percentComplete the value to set + * @return this builder + **/ + public Builder percentComplete(Float percentComplete) { + this.percentComplete = percentComplete; + this.__explicitlySet__.add("percentComplete"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SecurityAttributeWorkRequest build() { + SecurityAttributeWorkRequest model = + new SecurityAttributeWorkRequest( + this.id, + this.operationType, + this.compartmentId, + this.status, + this.resources, + this.timeAccepted, + this.timeStarted, + this.timeFinished, + this.percentComplete); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SecurityAttributeWorkRequest model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("operationType")) { + this.operationType(model.getOperationType()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("timeAccepted")) { + this.timeAccepted(model.getTimeAccepted()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } + if (model.wasPropertyExplicitlySet("percentComplete")) { + this.percentComplete(model.getPercentComplete()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the work request. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * An enum-like description of the type of work the work request is doing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private final WorkRequestOperationType operationType; + + /** + * An enum-like description of the type of work the work request is doing. + * @return the value + **/ + public WorkRequestOperationType getOperationType() { + return operationType; + } + + /** + * The OCID of the compartment that contains the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the work request. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The current status of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final WorkRequestStatus status; + + /** + * The current status of the work request. + * @return the value + **/ + public WorkRequestStatus getStatus() { + return status; + } + + /** + * The resources this work request affects. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * The resources this work request affects. + * + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + /** + * Date and time the work was accepted, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private final java.util.Date timeAccepted; + + /** + * Date and time the work was accepted, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeAccepted() { + return timeAccepted; + } + + /** + * Date and time the work started, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * Date and time the work started, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * Date and time the work completed, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private final java.util.Date timeFinished; + + /** + * Date and time the work completed, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeFinished() { + return timeFinished; + } + + /** + * How much progress the operation has made. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private final Float percentComplete; + + /** + * How much progress the operation has made. + * + * @return the value + **/ + public Float getPercentComplete() { + return percentComplete; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SecurityAttributeWorkRequest("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", operationType=").append(String.valueOf(this.operationType)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", timeAccepted=").append(String.valueOf(this.timeAccepted)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); + sb.append(", percentComplete=").append(String.valueOf(this.percentComplete)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SecurityAttributeWorkRequest)) { + return false; + } + + SecurityAttributeWorkRequest other = (SecurityAttributeWorkRequest) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.operationType, other.operationType) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.timeAccepted, other.timeAccepted) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeFinished, other.timeFinished) + && java.util.Objects.equals(this.percentComplete, other.percentComplete) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.operationType == null ? 43 : this.operationType.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = (result * PRIME) + (this.timeAccepted == null ? 43 : this.timeAccepted.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); + result = + (result * PRIME) + + (this.percentComplete == null ? 43 : this.percentComplete.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestErrorSummary.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestErrorSummary.java new file mode 100644 index 00000000000..5fc986f27da --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestErrorSummary.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * The error entity. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SecurityAttributeWorkRequestErrorSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SecurityAttributeWorkRequestErrorSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"code", "message", "timestamp"}) + public SecurityAttributeWorkRequestErrorSummary( + String code, String message, java.util.Date timestamp) { + super(); + this.code = code; + this.message = message; + this.timestamp = timestamp; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A machine-usable code for the error that occured. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("code") + private String code; + + /** + * A machine-usable code for the error that occured. + * @param code the value to set + * @return this builder + **/ + public Builder code(String code) { + this.code = code; + this.__explicitlySet__.add("code"); + return this; + } + /** + * A human-readable error string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * A human-readable error string. + * @param message the value to set + * @return this builder + **/ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + /** + * Date and time the error happened, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + /** + * Date and time the error happened, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timestamp the value to set + * @return this builder + **/ + public Builder timestamp(java.util.Date timestamp) { + this.timestamp = timestamp; + this.__explicitlySet__.add("timestamp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SecurityAttributeWorkRequestErrorSummary build() { + SecurityAttributeWorkRequestErrorSummary model = + new SecurityAttributeWorkRequestErrorSummary( + this.code, this.message, this.timestamp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SecurityAttributeWorkRequestErrorSummary model) { + if (model.wasPropertyExplicitlySet("code")) { + this.code(model.getCode()); + } + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + if (model.wasPropertyExplicitlySet("timestamp")) { + this.timestamp(model.getTimestamp()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A machine-usable code for the error that occured. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("code") + private final String code; + + /** + * A machine-usable code for the error that occured. + * @return the value + **/ + public String getCode() { + return code; + } + + /** + * A human-readable error string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * A human-readable error string. + * @return the value + **/ + public String getMessage() { + return message; + } + + /** + * Date and time the error happened, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private final java.util.Date timestamp; + + /** + * Date and time the error happened, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimestamp() { + return timestamp; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SecurityAttributeWorkRequestErrorSummary("); + sb.append("super=").append(super.toString()); + sb.append("code=").append(String.valueOf(this.code)); + sb.append(", message=").append(String.valueOf(this.message)); + sb.append(", timestamp=").append(String.valueOf(this.timestamp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SecurityAttributeWorkRequestErrorSummary)) { + return false; + } + + SecurityAttributeWorkRequestErrorSummary other = + (SecurityAttributeWorkRequestErrorSummary) o; + return java.util.Objects.equals(this.code, other.code) + && java.util.Objects.equals(this.message, other.message) + && java.util.Objects.equals(this.timestamp, other.timestamp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.code == null ? 43 : this.code.hashCode()); + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + (this.timestamp == null ? 43 : this.timestamp.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestLogSummary.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestLogSummary.java new file mode 100644 index 00000000000..8fce841b0cb --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestLogSummary.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * The log entity. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SecurityAttributeWorkRequestLogSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SecurityAttributeWorkRequestLogSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"message", "timestamp"}) + public SecurityAttributeWorkRequestLogSummary(String message, java.util.Date timestamp) { + super(); + this.message = message; + this.timestamp = timestamp; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A human-readable error string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * A human-readable error string. + * @param message the value to set + * @return this builder + **/ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + /** + * Date and time the log was written, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + /** + * Date and time the log was written, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timestamp the value to set + * @return this builder + **/ + public Builder timestamp(java.util.Date timestamp) { + this.timestamp = timestamp; + this.__explicitlySet__.add("timestamp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SecurityAttributeWorkRequestLogSummary build() { + SecurityAttributeWorkRequestLogSummary model = + new SecurityAttributeWorkRequestLogSummary(this.message, this.timestamp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SecurityAttributeWorkRequestLogSummary model) { + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + if (model.wasPropertyExplicitlySet("timestamp")) { + this.timestamp(model.getTimestamp()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A human-readable error string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * A human-readable error string. + * @return the value + **/ + public String getMessage() { + return message; + } + + /** + * Date and time the log was written, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private final java.util.Date timestamp; + + /** + * Date and time the log was written, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimestamp() { + return timestamp; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SecurityAttributeWorkRequestLogSummary("); + sb.append("super=").append(super.toString()); + sb.append("message=").append(String.valueOf(this.message)); + sb.append(", timestamp=").append(String.valueOf(this.timestamp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SecurityAttributeWorkRequestLogSummary)) { + return false; + } + + SecurityAttributeWorkRequestLogSummary other = (SecurityAttributeWorkRequestLogSummary) o; + return java.util.Objects.equals(this.message, other.message) + && java.util.Objects.equals(this.timestamp, other.timestamp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + (this.timestamp == null ? 43 : this.timestamp.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestSummary.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestSummary.java new file mode 100644 index 00000000000..eabb95b9ec3 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestSummary.java @@ -0,0 +1,500 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * The work request summary. Tracks the status of the asynchronous operation. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SecurityAttributeWorkRequestSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class SecurityAttributeWorkRequestSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "operationType", + "compartmentId", + "status", + "resources", + "timeAccepted", + "timeStarted", + "timeFinished", + "percentComplete" + }) + public SecurityAttributeWorkRequestSummary( + String id, + WorkRequestOperationType operationType, + String compartmentId, + WorkRequestStatus status, + java.util.List resources, + java.util.Date timeAccepted, + java.util.Date timeStarted, + java.util.Date timeFinished, + Float percentComplete) { + super(); + this.id = id; + this.operationType = operationType; + this.compartmentId = compartmentId; + this.status = status; + this.resources = resources; + this.timeAccepted = timeAccepted; + this.timeStarted = timeStarted; + this.timeFinished = timeFinished; + this.percentComplete = percentComplete; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The OCID of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the work request. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * An enum-like description of the type of work the work request is doing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private WorkRequestOperationType operationType; + + /** + * An enum-like description of the type of work the work request is doing. + * @param operationType the value to set + * @return this builder + **/ + public Builder operationType(WorkRequestOperationType operationType) { + this.operationType = operationType; + this.__explicitlySet__.add("operationType"); + return this; + } + /** + * The OCID of the compartment that contains the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the work request. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The current status of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private WorkRequestStatus status; + + /** + * The current status of the work request. + * @param status the value to set + * @return this builder + **/ + public Builder status(WorkRequestStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The resources this work request affects. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * The resources this work request affects. + * + * @param resources the value to set + * @return this builder + **/ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** + * Date and time the work was accepted, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private java.util.Date timeAccepted; + + /** + * Date and time the work was accepted, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeAccepted the value to set + * @return this builder + **/ + public Builder timeAccepted(java.util.Date timeAccepted) { + this.timeAccepted = timeAccepted; + this.__explicitlySet__.add("timeAccepted"); + return this; + } + /** + * Date and time the work started, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * Date and time the work started, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * Date and time the work completed, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + /** + * Date and time the work completed, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeFinished the value to set + * @return this builder + **/ + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + /** + * How much progress the operation has made. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private Float percentComplete; + + /** + * How much progress the operation has made. + * + * @param percentComplete the value to set + * @return this builder + **/ + public Builder percentComplete(Float percentComplete) { + this.percentComplete = percentComplete; + this.__explicitlySet__.add("percentComplete"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SecurityAttributeWorkRequestSummary build() { + SecurityAttributeWorkRequestSummary model = + new SecurityAttributeWorkRequestSummary( + this.id, + this.operationType, + this.compartmentId, + this.status, + this.resources, + this.timeAccepted, + this.timeStarted, + this.timeFinished, + this.percentComplete); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SecurityAttributeWorkRequestSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("operationType")) { + this.operationType(model.getOperationType()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("timeAccepted")) { + this.timeAccepted(model.getTimeAccepted()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } + if (model.wasPropertyExplicitlySet("percentComplete")) { + this.percentComplete(model.getPercentComplete()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The OCID of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the work request. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * An enum-like description of the type of work the work request is doing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private final WorkRequestOperationType operationType; + + /** + * An enum-like description of the type of work the work request is doing. + * @return the value + **/ + public WorkRequestOperationType getOperationType() { + return operationType; + } + + /** + * The OCID of the compartment that contains the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the work request. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The current status of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final WorkRequestStatus status; + + /** + * The current status of the work request. + * @return the value + **/ + public WorkRequestStatus getStatus() { + return status; + } + + /** + * The resources this work request affects. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * The resources this work request affects. + * + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + /** + * Date and time the work was accepted, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private final java.util.Date timeAccepted; + + /** + * Date and time the work was accepted, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeAccepted() { + return timeAccepted; + } + + /** + * Date and time the work started, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * Date and time the work started, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * Date and time the work completed, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private final java.util.Date timeFinished; + + /** + * Date and time the work completed, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeFinished() { + return timeFinished; + } + + /** + * How much progress the operation has made. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private final Float percentComplete; + + /** + * How much progress the operation has made. + * + * @return the value + **/ + public Float getPercentComplete() { + return percentComplete; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SecurityAttributeWorkRequestSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", operationType=").append(String.valueOf(this.operationType)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", timeAccepted=").append(String.valueOf(this.timeAccepted)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); + sb.append(", percentComplete=").append(String.valueOf(this.percentComplete)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SecurityAttributeWorkRequestSummary)) { + return false; + } + + SecurityAttributeWorkRequestSummary other = (SecurityAttributeWorkRequestSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.operationType, other.operationType) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.timeAccepted, other.timeAccepted) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeFinished, other.timeFinished) + && java.util.Objects.equals(this.percentComplete, other.percentComplete) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.operationType == null ? 43 : this.operationType.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = (result * PRIME) + (this.timeAccepted == null ? 43 : this.timeAccepted.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); + result = + (result * PRIME) + + (this.percentComplete == null ? 43 : this.percentComplete.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SortOrder.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SortOrder.java new file mode 100644 index 00000000000..fa03d9e7c03 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SortOrder.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The {@code name} + * sort order is case sensitive. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortOrder: " + key); + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/UpdateSecurityAttributeDetails.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/UpdateSecurityAttributeDetails.java new file mode 100644 index 00000000000..6d3e1225e96 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/UpdateSecurityAttributeDetails.java @@ -0,0 +1,208 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * Details of the security attribute to be updated for a specific security attribute namespace. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateSecurityAttributeDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateSecurityAttributeDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"description", "isRetired", "validator"}) + public UpdateSecurityAttributeDetails( + String description, Boolean isRetired, BaseSecurityAttributeValidator validator) { + super(); + this.description = description; + this.isRetired = isRetired; + this.validator = validator; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The description of the security attribute during creation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description of the security attribute during creation. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Whether the security attribute is retired. + * See [Managing Security Attributes](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attributes.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private Boolean isRetired; + + /** + * Whether the security attribute is retired. + * See [Managing Security Attributes](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attributes.htm). + * + * @param isRetired the value to set + * @return this builder + **/ + public Builder isRetired(Boolean isRetired) { + this.isRetired = isRetired; + this.__explicitlySet__.add("isRetired"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("validator") + private BaseSecurityAttributeValidator validator; + + public Builder validator(BaseSecurityAttributeValidator validator) { + this.validator = validator; + this.__explicitlySet__.add("validator"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateSecurityAttributeDetails build() { + UpdateSecurityAttributeDetails model = + new UpdateSecurityAttributeDetails( + this.description, this.isRetired, this.validator); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateSecurityAttributeDetails model) { + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("isRetired")) { + this.isRetired(model.getIsRetired()); + } + if (model.wasPropertyExplicitlySet("validator")) { + this.validator(model.getValidator()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The description of the security attribute during creation. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description of the security attribute during creation. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Whether the security attribute is retired. + * See [Managing Security Attributes](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attributes.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private final Boolean isRetired; + + /** + * Whether the security attribute is retired. + * See [Managing Security Attributes](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attributes.htm). + * + * @return the value + **/ + public Boolean getIsRetired() { + return isRetired; + } + + @com.fasterxml.jackson.annotation.JsonProperty("validator") + private final BaseSecurityAttributeValidator validator; + + public BaseSecurityAttributeValidator getValidator() { + return validator; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateSecurityAttributeDetails("); + sb.append("super=").append(super.toString()); + sb.append("description=").append(String.valueOf(this.description)); + sb.append(", isRetired=").append(String.valueOf(this.isRetired)); + sb.append(", validator=").append(String.valueOf(this.validator)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSecurityAttributeDetails)) { + return false; + } + + UpdateSecurityAttributeDetails other = (UpdateSecurityAttributeDetails) o; + return java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.isRetired, other.isRetired) + && java.util.Objects.equals(this.validator, other.validator) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.isRetired == null ? 43 : this.isRetired.hashCode()); + result = (result * PRIME) + (this.validator == null ? 43 : this.validator.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/UpdateSecurityAttributeNamespaceDetails.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/UpdateSecurityAttributeNamespaceDetails.java new file mode 100644 index 00000000000..044d8f150b5 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/UpdateSecurityAttributeNamespaceDetails.java @@ -0,0 +1,295 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * Details of the security attribute namespace to be updated. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateSecurityAttributeNamespaceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateSecurityAttributeNamespaceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"description", "isRetired", "freeformTags", "definedTags"}) + public UpdateSecurityAttributeNamespaceDetails( + String description, + Boolean isRetired, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.description = description; + this.isRetired = isRetired; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The description you assign to the security attribute namespace to help you identify it. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description you assign to the security attribute namespace to help you identify it. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Indicates whether the security attribute namespace is retired. + * See [Managing Security Attribute Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private Boolean isRetired; + + /** + * Indicates whether the security attribute namespace is retired. + * See [Managing Security Attribute Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + * @param isRetired the value to set + * @return this builder + **/ + public Builder isRetired(Boolean isRetired) { + this.isRetired = isRetired; + this.__explicitlySet__.add("isRetired"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateSecurityAttributeNamespaceDetails build() { + UpdateSecurityAttributeNamespaceDetails model = + new UpdateSecurityAttributeNamespaceDetails( + this.description, this.isRetired, this.freeformTags, this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateSecurityAttributeNamespaceDetails model) { + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("isRetired")) { + this.isRetired(model.getIsRetired()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The description you assign to the security attribute namespace to help you identify it. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description you assign to the security attribute namespace to help you identify it. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Indicates whether the security attribute namespace is retired. + * See [Managing Security Attribute Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private final Boolean isRetired; + + /** + * Indicates whether the security attribute namespace is retired. + * See [Managing Security Attribute Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + * @return the value + **/ + public Boolean getIsRetired() { + return isRetired; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateSecurityAttributeNamespaceDetails("); + sb.append("super=").append(super.toString()); + sb.append("description=").append(String.valueOf(this.description)); + sb.append(", isRetired=").append(String.valueOf(this.isRetired)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSecurityAttributeNamespaceDetails)) { + return false; + } + + UpdateSecurityAttributeNamespaceDetails other = (UpdateSecurityAttributeNamespaceDetails) o; + return java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.isRetired, other.isRetired) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.isRetired == null ? 43 : this.isRetired.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestOperationType.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestOperationType.java new file mode 100644 index 00000000000..e86283ae56f --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestOperationType.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * An enum-like description of the type of work the work request is doing. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public enum WorkRequestOperationType { + DeleteSecurityAttributeDefinition("DELETE_SECURITY_ATTRIBUTE_DEFINITION"), + DeleteNonEmptySecurityAttributeNamespace("DELETE_NON_EMPTY_SECURITY_ATTRIBUTE_NAMESPACE"), + BulkDeleteSecurityAttributes("BULK_DELETE_SECURITY_ATTRIBUTES"), + BulkEditOfSecurityAttributes("BULK_EDIT_OF_SECURITY_ATTRIBUTES"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(WorkRequestOperationType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (WorkRequestOperationType v : WorkRequestOperationType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + WorkRequestOperationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static WorkRequestOperationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'WorkRequestOperationType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestResource.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestResource.java new file mode 100644 index 00000000000..d261b23ca39 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestResource.java @@ -0,0 +1,302 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * The resource entity. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestResource.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestResource extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"identifier", "entityType", "actionType", "entityUri"}) + public WorkRequestResource( + String identifier, String entityType, ActionType actionType, String entityUri) { + super(); + this.identifier = identifier; + this.entityType = entityType; + this.actionType = actionType; + this.entityUri = entityUri; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The resource identifier the work request affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("identifier") + private String identifier; + + /** + * The resource identifier the work request affects. + * @param identifier the value to set + * @return this builder + **/ + public Builder identifier(String identifier) { + this.identifier = identifier; + this.__explicitlySet__.add("identifier"); + return this; + } + /** + * The resource type the work request is affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private String entityType; + + /** + * The resource type the work request is affects. + * @param entityType the value to set + * @return this builder + **/ + public Builder entityType(String entityType) { + this.entityType = entityType; + this.__explicitlySet__.add("entityType"); + return this; + } + /** + * The way in which this resource was affected by the work tracked by the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + /** + * The way in which this resource was affected by the work tracked by the work request. + * @param actionType the value to set + * @return this builder + **/ + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + /** + * The URI path that the user can do a GET on to access the resource metadata. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityUri") + private String entityUri; + + /** + * The URI path that the user can do a GET on to access the resource metadata. + * @param entityUri the value to set + * @return this builder + **/ + public Builder entityUri(String entityUri) { + this.entityUri = entityUri; + this.__explicitlySet__.add("entityUri"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestResource build() { + WorkRequestResource model = + new WorkRequestResource( + this.identifier, this.entityType, this.actionType, this.entityUri); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestResource model) { + if (model.wasPropertyExplicitlySet("identifier")) { + this.identifier(model.getIdentifier()); + } + if (model.wasPropertyExplicitlySet("entityType")) { + this.entityType(model.getEntityType()); + } + if (model.wasPropertyExplicitlySet("actionType")) { + this.actionType(model.getActionType()); + } + if (model.wasPropertyExplicitlySet("entityUri")) { + this.entityUri(model.getEntityUri()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The resource identifier the work request affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("identifier") + private final String identifier; + + /** + * The resource identifier the work request affects. + * @return the value + **/ + public String getIdentifier() { + return identifier; + } + + /** + * The resource type the work request is affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private final String entityType; + + /** + * The resource type the work request is affects. + * @return the value + **/ + public String getEntityType() { + return entityType; + } + + /** + * The way in which this resource was affected by the work tracked by the work request. + **/ + public enum ActionType { + Created("CREATED"), + Updated("UPDATED"), + Deleted("DELETED"), + Related("RELATED"), + InProgress("IN_PROGRESS"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ActionType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActionType v : ActionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ActionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ActionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ActionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The way in which this resource was affected by the work tracked by the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private final ActionType actionType; + + /** + * The way in which this resource was affected by the work tracked by the work request. + * @return the value + **/ + public ActionType getActionType() { + return actionType; + } + + /** + * The URI path that the user can do a GET on to access the resource metadata. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityUri") + private final String entityUri; + + /** + * The URI path that the user can do a GET on to access the resource metadata. + * @return the value + **/ + public String getEntityUri() { + return entityUri; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestResource("); + sb.append("super=").append(super.toString()); + sb.append("identifier=").append(String.valueOf(this.identifier)); + sb.append(", entityType=").append(String.valueOf(this.entityType)); + sb.append(", actionType=").append(String.valueOf(this.actionType)); + sb.append(", entityUri=").append(String.valueOf(this.entityUri)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestResource)) { + return false; + } + + WorkRequestResource other = (WorkRequestResource) o; + return java.util.Objects.equals(this.identifier, other.identifier) + && java.util.Objects.equals(this.entityType, other.entityType) + && java.util.Objects.equals(this.actionType, other.actionType) + && java.util.Objects.equals(this.entityUri, other.entityUri) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.identifier == null ? 43 : this.identifier.hashCode()); + result = (result * PRIME) + (this.entityType == null ? 43 : this.entityType.hashCode()); + result = (result * PRIME) + (this.actionType == null ? 43 : this.actionType.hashCode()); + result = (result * PRIME) + (this.entityUri == null ? 43 : this.entityUri.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestStatus.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestStatus.java new file mode 100644 index 00000000000..dee38599a81 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestStatus.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * The current status of the work request. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public enum WorkRequestStatus { + Accepted("ACCEPTED"), + InProgress("IN_PROGRESS"), + Failed("FAILED"), + Succeeded("SUCCEEDED"), + PartiallySucceeded("PARTIALLY_SUCCEEDED"), + Canceling("CANCELING"), + Canceled("CANCELED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(WorkRequestStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (WorkRequestStatus v : WorkRequestStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + WorkRequestStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static WorkRequestStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'WorkRequestStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/BulkDeleteSecurityAttributesRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/BulkDeleteSecurityAttributesRequest.java new file mode 100644 index 00000000000..e4d3f02535e --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/BulkDeleteSecurityAttributesRequest.java @@ -0,0 +1,302 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use BulkDeleteSecurityAttributesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class BulkDeleteSecurityAttributesRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.securityattribute.model.BulkDeleteSecurityAttributesDetails> { + + /** + * Request object for deleting security attributes in bulk. + */ + private com.oracle.bmc.securityattribute.model.BulkDeleteSecurityAttributesDetails + bulkDeleteSecurityAttributesDetails; + + /** + * Request object for deleting security attributes in bulk. + */ + public com.oracle.bmc.securityattribute.model.BulkDeleteSecurityAttributesDetails + getBulkDeleteSecurityAttributesDetails() { + return bulkDeleteSecurityAttributesDetails; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.securityattribute.model.BulkDeleteSecurityAttributesDetails getBody$() { + return bulkDeleteSecurityAttributesDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + BulkDeleteSecurityAttributesRequest, + com.oracle.bmc.securityattribute.model.BulkDeleteSecurityAttributesDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request object for deleting security attributes in bulk. + */ + private com.oracle.bmc.securityattribute.model.BulkDeleteSecurityAttributesDetails + bulkDeleteSecurityAttributesDetails = null; + + /** + * Request object for deleting security attributes in bulk. + * @param bulkDeleteSecurityAttributesDetails the value to set + * @return this builder instance + */ + public Builder bulkDeleteSecurityAttributesDetails( + com.oracle.bmc.securityattribute.model.BulkDeleteSecurityAttributesDetails + bulkDeleteSecurityAttributesDetails) { + this.bulkDeleteSecurityAttributesDetails = bulkDeleteSecurityAttributesDetails; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(BulkDeleteSecurityAttributesRequest o) { + bulkDeleteSecurityAttributesDetails(o.getBulkDeleteSecurityAttributesDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of BulkDeleteSecurityAttributesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of BulkDeleteSecurityAttributesRequest + */ + public BulkDeleteSecurityAttributesRequest build() { + BulkDeleteSecurityAttributesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.securityattribute.model.BulkDeleteSecurityAttributesDetails body) { + bulkDeleteSecurityAttributesDetails(body); + return this; + } + + /** + * Build the instance of BulkDeleteSecurityAttributesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of BulkDeleteSecurityAttributesRequest + */ + public BulkDeleteSecurityAttributesRequest buildWithoutInvocationCallback() { + BulkDeleteSecurityAttributesRequest request = new BulkDeleteSecurityAttributesRequest(); + request.bulkDeleteSecurityAttributesDetails = bulkDeleteSecurityAttributesDetails; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new BulkDeleteSecurityAttributesRequest(bulkDeleteSecurityAttributesDetails, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .bulkDeleteSecurityAttributesDetails(bulkDeleteSecurityAttributesDetails) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",bulkDeleteSecurityAttributesDetails=") + .append(String.valueOf(this.bulkDeleteSecurityAttributesDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkDeleteSecurityAttributesRequest)) { + return false; + } + + BulkDeleteSecurityAttributesRequest other = (BulkDeleteSecurityAttributesRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.bulkDeleteSecurityAttributesDetails, + other.bulkDeleteSecurityAttributesDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.bulkDeleteSecurityAttributesDetails == null + ? 43 + : this.bulkDeleteSecurityAttributesDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/BulkEditSecurityAttributesRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/BulkEditSecurityAttributesRequest.java new file mode 100644 index 00000000000..65ac455517a --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/BulkEditSecurityAttributesRequest.java @@ -0,0 +1,302 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use BulkEditSecurityAttributesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class BulkEditSecurityAttributesRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeDetails> { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * The request object for bulk editing security attributes on resources in the compartment. + */ + private com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeDetails + bulkEditSecurityAttributeDetails; + + /** + * The request object for bulk editing security attributes on resources in the compartment. + */ + public com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeDetails + getBulkEditSecurityAttributeDetails() { + return bulkEditSecurityAttributeDetails; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeDetails getBody$() { + return bulkEditSecurityAttributeDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + BulkEditSecurityAttributesRequest, + com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The request object for bulk editing security attributes on resources in the compartment. + */ + private com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeDetails + bulkEditSecurityAttributeDetails = null; + + /** + * The request object for bulk editing security attributes on resources in the compartment. + * @param bulkEditSecurityAttributeDetails the value to set + * @return this builder instance + */ + public Builder bulkEditSecurityAttributeDetails( + com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeDetails + bulkEditSecurityAttributeDetails) { + this.bulkEditSecurityAttributeDetails = bulkEditSecurityAttributeDetails; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(BulkEditSecurityAttributesRequest o) { + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + bulkEditSecurityAttributeDetails(o.getBulkEditSecurityAttributeDetails()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of BulkEditSecurityAttributesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of BulkEditSecurityAttributesRequest + */ + public BulkEditSecurityAttributesRequest build() { + BulkEditSecurityAttributesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeDetails body) { + bulkEditSecurityAttributeDetails(body); + return this; + } + + /** + * Build the instance of BulkEditSecurityAttributesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of BulkEditSecurityAttributesRequest + */ + public BulkEditSecurityAttributesRequest buildWithoutInvocationCallback() { + BulkEditSecurityAttributesRequest request = new BulkEditSecurityAttributesRequest(); + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + request.bulkEditSecurityAttributeDetails = bulkEditSecurityAttributeDetails; + return request; + // new BulkEditSecurityAttributesRequest(opcRequestId, opcRetryToken, bulkEditSecurityAttributeDetails); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken) + .bulkEditSecurityAttributeDetails(bulkEditSecurityAttributeDetails); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",bulkEditSecurityAttributeDetails=") + .append(String.valueOf(this.bulkEditSecurityAttributeDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkEditSecurityAttributesRequest)) { + return false; + } + + BulkEditSecurityAttributesRequest other = (BulkEditSecurityAttributesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals( + this.bulkEditSecurityAttributeDetails, + other.bulkEditSecurityAttributeDetails); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = + (result * PRIME) + + (this.bulkEditSecurityAttributeDetails == null + ? 43 + : this.bulkEditSecurityAttributeDetails.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CascadingDeleteSecurityAttributeNamespaceRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CascadingDeleteSecurityAttributeNamespaceRequest.java new file mode 100644 index 00000000000..269a5928006 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CascadingDeleteSecurityAttributeNamespaceRequest.java @@ -0,0 +1,327 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use CascadingDeleteSecurityAttributeNamespaceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class CascadingDeleteSecurityAttributeNamespaceRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the security attribute namespace. + * + */ + private String securityAttributeNamespaceId; + + /** + * The OCID of the security attribute namespace. + * + */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CascadingDeleteSecurityAttributeNamespaceRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the security attribute namespace. + * + */ + private String securityAttributeNamespaceId = null; + + /** + * The OCID of the security attribute namespace. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder instance + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CascadingDeleteSecurityAttributeNamespaceRequest o) { + securityAttributeNamespaceId(o.getSecurityAttributeNamespaceId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CascadingDeleteSecurityAttributeNamespaceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CascadingDeleteSecurityAttributeNamespaceRequest + */ + public CascadingDeleteSecurityAttributeNamespaceRequest build() { + CascadingDeleteSecurityAttributeNamespaceRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of CascadingDeleteSecurityAttributeNamespaceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CascadingDeleteSecurityAttributeNamespaceRequest + */ + public CascadingDeleteSecurityAttributeNamespaceRequest buildWithoutInvocationCallback() { + CascadingDeleteSecurityAttributeNamespaceRequest request = + new CascadingDeleteSecurityAttributeNamespaceRequest(); + request.securityAttributeNamespaceId = securityAttributeNamespaceId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new CascadingDeleteSecurityAttributeNamespaceRequest(securityAttributeNamespaceId, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .securityAttributeNamespaceId(securityAttributeNamespaceId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CascadingDeleteSecurityAttributeNamespaceRequest)) { + return false; + } + + CascadingDeleteSecurityAttributeNamespaceRequest other = + (CascadingDeleteSecurityAttributeNamespaceRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ChangeSecurityAttributeNamespaceCompartmentRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ChangeSecurityAttributeNamespaceCompartmentRequest.java new file mode 100644 index 00000000000..ba65eaad2eb --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ChangeSecurityAttributeNamespaceCompartmentRequest.java @@ -0,0 +1,408 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use ChangeSecurityAttributeNamespaceCompartmentRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ChangeSecurityAttributeNamespaceCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.securityattribute.model + .ChangeSecurityAttributeNamespaceCompartmentDetails> { + + /** + * The OCID of the security attribute namespace. + * + */ + private String securityAttributeNamespaceId; + + /** + * The OCID of the security attribute namespace. + * + */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + /** + * Request object for changing the compartment of a security attribute namespace. + */ + private com.oracle.bmc.securityattribute.model + .ChangeSecurityAttributeNamespaceCompartmentDetails + changeSecurityAttributeNamespaceCompartmentDetails; + + /** + * Request object for changing the compartment of a security attribute namespace. + */ + public com.oracle.bmc.securityattribute.model.ChangeSecurityAttributeNamespaceCompartmentDetails + getChangeSecurityAttributeNamespaceCompartmentDetails() { + return changeSecurityAttributeNamespaceCompartmentDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.securityattribute.model.ChangeSecurityAttributeNamespaceCompartmentDetails + getBody$() { + return changeSecurityAttributeNamespaceCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeSecurityAttributeNamespaceCompartmentRequest, + com.oracle.bmc.securityattribute.model + .ChangeSecurityAttributeNamespaceCompartmentDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the security attribute namespace. + * + */ + private String securityAttributeNamespaceId = null; + + /** + * The OCID of the security attribute namespace. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder instance + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + return this; + } + + /** + * Request object for changing the compartment of a security attribute namespace. + */ + private com.oracle.bmc.securityattribute.model + .ChangeSecurityAttributeNamespaceCompartmentDetails + changeSecurityAttributeNamespaceCompartmentDetails = null; + + /** + * Request object for changing the compartment of a security attribute namespace. + * @param changeSecurityAttributeNamespaceCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeSecurityAttributeNamespaceCompartmentDetails( + com.oracle.bmc.securityattribute.model + .ChangeSecurityAttributeNamespaceCompartmentDetails + changeSecurityAttributeNamespaceCompartmentDetails) { + this.changeSecurityAttributeNamespaceCompartmentDetails = + changeSecurityAttributeNamespaceCompartmentDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeSecurityAttributeNamespaceCompartmentRequest o) { + securityAttributeNamespaceId(o.getSecurityAttributeNamespaceId()); + changeSecurityAttributeNamespaceCompartmentDetails( + o.getChangeSecurityAttributeNamespaceCompartmentDetails()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeSecurityAttributeNamespaceCompartmentRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ChangeSecurityAttributeNamespaceCompartmentRequest + */ + public ChangeSecurityAttributeNamespaceCompartmentRequest build() { + ChangeSecurityAttributeNamespaceCompartmentRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.securityattribute.model + .ChangeSecurityAttributeNamespaceCompartmentDetails + body) { + changeSecurityAttributeNamespaceCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeSecurityAttributeNamespaceCompartmentRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeSecurityAttributeNamespaceCompartmentRequest + */ + public ChangeSecurityAttributeNamespaceCompartmentRequest buildWithoutInvocationCallback() { + ChangeSecurityAttributeNamespaceCompartmentRequest request = + new ChangeSecurityAttributeNamespaceCompartmentRequest(); + request.securityAttributeNamespaceId = securityAttributeNamespaceId; + request.changeSecurityAttributeNamespaceCompartmentDetails = + changeSecurityAttributeNamespaceCompartmentDetails; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new ChangeSecurityAttributeNamespaceCompartmentRequest(securityAttributeNamespaceId, changeSecurityAttributeNamespaceCompartmentDetails, opcRetryToken, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .securityAttributeNamespaceId(securityAttributeNamespaceId) + .changeSecurityAttributeNamespaceCompartmentDetails( + changeSecurityAttributeNamespaceCompartmentDetails) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(",changeSecurityAttributeNamespaceCompartmentDetails=") + .append(String.valueOf(this.changeSecurityAttributeNamespaceCompartmentDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeSecurityAttributeNamespaceCompartmentRequest)) { + return false; + } + + ChangeSecurityAttributeNamespaceCompartmentRequest other = + (ChangeSecurityAttributeNamespaceCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals( + this.changeSecurityAttributeNamespaceCompartmentDetails, + other.changeSecurityAttributeNamespaceCompartmentDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = + (result * PRIME) + + (this.changeSecurityAttributeNamespaceCompartmentDetails == null + ? 43 + : this.changeSecurityAttributeNamespaceCompartmentDetails + .hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CreateSecurityAttributeNamespaceRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CreateSecurityAttributeNamespaceRequest.java new file mode 100644 index 00000000000..75573fcef68 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CreateSecurityAttributeNamespaceRequest.java @@ -0,0 +1,307 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use CreateSecurityAttributeNamespaceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class CreateSecurityAttributeNamespaceRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.securityattribute.model.CreateSecurityAttributeNamespaceDetails> { + + /** + * Request object for creating a new security attribute namespace. + */ + private com.oracle.bmc.securityattribute.model.CreateSecurityAttributeNamespaceDetails + createSecurityAttributeNamespaceDetails; + + /** + * Request object for creating a new security attribute namespace. + */ + public com.oracle.bmc.securityattribute.model.CreateSecurityAttributeNamespaceDetails + getCreateSecurityAttributeNamespaceDetails() { + return createSecurityAttributeNamespaceDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.securityattribute.model.CreateSecurityAttributeNamespaceDetails + getBody$() { + return createSecurityAttributeNamespaceDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateSecurityAttributeNamespaceRequest, + com.oracle.bmc.securityattribute.model + .CreateSecurityAttributeNamespaceDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Request object for creating a new security attribute namespace. + */ + private com.oracle.bmc.securityattribute.model.CreateSecurityAttributeNamespaceDetails + createSecurityAttributeNamespaceDetails = null; + + /** + * Request object for creating a new security attribute namespace. + * @param createSecurityAttributeNamespaceDetails the value to set + * @return this builder instance + */ + public Builder createSecurityAttributeNamespaceDetails( + com.oracle.bmc.securityattribute.model.CreateSecurityAttributeNamespaceDetails + createSecurityAttributeNamespaceDetails) { + this.createSecurityAttributeNamespaceDetails = createSecurityAttributeNamespaceDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateSecurityAttributeNamespaceRequest o) { + createSecurityAttributeNamespaceDetails(o.getCreateSecurityAttributeNamespaceDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateSecurityAttributeNamespaceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateSecurityAttributeNamespaceRequest + */ + public CreateSecurityAttributeNamespaceRequest build() { + CreateSecurityAttributeNamespaceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.securityattribute.model.CreateSecurityAttributeNamespaceDetails + body) { + createSecurityAttributeNamespaceDetails(body); + return this; + } + + /** + * Build the instance of CreateSecurityAttributeNamespaceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateSecurityAttributeNamespaceRequest + */ + public CreateSecurityAttributeNamespaceRequest buildWithoutInvocationCallback() { + CreateSecurityAttributeNamespaceRequest request = + new CreateSecurityAttributeNamespaceRequest(); + request.createSecurityAttributeNamespaceDetails = + createSecurityAttributeNamespaceDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateSecurityAttributeNamespaceRequest(createSecurityAttributeNamespaceDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createSecurityAttributeNamespaceDetails(createSecurityAttributeNamespaceDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createSecurityAttributeNamespaceDetails=") + .append(String.valueOf(this.createSecurityAttributeNamespaceDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSecurityAttributeNamespaceRequest)) { + return false; + } + + CreateSecurityAttributeNamespaceRequest other = (CreateSecurityAttributeNamespaceRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createSecurityAttributeNamespaceDetails, + other.createSecurityAttributeNamespaceDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createSecurityAttributeNamespaceDetails == null + ? 43 + : this.createSecurityAttributeNamespaceDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CreateSecurityAttributeRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CreateSecurityAttributeRequest.java new file mode 100644 index 00000000000..0eb065f76d4 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CreateSecurityAttributeRequest.java @@ -0,0 +1,343 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use CreateSecurityAttributeRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class CreateSecurityAttributeRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.securityattribute.model.CreateSecurityAttributeDetails> { + + /** + * The OCID of the security attribute namespace. + * + */ + private String securityAttributeNamespaceId; + + /** + * The OCID of the security attribute namespace. + * + */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + /** + * Request object for creating a new security attribute in the specified security attribute namespace. + */ + private com.oracle.bmc.securityattribute.model.CreateSecurityAttributeDetails + createSecurityAttributeDetails; + + /** + * Request object for creating a new security attribute in the specified security attribute namespace. + */ + public com.oracle.bmc.securityattribute.model.CreateSecurityAttributeDetails + getCreateSecurityAttributeDetails() { + return createSecurityAttributeDetails; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.securityattribute.model.CreateSecurityAttributeDetails getBody$() { + return createSecurityAttributeDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateSecurityAttributeRequest, + com.oracle.bmc.securityattribute.model.CreateSecurityAttributeDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the security attribute namespace. + * + */ + private String securityAttributeNamespaceId = null; + + /** + * The OCID of the security attribute namespace. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder instance + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + return this; + } + + /** + * Request object for creating a new security attribute in the specified security attribute namespace. + */ + private com.oracle.bmc.securityattribute.model.CreateSecurityAttributeDetails + createSecurityAttributeDetails = null; + + /** + * Request object for creating a new security attribute in the specified security attribute namespace. + * @param createSecurityAttributeDetails the value to set + * @return this builder instance + */ + public Builder createSecurityAttributeDetails( + com.oracle.bmc.securityattribute.model.CreateSecurityAttributeDetails + createSecurityAttributeDetails) { + this.createSecurityAttributeDetails = createSecurityAttributeDetails; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateSecurityAttributeRequest o) { + securityAttributeNamespaceId(o.getSecurityAttributeNamespaceId()); + createSecurityAttributeDetails(o.getCreateSecurityAttributeDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateSecurityAttributeRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateSecurityAttributeRequest + */ + public CreateSecurityAttributeRequest build() { + CreateSecurityAttributeRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.securityattribute.model.CreateSecurityAttributeDetails body) { + createSecurityAttributeDetails(body); + return this; + } + + /** + * Build the instance of CreateSecurityAttributeRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateSecurityAttributeRequest + */ + public CreateSecurityAttributeRequest buildWithoutInvocationCallback() { + CreateSecurityAttributeRequest request = new CreateSecurityAttributeRequest(); + request.securityAttributeNamespaceId = securityAttributeNamespaceId; + request.createSecurityAttributeDetails = createSecurityAttributeDetails; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new CreateSecurityAttributeRequest(securityAttributeNamespaceId, createSecurityAttributeDetails, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .securityAttributeNamespaceId(securityAttributeNamespaceId) + .createSecurityAttributeDetails(createSecurityAttributeDetails) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(",createSecurityAttributeDetails=") + .append(String.valueOf(this.createSecurityAttributeDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSecurityAttributeRequest)) { + return false; + } + + CreateSecurityAttributeRequest other = (CreateSecurityAttributeRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals( + this.createSecurityAttributeDetails, other.createSecurityAttributeDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = + (result * PRIME) + + (this.createSecurityAttributeDetails == null + ? 43 + : this.createSecurityAttributeDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/DeleteSecurityAttributeNamespaceRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/DeleteSecurityAttributeNamespaceRequest.java new file mode 100644 index 00000000000..322d91e323a --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/DeleteSecurityAttributeNamespaceRequest.java @@ -0,0 +1,325 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use DeleteSecurityAttributeNamespaceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class DeleteSecurityAttributeNamespaceRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the security attribute namespace. + * + */ + private String securityAttributeNamespaceId; + + /** + * The OCID of the security attribute namespace. + * + */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteSecurityAttributeNamespaceRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the security attribute namespace. + * + */ + private String securityAttributeNamespaceId = null; + + /** + * The OCID of the security attribute namespace. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder instance + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteSecurityAttributeNamespaceRequest o) { + securityAttributeNamespaceId(o.getSecurityAttributeNamespaceId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteSecurityAttributeNamespaceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteSecurityAttributeNamespaceRequest + */ + public DeleteSecurityAttributeNamespaceRequest build() { + DeleteSecurityAttributeNamespaceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteSecurityAttributeNamespaceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteSecurityAttributeNamespaceRequest + */ + public DeleteSecurityAttributeNamespaceRequest buildWithoutInvocationCallback() { + DeleteSecurityAttributeNamespaceRequest request = + new DeleteSecurityAttributeNamespaceRequest(); + request.securityAttributeNamespaceId = securityAttributeNamespaceId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new DeleteSecurityAttributeNamespaceRequest(securityAttributeNamespaceId, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .securityAttributeNamespaceId(securityAttributeNamespaceId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSecurityAttributeNamespaceRequest)) { + return false; + } + + DeleteSecurityAttributeNamespaceRequest other = (DeleteSecurityAttributeNamespaceRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/DeleteSecurityAttributeRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/DeleteSecurityAttributeRequest.java new file mode 100644 index 00000000000..f56b71154d6 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/DeleteSecurityAttributeRequest.java @@ -0,0 +1,364 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use DeleteSecurityAttributeRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class DeleteSecurityAttributeRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the security attribute namespace. + * + */ + private String securityAttributeNamespaceId; + + /** + * The OCID of the security attribute namespace. + * + */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + /** + * The name of the security attribute. + * + */ + private String securityAttributeName; + + /** + * The name of the security attribute. + * + */ + public String getSecurityAttributeName() { + return securityAttributeName; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteSecurityAttributeRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the security attribute namespace. + * + */ + private String securityAttributeNamespaceId = null; + + /** + * The OCID of the security attribute namespace. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder instance + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + return this; + } + + /** + * The name of the security attribute. + * + */ + private String securityAttributeName = null; + + /** + * The name of the security attribute. + * + * @param securityAttributeName the value to set + * @return this builder instance + */ + public Builder securityAttributeName(String securityAttributeName) { + this.securityAttributeName = securityAttributeName; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteSecurityAttributeRequest o) { + securityAttributeNamespaceId(o.getSecurityAttributeNamespaceId()); + securityAttributeName(o.getSecurityAttributeName()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteSecurityAttributeRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteSecurityAttributeRequest + */ + public DeleteSecurityAttributeRequest build() { + DeleteSecurityAttributeRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteSecurityAttributeRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteSecurityAttributeRequest + */ + public DeleteSecurityAttributeRequest buildWithoutInvocationCallback() { + DeleteSecurityAttributeRequest request = new DeleteSecurityAttributeRequest(); + request.securityAttributeNamespaceId = securityAttributeNamespaceId; + request.securityAttributeName = securityAttributeName; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new DeleteSecurityAttributeRequest(securityAttributeNamespaceId, securityAttributeName, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .securityAttributeNamespaceId(securityAttributeNamespaceId) + .securityAttributeName(securityAttributeName) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(",securityAttributeName=").append(String.valueOf(this.securityAttributeName)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSecurityAttributeRequest)) { + return false; + } + + DeleteSecurityAttributeRequest other = (DeleteSecurityAttributeRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals(this.securityAttributeName, other.securityAttributeName) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeName == null + ? 43 + : this.securityAttributeName.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeNamespaceRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeNamespaceRequest.java new file mode 100644 index 00000000000..9756a8918f6 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeNamespaceRequest.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use GetSecurityAttributeNamespaceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class GetSecurityAttributeNamespaceRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the security attribute namespace. + * + */ + private String securityAttributeNamespaceId; + + /** + * The OCID of the security attribute namespace. + * + */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetSecurityAttributeNamespaceRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the security attribute namespace. + * + */ + private String securityAttributeNamespaceId = null; + + /** + * The OCID of the security attribute namespace. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder instance + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSecurityAttributeNamespaceRequest o) { + securityAttributeNamespaceId(o.getSecurityAttributeNamespaceId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetSecurityAttributeNamespaceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetSecurityAttributeNamespaceRequest + */ + public GetSecurityAttributeNamespaceRequest build() { + GetSecurityAttributeNamespaceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetSecurityAttributeNamespaceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetSecurityAttributeNamespaceRequest + */ + public GetSecurityAttributeNamespaceRequest buildWithoutInvocationCallback() { + GetSecurityAttributeNamespaceRequest request = + new GetSecurityAttributeNamespaceRequest(); + request.securityAttributeNamespaceId = securityAttributeNamespaceId; + request.opcRequestId = opcRequestId; + return request; + // new GetSecurityAttributeNamespaceRequest(securityAttributeNamespaceId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .securityAttributeNamespaceId(securityAttributeNamespaceId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSecurityAttributeNamespaceRequest)) { + return false; + } + + GetSecurityAttributeNamespaceRequest other = (GetSecurityAttributeNamespaceRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeRequest.java new file mode 100644 index 00000000000..9a3d8a0884a --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeRequest.java @@ -0,0 +1,262 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use GetSecurityAttributeRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class GetSecurityAttributeRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the security attribute namespace. + * + */ + private String securityAttributeNamespaceId; + + /** + * The OCID of the security attribute namespace. + * + */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + /** + * The name of the security attribute. + * + */ + private String securityAttributeName; + + /** + * The name of the security attribute. + * + */ + public String getSecurityAttributeName() { + return securityAttributeName; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetSecurityAttributeRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the security attribute namespace. + * + */ + private String securityAttributeNamespaceId = null; + + /** + * The OCID of the security attribute namespace. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder instance + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + return this; + } + + /** + * The name of the security attribute. + * + */ + private String securityAttributeName = null; + + /** + * The name of the security attribute. + * + * @param securityAttributeName the value to set + * @return this builder instance + */ + public Builder securityAttributeName(String securityAttributeName) { + this.securityAttributeName = securityAttributeName; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSecurityAttributeRequest o) { + securityAttributeNamespaceId(o.getSecurityAttributeNamespaceId()); + securityAttributeName(o.getSecurityAttributeName()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetSecurityAttributeRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetSecurityAttributeRequest + */ + public GetSecurityAttributeRequest build() { + GetSecurityAttributeRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetSecurityAttributeRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetSecurityAttributeRequest + */ + public GetSecurityAttributeRequest buildWithoutInvocationCallback() { + GetSecurityAttributeRequest request = new GetSecurityAttributeRequest(); + request.securityAttributeNamespaceId = securityAttributeNamespaceId; + request.securityAttributeName = securityAttributeName; + request.opcRequestId = opcRequestId; + return request; + // new GetSecurityAttributeRequest(securityAttributeNamespaceId, securityAttributeName, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .securityAttributeNamespaceId(securityAttributeNamespaceId) + .securityAttributeName(securityAttributeName) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(",securityAttributeName=").append(String.valueOf(this.securityAttributeName)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSecurityAttributeRequest)) { + return false; + } + + GetSecurityAttributeRequest other = (GetSecurityAttributeRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals(this.securityAttributeName, other.securityAttributeName) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeName == null + ? 43 + : this.securityAttributeName.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeWorkRequestRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeWorkRequestRequest.java new file mode 100644 index 00000000000..19ef8ee5954 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeWorkRequestRequest.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use GetSecurityAttributeWorkRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class GetSecurityAttributeWorkRequestRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the work request. + */ + private String workRequestId; + + /** + * The OCID of the work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetSecurityAttributeWorkRequestRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the work request. + */ + private String workRequestId = null; + + /** + * The OCID of the work request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSecurityAttributeWorkRequestRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetSecurityAttributeWorkRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetSecurityAttributeWorkRequestRequest + */ + public GetSecurityAttributeWorkRequestRequest build() { + GetSecurityAttributeWorkRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetSecurityAttributeWorkRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetSecurityAttributeWorkRequestRequest + */ + public GetSecurityAttributeWorkRequestRequest buildWithoutInvocationCallback() { + GetSecurityAttributeWorkRequestRequest request = + new GetSecurityAttributeWorkRequestRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + return request; + // new GetSecurityAttributeWorkRequestRequest(workRequestId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().workRequestId(workRequestId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSecurityAttributeWorkRequestRequest)) { + return false; + } + + GetSecurityAttributeWorkRequestRequest other = (GetSecurityAttributeWorkRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeNamespacesRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeNamespacesRequest.java new file mode 100644 index 00000000000..3b1a1fadeb3 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeNamespacesRequest.java @@ -0,0 +1,547 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use ListSecurityAttributeNamespacesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributeNamespacesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + */ + private String page; + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + */ + public String getPage() { + return page; + } + /** + * The maximum number of items to return in a paginated "List" call. + * + */ + private Integer limit; + + /** + * The maximum number of items to return in a paginated "List" call. + * + */ + public Integer getLimit() { + return limit; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.securityattribute.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.securityattribute.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for NAME is ascending. The NAME + * sort order is case sensitive. + *

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these "List" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for NAME is ascending. The NAME + * sort order is case sensitive. + *

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these "List" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Name("NAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for NAME is ascending. The NAME + * sort order is case sensitive. + *

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these "List" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String name; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getName() { + return name; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * An optional boolean parameter indicating whether to retrieve all security attribute namespaces in subcompartments. If this + * parameter is not specified, only the namespaces defined in the specified compartment are retrieved. + * + */ + private Boolean compartmentIdInSubtree; + + /** + * An optional boolean parameter indicating whether to retrieve all security attribute namespaces in subcompartments. If this + * parameter is not specified, only the namespaces defined in the specified compartment are retrieved. + * + */ + public Boolean getCompartmentIdInSubtree() { + return compartmentIdInSubtree; + } + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + */ + private com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace.LifecycleState + lifecycleState; + + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + */ + public com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace.LifecycleState + getLifecycleState() { + return lifecycleState; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListSecurityAttributeNamespacesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + */ + private String page = null; + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The maximum number of items to return in a paginated "List" call. + * + */ + private Integer limit = null; + + /** + * The maximum number of items to return in a paginated "List" call. + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.securityattribute.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.securityattribute.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for NAME is ascending. The NAME + * sort order is case sensitive. + *

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these "List" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for NAME is ascending. The NAME + * sort order is case sensitive. + *

+ **Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by Availability Domain if the scope of the resource type is within a + * single Availability Domain. If you call one of these "List" operations without specifying + * an Availability Domain, the resources are grouped by Availability Domain, then sorted. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String name = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param name the value to set + * @return this builder instance + */ + public Builder name(String name) { + this.name = name; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * An optional boolean parameter indicating whether to retrieve all security attribute namespaces in subcompartments. If this + * parameter is not specified, only the namespaces defined in the specified compartment are retrieved. + * + */ + private Boolean compartmentIdInSubtree = null; + + /** + * An optional boolean parameter indicating whether to retrieve all security attribute namespaces in subcompartments. If this + * parameter is not specified, only the namespaces defined in the specified compartment are retrieved. + * + * @param compartmentIdInSubtree the value to set + * @return this builder instance + */ + public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { + this.compartmentIdInSubtree = compartmentIdInSubtree; + return this; + } + + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + */ + private com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace.LifecycleState + lifecycleState = null; + + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSecurityAttributeNamespacesRequest o) { + compartmentId(o.getCompartmentId()); + page(o.getPage()); + limit(o.getLimit()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + name(o.getName()); + opcRequestId(o.getOpcRequestId()); + compartmentIdInSubtree(o.getCompartmentIdInSubtree()); + lifecycleState(o.getLifecycleState()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListSecurityAttributeNamespacesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListSecurityAttributeNamespacesRequest + */ + public ListSecurityAttributeNamespacesRequest build() { + ListSecurityAttributeNamespacesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListSecurityAttributeNamespacesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListSecurityAttributeNamespacesRequest + */ + public ListSecurityAttributeNamespacesRequest buildWithoutInvocationCallback() { + ListSecurityAttributeNamespacesRequest request = + new ListSecurityAttributeNamespacesRequest(); + request.compartmentId = compartmentId; + request.page = page; + request.limit = limit; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.name = name; + request.opcRequestId = opcRequestId; + request.compartmentIdInSubtree = compartmentIdInSubtree; + request.lifecycleState = lifecycleState; + return request; + // new ListSecurityAttributeNamespacesRequest(compartmentId, page, limit, sortOrder, sortBy, name, opcRequestId, compartmentIdInSubtree, lifecycleState); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .page(page) + .limit(limit) + .sortOrder(sortOrder) + .sortBy(sortBy) + .name(name) + .opcRequestId(opcRequestId) + .compartmentIdInSubtree(compartmentIdInSubtree) + .lifecycleState(lifecycleState); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",name=").append(String.valueOf(this.name)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",compartmentIdInSubtree=").append(String.valueOf(this.compartmentIdInSubtree)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSecurityAttributeNamespacesRequest)) { + return false; + } + + ListSecurityAttributeNamespacesRequest other = (ListSecurityAttributeNamespacesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.compartmentIdInSubtree, other.compartmentIdInSubtree) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.compartmentIdInSubtree == null + ? 43 + : this.compartmentIdInSubtree.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestErrorsRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestErrorsRequest.java new file mode 100644 index 00000000000..97595fa9f5d --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestErrorsRequest.java @@ -0,0 +1,289 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use ListSecurityAttributeWorkRequestErrorsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributeWorkRequestErrorsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the work request. + */ + private String workRequestId; + + /** + * The OCID of the work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + */ + private String page; + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + */ + public String getPage() { + return page; + } + /** + * The maximum number of items to return in a paginated "List" call. + * + */ + private Integer limit; + + /** + * The maximum number of items to return in a paginated "List" call. + * + */ + public Integer getLimit() { + return limit; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListSecurityAttributeWorkRequestErrorsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the work request. + */ + private String workRequestId = null; + + /** + * The OCID of the work request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + */ + private String page = null; + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The maximum number of items to return in a paginated "List" call. + * + */ + private Integer limit = null; + + /** + * The maximum number of items to return in a paginated "List" call. + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSecurityAttributeWorkRequestErrorsRequest o) { + workRequestId(o.getWorkRequestId()); + page(o.getPage()); + limit(o.getLimit()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListSecurityAttributeWorkRequestErrorsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListSecurityAttributeWorkRequestErrorsRequest + */ + public ListSecurityAttributeWorkRequestErrorsRequest build() { + ListSecurityAttributeWorkRequestErrorsRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListSecurityAttributeWorkRequestErrorsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListSecurityAttributeWorkRequestErrorsRequest + */ + public ListSecurityAttributeWorkRequestErrorsRequest buildWithoutInvocationCallback() { + ListSecurityAttributeWorkRequestErrorsRequest request = + new ListSecurityAttributeWorkRequestErrorsRequest(); + request.workRequestId = workRequestId; + request.page = page; + request.limit = limit; + request.opcRequestId = opcRequestId; + return request; + // new ListSecurityAttributeWorkRequestErrorsRequest(workRequestId, page, limit, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .workRequestId(workRequestId) + .page(page) + .limit(limit) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSecurityAttributeWorkRequestErrorsRequest)) { + return false; + } + + ListSecurityAttributeWorkRequestErrorsRequest other = + (ListSecurityAttributeWorkRequestErrorsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestLogsRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestLogsRequest.java new file mode 100644 index 00000000000..f7371124b7d --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestLogsRequest.java @@ -0,0 +1,288 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use ListSecurityAttributeWorkRequestLogsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributeWorkRequestLogsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the work request. + */ + private String workRequestId; + + /** + * The OCID of the work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + */ + private String page; + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + */ + public String getPage() { + return page; + } + /** + * The maximum number of items to return in a paginated "List" call. + * + */ + private Integer limit; + + /** + * The maximum number of items to return in a paginated "List" call. + * + */ + public Integer getLimit() { + return limit; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListSecurityAttributeWorkRequestLogsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the work request. + */ + private String workRequestId = null; + + /** + * The OCID of the work request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + */ + private String page = null; + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The maximum number of items to return in a paginated "List" call. + * + */ + private Integer limit = null; + + /** + * The maximum number of items to return in a paginated "List" call. + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSecurityAttributeWorkRequestLogsRequest o) { + workRequestId(o.getWorkRequestId()); + page(o.getPage()); + limit(o.getLimit()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListSecurityAttributeWorkRequestLogsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListSecurityAttributeWorkRequestLogsRequest + */ + public ListSecurityAttributeWorkRequestLogsRequest build() { + ListSecurityAttributeWorkRequestLogsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListSecurityAttributeWorkRequestLogsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListSecurityAttributeWorkRequestLogsRequest + */ + public ListSecurityAttributeWorkRequestLogsRequest buildWithoutInvocationCallback() { + ListSecurityAttributeWorkRequestLogsRequest request = + new ListSecurityAttributeWorkRequestLogsRequest(); + request.workRequestId = workRequestId; + request.page = page; + request.limit = limit; + request.opcRequestId = opcRequestId; + return request; + // new ListSecurityAttributeWorkRequestLogsRequest(workRequestId, page, limit, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .workRequestId(workRequestId) + .page(page) + .limit(limit) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSecurityAttributeWorkRequestLogsRequest)) { + return false; + } + + ListSecurityAttributeWorkRequestLogsRequest other = + (ListSecurityAttributeWorkRequestLogsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestsRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestsRequest.java new file mode 100644 index 00000000000..20e8fcd4bfe --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestsRequest.java @@ -0,0 +1,324 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use ListSecurityAttributeWorkRequestsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributeWorkRequestsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + */ + private String page; + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + */ + public String getPage() { + return page; + } + /** + * The maximum number of items to return in a paginated "List" call. + * + */ + private Integer limit; + + /** + * The maximum number of items to return in a paginated "List" call. + * + */ + public Integer getLimit() { + return limit; + } + /** + * The identifier of the resource the work request affects. + */ + private String resourceIdentifier; + + /** + * The identifier of the resource the work request affects. + */ + public String getResourceIdentifier() { + return resourceIdentifier; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListSecurityAttributeWorkRequestsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + */ + private String page = null; + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The maximum number of items to return in a paginated "List" call. + * + */ + private Integer limit = null; + + /** + * The maximum number of items to return in a paginated "List" call. + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The identifier of the resource the work request affects. + */ + private String resourceIdentifier = null; + + /** + * The identifier of the resource the work request affects. + * @param resourceIdentifier the value to set + * @return this builder instance + */ + public Builder resourceIdentifier(String resourceIdentifier) { + this.resourceIdentifier = resourceIdentifier; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSecurityAttributeWorkRequestsRequest o) { + compartmentId(o.getCompartmentId()); + page(o.getPage()); + limit(o.getLimit()); + resourceIdentifier(o.getResourceIdentifier()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListSecurityAttributeWorkRequestsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListSecurityAttributeWorkRequestsRequest + */ + public ListSecurityAttributeWorkRequestsRequest build() { + ListSecurityAttributeWorkRequestsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListSecurityAttributeWorkRequestsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListSecurityAttributeWorkRequestsRequest + */ + public ListSecurityAttributeWorkRequestsRequest buildWithoutInvocationCallback() { + ListSecurityAttributeWorkRequestsRequest request = + new ListSecurityAttributeWorkRequestsRequest(); + request.compartmentId = compartmentId; + request.page = page; + request.limit = limit; + request.resourceIdentifier = resourceIdentifier; + request.opcRequestId = opcRequestId; + return request; + // new ListSecurityAttributeWorkRequestsRequest(compartmentId, page, limit, resourceIdentifier, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .page(page) + .limit(limit) + .resourceIdentifier(resourceIdentifier) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",resourceIdentifier=").append(String.valueOf(this.resourceIdentifier)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSecurityAttributeWorkRequestsRequest)) { + return false; + } + + ListSecurityAttributeWorkRequestsRequest other = + (ListSecurityAttributeWorkRequestsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.resourceIdentifier, other.resourceIdentifier) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = + (result * PRIME) + + (this.resourceIdentifier == null + ? 43 + : this.resourceIdentifier.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributesRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributesRequest.java new file mode 100644 index 00000000000..852da382c34 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributesRequest.java @@ -0,0 +1,336 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use ListSecurityAttributesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the security attribute namespace. + * + */ + private String securityAttributeNamespaceId; + + /** + * The OCID of the security attribute namespace. + * + */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + */ + private String page; + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + */ + public String getPage() { + return page; + } + /** + * The maximum number of items to return in a paginated "List" call. + * + */ + private Integer limit; + + /** + * The maximum number of items to return in a paginated "List" call. + * + */ + public Integer getLimit() { + return limit; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + */ + private com.oracle.bmc.securityattribute.model.SecurityAttribute.LifecycleState lifecycleState; + + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + */ + public com.oracle.bmc.securityattribute.model.SecurityAttribute.LifecycleState + getLifecycleState() { + return lifecycleState; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListSecurityAttributesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the security attribute namespace. + * + */ + private String securityAttributeNamespaceId = null; + + /** + * The OCID of the security attribute namespace. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder instance + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + return this; + } + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + */ + private String page = null; + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The maximum number of items to return in a paginated "List" call. + * + */ + private Integer limit = null; + + /** + * The maximum number of items to return in a paginated "List" call. + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + */ + private com.oracle.bmc.securityattribute.model.SecurityAttribute.LifecycleState + lifecycleState = null; + + /** + * A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + * + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.securityattribute.model.SecurityAttribute.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSecurityAttributesRequest o) { + securityAttributeNamespaceId(o.getSecurityAttributeNamespaceId()); + page(o.getPage()); + limit(o.getLimit()); + opcRequestId(o.getOpcRequestId()); + lifecycleState(o.getLifecycleState()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListSecurityAttributesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListSecurityAttributesRequest + */ + public ListSecurityAttributesRequest build() { + ListSecurityAttributesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListSecurityAttributesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListSecurityAttributesRequest + */ + public ListSecurityAttributesRequest buildWithoutInvocationCallback() { + ListSecurityAttributesRequest request = new ListSecurityAttributesRequest(); + request.securityAttributeNamespaceId = securityAttributeNamespaceId; + request.page = page; + request.limit = limit; + request.opcRequestId = opcRequestId; + request.lifecycleState = lifecycleState; + return request; + // new ListSecurityAttributesRequest(securityAttributeNamespaceId, page, limit, opcRequestId, lifecycleState); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .securityAttributeNamespaceId(securityAttributeNamespaceId) + .page(page) + .limit(limit) + .opcRequestId(opcRequestId) + .lifecycleState(lifecycleState); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSecurityAttributesRequest)) { + return false; + } + + ListSecurityAttributesRequest other = (ListSecurityAttributesRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/UpdateSecurityAttributeNamespaceRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/UpdateSecurityAttributeNamespaceRequest.java new file mode 100644 index 00000000000..215e74dd440 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/UpdateSecurityAttributeNamespaceRequest.java @@ -0,0 +1,397 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use UpdateSecurityAttributeNamespaceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class UpdateSecurityAttributeNamespaceRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeNamespaceDetails> { + + /** + * The OCID of the security attribute namespace. + * + */ + private String securityAttributeNamespaceId; + + /** + * The OCID of the security attribute namespace. + * + */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + /** + * Request object for updating a namespace. + */ + private com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeNamespaceDetails + updateSecurityAttributeNamespaceDetails; + + /** + * Request object for updating a namespace. + */ + public com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeNamespaceDetails + getUpdateSecurityAttributeNamespaceDetails() { + return updateSecurityAttributeNamespaceDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeNamespaceDetails + getBody$() { + return updateSecurityAttributeNamespaceDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateSecurityAttributeNamespaceRequest, + com.oracle.bmc.securityattribute.model + .UpdateSecurityAttributeNamespaceDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the security attribute namespace. + * + */ + private String securityAttributeNamespaceId = null; + + /** + * The OCID of the security attribute namespace. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder instance + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + return this; + } + + /** + * Request object for updating a namespace. + */ + private com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeNamespaceDetails + updateSecurityAttributeNamespaceDetails = null; + + /** + * Request object for updating a namespace. + * @param updateSecurityAttributeNamespaceDetails the value to set + * @return this builder instance + */ + public Builder updateSecurityAttributeNamespaceDetails( + com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeNamespaceDetails + updateSecurityAttributeNamespaceDetails) { + this.updateSecurityAttributeNamespaceDetails = updateSecurityAttributeNamespaceDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateSecurityAttributeNamespaceRequest o) { + securityAttributeNamespaceId(o.getSecurityAttributeNamespaceId()); + updateSecurityAttributeNamespaceDetails(o.getUpdateSecurityAttributeNamespaceDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateSecurityAttributeNamespaceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateSecurityAttributeNamespaceRequest + */ + public UpdateSecurityAttributeNamespaceRequest build() { + UpdateSecurityAttributeNamespaceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeNamespaceDetails + body) { + updateSecurityAttributeNamespaceDetails(body); + return this; + } + + /** + * Build the instance of UpdateSecurityAttributeNamespaceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateSecurityAttributeNamespaceRequest + */ + public UpdateSecurityAttributeNamespaceRequest buildWithoutInvocationCallback() { + UpdateSecurityAttributeNamespaceRequest request = + new UpdateSecurityAttributeNamespaceRequest(); + request.securityAttributeNamespaceId = securityAttributeNamespaceId; + request.updateSecurityAttributeNamespaceDetails = + updateSecurityAttributeNamespaceDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new UpdateSecurityAttributeNamespaceRequest(securityAttributeNamespaceId, updateSecurityAttributeNamespaceDetails, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .securityAttributeNamespaceId(securityAttributeNamespaceId) + .updateSecurityAttributeNamespaceDetails(updateSecurityAttributeNamespaceDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(",updateSecurityAttributeNamespaceDetails=") + .append(String.valueOf(this.updateSecurityAttributeNamespaceDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSecurityAttributeNamespaceRequest)) { + return false; + } + + UpdateSecurityAttributeNamespaceRequest other = (UpdateSecurityAttributeNamespaceRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals( + this.updateSecurityAttributeNamespaceDetails, + other.updateSecurityAttributeNamespaceDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = + (result * PRIME) + + (this.updateSecurityAttributeNamespaceDetails == null + ? 43 + : this.updateSecurityAttributeNamespaceDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/UpdateSecurityAttributeRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/UpdateSecurityAttributeRequest.java new file mode 100644 index 00000000000..385ac3963eb --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/UpdateSecurityAttributeRequest.java @@ -0,0 +1,431 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use UpdateSecurityAttributeRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class UpdateSecurityAttributeRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeDetails> { + + /** + * The OCID of the security attribute namespace. + * + */ + private String securityAttributeNamespaceId; + + /** + * The OCID of the security attribute namespace. + * + */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + /** + * The name of the security attribute. + * + */ + private String securityAttributeName; + + /** + * The name of the security attribute. + * + */ + public String getSecurityAttributeName() { + return securityAttributeName; + } + /** + * Request object for updating a security attribute. + */ + private com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeDetails + updateSecurityAttributeDetails; + + /** + * Request object for updating a security attribute. + */ + public com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeDetails + getUpdateSecurityAttributeDetails() { + return updateSecurityAttributeDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeDetails getBody$() { + return updateSecurityAttributeDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateSecurityAttributeRequest, + com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The OCID of the security attribute namespace. + * + */ + private String securityAttributeNamespaceId = null; + + /** + * The OCID of the security attribute namespace. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder instance + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + return this; + } + + /** + * The name of the security attribute. + * + */ + private String securityAttributeName = null; + + /** + * The name of the security attribute. + * + * @param securityAttributeName the value to set + * @return this builder instance + */ + public Builder securityAttributeName(String securityAttributeName) { + this.securityAttributeName = securityAttributeName; + return this; + } + + /** + * Request object for updating a security attribute. + */ + private com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeDetails + updateSecurityAttributeDetails = null; + + /** + * Request object for updating a security attribute. + * @param updateSecurityAttributeDetails the value to set + * @return this builder instance + */ + public Builder updateSecurityAttributeDetails( + com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeDetails + updateSecurityAttributeDetails) { + this.updateSecurityAttributeDetails = updateSecurityAttributeDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateSecurityAttributeRequest o) { + securityAttributeNamespaceId(o.getSecurityAttributeNamespaceId()); + securityAttributeName(o.getSecurityAttributeName()); + updateSecurityAttributeDetails(o.getUpdateSecurityAttributeDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateSecurityAttributeRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateSecurityAttributeRequest + */ + public UpdateSecurityAttributeRequest build() { + UpdateSecurityAttributeRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeDetails body) { + updateSecurityAttributeDetails(body); + return this; + } + + /** + * Build the instance of UpdateSecurityAttributeRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateSecurityAttributeRequest + */ + public UpdateSecurityAttributeRequest buildWithoutInvocationCallback() { + UpdateSecurityAttributeRequest request = new UpdateSecurityAttributeRequest(); + request.securityAttributeNamespaceId = securityAttributeNamespaceId; + request.securityAttributeName = securityAttributeName; + request.updateSecurityAttributeDetails = updateSecurityAttributeDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new UpdateSecurityAttributeRequest(securityAttributeNamespaceId, securityAttributeName, updateSecurityAttributeDetails, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .securityAttributeNamespaceId(securityAttributeNamespaceId) + .securityAttributeName(securityAttributeName) + .updateSecurityAttributeDetails(updateSecurityAttributeDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(",securityAttributeName=").append(String.valueOf(this.securityAttributeName)); + sb.append(",updateSecurityAttributeDetails=") + .append(String.valueOf(this.updateSecurityAttributeDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSecurityAttributeRequest)) { + return false; + } + + UpdateSecurityAttributeRequest other = (UpdateSecurityAttributeRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals(this.securityAttributeName, other.securityAttributeName) + && java.util.Objects.equals( + this.updateSecurityAttributeDetails, other.updateSecurityAttributeDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeName == null + ? 43 + : this.securityAttributeName.hashCode()); + result = + (result * PRIME) + + (this.updateSecurityAttributeDetails == null + ? 43 + : this.updateSecurityAttributeDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/BulkDeleteSecurityAttributesResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/BulkDeleteSecurityAttributesResponse.java new file mode 100644 index 00000000000..bc019684bc2 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/BulkDeleteSecurityAttributesResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class BulkDeleteSecurityAttributesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private BulkDeleteSecurityAttributesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(BulkDeleteSecurityAttributesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public BulkDeleteSecurityAttributesResponse build() { + return new BulkDeleteSecurityAttributesResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkDeleteSecurityAttributesResponse)) { + return false; + } + + BulkDeleteSecurityAttributesResponse other = (BulkDeleteSecurityAttributesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/BulkEditSecurityAttributesResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/BulkEditSecurityAttributesResponse.java new file mode 100644 index 00000000000..5ef11f6095c --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/BulkEditSecurityAttributesResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class BulkEditSecurityAttributesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private BulkEditSecurityAttributesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(BulkEditSecurityAttributesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public BulkEditSecurityAttributesResponse build() { + return new BulkEditSecurityAttributesResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkEditSecurityAttributesResponse)) { + return false; + } + + BulkEditSecurityAttributesResponse other = (BulkEditSecurityAttributesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CascadingDeleteSecurityAttributeNamespaceResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CascadingDeleteSecurityAttributeNamespaceResponse.java new file mode 100644 index 00000000000..1af8e7750b0 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CascadingDeleteSecurityAttributeNamespaceResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class CascadingDeleteSecurityAttributeNamespaceResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private CascadingDeleteSecurityAttributeNamespaceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CascadingDeleteSecurityAttributeNamespaceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CascadingDeleteSecurityAttributeNamespaceResponse build() { + return new CascadingDeleteSecurityAttributeNamespaceResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CascadingDeleteSecurityAttributeNamespaceResponse)) { + return false; + } + + CascadingDeleteSecurityAttributeNamespaceResponse other = + (CascadingDeleteSecurityAttributeNamespaceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ChangeSecurityAttributeNamespaceCompartmentResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ChangeSecurityAttributeNamespaceCompartmentResponse.java new file mode 100644 index 00000000000..3ab4ef71309 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ChangeSecurityAttributeNamespaceCompartmentResponse.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ChangeSecurityAttributeNamespaceCompartmentResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private ChangeSecurityAttributeNamespaceCompartmentResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeSecurityAttributeNamespaceCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ChangeSecurityAttributeNamespaceCompartmentResponse build() { + return new ChangeSecurityAttributeNamespaceCompartmentResponse( + __httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeSecurityAttributeNamespaceCompartmentResponse)) { + return false; + } + + ChangeSecurityAttributeNamespaceCompartmentResponse other = + (ChangeSecurityAttributeNamespaceCompartmentResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CreateSecurityAttributeNamespaceResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CreateSecurityAttributeNamespaceResponse.java new file mode 100644 index 00000000000..1365e206d65 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CreateSecurityAttributeNamespaceResponse.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class CreateSecurityAttributeNamespaceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned SecurityAttributeNamespace instance. + */ + private com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace; + + /** + * The returned SecurityAttributeNamespace instance. + * @return the value + */ + public com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + getSecurityAttributeNamespace() { + return securityAttributeNamespace; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "securityAttributeNamespace" + }) + private CreateSecurityAttributeNamespaceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.securityAttributeNamespace = securityAttributeNamespace; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned SecurityAttributeNamespace instance. + */ + private com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace; + + /** + * The returned SecurityAttributeNamespace instance. + * @param securityAttributeNamespace the value to set + * @return this builder + */ + public Builder securityAttributeNamespace( + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace) { + this.securityAttributeNamespace = securityAttributeNamespace; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateSecurityAttributeNamespaceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + securityAttributeNamespace(o.getSecurityAttributeNamespace()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateSecurityAttributeNamespaceResponse build() { + return new CreateSecurityAttributeNamespaceResponse( + __httpStatusCode__, headers, opcRequestId, etag, securityAttributeNamespace); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",securityAttributeNamespace=") + .append(String.valueOf(securityAttributeNamespace)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSecurityAttributeNamespaceResponse)) { + return false; + } + + CreateSecurityAttributeNamespaceResponse other = + (CreateSecurityAttributeNamespaceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals( + this.securityAttributeNamespace, other.securityAttributeNamespace); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeNamespace == null + ? 43 + : this.securityAttributeNamespace.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CreateSecurityAttributeResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CreateSecurityAttributeResponse.java new file mode 100644 index 00000000000..5117013f6d8 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CreateSecurityAttributeResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class CreateSecurityAttributeResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned SecurityAttribute instance. + */ + private com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute; + + /** + * The returned SecurityAttribute instance. + * @return the value + */ + public com.oracle.bmc.securityattribute.model.SecurityAttribute getSecurityAttribute() { + return securityAttribute; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "securityAttribute" + }) + private CreateSecurityAttributeResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.securityAttribute = securityAttribute; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned SecurityAttribute instance. + */ + private com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute; + + /** + * The returned SecurityAttribute instance. + * @param securityAttribute the value to set + * @return this builder + */ + public Builder securityAttribute( + com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute) { + this.securityAttribute = securityAttribute; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateSecurityAttributeResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + securityAttribute(o.getSecurityAttribute()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateSecurityAttributeResponse build() { + return new CreateSecurityAttributeResponse( + __httpStatusCode__, headers, opcRequestId, etag, securityAttribute); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",securityAttribute=").append(String.valueOf(securityAttribute)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSecurityAttributeResponse)) { + return false; + } + + CreateSecurityAttributeResponse other = (CreateSecurityAttributeResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.securityAttribute, other.securityAttribute); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.securityAttribute == null ? 43 : this.securityAttribute.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/DeleteSecurityAttributeNamespaceResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/DeleteSecurityAttributeNamespaceResponse.java new file mode 100644 index 00000000000..be8a2159968 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/DeleteSecurityAttributeNamespaceResponse.java @@ -0,0 +1,132 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class DeleteSecurityAttributeNamespaceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeleteSecurityAttributeNamespaceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteSecurityAttributeNamespaceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteSecurityAttributeNamespaceResponse build() { + return new DeleteSecurityAttributeNamespaceResponse( + __httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSecurityAttributeNamespaceResponse)) { + return false; + } + + DeleteSecurityAttributeNamespaceResponse other = + (DeleteSecurityAttributeNamespaceResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/DeleteSecurityAttributeResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/DeleteSecurityAttributeResponse.java new file mode 100644 index 00000000000..3bdb88c53c9 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/DeleteSecurityAttributeResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class DeleteSecurityAttributeResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private DeleteSecurityAttributeResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + * + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteSecurityAttributeResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteSecurityAttributeResponse build() { + return new DeleteSecurityAttributeResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSecurityAttributeResponse)) { + return false; + } + + DeleteSecurityAttributeResponse other = (DeleteSecurityAttributeResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeNamespaceResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeNamespaceResponse.java new file mode 100644 index 00000000000..1b0bf82ee79 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeNamespaceResponse.java @@ -0,0 +1,218 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class GetSecurityAttributeNamespaceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned SecurityAttributeNamespace instance. + */ + private com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace; + + /** + * The returned SecurityAttributeNamespace instance. + * @return the value + */ + public com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + getSecurityAttributeNamespace() { + return securityAttributeNamespace; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "securityAttributeNamespace" + }) + private GetSecurityAttributeNamespaceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.securityAttributeNamespace = securityAttributeNamespace; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned SecurityAttributeNamespace instance. + */ + private com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace; + + /** + * The returned SecurityAttributeNamespace instance. + * @param securityAttributeNamespace the value to set + * @return this builder + */ + public Builder securityAttributeNamespace( + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace) { + this.securityAttributeNamespace = securityAttributeNamespace; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSecurityAttributeNamespaceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + securityAttributeNamespace(o.getSecurityAttributeNamespace()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetSecurityAttributeNamespaceResponse build() { + return new GetSecurityAttributeNamespaceResponse( + __httpStatusCode__, headers, opcRequestId, etag, securityAttributeNamespace); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",securityAttributeNamespace=") + .append(String.valueOf(securityAttributeNamespace)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSecurityAttributeNamespaceResponse)) { + return false; + } + + GetSecurityAttributeNamespaceResponse other = (GetSecurityAttributeNamespaceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals( + this.securityAttributeNamespace, other.securityAttributeNamespace); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeNamespace == null + ? 43 + : this.securityAttributeNamespace.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeResponse.java new file mode 100644 index 00000000000..2f8841a938c --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class GetSecurityAttributeResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned SecurityAttribute instance. + */ + private com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute; + + /** + * The returned SecurityAttribute instance. + * @return the value + */ + public com.oracle.bmc.securityattribute.model.SecurityAttribute getSecurityAttribute() { + return securityAttribute; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "securityAttribute" + }) + private GetSecurityAttributeResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.securityAttribute = securityAttribute; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned SecurityAttribute instance. + */ + private com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute; + + /** + * The returned SecurityAttribute instance. + * @param securityAttribute the value to set + * @return this builder + */ + public Builder securityAttribute( + com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute) { + this.securityAttribute = securityAttribute; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSecurityAttributeResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + securityAttribute(o.getSecurityAttribute()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetSecurityAttributeResponse build() { + return new GetSecurityAttributeResponse( + __httpStatusCode__, headers, opcRequestId, etag, securityAttribute); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",securityAttribute=").append(String.valueOf(securityAttribute)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSecurityAttributeResponse)) { + return false; + } + + GetSecurityAttributeResponse other = (GetSecurityAttributeResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.securityAttribute, other.securityAttribute); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.securityAttribute == null ? 43 : this.securityAttribute.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeWorkRequestResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeWorkRequestResponse.java new file mode 100644 index 00000000000..21138ca2848 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeWorkRequestResponse.java @@ -0,0 +1,226 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class GetSecurityAttributeWorkRequestResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The number of seconds that the client should wait before polling again. + * + */ + private Float retryAfter; + + /** + * The number of seconds that the client should wait before polling again. + * + * @return the value + */ + public Float getRetryAfter() { + return retryAfter; + } + + /** + * The returned SecurityAttributeWorkRequest instance. + */ + private com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequest + securityAttributeWorkRequest; + + /** + * The returned SecurityAttributeWorkRequest instance. + * @return the value + */ + public com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequest + getSecurityAttributeWorkRequest() { + return securityAttributeWorkRequest; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "retryAfter", + "securityAttributeWorkRequest" + }) + private GetSecurityAttributeWorkRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + Float retryAfter, + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequest + securityAttributeWorkRequest) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + this.securityAttributeWorkRequest = securityAttributeWorkRequest; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The number of seconds that the client should wait before polling again. + * + */ + private Float retryAfter; + + /** + * The number of seconds that the client should wait before polling again. + * + * @param retryAfter the value to set + * @return this builder + */ + public Builder retryAfter(Float retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * The returned SecurityAttributeWorkRequest instance. + */ + private com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequest + securityAttributeWorkRequest; + + /** + * The returned SecurityAttributeWorkRequest instance. + * @param securityAttributeWorkRequest the value to set + * @return this builder + */ + public Builder securityAttributeWorkRequest( + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequest + securityAttributeWorkRequest) { + this.securityAttributeWorkRequest = securityAttributeWorkRequest; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetSecurityAttributeWorkRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + securityAttributeWorkRequest(o.getSecurityAttributeWorkRequest()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetSecurityAttributeWorkRequestResponse build() { + return new GetSecurityAttributeWorkRequestResponse( + __httpStatusCode__, + headers, + opcRequestId, + retryAfter, + securityAttributeWorkRequest); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",retryAfter=").append(String.valueOf(retryAfter)); + sb.append(",securityAttributeWorkRequest=") + .append(String.valueOf(securityAttributeWorkRequest)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSecurityAttributeWorkRequestResponse)) { + return false; + } + + GetSecurityAttributeWorkRequestResponse other = (GetSecurityAttributeWorkRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.retryAfter, other.retryAfter) + && java.util.Objects.equals( + this.securityAttributeWorkRequest, other.securityAttributeWorkRequest); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.retryAfter == null ? 43 : this.retryAfter.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeWorkRequest == null + ? 43 + : this.securityAttributeWorkRequest.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeNamespacesResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeNamespacesResponse.java new file mode 100644 index 00000000000..d5ff5b5bedd --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeNamespacesResponse.java @@ -0,0 +1,227 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributeNamespacesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of namespaces. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of namespaces. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of com.oracle.bmc.securityattribute.model.SecurityAttributeNamespaceSummary instances. + */ + private java.util.List + items; + + /** + * A list of com.oracle.bmc.securityattribute.model.SecurityAttributeNamespaceSummary instances. + * @return the value + */ + public java.util.List + getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "items" + }) + private ListSecurityAttributeNamespacesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + java.util.List + items) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of namespaces. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of namespaces. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of com.oracle.bmc.securityattribute.model.SecurityAttributeNamespaceSummary instances. + */ + private java.util.List< + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespaceSummary> + items; + + /** + * A list of com.oracle.bmc.securityattribute.model.SecurityAttributeNamespaceSummary instances. + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeNamespaceSummary> + items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSecurityAttributeNamespacesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListSecurityAttributeNamespacesResponse build() { + return new ListSecurityAttributeNamespacesResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, items); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSecurityAttributeNamespacesResponse)) { + return false; + } + + ListSecurityAttributeNamespacesResponse other = (ListSecurityAttributeNamespacesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestErrorsResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestErrorsResponse.java new file mode 100644 index 00000000000..7821efb874f --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestErrorsResponse.java @@ -0,0 +1,273 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributeWorkRequestErrorsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The number of seconds that the client should wait before polling again. + * + */ + private Float retryAfter; + + /** + * The number of seconds that the client should wait before polling again. + * + * @return the value + */ + public Float getRetryAfter() { + return retryAfter; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestErrorSummary instances. + */ + private java.util.List< + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestErrorSummary> + items; + + /** + * A list of com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestErrorSummary instances. + * @return the value + */ + public java.util.List< + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestErrorSummary> + getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "retryAfter", + "opcNextPage", + "items" + }) + private ListSecurityAttributeWorkRequestErrorsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + Float retryAfter, + String opcNextPage, + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestErrorSummary> + items) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The number of seconds that the client should wait before polling again. + * + */ + private Float retryAfter; + + /** + * The number of seconds that the client should wait before polling again. + * + * @param retryAfter the value to set + * @return this builder + */ + public Builder retryAfter(Float retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestErrorSummary instances. + */ + private java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestErrorSummary> + items; + + /** + * A list of com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestErrorSummary instances. + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestErrorSummary> + items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSecurityAttributeWorkRequestErrorsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListSecurityAttributeWorkRequestErrorsResponse build() { + return new ListSecurityAttributeWorkRequestErrorsResponse( + __httpStatusCode__, headers, opcRequestId, retryAfter, opcNextPage, items); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",retryAfter=").append(String.valueOf(retryAfter)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSecurityAttributeWorkRequestErrorsResponse)) { + return false; + } + + ListSecurityAttributeWorkRequestErrorsResponse other = + (ListSecurityAttributeWorkRequestErrorsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.retryAfter, other.retryAfter) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.retryAfter == null ? 43 : this.retryAfter.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestLogsResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestLogsResponse.java new file mode 100644 index 00000000000..4077fb9f592 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestLogsResponse.java @@ -0,0 +1,273 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributeWorkRequestLogsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The number of seconds that the client should wait before polling again. + * + */ + private Float retryAfter; + + /** + * The number of seconds that the client should wait before polling again. + * + * @return the value + */ + public Float getRetryAfter() { + return retryAfter; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestLogSummary instances. + */ + private java.util.List< + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestLogSummary> + items; + + /** + * A list of com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestLogSummary instances. + * @return the value + */ + public java.util.List< + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestLogSummary> + getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "retryAfter", + "opcNextPage", + "items" + }) + private ListSecurityAttributeWorkRequestLogsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + Float retryAfter, + String opcNextPage, + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestLogSummary> + items) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The number of seconds that the client should wait before polling again. + * + */ + private Float retryAfter; + + /** + * The number of seconds that the client should wait before polling again. + * + * @param retryAfter the value to set + * @return this builder + */ + public Builder retryAfter(Float retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestLogSummary instances. + */ + private java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestLogSummary> + items; + + /** + * A list of com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestLogSummary instances. + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestLogSummary> + items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSecurityAttributeWorkRequestLogsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListSecurityAttributeWorkRequestLogsResponse build() { + return new ListSecurityAttributeWorkRequestLogsResponse( + __httpStatusCode__, headers, opcRequestId, retryAfter, opcNextPage, items); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",retryAfter=").append(String.valueOf(retryAfter)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSecurityAttributeWorkRequestLogsResponse)) { + return false; + } + + ListSecurityAttributeWorkRequestLogsResponse other = + (ListSecurityAttributeWorkRequestLogsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.retryAfter, other.retryAfter) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.retryAfter == null ? 43 : this.retryAfter.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestsResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestsResponse.java new file mode 100644 index 00000000000..bb7e4c326f4 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestsResponse.java @@ -0,0 +1,233 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributeWorkRequestsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary instances. + */ + private java.util.List< + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary> + items; + + /** + * A list of com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary instances. + * @return the value + */ + public java.util.List< + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary> + getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "items" + }) + private ListSecurityAttributeWorkRequestsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestSummary> + items) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary instances. + */ + private java.util.List< + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary> + items; + + /** + * A list of com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary instances. + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestSummary> + items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSecurityAttributeWorkRequestsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListSecurityAttributeWorkRequestsResponse build() { + return new ListSecurityAttributeWorkRequestsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, items); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSecurityAttributeWorkRequestsResponse)) { + return false; + } + + ListSecurityAttributeWorkRequestsResponse other = + (ListSecurityAttributeWorkRequestsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributesResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributesResponse.java new file mode 100644 index 00000000000..1c6c75454ab --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributesResponse.java @@ -0,0 +1,222 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of security attributes. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of security attributes. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of com.oracle.bmc.securityattribute.model.SecurityAttributeSummary instances. + */ + private java.util.List items; + + /** + * A list of com.oracle.bmc.securityattribute.model.SecurityAttributeSummary instances. + * @return the value + */ + public java.util.List + getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "items" + }) + private ListSecurityAttributesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + java.util.List items) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of security attributes. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of security attributes. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of com.oracle.bmc.securityattribute.model.SecurityAttributeSummary instances. + */ + private java.util.List + items; + + /** + * A list of com.oracle.bmc.securityattribute.model.SecurityAttributeSummary instances. + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List + items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListSecurityAttributesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListSecurityAttributesResponse build() { + return new ListSecurityAttributesResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, items); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSecurityAttributesResponse)) { + return false; + } + + ListSecurityAttributesResponse other = (ListSecurityAttributesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/UpdateSecurityAttributeNamespaceResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/UpdateSecurityAttributeNamespaceResponse.java new file mode 100644 index 00000000000..a2200b04e19 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/UpdateSecurityAttributeNamespaceResponse.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class UpdateSecurityAttributeNamespaceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned SecurityAttributeNamespace instance. + */ + private com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace; + + /** + * The returned SecurityAttributeNamespace instance. + * @return the value + */ + public com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + getSecurityAttributeNamespace() { + return securityAttributeNamespace; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "securityAttributeNamespace" + }) + private UpdateSecurityAttributeNamespaceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.securityAttributeNamespace = securityAttributeNamespace; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned SecurityAttributeNamespace instance. + */ + private com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace; + + /** + * The returned SecurityAttributeNamespace instance. + * @param securityAttributeNamespace the value to set + * @return this builder + */ + public Builder securityAttributeNamespace( + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace) { + this.securityAttributeNamespace = securityAttributeNamespace; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateSecurityAttributeNamespaceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + securityAttributeNamespace(o.getSecurityAttributeNamespace()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateSecurityAttributeNamespaceResponse build() { + return new UpdateSecurityAttributeNamespaceResponse( + __httpStatusCode__, headers, opcRequestId, etag, securityAttributeNamespace); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",securityAttributeNamespace=") + .append(String.valueOf(securityAttributeNamespace)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSecurityAttributeNamespaceResponse)) { + return false; + } + + UpdateSecurityAttributeNamespaceResponse other = + (UpdateSecurityAttributeNamespaceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals( + this.securityAttributeNamespace, other.securityAttributeNamespace); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeNamespace == null + ? 43 + : this.securityAttributeNamespace.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/UpdateSecurityAttributeResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/UpdateSecurityAttributeResponse.java new file mode 100644 index 00000000000..9b3e165664e --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/UpdateSecurityAttributeResponse.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class UpdateSecurityAttributeResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned SecurityAttribute instance. + */ + private com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute; + + /** + * The returned SecurityAttribute instance. + * @return the value + */ + public com.oracle.bmc.securityattribute.model.SecurityAttribute getSecurityAttribute() { + return securityAttribute; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "securityAttribute" + }) + private UpdateSecurityAttributeResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String etag, + com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.securityAttribute = securityAttribute; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned SecurityAttribute instance. + */ + private com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute; + + /** + * The returned SecurityAttribute instance. + * @param securityAttribute the value to set + * @return this builder + */ + public Builder securityAttribute( + com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute) { + this.securityAttribute = securityAttribute; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateSecurityAttributeResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + securityAttribute(o.getSecurityAttribute()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateSecurityAttributeResponse build() { + return new UpdateSecurityAttributeResponse( + __httpStatusCode__, headers, opcRequestId, etag, securityAttribute); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",securityAttribute=").append(String.valueOf(securityAttribute)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSecurityAttributeResponse)) { + return false; + } + + UpdateSecurityAttributeResponse other = (UpdateSecurityAttributeResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.securityAttribute, other.securityAttribute); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.securityAttribute == null ? 43 : this.securityAttribute.hashCode()); + return result; + } +} diff --git a/bmc-servicecatalog/pom.xml b/bmc-servicecatalog/pom.xml index 29aa9367355..65b5444dd29 100644 --- a/bmc-servicecatalog/pom.xml +++ b/bmc-servicecatalog/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-servicecatalog @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-servicemanagerproxy/pom.xml b/bmc-servicemanagerproxy/pom.xml index 631c24bd06a..c7d49e3a662 100644 --- a/bmc-servicemanagerproxy/pom.xml +++ b/bmc-servicemanagerproxy/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-servicemanagerproxy @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-servicemesh/pom.xml b/bmc-servicemesh/pom.xml index 51c31e4f23d..ef8644c39a0 100644 --- a/bmc-servicemesh/pom.xml +++ b/bmc-servicemesh/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-servicemesh @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-shaded/bmc-shaded-full/pom.xml b/bmc-shaded/bmc-shaded-full/pom.xml index 8674c830f3f..d913d8bf748 100644 --- a/bmc-shaded/bmc-shaded-full/pom.xml +++ b/bmc-shaded/bmc-shaded-full/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk-shaded - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-shaded-full diff --git a/bmc-shaded/pom.xml b/bmc-shaded/pom.xml index 49c35488c37..6fba5c80aba 100644 --- a/bmc-shaded/pom.xml +++ b/bmc-shaded/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml diff --git a/bmc-stackmonitoring/pom.xml b/bmc-stackmonitoring/pom.xml index 3249010e586..eef91931ab7 100644 --- a/bmc-stackmonitoring/pom.xml +++ b/bmc-stackmonitoring/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-stackmonitoring @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoring.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoring.java index e2b27e0a333..40af47979ab 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoring.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoring.java @@ -201,6 +201,20 @@ CreateBaselineableMetricResponse createBaselineableMetric( */ CreateDiscoveryJobResponse createDiscoveryJob(CreateDiscoveryJobRequest request); + /** + * Creates a new Maintenance Window for the given resources. It will create also the + * Alarms Suppression for each alarm that the resource migth trigger. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateMaintenanceWindow API. + */ + CreateMaintenanceWindowResponse createMaintenanceWindow(CreateMaintenanceWindowRequest request); + /** * Creates a new metric extension resource for a given compartment * @@ -304,6 +318,19 @@ DeleteBaselineableMetricResponse deleteBaselineableMetric( */ DeleteDiscoveryJobResponse deleteDiscoveryJob(DeleteDiscoveryJobRequest request); + /** + * Deletes a maintenance window by identifier + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteMaintenanceWindow API. + */ + DeleteMaintenanceWindowResponse deleteMaintenanceWindow(DeleteMaintenanceWindowRequest request); + /** * Deletes a metric extension by identifier * @param request The request object containing the details to send @@ -474,6 +501,19 @@ EvaluateBaselineableMetricResponse evaluateBaselineableMetric( */ GetDiscoveryJobResponse getDiscoveryJob(GetDiscoveryJobRequest request); + /** + * Get maintenance window for the given identifier [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetMaintenanceWindow API. + */ + GetMaintenanceWindowResponse getMaintenanceWindow(GetMaintenanceWindowRequest request); + /** * Gets a Metric Extension by identifier * @param request The request object containing the details to send @@ -600,6 +640,18 @@ GetMonitoredResourceTypeResponse getMonitoredResourceType( */ ListDiscoveryJobsResponse listDiscoveryJobs(ListDiscoveryJobsRequest request); + /** + * Returns a list of maintenance windows. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListMaintenanceWindows API. + */ + ListMaintenanceWindowsResponse listMaintenanceWindows(ListMaintenanceWindowsRequest request); + /** * Returns a list of metric extensions * @param request The request object containing the details to send @@ -751,6 +803,20 @@ ListMonitoredResourceTypesResponse listMonitoredResourceTypes( RequestMonitoredResourcesSummarizedCountResponse requestMonitoredResourcesSummarizedCount( RequestMonitoredResourcesSummarizedCountRequest request); + /** + * Retry the last failed operation. The operation failed will be the most recent one. It won't apply for previous failed operations. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use RetryFailedMaintenanceWindowOperation API. + */ + RetryFailedMaintenanceWindowOperationResponse retryFailedMaintenanceWindowOperation( + RetryFailedMaintenanceWindowOperationRequest request); + /** * List all associated resources recursively up-to a specified level, * for the monitored resources of type specified. @@ -808,6 +874,19 @@ SearchMonitoredResourceMembersResponse searchMonitoredResourceMembers( SearchMonitoredResourcesResponse searchMonitoredResources( SearchMonitoredResourcesRequest request); + /** + * Stop a maintenance window before the end time is reached. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use StopMaintenanceWindow API. + */ + StopMaintenanceWindowResponse stopMaintenanceWindow(StopMaintenanceWindowRequest request); + /** * Performs test of Metric Extension on a specific resource Id * @param request The request object containing the details to send @@ -861,6 +940,19 @@ UpdateBaselineableMetricResponse updateBaselineableMetric( */ UpdateConfigResponse updateConfig(UpdateConfigRequest request); + /** + * Update maintenance window by the given identifier [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateMaintenanceWindow API. + */ + UpdateMaintenanceWindowResponse updateMaintenanceWindow(UpdateMaintenanceWindowRequest request); + /** * Updates the Metric Extension * @param request The request object containing the details to send diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoringAsync.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoringAsync.java index 591118b2cbd..76324227d9f 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoringAsync.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoringAsync.java @@ -235,6 +235,24 @@ java.util.concurrent.Future createDiscoveryJob( CreateDiscoveryJobRequest, CreateDiscoveryJobResponse> handler); + /** + * Creates a new Maintenance Window for the given resources. It will create also the + * Alarms Suppression for each alarm that the resource migth trigger. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createMaintenanceWindow( + CreateMaintenanceWindowRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateMaintenanceWindowRequest, CreateMaintenanceWindowResponse> + handler); + /** * Creates a new metric extension resource for a given compartment * @@ -365,6 +383,23 @@ java.util.concurrent.Future deleteDiscoveryJob( DeleteDiscoveryJobRequest, DeleteDiscoveryJobResponse> handler); + /** + * Deletes a maintenance window by identifier + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteMaintenanceWindow( + DeleteMaintenanceWindowRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteMaintenanceWindowRequest, DeleteMaintenanceWindowResponse> + handler); + /** * Deletes a metric extension by identifier * @@ -582,6 +617,23 @@ java.util.concurrent.Future getDiscoveryJob( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Get maintenance window for the given identifier [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getMaintenanceWindow( + GetMaintenanceWindowRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetMaintenanceWindowRequest, GetMaintenanceWindowResponse> + handler); + /** * Gets a Metric Extension by identifier * @@ -742,6 +794,22 @@ java.util.concurrent.Future listDiscoveryJobs( ListDiscoveryJobsRequest, ListDiscoveryJobsResponse> handler); + /** + * Returns a list of maintenance windows. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listMaintenanceWindows( + ListMaintenanceWindowsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListMaintenanceWindowsRequest, ListMaintenanceWindowsResponse> + handler); + /** * Returns a list of metric extensions * @@ -933,6 +1001,25 @@ java.util.concurrent.Future publishMetricExtensi RequestMonitoredResourcesSummarizedCountResponse> handler); + /** + * Retry the last failed operation. The operation failed will be the most recent one. It won't apply for previous failed operations. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + retryFailedMaintenanceWindowOperation( + RetryFailedMaintenanceWindowOperationRequest request, + com.oracle.bmc.responses.AsyncHandler< + RetryFailedMaintenanceWindowOperationRequest, + RetryFailedMaintenanceWindowOperationResponse> + handler); + /** * List all associated resources recursively up-to a specified level, * for the monitored resources of type specified. @@ -1006,6 +1093,23 @@ java.util.concurrent.Future searchMonitoredRes SearchMonitoredResourcesRequest, SearchMonitoredResourcesResponse> handler); + /** + * Stop a maintenance window before the end time is reached. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future stopMaintenanceWindow( + StopMaintenanceWindowRequest request, + com.oracle.bmc.responses.AsyncHandler< + StopMaintenanceWindowRequest, StopMaintenanceWindowResponse> + handler); + /** * Performs test of Metric Extension on a specific resource Id * @@ -1073,6 +1177,23 @@ java.util.concurrent.Future updateConfig( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Update maintenance window by the given identifier [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateMaintenanceWindow( + UpdateMaintenanceWindowRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateMaintenanceWindowRequest, UpdateMaintenanceWindowResponse> + handler); + /** * Updates the Metric Extension * diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoringAsyncClient.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoringAsyncClient.java index de3a969dc6a..bd379a6b339 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoringAsyncClient.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoringAsyncClient.java @@ -967,6 +967,60 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future createMaintenanceWindow( + CreateMaintenanceWindowRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateMaintenanceWindowRequest, CreateMaintenanceWindowResponse> + handler) { + LOG.trace("Called async createMaintenanceWindow"); + final CreateMaintenanceWindowRequest interceptedRequest = + CreateMaintenanceWindowConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateMaintenanceWindowConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "StackMonitoring", + "CreateMaintenanceWindow", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MaintenanceWindow/CreateMaintenanceWindow"); + final java.util.function.Function< + javax.ws.rs.core.Response, CreateMaintenanceWindowResponse> + transformer = + CreateMaintenanceWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateMaintenanceWindowRequest, CreateMaintenanceWindowResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateMaintenanceWindowRequest, CreateMaintenanceWindowResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateMaintenanceWindowDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateMaintenanceWindowRequest, CreateMaintenanceWindowResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future createMetricExtension( CreateMetricExtensionRequest request, @@ -1378,6 +1432,54 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future deleteMaintenanceWindow( + DeleteMaintenanceWindowRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteMaintenanceWindowRequest, DeleteMaintenanceWindowResponse> + handler) { + LOG.trace("Called async deleteMaintenanceWindow"); + final DeleteMaintenanceWindowRequest interceptedRequest = + DeleteMaintenanceWindowConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteMaintenanceWindowConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "StackMonitoring", + "DeleteMaintenanceWindow", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MaintenanceWindow/DeleteMaintenanceWindow"); + final java.util.function.Function< + javax.ws.rs.core.Response, DeleteMaintenanceWindowResponse> + transformer = + DeleteMaintenanceWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + DeleteMaintenanceWindowRequest, DeleteMaintenanceWindowResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteMaintenanceWindowRequest, DeleteMaintenanceWindowResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteMaintenanceWindowRequest, DeleteMaintenanceWindowResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future deleteMetricExtension( DeleteMetricExtensionRequest request, @@ -2023,6 +2125,53 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future getMaintenanceWindow( + GetMaintenanceWindowRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetMaintenanceWindowRequest, GetMaintenanceWindowResponse> + handler) { + LOG.trace("Called async getMaintenanceWindow"); + final GetMaintenanceWindowRequest interceptedRequest = + GetMaintenanceWindowConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetMaintenanceWindowConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "StackMonitoring", + "GetMaintenanceWindow", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MaintenanceWindow/GetMaintenanceWindow"); + final java.util.function.Function + transformer = + GetMaintenanceWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetMaintenanceWindowRequest, GetMaintenanceWindowResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetMaintenanceWindowRequest, GetMaintenanceWindowResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetMaintenanceWindowRequest, GetMaintenanceWindowResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future getMetricExtension( GetMetricExtensionRequest request, @@ -2486,6 +2635,53 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future listMaintenanceWindows( + ListMaintenanceWindowsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListMaintenanceWindowsRequest, ListMaintenanceWindowsResponse> + handler) { + LOG.trace("Called async listMaintenanceWindows"); + final ListMaintenanceWindowsRequest interceptedRequest = + ListMaintenanceWindowsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListMaintenanceWindowsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "StackMonitoring", + "ListMaintenanceWindows", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MaintenanceWindow/ListMaintenanceWindows"); + final java.util.function.Function + transformer = + ListMaintenanceWindowsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListMaintenanceWindowsRequest, ListMaintenanceWindowsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListMaintenanceWindowsRequest, ListMaintenanceWindowsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListMaintenanceWindowsRequest, ListMaintenanceWindowsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future listMetricExtensions( ListMetricExtensionsRequest request, @@ -3021,6 +3217,60 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + retryFailedMaintenanceWindowOperation( + RetryFailedMaintenanceWindowOperationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + RetryFailedMaintenanceWindowOperationRequest, + RetryFailedMaintenanceWindowOperationResponse> + handler) { + LOG.trace("Called async retryFailedMaintenanceWindowOperation"); + final RetryFailedMaintenanceWindowOperationRequest interceptedRequest = + RetryFailedMaintenanceWindowOperationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RetryFailedMaintenanceWindowOperationConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "StackMonitoring", + "RetryFailedMaintenanceWindowOperation", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MaintenanceWindow/RetryFailedMaintenanceWindowOperation"); + final java.util.function.Function< + javax.ws.rs.core.Response, RetryFailedMaintenanceWindowOperationResponse> + transformer = + RetryFailedMaintenanceWindowOperationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + RetryFailedMaintenanceWindowOperationRequest, + RetryFailedMaintenanceWindowOperationResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + RetryFailedMaintenanceWindowOperationRequest, + RetryFailedMaintenanceWindowOperationResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + RetryFailedMaintenanceWindowOperationRequest, + RetryFailedMaintenanceWindowOperationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future searchAssociatedResources( SearchAssociatedResourcesRequest request, @@ -3248,6 +3498,53 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future stopMaintenanceWindow( + StopMaintenanceWindowRequest request, + final com.oracle.bmc.responses.AsyncHandler< + StopMaintenanceWindowRequest, StopMaintenanceWindowResponse> + handler) { + LOG.trace("Called async stopMaintenanceWindow"); + final StopMaintenanceWindowRequest interceptedRequest = + StopMaintenanceWindowConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StopMaintenanceWindowConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "StackMonitoring", + "StopMaintenanceWindow", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MaintenanceWindow/StopMaintenanceWindow"); + final java.util.function.Function + transformer = + StopMaintenanceWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + StopMaintenanceWindowRequest, StopMaintenanceWindowResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + StopMaintenanceWindowRequest, StopMaintenanceWindowResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + StopMaintenanceWindowRequest, StopMaintenanceWindowResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future testMetricExtension( TestMetricExtensionRequest request, @@ -3456,6 +3753,59 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future updateMaintenanceWindow( + UpdateMaintenanceWindowRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateMaintenanceWindowRequest, UpdateMaintenanceWindowResponse> + handler) { + LOG.trace("Called async updateMaintenanceWindow"); + final UpdateMaintenanceWindowRequest interceptedRequest = + UpdateMaintenanceWindowConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateMaintenanceWindowConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "StackMonitoring", + "UpdateMaintenanceWindow", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MaintenanceWindow/UpdateMaintenanceWindow"); + final java.util.function.Function< + javax.ws.rs.core.Response, UpdateMaintenanceWindowResponse> + transformer = + UpdateMaintenanceWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + UpdateMaintenanceWindowRequest, UpdateMaintenanceWindowResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateMaintenanceWindowRequest, UpdateMaintenanceWindowResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateMaintenanceWindowDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateMaintenanceWindowRequest, UpdateMaintenanceWindowResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future updateMetricExtension( UpdateMetricExtensionRequest request, diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoringClient.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoringClient.java index fc08a3b0bb1..a0035e995c3 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoringClient.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoringClient.java @@ -945,6 +945,49 @@ public CreateDiscoveryJobResponse createDiscoveryJob(CreateDiscoveryJobRequest r }); } + @Override + public CreateMaintenanceWindowResponse createMaintenanceWindow( + CreateMaintenanceWindowRequest request) { + LOG.trace("Called createMaintenanceWindow"); + final CreateMaintenanceWindowRequest interceptedRequest = + CreateMaintenanceWindowConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateMaintenanceWindowConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "StackMonitoring", + "CreateMaintenanceWindow", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MaintenanceWindow/CreateMaintenanceWindow"); + java.util.function.Function + transformer = + CreateMaintenanceWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateMaintenanceWindowDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public CreateMetricExtensionResponse createMetricExtension( CreateMetricExtensionRequest request) { @@ -1274,6 +1317,45 @@ public DeleteDiscoveryJobResponse deleteDiscoveryJob(DeleteDiscoveryJobRequest r }); } + @Override + public DeleteMaintenanceWindowResponse deleteMaintenanceWindow( + DeleteMaintenanceWindowRequest request) { + LOG.trace("Called deleteMaintenanceWindow"); + final DeleteMaintenanceWindowRequest interceptedRequest = + DeleteMaintenanceWindowConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteMaintenanceWindowConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "StackMonitoring", + "DeleteMaintenanceWindow", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MaintenanceWindow/DeleteMaintenanceWindow"); + java.util.function.Function + transformer = + DeleteMaintenanceWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DeleteMetricExtensionResponse deleteMetricExtension( DeleteMetricExtensionRequest request) { @@ -1793,6 +1875,43 @@ public GetDiscoveryJobResponse getDiscoveryJob(GetDiscoveryJobRequest request) { }); } + @Override + public GetMaintenanceWindowResponse getMaintenanceWindow(GetMaintenanceWindowRequest request) { + LOG.trace("Called getMaintenanceWindow"); + final GetMaintenanceWindowRequest interceptedRequest = + GetMaintenanceWindowConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetMaintenanceWindowConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "StackMonitoring", + "GetMaintenanceWindow", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MaintenanceWindow/GetMaintenanceWindow"); + java.util.function.Function + transformer = + GetMaintenanceWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetMetricExtensionResponse getMetricExtension(GetMetricExtensionRequest request) { LOG.trace("Called getMetricExtension"); @@ -2160,6 +2279,44 @@ public ListDiscoveryJobsResponse listDiscoveryJobs(ListDiscoveryJobsRequest requ }); } + @Override + public ListMaintenanceWindowsResponse listMaintenanceWindows( + ListMaintenanceWindowsRequest request) { + LOG.trace("Called listMaintenanceWindows"); + final ListMaintenanceWindowsRequest interceptedRequest = + ListMaintenanceWindowsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListMaintenanceWindowsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "StackMonitoring", + "ListMaintenanceWindows", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MaintenanceWindow/ListMaintenanceWindows"); + java.util.function.Function + transformer = + ListMaintenanceWindowsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListMetricExtensionsResponse listMetricExtensions(ListMetricExtensionsRequest request) { LOG.trace("Called listMetricExtensions"); @@ -2582,6 +2739,47 @@ public PublishMetricExtensionResponse publishMetricExtension( }); } + @Override + public RetryFailedMaintenanceWindowOperationResponse retryFailedMaintenanceWindowOperation( + RetryFailedMaintenanceWindowOperationRequest request) { + LOG.trace("Called retryFailedMaintenanceWindowOperation"); + final RetryFailedMaintenanceWindowOperationRequest interceptedRequest = + RetryFailedMaintenanceWindowOperationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + RetryFailedMaintenanceWindowOperationConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "StackMonitoring", + "RetryFailedMaintenanceWindowOperation", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MaintenanceWindow/RetryFailedMaintenanceWindowOperation"); + java.util.function.Function< + javax.ws.rs.core.Response, RetryFailedMaintenanceWindowOperationResponse> + transformer = + RetryFailedMaintenanceWindowOperationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public SearchAssociatedResourcesResponse searchAssociatedResources( SearchAssociatedResourcesRequest request) { @@ -2760,6 +2958,45 @@ public SearchMonitoredResourcesResponse searchMonitoredResources( }); } + @Override + public StopMaintenanceWindowResponse stopMaintenanceWindow( + StopMaintenanceWindowRequest request) { + LOG.trace("Called stopMaintenanceWindow"); + final StopMaintenanceWindowRequest interceptedRequest = + StopMaintenanceWindowConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StopMaintenanceWindowConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "StackMonitoring", + "StopMaintenanceWindow", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MaintenanceWindow/StopMaintenanceWindow"); + java.util.function.Function + transformer = + StopMaintenanceWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public TestMetricExtensionResponse testMetricExtension(TestMetricExtensionRequest request) { LOG.trace("Called testMetricExtension"); @@ -2926,6 +3163,48 @@ public UpdateConfigResponse updateConfig(UpdateConfigRequest request) { }); } + @Override + public UpdateMaintenanceWindowResponse updateMaintenanceWindow( + UpdateMaintenanceWindowRequest request) { + LOG.trace("Called updateMaintenanceWindow"); + final UpdateMaintenanceWindowRequest interceptedRequest = + UpdateMaintenanceWindowConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateMaintenanceWindowConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "StackMonitoring", + "UpdateMaintenanceWindow", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MaintenanceWindow/UpdateMaintenanceWindow"); + java.util.function.Function + transformer = + UpdateMaintenanceWindowConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateMaintenanceWindowDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateMetricExtensionResponse updateMetricExtension( UpdateMetricExtensionRequest request) { diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoringPaginators.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoringPaginators.java index f839e8833e7..0272990cd2f 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoringPaginators.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoringPaginators.java @@ -492,6 +492,124 @@ public ListDiscoveryJobsResponse apply(ListDiscoveryJobsRequest request) { }); } + /** + * Creates a new iterable which will iterate over the responses received from the listMaintenanceWindows operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listMaintenanceWindowsResponseIterator( + final ListMaintenanceWindowsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListMaintenanceWindowsRequest.Builder, ListMaintenanceWindowsRequest, + ListMaintenanceWindowsResponse>( + new java.util.function.Supplier() { + @Override + public ListMaintenanceWindowsRequest.Builder get() { + return ListMaintenanceWindowsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListMaintenanceWindowsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMaintenanceWindowsRequest.Builder>, + ListMaintenanceWindowsRequest>() { + @Override + public ListMaintenanceWindowsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMaintenanceWindowsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListMaintenanceWindowsRequest, ListMaintenanceWindowsResponse>() { + @Override + public ListMaintenanceWindowsResponse apply( + ListMaintenanceWindowsRequest request) { + return client.listMaintenanceWindows(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.stackmonitoring.model.MaintenanceWindowSummary} objects + * contained in responses from the listMaintenanceWindows operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.stackmonitoring.model.MaintenanceWindowSummary} objects + * contained in responses received from the service. + */ + public Iterable + listMaintenanceWindowsRecordIterator(final ListMaintenanceWindowsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListMaintenanceWindowsRequest.Builder, ListMaintenanceWindowsRequest, + ListMaintenanceWindowsResponse, + com.oracle.bmc.stackmonitoring.model.MaintenanceWindowSummary>( + new java.util.function.Supplier() { + @Override + public ListMaintenanceWindowsRequest.Builder get() { + return ListMaintenanceWindowsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListMaintenanceWindowsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMaintenanceWindowsRequest.Builder>, + ListMaintenanceWindowsRequest>() { + @Override + public ListMaintenanceWindowsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListMaintenanceWindowsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListMaintenanceWindowsRequest, ListMaintenanceWindowsResponse>() { + @Override + public ListMaintenanceWindowsResponse apply( + ListMaintenanceWindowsRequest request) { + return client.listMaintenanceWindows(request); + } + }, + new java.util.function.Function< + ListMaintenanceWindowsResponse, + java.util.List< + com.oracle.bmc.stackmonitoring.model.MaintenanceWindowSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.stackmonitoring.model.MaintenanceWindowSummary> + apply(ListMaintenanceWindowsResponse response) { + return response.getMaintenanceWindowCollection().getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listMetricExtensions operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoringWaiters.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoringWaiters.java index 7ce8a57662f..ecde31794d2 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoringWaiters.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/StackMonitoringWaiters.java @@ -333,6 +333,114 @@ public boolean test(GetDiscoveryJobResponse response) { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetState the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forMaintenanceWindow( + GetMaintenanceWindowRequest request, + com.oracle.bmc.stackmonitoring.model.MaintenanceWindowLifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forMaintenanceWindow( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forMaintenanceWindow( + GetMaintenanceWindowRequest request, + com.oracle.bmc.stackmonitoring.model.MaintenanceWindowLifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forMaintenanceWindow( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forMaintenanceWindow( + GetMaintenanceWindowRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.stackmonitoring.model.MaintenanceWindowLifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forMaintenanceWindow( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for MaintenanceWindow. + private com.oracle.bmc.waiter.Waiter + forMaintenanceWindow( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetMaintenanceWindowRequest request, + final com.oracle.bmc.stackmonitoring.model.MaintenanceWindowLifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetMaintenanceWindowRequest, GetMaintenanceWindowResponse>() { + @Override + public GetMaintenanceWindowResponse apply( + GetMaintenanceWindowRequest request) { + return client.getMaintenanceWindow(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetMaintenanceWindowResponse response) { + return targetStatesSet.contains( + response.getMaintenanceWindow().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.stackmonitoring.model.MaintenanceWindowLifecycleState + .Deleted)), + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/CreateMaintenanceWindowConverter.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/CreateMaintenanceWindowConverter.java new file mode 100644 index 00000000000..650d1e8d384 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/CreateMaintenanceWindowConverter.java @@ -0,0 +1,163 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.stackmonitoring.model.*; +import com.oracle.bmc.stackmonitoring.requests.*; +import com.oracle.bmc.stackmonitoring.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class CreateMaintenanceWindowConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateMaintenanceWindowConverter.class); + + public static com.oracle.bmc.stackmonitoring.requests.CreateMaintenanceWindowRequest + interceptRequest( + com.oracle.bmc.stackmonitoring.requests.CreateMaintenanceWindowRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.stackmonitoring.requests.CreateMaintenanceWindowRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateMaintenanceWindowDetails(), + "createMaintenanceWindowDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20210330").path("maintenanceWindows"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses.CreateMaintenanceWindowResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses.CreateMaintenanceWindowResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses.CreateMaintenanceWindowResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses + .CreateMaintenanceWindowResponse>() { + @Override + public com.oracle.bmc.stackmonitoring.responses + .CreateMaintenanceWindowResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.stackmonitoring.responses.CreateMaintenanceWindowResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.stackmonitoring.model + .MaintenanceWindow>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.stackmonitoring.model + .MaintenanceWindow + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.stackmonitoring.model + .MaintenanceWindow + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.stackmonitoring.model + .MaintenanceWindow> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.stackmonitoring.responses + .CreateMaintenanceWindowResponse.Builder + builder = + com.oracle.bmc.stackmonitoring.responses + .CreateMaintenanceWindowResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.maintenanceWindow(response.getItem()); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.oracle.bmc.stackmonitoring.responses + .CreateMaintenanceWindowResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/DeleteMaintenanceWindowConverter.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/DeleteMaintenanceWindowConverter.java new file mode 100644 index 00000000000..192e532af2a --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/DeleteMaintenanceWindowConverter.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.stackmonitoring.model.*; +import com.oracle.bmc.stackmonitoring.requests.*; +import com.oracle.bmc.stackmonitoring.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class DeleteMaintenanceWindowConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(DeleteMaintenanceWindowConverter.class); + + public static com.oracle.bmc.stackmonitoring.requests.DeleteMaintenanceWindowRequest + interceptRequest( + com.oracle.bmc.stackmonitoring.requests.DeleteMaintenanceWindowRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.stackmonitoring.requests.DeleteMaintenanceWindowRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getMaintenanceWindowId(), "maintenanceWindowId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210330") + .path("maintenanceWindows") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMaintenanceWindowId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses.DeleteMaintenanceWindowResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses.DeleteMaintenanceWindowResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses.DeleteMaintenanceWindowResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses + .DeleteMaintenanceWindowResponse>() { + @Override + public com.oracle.bmc.stackmonitoring.responses + .DeleteMaintenanceWindowResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.stackmonitoring.responses.DeleteMaintenanceWindowResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.stackmonitoring.responses + .DeleteMaintenanceWindowResponse.Builder + builder = + com.oracle.bmc.stackmonitoring.responses + .DeleteMaintenanceWindowResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.stackmonitoring.responses + .DeleteMaintenanceWindowResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/GetMaintenanceWindowConverter.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/GetMaintenanceWindowConverter.java new file mode 100644 index 00000000000..fe129d4a095 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/GetMaintenanceWindowConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.stackmonitoring.model.*; +import com.oracle.bmc.stackmonitoring.requests.*; +import com.oracle.bmc.stackmonitoring.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class GetMaintenanceWindowConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetMaintenanceWindowConverter.class); + + public static com.oracle.bmc.stackmonitoring.requests.GetMaintenanceWindowRequest + interceptRequest( + com.oracle.bmc.stackmonitoring.requests.GetMaintenanceWindowRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.stackmonitoring.requests.GetMaintenanceWindowRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getMaintenanceWindowId(), "maintenanceWindowId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210330") + .path("maintenanceWindows") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMaintenanceWindowId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses.GetMaintenanceWindowResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses.GetMaintenanceWindowResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses.GetMaintenanceWindowResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses + .GetMaintenanceWindowResponse>() { + @Override + public com.oracle.bmc.stackmonitoring.responses + .GetMaintenanceWindowResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.stackmonitoring.responses.GetMaintenanceWindowResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.stackmonitoring.model + .MaintenanceWindow>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.stackmonitoring.model + .MaintenanceWindow + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.stackmonitoring.model + .MaintenanceWindow + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.stackmonitoring.model + .MaintenanceWindow> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.stackmonitoring.responses + .GetMaintenanceWindowResponse.Builder + builder = + com.oracle.bmc.stackmonitoring.responses + .GetMaintenanceWindowResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.maintenanceWindow(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.stackmonitoring.responses + .GetMaintenanceWindowResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/ListBaselineableMetricsConverter.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/ListBaselineableMetricsConverter.java index fe0d77dcaa7..560d4b17500 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/ListBaselineableMetricsConverter.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/ListBaselineableMetricsConverter.java @@ -43,6 +43,22 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getResourceGroup())); } + if (request.getResourceType() != null) { + target = + target.queryParam( + "resourceType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceType())); + } + + if (request.getIsOutOfBox() != null) { + target = + target.queryParam( + "isOutOfBox", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getIsOutOfBox())); + } + if (request.getName() != null) { target = target.queryParam( diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/ListMaintenanceWindowsConverter.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/ListMaintenanceWindowsConverter.java new file mode 100644 index 00000000000..a1119dc7a80 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/ListMaintenanceWindowsConverter.java @@ -0,0 +1,220 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.stackmonitoring.model.*; +import com.oracle.bmc.stackmonitoring.requests.*; +import com.oracle.bmc.stackmonitoring.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class ListMaintenanceWindowsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListMaintenanceWindowsConverter.class); + + public static com.oracle.bmc.stackmonitoring.requests.ListMaintenanceWindowsRequest + interceptRequest( + com.oracle.bmc.stackmonitoring.requests.ListMaintenanceWindowsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.stackmonitoring.requests.ListMaintenanceWindowsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20210330").path("maintenanceWindows"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getName() != null) { + target = + target.queryParam( + "name", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getName())); + } + + if (request.getLifecycleDetails() != null) { + target = + target.queryParam( + "lifecycleDetails", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleDetails().getValue())); + } + + if (request.getStatus() != null) { + target = + target.queryParam( + "status", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getStatus().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses.ListMaintenanceWindowsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses.ListMaintenanceWindowsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses.ListMaintenanceWindowsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses + .ListMaintenanceWindowsResponse>() { + @Override + public com.oracle.bmc.stackmonitoring.responses + .ListMaintenanceWindowsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.stackmonitoring.responses.ListMaintenanceWindowsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.stackmonitoring.model + .MaintenanceWindowCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.stackmonitoring.model + .MaintenanceWindowCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.stackmonitoring.model + .MaintenanceWindowCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.stackmonitoring.model + .MaintenanceWindowCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.stackmonitoring.responses + .ListMaintenanceWindowsResponse.Builder + builder = + com.oracle.bmc.stackmonitoring.responses + .ListMaintenanceWindowsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.maintenanceWindowCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcTotalItemsHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-total-items"); + if (opcTotalItemsHeader.isPresent()) { + builder.opcTotalItems( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-total-items", + opcTotalItemsHeader.get().get(0), + Integer.class)); + } + + com.oracle.bmc.stackmonitoring.responses + .ListMaintenanceWindowsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/RetryFailedMaintenanceWindowOperationConverter.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/RetryFailedMaintenanceWindowOperationConverter.java new file mode 100644 index 00000000000..4abbe87a804 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/RetryFailedMaintenanceWindowOperationConverter.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.stackmonitoring.model.*; +import com.oracle.bmc.stackmonitoring.requests.*; +import com.oracle.bmc.stackmonitoring.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class RetryFailedMaintenanceWindowOperationConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(RetryFailedMaintenanceWindowOperationConverter.class); + + public static com.oracle.bmc.stackmonitoring.requests + .RetryFailedMaintenanceWindowOperationRequest + interceptRequest( + com.oracle.bmc.stackmonitoring.requests + .RetryFailedMaintenanceWindowOperationRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.stackmonitoring.requests.RetryFailedMaintenanceWindowOperationRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getMaintenanceWindowId(), "maintenanceWindowId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210330") + .path("maintenanceWindows") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMaintenanceWindowId())) + .path("actions") + .path("retryFailedOperation"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses + .RetryFailedMaintenanceWindowOperationResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses + .RetryFailedMaintenanceWindowOperationResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses + .RetryFailedMaintenanceWindowOperationResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses + .RetryFailedMaintenanceWindowOperationResponse>() { + @Override + public com.oracle.bmc.stackmonitoring.responses + .RetryFailedMaintenanceWindowOperationResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.stackmonitoring.responses.RetryFailedMaintenanceWindowOperationResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.stackmonitoring.responses + .RetryFailedMaintenanceWindowOperationResponse + .Builder + builder = + com.oracle.bmc.stackmonitoring.responses + .RetryFailedMaintenanceWindowOperationResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.stackmonitoring.responses + .RetryFailedMaintenanceWindowOperationResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/StopMaintenanceWindowConverter.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/StopMaintenanceWindowConverter.java new file mode 100644 index 00000000000..2eefd9cd9de --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/StopMaintenanceWindowConverter.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.stackmonitoring.model.*; +import com.oracle.bmc.stackmonitoring.requests.*; +import com.oracle.bmc.stackmonitoring.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class StopMaintenanceWindowConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(StopMaintenanceWindowConverter.class); + + public static com.oracle.bmc.stackmonitoring.requests.StopMaintenanceWindowRequest + interceptRequest( + com.oracle.bmc.stackmonitoring.requests.StopMaintenanceWindowRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.stackmonitoring.requests.StopMaintenanceWindowRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getMaintenanceWindowId(), "maintenanceWindowId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210330") + .path("maintenanceWindows") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMaintenanceWindowId())) + .path("actions") + .path("stop"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses.StopMaintenanceWindowResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses.StopMaintenanceWindowResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses.StopMaintenanceWindowResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses + .StopMaintenanceWindowResponse>() { + @Override + public com.oracle.bmc.stackmonitoring.responses + .StopMaintenanceWindowResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.stackmonitoring.responses.StopMaintenanceWindowResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.stackmonitoring.responses + .StopMaintenanceWindowResponse.Builder + builder = + com.oracle.bmc.stackmonitoring.responses + .StopMaintenanceWindowResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.stackmonitoring.responses + .StopMaintenanceWindowResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/UpdateMaintenanceWindowConverter.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/UpdateMaintenanceWindowConverter.java new file mode 100644 index 00000000000..5935f5479d1 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/internal/http/UpdateMaintenanceWindowConverter.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.stackmonitoring.model.*; +import com.oracle.bmc.stackmonitoring.requests.*; +import com.oracle.bmc.stackmonitoring.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class UpdateMaintenanceWindowConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateMaintenanceWindowConverter.class); + + public static com.oracle.bmc.stackmonitoring.requests.UpdateMaintenanceWindowRequest + interceptRequest( + com.oracle.bmc.stackmonitoring.requests.UpdateMaintenanceWindowRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.stackmonitoring.requests.UpdateMaintenanceWindowRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getMaintenanceWindowId(), "maintenanceWindowId must not be blank"); + Validate.notNull( + request.getUpdateMaintenanceWindowDetails(), + "updateMaintenanceWindowDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210330") + .path("maintenanceWindows") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getMaintenanceWindowId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses.UpdateMaintenanceWindowResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses.UpdateMaintenanceWindowResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses.UpdateMaintenanceWindowResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.stackmonitoring.responses + .UpdateMaintenanceWindowResponse>() { + @Override + public com.oracle.bmc.stackmonitoring.responses + .UpdateMaintenanceWindowResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.stackmonitoring.responses.UpdateMaintenanceWindowResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.stackmonitoring.responses + .UpdateMaintenanceWindowResponse.Builder + builder = + com.oracle.bmc.stackmonitoring.responses + .UpdateMaintenanceWindowResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.stackmonitoring.responses + .UpdateMaintenanceWindowResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/BaselineableMetric.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/BaselineableMetric.java index 0f8f960fc5d..5137fb9a194 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/BaselineableMetric.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/BaselineableMetric.java @@ -22,10 +22,6 @@ public final class BaselineableMetric extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { @Deprecated @java.beans.ConstructorProperties({ - "createdBy", - "lastUpdatedBy", - "timeCreated", - "timeLastUpdated", "id", "lifecycleState", "tenancyId", @@ -34,16 +30,17 @@ public final class BaselineableMetric extends com.oracle.bmc.http.internal.Expli "column", "namespace", "resourceGroup", + "resourceType", "isOutOfBox", + "createdBy", + "lastUpdatedBy", + "timeCreated", + "timeLastUpdated", "freeformTags", "definedTags", "systemTags" }) public BaselineableMetric( - String createdBy, - String lastUpdatedBy, - java.util.Date timeCreated, - java.util.Date timeLastUpdated, String id, BaselineableMetricLifeCycleStates lifecycleState, String tenancyId, @@ -52,15 +49,16 @@ public BaselineableMetric( String column, String namespace, String resourceGroup, + String resourceType, Boolean isOutOfBox, + String createdBy, + String lastUpdatedBy, + java.util.Date timeCreated, + java.util.Date timeLastUpdated, java.util.Map freeformTags, java.util.Map> definedTags, java.util.Map> systemTags) { super(); - this.createdBy = createdBy; - this.lastUpdatedBy = lastUpdatedBy; - this.timeCreated = timeCreated; - this.timeLastUpdated = timeLastUpdated; this.id = id; this.lifecycleState = lifecycleState; this.tenancyId = tenancyId; @@ -69,7 +67,12 @@ public BaselineableMetric( this.column = column; this.namespace = namespace; this.resourceGroup = resourceGroup; + this.resourceType = resourceType; this.isOutOfBox = isOutOfBox; + this.createdBy = createdBy; + this.lastUpdatedBy = lastUpdatedBy; + this.timeCreated = timeCreated; + this.timeLastUpdated = timeLastUpdated; this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; @@ -77,70 +80,6 @@ public BaselineableMetric( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { - /** - * Created user id - **/ - @com.fasterxml.jackson.annotation.JsonProperty("createdBy") - private String createdBy; - - /** - * Created user id - * @param createdBy the value to set - * @return this builder - **/ - public Builder createdBy(String createdBy) { - this.createdBy = createdBy; - this.__explicitlySet__.add("createdBy"); - return this; - } - /** - * last Updated user id - **/ - @com.fasterxml.jackson.annotation.JsonProperty("lastUpdatedBy") - private String lastUpdatedBy; - - /** - * last Updated user id - * @param lastUpdatedBy the value to set - * @return this builder - **/ - public Builder lastUpdatedBy(String lastUpdatedBy) { - this.lastUpdatedBy = lastUpdatedBy; - this.__explicitlySet__.add("lastUpdatedBy"); - return this; - } - /** - * creation date - **/ - @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") - private java.util.Date timeCreated; - - /** - * creation date - * @param timeCreated the value to set - * @return this builder - **/ - public Builder timeCreated(java.util.Date timeCreated) { - this.timeCreated = timeCreated; - this.__explicitlySet__.add("timeCreated"); - return this; - } - /** - * last updated time - **/ - @com.fasterxml.jackson.annotation.JsonProperty("timeLastUpdated") - private java.util.Date timeLastUpdated; - - /** - * last updated time - * @param timeLastUpdated the value to set - * @return this builder - **/ - public Builder timeLastUpdated(java.util.Date timeLastUpdated) { - this.timeLastUpdated = timeLastUpdated; - this.__explicitlySet__.add("timeLastUpdated"); - return this; - } /** * OCID of the metric **/ @@ -269,6 +208,22 @@ public Builder resourceGroup(String resourceGroup) { this.__explicitlySet__.add("resourceGroup"); return this; } + /** + * Resource type of the metric + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private String resourceType; + + /** + * Resource type of the metric + * @param resourceType the value to set + * @return this builder + **/ + public Builder resourceType(String resourceType) { + this.resourceType = resourceType; + this.__explicitlySet__.add("resourceType"); + return this; + } /** * Is the metric created out of box, default false **/ @@ -285,6 +240,70 @@ public Builder isOutOfBox(Boolean isOutOfBox) { this.__explicitlySet__.add("isOutOfBox"); return this; } + /** + * Created user id + **/ + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private String createdBy; + + /** + * Created user id + * @param createdBy the value to set + * @return this builder + **/ + public Builder createdBy(String createdBy) { + this.createdBy = createdBy; + this.__explicitlySet__.add("createdBy"); + return this; + } + /** + * last Updated user id + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastUpdatedBy") + private String lastUpdatedBy; + + /** + * last Updated user id + * @param lastUpdatedBy the value to set + * @return this builder + **/ + public Builder lastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + this.__explicitlySet__.add("lastUpdatedBy"); + return this; + } + /** + * creation date + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * creation date + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * last updated time + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLastUpdated") + private java.util.Date timeLastUpdated; + + /** + * last updated time + * @param timeLastUpdated the value to set + * @return this builder + **/ + public Builder timeLastUpdated(java.util.Date timeLastUpdated) { + this.timeLastUpdated = timeLastUpdated; + this.__explicitlySet__.add("timeLastUpdated"); + return this; + } /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -353,10 +372,6 @@ public Builder systemTags(java.util.Map> s public BaselineableMetric build() { BaselineableMetric model = new BaselineableMetric( - this.createdBy, - this.lastUpdatedBy, - this.timeCreated, - this.timeLastUpdated, this.id, this.lifecycleState, this.tenancyId, @@ -365,7 +380,12 @@ public BaselineableMetric build() { this.column, this.namespace, this.resourceGroup, + this.resourceType, this.isOutOfBox, + this.createdBy, + this.lastUpdatedBy, + this.timeCreated, + this.timeLastUpdated, this.freeformTags, this.definedTags, this.systemTags); @@ -377,18 +397,6 @@ public BaselineableMetric build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(BaselineableMetric model) { - if (model.wasPropertyExplicitlySet("createdBy")) { - this.createdBy(model.getCreatedBy()); - } - if (model.wasPropertyExplicitlySet("lastUpdatedBy")) { - this.lastUpdatedBy(model.getLastUpdatedBy()); - } - if (model.wasPropertyExplicitlySet("timeCreated")) { - this.timeCreated(model.getTimeCreated()); - } - if (model.wasPropertyExplicitlySet("timeLastUpdated")) { - this.timeLastUpdated(model.getTimeLastUpdated()); - } if (model.wasPropertyExplicitlySet("id")) { this.id(model.getId()); } @@ -413,9 +421,24 @@ public Builder copy(BaselineableMetric model) { if (model.wasPropertyExplicitlySet("resourceGroup")) { this.resourceGroup(model.getResourceGroup()); } + if (model.wasPropertyExplicitlySet("resourceType")) { + this.resourceType(model.getResourceType()); + } if (model.wasPropertyExplicitlySet("isOutOfBox")) { this.isOutOfBox(model.getIsOutOfBox()); } + if (model.wasPropertyExplicitlySet("createdBy")) { + this.createdBy(model.getCreatedBy()); + } + if (model.wasPropertyExplicitlySet("lastUpdatedBy")) { + this.lastUpdatedBy(model.getLastUpdatedBy()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeLastUpdated")) { + this.timeLastUpdated(model.getTimeLastUpdated()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -440,62 +463,6 @@ public Builder toBuilder() { return new Builder().copy(this); } - /** - * Created user id - **/ - @com.fasterxml.jackson.annotation.JsonProperty("createdBy") - private final String createdBy; - - /** - * Created user id - * @return the value - **/ - public String getCreatedBy() { - return createdBy; - } - - /** - * last Updated user id - **/ - @com.fasterxml.jackson.annotation.JsonProperty("lastUpdatedBy") - private final String lastUpdatedBy; - - /** - * last Updated user id - * @return the value - **/ - public String getLastUpdatedBy() { - return lastUpdatedBy; - } - - /** - * creation date - **/ - @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") - private final java.util.Date timeCreated; - - /** - * creation date - * @return the value - **/ - public java.util.Date getTimeCreated() { - return timeCreated; - } - - /** - * last updated time - **/ - @com.fasterxml.jackson.annotation.JsonProperty("timeLastUpdated") - private final java.util.Date timeLastUpdated; - - /** - * last updated time - * @return the value - **/ - public java.util.Date getTimeLastUpdated() { - return timeLastUpdated; - } - /** * OCID of the metric **/ @@ -608,6 +575,20 @@ public String getResourceGroup() { return resourceGroup; } + /** + * Resource type of the metric + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private final String resourceType; + + /** + * Resource type of the metric + * @return the value + **/ + public String getResourceType() { + return resourceType; + } + /** * Is the metric created out of box, default false **/ @@ -622,6 +603,62 @@ public Boolean getIsOutOfBox() { return isOutOfBox; } + /** + * Created user id + **/ + @com.fasterxml.jackson.annotation.JsonProperty("createdBy") + private final String createdBy; + + /** + * Created user id + * @return the value + **/ + public String getCreatedBy() { + return createdBy; + } + + /** + * last Updated user id + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lastUpdatedBy") + private final String lastUpdatedBy; + + /** + * last Updated user id + * @return the value + **/ + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + /** + * creation date + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * creation date + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * last updated time + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeLastUpdated") + private final java.util.Date timeLastUpdated; + + /** + * last updated time + * @return the value + **/ + public java.util.Date getTimeLastUpdated() { + return timeLastUpdated; + } + /** * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. * Example: {@code {"bar-key": "value"}} @@ -690,11 +727,7 @@ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("BaselineableMetric("); sb.append("super=").append(super.toString()); - sb.append("createdBy=").append(String.valueOf(this.createdBy)); - sb.append(", lastUpdatedBy=").append(String.valueOf(this.lastUpdatedBy)); - sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); - sb.append(", timeLastUpdated=").append(String.valueOf(this.timeLastUpdated)); - sb.append(", id=").append(String.valueOf(this.id)); + sb.append("id=").append(String.valueOf(this.id)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); sb.append(", tenancyId=").append(String.valueOf(this.tenancyId)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); @@ -702,7 +735,12 @@ public String toString(boolean includeByteArrayContents) { sb.append(", column=").append(String.valueOf(this.column)); sb.append(", namespace=").append(String.valueOf(this.namespace)); sb.append(", resourceGroup=").append(String.valueOf(this.resourceGroup)); + sb.append(", resourceType=").append(String.valueOf(this.resourceType)); sb.append(", isOutOfBox=").append(String.valueOf(this.isOutOfBox)); + sb.append(", createdBy=").append(String.valueOf(this.createdBy)); + sb.append(", lastUpdatedBy=").append(String.valueOf(this.lastUpdatedBy)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeLastUpdated=").append(String.valueOf(this.timeLastUpdated)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); @@ -720,11 +758,7 @@ public boolean equals(Object o) { } BaselineableMetric other = (BaselineableMetric) o; - return java.util.Objects.equals(this.createdBy, other.createdBy) - && java.util.Objects.equals(this.lastUpdatedBy, other.lastUpdatedBy) - && java.util.Objects.equals(this.timeCreated, other.timeCreated) - && java.util.Objects.equals(this.timeLastUpdated, other.timeLastUpdated) - && java.util.Objects.equals(this.id, other.id) + return java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) && java.util.Objects.equals(this.tenancyId, other.tenancyId) && java.util.Objects.equals(this.compartmentId, other.compartmentId) @@ -732,7 +766,12 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.column, other.column) && java.util.Objects.equals(this.namespace, other.namespace) && java.util.Objects.equals(this.resourceGroup, other.resourceGroup) + && java.util.Objects.equals(this.resourceType, other.resourceType) && java.util.Objects.equals(this.isOutOfBox, other.isOutOfBox) + && java.util.Objects.equals(this.createdBy, other.createdBy) + && java.util.Objects.equals(this.lastUpdatedBy, other.lastUpdatedBy) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeLastUpdated, other.timeLastUpdated) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) @@ -743,14 +782,6 @@ public boolean equals(Object o) { public int hashCode() { final int PRIME = 59; int result = 1; - result = (result * PRIME) + (this.createdBy == null ? 43 : this.createdBy.hashCode()); - result = - (result * PRIME) - + (this.lastUpdatedBy == null ? 43 : this.lastUpdatedBy.hashCode()); - result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); - result = - (result * PRIME) - + (this.timeLastUpdated == null ? 43 : this.timeLastUpdated.hashCode()); result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); result = (result * PRIME) @@ -765,7 +796,16 @@ public int hashCode() { result = (result * PRIME) + (this.resourceGroup == null ? 43 : this.resourceGroup.hashCode()); + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); result = (result * PRIME) + (this.isOutOfBox == null ? 43 : this.isOutOfBox.hashCode()); + result = (result * PRIME) + (this.createdBy == null ? 43 : this.createdBy.hashCode()); + result = + (result * PRIME) + + (this.lastUpdatedBy == null ? 43 : this.lastUpdatedBy.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = + (result * PRIME) + + (this.timeLastUpdated == null ? 43 : this.timeLastUpdated.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/BaselineableMetricSummary.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/BaselineableMetricSummary.java index 76d2105cd92..2e76e33a937 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/BaselineableMetricSummary.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/BaselineableMetricSummary.java @@ -31,6 +31,7 @@ public final class BaselineableMetricSummary "column", "namespace", "resourceGroup", + "resourceType", "isOutOfBox", "freeformTags", "definedTags", @@ -45,6 +46,7 @@ public BaselineableMetricSummary( String column, String namespace, String resourceGroup, + String resourceType, Boolean isOutOfBox, java.util.Map freeformTags, java.util.Map> definedTags, @@ -58,6 +60,7 @@ public BaselineableMetricSummary( this.column = column; this.namespace = namespace; this.resourceGroup = resourceGroup; + this.resourceType = resourceType; this.isOutOfBox = isOutOfBox; this.freeformTags = freeformTags; this.definedTags = definedTags; @@ -194,6 +197,22 @@ public Builder resourceGroup(String resourceGroup) { this.__explicitlySet__.add("resourceGroup"); return this; } + /** + * Resource type of the metric + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private String resourceType; + + /** + * Resource type of the metric + * @param resourceType the value to set + * @return this builder + **/ + public Builder resourceType(String resourceType) { + this.resourceType = resourceType; + this.__explicitlySet__.add("resourceType"); + return this; + } /** * Is the metric created out of box, default false **/ @@ -286,6 +305,7 @@ public BaselineableMetricSummary build() { this.column, this.namespace, this.resourceGroup, + this.resourceType, this.isOutOfBox, this.freeformTags, this.definedTags, @@ -322,6 +342,9 @@ public Builder copy(BaselineableMetricSummary model) { if (model.wasPropertyExplicitlySet("resourceGroup")) { this.resourceGroup(model.getResourceGroup()); } + if (model.wasPropertyExplicitlySet("resourceType")) { + this.resourceType(model.getResourceType()); + } if (model.wasPropertyExplicitlySet("isOutOfBox")) { this.isOutOfBox(model.getIsOutOfBox()); } @@ -461,6 +484,20 @@ public String getResourceGroup() { return resourceGroup; } + /** + * Resource type of the metric + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private final String resourceType; + + /** + * Resource type of the metric + * @return the value + **/ + public String getResourceType() { + return resourceType; + } + /** * Is the metric created out of box, default false **/ @@ -551,6 +588,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", column=").append(String.valueOf(this.column)); sb.append(", namespace=").append(String.valueOf(this.namespace)); sb.append(", resourceGroup=").append(String.valueOf(this.resourceGroup)); + sb.append(", resourceType=").append(String.valueOf(this.resourceType)); sb.append(", isOutOfBox=").append(String.valueOf(this.isOutOfBox)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); @@ -577,6 +615,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.column, other.column) && java.util.Objects.equals(this.namespace, other.namespace) && java.util.Objects.equals(this.resourceGroup, other.resourceGroup) + && java.util.Objects.equals(this.resourceType, other.resourceType) && java.util.Objects.equals(this.isOutOfBox, other.isOutOfBox) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) @@ -602,6 +641,7 @@ public int hashCode() { result = (result * PRIME) + (this.resourceGroup == null ? 43 : this.resourceGroup.hashCode()); + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); result = (result * PRIME) + (this.isOutOfBox == null ? 43 : this.isOutOfBox.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateBaselineableMetricDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateBaselineableMetricDetails.java index 606eb0b8918..ce1dbe797a6 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateBaselineableMetricDetails.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateBaselineableMetricDetails.java @@ -27,20 +27,23 @@ public final class CreateBaselineableMetricDetails "name", "column", "namespace", - "resourceGroup" + "resourceGroup", + "resourceType" }) public CreateBaselineableMetricDetails( String compartmentId, String name, String column, String namespace, - String resourceGroup) { + String resourceGroup, + String resourceType) { super(); this.compartmentId = compartmentId; this.name = name; this.column = column; this.namespace = namespace; this.resourceGroup = resourceGroup; + this.resourceType = resourceType; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -125,6 +128,22 @@ public Builder resourceGroup(String resourceGroup) { this.__explicitlySet__.add("resourceGroup"); return this; } + /** + * Resource type of the metric + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private String resourceType; + + /** + * Resource type of the metric + * @param resourceType the value to set + * @return this builder + **/ + public Builder resourceType(String resourceType) { + this.resourceType = resourceType; + this.__explicitlySet__.add("resourceType"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -136,7 +155,8 @@ public CreateBaselineableMetricDetails build() { this.name, this.column, this.namespace, - this.resourceGroup); + this.resourceGroup, + this.resourceType); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -160,6 +180,9 @@ public Builder copy(CreateBaselineableMetricDetails model) { if (model.wasPropertyExplicitlySet("resourceGroup")) { this.resourceGroup(model.getResourceGroup()); } + if (model.wasPropertyExplicitlySet("resourceType")) { + this.resourceType(model.getResourceType()); + } return this; } } @@ -245,6 +268,20 @@ public String getResourceGroup() { return resourceGroup; } + /** + * Resource type of the metric + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private final String resourceType; + + /** + * Resource type of the metric + * @return the value + **/ + public String getResourceType() { + return resourceType; + } + @Override public String toString() { return this.toString(true); @@ -264,6 +301,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", column=").append(String.valueOf(this.column)); sb.append(", namespace=").append(String.valueOf(this.namespace)); sb.append(", resourceGroup=").append(String.valueOf(this.resourceGroup)); + sb.append(", resourceType=").append(String.valueOf(this.resourceType)); sb.append(")"); return sb.toString(); } @@ -283,6 +321,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.column, other.column) && java.util.Objects.equals(this.namespace, other.namespace) && java.util.Objects.equals(this.resourceGroup, other.resourceGroup) + && java.util.Objects.equals(this.resourceType, other.resourceType) && super.equals(other); } @@ -299,6 +338,7 @@ public int hashCode() { result = (result * PRIME) + (this.resourceGroup == null ? 43 : this.resourceGroup.hashCode()); + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateMaintenanceWindowDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateMaintenanceWindowDetails.java new file mode 100644 index 00000000000..dd7a04d24f1 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateMaintenanceWindowDetails.java @@ -0,0 +1,298 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Infomation to create a new Maintenance Window. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateMaintenanceWindowDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateMaintenanceWindowDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "name", + "description", + "compartmentId", + "resources", + "schedule" + }) + public CreateMaintenanceWindowDetails( + String name, + String description, + String compartmentId, + java.util.List resources, + MaintenanceWindowSchedule schedule) { + super(); + this.name = name; + this.description = description; + this.compartmentId = compartmentId; + this.resources = resources; + this.schedule = schedule; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Maintenance Window name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Maintenance Window name. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Maintenance Window description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Maintenance Window description. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Compartment Identifier [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Compartment Identifier [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * List of resource Ids which are part of the Maintenance Window + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * List of resource Ids which are part of the Maintenance Window + * + * @param resources the value to set + * @return this builder + **/ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("schedule") + private MaintenanceWindowSchedule schedule; + + public Builder schedule(MaintenanceWindowSchedule schedule) { + this.schedule = schedule; + this.__explicitlySet__.add("schedule"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateMaintenanceWindowDetails build() { + CreateMaintenanceWindowDetails model = + new CreateMaintenanceWindowDetails( + this.name, + this.description, + this.compartmentId, + this.resources, + this.schedule); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateMaintenanceWindowDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("schedule")) { + this.schedule(model.getSchedule()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Maintenance Window name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Maintenance Window name. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Maintenance Window description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Maintenance Window description. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Compartment Identifier [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Compartment Identifier [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * List of resource Ids which are part of the Maintenance Window + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * List of resource Ids which are part of the Maintenance Window + * + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + @com.fasterxml.jackson.annotation.JsonProperty("schedule") + private final MaintenanceWindowSchedule schedule; + + public MaintenanceWindowSchedule getSchedule() { + return schedule; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateMaintenanceWindowDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", schedule=").append(String.valueOf(this.schedule)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateMaintenanceWindowDetails)) { + return false; + } + + CreateMaintenanceWindowDetails other = (CreateMaintenanceWindowDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.schedule, other.schedule) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = (result * PRIME) + (this.schedule == null ? 43 : this.schedule.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateMaintenanceWindowResourceDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateMaintenanceWindowResourceDetails.java new file mode 100644 index 00000000000..7007fab8a0f --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/CreateMaintenanceWindowResourceDetails.java @@ -0,0 +1,196 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * List of resource IDs that are part of the Maintenance Window. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateMaintenanceWindowResourceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateMaintenanceWindowResourceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"resourceId", "areMembersIncluded"}) + public CreateMaintenanceWindowResourceDetails(String resourceId, Boolean areMembersIncluded) { + super(); + this.resourceId = resourceId; + this.areMembersIncluded = areMembersIncluded; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of monitored resource + * part of the Maintenance window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of monitored resource + * part of the Maintenance window. + * + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * Flag to indicate if the members of the resource has to be include in the + * Maintenance Window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areMembersIncluded") + private Boolean areMembersIncluded; + + /** + * Flag to indicate if the members of the resource has to be include in the + * Maintenance Window. + * + * @param areMembersIncluded the value to set + * @return this builder + **/ + public Builder areMembersIncluded(Boolean areMembersIncluded) { + this.areMembersIncluded = areMembersIncluded; + this.__explicitlySet__.add("areMembersIncluded"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateMaintenanceWindowResourceDetails build() { + CreateMaintenanceWindowResourceDetails model = + new CreateMaintenanceWindowResourceDetails( + this.resourceId, this.areMembersIncluded); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateMaintenanceWindowResourceDetails model) { + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("areMembersIncluded")) { + this.areMembersIncluded(model.getAreMembersIncluded()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of monitored resource + * part of the Maintenance window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of monitored resource + * part of the Maintenance window. + * + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * Flag to indicate if the members of the resource has to be include in the + * Maintenance Window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areMembersIncluded") + private final Boolean areMembersIncluded; + + /** + * Flag to indicate if the members of the resource has to be include in the + * Maintenance Window. + * + * @return the value + **/ + public Boolean getAreMembersIncluded() { + return areMembersIncluded; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateMaintenanceWindowResourceDetails("); + sb.append("super=").append(super.toString()); + sb.append("resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", areMembersIncluded=").append(String.valueOf(this.areMembersIncluded)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateMaintenanceWindowResourceDetails)) { + return false; + } + + CreateMaintenanceWindowResourceDetails other = (CreateMaintenanceWindowResourceDetails) o; + return java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.areMembersIncluded, other.areMembersIncluded) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = + (result * PRIME) + + (this.areMembersIncluded == null + ? 43 + : this.areMembersIncluded.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindow.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindow.java new file mode 100644 index 00000000000..cb862cc2cf6 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindow.java @@ -0,0 +1,560 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Maintenance Window object. It contains all the information of the Maintenance window. + * Used in the Create and Get operations. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MaintenanceWindow.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MaintenanceWindow extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "name", + "description", + "compartmentId", + "resources", + "resourcesDetails", + "lifecycleState", + "lifecycleDetails", + "schedule", + "timeCreated", + "timeUpdated" + }) + public MaintenanceWindow( + String id, + String name, + String description, + String compartmentId, + java.util.List resources, + java.util.List resourcesDetails, + MaintenanceWindowLifecycleState lifecycleState, + MaintenanceWindowLifecycleDetails lifecycleDetails, + MaintenanceWindowSchedule schedule, + java.util.Date timeCreated, + java.util.Date timeUpdated) { + super(); + this.id = id; + this.name = name; + this.description = description; + this.compartmentId = compartmentId; + this.resources = resources; + this.resourcesDetails = resourcesDetails; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.schedule = schedule; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + * + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Maintenance Window name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Maintenance Window name. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Maintenance Window description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Maintenance Window description. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Compartment Identifier [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Compartment Identifier [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * List of resource Ids which are part of the Maintenance Window + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * List of resource Ids which are part of the Maintenance Window + * + * @param resources the value to set + * @return this builder + **/ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** + * List of resource details that are part of the Maintenance Window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourcesDetails") + private java.util.List resourcesDetails; + + /** + * List of resource details that are part of the Maintenance Window. + * + * @param resourcesDetails the value to set + * @return this builder + **/ + public Builder resourcesDetails(java.util.List resourcesDetails) { + this.resourcesDetails = resourcesDetails; + this.__explicitlySet__.add("resourcesDetails"); + return this; + } + /** + * Lifecycle state of the monitored resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private MaintenanceWindowLifecycleState lifecycleState; + + /** + * Lifecycle state of the monitored resource. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(MaintenanceWindowLifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Lifecycle Details of the Maintenance Window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private MaintenanceWindowLifecycleDetails lifecycleDetails; + + /** + * Lifecycle Details of the Maintenance Window. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(MaintenanceWindowLifecycleDetails lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("schedule") + private MaintenanceWindowSchedule schedule; + + public Builder schedule(MaintenanceWindowSchedule schedule) { + this.schedule = schedule; + this.__explicitlySet__.add("schedule"); + return this; + } + /** + * The time the the maintenance window was created. An RFC3339 formatted datetime string + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The time the the maintenance window was created. An RFC3339 formatted datetime string + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The time the the mainteance window was updated. An RFC3339 formatted datetime string + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The time the the mainteance window was updated. An RFC3339 formatted datetime string + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MaintenanceWindow build() { + MaintenanceWindow model = + new MaintenanceWindow( + this.id, + this.name, + this.description, + this.compartmentId, + this.resources, + this.resourcesDetails, + this.lifecycleState, + this.lifecycleDetails, + this.schedule, + this.timeCreated, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MaintenanceWindow model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("resourcesDetails")) { + this.resourcesDetails(model.getResourcesDetails()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("schedule")) { + this.schedule(model.getSchedule()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + * + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Maintenance Window name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Maintenance Window name. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Maintenance Window description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Maintenance Window description. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * Compartment Identifier [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Compartment Identifier [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * List of resource Ids which are part of the Maintenance Window + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * List of resource Ids which are part of the Maintenance Window + * + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + /** + * List of resource details that are part of the Maintenance Window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourcesDetails") + private final java.util.List resourcesDetails; + + /** + * List of resource details that are part of the Maintenance Window. + * + * @return the value + **/ + public java.util.List getResourcesDetails() { + return resourcesDetails; + } + + /** + * Lifecycle state of the monitored resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final MaintenanceWindowLifecycleState lifecycleState; + + /** + * Lifecycle state of the monitored resource. + * @return the value + **/ + public MaintenanceWindowLifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Lifecycle Details of the Maintenance Window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final MaintenanceWindowLifecycleDetails lifecycleDetails; + + /** + * Lifecycle Details of the Maintenance Window. + * @return the value + **/ + public MaintenanceWindowLifecycleDetails getLifecycleDetails() { + return lifecycleDetails; + } + + @com.fasterxml.jackson.annotation.JsonProperty("schedule") + private final MaintenanceWindowSchedule schedule; + + public MaintenanceWindowSchedule getSchedule() { + return schedule; + } + + /** + * The time the the maintenance window was created. An RFC3339 formatted datetime string + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The time the the maintenance window was created. An RFC3339 formatted datetime string + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The time the the mainteance window was updated. An RFC3339 formatted datetime string + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The time the the mainteance window was updated. An RFC3339 formatted datetime string + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MaintenanceWindow("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", resourcesDetails=").append(String.valueOf(this.resourcesDetails)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", schedule=").append(String.valueOf(this.schedule)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MaintenanceWindow)) { + return false; + } + + MaintenanceWindow other = (MaintenanceWindow) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.resourcesDetails, other.resourcesDetails) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.schedule, other.schedule) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = + (result * PRIME) + + (this.resourcesDetails == null ? 43 : this.resourcesDetails.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.schedule == null ? 43 : this.schedule.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowCollection.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowCollection.java new file mode 100644 index 00000000000..98bef9b1546 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Result of List of maintenance window. Contains MaintenanceWindowSummary items and other data. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MaintenanceWindowCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MaintenanceWindowCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public MaintenanceWindowCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of maintenance window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of maintenance window. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MaintenanceWindowCollection build() { + MaintenanceWindowCollection model = new MaintenanceWindowCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MaintenanceWindowCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of maintenance window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of maintenance window. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MaintenanceWindowCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MaintenanceWindowCollection)) { + return false; + } + + MaintenanceWindowCollection other = (MaintenanceWindowCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowLifecycleDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowLifecycleDetails.java new file mode 100644 index 00000000000..0ada1e4f77e --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowLifecycleDetails.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Lifecycle details of Maintenance Windows + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public enum MaintenanceWindowLifecycleDetails { + InProgress("IN_PROGRESS"), + Scheduled("SCHEDULED"), + Completed("COMPLETED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(MaintenanceWindowLifecycleDetails.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (MaintenanceWindowLifecycleDetails v : MaintenanceWindowLifecycleDetails.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + MaintenanceWindowLifecycleDetails(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static MaintenanceWindowLifecycleDetails create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'MaintenanceWindowLifecycleDetails', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowLifecycleState.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowLifecycleState.java new file mode 100644 index 00000000000..c7fa0888e86 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowLifecycleState.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Possible lifecycle states. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public enum MaintenanceWindowLifecycleState { + Creating("CREATING"), + Updating("UPDATING"), + Inactive("INACTIVE"), + Active("ACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + NeedsAttention("NEEDS_ATTENTION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(MaintenanceWindowLifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (MaintenanceWindowLifecycleState v : MaintenanceWindowLifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + MaintenanceWindowLifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static MaintenanceWindowLifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'MaintenanceWindowLifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowOperationStatus.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowOperationStatus.java new file mode 100644 index 00000000000..47c11987814 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowOperationStatus.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Possible lifecycle states. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public enum MaintenanceWindowOperationStatus { + InProgress("IN_PROGRESS"), + Failed("FAILED"), + Succeeded("SUCCEEDED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(MaintenanceWindowOperationStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (MaintenanceWindowOperationStatus v : MaintenanceWindowOperationStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + MaintenanceWindowOperationStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static MaintenanceWindowOperationStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'MaintenanceWindowOperationStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowOperationType.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowOperationType.java new file mode 100644 index 00000000000..481e5bfcdaa --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowOperationType.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Possible operation performed in Maintenance Window. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public enum MaintenanceWindowOperationType { + Update("UPDATE"), + Create("CREATE"), + Delete("DELETE"), + Stop("STOP"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(MaintenanceWindowOperationType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (MaintenanceWindowOperationType v : MaintenanceWindowOperationType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + MaintenanceWindowOperationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static MaintenanceWindowOperationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'MaintenanceWindowOperationType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowSchedule.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowSchedule.java new file mode 100644 index 00000000000..e903687b123 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowSchedule.java @@ -0,0 +1,131 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Schedule information of the Maintenance Window + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "scheduleType", + defaultImpl = MaintenanceWindowSchedule.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = RecurrentMaintenanceWindowSchedule.class, + name = "RECURRENT" + ), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = OneTimeMaintenanceWindowSchedule.class, + name = "ONE_TIME" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class MaintenanceWindowSchedule extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected MaintenanceWindowSchedule() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MaintenanceWindowSchedule("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MaintenanceWindowSchedule)) { + return false; + } + + MaintenanceWindowSchedule other = (MaintenanceWindowSchedule) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** + * Property to identify the type of the Maintenance Window. + * + **/ + public enum ScheduleType { + OneTime("ONE_TIME"), + Recurrent("RECURRENT"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ScheduleType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ScheduleType v : ScheduleType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ScheduleType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ScheduleType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ScheduleType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowSortBy.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowSortBy.java new file mode 100644 index 00000000000..25eaa6e10c6 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowSortBy.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Sort By. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public enum MaintenanceWindowSortBy { + Name("NAME"), + StartTime("START_TIME"), + EndTime("END_TIME"), + TimeCreated("TIME_CREATED"), + TimeUpdated("TIME_UPDATED"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (MaintenanceWindowSortBy v : MaintenanceWindowSortBy.values()) { + map.put(v.getValue(), v); + } + } + + MaintenanceWindowSortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static MaintenanceWindowSortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid MaintenanceWindowSortBy: " + key); + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowSummary.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowSummary.java new file mode 100644 index 00000000000..c0daf9bfa37 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MaintenanceWindowSummary.java @@ -0,0 +1,624 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * General information of a Maintenance Window + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MaintenanceWindowSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MaintenanceWindowSummary + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "name", + "compartmentId", + "numberOfResources", + "lifecycleState", + "lifecycleDetails", + "operationType", + "operationStatus", + "schedule", + "freeformTags", + "definedTags", + "systemTags" + }) + public MaintenanceWindowSummary( + String id, + String name, + String compartmentId, + Integer numberOfResources, + MaintenanceWindowLifecycleState lifecycleState, + MaintenanceWindowLifecycleDetails lifecycleDetails, + MaintenanceWindowOperationType operationType, + MaintenanceWindowOperationStatus operationStatus, + MaintenanceWindowSchedule schedule, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.name = name; + this.compartmentId = compartmentId; + this.numberOfResources = numberOfResources; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.operationType = operationType; + this.operationStatus = operationStatus; + this.schedule = schedule; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + * + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * Maintenance Window name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Maintenance Window name. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Compartment Identifier [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * Compartment Identifier [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * Number of resources of the Maintenance window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numberOfResources") + private Integer numberOfResources; + + /** + * Number of resources of the Maintenance window. + * + * @param numberOfResources the value to set + * @return this builder + **/ + public Builder numberOfResources(Integer numberOfResources) { + this.numberOfResources = numberOfResources; + this.__explicitlySet__.add("numberOfResources"); + return this; + } + /** + * Lifecycle state of the monitored resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private MaintenanceWindowLifecycleState lifecycleState; + + /** + * Lifecycle state of the monitored resource. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(MaintenanceWindowLifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Lifecycle Details of the Maintenance Window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private MaintenanceWindowLifecycleDetails lifecycleDetails; + + /** + * Lifecycle Details of the Maintenance Window. + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(MaintenanceWindowLifecycleDetails lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The name of the most recent operation of the Maintenance window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private MaintenanceWindowOperationType operationType; + + /** + * The name of the most recent operation of the Maintenance window. + * + * @param operationType the value to set + * @return this builder + **/ + public Builder operationType(MaintenanceWindowOperationType operationType) { + this.operationType = operationType; + this.__explicitlySet__.add("operationType"); + return this; + } + /** + * Status of the most recent operation of the Maintenance Window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationStatus") + private MaintenanceWindowOperationStatus operationStatus; + + /** + * Status of the most recent operation of the Maintenance Window. + * + * @param operationStatus the value to set + * @return this builder + **/ + public Builder operationStatus(MaintenanceWindowOperationStatus operationStatus) { + this.operationStatus = operationStatus; + this.__explicitlySet__.add("operationStatus"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("schedule") + private MaintenanceWindowSchedule schedule; + + public Builder schedule(MaintenanceWindowSchedule schedule) { + this.schedule = schedule; + this.__explicitlySet__.add("schedule"); + return this; + } + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MaintenanceWindowSummary build() { + MaintenanceWindowSummary model = + new MaintenanceWindowSummary( + this.id, + this.name, + this.compartmentId, + this.numberOfResources, + this.lifecycleState, + this.lifecycleDetails, + this.operationType, + this.operationStatus, + this.schedule, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MaintenanceWindowSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("numberOfResources")) { + this.numberOfResources(model.getNumberOfResources()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("operationType")) { + this.operationType(model.getOperationType()); + } + if (model.wasPropertyExplicitlySet("operationStatus")) { + this.operationStatus(model.getOperationStatus()); + } + if (model.wasPropertyExplicitlySet("schedule")) { + this.schedule(model.getSchedule()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + * + * @return the value + **/ + public String getId() { + return id; + } + + /** + * Maintenance Window name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Maintenance Window name. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Compartment Identifier [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * Compartment Identifier [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * Number of resources of the Maintenance window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numberOfResources") + private final Integer numberOfResources; + + /** + * Number of resources of the Maintenance window. + * + * @return the value + **/ + public Integer getNumberOfResources() { + return numberOfResources; + } + + /** + * Lifecycle state of the monitored resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final MaintenanceWindowLifecycleState lifecycleState; + + /** + * Lifecycle state of the monitored resource. + * @return the value + **/ + public MaintenanceWindowLifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Lifecycle Details of the Maintenance Window. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final MaintenanceWindowLifecycleDetails lifecycleDetails; + + /** + * Lifecycle Details of the Maintenance Window. + * @return the value + **/ + public MaintenanceWindowLifecycleDetails getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The name of the most recent operation of the Maintenance window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private final MaintenanceWindowOperationType operationType; + + /** + * The name of the most recent operation of the Maintenance window. + * + * @return the value + **/ + public MaintenanceWindowOperationType getOperationType() { + return operationType; + } + + /** + * Status of the most recent operation of the Maintenance Window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationStatus") + private final MaintenanceWindowOperationStatus operationStatus; + + /** + * Status of the most recent operation of the Maintenance Window. + * + * @return the value + **/ + public MaintenanceWindowOperationStatus getOperationStatus() { + return operationStatus; + } + + @com.fasterxml.jackson.annotation.JsonProperty("schedule") + private final MaintenanceWindowSchedule schedule; + + public MaintenanceWindowSchedule getSchedule() { + return schedule; + } + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: {@code {"bar-key": "value"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: {@code {"foo-namespace": {"bar-key": "value"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * Usage of system tag keys. These predefined keys are scoped to namespaces. + * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MaintenanceWindowSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", numberOfResources=").append(String.valueOf(this.numberOfResources)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", operationType=").append(String.valueOf(this.operationType)); + sb.append(", operationStatus=").append(String.valueOf(this.operationStatus)); + sb.append(", schedule=").append(String.valueOf(this.schedule)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MaintenanceWindowSummary)) { + return false; + } + + MaintenanceWindowSummary other = (MaintenanceWindowSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.numberOfResources, other.numberOfResources) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.operationType, other.operationType) + && java.util.Objects.equals(this.operationStatus, other.operationStatus) + && java.util.Objects.equals(this.schedule, other.schedule) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.numberOfResources == null ? 43 : this.numberOfResources.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = + (result * PRIME) + + (this.operationType == null ? 43 : this.operationType.hashCode()); + result = + (result * PRIME) + + (this.operationStatus == null ? 43 : this.operationStatus.hashCode()); + result = (result * PRIME) + (this.schedule == null ? 43 : this.schedule.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceDetails.java new file mode 100644 index 00000000000..3438cb5272d --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/MonitoredResourceDetails.java @@ -0,0 +1,273 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Details of the Resource that are part of the Maintenance Window. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = MonitoredResourceDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class MonitoredResourceDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"resourceId", "name", "type", "numberOfMembers"}) + public MonitoredResourceDetails( + String resourceId, String name, String type, Integer numberOfMembers) { + super(); + this.resourceId = resourceId; + this.name = name; + this.type = type; + this.numberOfMembers = numberOfMembers; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of monitored resource + * part of the Maintenance window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private String resourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of monitored resource + * part of the Maintenance window. + * + * @param resourceId the value to set + * @return this builder + **/ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + this.__explicitlySet__.add("resourceId"); + return this; + } + /** + * Name of the monitored resource + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * Name of the monitored resource + * + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * Type of the monitored resource + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private String type; + + /** + * Type of the monitored resource + * + * @param type the value to set + * @return this builder + **/ + public Builder type(String type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * Number of members of the resource + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numberOfMembers") + private Integer numberOfMembers; + + /** + * Number of members of the resource + * + * @param numberOfMembers the value to set + * @return this builder + **/ + public Builder numberOfMembers(Integer numberOfMembers) { + this.numberOfMembers = numberOfMembers; + this.__explicitlySet__.add("numberOfMembers"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public MonitoredResourceDetails build() { + MonitoredResourceDetails model = + new MonitoredResourceDetails( + this.resourceId, this.name, this.type, this.numberOfMembers); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(MonitoredResourceDetails model) { + if (model.wasPropertyExplicitlySet("resourceId")) { + this.resourceId(model.getResourceId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("numberOfMembers")) { + this.numberOfMembers(model.getNumberOfMembers()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of monitored resource + * part of the Maintenance window. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceId") + private final String resourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of monitored resource + * part of the Maintenance window. + * + * @return the value + **/ + public String getResourceId() { + return resourceId; + } + + /** + * Name of the monitored resource + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * Name of the monitored resource + * + * @return the value + **/ + public String getName() { + return name; + } + + /** + * Type of the monitored resource + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final String type; + + /** + * Type of the monitored resource + * + * @return the value + **/ + public String getType() { + return type; + } + + /** + * Number of members of the resource + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("numberOfMembers") + private final Integer numberOfMembers; + + /** + * Number of members of the resource + * + * @return the value + **/ + public Integer getNumberOfMembers() { + return numberOfMembers; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("MonitoredResourceDetails("); + sb.append("super=").append(super.toString()); + sb.append("resourceId=").append(String.valueOf(this.resourceId)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", numberOfMembers=").append(String.valueOf(this.numberOfMembers)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof MonitoredResourceDetails)) { + return false; + } + + MonitoredResourceDetails other = (MonitoredResourceDetails) o; + return java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.numberOfMembers, other.numberOfMembers) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = + (result * PRIME) + + (this.numberOfMembers == null ? 43 : this.numberOfMembers.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/OneTimeMaintenanceWindowSchedule.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/OneTimeMaintenanceWindowSchedule.java new file mode 100644 index 00000000000..08ea12f1c4a --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/OneTimeMaintenanceWindowSchedule.java @@ -0,0 +1,199 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Schedule information for the Maintenance Window that is executed only once. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OneTimeMaintenanceWindowSchedule.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "scheduleType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class OneTimeMaintenanceWindowSchedule extends MaintenanceWindowSchedule { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Start time of Maintenance window. A RFC3339 formatted datetime string + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeMaintenanceWindowStart") + private java.util.Date timeMaintenanceWindowStart; + + /** + * Start time of Maintenance window. A RFC3339 formatted datetime string + * + * @param timeMaintenanceWindowStart the value to set + * @return this builder + **/ + public Builder timeMaintenanceWindowStart(java.util.Date timeMaintenanceWindowStart) { + this.timeMaintenanceWindowStart = timeMaintenanceWindowStart; + this.__explicitlySet__.add("timeMaintenanceWindowStart"); + return this; + } + /** + * Start time of Maintenance window. A RFC3339 formatted datetime string + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeMaintenanceWindowEnd") + private java.util.Date timeMaintenanceWindowEnd; + + /** + * Start time of Maintenance window. A RFC3339 formatted datetime string + * + * @param timeMaintenanceWindowEnd the value to set + * @return this builder + **/ + public Builder timeMaintenanceWindowEnd(java.util.Date timeMaintenanceWindowEnd) { + this.timeMaintenanceWindowEnd = timeMaintenanceWindowEnd; + this.__explicitlySet__.add("timeMaintenanceWindowEnd"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OneTimeMaintenanceWindowSchedule build() { + OneTimeMaintenanceWindowSchedule model = + new OneTimeMaintenanceWindowSchedule( + this.timeMaintenanceWindowStart, this.timeMaintenanceWindowEnd); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OneTimeMaintenanceWindowSchedule model) { + if (model.wasPropertyExplicitlySet("timeMaintenanceWindowStart")) { + this.timeMaintenanceWindowStart(model.getTimeMaintenanceWindowStart()); + } + if (model.wasPropertyExplicitlySet("timeMaintenanceWindowEnd")) { + this.timeMaintenanceWindowEnd(model.getTimeMaintenanceWindowEnd()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public OneTimeMaintenanceWindowSchedule( + java.util.Date timeMaintenanceWindowStart, java.util.Date timeMaintenanceWindowEnd) { + super(); + this.timeMaintenanceWindowStart = timeMaintenanceWindowStart; + this.timeMaintenanceWindowEnd = timeMaintenanceWindowEnd; + } + + /** + * Start time of Maintenance window. A RFC3339 formatted datetime string + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeMaintenanceWindowStart") + private final java.util.Date timeMaintenanceWindowStart; + + /** + * Start time of Maintenance window. A RFC3339 formatted datetime string + * + * @return the value + **/ + public java.util.Date getTimeMaintenanceWindowStart() { + return timeMaintenanceWindowStart; + } + + /** + * Start time of Maintenance window. A RFC3339 formatted datetime string + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeMaintenanceWindowEnd") + private final java.util.Date timeMaintenanceWindowEnd; + + /** + * Start time of Maintenance window. A RFC3339 formatted datetime string + * + * @return the value + **/ + public java.util.Date getTimeMaintenanceWindowEnd() { + return timeMaintenanceWindowEnd; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("OneTimeMaintenanceWindowSchedule("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", timeMaintenanceWindowStart=") + .append(String.valueOf(this.timeMaintenanceWindowStart)); + sb.append(", timeMaintenanceWindowEnd=") + .append(String.valueOf(this.timeMaintenanceWindowEnd)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof OneTimeMaintenanceWindowSchedule)) { + return false; + } + + OneTimeMaintenanceWindowSchedule other = (OneTimeMaintenanceWindowSchedule) o; + return java.util.Objects.equals( + this.timeMaintenanceWindowStart, other.timeMaintenanceWindowStart) + && java.util.Objects.equals( + this.timeMaintenanceWindowEnd, other.timeMaintenanceWindowEnd) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.timeMaintenanceWindowStart == null + ? 43 + : this.timeMaintenanceWindowStart.hashCode()); + result = + (result * PRIME) + + (this.timeMaintenanceWindowEnd == null + ? 43 + : this.timeMaintenanceWindowEnd.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/OperationType.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/OperationType.java index 0bb77306fb0..1131a716bd0 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/OperationType.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/OperationType.java @@ -23,6 +23,10 @@ public enum OperationType { BulkDeleteResources("BULK_DELETE_RESOURCES"), UpdateAndPropagateTags("UPDATE_AND_PROPAGATE_TAGS"), ImportResources("IMPORT_RESOURCES"), + CreateMaintenanceWindow("CREATE_MAINTENANCE_WINDOW"), + UpdateMaintenanceWindow("UPDATE_MAINTENANCE_WINDOW"), + DeleteMaintenanceWindow("DELETE_MAINTENANCE_WINDOW"), + StopMaintenanceWindow("STOP_MAINTENANCE_WINDOW"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/RecurrentMaintenanceWindowSchedule.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/RecurrentMaintenanceWindowSchedule.java new file mode 100644 index 00000000000..a529fb1463a --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/RecurrentMaintenanceWindowSchedule.java @@ -0,0 +1,331 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Schedule information for the Maintenance Window that is executed multiple times. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = RecurrentMaintenanceWindowSchedule.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "scheduleType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class RecurrentMaintenanceWindowSchedule extends MaintenanceWindowSchedule { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Start time of Maintenance window. A RFC3339 formatted datetime string + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeMaintenanceWindowStart") + private java.util.Date timeMaintenanceWindowStart; + + /** + * Start time of Maintenance window. A RFC3339 formatted datetime string + * + * @param timeMaintenanceWindowStart the value to set + * @return this builder + **/ + public Builder timeMaintenanceWindowStart(java.util.Date timeMaintenanceWindowStart) { + this.timeMaintenanceWindowStart = timeMaintenanceWindowStart; + this.__explicitlySet__.add("timeMaintenanceWindowStart"); + return this; + } + /** + * Start time of Maintenance window. A RFC3339 formatted datetime string + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeMaintenanceWindowEnd") + private java.util.Date timeMaintenanceWindowEnd; + + /** + * Start time of Maintenance window. A RFC3339 formatted datetime string + * + * @param timeMaintenanceWindowEnd the value to set + * @return this builder + **/ + public Builder timeMaintenanceWindowEnd(java.util.Date timeMaintenanceWindowEnd) { + this.timeMaintenanceWindowEnd = timeMaintenanceWindowEnd; + this.__explicitlySet__.add("timeMaintenanceWindowEnd"); + return this; + } + /** + * A RFC5545 formatted recurrence string which represents the Maintenance Window Recurrence. + * Please refer this for details:https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10 + * FREQ: Frequency of the Maintenance Window. The supported values are: DAILY and WEEKLY. + * BYDAY: Comma separated days for Weekly Maintenance Window. + * BYHOUR: Specifies the start hour of each recurrence after {@code timeMaintenanceWindowStart} value. + * BYMINUTE: Specifies the start minute of each reccurrence after {@code timeMaintenanceWindowStart} value. The default value is 00 + * BYSECOND: Specifies the start second of each reccurrence after {@code timeMaintenanceWindowStart} value. The default value is 00 + * Other Rules are not supported. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceWindowRecurrences") + private String maintenanceWindowRecurrences; + + /** + * A RFC5545 formatted recurrence string which represents the Maintenance Window Recurrence. + * Please refer this for details:https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10 + * FREQ: Frequency of the Maintenance Window. The supported values are: DAILY and WEEKLY. + * BYDAY: Comma separated days for Weekly Maintenance Window. + * BYHOUR: Specifies the start hour of each recurrence after {@code timeMaintenanceWindowStart} value. + * BYMINUTE: Specifies the start minute of each reccurrence after {@code timeMaintenanceWindowStart} value. The default value is 00 + * BYSECOND: Specifies the start second of each reccurrence after {@code timeMaintenanceWindowStart} value. The default value is 00 + * Other Rules are not supported. + * + * @param maintenanceWindowRecurrences the value to set + * @return this builder + **/ + public Builder maintenanceWindowRecurrences(String maintenanceWindowRecurrences) { + this.maintenanceWindowRecurrences = maintenanceWindowRecurrences; + this.__explicitlySet__.add("maintenanceWindowRecurrences"); + return this; + } + /** + * Duration time of each recurrence of each Maintenance Window. + * It must be specified as a string in ISO 8601 extended format. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceWindowDuration") + private String maintenanceWindowDuration; + + /** + * Duration time of each recurrence of each Maintenance Window. + * It must be specified as a string in ISO 8601 extended format. + * + * @param maintenanceWindowDuration the value to set + * @return this builder + **/ + public Builder maintenanceWindowDuration(String maintenanceWindowDuration) { + this.maintenanceWindowDuration = maintenanceWindowDuration; + this.__explicitlySet__.add("maintenanceWindowDuration"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public RecurrentMaintenanceWindowSchedule build() { + RecurrentMaintenanceWindowSchedule model = + new RecurrentMaintenanceWindowSchedule( + this.timeMaintenanceWindowStart, + this.timeMaintenanceWindowEnd, + this.maintenanceWindowRecurrences, + this.maintenanceWindowDuration); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(RecurrentMaintenanceWindowSchedule model) { + if (model.wasPropertyExplicitlySet("timeMaintenanceWindowStart")) { + this.timeMaintenanceWindowStart(model.getTimeMaintenanceWindowStart()); + } + if (model.wasPropertyExplicitlySet("timeMaintenanceWindowEnd")) { + this.timeMaintenanceWindowEnd(model.getTimeMaintenanceWindowEnd()); + } + if (model.wasPropertyExplicitlySet("maintenanceWindowRecurrences")) { + this.maintenanceWindowRecurrences(model.getMaintenanceWindowRecurrences()); + } + if (model.wasPropertyExplicitlySet("maintenanceWindowDuration")) { + this.maintenanceWindowDuration(model.getMaintenanceWindowDuration()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public RecurrentMaintenanceWindowSchedule( + java.util.Date timeMaintenanceWindowStart, + java.util.Date timeMaintenanceWindowEnd, + String maintenanceWindowRecurrences, + String maintenanceWindowDuration) { + super(); + this.timeMaintenanceWindowStart = timeMaintenanceWindowStart; + this.timeMaintenanceWindowEnd = timeMaintenanceWindowEnd; + this.maintenanceWindowRecurrences = maintenanceWindowRecurrences; + this.maintenanceWindowDuration = maintenanceWindowDuration; + } + + /** + * Start time of Maintenance window. A RFC3339 formatted datetime string + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeMaintenanceWindowStart") + private final java.util.Date timeMaintenanceWindowStart; + + /** + * Start time of Maintenance window. A RFC3339 formatted datetime string + * + * @return the value + **/ + public java.util.Date getTimeMaintenanceWindowStart() { + return timeMaintenanceWindowStart; + } + + /** + * Start time of Maintenance window. A RFC3339 formatted datetime string + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeMaintenanceWindowEnd") + private final java.util.Date timeMaintenanceWindowEnd; + + /** + * Start time of Maintenance window. A RFC3339 formatted datetime string + * + * @return the value + **/ + public java.util.Date getTimeMaintenanceWindowEnd() { + return timeMaintenanceWindowEnd; + } + + /** + * A RFC5545 formatted recurrence string which represents the Maintenance Window Recurrence. + * Please refer this for details:https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10 + * FREQ: Frequency of the Maintenance Window. The supported values are: DAILY and WEEKLY. + * BYDAY: Comma separated days for Weekly Maintenance Window. + * BYHOUR: Specifies the start hour of each recurrence after {@code timeMaintenanceWindowStart} value. + * BYMINUTE: Specifies the start minute of each reccurrence after {@code timeMaintenanceWindowStart} value. The default value is 00 + * BYSECOND: Specifies the start second of each reccurrence after {@code timeMaintenanceWindowStart} value. The default value is 00 + * Other Rules are not supported. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceWindowRecurrences") + private final String maintenanceWindowRecurrences; + + /** + * A RFC5545 formatted recurrence string which represents the Maintenance Window Recurrence. + * Please refer this for details:https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10 + * FREQ: Frequency of the Maintenance Window. The supported values are: DAILY and WEEKLY. + * BYDAY: Comma separated days for Weekly Maintenance Window. + * BYHOUR: Specifies the start hour of each recurrence after {@code timeMaintenanceWindowStart} value. + * BYMINUTE: Specifies the start minute of each reccurrence after {@code timeMaintenanceWindowStart} value. The default value is 00 + * BYSECOND: Specifies the start second of each reccurrence after {@code timeMaintenanceWindowStart} value. The default value is 00 + * Other Rules are not supported. + * + * @return the value + **/ + public String getMaintenanceWindowRecurrences() { + return maintenanceWindowRecurrences; + } + + /** + * Duration time of each recurrence of each Maintenance Window. + * It must be specified as a string in ISO 8601 extended format. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("maintenanceWindowDuration") + private final String maintenanceWindowDuration; + + /** + * Duration time of each recurrence of each Maintenance Window. + * It must be specified as a string in ISO 8601 extended format. + * + * @return the value + **/ + public String getMaintenanceWindowDuration() { + return maintenanceWindowDuration; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("RecurrentMaintenanceWindowSchedule("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", timeMaintenanceWindowStart=") + .append(String.valueOf(this.timeMaintenanceWindowStart)); + sb.append(", timeMaintenanceWindowEnd=") + .append(String.valueOf(this.timeMaintenanceWindowEnd)); + sb.append(", maintenanceWindowRecurrences=") + .append(String.valueOf(this.maintenanceWindowRecurrences)); + sb.append(", maintenanceWindowDuration=") + .append(String.valueOf(this.maintenanceWindowDuration)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RecurrentMaintenanceWindowSchedule)) { + return false; + } + + RecurrentMaintenanceWindowSchedule other = (RecurrentMaintenanceWindowSchedule) o; + return java.util.Objects.equals( + this.timeMaintenanceWindowStart, other.timeMaintenanceWindowStart) + && java.util.Objects.equals( + this.timeMaintenanceWindowEnd, other.timeMaintenanceWindowEnd) + && java.util.Objects.equals( + this.maintenanceWindowRecurrences, other.maintenanceWindowRecurrences) + && java.util.Objects.equals( + this.maintenanceWindowDuration, other.maintenanceWindowDuration) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.timeMaintenanceWindowStart == null + ? 43 + : this.timeMaintenanceWindowStart.hashCode()); + result = + (result * PRIME) + + (this.timeMaintenanceWindowEnd == null + ? 43 + : this.timeMaintenanceWindowEnd.hashCode()); + result = + (result * PRIME) + + (this.maintenanceWindowRecurrences == null + ? 43 + : this.maintenanceWindowRecurrences.hashCode()); + result = + (result * PRIME) + + (this.maintenanceWindowDuration == null + ? 43 + : this.maintenanceWindowDuration.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateBaselineableMetricDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateBaselineableMetricDetails.java index 1172a9ab2f1..91ec5b60b00 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateBaselineableMetricDetails.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateBaselineableMetricDetails.java @@ -31,6 +31,7 @@ public final class UpdateBaselineableMetricDetails "column", "namespace", "resourceGroup", + "resourceType", "isOutOfBox", "freeformTags", "definedTags", @@ -45,6 +46,7 @@ public UpdateBaselineableMetricDetails( String column, String namespace, String resourceGroup, + String resourceType, Boolean isOutOfBox, java.util.Map freeformTags, java.util.Map> definedTags, @@ -58,6 +60,7 @@ public UpdateBaselineableMetricDetails( this.column = column; this.namespace = namespace; this.resourceGroup = resourceGroup; + this.resourceType = resourceType; this.isOutOfBox = isOutOfBox; this.freeformTags = freeformTags; this.definedTags = definedTags; @@ -194,6 +197,22 @@ public Builder resourceGroup(String resourceGroup) { this.__explicitlySet__.add("resourceGroup"); return this; } + /** + * Resource type of the metric + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private String resourceType; + + /** + * Resource type of the metric + * @param resourceType the value to set + * @return this builder + **/ + public Builder resourceType(String resourceType) { + this.resourceType = resourceType; + this.__explicitlySet__.add("resourceType"); + return this; + } /** * Is the metric created out of box, default false **/ @@ -286,6 +305,7 @@ public UpdateBaselineableMetricDetails build() { this.column, this.namespace, this.resourceGroup, + this.resourceType, this.isOutOfBox, this.freeformTags, this.definedTags, @@ -322,6 +342,9 @@ public Builder copy(UpdateBaselineableMetricDetails model) { if (model.wasPropertyExplicitlySet("resourceGroup")) { this.resourceGroup(model.getResourceGroup()); } + if (model.wasPropertyExplicitlySet("resourceType")) { + this.resourceType(model.getResourceType()); + } if (model.wasPropertyExplicitlySet("isOutOfBox")) { this.isOutOfBox(model.getIsOutOfBox()); } @@ -461,6 +484,20 @@ public String getResourceGroup() { return resourceGroup; } + /** + * Resource type of the metric + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private final String resourceType; + + /** + * Resource type of the metric + * @return the value + **/ + public String getResourceType() { + return resourceType; + } + /** * Is the metric created out of box, default false **/ @@ -551,6 +588,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", column=").append(String.valueOf(this.column)); sb.append(", namespace=").append(String.valueOf(this.namespace)); sb.append(", resourceGroup=").append(String.valueOf(this.resourceGroup)); + sb.append(", resourceType=").append(String.valueOf(this.resourceType)); sb.append(", isOutOfBox=").append(String.valueOf(this.isOutOfBox)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); @@ -577,6 +615,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.column, other.column) && java.util.Objects.equals(this.namespace, other.namespace) && java.util.Objects.equals(this.resourceGroup, other.resourceGroup) + && java.util.Objects.equals(this.resourceType, other.resourceType) && java.util.Objects.equals(this.isOutOfBox, other.isOutOfBox) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) @@ -602,6 +641,7 @@ public int hashCode() { result = (result * PRIME) + (this.resourceGroup == null ? 43 : this.resourceGroup.hashCode()); + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); result = (result * PRIME) + (this.isOutOfBox == null ? 43 : this.isOutOfBox.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateMaintenanceWindowDetails.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateMaintenanceWindowDetails.java new file mode 100644 index 00000000000..4efbc354035 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/model/UpdateMaintenanceWindowDetails.java @@ -0,0 +1,206 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.model; + +/** + * Infomation to create a new Maintenance Window. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateMaintenanceWindowDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateMaintenanceWindowDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"description", "resources", "schedule"}) + public UpdateMaintenanceWindowDetails( + String description, + java.util.List resources, + MaintenanceWindowSchedule schedule) { + super(); + this.description = description; + this.resources = resources; + this.schedule = schedule; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Maintenance Window description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * Maintenance Window description. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * List of resource Ids which are part of the Maintenance Window + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * List of resource Ids which are part of the Maintenance Window + * + * @param resources the value to set + * @return this builder + **/ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("schedule") + private MaintenanceWindowSchedule schedule; + + public Builder schedule(MaintenanceWindowSchedule schedule) { + this.schedule = schedule; + this.__explicitlySet__.add("schedule"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateMaintenanceWindowDetails build() { + UpdateMaintenanceWindowDetails model = + new UpdateMaintenanceWindowDetails( + this.description, this.resources, this.schedule); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateMaintenanceWindowDetails model) { + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("schedule")) { + this.schedule(model.getSchedule()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * Maintenance Window description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * Maintenance Window description. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * List of resource Ids which are part of the Maintenance Window + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * List of resource Ids which are part of the Maintenance Window + * + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + @com.fasterxml.jackson.annotation.JsonProperty("schedule") + private final MaintenanceWindowSchedule schedule; + + public MaintenanceWindowSchedule getSchedule() { + return schedule; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateMaintenanceWindowDetails("); + sb.append("super=").append(super.toString()); + sb.append("description=").append(String.valueOf(this.description)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", schedule=").append(String.valueOf(this.schedule)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateMaintenanceWindowDetails)) { + return false; + } + + UpdateMaintenanceWindowDetails other = (UpdateMaintenanceWindowDetails) o; + return java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.schedule, other.schedule) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = (result * PRIME) + (this.schedule == null ? 43 : this.schedule.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/CreateMaintenanceWindowRequest.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/CreateMaintenanceWindowRequest.java new file mode 100644 index 00000000000..1ec203a44e2 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/CreateMaintenanceWindowRequest.java @@ -0,0 +1,297 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.requests; + +import com.oracle.bmc.stackmonitoring.model.*; +/** + * Example: Click here to see how to use CreateMaintenanceWindowRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class CreateMaintenanceWindowRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.stackmonitoring.model.CreateMaintenanceWindowDetails> { + + /** + * Details to create the Maintenance Window + * + */ + private com.oracle.bmc.stackmonitoring.model.CreateMaintenanceWindowDetails + createMaintenanceWindowDetails; + + /** + * Details to create the Maintenance Window + * + */ + public com.oracle.bmc.stackmonitoring.model.CreateMaintenanceWindowDetails + getCreateMaintenanceWindowDetails() { + return createMaintenanceWindowDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.stackmonitoring.model.CreateMaintenanceWindowDetails getBody$() { + return createMaintenanceWindowDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateMaintenanceWindowRequest, + com.oracle.bmc.stackmonitoring.model.CreateMaintenanceWindowDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details to create the Maintenance Window + * + */ + private com.oracle.bmc.stackmonitoring.model.CreateMaintenanceWindowDetails + createMaintenanceWindowDetails = null; + + /** + * Details to create the Maintenance Window + * + * @param createMaintenanceWindowDetails the value to set + * @return this builder instance + */ + public Builder createMaintenanceWindowDetails( + com.oracle.bmc.stackmonitoring.model.CreateMaintenanceWindowDetails + createMaintenanceWindowDetails) { + this.createMaintenanceWindowDetails = createMaintenanceWindowDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateMaintenanceWindowRequest o) { + createMaintenanceWindowDetails(o.getCreateMaintenanceWindowDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateMaintenanceWindowRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateMaintenanceWindowRequest + */ + public CreateMaintenanceWindowRequest build() { + CreateMaintenanceWindowRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.stackmonitoring.model.CreateMaintenanceWindowDetails body) { + createMaintenanceWindowDetails(body); + return this; + } + + /** + * Build the instance of CreateMaintenanceWindowRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateMaintenanceWindowRequest + */ + public CreateMaintenanceWindowRequest buildWithoutInvocationCallback() { + CreateMaintenanceWindowRequest request = new CreateMaintenanceWindowRequest(); + request.createMaintenanceWindowDetails = createMaintenanceWindowDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateMaintenanceWindowRequest(createMaintenanceWindowDetails, opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createMaintenanceWindowDetails(createMaintenanceWindowDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createMaintenanceWindowDetails=") + .append(String.valueOf(this.createMaintenanceWindowDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateMaintenanceWindowRequest)) { + return false; + } + + CreateMaintenanceWindowRequest other = (CreateMaintenanceWindowRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createMaintenanceWindowDetails, other.createMaintenanceWindowDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createMaintenanceWindowDetails == null + ? 43 + : this.createMaintenanceWindowDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/DeleteMaintenanceWindowRequest.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/DeleteMaintenanceWindowRequest.java new file mode 100644 index 00000000000..0f50713aa65 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/DeleteMaintenanceWindowRequest.java @@ -0,0 +1,260 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.requests; + +import com.oracle.bmc.stackmonitoring.model.*; +/** + * Example: Click here to see how to use DeleteMaintenanceWindowRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class DeleteMaintenanceWindowRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + */ + private String maintenanceWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + */ + public String getMaintenanceWindowId() { + return maintenanceWindowId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteMaintenanceWindowRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + */ + private String maintenanceWindowId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + * @param maintenanceWindowId the value to set + * @return this builder instance + */ + public Builder maintenanceWindowId(String maintenanceWindowId) { + this.maintenanceWindowId = maintenanceWindowId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteMaintenanceWindowRequest o) { + maintenanceWindowId(o.getMaintenanceWindowId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteMaintenanceWindowRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteMaintenanceWindowRequest + */ + public DeleteMaintenanceWindowRequest build() { + DeleteMaintenanceWindowRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteMaintenanceWindowRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteMaintenanceWindowRequest + */ + public DeleteMaintenanceWindowRequest buildWithoutInvocationCallback() { + DeleteMaintenanceWindowRequest request = new DeleteMaintenanceWindowRequest(); + request.maintenanceWindowId = maintenanceWindowId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new DeleteMaintenanceWindowRequest(maintenanceWindowId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .maintenanceWindowId(maintenanceWindowId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",maintenanceWindowId=").append(String.valueOf(this.maintenanceWindowId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteMaintenanceWindowRequest)) { + return false; + } + + DeleteMaintenanceWindowRequest other = (DeleteMaintenanceWindowRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.maintenanceWindowId, other.maintenanceWindowId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.maintenanceWindowId == null + ? 43 + : this.maintenanceWindowId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/requests/GetStatusRequest.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/GetMaintenanceWindowRequest.java similarity index 58% rename from bmc-cims/src/main/java/com/oracle/bmc/cims/requests/GetStatusRequest.java rename to bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/GetMaintenanceWindowRequest.java index 5848d1791c5..dc030915b8e 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/requests/GetStatusRequest.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/GetMaintenanceWindowRequest.java @@ -2,98 +2,81 @@ * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ -package com.oracle.bmc.cims.requests; +package com.oracle.bmc.stackmonitoring.requests; -import com.oracle.bmc.cims.model.*; +import com.oracle.bmc.stackmonitoring.model.*; /** - * Example: Click here to see how to use GetStatusRequest. + * Example: Click here to see how to use GetMaintenanceWindowRequest. */ -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181231") -public class GetStatusRequest extends com.oracle.bmc.requests.BmcRequest { +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class GetMaintenanceWindowRequest + extends com.oracle.bmc.requests.BmcRequest { /** - * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. */ - private String opcRequestId; - - /** - * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - */ - public String getOpcRequestId() { - return opcRequestId; - } - /** - * User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. - */ - private String ocid; + private String maintenanceWindowId; /** - * User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. */ - public String getOcid() { - return ocid; + public String getMaintenanceWindowId() { + return maintenanceWindowId; } /** - * The region of the tenancy. + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * */ - private String homeregion; + private String opcRequestId; /** - * The region of the tenancy. + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * */ - public String getHomeregion() { - return homeregion; + public String getOpcRequestId() { + return opcRequestId; } public static class Builder implements com.oracle.bmc.requests.BmcRequest.Builder< - GetStatusRequest, java.lang.Void> { + GetMaintenanceWindowRequest, java.lang.Void> { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; /** - * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. */ - private String opcRequestId = null; + private String maintenanceWindowId = null; /** - * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - * @param opcRequestId the value to set + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + * @param maintenanceWindowId the value to set * @return this builder instance */ - public Builder opcRequestId(String opcRequestId) { - this.opcRequestId = opcRequestId; + public Builder maintenanceWindowId(String maintenanceWindowId) { + this.maintenanceWindowId = maintenanceWindowId; return this; } /** - * User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. - */ - private String ocid = null; - - /** - * User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. - * @param ocid the value to set - * @return this builder instance - */ - public Builder ocid(String ocid) { - this.ocid = ocid; - return this; - } - - /** - * The region of the tenancy. + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * */ - private String homeregion = null; + private String opcRequestId = null; /** - * The region of the tenancy. - * @param homeregion the value to set + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set * @return this builder instance */ - public Builder homeregion(String homeregion) { - this.homeregion = homeregion; + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; return this; } @@ -124,47 +107,45 @@ public Builder retryConfiguration( * Copy method to populate the builder with values from the given instance. * @return this builder instance */ - public Builder copy(GetStatusRequest o) { + public Builder copy(GetMaintenanceWindowRequest o) { + maintenanceWindowId(o.getMaintenanceWindowId()); opcRequestId(o.getOpcRequestId()); - ocid(o.getOcid()); - homeregion(o.getHomeregion()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; } /** - * Build the instance of GetStatusRequest as configured by this builder + * Build the instance of GetMaintenanceWindowRequest as configured by this builder * * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, * while the method {@link Builder#buildWithoutInvocationCallback} does not. * * This is the preferred method to build an instance. * - * @return instance of GetStatusRequest + * @return instance of GetMaintenanceWindowRequest */ - public GetStatusRequest build() { - GetStatusRequest request = buildWithoutInvocationCallback(); + public GetMaintenanceWindowRequest build() { + GetMaintenanceWindowRequest request = buildWithoutInvocationCallback(); request.setInvocationCallback(invocationCallback); request.setRetryConfiguration(retryConfiguration); return request; } /** - * Build the instance of GetStatusRequest as configured by this builder + * Build the instance of GetMaintenanceWindowRequest as configured by this builder * * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, * while the method {@link Builder#build} does * - * @return instance of GetStatusRequest + * @return instance of GetMaintenanceWindowRequest */ - public GetStatusRequest buildWithoutInvocationCallback() { - GetStatusRequest request = new GetStatusRequest(); + public GetMaintenanceWindowRequest buildWithoutInvocationCallback() { + GetMaintenanceWindowRequest request = new GetMaintenanceWindowRequest(); + request.maintenanceWindowId = maintenanceWindowId; request.opcRequestId = opcRequestId; - request.ocid = ocid; - request.homeregion = homeregion; return request; - // new GetStatusRequest(opcRequestId, ocid, homeregion); + // new GetMaintenanceWindowRequest(maintenanceWindowId, opcRequestId); } } @@ -173,7 +154,7 @@ public GetStatusRequest buildWithoutInvocationCallback() { * @return instance of {@link Builder} that allows you to modify request properties. */ public Builder toBuilder() { - return new Builder().opcRequestId(opcRequestId).ocid(ocid).homeregion(homeregion); + return new Builder().maintenanceWindowId(maintenanceWindowId).opcRequestId(opcRequestId); } /** @@ -189,9 +170,8 @@ public String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("("); sb.append("super=").append(super.toString()); + sb.append(",maintenanceWindowId=").append(String.valueOf(this.maintenanceWindowId)); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); - sb.append(",ocid=").append(String.valueOf(this.ocid)); - sb.append(",homeregion=").append(String.valueOf(this.homeregion)); sb.append(")"); return sb.toString(); } @@ -201,24 +181,26 @@ public boolean equals(Object o) { if (this == o) { return true; } - if (!(o instanceof GetStatusRequest)) { + if (!(o instanceof GetMaintenanceWindowRequest)) { return false; } - GetStatusRequest other = (GetStatusRequest) o; + GetMaintenanceWindowRequest other = (GetMaintenanceWindowRequest) o; return super.equals(o) - && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) - && java.util.Objects.equals(this.ocid, other.ocid) - && java.util.Objects.equals(this.homeregion, other.homeregion); + && java.util.Objects.equals(this.maintenanceWindowId, other.maintenanceWindowId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); } @Override public int hashCode() { final int PRIME = 59; int result = super.hashCode(); + result = + (result * PRIME) + + (this.maintenanceWindowId == null + ? 43 + : this.maintenanceWindowId.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); - result = (result * PRIME) + (this.ocid == null ? 43 : this.ocid.hashCode()); - result = (result * PRIME) + (this.homeregion == null ? 43 : this.homeregion.hashCode()); return result; } } diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/ListBaselineableMetricsRequest.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/ListBaselineableMetricsRequest.java index 4469f0f07f2..d6fa0a7fea7 100644 --- a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/ListBaselineableMetricsRequest.java +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/ListBaselineableMetricsRequest.java @@ -38,6 +38,30 @@ public String getOpcRequestId() { public String getResourceGroup() { return resourceGroup; } + /** + * Resource Type + */ + private String resourceType; + + /** + * Resource Type + */ + public String getResourceType() { + return resourceType; + } + /** + * Is the baseline enabled metric defined out of box by Oracle or by end-user + * + */ + private Boolean isOutOfBox; + + /** + * Is the baseline enabled metric defined out of box by Oracle or by end-user + * + */ + public Boolean getIsOutOfBox() { + return isOutOfBox; + } /** * Metric Name */ @@ -224,6 +248,38 @@ public Builder resourceGroup(String resourceGroup) { return this; } + /** + * Resource Type + */ + private String resourceType = null; + + /** + * Resource Type + * @param resourceType the value to set + * @return this builder instance + */ + public Builder resourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Is the baseline enabled metric defined out of box by Oracle or by end-user + * + */ + private Boolean isOutOfBox = null; + + /** + * Is the baseline enabled metric defined out of box by Oracle or by end-user + * + * @param isOutOfBox the value to set + * @return this builder instance + */ + public Builder isOutOfBox(Boolean isOutOfBox) { + this.isOutOfBox = isOutOfBox; + return this; + } + /** * Metric Name */ @@ -392,6 +448,8 @@ public Builder retryConfiguration( public Builder copy(ListBaselineableMetricsRequest o) { opcRequestId(o.getOpcRequestId()); resourceGroup(o.getResourceGroup()); + resourceType(o.getResourceType()); + isOutOfBox(o.getIsOutOfBox()); name(o.getName()); metricNamespace(o.getMetricNamespace()); limit(o.getLimit()); @@ -434,6 +492,8 @@ public ListBaselineableMetricsRequest buildWithoutInvocationCallback() { ListBaselineableMetricsRequest request = new ListBaselineableMetricsRequest(); request.opcRequestId = opcRequestId; request.resourceGroup = resourceGroup; + request.resourceType = resourceType; + request.isOutOfBox = isOutOfBox; request.name = name; request.metricNamespace = metricNamespace; request.limit = limit; @@ -443,7 +503,7 @@ public ListBaselineableMetricsRequest buildWithoutInvocationCallback() { request.sortOrder = sortOrder; request.sortBy = sortBy; return request; - // new ListBaselineableMetricsRequest(opcRequestId, resourceGroup, name, metricNamespace, limit, page, compartmentId, baselineableMetricId, sortOrder, sortBy); + // new ListBaselineableMetricsRequest(opcRequestId, resourceGroup, resourceType, isOutOfBox, name, metricNamespace, limit, page, compartmentId, baselineableMetricId, sortOrder, sortBy); } } @@ -455,6 +515,8 @@ public Builder toBuilder() { return new Builder() .opcRequestId(opcRequestId) .resourceGroup(resourceGroup) + .resourceType(resourceType) + .isOutOfBox(isOutOfBox) .name(name) .metricNamespace(metricNamespace) .limit(limit) @@ -480,6 +542,8 @@ public String toString() { sb.append("super=").append(super.toString()); sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); sb.append(",resourceGroup=").append(String.valueOf(this.resourceGroup)); + sb.append(",resourceType=").append(String.valueOf(this.resourceType)); + sb.append(",isOutOfBox=").append(String.valueOf(this.isOutOfBox)); sb.append(",name=").append(String.valueOf(this.name)); sb.append(",metricNamespace=").append(String.valueOf(this.metricNamespace)); sb.append(",limit=").append(String.valueOf(this.limit)); @@ -505,6 +569,8 @@ public boolean equals(Object o) { return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) && java.util.Objects.equals(this.resourceGroup, other.resourceGroup) + && java.util.Objects.equals(this.resourceType, other.resourceType) + && java.util.Objects.equals(this.isOutOfBox, other.isOutOfBox) && java.util.Objects.equals(this.name, other.name) && java.util.Objects.equals(this.metricNamespace, other.metricNamespace) && java.util.Objects.equals(this.limit, other.limit) @@ -523,6 +589,8 @@ public int hashCode() { result = (result * PRIME) + (this.resourceGroup == null ? 43 : this.resourceGroup.hashCode()); + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); + result = (result * PRIME) + (this.isOutOfBox == null ? 43 : this.isOutOfBox.hashCode()); result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); result = (result * PRIME) diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/ListMaintenanceWindowsRequest.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/ListMaintenanceWindowsRequest.java new file mode 100644 index 00000000000..3aee9b7b130 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/ListMaintenanceWindowsRequest.java @@ -0,0 +1,473 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.requests; + +import com.oracle.bmc.stackmonitoring.model.*; +/** + * Example: Click here to see how to use ListMaintenanceWindowsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class ListMaintenanceWindowsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which data is listed. + */ + private String compartmentId; + + /** + * The ID of the compartment in which data is listed. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return maintenance windows that match exact resource name. + */ + private String name; + + /** + * A filter to return maintenance windows that match exact resource name. + */ + public String getName() { + return name; + } + /** + * A filter to return maintenance windows with matching lifecycleDetails. + */ + private com.oracle.bmc.stackmonitoring.model.MaintenanceWindowLifecycleDetails lifecycleDetails; + + /** + * A filter to return maintenance windows with matching lifecycleDetails. + */ + public com.oracle.bmc.stackmonitoring.model.MaintenanceWindowLifecycleDetails + getLifecycleDetails() { + return lifecycleDetails; + } + /** + * A filter to return only maintenance windows with matching lifecycleState. + */ + private com.oracle.bmc.stackmonitoring.model.MaintenanceWindowLifecycleState status; + + /** + * A filter to return only maintenance windows with matching lifecycleState. + */ + public com.oracle.bmc.stackmonitoring.model.MaintenanceWindowLifecycleState getStatus() { + return status; + } + /** + * The field to sort by. Only one sort order may be provided. + * Default order for timeCreated is descending. Default order for mainteance window name is ascending. + * + */ + private com.oracle.bmc.stackmonitoring.model.MaintenanceWindowSortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. + * Default order for timeCreated is descending. Default order for mainteance window name is ascending. + * + */ + public com.oracle.bmc.stackmonitoring.model.MaintenanceWindowSortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * + */ + private com.oracle.bmc.stackmonitoring.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * + */ + public com.oracle.bmc.stackmonitoring.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public Integer getLimit() { + return limit; + } + /** + * For list pagination. The value of the {@code opc-next-page} response header from the + * previous "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * For list pagination. The value of the {@code opc-next-page} response header from the + * previous "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListMaintenanceWindowsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The ID of the compartment in which data is listed. + */ + private String compartmentId = null; + + /** + * The ID of the compartment in which data is listed. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return maintenance windows that match exact resource name. + */ + private String name = null; + + /** + * A filter to return maintenance windows that match exact resource name. + * @param name the value to set + * @return this builder instance + */ + public Builder name(String name) { + this.name = name; + return this; + } + + /** + * A filter to return maintenance windows with matching lifecycleDetails. + */ + private com.oracle.bmc.stackmonitoring.model.MaintenanceWindowLifecycleDetails + lifecycleDetails = null; + + /** + * A filter to return maintenance windows with matching lifecycleDetails. + * @param lifecycleDetails the value to set + * @return this builder instance + */ + public Builder lifecycleDetails( + com.oracle.bmc.stackmonitoring.model.MaintenanceWindowLifecycleDetails + lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + return this; + } + + /** + * A filter to return only maintenance windows with matching lifecycleState. + */ + private com.oracle.bmc.stackmonitoring.model.MaintenanceWindowLifecycleState status = null; + + /** + * A filter to return only maintenance windows with matching lifecycleState. + * @param status the value to set + * @return this builder instance + */ + public Builder status( + com.oracle.bmc.stackmonitoring.model.MaintenanceWindowLifecycleState status) { + this.status = status; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. + * Default order for timeCreated is descending. Default order for mainteance window name is ascending. + * + */ + private com.oracle.bmc.stackmonitoring.model.MaintenanceWindowSortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. + * Default order for timeCreated is descending. Default order for mainteance window name is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(com.oracle.bmc.stackmonitoring.model.MaintenanceWindowSortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * + */ + private com.oracle.bmc.stackmonitoring.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.stackmonitoring.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * For list pagination. The value of the {@code opc-next-page} response header from the + * previous "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page = null; + + /** + * For list pagination. The value of the {@code opc-next-page} response header from the + * previous "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListMaintenanceWindowsRequest o) { + compartmentId(o.getCompartmentId()); + name(o.getName()); + lifecycleDetails(o.getLifecycleDetails()); + status(o.getStatus()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListMaintenanceWindowsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListMaintenanceWindowsRequest + */ + public ListMaintenanceWindowsRequest build() { + ListMaintenanceWindowsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListMaintenanceWindowsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListMaintenanceWindowsRequest + */ + public ListMaintenanceWindowsRequest buildWithoutInvocationCallback() { + ListMaintenanceWindowsRequest request = new ListMaintenanceWindowsRequest(); + request.compartmentId = compartmentId; + request.name = name; + request.lifecycleDetails = lifecycleDetails; + request.status = status; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + request.limit = limit; + request.page = page; + request.opcRequestId = opcRequestId; + return request; + // new ListMaintenanceWindowsRequest(compartmentId, name, lifecycleDetails, status, sortBy, sortOrder, limit, page, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .name(name) + .lifecycleDetails(lifecycleDetails) + .status(status) + .sortBy(sortBy) + .sortOrder(sortOrder) + .limit(limit) + .page(page) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",name=").append(String.valueOf(this.name)); + sb.append(",lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(",status=").append(String.valueOf(this.status)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListMaintenanceWindowsRequest)) { + return false; + } + + ListMaintenanceWindowsRequest other = (ListMaintenanceWindowsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/RetryFailedMaintenanceWindowOperationRequest.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/RetryFailedMaintenanceWindowOperationRequest.java new file mode 100644 index 00000000000..fe6bf6e89cf --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/RetryFailedMaintenanceWindowOperationRequest.java @@ -0,0 +1,262 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.requests; + +import com.oracle.bmc.stackmonitoring.model.*; +/** + * Example: Click here to see how to use RetryFailedMaintenanceWindowOperationRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class RetryFailedMaintenanceWindowOperationRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + */ + private String maintenanceWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + */ + public String getMaintenanceWindowId() { + return maintenanceWindowId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + RetryFailedMaintenanceWindowOperationRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + */ + private String maintenanceWindowId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + * @param maintenanceWindowId the value to set + * @return this builder instance + */ + public Builder maintenanceWindowId(String maintenanceWindowId) { + this.maintenanceWindowId = maintenanceWindowId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RetryFailedMaintenanceWindowOperationRequest o) { + maintenanceWindowId(o.getMaintenanceWindowId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of RetryFailedMaintenanceWindowOperationRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of RetryFailedMaintenanceWindowOperationRequest + */ + public RetryFailedMaintenanceWindowOperationRequest build() { + RetryFailedMaintenanceWindowOperationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of RetryFailedMaintenanceWindowOperationRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of RetryFailedMaintenanceWindowOperationRequest + */ + public RetryFailedMaintenanceWindowOperationRequest buildWithoutInvocationCallback() { + RetryFailedMaintenanceWindowOperationRequest request = + new RetryFailedMaintenanceWindowOperationRequest(); + request.maintenanceWindowId = maintenanceWindowId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new RetryFailedMaintenanceWindowOperationRequest(maintenanceWindowId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .maintenanceWindowId(maintenanceWindowId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",maintenanceWindowId=").append(String.valueOf(this.maintenanceWindowId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RetryFailedMaintenanceWindowOperationRequest)) { + return false; + } + + RetryFailedMaintenanceWindowOperationRequest other = + (RetryFailedMaintenanceWindowOperationRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.maintenanceWindowId, other.maintenanceWindowId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.maintenanceWindowId == null + ? 43 + : this.maintenanceWindowId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/StopMaintenanceWindowRequest.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/StopMaintenanceWindowRequest.java new file mode 100644 index 00000000000..53153393370 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/StopMaintenanceWindowRequest.java @@ -0,0 +1,260 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.requests; + +import com.oracle.bmc.stackmonitoring.model.*; +/** + * Example: Click here to see how to use StopMaintenanceWindowRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class StopMaintenanceWindowRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + */ + private String maintenanceWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + */ + public String getMaintenanceWindowId() { + return maintenanceWindowId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + StopMaintenanceWindowRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + */ + private String maintenanceWindowId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + * @param maintenanceWindowId the value to set + * @return this builder instance + */ + public Builder maintenanceWindowId(String maintenanceWindowId) { + this.maintenanceWindowId = maintenanceWindowId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(StopMaintenanceWindowRequest o) { + maintenanceWindowId(o.getMaintenanceWindowId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of StopMaintenanceWindowRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of StopMaintenanceWindowRequest + */ + public StopMaintenanceWindowRequest build() { + StopMaintenanceWindowRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of StopMaintenanceWindowRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of StopMaintenanceWindowRequest + */ + public StopMaintenanceWindowRequest buildWithoutInvocationCallback() { + StopMaintenanceWindowRequest request = new StopMaintenanceWindowRequest(); + request.maintenanceWindowId = maintenanceWindowId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new StopMaintenanceWindowRequest(maintenanceWindowId, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .maintenanceWindowId(maintenanceWindowId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",maintenanceWindowId=").append(String.valueOf(this.maintenanceWindowId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof StopMaintenanceWindowRequest)) { + return false; + } + + StopMaintenanceWindowRequest other = (StopMaintenanceWindowRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.maintenanceWindowId, other.maintenanceWindowId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.maintenanceWindowId == null + ? 43 + : this.maintenanceWindowId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/UpdateMaintenanceWindowRequest.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/UpdateMaintenanceWindowRequest.java new file mode 100644 index 00000000000..3f20412c559 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/requests/UpdateMaintenanceWindowRequest.java @@ -0,0 +1,327 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.requests; + +import com.oracle.bmc.stackmonitoring.model.*; +/** + * Example: Click here to see how to use UpdateMaintenanceWindowRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class UpdateMaintenanceWindowRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.stackmonitoring.model.UpdateMaintenanceWindowDetails> { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + */ + private String maintenanceWindowId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + */ + public String getMaintenanceWindowId() { + return maintenanceWindowId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.stackmonitoring.model.UpdateMaintenanceWindowDetails + updateMaintenanceWindowDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.stackmonitoring.model.UpdateMaintenanceWindowDetails + getUpdateMaintenanceWindowDetails() { + return updateMaintenanceWindowDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.stackmonitoring.model.UpdateMaintenanceWindowDetails getBody$() { + return updateMaintenanceWindowDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateMaintenanceWindowRequest, + com.oracle.bmc.stackmonitoring.model.UpdateMaintenanceWindowDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + */ + private String maintenanceWindowId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of maintenance window. + * @param maintenanceWindowId the value to set + * @return this builder instance + */ + public Builder maintenanceWindowId(String maintenanceWindowId) { + this.maintenanceWindowId = maintenanceWindowId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.stackmonitoring.model.UpdateMaintenanceWindowDetails + updateMaintenanceWindowDetails = null; + + /** + * The information to be updated. + * @param updateMaintenanceWindowDetails the value to set + * @return this builder instance + */ + public Builder updateMaintenanceWindowDetails( + com.oracle.bmc.stackmonitoring.model.UpdateMaintenanceWindowDetails + updateMaintenanceWindowDetails) { + this.updateMaintenanceWindowDetails = updateMaintenanceWindowDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateMaintenanceWindowRequest o) { + maintenanceWindowId(o.getMaintenanceWindowId()); + updateMaintenanceWindowDetails(o.getUpdateMaintenanceWindowDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateMaintenanceWindowRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateMaintenanceWindowRequest + */ + public UpdateMaintenanceWindowRequest build() { + UpdateMaintenanceWindowRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.stackmonitoring.model.UpdateMaintenanceWindowDetails body) { + updateMaintenanceWindowDetails(body); + return this; + } + + /** + * Build the instance of UpdateMaintenanceWindowRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateMaintenanceWindowRequest + */ + public UpdateMaintenanceWindowRequest buildWithoutInvocationCallback() { + UpdateMaintenanceWindowRequest request = new UpdateMaintenanceWindowRequest(); + request.maintenanceWindowId = maintenanceWindowId; + request.updateMaintenanceWindowDetails = updateMaintenanceWindowDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new UpdateMaintenanceWindowRequest(maintenanceWindowId, updateMaintenanceWindowDetails, ifMatch, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .maintenanceWindowId(maintenanceWindowId) + .updateMaintenanceWindowDetails(updateMaintenanceWindowDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",maintenanceWindowId=").append(String.valueOf(this.maintenanceWindowId)); + sb.append(",updateMaintenanceWindowDetails=") + .append(String.valueOf(this.updateMaintenanceWindowDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateMaintenanceWindowRequest)) { + return false; + } + + UpdateMaintenanceWindowRequest other = (UpdateMaintenanceWindowRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.maintenanceWindowId, other.maintenanceWindowId) + && java.util.Objects.equals( + this.updateMaintenanceWindowDetails, other.updateMaintenanceWindowDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.maintenanceWindowId == null + ? 43 + : this.maintenanceWindowId.hashCode()); + result = + (result * PRIME) + + (this.updateMaintenanceWindowDetails == null + ? 43 + : this.updateMaintenanceWindowDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/CreateMaintenanceWindowResponse.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/CreateMaintenanceWindowResponse.java new file mode 100644 index 00000000000..92387a26b52 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/CreateMaintenanceWindowResponse.java @@ -0,0 +1,259 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.responses; + +import com.oracle.bmc.stackmonitoring.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class CreateMaintenanceWindowResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * The returned MaintenanceWindow instance. + */ + private com.oracle.bmc.stackmonitoring.model.MaintenanceWindow maintenanceWindow; + + /** + * The returned MaintenanceWindow instance. + * @return the value + */ + public com.oracle.bmc.stackmonitoring.model.MaintenanceWindow getMaintenanceWindow() { + return maintenanceWindow; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId", + "etag", + "maintenanceWindow" + }) + private CreateMaintenanceWindowResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId, + String etag, + com.oracle.bmc.stackmonitoring.model.MaintenanceWindow maintenanceWindow) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + this.etag = etag; + this.maintenanceWindow = maintenanceWindow; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The returned MaintenanceWindow instance. + */ + private com.oracle.bmc.stackmonitoring.model.MaintenanceWindow maintenanceWindow; + + /** + * The returned MaintenanceWindow instance. + * @param maintenanceWindow the value to set + * @return this builder + */ + public Builder maintenanceWindow( + com.oracle.bmc.stackmonitoring.model.MaintenanceWindow maintenanceWindow) { + this.maintenanceWindow = maintenanceWindow; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateMaintenanceWindowResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + maintenanceWindow(o.getMaintenanceWindow()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateMaintenanceWindowResponse build() { + return new CreateMaintenanceWindowResponse( + __httpStatusCode__, + headers, + opcWorkRequestId, + opcRequestId, + etag, + maintenanceWindow); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",maintenanceWindow=").append(String.valueOf(maintenanceWindow)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateMaintenanceWindowResponse)) { + return false; + } + + CreateMaintenanceWindowResponse other = (CreateMaintenanceWindowResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.maintenanceWindow, other.maintenanceWindow); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.maintenanceWindow == null ? 43 : this.maintenanceWindow.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/DeleteMaintenanceWindowResponse.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/DeleteMaintenanceWindowResponse.java new file mode 100644 index 00000000000..e2af68f2cce --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/DeleteMaintenanceWindowResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.responses; + +import com.oracle.bmc.stackmonitoring.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class DeleteMaintenanceWindowResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DeleteMaintenanceWindowResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteMaintenanceWindowResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteMaintenanceWindowResponse build() { + return new DeleteMaintenanceWindowResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteMaintenanceWindowResponse)) { + return false; + } + + DeleteMaintenanceWindowResponse other = (DeleteMaintenanceWindowResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/GetMaintenanceWindowResponse.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/GetMaintenanceWindowResponse.java new file mode 100644 index 00000000000..f97d76e3891 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/GetMaintenanceWindowResponse.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.responses; + +import com.oracle.bmc.stackmonitoring.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class GetMaintenanceWindowResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned MaintenanceWindow instance. + */ + private com.oracle.bmc.stackmonitoring.model.MaintenanceWindow maintenanceWindow; + + /** + * The returned MaintenanceWindow instance. + * @return the value + */ + public com.oracle.bmc.stackmonitoring.model.MaintenanceWindow getMaintenanceWindow() { + return maintenanceWindow; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "maintenanceWindow" + }) + private GetMaintenanceWindowResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.stackmonitoring.model.MaintenanceWindow maintenanceWindow) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.maintenanceWindow = maintenanceWindow; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned MaintenanceWindow instance. + */ + private com.oracle.bmc.stackmonitoring.model.MaintenanceWindow maintenanceWindow; + + /** + * The returned MaintenanceWindow instance. + * @param maintenanceWindow the value to set + * @return this builder + */ + public Builder maintenanceWindow( + com.oracle.bmc.stackmonitoring.model.MaintenanceWindow maintenanceWindow) { + this.maintenanceWindow = maintenanceWindow; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetMaintenanceWindowResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + maintenanceWindow(o.getMaintenanceWindow()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetMaintenanceWindowResponse build() { + return new GetMaintenanceWindowResponse( + __httpStatusCode__, headers, etag, opcRequestId, maintenanceWindow); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",maintenanceWindow=").append(String.valueOf(maintenanceWindow)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetMaintenanceWindowResponse)) { + return false; + } + + GetMaintenanceWindowResponse other = (GetMaintenanceWindowResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.maintenanceWindow, other.maintenanceWindow); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.maintenanceWindow == null ? 43 : this.maintenanceWindow.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/ListMaintenanceWindowsResponse.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/ListMaintenanceWindowsResponse.java new file mode 100644 index 00000000000..39186411226 --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/ListMaintenanceWindowsResponse.java @@ -0,0 +1,276 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.responses; + +import com.oracle.bmc.stackmonitoring.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class ListMaintenanceWindowsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * For pagination of a list of items. The total number of items in the result. + * + */ + private Integer opcTotalItems; + + /** + * For pagination of a list of items. The total number of items in the result. + * + * @return the value + */ + public Integer getOpcTotalItems() { + return opcTotalItems; + } + + /** + * The returned MaintenanceWindowCollection instance. + */ + private com.oracle.bmc.stackmonitoring.model.MaintenanceWindowCollection + maintenanceWindowCollection; + + /** + * The returned MaintenanceWindowCollection instance. + * @return the value + */ + public com.oracle.bmc.stackmonitoring.model.MaintenanceWindowCollection + getMaintenanceWindowCollection() { + return maintenanceWindowCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "opcTotalItems", + "maintenanceWindowCollection" + }) + private ListMaintenanceWindowsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + Integer opcTotalItems, + com.oracle.bmc.stackmonitoring.model.MaintenanceWindowCollection + maintenanceWindowCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.opcTotalItems = opcTotalItems; + this.maintenanceWindowCollection = maintenanceWindowCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the {@code page} parameter for the + * subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * For pagination of a list of items. The total number of items in the result. + * + */ + private Integer opcTotalItems; + + /** + * For pagination of a list of items. The total number of items in the result. + * + * @param opcTotalItems the value to set + * @return this builder + */ + public Builder opcTotalItems(Integer opcTotalItems) { + this.opcTotalItems = opcTotalItems; + return this; + } + + /** + * The returned MaintenanceWindowCollection instance. + */ + private com.oracle.bmc.stackmonitoring.model.MaintenanceWindowCollection + maintenanceWindowCollection; + + /** + * The returned MaintenanceWindowCollection instance. + * @param maintenanceWindowCollection the value to set + * @return this builder + */ + public Builder maintenanceWindowCollection( + com.oracle.bmc.stackmonitoring.model.MaintenanceWindowCollection + maintenanceWindowCollection) { + this.maintenanceWindowCollection = maintenanceWindowCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListMaintenanceWindowsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + opcTotalItems(o.getOpcTotalItems()); + maintenanceWindowCollection(o.getMaintenanceWindowCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListMaintenanceWindowsResponse build() { + return new ListMaintenanceWindowsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + opcTotalItems, + maintenanceWindowCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcTotalItems=").append(String.valueOf(opcTotalItems)); + sb.append(",maintenanceWindowCollection=") + .append(String.valueOf(maintenanceWindowCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListMaintenanceWindowsResponse)) { + return false; + } + + ListMaintenanceWindowsResponse other = (ListMaintenanceWindowsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcTotalItems, other.opcTotalItems) + && java.util.Objects.equals( + this.maintenanceWindowCollection, other.maintenanceWindowCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.opcTotalItems == null ? 43 : this.opcTotalItems.hashCode()); + result = + (result * PRIME) + + (this.maintenanceWindowCollection == null + ? 43 + : this.maintenanceWindowCollection.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/RetryFailedMaintenanceWindowOperationResponse.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/RetryFailedMaintenanceWindowOperationResponse.java new file mode 100644 index 00000000000..a742928d07a --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/RetryFailedMaintenanceWindowOperationResponse.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.responses; + +import com.oracle.bmc.stackmonitoring.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class RetryFailedMaintenanceWindowOperationResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private RetryFailedMaintenanceWindowOperationResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(RetryFailedMaintenanceWindowOperationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public RetryFailedMaintenanceWindowOperationResponse build() { + return new RetryFailedMaintenanceWindowOperationResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof RetryFailedMaintenanceWindowOperationResponse)) { + return false; + } + + RetryFailedMaintenanceWindowOperationResponse other = + (RetryFailedMaintenanceWindowOperationResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/StopMaintenanceWindowResponse.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/StopMaintenanceWindowResponse.java new file mode 100644 index 00000000000..cc0cac1ca0a --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/StopMaintenanceWindowResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.responses; + +import com.oracle.bmc.stackmonitoring.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class StopMaintenanceWindowResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private StopMaintenanceWindowResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(StopMaintenanceWindowResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public StopMaintenanceWindowResponse build() { + return new StopMaintenanceWindowResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof StopMaintenanceWindowResponse)) { + return false; + } + + StopMaintenanceWindowResponse other = (StopMaintenanceWindowResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/UpdateMaintenanceWindowResponse.java b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/UpdateMaintenanceWindowResponse.java new file mode 100644 index 00000000000..3c08bf7381f --- /dev/null +++ b/bmc-stackmonitoring/src/main/java/com/oracle/bmc/stackmonitoring/responses/UpdateMaintenanceWindowResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.stackmonitoring.responses; + +import com.oracle.bmc.stackmonitoring.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210330") +public class UpdateMaintenanceWindowResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private UpdateMaintenanceWindowResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateMaintenanceWindowResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateMaintenanceWindowResponse build() { + return new UpdateMaintenanceWindowResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateMaintenanceWindowResponse)) { + return false; + } + + UpdateMaintenanceWindowResponse other = (UpdateMaintenanceWindowResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-streaming/pom.xml b/bmc-streaming/pom.xml index 72300c34246..2a8f6478778 100644 --- a/bmc-streaming/pom.xml +++ b/bmc-streaming/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-streaming @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-tenantmanagercontrolplane/pom.xml b/bmc-tenantmanagercontrolplane/pom.xml index 2e3c0f44e65..0cc28de3c4e 100644 --- a/bmc-tenantmanagercontrolplane/pom.xml +++ b/bmc-tenantmanagercontrolplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-tenantmanagercontrolplane @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-threatintelligence/pom.xml b/bmc-threatintelligence/pom.xml index 8bad4209056..3f529f0d23e 100644 --- a/bmc-threatintelligence/pom.xml +++ b/bmc-threatintelligence/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-threatintelligence @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-usage/pom.xml b/bmc-usage/pom.xml index dd932802daf..41e66c36301 100644 --- a/bmc-usage/pom.xml +++ b/bmc-usage/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-usage @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-usageapi/pom.xml b/bmc-usageapi/pom.xml index 02af3dfbc6b..003c693abd9 100644 --- a/bmc-usageapi/pom.xml +++ b/bmc-usageapi/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-usageapi @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-usageapi/src/main/java/com/oracle/bmc/usageapi/model/UsageSummary.java b/bmc-usageapi/src/main/java/com/oracle/bmc/usageapi/model/UsageSummary.java index 7222976890f..0ab46c83716 100644 --- a/bmc-usageapi/src/main/java/com/oracle/bmc/usageapi/model/UsageSummary.java +++ b/bmc-usageapi/src/main/java/com/oracle/bmc/usageapi/model/UsageSummary.java @@ -42,6 +42,8 @@ public final class UsageSummary extends com.oracle.bmc.http.internal.ExplicitlyS "timeUsageEnded", "computedAmount", "computedQuantity", + "attributedCost", + "attributedUsage", "overagesFlag", "unitPrice", "currency", @@ -73,6 +75,8 @@ public UsageSummary( java.util.Date timeUsageEnded, java.math.BigDecimal computedAmount, java.math.BigDecimal computedQuantity, + String attributedCost, + String attributedUsage, String overagesFlag, java.math.BigDecimal unitPrice, String currency, @@ -103,6 +107,8 @@ public UsageSummary( this.timeUsageEnded = timeUsageEnded; this.computedAmount = computedAmount; this.computedQuantity = computedQuantity; + this.attributedCost = attributedCost; + this.attributedUsage = attributedUsage; this.overagesFlag = overagesFlag; this.unitPrice = unitPrice; this.currency = currency; @@ -466,6 +472,38 @@ public Builder computedQuantity(java.math.BigDecimal computedQuantity) { this.__explicitlySet__.add("computedQuantity"); return this; } + /** + * The attributed cost with a max value of 9999999999.999999999999 and a minimum value of 0. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attributedCost") + private String attributedCost; + + /** + * The attributed cost with a max value of 9999999999.999999999999 and a minimum value of 0. + * @param attributedCost the value to set + * @return this builder + **/ + public Builder attributedCost(String attributedCost) { + this.attributedCost = attributedCost; + this.__explicitlySet__.add("attributedCost"); + return this; + } + /** + * The attributed usage with a max value of 9999999999.999999999999 and a minimum value of 0. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attributedUsage") + private String attributedUsage; + + /** + * The attributed usage with a max value of 9999999999.999999999999 and a minimum value of 0. + * @param attributedUsage the value to set + * @return this builder + **/ + public Builder attributedUsage(String attributedUsage) { + this.attributedUsage = attributedUsage; + this.__explicitlySet__.add("attributedUsage"); + return this; + } /** * The SPM OverageFlag. **/ @@ -607,6 +645,8 @@ public UsageSummary build() { this.timeUsageEnded, this.computedAmount, this.computedQuantity, + this.attributedCost, + this.attributedUsage, this.overagesFlag, this.unitPrice, this.currency, @@ -688,6 +728,12 @@ public Builder copy(UsageSummary model) { if (model.wasPropertyExplicitlySet("computedQuantity")) { this.computedQuantity(model.getComputedQuantity()); } + if (model.wasPropertyExplicitlySet("attributedCost")) { + this.attributedCost(model.getAttributedCost()); + } + if (model.wasPropertyExplicitlySet("attributedUsage")) { + this.attributedUsage(model.getAttributedUsage()); + } if (model.wasPropertyExplicitlySet("overagesFlag")) { this.overagesFlag(model.getOveragesFlag()); } @@ -1032,6 +1078,34 @@ public java.math.BigDecimal getComputedQuantity() { return computedQuantity; } + /** + * The attributed cost with a max value of 9999999999.999999999999 and a minimum value of 0. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attributedCost") + private final String attributedCost; + + /** + * The attributed cost with a max value of 9999999999.999999999999 and a minimum value of 0. + * @return the value + **/ + public String getAttributedCost() { + return attributedCost; + } + + /** + * The attributed usage with a max value of 9999999999.999999999999 and a minimum value of 0. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("attributedUsage") + private final String attributedUsage; + + /** + * The attributed usage with a max value of 9999999999.999999999999 and a minimum value of 0. + * @return the value + **/ + public String getAttributedUsage() { + return attributedUsage; + } + /** * The SPM OverageFlag. **/ @@ -1166,6 +1240,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeUsageEnded=").append(String.valueOf(this.timeUsageEnded)); sb.append(", computedAmount=").append(String.valueOf(this.computedAmount)); sb.append(", computedQuantity=").append(String.valueOf(this.computedQuantity)); + sb.append(", attributedCost=").append(String.valueOf(this.attributedCost)); + sb.append(", attributedUsage=").append(String.valueOf(this.attributedUsage)); sb.append(", overagesFlag=").append(String.valueOf(this.overagesFlag)); sb.append(", unitPrice=").append(String.valueOf(this.unitPrice)); sb.append(", currency=").append(String.valueOf(this.currency)); @@ -1209,6 +1285,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeUsageEnded, other.timeUsageEnded) && java.util.Objects.equals(this.computedAmount, other.computedAmount) && java.util.Objects.equals(this.computedQuantity, other.computedQuantity) + && java.util.Objects.equals(this.attributedCost, other.attributedCost) + && java.util.Objects.equals(this.attributedUsage, other.attributedUsage) && java.util.Objects.equals(this.overagesFlag, other.overagesFlag) && java.util.Objects.equals(this.unitPrice, other.unitPrice) && java.util.Objects.equals(this.currency, other.currency) @@ -1261,6 +1339,12 @@ public int hashCode() { result = (result * PRIME) + (this.computedQuantity == null ? 43 : this.computedQuantity.hashCode()); + result = + (result * PRIME) + + (this.attributedCost == null ? 43 : this.attributedCost.hashCode()); + result = + (result * PRIME) + + (this.attributedUsage == null ? 43 : this.attributedUsage.hashCode()); result = (result * PRIME) + (this.overagesFlag == null ? 43 : this.overagesFlag.hashCode()); result = (result * PRIME) + (this.unitPrice == null ? 43 : this.unitPrice.hashCode()); result = (result * PRIME) + (this.currency == null ? 43 : this.currency.hashCode()); diff --git a/bmc-vault/pom.xml b/bmc-vault/pom.xml index 4681cc69c05..a17c93e5066 100644 --- a/bmc-vault/pom.xml +++ b/bmc-vault/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-vault @@ -16,12 +16,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 com.oracle.oci.sdk oci-java-sdk-workrequests - 2.73.0 + 2.79.0 diff --git a/bmc-vbsinst/pom.xml b/bmc-vbsinst/pom.xml index 45dfb11e8af..6b47c3e8dd3 100644 --- a/bmc-vbsinst/pom.xml +++ b/bmc-vbsinst/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-vbsinst @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-visualbuilder/pom.xml b/bmc-visualbuilder/pom.xml index ea8b9fa2528..0329c2c935c 100644 --- a/bmc-visualbuilder/pom.xml +++ b/bmc-visualbuilder/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-visualbuilder @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/VbInstance.java b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/VbInstance.java index cb98a20fffc..4dd29b0fc74 100644 --- a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/VbInstance.java +++ b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/VbInstance.java @@ -174,6 +174,22 @@ ChangeVbInstanceCompartmentResponse changeVbInstanceCompartment( */ ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request); + /** + * Reconfigures the Private Endpoint associated with the private visual builder instance. Use this action in case the Private Endpoint is not working and needs to be reset. + * The VB instance has to be in ACTIVE state and should be a private instance to perform this operation. + * If the previous state is not ACTIVE, then the state of the vbInstance will not be changed and a 409 response returned. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ReconfigurePrivateEndpointVbInstance API. + */ + ReconfigurePrivateEndpointVbInstanceResponse reconfigurePrivateEndpointVbInstance( + ReconfigurePrivateEndpointVbInstanceRequest request); + /** * Summarizes the applications for a vb instance. * @param request The request object containing the details to send diff --git a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/VbInstanceAsync.java b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/VbInstanceAsync.java index 03af310999c..18732d2bb1f 100644 --- a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/VbInstanceAsync.java +++ b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/VbInstanceAsync.java @@ -202,6 +202,27 @@ java.util.concurrent.Future listWorkRequests( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Reconfigures the Private Endpoint associated with the private visual builder instance. Use this action in case the Private Endpoint is not working and needs to be reset. + * The VB instance has to be in ACTIVE state and should be a private instance to perform this operation. + * If the previous state is not ACTIVE, then the state of the vbInstance will not be changed and a 409 response returned. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + reconfigurePrivateEndpointVbInstance( + ReconfigurePrivateEndpointVbInstanceRequest request, + com.oracle.bmc.responses.AsyncHandler< + ReconfigurePrivateEndpointVbInstanceRequest, + ReconfigurePrivateEndpointVbInstanceResponse> + handler); + /** * Summarizes the applications for a vb instance. * diff --git a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/VbInstanceAsyncClient.java b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/VbInstanceAsyncClient.java index 4706c23a347..2fdf8a4a258 100644 --- a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/VbInstanceAsyncClient.java +++ b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/VbInstanceAsyncClient.java @@ -888,6 +888,61 @@ protected void beforeRetryAction() {} } } + @Override + public java.util.concurrent.Future + reconfigurePrivateEndpointVbInstance( + ReconfigurePrivateEndpointVbInstanceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ReconfigurePrivateEndpointVbInstanceRequest, + ReconfigurePrivateEndpointVbInstanceResponse> + handler) { + LOG.trace("Called async reconfigurePrivateEndpointVbInstance"); + final ReconfigurePrivateEndpointVbInstanceRequest interceptedRequest = + ReconfigurePrivateEndpointVbInstanceConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ReconfigurePrivateEndpointVbInstanceConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "VbInstance", + "ReconfigurePrivateEndpointVbInstance", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/visual-builder/20210601/VbInstance/ReconfigurePrivateEndpointVbInstance"); + final java.util.function.Function< + javax.ws.rs.core.Response, ReconfigurePrivateEndpointVbInstanceResponse> + transformer = + ReconfigurePrivateEndpointVbInstanceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ReconfigurePrivateEndpointVbInstanceRequest, + ReconfigurePrivateEndpointVbInstanceResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ReconfigurePrivateEndpointVbInstanceRequest, + ReconfigurePrivateEndpointVbInstanceResponse>, + java.util.concurrent.Future> + futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ReconfigurePrivateEndpointVbInstanceRequest, + ReconfigurePrivateEndpointVbInstanceResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + @Override public java.util.concurrent.Future requestSummarizedApplications( diff --git a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/VbInstanceClient.java b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/VbInstanceClient.java index 5fea9e2e107..bc4d11a117c 100644 --- a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/VbInstanceClient.java +++ b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/VbInstanceClient.java @@ -891,6 +891,48 @@ public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request }); } + @Override + public ReconfigurePrivateEndpointVbInstanceResponse reconfigurePrivateEndpointVbInstance( + ReconfigurePrivateEndpointVbInstanceRequest request) { + LOG.trace("Called reconfigurePrivateEndpointVbInstance"); + final ReconfigurePrivateEndpointVbInstanceRequest interceptedRequest = + ReconfigurePrivateEndpointVbInstanceConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ReconfigurePrivateEndpointVbInstanceConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, false); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "VbInstance", + "ReconfigurePrivateEndpointVbInstance", + ib.getRequestUri().toString(), + "https://docs.oracle.com/iaas/api/#/en/visual-builder/20210601/VbInstance/ReconfigurePrivateEndpointVbInstance"); + java.util.function.Function< + javax.ws.rs.core.Response, ReconfigurePrivateEndpointVbInstanceResponse> + transformer = + ReconfigurePrivateEndpointVbInstanceConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public RequestSummarizedApplicationsResponse requestSummarizedApplications( RequestSummarizedApplicationsRequest request) { diff --git a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/internal/http/ReconfigurePrivateEndpointVbInstanceConverter.java b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/internal/http/ReconfigurePrivateEndpointVbInstanceConverter.java new file mode 100644 index 00000000000..a8ddf1f4959 --- /dev/null +++ b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/internal/http/ReconfigurePrivateEndpointVbInstanceConverter.java @@ -0,0 +1,157 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.visualbuilder.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.visualbuilder.model.*; +import com.oracle.bmc.visualbuilder.requests.*; +import com.oracle.bmc.visualbuilder.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210601") +public class ReconfigurePrivateEndpointVbInstanceConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ReconfigurePrivateEndpointVbInstanceConverter.class); + + public static com.oracle.bmc.visualbuilder.requests.ReconfigurePrivateEndpointVbInstanceRequest + interceptRequest( + com.oracle.bmc.visualbuilder.requests + .ReconfigurePrivateEndpointVbInstanceRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.visualbuilder.requests.ReconfigurePrivateEndpointVbInstanceRequest + request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getVbInstanceId(), "vbInstanceId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20210601") + .path("vbInstances") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getVbInstanceId())) + .path("actions") + .path("reconfigurePrivateEndpoint"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.visualbuilder.responses + .ReconfigurePrivateEndpointVbInstanceResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.visualbuilder.responses + .ReconfigurePrivateEndpointVbInstanceResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.visualbuilder.responses + .ReconfigurePrivateEndpointVbInstanceResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.visualbuilder.responses + .ReconfigurePrivateEndpointVbInstanceResponse>() { + @Override + public com.oracle.bmc.visualbuilder.responses + .ReconfigurePrivateEndpointVbInstanceResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.visualbuilder.responses.ReconfigurePrivateEndpointVbInstanceResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.visualbuilder.responses + .ReconfigurePrivateEndpointVbInstanceResponse + .Builder + builder = + com.oracle.bmc.visualbuilder.responses + .ReconfigurePrivateEndpointVbInstanceResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.visualbuilder.responses + .ReconfigurePrivateEndpointVbInstanceResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/AttachmentDetails.java b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/AttachmentDetails.java deleted file mode 100644 index 51193fdcaaf..00000000000 --- a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/AttachmentDetails.java +++ /dev/null @@ -1,375 +0,0 @@ -/** - * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. - * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. - */ -package com.oracle.bmc.visualbuilder.model; - -/** - * Description of an attachments for this instance - *
- * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields - * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in - * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called - * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take - * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} - * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). - **/ -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210601") -@com.fasterxml.jackson.databind.annotation.JsonDeserialize( - builder = AttachmentDetails.Builder.class -) -@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) -public final class AttachmentDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { - @Deprecated - @java.beans.ConstructorProperties({ - "targetRole", - "isImplicit", - "targetId", - "targetInstanceUrl", - "targetServiceType" - }) - public AttachmentDetails( - TargetRole targetRole, - Boolean isImplicit, - String targetId, - String targetInstanceUrl, - String targetServiceType) { - super(); - this.targetRole = targetRole; - this.isImplicit = isImplicit; - this.targetId = targetId; - this.targetInstanceUrl = targetInstanceUrl; - this.targetServiceType = targetServiceType; - } - - @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") - public static class Builder { - /** - * The role of the target attachment. - * * {@code PARENT} - The target instance is the parent of this attachment. - * * {@code CHILD} - The target instance is the child of this attachment. - * - **/ - @com.fasterxml.jackson.annotation.JsonProperty("targetRole") - private TargetRole targetRole; - - /** - * The role of the target attachment. - * * {@code PARENT} - The target instance is the parent of this attachment. - * * {@code CHILD} - The target instance is the child of this attachment. - * - * @param targetRole the value to set - * @return this builder - **/ - public Builder targetRole(TargetRole targetRole) { - this.targetRole = targetRole; - this.__explicitlySet__.add("targetRole"); - return this; - } - /** - * * If role == {@code PARENT}, the attached instance was created by this service instance - * * If role == {@code CHILD}, this instance was created from attached instance on behalf of a user - * - **/ - @com.fasterxml.jackson.annotation.JsonProperty("isImplicit") - private Boolean isImplicit; - - /** - * * If role == {@code PARENT}, the attached instance was created by this service instance - * * If role == {@code CHILD}, this instance was created from attached instance on behalf of a user - * - * @param isImplicit the value to set - * @return this builder - **/ - public Builder isImplicit(Boolean isImplicit) { - this.isImplicit = isImplicit; - this.__explicitlySet__.add("isImplicit"); - return this; - } - /** - * The OCID of the target instance (which could be any other OCI PaaS/SaaS resource), to which this instance is attached. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("targetId") - private String targetId; - - /** - * The OCID of the target instance (which could be any other OCI PaaS/SaaS resource), to which this instance is attached. - * @param targetId the value to set - * @return this builder - **/ - public Builder targetId(String targetId) { - this.targetId = targetId; - this.__explicitlySet__.add("targetId"); - return this; - } - /** - * The dataplane instance URL of the attached instance - **/ - @com.fasterxml.jackson.annotation.JsonProperty("targetInstanceUrl") - private String targetInstanceUrl; - - /** - * The dataplane instance URL of the attached instance - * @param targetInstanceUrl the value to set - * @return this builder - **/ - public Builder targetInstanceUrl(String targetInstanceUrl) { - this.targetInstanceUrl = targetInstanceUrl; - this.__explicitlySet__.add("targetInstanceUrl"); - return this; - } - /** - * The type of the target instance, such as "FUSION". - **/ - @com.fasterxml.jackson.annotation.JsonProperty("targetServiceType") - private String targetServiceType; - - /** - * The type of the target instance, such as "FUSION". - * @param targetServiceType the value to set - * @return this builder - **/ - public Builder targetServiceType(String targetServiceType) { - this.targetServiceType = targetServiceType; - this.__explicitlySet__.add("targetServiceType"); - return this; - } - - @com.fasterxml.jackson.annotation.JsonIgnore - private final java.util.Set __explicitlySet__ = new java.util.HashSet(); - - public AttachmentDetails build() { - AttachmentDetails model = - new AttachmentDetails( - this.targetRole, - this.isImplicit, - this.targetId, - this.targetInstanceUrl, - this.targetServiceType); - for (String explicitlySetProperty : this.__explicitlySet__) { - model.markPropertyAsExplicitlySet(explicitlySetProperty); - } - return model; - } - - @com.fasterxml.jackson.annotation.JsonIgnore - public Builder copy(AttachmentDetails model) { - if (model.wasPropertyExplicitlySet("targetRole")) { - this.targetRole(model.getTargetRole()); - } - if (model.wasPropertyExplicitlySet("isImplicit")) { - this.isImplicit(model.getIsImplicit()); - } - if (model.wasPropertyExplicitlySet("targetId")) { - this.targetId(model.getTargetId()); - } - if (model.wasPropertyExplicitlySet("targetInstanceUrl")) { - this.targetInstanceUrl(model.getTargetInstanceUrl()); - } - if (model.wasPropertyExplicitlySet("targetServiceType")) { - this.targetServiceType(model.getTargetServiceType()); - } - return this; - } - } - - /** - * Create a new builder. - */ - public static Builder builder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder().copy(this); - } - - /** - * The role of the target attachment. - * * {@code PARENT} - The target instance is the parent of this attachment. - * * {@code CHILD} - The target instance is the child of this attachment. - * - **/ - public enum TargetRole { - Parent("PARENT"), - Child("CHILD"), - - /** - * This value is used if a service returns a value for this enum that is not recognized by this - * version of the SDK. - */ - UnknownEnumValue(null); - - private static final org.slf4j.Logger LOG = - org.slf4j.LoggerFactory.getLogger(TargetRole.class); - - private final String value; - private static java.util.Map map; - - static { - map = new java.util.HashMap<>(); - for (TargetRole v : TargetRole.values()) { - if (v != UnknownEnumValue) { - map.put(v.getValue(), v); - } - } - } - - TargetRole(String value) { - this.value = value; - } - - @com.fasterxml.jackson.annotation.JsonValue - public String getValue() { - return value; - } - - @com.fasterxml.jackson.annotation.JsonCreator - public static TargetRole create(String key) { - if (map.containsKey(key)) { - return map.get(key); - } - LOG.warn( - "Received unknown value '{}' for enum 'TargetRole', returning UnknownEnumValue", - key); - return UnknownEnumValue; - } - }; - /** - * The role of the target attachment. - * * {@code PARENT} - The target instance is the parent of this attachment. - * * {@code CHILD} - The target instance is the child of this attachment. - * - **/ - @com.fasterxml.jackson.annotation.JsonProperty("targetRole") - private final TargetRole targetRole; - - /** - * The role of the target attachment. - * * {@code PARENT} - The target instance is the parent of this attachment. - * * {@code CHILD} - The target instance is the child of this attachment. - * - * @return the value - **/ - public TargetRole getTargetRole() { - return targetRole; - } - - /** - * * If role == {@code PARENT}, the attached instance was created by this service instance - * * If role == {@code CHILD}, this instance was created from attached instance on behalf of a user - * - **/ - @com.fasterxml.jackson.annotation.JsonProperty("isImplicit") - private final Boolean isImplicit; - - /** - * * If role == {@code PARENT}, the attached instance was created by this service instance - * * If role == {@code CHILD}, this instance was created from attached instance on behalf of a user - * - * @return the value - **/ - public Boolean getIsImplicit() { - return isImplicit; - } - - /** - * The OCID of the target instance (which could be any other OCI PaaS/SaaS resource), to which this instance is attached. - **/ - @com.fasterxml.jackson.annotation.JsonProperty("targetId") - private final String targetId; - - /** - * The OCID of the target instance (which could be any other OCI PaaS/SaaS resource), to which this instance is attached. - * @return the value - **/ - public String getTargetId() { - return targetId; - } - - /** - * The dataplane instance URL of the attached instance - **/ - @com.fasterxml.jackson.annotation.JsonProperty("targetInstanceUrl") - private final String targetInstanceUrl; - - /** - * The dataplane instance URL of the attached instance - * @return the value - **/ - public String getTargetInstanceUrl() { - return targetInstanceUrl; - } - - /** - * The type of the target instance, such as "FUSION". - **/ - @com.fasterxml.jackson.annotation.JsonProperty("targetServiceType") - private final String targetServiceType; - - /** - * The type of the target instance, such as "FUSION". - * @return the value - **/ - public String getTargetServiceType() { - return targetServiceType; - } - - @Override - public String toString() { - return this.toString(true); - } - - /** - * Return a string representation of the object. - * @param includeByteArrayContents true to include the full contents of byte arrays - * @return string representation - */ - public String toString(boolean includeByteArrayContents) { - java.lang.StringBuilder sb = new java.lang.StringBuilder(); - sb.append("AttachmentDetails("); - sb.append("super=").append(super.toString()); - sb.append("targetRole=").append(String.valueOf(this.targetRole)); - sb.append(", isImplicit=").append(String.valueOf(this.isImplicit)); - sb.append(", targetId=").append(String.valueOf(this.targetId)); - sb.append(", targetInstanceUrl=").append(String.valueOf(this.targetInstanceUrl)); - sb.append(", targetServiceType=").append(String.valueOf(this.targetServiceType)); - sb.append(")"); - return sb.toString(); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (!(o instanceof AttachmentDetails)) { - return false; - } - - AttachmentDetails other = (AttachmentDetails) o; - return java.util.Objects.equals(this.targetRole, other.targetRole) - && java.util.Objects.equals(this.isImplicit, other.isImplicit) - && java.util.Objects.equals(this.targetId, other.targetId) - && java.util.Objects.equals(this.targetInstanceUrl, other.targetInstanceUrl) - && java.util.Objects.equals(this.targetServiceType, other.targetServiceType) - && super.equals(other); - } - - @Override - public int hashCode() { - final int PRIME = 59; - int result = 1; - result = (result * PRIME) + (this.targetRole == null ? 43 : this.targetRole.hashCode()); - result = (result * PRIME) + (this.isImplicit == null ? 43 : this.isImplicit.hashCode()); - result = (result * PRIME) + (this.targetId == null ? 43 : this.targetId.hashCode()); - result = - (result * PRIME) - + (this.targetInstanceUrl == null ? 43 : this.targetInstanceUrl.hashCode()); - result = - (result * PRIME) - + (this.targetServiceType == null ? 43 : this.targetServiceType.hashCode()); - result = (result * PRIME) + super.hashCode(); - return result; - } -} diff --git a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/CreateVbInstanceDetails.java b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/CreateVbInstanceDetails.java index d3b7bcab980..6b16011047e 100644 --- a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/CreateVbInstanceDetails.java +++ b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/CreateVbInstanceDetails.java @@ -32,7 +32,8 @@ public final class CreateVbInstanceDetails "isVisualBuilderEnabled", "customEndpoint", "alternateCustomEndpoints", - "consumptionModel" + "consumptionModel", + "networkEndpointDetails" }) public CreateVbInstanceDetails( String displayName, @@ -44,7 +45,8 @@ public CreateVbInstanceDetails( Boolean isVisualBuilderEnabled, CreateCustomEndpointDetails customEndpoint, java.util.List alternateCustomEndpoints, - ConsumptionModel consumptionModel) { + ConsumptionModel consumptionModel, + NetworkEndpointDetails networkEndpointDetails) { super(); this.displayName = displayName; this.compartmentId = compartmentId; @@ -56,6 +58,7 @@ public CreateVbInstanceDetails( this.customEndpoint = customEndpoint; this.alternateCustomEndpoints = alternateCustomEndpoints; this.consumptionModel = consumptionModel; + this.networkEndpointDetails = networkEndpointDetails; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -232,6 +235,15 @@ public Builder consumptionModel(ConsumptionModel consumptionModel) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("networkEndpointDetails") + private NetworkEndpointDetails networkEndpointDetails; + + public Builder networkEndpointDetails(NetworkEndpointDetails networkEndpointDetails) { + this.networkEndpointDetails = networkEndpointDetails; + this.__explicitlySet__.add("networkEndpointDetails"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -247,7 +259,8 @@ public CreateVbInstanceDetails build() { this.isVisualBuilderEnabled, this.customEndpoint, this.alternateCustomEndpoints, - this.consumptionModel); + this.consumptionModel, + this.networkEndpointDetails); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -286,6 +299,9 @@ public Builder copy(CreateVbInstanceDetails model) { if (model.wasPropertyExplicitlySet("consumptionModel")) { this.consumptionModel(model.getConsumptionModel()); } + if (model.wasPropertyExplicitlySet("networkEndpointDetails")) { + this.networkEndpointDetails(model.getNetworkEndpointDetails()); + } return this; } } @@ -486,6 +502,13 @@ public ConsumptionModel getConsumptionModel() { return consumptionModel; } + @com.fasterxml.jackson.annotation.JsonProperty("networkEndpointDetails") + private final NetworkEndpointDetails networkEndpointDetails; + + public NetworkEndpointDetails getNetworkEndpointDetails() { + return networkEndpointDetails; + } + @Override public String toString() { return this.toString(true); @@ -511,6 +534,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", alternateCustomEndpoints=") .append(String.valueOf(this.alternateCustomEndpoints)); sb.append(", consumptionModel=").append(String.valueOf(this.consumptionModel)); + sb.append(", networkEndpointDetails=").append(String.valueOf(this.networkEndpointDetails)); sb.append(")"); return sb.toString(); } @@ -537,6 +561,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.alternateCustomEndpoints, other.alternateCustomEndpoints) && java.util.Objects.equals(this.consumptionModel, other.consumptionModel) + && java.util.Objects.equals( + this.networkEndpointDetails, other.networkEndpointDetails) && super.equals(other); } @@ -568,6 +594,11 @@ public int hashCode() { result = (result * PRIME) + (this.consumptionModel == null ? 43 : this.consumptionModel.hashCode()); + result = + (result * PRIME) + + (this.networkEndpointDetails == null + ? 43 + : this.networkEndpointDetails.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/IdcsInfoDetails.java b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/IdcsInfoDetails.java deleted file mode 100644 index 389c4ec4e84..00000000000 --- a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/IdcsInfoDetails.java +++ /dev/null @@ -1,320 +0,0 @@ -/** - * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. - * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. - */ -package com.oracle.bmc.visualbuilder.model; - -/** - * Information for IDCS access - *
- * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields - * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in - * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called - * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take - * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} - * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). - **/ -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210601") -@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = IdcsInfoDetails.Builder.class) -@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) -public final class IdcsInfoDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { - @Deprecated - @java.beans.ConstructorProperties({ - "idcsAppLocationUrl", - "idcsAppDisplayName", - "idcsAppId", - "idcsAppName", - "instancePrimaryAudienceUrl" - }) - public IdcsInfoDetails( - String idcsAppLocationUrl, - String idcsAppDisplayName, - String idcsAppId, - String idcsAppName, - String instancePrimaryAudienceUrl) { - super(); - this.idcsAppLocationUrl = idcsAppLocationUrl; - this.idcsAppDisplayName = idcsAppDisplayName; - this.idcsAppId = idcsAppId; - this.idcsAppName = idcsAppName; - this.instancePrimaryAudienceUrl = instancePrimaryAudienceUrl; - } - - @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") - public static class Builder { - /** - * URL for the location of the IDCS Application (used by IDCS APIs) - **/ - @com.fasterxml.jackson.annotation.JsonProperty("idcsAppLocationUrl") - private String idcsAppLocationUrl; - - /** - * URL for the location of the IDCS Application (used by IDCS APIs) - * @param idcsAppLocationUrl the value to set - * @return this builder - **/ - public Builder idcsAppLocationUrl(String idcsAppLocationUrl) { - this.idcsAppLocationUrl = idcsAppLocationUrl; - this.__explicitlySet__.add("idcsAppLocationUrl"); - return this; - } - /** - * The IDCS application display name associated with the instance - **/ - @com.fasterxml.jackson.annotation.JsonProperty("idcsAppDisplayName") - private String idcsAppDisplayName; - - /** - * The IDCS application display name associated with the instance - * @param idcsAppDisplayName the value to set - * @return this builder - **/ - public Builder idcsAppDisplayName(String idcsAppDisplayName) { - this.idcsAppDisplayName = idcsAppDisplayName; - this.__explicitlySet__.add("idcsAppDisplayName"); - return this; - } - /** - * The IDCS application ID associated with the instance - **/ - @com.fasterxml.jackson.annotation.JsonProperty("idcsAppId") - private String idcsAppId; - - /** - * The IDCS application ID associated with the instance - * @param idcsAppId the value to set - * @return this builder - **/ - public Builder idcsAppId(String idcsAppId) { - this.idcsAppId = idcsAppId; - this.__explicitlySet__.add("idcsAppId"); - return this; - } - /** - * The IDCS application name associated with the instance - **/ - @com.fasterxml.jackson.annotation.JsonProperty("idcsAppName") - private String idcsAppName; - - /** - * The IDCS application name associated with the instance - * @param idcsAppName the value to set - * @return this builder - **/ - public Builder idcsAppName(String idcsAppName) { - this.idcsAppName = idcsAppName; - this.__explicitlySet__.add("idcsAppName"); - return this; - } - /** - * The URL used as the primary audience for visual builder flows in this instance - * type: string - * - **/ - @com.fasterxml.jackson.annotation.JsonProperty("instancePrimaryAudienceUrl") - private String instancePrimaryAudienceUrl; - - /** - * The URL used as the primary audience for visual builder flows in this instance - * type: string - * - * @param instancePrimaryAudienceUrl the value to set - * @return this builder - **/ - public Builder instancePrimaryAudienceUrl(String instancePrimaryAudienceUrl) { - this.instancePrimaryAudienceUrl = instancePrimaryAudienceUrl; - this.__explicitlySet__.add("instancePrimaryAudienceUrl"); - return this; - } - - @com.fasterxml.jackson.annotation.JsonIgnore - private final java.util.Set __explicitlySet__ = new java.util.HashSet(); - - public IdcsInfoDetails build() { - IdcsInfoDetails model = - new IdcsInfoDetails( - this.idcsAppLocationUrl, - this.idcsAppDisplayName, - this.idcsAppId, - this.idcsAppName, - this.instancePrimaryAudienceUrl); - for (String explicitlySetProperty : this.__explicitlySet__) { - model.markPropertyAsExplicitlySet(explicitlySetProperty); - } - return model; - } - - @com.fasterxml.jackson.annotation.JsonIgnore - public Builder copy(IdcsInfoDetails model) { - if (model.wasPropertyExplicitlySet("idcsAppLocationUrl")) { - this.idcsAppLocationUrl(model.getIdcsAppLocationUrl()); - } - if (model.wasPropertyExplicitlySet("idcsAppDisplayName")) { - this.idcsAppDisplayName(model.getIdcsAppDisplayName()); - } - if (model.wasPropertyExplicitlySet("idcsAppId")) { - this.idcsAppId(model.getIdcsAppId()); - } - if (model.wasPropertyExplicitlySet("idcsAppName")) { - this.idcsAppName(model.getIdcsAppName()); - } - if (model.wasPropertyExplicitlySet("instancePrimaryAudienceUrl")) { - this.instancePrimaryAudienceUrl(model.getInstancePrimaryAudienceUrl()); - } - return this; - } - } - - /** - * Create a new builder. - */ - public static Builder builder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder().copy(this); - } - - /** - * URL for the location of the IDCS Application (used by IDCS APIs) - **/ - @com.fasterxml.jackson.annotation.JsonProperty("idcsAppLocationUrl") - private final String idcsAppLocationUrl; - - /** - * URL for the location of the IDCS Application (used by IDCS APIs) - * @return the value - **/ - public String getIdcsAppLocationUrl() { - return idcsAppLocationUrl; - } - - /** - * The IDCS application display name associated with the instance - **/ - @com.fasterxml.jackson.annotation.JsonProperty("idcsAppDisplayName") - private final String idcsAppDisplayName; - - /** - * The IDCS application display name associated with the instance - * @return the value - **/ - public String getIdcsAppDisplayName() { - return idcsAppDisplayName; - } - - /** - * The IDCS application ID associated with the instance - **/ - @com.fasterxml.jackson.annotation.JsonProperty("idcsAppId") - private final String idcsAppId; - - /** - * The IDCS application ID associated with the instance - * @return the value - **/ - public String getIdcsAppId() { - return idcsAppId; - } - - /** - * The IDCS application name associated with the instance - **/ - @com.fasterxml.jackson.annotation.JsonProperty("idcsAppName") - private final String idcsAppName; - - /** - * The IDCS application name associated with the instance - * @return the value - **/ - public String getIdcsAppName() { - return idcsAppName; - } - - /** - * The URL used as the primary audience for visual builder flows in this instance - * type: string - * - **/ - @com.fasterxml.jackson.annotation.JsonProperty("instancePrimaryAudienceUrl") - private final String instancePrimaryAudienceUrl; - - /** - * The URL used as the primary audience for visual builder flows in this instance - * type: string - * - * @return the value - **/ - public String getInstancePrimaryAudienceUrl() { - return instancePrimaryAudienceUrl; - } - - @Override - public String toString() { - return this.toString(true); - } - - /** - * Return a string representation of the object. - * @param includeByteArrayContents true to include the full contents of byte arrays - * @return string representation - */ - public String toString(boolean includeByteArrayContents) { - java.lang.StringBuilder sb = new java.lang.StringBuilder(); - sb.append("IdcsInfoDetails("); - sb.append("super=").append(super.toString()); - sb.append("idcsAppLocationUrl=").append(String.valueOf(this.idcsAppLocationUrl)); - sb.append(", idcsAppDisplayName=").append(String.valueOf(this.idcsAppDisplayName)); - sb.append(", idcsAppId=").append(String.valueOf(this.idcsAppId)); - sb.append(", idcsAppName=").append(String.valueOf(this.idcsAppName)); - sb.append(", instancePrimaryAudienceUrl=") - .append(String.valueOf(this.instancePrimaryAudienceUrl)); - sb.append(")"); - return sb.toString(); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (!(o instanceof IdcsInfoDetails)) { - return false; - } - - IdcsInfoDetails other = (IdcsInfoDetails) o; - return java.util.Objects.equals(this.idcsAppLocationUrl, other.idcsAppLocationUrl) - && java.util.Objects.equals(this.idcsAppDisplayName, other.idcsAppDisplayName) - && java.util.Objects.equals(this.idcsAppId, other.idcsAppId) - && java.util.Objects.equals(this.idcsAppName, other.idcsAppName) - && java.util.Objects.equals( - this.instancePrimaryAudienceUrl, other.instancePrimaryAudienceUrl) - && super.equals(other); - } - - @Override - public int hashCode() { - final int PRIME = 59; - int result = 1; - result = - (result * PRIME) - + (this.idcsAppLocationUrl == null - ? 43 - : this.idcsAppLocationUrl.hashCode()); - result = - (result * PRIME) - + (this.idcsAppDisplayName == null - ? 43 - : this.idcsAppDisplayName.hashCode()); - result = (result * PRIME) + (this.idcsAppId == null ? 43 : this.idcsAppId.hashCode()); - result = (result * PRIME) + (this.idcsAppName == null ? 43 : this.idcsAppName.hashCode()); - result = - (result * PRIME) - + (this.instancePrimaryAudienceUrl == null - ? 43 - : this.instancePrimaryAudienceUrl.hashCode()); - result = (result * PRIME) + super.hashCode(); - return result; - } -} diff --git a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/NetworkEndpointDetails.java b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/NetworkEndpointDetails.java new file mode 100644 index 00000000000..274bbece208 --- /dev/null +++ b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/NetworkEndpointDetails.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.visualbuilder.model; + +/** + * Base representation of a network endpoint. + * In input payload to update an Visual Builder instance endpoint details, an empty payload will clear out any existing configuration for Public Visual Builder instance. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210601") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "networkEndpointType", + defaultImpl = NetworkEndpointDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = PrivateEndpointDetails.class, + name = "PRIVATE" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class NetworkEndpointDetails extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected NetworkEndpointDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("NetworkEndpointDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof NetworkEndpointDetails)) { + return false; + } + + NetworkEndpointDetails other = (NetworkEndpointDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/NetworkEndpointType.java b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/NetworkEndpointType.java new file mode 100644 index 00000000000..63ac62f4304 --- /dev/null +++ b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/NetworkEndpointType.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.visualbuilder.model; + +/** + * Public/Private endpoint access type. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210601") +public enum NetworkEndpointType { + Private("PRIVATE"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(NetworkEndpointType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (NetworkEndpointType v : NetworkEndpointType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + NetworkEndpointType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static NetworkEndpointType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'NetworkEndpointType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/PrivateEndpointDetails.java b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/PrivateEndpointDetails.java new file mode 100644 index 00000000000..ffbb00ea5e0 --- /dev/null +++ b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/PrivateEndpointDetails.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.visualbuilder.model; + +/** + * Private endpoint configuration details. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210601") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PrivateEndpointDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "networkEndpointType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class PrivateEndpointDetails extends NetworkEndpointDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The subnet OCID for the private endpoint. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + /** + * The subnet OCID for the private endpoint. + * + * @param subnetId the value to set + * @return this builder + **/ + public Builder subnetId(String subnetId) { + this.subnetId = subnetId; + this.__explicitlySet__.add("subnetId"); + return this; + } + /** + * Network Security Group OCIDs for the Private Endpoint. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("networkSecurityGroupIds") + private java.util.List networkSecurityGroupIds; + + /** + * Network Security Group OCIDs for the Private Endpoint. + * + * @param networkSecurityGroupIds the value to set + * @return this builder + **/ + public Builder networkSecurityGroupIds(java.util.List networkSecurityGroupIds) { + this.networkSecurityGroupIds = networkSecurityGroupIds; + this.__explicitlySet__.add("networkSecurityGroupIds"); + return this; + } + /** + * The IP address to be assigned to Private Endpoint + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") + private String privateEndpointIp; + + /** + * The IP address to be assigned to Private Endpoint + * @param privateEndpointIp the value to set + * @return this builder + **/ + public Builder privateEndpointIp(String privateEndpointIp) { + this.privateEndpointIp = privateEndpointIp; + this.__explicitlySet__.add("privateEndpointIp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PrivateEndpointDetails build() { + PrivateEndpointDetails model = + new PrivateEndpointDetails( + this.subnetId, this.networkSecurityGroupIds, this.privateEndpointIp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PrivateEndpointDetails model) { + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + if (model.wasPropertyExplicitlySet("networkSecurityGroupIds")) { + this.networkSecurityGroupIds(model.getNetworkSecurityGroupIds()); + } + if (model.wasPropertyExplicitlySet("privateEndpointIp")) { + this.privateEndpointIp(model.getPrivateEndpointIp()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public PrivateEndpointDetails( + String subnetId, + java.util.List networkSecurityGroupIds, + String privateEndpointIp) { + super(); + this.subnetId = subnetId; + this.networkSecurityGroupIds = networkSecurityGroupIds; + this.privateEndpointIp = privateEndpointIp; + } + + /** + * The subnet OCID for the private endpoint. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; + + /** + * The subnet OCID for the private endpoint. + * + * @return the value + **/ + public String getSubnetId() { + return subnetId; + } + + /** + * Network Security Group OCIDs for the Private Endpoint. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("networkSecurityGroupIds") + private final java.util.List networkSecurityGroupIds; + + /** + * Network Security Group OCIDs for the Private Endpoint. + * + * @return the value + **/ + public java.util.List getNetworkSecurityGroupIds() { + return networkSecurityGroupIds; + } + + /** + * The IP address to be assigned to Private Endpoint + **/ + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") + private final String privateEndpointIp; + + /** + * The IP address to be assigned to Private Endpoint + * @return the value + **/ + public String getPrivateEndpointIp() { + return privateEndpointIp; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("PrivateEndpointDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", networkSecurityGroupIds=") + .append(String.valueOf(this.networkSecurityGroupIds)); + sb.append(", privateEndpointIp=").append(String.valueOf(this.privateEndpointIp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof PrivateEndpointDetails)) { + return false; + } + + PrivateEndpointDetails other = (PrivateEndpointDetails) o; + return java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals( + this.networkSecurityGroupIds, other.networkSecurityGroupIds) + && java.util.Objects.equals(this.privateEndpointIp, other.privateEndpointIp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); + result = + (result * PRIME) + + (this.networkSecurityGroupIds == null + ? 43 + : this.networkSecurityGroupIds.hashCode()); + result = + (result * PRIME) + + (this.privateEndpointIp == null ? 43 : this.privateEndpointIp.hashCode()); + return result; + } +} diff --git a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/UpdateNetworkEndpointDetails.java b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/UpdateNetworkEndpointDetails.java new file mode 100644 index 00000000000..d4b629531c4 --- /dev/null +++ b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/UpdateNetworkEndpointDetails.java @@ -0,0 +1,79 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.visualbuilder.model; + +/** + * Base representation of a network endpoint. + * In input payload to update an Visual Builder instance endpoint details, an empty payload will clear out any existing configuration for Public Visual Builder instance. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210601") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "networkEndpointType", + defaultImpl = UpdateNetworkEndpointDetails.class +) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = UpdatePrivateEndpointDetails.class, + name = "PRIVATE" + ) +}) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class UpdateNetworkEndpointDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected UpdateNetworkEndpointDetails() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateNetworkEndpointDetails("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateNetworkEndpointDetails)) { + return false; + } + + UpdateNetworkEndpointDetails other = (UpdateNetworkEndpointDetails) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/UpdatePrivateEndpointDetails.java b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/UpdatePrivateEndpointDetails.java new file mode 100644 index 00000000000..f674a39a333 --- /dev/null +++ b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/UpdatePrivateEndpointDetails.java @@ -0,0 +1,192 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.visualbuilder.model; + +/** + * Private endpoint update configuration details. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210601") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdatePrivateEndpointDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "networkEndpointType" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdatePrivateEndpointDetails extends UpdateNetworkEndpointDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The subnet OCID for the private endpoint. If provided then a new Private Endpoint will be created and a new Private Endpoint IP may be generated. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + /** + * The subnet OCID for the private endpoint. If provided then a new Private Endpoint will be created and a new Private Endpoint IP may be generated. + * + * @param subnetId the value to set + * @return this builder + **/ + public Builder subnetId(String subnetId) { + this.subnetId = subnetId; + this.__explicitlySet__.add("subnetId"); + return this; + } + /** + * Network Security Group OCIDs for the Private Endpoint. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("networkSecurityGroupIds") + private java.util.List networkSecurityGroupIds; + + /** + * Network Security Group OCIDs for the Private Endpoint. + * + * @param networkSecurityGroupIds the value to set + * @return this builder + **/ + public Builder networkSecurityGroupIds(java.util.List networkSecurityGroupIds) { + this.networkSecurityGroupIds = networkSecurityGroupIds; + this.__explicitlySet__.add("networkSecurityGroupIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdatePrivateEndpointDetails build() { + UpdatePrivateEndpointDetails model = + new UpdatePrivateEndpointDetails(this.subnetId, this.networkSecurityGroupIds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdatePrivateEndpointDetails model) { + if (model.wasPropertyExplicitlySet("subnetId")) { + this.subnetId(model.getSubnetId()); + } + if (model.wasPropertyExplicitlySet("networkSecurityGroupIds")) { + this.networkSecurityGroupIds(model.getNetworkSecurityGroupIds()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public UpdatePrivateEndpointDetails( + String subnetId, java.util.List networkSecurityGroupIds) { + super(); + this.subnetId = subnetId; + this.networkSecurityGroupIds = networkSecurityGroupIds; + } + + /** + * The subnet OCID for the private endpoint. If provided then a new Private Endpoint will be created and a new Private Endpoint IP may be generated. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private final String subnetId; + + /** + * The subnet OCID for the private endpoint. If provided then a new Private Endpoint will be created and a new Private Endpoint IP may be generated. + * + * @return the value + **/ + public String getSubnetId() { + return subnetId; + } + + /** + * Network Security Group OCIDs for the Private Endpoint. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("networkSecurityGroupIds") + private final java.util.List networkSecurityGroupIds; + + /** + * Network Security Group OCIDs for the Private Endpoint. + * + * @return the value + **/ + public java.util.List getNetworkSecurityGroupIds() { + return networkSecurityGroupIds; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdatePrivateEndpointDetails("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", subnetId=").append(String.valueOf(this.subnetId)); + sb.append(", networkSecurityGroupIds=") + .append(String.valueOf(this.networkSecurityGroupIds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdatePrivateEndpointDetails)) { + return false; + } + + UpdatePrivateEndpointDetails other = (UpdatePrivateEndpointDetails) o; + return java.util.Objects.equals(this.subnetId, other.subnetId) + && java.util.Objects.equals( + this.networkSecurityGroupIds, other.networkSecurityGroupIds) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); + result = + (result * PRIME) + + (this.networkSecurityGroupIds == null + ? 43 + : this.networkSecurityGroupIds.hashCode()); + return result; + } +} diff --git a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/UpdateVbInstanceDetails.java b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/UpdateVbInstanceDetails.java index a38bed09c21..589c87d868e 100644 --- a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/UpdateVbInstanceDetails.java +++ b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/UpdateVbInstanceDetails.java @@ -30,7 +30,8 @@ public final class UpdateVbInstanceDetails "nodeCount", "isVisualBuilderEnabled", "customEndpoint", - "alternateCustomEndpoints" + "alternateCustomEndpoints", + "networkEndpointDetails" }) public UpdateVbInstanceDetails( String displayName, @@ -40,7 +41,8 @@ public UpdateVbInstanceDetails( Integer nodeCount, Boolean isVisualBuilderEnabled, UpdateCustomEndpointDetails customEndpoint, - java.util.List alternateCustomEndpoints) { + java.util.List alternateCustomEndpoints, + UpdateNetworkEndpointDetails networkEndpointDetails) { super(); this.displayName = displayName; this.freeformTags = freeformTags; @@ -50,6 +52,7 @@ public UpdateVbInstanceDetails( this.isVisualBuilderEnabled = isVisualBuilderEnabled; this.customEndpoint = customEndpoint; this.alternateCustomEndpoints = alternateCustomEndpoints; + this.networkEndpointDetails = networkEndpointDetails; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -194,6 +197,15 @@ public Builder alternateCustomEndpoints( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("networkEndpointDetails") + private UpdateNetworkEndpointDetails networkEndpointDetails; + + public Builder networkEndpointDetails(UpdateNetworkEndpointDetails networkEndpointDetails) { + this.networkEndpointDetails = networkEndpointDetails; + this.__explicitlySet__.add("networkEndpointDetails"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -207,7 +219,8 @@ public UpdateVbInstanceDetails build() { this.nodeCount, this.isVisualBuilderEnabled, this.customEndpoint, - this.alternateCustomEndpoints); + this.alternateCustomEndpoints, + this.networkEndpointDetails); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -240,6 +253,9 @@ public Builder copy(UpdateVbInstanceDetails model) { if (model.wasPropertyExplicitlySet("alternateCustomEndpoints")) { this.alternateCustomEndpoints(model.getAlternateCustomEndpoints()); } + if (model.wasPropertyExplicitlySet("networkEndpointDetails")) { + this.networkEndpointDetails(model.getNetworkEndpointDetails()); + } return this; } } @@ -376,6 +392,13 @@ public java.util.List getAlternateCustomEndpoints() return alternateCustomEndpoints; } + @com.fasterxml.jackson.annotation.JsonProperty("networkEndpointDetails") + private final UpdateNetworkEndpointDetails networkEndpointDetails; + + public UpdateNetworkEndpointDetails getNetworkEndpointDetails() { + return networkEndpointDetails; + } + @Override public String toString() { return this.toString(true); @@ -399,6 +422,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", customEndpoint=").append(String.valueOf(this.customEndpoint)); sb.append(", alternateCustomEndpoints=") .append(String.valueOf(this.alternateCustomEndpoints)); + sb.append(", networkEndpointDetails=").append(String.valueOf(this.networkEndpointDetails)); sb.append(")"); return sb.toString(); } @@ -423,6 +447,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.customEndpoint, other.customEndpoint) && java.util.Objects.equals( this.alternateCustomEndpoints, other.alternateCustomEndpoints) + && java.util.Objects.equals( + this.networkEndpointDetails, other.networkEndpointDetails) && super.equals(other); } @@ -448,6 +474,11 @@ public int hashCode() { + (this.alternateCustomEndpoints == null ? 43 : this.alternateCustomEndpoints.hashCode()); + result = + (result * PRIME) + + (this.networkEndpointDetails == null + ? 43 + : this.networkEndpointDetails.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/VbInstance.java b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/VbInstance.java index 2cb81591810..d40fceb2407 100644 --- a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/VbInstance.java +++ b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/VbInstance.java @@ -36,12 +36,11 @@ public final class VbInstance extends com.oracle.bmc.http.internal.ExplicitlySet "customEndpoint", "alternateCustomEndpoints", "consumptionModel", - "idcsInfo", - "attachments", "serviceNatGatewayIp", "managementNatGatewayIp", "serviceVcnId", - "managementVcnId" + "managementVcnId", + "networkEndpointDetails" }) public VbInstance( String id, @@ -60,12 +59,11 @@ public VbInstance( CustomEndpointDetails customEndpoint, java.util.List alternateCustomEndpoints, ConsumptionModel consumptionModel, - IdcsInfoDetails idcsInfo, - java.util.List attachments, String serviceNatGatewayIp, String managementNatGatewayIp, String serviceVcnId, - String managementVcnId) { + String managementVcnId, + NetworkEndpointDetails networkEndpointDetails) { super(); this.id = id; this.displayName = displayName; @@ -83,12 +81,11 @@ public VbInstance( this.customEndpoint = customEndpoint; this.alternateCustomEndpoints = alternateCustomEndpoints; this.consumptionModel = consumptionModel; - this.idcsInfo = idcsInfo; - this.attachments = attachments; this.serviceNatGatewayIp = serviceNatGatewayIp; this.managementNatGatewayIp = managementNatGatewayIp; this.serviceVcnId = serviceVcnId; this.managementVcnId = managementVcnId; + this.networkEndpointDetails = networkEndpointDetails; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -358,33 +355,6 @@ public Builder consumptionModel(ConsumptionModel consumptionModel) { this.__explicitlySet__.add("consumptionModel"); return this; } - - @com.fasterxml.jackson.annotation.JsonProperty("idcsInfo") - private IdcsInfoDetails idcsInfo; - - public Builder idcsInfo(IdcsInfoDetails idcsInfo) { - this.idcsInfo = idcsInfo; - this.__explicitlySet__.add("idcsInfo"); - return this; - } - /** - * A list of associated attachments to other services - * - **/ - @com.fasterxml.jackson.annotation.JsonProperty("attachments") - private java.util.List attachments; - - /** - * A list of associated attachments to other services - * - * @param attachments the value to set - * @return this builder - **/ - public Builder attachments(java.util.List attachments) { - this.attachments = attachments; - this.__explicitlySet__.add("attachments"); - return this; - } /** * The NAT gateway IP address for the VB service VCN **/ @@ -450,6 +420,15 @@ public Builder managementVcnId(String managementVcnId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("networkEndpointDetails") + private NetworkEndpointDetails networkEndpointDetails; + + public Builder networkEndpointDetails(NetworkEndpointDetails networkEndpointDetails) { + this.networkEndpointDetails = networkEndpointDetails; + this.__explicitlySet__.add("networkEndpointDetails"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -472,12 +451,11 @@ public VbInstance build() { this.customEndpoint, this.alternateCustomEndpoints, this.consumptionModel, - this.idcsInfo, - this.attachments, this.serviceNatGatewayIp, this.managementNatGatewayIp, this.serviceVcnId, - this.managementVcnId); + this.managementVcnId, + this.networkEndpointDetails); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -534,12 +512,6 @@ public Builder copy(VbInstance model) { if (model.wasPropertyExplicitlySet("consumptionModel")) { this.consumptionModel(model.getConsumptionModel()); } - if (model.wasPropertyExplicitlySet("idcsInfo")) { - this.idcsInfo(model.getIdcsInfo()); - } - if (model.wasPropertyExplicitlySet("attachments")) { - this.attachments(model.getAttachments()); - } if (model.wasPropertyExplicitlySet("serviceNatGatewayIp")) { this.serviceNatGatewayIp(model.getServiceNatGatewayIp()); } @@ -552,6 +524,9 @@ public Builder copy(VbInstance model) { if (model.wasPropertyExplicitlySet("managementVcnId")) { this.managementVcnId(model.getManagementVcnId()); } + if (model.wasPropertyExplicitlySet("networkEndpointDetails")) { + this.networkEndpointDetails(model.getNetworkEndpointDetails()); + } return this; } } @@ -900,29 +875,6 @@ public ConsumptionModel getConsumptionModel() { return consumptionModel; } - @com.fasterxml.jackson.annotation.JsonProperty("idcsInfo") - private final IdcsInfoDetails idcsInfo; - - public IdcsInfoDetails getIdcsInfo() { - return idcsInfo; - } - - /** - * A list of associated attachments to other services - * - **/ - @com.fasterxml.jackson.annotation.JsonProperty("attachments") - private final java.util.List attachments; - - /** - * A list of associated attachments to other services - * - * @return the value - **/ - public java.util.List getAttachments() { - return attachments; - } - /** * The NAT gateway IP address for the VB service VCN **/ @@ -979,6 +931,13 @@ public String getManagementVcnId() { return managementVcnId; } + @com.fasterxml.jackson.annotation.JsonProperty("networkEndpointDetails") + private final NetworkEndpointDetails networkEndpointDetails; + + public NetworkEndpointDetails getNetworkEndpointDetails() { + return networkEndpointDetails; + } + @Override public String toString() { return this.toString(true); @@ -1010,12 +969,11 @@ public String toString(boolean includeByteArrayContents) { sb.append(", alternateCustomEndpoints=") .append(String.valueOf(this.alternateCustomEndpoints)); sb.append(", consumptionModel=").append(String.valueOf(this.consumptionModel)); - sb.append(", idcsInfo=").append(String.valueOf(this.idcsInfo)); - sb.append(", attachments=").append(String.valueOf(this.attachments)); sb.append(", serviceNatGatewayIp=").append(String.valueOf(this.serviceNatGatewayIp)); sb.append(", managementNatGatewayIp=").append(String.valueOf(this.managementNatGatewayIp)); sb.append(", serviceVcnId=").append(String.valueOf(this.serviceVcnId)); sb.append(", managementVcnId=").append(String.valueOf(this.managementVcnId)); + sb.append(", networkEndpointDetails=").append(String.valueOf(this.networkEndpointDetails)); sb.append(")"); return sb.toString(); } @@ -1048,13 +1006,13 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.alternateCustomEndpoints, other.alternateCustomEndpoints) && java.util.Objects.equals(this.consumptionModel, other.consumptionModel) - && java.util.Objects.equals(this.idcsInfo, other.idcsInfo) - && java.util.Objects.equals(this.attachments, other.attachments) && java.util.Objects.equals(this.serviceNatGatewayIp, other.serviceNatGatewayIp) && java.util.Objects.equals( this.managementNatGatewayIp, other.managementNatGatewayIp) && java.util.Objects.equals(this.serviceVcnId, other.serviceVcnId) && java.util.Objects.equals(this.managementVcnId, other.managementVcnId) + && java.util.Objects.equals( + this.networkEndpointDetails, other.networkEndpointDetails) && super.equals(other); } @@ -1094,8 +1052,6 @@ public int hashCode() { result = (result * PRIME) + (this.consumptionModel == null ? 43 : this.consumptionModel.hashCode()); - result = (result * PRIME) + (this.idcsInfo == null ? 43 : this.idcsInfo.hashCode()); - result = (result * PRIME) + (this.attachments == null ? 43 : this.attachments.hashCode()); result = (result * PRIME) + (this.serviceNatGatewayIp == null @@ -1110,6 +1066,11 @@ public int hashCode() { result = (result * PRIME) + (this.managementVcnId == null ? 43 : this.managementVcnId.hashCode()); + result = + (result * PRIME) + + (this.networkEndpointDetails == null + ? 43 + : this.networkEndpointDetails.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/VbInstanceSummary.java b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/VbInstanceSummary.java index 58662928396..5a9eaf64430 100644 --- a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/VbInstanceSummary.java +++ b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/model/VbInstanceSummary.java @@ -37,7 +37,8 @@ public final class VbInstanceSummary extends com.oracle.bmc.http.internal.Explic "consumptionModel", "freeformTags", "definedTags", - "systemTags" + "systemTags", + "networkEndpointDetails" }) public VbInstanceSummary( String id, @@ -55,7 +56,8 @@ public VbInstanceSummary( ConsumptionModel consumptionModel, java.util.Map freeformTags, java.util.Map> definedTags, - java.util.Map> systemTags) { + java.util.Map> systemTags, + NetworkEndpointDetails networkEndpointDetails) { super(); this.id = id; this.displayName = displayName; @@ -73,6 +75,7 @@ public VbInstanceSummary( this.freeformTags = freeformTags; this.definedTags = definedTags; this.systemTags = systemTags; + this.networkEndpointDetails = networkEndpointDetails; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -343,6 +346,15 @@ public Builder systemTags(java.util.Map> s return this; } + @com.fasterxml.jackson.annotation.JsonProperty("networkEndpointDetails") + private NetworkEndpointDetails networkEndpointDetails; + + public Builder networkEndpointDetails(NetworkEndpointDetails networkEndpointDetails) { + this.networkEndpointDetails = networkEndpointDetails; + this.__explicitlySet__.add("networkEndpointDetails"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -364,7 +376,8 @@ public VbInstanceSummary build() { this.consumptionModel, this.freeformTags, this.definedTags, - this.systemTags); + this.systemTags, + this.networkEndpointDetails); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -421,6 +434,9 @@ public Builder copy(VbInstanceSummary model) { if (model.wasPropertyExplicitlySet("systemTags")) { this.systemTags(model.getSystemTags()); } + if (model.wasPropertyExplicitlySet("networkEndpointDetails")) { + this.networkEndpointDetails(model.getNetworkEndpointDetails()); + } return this; } } @@ -769,6 +785,13 @@ public java.util.Map> getSystemTags() { return systemTags; } + @com.fasterxml.jackson.annotation.JsonProperty("networkEndpointDetails") + private final NetworkEndpointDetails networkEndpointDetails; + + public NetworkEndpointDetails getNetworkEndpointDetails() { + return networkEndpointDetails; + } + @Override public String toString() { return this.toString(true); @@ -800,6 +823,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", networkEndpointDetails=").append(String.valueOf(this.networkEndpointDetails)); sb.append(")"); return sb.toString(); } @@ -832,6 +856,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals( + this.networkEndpointDetails, other.networkEndpointDetails) && super.equals(other); } @@ -871,6 +897,11 @@ public int hashCode() { result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = + (result * PRIME) + + (this.networkEndpointDetails == null + ? 43 + : this.networkEndpointDetails.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/requests/ReconfigurePrivateEndpointVbInstanceRequest.java b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/requests/ReconfigurePrivateEndpointVbInstanceRequest.java new file mode 100644 index 00000000000..1960572e86e --- /dev/null +++ b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/requests/ReconfigurePrivateEndpointVbInstanceRequest.java @@ -0,0 +1,308 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.visualbuilder.requests; + +import com.oracle.bmc.visualbuilder.model.*; +/** + * Example: Click here to see how to use ReconfigurePrivateEndpointVbInstanceRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210601") +public class ReconfigurePrivateEndpointVbInstanceRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * Unique Vb Instance identifier. + */ + private String vbInstanceId; + + /** + * Unique Vb Instance identifier. + */ + public String getVbInstanceId() { + return vbInstanceId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * The client request ID for tracing. + */ + private String opcRequestId; + + /** + * The client request ID for tracing. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations. For example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations. For example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ReconfigurePrivateEndpointVbInstanceRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Vb Instance identifier. + */ + private String vbInstanceId = null; + + /** + * Unique Vb Instance identifier. + * @param vbInstanceId the value to set + * @return this builder instance + */ + public Builder vbInstanceId(String vbInstanceId) { + this.vbInstanceId = vbInstanceId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call + * for a resource, set the {@code if-match} parameter to the value of the + * etag from a previous GET or POST response for that resource. + * The resource will be updated or deleted only if the etag you + * provide matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * The client request ID for tracing. + */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations. For example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case + * of a timeout or server error without risk of executing that same action + * again. Retry tokens expire after 24 hours, but can be invalidated before + * then due to conflicting operations. For example, if a resource has been + * deleted and purged from the system, then a retry of the original creation + * request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ReconfigurePrivateEndpointVbInstanceRequest o) { + vbInstanceId(o.getVbInstanceId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ReconfigurePrivateEndpointVbInstanceRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ReconfigurePrivateEndpointVbInstanceRequest + */ + public ReconfigurePrivateEndpointVbInstanceRequest build() { + ReconfigurePrivateEndpointVbInstanceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ReconfigurePrivateEndpointVbInstanceRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ReconfigurePrivateEndpointVbInstanceRequest + */ + public ReconfigurePrivateEndpointVbInstanceRequest buildWithoutInvocationCallback() { + ReconfigurePrivateEndpointVbInstanceRequest request = + new ReconfigurePrivateEndpointVbInstanceRequest(); + request.vbInstanceId = vbInstanceId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new ReconfigurePrivateEndpointVbInstanceRequest(vbInstanceId, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .vbInstanceId(vbInstanceId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",vbInstanceId=").append(String.valueOf(this.vbInstanceId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ReconfigurePrivateEndpointVbInstanceRequest)) { + return false; + } + + ReconfigurePrivateEndpointVbInstanceRequest other = + (ReconfigurePrivateEndpointVbInstanceRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.vbInstanceId, other.vbInstanceId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.vbInstanceId == null ? 43 : this.vbInstanceId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/responses/ReconfigurePrivateEndpointVbInstanceResponse.java b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/responses/ReconfigurePrivateEndpointVbInstanceResponse.java new file mode 100644 index 00000000000..26ec89ac239 --- /dev/null +++ b/bmc-visualbuilder/src/main/java/com/oracle/bmc/visualbuilder/responses/ReconfigurePrivateEndpointVbInstanceResponse.java @@ -0,0 +1,187 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.visualbuilder.responses; + +import com.oracle.bmc.visualbuilder.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210601") +public class ReconfigurePrivateEndpointVbInstanceResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private ReconfigurePrivateEndpointVbInstanceResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. + * You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If + * you need to contact Oracle about a particular request, + * please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ReconfigurePrivateEndpointVbInstanceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ReconfigurePrivateEndpointVbInstanceResponse build() { + return new ReconfigurePrivateEndpointVbInstanceResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ReconfigurePrivateEndpointVbInstanceResponse)) { + return false; + } + + ReconfigurePrivateEndpointVbInstanceResponse other = + (ReconfigurePrivateEndpointVbInstanceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-vnmonitoring/pom.xml b/bmc-vnmonitoring/pom.xml index a386be9a668..bd70d675b25 100644 --- a/bmc-vnmonitoring/pom.xml +++ b/bmc-vnmonitoring/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-vnmonitoring @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-vulnerabilityscanning/pom.xml b/bmc-vulnerabilityscanning/pom.xml index cef7d66d595..baf98cc0974 100644 --- a/bmc-vulnerabilityscanning/pom.xml +++ b/bmc-vulnerabilityscanning/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-vulnerabilityscanning @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-waa/pom.xml b/bmc-waa/pom.xml index 34b2a014af8..091a742f068 100644 --- a/bmc-waa/pom.xml +++ b/bmc-waa/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-waa @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-waas/pom.xml b/bmc-waas/pom.xml index 6698e6e674e..58c435f7439 100644 --- a/bmc-waas/pom.xml +++ b/bmc-waas/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-waas @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-waf/pom.xml b/bmc-waf/pom.xml index 3fb427a9c0e..4d06fb870c0 100644 --- a/bmc-waf/pom.xml +++ b/bmc-waf/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-waf @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 \ No newline at end of file diff --git a/bmc-waf/src/main/java/com/oracle/bmc/waf/model/DynamicHttpResponseBody.java b/bmc-waf/src/main/java/com/oracle/bmc/waf/model/DynamicHttpResponseBody.java new file mode 100644 index 00000000000..7bf93af6d31 --- /dev/null +++ b/bmc-waf/src/main/java/com/oracle/bmc/waf/model/DynamicHttpResponseBody.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.waf.model; + +/** + * Allows returning dynamically generated HTTP response body based on the provided template. + * The template allows variable interpolation by specifying variable name between the '${' and '}' delimiters. + * Escape sequences using '\\' are supported to allow usage of '\\\\' and '\\${' in the template to return '\\' and '\\${' in final response. + *

+ * The following variables are supported: + *

+ * http.request.id - the HTTP request ID. For example: "d5fa953f75ef417e4c8008ef9336d779". + *

+ * Example: + * { + * "type": "DYNAMIC", + * "template": "{\ + * \\"code\\": 403,\ + * \\"message\\":\\"Unauthorised\\",\ + * \\"incidentId\\": \\"${http.request.id}\\"\ + * }" + * } + *

+ * Example with escape sequence: + * { + * "type": "DYNAMIC", + * "template": "\\\\${Returned as plain text}" + * } + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20210930") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DynamicHttpResponseBody.Builder.class +) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "type" +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class DynamicHttpResponseBody extends HttpResponseBody { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * Dynamic response body + **/ + @com.fasterxml.jackson.annotation.JsonProperty("template") + private String template; + + /** + * Dynamic response body + * @param template the value to set + * @return this builder + **/ + public Builder template(String template) { + this.template = template; + this.__explicitlySet__.add("template"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DynamicHttpResponseBody build() { + DynamicHttpResponseBody model = new DynamicHttpResponseBody(this.template); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DynamicHttpResponseBody model) { + if (model.wasPropertyExplicitlySet("template")) { + this.template(model.getTemplate()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DynamicHttpResponseBody(String template) { + super(); + this.template = template; + } + + /** + * Dynamic response body + **/ + @com.fasterxml.jackson.annotation.JsonProperty("template") + private final String template; + + /** + * Dynamic response body + * @return the value + **/ + public String getTemplate() { + return template; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DynamicHttpResponseBody("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", template=").append(String.valueOf(this.template)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DynamicHttpResponseBody)) { + return false; + } + + DynamicHttpResponseBody other = (DynamicHttpResponseBody) o; + return java.util.Objects.equals(this.template, other.template) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.template == null ? 43 : this.template.hashCode()); + return result; + } +} diff --git a/bmc-waf/src/main/java/com/oracle/bmc/waf/model/HttpResponseBody.java b/bmc-waf/src/main/java/com/oracle/bmc/waf/model/HttpResponseBody.java index 0af043aeed2..6e208cec800 100644 --- a/bmc-waf/src/main/java/com/oracle/bmc/waf/model/HttpResponseBody.java +++ b/bmc-waf/src/main/java/com/oracle/bmc/waf/model/HttpResponseBody.java @@ -22,6 +22,10 @@ defaultImpl = HttpResponseBody.class ) @com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DynamicHttpResponseBody.class, + name = "DYNAMIC" + ), @com.fasterxml.jackson.annotation.JsonSubTypes.Type( value = StaticTextHttpResponseBody.class, name = "STATIC_TEXT" @@ -79,6 +83,7 @@ public int hashCode() { **/ public enum Type { StaticText("STATIC_TEXT"), + Dynamic("DYNAMIC"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-workrequests/pom.xml b/bmc-workrequests/pom.xml index 2413e6eae02..eb65f7c86a7 100644 --- a/bmc-workrequests/pom.xml +++ b/bmc-workrequests/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 ../pom.xml oci-java-sdk-workrequests @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 2.73.0 + 2.79.0 diff --git a/bmc-zpr/pom.xml b/bmc-zpr/pom.xml new file mode 100644 index 00000000000..f197cfa4ea0 --- /dev/null +++ b/bmc-zpr/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + com.oracle.oci.sdk + oci-java-sdk + 2.79.0 + ../pom.xml + + oci-java-sdk-zpr + Oracle Cloud Infrastructure SDK - Zpr + This project contains the SDK used for Oracle Cloud Infrastructure Zpr + https://docs.cloud.oracle.com/Content/API/SDKDocs/javasdk.htm + + + com.oracle.oci.sdk + oci-java-sdk-common + 2.79.0 + + + \ No newline at end of file diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/SdkClientsMetadata.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/SdkClientsMetadata.java new file mode 100644 index 00000000000..b8c559dd3bf --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/SdkClientsMetadata.java @@ -0,0 +1,11 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr; + +import com.oracle.bmc.SdkClients; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@SdkClients({ZprAsyncClient.class, ZprClient.class}) +public final class SdkClientsMetadata {} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/Zpr.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/Zpr.java new file mode 100644 index 00000000000..c805761ab82 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/Zpr.java @@ -0,0 +1,276 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr; + +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; + +/** + * Use the Zero Trust Packet Routing Control Plane API to manage ZPR configuration and policy. See the [Zero Trust Packet Routing](https://docs.cloud.oracle.com/iaas/Content/zero-trust-packet-routing/home.htm) documentation for more information. + * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public interface Zpr extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the service. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this Region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Initiates the process to onboard ZPR + * in a root compartment (the root compartment is the tenancy). It creates an object of ZPR configuration as part of onboarding. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateConfiguration API. + */ + CreateConfigurationResponse createConfiguration(CreateConfigurationRequest request); + + /** + * Creates a ZprPolicy. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use CreateZprPolicy API. + */ + CreateZprPolicyResponse createZprPolicy(CreateZprPolicyRequest request); + + /** + * Deletes a ZprPolicy. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use DeleteZprPolicy API. + */ + DeleteZprPolicyResponse deleteZprPolicy(DeleteZprPolicyRequest request); + + /** + * Retrieves the ZPR configuration details for the root compartment (the root compartment is the tenancy). + * Returns ZPR configuration for root compartment (the root compartment is the tenancy). + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetConfiguration API. + */ + GetConfigurationResponse getConfiguration(GetConfigurationRequest request); + + /** + * Gets the details of a work request. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetZprConfigurationWorkRequest API. + */ + GetZprConfigurationWorkRequestResponse getZprConfigurationWorkRequest( + GetZprConfigurationWorkRequestRequest request); + + /** + * Gets information about a ZprPolicy. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetZprPolicy API. + */ + GetZprPolicyResponse getZprPolicy(GetZprPolicyRequest request); + + /** + * Gets the details of a work request. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use GetZprPolicyWorkRequest API. + */ + GetZprPolicyWorkRequestResponse getZprPolicyWorkRequest(GetZprPolicyWorkRequestRequest request); + + /** + * Lists the errors for a work request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListZprConfigurationWorkRequestErrors API. + */ + ListZprConfigurationWorkRequestErrorsResponse listZprConfigurationWorkRequestErrors( + ListZprConfigurationWorkRequestErrorsRequest request); + + /** + * Lists the logs for a work request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListZprConfigurationWorkRequestLogs API. + */ + ListZprConfigurationWorkRequestLogsResponse listZprConfigurationWorkRequestLogs( + ListZprConfigurationWorkRequestLogsRequest request); + + /** + * Lists the work requests in a compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListZprConfigurationWorkRequests API. + */ + ListZprConfigurationWorkRequestsResponse listZprConfigurationWorkRequests( + ListZprConfigurationWorkRequestsRequest request); + + /** + * Gets a list of ZprPolicies. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListZprPolicies API. + */ + ListZprPoliciesResponse listZprPolicies(ListZprPoliciesRequest request); + + /** + * Lists the errors for a work request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListZprPolicyWorkRequestErrors API. + */ + ListZprPolicyWorkRequestErrorsResponse listZprPolicyWorkRequestErrors( + ListZprPolicyWorkRequestErrorsRequest request); + + /** + * Lists the logs for a work request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListZprPolicyWorkRequestLogs API. + */ + ListZprPolicyWorkRequestLogsResponse listZprPolicyWorkRequestLogs( + ListZprPolicyWorkRequestLogsRequest request); + + /** + * Lists the work requests in a compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use ListZprPolicyWorkRequests API. + */ + ListZprPolicyWorkRequestsResponse listZprPolicyWorkRequests( + ListZprPolicyWorkRequestsRequest request); + + /** + * Updates a specific ZprPolicy. If updating on statements, the entire list of policy statements is required, which will replace the existing policy statements associated with the policy ID. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + * This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. + * The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + * + * Example: Click here to see how to use UpdateZprPolicy API. + */ + UpdateZprPolicyResponse updateZprPolicy(UpdateZprPolicyRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + ZprWaiters getWaiters(); + + /** + * Gets the pre-configured paginators available for list operations in this service which may return multiple + * pages of data. These paginators provide an {@link java.lang.Iterable} interface so that service responses, or + * resources/records, can be iterated through without having to manually deal with pagination and page tokens. + * + * @return The service paginators. + */ + ZprPaginators getPaginators(); +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprAsync.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprAsync.java new file mode 100644 index 00000000000..69f4b87b905 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprAsync.java @@ -0,0 +1,317 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr; + +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; + +/** + * Use the Zero Trust Packet Routing Control Plane API to manage ZPR configuration and policy. See the [Zero Trust Packet Routing](https://docs.cloud.oracle.com/iaas/Content/zero-trust-packet-routing/home.htm) documentation for more information. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public interface ZprAsync extends AutoCloseable { + + /** + * Rebuilds the client from scratch. + * Useful to refresh certificates. + */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the serice. + */ + void setEndpoint(String endpoint); + + /** + * Gets the set endpoint for REST call (ex, https://www.example.com) + */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. + * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false" + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Initiates the process to onboard ZPR + * in a root compartment (the root compartment is the tenancy). It creates an object of ZPR configuration as part of onboarding. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createConfiguration( + CreateConfigurationRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateConfigurationRequest, CreateConfigurationResponse> + handler); + + /** + * Creates a ZprPolicy. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createZprPolicy( + CreateZprPolicyRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Deletes a ZprPolicy. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteZprPolicy( + DeleteZprPolicyRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Retrieves the ZPR configuration details for the root compartment (the root compartment is the tenancy). + * Returns ZPR configuration for root compartment (the root compartment is the tenancy). + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getConfiguration( + GetConfigurationRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Gets the details of a work request. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + getZprConfigurationWorkRequest( + GetZprConfigurationWorkRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetZprConfigurationWorkRequestRequest, + GetZprConfigurationWorkRequestResponse> + handler); + + /** + * Gets information about a ZprPolicy. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getZprPolicy( + GetZprPolicyRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Gets the details of a work request. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getZprPolicyWorkRequest( + GetZprPolicyWorkRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetZprPolicyWorkRequestRequest, GetZprPolicyWorkRequestResponse> + handler); + + /** + * Lists the errors for a work request. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listZprConfigurationWorkRequestErrors( + ListZprConfigurationWorkRequestErrorsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListZprConfigurationWorkRequestErrorsRequest, + ListZprConfigurationWorkRequestErrorsResponse> + handler); + + /** + * Lists the logs for a work request. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listZprConfigurationWorkRequestLogs( + ListZprConfigurationWorkRequestLogsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListZprConfigurationWorkRequestLogsRequest, + ListZprConfigurationWorkRequestLogsResponse> + handler); + + /** + * Lists the work requests in a compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listZprConfigurationWorkRequests( + ListZprConfigurationWorkRequestsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListZprConfigurationWorkRequestsRequest, + ListZprConfigurationWorkRequestsResponse> + handler); + + /** + * Gets a list of ZprPolicies. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listZprPolicies( + ListZprPoliciesRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Lists the errors for a work request. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listZprPolicyWorkRequestErrors( + ListZprPolicyWorkRequestErrorsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListZprPolicyWorkRequestErrorsRequest, + ListZprPolicyWorkRequestErrorsResponse> + handler); + + /** + * Lists the logs for a work request. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listZprPolicyWorkRequestLogs( + ListZprPolicyWorkRequestLogsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListZprPolicyWorkRequestLogsRequest, + ListZprPolicyWorkRequestLogsResponse> + handler); + + /** + * Lists the work requests in a compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listZprPolicyWorkRequests( + ListZprPolicyWorkRequestsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListZprPolicyWorkRequestsRequest, ListZprPolicyWorkRequestsResponse> + handler); + + /** + * Updates a specific ZprPolicy. If updating on statements, the entire list of policy statements is required, which will replace the existing policy statements associated with the policy ID. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateZprPolicy( + UpdateZprPolicyRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprAsyncClient.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprAsyncClient.java new file mode 100644 index 00000000000..2b8910865c5 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprAsyncClient.java @@ -0,0 +1,1175 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr; + +import com.oracle.bmc.zpr.internal.http.*; +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; + +/** + * Async client implementation for Zpr service.
+ * There are two ways to use async client: + * 1. Use AsyncHandler: using AsyncHandler, if the response to the call is an {@link java.io.InputStream}, like + * getObject Api in object storage service, developers need to process the stream in AsyncHandler, and not anywhere else, + * because the stream will be closed right after the AsyncHandler is invoked.
+ * 2. Use Java Future: using Java Future, developers need to close the stream after they are done with the Java Future.
+ * Accessing the result should be done in a mutually exclusive manner, either through the Future or the AsyncHandler, + * but not both. If the Future is used, the caller should pass in null as the AsyncHandler. If the AsyncHandler + * is used, it is still safe to use the Future to determine whether or not the request was completed via + * Future.isDone/isCancelled.
+ * Please refer to https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ZprAsyncClient implements ZprAsync { + /** + * Service instance for Zpr. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("ZPR") + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://zpr.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ZprAsyncClient.class); + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public ZprAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public ZprAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public ZprAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public ZprAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public ZprAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public ZprAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public ZprAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + public ZprAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.clientConfigurationToUse = configuration; + + this.refreshClient(); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder { + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public ZprAsyncClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new ZprAsyncClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint); + } + } + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public java.util.concurrent.Future createConfiguration( + CreateConfigurationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateConfigurationRequest, CreateConfigurationResponse> + handler) { + LOG.trace("Called async createConfiguration"); + final CreateConfigurationRequest interceptedRequest = + CreateConfigurationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateConfigurationConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "CreateConfiguration", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + CreateConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + CreateConfigurationRequest, CreateConfigurationResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateConfigurationRequest, CreateConfigurationResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateConfigurationDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateConfigurationRequest, CreateConfigurationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future createZprPolicy( + CreateZprPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateZprPolicyRequest, CreateZprPolicyResponse> + handler) { + LOG.trace("Called async createZprPolicy"); + final CreateZprPolicyRequest interceptedRequest = + CreateZprPolicyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateZprPolicyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "CreateZprPolicy", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + CreateZprPolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + CreateZprPolicyRequest, CreateZprPolicyResponse>, + java.util.concurrent.Future> + futureSupplier = + client.postFutureSupplier( + interceptedRequest, + interceptedRequest.getCreateZprPolicyDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + CreateZprPolicyRequest, CreateZprPolicyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future deleteZprPolicy( + DeleteZprPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteZprPolicyRequest, DeleteZprPolicyResponse> + handler) { + LOG.trace("Called async deleteZprPolicy"); + final DeleteZprPolicyRequest interceptedRequest = + DeleteZprPolicyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteZprPolicyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "DeleteZprPolicy", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + DeleteZprPolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + DeleteZprPolicyRequest, DeleteZprPolicyResponse>, + java.util.concurrent.Future> + futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + DeleteZprPolicyRequest, DeleteZprPolicyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getConfiguration( + GetConfigurationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetConfigurationRequest, GetConfigurationResponse> + handler) { + LOG.trace("Called async getConfiguration"); + final GetConfigurationRequest interceptedRequest = + GetConfigurationConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetConfigurationConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "GetConfiguration", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + GetConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetConfigurationRequest, GetConfigurationResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetConfigurationRequest, GetConfigurationResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + getZprConfigurationWorkRequest( + GetZprConfigurationWorkRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetZprConfigurationWorkRequestRequest, + GetZprConfigurationWorkRequestResponse> + handler) { + LOG.trace("Called async getZprConfigurationWorkRequest"); + final GetZprConfigurationWorkRequestRequest interceptedRequest = + GetZprConfigurationWorkRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetZprConfigurationWorkRequestConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "GetZprConfigurationWorkRequest", ib.getRequestUri().toString(), ""); + final java.util.function.Function< + javax.ws.rs.core.Response, GetZprConfigurationWorkRequestResponse> + transformer = + GetZprConfigurationWorkRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetZprConfigurationWorkRequestRequest, + GetZprConfigurationWorkRequestResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetZprConfigurationWorkRequestRequest, + GetZprConfigurationWorkRequestResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetZprConfigurationWorkRequestRequest, GetZprConfigurationWorkRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getZprPolicy( + GetZprPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getZprPolicy"); + final GetZprPolicyRequest interceptedRequest = + GetZprPolicyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetZprPolicyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "GetZprPolicy", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + GetZprPolicyConverter.fromResponse(java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetZprPolicyRequest, GetZprPolicyResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetZprPolicyRequest, GetZprPolicyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future getZprPolicyWorkRequest( + GetZprPolicyWorkRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetZprPolicyWorkRequestRequest, GetZprPolicyWorkRequestResponse> + handler) { + LOG.trace("Called async getZprPolicyWorkRequest"); + final GetZprPolicyWorkRequestRequest interceptedRequest = + GetZprPolicyWorkRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetZprPolicyWorkRequestConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "GetZprPolicyWorkRequest", ib.getRequestUri().toString(), ""); + final java.util.function.Function< + javax.ws.rs.core.Response, GetZprPolicyWorkRequestResponse> + transformer = + GetZprPolicyWorkRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + GetZprPolicyWorkRequestRequest, GetZprPolicyWorkRequestResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + GetZprPolicyWorkRequestRequest, GetZprPolicyWorkRequestResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + GetZprPolicyWorkRequestRequest, GetZprPolicyWorkRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listZprConfigurationWorkRequestErrors( + ListZprConfigurationWorkRequestErrorsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListZprConfigurationWorkRequestErrorsRequest, + ListZprConfigurationWorkRequestErrorsResponse> + handler) { + LOG.trace("Called async listZprConfigurationWorkRequestErrors"); + final ListZprConfigurationWorkRequestErrorsRequest interceptedRequest = + ListZprConfigurationWorkRequestErrorsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListZprConfigurationWorkRequestErrorsConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", + "ListZprConfigurationWorkRequestErrors", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ListZprConfigurationWorkRequestErrorsResponse> + transformer = + ListZprConfigurationWorkRequestErrorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListZprConfigurationWorkRequestErrorsRequest, + ListZprConfigurationWorkRequestErrorsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListZprConfigurationWorkRequestErrorsRequest, + ListZprConfigurationWorkRequestErrorsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListZprConfigurationWorkRequestErrorsRequest, + ListZprConfigurationWorkRequestErrorsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listZprConfigurationWorkRequestLogs( + ListZprConfigurationWorkRequestLogsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListZprConfigurationWorkRequestLogsRequest, + ListZprConfigurationWorkRequestLogsResponse> + handler) { + LOG.trace("Called async listZprConfigurationWorkRequestLogs"); + final ListZprConfigurationWorkRequestLogsRequest interceptedRequest = + ListZprConfigurationWorkRequestLogsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListZprConfigurationWorkRequestLogsConverter.fromRequest( + client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", + "ListZprConfigurationWorkRequestLogs", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ListZprConfigurationWorkRequestLogsResponse> + transformer = + ListZprConfigurationWorkRequestLogsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListZprConfigurationWorkRequestLogsRequest, + ListZprConfigurationWorkRequestLogsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListZprConfigurationWorkRequestLogsRequest, + ListZprConfigurationWorkRequestLogsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListZprConfigurationWorkRequestLogsRequest, + ListZprConfigurationWorkRequestLogsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listZprConfigurationWorkRequests( + ListZprConfigurationWorkRequestsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListZprConfigurationWorkRequestsRequest, + ListZprConfigurationWorkRequestsResponse> + handler) { + LOG.trace("Called async listZprConfigurationWorkRequests"); + final ListZprConfigurationWorkRequestsRequest interceptedRequest = + ListZprConfigurationWorkRequestsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListZprConfigurationWorkRequestsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", + "ListZprConfigurationWorkRequests", + ib.getRequestUri().toString(), + ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ListZprConfigurationWorkRequestsResponse> + transformer = + ListZprConfigurationWorkRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListZprConfigurationWorkRequestsRequest, + ListZprConfigurationWorkRequestsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListZprConfigurationWorkRequestsRequest, + ListZprConfigurationWorkRequestsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListZprConfigurationWorkRequestsRequest, + ListZprConfigurationWorkRequestsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listZprPolicies( + ListZprPoliciesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListZprPoliciesRequest, ListZprPoliciesResponse> + handler) { + LOG.trace("Called async listZprPolicies"); + final ListZprPoliciesRequest interceptedRequest = + ListZprPoliciesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListZprPoliciesConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "ListZprPolicies", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + ListZprPoliciesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListZprPoliciesRequest, ListZprPoliciesResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListZprPoliciesRequest, ListZprPoliciesResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listZprPolicyWorkRequestErrors( + ListZprPolicyWorkRequestErrorsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListZprPolicyWorkRequestErrorsRequest, + ListZprPolicyWorkRequestErrorsResponse> + handler) { + LOG.trace("Called async listZprPolicyWorkRequestErrors"); + final ListZprPolicyWorkRequestErrorsRequest interceptedRequest = + ListZprPolicyWorkRequestErrorsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListZprPolicyWorkRequestErrorsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "ListZprPolicyWorkRequestErrors", ib.getRequestUri().toString(), ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ListZprPolicyWorkRequestErrorsResponse> + transformer = + ListZprPolicyWorkRequestErrorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListZprPolicyWorkRequestErrorsRequest, + ListZprPolicyWorkRequestErrorsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListZprPolicyWorkRequestErrorsRequest, + ListZprPolicyWorkRequestErrorsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListZprPolicyWorkRequestErrorsRequest, ListZprPolicyWorkRequestErrorsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future + listZprPolicyWorkRequestLogs( + ListZprPolicyWorkRequestLogsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListZprPolicyWorkRequestLogsRequest, + ListZprPolicyWorkRequestLogsResponse> + handler) { + LOG.trace("Called async listZprPolicyWorkRequestLogs"); + final ListZprPolicyWorkRequestLogsRequest interceptedRequest = + ListZprPolicyWorkRequestLogsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListZprPolicyWorkRequestLogsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "ListZprPolicyWorkRequestLogs", ib.getRequestUri().toString(), ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ListZprPolicyWorkRequestLogsResponse> + transformer = + ListZprPolicyWorkRequestLogsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListZprPolicyWorkRequestLogsRequest, ListZprPolicyWorkRequestLogsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListZprPolicyWorkRequestLogsRequest, + ListZprPolicyWorkRequestLogsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListZprPolicyWorkRequestLogsRequest, ListZprPolicyWorkRequestLogsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future listZprPolicyWorkRequests( + ListZprPolicyWorkRequestsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListZprPolicyWorkRequestsRequest, ListZprPolicyWorkRequestsResponse> + handler) { + LOG.trace("Called async listZprPolicyWorkRequests"); + final ListZprPolicyWorkRequestsRequest interceptedRequest = + ListZprPolicyWorkRequestsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListZprPolicyWorkRequestsConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "ListZprPolicyWorkRequests", ib.getRequestUri().toString(), ""); + final java.util.function.Function< + javax.ws.rs.core.Response, ListZprPolicyWorkRequestsResponse> + transformer = + ListZprPolicyWorkRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler< + ListZprPolicyWorkRequestsRequest, ListZprPolicyWorkRequestsResponse> + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + ListZprPolicyWorkRequestsRequest, + ListZprPolicyWorkRequestsResponse>, + java.util.concurrent.Future> + futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + ListZprPolicyWorkRequestsRequest, ListZprPolicyWorkRequestsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } + + @Override + public java.util.concurrent.Future updateZprPolicy( + UpdateZprPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateZprPolicyRequest, UpdateZprPolicyResponse> + handler) { + LOG.trace("Called async updateZprPolicy"); + final UpdateZprPolicyRequest interceptedRequest = + UpdateZprPolicyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateZprPolicyConverter.fromRequest(client, interceptedRequest); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "UpdateZprPolicy", ib.getRequestUri().toString(), ""); + final java.util.function.Function + transformer = + UpdateZprPolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + + java.util.function.Function< + com.oracle.bmc.responses.AsyncHandler< + UpdateZprPolicyRequest, UpdateZprPolicyResponse>, + java.util.concurrent.Future> + futureSupplier = + client.putFutureSupplier( + interceptedRequest, + interceptedRequest.getUpdateZprPolicyDetails(), + ib, + transformer); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< + UpdateZprPolicyRequest, UpdateZprPolicyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handlerToUse, + futureSupplier) { + @Override + protected void beforeRetryAction() {} + }; + } else { + return futureSupplier.apply(handlerToUse); + } + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprClient.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprClient.java new file mode 100644 index 00000000000..232cad08095 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprClient.java @@ -0,0 +1,1106 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr; + +import com.oracle.bmc.zpr.internal.http.*; +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; +import com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration; +import com.oracle.bmc.util.CircuitBreakerUtils; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ZprClient implements Zpr { + /** + * Service instance for Zpr. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("ZPR") + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://zpr.{region}.oci.{secondLevelDomain}") + .build(); + // attempt twice if it's instance principals, immediately failures will try to refresh the token + private static final int MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS = 2; + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(ZprClient.class); + + com.oracle.bmc.http.internal.RestClient getClient() { + return client; + } + + private final ZprWaiters waiters; + + private final ZprPaginators paginators; + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; + private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy + apacheConnectionClosingStrategy; + private final com.oracle.bmc.http.internal.RestClientFactory restClientFactory; + private final com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory; + private final java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories; + private final boolean isNonBufferingApacheClient; + private final com.oracle.bmc.ClientConfiguration clientConfigurationToUse; + private final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + circuitBreakerConfiguration; + private String regionId; + + /** + * Used to synchronize any updates on the `this.client` object. + */ + private final Object clientUpdate = new Object(); + + /** + * Stores the actual client object used to make the API calls. + * Note: This object can get refreshed periodically, hence it's important to keep any updates synchronized. + * For any writes to the object, please synchronize on `this.clientUpdate`. + */ + private volatile com.oracle.bmc.http.internal.RestClient client; + + /** + * Keeps track of the last endpoint that was assigned to the client, which in turn can be used when the client is refreshed. + * Note: Always synchronize on `this.clientUpdate` when reading/writing this field. + */ + private volatile String overrideEndpoint = null; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public ZprClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public ZprClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public ZprClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public ZprClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public ZprClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public ZprClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public ZprClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + */ + public ZprClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * Use the {@link Builder} to get access to all these parameters. + * + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + * @param executorService ExecutorService used by the client, or null to use the default configured ThreadPoolExecutor + * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} + */ + protected ZprClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService, + com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + java.util.List authenticationDetailsConfigurators = + new java.util.ArrayList<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { + authenticationDetailsConfigurators.addAll( + ((com.oracle.bmc.auth.ProvidesClientConfigurators) + this.authenticationDetailsProvider) + .getClientConfigurators()); + } + java.util.List allConfigurators = + new java.util.ArrayList<>(additionalClientConfigurators); + allConfigurators.addAll(authenticationDetailsConfigurators); + this.restClientFactory = + restClientFactoryBuilder + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(allConfigurators) + .build(); + this.isNonBufferingApacheClient = + com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( + this.restClientFactory.getClientConfigurator()); + this.apacheConnectionClosingStrategy = + com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( + restClientFactory.getClientConfigurator()); + + this.clientConfigurationToUse = + (configuration != null) + ? configuration + : com.oracle.bmc.ClientConfiguration.builder().build(); + this.defaultRequestSignerFactory = defaultRequestSignerFactory; + this.signingStrategyRequestSignerFactories = signingStrategyRequestSignerFactories; + this.retryConfiguration = clientConfigurationToUse.getRetryConfiguration(); + final com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration + userCircuitBreakerConfiguration = + CircuitBreakerUtils.getUserDefinedCircuitBreakerConfiguration( + configuration); + if (userCircuitBreakerConfiguration == null) { + this.circuitBreakerConfiguration = + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION; + } else { + this.circuitBreakerConfiguration = userCircuitBreakerConfiguration; + } + + this.refreshClient(); + + if (executorService == null) { + // up to 50 (core) threads, time out after 60s idle, all daemon + java.util.concurrent.ThreadPoolExecutor threadPoolExecutor = + new java.util.concurrent.ThreadPoolExecutor( + 50, + 50, + 60L, + java.util.concurrent.TimeUnit.SECONDS, + new java.util.concurrent.LinkedBlockingQueue(), + com.oracle.bmc.internal.ClientThreadFactory.builder() + .isDaemon(true) + .nameFormat("Zpr-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new ZprWaiters(executorService, this); + + this.paginators = new ZprPaginators(this); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.regionId = provider.getRegion().getRegionId(); + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder { + private java.util.concurrent.ExecutorService executorService; + + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Set the ExecutorService for the client to be created. + * @param executorService executorService + * @return this builder + */ + public Builder executorService(java.util.concurrent.ExecutorService executorService) { + this.executorService = executorService; + return this; + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public ZprClient build( + @javax.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + if (authenticationDetailsProvider == null) { + throw new NullPointerException( + "authenticationDetailsProvider is marked non-null but is null"); + } + return new ZprClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint, + executorService, + restClientFactoryBuilder); + } + } + + @Override + public void refreshClient() { + LOG.info("Refreshing client '{}'.", this.client != null ? this.client.getClass() : null); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + this.defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + this.signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, this.authenticationDetailsProvider)); + } + } + + com.oracle.bmc.http.internal.RestClient refreshedClient = + this.restClientFactory.create( + defaultRequestSigner, + requestSigners, + this.clientConfigurationToUse, + this.isNonBufferingApacheClient, + null, + this.circuitBreakerConfiguration); + + synchronized (clientUpdate) { + if (this.overrideEndpoint != null) { + refreshedClient.setEndpoint(this.overrideEndpoint); + } + + this.client = refreshedClient; + } + + LOG.info("Refreshed client '{}'.", this.client != null ? this.client.getClass() : null); + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + + synchronized (clientUpdate) { + this.overrideEndpoint = endpoint; + client.setEndpoint(endpoint); + } + } + + @Override + public String getEndpoint() { + String endpoint = null; + java.net.URI uri = client.getBaseTarget().getUri(); + if (uri != null) { + endpoint = uri.toString(); + } + return endpoint; + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + this.regionId = region.getRegionId(); + java.util.Optional endpoint = + com.oracle.bmc.internal.GuavaUtils.adaptFromGuava(region.getEndpoint(SERVICE)); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); + this.regionId = regionId; + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + /** + * This method should be used to enable or disable the use of realm-specific endpoint template. + * The default value is null. To enable the use of endpoint template defined for the realm in + * use, set the flag to true To disable the use of endpoint template defined for the realm in + * use, set the flag to false + * + * @param useOfRealmSpecificEndpointTemplateEnabled This flag can be set to true or false to + * enable or disable the use of realm-specific endpoint template respectively + */ + public synchronized void useRealmSpecificEndpointTemplate( + boolean useOfRealmSpecificEndpointTemplateEnabled) { + setEndpoint( + com.oracle.bmc.util.RealmSpecificEndpointTemplateUtils + .getRealmSpecificEndpointTemplate( + useOfRealmSpecificEndpointTemplateEnabled, this.regionId, SERVICE)); + } + + @Override + public void close() { + client.close(); + } + + @Override + public CreateConfigurationResponse createConfiguration(CreateConfigurationRequest request) { + LOG.trace("Called createConfiguration"); + final CreateConfigurationRequest interceptedRequest = + CreateConfigurationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateConfigurationConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "CreateConfiguration", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + CreateConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateConfigurationDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public CreateZprPolicyResponse createZprPolicy(CreateZprPolicyRequest request) { + LOG.trace("Called createZprPolicy"); + final CreateZprPolicyRequest interceptedRequest = + CreateZprPolicyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateZprPolicyConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "CreateZprPolicy", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + CreateZprPolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateZprPolicyDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public DeleteZprPolicyResponse deleteZprPolicy(DeleteZprPolicyRequest request) { + LOG.trace("Called deleteZprPolicy"); + final DeleteZprPolicyRequest interceptedRequest = + DeleteZprPolicyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteZprPolicyConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "DeleteZprPolicy", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + DeleteZprPolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetConfigurationResponse getConfiguration(GetConfigurationRequest request) { + LOG.trace("Called getConfiguration"); + final GetConfigurationRequest interceptedRequest = + GetConfigurationConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetConfigurationConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "GetConfiguration", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + GetConfigurationConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetZprConfigurationWorkRequestResponse getZprConfigurationWorkRequest( + GetZprConfigurationWorkRequestRequest request) { + LOG.trace("Called getZprConfigurationWorkRequest"); + final GetZprConfigurationWorkRequestRequest interceptedRequest = + GetZprConfigurationWorkRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetZprConfigurationWorkRequestConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "GetZprConfigurationWorkRequest", ib.getRequestUri().toString(), ""); + java.util.function.Function< + javax.ws.rs.core.Response, GetZprConfigurationWorkRequestResponse> + transformer = + GetZprConfigurationWorkRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetZprPolicyResponse getZprPolicy(GetZprPolicyRequest request) { + LOG.trace("Called getZprPolicy"); + final GetZprPolicyRequest interceptedRequest = + GetZprPolicyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetZprPolicyConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "GetZprPolicy", ib.getRequestUri().toString(), ""); + java.util.function.Function transformer = + GetZprPolicyConverter.fromResponse(java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public GetZprPolicyWorkRequestResponse getZprPolicyWorkRequest( + GetZprPolicyWorkRequestRequest request) { + LOG.trace("Called getZprPolicyWorkRequest"); + final GetZprPolicyWorkRequestRequest interceptedRequest = + GetZprPolicyWorkRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetZprPolicyWorkRequestConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "GetZprPolicyWorkRequest", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + GetZprPolicyWorkRequestConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListZprConfigurationWorkRequestErrorsResponse listZprConfigurationWorkRequestErrors( + ListZprConfigurationWorkRequestErrorsRequest request) { + LOG.trace("Called listZprConfigurationWorkRequestErrors"); + final ListZprConfigurationWorkRequestErrorsRequest interceptedRequest = + ListZprConfigurationWorkRequestErrorsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListZprConfigurationWorkRequestErrorsConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", + "ListZprConfigurationWorkRequestErrors", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, ListZprConfigurationWorkRequestErrorsResponse> + transformer = + ListZprConfigurationWorkRequestErrorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListZprConfigurationWorkRequestLogsResponse listZprConfigurationWorkRequestLogs( + ListZprConfigurationWorkRequestLogsRequest request) { + LOG.trace("Called listZprConfigurationWorkRequestLogs"); + final ListZprConfigurationWorkRequestLogsRequest interceptedRequest = + ListZprConfigurationWorkRequestLogsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListZprConfigurationWorkRequestLogsConverter.fromRequest( + client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", + "ListZprConfigurationWorkRequestLogs", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, ListZprConfigurationWorkRequestLogsResponse> + transformer = + ListZprConfigurationWorkRequestLogsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListZprConfigurationWorkRequestsResponse listZprConfigurationWorkRequests( + ListZprConfigurationWorkRequestsRequest request) { + LOG.trace("Called listZprConfigurationWorkRequests"); + final ListZprConfigurationWorkRequestsRequest interceptedRequest = + ListZprConfigurationWorkRequestsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListZprConfigurationWorkRequestsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", + "ListZprConfigurationWorkRequests", + ib.getRequestUri().toString(), + ""); + java.util.function.Function< + javax.ws.rs.core.Response, ListZprConfigurationWorkRequestsResponse> + transformer = + ListZprConfigurationWorkRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListZprPoliciesResponse listZprPolicies(ListZprPoliciesRequest request) { + LOG.trace("Called listZprPolicies"); + final ListZprPoliciesRequest interceptedRequest = + ListZprPoliciesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListZprPoliciesConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "ListZprPolicies", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + ListZprPoliciesConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListZprPolicyWorkRequestErrorsResponse listZprPolicyWorkRequestErrors( + ListZprPolicyWorkRequestErrorsRequest request) { + LOG.trace("Called listZprPolicyWorkRequestErrors"); + final ListZprPolicyWorkRequestErrorsRequest interceptedRequest = + ListZprPolicyWorkRequestErrorsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListZprPolicyWorkRequestErrorsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "ListZprPolicyWorkRequestErrors", ib.getRequestUri().toString(), ""); + java.util.function.Function< + javax.ws.rs.core.Response, ListZprPolicyWorkRequestErrorsResponse> + transformer = + ListZprPolicyWorkRequestErrorsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListZprPolicyWorkRequestLogsResponse listZprPolicyWorkRequestLogs( + ListZprPolicyWorkRequestLogsRequest request) { + LOG.trace("Called listZprPolicyWorkRequestLogs"); + final ListZprPolicyWorkRequestLogsRequest interceptedRequest = + ListZprPolicyWorkRequestLogsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListZprPolicyWorkRequestLogsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "ListZprPolicyWorkRequestLogs", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + ListZprPolicyWorkRequestLogsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListZprPolicyWorkRequestsResponse listZprPolicyWorkRequests( + ListZprPolicyWorkRequestsRequest request) { + LOG.trace("Called listZprPolicyWorkRequests"); + final ListZprPolicyWorkRequestsRequest interceptedRequest = + ListZprPolicyWorkRequestsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListZprPolicyWorkRequestsConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "ListZprPolicyWorkRequests", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + ListZprPolicyWorkRequestsConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateZprPolicyResponse updateZprPolicy(UpdateZprPolicyRequest request) { + LOG.trace("Called updateZprPolicy"); + final UpdateZprPolicyRequest interceptedRequest = + UpdateZprPolicyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateZprPolicyConverter.fromRequest(client, interceptedRequest); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration, true); + com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); + com.oracle.bmc.http.internal.RetryUtils.setClientRetriesHeader(ib, retrier); + com.oracle.bmc.ServiceDetails serviceDetails = + new com.oracle.bmc.ServiceDetails( + "Zpr", "UpdateZprPolicy", ib.getRequestUri().toString(), ""); + java.util.function.Function + transformer = + UpdateZprPolicyConverter.fromResponse( + java.util.Optional.of(serviceDetails)); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateZprPolicyDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ZprWaiters getWaiters() { + return waiters; + } + + @Override + public ZprPaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprPaginators.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprPaginators.java new file mode 100644 index 00000000000..d35a76adf28 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprPaginators.java @@ -0,0 +1,874 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr; + +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of Zpr where multiple pages of data may be fetched. + * Two styles of iteration are supported: + * + *

    + *
  • Iterating over the Response objects returned by the list operation. These are referred to as ResponseIterators, and the methods are suffixed with ResponseIterator. For example: listUsersResponseIterator
  • + *
  • Iterating over the resources/records being listed. These are referred to as RecordIterators, and the methods are suffixed with RecordIterator. For example: listUsersRecordIterator
  • + *
+ * + * These iterables abstract away the need to write code to manually handle pagination via looping and using the page tokens. + * They will automatically fetch more data from the service when required. + * + * As an example, if we were using the ListUsers operation in IdentityService, then the {@link java.lang.Iterable} returned by calling a + * ResponseIterator method would iterate over the ListUsersResponse objects returned by each ListUsers call, whereas the {@link java.lang.Iterable} + * returned by calling a RecordIterator method would iterate over the User records and we don't have to deal with ListUsersResponse objects at all. + * In either case, pagination will be automatically handled so we can iterate until there are no more responses or no more resources/records available. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ZprPaginators { + private final Zpr client; + + public ZprPaginators(Zpr client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the listZprConfigurationWorkRequestErrors operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listZprConfigurationWorkRequestErrorsResponseIterator( + final ListZprConfigurationWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListZprConfigurationWorkRequestErrorsRequest.Builder, + ListZprConfigurationWorkRequestErrorsRequest, + ListZprConfigurationWorkRequestErrorsResponse>( + new java.util.function.Supplier< + ListZprConfigurationWorkRequestErrorsRequest.Builder>() { + @Override + public ListZprConfigurationWorkRequestErrorsRequest.Builder get() { + return ListZprConfigurationWorkRequestErrorsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestErrorsResponse, String>() { + @Override + public String apply(ListZprConfigurationWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestErrorsRequest.Builder>, + ListZprConfigurationWorkRequestErrorsRequest>() { + @Override + public ListZprConfigurationWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestErrorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestErrorsRequest, + ListZprConfigurationWorkRequestErrorsResponse>() { + @Override + public ListZprConfigurationWorkRequestErrorsResponse apply( + ListZprConfigurationWorkRequestErrorsRequest request) { + return client.listZprConfigurationWorkRequestErrors(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.zpr.model.WorkRequestError} objects + * contained in responses from the listZprConfigurationWorkRequestErrors operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.zpr.model.WorkRequestError} objects + * contained in responses received from the service. + */ + public Iterable + listZprConfigurationWorkRequestErrorsRecordIterator( + final ListZprConfigurationWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListZprConfigurationWorkRequestErrorsRequest.Builder, + ListZprConfigurationWorkRequestErrorsRequest, + ListZprConfigurationWorkRequestErrorsResponse, + com.oracle.bmc.zpr.model.WorkRequestError>( + new java.util.function.Supplier< + ListZprConfigurationWorkRequestErrorsRequest.Builder>() { + @Override + public ListZprConfigurationWorkRequestErrorsRequest.Builder get() { + return ListZprConfigurationWorkRequestErrorsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestErrorsResponse, String>() { + @Override + public String apply(ListZprConfigurationWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestErrorsRequest.Builder>, + ListZprConfigurationWorkRequestErrorsRequest>() { + @Override + public ListZprConfigurationWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestErrorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestErrorsRequest, + ListZprConfigurationWorkRequestErrorsResponse>() { + @Override + public ListZprConfigurationWorkRequestErrorsResponse apply( + ListZprConfigurationWorkRequestErrorsRequest request) { + return client.listZprConfigurationWorkRequestErrors(request); + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestErrorsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListZprConfigurationWorkRequestErrorsResponse response) { + return response.getWorkRequestErrorCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listZprConfigurationWorkRequestLogs operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listZprConfigurationWorkRequestLogsResponseIterator( + final ListZprConfigurationWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListZprConfigurationWorkRequestLogsRequest.Builder, + ListZprConfigurationWorkRequestLogsRequest, + ListZprConfigurationWorkRequestLogsResponse>( + new java.util.function.Supplier< + ListZprConfigurationWorkRequestLogsRequest.Builder>() { + @Override + public ListZprConfigurationWorkRequestLogsRequest.Builder get() { + return ListZprConfigurationWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestLogsResponse, String>() { + @Override + public String apply(ListZprConfigurationWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestLogsRequest.Builder>, + ListZprConfigurationWorkRequestLogsRequest>() { + @Override + public ListZprConfigurationWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestLogsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestLogsRequest, + ListZprConfigurationWorkRequestLogsResponse>() { + @Override + public ListZprConfigurationWorkRequestLogsResponse apply( + ListZprConfigurationWorkRequestLogsRequest request) { + return client.listZprConfigurationWorkRequestLogs(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.zpr.model.WorkRequestLogEntry} objects + * contained in responses from the listZprConfigurationWorkRequestLogs operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.zpr.model.WorkRequestLogEntry} objects + * contained in responses received from the service. + */ + public Iterable + listZprConfigurationWorkRequestLogsRecordIterator( + final ListZprConfigurationWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListZprConfigurationWorkRequestLogsRequest.Builder, + ListZprConfigurationWorkRequestLogsRequest, + ListZprConfigurationWorkRequestLogsResponse, + com.oracle.bmc.zpr.model.WorkRequestLogEntry>( + new java.util.function.Supplier< + ListZprConfigurationWorkRequestLogsRequest.Builder>() { + @Override + public ListZprConfigurationWorkRequestLogsRequest.Builder get() { + return ListZprConfigurationWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestLogsResponse, String>() { + @Override + public String apply(ListZprConfigurationWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestLogsRequest.Builder>, + ListZprConfigurationWorkRequestLogsRequest>() { + @Override + public ListZprConfigurationWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestLogsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestLogsRequest, + ListZprConfigurationWorkRequestLogsResponse>() { + @Override + public ListZprConfigurationWorkRequestLogsResponse apply( + ListZprConfigurationWorkRequestLogsRequest request) { + return client.listZprConfigurationWorkRequestLogs(request); + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestLogsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListZprConfigurationWorkRequestLogsResponse response) { + return response.getWorkRequestLogEntryCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listZprConfigurationWorkRequests operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listZprConfigurationWorkRequestsResponseIterator( + final ListZprConfigurationWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListZprConfigurationWorkRequestsRequest.Builder, + ListZprConfigurationWorkRequestsRequest, ListZprConfigurationWorkRequestsResponse>( + new java.util.function.Supplier() { + @Override + public ListZprConfigurationWorkRequestsRequest.Builder get() { + return ListZprConfigurationWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestsResponse, String>() { + @Override + public String apply(ListZprConfigurationWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestsRequest.Builder>, + ListZprConfigurationWorkRequestsRequest>() { + @Override + public ListZprConfigurationWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestsRequest, + ListZprConfigurationWorkRequestsResponse>() { + @Override + public ListZprConfigurationWorkRequestsResponse apply( + ListZprConfigurationWorkRequestsRequest request) { + return client.listZprConfigurationWorkRequests(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.zpr.model.WorkRequestSummary} objects + * contained in responses from the listZprConfigurationWorkRequests operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.zpr.model.WorkRequestSummary} objects + * contained in responses received from the service. + */ + public Iterable + listZprConfigurationWorkRequestsRecordIterator( + final ListZprConfigurationWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListZprConfigurationWorkRequestsRequest.Builder, + ListZprConfigurationWorkRequestsRequest, ListZprConfigurationWorkRequestsResponse, + com.oracle.bmc.zpr.model.WorkRequestSummary>( + new java.util.function.Supplier() { + @Override + public ListZprConfigurationWorkRequestsRequest.Builder get() { + return ListZprConfigurationWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestsResponse, String>() { + @Override + public String apply(ListZprConfigurationWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestsRequest.Builder>, + ListZprConfigurationWorkRequestsRequest>() { + @Override + public ListZprConfigurationWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestsRequest, + ListZprConfigurationWorkRequestsResponse>() { + @Override + public ListZprConfigurationWorkRequestsResponse apply( + ListZprConfigurationWorkRequestsRequest request) { + return client.listZprConfigurationWorkRequests(request); + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListZprConfigurationWorkRequestsResponse response) { + return response.getWorkRequestSummaryCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listZprPolicies operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listZprPoliciesResponseIterator( + final ListZprPoliciesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListZprPoliciesRequest.Builder, ListZprPoliciesRequest, ListZprPoliciesResponse>( + new java.util.function.Supplier() { + @Override + public ListZprPoliciesRequest.Builder get() { + return ListZprPoliciesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListZprPoliciesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPoliciesRequest.Builder>, + ListZprPoliciesRequest>() { + @Override + public ListZprPoliciesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPoliciesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListZprPoliciesResponse apply(ListZprPoliciesRequest request) { + return client.listZprPolicies(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.zpr.model.ZprPolicySummary} objects + * contained in responses from the listZprPolicies operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.zpr.model.ZprPolicySummary} objects + * contained in responses received from the service. + */ + public Iterable listZprPoliciesRecordIterator( + final ListZprPoliciesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListZprPoliciesRequest.Builder, ListZprPoliciesRequest, ListZprPoliciesResponse, + com.oracle.bmc.zpr.model.ZprPolicySummary>( + new java.util.function.Supplier() { + @Override + public ListZprPoliciesRequest.Builder get() { + return ListZprPoliciesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListZprPoliciesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPoliciesRequest.Builder>, + ListZprPoliciesRequest>() { + @Override + public ListZprPoliciesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPoliciesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListZprPoliciesResponse apply(ListZprPoliciesRequest request) { + return client.listZprPolicies(request); + } + }, + new java.util.function.Function< + ListZprPoliciesResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListZprPoliciesResponse response) { + return response.getZprPolicyCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listZprPolicyWorkRequestErrors operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listZprPolicyWorkRequestErrorsResponseIterator( + final ListZprPolicyWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListZprPolicyWorkRequestErrorsRequest.Builder, + ListZprPolicyWorkRequestErrorsRequest, ListZprPolicyWorkRequestErrorsResponse>( + new java.util.function.Supplier() { + @Override + public ListZprPolicyWorkRequestErrorsRequest.Builder get() { + return ListZprPolicyWorkRequestErrorsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListZprPolicyWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestErrorsRequest.Builder>, + ListZprPolicyWorkRequestErrorsRequest>() { + @Override + public ListZprPolicyWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestErrorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprPolicyWorkRequestErrorsRequest, + ListZprPolicyWorkRequestErrorsResponse>() { + @Override + public ListZprPolicyWorkRequestErrorsResponse apply( + ListZprPolicyWorkRequestErrorsRequest request) { + return client.listZprPolicyWorkRequestErrors(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.zpr.model.WorkRequestError} objects + * contained in responses from the listZprPolicyWorkRequestErrors operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.zpr.model.WorkRequestError} objects + * contained in responses received from the service. + */ + public Iterable + listZprPolicyWorkRequestErrorsRecordIterator( + final ListZprPolicyWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListZprPolicyWorkRequestErrorsRequest.Builder, + ListZprPolicyWorkRequestErrorsRequest, ListZprPolicyWorkRequestErrorsResponse, + com.oracle.bmc.zpr.model.WorkRequestError>( + new java.util.function.Supplier() { + @Override + public ListZprPolicyWorkRequestErrorsRequest.Builder get() { + return ListZprPolicyWorkRequestErrorsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListZprPolicyWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestErrorsRequest.Builder>, + ListZprPolicyWorkRequestErrorsRequest>() { + @Override + public ListZprPolicyWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestErrorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprPolicyWorkRequestErrorsRequest, + ListZprPolicyWorkRequestErrorsResponse>() { + @Override + public ListZprPolicyWorkRequestErrorsResponse apply( + ListZprPolicyWorkRequestErrorsRequest request) { + return client.listZprPolicyWorkRequestErrors(request); + } + }, + new java.util.function.Function< + ListZprPolicyWorkRequestErrorsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListZprPolicyWorkRequestErrorsResponse response) { + return response.getWorkRequestErrorCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listZprPolicyWorkRequestLogs operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listZprPolicyWorkRequestLogsResponseIterator( + final ListZprPolicyWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListZprPolicyWorkRequestLogsRequest.Builder, ListZprPolicyWorkRequestLogsRequest, + ListZprPolicyWorkRequestLogsResponse>( + new java.util.function.Supplier() { + @Override + public ListZprPolicyWorkRequestLogsRequest.Builder get() { + return ListZprPolicyWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListZprPolicyWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestLogsRequest.Builder>, + ListZprPolicyWorkRequestLogsRequest>() { + @Override + public ListZprPolicyWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestLogsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprPolicyWorkRequestLogsRequest, + ListZprPolicyWorkRequestLogsResponse>() { + @Override + public ListZprPolicyWorkRequestLogsResponse apply( + ListZprPolicyWorkRequestLogsRequest request) { + return client.listZprPolicyWorkRequestLogs(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.zpr.model.WorkRequestLogEntry} objects + * contained in responses from the listZprPolicyWorkRequestLogs operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.zpr.model.WorkRequestLogEntry} objects + * contained in responses received from the service. + */ + public Iterable + listZprPolicyWorkRequestLogsRecordIterator( + final ListZprPolicyWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListZprPolicyWorkRequestLogsRequest.Builder, ListZprPolicyWorkRequestLogsRequest, + ListZprPolicyWorkRequestLogsResponse, com.oracle.bmc.zpr.model.WorkRequestLogEntry>( + new java.util.function.Supplier() { + @Override + public ListZprPolicyWorkRequestLogsRequest.Builder get() { + return ListZprPolicyWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListZprPolicyWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestLogsRequest.Builder>, + ListZprPolicyWorkRequestLogsRequest>() { + @Override + public ListZprPolicyWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestLogsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprPolicyWorkRequestLogsRequest, + ListZprPolicyWorkRequestLogsResponse>() { + @Override + public ListZprPolicyWorkRequestLogsResponse apply( + ListZprPolicyWorkRequestLogsRequest request) { + return client.listZprPolicyWorkRequestLogs(request); + } + }, + new java.util.function.Function< + ListZprPolicyWorkRequestLogsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListZprPolicyWorkRequestLogsResponse response) { + return response.getWorkRequestLogEntryCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listZprPolicyWorkRequests operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listZprPolicyWorkRequestsResponseIterator( + final ListZprPolicyWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListZprPolicyWorkRequestsRequest.Builder, ListZprPolicyWorkRequestsRequest, + ListZprPolicyWorkRequestsResponse>( + new java.util.function.Supplier() { + @Override + public ListZprPolicyWorkRequestsRequest.Builder get() { + return ListZprPolicyWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListZprPolicyWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestsRequest.Builder>, + ListZprPolicyWorkRequestsRequest>() { + @Override + public ListZprPolicyWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprPolicyWorkRequestsRequest, ListZprPolicyWorkRequestsResponse>() { + @Override + public ListZprPolicyWorkRequestsResponse apply( + ListZprPolicyWorkRequestsRequest request) { + return client.listZprPolicyWorkRequests(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.zpr.model.WorkRequestSummary} objects + * contained in responses from the listZprPolicyWorkRequests operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.zpr.model.WorkRequestSummary} objects + * contained in responses received from the service. + */ + public Iterable + listZprPolicyWorkRequestsRecordIterator( + final ListZprPolicyWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListZprPolicyWorkRequestsRequest.Builder, ListZprPolicyWorkRequestsRequest, + ListZprPolicyWorkRequestsResponse, com.oracle.bmc.zpr.model.WorkRequestSummary>( + new java.util.function.Supplier() { + @Override + public ListZprPolicyWorkRequestsRequest.Builder get() { + return ListZprPolicyWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListZprPolicyWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestsRequest.Builder>, + ListZprPolicyWorkRequestsRequest>() { + @Override + public ListZprPolicyWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprPolicyWorkRequestsRequest, ListZprPolicyWorkRequestsResponse>() { + @Override + public ListZprPolicyWorkRequestsResponse apply( + ListZprPolicyWorkRequestsRequest request) { + return client.listZprPolicyWorkRequests(request); + } + }, + new java.util.function.Function< + ListZprPolicyWorkRequestsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListZprPolicyWorkRequestsResponse response) { + return response.getWorkRequestSummaryCollection().getItems(); + } + }); + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprWaiters.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprWaiters.java new file mode 100644 index 00000000000..1c746cbd2fa --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprWaiters.java @@ -0,0 +1,225 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr; + +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of Zpr. + *

+ * The default configuration used is defined by {@link com.oracle.bmc.waiter.Waiters.Waiters#DEFAULT_POLLING_WAITER}. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ZprWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final Zpr client; + + public ZprWaiters(java.util.concurrent.ExecutorService executorService, Zpr client) { + this.executorService = executorService; + this.client = client; + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forConfiguration( + GetConfigurationRequest request, + com.oracle.bmc.zpr.model.Configuration.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forConfiguration( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forConfiguration( + GetConfigurationRequest request, + com.oracle.bmc.zpr.model.Configuration.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forConfiguration( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forConfiguration( + GetConfigurationRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.zpr.model.Configuration.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forConfiguration( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for Configuration. + private com.oracle.bmc.waiter.Waiter + forConfiguration( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetConfigurationRequest request, + final com.oracle.bmc.zpr.model.Configuration.LifecycleState... targetStates) { + final java.util.Set targetStatesSet = + new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetConfigurationRequest, GetConfigurationResponse>() { + @Override + public GetConfigurationResponse apply(GetConfigurationRequest request) { + return client.getConfiguration(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetConfigurationResponse response) { + return targetStatesSet.contains( + response.getConfiguration().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.zpr.model.Configuration.LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forZprPolicy( + GetZprPolicyRequest request, + com.oracle.bmc.zpr.model.ZprPolicy.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forZprPolicy( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forZprPolicy( + GetZprPolicyRequest request, + com.oracle.bmc.zpr.model.ZprPolicy.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forZprPolicy( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forZprPolicy( + GetZprPolicyRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.zpr.model.ZprPolicy.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forZprPolicy( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for ZprPolicy. + private com.oracle.bmc.waiter.Waiter forZprPolicy( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetZprPolicyRequest request, + final com.oracle.bmc.zpr.model.ZprPolicy.LifecycleState... targetStates) { + final java.util.Set targetStatesSet = + new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetZprPolicyRequest, GetZprPolicyResponse>() { + @Override + public GetZprPolicyResponse apply(GetZprPolicyRequest request) { + return client.getZprPolicy(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetZprPolicyResponse response) { + return targetStatesSet.contains( + response.getZprPolicy().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.zpr.model.ZprPolicy.LifecycleState.Deleted)), + request); + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/CreateConfigurationConverter.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/CreateConfigurationConverter.java new file mode 100644 index 00000000000..bb0e7b554ee --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/CreateConfigurationConverter.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.zpr.model.*; +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class CreateConfigurationConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateConfigurationConverter.class); + + public static com.oracle.bmc.zpr.requests.CreateConfigurationRequest interceptRequest( + com.oracle.bmc.zpr.requests.CreateConfigurationRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.zpr.requests.CreateConfigurationRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateConfigurationDetails(), "createConfigurationDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240301").path("configuration"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcDryRun() != null) { + ib.header("opc-dry-run", request.getOpcDryRun()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.CreateConfigurationResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.CreateConfigurationResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.CreateConfigurationResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.CreateConfigurationResponse>() { + @Override + public com.oracle.bmc.zpr.responses.CreateConfigurationResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.zpr.responses.CreateConfigurationResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.zpr.responses.CreateConfigurationResponse.Builder + builder = + com.oracle.bmc.zpr.responses + .CreateConfigurationResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.zpr.responses.CreateConfigurationResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/CreateZprPolicyConverter.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/CreateZprPolicyConverter.java new file mode 100644 index 00000000000..c115764b9bd --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/CreateZprPolicyConverter.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.zpr.model.*; +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class CreateZprPolicyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(CreateZprPolicyConverter.class); + + public static com.oracle.bmc.zpr.requests.CreateZprPolicyRequest interceptRequest( + com.oracle.bmc.zpr.requests.CreateZprPolicyRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.zpr.requests.CreateZprPolicyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCreateZprPolicyDetails(), "createZprPolicyDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240301").path("zprPolicies"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcDryRun() != null) { + ib.header("opc-dry-run", request.getOpcDryRun()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.zpr.responses.CreateZprPolicyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.zpr.responses.CreateZprPolicyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.CreateZprPolicyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.CreateZprPolicyResponse>() { + @Override + public com.oracle.bmc.zpr.responses.CreateZprPolicyResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.zpr.responses.CreateZprPolicyResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model.ZprPolicy>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model.ZprPolicy.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model.ZprPolicy.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model.ZprPolicy> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.zpr.responses.CreateZprPolicyResponse.Builder + builder = + com.oracle.bmc.zpr.responses.CreateZprPolicyResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.zprPolicy(response.getItem()); + + java.util.Optional> locationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "location"); + if (locationHeader.isPresent()) { + builder.location( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "location", + locationHeader.get().get(0), + String.class)); + } + + java.util.Optional> contentLocationHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "content-location"); + if (contentLocationHeader.isPresent()) { + builder.contentLocation( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "content-location", + contentLocationHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.zpr.responses.CreateZprPolicyResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/internal/http/GetCsiNumberConverter.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/DeleteZprPolicyConverter.java similarity index 57% rename from bmc-cims/src/main/java/com/oracle/bmc/cims/internal/http/GetCsiNumberConverter.java rename to bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/DeleteZprPolicyConverter.java index 22c4442e7ae..89111c3909c 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/internal/http/GetCsiNumberConverter.java +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/DeleteZprPolicyConverter.java @@ -2,85 +2,57 @@ * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ -package com.oracle.bmc.cims.internal.http; +package com.oracle.bmc.zpr.internal.http; import com.oracle.bmc.http.internal.ResponseHelper; -import com.oracle.bmc.cims.model.*; -import com.oracle.bmc.cims.requests.*; -import com.oracle.bmc.cims.responses.*; +import com.oracle.bmc.zpr.model.*; +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; import com.oracle.bmc.util.internal.Validate; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181231") -public class GetCsiNumberConverter { +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class DeleteZprPolicyConverter { private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 RESPONSE_CONVERSION_FACTORY = new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); private static final org.slf4j.Logger LOG = - org.slf4j.LoggerFactory.getLogger(GetCsiNumberConverter.class); + org.slf4j.LoggerFactory.getLogger(DeleteZprPolicyConverter.class); - public static com.oracle.bmc.cims.requests.GetCsiNumberRequest interceptRequest( - com.oracle.bmc.cims.requests.GetCsiNumberRequest request) { + public static com.oracle.bmc.zpr.requests.DeleteZprPolicyRequest interceptRequest( + com.oracle.bmc.zpr.requests.DeleteZprPolicyRequest request) { return request; } public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.http.internal.RestClient client, - com.oracle.bmc.cims.requests.GetCsiNumberRequest request) { + com.oracle.bmc.zpr.requests.DeleteZprPolicyRequest request) { Validate.notNull(request, "request instance is required"); - Validate.notNull(request.getTenantId(), "tenantId is required"); - Validate.notNull(request.getRegion(), "region is required"); + Validate.notBlank(request.getZprPolicyId(), "zprPolicyId must not be blank"); com.oracle.bmc.http.internal.WrappedWebTarget target = client.getBaseTarget() - .path("/20181231") - .path("v2") - .path("incidents") - .path("getCsiNumber"); - - target = - target.queryParam( - "tenantId", - com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( - request.getTenantId())); - - target = - target.queryParam( - "region", - com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( - request.getRegion())); + .path("/20240301") + .path("zprPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getZprPolicyId())); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); - if (request.getOpcRequestId() != null) { - ib.header("opc-request-id", request.getOpcRequestId()); - } - - if (request.getOcid() != null) { - ib.header("ocid", request.getOcid()); - } - - if (request.getHomeregion() != null) { - ib.header("homeregion", request.getHomeregion()); - } - - if (request.getBearertokentype() != null) { - ib.header("bearertokentype", request.getBearertokentype()); - } - - if (request.getBearertoken() != null) { - ib.header("bearertoken", request.getBearertoken()); + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); } - if (request.getIdtoken() != null) { - ib.header("idtoken", request.getIdtoken()); + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); } - if (request.getDomainid() != null) { - ib.header("domainid", request.getDomainid()); + if (request.getOpcDryRun() != null) { + ib.header("opc-dry-run", request.getOpcDryRun()); } if (client.getClientConfigurator() != null) { @@ -90,49 +62,49 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( } public static java.util.function.Function< - javax.ws.rs.core.Response, com.oracle.bmc.cims.responses.GetCsiNumberResponse> + javax.ws.rs.core.Response, com.oracle.bmc.zpr.responses.DeleteZprPolicyResponse> fromResponse() { return fromResponse(java.util.Optional.empty()); } public static java.util.function.Function< - javax.ws.rs.core.Response, com.oracle.bmc.cims.responses.GetCsiNumberResponse> + javax.ws.rs.core.Response, com.oracle.bmc.zpr.responses.DeleteZprPolicyResponse> fromResponse(java.util.Optional serviceDetails) { final java.util.function.Function< javax.ws.rs.core.Response, - com.oracle.bmc.cims.responses.GetCsiNumberResponse> + com.oracle.bmc.zpr.responses.DeleteZprPolicyResponse> transformer = new java.util.function.Function< javax.ws.rs.core.Response, - com.oracle.bmc.cims.responses.GetCsiNumberResponse>() { + com.oracle.bmc.zpr.responses.DeleteZprPolicyResponse>() { @Override - public com.oracle.bmc.cims.responses.GetCsiNumberResponse apply( + public com.oracle.bmc.zpr.responses.DeleteZprPolicyResponse apply( javax.ws.rs.core.Response rawResponse) { LOG.trace( - "Transform function invoked for com.oracle.bmc.cims.responses.GetCsiNumberResponse"); + "Transform function invoked for com.oracle.bmc.zpr.responses.DeleteZprPolicyResponse"); final java.util.function.Function< javax.ws.rs.core.Response, - com.oracle.bmc.http.internal.WithHeaders> + com.oracle.bmc.http.internal.WithHeaders> responseFn; if (serviceDetails.isPresent()) { responseFn = RESPONSE_CONVERSION_FACTORY.create( - String.class, serviceDetails.get()); + serviceDetails.get()); } else { - responseFn = RESPONSE_CONVERSION_FACTORY.create(String.class); + responseFn = RESPONSE_CONVERSION_FACTORY.create(); } - com.oracle.bmc.http.internal.WithHeaders response = + com.oracle.bmc.http.internal.WithHeaders response = responseFn.apply(rawResponse); javax.ws.rs.core.MultivaluedMap headers = response.getHeaders(); - com.oracle.bmc.cims.responses.GetCsiNumberResponse.Builder builder = - com.oracle.bmc.cims.responses.GetCsiNumberResponse.builder() - .__httpStatusCode__(rawResponse.getStatus()) - .headers(headers); - - builder.value(response.getItem()); + com.oracle.bmc.zpr.responses.DeleteZprPolicyResponse.Builder + builder = + com.oracle.bmc.zpr.responses.DeleteZprPolicyResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); java.util.Optional> opcRequestIdHeader = com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( @@ -145,8 +117,19 @@ public com.oracle.bmc.cims.responses.GetCsiNumberResponse apply( String.class)); } - com.oracle.bmc.cims.responses.GetCsiNumberResponse responseWrapper = - builder.build(); + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.zpr.responses.DeleteZprPolicyResponse + responseWrapper = builder.build(); ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); return responseWrapper; diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/GetConfigurationConverter.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/GetConfigurationConverter.java new file mode 100644 index 00000000000..cb7089dd3a0 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/GetConfigurationConverter.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.zpr.model.*; +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class GetConfigurationConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetConfigurationConverter.class); + + public static com.oracle.bmc.zpr.requests.GetConfigurationRequest interceptRequest( + com.oracle.bmc.zpr.requests.GetConfigurationRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.zpr.requests.GetConfigurationRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240301").path("configuration"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.GetConfigurationResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.GetConfigurationResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.GetConfigurationResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.GetConfigurationResponse>() { + @Override + public com.oracle.bmc.zpr.responses.GetConfigurationResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.zpr.responses.GetConfigurationResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model.Configuration>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model.Configuration.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model.Configuration.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model.Configuration> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.zpr.responses.GetConfigurationResponse.Builder + builder = + com.oracle.bmc.zpr.responses + .GetConfigurationResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.configuration(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.zpr.responses.GetConfigurationResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/GetZprConfigurationWorkRequestConverter.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/GetZprConfigurationWorkRequestConverter.java new file mode 100644 index 00000000000..a8360f25bd2 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/GetZprConfigurationWorkRequestConverter.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.zpr.model.*; +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class GetZprConfigurationWorkRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetZprConfigurationWorkRequestConverter.class); + + public static com.oracle.bmc.zpr.requests.GetZprConfigurationWorkRequestRequest + interceptRequest( + com.oracle.bmc.zpr.requests.GetZprConfigurationWorkRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.zpr.requests.GetZprConfigurationWorkRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240301") + .path("zprConfigurationWorkRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.GetZprConfigurationWorkRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.GetZprConfigurationWorkRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.GetZprConfigurationWorkRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses + .GetZprConfigurationWorkRequestResponse>() { + @Override + public com.oracle.bmc.zpr.responses + .GetZprConfigurationWorkRequestResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.zpr.responses.GetZprConfigurationWorkRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model.WorkRequest>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model.WorkRequest.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model.WorkRequest.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model.WorkRequest> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.zpr.responses.GetZprConfigurationWorkRequestResponse + .Builder + builder = + com.oracle.bmc.zpr.responses + .GetZprConfigurationWorkRequestResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequest(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> retryAfterHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "retry-after"); + if (retryAfterHeader.isPresent()) { + builder.retryAfter( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "retry-after", + retryAfterHeader.get().get(0), + Integer.class)); + } + + com.oracle.bmc.zpr.responses.GetZprConfigurationWorkRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-cims/src/main/java/com/oracle/bmc/cims/internal/http/GetStatusConverter.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/GetZprPolicyConverter.java similarity index 64% rename from bmc-cims/src/main/java/com/oracle/bmc/cims/internal/http/GetStatusConverter.java rename to bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/GetZprPolicyConverter.java index e822c9f12ec..aad4def968d 100644 --- a/bmc-cims/src/main/java/com/oracle/bmc/cims/internal/http/GetStatusConverter.java +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/GetZprPolicyConverter.java @@ -2,40 +2,42 @@ * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ -package com.oracle.bmc.cims.internal.http; +package com.oracle.bmc.zpr.internal.http; import com.oracle.bmc.http.internal.ResponseHelper; -import com.oracle.bmc.cims.model.*; -import com.oracle.bmc.cims.requests.*; -import com.oracle.bmc.cims.responses.*; +import com.oracle.bmc.zpr.model.*; +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; import com.oracle.bmc.util.internal.Validate; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181231") -public class GetStatusConverter { +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class GetZprPolicyConverter { private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 RESPONSE_CONVERSION_FACTORY = new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); private static final org.slf4j.Logger LOG = - org.slf4j.LoggerFactory.getLogger(GetStatusConverter.class); + org.slf4j.LoggerFactory.getLogger(GetZprPolicyConverter.class); - public static com.oracle.bmc.cims.requests.GetStatusRequest interceptRequest( - com.oracle.bmc.cims.requests.GetStatusRequest request) { + public static com.oracle.bmc.zpr.requests.GetZprPolicyRequest interceptRequest( + com.oracle.bmc.zpr.requests.GetZprPolicyRequest request) { return request; } public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.http.internal.RestClient client, - com.oracle.bmc.cims.requests.GetStatusRequest request) { + com.oracle.bmc.zpr.requests.GetZprPolicyRequest request) { Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getZprPolicyId(), "zprPolicyId must not be blank"); com.oracle.bmc.http.internal.WrappedWebTarget target = client.getBaseTarget() - .path("/20181231") - .path("v2") - .path("incidents") - .path("status"); + .path("/20240301") + .path("zprPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getZprPolicyId())); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); @@ -45,14 +47,6 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( ib.header("opc-request-id", request.getOpcRequestId()); } - if (request.getOcid() != null) { - ib.header("ocid", request.getOcid()); - } - - if (request.getHomeregion() != null) { - ib.header("homeregion", request.getHomeregion()); - } - if (client.getClientConfigurator() != null) { client.getClientConfigurator().customizeRequest(request, ib); } @@ -60,53 +54,63 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( } public static java.util.function.Function< - javax.ws.rs.core.Response, com.oracle.bmc.cims.responses.GetStatusResponse> + javax.ws.rs.core.Response, com.oracle.bmc.zpr.responses.GetZprPolicyResponse> fromResponse() { return fromResponse(java.util.Optional.empty()); } public static java.util.function.Function< - javax.ws.rs.core.Response, com.oracle.bmc.cims.responses.GetStatusResponse> + javax.ws.rs.core.Response, com.oracle.bmc.zpr.responses.GetZprPolicyResponse> fromResponse(java.util.Optional serviceDetails) { final java.util.function.Function< - javax.ws.rs.core.Response, com.oracle.bmc.cims.responses.GetStatusResponse> + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.GetZprPolicyResponse> transformer = new java.util.function.Function< javax.ws.rs.core.Response, - com.oracle.bmc.cims.responses.GetStatusResponse>() { + com.oracle.bmc.zpr.responses.GetZprPolicyResponse>() { @Override - public com.oracle.bmc.cims.responses.GetStatusResponse apply( + public com.oracle.bmc.zpr.responses.GetZprPolicyResponse apply( javax.ws.rs.core.Response rawResponse) { LOG.trace( - "Transform function invoked for com.oracle.bmc.cims.responses.GetStatusResponse"); + "Transform function invoked for com.oracle.bmc.zpr.responses.GetZprPolicyResponse"); final java.util.function.Function< javax.ws.rs.core.Response, com.oracle.bmc.http.internal.WithHeaders< - com.oracle.bmc.cims.model.Status>> + com.oracle.bmc.zpr.model.ZprPolicy>> responseFn; if (serviceDetails.isPresent()) { responseFn = RESPONSE_CONVERSION_FACTORY.create( - com.oracle.bmc.cims.model.Status.class, + com.oracle.bmc.zpr.model.ZprPolicy.class, serviceDetails.get()); } else { responseFn = RESPONSE_CONVERSION_FACTORY.create( - com.oracle.bmc.cims.model.Status.class); + com.oracle.bmc.zpr.model.ZprPolicy.class); } com.oracle.bmc.http.internal.WithHeaders< - com.oracle.bmc.cims.model.Status> + com.oracle.bmc.zpr.model.ZprPolicy> response = responseFn.apply(rawResponse); javax.ws.rs.core.MultivaluedMap headers = response.getHeaders(); - com.oracle.bmc.cims.responses.GetStatusResponse.Builder builder = - com.oracle.bmc.cims.responses.GetStatusResponse.builder() + com.oracle.bmc.zpr.responses.GetZprPolicyResponse.Builder builder = + com.oracle.bmc.zpr.responses.GetZprPolicyResponse.builder() .__httpStatusCode__(rawResponse.getStatus()) .headers(headers); - builder.status(response.getItem()); + builder.zprPolicy(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } java.util.Optional> opcRequestIdHeader = com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( @@ -119,7 +123,7 @@ public com.oracle.bmc.cims.responses.GetStatusResponse apply( String.class)); } - com.oracle.bmc.cims.responses.GetStatusResponse responseWrapper = + com.oracle.bmc.zpr.responses.GetZprPolicyResponse responseWrapper = builder.build(); ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/GetZprPolicyWorkRequestConverter.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/GetZprPolicyWorkRequestConverter.java new file mode 100644 index 00000000000..defeb164d07 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/GetZprPolicyWorkRequestConverter.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.zpr.model.*; +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class GetZprPolicyWorkRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(GetZprPolicyWorkRequestConverter.class); + + public static com.oracle.bmc.zpr.requests.GetZprPolicyWorkRequestRequest interceptRequest( + com.oracle.bmc.zpr.requests.GetZprPolicyWorkRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.zpr.requests.GetZprPolicyWorkRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240301") + .path("zprPolicyWorkRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.GetZprPolicyWorkRequestResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.GetZprPolicyWorkRequestResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.GetZprPolicyWorkRequestResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.GetZprPolicyWorkRequestResponse>() { + @Override + public com.oracle.bmc.zpr.responses.GetZprPolicyWorkRequestResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.zpr.responses.GetZprPolicyWorkRequestResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model.WorkRequest>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model.WorkRequest.class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model.WorkRequest.class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model.WorkRequest> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.zpr.responses.GetZprPolicyWorkRequestResponse.Builder + builder = + com.oracle.bmc.zpr.responses + .GetZprPolicyWorkRequestResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequest(response.getItem()); + + java.util.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> retryAfterHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "retry-after"); + if (retryAfterHeader.isPresent()) { + builder.retryAfter( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "retry-after", + retryAfterHeader.get().get(0), + Integer.class)); + } + + com.oracle.bmc.zpr.responses.GetZprPolicyWorkRequestResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprConfigurationWorkRequestErrorsConverter.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprConfigurationWorkRequestErrorsConverter.java new file mode 100644 index 00000000000..a8b608cfc86 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprConfigurationWorkRequestErrorsConverter.java @@ -0,0 +1,187 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.zpr.model.*; +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprConfigurationWorkRequestErrorsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListZprConfigurationWorkRequestErrorsConverter.class); + + public static com.oracle.bmc.zpr.requests.ListZprConfigurationWorkRequestErrorsRequest + interceptRequest( + com.oracle.bmc.zpr.requests.ListZprConfigurationWorkRequestErrorsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.zpr.requests.ListZprConfigurationWorkRequestErrorsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240301") + .path("zprConfigurationWorkRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())) + .path("errors"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprConfigurationWorkRequestErrorsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprConfigurationWorkRequestErrorsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprConfigurationWorkRequestErrorsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses + .ListZprConfigurationWorkRequestErrorsResponse>() { + @Override + public com.oracle.bmc.zpr.responses + .ListZprConfigurationWorkRequestErrorsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.zpr.responses.ListZprConfigurationWorkRequestErrorsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model + .WorkRequestErrorCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model + .WorkRequestErrorCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model + .WorkRequestErrorCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model.WorkRequestErrorCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.zpr.responses + .ListZprConfigurationWorkRequestErrorsResponse + .Builder + builder = + com.oracle.bmc.zpr.responses + .ListZprConfigurationWorkRequestErrorsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestErrorCollection(response.getItem()); + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.zpr.responses + .ListZprConfigurationWorkRequestErrorsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprConfigurationWorkRequestLogsConverter.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprConfigurationWorkRequestLogsConverter.java new file mode 100644 index 00000000000..c08587f6382 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprConfigurationWorkRequestLogsConverter.java @@ -0,0 +1,187 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.zpr.model.*; +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprConfigurationWorkRequestLogsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListZprConfigurationWorkRequestLogsConverter.class); + + public static com.oracle.bmc.zpr.requests.ListZprConfigurationWorkRequestLogsRequest + interceptRequest( + com.oracle.bmc.zpr.requests.ListZprConfigurationWorkRequestLogsRequest + request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.zpr.requests.ListZprConfigurationWorkRequestLogsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240301") + .path("zprConfigurationWorkRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())) + .path("logs"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprConfigurationWorkRequestLogsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprConfigurationWorkRequestLogsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprConfigurationWorkRequestLogsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses + .ListZprConfigurationWorkRequestLogsResponse>() { + @Override + public com.oracle.bmc.zpr.responses + .ListZprConfigurationWorkRequestLogsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.zpr.responses.ListZprConfigurationWorkRequestLogsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model + .WorkRequestLogEntryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model + .WorkRequestLogEntryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model + .WorkRequestLogEntryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model + .WorkRequestLogEntryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.zpr.responses + .ListZprConfigurationWorkRequestLogsResponse.Builder + builder = + com.oracle.bmc.zpr.responses + .ListZprConfigurationWorkRequestLogsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestLogEntryCollection(response.getItem()); + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.zpr.responses + .ListZprConfigurationWorkRequestLogsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprConfigurationWorkRequestsConverter.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprConfigurationWorkRequestsConverter.java new file mode 100644 index 00000000000..612ced08478 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprConfigurationWorkRequestsConverter.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.zpr.model.*; +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprConfigurationWorkRequestsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListZprConfigurationWorkRequestsConverter.class); + + public static com.oracle.bmc.zpr.requests.ListZprConfigurationWorkRequestsRequest + interceptRequest( + com.oracle.bmc.zpr.requests.ListZprConfigurationWorkRequestsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.zpr.requests.ListZprConfigurationWorkRequestsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240301").path("zprConfigurationWorkRequests"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getWorkRequestId() != null) { + target = + target.queryParam( + "workRequestId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getWorkRequestId())); + } + + if (request.getStatus() != null) { + target = + target.queryParam( + "status", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getStatus().getValue())); + } + + if (request.getResourceId() != null) { + target = + target.queryParam( + "resourceId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceId())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprConfigurationWorkRequestsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprConfigurationWorkRequestsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprConfigurationWorkRequestsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses + .ListZprConfigurationWorkRequestsResponse>() { + @Override + public com.oracle.bmc.zpr.responses + .ListZprConfigurationWorkRequestsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.zpr.responses.ListZprConfigurationWorkRequestsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model + .WorkRequestSummaryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model + .WorkRequestSummaryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model + .WorkRequestSummaryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model + .WorkRequestSummaryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.zpr.responses + .ListZprConfigurationWorkRequestsResponse.Builder + builder = + com.oracle.bmc.zpr.responses + .ListZprConfigurationWorkRequestsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestSummaryCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.zpr.responses + .ListZprConfigurationWorkRequestsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprPoliciesConverter.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprPoliciesConverter.java new file mode 100644 index 00000000000..fa2f062dc8f --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprPoliciesConverter.java @@ -0,0 +1,200 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.zpr.model.*; +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprPoliciesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListZprPoliciesConverter.class); + + public static com.oracle.bmc.zpr.requests.ListZprPoliciesRequest interceptRequest( + com.oracle.bmc.zpr.requests.ListZprPoliciesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.zpr.requests.ListZprPoliciesRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240301").path("zprPolicies"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + if (request.getName() != null) { + target = + target.queryParam( + "name", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getName())); + } + + if (request.getId() != null) { + target = + target.queryParam( + "id", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.zpr.responses.ListZprPoliciesResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.zpr.responses.ListZprPoliciesResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprPoliciesResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprPoliciesResponse>() { + @Override + public com.oracle.bmc.zpr.responses.ListZprPoliciesResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.zpr.responses.ListZprPoliciesResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model + .ZprPolicyCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model.ZprPolicyCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model.ZprPolicyCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model.ZprPolicyCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.zpr.responses.ListZprPoliciesResponse.Builder + builder = + com.oracle.bmc.zpr.responses.ListZprPoliciesResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.zprPolicyCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.zpr.responses.ListZprPoliciesResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprPolicyWorkRequestErrorsConverter.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprPolicyWorkRequestErrorsConverter.java new file mode 100644 index 00000000000..330a4af9e34 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprPolicyWorkRequestErrorsConverter.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.zpr.model.*; +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprPolicyWorkRequestErrorsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListZprPolicyWorkRequestErrorsConverter.class); + + public static com.oracle.bmc.zpr.requests.ListZprPolicyWorkRequestErrorsRequest + interceptRequest( + com.oracle.bmc.zpr.requests.ListZprPolicyWorkRequestErrorsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.zpr.requests.ListZprPolicyWorkRequestErrorsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240301") + .path("zprPolicyWorkRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())) + .path("errors"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestErrorsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestErrorsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestErrorsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses + .ListZprPolicyWorkRequestErrorsResponse>() { + @Override + public com.oracle.bmc.zpr.responses + .ListZprPolicyWorkRequestErrorsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestErrorsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model + .WorkRequestErrorCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model + .WorkRequestErrorCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model + .WorkRequestErrorCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model.WorkRequestErrorCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestErrorsResponse + .Builder + builder = + com.oracle.bmc.zpr.responses + .ListZprPolicyWorkRequestErrorsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestErrorCollection(response.getItem()); + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestErrorsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprPolicyWorkRequestLogsConverter.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprPolicyWorkRequestLogsConverter.java new file mode 100644 index 00000000000..5b694f39297 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprPolicyWorkRequestLogsConverter.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.zpr.model.*; +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprPolicyWorkRequestLogsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListZprPolicyWorkRequestLogsConverter.class); + + public static com.oracle.bmc.zpr.requests.ListZprPolicyWorkRequestLogsRequest interceptRequest( + com.oracle.bmc.zpr.requests.ListZprPolicyWorkRequestLogsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.zpr.requests.ListZprPolicyWorkRequestLogsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240301") + .path("zprPolicyWorkRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())) + .path("logs"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestLogsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestLogsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestLogsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses + .ListZprPolicyWorkRequestLogsResponse>() { + @Override + public com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestLogsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestLogsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model + .WorkRequestLogEntryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model + .WorkRequestLogEntryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model + .WorkRequestLogEntryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model + .WorkRequestLogEntryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestLogsResponse + .Builder + builder = + com.oracle.bmc.zpr.responses + .ListZprPolicyWorkRequestLogsResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestLogEntryCollection(response.getItem()); + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestLogsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprPolicyWorkRequestsConverter.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprPolicyWorkRequestsConverter.java new file mode 100644 index 00000000000..ae0db47543a --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/ListZprPolicyWorkRequestsConverter.java @@ -0,0 +1,206 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.zpr.model.*; +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprPolicyWorkRequestsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ListZprPolicyWorkRequestsConverter.class); + + public static com.oracle.bmc.zpr.requests.ListZprPolicyWorkRequestsRequest interceptRequest( + com.oracle.bmc.zpr.requests.ListZprPolicyWorkRequestsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.zpr.requests.ListZprPolicyWorkRequestsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20240301").path("zprPolicyWorkRequests"); + + if (request.getCompartmentId() != null) { + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + } + + if (request.getWorkRequestId() != null) { + target = + target.queryParam( + "workRequestId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getWorkRequestId())); + } + + if (request.getStatus() != null) { + target = + target.queryParam( + "status", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getStatus().getValue())); + } + + if (request.getResourceId() != null) { + target = + target.queryParam( + "resourceId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceId())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestsResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestsResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestsResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestsResponse>() { + @Override + public com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestsResponse + apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestsResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model + .WorkRequestSummaryCollection>> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model + .WorkRequestSummaryCollection + .class, + serviceDetails.get()); + } else { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + com.oracle.bmc.zpr.model + .WorkRequestSummaryCollection + .class); + } + + com.oracle.bmc.http.internal.WithHeaders< + com.oracle.bmc.zpr.model + .WorkRequestSummaryCollection> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestsResponse + .Builder + builder = + com.oracle.bmc.zpr.responses + .ListZprPolicyWorkRequestsResponse.builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + builder.workRequestSummaryCollection(response.getItem()); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.zpr.responses.ListZprPolicyWorkRequestsResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/UpdateZprPolicyConverter.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/UpdateZprPolicyConverter.java new file mode 100644 index 00000000000..3bcba9b1612 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/internal/http/UpdateZprPolicyConverter.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.zpr.model.*; +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; +import com.oracle.bmc.util.internal.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class UpdateZprPolicyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2 + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactoryV2(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(UpdateZprPolicyConverter.class); + + public static com.oracle.bmc.zpr.requests.UpdateZprPolicyRequest interceptRequest( + com.oracle.bmc.zpr.requests.UpdateZprPolicyRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + com.oracle.bmc.zpr.requests.UpdateZprPolicyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getZprPolicyId(), "zprPolicyId must not be blank"); + Validate.notNull(request.getUpdateZprPolicyDetails(), "updateZprPolicyDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20240301") + .path("zprPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getZprPolicyId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcDryRun() != null) { + ib.header("opc-dry-run", request.getOpcDryRun()); + } + + if (client.getClientConfigurator() != null) { + client.getClientConfigurator().customizeRequest(request, ib); + } + return ib; + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.zpr.responses.UpdateZprPolicyResponse> + fromResponse() { + return fromResponse(java.util.Optional.empty()); + } + + public static java.util.function.Function< + javax.ws.rs.core.Response, com.oracle.bmc.zpr.responses.UpdateZprPolicyResponse> + fromResponse(java.util.Optional serviceDetails) { + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.UpdateZprPolicyResponse> + transformer = + new java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.zpr.responses.UpdateZprPolicyResponse>() { + @Override + public com.oracle.bmc.zpr.responses.UpdateZprPolicyResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for com.oracle.bmc.zpr.responses.UpdateZprPolicyResponse"); + final java.util.function.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn; + if (serviceDetails.isPresent()) { + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + serviceDetails.get()); + } else { + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + } + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + com.oracle.bmc.zpr.responses.UpdateZprPolicyResponse.Builder + builder = + com.oracle.bmc.zpr.responses.UpdateZprPolicyResponse + .builder() + .__httpStatusCode__(rawResponse.getStatus()) + .headers(headers); + + java.util.Optional> opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + java.util.Optional> opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.getHeadersWithName( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.oracle.bmc.zpr.responses.UpdateZprPolicyResponse + responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ActionType.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ActionType.java new file mode 100644 index 00000000000..2317ecc69ce --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ActionType.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * Possible types of actions. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public enum ActionType { + Created("CREATED"), + Updated("UPDATED"), + Deleted("DELETED"), + InProgress("IN_PROGRESS"), + Related("RELATED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(ActionType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActionType v : ActionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ActionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ActionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ActionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/Configuration.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/Configuration.java new file mode 100644 index 00000000000..d1771127ca3 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/Configuration.java @@ -0,0 +1,685 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * The configuration details of ZPR in the root compartment (the root compartment is the tenancy). + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Configuration.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class Configuration extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "zprStatus", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public Configuration( + String id, + String compartmentId, + ZprStatus zprStatus, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.zprStatus = zprStatus; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprConfiguration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprConfiguration. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenancy into which ZPR will be onboarded. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenancy into which ZPR will be onboarded. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The enabled or disabled status of ZPR in tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("zprStatus") + private ZprStatus zprStatus; + + /** + * The enabled or disabled status of ZPR in tenancy. + * @param zprStatus the value to set + * @return this builder + **/ + public Builder zprStatus(ZprStatus zprStatus) { + this.zprStatus = zprStatus; + this.__explicitlySet__.add("zprStatus"); + return this; + } + /** + * The date and time that ZPR was onboarded to the tenancy, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time that ZPR was onboarded to the tenancy, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time that ZPR was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time that ZPR was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** + * The current state of ZPR in the tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of ZPR in the tenancy. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message that describes the current state of ZPR in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of ZPR in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Configuration build() { + Configuration model = + new Configuration( + this.id, + this.compartmentId, + this.zprStatus, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Configuration model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("zprStatus")) { + this.zprStatus(model.getZprStatus()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprConfiguration. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprConfiguration. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenancy into which ZPR will be onboarded. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenancy into which ZPR will be onboarded. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The enabled or disabled status of ZPR in tenancy. + **/ + public enum ZprStatus { + Enabled("ENABLED"), + Disabled("DISABLED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ZprStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ZprStatus v : ZprStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ZprStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ZprStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ZprStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The enabled or disabled status of ZPR in tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("zprStatus") + private final ZprStatus zprStatus; + + /** + * The enabled or disabled status of ZPR in tenancy. + * @return the value + **/ + public ZprStatus getZprStatus() { + return zprStatus; + } + + /** + * The date and time that ZPR was onboarded to the tenancy, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time that ZPR was onboarded to the tenancy, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time that ZPR was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time that ZPR was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** + * The current state of ZPR in the tenancy. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Creating("CREATING"), + Updating("UPDATING"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of ZPR in the tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of ZPR in the tenancy. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message that describes the current state of ZPR in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of ZPR in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Configuration("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", zprStatus=").append(String.valueOf(this.zprStatus)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Configuration)) { + return false; + } + + Configuration other = (Configuration) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.zprStatus, other.zprStatus) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.zprStatus == null ? 43 : this.zprStatus.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/CreateConfigurationDetails.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/CreateConfigurationDetails.java new file mode 100644 index 00000000000..7d2da80ae2f --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/CreateConfigurationDetails.java @@ -0,0 +1,295 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * The configuration details to onboard ZPR in the root compartment (the root compartment is the tenancy). + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateConfigurationDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateConfigurationDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId", "zprStatus", "freeformTags", "definedTags"}) + public CreateConfigurationDetails( + String compartmentId, + Configuration.ZprStatus zprStatus, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.compartmentId = compartmentId; + this.zprStatus = zprStatus; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenancy into which ZPR resources will be bootstrapped. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenancy into which ZPR resources will be bootstrapped. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The enabled or disabled status of ZPR in the tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("zprStatus") + private Configuration.ZprStatus zprStatus; + + /** + * The enabled or disabled status of ZPR in the tenancy. + * @param zprStatus the value to set + * @return this builder + **/ + public Builder zprStatus(Configuration.ZprStatus zprStatus) { + this.zprStatus = zprStatus; + this.__explicitlySet__.add("zprStatus"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateConfigurationDetails build() { + CreateConfigurationDetails model = + new CreateConfigurationDetails( + this.compartmentId, + this.zprStatus, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateConfigurationDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("zprStatus")) { + this.zprStatus(model.getZprStatus()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenancy into which ZPR resources will be bootstrapped. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenancy into which ZPR resources will be bootstrapped. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The enabled or disabled status of ZPR in the tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("zprStatus") + private final Configuration.ZprStatus zprStatus; + + /** + * The enabled or disabled status of ZPR in the tenancy. + * @return the value + **/ + public Configuration.ZprStatus getZprStatus() { + return zprStatus; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateConfigurationDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", zprStatus=").append(String.valueOf(this.zprStatus)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateConfigurationDetails)) { + return false; + } + + CreateConfigurationDetails other = (CreateConfigurationDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.zprStatus, other.zprStatus) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.zprStatus == null ? 43 : this.zprStatus.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/CreateZprPolicyDetails.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/CreateZprPolicyDetails.java new file mode 100644 index 00000000000..b66f549a0d0 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/CreateZprPolicyDetails.java @@ -0,0 +1,380 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * The data to create a ZprPolicy. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateZprPolicyDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class CreateZprPolicyDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "description", + "name", + "statements", + "freeformTags", + "definedTags" + }) + public CreateZprPolicyDetails( + String compartmentId, + String description, + String name, + java.util.List statements, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.compartmentId = compartmentId; + this.description = description; + this.name = name; + this.statements = statements; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the ZprPolicy in. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the ZprPolicy in. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL policies in the tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL policies in the tenancy. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("statements") + private java.util.List statements; + + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language. + * @param statements the value to set + * @return this builder + **/ + public Builder statements(java.util.List statements) { + this.statements = statements; + this.__explicitlySet__.add("statements"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateZprPolicyDetails build() { + CreateZprPolicyDetails model = + new CreateZprPolicyDetails( + this.compartmentId, + this.description, + this.name, + this.statements, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateZprPolicyDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("statements")) { + this.statements(model.getStatements()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the ZprPolicy in. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the ZprPolicy in. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL policies in the tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL policies in the tenancy. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("statements") + private final java.util.List statements; + + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language. + * @return the value + **/ + public java.util.List getStatements() { + return statements; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateZprPolicyDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", statements=").append(String.valueOf(this.statements)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateZprPolicyDetails)) { + return false; + } + + CreateZprPolicyDetails other = (CreateZprPolicyDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.statements, other.statements) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.statements == null ? 43 : this.statements.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/OperationType.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/OperationType.java new file mode 100644 index 00000000000..db53be1bd03 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/OperationType.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * The asynchronous operation tracked by the work request. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public enum OperationType { + CreateZprPolicy("CREATE_ZPR_POLICY"), + UpdateZprPolicy("UPDATE_ZPR_POLICY"), + DeleteZprPolicy("DELETE_ZPR_POLICY"), + CreateZprConfiguration("CREATE_ZPR_CONFIGURATION"), + UpdateZprConfiguration("UPDATE_ZPR_CONFIGURATION"), + DeleteZprConfiguration("DELETE_ZPR_CONFIGURATION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(OperationType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OperationType v : OperationType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + OperationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OperationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'OperationType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/SortOrder.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/SortOrder.java new file mode 100644 index 00000000000..40d58c6cfe6 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/SortOrder.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The {@code name} + * sort order is case sensitive. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortOrder: " + key); + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/UpdateZprPolicyDetails.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/UpdateZprPolicyDetails.java new file mode 100644 index 00000000000..ed04e421641 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/UpdateZprPolicyDetails.java @@ -0,0 +1,286 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * The data to update a ZprPolicy. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateZprPolicyDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class UpdateZprPolicyDetails + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"description", "statements", "freeformTags", "definedTags"}) + public UpdateZprPolicyDetails( + String description, + java.util.List statements, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.description = description; + this.statements = statements; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("statements") + private java.util.List statements; + + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language. + * @param statements the value to set + * @return this builder + **/ + public Builder statements(java.util.List statements) { + this.statements = statements; + this.__explicitlySet__.add("statements"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateZprPolicyDetails build() { + UpdateZprPolicyDetails model = + new UpdateZprPolicyDetails( + this.description, this.statements, this.freeformTags, this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateZprPolicyDetails model) { + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("statements")) { + this.statements(model.getStatements()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("statements") + private final java.util.List statements; + + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language. + * @return the value + **/ + public java.util.List getStatements() { + return statements; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateZprPolicyDetails("); + sb.append("super=").append(super.toString()); + sb.append("description=").append(String.valueOf(this.description)); + sb.append(", statements=").append(String.valueOf(this.statements)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateZprPolicyDetails)) { + return false; + } + + UpdateZprPolicyDetails other = (UpdateZprPolicyDetails) o; + return java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.statements, other.statements) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.statements == null ? 43 : this.statements.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequest.java new file mode 100644 index 00000000000..92d00f7e989 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequest.java @@ -0,0 +1,551 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * An asynchronous work request. Work requests help you monitor long-running operations. When you start a long-running operation, + * the service creates a work request. A work request is an activity log that lets you track each step in the operation's + * progress. Each work request has an OCID that lets you interact with it programmatically and use it for automation. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = WorkRequest.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequest extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "operationType", + "status", + "id", + "compartmentId", + "resources", + "percentComplete", + "timeAccepted", + "timeStarted", + "timeFinished", + "timeUpdated" + }) + public WorkRequest( + OperationType operationType, + WorkRequestStatus status, + String id, + String compartmentId, + java.util.List resources, + Float percentComplete, + java.util.Date timeAccepted, + java.util.Date timeStarted, + java.util.Date timeFinished, + java.util.Date timeUpdated) { + super(); + this.operationType = operationType; + this.status = status; + this.id = id; + this.compartmentId = compartmentId; + this.resources = resources; + this.percentComplete = percentComplete; + this.timeAccepted = timeAccepted; + this.timeStarted = timeStarted; + this.timeFinished = timeFinished; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The asynchronous operation tracked by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private OperationType operationType; + + /** + * The asynchronous operation tracked by this work request. + * @param operationType the value to set + * @return this builder + **/ + public Builder operationType(OperationType operationType) { + this.operationType = operationType; + this.__explicitlySet__.add("operationType"); + return this; + } + /** + * The status of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private WorkRequestStatus status; + + /** + * The status of the work request. + * @param status the value to set + * @return this builder + **/ + public Builder status(WorkRequestStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The resources that are affected by the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * The resources that are affected by the work request. + * @param resources the value to set + * @return this builder + **/ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the total work + * that must be performed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private Float percentComplete; + + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the total work + * that must be performed. + * + * @param percentComplete the value to set + * @return this builder + **/ + public Builder percentComplete(Float percentComplete) { + this.percentComplete = percentComplete; + this.__explicitlySet__.add("percentComplete"); + return this; + } + /** + * The date and time the work request was created, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private java.util.Date timeAccepted; + + /** + * The date and time the work request was created, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @param timeAccepted the value to set + * @return this builder + **/ + public Builder timeAccepted(java.util.Date timeAccepted) { + this.timeAccepted = timeAccepted; + this.__explicitlySet__.add("timeAccepted"); + return this; + } + /** + * The date and time the work request was started, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The date and time the work request was started, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The date and time the work request was finished, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + /** + * The date and time the work request was finished, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @param timeFinished the value to set + * @return this builder + **/ + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + /** + * The date and time the work request was updated, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the work request was updated, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequest build() { + WorkRequest model = + new WorkRequest( + this.operationType, + this.status, + this.id, + this.compartmentId, + this.resources, + this.percentComplete, + this.timeAccepted, + this.timeStarted, + this.timeFinished, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequest model) { + if (model.wasPropertyExplicitlySet("operationType")) { + this.operationType(model.getOperationType()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("percentComplete")) { + this.percentComplete(model.getPercentComplete()); + } + if (model.wasPropertyExplicitlySet("timeAccepted")) { + this.timeAccepted(model.getTimeAccepted()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The asynchronous operation tracked by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private final OperationType operationType; + + /** + * The asynchronous operation tracked by this work request. + * @return the value + **/ + public OperationType getOperationType() { + return operationType; + } + + /** + * The status of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final WorkRequestStatus status; + + /** + * The status of the work request. + * @return the value + **/ + public WorkRequestStatus getStatus() { + return status; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The resources that are affected by the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * The resources that are affected by the work request. + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the total work + * that must be performed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private final Float percentComplete; + + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the total work + * that must be performed. + * + * @return the value + **/ + public Float getPercentComplete() { + return percentComplete; + } + + /** + * The date and time the work request was created, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private final java.util.Date timeAccepted; + + /** + * The date and time the work request was created, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeAccepted() { + return timeAccepted; + } + + /** + * The date and time the work request was started, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The date and time the work request was started, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The date and time the work request was finished, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private final java.util.Date timeFinished; + + /** + * The date and time the work request was finished, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeFinished() { + return timeFinished; + } + + /** + * The date and time the work request was updated, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the work request was updated, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequest("); + sb.append("super=").append(super.toString()); + sb.append("operationType=").append(String.valueOf(this.operationType)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", percentComplete=").append(String.valueOf(this.percentComplete)); + sb.append(", timeAccepted=").append(String.valueOf(this.timeAccepted)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequest)) { + return false; + } + + WorkRequest other = (WorkRequest) o; + return java.util.Objects.equals(this.operationType, other.operationType) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.percentComplete, other.percentComplete) + && java.util.Objects.equals(this.timeAccepted, other.timeAccepted) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeFinished, other.timeFinished) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.operationType == null ? 43 : this.operationType.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = + (result * PRIME) + + (this.percentComplete == null ? 43 : this.percentComplete.hashCode()); + result = (result * PRIME) + (this.timeAccepted == null ? 43 : this.timeAccepted.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestError.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestError.java new file mode 100644 index 00000000000..2eb91c2de66 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestError.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * An error encountered while performing an operation that is tracked by a work request. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = WorkRequestError.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestError extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"code", "message", "timestamp"}) + public WorkRequestError(String code, String message, java.util.Date timestamp) { + super(); + this.code = code; + this.message = message; + this.timestamp = timestamp; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A machine-usable code for the error that occurred. For a list of error codes, see + * [API Errors](https://docs.cloud.oracle.com/iaas/Content/API/References/apierrors.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("code") + private String code; + + /** + * A machine-usable code for the error that occurred. For a list of error codes, see + * [API Errors](https://docs.cloud.oracle.com/iaas/Content/API/References/apierrors.htm). + * + * @param code the value to set + * @return this builder + **/ + public Builder code(String code) { + this.code = code; + this.__explicitlySet__.add("code"); + return this; + } + /** + * A human-readable error message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * A human-readable error message. + * @param message the value to set + * @return this builder + **/ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + /** + * The date and time the error occurred, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + /** + * The date and time the error occurred, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @param timestamp the value to set + * @return this builder + **/ + public Builder timestamp(java.util.Date timestamp) { + this.timestamp = timestamp; + this.__explicitlySet__.add("timestamp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestError build() { + WorkRequestError model = new WorkRequestError(this.code, this.message, this.timestamp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestError model) { + if (model.wasPropertyExplicitlySet("code")) { + this.code(model.getCode()); + } + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + if (model.wasPropertyExplicitlySet("timestamp")) { + this.timestamp(model.getTimestamp()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A machine-usable code for the error that occurred. For a list of error codes, see + * [API Errors](https://docs.cloud.oracle.com/iaas/Content/API/References/apierrors.htm). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("code") + private final String code; + + /** + * A machine-usable code for the error that occurred. For a list of error codes, see + * [API Errors](https://docs.cloud.oracle.com/iaas/Content/API/References/apierrors.htm). + * + * @return the value + **/ + public String getCode() { + return code; + } + + /** + * A human-readable error message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * A human-readable error message. + * @return the value + **/ + public String getMessage() { + return message; + } + + /** + * The date and time the error occurred, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private final java.util.Date timestamp; + + /** + * The date and time the error occurred, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimestamp() { + return timestamp; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestError("); + sb.append("super=").append(super.toString()); + sb.append("code=").append(String.valueOf(this.code)); + sb.append(", message=").append(String.valueOf(this.message)); + sb.append(", timestamp=").append(String.valueOf(this.timestamp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestError)) { + return false; + } + + WorkRequestError other = (WorkRequestError) o; + return java.util.Objects.equals(this.code, other.code) + && java.util.Objects.equals(this.message, other.message) + && java.util.Objects.equals(this.timestamp, other.timestamp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.code == null ? 43 : this.code.hashCode()); + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + (this.timestamp == null ? 43 : this.timestamp.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestErrorCollection.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestErrorCollection.java new file mode 100644 index 00000000000..681283ac400 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestErrorCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * A list of work request errors. Can contain both errors and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestErrorCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestErrorCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public WorkRequestErrorCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A list of work request errors. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * A list of work request errors. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestErrorCollection build() { + WorkRequestErrorCollection model = new WorkRequestErrorCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestErrorCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A list of work request errors. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * A list of work request errors. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestErrorCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestErrorCollection)) { + return false; + } + + WorkRequestErrorCollection other = (WorkRequestErrorCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestLogEntry.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestLogEntry.java new file mode 100644 index 00000000000..2a97d6d0847 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestLogEntry.java @@ -0,0 +1,180 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * A log message from performing an operation that is tracked by a work request. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestLogEntry.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestLogEntry extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"message", "timestamp"}) + public WorkRequestLogEntry(String message, java.util.Date timestamp) { + super(); + this.message = message; + this.timestamp = timestamp; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A human-readable log message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * A human-readable log message. + * @param message the value to set + * @return this builder + **/ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + /** + * The date and time the log message was written, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + /** + * The date and time the log message was written, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @param timestamp the value to set + * @return this builder + **/ + public Builder timestamp(java.util.Date timestamp) { + this.timestamp = timestamp; + this.__explicitlySet__.add("timestamp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestLogEntry build() { + WorkRequestLogEntry model = new WorkRequestLogEntry(this.message, this.timestamp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestLogEntry model) { + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + if (model.wasPropertyExplicitlySet("timestamp")) { + this.timestamp(model.getTimestamp()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A human-readable log message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * A human-readable log message. + * @return the value + **/ + public String getMessage() { + return message; + } + + /** + * The date and time the log message was written, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private final java.util.Date timestamp; + + /** + * The date and time the log message was written, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimestamp() { + return timestamp; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestLogEntry("); + sb.append("super=").append(super.toString()); + sb.append("message=").append(String.valueOf(this.message)); + sb.append(", timestamp=").append(String.valueOf(this.timestamp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestLogEntry)) { + return false; + } + + WorkRequestLogEntry other = (WorkRequestLogEntry) o; + return java.util.Objects.equals(this.message, other.message) + && java.util.Objects.equals(this.timestamp, other.timestamp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + (this.timestamp == null ? 43 : this.timestamp.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestLogEntryCollection.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestLogEntryCollection.java new file mode 100644 index 00000000000..b081f7604a7 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestLogEntryCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * A list of work request logs. Can contain both logs and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestLogEntryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestLogEntryCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public WorkRequestLogEntryCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A list of work request log entries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * A list of work request log entries. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestLogEntryCollection build() { + WorkRequestLogEntryCollection model = new WorkRequestLogEntryCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestLogEntryCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A list of work request log entries. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * A list of work request log entries. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestLogEntryCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestLogEntryCollection)) { + return false; + } + + WorkRequestLogEntryCollection other = (WorkRequestLogEntryCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestResource.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestResource.java new file mode 100644 index 00000000000..50ae2bb705b --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestResource.java @@ -0,0 +1,316 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * A resource created or operated on by a work request. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestResource.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestResource extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "entityType", + "actionType", + "identifier", + "entityUri", + "metadata" + }) + public WorkRequestResource( + String entityType, + ActionType actionType, + String identifier, + String entityUri, + java.util.Map metadata) { + super(); + this.entityType = entityType; + this.actionType = actionType; + this.identifier = identifier; + this.entityUri = entityUri; + this.metadata = metadata; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The resource type that the work request affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private String entityType; + + /** + * The resource type that the work request affects. + * @param entityType the value to set + * @return this builder + **/ + public Builder entityType(String entityType) { + this.entityType = entityType; + this.__explicitlySet__.add("entityType"); + return this; + } + /** + * The way in which this resource is affected by the operation tracked in the work request. + * A resource being created, updated, or deleted remains in the IN_PROGRESS state until + * work is complete for that resource, at which point it transitions to CREATED, UPDATED, + * or DELETED, respectively. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + /** + * The way in which this resource is affected by the operation tracked in the work request. + * A resource being created, updated, or deleted remains in the IN_PROGRESS state until + * work is complete for that resource, at which point it transitions to CREATED, UPDATED, + * or DELETED, respectively. + * + * @param actionType the value to set + * @return this builder + **/ + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + /** + * An [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) or other unique identifier for the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("identifier") + private String identifier; + + /** + * An [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) or other unique identifier for the resource. + * @param identifier the value to set + * @return this builder + **/ + public Builder identifier(String identifier) { + this.identifier = identifier; + this.__explicitlySet__.add("identifier"); + return this; + } + /** + * The URI path that you can use for a GET request to access the resource metadata. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityUri") + private String entityUri; + + /** + * The URI path that you can use for a GET request to access the resource metadata. + * @param entityUri the value to set + * @return this builder + **/ + public Builder entityUri(String entityUri) { + this.entityUri = entityUri; + this.__explicitlySet__.add("entityUri"); + return this; + } + /** + * Additional information that helps to explain the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private java.util.Map metadata; + + /** + * Additional information that helps to explain the resource. + * @param metadata the value to set + * @return this builder + **/ + public Builder metadata(java.util.Map metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestResource build() { + WorkRequestResource model = + new WorkRequestResource( + this.entityType, + this.actionType, + this.identifier, + this.entityUri, + this.metadata); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestResource model) { + if (model.wasPropertyExplicitlySet("entityType")) { + this.entityType(model.getEntityType()); + } + if (model.wasPropertyExplicitlySet("actionType")) { + this.actionType(model.getActionType()); + } + if (model.wasPropertyExplicitlySet("identifier")) { + this.identifier(model.getIdentifier()); + } + if (model.wasPropertyExplicitlySet("entityUri")) { + this.entityUri(model.getEntityUri()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The resource type that the work request affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private final String entityType; + + /** + * The resource type that the work request affects. + * @return the value + **/ + public String getEntityType() { + return entityType; + } + + /** + * The way in which this resource is affected by the operation tracked in the work request. + * A resource being created, updated, or deleted remains in the IN_PROGRESS state until + * work is complete for that resource, at which point it transitions to CREATED, UPDATED, + * or DELETED, respectively. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private final ActionType actionType; + + /** + * The way in which this resource is affected by the operation tracked in the work request. + * A resource being created, updated, or deleted remains in the IN_PROGRESS state until + * work is complete for that resource, at which point it transitions to CREATED, UPDATED, + * or DELETED, respectively. + * + * @return the value + **/ + public ActionType getActionType() { + return actionType; + } + + /** + * An [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) or other unique identifier for the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("identifier") + private final String identifier; + + /** + * An [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) or other unique identifier for the resource. + * @return the value + **/ + public String getIdentifier() { + return identifier; + } + + /** + * The URI path that you can use for a GET request to access the resource metadata. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityUri") + private final String entityUri; + + /** + * The URI path that you can use for a GET request to access the resource metadata. + * @return the value + **/ + public String getEntityUri() { + return entityUri; + } + + /** + * Additional information that helps to explain the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final java.util.Map metadata; + + /** + * Additional information that helps to explain the resource. + * @return the value + **/ + public java.util.Map getMetadata() { + return metadata; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestResource("); + sb.append("super=").append(super.toString()); + sb.append("entityType=").append(String.valueOf(this.entityType)); + sb.append(", actionType=").append(String.valueOf(this.actionType)); + sb.append(", identifier=").append(String.valueOf(this.identifier)); + sb.append(", entityUri=").append(String.valueOf(this.entityUri)); + sb.append(", metadata=").append(String.valueOf(this.metadata)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestResource)) { + return false; + } + + WorkRequestResource other = (WorkRequestResource) o; + return java.util.Objects.equals(this.entityType, other.entityType) + && java.util.Objects.equals(this.actionType, other.actionType) + && java.util.Objects.equals(this.identifier, other.identifier) + && java.util.Objects.equals(this.entityUri, other.entityUri) + && java.util.Objects.equals(this.metadata, other.metadata) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.entityType == null ? 43 : this.entityType.hashCode()); + result = (result * PRIME) + (this.actionType == null ? 43 : this.actionType.hashCode()); + result = (result * PRIME) + (this.identifier == null ? 43 : this.identifier.hashCode()); + result = (result * PRIME) + (this.entityUri == null ? 43 : this.entityUri.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestResourceMetadataKey.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestResourceMetadataKey.java new file mode 100644 index 00000000000..915a24c4b0a --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestResourceMetadataKey.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * Possible metadata keys for work request resource metadata. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public enum WorkRequestResourceMetadataKey { + IsDryRun("IS_DRY_RUN"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(WorkRequestResourceMetadataKey.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (WorkRequestResourceMetadataKey v : WorkRequestResourceMetadataKey.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + WorkRequestResourceMetadataKey(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static WorkRequestResourceMetadataKey create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'WorkRequestResourceMetadataKey', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestStatus.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestStatus.java new file mode 100644 index 00000000000..f7b320d8435 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestStatus.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * The status of the work request. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public enum WorkRequestStatus { + Accepted("ACCEPTED"), + InProgress("IN_PROGRESS"), + Waiting("WAITING"), + NeedsAttention("NEEDS_ATTENTION"), + Failed("FAILED"), + Succeeded("SUCCEEDED"), + Canceling("CANCELING"), + Canceled("CANCELED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(WorkRequestStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (WorkRequestStatus v : WorkRequestStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + WorkRequestStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static WorkRequestStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'WorkRequestStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestSummary.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestSummary.java new file mode 100644 index 00000000000..7435b1affa9 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestSummary.java @@ -0,0 +1,550 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * Summary information about an asynchronous work request. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestSummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "operationType", + "status", + "id", + "compartmentId", + "resources", + "percentComplete", + "timeAccepted", + "timeStarted", + "timeFinished", + "timeUpdated" + }) + public WorkRequestSummary( + OperationType operationType, + WorkRequestStatus status, + String id, + String compartmentId, + java.util.List resources, + Float percentComplete, + java.util.Date timeAccepted, + java.util.Date timeStarted, + java.util.Date timeFinished, + java.util.Date timeUpdated) { + super(); + this.operationType = operationType; + this.status = status; + this.id = id; + this.compartmentId = compartmentId; + this.resources = resources; + this.percentComplete = percentComplete; + this.timeAccepted = timeAccepted; + this.timeStarted = timeStarted; + this.timeFinished = timeFinished; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The asynchronous operation tracked by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private OperationType operationType; + + /** + * The asynchronous operation tracked by this work request. + * @param operationType the value to set + * @return this builder + **/ + public Builder operationType(OperationType operationType) { + this.operationType = operationType; + this.__explicitlySet__.add("operationType"); + return this; + } + /** + * The status of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private WorkRequestStatus status; + + /** + * The status of the work request. + * @param status the value to set + * @return this builder + **/ + public Builder status(WorkRequestStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. + * + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The resources that are affected by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * The resources that are affected by this work request. + * @param resources the value to set + * @return this builder + **/ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the total work + * that must be performed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private Float percentComplete; + + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the total work + * that must be performed. + * + * @param percentComplete the value to set + * @return this builder + **/ + public Builder percentComplete(Float percentComplete) { + this.percentComplete = percentComplete; + this.__explicitlySet__.add("percentComplete"); + return this; + } + /** + * The date and time the work request was created, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private java.util.Date timeAccepted; + + /** + * The date and time the work request was created, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @param timeAccepted the value to set + * @return this builder + **/ + public Builder timeAccepted(java.util.Date timeAccepted) { + this.timeAccepted = timeAccepted; + this.__explicitlySet__.add("timeAccepted"); + return this; + } + /** + * The date and time the work request was started, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The date and time the work request was started, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @param timeStarted the value to set + * @return this builder + **/ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The date and time the work request was finished, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + /** + * The date and time the work request was finished, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @param timeFinished the value to set + * @return this builder + **/ + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + /** + * The date and time the work request was updated, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the work request was updated, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestSummary build() { + WorkRequestSummary model = + new WorkRequestSummary( + this.operationType, + this.status, + this.id, + this.compartmentId, + this.resources, + this.percentComplete, + this.timeAccepted, + this.timeStarted, + this.timeFinished, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestSummary model) { + if (model.wasPropertyExplicitlySet("operationType")) { + this.operationType(model.getOperationType()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("percentComplete")) { + this.percentComplete(model.getPercentComplete()); + } + if (model.wasPropertyExplicitlySet("timeAccepted")) { + this.timeAccepted(model.getTimeAccepted()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The asynchronous operation tracked by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private final OperationType operationType; + + /** + * The asynchronous operation tracked by this work request. + * @return the value + **/ + public OperationType getOperationType() { + return operationType; + } + + /** + * The status of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final WorkRequestStatus status; + + /** + * The status of the work request. + * @return the value + **/ + public WorkRequestStatus getStatus() { + return status; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. + * + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The resources that are affected by this work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * The resources that are affected by this work request. + * @return the value + **/ + public java.util.List getResources() { + return resources; + } + + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the total work + * that must be performed. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private final Float percentComplete; + + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the total work + * that must be performed. + * + * @return the value + **/ + public Float getPercentComplete() { + return percentComplete; + } + + /** + * The date and time the work request was created, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private final java.util.Date timeAccepted; + + /** + * The date and time the work request was created, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeAccepted() { + return timeAccepted; + } + + /** + * The date and time the work request was started, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The date and time the work request was started, in the format defined by + * [RFC 3339](https://tools.ietf.org/html/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The date and time the work request was finished, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private final java.util.Date timeFinished; + + /** + * The date and time the work request was finished, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeFinished() { + return timeFinished; + } + + /** + * The date and time the work request was updated, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the work request was updated, in the format defined by + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestSummary("); + sb.append("super=").append(super.toString()); + sb.append("operationType=").append(String.valueOf(this.operationType)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", percentComplete=").append(String.valueOf(this.percentComplete)); + sb.append(", timeAccepted=").append(String.valueOf(this.timeAccepted)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestSummary)) { + return false; + } + + WorkRequestSummary other = (WorkRequestSummary) o; + return java.util.Objects.equals(this.operationType, other.operationType) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.percentComplete, other.percentComplete) + && java.util.Objects.equals(this.timeAccepted, other.timeAccepted) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeFinished, other.timeFinished) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.operationType == null ? 43 : this.operationType.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = + (result * PRIME) + + (this.percentComplete == null ? 43 : this.percentComplete.hashCode()); + result = (result * PRIME) + (this.timeAccepted == null ? 43 : this.timeAccepted.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestSummaryCollection.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestSummaryCollection.java new file mode 100644 index 00000000000..1496678521e --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestSummaryCollection.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * A list of work requests. Can contain both work requests and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestSummaryCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class WorkRequestSummaryCollection + extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public WorkRequestSummaryCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A list of work requests. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * A list of work requests. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestSummaryCollection build() { + WorkRequestSummaryCollection model = new WorkRequestSummaryCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestSummaryCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A list of work requests. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * A list of work requests. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestSummaryCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestSummaryCollection)) { + return false; + } + + WorkRequestSummaryCollection other = (WorkRequestSummaryCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicy.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicy.java new file mode 100644 index 00000000000..b7c4b33055e --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicy.java @@ -0,0 +1,719 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * A ZprPolicy is a rule that governs the communication between specific endpoints identified by their security attributes. + *

+ * To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to + * an administrator. If you're an administrator who needs to write policies to give users access, see + * [Getting Started with Policies](https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm). + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ZprPolicy.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ZprPolicy extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "name", + "description", + "compartmentId", + "statements", + "lifecycleState", + "timeCreated", + "freeformTags", + "definedTags", + "systemTags", + "lifecycleDetails", + "timeUpdated" + }) + public ZprPolicy( + String id, + String name, + String description, + String compartmentId, + java.util.List statements, + LifecycleState lifecycleState, + java.util.Date timeCreated, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + String lifecycleDetails, + java.util.Date timeUpdated) { + super(); + this.id = id; + this.name = name; + this.description = description; + this.compartmentId = compartmentId; + this.statements = statements; + this.lifecycleState = lifecycleState; + this.timeCreated = timeCreated; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + this.lifecycleDetails = lifecycleDetails; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL policies in the tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL policies in the tenancy. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * An array of ZprPolicy statements (up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("statements") + private java.util.List statements; + + /** + * An array of ZprPolicy statements (up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language. + * @param statements the value to set + * @return this builder + **/ + public Builder statements(java.util.List statements) { + this.statements = statements; + this.__explicitlySet__.add("statements"); + return this; + } + /** + * The current state of the ZprPolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the ZprPolicy. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The date and time the ZprPolicy was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the ZprPolicy was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * A message that describes the current state of the ZprPolicy in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of the ZprPolicy in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The date and time the ZprPolicy was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the ZprPolicy was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ZprPolicy build() { + ZprPolicy model = + new ZprPolicy( + this.id, + this.name, + this.description, + this.compartmentId, + this.statements, + this.lifecycleState, + this.timeCreated, + this.freeformTags, + this.definedTags, + this.systemTags, + this.lifecycleDetails, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ZprPolicy model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("statements")) { + this.statements(model.getStatements()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL policies in the tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL policies in the tenancy. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * An array of ZprPolicy statements (up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("statements") + private final java.util.List statements; + + /** + * An array of ZprPolicy statements (up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language. + * @return the value + **/ + public java.util.List getStatements() { + return statements; + } + + /** + * The current state of the ZprPolicy. + **/ + public enum LifecycleState { + Active("ACTIVE"), + Creating("CREATING"), + Failed("FAILED"), + Updating("UPDATING"), + Deleting("DELETING"), + Deleted("DELETED"), + NeedsAttention("NEEDS_ATTENTION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the ZprPolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the ZprPolicy. + * @return the value + **/ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The date and time the ZprPolicy was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the ZprPolicy was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + /** + * A message that describes the current state of the ZprPolicy in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of the ZprPolicy in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The date and time the ZprPolicy was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the ZprPolicy was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ZprPolicy("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", statements=").append(String.valueOf(this.statements)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ZprPolicy)) { + return false; + } + + ZprPolicy other = (ZprPolicy) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.statements, other.statements) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.statements == null ? 43 : this.statements.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicyCollection.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicyCollection.java new file mode 100644 index 00000000000..9b3fb504b47 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicyCollection.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * Results of a zprPolicy search. Contains both ZprPolicySummary items and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ZprPolicyCollection.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ZprPolicyCollection extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ZprPolicyCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * List of zprPolicies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of zprPolicies. + * @param items the value to set + * @return this builder + **/ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ZprPolicyCollection build() { + ZprPolicyCollection model = new ZprPolicyCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ZprPolicyCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * List of zprPolicies. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of zprPolicies. + * @return the value + **/ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ZprPolicyCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ZprPolicyCollection)) { + return false; + } + + ZprPolicyCollection other = (ZprPolicyCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicySummary.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicySummary.java new file mode 100644 index 00000000000..cf53c13bdb5 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicySummary.java @@ -0,0 +1,661 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * Summary information about a ZprPolicy. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ZprPolicySummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public final class ZprPolicySummary extends com.oracle.bmc.http.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "name", + "description", + "compartmentId", + "statements", + "lifecycleState", + "timeCreated", + "freeformTags", + "definedTags", + "systemTags", + "lifecycleDetails", + "timeUpdated" + }) + public ZprPolicySummary( + String id, + String name, + String description, + String compartmentId, + java.util.List statements, + ZprPolicy.LifecycleState lifecycleState, + java.util.Date timeCreated, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + String lifecycleDetails, + java.util.Date timeUpdated) { + super(); + this.id = id; + this.name = name; + this.description = description; + this.compartmentId = compartmentId; + this.statements = statements; + this.lifecycleState = lifecycleState; + this.timeCreated = timeCreated; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + this.lifecycleDetails = lifecycleDetails; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + * @param id the value to set + * @return this builder + **/ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL policies in the tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL policies in the tenancy. + * @param name the value to set + * @return this builder + **/ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable. + * @param description the value to set + * @return this builder + **/ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @param compartmentId the value to set + * @return this builder + **/ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("statements") + private java.util.List statements; + + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language. + * @param statements the value to set + * @return this builder + **/ + public Builder statements(java.util.List statements) { + this.statements = statements; + this.__explicitlySet__.add("statements"); + return this; + } + /** + * The current state of the ZprPolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private ZprPolicy.LifecycleState lifecycleState; + + /** + * The current state of the ZprPolicy. + * @param lifecycleState the value to set + * @return this builder + **/ + public Builder lifecycleState(ZprPolicy.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The date and time the ZprPolicy was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the ZprPolicy was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + **/ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + **/ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + **/ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + **/ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * A message that describes the current state of the ZprPolicy in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of the ZprPolicy in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @param lifecycleDetails the value to set + * @return this builder + **/ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The date and time the ZprPolicy was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the ZprPolicy was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + **/ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ZprPolicySummary build() { + ZprPolicySummary model = + new ZprPolicySummary( + this.id, + this.name, + this.description, + this.compartmentId, + this.statements, + this.lifecycleState, + this.timeCreated, + this.freeformTags, + this.definedTags, + this.systemTags, + this.lifecycleDetails, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ZprPolicySummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("statements")) { + this.statements(model.getStatements()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + return this; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + * @return the value + **/ + public String getId() { + return id; + } + + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL policies in the tenancy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL policies in the tenancy. + * @return the value + **/ + public String getName() { + return name; + } + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable. + * @return the value + **/ + public String getDescription() { + return description; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + * @return the value + **/ + public String getCompartmentId() { + return compartmentId; + } + + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("statements") + private final java.util.List statements; + + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language. + * @return the value + **/ + public java.util.List getStatements() { + return statements; + } + + /** + * The current state of the ZprPolicy. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final ZprPolicy.LifecycleState lifecycleState; + + /** + * The current state of the ZprPolicy. + * @return the value + **/ + public ZprPolicy.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The date and time the ZprPolicy was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the ZprPolicy was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Department": "Finance"}} + * + * @return the value + **/ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + *

+ * Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + **/ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + *

+ * Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + **/ + public java.util.Map> getSystemTags() { + return systemTags; + } + + /** + * A message that describes the current state of the ZprPolicy in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of the ZprPolicy in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @return the value + **/ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The date and time the ZprPolicy was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the ZprPolicy was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). + *

+ * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + **/ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ZprPolicySummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", statements=").append(String.valueOf(this.statements)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ZprPolicySummary)) { + return false; + } + + ZprPolicySummary other = (ZprPolicySummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.statements, other.statements) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.statements == null ? 43 : this.statements.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/CreateConfigurationRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/CreateConfigurationRequest.java new file mode 100644 index 00000000000..052ee30fe42 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/CreateConfigurationRequest.java @@ -0,0 +1,337 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use CreateConfigurationRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class CreateConfigurationRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.zpr.model.CreateConfigurationDetails> { + + /** + * Details for ZPR configuration in the tenancy. + */ + private com.oracle.bmc.zpr.model.CreateConfigurationDetails createConfigurationDetails; + + /** + * Details for ZPR configuration in the tenancy. + */ + public com.oracle.bmc.zpr.model.CreateConfigurationDetails getCreateConfigurationDetails() { + return createConfigurationDetails; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + */ + private Boolean opcDryRun; + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + */ + public Boolean getOpcDryRun() { + return opcDryRun; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.zpr.model.CreateConfigurationDetails getBody$() { + return createConfigurationDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateConfigurationRequest, + com.oracle.bmc.zpr.model.CreateConfigurationDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for ZPR configuration in the tenancy. + */ + private com.oracle.bmc.zpr.model.CreateConfigurationDetails createConfigurationDetails = + null; + + /** + * Details for ZPR configuration in the tenancy. + * @param createConfigurationDetails the value to set + * @return this builder instance + */ + public Builder createConfigurationDetails( + com.oracle.bmc.zpr.model.CreateConfigurationDetails createConfigurationDetails) { + this.createConfigurationDetails = createConfigurationDetails; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + */ + private Boolean opcDryRun = null; + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + * @param opcDryRun the value to set + * @return this builder instance + */ + public Builder opcDryRun(Boolean opcDryRun) { + this.opcDryRun = opcDryRun; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateConfigurationRequest o) { + createConfigurationDetails(o.getCreateConfigurationDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + opcDryRun(o.getOpcDryRun()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateConfigurationRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateConfigurationRequest + */ + public CreateConfigurationRequest build() { + CreateConfigurationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.zpr.model.CreateConfigurationDetails body) { + createConfigurationDetails(body); + return this; + } + + /** + * Build the instance of CreateConfigurationRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateConfigurationRequest + */ + public CreateConfigurationRequest buildWithoutInvocationCallback() { + CreateConfigurationRequest request = new CreateConfigurationRequest(); + request.createConfigurationDetails = createConfigurationDetails; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + request.opcDryRun = opcDryRun; + return request; + // new CreateConfigurationRequest(createConfigurationDetails, opcRequestId, opcRetryToken, opcDryRun); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createConfigurationDetails(createConfigurationDetails) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken) + .opcDryRun(opcDryRun); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createConfigurationDetails=") + .append(String.valueOf(this.createConfigurationDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcDryRun=").append(String.valueOf(this.opcDryRun)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateConfigurationRequest)) { + return false; + } + + CreateConfigurationRequest other = (CreateConfigurationRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createConfigurationDetails, other.createConfigurationDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcDryRun, other.opcDryRun); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createConfigurationDetails == null + ? 43 + : this.createConfigurationDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcDryRun == null ? 43 : this.opcDryRun.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/CreateZprPolicyRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/CreateZprPolicyRequest.java new file mode 100644 index 00000000000..d7c46e71889 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/CreateZprPolicyRequest.java @@ -0,0 +1,334 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use CreateZprPolicyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class CreateZprPolicyRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.zpr.model.CreateZprPolicyDetails> { + + /** + * Details for the new ZprPolicy. + */ + private com.oracle.bmc.zpr.model.CreateZprPolicyDetails createZprPolicyDetails; + + /** + * Details for the new ZprPolicy. + */ + public com.oracle.bmc.zpr.model.CreateZprPolicyDetails getCreateZprPolicyDetails() { + return createZprPolicyDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + */ + private Boolean opcDryRun; + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + */ + public Boolean getOpcDryRun() { + return opcDryRun; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.zpr.model.CreateZprPolicyDetails getBody$() { + return createZprPolicyDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateZprPolicyRequest, com.oracle.bmc.zpr.model.CreateZprPolicyDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Details for the new ZprPolicy. + */ + private com.oracle.bmc.zpr.model.CreateZprPolicyDetails createZprPolicyDetails = null; + + /** + * Details for the new ZprPolicy. + * @param createZprPolicyDetails the value to set + * @return this builder instance + */ + public Builder createZprPolicyDetails( + com.oracle.bmc.zpr.model.CreateZprPolicyDetails createZprPolicyDetails) { + this.createZprPolicyDetails = createZprPolicyDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + */ + private Boolean opcDryRun = null; + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + * @param opcDryRun the value to set + * @return this builder instance + */ + public Builder opcDryRun(Boolean opcDryRun) { + this.opcDryRun = opcDryRun; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateZprPolicyRequest o) { + createZprPolicyDetails(o.getCreateZprPolicyDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + opcDryRun(o.getOpcDryRun()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateZprPolicyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateZprPolicyRequest + */ + public CreateZprPolicyRequest build() { + CreateZprPolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.zpr.model.CreateZprPolicyDetails body) { + createZprPolicyDetails(body); + return this; + } + + /** + * Build the instance of CreateZprPolicyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateZprPolicyRequest + */ + public CreateZprPolicyRequest buildWithoutInvocationCallback() { + CreateZprPolicyRequest request = new CreateZprPolicyRequest(); + request.createZprPolicyDetails = createZprPolicyDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.opcDryRun = opcDryRun; + return request; + // new CreateZprPolicyRequest(createZprPolicyDetails, opcRetryToken, opcRequestId, opcDryRun); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createZprPolicyDetails(createZprPolicyDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .opcDryRun(opcDryRun); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createZprPolicyDetails=").append(String.valueOf(this.createZprPolicyDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcDryRun=").append(String.valueOf(this.opcDryRun)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateZprPolicyRequest)) { + return false; + } + + CreateZprPolicyRequest other = (CreateZprPolicyRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createZprPolicyDetails, other.createZprPolicyDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcDryRun, other.opcDryRun); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createZprPolicyDetails == null + ? 43 + : this.createZprPolicyDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcDryRun == null ? 43 : this.opcDryRun.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/DeleteZprPolicyRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/DeleteZprPolicyRequest.java new file mode 100644 index 00000000000..eb5d5f0416d --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/DeleteZprPolicyRequest.java @@ -0,0 +1,299 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use DeleteZprPolicyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class DeleteZprPolicyRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + */ + private String zprPolicyId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + */ + public String getZprPolicyId() { + return zprPolicyId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + */ + private Boolean opcDryRun; + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + */ + public Boolean getOpcDryRun() { + return opcDryRun; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteZprPolicyRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + */ + private String zprPolicyId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + * @param zprPolicyId the value to set + * @return this builder instance + */ + public Builder zprPolicyId(String zprPolicyId) { + this.zprPolicyId = zprPolicyId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + */ + private Boolean opcDryRun = null; + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + * @param opcDryRun the value to set + * @return this builder instance + */ + public Builder opcDryRun(Boolean opcDryRun) { + this.opcDryRun = opcDryRun; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteZprPolicyRequest o) { + zprPolicyId(o.getZprPolicyId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcDryRun(o.getOpcDryRun()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteZprPolicyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteZprPolicyRequest + */ + public DeleteZprPolicyRequest build() { + DeleteZprPolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteZprPolicyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteZprPolicyRequest + */ + public DeleteZprPolicyRequest buildWithoutInvocationCallback() { + DeleteZprPolicyRequest request = new DeleteZprPolicyRequest(); + request.zprPolicyId = zprPolicyId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcDryRun = opcDryRun; + return request; + // new DeleteZprPolicyRequest(zprPolicyId, ifMatch, opcRequestId, opcDryRun); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .zprPolicyId(zprPolicyId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcDryRun(opcDryRun); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",zprPolicyId=").append(String.valueOf(this.zprPolicyId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcDryRun=").append(String.valueOf(this.opcDryRun)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteZprPolicyRequest)) { + return false; + } + + DeleteZprPolicyRequest other = (DeleteZprPolicyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.zprPolicyId, other.zprPolicyId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcDryRun, other.opcDryRun); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.zprPolicyId == null ? 43 : this.zprPolicyId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcDryRun == null ? 43 : this.opcDryRun.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetConfigurationRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetConfigurationRequest.java new file mode 100644 index 00000000000..12eaaca30d2 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetConfigurationRequest.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use GetConfigurationRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class GetConfigurationRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetConfigurationRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetConfigurationRequest o) { + compartmentId(o.getCompartmentId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetConfigurationRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetConfigurationRequest + */ + public GetConfigurationRequest build() { + GetConfigurationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetConfigurationRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetConfigurationRequest + */ + public GetConfigurationRequest buildWithoutInvocationCallback() { + GetConfigurationRequest request = new GetConfigurationRequest(); + request.compartmentId = compartmentId; + request.opcRequestId = opcRequestId; + return request; + // new GetConfigurationRequest(compartmentId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().compartmentId(compartmentId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetConfigurationRequest)) { + return false; + } + + GetConfigurationRequest other = (GetConfigurationRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprConfigurationWorkRequestRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprConfigurationWorkRequestRequest.java new file mode 100644 index 00000000000..1df2a267975 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprConfigurationWorkRequestRequest.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use GetZprConfigurationWorkRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class GetZprConfigurationWorkRequestRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetZprConfigurationWorkRequestRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetZprConfigurationWorkRequestRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetZprConfigurationWorkRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetZprConfigurationWorkRequestRequest + */ + public GetZprConfigurationWorkRequestRequest build() { + GetZprConfigurationWorkRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetZprConfigurationWorkRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetZprConfigurationWorkRequestRequest + */ + public GetZprConfigurationWorkRequestRequest buildWithoutInvocationCallback() { + GetZprConfigurationWorkRequestRequest request = + new GetZprConfigurationWorkRequestRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + return request; + // new GetZprConfigurationWorkRequestRequest(workRequestId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().workRequestId(workRequestId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetZprConfigurationWorkRequestRequest)) { + return false; + } + + GetZprConfigurationWorkRequestRequest other = (GetZprConfigurationWorkRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprPolicyRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprPolicyRequest.java new file mode 100644 index 00000000000..fcf2c7e20a0 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprPolicyRequest.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use GetZprPolicyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class GetZprPolicyRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + */ + private String zprPolicyId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + */ + public String getZprPolicyId() { + return zprPolicyId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetZprPolicyRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + */ + private String zprPolicyId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + * @param zprPolicyId the value to set + * @return this builder instance + */ + public Builder zprPolicyId(String zprPolicyId) { + this.zprPolicyId = zprPolicyId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetZprPolicyRequest o) { + zprPolicyId(o.getZprPolicyId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetZprPolicyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetZprPolicyRequest + */ + public GetZprPolicyRequest build() { + GetZprPolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetZprPolicyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetZprPolicyRequest + */ + public GetZprPolicyRequest buildWithoutInvocationCallback() { + GetZprPolicyRequest request = new GetZprPolicyRequest(); + request.zprPolicyId = zprPolicyId; + request.opcRequestId = opcRequestId; + return request; + // new GetZprPolicyRequest(zprPolicyId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().zprPolicyId(zprPolicyId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",zprPolicyId=").append(String.valueOf(this.zprPolicyId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetZprPolicyRequest)) { + return false; + } + + GetZprPolicyRequest other = (GetZprPolicyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.zprPolicyId, other.zprPolicyId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.zprPolicyId == null ? 43 : this.zprPolicyId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprPolicyWorkRequestRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprPolicyWorkRequestRequest.java new file mode 100644 index 00000000000..03f78737d5e --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprPolicyWorkRequestRequest.java @@ -0,0 +1,212 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use GetZprPolicyWorkRequestRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class GetZprPolicyWorkRequestRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetZprPolicyWorkRequestRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetZprPolicyWorkRequestRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetZprPolicyWorkRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetZprPolicyWorkRequestRequest + */ + public GetZprPolicyWorkRequestRequest build() { + GetZprPolicyWorkRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetZprPolicyWorkRequestRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetZprPolicyWorkRequestRequest + */ + public GetZprPolicyWorkRequestRequest buildWithoutInvocationCallback() { + GetZprPolicyWorkRequestRequest request = new GetZprPolicyWorkRequestRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + return request; + // new GetZprPolicyWorkRequestRequest(workRequestId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().workRequestId(workRequestId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetZprPolicyWorkRequestRequest)) { + return false; + } + + GetZprPolicyWorkRequestRequest other = (GetZprPolicyWorkRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestErrorsRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestErrorsRequest.java new file mode 100644 index 00000000000..bc1749a0407 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestErrorsRequest.java @@ -0,0 +1,408 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use ListZprConfigurationWorkRequestErrorsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprConfigurationWorkRequestErrorsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public Integer getLimit() { + return limit; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + **/ + public enum SortBy { + Timestamp("timestamp"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.zpr.model.SortOrder getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListZprConfigurationWorkRequestErrorsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.zpr.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListZprConfigurationWorkRequestErrorsRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListZprConfigurationWorkRequestErrorsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListZprConfigurationWorkRequestErrorsRequest + */ + public ListZprConfigurationWorkRequestErrorsRequest build() { + ListZprConfigurationWorkRequestErrorsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListZprConfigurationWorkRequestErrorsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListZprConfigurationWorkRequestErrorsRequest + */ + public ListZprConfigurationWorkRequestErrorsRequest buildWithoutInvocationCallback() { + ListZprConfigurationWorkRequestErrorsRequest request = + new ListZprConfigurationWorkRequestErrorsRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListZprConfigurationWorkRequestErrorsRequest(workRequestId, opcRequestId, page, limit, sortBy, sortOrder); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .workRequestId(workRequestId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortBy(sortBy) + .sortOrder(sortOrder); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprConfigurationWorkRequestErrorsRequest)) { + return false; + } + + ListZprConfigurationWorkRequestErrorsRequest other = + (ListZprConfigurationWorkRequestErrorsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestLogsRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestLogsRequest.java new file mode 100644 index 00000000000..a63ea2d0e96 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestLogsRequest.java @@ -0,0 +1,408 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use ListZprConfigurationWorkRequestLogsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprConfigurationWorkRequestLogsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public Integer getLimit() { + return limit; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + **/ + public enum SortBy { + Timestamp("timestamp"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.zpr.model.SortOrder getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListZprConfigurationWorkRequestLogsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.zpr.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListZprConfigurationWorkRequestLogsRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListZprConfigurationWorkRequestLogsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListZprConfigurationWorkRequestLogsRequest + */ + public ListZprConfigurationWorkRequestLogsRequest build() { + ListZprConfigurationWorkRequestLogsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListZprConfigurationWorkRequestLogsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListZprConfigurationWorkRequestLogsRequest + */ + public ListZprConfigurationWorkRequestLogsRequest buildWithoutInvocationCallback() { + ListZprConfigurationWorkRequestLogsRequest request = + new ListZprConfigurationWorkRequestLogsRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListZprConfigurationWorkRequestLogsRequest(workRequestId, opcRequestId, page, limit, sortBy, sortOrder); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .workRequestId(workRequestId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortBy(sortBy) + .sortOrder(sortOrder); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprConfigurationWorkRequestLogsRequest)) { + return false; + } + + ListZprConfigurationWorkRequestLogsRequest other = + (ListZprConfigurationWorkRequestLogsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestsRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestsRequest.java new file mode 100644 index 00000000000..2b86c8774a8 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestsRequest.java @@ -0,0 +1,505 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use ListZprConfigurationWorkRequestsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprConfigurationWorkRequestsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * A filter to return only the resources that match the given lifecycle state. + */ + private com.oracle.bmc.zpr.model.WorkRequestStatus status; + + /** + * A filter to return only the resources that match the given lifecycle state. + */ + public com.oracle.bmc.zpr.model.WorkRequestStatus getStatus() { + return status; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource affected by the work request. + */ + private String resourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource affected by the work request. + */ + public String getResourceId() { + return resourceId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public Integer getLimit() { + return limit; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.zpr.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timeAccepted} is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timeAccepted} is descending. + * + **/ + public enum SortBy { + TimeAccepted("timeAccepted"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timeAccepted} is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListZprConfigurationWorkRequestsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * A filter to return only the resources that match the given lifecycle state. + */ + private com.oracle.bmc.zpr.model.WorkRequestStatus status = null; + + /** + * A filter to return only the resources that match the given lifecycle state. + * @param status the value to set + * @return this builder instance + */ + public Builder status(com.oracle.bmc.zpr.model.WorkRequestStatus status) { + this.status = status; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource affected by the work request. + */ + private String resourceId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource affected by the work request. + * @param resourceId the value to set + * @return this builder instance + */ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.zpr.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timeAccepted} is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timeAccepted} is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListZprConfigurationWorkRequestsRequest o) { + compartmentId(o.getCompartmentId()); + workRequestId(o.getWorkRequestId()); + status(o.getStatus()); + resourceId(o.getResourceId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListZprConfigurationWorkRequestsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListZprConfigurationWorkRequestsRequest + */ + public ListZprConfigurationWorkRequestsRequest build() { + ListZprConfigurationWorkRequestsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListZprConfigurationWorkRequestsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListZprConfigurationWorkRequestsRequest + */ + public ListZprConfigurationWorkRequestsRequest buildWithoutInvocationCallback() { + ListZprConfigurationWorkRequestsRequest request = + new ListZprConfigurationWorkRequestsRequest(); + request.compartmentId = compartmentId; + request.workRequestId = workRequestId; + request.status = status; + request.resourceId = resourceId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + return request; + // new ListZprConfigurationWorkRequestsRequest(compartmentId, workRequestId, status, resourceId, opcRequestId, page, limit, sortOrder, sortBy); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .workRequestId(workRequestId) + .status(status) + .resourceId(resourceId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortOrder(sortOrder) + .sortBy(sortBy); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",status=").append(String.valueOf(this.status)); + sb.append(",resourceId=").append(String.valueOf(this.resourceId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprConfigurationWorkRequestsRequest)) { + return false; + } + + ListZprConfigurationWorkRequestsRequest other = (ListZprConfigurationWorkRequestsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPoliciesRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPoliciesRequest.java new file mode 100644 index 00000000000..abfea0e6ec7 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPoliciesRequest.java @@ -0,0 +1,518 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use ListZprPoliciesRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprPoliciesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + private com.oracle.bmc.zpr.model.ZprPolicy.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + public com.oracle.bmc.zpr.model.ZprPolicy.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** + * A filter to return only resources that match the entire display name given. + */ + private String name; + + /** + * A filter to return only resources that match the entire display name given. + */ + public String getName() { + return name; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + */ + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + */ + public String getId() { + return id; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public Integer getLimit() { + return limit; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.zpr.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code name} is ascending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code name} is ascending. + * + **/ + public enum SortBy { + TimeCreated("timeCreated"), + Name("name"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code name} is ascending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListZprPoliciesRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + */ + private com.oracle.bmc.zpr.model.ZprPolicy.LifecycleState lifecycleState = null; + + /** + * A filter to return only resources that match the given lifecycle state. The + * state value is case-insensitive. + * + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.zpr.model.ZprPolicy.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * A filter to return only resources that match the entire display name given. + */ + private String name = null; + + /** + * A filter to return only resources that match the entire display name given. + * @param name the value to set + * @return this builder instance + */ + public Builder name(String name) { + this.name = name; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + */ + private String id = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.zpr.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code name} is ascending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code timeCreated} + * is descending. Default order for {@code name} is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListZprPoliciesRequest o) { + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + name(o.getName()); + id(o.getId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListZprPoliciesRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListZprPoliciesRequest + */ + public ListZprPoliciesRequest build() { + ListZprPoliciesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListZprPoliciesRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListZprPoliciesRequest + */ + public ListZprPoliciesRequest buildWithoutInvocationCallback() { + ListZprPoliciesRequest request = new ListZprPoliciesRequest(); + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.name = name; + request.id = id; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListZprPoliciesRequest(compartmentId, lifecycleState, name, id, limit, page, sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .lifecycleState(lifecycleState) + .name(name) + .id(id) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",name=").append(String.valueOf(this.name)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprPoliciesRequest)) { + return false; + } + + ListZprPoliciesRequest other = (ListZprPoliciesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestErrorsRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestErrorsRequest.java new file mode 100644 index 00000000000..ae6bd3a7d12 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestErrorsRequest.java @@ -0,0 +1,407 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use ListZprPolicyWorkRequestErrorsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprPolicyWorkRequestErrorsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public Integer getLimit() { + return limit; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + **/ + public enum SortBy { + Timestamp("timestamp"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.zpr.model.SortOrder getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListZprPolicyWorkRequestErrorsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.zpr.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListZprPolicyWorkRequestErrorsRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListZprPolicyWorkRequestErrorsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListZprPolicyWorkRequestErrorsRequest + */ + public ListZprPolicyWorkRequestErrorsRequest build() { + ListZprPolicyWorkRequestErrorsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListZprPolicyWorkRequestErrorsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListZprPolicyWorkRequestErrorsRequest + */ + public ListZprPolicyWorkRequestErrorsRequest buildWithoutInvocationCallback() { + ListZprPolicyWorkRequestErrorsRequest request = + new ListZprPolicyWorkRequestErrorsRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListZprPolicyWorkRequestErrorsRequest(workRequestId, opcRequestId, page, limit, sortBy, sortOrder); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .workRequestId(workRequestId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortBy(sortBy) + .sortOrder(sortOrder); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprPolicyWorkRequestErrorsRequest)) { + return false; + } + + ListZprPolicyWorkRequestErrorsRequest other = (ListZprPolicyWorkRequestErrorsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestLogsRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestLogsRequest.java new file mode 100644 index 00000000000..eadadd8a989 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestLogsRequest.java @@ -0,0 +1,406 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use ListZprPolicyWorkRequestLogsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprPolicyWorkRequestLogsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public Integer getLimit() { + return limit; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + **/ + public enum SortBy { + Timestamp("timestamp"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.zpr.model.SortOrder getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListZprPolicyWorkRequestLogsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timestamp} is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.zpr.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListZprPolicyWorkRequestLogsRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListZprPolicyWorkRequestLogsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListZprPolicyWorkRequestLogsRequest + */ + public ListZprPolicyWorkRequestLogsRequest build() { + ListZprPolicyWorkRequestLogsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListZprPolicyWorkRequestLogsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListZprPolicyWorkRequestLogsRequest + */ + public ListZprPolicyWorkRequestLogsRequest buildWithoutInvocationCallback() { + ListZprPolicyWorkRequestLogsRequest request = new ListZprPolicyWorkRequestLogsRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListZprPolicyWorkRequestLogsRequest(workRequestId, opcRequestId, page, limit, sortBy, sortOrder); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .workRequestId(workRequestId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortBy(sortBy) + .sortOrder(sortOrder); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprPolicyWorkRequestLogsRequest)) { + return false; + } + + ListZprPolicyWorkRequestLogsRequest other = (ListZprPolicyWorkRequestLogsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestsRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestsRequest.java new file mode 100644 index 00000000000..62ecbabb6dd --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestsRequest.java @@ -0,0 +1,504 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use ListZprPolicyWorkRequestsRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprPolicyWorkRequestsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * A filter to return only the resources that match the given lifecycle state. + */ + private com.oracle.bmc.zpr.model.WorkRequestStatus status; + + /** + * A filter to return only the resources that match the given lifecycle state. + */ + public com.oracle.bmc.zpr.model.WorkRequestStatus getStatus() { + return status; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource affected by the work request. + */ + private String resourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource affected by the work request. + */ + public String getResourceId() { + return resourceId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public String getPage() { + return page; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + public Integer getLimit() { + return limit; + } + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + public com.oracle.bmc.zpr.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timeAccepted} is descending. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timeAccepted} is descending. + * + **/ + public enum SortBy { + TimeAccepted("timeAccepted"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timeAccepted} is descending. + * + */ + public SortBy getSortBy() { + return sortBy; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListZprPolicyWorkRequestsRequest, java.lang.Void> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * A filter to return only the resources that match the given lifecycle state. + */ + private com.oracle.bmc.zpr.model.WorkRequestStatus status = null; + + /** + * A filter to return only the resources that match the given lifecycle state. + * @param status the value to set + * @return this builder instance + */ + public Builder status(com.oracle.bmc.zpr.model.WorkRequestStatus status) { + this.status = status; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource affected by the work request. + */ + private String resourceId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource affected by the work request. + * @param resourceId the value to set + * @return this builder instance + */ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.zpr.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timeAccepted} is descending. + * + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code timeAccepted} is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListZprPolicyWorkRequestsRequest o) { + compartmentId(o.getCompartmentId()); + workRequestId(o.getWorkRequestId()); + status(o.getStatus()); + resourceId(o.getResourceId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListZprPolicyWorkRequestsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListZprPolicyWorkRequestsRequest + */ + public ListZprPolicyWorkRequestsRequest build() { + ListZprPolicyWorkRequestsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListZprPolicyWorkRequestsRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListZprPolicyWorkRequestsRequest + */ + public ListZprPolicyWorkRequestsRequest buildWithoutInvocationCallback() { + ListZprPolicyWorkRequestsRequest request = new ListZprPolicyWorkRequestsRequest(); + request.compartmentId = compartmentId; + request.workRequestId = workRequestId; + request.status = status; + request.resourceId = resourceId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + return request; + // new ListZprPolicyWorkRequestsRequest(compartmentId, workRequestId, status, resourceId, opcRequestId, page, limit, sortOrder, sortBy); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .workRequestId(workRequestId) + .status(status) + .resourceId(resourceId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortOrder(sortOrder) + .sortBy(sortBy); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",status=").append(String.valueOf(this.status)); + sb.append(",resourceId=").append(String.valueOf(this.resourceId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprPolicyWorkRequestsRequest)) { + return false; + } + + ListZprPolicyWorkRequestsRequest other = (ListZprPolicyWorkRequestsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/UpdateZprPolicyRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/UpdateZprPolicyRequest.java new file mode 100644 index 00000000000..772293431fc --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/UpdateZprPolicyRequest.java @@ -0,0 +1,414 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use UpdateZprPolicyRequest. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class UpdateZprPolicyRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.zpr.model.UpdateZprPolicyDetails> { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + */ + private String zprPolicyId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + */ + public String getZprPolicyId() { + return zprPolicyId; + } + /** + * The information to be updated. + */ + private com.oracle.bmc.zpr.model.UpdateZprPolicyDetails updateZprPolicyDetails; + + /** + * The information to be updated. + */ + public com.oracle.bmc.zpr.model.UpdateZprPolicyDetails getUpdateZprPolicyDetails() { + return updateZprPolicyDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + */ + private Boolean opcDryRun; + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + */ + public Boolean getOpcDryRun() { + return opcDryRun; + } + + /** + * Alternative accessor for the body parameter. + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.zpr.model.UpdateZprPolicyDetails getBody$() { + return updateZprPolicyDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateZprPolicyRequest, com.oracle.bmc.zpr.model.UpdateZprPolicyDetails> { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + */ + private String zprPolicyId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ZprPolicy. + * @param zprPolicyId the value to set + * @return this builder instance + */ + public Builder zprPolicyId(String zprPolicyId) { + this.zprPolicyId = zprPolicyId; + return this; + } + + /** + * The information to be updated. + */ + private com.oracle.bmc.zpr.model.UpdateZprPolicyDetails updateZprPolicyDetails = null; + + /** + * The information to be updated. + * @param updateZprPolicyDetails the value to set + * @return this builder instance + */ + public Builder updateZprPolicyDetails( + com.oracle.bmc.zpr.model.UpdateZprPolicyDetails updateZprPolicyDetails) { + this.updateZprPolicyDetails = updateZprPolicyDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations. For example, if a resource + * has been deleted and removed from the system, then a retry of the original creation request + * might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code if-match} parameter to the value of the etag from a previous GET or POST response for + * that resource. The resource will be updated or deleted only if the etag you provide + * matches the resource's current etag value. + * + * @param ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * The only valid characters for request IDs are letters, numbers, + * underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + */ + private Boolean opcDryRun = null; + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify the + * configuration item details and is used only to perform validation on the submitted data. + * + * @param opcDryRun the value to set + * @return this builder instance + */ + public Builder opcDryRun(Boolean opcDryRun) { + this.opcDryRun = opcDryRun; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateZprPolicyRequest o) { + zprPolicyId(o.getZprPolicyId()); + updateZprPolicyDetails(o.getUpdateZprPolicyDetails()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcDryRun(o.getOpcDryRun()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateZprPolicyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateZprPolicyRequest + */ + public UpdateZprPolicyRequest build() { + UpdateZprPolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.zpr.model.UpdateZprPolicyDetails body) { + updateZprPolicyDetails(body); + return this; + } + + /** + * Build the instance of UpdateZprPolicyRequest as configured by this builder + * + * Note that this method does not take calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateZprPolicyRequest + */ + public UpdateZprPolicyRequest buildWithoutInvocationCallback() { + UpdateZprPolicyRequest request = new UpdateZprPolicyRequest(); + request.zprPolicyId = zprPolicyId; + request.updateZprPolicyDetails = updateZprPolicyDetails; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcDryRun = opcDryRun; + return request; + // new UpdateZprPolicyRequest(zprPolicyId, updateZprPolicyDetails, opcRetryToken, ifMatch, opcRequestId, opcDryRun); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .zprPolicyId(zprPolicyId) + .updateZprPolicyDetails(updateZprPolicyDetails) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcDryRun(opcDryRun); + } + + /** + * Return a new builder for this request object. + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",zprPolicyId=").append(String.valueOf(this.zprPolicyId)); + sb.append(",updateZprPolicyDetails=").append(String.valueOf(this.updateZprPolicyDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcDryRun=").append(String.valueOf(this.opcDryRun)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateZprPolicyRequest)) { + return false; + } + + UpdateZprPolicyRequest other = (UpdateZprPolicyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.zprPolicyId, other.zprPolicyId) + && java.util.Objects.equals( + this.updateZprPolicyDetails, other.updateZprPolicyDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcDryRun, other.opcDryRun); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.zprPolicyId == null ? 43 : this.zprPolicyId.hashCode()); + result = + (result * PRIME) + + (this.updateZprPolicyDetails == null + ? 43 + : this.updateZprPolicyDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcDryRun == null ? 43 : this.opcDryRun.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/CreateConfigurationResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/CreateConfigurationResponse.java new file mode 100644 index 00000000000..cf06ce37a40 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/CreateConfigurationResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class CreateConfigurationResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private CreateConfigurationResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateConfigurationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateConfigurationResponse build() { + return new CreateConfigurationResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateConfigurationResponse)) { + return false; + } + + CreateConfigurationResponse other = (CreateConfigurationResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/CreateZprPolicyResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/CreateZprPolicyResponse.java new file mode 100644 index 00000000000..e724f28e502 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/CreateZprPolicyResponse.java @@ -0,0 +1,290 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class CreateZprPolicyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * URL of the ZprPolicy resource. The zprPolicy OCID is generated after this request is sent. + */ + private String location; + + /** + * URL of the ZprPolicy resource. The zprPolicy OCID is generated after this request is sent. + * @return the value + */ + public String getLocation() { + return location; + } + + /** + * Same as location. + */ + private String contentLocation; + + /** + * Same as location. + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * The returned ZprPolicy instance. + */ + private com.oracle.bmc.zpr.model.ZprPolicy zprPolicy; + + /** + * The returned ZprPolicy instance. + * @return the value + */ + public com.oracle.bmc.zpr.model.ZprPolicy getZprPolicy() { + return zprPolicy; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "contentLocation", + "opcRequestId", + "opcWorkRequestId", + "zprPolicy" + }) + private CreateZprPolicyResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String location, + String contentLocation, + String opcRequestId, + String opcWorkRequestId, + com.oracle.bmc.zpr.model.ZprPolicy zprPolicy) { + super(__httpStatusCode__, headers); + this.location = location; + this.contentLocation = contentLocation; + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + this.zprPolicy = zprPolicy; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * URL of the ZprPolicy resource. The zprPolicy OCID is generated after this request is sent. + */ + private String location; + + /** + * URL of the ZprPolicy resource. The zprPolicy OCID is generated after this request is sent. + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** + * Same as location. + */ + private String contentLocation; + + /** + * Same as location. + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * The returned ZprPolicy instance. + */ + private com.oracle.bmc.zpr.model.ZprPolicy zprPolicy; + + /** + * The returned ZprPolicy instance. + * @param zprPolicy the value to set + * @return this builder + */ + public Builder zprPolicy(com.oracle.bmc.zpr.model.ZprPolicy zprPolicy) { + this.zprPolicy = zprPolicy; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateZprPolicyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + zprPolicy(o.getZprPolicy()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public CreateZprPolicyResponse build() { + return new CreateZprPolicyResponse( + __httpStatusCode__, + headers, + location, + contentLocation, + opcRequestId, + opcWorkRequestId, + zprPolicy); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",zprPolicy=").append(String.valueOf(zprPolicy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateZprPolicyResponse)) { + return false; + } + + CreateZprPolicyResponse other = (CreateZprPolicyResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.zprPolicy, other.zprPolicy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.zprPolicy == null ? 43 : this.zprPolicy.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/DeleteZprPolicyResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/DeleteZprPolicyResponse.java new file mode 100644 index 00000000000..b1b560dcd3d --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/DeleteZprPolicyResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class DeleteZprPolicyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private DeleteZprPolicyResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteZprPolicyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public DeleteZprPolicyResponse build() { + return new DeleteZprPolicyResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteZprPolicyResponse)) { + return false; + } + + DeleteZprPolicyResponse other = (DeleteZprPolicyResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetConfigurationResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetConfigurationResponse.java new file mode 100644 index 00000000000..05d28ad3223 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetConfigurationResponse.java @@ -0,0 +1,212 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class GetConfigurationResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned Configuration instance. + */ + private com.oracle.bmc.zpr.model.Configuration configuration; + + /** + * The returned Configuration instance. + * @return the value + */ + public com.oracle.bmc.zpr.model.Configuration getConfiguration() { + return configuration; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "configuration" + }) + private GetConfigurationResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + com.oracle.bmc.zpr.model.Configuration configuration) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.configuration = configuration; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned Configuration instance. + */ + private com.oracle.bmc.zpr.model.Configuration configuration; + + /** + * The returned Configuration instance. + * @param configuration the value to set + * @return this builder + */ + public Builder configuration(com.oracle.bmc.zpr.model.Configuration configuration) { + this.configuration = configuration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetConfigurationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + configuration(o.getConfiguration()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetConfigurationResponse build() { + return new GetConfigurationResponse( + __httpStatusCode__, headers, etag, opcRequestId, configuration); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",configuration=").append(String.valueOf(configuration)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetConfigurationResponse)) { + return false; + } + + GetConfigurationResponse other = (GetConfigurationResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.configuration, other.configuration); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.configuration == null ? 43 : this.configuration.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprConfigurationWorkRequestResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprConfigurationWorkRequestResponse.java new file mode 100644 index 00000000000..c38f0ecb511 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprConfigurationWorkRequestResponse.java @@ -0,0 +1,245 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class GetZprConfigurationWorkRequestResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @return the value + */ + public Integer getRetryAfter() { + return retryAfter; + } + + /** + * The returned WorkRequest instance. + */ + private com.oracle.bmc.zpr.model.WorkRequest workRequest; + + /** + * The returned WorkRequest instance. + * @return the value + */ + public com.oracle.bmc.zpr.model.WorkRequest getWorkRequest() { + return workRequest; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "retryAfter", + "workRequest" + }) + private GetZprConfigurationWorkRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + Integer retryAfter, + com.oracle.bmc.zpr.model.WorkRequest workRequest) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + this.workRequest = workRequest; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @param retryAfter the value to set + * @return this builder + */ + public Builder retryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * The returned WorkRequest instance. + */ + private com.oracle.bmc.zpr.model.WorkRequest workRequest; + + /** + * The returned WorkRequest instance. + * @param workRequest the value to set + * @return this builder + */ + public Builder workRequest(com.oracle.bmc.zpr.model.WorkRequest workRequest) { + this.workRequest = workRequest; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetZprConfigurationWorkRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + workRequest(o.getWorkRequest()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetZprConfigurationWorkRequestResponse build() { + return new GetZprConfigurationWorkRequestResponse( + __httpStatusCode__, headers, etag, opcRequestId, retryAfter, workRequest); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",retryAfter=").append(String.valueOf(retryAfter)); + sb.append(",workRequest=").append(String.valueOf(workRequest)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetZprConfigurationWorkRequestResponse)) { + return false; + } + + GetZprConfigurationWorkRequestResponse other = (GetZprConfigurationWorkRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.retryAfter, other.retryAfter) + && java.util.Objects.equals(this.workRequest, other.workRequest); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.retryAfter == null ? 43 : this.retryAfter.hashCode()); + result = (result * PRIME) + (this.workRequest == null ? 43 : this.workRequest.hashCode()); + return result; + } +} diff --git a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/responses/UpdatePluginResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprPolicyResponse.java similarity index 78% rename from bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/responses/UpdatePluginResponse.java rename to bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprPolicyResponse.java index aa6f5891d4e..3b66d3d92c1 100644 --- a/bmc-cloudbridge/src/main/java/com/oracle/bmc/cloudbridge/responses/UpdatePluginResponse.java +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprPolicyResponse.java @@ -2,12 +2,12 @@ * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ -package com.oracle.bmc.cloudbridge.responses; +package com.oracle.bmc.zpr.responses; -import com.oracle.bmc.cloudbridge.model.*; +import com.oracle.bmc.zpr.model.*; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220509") -public class UpdatePluginResponse extends com.oracle.bmc.responses.BmcResponse { +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class GetZprPolicyResponse extends com.oracle.bmc.responses.BmcResponse { /** * For optimistic concurrency control. See {@code if-match}. * @@ -41,16 +41,16 @@ public String getOpcRequestId() { } /** - * The returned Plugin instance. + * The returned ZprPolicy instance. */ - private com.oracle.bmc.cloudbridge.model.Plugin plugin; + private com.oracle.bmc.zpr.model.ZprPolicy zprPolicy; /** - * The returned Plugin instance. + * The returned ZprPolicy instance. * @return the value */ - public com.oracle.bmc.cloudbridge.model.Plugin getPlugin() { - return plugin; + public com.oracle.bmc.zpr.model.ZprPolicy getZprPolicy() { + return zprPolicy; } @java.beans.ConstructorProperties({ @@ -58,18 +58,18 @@ public com.oracle.bmc.cloudbridge.model.Plugin getPlugin() { "headers", "etag", "opcRequestId", - "plugin" + "zprPolicy" }) - private UpdatePluginResponse( + private GetZprPolicyResponse( int __httpStatusCode__, javax.ws.rs.core.MultivaluedMap headers, String etag, String opcRequestId, - com.oracle.bmc.cloudbridge.model.Plugin plugin) { + com.oracle.bmc.zpr.model.ZprPolicy zprPolicy) { super(__httpStatusCode__, headers); this.etag = etag; this.opcRequestId = opcRequestId; - this.plugin = plugin; + this.zprPolicy = zprPolicy; } public static class Builder { @@ -124,17 +124,17 @@ public Builder opcRequestId(String opcRequestId) { } /** - * The returned Plugin instance. + * The returned ZprPolicy instance. */ - private com.oracle.bmc.cloudbridge.model.Plugin plugin; + private com.oracle.bmc.zpr.model.ZprPolicy zprPolicy; /** - * The returned Plugin instance. - * @param plugin the value to set + * The returned ZprPolicy instance. + * @param zprPolicy the value to set * @return this builder */ - public Builder plugin(com.oracle.bmc.cloudbridge.model.Plugin plugin) { - this.plugin = plugin; + public Builder zprPolicy(com.oracle.bmc.zpr.model.ZprPolicy zprPolicy) { + this.zprPolicy = zprPolicy; return this; } @@ -142,12 +142,12 @@ public Builder plugin(com.oracle.bmc.cloudbridge.model.Plugin plugin) { * Copy method to populate the builder with values from the given instance. * @return this builder instance */ - public Builder copy(UpdatePluginResponse o) { + public Builder copy(GetZprPolicyResponse o) { __httpStatusCode__(o.get__httpStatusCode__()); headers(o.getHeaders()); etag(o.getEtag()); opcRequestId(o.getOpcRequestId()); - plugin(o.getPlugin()); + zprPolicy(o.getZprPolicy()); return this; } @@ -156,9 +156,9 @@ public Builder copy(UpdatePluginResponse o) { * Build the response object. * @return the response object */ - public UpdatePluginResponse build() { - return new UpdatePluginResponse( - __httpStatusCode__, headers, etag, opcRequestId, plugin); + public GetZprPolicyResponse build() { + return new GetZprPolicyResponse( + __httpStatusCode__, headers, etag, opcRequestId, zprPolicy); } } @@ -177,7 +177,7 @@ public String toString() { sb.append("super=").append(super.toString()); sb.append(",etag=").append(String.valueOf(etag)); sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); - sb.append(",plugin=").append(String.valueOf(plugin)); + sb.append(",zprPolicy=").append(String.valueOf(zprPolicy)); sb.append(")"); return sb.toString(); } @@ -187,15 +187,15 @@ public boolean equals(Object o) { if (this == o) { return true; } - if (!(o instanceof UpdatePluginResponse)) { + if (!(o instanceof GetZprPolicyResponse)) { return false; } - UpdatePluginResponse other = (UpdatePluginResponse) o; + GetZprPolicyResponse other = (GetZprPolicyResponse) o; return super.equals(o) && java.util.Objects.equals(this.etag, other.etag) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) - && java.util.Objects.equals(this.plugin, other.plugin); + && java.util.Objects.equals(this.zprPolicy, other.zprPolicy); } @Override @@ -204,7 +204,7 @@ public int hashCode() { int result = super.hashCode(); result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); - result = (result * PRIME) + (this.plugin == null ? 43 : this.plugin.hashCode()); + result = (result * PRIME) + (this.zprPolicy == null ? 43 : this.zprPolicy.hashCode()); return result; } } diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprPolicyWorkRequestResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprPolicyWorkRequestResponse.java new file mode 100644 index 00000000000..4ed6bf64622 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprPolicyWorkRequestResponse.java @@ -0,0 +1,245 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class GetZprPolicyWorkRequestResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @return the value + */ + public Integer getRetryAfter() { + return retryAfter; + } + + /** + * The returned WorkRequest instance. + */ + private com.oracle.bmc.zpr.model.WorkRequest workRequest; + + /** + * The returned WorkRequest instance. + * @return the value + */ + public com.oracle.bmc.zpr.model.WorkRequest getWorkRequest() { + return workRequest; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "retryAfter", + "workRequest" + }) + private GetZprPolicyWorkRequestResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String etag, + String opcRequestId, + Integer retryAfter, + com.oracle.bmc.zpr.model.WorkRequest workRequest) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + this.workRequest = workRequest; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For optimistic concurrency control. See {@code if-match}. + * + */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + * @param retryAfter the value to set + * @return this builder + */ + public Builder retryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * The returned WorkRequest instance. + */ + private com.oracle.bmc.zpr.model.WorkRequest workRequest; + + /** + * The returned WorkRequest instance. + * @param workRequest the value to set + * @return this builder + */ + public Builder workRequest(com.oracle.bmc.zpr.model.WorkRequest workRequest) { + this.workRequest = workRequest; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetZprPolicyWorkRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + workRequest(o.getWorkRequest()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public GetZprPolicyWorkRequestResponse build() { + return new GetZprPolicyWorkRequestResponse( + __httpStatusCode__, headers, etag, opcRequestId, retryAfter, workRequest); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",retryAfter=").append(String.valueOf(retryAfter)); + sb.append(",workRequest=").append(String.valueOf(workRequest)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetZprPolicyWorkRequestResponse)) { + return false; + } + + GetZprPolicyWorkRequestResponse other = (GetZprPolicyWorkRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.retryAfter, other.retryAfter) + && java.util.Objects.equals(this.workRequest, other.workRequest); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.retryAfter == null ? 43 : this.retryAfter.hashCode()); + result = (result * PRIME) + (this.workRequest == null ? 43 : this.workRequest.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestErrorsResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestErrorsResponse.java new file mode 100644 index 00000000000..51584ae1f26 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestErrorsResponse.java @@ -0,0 +1,227 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprConfigurationWorkRequestErrorsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned WorkRequestErrorCollection instance. + */ + private com.oracle.bmc.zpr.model.WorkRequestErrorCollection workRequestErrorCollection; + + /** + * The returned WorkRequestErrorCollection instance. + * @return the value + */ + public com.oracle.bmc.zpr.model.WorkRequestErrorCollection getWorkRequestErrorCollection() { + return workRequestErrorCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "workRequestErrorCollection" + }) + private ListZprConfigurationWorkRequestErrorsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.zpr.model.WorkRequestErrorCollection workRequestErrorCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.workRequestErrorCollection = workRequestErrorCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned WorkRequestErrorCollection instance. + */ + private com.oracle.bmc.zpr.model.WorkRequestErrorCollection workRequestErrorCollection; + + /** + * The returned WorkRequestErrorCollection instance. + * @param workRequestErrorCollection the value to set + * @return this builder + */ + public Builder workRequestErrorCollection( + com.oracle.bmc.zpr.model.WorkRequestErrorCollection workRequestErrorCollection) { + this.workRequestErrorCollection = workRequestErrorCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListZprConfigurationWorkRequestErrorsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + workRequestErrorCollection(o.getWorkRequestErrorCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListZprConfigurationWorkRequestErrorsResponse build() { + return new ListZprConfigurationWorkRequestErrorsResponse( + __httpStatusCode__, + headers, + opcNextPage, + opcRequestId, + workRequestErrorCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",workRequestErrorCollection=") + .append(String.valueOf(workRequestErrorCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprConfigurationWorkRequestErrorsResponse)) { + return false; + } + + ListZprConfigurationWorkRequestErrorsResponse other = + (ListZprConfigurationWorkRequestErrorsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.workRequestErrorCollection, other.workRequestErrorCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.workRequestErrorCollection == null + ? 43 + : this.workRequestErrorCollection.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestLogsResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestLogsResponse.java new file mode 100644 index 00000000000..5cbb9cf55cf --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestLogsResponse.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprConfigurationWorkRequestLogsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned WorkRequestLogEntryCollection instance. + */ + private com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection workRequestLogEntryCollection; + + /** + * The returned WorkRequestLogEntryCollection instance. + * @return the value + */ + public com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection + getWorkRequestLogEntryCollection() { + return workRequestLogEntryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "workRequestLogEntryCollection" + }) + private ListZprConfigurationWorkRequestLogsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection workRequestLogEntryCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.workRequestLogEntryCollection = workRequestLogEntryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned WorkRequestLogEntryCollection instance. + */ + private com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection; + + /** + * The returned WorkRequestLogEntryCollection instance. + * @param workRequestLogEntryCollection the value to set + * @return this builder + */ + public Builder workRequestLogEntryCollection( + com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection) { + this.workRequestLogEntryCollection = workRequestLogEntryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListZprConfigurationWorkRequestLogsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + workRequestLogEntryCollection(o.getWorkRequestLogEntryCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListZprConfigurationWorkRequestLogsResponse build() { + return new ListZprConfigurationWorkRequestLogsResponse( + __httpStatusCode__, + headers, + opcNextPage, + opcRequestId, + workRequestLogEntryCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",workRequestLogEntryCollection=") + .append(String.valueOf(workRequestLogEntryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprConfigurationWorkRequestLogsResponse)) { + return false; + } + + ListZprConfigurationWorkRequestLogsResponse other = + (ListZprConfigurationWorkRequestLogsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.workRequestLogEntryCollection, other.workRequestLogEntryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.workRequestLogEntryCollection == null + ? 43 + : this.workRequestLogEntryCollection.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestsResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestsResponse.java new file mode 100644 index 00000000000..c967373905a --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestsResponse.java @@ -0,0 +1,227 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprConfigurationWorkRequestsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned WorkRequestSummaryCollection instance. + */ + private com.oracle.bmc.zpr.model.WorkRequestSummaryCollection workRequestSummaryCollection; + + /** + * The returned WorkRequestSummaryCollection instance. + * @return the value + */ + public com.oracle.bmc.zpr.model.WorkRequestSummaryCollection getWorkRequestSummaryCollection() { + return workRequestSummaryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "workRequestSummaryCollection" + }) + private ListZprConfigurationWorkRequestsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.zpr.model.WorkRequestSummaryCollection workRequestSummaryCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.workRequestSummaryCollection = workRequestSummaryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned WorkRequestSummaryCollection instance. + */ + private com.oracle.bmc.zpr.model.WorkRequestSummaryCollection workRequestSummaryCollection; + + /** + * The returned WorkRequestSummaryCollection instance. + * @param workRequestSummaryCollection the value to set + * @return this builder + */ + public Builder workRequestSummaryCollection( + com.oracle.bmc.zpr.model.WorkRequestSummaryCollection + workRequestSummaryCollection) { + this.workRequestSummaryCollection = workRequestSummaryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListZprConfigurationWorkRequestsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + workRequestSummaryCollection(o.getWorkRequestSummaryCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListZprConfigurationWorkRequestsResponse build() { + return new ListZprConfigurationWorkRequestsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + workRequestSummaryCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",workRequestSummaryCollection=") + .append(String.valueOf(workRequestSummaryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprConfigurationWorkRequestsResponse)) { + return false; + } + + ListZprConfigurationWorkRequestsResponse other = + (ListZprConfigurationWorkRequestsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.workRequestSummaryCollection, other.workRequestSummaryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.workRequestSummaryCollection == null + ? 43 + : this.workRequestSummaryCollection.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPoliciesResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPoliciesResponse.java new file mode 100644 index 00000000000..85e324f1c0f --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPoliciesResponse.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprPoliciesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned ZprPolicyCollection instance. + */ + private com.oracle.bmc.zpr.model.ZprPolicyCollection zprPolicyCollection; + + /** + * The returned ZprPolicyCollection instance. + * @return the value + */ + public com.oracle.bmc.zpr.model.ZprPolicyCollection getZprPolicyCollection() { + return zprPolicyCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "zprPolicyCollection" + }) + private ListZprPoliciesResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.zpr.model.ZprPolicyCollection zprPolicyCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.zprPolicyCollection = zprPolicyCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned ZprPolicyCollection instance. + */ + private com.oracle.bmc.zpr.model.ZprPolicyCollection zprPolicyCollection; + + /** + * The returned ZprPolicyCollection instance. + * @param zprPolicyCollection the value to set + * @return this builder + */ + public Builder zprPolicyCollection( + com.oracle.bmc.zpr.model.ZprPolicyCollection zprPolicyCollection) { + this.zprPolicyCollection = zprPolicyCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListZprPoliciesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + zprPolicyCollection(o.getZprPolicyCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListZprPoliciesResponse build() { + return new ListZprPoliciesResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, zprPolicyCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",zprPolicyCollection=").append(String.valueOf(zprPolicyCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprPoliciesResponse)) { + return false; + } + + ListZprPoliciesResponse other = (ListZprPoliciesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.zprPolicyCollection, other.zprPolicyCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.zprPolicyCollection == null + ? 43 + : this.zprPolicyCollection.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestErrorsResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestErrorsResponse.java new file mode 100644 index 00000000000..762774909bf --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestErrorsResponse.java @@ -0,0 +1,225 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprPolicyWorkRequestErrorsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned WorkRequestErrorCollection instance. + */ + private com.oracle.bmc.zpr.model.WorkRequestErrorCollection workRequestErrorCollection; + + /** + * The returned WorkRequestErrorCollection instance. + * @return the value + */ + public com.oracle.bmc.zpr.model.WorkRequestErrorCollection getWorkRequestErrorCollection() { + return workRequestErrorCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "workRequestErrorCollection" + }) + private ListZprPolicyWorkRequestErrorsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.zpr.model.WorkRequestErrorCollection workRequestErrorCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.workRequestErrorCollection = workRequestErrorCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned WorkRequestErrorCollection instance. + */ + private com.oracle.bmc.zpr.model.WorkRequestErrorCollection workRequestErrorCollection; + + /** + * The returned WorkRequestErrorCollection instance. + * @param workRequestErrorCollection the value to set + * @return this builder + */ + public Builder workRequestErrorCollection( + com.oracle.bmc.zpr.model.WorkRequestErrorCollection workRequestErrorCollection) { + this.workRequestErrorCollection = workRequestErrorCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListZprPolicyWorkRequestErrorsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + workRequestErrorCollection(o.getWorkRequestErrorCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListZprPolicyWorkRequestErrorsResponse build() { + return new ListZprPolicyWorkRequestErrorsResponse( + __httpStatusCode__, + headers, + opcNextPage, + opcRequestId, + workRequestErrorCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",workRequestErrorCollection=") + .append(String.valueOf(workRequestErrorCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprPolicyWorkRequestErrorsResponse)) { + return false; + } + + ListZprPolicyWorkRequestErrorsResponse other = (ListZprPolicyWorkRequestErrorsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.workRequestErrorCollection, other.workRequestErrorCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.workRequestErrorCollection == null + ? 43 + : this.workRequestErrorCollection.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestLogsResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestLogsResponse.java new file mode 100644 index 00000000000..d459bbe75ad --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestLogsResponse.java @@ -0,0 +1,228 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprPolicyWorkRequestLogsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The returned WorkRequestLogEntryCollection instance. + */ + private com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection workRequestLogEntryCollection; + + /** + * The returned WorkRequestLogEntryCollection instance. + * @return the value + */ + public com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection + getWorkRequestLogEntryCollection() { + return workRequestLogEntryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "workRequestLogEntryCollection" + }) + private ListZprPolicyWorkRequestLogsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection workRequestLogEntryCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.workRequestLogEntryCollection = workRequestLogEntryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The returned WorkRequestLogEntryCollection instance. + */ + private com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection; + + /** + * The returned WorkRequestLogEntryCollection instance. + * @param workRequestLogEntryCollection the value to set + * @return this builder + */ + public Builder workRequestLogEntryCollection( + com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection) { + this.workRequestLogEntryCollection = workRequestLogEntryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListZprPolicyWorkRequestLogsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + workRequestLogEntryCollection(o.getWorkRequestLogEntryCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListZprPolicyWorkRequestLogsResponse build() { + return new ListZprPolicyWorkRequestLogsResponse( + __httpStatusCode__, + headers, + opcNextPage, + opcRequestId, + workRequestLogEntryCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",workRequestLogEntryCollection=") + .append(String.valueOf(workRequestLogEntryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprPolicyWorkRequestLogsResponse)) { + return false; + } + + ListZprPolicyWorkRequestLogsResponse other = (ListZprPolicyWorkRequestLogsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.workRequestLogEntryCollection, other.workRequestLogEntryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.workRequestLogEntryCollection == null + ? 43 + : this.workRequestLogEntryCollection.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestsResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestsResponse.java new file mode 100644 index 00000000000..6d73bbd0d7d --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestsResponse.java @@ -0,0 +1,226 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprPolicyWorkRequestsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * The returned WorkRequestSummaryCollection instance. + */ + private com.oracle.bmc.zpr.model.WorkRequestSummaryCollection workRequestSummaryCollection; + + /** + * The returned WorkRequestSummaryCollection instance. + * @return the value + */ + public com.oracle.bmc.zpr.model.WorkRequestSummaryCollection getWorkRequestSummaryCollection() { + return workRequestSummaryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "workRequestSummaryCollection" + }) + private ListZprPolicyWorkRequestsResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.zpr.model.WorkRequestSummaryCollection workRequestSummaryCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.workRequestSummaryCollection = workRequestSummaryCollection; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results remain. For + * important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * The returned WorkRequestSummaryCollection instance. + */ + private com.oracle.bmc.zpr.model.WorkRequestSummaryCollection workRequestSummaryCollection; + + /** + * The returned WorkRequestSummaryCollection instance. + * @param workRequestSummaryCollection the value to set + * @return this builder + */ + public Builder workRequestSummaryCollection( + com.oracle.bmc.zpr.model.WorkRequestSummaryCollection + workRequestSummaryCollection) { + this.workRequestSummaryCollection = workRequestSummaryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListZprPolicyWorkRequestsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + workRequestSummaryCollection(o.getWorkRequestSummaryCollection()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public ListZprPolicyWorkRequestsResponse build() { + return new ListZprPolicyWorkRequestsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + workRequestSummaryCollection); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",workRequestSummaryCollection=") + .append(String.valueOf(workRequestSummaryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprPolicyWorkRequestsResponse)) { + return false; + } + + ListZprPolicyWorkRequestsResponse other = (ListZprPolicyWorkRequestsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.workRequestSummaryCollection, other.workRequestSummaryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.workRequestSummaryCollection == null + ? 43 + : this.workRequestSummaryCollection.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/UpdateZprPolicyResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/UpdateZprPolicyResponse.java new file mode 100644 index 00000000000..df1ae7e1f8b --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/UpdateZprPolicyResponse.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class UpdateZprPolicyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private UpdateZprPolicyResponse( + int __httpStatusCode__, + javax.ws.rs.core.MultivaluedMap headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder { + private int __httpStatusCode__; + + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private javax.ws.rs.core.MultivaluedMap headers; + + public Builder headers(javax.ws.rs.core.MultivaluedMap headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateZprPolicyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * @return the response object + */ + public UpdateZprPolicyResponse build() { + return new UpdateZprPolicyResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateZprPolicyResponse)) { + return false; + } + + UpdateZprPolicyResponse other = (UpdateZprPolicyResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/pom.xml b/pom.xml index bc88e8bf8e5..3fe55c10f91 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.oracle.oci.sdk oci-java-sdk - 2.73.0 + 2.79.0 pom Oracle Cloud Infrastructure SDK This project contains the SDK used for Oracle Cloud Infrastructure @@ -40,7 +40,7 @@ 2.35 4.5.13 4.4.13 - 31.0.1-jre + 33.3.0-jre 4.13.2 3.0.2 1.7.33 @@ -92,6 +92,7 @@ org.codehaus.mojo build-helper-maven-plugin + 3.6.0 timestamp-property @@ -172,6 +173,7 @@ org.apache.maven.plugins maven-javadoc-plugin + 3.7.0 ${dev.profile.skip.javadoc} @@ -214,6 +216,7 @@ org.apache.maven.plugins maven-javadoc-plugin + 3.7.0 true @@ -246,6 +249,7 @@ org.apache.maven.plugins maven-javadoc-plugin + 3.7.0 true @@ -319,7 +323,7 @@ org.codehaus.mojo build-helper-maven-plugin - 1.12 + 3.6.0 com.mycila @@ -358,7 +362,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.0 + 3.7.0 jar @@ -374,7 +378,6 @@ *.internal.* - true 2048 6144m none @@ -416,13 +419,13 @@ org.codehaus.mojo exec-maven-plugin - 1.6.0 + 3.3.0 true org.apache.maven.plugins maven-enforcer-plugin - 3.3.0 + 3.5.0 org.codehaus.mojo @@ -431,6 +434,11 @@ + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.2 + @@ -591,6 +599,11 @@ hamcrest-core ${hamcrest.core.version} + + org.hamcrest + hamcrest-all + ${hamcrest.core.version} + org.hamcrest hamcrest-junit @@ -848,6 +861,12 @@ bmc-marketplaceprivateoffer bmc-resourcescheduler bmc-demandsignal + bmc-fleetappsmanagement + bmc-delegateaccesscontrol + bmc-generativeaiagent + bmc-generativeaiagentruntime + bmc-securityattribute + bmc-zpr bmc-full bmc-shaded